123456 |
- /*!
- * build: Vue Admin Plus
- * copyright: vue-admin-beautiful.com
- * time: 2024-06-19 15:25:39
- */
- "use strict";(self["webpackChunkadmin_plus"]=self["webpackChunkadmin_plus"]||[]).push([[81],{74161:function(e,t,l){l.d(t,{OX:function(){return R}});var n=l(53321),o=l(73745),a=l(53399),r=l(20162),s=l(73285),i=l(64310),d=l(26227),u=l(6745),c=l(49705),p=l(3886),h=l(57894),f=l(48743);const v=(0,u.o8)({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},size:{type:String,validator:c.P},width:{type:[String,Number],default:""},inlinePrompt:{type:Boolean,default:!1},activeIcon:{type:p.AA},inactiveIcon:{type:p.AA},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},activeColor:{type:String,default:""},inactiveColor:{type:String,default:""},borderColor:{type:String,default:""},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:(0,u.Cq)(Function)},id:String,tabindex:{type:[String,Number]},value:{type:[Boolean,String,Number],default:!1}}),m={[h.f_]:e=>(0,f.jn)(e)||(0,s.HD)(e)||(0,f.hj)(e),[h.O7]:e=>(0,f.jn)(e)||(0,s.HD)(e)||(0,f.hj)(e),[h.e_]:e=>(0,f.jn)(e)||(0,s.HD)(e)||(0,f.hj)(e)};var g=l(56490),y=l(97686),b=l(93460),C=l(23256),w=l(20265),S=l(37461),k=l(2641);const x=["onClick"],N=["id","aria-checked","aria-disabled","name","true-value","false-value","disabled","tabindex","onKeydown"],E=["aria-hidden"],U=["aria-hidden"],F=["aria-hidden"],_="ElSwitch",H=(0,n.aZ)({name:_}),T=(0,n.aZ)({...H,props:v,emits:m,setup(e,{expose:t,emit:l}){const u=e,c=(0,n.FN)(),{formItem:p}=(0,y.A)(),v=(0,b.Cd)(),m=(0,C.s3)("switch"),g=e=>{e.forEach((e=>{(0,w.A)({from:e[0],replacement:e[1],scope:_,version:"2.3.0",ref:"https://element-plus.org/en-US/component/switch.html#attributes",type:"Attribute"},(0,n.Fl)((()=>{var t;return!!(null==(t=c.vnode.props)?void 0:t[e[2]])})))}))};g([['"value"','"model-value" or "v-model"',"value"],['"active-color"',"CSS var `--el-switch-on-color`","activeColor"],['"inactive-color"',"CSS var `--el-switch-off-color`","inactiveColor"],['"border-color"',"CSS var `--el-switch-border-color`","borderColor"]]);const{inputId:H}=(0,y.p)(u,{formItemContext:p}),T=(0,b.DT)((0,n.Fl)((()=>u.loading))),M=(0,o.iH)(!1!==u.modelValue),D=(0,o.iH)(),R=(0,o.iH)(),A=(0,n.Fl)((()=>[m.b(),m.m(v.value),m.is("disabled",T.value),m.is("checked",W.value)])),O=(0,n.Fl)((()=>[m.e("label"),m.em("label","left"),m.is("active",!W.value)])),K=(0,n.Fl)((()=>[m.e("label"),m.em("label","right"),m.is("active",W.value)])),L=(0,n.Fl)((()=>({width:(0,S.Nn)(u.width)})));(0,n.YP)((()=>u.modelValue),(()=>{M.value=!0})),(0,n.YP)((()=>u.value),(()=>{M.value=!1}));const $=(0,n.Fl)((()=>M.value?u.modelValue:u.value)),W=(0,n.Fl)((()=>$.value===u.activeValue));[u.activeValue,u.inactiveValue].includes($.value)||(l(h.f_,u.inactiveValue),l(h.O7,u.inactiveValue),l(h.e_,u.inactiveValue)),(0,n.YP)(W,(e=>{var t;D.value.checked=e,u.validateEvent&&(null==(t=null==p?void 0:p.validate)||t.call(p,"change").catch((e=>(0,k.N)(e))))}));const I=()=>{const e=W.value?u.inactiveValue:u.activeValue;l(h.f_,e),l(h.O7,e),l(h.e_,e),(0,n.Y3)((()=>{D.value.checked=W.value}))},P=()=>{if(T.value)return;const{beforeChange:e}=u;if(!e)return void I();const t=e(),l=[(0,s.tI)(t),(0,f.jn)(t)].includes(!0);l||(0,k._)(_,"beforeChange must return type `Promise<boolean>` or `boolean`"),(0,s.tI)(t)?t.then((e=>{e&&I()})).catch((e=>{(0,k.N)(_,`some error occurred: ${e}`)})):t&&I()},B=(0,n.Fl)((()=>m.cssVarBlock({...u.activeColor?{"on-color":u.activeColor}:null,...u.inactiveColor?{"off-color":u.inactiveColor}:null,...u.borderColor?{"border-color":u.borderColor}:null}))),q=()=>{var e,t;null==(t=null==(e=D.value)?void 0:e.focus)||t.call(e)};return(0,n.bv)((()=>{D.value.checked=W.value})),t({focus:q,checked:W}),(e,t)=>((0,n.wg)(),(0,n.iD)("div",{class:(0,a.C_)((0,o.SU)(A)),style:(0,a.j5)((0,o.SU)(B)),onClick:(0,r.iM)(P,["prevent"])},[(0,n._)("input",{id:(0,o.SU)(H),ref_key:"input",ref:D,class:(0,a.C_)((0,o.SU)(m).e("input")),type:"checkbox",role:"switch","aria-checked":(0,o.SU)(W),"aria-disabled":(0,o.SU)(T),name:e.name,"true-value":e.activeValue,"false-value":e.inactiveValue,disabled:(0,o.SU)(T),tabindex:e.tabindex,onChange:I,onKeydown:(0,r.D2)(P,["enter"])},null,42,N),e.inlinePrompt||!e.inactiveIcon&&!e.inactiveText?(0,n.kq)("v-if",!0):((0,n.wg)(),(0,n.iD)("span",{key:0,class:(0,a.C_)((0,o.SU)(O))},[e.inactiveIcon?((0,n.wg)(),(0,n.j4)((0,o.SU)(i.gn),{key:0},{default:(0,n.w5)((()=>[((0,n.wg)(),(0,n.j4)((0,n.LL)(e.inactiveIcon)))])),_:1})):(0,n.kq)("v-if",!0),!e.inactiveIcon&&e.inactiveText?((0,n.wg)(),(0,n.iD)("span",{key:1,"aria-hidden":(0,o.SU)(W)},(0,a.zw)(e.inactiveText),9,E)):(0,n.kq)("v-if",!0)],2)),(0,n._)("span",{ref_key:"core",ref:R,class:(0,a.C_)((0,o.SU)(m).e("core")),style:(0,a.j5)((0,o.SU)(L))},[e.inlinePrompt?((0,n.wg)(),(0,n.iD)("div",{key:0,class:(0,a.C_)((0,o.SU)(m).e("inner"))},[e.activeIcon||e.inactiveIcon?((0,n.wg)(),(0,n.j4)((0,o.SU)(i.gn),{key:0,class:(0,a.C_)((0,o.SU)(m).is("icon"))},{default:(0,n.w5)((()=>[((0,n.wg)(),(0,n.j4)((0,n.LL)((0,o.SU)(W)?e.activeIcon:e.inactiveIcon)))])),_:1},8,["class"])):e.activeText||e.inactiveText?((0,n.wg)(),(0,n.iD)("span",{key:1,class:(0,a.C_)((0,o.SU)(m).is("text")),"aria-hidden":!(0,o.SU)(W)},(0,a.zw)((0,o.SU)(W)?e.activeText:e.inactiveText),11,U)):(0,n.kq)("v-if",!0)],2)):(0,n.kq)("v-if",!0),(0,n._)("div",{class:(0,a.C_)((0,o.SU)(m).e("action"))},[e.loading?((0,n.wg)(),(0,n.j4)((0,o.SU)(i.gn),{key:0,class:(0,a.C_)((0,o.SU)(m).is("loading"))},{default:(0,n.w5)((()=>[(0,n.Wm)((0,o.SU)(d.gbz))])),_:1},8,["class"])):(0,n.kq)("v-if",!0)],2)],6),e.inlinePrompt||!e.activeIcon&&!e.activeText?(0,n.kq)("v-if",!0):((0,n.wg)(),(0,n.iD)("span",{key:1,class:(0,a.C_)((0,o.SU)(K))},[e.activeIcon?((0,n.wg)(),(0,n.j4)((0,o.SU)(i.gn),{key:0},{default:(0,n.w5)((()=>[((0,n.wg)(),(0,n.j4)((0,n.LL)(e.activeIcon)))])),_:1})):(0,n.kq)("v-if",!0),!e.activeIcon&&e.activeText?((0,n.wg)(),(0,n.iD)("span",{key:1,"aria-hidden":!(0,o.SU)(W)},(0,a.zw)(e.activeText),9,F)):(0,n.kq)("v-if",!0)],2))],14,x))}});var M=(0,g.Z)(T,[["__file","/home/runner/work/element-plus/element-plus/packages/components/switch/src/switch.vue"]]),D=l(82134);const R=(0,D.nz)(M)},3308:function(e,t,l){l(17388),l(24021)},24386:function(e,t,l){l(17388),l(88267)},48897:function(e,t,l){l(17388),l(62518),l(53253),l(13215)},80180:function(e,t,l){l.d(t,{eI:function(){return ft},$Y:function(){return vt}});var n=l(53321),o=l(53399),a=l(20162),r=l(10260),s=l(55321),i=l(73745),d=l(43764),u=l(96384),c=l(25242),p=l(79943),h=l(37966),f=l(73285),v=l(2641),m=l(48743),g=l(13530);const y=function(e){var t;return null==(t=e.target)?void 0:t.closest("td")},b=function(e,t,l,n,o){if(!t&&!n&&(!o||Array.isArray(o)&&!o.length))return e;l="string"===typeof l?"descending"===l?-1:1:l&&l<0?-1:1;const a=n?null:function(l,n){return o?(Array.isArray(o)||(o=[o]),o.map((t=>"string"===typeof t?(0,u.Z)(l,t):t(l,n,e)))):("$key"!==t&&(0,f.Kn)(l)&&"$value"in l&&(l=l.$value),[(0,f.Kn)(l)?(0,u.Z)(l,t):l])},r=function(e,t){if(n)return n(e.value,t.value);for(let l=0,n=e.key.length;l<n;l++){if(e.key[l]<t.key[l])return-1;if(e.key[l]>t.key[l])return 1}return 0};return e.map(((e,t)=>({value:e,index:t,key:a?a(e,t):null}))).sort(((e,t)=>{let n=r(e,t);return n||(n=e.index-t.index),n*+l})).map((e=>e.value))},C=function(e,t){let l=null;return e.columns.forEach((e=>{e.id===t&&(l=e)})),l},w=function(e,t){let l=null;for(let n=0;n<e.columns.length;n++){const o=e.columns[n];if(o.columnKey===t){l=o;break}}return l||(0,v._)("ElTable",`No column matching with column-key: ${t}`),l},S=function(e,t,l){const n=(t.className||"").match(new RegExp(`${l}-table_[^\\s]+`,"gm"));return n?C(e,n[0]):null},k=(e,t)=>{if(!e)throw new Error("Row is required when get row identity");if("string"===typeof t){if(!t.includes("."))return`${e[t]}`;const l=t.split(".");let n=e;for(const e of l)n=n[e];return`${n}`}if("function"===typeof t)return t.call(null,e)},x=function(e,t){const l={};return(e||[]).forEach(((e,n)=>{l[k(e,t)]={row:e,index:n}})),l};function N(e,t){const l={};let n;for(n in e)l[n]=e[n];for(n in t)if((0,f.RI)(t,n)){const e=t[n];"undefined"!==typeof e&&(l[n]=e)}return l}function E(e){return""===e||void 0!==e&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function U(e){return""===e||void 0!==e&&(e=E(e),Number.isNaN(e)&&(e=80)),e}function F(e){return"number"===typeof e?e:"string"===typeof e?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function _(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...l)=>e(t(...l))))}function H(e,t,l){let n=!1;const o=e.indexOf(t),a=-1!==o,r=r=>{"add"===r?e.push(t):e.splice(o,1),n=!0,(0,f.kJ)(t.children)&&t.children.forEach((t=>{H(e,t,null!=l?l:!a)}))};return(0,m.jn)(l)?l&&!a?r("add"):!l&&a&&r("remove"):r(a?"remove":"add"),n}function T(e,t,l="children",n="hasChildren"){const o=e=>!(Array.isArray(e)&&e.length);function a(e,r,s){t(e,r,s),r.forEach((e=>{if(e[n])return void t(e,null,s+1);const r=e[l];o(r)||a(e,r,s+1)}))}e.forEach((e=>{if(e[n])return void t(e,null,0);const r=e[l];o(r)||a(e,r,0)}))}let M;function D(e,t,l,n,o){o=(0,c.Z)({enterable:!0,showArrow:!0},o);const a=null==e?void 0:e.dataset.prefix,r=null==e?void 0:e.querySelector(`.${a}-scrollbar__wrap`);function s(){const t="light"===o.effect,r=document.createElement("div");return r.className=[`${a}-popper`,t?"is-light":"is-dark",o.popperClass||""].join(" "),l=h(l),r.innerHTML=l,r.style.zIndex=String(n()),null==e||e.appendChild(r),r}function i(){const e=document.createElement("div");return e.className=`${a}-popper__arrow`,e}function u(){p&&p.update()}null==M||M(),M=()=>{try{p&&p.destroy(),m&&(null==e||e.removeChild(m)),t.removeEventListener("mouseenter",f),t.removeEventListener("mouseleave",v),null==r||r.removeEventListener("scroll",M),M=void 0}catch(l){}};let p=null,f=u,v=M;o.enterable&&({onOpen:f,onClose:v}=(0,g.F)({showAfter:o.showAfter,hideAfter:o.hideAfter,open:u,close:M}));const m=s();m.onmouseenter=f,m.onmouseleave=v;const y=[];if(o.offset&&y.push({name:"offset",options:{offset:[0,o.offset]}}),o.showArrow){const e=m.appendChild(i());y.push({name:"arrow",options:{element:e,padding:10}})}const b=o.popperOptions||{};return p=(0,d.fi)(t,m,{placement:o.placement||"top",strategy:"fixed",...b,modifiers:b.modifiers?y.concat(b.modifiers):y}),t.addEventListener("mouseenter",f),t.addEventListener("mouseleave",v),null==r||r.addEventListener("scroll",M),p}function R(e){return e.children?(0,p.Z)(e.children,R):[e]}function A(e,t){return e+t.colSpan}const O=(e,t,l,n)=>{let o=0,a=e;const r=l.states.columns.value;if(n){const t=R(n[e]),l=r.slice(0,r.indexOf(t[0]));o=l.reduce(A,0),a=o+t.reduce(A,0)-1}else o=e;let s;switch(t){case"left":a<l.states.fixedLeafColumnsLength.value&&(s="left");break;case"right":o>=r.length-l.states.rightFixedLeafColumnsLength.value&&(s="right");break;default:a<l.states.fixedLeafColumnsLength.value?s="left":o>=r.length-l.states.rightFixedLeafColumnsLength.value&&(s="right")}return s?{direction:s,start:o,after:a}:{}},K=(e,t,l,n,o,a=0)=>{const r=[],{direction:s,start:i,after:d}=O(t,l,n,o);if(s){const t="left"===s;r.push(`${e}-fixed-column--${s}`),t&&d+a===n.states.fixedLeafColumnsLength.value-1?r.push("is-last-column"):t||i-a!==n.states.columns.value.length-n.states.rightFixedLeafColumnsLength.value||r.push("is-first-column")}return r};function L(e,t){return e+(null===t.realWidth||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const $=(e,t,l,n)=>{const{direction:o,start:a=0,after:r=0}=O(e,t,l,n);if(!o)return;const s={},i="left"===o,d=l.states.columns.value;return i?s.left=d.slice(0,a).reduce(L,0):s.right=d.slice(r+1).reverse().reduce(L,0),s},W=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))};function I(e){const t=(0,n.FN)(),l=(0,i.iH)(!1),o=(0,i.iH)([]),a=()=>{const t=e.data.value||[],n=e.rowKey.value;if(l.value)o.value=t.slice();else if(n){const e=x(o.value,n);o.value=t.reduce(((t,l)=>{const o=k(l,n),a=e[o];return a&&t.push(l),t}),[])}else o.value=[]},r=(e,l)=>{const n=H(o.value,e,l);n&&t.emit("expand-change",e,o.value.slice())},s=l=>{t.store.assertRowKey();const n=e.data.value||[],a=e.rowKey.value,r=x(n,a);o.value=l.reduce(((e,t)=>{const l=r[t];return l&&e.push(l.row),e}),[])},d=t=>{const l=e.rowKey.value;if(l){const e=x(o.value,l);return!!e[k(t,l)]}return o.value.includes(t)};return{updateExpandRows:a,toggleRowExpansion:r,setExpandRowKeys:s,isRowExpanded:d,states:{expandRows:o,defaultExpandAll:l}}}function P(e){const t=(0,n.FN)(),l=(0,i.iH)(null),o=(0,i.iH)(null),a=e=>{t.store.assertRowKey(),l.value=e,s(e)},r=()=>{l.value=null},s=l=>{const{data:n,rowKey:a}=e;let r=null;a.value&&(r=((0,i.SU)(n)||[]).find((e=>k(e,a.value)===l))),o.value=r,t.emit("current-change",o.value,null)},d=e=>{const l=o.value;if(e&&e!==l)return o.value=e,void t.emit("current-change",o.value,l);!e&&l&&(o.value=null,t.emit("current-change",null,l))},u=()=>{const n=e.rowKey.value,a=e.data.value||[],i=o.value;if(!a.includes(i)&&i){if(n){const e=k(i,n);s(e)}else o.value=null;null===o.value&&t.emit("current-change",null,i)}else l.value&&(s(l.value),r())};return{setCurrentRowKey:a,restoreCurrentRowKey:r,setCurrentRowByKey:s,updateCurrentRow:d,updateCurrentRowData:u,states:{_currentRowKey:l,currentRow:o}}}function B(e){const t=(0,i.iH)([]),l=(0,i.iH)({}),o=(0,i.iH)(16),a=(0,i.iH)(!1),r=(0,i.iH)({}),s=(0,i.iH)("hasChildren"),d=(0,i.iH)("children"),u=(0,n.FN)(),c=(0,n.Fl)((()=>{if(!e.rowKey.value)return{};const t=e.data.value||[];return h(t)})),p=(0,n.Fl)((()=>{const t=e.rowKey.value,l=Object.keys(r.value),n={};return l.length?(l.forEach((e=>{if(r.value[e].length){const l={children:[]};r.value[e].forEach((e=>{const o=k(e,t);l.children.push(o),e[s.value]&&!n[o]&&(n[o]={children:[]})})),n[e]=l}})),n):n})),h=t=>{const l=e.rowKey.value,n={};return T(t,((e,t,o)=>{const r=k(e,l);Array.isArray(t)?n[r]={children:t.map((e=>k(e,l))),level:o}:a.value&&(n[r]={children:[],lazy:!0,level:o})}),d.value,s.value),n},f=(e=!1,n=(e=>null==(e=u.store)?void 0:e.states.defaultExpandAll.value)())=>{var o;const r=c.value,s=p.value,d=Object.keys(r),h={};if(d.length){const o=(0,i.SU)(l),u=[],c=(l,o)=>{if(e)return t.value?n||t.value.includes(o):!(!n&&!(null==l?void 0:l.expanded));{const e=n||t.value&&t.value.includes(o);return!(!(null==l?void 0:l.expanded)&&!e)}};d.forEach((e=>{const t=o[e],l={...r[e]};if(l.expanded=c(t,e),l.lazy){const{loaded:n=!1,loading:o=!1}=t||{};l.loaded=!!n,l.loading=!!o,u.push(e)}h[e]=l}));const p=Object.keys(s);a.value&&p.length&&u.length&&p.forEach((e=>{const t=o[e],l=s[e].children;if(u.includes(e)){if(0!==h[e].children.length)throw new Error("[ElTable]children must be an empty array.");h[e].children=l}else{const{loaded:n=!1,loading:o=!1}=t||{};h[e]={lazy:!0,loaded:!!n,loading:!!o,expanded:c(t,e),children:l,level:""}}}))}l.value=h,null==(o=u.store)||o.updateTableScrollY()};(0,n.YP)((()=>t.value),(()=>{f(!0)})),(0,n.YP)((()=>c.value),(()=>{f()})),(0,n.YP)((()=>p.value),(()=>{f()}));const v=e=>{t.value=e,f()},m=(t,n)=>{u.store.assertRowKey();const o=e.rowKey.value,a=k(t,o),r=a&&l.value[a];if(a&&r&&"expanded"in r){const e=r.expanded;n="undefined"===typeof n?!r.expanded:n,l.value[a].expanded=n,e!==n&&u.emit("expand-change",t,n),u.store.updateTableScrollY()}},g=t=>{u.store.assertRowKey();const n=e.rowKey.value,o=k(t,n),r=l.value[o];a.value&&r&&"loaded"in r&&!r.loaded?y(t,o,r):m(t,void 0)},y=(e,t,n)=>{const{load:o}=u.props;o&&!l.value[t].loaded&&(l.value[t].loading=!0,o(e,n,(n=>{if(!Array.isArray(n))throw new TypeError("[ElTable] data must be an array");l.value[t].loading=!1,l.value[t].loaded=!0,l.value[t].expanded=!0,n.length&&(r.value[t]=n),u.emit("expand-change",e,!0)})))};return{loadData:y,loadOrToggle:g,toggleTreeExpansion:m,updateTreeExpandKeys:v,updateTreeData:f,normalize:h,states:{expandRowKeys:t,treeData:l,indent:o,lazy:a,lazyTreeNodeMap:r,lazyColumnIdentifier:s,childrenColumnName:d}}}const q=(e,t)=>{const l=t.sortingColumn;return l&&"string"!==typeof l.sortable?b(e,t.sortProp,t.sortOrder,l.sortMethod,l.sortBy):e},j=e=>{const t=[];return e.forEach((e=>{e.children&&e.children.length>0?t.push.apply(t,j(e.children)):t.push(e)})),t};function z(){var e;const t=(0,n.FN)(),{size:l}=(0,i.BK)(null==(e=t.proxy)?void 0:e.$props),o=(0,i.iH)(null),a=(0,i.iH)([]),r=(0,i.iH)([]),s=(0,i.iH)(!1),d=(0,i.iH)([]),u=(0,i.iH)([]),c=(0,i.iH)([]),p=(0,i.iH)([]),h=(0,i.iH)([]),v=(0,i.iH)([]),m=(0,i.iH)([]),g=(0,i.iH)([]),y=[],b=(0,i.iH)(0),S=(0,i.iH)(0),N=(0,i.iH)(0),E=(0,i.iH)(!1),U=(0,i.iH)([]),F=(0,i.iH)(!1),_=(0,i.iH)(!1),T=(0,i.iH)(null),M=(0,i.iH)({}),D=(0,i.iH)(null),R=(0,i.iH)(null),A=(0,i.iH)(null),O=(0,i.iH)(null),K=(0,i.iH)(null);(0,n.YP)(a,(()=>t.state&&z(!1)),{deep:!0});const L=()=>{if(!o.value)throw new Error("[ElTable] prop row-key is required")},$=e=>{var t;null==(t=e.children)||t.forEach((t=>{t.fixed=e.fixed,$(t)}))},W=()=>{d.value.forEach((e=>{$(e)})),p.value=d.value.filter((e=>!0===e.fixed||"left"===e.fixed)),h.value=d.value.filter((e=>"right"===e.fixed)),p.value.length>0&&d.value[0]&&"selection"===d.value[0].type&&!d.value[0].fixed&&(d.value[0].fixed=!0,p.value.unshift(d.value[0]));const e=d.value.filter((e=>!e.fixed));u.value=[].concat(p.value).concat(e).concat(h.value);const t=j(e),l=j(p.value),n=j(h.value);b.value=t.length,S.value=l.length,N.value=n.length,c.value=[].concat(l).concat(t).concat(n),s.value=p.value.length>0||h.value.length>0},z=(e,l=!1)=>{e&&W(),l?t.state.doLayout():t.state.debouncedUpdateLayout()},V=e=>U.value.includes(e),Y=()=>{E.value=!1;const e=U.value;e.length&&(U.value=[],t.emit("selection-change",[]))},Z=()=>{let e;if(o.value){e=[];const t=x(U.value,o.value),l=x(a.value,o.value);for(const n in t)(0,f.RI)(t,n)&&!l[n]&&e.push(t[n].row)}else e=U.value.filter((e=>!a.value.includes(e)));if(e.length){const l=U.value.filter((t=>!e.includes(t)));U.value=l,t.emit("selection-change",l.slice())}},J=()=>(U.value||[]).slice(),G=(e,l=void 0,n=!0)=>{const o=H(U.value,e,l);if(o){const l=(U.value||[]).slice();n&&t.emit("select",l,e),t.emit("selection-change",l)}},X=()=>{var e,l;const n=_.value?!E.value:!(E.value||U.value.length);E.value=n;let o=!1,r=0;const s=null==(l=null==(e=null==t?void 0:t.store)?void 0:e.states)?void 0:l.rowKey.value;a.value.forEach(((e,t)=>{const l=t+r;T.value?T.value.call(null,e,l)&&H(U.value,e,n)&&(o=!0):H(U.value,e,n)&&(o=!0),r+=te(k(e,s))})),o&&t.emit("selection-change",U.value?U.value.slice():[]),t.emit("select-all",U.value)},Q=()=>{const e=x(U.value,o.value);a.value.forEach((t=>{const l=k(t,o.value),n=e[l];n&&(U.value[n.index]=t)}))},ee=()=>{var e,l,n;if(0===(null==(e=a.value)?void 0:e.length))return void(E.value=!1);let r;o.value&&(r=x(U.value,o.value));const s=function(e){return r?!!r[k(e,o.value)]:U.value.includes(e)};let i=!0,d=0,u=0;for(let o=0,c=(a.value||[]).length;o<c;o++){const e=null==(n=null==(l=null==t?void 0:t.store)?void 0:l.states)?void 0:n.rowKey.value,r=o+u,c=a.value[o],p=T.value&&T.value.call(null,c,r);if(s(c))d++;else if(!T.value||p){i=!1;break}u+=te(k(c,e))}0===d&&(i=!1),E.value=i},te=e=>{var l;if(!t||!t.store)return 0;const{treeData:n}=t.store.states;let o=0;const a=null==(l=n.value[e])?void 0:l.children;return a&&(o+=a.length,a.forEach((e=>{o+=te(e)}))),o},le=(e,t)=>{Array.isArray(e)||(e=[e]);const l={};return e.forEach((e=>{M.value[e.id]=t,l[e.columnKey||e.id]=t})),l},ne=(e,t,l)=>{R.value&&R.value!==e&&(R.value.order=null),R.value=e,A.value=t,O.value=l},oe=()=>{let e=(0,i.SU)(r);Object.keys(M.value).forEach((t=>{const l=M.value[t];if(!l||0===l.length)return;const n=C({columns:c.value},t);n&&n.filterMethod&&(e=e.filter((e=>l.some((t=>n.filterMethod.call(null,t,e,n))))))})),D.value=e},ae=()=>{a.value=q(D.value,{sortingColumn:R.value,sortProp:A.value,sortOrder:O.value})},re=(e=void 0)=>{e&&e.filter||oe(),ae()},se=e=>{const{tableHeaderRef:l}=t.refs;if(!l)return;const n=Object.assign({},l.filterPanels),o=Object.keys(n);if(o.length)if("string"===typeof e&&(e=[e]),Array.isArray(e)){const l=e.map((e=>w({columns:c.value},e)));o.forEach((e=>{const t=l.find((t=>t.id===e));t&&(t.filteredValue=[])})),t.store.commit("filterChange",{column:l,values:[],silent:!0,multi:!0})}else o.forEach((e=>{const t=c.value.find((t=>t.id===e));t&&(t.filteredValue=[])})),M.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},ie=()=>{R.value&&(ne(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:de,toggleRowExpansion:ue,updateExpandRows:ce,states:pe,isRowExpanded:he}=I({data:a,rowKey:o}),{updateTreeExpandKeys:fe,toggleTreeExpansion:ve,updateTreeData:me,loadOrToggle:ge,states:ye}=B({data:a,rowKey:o}),{updateCurrentRowData:be,updateCurrentRow:Ce,setCurrentRowKey:we,states:Se}=P({data:a,rowKey:o}),ke=e=>{de(e),fe(e)},xe=(e,t)=>{const l=c.value.some((({type:e})=>"expand"===e));l?ue(e,t):ve(e,t)};return{assertRowKey:L,updateColumns:W,scheduleLayout:z,isSelected:V,clearSelection:Y,cleanSelection:Z,getSelectionRows:J,toggleRowSelection:G,_toggleAllSelection:X,toggleAllSelection:null,updateSelectionByRowKey:Q,updateAllSelected:ee,updateFilters:le,updateCurrentRow:Ce,updateSort:ne,execFilter:oe,execSort:ae,execQuery:re,clearFilter:se,clearSort:ie,toggleRowExpansion:ue,setExpandRowKeysAdapter:ke,setCurrentRowKey:we,toggleRowExpansionAdapter:xe,isRowExpanded:he,updateExpandRows:ce,updateCurrentRowData:be,loadOrToggle:ge,updateTreeData:me,states:{tableSize:l,rowKey:o,data:a,_data:r,isComplex:s,_columns:d,originColumns:u,columns:c,fixedColumns:p,rightFixedColumns:h,leafColumns:v,fixedLeafColumns:m,rightFixedLeafColumns:g,updateOrderFns:y,leafColumnsLength:b,fixedLeafColumnsLength:S,rightFixedLeafColumnsLength:N,isAllSelected:E,selection:U,reserveSelection:F,selectOnIndeterminate:_,selectable:T,filters:M,filteredData:D,sortingColumn:R,sortProp:A,sortOrder:O,hoverRow:K,...pe,...ye,...Se}}}var V=l(23256);function Y(e,t){return e.map((e=>{var l;return e.id===t.id?t:((null==(l=e.children)?void 0:l.length)&&(e.children=Y(e.children,t)),e)}))}function Z(e){e.forEach((e=>{var t,l;e.no=null==(t=e.getColumnIndex)?void 0:t.call(e),(null==(l=e.children)?void 0:l.length)&&Z(e.children)})),e.sort(((e,t)=>e.no-t.no))}function J(){const e=(0,n.FN)(),t=z(),l=(0,V.s3)("table"),o={setData(t,l){const n=(0,i.SU)(t._data)!==l;t.data.value=l,t._data.value=l,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),(0,i.SU)(t.reserveSelection)?(e.store.assertRowKey(),e.store.updateSelectionByRowKey()):n?e.store.clearSelection():e.store.cleanSelection(),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(t,l,n,o){const a=(0,i.SU)(t._columns);let r=[];n?(n&&!n.children&&(n.children=[]),n.children.push(l),r=Y(a,n)):(a.push(l),r=a),Z(r),t._columns.value=r,t.updateOrderFns.push(o),"selection"===l.type&&(t.selectable.value=l.selectable,t.reserveSelection.value=l.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(t,l){var n;const o=null==(n=l.getColumnIndex)?void 0:n.call(l);o!==l.no&&(Z(t._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(t,l,o,a){const r=(0,i.SU)(t._columns)||[];if(o)o.children.splice(o.children.findIndex((e=>e.id===l.id)),1),(0,n.Y3)((()=>{var e;0===(null==(e=o.children)?void 0:e.length)&&delete o.children})),t._columns.value=Y(r,o);else{const e=r.indexOf(l);e>-1&&(r.splice(e,1),t._columns.value=r)}const s=t.updateOrderFns.indexOf(a);s>-1&&t.updateOrderFns.splice(s,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(t,l){const{prop:n,order:o,init:a}=l;if(n){const l=(0,i.SU)(t.columns).find((e=>e.property===n));l&&(l.order=o,e.store.updateSort(l,n,o),e.store.commit("changeSortCondition",{init:a}))}},changeSortCondition(t,l){const{sortingColumn:n,sortProp:o,sortOrder:a}=t,r=(0,i.SU)(n),s=(0,i.SU)(o),d=(0,i.SU)(a);null===d&&(t.sortingColumn.value=null,t.sortProp.value=null);const u={filter:!0};e.store.execQuery(u),l&&(l.silent||l.init)||e.emit("sort-change",{column:r,prop:s,order:d}),e.store.updateTableScrollY()},filterChange(t,l){const{column:n,values:o,silent:a}=l,r=e.store.updateFilters(n,o);e.store.execQuery(),a||e.emit("filter-change",r),e.store.updateTableScrollY()},toggleAllSelection(){e.store.toggleAllSelection()},rowSelectedChanged(t,l){e.store.toggleRowSelection(l),e.store.updateAllSelected()},setHoverRow(e,t){e.hoverRow.value=t},setCurrentRow(t,l){e.store.updateCurrentRow(l)}},a=function(t,...l){const n=e.store.mutations;if(!n[t])throw new Error(`Action not found: ${t}`);n[t].apply(e,[e.store.states].concat(l))},r=function(){(0,n.Y3)((()=>e.layout.updateScrollY.apply(e.layout)))};return{ns:l,...t,mutations:o,commit:a,updateTableScrollY:r}}const G={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy",data:"data",["treeProps.hasChildren"]:{key:"lazyColumnIdentifier",default:"hasChildren"},["treeProps.children"]:{key:"childrenColumnName",default:"children"}};function X(e,t){if(!e)throw new Error("Table is required.");const l=J();return l.toggleAllSelection=(0,r.Z)(l._toggleAllSelection,10),Object.keys(G).forEach((e=>{ee(te(t,e),e,l)})),Q(l,t),l}function Q(e,t){Object.keys(G).forEach((l=>{(0,n.YP)((()=>te(t,l)),(t=>{ee(t,l,e)}))}))}function ee(e,t,l){let n=e,o=G[t];"object"===typeof G[t]&&(o=o.key,n=n||G[t].default),l.states[o].value=n}function te(e,t){if(t.includes(".")){const l=t.split(".");let n=e;return l.forEach((e=>{n=n[e]})),n}return e[t]}var le=l(7938);class ne{constructor(e){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=(0,i.iH)(null),this.scrollX=(0,i.iH)(!1),this.scrollY=(0,i.iH)(!1),this.bodyWidth=(0,i.iH)(null),this.fixedWidth=(0,i.iH)(null),this.rightFixedWidth=(0,i.iH)(null),this.gutterWidth=0;for(const t in e)(0,f.RI)(e,t)&&((0,i.dq)(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(null===e)return!1;const t=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(null==t?void 0:t.wrapRef)){let e=!0;const l=this.scrollY.value;return e=t.wrapRef.scrollHeight>t.wrapRef.clientHeight,this.scrollY.value=e,l!==e}return!1}setHeight(e,t="height"){if(!le.C5)return;const l=this.table.vnode.el;if(e=F(e),this.height.value=Number(e),!l&&(e||0===e))return(0,n.Y3)((()=>this.setHeight(e,t)));"number"===typeof e?(l.style[t]=`${e}px`,this.updateElsHeight()):"string"===typeof e&&(l.style[t]=e,this.updateElsHeight())}setMaxHeight(e){this.setHeight(e,"max-height")}getFlattenColumns(){const e=[],t=this.table.store.states.columns.value;return t.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;while("DIV"!==t.tagName){if("none"===getComputedStyle(t).display)return!0;t=t.parentElement}return!1}updateColumnsWidth(){if(!le.C5)return;const e=this.fit,t=this.table.vnode.el.clientWidth;let l=0;const n=this.getFlattenColumns(),o=n.filter((e=>"number"!==typeof e.width));if(n.forEach((e=>{"number"===typeof e.width&&e.realWidth&&(e.realWidth=null)})),o.length>0&&e){if(n.forEach((e=>{l+=Number(e.width||e.minWidth||80)})),l<=t){this.scrollX.value=!1;const e=t-l;if(1===o.length)o[0].realWidth=Number(o[0].minWidth||80)+e;else{const t=o.reduce(((e,t)=>e+Number(t.minWidth||80)),0),l=e/t;let n=0;o.forEach(((e,t)=>{if(0===t)return;const o=Math.floor(Number(e.minWidth||80)*l);n+=o,e.realWidth=Number(e.minWidth||80)+o})),o[0].realWidth=Number(o[0].minWidth||80)+e-n}}else this.scrollX.value=!0,o.forEach((e=>{e.realWidth=Number(e.minWidth)}));this.bodyWidth.value=Math.max(l,t),this.table.state.resizeState.value.width=this.bodyWidth.value}else n.forEach((e=>{e.width||e.minWidth?e.realWidth=Number(e.width||e.minWidth):e.realWidth=80,l+=e.realWidth})),this.scrollX.value=l>t,this.bodyWidth.value=l;const a=this.store.states.fixedColumns.value;if(a.length>0){let e=0;a.forEach((t=>{e+=Number(t.realWidth||t.width)})),this.fixedWidth.value=e}const r=this.store.states.rightFixedColumns.value;if(r.length>0){let e=0;r.forEach((t=>{e+=Number(t.realWidth||t.width)})),this.rightFixedWidth.value=e}this.notifyObservers("columns")}addObserver(e){this.observers.push(e)}removeObserver(e){const t=this.observers.indexOf(e);-1!==t&&this.observers.splice(t,1)}notifyObservers(e){const t=this.observers;t.forEach((t=>{var l,n;switch(e){case"columns":null==(l=t.state)||l.onColumnsChange(this);break;case"scrollable":null==(n=t.state)||n.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${e}.`)}}))}}var oe=l(3389),ae=l(64310),re=l(26227),se=l(19962),ie=l(56490),de=l(52324),ue=l(36878);const{CheckboxGroup:ce}=oe.ElCheckbox,pe=(0,n.aZ)({name:"ElTableFilterPanel",components:{ElCheckbox:oe.ElCheckbox,ElCheckboxGroup:ce,ElScrollbar:s.Mr,ElTooltip:se.Q0,ElIcon:ae.gn,ArrowDown:re.K5e,ArrowUp:re.a2Z},directives:{ClickOutside:de.Z},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function}},setup(e){const t=(0,n.FN)(),{t:l}=(0,ue.bU)(),o=(0,V.s3)("table-filter"),a=null==t?void 0:t.parent;a.filterPanels.value[e.column.id]||(a.filterPanels.value[e.column.id]=t);const r=(0,i.iH)(!1),s=(0,i.iH)(null),d=(0,n.Fl)((()=>e.column&&e.column.filters)),u=(0,n.Fl)({get:()=>{var t;return((null==(t=e.column)?void 0:t.filteredValue)||[])[0]},set:e=>{c.value&&("undefined"!==typeof e&&null!==e?c.value.splice(0,1,e):c.value.splice(0,1))}}),c=(0,n.Fl)({get(){return e.column&&e.column.filteredValue||[]},set(t){e.column&&e.upDataColumn("filteredValue",t)}}),p=(0,n.Fl)((()=>!e.column||e.column.filterMultiple)),h=e=>e.value===u.value,f=()=>{r.value=!1},v=e=>{e.stopPropagation(),r.value=!r.value},m=()=>{r.value=!1},g=()=>{C(c.value),f()},y=()=>{c.value=[],C(c.value),f()},b=e=>{u.value=e,C("undefined"!==typeof e&&null!==e?c.value:[]),f()},C=t=>{e.store.commit("filterChange",{column:e.column,values:t}),e.store.updateAllSelected()};(0,n.YP)(r,(t=>{e.column&&e.upDataColumn("filterOpened",t)}),{immediate:!0});const w=(0,n.Fl)((()=>{var e,t;return null==(t=null==(e=s.value)?void 0:e.popperRef)?void 0:t.contentRef}));return{tooltipVisible:r,multiple:p,filteredValue:c,filterValue:u,filters:d,handleConfirm:g,handleReset:y,handleSelect:b,isActive:h,t:l,ns:o,showFilterPanel:v,hideFilterPanel:m,popperPaneRef:w,tooltip:s}}}),he={key:0},fe=["disabled"],ve=["label","onClick"];function me(e,t,l,a,r,s){const i=(0,n.up)("el-checkbox"),d=(0,n.up)("el-checkbox-group"),u=(0,n.up)("el-scrollbar"),c=(0,n.up)("arrow-up"),p=(0,n.up)("arrow-down"),h=(0,n.up)("el-icon"),f=(0,n.up)("el-tooltip"),v=(0,n.Q2)("click-outside");return(0,n.wg)(),(0,n.j4)(f,{ref:"tooltip",visible:e.tooltipVisible,offset:0,placement:e.placement,"show-arrow":!1,"stop-popper-mouse-event":!1,teleported:"",effect:"light",pure:"","popper-class":e.ns.b(),persistent:""},{content:(0,n.w5)((()=>[e.multiple?((0,n.wg)(),(0,n.iD)("div",he,[(0,n._)("div",{class:(0,o.C_)(e.ns.e("content"))},[(0,n.Wm)(u,{"wrap-class":e.ns.e("wrap")},{default:(0,n.w5)((()=>[(0,n.Wm)(d,{modelValue:e.filteredValue,"onUpdate:modelValue":t[0]||(t[0]=t=>e.filteredValue=t),class:(0,o.C_)(e.ns.e("checkbox-group"))},{default:(0,n.w5)((()=>[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.filters,(e=>((0,n.wg)(),(0,n.j4)(i,{key:e.value,label:e.value},{default:(0,n.w5)((()=>[(0,n.Uk)((0,o.zw)(e.text),1)])),_:2},1032,["label"])))),128))])),_:1},8,["modelValue","class"])])),_:1},8,["wrap-class"])],2),(0,n._)("div",{class:(0,o.C_)(e.ns.e("bottom"))},[(0,n._)("button",{class:(0,o.C_)({[e.ns.is("disabled")]:0===e.filteredValue.length}),disabled:0===e.filteredValue.length,type:"button",onClick:t[1]||(t[1]=(...t)=>e.handleConfirm&&e.handleConfirm(...t))},(0,o.zw)(e.t("el.table.confirmFilter")),11,fe),(0,n._)("button",{type:"button",onClick:t[2]||(t[2]=(...t)=>e.handleReset&&e.handleReset(...t))},(0,o.zw)(e.t("el.table.resetFilter")),1)],2)])):((0,n.wg)(),(0,n.iD)("ul",{key:1,class:(0,o.C_)(e.ns.e("list"))},[(0,n._)("li",{class:(0,o.C_)([e.ns.e("list-item"),{[e.ns.is("active")]:void 0===e.filterValue||null===e.filterValue}]),onClick:t[3]||(t[3]=t=>e.handleSelect(null))},(0,o.zw)(e.t("el.table.clearFilter")),3),((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.filters,(t=>((0,n.wg)(),(0,n.iD)("li",{key:t.value,class:(0,o.C_)([e.ns.e("list-item"),e.ns.is("active",e.isActive(t))]),label:t.value,onClick:l=>e.handleSelect(t.value)},(0,o.zw)(t.text),11,ve)))),128))],2))])),default:(0,n.w5)((()=>[(0,n.wy)(((0,n.wg)(),(0,n.iD)("span",{class:(0,o.C_)([`${e.ns.namespace.value}-table__column-filter-trigger`,`${e.ns.namespace.value}-none-outline`]),onClick:t[4]||(t[4]=(...t)=>e.showFilterPanel&&e.showFilterPanel(...t))},[(0,n.Wm)(h,null,{default:(0,n.w5)((()=>[e.column.filterOpened?((0,n.wg)(),(0,n.j4)(c,{key:0})):((0,n.wg)(),(0,n.j4)(p,{key:1}))])),_:1})],2)),[[v,e.hideFilterPanel,e.popperPaneRef]])])),_:1},8,["visible","placement","popper-class"])}var ge=(0,ie.Z)(pe,[["render",me],["__file","/home/runner/work/element-plus/element-plus/packages/components/table/src/filter-panel.vue"]]);function ye(e){const t=(0,n.FN)();(0,n.wF)((()=>{l.value.addObserver(t)})),(0,n.bv)((()=>{o(l.value),a(l.value)})),(0,n.ic)((()=>{o(l.value),a(l.value)})),(0,n.Ah)((()=>{l.value.removeObserver(t)}));const l=(0,n.Fl)((()=>{const t=e.layout;if(!t)throw new Error("Can not find table layout.");return t})),o=t=>{var l;const n=(null==(l=e.vnode.el)?void 0:l.querySelectorAll("colgroup > col"))||[];if(!n.length)return;const o=t.getFlattenColumns(),a={};o.forEach((e=>{a[e.id]=e}));for(let e=0,r=n.length;e<r;e++){const t=n[e],l=t.getAttribute("name"),o=a[l];o&&t.setAttribute("width",o.realWidth||o.width)}},a=t=>{var l,n;const o=(null==(l=e.vnode.el)?void 0:l.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let e=0,r=o.length;e<r;e++){const l=o[e];l.setAttribute("width",t.scrollY.value?t.gutterWidth:"0")}const a=(null==(n=e.vnode.el)?void 0:n.querySelectorAll("th.gutter"))||[];for(let e=0,r=a.length;e<r;e++){const l=a[e];l.style.width=t.scrollY.value?`${t.gutterWidth}px`:"0",l.style.display=t.scrollY.value?"":"none"}};return{tableLayout:l.value,onColumnsChange:o,onScrollableChange:a}}const be=Symbol("ElTable");var Ce=l(37461);function we(e,t){const l=(0,n.FN)(),o=(0,n.f3)(be),a=e=>{e.stopPropagation()},r=(e,t)=>{!t.filters&&t.sortable?g(e,t,!1):t.filterable&&!t.sortable&&a(e),null==o||o.emit("header-click",t,e)},s=(e,t)=>{null==o||o.emit("header-contextmenu",t,e)},d=(0,i.iH)(null),u=(0,i.iH)(!1),c=(0,i.iH)({}),p=(n,a)=>{if(le.C5&&!(a.children&&a.children.length>0)&&d.value&&e.border){u.value=!0;const r=o;t("set-drag-visible",!0);const s=null==r?void 0:r.vnode.el,i=s.getBoundingClientRect().left,p=l.vnode.el.querySelector(`th.${a.id}`),h=p.getBoundingClientRect(),f=h.left-i+30;(0,Ce.cn)(p,"noclick"),c.value={startMouseLeft:n.clientX,startLeft:h.right-i,startColumnLeft:h.left-i,tableLeft:i};const v=null==r?void 0:r.refs.resizeProxy;v.style.left=`${c.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const m=e=>{const t=e.clientX-c.value.startMouseLeft,l=c.value.startLeft+t;v.style.left=`${Math.max(f,l)}px`},g=()=>{if(u.value){const{startColumnLeft:l,startLeft:o}=c.value,s=Number.parseInt(v.style.left,10),i=s-l;a.width=a.realWidth=i,null==r||r.emit("header-dragend",a.width,o-l,a,n),requestAnimationFrame((()=>{e.store.scheduleLayout(!1,!0)})),document.body.style.cursor="",u.value=!1,d.value=null,c.value={},t("set-drag-visible",!1)}document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g),document.onselectstart=null,document.ondragstart=null,setTimeout((()=>{(0,Ce.IV)(p,"noclick")}),0)};document.addEventListener("mousemove",m),document.addEventListener("mouseup",g)}},h=(t,l)=>{if(l.children&&l.children.length>0)return;const n=t.target;if(!(0,m.kK)(n))return;const o=null==n?void 0:n.closest("th");if(l&&l.resizable&&!u.value&&e.border){const e=o.getBoundingClientRect(),n=document.body.style;e.width>12&&e.right-t.pageX<8?(n.cursor="col-resize",(0,Ce.pv)(o,"is-sortable")&&(o.style.cursor="col-resize"),d.value=l):u.value||(n.cursor="",(0,Ce.pv)(o,"is-sortable")&&(o.style.cursor="pointer"),d.value=null)}},f=()=>{le.C5&&(document.body.style.cursor="")},v=({order:e,sortOrders:t})=>{if(""===e)return t[0];const l=t.indexOf(e||null);return t[l>t.length-2?0:l+1]},g=(t,l,n)=>{var a;t.stopPropagation();const r=l.order===n?null:n||v(l),s=null==(a=t.target)?void 0:a.closest("th");if(s&&(0,Ce.pv)(s,"noclick"))return void(0,Ce.IV)(s,"noclick");if(!l.sortable)return;const i=e.store.states;let d,u=i.sortProp.value;const c=i.sortingColumn.value;(c!==l||c===l&&null===c.order)&&(c&&(c.order=null),i.sortingColumn.value=l,u=l.property),d=l.order=r||null,i.sortProp.value=u,i.sortOrder.value=d,null==o||o.store.commit("changeSortCondition")};return{handleHeaderClick:r,handleHeaderContextMenu:s,handleMouseDown:p,handleMouseMove:h,handleMouseOut:f,handleSortClick:g,handleFilterClick:a}}function Se(e){const t=(0,n.f3)(be),l=(0,V.s3)("table"),o=e=>{const l=null==t?void 0:t.props.headerRowStyle;return"function"===typeof l?l.call(null,{rowIndex:e}):l},a=e=>{const l=[],n=null==t?void 0:t.props.headerRowClassName;return"string"===typeof n?l.push(n):"function"===typeof n&&l.push(n.call(null,{rowIndex:e})),l.join(" ")},r=(l,n,o,a)=>{var r;let s=null!=(r=null==t?void 0:t.props.headerCellStyle)?r:{};"function"===typeof s&&(s=s.call(null,{rowIndex:l,columnIndex:n,row:o,column:a}));const i=$(n,a.fixed,e.store,o);return W(i,"left"),W(i,"right"),Object.assign({},s,i)},s=(n,o,a,r)=>{const s=K(l.b(),o,r.fixed,e.store,a),i=[r.id,r.order,r.headerAlign,r.className,r.labelClassName,...s];r.children||i.push("is-leaf"),r.sortable&&i.push("is-sortable");const d=null==t?void 0:t.props.headerCellClassName;return"string"===typeof d?i.push(d):"function"===typeof d&&i.push(d.call(null,{rowIndex:n,columnIndex:o,row:a,column:r})),i.push(l.e("cell")),i.filter((e=>Boolean(e))).join(" ")};return{getHeaderRowStyle:o,getHeaderRowClass:a,getHeaderCellStyle:r,getHeaderCellClass:s}}const ke=e=>{const t=[];return e.forEach((e=>{e.children?(t.push(e),t.push.apply(t,ke(e.children))):t.push(e)})),t},xe=e=>{let t=1;const l=(e,n)=>{if(n&&(e.level=n.level+1,t<e.level&&(t=e.level)),e.children){let t=0;e.children.forEach((n=>{l(n,e),t+=n.colSpan})),e.colSpan=t}else e.colSpan=1};e.forEach((e=>{e.level=1,l(e,void 0)}));const n=[];for(let a=0;a<t;a++)n.push([]);const o=ke(e);return o.forEach((e=>{e.children?(e.rowSpan=1,e.children.forEach((e=>e.isSubColumn=!0))):e.rowSpan=t-e.level+1,n[e.level-1].push(e)})),n};function Ne(e){const t=(0,n.f3)(be),l=(0,n.Fl)((()=>xe(e.store.states.originColumns.value))),o=(0,n.Fl)((()=>{const e=l.value.length>1;return e&&t&&(t.state.isGroup.value=!0),e})),a=e=>{e.stopPropagation(),null==t||t.store.commit("toggleAllSelection")};return{isGroup:o,toggleAllSelection:a,columnRows:l}}var Ee=(0,n.aZ)({name:"ElTableHeader",components:{ElCheckbox:oe.ElCheckbox},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e,{emit:t}){const l=(0,n.FN)(),o=(0,n.f3)(be),a=(0,V.s3)("table"),r=(0,i.iH)({}),{onColumnsChange:s,onScrollableChange:d}=ye(o);(0,n.bv)((async()=>{await(0,n.Y3)(),await(0,n.Y3)();const{prop:t,order:l}=e.defaultSort;null==o||o.store.commit("sort",{prop:t,order:l,init:!0})}));const{handleHeaderClick:u,handleHeaderContextMenu:c,handleMouseDown:p,handleMouseMove:h,handleMouseOut:f,handleSortClick:v,handleFilterClick:m}=we(e,t),{getHeaderRowStyle:g,getHeaderRowClass:y,getHeaderCellStyle:b,getHeaderCellClass:C}=Se(e),{isGroup:w,toggleAllSelection:S,columnRows:k}=Ne(e);return l.state={onColumnsChange:s,onScrollableChange:d},l.filterPanels=r,{ns:a,filterPanels:r,onColumnsChange:s,onScrollableChange:d,columnRows:k,getHeaderRowClass:y,getHeaderRowStyle:g,getHeaderCellClass:C,getHeaderCellStyle:b,handleHeaderClick:u,handleHeaderContextMenu:c,handleMouseDown:p,handleMouseMove:h,handleMouseOut:f,handleSortClick:v,handleFilterClick:m,isGroup:w,toggleAllSelection:S}},render(){const{ns:e,isGroup:t,columnRows:l,getHeaderCellStyle:o,getHeaderCellClass:a,getHeaderRowClass:r,getHeaderRowStyle:s,handleHeaderClick:i,handleHeaderContextMenu:d,handleMouseDown:u,handleMouseMove:c,handleSortClick:p,handleMouseOut:h,store:f,$parent:v}=this;let m=1;return(0,n.h)("thead",{class:{[e.is("group")]:t}},l.map(((e,t)=>(0,n.h)("tr",{class:r(t),key:t,style:s(t)},e.map(((l,r)=>(l.rowSpan>m&&(m=l.rowSpan),(0,n.h)("th",{class:a(t,r,e,l),colspan:l.colSpan,key:`${l.id}-thead`,rowspan:l.rowSpan,style:o(t,r,e,l),onClick:e=>i(e,l),onContextmenu:e=>d(e,l),onMousedown:e=>u(e,l),onMousemove:e=>c(e,l),onMouseout:h},[(0,n.h)("div",{class:["cell",l.filteredValue&&l.filteredValue.length>0?"highlight":""]},[l.renderHeader?l.renderHeader({column:l,$index:r,store:f,_self:v}):l.label,l.sortable&&(0,n.h)("span",{onClick:e=>p(e,l),class:"caret-wrapper"},[(0,n.h)("i",{onClick:e=>p(e,l,"ascending"),class:"sort-caret ascending"}),(0,n.h)("i",{onClick:e=>p(e,l,"descending"),class:"sort-caret descending"})]),l.filterable&&(0,n.h)(ge,{store:f,placement:l.filterPlacement||"bottom-start",column:l,upDataColumn:(e,t)=>{l[e]=t}})])]))))))))}}),Ue=l(28097);function Fe(e){const t=(0,n.f3)(be),l=(0,i.iH)(""),o=(0,i.iH)((0,n.h)("div")),{nextZIndex:a}=(0,Ue.Cn)(),s=(l,n,o)=>{var a;const r=t,s=y(l);let i;const d=null==(a=null==r?void 0:r.vnode.el)?void 0:a.dataset.prefix;s&&(i=S({columns:e.store.states.columns.value},s,d),i&&(null==r||r.emit(`cell-${o}`,n,i,s,l))),null==r||r.emit(`row-${o}`,n,i,l)},d=(e,t)=>{s(e,t,"dblclick")},u=(t,l)=>{e.store.commit("setCurrentRow",l),s(t,l,"click")},c=(e,t)=>{s(e,t,"contextmenu")},p=(0,r.Z)((t=>{e.store.commit("setHoverRow",t)}),30),h=(0,r.Z)((()=>{e.store.commit("setHoverRow",null)}),30),f=e=>{const t=window.getComputedStyle(e,null),l=Number.parseInt(t.paddingLeft,10)||0,n=Number.parseInt(t.paddingRight,10)||0,o=Number.parseInt(t.paddingTop,10)||0,a=Number.parseInt(t.paddingBottom,10)||0;return{left:l,right:n,top:o,bottom:a}},v=(l,n,o)=>{var r;const s=t,i=y(l),d=null==(r=null==s?void 0:s.vnode.el)?void 0:r.dataset.prefix;if(i){const t=S({columns:e.store.states.columns.value},i,d),o=s.hoverState={cell:i,column:t,row:n};null==s||s.emit("cell-mouse-enter",o.row,o.column,o.cell,l)}if(!o)return;const u=l.target.querySelector(".cell");if(!(0,Ce.pv)(u,`${d}-tooltip`)||!u.childNodes.length)return;const c=document.createRange();c.setStart(u,0),c.setEnd(u,u.childNodes.length);const p=Math.round(c.getBoundingClientRect().width),h=Math.round(c.getBoundingClientRect().height),{top:v,left:m,right:g,bottom:b}=f(u),C=m+g,w=v+b;(p+C>u.offsetWidth||h+w>u.offsetHeight||u.scrollWidth>u.offsetWidth)&&D(null==t?void 0:t.refs.tableWrapper,i,i.innerText||i.textContent,a,o)},m=e=>{const l=y(e);if(!l)return;const n=null==t?void 0:t.hoverState;null==t||t.emit("cell-mouse-leave",null==n?void 0:n.row,null==n?void 0:n.column,null==n?void 0:n.cell,e)};return{handleDoubleClick:d,handleClick:u,handleContextMenu:c,handleMouseEnter:p,handleMouseLeave:h,handleCellMouseEnter:v,handleCellMouseLeave:m,tooltipContent:l,tooltipTrigger:o}}function _e(e){const t=(0,n.f3)(be),l=(0,V.s3)("table"),o=(e,l)=>{const n=null==t?void 0:t.props.rowStyle;return"function"===typeof n?n.call(null,{row:e,rowIndex:l}):n||null},a=(n,o)=>{const a=[l.e("row")];(null==t?void 0:t.props.highlightCurrentRow)&&n===e.store.states.currentRow.value&&a.push("current-row"),e.stripe&&o%2===1&&a.push(l.em("row","striped"));const r=null==t?void 0:t.props.rowClassName;return"string"===typeof r?a.push(r):"function"===typeof r&&a.push(r.call(null,{row:n,rowIndex:o})),a},r=(l,n,o,a)=>{const r=null==t?void 0:t.props.cellStyle;let s=null!=r?r:{};"function"===typeof r&&(s=r.call(null,{rowIndex:l,columnIndex:n,row:o,column:a}));const i=$(n,null==e?void 0:e.fixed,e.store);return W(i,"left"),W(i,"right"),Object.assign({},s,i)},s=(n,o,a,r,s)=>{const i=K(l.b(),o,null==e?void 0:e.fixed,e.store,void 0,s),d=[r.id,r.align,r.className,...i],u=null==t?void 0:t.props.cellClassName;return"string"===typeof u?d.push(u):"function"===typeof u&&d.push(u.call(null,{rowIndex:n,columnIndex:o,row:a,column:r})),d.push(l.e("cell")),d.filter((e=>Boolean(e))).join(" ")},i=(e,l,n,o)=>{let a=1,r=1;const s=null==t?void 0:t.props.spanMethod;if("function"===typeof s){const t=s({row:e,column:l,rowIndex:n,columnIndex:o});Array.isArray(t)?(a=t[0],r=t[1]):"object"===typeof t&&(a=t.rowspan,r=t.colspan)}return{rowspan:a,colspan:r}},d=(e,t,l)=>{if(t<1)return e[l].realWidth;const n=e.map((({realWidth:e,width:t})=>e||t)).slice(l,l+t);return Number(n.reduce(((e,t)=>Number(e)+Number(t)),-1))};return{getRowStyle:o,getRowClass:a,getCellStyle:r,getCellClass:s,getSpan:i,getColspanRealWidth:d}}function He(e){const t=(0,n.f3)(be),l=(0,V.s3)("table"),{handleDoubleClick:o,handleClick:a,handleContextMenu:r,handleMouseEnter:s,handleMouseLeave:i,handleCellMouseEnter:d,handleCellMouseLeave:u,tooltipContent:p,tooltipTrigger:h}=Fe(e),{getRowStyle:f,getRowClass:v,getCellStyle:m,getCellClass:g,getSpan:y,getColspanRealWidth:b}=_e(e),C=(0,n.Fl)((()=>e.store.states.columns.value.findIndex((({type:e})=>"default"===e)))),w=(e,l)=>{const n=t.props.rowKey;return n?k(e,n):l},S=(p,h,S,k=!1)=>{const{tooltipEffect:N,tooltipOptions:E,store:U}=e,{indent:F,columns:_}=U.states,H=v(p,h);let T=!0;S&&(H.push(l.em("row",`level-${S.level}`)),T=S.display);const M=T?null:{display:"none"};return(0,n.h)("tr",{style:[M,f(p,h)],class:H,key:w(p,h),onDblclick:e=>o(e,p),onClick:e=>a(e,p),onContextmenu:e=>r(e,p),onMouseenter:()=>s(h),onMouseleave:i},_.value.map(((l,o)=>{const{rowspan:a,colspan:r}=y(p,l,h,o);if(!a||!r)return null;const s={...l};s.realWidth=b(_.value,r,o);const i={store:e.store,_self:e.context||t,column:s,row:p,$index:h,cellIndex:o,expanded:k};o===C.value&&S&&(i.treeNode={indent:S.level*F.value,level:S.level},"boolean"===typeof S.expanded&&(i.treeNode.expanded=S.expanded,"loading"in S&&(i.treeNode.loading=S.loading),"noLazyChildren"in S&&(i.treeNode.noLazyChildren=S.noLazyChildren)));const f=`${h},${o}`,v=s.columnKey||s.rawColumnKey||"",w=x(o,l,i),U=l.showOverflowTooltip&&(0,c.Z)({effect:N},E,l.showOverflowTooltip);return(0,n.h)("td",{style:m(h,o,p,l),class:g(h,o,p,l,r-1),key:`${v}${f}`,rowspan:a,colspan:r,onMouseenter:e=>d(e,p,U),onMouseleave:u},[w])})))},x=(e,t,l)=>t.renderCell(l),N=(o,a)=>{const r=e.store,{isRowExpanded:s,assertRowKey:i}=r,{treeData:d,lazyTreeNodeMap:u,childrenColumnName:c,rowKey:p}=r.states,h=r.states.columns.value,f=h.some((({type:e})=>"expand"===e));if(f){const e=s(o),i=S(o,a,void 0,e),d=t.renderExpanded;return e?d?[[i,(0,n.h)("tr",{key:`expanded-row__${i.key}`},[(0,n.h)("td",{colspan:h.length,class:`${l.e("cell")} ${l.e("expanded-cell")}`},[d({row:o,$index:a,store:r,expanded:e})])])]]:(console.error("[Element Error]renderExpanded is required."),i):[[i]]}if(Object.keys(d.value).length){i();const e=k(o,p.value);let t=d.value[e],l=null;t&&(l={expanded:t.expanded,level:t.level,display:!0},"boolean"===typeof t.lazy&&("boolean"===typeof t.loaded&&t.loaded&&(l.noLazyChildren=!(t.children&&t.children.length)),l.loading=t.loading));const n=[S(o,a,l)];if(t){let l=0;const r=(e,o)=>{e&&e.length&&o&&e.forEach((e=>{const s={display:o.display&&o.expanded,level:o.level+1,expanded:!1,noLazyChildren:!1,loading:!1},i=k(e,p.value);if(void 0===i||null===i)throw new Error("For nested data item, row-key is required.");if(t={...d.value[i]},t&&(s.expanded=t.expanded,t.level=t.level||s.level,t.display=!(!t.expanded||!s.display),"boolean"===typeof t.lazy&&("boolean"===typeof t.loaded&&t.loaded&&(s.noLazyChildren=!(t.children&&t.children.length)),s.loading=t.loading)),l++,n.push(S(e,a+l,s)),t){const l=u.value[i]||e[c.value];r(l,t)}}))};t.display=!0;const s=u.value[e]||o[c.value];r(s,t)}return n}return S(o,a,void 0)};return{wrappedRowRender:N,tooltipContent:p,tooltipTrigger:h}}const Te={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 Me=(0,n.aZ)({name:"ElTableBody",props:Te,setup(e){const t=(0,n.FN)(),l=(0,n.f3)(be),o=(0,V.s3)("table"),{wrappedRowRender:a,tooltipContent:r,tooltipTrigger:s}=He(e),{onColumnsChange:i,onScrollableChange:d}=ye(l);return(0,n.YP)(e.store.states.hoverRow,((l,n)=>{if(!e.store.states.isComplex.value||!le.C5)return;let a=window.requestAnimationFrame;a||(a=e=>window.setTimeout(e,16)),a((()=>{const e=null==t?void 0:t.vnode.el,a=Array.from((null==e?void 0:e.children)||[]).filter((e=>null==e?void 0:e.classList.contains(`${o.e("row")}`))),r=a[n],s=a[l];r&&(0,Ce.IV)(r,"hover-row"),s&&(0,Ce.cn)(s,"hover-row")}))})),(0,n.Ah)((()=>{var e;null==(e=M)||e()})),{ns:o,onColumnsChange:i,onScrollableChange:d,wrappedRowRender:a,tooltipContent:r,tooltipTrigger:s}},render(){const{wrappedRowRender:e,store:t}=this,l=t.states.data.value||[];return(0,n.h)("tbody",{},[l.reduce(((t,l)=>t.concat(e(l,t.length))),[])])}});function De(e){const t="auto"===e.tableLayout;let l=e.columns||[];t&&l.every((e=>void 0===e.width))&&(l=[]);const o=l=>{const n={key:`${e.tableLayout}_${l.id}`,style:{},name:void 0};return t?n.style={width:`${l.width}px`}:n.name=l.id,n};return(0,n.h)("colgroup",{},l.map((e=>(0,n.h)("col",o(e)))))}function Re(){const e=(0,n.f3)(be),t=null==e?void 0:e.store,l=(0,n.Fl)((()=>t.states.fixedLeafColumnsLength.value)),o=(0,n.Fl)((()=>t.states.rightFixedColumns.value.length)),a=(0,n.Fl)((()=>t.states.columns.value.length)),r=(0,n.Fl)((()=>t.states.fixedColumns.value.length)),s=(0,n.Fl)((()=>t.states.rightFixedColumns.value.length));return{leftFixedLeafCount:l,rightFixedLeafCount:o,columnsCount:a,leftFixedCount:r,rightFixedCount:s,columns:t.states.columns}}function Ae(e){const{columns:t}=Re(),l=(0,V.s3)("table"),n=(t,n)=>{const o=t[n],a=[l.e("cell"),o.id,o.align,o.labelClassName,...K(l.b(),n,o.fixed,e.store)];return o.className&&a.push(o.className),o.children||a.push(l.is("leaf")),a},o=(t,l)=>{const n=$(l,t.fixed,e.store);return W(n,"left"),W(n,"right"),n};return{getCellClasses:n,getCellStyles:o,columns:t}}De.props=["columns","tableLayout"];var Oe=(0,n.aZ)({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{getCellClasses:t,getCellStyles:l,columns:n}=Ae(e),o=(0,V.s3)("table");return{ns:o,getCellClasses:t,getCellStyles:l,columns:n}},render(){const{columns:e,getCellStyles:t,getCellClasses:l,summaryMethod:o,sumText:a,ns:r}=this,s=this.store.states.data.value;let i=[];return o?i=o({columns:e,data:s}):e.forEach(((e,t)=>{if(0===t)return void(i[t]=a);const l=s.map((t=>Number(t[e.property]))),n=[];let o=!0;l.forEach((e=>{if(!Number.isNaN(+e)){o=!1;const t=`${e}`.split(".")[1];n.push(t?t.length:0)}}));const r=Math.max.apply(null,n);i[t]=o?"":l.reduce(((e,t)=>{const l=Number(t);return Number.isNaN(+l)?e:Number.parseFloat((e+t).toFixed(Math.min(r,20)))}),0)})),(0,n.h)("table",{class:r.e("footer"),cellspacing:"0",cellpadding:"0",border:"0"},[De({columns:e}),(0,n.h)("tbody",[(0,n.h)("tr",{},[...e.map(((o,a)=>(0,n.h)("td",{key:a,colspan:o.colSpan,rowspan:o.rowSpan,class:l(e,a),style:t(o,a)},[(0,n.h)("div",{class:["cell",o.labelClassName]},[i[a]])])))])])])}});function Ke(e){const t=t=>{e.commit("setCurrentRow",t)},l=()=>e.getSelectionRows(),n=(t,l)=>{e.toggleRowSelection(t,l,!1),e.updateAllSelected()},o=()=>{e.clearSelection()},a=t=>{e.clearFilter(t)},r=()=>{e.commit("toggleAllSelection")},s=(t,l)=>{e.toggleRowExpansionAdapter(t,l)},i=()=>{e.clearSort()},d=(t,l)=>{e.commit("sort",{prop:t,order:l})};return{setCurrentRow:t,getSelectionRows:l,toggleRowSelection:n,clearSelection:o,clearFilter:a,toggleAllSelection:r,toggleRowExpansion:s,clearSort:i,sort:d}}var Le=l(33255),$e=l(93460);function We(e,t,l,o){const a=(0,i.iH)(!1),r=(0,i.iH)(null),s=(0,i.iH)(!1),d=e=>{s.value=e},u=(0,i.iH)({width:null,height:null,headerHeight:null}),c=(0,i.iH)(!1),p={display:"inline-block",verticalAlign:"middle"},h=(0,i.iH)(),f=(0,i.iH)(0),v=(0,i.iH)(0),m=(0,i.iH)(0),g=(0,i.iH)(0),y=(0,i.iH)(0);(0,n.m0)((()=>{t.setHeight(e.height)})),(0,n.m0)((()=>{t.setMaxHeight(e.maxHeight)})),(0,n.YP)((()=>[e.currentRowKey,l.states.rowKey]),(([e,t])=>{(0,i.SU)(t)&&(0,i.SU)(e)&&l.setCurrentRowKey(`${e}`)}),{immediate:!0}),(0,n.YP)((()=>e.data),(e=>{o.store.commit("setData",e)}),{immediate:!0,deep:!0}),(0,n.m0)((()=>{e.expandRowKeys&&l.setExpandRowKeysAdapter(e.expandRowKeys)}));const b=()=>{o.store.commit("setHoverRow",null),o.hoverState&&(o.hoverState=null)},C=(e,t)=>{const{pixelX:l,pixelY:n}=t;Math.abs(l)>=Math.abs(n)&&(o.refs.bodyWrapper.scrollLeft+=t.pixelX/5)},w=(0,n.Fl)((()=>e.height||e.maxHeight||l.states.fixedColumns.value.length>0||l.states.rightFixedColumns.value.length>0)),S=(0,n.Fl)((()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""}))),k=()=>{w.value&&t.updateElsHeight(),t.updateColumnsWidth(),requestAnimationFrame(U)};(0,n.bv)((async()=>{await(0,n.Y3)(),l.updateColumns(),F(),requestAnimationFrame(k);const t=o.vnode.el,a=o.refs.headerWrapper;e.flexible&&t&&t.parentElement&&(t.parentElement.style.minWidth="0"),u.value={width:h.value=t.offsetWidth,height:t.offsetHeight,headerHeight:e.showHeader&&a?a.offsetHeight:null},l.states.columns.value.forEach((e=>{e.filteredValue&&e.filteredValue.length&&o.store.commit("filterChange",{column:e,values:e.filteredValue,silent:!0})})),o.$ready=!0}));const x=(e,l)=>{if(!e)return;const n=Array.from(e.classList).filter((e=>!e.startsWith("is-scrolling-")));n.push(t.scrollX.value?l:"is-scrolling-none"),e.className=n.join(" ")},N=e=>{const{tableWrapper:t}=o.refs;x(t,e)},E=e=>{const{tableWrapper:t}=o.refs;return!(!t||!t.classList.contains(e))},U=function(){if(!o.refs.scrollBarRef)return;if(!t.scrollX.value){const e="is-scrolling-none";return void(E(e)||N(e))}const e=o.refs.scrollBarRef.wrapRef;if(!e)return;const{scrollLeft:l,offsetWidth:n,scrollWidth:a}=e,{headerWrapper:r,footerWrapper:s}=o.refs;r&&(r.scrollLeft=l),s&&(s.scrollLeft=l);const i=a-n-1;N(l>=i?"is-scrolling-right":0===l?"is-scrolling-left":"is-scrolling-middle")},F=()=>{o.refs.scrollBarRef&&(o.refs.scrollBarRef.wrapRef&&(0,Le.ORN)(o.refs.scrollBarRef.wrapRef,"scroll",U,{passive:!0}),e.fit?(0,Le.yU7)(o.vnode.el,_):(0,Le.ORN)(window,"resize",_),(0,Le.yU7)(o.refs.bodyWrapper,(()=>{var e,t;_(),null==(t=null==(e=o.refs)?void 0:e.scrollBarRef)||t.update()})))},_=()=>{var t,l,n,a;const r=o.vnode.el;if(!o.$ready||!r)return;let s=!1;const{width:i,height:d,headerHeight:c}=u.value,p=h.value=r.offsetWidth;i!==p&&(s=!0);const b=r.offsetHeight;(e.height||w.value)&&d!==b&&(s=!0);const C="fixed"===e.tableLayout?o.refs.headerWrapper:null==(t=o.refs.tableHeaderRef)?void 0:t.$el;e.showHeader&&(null==C?void 0:C.offsetHeight)!==c&&(s=!0),f.value=(null==(l=o.refs.tableWrapper)?void 0:l.scrollHeight)||0,m.value=(null==C?void 0:C.scrollHeight)||0,g.value=(null==(n=o.refs.footerWrapper)?void 0:n.offsetHeight)||0,y.value=(null==(a=o.refs.appendWrapper)?void 0:a.offsetHeight)||0,v.value=f.value-m.value-g.value-y.value,s&&(u.value={width:p,height:b,headerHeight:e.showHeader&&(null==C?void 0:C.offsetHeight)||0},k())},H=(0,$e.Cd)(),T=(0,n.Fl)((()=>{const{bodyWidth:e,scrollY:l,gutterWidth:n}=t;return e.value?e.value-(l.value?n:0)+"px":""})),M=(0,n.Fl)((()=>e.maxHeight?"fixed":e.tableLayout)),D=(0,n.Fl)((()=>{if(e.data&&e.data.length)return null;let t="100%";e.height&&v.value&&(t=`${v.value}px`);const l=h.value;return{width:l?`${l}px`:"",height:t}})),R=(0,n.Fl)((()=>e.height?{height:Number.isNaN(Number(e.height))?e.height:`${e.height}px`}:e.maxHeight?{maxHeight:Number.isNaN(Number(e.maxHeight))?e.maxHeight:`${e.maxHeight}px`}:{})),A=(0,n.Fl)((()=>e.height?{height:"100%"}:e.maxHeight?Number.isNaN(Number(e.maxHeight))?{maxHeight:`calc(${e.maxHeight} - ${m.value+g.value}px)`}:{maxHeight:e.maxHeight-m.value-g.value+"px"}:{})),O=(e,t)=>{const l=o.refs.bodyWrapper;if(Math.abs(t.spinY)>0){const n=l.scrollTop;t.pixelY<0&&0!==n&&e.preventDefault(),t.pixelY>0&&l.scrollHeight-l.clientHeight>n&&e.preventDefault(),l.scrollTop+=Math.ceil(t.pixelY/5)}else l.scrollLeft+=Math.ceil(t.pixelX/5)};return{isHidden:a,renderExpanded:r,setDragVisible:d,isGroup:c,handleMouseLeave:b,handleHeaderFooterMousewheel:C,tableSize:H,emptyBlockStyle:D,handleFixedMousewheel:O,resizeProxyVisible:s,bodyWidth:T,resizeState:u,doLayout:k,tableBodyStyles:S,tableLayout:M,scrollbarViewStyle:p,tableInnerStyle:R,scrollbarStyle:A}}function Ie(e){const t=(0,i.iH)(),l=()=>{const l=e.vnode.el,n=l.querySelector(".hidden-columns"),o={childList:!0,subtree:!0},a=e.store.states.updateOrderFns;t.value=new MutationObserver((()=>{a.forEach((e=>e()))})),t.value.observe(n,o)};(0,n.bv)((()=>{l()})),(0,n.Ah)((()=>{var e;null==(e=t.value)||e.disconnect()}))}var Pe=l(41652),Be={data:{type:Array,default:()=>[]},size:Pe.Pp,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,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"})},lazy:Boolean,load:Function,style:{type:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:{type:Boolean,default:!1},flexible:Boolean,showOverflowTooltip:[Boolean,Object]};const qe=()=>{const e=(0,i.iH)(),t=(t,l)=>{const n=e.value;n&&n.scrollTo(t,l)},l=(t,l)=>{const n=e.value;n&&(0,m.hj)(l)&&["Top","Left"].includes(t)&&n[`setScroll${t}`](l)},n=e=>l("Top",e),o=e=>l("Left",e);return{scrollBarRef:e,scrollTo:t,setScrollTop:n,setScrollLeft:o}};var je=l(63318);const ze=function(e,t){if(e&&e.addEventListener){const l=function(e){const l=(0,je.Z)(e);t&&Reflect.apply(t,this,[e,l])};e.addEventListener("wheel",l,{passive:!0})}},Ve={beforeMount(e,t){ze(e,t.value)}};let Ye=1;const Ze=(0,n.aZ)({name:"ElTable",directives:{Mousewheel:Ve},components:{TableHeader:Ee,TableBody:Me,TableFooter:Oe,ElScrollbar:s.Mr,hColgroup:De},props:Be,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change"],setup(e){const{t:t}=(0,ue.bU)(),l=(0,V.s3)("table"),o=(0,n.FN)();(0,n.JJ)(be,o);const a=X(o,e);o.store=a;const s=new ne({store:o.store,table:o,fit:e.fit,showHeader:e.showHeader});o.layout=s;const i=(0,n.Fl)((()=>0===(a.states.data.value||[]).length)),{setCurrentRow:d,getSelectionRows:u,toggleRowSelection:c,clearSelection:p,clearFilter:h,toggleAllSelection:f,toggleRowExpansion:v,clearSort:m,sort:g}=Ke(a),{isHidden:y,renderExpanded:b,setDragVisible:C,isGroup:w,handleMouseLeave:S,handleHeaderFooterMousewheel:k,tableSize:x,emptyBlockStyle:N,handleFixedMousewheel:E,resizeProxyVisible:U,bodyWidth:F,resizeState:_,doLayout:H,tableBodyStyles:T,tableLayout:M,scrollbarViewStyle:D,tableInnerStyle:R,scrollbarStyle:A}=We(e,s,a,o),{scrollBarRef:O,scrollTo:K,setScrollLeft:L,setScrollTop:$}=qe(),W=(0,r.Z)(H,50),I=`${l.namespace.value}-table_${Ye++}`;o.tableId=I,o.state={isGroup:w,resizeState:_,doLayout:H,debouncedUpdateLayout:W};const P=(0,n.Fl)((()=>e.sumText||t("el.table.sumText"))),B=(0,n.Fl)((()=>e.emptyText||t("el.table.emptyText")));return Ie(o),{ns:l,layout:s,store:a,handleHeaderFooterMousewheel:k,handleMouseLeave:S,tableId:I,tableSize:x,isHidden:y,isEmpty:i,renderExpanded:b,resizeProxyVisible:U,resizeState:_,isGroup:w,bodyWidth:F,tableBodyStyles:T,emptyBlockStyle:N,debouncedUpdateLayout:W,handleFixedMousewheel:E,setCurrentRow:d,getSelectionRows:u,toggleRowSelection:c,clearSelection:p,clearFilter:h,toggleAllSelection:f,toggleRowExpansion:v,clearSort:m,doLayout:H,sort:g,t:t,setDragVisible:C,context:o,computedSumText:P,computedEmptyText:B,tableLayout:M,scrollbarViewStyle:D,tableInnerStyle:R,scrollbarStyle:A,scrollBarRef:O,scrollTo:K,setScrollLeft:L,setScrollTop:$}}}),Je=["data-prefix"],Ge={ref:"hiddenColumns",class:"hidden-columns"};function Xe(e,t,l,r,s,i){const d=(0,n.up)("hColgroup"),u=(0,n.up)("table-header"),c=(0,n.up)("table-body"),p=(0,n.up)("el-scrollbar"),h=(0,n.up)("table-footer"),f=(0,n.Q2)("mousewheel");return(0,n.wg)(),(0,n.iD)("div",{ref:"tableWrapper",class:(0,o.C_)([{[e.ns.m("fit")]:e.fit,[e.ns.m("striped")]:e.stripe,[e.ns.m("border")]:e.border||e.isGroup,[e.ns.m("hidden")]:e.isHidden,[e.ns.m("group")]:e.isGroup,[e.ns.m("fluid-height")]:e.maxHeight,[e.ns.m("scrollable-x")]:e.layout.scrollX.value,[e.ns.m("scrollable-y")]:e.layout.scrollY.value,[e.ns.m("enable-row-hover")]:!e.store.states.isComplex.value,[e.ns.m("enable-row-transition")]:0!==(e.store.states.data.value||[]).length&&(e.store.states.data.value||[]).length<100,"has-footer":e.showSummary},e.ns.m(e.tableSize),e.className,e.ns.b(),e.ns.m(`layout-${e.tableLayout}`)]),style:(0,o.j5)(e.style),"data-prefix":e.ns.namespace.value,onMouseleave:t[0]||(t[0]=(...t)=>e.handleMouseLeave&&e.handleMouseLeave(...t))},[(0,n._)("div",{class:(0,o.C_)(e.ns.e("inner-wrapper")),style:(0,o.j5)(e.tableInnerStyle)},[(0,n._)("div",Ge,[(0,n.WI)(e.$slots,"default")],512),e.showHeader&&"fixed"===e.tableLayout?(0,n.wy)(((0,n.wg)(),(0,n.iD)("div",{key:0,ref:"headerWrapper",class:(0,o.C_)(e.ns.e("header-wrapper"))},[(0,n._)("table",{ref:"tableHeader",class:(0,o.C_)(e.ns.e("header")),style:(0,o.j5)(e.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[(0,n.Wm)(d,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),(0,n.Wm)(u,{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])],6)],2)),[[f,e.handleHeaderFooterMousewheel]]):(0,n.kq)("v-if",!0),(0,n._)("div",{ref:"bodyWrapper",class:(0,o.C_)(e.ns.e("body-wrapper"))},[(0,n.Wm)(p,{ref:"scrollBarRef","view-style":e.scrollbarViewStyle,"wrap-style":e.scrollbarStyle,always:e.scrollbarAlwaysOn},{default:(0,n.w5)((()=>[(0,n._)("table",{ref:"tableBody",class:(0,o.C_)(e.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:(0,o.j5)({width:e.bodyWidth,tableLayout:e.tableLayout})},[(0,n.Wm)(d,{columns:e.store.states.columns.value,"table-layout":e.tableLayout},null,8,["columns","table-layout"]),e.showHeader&&"auto"===e.tableLayout?((0,n.wg)(),(0,n.j4)(u,{key:0,ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:e.store,onSetDragVisible:e.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])):(0,n.kq)("v-if",!0),(0,n.Wm)(c,{context:e.context,highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":e.tooltipEffect,"tooltip-options":e.tooltipOptions,"row-style":e.rowStyle,store:e.store,stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"])],6),e.isEmpty?((0,n.wg)(),(0,n.iD)("div",{key:0,ref:"emptyBlock",style:(0,o.j5)(e.emptyBlockStyle),class:(0,o.C_)(e.ns.e("empty-block"))},[(0,n._)("span",{class:(0,o.C_)(e.ns.e("empty-text"))},[(0,n.WI)(e.$slots,"empty",{},(()=>[(0,n.Uk)((0,o.zw)(e.computedEmptyText),1)]))],2)],6)):(0,n.kq)("v-if",!0),e.$slots.append?((0,n.wg)(),(0,n.iD)("div",{key:1,ref:"appendWrapper",class:(0,o.C_)(e.ns.e("append-wrapper"))},[(0,n.WI)(e.$slots,"append")],2)):(0,n.kq)("v-if",!0)])),_:3},8,["view-style","wrap-style","always"])],2),e.showSummary?(0,n.wy)(((0,n.wg)(),(0,n.iD)("div",{key:1,ref:"footerWrapper",class:(0,o.C_)(e.ns.e("footer-wrapper"))},[(0,n.Wm)(h,{border:e.border,"default-sort":e.defaultSort,store:e.store,style:(0,o.j5)(e.tableBodyStyles),"sum-text":e.computedSumText,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","style","sum-text","summary-method"])],2)),[[a.F8,!e.isEmpty],[f,e.handleHeaderFooterMousewheel]]):(0,n.kq)("v-if",!0),e.border||e.isGroup?((0,n.wg)(),(0,n.iD)("div",{key:2,class:(0,o.C_)(e.ns.e("border-left-patch"))},null,2)):(0,n.kq)("v-if",!0)],6),(0,n.wy)((0,n._)("div",{ref:"resizeProxy",class:(0,o.C_)(e.ns.e("column-resize-proxy"))},null,2),[[a.F8,e.resizeProxyVisible]])],46,Je)}var Qe=(0,ie.Z)(Ze,[["render",Xe],["__file","/home/runner/work/element-plus/element-plus/packages/components/table/src/table.vue"]]),et=l(82134),tt=l(85261);const lt={selection:"table-column--selection",expand:"table__expand-column"},nt={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:""}},ot=e=>lt[e]||"",at={selection:{renderHeader({store:e}){function t(){return e.states.data.value&&0===e.states.data.value.length}return(0,n.h)(oe.ElCheckbox,{disabled:t(),size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection,modelValue:e.states.isAllSelected.value})},renderCell({row:e,column:t,store:l,$index:o}){return(0,n.h)(oe.ElCheckbox,{disabled:!!t.selectable&&!t.selectable.call(null,e,o),size:l.states.tableSize.value,onChange:()=>{l.commit("rowSelectedChanged",e)},onClick:e=>e.stopPropagation(),modelValue:l.isSelected(e)})},sortable:!1,resizable:!1},index:{renderHeader({column:e}){return e.label||"#"},renderCell({column:e,$index:t}){let l=t+1;const o=e.index;return"number"===typeof o?l=t+o:"function"===typeof o&&(l=o(t)),(0,n.h)("div",{},[l])},sortable:!1},expand:{renderHeader({column:e}){return e.label||""},renderCell({row:e,store:t,expanded:l}){const{ns:o}=t,a=[o.e("expand-icon")];l&&a.push(o.em("expand-icon","expanded"));const r=function(l){l.stopPropagation(),t.toggleRowExpansion(e)};return(0,n.h)("div",{class:a,onClick:r},{default:()=>[(0,n.h)(ae.gn,null,{default:()=>[(0,n.h)(re.olP)]})]})},sortable:!1,resizable:!1}};function rt({row:e,column:t,$index:l}){var n;const o=t.property,a=o&&(0,tt.WJ)(e,o).value;return t&&t.formatter?t.formatter(e,t,a,l):(null==(n=null==a?void 0:a.toString)?void 0:n.call(a))||""}function st({row:e,treeNode:t,store:l},o=!1){const{ns:a}=l;if(!t)return o?[(0,n.h)("span",{class:a.e("placeholder")})]:null;const r=[],s=function(n){n.stopPropagation(),t.loading||l.loadOrToggle(e)};if(t.indent&&r.push((0,n.h)("span",{class:a.e("indent"),style:{"padding-left":`${t.indent}px`}})),"boolean"!==typeof t.expanded||t.noLazyChildren)r.push((0,n.h)("span",{class:a.e("placeholder")}));else{const e=[a.e("expand-icon"),t.expanded?a.em("expand-icon","expanded"):""];let l=re.olP;t.loading&&(l=re.gbz),r.push((0,n.h)("div",{class:e,onClick:s},{default:()=>[(0,n.h)(ae.gn,{class:{[a.is("loading")]:t.loading}},{default:()=>[(0,n.h)(l)]})]}))}return r}function it(e,t){return e.reduce(((e,t)=>(e[t]=t,e)),t)}function dt(e,t){const l=(0,n.FN)(),o=()=>{const o=["fixed"],a={realWidth:"width",realMinWidth:"minWidth"},r=it(o,a);Object.keys(r).forEach((o=>{const r=a[o];(0,f.RI)(t,r)&&(0,n.YP)((()=>t[r]),(t=>{let n=t;"width"===r&&"realWidth"===o&&(n=E(t)),"minWidth"===r&&"realMinWidth"===o&&(n=U(t)),l.columnConfig.value[r]=n,l.columnConfig.value[o]=n;const a="fixed"===r;e.value.store.scheduleLayout(a)}))}))},a=()=>{const e=["label","filters","filterMultiple","sortable","index","formatter","className","labelClassName","showOverflowTooltip"],o={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},a=it(e,o);Object.keys(a).forEach((e=>{const a=o[e];(0,f.RI)(t,a)&&(0,n.YP)((()=>t[a]),(t=>{l.columnConfig.value[e]=t}))}))};return{registerComplexWatchers:o,registerNormalWatchers:a}}function ut(e,t,l){const o=(0,n.FN)(),a=(0,i.iH)(""),r=(0,i.iH)(!1),s=(0,i.iH)(),d=(0,i.iH)(),u=(0,V.s3)("table");(0,n.m0)((()=>{s.value=e.align?`is-${e.align}`:null,s.value})),(0,n.m0)((()=>{d.value=e.headerAlign?`is-${e.headerAlign}`:s.value,d.value}));const c=(0,n.Fl)((()=>{let e=o.vnode.vParent||o.parent;while(e&&!e.tableId&&!e.columnId)e=e.vnode.vParent||e.parent;return e})),p=(0,n.Fl)((()=>{const{store:e}=o.parent;if(!e)return!1;const{treeData:t}=e.states,l=t.value;return l&&Object.keys(l).length>0})),h=(0,i.iH)(E(e.width)),f=(0,i.iH)(U(e.minWidth)),m=e=>(h.value&&(e.width=h.value),f.value&&(e.minWidth=f.value),!h.value&&f.value&&(e.width=void 0),e.minWidth||(e.minWidth=80),e.realWidth=Number(void 0===e.width?e.minWidth:e.width),e),g=e=>{const t=e.type,l=at[t]||{};Object.keys(l).forEach((t=>{const n=l[t];"className"!==t&&void 0!==n&&(e[t]=n)}));const n=ot(t);if(n){const t=`${(0,i.SU)(u.namespace)}-${n}`;e.className=e.className?`${e.className} ${t}`:t}return e},y=e=>{function t(e){var t;"ElTableColumn"===(null==(t=null==e?void 0:e.type)?void 0:t.name)&&(e.vParent=o)}Array.isArray(e)?e.forEach((e=>t(e))):t(e)},b=a=>{e.renderHeader?(0,v.N)("TableColumn","Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header."):"selection"!==a.type&&(a.renderHeader=e=>{o.columnConfig.value["label"];const l=t.header;return l?l(e):a.label});let r=a.renderCell;return"expand"===a.type?(a.renderCell=e=>(0,n.h)("div",{class:"cell"},[r(e)]),l.value.renderExpanded=e=>t.default?t.default(e):t.default):(r=r||rt,a.renderCell=e=>{let o=null;if(t.default){const l=t.default(e);o=l.some((e=>e.type!==n.sv))?l:r(e)}else o=r(e);const{columns:s}=l.value.store.states,d=s.value.findIndex((e=>"default"===e.type)),c=p.value&&e.cellIndex===d,h=st(e,c),f={class:"cell",style:{}};return a.showOverflowTooltip&&(f.class=`${f.class} ${(0,i.SU)(u.namespace)}-tooltip`,f.style={width:(e.column.realWidth||Number(e.column.width))-1+"px"}),y(o),(0,n.h)("div",f,[h,o])}),a},C=(...t)=>t.reduce(((t,l)=>(Array.isArray(l)&&l.forEach((l=>{t[l]=e[l]})),t)),{}),w=(e,t)=>Array.prototype.indexOf.call(e,t),S=()=>{l.value.store.commit("updateColumnOrder",o.columnConfig.value)};return{columnId:a,realAlign:s,isSubColumn:r,realHeaderAlign:d,columnOrTableParent:c,setColumnWidth:m,setColumnForcedProps:g,setColumnRenders:b,getPropsData:C,getColumnElIndex:w,updateColumnOrder:S}}var ct={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},fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:e=>e.every((e=>["ascending","descending",null].includes(e)))}};let pt=1;var ht=(0,n.aZ)({name:"ElTableColumn",components:{ElCheckbox:oe.ElCheckbox},props:ct,setup(e,{slots:t}){const l=(0,n.FN)(),o=(0,i.iH)({}),a=(0,n.Fl)((()=>{let e=l.parent;while(e&&!e.tableId)e=e.parent;return e})),{registerNormalWatchers:r,registerComplexWatchers:s}=dt(a,e),{columnId:d,isSubColumn:u,realHeaderAlign:c,columnOrTableParent:p,setColumnWidth:h,setColumnForcedProps:f,setColumnRenders:v,getPropsData:g,getColumnElIndex:y,realAlign:b,updateColumnOrder:C}=ut(e,t,a),w=p.value;d.value=`${w.tableId||w.columnId}_column_${pt++}`,(0,n.wF)((()=>{u.value=a.value!==w;const t=e.type||"default",n=""===e.sortable||e.sortable,i=(0,m.o8)(e.showOverflowTooltip)?w.props.showOverflowTooltip:e.showOverflowTooltip,p={...nt[t],id:d.value,type:t,property:e.prop||e.property,align:b,headerAlign:c,showOverflowTooltip:i,filterable:e.filters||e.filterMethod,filteredValue:[],filterPlacement:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:n,index:e.index,rawColumnKey:l.vnode.key},y=["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],C=["sortMethod","sortBy","sortOrders"],S=["selectable","reserveSelection"],k=["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement"];let x=g(y,C,S,k);x=N(p,x);const E=_(v,h,f);x=E(x),o.value=x,r(),s()})),(0,n.bv)((()=>{var e;const t=p.value,n=u.value?t.vnode.el.children:null==(e=t.refs.hiddenColumns)?void 0:e.children,r=()=>y(n||[],l.vnode.el);o.value.getColumnIndex=r;const s=r();s>-1&&a.value.store.commit("insertColumn",o.value,u.value?t.columnConfig.value:null,C)})),(0,n.Jd)((()=>{a.value.store.commit("removeColumn",o.value,u.value?w.columnConfig.value:null,C)})),l.columnId=d.value,l.columnConfig=o},render(){var e,t,l;try{const o=null==(t=(e=this.$slots).default)?void 0:t.call(e,{row:{},column:{},$index:-1}),a=[];if(Array.isArray(o))for(const e of o)"ElTableColumn"===(null==(l=e.type)?void 0:l.name)||2&e.shapeFlag?a.push(e):e.type===n.HY&&Array.isArray(e.children)&&e.children.forEach((e=>{1024===(null==e?void 0:e.patchFlag)||(0,f.HD)(null==e?void 0:e.children)||a.push(e)}));const r=(0,n.h)("div",a);return r}catch(o){return(0,n.h)("div",[])}}});const ft=(0,et.nz)(Qe,{TableColumn:ht}),vt=(0,et.dp)(ht)},31810:function(e,t,l){l(17388),l(58038),l(53253),l(95065),l(91715)},95773:function(e,t,l){l.d(t,{p8:function(){return j},Ub:function(){return q}});var n=l(53321),o=l(73745),a=l(64310),r=l(26227);const s=Symbol("tabsRootContextKey");var i=l(33255),d=l(53399),u=l(6745),c=l(33305);const p=(0,u.o8)({tabs:{type:(0,u.Cq)(Array),default:()=>(0,c.N)([])}});var h=l(56490),f=l(2641),v=l(23256),m=l(66510);const g="ElTabBar",y=(0,n.aZ)({name:g}),b=(0,n.aZ)({...y,props:p,setup(e,{expose:t}){const l=e,a=(0,n.FN)(),r=(0,n.f3)(s);r||(0,f._)(g,"<el-tabs><el-tab-bar /></el-tabs>");const u=(0,v.s3)("tabs"),c=(0,o.iH)(),p=(0,o.iH)(),h=()=>{let e=0,t=0;const n=["top","bottom"].includes(r.props.tabPosition)?"width":"height",o="width"===n?"x":"y",s="x"===o?"left":"top";return l.tabs.every((o=>{var r,i;const d=null==(i=null==(r=a.parent)?void 0:r.refs)?void 0:i[`tab-${o.uid}`];if(!d)return!1;if(!o.active)return!0;e=d[`offset${(0,m.kC)(s)}`],t=d[`client${(0,m.kC)(n)}`];const u=window.getComputedStyle(d);return"width"===n&&(l.tabs.length>1&&(t-=Number.parseFloat(u.paddingLeft)+Number.parseFloat(u.paddingRight)),e+=Number.parseFloat(u.paddingLeft)),!1})),{[n]:`${t}px`,transform:`translate${(0,m.kC)(o)}(${e}px)`}},y=()=>p.value=h();return(0,n.YP)((()=>l.tabs),(async()=>{await(0,n.Y3)(),y()}),{immediate:!0}),(0,i.yU7)(c,(()=>y())),t({ref:c,update:y}),(e,t)=>((0,n.wg)(),(0,n.iD)("div",{ref_key:"barRef",ref:c,class:(0,d.C_)([(0,o.SU)(u).e("active-bar"),(0,o.SU)(u).is((0,o.SU)(r).props.tabPosition)]),style:(0,d.j5)(p.value)},null,6))}});var C=(0,h.Z)(b,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-bar.vue"]]),w=l(11167);const S=(0,u.o8)({panes:{type:(0,u.Cq)(Array),default:()=>(0,c.N)([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),k={tabClick:(e,t,l)=>l instanceof Event,tabRemove:(e,t)=>t instanceof Event},x="ElTabNav",N=(0,n.aZ)({name:x,props:S,emits:k,setup(e,{expose:t,emit:l}){const d=(0,n.FN)(),u=(0,n.f3)(s);u||(0,f._)(x,"<el-tabs><tab-nav /></el-tabs>");const c=(0,v.s3)("tabs"),p=(0,i.xKQ)(),h=(0,i.vou)(),g=(0,o.iH)(),y=(0,o.iH)(),b=(0,o.iH)(),S=(0,o.iH)(),k=(0,o.iH)(!1),N=(0,o.iH)(0),E=(0,o.iH)(!1),U=(0,o.iH)(!0),F=(0,n.Fl)((()=>["top","bottom"].includes(u.props.tabPosition)?"width":"height")),_=(0,n.Fl)((()=>{const e="width"===F.value?"X":"Y";return{transform:`translate${e}(-${N.value}px)`}})),H=()=>{if(!g.value)return;const e=g.value[`offset${(0,m.kC)(F.value)}`],t=N.value;if(!t)return;const l=t>e?t-e:0;N.value=l},T=()=>{if(!g.value||!y.value)return;const e=y.value[`offset${(0,m.kC)(F.value)}`],t=g.value[`offset${(0,m.kC)(F.value)}`],l=N.value;if(e-l<=t)return;const n=e-l>2*t?l+t:e-t;N.value=n},M=async()=>{const e=y.value;if(!k.value||!b.value||!g.value||!e)return;await(0,n.Y3)();const t=b.value.querySelector(".is-active");if(!t)return;const l=g.value,o=["top","bottom"].includes(u.props.tabPosition),a=t.getBoundingClientRect(),r=l.getBoundingClientRect(),s=o?e.offsetWidth-r.width:e.offsetHeight-r.height,i=N.value;let d=i;o?(a.left<r.left&&(d=i-(r.left-a.left)),a.right>r.right&&(d=i+a.right-r.right)):(a.top<r.top&&(d=i-(r.top-a.top)),a.bottom>r.bottom&&(d=i+(a.bottom-r.bottom))),d=Math.max(d,0),N.value=Math.min(d,s)},D=()=>{var t;if(!y.value||!g.value)return;e.stretch&&(null==(t=S.value)||t.update());const l=y.value[`offset${(0,m.kC)(F.value)}`],n=g.value[`offset${(0,m.kC)(F.value)}`],o=N.value;n<l?(k.value=k.value||{},k.value.prev=o,k.value.next=o+n<l,l-o<n&&(N.value=l-n)):(k.value=!1,o>0&&(N.value=0))},R=e=>{const t=e.code,{up:l,down:n,left:o,right:a}=w.EVENT_CODE;if(![l,n,o,a].includes(t))return;const r=Array.from(e.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")),s=r.indexOf(e.target);let i;i=t===o||t===l?0===s?r.length-1:s-1:s<r.length-1?s+1:0,r[i].focus({preventScroll:!0}),r[i].click(),A()},A=()=>{U.value&&(E.value=!0)},O=()=>E.value=!1;return(0,n.YP)(p,(e=>{"hidden"===e?U.value=!1:"visible"===e&&setTimeout((()=>U.value=!0),50)})),(0,n.YP)(h,(e=>{e?setTimeout((()=>U.value=!0),50):U.value=!1})),(0,i.yU7)(b,D),(0,n.bv)((()=>setTimeout((()=>M()),0))),(0,n.ic)((()=>D())),t({scrollToActiveTab:M,removeFocus:O}),(0,n.YP)((()=>e.panes),(()=>d.update()),{flush:"post",deep:!0}),()=>{const t=k.value?[(0,n.Wm)("span",{class:[c.e("nav-prev"),c.is("disabled",!k.value.prev)],onClick:H},[(0,n.Wm)(a.gn,null,{default:()=>[(0,n.Wm)(r.XdH,null,null)]})]),(0,n.Wm)("span",{class:[c.e("nav-next"),c.is("disabled",!k.value.next)],onClick:T},[(0,n.Wm)(a.gn,null,{default:()=>[(0,n.Wm)(r.olP,null,null)]})])]:null,o=e.panes.map(((t,o)=>{var s,i,d,p;const h=t.uid,f=t.props.disabled,v=null!=(i=null!=(s=t.props.name)?s:t.index)?i:`${o}`,m=!f&&(t.isClosable||e.editable);t.index=`${o}`;const g=m?(0,n.Wm)(a.gn,{class:"is-icon-close",onClick:e=>l("tabRemove",t,e)},{default:()=>[(0,n.Wm)(r.x8P,null,null)]}):null,y=(null==(p=(d=t.slots).label)?void 0:p.call(d))||t.props.label,b=!f&&t.active?0:-1;return(0,n.Wm)("div",{ref:`tab-${h}`,class:[c.e("item"),c.is(u.props.tabPosition),c.is("active",t.active),c.is("disabled",f),c.is("closable",m),c.is("focus",E.value)],id:`tab-${v}`,key:`tab-${h}`,"aria-controls":`pane-${v}`,role:"tab","aria-selected":t.active,tabindex:b,onFocus:()=>A(),onBlur:()=>O(),onClick:e=>{O(),l("tabClick",t,v,e)},onKeydown:e=>{!m||e.code!==w.EVENT_CODE.delete&&e.code!==w.EVENT_CODE.backspace||l("tabRemove",t,e)}},[y,g])}));return(0,n.Wm)("div",{ref:b,class:[c.e("nav-wrap"),c.is("scrollable",!!k.value),c.is(u.props.tabPosition)]},[t,(0,n.Wm)("div",{class:c.e("nav-scroll"),ref:g},[(0,n.Wm)("div",{class:[c.e("nav"),c.is(u.props.tabPosition),c.is("stretch",e.stretch&&["top","bottom"].includes(u.props.tabPosition))],ref:y,style:_.value,role:"tablist",onKeydown:R},[e.type?null:(0,n.Wm)(C,{ref:S,tabs:[...e.panes]},null),o])])])}}});var E=l(73285),U=l(48743),F=l(57894),_=l(17009),H=l(20265);const T=(0,u.o8)({type:{type:String,values:["card","border-card",""],default:""},activeName:{type:[String,Number]},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:(0,u.Cq)(Function),default:()=>!0},stretch:Boolean}),M=e=>(0,E.HD)(e)||(0,U.hj)(e),D={[F.f_]:e=>M(e),tabClick:(e,t)=>t instanceof Event,tabChange:e=>M(e),edit:(e,t)=>["remove","add"].includes(t),tabRemove:e=>M(e),tabAdd:()=>!0};var R=(0,n.aZ)({name:"ElTabs",props:T,emits:D,setup(e,{emit:t,slots:l,expose:i}){var d,u;const c=(0,v.s3)("tabs"),{children:p,addChild:h,removeChild:f}=(0,_.W)((0,n.FN)(),"ElTabPane"),m=(0,o.iH)(),g=(0,o.iH)(null!=(u=null!=(d=e.modelValue)?d:e.activeName)?u:"0"),y=e=>{g.value=e,t(F.f_,e),t("tabChange",e)},b=async t=>{var l,n,o;if(g.value!==t&&!(0,U.o8)(t))try{const a=await(null==(l=e.beforeLeave)?void 0:l.call(e,t,g.value));!1!==a&&(y(t),null==(o=null==(n=m.value)?void 0:n.removeFocus)||o.call(n))}catch(a){}},C=(e,l,n)=>{e.props.disabled||(b(l),t("tabClick",e,n))},S=(e,l)=>{e.props.disabled||(0,U.o8)(e.props.name)||(l.stopPropagation(),t("edit",e.props.name,"remove"),t("tabRemove",e.props.name))},k=()=>{t("edit",void 0,"add"),t("tabAdd")};return(0,H.A)({from:'"activeName"',replacement:'"model-value" or "v-model"',scope:"ElTabs",version:"2.3.0",ref:"https://element-plus.org/en-US/component/tabs.html#attributes",type:"Attribute"},(0,n.Fl)((()=>!!e.activeName))),(0,n.YP)((()=>e.activeName),(e=>b(e))),(0,n.YP)((()=>e.modelValue),(e=>b(e))),(0,n.YP)(g,(async()=>{var e;await(0,n.Y3)(),null==(e=m.value)||e.scrollToActiveTab()})),(0,n.JJ)(s,{props:e,currentName:g,registerPane:h,unregisterPane:f}),i({currentName:g}),()=>{const t=e.editable||e.addable?(0,n.Wm)("span",{class:c.e("new-tab"),tabindex:"0",onClick:k,onKeydown:e=>{e.code===w.EVENT_CODE.enter&&k()}},[(0,n.Wm)(a.gn,{class:c.is("icon-plus")},{default:()=>[(0,n.Wm)(r.v37,null,null)]})]):null,o=(0,n.Wm)("div",{class:[c.e("header"),c.is(e.tabPosition)]},[t,(0,n.Wm)(N,{ref:m,currentName:g.value,editable:e.editable,type:e.type,panes:p.value,stretch:e.stretch,onTabClick:C,onTabRemove:S},null)]),s=(0,n.Wm)("div",{class:c.e("content")},[(0,n.WI)(l,"default")]);return(0,n.Wm)("div",{class:[c.b(),c.m(e.tabPosition),{[c.m("card")]:"card"===e.type,[c.m("border-card")]:"border-card"===e.type}]},[..."bottom"!==e.tabPosition?[o,s]:[s,o]])}}}),A=l(20162),O=l(7938);const K=(0,u.o8)({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),L=["id","aria-hidden","aria-labelledby"],$="ElTabPane",W=(0,n.aZ)({name:$}),I=(0,n.aZ)({...W,props:K,setup(e){const t=e,l=(0,n.FN)(),a=(0,n.Rr)(),r=(0,n.f3)(s);r||(0,f._)($,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const i=(0,v.s3)("tab-pane"),u=(0,o.iH)(),c=(0,n.Fl)((()=>t.closable||r.props.closable)),p=(0,O.Rc)((()=>{var e;return r.currentName.value===(null!=(e=t.name)?e:u.value)})),h=(0,o.iH)(p.value),m=(0,n.Fl)((()=>{var e;return null!=(e=t.name)?e:u.value})),g=(0,O.Rc)((()=>!t.lazy||h.value||p.value));(0,n.YP)(p,(e=>{e&&(h.value=!0)}));const y=(0,o.qj)({uid:l.uid,slots:a,props:t,paneName:m,active:p,index:u,isClosable:c});return(0,n.bv)((()=>{r.registerPane(y)})),(0,n.Ah)((()=>{r.unregisterPane(y.uid)})),(e,t)=>(0,o.SU)(g)?(0,n.wy)(((0,n.wg)(),(0,n.iD)("div",{key:0,id:`pane-${(0,o.SU)(m)}`,class:(0,d.C_)((0,o.SU)(i).b()),role:"tabpanel","aria-hidden":!(0,o.SU)(p),"aria-labelledby":`tab-${(0,o.SU)(m)}`},[(0,n.WI)(e.$slots,"default")],10,L)),[[A.F8,(0,o.SU)(p)]]):(0,n.kq)("v-if",!0)}});var P=(0,h.Z)(I,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-pane.vue"]]),B=l(82134);const q=(0,B.nz)(R,{TabPane:P}),j=(0,B.dp)(P)},55875:function(e,t,l){l(17388),l(21980)},91209:function(e,t,l){l.d(t,{Ks:function(){return g}});var n=l(53321),o=l(53399),a=l(73745),r=l(20162),s=l(64310),i=l(26227),d=l(24562),u=l(56490),c=l(93460),p=l(23256);const h=(0,n.aZ)({name:"ElTag"}),f=(0,n.aZ)({...h,props:d.F,emits:d.g,setup(e,{emit:t}){const l=e,d=(0,c.Cd)(),u=(0,p.s3)("tag"),h=(0,n.Fl)((()=>{const{type:e,hit:t,effect:n,closable:o,round:a}=l;return[u.b(),u.is("closable",o),u.m(e),u.m(d.value),u.m(n),u.is("hit",t),u.is("round",a)]})),f=e=>{t("close",e)},v=e=>{t("click",e)};return(e,t)=>e.disableTransitions?((0,n.wg)(),(0,n.iD)("span",{key:0,class:(0,o.C_)((0,a.SU)(h)),style:(0,o.j5)({backgroundColor:e.color}),onClick:v},[(0,n._)("span",{class:(0,o.C_)((0,a.SU)(u).e("content"))},[(0,n.WI)(e.$slots,"default")],2),e.closable?((0,n.wg)(),(0,n.j4)((0,a.SU)(s.gn),{key:0,class:(0,o.C_)((0,a.SU)(u).e("close")),onClick:(0,r.iM)(f,["stop"])},{default:(0,n.w5)((()=>[(0,n.Wm)((0,a.SU)(i.x8P))])),_:1},8,["class","onClick"])):(0,n.kq)("v-if",!0)],6)):((0,n.wg)(),(0,n.j4)(r.uT,{key:1,name:`${(0,a.SU)(u).namespace.value}-zoom-in-center`,appear:""},{default:(0,n.w5)((()=>[(0,n._)("span",{class:(0,o.C_)((0,a.SU)(h)),style:(0,o.j5)({backgroundColor:e.color}),onClick:v},[(0,n._)("span",{class:(0,o.C_)((0,a.SU)(u).e("content"))},[(0,n.WI)(e.$slots,"default")],2),e.closable?((0,n.wg)(),(0,n.j4)((0,a.SU)(s.gn),{key:0,class:(0,o.C_)((0,a.SU)(u).e("close")),onClick:(0,r.iM)(f,["stop"])},{default:(0,n.w5)((()=>[(0,n.Wm)((0,a.SU)(i.x8P))])),_:1},8,["class","onClick"])):(0,n.kq)("v-if",!0)],6)])),_:3},8,["name"]))}});var v=(0,u.Z)(f,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tag/src/tag.vue"]]),m=l(82134);const g=(0,m.nz)(v)},24562:function(e,t,l){l.d(t,{F:function(){return a},g:function(){return r}});var n=l(6745),o=l(67194);const a=(0,n.o8)({type:{type:String,values:["success","info","warning","danger",""],default:""},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:{type:String,default:""},size:{type:String,values:o.k,default:""},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),r={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent}},13215:function(e,t,l){l(17388),l(44358)},71956:function(e,t,l){l.d(t,{gi:function(){return m}});var n=l(53321),o=l(53399),a=l(73745),r=l(6745),s=l(67194);const i=(0,r.o8)({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:s.k,default:""},truncated:{type:Boolean},tag:{type:String,default:"span"}});var d=l(56490),u=l(93460),c=l(23256);const p=(0,n.aZ)({name:"ElText"}),h=(0,n.aZ)({...p,props:i,setup(e){const t=e,l=(0,u.Cd)(),r=(0,c.s3)("text"),s=(0,n.Fl)((()=>[r.b(),r.m(t.type),r.m(l.value),r.is("truncated",t.truncated)]));return(e,t)=>((0,n.wg)(),(0,n.j4)((0,n.LL)(e.tag),{class:(0,o.C_)((0,a.SU)(s))},{default:(0,n.w5)((()=>[(0,n.WI)(e.$slots,"default")])),_:3},8,["class"]))}});var f=(0,d.Z)(h,[["__file","/home/runner/work/element-plus/element-plus/packages/components/text/src/text.vue"]]),v=l(82134);const m=(0,v.nz)(f)},78953:function(e,t,l){l(17388),l(75483)},82105:function(e,t,l){l.d(t,{Z:function(){return U}});var n=l(53321),o=l(73745),a=l(53399),r=l(20162),s=l(11541),i=l(33255),d=l(10789),u=l(64310),c=l(19962),p=l(26227),h=l(29800),f=l(58990),v=l(56490),m=l(36878),g=l(23256),y=l(97686),b=l(2641),C=l(73285),w=l(11167),S=l(93460);const k=["id","name","placeholder","value","disabled","readonly"],x=["id","name","placeholder","value","disabled","readonly"],N=(0,n.aZ)({name:"Picker"}),E=(0,n.aZ)({...N,props:f.b,emits:["update:modelValue","change","focus","blur","calendar-change","panel-change","visible-change","keydown"],setup(e,{expose:t,emit:l}){const f=e,v=(0,n.l1)(),{lang:N}=(0,m.bU)(),E=(0,g.s3)("date"),U=(0,g.s3)("input"),F=(0,g.s3)("range"),{form:_,formItem:H}=(0,y.A)(),T=(0,n.f3)("ElPopperOptions",{}),M=(0,o.iH)(),D=(0,o.iH)(),R=(0,o.iH)(!1),A=(0,o.iH)(!1),O=(0,o.iH)(null);let K=!1,L=!1;const $=(0,n.Fl)((()=>[E.b("editor"),E.bm("editor",f.type),U.e("wrapper"),E.is("disabled",oe.value),E.is("active",R.value),F.b("editor"),be?F.bm("editor",be.value):"",v.class])),W=(0,n.Fl)((()=>[U.e("icon"),F.e("close-icon"),ce.value?"":F.e("close-icon--hidden")]));(0,n.YP)(R,(e=>{e?(0,n.Y3)((()=>{e&&(O.value=f.modelValue)})):(Se.value=null,(0,n.Y3)((()=>{I(f.modelValue)})))}));const I=(e,t)=>{!t&&(0,h.V_)(e,O.value)||(l("change",e),f.validateEvent&&(null==H||H.validate("change").catch((e=>(0,b.N)(e)))))},P=e=>{if(!(0,h.V_)(f.modelValue,e)){let t;(0,C.kJ)(e)?t=e.map((e=>(0,h.zW)(e,f.valueFormat,N.value))):e&&(t=(0,h.zW)(e,f.valueFormat,N.value)),l("update:modelValue",e?t:e,N.value)}},B=e=>{l("keydown",e)},q=(0,n.Fl)((()=>{if(D.value){const e=ye.value?D.value:D.value.$el;return Array.from(e.querySelectorAll("input"))}return[]})),j=(e,t,l)=>{const n=q.value;n.length&&(l&&"min"!==l?"max"===l&&(n[1].setSelectionRange(e,t),n[1].focus()):(n[0].setSelectionRange(e,t),n[0].focus()))},z=()=>{ee(!0,!0),(0,n.Y3)((()=>{L=!1}))},V=(e="",t=!1)=>{let l;t||(L=!0),R.value=t,l=(0,C.kJ)(e)?e.map((e=>e.toDate())):e?e.toDate():e,Se.value=null,P(l)},Y=()=>{A.value=!0},Z=()=>{l("visible-change",!0)},J=e=>{(null==e?void 0:e.key)===w.EVENT_CODE.esc&&ee(!0,!0)},G=()=>{A.value=!1,R.value=!1,L=!1,l("visible-change",!1)},X=()=>{R.value=!0},Q=()=>{R.value=!1},ee=(e=!0,t=!1)=>{L=t;const[l,n]=(0,o.SU)(q);let a=l;!e&&ye.value&&(a=n),a&&a.focus()},te=e=>{f.readonly||oe.value||R.value||L||(R.value=!0,l("focus",e))};let le;const ne=e=>{const t=async()=>{setTimeout((()=>{var n;le===t&&((null==(n=M.value)?void 0:n.isFocusInsideContent())&&!K||0!==q.value.filter((e=>e.contains(document.activeElement))).length||(ke(),R.value=!1,l("blur",e),f.validateEvent&&(null==H||H.validate("blur").catch((e=>(0,b.N)(e))))),K=!1)}),0)};le=t,t()},oe=(0,n.Fl)((()=>f.disabled||(null==_?void 0:_.disabled))),ae=(0,n.Fl)((()=>{let e;if(he.value?De.value.getDefaultValue&&(e=De.value.getDefaultValue()):e=(0,C.kJ)(f.modelValue)?f.modelValue.map((e=>(0,h.sG)(e,f.valueFormat,N.value))):(0,h.sG)(f.modelValue,f.valueFormat,N.value),De.value.getRangeAvailableTime){const t=De.value.getRangeAvailableTime(e);(0,s.Z)(t,e)||(e=t,P((0,C.kJ)(e)?e.map((e=>e.toDate())):e.toDate()))}return(0,C.kJ)(e)&&e.some((e=>!e))&&(e=[]),e})),re=(0,n.Fl)((()=>{if(!De.value.panelReady)return"";const e=Ne(ae.value);return(0,C.kJ)(Se.value)?[Se.value[0]||e&&e[0]||"",Se.value[1]||e&&e[1]||""]:null!==Se.value?Se.value:!ie.value&&he.value||!R.value&&he.value?"":e?de.value?e.join(", "):e:""})),se=(0,n.Fl)((()=>f.type.includes("time"))),ie=(0,n.Fl)((()=>f.type.startsWith("time"))),de=(0,n.Fl)((()=>"dates"===f.type)),ue=(0,n.Fl)((()=>f.prefixIcon||(se.value?p.SUY:p.faS))),ce=(0,o.iH)(!1),pe=e=>{f.readonly||oe.value||ce.value&&(e.stopPropagation(),z(),P(null),I(null,!0),ce.value=!1,R.value=!1,De.value.handleClear&&De.value.handleClear())},he=(0,n.Fl)((()=>{const{modelValue:e}=f;return!e||(0,C.kJ)(e)&&!e.filter(Boolean).length})),fe=async e=>{var t;f.readonly||oe.value||("INPUT"!==(null==(t=e.target)?void 0:t.tagName)||q.value.includes(document.activeElement))&&(R.value=!0)},ve=()=>{f.readonly||oe.value||!he.value&&f.clearable&&(ce.value=!0)},me=()=>{ce.value=!1},ge=e=>{var t;f.readonly||oe.value||("INPUT"!==(null==(t=e.touches[0].target)?void 0:t.tagName)||q.value.includes(document.activeElement))&&(R.value=!0)},ye=(0,n.Fl)((()=>f.type.includes("range"))),be=(0,S.Cd)(),Ce=(0,n.Fl)((()=>{var e,t;return null==(t=null==(e=(0,o.SU)(M))?void 0:e.popperRef)?void 0:t.contentRef})),we=(0,n.Fl)((()=>{var e;return(0,o.SU)(ye)?(0,o.SU)(D):null==(e=(0,o.SU)(D))?void 0:e.$el}));(0,i.i9H)(we,(e=>{const t=(0,o.SU)(Ce),l=(0,o.SU)(we);t&&(e.target===t||e.composedPath().includes(t))||e.target===l||e.composedPath().includes(l)||(R.value=!1)}));const Se=(0,o.iH)(null),ke=()=>{if(Se.value){const e=xe(re.value);e&&Ee(e)&&(P((0,C.kJ)(e)?e.map((e=>e.toDate())):e.toDate()),Se.value=null)}""===Se.value&&(P(null),I(null),Se.value=null)},xe=e=>e?De.value.parseUserInput(e):null,Ne=e=>e?De.value.formatToString(e):null,Ee=e=>De.value.isValidValue(e),Ue=async e=>{if(f.readonly||oe.value)return;const{code:t}=e;if(B(e),t!==w.EVENT_CODE.esc)if(t===w.EVENT_CODE.down&&(De.value.handleFocusPicker&&(e.preventDefault(),e.stopPropagation()),!1===R.value&&(R.value=!0,await(0,n.Y3)()),De.value.handleFocusPicker))De.value.handleFocusPicker();else{if(t!==w.EVENT_CODE.tab)return t===w.EVENT_CODE.enter||t===w.EVENT_CODE.numpadEnter?((null===Se.value||""===Se.value||Ee(xe(re.value)))&&(ke(),R.value=!1),void e.stopPropagation()):void(Se.value?e.stopPropagation():De.value.handleKeydownInput&&De.value.handleKeydownInput(e));K=!0}else!0===R.value&&(R.value=!1,e.preventDefault(),e.stopPropagation())},Fe=e=>{Se.value=e,R.value||(R.value=!0)},_e=e=>{const t=e.target;Se.value?Se.value=[t.value,Se.value[1]]:Se.value=[t.value,null]},He=e=>{const t=e.target;Se.value?Se.value=[Se.value[0],t.value]:Se.value=[null,t.value]},Te=()=>{var e;const t=Se.value,l=xe(t&&t[0]),n=(0,o.SU)(ae);if(l&&l.isValid()){Se.value=[Ne(l),(null==(e=re.value)?void 0:e[1])||null];const t=[l,n&&(n[1]||null)];Ee(t)&&(P(t),Se.value=null)}},Me=()=>{var e;const t=(0,o.SU)(Se),l=xe(t&&t[1]),n=(0,o.SU)(ae);if(l&&l.isValid()){Se.value=[(null==(e=(0,o.SU)(re))?void 0:e[0])||null,Ne(l)];const t=[n&&n[0],l];Ee(t)&&(P(t),Se.value=null)}},De=(0,o.iH)({}),Re=e=>{De.value[e[0]]=e[1],De.value.panelReady=!0},Ae=e=>{l("calendar-change",e)},Oe=(e,t,n)=>{l("panel-change",e,t,n)};return(0,n.JJ)("EP_PICKER_BASE",{props:f}),t({focus:ee,handleFocusInput:te,handleBlurInput:ne,handleOpen:X,handleClose:Q,onPick:V}),(e,t)=>((0,n.wg)(),(0,n.j4)((0,o.SU)(c.Q0),(0,n.dG)({ref_key:"refPopper",ref:M,visible:R.value,effect:"light",pure:"",trigger:"click"},e.$attrs,{role:"dialog",teleported:"",transition:`${(0,o.SU)(E).namespace.value}-zoom-in-top`,"popper-class":[`${(0,o.SU)(E).namespace.value}-picker__popper`,e.popperClass],"popper-options":(0,o.SU)(T),"fallback-placements":["bottom","top","right","left"],"gpu-acceleration":!1,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:Y,onShow:Z,onHide:G}),{default:(0,n.w5)((()=>[(0,o.SU)(ye)?((0,n.wg)(),(0,n.iD)("div",{key:1,ref_key:"inputRef",ref:D,class:(0,a.C_)((0,o.SU)($)),style:(0,a.j5)(e.$attrs.style),onClick:te,onMouseenter:ve,onMouseleave:me,onTouchstart:ge,onKeydown:Ue},[(0,o.SU)(ue)?((0,n.wg)(),(0,n.j4)((0,o.SU)(u.gn),{key:0,class:(0,a.C_)([(0,o.SU)(U).e("icon"),(0,o.SU)(F).e("icon")]),onMousedown:(0,r.iM)(fe,["prevent"]),onTouchstart:ge},{default:(0,n.w5)((()=>[((0,n.wg)(),(0,n.j4)((0,n.LL)((0,o.SU)(ue))))])),_:1},8,["class","onMousedown"])):(0,n.kq)("v-if",!0),(0,n._)("input",{id:e.id&&e.id[0],autocomplete:"off",name:e.name&&e.name[0],placeholder:e.startPlaceholder,value:(0,o.SU)(re)&&(0,o.SU)(re)[0],disabled:(0,o.SU)(oe),readonly:!e.editable||e.readonly,class:(0,a.C_)((0,o.SU)(F).b("input")),onMousedown:fe,onInput:_e,onChange:Te,onFocus:te,onBlur:ne},null,42,k),(0,n.WI)(e.$slots,"range-separator",{},(()=>[(0,n._)("span",{class:(0,a.C_)((0,o.SU)(F).b("separator"))},(0,a.zw)(e.rangeSeparator),3)])),(0,n._)("input",{id:e.id&&e.id[1],autocomplete:"off",name:e.name&&e.name[1],placeholder:e.endPlaceholder,value:(0,o.SU)(re)&&(0,o.SU)(re)[1],disabled:(0,o.SU)(oe),readonly:!e.editable||e.readonly,class:(0,a.C_)((0,o.SU)(F).b("input")),onMousedown:fe,onFocus:te,onBlur:ne,onInput:He,onChange:Me},null,42,x),e.clearIcon?((0,n.wg)(),(0,n.j4)((0,o.SU)(u.gn),{key:1,class:(0,a.C_)((0,o.SU)(W)),onClick:pe},{default:(0,n.w5)((()=>[((0,n.wg)(),(0,n.j4)((0,n.LL)(e.clearIcon)))])),_:1},8,["class"])):(0,n.kq)("v-if",!0)],38)):((0,n.wg)(),(0,n.j4)((0,o.SU)(d.EZ),{key:0,id:e.id,ref_key:"inputRef",ref:D,"container-role":"combobox","model-value":(0,o.SU)(re),name:e.name,size:(0,o.SU)(be),disabled:(0,o.SU)(oe),placeholder:e.placeholder,class:(0,a.C_)([(0,o.SU)(E).b("editor"),(0,o.SU)(E).bm("editor",e.type),e.$attrs.class]),style:(0,a.j5)(e.$attrs.style),readonly:!e.editable||e.readonly||(0,o.SU)(de)||"week"===e.type,label:e.label,tabindex:e.tabindex,"validate-event":!1,onInput:Fe,onFocus:te,onBlur:ne,onKeydown:Ue,onChange:ke,onMousedown:fe,onMouseenter:ve,onMouseleave:me,onTouchstart:ge,onClick:t[0]||(t[0]=(0,r.iM)((()=>{}),["stop"]))},{prefix:(0,n.w5)((()=>[(0,o.SU)(ue)?((0,n.wg)(),(0,n.j4)((0,o.SU)(u.gn),{key:0,class:(0,a.C_)((0,o.SU)(U).e("icon")),onMousedown:(0,r.iM)(fe,["prevent"]),onTouchstart:ge},{default:(0,n.w5)((()=>[((0,n.wg)(),(0,n.j4)((0,n.LL)((0,o.SU)(ue))))])),_:1},8,["class","onMousedown"])):(0,n.kq)("v-if",!0)])),suffix:(0,n.w5)((()=>[ce.value&&e.clearIcon?((0,n.wg)(),(0,n.j4)((0,o.SU)(u.gn),{key:0,class:(0,a.C_)(`${(0,o.SU)(U).e("icon")} clear-icon`),onClick:(0,r.iM)(pe,["stop"])},{default:(0,n.w5)((()=>[((0,n.wg)(),(0,n.j4)((0,n.LL)(e.clearIcon)))])),_:1},8,["class","onClick"])):(0,n.kq)("v-if",!0)])),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","label","tabindex","onKeydown"]))])),content:(0,n.w5)((()=>[(0,n.WI)(e.$slots,"default",{visible:R.value,actualVisible:A.value,parsedValue:(0,o.SU)(ae),format:e.format,unlinkPanels:e.unlinkPanels,type:e.type,defaultValue:e.defaultValue,onPick:V,onSelectRange:j,onSetPickerOption:Re,onCalendarChange:Ae,onPanelChange:Oe,onKeydown:J,onMousedown:t[1]||(t[1]=(0,r.iM)((()=>{}),["stop"]))})])),_:3},16,["visible","transition","popper-class","popper-options"]))}});var U=(0,v.Z)(E,[["__file","/home/runner/work/element-plus/element-plus/packages/components/time-picker/src/common/picker.vue"]])},58990:function(e,t,l){l.d(t,{b:function(){return s}});var n=l(26227),o=l(83058),a=l(6745),r=l(41652);const s=(0,a.o8)({id:{type:(0,a.Cq)([Array,String])},name:{type:(0,a.Cq)([Array,String]),default:""},popperClass:{type:String,default:""},format:String,valueFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:(0,a.Cq)([String,Object]),default:n.K41},editable:{type:Boolean,default:!0},prefixIcon:{type:(0,a.Cq)([String,Object]),default:""},size:r.Pp,readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:""},popperOptions:{type:(0,a.Cq)(Object),default:()=>({})},modelValue:{type:(0,a.Cq)([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:(0,a.Cq)([Date,Array])},defaultTime:{type:(0,a.Cq)([Date,Array])},isRange:{type:Boolean,default:!1},...o.p,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:{type:Boolean,default:!1},label:{type:String,default:void 0},tabindex:{type:(0,a.Cq)([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean})},54555:function(e,t,l){l.d(t,{FW:function(){return n},HM:function(){return a},Zf:function(){return r}});const n=["hours","minutes","seconds"],o="HH:mm:ss",a="YYYY-MM-DD",r={date:a,dates:a,week:"gggg[w]ww",year:"YYYY",month:"YYYY-MM",datetime:`${a} ${o}`,monthrange:"YYYY-MM",daterange:a,datetimerange:`${a} ${o}`}},83058:function(e,t,l){l.d(t,{p:function(){return o},v:function(){return a}});var n=l(6745);const o=(0,n.o8)({disabledHours:{type:(0,n.Cq)(Function)},disabledMinutes:{type:(0,n.Cq)(Function)},disabledSeconds:{type:(0,n.Cq)(Function)}}),a=(0,n.o8)({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}})},28360:function(e,t,l){l.d(t,{Z:function(){return A}});var n=l(53321),o=l(73745),a=l(20162),r=l(53399),s=l(9498),i=l(83058),d=l(6745);const u=(0,d.o8)({...i.v,datetimeRole:String,parsedValue:{type:(0,d.Cq)(Object)}}),c=({getAvailableHours:e,getAvailableMinutes:t,getAvailableSeconds:l})=>{const n=(n,o,a,r)=>{const s={hour:e,minute:t,second:l};let i=n;return["hour","minute","second"].forEach((e=>{if(s[e]){let t;const l=s[e];switch(e){case"minute":t=l(i.hour(),o,r);break;case"second":t=l(i.hour(),i.minute(),o,r);break;default:t=l(o,r);break}if((null==t?void 0:t.length)&&!t.includes(i[e]())){const l=a?0:t.length-1;i=i[e](t[l])}}})),i},o={},a=([e,t])=>{o[e]=t};return{timePickerOptions:o,getAvailableTime:n,onSetOption:a}};var p=l(29800);const h=e=>{const t=(e,t)=>e||t,l=e=>!0!==e;return e.map(t).filter(l)},f=(e,t,l)=>{const n=(t,l)=>(0,p.fM)(24,e&&(()=>null==e?void 0:e(t,l))),o=(e,l,n)=>(0,p.fM)(60,t&&(()=>null==t?void 0:t(e,l,n))),a=(e,t,n,o)=>(0,p.fM)(60,l&&(()=>null==l?void 0:l(e,t,n,o)));return{getHoursList:n,getMinutesList:o,getSecondsList:a}},v=(e,t,l)=>{const{getHoursList:n,getMinutesList:o,getSecondsList:a}=f(e,t,l),r=(e,t)=>h(n(e,t)),s=(e,t,l)=>h(o(e,t,l)),i=(e,t,l,n)=>h(a(e,t,l,n));return{getAvailableHours:r,getAvailableMinutes:s,getAvailableSeconds:i}},m=e=>{const t=(0,o.iH)(e.parsedValue);return(0,n.YP)((()=>e.visible),(l=>{l||(t.value=e.parsedValue)})),t};var g=l(10260),y=l(55321),b=l(64310),C=l(26227),w=l(54555);const S=(0,d.o8)({role:{type:String,required:!0},spinnerDate:{type:(0,d.Cq)(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:(0,d.Cq)(String),default:""},...i.p});var k=l(56490),x=l(23256),N=l(37461),E=l(32931);const U=["onClick"],F=["onMouseenter"],_=(0,n.aZ)({__name:"basic-time-spinner",props:S,emits:["change","select-range","set-option"],setup(e,{emit:t}){const l=e,a=(0,x.s3)("time"),{getHoursList:s,getMinutesList:i,getSecondsList:d}=f(l.disabledHours,l.disabledMinutes,l.disabledSeconds);let u=!1;const c=(0,o.iH)(),h=(0,o.iH)(),v=(0,o.iH)(),m=(0,o.iH)(),S={hours:h,minutes:v,seconds:m},k=(0,n.Fl)((()=>l.showSeconds?w.FW:w.FW.slice(0,2))),_=(0,n.Fl)((()=>{const{spinnerDate:e}=l,t=e.hour(),n=e.minute(),o=e.second();return{hours:t,minutes:n,seconds:o}})),H=(0,n.Fl)((()=>{const{hours:e,minutes:t}=(0,o.SU)(_);return{hours:s(l.role),minutes:i(e,l.role),seconds:d(e,t,l.role)}})),T=(0,n.Fl)((()=>{const{hours:e,minutes:t,seconds:l}=(0,o.SU)(_);return{hours:(0,p.p8)(e,23),minutes:(0,p.p8)(t,59),seconds:(0,p.p8)(l,59)}})),M=(0,g.Z)((e=>{u=!1,A(e)}),200),D=e=>{const t=!!l.amPmMode;if(!t)return"";const n="A"===l.amPmMode;let o=e<12?" am":" pm";return n&&(o=o.toUpperCase()),o},R=e=>{let l;switch(e){case"hours":l=[0,2];break;case"minutes":l=[3,5];break;case"seconds":l=[6,8];break}const[n,o]=l;t("select-range",n,o),c.value=e},A=e=>{L(e,(0,o.SU)(_)[e])},O=()=>{A("hours"),A("minutes"),A("seconds")},K=e=>e.querySelector(`.${a.namespace.value}-scrollbar__wrap`),L=(e,t)=>{if(l.arrowControl)return;const n=(0,o.SU)(S[e]);n&&n.$el&&(K(n.$el).scrollTop=Math.max(0,t*$(e)))},$=e=>{const t=(0,o.SU)(S[e]),l=null==t?void 0:t.$el.querySelector("li");return l&&Number.parseFloat((0,N.C2)(l,"height"))||0},W=()=>{P(1)},I=()=>{P(-1)},P=e=>{c.value||R("hours");const t=c.value,l=(0,o.SU)(_)[t],a="hours"===c.value?24:60,r=B(t,l,e,a);q(t,r),L(t,r),(0,n.Y3)((()=>R(t)))},B=(e,t,l,n)=>{let a=(t+l+n)%n;const r=(0,o.SU)(H)[e];while(r[a]&&a!==t)a=(a+l+n)%n;return a},q=(e,n)=>{const a=(0,o.SU)(H)[e],r=a[n];if(r)return;const{hours:s,minutes:i,seconds:d}=(0,o.SU)(_);let u;switch(e){case"hours":u=l.spinnerDate.hour(n).minute(i).second(d);break;case"minutes":u=l.spinnerDate.hour(s).minute(n).second(d);break;case"seconds":u=l.spinnerDate.hour(s).minute(i).second(n);break}t("change",u)},j=(e,{value:t,disabled:l})=>{l||(q(e,t),R(e),L(e,t))},z=e=>{u=!0,M(e);const t=Math.min(Math.round((K((0,o.SU)(S[e]).$el).scrollTop-(.5*V(e)-10)/$(e)+3)/$(e)),"hours"===e?23:59);q(e,t)},V=e=>(0,o.SU)(S[e]).$el.offsetHeight,Y=()=>{const e=e=>{const t=(0,o.SU)(S[e]);t&&t.$el&&(K(t.$el).onscroll=()=>{z(e)})};e("hours"),e("minutes"),e("seconds")};(0,n.bv)((()=>{(0,n.Y3)((()=>{!l.arrowControl&&Y(),O(),"start"===l.role&&R("hours")}))}));const Z=(e,t)=>{S[t].value=e};return t("set-option",[`${l.role}_scrollDown`,P]),t("set-option",[`${l.role}_emitSelectRange`,R]),(0,n.YP)((()=>l.spinnerDate),(()=>{u||O()})),(e,t)=>((0,n.wg)(),(0,n.iD)("div",{class:(0,r.C_)([(0,o.SU)(a).b("spinner"),{"has-seconds":e.showSeconds}])},[e.arrowControl?(0,n.kq)("v-if",!0):((0,n.wg)(!0),(0,n.iD)(n.HY,{key:0},(0,n.Ko)((0,o.SU)(k),(t=>((0,n.wg)(),(0,n.j4)((0,o.SU)(y.Mr),{key:t,ref_for:!0,ref:e=>Z(e,t),class:(0,r.C_)((0,o.SU)(a).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":(0,o.SU)(a).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:e=>R(t),onMousemove:e=>A(t)},{default:(0,n.w5)((()=>[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)((0,o.SU)(H)[t],((l,s)=>((0,n.wg)(),(0,n.iD)("li",{key:s,class:(0,r.C_)([(0,o.SU)(a).be("spinner","item"),(0,o.SU)(a).is("active",s===(0,o.SU)(_)[t]),(0,o.SU)(a).is("disabled",l)]),onClick:e=>j(t,{value:s,disabled:l})},["hours"===t?((0,n.wg)(),(0,n.iD)(n.HY,{key:0},[(0,n.Uk)((0,r.zw)(("0"+(e.amPmMode?s%12||12:s)).slice(-2))+(0,r.zw)(D(s)),1)],64)):((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[(0,n.Uk)((0,r.zw)(("0"+s).slice(-2)),1)],64))],10,U)))),128))])),_:2},1032,["class","view-class","onMouseenter","onMousemove"])))),128)),e.arrowControl?((0,n.wg)(!0),(0,n.iD)(n.HY,{key:1},(0,n.Ko)((0,o.SU)(k),(t=>((0,n.wg)(),(0,n.iD)("div",{key:t,class:(0,r.C_)([(0,o.SU)(a).be("spinner","wrapper"),(0,o.SU)(a).is("arrow")]),onMouseenter:e=>R(t)},[(0,n.wy)(((0,n.wg)(),(0,n.j4)((0,o.SU)(b.gn),{class:(0,r.C_)(["arrow-up",(0,o.SU)(a).be("spinner","arrow")])},{default:(0,n.w5)((()=>[(0,n.Wm)((0,o.SU)(C.a2Z))])),_:1},8,["class"])),[[(0,o.SU)(E.Qu),I]]),(0,n.wy)(((0,n.wg)(),(0,n.j4)((0,o.SU)(b.gn),{class:(0,r.C_)(["arrow-down",(0,o.SU)(a).be("spinner","arrow")])},{default:(0,n.w5)((()=>[(0,n.Wm)((0,o.SU)(C.K5e))])),_:1},8,["class"])),[[(0,o.SU)(E.Qu),W]]),(0,n._)("ul",{class:(0,r.C_)((0,o.SU)(a).be("spinner","list"))},[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)((0,o.SU)(T)[t],((l,s)=>((0,n.wg)(),(0,n.iD)("li",{key:s,class:(0,r.C_)([(0,o.SU)(a).be("spinner","item"),(0,o.SU)(a).is("active",l===(0,o.SU)(_)[t]),(0,o.SU)(a).is("disabled",(0,o.SU)(H)[t][l])])},["number"===typeof l?((0,n.wg)(),(0,n.iD)(n.HY,{key:0},["hours"===t?((0,n.wg)(),(0,n.iD)(n.HY,{key:0},[(0,n.Uk)((0,r.zw)(("0"+(e.amPmMode?l%12||12:l)).slice(-2))+(0,r.zw)(D(l)),1)],64)):((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[(0,n.Uk)((0,r.zw)(("0"+l).slice(-2)),1)],64))],64)):(0,n.kq)("v-if",!0)],2)))),128))],2)],42,F)))),128)):(0,n.kq)("v-if",!0)],2))}});var H=(0,k.Z)(_,[["__file","/home/runner/work/element-plus/element-plus/packages/components/time-picker/src/time-picker-com/basic-time-spinner.vue"]]),T=l(36878),M=l(48743),D=l(11167);const R=(0,n.aZ)({__name:"panel-time-pick",props:u,emits:["pick","select-range","set-picker-option"],setup(e,{emit:t}){const l=e,i=(0,n.f3)("EP_PICKER_BASE"),{arrowControl:d,disabledHours:u,disabledMinutes:p,disabledSeconds:h,defaultValue:f}=i.props,{getAvailableHours:g,getAvailableMinutes:y,getAvailableSeconds:b}=v(u,p,h),C=(0,x.s3)("time"),{t:w,lang:S}=(0,T.bU)(),k=(0,o.iH)([0,2]),N=m(l),E=(0,n.Fl)((()=>(0,M.o8)(l.actualVisible)?`${C.namespace.value}-zoom-in-top`:"")),U=(0,n.Fl)((()=>l.format.includes("ss"))),F=(0,n.Fl)((()=>l.format.includes("A")?"A":l.format.includes("a")?"a":"")),_=e=>{const t=s(e).locale(S.value),l=B(t);return t.isSame(l)},R=()=>{t("pick",N.value,!1)},A=(e=!1,n=!1)=>{n||t("pick",l.parsedValue,e)},O=e=>{if(!l.visible)return;const n=B(e).millisecond(0);t("pick",n,!0)},K=(e,l)=>{t("select-range",e,l),k.value=[e,l]},L=e=>{const t=[0,3].concat(U.value?[6]:[]),l=["hours","minutes"].concat(U.value?["seconds"]:[]),n=t.indexOf(k.value[0]),o=(n+e+t.length)%t.length;W["start_emitSelectRange"](l[o])},$=e=>{const t=e.code,{left:l,right:n,up:o,down:a}=D.EVENT_CODE;if([l,n].includes(t)){const n=t===l?-1:1;return L(n),void e.preventDefault()}if([o,a].includes(t)){const l=t===o?-1:1;return W["start_scrollDown"](l),void e.preventDefault()}},{timePickerOptions:W,onSetOption:I,getAvailableTime:P}=c({getAvailableHours:g,getAvailableMinutes:y,getAvailableSeconds:b}),B=e=>P(e,l.datetimeRole||"",!0),q=e=>e?s(e,l.format).locale(S.value):null,j=e=>e?e.format(l.format):null,z=()=>s(f).locale(S.value);return t("set-picker-option",["isValidValue",_]),t("set-picker-option",["formatToString",j]),t("set-picker-option",["parseUserInput",q]),t("set-picker-option",["handleKeydownInput",$]),t("set-picker-option",["getRangeAvailableTime",B]),t("set-picker-option",["getDefaultValue",z]),(e,t)=>((0,n.wg)(),(0,n.j4)(a.uT,{name:(0,o.SU)(E)},{default:(0,n.w5)((()=>[e.actualVisible||e.visible?((0,n.wg)(),(0,n.iD)("div",{key:0,class:(0,r.C_)((0,o.SU)(C).b("panel"))},[(0,n._)("div",{class:(0,r.C_)([(0,o.SU)(C).be("panel","content"),{"has-seconds":(0,o.SU)(U)}])},[(0,n.Wm)(H,{ref:"spinner",role:e.datetimeRole||"start","arrow-control":(0,o.SU)(d),"show-seconds":(0,o.SU)(U),"am-pm-mode":(0,o.SU)(F),"spinner-date":e.parsedValue,"disabled-hours":(0,o.SU)(u),"disabled-minutes":(0,o.SU)(p),"disabled-seconds":(0,o.SU)(h),onChange:O,onSetOption:(0,o.SU)(I),onSelectRange:K},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),(0,n._)("div",{class:(0,r.C_)((0,o.SU)(C).be("panel","footer"))},[(0,n._)("button",{type:"button",class:(0,r.C_)([(0,o.SU)(C).be("panel","btn"),"cancel"]),onClick:R},(0,r.zw)((0,o.SU)(w)("el.datepicker.cancel")),3),(0,n._)("button",{type:"button",class:(0,r.C_)([(0,o.SU)(C).be("panel","btn"),"confirm"]),onClick:t[0]||(t[0]=e=>A())},(0,r.zw)((0,o.SU)(w)("el.datepicker.confirm")),3)],2)],2)):(0,n.kq)("v-if",!0)])),_:1},8,["name"]))}});var A=(0,k.Z)(R,[["__file","/home/runner/work/element-plus/element-plus/packages/components/time-picker/src/time-picker-com/panel-time-pick.vue"]])},29800:function(e,t,l){l.d(t,{Bz:function(){return i},V_:function(){return c},fM:function(){return f},p8:function(){return r},sG:function(){return p},t1:function(){return d},tS:function(){return s},zW:function(){return h}});var n=l(9498),o=l(73285),a=l(48743);const r=(e,t)=>[e>0?e-1:void 0,e,e<t?e+1:void 0],s=e=>Array.from(Array.from({length:e}).keys()),i=e=>e.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),d=e=>e.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),u=function(e,t){const l=(0,o.J_)(e),n=(0,o.J_)(t);return l&&n?e.getTime()===t.getTime():!l&&!n&&e===t},c=function(e,t){const l=(0,o.kJ)(e),n=(0,o.kJ)(t);return l&&n?e.length===t.length&&e.every(((e,l)=>u(e,t[l]))):!l&&!n&&u(e,t)},p=function(e,t,l){const o=(0,a.xb)(t)||"x"===t?n(e).locale(l):n(e,t).locale(l);return o.isValid()?o:void 0},h=function(e,t,l){return(0,a.xb)(t)?e:"x"===t?+e:n(e).locale(l).format(t)},f=(e,t)=>{var l;const n=[],o=null==t?void 0:t();for(let a=0;a<e;a++)n.push(null!=(l=null==o?void 0:o.includes(a))&&l);return n}},62511:function(e,t,l){l.d(t,{a:function(){return E}});var n=l(53321),o=l(73745),a=l(53399),r=l(9498),s=l(32591),i=l(98600),d=l(64310),u=l(26227),c=l(6745),p=l(41652);const h=(0,c.o8)({format:{type:String,default:"HH:mm"},modelValue:String,disabled:Boolean,editable:{type:Boolean,default:!0},effect:{type:String,default:"light"},clearable:{type:Boolean,default:!0},size:p.Pp,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:"00:30"},minTime:String,maxTime:String,name:String,prefixIcon:{type:(0,c.Cq)([String,Object]),default:()=>u.SUY},clearIcon:{type:(0,c.Cq)([String,Object]),default:()=>u.K41}}),f=e=>{const t=(e||"").split(":");if(t.length>=2){let l=Number.parseInt(t[0],10);const n=Number.parseInt(t[1],10),o=e.toUpperCase();return o.includes("AM")&&12===l?l=0:o.includes("PM")&&12!==l&&(l+=12),{hours:l,minutes:n}}return null},v=(e,t)=>{const l=f(e);if(!l)return-1;const n=f(t);if(!n)return-1;const o=l.minutes+60*l.hours,a=n.minutes+60*n.hours;return o===a?0:o>a?1:-1},m=e=>`${e}`.padStart(2,"0"),g=e=>`${m(e.hours)}:${m(e.minutes)}`,y=(e,t)=>{const l=f(e);if(!l)return"";const n=f(t);if(!n)return"";const o={hours:l.hours,minutes:l.minutes};return o.minutes+=n.minutes,o.hours+=n.hours,o.hours+=Math.floor(o.minutes/60),o.minutes=o.minutes%60,g(o)};var b=l(56490),C=l(23256),w=l(93460);const S=(0,n.aZ)({name:"ElTimeSelect"}),k=(0,n.aZ)({...S,props:h,emits:["change","blur","focus","update:modelValue"],setup(e,{expose:t}){const l=e;r.extend(s);const{Option:u}=i.ElSelect,c=(0,C.s3)("input"),p=(0,o.iH)(),h=(0,w.DT)(),m=(0,n.Fl)((()=>l.modelValue)),b=(0,n.Fl)((()=>{const e=f(l.start);return e?g(e):null})),S=(0,n.Fl)((()=>{const e=f(l.end);return e?g(e):null})),k=(0,n.Fl)((()=>{const e=f(l.step);return e?g(e):null})),x=(0,n.Fl)((()=>{const e=f(l.minTime||"");return e?g(e):null})),N=(0,n.Fl)((()=>{const e=f(l.maxTime||"");return e?g(e):null})),E=(0,n.Fl)((()=>{const e=[];if(l.start&&l.end&&l.step){let t,n=b.value;while(n&&S.value&&v(n,S.value)<=0)t=r(n,"HH:mm").format(l.format),e.push({value:t,disabled:v(n,x.value||"-1:-1")<=0||v(n,N.value||"100:100")>=0}),n=y(n,k.value)}return e})),U=()=>{var e,t;null==(t=null==(e=p.value)?void 0:e.blur)||t.call(e)},F=()=>{var e,t;null==(t=null==(e=p.value)?void 0:e.focus)||t.call(e)};return t({blur:U,focus:F}),(e,t)=>((0,n.wg)(),(0,n.j4)((0,o.SU)(i.ElSelect),{ref_key:"select",ref:p,"model-value":(0,o.SU)(m),disabled:(0,o.SU)(h),clearable:e.clearable,"clear-icon":e.clearIcon,size:e.size,effect:e.effect,placeholder:e.placeholder,"default-first-option":"",filterable:e.editable,"onUpdate:modelValue":t[0]||(t[0]=t=>e.$emit("update:modelValue",t)),onChange:t[1]||(t[1]=t=>e.$emit("change",t)),onBlur:t[2]||(t[2]=t=>e.$emit("blur",t)),onFocus:t[3]||(t[3]=t=>e.$emit("focus",t))},{prefix:(0,n.w5)((()=>[e.prefixIcon?((0,n.wg)(),(0,n.j4)((0,o.SU)(d.gn),{key:0,class:(0,a.C_)((0,o.SU)(c).e("prefix-icon"))},{default:(0,n.w5)((()=>[((0,n.wg)(),(0,n.j4)((0,n.LL)(e.prefixIcon)))])),_:1},8,["class"])):(0,n.kq)("v-if",!0)])),default:(0,n.w5)((()=>[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)((0,o.SU)(E),(e=>((0,n.wg)(),(0,n.j4)((0,o.SU)(u),{key:e.value,label:e.value,value:e.value,disabled:e.disabled},null,8,["label","value","disabled"])))),128))])),_:1},8,["model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable"]))}});var x=(0,b.Z)(k,[["__file","/home/runner/work/element-plus/element-plus/packages/components/time-select/src/time-select.vue"]]);x.install=e=>{e.component(x.name,x)};const N=x,E=N},54447:function(e,t,l){l(17388),l(83773),l(91715),l(61647),l(72723),l(50427),l(54169)},8955:function(e,t,l){l(17388),l(27570)},35791:function(e,t,l){l.d(t,{rJ:function(){return g},_T:function(){return y}});var n=l(53321),o=l(23256);const a=(0,n.aZ)({name:"ElTimeline",setup(e,{slots:t}){const l=(0,o.s3)("timeline");return(0,n.JJ)("timeline",t),()=>(0,n.h)("ul",{class:[l.b()]},[(0,n.WI)(t,"default")])}});var r=l(53399),s=l(73745),i=l(64310),d=l(6745),u=l(3886);const c=(0,d.o8)({timestamp:{type:String,default:""},hideTimestamp:{type:Boolean,default:!1},center:{type:Boolean,default:!1},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:u.AA},hollow:{type:Boolean,default:!1}});var p=l(56490);const h=(0,n.aZ)({name:"ElTimelineItem"}),f=(0,n.aZ)({...h,props:c,setup(e){const t=e,l=(0,o.s3)("timeline-item"),a=(0,n.Fl)((()=>[l.e("node"),l.em("node",t.size||""),l.em("node",t.type||""),l.is("hollow",t.hollow)]));return(e,t)=>((0,n.wg)(),(0,n.iD)("li",{class:(0,r.C_)([(0,s.SU)(l).b(),{[(0,s.SU)(l).e("center")]:e.center}])},[(0,n._)("div",{class:(0,r.C_)((0,s.SU)(l).e("tail"))},null,2),e.$slots.dot?(0,n.kq)("v-if",!0):((0,n.wg)(),(0,n.iD)("div",{key:0,class:(0,r.C_)((0,s.SU)(a)),style:(0,r.j5)({backgroundColor:e.color})},[e.icon?((0,n.wg)(),(0,n.j4)((0,s.SU)(i.gn),{key:0,class:(0,r.C_)((0,s.SU)(l).e("icon"))},{default:(0,n.w5)((()=>[((0,n.wg)(),(0,n.j4)((0,n.LL)(e.icon)))])),_:1},8,["class"])):(0,n.kq)("v-if",!0)],6)),e.$slots.dot?((0,n.wg)(),(0,n.iD)("div",{key:1,class:(0,r.C_)((0,s.SU)(l).e("dot"))},[(0,n.WI)(e.$slots,"dot")],2)):(0,n.kq)("v-if",!0),(0,n._)("div",{class:(0,r.C_)((0,s.SU)(l).e("wrapper"))},[e.hideTimestamp||"top"!==e.placement?(0,n.kq)("v-if",!0):((0,n.wg)(),(0,n.iD)("div",{key:0,class:(0,r.C_)([(0,s.SU)(l).e("timestamp"),(0,s.SU)(l).is("top")])},(0,r.zw)(e.timestamp),3)),(0,n._)("div",{class:(0,r.C_)((0,s.SU)(l).e("content"))},[(0,n.WI)(e.$slots,"default")],2),e.hideTimestamp||"bottom"!==e.placement?(0,n.kq)("v-if",!0):((0,n.wg)(),(0,n.iD)("div",{key:1,class:(0,r.C_)([(0,s.SU)(l).e("timestamp"),(0,s.SU)(l).is("bottom")])},(0,r.zw)(e.timestamp),3))],2)],2))}});var v=(0,p.Z)(f,[["__file","/home/runner/work/element-plus/element-plus/packages/components/timeline/src/timeline-item.vue"]]),m=l(82134);const g=(0,m.nz)(a,{TimelineItem:v}),y=(0,m.dp)(v)},11605:function(e,t,l){l(17388),l(94874)},19962:function(e,t,l){l.d(t,{Q0:function(){return te}});var n=l(53321),o=l(73745),a=l(53399),r=l(85059),s=l(64493),i=l(86177),d=l(7723),u=l(73285),c=l(6745),p=l(7938),h=l(48743);const f=(0,c.l0)({type:(0,c.Cq)(Boolean),default:null}),v=(0,c.l0)({type:(0,c.Cq)(Function)}),m=e=>{const t=`update:${e}`,l=`onUpdate:${e}`,o=[t],a={[e]:f,[l]:v},r=({indicator:o,toggleReason:a,shouldHideWhenRouteChanges:r,shouldProceed:s,onShow:i,onHide:d})=>{const c=(0,n.FN)(),{emit:f}=c,v=c.props,m=(0,n.Fl)((()=>(0,u.mf)(v[l]))),g=(0,n.Fl)((()=>null===v[e])),y=e=>{!0!==o.value&&(o.value=!0,a&&(a.value=e),(0,u.mf)(i)&&i(e))},b=e=>{!1!==o.value&&(o.value=!1,a&&(a.value=e),(0,u.mf)(d)&&d(e))},C=e=>{if(!0===v.disabled||(0,u.mf)(s)&&!s())return;const l=m.value&&p.C5;l&&f(t,!0),!g.value&&l||y(e)},w=e=>{if(!0===v.disabled||!p.C5)return;const l=m.value&&p.C5;l&&f(t,!1),!g.value&&l||b(e)},S=e=>{(0,h.jn)(e)&&(v.disabled&&e?m.value&&f(t,!1):o.value!==e&&(e?y():b()))},k=()=>{o.value?w():C()};return(0,n.YP)((()=>v[e]),S),r&&void 0!==c.appContext.config.globalProperties.$route&&(0,n.YP)((()=>({...c.proxy.$route})),(()=>{r.value&&o.value&&w()})),(0,n.bv)((()=>{S(v[e])})),{hide:w,show:C,toggle:k,hasUpdateHandler:m}};return{useModelToggle:r,useModelToggleProps:a,useModelToggleEmits:o}},{useModelToggle:g,useModelToggleProps:y,useModelToggleEmits:b}=m("modelValue");var C=l(77245),w=l(16700);const{useModelToggleProps:S,useModelToggleEmits:k,useModelToggle:x}=m("visible"),N=(0,c.o8)({...C.Mv,...S,...i.s,...d.k,...w.H,showArrow:{type:Boolean,default:!0}}),E=[...k,"before-show","before-hide","show","hide","open","close"],U=(e,t)=>(0,u.kJ)(e)?e.includes(t):e===t,F=(e,t,l)=>n=>{U((0,o.SU)(e),t)&&l(n)};var _=l(56490),H=l(23256),T=l(267),M=l(1314);const D=(0,n.aZ)({name:"ElTooltipTrigger"}),R=(0,n.aZ)({...D,props:d.k,setup(e,{expose:t}){const l=e,r=(0,H.s3)("tooltip"),{controlled:i,id:d,open:u,onOpen:c,onClose:p,onToggle:h}=(0,n.f3)(s.j,void 0),f=(0,o.iH)(null),v=()=>{if((0,o.SU)(i)||l.disabled)return!0},m=(0,o.Vh)(l,"trigger"),g=(0,T.M)(v,F(m,"hover",c)),y=(0,T.M)(v,F(m,"hover",p)),b=(0,T.M)(v,F(m,"click",(e=>{0===e.button&&h(e)}))),C=(0,T.M)(v,F(m,"focus",c)),w=(0,T.M)(v,F(m,"focus",p)),S=(0,T.M)(v,F(m,"contextmenu",(e=>{e.preventDefault(),h(e)}))),k=(0,T.M)(v,(e=>{const{code:t}=e;l.triggerKeys.includes(t)&&(e.preventDefault(),h(e))}));return t({triggerRef:f}),(e,t)=>((0,n.wg)(),(0,n.j4)((0,o.SU)(M.Z),{id:(0,o.SU)(d),"virtual-ref":e.virtualRef,open:(0,o.SU)(u),"virtual-triggering":e.virtualTriggering,class:(0,a.C_)((0,o.SU)(r).e("trigger")),onBlur:(0,o.SU)(w),onClick:(0,o.SU)(b),onContextmenu:(0,o.SU)(S),onFocus:(0,o.SU)(C),onMouseenter:(0,o.SU)(g),onMouseleave:(0,o.SU)(y),onKeydown:(0,o.SU)(k)},{default:(0,n.w5)((()=>[(0,n.WI)(e.$slots,"default")])),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var A=(0,_.Z)(R,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/trigger.vue"]]),O=l(20162),K=l(33255),L=l(56508);let $;const W=()=>{const e=(0,H.u_)(),t=(0,L.SG)(),l=(0,n.Fl)((()=>`${e.value}-popper-container-${t.prefix}`)),o=(0,n.Fl)((()=>`#${l.value}`));return{id:l,selector:o}},I=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},P=()=>{const{id:e,selector:t}=W();return(0,n.wF)((()=>{p.C5&&($||document.body.querySelector(t.value)||($=I(e.value)))})),{id:e,selector:t}};var B=l(50233);const q=(0,n.aZ)({name:"ElTooltipContent",inheritAttrs:!1}),j=(0,n.aZ)({...q,props:i.s,setup(e,{expose:t}){const l=e,{selector:a}=W(),r=(0,H.s3)("tooltip"),i=(0,o.iH)(null),d=(0,o.iH)(!1),{controlled:u,id:c,open:p,trigger:h,onClose:f,onOpen:v,onShow:m,onHide:g,onBeforeShow:y,onBeforeHide:b}=(0,n.f3)(s.j,void 0),C=(0,n.Fl)((()=>l.transition||`${r.namespace.value}-fade-in-linear`)),w=(0,n.Fl)((()=>l.persistent));(0,n.Jd)((()=>{d.value=!0}));const S=(0,n.Fl)((()=>!!(0,o.SU)(w)||(0,o.SU)(p))),k=(0,n.Fl)((()=>!l.disabled&&(0,o.SU)(p))),x=(0,n.Fl)((()=>l.appendTo||a.value)),N=(0,n.Fl)((()=>{var e;return null!=(e=l.style)?e:{}})),E=(0,n.Fl)((()=>!(0,o.SU)(p))),U=()=>{g()},F=()=>{if((0,o.SU)(u))return!0},_=(0,T.M)(F,(()=>{l.enterable&&"hover"===(0,o.SU)(h)&&v()})),M=(0,T.M)(F,(()=>{"hover"===(0,o.SU)(h)&&f()})),D=()=>{var e,t;null==(t=null==(e=i.value)?void 0:e.updatePopper)||t.call(e),null==y||y()},R=()=>{null==b||b()},A=()=>{m(),$=(0,K.i9H)((0,n.Fl)((()=>{var e;return null==(e=i.value)?void 0:e.popperContentRef})),(()=>{if((0,o.SU)(u))return;const e=(0,o.SU)(h);"hover"!==e&&f()}))},L=()=>{l.virtualTriggering||f()};let $;return(0,n.YP)((()=>(0,o.SU)(p)),(e=>{e||null==$||$()}),{flush:"post"}),(0,n.YP)((()=>l.content),(()=>{var e,t;null==(t=null==(e=i.value)?void 0:e.updatePopper)||t.call(e)})),t({contentRef:i}),(e,t)=>((0,n.wg)(),(0,n.j4)(n.lR,{disabled:!e.teleported,to:(0,o.SU)(x)},[(0,n.Wm)(O.uT,{name:(0,o.SU)(C),onAfterLeave:U,onBeforeEnter:D,onAfterEnter:A,onBeforeLeave:R},{default:(0,n.w5)((()=>[(0,o.SU)(S)?(0,n.wy)(((0,n.wg)(),(0,n.j4)((0,o.SU)(B.Z),(0,n.dG)({key:0,id:(0,o.SU)(c),ref_key:"contentRef",ref:i},e.$attrs,{"aria-label":e.ariaLabel,"aria-hidden":(0,o.SU)(E),"boundaries-padding":e.boundariesPadding,"fallback-placements":e.fallbackPlacements,"gpu-acceleration":e.gpuAcceleration,offset:e.offset,placement:e.placement,"popper-options":e.popperOptions,strategy:e.strategy,effect:e.effect,enterable:e.enterable,pure:e.pure,"popper-class":e.popperClass,"popper-style":[e.popperStyle,(0,o.SU)(N)],"reference-el":e.referenceEl,"trigger-target-el":e.triggerTargetEl,visible:(0,o.SU)(k),"z-index":e.zIndex,onMouseenter:(0,o.SU)(_),onMouseleave:(0,o.SU)(M),onBlur:L,onClose:(0,o.SU)(f)}),{default:(0,n.w5)((()=>[d.value?(0,n.kq)("v-if",!0):(0,n.WI)(e.$slots,"default",{key:0})])),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[O.F8,(0,o.SU)(k)]]):(0,n.kq)("v-if",!0)])),_:3},8,["name"])],8,["disabled","to"]))}});var z=(0,_.Z)(j,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/content.vue"]]),V=l(13530),Y=l(94979);const Z=["innerHTML"],J={key:1},G=(0,n.aZ)({name:"ElTooltip"}),X=(0,n.aZ)({...G,props:N,emits:E,setup(e,{expose:t,emit:l}){const i=e;P();const d=(0,L.Me)(),u=(0,o.iH)(),c=(0,o.iH)(),p=()=>{var e;const t=(0,o.SU)(u);t&&(null==(e=t.popperInstanceRef)||e.update())},f=(0,o.iH)(!1),v=(0,o.iH)(),{show:m,hide:g,hasUpdateHandler:y}=x({indicator:f,toggleReason:v}),{onOpen:b,onClose:C}=(0,V.F)({showAfter:(0,o.Vh)(i,"showAfter"),hideAfter:(0,o.Vh)(i,"hideAfter"),autoClose:(0,o.Vh)(i,"autoClose"),open:m,close:g}),w=(0,n.Fl)((()=>(0,h.jn)(i.visible)&&!y.value));(0,n.JJ)(s.j,{controlled:w,id:d,open:(0,o.OT)(f),trigger:(0,o.Vh)(i,"trigger"),onOpen:e=>{b(e)},onClose:e=>{C(e)},onToggle:e=>{(0,o.SU)(f)?C(e):b(e)},onShow:()=>{l("show",v.value)},onHide:()=>{l("hide",v.value)},onBeforeShow:()=>{l("before-show",v.value)},onBeforeHide:()=>{l("before-hide",v.value)},updatePopper:p}),(0,n.YP)((()=>i.disabled),(e=>{e&&f.value&&(f.value=!1)}));const S=()=>{var e,t;const l=null==(t=null==(e=c.value)?void 0:e.contentRef)?void 0:t.popperContentRef;return l&&l.contains(document.activeElement)};return(0,n.se)((()=>f.value&&g())),t({popperRef:u,contentRef:c,isFocusInsideContent:S,updatePopper:p,onOpen:b,onClose:C,hide:g}),(e,t)=>((0,n.wg)(),(0,n.j4)((0,o.SU)(r.nG),{ref_key:"popperRef",ref:u,role:e.role},{default:(0,n.w5)((()=>[(0,n.Wm)(A,{disabled:e.disabled,trigger:e.trigger,"trigger-keys":e.triggerKeys,"virtual-ref":e.virtualRef,"virtual-triggering":e.virtualTriggering},{default:(0,n.w5)((()=>[e.$slots.default?(0,n.WI)(e.$slots,"default",{key:0}):(0,n.kq)("v-if",!0)])),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),(0,n.Wm)(z,{ref_key:"contentRef",ref:c,"aria-label":e.ariaLabel,"boundaries-padding":e.boundariesPadding,content:e.content,disabled:e.disabled,effect:e.effect,enterable:e.enterable,"fallback-placements":e.fallbackPlacements,"hide-after":e.hideAfter,"gpu-acceleration":e.gpuAcceleration,offset:e.offset,persistent:e.persistent,"popper-class":e.popperClass,"popper-style":e.popperStyle,placement:e.placement,"popper-options":e.popperOptions,pure:e.pure,"raw-content":e.rawContent,"reference-el":e.referenceEl,"trigger-target-el":e.triggerTargetEl,"show-after":e.showAfter,strategy:e.strategy,teleported:e.teleported,transition:e.transition,"virtual-triggering":e.virtualTriggering,"z-index":e.zIndex,"append-to":e.appendTo},{default:(0,n.w5)((()=>[(0,n.WI)(e.$slots,"content",{},(()=>[e.rawContent?((0,n.wg)(),(0,n.iD)("span",{key:0,innerHTML:e.content},null,8,Z)):((0,n.wg)(),(0,n.iD)("span",J,(0,a.zw)(e.content),1))])),e.showArrow?((0,n.wg)(),(0,n.j4)((0,o.SU)(Y.Z),{key:0,"arrow-offset":e.arrowOffset},null,8,["arrow-offset"])):(0,n.kq)("v-if",!0)])),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])])),_:3},8,["role"]))}});var Q=(0,_.Z)(X,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/tooltip.vue"]]),ee=l(82134);const te=(0,ee.nz)(Q)},64493:function(e,t,l){l.d(t,{j:function(){return n}});const n=Symbol("elTooltip")},86177:function(e,t,l){l.d(t,{s:function(){return r}});var n=l(6745),o=l(13530),a=l(48356);const r=(0,n.o8)({...o.q,...a.d0,appendTo:{type:(0,n.Cq)([String,Object])},content:{type:String,default:""},rawContent:{type:Boolean,default:!1},persistent:Boolean,ariaLabel:String,visible:{type:(0,n.Cq)(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean})},7723:function(e,t,l){l.d(t,{k:function(){return r}});var n=l(6745),o=l(58485),a=l(11167);const r=(0,n.o8)({...o.e,disabled:Boolean,trigger:{type:(0,n.Cq)([String,Array]),default:"hover"},triggerKeys:{type:(0,n.Cq)(Array),default:()=>[a.EVENT_CODE.enter,a.EVENT_CODE.space]}})},95065:function(e,t,l){l(17388),l(45502),l(61647)},75097:function(e,t,l){l.d(t,{i:function(){return E}});var n=l(53321),o=l(73745),a=l(68346),r=l(98600),s=l(87516),i=l(23256);const d=(e,{attrs:t},{tree:l,key:s})=>{const d=(0,i.s3)("tree-select"),u={...(0,a.Z)((0,o.BK)(e),Object.keys(r.ElSelect.props)),...t,valueKey:s,popperClass:(0,n.Fl)((()=>{const t=[d.e("popper")];return e.popperClass&&t.push(e.popperClass),t.join(" ")})),filterMethod:(t="")=>{e.filterMethod&&e.filterMethod(t),(0,n.Y3)((()=>{var e;null==(e=l.value)||e.filter(t)}))},onVisibleChange:l=>{var n;null==(n=t.onVisibleChange)||n.call(t,l),e.filterable&&l&&u.filterMethod()}};return u};var u=l(11541);const c=(0,n.aZ)({extends:r.BT,setup(e,t){const l=r.BT.setup(e,t);delete l.selectOptionClick;const o=(0,n.FN)().proxy;return(0,n.Y3)((()=>{l.select.cachedOptions.get(o.value)||l.select.onOptionCreate(o)})),l},methods:{selectOptionClick(){this.$el.parentElement.click()}}});function p(e){return e||0===e}function h(e){return Array.isArray(e)&&e.length}function f(e){return Array.isArray(e)?e:p(e)?[e]:[]}function v(e,t,l,n,o){for(let a=0;a<e.length;a++){const r=e[a];if(t(r,a,e,o))return n?n(r,a,e,o):r;{const e=l(r);if(h(e)){const o=v(e,t,l,n,r);if(o)return o}}}}function m(e,t,l,n){for(let o=0;o<e.length;o++){const a=e[o];t(a,o,e,n);const r=l(a);h(r)&&m(r,t,l,a)}}var g=l(73285),y=l(57894);const b=(e,{attrs:t,slots:l,emit:r},{select:i,tree:d,key:b})=>{(0,n.YP)((()=>e.modelValue),(()=>{e.showCheckbox&&(0,n.Y3)((()=>{const t=d.value;t&&!(0,u.Z)(t.getCheckedKeys(),f(e.modelValue))&&t.setCheckedKeys(f(e.modelValue))}))}),{immediate:!0,deep:!0});const C=(0,n.Fl)((()=>({value:b.value,label:"label",children:"children",disabled:"disabled",isLeaf:"isLeaf",...e.props}))),w=(e,t)=>{var l;const n=C.value[e];return(0,g.mf)(n)?n(t,null==(l=d.value)?void 0:l.getNode(w("value",t))):t[n]},S=f(e.modelValue).map((t=>v(e.data||[],(e=>w("value",e)===t),(e=>w("children",e)),((e,t,l,n)=>n&&w("value",n))))).filter((e=>p(e))),k=(0,n.Fl)((()=>{if(!e.renderAfterExpand&&!e.lazy)return[];const t=[];return m(e.data.concat(e.cacheData),(e=>{const l=w("value",e);t.push({value:l,currentLabel:w("label",e),isDisabled:w("disabled",e)})}),(e=>w("children",e))),t})),x=(0,n.Fl)((()=>k.value.reduce(((e,t)=>({...e,[t.value]:t})),{})));return{...(0,a.Z)((0,o.BK)(e),Object.keys(s.Z.props)),...t,nodeKey:b,expandOnClickNode:(0,n.Fl)((()=>!e.checkStrictly&&e.expandOnClickNode)),defaultExpandedKeys:(0,n.Fl)((()=>e.defaultExpandedKeys?e.defaultExpandedKeys.concat(S):S)),renderContent:(t,{node:n,data:o,store:a})=>t(c,{value:w("value",o),label:w("label",o),disabled:w("disabled",o)},e.renderContent?()=>e.renderContent(t,{node:n,data:o,store:a}):l.default?()=>l.default({node:n,data:o,store:a}):void 0),filterNodeMethod:(t,l,n)=>{var o;return e.filterNodeMethod?e.filterNodeMethod(t,l,n):!t||(null==(o=w("label",l))?void 0:o.includes(t))},onNodeClick:(l,n,o)=>{var a,r,s;if(null==(a=t.onNodeClick)||a.call(t,l,n,o),!e.showCheckbox||!e.checkOnClickNode)if(e.showCheckbox||!e.checkStrictly&&!n.isLeaf)e.expandOnClickNode&&o.proxy.handleExpandIconClick();else if(!w("disabled",l)){const e=null==(r=i.value)?void 0:r.options.get(w("value",l));null==(s=i.value)||s.handleOptionSelect(e)}},onCheck:(l,o)=>{if(!e.showCheckbox)return;const a=w("value",l),s=o.checkedKeys,i=e.multiple?f(e.modelValue).filter((e=>e in x.value&&!d.value.getNode(e)&&!s.includes(e))):[],u=s.concat(i);if(e.checkStrictly)r(y.f_,e.multiple?u:u.includes(a)?a:void 0);else if(e.multiple)r(y.f_,d.value.getCheckedKeys(!0));else{const t=v([l],(e=>!h(w("children",e))&&!w("disabled",e)),(e=>w("children",e))),n=t?w("value",t):void 0,o=p(e.modelValue)&&!!v([l],(t=>w("value",t)===e.modelValue),(e=>w("children",e)));r(y.f_,n===e.modelValue||o?void 0:n)}(0,n.Y3)((()=>{var n;const o=f(e.modelValue);d.value.setCheckedKeys(o),null==(n=t.onCheck)||n.call(t,l,{checkedKeys:d.value.getCheckedKeys(),checkedNodes:d.value.getCheckedNodes(),halfCheckedKeys:d.value.getHalfCheckedKeys(),halfCheckedNodes:d.value.getHalfCheckedNodes()})}))},cacheOptions:k}};var C=l(84040),w=(0,n.aZ)({props:{data:{type:Array,default:()=>[]}},setup(e){const t=(0,n.f3)(C.O);return(0,n.YP)((()=>e.data),(()=>{var l;e.data.forEach((e=>{t.cachedOptions.has(e.value)||t.cachedOptions.set(e.value,e)}));const n=(null==(l=t.selectWrapper)?void 0:l.querySelectorAll("input"))||[];Array.from(n).includes(document.activeElement)||t.setSelected()}),{flush:"post",immediate:!0}),()=>{}}}),S=l(56490);const k=(0,n.aZ)({name:"ElTreeSelect",inheritAttrs:!1,props:{...r.ElSelect.props,...s.Z.props,cacheData:{type:Array,default:()=>[]}},setup(e,t){const{slots:l,expose:i}=t,u=(0,o.iH)(),c=(0,o.iH)(),p=(0,n.Fl)((()=>e.nodeKey||e.valueKey||"value")),h=d(e,t,{select:u,tree:c,key:p}),{cacheOptions:f,...v}=b(e,t,{select:u,tree:c,key:p}),m=(0,o.qj)({});return i(m),(0,n.bv)((()=>{Object.assign(m,{...(0,a.Z)(c.value,["filter","updateKeyChildren","getCheckedNodes","setCheckedNodes","getCheckedKeys","setCheckedKeys","setChecked","getHalfCheckedNodes","getHalfCheckedKeys","getCurrentKey","getCurrentNode","setCurrentKey","setCurrentNode","getNode","remove","append","insertBefore","insertAfter"]),...(0,a.Z)(u.value,["focus","blur"])})})),()=>(0,n.h)(r.ElSelect,(0,o.qj)({...h,ref:e=>u.value=e}),{...l,default:()=>[(0,n.h)(w,{data:f.value}),(0,n.h)(s.Z,(0,o.qj)({...v,ref:e=>c.value=e}))]})}});var x=(0,S.Z)(k,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree-select/src/tree-select.vue"]]);x.install=e=>{e.component(x.name,x)};const N=x,E=N},66386:function(e,t,l){l(50427),l(75317),l(37909)},4874:function(e,t,l){l.d(t,{a:function(){return Be}});var n=l(53321),o=l(53399),a=l(73745),r=l(6745),s=l(33305),i=l(3886);const d=Symbol(),u={key:-1,level:-1,data:{}};var c=(e=>(e["KEY"]="id",e["LABEL"]="label",e["CHILDREN"]="children",e["DISABLED"]="disabled",e))(c||{}),p=(e=>(e["ADD"]="add",e["DELETE"]="delete",e))(p||{});const h={type:Number,default:26},f=(0,r.o8)({data:{type:(0,r.Cq)(Array),default:()=>(0,s.N)([])},emptyText:{type:String},height:{type:Number,default:200},props:{type:(0,r.Cq)(Object),default:()=>(0,s.N)({children:"children",label:"label",disabled:"disabled",value:"id"})},highlightCurrent:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},defaultCheckedKeys:{type:(0,r.Cq)(Array),default:()=>(0,s.N)([])},checkStrictly:{type:Boolean,default:!1},defaultExpandedKeys:{type:(0,r.Cq)(Array),default:()=>(0,s.N)([])},indent:{type:Number,default:16},itemSize:h,icon:{type:i.AA},expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:{type:Boolean,default:!1},currentNodeKey:{type:(0,r.Cq)([String,Number])},accordion:{type:Boolean,default:!1},filterMethod:{type:(0,r.Cq)(Function)},perfMode:{type:Boolean,default:!0}}),v=(0,r.o8)({node:{type:(0,r.Cq)(Object),default:()=>(0,s.N)(u)},expanded:{type:Boolean,default:!1},checked:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},current:{type:Boolean,default:!1},hiddenExpandIcon:{type:Boolean,default:!1},itemSize:h}),m=(0,r.o8)({node:{type:(0,r.Cq)(Object),required:!0}}),g="node-click",y="node-expand",b="node-collapse",C="current-change",w="check",S="check-change",k="node-contextmenu",x={[g]:(e,t,l)=>e&&t&&l,[y]:(e,t)=>e&&t,[b]:(e,t)=>e&&t,[C]:(e,t)=>e&&t,[w]:(e,t)=>e&&t,[S]:(e,t)=>e&&"boolean"===typeof t,[k]:(e,t,l)=>e&&t&&l},N={click:(e,t)=>!(!e||!t),toggle:e=>!!e,check:(e,t)=>e&&"boolean"===typeof t};function E(e,t){const l=(0,a.iH)(new Set),o=(0,a.iH)(new Set),{emit:r}=(0,n.FN)();(0,n.YP)([()=>t.value,()=>e.defaultCheckedKeys],(()=>(0,n.Y3)((()=>{k(e.defaultCheckedKeys)}))),{immediate:!0});const s=()=>{if(!t.value||!e.showCheckbox||e.checkStrictly)return;const{levelTreeNodeMap:n,maxLevel:a}=t.value,r=l.value,s=new Set;for(let e=a-1;e>=1;--e){const t=n.get(e);t&&t.forEach((e=>{const t=e.children;if(t){let l=!0,n=!1;for(const e of t){const t=e.key;if(r.has(t))n=!0;else{if(s.has(t)){l=!1,n=!0;break}l=!1}}l?r.add(e.key):n?(s.add(e.key),r.delete(e.key)):(r.delete(e.key),s.delete(e.key))}}))}o.value=s},i=e=>l.value.has(e.key),d=e=>o.value.has(e.key),u=(t,n,o=!0)=>{const a=l.value,r=(t,l)=>{a[l?p.ADD:p.DELETE](t.key);const n=t.children;!e.checkStrictly&&n&&n.forEach((e=>{e.disabled||r(e,l)}))};r(t,n),s(),o&&c(t,n)},c=(e,t)=>{const{checkedNodes:l,checkedKeys:n}=g(),{halfCheckedNodes:o,halfCheckedKeys:a}=y();r(w,e.data,{checkedKeys:n,checkedNodes:l,halfCheckedKeys:a,halfCheckedNodes:o}),r(S,e.data,t)};function h(e=!1){return g(e).checkedKeys}function f(e=!1){return g(e).checkedNodes}function v(){return y().halfCheckedKeys}function m(){return y().halfCheckedNodes}function g(n=!1){const o=[],a=[];if((null==t?void 0:t.value)&&e.showCheckbox){const{treeNodeMap:e}=t.value;l.value.forEach((t=>{const l=e.get(t);l&&(!n||n&&l.isLeaf)&&(a.push(t),o.push(l.data))}))}return{checkedKeys:a,checkedNodes:o}}function y(){const l=[],n=[];if((null==t?void 0:t.value)&&e.showCheckbox){const{treeNodeMap:e}=t.value;o.value.forEach((t=>{const o=e.get(t);o&&(n.push(t),l.push(o.data))}))}return{halfCheckedNodes:l,halfCheckedKeys:n}}function b(e){l.value.clear(),o.value.clear(),k(e)}function C(l,n){if((null==t?void 0:t.value)&&e.showCheckbox){const e=t.value.treeNodeMap.get(l);e&&u(e,n,!1)}}function k(l){if(null==t?void 0:t.value){const{treeNodeMap:n}=t.value;if(e.showCheckbox&&n&&l)for(const e of l){const t=n.get(e);t&&!i(t)&&u(t,!0,!1)}}}return{updateCheckedKeys:s,toggleCheckbox:u,isChecked:i,isIndeterminate:d,getCheckedKeys:h,getCheckedNodes:f,getHalfCheckedKeys:v,getHalfCheckedNodes:m,setChecked:C,setCheckedKeys:b}}var U=l(73285);function F(e,t){const l=(0,a.iH)(new Set([])),o=(0,a.iH)(new Set([])),r=(0,n.Fl)((()=>(0,U.mf)(e.filterMethod)));function s(n){var a;if(!r.value)return;const s=new Set,i=o.value,d=l.value,u=[],c=(null==(a=t.value)?void 0:a.treeNodes)||[],p=e.filterMethod;function h(e){e.forEach((e=>{u.push(e),(null==p?void 0:p(n,e.data))?u.forEach((e=>{s.add(e.key)})):e.isLeaf&&d.add(e.key);const t=e.children;if(t&&h(t),!e.isLeaf)if(s.has(e.key)){if(t){let l=!0;for(const e of t)if(!d.has(e.key)){l=!1;break}l?i.add(e.key):i.delete(e.key)}}else d.add(e.key);u.pop()}))}return d.clear(),h(c),s}function i(e){return o.value.has(e.key)}return{hiddenExpandIconKeySet:o,hiddenNodeKeySet:l,doFilter:s,isForceHiddenExpandIcon:i}}function _(e,t){const l=(0,a.iH)(new Set(e.defaultExpandedKeys)),o=(0,a.iH)(),r=(0,a.XI)();(0,n.YP)((()=>e.currentNodeKey),(e=>{o.value=e}),{immediate:!0}),(0,n.YP)((()=>e.data),(e=>{X(e)}),{immediate:!0});const{isIndeterminate:s,isChecked:i,toggleCheckbox:d,getCheckedKeys:u,getCheckedNodes:p,getHalfCheckedKeys:h,getHalfCheckedNodes:f,setChecked:v,setCheckedKeys:m}=E(e,r),{doFilter:w,hiddenNodeKeySet:S,isForceHiddenExpandIcon:k}=F(e,r),x=(0,n.Fl)((()=>{var t;return(null==(t=e.props)?void 0:t.value)||c.KEY})),N=(0,n.Fl)((()=>{var t;return(null==(t=e.props)?void 0:t.children)||c.CHILDREN})),_=(0,n.Fl)((()=>{var t;return(null==(t=e.props)?void 0:t.disabled)||c.DISABLED})),H=(0,n.Fl)((()=>{var t;return(null==(t=e.props)?void 0:t.label)||c.LABEL})),T=(0,n.Fl)((()=>{const e=l.value,t=S.value,n=[],o=r.value&&r.value.treeNodes||[];function a(){const l=[];for(let e=o.length-1;e>=0;--e)l.push(o[e]);while(l.length){const o=l.pop();if(o&&(t.has(o.key)||n.push(o),e.has(o.key))){const e=o.children;if(e){const t=e.length;for(let n=t-1;n>=0;--n)l.push(e[n])}}}}return a(),n})),M=(0,n.Fl)((()=>T.value.length>0));function D(e){const t=new Map,l=new Map;let n=1;function o(e,a=1,r=void 0){var s;const i=[];for(const n of e){const e=O(n),d={level:a,key:e,data:n};d.label=L(n),d.parent=r;const u=A(n);d.disabled=K(n),d.isLeaf=!u||0===u.length,u&&u.length&&(d.children=o(u,a+1,d)),i.push(d),t.set(e,d),l.has(a)||l.set(a,[]),null==(s=l.get(a))||s.push(d)}return a>n&&(n=a),i}const a=o(e);return{treeNodeMap:t,levelTreeNodeMap:l,maxLevel:n,treeNodes:a}}function R(e){const t=w(e);t&&(l.value=t)}function A(e){return e[N.value]}function O(e){return e?e[x.value]:""}function K(e){return e[_.value]}function L(e){return e[H.value]}function $(e){const t=l.value;t.has(e.key)?j(e):q(e)}function W(e){l.value=new Set(e)}function I(l,n){t(g,l.data,l,n),P(l),e.expandOnClickNode&&$(l),e.showCheckbox&&e.checkOnClickNode&&!l.disabled&&d(l,!i(l),!0)}function P(e){Y(e)||(o.value=e.key,t(C,e.data,e))}function B(e,t){d(e,t)}function q(n){const o=l.value;if(r.value&&e.accordion){const{treeNodeMap:e}=r.value;o.forEach((t=>{const l=e.get(t);n&&n.level===(null==l?void 0:l.level)&&o.delete(t)}))}o.add(n.key),t(y,n.data,n)}function j(e){l.value.delete(e.key),t(b,e.data,e)}function z(e){return l.value.has(e.key)}function V(e){return!!e.disabled}function Y(e){const t=o.value;return!!t&&t===e.key}function Z(){var e,t;if(o.value)return null==(t=null==(e=r.value)?void 0:e.treeNodeMap.get(o.value))?void 0:t.data}function J(){return o.value}function G(e){o.value=e}function X(e){(0,n.Y3)((()=>r.value=D(e)))}function Q(e){var t;const l=(0,U.Kn)(e)?O(e):e;return null==(t=r.value)?void 0:t.treeNodeMap.get(l)}return{tree:r,flattenTree:T,isNotEmpty:M,getKey:O,getChildren:A,toggleExpand:$,toggleCheckbox:d,isExpanded:z,isChecked:i,isIndeterminate:s,isDisabled:V,isCurrent:Y,isForceHiddenExpandIcon:k,handleNodeClick:I,handleNodeCheck:B,getCurrentNode:Z,getCurrentKey:J,setCurrentKey:G,getCheckedKeys:u,getCheckedNodes:p,getHalfCheckedKeys:h,getHalfCheckedNodes:f,setChecked:v,setCheckedKeys:m,filter:R,setData:X,getNode:Q,expandNode:q,collapseNode:j,setExpandedKeys:W}}var H=l(20162),T=l(64310),M=l(26227),D=l(3389),R=l(23256),A=(0,n.aZ)({name:"ElTreeNodeContent",props:m,setup(e){const t=(0,n.f3)(d),l=(0,R.s3)("tree");return()=>{const o=e.node,{data:a}=o;return(null==t?void 0:t.ctx.slots.default)?t.ctx.slots.default({node:o,data:a}):(0,n.h)("span",{class:l.be("node","label")},[null==o?void 0:o.label])}}}),O=l(56490);const K=["aria-expanded","aria-disabled","aria-checked","data-key","onClick"],L=(0,n.aZ)({name:"ElTreeNode"}),$=(0,n.aZ)({...L,props:v,emits:N,setup(e,{emit:t}){const l=e,r=(0,n.f3)(d),s=(0,R.s3)("tree"),i=(0,n.Fl)((()=>{var e;return null!=(e=null==r?void 0:r.props.indent)?e:16})),u=(0,n.Fl)((()=>{var e;return null!=(e=null==r?void 0:r.props.icon)?e:M.TZ})),c=e=>{t("click",l.node,e)},p=()=>{t("toggle",l.node)},h=e=>{t("check",l.node,e)},f=e=>{var t,n,o,a;(null==(o=null==(n=null==(t=null==r?void 0:r.instance)?void 0:t.vnode)?void 0:n.props)?void 0:o["onNodeContextmenu"])&&(e.stopPropagation(),e.preventDefault()),null==r||r.ctx.emit(k,e,null==(a=l.node)?void 0:a.data,l.node)};return(e,t)=>{var l,r,d;return(0,n.wg)(),(0,n.iD)("div",{ref:"node$",class:(0,o.C_)([(0,a.SU)(s).b("node"),(0,a.SU)(s).is("expanded",e.expanded),(0,a.SU)(s).is("current",e.current),(0,a.SU)(s).is("focusable",!e.disabled),(0,a.SU)(s).is("checked",!e.disabled&&e.checked)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.disabled,"aria-checked":e.checked,"data-key":null==(l=e.node)?void 0:l.key,onClick:(0,H.iM)(c,["stop"]),onContextmenu:f},[(0,n._)("div",{class:(0,o.C_)((0,a.SU)(s).be("node","content")),style:(0,o.j5)({paddingLeft:(e.node.level-1)*(0,a.SU)(i)+"px",height:e.itemSize+"px"})},[(0,a.SU)(u)?((0,n.wg)(),(0,n.j4)((0,a.SU)(T.gn),{key:0,class:(0,o.C_)([(0,a.SU)(s).is("leaf",!!(null==(r=e.node)?void 0:r.isLeaf)),(0,a.SU)(s).is("hidden",e.hiddenExpandIcon),{expanded:!(null==(d=e.node)?void 0:d.isLeaf)&&e.expanded},(0,a.SU)(s).be("node","expand-icon")]),onClick:(0,H.iM)(p,["stop"])},{default:(0,n.w5)((()=>[((0,n.wg)(),(0,n.j4)((0,n.LL)((0,a.SU)(u))))])),_:1},8,["class","onClick"])):(0,n.kq)("v-if",!0),e.showCheckbox?((0,n.wg)(),(0,n.j4)((0,a.SU)(D.ElCheckbox),{key:1,"model-value":e.checked,indeterminate:e.indeterminate,disabled:e.disabled,onChange:h,onClick:t[0]||(t[0]=(0,H.iM)((()=>{}),["stop"]))},null,8,["model-value","indeterminate","disabled"])):(0,n.kq)("v-if",!0),(0,n.Wm)((0,a.SU)(A),{node:e.node},null,8,["node"])],6)],42,K)}}});var W=(0,O.Z)($,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree-v2/src/tree-node.vue"]]),I=l(58778),P=l(36878),B=l(91137),q=l(24261);const j=()=>{const e=(0,n.FN)(),t=e.proxy.$props;return(0,n.Fl)((()=>{const e=(e,t,l)=>({});return t.perfMode?(0,B.Z)(e):(0,q.Z)(e)}))},z="itemRendered",V="scroll",Y="forward",Z="backward",J="auto",G="smart",X="start",Q="center",ee="end",te="horizontal",le="vertical",ne="ltr",oe="rtl",ae="negative",re="positive-ascending",se="positive-descending",ie={[te]:"left",[le]:"top"},de=20;var ue=l(7938);const ce=e=>ue.C5?window.requestAnimationFrame(e):setTimeout(e,16),pe=e=>ue.C5?window.cancelAnimationFrame(e):clearTimeout(e);var he=l(81433);const fe={[te]:"deltaX",[le]:"deltaY"},ve=({atEndEdge:e,atStartEdge:t,layout:l},n)=>{let o,a=0;const r=l=>{const n=l<0&&t.value||l>0&&e.value;return n},s=e=>{pe(o);const t=e[fe[l.value]];r(a)&&r(a+t)||(a+=t,(0,he.vU)()||e.preventDefault(),o=ce((()=>{n(a),a=0})))};return{hasReachedEdge:r,onWheel:s}},me=(0,r.l0)({type:(0,r.Cq)([Number,Function]),required:!0}),ge=(0,r.l0)({type:Number}),ye=(0,r.l0)({type:Number,default:2}),be=(0,r.l0)({type:String,values:["ltr","rtl"],default:"ltr"}),Ce=(0,r.l0)({type:Number,default:0}),we=(0,r.l0)({type:Number,required:!0}),Se=(0,r.l0)({type:String,values:["horizontal","vertical"],default:le}),ke=(0,r.o8)({className:{type:String,default:""},containerElement:{type:(0,r.Cq)([String,Object]),default:"div"},data:{type:(0,r.Cq)(Array),default:()=>(0,s.N)([])},direction:be,height:{type:[String,Number],required:!0},innerElement:{type:[String,Object],default:"div"},style:{type:(0,r.Cq)([Object,String,Array])},useIsScrolling:{type:Boolean,default:!1},width:{type:[Number,String],required:!1},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:{type:Boolean,default:!1}}),xe=(0,r.o8)({cache:ye,estimatedItemSize:ge,layout:Se,initScrollOffset:Ce,total:we,itemSize:me,...ke}),Ne={type:Number,default:6},Ee={type:Number,default:0},Ue={type:Number,default:2},Fe=((0,r.o8)({columnCache:ye,columnWidth:me,estimatedColumnWidth:ge,estimatedRowHeight:ge,initScrollLeft:Ce,initScrollTop:Ce,itemKey:{type:(0,r.Cq)(Function),default:({columnIndex:e,rowIndex:t})=>`${t}:${e}`},rowCache:ye,rowHeight:me,totalColumn:we,totalRow:we,hScrollbarSize:Ne,vScrollbarSize:Ne,scrollbarStartGap:Ee,scrollbarEndGap:Ue,role:String,...ke}),(0,r.o8)({alwaysOn:Boolean,class:String,layout:Se,total:we,ratio:{type:Number,required:!0},clientSize:{type:Number,required:!0},scrollFrom:{type:Number,required:!0},scrollbarSize:Ne,startGap:Ee,endGap:Ue,visible:Boolean})),_e=(e,t)=>e<t?Y:Z,He=e=>e===ne||e===oe||e===te;let Te=null;function Me(e=!1){if(null===Te||e){const e=document.createElement("div"),t=e.style;t.width="50px",t.height="50px",t.overflow="scroll",t.direction="rtl";const l=document.createElement("div"),n=l.style;return n.width="100px",n.height="100px",e.appendChild(l),document.body.appendChild(e),e.scrollLeft>0?Te=se:(e.scrollLeft=1,Te=0===e.scrollLeft?ae:re),document.body.removeChild(e),Te}return Te}function De({move:e,size:t,bar:l},n){const o={},a=`translate${l.axis}(${e}px)`;return o[l.size]=t,o.transform=a,o.msTransform=a,o.webkitTransform=a,"horizontal"===n?o.height="100%":o.width="100%",o}var Re=l(98840);const Ae=(0,n.aZ)({name:"ElVirtualScrollBar",props:Fe,emits:["scroll","start-move","stop-move"],setup(e,{emit:t}){const l=(0,n.Fl)((()=>e.startGap+e.endGap)),o=(0,R.s3)("virtual-scrollbar"),r=(0,R.s3)("scrollbar"),s=(0,a.iH)(),i=(0,a.iH)();let d=null,u=null;const c=(0,a.qj)({isDragging:!1,traveled:0}),p=(0,n.Fl)((()=>Re.sD[e.layout])),h=(0,n.Fl)((()=>e.clientSize-(0,a.SU)(l))),f=(0,n.Fl)((()=>({position:"absolute",width:`${te===e.layout?h.value:e.scrollbarSize}px`,height:`${te===e.layout?e.scrollbarSize:h.value}px`,[ie[e.layout]]:"2px",right:"2px",bottom:"2px",borderRadius:"4px"}))),v=(0,n.Fl)((()=>{const t=e.ratio,l=e.clientSize;if(t>=100)return Number.POSITIVE_INFINITY;if(t>=50)return t*l/100;const n=l/3;return Math.floor(Math.min(Math.max(t*l,de),n))})),m=(0,n.Fl)((()=>{if(!Number.isFinite(v.value))return{display:"none"};const t=`${v.value}px`,l=De({bar:p.value,size:t,move:c.traveled},e.layout);return l})),g=(0,n.Fl)((()=>Math.floor(e.clientSize-v.value-(0,a.SU)(l)))),y=()=>{window.addEventListener("mousemove",S),window.addEventListener("mouseup",w);const e=(0,a.SU)(i);e&&(u=document.onselectstart,document.onselectstart=()=>!1,e.addEventListener("touchmove",S),e.addEventListener("touchend",w))},b=()=>{window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",w),document.onselectstart=u,u=null;const e=(0,a.SU)(i);e&&(e.removeEventListener("touchmove",S),e.removeEventListener("touchend",w))},C=e=>{e.stopImmediatePropagation(),e.ctrlKey||[1,2].includes(e.button)||(c.isDragging=!0,c[p.value.axis]=e.currentTarget[p.value.offset]-(e[p.value.client]-e.currentTarget.getBoundingClientRect()[p.value.direction]),t("start-move"),y())},w=()=>{c.isDragging=!1,c[p.value.axis]=0,t("stop-move"),b()},S=l=>{const{isDragging:n}=c;if(!n)return;if(!i.value||!s.value)return;const o=c[p.value.axis];if(!o)return;pe(d);const a=-1*(s.value.getBoundingClientRect()[p.value.direction]-l[p.value.client]),r=i.value[p.value.offset]-o,u=a-r;d=ce((()=>{c.traveled=Math.max(e.startGap,Math.min(u,g.value)),t("scroll",u,g.value)}))},k=e=>{const l=Math.abs(e.target.getBoundingClientRect()[p.value.direction]-e[p.value.client]),n=i.value[p.value.offset]/2,o=l-n;c.traveled=Math.max(0,Math.min(o,g.value)),t("scroll",o,g.value)};return(0,n.YP)((()=>e.scrollFrom),(e=>{c.isDragging||(c.traveled=Math.ceil(e*g.value))})),(0,n.Jd)((()=>{b()})),()=>(0,n.h)("div",{role:"presentation",ref:s,class:[o.b(),e.class,(e.alwaysOn||c.isDragging)&&"always-on"],style:f.value,onMousedown:(0,H.iM)(k,["stop","prevent"]),onTouchstartPrevent:C},(0,n.h)("div",{ref:i,class:r.e("thumb"),style:m.value,onMousedown:C},[]))}});var Oe=l(48743);const Ke=({name:e,getOffset:t,getItemSize:l,getItemOffset:o,getEstimatedTotalSize:r,getStartIndexForOffset:s,getStopIndexForStartIndex:i,initCache:d,clearCache:u,validateProps:c})=>(0,n.aZ)({name:null!=e?e:"ElVirtualList",props:xe,emits:[z,V],setup(e,{emit:p,expose:h}){c(e);const f=(0,n.FN)(),v=(0,R.s3)("vl"),m=(0,a.iH)(d(e,f)),g=j(),y=(0,a.iH)(),b=(0,a.iH)(),C=(0,a.iH)(),w=(0,a.iH)({isScrolling:!1,scrollDir:"forward",scrollOffset:(0,Oe.hj)(e.initScrollOffset)?e.initScrollOffset:0,updateRequested:!1,isScrollbarDragging:!1,scrollbarAlwaysOn:e.scrollbarAlwaysOn}),S=(0,n.Fl)((()=>{const{total:t,cache:l}=e,{isScrolling:n,scrollDir:o,scrollOffset:r}=(0,a.SU)(w);if(0===t)return[0,0,0,0];const d=s(e,r,(0,a.SU)(m)),u=i(e,d,r,(0,a.SU)(m)),c=n&&o!==Z?1:Math.max(1,l),p=n&&o!==Y?1:Math.max(1,l);return[Math.max(0,d-c),Math.max(0,Math.min(t-1,u+p)),d,u]})),k=(0,n.Fl)((()=>r(e,(0,a.SU)(m)))),x=(0,n.Fl)((()=>He(e.layout))),N=(0,n.Fl)((()=>[{position:"relative",["overflow-"+(x.value?"x":"y")]:"scroll",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:e.direction,height:(0,Oe.hj)(e.height)?`${e.height}px`:e.height,width:(0,Oe.hj)(e.width)?`${e.width}px`:e.width},e.style])),E=(0,n.Fl)((()=>{const e=(0,a.SU)(k),t=(0,a.SU)(x);return{height:t?"100%":`${e}px`,pointerEvents:(0,a.SU)(w).isScrolling?"none":void 0,width:t?`${e}px`:"100%"}})),F=(0,n.Fl)((()=>x.value?e.width:e.height)),{onWheel:_}=ve({atStartEdge:(0,n.Fl)((()=>w.value.scrollOffset<=0)),atEndEdge:(0,n.Fl)((()=>w.value.scrollOffset>=k.value)),layout:(0,n.Fl)((()=>e.layout))},(e=>{var t,l;null==(l=(t=C.value).onMouseUp)||l.call(t),O(Math.min(w.value.scrollOffset+e,k.value-F.value))})),H=()=>{const{total:t}=e;if(t>0){const[e,t,l,n]=(0,a.SU)(S);p(z,e,t,l,n)}const{scrollDir:l,scrollOffset:n,updateRequested:o}=(0,a.SU)(w);p(V,l,n,o)},T=e=>{const{clientHeight:t,scrollHeight:l,scrollTop:o}=e.currentTarget,r=(0,a.SU)(w);if(r.scrollOffset===o)return;const s=Math.max(0,Math.min(o,l-t));w.value={...r,isScrolling:!0,scrollDir:_e(r.scrollOffset,s),scrollOffset:s,updateRequested:!1},(0,n.Y3)($)},M=t=>{const{clientWidth:l,scrollLeft:o,scrollWidth:r}=t.currentTarget,s=(0,a.SU)(w);if(s.scrollOffset===o)return;const{direction:i}=e;let d=o;if(i===oe)switch(Me()){case ae:d=-o;break;case se:d=r-l-o;break}d=Math.max(0,Math.min(d,r-l)),w.value={...s,isScrolling:!0,scrollDir:_e(s.scrollOffset,d),scrollOffset:d,updateRequested:!1},(0,n.Y3)($)},D=e=>{(0,a.SU)(x)?M(e):T(e),H()},A=(e,t)=>{const l=(k.value-F.value)/t*e;O(Math.min(k.value-F.value,l))},O=e=>{e=Math.max(e,0),e!==(0,a.SU)(w).scrollOffset&&(w.value={...(0,a.SU)(w),scrollOffset:e,scrollDir:_e((0,a.SU)(w).scrollOffset,e),updateRequested:!0},(0,n.Y3)($))},K=(l,n=J)=>{const{scrollOffset:o}=(0,a.SU)(w);l=Math.max(0,Math.min(l,e.total-1)),O(t(e,l,n,o,(0,a.SU)(m)))},L=t=>{const{direction:n,itemSize:r,layout:s}=e,i=g.value(u&&r,u&&s,u&&n);let d;if((0,U.RI)(i,String(t)))d=i[t];else{const r=o(e,t,(0,a.SU)(m)),s=l(e,t,(0,a.SU)(m)),u=(0,a.SU)(x),c=n===oe,p=u?r:0;i[t]=d={position:"absolute",left:c?void 0:`${p}px`,right:c?`${p}px`:void 0,top:u?0:`${r}px`,height:u?"100%":`${s}px`,width:u?`${s}px`:"100%"}}return d},$=()=>{w.value.isScrolling=!1,(0,n.Y3)((()=>{g.value(-1,null,null)}))},W=()=>{const e=y.value;e&&(e.scrollTop=0)};(0,n.bv)((()=>{if(!ue.C5)return;const{initScrollOffset:t}=e,l=(0,a.SU)(y);(0,Oe.hj)(t)&&l&&((0,a.SU)(x)?l.scrollLeft=t:l.scrollTop=t),H()})),(0,n.ic)((()=>{const{direction:t,layout:l}=e,{scrollOffset:n,updateRequested:o}=(0,a.SU)(w),r=(0,a.SU)(y);if(o&&r)if(l===te)if(t===oe)switch(Me()){case ae:r.scrollLeft=-n;break;case re:r.scrollLeft=n;break;default:{const{clientWidth:e,scrollWidth:t}=r;r.scrollLeft=t-e-n;break}}else r.scrollLeft=n;else r.scrollTop=n}));const I={ns:v,clientSize:F,estimatedTotalSize:k,windowStyle:N,windowRef:y,innerRef:b,innerStyle:E,itemsToRender:S,scrollbarRef:C,states:w,getItemStyle:L,onScroll:D,onScrollbarScroll:A,onWheel:_,scrollTo:O,scrollToItem:K,resetScrollTop:W};return h({windowRef:y,innerRef:b,getItemStyleCache:g,scrollTo:O,scrollToItem:K,resetScrollTop:W,states:w}),I},render(e){var t;const{$slots:l,className:o,clientSize:a,containerElement:r,data:s,getItemStyle:i,innerElement:d,itemsToRender:u,innerStyle:c,layout:p,total:h,onScroll:f,onScrollbarScroll:v,onWheel:m,states:g,useIsScrolling:y,windowStyle:b,ns:C}=e,[w,S]=u,k=(0,n.LL)(r),x=(0,n.LL)(d),N=[];if(h>0)for(let n=w;n<=S;n++)N.push(null==(t=l.default)?void 0:t.call(l,{data:s,key:n,index:n,isScrolling:y?g.isScrolling:void 0,style:i(n)}));const E=[(0,n.h)(x,{style:c,ref:"innerRef"},(0,U.HD)(x)?N:{default:()=>N})],F=(0,n.h)(Ae,{ref:"scrollbarRef",clientSize:a,layout:p,onScroll:v,ratio:100*a/this.estimatedTotalSize,scrollFrom:g.scrollOffset/(this.estimatedTotalSize-a),total:h}),_=(0,n.h)(k,{class:[C.e("window"),o],style:b,onScroll:f,onWheel:m,ref:"windowRef",key:0},(0,U.HD)(k)?[E]:{default:()=>[E]});return(0,n.h)("div",{key:0,class:[C.e("wrapper"),g.scrollbarAlwaysOn?"always-on":""]},[_,F])}}),Le=Ke({name:"ElFixedSizeList",getItemOffset:({itemSize:e},t)=>t*e,getItemSize:({itemSize:e})=>e,getEstimatedTotalSize:({total:e,itemSize:t})=>t*e,getOffset:({height:e,total:t,itemSize:l,layout:n,width:o},a,r,s)=>{const i=He(n)?o:e;const d=Math.max(0,t*l-i),u=Math.min(d,a*l),c=Math.max(0,(a+1)*l-i);switch(r===G&&(r=s>=c-i&&s<=u+i?J:Q),r){case X:return u;case ee:return c;case Q:{const e=Math.round(c+(u-c)/2);return e<Math.ceil(i/2)?0:e>d+Math.floor(i/2)?d:e}case J:default:return s>=c&&s<=u?s:s<c?c:u}},getStartIndexForOffset:({total:e,itemSize:t},l)=>Math.max(0,Math.min(e-1,Math.floor(l/t))),getStopIndexForStartIndex:({height:e,total:t,itemSize:l,layout:n,width:o},a,r)=>{const s=a*l,i=He(n)?o:e,d=Math.ceil((i+r-s)/l);return Math.max(0,Math.min(t-1,a+d-1))},initCache(){},clearCache:!0,validateProps(){}}),$e=(0,n.aZ)({name:"ElTreeV2"}),We=(0,n.aZ)({...$e,props:f,emits:x,setup(e,{expose:t,emit:l}){const r=e,s=(0,n.Rr)(),i=(0,n.Fl)((()=>r.itemSize));(0,n.JJ)(d,{ctx:{emit:l,slots:s},props:r,instance:(0,n.FN)()}),(0,n.JJ)(I.K,void 0);const{t:u}=(0,P.bU)(),c=(0,R.s3)("tree"),{flattenTree:p,isNotEmpty:h,toggleExpand:f,isExpanded:v,isIndeterminate:m,isChecked:g,isDisabled:y,isCurrent:b,isForceHiddenExpandIcon:C,handleNodeClick:w,handleNodeCheck:S,toggleCheckbox:k,getCurrentNode:x,getCurrentKey:N,setCurrentKey:E,getCheckedKeys:U,getCheckedNodes:F,getHalfCheckedKeys:H,getHalfCheckedNodes:T,setChecked:M,setCheckedKeys:D,filter:A,setData:O,getNode:K,expandNode:L,collapseNode:$,setExpandedKeys:B}=_(r,l);return t({toggleCheckbox:k,getCurrentNode:x,getCurrentKey:N,setCurrentKey:E,getCheckedKeys:U,getCheckedNodes:F,getHalfCheckedKeys:H,getHalfCheckedNodes:T,setChecked:M,setCheckedKeys:D,filter:A,setData:O,getNode:K,expandNode:L,collapseNode:$,setExpandedKeys:B}),(e,t)=>{var l;return(0,n.wg)(),(0,n.iD)("div",{class:(0,o.C_)([(0,a.SU)(c).b(),{[(0,a.SU)(c).m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[(0,a.SU)(h)?((0,n.wg)(),(0,n.j4)((0,a.SU)(Le),{key:0,"class-name":(0,a.SU)(c).b("virtual-list"),data:(0,a.SU)(p),total:(0,a.SU)(p).length,height:e.height,"item-size":(0,a.SU)(i),"perf-mode":e.perfMode},{default:(0,n.w5)((({data:t,index:l,style:r})=>[((0,n.wg)(),(0,n.j4)(W,{key:t[l].key,style:(0,o.j5)(r),node:t[l],expanded:(0,a.SU)(v)(t[l]),"show-checkbox":e.showCheckbox,checked:(0,a.SU)(g)(t[l]),indeterminate:(0,a.SU)(m)(t[l]),"item-size":(0,a.SU)(i),disabled:(0,a.SU)(y)(t[l]),current:(0,a.SU)(b)(t[l]),"hidden-expand-icon":(0,a.SU)(C)(t[l]),onClick:(0,a.SU)(w),onToggle:(0,a.SU)(f),onCheck:(0,a.SU)(S)},null,8,["style","node","expanded","show-checkbox","checked","indeterminate","item-size","disabled","current","hidden-expand-icon","onClick","onToggle","onCheck"]))])),_:1},8,["class-name","data","total","height","item-size","perf-mode"])):((0,n.wg)(),(0,n.iD)("div",{key:1,class:(0,o.C_)((0,a.SU)(c).e("empty-block"))},[(0,n._)("span",{class:(0,o.C_)((0,a.SU)(c).e("empty-text"))},(0,o.zw)(null!=(l=e.emptyText)?l:(0,a.SU)(u)("el.tree.emptyText")),3)],2))],2)}}});var Ie=(0,O.Z)(We,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree-v2/src/tree.vue"]]),Pe=l(82134);const Be=(0,Pe.nz)(Ie)},48786:function(e,t,l){l(17388),l(5726),l(53253),l(34992),l(91715)},87516:function(e,t,l){l.d(t,{y:function(){return z},Z:function(){return j}});var n=l(53321),o=l(73745),a=l(53399),r=l(20162);const s="$treeNodeId",i=function(e,t){t&&!t[s]&&Object.defineProperty(t,s,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},d=function(e,t){return e?t[e]:t[s]},u=(e,t,l)=>{const n=e.value.currentNode;l();const o=e.value.currentNode;n!==o&&t("current-change",o?o.data:null,o)};var c=l(73285);const p=e=>{let t=!0,l=!0,n=!0;for(let o=0,a=e.length;o<a;o++){const a=e[o];(!0!==a.checked||a.indeterminate)&&(t=!1,a.disabled||(n=!1)),(!1!==a.checked||a.indeterminate)&&(l=!1)}return{all:t,none:l,allWithoutDisable:n,half:!t&&!l}},h=function(e){if(0===e.childNodes.length||e.loading)return;const{all:t,none:l,half:n}=p(e.childNodes);t?(e.checked=!0,e.indeterminate=!1):n?(e.checked=!1,e.indeterminate=!0):l&&(e.checked=!1,e.indeterminate=!1);const o=e.parent;o&&0!==o.level&&(e.store.checkStrictly||h(o))},f=function(e,t){const l=e.store.props,n=e.data||{},o=l[t];if("function"===typeof o)return o(n,e);if("string"===typeof o)return n[o];if("undefined"===typeof o){const e=n[t];return void 0===e?"":e}};let v=0;class m{constructor(e){this.id=v++,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 t in e)(0,c.RI)(e,t)&&(this[t]=e[t]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){const e=this.store;if(!e)throw new Error("[Node]store is required!");e.registerNode(this);const t=e.props;if(t&&"undefined"!==typeof t.isLeaf){const e=f(this,"isLeaf");"boolean"===typeof e&&(this.isLeafByUser=e)}if(!0!==e.lazy&&this.data?(this.setData(this.data),e.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&e.lazy&&e.defaultExpandAll&&this.expand(),Array.isArray(this.data)||i(this,this.data),!this.data)return;const l=e.defaultExpandedKeys,n=e.key;n&&l&&l.includes(this.key)&&this.expand(null,e.autoExpandParent),n&&void 0!==e.currentNodeKey&&this.key===e.currentNodeKey&&(e.currentNode=this,e.currentNode.isCurrent=!0),e.lazy&&e._initDefaultCheckedNode(this),this.updateLeafState(),!this.parent||1!==this.level&&!0!==this.parent.expanded||(this.canFocus=!0)}setData(e){let t;Array.isArray(e)||i(this,e),this.data=e,this.childNodes=[],t=0===this.level&&Array.isArray(this.data)?this.data:f(this,"children")||[];for(let l=0,n=t.length;l<n;l++)this.insertChild({data:t[l]})}get label(){return f(this,"label")}get key(){const e=this.store.key;return this.data?this.data[e]:null}get disabled(){return f(this,"disabled")}get nextSibling(){const e=this.parent;if(e){const t=e.childNodes.indexOf(this);if(t>-1)return e.childNodes[t+1]}return null}get previousSibling(){const e=this.parent;if(e){const t=e.childNodes.indexOf(this);if(t>-1)return t>0?e.childNodes[t-1]:null}return null}contains(e,t=!0){return(this.childNodes||[]).some((l=>l===e||t&&l.contains(e)))}remove(){const e=this.parent;e&&e.removeChild(this)}insertChild(e,t,l){if(!e)throw new Error("InsertChild error: child is required.");if(!(e instanceof m)){if(!l){const l=this.getChildren(!0);l.includes(e.data)||("undefined"===typeof t||t<0?l.push(e.data):l.splice(t,0,e.data))}Object.assign(e,{parent:this,store:this.store}),e=(0,o.qj)(new m(e)),e instanceof m&&e.initialize()}e.level=this.level+1,"undefined"===typeof t||t<0?this.childNodes.push(e):this.childNodes.splice(t,0,e),this.updateLeafState()}insertBefore(e,t){let l;t&&(l=this.childNodes.indexOf(t)),this.insertChild(e,l)}insertAfter(e,t){let l;t&&(l=this.childNodes.indexOf(t),-1!==l&&(l+=1)),this.insertChild(e,l)}removeChild(e){const t=this.getChildren()||[],l=t.indexOf(e.data);l>-1&&t.splice(l,1);const n=this.childNodes.indexOf(e);n>-1&&(this.store&&this.store.deregisterNode(e),e.parent=null,this.childNodes.splice(n,1)),this.updateLeafState()}removeChildByData(e){let t=null;for(let l=0;l<this.childNodes.length;l++)if(this.childNodes[l].data===e){t=this.childNodes[l];break}t&&this.removeChild(t)}expand(e,t){const l=()=>{if(t){let e=this.parent;while(e.level>0)e.expanded=!0,e=e.parent}this.expanded=!0,e&&e(),this.childNodes.forEach((e=>{e.canFocus=!0}))};this.shouldLoadData()?this.loadData((e=>{Array.isArray(e)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||h(this),l())})):l()}doCreateChildren(e,t={}){e.forEach((e=>{this.insertChild(Object.assign({data:e},t),void 0,!0)}))}collapse(){this.expanded=!1,this.childNodes.forEach((e=>{e.canFocus=!1}))}shouldLoadData(){return!0===this.store.lazy&&this.store.load&&!this.loaded}updateLeafState(){if(!0===this.store.lazy&&!0!==this.loaded&&"undefined"!==typeof this.isLeafByUser)return void(this.isLeaf=this.isLeafByUser);const e=this.childNodes;!this.store.lazy||!0===this.store.lazy&&!0===this.loaded?this.isLeaf=!e||0===e.length:this.isLeaf=!1}setChecked(e,t,l,n){if(this.indeterminate="half"===e,this.checked=!0===e,this.store.checkStrictly)return;if(!this.shouldLoadData()||this.store.checkDescendants){const{all:l,allWithoutDisable:o}=p(this.childNodes);this.isLeaf||l||!o||(this.checked=!1,e=!1);const a=()=>{if(t){const l=this.childNodes;for(let r=0,s=l.length;r<s;r++){const o=l[r];n=n||!1!==e;const a=o.disabled?o.checked:n;o.setChecked(a,t,!0,n)}const{half:o,all:a}=p(l);a||(this.checked=a,this.indeterminate=o)}};if(this.shouldLoadData())return void this.loadData((()=>{a(),h(this)}),{checked:!1!==e});a()}const o=this.parent;o&&0!==o.level&&(l||h(o))}getChildren(e=!1){if(0===this.level)return this.data;const t=this.data;if(!t)return null;const l=this.store.props;let n="children";return l&&(n=l.children||"children"),void 0===t[n]&&(t[n]=null),e&&!t[n]&&(t[n]=[]),t[n]}updateChildren(){const e=this.getChildren()||[],t=this.childNodes.map((e=>e.data)),l={},n=[];e.forEach(((e,o)=>{const a=e[s],r=!!a&&t.findIndex((e=>e[s]===a))>=0;r?l[a]={index:o,data:e}:n.push({index:o,data:e})})),this.store.lazy||t.forEach((e=>{l[e[s]]||this.removeChildByData(e)})),n.forEach((({index:e,data:t})=>{this.insertChild({data:t},e)})),this.updateLeafState()}loadData(e,t={}){if(!0!==this.store.lazy||!this.store.load||this.loaded||this.loading&&!Object.keys(t).length)e&&e.call(this);else{this.loading=!0;const l=l=>{this.childNodes=[],this.doCreateChildren(l,t),this.loaded=!0,this.loading=!1,this.updateLeafState(),e&&e.call(this,l)};this.store.load(this,l)}}}class g{constructor(e){this.currentNode=null,this.currentNodeKey=null;for(const t in e)(0,c.RI)(e,t)&&(this[t]=e[t]);this.nodesMap={}}initialize(){if(this.root=new m({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const e=this.load;e(this.root,(e=>{this.root.doCreateChildren(e),this._initDefaultCheckedNodes()}))}else this._initDefaultCheckedNodes()}filter(e){const t=this.filterNodeMethod,l=this.lazy,n=function(o){const a=o.root?o.root.childNodes:o.childNodes;if(a.forEach((l=>{l.visible=t.call(l,e,l.data,l),n(l)})),!o.visible&&a.length){let e=!0;e=!a.some((e=>e.visible)),o.root?o.root.visible=!1===e:o.visible=!1===e}e&&(!o.visible||o.isLeaf||l||o.expand())};n(this)}setData(e){const t=e!==this.root.data;t?(this.root.setData(e),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(e){if(e instanceof m)return e;const t=(0,c.Kn)(e)?d(this.key,e):e;return this.nodesMap[t]||null}insertBefore(e,t){const l=this.getNode(t);l.parent.insertBefore({data:e},l)}insertAfter(e,t){const l=this.getNode(t);l.parent.insertAfter({data:e},l)}remove(e){const t=this.getNode(e);t&&t.parent&&(t===this.currentNode&&(this.currentNode=null),t.parent.removeChild(t))}append(e,t){const l=t?this.getNode(t):this.root;l&&l.insertChild({data:e})}_initDefaultCheckedNodes(){const e=this.defaultCheckedKeys||[],t=this.nodesMap;e.forEach((e=>{const l=t[e];l&&l.setChecked(!0,!this.checkStrictly)}))}_initDefaultCheckedNode(e){const t=this.defaultCheckedKeys||[];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){const t=e.key;void 0!==t&&(this.nodesMap[e.key]=e)}else this.nodesMap[e.id]=e}deregisterNode(e){const t=this.key;t&&e&&e.data&&(e.childNodes.forEach((e=>{this.deregisterNode(e)})),delete this.nodesMap[e.key])}getCheckedNodes(e=!1,t=!1){const l=[],n=function(o){const a=o.root?o.root.childNodes:o.childNodes;a.forEach((o=>{(o.checked||t&&o.indeterminate)&&(!e||e&&o.isLeaf)&&l.push(o.data),n(o)}))};return n(this),l}getCheckedKeys(e=!1){return this.getCheckedNodes(e).map((e=>(e||{})[this.key]))}getHalfCheckedNodes(){const e=[],t=function(l){const n=l.root?l.root.childNodes:l.childNodes;n.forEach((l=>{l.indeterminate&&e.push(l.data),t(l)}))};return t(this),e}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map((e=>(e||{})[this.key]))}_getAllNodes(){const e=[],t=this.nodesMap;for(const l in t)(0,c.RI)(t,l)&&e.push(t[l]);return e}updateChildren(e,t){const l=this.nodesMap[e];if(!l)return;const n=l.childNodes;for(let o=n.length-1;o>=0;o--){const e=n[o];this.remove(e.data)}for(let o=0,a=t.length;o<a;o++){const e=t[o];this.append(e,l.data)}}_setCheckedKeys(e,t=!1,l){const n=this._getAllNodes().sort(((e,t)=>t.level-e.level)),o=Object.create(null),a=Object.keys(l);n.forEach((e=>e.setChecked(!1,!1)));for(let r=0,s=n.length;r<s;r++){const l=n[r],s=l.data[e].toString(),i=a.includes(s);if(!i){l.checked&&!o[s]&&l.setChecked(!1,!1);continue}let d=l.parent;while(d&&d.level>0)o[d.data[e]]=!0,d=d.parent;if(l.isLeaf||this.checkStrictly)l.setChecked(!0,!1);else if(l.setChecked(!0,!0),t){l.setChecked(!1,!1);const e=function(t){const l=t.childNodes;l.forEach((t=>{t.isLeaf||t.setChecked(!1,!1),e(t)}))};e(l)}}}setCheckedNodes(e,t=!1){const l=this.key,n={};e.forEach((e=>{n[(e||{})[l]]=!0})),this._setCheckedKeys(l,t,n)}setCheckedKeys(e,t=!1){this.defaultCheckedKeys=e;const l=this.key,n={};e.forEach((e=>{n[e]=!0})),this._setCheckedKeys(l,t,n)}setDefaultExpandedKeys(e){e=e||[],this.defaultExpandedKeys=e,e.forEach((e=>{const t=this.getNode(e);t&&t.expand(null,this.autoExpandParent)}))}setChecked(e,t,l){const n=this.getNode(e);n&&n.setChecked(!!t,l)}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){const l=e[this.key],n=this.nodesMap[l];this.setCurrentNode(n),t&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(e,t=!0){if(null===e||void 0===e)return this.currentNode&&(this.currentNode.isCurrent=!1),void(this.currentNode=null);const l=this.getNode(e);l&&(this.setCurrentNode(l),t&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}var y=l(23263),b=l(3389),C=l(64310),w=l(26227),S=l(56490),k=l(23256);const x=(0,n.aZ)({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=(0,k.s3)("tree"),l=(0,n.f3)("NodeInstance"),o=(0,n.f3)("RootTree");return()=>{const a=e.node,{data:r,store:s}=a;return e.renderContent?e.renderContent(n.h,{_self:l,node:a,data:r,store:s}):o.ctx.slots.default?o.ctx.slots.default({node:a,data:r}):(0,n.h)("span",{class:t.be("node","label")},[a.label])}}});var N=(0,S.Z)(x,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node-content.vue"]]);function E(e){const t=(0,n.f3)("TreeNodeMap",null),l={treeNodeExpand:t=>{e.node!==t&&e.node.collapse()},children:[]};return t&&t.children.push(l),(0,n.JJ)("TreeNodeMap",l),{broadcastExpanded:t=>{if(e.accordion)for(const e of l.children)e.treeNodeExpand(t)}}}var U=l(37461);const F=Symbol("dragEvents");function _({props:e,ctx:t,el$:l,dropIndicator$:a,store:r}){const s=(0,k.s3)("tree"),i=(0,o.iH)({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null}),d=({event:l,treeNode:n})=>{if("function"===typeof e.allowDrag&&!e.allowDrag(n.node))return l.preventDefault(),!1;l.dataTransfer.effectAllowed="move";try{l.dataTransfer.setData("text/plain","")}catch(o){}i.value.draggingNode=n,t.emit("node-drag-start",n.node,l)},u=({event:n,treeNode:o})=>{const r=o,d=i.value.dropNode;d&&d.node.id!==r.node.id&&(0,U.IV)(d.$el,s.is("drop-inner"));const u=i.value.draggingNode;if(!u||!r)return;let c=!0,p=!0,h=!0,f=!0;"function"===typeof e.allowDrop&&(c=e.allowDrop(u.node,r.node,"prev"),f=p=e.allowDrop(u.node,r.node,"inner"),h=e.allowDrop(u.node,r.node,"next")),n.dataTransfer.dropEffect=p||c||h?"move":"none",(c||p||h)&&(null==d?void 0:d.node.id)!==r.node.id&&(d&&t.emit("node-drag-leave",u.node,d.node,n),t.emit("node-drag-enter",u.node,r.node,n)),(c||p||h)&&(i.value.dropNode=r),r.node.nextSibling===u.node&&(h=!1),r.node.previousSibling===u.node&&(c=!1),r.node.contains(u.node,!1)&&(p=!1),(u.node===r.node||u.node.contains(r.node))&&(c=!1,p=!1,h=!1);const v=r.$el.querySelector(`.${s.be("node","content")}`).getBoundingClientRect(),m=l.value.getBoundingClientRect();let g;const y=c?p?.25:h?.45:1:-1,b=h?p?.75:c?.55:0:1;let C=-9999;const w=n.clientY-v.top;g=w<v.height*y?"before":w>v.height*b?"after":p?"inner":"none";const S=r.$el.querySelector(`.${s.be("node","expand-icon")}`).getBoundingClientRect(),k=a.value;"before"===g?C=S.top-m.top:"after"===g&&(C=S.bottom-m.top),k.style.top=`${C}px`,k.style.left=S.right-m.left+"px","inner"===g?(0,U.cn)(r.$el,s.is("drop-inner")):(0,U.IV)(r.$el,s.is("drop-inner")),i.value.showDropIndicator="before"===g||"after"===g,i.value.allowDrop=i.value.showDropIndicator||f,i.value.dropType=g,t.emit("node-drag-over",u.node,r.node,n)},c=e=>{const{draggingNode:l,dropType:n,dropNode:o}=i.value;if(e.preventDefault(),e.dataTransfer.dropEffect="move",l&&o){const a={data:l.node.data};"none"!==n&&l.node.remove(),"before"===n?o.node.parent.insertBefore(a,o.node):"after"===n?o.node.parent.insertAfter(a,o.node):"inner"===n&&o.node.insertChild(a),"none"!==n&&r.value.registerNode(a),(0,U.IV)(o.$el,s.is("drop-inner")),t.emit("node-drag-end",l.node,o.node,n,e),"none"!==n&&t.emit("node-drop",l.node,o.node,n,e)}l&&!o&&t.emit("node-drag-end",l.node,null,n,e),i.value.showDropIndicator=!1,i.value.draggingNode=null,i.value.dropNode=null,i.value.allowDrop=!0};return(0,n.JJ)(F,{treeNodeDragStart:d,treeNodeDragOver:u,treeNodeDragEnd:c}),{dragState:i}}var H=l(2641);const T=(0,n.aZ)({name:"ElTreeNode",components:{ElCollapseTransition:y.Z,ElCheckbox:b.ElCheckbox,NodeContent:N,ElIcon:C.gn,Loading:w.gbz},props:{node:{type:m,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(e,t){const l=(0,k.s3)("tree"),{broadcastExpanded:a}=E(e),r=(0,n.f3)("RootTree"),s=(0,o.iH)(!1),i=(0,o.iH)(!1),p=(0,o.iH)(null),h=(0,o.iH)(null),f=(0,o.iH)(null),v=(0,n.f3)(F),m=(0,n.FN)();(0,n.JJ)("NodeInstance",m),r||(0,H.N)("Tree","Can not find node's tree."),e.node.expanded&&(s.value=!0,i.value=!0);const g=r.props["children"]||"children";(0,n.YP)((()=>{const t=e.node.data[g];return t&&[...t]}),(()=>{e.node.updateChildren()})),(0,n.YP)((()=>e.node.indeterminate),(t=>{C(e.node.checked,t)})),(0,n.YP)((()=>e.node.checked),(t=>{C(t,e.node.indeterminate)})),(0,n.YP)((()=>e.node.expanded),(e=>{(0,n.Y3)((()=>s.value=e)),e&&(i.value=!0)}));const y=e=>d(r.props.nodeKey,e.data),b=t=>{const l=e.props.class;if(!l)return{};let n;if((0,c.mf)(l)){const{data:e}=t;n=l(e,t)}else n=l;return(0,c.HD)(n)?{[n]:!0}:n},C=(t,l)=>{p.value===t&&h.value===l||r.ctx.emit("check-change",e.node.data,t,l),p.value=t,h.value=l},S=t=>{u(r.store,r.ctx.emit,(()=>r.store.value.setCurrentNode(e.node))),r.currentNode.value=e.node,r.props.expandOnClickNode&&N(),r.props.checkOnClickNode&&!e.node.disabled&&U(null,{target:{checked:!e.node.checked}}),r.ctx.emit("node-click",e.node.data,e.node,m,t)},x=t=>{r.instance.vnode.props["onNodeContextmenu"]&&(t.stopPropagation(),t.preventDefault()),r.ctx.emit("node-contextmenu",t,e.node.data,e.node,m)},N=()=>{e.node.isLeaf||(s.value?(r.ctx.emit("node-collapse",e.node.data,e.node,m),e.node.collapse()):(e.node.expand(),t.emit("node-expand",e.node.data,e.node,m)))},U=(t,l)=>{e.node.setChecked(l.target.checked,!r.props.checkStrictly),(0,n.Y3)((()=>{const t=r.store.value;r.ctx.emit("check",e.node.data,{checkedNodes:t.getCheckedNodes(),checkedKeys:t.getCheckedKeys(),halfCheckedNodes:t.getHalfCheckedNodes(),halfCheckedKeys:t.getHalfCheckedKeys()})}))},_=(e,t,l)=>{a(t),r.ctx.emit("node-expand",e,t,l)},T=t=>{r.props.draggable&&v.treeNodeDragStart({event:t,treeNode:e})},M=t=>{t.preventDefault(),r.props.draggable&&v.treeNodeDragOver({event:t,treeNode:{$el:f.value,node:e.node}})},D=e=>{e.preventDefault()},R=e=>{r.props.draggable&&v.treeNodeDragEnd(e)};return{ns:l,node$:f,tree:r,expanded:s,childNodeRendered:i,oldChecked:p,oldIndeterminate:h,getNodeKey:y,getNodeClass:b,handleSelectChange:C,handleClick:S,handleContextMenu:x,handleExpandIconClick:N,handleCheckChange:U,handleChildNodeExpand:_,handleDragStart:T,handleDragOver:M,handleDrop:D,handleDragEnd:R,CaretRight:w.TZ}}}),M=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],D=["aria-expanded"];function R(e,t,l,o,s,i){const d=(0,n.up)("el-icon"),u=(0,n.up)("el-checkbox"),c=(0,n.up)("loading"),p=(0,n.up)("node-content"),h=(0,n.up)("el-tree-node"),f=(0,n.up)("el-collapse-transition");return(0,n.wy)(((0,n.wg)(),(0,n.iD)("div",{ref:"node$",class:(0,a.C_)([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[1]||(t[1]=(0,r.iM)(((...t)=>e.handleClick&&e.handleClick(...t)),["stop"])),onContextmenu:t[2]||(t[2]=(...t)=>e.handleContextMenu&&e.handleContextMenu(...t)),onDragstart:t[3]||(t[3]=(0,r.iM)(((...t)=>e.handleDragStart&&e.handleDragStart(...t)),["stop"])),onDragover:t[4]||(t[4]=(0,r.iM)(((...t)=>e.handleDragOver&&e.handleDragOver(...t)),["stop"])),onDragend:t[5]||(t[5]=(0,r.iM)(((...t)=>e.handleDragEnd&&e.handleDragEnd(...t)),["stop"])),onDrop:t[6]||(t[6]=(0,r.iM)(((...t)=>e.handleDrop&&e.handleDrop(...t)),["stop"]))},[(0,n._)("div",{class:(0,a.C_)(e.ns.be("node","content")),style:(0,a.j5)({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?((0,n.wg)(),(0,n.j4)(d,{key:0,class:(0,a.C_)([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:(0,r.iM)(e.handleExpandIconClick,["stop"])},{default:(0,n.w5)((()=>[((0,n.wg)(),(0,n.j4)((0,n.LL)(e.tree.props.icon||e.CaretRight)))])),_:1},8,["class","onClick"])):(0,n.kq)("v-if",!0),e.showCheckbox?((0,n.wg)(),(0,n.j4)(u,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:t[0]||(t[0]=(0,r.iM)((()=>{}),["stop"])),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):(0,n.kq)("v-if",!0),e.node.loading?((0,n.wg)(),(0,n.j4)(d,{key:2,class:(0,a.C_)([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:(0,n.w5)((()=>[(0,n.Wm)(c)])),_:1},8,["class"])):(0,n.kq)("v-if",!0),(0,n.Wm)(p,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),(0,n.Wm)(f,null,{default:(0,n.w5)((()=>[!e.renderAfterExpand||e.childNodeRendered?(0,n.wy)(((0,n.wg)(),(0,n.iD)("div",{key:0,class:(0,a.C_)(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded},[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.node.childNodes,(t=>((0,n.wg)(),(0,n.j4)(h,{key:e.getNodeKey(t),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:t,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"])))),128))],10,D)),[[r.F8,e.expanded]]):(0,n.kq)("v-if",!0)])),_:1})],42,M)),[[r.F8,e.node.visible]])}var A=(0,S.Z)(T,[["render",R],["__file","/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node.vue"]]),O=l(33255),K=l(11167);function L({el$:e},t){const l=(0,k.s3)("tree"),a=(0,o.XI)([]),r=(0,o.XI)([]);(0,n.bv)((()=>{i()})),(0,n.ic)((()=>{a.value=Array.from(e.value.querySelectorAll("[role=treeitem]")),r.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"))})),(0,n.YP)(r,(e=>{e.forEach((e=>{e.setAttribute("tabindex","-1")}))}));const s=n=>{const o=n.target;if(!o.className.includes(l.b("node")))return;const r=n.code;a.value=Array.from(e.value.querySelectorAll(`.${l.is("focusable")}[role=treeitem]`));const s=a.value.indexOf(o);let i;if([K.EVENT_CODE.up,K.EVENT_CODE.down].includes(r)){if(n.preventDefault(),r===K.EVENT_CODE.up){i=-1===s?0:0!==s?s-1:a.value.length-1;const e=i;while(1){if(t.value.getNode(a.value[i].dataset.key).canFocus)break;if(i--,i===e){i=-1;break}i<0&&(i=a.value.length-1)}}else{i=-1===s?0:s<a.value.length-1?s+1:0;const e=i;while(1){if(t.value.getNode(a.value[i].dataset.key).canFocus)break;if(i++,i===e){i=-1;break}i>=a.value.length&&(i=0)}}-1!==i&&a.value[i].focus()}[K.EVENT_CODE.left,K.EVENT_CODE.right].includes(r)&&(n.preventDefault(),o.click());const d=o.querySelector('[type="checkbox"]');[K.EVENT_CODE.enter,K.EVENT_CODE.space].includes(r)&&d&&(n.preventDefault(),d.click())};(0,O.ORN)(e,"keydown",s);const i=()=>{var t;a.value=Array.from(e.value.querySelectorAll(`.${l.is("focusable")}[role=treeitem]`)),r.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"));const n=e.value.querySelectorAll(`.${l.is("checked")}[role=treeitem]`);n.length?n[0].setAttribute("tabindex","0"):null==(t=a.value[0])||t.setAttribute("tabindex","0")}}var $=l(3886),W=l(36878),I=l(58778);const P=(0,n.aZ)({name:"ElTree",components:{ElTreeNode:A},props:{data:{type:Array,default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:Function,showCheckbox:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:Function,allowDrop:Function,props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:$.AA}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(e,t){const{t:l}=(0,W.bU)(),a=(0,k.s3)("tree"),r=(0,o.iH)(new g({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}));r.value.initialize();const s=(0,o.iH)(r.value.root),i=(0,o.iH)(null),c=(0,o.iH)(null),p=(0,o.iH)(null),{broadcastExpanded:h}=E(e),{dragState:f}=_({props:e,ctx:t,el$:c,dropIndicator$:p,store:r});L({el$:c},r);const v=(0,n.Fl)((()=>{const{childNodes:e}=s.value;return!e||0===e.length||e.every((({visible:e})=>!e))}));(0,n.YP)((()=>e.currentNodeKey),(e=>{r.value.setCurrentNodeKey(e)})),(0,n.YP)((()=>e.defaultCheckedKeys),(e=>{r.value.setDefaultCheckedKey(e)})),(0,n.YP)((()=>e.defaultExpandedKeys),(e=>{r.value.setDefaultExpandedKeys(e)})),(0,n.YP)((()=>e.data),(e=>{r.value.setData(e)}),{deep:!0}),(0,n.YP)((()=>e.checkStrictly),(e=>{r.value.checkStrictly=e}));const m=t=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");r.value.filter(t)},y=t=>d(e.nodeKey,t.data),b=t=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const l=r.value.getNode(t);if(!l)return[];const n=[l.data];let o=l.parent;while(o&&o!==s.value)n.push(o.data),o=o.parent;return n.reverse()},C=(e,t)=>r.value.getCheckedNodes(e,t),w=e=>r.value.getCheckedKeys(e),S=()=>{const e=r.value.getCurrentNode();return e?e.data:null},x=()=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const t=S();return t?t[e.nodeKey]:null},N=(t,l)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");r.value.setCheckedNodes(t,l)},U=(t,l)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");r.value.setCheckedKeys(t,l)},F=(e,t,l)=>{r.value.setChecked(e,t,l)},H=()=>r.value.getHalfCheckedNodes(),T=()=>r.value.getHalfCheckedKeys(),M=(l,n=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");u(r,t.emit,(()=>r.value.setUserCurrentNode(l,n)))},D=(l,n=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");u(r,t.emit,(()=>r.value.setCurrentNodeKey(l,n)))},R=e=>r.value.getNode(e),A=e=>{r.value.remove(e)},O=(e,t)=>{r.value.append(e,t)},K=(e,t)=>{r.value.insertBefore(e,t)},$=(e,t)=>{r.value.insertAfter(e,t)},P=(e,l,n)=>{h(l),t.emit("node-expand",e,l,n)},B=(t,l)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");r.value.updateChildren(t,l)};return(0,n.JJ)("RootTree",{ctx:t,props:e,store:r,root:s,currentNode:i,instance:(0,n.FN)()}),(0,n.JJ)(I.K,void 0),{ns:a,store:r,root:s,currentNode:i,dragState:f,el$:c,dropIndicator$:p,isEmpty:v,filter:m,getNodeKey:y,getNodePath:b,getCheckedNodes:C,getCheckedKeys:w,getCurrentNode:S,getCurrentKey:x,setCheckedNodes:N,setCheckedKeys:U,setChecked:F,getHalfCheckedNodes:H,getHalfCheckedKeys:T,setCurrentNode:M,setCurrentKey:D,t:l,getNode:R,remove:A,append:O,insertBefore:K,insertAfter:$,handleNodeExpand:P,updateKeyChildren:B}}});function B(e,t,l,o,s,i){const d=(0,n.up)("el-tree-node");return(0,n.wg)(),(0,n.iD)("div",{ref:"el$",class:(0,a.C_)([e.ns.b(),e.ns.is("dragging",!!e.dragState.draggingNode),e.ns.is("drop-not-allow",!e.dragState.allowDrop),e.ns.is("drop-inner","inner"===e.dragState.dropType),{[e.ns.m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.root.childNodes,(t=>((0,n.wg)(),(0,n.j4)(d,{key:e.getNodeKey(t),node:t,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?((0,n.wg)(),(0,n.iD)("div",{key:0,class:(0,a.C_)(e.ns.e("empty-block"))},[(0,n.WI)(e.$slots,"empty",{},(()=>{var t;return[(0,n._)("span",{class:(0,a.C_)(e.ns.e("empty-text"))},(0,a.zw)(null!=(t=e.emptyText)?t:e.t("el.tree.emptyText")),3)]}))],2)):(0,n.kq)("v-if",!0),(0,n.wy)((0,n._)("div",{ref:"dropIndicator$",class:(0,a.C_)(e.ns.e("drop-indicator"))},null,2),[[r.F8,e.dragState.showDropIndicator]])],2)}var q=(0,S.Z)(P,[["render",B],["__file","/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree.vue"]]);q.install=e=>{e.component(q.name,q)};const j=q,z=j},75317:function(e,t,l){l(17388),l(5726),l(53253)},72831:function(e,t,l){l.d(t,{LW:function(){return ce}});var n=l(53321),o=l(73745);const a=Symbol("uploadContextKey");var r=l(20162),s=l(53399),i=l(64310),d=l(26227),u=l(35644),c=l(73285),p=l(14038),h=l(2641);const f="ElUpload";class v extends Error{constructor(e,t,l,n){super(e),this.name="UploadAjaxError",this.status=t,this.method=l,this.url=n}}function m(e,t,l){let n;return n=l.response?`${l.response.error||l.response}`:l.responseText?`${l.responseText}`:`fail to ${t.method} ${e} ${l.status}`,new v(n,l.status,t.method,e)}function g(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch(l){return t}}const y=e=>{"undefined"===typeof XMLHttpRequest&&(0,h._)(f,"XMLHttpRequest is undefined");const t=new XMLHttpRequest,l=e.action;t.upload&&t.upload.addEventListener("progress",(t=>{const l=t;l.percent=t.total>0?t.loaded/t.total*100:0,e.onProgress(l)}));const n=new FormData;if(e.data)for(const[a,r]of Object.entries(e.data))Array.isArray(r)?n.append(a,...r):n.append(a,r);n.append(e.filename,e.file,e.file.name),t.addEventListener("error",(()=>{e.onError(m(l,e,t))})),t.addEventListener("load",(()=>{if(t.status<200||t.status>=300)return e.onError(m(l,e,t));e.onSuccess(g(t))})),t.open(e.method,l,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const o=e.headers||{};if(o instanceof Headers)o.forEach(((e,l)=>t.setRequestHeader(l,e)));else for(const[a,r]of Object.entries(o))(0,p.Z)(r)||t.setRequestHeader(a,String(r));return t.send(n),t};var b=l(6745),C=l(33305);const w=["text","picture","picture-card"];let S=1;const k=()=>Date.now()+S++,x=(0,b.o8)({action:{type:String,default:"#"},headers:{type:(0,b.Cq)(Object)},method:{type:String,default:"post"},data:{type:Object,default:()=>(0,C.N)({})},multiple:{type:Boolean,default:!1},name:{type:String,default:"file"},drag:{type:Boolean,default:!1},withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},type:{type:String,default:"select"},fileList:{type:(0,b.Cq)(Array),default:()=>(0,C.N)([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:w,default:"text"},httpRequest:{type:(0,b.Cq)(Function),default:y},disabled:Boolean,limit:Number}),N=(0,b.o8)({...x,beforeUpload:{type:(0,b.Cq)(Function),default:c.dG},beforeRemove:{type:(0,b.Cq)(Function)},onRemove:{type:(0,b.Cq)(Function),default:c.dG},onChange:{type:(0,b.Cq)(Function),default:c.dG},onPreview:{type:(0,b.Cq)(Function),default:c.dG},onSuccess:{type:(0,b.Cq)(Function),default:c.dG},onProgress:{type:(0,b.Cq)(Function),default:c.dG},onError:{type:(0,b.Cq)(Function),default:c.dG},onExceed:{type:(0,b.Cq)(Function),default:c.dG}}),E=(0,b.o8)({files:{type:(0,b.Cq)(Array),default:()=>(0,C.N)([])},disabled:{type:Boolean,default:!1},handlePreview:{type:(0,b.Cq)(Function),default:c.dG},listType:{type:String,values:w,default:"text"}}),U={remove:e=>!!e};var F=l(56490),_=l(36878),H=l(23256),T=l(93460);const M=["onKeydown"],D=["src"],R=["onClick"],A=["title"],O=["onClick"],K=["onClick"],L=(0,n.aZ)({name:"ElUploadList"}),$=(0,n.aZ)({...L,props:E,emits:U,setup(e,{emit:t}){const{t:l}=(0,_.bU)(),a=(0,H.s3)("upload"),c=(0,H.s3)("icon"),p=(0,H.s3)("list"),h=(0,T.DT)(),f=(0,o.iH)(!1),v=e=>{t("remove",e)};return(e,t)=>((0,n.wg)(),(0,n.j4)(r.W3,{tag:"ul",class:(0,s.C_)([(0,o.SU)(a).b("list"),(0,o.SU)(a).bm("list",e.listType),(0,o.SU)(a).is("disabled",(0,o.SU)(h))]),name:(0,o.SU)(p).b()},{default:(0,n.w5)((()=>[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.files,(p=>((0,n.wg)(),(0,n.iD)("li",{key:p.uid||p.name,class:(0,s.C_)([(0,o.SU)(a).be("list","item"),(0,o.SU)(a).is(p.status),{focusing:f.value}]),tabindex:"0",onKeydown:(0,r.D2)((e=>!(0,o.SU)(h)&&v(p)),["delete"]),onFocus:t[0]||(t[0]=e=>f.value=!0),onBlur:t[1]||(t[1]=e=>f.value=!1),onClick:t[2]||(t[2]=e=>f.value=!1)},[(0,n.WI)(e.$slots,"default",{file:p},(()=>["picture"===e.listType||"uploading"!==p.status&&"picture-card"===e.listType?((0,n.wg)(),(0,n.iD)("img",{key:0,class:(0,s.C_)((0,o.SU)(a).be("list","item-thumbnail")),src:p.url,alt:""},null,10,D)):(0,n.kq)("v-if",!0),"uploading"===p.status||"picture-card"!==e.listType?((0,n.wg)(),(0,n.iD)("div",{key:1,class:(0,s.C_)((0,o.SU)(a).be("list","item-info"))},[(0,n._)("a",{class:(0,s.C_)((0,o.SU)(a).be("list","item-name")),onClick:(0,r.iM)((t=>e.handlePreview(p)),["prevent"])},[(0,n.Wm)((0,o.SU)(i.gn),{class:(0,s.C_)((0,o.SU)(c).m("document"))},{default:(0,n.w5)((()=>[(0,n.Wm)((0,o.SU)(d.BBB))])),_:1},8,["class"]),(0,n._)("span",{class:(0,s.C_)((0,o.SU)(a).be("list","item-file-name")),title:p.name},(0,s.zw)(p.name),11,A)],10,R),"uploading"===p.status?((0,n.wg)(),(0,n.j4)((0,o.SU)(u.Xh),{key:0,type:"picture-card"===e.listType?"circle":"line","stroke-width":"picture-card"===e.listType?6:2,percentage:Number(p.percentage),style:(0,s.j5)("picture-card"===e.listType?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):(0,n.kq)("v-if",!0)],2)):(0,n.kq)("v-if",!0),(0,n._)("label",{class:(0,s.C_)((0,o.SU)(a).be("list","item-status-label"))},["text"===e.listType?((0,n.wg)(),(0,n.j4)((0,o.SU)(i.gn),{key:0,class:(0,s.C_)([(0,o.SU)(c).m("upload-success"),(0,o.SU)(c).m("circle-check")])},{default:(0,n.w5)((()=>[(0,n.Wm)((0,o.SU)(d.yGk))])),_:1},8,["class"])):["picture-card","picture"].includes(e.listType)?((0,n.wg)(),(0,n.j4)((0,o.SU)(i.gn),{key:1,class:(0,s.C_)([(0,o.SU)(c).m("upload-success"),(0,o.SU)(c).m("check")])},{default:(0,n.w5)((()=>[(0,n.Wm)((0,o.SU)(d.JrY))])),_:1},8,["class"])):(0,n.kq)("v-if",!0)],2),(0,o.SU)(h)?(0,n.kq)("v-if",!0):((0,n.wg)(),(0,n.j4)((0,o.SU)(i.gn),{key:2,class:(0,s.C_)((0,o.SU)(c).m("close")),onClick:e=>v(p)},{default:(0,n.w5)((()=>[(0,n.Wm)((0,o.SU)(d.x8P))])),_:2},1032,["class","onClick"])),(0,n.kq)(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),(0,n.kq)(" This is a bug which needs to be fixed "),(0,n.kq)(" TODO: Fix the incorrect navigation interaction "),(0,o.SU)(h)?(0,n.kq)("v-if",!0):((0,n.wg)(),(0,n.iD)("i",{key:3,class:(0,s.C_)((0,o.SU)(c).m("close-tip"))},(0,s.zw)((0,o.SU)(l)("el.upload.deleteTip")),3)),"picture-card"===e.listType?((0,n.wg)(),(0,n.iD)("span",{key:4,class:(0,s.C_)((0,o.SU)(a).be("list","item-actions"))},[(0,n._)("span",{class:(0,s.C_)((0,o.SU)(a).be("list","item-preview")),onClick:t=>e.handlePreview(p)},[(0,n.Wm)((0,o.SU)(i.gn),{class:(0,s.C_)((0,o.SU)(c).m("zoom-in"))},{default:(0,n.w5)((()=>[(0,n.Wm)((0,o.SU)(d.DYM))])),_:1},8,["class"])],10,O),(0,o.SU)(h)?(0,n.kq)("v-if",!0):((0,n.wg)(),(0,n.iD)("span",{key:0,class:(0,s.C_)((0,o.SU)(a).be("list","item-delete")),onClick:e=>v(p)},[(0,n.Wm)((0,o.SU)(i.gn),{class:(0,s.C_)((0,o.SU)(c).m("delete"))},{default:(0,n.w5)((()=>[(0,n.Wm)((0,o.SU)(d.HG3))])),_:1},8,["class"])],10,K))],2)):(0,n.kq)("v-if",!0)]))],42,M)))),128)),(0,n.WI)(e.$slots,"append")])),_:3},8,["class","name"]))}});var W=(0,F.Z)($,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-list.vue"]]),I=l(14125),P=l(11541);const B=(0,b.o8)({disabled:{type:Boolean,default:!1}}),q={file:e=>(0,c.kJ)(e)},j=["onDrop","onDragover"],z="ElUploadDrag",V=(0,n.aZ)({name:z}),Y=(0,n.aZ)({...V,props:B,emits:q,setup(e,{emit:t}){const l=(0,n.f3)(a);l||(0,h._)(z,"usage: <el-upload><el-upload-dragger /></el-upload>");const i=(0,H.s3)("upload"),d=(0,o.iH)(!1),u=(0,T.DT)(),c=e=>{if(u.value)return;d.value=!1,e.stopPropagation();const n=Array.from(e.dataTransfer.files),o=l.accept.value;if(!o)return void t("file",n);const a=n.filter((e=>{const{type:t,name:l}=e,n=l.includes(".")?`.${l.split(".").pop()}`:"",a=t.replace(/\/.*$/,"");return o.split(",").map((e=>e.trim())).filter((e=>e)).some((e=>e.startsWith(".")?n===e:/\/\*$/.test(e)?a===e.replace(/\/\*$/,""):!!/^[^/]+\/[^/]+$/.test(e)&&t===e))}));t("file",a)},p=()=>{u.value||(d.value=!0)};return(e,t)=>((0,n.wg)(),(0,n.iD)("div",{class:(0,s.C_)([(0,o.SU)(i).b("dragger"),(0,o.SU)(i).is("dragover",d.value)]),onDrop:(0,r.iM)(c,["prevent"]),onDragover:(0,r.iM)(p,["prevent"]),onDragleave:t[0]||(t[0]=(0,r.iM)((e=>d.value=!1),["prevent"]))},[(0,n.WI)(e.$slots,"default")],42,j))}});var Z=(0,F.Z)(Y,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-dragger.vue"]]);const J=(0,b.o8)({...x,beforeUpload:{type:(0,b.Cq)(Function),default:c.dG},onRemove:{type:(0,b.Cq)(Function),default:c.dG},onStart:{type:(0,b.Cq)(Function),default:c.dG},onSuccess:{type:(0,b.Cq)(Function),default:c.dG},onProgress:{type:(0,b.Cq)(Function),default:c.dG},onError:{type:(0,b.Cq)(Function),default:c.dG},onExceed:{type:(0,b.Cq)(Function),default:c.dG}});var G=l(85261);const X=["onKeydown"],Q=["name","multiple","accept"],ee=(0,n.aZ)({name:"ElUploadContent",inheritAttrs:!1}),te=(0,n.aZ)({...ee,props:J,setup(e,{expose:t}){const l=e,a=(0,H.s3)("upload"),i=(0,T.DT)(),d=(0,o.XI)({}),u=(0,o.XI)(),p=e=>{if(0===e.length)return;const{autoUpload:t,limit:n,fileList:o,multiple:a,onStart:r,onExceed:s}=l;if(n&&o.length+e.length>n)s(e,o);else{a||(e=e.slice(0,1));for(const l of e){const e=l;e.uid=k(),r(e),t&&h(e)}}},h=async e=>{if(u.value.value="",!l.beforeUpload)return f(e);let t,n={};try{const o=l.data,a=l.beforeUpload(e);n=(0,c.Kn)(l.data)?(0,I.Z)(l.data):l.data,t=await a,(0,c.Kn)(l.data)&&(0,P.Z)(o,n)&&(n=(0,I.Z)(l.data))}catch(a){t=!1}if(!1===t)return void l.onRemove(e);let o=e;t instanceof Blob&&(o=t instanceof File?t:new File([t],e.name,{type:e.type})),f(Object.assign(o,{uid:e.uid}),n)},f=(e,t)=>{const{headers:n,data:o,method:a,withCredentials:r,name:s,action:i,onProgress:u,onSuccess:c,onError:p,httpRequest:h}=l,{uid:f}=e,v={headers:n||{},withCredentials:r,file:e,data:null!=t?t:o,method:a,filename:s,action:i,onProgress:t=>{u(t,e)},onSuccess:t=>{c(t,e),delete d.value[f]},onError:t=>{p(t,e),delete d.value[f]}},m=h(v);d.value[f]=m,m instanceof Promise&&m.then(v.onSuccess,v.onError)},v=e=>{const t=e.target.files;t&&p(Array.from(t))},m=()=>{i.value||(u.value.value="",u.value.click())},g=()=>{m()},y=e=>{const t=(0,G.vu)(d.value).filter(e?([t])=>String(e.uid)===t:()=>!0);t.forEach((([e,t])=>{t instanceof XMLHttpRequest&&t.abort(),delete d.value[e]}))};return t({abort:y,upload:h}),(e,t)=>((0,n.wg)(),(0,n.iD)("div",{class:(0,s.C_)([(0,o.SU)(a).b(),(0,o.SU)(a).m(e.listType),(0,o.SU)(a).is("drag",e.drag)]),tabindex:"0",onClick:m,onKeydown:(0,r.D2)((0,r.iM)(g,["self"]),["enter","space"])},[e.drag?((0,n.wg)(),(0,n.j4)(Z,{key:0,disabled:(0,o.SU)(i),onFile:p},{default:(0,n.w5)((()=>[(0,n.WI)(e.$slots,"default")])),_:3},8,["disabled"])):(0,n.WI)(e.$slots,"default",{key:1}),(0,n._)("input",{ref_key:"inputRef",ref:u,class:(0,s.C_)((0,o.SU)(a).e("input")),name:e.name,multiple:e.multiple,accept:e.accept,type:"file",onChange:v,onClick:t[0]||(t[0]=(0,r.iM)((()=>{}),["stop"]))},null,42,Q)],42,X))}});var le=(0,F.Z)(te,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-content.vue"]]),ne=l(33255);const oe="ElUpload",ae=e=>{var t;(null==(t=e.url)?void 0:t.startsWith("blob:"))&&URL.revokeObjectURL(e.url)},re=(e,t)=>{const l=(0,ne.NCN)(e,"fileList",void 0,{passive:!0}),o=e=>l.value.find((t=>t.uid===e.uid));function a(e){var l;null==(l=t.value)||l.abort(e)}function r(e=["ready","uploading","success","fail"]){l.value=l.value.filter((t=>!e.includes(t.status)))}const s=(t,n)=>{const a=o(n);a&&(console.error(t),a.status="fail",l.value.splice(l.value.indexOf(a),1),e.onError(t,a,l.value),e.onChange(a,l.value))},i=(t,n)=>{const a=o(n);a&&(e.onProgress(t,a,l.value),a.status="uploading",a.percentage=Math.round(t.percent))},d=(t,n)=>{const a=o(n);a&&(a.status="success",a.response=t,e.onSuccess(t,a,l.value),e.onChange(a,l.value))},u=t=>{(0,p.Z)(t.uid)&&(t.uid=k());const n={name:t.name,percentage:0,status:"ready",size:t.size,raw:t,uid:t.uid};if("picture-card"===e.listType||"picture"===e.listType)try{n.url=URL.createObjectURL(t)}catch(o){(0,h.N)(oe,o.message),e.onError(o,n,l.value)}l.value=[...l.value,n],e.onChange(n,l.value)},c=async t=>{const n=t instanceof File?o(t):t;n||(0,h._)(oe,"file to be removed not found");const r=t=>{a(t);const n=l.value;n.splice(n.indexOf(t),1),e.onRemove(t,n),ae(t)};if(e.beforeRemove){const t=await e.beforeRemove(n,l.value);!1!==t&&r(n)}else r(n)};function f(){l.value.filter((({status:e})=>"ready"===e)).forEach((({raw:e})=>{var l;return e&&(null==(l=t.value)?void 0:l.upload(e))}))}return(0,n.YP)((()=>e.listType),(t=>{"picture-card"!==t&&"picture"!==t||(l.value=l.value.map((t=>{const{raw:n,url:o}=t;if(!o&&n)try{t.url=URL.createObjectURL(n)}catch(a){e.onError(a,t,l.value)}return t})))})),(0,n.YP)(l,(e=>{for(const t of e)t.uid||(t.uid=k()),t.status||(t.status="success")}),{immediate:!0,deep:!0}),{uploadFiles:l,abort:a,clearFiles:r,handleError:s,handleProgress:i,handleStart:u,handleSuccess:d,handleRemove:c,submit:f}},se=(0,n.aZ)({name:"ElUpload"}),ie=(0,n.aZ)({...se,props:N,setup(e,{expose:t}){const l=e,r=(0,n.Rr)(),s=(0,T.DT)(),i=(0,o.XI)(),{abort:d,submit:u,clearFiles:c,uploadFiles:p,handleStart:h,handleError:f,handleRemove:v,handleSuccess:m,handleProgress:g}=re(l,i),y=(0,n.Fl)((()=>"picture-card"===l.listType)),b=(0,n.Fl)((()=>({...l,fileList:p.value,onStart:h,onProgress:g,onSuccess:m,onError:f,onRemove:v})));return(0,n.Jd)((()=>{p.value.forEach((({url:e})=>{(null==e?void 0:e.startsWith("blob:"))&&URL.revokeObjectURL(e)}))})),(0,n.JJ)(a,{accept:(0,o.Vh)(l,"accept")}),t({abort:d,submit:u,clearFiles:c,handleStart:h,handleRemove:v}),(e,t)=>((0,n.wg)(),(0,n.iD)("div",null,[(0,o.SU)(y)&&e.showFileList?((0,n.wg)(),(0,n.j4)(W,{key:0,disabled:(0,o.SU)(s),"list-type":e.listType,files:(0,o.SU)(p),"handle-preview":e.onPreview,onRemove:(0,o.SU)(v)},(0,n.Nv)({append:(0,n.w5)((()=>[(0,n.Wm)(le,(0,n.dG)({ref_key:"uploadRef",ref:i},(0,o.SU)(b)),{default:(0,n.w5)((()=>[(0,o.SU)(r).trigger?(0,n.WI)(e.$slots,"trigger",{key:0}):(0,n.kq)("v-if",!0),!(0,o.SU)(r).trigger&&(0,o.SU)(r).default?(0,n.WI)(e.$slots,"default",{key:1}):(0,n.kq)("v-if",!0)])),_:3},16)])),_:2},[e.$slots.file?{name:"default",fn:(0,n.w5)((({file:t})=>[(0,n.WI)(e.$slots,"file",{file:t})]))}:void 0]),1032,["disabled","list-type","files","handle-preview","onRemove"])):(0,n.kq)("v-if",!0),!(0,o.SU)(y)||(0,o.SU)(y)&&!e.showFileList?((0,n.wg)(),(0,n.j4)(le,(0,n.dG)({key:1,ref_key:"uploadRef",ref:i},(0,o.SU)(b)),{default:(0,n.w5)((()=>[(0,o.SU)(r).trigger?(0,n.WI)(e.$slots,"trigger",{key:0}):(0,n.kq)("v-if",!0),!(0,o.SU)(r).trigger&&(0,o.SU)(r).default?(0,n.WI)(e.$slots,"default",{key:1}):(0,n.kq)("v-if",!0)])),_:3},16)):(0,n.kq)("v-if",!0),e.$slots.trigger?(0,n.WI)(e.$slots,"default",{key:2}):(0,n.kq)("v-if",!0),(0,n.WI)(e.$slots,"tip"),!(0,o.SU)(y)&&e.showFileList?((0,n.wg)(),(0,n.j4)(W,{key:3,disabled:(0,o.SU)(s),"list-type":e.listType,files:(0,o.SU)(p),"handle-preview":e.onPreview,onRemove:(0,o.SU)(v)},(0,n.Nv)({_:2},[e.$slots.file?{name:"default",fn:(0,n.w5)((({file:t})=>[(0,n.WI)(e.$slots,"file",{file:t})]))}:void 0]),1032,["disabled","list-type","files","handle-preview","onRemove"])):(0,n.kq)("v-if",!0)]))}});var de=(0,F.Z)(ie,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload.vue"]]),ue=l(82134);const ce=(0,ue.nz)(de)},58168:function(e,t,l){l(17388),l(68029),l(68025)},88392:function(e,t,l){l.d(t,{P:function(){return n}});const n=["year","month","date","dates","week","datetime","datetimerange","daterange","monthrange"]},52324:function(e,t,l){l.d(t,{Z:function(){return i}});var n=l(7938),o=l(48743);const a=new Map;let r;function s(e,t){let l=[];return Array.isArray(t.arg)?l=t.arg:(0,o.kK)(t.arg)&&l.push(t.arg),function(n,o){const a=t.instance.popperRef,r=n.target,s=null==o?void 0:o.target,i=!t||!t.instance,d=!r||!s,u=e.contains(r)||e.contains(s),c=e===r,p=l.length&&l.some((e=>null==e?void 0:e.contains(r)))||l.length&&l.includes(s),h=a&&(a.contains(r)||a.contains(s));i||d||u||c||p||h||t.value(n,o)}}n.C5&&(document.addEventListener("mousedown",(e=>r=e)),document.addEventListener("mouseup",(e=>{for(const t of a.values())for(const{documentHandler:l}of t)l(e,r)})));const i={beforeMount(e,t){a.has(e)||a.set(e,[]),a.get(e).push({documentHandler:s(e,t),bindingFn:t.value})},updated(e,t){a.has(e)||a.set(e,[]);const l=a.get(e),n=l.findIndex((e=>e.bindingFn===t.oldValue)),o={documentHandler:s(e,t),bindingFn:t.value};n>=0?l.splice(n,1,o):l.push(o)},unmounted(e){a.delete(e)}}},32931:function(e,t,l){l.d(t,{Qu:function(){return r}});var n=l(73285);const o=100,a=600,r={beforeMount(e,t){const l=t.value,{interval:r=o,delay:s=a}=(0,n.mf)(l)?{}:l;let i,d;const u=()=>(0,n.mf)(l)?l():l.handler(),c=()=>{d&&(clearTimeout(d),d=void 0),i&&(clearInterval(i),i=void 0)};e.addEventListener("mousedown",(e=>{0===e.button&&(c(),u(),document.addEventListener("mouseup",(()=>c()),{once:!0}),d=setTimeout((()=>{i=setInterval((()=>{u()}),r)}),s))}))}}},13530:function(e,t,l){l.d(t,{F:function(){return d},q:function(){return i}});var n=l(73745),o=l(7938);function a(){let e;const t=(t,n)=>{l(),e=window.setTimeout(t,n)},l=()=>window.clearTimeout(e);return(0,o.IY)((()=>l())),{registerTimeout:t,cancelTimeout:l}}var r=l(6745),s=l(48743);const i=(0,r.o8)({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),d=({showAfter:e,hideAfter:t,autoClose:l,open:o,close:r})=>{const{registerTimeout:i}=a(),{registerTimeout:d,cancelTimeout:u}=a(),c=t=>{i((()=>{o(t);const e=(0,n.SU)(l);(0,s.hj)(e)&&e>0&&d((()=>{r(t)}),e)}),(0,n.SU)(e))},p=e=>{u(),i((()=>{r(e)}),(0,n.SU)(t))};return{onOpen:c,onClose:p}}},87683:function(e,t,l){l.d(t,{K:function(){return n}});const n=e=>({focus:()=>{var t,l;null==(l=null==(t=e.value)?void 0:t.focus)||l.call(t)}})},43384:function(e,t,l){l.d(t,{Bk:function(){return r},Zq:function(){return a},zl:function(){return o}});var n=l(53321);const o=Symbol("elForwardRef"),a=e=>{const t=t=>{e.value=t};(0,n.JJ)(o,{setForwardRef:t})},r=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}})},17009:function(e,t,l){l.d(t,{W:function(){return s}});var n=l(53321),o=l(73745),a=l(1632);const r=(e,t,l)=>{const o=(0,a.M3)(e.subTree).filter((e=>{var l;return(0,n.lA)(e)&&(null==(l=e.type)?void 0:l.name)===t&&!!e.component})),r=o.map((e=>e.component.uid));return r.map((e=>l[e])).filter((e=>!!e))},s=(e,t)=>{const l={},n=(0,o.XI)([]),a=o=>{l[o.uid]=o,n.value=r(e,t,l)},s=e=>{delete l[e],n.value=n.value.filter((t=>t.uid!==e))};return{children:n,addChild:a,removeChild:s}}},71433:function(e,t,l){l.d(t,{D:function(){return s}});var n=l(53321),o=l(73745),a=l(43764),r=l(26568);const s=(e,t,l={})=>{const r={name:"updateState",enabled:!0,phase:"write",fn:({state:e})=>{const t=i(e);Object.assign(u.value,t)},requires:["computeStyles"]},s=(0,n.Fl)((()=>{const{onFirstUpdate:e,placement:t,strategy:n,modifiers:a}=(0,o.SU)(l);return{onFirstUpdate:e,placement:t||"bottom",strategy:n||"absolute",modifiers:[...a||[],r,{name:"applyStyles",enabled:!1}]}})),d=(0,o.XI)(),u=(0,o.iH)({styles:{popper:{position:(0,o.SU)(s).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),c=()=>{d.value&&(d.value.destroy(),d.value=void 0)};return(0,n.YP)(s,(e=>{const t=(0,o.SU)(d);t&&t.setOptions(e)}),{deep:!0}),(0,n.YP)([e,t],(([e,t])=>{c(),e&&t&&(d.value=(0,a.fi)(e,t,(0,o.SU)(s)))})),(0,n.Jd)((()=>{c()})),{state:(0,n.Fl)((()=>{var e;return{...(null==(e=(0,o.SU)(d))?void 0:e.state)||{}}})),styles:(0,n.Fl)((()=>(0,o.SU)(u).styles)),attributes:(0,n.Fl)((()=>(0,o.SU)(u).attributes)),update:()=>{var e;return null==(e=(0,o.SU)(d))?void 0:e.update()},forceUpdate:()=>{var e;return null==(e=(0,o.SU)(d))?void 0:e.forceUpdate()},instanceRef:(0,n.Fl)((()=>(0,o.SU)(d)))}};function i(e){const t=Object.keys(e.elements),l=(0,r.Z)(t.map((t=>[t,e.styles[t]||{}]))),n=(0,r.Z)(t.map((t=>[t,e.attributes[t]])));return{styles:l,attributes:n}}},85441:function(e,t,l){l.d(t,{v:function(){return a}});var n=l(73745),o=l(53321);const a=(e,t=0)=>{if(0===t)return e;const l=(0,n.iH)(!1);let a=0;const r=()=>{a&&clearTimeout(a),a=window.setTimeout((()=>{l.value=e.value}),t)};return(0,o.bv)(r),(0,o.YP)((()=>e.value),(e=>{e?r():l.value=e})),l}},82612:function(e,t,l){l.d(t,{Tw:function(){return n},XQ:function(){return o}});const n=e=>[...new Set(e)],o=e=>e||0===e?Array.isArray(e)?e:[e]:[]},267:function(e,t,l){l.d(t,{M:function(){return n},r:function(){return o}});const n=(e,t,{checkForDefaultPrevented:l=!0}={})=>{const n=n=>{const o=null==e?void 0:e(n);if(!1===l||!o)return null==t?void 0:t(n)};return n},o=e=>t=>"mouse"===t.pointerType?e(t):void 0},92217:function(e,t,l){l.d(t,{XU:function(){return o}});var n=l(7938);const o=(e,t)=>{if(!n.C5||!e||!t)return!1;const l=e.getBoundingClientRect();let o;return o=t instanceof Element?t.getBoundingClientRect():{top:0,right:window.innerWidth,bottom:window.innerHeight,left:0},l.top<o.bottom&&l.bottom>o.top&&l.right>o.left&&l.left<o.right}},79596:function(e,t,l){l.d(t,{O:function(){return n}});const n=()=>Math.floor(1e4*Math.random())},66510:function(e,t,l){l.d(t,{fA:function(){return o},kC:function(){return a}});var n=l(73285);const o=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),a=e=>(0,n.kC)(e)},34059:function(e,t,l){l.d(t,{F:function(){return o}});var n=l(73285);const o=(...e)=>t=>{e.forEach((e=>{(0,n.mf)(e)?e(t):e.value=t}))}},31578:function(e,t,l){l.d(t,{Z:function(){return o}});var n=l(67194);const o=e=>n.V[e||"default"]}}]);
|