-1)return t.childNodes[n+1]}return null}get previousSibling(){const t=this.parent;if(t){const n=t.childNodes.indexOf(this);if(n>-1)return n>0?t.childNodes[n-1]:null}return null}contains(t,n=!0){return(this.childNodes||[]).some(a=>a===t||n&&a.contains(t))}remove(){const t=this.parent;t&&t.removeChild(this)}insertChild(t,n,a){if(!t)throw new Error("InsertChild error: child is required.");if(!(t instanceof yc)){if(!a){const l=this.getChildren(!0);l!=null&&l.includes(t.data)||(Et(n)||n<0?l==null||l.push(t.data):l==null||l.splice(n,0,t.data))}Object.assign(t,{parent:this,store:this.store}),t=Ft(new yc(t)),t instanceof yc&&t.initialize()}t.level=this.level+1,Et(n)||n<0?this.childNodes.push(t):this.childNodes.splice(n,0,t),this.updateLeafState()}insertBefore(t,n){let a;n&&(a=this.childNodes.indexOf(n)),this.insertChild(t,a)}insertAfter(t,n){let a;n&&(a=this.childNodes.indexOf(n),a!==-1&&(a+=1)),this.insertChild(t,a)}removeChild(t){const n=this.getChildren()||[],a=n.indexOf(t.data);a>-1&&n.splice(a,1);const l=this.childNodes.indexOf(t);l>-1&&(this.store&&this.store.deregisterNode(t),t.parent=null,this.childNodes.splice(l,1)),this.updateLeafState()}removeChildByData(t){const n=this.childNodes.find(a=>a.data===t);n&&this.removeChild(n)}expand(t,n){const a=()=>{if(n){let l=this.parent;for(;l&&l.level>0;)l.expanded=!0,l=l.parent}this.expanded=!0,t&&t(),Nv(this.childNodes,!0)};this.shouldLoadData()?this.loadData(l=>{me(l)&&(this.store.checkStrictly||(this.checked?this.setChecked(!0,!0):ei(this)),a())}):a()}doCreateChildren(t,n={}){t.forEach(a=>{this.insertChild(Object.assign({data:a},n),void 0,!0)})}collapse(){this.expanded=!1,Nv(this.childNodes,!1)}shouldLoadData(){return!!(this.store.lazy===!0&&this.store.load&&!this.loaded)}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser<"u"){this.isLeaf=this.isLeafByUser,this.isEffectivelyChecked=this.isLeaf&&this.disabled;return}const t=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!t||t.length===0,this.isEffectivelyChecked=this.isLeaf&&this.disabled;return}this.isLeaf=!1}setChecked(t,n,a,l){if(this.indeterminate=t==="half",this.checked=t===!0,this.isEffectivelyChecked=!this.childNodes.length&&(this.disabled||this.checked),this.store.checkStrictly&&!n)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const s=()=>{if(n){const r=this.childNodes;for(let f=0,p=r.length;f{s(),ei(this)},{checked:t!==!1});return}else s()}const o=this.parent;!o||o.level===0||!a&&!this.store.checkStrictly&&ei(o)}getChildren(t=!1){if(this.level===0)return this.data;const n=this.data;if(!n)return null;const a=this.store.props;let l="children";return a&&(l=a.children||"children"),Et(n[l])&&(n[l]=null),t&&!n[l]&&(n[l]=[]),n[l]}updateChildren(){const t=this.getChildren()||[],n=this.childNodes.map(o=>o.data),a={},l=[];t.forEach((o,s)=>{const r=o[Z2];r&&n.some(u=>(u==null?void 0:u.$treeNodeId)===r)?a[r]={index:s,data:o}:l.push({index:s,data:o})}),this.store.lazy||n.forEach(o=>{a[o==null?void 0:o.$treeNodeId]||this.removeChildByData(o)}),l.forEach(({index:o,data:s})=>{this.insertChild({data:s},o)}),this.updateLeafState()}loadData(t,n={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(n).length)){this.loading=!0;const a=o=>{this.childNodes=[],this.doCreateChildren(o,n),this.loaded=!0,this.loading=!1,this.updateLeafState(),t&&t.call(this,o)},l=()=>{this.loading=!1};this.store.load(this,a,l)}else t&&t.call(this)}eachNode(t){const n=[this];for(;n.length;){const a=n.shift();n.unshift(...a.childNodes),t(a)}}reInitChecked(){this.store.checkStrictly||ei(this)}},PU=class{constructor(e){this.lazy=!1,this.checkStrictly=!1,this.autoExpandParent=!1,this.defaultExpandAll=!1,this.checkDescendants=!1,this.currentNode=null,this.currentNodeKey=null;for(const t in e)Dt(e,t)&&(this[t]=e[t]);this.nodesMap={}}initialize(){if(this.root=new Mv({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const e=this.load;e(this.root,t=>{this.root.doCreateChildren(t),this._initDefaultCheckedNodes()},vt)}else this._initDefaultCheckedNodes()}filter(e){const t=this.filterNodeMethod,n=this.lazy,a=async function(l){const o=l.root?l.root.childNodes:l.childNodes;for(const[s,r]of o.entries())r.visible=!!(t!=null&&t.call(r,e,r.data,r)),s%80===0&&s>0&&await Ae(),await a(r);if(!l.visible&&o.length){let s=!0;s=!o.some(r=>r.visible),l.root?l.root.visible=s===!1:l.visible=s===!1}e&&l.visible&&!l.isLeaf&&(!n||l.loaded)&&l.expand()};a(this)}setData(e){e!==this.root.data?(this.nodesMap={},this.root.setData(e),this._initDefaultCheckedNodes(),this.setCurrentNodeKey(this.currentNodeKey)):this.root.updateChildren()}getNode(e){if(e instanceof Mv)return e;const t=st(e)?$m(this.key,e):e;return this.nodesMap[t]||null}insertBefore(e,t){var a;const n=this.getNode(t);(a=n.parent)==null||a.insertBefore({data:e},n)}insertAfter(e,t){var a;const n=this.getNode(t);(a=n.parent)==null||a.insertAfter({data:e},n)}remove(e){const t=this.getNode(e);t&&t.parent&&(t===this.currentNode&&(this.currentNode=null),t.parent.removeChild(t))}append(e,t){const n=Ta(t)?this.root:this.getNode(t);n&&n.insertChild({data:e})}_initDefaultCheckedNodes(){const e=this.defaultCheckedKeys||[],t=this.nodesMap;e.forEach(n=>{const a=t[n];a&&a.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(e){const t=this.defaultCheckedKeys||[];!vn(e.key)&&t.includes(e.key)&&e.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(e){e!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=e,this._initDefaultCheckedNodes())}registerNode(e){const t=this.key;if(!(!e||!e.data))if(!t)this.nodesMap[e.id]=e;else{const n=e.key;vn(n)||(this.nodesMap[n]=e)}}deregisterNode(e){!this.key||!e||!e.data||(e.childNodes.forEach(t=>{this.deregisterNode(t)}),delete this.nodesMap[e.key])}getCheckedNodes(e=!1,t=!1){const n=[],a=function(l){(l.root?l.root.childNodes:l.childNodes).forEach(o=>{(o.checked||t&&o.indeterminate)&&(!e||e&&o.isLeaf)&&n.push(o.data),a(o)})};return a(this),n}getCheckedKeys(e=!1){return this.getCheckedNodes(e).map(t=>(t||{})[this.key])}getHalfCheckedNodes(){const e=[],t=function(n){(n.root?n.root.childNodes:n.childNodes).forEach(a=>{a.indeterminate&&e.push(a.data),t(a)})};return t(this),e}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(e=>(e||{})[this.key])}_getAllNodes(){const e=[],t=this.nodesMap;for(const n in t)Dt(t,n)&&e.push(t[n]);return e}updateChildren(e,t){const n=this.nodesMap[e];if(!n)return;const a=n.childNodes;for(let l=a.length-1;l>=0;l--){const o=a[l];this.remove(o.data)}for(let l=0,o=t.length;lr.level-u.level),l=Object.create(null),o=Object.keys(n);a.forEach(r=>r.setChecked(!1,!1));const s=r=>{r.childNodes.forEach(u=>{var c;l[u.data[e]]=!0,(c=u.childNodes)!=null&&c.length&&s(u)})};for(let r=0,u=a.length;r{g.isLeaf||g.setChecked(!1,!1,!0),f(g)}),p.reInitChecked()};f(c)}}}setCheckedNodes(e,t=!1){const n=this.key,a={};e.forEach(l=>{a[(l||{})[n]]=!0}),this._setCheckedKeys(n,t,a)}setCheckedKeys(e,t=!1){this.defaultCheckedKeys=e;const n=this.key,a={};e.forEach(l=>{a[l]=!0}),this._setCheckedKeys(n,t,a)}setDefaultExpandedKeys(e){e=e||[],this.defaultExpandedKeys=e,e.forEach(t=>{const n=this.getNode(t);n&&n.expand(null,this.autoExpandParent)})}setChecked(e,t,n){const a=this.getNode(e);a&&a.setChecked(!!t,n)}getCurrentNode(){return this.currentNode}setCurrentNode(e){const t=this.currentNode;t&&(t.isCurrent=!1),this.currentNode=e,this.currentNode.isCurrent=!0}setUserCurrentNode(e,t=!0){var l;const n=e[this.key],a=this.nodesMap[n];this.setCurrentNode(a),t&&this.currentNode&&this.currentNode.level>1&&((l=this.currentNode.parent)==null||l.expand(null,!0))}setCurrentNodeKey(e,t=!0){var a;if(this.currentNodeKey=e,Ta(e)){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const n=this.getNode(e);n&&(this.setCurrentNode(n),t&&this.currentNode&&this.currentNode.level>1&&((a=this.currentNode.parent)==null||a.expand(null,!0)))}};function ex(e){const t=Fe(g0,null);let n={treeNodeExpand:a=>{var l;e.node!==a&&((l=e.node)==null||l.collapse())},children:new Set};return t&&t.children.add(n),zt(()=>{t&&t.children.delete(n),n=null}),Tt(g0,n),{broadcastExpanded:a=>{if(e.accordion)for(const l of n.children)l.treeNodeExpand(a)}}}const tx=Symbol("dragEvents");function RU({props:e,ctx:t,el$:n,dropIndicator$:a,store:l}){const o=he("tree"),s=D({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return Tt(tx,{treeNodeDragStart:({event:d,treeNode:f})=>{if(d.dataTransfer){if(We(e.allowDrag)&&!e.allowDrag(f.node))return d.preventDefault(),!1;d.dataTransfer.effectAllowed="move";try{d.dataTransfer.setData("text/plain","")}catch{}s.value.draggingNode=f,t.emit("node-drag-start",f.node,d)}},treeNodeDragOver:({event:d,treeNode:f})=>{if(!d.dataTransfer)return;const p=f,g=s.value.dropNode;g&&g.node.id!==p.node.id&&sa(g.$el,o.is("drop-inner"));const m=s.value.draggingNode;if(!m||!p)return;let v=!0,h=!0,b=!0,y=!0;We(e.allowDrop)&&(v=e.allowDrop(m.node,p.node,"prev"),y=h=e.allowDrop(m.node,p.node,"inner"),b=e.allowDrop(m.node,p.node,"next")),d.dataTransfer.dropEffect=h||v||b?"move":"none",(v||h||b)&&(g==null?void 0:g.node.id)!==p.node.id&&(g&&t.emit("node-drag-leave",m.node,g.node,d),t.emit("node-drag-enter",m.node,p.node,d)),v||h||b?s.value.dropNode=p:s.value.dropNode=null,p.node.nextSibling===m.node&&(b=!1),p.node.previousSibling===m.node&&(v=!1),p.node.contains(m.node,!1)&&(h=!1),(m.node===p.node||m.node.contains(p.node))&&(v=!1,h=!1,b=!1);const C=p.$el,S=C.querySelector(`.${o.be("node","content")}`).getBoundingClientRect(),k=n.value.getBoundingClientRect(),x=n.value.scrollTop;let T;const E=v?h?.25:b?.45:1:Number.NEGATIVE_INFINITY,$=b?h?.75:v?.55:0:Number.POSITIVE_INFINITY;let M=-9999;const P=d.clientY-S.top;PS.height*$?T="after":h?T="inner":T="none";const N=C.querySelector(`.${o.be("node","expand-icon")}`).getBoundingClientRect(),A=a.value;T==="before"?M=N.top-k.top+x:T==="after"&&(M=N.bottom-k.top+x),A.style.top=`${M}px`,A.style.left=`${N.right-k.left}px`,T==="inner"?Ba(C,o.is("drop-inner")):sa(C,o.is("drop-inner")),s.value.showDropIndicator=T==="before"||T==="after",s.value.allowDrop=s.value.showDropIndicator||y,s.value.dropType=T,t.emit("node-drag-over",m.node,p.node,d)},treeNodeDragEnd:d=>{var m,v;const{draggingNode:f,dropType:p,dropNode:g}=s.value;if(d.preventDefault(),d.dataTransfer&&(d.dataTransfer.dropEffect="move"),f!=null&&f.node.data&&g){const h={data:f.node.data};p!=="none"&&f.node.remove(),p==="before"?(m=g.node.parent)==null||m.insertBefore(h,g.node):p==="after"?(v=g.node.parent)==null||v.insertAfter(h,g.node):p==="inner"&&g.node.insertChild(h),p!=="none"&&(l.value.registerNode(h),l.value.key&&f.node.eachNode(b=>{var y;(y=l.value.nodesMap[b.data[l.value.key]])==null||y.setChecked(b.checked,!l.value.checkStrictly)})),sa(g.$el,o.is("drop-inner")),t.emit("node-drag-end",f.node,g.node,p,d),p!=="none"&&t.emit("node-drop",f.node,g.node,p,d)}f&&!g&&t.emit("node-drag-end",f.node,null,p,d),s.value.showDropIndicator=!1,s.value.draggingNode=null,s.value.dropNode=null,s.value.allowDrop=!0}}),{dragState:s}}var _U=ue({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=he("tree"),n=Fe(X2),a=Fe(Tm);return()=>{const l=e.node,{data:o,store:s}=l;return e.renderContent?e.renderContent(Ge,{_self:n,node:l,data:o,store:s}):ne(a.ctx.slots,"default",{node:l,data:o},()=>[Ge(Em,{tag:"span",truncated:!0,class:t.be("node","label")},()=>[l.label])])}}}),AU=_U,LU=ue({name:"ElTreeNode",components:{ElCollapseTransition:of,ElCheckbox:ll,NodeContent:AU,ElIcon:Ve,Loading:rl},props:{node:{type:Mv,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:Boolean},emits:["node-expand"],setup(e,t){const n=he("tree"),{broadcastExpanded:a}=ex(e),l=Fe(Tm),o=D(!1),s=D(!1),r=D(),u=D(),c=D(),d=Fe(tx),f=ht();Tt(X2,f),l||Kt("Tree","Can not find node's tree."),e.node.expanded&&(o.value=!0,s.value=!0);const p=l.props.props.children||"children";fe(()=>{var M;const $=(M=e.node.data)==null?void 0:M[p];return $&&[...$]},()=>{e.node.updateChildren()}),fe(()=>e.node.indeterminate,$=>{v(e.node.checked,$)}),fe(()=>e.node.checked,$=>{v($,e.node.indeterminate)}),fe(()=>e.node.childNodes.length,()=>e.node.reInitChecked()),fe(()=>e.node.expanded,$=>{Ae(()=>o.value=$),$&&(s.value=!0)});const g=$=>l.props.nodeKey?$m(l.props.nodeKey,$.data):$.id,m=$=>{const M=e.props.class;if(!M)return{};let P;if(We(M)){const{data:N}=$;P=M(N,$)}else P=M;return De(P)?{[P]:!0}:P},v=($,M)=>{(r.value!==$||u.value!==M)&&l.ctx.emit("check-change",e.node.data,$,M),r.value=$,u.value=M},h=$=>{Ov(l.store,l.ctx.emit,()=>{var M;if((M=l==null?void 0:l.props)!=null&&M.nodeKey){const P=g(e.node);l.store.value.setCurrentNodeKey(P)}else l.store.value.setCurrentNode(e.node)}),l.currentNode.value=e.node,l.props.expandOnClickNode&&y(),(l.props.checkOnClickNode||e.node.isLeaf&&l.props.checkOnClickLeaf&&e.showCheckbox)&&!e.node.disabled&&C(!e.node.checked),l.ctx.emit("node-click",e.node.data,e.node,f,$)},b=$=>{var M;(M=l.instance.vnode.props)!=null&&M.onNodeContextmenu&&($.stopPropagation(),$.preventDefault()),l.ctx.emit("node-contextmenu",$,e.node.data,e.node,f)},y=()=>{e.node.isLeaf||(o.value?(l.ctx.emit("node-collapse",e.node.data,e.node,f),e.node.collapse()):e.node.expand(()=>{t.emit("node-expand",e.node.data,e.node,f)}))},C=$=>{const M=l==null?void 0:l.props.checkStrictly,P=e.node.childNodes;!M&&P.length&&($=P.some(N=>!N.isEffectivelyChecked)),e.node.setChecked($,!M),Ae(()=>{const N=l.store.value;l.ctx.emit("check",e.node.data,{checkedNodes:N.getCheckedNodes(),checkedKeys:N.getCheckedKeys(),halfCheckedNodes:N.getHalfCheckedNodes(),halfCheckedKeys:N.getHalfCheckedKeys()})})};return{ns:n,node$:c,tree:l,expanded:o,childNodeRendered:s,oldChecked:r,oldIndeterminate:u,getNodeKey:g,getNodeClass:m,handleSelectChange:v,handleClick:h,handleContextMenu:b,handleExpandIconClick:y,handleCheckChange:C,handleChildNodeExpand:($,M,P)=>{a(M),l.ctx.emit("node-expand",$,M,P)},handleDragStart:$=>{l.props.draggable&&d.treeNodeDragStart({event:$,treeNode:e})},handleDragOver:$=>{$.preventDefault(),l.props.draggable&&d.treeNodeDragOver({event:$,treeNode:{$el:c.value,node:e.node}})},handleDrop:$=>{$.preventDefault()},handleDragEnd:$=>{l.props.draggable&&d.treeNodeDragEnd($)},CaretRight:qS}}});const DU=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],BU=["aria-expanded"];function VU(e,t,n,a,l,o){const s=_t("el-icon"),r=_t("el-checkbox"),u=_t("loading"),c=_t("node-content"),d=_t("el-tree-node"),f=_t("el-collapse-transition");return ft((O(),H("div",{ref:"node$",class:I([e.ns.b("node"),e.ns.is("expanded",e.expanded),e.ns.is("current",e.node.isCurrent),e.ns.is("hidden",!e.node.visible),e.ns.is("focusable",!e.node.disabled),e.ns.is("checked",!e.node.disabled&&e.node.checked),e.getNodeClass(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.node.disabled,"aria-checked":e.node.checked,draggable:e.tree.props.draggable,"data-key":e.getNodeKey(e.node),onClick:t[2]||(t[2]=Je((...p)=>e.handleClick&&e.handleClick(...p),["stop"])),onContextmenu:t[3]||(t[3]=(...p)=>e.handleContextMenu&&e.handleContextMenu(...p)),onDragstart:t[4]||(t[4]=Je((...p)=>e.handleDragStart&&e.handleDragStart(...p),["stop"])),onDragover:t[5]||(t[5]=Je((...p)=>e.handleDragOver&&e.handleDragOver(...p),["stop"])),onDragend:t[6]||(t[6]=Je((...p)=>e.handleDragEnd&&e.handleDragEnd(...p),["stop"])),onDrop:t[7]||(t[7]=Je((...p)=>e.handleDrop&&e.handleDrop(...p),["stop"]))},[W("div",{class:I(e.ns.be("node","content")),style:je({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(O(),oe(s,{key:0,class:I([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:Je(e.handleExpandIconClick,["stop"])},{default:J(()=>[(O(),oe(dt(e.tree.props.icon||e.CaretRight)))]),_:1},8,["class","onClick"])):te("v-if",!0),e.showCheckbox?(O(),oe(r,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:t[0]||(t[0]=Je(()=>{},["stop"])),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):te("v-if",!0),e.node.loading?(O(),oe(s,{key:2,class:I([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:J(()=>[U(u)]),_:1},8,["class"])):te("v-if",!0),U(c,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),U(f,null,{default:J(()=>[!e.renderAfterExpand||e.childNodeRendered?ft((O(),H("div",{key:0,class:I(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded,onClick:t[1]||(t[1]=Je(()=>{},["stop"]))},[(O(!0),H(ze,null,bt(e.node.childNodes,p=>(O(),oe(d,{key:e.getNodeKey(p),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:p,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,BU)),[[At,e.expanded]]):te("v-if",!0)]),_:1})],42,DU)),[[At,e.node.visible]])}var FU=Rn(LU,[["render",VU]]);function zU({el$:e},t){const n=he("tree");mt(()=>{o()}),Kl(()=>{var s;(s=e.value)==null||s.querySelectorAll("input[type=checkbox]").forEach(r=>{r.setAttribute("tabindex","-1")})});function a(s,r){var c,d;const u=t.value.getNode(s[r].dataset.key);return u.canFocus&&u.visible&&(((c=u.parent)==null?void 0:c.expanded)||((d=u.parent)==null?void 0:d.level)===0)}Ht(e,"keydown",s=>{const r=s.target;if(!r.className.includes(n.b("node")))return;const u=Gt(s),c=Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)),d=c.indexOf(r);let f;if([ye.up,ye.down].includes(u)){if(s.preventDefault(),u===ye.up){f=d===-1?0:d!==0?d-1:c.length-1;const g=f;for(;!a(c,f);){if(f--,f===g){f=-1;break}f<0&&(f=c.length-1)}}else{f=d===-1?0:d=c.length&&(f=0)}}f!==-1&&c[f].focus()}[ye.left,ye.right].includes(u)&&(s.preventDefault(),r.click());const p=r.querySelector('[type="checkbox"]');[ye.enter,ye.numpadEnter,ye.space].includes(u)&&p&&(s.preventDefault(),p.click())});const o=()=>{var u;if(!e.value)return;const s=Array.from(e.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`));Array.from(e.value.querySelectorAll("input[type=checkbox]")).forEach(c=>{c.setAttribute("tabindex","-1")});const r=e.value.querySelectorAll(`.${n.is("checked")}[role=treeitem]`);if(r.length){r[0].setAttribute("tabindex","0");return}(u=s[0])==null||u.setAttribute("tabindex","0")}}var HU=ue({name:"ElTree",components:{ElTreeNode:FU},props:J2,emits:MU,setup(e,t){const{t:n}=St(),a=he("tree"),l=D(new PU({key:e.nodeKey,data:e.data,lazy:e.lazy,props:e.props,load:e.load,currentNodeKey:e.currentNodeKey,checkStrictly:e.checkStrictly,checkDescendants:e.checkDescendants,defaultCheckedKeys:e.defaultCheckedKeys,defaultExpandedKeys:e.defaultExpandedKeys,autoExpandParent:e.autoExpandParent,defaultExpandAll:e.defaultExpandAll,filterNodeMethod:e.filterNodeMethod}));l.value.initialize();const o=D(l.value.root),s=D(null),r=D(null),u=D(null),{broadcastExpanded:c}=ex(e),{dragState:d}=RU({props:e,ctx:t,el$:r,dropIndicator$:u,store:l});zU({el$:r},l);const f=ht(),p=w(()=>{let L=f==null?void 0:f.parent;for(;L;){if(L.type.name==="ElTreeSelect")return!0;L=L.parent}return!1}),g=w(()=>{const{childNodes:L}=o.value;return(!L||L.length===0||L.every(({visible:K})=>!K))&&!p.value});fe(()=>e.currentNodeKey,L=>{l.value.setCurrentNodeKey(L??null)}),fe(()=>e.defaultCheckedKeys,(L,K)=>{cn(L,K)||l.value.setDefaultCheckedKey(L??[])}),fe(()=>e.defaultExpandedKeys,L=>{l.value.setDefaultExpandedKeys(L??[])}),fe(()=>e.data,L=>{l.value.setData(L)},{deep:!0}),fe(()=>e.checkStrictly,L=>{l.value.checkStrictly=L});const m=L=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");l.value.filter(L)},v=L=>e.nodeKey?$m(e.nodeKey,L.data):L.id,h=L=>{if(!e.nodeKey)throw new Error(`[Tree] nodeKey is required in ${L}`)},b=L=>{h("getNodePath");const K=l.value.getNode(L);if(!K)return[];const j=[K.data];let X=K.parent;for(;X&&X!==o.value;)j.push(X.data),X=X.parent;return j.reverse()},y=(L,K)=>l.value.getCheckedNodes(L,K),C=L=>l.value.getCheckedKeys(L),S=()=>{const L=l.value.getCurrentNode();return L?L.data:null},k=()=>{h("getCurrentKey");const L=S();return L?L[e.nodeKey]:null},x=(L,K)=>{h("setCheckedNodes"),l.value.setCheckedNodes(L,K)},T=(L,K)=>{h("setCheckedKeys"),l.value.setCheckedKeys(L,K)},E=(L,K,j=!1)=>{l.value.setChecked(L,K,j)},$=()=>l.value.getHalfCheckedNodes(),M=()=>l.value.getHalfCheckedKeys(),P=(L,K=!0)=>{h("setCurrentNode"),Ov(l,t.emit,()=>{c(L),l.value.setUserCurrentNode(L,K)})},N=(L=null,K=!0)=>{h("setCurrentKey"),Ov(l,t.emit,()=>{c(),l.value.setCurrentNodeKey(L,K)})},A=L=>l.value.getNode(L),q=L=>{l.value.remove(L)},z=(L,K)=>{l.value.append(L,K)},V=(L,K)=>{l.value.insertBefore(L,K)},B=(L,K)=>{l.value.insertAfter(L,K)},_=(L,K,j)=>{c(K),t.emit("node-expand",L,K,j)},F=(L,K)=>{h("updateKeyChildren"),l.value.updateChildren(L,K)};return Tt(Tm,{ctx:t,props:e,store:l,root:o,currentNode:s,instance:f}),Tt(Hl,void 0),{ns:a,store:l,root:o,currentNode:s,dragState:d,el$:r,dropIndicator$:u,isEmpty:g,filter:m,getNodeKey:v,getNodePath:b,getCheckedNodes:y,getCheckedKeys:C,getCurrentNode:S,getCurrentKey:k,setCheckedNodes:x,setCheckedKeys:T,setChecked:E,getHalfCheckedNodes:$,getHalfCheckedKeys:M,setCurrentNode:P,setCurrentKey:N,t:n,getNode:A,remove:q,append:z,insertBefore:V,insertAfter:B,handleNodeExpand:_,updateKeyChildren:F}}});function KU(e,t,n,a,l,o){const s=_t("el-tree-node");return O(),H("div",{ref:"el$",class:I([e.ns.b(),e.ns.is("dragging",!!e.dragState.draggingNode),e.ns.is("drop-not-allow",!e.dragState.allowDrop),e.ns.is("drop-inner",e.dragState.dropType==="inner"),{[e.ns.m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[(O(!0),H(ze,null,bt(e.root.childNodes,r=>(O(),oe(s,{key:e.getNodeKey(r),node:r,props:e.props,accordion:e.accordion,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,"render-content":e.renderContent,onNodeExpand:e.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),e.isEmpty?(O(),H("div",{key:0,class:I(e.ns.e("empty-block"))},[ne(e.$slots,"empty",{},()=>[W("span",{class:I(e.ns.e("empty-text"))},Se(e.emptyText??e.t("el.tree.emptyText")),3)])],2)):te("v-if",!0),ft(W("div",{ref:"dropIndicator$",class:I(e.ns.e("drop-indicator"))},null,2),[[At,e.dragState.showDropIndicator]])],2)}var WU=Rn(HU,[["render",KU]]);const Om=it(WU),jU=(e,{attrs:t,emit:n},{select:a,tree:l,key:o})=>{const s=he("tree-select");fe(()=>e.data,()=>{e.filterable&&Ae(()=>{var u,c;(c=l.value)==null||c.filter((u=a.value)==null?void 0:u.states.inputValue)})},{flush:"post"});const r=u=>{var d,f;const c=u.at(-1);if(c.expanded&&c.childNodes.at(-1))r([c.childNodes.at(-1)]);else{(f=(d=l.value.el$)==null?void 0:d.querySelector(`[data-key="${u.at(-1).key}"]`))==null||f.focus({preventScroll:!0});return}};return mt(()=>{Ht(()=>{var u;return(u=a.value)==null?void 0:u.$el},"keydown",async u=>{const c=Gt(u),{dropdownMenuVisible:d}=a.value;[ye.down,ye.up].includes(c)&&d&&(await Ae(),setTimeout(()=>{var f,p,g;if(ye.up===c){const m=l.value.store.root.childNodes;r(m);return}(g=(p=(f=a.value.optionsArray[a.value.states.hoveringIndex].$el)==null?void 0:f.parentNode)==null?void 0:p.parentNode)==null||g.focus({preventScroll:!0})}))},{capture:!0})}),{...Ll(Vn(e),Object.keys(Ko.props)),...t,class:w(()=>t.class),style:w(()=>t.style),"onUpdate:modelValue":u=>n(rt,u),valueKey:o,popperClass:w(()=>[s.e("popper"),e.popperClass]),filterMethod:(u="")=>{var c;e.filterMethod?e.filterMethod(u):e.remoteMethod?e.remoteMethod(u):(c=l.value)==null||c.filter(u)}}},qU=ue({extends:qc,setup(e,t){const n=qc.setup(e,t);delete n.selectOptionClick;const a=ht().proxy;return Ae(()=>{n.select.states.cachedOptions.get(a.value)||n.select.onOptionCreate(a)}),fe(()=>t.attrs.visible,l=>{Ae(()=>{n.states.visible=l})},{immediate:!0}),n},methods:{selectOptionClick(){this.$el.parentElement.click()}}});function Iv(e){return e||e===0}function Nm(e){return me(e)&&e.length}function Ws(e){return me(e)?e:Iv(e)?[e]:[]}function wc(e,t,n,a,l){for(let o=0;o{fe([()=>e.modelValue,o],()=>{e.showCheckbox&&Ae(()=>{const m=o.value;m&&!cn(m.getCheckedKeys(),Ws(e.modelValue))&&m.setCheckedKeys(Ws(e.modelValue))})},{immediate:!0,deep:!0});const r=w(()=>({value:s.value,label:"label",children:"children",disabled:"disabled",isLeaf:"isLeaf",...e.props})),u=(m,v)=>{var b;const h=r.value[m];return We(h)?h(v,(b=o.value)==null?void 0:b.getNode(u("value",v))):v[h]},c=Ws(e.modelValue).map(m=>wc(e.data||[],v=>u("value",v)===m,v=>u("children",v),(v,h,b,y)=>y&&u("value",y))).filter(m=>Iv(m)),d=w(()=>{if(!e.renderAfterExpand&&!e.lazy)return[];const m=[];return Sc(e.data.concat(e.cacheData),v=>{const h=u("value",v);m.push({value:h,currentLabel:u("label",v),isDisabled:u("disabled",v)})},v=>u("children",v)),m}),f=()=>{var m;return(m=o.value)==null?void 0:m.getCheckedKeys().filter(v=>{var b;const h=(b=o.value)==null?void 0:b.getNode(v);return!vn(h)&&pa(h.childNodes)})},p=m=>{cn(e.modelValue,m)||a(yt,m)};function g(m){a(rt,m),p(m)}return{...Ll(Vn(e),Object.keys(Om.props)),...t,nodeKey:s,expandOnClickNode:w(()=>!e.checkStrictly&&e.expandOnClickNode),defaultExpandedKeys:w(()=>e.defaultExpandedKeys?e.defaultExpandedKeys.concat(c):c),renderContent:(m,{node:v,data:h,store:b})=>m(qU,{value:u("value",h),label:u("label",h),disabled:u("disabled",h),visible:v.visible},e.renderContent?()=>e.renderContent(m,{node:v,data:h,store:b}):n.default?()=>n.default({node:v,data:h,store:b}):void 0),filterNodeMethod:(m,v,h)=>e.filterNodeMethod?e.filterNodeMethod(m,v,h):m?new RegExp(gh(m),"i").test(u("label",v)||""):!0,onNodeClick:(m,v,h)=>{var b,y,C;if((b=t.onNodeClick)==null||b.call(t,m,v,h),!(e.showCheckbox&&e.checkOnClickNode))if(!e.showCheckbox&&(e.checkStrictly||v.isLeaf)){if(!u("disabled",m)){const S=(y=l.value)==null?void 0:y.states.options.get(u("value",m));(C=l.value)==null||C.handleOptionSelect(S)}}else e.expandOnClickNode&&h.proxy.handleExpandIconClick()},onCheck:(m,v)=>{var k;if(!e.showCheckbox)return;const h=u("value",m),b={};Sc([o.value.store.root],x=>b[x.key]=x,x=>x.childNodes);const y=v.checkedKeys,C=e.multiple?Ws(e.modelValue).filter(x=>!(x in b)&&!y.includes(x)):[],S=C.concat(y);if(e.checkStrictly)g(e.multiple?S:S.includes(h)?h:void 0);else if(e.multiple){const x=f();g(C.concat(x))}else{const x=wc([m],$=>!Nm(u("children",$))&&!u("disabled",$),$=>u("children",$)),T=x?u("value",x):void 0,E=Iv(e.modelValue)&&!!wc([m],$=>u("value",$)===e.modelValue,$=>u("children",$));g(T===e.modelValue||E?void 0:T)}Ae(()=>{var T;const x=Ws(e.modelValue);o.value.setCheckedKeys(x),(T=t.onCheck)==null||T.call(t,m,{checkedKeys:o.value.getCheckedKeys(),checkedNodes:o.value.getCheckedNodes(),halfCheckedKeys:o.value.getHalfCheckedKeys(),halfCheckedNodes:o.value.getHalfCheckedNodes()})}),(k=l.value)==null||k.focus()},onNodeExpand:(m,v,h)=>{var b;(b=t.onNodeExpand)==null||b.call(t,m,v,h),Ae(()=>{if(!e.checkStrictly&&e.lazy&&e.multiple&&v.checked){const y={},C=o.value.getCheckedKeys();Sc([o.value.store.root],x=>y[x.key]=x,x=>x.childNodes);const S=Ws(e.modelValue).filter(x=>!(x in y)&&!C.includes(x)),k=f();g(S.concat(k))}})},cacheOptions:d}};var UU=ue({props:{data:{type:Array,default:()=>[]}},setup(e){const t=Fe(mu);return fe(()=>e.data,()=>{var a;e.data.forEach(l=>{t.states.cachedOptions.has(l.value)||t.states.cachedOptions.set(l.value,l)});const n=((a=t.selectRef)==null?void 0:a.querySelectorAll("input"))||[];It&&!Array.from(n).includes(document.activeElement)&&t.setSelected()},{flush:"post",immediate:!0}),()=>{}}}),GU=ue({name:"ElTreeSelect",inheritAttrs:!1,props:{...qC,...J2,cacheData:{type:Array,default:()=>[]}},setup(e,t){const{slots:n,expose:a,emit:l,attrs:o}=t,s={...o,onChange:void 0},r=D(),u=D(),c=w(()=>e.nodeKey||e.valueKey||"value"),d=jU(e,{attrs:o,emit:l},{select:r,tree:u,key:c}),{cacheOptions:f,...p}=YU(e,{attrs:s,slots:n,emit:l},{select:r,tree:u,key:c}),g=Ft({});return a(g),mt(()=>{Object.assign(g,{...Ll(u.value,["filter","updateKeyChildren","getCheckedNodes","setCheckedNodes","getCheckedKeys","setCheckedKeys","setChecked","getHalfCheckedNodes","getHalfCheckedKeys","getCurrentKey","getCurrentNode","setCurrentKey","setCurrentNode","getNode","remove","append","insertBefore","insertAfter"]),...Ll(r.value,["focus","blur","selectedLabel"]),treeRef:u.value,selectRef:r.value})}),()=>Ge(Ko,Ft({...d,ref:m=>r.value=m}),{...n,default:()=>[Ge(UU,{data:f.value}),Ge(Om,Ft({...p,ref:m=>u.value=m}))]})}}),XU=GU;const JU=it(XU),Mm=Symbol(),ZU={key:-1,level:-1,data:{}},nx={type:Number,default:26},QU=$e({data:{type:G(Array),default:()=>dn([])},emptyText:{type:String},height:{type:Number,default:200},props:{type:G(Object),default:()=>dn({children:"children",label:"label",disabled:"disabled",value:"id",class:""})},highlightCurrent:Boolean,showCheckbox:Boolean,defaultCheckedKeys:{type:G(Array),default:()=>dn([])},checkStrictly:Boolean,defaultExpandedKeys:{type:G(Array),default:()=>dn([])},indent:{type:Number,default:16},itemSize:nx,icon:{type:Ut},expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkOnClickLeaf:{type:Boolean,default:!0},currentNodeKey:{type:G([String,Number])},accordion:Boolean,filterMethod:{type:G(Function)},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:Boolean}),eG=$e({node:{type:G(Object),default:()=>dn(ZU)},expanded:Boolean,checked:Boolean,indeterminate:Boolean,showCheckbox:Boolean,disabled:Boolean,current:Boolean,hiddenExpandIcon:Boolean,itemSize:nx}),tG=$e({node:{type:G(Object),required:!0}}),ax="node-click",lx="node-drop",ox="node-expand",sx="node-collapse",rx="current-change",ix="check",ux="check-change",cx="node-contextmenu",nG={[ax]:(e,t,n)=>e&&t&&n,[lx]:(e,t,n)=>e&&t&&n,[ox]:(e,t)=>e&&t,[sx]:(e,t)=>e&&t,[rx]:(e,t)=>e&&t,[ix]:(e,t)=>e&&t,[ux]:(e,t)=>e&&Wt(t),[cx]:(e,t,n)=>e&&t&&n},aG={click:(e,t)=>!!(e&&t),drop:(e,t)=>!!(e&&t),toggle:e=>!!e,check:(e,t)=>e&&Wt(t)};function lG(e,t){const n=D(new Set),a=D(new Set),{emit:l}=ht();fe([()=>t.value,()=>e.defaultCheckedKeys],()=>Ae(()=>{y(e.defaultCheckedKeys)}),{immediate:!0});const o=(C=!1)=>{if(!t.value||!e.showCheckbox||e.checkStrictly&&!C)return;const{levelTreeNodeMap:S,maxLevel:k}=t.value,x=n.value,T=new Set;for(let E=k;E>=1;--E){const $=S.get(E);$&&$.forEach(M=>{const P=M.children;let N=!M.isLeaf||M.disabled||x.has(M.key);if(P){let A=!0,q=!1;for(const z of P){const V=z.key;if(z.isEffectivelyChecked||(N=!1),x.has(V))q=!0;else if(T.has(V)){A=!1,q=!0;break}else A=!1}A?x.add(M.key):q?(T.add(M.key),x.delete(M.key)):(x.delete(M.key),T.delete(M.key))}M.isEffectivelyChecked=N})}a.value=T},s=C=>n.value.has(C.key),r=C=>a.value.has(C.key),u=(C,S,k=!0,x=!0,T=!1)=>{const E=n.value,$=C.children;(!e.checkStrictly||T)&&k&&($!=null&&$.length)&&(S=$.some(P=>!P.isEffectivelyChecked));const M=(P,N)=>{E[N?"add":"delete"](P.key);const A=P.children;(!e.checkStrictly||T)&&A&&A.forEach(q=>{(!q.disabled||q.children)&&M(q,N)})};M(C,S),x&&o(),k&&c(C,S)},c=(C,S)=>{const{checkedNodes:k,checkedKeys:x}=m(),{halfCheckedNodes:T,halfCheckedKeys:E}=v();l(ix,C.data,{checkedKeys:x,checkedNodes:k,halfCheckedKeys:E,halfCheckedNodes:T}),l(ux,C.data,S)};function d(C=!1){return m(C).checkedKeys}function f(C=!1){return m(C).checkedNodes}function p(){return v().halfCheckedKeys}function g(){return v().halfCheckedNodes}function m(C=!1){const S=[],k=[];if(t!=null&&t.value&&e.showCheckbox){const{treeNodeMap:x}=t.value;n.value.forEach(T=>{const E=x.get(T);E&&(!C||C&&E.isLeaf)&&(k.push(T),S.push(E.data))})}return{checkedKeys:k,checkedNodes:S}}function v(){const C=[],S=[];if(t!=null&&t.value&&e.showCheckbox){const{treeNodeMap:k}=t.value;a.value.forEach(x=>{const T=k.get(x);T&&(S.push(x),C.push(T.data))})}return{halfCheckedNodes:C,halfCheckedKeys:S}}function h(C){n.value.clear(),a.value.clear(),Ae(()=>{y(C)})}function b(C,S,k){if(t!=null&&t.value&&e.showCheckbox){const x=t.value.treeNodeMap.get(C);x&&u(x,S,!1,void 0,k)}}function y(C){if(t!=null&&t.value){const{treeNodeMap:S}=t.value;if(e.showCheckbox&&S){for(const k of C){const x=S.get(k);x&&!s(x)&&u(x,!0,!1,!1)}o()}}}return{updateCheckedKeys:o,toggleCheckbox:u,isChecked:s,isIndeterminate:r,getCheckedKeys:d,getCheckedNodes:f,getHalfCheckedKeys:p,getHalfCheckedNodes:g,setChecked:b,setCheckedKeys:h}}function oG(e,t){const n=D(new Set([])),a=D(new Set([])),l=w(()=>We(e.filterMethod));function o(r){var v;if(!l.value)return;const u=new Set,c=a.value,d=n.value,f=[],p=((v=t.value)==null?void 0:v.treeNodes)||[],g=e.filterMethod;d.clear();function m(h){h.forEach(b=>{f.push(b),g!=null&&g(r,b.data,b)?f.forEach(C=>{u.add(C.key),C.expanded=!0}):(b.expanded=!1,b.isLeaf&&d.add(b.key));const y=b.children;if(y&&m(y),!b.isLeaf){if(!u.has(b.key))d.add(b.key);else if(y){let C=!0;for(const S of y)if(!d.has(S.key)){C=!1;break}C?c.add(b.key):c.delete(b.key)}}f.pop()})}return m(p),u}function s(r){return a.value.has(r.key)}return{hiddenExpandIconKeySet:a,hiddenNodeKeySet:n,doFilter:o,isForceHiddenExpandIcon:s}}function sG(e,t){const n=D(new Set),a=D(),l=xt(),o=D(),{isIndeterminate:s,isChecked:r,toggleCheckbox:u,getCheckedKeys:c,getCheckedNodes:d,getHalfCheckedKeys:f,getHalfCheckedNodes:p,setChecked:g,setCheckedKeys:m}=lG(e,l),{doFilter:v,hiddenNodeKeySet:h,isForceHiddenExpandIcon:b}=oG(e,l),y=w(()=>{var R;return((R=e.props)==null?void 0:R.value)||"id"}),C=w(()=>{var R;return((R=e.props)==null?void 0:R.children)||"children"}),S=w(()=>{var R;return((R=e.props)==null?void 0:R.disabled)||"disabled"}),k=w(()=>{var R;return((R=e.props)==null?void 0:R.label)||"label"}),x=w(()=>{var de;const R=n.value,Y=h.value,ae=[],le=((de=l.value)==null?void 0:de.treeNodes)||[],se=[];for(let be=le.length-1;be>=0;--be)se.push(le[be]);for(;se.length;){const be=se.pop();if(!Y.has(be.key)&&(ae.push(be),be.children&&R.has(be.key)))for(let we=be.children.length-1;we>=0;--we)se.push(be.children[we])}return ae}),T=w(()=>x.value.length>0);function E(R){const Y=new Map,ae=new Map;let le=1;function se(be,we=1,Oe=void 0){var Ie;const Ce=[];for(const ge of be){const ke=P(ge),Le={level:we,key:ke,data:ge};Le.label=A(ge),Le.parent=Oe;const qe=M(ge);Le.disabled=N(ge),Le.isLeaf=!qe||qe.length===0,Le.expanded=n.value.has(ke),qe&&qe.length&&(Le.children=se(qe,we+1,Le)),Ce.push(Le),Y.set(ke,Le),ae.has(we)||ae.set(we,[]),(Ie=ae.get(we))==null||Ie.push(Le)}return we>le&&(le=we),Ce}const de=se(R);return{treeNodeMap:Y,levelTreeNodeMap:ae,maxLevel:le,treeNodes:de}}function $(R){const Y=v(R);Y&&(n.value=Y)}function M(R){return R[C.value]}function P(R){return R?R[y.value]:""}function N(R){return R[S.value]}function A(R){return R[k.value]}function q(R){n.value.has(R.key)?K(R):L(R)}function z(R){const Y=new Set,ae=l.value.treeNodeMap;n.value.forEach(le=>{const se=ae.get(le);se&&(se.expanded=!1)}),R.forEach(le=>{let se=ae.get(le);for(;se&&!Y.has(se.key);)Y.add(se.key),se.expanded=!0,se=se.parent}),n.value=Y}function V(R,Y){_(R),t(ax,R.data,R,Y),e.expandOnClickNode&&q(R),e.showCheckbox&&(e.checkOnClickNode||R.isLeaf&&e.checkOnClickLeaf)&&!R.disabled&&u(R,!r(R),!0)}function B(R,Y){t(lx,R.data,R,Y)}function _(R){X(R)||(a.value=R.key,t(rx,R.data,R))}function F(R,Y){u(R,Y)}function L(R){const Y=n.value;if(l.value&&e.accordion){const{treeNodeMap:le}=l.value;Y.forEach(se=>{const de=le.get(se);R&&R.level===(de==null?void 0:de.level)&&(Y.delete(se),de.expanded=!1)})}Y.add(R.key);const ae=ve(R.key);ae&&(ae.expanded=!0,t(ox,ae.data,ae))}function K(R){n.value.delete(R.key);const Y=ve(R.key);Y&&(Y.expanded=!1,t(sx,Y.data,Y))}function j(R){return!!R.disabled}function X(R){const Y=a.value;return Y!==void 0&&Y===R.key}function Z(){var R,Y;if(a.value!==void 0)return(Y=(R=l.value)==null?void 0:R.treeNodeMap.get(a.value))==null?void 0:Y.data}function Q(){return a.value}function ee(R){a.value=R}function ie(R){l.value=E(R)}function ve(R){var ae;const Y=st(R)?P(R):R;return(ae=l.value)==null?void 0:ae.treeNodeMap.get(Y)}function pe(R,Y="auto"){const ae=ve(R);ae&&o.value&&o.value.scrollToItem(x.value.indexOf(ae),Y)}function re(R){var Y;(Y=o.value)==null||Y.scrollTo(R)}return fe(()=>e.currentNodeKey,R=>{a.value=R},{immediate:!0}),fe(()=>e.defaultExpandedKeys,R=>{z(R||[])}),fe(()=>e.data,R=>{ie(R),z(e.defaultExpandedKeys||[])},{immediate:!0}),{tree:l,flattenTree:x,isNotEmpty:T,listRef:o,getKey:P,getChildren:M,toggleExpand:q,toggleCheckbox:u,isChecked:r,isIndeterminate:s,isDisabled:j,isCurrent:X,isForceHiddenExpandIcon:b,handleNodeClick:V,handleNodeDrop:B,handleNodeCheck:F,getCurrentNode:Z,getCurrentKey:Q,setCurrentKey:ee,getCheckedKeys:c,getCheckedNodes:d,getHalfCheckedKeys:f,getHalfCheckedNodes:p,setChecked:g,setCheckedKeys:m,filter:$,setData:ie,getNode:ve,expandNode:L,collapseNode:K,setExpandedKeys:z,scrollToNode:pe,scrollTo:re}}var rG=ue({name:"ElTreeNodeContent",props:tG,setup(e){const t=Fe(Mm),n=he("tree");return()=>{const a=e.node,{data:l}=a;return t!=null&&t.ctx.slots.default?t.ctx.slots.default({node:a,data:l}):Ge(Em,{tag:"span",truncated:!0,class:n.be("node","label")},()=>[a==null?void 0:a.label])}}});const iG=["aria-expanded","aria-disabled","aria-checked","data-key"];var uG=ue({name:"ElTreeNode",__name:"tree-node",props:eG,emits:aG,setup(e,{emit:t}){const n=e,a=t,l=Fe(Mm),o=he("tree"),s=w(()=>(l==null?void 0:l.props.indent)??16),r=w(()=>(l==null?void 0:l.props.icon)??qS),u=m=>{var b;const v=(b=l==null?void 0:l.props.props)==null?void 0:b.class;if(!v)return{};let h;if(We(v)){const{data:y}=m;h=v(y,m)}else h=v;return De(h)?{[h]:!0}:h},c=m=>{a("click",n.node,m)},d=m=>{a("drop",n.node,m)},f=()=>{a("toggle",n.node)},p=m=>{a("check",n.node,m)},g=m=>{var v,h,b,y;(b=(h=(v=l==null?void 0:l.instance)==null?void 0:v.vnode)==null?void 0:h.props)!=null&&b.onNodeContextmenu&&(m.stopPropagation(),m.preventDefault()),l==null||l.ctx.emit(cx,m,(y=n.node)==null?void 0:y.data,n.node)};return(m,v)=>{var h,b,y;return O(),H("div",{ref:"node$",class:I([i(o).b("node"),i(o).is("expanded",e.expanded),i(o).is("current",e.current),i(o).is("focusable",!e.disabled),i(o).is("checked",!e.disabled&&e.checked),u(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.disabled,"aria-checked":e.checked,"data-key":(h=e.node)==null?void 0:h.key,onClick:Je(c,["stop"]),onContextmenu:g,onDragover:v[1]||(v[1]=Je(()=>{},["prevent"])),onDragenter:v[2]||(v[2]=Je(()=>{},["prevent"])),onDrop:Je(d,["stop"])},[W("div",{class:I(i(o).be("node","content")),style:je({paddingLeft:`${(e.node.level-1)*s.value}px`,height:e.itemSize+"px"})},[r.value?(O(),oe(i(Ve),{key:0,class:I([i(o).is("leaf",!!((b=e.node)!=null&&b.isLeaf)),i(o).is("hidden",e.hiddenExpandIcon),{expanded:!((y=e.node)!=null&&y.isLeaf)&&e.expanded},i(o).be("node","expand-icon")]),onClick:Je(f,["stop"])},{default:J(()=>[(O(),oe(dt(r.value)))]),_:1},8,["class"])):te("v-if",!0),e.showCheckbox?(O(),oe(i(ll),{key:1,"model-value":e.checked,indeterminate:e.indeterminate,disabled:e.disabled,onChange:p,onClick:v[0]||(v[0]=Je(()=>{},["stop"]))},null,8,["model-value","indeterminate","disabled"])):te("v-if",!0),U(i(rG),{node:{...e.node,expanded:e.expanded}},null,8,["node"])],6)],42,iG)}}}),cG=uG,dG=ue({name:"ElTreeV2",__name:"tree",props:QU,emits:nG,setup(e,{expose:t,emit:n}){const a=e,l=n,o=mn(),s=w(()=>a.itemSize);Tt(Mm,{ctx:{emit:l,slots:o},props:a,instance:ht()}),Tt(Hl,void 0);const{t:r}=St(),u=he("tree"),{flattenTree:c,isNotEmpty:d,listRef:f,toggleExpand:p,isIndeterminate:g,isChecked:m,isDisabled:v,isCurrent:h,isForceHiddenExpandIcon:b,handleNodeClick:y,handleNodeDrop:C,handleNodeCheck:S,toggleCheckbox:k,getCurrentNode:x,getCurrentKey:T,setCurrentKey:E,getCheckedKeys:$,getCheckedNodes:M,getHalfCheckedKeys:P,getHalfCheckedNodes:N,setChecked:A,setCheckedKeys:q,filter:z,setData:V,getNode:B,expandNode:_,collapseNode:F,setExpandedKeys:L,scrollToNode:K,scrollTo:j}=sG(a,l);return t({toggleCheckbox:k,getCurrentNode:x,getCurrentKey:T,setCurrentKey:E,getCheckedKeys:$,getCheckedNodes:M,getHalfCheckedKeys:P,getHalfCheckedNodes:N,setChecked:A,setCheckedKeys:q,filter:z,setData:V,getNode:B,expandNode:_,collapseNode:F,setExpandedKeys:L,scrollToNode:K,scrollTo:j}),(X,Z)=>(O(),H("div",{class:I([i(u).b(),{[i(u).m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[i(d)?(O(),oe(i(bu),{key:0,ref_key:"listRef",ref:f,"class-name":i(u).b("virtual-list"),data:i(c),total:i(c).length,height:e.height,"item-size":s.value,"perf-mode":e.perfMode,"scrollbar-always-on":e.scrollbarAlwaysOn},{default:J(({data:Q,index:ee,style:ie})=>[(O(),oe(cG,{key:Q[ee].key,style:je(ie),node:Q[ee],expanded:Q[ee].expanded,"show-checkbox":e.showCheckbox,checked:i(m)(Q[ee]),indeterminate:i(g)(Q[ee]),"item-size":s.value,disabled:i(v)(Q[ee]),current:i(h)(Q[ee]),"hidden-expand-icon":i(b)(Q[ee]),onClick:i(y),onToggle:i(p),onCheck:i(S),onDrop:i(C)},null,8,["style","node","expanded","show-checkbox","checked","indeterminate","item-size","disabled","current","hidden-expand-icon","onClick","onToggle","onCheck","onDrop"]))]),_:1},8,["class-name","data","total","height","item-size","perf-mode","scrollbar-always-on"])):(O(),H("div",{key:1,class:I(i(u).e("empty-block"))},[ne(X.$slots,"empty",{},()=>[W("span",{class:I(i(u).e("empty-text"))},Se(e.emptyText??i(r)("el.tree.emptyText")),3)])],2))],2))}}),fG=dG;const pG=it(fG),vG="ElUpload";var hG=class extends Error{constructor(e,t,n,a){super(e),this.name="UploadAjaxError",this.status=t,this.method=n,this.url=a}};function y0(e,t,n){let a;return n.response?a=`${n.response.error||n.response}`:n.responseText?a=`${n.responseText}`:a=`fail to ${t.method} ${e} ${n.status}`,new hG(a,n.status,t.method,e)}function mG(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const gG=e=>{typeof XMLHttpRequest>"u"&&rn(vG,"XMLHttpRequest is undefined");const t=new XMLHttpRequest,n=e.action;t.upload&&t.upload.addEventListener("progress",o=>{const s=o;s.percent=o.total>0?o.loaded/o.total*100:0,e.onProgress(s)});const a=new FormData;if(e.data)for(const[o,s]of Object.entries(e.data))me(s)?s.length===2&&s[0]instanceof Blob&&De(s[1])?a.append(o,s[0],s[1]):s.forEach(r=>{a.append(o,r)}):a.append(o,s);a.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(y0(n,e,t))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(y0(n,e,t));e.onSuccess(mG(t))}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);const l=e.headers||{};if(l instanceof Headers)l.forEach((o,s)=>t.setRequestHeader(s,o));else for(const[o,s]of Object.entries(l))vn(s)||t.setRequestHeader(o,String(s));return t.send(a),t},dx=["text","picture","picture-card"];let bG=1;const Pv=()=>Date.now()+bG++,fx=$e({action:{type:String,default:"#"},headers:{type:G(Object)},method:{type:String,default:"post"},data:{type:G([Object,Function,Promise]),default:()=>dn({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:G(Array),default:()=>dn([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:dx,default:"text"},httpRequest:{type:G(Function),default:gG},disabled:{type:Boolean,default:void 0},limit:Number,directory:Boolean}),yG=$e({...fx,beforeUpload:{type:G(Function),default:vt},beforeRemove:{type:G(Function)},onRemove:{type:G(Function),default:vt},onChange:{type:G(Function),default:vt},onPreview:{type:G(Function),default:vt},onSuccess:{type:G(Function),default:vt},onProgress:{type:G(Function),default:vt},onError:{type:G(Function),default:vt},onExceed:{type:G(Function),default:vt},crossorigin:{type:G(String)}}),px=Symbol("uploadContextKey"),wG=$e({files:{type:G(Array),default:()=>dn([])},disabled:{type:Boolean,default:void 0},handlePreview:{type:G(Function),default:vt},listType:{type:String,values:dx,default:"text"},crossorigin:{type:G(String)}}),SG={remove:e=>!!e},CG=$e({...fx,beforeUpload:{type:G(Function),default:vt},onRemove:{type:G(Function),default:vt},onStart:{type:G(Function),default:vt},onSuccess:{type:G(Function),default:vt},onProgress:{type:G(Function),default:vt},onError:{type:G(Function),default:vt},onExceed:{type:G(Function),default:vt}}),kG=$e({disabled:{type:Boolean,default:void 0},directory:Boolean}),xG={file:e=>me(e)},EG=["tabindex","aria-disabled","onKeydown"],TG=["src","crossorigin"],$G=["onClick"],OG=["title"],NG=["onClick"],MG=["onClick"];var IG=ue({name:"ElUploadList",__name:"upload-list",props:wG,emits:SG,setup(e,{emit:t}){const n=e,a=t,{t:l}=St(),o=he("upload"),s=he("icon"),r=he("list"),u=sn(),c=D(!1),d=w(()=>[o.b("list"),o.bm("list",n.listType),o.is("disabled",u.value)]),f=async g=>{const m=g.relatedTarget;await Ae(),m!=null&&m.classList.contains(o.be("list","item"))||(c.value=!1)},p=g=>{a("remove",g)};return(g,m)=>(O(),oe(tw,{tag:"ul",class:I(d.value),name:i(r).b()},{default:J(()=>[(O(!0),H(ze,null,bt(e.files,(v,h)=>(O(),H("li",{key:v.uid||v.name,class:I([i(o).be("list","item"),i(o).is(v.status),{focusing:c.value}]),tabindex:i(u)?void 0:0,"aria-disabled":i(u),role:"button",onKeydown:an(b=>!i(u)&&p(v),["delete"]),onFocus:m[0]||(m[0]=b=>c.value=!0),onBlur:f,onClick:m[1]||(m[1]=b=>c.value=!1)},[ne(g.$slots,"default",{file:v,index:h},()=>[e.listType==="picture"||v.status!=="uploading"&&e.listType==="picture-card"?(O(),H("img",{key:0,class:I(i(o).be("list","item-thumbnail")),src:v.url,crossorigin:e.crossorigin,alt:""},null,10,TG)):te("v-if",!0),v.status==="uploading"||e.listType!=="picture-card"?(O(),H("div",{key:1,class:I(i(o).be("list","item-info"))},[W("a",{class:I(i(o).be("list","item-name")),onClick:Je(b=>e.handlePreview(v),["prevent"])},[U(i(Ve),{class:I(i(s).m("document"))},{default:J(()=>[U(i(i_))]),_:1},8,["class"]),W("span",{class:I(i(o).be("list","item-file-name")),title:v.name},Se(v.name),11,OG)],10,$G),v.status==="uploading"?(O(),oe(i(fm),{key:0,type:e.listType==="picture-card"?"circle":"line","stroke-width":e.listType==="picture-card"?6:2,percentage:Number(v.percentage),style:je(e.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):te("v-if",!0)],2)):te("v-if",!0),W("label",{class:I(i(o).be("list","item-status-label"))},[e.listType==="text"?(O(),oe(i(Ve),{key:0,class:I([i(s).m("upload-success"),i(s).m("circle-check")])},{default:J(()=>[U(i(Lh))]),_:1},8,["class"])):["picture-card","picture"].includes(e.listType)?(O(),oe(i(Ve),{key:1,class:I([i(s).m("upload-success"),i(s).m("check")])},{default:J(()=>[U(i(gr))]),_:1},8,["class"])):te("v-if",!0)],2),i(u)?te("v-if",!0):(O(),oe(i(Ve),{key:2,class:I(i(s).m("close")),"aria-label":i(l)("el.upload.delete"),role:"button",tabindex:"0",onClick:b=>p(v),onKeydown:an(Je(b=>p(v),["prevent"]),["enter","space"])},{default:J(()=>[U(i(Ya))]),_:1},8,["class","aria-label","onClick","onKeydown"])),i(u)?te("v-if",!0):(O(),H("i",{key:3,class:I(i(s).m("close-tip"))},Se(i(l)("el.upload.deleteTip")),3)),e.listType==="picture-card"?(O(),H("span",{key:4,class:I(i(o).be("list","item-actions"))},[W("span",{class:I(i(o).be("list","item-preview")),onClick:b=>e.handlePreview(v)},[U(i(Ve),{class:I(i(s).m("zoom-in"))},{default:J(()=>[U(i(XS))]),_:1},8,["class"])],10,NG),i(u)?te("v-if",!0):(O(),H("span",{key:0,class:I(i(o).be("list","item-delete")),onClick:b=>p(v)},[U(i(Ve),{class:I(i(s).m("delete"))},{default:J(()=>[U(i(s_))]),_:1},8,["class"])],10,MG))],2)):te("v-if",!0)])],42,EG))),128)),ne(g.$slots,"append")]),_:3},8,["class","name"]))}}),w0=IG;const S0="ElUploadDrag";var PG=ue({name:S0,__name:"upload-dragger",props:kG,emits:xG,setup(e,{emit:t}){const n=e,a=t;Fe(px)||rn(S0,"usage: ");const l=he("upload"),o=D(!1),s=sn(),r=p=>new Promise((g,m)=>p.file(g,m)),u=async p=>{try{if(p.isFile){const g=await r(p);return p.fullPath&&!g.webkitRelativePath&&Object.defineProperty(g,"webkitRelativePath",{value:p.fullPath.replace(/^\//,"")}),g.isDirectory=!1,[g]}if(p.isDirectory){const g=p.createReader(),m=()=>new Promise((C,S)=>g.readEntries(C,S)),v=[];let h=await m();for(;h.length>0;)v.push(...h),h=await m();const b=v.map(C=>u(C).catch(()=>[])),y=await Promise.all(b);return Lc(y)}}catch{return[]}return[]},c=async p=>{if(s.value)return;o.value=!1,p.stopPropagation();const g=Array.from(p.dataTransfer.files),m=p.dataTransfer.items||[];if(n.directory){const v=Array.from(m).map(b=>{var y;return(y=b==null?void 0:b.webkitGetAsEntry)==null?void 0:y.call(b)}).filter(b=>b),h=await Promise.all(v.map(u));a("file",Lc(h));return}g.forEach((v,h)=>{var y,C;const b=(C=(y=m[h])==null?void 0:y.webkitGetAsEntry)==null?void 0:C.call(y);b&&(v.isDirectory=b.isDirectory)}),a("file",g)},d=()=>{s.value||(o.value=!0)},f=p=>{p.currentTarget.contains(p.relatedTarget)||(o.value=!1)};return(p,g)=>(O(),H("div",{class:I([i(l).b("dragger"),i(l).is("dragover",o.value)]),onDrop:Je(c,["prevent"]),onDragover:Je(d,["prevent"]),onDragleave:Je(f,["prevent"])},[ne(p.$slots,"default")],34))}}),RG=PG;const _G=["tabindex","aria-disabled","onKeydown"],AG=["name","disabled","multiple","accept","webkitdirectory"];var LG=ue({name:"ElUploadContent",inheritAttrs:!1,__name:"upload-content",props:CG,setup(e,{expose:t}){const n=e,a=he("upload"),l=sn(),o=xt({}),s=xt(),r=v=>{if(v.length===0)return;const{autoUpload:h,limit:b,fileList:y,multiple:C,onStart:S,onExceed:k}=n;if(b&&y.length+v.length>b){k(v,y);return}C||(v=v.slice(0,1));for(const x of v){const T=x;T.uid=Pv(),S(T),h&&u(T)}},u=async v=>{if(s.value.value="",!n.beforeUpload)return d(v);let h,b={};try{const C=n.data,S=n.beforeUpload(v);b=mi(n.data)?El(n.data):n.data,h=await S,mi(n.data)&&cn(C,b)&&(b=El(n.data))}catch{h=!1}if(h===!1){n.onRemove(v);return}let y=v;h instanceof Blob&&(h instanceof File?y=h:y=new File([h],v.name,{type:v.type})),d(Object.assign(y,{uid:v.uid}),b)},c=async(v,h)=>We(v)?v(h):v,d=async(v,h)=>{const{headers:b,data:y,method:C,withCredentials:S,name:k,action:x,onProgress:T,onSuccess:E,onError:$,httpRequest:M}=n;try{h=await c(h??y,v)}catch{n.onRemove(v);return}const{uid:P}=v,N={headers:b||{},withCredentials:S,file:v,data:h,method:C,filename:k,action:x,onProgress:q=>{T(q,v)},onSuccess:q=>{E(q,v),delete o.value[P]},onError:q=>{$(q,v),delete o.value[P]}},A=M(N);o.value[P]=A,A instanceof Promise&&A.then(N.onSuccess,N.onError)},f=v=>{const h=v.target.files;h&&r(Array.from(h))},p=()=>{l.value||(s.value.value="",s.value.click())},g=()=>{p()};return t({abort:v=>{Gw(o.value).filter(v?([h])=>String(v.uid)===h:()=>!0).forEach(([h,b])=>{b instanceof XMLHttpRequest&&b.abort(),delete o.value[h]})},upload:u}),(v,h)=>(O(),H("div",{class:I([i(a).b(),i(a).m(e.listType),i(a).is("drag",e.drag),i(a).is("disabled",i(l))]),tabindex:i(l)?void 0:0,"aria-disabled":i(l),role:"button",onClick:p,onKeydown:an(Je(g,["self"]),["enter","space"])},[e.drag?(O(),oe(RG,{key:0,disabled:i(l),directory:e.directory,onFile:r},{default:J(()=>[ne(v.$slots,"default")]),_:3},8,["disabled","directory"])):ne(v.$slots,"default",{key:1}),W("input",{ref_key:"inputRef",ref:s,class:I(i(a).e("input")),name:e.name,disabled:i(l),multiple:e.multiple,accept:e.accept,webkitdirectory:e.directory||void 0,type:"file",onChange:f,onClick:h[0]||(h[0]=Je(()=>{},["stop"]))},null,42,AG)],42,_G))}}),C0=LG;const k0="ElUpload",x0=e=>{var t;(t=e.url)!=null&&t.startsWith("blob:")&&URL.revokeObjectURL(e.url)},DG=(e,t)=>{const n=rR(e,"fileList",void 0,{passive:!0}),a=m=>n.value.find(v=>v.uid===m.uid);function l(m){var v;(v=t.value)==null||v.abort(m)}function o(m=["ready","uploading","success","fail"]){n.value=n.value.filter(v=>!m.includes(v.status))}function s(m){n.value=n.value.filter(v=>v.uid!==m.uid)}const r=m=>{Ae(()=>e.onChange(m,n.value))},u=(m,v)=>{const h=a(v);h&&(console.error(m),h.status="fail",s(h),e.onError(m,h,n.value),r(h))},c=(m,v)=>{const h=a(v);h&&(e.onProgress(m,h,n.value),h.status="uploading",h.percentage=Math.round(m.percent))},d=(m,v)=>{const h=a(v);h&&(h.status="success",h.response=m,e.onSuccess(m,h,n.value),r(h))},f=m=>{vn(m.uid)&&(m.uid=Pv());const v={name:m.name,percentage:0,status:"ready",size:m.size,raw:m,uid:m.uid};if(e.listType==="picture-card"||e.listType==="picture")try{v.url=URL.createObjectURL(m)}catch(h){Kt(k0,h.message),e.onError(h,v,n.value)}n.value=[...n.value,v],r(v)},p=async m=>{const v=m instanceof File?a(m):m;v||rn(k0,"file to be removed not found");const h=b=>{l(b),s(b),e.onRemove(b,n.value),x0(b)};e.beforeRemove?await e.beforeRemove(v,n.value)!==!1&&h(v):h(v)};function g(){n.value.filter(({status:m})=>m==="ready").forEach(({raw:m})=>{var v;return m&&((v=t.value)==null?void 0:v.upload(m))})}return fe(()=>e.listType,m=>{m!=="picture-card"&&m!=="picture"||(n.value=n.value.map(v=>{const{raw:h,url:b}=v;if(!b&&h)try{v.url=URL.createObjectURL(h)}catch(y){e.onError(y,v,n.value)}return v}))}),fe(n,m=>{for(const v of m)v.uid||(v.uid=Pv()),v.status||(v.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:l,clearFiles:o,handleError:u,handleProgress:c,handleStart:f,handleSuccess:d,handleRemove:p,submit:g,revokeFileObjectURL:x0}};var BG=ue({name:"ElUpload",__name:"upload",props:yG,setup(e,{expose:t}){const n=e,a=sn(),l=xt(),{abort:o,submit:s,clearFiles:r,uploadFiles:u,handleStart:c,handleError:d,handleRemove:f,handleSuccess:p,handleProgress:g,revokeFileObjectURL:m}=DG(n,l),v=w(()=>n.listType==="picture-card"),h=w(()=>({...n,fileList:u.value,onStart:c,onProgress:g,onSuccess:p,onError:d,onRemove:f}));return zt(()=>{u.value.forEach(m)}),Tt(px,{accept:Ot(n,"accept")}),t({abort:o,submit:s,clearFiles:r,handleStart:c,handleRemove:f}),(b,y)=>(O(),H("div",null,[v.value&&e.showFileList?(O(),oe(w0,{key:0,disabled:i(a),"list-type":e.listType,files:i(u),crossorigin:e.crossorigin,"handle-preview":e.onPreview,onRemove:i(f)},va({append:J(()=>[U(C0,pt({ref_key:"uploadRef",ref:l},h.value),{default:J(()=>[b.$slots.trigger?ne(b.$slots,"trigger",{key:0}):te("v-if",!0),!b.$slots.trigger&&b.$slots.default?ne(b.$slots,"default",{key:1}):te("v-if",!0)]),_:3},16)]),_:2},[b.$slots.file?{name:"default",fn:J(({file:C,index:S})=>[ne(b.$slots,"file",{file:C,index:S})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):te("v-if",!0),!v.value||v.value&&!e.showFileList?(O(),oe(C0,pt({key:1,ref_key:"uploadRef",ref:l},h.value),{default:J(()=>[b.$slots.trigger?ne(b.$slots,"trigger",{key:0}):te("v-if",!0),!b.$slots.trigger&&b.$slots.default?ne(b.$slots,"default",{key:1}):te("v-if",!0)]),_:3},16)):te("v-if",!0),b.$slots.trigger?ne(b.$slots,"default",{key:2}):te("v-if",!0),ne(b.$slots,"tip"),!v.value&&e.showFileList?(O(),oe(w0,{key:3,disabled:i(a),"list-type":e.listType,files:i(u),crossorigin:e.crossorigin,"handle-preview":e.onPreview,onRemove:i(f)},va({_:2},[b.$slots.file?{name:"default",fn:J(({file:C,index:S})=>[ne(b.$slots,"file",{file:C,index:S})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):te("v-if",!0)]))}}),VG=BG;const FG=it(VG),zG=$e({zIndex:{type:Number,default:9},rotate:{type:Number,default:-22},width:Number,height:Number,image:String,content:{type:G([String,Array]),default:"Element Plus"},font:{type:G(Object)},gap:{type:G(Array),default:()=>[100,100]},offset:{type:G(Array)}});function HG(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function KG(e){return Object.keys(e).map(t=>`${HG(t)}: ${e[t]};`).join(" ")}function WG(){return window.devicePixelRatio||1}const jG=(e,t)=>{let n=!1;return e.removedNodes.length&&t&&(n=Array.from(e.removedNodes).includes(t)),e.type==="attributes"&&e.target===t&&(n=!0),n},qG={left:[0,.5],start:[0,.5],center:[.5,0],right:[1,-.5],end:[1,-.5]};function up(e,t,n=1){const a=document.createElement("canvas"),l=a.getContext("2d"),o=e*n,s=t*n;return a.setAttribute("width",`${o}px`),a.setAttribute("height",`${s}px`),l.save(),[l,a,o,s]}function YG(){function e(t,n,a,l,o,s,r,u,c){const[d,f,p,g]=up(l,o,a);let m=0;if(t instanceof HTMLImageElement)d.drawImage(t,0,0,p,g);else{const{color:j,fontSize:X,fontStyle:Z,fontWeight:Q,fontFamily:ee,textAlign:ie,textBaseline:ve}=s,pe=Number(X)*a;d.font=`${Z} normal ${Q} ${pe}px/${o}px ${ee}`,d.fillStyle=j,d.textAlign=ie,d.textBaseline=ve;const re=me(t)?t:[t];if(ve!=="top"&&re[0]){const R=d.measureText(re[0]);d.textBaseline="top";const Y=d.measureText(re[0]);m=R.actualBoundingBoxAscent-Y.actualBoundingBoxAscent}re==null||re.forEach((R,Y)=>{const[ae,le]=qG[ie];d.fillText(R??"",p*ae+c*le,Y*(pe+s.fontGap*a))})}const v=Math.PI/180*Number(n),h=Math.max(l,o),[b,y,C]=up(h,h,a);b.translate(C/2,C/2),b.rotate(v),p>0&&g>0&&b.drawImage(f,-p/2,-g/2);function S(j,X){return[j*Math.cos(v)-X*Math.sin(v),j*Math.sin(v)+X*Math.cos(v)]}let k=0,x=0,T=0,E=0;const $=p/2,M=g/2;[[0-$,0-M],[0+$,0-M],[0+$,0+M],[0-$,0+M]].forEach(([j,X])=>{const[Z,Q]=S(j,X);k=Math.min(k,Z),x=Math.max(x,Z),T=Math.min(T,Q),E=Math.max(E,Q)});const P=k+C/2,N=T+C/2,A=x-k,q=E-T,z=r*a,V=u*a,B=(A+z)*2,_=q+V,[F,L]=up(B,_);function K(j=0,X=0){F.drawImage(y,P,N,A,q,j,X+m,A,q)}return K(),K(A+z,-q/2-V/2),K(A+z,+q/2+V/2),[L.toDataURL(),B/a,_/a]}return e}var UG=ue({name:"ElWatermark",__name:"watermark",props:zG,setup(e){const t={position:"relative"},n=e,a=w(()=>{var P;return((P=n.font)==null?void 0:P.fontGap)??3}),l=w(()=>{var P;return((P=n.font)==null?void 0:P.color)??"rgba(0,0,0,.15)"}),o=w(()=>{var P;return((P=n.font)==null?void 0:P.fontSize)??16}),s=w(()=>{var P;return((P=n.font)==null?void 0:P.fontWeight)??"normal"}),r=w(()=>{var P;return((P=n.font)==null?void 0:P.fontStyle)??"normal"}),u=w(()=>{var P;return((P=n.font)==null?void 0:P.fontFamily)??"sans-serif"}),c=w(()=>{var P;return((P=n.font)==null?void 0:P.textAlign)??"center"}),d=w(()=>{var P;return((P=n.font)==null?void 0:P.textBaseline)??"hanging"}),f=w(()=>n.gap[0]),p=w(()=>n.gap[1]),g=w(()=>f.value/2),m=w(()=>p.value/2),v=w(()=>{var P;return((P=n.offset)==null?void 0:P[0])??g.value}),h=w(()=>{var P;return((P=n.offset)==null?void 0:P[1])??m.value}),b=()=>{const P={zIndex:n.zIndex,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let N=v.value-g.value,A=h.value-m.value;return N>0&&(P.left=`${N}px`,P.width=`calc(100% - ${N}px)`,N=0),A>0&&(P.top=`${A}px`,P.height=`calc(100% - ${A}px)`,A=0),P.backgroundPosition=`${N}px ${A}px`,P},y=xt(null),C=xt(),S=D(!1),k=()=>{C.value&&(C.value.remove(),C.value=void 0)},x=(P,N)=>{var A;y.value&&C.value&&(S.value=!0,C.value.setAttribute("style",KG({...b(),backgroundImage:`url('${P}')`,backgroundSize:`${Math.floor(N)}px`})),(A=y.value)==null||A.append(C.value),setTimeout(()=>{S.value=!1}))},T=P=>{let N=120,A=64,q=0;const{image:z,content:V,width:B,height:_,rotate:F}=n;if(!z&&P.measureText){P.font=`${Number(o.value)}px ${u.value}`;const L=me(V)?V:[V];let K=0,j=0;L.forEach(Z=>{const{width:Q,fontBoundingBoxAscent:ee,fontBoundingBoxDescent:ie,actualBoundingBoxAscent:ve,actualBoundingBoxDescent:pe}=P.measureText(Z),re=Et(ee)?ve+pe:ee+ie;Q>K&&(K=Math.ceil(Q)),re>j&&(j=Math.ceil(re))}),N=K,A=j*L.length+(L.length-1)*a.value;const X=Math.PI/180*Number(F);q=Math.ceil(Math.abs(Math.sin(X)*A)/2),N+=q}return[B??N,_??A,q]},E=YG(),$=()=>{const P=document.createElement("canvas").getContext("2d"),N=n.image,A=n.content,q=n.rotate;if(P){C.value||(C.value=document.createElement("div"));const z=WG(),[V,B,_]=T(P),F=L=>{const[K,j]=E(L||"",q,z,V,B,{color:l.value,fontSize:o.value,fontStyle:r.value,fontWeight:s.value,fontFamily:u.value,fontGap:a.value,textAlign:c.value,textBaseline:d.value},f.value,p.value,_);x(K,j)};if(N){const L=new Image;L.onload=()=>{F(L)},L.onerror=()=>{F(A)},L.crossOrigin="anonymous",L.referrerPolicy="no-referrer",L.src=N}else F(A)}};return mt(()=>{$()}),fe(()=>n,()=>{$()},{deep:!0,flush:"post"}),zt(()=>{k()}),$r(y,P=>{S.value||P.forEach(N=>{jG(N,C.value)&&(k(),$())})},{attributes:!0,subtree:!0,childList:!0}),(P,N)=>(O(),H("div",{ref_key:"containerRef",ref:y,style:je([t])},[ne(P.$slots,"default")],4))}}),GG=UG;const XG=it(GG),JG=["absolute","fixed"],ZG=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],Im=$e({placement:{type:G(String),values:ZG,default:"bottom"},reference:{type:G(Object),default:null},strategy:{type:G(String),values:JG,default:"absolute"},offset:{type:Number,default:10},showArrow:Boolean,zIndex:{type:Number,default:2001}}),QG={close:()=>!0},eX=$e({modelValue:Boolean,current:{type:Number},showArrow:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeIcon:{type:Ut},placement:Im.placement,contentStyle:{type:G([Object])},mask:{type:G([Boolean,Object]),default:!0},gap:{type:G(Object),default:()=>({offset:6,radius:2})},zIndex:{type:Number},scrollIntoViewOptions:{type:G([Boolean,Object]),default:()=>({block:"center"})},type:{type:G(String)},appendTo:{type:G([String,Object]),default:"body"},closeOnPressEscape:{type:Boolean,default:!0},targetAreaClickable:{type:Boolean,default:!0}}),tX={[rt]:e=>Wt(e),"update:current":e=>He(e),close:e=>He(e),finish:()=>!0,change:e=>He(e)},nX=$e({target:{type:G([String,Object,Function])},title:String,description:String,showClose:{type:Boolean,default:void 0},closeIcon:{type:Ut},showArrow:{type:Boolean,default:void 0},placement:Im.placement,mask:{type:G([Boolean,Object]),default:void 0},contentStyle:{type:G([Object])},prevButtonProps:{type:G(Object)},nextButtonProps:{type:G(Object)},scrollIntoViewOptions:{type:G([Boolean,Object]),default:void 0},type:{type:G(String)}}),aX={close:()=>!0},lX=(e,t,n,a,l)=>{const o=D(null),s=()=>{let d;return De(e.value)?d=document.querySelector(e.value):We(e.value)?d=e.value():d=e.value,d},r=()=>{const d=s();if(!d||!t.value){o.value=null;return}oX(d)||d.scrollIntoView(l.value);const{left:f,top:p,width:g,height:m}=d.getBoundingClientRect();o.value={left:f,top:p,width:g,height:m,radius:0}};mt(()=>{fe([t,e],()=>{r()},{immediate:!0}),window.addEventListener("resize",r)}),zt(()=>{window.removeEventListener("resize",r)});const u=d=>(me(n.value.offset)?n.value.offset[d]:n.value.offset)??6,c=w(()=>{var g;if(!o.value)return o.value;const d=u(0),f=u(1),p=((g=n.value)==null?void 0:g.radius)||2;return{left:o.value.left-d,top:o.value.top-f,width:o.value.width+d*2,height:o.value.height+f*2,radius:p}});return{mergedPosInfo:c,triggerTarget:w(()=>{const d=s();return!a.value||!d||!window.DOMRect?d||void 0:{getBoundingClientRect(){var f,p,g,m;return window.DOMRect.fromRect({width:((f=c.value)==null?void 0:f.width)||0,height:((p=c.value)==null?void 0:p.height)||0,x:((g=c.value)==null?void 0:g.left)||0,y:((m=c.value)==null?void 0:m.top)||0})}}})}},vf=Symbol("ElTour");function oX(e){const t=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,{top:a,right:l,bottom:o,left:s}=e.getBoundingClientRect();return a>=0&&s>=0&&l<=t&&o<=n}const sX=(e,t,n,a,l,o,s,r)=>{const u=D(),c=D(),d=D({}),f={x:u,y:c,placement:a,strategy:l,middlewareData:d},p=w(()=>{const b=[S3(i(o)),k3(),C3(),rX()];return i(r)&&i(n)&&b.push(x3({element:i(n)})),b}),g=async()=>{if(!It)return;const b=i(e),y=i(t);if(!b||!y)return;const C=await E3(b,y,{placement:i(a),strategy:i(l),middleware:i(p)});Ii(f).forEach(S=>{f[S].value=C[S]})},m=w(()=>{if(!i(e))return{position:"fixed",top:"50%",left:"50%",transform:"translate3d(-50%, -50%, 0)",maxWidth:"100vw",zIndex:i(s)};const{overflow:b}=i(d);return{position:i(l),zIndex:i(s),top:i(c)!=null?`${i(c)}px`:"",left:i(u)!=null?`${i(u)}px`:"",maxWidth:b!=null&&b.maxWidth?`${b==null?void 0:b.maxWidth}px`:""}}),v=w(()=>{if(!i(r))return{};const{arrow:b}=i(d);return{left:(b==null?void 0:b.x)!=null?`${b==null?void 0:b.x}px`:"",top:(b==null?void 0:b.y)!=null?`${b==null?void 0:b.y}px`:""}});let h;return mt(()=>{const b=i(e),y=i(t);b&&y&&(h=y3(b,y,g)),ia(()=>{g()})}),zt(()=>{h&&h()}),{update:g,contentStyle:m,arrowStyle:v}},rX=()=>({name:"overflow",async fn(e){const t=await w3(e);let n=0;return t.left>0&&(n=t.left),t.right>0&&(n=t.right),{data:{maxWidth:e.rects.floating.width-n}}}}),iX=$e({zIndex:{type:Number,default:1001},visible:Boolean,fill:{type:String,default:"rgba(0,0,0,0.5)"},pos:{type:G(Object)},targetAreaClickable:{type:Boolean,default:!0}}),uX={style:{width:"100%",height:"100%"}},cX=["d"];var dX=ue({name:"ElTourMask",inheritAttrs:!1,__name:"mask",props:iX,setup(e){const t=e,{ns:n}=Fe(vf),a=w(()=>{var d;return((d=t.pos)==null?void 0:d.radius)??2}),l=w(()=>{const d=a.value,f=`a${d},${d} 0 0 1`;return{topRight:`${f} ${d},${d}`,bottomRight:`${f} ${-d},${d}`,bottomLeft:`${f} ${-d},${-d}`,topLeft:`${f} ${d},${-d}`}}),{width:o,height:s}=hh(),r=w(()=>{const d=o.value,f=s.value,p=l.value,g=`M${d},0 L0,0 L0,${f} L${d},${f} L${d},0 Z`,m=a.value;return t.pos?`${g} M${t.pos.left+m},${t.pos.top} h${t.pos.width-m*2} ${p.topRight} v${t.pos.height-m*2} ${p.bottomRight} h${-t.pos.width+m*2} ${p.bottomLeft} v${-t.pos.height+m*2} ${p.topLeft} z`:g}),u=w(()=>({position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:t.zIndex,pointerEvents:t.pos&&t.targetAreaClickable?"none":"auto"})),c=w(()=>({fill:t.fill,pointerEvents:"auto",cursor:"auto"}));return Wd(Ot(t,"visible"),{ns:n}),(d,f)=>e.visible?(O(),H("div",pt({key:0,class:i(n).e("mask"),style:u.value},d.$attrs),[(O(),H("svg",uX,[W("path",{class:I(i(n).e("hollow")),style:je(c.value),d:r.value},null,14,cX)]))],16)):te("v-if",!0)}}),fX=dX;const pX=["data-side"];var vX=ue({name:"ElTourContent",__name:"content",props:Im,emits:QG,setup(e,{emit:t}){const n=e,a=t,l=D(n.placement),o=D(n.strategy),s=D(null),r=D(null);fe(()=>n.placement,()=>{l.value=n.placement});const{contentStyle:u,arrowStyle:c}=sX(Ot(n,"reference"),s,r,l,o,Ot(n,"offset"),Ot(n,"zIndex"),Ot(n,"showArrow")),d=w(()=>l.value.split("-")[0]),{ns:f}=Fe(vf),p=()=>{a("close")},g=m=>{m.detail.focusReason==="pointer"&&m.preventDefault()};return(m,v)=>(O(),H("div",{ref_key:"contentRef",ref:s,style:je(i(u)),class:I(i(f).e("content")),"data-side":d.value,tabindex:"-1"},[U(i(Nr),{loop:"",trapped:"","focus-start-el":"container","focus-trap-el":s.value||void 0,onReleaseRequested:p,onFocusoutPrevented:g},{default:J(()=>[ne(m.$slots,"default")]),_:3},8,["focus-trap-el"]),e.showArrow?(O(),H("span",{key:0,ref_key:"arrowRef",ref:r,style:je(i(c)),class:I(i(f).e("arrow"))},null,6)):te("v-if",!0)],14,pX))}}),hX=vX,mX=ue({name:"ElTourSteps",props:{current:{type:Number,default:0}},emits:["update-total"],setup(e,{slots:t,emit:n}){let a=0;return()=>{var u,c;const l=(u=t.default)==null?void 0:u.call(t),o=[];let s=0;function r(d){me(d)&&d.forEach(f=>{var p;((p=(f==null?void 0:f.type)||{})==null?void 0:p.name)==="ElTourStep"&&(o.push(f),s+=1)})}return l.length&&r($a((c=l[0])==null?void 0:c.children)),a!==s&&(a=s,n("update-total",s)),o.length?o[e.current]:null}}}),gX=ue({name:"ElTour",inheritAttrs:!1,__name:"tour",props:eX,emits:tX,setup(e,{emit:t}){const n=e,a=t,l=he("tour"),o=D(0),s=D(),r=w(()=>!Et(n.current)),u=D(n.current??0),c=w({get(){return Et(n.current)?u.value:n.current},set(N){(r.value?n.current:u.value)!==N&&(r.value||(u.value=N),a("update:current",N))}}),d=w(()=>{var N;return(N=s.value)==null?void 0:N.target}),f=w(()=>[l.b(),C.value==="primary"?l.m("primary"):""]),p=w(()=>{var N;return((N=s.value)==null?void 0:N.placement)||n.placement}),g=w(()=>{var N;return((N=s.value)==null?void 0:N.contentStyle)??n.contentStyle}),m=w(()=>{var N;return((N=s.value)==null?void 0:N.mask)??n.mask}),v=w(()=>!!m.value&&n.modelValue),h=w(()=>Wt(m.value)?void 0:m.value),b=w(()=>{var N;return!!d.value&&(((N=s.value)==null?void 0:N.showArrow)??n.showArrow)}),y=w(()=>{var N;return((N=s.value)==null?void 0:N.scrollIntoViewOptions)??n.scrollIntoViewOptions}),C=w(()=>{var N;return((N=s.value)==null?void 0:N.type)??n.type}),{nextZIndex:S}=cu(),k=S(),x=w(()=>n.zIndex??k),{mergedPosInfo:T,triggerTarget:E}=lX(d,Ot(n,"modelValue"),Ot(n,"gap"),m,y);fe(()=>n.current,N=>!Et(N)&&(u.value=N)),fe(c,(N,A)=>{!n.modelValue||N===A||a(yt,N)},{flush:"post"}),fe(()=>n.modelValue,N=>{!N&&c.value!==0&&(c.value=0)});const $=()=>{n.closeOnPressEscape&&(a(rt,!1),a("close",c.value))},M=N=>{o.value=N},P=mn();return Tt(vf,{currentStep:s,current:c,total:o,showClose:Ot(n,"showClose"),closeIcon:Ot(n,"closeIcon"),mergedType:C,ns:l,slots:P,updateModelValue(N){a(rt,N)},onClose(){a("close",c.value)},onFinish(){a("finish")}}),(N,A)=>{var q,z;return O(),H(ze,null,[(O(),oe(Cr,{to:e.appendTo},[W("div",pt({class:f.value},N.$attrs),[U(fX,{visible:v.value,fill:(q=h.value)==null?void 0:q.color,style:je((z=h.value)==null?void 0:z.style),pos:i(T),"z-index":x.value,"target-area-clickable":e.targetAreaClickable},null,8,["visible","fill","style","pos","z-index","target-area-clickable"]),e.modelValue?(O(),oe(hX,{key:c.value,reference:i(E),placement:p.value,"show-arrow":b.value,"z-index":x.value,style:je(g.value),onClose:$},{default:J(()=>[U(i(mX),{current:c.value,onUpdateTotal:M},{default:J(()=>[ne(N.$slots,"default")]),_:3},8,["current"])]),_:3},8,["reference","placement","show-arrow","z-index","style"])):te("v-if",!0)],16)],8,["to"])),te(" just for IDE "),te("v-if",!0)],64)}}}),bX=gX;const yX=["aria-label"];var wX=ue({name:"ElTourStep",__name:"step",props:nX,emits:aX,setup(e,{emit:t}){const n=e,a=t,{Close:l}=JS,{t:o}=St(),{currentStep:s,current:r,total:u,showClose:c,closeIcon:d,mergedType:f,ns:p,slots:g,updateModelValue:m,onClose:v,onFinish:h}=Fe(vf);fe(n,$=>{s.value=$},{immediate:!0});const b=w(()=>n.showClose??c.value),y=w(()=>n.closeIcon??d.value??l),C=$=>{if($)return _s($,["children","onClick"])},S=()=>{var $,M;r.value-=1,($=n.prevButtonProps)!=null&&$.onClick&&((M=n.prevButtonProps)==null||M.onClick())},k=()=>{var $;r.value>=u.value-1?x():r.value+=1,($=n.nextButtonProps)!=null&&$.onClick&&n.nextButtonProps.onClick()},x=()=>{T(),h()},T=()=>{m(!1),v(),a("close")},E=$=>{var M;if(!((M=$.target)!=null&&M.isContentEditable))switch(Gt($)){case ye.left:$.preventDefault(),r.value>0&&S();break;case ye.right:$.preventDefault(),k()}};return mt(()=>{window.addEventListener("keydown",E)}),zt(()=>{window.removeEventListener("keydown",E)}),($,M)=>(O(),H(ze,null,[b.value?(O(),H("button",{key:0,"aria-label":i(o)("el.tour.close"),class:I(i(p).e("closebtn")),type:"button",onClick:T},[U(i(Ve),{class:I(i(p).e("close"))},{default:J(()=>[(O(),oe(dt(y.value)))]),_:1},8,["class"])],10,yX)):te("v-if",!0),W("header",{class:I([i(p).e("header"),{"show-close":i(c)}])},[ne($.$slots,"header",{},()=>[W("span",{role:"heading",class:I(i(p).e("title"))},Se(e.title),3)])],2),W("div",{class:I(i(p).e("body"))},[ne($.$slots,"default",{},()=>[W("span",null,Se(e.description),1)])],2),W("footer",{class:I(i(p).e("footer"))},[W("div",{class:I(i(p).b("indicators"))},[i(g).indicators?(O(),oe(dt(i(g).indicators),{key:0,current:i(r),total:i(u)},null,8,["current","total"])):(O(!0),H(ze,{key:1},bt(i(u),(P,N)=>(O(),H("span",{key:P,class:I([i(p).b("indicator"),i(p).is("active",N===i(r))])},null,2))),128))],2),W("div",{class:I(i(p).b("buttons"))},[i(r)>0?(O(),oe(i(Bn),pt({key:0,size:"small",type:i(f)},C(e.prevButtonProps),{onClick:S}),{default:J(()=>{var P;return[ut(Se(((P=e.prevButtonProps)==null?void 0:P.children)??i(o)("el.tour.previous")),1)]}),_:1},16,["type"])):te("v-if",!0),i(r)<=i(u)-1?(O(),oe(i(Bn),pt({key:1,size:"small",type:i(f)==="primary"?"default":"primary"},C(e.nextButtonProps),{onClick:k}),{default:J(()=>{var P;return[ut(Se(((P=e.nextButtonProps)==null?void 0:P.children)??(i(r)===i(u)-1?i(o)("el.tour.finish"):i(o)("el.tour.next"))),1)]}),_:1},16,["type"])):te("v-if",!0)],2)],2)],64))}}),vx=wX;const SX=it(bX,{TourStep:vx}),CX=un(vx),kX=$e({container:{type:G([String,Object])},offset:{type:Number,default:0},bound:{type:Number,default:15},duration:{type:Number,default:300},marker:{type:Boolean,default:!0},type:{type:G(String),default:"default"},direction:{type:G(String),default:"vertical"},selectScrollTop:Boolean}),xX={change:e=>De(e),click:(e,t)=>e instanceof MouseEvent&&(De(t)||Et(t))},qu=(e=>{if(!It||e==="")return null;if(De(e))try{return document.querySelector(e)}catch{return null}return e});function EX(e){let t=0;const n=(...a)=>{t&&Ra(t),t=Kn(()=>{e(...a),t=0})};return n.cancel=()=>{Ra(t),t=0},n}const hx=Symbol("anchor");var TX=ue({name:"ElAnchor",__name:"anchor",props:kX,emits:xX,setup(e,{expose:t,emit:n}){const a=e,l=n,o=mn(),s=D(""),r=D({}),u=D(null),c=D(null),d=D(),f={};let p=!1,g=0;const m=he("anchor"),v=w(()=>[m.b(),a.type==="underline"?m.m("underline"):"",m.m(a.direction)]),h=N=>{f[N.href]=N.el},b=N=>{delete f[N]},y=N=>{s.value!==N&&(s.value=N,l(yt,N))};let C=null,S="";const k=N=>{if(!d.value)return;const A=qu(N);if(!A)return;if(C){if(S===N)return;C()}S=N,p=!0;const q=tb(A,d.value),z=mv(A,q),V=q.scrollHeight-q.clientHeight,B=Math.min(z-a.offset,V);C=yR(d.value,g,B,a.duration,()=>{setTimeout(()=>{p=!1,S=""},20)})},x=N=>{N&&(y(N),k(N))},T=(N,A)=>{l("click",N,A),x(A)},E=EX(()=>{d.value&&(g=nb(d.value));const N=$();p||Et(N)||y(N)}),$=()=>{if(!d.value)return;const N=nb(d.value),A=[];for(const q of Object.keys(f)){const z=qu(q);if(!z)continue;const V=tb(z,d.value),B=mv(z,V);A.push({top:B-a.offset-a.bound,href:q})}A.sort((q,z)=>q.top-z.top);for(let q=0;qN))return z.href}},M=()=>{const N=qu(a.container);!N||ou(N)?d.value=window:d.value=N};Ht(d,"scroll",E);const P=()=>{Ae(()=>{if(!u.value||!c.value||!s.value){r.value={};return}const N=f[s.value];if(!N){r.value={};return}const A=u.value.getBoundingClientRect(),q=c.value.getBoundingClientRect(),z=N.getBoundingClientRect();if(a.direction==="horizontal"){const V=z.left-A.left;r.value={left:`${V}px`,width:`${z.width}px`,opacity:1}}else{const V=z.top-A.top+(z.height-q.height)/2;r.value={top:`${V}px`,opacity:1}}})};return fe(s,P),fe(()=>{var N;return(N=o.default)==null?void 0:N.call(o)},P),mt(()=>{M();const N=decodeURIComponent(window.location.hash);qu(N)?x(N):E()}),fe(()=>a.container,()=>{M()}),Tt(hx,{ns:m,direction:a.direction,currentAnchor:s,addLink:h,removeLink:b,handleClick:T}),t({scrollTo:x}),(N,A)=>(O(),H("div",{ref_key:"anchorRef",ref:u,class:I(v.value)},[e.marker?(O(),H("div",{key:0,ref_key:"markerRef",ref:c,class:I(i(m).e("marker")),style:je(r.value)},null,6)):te("v-if",!0),W("div",{class:I(i(m).e("list"))},[ne(N.$slots,"default")],2)],2))}}),$X=TX;const OX=$e({title:String,href:String}),NX=["href"];var MX=ue({name:"ElAnchorLink",__name:"anchor-link",props:OX,setup(e){const t=e,n=D(null),{ns:a,direction:l,currentAnchor:o,addLink:s,removeLink:r,handleClick:u}=Fe(hx),c=w(()=>[a.e("link"),a.is("active",o.value===t.href)]),d=f=>{u(f,t.href)};return fe(()=>t.href,(f,p)=>{Ae(()=>{p&&r(p),f&&s({href:f,el:n.value})})}),mt(()=>{const{href:f}=t;f&&s({href:f,el:n.value})}),zt(()=>{const{href:f}=t;f&&r(f)}),(f,p)=>(O(),H("div",{class:I(i(a).e("item"))},[W("a",{ref_key:"linkRef",ref:n,class:I(c.value),href:e.href,onClick:d},[ne(f.$slots,"default",{},()=>[ut(Se(e.title),1)])],10,NX),f.$slots["sub-link"]&&i(l)==="vertical"?(O(),H("div",{key:0,class:I(i(a).e("list"))},[ne(f.$slots,"sub-link")],2)):te("v-if",!0)],2))}}),mx=MX;const IX=it($X,{AnchorLink:mx}),PX=un(mx),gx={label:"label",value:"value",disabled:"disabled"},RX=$e({direction:{type:G(String),default:"horizontal"},options:{type:G(Array),default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},props:{type:G(Object),default:()=>gx},block:Boolean,size:Pn,disabled:{type:Boolean,default:void 0},validateEvent:{type:Boolean,default:!0},id:String,name:String,...ua(["ariaLabel"])}),_X={[rt]:e=>De(e)||He(e)||Wt(e),[yt]:e=>De(e)||He(e)||Wt(e)},AX=["id","aria-label","aria-labelledby"],LX=["name","disabled","checked","onChange"];var DX=ue({name:"ElSegmented",__name:"segmented",props:RX,emits:_X,setup(e,{emit:t}){const n=e,a=t,l=he("segmented"),o=Gn(),s=$n(),r=sn(),{formItem:u}=Hn(),{inputId:c,isLabeledByFormItem:d}=xa(n,{formItemContext:u}),f=D(null),p=QP(),g=Ft({isInit:!1,width:0,height:0,translateX:0,translateY:0,focusVisible:!1}),m=(P,N)=>{const A=h(N);a(rt,A),a(yt,A),P.target.checked=A===n.modelValue},v=w(()=>({...gx,...n.props})),h=P=>st(P)?P[v.value.value]:P,b=P=>st(P)?P[v.value.label]:P,y=P=>!!(r.value||st(P)&&P[v.value.disabled]),C=P=>n.modelValue===h(P),S=P=>n.options.find(N=>h(N)===P),k=P=>[l.e("item"),l.is("selected",C(P)),l.is("disabled",y(P))],x=()=>{if(!f.value)return;const P=f.value.querySelector(".is-selected"),N=f.value.querySelector(".is-selected input");if(!P||!N){g.width=0,g.height=0,g.translateX=0,g.translateY=0,g.focusVisible=!1;return}g.isInit=!0,n.direction==="vertical"?(g.height=P.offsetHeight,g.translateY=P.offsetTop):(g.width=P.offsetWidth,g.translateX=P.offsetLeft);try{g.focusVisible=N.matches(":focus-visible")}catch{}},T=w(()=>[l.b(),l.m(s.value),l.is("block",n.block)]),E=w(()=>({width:n.direction==="vertical"?"100%":`${g.width}px`,height:n.direction==="vertical"?`${g.height}px`:"100%",transform:n.direction==="vertical"?`translateY(${g.translateY}px)`:`translateX(${g.translateX}px)`,display:g.isInit?"block":"none"})),$=w(()=>[l.e("item-selected"),l.is("disabled",y(S(n.modelValue))),l.is("focus-visible",g.focusVisible)]),M=w(()=>n.name||o.value);return on(f,x),fe(p,x),fe(()=>n.options,x,{deep:!0,flush:"post"}),fe(()=>n.modelValue,()=>{var P;x(),n.validateEvent&&((P=u==null?void 0:u.validate)==null||P.call(u,"change").catch(vt))},{flush:"post"}),(P,N)=>e.options.length?(O(),H("div",{key:0,id:i(c),ref_key:"segmentedRef",ref:f,class:I(T.value),role:"radiogroup","aria-label":i(d)?void 0:e.ariaLabel||"segmented","aria-labelledby":i(d)?i(u).labelId:void 0},[W("div",{class:I([i(l).e("group"),i(l).m(e.direction)])},[W("div",{style:je(E.value),class:I($.value)},null,6),(O(!0),H(ze,null,bt(e.options,(A,q)=>(O(),H("label",{key:q,class:I(k(A))},[W("input",{class:I(i(l).e("item-input")),type:"radio",name:M.value,disabled:y(A),checked:C(A),onChange:z=>m(z,A)},null,42,LX),W("div",{class:I(i(l).e("item-label"))},[ne(P.$slots,"default",{item:A},()=>[ut(Se(b(A)),1)])],2)],2))),128))],2)],10,AX)):te("v-if",!0)}}),BX=DX;const VX=it(BX),FX=(e,t)=>{const n=e.toLowerCase();return(t.label||t.value||"").toLowerCase().includes(n)},zX=(e,t,n)=>{const{selectionEnd:a}=e;if(a===null)return;const l=e.value,o=Ln(t);let s=-1,r;for(let u=a-1;u>=0;--u){const c=l[u];if(s===-1&&(c===n||c===`
-`||c==="\r")){s=u;continue}if(o.includes(c)){const d=s===-1?a:s;r={pattern:l.slice(u+1,d),start:u+1,end:d,prefix:c,prefixIndex:u,splitIndex:s,selectionEnd:a};break}}return r},HX=(e,t={debug:!1,useSelectionEnd:!1})=>{const n=e.selectionStart!==null?e.selectionStart:0,a=e.selectionEnd!==null?e.selectionEnd:0,l=t.useSelectionEnd?a:n,o=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"];if(t.debug){const p=document.querySelector("#input-textarea-caret-position-mirror-div");p!=null&&p.parentNode&&p.parentNode.removeChild(p)}const s=document.createElement("div");s.id="input-textarea-caret-position-mirror-div",document.body.appendChild(s);const r=s.style,u=window.getComputedStyle(e),c=e.nodeName==="INPUT";r.whiteSpace=c?"nowrap":"pre-wrap",c||(r.wordWrap="break-word"),r.position="absolute",t.debug||(r.visibility="hidden"),o.forEach(p=>{if(c&&p==="lineHeight")if(u.boxSizing==="border-box"){const g=Number.parseInt(u.height),m=Number.parseInt(u.paddingTop)+Number.parseInt(u.paddingBottom)+Number.parseInt(u.borderTopWidth)+Number.parseInt(u.borderBottomWidth),v=m+Number.parseInt(u.lineHeight);g>v?r.lineHeight=`${g-m}px`:g===v?r.lineHeight=u.lineHeight:r.lineHeight="0"}else r.lineHeight=u.height;else r[p]=u[p]}),Vd()?e.scrollHeight>Number.parseInt(u.height)&&(r.overflowY="scroll"):r.overflow="hidden",s.textContent=e.value.slice(0,Math.max(0,l)),c&&s.textContent&&(s.textContent=s.textContent.replace(/\s/g," "));const d=document.createElement("span");d.textContent=e.value.slice(Math.max(0,l))||".",d.style.position="relative",d.style.left=`${-e.scrollLeft}px`,d.style.top=`${-e.scrollTop}px`,s.appendChild(d);const f={top:d.offsetTop+Number.parseInt(u.borderTopWidth),left:d.offsetLeft+Number.parseInt(u.borderLeftWidth),height:Number.parseInt(u.fontSize)*1.5};return t.debug?d.style.backgroundColor="#aaa":document.body.removeChild(s),f.left>=e.clientWidth&&(f.left=e.clientWidth),f},KX=$e({...Kh,options:{type:G(Array),default:()=>[]},prefix:{type:G([String,Array]),default:"@",validator:e=>De(e)?e.length===1:e.every(t=>De(t)&&t.length===1)},split:{type:String,default:" ",validator:e=>e.length===1},filterOption:{type:G([Boolean,Function]),default:()=>FX,validator:e=>e===!1?!0:We(e)},placement:{type:G(String),default:"bottom"},showArrow:Boolean,offset:{type:Number,default:0},whole:Boolean,checkIsWhole:{type:G(Function)},modelValue:String,loading:Boolean,popperClass:tn.popperClass,popperStyle:tn.popperStyle,popperOptions:{type:G(Object),default:()=>({})},props:{type:G(Object),default:()=>bx}}),WX={[rt]:e=>De(e),"whole-remove":(e,t)=>De(e)&&De(t),input:e=>De(e),search:(e,t)=>De(e)&&De(t),select:(e,t)=>st(e)&&De(t),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},bx={value:"value",label:"label",disabled:"disabled"},jX=$e({options:{type:G(Array),default:()=>[]},loading:Boolean,disabled:Boolean,contentId:String,ariaLabel:String}),qX={select:e=>De(e.value)},YX=["id","aria-disabled","aria-selected","onMousemove","onClick"];var UX=ue({name:"ElMentionDropdown",__name:"mention-dropdown",props:jX,emits:qX,setup(e,{expose:t,emit:n}){const a=e,l=n,o=he("mention"),{t:s}=St(),r=D(-1),u=D(),c=D(),d=D(),f=(S,k)=>[o.be("dropdown","item"),o.is("hovering",r.value===k),o.is("disabled",S.disabled||a.disabled)],p=S=>{S.disabled||a.disabled||l("select",S)},g=S=>{r.value=S},m=w(()=>a.disabled||a.options.every(S=>S.disabled)),v=w(()=>a.options[r.value]),h=()=>{!v.value||v.value.disabled||a.disabled||l("select",v.value)},b=S=>{const{options:k}=a;if(k.length===0||m.value)return;S==="next"?(r.value++,r.value===k.length&&(r.value=0)):S==="prev"&&(r.value--,r.value<0&&(r.value=k.length-1));const x=k[r.value];if(x.disabled){b(S);return}Ae(()=>y(x))},y=S=>{var E,$,M,P;const{options:k}=a,x=k.findIndex(N=>N.value===S.value),T=(E=c.value)==null?void 0:E[x];if(T){const N=(M=($=d.value)==null?void 0:$.querySelector)==null?void 0:M.call($,`.${o.be("dropdown","wrap")}`);N&&wh(N,T)}(P=u.value)==null||P.handleScroll()};return fe(()=>a.options,()=>{m.value||a.options.length===0?r.value=-1:r.value=a.options.findIndex(S=>!S.disabled)},{immediate:!0}),t({hoveringIndex:r,navigateOptions:b,selectHoverOption:h,hoverOption:v}),(S,k)=>(O(),H("div",{ref_key:"dropdownRef",ref:d,class:I(i(o).b("dropdown"))},[S.$slots.header?(O(),H("div",{key:0,class:I(i(o).be("dropdown","header"))},[ne(S.$slots,"header")],2)):te("v-if",!0),ft(U(i(il),{id:e.contentId,ref_key:"scrollbarRef",ref:u,tag:"ul","wrap-class":i(o).be("dropdown","wrap"),"view-class":i(o).be("dropdown","list"),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:J(()=>[(O(!0),H(ze,null,bt(e.options,(x,T)=>(O(),H("li",{id:`${e.contentId}-${T}`,ref_for:!0,ref_key:"optionRefs",ref:c,key:T,class:I(f(x,T)),role:"option","aria-disabled":x.disabled||e.disabled||void 0,"aria-selected":r.value===T,onMousemove:E=>g(T),onClick:Je(E=>p(x),["stop"])},[ne(S.$slots,"label",{item:x,index:T},()=>[W("span",null,Se(x.label??x.value),1)])],42,YX))),128))]),_:3},8,["id","wrap-class","view-class","aria-label"]),[[At,e.options.length>0&&!e.loading]]),e.loading?(O(),H("div",{key:1,class:I(i(o).be("dropdown","loading"))},[ne(S.$slots,"loading",{},()=>[ut(Se(i(s)("el.mention.loading")),1)])],2)):te("v-if",!0),S.$slots.footer?(O(),H("div",{key:2,class:I(i(o).be("dropdown","footer"))},[ne(S.$slots,"footer")],2)):te("v-if",!0)],2))}}),GX=UX,XX=ue({name:"ElMention",inheritAttrs:!1,__name:"mention",props:KX,emits:WX,setup(e,{expose:t,emit:n}){const a=e,l=n,o=w(()=>{const B=Yn.props??[],_=me(B)?B:Object.keys(B);return Ll(a,_)}),s=he("mention"),r=sn(),u=Gn(),c=D(),d=D(),f=D(),p=D(!1),g=D(),m=D(),v=w(()=>a.showArrow?a.placement:`${a.placement}-start`),h=w(()=>a.showArrow?["bottom","top"]:["bottom-start","top-start"]),b=w(()=>({...bx,...a.props})),y=B=>{const _={label:B[b.value.label],value:B[b.value.value],disabled:B[b.value.disabled]};return{...B,..._}},C=w(()=>a.options.map(y)),S=w(()=>{const{filterOption:B}=a;return!m.value||!B?C.value:C.value.filter(_=>B(m.value.pattern,_))}),k=w(()=>p.value&&(!!S.value.length||a.loading)),x=w(()=>{var B;return`${u.value}-${(B=f.value)==null?void 0:B.hoveringIndex}`}),T=B=>{l(rt,B),l(Tn,B),q()},E=B=>{var F,L,K,j;if((F=c.value)!=null&&F.isComposing)return;const _=Gt(B);switch(_){case ye.left:case ye.right:q();break;case ye.up:case ye.down:if(!p.value)return;B.preventDefault(),(L=f.value)==null||L.navigateOptions(_===ye.up?"prev":"next");break;case ye.enter:case ye.numpadEnter:if(!p.value){a.type!=="textarea"&&q();return}B.preventDefault(),(K=f.value)!=null&&K.hoverOption?(j=f.value)==null||j.selectHoverOption():p.value=!1;break;case ye.esc:if(!p.value)return;B.preventDefault(),p.value=!1;break;case ye.backspace:if(a.whole&&m.value){const{splitIndex:X,selectionEnd:Z,pattern:Q,prefixIndex:ee,prefix:ie}=m.value,ve=A();if(!ve)return;const pe=ve.value,re=C.value.find(R=>R.value===Q);if((We(a.checkIsWhole)?a.checkIsWhole(Q,ie):re)&&X!==-1&&X+1===Z){B.preventDefault();const R=pe.slice(0,ee)+pe.slice(X+1);l(rt,R),l(Tn,R),l("whole-remove",Q,ie);const Y=ee;Ae(()=>{ve.selectionStart=Y,ve.selectionEnd=Y,V()})}}}},{wrapperRef:$}=ho(c,{disabled:r,afterFocus(){q()},beforeBlur(B){var _;return(_=d.value)==null?void 0:_.isFocusInsideContent(B)},afterBlur(){p.value=!1}}),M=()=>{q()},P=B=>a.options.find(_=>B.value===_[b.value.value]),N=B=>{if(!m.value)return;const _=A();if(!_)return;const F=_.value,{split:L}=a,K=F.slice(m.value.end),j=K.startsWith(L),X=`${B.value}${j?"":L}`,Z=F.slice(0,m.value.start)+X+K;l(rt,Z),l(Tn,Z),l("select",P(B),m.value.prefix);const Q=m.value.start+X.length+(j?1:0);Ae(()=>{_.selectionStart=Q,_.selectionEnd=Q,_.focus(),V()})},A=()=>{var B,_;return a.type==="textarea"?(B=c.value)==null?void 0:B.textarea:(_=c.value)==null?void 0:_.input},q=()=>{setTimeout(()=>{z(),V(),Ae(()=>{var B;return(B=d.value)==null?void 0:B.updatePopper()})},0)},z=()=>{const B=A();if(!B)return;const _=HX(B),F=B.getBoundingClientRect(),L=$.value.getBoundingClientRect();g.value={position:"absolute",width:0,height:`${_.height}px`,left:`${_.left+F.left-L.left}px`,top:`${_.top+F.top-L.top}px`}},V=()=>{const B=A();if(document.activeElement!==B){p.value=!1;return}const{prefix:_,split:F}=a;if(m.value=zX(B,_,F),m.value&&m.value.splitIndex===-1){p.value=!0,l("search",m.value.pattern,m.value.prefix);return}p.value=!1};return t({input:c,tooltip:d,dropdownVisible:k}),(B,_)=>(O(),H("div",{ref_key:"wrapperRef",ref:$,class:I(i(s).b())},[U(i(Yn),pt(pt(o.value,B.$attrs),{ref_key:"elInputRef",ref:c,"model-value":e.modelValue,disabled:i(r),role:k.value?"combobox":void 0,"aria-activedescendant":k.value?x.value||"":void 0,"aria-controls":k.value?i(u):void 0,"aria-expanded":k.value||void 0,"aria-label":e.ariaLabel,"aria-autocomplete":k.value?"none":void 0,"aria-haspopup":k.value?"listbox":void 0,onInput:T,onKeydown:E,onMousedown:M}),va({_:2},[bt(B.$slots,(F,L)=>({name:L,fn:J(K=>[ne(B.$slots,L,Cl(kl(K)))])}))]),1040,["model-value","disabled","role","aria-activedescendant","aria-controls","aria-expanded","aria-label","aria-autocomplete","aria-haspopup"]),U(i(zn),{ref_key:"tooltipRef",ref:d,visible:k.value,"popper-class":[i(s).e("popper"),e.popperClass],"popper-style":e.popperStyle,"popper-options":e.popperOptions,placement:v.value,"fallback-placements":h.value,effect:"light",pure:"",offset:e.offset,"show-arrow":e.showArrow},{default:J(()=>[W("div",{style:je(g.value)},null,4)]),content:J(()=>[U(GX,{ref_key:"dropdownRef",ref:f,options:S.value,disabled:i(r),loading:e.loading,"content-id":i(u),"aria-label":e.ariaLabel,onSelect:N,onClick:_[0]||(_[0]=Je(F=>{var L;return(L=c.value)==null?void 0:L.focus()},["stop"]))},va({_:2},[bt(B.$slots,(F,L)=>({name:L,fn:J(K=>[ne(B.$slots,L,Cl(kl(K)))])}))]),1032,["options","disabled","loading","content-id","aria-label"])]),_:3},8,["visible","popper-class","popper-style","popper-options","placement","fallback-placements","offset","show-arrow"])],2))}}),JX=XX;const ZX=it(JX),QX=$e({layout:{type:String,default:"horizontal",values:["horizontal","vertical"]},lazy:Boolean}),eJ={resizeStart:(e,t)=>!0,resize:(e,t)=>!0,resizeEnd:(e,t)=>!0,collapse:(e,t,n)=>!0},tJ=$e({min:{type:[String,Number]},max:{type:[String,Number]},size:{type:[String,Number]},resizable:{type:Boolean,default:!0},collapsible:Boolean}),nJ={"update:size":e=>typeof e=="number"||typeof e=="string"};function aJ(e){const t=D(),{width:n,height:a}=Pi(t);return{containerEl:t,containerSize:w(()=>e.value==="horizontal"?n.value:a.value)}}function lJ(e,t,n,a){const l=h=>h*t.value||0;function o(h,b){return Hd(h)?l(Fd(h)):Kd(h)?zd(h):h??b}const s=D(0),r=D(null);let u=[],c=vt;const d=w(()=>e.value.map(h=>[h.min,h.max]));fe(a,()=>{if(s.value){const h=new MouseEvent("mouseup",{bubbles:!0});window.dispatchEvent(h)}});const f=h=>{s.value=0,r.value={index:h,confirmed:!1},u=n.value},p=(h,b)=>{var P;let y=null;if((!r.value||!r.value.confirmed)&&b!==0){if(b>0)y=h,r.value={index:h,confirmed:!0};else for(let N=h;N>=0;N-=1)if(u[N]>0){y=N,r.value={index:N,confirmed:!0};break}}const C=y??((P=r.value)==null?void 0:P.index)??h,S=[...u],k=C+1,x=o(d.value[C][0],0),T=o(d.value[k][0],0),E=o(d.value[C][1],t.value||0),$=o(d.value[k][1],t.value||0);let M=b;S[C]+ME&&(M=E-S[C]),S[k]-M>$&&(M=S[k]-$),S[C]+=M,S[k]-=M,s.value=M,c=()=>{e.value.forEach((N,A)=>{N.size=S[A]}),c=vt},a.value||c()},g=()=>{a.value&&c(),s.value=0,r.value=null,u=[]},m=[];return{lazyOffset:s,onMoveStart:f,onMoving:p,onMoveEnd:g,movingIndex:r,onCollapse:(h,b)=>{m.length||m.push(...n.value.map((T,E)=>{var $;return T<=0?o(($=d.value[E])==null?void 0:$[0],0):T}));const y=n.value,C=b==="start"?h:h+1,S=b==="start"?h+1:h,k=y[C],x=y[S];if(k!==0&&x!==0)y[C]=0,y[S]+=k,m[h]=k;else{const T=k+x,E=ya(m[h],0,T),$=T-E;y[S]=E,y[C]=$}e.value.forEach((T,E)=>{T.size=y[E]})}}}function oJ(e,t){const n=w(()=>e.value.map(s=>s.size)),a=w(()=>e.value.length),l=D([]);fe([n,a,t],()=>{var c;let s=[],r=0;for(let d=0;dd+(f||0),0);if(u>1||!r){const d=1/u;s=s.map(f=>f===void 0?0:f*d)}else{const d=(1-u)/r;s=s.map(f=>f===void 0?d:f)}l.value=s});const o=s=>s*t.value;return{percentSizes:l,pxSizes:w(()=>l.value.map(o))}}const yx=Symbol("splitterRootContextKey");var sJ=ue({name:"ElSplitter",__name:"splitter",props:QX,emits:eJ,setup(e,{emit:t}){const n=he("splitter"),a=t,l=e,o=Ot(l,"layout"),s=Ot(l,"lazy"),{containerEl:r,containerSize:u}=aJ(o),{removeChild:c,children:d,addChild:f,ChildrenSorter:p}=Jd(ht(),"ElSplitterPanel");fe(d,()=>{h.value=null,d.value.forEach((M,P)=>{M.setIndex(P)})});const{percentSizes:g,pxSizes:m}=oJ(d,u),{lazyOffset:v,movingIndex:h,onMoveStart:b,onMoving:y,onMoveEnd:C,onCollapse:S}=lJ(d,u,m,s),k=w(()=>({[n.cssVarBlockName("bar-offset")]:s.value?`${v.value}px`:void 0}));return Tt(yx,Ft({panels:d,percentSizes:g,pxSizes:m,layout:o,lazy:s,movingIndex:h,containerSize:u,onMoveStart:M=>{b(M),a("resizeStart",M,m.value)},onMoving:(M,P)=>{y(M,P),s.value||a("resize",M,m.value)},onMoveEnd:async M=>{C(),await Ae(),a("resizeEnd",M,m.value)},onCollapse:(M,P)=>{S(M,P),a("collapse",M,P,m.value)},registerPanel:f,unregisterPanel:c})),(M,P)=>(O(),H("div",{ref_key:"containerEl",ref:r,class:I([i(n).b(),i(n).e(o.value)]),style:je(k.value)},[ne(M.$slots,"default"),U(i(p)),te(" Prevent iframe touch events from breaking "),i(h)?(O(),H("div",{key:0,class:I([i(n).e("mask"),i(n).e(`mask-${o.value}`)])},null,2)):te("v-if",!0)],6))}}),rJ=sJ;function iJ(e){return e&&st(e)?e:{start:!!e,end:!!e}}function E0(e,t,n,a){return!!(e!=null&&e.collapsible.end&&t>0||n!=null&&n.collapsible.start&&a===0&&t>0)}var uJ=ue({name:"ElSplitterBar",__name:"split-bar",props:{index:{type:Number,required:!0},layout:{type:String,values:["horizontal","vertical"],default:"horizontal"},resizable:{type:Boolean,default:!0},lazy:Boolean,startCollapsible:Boolean,endCollapsible:Boolean},emits:["moveStart","moving","moveEnd","collapse"],setup(e,{emit:t}){const n=he("splitter-bar"),a=e,l=t,o=w(()=>a.layout==="horizontal"),s=w(()=>o.value?{width:0}:{height:0}),r=w(()=>({width:o.value?"16px":"100%",height:o.value?"100%":"16px",cursor:a.resizable?o.value?"ew-resize":"ns-resize":"auto",touchAction:"none"})),u=w(()=>{const y=n.e("dragger");return{[`${y}-horizontal`]:o.value,[`${y}-vertical`]:!o.value,[`${y}-active`]:!!c.value}}),c=D(null),d=y=>{a.resizable&&(c.value=[y.pageX,y.pageY],l("moveStart",a.index),window.addEventListener("mouseup",m),window.addEventListener("mousemove",p))},f=y=>{if(a.resizable&&y.touches.length===1){y.preventDefault();const C=y.touches[0];c.value=[C.pageX,C.pageY],l("moveStart",a.index),window.addEventListener("touchend",v),window.addEventListener("touchmove",g)}},p=y=>{const{pageX:C,pageY:S}=y,k=C-c.value[0],x=S-c.value[1],T=o.value?k:x;l("moving",a.index,T)},g=y=>{if(y.touches.length===1){y.preventDefault();const C=y.touches[0],S=C.pageX-c.value[0],k=C.pageY-c.value[1],x=o.value?S:k;l("moving",a.index,x)}},m=()=>{c.value=null,window.removeEventListener("mouseup",m),window.removeEventListener("mousemove",p),l("moveEnd",a.index)},v=()=>{c.value=null,window.removeEventListener("touchend",v),window.removeEventListener("touchmove",g),l("moveEnd",a.index)},h=w(()=>o.value?ro:Zd),b=w(()=>o.value?ra:jl);return(y,C)=>(O(),H("div",{class:I([i(n).b()]),style:je(s.value)},[e.startCollapsible?(O(),H("div",{key:0,class:I([i(n).e("collapse-icon"),i(n).e(`${e.layout}-collapse-icon-start`)]),onClick:C[0]||(C[0]=S=>l("collapse",e.index,"start"))},[ne(y.$slots,"start-collapsible",{},()=>[(O(),oe(dt(h.value),{style:{width:"12px",height:"12px"}}))])],2)):te("v-if",!0),W("div",{class:I([i(n).e("dragger"),u.value,i(n).is("disabled",!e.resizable),i(n).is("lazy",e.resizable&&e.lazy)]),style:je(r.value),onMousedown:d,onTouchstart:f},null,38),e.endCollapsible?(O(),H("div",{key:1,class:I([i(n).e("collapse-icon"),i(n).e(`${e.layout}-collapse-icon-end`)]),onClick:C[1]||(C[1]=S=>l("collapse",e.index,"end"))},[ne(y.$slots,"end-collapsible",{},()=>[(O(),oe(dt(b.value),{style:{width:"12px",height:"12px"}}))])],2)):te("v-if",!0)],6))}}),cJ=uJ;const T0="ElSplitterPanel";var dJ=ue({name:T0,__name:"split-panel",props:tJ,emits:nJ,setup(e,{expose:t,emit:n}){const a=he("splitter-panel"),l=e,o=n,s=Fe(yx);s||rn(T0,"usage: ");const{panels:r,layout:u,lazy:c,containerSize:d,pxSizes:f}=Vn(s),{registerPanel:p,unregisterPanel:g,onCollapse:m,onMoveEnd:v,onMoveStart:h,onMoving:b}=s,y=D(),C=ht(),S=C.uid,k=D(0),x=w(()=>r.value[k.value]),T=_=>{k.value=_},E=w(()=>x.value?f.value[k.value]??0:0),$=w(()=>x.value?f.value[k.value+1]??0:0),M=w(()=>x.value?r.value[k.value+1]:null),P=w(()=>{var _;return M.value?l.resizable&&((_=M.value)==null?void 0:_.resizable)&&(E.value!==0||!l.min)&&($.value!==0||!M.value.min):!1}),N=w(()=>x.value?k.value!==r.value.length-1:!1),A=w(()=>E0(x.value,E.value,M.value,$.value)),q=w(()=>E0(M.value,$.value,x.value,E.value));function z(_){return Hd(_)?Fd(_)*d.value||0:Kd(_)?zd(_):_??0}let V=!1;fe(()=>l.size,()=>{if(!V&&x.value){if(!d.value){x.value.size=l.size;return}const _=z(l.size),F=z(l.max),L=z(l.min),K=Math.min(Math.max(_,L||0),F||_);K!==_&&o("update:size",K),x.value.size=K}}),fe(()=>{var _;return(_=x.value)==null?void 0:_.size},_=>{_!==l.size&&(V=!0,o("update:size",_),Ae(()=>V=!1))}),fe(()=>l.resizable,_=>{x.value&&(x.value.resizable=_)});const B=Ft({uid:S,getVnode:()=>C.vnode,setIndex:T,...l,collapsible:w(()=>iJ(l.collapsible))});return p(B),zt(()=>g(B)),t({splitterPanelRef:y}),(_,F)=>(O(),H(ze,null,[W("div",pt({ref_key:"panelEl",ref:y,class:[i(a).b()],style:{flexBasis:`${E.value}px`}},_.$attrs),[ne(_.$slots,"default")],16),N.value?(O(),oe(cJ,{key:0,index:k.value,layout:i(u),lazy:i(c),resizable:P.value,"start-collapsible":A.value,"end-collapsible":q.value,onMoveStart:i(h),onMoving:i(b),onMoveEnd:i(v),onCollapse:i(m)},{"start-collapsible":J(()=>[ne(_.$slots,"start-collapsible")]),"end-collapsible":J(()=>[ne(_.$slots,"end-collapsible")]),_:3},8,["index","layout","lazy","resizable","start-collapsible","end-collapsible","onMoveStart","onMoving","onMoveEnd","onCollapse"])):te("v-if",!0)],64))}}),wx=dJ;const fJ=it(rJ,{SplitPanel:wx}),pJ=un(wx),tl="ElInfiniteScroll",vJ={delay:{type:Number,default:200},distance:{type:Number,default:0},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0}},Pm=(e,t)=>Object.entries(vJ).reduce((n,[a,l])=>{const{type:o,default:s}=l,r=e.getAttribute(`infinite-scroll-${a}`);let u=t[r]??r??s;return u=u==="false"?!1:u,u=o(u),n[a]=Number.isNaN(u)?s:u,n},{}),Sx=e=>{const{observer:t}=e[tl];t&&(t.disconnect(),delete e[tl].observer)},hJ=(e,t)=>{const{container:n,containerEl:a,instance:l,observer:o,lastScrollTop:s}=e[tl],{disabled:r,distance:u}=Pm(e,l),{clientHeight:c,scrollHeight:d,scrollTop:f}=a,p=f-s;if(e[tl].lastScrollTop=f,o||r||p<0)return;let g=!1;if(n===e)g=d-(c+f)<=u;else{const{clientTop:m,scrollHeight:v}=e,h=mv(e,a);g=f+c>=h+m+v-u}g&&t.call(l)};function cp(e,t){const{containerEl:n,instance:a}=e[tl],{disabled:l}=Pm(e,a);l||n.clientHeight===0||(n.scrollHeight<=n.clientHeight?t.call(a):Sx(e))}const mJ={async mounted(e,t){const{instance:n,value:a}=t;Ol({scope:tl,from:"the directive v-infinite-scroll",replacement:"the el-scrollbar infinite scroll",version:"3.0.0",ref:"https://element-plus.org/en-US/component/scrollbar#infinite-scroll"},!0),We(a)||rn(tl,"'v-infinite-scroll' binding value must be a function"),await Ae();const{delay:l,immediate:o}=Pm(e,n),s=yh(e,!0),r=s===window?document.documentElement:s,u=Oo(hJ.bind(null,e,a),l);if(s){if(e[tl]={instance:n,container:s,containerEl:r,delay:l,cb:a,onScroll:u,lastScrollTop:r.scrollTop},o){const c=new MutationObserver(Oo(cp.bind(null,e,a),50));e[tl].observer=c,c.observe(e,{childList:!0,subtree:!0}),cp(e,a)}s.addEventListener("scroll",u)}},unmounted(e){if(!e.ElInfiniteScroll)return;const{container:t,onScroll:n}=e[tl];t==null||t.removeEventListener("scroll",n),Sx(e)},async updated(e){if(!e.ElInfiniteScroll)await Ae();else{const{containerEl:t,cb:n,observer:a}=e[tl];t.clientHeight&&a&&cp(e,n)}}},Rv=mJ;Rv.install=e=>{e.directive("InfiniteScroll",Rv)};const gJ=Rv;function bJ(e,t){let n,a=!1;const l=D(!1),o=Ft({...e,originalPosition:"",originalOverflow:"",visible:!1});function s(m){o.text=m}function r(){if(a)return;a=!0;const m=o.parent,v=g.ns||g._.exposed.ns;if(!m.vLoadingAddClassList){let b=m.getAttribute("loading-number");b=Number.parseInt(b)-1,b?m.setAttribute("loading-number",b.toString()):(sa(m,v.bm("parent","relative")),m.removeAttribute("loading-number")),sa(m,v.bm("parent","hidden"))}u(),p.unmount();const h=g.$;h.vnode.el=null,h.subTree=null,p._container=null}function u(){var m,v;(v=(m=g.$el)==null?void 0:m.parentNode)==null||v.removeChild(g.$el)}function c(){var m;e.beforeClose&&!e.beforeClose()||(l.value=!0,clearTimeout(n),n=setTimeout(d,400),o.visible=!1,(m=e.closed)==null||m.call(e))}function d(){if(!l.value)return;const m=o.parent;l.value=!1,m.vLoadingAddClassList=void 0,r()}const p=iw(ue({name:"ElLoading",setup(m,{expose:v}){const{ns:h,zIndex:b}=af("loading");return v({ns:h,zIndex:b}),()=>{const y=o.spinner||o.svg,C=Ge("svg",{class:"circular",viewBox:o.svgViewBox?o.svgViewBox:"0 0 50 50",...y?{innerHTML:y}:{}},y?void 0:[Ge("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),S=o.text?Ge("p",{class:h.b("text")},[o.text]):void 0;return Ge(Fn,{name:h.b("fade"),onAfterLeave:d},{default:J(()=>[ft(U("div",{style:{backgroundColor:o.background||""},class:[h.b("mask"),o.customClass,h.is("fullscreen",o.fullscreen)]},[Ge("div",{class:h.b("spinner")},[C,S])]),[[At,o.visible]])])})}}}));Object.assign(p._context,t??{});const g=p.mount(document.createElement("div"));return{...Vn(o),setText:s,removeElLoadingChild:u,close:c,handleAfterLeave:d,vm:g,get $el(){return a?null:g.$el}}}let Yu;const nr=function(e={},t){if(!It)return;const n=yJ(e);if(n.fullscreen&&Yu)return Yu;const a=bJ({...n,closed:()=>{var o;(o=n.closed)==null||o.call(n),n.fullscreen&&(Yu=void 0)}},t??nr._context);wJ(n,n.parent,a),$0(n,n.parent,a),n.parent.vLoadingAddClassList=()=>$0(n,n.parent,a);let l=n.parent.getAttribute("loading-number");return l?l=`${Number.parseInt(l)+1}`:l="1",n.parent.setAttribute("loading-number",l),n.parent.appendChild(a.$el),Ae(()=>a.visible.value=n.visible),n.fullscreen&&(Yu=a),a},yJ=e=>{let t;return De(e.target)?t=document.querySelector(e.target)??document.body:t=e.target||document.body,{parent:t===document.body||e.body?document.body:t,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:t===document.body&&(e.fullscreen??!0),lock:e.lock??!1,customClass:e.customClass||"",visible:e.visible??!0,beforeClose:e.beforeClose,closed:e.closed,target:t}},wJ=async(e,t,n)=>{const{nextZIndex:a}=n.vm.zIndex||n.vm._.exposed.zIndex,l={};if(e.fullscreen)n.originalPosition.value=Sl(document.body,"position"),n.originalOverflow.value=Sl(document.body,"overflow"),l.zIndex=a();else if(e.parent===document.body){n.originalPosition.value=Sl(document.body,"position"),await Ae();for(const o of["top","left"]){const s=o==="top"?"scrollTop":"scrollLeft";l[o]=`${e.target.getBoundingClientRect()[o]+document.body[s]+document.documentElement[s]-Number.parseInt(Sl(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])l[o]=`${e.target.getBoundingClientRect()[o]}px`}else n.originalPosition.value=Sl(t,"position");for(const[o,s]of Object.entries(l))n.$el.style[o]=s},$0=(e,t,n)=>{const a=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?sa(t,a.bm("parent","relative")):Ba(t,a.bm("parent","relative")),e.fullscreen&&e.lock?Ba(t,a.bm("parent","hidden")):sa(t,a.bm("parent","hidden"))};nr._context=null;const ti=Symbol("ElLoading"),ts=e=>`element-loading-${uo(e)}`,O0=(e,t)=>{const n=t.instance,a=c=>st(t.value)?t.value[c]:void 0,l=c=>{const d=De(c)&&(n==null?void 0:n[c])||c;return D(d)},o=c=>l(a(c)||e.getAttribute(ts(c))),s=a("fullscreen")??t.modifiers.fullscreen,r={text:o("text"),svg:o("svg"),svgViewBox:o("svgViewBox"),spinner:o("spinner"),background:o("background"),customClass:o("customClass"),fullscreen:s,target:a("target")??(s?void 0:e),body:a("body")??t.modifiers.body,lock:a("lock")??t.modifiers.lock},u=nr(r);u._context=hi._context,e[ti]={options:r,instance:u}},SJ=(e,t)=>{for(const n of Object.keys(e))Qt(e[n])&&(e[n].value=t[n])},hi={mounted(e,t){t.value&&O0(e,t)},updated(e,t){const n=e[ti];if(!t.value){n==null||n.instance.close(),e[ti]=null;return}n?SJ(n.options,st(t.value)?t.value:{text:e.getAttribute(ts("text")),svg:e.getAttribute(ts("svg")),svgViewBox:e.getAttribute(ts("svgViewBox")),spinner:e.getAttribute(ts("spinner")),background:e.getAttribute(ts("background")),customClass:e.getAttribute(ts("customClass"))}):O0(e,t)},unmounted(e){var t;(t=e[ti])==null||t.instance.close(),e[ti]=null}};hi._context=null;const CJ={install(e){nr._context=e._context,hi._context=e._context,e.directive("loading",hi),e.config.globalProperties.$loading=nr},directive:hi,service:nr},Cx=["primary","success","info","warning","error"],kx=["top","top-left","top-right","bottom","bottom-left","bottom-right"],ea=dn({customClass:"",dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,placement:void 0,zIndex:0,grouping:!1,repeatNum:1,appendTo:It?document.body:void 0}),kJ=$e({customClass:{type:G([String,Array,Object,Boolean]),default:ea.customClass},dangerouslyUseHTMLString:{type:Boolean,default:ea.dangerouslyUseHTMLString},duration:{type:Number,default:ea.duration},icon:{type:Ut,default:ea.icon},id:{type:String,default:ea.id},message:{type:G([String,Object,Function]),default:ea.message},onClose:{type:G(Function),default:ea.onClose},showClose:{type:Boolean,default:ea.showClose},type:{type:String,values:Cx,default:ea.type},plain:{type:Boolean,default:ea.plain},offset:{type:Number,default:ea.offset},placement:{type:String,values:kx,default:ea.placement},zIndex:{type:Number,default:ea.zIndex},grouping:{type:Boolean,default:ea.grouping},repeatNum:{type:Number,default:ea.repeatNum}}),xJ={destroy:()=>!0},ol=vd({}),EJ=e=>(ol[e]||(ol[e]=vd([])),ol[e]),TJ=(e,t)=>{const n=ol[t]||[],a=n.findIndex(s=>s.id===e),l=n[a];let o;return a>0&&(o=n[a-1]),{current:l,prev:o}},$J=(e,t)=>{const{prev:n}=TJ(e,t);return n?n.vm.exposed.bottom.value:0},OJ=(e,t,n)=>(ol[n]||[]).findIndex(a=>a.id===e)>0?16:t,NJ=["id"],MJ=["innerHTML"];var IJ=ue({name:"ElMessage",__name:"message",props:kJ,emits:xJ,setup(e,{expose:t,emit:n}){const{Close:a}=Bh,l=e,o=n,s=D(!1),{ns:r,zIndex:u}=af("message"),{currentZIndex:c,nextZIndex:d}=u,f=D(),p=D(!1),g=D(0);let m;const v=w(()=>l.type?l.type==="error"?"danger":l.type:"info"),h=w(()=>{const A=l.type;return{[r.bm("icon",A)]:A&&zo[A]}}),b=w(()=>l.icon||zo[l.type]||""),y=w(()=>l.placement||"top"),C=w(()=>$J(l.id,y.value)),S=w(()=>Math.max(OJ(l.id,l.offset,y.value)+C.value,l.offset)),k=w(()=>g.value+S.value),x=w(()=>y.value.includes("left")?r.is("left"):y.value.includes("right")?r.is("right"):r.is("center")),T=w(()=>y.value.startsWith("top")?"top":"bottom"),E=w(()=>({[T.value]:`${S.value}px`,zIndex:c.value}));function $(){l.duration!==0&&({stop:m}=cr(()=>{P()},l.duration))}function M(){m==null||m()}function P(){p.value=!1,Ae(()=>{var A;s.value||((A=l.onClose)==null||A.call(l),o("destroy"))})}function N(A){Gt(A)===ye.esc&&P()}return mt(()=>{$(),d(),p.value=!0}),fe(()=>l.repeatNum,()=>{M(),$()}),Ht(document,"keydown",N),on(f,()=>{g.value=f.value.getBoundingClientRect().height}),t({visible:p,bottom:k,close:P}),(A,q)=>(O(),oe(Fn,{name:i(r).b("fade"),onBeforeEnter:q[0]||(q[0]=z=>s.value=!0),onBeforeLeave:e.onClose,onAfterLeave:q[1]||(q[1]=z=>A.$emit("destroy")),persisted:""},{default:J(()=>[ft(W("div",{id:e.id,ref_key:"messageRef",ref:f,class:I([i(r).b(),{[i(r).m(e.type)]:e.type},i(r).is("closable",e.showClose),i(r).is("plain",e.plain),i(r).is("bottom",T.value==="bottom"),x.value,e.customClass]),style:je(E.value),role:"alert",onMouseenter:M,onMouseleave:$},[e.repeatNum>1?(O(),oe(i(hC),{key:0,value:e.repeatNum,type:v.value,class:I(i(r).e("badge"))},null,8,["value","type","class"])):te("v-if",!0),b.value?(O(),oe(i(Ve),{key:1,class:I([i(r).e("icon"),h.value])},{default:J(()=>[(O(),oe(dt(b.value)))]),_:1},8,["class"])):te("v-if",!0),!e.dangerouslyUseHTMLString||A.$slots.default?(O(),H("p",{key:2,class:I(i(r).e("content"))},[ne(A.$slots,"default",{},()=>[ut(Se(e.message),1)])],2)):(O(),H(ze,{key:3},[te(" Caution here, message could've been compromised, never use user's input as message "),W("p",{class:I(i(r).e("content")),innerHTML:e.message},null,10,MJ)],2112)),e.showClose?(O(),oe(i(Ve),{key:4,class:I(i(r).e("closeBtn")),onClick:Je(P,["stop"])},{default:J(()=>[U(i(a))]),_:1},8,["class"])):te("v-if",!0)],46,NJ),[[At,p.value]])]),_:3},8,["name","onBeforeLeave"]))}}),PJ=IJ;let RJ=1;const _J=e=>{if(!e.appendTo)e.appendTo=document.body;else if(De(e.appendTo)){let t=document.querySelector(e.appendTo);wa(t)||(Kt("ElMessage","the appendTo option is not an HTMLElement. Falling back to document.body."),t=document.body),e.appendTo=t}},AJ=e=>{!e.placement&&De(aa.placement)&&aa.placement&&(e.placement=aa.placement),e.placement||(e.placement="top"),kx.includes(e.placement)||(Kt("ElMessage",`Invalid placement: ${e.placement}. Falling back to 'top'.`),e.placement="top")},xx=e=>{const t=!e||De(e)||Jt(e)||We(e)?{message:e}:e,n={...ea,...t};return _J(n),AJ(n),Wt(aa.grouping)&&!n.grouping&&(n.grouping=aa.grouping),He(aa.duration)&&n.duration===3e3&&(n.duration=aa.duration),He(aa.offset)&&n.offset===16&&(n.offset=aa.offset),Wt(aa.showClose)&&!n.showClose&&(n.showClose=aa.showClose),Wt(aa.plain)&&!n.plain&&(n.plain=aa.plain),n},LJ=e=>{const t=e.props.placement||"top",n=ol[t],a=n.indexOf(e);if(a===-1)return;n.splice(a,1);const{handler:l}=e;l.close()},DJ=({appendTo:e,...t},n)=>{const a=`message_${RJ++}`,l=t.onClose,o=document.createElement("div"),s={...t,id:a,onClose:()=>{l==null||l(),LJ(c)},onDestroy:()=>{Vo(null,o)}},r=U(PJ,s,We(s.message)||Jt(s.message)?{default:We(s.message)?s.message:()=>s.message}:null);r.appContext=n||Ns._context,Vo(r,o),e.appendChild(o.firstElementChild);const u=r.component,c={id:a,vnode:r,vm:u,handler:{close:()=>{u.exposed.close()}},props:r.component.props};return c},Ns=(e={},t)=>{if(!It)return{close:()=>{}};const n=xx(e),a=EJ(n.placement||"top");if(n.grouping&&a.length){const o=a.find(({vnode:s})=>{var r;return((r=s.props)==null?void 0:r.message)===n.message});if(o)return o.props.repeatNum+=1,o.props.type=n.type,o.handler}if(He(aa.max)&&a.length>=aa.max)return{close:()=>{}};const l=DJ(n,t);return a.push(l),l.handler};Cx.forEach(e=>{Ns[e]=(t={},n)=>{const a=xx(t);return Ns({...a,type:e},n)}});function BJ(e){for(const t in ol)if(Dt(ol,t)){const n=[...ol[t]];for(const a of n)(!e||e===a.props.type)&&a.handler.close()}}function VJ(e){ol[e]&&[...ol[e]].forEach(t=>t.handler.close())}Ns.closeAll=BJ;Ns.closeAllByPlacement=VJ;Ns._context=null;const na=jS(Ns,"$message");var FJ=ue({name:"ElMessageBox",directives:{TrapFocus:LD},components:{ElButton:Bn,ElFocusTrap:Nr,ElInput:Yn,ElOverlay:sm,ElIcon:Ve,...Bh},inheritAttrs:!1,props:{buttonSize:{type:String,validator:C2},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(e,{emit:t}){const{locale:n,zIndex:a,ns:l,size:o}=af("message-box",w(()=>e.buttonSize)),{t:s}=n,{nextZIndex:r}=a,u=D(!1),c=Ft({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",cancelButtonType:"",confirmButtonType:"primary",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:$l(rl),cancelButtonLoadingIcon:$l(rl),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:r()}),d=w(()=>{const B=c.type;return{[l.bm("icon",B)]:B&&zo[B]}}),f=Gn(),p=Gn(),g=w(()=>{const B=c.type;return c.icon||B&&zo[B]||""}),m=w(()=>!!c.message),v=D(),h=D(),b=D(),y=D(),C=D(),S=w(()=>c.confirmButtonClass);fe(()=>c.inputValue,async B=>{await Ae(),e.boxType==="prompt"&&B&&A()},{immediate:!0}),fe(()=>u.value,B=>{var _;B&&(e.boxType!=="prompt"&&(c.autofocus?b.value=((_=C.value)==null?void 0:_.$el)??v.value:b.value=v.value),c.zIndex=r()),e.boxType==="prompt"&&(B?Ae().then(()=>{y.value&&y.value.$el&&(c.autofocus?b.value=q()??v.value:b.value=v.value)}):(c.editorErrorMessage="",c.validateError=!1))});const k=w(()=>e.draggable),x=w(()=>e.overflow),{isDragging:T}=rS(v,h,k,x);mt(async()=>{await Ae(),e.closeOnHashChange&&window.addEventListener("hashchange",E)}),zt(()=>{e.closeOnHashChange&&window.removeEventListener("hashchange",E)});function E(){u.value&&(u.value=!1,Ae(()=>{c.action&&t("action",c.action)}))}const $=()=>{e.closeOnClickModal&&N(c.distinguishCancelAndClose?"close":"cancel")},M=Nh($),P=B=>{var _;if(c.inputType!=="textarea"&&!((_=y.value)!=null&&_.isComposing))return B.preventDefault(),N("confirm")},N=B=>{var _;e.boxType==="prompt"&&B==="confirm"&&!A()||(c.action=B,c.beforeClose?(_=c.beforeClose)==null||_.call(c,B,c,E):E())},A=()=>{if(e.boxType==="prompt"){const B=c.inputPattern;if(B&&!B.test(c.inputValue||""))return c.editorErrorMessage=c.inputErrorMessage||s("el.messagebox.error"),c.validateError=!0,!1;const _=c.inputValidator;if(We(_)){const F=_(c.inputValue);if(F===!1)return c.editorErrorMessage=c.inputErrorMessage||s("el.messagebox.error"),c.validateError=!0,!1;if(De(F))return c.editorErrorMessage=F,c.validateError=!0,!1}}return c.editorErrorMessage="",c.validateError=!1,!0},q=()=>{var _;const B=(_=y.value)==null?void 0:_.$refs;return(B==null?void 0:B.input)??(B==null?void 0:B.textarea)},z=()=>{N("close")},V=()=>{e.closeOnPressEscape&&z()};return e.lockScroll&&Wd(u,{ns:l}),{...Vn(c),ns:l,overlayEvent:M,visible:u,hasMessage:m,typeClass:d,contentId:f,inputId:p,btnSize:o,iconComponent:g,confirmButtonClasses:S,rootRef:v,focusStartRef:b,headerRef:h,inputRef:y,isDragging:T,confirmRef:C,doClose:E,handleClose:z,onCloseRequested:V,handleWrapperClick:$,handleInputEnter:P,handleAction:N,t:s}}});const zJ=["aria-label","aria-describedby"],HJ=["aria-label"],KJ=["id"];function WJ(e,t,n,a,l,o){const s=_t("el-icon"),r=_t("el-input"),u=_t("el-button"),c=_t("el-focus-trap"),d=_t("el-overlay");return O(),oe(Fn,{name:"fade-in-linear",onAfterLeave:t[11]||(t[11]=f=>e.$emit("vanish")),persisted:""},{default:J(()=>[ft(U(d,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:J(()=>[W("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:I(`${e.ns.namespace.value}-overlay-message-box`),onClick:t[8]||(t[8]=(...f)=>e.overlayEvent.onClick&&e.overlayEvent.onClick(...f)),onMousedown:t[9]||(t[9]=(...f)=>e.overlayEvent.onMousedown&&e.overlayEvent.onMousedown(...f)),onMouseup:t[10]||(t[10]=(...f)=>e.overlayEvent.onMouseup&&e.overlayEvent.onMouseup(...f))},[U(c,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:J(()=>[W("div",{ref:"rootRef",class:I([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),e.ns.is("dragging",e.isDragging),{[e.ns.m("center")]:e.center}]),style:je(e.customStyle),tabindex:"-1",onClick:t[7]||(t[7]=Je(()=>{},["stop"]))},[e.title!==null&&e.title!==void 0?(O(),H("div",{key:0,ref:"headerRef",class:I([e.ns.e("header"),{"show-close":e.showClose}])},[W("div",{class:I(e.ns.e("title"))},[e.iconComponent&&e.center?(O(),oe(s,{key:0,class:I([e.ns.e("status"),e.typeClass])},{default:J(()=>[(O(),oe(dt(e.iconComponent)))]),_:1},8,["class"])):te("v-if",!0),W("span",null,Se(e.title),1)],2),e.showClose?(O(),H("button",{key:0,type:"button",class:I(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:t[0]||(t[0]=f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel")),onKeydown:t[1]||(t[1]=an(Je(f=>e.handleAction(e.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[U(s,{class:I(e.ns.e("close"))},{default:J(()=>[(O(),oe(dt(e.closeIcon||"close")))]),_:1},8,["class"])],42,HJ)):te("v-if",!0)],2)):te("v-if",!0),W("div",{id:e.contentId,class:I(e.ns.e("content"))},[W("div",{class:I(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(O(),oe(s,{key:0,class:I([e.ns.e("status"),e.typeClass])},{default:J(()=>[(O(),oe(dt(e.iconComponent)))]),_:1},8,["class"])):te("v-if",!0),e.hasMessage?(O(),H("div",{key:1,class:I(e.ns.e("message"))},[ne(e.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(O(),oe(dt(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(O(),oe(dt(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0,textContent:Se(e.message)},null,8,["for","textContent"]))])],2)):te("v-if",!0)],2),ft(W("div",{class:I(e.ns.e("input"))},[U(r,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[2]||(t[2]=f=>e.inputValue=f),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:I({invalid:e.validateError}),onKeydown:an(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),W("div",{class:I(e.ns.e("errormsg")),style:je({visibility:e.editorErrorMessage?"visible":"hidden"})},Se(e.editorErrorMessage),7)],2),[[At,e.showInput]])],10,KJ),e.showCancelButton||e.showConfirmButton?(O(),H("div",{key:1,class:I(e.ns.e("btns"))},[e.showCancelButton?(O(),oe(u,{key:0,type:e.cancelButtonType==="text"?"":e.cancelButtonType,text:e.cancelButtonType==="text",loading:e.cancelButtonLoading,"loading-icon":e.cancelButtonLoadingIcon,class:I([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t[3]||(t[3]=f=>e.handleAction("cancel")),onKeydown:t[4]||(t[4]=an(Je(f=>e.handleAction("cancel"),["prevent"]),["enter"]))},{default:J(()=>[ut(Se(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","size"])):te("v-if",!0),ft(U(u,{ref:"confirmRef",type:e.confirmButtonType==="text"?"":e.confirmButtonType,text:e.confirmButtonType==="text",loading:e.confirmButtonLoading,"loading-icon":e.confirmButtonLoadingIcon,class:I([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:t[5]||(t[5]=f=>e.handleAction("confirm")),onKeydown:t[6]||(t[6]=an(Je(f=>e.handleAction("confirm"),["prevent"]),["enter"]))},{default:J(()=>[ut(Se(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","disabled","size"]),[[At,e.showConfirmButton]])],2)):te("v-if",!0)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,zJ)]),_:3},8,["z-index","overlay-class","mask"]),[[At,e.visible]])]),_:3})}var jJ=Rn(FJ,[["render",WJ]]);const Ui=new Map,qJ=e=>{let t=document.body;return e.appendTo&&(De(e.appendTo)&&(t=document.querySelector(e.appendTo)),wa(e.appendTo)&&(t=e.appendTo),wa(t)||(Kt("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),t=document.body)),t},dp=(e,t)=>{var a;const n=(a=e.component)==null?void 0:a.proxy;return()=>n.handleAction(t)},YJ=(e,t,n=null)=>{const a=U(jJ,e,We(e.message)||Jt(e.message)?{default:We(e.message)?()=>e.message({confirm:dp(a,"confirm"),cancel:dp(a,"cancel"),close:dp(a,"close")}):()=>e.message}:null);return a.appContext=n,Vo(a,t),qJ(e).appendChild(t.firstElementChild),a.component},UJ=()=>document.createElement("div"),GJ=(e,t)=>{const n=UJ();e.onVanish=()=>{Vo(null,n),Ui.delete(l)},e.onAction=o=>{const s=Ui.get(l);let r;e.showInput?r={value:l.inputValue,action:o}:r=o,e.callback?e.callback(r,a.proxy):o==="cancel"||o==="close"?e.distinguishCancelAndClose&&o!=="cancel"?s.reject("close"):s.reject("cancel"):s.resolve(r)};const a=YJ(e,n,t),l=a.proxy;for(const o in e)Dt(e,o)&&!Dt(l.$props,o)&&(o==="closeIcon"&&st(e[o])?l[o]=$l(e[o]):l[o]=e[o]);return l.visible=!0,l};function Ir(e,t=null){if(!It)return Promise.reject();let n;return De(e)||Jt(e)?e={message:e}:n=e.callback,new Promise((a,l)=>{const o=GJ(e,t??Ir._context);Ui.set(o,{options:e,callback:n,resolve:a,reject:l})})}const XJ=["alert","confirm","prompt"],JJ={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};XJ.forEach(e=>{Ir[e]=ZJ(e)});function ZJ(e){return(t,n,a,l)=>{let o="";return st(n)?(a=n,o=""):Et(n)?o="":o=n,Ir(Object.assign({title:o,message:t,type:"",...JJ[e]},a,{boxType:e}),l)}}Ir.close=()=>{Ui.forEach((e,t)=>{t.doClose()}),Ui.clear()};Ir._context=null;const Eo=Ir;Eo.install=e=>{Eo._context=e._context,e.config.globalProperties.$msgbox=Eo,e.config.globalProperties.$messageBox=Eo,e.config.globalProperties.$alert=Eo.alert,e.config.globalProperties.$confirm=Eo.confirm,e.config.globalProperties.$prompt=Eo.prompt};const Cc=Eo,Ex=["primary","success","info","warning","error"],QJ=$e({customClass:{type:G([String,Array,Object,Boolean]),default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:Ut},id:{type:String,default:""},message:{type:G([String,Object,Function]),default:""},offset:{type:Number,default:0},onClick:{type:G(Function),default:()=>{}},onClose:{type:G(Function),required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...Ex,""],default:""},zIndex:Number,closeIcon:{type:Ut,default:Ya},progress:{type:G([Boolean,Object]),default:!1},pauseOnHover:{type:Boolean,default:!0}}),eZ={destroy:()=>!0},tZ=["id"],nZ=["textContent"],aZ={key:0},lZ=["innerHTML"];var oZ=ue({name:"ElNotification",__name:"notification",props:QJ,emits:eZ,setup(e,{expose:t}){const n=e,{ns:a,zIndex:l}=af("notification"),{nextZIndex:o,currentZIndex:s}=l,r=D(!1);let u;const c=D(100);let d=0,f=0;const p=w(()=>{const A=n.type;return A&&zo[n.type]?a.m(A):""}),g=w(()=>!!n.progress&&n.duration>0),m=w(()=>{switch(n.type){case"success":return"success";case"warning":return"warning";case"error":return"exception";default:return}}),v=w(()=>({status:m.value,strokeWidth:3,showText:!1,...typeof n.progress=="object"?n.progress:void 0})),h=w(()=>n.type&&zo[n.type]||n.icon),b=w(()=>n.position.endsWith("right")?"right":"left"),y=w(()=>n.position.startsWith("top")?"top":"bottom"),C=w(()=>({[y.value]:`${n.offset}px`,zIndex:n.zIndex??s.value})),{pause:S,resume:k}=UP(()=>{c.value=Math.max(0,100-(d+Date.now()-f)/n.duration*100)},100,{immediate:!1});function x(){if(n.duration<=0)return;u==null||u(),S(),f=Date.now();const A=Math.max(0,n.duration-d);({stop:u}=cr(()=>{r.value&&P()},A)),g.value&&(c.value=A/n.duration*100,k())}function T(){u==null||u(),S(),f>0&&(d+=Date.now()-f,f=0)}let E=!1;function $(){E=!0,n.pauseOnHover&&T()}function M(){E=!1,n.pauseOnHover&&x()}function P(){r.value=!1,T()}function N(A){switch(Gt(A)){case ye.delete:case ye.backspace:T();break;case ye.esc:r.value&&P();break;default:if(E&&n.pauseOnHover)break;T(),x()}}return mt(()=>{x(),o(),r.value=!0}),Ht(document,"keydown",N),t({visible:r,close:P}),(A,q)=>(O(),oe(Fn,{name:i(a).b("fade"),onBeforeLeave:e.onClose,onAfterLeave:q[1]||(q[1]=z=>A.$emit("destroy")),persisted:""},{default:J(()=>[ft(W("div",{id:e.id,class:I([i(a).b(),e.customClass,b.value]),style:je(C.value),role:"alert",onMouseenter:$,onMouseleave:M,onClick:q[0]||(q[0]=(...z)=>e.onClick&&e.onClick(...z))},[h.value?(O(),oe(i(Ve),{key:0,class:I([i(a).e("icon"),p.value])},{default:J(()=>[(O(),oe(dt(h.value)))]),_:1},8,["class"])):te("v-if",!0),W("div",{class:I(i(a).e("group"))},[W("h2",{class:I(i(a).e("title")),textContent:Se(e.title)},null,10,nZ),ft(W("div",{class:I(i(a).e("content")),style:je(e.title?void 0:{margin:0})},[ne(A.$slots,"default",{},()=>[e.dangerouslyUseHTMLString?(O(),H(ze,{key:1},[te(" Caution here, message could've been compromised, never use user's input as message "),W("p",{innerHTML:e.message},null,8,lZ)],2112)):(O(),H("p",aZ,Se(e.message),1))])],6),[[At,e.message]]),e.showClose?(O(),oe(i(Ve),{key:0,class:I(i(a).e("closeBtn")),onClick:Je(P,["stop"])},{default:J(()=>[(O(),oe(dt(e.closeIcon)))]),_:1},8,["class"])):te("v-if",!0)],2),g.value?(O(),H("div",{key:1,class:I(i(a).e("progress")),"aria-hidden":"true"},[U(i(fm),pt(v.value,{percentage:c.value}),null,16,["percentage"])],2)):te("v-if",!0)],46,tZ),[[At,r.value]])]),_:3},8,["name","onBeforeLeave"]))}}),sZ=oZ;const Sr={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},sd=16;let rZ=1;const Ms=function(e={},t){if(!It)return{close:()=>{}};(De(e)||Jt(e))&&(e={message:e});const n=e.position||"top-right";let a=e.offset||0;Sr[n].forEach(({vm:d})=>{var f;a+=(((f=d.el)==null?void 0:f.offsetHeight)||0)+sd}),a+=sd;const l=`notification_${rZ++}`,o=e.onClose,s={...e,offset:a,id:l,onClose:()=>{iZ(l,n,o)}};let r=document.body;wa(e.appendTo)?r=e.appendTo:De(e.appendTo)&&(r=document.querySelector(e.appendTo)),wa(r)||(Kt("ElNotification","the appendTo option is not an HTMLElement. Falling back to document.body."),r=document.body);const u=document.createElement("div"),c=U(sZ,s,We(s.message)?s.message:Jt(s.message)?()=>s.message:null);return c.appContext=Et(t)?Ms._context:t,c.props.onDestroy=()=>{Vo(null,u)},Vo(c,u),Sr[n].push({vm:c}),r.appendChild(u.firstElementChild),{close:()=>{c.component.exposed.close()}}};Ex.forEach(e=>{Ms[e]=(t={},n)=>((De(t)||Jt(t))&&(t={message:t}),Ms({...t,type:e},n))});function iZ(e,t,n){const a=Sr[t],l=a.findIndex(({vm:c})=>{var d;return((d=c.component)==null?void 0:d.props.id)===e});if(l===-1)return;const{vm:o}=a[l];if(!o)return;n==null||n(o);const s=o.el.offsetHeight,r=t.split("-")[0];a.splice(l,1);const u=a.length;if(!(u<1))for(let c=l;c{t.component.exposed.close()})}function cZ(e="top-right"){var n,a,l,o;let t=((l=(a=(n=Sr[e][0])==null?void 0:n.vm.component)==null?void 0:a.props)==null?void 0:l.offset)||0;for(const{vm:s}of Sr[e])s.component.props.offset=t,t+=(((o=s.el)==null?void 0:o.offsetHeight)||0)+sd}Ms.closeAll=uZ;Ms.updateOffsets=cZ;Ms._context=null;const dZ=jS(Ms,"$notify"),fZ=$e({..._s(Gr,["ariaLabel","gpuAcceleration","rawContent"]),placement:Sv.placement,tabindex:Sv.tabindex,effect:{...Gr.effect,default:"light"},title:String,width:{type:[String,Number],default:150},offset:{...Gr.offset,default:void 0},persistent:{...Gr.persistent,default:!0}}),pZ={"update:visible":e=>Wt(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0};({..._s($L,["gpuAcceleration"])});var vZ=ue({name:"ElPopover",__name:"popover",props:fZ,emits:pZ,setup(e,{expose:t,emit:n}){const a=e,l=n,o=w(()=>{const b=zn.props,y=me(b)?b:Object.keys(b);return Ll(a,y)}),s=he("popover"),r=D(),u=w(()=>{var b;return(b=i(r))==null?void 0:b.popperRef}),c=w(()=>[{width:fn(a.width)},a.popperStyle]),d=w(()=>[s.b(),a.popperClass,{[s.m("plain")]:!!a.content}]),f=w(()=>a.transition===`${s.namespace.value}-fade-in-linear`),p=()=>{var b;(b=r.value)==null||b.hide()},g=()=>{l("before-enter")},m=()=>{l("before-leave")},v=()=>{l("after-enter")},h=()=>{l("update:visible",!1),l("after-leave")};return t({popperRef:u,hide:p}),(b,y)=>(O(),oe(i(zn),pt({ref_key:"tooltipRef",ref:r},o.value,{"aria-label":e.title,"popper-class":d.value,"popper-style":c.value,"gpu-acceleration":f.value,onBeforeShow:g,onBeforeHide:m,onShow:v,onHide:h}),{content:J(()=>[e.title?(O(),H("div",{key:0,class:I(i(s).e("title")),role:"title"},Se(e.title),3)):te("v-if",!0),ne(b.$slots,"default",{hide:p},()=>[ut(Se(e.content),1)])]),default:J(()=>[b.$slots.reference?ne(b.$slots,"reference",{key:0}):te("v-if",!0)]),_:3},16,["aria-label","popper-class","popper-style","gpu-acceleration"]))}}),hZ=vZ;const N0=(e,t)=>{var a;const n=(a=t.arg||t.value)==null?void 0:a.popperRef;n&&(n.triggerRef=e)};var mZ={mounted(e,t){N0(e,t)},updated(e,t){N0(e,t)}};const gZ="popover",Tx=_3(mZ,gZ),bZ=it(hZ,{directive:Tx}),yZ="2.14.8",wZ=(e=[])=>({version:yZ,install:(n,a)=>{n[yg]||(n[yg]=!0,e.forEach(l=>n.use(l)),a&&Wh(a,n,!0))}});var SZ=[D3,tA,g8,VY,k8,x8,M8,hC,F8,z8,Bn,EC,ZB,nV,gV,bV,P6,Ok,D6,ll,QV,tm,Y6,iF,uF,of,Vk,DF,Y8,WF,jF,qF,YF,UF,fH,Uk,SH,CH,DH,n2,XH,DK,BK,VK,d2,tL,nL,Ve,$9,f2,Yn,p2,W9,X9,nW,bW,yW,wW,SW,$W,rj,fj,bZ,cC,fm,$k,d6,c6,$j,Ij,W6,il,Ko,qc,MB,Qj,o7,s7,T7,I7,Wk,az,B7,V7,G7,lY,oY,BY,eU,tU,oo,Em,aB,cU,hU,mU,zn,NU,Om,JU,pG,FG,XG,SX,CX,IX,PX,VX,ZX,fJ,pJ],CZ=[gJ,CJ,na,Cc,dZ,Tx],Rm=wZ([...SZ,...CZ]);Rm.install;Rm.version;var kZ=Rm,xZ={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值",alphaDescription:"透明度 {alpha}, 当前颜色 {color}",hueLabel:"选择色相值",hueDescription:"色相 {hue}, 当前颜色 {color}",svLabel:"选择饱和度与明度的值",svDescription:"饱和度 {saturation}, 明度 {brightness}, 当前颜色 {color}",predefineDescription:"选择 {value} 作为颜色"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",quarterTablePrompt:"使用方向键与 Enter 键可选择季度",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},input:{characters:"{count} / {max} 个字符"},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},mention:{loading:"加载中"},dropdown:{toggleDropdown:"切换下拉选项"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计",selectAllLabel:"选择所有行",selectRowLabel:"选择当前行",expandRowLabel:"展开当前行",collapseRowLabel:"收起当前行",sortLabel:"按 {column} 排序",filterLabel:"按 {column} 过滤"},tag:{close:"关闭此标签"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"},inputOTP:{groupLabel:"一次性密码输入框",defaultLabel:"请输入第 {index} 位 OTP 字符"}}};const Yo="xq0036";async function go(e,t){const n=await fetch(e,t);if(n.status===401)throw Object.assign(new Error("未登录:请先在壳子登录统一账户再打开本界面"),{code:401});if(!n.ok){let a=`HTTP ${n.status}`;try{a=(await n.json()).detail||a}catch{}throw Object.assign(new Error(a),{code:n.status,status:n.status})}return n.json()}const M0=()=>go(`/api/plugin-config/${Yo}`),EZ=e=>go(`/api/plugin-config/${Yo}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),TZ=()=>go(`/api/plugins/${Yo}/last-fields`),$Z=()=>go(`/api/plugin-configs?plugin_id=${encodeURIComponent(Yo)}`),OZ=(e,t)=>go("/api/plugin-configs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plugin_id:Yo,name:e,fields:t})}),NZ=e=>go(`/api/plugin-configs/${encodeURIComponent(Yo)}/${encodeURIComponent(e)}`,{method:"DELETE"}),MZ=e=>go("/api/runs",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plugin_id:Yo,fields:e})}),IZ=e=>go(`/api/runs/${e}`),PZ=e=>go(`/api/runs/${e}/stop`,{method:"POST"});function RZ(e){const t=new WebSocket((location.protocol==="https:"?"wss://":"ws://")+location.host+"/ws");return t.onmessage=n=>{try{e(JSON.parse(n.data))}catch{}},t}const fp=e=>JSON.parse(JSON.stringify(e)),$x=`plugin:${Yo}:lastSavedAt`;function _Z(){try{return localStorage.getItem($x)||""}catch{return""}}function AZ(e){try{localStorage.setItem($x,e)}catch{}}function pp(e,t){Object.keys(e).forEach(n=>{const a=t?t[n]:void 0;a==null||a===""||(e[n]=Array.isArray(a)?[...a]:a)})}function LZ(e={}){const{defaults:t,validate:n,buildPayload:a}=e,l=Ft(t?t():{}),o=D(!1),s=D(!1),r=D(null),u=D(_Z()),c=D(!1),d=D(0),f=D(!1);let p=null,g="",m=null,v=null;const h=(F,L)=>{r.value=F?{type:F,text:L}:null};mt(async()=>{try{const F=await M0();pp(l,F)}catch(F){F.code===401&&(s.value=!0)}o.value=!0,T()}),fe(l,()=>{!o.value||c.value||(clearTimeout(v),v=setTimeout(()=>b(!1),800))},{deep:!0});async function b(F){try{await EZ(fp(l)),u.value=new Date().toLocaleTimeString("zh-CN",{hour12:!1}),AZ(u.value),F&&na.success("配置已保存到本机")}catch(L){L.code===401?s.value=!0:na.error("配置保存失败:"+L.message)}}function y(){Object.assign(l,t?t(l):{}),h(null),na.info("已恢复默认配置")}async function C(){try{const F=await TZ(),L=F.fields||{};if(!Object.keys(L).length){na.info("暂无上次执行参数");return}pp(l,L),na.success("已恢复上次执行参数"+(F.at?`(${F.at})`:""))}catch(F){F.code===401?s.value=!0:na.error("恢复上次参数失败:"+F.message)}}const S=D([]),k=D(""),x=w(()=>[{value:"",label:"当前配置(自动保存)"},...S.value.map(F=>({value:F.id,label:F.name}))]);async function T(){try{const F=await $Z();S.value=F.configs||[]}catch{}}function E(F){if(!F)return;const L=S.value.find(K=>K.id===F);L&&(pp(l,L.fields),na.success(`已应用方案「${L.name}」`))}async function $(){const F=S.value.find(j=>j.id===k.value);let L="";try{({value:L}=await Cc.prompt("方案保存到本机(同名覆盖,密码明文保存,每套方案可绑定不同账号),供「定时任务」引用:到点自动取该方案的最新参数执行。","存为配置方案",{inputValue:F?F.name:"",confirmButtonText:"保存方案",cancelButtonText:"取消",inputPattern:/\S/,inputErrorMessage:"请输入方案名称"}))}catch{return}if(L=String(L).trim(),!L)return;const K=S.value.find(j=>j.name===L);if(K)try{await Cc.confirm(`已存在同名方案「${K.name}」,保存将覆盖它的参数(多套不同配置请用不同名称)。`,"覆盖已有方案",{type:"warning",confirmButtonText:"覆盖保存",cancelButtonText:"取消"})}catch{return}try{const j=await OZ(L,fp(l));await T(),k.value=j.config?j.config.id:"",na.success(`方案「${L}」已保存`)}catch(j){j.code===401?s.value=!0:na.error("方案保存失败:"+j.message)}}async function M(){const F=S.value.find(L=>L.id===k.value);if(F){try{await Cc.confirm(`删除配置方案「${F.name}」?引用它的定时任务到点会跳过触发并提示重选。`,"删除方案",{type:"warning",confirmButtonText:"删除",cancelButtonText:"取消"})}catch{return}try{await NZ(F.id),k.value="",await T(),na.success("方案已删除")}catch(L){na.error("方案删除失败:"+L.message)}}}async function P(F){if(!c.value){if(s.value)try{await M0(),s.value=!1}catch{h("error","登录态未就绪,请稍后重试");return}if(!(n&&!n(F))){await b(!1),h(null),c.value=!0,d.value=0;try{const L=a?a(l):fp(l);F&&(L.action=F),g=(await MZ(L)).run_id,A(),q()}catch(L){c.value=!1,z(),L.code===401?(s.value=!0,h("error","登录态未就绪,本次没有启动,请稍后重试")):L.code===409?h("warn","已取消加入执行队列,本次没有启动"):h("error","启动执行失败:"+L.message)}}}}async function N(){if(!(!g||f.value)){f.value=!0;try{await PZ(g),na.warning("已发出强制停止指令,正在终止执行进程…")}catch(F){na.error("停止失败:"+F.message)}finally{f.value=!1}}}function A(){p&&p.readyState<=1||(p=RZ(F=>{F.run_id&&F.run_id!==g||(F.t==="progress"?d.value=Math.max(d.value,F.pct||0):F.t==="run_done"&&(F.ok?V():F.status==="cancelled"?B(F.error):_(F.error||"执行失败")))}),p.onclose=()=>{p=null})}function q(){z(),m=setInterval(async()=>{var F;if(g)try{const L=await IZ(g);L.status==="done"?V((F=L.result)==null?void 0:F.summary):L.status==="cancelled"?B(L.error):L.status==="error"&&_(L.error||"执行失败")}catch{}},5e3)}function z(){m&&(clearInterval(m),m=null)}function V(F){z(),c.value=!1,d.value=100,F&&h("ok",F)}function B(F){z(),c.value=!1,h("warn","任务已取消:"+(F||"用户已停止"))}function _(F){z(),c.value=!1,h("error","执行失败:"+F)}return{form:l,loaded:o,needLogin:s,notice:r,lastSavedAt:u,running:c,progress:d,stopping:f,saveNow:b,resetDefaults:y,restoreLastFields:C,schemes:S,schemeSel:k,schemeOptions:x,onSchemeChange:E,saveSchemeAs:$,removeScheme:M,run:P,forceStop:N}}const DZ={class:"page"},BZ={class:"toolbar"},VZ={key:0,class:"notice is-warn"},FZ={class:"n-ico"},zZ={class:"sec"},HZ={class:"sec-body"},KZ={class:"dir-ctrl"},WZ={class:"sec"},jZ={class:"sec-body"},qZ={class:"inline-row"},YZ={class:"actions"},UZ={key:2,class:"runline"},GZ={class:"pct"},XZ={__name:"App",setup(e){const t=()=>({work_dir:"D:\\资料\\人资\\门店员工起调薪处理",date_start:"",date_end:"",dry_run:!0,debug_mode:!1}),{form:n,needLogin:a,notice:l,lastSavedAt:o,running:s,progress:r,stopping:u,saveNow:c,resetDefaults:d,restoreLastFields:f,schemeSel:p,schemeOptions:g,onSchemeChange:m,saveSchemeAs:v,removeScheme:h,run:b,forceStop:y}=LZ({defaults:t,validate(){return n.dry_run||na.warning("正式提交已开启:请确认标准表与试算结果无误后再执行"),!0}}),C=D(!1),S=w({get:()=>n.date_start&&n.date_end?[n.date_start,n.date_end]:null,set:x=>{n.date_start=(x==null?void 0:x[0])||"",n.date_end=(x==null?void 0:x[1])||""}});async function k(){C.value=!0;try{const x=await fetch("/api/dialog/directory",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:"选择工作目录(标准表 + 处理结果)",current:n.work_dir||""})}),T=await x.json().catch(()=>({}));if(!x.ok)throw new Error(T.detail||T.error||"HTTP "+x.status);T.path&&(n.work_dir=T.path)}catch(x){na.warning("打开文件夹选择失败:"+x.message)}finally{C.value=!1}}return(x,T)=>{const E=_t("el-option"),$=_t("el-select"),M=_t("el-button"),P=_t("el-input"),N=_t("el-form-item"),A=_t("el-form"),q=_t("el-date-picker"),z=_t("el-switch");return O(),H("div",DZ,[W("div",BZ,[T[9]||(T[9]=W("span",{class:"spacer"},null,-1)),W("span",{class:I(["saved",{"is-idle":!i(o)}])},[T[6]||(T[6]=W("i",null,null,-1)),ut(Se(i(o)?"已保存 "+i(o):"尚未保存"),1)],2),U($,{modelValue:i(p),"onUpdate:modelValue":T[0]||(T[0]=V=>Qt(p)?p.value=V:null),class:"scheme-sel",size:"small",disabled:i(s),placeholder:"当前配置(自动保存)",onChange:i(m)},{default:J(()=>[(O(!0),H(ze,null,bt(i(g),V=>(O(),oe(E,{key:V.value,label:V.label,value:V.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled","onChange"]),U(M,{size:"small",disabled:i(s),onClick:i(v)},{default:J(()=>[...T[7]||(T[7]=[ut("存为方案",-1)])]),_:1},8,["disabled","onClick"]),U(M,{size:"small",text:"",type:"danger",disabled:i(s)||!i(p),onClick:i(h)},{default:J(()=>[...T[8]||(T[8]=[ut("删除",-1)])]),_:1},8,["disabled","onClick"])]),i(a)?(O(),H("div",VZ,[...T[10]||(T[10]=[W("span",{class:"n-ico"},"!",-1),W("span",null,"未登录:请先在壳子(工作台)登录统一账户,再刷新本界面",-1)])])):i(l)?(O(),H("div",{key:1,class:I(["notice","is-"+i(l).type])},[W("span",FZ,Se(i(l).type==="ok"?"✓":i(l).type==="error"?"✕":"·"),1),W("span",null,Se(i(l).text),1)],2)):te("",!0),W("section",zZ,[T[13]||(T[13]=W("div",{class:"sec-head"},[W("span",{class:"sec-badge"},"01"),W("span",{class:"sec-name"},"目录"),W("span",{class:"sec-line"})],-1)),W("div",HZ,[U(A,{"label-position":"top"},{default:J(()=>[U(N,{label:"工作目录(线下标准表 + 处理结果)"},{default:J(()=>[W("div",KZ,[U(P,{modelValue:i(n).work_dir,"onUpdate:modelValue":T[1]||(T[1]=V=>i(n).work_dir=V),class:"dir-input",disabled:i(s),clearable:"",placeholder:"D:\\资料\\人资\\门店员工起调薪处理"},null,8,["modelValue","disabled"]),U(M,{class:"dir-btn",disabled:i(s)||C.value,loading:C.value,onClick:k},{default:J(()=>[...T[11]||(T[11]=[ut("选择",-1)])]),_:1},8,["disabled","loading"])])]),_:1}),T[12]||(T[12]=W("div",{class:"tip"},[ut(" 标准表按目录内文件名关键词("),W("b",null,"起调薪薪资标准/薪资标准"),ut(")与文件名日期自动取最新一个; 处理结果 xlsx 写入该目录;职位序列/星级按待办工号实时查询。 ")],-1))]),_:1})])]),W("section",WZ,[T[15]||(T[15]=W("div",{class:"sec-head"},[W("span",{class:"sec-badge"},"02"),W("span",{class:"sec-name"},"处理设置"),W("span",{class:"sec-line"})],-1)),W("div",jZ,[U(A,{"label-position":"top"},{default:J(()=>[W("div",qZ,[U(N,{class:"date-item",label:"处理日期范围"},{default:J(()=>[U(q,{modelValue:S.value,"onUpdate:modelValue":T[2]||(T[2]=V=>S.value=V),type:"daterange","value-format":"YYYY-MM-DD","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期","unlink-panels":"",disabled:i(s),style:{width:"100%"}},null,8,["modelValue","disabled"])]),_:1}),U(N,{class:"switch-item",label:"试算模式(不提交)"},{default:J(()=>[U(z,{modelValue:i(n).dry_run,"onUpdate:modelValue":T[3]||(T[3]=V=>i(n).dry_run=V),disabled:i(s)},null,8,["modelValue","disabled"])]),_:1}),U(N,{class:"switch-item",label:"调试日志"},{default:J(()=>[U(z,{modelValue:i(n).debug_mode,"onUpdate:modelValue":T[4]||(T[4]=V=>i(n).debug_mode=V),disabled:i(s)},null,8,["modelValue","disabled"])]),_:1})]),T[14]||(T[14]=W("div",{class:"tip"},[ut(" 日期留空=全部待办,按工资待办任务的异动日期筛选;"),W("b",null,"试算模式"),ut("只核对并输出结果,不调用起薪/调薪提交。"),W("br"),ut(" 服务/管理账套按标准表核对:应发 = 城市薪资总额 + 岗位补贴 + 奖金(服务岗按星级 100/星,管理岗按备注绩效档位); "),W("b",null,"技师账套免核对固定项总额"),ut("。备注含「数字人」的行不处理。 纳税单位缺失时自动按部门全路径中的 XX 会馆兜底。 ")],-1))]),_:1})])]),T[23]||(T[23]=cT('处理规则▾
入职:起薪,起薪时间=入职日期;核对工资项含岗位名称、固定项总额与标准一致后提交。
离职:不处理。
范围:按花名册职位序列,只处理门店服务序列、门店技师序列、门店管理序列(现网「经营系管理序列」同义)。
其他:调薪,调薪时间=异动时间;新账套与现有账套不同则换账套;按异动类型选调薪类型。
账套:门店服务序列→服务账套、门店技师序列→技师账套、门店管理序列→管理账套。
核对:不一致一律不提交;技师账套只免总额核对。
',1)),W("div",YZ,[U(M,{type:"primary",class:"btn-run",loading:i(s),onClick:i(b)},{default:J(()=>[ut(Se(i(s)?"执行中 "+i(r)+"%":i(n).dry_run?"开始试算":"一键执行"),1)]),_:1},8,["loading","onClick"]),i(s)?(O(),oe(M,{key:0,type:"danger",plain:"",loading:i(u),onClick:i(y)},{default:J(()=>[...T[16]||(T[16]=[ut("强制停止",-1)])]),_:1},8,["loading","onClick"])):te("",!0),T[20]||(T[20]=W("span",{class:"spacer"},null,-1)),U(M,{disabled:i(s),onClick:i(f)},{default:J(()=>[...T[17]||(T[17]=[ut("恢复上次参数",-1)])]),_:1},8,["disabled","onClick"]),U(M,{disabled:i(s),onClick:T[5]||(T[5]=V=>i(c)(!0))},{default:J(()=>[...T[18]||(T[18]=[ut("保存配置",-1)])]),_:1},8,["disabled"]),U(M,{text:"",disabled:i(s),onClick:i(d)},{default:J(()=>[...T[19]||(T[19]=[ut("恢复默认",-1)])]),_:1},8,["disabled","onClick"])]),i(s)?(O(),H("div",UZ,[T[21]||(T[21]=W("span",{class:"pulse"},null,-1)),T[22]||(T[22]=W("span",null,"正在执行,日志与进度实时显示在工作台下方「运行日志」区",-1)),W("span",GZ,Se(i(r))+"%",1)])):te("",!0)])}}};iw(XZ).use(kZ,{locale:xZ}).mount("#app")});export default JZ();
+ `}),u=w(()=>2*Math.PI*s.value),c=w(()=>n.type==="dashboard"?.75:1),d=w(()=>`${-1*u.value*(1-c.value)/2}px`),f=w(()=>({strokeDasharray:`${u.value*c.value}px, ${u.value}px`,strokeDashoffset:d.value})),p=w(()=>({strokeDasharray:`${u.value*c.value*(n.percentage/100)}px, ${u.value}px`,strokeDashoffset:d.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),g=w(()=>{let C;return n.color?C=y(n.percentage):C=t[n.status]||t.default,C}),m=w(()=>n.status==="warning"?Qd:n.type==="line"?n.status==="success"?Lh:ql:n.status==="success"?gr:Ya),v=w(()=>n.type==="line"?12+n.strokeWidth*.4:n.width*.111111+2),h=w(()=>n.format(n.percentage));function b(C){const S=100/C.length;return C.map((k,x)=>De(k)?{color:k,percentage:(x+1)*S}:k).sort((k,x)=>k.percentage-x.percentage)}const y=C=>{var k;const{color:S}=n;if(We(S))return S(C);if(De(S))return S;{const x=b(S);for(const T of x)if(T.percentage>C)return T.color;return(k=x[x.length-1])==null?void 0:k.color}};return(C,S)=>(O(),H("div",{class:I([i(a).b(),i(a).m(e.type),i(a).is(e.status),{[i(a).m("without-text")]:!e.showText,[i(a).m("text-inside")]:e.textInside}]),role:"progressbar","aria-valuenow":e.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[e.type==="line"?(O(),H("div",{key:0,class:I(i(a).b("bar"))},[W("div",{class:I(i(a).be("bar","outer")),style:je({height:`${e.strokeWidth}px`})},[W("div",{class:I([i(a).be("bar","inner"),{[i(a).bem("bar","inner","indeterminate")]:e.indeterminate},{[i(a).bem("bar","inner","striped")]:e.striped},{[i(a).bem("bar","inner","striped-flow")]:e.stripedFlow}]),style:je(l.value)},[(e.showText||C.$slots.default)&&e.textInside?(O(),H("div",{key:0,class:I(i(a).be("bar","innerText"))},[ne(C.$slots,"default",{percentage:e.percentage},()=>[W("span",null,Se(h.value),1)])],2)):te("v-if",!0)],6)],6)],2)):(O(),H("div",{key:1,class:I(i(a).b("circle")),style:je({height:`${e.width}px`,width:`${e.width}px`})},[(O(),H("svg",hj,[W("path",{class:I(i(a).be("circle","track")),d:r.value,stroke:`var(${i(a).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":e.strokeLinecap,"stroke-width":o.value,fill:"none",style:je(f.value)},null,14,mj),W("path",{class:I(i(a).be("circle","path")),d:r.value,stroke:g.value,fill:"none",opacity:e.percentage?1:0,"stroke-linecap":e.strokeLinecap,"stroke-width":o.value,style:je(p.value)},null,14,gj)]))],6)),(e.showText||C.$slots.default)&&!e.textInside?(O(),H("div",{key:2,class:I(i(a).e("text")),style:je({fontSize:`${v.value}px`})},[ne(C.$slots,"default",{percentage:e.percentage},()=>[e.status?(O(),oe(i(Ve),{key:1},{default:J(()=>[(O(),oe(dt(m.value)))]),_:1})):(O(),H("span",bj,Se(h.value),1))])],6)):te("v-if",!0)],10,vj))}}),wj=yj;const fm=ut(wj),Sj=$e({modelValue:{type:Number,default:0},id:{type:String,default:void 0},lowThreshold:{type:Number,default:2},highThreshold:{type:Number,default:4},max:{type:Number,default:5},colors:{type:G([Array,Object]),default:()=>dn(["","",""])},voidColor:{type:String,default:""},disabledVoidColor:{type:String,default:""},icons:{type:G([Array,Object]),default:()=>[Pu,Pu,Pu]},voidIcon:{type:Ut,default:()=>V_},disabledVoidIcon:{type:Ut,default:()=>Pu},disabled:{type:Boolean,default:void 0},allowHalf:Boolean,showText:Boolean,showScore:Boolean,textColor:{type:String,default:""},texts:{type:G(Array),default:()=>dn(["Extremely bad","Disappointed","Fair","Satisfied","Surprise"])},scoreTemplate:{type:String,default:"{value}"},size:Pn,clearable:Boolean,...ua(["ariaLabel"])}),Cj={[yt]:e=>He(e),[rt]:e=>He(e)},kj=["id","aria-label","aria-labelledby","aria-valuenow","aria-valuetext","aria-valuemax","tabindex","aria-disabled"],xj=["onMousemove","onClick"];var Ej=ue({name:"ElRate",__name:"rate",props:Sj,emits:Cj,setup(e,{expose:t,emit:n}){function a(_,F){const L=j=>st(j),K=F[Object.keys(F).map(j=>+j).filter(j=>{const X=F[j];return L(X)&&X.excluded?_j-X)[0]];return L(K)&&K.value||K}const l=e,o=n,s=Fe(Hl,void 0),r=$n(),u=he("rate"),{inputId:c,isLabeledByFormItem:d}=xa(l,{formItemContext:s}),f=D(ya(l.modelValue,0,l.max)),p=D(-1),g=D(!0),m=D([]),v=w(()=>m.value.map(_=>_.$el.clientWidth)),h=w(()=>[u.b(),u.m(r.value)]),b=sn(),y=w(()=>u.cssVarBlock({"void-color":l.voidColor,"disabled-void-color":l.disabledVoidColor,"fill-color":x.value})),C=w(()=>{let _="";return l.showScore?_=l.scoreTemplate.replace(/\{\s*value\s*\}/,b.value?`${l.modelValue}`:`${f.value}`):l.showText&&(_=l.texts[Math.ceil(f.value)-1]),_}),S=w(()=>l.modelValue*100-Math.floor(l.modelValue)*100),k=w(()=>me(l.colors)?{[l.lowThreshold]:l.colors[0],[l.highThreshold]:{value:l.colors[1],excluded:!0},[l.max]:l.colors[2]}:l.colors),x=w(()=>{const _=a(f.value,k.value);return st(_)?"":_}),T=w(()=>{let _="";return b.value?_=`${S.value}%`:l.allowHalf&&(_="50%"),{color:x.value,width:_}}),E=w(()=>{let _=me(l.icons)?[...l.icons]:{...l.icons};return _=$l(_),me(_)?{[l.lowThreshold]:_[0],[l.highThreshold]:{value:_[1],excluded:!0},[l.max]:_[2]}:_}),$=w(()=>a(l.modelValue,E.value)),M=w(()=>b.value?De(l.disabledVoidIcon)?l.disabledVoidIcon:$l(l.disabledVoidIcon):De(l.voidIcon)?l.voidIcon:$l(l.voidIcon)),P=w(()=>a(f.value,E.value));function N(_){const F=b.value&&S.value>0&&_-1l.modelValue,L=l.allowHalf&&g.value&&_-.5<=f.value&&_>f.value;return F||L}function A(_){l.clearable&&_===l.modelValue&&(_=0),o(rt,_),l.modelValue!==_&&o(yt,_)}function q(_){b.value||(l.allowHalf&&g.value?A(f.value):A(_))}function z(_){if(b.value)return;const F=Gt(_),L=l.allowHalf?.5:1;let K=f.value;switch(F){case ye.up:case ye.right:K+=L;break;case ye.left:case ye.down:K-=L}if(K=ya(K,0,l.max),K!==f.value)return _.stopPropagation(),_.preventDefault(),o(rt,K),o(yt,K),K}function V(_,F){b.value||(l.allowHalf&&F?(g.value=F.offsetX*2<=v.value[_-1],f.value=g.value?_-.5:_):f.value=_,p.value=_)}function B(){b.value||(l.allowHalf&&(g.value=l.modelValue!==Math.floor(l.modelValue)),f.value=ya(l.modelValue,0,l.max),p.value=-1)}return fe(()=>l.modelValue,_=>{f.value=ya(_,0,l.max),g.value=l.modelValue!==Math.floor(l.modelValue)}),l.modelValue||o(rt,0),t({setCurrentValue:V,resetCurrentValue:B}),(_,F)=>{var L;return O(),H("div",{id:i(c),class:I([h.value,i(u).is("disabled",i(b))]),role:"slider","aria-label":i(d)?void 0:e.ariaLabel||"rating","aria-labelledby":i(d)?(L=i(s))==null?void 0:L.labelId:void 0,"aria-valuenow":f.value,"aria-valuetext":C.value||void 0,"aria-valuemin":"0","aria-valuemax":e.max,style:je(y.value),tabindex:i(b)?void 0:0,"aria-disabled":i(b),onKeydown:z},[(O(!0),H(ze,null,bt(e.max,(K,j)=>(O(),H("span",{key:j,class:I(i(u).e("item")),onMousemove:X=>V(K,X),onMouseleave:B,onClick:X=>q(K)},[U(i(Ve),{ref_for:!0,ref_key:"iconRefs",ref:m,class:I([i(u).e("icon"),{hover:p.value===K},i(u).is("active",K<=f.value),i(u).is("focus-visible",K===Math.ceil(f.value||1))])},{default:J(()=>[ft((O(),oe(dt(P.value),null,null,512)),[[At,!N(K)&&K<=f.value]]),ft((O(),oe(dt(M.value),null,null,512)),[[At,!N(K)&&K>f.value]]),ft((O(),oe(dt(M.value),{class:I([i(u).em("decimal","box")])},null,8,["class"])),[[At,N(K)]]),ft(U(i(Ve),{style:je(T.value),class:I([i(u).e("icon"),i(u).e("decimal")])},{default:J(()=>[(O(),oe(dt($.value)))]),_:1},8,["style","class"]),[[At,N(K)]])]),_:2},1032,["class"])],42,xj))),128)),e.showText||e.showScore?(O(),H("span",{key:0,class:I(i(u).e("text")),style:je({color:e.textColor})},Se(C.value),7)):te("v-if",!0)],46,kj)}}}),Tj=Ej;const $j=ut(Tj),os={primary:"icon-primary",success:"icon-success",warning:"icon-warning",error:"icon-error",info:"icon-info"},Qy={[os.primary]:Di,[os.success]:J4,[os.warning]:Qd,[os.error]:Dh,[os.info]:Di},Oj=$e({title:{type:String,default:""},subTitle:{type:String,default:""},icon:{type:String,values:["primary","success","warning","info","error"],default:"info"}});var Nj=ue({name:"ElResult",__name:"result",props:Oj,setup(e){const t=e,n=he("result"),a=w(()=>{const l=t.icon,o=l&&os[l]?os[l]:"icon-info";return{class:o,component:Qy[o]||Qy["icon-info"]}});return(l,o)=>(O(),H("div",{class:I(i(n).b())},[W("div",{class:I(i(n).e("icon"))},[ne(l.$slots,"icon",{},()=>[a.value.component?(O(),oe(dt(a.value.component),{key:0,class:I(a.value.class)},null,8,["class"])):te("v-if",!0)])],2),e.title||l.$slots.title?(O(),H("div",{key:0,class:I(i(n).e("title"))},[ne(l.$slots,"title",{},()=>[W("p",null,Se(e.title),1)])],2)):te("v-if",!0),e.subTitle||l.$slots["sub-title"]?(O(),H("div",{key:1,class:I(i(n).e("subtitle"))},[ne(l.$slots,"sub-title",{},()=>[W("p",null,Se(e.subTitle),1)])],2)):te("v-if",!0),l.$slots.extra?(O(),H("div",{key:2,class:I(i(n).e("extra"))},[ne(l.$slots,"extra")],2)):te("v-if",!0)],2))}}),Mj=Nj;const Ij=ut(Mj),pm=Symbol("ElSelectV2Injection"),Pj=$e({allowCreate:Boolean,autocomplete:{type:G(String),default:"none"},automaticDropdown:Boolean,clearable:Boolean,clearIcon:{type:Ut,default:ql},effect:{type:G(String),default:"light"},collapseTags:Boolean,collapseTagsTooltip:Boolean,tagTooltip:{type:G(Object),default:()=>({})},maxCollapseTags:{type:Number,default:1},defaultFirstOption:Boolean,disabled:{type:Boolean,default:void 0},estimatedOptionHeight:{type:Number,default:void 0},filterable:Boolean,filterMethod:{type:G(Function)},height:{type:Number,default:274},itemHeight:{type:Number,default:34},id:String,loading:Boolean,loadingText:String,modelValue:{type:G([Array,String,Number,Boolean,Object]),default:void 0},multiple:Boolean,multipleLimit:{type:Number,default:0},name:String,noDataText:String,noMatchText:String,remoteMethod:{type:G(Function)},reserveKeyword:{type:Boolean,default:!0},options:{type:G(Array),required:!0},placeholder:{type:String},teleported:tn.teleported,persistent:{type:Boolean,default:!0},popperClass:tn.popperClass,popperStyle:tn.popperStyle,popperOptions:{type:G(Object),default:()=>({})},remote:Boolean,debounce:{type:Number,default:300},size:Pn,props:{type:G(Object),default:()=>jc},valueKey:{type:String,default:"value"},scrollbarAlwaysOn:Boolean,validateEvent:{type:Boolean,default:!0},offset:{type:Number,default:12},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},placement:{type:G(String),values:Wl,default:"bottom-start"},fallbackPlacements:{type:G(Array),default:["bottom-start","top-start","right","left"]},tagType:{...io.type,default:"info"},tagEffect:{...io.effect,default:"light"},tabindex:{type:[String,Number],default:0},appendTo:tn.appendTo,fitInputWidth:{type:[Boolean,Number],default:!0,validator(e){return Wt(e)||He(e)}},suffixIcon:{type:Ut,default:jl},...As,...ua(["ariaLabel"])}),Rj=$e({data:Array,disabled:Boolean,hovering:Boolean,item:{type:G(Object),required:!0},index:Number,style:Object,selected:Boolean,created:Boolean}),_j={[rt]:e=>!0,[yt]:e=>!0,"end-reached":Vi["end-reached"],"remove-tag":e=>!0,"visible-change":e=>!0,focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0},Aj={hover:e=>He(e),select:(e,t)=>!0};var Lj=ue({props:{item:{type:Object,required:!0},style:{type:Object},height:Number},setup(){return{ns:he("select")}}});function Dj(e,t,n,a,l,o){return O(),H("div",{class:I(e.ns.be("group","title")),style:je({...e.style,lineHeight:`${e.height}px`})},Se(e.item.label),7)}var Bj=Rn(Lj,[["render",Dj]]);function Vj(e,{emit:t}){return{hoverItem:()=>{e.disabled||t("hover",e.index)},selectOptionClick:()=>{e.disabled||t("select",e.item,e.index)}}}var Fj=ue({props:Rj,emits:Aj,setup(e,{emit:t}){const n=Fe(pm),a=he("select"),l=ur?null:"mousemove",{hoverItem:o,selectOptionClick:s}=Vj(e,{emit:t}),{getLabel:r}=gu(n.props),u=n.contentId;return{ns:a,contentId:u,mouseMoveEventName:l,hoverItem:o,handleMousedown:d=>{let f=d.target;const p=d.currentTarget;for(;f&&f!==p;){if(Cs(f))return;f=f.parentElement}d.preventDefault()},selectOptionClick:s,getLabel:r}}});const zj=["id","aria-selected","aria-disabled"];function Hj(e,t,n,a,l,o){return O(),H("li",pt({id:`${e.contentId}-${e.index}`,role:"option","aria-selected":e.selected,"aria-disabled":e.disabled||void 0,style:e.style,class:[e.ns.be("dropdown","item"),e.ns.is("selected",e.selected),e.ns.is("disabled",e.disabled),e.ns.is("created",e.created),e.ns.is("hovering",e.hovering)]},{[ds(e.mouseMoveEventName)]:t[0]||(t[0]=(...s)=>e.hoverItem&&e.hoverItem(...s))},{onMousedown:t[1]||(t[1]=(...s)=>e.handleMousedown&&e.handleMousedown(...s)),onClick:t[2]||(t[2]=Je((...s)=>e.selectOptionClick&&e.selectOptionClick(...s),["stop"]))}),[ne(e.$slots,"default",{item:e.item,index:e.index,disabled:e.disabled},()=>[W("span",null,Se(e.getLabel(e.item)),1)])],16,zj)}var Kj=Rn(Fj,[["render",Hj]]),Wj=ue({name:"ElSelectDropdown",props:{loading:Boolean,data:{type:Array,required:!0},hoveringIndex:Number,width:Number,id:String,ariaLabel:String},emits:{"end-reached":Vi["end-reached"]},setup(e,{slots:t,expose:n,emit:a}){const l=Fe(pm),o=he("select"),{getLabel:s,getValue:r,getDisabled:u}=gu(l.props),c=D([]),d=D(),f=w(()=>e.data.length);fe(()=>f.value,()=>{var N,A;(A=(N=l.tooltipRef.value)==null?void 0:N.updatePopper)==null||A.call(N)});const p=w(()=>Et(l.props.estimatedOptionHeight)),g=w(()=>p.value?{itemSize:l.props.itemHeight}:{estimatedSize:l.props.estimatedOptionHeight,itemSize:N=>c.value[N]}),m=(N=[],A)=>{const{props:{valueKey:q}}=l;return st(A)?N&&N.some(z=>Zt(Sn(z,q))===Sn(A,q)):N.includes(A)},v=(N,A)=>{if(st(A)){const{valueKey:q}=l.props;return Sn(N,q)===Sn(A,q)}else return N===A},h=(N,A)=>l.props.multiple?m(N,r(A)):v(N,r(A)),b=(N,A)=>{const{disabled:q,multiple:z,multipleLimit:V}=l.props;return q||!A&&(z?V>0&&N.length>=V:!1)},y=N=>e.hoveringIndex===N;n({listRef:d,isSized:p,isItemDisabled:b,isItemHovering:y,isItemSelected:h,scrollToItem:N=>{const A=d.value;A&&A.scrollToItem(N)},resetScrollTop:()=>{const N=d.value;N&&N.resetScrollTop()}});const k=N=>{const{index:A,data:q,style:z}=N,V=i(p),{itemSize:B,estimatedSize:_}=i(g),{modelValue:F}=l.props,{onSelect:L,onHover:K}=l,j=q[A];if(j.type==="Group")return U(Bj,{item:j,style:z,height:V?B:_},null);const X=h(F,j),Z=b(F,X),Q=y(A);return U(Kj,pt(N,{selected:X,disabled:u(j)||Z,created:!!j.created,hovering:Q,item:j,onSelect:L,onHover:K}),{default:ee=>{var ie;return((ie=t.default)==null?void 0:ie.call(t,ee))||U("span",null,[s(j)])}})},{onKeyboardNavigate:x,onKeyboardSelect:T}=l,E=()=>{x("forward")},$=()=>{x("backward")},M=N=>{const A=Gt(N),{tab:q,esc:z,down:V,up:B,enter:_,numpadEnter:F}=ye;switch([z,V,B,_,F].includes(A)&&(N.preventDefault(),N.stopPropagation()),A){case q:case z:break;case V:E();break;case B:$();break;case _:case F:T()}},P=N=>{a("end-reached",N)};return()=>{var F,L,K,j;const{data:N,width:A}=e,{height:q,multiple:z,scrollbarAlwaysOn:V}=l.props,B=ur?!0:V,_=i(p)?bu:_V;return U("div",{class:[o.b("dropdown"),o.is("multiple",z)],style:{width:`${A}px`}},[(F=t.header)==null?void 0:F.call(t),((L=t.loading)==null?void 0:L.call(t))||((K=t.empty)==null?void 0:K.call(t))||U(_,pt({ref:d},i(g),{className:o.be("dropdown","list"),scrollbarAlwaysOn:B,data:N,height:q,width:A,total:N.length,innerElement:"ul",innerProps:{id:e.id,role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},onEndReached:P,onKeydown:M}),{default:X=>U(k,X,null)}),(j=t.footer)==null?void 0:j.call(t)])}}});function jj(e,t){const{aliasProps:n,getLabel:a,getValue:l}=gu(e),o=D(0),s=D(),r=w(()=>e.allowCreate&&e.filterable);fe(()=>e.options,g=>{const m=new Set(g.map(v=>a(v)));t.createdOptions=t.createdOptions.filter(v=>!m.has(a(v)))});function u(g){const m=v=>a(v)===g;return e.options&&e.options.some(m)||t.createdOptions.some(m)}function c(g){r.value&&(e.multiple&&g.created?o.value++:s.value=g)}function d(g){if(r.value)if(g&&g.length>0){if(u(g)){t.createdOptions=t.createdOptions.filter(v=>a(v)!==t.previousQuery);return}const m={[n.value.value]:g,[n.value.label]:g,created:!0,[n.value.disabled]:!1};t.createdOptions.length>=o.value?t.createdOptions[o.value]=m:t.createdOptions.push(m)}else if(e.multiple)t.createdOptions.length=o.value;else{const m=s.value;t.createdOptions.length=0,m&&m.created&&t.createdOptions.push(m)}}function f(g){if(!r.value||!g||!g.created||g.created&&e.reserveKeyword&&t.inputValue===a(g))return;const m=t.createdOptions.findIndex(v=>l(v)===l(g));~m&&(t.createdOptions.splice(m,1),o.value--)}function p(){r.value&&(t.createdOptions.length=0,o.value=0)}return{createNewOption:d,removeNewOption:f,selectNewOption:c,clearAllNewOption:p}}const qj=(e,t)=>{const{t:n}=St(),a=mn(),l=he("select"),o=he("input"),{form:s,formItem:r}=Hn(),{inputId:u}=xa(e,{formItemContext:r}),{aliasProps:c,getLabel:d,getValue:f,getDisabled:p,getOptions:g}=gu(e),{valueOnClear:m,isEmptyValue:v}=vu(e),h=Ft({inputValue:"",cachedOptions:[],createdOptions:[],hoveringIndex:-1,inputHovering:!1,collapseItemWidth:0,previousQuery:null,previousValue:void 0,selectedLabel:"",menuVisibleOnFocus:!1,isBeforeHide:!1}),b=D(-1),y=D(!1),C=D(),S=D(),k=D(),x=D(),T=D(),E=D(),$=D(),M=D(),P=D(),N=D(),{isComposing:A,handleCompositionStart:q,handleCompositionEnd:z,handleCompositionUpdate:V}=pu({afterComposition:Ne=>gn(Ne)}),B=sn(),{wrapperRef:_,isFocused:F,handleBlur:L}=ho(T,{disabled:B,afterFocus(){e.automaticDropdown&&!Z.value&&(Z.value=!0,h.menuVisibleOnFocus=!0)},beforeBlur(Ne){var ct,Ct;return((ct=k.value)==null?void 0:ct.isFocusInsideContent(Ne))||((Ct=x.value)==null?void 0:Ct.isFocusInsideContent(Ne))},afterBlur(){var Ne;Z.value=!1,h.menuVisibleOnFocus=!1,e.validateEvent&&((Ne=r==null?void 0:r.validate)==null||Ne.call(r,"blur").catch(vt))}}),K=w(()=>we("")),j=w(()=>e.loading?!1:e.options.length>0||h.createdOptions.length>0),X=D([]),Z=D(!1),Q=w(()=>(s==null?void 0:s.statusIcon)??!1),ee=w(()=>{const Ne=X.value.length*e.itemHeight;return Ne>e.height?e.height:Ne}),ie=w(()=>e.multiple?me(e.modelValue)&&e.modelValue.length>0:!v(e.modelValue)),ve=w(()=>e.clearable&&!B.value&&ie.value&&(F.value||h.inputHovering)),pe=w(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),re=w(()=>pe.value&&l.is("reverse",Z.value)),R=w(()=>(r==null?void 0:r.validateState)||""),Y=w(()=>{if(R.value)return ef[R.value]}),ae=w(()=>e.remote?e.debounce:0),le=w(()=>e.remote&&!h.inputValue&&!j.value),se=w(()=>e.loading?e.loadingText||n("el.select.loading"):e.filterable&&h.inputValue&&j.value&&X.value.length===0?e.noMatchText||n("el.select.noMatch"):j.value?null:e.noDataText||n("el.select.noData")),de=w(()=>e.filterable&&We(e.filterMethod)),be=w(()=>e.filterable&&e.remote&&We(e.remoteMethod)),we=Ne=>{const ct=new RegExp(gh(Ne),"i"),Ct=$t=>de.value||be.value?!0:Ne?ct.test(d($t)||""):!0;return e.loading?[]:[...h.createdOptions,...e.options].reduce(($t,jn)=>{const ga=g(jn);if(me(ga)){const _r=ga.filter(Ct);_r.length>0&&$t.push({label:d(jn),type:"Group"},..._r)}else(e.remote||Ct(jn))&&$t.push(jn);return $t},[])},Oe=()=>{X.value=we(h.inputValue)},Ce=w(()=>{const Ne=new Map;return K.value.forEach((ct,Ct)=>{Ne.set(Re(f(ct)),{option:ct,index:Ct})}),Ne}),Ie=w(()=>{const Ne=new Map;return X.value.forEach((ct,Ct)=>{Ne.set(Re(f(ct)),{option:ct,index:Ct})}),Ne}),ge=w(()=>X.value.every(Ne=>p(Ne))),ke=$n(),Le=w(()=>ke.value==="small"?"small":"default"),qe=()=>{var ct;if(He(e.fitInputWidth)){b.value=e.fitInputWidth;return}const Ne=((ct=C.value)==null?void 0:ct.offsetWidth)||200;!e.fitInputWidth&&j.value?Ae(()=>{b.value=Math.max(Ne,lt())}):b.value=Ne},lt=()=>{var ga,_r;const Ne=document.createElement("canvas").getContext("2d"),ct=l.be("dropdown","item"),Ct=(((_r=(ga=M.value)==null?void 0:ga.listRef)==null?void 0:_r.innerRef)||document).querySelector(`.${ct}`);if(Ct===null||Ne===null)return 0;const $t=getComputedStyle(Ct),jn=Number.parseFloat($t.paddingLeft)+Number.parseFloat($t.paddingRight);return Ne.font=`bold ${$t.font.replace(new RegExp(`\\b${$t.fontWeight}\\b`),"")}`,X.value.reduce((Ox,Nx)=>{const Mx=Ne.measureText(d(Nx));return Math.max(Mx.width,Ox)},0)+jn},nt=()=>{if(!S.value)return 0;const Ne=window.getComputedStyle(S.value);return Number.parseFloat(Ne.gap||"6px")},Ze=w(()=>{const Ne=nt();return{maxWidth:`calc(100% - ${(e.filterable&&!B.value?Ne+11:0)+(N.value&&e.maxCollapseTags===1?h.collapseItemWidth+Ne:0)}px)`}}),kt=w(()=>me(e.modelValue)?e.modelValue.length===0&&!h.inputValue:e.filterable?!h.inputValue:!0),Pt=w(()=>{const Ne=e.placeholder??n("el.select.placeholder");return e.multiple||!ie.value?Ne:h.selectedLabel}),Lt=w(()=>{var Ne,ct;return(ct=(Ne=k.value)==null?void 0:Ne.popperRef)==null?void 0:ct.contentRef}),Rt=w(()=>{if(e.multiple){const Ne=e.modelValue.length;if(Ne>0&&Ie.value.has(e.modelValue[Ne-1])){const{index:ct}=Ie.value.get(e.modelValue[Ne-1]);return ct}}else if(!v(e.modelValue)&&Ie.value.has(e.modelValue)){const{index:Ne}=Ie.value.get(e.modelValue);return Ne}return-1}),jt=w({get(){return Z.value&&(e.loading||!le.value||e.remote&&!!a.empty)&&(!y.value||!pa(h.previousQuery)||j.value)},set(Ne){Z.value=Ne}}),Yt=w(()=>e.multiple?e.collapseTags?h.cachedOptions.slice(0,e.maxCollapseTags):h.cachedOptions:[]),Ee=w(()=>e.multiple?e.collapseTags?h.cachedOptions.slice(e.maxCollapseTags):[]:[]),{createNewOption:xe,removeNewOption:Ke,selectNewOption:Xe,clearAllNewOption:Vt}=jj(e,h),ce=Ne=>{var ct;B.value||e.filterable&&Z.value&&Ne&&!((ct=$.value)!=null&&ct.contains(Ne.target))||(h.menuVisibleOnFocus?h.menuVisibleOnFocus=!1:Z.value=!Z.value)},Pe=()=>{h.inputValue.length>0&&!Z.value&&(Z.value=!0),xe(h.inputValue),Ae(()=>{at(h.inputValue)})},Ue=su(()=>{Pe(),y.value=!1},ae),at=Ne=>{h.previousQuery===Ne||A.value||(h.previousQuery=Ne,e.filterable&&We(e.filterMethod)?e.filterMethod(Ne):e.filterable&&e.remote&&We(e.remoteMethod)&&e.remoteMethod(Ne),e.defaultFirstOption&&(e.filterable||e.remote)&&X.value.length?Ae(gt):Ae(Mt))},gt=()=>{const Ne=X.value.filter($t=>!$t.disabled&&$t.type!=="Group"),ct=Ne.find($t=>$t.created),Ct=Ne[0];h.hoveringIndex=Bt(X.value,ct||Ct)},wt=Ne=>{cn(e.modelValue,Ne)||t(yt,Ne)},et=Ne=>{t(rt,Ne),wt(Ne),h.previousValue=e.multiple?String(Ne):Ne,Ae(()=>{if(e.multiple&&me(e.modelValue)){const ct=h.cachedOptions.slice(),Ct=e.modelValue.map($t=>Pr($t,ct));cn(h.cachedOptions,Ct)||(h.cachedOptions=Ct)}else Ds(!0)})},Bt=(Ne=[],ct)=>{if(!st(ct))return Ne.indexOf(ct);const Ct=e.valueKey;let $t=-1;return Ne.some((jn,ga)=>Sn(jn,Ct)===Sn(ct,Ct)?($t=ga,!0):!1),$t},Re=Ne=>st(Ne)?Sn(Ne,e.valueKey):Ne,Ye=()=>{qe()},Qe=Ne=>{t("end-reached",Ne)},Xt=()=>{h.collapseItemWidth=N.value.getBoundingClientRect().width},Me=()=>{var Ne,ct;(ct=(Ne=k.value)==null?void 0:Ne.updatePopper)==null||ct.call(Ne)},Be=()=>{var Ne,ct;(ct=(Ne=x.value)==null?void 0:Ne.updatePopper)==null||ct.call(Ne)},_e=Ne=>{const ct=f(Ne);if(e.multiple){let Ct=e.modelValue.slice();const $t=Bt(Ct,ct);$t>-1?(Ct=[...Ct.slice(0,$t),...Ct.slice($t+1)],h.cachedOptions.splice($t,1),Ke(Ne)):(e.multipleLimit<=0||Ct.length{let Ct=e.modelValue.slice();const $t=Bt(Ct,f(ct));$t>-1&&!B.value&&(Ct=[...e.modelValue.slice(0,$t),...e.modelValue.slice($t+1)],h.cachedOptions.splice($t,1),et(Ct),t("remove-tag",f(ct)),Ke(ct)),Ne.stopPropagation(),qt()},qt=()=>{var Ne;(Ne=T.value)==null||Ne.focus()},nn=()=>{var Ne;if(Z.value){Z.value=!1,Ae(()=>{var ct;return(ct=T.value)==null?void 0:ct.blur()});return}(Ne=T.value)==null||Ne.blur()},On=()=>{h.inputValue.length>0?h.inputValue="":Z.value=!1},Xa=Ne=>Ww(Ne,ct=>!h.cachedOptions.some(Ct=>f(Ct)===ct&&p(Ct))),pl=Ne=>{const ct=Gt(Ne);if(e.multiple&&ct!==ye.delete&&h.inputValue.length===0){Ne.preventDefault();const Ct=e.modelValue.slice(),$t=Xa(Ct);if($t<0)return;const jn=Ct[$t];Ct.splice($t,1);const ga=h.cachedOptions[$t];h.cachedOptions.splice($t,1),Ke(ga),et(Ct),t("remove-tag",jn)}},bo=()=>{let Ne;me(e.modelValue)?Ne=[]:Ne=m.value,h.selectedLabel="",Z.value=!1,et(Ne),t("clear"),Vt(),qt()},Ja=(Ne,ct=void 0)=>{const Ct=X.value;if(!["forward","backward"].includes(Ne)||B.value||Ct.length<=0||ge.value||A.value)return;if(!Z.value)return ce();Et(ct)&&(ct=h.hoveringIndex);let $t=-1;Ne==="forward"?($t=ct+1,$t>=Ct.length&&($t=0)):Ne==="backward"&&($t=ct-1,($t<0||$t>=Ct.length)&&($t=Ct.length-1));const jn=Ct[$t];if(p(jn)||jn.type==="Group")return Ja(Ne,$t);h.hoveringIndex=$t,Za($t)},Te=()=>{if(Z.value)~h.hoveringIndex&&X.value[h.hoveringIndex]&&_e(X.value[h.hoveringIndex]);else return ce()},ot=Ne=>{h.hoveringIndex=Ne??-1},Mt=()=>{if(!e.multiple)h.hoveringIndex=X.value.findIndex(Ne=>Re(f(Ne))===Re(e.modelValue));else{const Ne=e.modelValue.length;if(Ne>0){const ct=e.modelValue[Ne-1];h.hoveringIndex=X.value.findIndex(Ct=>Re(ct)===Re(f(Ct)))}else h.hoveringIndex=-1}},gn=Ne=>{if(h.inputValue=Ne.target.value,e.remote)y.value=!0,Ue();else return Pe()},ln=Ne=>{if(Z.value=!1,F.value){const ct=new FocusEvent("blur",Ne);L(ct)}},Nn=()=>(h.isBeforeHide=!1,Ae(()=>{~Rt.value&&Za(Rt.value)})),Za=Ne=>{M.value.scrollToItem(Ne)},Pr=(Ne,ct)=>{const Ct=Re(Ne);if(Ce.value.has(Ct)){const{option:$t}=Ce.value.get(Ct);return $t}if(ct&&ct.length){const $t=ct.find(jn=>Re(f(jn))===Ct);if($t)return $t}return{[c.value.value]:Ne,[c.value.label]:Ne}},Uo=Ne=>{var ct;return((ct=Ce.value.get(f(Ne)))==null?void 0:ct.index)??-1},Ds=(Ne=!1)=>{if(e.multiple)if(e.modelValue.length>0){const ct=h.cachedOptions.slice();h.cachedOptions.length=0,h.previousValue=e.modelValue.toString();for(const Ct of e.modelValue){const $t=Pr(Ct,ct);h.cachedOptions.push($t)}}else h.cachedOptions=[],h.previousValue=void 0;else if(ie.value){h.previousValue=e.modelValue;const ct=X.value,Ct=ct.findIndex($t=>Re(f($t))===Re(e.modelValue));~Ct?h.selectedLabel=d(ct[Ct]):(!h.selectedLabel||Ne)&&(h.selectedLabel=Re(e.modelValue))}else h.selectedLabel="",h.previousValue=void 0;Vt(),qe()};fe(()=>e.fitInputWidth,()=>{qe()}),fe(Z,Ne=>{Ne?(e.persistent||qe(),at("")):(h.inputValue="",h.previousQuery=null,h.isBeforeHide=!0,h.menuVisibleOnFocus=!1,xe(""))}),fe(()=>e.modelValue,(Ne,ct)=>{var Ct;(!Ne||me(Ne)&&Ne.length===0||e.multiple&&!cn(Ne.toString(),h.previousValue)||!e.multiple&&Re(Ne)!==Re(h.previousValue))&&Ds(!0),!cn(Ne,ct)&&e.validateEvent&&((Ct=r==null?void 0:r.validate)==null||Ct.call(r,"change").catch(vt))},{deep:!0}),fe(()=>e.options,()=>{const Ne=T.value;(!Ne||Ne&&document.activeElement!==Ne)&&Ds()},{deep:!0,flush:"post"}),fe(()=>X.value,()=>(qe(),M.value&&Ae(M.value.resetScrollTop))),ia(()=>{h.isBeforeHide||Oe()}),ia(()=>{const{valueKey:Ne,options:ct}=e,Ct=new Map;for(const $t of ct){const jn=f($t);let ga=jn;if(st(ga)&&(ga=Sn(jn,Ne)),Ct.get(ga)){Kt("ElSelectV2","The option values you provided seem to be duplicated, which may cause some problems, please check.");break}else Ct.set(ga,!0)}}),mt(()=>{Ds()}),on(C,()=>Kn(Ye)),on(_,Me),on(P,Be),on(N,Xt);let Rr;return fe(()=>jt.value,Ne=>{Ne?Rr=on(M,Me).stop:(Rr==null||Rr(),Rr=void 0),t("visible-change",Ne)}),{inputId:u,collapseTagSize:Le,currentPlaceholder:Pt,expanded:Z,emptyText:se,popupHeight:ee,debounce:ae,allOptions:K,allOptionsValueMap:Ce,filteredOptions:X,iconComponent:pe,iconReverse:re,tagStyle:Ze,popperSize:b,dropdownMenuVisible:jt,hasModelValue:ie,shouldShowPlaceholder:kt,selectDisabled:B,selectSize:ke,needStatusIcon:Q,showClearBtn:ve,states:h,isFocused:F,nsSelect:l,nsInput:o,inputRef:T,menuRef:M,tagMenuRef:P,tooltipRef:k,tagTooltipRef:x,selectRef:C,wrapperRef:_,selectionRef:S,prefixRef:E,suffixRef:$,collapseItemRef:N,popperRef:Lt,validateState:R,validateIcon:Y,showTagList:Yt,collapseTagList:Ee,debouncedOnInputChange:Ue,deleteTag:Nt,getLabel:d,getValue:f,getDisabled:p,getValueKey:Re,getIndex:Uo,handleClear:bo,handleClickOutside:ln,handleDel:pl,handleEsc:On,focus:qt,blur:nn,handleMenuEnter:Nn,handleResize:Ye,updateTooltip:Me,updateTagTooltip:Be,updateOptions:Oe,toggleMenu:ce,scrollTo:Za,onInput:gn,onKeyboardNavigate:Ja,onKeyboardSelect:Te,onEndReached:Qe,onSelect:_e,onHover:ot,handleCompositionStart:q,handleCompositionEnd:z,handleCompositionUpdate:V}};var Yj=ue({name:"ElSelectV2",components:{ElSelectMenu:Wj,ElTag:oo,ElTooltip:zn,ElIcon:Ve},directives:{ClickOutside:Ho},props:Pj,emits:_j,setup(e,{emit:t}){const n=w(()=>{const{modelValue:u,multiple:c}=e,d=c?[]:void 0;return me(u)?c?u:d:c?d:u}),a=qj(Ft({...Vn(e),modelValue:n}),t),{calculatorRef:l,inputStyle:o}=mh(),s=Gn();Tt(pm,{props:Ft({...Vn(e),height:a.popupHeight,modelValue:n}),expanded:a.expanded,tooltipRef:a.tooltipRef,contentId:s,onSelect:a.onSelect,onHover:a.onHover,onKeyboardNavigate:a.onKeyboardNavigate,onKeyboardSelect:a.onKeyboardSelect});const r=w(()=>e.multiple?a.states.cachedOptions.map(u=>a.getLabel(u)):a.states.selectedLabel);return{...a,modelValue:n,selectedLabel:r,calculatorRef:l,inputStyle:o,contentId:s,BORDER_HORIZONTAL_WIDTH:2}}});const Uj=["id","value","autocomplete","tabindex","aria-expanded","aria-label","disabled","aria-controls","aria-activedescendant","readonly","name"],Gj=["textContent"],Xj={key:1};function Jj(e,t,n,a,l,o){const s=_t("el-tag"),r=_t("el-tooltip"),u=_t("el-icon"),c=_t("el-select-menu"),d=C1("click-outside");return ft((O(),H("div",{ref:"selectRef",class:I([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),onMouseenter:t[15]||(t[15]=f=>e.states.inputHovering=!0),onMouseleave:t[16]||(t[16]=f=>e.states.inputHovering=!1)},[U(r,{ref:"tooltipRef",visible:e.dropdownMenuVisible,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-style":e.popperStyle,"gpu-acceleration":!1,"stop-popper-mouse-event":!1,"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,placement:e.placement,pure:"",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,trigger:"click",persistent:e.persistent,"append-to":e.appendTo,"show-arrow":e.showArrow,offset:e.offset,onBeforeShow:e.handleMenuEnter,onHide:t[14]||(t[14]=f=>e.states.isBeforeHide=!1)},{default:J(()=>{var f;return[W("div",{ref:"wrapperRef",class:I([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:t[11]||(t[11]=Je((...p)=>e.toggleMenu&&e.toggleMenu(...p),["prevent"]))},[e.$slots.prefix?(O(),H("div",{key:0,ref:"prefixRef",class:I(e.nsSelect.e("prefix"))},[ne(e.$slots,"prefix")],2)):te("v-if",!0),W("div",{ref:"selectionRef",class:I([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.modelValue.length)])},[e.multiple?ne(e.$slots,"tag",{key:0,data:e.states.cachedOptions,deleteTag:e.deleteTag,selectDisabled:e.selectDisabled},()=>{var p,g,m,v,h,b,y,C,S,k,x,T,E;return[(O(!0),H(ze,null,bt(e.showTagList,$=>(O(),H("div",{key:e.getValueKey(e.getValue($)),class:I(e.nsSelect.e("selected-item")),style:je(e.tagStyle)},[U(s,{closable:!e.selectDisabled&&!e.getDisabled($),size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:M=>e.deleteTag(M,$)},{default:J(()=>[W("span",{class:I(e.nsSelect.e("tags-text"))},[ne(e.$slots,"label",{index:e.getIndex($),label:e.getLabel($),value:e.getValue($)},()=>[it(Se(e.getLabel($)),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],6))),128)),e.collapseTags&&e.states.cachedOptions.length>e.maxCollapseTags?(O(),oe(r,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":((p=e.tagTooltip)==null?void 0:p.fallbackPlacements)??["bottom","top","right","left"],effect:((g=e.tagTooltip)==null?void 0:g.effect)??e.effect,placement:((m=e.tagTooltip)==null?void 0:m.placement)??"bottom","popper-class":((v=e.tagTooltip)==null?void 0:v.popperClass)??e.popperClass,"popper-style":((h=e.tagTooltip)==null?void 0:h.popperStyle)??e.popperStyle,teleported:((b=e.tagTooltip)==null?void 0:b.teleported)??e.teleported,"append-to":((y=e.tagTooltip)==null?void 0:y.appendTo)??e.appendTo,"popper-options":((C=e.tagTooltip)==null?void 0:C.popperOptions)??e.popperOptions,transition:(S=e.tagTooltip)==null?void 0:S.transition,"show-after":(k=e.tagTooltip)==null?void 0:k.showAfter,"hide-after":(x=e.tagTooltip)==null?void 0:x.hideAfter,"auto-close":(T=e.tagTooltip)==null?void 0:T.autoClose,offset:(E=e.tagTooltip)==null?void 0:E.offset},{default:J(()=>[W("div",{ref:"collapseItemRef",class:I([e.nsSelect.e("selected-item"),e.nsSelect.e("collapse-item")])},[U(s,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":""},{default:J(()=>[W("span",{class:I(e.nsSelect.e("tags-text"))}," + "+Se(e.states.cachedOptions.length-e.maxCollapseTags),3)]),_:1},8,["size","type","effect"])],2)]),content:J(()=>[W("div",{ref:"tagMenuRef",class:I(e.nsSelect.e("selection"))},[(O(!0),H(ze,null,bt(e.collapseTagList,$=>(O(),H("div",{key:e.getValueKey(e.getValue($)),class:I(e.nsSelect.e("selected-item"))},[U(s,{class:"in-tooltip",closable:!e.selectDisabled&&!e.getDisabled($),size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:M=>e.deleteTag(M,$)},{default:J(()=>[W("span",{class:I(e.nsSelect.e("tags-text"))},[ne(e.$slots,"label",{index:e.getIndex($),label:e.getLabel($),value:e.getValue($)},()=>[it(Se(e.getLabel($)),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","fallback-placements","effect","placement","popper-class","popper-style","teleported","append-to","popper-options","transition","show-after","hide-after","auto-close","offset"])):te("v-if",!0)]}):te("v-if",!0),W("div",{class:I([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable||e.selectDisabled||e.multiple&&!e.states.inputValue&&!e.isFocused)])},[W("input",{id:e.inputId,ref:"inputRef",value:e.states.inputValue,style:je(e.inputStyle),autocomplete:e.autocomplete,tabindex:e.tabindex,"aria-autocomplete":"none","aria-haspopup":"listbox",autocapitalize:"off","aria-expanded":e.expanded,"aria-label":e.ariaLabel,class:I([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,role:"combobox","aria-controls":e.contentId,"aria-activedescendant":e.states.hoveringIndex>=0?`${e.contentId}-${e.states.hoveringIndex}`:"",readonly:!e.filterable,spellcheck:"false",type:"text",name:e.name,onInput:t[0]||(t[0]=(...p)=>e.onInput&&e.onInput(...p)),onChange:t[1]||(t[1]=Je(()=>{},["stop"])),onCompositionstart:t[2]||(t[2]=(...p)=>e.handleCompositionStart&&e.handleCompositionStart(...p)),onCompositionupdate:t[3]||(t[3]=(...p)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...p)),onCompositionend:t[4]||(t[4]=(...p)=>e.handleCompositionEnd&&e.handleCompositionEnd(...p)),onKeydown:[t[5]||(t[5]=an(Je(p=>e.onKeyboardNavigate("backward"),["stop","prevent"]),["up"])),t[6]||(t[6]=an(Je(p=>e.onKeyboardNavigate("forward"),["stop","prevent"]),["down"])),t[7]||(t[7]=an(Je((...p)=>e.onKeyboardSelect&&e.onKeyboardSelect(...p),["stop","prevent"]),["enter"])),t[8]||(t[8]=an(Je((...p)=>e.handleEsc&&e.handleEsc(...p),["stop","prevent"]),["esc"])),t[9]||(t[9]=an(Je((...p)=>e.handleDel&&e.handleDel(...p),["stop"]),["delete"]))],onClick:t[10]||(t[10]=Je((...p)=>e.toggleMenu&&e.toggleMenu(...p),["stop"]))},null,46,Uj),e.filterable?(O(),H("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:I(e.nsSelect.e("input-calculator")),textContent:Se(e.states.inputValue)},null,10,Gj)):te("v-if",!0)],2),e.shouldShowPlaceholder?(O(),H("div",{key:1,class:I([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?ne(e.$slots,"label",{key:0,index:((f=e.allOptionsValueMap.get(e.modelValue))==null?void 0:f.index)??-1,label:e.currentPlaceholder,value:e.modelValue},()=>[W("span",null,Se(e.currentPlaceholder),1)]):(O(),H("span",Xj,Se(e.currentPlaceholder),1))],2)):te("v-if",!0)],2),W("div",{ref:"suffixRef",class:I(e.nsSelect.e("suffix"))},[e.iconComponent?ft((O(),oe(u,{key:0,class:I([e.nsSelect.e("caret"),e.nsInput.e("icon"),e.iconReverse])},{default:J(()=>[(O(),oe(dt(e.iconComponent)))]),_:1},8,["class"])),[[At,!e.showClearBtn]]):te("v-if",!0),e.showClearBtn&&e.clearIcon?(O(),oe(u,{key:1,class:I([e.nsSelect.e("caret"),e.nsInput.e("icon"),e.nsSelect.e("clear")]),onClick:Je(e.handleClear,["prevent","stop"])},{default:J(()=>[(O(),oe(dt(e.clearIcon)))]),_:1},8,["class","onClick"])):te("v-if",!0),e.validateState&&e.validateIcon&&e.needStatusIcon?(O(),oe(u,{key:2,class:I([e.nsInput.e("icon"),e.nsInput.e("validateIcon"),e.nsInput.is("loading",e.validateState==="validating")])},{default:J(()=>[(O(),oe(dt(e.validateIcon)))]),_:1},8,["class"])):te("v-if",!0)],2)],2)]}),content:J(()=>[U(c,{id:e.contentId,ref:"menuRef",data:e.filteredOptions,width:e.popperSize-e.BORDER_HORIZONTAL_WIDTH,"hovering-index":e.states.hoveringIndex,"scrollbar-always-on":e.scrollbarAlwaysOn,"aria-label":e.ariaLabel,onEndReached:e.onEndReached},va({default:J(f=>[ne(e.$slots,"default",Cl(kl(f)))]),_:2},[e.$slots.header?{name:"header",fn:J(()=>[W("div",{class:I(e.nsSelect.be("dropdown","header")),onClick:t[12]||(t[12]=Je(()=>{},["stop"]))},[ne(e.$slots,"header")],2)]),key:"0"}:void 0,e.$slots.loading&&e.loading?{name:"loading",fn:J(()=>[W("div",{class:I(e.nsSelect.be("dropdown","loading"))},[ne(e.$slots,"loading")],2)]),key:"1"}:e.loading||e.filteredOptions.length===0?{name:"empty",fn:J(()=>[W("div",{class:I(e.nsSelect.be("dropdown","empty"))},[ne(e.$slots,"empty",{},()=>[W("span",null,Se(e.emptyText),1)])],2)]),key:"2"}:void 0,e.$slots.footer?{name:"footer",fn:J(()=>[W("div",{class:I(e.nsSelect.be("dropdown","footer")),onClick:t[13]||(t[13]=Je(()=>{},["stop"]))},[ne(e.$slots,"footer")],2)]),key:"3"}:void 0]),1032,["id","data","width","hovering-index","scrollbar-always-on","aria-label","onEndReached"])]),_:3},8,["visible","teleported","popper-class","popper-style","popper-options","fallback-placements","effect","placement","transition","persistent","append-to","show-arrow","offset","onBeforeShow"])],34)),[[d,e.handleClickOutside,e.popperRef]])}var Zj=Rn(Yj,[["render",Jj]]);const Qj=ut(Zj),e7=$e({animated:Boolean,count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:G([Number,Object])}}),t7=$e({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}});var n7=ue({name:"ElSkeletonItem",__name:"skeleton-item",props:t7,setup(e){const t=he("skeleton");return(n,a)=>(O(),H("div",{class:I([i(t).e("item"),i(t).e(e.variant)])},[e.variant==="image"?(O(),oe(i(S_),{key:0})):te("v-if",!0)],2))}}),od=n7,a7=ue({name:"ElSkeleton",__name:"skeleton",props:e7,setup(e,{expose:t}){const n=e,a=he("skeleton"),l=$3(Ot(n,"loading"),n.throttle);return t({uiLoading:l}),(o,s)=>i(l)?(O(),H("div",pt({key:0,class:[i(a).b(),i(a).is("animated",e.animated)]},o.$attrs),[(O(!0),H(ze,null,bt(e.count,r=>(O(),H(ze,{key:r},[i(l)?ne(o.$slots,"template",{key:r},()=>[U(od,{class:I(i(a).is("first")),variant:"p"},null,8,["class"]),(O(!0),H(ze,null,bt(e.rows,u=>(O(),oe(od,{key:u,class:I([i(a).e("paragraph"),i(a).is("last",u===e.rows&&e.rows>1)]),variant:"p"},null,8,["class"]))),128))]):te("v-if",!0)],64))),128))],16)):ne(o.$slots,"default",Cl(pt({key:1},o.$attrs)))}}),l7=a7;const o7=ut(l7,{SkeletonItem:od}),s7=un(od),y2=Symbol("sliderContextKey"),r7=$e({modelValue:{type:G([Number,Array]),default:0},id:{type:String,default:void 0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:G([Number,String]),default:1},showInput:Boolean,showInputControls:{type:Boolean,default:!0},size:Pn,inputSize:Pn,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:G(Function),default:void 0},disabled:{type:Boolean,default:void 0},range:Boolean,vertical:Boolean,height:String,rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:G(Function),default:void 0},tooltipClass:{type:G([String,Array,Object,Boolean]),default:void 0},placement:{type:String,values:Wl,default:"top"},marks:{type:G(Object)},validateEvent:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},...ua(["ariaLabel"])}),lp=e=>He(e)||me(e)&&e.every(He),i7={[rt]:lp,[Tn]:lp,[yt]:lp},u7=(e,t,n)=>{const a=D();return mt(async()=>{e.range?(me(e.modelValue)?(t.firstValue=Math.max(e.min,e.modelValue[0]),t.secondValue=Math.min(e.max,e.modelValue[1])):(t.firstValue=e.min,t.secondValue=e.max),t.oldValue=[t.firstValue,t.secondValue]):(!He(e.modelValue)||Number.isNaN(e.modelValue)?t.firstValue=e.min:t.firstValue=Math.min(e.max,Math.max(e.min,e.modelValue)),t.oldValue=t.firstValue),Ht(window,"resize",n),await Ae(),n()}),{sliderWrapper:a}},c7=e=>{const t=w(()=>e.marks?Object.keys(e.marks).map(Number.parseFloat).sort((n,a)=>n-a).filter(n=>n<=e.max&&n>=e.min).map(n=>({point:n,position:(n-e.min)*100/(e.max-e.min),mark:e.marks[n]})):[]);return ia(()=>{if(e.step==="mark"&&!e.marks&&Kt("ElSlider","marks prop must be provided when step is mark"),e.marks){const n=Object.keys(e.marks),a=t.value.map(o=>o.point),l=n.filter(o=>{const s=Number.parseFloat(o);return Number.isNaN(s)||!a.includes(s)});l.length>0&&Kt("ElSlider",`Some marks keys are invalid (not a number or out of [min, max]): [${l.map(o=>`'${o}'`).join(", ")}] and will be ignored.`)}}),t},d7=(e,t,n)=>{const{formItem:a}=Hn(),l=xt(),o=D(),s=D(),r={firstButton:o,secondButton:s},u=sn(),c=w(()=>Math.min(t.firstValue,t.secondValue)),d=w(()=>Math.max(t.firstValue,t.secondValue)),f=w(()=>e.range?`${100*(d.value-c.value)/(e.max-e.min)}%`:`${100*(t.firstValue-e.min)/(e.max-e.min)}%`),p=w(()=>e.range?`${100*(c.value-e.min)/(e.max-e.min)}%`:"0%"),g=w(()=>e.vertical?{height:e.height}:{}),m=w(()=>e.vertical?{height:f.value,bottom:p.value}:{width:f.value,left:p.value}),v=()=>{l.value&&(t.sliderSize=l.value.getBoundingClientRect()[e.vertical?"height":"width"])},h=P=>{const N=e.min+P*(e.max-e.min)/100;if(!e.range)return o;let A;return Math.abs(c.value-N)t.secondValue?"firstButton":"secondButton",r[A]},b=P=>{const N=h(P);return N.value.setPosition(P),N},y=P=>{t.firstValue=P??e.min,S(e.range?[c.value,d.value]:P??e.min)},C=P=>{t.secondValue=P,e.range&&S([c.value,d.value])},S=P=>{n(rt,P),n(Tn,P)},k=async()=>{await Ae(),n(yt,e.range?[c.value,d.value]:e.modelValue)},x=P=>{var A,q,z,V;if(u.value||t.dragging)return;v();let N=0;if(e.vertical){const B=((q=(A=P.touches)==null?void 0:A.item(0))==null?void 0:q.clientY)??P.clientY;N=(l.value.getBoundingClientRect().bottom-B)/t.sliderSize*100}else N=((((V=(z=P.touches)==null?void 0:z.item(0))==null?void 0:V.clientX)??P.clientX)-l.value.getBoundingClientRect().left)/t.sliderSize*100;if(!(N<0||N>100))return b(N)};return{elFormItem:a,slider:l,firstButton:o,secondButton:s,sliderDisabled:u,minValue:c,maxValue:d,runwayStyle:g,barStyle:m,resetSize:v,setPosition:b,emitChange:k,onSliderWrapperPrevent:P=>{var N,A;((N=r.firstButton.value)!=null&&N.dragging||(A=r.secondButton.value)!=null&&A.dragging)&&P.preventDefault()},onSliderClick:P=>{x(P)&&k()},onSliderDown:async P=>{const N=x(P);N&&(await Ae(),N.value.onButtonDown(P))},onSliderMarkerDown:P=>{u.value||t.dragging||b(P)&&k()},setFirstValue:y,setSecondValue:C}},f7=(e,t,n,a)=>({stops:w(()=>{if(!e.showStops||e.min>e.max)return[];if(e.step==="mark"||e.step===0)return e.step===0&&Kt("ElSlider","step should not be 0."),[];const s=Math.ceil((e.max-e.min)/e.step),r=100*e.step/(e.max-e.min),u=Array.from({length:s-1}).map((c,d)=>(d+1)*r);return e.range?u.filter(c=>c<100*(n.value-e.min)/(e.max-e.min)||c>100*(a.value-e.min)/(e.max-e.min)):u.filter(c=>c>100*(t.firstValue-e.min)/(e.max-e.min))}),getStopStyle:s=>e.vertical?{bottom:`${s}%`}:{left:`${s}%`}}),p7=(e,t,n,a,l,o)=>{const s=c=>{l(rt,c),l(Tn,c)},r=()=>e.range?![n.value,a.value].every((c,d)=>c===t.oldValue[d]):e.modelValue!==t.oldValue,u=()=>{var d,f;e.min>e.max&&rn("Slider","min should not be greater than max.");const c=e.modelValue;e.range&&me(c)?c[1]e.max?s([e.max,e.max]):c[0]e.max?s([c[0],e.max]):(t.firstValue=c[0],t.secondValue=c[1],r()&&(e.validateEvent&&((d=o==null?void 0:o.validate)==null||d.call(o,"change").catch(vt)),t.oldValue=c.slice())):!e.range&&He(c)&&!Number.isNaN(c)&&(ce.max?s(e.max):(t.firstValue=c,r()&&(e.validateEvent&&((f=o==null?void 0:o.validate)==null||f.call(o,"change").catch(vt)),t.oldValue=c)))};u(),fe(()=>t.dragging,c=>{c||u()}),fe(()=>e.modelValue,(c,d)=>{t.dragging||me(c)&&me(d)&&c.every((f,p)=>f===d[p])&&t.firstValue===c[0]&&t.secondValue===c[1]||u()},{deep:!0}),fe(()=>[e.min,e.max],()=>{u()})},v7=(e,t,n)=>{const a=D(),l=D(!1),o=w(()=>t.value instanceof Function);return{tooltip:a,tooltipVisible:l,formatValue:w(()=>o.value&&t.value(e.modelValue)||e.modelValue),displayTooltip:Al(()=>{n.value&&(l.value=!0)},50),hideTooltip:Al(()=>{n.value&&(l.value=!1)},50)}},h7=(e,t,n)=>{const{disabled:a,min:l,max:o,step:s,showTooltip:r,persistent:u,precision:c,sliderSize:d,formatTooltip:f,emitChange:p,resetSize:g,updateDragging:m,markList:v}=Fe(y2),{tooltip:h,tooltipVisible:b,formatValue:y,displayTooltip:C,hideTooltip:S}=v7(e,f,r),k=D(),x=w(()=>`${(e.modelValue-l.value)/(o.value-l.value)*100}%`),T=w(()=>e.vertical?{bottom:x.value}:{left:x.value}),E=w(()=>s.value==="mark"&&v.value.length>0),$=()=>{t.hovering=!0,C()},M=()=>{t.hovering=!1,t.dragging||S()},P=ee=>{a.value||(ee.preventDefault(),j(ee),window.addEventListener("mousemove",X),window.addEventListener("touchmove",X),window.addEventListener("mouseup",Z),window.addEventListener("touchend",Z),window.addEventListener("contextmenu",Z),k.value.focus())},N=ee=>{a.value||(t.newPosition=Number.parseFloat(x.value)+ee/(o.value-l.value)*100,Q(t.newPosition),p())},A=ee=>{if(a.value||!v.value.length)return;const ie=e.modelValue,ve=Number.EPSILON,pe=Math.abs(ee);let re;if(ee>0){const R=v.value.findIndex(Y=>Y.point>ie+ve);if(R!==-1){const Y=Math.min(R+pe-1,v.value.length-1);re=v.value[Y].point}}else{let R=-1;for(let Y=v.value.length-1;Y>=0;Y--)if(v.value[Y].point{E.value?A(-1):He(s.value)&&N(-s.value)},z=()=>{E.value?A(1):He(s.value)&&N(s.value)},V=()=>{E.value?A(-4):He(s.value)&&N(-s.value*4)},B=()=>{E.value?A(4):He(s.value)&&N(s.value*4)},_=()=>{a.value||(Q(0),p())},F=()=>{a.value||(Q(100),p())},L=ee=>{const ie=Gt(ee);let ve=!0;switch(ie){case ye.left:case ye.down:q();break;case ye.right:case ye.up:z();break;case ye.home:_();break;case ye.end:F();break;case ye.pageDown:V();break;case ye.pageUp:B();break;default:ve=!1}ve&&ee.preventDefault()},K=ee=>{let ie,ve;return ee.type.startsWith("touch")?(ve=ee.touches[0].clientY,ie=ee.touches[0].clientX):(ve=ee.clientY,ie=ee.clientX),{clientX:ie,clientY:ve}},j=ee=>{t.dragging=!0,t.isClick=!0;const{clientX:ie,clientY:ve}=K(ee);e.vertical?t.startY=ve:t.startX=ie,t.startPosition=Number.parseFloat(x.value),t.newPosition=t.startPosition},X=ee=>{if(t.dragging){t.isClick=!1,C(),g();let ie;const{clientX:ve,clientY:pe}=K(ee);e.vertical?(t.currentY=pe,ie=(t.startY-t.currentY)/d.value*100):(t.currentX=ve,ie=(t.currentX-t.startX)/d.value*100),t.newPosition=t.startPosition+ie,Q(t.newPosition)}},Z=()=>{t.dragging&&(setTimeout(()=>{t.dragging=!1,t.hovering||S(),t.isClick||Q(t.newPosition),p()},0),window.removeEventListener("mousemove",X),window.removeEventListener("touchmove",X),window.removeEventListener("mouseup",Z),window.removeEventListener("touchend",Z),window.removeEventListener("contextmenu",Z))},Q=async ee=>{if(ee===null||Number.isNaN(+ee))return;ee=ya(ee,0,100);let ie;if(s.value==="mark")v.value.length===0?ie=ee<=50?l.value:o.value:ie=v.value.reduce((ve,pe)=>Math.abs(pe.position-ee)t.dragging,ee=>{m(ee)}),Ht(k,"touchstart",P,{passive:!1}),{disabled:a,button:k,tooltip:h,tooltipVisible:b,showTooltip:r,persistent:u,wrapperStyle:T,formatValue:y,handleMouseEnter:$,handleMouseLeave:M,onButtonDown:P,onKeyDown:L,setPosition:Q}},m7=$e({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:{type:G([String,Array,Object,Boolean]),default:void 0},placement:{type:String,values:Wl,default:"top"}}),g7={[rt]:e=>He(e)},b7=["tabindex"];var y7=ue({name:"ElSliderButton",__name:"button",props:m7,emits:g7,setup(e,{expose:t,emit:n}){const a=e,l=n,o=he("slider"),s=Ft({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:a.modelValue}),r=w(()=>f.value?p.value:!1),{disabled:u,button:c,tooltip:d,showTooltip:f,persistent:p,tooltipVisible:g,wrapperStyle:m,formatValue:v,handleMouseEnter:h,handleMouseLeave:b,onButtonDown:y,onKeyDown:C,setPosition:S}=h7(a,s,l),{hovering:k,dragging:x}=Vn(s);return t({onButtonDown:y,onKeyDown:C,setPosition:S,hovering:k,dragging:x}),(T,E)=>(O(),H("div",{ref_key:"button",ref:c,class:I([i(o).e("button-wrapper"),{hover:i(k),dragging:i(x)}]),style:je(i(m)),tabindex:i(u)?void 0:0,onMouseenter:E[0]||(E[0]=(...$)=>i(h)&&i(h)(...$)),onMouseleave:E[1]||(E[1]=(...$)=>i(b)&&i(b)(...$)),onMousedown:E[2]||(E[2]=(...$)=>i(y)&&i(y)(...$)),onFocus:E[3]||(E[3]=(...$)=>i(h)&&i(h)(...$)),onBlur:E[4]||(E[4]=(...$)=>i(b)&&i(b)(...$)),onKeydown:E[5]||(E[5]=(...$)=>i(C)&&i(C)(...$))},[U(i(zn),{ref_key:"tooltip",ref:d,visible:i(g),placement:T.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":T.tooltipClass,disabled:!i(f),persistent:r.value},{content:J(()=>[W("span",null,Se(i(v)),1)]),default:J(()=>[W("div",{class:I([i(o).e("button"),{hover:i(k),dragging:i(x)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled","persistent"])],46,b7))}}),e0=y7;const w7=$e({mark:{type:G([String,Object]),default:void 0}});var S7=ue({name:"ElSliderMarker",props:w7,setup(e){const t=he("slider"),n=w(()=>De(e.mark)?e.mark:e.mark.label),a=w(()=>De(e.mark)?void 0:e.mark.style);return()=>Ge("div",{class:t.e("marks-text"),style:a.value},n.value)}});const C7=["id","role","aria-label","aria-labelledby"],k7={key:1};var x7=ue({name:"ElSlider",__name:"slider",props:r7,emits:i7,setup(e,{expose:t,emit:n}){const a=e,l=n,o=he("slider"),{t:s}=St(),r=Ft({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:u,slider:c,firstButton:d,secondButton:f,sliderDisabled:p,minValue:g,maxValue:m,runwayStyle:v,barStyle:h,resetSize:b,emitChange:y,onSliderWrapperPrevent:C,onSliderClick:S,onSliderDown:k,onSliderMarkerDown:x,setFirstValue:T,setSecondValue:E}=d7(a,r,l),{stops:$,getStopStyle:M}=f7(a,r,g,m),{inputId:P,isLabeledByFormItem:N}=xa(a,{formItemContext:u}),A=$n(),q=w(()=>a.inputSize||A.value),z=w(()=>a.showInput&&!a.range&&a.step!=="mark"),V=w(()=>a.ariaLabel||s("el.slider.defaultLabel",{min:a.min,max:a.max})),B=w(()=>a.range?a.rangeStartLabel||s("el.slider.defaultRangeStartLabel"):V.value),_=w(()=>a.formatValueText?a.formatValueText(ee.value):`${ee.value}`),F=w(()=>a.rangeEndLabel||s("el.slider.defaultRangeEndLabel")),L=w(()=>a.formatValueText?a.formatValueText(ie.value):`${ie.value}`),K=w(()=>[o.b(),o.m(A.value),o.is("vertical",a.vertical),{[o.m("with-input")]:z.value}]),j=c7(a);p7(a,r,g,m,l,u);const X=w(()=>He(a.step)?a.step:1),Z=w(()=>{const re=He(a.step)?a.step:1,R=[a.min,a.max,re].map(Y=>{const ae=`${Y}`.split(".")[1];return ae?ae.length:0});return Math.max.apply(null,R)}),{sliderWrapper:Q}=u7(a,r,b),{firstValue:ee,secondValue:ie,sliderSize:ve}=Vn(r),pe=re=>{r.dragging=re};return Ht(Q,"touchstart",C,{passive:!1}),Ht(Q,"touchmove",C,{passive:!1}),Tt(y2,{...Vn(a),sliderSize:ve,disabled:p,precision:Z,markList:j,emitChange:y,resetSize:b,updateDragging:pe}),t({onSliderClick:S}),(re,R)=>{var Y,ae;return O(),H("div",{id:re.range?i(P):void 0,ref_key:"sliderWrapper",ref:Q,class:I(K.value),role:re.range?"group":void 0,"aria-label":re.range&&!i(N)?V.value:void 0,"aria-labelledby":re.range&&i(N)?(Y=i(u))==null?void 0:Y.labelId:void 0},[W("div",{ref_key:"slider",ref:c,class:I([i(o).e("runway"),{"show-input":z.value},i(o).is("disabled",i(p))]),style:je(i(v)),onMousedown:R[0]||(R[0]=(...le)=>i(k)&&i(k)(...le)),onTouchstartPassive:R[1]||(R[1]=(...le)=>i(k)&&i(k)(...le))},[W("div",{class:I(i(o).e("bar")),style:je(i(h))},null,6),U(e0,{id:re.range?void 0:i(P),ref_key:"firstButton",ref:d,"model-value":i(ee),vertical:re.vertical,"tooltip-class":re.tooltipClass,placement:re.placement,role:"slider","aria-label":re.range||!i(N)?B.value:void 0,"aria-labelledby":!re.range&&i(N)?(ae=i(u))==null?void 0:ae.labelId:void 0,"aria-valuemin":re.min,"aria-valuemax":re.range?i(ie):re.max,"aria-valuenow":i(ee),"aria-valuetext":_.value,"aria-orientation":re.vertical?"vertical":"horizontal","aria-disabled":i(p),"onUpdate:modelValue":i(T)},null,8,["id","model-value","vertical","tooltip-class","placement","aria-label","aria-labelledby","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"]),re.range?(O(),oe(e0,{key:0,ref_key:"secondButton",ref:f,"model-value":i(ie),vertical:re.vertical,"tooltip-class":re.tooltipClass,placement:re.placement,role:"slider","aria-label":F.value,"aria-valuemin":i(ee),"aria-valuemax":re.max,"aria-valuenow":i(ie),"aria-valuetext":L.value,"aria-orientation":re.vertical?"vertical":"horizontal","aria-disabled":i(p),"onUpdate:modelValue":i(E)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):te("v-if",!0),re.showStops?(O(),H("div",k7,[(O(!0),H(ze,null,bt(i($),(le,se)=>(O(),H("div",{key:se,class:I(i(o).e("stop")),style:je(i(M)(le))},null,6))),128))])):te("v-if",!0),i(j).length>0?(O(),H(ze,{key:2},[W("div",null,[(O(!0),H(ze,null,bt(i(j),(le,se)=>(O(),H("div",{key:se,style:je(i(M)(le.position)),class:I([i(o).e("stop"),i(o).e("marks-stop")])},null,6))),128))]),W("div",{class:I(i(o).e("marks"))},[(O(!0),H(ze,null,bt(i(j),(le,se)=>(O(),oe(i(S7),{key:se,mark:le.mark,style:je(i(M)(le.position)),onMousedown:Je(de=>i(x)(le.position),["stop"])},null,8,["mark","style","onMousedown"]))),128))],2)],64)):te("v-if",!0)],38),z.value?(O(),oe(i(p2),{key:0,ref:"input","model-value":i(ee),class:I(i(o).e("input")),step:X.value,disabled:i(p),controls:re.showInputControls,min:re.min,max:re.max,precision:Z.value,size:q.value,"onUpdate:modelValue":i(T),onChange:i(y)},null,8,["model-value","class","step","disabled","controls","min","max","precision","size","onUpdate:modelValue","onChange"])):te("v-if",!0)],10,C7)}}}),E7=x7;const T7=ut(E7),$7=$e({prefixCls:{type:String}}),t0=ue({name:"ElSpaceItem",props:$7,setup(e,{slots:t}){const n=he("space"),a=w(()=>`${e.prefixCls||n.b()}__item`);return()=>Ge("div",{class:a.value},ne(t,"default"))}}),n0={small:8,default:12,large:16};function O7(e){const t=he("space"),n=w(()=>[t.b(),t.m(e.direction),e.class]),a=D(0),l=D(0),o=w(()=>[e.wrap||e.fill?{flexWrap:"wrap"}:{},{alignItems:e.alignment},{rowGap:`${l.value}px`,columnGap:`${a.value}px`},e.style]),s=w(()=>e.fill?{flexGrow:1,minWidth:`${e.fillRatio}%`}:{});return ia(()=>{const{size:r="small",wrap:u,direction:c,fill:d}=e;if(me(r)){const[f=0,p=0]=r;a.value=f,l.value=p}else{let f;He(r)?f=r:f=n0[r||"small"]||n0.small,(u||d)&&c==="horizontal"?a.value=l.value=f:c==="horizontal"?(a.value=f,l.value=0):(l.value=f,a.value=0)}}),{classes:n,containerStyle:o,itemStyle:s}}const N7=$e({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},class:{type:G([String,Object,Array,Boolean]),default:""},style:{type:G([String,Array,Object,Boolean]),default:""},alignment:{type:G(String),default:"center"},prefixCls:{type:String},spacer:{type:G([Object,String,Number,Array]),default:null,validator:e=>Jt(e)||He(e)||De(e)},wrap:Boolean,fill:Boolean,fillRatio:{type:Number,default:100},size:{type:[String,Array,Number],values:ul,validator:e=>He(e)||me(e)&&e.length===2&&e.every(He)}}),M7=ue({name:"ElSpace",props:N7,setup(e,{slots:t}){const{classes:n,containerStyle:a,itemStyle:l}=O7(e);function o(s,r="",u=[]){const{prefixCls:c}=e;return s.forEach((d,f)=>{Dp(d)?me(d.children)&&d.children.forEach((p,g)=>{Dp(p)&&me(p.children)?o(p.children,`${r+g}-`,u):Jt(p)&&(p==null?void 0:p.type)===Cn?u.push(p):u.push(U(t0,{style:l.value,prefixCls:c,key:`nested-${r+g}`},{default:()=>[p]},12,["style","prefixCls"]))}):O4(d)&&u.push(U(t0,{style:l.value,prefixCls:c,key:`LoopKey${r+f}`},{default:()=>[d]},12,["style","prefixCls"]))}),u}return()=>{const{spacer:s,direction:r}=e,u=ne(t,"default",{key:0},()=>[]);if((u.children??[]).length===0)return null;if(me(u.children)){let c=o(u.children);if(s){const d=c.length-1;c=c.reduce((f,p,g)=>{const m=[...f,p];return g!==d&&m.push(U("span",{style:[l.value,r==="vertical"?"width: 100%":null],key:g},[Jt(s)?sl(s):it(s,1)],4)),m},[])}return U("div",{class:n.value,style:a.value},c,6)}return u.children}}}),I7=ut(M7),P7=$e({space:{type:[Number,String],default:""},active:{type:Number,default:0},direction:{type:String,default:"horizontal",values:["horizontal","vertical"]},alignCenter:{type:Boolean},simple:{type:Boolean},finishStatus:{type:String,values:["wait","process","finish","error","success"],default:"finish"},processStatus:{type:String,values:["wait","process","finish","error","success"],default:"process"}}),R7={[yt]:(e,t)=>[e,t].every(He)},w2="ElSteps",_7=$e({title:{type:String,default:""},icon:{type:Ut},description:{type:String,default:""},status:{type:String,values:["","wait","process","finish","error","success"],default:""}});var A7=ue({name:"ElSteps",__name:"steps",props:P7,emits:R7,setup(e,{emit:t}){const n=e,a=t,l=he("steps"),{children:o,addChild:s,removeChild:r,ChildrenSorter:u}=Jd(ht(),"ElStep");return fe(o,()=>{o.value.forEach((c,d)=>{c.setIndex(d)})}),Tt(w2,{props:n,steps:o,addStep:s,removeStep:r}),fe(()=>n.active,(c,d)=>{a(yt,c,d)}),(c,d)=>(O(),H("div",{class:I([i(l).b(),i(l).m(e.simple?"simple":e.direction)])},[ne(c.$slots,"default"),U(i(u))],2))}}),L7=A7,D7=ue({name:"ElStep",__name:"item",props:_7,setup(e){const t=e,n=he("step"),a=D(-1),l=D({}),o=D(""),s=Fe(w2),r=ht();let u=0,c=0;mt(()=>{fe([()=>s.props.active,()=>s.props.processStatus,()=>s.props.finishStatus],([E],[$])=>{c=$||0,u=E-c,x(E)},{immediate:!0})});const d=w(()=>t.status||o.value),f=w(()=>{const E=s.steps.value[a.value-1];return E?E.internalStatus.value:"wait"}),p=w(()=>s.props.alignCenter),g=w(()=>s.props.direction==="vertical"),m=w(()=>s.props.simple),v=w(()=>s.steps.value.length),h=w(()=>{var E;return((E=s.steps.value[v.value-1])==null?void 0:E.uid)===r.uid}),b=w(()=>m.value?"":s.props.space),y=w(()=>[n.b(),n.is(m.value?"simple":s.props.direction),n.is("flex",h.value&&!b.value&&!p.value),n.is("center",p.value&&!g.value&&!m.value)]),C=w(()=>{const E={flexBasis:He(b.value)?`${b.value}px`:b.value?b.value:`${100/(v.value-(p.value?0:1))}%`};return g.value||h.value&&(E.maxWidth=`${100/v.value}%`),E}),S=E=>{a.value=E},k=E=>{const $=E==="wait",M={transitionDelay:`${Math.abs(u)===1?0:u>0?(a.value+1-c)*150:-(a.value+1-s.props.active)*150}ms`},P=E===s.props.processStatus||$?0:100;M.borderWidth=P&&!m.value?"1px":0,M[s.props.direction==="vertical"?"height":"width"]=`${P}%`,l.value=M},x=E=>{E>a.value?o.value=s.props.finishStatus:E===a.value&&f.value!=="error"?o.value=s.props.processStatus:o.value="wait";const $=s.steps.value[a.value-1];$&&$.calcProgress(o.value)},T={uid:r.uid,getVnode:()=>r.vnode,currentStatus:d,internalStatus:o,setIndex:S,calcProgress:k};return s.addStep(T),zt(()=>{s.removeStep(T)}),(E,$)=>(O(),H("div",{style:je(C.value),class:I(y.value)},[te(" icon & line "),W("div",{class:I([i(n).e("head"),i(n).is(d.value)])},[m.value?te("v-if",!0):(O(),H("div",{key:0,class:I(i(n).e("line"))},[W("i",{class:I(i(n).e("line-inner")),style:je(l.value)},null,6)],2)),W("div",{class:I([i(n).e("icon"),i(n).is(e.icon||E.$slots.icon?"icon":"text")])},[ne(E.$slots,"icon",{},()=>[e.icon?(O(),oe(i(Ve),{key:0,class:I(i(n).e("icon-inner"))},{default:J(()=>[(O(),oe(dt(e.icon)))]),_:1},8,["class"])):d.value==="success"?(O(),oe(i(Ve),{key:1,class:I([i(n).e("icon-inner"),i(n).is("status")])},{default:J(()=>[U(i(gr))]),_:1},8,["class"])):d.value==="error"?(O(),oe(i(Ve),{key:2,class:I([i(n).e("icon-inner"),i(n).is("status")])},{default:J(()=>[U(i(Ya))]),_:1},8,["class"])):m.value?te("v-if",!0):(O(),H("div",{key:3,class:I(i(n).e("icon-inner"))},Se(a.value+1),3))])],2)],2),te(" title & description "),W("div",{class:I(i(n).e("main"))},[W("div",{class:I([i(n).e("title"),i(n).is(d.value)])},[ne(E.$slots,"title",{},()=>[it(Se(e.title),1)])],2),m.value?(O(),H("div",{key:0,class:I(i(n).e("arrow"))},null,2)):(O(),H("div",{key:1,class:I([i(n).e("description"),i(n).is(d.value)])},[ne(E.$slots,"description",{},()=>[it(Se(e.description),1)])],2))],2)],6))}}),S2=D7;const B7=ut(L7,{Step:S2}),V7=un(S2),C2=e=>["",...ul].includes(e),F7=$e({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:void 0},loading:Boolean,size:{type:String,validator:C2},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:Ut},activeActionIcon:{type:Ut},activeIcon:{type:Ut},inactiveIcon:{type:Ut},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:G(Function)},id:String,tabindex:{type:[String,Number]},...ua(["ariaLabel"])}),z7={[rt]:e=>Wt(e)||De(e)||He(e),[yt]:e=>Wt(e)||De(e)||He(e),[Tn]:e=>Wt(e)||De(e)||He(e)},H7=["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex"],K7=["aria-hidden"],W7={key:1},j7={key:1},q7=["aria-hidden"],Wu="ElSwitch";var Y7=ue({name:Wu,__name:"switch",props:F7,emits:z7,setup(e,{expose:t,emit:n}){const a=e,l=n,{formItem:o}=Hn(),s=$n(),r=he("switch"),{inputId:u}=xa(a,{formItemContext:o}),c=sn(w(()=>{if(a.loading)return!0})),d=D(a.modelValue!==!1),f=xt(),p=w(()=>[r.b(),r.m(s.value),r.is("disabled",c.value),r.is("checked",b.value)]),g=w(()=>[r.e("label"),r.em("label","left"),r.is("active",!b.value)]),m=w(()=>[r.e("label"),r.em("label","right"),r.is("active",b.value)]),v=w(()=>({width:fn(a.width)}));fe(()=>a.modelValue,()=>{d.value=!0});const h=w(()=>d.value?a.modelValue:!1),b=w(()=>h.value===a.activeValue);[a.activeValue,a.inactiveValue].includes(h.value)||(Kt(Wu,"model-value must be active-value or inactive-value"),l(rt,a.inactiveValue),l(yt,a.inactiveValue),l(Tn,a.inactiveValue)),fe(b,k=>{var x;f.value.checked=k,a.validateEvent&&((x=o==null?void 0:o.validate)==null||x.call(o,"change").catch(vt))});const y=()=>{const k=b.value?a.inactiveValue:a.activeValue;l(rt,k),l(yt,k),l(Tn,k),Ae(()=>{f.value.checked=b.value})},C=()=>{if(c.value)return;const{beforeChange:k}=a;if(!k){y();return}const x=k();[Lo(x),Wt(x)].includes(!0)||rn(Wu,"beforeChange must return type `Promise` or `boolean`"),Lo(x)?x.then(T=>{T&&y()}).catch(T=>{Kt(Wu,`some error occurred: ${T}`)}):x&&y()},S=()=>{var k,x;(x=(k=f.value)==null?void 0:k.focus)==null||x.call(k)};return mt(()=>{f.value.checked=b.value}),t({focus:S,checked:b}),(k,x)=>(O(),H("div",{class:I(p.value),onClick:Je(C,["prevent"])},[W("input",{id:i(u),ref_key:"input",ref:f,class:I(i(r).e("input")),type:"checkbox",role:"switch","aria-checked":b.value,"aria-disabled":i(c),"aria-label":e.ariaLabel,name:e.name,"true-value":e.activeValue,"false-value":e.inactiveValue,disabled:i(c),tabindex:e.tabindex,onChange:y,onKeydown:an(C,["enter"])},null,42,H7),!e.inlinePrompt&&(e.inactiveIcon||e.inactiveText||k.$slots.inactive)?(O(),H("span",{key:0,class:I(g.value)},[ne(k.$slots,"inactive",{},()=>[e.inactiveIcon?(O(),oe(i(Ve),{key:0},{default:J(()=>[(O(),oe(dt(e.inactiveIcon)))]),_:1})):te("v-if",!0),!e.inactiveIcon&&e.inactiveText?(O(),H("span",{key:1,"aria-hidden":b.value},Se(e.inactiveText),9,K7)):te("v-if",!0)])],2)):te("v-if",!0),W("span",{class:I(i(r).e("core")),style:je(v.value)},[e.inlinePrompt?(O(),H("div",{key:0,class:I(i(r).e("inner"))},[b.value?(O(),H("div",{key:1,class:I(i(r).e("inner-wrapper"))},[ne(k.$slots,"active",{},()=>[e.activeIcon?(O(),oe(i(Ve),{key:0},{default:J(()=>[(O(),oe(dt(e.activeIcon)))]),_:1})):te("v-if",!0),!e.activeIcon&&e.activeText?(O(),H("span",j7,Se(e.activeText),1)):te("v-if",!0)])],2)):(O(),H("div",{key:0,class:I(i(r).e("inner-wrapper"))},[ne(k.$slots,"inactive",{},()=>[e.inactiveIcon?(O(),oe(i(Ve),{key:0},{default:J(()=>[(O(),oe(dt(e.inactiveIcon)))]),_:1})):te("v-if",!0),!e.inactiveIcon&&e.inactiveText?(O(),H("span",W7,Se(e.inactiveText),1)):te("v-if",!0)])],2))],2)):te("v-if",!0),W("div",{class:I(i(r).e("action"))},[e.loading?(O(),oe(i(Ve),{key:0,class:I(i(r).is("loading"))},{default:J(()=>[U(i(rl))]),_:1},8,["class"])):b.value?ne(k.$slots,"active-action",{key:1},()=>[e.activeActionIcon?(O(),oe(i(Ve),{key:0},{default:J(()=>[(O(),oe(dt(e.activeActionIcon)))]),_:1})):te("v-if",!0)]):b.value?te("v-if",!0):ne(k.$slots,"inactive-action",{key:2},()=>[e.inactiveActionIcon?(O(),oe(i(Ve),{key:0},{default:J(()=>[(O(),oe(dt(e.inactiveActionIcon)))]),_:1})):te("v-if",!0)])],2)],6),!e.inlinePrompt&&(e.activeIcon||e.activeText||k.$slots.active)?(O(),H("span",{key:1,class:I(m.value)},[ne(k.$slots,"active",{},()=>[e.activeIcon?(O(),oe(i(Ve),{key:0},{default:J(()=>[(O(),oe(dt(e.activeIcon)))]),_:1})):te("v-if",!0),!e.activeIcon&&e.activeText?(O(),H("span",{key:1,"aria-hidden":!b.value},Se(e.activeText),9,q7)):te("v-if",!0)])],2)):te("v-if",!0)],2))}}),U7=Y7;const G7=ut(U7),X7={data:{type:Array,default:()=>[]},size:Pn,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,rowExpandable:{type:Function},defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children",checkStrictly:!1})},lazy:Boolean,load:Function,style:{type:[String,Object,Array,Boolean],default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:{type:[Boolean,Object],default:void 0},tooltipFormatter:Function,appendFilterPanelTo:String,scrollbarTabindex:{type:[Number,String],default:void 0},allowDragLastColumn:{type:Boolean,default:!0},preserveExpandedContent:Boolean,nativeScrollbar:Boolean};let J7=1,Z7=1;const Q7=e=>`${e}-table_${J7++}`,eq=e=>`${e}_column_${Z7++}`,op=function(e){var t;return(t=e.target)==null?void 0:t.closest("td")},tq=function(e,t,n,a,l){if(!t&&!a&&(!l||me(l)&&!l.length))return e;De(n)?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const o=a?null:function(r,u){return l?jw(Ln(l),c=>De(c)?Sn(r,c):c(r,u,e)):(t!=="$key"&&st(r)&&"$value"in r&&(r=r.$value),[st(r)?t?Sn(r,t):null:r])},s=function(r,u){var c,d,f,p,g;if(a)return a(r.value,u.value);for(let m=0,v=((c=r.key)==null?void 0:c.length)??0;m((g=u.key)==null?void 0:g[m]))return 1}return 0};return e.map((r,u)=>({value:r,index:u,key:o?o(r,u):null})).sort((r,u)=>{let c=s(r,u);return c||(c=r.index-u.index),c*+n}).map(r=>r.value)},k2=function(e,t){let n=null;return e.columns.forEach(a=>{a.id===t&&(n=a)}),n},nq=function(e,t){let n=null;for(let a=0;a{if(!e)throw new Error("Row is required when get row identity");if(De(t)){if(!t.includes("."))return`${e[t]}`;const n=t.split(".");let a=e;for(const l of n)a=a[l];return`${a}`}else if(We(t))return t.call(null,e);return""},tr=function(e,t,n=!1,a="children"){const l=e||[],o={};return l.forEach((s,r)=>{if(o[xn(s,t)]={row:s,index:r},n){const u=s[a];me(u)&&Object.assign(o,tr(u,t,!0,a))}}),o};function aq(e,t){const n={};let a;for(a in e)n[a]=e[a];for(a in t)if(Dt(t,a)){const l=t[a];Et(l)||(n[a]=l)}return n}function vm(e){return e===""||Et(e)||(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function x2(e){return e===""||Et(e)||(e=vm(e),Number.isNaN(e)&&(e=80)),e}function lq(e){return He(e)?e:De(e)?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function oq(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...a)=>t(n(...a)))}function Gs(e,t,n,a,l,o,s){let r=o??0,u=!1;const d=(()=>{if(!s)return e.indexOf(t);const v=xn(t,s);return e.findIndex(h=>xn(h,s)===v)})(),f=d!==-1,p=l==null?void 0:l.call(null,t,r),g=v=>{v==="add"?e.push(t):e.splice(d,1),u=!0},m=v=>{let h=0;const b=(a==null?void 0:a.children)&&v[a.children];return b&&me(b)&&(h+=b.length,b.forEach(y=>{h+=m(y)})),h};return(!l||p)&&(Wt(n)?n&&!f?g("add"):!n&&f&&g("remove"):g(f?"remove":"add")),!(a!=null&&a.checkStrictly)&&(a!=null&&a.children)&&me(t[a.children])&&t[a.children].forEach(v=>{const h=Gs(e,v,n??!f,a,l,r+1,s);r+=m(v)+1,h&&(u=h)}),u}function sq(e,t,n="children",a="hasChildren",l=!1){const o=r=>!(me(r)&&r.length);function s(r,u,c){t(r,u,c),u.forEach(d=>{if(d[a]&&l){t(d,null,c+1);return}const f=d[n];o(f)||s(d,f,c+1)})}e.forEach(r=>{if(r[a]&&l){t(r,null,0);return}const u=r[n];o(u)||s(r,u,0)})}const rq=(e,t,n,a)=>{const l=We(a==null?void 0:a.tooltipFormatter)?a.tooltipFormatter({row:n,column:a,cellValue:Ro(n,a.property).value}):void 0;return Jt(l)?{slotContent:l,content:null,strategy:"fixed",...e}:{slotContent:null,content:l??t,strategy:"fixed",...e}};let pn=null;function iq(e,t,n,a,l,o){var g;const s=rq(e,t,n,a),r={...s,slotContent:void 0};if((pn==null?void 0:pn.trigger)===l){const m=(g=pn.vm)==null?void 0:g.component;Yw(m==null?void 0:m.props,r),m&&s.slotContent&&(m.slots.content=()=>[s.slotContent]);return}pn==null||pn();const u=o==null?void 0:o.refs.tableWrapper,c=u==null?void 0:u.dataset.prefix,d=U(zn,{virtualTriggering:!0,virtualRef:l,appendTo:u,placement:"top",transition:"none",offset:0,hideAfter:0,...r},s.slotContent?{content:()=>s.slotContent}:void 0);d.appContext={...o.appContext,...o};const f=document.createElement("div");Vo(d,f),d.component.exposed.onOpen();const p=u==null?void 0:u.querySelector(`.${c}-scrollbar__wrap`);pn=()=>{var v,h;(h=(v=d.component)==null?void 0:v.exposed)!=null&&h.onClose&&d.component.exposed.onClose(),Vo(null,f);const m=pn;p==null||p.removeEventListener("scroll",m),m.trigger=void 0,m.vm=void 0,pn=null},pn.trigger=l??void 0,pn.vm=d,p==null||p.addEventListener("scroll",pn)}function E2(e){return e.children?jw(e.children,E2):[e]}function l0(e,t){return e+t.colSpan}const T2=(e,t,n,a)=>{let l=0,o=e;const s=n.states.columns.value;if(a){const u=E2(a[e]);l=s.slice(0,s.indexOf(u[0])).reduce(l0,0),o=l+u.reduce(l0,0)-1}else l=e;let r;switch(t){case"left":o=s.length-n.states.rightFixedLeafColumnsLength.value&&(r="right");break;default:o=s.length-n.states.rightFixedLeafColumnsLength.value&&(r="right")}return r?{direction:r,start:l,after:o}:{}},hm=(e,t,n,a,l,o=0)=>{const s=[],{direction:r,start:u,after:c}=T2(t,n,a,l);if(r){const d=r==="left";s.push(`${e}-fixed-column--${r}`),d&&c+o===a.states.fixedLeafColumnsLength.value-1?s.push("is-last-column"):!d&&u-o===a.states.columns.value.length-a.states.rightFixedLeafColumnsLength.value&&s.push("is-first-column")}return s};function o0(e,t){return e+(Ad(t.realWidth)||Number.isNaN(t.realWidth)?Number(t.width):t.realWidth)}const mm=(e,t,n,a)=>{const{direction:l,start:o=0,after:s=0}=T2(e,t,n,a);if(!l)return;const r={},u=l==="left",c=n.states.columns.value;return u?r.left=c.slice(0,o).reduce(o0,0):r.right=c.slice(s+1).reverse().reduce(o0,0),r},wr=(e,t)=>{e&&(Number.isNaN(e[t])||(e[t]=`${e[t]}px`))};function $2(e){return e.some(t=>Jt(t)?!(t.type===Cn||t.type===ze&&!$2(t.children)):!0)?e:null}function uq(e){const t=ht(),n=D(!1),a=D([]),l=(c,d)=>{const f=t.store.states.rowExpandable.value;return(f==null?void 0:f(c,d))??!0};return{updateExpandRows:()=>{const c=e.data.value||[],d=e.rowKey.value;if(n.value)a.value=t.store.states.rowExpandable.value?c.filter(l):c.slice();else if(d){const f=tr(a.value,d);a.value=c.filter((p,g)=>{const m=xn(p,d);return!!f[m]&&l(p,g)})}else a.value=[]},toggleRowExpansion:(c,d)=>{const f=(e.data.value||[]).indexOf(c);f>-1&&!l(c,f)||Gs(a.value,c,d,void 0,void 0,void 0,e.rowKey.value)&&t.emit("expand-change",c,a.value.slice())},setExpandRowKeys:c=>{t.store.assertRowKey();const d=e.data.value||[],f=e.rowKey.value,p=tr(d,f);a.value=c.reduce((g,m)=>{const v=p[m];return v&&l(v.row,v.index)&&g.push(v.row),g},[])},isRowExpanded:c=>{const d=e.rowKey.value;return d?!!tr(a.value,d)[xn(c,d)]:a.value.includes(c)},states:{expandRows:a,defaultExpandAll:n}}}function cq(e){const t=ht(),n=D(null),a=D(null),l=c=>{t.store.assertRowKey(),n.value=c,s(c)},o=()=>{n.value=null},s=c=>{const{data:d,rowKey:f}=e,p=a.value;let g=null;f.value&&(g=(i(d)||[]).find(m=>xn(m,f.value)===c)??null),a.value=g??null,t.emit("current-change",a.value,p)};return{setCurrentRowKey:l,restoreCurrentRowKey:o,setCurrentRowByKey:s,updateCurrentRow:c=>{const d=a.value;if(c&&c!==d){a.value=c,t.emit("current-change",a.value,d);return}!c&&d&&(a.value=null,t.emit("current-change",null,d))},updateCurrentRowData:()=>{const c=e.rowKey.value,d=e.data.value||[],f=a.value;if(f&&!d.includes(f))if(c){const p=xn(f,c);s(p)}else a.value=null,t.emit("current-change",null,f);else n.value&&(s(n.value),o())},states:{_currentRowKey:n,currentRow:a}}}function dq(e){const t=D([]),n=D({}),a=D(16),l=D(!1),o=D({}),s=D("hasChildren"),r=D("children"),u=D(!1),c=ht(),d=w(()=>{if(!e.rowKey.value)return{};const S=e.data.value||[];return p(S)}),f=w(()=>{const S=e.rowKey.value,k=Object.keys(o.value),x={};return k.length&&k.forEach(T=>{if(o.value[T].length){const E={children:[]};o.value[T].forEach($=>{const M=xn($,S);E.children.push(M),$[s.value]&&!x[M]&&(x[M]={children:[]})}),x[T]=E}}),x}),p=S=>{const k=e.rowKey.value,x={};return sq(S,(T,E,$)=>{const M=xn(T,k);me(E)?x[M]={children:E.map(P=>xn(P,k)),level:$}:l.value&&(x[M]={children:[],lazy:!0,level:$})},r.value,s.value,l.value),x},g=(S=!1,k)=>{var M,P;k||(k=(M=c.store)==null?void 0:M.states.defaultExpandAll.value);const x=d.value,T=f.value,E=Object.keys(x),$={};if(E.length){const N=i(n),A=[],q=(V,B)=>{if(S)return t.value?k||t.value.includes(B):!!(k||V!=null&&V.expanded);{const _=k||t.value&&t.value.includes(B);return!!(V!=null&&V.expanded||_)}};E.forEach(V=>{const B=N[V],_={...x[V]};if(_.expanded=q(B,V),_.lazy){const{loaded:F=!1,loading:L=!1}=B||{};_.loaded=!!F,_.loading=!!L,A.push(V)}$[V]=_});const z=Object.keys(T);l.value&&z.length&&A.length&&z.forEach(V=>{var F;const B=N[V],_=T[V].children;if(A.includes(V)){if(((F=$[V].children)==null?void 0:F.length)!==0)throw new Error("[ElTable]children must be an empty array.");$[V].children=_}else{const{loaded:L=!1,loading:K=!1}=B||{};$[V]={lazy:!0,loaded:!!L,loading:!!K,expanded:q(B,V),children:_,level:void 0}}})}n.value=$,(P=c.store)==null||P.updateTableScrollY()};fe(()=>t.value,()=>{g(!0)},{deep:!0}),fe(()=>d.value,()=>{g()}),fe(()=>f.value,()=>{g()});const m=S=>{t.value=S,g()},v=S=>l.value&&S&&"loaded"in S&&!S.loaded,h=(S,k)=>{c.store.assertRowKey();const x=e.rowKey.value,T=xn(S,x),E=T&&n.value[T];if(T&&E&&"expanded"in E){const $=E.expanded;k=Et(k)?!E.expanded:k,n.value[T].expanded=k,$!==k&&c.emit("expand-change",S,k),k&&v(E)&&y(S,T,E),c.store.updateTableScrollY()}},b=S=>{c.store.assertRowKey();const k=e.rowKey.value,x=xn(S,k),T=n.value[x];v(T)?y(S,x,T):h(S,void 0)},y=(S,k,x)=>{const{load:T}=c.props;T&&!n.value[k].loaded&&(n.value[k].loading=!0,T(S,x,E=>{if(!me(E))throw new TypeError("[ElTable] data must be an array");n.value[k].loading=!1,n.value[k].loaded=!0,n.value[k].expanded=!0,E.length&&(o.value={...o.value,[k]:E}),c.emit("expand-change",S,!0)}))};return{loadData:y,loadOrToggle:b,toggleTreeExpansion:h,updateTreeExpandKeys:m,updateTreeData:g,updateKeyChildren:(S,k)=>{const{lazy:x,rowKey:T}=c.props;if(x){if(!T)throw new Error("[Table] rowKey is required in updateKeyChild");o.value[S]&&(o.value={...o.value,[S]:k})}},normalize:p,states:{expandRowKeys:t,treeData:n,indent:a,lazy:l,lazyTreeNodeMap:o,lazyColumnIdentifier:s,childrenColumnName:r,checkStrictly:u}}}const fq=(e,t)=>{const n=t.sortingColumn;return!n||De(n.sortable)?e:tq(e,t.sortProp,t.sortOrder,n.sortMethod,n.sortBy)},vc=e=>{const t=[];return e.forEach(n=>{n.children&&n.children.length>0?t.push.apply(t,vc(n.children)):t.push(n)}),t};function pq(){var Vt;const e=ht(),{size:t}=Vn((Vt=e.proxy)==null?void 0:Vt.$props),n=D(null),a=D([]),l=D([]),o=D(!1),s=D([]),r=D([]),u=D([]),c=D([]),d=D([]),f=D([]),p=D([]),g=D([]),m=[],v=D(0),h=D(0),b=D(0),y=D(!1),C=D([]),S=D({}),k=D(!1),x=D(!1),T=D(null),E=D(null),$=D({}),M=D(null),P=D(null),N=D(null),A=D(null),q=D(null);let z=[];const V=w(()=>n.value?tr(C.value,n.value):void 0),B=ce=>{var wt;const{childrenColumnName:Pe,lazyTreeNodeMap:Ue}=e.store.states,at=ce[Pe.value]??[];if(!n.value)return at;const gt=xn(ce,n.value);return[...((wt=Ue.value)==null?void 0:wt[gt])??[],...at]};fe(a,()=>{var ce;e.state&&(K(!1),e.props.tableLayout==="auto"&&((ce=e.refs.tableHeaderRef)==null||ce.updateFixedColumnStyle()))},{deep:!0});const _=()=>{if(!n.value)throw new Error("[ElTable] prop row-key is required")},F=ce=>{var Pe;(Pe=ce.children)==null||Pe.forEach(Ue=>{Ue.fixed=ce.fixed,F(Ue)})},L=()=>{s.value.forEach(et=>{F(et)}),c.value=s.value.filter(et=>[!0,"left"].includes(et.fixed));const ce=s.value.find(et=>et.type==="selection");let Pe;ce&&ce.fixed!=="right"&&!c.value.includes(ce)&&s.value.indexOf(ce)===0&&c.value.length&&(c.value.unshift(ce),Pe=!0),d.value=s.value.filter(et=>et.fixed==="right");const Ue=s.value.filter(et=>(Pe?et.type!=="selection":!0)&&!et.fixed);r.value=Array.from(c.value).concat(Ue).concat(d.value);const at=vc(Ue),gt=vc(c.value),wt=vc(d.value);v.value=at.length,h.value=gt.length,b.value=wt.length,u.value=Array.from(gt).concat(at).concat(wt),o.value=c.value.length>0||d.value.length>0},K=(ce,Pe=!1)=>{ce&&L(),Pe?e.state.doLayout():e.state.debouncedUpdateLayout()},j=ce=>V.value?!!V.value[xn(ce,n.value)]:C.value.includes(ce),X=w(()=>{const ce=new Map;if(!n.value||!T.value)return ce;let Pe=0;const Ue=at=>{me(at)&&at.forEach(gt=>{const wt=xn(gt,n.value);ce.set(wt,Pe),Pe+=1;const et=B(gt);et.length&&Ue(et)})};return Ue(a.value||[]),ce}),Z=(ce={})=>{const{emitChange:Pe=!0}=ce;if(Rt.checkStrictly.value||!n.value){S.value={},z=[];return}const Ue=n.value,at=ce.rowIndexMap??X.value,gt=T.value,wt=new WeakMap,et=_e=>{const Nt=wt.get(_e);if(Nt)return Nt;const qt=xn(_e,Ue);return wt.set(_e,qt),qt},Bt={},Re=[],Ye=new Set(C.value.map(_e=>et(_e))),Qe=[];let Xt=!1;const Me=(_e,Nt,qt)=>{const nn=Ye.has(Nt);qt&&!nn?(Qe.push(_e),Ye.add(Nt),Xt=!0):!qt&&nn&&(Ye.delete(Nt),Xt=!0)},Be=_e=>{let Nt=0,qt=0;return me(_e)?(_e.forEach(nn=>{const On=et(nn),Xa=B(nn);let pl=0,bo=0;if(Xa.length){const Te=Be(Xa);pl=Te.selectedCount,bo=Te.selectableCount}const Ja=gt?gt.call(null,nn,at.get(On)??0):!0;if(Ja&&bo>0){const Te=pl===bo;!Te&&pl!==0&&(Bt[On]=!0,Re.push(nn)),Me(nn,On,Te)}Ja&&(qt+=1,Ye.has(On)&&(Nt+=1)),Nt+=pl,qt+=bo}),{selectedCount:Nt,selectableCount:qt}):{selectedCount:Nt,selectableCount:qt}};if(Be(a.value||[]),Xt){const _e=C.value.filter(Nt=>Ye.has(et(Nt)));Qe.forEach(Nt=>{Ye.has(et(Nt))&&_e.push(Nt)}),C.value=_e}S.value=Bt,z=Re,Xt&&Pe&&e.emit("selection-change",C.value?C.value.slice():[])},Q=()=>{y.value=!1;const ce=C.value;C.value=[],S.value={},z=[],ce.length&&e.emit("selection-change",[])},ee=()=>{var Pe,Ue;let ce;if(n.value){ce=[];const at=(Ue=(Pe=e==null?void 0:e.store)==null?void 0:Pe.states)==null?void 0:Ue.childrenColumnName.value,gt=tr(a.value,n.value,!0,at),{lazyTreeNodeMap:wt}=e.store.states;wt.value&&Object.entries(wt.value).forEach(([et,Bt])=>{gt[et]&&Bt.forEach(Re=>{const Ye=xn(Re,n.value);gt[Ye]||(gt[Ye]={row:Re,index:-1})})});for(const et in V.value)Dt(V.value,et)&&!gt[et]&&ce.push(V.value[et].row)}else ce=C.value.filter(at=>!a.value.includes(at));if(ce.length){const at=C.value.filter(gt=>!ce.includes(gt));C.value=at,Z({emitChange:!1}),e.emit("selection-change",[...at])}},ie=()=>(C.value||[]).slice(),ve=()=>z.slice(),pe=(ce,Pe,Ue)=>{var Ye;if(!n.value||Rt.checkStrictly.value||!Rt.lazy.value)return;const{lazyTreeNodeMap:at,childrenColumnName:gt}=e.store.states,wt=xn(ce,n.value),et=((Ye=at.value)==null?void 0:Ye[wt])??[],Bt=ce[gt.value]??[],Re={children:gt.value,checkStrictly:!1};for(const Qe of et){const Xt=Ue.get(xn(Qe,n.value))??0;Gs(C.value,Qe,Pe,Re,T.value,Xt,n.value),pe(Qe,Pe,Ue)}for(const Qe of Bt)pe(Qe,Pe,Ue)},re=(ce,Pe,Ue=!0,at=!1)=>{var wt,et,Bt,Re;const gt={children:(et=(wt=e==null?void 0:e.store)==null?void 0:wt.states)==null?void 0:et.childrenColumnName.value,checkStrictly:(Re=(Bt=e==null?void 0:e.store)==null?void 0:Bt.states)==null?void 0:Re.checkStrictly.value};if(Gs(C.value,ce,Pe,gt,at?void 0:T.value,a.value.indexOf(ce),n.value)){if(Rt.lazy.value&&!Rt.checkStrictly.value){const Qe=Pe??j(ce);pe(ce,Qe,X.value),Z({emitChange:!1,rowIndexMap:X.value})}else Z({emitChange:!1});const Ye=(C.value||[]).slice();Ue&&e.emit("select",Ye,ce),e.emit("selection-change",Ye)}},R=()=>{var Bt,Re;const ce=x.value?!y.value:!(y.value||C.value.length);y.value=ce;let Pe=!1,Ue=0;const at=(Re=(Bt=e==null?void 0:e.store)==null?void 0:Bt.states)==null?void 0:Re.rowKey.value,{childrenColumnName:gt}=e.store.states,wt={children:gt.value,checkStrictly:!1};a.value.forEach((Ye,Qe)=>{const Xt=Qe+Ue;Gs(C.value,Ye,ce,wt,T.value,Xt,at)&&(Pe=!0),Ue+=le(xn(Ye,at))});const et=X.value;if(Rt.lazy.value&&!Rt.checkStrictly.value&&at)for(const Ye of Object.values(Rt.lazyTreeNodeMap.value))for(const Qe of Ye){const Xt=et.get(xn(Qe,at))??0;Gs(C.value,Qe,ce,wt,T.value,Xt,at)&&(Pe=!0),pe(Qe,ce,et)}Z({emitChange:!1,rowIndexMap:et}),Pe&&e.emit("selection-change",C.value?[...C.value]:[]),e.emit("select-all",(C.value||[]).slice())},Y=()=>{var gt;if(((gt=a.value)==null?void 0:gt.length)===0){y.value=!1;return}let ce=0,Pe=0;const Ue=wt=>{for(const et of wt){const Bt=T.value&&T.value.call(null,et,ce);if(j(et))Pe++;else if(!T.value||Bt)return!1;ce++;const Re=B(et);if(Re.length&&!Ue(Re))return!1}return!0},at=Ue(a.value||[]);y.value=Pe===0?!1:at},ae=ce=>{if(!n.value)return!1;const Pe=xn(ce,n.value);return!!S.value[Pe]},le=ce=>{var gt;if(!e||!e.store)return 0;const{treeData:Pe}=e.store.states;let Ue=0;const at=(gt=Pe.value[ce])==null?void 0:gt.children;return at&&(Ue+=at.length,at.forEach(wt=>{Ue+=le(wt)})),Ue},se=(ce,Pe)=>{const Ue={};return Ln(ce).forEach(at=>{$.value[at.id]=Pe,Ue[at.columnKey||at.id]=Pe}),Ue},de=(ce,Pe,Ue)=>{P.value&&P.value!==ce&&(P.value.order=null),P.value=ce,N.value=Pe,A.value=Ue},be=()=>{let ce=i(l);Object.keys($.value).forEach(Pe=>{const Ue=$.value[Pe];if(!Ue||Ue.length===0)return;const at=k2({columns:u.value},Pe);at&&at.filterMethod&&(ce=ce.filter(gt=>Ue.some(wt=>at.filterMethod.call(null,wt,gt,at))))}),M.value=ce},we=()=>{a.value=fq(M.value??[],{sortingColumn:P.value,sortProp:N.value,sortOrder:A.value})},Oe=(ce=void 0)=>{ce!=null&&ce.filter||be(),we()},Ce=ce=>{const{tableHeaderRef:Pe}=e.refs;if(!Pe)return;const Ue=Object.assign({},Pe.filterPanels),at=Object.keys(Ue);if(at.length)if(De(ce)&&(ce=[ce]),me(ce)){const gt=ce.map(wt=>nq({columns:u.value},wt));at.forEach(wt=>{const et=gt.find(Bt=>Bt.id===wt);et&&(et.filteredValue=[])}),e.store.commit("filterChange",{column:gt,values:[],silent:!0,multi:!0})}else at.forEach(gt=>{const wt=u.value.find(et=>et.id===gt);wt&&(wt.filteredValue=[])}),$.value={},e.store.commit("filterChange",{column:{},values:[],silent:!0})},Ie=()=>{P.value&&(de(null,null,null),e.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:ge,toggleRowExpansion:ke,updateExpandRows:Le,states:qe,isRowExpanded:lt}=uq({data:a,rowKey:n}),{updateTreeExpandKeys:nt,toggleTreeExpansion:Ze,updateTreeData:kt,updateKeyChildren:Pt,loadOrToggle:Lt,states:Rt}=dq({data:a,rowKey:n}),{updateCurrentRowData:jt,updateCurrentRow:Yt,setCurrentRowKey:Ee,states:xe}=cq({data:a,rowKey:n}),Ke=ce=>{ge(ce),nt(ce)},Xe=(ce,Pe)=>{u.value.some(({type:Ue})=>Ue==="expand")?ke(ce,Pe):Ze(ce,Pe)};return fe(()=>Rt.checkStrictly.value,ce=>{ce?(S.value={},z=[]):Z({emitChange:!1}),Y()}),fe(()=>Rt.lazyTreeNodeMap.value,()=>{var at;if(!Rt.lazy.value||Rt.checkStrictly.value||!n.value)return;const ce=X.value,Pe=C.value.length;for(const gt of Object.keys(Rt.lazyTreeNodeMap.value))(at=V.value)!=null&&at[gt]&&pe(V.value[gt].row,!0,ce);const Ue=C.value.length!==Pe;Z({emitChange:!Ue,rowIndexMap:ce}),Y(),Ue&&e.emit("selection-change",[...C.value])}),{assertRowKey:_,updateColumns:L,scheduleLayout:K,isSelected:j,clearSelection:Q,cleanSelection:ee,getSelectionRows:ie,getHalfSelectionRows:ve,toggleRowSelection:re,_toggleAllSelection:R,toggleAllSelection:null,updateAllSelected:Y,updateSelectionByChildren:Z,getRowIndeterminate:ae,updateFilters:se,updateCurrentRow:Yt,updateSort:de,execFilter:be,execSort:we,execQuery:Oe,clearFilter:Ce,clearSort:Ie,toggleRowExpansion:ke,setExpandRowKeysAdapter:Ke,setCurrentRowKey:Ee,toggleRowExpansionAdapter:Xe,isRowExpanded:lt,updateExpandRows:Le,updateCurrentRowData:jt,loadOrToggle:Lt,updateTreeData:kt,updateKeyChildren:Pt,states:{tableSize:t,rowKey:n,data:a,_data:l,isComplex:o,_columns:s,originColumns:r,columns:u,fixedColumns:c,rightFixedColumns:d,leafColumns:f,fixedLeafColumns:p,rightFixedLeafColumns:g,updateOrderFns:m,leafColumnsLength:v,fixedLeafColumnsLength:h,rightFixedLeafColumnsLength:b,isAllSelected:y,selection:C,selectionIndeterminate:S,reserveSelection:k,selectOnIndeterminate:x,selectable:T,rowExpandable:E,filters:$,filteredData:M,sortingColumn:P,sortProp:N,sortOrder:A,hoverRow:q,...qe,...Rt,...xe}}}function Cv(e,t){return e.map(n=>{var a;return n.id===t.id?t:((a=n.children)!=null&&a.length&&(n.children=Cv(n.children,t)),n)})}function kv(e){e.forEach(t=>{var n,a;t.no=(n=t.getColumnIndex)==null?void 0:n.call(t),(a=t.children)!=null&&a.length&&kv(t.children)}),e.sort((t,n)=>t.no-n.no)}function vq(){const e=ht(),t=pq(),n=he("table"),{t:a}=St();return{ns:n,t:a,...t,mutations:{setData(r,u){const c=i(r._data)!==u;r.data.value=u,r._data.value=u,e.store.execQuery(),e.store.updateCurrentRowData(),e.store.updateExpandRows(),e.store.updateTreeData(e.store.states.defaultExpandAll.value),i(r.reserveSelection)?e.store.assertRowKey():c?e.store.clearSelection():e.store.cleanSelection(),e.store.updateSelectionByChildren({emitChange:!1}),e.store.updateAllSelected(),e.$ready&&e.store.scheduleLayout()},insertColumn(r,u,c,d){var g;const f=i(r._columns);let p=[];c?(c&&!c.children&&(c.children=[]),(g=c.children)==null||g.push(u),p=Cv(f,c)):(f.push(u),p=f),kv(p),r._columns.value=p,r.updateOrderFns.push(d),u.type==="selection"&&(r.selectable.value=u.selectable,r.reserveSelection.value=u.reserveSelection),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},updateColumnOrder(r,u){var c;((c=u.getColumnIndex)==null?void 0:c.call(u))!==u.no&&(kv(r._columns.value),e.$ready&&e.store.updateColumns())},removeColumn(r,u,c,d){var g;const f=i(r._columns)||[];if(c)(g=c.children)==null||g.splice(c.children.findIndex(m=>m.id===u.id),1),Ae(()=>{var m;((m=c.children)==null?void 0:m.length)===0&&delete c.children}),r._columns.value=Cv(f,c);else{const m=f.indexOf(u);m>-1&&(f.splice(m,1),r._columns.value=f)}const p=r.updateOrderFns.indexOf(d);p>-1&&r.updateOrderFns.splice(p,1),e.$ready&&(e.store.updateColumns(),e.store.scheduleLayout())},sort(r,u){const{prop:c,order:d,init:f}=u;if(c){const p=i(r.columns).find(g=>g.property===c);p&&(p.order=d,e.store.updateSort(p,c,d),e.store.commit("changeSortCondition",{init:f}))}},changeSortCondition(r,u){const{sortingColumn:c,sortProp:d,sortOrder:f}=r,p=i(c),g=i(d),m=i(f);Ad(m)&&(r.sortingColumn.value=null,r.sortProp.value=null),e.store.execQuery({filter:!0}),(!u||!(u.silent||u.init))&&e.emit("sort-change",{column:p,prop:g,order:m}),e.store.updateTableScrollY()},filterChange(r,u){const{column:c,values:d,silent:f}=u,p=e.store.updateFilters(c,d);e.store.execQuery(),f||e.emit("filter-change",p),e.store.updateTableScrollY()},toggleAllSelection(){var r,u;(u=(r=e.store).toggleAllSelection)==null||u.call(r)},rowSelectedChanged(r,u){e.store.toggleRowSelection(u),e.store.updateAllSelected()},setHoverRow(r,u){r.hoverRow.value=u},setCurrentRow(r,u){e.store.updateCurrentRow(u)}},commit:function(r,...u){const c=e.store.mutations;if(c[r])c[r].apply(e,[e.store.states,...u]);else throw new Error(`Action not found: ${r}`)},updateTableScrollY:function(){Ae(()=>e.layout.updateScrollY.apply(e.layout))}}}const gm={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",rowExpandable:"rowExpandable",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"},"treeProps.checkStrictly":{key:"checkStrictly",default:!1}};function hq(e,t){if(!e)throw new Error("Table is required.");const n=vq();return n.toggleAllSelection=Al(n._toggleAllSelection,10),Object.keys(gm).forEach(a=>{O2(N2(t,a),a,n)}),mq(n,t),n}function mq(e,t){Object.keys(gm).forEach(n=>{fe(()=>N2(t,n),a=>{O2(a,n,e)})})}function O2(e,t,n){let a=e,l=gm[t];st(l)&&(a=a||l.default,l=l.key),n.states[l].value=a}function N2(e,t){if(t.includes(".")){const n=t.split(".");let a=e;return n.forEach(l=>{a=a[l]}),a}else return e[t]}var gq=class{constructor(e){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.heightMap={},this.height=D(null),this.scrollX=D(!1),this.scrollY=D(!1),this.bodyWidth=D(null),this.fixedWidth=D(null),this.rightFixedWidth=D(null),this.gutterWidth=0;for(const t in e)Dt(e,t)&&(Qt(this[t])?this[t].value=e[t]:this[t]=e[t]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){const e=this.height.value;if(Ad(e))return!1;const t=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(t!=null&&t.wrapRef)){let n=!0;const a=this.scrollY.value;return n=t.wrapRef.scrollHeight>t.wrapRef.clientHeight,this.scrollY.value=n,a!==n}return!1}setHeight(e,t="height"){if(!It)return;const n=this.table.vnode.el;if(e=lq(e),this.height.value=Number(e),this.heightMap[t]=e,!n&&(e||e===0)){Ae(()=>{this.heightMap[t]===e&&this.setHeight(e,t)});return}n&&He(e)?(n.style[t]=`${e}px`,this.updateElsHeight()):n&&De(e)&&(n.style[t]=e,this.updateElsHeight())}setMaxHeight(e){this.setHeight(e,"max-height")}getFlattenColumns(){const e=[];return this.table.store.states.columns.value.forEach(t=>{t.isColumnGroup?e.push.apply(e,t.columns):e.push(t)}),e}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(e){if(!e)return!0;let t=e;for(;t.tagName!=="DIV";){if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}updateColumnsWidth(){var r;if(!It)return;const e=this.fit,t=(r=this.table.vnode.el)==null?void 0:r.clientWidth;let n=0;const a=this.getFlattenColumns(),l=a.filter(u=>!He(u.width));if(a.forEach(u=>{He(u.width)&&u.realWidth&&(u.realWidth=null)}),l.length>0&&e){if(a.forEach(u=>{n+=Number(u.width||u.minWidth||80)}),n<=t){this.scrollX.value=!1;const u=t-n;if(l.length===1)l[0].realWidth=Number(l[0].minWidth||80)+u;else{const c=u/l.reduce((f,p)=>f+Number(p.minWidth||80),0);let d=0;l.forEach((f,p)=>{if(p===0)return;const g=Math.floor(Number(f.minWidth||80)*c);d+=g,f.realWidth=Number(f.minWidth||80)+g}),l[0].realWidth=Number(l[0].minWidth||80)+u-d}}else this.scrollX.value=!0,l.forEach(u=>{u.realWidth=Number(u.minWidth)});this.bodyWidth.value=Math.max(n,t),this.table.state.resizeState.value.width=this.bodyWidth.value}else a.forEach(u=>{!u.width&&!u.minWidth?u.realWidth=80:u.realWidth=Number(u.width||u.minWidth),n+=u.realWidth}),this.scrollX.value=n>t,this.bodyWidth.value=n;const o=this.store.states.fixedColumns.value;if(o.length>0){let u=0;o.forEach(c=>{u+=Number(c.realWidth||c.width)}),this.fixedWidth.value=u}const s=this.store.states.rightFixedColumns.value;if(s.length>0){let u=0;s.forEach(c=>{u+=Number(c.realWidth||c.width)}),this.rightFixedWidth.value=u}this.notifyObservers("columns")}addObserver(e){this.observers.push(e)}removeObserver(e){const t=this.observers.indexOf(e);t!==-1&&this.observers.splice(t,1)}notifyObservers(e){this.observers.forEach(t=>{var n,a;switch(e){case"columns":(n=t.state)==null||n.onColumnsChange(this);break;case"scrollable":(a=t.state)==null||a.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${e}.`)}})}};const fl=Symbol("ElTable"),M2=e=>{const t=[];return e.forEach(n=>{n.children?(t.push(n),t.push.apply(t,M2(n.children))):t.push(n)}),t},I2=e=>{let t=1;const n=(l,o)=>{if(o&&(l.level=o.level+1,t{n(r,l),s+=r.colSpan}),l.colSpan=s}else l.colSpan=1};e.forEach(l=>{l.level=1,n(l,void 0)});const a=[];for(let l=0;l{l.children?(l.rowSpan=1,l.children.forEach(o=>o.isSubColumn=!0)):l.rowSpan=t-l.level+1,a[l.level-1].push(l)}),a};function bq(e){const t=Fe(fl),n=w(()=>I2(e.store.states.originColumns.value));return{isGroup:w(()=>{const o=n.value.length>1;return o&&t&&(t.state.isGroup.value=!0),o}),toggleAllSelection:o=>{o.stopPropagation(),t==null||t.store.commit("toggleAllSelection")},columnRows:n}}var yq=ue({name:"ElTableFilterPanel",components:{ElCheckbox:ll,ElCheckboxGroup:tm,ElScrollbar:il,ElTooltip:zn,ElIcon:Ve,ArrowDown:jl,ArrowUp:Zd},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function},appendTo:tn.appendTo},setup(e){const t=ht(),{t:n}=St(),a=he("table-filter"),l=t==null?void 0:t.parent;e.column&&!l.filterPanels.value[e.column.id]&&(l.filterPanels.value[e.column.id]=t);const o=D(null),s=D(null),r=D(0),u=D([]),c=w(()=>e.column&&e.column.filters),d=w(()=>e.column&&e.column.filterClassName?`${a.b()} ${e.column.filterClassName}`:a.b()),f=w({get:()=>{var E;return(((E=e.column)==null?void 0:E.filteredValue)||[])[0]},set:E=>{var $;if(e.column){const M=[...e.column.filteredValue??[]];Ta(E)?M.splice(0,1):M.splice(0,1,E),($=e.upDataColumn)==null||$.call(e,"filteredValue",M)}}}),p=w(()=>e.column?e.column.filterMultiple:!0),g=E=>E.value===f.value,m=()=>{var E;(E=o.value)==null||E.onClose()},v=()=>{y(u.value),m()},h=()=>{u.value=[],y(u.value),m()},b=(E,$)=>{f.value=E,r.value=$,Ta(E)?y([]):y([E]),m()},y=E=>{var $,M,P;($=e.upDataColumn)==null||$.call(e,"filteredValue",E),(M=e.store)==null||M.commit("filterChange",{column:e.column,values:E}),(P=e.store)==null||P.updateAllSelected()},C=()=>{var E;u.value=[...((E=e.column)==null?void 0:E.filteredValue)||[]]},S=()=>{var E,$;(E=s.value)==null||E.focus(),!p.value&&x(),e.column&&(($=e.upDataColumn)==null||$.call(e,"filterOpened",!0))},k=()=>{var E;e.column&&((E=e.upDataColumn)==null||E.call(e,"filterOpened",!1))},x=()=>{if(Ta(f)){r.value=0;return}const E=(c.value||[]).findIndex($=>$.value===f.value);r.value=E>=0?E+1:0};return{multiple:p,filterClassName:d,filteredValue:u,filterValue:f,filters:c,handleConfirm:v,handleReset:h,handleSelect:b,isPropAbsent:Ta,isActive:g,t:n,ns:a,tooltipRef:o,rootRef:s,checkedIndex:r,handleBeforeShowTooltip:C,handleShowTooltip:S,handleHideTooltip:k,handleKeydown:E=>{var A,q;const $=Gt(E),M=(c.value?c.value.length:0)+1;let P=r.value,N=!0;switch($){case ye.down:case ye.right:P=(P+1)%M;break;case ye.up:case ye.left:P=(P-1+M)%M;break;case ye.tab:m(),N=!1;break;case ye.enter:case ye.space:if(P===0)b(null,0);else{const z=(c.value||[])[P-1];z.value&&b(z.value,P)}break;default:N=!1}N&&E.preventDefault(),r.value=P,(q=(A=s.value)==null?void 0:A.querySelector(`.${a.e("list-item")}:nth-child(${P+1})`))==null||q.focus()}}}});const wq=["disabled"],Sq=["tabindex","aria-checked"],Cq=["tabindex","aria-checked","onClick"],kq=["aria-label"];function xq(e,t,n,a,l,o){const s=_t("el-checkbox"),r=_t("el-checkbox-group"),u=_t("el-scrollbar"),c=_t("arrow-up"),d=_t("arrow-down"),f=_t("el-icon"),p=_t("el-tooltip");return O(),oe(p,{ref:"tooltipRef",offset:0,placement:e.placement,"show-arrow":!1,trigger:"click",role:"dialog",teleported:"",effect:"light",pure:"",loop:"","popper-class":e.filterClassName,persistent:"","append-to":e.appendTo,onBeforeShow:e.handleBeforeShowTooltip,onShow:e.handleShowTooltip,onHide:e.handleHideTooltip},{content:J(()=>[e.multiple?(O(),H("div",{key:0,ref:"rootRef",tabindex:"-1",class:I(e.ns.e("multiple"))},[W("div",{class:I(e.ns.e("content"))},[U(u,{"wrap-class":e.ns.e("wrap")},{default:J(()=>[U(r,{modelValue:e.filteredValue,"onUpdate:modelValue":t[0]||(t[0]=g=>e.filteredValue=g),class:I(e.ns.e("checkbox-group"))},{default:J(()=>[(O(!0),H(ze,null,bt(e.filters,g=>(O(),oe(s,{key:g.value,value:g.value},{default:J(()=>[it(Se(g.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),W("div",{class:I(e.ns.e("bottom"))},[W("button",{class:I(e.ns.is("disabled",e.filteredValue.length===0)),disabled:e.filteredValue.length===0,type:"button",onClick:t[1]||(t[1]=(...g)=>e.handleConfirm&&e.handleConfirm(...g))},Se(e.t("el.table.confirmFilter")),11,wq),W("button",{type:"button",onClick:t[2]||(t[2]=(...g)=>e.handleReset&&e.handleReset(...g))},Se(e.t("el.table.resetFilter")),1)],2)],2)):(O(),H("ul",{key:1,ref:"rootRef",tabindex:"-1",role:"radiogroup",class:I(e.ns.e("list")),onKeydown:t[4]||(t[4]=(...g)=>e.handleKeydown&&e.handleKeydown(...g))},[W("li",{role:"radio",class:I([e.ns.e("list-item"),e.ns.is("active",e.isPropAbsent(e.filterValue))]),tabindex:e.checkedIndex===0?0:-1,"aria-checked":e.isPropAbsent(e.filterValue),onClick:t[3]||(t[3]=g=>e.handleSelect(null,0))},Se(e.t("el.table.clearFilter")),11,Sq),(O(!0),H(ze,null,bt(e.filters,(g,m)=>(O(),H("li",{key:g.value,role:"radio",class:I([e.ns.e("list-item"),e.ns.is("active",e.isActive(g))]),tabindex:e.checkedIndex===m+1?0:-1,"aria-checked":e.isActive(g),onClick:v=>e.handleSelect(g.value,m+1)},Se(g.text),11,Cq))),128))],34))]),default:J(()=>{var g;return[W("button",{type:"button",class:I(`${e.ns.namespace.value}-table__column-filter-trigger`),"aria-label":e.t("el.table.filterLabel",{column:((g=e.column)==null?void 0:g.label)||""})},[U(f,null,{default:J(()=>[ne(e.$slots,"filter-icon",{},()=>{var m;return[(m=e.column)!=null&&m.filterOpened?(O(),oe(c,{key:0})):(O(),oe(d,{key:1}))]})]),_:3})],10,kq)]}),_:3},8,["placement","popper-class","append-to","onBeforeShow","onShow","onHide"])}var Eq=Rn(yq,[["render",xq]]);function bm(e){const t=ht();Cd(()=>{n.value.addObserver(t)}),mt(()=>{a(n.value),l(n.value)}),Kl(()=>{a(n.value),l(n.value)}),Qi(()=>{n.value.removeObserver(t)});const n=w(()=>{const o=e.layout;if(!o)throw new Error("Can not find table layout.");return o}),a=o=>{var c;const s=((c=e.vnode.el)==null?void 0:c.querySelectorAll("colgroup > col"))||[];if(!s.length)return;const r=o.getFlattenColumns(),u={};r.forEach(d=>{u[d.id]=d});for(let d=0,f=s.length;d{var u,c;const s=((u=e.vnode.el)==null?void 0:u.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let d=0,f=s.length;d{v.stopPropagation()},o=(v,h)=>{!h.filters&&h.sortable?m(v,h,!1):h.filterable&&!h.sortable&&l(v),a==null||a.emit("header-click",h,v)},s=(v,h)=>{a==null||a.emit("header-contextmenu",h,v)},r=D(null),u=D(!1),c=D(),d=(v,h)=>{var b,y,C;if(It&&!(h.children&&h.children.length>0)&&r.value&&e.border&&r.value.id===h.id){u.value=!0;const S=a;t("set-drag-visible",!0);const k=(b=S==null?void 0:S.vnode.el)==null?void 0:b.getBoundingClientRect().left,x=(C=(y=n==null?void 0:n.vnode)==null?void 0:y.el)==null?void 0:C.querySelector(`th.${h.id}`),T=x.getBoundingClientRect(),E=T.left-k+30;Ba(x,"noclick"),c.value={startMouseLeft:v.clientX,startLeft:T.right-k,startColumnLeft:T.left-k,tableLeft:k};const $=S==null?void 0:S.refs.resizeProxy;$.style.left=`${c.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const M=N=>{const A=N.clientX-c.value.startMouseLeft,q=c.value.startLeft+A;$.style.left=`${Math.max(E,q)}px`},P=()=>{if(u.value){const{startColumnLeft:N,startLeft:A}=c.value;h.width=h.realWidth=Number.parseInt($.style.left,10)-N,S==null||S.emit("header-dragend",h.width,A-N,h,v),requestAnimationFrame(()=>{e.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",u.value=!1,r.value=null,c.value=void 0,t("set-drag-visible",!1)}document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",P),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{sa(x,"noclick")},0)};document.addEventListener("mousemove",M),document.addEventListener("mouseup",P)}},f=(v,h)=>{var $;if(!e.border||h.children&&h.children.length>0)return;const b=v.target,y=wa(b)?b.closest("th"):null;if(!y)return;const C=Fa(y,"is-sortable");if(C){const M=u.value?"col-resize":"";y.style.cursor=M;const P=y.querySelector(".caret-wrapper");P&&(P.style.cursor=M)}if(!h.resizable||u.value){r.value=null;return}const S=y.getBoundingClientRect(),k=(($=y.parentNode)==null?void 0:$.lastElementChild)===y,x=e.allowDragLastColumn||!k,T=S.width>12&&S.right-v.clientX<8&&x,E=T?"col-resize":"";document.body.style.cursor=E,r.value=T?h:null,C&&(y.style.cursor=E)},p=()=>{!It||u.value||(document.body.style.cursor="")},g=({order:v,sortOrders:h})=>{if(v==="")return h[0];const b=h.indexOf(v||null);return h[b>h.length-2?0:b+1]},m=(v,h,b)=>{var $;v.stopPropagation();const y=h.order===b?null:b||g(h),C=($=v.target)==null?void 0:$.closest("th");if(C&&Fa(C,"noclick")){sa(C,"noclick");return}if(!h.sortable)return;const S=v.currentTarget;if(["ascending","descending"].some(M=>Fa(S,M)&&!h.sortOrders.includes(M)))return;const k=e.store.states;let x=k.sortProp.value,T;const E=k.sortingColumn.value;(E!==h||E===h&&Ad(E.order))&&(E&&(E.order=null),k.sortingColumn.value=h,x=h.property??null),y?T=h.order=y:T=h.order=null,k.sortProp.value=x,k.sortOrder.value=T,a==null||a.store.commit("changeSortCondition")};return{handleHeaderClick:o,handleHeaderContextMenu:s,handleMouseDown:d,handleMouseMove:f,handleMouseOut:p,handleSortClick:m,handleFilterClick:l}}function $q(e){const t=Fe(fl),n=he("table");return{getHeaderRowStyle:r=>{const u=t==null?void 0:t.props.headerRowStyle;return We(u)?u.call(null,{rowIndex:r}):u},getHeaderRowClass:r=>{const u=[],c=t==null?void 0:t.props.headerRowClassName;return De(c)?u.push(c):We(c)&&u.push(c.call(null,{rowIndex:r})),u.join(" ")},getHeaderCellStyle:(r,u,c,d)=>{let f=(t==null?void 0:t.props.headerCellStyle)??{};We(f)&&(f=f.call(null,{rowIndex:r,columnIndex:u,row:c,column:d}));const p=mm(u,d.fixed,e.store,c);return wr(p,"left"),wr(p,"right"),Object.assign({},f,p)},getHeaderCellClass:(r,u,c,d)=>{const f=hm(n.b(),u,d.fixed,e.store,c),p=[d.id,d.order,d.headerAlign,d.className,d.labelClassName,...f];d.children||p.push("is-leaf"),d.sortable&&p.push("is-sortable");const g=t==null?void 0:t.props.headerCellClassName;return De(g)?p.push(g):We(g)&&p.push(g.call(null,{rowIndex:r,columnIndex:u,row:c,column:d})),p.push(n.e("cell")),p.filter(m=>!!m).join(" ")}}}var s0=ue({name:"ElTableHeader",components:{ElCheckbox:ll},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})},appendFilterPanelTo:{type:String},allowDragLastColumn:{type:Boolean}},setup(e,{emit:t}){const n=ht(),a=Fe(fl),l=he("table"),o=D({}),{onColumnsChange:s,onScrollableChange:r}=bm(a),u=(a==null?void 0:a.props.tableLayout)==="auto",c=Ft(new Map),d=D();let f;const p=()=>{f&&(clearTimeout(f),f=void 0),f=setTimeout(()=>{f=void 0;const N=d.value;N&&c.size>0&&(c.forEach((A,q)=>{const z=N.querySelector(`.${q.replace(/\s/g,".")}`);z&&(A.width=z.getBoundingClientRect().width||A.width)}),c.clear())})};fe(c,p),zt(()=>{f&&(clearTimeout(f),f=void 0)}),mt(async()=>{await Ae(),await Ae();const{prop:N,order:A}=e.defaultSort;a==null||a.store.commit("sort",{prop:N,order:A,init:!0}),p()});const{handleHeaderClick:g,handleHeaderContextMenu:m,handleMouseDown:v,handleMouseMove:h,handleMouseOut:b,handleSortClick:y,handleFilterClick:C}=Tq(e,t),{getHeaderRowStyle:S,getHeaderRowClass:k,getHeaderCellStyle:x,getHeaderCellClass:T}=$q(e),{isGroup:E,toggleAllSelection:$,columnRows:M}=bq(e),{t:P}=St();return n.state={onColumnsChange:s,onScrollableChange:r},n.filterPanels=o,{ns:l,t:P,filterPanels:o,onColumnsChange:s,onScrollableChange:r,columnRows:M,getHeaderRowClass:k,getHeaderRowStyle:S,getHeaderCellClass:T,getHeaderCellStyle:x,handleHeaderClick:g,handleHeaderContextMenu:m,handleMouseDown:v,handleMouseMove:h,handleMouseOut:b,handleSortClick:y,handleFilterClick:C,isGroup:E,toggleAllSelection:$,saveIndexSelection:c,isTableLayoutAuto:u,theadRef:d,updateFixedColumnStyle:p}},render(){const{ns:e,t,isGroup:n,columnRows:a,getHeaderCellStyle:l,getHeaderCellClass:o,getHeaderRowClass:s,getHeaderRowStyle:r,handleHeaderClick:u,handleHeaderContextMenu:c,handleMouseDown:d,handleMouseMove:f,handleSortClick:p,handleMouseOut:g,store:m,$parent:v,saveIndexSelection:h,isTableLayoutAuto:b}=this;let y=1;return Ge("thead",{ref:"theadRef",class:e.is("group",n)},a.map((C,S)=>Ge("tr",{class:s(S),key:S,style:r(S)},C.map((k,x)=>{k.rowSpan>y&&(y=k.rowSpan);const T=o(S,x,C,k);return b&&k.fixed&&h.set(T,k),Ge("th",{class:T,colspan:k.colSpan,key:`${k.id}-thead`,rowspan:k.rowSpan,scope:k.colSpan>1?"colgroup":"col",ariaSort:k.sortable?k.order:void 0,style:l(S,x,C,k),onClick:E=>{var $;($=E.currentTarget)!=null&&$.classList.contains("noclick")||u(E,k)},onContextmenu:E=>c(E,k),onMousedown:E=>d(E,k),onMousemove:E=>f(E,k),onMouseout:g},[Ge("div",{class:["cell",k.filteredValue&&k.filteredValue.length>0?"highlight":""]},[k.renderHeader?k.renderHeader({column:k,$index:x,store:m,_self:v}):k.label,k.sortable&&Ge("button",{type:"button",class:"caret-wrapper","aria-label":t("el.table.sortLabel",{column:k.label||""}),onClick:E=>p(E,k)},[Ge("i",{onClick:E=>p(E,k,"ascending"),class:"sort-caret ascending"}),Ge("i",{onClick:E=>p(E,k,"descending"),class:"sort-caret descending"})]),k.filterable&&Ge(Eq,{store:m,placement:k.filterPlacement||"bottom-start",appendTo:v==null?void 0:v.appendFilterPanelTo,column:k,upDataColumn:(E,$)=>{k[E]=$}},{"filter-icon":()=>k.renderFilterIcon?k.renderFilterIcon({filterOpened:k.filterOpened}):null})])])}))))}});function Oq(e){const t=Fe(fl),n=D(""),a=D(Ge("div")),l=(m,v,h)=>{var k,x;const b=t,y=op(m);let C=null;const S=(k=b==null?void 0:b.vnode.el)==null?void 0:k.dataset.prefix;y&&(C=a0({columns:((x=e.store)==null?void 0:x.states.columns.value)??[]},y,S),C&&(b==null||b.emit(`cell-${h}`,v,C,y,m))),b==null||b.emit(`row-${h}`,v,C,m)},o=(m,v)=>{l(m,v,"dblclick")},s=(m,v)=>{var h;(h=e.store)==null||h.commit("setCurrentRow",v),l(m,v,"click")},r=(m,v)=>{l(m,v,"contextmenu")},u=Al(m=>{var v;(v=e.store)==null||v.commit("setHoverRow",m)},30),c=Al(()=>{var m;(m=e.store)==null||m.commit("setHoverRow",null)},30),d=m=>{const v=window.getComputedStyle(m,null);return{left:Number.parseInt(v.paddingLeft,10)||0,right:Number.parseInt(v.paddingRight,10)||0,top:Number.parseInt(v.paddingTop,10)||0,bottom:Number.parseInt(v.paddingBottom,10)||0}},f=(m,v,h)=>{var y;let b=(y=v==null?void 0:v.target)==null?void 0:y.parentNode;for(;m>1&&(b=b==null?void 0:b.nextSibling,!(!b||b.nodeName!=="TR"));)h(b,"hover-row hover-fixed-row"),m--};return{handleDoubleClick:o,handleClick:s,handleContextMenu:r,handleMouseEnter:u,handleMouseLeave:c,handleCellMouseEnter:(m,v,h)=>{var B,_,F;if(!t)return;const b=t,y=op(m),C=(B=b==null?void 0:b.vnode.el)==null?void 0:B.dataset.prefix;let S=null;if(y){if(S=a0({columns:((_=e.store)==null?void 0:_.states.columns.value)??[]},y,C),!S)return;y.rowSpan>1&&f(y.rowSpan,m,Ba);const L=b.hoverState={cell:y,column:S,row:v};b==null||b.emit("cell-mouse-enter",L.row,L.column,L.cell,m)}if(!h){(pn==null?void 0:pn.trigger)===y&&(pn==null||pn());return}const k=m.target.querySelector(".cell");if(!(Fa(k,`${C}-tooltip`)&&k.childNodes.length&&((F=k.textContent)!=null&&F.trim())))return;const x=document.createRange();x.setStart(k,0),x.setEnd(k,k.childNodes.length);const{width:T,height:E}=x.getBoundingClientRect(),{width:$,height:M}=k.getBoundingClientRect(),{top:P,left:N,right:A,bottom:q}=d(k),z=N+A,V=P+q;Ml(T+z,$)||Ml(E+V,M)||Ml(k.scrollWidth,$)?iq(h,((y==null?void 0:y.innerText)||(y==null?void 0:y.textContent))??"",v,S,y,b):(pn==null?void 0:pn.trigger)===y&&(pn==null||pn())},handleCellMouseLeave:m=>{const v=op(m);if(!v)return;v.rowSpan>1&&f(v.rowSpan,m,sa);const h=t==null?void 0:t.hoverState;t==null||t.emit("cell-mouse-leave",h==null?void 0:h.row,h==null?void 0:h.column,h==null?void 0:h.cell,m)},tooltipContent:n,tooltipTrigger:a}}function Nq(e){const t=Fe(fl),n=he("table");return{getRowStyle:(c,d)=>{const f=t==null?void 0:t.props.rowStyle;return We(f)?f.call(null,{row:c,rowIndex:d}):f||null},getRowClass:(c,d,f)=>{var m;const p=[n.e("row")];t!=null&&t.props.highlightCurrentRow&&c===((m=e.store)==null?void 0:m.states.currentRow.value)&&p.push("current-row"),e.stripe&&f%2===1&&p.push(n.em("row","striped"));const g=t==null?void 0:t.props.rowClassName;return De(g)?p.push(g):We(g)&&p.push(g.call(null,{row:c,rowIndex:d})),p},getCellStyle:(c,d,f,p)=>{const g=t==null?void 0:t.props.cellStyle;let m=g??{};We(g)&&(m=g.call(null,{rowIndex:c,columnIndex:d,row:f,column:p}));const v=mm(d,e==null?void 0:e.fixed,e.store);return wr(v,"left"),wr(v,"right"),Object.assign({},m,v)},getCellClass:(c,d,f,p,g)=>{const m=hm(n.b(),d,e==null?void 0:e.fixed,e.store,void 0,g),v=[p.id,p.align,p.className,...m],h=t==null?void 0:t.props.cellClassName;return De(h)?v.push(h):We(h)&&v.push(h.call(null,{rowIndex:c,columnIndex:d,row:f,column:p})),v.push(n.e("cell")),v.filter(b=>!!b).join(" ")},getSpan:(c,d,f,p)=>{let g=1,m=1;const v=t==null?void 0:t.props.spanMethod;if(We(v)){const h=v({row:c,column:d,rowIndex:f,columnIndex:p});me(h)?(g=h[0],m=h[1]):st(h)&&(g=h.rowspan,m=h.colspan)}return{rowspan:g,colspan:m}},getColspanRealWidth:(c,d,f)=>{if(d<1)return c[f].realWidth;const p=c.map(({realWidth:g,width:m})=>g||m).slice(f,f+d);return Number(p.reduce((g,m)=>Number(g)+Number(m),-1))}}}const Mq=["colspan","rowspan"];var Iq=ue({name:"TableTdWrapper",__name:"td-wrapper",props:{colspan:{type:Number,default:1},rowspan:{type:Number,default:1}},setup(e){return(t,n)=>(O(),H("td",{colspan:e.colspan,rowspan:e.rowspan},[ne(t.$slots,"default")],8,Mq))}}),Pq=Iq;function Rq(e){const t=Fe(fl),n=he("table"),{handleDoubleClick:a,handleClick:l,handleContextMenu:o,handleMouseEnter:s,handleMouseLeave:r,handleCellMouseEnter:u,handleCellMouseLeave:c,tooltipContent:d,tooltipTrigger:f}=Oq(e),{getRowStyle:p,getRowClass:g,getCellStyle:m,getCellClass:v,getSpan:h,getColspanRealWidth:b}=Nq(e);let y=-1;const C=w(()=>{var E;return(E=e.store)==null?void 0:E.states.columns.value.findIndex(({type:$})=>$==="default")}),S=(E,$)=>{var P;const M=(P=t==null?void 0:t.props)==null?void 0:P.rowKey;return M?xn(E,M):$},k=(E,$,M,P=!1)=>{const{tooltipEffect:N,tooltipOptions:A,store:q}=e,{indent:z,columns:V}=q.states,B=[];let _=!0;return M&&(B.push(n.em("row",`level-${M.level}`)),_=!!M.display),$===0&&(y=-1),e.stripe&&_&&y++,B.push(...g(E,$,y)),Ge("tr",{style:[_?null:{display:"none"},p(E,$)],class:B,key:S(E,$),onDblclick:F=>a(F,E),onClick:F=>l(F,E),onContextmenu:F=>o(F,E),onMouseenter:()=>s($),onMouseleave:r},V.value.map((F,L)=>{const{rowspan:K,colspan:j}=h(E,F,$,L);if(!K||!j)return null;const X=Object.assign({},F);X.realWidth=b(V.value,j,L);const Z={store:q,_self:e.context||t,column:X,row:E,$index:$,cellIndex:L,expanded:P};L===C.value&&M&&(Z.treeNode={indent:M.level&&M.level*z.value,level:M.level},Wt(M.expanded)&&(Z.treeNode.expanded=M.expanded,"loading"in M&&(Z.treeNode.loading=M.loading),"noLazyChildren"in M&&(Z.treeNode.noLazyChildren=M.noLazyChildren)));const Q=`${S(E,$)},${L}`,ee=X.columnKey||X.rawColumnKey||"",ie=F.showOverflowTooltip&&Yw({effect:N},A,F.showOverflowTooltip);return Ge(Pq,{style:m($,L,E,F),class:v($,L,E,F,j-1),key:`${ee}${Q}`,rowspan:K,colspan:j,onMouseenter:ve=>u(ve,E,ie),onMouseleave:c},{default:()=>x(L,F,Z)})}))},x=(E,$,M)=>$.renderCell(M);return{wrappedRowRender:(E,$)=>{const M=e.store,{isRowExpanded:P,assertRowKey:N}=M,{treeData:A,lazyTreeNodeMap:q,childrenColumnName:z,rowKey:V}=M.states,B=M.states.columns.value;if(B.some(({type:_})=>_==="expand")){const _=P(E),F=k(E,$,void 0,_),L=t==null?void 0:t.renderExpanded;if(!L)return console.error("[Element Error]renderExpanded is required."),F;const K=[[F]];return(t.props.preserveExpandedContent||_)&&K[0].push(Ge("tr",{key:`expanded-row__${F.key}`,style:{display:_?"":"none"}},[Ge("td",{colspan:B.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[L({row:E,$index:$,store:M,expanded:_})])])),K}else if(Object.keys(A.value).length){N();const _=xn(E,V.value);let F=A.value[_],L=null;F&&(L={expanded:F.expanded,level:F.level,display:!0,noLazyChildren:void 0,loading:void 0},Wt(F.lazy)&&(L&&Wt(F.loaded)&&F.loaded&&(L.noLazyChildren=!(F.children&&F.children.length)),L.loading=F.loading));const K=[k(E,$,L??void 0)];if(F){let j=0;const X=(Z,Q)=>{Z&&Z.length&&Q&&Z.forEach(ee=>{const ie={display:Q.display&&Q.expanded,level:Q.level+1,expanded:!1,noLazyChildren:!1,loading:!1},ve=xn(ee,V.value);if(Ta(ve))throw new Error("For nested data item, row-key is required.");if(F={...A.value[ve]},F&&(ie.expanded=F.expanded,F.level=F.level||ie.level,F.display=!!(F.expanded&&ie.display),Wt(F.lazy)&&(Wt(F.loaded)&&F.loaded&&(ie.noLazyChildren=!(F.children&&F.children.length)),ie.loading=F.loading)),j++,K.push(k(ee,$+j,ie)),F){const pe=q.value[ve]||ee[z.value];X(pe,F)}})};F.display=!0,X(q.value[_]||E[z.value],F)}return K}else return k(E,$,void 0)},tooltipContent:d,tooltipTrigger:f}}const _q={store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean};var Aq=ue({name:"ElTableBody",props:_q,setup(e){var d;const t=ht(),n=Fe(fl),a=he("table"),{wrappedRowRender:l,tooltipContent:o,tooltipTrigger:s}=Rq(e),{onColumnsChange:r,onScrollableChange:u}=bm(n),c=[];return fe((d=e.store)==null?void 0:d.states.hoverRow,(f,p)=>{var b,y;const g=t==null?void 0:t.vnode.el,m=Array.from((g==null?void 0:g.children)||[]).filter(C=>C==null?void 0:C.classList.contains(`${a.e("row")}`));let v=f;const h=(b=m[v])==null?void 0:b.childNodes;if(h!=null&&h.length){let C=0;Array.from(h).reduce((S,k,x)=>{var T,E;return((T=h[x])==null?void 0:T.colSpan)>1&&(C=(E=h[x])==null?void 0:E.colSpan),k.nodeName!=="TD"&&C===0&&S.push(x),C>0&&C--,S},[]).forEach(S=>{var k;for(v=f;v>0;){const x=(k=m[v-1])==null?void 0:k.childNodes;if(x[S]&&x[S].nodeName==="TD"&&x[S].rowSpan>1){Ba(x[S],"hover-cell"),c.push(x[S]);break}v--}})}else c.forEach(C=>sa(C,"hover-cell")),c.length=0;!((y=e.store)!=null&&y.states.isComplex.value)||!It||Kn(()=>{const C=m[p],S=m[f];C&&!C.classList.contains("hover-fixed-row")&&sa(C,"hover-row"),S&&Ba(S,"hover-row")})}),Qi(()=>{pn==null||pn()}),{ns:a,onColumnsChange:r,onScrollableChange:u,wrappedRowRender:l,tooltipContent:o,tooltipTrigger:s}},render(){const{wrappedRowRender:e,store:t}=this,n=(t==null?void 0:t.states.data.value)||[];return Ge("tbody",{tabIndex:-1},[n.reduce((a,l)=>a.concat(e(l,a.length)),[])])}});function Lq(){var t;const e=(t=Fe(fl))==null?void 0:t.store;return{leftFixedLeafCount:w(()=>(e==null?void 0:e.states.fixedLeafColumnsLength.value)??0),rightFixedLeafCount:w(()=>(e==null?void 0:e.states.rightFixedColumns.value.length)??0),columnsCount:w(()=>(e==null?void 0:e.states.columns.value.length)??0),leftFixedCount:w(()=>(e==null?void 0:e.states.fixedColumns.value.length)??0),rightFixedCount:w(()=>(e==null?void 0:e.states.rightFixedColumns.value.length)??0),columns:w(()=>(e==null?void 0:e.states.columns.value)??[])}}function Dq(e){const{columns:t}=Lq(),n=he("table");return{getCellClasses:(o,s)=>{const r=o[s],u=[n.e("cell"),r.id,r.align,r.labelClassName,...hm(n.b(),s,r.fixed,e.store)];return r.className&&u.push(r.className),r.children||u.push(n.is("leaf")),u},getCellStyles:(o,s)=>{const r=mm(s,o.fixed,e.store);return wr(r,"left"),wr(r,"right"),r},columns:t}}var r0=ue({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(e){const t=Fe(fl),n=he("table"),{getCellClasses:a,getCellStyles:l,columns:o}=Dq(e),{onScrollableChange:s,onColumnsChange:r}=bm(t);return{ns:n,onScrollableChange:s,onColumnsChange:r,getCellClasses:a,getCellStyles:l,columns:o}},render(){const{columns:e,getCellStyles:t,getCellClasses:n,summaryMethod:a,sumText:l}=this,o=this.store.states.data.value;let s=[];return a?s=a({columns:e,data:o}):e.forEach((r,u)=>{if(u===0){s[u]=l;return}const c=o.map(g=>Number(g[r.property])),d=[];let f=!0;c.forEach(g=>{if(!Number.isNaN(+g)){f=!1;const m=`${g}`.split(".")[1];d.push(m?m.length:0)}});const p=Math.max.apply(null,d);f?s[u]="":s[u]=c.reduce((g,m)=>{const v=Number(m);return Number.isNaN(+v)?g:Number.parseFloat((g+m).toFixed(Math.min(p,20)))},0)}),Ge(Ge("tfoot",[Ge("tr",{},[...e.map((r,u)=>Ge("td",{key:u,colspan:r.colSpan,rowspan:r.rowSpan,class:n(e,u),style:t(r,u)},[Ge("div",{class:["cell",r.labelClassName]},[s[u]])]))])]))}});function Bq(e){return{setCurrentRow:p=>{e.commit("setCurrentRow",p)},getSelectionRows:()=>e.getSelectionRows(),getHalfSelectionRows:()=>e.getHalfSelectionRows(),toggleRowSelection:(p,g,m=!0)=>{e.toggleRowSelection(p,g,!1,m),e.updateAllSelected()},clearSelection:()=>{e.clearSelection()},clearFilter:p=>{e.clearFilter(p)},toggleAllSelection:()=>{e.commit("toggleAllSelection")},toggleRowExpansion:(p,g)=>{e.toggleRowExpansionAdapter(p,g)},clearSort:()=>{e.clearSort()},sort:(p,g)=>{e.commit("sort",{prop:p,order:g})},updateKeyChildren:(p,g)=>{e.updateKeyChildren(p,g)}}}function Vq(e,t,n,a){const l=D(!1),o=D(null),s=D(!1),r=z=>{s.value=z},u=D({width:null,height:null,headerHeight:null}),c=D(!1),d={display:"inline-block",verticalAlign:"middle"},f=D(),p=D(0),g=D(0),m=D(0),v=D(0),h=D(0);fe(()=>e.height,z=>{t.setHeight(z??null)},{immediate:!0}),fe(()=>e.maxHeight,z=>{t.setMaxHeight(z??null)},{immediate:!0}),fe(()=>[e.currentRowKey,n.states.rowKey],([z,V])=>{!i(V)||!i(z)||n.setCurrentRowKey(`${z}`)},{immediate:!0}),fe(()=>e.data,z=>{a.store.commit("setData",z)},{immediate:!0,deep:!0}),ia(()=>{e.expandRowKeys&&n.setExpandRowKeysAdapter(e.expandRowKeys)});const b=()=>{a.store.commit("setHoverRow",null),a.hoverState&&(a.hoverState=null)},y=(z,V)=>{const{pixelX:B,pixelY:_}=V;Math.abs(B)>=Math.abs(_)&&(a.refs.bodyWrapper.scrollLeft+=V.pixelX/5)},C=w(()=>e.height||e.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),S=w(()=>({width:t.bodyWidth.value?`${t.bodyWidth.value}px`:""})),k=()=>{C.value&&t.updateElsHeight(),t.updateColumnsWidth(),!(typeof window>"u")&&requestAnimationFrame($)};mt(async()=>{await Ae(),n.updateColumns(),M(),requestAnimationFrame(k);const z=a.vnode.el,V=a.refs.headerWrapper;e.flexible&&z&&z.parentElement&&(z.parentElement.style.minWidth="0"),u.value={width:f.value=z.offsetWidth,height:z.offsetHeight,headerHeight:e.showHeader&&V?V.offsetHeight:null},n.states.columns.value.forEach(B=>{B.filteredValue&&B.filteredValue.length&&a.store.commit("filterChange",{column:B,values:B.filteredValue,silent:!0})}),a.$ready=!0});const x=(z,V)=>{if(!z)return;const B=Array.from(z.classList).filter(_=>!_.startsWith("is-scrolling-"));B.push(t.scrollX.value?V:"is-scrolling-none"),z.className=B.join(" ")},T=z=>{const{tableWrapper:V}=a.refs;x(V,z)},E=z=>{const{tableWrapper:V}=a.refs;return!!(V&&V.classList.contains(z))},$=function(){if(!a.refs.scrollBarRef)return;if(!t.scrollX.value){const K="is-scrolling-none";E(K)||T(K);return}const z=a.refs.scrollBarRef.wrapRef;if(!z)return;const{scrollLeft:V,offsetWidth:B,scrollWidth:_}=z,{headerWrapper:F,footerWrapper:L}=a.refs;F&&(F.scrollLeft=V),L&&(L.scrollLeft=V),V>=_-B-1?T("is-scrolling-right"):T(V===0?"is-scrolling-left":"is-scrolling-middle")},M=()=>{a.refs.scrollBarRef&&(a.refs.scrollBarRef.wrapRef&&Ht(a.refs.scrollBarRef.wrapRef,"scroll",$,{passive:!0}),e.fit?on(a.vnode.el,P):Ht(window,"resize",P),on(a.refs.tableInnerWrapper,()=>{var z,V;P(),(V=(z=a.refs)==null?void 0:z.scrollBarRef)==null||V.update()}))},P=()=>{var X,Z,Q,ee;const z=a.vnode.el;if(!a.$ready||!z)return;let V=!1;const{width:B,height:_,headerHeight:F}=u.value,L=f.value=z.offsetWidth;B!==L&&(V=!0);const K=z.offsetHeight;(e.height||C.value)&&_!==K&&(V=!0);const j=e.tableLayout==="fixed"?a.refs.headerWrapper:(X=a.refs.tableHeaderRef)==null?void 0:X.$el;e.showHeader&&(j==null?void 0:j.offsetHeight)!==F&&(V=!0),p.value=((Z=a.refs.tableWrapper)==null?void 0:Z.scrollHeight)||0,m.value=(j==null?void 0:j.scrollHeight)||0,v.value=((Q=a.refs.footerWrapper)==null?void 0:Q.offsetHeight)||0,h.value=((ee=a.refs.appendWrapper)==null?void 0:ee.offsetHeight)||0,g.value=p.value-m.value-v.value-h.value,V&&(u.value={width:L,height:K,headerHeight:e.showHeader&&(j==null?void 0:j.offsetHeight)||0},k())},N=$n(),A=w(()=>{const{bodyWidth:z,scrollY:V,gutterWidth:B}=t;return z.value?`${z.value-(V.value?B:0)}px`:""}),q=w(()=>e.maxHeight?"fixed":e.tableLayout);return{isHidden:l,renderExpanded:o,setDragVisible:r,isGroup:c,handleMouseLeave:b,handleHeaderFooterMousewheel:y,tableSize:N,emptyBlockStyle:w(()=>{if(e.data&&e.data.length)return;let z="100%";e.height&&g.value&&(z=`${g.value}px`);const V=f.value;return{width:V?`${V}px`:"",height:z}}),resizeProxyVisible:s,bodyWidth:A,resizeState:u,doLayout:k,tableBodyStyles:S,tableLayout:q,scrollbarViewStyle:d,scrollbarStyle:w(()=>e.height?{height:"100%"}:e.maxHeight?Number.isNaN(Number(e.maxHeight))?{maxHeight:`calc(${e.maxHeight} - ${m.value+v.value}px)`}:{maxHeight:`${+e.maxHeight-m.value-v.value}px`}:{})}}function Fq(e){let t;const n=()=>{const a=e.vnode.el.querySelector(".hidden-columns"),l={childList:!0,subtree:!0},o=e.store.states.updateOrderFns;t=new MutationObserver(()=>{o.forEach(s=>s())}),t.observe(a,l)};mt(()=>{n()}),Qi(()=>{t==null||t.disconnect()})}function hc(e){const t=e.tableLayout==="auto";let n=e.columns||[];t&&n.every(({width:l})=>Et(l))&&(n=[]);const a=l=>{const o={key:`${e.tableLayout}_${l.id}`,style:{},name:void 0};return t?o.style={width:`${l.width}px`}:o.name=l.id,o};return Ge("colgroup",{},n.map(l=>Ge("col",a(l))))}hc.props=["columns","tableLayout"];const zq=()=>{const e=D(),t=(o,s)=>{const r=e.value;r&&r.scrollTo(o,s)},n=(o,s)=>{const r=e.value;r&&He(s)&&["Top","Left"].includes(o)&&r[`setScroll${o}`](s)};return{scrollBarRef:e,scrollTo:t,setScrollTop:o=>n("Top",o),setScrollLeft:o=>n("Left",o)}},Hq=["data-prefix"],Kq={ref:"hiddenColumns",class:"hidden-columns"};var Wq=ue({name:"ElTable",__name:"table",props:X7,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-dblclick","cell-contextmenu","cell-click","row-dblclick","row-click","row-contextmenu","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change","scroll"],setup(e,{expose:t}){const n=e,{t:a}=St(),l=he("table"),o=mo("table"),s=ht();Tt(fl,s);const r=hq(s,n);s.store=r;const u=new gq({store:s.store,table:s,fit:n.fit,showHeader:n.showHeader});s.layout=u;const c=w(()=>(r.states.data.value||[]).length===0),{setCurrentRow:d,getSelectionRows:f,getHalfSelectionRows:p,toggleRowSelection:g,clearSelection:m,clearFilter:v,toggleAllSelection:h,toggleRowExpansion:b,clearSort:y,sort:C,updateKeyChildren:S}=Bq(r),{isHidden:k,renderExpanded:x,setDragVisible:T,isGroup:E,handleMouseLeave:$,handleHeaderFooterMousewheel:M,tableSize:P,emptyBlockStyle:N,resizeProxyVisible:A,bodyWidth:q,resizeState:z,doLayout:V,tableBodyStyles:B,tableLayout:_,scrollbarViewStyle:F,scrollbarStyle:L}=Vq(n,u,r,s),{scrollBarRef:K,scrollTo:j,setScrollLeft:X,setScrollTop:Z}=zq(),Q=Al(V,50),ee=Q7(l.namespace.value),ie=s;s.tableId=ee,s.state={isGroup:E,resizeState:z,doLayout:V,debouncedUpdateLayout:Q};const ve=w(()=>n.sumText??a("el.table.sumText")),pe=w(()=>n.emptyText??a("el.table.emptyText")),re=w(()=>{var ae;return n.tooltipEffect??((ae=o.value)==null?void 0:ae.tooltipEffect)}),R=w(()=>{var ae;return n.tooltipOptions??((ae=o.value)==null?void 0:ae.tooltipOptions)}),Y=w(()=>I2(r.states.originColumns.value)[0]);return Fq(s),zt(()=>{Q.cancel()}),t({ns:l,layout:u,store:r,columns:Y,handleHeaderFooterMousewheel:M,handleMouseLeave:$,tableId:ee,tableSize:P,isHidden:k,isEmpty:c,renderExpanded:x,resizeProxyVisible:A,resizeState:z,isGroup:E,bodyWidth:q,tableBodyStyles:B,emptyBlockStyle:N,debouncedUpdateLayout:Q,setCurrentRow:d,getSelectionRows:f,getHalfSelectionRows:p,toggleRowSelection:g,clearSelection:m,clearFilter:v,toggleAllSelection:h,toggleRowExpansion:b,clearSort:y,doLayout:V,sort:C,updateKeyChildren:S,t:a,setDragVisible:T,context:ie,computedSumText:ve,computedEmptyText:pe,computedTooltipEffect:re,computedTooltipOptions:R,tableLayout:_,scrollbarViewStyle:F,scrollbarStyle:L,scrollBarRef:K,scrollTo:j,setScrollLeft:X,setScrollTop:Z,allowDragLastColumn:n.allowDragLastColumn}),(ae,le)=>(O(),H("div",{ref:"tableWrapper",class:I([{[i(l).m("fit")]:e.fit,[i(l).m("striped")]:e.stripe,[i(l).m("border")]:e.border||i(E),[i(l).m("hidden")]:i(k),[i(l).m("group")]:i(E),[i(l).m("fluid-height")]:e.maxHeight,[i(l).m("scrollable-x")]:i(u).scrollX.value,[i(l).m("scrollable-y")]:i(u).scrollY.value,[i(l).m("enable-row-hover")]:!i(r).states.isComplex.value,[i(l).m("enable-row-transition")]:(i(r).states.data.value||[]).length!==0&&(i(r).states.data.value||[]).length<100,"has-footer":e.showSummary},i(l).m(i(P)),e.className,i(l).b(),i(l).m(`layout-${i(_)}`)]),style:je(e.style),"data-prefix":i(l).namespace.value,onMouseleave:le[1]||(le[1]=(...se)=>i($)&&i($)(...se))},[W("div",{ref:"tableInnerWrapper",class:I(i(l).e("inner-wrapper"))},[W("div",Kq,[ne(ae.$slots,"default")],512),e.showHeader&&i(_)==="fixed"?ft((O(),H("div",{key:0,ref:"headerWrapper",class:I(i(l).e("header-wrapper"))},[W("table",{ref:"tableHeader",class:I(i(l).e("header")),style:je(i(B)),border:"0",cellpadding:"0",cellspacing:"0"},[U(i(hc),{columns:i(r).states.columns.value,"table-layout":i(_)},null,8,["columns","table-layout"]),U(i(s0),{ref:"tableHeaderRef",border:e.border,"default-sort":e.defaultSort,store:i(r),"append-filter-panel-to":e.appendFilterPanelTo,"allow-drag-last-column":e.allowDragLastColumn,onSetDragVisible:i(T)},null,8,["border","default-sort","store","append-filter-panel-to","allow-drag-last-column","onSetDragVisible"])],6)],2)),[[i(vy),i(M)]]):te("v-if",!0),W("div",{ref:"bodyWrapper",class:I(i(l).e("body-wrapper"))},[U(i(il),{ref_key:"scrollBarRef",ref:K,"view-style":i(F),"wrap-style":i(L),always:e.scrollbarAlwaysOn,tabindex:e.scrollbarTabindex,native:e.nativeScrollbar,onScroll:le[0]||(le[0]=se=>ae.$emit("scroll",se))},{default:J(()=>[W("table",{ref:"tableBody",class:I(i(l).e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:je({width:i(q),tableLayout:i(_)})},[U(i(hc),{columns:i(r).states.columns.value,"table-layout":i(_)},null,8,["columns","table-layout"]),e.showHeader&&i(_)==="auto"?(O(),oe(i(s0),{key:0,ref:"tableHeaderRef",class:I(i(l).e("body-header")),border:e.border,"default-sort":e.defaultSort,store:i(r),"append-filter-panel-to":e.appendFilterPanelTo,onSetDragVisible:i(T)},null,8,["class","border","default-sort","store","append-filter-panel-to","onSetDragVisible"])):te("v-if",!0),U(i(Aq),{context:i(ie),highlight:e.highlightCurrentRow,"row-class-name":e.rowClassName,"tooltip-effect":re.value,"tooltip-options":R.value,"row-style":e.rowStyle,store:i(r),stripe:e.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),e.showSummary&&i(_)==="auto"?(O(),oe(i(r0),{key:1,class:I(i(l).e("body-footer")),border:e.border,"default-sort":e.defaultSort,store:i(r),"sum-text":ve.value,"summary-method":e.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):te("v-if",!0)],6),c.value?(O(),H("div",{key:0,ref:"emptyBlock",style:je(i(N)),class:I(i(l).e("empty-block"))},[W("span",{class:I(i(l).e("empty-text"))},[ne(ae.$slots,"empty",{},()=>[it(Se(pe.value),1)])],2)],6)):te("v-if",!0),ae.$slots.append?(O(),H("div",{key:1,ref:"appendWrapper",class:I(i(l).e("append-wrapper"))},[ne(ae.$slots,"append")],2)):te("v-if",!0)]),_:3},8,["view-style","wrap-style","always","tabindex","native"])],2),e.showSummary&&i(_)==="fixed"?ft((O(),H("div",{key:1,ref:"footerWrapper",class:I(i(l).e("footer-wrapper"))},[W("table",{class:I(i(l).e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:je(i(B))},[U(i(hc),{columns:i(r).states.columns.value,"table-layout":i(_)},null,8,["columns","table-layout"]),U(i(r0),{border:e.border,"default-sort":e.defaultSort,store:i(r),"sum-text":ve.value,"summary-method":e.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[At,!c.value],[i(vy),i(M)]]):te("v-if",!0),e.border||i(E)?(O(),H("div",{key:2,class:I(i(l).e("border-left-patch"))},null,2)):te("v-if",!0)],2),ft(W("div",{ref:"resizeProxy",class:I(i(l).e("column-resize-proxy"))},null,2),[[At,i(A)]])],46,Hq))}}),jq=Wq;const qq={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},tooltipFormatter:Function,fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:e=>e.every(t=>["ascending","descending",null].includes(t))}},Yq={selection:"table-column--selection",expand:"table__expand-column"},Uq={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},Gq=e=>Yq[e]||"",Xq={selection:{renderHeader({store:e}){function t(){return e.states.data.value&&e.states.data.value.length===0}return Ge(ll,{disabled:t(),size:e.states.tableSize.value,indeterminate:e.states.selection.value.length>0&&!e.states.isAllSelected.value,"onUpdate:modelValue":e.toggleAllSelection??void 0,modelValue:e.states.isAllSelected.value,ariaLabel:e.t("el.table.selectAllLabel")})},renderCell({row:e,column:t,store:n,$index:a}){return Ge(ll,{disabled:t.selectable?!t.selectable.call(null,e,a):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",e)},onClick:l=>l.stopPropagation(),modelValue:n.isSelected(e),indeterminate:n.getRowIndeterminate(e),ariaLabel:n.t("el.table.selectRowLabel")})},sortable:!1,resizable:!1},index:{renderHeader({column:e}){return e.label||"#"},renderCell({column:e,$index:t}){let n=t+1;const a=e.index;return He(a)?n=t+a:We(a)&&(n=a(t)),Ge("div",{},[n])},sortable:!1},expand:{renderHeader({column:e}){return e.label||""},renderCell({column:e,row:t,store:n,expanded:a,$index:l}){var c,d;const{ns:o}=n,s=[o.e("expand-icon")];!e.renderExpand&&a&&s.push(o.em("expand-icon","expanded"));const r=function(f){f.stopPropagation(),n.toggleRowExpansion(t)},u=((d=(c=n.states.rowExpandable).value)==null?void 0:d.call(c,t,l))??!0;return u||s.push(o.is("disabled")),Ge("button",{type:"button",disabled:!u,"aria-label":n.t(a?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":a,class:s,onClick:r},{default:()=>e.renderExpand?[e.renderExpand({expanded:a,expandable:u})]:[Ge(Ve,null,{default:()=>[Ge(ra)]})]})},sortable:!1,resizable:!1}};function Jq({row:e,column:t,$index:n}){var o;const a=t.property,l=a&&Ro(e,a).value;return t&&t.formatter?t.formatter(e,t,l,n):((o=l==null?void 0:l.toString)==null?void 0:o.call(l))||""}function Zq({row:e,treeNode:t,store:n},a=!1){const{ns:l}=n;if(!t)return a?[Ge("span",{class:l.e("placeholder")})]:null;const o=[],s=function(r){r.stopPropagation(),!t.loading&&n.loadOrToggle(e)};if(t.indent&&o.push(Ge("span",{class:l.e("indent"),style:{"padding-left":`${t.indent}px`}})),Wt(t.expanded)&&!t.noLazyChildren){const r=[l.e("expand-icon"),t.expanded?l.em("expand-icon","expanded"):""];let u=ra;t.loading&&(u=rl),o.push(Ge("button",{type:"button","aria-label":n.t(t.expanded?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":t.expanded,class:r,onClick:s},{default:()=>[Ge(Ve,{class:l.is("loading",t.loading)},{default:()=>[Ge(u)]})]}))}else o.push(Ge("span",{class:l.e("placeholder")}));return o}function i0(e,t){return e.reduce((n,a)=>(n[a]=a,n),t)}function Qq(e,t){const n=ht();return{registerComplexWatchers:()=>{const o=["fixed"],s={realWidth:"width",realMinWidth:"minWidth"},r=i0(o,s);Object.keys(r).forEach(u=>{const c=s[u];Dt(t,c)&&fe(()=>t[c],d=>{let f=d;c==="width"&&u==="realWidth"&&(f=vm(d)),c==="minWidth"&&u==="realMinWidth"&&(f=x2(d)),n.columnConfig.value[c]=f,n.columnConfig.value[u]=f;const p=c==="fixed";e.value.store.scheduleLayout(p)})})},registerNormalWatchers:()=>{const o=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip","tooltipFormatter","resizable"],s=["showOverflowTooltip"],r={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},u=i0(o,r);Object.keys(u).forEach(d=>{const f=r[d];Dt(t,f)&&fe(()=>t[f],p=>{n.columnConfig.value[d]=p,(d==="filters"||d==="filterMethod")&&(n.columnConfig.value.filterable=!!(n.columnConfig.value.filters||n.columnConfig.value.filterMethod))})}),s.forEach(d=>{Dt(e.value.props,d)&&fe(()=>e.value.props[d],f=>{n.columnConfig.value.type!=="selection"&&Et(t[d])&&(n.columnConfig.value[d]=f)})});const c=mo("table");c.value&&Dt(c.value,"showOverflowTooltip")&&fe(()=>{var d;return(d=c.value)==null?void 0:d.showOverflowTooltip},d=>{n.columnConfig.value.type!=="selection"&&(!Et(t.showOverflowTooltip)||!Et(e.value.props.showOverflowTooltip)||(n.columnConfig.value.showOverflowTooltip=d))})}}}function eY(e,t,n){const a=ht(),l=D(""),o=D(!1),s=D(),r=D(),u=he("table");ia(()=>{s.value=e.align?`is-${e.align}`:null,s.value}),ia(()=>{r.value=e.headerAlign?`is-${e.headerAlign}`:s.value,r.value});const c=w(()=>{let S=a.vnode.vParent||a.parent;for(;S&&!S.tableId&&!S.columnId;)S=S.vnode.vParent||S.parent;return S}),d=w(()=>{const{store:S}=a.parent;if(!S)return!1;const{treeData:k}=S.states,x=k.value;return x&&Object.keys(x).length>0}),f=D(vm(e.width)),p=D(x2(e.minWidth)),g=S=>(f.value&&(S.width=f.value),p.value&&(S.minWidth=p.value),!f.value&&p.value&&(S.width=void 0),S.minWidth||(S.minWidth=80),S.realWidth=Number(Et(S.width)?S.minWidth:S.width),S),m=S=>{const k=S.type,x=Xq[k]||{};Object.keys(x).forEach(E=>{const $=x[E];E!=="className"&&!Et($)&&(S[E]=$)});const T=Gq(k);if(T){const E=`${i(u.namespace)}-${T}`;S.className=S.className?`${S.className} ${E}`:E}return S},v=S=>{me(S)?S.forEach(x=>k(x)):k(S);function k(x){var T;((T=x==null?void 0:x.type)==null?void 0:T.name)==="ElTableColumn"&&(x.vParent=a)}};return{columnId:l,realAlign:s,isSubColumn:o,realHeaderAlign:r,columnOrTableParent:c,setColumnWidth:g,setColumnForcedProps:m,setColumnRenders:S=>{e.renderHeader?Kt("TableColumn","Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header."):S.type!=="selection"&&(S.renderHeader=x=>{if(a.columnConfig.value.label,t.header){const T=t.header(x);if($2(T))return Ge(ze,T)}return it(S.label)}),t["filter-icon"]&&(S.renderFilterIcon=x=>ne(t,"filter-icon",x)),t.expand&&(S.renderExpand=x=>ne(t,"expand",x));let k=S.renderCell;return S.type==="expand"?(S.renderCell=x=>Ge("div",{class:"cell"},[k(x)]),n.value.renderExpanded=x=>t.default?t.default(x):t.default):(k=k||Jq,S.renderCell=x=>{let T=null;if(t.default){const A=t.default(x);T=A.some(q=>q.type!==Cn)?A:k(x)}else T=k(x);const{columns:E}=n.value.store.states,$=E.value.findIndex(A=>A.type==="default"),M=d.value&&x.cellIndex===$,P=Zq(x,M),N={class:"cell",style:{}};return S.showOverflowTooltip&&(N.class=`${N.class} ${i(u.namespace)}-tooltip`,N.style={width:`${(x.column.realWidth||Number(x.column.width))-1}px`}),v(T),Ge("div",N,[P,T])}),S},getPropsData:(...S)=>S.reduce((k,x)=>(me(x)&&x.forEach(T=>{k[T]=e[T]}),k),{}),getColumnElIndex:(S,k)=>Array.prototype.indexOf.call(S,k),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",a.columnConfig.value)}}}var tY=ue({name:"ElTableColumn",__name:"index",props:qq,setup(e){const t=e,n=mn(),a=ht(),l=mo("table"),o=D({}),s=w(()=>{let E=a.parent;for(;E&&!E.tableId;)E=E.parent;return E}),{registerNormalWatchers:r,registerComplexWatchers:u}=Qq(s,t),{columnId:c,isSubColumn:d,realHeaderAlign:f,columnOrTableParent:p,setColumnWidth:g,setColumnForcedProps:m,setColumnRenders:v,getPropsData:h,getColumnElIndex:b,realAlign:y,updateColumnOrder:C}=eY(t,n,s),S=p.value,k="tableId"in S?S.tableId:S.columnId;c.value=eq(k),Cd(()=>{var q,z;d.value=s.value!==S;const E=t.type||"default",$=t.sortable===""?!0:t.sortable,M=E==="selection"?!1:Et(t.showOverflowTooltip)?S.props.showOverflowTooltip??((q=l.value)==null?void 0:q.showOverflowTooltip):t.showOverflowTooltip,P=Et(t.tooltipFormatter)?S.props.tooltipFormatter??((z=l.value)==null?void 0:z.tooltipFormatter):t.tooltipFormatter,N={...Uq[E],id:c.value,type:E,property:t.prop||t.property,align:y,headerAlign:f,showOverflowTooltip:M,tooltipFormatter:P,filterable:t.filters||t.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:$,index:t.index,rawColumnKey:a.vnode.key};let A=h(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);A=aq(N,A),A=oq(v,g,m)(A),o.value=A,r(),u()}),mt(()=>{var P,N;const E=p.value,$=d.value?(P=E.vnode.el)==null?void 0:P.children:(N=E.refs.hiddenColumns)==null?void 0:N.children,M=()=>b($||[],a.vnode.el);o.value.getColumnIndex=M,M()>-1&&s.value.store.commit("insertColumn",o.value,d.value?"columnConfig"in E&&E.columnConfig.value:null,C)});let x=n.header;kd(()=>{n.header!==x&&(x=n.header,oi(o))}),zt(()=>{const E=o.value.getColumnIndex;(E?E():-1)>-1&&s.value.store.commit("removeColumn",o.value,d.value?"columnConfig"in S&&S.columnConfig.value:null,C)}),a.columnId=c.value,a.columnConfig=o;const T=()=>{var E,$;try{const M=(E=n.default)==null?void 0:E.call(n,{row:{},column:{},$index:-1}),P=[];if(me(M))for(const N of M)(($=N.type)==null?void 0:$.name)==="ElTableColumn"||N.shapeFlag&2?P.push(N):N.type===ze&&me(N.children)&&N.children.forEach(A=>{(A==null?void 0:A.patchFlag)!==1024&&!De(A==null?void 0:A.children)&&P.push(A)});return Ge("div",P)}catch{return Ge("div",[])}};return(E,$)=>(O(),oe(T))}}),nY=tY,aY=nY,P2=aY;const lY=ut(jq,{TableColumn:P2}),oY=un(P2),xv={asc:"desc",desc:"asc"},Yi=Symbol("placeholder"),R2=String,wu={type:G(Array),required:!0},ym={type:G(Array)},_2={...ym,required:!0},sY=String,u0={type:G(Array),default:()=>dn([])},ss={type:Number,required:!0},A2={type:G([String,Number,Symbol]),default:"id"},c0={type:G(Object)},cs=$e({class:String,columns:wu,columnsStyles:{type:G(Object),required:!0},depth:Number,expandColumnKey:sY,estimatedRowHeight:{...bs.estimatedRowHeight,default:void 0},isScrolling:Boolean,onRowExpand:{type:G(Function)},onRowHover:{type:G(Function)},onRowHeightChange:{type:G(Function)},rowData:{type:G(Object),required:!0},rowEventHandlers:{type:G(Object)},rowIndex:{type:Number,required:!0},rowKey:A2,style:{type:G(Object)}}),sp={type:Number,required:!0},wm=$e({class:String,columns:wu,fixedHeaderData:{type:G(Array)},headerData:{type:G(Array),required:!0},headerHeight:{type:G([Number,Array]),default:50},rowWidth:sp,rowHeight:{type:Number,default:50},height:sp,width:sp}),mc=$e({columns:wu,data:_2,fixedData:ym,estimatedRowHeight:cs.estimatedRowHeight,width:ss,height:ss,headerWidth:ss,headerHeight:wm.headerHeight,bodyWidth:ss,rowHeight:ss,cache:ek.cache,useIsScrolling:Boolean,scrollbarAlwaysOn:bs.scrollbarAlwaysOn,scrollbarStartGap:bs.scrollbarStartGap,scrollbarEndGap:bs.scrollbarEndGap,class:R2,style:c0,containerStyle:c0,getRowHeight:{type:G(Function),required:!0},rowKey:cs.rowKey,onRowsRendered:{type:G(Function)},onScroll:{type:G(Function)}}),rY=$e({cache:mc.cache,estimatedRowHeight:cs.estimatedRowHeight,rowKey:A2,headerClass:{type:G([String,Function])},headerProps:{type:G([Object,Function])},headerCellProps:{type:G([Object,Function])},headerHeight:wm.headerHeight,footerHeight:{type:Number,default:0},rowClass:{type:G([String,Function])},rowProps:{type:G([Object,Function])},rowHeight:{type:Number,default:50},cellProps:{type:G([Object,Function])},columns:wu,data:_2,dataGetter:{type:G(Function)},fixedData:ym,expandColumnKey:cs.expandColumnKey,expandedRowKeys:u0,defaultExpandedRowKeys:u0,class:R2,fixed:Boolean,style:{type:G(Object)},width:ss,height:ss,maxHeight:Number,useIsScrolling:Boolean,indentSize:{type:Number,default:12},iconSize:{type:Number,default:12},hScrollbarSize:bs.hScrollbarSize,vScrollbarSize:bs.vScrollbarSize,scrollbarAlwaysOn:ak.alwaysOn,sortBy:{type:G(Object),default:()=>({})},sortState:{type:G(Object),default:void 0},onColumnSort:{type:G(Function)},onExpandedRowsChange:{type:G(Function)},onEndReached:{type:G(Function)},onRowExpand:cs.onRowExpand,onScroll:mc.onScroll,onRowsRendered:mc.onRowsRendered,rowEventHandlers:cs.rowEventHandlers}),iY=(e,t,n)=>{const a={flexGrow:0,flexShrink:0,...n?{}:{flexGrow:e.flexGrow??0,flexShrink:e.flexShrink??1}},l={...e.style??{},...a,flexBasis:"auto",width:e.width};return t||(e.maxWidth&&(l.maxWidth=e.maxWidth),e.minWidth&&(l.minWidth=e.minWidth)),l};function uY(e,t,n){const a=w(()=>i(t).map((h,b)=>({...h,key:h.key??h.dataKey??b}))),l=w(()=>i(a).filter(h=>!h.hidden)),o=w(()=>i(l).filter(h=>h.fixed==="left"||h.fixed===!0)),s=w(()=>i(l).filter(h=>h.fixed==="right")),r=w(()=>i(l).filter(h=>!h.fixed)),u=w(()=>{const h=[];return i(o).forEach(b=>{h.push({...b,placeholderSign:Yi})}),i(r).forEach(b=>{h.push(b)}),i(s).forEach(b=>{h.push({...b,placeholderSign:Yi})}),h}),c=w(()=>i(o).length||i(s).length),d=w(()=>i(a).reduce((h,b)=>(h[b.key]=iY(b,i(n),e.fixed),h),{})),f=w(()=>i(l).reduce((h,b)=>h+b.width,0)),p=h=>i(a).find(b=>b.key===h),g=h=>i(d)[h],m=(h,b)=>{h.width=b};function v(h){var k;const{key:b}=h.currentTarget.dataset;if(!b)return;const{sortState:y,sortBy:C}=e;let S="asc";st(y)?S=xv[y[b]]:S=xv[C.order],(k=e.onColumnSort)==null||k.call(e,{column:p(b),key:b,order:S})}return{columns:a,columnsStyles:d,columnsTotalWidth:f,fixedColumnsOnLeft:o,fixedColumnsOnRight:s,hasFixedColumns:c,mainColumns:u,normalColumns:r,visibleColumns:l,getColumn:p,getColumnStyle:g,updateColumnWidth:m,onColumnSorted:v}}const cY=(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,onMaybeEndReached:l})=>{const o=D({scrollLeft:0,scrollTop:0});function s(g){var v,h,b;const{scrollTop:m}=g;(v=t.value)==null||v.scrollTo(g),(h=n.value)==null||h.scrollToTop(m),(b=a.value)==null||b.scrollToTop(m)}function r(g){o.value=g,s(g)}function u(g){o.value.scrollTop=g,s(i(o))}function c(g){var m,v;o.value.scrollLeft=g,(v=(m=t.value)==null?void 0:m.scrollTo)==null||v.call(m,i(o))}function d(g){var m;r(g),(m=e.onScroll)==null||m.call(e,g)}function f({scrollTop:g}){const{scrollTop:m}=i(o);g!==m&&u(g)}function p(g,m="auto"){var v;(v=t.value)==null||v.scrollToRow(g,m)}return fe(()=>i(o).scrollTop,(g,m)=>{g>m&&l()}),{scrollPos:o,scrollTo:r,scrollToLeft:c,scrollToTop:u,scrollToRow:p,onScroll:d,onVerticalScroll:f}},dY=(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,tableInstance:l,ns:o,isScrolling:s})=>{const r=ht(),{emit:u}=r,c=xt(!1),d=D(e.defaultExpandedRowKeys||[]),f=D(-1),p=xt(null),g=D({}),m=D({}),v=xt({}),h=xt({}),b=xt({}),y=w(()=>He(e.estimatedRowHeight));function C(M){var P;(P=e.onRowsRendered)==null||P.call(e,M),M.rowCacheEnd>i(f)&&(f.value=M.rowCacheEnd)}function S({hovered:M,rowKey:P}){s.value||l.vnode.el.querySelectorAll(`[rowkey="${String(P)}"]`).forEach(N=>{M?N.classList.add(o.is("hovered")):N.classList.remove(o.is("hovered"))})}function k({expanded:M,rowData:P,rowIndex:N,rowKey:A}){var V,B;const q=[...i(d)],z=q.indexOf(A);M?z===-1&&q.push(A):z>-1&&q.splice(z,1),d.value=q,u("update:expandedRowKeys",q),(V=e.onRowExpand)==null||V.call(e,{expanded:M,rowData:P,rowIndex:N,rowKey:A}),(B=e.onExpandedRowsChange)==null||B.call(e,q),l.vnode.el.querySelector(`.${o.is("hovered")}[rowkey="${String(A)}"]`)&&Ae(()=>S({hovered:!0,rowKey:A}))}const x=Al(()=>{var M,P,N,A;c.value=!0,g.value={...i(g),...i(m)},T(i(p),!1),m.value={},p.value=null,(M=t.value)==null||M.forceUpdate(),(P=n.value)==null||P.forceUpdate(),(N=a.value)==null||N.forceUpdate(),(A=r.proxy)==null||A.$forceUpdate(),c.value=!1},0);function T(M,P=!1){i(y)&&[t,n,a].forEach(N=>{const A=i(N);A&&A.resetAfterRowIndex(M,P)})}function E(M,P,N){const A=i(p);(A===null||A>N)&&(p.value=N),m.value[M]=P}function $({rowKey:M,height:P,rowIndex:N},A){A?A==="right"?b.value[M]=P:v.value[M]=P:h.value[M]=P;const q=Math.max(...[v,b,h].map(z=>z.value[M]||0));i(g)[M]!==q&&(E(M,q,N),x())}return{expandedRowKeys:d,lastRenderedRowIndex:f,isDynamic:y,isResetting:c,rowHeights:g,resetAfterIndex:T,onRowExpanded:k,onRowHovered:S,onRowsRendered:C,onRowHeightChange:$}},fY=(e,{expandedRowKeys:t,lastRenderedRowIndex:n,resetAfterIndex:a})=>{const l=D({}),o=w(()=>{const r={},{data:u,rowKey:c}=e,d=i(t);if(!d||!d.length)return u;const f=[],p=new Set;d.forEach(m=>p.add(m));let g=u.slice();for(g.forEach(m=>r[m[c]]=0);g.length>0;){const m=g.shift();f.push(m),p.has(m[c])&&me(m.children)&&m.children.length>0&&(g=[...m.children,...g],m.children.forEach(v=>r[v[c]]=r[m[c]]+1))}return l.value=r,f}),s=w(()=>{const{data:r,expandColumnKey:u}=e;return u?i(o):r});return fe(s,(r,u)=>{r!==u&&(n.value=-1,a(0,!0))}),{data:s,depthMap:l}},pY=(e,t)=>e+t,gc=e=>me(e)?e.reduce(pY,0):e,Os=(e,t,n={})=>We(e)?e(t):e??n,Mo=e=>(["width","maxWidth","minWidth","height"].forEach(t=>{e[t]=fn(e[t])}),e),L2=e=>Jt(e)?t=>Ge(e,t):e,vY=(e,{columnsTotalWidth:t,rowsHeight:n,fixedColumnsOnLeft:a,fixedColumnsOnRight:l})=>{const o=w(()=>{const{fixed:v,width:h,vScrollbarSize:b}=e,y=h-b;return v?Math.max(Math.round(i(t)),y):y}),s=w(()=>{const{height:v=0,maxHeight:h=0,footerHeight:b,hScrollbarSize:y}=e;if(h>0){const C=i(p),S=i(n),k=i(f)+C+S+y;return Math.min(k,h-b)}return v-b}),r=w(()=>{const{maxHeight:v}=e,h=i(s);if(He(v)&&v>0)return h;const b=i(n)+i(f)+i(p);return Math.min(h,b)}),u=v=>v.width,c=w(()=>gc(i(a).map(u))),d=w(()=>gc(i(l).map(u))),f=w(()=>gc(e.headerHeight)),p=w(()=>{var v;return(((v=e.fixedData)==null?void 0:v.length)||0)*e.rowHeight}),g=w(()=>i(s)-i(f)-i(p)),m=w(()=>{const{style:v={},height:h,width:b}=e;return Mo({...v,height:h,width:b})});return{bodyWidth:o,fixedTableHeight:r,mainTableHeight:s,leftTableWidth:c,rightTableWidth:d,windowHeight:g,footerHeight:w(()=>Mo({height:e.footerHeight})),emptyStyle:w(()=>({top:fn(i(f)),bottom:fn(e.footerHeight),width:fn(e.width)})),rootStyle:m,headerHeight:f}};function hY(e){const t=D(),n=D(),a=D(),{columns:l,columnsStyles:o,columnsTotalWidth:s,fixedColumnsOnLeft:r,fixedColumnsOnRight:u,hasFixedColumns:c,mainColumns:d,onColumnSorted:f}=uY(e,Ot(e,"columns"),Ot(e,"fixed")),{scrollTo:p,scrollToLeft:g,scrollToTop:m,scrollToRow:v,onScroll:h,onVerticalScroll:b,scrollPos:y}=cY(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,onMaybeEndReached:ae}),C=he("table-v2"),S=ht(),k=xt(!1),{expandedRowKeys:x,lastRenderedRowIndex:T,isDynamic:E,isResetting:$,rowHeights:M,resetAfterIndex:P,onRowExpanded:N,onRowHeightChange:A,onRowHovered:q,onRowsRendered:z}=dY(e,{mainTableRef:t,leftTableRef:n,rightTableRef:a,tableInstance:S,ns:C,isScrolling:k}),{data:V,depthMap:B}=fY(e,{expandedRowKeys:x,lastRenderedRowIndex:T,resetAfterIndex:P}),_=w(()=>{const{estimatedRowHeight:le,rowHeight:se}=e,de=i(V);return He(le)?Object.values(i(M)).reduce((be,we)=>be+we,0):de.length*se}),{bodyWidth:F,fixedTableHeight:L,mainTableHeight:K,leftTableWidth:j,rightTableWidth:X,windowHeight:Z,footerHeight:Q,emptyStyle:ee,rootStyle:ie,headerHeight:ve}=vY(e,{columnsTotalWidth:s,fixedColumnsOnLeft:r,fixedColumnsOnRight:u,rowsHeight:_}),pe=D(),re=w(()=>{const le=i(V).length===0;return me(e.fixedData)?e.fixedData.length===0&&le:le});function R(le){const{estimatedRowHeight:se,rowHeight:de,rowKey:be}=e;return se?i(M)[i(V)[le][be]]||se:de}const Y=D(!1);function ae(){const{onEndReached:le}=e;if(!le)return;const{scrollTop:se}=i(y),de=i(_),be=de-(se+i(Z))+e.hScrollbarSize;!Y.value&&i(T)>=0&&de<=se+i(K)-i(ve)?(Y.value=!0,le(be)):Y.value=!1}return fe(()=>i(_),()=>Y.value=!1),fe(()=>e.expandedRowKeys,le=>x.value=le,{deep:!0}),{columns:l,containerRef:pe,mainTableRef:t,leftTableRef:n,rightTableRef:a,isDynamic:E,isResetting:$,isScrolling:k,hasFixedColumns:c,columnsStyles:o,columnsTotalWidth:s,data:V,expandedRowKeys:x,depthMap:B,fixedColumnsOnLeft:r,fixedColumnsOnRight:u,mainColumns:d,bodyWidth:F,emptyStyle:ee,rootStyle:ie,footerHeight:Q,mainTableHeight:K,fixedTableHeight:L,leftTableWidth:j,rightTableWidth:X,showEmpty:re,getRowHeight:R,onColumnSorted:f,onRowHovered:q,onRowExpanded:N,onRowsRendered:z,onRowHeightChange:A,scrollTo:p,scrollToLeft:g,scrollToTop:m,scrollToRow:v,onScroll:h,onVerticalScroll:b}}const Sm=Symbol("tableV2"),D2="tableV2GridScrollLeft",mY=ue({name:"ElTableV2Header",props:wm,setup(e,{slots:t,expose:n}){const a=he("table-v2"),l=Fe(D2),o=D(),s=w(()=>Mo({width:e.width,height:e.height})),r=w(()=>Mo({width:e.rowWidth,height:e.height})),u=w(()=>Ln(i(e.headerHeight))),c=p=>{const g=i(o);Ae(()=>{g!=null&&g.scroll&&g.scroll({left:p})})},d=()=>{const p=a.e("fixed-header-row"),{columns:g,fixedHeaderData:m,rowHeight:v}=e;return m==null?void 0:m.map((h,b)=>{var C;const y=Mo({height:v,width:"100%"});return(C=t.fixed)==null?void 0:C.call(t,{class:p,columns:g,rowData:h,rowIndex:-(b+1),style:y})})},f=()=>{const p=a.e("dynamic-header-row"),{columns:g}=e;return i(u).map((m,v)=>{var b;const h=Mo({width:"100%",height:m});return(b=t.dynamic)==null?void 0:b.call(t,{class:p,columns:g,headerIndex:v,style:h})})};return Kl(()=>{l!=null&&l.value&&c(l.value)}),n({scrollToLeft:c}),()=>{if(!(e.height<=0))return U("div",{ref:o,class:e.class,style:i(s),role:"rowgroup"},[U("div",{style:i(r),class:a.e("header")},[f(),d()])])}}}),gY="ElTableV2Grid",bY=e=>{const t=D(),n=D(),a=D(0),l=w(()=>{const{data:h,rowHeight:b,estimatedRowHeight:y}=e;if(!y)return h.length*b}),o=w(()=>{const{fixedData:h,rowHeight:b}=e;return((h==null?void 0:h.length)||0)*b}),s=w(()=>gc(e.headerHeight)),r=w(()=>{const{height:h}=e;return Math.max(0,h-i(s)-i(o))}),u=w(()=>i(s)+i(o)>0),c=({data:h,rowIndex:b})=>h[b][e.rowKey];function d({rowCacheStart:h,rowCacheEnd:b,rowVisibleStart:y,rowVisibleEnd:C}){var S;(S=e.onRowsRendered)==null||S.call(e,{rowCacheStart:h,rowCacheEnd:b,rowVisibleStart:y,rowVisibleEnd:C})}function f(h,b){var y;(y=n.value)==null||y.resetAfterRowIndex(h,b)}function p(h,b){const y=i(t),C=i(n);st(h)?(y==null||y.scrollToLeft(h.scrollLeft),a.value=h.scrollLeft,C==null||C.scrollTo(h)):(y==null||y.scrollToLeft(h),a.value=h,C==null||C.scrollTo({scrollLeft:h,scrollTop:b}))}function g(h){var b;(b=i(n))==null||b.scrollTo({scrollTop:h})}function m(h,b){const y=i(n);if(!y)return;const C=a.value;y.scrollToItem(h,0,b),C&&p({scrollLeft:C})}function v(){var h,b;(h=i(n))==null||h.$forceUpdate(),(b=i(t))==null||b.$forceUpdate()}return fe(()=>e.bodyWidth,()=>{var h;He(e.estimatedRowHeight)&&((h=n.value)==null||h.resetAfter({columnIndex:0},!1))}),{bodyRef:n,forceUpdate:v,fixedRowHeight:o,gridHeight:r,hasHeader:u,headerHeight:s,headerRef:t,totalHeight:l,itemKey:c,onItemRendered:d,resetAfterRowIndex:f,scrollTo:p,scrollToTop:g,scrollToRow:m,scrollLeft:a}},Cm=ue({name:gY,props:mc,setup(e,{slots:t,expose:n}){const{ns:a}=Fe(Sm),{bodyRef:l,fixedRowHeight:o,gridHeight:s,hasHeader:r,headerRef:u,headerHeight:c,totalHeight:d,forceUpdate:f,itemKey:p,onItemRendered:g,resetAfterRowIndex:m,scrollTo:v,scrollToTop:h,scrollToRow:b,scrollLeft:y}=bY(e);Tt(D2,y),Zi(async()=>{var k;await Ae();const S=(k=l.value)==null?void 0:k.states.scrollTop;S&&h(Math.round(S)+1)}),n({forceUpdate:f,totalHeight:d,scrollTo:v,scrollToTop:h,scrollToRow:b,resetAfterRowIndex:m});const C=()=>e.bodyWidth;return()=>{const{cache:S,columns:k,data:x,fixedData:T,useIsScrolling:E,scrollbarAlwaysOn:$,scrollbarEndGap:M,scrollbarStartGap:P,style:N,rowHeight:A,bodyWidth:q,estimatedRowHeight:z,headerWidth:V,height:B,width:_,getRowHeight:F,onScroll:L}=e,K=He(z),j=K?zV:DV,X=i(c);return U("div",{role:"table",class:[a.e("table"),e.class],style:N},[U(j,{ref:l,data:x,useIsScrolling:E,itemKey:p,columnCache:0,columnWidth:K?C:q,totalColumn:1,totalRow:x.length,rowCache:S,rowHeight:K?F:A,width:_,height:i(s),class:a.e("body"),role:"rowgroup",scrollbarStartGap:P,scrollbarEndGap:M,scrollbarAlwaysOn:$,onScroll:L,onItemRendered:g,perfMode:!1},{default:Z=>{var ee;const Q=x[Z.rowIndex];return(ee=t.row)==null?void 0:ee.call(t,{...Z,columns:k,rowData:Q})}}),i(r)&&U(mY,{ref:u,class:a.e("header-wrapper"),columns:k,headerData:x,headerHeight:e.headerHeight,fixedHeaderData:T,rowWidth:V,rowHeight:A,width:_,height:Math.min(X+i(o),B)},{dynamic:t.header,fixed:t.row})])}}});function yY(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const wY=(e,{slots:t})=>{const{mainTableRef:n,...a}=e;return U(Cm,pt({ref:n},a),yY(t)?t:{default:()=>[t]})};function SY(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const CY=(e,{slots:t})=>{if(!e.columns.length)return;const{leftTableRef:n,...a}=e;return U(Cm,pt({ref:n},a),SY(t)?t:{default:()=>[t]})};function kY(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const xY=(e,{slots:t})=>{if(!e.columns.length)return;const{rightTableRef:n,...a}=e;return U(Cm,pt({ref:n},a),kY(t)?t:{default:()=>[t]})},EY=e=>{const{isScrolling:t}=Fe(Sm),n=D(!1),a=D(),l=w(()=>He(e.estimatedRowHeight)&&e.rowIndex>=0),o=(u=!1)=>{const c=i(a);if(!c)return;const{columns:d,onRowHeightChange:f,rowKey:p,rowIndex:g,style:m}=e,{height:v}=c.getBoundingClientRect();n.value=!0,Ae(()=>{if(u||v!==Number.parseInt(m.height)){const h=d[0],b=(h==null?void 0:h.placeholderSign)===Yi;f==null||f({rowKey:p,height:v,rowIndex:g},h&&!b&&h.fixed)}})},s=w(()=>{const{rowData:u,rowIndex:c,rowKey:d,onRowHover:f}=e,p=e.rowEventHandlers||{},g={};return Object.entries(p).forEach(([m,v])=>{We(v)&&(g[m]=h=>{v({event:h,rowData:u,rowIndex:c,rowKey:d})})}),f&&[{name:"onMouseleave",hovered:!1},{name:"onMouseenter",hovered:!0}].forEach(({name:m,hovered:v})=>{const h=g[m];g[m]=b=>{f({event:b,hovered:v,rowData:u,rowIndex:c,rowKey:d}),h==null||h(b)}}),g}),r=u=>{const{onRowExpand:c,rowData:d,rowIndex:f,rowKey:p}=e;c==null||c({expanded:u,rowData:d,rowIndex:f,rowKey:p})};return mt(()=>{i(l)&&o(!0)}),{isScrolling:t,measurable:l,measured:n,rowRef:a,eventHandlers:s,onExpand:r}},TY=ue({name:"ElTableV2TableRow",props:cs,setup(e,{expose:t,slots:n,attrs:a}){const{eventHandlers:l,isScrolling:o,measurable:s,measured:r,rowRef:u,onExpand:c}=EY(e);return t({onExpand:c}),()=>{const{columns:d,columnsStyles:f,expandColumnKey:p,depth:g,rowData:m,rowIndex:v,style:h}=e;let b=d.map((y,C)=>{const S=me(m.children)&&m.children.length>0&&y.key===p;return n.cell({column:y,columns:d,columnIndex:C,depth:g,style:f[y.key],rowData:m,rowIndex:v,isScrolling:i(o),expandIconProps:S?{rowData:m,rowIndex:v,onExpand:c}:void 0})});if(n.row&&(b=n.row({cells:b.map(y=>me(y)&&y.length===1?y[0]:y),style:h,columns:d,depth:g,rowData:m,rowIndex:v,isScrolling:i(o)})),i(s)){const{height:y,...C}=h||{},S=i(r);return U("div",pt({ref:u,class:e.class,style:S?h:C,role:"row"},a,i(l)),[b])}return U("div",pt(a,{ref:u,class:e.class,style:h,role:"row"},i(l)),[b])}}});function $Y(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const OY=(e,{slots:t})=>{const{columns:n,columnsStyles:a,depthMap:l,expandColumnKey:o,expandedRowKeys:s,estimatedRowHeight:r,hasFixedColumns:u,rowData:c,rowIndex:d,style:f,isScrolling:p,rowProps:g,rowClass:m,rowKey:v,rowEventHandlers:h,ns:b,onRowHovered:y,onRowExpanded:C}=e,S=Os(m,{columns:n,rowData:c,rowIndex:d},""),k=Os(g,{columns:n,rowData:c,rowIndex:d}),x=c[v],T=l[x]||0,E=!!o,$=d<0,M=[b.e("row"),S,b.is("expanded",E&&s.includes(x)),b.is("fixed",!T&&$),b.is("customized",!!t.row),{[b.e(`row-depth-${T}`)]:E&&d>=0}],P=u?y:void 0,N={...k,columns:n,columnsStyles:a,class:M,depth:T,expandColumnKey:o,estimatedRowHeight:$?void 0:r,isScrolling:p,rowIndex:d,rowData:c,rowKey:x,rowEventHandlers:h,style:f};return U(TY,pt(N,{onRowExpand:C,onMouseenter:z=>{P==null||P({hovered:!0,rowKey:x,event:z,rowData:c,rowIndex:d})},onMouseleave:z=>{P==null||P({hovered:!1,rowKey:x,event:z,rowData:c,rowIndex:d})},rowkey:x}),$Y(t)?t:{default:()=>[t]})},km=(e,{slots:t})=>{var s;const{cellData:n,style:a}=e,l=((s=n==null?void 0:n.toString)==null?void 0:s.call(n))||"",o=ne(t,"default",e,()=>[l]);return U("div",{class:e.class,title:l,style:a},[o])};km.displayName="ElTableV2Cell";km.inheritAttrs=!1;const B2=e=>{const{expanded:t,expandable:n,onExpand:a,style:l,size:o,ariaLabel:s}=e,r={onClick:n?()=>a(!t):void 0,ariaLabel:s,ariaExpanded:t,class:e.class};return U("button",pt(r,{type:"button"}),[U(Ve,{size:o,style:l},{default:()=>[U(ra,null,null)]})])};B2.inheritAttrs=!1;const Ev=({columns:e,column:t,columnIndex:n,depth:a,expandIconProps:l,isScrolling:o,rowData:s,rowIndex:r,style:u,expandedRowKeys:c,ns:d,t:f,cellProps:p,expandColumnKey:g,indentSize:m,iconSize:v,rowKey:h},{slots:b})=>{const y=Mo(u);if(t.placeholderSign===Yi)return U("div",{class:d.em("row-cell","placeholder"),style:y},null);const{cellRenderer:C,dataKey:S,dataGetter:k}=t,x=We(k)?k({columns:e,column:t,columnIndex:n,rowData:s,rowIndex:r}):Sn(s,S??""),T=Os(p,{cellData:x,columns:e,column:t,columnIndex:n,rowIndex:r,rowData:s}),E={class:d.e("cell-text"),columns:e,column:t,columnIndex:n,cellData:x,isScrolling:o,rowData:s,rowIndex:r},$=L2(C),M=$?$(E):ne(b,"default",E,()=>[U(km,E,null)]),P=[d.e("row-cell"),t.class,t.align==="center"&&d.is("align-center"),t.align==="right"&&d.is("align-right")],N=r>=0&&g&&t.key===g,A=r>=0&&c.includes(s[h]);let q;const z=`margin-inline-start: ${a*m}px;`;return N&&(st(l)?q=U(B2,pt(l,{class:[d.e("expand-icon"),d.is("expanded",A)],size:v,expanded:A,ariaLabel:f(A?"el.table.collapseRowLabel":"el.table.expandRowLabel"),style:z,expandable:!0}),null):q=U("div",{style:[z,`width: ${v}px; height: ${v}px;`].join(" ")},null)),U("div",pt({class:P,style:y},T,{role:"cell"}),[q,M])};Ev.inheritAttrs=!1;const NY=$e({class:String,columns:wu,columnsStyles:{type:G(Object),required:!0},headerIndex:Number,style:{type:G(Object)}}),MY=ue({name:"ElTableV2HeaderRow",props:NY,setup(e,{slots:t}){return()=>{const{columns:n,columnsStyles:a,headerIndex:l,style:o}=e;let s=n.map((r,u)=>t.cell({columns:n,column:r,columnIndex:u,headerIndex:l,style:a[r.key]}));return t.header&&(s=t.header({cells:s.map(r=>me(r)&&r.length===1?r[0]:r),columns:n,headerIndex:l})),U("div",{class:e.class,style:o,role:"row"},[s])}}});function IY(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const PY=({columns:e,columnsStyles:t,headerIndex:n,style:a,headerClass:l,headerProps:o,ns:s},{slots:r})=>{const u={columns:e,headerIndex:n},c=[s.e("header-row"),Os(l,u,""),s.is("customized",!!r.header)],d={...Os(o,u),columnsStyles:t,class:c,columns:e,headerIndex:n,style:a};return U(MY,d,IY(r)?r:{default:()=>[r]})},xm=(e,{slots:t})=>ne(t,"default",e,()=>{var n,a;return[U("div",{class:e.class,title:(n=e.column)==null?void 0:n.title},[(a=e.column)==null?void 0:a.title])]});xm.displayName="ElTableV2HeaderCell";xm.inheritAttrs=!1;const RY=e=>{const{sortOrder:t}=e;return U("button",{type:"button","aria-label":e.ariaLabel,class:e.class},[U(Ve,{size:14},{default:()=>[U(t==="asc"?L_:__,null,null)]})])},d0=(e,{slots:t})=>{const{column:n,ns:a,t:l,style:o,onColumnSorted:s}=e,r=Mo(o);if(n.placeholderSign===Yi)return U("div",{class:a.em("header-row-cell","placeholder"),style:r},null);const{headerCellRenderer:u,headerClass:c,sortable:d}=n,f={...e,class:a.e("header-cell-text")},p=L2(u),g=p?p(f):ne(t,"default",f,()=>[U(xm,f,null)]),{sortBy:m,sortState:v,headerCellProps:h}=e;let b,y,C;if(v){const x=v[n.key];b=!!xv[x],y=b?x:"asc"}else b=n.key===m.key,y=b?m.order:"asc";y==="asc"?C="ascending":y==="desc"?C="descending":C=void 0;const S=[a.e("header-cell"),Os(c,e,""),n.align==="center"&&a.is("align-center"),n.align==="right"&&a.is("align-right"),d&&a.is("sortable")],k={...Os(h,e),onClick:n.sortable?s:void 0,ariaSort:d?C:void 0,class:S,style:r,"data-key":n.key};return U("div",pt(k,{role:"columnheader"}),[g,d&&U(RY,{class:[a.e("sort-icon"),b&&a.is("sorting")],sortOrder:y,ariaLabel:l("el.table.sortLabel",{column:n.title||""})},null)])},V2=(e,{slots:t})=>{var n;return U("div",{class:e.class,style:e.style},[(n=t.default)==null?void 0:n.call(t)])};V2.displayName="ElTableV2Footer";const F2=(e,{slots:t})=>{const n=ne(t,"default",{},()=>[U(d2,null,null)]);return U("div",{class:e.class,style:e.style},[n])};F2.displayName="ElTableV2Empty";const z2=(e,{slots:t})=>{var n;return U("div",{class:e.class,style:e.style},[(n=t.default)==null?void 0:n.call(t)])};z2.displayName="ElTableV2Overlay";function Wr(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Jt(e)}const _Y=ue({name:"ElTableV2",props:rY,slots:Object,setup(e,{slots:t,expose:n}){const a=he("table-v2"),{t:l}=St(),{columnsStyles:o,fixedColumnsOnLeft:s,fixedColumnsOnRight:r,mainColumns:u,mainTableHeight:c,fixedTableHeight:d,leftTableWidth:f,rightTableWidth:p,data:g,depthMap:m,expandedRowKeys:v,hasFixedColumns:h,mainTableRef:b,leftTableRef:y,rightTableRef:C,isDynamic:S,isResetting:k,isScrolling:x,bodyWidth:T,emptyStyle:E,rootStyle:$,footerHeight:M,showEmpty:P,scrollTo:N,scrollToLeft:A,scrollToTop:q,scrollToRow:z,getRowHeight:V,onColumnSorted:B,onRowHeightChange:_,onRowHovered:F,onRowExpanded:L,onRowsRendered:K,onScroll:j,onVerticalScroll:X}=hY(e);return n({scrollTo:N,scrollToLeft:A,scrollToTop:q,scrollToRow:z}),Tt(Sm,{ns:a,isResetting:k,isScrolling:x}),()=>{const{cache:Z,cellProps:Q,estimatedRowHeight:ee,expandColumnKey:ie,fixedData:ve,headerHeight:pe,headerClass:re,headerProps:R,headerCellProps:Y,sortBy:ae,sortState:le,rowHeight:se,rowClass:de,rowEventHandlers:be,rowKey:we,rowProps:Oe,scrollbarAlwaysOn:Ce,indentSize:Ie,iconSize:ge,useIsScrolling:ke,vScrollbarSize:Le,width:qe}=e,lt=i(g),nt={cache:Z,class:a.e("main"),columns:i(u),data:lt,fixedData:ve,estimatedRowHeight:ee,bodyWidth:i(T),headerHeight:pe,headerWidth:i(T),height:i(c),mainTableRef:b,rowKey:we,rowHeight:se,scrollbarAlwaysOn:Ce,scrollbarStartGap:2,scrollbarEndGap:Le,useIsScrolling:ke,width:qe,getRowHeight:V,onRowsRendered:K,onScroll:j},Ze=i(f),kt=i(d),Pt={cache:Z,class:a.e("left"),columns:i(s),data:lt,fixedData:ve,estimatedRowHeight:ee,leftTableRef:y,rowHeight:se,bodyWidth:Ze,headerWidth:Ze,headerHeight:pe,height:kt,rowKey:we,scrollbarAlwaysOn:Ce,scrollbarStartGap:2,scrollbarEndGap:Le,useIsScrolling:ke,width:Ze,getRowHeight:V,onScroll:X},Lt=i(p),Rt={cache:Z,class:a.e("right"),columns:i(r),data:lt,fixedData:ve,estimatedRowHeight:ee,rightTableRef:C,rowHeight:se,bodyWidth:Lt,headerWidth:Lt,headerHeight:pe,height:kt,rowKey:we,scrollbarAlwaysOn:Ce,scrollbarStartGap:2,scrollbarEndGap:Le,width:Lt,style:`${a.cssVarName("table-scrollbar-size")}: ${Le}px`,useIsScrolling:ke,getRowHeight:V,onScroll:X},jt=i(o),Yt={ns:a,depthMap:i(m),columnsStyles:jt,expandColumnKey:ie,expandedRowKeys:i(v),estimatedRowHeight:ee,hasFixedColumns:i(h),rowProps:Oe,rowClass:de,rowKey:we,rowEventHandlers:be,onRowHovered:F,onRowExpanded:L,onRowHeightChange:_},Ee={cellProps:Q,expandColumnKey:ie,indentSize:Ie,iconSize:ge,rowKey:we,expandedRowKeys:i(v),ns:a,t:l},xe={ns:a,headerClass:re,headerProps:R,columnsStyles:jt},Ke={ns:a,t:l,sortBy:ae,sortState:le,headerCellProps:Y,onColumnSorted:B},Xe={row:Pe=>U(OY,pt(Pe,Yt),{row:t.row,cell:Ue=>{let at;return t.cell?U(Ev,pt(Ue,Ee,{style:jt[Ue.column.key]}),Wr(at=t.cell(Ue))?at:{default:()=>[at]}):U(Ev,pt(Ue,Ee,{style:jt[Ue.column.key]}),null)}}),header:Pe=>U(PY,pt(Pe,xe),{header:t.header,cell:Ue=>{let at;return t["header-cell"]?U(d0,pt(Ue,Ke,{style:jt[Ue.column.key]}),Wr(at=t["header-cell"](Ue))?at:{default:()=>[at]}):U(d0,pt(Ue,Ke,{style:jt[Ue.column.key]}),null)}})},Vt=[e.class,a.b(),a.e("root"),a.is("dynamic",i(S))],ce={class:a.e("footer"),style:i(M)};return U("div",{class:Vt,style:i($)},[U(wY,nt,Wr(Xe)?Xe:{default:()=>[Xe]}),U(CY,Pt,Wr(Xe)?Xe:{default:()=>[Xe]}),U(xY,Rt,Wr(Xe)?Xe:{default:()=>[Xe]}),t.footer&&U(V2,ce,{default:t.footer}),i(P)&&U(F2,{class:a.e("empty"),style:i(E)},{default:t.empty}),t.overlay&&U(z2,{class:a.e("overlay")},{default:t.overlay})])}}}),AY=$e({disableWidth:Boolean,disableHeight:Boolean,onResize:{type:G(Function)}}),LY=e=>{const t=D(),n=D(0),a=D(0);let l;return mt(()=>{l=on(t,([o])=>{const{width:s,height:r}=o.contentRect,{paddingLeft:u,paddingRight:c,paddingTop:d,paddingBottom:f}=getComputedStyle(o.target),p=Number.parseInt(u)||0,g=Number.parseInt(c)||0,m=Number.parseInt(d)||0,v=Number.parseInt(f)||0;n.value=s-p-g,a.value=r-m-v}).stop}),zt(()=>{l==null||l()}),fe([n,a],([o,s])=>{var r;(r=e.onResize)==null||r.call(e,{width:o,height:s})}),{sizer:t,width:n,height:a}},DY=ue({name:"ElAutoResizer",props:AY,setup(e,{slots:t}){const n=he("auto-resizer"),{height:a,width:l,sizer:o}=LY(e),s={width:"100%",height:"100%"};return()=>{var r;return U("div",{ref:o,class:n.b(),style:s},[(r=t.default)==null?void 0:r.call(t,{height:a.value,width:l.value})])}}}),BY=ut(_Y),VY=ut(DY),pf=Symbol("tabsRootContextKey"),FY=$e({tabs:{type:G(Array),default:()=>dn([])},tabRefs:{type:G(Object),default:()=>dn({})}}),f0="ElTabBar";var zY=ue({name:f0,__name:"tab-bar",props:FY,setup(e,{expose:t}){const n=e,a=Fe(pf);a||rn(f0,"");const l=he("tabs"),o=D(),s=D(),r=D(!1),u=w(()=>r.value?s.value:{...s.value,transition:"none"}),c=w(()=>{var v;return Et(a.props.defaultValue)||!!((v=s.value)!=null&&v.transform)}),d=()=>{let v=0,h=0;const b=["top","bottom"].includes(a.props.tabPosition)?"width":"height",y=b==="width"?"x":"y",C=y==="x"?"left":"top";return n.tabs.every(S=>{if(Et(S.paneName))return!1;const k=n.tabRefs[S.paneName];if(!k)return!1;if(!S.active)return!0;v=k[`offset${_f(C)}`],h=k[`client${_f(b)}`];const x=window.getComputedStyle(k);return b==="width"&&(h-=Number.parseFloat(x.paddingLeft)+Number.parseFloat(x.paddingRight),v+=Number.parseFloat(x.paddingLeft)),!1}),{[b]:`${h}px`,transform:`translate${_f(y)}(${v}px)`}},f=()=>{s.value=d(),r.value||Kn(()=>Kn(()=>{r.value=!0}))},p=[],g=()=>{p.forEach(v=>v.stop()),p.length=0,Object.values(n.tabRefs).forEach(v=>{p.push(on(v,f))})};fe(()=>n.tabs,async()=>{await Ae(),f(),g()},{immediate:!0});const m=on(o,()=>f());return zt(()=>{p.forEach(v=>v.stop()),p.length=0,m.stop()}),t({ref:o,update:f}),(v,h)=>(O(),H("div",{ref_key:"barRef",ref:o,class:I([i(l).e("active-bar"),i(l).is(i(a).props.tabPosition),i(l).is("hidden",!c.value)]),style:je(u.value)},null,6))}}),HY=zY;const KY=5,WY=({scrollable:e,navOffset:t,navSize:n,navContainerSize:a,isHorizontal:l})=>{const o=D(!1),s=w(()=>Math.max(n.value-a.value,0));let r,u;const c=p=>{if(!e.value||p.touches.length!==1)return;const{clientX:g,clientY:m}=ed(p);r={startX:g,startY:m,startOffset:t.value},u=void 0},d=p=>{if(!r||!e.value)return;if(p.touches.length!==1){f();return}const{clientX:g,clientY:m}=ed(p),v=r.startX-g,h=r.startY-m,b=l.value?v:h,y=l.value?h:v,C=Math.abs(b),S=Math.abs(y);if(qw(u)){if(Math.max(C,S)<=KY)return;u=C>S}if(!u)return;const k=ya(r.startOffset+b,0,s.value);s.value<=0||k===t.value||!p.cancelable||(p.preventDefault(),o.value=!0,t.value=k)},f=()=>{r=void 0,u=void 0,o.value=!1};return{isTouchScrolling:o,handleTouchStart:c,handleTouchMove:d,handleTouchEnd:f}},jY=$e({panes:{type:G(Array),default:()=>dn([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean,tabindex:{type:[String,Number],default:void 0}}),qY={tabClick:(e,t,n)=>n instanceof Event,tabRemove:(e,t)=>t instanceof Event},p0="ElTabNav",YY=ue({name:p0,props:jY,emits:qY,setup(e,{expose:t,emit:n}){const a=Fe(pf);a||rn(p0,"");const l=he("tabs"),o=oR(),s=iR(),r=D(),u=D(),c=D(),d=D({}),f=D(),p=D(!1),g=D(0),m=D(!1),v=D(!0),h=D(!1),b=xt(),y=w(()=>["top","bottom"].includes(a.props.tabPosition)),C=w(()=>y.value?"width":"height"),S=w(()=>{const ee=C.value==="width"?"X":"Y";return{transition:h.value||A.value?"none":void 0,transform:`translate${ee}(-${g.value}px)`}}),{width:k,height:x}=Pi(r),{width:T,height:E}=Pi(u,{width:0,height:0},{box:"border-box"}),$=w(()=>y.value?k.value:x.value),M=w(()=>y.value?T.value:E.value),{onWheel:P}=ok({atStartEdge:w(()=>g.value<=0),atEndEdge:w(()=>M.value-g.value<=$.value),layout:w(()=>y.value?"horizontal":"vertical")},ee=>{g.value=ya(g.value+ee,0,M.value-$.value)}),N=ee=>{h.value=!0,P(ee),Kn(()=>{h.value=!1})},{isTouchScrolling:A,handleTouchStart:q,handleTouchMove:z,handleTouchEnd:V}=WY({scrollable:p,navOffset:g,navSize:M,navContainerSize:$,isHorizontal:y}),B=()=>{if(!r.value)return;const ee=r.value.getBoundingClientRect()[C.value],ie=g.value;if(!ie)return;const ve=ie>ee?ie-ee:0;g.value=ve},_=()=>{if(!r.value||!u.value)return;const ee=u.value.getBoundingClientRect()[C.value],ie=r.value.getBoundingClientRect()[C.value],ve=g.value;if(!Ml(ee-ve,ie))return;const pe=ee-ve>ie*2?ve+ie:ee-ie;g.value=pe},F=async()=>{const ee=u.value;if(!p.value||!c.value||!r.value||!ee)return;await Ae();const ie=d.value[e.currentName];if(!ie)return;const ve=r.value,pe=ie.getBoundingClientRect(),re=ve.getBoundingClientRect(),R=re.left+1,Y=re.right-1,ae=ee.getBoundingClientRect(),le=y.value?ae.width-re.width:ae.height-re.height,se=g.value;let de=se;y.value?(pe.leftY&&(de=se+pe.right-Y)):(pe.topre.bottom&&(de=se+(pe.bottom-re.bottom))),de=Math.max(de,0),g.value=Math.min(de,le)},L=()=>{var pe;if(!u.value||!r.value)return;e.stretch&&((pe=f.value)==null||pe.update());const ee=u.value.getBoundingClientRect()[C.value],ie=r.value.getBoundingClientRect()[C.value],ve=g.value;ie0&&(g.value=0))},K=ee=>{const ie=Gt(ee);let ve=0;switch(ie){case ye.left:case ye.up:ve=-1;break;case ye.right:case ye.down:ve=1;break;default:return}const pe=Array.from(ee.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let re=pe.indexOf(ee.target)+ve;re<0?re=pe.length-1:re>=pe.length&&(re=0),pe[re].focus({preventScroll:!0}),pe[re].click(),j()},j=()=>{v.value&&(m.value=!0)},X=()=>m.value=!1,Z=(ee,ie)=>{d.value[ie]=ee},Q=async()=>{var ee;await Ae(),(ee=d.value[e.currentName])==null||ee.focus({preventScroll:!0})};return fe(o,ee=>{ee==="hidden"?v.value=!1:ee==="visible"&&setTimeout(()=>v.value=!0,50)}),fe(s,ee=>{ee?setTimeout(()=>v.value=!0,50):v.value=!1}),on(c,()=>{Kn(L)}),mt(()=>setTimeout(()=>F(),0)),Kl(()=>L()),t({scrollToActiveTab:F,removeFocus:X,focusActiveTab:Q,tabListRef:u,tabBarRef:f,scheduleRender:()=>oi(b)}),()=>{const ee=p.value?[U("span",{class:[l.e("nav-prev"),l.is("disabled",!p.value.prev)],onClick:B},[U(Ve,null,{default:()=>[U(ro,null,null)]})]),U("span",{class:[l.e("nav-next"),l.is("disabled",!p.value.next)],onClick:_},[U(Ve,null,{default:()=>[U(ra,null,null)]})])]:null,ie=e.panes.map((ve,pe)=>{var be,we;const re=ve.uid,R=ve.props.disabled,Y=ve.props.name??ve.index??`${pe}`,ae=!R&&(ve.isClosable||ve.props.closable!==!1&&e.editable);ve.index=`${pe}`;const le=ae?U(Ve,{class:"is-icon-close",onClick:Oe=>n("tabRemove",ve,Oe)},{default:()=>[U(Ya,null,null)]}):null,se=((we=(be=ve.slots).label)==null?void 0:we.call(be))||ve.props.label,de=!R&&ve.active?e.tabindex??a.props.tabindex:-1;return U("div",{ref:Oe=>Z(Oe,Y),class:[l.e("item"),l.is(a.props.tabPosition),l.is("active",ve.active),l.is("disabled",R),l.is("closable",ae),l.is("focus",m.value)],id:`tab-${Y}`,key:`tab-${re}`,"aria-controls":`pane-${Y}`,role:"tab","aria-selected":ve.active,tabindex:de,onFocus:()=>j(),onBlur:()=>X(),onClick:Oe=>{X(),n("tabClick",ve,Y,Oe)},onKeydown:Oe=>{const Ce=Gt(Oe);ae&&(Ce===ye.delete||Ce===ye.backspace)&&n("tabRemove",ve,Oe)}},[se,le])});return b.value,U("div",{ref:c,class:[l.e("nav-wrap"),l.is("scrollable",!!p.value),l.is(a.props.tabPosition)]},[ee,U("div",{class:l.e("nav-scroll"),ref:r},[e.panes.length>0?U("div",{class:[l.e("nav"),l.is(a.props.tabPosition),l.is("stretch",e.stretch&&["top","bottom"].includes(a.props.tabPosition))],ref:u,style:S.value,role:"tablist",onKeydown:K,onWheel:N,onTouchstart:q,onTouchmove:z,onTouchend:V,onTouchcancel:V},[e.type?null:U(HY,{ref:f,tabs:[...e.panes],tabRefs:d.value},null),ie]):null])])}}}),UY=$e({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},defaultValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:G(Function),default:()=>!0},stretch:Boolean,tabindex:{type:[String,Number],default:0}}),rp=e=>De(e)||He(e),GY={[rt]:e=>rp(e),tabClick:(e,t)=>t instanceof Event,tabChange:e=>rp(e),edit:(e,t)=>["remove","add"].includes(t),tabRemove:e=>rp(e),tabAdd:()=>!0},XY=ue({name:"ElTabs",props:UY,emits:GY,setup(e,{emit:t,slots:n,expose:a}){const l=he("tabs"),o=w(()=>["left","right"].includes(e.tabPosition)),{children:s,addChild:r,removeChild:u,ChildrenSorter:c}=Jd(ht(),"ElTabPane"),d=D(),f=D((Et(e.modelValue)?e.defaultValue:e.modelValue)??"0"),p=async(y,C=!1)=>{var S,k,x,T;if(!(f.value===y||Et(y)))try{let E;if(e.beforeLeave){const $=e.beforeLeave(y,f.value);E=$ instanceof Promise?await $:$}else E=!0;if(E!==!1){const $=(S=s.value.find(M=>M.paneName===f.value))==null?void 0:S.isFocusInsidePane();f.value=y,C&&(t(rt,y),t("tabChange",y)),(x=(k=d.value)==null?void 0:k.removeFocus)==null||x.call(k),$&&((T=d.value)==null||T.focusActiveTab())}}catch{}},g=(y,C,S)=>{y.props.disabled||(t("tabClick",y,S),p(C,!0))},m=(y,C)=>{y.props.disabled||Et(y.props.name)||(C.stopPropagation(),t("edit",y.props.name,"remove"),t("tabRemove",y.props.name))},v=()=>{t("edit",void 0,"add"),t("tabAdd")},h=y=>{const C=Gt(y);[ye.enter,ye.numpadEnter].includes(C)&&v()},b=y=>{const C=y.el.firstChild,S=["bottom","right"].includes(e.tabPosition)?y.children[0].el:y.children[1].el;C!==S&&C.before(S)};return fe(()=>e.modelValue,y=>p(y)),fe(f,async()=>{var y;await Ae(),(y=d.value)==null||y.scrollToActiveTab()}),Tt(pf,{props:e,currentName:f,registerPane:r,unregisterPane:u,nav$:d}),a({currentName:f,get tabNavRef(){return _s(d.value,["scheduleRender"])}}),()=>{const y=n["add-icon"],C=e.editable||e.addable?U("div",{class:[l.e("new-tab"),o.value&&l.e("new-tab-vertical")],tabindex:e.tabindex,onClick:v,onKeydown:h},[y?ne(n,"add-icon"):U(Ve,{class:l.is("icon-plus")},{default:()=>[U(US,null,null)]})]):null,S=()=>U(YY,{ref:d,currentName:f.value,editable:e.editable,type:e.type,panes:s.value,stretch:e.stretch,onTabClick:g,onTabRemove:m},null),k=U("div",{class:[l.e("header"),o.value&&l.e("header-vertical"),l.is(e.tabPosition)]},[U(c,null,{default:S,$stable:!0}),C]),x=U("div",{class:l.e("content")},[ne(n,"default")]);return U("div",{class:[l.b(),l.m(e.tabPosition),{[l.m("card")]:e.type==="card",[l.m("border-card")]:e.type==="border-card"}],onVnodeMounted:b,onVnodeUpdated:b},[x,k])}}}),JY=$e({label:{type:String,default:""},name:{type:[String,Number]},closable:{type:Boolean,default:void 0},disabled:Boolean,lazy:Boolean}),ZY=["id","aria-hidden","aria-labelledby"],v0="ElTabPane";var QY=ue({name:v0,__name:"tab-pane",props:JY,setup(e){const t=e,n=ht(),a=mn(),l=Fe(pf);l||rn(v0,"usage: ");const o=he("tab-pane"),s=D(),r=D(),u=w(()=>t.closable??l.props.closable),c=w(()=>l.currentName.value===(t.name??r.value)),d=D(c.value),f=w(()=>t.name??r.value),p=w(()=>!t.lazy||d.value||c.value),g=()=>{var v;return(v=s.value)==null?void 0:v.contains(document.activeElement)};fe(c,v=>{v&&(d.value=!0)});const m=Ft({uid:n.uid,getVnode:()=>n.vnode,slots:a,props:t,paneName:f,active:c,index:r,isClosable:u,isFocusInsidePane:g});return l.registerPane(m),zt(()=>{l.unregisterPane(m)}),kd(()=>{var v;a.label&&((v=l.nav$.value)==null||v.scheduleRender())}),(v,h)=>p.value?ft((O(),H("div",{key:0,id:`pane-${f.value}`,ref_key:"paneRef",ref:s,class:I(i(o).b()),role:"tabpanel","aria-hidden":!c.value,"aria-labelledby":`tab-${f.value}`},[ne(v.$slots,"default")],10,ZY)),[[At,c.value]]):te("v-if",!0)}}),H2=QY;const eU=ut(XY,{TabPane:H2}),tU=un(H2),nU=$e({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:ul,default:""},truncated:Boolean,lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}});var aU=ue({name:"ElText",__name:"text",props:nU,setup(e,{expose:t}){const n=e,a=D(),l=$n(),o=he("text"),s=w(()=>[o.b(),o.m(n.type),o.m(l.value),o.is("truncated",n.truncated),o.is("line-clamp",!Et(n.lineClamp))]),{width:r,height:u}=Pi(a),c=D(!1);let d;const f=()=>{d&&Ra(d),d=Kn(()=>{var p,g,m,v;if(d=void 0,c.value=!1,n.truncated){const h=(p=a.value)==null?void 0:p.offsetWidth,b=(g=a.value)==null?void 0:g.scrollWidth;h&&b&&b>h&&(c.value=!0)}else if(!Et(n.lineClamp)){const h=(m=a.value)==null?void 0:m.offsetHeight,b=(v=a.value)==null?void 0:v.scrollHeight;h&&b&&b>h&&(c.value=!0)}})};return fe(()=>[r.value,u.value,n.truncated,n.lineClamp],f,{flush:"post"}),$r(a,f,{attributes:!0,attributeFilter:["class","style"],subtree:!0,childList:!0,characterData:!0}),mt(f),zt(()=>{d&&Ra(d)}),t({isTruncated:c}),(p,g)=>{var m;return O(),oe(dt(e.tag),{ref_key:"textRef",ref:a,class:I(s.value),title:p.$attrs.title??(c.value?(m=a.value)==null?void 0:m.textContent:void 0),style:je({"-webkit-line-clamp":e.lineClamp})},{default:J(()=>[ne(p.$slots,"default")]),_:3},8,["class","title","style"])}}}),lU=aU;const Em=ut(lU),K2="09:00",W2="18:00",j2="00:30",oU=$e({format:{type:String,default:"HH:mm"},modelValue:{type:G(String)},disabled:{type:Boolean,default:void 0},editable:{type:Boolean,default:!0},effect:{type:G(String),default:"light"},clearable:{type:Boolean,default:!0},size:Pn,placeholder:String,start:{type:String,default:K2},end:{type:String,default:W2},step:{type:String,default:j2},minTime:{type:G(String)},maxTime:{type:G(String)},includeEndTime:Boolean,name:String,prefixIcon:{type:G([String,Object]),default:()=>YS},clearIcon:{type:G([String,Object]),default:()=>ql},popperClass:{type:G([String,Array,Object,Boolean]),default:""},popperStyle:{type:G([String,Array,Object,Boolean]),default:void 0},...As}),ys=e=>{const t=(e||"").split(":");if(t.length>=2){let n=Number.parseInt(t[0],10);const a=Number.parseInt(t[1],10);if(Number.isNaN(n)||Number.isNaN(a))return null;const l=e.toUpperCase();return l.includes("AM")&&n===12?n=0:l.includes("PM")&&n!==12&&(n+=12),{hours:n,minutes:a}}return null},sU=e=>!!e&&e.hours>=0&&e.minutes>=0&&!Number.isNaN(e.hours)&&!Number.isNaN(e.minutes),ip=(e,t)=>{const n=ys(e);if(!n)return-1;const a=ys(t);if(!a)return-1;const l=n.minutes+n.hours*60,o=a.minutes+a.hours*60;return l===o?0:l>o?1:-1},h0=e=>`${e}`.padStart(2,"0"),bc=e=>`${h0(e.hours)}:${h0(e.minutes)}`,rU=(e,t)=>{const n=ys(e);if(!n)return"";const a=ys(t);if(!a)return"";const l={hours:n.hours,minutes:n.minutes};return l.minutes+=a.minutes,l.hours+=a.hours,l.hours+=Math.floor(l.minutes/60),l.minutes=l.minutes%60,bc(l)};var iU=ue({name:"ElTimeSelect",__name:"time-select",props:oU,emits:[yt,"blur","focus","clear",rt],setup(e,{expose:t}){tt.extend(Gh);const{Option:n}=Ko,a=e,l=he("input"),o=D(),s=sn(),{lang:r}=St(),u=(y,C,S,k=!0)=>{const x=ys(y);return!sU(x)||!k&&x.hours===0&&x.minutes===0?(Kt("ElTimeSelect",`invalid ${C}, fallback to default ${C} (${S}).`),S):bc(x)},c=w(()=>a.modelValue),d=w(()=>u(a.start,"start",K2)),f=w(()=>u(a.end,"end",W2)),p=w(()=>{const y=ys(a.minTime||"");return y?bc(y):null}),g=w(()=>{const y=ys(a.maxTime||"");return y?bc(y):null}),m=w(()=>u(a.step,"step",j2,!1)),v=w(()=>{var k;const y=[],C=(x,T)=>{y.push({value:x,rawValue:T,disabled:ip(T,p.value||"-1:-1")<=0||ip(T,g.value||"100:100")>=0})};let S=d.value;for(;ip(S,f.value)<=0;)C(tt(S,"HH:mm").locale(r.value).format(a.format),S),S=rU(S,m.value);return a.includeEndTime&&((k=y[y.length-1])==null?void 0:k.rawValue)!==f.value&&C(tt(f.value,"HH:mm").locale(r.value).format(a.format),f.value),y});return t({blur:()=>{var y,C;(C=(y=o.value)==null?void 0:y.blur)==null||C.call(y)},focus:()=>{var y,C;(C=(y=o.value)==null?void 0:y.focus)==null||C.call(y)}}),(y,C)=>(O(),oe(i(Ko),{ref_key:"select",ref:o,name:e.name,"model-value":c.value,disabled:i(s),clearable:e.clearable,"clear-icon":e.clearIcon,size:e.size,effect:e.effect,placeholder:e.placeholder,"default-first-option":"",filterable:e.editable,"empty-values":e.emptyValues,"value-on-clear":e.valueOnClear,"popper-class":e.popperClass,"popper-style":e.popperStyle,"onUpdate:modelValue":C[0]||(C[0]=S=>y.$emit(i("update:modelValue"),S)),onChange:C[1]||(C[1]=S=>y.$emit(i("change"),S)),onBlur:C[2]||(C[2]=S=>y.$emit("blur",S)),onFocus:C[3]||(C[3]=S=>y.$emit("focus",S)),onClear:C[4]||(C[4]=()=>y.$emit("clear"))},{prefix:J(()=>[e.prefixIcon?(O(),oe(i(Ve),{key:0,class:I(i(l).e("prefix-icon"))},{default:J(()=>[(O(),oe(dt(e.prefixIcon)))]),_:1},8,["class"])):te("v-if",!0)]),default:J(()=>[(O(!0),H(ze,null,bt(v.value,S=>(O(),oe(i(n),{key:S.value,label:S.value,value:S.value,disabled:S.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["name","model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable","empty-values","value-on-clear","popper-class","popper-style"]))}}),uU=iU;const cU=ut(uU),q2="timeline",dU=$e({mode:{type:String,values:["start","alternate","alternate-reverse","end"],default:"start"},reverse:Boolean}),fU=ue({name:"ElTimeline",props:dU,setup(e,{slots:t}){const n=he("timeline");Tt(q2,{props:e,slots:t});const a=w(()=>[n.b(),n.is(e.mode)]);return()=>{var o;const l=$a(((o=t.default)==null?void 0:o.call(t))??[]);return Ge("ul",{class:a.value},e.reverse?l.reverse():l)}}}),pU=$e({timestamp:{type:String,default:""},hideTimestamp:Boolean,center:Boolean,placement:{type:String,values:["top","bottom"],default:"bottom"},type:{type:String,values:["primary","success","warning","danger","info"],default:""},color:{type:String,default:""},size:{type:String,values:["normal","large"],default:"normal"},icon:{type:Ut},hollow:Boolean});var vU=ue({name:"ElTimelineItem",__name:"timeline-item",props:pU,setup(e){const t=e,{props:n}=Fe(q2),a=he("timeline-item"),l=w(()=>[a.e("node"),a.em("node",t.size||""),a.em("node",t.type||""),a.is("hollow",t.hollow)]),o=w(()=>[a.b(),{[a.e("center")]:t.center},a.is(n.mode)]);return(s,r)=>(O(),H("li",{class:I(o.value)},[W("div",{class:I(i(a).e("tail"))},null,2),s.$slots.dot?te("v-if",!0):(O(),H("div",{key:0,class:I(l.value),style:je({backgroundColor:e.color})},[e.icon?(O(),oe(i(Ve),{key:0,class:I(i(a).e("icon"))},{default:J(()=>[(O(),oe(dt(e.icon)))]),_:1},8,["class"])):te("v-if",!0)],6)),s.$slots.dot?(O(),H("div",{key:1,class:I(i(a).e("dot"))},[ne(s.$slots,"dot")],2)):te("v-if",!0),W("div",{class:I(i(a).e("wrapper"))},[!e.hideTimestamp&&e.placement==="top"?(O(),H("div",{key:0,class:I([i(a).e("timestamp"),i(a).is("top")])},Se(e.timestamp),3)):te("v-if",!0),W("div",{class:I(i(a).e("content"))},[ne(s.$slots,"default")],2),!e.hideTimestamp&&e.placement==="bottom"?(O(),H("div",{key:1,class:I([i(a).e("timestamp"),i(a).is("bottom")])},Se(e.timestamp),3)):te("v-if",!0)],2)],2))}}),Y2=vU;const hU=ut(fU,{TimelineItem:Y2}),mU=un(Y2),U2="left-check-change",G2="right-check-change",xo=$e({data:{type:G(Array),default:()=>[]},titles:{type:G(Array),default:()=>[]},buttonTexts:{type:G(Array),default:()=>[]},filterPlaceholder:String,filterMethod:{type:G(Function)},leftDefaultChecked:{type:G(Array),default:()=>[]},rightDefaultChecked:{type:G(Array),default:()=>[]},renderContent:{type:G(Function)},modelValue:{type:G(Array),default:()=>[]},format:{type:G(Object),default:()=>({})},filterable:Boolean,props:{type:G(Object),default:()=>dn({label:"label",key:"key",disabled:"disabled"})},targetOrder:{type:String,values:["original","push","unshift"],default:"original"},validateEvent:{type:Boolean,default:!0},virtualScroll:Boolean,itemSize:{type:Number,default:30}}),Tv=(e,t)=>[e,t].every(me)||me(e)&&vn(t),gU={[yt]:(e,t,n)=>[e,n].every(me)&&["left","right"].includes(t),[rt]:e=>me(e),[U2]:Tv,[G2]:Tv},Su=e=>{const t={label:"label",key:"key",disabled:"disabled"};return w(()=>({...t,...e.props}))},bU=(e,t)=>({onSourceCheckedChange:(l,o)=>{e.leftChecked=l,o&&t(U2,l,o)},onTargetCheckedChange:(l,o)=>{e.rightChecked=l,o&&t(G2,l,o)}}),yU=e=>{const t=Su(e),n=w(()=>e.data.reduce((a,l)=>(a[l[t.value.key]]=l,a),{}));return{sourceData:w(()=>e.data.filter(a=>!e.modelValue.includes(a[t.value.key]))),targetData:w(()=>e.targetOrder==="original"?e.data.filter(a=>e.modelValue.includes(a[t.value.key])):e.modelValue.reduce((a,l)=>{const o=n.value[l];return o&&a.push(o),a},[]))}},wU=(e,t,n)=>{const a=Su(e),l=(r,u,c)=>{n(rt,r),n(yt,r,u,c)};return{addToLeft:()=>{const r=e.modelValue.slice();t.rightChecked.forEach(u=>{const c=r.indexOf(u);c>-1&&r.splice(c,1)}),l(r,"left",t.rightChecked)},addToRight:()=>{let r=e.modelValue.slice();const u=e.data.filter(c=>{const d=c[a.value.key];return t.leftChecked.includes(d)&&!e.modelValue.includes(d)}).map(c=>c[a.value.key]);r=e.targetOrder==="unshift"?u.concat(r):r.concat(u),e.targetOrder==="original"&&(r=e.data.filter(c=>r.includes(c[a.value.key])).map(c=>c[a.value.key])),l(r,"right",t.leftChecked)}}},$v="checked-change",SU=$e({data:xo.data,optionRender:{type:G(Function)},placeholder:String,title:String,filterable:Boolean,format:xo.format,filterMethod:xo.filterMethod,defaultChecked:xo.leftDefaultChecked,props:xo.props,virtualScroll:xo.virtualScroll,itemSize:xo.itemSize}),CU={[$v]:Tv},kU=(e,t,n)=>{const a=Su(e),l=w(()=>e.data.filter(g=>We(e.filterMethod)?e.filterMethod(t.query,g):String(g[a.value.label]||g[a.value.key]).toLowerCase().includes(t.query.toLowerCase()))),o=w(()=>l.value.filter(g=>!g[a.value.disabled])),s=w(()=>{const g=t.checked.length,m=e.data.length,{noChecked:v,hasChecked:h}=e.format;return v&&h?g>0?h.replace(/\${checked}/g,g.toString()).replace(/\${total}/g,m.toString()):v.replace(/\${total}/g,m.toString()):`${g}/${m}`}),r=w(()=>{const g=t.checked.length;return g>0&&g{const g=o.value.map(m=>m[a.value.key]);t.allChecked=g.length>0&&g.every(m=>t.checked.includes(m))},c=g=>{t.checked=g?o.value.map(m=>m[a.value.key]):[]},d=D(),{height:f}=Pi(w(()=>{var g;return(g=d.value)==null?void 0:g.$el})),p=D();return fe(()=>t.checked,(g,m)=>{if(u(),t.checkChangeByUser){const v=g.concat(m).filter(h=>!g.includes(h)||!m.includes(h));n($v,g,v)}else n($v,g),t.checkChangeByUser=!0}),fe(o,()=>{u()}),fe(()=>e.data,()=>{const g=[],m=l.value.map(v=>v[a.value.key]);t.checked.forEach(v=>{m.includes(v)&&g.push(v)}),t.checkChangeByUser=!1,t.checked=g}),fe(()=>e.defaultChecked,(g,m)=>{if(m&&g.length===m.length&&g.every(b=>m.includes(b)))return;const v=[],h=o.value.map(b=>b[a.value.key]);g.forEach(b=>{h.includes(b)&&v.push(b)}),t.checkChangeByUser=!1,t.checked=v},{immediate:!0}),fe(()=>t.query,()=>{var g;e.virtualScroll&&((g=p.value)==null||g.scrollToItem(0))},{flush:"post"}),{filteredData:l,checkableData:o,checkedSummary:s,virtualListRef:p,isIndeterminate:r,checkboxGroupRef:d,virtualListHeight:f,updateAllChecked:u,handleAllCheckedChange:c}};var xU=ue({name:"ElTransferPanel",__name:"transfer-panel",props:SU,emits:CU,setup(e,{expose:t,emit:n}){const a=e,l=n,o=mn(),s=({option:T})=>T,{t:r}=St(),u=he("transfer"),c=Ft({checked:[],allChecked:!1,query:"",checkChangeByUser:!0}),d=Su(a),{filteredData:f,checkedSummary:p,virtualListRef:g,isIndeterminate:m,checkboxGroupRef:v,virtualListHeight:h,handleAllCheckedChange:b}=kU(a,c,l),y=w(()=>!pa(c.query)&&pa(f.value)),C=w(()=>!pa(o.default()[0].children)),{checked:S,allChecked:k,query:x}=Vn(c);return t({query:x}),(T,E)=>(O(),H("div",{class:I(i(u).b("panel"))},[W("p",{class:I(i(u).be("panel","header"))},[U(i(ll),{modelValue:i(k),"onUpdate:modelValue":E[0]||(E[0]=$=>Qt(k)?k.value=$:null),indeterminate:i(m),"validate-event":!1,onChange:i(b)},{default:J(()=>[W("span",{class:I(i(u).be("panel","header-title"))},Se(e.title),3),W("span",{class:I(i(u).be("panel","header-count"))},Se(i(p)),3)]),_:1},8,["modelValue","indeterminate","onChange"])],2),W("div",{class:I([i(u).be("panel","body"),i(u).is("with-footer",C.value)])},[e.filterable?(O(),oe(i(Yn),{key:0,modelValue:i(x),"onUpdate:modelValue":E[1]||(E[1]=$=>Qt(x)?x.value=$:null),class:I(i(u).be("panel","filter")),size:"default",placeholder:e.placeholder,"prefix-icon":i(P_),clearable:"","validate-event":!1},null,8,["modelValue","class","placeholder","prefix-icon"])):te("v-if",!0),ft(U(i(tm),{ref_key:"checkboxGroupRef",ref:v,modelValue:i(S),"onUpdate:modelValue":E[2]||(E[2]=$=>Qt(S)?S.value=$:null),"validate-event":!1,class:I([i(u).is("filterable",e.filterable),i(u).be("panel","list")])},{default:J(()=>[e.virtualScroll?(O(),oe(i(bu),{key:1,ref_key:"virtualListRef",ref:g,data:i(f),total:i(f).length,"item-size":e.itemSize,height:i(h)},{default:J(({data:$,index:M,style:P})=>[(O(),H("div",{key:$[M][i(d).key],style:je(P)},[U(i(ll),{class:I(i(u).be("panel","item")),value:$[M][i(d).key],disabled:$[M][i(d).disabled],"validate-event":!1},{default:J(()=>{var N;return[U(s,{option:(N=e.optionRender)==null?void 0:N.call(e,$[M])},null,8,["option"])]}),_:2},1032,["class","value","disabled"])],4))]),_:1},8,["data","total","item-size","height"])):(O(!0),H(ze,{key:0},bt(i(f),$=>(O(),oe(i(ll),{key:$[i(d).key],class:I(i(u).be("panel","item")),value:$[i(d).key],disabled:$[i(d).disabled],"validate-event":!1},{default:J(()=>{var M;return[U(s,{option:(M=e.optionRender)==null?void 0:M.call(e,$)},null,8,["option"])]}),_:2},1032,["class","value","disabled"]))),128))]),_:1},8,["modelValue","class"]),[[At,!y.value&&!i(pa)(e.data)]]),ft(W("div",{class:I(i(u).be("panel","empty"))},[ne(T.$slots,"empty",{},()=>[it(Se(y.value?i(r)("el.transfer.noMatch"):i(r)("el.transfer.noData")),1)])],2),[[At,y.value||i(pa)(e.data)]])],2),C.value?(O(),H("p",{key:0,class:I(i(u).be("panel","footer"))},[ne(T.$slots,"default")],2)):te("v-if",!0)],2))}}),m0=xU;const EU={key:0},TU={key:0};var $U=ue({name:"ElTransfer",__name:"transfer",props:xo,emits:gU,setup(e,{expose:t,emit:n}){const a=e,l=n,o=mn(),{t:s}=St(),r=he("transfer"),{formItem:u}=Hn(),c=Ft({leftChecked:[],rightChecked:[]}),d=Su(a),{sourceData:f,targetData:p}=yU(a),{onSourceCheckedChange:g,onTargetCheckedChange:m}=bU(c,l),{addToLeft:v,addToRight:h}=wU(a,c,l),b=D(),y=D(),C=$=>{switch($){case"left":b.value.query="";break;case"right":y.value.query=""}},S=w(()=>a.buttonTexts.length===2),k=w(()=>a.titles[0]||s("el.transfer.titles.0")),x=w(()=>a.titles[1]||s("el.transfer.titles.1")),T=w(()=>a.filterPlaceholder||s("el.transfer.filterPlaceholder"));fe(()=>a.modelValue,()=>{var $;a.validateEvent&&(($=u==null?void 0:u.validate)==null||$.call(u,"change").catch(vt))});const E=w(()=>$=>{var P;if(a.renderContent)return a.renderContent(Ge,$);const M=(((P=o.default)==null?void 0:P.call(o,{option:$}))||[]).filter(N=>N.type!==Cn);return M.length?M:Ge("span",$[d.value.label]||$[d.value.key])});return t({clearQuery:C,leftPanel:b,rightPanel:y}),($,M)=>(O(),H("div",{class:I(i(r).b())},[U(m0,{ref_key:"leftPanel",ref:b,data:i(f),"option-render":E.value,placeholder:T.value,title:k.value,filterable:e.filterable,format:e.format,"filter-method":e.filterMethod,"default-checked":e.leftDefaultChecked,props:a.props,"virtual-scroll":e.virtualScroll,"item-size":e.itemSize,onCheckedChange:i(g)},{empty:J(()=>[ne($.$slots,"left-empty")]),default:J(()=>[ne($.$slots,"left-footer")]),_:3},8,["data","option-render","placeholder","title","filterable","format","filter-method","default-checked","props","virtual-scroll","item-size","onCheckedChange"]),W("div",{class:I(i(r).e("buttons"))},[U(i(Bn),{type:"primary",class:I([i(r).e("button"),i(r).is("with-texts",S.value)]),disabled:i(pa)(c.rightChecked),onClick:i(v)},{default:J(()=>[U(i(Ve),null,{default:J(()=>[U(i(ro))]),_:1}),i(Et)(e.buttonTexts[0])?te("v-if",!0):(O(),H("span",EU,Se(e.buttonTexts[0]),1))]),_:1},8,["class","disabled","onClick"]),U(i(Bn),{type:"primary",class:I([i(r).e("button"),i(r).is("with-texts",S.value)]),disabled:i(pa)(c.leftChecked),onClick:i(h)},{default:J(()=>[i(Et)(e.buttonTexts[1])?te("v-if",!0):(O(),H("span",TU,Se(e.buttonTexts[1]),1)),U(i(Ve),null,{default:J(()=>[U(i(ra))]),_:1})]),_:1},8,["class","disabled","onClick"])],2),U(m0,{ref_key:"rightPanel",ref:y,data:i(p),"option-render":E.value,placeholder:T.value,filterable:e.filterable,format:e.format,"filter-method":e.filterMethod,title:x.value,"default-checked":e.rightDefaultChecked,props:a.props,"virtual-scroll":e.virtualScroll,"item-size":e.itemSize,onCheckedChange:i(m)},{empty:J(()=>[ne($.$slots,"right-empty")]),default:J(()=>[ne($.$slots,"right-footer")]),_:3},8,["data","option-render","placeholder","filterable","format","filter-method","title","default-checked","props","virtual-scroll","item-size","onCheckedChange"])],2))}}),OU=$U;const NU=ut(OU),Tm="RootTree",X2="NodeInstance",g0="TreeNodeMap",J2=$e({data:{type:G(Array),default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkOnClickLeaf:{type:Boolean,default:!0},checkDescendants:Boolean,autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:{type:Array},defaultExpandedKeys:{type:Array},currentNodeKey:{type:[String,Number]},renderContent:{type:G(Function)},showCheckbox:Boolean,draggable:Boolean,allowDrag:{type:G(Function)},allowDrop:{type:G(Function)},props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:Boolean,highlightCurrent:Boolean,load:{type:Function},filterNodeMethod:{type:Function},accordion:Boolean,indent:{type:Number,default:18},icon:{type:Ut}}),MU={"check-change":(e,t,n)=>e&&Wt(t)&&Wt(n),"current-change":(e,t)=>!0,"node-click":(e,t,n,a)=>e&&t&&a instanceof Event,"node-contextmenu":(e,t,n,a)=>e instanceof Event&&t&&n,"node-collapse":(e,t,n)=>e&&t,"node-expand":(e,t,n)=>e&&t,check:(e,t)=>e&&t,"node-drag-start":(e,t)=>e&&t,"node-drag-end":(e,t,n,a)=>e&&a,"node-drop":(e,t,n,a)=>e&&t&&a,"node-drag-leave":(e,t,n)=>e&&t&&n,"node-drag-enter":(e,t,n)=>e&&t&&n,"node-drag-over":(e,t,n)=>e&&t&&n},Z2="$treeNodeId",b0=function(e,t){!t||t.$treeNodeId||Object.defineProperty(t,Z2,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},$m=(e,t)=>t==null?void 0:t[e||"$treeNodeId"],Ov=(e,t,n)=>{const a=e.value.currentNode;n();const l=e.value.currentNode;a!==l&&t("current-change",l?l.data:null,l)},Q2=e=>{let t=!0,n=!0,a=!0,l=!0;for(let o=0,s=e.length;o{n.canFocus=t,Nv(n.childNodes,t)})};let IU=0;var Mv=class yc{constructor(t){this.isLeafByUser=void 0,this.isLeaf=void 0,this.isEffectivelyChecked=!1,this.id=IU++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const n in t)Dt(t,n)&&(this[n]=t[n]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){var o;const t=this.store;if(!t)throw new Error("[Node]store is required!");t.registerNode(this);const n=t.props;if(n&&typeof n.isLeaf<"u"){const s=ju(this,"isLeaf");Wt(s)&&(this.isLeafByUser=s)}if(t.lazy!==!0&&this.data?(this.setData(this.data),t.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&t.lazy&&t.defaultExpandAll&&!this.isLeafByUser&&this.expand(),me(this.data)||b0(this,this.data),!this.data)return;const a=t.defaultExpandedKeys,l=t.key;l&&!vn(this.key)&&a&&a.includes(this.key)&&this.expand(null,t.autoExpandParent),l&&t.currentNodeKey!==void 0&&this.key===t.currentNodeKey&&(t.currentNode&&(t.currentNode.isCurrent=!1),t.currentNode=this,t.currentNode.isCurrent=!0),t.lazy&&t._initDefaultCheckedNode(this),this.updateLeafState(),(this.level===1||((o=this.parent)==null?void 0:o.expanded)===!0)&&(this.canFocus=!0)}setData(t){me(t)||b0(this,t),this.data=t,this.childNodes=[];let n;this.level===0&&me(this.data)?n=this.data:n=ju(this,"children")||[];for(let a=0,l=n.length;a