bkui-vue 0.0.2-beta.23 → 0.0.2-beta.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -63,7 +63,7 @@ ${yo(n)}`),i}})}function Ap(e){const t=Object.keys(e),n=t.filter(s=>{var o;retur
63
63
  m 0 ${w?"":"-"}${T}
64
64
  a ${T} ${T} 0 1 1 0 ${w?"-":""}${T*2}
65
65
  a ${T} ${T} 0 1 1 0 ${w?"":"-"}${T*2}
66
- `,O={d:x,stroke:m||"#f5f5f5","stroke-linecap":f,"stroke-width":C,"fill-opacity":"0",class:"process-circle-trail",style:L},E={d:x,stroke:u||"#13ce66","stroke-linecap":f,"stroke-width":o>0&&C||0,"fill-opacity":"0",class:`process-circle-path ${i(`${d}-circle-trail`)}`,style:J};return a.createVNode("div",{class:"progress-outer-circle",style:v},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",O,null),a.createVNode("path",E,null)]),a.createVNode("span",{class:"progress-circle-text",style:p},[n==null?void 0:n.default()])])},kb=(e,{attrs:t,slots:n})=>{const{resolveClassName:i}=ye(),{percent:s,strokeWidth:o,size:c,color:u,titleStyle:f,showText:d,textInside:h,theme:m}=t,p={height:`${o}px`,lineHeight:`${o}px`},C={width:`${s}%`,background:u,animationDuration:"3s"},b=(v=!0)=>(d||n.default)&&(v&&h||!v&&!h)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{class:`${i(`progress-${c||"normal"}`)} progress-bar`,style:p},[a.createVNode("div",{style:C,class:{"progress-inner":!0,[`${i(`${m}`)}`]:!0}},[a.createVNode("div",{class:"inner-text",style:f},[b()])])]),b(!1)])};function e3(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const xb={extCls:y.string,type:_p(),percent:y.number.def(0),theme:y.theme().def(bo.PRIMARY),size:y.size(),width:y.number.def(126),strokeWidth:y.number,strokeLinecap:Jp(),textInside:y.bool.def(!1),showText:y.bool.def(!0),color:y.string,bgColor:y.string,fixed:y.number.validate(e=>e>=0&&e<=20).def(0),format:y.func.def(e=>`${e}%`),titleStyle:y.object.def({fontSize:"16px",verticalAlign:"middle"})},Is=Ye(a.defineComponent({name:"Progress",props:xb,setup(){const{resolveClassName:e}=ye();return{resolveClassName:e}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var u;const{showText:e,format:t,percent:n,textInside:i,titleStyle:s,fixed:o}=this.$props,c=t((u=this.validPercent(n))==null?void 0:u.toFixed(o));return(e||this.$slots.default)&&i?this.$slots.default?this.$slots.default():a.createVNode("span",null,[c]):!e||i?null:a.createVNode("span",{class:"progress-text",style:typeof c=="string"?s:void 0},[this.$slots.default?this.$slots.default():c])}},render(){const e=this.renderProcessInfo(),t={...this.$props,percent:this.validPercent(this.percent)};let n=a.createVNode(kb,t,e3(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(Sb,t,e3(e)?e:{default:()=>[e]}));const i={class:Pe({extCls:!!this.extCls},`${this.resolveClassName("progress")} ${this.resolveClassName(`progress-${this.type}`)}`)};return a.createVNode("div",i,[n])}})),t3=Symbol("RadioGroup");function n3(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const i3=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,i=a.inject(t3,J0),s=!_0(i),o=a.ref(!1),c=a.computed(()=>s&&i.props.disabled?!0:t.disabled);s?a.watch(()=>i.props.modelValue,d=>{o.value=d===t.label},{immediate:!0}):a.watch(()=>t.modelValue,d=>{d!==""&&(o.value=d===t.label)},{immediate:!0});const u=(d=!0)=>{o.value=d},f=d=>{if(c.value)return;const h=d.target;o.value=h.checked;const m=o.value?t.label:"";n("update:modelValue",m),n("change",m),s&&i.handleChange(e.proxy),a.nextTick(()=>{h.checked!==o.value&&(h.checked=o.value)})};return a.onMounted(()=>{s&&i.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&i.unregister(e.proxy)}),{isChecked:o,isDisabled:c,setChecked:u,handleChange:f}},Db={name:y.string.def(""),label:y.oneOfType([String,Number,Boolean]).isRequired,modelValue:y.oneOfType([String,Number,Boolean]).def(""),checked:y.bool.def(!1),disabled:y.bool.def(!1)},jb=a.defineComponent({name:"Radio",props:Db,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=n3(),{isChecked:i,isDisabled:s,setChecked:o,handleChange:c}=i3(),{resolveClassName:u}=ye();return{isFocused:e,isChecked:i,isDisabled:s,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c,resolveClassName:u}},render(){const e=Pe({[`${this.resolveClassName("radio")}`]:!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("span",{class:`${this.resolveClassName("radio-label")}`},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:`${this.resolveClassName("radio-input")}`,type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),t()])}}),Ob={name:y.string.def(""),label:y.oneOfType([String,Number,Boolean]).isRequired,modelValue:y.oneOfType([String,Number,Boolean]).def(""),checked:y.bool.def(!1),disabled:y.bool.def(!1),size:y.size()},Eb=a.defineComponent({name:"RadioButton",props:Ob,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=n3(),{isChecked:i,isDisabled:s,setChecked:o,handleChange:c}=i3(),{resolveClassName:u}=ye();return{isFocused:e,isChecked:i,isDisabled:s,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c,resolveClassName:u}},render(){const e=Pe({[`${this.resolveClassName("radio-button")}`]:!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("div",{class:`${this.resolveClassName("radio-button-label")}`},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:`${this.resolveClassName("radio-button-input")}`,type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),t()])}}),Ab={name:y.string.def(""),modelValue:y.oneOfType([String,Number,Boolean]),disabled:y.bool,withValidate:y.bool.def(!0),type:y.oneOf(["tab","capsule","card"]).def("tab")},a3=Ft(jb,{Group:a.defineComponent({name:"RadioGroup",props:Ab,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(e,t){const n=Fn(),i=[],s=f=>{i.push(f)},o=f=>{const d=i.indexOf(f);d>-1&&i.splice(d,1)},c=f=>{const d=f.label;i.forEach(h=>{h!==f&&h.setChecked(!1)}),t.emit("update:modelValue",d),t.emit("change",d)};a.provide(t3,{props:e,register:s,unregister:o,handleChange:c}),a.watch(()=>e.modelValue,()=>{var f;e.withValidate&&((f=n==null?void 0:n.validate)==null||f.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&i.forEach(f=>{f.setChecked(f.label===e.modelValue)})});const{resolveClassName:u}=ye();return{resolveClassName:u}},render(){var e;return a.createVNode("div",{class:[`${this.resolveClassName("radio-group")}`,`${this.resolveClassName(`radio-${this.type}`)}`]},[(e=this.$slots)==null?void 0:e.default()])}}),Button:Eb}),hl=a.defineComponent({name:"Star",props:{rate:y.number.def(0),width:y.number.def(15),height:y.number.def(16),editable:y.bool.def(!0),hoverRate:y.number.def(0),max:y.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=f=>{if(!e.editable)return;const d=f+1;t("chooseRate",d)},i=f=>{if(!e.editable)return;const d=f+1;t("changeHover",d)},{resolveClassName:s}=ye(),o=f=>Pe({[`${s("is-select")}`]:f<Math.floor(c.value),[`${s("is-edit")}`]:e.editable,[`${s("rate-star")}`]:!0}),c=a.computed(()=>e.hoverRate||e.rate),u={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:`${s("rate-stars")}`},[Array(e.max).fill(1).map((f,d)=>a.createVNode("svg",{class:o(d),style:u,x:"0px",y:"0px",viewBox:"0 0 64 64",onClick:()=>n(d),onMouseenter:()=>i(d)},[a.createVNode("g",{transform:"translate(-143.000000, -635.000000)"},[a.createVNode("g",{transform:"translate(83.000000, 114.000000)"},[a.createVNode("g",{transform:"translate(15.000000, 384.000000)"},[a.createVNode("g",{transform:"translate(29.000000, 137.000000)"},[a.createVNode("polygon",{class:"st1",points:"48,53 28.2,63.9 32,40.8 16,24.4 38.1,21 48,-0.1 57.8,21 79.9,24.4 63.9,40.8 67.7,63.9"},null)])])])])]))])}}),Pb=a.defineComponent({name:"Rate",components:{star:hl},props:{modelValue:y.number.def(0),size:y.size(),editable:y.bool.def(!0),withValidate:y.bool.def(!0)},emits:["change","update:modelValue"],setup(e,{emit:t}){const{resolveClassName:n}=ye(),i=Fn(),s=a.ref(0),o=p=>{e.editable&&(t("update:modelValue",p),t("change",p))},c=p=>{s.value=p},u=Pe({[`${n("rate")}`]:!0}),d={small:{width:12,height:12},large:{width:18,height:18}}[e.size]||{width:15,height:16},h=a.computed(()=>{const p=Math.floor(e.modelValue),C=(d.width+3)*p,b=d.width*(e.modelValue-p);return{width:`${C+b}px`}}),m={width:d.width,height:d.height};return a.watch(()=>e.modelValue,()=>{var p;e.withValidate&&((p=i==null?void 0:i.validate)==null||p.call(i,"change"))}),()=>a.createVNode("p",{class:u},[e.editable?a.createVNode(hl,a.mergeProps({rate:e.modelValue,"hover-rate":s.value,onChooseRate:o,onChangeHover:c,onMouseleave:()=>c(0)},m),null):[a.createVNode(hl,a.mergeProps({rate:5,style:h.value,class:`${n("score-real")}`,editable:!1},m),null),a.createVNode(hl,a.mergeProps({rate:0,editable:!1},m),null)]])}}),r3=Ye(Pb),zb=a.defineComponent({name:"Swiper",props:{isLoop:y.bool.def(!0),loopTime:y.number.def(8e3),pics:y.array.def([]),list:y.array.def([]),height:y.number,width:y.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:i,loopTime:s,pics:o,list:c,height:u,width:f}=a.toRefs(e),d=a.ref(),h=a.ref(0),m=a.ref(0),p=a.ref(0),C=a.ref(0);let b;const{resolveClassName:v}=ye(),T=a.computed(()=>{var H;return((H=c.value)==null?void 0:H.length)>0?c.value:o.value}),w=a.computed(()=>({width:`${m.value*T.value.length}px`,transform:`translateX(-${m.value*h.value}px)`})),k=a.computed(()=>({width:`${m.value}px`,height:`${p.value}px`})),I=H=>{let F=H;H>=T.value.length&&(F=0),H<0&&(F=T.value.length-1),h.value=F,t("index-change",F)},M=H=>{H&&window.open(H,"_blank")},S=H=>[`${v("swiper-img")}`,{[`${v("swiper-link")}`]:H.link},H.class],L=H=>({"background-image":`url(${H.url})`,"background-color":H.color}),J=H=>({[`${v("current-index")}`]:h.value===H}),x=()=>{i.value&&(C.value=window.setTimeout(()=>{I(h.value+1),x()},s.value))},O=()=>{window.clearTimeout(C.value)},E=()=>{var F;const H=(F=d.value)==null?void 0:F.parentElement;!H||!window.ResizeObserver||(b=new ResizeObserver(()=>{W()}),b.observe(H))},j=()=>{var H;(H=b.disconnect)==null||H.call(b)},A=H=>{if(H===void 0)return{height:0,width:0};const F=getComputedStyle(H),ne=H.clientWidth-parseFloat(F.paddingTop)-parseFloat(F.paddingBottom);return{height:H.clientHeight-parseFloat(F.paddingLeft)-parseFloat(F.paddingRight),width:ne}},W=()=>{var F;const H=A((F=d.value)==null?void 0:F.parentElement);m.value=+f.value>0?f.value:H.width,p.value=+u.value>0?u.value:H.height};return a.watch([u,f],W),a.onMounted(()=>{W(),x(),E()}),a.onBeforeUnmount(()=>{O(),j()}),()=>a.createVNode("section",{class:`${v("swiper-home")}`,ref:d,style:k.value},[a.createVNode("hgroup",{style:w.value,class:`${v("transition")} ${v("swiper-main")}`},[T.value.map(H=>{var F;return a.createVNode("h3",{class:`${v("swiper-card")}`,style:k.value},[((F=n.default)==null?void 0:F.call(n,H))??a.createVNode("span",{class:S(H),style:L(H),onClick:()=>M(H.link)},null)])})]),a.createVNode("ul",{class:`${v("swiper-index")}`},[T.value.map((H,F)=>a.createVNode("li",{class:J(F),onMouseover:()=>I(F)},null))]),a.createVNode("span",{class:`${v("swiper-nav")} ${v("nav-prev")}`,onClick:()=>I(h.value-1)},[a.createVNode("i",{class:`${v("swiper-nav-icon")}`},null)]),a.createVNode("span",{class:`${v("swiper-nav")} ${v("nav-next")}}`,onClick:()=>I(h.value+1)},[a.createVNode("i",{class:`${v("swiper-nav-icon")}`},null)])])}}),s3=Ye(zb),gl=Symbol("BkSelect"),o3=Symbol("BkOptionGroup");function l3(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function Cd(e){return{register:(i,s)=>{if(s){if(e.value.has(i)){console.warn(`repeat ${i}`,s);return}return e.value.set(i,s)}},unregister:i=>{e.value.delete(i)}}}function Vb(e,t=200){let n,i=e;return a.customRef((s,o)=>({get(){return s(),i},set(c){clearTimeout(n),c===void 0||c===""?(i=c,o()):n=setTimeout(()=>{i=c,o()},t)}}))}function Rb(e,t){const{popoverMinWidth:n}=e;let i=null;const s=a.ref("auto"),o=a.ref(!1),c=()=>{o.value=!o.value},u=()=>{o.value=!1},f=()=>{o.value=!0},d=()=>{var h;s.value=Math.max((h=t.value)==null?void 0:h.offsetWidth,n)};return a.onMounted(()=>{t.value&&(i=K4(t.value,d,60,!0),i.start())}),a.onBeforeUnmount(()=>{i==null||i.stop(),i=null}),{isPopoverShow:o,popperWidth:s,togglePopover:c,hidePopover:u,showPopover:f}}function Jb(e,t){const n=Vb(""),i=a.ref(!1);return a.watch(n,async()=>{try{i.value=!0,await e(n.value),i.value=!1}catch(s){console.error(s)}finally{t==null||t()}}),{searchKey:n,searchLoading:i}}function Mr(e=""){return e&&String(e).trim().toLowerCase()}const ml=a.defineComponent({name:"Option",props:{id:{type:[String,Number,Object],require:!0},name:y.oneOfType([y.number,y.string]),disabled:y.bool.def(!1)},setup(e,{attrs:t}){const{proxy:n}=a.getCurrentInstance(),i=a.reactive({visible:!0}),{disabled:s,id:o,name:c}=a.toRefs(e),u=a.computed(()=>c.value!==void 0?c.value:t.label),f=a.computed(()=>o.value!==void 0?o.value:t.value),d=a.inject(gl,null),h=a.inject(o3,null),m=a.computed(()=>{var I;return(I=d==null?void 0:d.selected)==null?void 0:I.some(M=>ot.isEqual(M.value,f.value))}),p=a.computed(()=>d==null?void 0:d.multiple),C=a.computed(()=>(d==null?void 0:d.activeOptionValue)===f.value),b=a.computed(()=>(d==null?void 0:d.showSelectedIcon)&&p.value),v=a.computed(()=>d==null?void 0:d.selectedStyle),T=()=>{s.value||d==null||d.handleOptionSelected(n)},w=()=>{d.activeOptionValue=f.value};a.onBeforeMount(()=>{d==null||d.register(f.value,n),h==null||h.register(f.value,n)}),a.onBeforeUnmount(()=>{d==null||d.unregister(f.value),h==null||h.unregister(f.value)});const{resolveClassName:k}=ye();return{...a.toRefs(i),selected:m,multiple:p,isHover:C,showSelectedIcon:b,selectedStyle:v,optionName:u,optionID:f,handleOptionClick:T,handleMouseEnter:w,resolveClassName:k}},render(){var t,n;const e=Pe({"is-selected":this.selected,"is-disabled":this.disabled,"is-multiple":this.multiple,"is-hover":this.isHover,"is-checkbox":this.selectedStyle===No.CHECKBOX,[this.resolveClassName("select-option")]:!0});return a.withDirectives(a.createVNode("li",{class:e,onClick:this.handleOptionClick,onMouseenter:this.handleMouseEnter},[this.showSelectedIcon&&this.selectedStyle===No.CHECKBOX&&a.createVNode($n,{disabled:this.disabled,class:this.resolveClassName("select-checkbox"),modelValue:this.selected},null),((n=(t=this.$slots).default)==null?void 0:n.call(t))??a.createVNode("span",{class:this.resolveClassName("select-option-item"),title:String(this.optionName)},[this.optionName]),this.showSelectedIcon&&this.selected&&this.selectedStyle===No.CHECK&&a.createVNode($i,{class:this.resolveClassName("select-selected-icon"),width:22,height:22},null)]),[[a.vShow,this.visible]])}}),_b=a.defineComponent({name:"OptionGroup",props:{label:y.string.def(""),disabled:y.bool.def(!1),collapsible:y.bool.def(!1),collapse:y.bool.def(!1)},setup(e,{emit:t}){const n=a.getCurrentInstance(),{proxy:i}=n,s=a.inject(gl,null),o=a.reactive({groupCollapse:e.collapse,visible:!0}),c=a.ref(new Map),{register:u,unregister:f}=Cd(c),d=a.computed(()=>`${e.label} (${[...c.value.values()].filter(p=>p.visible).length})`),h=()=>{!e.collapsible||e.disabled||(o.groupCollapse=!o.groupCollapse,t("update:collapse",o.groupCollapse))};a.provide(o3,a.reactive({...a.toRefs(e),register:u,unregister:f,groupCollapse:a.toRef(o,"groupCollapse")})),a.onBeforeMount(()=>{s==null||s.registerGroup(n.uid,i)}),a.onBeforeUnmount(()=>{s==null||s.unregisterGroup(n.uid)});const{resolveClassName:m}=ye();return{...a.toRefs(o),groupLabel:d,handleToggleCollapse:h,resolveClassName:m}},render(){var i,s;const e=Pe({[this.resolveClassName("option-group")]:!0,collapsible:this.collapsible,disabled:this.disabled}),t=Pe({[this.resolveClassName("option-group-label")]:!0,collapsible:this.collapsible}),n=Pe({"default-group-label-icon":!0,collapse:this.groupCollapse});return a.withDirectives(a.createVNode("ul",{class:e},[a.createVNode("li",{class:t,onClick:this.handleToggleCollapse},[this.$slots.label?this.$slots.label():a.createVNode("span",{class:"default-group-label"},[this.collapsible&&a.createVNode(os,{class:n},null),a.createVNode("span",{class:"default-group-label-title"},[this.groupLabel])])]),a.withDirectives(a.createVNode("ul",{class:this.resolveClassName("option-group-content")},[(s=(i=this.$slots).default)==null?void 0:s.call(i)]),[[a.vShow,!this.groupCollapse]])]),[[a.vShow,this.visible]])}}),Qb={onContentScroll:Function},Wb={list:y.array.def([]),enabled:y.bool.def(!0),scrollEvent:y.bool.def(!1),lineHeight:y.oneOfType([y.number,y.func]).def(30),minHeight:y.number.def(30),height:y.oneOfType([y.string.def("100%"),y.number]).def("100%"),width:y.oneOfType([y.string.def("100%"),y.number]).def("100%"),className:y.oneOfType([y.arrayOf(y.string),y.object,y.arrayOf(y.object),y.string]).def(""),contentClassName:y.oneOfType([y.arrayOf(y.string),y.object,y.arrayOf(y.object),y.string]).def(""),contentStyle:y.object.def({}),scrollXName:y.string.def(Bt("F-scroll-x")),scrollYName:y.string.def(Bt("F-scroll-y")),groupItemCount:y.number.def(1),preloadItemCount:y.number.def(1),renderAs:y.string.def("div"),contentAs:y.string.def("div"),scrollOffsetTop:y.number.def(0),scrollPosition:y.string.def("content"),abosuteHeight:y.oneOfType([y.string.def("auto"),y.number]).def("auto"),throttleDelay:y.number.def(60),rowKey:y.string.def(void 0),keepAlive:y.bool.def(!1),autoReset:y.bool.def(!0),...Qb},Hb=(e,t)=>{const{renderAs:n,contentAs:i}=e,s=(d,h,m,p,C,b,v)=>{t.emit("content-scroll",[d,{translateY:C,translateX:b,pos:v}])},o=a.resolveDirective("bkVirtualRender"),c={lineHeight:e.lineHeight,handleScrollCallback:s,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent},u=a.ref(null),f=({left:d=0,top:h=0})=>{u.value.scrollTo(d,h)};return t.expose({scrollTo:f}),{rendAsTag:()=>{var d,h,m,p,C,b,v,T;return a.h(n,{class:e.className,ref:u},[((h=(d=t.slots).beforeContent)==null?void 0:h.call(d))??"",a.withDirectives(a.h(i,{class:e.contentClassName,style:e.contentStyle},[((p=(m=t.slots).default)==null?void 0:p.call(m,{data:e.list}))??""]),[[o,c]]),((b=(C=t.slots).afterContent)==null?void 0:b.call(C))??"",((T=(v=t.slots).afterSection)==null?void 0:T.call(v))??""])}}};function c3(e,t,n,i){let s=0,o=0,c=0,u=0;for(;s<e;s++){if(u=i(s,[s*n,(s+1)*n,"virtual"]),o+u>t){c=t-o;break}o+=u}return{startIndex:s,height:o,diffHeight:c}}function u3(e,t,n,i,s){if(!i)return;const o=i.scrollTop,c=i.scrollLeft,{scrollTop:u,count:f,groupItemCount:d,startIndex:h,endIndex:m,scrollLeft:p}=n,{offsetHeight:C}=i;let b=0,v=0,T=0;if(typeof e=="number"&&(b=Math.floor(o/e),v=Math.ceil(C/e)+b,T=o%e),typeof e=="function"){const w=c3(f,o,d,e);b=w.startIndex>0?w.startIndex:0,T=w.diffHeight,v=c3(f,C,d,e).startIndex+b+1}if(o!==u||b!==h||v!==m||p!==c){const w=i.scrollHeight-i.offsetHeight-i.scrollTop;typeof t=="function"&&t(s,b,v,o,T,c,{bottom:w>=0?w:0})}}function Fb(e,t,n){const{lineHeight:i=30,handleScrollCallback:s,pagination:o={},onlyScroll:c}=n.value;if(c){const C=t.scrollTop,b=t.scrollLeft,v=t.scrollHeight-t.offsetHeight-t.scrollTop;s(e,null,null,C,C,b,{bottom:v>=0?v:0});return}const{startIndex:u,endIndex:f,groupItemCount:d,count:h,scrollTop:m,scrollLeft:p}=o;u3(i,s,{scrollTop:m,startIndex:u,endIndex:f,groupItemCount:d,count:h,scrollLeft:p},t,e)}const d3=(e=60)=>ot.throttle((t,n,i)=>Fb(t,n,i),e),Bb=(e,t,n,i=60)=>{Reflect.apply(d3(i),void 0,[e,t,n])},$b={mounted(e,t){const n=e.parentNode,{throttleDelay:i}=t.value;n.addEventListener("scroll",s=>{Bb(s,n,t,i)})},unbind(e){if(e){const t=e.parentNode;if(!t)return;t.removeEventListener("scroll",d3)}}},Ir=Ye(a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:$b},props:Wb,emits:["content-scroll"],slots:Object,setup(e,t){const{renderAs:n,contentAs:i}=e,s=O=>typeof O=="string"?[O]:typeof O=="object"&&!Array.isArray(O)?[O]:O;if(!e.enabled){const{rendAsTag:O}=Hb(e,t);return O}const o=a.ref(null),c=a.reactive({startIndex:0,endIndex:0,scrollTop:1,scrollLeft:0,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),u=(O,E,j,A,W,H,F)=>{c.startIndex=E,c.endIndex=j,c.scrollTop=A,c.translateY=W,c.translateX=H,c.scrollLeft=H,c.pos=F,t.emit("content-scroll",[O,c])};a.onMounted(()=>{a.nextTick(()=>{m(e.list),p()})}),a.watch(()=>e.list,()=>{let O={left:0,top:0};O={left:c.scrollLeft,top:c.scrollTop},f(),p(),e.keepAlive&&x(O)},{deep:!0}),a.watch(()=>e.lineHeight,()=>{f(),p()});const f=()=>{m(e.list)},d=a.ref(0),h=a.ref(0),m=O=>{if(d.value=Math.ceil((O||[]).length/e.groupItemCount),c.count=d.value,c.startIndex=0,c.endIndex=0,c.translateY=0,c.scrollTop=0,typeof e.abosuteHeight=="string"&&e.abosuteHeight==="auto")if(typeof e.lineHeight=="function"){h.value=0;let j=0;for(let A=0;A<d.value;A++){const W=e.lineHeight.call(this,A,O.slice(A*e.groupItemCount,e.groupItemCount));j+=typeof W=="number"?W:0}h.value=j}else h.value=e.lineHeight*d.value;else h.value=e.abosuteHeight},p=(O={left:0,top:0})=>{var j;const E=(j=o.value)==null?void 0:j.parentNode;u3(e.lineHeight,u,c,E,null),O&&o.value&&e.autoReset&&x(O)},C=a.computed(()=>e.rowKey!==void 0?e.list:(e.list||[]).map((O,E)=>({...O,$index:E}))),b=a.computed(()=>C.value.slice(c.startIndex*e.groupItemCount,(c.endIndex+e.preloadItemCount)*e.groupItemCount)),v=a.computed(()=>e.scrollPosition==="content"?{top:`${c.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${c.translateY}px)`}:{}),T=a.computed(()=>({height:typeof e.height=="number"?`${e.height}px`:e.height,width:typeof e.width=="number"?`${e.width}px`:e.width,display:"inline-block",...e.scrollPosition==="container"?v.value:{}})),w=a.computed(()=>{const O=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${h.value<e.minHeight?e.minHeight:h.value}px`,display:O?"none":"block"}}),{resolveClassName:k}=ye(),I=a.computed(()=>[k("virtual-render"),e.scrollXName,e.scrollYName,...s(e.className),e.scrollPosition==="container"?k("virtual-content"):""]),M=a.computed(()=>[e.scrollPosition==="content"?k("virtual-content"):"",...s(e.contentClassName)]),S=a.resolveDirective("bkVirtualRender"),L={lineHeight:e.lineHeight,handleScrollCallback:u,pagination:c,throttleDelay:e.throttleDelay},J=()=>{f(),p()},x=(O={left:0,top:0})=>{const{left:E,top:j}=O;o.value.scrollTo(E,j)};return t.expose({reset:J,scrollTo:x}),()=>{var O,E,j,A,W,H,F,ne;return a.h(n||"div",{ref:o,class:I.value,style:T.value},[((E=(O=t.slots).beforeContent)==null?void 0:E.call(O))??"",a.withDirectives(a.h(i||"div",{class:M.value,style:{...v.value,...e.contentStyle}},[((A=(j=t.slots).default)==null?void 0:A.call(j,{data:b.value}))??""]),[[S,L]]),((H=(W=t.slots).afterContent)==null?void 0:H.call(W))??"",a.h("div",{class:[k("virtual-section")],style:w.value}),((ne=(F=t.slots).afterSection)==null?void 0:ne.call(F))??""])}}}));var f3=function(e){return e.UNKNOWN="",e.FILLED="filled",e.STROKE="stroke",e}(f3||{});const Gb=a.defineComponent({name:"Tag",props:{theme:wo(),closable:y.bool.def(!1),type:ke("tagStorkeType",{}).def(f3.UNKNOWN),checkable:y.bool.def(!1),checked:y.bool.def(!1),radius:y.string.def("2px"),extCls:y.string.def("")},emits:["change","close"],slots:Object,setup(e,{emit:t}){const{resolveClassName:n}=ye(),i=a.computed(()=>Pe({[`${n("tag-closable")}`]:e.closable,[`${n("tag-checkable")}`]:e.checkable,[`${n("tag-check")}`]:e.checked,[`${n(`tag-${e.type}`)}`]:e.type,[`${n(`tag-${e.theme}`)}`]:e.theme,[e.extCls]:!!e.extCls},n("tag"))),s=a.computed(()=>({borderRadius:e.radius}));return{wrapperCls:i,wrapperStyle:s,handleClose:u=>{u.preventDefault(),u.stopPropagation(),t("close",u)},handleClick:u=>{u.preventDefault(),u.stopPropagation(),e.checkable&&t("change",!e.checked)},resolveClassName:n}},render(){var e,t;return a.createVNode("div",{class:this.wrapperCls,style:this.wrapperStyle,onClick:this.handleClick},[this.$slots.icon?a.createVNode("span",{class:`${this.resolveClassName("tag-icon")}`},[this.$slots.icon()]):"",a.createVNode("span",{class:`${this.resolveClassName("tag-text")}`},[(t=(e=this.$slots).default)==null?void 0:t.call(e)]),this.closable?a.createVNode(rn,{class:`${this.resolveClassName("tag-close")}`,onClick:this.handleClose},null):""])}}),Lr=Ye(Gb),Zb=a.defineComponent({name:"SelectTagInput",props:{selected:{type:Array,default:()=>[]},tagTheme:wo(),placeholder:y.string.def(""),filterable:y.bool.def(!1),allowCreate:y.bool.def(!1),disabled:y.bool.def(!1),modelValue:y.any,collapseTags:y.bool.def(!1)},emits:["update:modelValue","remove","enter","keydown"],setup(e,{emit:t}){const{resolveClassName:n}=ye(),{proxy:i}=a.getCurrentInstance(),s=a.inject(gl,null),{modelValue:o,collapseTags:c,selected:u}=a.toRefs(e),f=a.ref(o.value),d=a.ref(),h=a.ref(null);a.watch(o,()=>{f.value=o.value}),a.watch([u,c],()=>{T()},{flush:"post"});const m=w=>{t("remove",w)},p=()=>{var w;(w=d.value)==null||w.focus()},C=w=>{t("update:modelValue",w.target.value)},b=w=>{switch(w.code){case"Enter":{t("enter",w.target.value,w);break}}t("keydown",w.target.value,w)},v=w=>{const k=[...i.$el.querySelectorAll(`.${n("tag")}`)];return typeof w=="number"?k[w]:k},T=()=>{c.value&&(h.value=null,setTimeout(()=>{const w=v(),k=w.findIndex((I,M)=>M?w[M-1].offsetTop!==I.offsetTop:!1);h.value=k>0?k:null}))};return{select:s,overflowTagIndex:h,value:f,inputRef:d,handleRemoveTag:m,focus:p,handleInput:C,handleKeydown:b,resolveClassName:n}},render(){var s,o,c,u,f,d,h,m;const e=(o=(s=this.$slots)==null?void 0:s.prefix)==null?void 0:o.call(s),t=Pe({[this.resolveClassName("select-tag")]:!0,[this.resolveClassName("select-tag--default")]:!0,"is-disabled":this.disabled,"collapse-tag":this.collapseTags,"has-prefix":!!e}),n=Pe({[this.resolveClassName("select-tag-wrapper")]:!0}),i={display:this.selected.length&&!this.filterable?"none":""};return a.createVNode("div",{class:t},[(u=(c=this.$slots)==null?void 0:c.prefix)==null?void 0:u.call(c),a.createVNode("span",{class:n},[((d=(f=this.$slots).default)==null?void 0:d.call(f))??this.selected.map((p,C)=>a.createVNode(Lr,{closable:!0,theme:this.tagTheme,style:{display:this.collapseTags&&this.overflowTagIndex&&C>=this.overflowTagIndex?"none":""},onClose:()=>this.handleRemoveTag(p.value)},{default:()=>{var b;return[(b=this.select)==null?void 0:b.handleGetLabelByValue(p.value)]}})),!!this.overflowTagIndex&&this.collapseTags&&a.createVNode(Lr,{class:this.resolveClassName("select-overflow-tag")},{default:()=>[a.createTextVNode("+"),this.selected.length-this.overflowTagIndex]}),a.createVNode("input",{class:this.resolveClassName("select-tag-input"),ref:"inputRef",type:"text",style:i,placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,disabled:this.disabled,value:this.filterable?this.value:"",onInput:this.handleInput,onKeydown:this.handleKeydown},null)]),(m=(h=this.$slots)==null?void 0:h.suffix)==null?void 0:m.call(h)])}}),Yb=a.defineComponent({name:"Select",directives:{clickoutside:si},props:{modelValue:y.any,multiple:y.bool.def(!1),disabled:y.bool.def(!1),size:y.size().def(uu.DEFAULT),clearable:y.bool.def(!0),loading:y.bool.def(!1),filterable:y.bool.def(!1),remoteMethod:y.func,scrollHeight:y.number.def(200),showSelectAll:y.bool.def(!1),popoverMinWidth:y.number.def(0),showOnInit:y.bool.def(!1),multipleMode:y.oneOf(["default","tag"]).def("default"),tagTheme:wo(),behavior:R0(),collapseTags:y.bool.def(!1),autoHeight:y.bool.def(!0),noDataText:y.string,noMatchText:y.string,loadingText:y.string,placeholder:y.string,searchPlaceholder:y.string,selectAllText:y.string,scrollLoading:y.bool.def(!1),allowCreate:y.bool.def(!1),popoverOptions:Object,customContent:y.bool.def(!1),list:y.array.def([]),idKey:y.string.def("value"),displayKey:y.string.def("label"),withValidate:y.bool.def(!0),showSelectedIcon:y.bool.def(!0),inputSearch:y.bool.def(!0),enableVirtualRender:y.bool.def(!1),allowEmptyValues:y.array.def([]),autoFocus:y.bool.def(!1),keepSearchValue:y.bool.def(!1),prefix:y.string,selectedStyle:Qp()},emits:["update:modelValue","change","toggle","clear","scroll-end","focus","blur"],setup(e,{emit:t}){const n=ft("select"),{resolveClassName:i}=ye(),{modelValue:s,disabled:o,filterable:c,multiple:u,remoteMethod:f,loading:d,popoverMinWidth:h,showOnInit:m,multipleMode:p,allowCreate:C,customContent:b,showSelectedIcon:v,inputSearch:T,enableVirtualRender:w,showSelectAll:k,scrollHeight:I,list:M,displayKey:S,idKey:L,collapseTags:J,autoHeight:x,popoverOptions:O,allowEmptyValues:E,autoFocus:j,keepSearchValue:A,selectedStyle:W}=a.toRefs(e),H=a.computed(()=>e.noDataText===void 0?n.value.noData:e.noDataText),F=a.computed(()=>e.noMatchText===void 0?n.value.noMatchedData:e.noMatchText),ne=a.computed(()=>e.loadingText===void 0?n.value.loading:e.loadingText),ge=a.computed(()=>e.placeholder===void 0?n.value.pleaseSelect:e.placeholder),ue=a.computed(()=>e.searchPlaceholder===void 0?n.value.enterKeywords:e.searchPlaceholder),ae=a.computed(()=>e.selectAllText===void 0?n.value.all:e.selectAllText),Ce=Fn(),Z=a.ref(),K=a.ref(),B=a.ref(),R=a.ref(),G=a.ref(),re=a.ref(),oe=a.ref(),q=a.ref(new Map),ie=a.computed(()=>[...q.value.values()]),_=a.ref(new Map),P=a.ref([]),Q=a.computed(()=>P.value.reduce((Ne,Ee)=>(Ne[Ee.value]=Ee.label,Ne),{})),X=a.ref(),le=a.computed(()=>M.value.reduce((Ne,Ee)=>(Ne[Ee[L.value]]=Ee[S.value],Ne),{}));a.watch(s,()=>{var Ne;nc(),e.withValidate&&((Ne=Ce==null?void 0:Ce.validate)==null||Ne.call(Ce,"change"))},{deep:!0}),a.watch(P,()=>{var Ne;(Ne=oe.value)==null||Ne.updatePopover(null,ut.value)});const Y=a.computed(()=>de.value?M.value:M.value.filter(Ne=>{var Ee;return(Ee=Mr(String(Ne[S.value])))==null?void 0:Ee.includes(Mr(Ci.value))})),fe=a.computed(()=>o.value||d.value),ve=a.computed(()=>P.value.map(Ne=>{var Ee,He;return((He=(Ee=q.value)==null?void 0:Ee.get(Ne.value))==null?void 0:He.optionName)||le.value[Ne.value]||Ne.label})),Ie=a.computed(()=>{const Ne=ie.value.reduce((Ee,He)=>(He.disabled||Ee.push(He.optionID),Ee),[]);return Ne.length<=P.value.length&&Ne.every(Ee=>P.value.some(He=>He.value===Ee))}),je=a.computed(()=>!!_.value.size),Re=a.computed(()=>!ie.value.length),Ve=a.computed(()=>ie.value.length&&ie.value.every(Ne=>!Ne.visible)),de=a.computed(()=>c.value&&typeof f.value=="function"),be=a.computed(()=>!(Ws.value||Re.value||Ve.value)||b.value),Te=a.computed(()=>u.value&&k.value&&(!Ci.value||!c.value)),Je=a.computed(()=>I.value-12-(Te.value?32:0)),rt=a.computed(()=>Ws.value?ne.value:Re.value?H.value:Ve.value?F.value:""),it=a.computed(()=>x.value?J.value&&!yi.value:J.value),ut=a.computed(()=>ot.merge({theme:`light ${i("select-popover")}`,trigger:"manual",width:ec.value,arrow:!1,placement:"bottom-start",isShow:yi.value,reference:G.value,offset:6,popoverDelay:0,renderType:vo.AUTO},O.value)),{register:Fe,unregister:ze}=Cd(q),{register:Be,unregister:lt}=Cd(_),{isHover:et,setHover:pt,cancelHover:Ue}=l3(),Qt=a.ref(!1),oa=()=>{Qt.value||(Qt.value=!0,t("focus"))},ql=()=>{Qt.value&&(Qt.value=!1,t("blur"))},{popperWidth:ec,isPopoverShow:yi,hidePopover:la,showPopover:Qs,togglePopover:Cf}=Rb({popoverMinWidth:h.value},K);a.watch(yi,()=>{t("toggle",yi.value)});const bf=a.computed(()=>(c.value&&T.value||C.value)&&yi.value);a.watch(yi,Ne=>{Ne?setTimeout(()=>{Ha(),tc()},10):A.value||(Ci.value="")});const tc=()=>{var He;const Ne=P.value[0],Ee=q.value.get(Ne==null?void 0:Ne.value);Ee&&!Ee.disabled&&Ee.visible?X.value=Ne==null?void 0:Ne.value:X.value=(He=ie.value.find(Nn=>!Nn.disabled&&Nn.visible))==null?void 0:He.optionID},vf=Ne=>{c.value&&ie.value.forEach(Ee=>{var He;Ee.visible=(He=Mr(String(Ee.optionName)))==null?void 0:He.includes(Mr(Ne))})},{searchKey:Ci,searchLoading:Ws}=Jb(de.value?f.value:vf,tc),bi=Ne=>{Ne!==s.value&&(t("update:modelValue",Ne,s.value),t("change",Ne,s.value))},wf=()=>{fe.value||(oa(),Cf())},Hs=Ne=>{c.value&&(Ci.value=Ne)},Nf=(Ne,Ee)=>{const He=String(Ne);!C.value||!He||c.value&&ie.value.find(dn=>Mr(String(dn.optionName))===Mr(He))||q.value.get(He)||(Ee.stopPropagation(),u.value?(P.value.push({value:He,label:He}),bi(P.value.map(dn=>dn.value))):(P.value=[{value:He,label:He}],bi(He),la()),Ci.value="")},Wa=Ne=>{if(!(fe.value||!Ne)){if(u.value){const Ee=P.value.findIndex(He=>He.value===Ne.optionID);Ee>-1?P.value.splice(Ee,1):P.value.push({value:Ne.optionID,label:Ne.optionName||Ne.optionID}),bi(P.value.map(He=>He.value))}else P.value=[{label:Ne.optionName||Ne.optionID,value:Ne.optionID}],bi(Ne.optionID),la();Ha()}},Ha=()=>{setTimeout(()=>{var Ne,Ee,He;!T.value&&!C.value?(Ne=R.value)==null||Ne.focus():p.value==="tag"?(Ee=G.value)==null||Ee.focus():(He=Z.value)==null||He.focus()},0)},Mf=Ne=>{Ne.stopPropagation(),P.value=[],bi(u.value?[]:""),t("clear",u.value?[]:""),la()},If=()=>{X.value=""},Lf=()=>{Ie.value?P.value=[]:ie.value.forEach(Ne=>{Ne.disabled||P.value.find(Ee=>Ee.value===Ne.optionID)||P.value.push({value:Ne.optionID,label:Ne.optionName||Ne.optionID})}),bi(P.value.map(Ne=>Ne.value)),Ha()},Tf=Ne=>{const{scrollTop:Ee,clientHeight:He,scrollHeight:Nn}=Ne.target;Ee+He===Nn&&t("scroll-end")},Sf=Ne=>{if(fe.value)return;const Ee=P.value.findIndex(He=>He.value===Ne);Ee>-1&&(P.value.splice(Ee,1),bi(P.value.map(He=>He.value)))},Fs=Ne=>{var He,Nn;let Ee=Ne;if(typeof Ee=="object"){for(const dn of q.value.keys())if(ot.isEqual(dn,Ee)){Ee=dn;break}}return((Nn=(He=q.value)==null?void 0:He.get(Ee))==null?void 0:Nn.optionName)||le.value[Ee]||Q.value[Ee]||Ee},nc=()=>{Array.isArray(s.value)?P.value=[...s.value.map(Ne=>({value:Ne,label:Fs(Ne)}))]:s.value!==void 0||E.value.includes(s.value)?P.value=[{value:s.value,label:Fs(s.value)}]:P.value=[]},ic=Ne=>{var Nn,dn;if(!yi.value)return;const Ee=ie.value.filter(fn=>!fn.disabled&&fn.visible),He=Ee.findIndex(fn=>fn.optionID===X.value);if(!(!Ee.length||He===-1))switch(Ne.code){case"ArrowDown":{Ne.preventDefault();const fn=He>=Ee.length-1?0:He+1;X.value=(Nn=Ee[fn])==null?void 0:Nn.optionID;break}case"ArrowUp":{Ne.preventDefault();const fn=He===0?Ee.length-1:He-1;X.value=(dn=Ee[fn])==null?void 0:dn.optionID;break}case"Backspace":{if(!u.value||!P.value.length||Ci.value.length||Ne.target===R.value)return;P.value.pop(),bi(P.value.map(fn=>fn.value));break}case"Enter":{const fn=q.value.get(X.value);Wa(fn);break}}},kf=({event:Ne})=>{var He;const{target:Ee}=Ne;(He=K.value)!=null&&He.contains(Ee)||K.value===Ee||(la(),ql())},xf=()=>{setTimeout(()=>{var Ne,Ee;w.value&&((Ee=(Ne=re.value)==null?void 0:Ne.reset)==null||Ee.call(Ne))})};return a.provide(gl,a.reactive({multiple:u,selected:P,activeOptionValue:X,showSelectedIcon:v,selectedStyle:W,register:Fe,unregister:ze,registerGroup:Be,unregisterGroup:lt,handleOptionSelected:Wa,handleGetLabelByValue:Fs})),a.onMounted(()=>{nc(),setTimeout(()=>{m.value&&Qs(),j.value&&Ha()})}),{selected:P,isInput:bf,options:ie,isDisabled:fe,selectedLabel:ve,isPopoverShow:yi,isHover:et,popperWidth:ec,inputRef:Z,triggerRef:K,contentRef:B,searchRef:R,selectTagInputRef:G,virtualRenderRef:re,popoverRef:oe,searchLoading:Ws,isOptionsEmpty:Re,isSearchEmpty:Ve,isFocus:Qt,isShowSelectContent:be,curContentText:rt,isGroup:je,searchKey:Ci,isShowSelectAll:Te,virtualHeight:Je,virtualList:Y,isCollapseTags:it,popoverConfig:ut,focusInput:Ha,setHover:pt,cancelHover:Ue,handleFocus:oa,handleBlur:ql,handleTogglePopover:wf,handleClear:Mf,hidePopover:la,showPopover:Qs,handleToggleAll:Lf,handleOptionSelected:Wa,handleClickOutside:kf,handleScroll:Tf,handleDeleteTag:Sf,handleInputChange:Hs,handleInputEnter:Nf,handleKeydown:ic,handleSelectedAllOptionMouseEnter:If,handlePopoverShow:xf,localLoadingText:ne,localPlaceholder:ge,localSearchPlaceholder:ue,localSelectAllText:ae,resolveClassName:i}},render(){const e=Pe({[`${this.resolveClassName("select")}`]:!0,"popover-show":this.isPopoverShow,"is-disabled":this.isDisabled,"is-focus":this.isFocus,"is-filterable":this.filterable,[this.size]:!0,[this.behavior]:!0}),t=()=>this.loading?a.createVNode(Gi,{loading:!0,theme:"primary",class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length&&!this.isDisabled?a.createVNode(an,{class:"clear-icon",onClick:this.handleClear},null):a.createVNode(Ma,{class:"angle-up"},null),n=()=>{var o,c;return this.multipleMode==="tag"?a.createVNode(Zb,{ref:"selectTagInputRef",modelValue:this.searchKey,"onUpdate:modelValue":u=>this.searchKey=u,selected:this.selected,tagTheme:this.tagTheme,placeholder:this.localPlaceholder,filterable:this.isInput,disabled:this.isDisabled,onRemove:this.handleDeleteTag,collapseTags:this.isCollapseTags,onEnter:this.handleInputEnter,onKeydown:(u,f)=>this.handleKeydown(f)},{prefix:this.prefix?a.createVNode("div",{class:`${this.resolveClassName("select--prefix-area")}`},[a.createVNode("span",null,[this.prefix])]):(c=(o=this.$slots).prefix)==null?void 0:c.call(o),default:this.$slots.tag&&(()=>this.$slots.tag({selected:this.selected})),suffix:()=>t()}):a.createVNode(Da,a.mergeProps({ref:"inputRef",type:"text",modelValue:this.isInput?this.searchKey:this.selectedLabel.join(","),placeholder:this.isInput?this.selectedLabel.join(",")||this.localPlaceholder:this.localPlaceholder,readonly:!this.isInput,selectReadonly:!0,disabled:this.isDisabled,behavior:this.behavior,size:this.size,withValidate:!1,onInput:this.handleInputChange,onEnter:this.handleInputEnter,onKeydown:(u,f)=>this.handleKeydown(f)},this.prefix?{prefix:this.prefix}:null),{...typeof this.$slots.prefix=="function"?{prefix:()=>{var u,f;return(f=(u=this.$slots).prefix)==null?void 0:f.call(u)}}:null,suffix:()=>t()})},i=()=>{var o,c;return a.createVNode("div",{class:this.resolveClassName("select-trigger"),style:{height:this.autoHeight&&this.collapseTags?"32px":""},ref:"triggerRef",onClick:this.handleTogglePopover,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[((c=(o=this.$slots).trigger)==null?void 0:c.call(o,{selected:this.selected}))||n()])},s=()=>{var o,c;return a.createVNode("div",{class:this.resolveClassName("select-content-wrapper"),ref:"contentRef"},[this.filterable&&!this.inputSearch&&a.createVNode("div",{class:this.resolveClassName("select-search-wrapper")},[a.createVNode(Ia,{class:"icon-search",width:16,height:16},null),a.withDirectives(a.createVNode("input",{ref:"searchRef",class:this.resolveClassName("select-search-input"),placeholder:this.localSearchPlaceholder,"onUpdate:modelValue":u=>this.searchKey=u},null),[[a.vModelText,this.searchKey]])]),!this.isShowSelectContent&&a.createVNode("div",{class:this.resolveClassName("select-empty")},[this.searchLoading&&a.createVNode(Gi,{class:"mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),a.createVNode("span",null,[this.curContentText])]),a.createVNode("div",{class:this.resolveClassName("select-content")},[a.createVNode("div",{class:this.resolveClassName("select-dropdown"),style:{maxHeight:`${this.scrollHeight}px`},onScroll:this.handleScroll},[a.withDirectives(a.createVNode("ul",{class:this.resolveClassName("select-options")},[this.isShowSelectAll&&a.createVNode("li",{class:this.resolveClassName("select-option"),onMouseenter:this.handleSelectedAllOptionMouseEnter,onClick:this.handleToggleAll},[this.localSelectAllText]),this.enableVirtualRender?a.createVNode(Ir,{list:this.virtualList,height:this.virtualHeight,lineHeight:32,ref:"virtualRenderRef"},{default:({data:u})=>u.map(f=>{var d,h;return a.createVNode(ml,{key:f[this.idKey],id:f[this.idKey],name:f[this.displayKey]},{default:(h=(d=this.$slots).virtualScrollRender)==null?void 0:h.call(d,{item:f})})})}):this.list.map(u=>a.createVNode(ml,{id:u[this.idKey],name:u[this.displayKey]},null)),(c=(o=this.$slots).default)==null?void 0:c.call(o),this.scrollLoading&&a.createVNode("li",{class:this.resolveClassName("select-options-loading")},[a.createVNode(Gi,{class:"spinner mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),a.createVNode("span",null,[this.localLoadingText])])]),[[a.vShow,this.isShowSelectContent]])]),this.$slots.extension&&a.createVNode("div",{class:this.resolveClassName("select-extension")},[this.$slots.extension()])])])};return a.createVNode("div",{class:e},[a.createVNode($t,a.mergeProps(this.popoverConfig,{onClickoutside:this.handleClickOutside,onAfterShow:this.handlePopoverShow,ref:"popoverRef"}),{default:()=>i(),content:()=>s()})])}}),bd=Ft(Yb,{Option:ml,Group:_b});function Ub(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const{propsMixin:Kb}=ja,vd=Object.assign({},Kb);vd.width.default="400",vd.height.default="100%";const Xb=a.defineComponent({name:"Sideslider",components:{BkModal:ja,BkButton:Et},props:{...vd,direction:{type:String,default:"right",validator:e=>{const t=["left","right"];return t.indexOf(e)<0?(console.error(`direction property is not valid: '${e}',【${t.join(" | ")}】`),!1):!0}}},emits:["closed","update:isShow","shown","hidden","animation-end"],setup(e,{slots:t,emit:n}){const i=async()=>{console.log("slider handleClose");let u=!0;typeof e.beforeClose=="function"&&(u=await e.beforeClose()),u&&(n("update:isShow",!1),n("closed"),setTimeout(()=>{n("animation-end")},250))},s=()=>{setTimeout(()=>{n("shown")},200)},o=()=>{setTimeout(()=>{n("hidden")},200)},{resolveClassName:c}=ye();return()=>{const u={header:()=>{var h;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:`${c("sideslider-header")}`},[a.createVNode("div",{class:`${c("sideslider-close")} ${e.direction}`,onClick:()=>{i()}},null),a.createVNode("div",{class:`${c("sideslider-title")} ${e.direction}`},[((h=t.header)==null?void 0:h.call(t))??e.title])])])},default:()=>{var h;return((h=t.default)==null?void 0:h.call(t))??"Content"},footer:()=>t.footer?a.createVNode("div",{class:`${c("sideslider-footer")}`},[t.footer()]):null},f=`${c("sideslider-wrapper")} ${e.scrollable?"scroll-able":""} ${e.extCls}`,d=t.footer?"calc(100vh - 106px)":"calc(100vh - 52px)";return a.createVNode(ja,a.mergeProps(e,{maxHeight:d,class:f,style:`${e.direction}: 0;`,onHidden:o,onShown:s,onClose:i}),Ub(u)?u:{default:()=>[u]})}}}),h3=Ye(Xb);var g3=function(e){return e.UNKNOWN="",e.ERROR="error",e.LOADING="loading",e}(g3||{});const m3={theme:y.theme().def(bo.PRIMARY),size:y.size(),curStep:y.number.def(1),controllable:y.bool.def(!1),direction:P0(),status:ke("status",{}).def(g3.UNKNOWN),lineType:z0(),text:y.bool,extCls:y.string,steps:y.array.def([]),beforeChange:y.func},p3=Ye(a.defineComponent({name:"Steps",props:m3,emits:["update:curStep","click"],setup(e,{emit:t}){const n=ft("steps"),i=ft("lang"),s=a.ref([]),o=h=>{const m=[];h.forEach(p=>{typeof p=="string"?m.push(p):m.push({title:p.title,icon:p.icon,description:p.description,status:p.status,border:p.border??!0})}),s.value.splice(0,s.value.length,...m)},c=h=>{m3.curStep=h},u=()=>{var h;s.value.splice(0,s.value.length,{title:n.value.step1,icon:1},{title:n.value.step2,icon:2},{title:n.value.step3,icon:3}),(h=e.steps)!=null&&h.length&&o(e.steps)};a.watch(()=>i.value,()=>{u()});const f=async h=>{try{e.controllable&&h!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(m,p)=>{const C=await e.beforeChange(h);C?m(C):p(C)}),t("update:curStep",h),t("click",h))}catch(m){console.warn(m)}};a.onMounted(u),a.watch(()=>e.steps,()=>{o(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{c(e.curStep)},{deep:!0});const{resolveClassName:d}=ye();return{defaultSteps:s,jumpTo:f,resolveClassName:d}},render(){const e=this.resolveClassName("steps"),t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",i=Pe({[`${this.extCls}`]:!!this.extCls,[`${this.resolveClassName(`steps-${this.direction}`)}`]:this.direction,[`${this.resolveClassName(`steps-${this.lineType}`)}`]:this.lineType},`${t} ${e} ${n}`),s=m=>this.curStep>m+1||this.defaultSteps[m].status==="done",o=m=>this.curStep===m+1,c=m=>{const{icon:p}=m;return p?Object.prototype.toString.call(p)==="[object Object]":typeof m=="string"},u=(m,p)=>(p.icon||(p.icon=m),!isNaN(p.icon)),f=m=>m.status==="loading",d=m=>m.status==="error",h=(m,p)=>o(m)&&this.status==="loading"||f(p)?a.createVNode(ls,{class:`${this.resolveClassName("icon")} ${this.resolveClassName("steps-icon")} icon-loading`},null):o(m)&&this.status==="error"||d(p)?a.createVNode(rn,{class:`${this.resolveClassName("steps-icon")}`},null):s(m)?a.createVNode($i,{class:`${this.resolveClassName("steps-icon")}`},null):a.createVNode("span",null,[u(m,p)?m+1:a.createVNode(p.icon,null,null)]);return a.createVNode("div",{class:i},[this.defaultSteps.map((m,p)=>{var C,b;return a.createVNode("div",{class:[this.resolveClassName("step"),m.title?"":this.resolveClassName("step-no-content"),s(p)?"done":"",o(p)?"current":"",o(p)&&this.status==="error"?"isError":"",m.status&&o(p)?[`${this.resolveClassName(`step-${m.status}`)}`]:""]},[a.createVNode("span",{class:[`${this.resolveClassName("step-indicator")}`,`${this.resolveClassName(`step-${c(m)?"icon":"number"}`)}`,`${this.resolveClassName(`step-icon${m.status}`)}`],style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(p+1)}},[((b=(C=this.$slots)[p+1])==null?void 0:b.call(C))??h(p,m)]),m.title?a.createVNode("div",{class:`${this.resolveClassName("step-content")}`},[a.createVNode("div",{class:`${this.resolveClassName("step-title")}`,style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(p+1)}},[m.title]),m.description&&a.createVNode("div",{class:`${this.resolveClassName("step-description")}`,title:m.description},[m.description])]):""])})])}})),qb=a.defineComponent({name:"Switcher",props:{theme:y.theme(),size:y.size(),disabled:y.bool,showText:y.bool,isOutline:y.bool,onText:y.string.def("ON"),offText:y.string.def("OFF"),isSquare:y.bool,extCls:y.string,beforeChange:y.func.def(void 0),trueValue:y.oneOfType([y.string,y.number,y.bool]).def(!0),falseValue:y.oneOfType([y.string,y.number,y.bool]).def(!1),value:y.oneOfType([y.string,y.number,y.bool]).def(!1),modelValue:y.oneOfType([y.string,y.number,y.bool]).def(!1),withValidate:y.bool.def(!0)},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=Fn(),{resolveClassName:i}=ye(),s=a.ref(!1),o=a.computed(()=>e.trueValue===u.value),c=a.ref(e.modelValue!==!1),u=a.computed(()=>c.value?e.modelValue:e.value),f=a.computed(()=>{const m={[e.extCls]:!!e.extCls,[`${i("switcher")}`]:!0,[`${i("switcher-outline")}`]:e.isOutline,[`${i("switcher-square")}`]:e.isSquare,"show-label":e.showText,"is-disabled":e.disabled,"is-checked":o.value,"is-unchecked":!o.value,"is-loading":s.value,[`${i("primary")}`]:e.theme==="primary"};if(e.size&&!e.showText){const p=`${i(`switcher-${e.size}`)}`;m[p]=!0}return m});a.watch(()=>e.modelValue,()=>{var m;c.value=!0,e.withValidate&&((m=n==null?void 0:n.validate)==null||m.call(n,"change"))}),a.watch(()=>e.value,()=>{c.value=!1});const d=m=>{if(m.stopPropagation(),m.preventDefault(),e.disabled||s.value)return;const p=o.value?e.falseValue:e.trueValue,C=!o.value,b=()=>{t("update:modelValue",p),t("change",C)};let v=!0;if(typeof e.beforeChange=="function"&&(v=e.beforeChange(p),typeof v.then=="function"))return s.value=!0,v.then(()=>{b()}).finally(()=>{s.value=!1});v&&b()},h=m=>{(m.code==="Enter"||m.key==="Enter"||m.keyCode===13)&&d(m)};return()=>a.createVNode("div",{class:f.value,onClick:d,tabindex:"0",onKeydown:h},[s.value?a.createVNode(Bo,{class:`${i("switcher-loading")}`},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[o.value?e.onText:e.offText]):""])}}),y3=Ye(qb);var pl=(e=>(e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e.HORIZONTAL="horizontal",e))(pl||{}),C3=(e=>(e.HIGHLIGHT="highlight",e.AUTO="auto",e))(C3||{});const ev=["auto","highlight"],tv=["none","row","col","outer","horizontal"],$e={ROW_INDEX:"__$table_row_index",ROW_UID:"__$uuid",ROW_EXPAND:"__row_expand",ROW_SELECTION:"__row_selection",ROW_SELECTION_ALL:"__row_selection_all",ROW_SELECTION_INDETERMINATE:"__row_selection_indeterminate",ROW_SOURCE_DATA:"__row_source_data",ROW_SKIP_CFG:"__row_skip_config"},Gn={COL_UID:"__col_$uuid",COL_SOURCE_DATA:"__col_source_data",SORT_TYPE:"__sort_type"},Tr=6,Oa=42;var wd=(e=>(e.DEF1="def1",e.DEF2="def2",e))(wd||{});const nv={def1:"#FAFBFD",def2:"#F0F1F5"},yl={large:78,medium:60,small:42},iv=e=>[{value:"small",label:e.value.setting.lineHeight.small,height:yl.small},{value:"medium",label:e.value.setting.lineHeight.medium,height:yl.medium},{value:"large",label:e.value.setting.lineHeight.large,height:yl.large}],b3="InitColumns",v3="BKTableCahce",av="Bk_COlumn_Update_Define",rv=60;var Jt=(e=>(e.ASC="asc",e.DESC="desc",e.NULL="null",e.CUSTOM="custom",e))(Jt||{});const sv=["asc","desc","null","custom"],ea=30;var w3=(e=>(e.CURRENT="current",e.ALL="all",e))(w3||{});ke("showOverflowTooltipMode",{default:"auto"});const ov=ke("columnType",{default:"none"}),Nd=ke("columnType",{default:""});ke("full",{default:"full"}),ke("columnSize",{default:"small"});const lv=nn(),Md=ke("IOverflowTooltipPropType",{}).def(!1);ke("IOverflowTooltipType",{}).def({content:"",disabled:!1,watchCellResize:!0,mode:"auto"});const cv=ke("ISortPropShape",{}).def(!1),uv=ke("IFilterPropShape",{}).def(!1);var N3=(e=>(e.DEBOUNCE="debounce",e.THROTTLE="throttle",e))(N3||{});const Cl=ke("IColumnType",{}).def({width:"100%",label:()=>""}),M3=ke("ITableSettingPropType",{}).def(!1),Id=ke("LabelFunctionStringType",{}),dv=ke("RenderFunctionStringType",{}),I3=ke("SpanFunctionStringType",{}),fv=ke("RowClassFunctionStringType",{}),hv=ke("RowHeightFunctionNumberType",{});ke("FunctionNumberType",{});const bl=ke("StringNumberType",{});ke("IColumnPropType",{}).def({label:void 0,minWidth:ea});const gv={data:y.arrayOf(y.any).def([]),columns:y.arrayOf(Cl).def([]),activeColumn:y.oneOfType([y.number.def(-1),y.arrayOf(y.number.def(-1))]),columnPick:ke("columnPick",{}).def("disabled"),height:bl.def("auto"),stripe:y.bool.def(!1),minHeight:bl.def(Oa*2),maxHeight:bl.def("auto"),rowHeight:hv.def(()=>Oa),headHeight:y.number.def(Oa),showHead:y.bool.def(!0),thead:ke("ITheadType",{}).def({color:wd.DEF1,height:Oa,isShow:!0}),virtualEnabled:y.bool.def(!1),border:y.oneOfType([y.arrayOf(ke("boderType",{})),y.string]).def([pl.ROW]),pagination:y.oneOfType([y.bool.def(!1),y.object.def({})]).def(!1),paginationHeight:y.number.def(rv),remotePagination:y.bool.def(!1),emptyText:y.string,settings:M3,rowClass:y.oneOfType([y.string,y.object,y.func]).def({}),rowStyle:y.oneOfType([y.string,y.object,y.func]).def({}),cellStyle:y.oneOfType([y.string,y.object,y.func]).def({}),cellClass:y.oneOfType([y.string,y.object,y.func]).def({}),scrollLoading:y.oneOfType([y.object,y.bool]).def(void 0),reserveExpand:y.bool.def(!1),selectionKey:y.string.def(""),isSelectedFn:y.func.def(void 0),rowKey:y.oneOfType([y.string,y.func]).def($e.ROW_INDEX),showOverflowTooltip:Md,asyncData:y.bool.def(!1),rowHover:y.oneOf(ev).def(C3.HIGHLIGHT),defaultSort:y.shape({}).def({}),isRowSelectEnable:y.oneOfType([y.func.def(()=>!0),y.bool.def(!0)]).def(!0),resizerWay:ke("ResizerWay",{default:"debounce"}),observerResize:y.bool.def(!0),align:Nd,headerAlign:Nd,prependStyle:y.style().def({})},mv={label:Id,field:Id,render:dv,width:y.oneOfType([y.number,y.string]),minWidth:bl.def(ea),columnKey:y.string.def(""),showOverflowTooltip:Md,type:ov,resizable:y.bool.def(!0),fixed:y.oneOfType([y.bool,lv]).def(!1),sort:cv,filter:uv,colspan:I3.def(()=>1),rowspan:I3.def(()=>1),align:Nd,className:fv,prop:Id,index:y.number.def(void 0)},pv=a.defineComponent({name:"TableColumn",props:mv,setup(e){const t=a.inject(b3,(s,o=!1)=>{},!1),n=a.inject(v3,{queueStack:(s,o)=>o==null?void 0:o()}),i=a.reactive({...e,field:e.prop||e.field});return{initColumns:t,bkTableCache:n,column:i}},unmounted(){this.updateColumnDefine(!0)},mounted(){this.updateColumnDefine()},methods:{updateColumnDefine(e=!1){if(this.$props.index!==void 0&&typeof this.$props.index=="number"){this.updateColumnDefineByIndex(e);return}this.updateColumnDefineByParent()},updateColumnDefineByParent(){const e=()=>{const n=this._.parent.vnode.children.default()||[],i=[],s=o=>{Array.isArray(o)&&o.forEach(c=>{var f,d,h;if(Array.isArray(c)){s(c);return}let u=!0;if(((f=c.type)==null?void 0:f.name)==="TableColumn"){u=Object.hasOwnProperty.call(c.props||{},"key");const m={...c.props,field:c.props.prop||c.props.field,render:(d=c.children)==null?void 0:d.default};i.push(a.unref(m))}(h=c.children)!=null&&h.length&&u&&s(c.children)})};s(n),this.initColumns(i)};typeof this.bkTableCache.queueStack=="function"&&this.bkTableCache.queueStack(av,e)},updateColumnDefineByIndex(e=!1){const t={...this.$props,field:this.$props.prop||this.$props.field,render:this.$slots.default};this.initColumns(a.unref(t),e)}},render(){var e,t;return a.createVNode(a.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{}})])}});class yv{constructor(){De(this,"storage");this.storage={}}queueStack(t,n=()=>{}){this.storage[t]&&clearTimeout(this.storage[t]),this.storage[t]=setTimeout(()=>n())}clearQueueStack(t){this.storage[t]&&clearTimeout(this.storage[t])}}var An=(e=>(e.ON_SORT_BY_CLICK="onSortByClick",e.ON_FILTER_CLICK="onFilterClick",e.ON_SETTING_CHANGE="onSettingChange",e.ON_ROW_EXPAND_CLICK="onRowExpandClick",e.ON_ROW_CHECK="onRowCheck",e))(An||{}),Dt=(e=>(e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.COLUMN_FILTER="columnFilter",e.COLUMN_FILTER_SAVE="colFilterSave",e.ROW_CLICK="rowClick",e.ROW_DBL_CLICK="rowDblclick",e.ROW_EXPAND_CLICK="rowExpand",e.ROW_MOUSE_ENTER="rowMouseEnter",e.ROW_MOUSE_LEAVE="rowMouseLeave",e.PAGE_LIMIT_CHANGE="pageLimitChange",e.PAGE_VALUE_CHANGE="pageValueChange",e.SETTING_CHANGE="settingChange",e.SCROLL_BOTTOM="scrollBottom",e.ROW_SELECT="select",e.ROW_SELECT_ALL="selectAll",e.ROW_SELECT_CHANGE="selectionChange",e.CELL_CLICK="cellClick",e.CELL_DBL_CLICK="cellDblclick",e.NATIVE_CLICK="click",e.NATIVE_DBL_CLICK="dblclick",e))(Dt||{});const Cv=e=>!0,bv=e=>!0,vv=e=>!0,wv=e=>!0,vl=(e,t,n,i,s)=>!0,Nv=e=>!0,Mv=e=>!0,Iv=e=>!0,Lv=e=>!0,L3=e=>!0,Tv=e=>!0,T3=e=>!0,Sv={columnPick:Cv,columnFilter:bv,columnSort:wv,colFilterSave:vv,rowClick:vl,rowDblclick:vl,rowExpand:Nv,select:Mv,selectAll:Iv,selectionChange:Lv,pageLimitChange:L3,pageValueChange:L3,settingChange:Tv,scrollBottom:e=>!0,cellClick:T3,cellDblclick:T3,rowMouseEnter:vl,rowMouseLeave:vl},S3=(e,t)=>{if(e){if(typeof e=="object"){let n=Object.prototype.hasOwnProperty.call(e,"current")?e.current:e.value;return/\d+/.test(n)||(n=1),{...t,...e,current:n}}return t}return{}},kv=(e,t)=>{const n=a.ref(0),i=a.ref(0);let s=a.reactive({count:0,limit:10,current:1,align:"right",layout:["total","limit","list"]});s=S3(e.pagination,s);const o=a.ref(null),c=()=>{if(!e.pagination||e.remotePagination){n.value=0,i.value=t.length;return}n.value=(s.current-1)*s.limit,i.value=s.current*s.limit},u=a.reactive([]),f=(C,b,v)=>{typeof b=="function"&&C.sort((T,w)=>b(T,w,v[Gn.SORT_TYPE]))},d=(C,b)=>{if(typeof b=="function"){const v=C.filter((T,w)=>b(T,w,t));C.length=0,C.push(...v)}},h=(C,b,v)=>{const T=t.slice(),{sortScope:w}=(v==null?void 0:v.sort)??{};w===w3.ALL&&f(T,b,v),u.length=0,u.push(...T.slice(n.value,i.value)),d(u,C),f(u,b,v)},m=(C,b,v)=>{s=S3(e.pagination,s),p(),c(),h(C,b,v)},p=()=>{e.pagination&&(o.value=e.remotePagination?s:{...s,count:t.length})};return{pageData:u,localPagination:o,resolvePageData:h,watchEffectFn:m}},xv=(e,t)=>{const n=a.toRef(e,"scrollLoading"),i=()=>typeof n.value=="boolean"?{loading:!!n.value,inline:!0,title:"",size:La.Normal,mode:Zu.Default,indicator:null}:n.value,s=a.computed(()=>n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object"));return{renderScrollLoading:()=>{var c,u;if(s.value){const{loading:f,size:d,mode:h,title:m,inline:p,indicator:C}=i();return((u=(c=t.slots).fixedBottom)==null?void 0:u.call(c))??a.createVNode(Gi,{loading:f,size:d,mode:h,title:m,inline:p,indicator:C},null)}}}};function Dv(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const jv=e=>{const{proxy:t}=a.getCurrentInstance(),n=a.ref(t.limit);a.watch(()=>t.limit,c=>{n.value=c}),a.watch(()=>t.limitList,c=>{a.nextTick(()=>{c.includes(n.value)||([n.value]=c)})},{immediate:!0});const i=c=>{n.value=c},{resolveClassName:s}=ye();return{limit:n,render:({isFirst:c,isLast:u})=>{let f;return t.showLimit?a.createVNode("div",a.mergeProps({class:{[s("pagination-limit")]:!0,"is-first":c,"is-last":u}},{disabled:t.disabled}),[a.createVNode("div",null,[e.value.eachPage]),a.createVNode(bd,{class:`${s("pagination-limit-select")}`,clearable:!1,size:"small",withValidate:!1,modelValue:n.value,onChange:i,disabled:t.disabled},Dv(f=t.limitList.map((d,h)=>a.createVNode(ml,{id:d,name:`${d}`,key:`${h}_${d}`},null)))?f:{default:()=>[f]}),a.createVNode("div",null,[e.value.strip])]):null}}},Ea=5,Ov=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(1),n=a.computed(()=>t.value===1),i=a.computed(()=>t.value===e.totalPageNum),s=a.ref(!1),o=a.ref(!1),c=a.computed(()=>{s.value=!1,o.value=!1;const b=[];if(e.totalPageNum<=Ea+2){for(let w=2;w<=e.totalPageNum-1;w++)b.push(w);return b}const v=Math.floor(Ea/2);e.totalPageNum>Ea&&(s.value=t.value-v>2,o.value=t.value+v<e.totalPageNum-1);const T=Math.min(e.totalPageNum-Ea,Math.max(2,t.value-v));for(let w=T;w<T+Ea;w++)b.push(w);return b});a.watch(()=>e.modelValue,b=>{a.nextTick(()=>{b>=1&&b<=e.totalPageNum?t.value=b:b<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,b=>{t.value>b&&(t.value=b)})});const u=()=>{n.value||(t.value=t.value-1)},f=()=>{i.value||(t.value=t.value+1)},d=b=>{b!==t.value&&(t.value=b)},h=()=>{t.value=Math.max(1,t.value-Ea)},m=()=>{t.value=Math.min(e.totalPageNum,t.value+Ea)},{resolveClassName:p}=ye();return{current:t,render:({isFirst:b,isLast:v})=>a.createVNode("div",{class:{[`${p("pagination-list")}`]:!0,"is-first":b,"is-last":v}},[a.createVNode("div",{class:{[`${p("pagination-list-pre")}`]:!0,"is-disabled":n.value},onClick:u},[e.prevText||a.createVNode(ri,null,null)]),a.createVNode("div",{class:{[`${p("pagination-list-item")}`]:!0,"is-active":t.value===1},key:"1",onClick:()=>d(1)},[a.createTextVNode("1")]),s.value&&a.createVNode("div",{key:"pre-batch",class:`${p("pagination-list-pre-batch")}`,onClick:h},[a.createVNode(fs,null,null)]),c.value.map(T=>a.createVNode("div",{class:{[`${p("pagination-list-item")}`]:!0,"is-active":t.value===T},key:T,onClick:()=>d(T)},[T])),o.value&&a.createVNode("div",{key:"next-batch",class:`${p("pagination-list-next-batch")}`,onClick:m},[a.createVNode(fs,null,null)]),e.totalPageNum>1&&a.createVNode("div",{class:{[`${p("pagination-list-item")}`]:!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>d(e.totalPageNum)},[e.totalPageNum]),a.createVNode("div",{class:{[`${p("pagination-list-pre")}`]:!0,"is-disabled":i.value},onClick:f},[e.nextText||a.createVNode(On,null,null)])])}},Ev=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(null),n=a.ref(!1),i=a.ref(1),s=a.computed(()=>i.value===1),o=a.computed(()=>i.value===e.totalPageNum);let c=0;const u=a.computed(()=>{const w=[];for(let k=1;k<=e.totalPageNum;k++)w.push(k);return w});a.watch(()=>e.modelValue,w=>{a.nextTick(()=>{w>=1&&w<=e.totalPageNum?i.value=w:w<1?i.value=1:i.value=e.totalPageNum,c=i.value})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,w=>{i.value>w&&(i.value=w)})});const f=()=>{s.value||(i.value=i.value-1)},d=()=>{o.value||(i.value=i.value+1)},h=()=>{n.value=!0},m=()=>{n.value=!1,t.value.textContent=`${c}`,c!==i.value&&(i.value=c)},p=w=>{const k=w.target,I=Number(k.textContent);!I||I<1||I>e.totalPageNum||I===i.value||(c=I)},C=w=>{["Enter","NumpadEnter"].includes(w.code)&&(w.preventDefault(),m())},b=w=>{c=w,m()},{resolveClassName:v}=ye();return{current:i,render:()=>a.createVNode("div",{class:`${v("pagination-small-list")}`},[a.createVNode("div",{class:{[`${v("pagination-btn-pre")}`]:!0,"is-disabled":s.value},onClick:f},[a.createVNode(ri,null,null)]),a.createVNode($t,{theme:"light",trigger:"click",arrow:!1,width:56,boundary:"body",placement:"bottom"},{default:()=>a.createVNode("div",{class:{[`${v("pagination-picker")}`]:!0,"is-focused":n.value}},[a.createVNode("span",{ref:t,class:`${v("pagination-editor")}`,contenteditable:!0,spellcheck:"false",onFocus:h,onBlur:m,onInput:p,onKeydown:C},[i.value]),a.createVNode("span",null,[a.createTextVNode("/")]),a.createVNode("span",{class:`${v("pagination-small-list-total")}`},[e.totalPageNum])]),content:()=>a.createVNode("div",{class:`${v("pagination-picker-list")}`},[u.value.map(w=>a.createVNode("div",{class:{item:!0,"is-actived":w===i.value},key:w,onClick:()=>b(w)},[w]))])}),a.createVNode("div",{class:{[`${v("pagination-btn-next")}`]:!0,"is-disabled":o.value},onClick:d},[a.createVNode(On,null,null)])])}},Av=e=>({isFirst:t,isLast:n})=>{const{props:i}=a.getCurrentInstance();if(!i.showTotalCount)return null;const{resolveClassName:s}=ye();return a.createVNode("div",a.mergeProps({class:{[`${s("pagination-total")}`]:!0,"is-first":t,"is-last":n}},{disabled:i.disabled}),[e.value.total,a.createVNode("div",{class:`${s("pagination-total-num")}`},[i.count]),e.value.strip])},Pv={modelValue:y.number.def(1),count:y.number.def(0).isRequired,limit:y.number.def(10),limitList:y.arrayOf(Number).def([10,20,50,100]),showLimit:y.bool.def(!0),type:y.oneOf(["default","compact"]).def("default"),location:y.oneOf(["left","right"]).def("right"),align:y.oneOf(["left","center","right"]).def("left"),size:y.size(),small:y.bool.def(!1),showTotalCount:y.bool.def(!0),prevText:y.string,nextText:y.string,disabled:y.bool.def(!1),beforeChange:y.func,layout:y.custom(e=>{const t={total:!0,list:!0,limit:!0};return e.some(n=>t[n])},"layout 的值只支持 * total、list、limit *").def(["total","list","limit"])},Ld=Ye(a.defineComponent({name:"Pagination",props:Pv,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const n=ft("pagination"),i=a.ref(0),{count:s,limit:o}=a.toRefs(e),c=Av(n),{current:u,render:f}=Ov(),{current:d,render:h}=Ev(),{limit:m,render:p}=jv(n);a.watch([s,m,o],([b,v])=>{const T=Math.ceil(b/v);i.value=T<1?1:T},{immediate:!0}),a.watch(u,b=>{t.emit("update:modelValue",b),t.emit("change",b)}),a.watch(d,b=>{e.small&&(t.emit("update:modelValue",b),t.emit("change",b))}),a.watch(m,b=>{t.emit("limitChange",b)});const{resolveClassName:C}=ye();return{totalPageNum:i,renderTotal:c,renderList:f,renderLimit:p,renderSmallList:h,resolveClassName:C}},render(){const e=Pe({[`${this.resolveClassName("pagination")}`]:!0,[`${this.resolveClassName(`pagination--${this.size}`)}`]:!0,[`is-align-${this.align}`]:!0}),t={total:this.renderTotal,list:this.small?this.renderSmallList:this.renderList,limit:this.renderLimit};return a.createVNode("div",{class:e},[this.layout.map((n,i)=>t[n]({isFirst:i===0,isLast:i===this.layout.length-1}))])}}));var k3=function(){if(typeof Map<"u")return Map;function e(t,n){var i=-1;return t.some(function(s,o){return s[0]===n?(i=o,!0):!1}),i}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var i=e(this.__entries__,n),s=this.__entries__[i];return s&&s[1]},t.prototype.set=function(n,i){var s=e(this.__entries__,n);~s?this.__entries__[s][1]=i:this.__entries__.push([n,i])},t.prototype.delete=function(n){var i=this.__entries__,s=e(i,n);~s&&i.splice(s,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,i){i===void 0&&(i=null);for(var s=0,o=this.__entries__;s<o.length;s++){var c=o[s];n.call(i,c[1],c[0])}},t}()}(),Td=typeof window<"u"&&typeof document<"u"&&window.document===document,wl=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),zv=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(wl):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),Vv=2;function Rv(e,t){var n=!1,i=!1,s=0;function o(){n&&(n=!1,e()),i&&u()}function c(){zv(o)}function u(){var f=Date.now();if(n){if(f-s<Vv)return;i=!0}else n=!0,i=!1,setTimeout(c,t);s=f}return u}var Jv=20,_v=["top","right","bottom","left","width","height","size","weight"],Qv=typeof MutationObserver<"u",Wv=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Rv(this.refresh.bind(this),Jv)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,i=n.indexOf(t);~i&&n.splice(i,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!Td||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Qv?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!Td||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,i=n===void 0?"":n,s=_v.some(function(o){return!!~i.indexOf(o)});s&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),x3=function(e,t){for(var n=0,i=Object.keys(t);n<i.length;n++){var s=i[n];Object.defineProperty(e,s,{value:t[s],enumerable:!1,writable:!1,configurable:!0})}return e},Sr=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||wl},D3=Ml(0,0,0,0);function Nl(e){return parseFloat(e)||0}function j3(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(i,s){var o=e["border-"+s+"-width"];return i+Nl(o)},0)}function Hv(e){for(var t=["top","right","bottom","left"],n={},i=0,s=t;i<s.length;i++){var o=s[i],c=e["padding-"+o];n[o]=Nl(c)}return n}function Fv(e){var t=e.getBBox();return Ml(0,0,t.width,t.height)}function Bv(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return D3;var i=Sr(e).getComputedStyle(e),s=Hv(i),o=s.left+s.right,c=s.top+s.bottom,u=Nl(i.width),f=Nl(i.height);if(i.boxSizing==="border-box"&&(Math.round(u+o)!==t&&(u-=j3(i,"left","right")+o),Math.round(f+c)!==n&&(f-=j3(i,"top","bottom")+c)),!Gv(e)){var d=Math.round(u+o)-t,h=Math.round(f+c)-n;Math.abs(d)!==1&&(u-=d),Math.abs(h)!==1&&(f-=h)}return Ml(s.left,s.top,u,f)}var $v=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Sr(e).SVGGraphicsElement}:function(e){return e instanceof Sr(e).SVGElement&&typeof e.getBBox=="function"}}();function Gv(e){return e===Sr(e).document.documentElement}function Zv(e){return Td?$v(e)?Fv(e):Bv(e):D3}function Yv(e){var t=e.x,n=e.y,i=e.width,s=e.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,c=Object.create(o.prototype);return x3(c,{x:t,y:n,width:i,height:s,top:n,right:t+i,bottom:s+n,left:t}),c}function Ml(e,t,n,i){return{x:e,y:t,width:n,height:i}}var Uv=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Ml(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=Zv(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),Kv=function(){function e(t,n){var i=Yv(n);x3(this,{target:t,contentRect:i})}return e}(),Xv=function(){function e(t,n,i){if(this.activeObservations_=[],this.observations_=new k3,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=i}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Sr(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new Uv(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Sr(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(i){return new Kv(i.target,i.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),O3=typeof WeakMap<"u"?new WeakMap:new k3,E3=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Wv.getInstance(),i=new Xv(t,n,this);O3.set(this,i)}return e}();["observe","unobserve","disconnect"].forEach(function(e){E3.prototype[e]=function(){var t;return(t=O3.get(this))[e].apply(t,arguments)}});var qv=function(){return typeof wl.ResizeObserver<"u"?wl.ResizeObserver:E3}();const zt=(e,t,n)=>{if(typeof t=="string")return Object.prototype.hasOwnProperty.call(e,t)?typeof e[t]=="function"?e[t].call(globalThis,...n):e[t]:void 0;if(Array.isArray(t))return t.map(i=>zt(e,i,n)).filter(i=>i!==void 0).at(0)},Sd=e=>/^\d+$/.test(`${e}`)?[parseInt(`${e}`,10)]:[],e8=e=>A3(e,"auto"),A3=(e,t="100%",n=null)=>{let i="";return/^auto|null|undefined$/ig.test(`${e}`)?i=t:i=/^\d+\.?\d+$/.test(`${e}`)?`${e}px`:e,n&&(i=`calc(${i} - ${n})`),i},t8=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>tv.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},Ls=(e,t=["resizeWidth","calcWidth","width"])=>e[t[0]]??e[t[1]]??e[t[2]],kd=(e,t,n=ea,i=0)=>{const{width:s}=e.getBoundingClientRect()||{},o=s-i;let c=o;const u=[],f=(h,m)=>{const{minWidth:p=void 0}=h;if(p===void 0)return m<ea?ea:m;let C=m;return/^\d+\.?\d*$/.test(`${p}`)&&(C=Number(p)),/^\d+\.?\d*%$/.test(`${p}`)&&(C=Number(p)*o/100),/^\d+\.?\d*px$/i.test(`${p}`)&&(C=Number(`${p}`.replace(/px/i,""))),C},d=(h,m,p=!0)=>{const C=f(h,m),b=m<C?C:m;Object.assign(h,{calcWidth:b}),p&&(c=c-b,c<0&&(c=0))};if(t.forEach((h,m)=>{if(!h.isHidden){const C=String(Ls(h,["resizeWidth","width"]));let b=!0;if(/^\d+\.?\d*(px)?$/.test(C)){const v=Number(C.replace("px",""));d(h,v),b=!1}if(/^\d+\.?\d*%$/.test(C)){let v=n;if(c>0){const T=Number(C.replace("%",""));v=c*T/100}d(h,v),b=!1}b&&u.push(m)}}),u.length>0){let h=n;c>0?u.forEach((m,p)=>{h=c/(u.length-p),d(t[m],h,!1);const{calcWidth:C}=t[m];c=c-C}):u.forEach(m=>{const p=f(t[m],ea);Object.assign(t[m],{calcWidth:p})})}},P3=(e,t,n=60,i=!1,s="throttle")=>{const o=()=>{typeof t=="function"&&t()},c=s==="debounce"?ot.debounce(o,n):ot.throttle(o,n),u=()=>Reflect.apply(c,globalThis,[]),f=new qv(()=>{u()});return i&&typeof t=="function"&&t(),{start:()=>{f.observe(e)},disconnect:()=>{f.unobserve(e),f.disconnect()}}},xd=e=>{const{showHead:t,headHeight:n,thead:i={}}=e;return Object.assign({},{isShow:t,height:n},{...i})},Il=(e,t,n)=>n.type==="index"?e[$e.ROW_INDEX]+1:ot.get(e,t),Ts=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Ts(Reflect.apply(e,globalThis,t),t):[],z3=(e,t,n)=>{const i=V3(e,t,n);return i!==null?i:Mi.v4()},V3=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===$e.ROW_INDEX?`__ROW_INDEX_${n}`:ot.get(e,t.rowKey):typeof t.rowKey=="function"?Reflect.apply(t.rowKey,globalThis,[e]):null,n8=(e,t,n=0)=>{if(e){const i=e.querySelector(t);if(i)return i.offsetHeight>e.offsetHeight-n}return!1},R3=(e,t,n)=>(s=>e.some(o=>o.field===zt(s,["field","type"],[s])))(t)&&n.length&&!n.includes(zt(t,["field","type"],[t])),J3=(e,t,n,i,s)=>typeof e[s]=="function"?Reflect.apply(e[s],globalThis,[{column:e,colIndex:t,row:n,rowIndex:i}]):typeof e[s]=="number"?e[s]:1,_3=(e,t,n,i)=>{const s=J3(e,t,n,i,"colspan"),o=J3(e,t,n,i,"rowspan");return{colspan:s,rowspan:o}},Q3=(e,t)=>{var c,u;const n=e.field,i=f=>Il(f,n,e),s=(f,d)=>{const h=i(f)||"",m=i(d)||"";return typeof h=="number"&&typeof m=="number"?h-m:String.prototype.localeCompare.call(h,m)},o=typeof((c=e.sort)==null?void 0:c.sortFn)=="function"?(u=e.sort)==null?void 0:u.sortFn:s;return t===Jt.NULL?()=>!0:(f,d)=>o(f,d)*(t===Jt.DESC?-1:1)},W3=e=>{const t={[Jt.NULL]:0,[Jt.ASC]:1,[Jt.DESC]:2};return t[e]===void 0?Jt.NULL:Object.keys(t)[(t[e]+1)%3]},H3=e=>{if(typeof e=="string")return{value:e};if(typeof e=="boolean"&&e)return{value:Jt.NULL};if(typeof e=="object"&&e!==null){return e.sortFn,{value:"custom",...e};return e}return null},Ll=(e,{row:t,index:n,isCheckAll:i})=>typeof e.isRowSelectEnable=="boolean"?e.isRowSelectEnable!==!1:typeof e.isRowSelectEnable=="function"?e.isRowSelectEnable({row:t,index:n,isCheckAll:i}):!0,i8=(e,t,n)=>{if(e[$e.ROW_UID]!==void 0)return e[$e.ROW_UID];const i=z3(e,n,t);return i!==void 0&&e[i]!==void 0?e[i]:t},Ss=e=>a.unref(e[$e.ROW_SOURCE_DATA]||e),F3=e=>a.unref(e[Gn.COL_SOURCE_DATA]||e),B3=a.defineComponent({name:"TableCell",props:{column:y.any.def({}),row:y.any.def({}),parentSetting:Md,title:y.string.def(void 0),observerResize:y.bool.def(!0),resizerWay:ke("ResizerWay",{default:N3.DEBOUNCE})},setup(e,{slots:t}){const n=a.ref(),i=a.ref(!1),s=a.computed(()=>({textAlign:e.column.textAlign})),o=()=>/boolean|object/.test(typeof e.column.showOverflowTooltip)&&e.column.showOverflowTooltip!==null?e.column:{showOverflowTooltip:e.parentSetting},{showOverflowTooltip:c=!1}=o();let u=null;const f=()=>{let h=!0,{resizerWay:m}=e,p=n.value.innerText,C="auto",b=!0;return typeof c=="boolean"&&(h=!c),typeof c=="object"&&(h=c.disabled,m=c.resizerWay||"debounce",p=c.content||n.value.innerText,typeof c.content=="function"&&(p=c.content(e.column,e.row)),b=c.watchCellResize,C=c.mode||"auto"),typeof h=="function"&&(h=Reflect.apply(h,this,[e.column,e.row])),{disabled:h,content:p,mode:C,resizerWay:m,watchCellResize:b}},d=()=>{if(!n.value||!Ca(n.value))return;const{mode:h,disabled:m}=f();if(i.value=!m,h==="auto"&&(i.value=Z4(n.value)),h==="static"&&(i.value=!0),i.value){const p=a.ref(f());u===null&&(u=md(n.value,{disabled:p.value.disabled,content:p.value.content,mode:p.value.mode}))}else u==null||u.destroyInstance(n.value),u=null};return a.onMounted(()=>{const{disabled:h,resizerWay:m,watchCellResize:p}=f();if(!h&&(d(),p!==!1&&e.observerResize)){let C=P3(n.value,()=>{d()},60,!0,m);C.start(),a.onBeforeUnmount(()=>{C.disconnect(),C=null})}}),a.onBeforeUnmount(()=>{u==null||u.destroyInstance(n.value)}),()=>{var h;return a.createVNode("div",{class:["cell",e.column.type],style:s.value,ref:n,title:e.title},[(h=t.default)==null?void 0:h.call(t)])}}}),Dd=a.defineComponent({name:"TableRow",render(){var e,t;return a.createVNode(a.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}});class a8{constructor(t,n){De(this,"props",null);De(this,"ctx",null);this.props=t,this.ctx=n}}const r8=a.defineComponent({name:"BodyEmpty",props:{list:y.array.def([]),filterList:y.array.def([]),emptyText:y.string},emits:["change"],setup(e){const t=ft("table"),n=a.computed(()=>e.emptyText===void 0?t.value.emptyText:e.emptyText),i=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode(fl,{scene:"part",type:i.value,description:n.value},null)}}),s8=a.defineComponent({name:"HeadFilter",props:{column:Cl,height:y.number.def(Oa)},emits:["change","filterSave"],setup(e,{emit:t}){const{resolveClassName:n}=ye(),i=ft("table"),{column:s}=e,{filter:o}=a.toRefs(e.column),c=a.computed(()=>{var j;return((j=o.value)==null?void 0:j.checked)??[]}),u=a.reactive({isOpen:!1,checked:c.value});a.watch(()=>o.value,()=>{u.checked=c.value},{immediate:!0,deep:!0});const f=a.computed(()=>Pe({[n("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:u.checked.length,opened:u.isOpen})),d=Pe({[n("table-head-filter")]:!0}),h=a.ref(null),m=j=>{u.isOpen=j,j&&setTimeout(()=>{h.value.reset()})},p=`light ${n("table-head-filter")}`,C=a.computed(()=>{const{list:j=[]}=o.value;return j}),b=(j,A="ig")=>new RegExp(`${j}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),A),v=(j,A)=>{const{match:W}=o.value,H=Il(A,zt(s,"field",[s,A]),s);return W==="full"&&j.includes(H),j.some(F=>b(F,"img").test(H))},T=typeof o.value.filterFn=="function"?(j,A,W,H)=>o.value.filterFn(j,A,e.column,W,H):(j,A)=>j.length?v(j,A):!0,w=()=>{k(!0),t("filterSave",[...u.checked]),u.isOpen=!1},k=(j=!1)=>{const{disabled:A}=M(S,i.value.confirm);if(A||j){if(o.value==="custom"){t("change",[...u.checked],null),u.isOpen=!1;return}o.value.checked=u.checked,t("change",[...u.checked],T)}},I=()=>{u.checked.length&&(u.checked.length=0,u.isOpen=!1,a.nextTick(()=>t("change",u.checked,T)))},M=(j,A)=>({disabled:j==="disabled"||j===!1,text:typeof j=="string"?j:A}),{btnSave:S,btnReset:L}=o.value,J=()=>{const{disabled:j,text:A}=M(S,i.value.confirm);return j?a.createVNode("span",{class:"btn-filter-save disabled"},[A]):a.createVNode("span",{class:"btn-filter-save",onClick:w},[A])},x=()=>{const{disabled:j,text:A}=M(L,i.value.reset);return j?"":a.createVNode("span",{class:["btn-filter-reset",u.checked.length?"":"disable"],onClick:I},[A])},O=(j,A)=>{const W=new Set(u.checked);j?W.add(A.value):W.delete(A.value),u.checked.length=0,u.checked.push(...Array.from(W)),k()},E=j=>j.data.length?j.data.map(A=>a.createVNode("div",{class:"list-item"},[a.createVNode($n,{label:A.value,key:A.$index,immediateEmitChange:!1,checked:u.checked.includes(A.value),modelValue:u.checked.includes(A.value),onChange:W=>O(W,A)},{default:()=>[`${A.text}`]})])):a.createVNode("div",{class:"list-item is-empty"},[i.value.emptyText]);return()=>a.createVNode($t,a.mergeProps({trigger:"click",isShow:u.isOpen,placement:"bottom-start",renderType:vo.SHOWN,arrow:!1,offset:0},{theme:p},{onAfterShow:()=>m(!0),onAfterHidden:()=>m(!1)}),{default:()=>a.createVNode(Qo,{class:f.value},null),content:()=>a.createVNode("div",{class:d},[a.createVNode(dl,{class:"content-list"},{default:()=>[a.createVNode(Ir,{lineHeight:32,list:C.value,throttleDelay:0,scrollEvent:!0,ref:h,className:"content-items"},{default:E})]}),a.createVNode("div",{class:"content-footer"},[J(),a.createVNode("span",{class:"btn-filter-split"},null),x()])])})}}),o8=a.defineComponent({name:"HeadSort",props:{column:Cl,defaultSort:y.oneOf(sv).def(Jt.NULL),active:y.bool},emits:["change"],setup(e,{emit:t}){var c,u;const{resolveClassName:n}=ye(),i=((u=(c=e.column)==null?void 0:c.sort)==null?void 0:u.value)||e.defaultSort||Jt.NULL,s=a.ref(i);a.watch(()=>[e.defaultSort],([f])=>{s.value=f});const o=(f,d)=>{f.stopImmediatePropagation(),f.stopPropagation(),f.preventDefault();let h=d;d===Jt.NULL&&(h=W3(d)),s.value===d&&(h=Jt.NULL);const m=Q3(e.column,h),p=H3(e.column.sort);if((p==null?void 0:p.value)==="custom"){t("change",(p==null?void 0:p.sortFn)??m,h);return}t("change",m,h)};return()=>a.createVNode("span",{class:n("head-cell-sort")},[a.createVNode(To,{class:["sort-action","sort-asc",e.active&&s.value===Jt.ASC?"active":""],style:"align-items: flex-end;",onClick:f=>o(f,Jt.ASC)},null),a.createVNode(os,{class:["sort-action","sort-desc",e.active&&s.value===Jt.DESC?"active":""],style:"align-items: flex-start;",onClick:f=>o(f,Jt.DESC)},null)])}});function $3(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const l8=a.defineComponent({name:"Settings",props:{settings:M3,columns:y.arrayOf(Cl).def([]),rowHeight:y.number.def(Oa)},emits:["change"],setup(e,{emit:t,slots:n}){const{resolveClassName:i}=ye(),s=ft("table"),o=iv(s),c=(F,ne)=>zt(F,["id","field","type"],[F,ne]),u=a.ref(!1),f=a.ref(!1),d=a.computed(()=>typeof e.settings=="boolean"?{fields:e.columns.map(F=>({...F,field:F.field||F.type})),checked:[],limit:0,size:"small",sizeList:o,showLineHeight:!0}:e.settings),h=a.ref(d.value.size||"small"),m=a.ref(e.rowHeight),p=a.ref(d.value.checked||[]),b=`light ${i("table-settings")}`,v=a.computed(()=>d.value.fields||e.columns||[]),T={checkAll:u.value,activeSize:h.value,activeHeight:m.value,checkedFields:d.value.checked||[]},w=()=>{Object.assign(T,{checkAll:u.value,activeSize:h.value,activeHeight:m.value,checkedFields:p.value}),t("change",{checked:p.value,size:h.value,height:m.value,fields:a.unref(v)}),f.value=!1},k=()=>{u.value=T.checkAll,h.value=T.activeSize,m.value=T.activeHeight,p.value=T.checkedFields,f.value=!1},I=()=>{f.value=!0},M=F=>{F.stopImmediatePropagation(),F.stopPropagation(),F.preventDefault(),u.value=!u.value;const ne=d.value.fields||e.columns||[],ge=ne.filter((ue,ae)=>ue.disabled&&p.value.includes(c(ue,ae))).map((ue,ae)=>c(ue,ae));if(u.value){const ue=ne.filter(ae=>!ae.disabled).map((ae,Ce)=>c(ae,Ce));p.value.splice(0,p.value.length,...ue,...ge)}else p.value.splice(0,p.value.length,...ge)},S=a.computed(()=>(d.value.limit??0)>0),L=d.value.sizeList||o,J=a.computed(()=>S.value&&(d.value.limit?d.value.limit:0)<=p.value.length),x=(F,ne)=>F.disabled||J.value&&!p.value.includes(c(F,ne)),O=F=>{h.value=F.value,m.value=F.height},E=F=>({"line-size":!0,"is-medium":h.value==="medium",active:F.value===h.value}),j={marginRight:"12px"},A=()=>L.map(F=>a.createVNode("span",{class:E(F),onClick:()=>O(F)},[F.label])),W=a.computed(()=>p.value.length>0&&!v.value.every((F,ne)=>p.value.includes(zt(F,"field",[F,ne])))),H=a.computed(()=>typeof d.value.showLineHeight=="boolean"?d.value.showLineHeight:!0);return a.watch(()=>[p.value],()=>{p.value.length||(u.value=!1),p.value.length&&v.value.every((F,ne)=>p.value.includes(c(F,ne)))&&(u.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{p.value.splice(0,p.value.length,...d.value.checked)},{immediate:!0,deep:!0}),()=>e.settings?a.createVNode($t,a.mergeProps({trigger:"manual",isShow:f.value,placement:"bottom-end",arrow:!0},{theme:b}),{default:()=>a.createVNode("span",{class:"table-head-settings",onClick:I},[a.createVNode(Oo,{style:"color: #c4c6cc;"},null)]),content:()=>{var ne;let F;return a.createVNode("div",{class:"setting-content"},[a.createVNode("div",{class:"setting-head"},[a.createVNode("span",{class:"head-title"},[s.value.setting.title]),a.createVNode(cs,{class:"icon-close-action",onClick:k},null)]),a.createVNode("div",{class:"setting-body"},[a.createVNode("div",{class:"setting-body-title"},[a.createVNode("div",null,[a.createVNode("span",{class:"field-setting-label"},[s.value.setting.fields.title]),S.value?a.createVNode("span",{class:"limit"},[s.value.setting.fields.subtitle(d.value.limit)]):""]),S.value?"":a.createVNode("span",{class:"check-all",onClick:M},[a.createVNode($n,{label:s.value.setting.fields.selectAll,indeterminate:!!W.value,modelValue:p.value.length>0},{default:()=>[s.value.setting.fields.selectAll]})])]),a.createVNode(dl,{class:"setting-body-fields",modelValue:p.value,"onUpdate:modelValue":ge=>p.value=ge},$3(F=v.value.map((ge,ue)=>{let ae;return a.createVNode("div",{class:"field-item"},[a.createVNode($n,{checked:p.value.includes(c(ge,ue)),label:c(ge,ue),disabled:x(ge,ue)},$3(ae=zt(ge,["name","label"],[ge,ue]))?ae:{default:()=>[ae]})])}))?F:{default:()=>[F]}),(ne=n.default)==null?void 0:ne.call(n),H.value?a.createVNode("div",{class:"setting-body-line-height"},[s.value.setting.lineHeight.title,a.createTextVNode(":"),A()]):""]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Et,{theme:"primary",style:j,onClick:w},{default:()=>[s.value.setting.options.ok]}),a.createVNode(Et,{style:j,onClick:k},{default:()=>[s.value.setting.options.cancel]})])])}}):""}}),jd=(e,t,n)=>{const i=(p,C,b)=>({column_fixed:!!p.fixed,column_fixed_left:p.fixed!=="right",column_fixed_right:p.fixed==="right",shadow:p.fixed==="right"?b-C>2:C>0}),s=p=>p.fixed==="right"?"right":"left",o={left:(p=!0)=>t.filter(C=>!C.isHidden&&C.fixed&&C.fixed!=="right").reduce((C,b,v)=>p&&v===0?C:C+Ls(b),0),right:(p=!0)=>t.filter(C=>!C.isHidden&&C.fixed==="right").reduce((C,b,v)=>p&&v===0?C:C+Ls(b),n?Tr:0)},c=(p,C,b=0)=>{const v=C[Gn.COL_UID],T=p==="right"?-1:1,w=t.filter(S=>!S.isHidden),{length:k}=w;let I=p==="right"?k*T:1,M=0;for(I;;){I=I+-1*T;const S=Math.abs(I),L=w[S],J=s(L),x=L[Gn.COL_UID];if(J===p&&v!==x){const O=Ls(L);M=M+O}if(v===x)break}return M+b},u=(p,C=!1)=>{if(!p.fixed||p.isHidden)return{};const b={left:0,right:C?Tr:-1},v=s(p);return b[v]=c(v,p,b[v]),{[v]:`${b[v]}px`}},f=p=>({width:`${o[p](!1)}px`,backgroundColor:e.thead.color,bottom:"0px"}),d=a.computed(()=>{const p={left:!1,right:!1};return t.filter(C=>!C.isHidden&&C.fixed).map(C=>{const b=s(C),v=p[b];return p[b]=!0,{isExist:v,colPos:b,column:C}})}),{resolveClassName:h}=ye();return{fixedWrapperClass:h("table-fixed"),resolveFixedColumnStyle:u,fixedColumns:d,resolveColumnStyle:f,resolveColumnClass:i}};function G3(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}class c8{constructor(t,n,i,s,o,c){De(this,"getRowHeight",(t,n)=>{const{size:i,height:s}=this.setting;return s!=null?zt(this.setting,"height",["tbody",t,n,i]):zt(this.props,"rowHeight",["tbody",t,n])});De(this,"getColumnClass",(t,n)=>({[`${this.uuid}-column-${n}`]:!0,column_fixed:!!t.fixed,column_fixed_left:!!t.fixed,column_fixed_right:t.fixed==="right",[`${t.className}`]:!0}));De(this,"getHeadColumnClass",(t,n)=>({...this.getColumnClass(t,n),active:this.isColActive(n)}));this.props=t,this.context=n,this.reactiveProp=i,this.colgroups=s,this.plugins=new a8(t,n),this.uuid=Mi.v4(),this.events=new Map,this.styleRef=o,this.t=c,this.activeSortIndex=a.ref(-1)}get propActiveCols(){return this.reactiveProp.activeColumns}renderTableHeadSchema(){const{isShow:t=!0}=xd(this.props);if(!t)return null;const n=i=>{var f;const{checked:s=[],size:o,height:c}=i;this.reactiveProp.setting.size=o,this.reactiveProp.setting.height=c;const u=((f=this.props.settings)==null?void 0:f.fields)||[];s.length&&this.colgroups.forEach(d=>{d.isHidden=R3(u,d,s)}),this.emitEvent(An.ON_SETTING_CHANGE,[i])};return[this.props.settings?a.createVNode(l8,{class:"table-head-settings",settings:this.reactiveProp.settings,columns:this.colgroups,rowHeight:this.props.rowHeight,onChange:n},{default:()=>{var i,s;return[(s=(i=this.context.slots).setting)==null?void 0:s.call(i)]}}):"",a.createVNode("table",{cellpadding:0,cellspacing:0},[this.renderColGroup(),this.renderHeader()])]}renderTableBodySchema(t){var i,s;const n=a.computed(()=>this.props.emptyText===void 0?this.t.value.emptyText:this.props.emptyText);return t.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":this.uuid},[this.renderColGroup(),this.renderTBody(t)]):((s=(i=this.context.slots).empty)==null?void 0:s.call(i))??a.createVNode(r8,{filterList:t,list:this.props.data,emptyText:n.value},null)}renderTableFooter(t){return a.createVNode(Ld,a.mergeProps(t,{modelValue:t.current,onLimitChange:n=>this.handlePageLimitChange(n),onChange:n=>this.handlePageChange(n)}),null)}on(t,n){return this.events.has(t)||this.events.set(t,[]),this.events.get(t).push(n),this}destroy(){this.events.clear(),this.events=null}emitEvent(t,n){this.events.has(t)&&this.events.get(t).forEach(i=>{typeof i=="function"&&Reflect.apply(i,this,n)})}handlePageLimitChange(t){Object.assign(this.props.pagination,{limit:t}),this.context.emit(Dt.PAGE_LIMIT_CHANGE,t)}handlePageChange(t){Object.assign(this.props.pagination,{current:t,value:t}),this.context.emit(Dt.PAGE_VALUE_CHANGE,t)}setColumnActive(t,n=!1){const i=this.propActiveCols.find(s=>s.index===t);Object.assign(i,{active:!i.active}),n&&this.propActiveCols.filter(s=>s.index!==t&&s.active).forEach(s=>{Object.assign(s,{active:!1})})}handleColumnHeadClick(t,n){if(this.props.columnPick!=="disabled"&&(this.setColumnActive(t,this.props.columnPick==="single"),this.context.emit(Dt.COLUMN_PICK,this.propActiveCols)),n.sort&&!n.filter){const i=zt(n,["field","type"],[n,t]),s=W3(this.reactiveProp.defaultSort[i]);Object.assign(this.reactiveProp.defaultSort,{[i]:s});const o=Q3(n,s);this.activeSortIndex.value=t,this.emitEvent(An.ON_SORT_BY_CLICK,[{sortFn:o,column:n,index:t,type:s}])}}getSortCell(t,n){const i=zt(t,["field","type"],[t,n]),s=(c,u)=>{Object.assign(this.reactiveProp.defaultSort,{[i]:u}),this.activeSortIndex.value=n,this.emitEvent(An.ON_SORT_BY_CLICK,[{sortFn:c,column:t,index:n,type:u}])},o=this.reactiveProp.defaultSort[i];return a.createVNode(o8,{column:t,defaultSort:o,active:this.activeSortIndex.value===n,onChange:s},null)}getFilterCell(t,n){const i=(o,c)=>{const u=(f,d)=>c(o,f,d);this.emitEvent(An.ON_FILTER_CLICK,[{filterFn:u,checked:o,column:t,index:n}])},s=o=>{this.context.emit(Dt.COLUMN_FILTER_SAVE,{column:t,values:o})};return a.createVNode(s8,{column:t,height:this.props.headHeight,onChange:i,onFilterSave:s},null)}renderHeader(){const t=xd(this.props),{cellFn:n}=t,i={"--row-height":`${zt(t,"height",["thead"])}px`,backgroundColor:this.props.thead.color},s=(d,h)=>typeof n=="function"?n(d,h):zt(d,"label",[d,h]),o=(d,h)=>{if(d.type==="selection"){const v=this.reactiveProp.rowActions.get($e.ROW_SELECTION_ALL);return this.renderCheckboxColumn({[$e.ROW_SELECTION]:!!v},0,!0)}const m=[];d.sort&&m.push(this.getSortCell(d,h)),d.filter&&m.push(this.getFilterCell(d,h));const p=s(d,h);m.unshift(a.createVNode("span",{class:"head-text"},[p]));const C=typeof p=="string"?p:void 0,b={"has-sort":!!d.sort,"has-filter":!!d.filter};return a.createVNode(B3,{class:b,title:C,observerResize:this.props.observerResize,resizerWay:this.props.resizerWay},G3(m)?m:{default:()=>[m]})},c=d=>Array.from(d.listeners.keys()).reduce((h,m)=>{const p=m.split("_").slice(-1)[0];return Object.assign(h,{[p]:C=>{d.listeners.get(m).forEach(b=>Reflect.apply(b,this,[C,d,this]))}})},{}),{resolveFixedColumnStyle:u}=jd(this.props,this.colgroups),f=()=>{if(this.styleRef.value.hasScrollY){const d={width:`${Tr+2}px`,right:"-1px"};return a.createVNode("th",{style:d,class:"column_fixed"},null)}};return a.createVNode(a.Fragment,null,[a.createVNode("thead",{style:i},[a.createVNode(Dd,null,{default:()=>[a.createVNode("tr",null,[this.filterColGroups.map((d,h)=>{var p;const m=Object.assign({},u(d,this.styleRef.value.hasScrollY),{backgroundColor:nv[((p=this.props.thead)==null?void 0:p.color)??wd.DEF1]});return a.createVNode("th",a.mergeProps({colspan:1,rowspan:1,class:[this.getHeadColumnClass(d,h),this.getColumnCustomClass(d),d.align||this.props.headerAlign||this.props.align],style:m,onClick:()=>this.handleColumnHeadClick(h,d)},c(d)),[o(d,h)])}),f()])]})])])}getColumnCustomClass(t,n){const i=t.className;if(i){if(typeof i=="function")return i(n);if(typeof i=="string")return i}return""}renderTBody(t){const{resolveFixedColumnStyle:n}=jd(this.props,this.colgroups),i=t.length;return a.createVNode("tbody",null,[t.map((s,o)=>{const c=[...Ts(this.props.rowStyle,[s,o,this]),{"--row-height":`${this.getRowHeight(s,o)}px`}],u=[...Ts(this.props.rowClass,[s,o,this]),`hover-${this.props.rowHover}`,o%2===1&&this.props.stripe?"stripe-row":""];return[a.createVNode(Dd,null,{default:()=>[a.createVNode("tr",{style:c,class:u,key:V3(s,this.props,o),onClick:f=>this.handleRowClick(f,s,o,t),onDblclick:f=>this.handleRowDblClick(f,s,o,t),onMouseenter:f=>this.handleRowEnter(f,s,o,t),onMouseleave:f=>this.handleRowLeave(f,s,o,t)},[this.filterColGroups.map((f,d)=>{var k;const h=[n(f),...Ts(this.props.cellStyle,[f,d,s,o,this])],m={"expand-cell":f.type==="expand"},{colspan:p,rowspan:C}=_3(f,d,s,o),b=$e.ROW_SKIP_CFG,v=f[Gn.COL_UID],{skipRow:T=!1,skipCol:w=!1}=((k=s[b])==null?void 0:k[v])??{};if(!T&&!w){let I;const M=[this.getColumnClass(f,d),this.getColumnCustomClass(f,s),f.align||this.props.align,...Ts(this.props.cellClass,[f,d,s,o,this]),{"expand-row":s[$e.ROW_EXPAND],"is-last":o+C>=i}],S=(L,J)=>{const x={event:L,row:Ss(s),column:F3(f),cell:{getValue:()=>this.renderCell(s,f,o,t)},rowIndex:o,columnIndex:d};this.context.emit(J,x)};return a.createVNode("td",{class:M,style:h,colspan:p,rowspan:C,onClick:L=>S(L,Dt.CELL_CLICK),onDblclick:L=>S(L,Dt.CELL_DBL_CLICK)},[a.createVNode(B3,{class:m,column:f,row:s,parentSetting:this.props.showOverflowTooltip,observerResize:this.props.observerResize},G3(I=this.renderCell(s,f,o,t))?I:{default:()=>[I]})])}return null})])]}),this.renderExpandRow(s,u,o)]})])}renderExpandRow(t,n,i){if(!!t[$e.ROW_EXPAND]){const o=[...n,{row_expend:!0}],u=`${i8(t,i,this.props)}_expand`;return a.createVNode(Dd,{key:u},{default:()=>{var f,d;return[a.createVNode("tr",{class:o},[a.createVNode("td",{colspan:this.filterColGroups.length,rowspan:1},[((d=(f=this.context.slots).expandRow)==null?void 0:d.call(f,Ss(t)))??a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}}handleRowClick(t,n,i,s){this.context.emit(Dt.ROW_CLICK,t,n,i,s,this)}handleRowDblClick(t,n,i,s){this.context.emit(Dt.ROW_DBL_CLICK,t,n,i,s,this)}handleRowEnter(t,n,i,s){this.context.emit(Dt.ROW_MOUSE_ENTER,t,n,i,s,this)}handleRowLeave(t,n,i,s){this.context.emit(Dt.ROW_MOUSE_LEAVE,t,n,i,s,this)}getExpandCell(t){return!!t[$e.ROW_EXPAND]?a.createVNode(us,null,null):a.createVNode(ps,null,null)}handleRowExpandClick(t,n,i,s,o){this.emitEvent(An.ON_ROW_EXPAND_CLICK,[{row:t,column:n,index:i,rows:s,e:o}])}renderCellCallbackFn(t,n,i,s){const o=Il(t,zt(n,"field",[n,t]),n),c=t[$e.ROW_INDEX],u=typeof c=="number"?c:i,f=this.props.data[u];return n.render({cell:o,data:f,row:t,column:n,index:i,rows:s})}renderCheckboxColumn(t,n,i=!1){const s=u=>{this.emitEvent(An.ON_ROW_CHECK,[{row:t,index:n,isAll:i,value:u}])},o=i&&!!this.reactiveProp.rowActions.get($e.ROW_SELECTION_INDETERMINATE),c=Ll(this.props,{row:t,index:n,isCheckAll:i});return a.createVNode($n,{onChange:s,disabled:!c,modelValue:t[$e.ROW_SELECTION],indeterminate:o},null)}renderExpandColumn(t,n,i,s){const o=()=>{var c,u;return typeof n.render=="function"?this.renderCellCallbackFn(t,n,i,s):((u=(c=this.context.slots).expandCell)==null?void 0:u.call(c,{row:t,column:n,index:i,rows:s}))??this.getExpandCell(t)};return a.createVNode("span",{class:"expand-btn-action",onClick:c=>this.handleRowExpandClick(t,n,i,s,c)},[o()])}renderCell(t,n,i,s){var u;const o=()=>{const f=Il(t,zt(n,"field",[n,t]),n);return typeof n.render=="function"?this.renderCellCallbackFn(t,n,i,s):typeof f=="object"?JSON.stringify(a.unref(f)):f},c={expand:(f,d,h,m)=>this.renderExpandColumn(f,d,h,m),selection:(f,d,h,m)=>this.renderCheckboxColumn(f,h)};return((u=c[n.type])==null?void 0:u.call(c,t,n,i,s))??o()}isColActive(t){return this.props.columnPick!=="disabled"&&this.propActiveCols.some(n=>n.index===t&&n.active)}renderColGroup(){return a.createVNode("colgroup",null,[(this.filterColGroups||[]).map((t,n)=>{const i=Pe({active:this.isColActive(n)}),s=`${e8(Ls(t))}`.replace(/px$/i,"");return a.createVNode("col",{class:i,width:s},null)})])}get filterColGroups(){return this.colgroups.filter(t=>!t.isHidden)}get setting(){return this.reactiveProp.setting}}const Tl=(e,t)=>({initColumns:(s,o=!1)=>{let c=[];if(Array.isArray(s)?c=s:c=[s],o)c.forEach(u=>{const f=t.findIndex(d=>d.label===u.label&&d.field===u.field);if(o){f>=0&&t.splice(f,1);return}});else{let u=!1;c.forEach(f=>{if(f.index!==void 0&&f.index>=0){u=!0;const d=t.findIndex(h=>h.label===f.label&&h.field===f.field);d>=0&&t.splice(d,1),t.push(f)}else{const d=t.findIndex(h=>h.label===f.label&&h.field===f.field);d>=0?t.splice(d,1,f):t.push(f)}}),u&&t.sort((f,d)=>f.index-d.index)}},getColumns:()=>{var s;return t!=null&&t.length?t:(s=e.columns)!=null&&s.length?e.columns:[]}}),Z3=e=>e.columnPick!=="disabled"?e.columnPick==="multi"?Array.isArray(e.activeColumn)?e.activeColumn:Sd(e.activeColumn):Array.isArray(e.activeColumn)?Sd(e.activeColumn[0]):Sd(e.activeColumn):[],u8=(e,t)=>{let n=a.reactive([]);const{getColumns:i}=Tl(e,t);if(e.columnPick==="disabled")return{activeColumns:n};const s=a.reactive(Z3(e)),o=()=>i().map((c,u)=>({index:u,_column:c,active:s.some(f=>f===u)}));return a.watchEffect(()=>{n=o();const c=Z3(e);n.forEach((u,f)=>{Object.assign(u,{active:c.some(d=>d===f)})})}),{activeColumns:n}},d8=(e,t=!0)=>{const n="HeadColumnResize";let i=function(M){return M.MOUSE_MOVE="onMousemove",M.MOUSE_OUT="onMouseout",M.MOUSE_DOWN="onMousedown",M}({}),s=!1,o=!1,c=!1,u=0,f=null,d=0;const h=a.ref(-1e3),m=M=>{o=!1,c=!1;const S=document.body.style;S.cursor="";const L=M.clientX-u,J=(f.resizeWidth??f.calcWidth)+L,x=Number(f.minWidth);f.resizeWidth=J>x?J:x,document.removeEventListener("mouseup",m),document.removeEventListener("mousemove",C),u=0,h.value=-1e3,f=null,M.target.closest("table").querySelectorAll("th").forEach(E=>E.style.setProperty("user-select","inherit"))},p=M=>ot.throttle(()=>{const S=M.clientX-u,L=(f.resizeWidth??f.calcWidth)+S;Number(f.minWidth)<L&&(h.value=M.clientX-u+d)},60),C=M=>{document.body.style.setProperty("cursor",""),p(M)()},b=(M,S)=>{var L,J;ot.isElement(M)&&((L=M.style)==null||L.setProperty("cursor",S),((J=M.childNodes)==null?void 0:J.length)>0&&M.childNodes.forEach(x=>b(x,S)))},v={[i.MOUSE_DOWN]:(M,S)=>{if(!s)return;o=!0,document.body.style.setProperty("cursor","col-resize"),f=S,u=M.clientX;const J=M.target.closest("table");d=u-J.getBoundingClientRect().left,document.addEventListener("mouseup",m),document.addEventListener("mousemove",C)},[i.MOUSE_MOVE]:(M,S)=>{o&&!c&&(c=!0);const L=M.target.closest("th");if(c&&L.style.setProperty("user-select","none"),!c){if(!L)return;const J=L.getBoundingClientRect();J.width>12&&J.right-M.pageX<8?(s=!0,b(L,"col-resize")):(b(L,""),s=!1)}},[i.MOUSE_OUT]:(M,S)=>{const L=M.target;c||b(L,"")}},T=M=>`${n}_${M}`,w=()=>{e.forEach(M=>{M.resizable!==!1&&Object.keys(v).forEach(S=>{const L=T(S);M.listeners.has(L)||M.listeners.set(L,[]),M.listeners.get(L).push(v[S])})})},k=()=>{e.forEach(M=>{Object.keys(v).forEach(S=>{const L=T(S);if(M.listeners.has(L)){const J=M.listeners.get(L);J.length=0}})})};t&&w();const I=a.computed(()=>({position:"absolute",top:0,bottom:0,left:0,width:"1px","background-color":"#ebeef5"}));return{registerResizeEvent:w,resetResizeEvents:k,dragOffsetX:h,dragOffsetXStyle:I}},f8=(e,t,n,i,s)=>{const{getColumns:o}=Tl(e,t),c=a.ref(200),u=a.ref(!1),f=a.computed(()=>e.pagination&&e.data.length),d=a.computed(()=>u.value),h=a.computed(()=>Pe({[Bt("table")]:!0,"has-footer":f.value,"has-scroll-y":u.value||e.virtualEnabled},t8(e.border))),m=Pe({[Bt("table-head")]:!0,"has-settings":!!e.settings}),p=a.computed(()=>o()),C=xd(e),b=a.computed(()=>({"--row-height":`${zt(C,"height",["thead"])}px`,"--scroll-head-left":`-${i.scrollTranslateX}px`,"--scroll-left":`${i.scrollTranslateX}px`})),v={[Bt("table-body")]:!0},T=a.computed(()=>Pe({[Bt("table-footer")]:!0,"is-hidden":!e.pagination||!e.data.length})),w=()=>e.height==="number"?`${e.height}px`:typeof e.height=="string"?e.height:"",k=()=>{if(p.value.every(j=>/^\d+\.?\d*(px)?$/ig.test(`${j.width}`))){const j=p.value.reduce((W,H)=>W+Number(`${H.width}`.replace(/px/ig,"")),0),A=u.value?Tr:0;return`${j+A}px`}return"100%"},I=a.computed(()=>({minHeight:A3(e.minHeight,"auto"),width:k(),maxWidth:"100%",height:w()})),M=(j,A)=>{const W=String(j);if(/^\d+\.?\d*$/.test(W))return Number(W);if(/^\d+\.?\d*px$/ig.test(W))return Number(W.replace("px",""));if(/^\d+\.?\d*%$/ig.test(W)&&typeof A=="number"){const H=Number(W.replace("%",""));return A*H/100}return A},S=a.reactive({display:"","min-height":"",height:"",maxHeight:""}),L=()=>e.showHead?M(e.headHeight,Oa):0,J=()=>{const j=M(e.height,c.value),A=L(),W=M(e.minHeight,c.value),H=e.pagination&&e.data.length?e.paginationHeight:0,F=j-A-H,ne=e.height!=="auto"?`${F}px`:!1,ge=W-A-H,ue=M(e.maxHeight,void 0),ae=typeof ue=="number"?`${ue-A-H}px`:!1;Object.assign(S,{display:s!=null&&s.length?"block":!1,"min-height":`${ge}px`,height:ne,maxHeight:ae})};a.onMounted(()=>{x(n==null?void 0:n.value)});const x=j=>{if(j){const{height:A}=j.parentElement.getBoundingClientRect();c.value=A,J(),O(j)}},O=j=>{if(!j)return;const A=e.virtualEnabled?`.${Bt("virtual-section")}`:`.${Bt("table-body-content")}`,W=j.querySelector(`.${Bt("table-body")}`);u.value=n8(W,A,0)};return{tableClass:h,headClass:m,contentClass:v,footerClass:T,wrapperStyle:I,contentStyle:S,headStyle:b,resetTableHeight:x,updateBorderClass:O,getColumnsWidthOffsetWidth:()=>{let j=0;return u.value&&(j=j+Tr),e.border.includes(pl.OUTER)&&!e.border.includes(pl.NONE)&&(j=j+2),j},hasFooter:f,hasScrollY:u,hasScrollYRef:d}},h8=(e,t)=>{var q,ie;const n=a.reactive([]),{getColumns:i}=Tl(e,t),s=_=>{if(/^\d+/.test(`${_.minWidth}`))return _.minWidth;let P=ea;return _.sort&&(P=P+18),_.filter&&(P=P+28),P},o=a.computed(()=>i()),c=_=>{var X,le;const P=(_==null?void 0:_.checked)||((X=e.settings)==null?void 0:X.checked)||[],Q=(_==null?void 0:_.fields)||((le=e.settings)==null?void 0:le.fields)||[];n.length=0,n.push(...o.value.map(Y=>({...Y,calcWidth:null,resizeWidth:null,minWidth:s(Y),listeners:new Map,isHidden:R3(Q,Y,P),[Gn.COL_UID]:Mi.v4(),[Gn.COL_SOURCE_DATA]:Y})))};typeof e.settings=="object"&&c(e.settings);const{dragOffsetXStyle:u,dragOffsetX:f,resetResizeEvents:d,registerResizeEvent:h}=d8(n,!0),{activeColumns:m}=u8(e,t);a.watch(()=>[e.settings],()=>{var _;(((_=e.settings)==null?void 0:_.checked)||[]).length&&c()});const p=ot.debounce(()=>{c(),d(),h()},120);a.watch(()=>o,()=>{p()},{immediate:!0,deep:!0});const C=e.columns.reduce((_,P,Q)=>{const X=zt(P,["field","type"],[P,Q]),le=H3(P.sort);return le?{..._||{},[X]:le==null?void 0:le.value}:_},null),b=a.reactive({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:m,settings:e.settings,setting:{size:(q=e.settings)==null?void 0:q.size,height:yl[(ie=e.settings)==null?void 0:ie.size]},defaultSort:C||e.defaultSort}),v=_=>{var P;return b.rowActions.has(_)?(P=b.rowActions.get(_))==null?void 0:P.isExpand:!1},T=()=>{Array.isArray(b.defaultSort)&&b.defaultSort.splice(0),b.defaultSort=C||e.defaultSort},w=(_,P=void 0)=>{const Q=_[$e.ROW_UID],X=typeof P=="boolean"?P:!v(Q);b.rowActions.set(Q,Object.assign({},b.rowActions.get(Q)??{},{isExpand:X})),ae()},k=()=>b.rowActions.has($e.ROW_SELECTION_ALL)?b.rowActions.get($e.ROW_SELECTION_ALL):e.selectionKey?A.every(_=>E(_)):!1,I=_=>{const P=_[$e.ROW_UID],{isSelected:Q=!1}=b.rowActions.get(P)||{};return Q},M=(_=I)=>{let P=!1,Q=!1;A.forEach(X=>{const le=_(X);!P&&!le&&(P=!0),!Q&&le&&(Q=!0)}),b.rowActions.set($e.ROW_SELECTION_INDETERMINATE,Q&&P),b.rowActions.set($e.ROW_SELECTION_ALL,Q&&!P)},S=()=>e.columns.some(_=>_.type==="selection"),L=()=>{S()&&M(_=>E(_))},J=(_=void 0)=>{const P=typeof _=="boolean"?_:!k();b.rowActions.set($e.ROW_SELECTION_ALL,P),b.rowActions.set($e.ROW_SELECTION_INDETERMINATE,!1),A.forEach((Q,X)=>{if(Ll(e,{row:Q,index:X,isCheckAll:!1})){const le=Q[$e.ROW_UID],Y=Object.assign({},b.rowActions.get(le)??{},{isSelected:P});b.rowActions.set(le,Y)}}),M(),ae(P),K(null,_,!0)},x=()=>{J(!1)},O=(_,P)=>{const Q=_[$e.ROW_UID];if(Q){const X=typeof P=="boolean"?P:!j(_,Q),le=Object.assign({},b.rowActions.get(Q)??{},{isSelected:X});b.rowActions.set(Q,le),P||b.rowActions.set($e.ROW_SELECTION_ALL,!1),M(),ae(),K(_,P,!1)}},E=(_,P=Q=>I(Q))=>typeof e.isSelectedFn=="function"?Reflect.apply(e.isSelectedFn,void 0,[{row:_,data:e.data}]):typeof e.selectionKey=="string"&&e.selectionKey.length?ot.get(_,e.selectionKey):P(_),j=(_,P,Q)=>E(_,()=>{var le;const X=P===void 0?_[$e.ROW_UID]:P;return Ll(e,{row:_,index:Q,isCheckAll:!1})&&k()?!0:b.rowActions.has(X)?(le=b.rowActions.get(X))==null?void 0:le.isSelected:!1}),A=a.reactive([]),W=a.computed(()=>n.some(_=>typeof _.rowspan=="function"||/^\d$/.test(`${_.rowspan}`)||typeof _.colspan=="function"||/^\d$/.test(`${_.colspan}`))),H=a.computed(()=>n.some(_=>_.type==="selection")),F=a.computed(()=>n.some(_=>_.type==="expand")),ne=a.computed(()=>n.some(_=>_.type==="index")),ge=(_=!1)=>{let P=null;const Q={},X=e.data.map(le=>({[$e.ROW_UID]:Mi.v4(),...le}));if(W.value||H.value||F.value||ne.value){const le=X.map((Y,fe)=>{const ve=z3(Y,e,fe);P=ve;const Ie={...Y,[$e.ROW_UID]:Y[$e.ROW_UID]||ve,[$e.ROW_SOURCE_DATA]:{...Y}};if(W.value){const je=Ce(Y,ve,fe,Q,P);Object.assign(Ie,{[$e.ROW_SKIP_CFG]:je})}return H.value&&Object.assign(Ie,{[$e.ROW_SELECTION]:j(Y,ve,fe)}),ne.value&&Object.assign(Ie,{[$e.ROW_INDEX]:fe}),F.value&&Object.assign(Ie,{[$e.ROW_EXPAND]:_?v(ve):!1}),Ie});A.length=0,A.push(...le),H.value&&L();return}A.length=0,A.push(...X)},ue=(_,P,Q,X)=>{const le=j(Q,Q[$e.ROW_UID],X);return _&&typeof P=="boolean"?P:le},ae=_=>{if(W.value||H.value||F.value||ne.value){let P=null;const Q={};A.forEach((X,le)=>{const Y=X[$e.ROW_UID];if(F.value&&Object.assign(X,{[$e.ROW_EXPAND]:v(X[$e.ROW_UID])}),W.value){const fe=Ce(X,Y,le,Q,P);P=X[$e.ROW_UID],Object.assign(X,{[$e.ROW_SKIP_CFG]:fe})}if(ne.value&&Object.assign(X,{[$e.ROW_INDEX]:le}),H.value){const fe=Ll(e,{row:X,index:le,isCheckAll:!1});Object.assign(X,{[$e.ROW_SELECTION]:ue(fe,_,X,le)})}}),H.value&&typeof _!="boolean"&&L();return}},Ce=(_,P,Q,X,le)=>{let Y=0;const fe=X[le]??{};return X[P]||(X[P]={}),n.forEach((ve,Ie)=>{var Te;const{colspan:je,rowspan:Re}=_3(ve,Ie,_,Q),Ve=ve[Gn.COL_UID],de=((Te=fe[Ve])==null?void 0:Te.skipRowLen)??0,be={[Ve]:{skipRowLen:0,skipRow:!1,skipCol:!1,skipColLen:0}};Y>0&&(be[Ve].skipColLen=Y,be[Ve].skipCol=!0,Y=Y-1),de>1?(be[Ve].skipRowLen=de-1,be[Ve].skipRow=!0):Re>1&&(be[Ve].skipRowLen=Re,be[Ve].skipRow=!1),je>1&&(be[Ve].skipColLen=je,Y=je-1),Object.assign(X[P],{...be})}),X[P]},Z=ot.debounce(ae,120);a.watch([W,H,F,ne],()=>{Z()});const K=(_,P,Q=!1)=>{if(e.asyncData&&e.rowKey){if(Q)e.data.forEach(X=>{ot.has(X,e.selectionKey)&&ot.set(X,e.selectionKey,!!P)});else if(ot.has(_,e.selectionKey)){const X=e.data.find(le=>ot.get(le,e.rowKey)===ot.get(_,e.rowKey));ot.set(X,e.selectionKey,!!P)}}},{fixedColumns:B,resolveColumnStyle:R,resolveColumnClass:G,fixedWrapperClass:re}=jd(e,n,!1);return{colgroups:n,dragOffsetXStyle:u,dragOffsetX:f,reactiveSchema:b,indexData:A,fixedWrapperClass:re,fixedColumns:B,resolveColumnStyle:R,resolveColumnClass:G,initIndexData:ge,updateIndexData:ae,setRowExpand:w,updateColGroups:c,clearSelection:x,toggleAllSelection:J,toggleRowSelection:O,getSelection:()=>A.filter(_=>j(_)),clearSort:T}},Y3=Ft(a.defineComponent({name:"Table",props:gv,emits:Sv,setup(e,t){const n=ft("table");let i=null,s=null,o=null;const c=new yv,u=a.reactive([]),{initColumns:f}=Tl(e,u);a.provide(b3,f),a.provide(v3,c);const d=a.ref(),h=a.ref(),m=a.ref(0),{colgroups:p,dragOffsetXStyle:C,dragOffsetX:b,reactiveSchema:v,indexData:T,fixedColumns:w,resolveColumnStyle:k,resolveColumnClass:I,setRowExpand:M,initIndexData:S,fixedWrapperClass:L,clearSelection:J,toggleAllSelection:x,toggleRowSelection:O,getSelection:E,clearSort:j,updateColGroups:A}=h8(e,u),{pageData:W,localPagination:H,resolvePageData:F,watchEffectFn:ne}=kv(e,T),{tableClass:ge,headClass:ue,contentClass:ae,footerClass:Ce,wrapperStyle:Z,contentStyle:K,headStyle:B,hasScrollYRef:R,updateBorderClass:G,resetTableHeight:re,getColumnsWidthOffsetWidth:oe,hasFooter:q}=f8(e,u,d,v,W),{resolveClassName:ie}=ye(),_=a.computed(()=>({hasScrollY:R.value})),P=new c8(e,t,v,p,_,n),Q=()=>{const Fe=d.value.querySelector(`.${ie("table-body-content")}`),ze=Fe.querySelector("table");if(ze){const Be=ze.scrollWidth,lt=Fe.clientWidth;m.value=Be-lt}};a.watch(()=>[e.data,e.pagination,e.height,e.maxHeight,e.minHeight],()=>{S(e.reserveExpand),ne(o,i,s),a.nextTick(()=>{re(d.value),G(d.value)})},{immediate:!0,deep:!0}),a.watchEffect(()=>{if((d==null?void 0:d.value)instanceof HTMLElement){const Fe=oe();kd(d.value,p,20,Fe),Q()}}),P.on(An.ON_SORT_BY_CLICK,Fe=>{const{sortFn:ze,column:Be,index:lt,type:et}=Fe;typeof ze=="function"&&(i=ze,s=Be,Object.assign(s,{[Gn.SORT_TYPE]:et}),F(o,i,s)),t.emit(Dt.COLUMN_SORT,{column:a.unref(Be[Gn.COL_SOURCE_DATA]),index:lt,type:et})}).on(An.ON_FILTER_CLICK,Fe=>{const{filterFn:ze,checked:Be,column:lt,index:et}=Fe;typeof ze=="function"&&(o=ze,F(o,i,s)),t.emit(Dt.COLUMN_FILTER,{checked:Be,column:a.unref(lt[Gn.COL_SOURCE_DATA]),index:et})}).on(An.ON_SETTING_CHANGE,Fe=>{const{checked:ze=[],size:Be,height:lt,fields:et}=Fe;a.nextTick(()=>{A({checked:ze,fields:et}),G(d.value);const pt=oe();ze.length&&kd(d.value,p,ea,pt),t.emit(Dt.SETTING_CHANGE,{checked:ze,size:Be,height:lt,fields:et})})}).on(An.ON_ROW_EXPAND_CLICK,Fe=>{const{row:ze,column:Be,index:lt,rows:et,e:pt}=Fe;t.emit(Dt.ROW_EXPAND_CLICK,{row:Ss(ze),column:F3(Be),index:lt,rows:et,e:pt}),M(ze,!ze[$e.ROW_EXPAND])}).on(An.ON_ROW_CHECK,({row:Fe,isAll:ze,index:Be,value:lt})=>{ze?(x(lt),t.emit(Dt.ROW_SELECT_ALL,{checked:lt,data:e.data})):(O(Fe,lt),t.emit(Dt.ROW_SELECT,{row:Ss(Fe),index:Be,checked:lt,data:e.data})),t.emit(Dt.ROW_SELECT_CHANGE,{row:Ss(Fe),isAll:ze,index:Be,checked:lt,data:e.data})});const X=Fe=>{const ze=v.pos.bottom??0,Be=Fe[1],{translateX:lt,translateY:et,pos:pt={}}=Be;v.scrollTranslateY=et,v.scrollTranslateX=lt,v.pos=pt;const{bottom:Ue}=pt;Ue<=2&&ze>Ue&&rs(60,()=>{t.emit(Dt.SCROLL_BOTTOM,{...pt,translateX:lt,translateY:et})},!0)(),Q()},le=(Fe={left:0,top:0})=>{var ze,Be;(Be=(ze=h.value)==null?void 0:ze.scrollTo)==null||Be.call(ze,Fe)};a.onMounted(()=>{if(e.observerResize){let Fe=P3(d.value,()=>{if(!d.value)return;(e.height==="100%"||e.height==="auto")&&re(d.value),G(d.value);const ze=oe();kd(d.value,p,20,ze)},180,!0,e.resizerWay);Fe.start(),a.onBeforeUnmount(()=>{Fe.disconnect(),Fe=null})}}),a.onBeforeUnmount(()=>{P.destroy()});const Y=()=>d.value;t.expose({setRowExpand:M,clearSelection:J,toggleAllSelection:x,toggleRowSelection:O,getSelection:E,clearSort:j,scrollTo:le,getRoot:Y});const fe=a.computed(()=>({...ae,"__is-empty":!W.length})),ve=a.computed(()=>({[ie("table-body-content")]:!0,[ie("stripe")]:e.stripe,"with-virtual-render":e.virtualEnabled})),Ie={column_drag_line:!0,"offset-x":!0},je=a.computed(()=>({...C.value,left:`${b.value-v.scrollTranslateX}px`})),Re={"scroll-loading":!0,_bottom:!0},Ve=a.computed(()=>({[ie("fixed-bottom-border")]:!0,"_is-empty":!e.data.length})),de={zIndex:-1,width:0,height:0,display:"none"},be=a.computed(()=>({"--footer-height":q.value?`${e.paginationHeight}px`:"0"})),Te=a.computed(()=>({right:R.value?`${Tr}px`:0,...be.value})),{renderScrollLoading:Je}=xv(e,t),rt=a.computed(()=>e.virtualEnabled?{}:{scrollXName:"",scrollYName:""}),it=a.computed(()=>({"--prepend-left":`${v.scrollTranslateX}px`,position:"sticky",top:0,zIndex:2,...e.prependStyle||{}})),ut=()=>t.slots.prepend?a.createVNode("div",{style:it.value,class:"prepend-row"},[t.slots.prepend()]):null;return()=>{var Fe,ze;return a.createVNode("div",{class:ge.value,style:Z.value,ref:d},[a.createVNode("div",{class:ue,style:B.value},[P.renderTableHeadSchema()]),a.createVNode(Ir,a.mergeProps({ref:h,lineHeight:P.getRowHeight,class:fe.value,style:K,list:W},rt.value,{contentClassName:ve.value,onContentScroll:X,throttleDelay:0,scrollEvent:!0,rowKey:e.rowKey,enabled:e.virtualEnabled,keepAlive:!0}),{beforeContent:()=>ut(),default:Be=>P.renderTableBodySchema(Be.data||W),afterSection:()=>a.createVNode("div",{class:Ve.value},null)}),a.createVNode("div",{class:L,style:Te.value},[w.value.map(({isExist:Be,colPos:lt,column:et})=>Be?"":a.createVNode("div",{class:I(et,v.scrollTranslateX,m.value),style:k(lt)},null)),a.createVNode("div",{class:Ie,style:je.value},null),a.createVNode("div",{class:Re},[Je()])]),a.createVNode("div",{class:Ce.value,style:be.value},[q.value&&P.renderTableFooter(H.value)]),a.createVNode("div",{style:de},[(ze=(Fe=t.slots).default)==null?void 0:ze.call(Fe)])])}}}),{Column:pv}),kr=12;function g8(e){const t=a.reactive({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:(s=[])=>{t.curPage=1,t.totalSize=s.length,t.totalPage=Math.ceil(t.totalSize/t.pageSize)||1;const o=[];if(t.pageSize>0)for(let c=0;c<t.totalSize;c+=t.pageSize)o.push(s.slice(c,c+t.pageSize));t.renderListPaged.splice(0,t.renderListPaged.length,...o),t.curPageList.splice(0,t.curPageList.length,...t.renderListPaged[t.curPage-1]||[])},pageChange:s=>{t.curPage=s,t.curPageList.splice(t.curPageList.length,0,...t.renderListPaged[t.curPage-1]||[]),t.isPageLoading=!1}}}function m8(e){const{useGroup:t,saveKey:n,displayKey:i,list:s}=a.toRefs(e),o=a.ref([]),c=a.ref({});return a.watch([t,n,i,s],()=>{o.value=[];let u=a.markRaw(s.value);t.value&&(u=u.reduce((f,d)=>{let h=[];return d.children&&(h=d.children.map(m=>({group:{groupId:d[n.value],groupName:d[i.value]},...m}))),f.concat(h)},[])),o.value=u,c.value=u.reduce((f,d)=>(f[d[n.value]]=d,f),{})},{immediate:!0,deep:!0}),{flatList:o,saveKeyMap:c}}const U3=e=>{const t=e.length;let n=0;for(let i=0;i<t;i++)e.charCodeAt(i)&65280&&(n+=1),n+=1;return n},K3=(e,t,n)=>{a.watch([n,t],()=>{s()},{flush:"post"});const i=a.ref(null),s=()=>{t.value&&(i.value=null,setTimeout(()=>{const o=Array.from(e.value.querySelectorAll(".tag-item")),c=o.findIndex((u,f)=>f?o[f-1].offsetTop!==u.offsetTop:!1);i.value=c>0?c-1:null}))};return{overflowTagIndex:i}},X3=a.defineComponent({name:"ListTagRender",props:{node:y.object,searchKey:y.oneOfType([y.string,y.arrayOf(y.string)]),displayKey:y.string,searchKeyword:y.string,tpl:{type:Function}},render(){const{resolveClassName:e}=ye(),t=i=>{if(this.searchKeyword){const s=new RegExp(`(${this.searchKeyword})`,"i");return i.replace(s,'<strong class="highlight-text">$1</strong>')}return i};if(this.tpl)return this.tpl(this.node,t,a.h,this);const n=this.node[this.displayKey];return a.createVNode("div",{class:`${e("selector-node")}`},[a.createVNode("span",{class:"text",innerHTML:t(n)},[n])])}}),p8=()=>({modelValue:y.arrayOf(y.string).def([]),placeholder:y.string.def(""),list:y.arrayOf(y.object).def([]),disabled:y.bool.def(!1),tooltipKey:y.string.def(""),saveKey:y.string.def("id"),displayKey:y.string.def("name"),hasDeleteIcon:y.bool.def(!1),clearable:y.bool.def(!0),trigger:ke("treeTriggerType",{}).def("search"),searchKey:y.oneOfType([y.string,y.arrayOf(y.string)]).def("name"),useGroup:y.bool.def(!1),allowCreate:y.bool.def(!1),maxData:y.number.def(-1),maxResult:y.number.def(10),contentMaxHeight:y.number.def(300),contentWidth:y.number.def(190),separator:y.string.def(""),allowNextFocus:y.bool.def(!0),allowAutoMatch:y.bool.def(!1),showClearOnlyHover:y.bool.def(!1),isAsyncList:y.bool.def(!1),leftSpace:y.number.def(0),createTagValidator:{type:Function},filterCallback:{type:Function},tagTpl:{type:Function},tpl:{type:Function},pasteFn:{type:Function},withValidate:{type:Boolean,default:!0},popoverProps:{type:Object,default:()=>({})},collapseTags:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:()=>({})}}),y8=a.defineComponent({name:"TagRender",directives:{bkTooltips:ka},props:{node:y.object,displayKey:y.string,tpl:{type:Function},hasTips:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:()=>({})}},setup(e){const t=a.ref(),n=a.ref(!1),i=a.computed(()=>({boundary:"window",theme:"light",distance:12,content:e.node[e.displayKey],disabled:e.hasTips||!n.value,...e.tagOverflowTips}));return a.onMounted(()=>{n.value=X4(t.value)}),{overflowTips:i,tagRef:t}},render(){return this.tpl?this.tpl(this.node,a.h,this):a.withDirectives(a.createVNode("div",{class:"tag",ref:"tagRef"},[a.createVNode("span",{class:"text"},[this.node[this.displayKey]])]),[[a.resolveDirective("bk-tooltips"),this.overflowTips]])}}),C8=a.defineComponent({name:"TagInput",directives:{bkTooltips:ka},props:p8(),emits:["update:modelValue","change","select","focus","blur","remove","removeAll","input"],setup(e,{emit:t}){const n=Fn(),i=ft("tagInput"),s=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),o=a.reactive({isShow:!1,width:190,offset:{mainAxis:4,crossAxis:0},...e.popoverProps}),{resolveClassName:c}=ye(),{maxResult:u}=a.toRefs(e),{pageState:f,initPage:d,pageChange:h}=g8(u),m=a.ref(""),p=a.ref(null),C=a.ref(null),b=a.ref(null),v=a.ref(null),T=a.ref(null),w=a.ref(null),k=a.computed(()=>!e.disabled&&e.hasDeleteIcon),I=a.computed(()=>e.maxData===1),M=a.computed(()=>x.selectedTagList.length===0&&m.value===""&&!s.isEdit),S=a.computed(()=>e.placeholder||i.value.placeholder),L=a.computed(()=>e.clearable&&!e.disabled&&x.selectedTagList.length!==0&&(e.showClearOnlyHover?s.isHover:!0)),J=a.computed(()=>({[`${c("tag-input-trigger")}`]:!0,active:s.isEdit,disabled:e.disabled})),x=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),O=a.computed(()=>x.selectedTagList.map(de=>de[e.saveKey])),{flatList:E,saveKeyMap:j}=m8(e),A=a.computed(()=>{if(e.useGroup){const de={};return f.curPageList.forEach((be,Te)=>{be.__index__=Te,de[be.group.groupId]||(de[be.group.groupId]={id:be.group.groupId,name:be.group.groupName,children:[]}),de[be.group.groupId].children.push(be)}),Object.keys(de).map(be=>de[be])}return f.curPageList});a.watch([()=>E.value],()=>{a.nextTick(()=>{ge()})},{deep:!0}),a.watch(()=>e.modelValue,de=>{var be;Ce(O.value,de)||(a.nextTick(()=>{ge()}),e.withValidate&&((be=n==null?void 0:n.validate)==null||be.call(n,"change")))}),a.watch(m,ot.debounce(()=>{const de=f.curPageList.length!==0,{value:be}=m;be!==""&&de||be===""&&e.trigger==="focus"&&de?o.isShow=!0:(e.trigger!=="focus"||!de)&&(o.isShow=!1)},150)),a.watch(()=>o.isShow,de=>{W(),de&&T.value&&(a.nextTick(()=>{T.value.scrollTop=0}),T.value.removeEventListener("scroll",H),T.value.addEventListener("scroll",H))}),a.onMounted(()=>{ge()});const W=()=>{var de;o.offset.crossAxis=I.value?0:(de=v.value)==null?void 0:de.offsetLeft},H=()=>{if(f.isPageLoading||T.value.scrollTop===0)return;const{scrollTop:de,offsetHeight:be,scrollHeight:Te}=T.value;if(de+be>=Te){const Je=f.curPage+1;Je<=f.totalPage&&(f.isPageLoading=!0,setTimeout(()=>{h(Je)},500))}},F=()=>{var be;return Array.from(((be=b.value)==null?void 0:be.childNodes)||[]).filter(Te=>![Node.TEXT_NODE,Node.COMMENT_NODE].includes(Te.nodeType))},ne=de=>{if(!e.disabled){if(de!=null&&de.target){const{className:be}=de.target;(be.indexOf(`${c("tag-input-trigger")}`)>-1||be.indexOf("tag-list")>-1)&&b.value.appendChild(v.value)}clearTimeout(w.value),I.value&&O.value.length&&(x.tagListCache=[...O.value],x.selectedTagListCache=[...x.selectedTagList],m.value=x.selectedTagListCache[0][e.saveKey],je(x.selectedTagList[0],0),G()),s.isEdit=!0,a.nextTick(()=>{var be;(be=p.value)==null||be.focus(),e.trigger==="focus"&&x.localList.length!==0&&(ue(),o.isShow?W():o.isShow=!0)})}},ge=()=>{const{saveKey:de,modelValue:be,displayKey:Te,allowCreate:Je,trigger:rt,isAsyncList:it}=e;if(x.selectedTagList=[],x.localList=E.value,be.length){const ut={};x.selectedTagList=be.map(Fe=>{const ze=j.value[Fe];return ut[Fe]=1,!ze&&Je?{[de]:Fe,[Te]:Fe}:ze}).filter(Fe=>Fe),I.value||(x.localList=x.localList.filter(Fe=>!ut[Fe[de]]))}if(it&&m.value){ue(m.value),f.curPageList.length&&(o.isShow=!0);return}rt==="focus"&&ue()},ue=(de="")=>{const{searchKey:be,filterCallback:Te}=e,Je=de.toLowerCase().trim();if(Je===""){d(x.localList);return}let rt=[];typeof Te=="function"?rt=Te(Je,be,x.localList)||[]:Array.isArray(be)?rt=x.localList.filter(it=>be.some(ut=>it[ut].toLowerCase().indexOf(Je)>-1)):rt=x.localList.filter(it=>it[be].toLowerCase().indexOf(Je)>-1),d(rt)},ae=(de,be)=>{const Te={[`${c("selector-actived")}`]:!0,[`${c("selector-selected")}`]:O.value.includes(de[e.saveKey])};return e.useGroup?Te[`${c("selector-actived")}`]=de.__index__===s.focusItemIndex:Te[`${c("selector-actived")}`]=be===s.focusItemIndex,Te};function Ce(de,be){return de.length!==be.length?!1:be.every((Te,Je)=>de[Je]===Te)}const Z=()=>{x.tagListCache=[],x.selectedTagListCache=[],x.selectedTagList=[]},K=()=>{m.value=""},B=()=>{if(I.value)return 0;const be=F().findIndex(({id:Te})=>Te==="tagInputItem");return be>=0?be:0},R=(de,be,Te=!1)=>{if(!be||!de)return;let Je=be;Te&&(Je=be.nextElementSibling||null),be.parentNode.insertBefore(de,Je)},G=de=>{const{maxData:be,trigger:Te,allowCreate:Je}=e;if(be===-1||be>O.value.length){const{value:rt}=de!=null&&de.target?de.target:m,it=U3(rt);it?(ue(rt),p.value.style.width=`${it*kr}px`):Te==="focus"&&ue()}else oe(),m.value="",o.isShow=!1;s.isEdit=!0,s.focusItemIndex=Je?-1:0,t("input",m.value)},re=()=>{var de;o.width=I.value?(de=C.value)==null?void 0:de.clientWidth:e.contentWidth,t("focus")},oe=()=>{w.value=setTimeout(()=>{var be;const de=m.value;if(K(),s.isEdit=!1,I.value){const[Te]=x.tagListCache;de&&de===Te&&x.selectedTagListCache.length?Ie(x.selectedTagListCache[0],"select"):_("remove")}else if(e.allowAutoMatch&&de){const Te=f.curPageList.find(Je=>Array.isArray(e.searchKey)?e.searchKey.map(it=>Je[it]).includes(de):Je[e.searchKey]===de);Te?q(Te,"select"):e.allowCreate&&q(de,"custom")}o.isShow=!1,t("blur",de,O.value),(be=n==null?void 0:n.validate)==null||be.call(n,"blur")},200)},q=(de,be,Te)=>{Te==null||Te.stopPropagation(),!(!de||de.disabled)&&(I.value&&Z(),Ie(de,be),_("select"),K(),o.isShow=!1)},ie=(de,be,Te)=>{Te==null||Te.stopPropagation(),je(de,be),K(),_("remove",de),p.value.style.width=`${kr}px`},_=(de,be)=>{t(de,be),t("update:modelValue",O.value),t("change",O.value)},P=de=>{de.stopPropagation();const be=x.selectedTagList;x.selectedTagList=[];const Te=be.filter(Je=>j.value[Je[e.saveKey]]);(e.allowCreate&&Te.length!==0||!e.allowCreate)&&!I.value&&x.localList.push(...Te),_("removeAll")},Q=()=>{const de={height:T.value.clientHeight,yAxis:T.value.getBoundingClientRect().y};a.nextTick(()=>{const be=T.value.querySelector(`.${c("selector-actived")}`);if(!be)return;const Te={height:be.clientHeight,yAxis:be.getBoundingClientRect().y};Te.yAxis<de.yAxis&&(T.value.scrollTop=T.value.scrollTop-(de.yAxis-Te.yAxis));const Je=Te.yAxis+Te.height-de.yAxis;Je>de.height&&(T.value.scrollTop=T.value.scrollTop+Je-de.height)})},X=(de,be)=>{const Te=F();R(v.value,Te[de-1]),x.selectedTagList.splice(de-1,1),ne();const Je=j.value[be[e.saveKey]];(e.allowCreate&&Je||!e.allowCreate)&&!I.value&&x.localList.push(be),p.value=`${kr}px`,_("remove")},le=de=>{if(f.isPageLoading)return;let be;const Te=de.target.value,Je=U3(Te),rt=B(),it=F();switch(de.code){case"ArrowUp":if(de.preventDefault(),!o.isShow)return;s.focusItemIndex=s.focusItemIndex-1,s.focusItemIndex=s.focusItemIndex<0?-1:s.focusItemIndex,s.focusItemIndex===-1&&(s.focusItemIndex=f.curPageList.length-1),Q();break;case"ArrowDown":if(de.preventDefault(),!o.isShow)return;s.focusItemIndex=s.focusItemIndex+1,s.focusItemIndex=s.focusItemIndex>f.curPageList.length-1?f.curPageList.length:s.focusItemIndex,s.focusItemIndex===f.curPageList.length&&(s.focusItemIndex=0),Q();break;case"ArrowLeft":if(s.isEdit=!0,!Je){if(rt<1)return;R(v.value,it[rt-1]),ne()}break;case"ArrowRight":if(s.isEdit=!0,!Je){if(rt===it.length-1)return;R(it[rt+1],v.value),ne()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&o.isShow||e.allowCreate&&s.focusItemIndex>=0&&o.isShow?q(f.curPageList[s.focusItemIndex],"select",de):e.allowCreate&&m.value.trim()&&q(m.value,"custom",de),de.preventDefault();break;case"Backspace":rt!==0&&!m.value&&(be=x.selectedTagList[rt-1],X(rt,be));break}},Y=de=>{const be=[],Te=de.split(";"),Je=/^[a-zA-Z][a-zA-Z_]*/g;return Te.forEach(rt=>{const it=rt.match(Je);if(it){const ut=it.join("");be.push({[e.saveKey]:ut,[e.displayKey]:ut})}}),be},fe=de=>{if(de.preventDefault(),I.value)return!1;const{maxData:be,saveKey:Te,displayKey:Je,pasteFn:rt,allowCreate:it}=e,ut=de.clipboardData.getData("text");let ze=(rt?rt(ut):Y(ut)).map(Be=>Be[Te]);if(ze.length){const Be=F(),lt=B(),et=x.localList.map(Ue=>Ue[Te]);if(ze=ze.filter(Ue=>{const Qt=(Ue==null?void 0:Ue.trim())&&!O.value.includes(Ue);return it?Qt:Qt&&et.includes(Ue)}),be!==-1){const Ue=x.selectedTagList.length;if(Ue<be){const Qt=be-Ue;ze.length>Qt&&(ze=[...ze.slice(0,Qt)])}else ze=[]}const pt=it?ze.map(Ue=>x.localList.find(oa=>oa[Te]===Ue)??{[Te]:Ue,[Je]:Ue}):x.localList.filter(Ue=>ze.includes(Ue[Te]));ze.length&&(x.selectedTagList.splice(lt,0,...pt),R(v.value,Be[lt]),p.value.style.width=`${kr}px`,x.localList=x.localList.filter(Ue=>!ze.includes(Ue[Te])),_("select"),ne())}},ve=de=>{e.disabled||(R(v.value,de.currentTarget,!0),p.value.style.width=`${kr}px`,o.isShow&&W())},Ie=(de,be)=>{if(x.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:Te,saveKey:Je,displayKey:rt,createTagValidator:it}=e,ut=B();let Fe=1,ze=!1,Be;const lt=et=>typeof it=="function"?it(et):!0;if(be==="custom")if(Te){let et=de.split(Te);et=et.filter(Ue=>(Ue==null?void 0:Ue.trim())&&!O.value.includes(Ue)&&lt(Ue));const pt=et.map(Ue=>j.value[Ue]||{[Je]:Ue,[rt]:Ue});et.length&&(x.selectedTagList.splice(ut,0,...pt),Fe=pt.length,ze=!0)}else{const et=typeof de=="object";if(Be=et?de[Je]:de.trim(),Be=Be.replace(/\s+/g,""),Be!==void 0&&!O.value.includes(Be)&&lt(Be)){const pt=j.value[Be]||(et?de:{[Je]:Be,[rt]:Be});x.selectedTagList.splice(ut,0,pt),ze=!0}}else de&&(Be=de[Je],Be!==void 0&&!O.value.includes(Be)&&(x.selectedTagList.splice(ut,0,de),ze=!0));ze&&a.nextTick(()=>{for(let et=1;et<=Fe;et++){const Ue=F()[ut+et];R(Ue,v.value)}if(p.value.style.width=`${kr}px`,!I.value){e.allowNextFocus&&ne();const et=O.value.reduce((pt,Ue)=>(pt[Ue]=1,pt),{});x.localList=x.localList.filter(pt=>!et[pt[Je]])}})},je=(de,be)=>{x.selectedTagList.splice(be,1);const Te=j.value[de[e.saveKey]];(e.allowCreate&&Te||!e.allowCreate)&&!I.value&&x.localList.push(de)},Re=a.computed(()=>e.collapseTags?e.collapseTags&&!s.isEdit:e.collapseTags),{overflowTagIndex:Ve}=K3(C,Re,O);return{popoverProps:o,...a.toRefs(s),...a.toRefs(x),...a.toRefs(f),isShowPlaceholder:M,isShowClear:L,placeholderText:S,curInputValue:m,renderList:A,showTagClose:k,tagInputRef:p,bkTagSelectorRef:C,tagListRef:b,tagInputItemRef:v,selectorListRef:T,triggerClass:J,overflowTagIndex:Ve,localCollapseTags:Re,focusInputTrigger:ne,activeClass:ae,handleInput:G,handleFocus:re,handleBlur:oe,handleTagSelected:q,handleTagRemove:ie,handleClear:P,tagFocus:ve,handleKeydown:le,handlePaste:fe,resolveClassName:c}},render(){return a.createVNode("div",{class:`${this.resolveClassName("tag-input")}`,ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode($t,a.mergeProps({theme:`light ${this.resolveClassName("tag-input-popover-content")}`,trigger:"manual",placement:"bottom-start",arrow:!1},this.popoverProps),{default:()=>{var e,t;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`}},[this.selectedTagList.map((n,i)=>{const s={boundary:"window",theme:"light",distance:12,content:n[this.tooltipKey],disabled:!this.tooltipKey},o=this.localCollapseTags&&this.overflowTagIndex&&i>=this.overflowTagIndex;return a.withDirectives(a.createVNode("li",{class:"tag-item",style:{display:o?"none":""},onClick:this.tagFocus},[a.createVNode(y8,{node:n,tpl:this.tagTpl,displayKey:this.displayKey,hasTips:!!this.tooltipKey,tagOverflowTips:this.tagOverflowTips},null),this.showTagClose?a.createVNode(rn,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,n,i)},null):null]),[[a.resolveDirective("bk-tooltips"),s]])}),a.withDirectives(a.createVNode("li",{ref:"tagInputItemRef",id:"tagInputItem",class:"tag-input-item",role:"input"},[a.withDirectives(a.createVNode("input",{type:"text",class:"tag-input",ref:"tagInputRef","onUpdate:modelValue":n=>this.curInputValue=n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onPaste:this.handlePaste},null),[[a.vModelText,this.curInputValue]])]),[[a.vShow,this.isEdit]]),!!this.overflowTagIndex&&this.localCollapseTags&&a.createVNode("li",{class:"tag-item"},[a.createVNode("div",{class:"tag"},[a.createVNode("span",{class:"text"},[a.createTextVNode("+"),this.selectedTagList.length-this.overflowTagIndex])])])]),a.withDirectives(a.createVNode("p",{class:"placeholder"},[this.placeholderText]),[[a.vShow,this.isShowPlaceholder]]),((t=(e=this.$slots)==null?void 0:e.suffix)==null?void 0:t.call(e))??(this.isShowClear&&a.createVNode(an,{class:"clear-icon",onClick:this.handleClear},null))])},content:()=>a.createVNode("div",{class:`${this.resolveClassName("selector-list")}`},[a.createVNode("ul",{ref:"selectorListRef",style:{"max-height":`${this.contentMaxHeight}px`},class:"outside-ul"},[this.renderList.map((e,t)=>this.useGroup?a.createVNode("li",{class:`${this.resolveClassName("selector-group-item")}`},[a.createVNode("span",{class:"group-name"},[e.name,a.createTextVNode(" ("),e.children.length,a.createTextVNode(")")]),a.createVNode("ul",{class:`${this.resolveClassName("selector-group-list-item")}`},[e.children.map((n,i)=>a.createVNode("li",{class:[`${this.resolveClassName("selector-list-item")}`,{disabled:n.disabled},this.activeClass(n,i)],onClick:this.handleTagSelected.bind(this,n,"select")},[a.createVNode(X3,{node:n,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]))])]):a.createVNode("li",{class:[`${this.resolveClassName("selector-list-item")}`,{disabled:e.disabled},this.activeClass(e,t)],onClick:this.handleTagSelected.bind(this,e,"select")},[a.createVNode(X3,{node:e,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)])),this.isPageLoading?a.createVNode("li",{class:`${this.resolveClassName("selector-list-item")} loading`},[a.createVNode(Gi,{theme:"primary",size:La.Small},null)]):null])])})])}}),q3=Ye(C8),b8={direction:P0(),align:fu().def(Co.CENTER),color:y.string.def("#dde4eb"),width:y.number.def(1),type:z0()},e6=Ye(a.defineComponent({name:"Divider",props:b8,render(){const e=()=>this.direction==="vertical"?{borderRight:`${this.width}px ${this.type} ${this.color}`}:{borderBottom:`${this.width}px ${this.type} ${this.color}`},{resolveClassName:t}=ye();let n;return this.$slots.default&&(n=a.createVNode("div",{class:[t("divider-info"),t(`divider-info-${this.align}`)]},[this.$slots.default()])),a.createVNode("div",{class:[t("divider"),t(`divider-${this.direction}`)],style:e()},[n])}}));var Sl=(e=>(e.CARD="card",e.BORDER_CARD="border-card",e.UNBORDER_CARD="unborder-card",e.CARD_TAB="card-tab",e.CARD_GRID="card-grid",e))(Sl||{}),ks=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e))(ks||{});const t6=ke("position",{}).def("top");var n6=(e=>(e.REPLACE="replace",e.INSERT="insert",e))(n6||{});const i6=ke("sortType",{}).def("replace"),v8={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},w8={name:y.oneOfType([y.number,y.string]).def(""),label:y.string||y.func,tips:y.string,closable:y.bool,visible:y.bool.def(!0),disabled:y.bool,sortable:y.bool,renderDirective:du(),panel:y.string||y.func},N8={active:y.oneOfType([y.number,y.string]).def(""),type:ke("type",{}).def("border-card"),tabPosition:t6,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:i6,labelHeight:y.number.def(50),scrollStep:y.number.def(200),extCls:y.string.def(""),validateActive:y.bool.def(!0),showHeader:y.bool.def(!0),changeOnHover:y.bool.def(!1),changeOnHoverDelay:y.number.def(1e3),activeBarSize:y.number.def(2),activeBarColor:y.string.def("#3a84ff")},M8={active:y.oneOfType([y.number,y.string]).def(""),type:ke("type",{}).def("border-card"),activeBarColor:y.string.def("#3a84ff"),activeBarSize:y.number.def(2),panels:{type:Array,default:()=>[]},tabPosition:t6,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:i6,labelHeight:y.number.def(50),scrollStep:y.number.def(200),validateActive:y.bool.def(!0),changeOnHover:y.bool.def(!1),changeOnHoverDelay:y.number.def(1e3),...v8},a6=a.defineComponent({name:"TabNav",directives:{bkTooltips:ka},props:M8,setup(e){const t=a.ref(null),n=a.computed(()=>{const h={width:0,height:0,bottom:0,left:0};if(!t.value)return h;if([ks.LEFT,ks.RIGHT].includes(e.tabPosition)){const{clientHeight:m,offsetTop:p}=t.value,C={width:`${e.activeBarSize}px`,height:`${m}px`,top:`${p}px`,background:e.activeBarColor};return e.tabPosition===ks.LEFT?C.right=0:C.left=0,C}if(e.type===Sl.UNBORDER_CARD){const{clientWidth:m,offsetLeft:p}=t.value;return{width:`${m}px`,height:`${e.activeBarSize}px`,left:`${p}px`,bottom:0,background:e.activeBarColor}}return h}),i=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const h=[];let m=!1;return e.panels.filter((p,C)=>{if(!p.props)return null;const{name:b,label:v,closable:T,visible:w,disabled:k,sortable:I,tips:M}=p.props;if(!w)return!1;e.active===b&&(m=!0);const S=L=>p.slots.label?a.h(p.slots.label):[void 0,""].includes(L)?`选项卡${C+1}`:typeof L=="string"?L:typeof L=="function"?a.h(L):L;return h.push({name:b,closable:T,visible:w,disabled:k,sortable:I,tips:M,tabLabel:S(v)}),!0}),!m&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),h}),s=a.ref(-1),o=a.ref(-1),c=a.ref(""),u=(h,m)=>h===m,f={handleTabAdd(h){e.tabAdd(h)},dragstart(h,m){o.value=h,c.value=e.guid,Object.assign(m.dataTransfer,{effectAllowed:"move"}),e.tabDrag(h,m)},dragenter(h){u(c.value,e.guid)&&(s.value=h)},dragend(){s.value=-1,o.value=-1,c.value=null},drop(h,m){if(!u(c.value,e.guid))return!1;e.tabSort(o.value,h,m)},handleTabChange(h){e.tabChange(h)},handleTabRemove(h,m){e.tabRemove(h,m)}},{resolveClassName:d}=ye();return{...f,activeRef:t,activeBarStyle:n,navs:i,dragenterIndex:s,dragStartIndex:o,draggingEle:c,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4),resolveClassName:d}},render(){const{active:e,closable:t,addable:n,sortable:i,sortType:s,labelHeight:o,dragstart:c,dragenter:u,dragend:f,drop:d}=this,h=()=>this.navs.map((v,T)=>{if(!v)return null;const{name:w,disabled:k,tabLabel:I}=v,M=()=>{const L=[this.resolveClassName("tab-header-item")];return k&&L.push(this.resolveClassName("tab-header--disabled")),e===w&&L.push(this.resolveClassName("tab-header--active")),L.join(" ")},S=(L,J)=>!k&&(L||J);return a.withDirectives(a.createVNode("div",{key:w,onClick:()=>!k&&this.handleTabChange(w),draggable:S(v.sortable,i),onDragstart:L=>c(T,L),ref:e===w?"activeRef":"",onDragenter:L=>{L.preventDefault(),u(T)},onDragleave:L=>{L.preventDefault()},onDragover:L=>{L.preventDefault()},onDragend:L=>{L.preventDefault(),f()},onDrop:L=>{L.preventDefault(),d(T,s)},class:M()},[a.createVNode("div",null,[I]),S(v.closable,t)?a.createVNode("span",{class:this.resolveClassName("tab-header--close"),onClick:()=>this.handleTabRemove(T,v)},[a.createVNode(an,null,null)]):""]),[[a.resolveDirective("bk-tooltips"),{content:v.tips,disabled:!v.tips}]])}),m=()=>{var T,w;const v=[];return typeof this.$slots.add=="function"?v.push((w=(T=this.$slots).add)==null?void 0:w.call(T,a.h)):n&&v.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(ms,{style:"display:flex;",width:26,height:26},null)])),v.length?a.createVNode("div",{class:this.resolveClassName("tab-header-operation")},[v.map((k,I)=>a.createVNode("div",{class:this.resolveClassName("tab-header-item"),key:I},[k]))]):null},p=()=>this.type===Sl.UNBORDER_CARD?a.createVNode("div",{style:this.activeBarStyle,class:this.resolveClassName("tab-header-active-bar")},null):"",C=typeof this.$slots.setting=="function"?a.createVNode("div",{class:this.resolveClassName("tab-header-setting")},[this.$slots.setting()]):null,b=m();return a.createVNode("div",{style:{lineHeight:`${o}px`},class:this.resolveClassName("tab-header")},[a.createVNode("div",{class:[this.resolveClassName("tab-header-nav"),b||C?"tab-header-auto":""]},[p(),h()]),b,C])}}),r6=Ft(a.defineComponent({name:"Tab",components:{TabNav:a6},props:N8,emits:["add-panel","tab-change","remove-panel","sort-change","on-drag-tab","add","change","remove","update:active","sort","drag"],setup(e,{slots:t,emit:n}){const i=a.ref(!1),s=a.ref([]),o=a.getCurrentInstance(),c=(h,m=[])=>{const{children:p}=h;return(p||[]).forEach(C=>{let{type:b}=C;b=b.name||b,b==="TabPanel"&&C.component?m.push(C.component):(b===a.Fragment||b==="template")&&c(C,m)}),m},u=()=>{if(t.default){const{children:h}=o.subTree.children[1];if(!h)return;const m=h[0],p=c(m);p.length!==s.value.length&&(s.value=p)}};a.onMounted(()=>{u(),i.value=!0,a.onUpdated(()=>{u()})});const f={tabAdd(h){n("add",{e:h}),n("add-panel",{e:h})},tabChange(h){n("change",h),n("tab-change",h),n("update:active",h)},tabRemove(h,m){n("remove",h,m),n("remove-panel",h,m)},tabSort(h,m,p){const C=s.value;if(p===n6.INSERT)if(h<m)C.splice(m+1,0,s[h]),C.splice(h,1);else if(h>m)C.splice(m,0,s[h]),C.splice(h+1,1);else return!1;else{const b=C[m];C[m]=C[h],C[h]=b}s.value=[...C],n("sort",h,m,p),n("sort-change",h,m,p)},tabDrag(h,m){n("drag",h,m),n("on-drag-tab",h,m)}},{resolveClassName:d}=ye();return{...f,isMounted:i,panels:s,resolveClassName:d}},render(){var n,i;const e=()=>{const s=[this.resolveClassName("tab"),this.extCls];return this.tabPosition===ks.TOP?s.push(this.resolveClassName(`tab--${this.tabPosition}`),this.resolveClassName(`tab--${this.type}`)):(s.push(this.resolveClassName(`tab--${this.tabPosition}`)),this.type===Sl.CARD_TAB&&s.push(this.resolveClassName("tab--vertical-tab"))),s},t=()=>{const{panels:s,active:o,type:c,closable:u,addable:f,sortable:d,sortType:h,labelHeight:m,scrollStep:p,validateActive:C,changeOnHover:b,changeOnHoverDelay:v,tabPosition:T,activeBarSize:w,activeBarColor:k,tabAdd:I,tabChange:M,tabRemove:S,tabSort:L,tabDrag:J}=this,x={panels:s,active:o,type:c,closable:u,addable:f,sortable:d,sortType:h,labelHeight:m,scrollStep:p,validateActive:C,changeOnHover:b,changeOnHoverDelay:v,tabPosition:T,activeBarSize:w,activeBarColor:k,tabAdd:I,tabChange:M,tabRemove:S,tabSort:L,tabDrag:J};return!s||!Array.isArray(s)?null:a.createVNode(a6,x,this.$slots)};return a.createVNode("div",{class:e()},[t(),a.createVNode("div",{class:this.resolveClassName("tab-content")},[(i=(n=this.$slots).default)==null?void 0:i.call(n)])])}}),{TabPanel:a.defineComponent({name:"TabPanel",props:w8,render(){const e=this.name===this.$parent.active,t=()=>!this.visible||this.renderDirective==="if"&&!e?null:typeof this.panel=="function"?this.panel(a.h):typeof this.$slots.default=="function"?this.$slots.default(null):typeof this.$slots.panel=="function"?this.$slots.panel(null):null,{resolveClassName:n}=ye();return a.withDirectives(a.createVNode("div",{ref:"content",class:n("tab-panel")},[t()]),[[a.vShow,e]])}})}),ki={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let s6=1;const o6=(e,t)=>{let n=t;const i=n.position||"top-right";typeof t=="string"&&(n={message:t});const s=t.onClose,o=n.offsetX||10;let c=n.offsetY||30;const{spacing:u=10}=n;ki[i].forEach(p=>{c+=(p.el.offsetHeight||0)+u}),s6+=1;const f=`message_${s6}`;n={...n,offsetX:o,offsetY:c,id:f};const d=document.createElement("div"),h=a.createVNode(e,n);h.props.onDestroy=p=>{I8(p,i,u,s),a.render(null,d)},h.props.onDetail=(p,C)=>{ki[i].forEach(b=>{var v,T;b.props.id!==C&&((T=(v=b.component)==null?void 0:v.exposed)==null||T.setDetailsShow(null,!1))})},a.render(h,d),ki[i].push(h);let m;h.props.getContainer&&Ca(h.props.getContainer)?m=h.props.getContainer:m=document.body,m.appendChild(d.firstElementChild)};function I8(e,t,n,i){i==null||i();const s=t.startsWith("top")?"top":"bottom";let o=-1;ki[t].forEach((d,h)=>{d.props.id===e&&(o=h)});const u=ki[t][o].el.offsetHeight,f=ki[t].length;for(let d=o;d<f;d++){const h=parseInt(ki[t][d].el.style[s],10)-u-n;ki[t][d].component.props.offsetY=h}ki[t].splice(o,1)}var l6={exports:{}};/*!
66
+ `,O={d:x,stroke:m||"#f5f5f5","stroke-linecap":f,"stroke-width":C,"fill-opacity":"0",class:"process-circle-trail",style:L},E={d:x,stroke:u||"#13ce66","stroke-linecap":f,"stroke-width":o>0&&C||0,"fill-opacity":"0",class:`process-circle-path ${i(`${d}-circle-trail`)}`,style:J};return a.createVNode("div",{class:"progress-outer-circle",style:v},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",O,null),a.createVNode("path",E,null)]),a.createVNode("span",{class:"progress-circle-text",style:p},[n==null?void 0:n.default()])])},kb=(e,{attrs:t,slots:n})=>{const{resolveClassName:i}=ye(),{percent:s,strokeWidth:o,size:c,color:u,titleStyle:f,showText:d,textInside:h,theme:m}=t,p={height:`${o}px`,lineHeight:`${o}px`},C={width:`${s}%`,background:u,animationDuration:"3s"},b=(v=!0)=>(d||n.default)&&(v&&h||!v&&!h)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{class:`${i(`progress-${c||"normal"}`)} progress-bar`,style:p},[a.createVNode("div",{style:C,class:{"progress-inner":!0,[`${i(`${m}`)}`]:!0}},[a.createVNode("div",{class:"inner-text",style:f},[b()])])]),b(!1)])};function e3(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const xb={extCls:y.string,type:_p(),percent:y.number.def(0),theme:y.theme().def(bo.PRIMARY),size:y.size(),width:y.number.def(126),strokeWidth:y.number,strokeLinecap:Jp(),textInside:y.bool.def(!1),showText:y.bool.def(!0),color:y.string,bgColor:y.string,fixed:y.number.validate(e=>e>=0&&e<=20).def(0),format:y.func.def(e=>`${e}%`),titleStyle:y.object.def({fontSize:"16px",verticalAlign:"middle"})},Is=Ye(a.defineComponent({name:"Progress",props:xb,setup(){const{resolveClassName:e}=ye();return{resolveClassName:e}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var u;const{showText:e,format:t,percent:n,textInside:i,titleStyle:s,fixed:o}=this.$props,c=t((u=this.validPercent(n))==null?void 0:u.toFixed(o));return(e||this.$slots.default)&&i?this.$slots.default?this.$slots.default():a.createVNode("span",null,[c]):!e||i?null:a.createVNode("span",{class:"progress-text",style:typeof c=="string"?s:void 0},[this.$slots.default?this.$slots.default():c])}},render(){const e=this.renderProcessInfo(),t={...this.$props,percent:this.validPercent(this.percent)};let n=a.createVNode(kb,t,e3(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(Sb,t,e3(e)?e:{default:()=>[e]}));const i={class:Pe({extCls:!!this.extCls},`${this.resolveClassName("progress")} ${this.resolveClassName(`progress-${this.type}`)}`)};return a.createVNode("div",i,[n])}})),t3=Symbol("RadioGroup");function n3(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const i3=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,i=a.inject(t3,J0),s=!_0(i),o=a.ref(!1),c=a.computed(()=>s&&i.props.disabled?!0:t.disabled);s?a.watch(()=>i.props.modelValue,d=>{o.value=d===t.label},{immediate:!0}):a.watch(()=>t.modelValue,d=>{d!==""&&(o.value=d===t.label)},{immediate:!0});const u=(d=!0)=>{o.value=d},f=d=>{if(c.value)return;const h=d.target;o.value=h.checked;const m=o.value?t.label:"";n("update:modelValue",m),n("change",m),s&&i.handleChange(e.proxy),a.nextTick(()=>{h.checked!==o.value&&(h.checked=o.value)})};return a.onMounted(()=>{s&&i.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&i.unregister(e.proxy)}),{isChecked:o,isDisabled:c,setChecked:u,handleChange:f}},Db={name:y.string.def(""),label:y.oneOfType([String,Number,Boolean]).isRequired,modelValue:y.oneOfType([String,Number,Boolean]).def(""),checked:y.bool.def(!1),disabled:y.bool.def(!1)},jb=a.defineComponent({name:"Radio",props:Db,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=n3(),{isChecked:i,isDisabled:s,setChecked:o,handleChange:c}=i3(),{resolveClassName:u}=ye();return{isFocused:e,isChecked:i,isDisabled:s,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c,resolveClassName:u}},render(){const e=Pe({[`${this.resolveClassName("radio")}`]:!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("span",{class:`${this.resolveClassName("radio-label")}`},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:`${this.resolveClassName("radio-input")}`,type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),t()])}}),Ob={name:y.string.def(""),label:y.oneOfType([String,Number,Boolean]).isRequired,modelValue:y.oneOfType([String,Number,Boolean]).def(""),checked:y.bool.def(!1),disabled:y.bool.def(!1),size:y.size()},Eb=a.defineComponent({name:"RadioButton",props:Ob,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=n3(),{isChecked:i,isDisabled:s,setChecked:o,handleChange:c}=i3(),{resolveClassName:u}=ye();return{isFocused:e,isChecked:i,isDisabled:s,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c,resolveClassName:u}},render(){const e=Pe({[`${this.resolveClassName("radio-button")}`]:!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("div",{class:`${this.resolveClassName("radio-button-label")}`},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:`${this.resolveClassName("radio-button-input")}`,type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),t()])}}),Ab={name:y.string.def(""),modelValue:y.oneOfType([String,Number,Boolean]),disabled:y.bool,withValidate:y.bool.def(!0),type:y.oneOf(["tab","capsule","card"]).def("tab")},a3=Ft(jb,{Group:a.defineComponent({name:"RadioGroup",props:Ab,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(e,t){const n=Fn(),i=[],s=f=>{i.push(f)},o=f=>{const d=i.indexOf(f);d>-1&&i.splice(d,1)},c=f=>{const d=f.label;i.forEach(h=>{h!==f&&h.setChecked(!1)}),t.emit("update:modelValue",d),t.emit("change",d)};a.provide(t3,{props:e,register:s,unregister:o,handleChange:c}),a.watch(()=>e.modelValue,()=>{var f;e.withValidate&&((f=n==null?void 0:n.validate)==null||f.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&i.forEach(f=>{f.setChecked(f.label===e.modelValue)})});const{resolveClassName:u}=ye();return{resolveClassName:u}},render(){var e;return a.createVNode("div",{class:[`${this.resolveClassName("radio-group")}`,`${this.resolveClassName(`radio-${this.type}`)}`]},[(e=this.$slots)==null?void 0:e.default()])}}),Button:Eb}),hl=a.defineComponent({name:"Star",props:{rate:y.number.def(0),width:y.number.def(15),height:y.number.def(16),editable:y.bool.def(!0),hoverRate:y.number.def(0),max:y.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=f=>{if(!e.editable)return;const d=f+1;t("chooseRate",d)},i=f=>{if(!e.editable)return;const d=f+1;t("changeHover",d)},{resolveClassName:s}=ye(),o=f=>Pe({[`${s("is-select")}`]:f<Math.floor(c.value),[`${s("is-edit")}`]:e.editable,[`${s("rate-star")}`]:!0}),c=a.computed(()=>e.hoverRate||e.rate),u={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:`${s("rate-stars")}`},[Array(e.max).fill(1).map((f,d)=>a.createVNode("svg",{class:o(d),style:u,x:"0px",y:"0px",viewBox:"0 0 64 64",onClick:()=>n(d),onMouseenter:()=>i(d)},[a.createVNode("g",{transform:"translate(-143.000000, -635.000000)"},[a.createVNode("g",{transform:"translate(83.000000, 114.000000)"},[a.createVNode("g",{transform:"translate(15.000000, 384.000000)"},[a.createVNode("g",{transform:"translate(29.000000, 137.000000)"},[a.createVNode("polygon",{class:"st1",points:"48,53 28.2,63.9 32,40.8 16,24.4 38.1,21 48,-0.1 57.8,21 79.9,24.4 63.9,40.8 67.7,63.9"},null)])])])])]))])}}),Pb=a.defineComponent({name:"Rate",components:{star:hl},props:{modelValue:y.number.def(0),size:y.size(),editable:y.bool.def(!0),withValidate:y.bool.def(!0)},emits:["change","update:modelValue"],setup(e,{emit:t}){const{resolveClassName:n}=ye(),i=Fn(),s=a.ref(0),o=p=>{e.editable&&(t("update:modelValue",p),t("change",p))},c=p=>{s.value=p},u=Pe({[`${n("rate")}`]:!0}),d={small:{width:12,height:12},large:{width:18,height:18}}[e.size]||{width:15,height:16},h=a.computed(()=>{const p=Math.floor(e.modelValue),C=(d.width+3)*p,b=d.width*(e.modelValue-p);return{width:`${C+b}px`}}),m={width:d.width,height:d.height};return a.watch(()=>e.modelValue,()=>{var p;e.withValidate&&((p=i==null?void 0:i.validate)==null||p.call(i,"change"))}),()=>a.createVNode("p",{class:u},[e.editable?a.createVNode(hl,a.mergeProps({rate:e.modelValue,"hover-rate":s.value,onChooseRate:o,onChangeHover:c,onMouseleave:()=>c(0)},m),null):[a.createVNode(hl,a.mergeProps({rate:5,style:h.value,class:`${n("score-real")}`,editable:!1},m),null),a.createVNode(hl,a.mergeProps({rate:0,editable:!1},m),null)]])}}),r3=Ye(Pb),zb=a.defineComponent({name:"Swiper",props:{isLoop:y.bool.def(!0),loopTime:y.number.def(8e3),pics:y.array.def([]),list:y.array.def([]),height:y.number,width:y.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:i,loopTime:s,pics:o,list:c,height:u,width:f}=a.toRefs(e),d=a.ref(),h=a.ref(0),m=a.ref(0),p=a.ref(0),C=a.ref(0);let b;const{resolveClassName:v}=ye(),T=a.computed(()=>{var H;return((H=c.value)==null?void 0:H.length)>0?c.value:o.value}),w=a.computed(()=>({width:`${m.value*T.value.length}px`,transform:`translateX(-${m.value*h.value}px)`})),k=a.computed(()=>({width:`${m.value}px`,height:`${p.value}px`})),I=H=>{let F=H;H>=T.value.length&&(F=0),H<0&&(F=T.value.length-1),h.value=F,t("index-change",F)},M=H=>{H&&window.open(H,"_blank")},S=H=>[`${v("swiper-img")}`,{[`${v("swiper-link")}`]:H.link},H.class],L=H=>({"background-image":`url(${H.url})`,"background-color":H.color}),J=H=>({[`${v("current-index")}`]:h.value===H}),x=()=>{i.value&&(C.value=window.setTimeout(()=>{I(h.value+1),x()},s.value))},O=()=>{window.clearTimeout(C.value)},E=()=>{var F;const H=(F=d.value)==null?void 0:F.parentElement;!H||!window.ResizeObserver||(b=new ResizeObserver(()=>{W()}),b.observe(H))},j=()=>{var H;(H=b.disconnect)==null||H.call(b)},A=H=>{if(H===void 0)return{height:0,width:0};const F=getComputedStyle(H),ne=H.clientWidth-parseFloat(F.paddingTop)-parseFloat(F.paddingBottom);return{height:H.clientHeight-parseFloat(F.paddingLeft)-parseFloat(F.paddingRight),width:ne}},W=()=>{var F;const H=A((F=d.value)==null?void 0:F.parentElement);m.value=+f.value>0?f.value:H.width,p.value=+u.value>0?u.value:H.height};return a.watch([u,f],W),a.onMounted(()=>{W(),x(),E()}),a.onBeforeUnmount(()=>{O(),j()}),()=>a.createVNode("section",{class:`${v("swiper-home")}`,ref:d,style:k.value},[a.createVNode("hgroup",{style:w.value,class:`${v("transition")} ${v("swiper-main")}`},[T.value.map(H=>{var F;return a.createVNode("h3",{class:`${v("swiper-card")}`,style:k.value},[((F=n.default)==null?void 0:F.call(n,H))??a.createVNode("span",{class:S(H),style:L(H),onClick:()=>M(H.link)},null)])})]),a.createVNode("ul",{class:`${v("swiper-index")}`},[T.value.map((H,F)=>a.createVNode("li",{class:J(F),onMouseover:()=>I(F)},null))]),a.createVNode("span",{class:`${v("swiper-nav")} ${v("nav-prev")}`,onClick:()=>I(h.value-1)},[a.createVNode("i",{class:`${v("swiper-nav-icon")}`},null)]),a.createVNode("span",{class:`${v("swiper-nav")} ${v("nav-next")}}`,onClick:()=>I(h.value+1)},[a.createVNode("i",{class:`${v("swiper-nav-icon")}`},null)])])}}),s3=Ye(zb),gl=Symbol("BkSelect"),o3=Symbol("BkOptionGroup");function l3(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function Cd(e){return{register:(i,s)=>{if(s){if(e.value.has(i)){console.warn(`repeat ${i}`,s);return}return e.value.set(i,s)}},unregister:i=>{e.value.delete(i)}}}function Vb(e,t=200){let n,i=e;return a.customRef((s,o)=>({get(){return s(),i},set(c){clearTimeout(n),c===void 0||c===""?(i=c,o()):n=setTimeout(()=>{i=c,o()},t)}}))}function Rb(e,t){const{popoverMinWidth:n}=e;let i=null;const s=a.ref("auto"),o=a.ref(!1),c=()=>{o.value=!o.value},u=()=>{o.value=!1},f=()=>{o.value=!0},d=()=>{var h;s.value=Math.max((h=t.value)==null?void 0:h.offsetWidth,n)};return a.onMounted(()=>{t.value&&(i=K4(t.value,d,60,!0),i.start())}),a.onBeforeUnmount(()=>{i==null||i.stop(),i=null}),{isPopoverShow:o,popperWidth:s,togglePopover:c,hidePopover:u,showPopover:f}}function Jb(e,t){const n=Vb(""),i=a.ref(!1);return a.watch(n,async()=>{try{i.value=!0,await e(n.value),i.value=!1}catch(s){console.error(s)}finally{t==null||t()}}),{searchKey:n,searchLoading:i}}function Mr(e=""){return e&&String(e).trim().toLowerCase()}const ml=a.defineComponent({name:"Option",props:{id:{type:[String,Number,Object],require:!0},name:y.oneOfType([y.number,y.string]),disabled:y.bool.def(!1)},setup(e,{attrs:t}){const{proxy:n}=a.getCurrentInstance(),i=a.reactive({visible:!0}),{disabled:s,id:o,name:c}=a.toRefs(e),u=a.computed(()=>c.value!==void 0?c.value:t.label),f=a.computed(()=>o.value!==void 0?o.value:t.value),d=a.inject(gl,null),h=a.inject(o3,null),m=a.computed(()=>{var I;return(I=d==null?void 0:d.selected)==null?void 0:I.some(M=>ot.isEqual(M.value,f.value))}),p=a.computed(()=>d==null?void 0:d.multiple),C=a.computed(()=>(d==null?void 0:d.activeOptionValue)===f.value),b=a.computed(()=>(d==null?void 0:d.showSelectedIcon)&&p.value),v=a.computed(()=>d==null?void 0:d.selectedStyle),T=()=>{s.value||d==null||d.handleOptionSelected(n)},w=()=>{d.activeOptionValue=f.value};a.onBeforeMount(()=>{d==null||d.register(f.value,n),h==null||h.register(f.value,n)}),a.onBeforeUnmount(()=>{d==null||d.unregister(f.value),h==null||h.unregister(f.value)});const{resolveClassName:k}=ye();return{...a.toRefs(i),selected:m,multiple:p,isHover:C,showSelectedIcon:b,selectedStyle:v,optionName:u,optionID:f,handleOptionClick:T,handleMouseEnter:w,resolveClassName:k}},render(){var t,n;const e=Pe({"is-selected":this.selected,"is-disabled":this.disabled,"is-multiple":this.multiple,"is-hover":this.isHover,"is-checkbox":this.selectedStyle===No.CHECKBOX,[this.resolveClassName("select-option")]:!0});return a.withDirectives(a.createVNode("li",{class:e,onClick:this.handleOptionClick,onMouseenter:this.handleMouseEnter},[this.showSelectedIcon&&this.selectedStyle===No.CHECKBOX&&a.createVNode($n,{disabled:this.disabled,class:this.resolveClassName("select-checkbox"),modelValue:this.selected},null),((n=(t=this.$slots).default)==null?void 0:n.call(t))??a.createVNode("span",{class:this.resolveClassName("select-option-item"),title:String(this.optionName)},[this.optionName]),this.showSelectedIcon&&this.selected&&this.selectedStyle===No.CHECK&&a.createVNode($i,{class:this.resolveClassName("select-selected-icon"),width:22,height:22},null)]),[[a.vShow,this.visible]])}}),_b=a.defineComponent({name:"OptionGroup",props:{label:y.string.def(""),disabled:y.bool.def(!1),collapsible:y.bool.def(!1),collapse:y.bool.def(!1)},setup(e,{emit:t}){const n=a.getCurrentInstance(),{proxy:i}=n,s=a.inject(gl,null),o=a.reactive({groupCollapse:e.collapse,visible:!0}),c=a.ref(new Map),{register:u,unregister:f}=Cd(c),d=a.computed(()=>`${e.label} (${[...c.value.values()].filter(p=>p.visible).length})`),h=()=>{!e.collapsible||e.disabled||(o.groupCollapse=!o.groupCollapse,t("update:collapse",o.groupCollapse))};a.provide(o3,a.reactive({...a.toRefs(e),register:u,unregister:f,groupCollapse:a.toRef(o,"groupCollapse")})),a.onBeforeMount(()=>{s==null||s.registerGroup(n.uid,i)}),a.onBeforeUnmount(()=>{s==null||s.unregisterGroup(n.uid)});const{resolveClassName:m}=ye();return{...a.toRefs(o),groupLabel:d,handleToggleCollapse:h,resolveClassName:m}},render(){var i,s;const e=Pe({[this.resolveClassName("option-group")]:!0,collapsible:this.collapsible,disabled:this.disabled}),t=Pe({[this.resolveClassName("option-group-label")]:!0,collapsible:this.collapsible}),n=Pe({"default-group-label-icon":!0,collapse:this.groupCollapse});return a.withDirectives(a.createVNode("ul",{class:e},[a.createVNode("li",{class:t,onClick:this.handleToggleCollapse},[this.$slots.label?this.$slots.label():a.createVNode("span",{class:"default-group-label"},[this.collapsible&&a.createVNode(os,{class:n},null),a.createVNode("span",{class:"default-group-label-title"},[this.groupLabel])])]),a.withDirectives(a.createVNode("ul",{class:this.resolveClassName("option-group-content")},[(s=(i=this.$slots).default)==null?void 0:s.call(i)]),[[a.vShow,!this.groupCollapse]])]),[[a.vShow,this.visible]])}}),Qb={onContentScroll:Function},Wb={list:y.array.def([]),enabled:y.bool.def(!0),scrollEvent:y.bool.def(!1),lineHeight:y.oneOfType([y.number,y.func]).def(30),minHeight:y.number.def(30),height:y.oneOfType([y.string.def("100%"),y.number]).def("100%"),width:y.oneOfType([y.string.def("100%"),y.number]).def("100%"),className:y.oneOfType([y.arrayOf(y.string),y.object,y.arrayOf(y.object),y.string]).def(""),contentClassName:y.oneOfType([y.arrayOf(y.string),y.object,y.arrayOf(y.object),y.string]).def(""),contentStyle:y.object.def({}),scrollXName:y.string.def(Bt("F-scroll-x")),scrollYName:y.string.def(Bt("F-scroll-y")),groupItemCount:y.number.def(1),preloadItemCount:y.number.def(1),renderAs:y.string.def("div"),contentAs:y.string.def("div"),scrollOffsetTop:y.number.def(0),scrollPosition:y.string.def("content"),abosuteHeight:y.oneOfType([y.string.def("auto"),y.number]).def("auto"),throttleDelay:y.number.def(60),rowKey:y.string.def(void 0),keepAlive:y.bool.def(!1),autoReset:y.bool.def(!0),...Qb},Hb=(e,t)=>{const{renderAs:n,contentAs:i}=e,s=(d,h,m,p,C,b,v)=>{t.emit("content-scroll",[d,{translateY:C,translateX:b,pos:v}])},o=a.resolveDirective("bkVirtualRender"),c={lineHeight:e.lineHeight,handleScrollCallback:s,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent},u=a.ref(null),f=({left:d=0,top:h=0})=>{u.value.scrollTo(d,h)};return t.expose({scrollTo:f}),{rendAsTag:()=>{var d,h,m,p,C,b,v,T;return a.h(n,{class:e.className,ref:u},[((h=(d=t.slots).beforeContent)==null?void 0:h.call(d))??"",a.withDirectives(a.h(i,{class:e.contentClassName,style:e.contentStyle},[((p=(m=t.slots).default)==null?void 0:p.call(m,{data:e.list}))??""]),[[o,c]]),((b=(C=t.slots).afterContent)==null?void 0:b.call(C))??"",((T=(v=t.slots).afterSection)==null?void 0:T.call(v))??""])}}};function c3(e,t,n,i){let s=0,o=0,c=0,u=0;for(;s<e;s++){if(u=i(s,[s*n,(s+1)*n,"virtual"]),o+u>t){c=t-o;break}o+=u}return{startIndex:s,height:o,diffHeight:c}}function u3(e,t,n,i,s){if(!i)return;const o=i.scrollTop,c=i.scrollLeft,{scrollTop:u,count:f,groupItemCount:d,startIndex:h,endIndex:m,scrollLeft:p}=n,{offsetHeight:C}=i;let b=0,v=0,T=0;if(typeof e=="number"&&(b=Math.floor(o/e),v=Math.ceil(C/e)+b,T=o%e),typeof e=="function"){const w=c3(f,o,d,e);b=w.startIndex>0?w.startIndex:0,T=w.diffHeight,v=c3(f,C,d,e).startIndex+b+1}if(o!==u||b!==h||v!==m||p!==c){const w=i.scrollHeight-i.offsetHeight-i.scrollTop;typeof t=="function"&&t(s,b,v,o,T,c,{bottom:w>=0?w:0})}}function Fb(e,t,n){const{lineHeight:i=30,handleScrollCallback:s,pagination:o={},onlyScroll:c}=n.value;if(c){const C=t.scrollTop,b=t.scrollLeft,v=t.scrollHeight-t.offsetHeight-t.scrollTop;s(e,null,null,C,C,b,{bottom:v>=0?v:0});return}const{startIndex:u,endIndex:f,groupItemCount:d,count:h,scrollTop:m,scrollLeft:p}=o;u3(i,s,{scrollTop:m,startIndex:u,endIndex:f,groupItemCount:d,count:h,scrollLeft:p},t,e)}const d3=(e=60)=>ot.throttle((t,n,i)=>Fb(t,n,i),e),Bb=(e,t,n,i=60)=>{Reflect.apply(d3(i),void 0,[e,t,n])},$b={mounted(e,t){const n=e.parentNode,{throttleDelay:i}=t.value;n.addEventListener("scroll",s=>{Bb(s,n,t,i)})},unbind(e){if(e){const t=e.parentNode;if(!t)return;t.removeEventListener("scroll",d3)}}},Ir=Ye(a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:$b},props:Wb,emits:["content-scroll"],slots:Object,setup(e,t){const{renderAs:n,contentAs:i}=e,s=O=>typeof O=="string"?[O]:typeof O=="object"&&!Array.isArray(O)?[O]:O;if(!e.enabled){const{rendAsTag:O}=Hb(e,t);return O}const o=a.ref(null),c=a.reactive({startIndex:0,endIndex:0,scrollTop:1,scrollLeft:0,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),u=(O,E,j,A,W,H,F)=>{c.startIndex=E,c.endIndex=j,c.scrollTop=A,c.translateY=W,c.translateX=H,c.scrollLeft=H,c.pos=F,t.emit("content-scroll",[O,c])};a.onMounted(()=>{a.nextTick(()=>{m(e.list),p()})}),a.watch(()=>e.list,()=>{let O={left:0,top:0};O={left:c.scrollLeft,top:c.scrollTop},f(),p(),e.keepAlive&&x(O)},{deep:!0}),a.watch(()=>e.lineHeight,()=>{f(),p()});const f=()=>{m(e.list)},d=a.ref(0),h=a.ref(0),m=O=>{if(d.value=Math.ceil((O||[]).length/e.groupItemCount),c.count=d.value,c.startIndex=0,c.endIndex=0,c.translateY=0,c.scrollTop=0,typeof e.abosuteHeight=="string"&&e.abosuteHeight==="auto")if(typeof e.lineHeight=="function"){h.value=0;let j=0;for(let A=0;A<d.value;A++){const W=e.lineHeight.call(this,A,O.slice(A*e.groupItemCount,e.groupItemCount));j+=typeof W=="number"?W:0}h.value=j}else h.value=e.lineHeight*d.value;else h.value=e.abosuteHeight},p=(O={left:0,top:0})=>{var j;const E=(j=o.value)==null?void 0:j.parentNode;u3(e.lineHeight,u,c,E,null),O&&o.value&&e.autoReset&&x(O)},C=a.computed(()=>e.rowKey!==void 0?e.list:(e.list||[]).map((O,E)=>({...O,$index:E}))),b=a.computed(()=>C.value.slice(c.startIndex*e.groupItemCount,(c.endIndex+e.preloadItemCount)*e.groupItemCount)),v=a.computed(()=>e.scrollPosition==="content"?{top:`${c.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${c.translateY}px)`}:{}),T=a.computed(()=>({height:typeof e.height=="number"?`${e.height}px`:e.height,width:typeof e.width=="number"?`${e.width}px`:e.width,display:"inline-block",...e.scrollPosition==="container"?v.value:{}})),w=a.computed(()=>{const O=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${h.value<e.minHeight?e.minHeight:h.value}px`,display:O?"none":"block"}}),{resolveClassName:k}=ye(),I=a.computed(()=>[k("virtual-render"),e.scrollXName,e.scrollYName,...s(e.className),e.scrollPosition==="container"?k("virtual-content"):""]),M=a.computed(()=>[e.scrollPosition==="content"?k("virtual-content"):"",...s(e.contentClassName)]),S=a.resolveDirective("bkVirtualRender"),L={lineHeight:e.lineHeight,handleScrollCallback:u,pagination:c,throttleDelay:e.throttleDelay},J=()=>{f(),p()},x=(O={left:0,top:0})=>{const{left:E,top:j}=O;o.value.scrollTo(E,j)};return t.expose({reset:J,scrollTo:x}),()=>{var O,E,j,A,W,H,F,ne;return a.h(n||"div",{ref:o,class:I.value,style:T.value},[((E=(O=t.slots).beforeContent)==null?void 0:E.call(O))??"",a.withDirectives(a.h(i||"div",{class:M.value,style:{...v.value,...e.contentStyle}},[((A=(j=t.slots).default)==null?void 0:A.call(j,{data:b.value}))??""]),[[S,L]]),((H=(W=t.slots).afterContent)==null?void 0:H.call(W))??"",a.h("div",{class:[k("virtual-section")],style:w.value}),((ne=(F=t.slots).afterSection)==null?void 0:ne.call(F))??""])}}}));var f3=function(e){return e.UNKNOWN="",e.FILLED="filled",e.STROKE="stroke",e}(f3||{});const Gb=a.defineComponent({name:"Tag",props:{theme:wo(),closable:y.bool.def(!1),type:ke("tagStorkeType",{}).def(f3.UNKNOWN),checkable:y.bool.def(!1),checked:y.bool.def(!1),radius:y.string.def("2px"),extCls:y.string.def("")},emits:["change","close"],slots:Object,setup(e,{emit:t}){const{resolveClassName:n}=ye(),i=a.computed(()=>Pe({[`${n("tag-closable")}`]:e.closable,[`${n("tag-checkable")}`]:e.checkable,[`${n("tag-check")}`]:e.checked,[`${n(`tag-${e.type}`)}`]:e.type,[`${n(`tag-${e.theme}`)}`]:e.theme,[e.extCls]:!!e.extCls},n("tag"))),s=a.computed(()=>({borderRadius:e.radius}));return{wrapperCls:i,wrapperStyle:s,handleClose:u=>{u.preventDefault(),u.stopPropagation(),t("close",u)},handleClick:u=>{u.preventDefault(),u.stopPropagation(),e.checkable&&t("change",!e.checked)},resolveClassName:n}},render(){var e,t;return a.createVNode("div",{class:this.wrapperCls,style:this.wrapperStyle,onClick:this.handleClick},[this.$slots.icon?a.createVNode("span",{class:`${this.resolveClassName("tag-icon")}`},[this.$slots.icon()]):"",a.createVNode("span",{class:`${this.resolveClassName("tag-text")}`},[(t=(e=this.$slots).default)==null?void 0:t.call(e)]),this.closable?a.createVNode(rn,{class:`${this.resolveClassName("tag-close")}`,onClick:this.handleClose},null):""])}}),Lr=Ye(Gb),Zb=a.defineComponent({name:"SelectTagInput",props:{selected:{type:Array,default:()=>[]},tagTheme:wo(),placeholder:y.string.def(""),filterable:y.bool.def(!1),allowCreate:y.bool.def(!1),disabled:y.bool.def(!1),modelValue:y.any,collapseTags:y.bool.def(!1)},emits:["update:modelValue","remove","enter","keydown"],setup(e,{emit:t}){const{resolveClassName:n}=ye(),{proxy:i}=a.getCurrentInstance(),s=a.inject(gl,null),{modelValue:o,collapseTags:c,selected:u}=a.toRefs(e),f=a.ref(o.value),d=a.ref(),h=a.ref(null);a.watch(o,()=>{f.value=o.value}),a.watch([u,c],()=>{T()},{flush:"post"});const m=w=>{t("remove",w)},p=()=>{var w;(w=d.value)==null||w.focus()},C=w=>{t("update:modelValue",w.target.value)},b=w=>{switch(w.code){case"Enter":{t("enter",w.target.value,w);break}}t("keydown",w.target.value,w)},v=w=>{const k=[...i.$el.querySelectorAll(`.${n("tag")}`)];return typeof w=="number"?k[w]:k},T=()=>{c.value&&(h.value=null,setTimeout(()=>{const w=v(),k=w.findIndex((I,M)=>M?w[M-1].offsetTop!==I.offsetTop:!1);h.value=k>0?k:null}))};return{select:s,overflowTagIndex:h,value:f,inputRef:d,handleRemoveTag:m,focus:p,handleInput:C,handleKeydown:b,resolveClassName:n}},render(){var s,o,c,u,f,d,h,m;const e=(o=(s=this.$slots)==null?void 0:s.prefix)==null?void 0:o.call(s),t=Pe({[this.resolveClassName("select-tag")]:!0,[this.resolveClassName("select-tag--default")]:!0,"is-disabled":this.disabled,"collapse-tag":this.collapseTags,"has-prefix":!!e}),n=Pe({[this.resolveClassName("select-tag-wrapper")]:!0}),i={display:this.selected.length&&!this.filterable?"none":""};return a.createVNode("div",{class:t},[(u=(c=this.$slots)==null?void 0:c.prefix)==null?void 0:u.call(c),a.createVNode("span",{class:n},[((d=(f=this.$slots).default)==null?void 0:d.call(f))??this.selected.map((p,C)=>a.createVNode(Lr,{closable:!0,theme:this.tagTheme,style:{display:this.collapseTags&&this.overflowTagIndex&&C>=this.overflowTagIndex?"none":""},onClose:()=>this.handleRemoveTag(p.value)},{default:()=>{var b;return[(b=this.select)==null?void 0:b.handleGetLabelByValue(p.value)]}})),!!this.overflowTagIndex&&this.collapseTags&&a.createVNode(Lr,{class:this.resolveClassName("select-overflow-tag")},{default:()=>[a.createTextVNode("+"),this.selected.length-this.overflowTagIndex]}),a.createVNode("input",{class:this.resolveClassName("select-tag-input"),ref:"inputRef",type:"text",style:i,placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,disabled:this.disabled,value:this.filterable?this.value:"",onInput:this.handleInput,onKeydown:this.handleKeydown},null)]),(m=(h=this.$slots)==null?void 0:h.suffix)==null?void 0:m.call(h)])}}),Yb=a.defineComponent({name:"Select",directives:{clickoutside:si},props:{modelValue:y.any,multiple:y.bool.def(!1),disabled:y.bool.def(!1),size:y.size().def(uu.DEFAULT),clearable:y.bool.def(!0),loading:y.bool.def(!1),filterable:y.bool.def(!1),remoteMethod:y.func,scrollHeight:y.number.def(200),showSelectAll:y.bool.def(!1),popoverMinWidth:y.number.def(0),showOnInit:y.bool.def(!1),multipleMode:y.oneOf(["default","tag"]).def("default"),tagTheme:wo(),behavior:R0(),collapseTags:y.bool.def(!1),autoHeight:y.bool.def(!0),noDataText:y.string,noMatchText:y.string,loadingText:y.string,placeholder:y.string,searchPlaceholder:y.string,selectAllText:y.string,scrollLoading:y.bool.def(!1),allowCreate:y.bool.def(!1),popoverOptions:Object,customContent:y.bool.def(!1),list:y.array.def([]),idKey:y.string.def("value"),displayKey:y.string.def("label"),withValidate:y.bool.def(!0),showSelectedIcon:y.bool.def(!0),inputSearch:y.bool.def(!0),enableVirtualRender:y.bool.def(!1),allowEmptyValues:y.array.def([]),autoFocus:y.bool.def(!1),keepSearchValue:y.bool.def(!1),prefix:y.string,selectedStyle:Qp()},emits:["update:modelValue","change","toggle","clear","scroll-end","focus","blur"],setup(e,{emit:t}){const n=ft("select"),{resolveClassName:i}=ye(),{modelValue:s,disabled:o,filterable:c,multiple:u,remoteMethod:f,loading:d,popoverMinWidth:h,showOnInit:m,multipleMode:p,allowCreate:C,customContent:b,showSelectedIcon:v,inputSearch:T,enableVirtualRender:w,showSelectAll:k,scrollHeight:I,list:M,displayKey:S,idKey:L,collapseTags:J,autoHeight:x,popoverOptions:O,allowEmptyValues:E,autoFocus:j,keepSearchValue:A,selectedStyle:W}=a.toRefs(e),H=a.computed(()=>e.noDataText===void 0?n.value.noData:e.noDataText),F=a.computed(()=>e.noMatchText===void 0?n.value.noMatchedData:e.noMatchText),ne=a.computed(()=>e.loadingText===void 0?n.value.loading:e.loadingText),ge=a.computed(()=>e.placeholder===void 0?n.value.pleaseSelect:e.placeholder),ue=a.computed(()=>e.searchPlaceholder===void 0?n.value.enterKeywords:e.searchPlaceholder),ae=a.computed(()=>e.selectAllText===void 0?n.value.all:e.selectAllText),Ce=Fn(),Z=a.ref(),K=a.ref(),B=a.ref(),R=a.ref(),G=a.ref(),re=a.ref(),oe=a.ref(),q=a.ref(new Map),ie=a.computed(()=>[...q.value.values()]),_=a.ref(new Map),P=a.ref([]),Q=a.computed(()=>P.value.reduce((Ne,Ee)=>(Ne[Ee.value]=Ee.label,Ne),{})),X=a.ref(),le=a.computed(()=>M.value.reduce((Ne,Ee)=>(Ne[Ee[L.value]]=Ee[S.value],Ne),{}));a.watch(s,()=>{var Ne;nc(),e.withValidate&&((Ne=Ce==null?void 0:Ce.validate)==null||Ne.call(Ce,"change"))},{deep:!0}),a.watch(P,()=>{var Ne;(Ne=oe.value)==null||Ne.updatePopover(null,ut.value)});const Y=a.computed(()=>de.value?M.value:M.value.filter(Ne=>{var Ee;return(Ee=Mr(String(Ne[S.value])))==null?void 0:Ee.includes(Mr(Ci.value))})),fe=a.computed(()=>o.value||d.value),ve=a.computed(()=>P.value.map(Ne=>{var Ee,He;return((He=(Ee=q.value)==null?void 0:Ee.get(Ne.value))==null?void 0:He.optionName)||le.value[Ne.value]||Ne.label})),Ie=a.computed(()=>{const Ne=ie.value.reduce((Ee,He)=>(He.disabled||Ee.push(He.optionID),Ee),[]);return Ne.length<=P.value.length&&Ne.every(Ee=>P.value.some(He=>He.value===Ee))}),je=a.computed(()=>!!_.value.size),Re=a.computed(()=>!ie.value.length),Ve=a.computed(()=>ie.value.length&&ie.value.every(Ne=>!Ne.visible)),de=a.computed(()=>c.value&&typeof f.value=="function"),be=a.computed(()=>!(Ws.value||Re.value||Ve.value)||b.value),Te=a.computed(()=>u.value&&k.value&&(!Ci.value||!c.value)),Je=a.computed(()=>I.value-12-(Te.value?32:0)),rt=a.computed(()=>Ws.value?ne.value:Re.value?H.value:Ve.value?F.value:""),it=a.computed(()=>x.value?J.value&&!yi.value:J.value),ut=a.computed(()=>ot.merge({theme:`light ${i("select-popover")}`,trigger:"manual",width:ec.value,arrow:!1,placement:"bottom-start",isShow:yi.value,reference:G.value,offset:6,popoverDelay:0,renderType:vo.AUTO},O.value)),{register:Fe,unregister:ze}=Cd(q),{register:Be,unregister:lt}=Cd(_),{isHover:et,setHover:pt,cancelHover:Ue}=l3(),Qt=a.ref(!1),oa=()=>{Qt.value||(Qt.value=!0,t("focus"))},ql=()=>{Qt.value&&(Qt.value=!1,t("blur"))},{popperWidth:ec,isPopoverShow:yi,hidePopover:la,showPopover:Qs,togglePopover:Cf}=Rb({popoverMinWidth:h.value},K);a.watch(yi,()=>{t("toggle",yi.value)});const bf=a.computed(()=>(c.value&&T.value||C.value)&&yi.value);a.watch(yi,Ne=>{Ne?setTimeout(()=>{Ha(),tc()},10):A.value||(Ci.value="")});const tc=()=>{var He;const Ne=P.value[0],Ee=q.value.get(Ne==null?void 0:Ne.value);Ee&&!Ee.disabled&&Ee.visible?X.value=Ne==null?void 0:Ne.value:X.value=(He=ie.value.find(Nn=>!Nn.disabled&&Nn.visible))==null?void 0:He.optionID},vf=Ne=>{c.value&&ie.value.forEach(Ee=>{var He;Ee.visible=(He=Mr(String(Ee.optionName)))==null?void 0:He.includes(Mr(Ne))})},{searchKey:Ci,searchLoading:Ws}=Jb(de.value?f.value:vf,tc),bi=Ne=>{Ne!==s.value&&(t("update:modelValue",Ne,s.value),t("change",Ne,s.value))},wf=()=>{fe.value||(oa(),Cf())},Hs=Ne=>{c.value&&(Ci.value=Ne)},Nf=(Ne,Ee)=>{const He=String(Ne);!C.value||!He||c.value&&ie.value.find(dn=>Mr(String(dn.optionName))===Mr(He))||q.value.get(He)||(Ee.stopPropagation(),u.value?(P.value.push({value:He,label:He}),bi(P.value.map(dn=>dn.value))):(P.value=[{value:He,label:He}],bi(He),la()),Ci.value="")},Wa=Ne=>{if(!(fe.value||!Ne)){if(u.value){const Ee=P.value.findIndex(He=>He.value===Ne.optionID);Ee>-1?P.value.splice(Ee,1):P.value.push({value:Ne.optionID,label:Ne.optionName||Ne.optionID}),bi(P.value.map(He=>He.value))}else P.value=[{label:Ne.optionName||Ne.optionID,value:Ne.optionID}],bi(Ne.optionID),la();Ha()}},Ha=()=>{setTimeout(()=>{var Ne,Ee,He;!T.value&&!C.value?(Ne=R.value)==null||Ne.focus():p.value==="tag"?(Ee=G.value)==null||Ee.focus():(He=Z.value)==null||He.focus()},0)},Mf=Ne=>{Ne.stopPropagation(),P.value=[],bi(u.value?[]:""),t("clear",u.value?[]:""),la()},If=()=>{X.value=""},Lf=()=>{Ie.value?P.value=[]:ie.value.forEach(Ne=>{Ne.disabled||P.value.find(Ee=>Ee.value===Ne.optionID)||P.value.push({value:Ne.optionID,label:Ne.optionName||Ne.optionID})}),bi(P.value.map(Ne=>Ne.value)),Ha()},Tf=Ne=>{const{scrollTop:Ee,clientHeight:He,scrollHeight:Nn}=Ne.target;Ee+He===Nn&&t("scroll-end")},Sf=Ne=>{if(fe.value)return;const Ee=P.value.findIndex(He=>He.value===Ne);Ee>-1&&(P.value.splice(Ee,1),bi(P.value.map(He=>He.value)))},Fs=Ne=>{var He,Nn;let Ee=Ne;if(typeof Ee=="object"){for(const dn of q.value.keys())if(ot.isEqual(dn,Ee)){Ee=dn;break}}return((Nn=(He=q.value)==null?void 0:He.get(Ee))==null?void 0:Nn.optionName)||le.value[Ee]||Q.value[Ee]||Ee},nc=()=>{Array.isArray(s.value)?P.value=[...s.value.map(Ne=>({value:Ne,label:Fs(Ne)}))]:s.value!==void 0||E.value.includes(s.value)?P.value=[{value:s.value,label:Fs(s.value)}]:P.value=[]},ic=Ne=>{var Nn,dn;if(!yi.value)return;const Ee=ie.value.filter(fn=>!fn.disabled&&fn.visible),He=Ee.findIndex(fn=>fn.optionID===X.value);if(!(!Ee.length||He===-1))switch(Ne.code){case"ArrowDown":{Ne.preventDefault();const fn=He>=Ee.length-1?0:He+1;X.value=(Nn=Ee[fn])==null?void 0:Nn.optionID;break}case"ArrowUp":{Ne.preventDefault();const fn=He===0?Ee.length-1:He-1;X.value=(dn=Ee[fn])==null?void 0:dn.optionID;break}case"Backspace":{if(!u.value||!P.value.length||Ci.value.length||Ne.target===R.value)return;P.value.pop(),bi(P.value.map(fn=>fn.value));break}case"Enter":{const fn=q.value.get(X.value);Wa(fn);break}}},kf=({event:Ne})=>{var He;const{target:Ee}=Ne;(He=K.value)!=null&&He.contains(Ee)||K.value===Ee||(la(),ql())},xf=()=>{setTimeout(()=>{var Ne,Ee;w.value&&((Ee=(Ne=re.value)==null?void 0:Ne.reset)==null||Ee.call(Ne))})};return a.provide(gl,a.reactive({multiple:u,selected:P,activeOptionValue:X,showSelectedIcon:v,selectedStyle:W,register:Fe,unregister:ze,registerGroup:Be,unregisterGroup:lt,handleOptionSelected:Wa,handleGetLabelByValue:Fs})),a.onMounted(()=>{nc(),setTimeout(()=>{m.value&&Qs(),j.value&&Ha()})}),{selected:P,isInput:bf,options:ie,isDisabled:fe,selectedLabel:ve,isPopoverShow:yi,isHover:et,popperWidth:ec,inputRef:Z,triggerRef:K,contentRef:B,searchRef:R,selectTagInputRef:G,virtualRenderRef:re,popoverRef:oe,searchLoading:Ws,isOptionsEmpty:Re,isSearchEmpty:Ve,isFocus:Qt,isShowSelectContent:be,curContentText:rt,isGroup:je,searchKey:Ci,isShowSelectAll:Te,virtualHeight:Je,virtualList:Y,isCollapseTags:it,popoverConfig:ut,focusInput:Ha,setHover:pt,cancelHover:Ue,handleFocus:oa,handleBlur:ql,handleTogglePopover:wf,handleClear:Mf,hidePopover:la,showPopover:Qs,handleToggleAll:Lf,handleOptionSelected:Wa,handleClickOutside:kf,handleScroll:Tf,handleDeleteTag:Sf,handleInputChange:Hs,handleInputEnter:Nf,handleKeydown:ic,handleSelectedAllOptionMouseEnter:If,handlePopoverShow:xf,localLoadingText:ne,localPlaceholder:ge,localSearchPlaceholder:ue,localSelectAllText:ae,resolveClassName:i}},render(){const e=Pe({[`${this.resolveClassName("select")}`]:!0,"popover-show":this.isPopoverShow,"is-disabled":this.isDisabled,"is-focus":this.isFocus,"is-filterable":this.filterable,[this.size]:!0,[this.behavior]:!0}),t=()=>this.loading?a.createVNode(Gi,{loading:!0,theme:"primary",class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length&&!this.isDisabled?a.createVNode(an,{class:"clear-icon",onClick:this.handleClear},null):a.createVNode(Ma,{class:"angle-up"},null),n=()=>{var o,c;return this.multipleMode==="tag"?a.createVNode(Zb,{ref:"selectTagInputRef",modelValue:this.searchKey,"onUpdate:modelValue":u=>this.searchKey=u,selected:this.selected,tagTheme:this.tagTheme,placeholder:this.localPlaceholder,filterable:this.isInput,disabled:this.isDisabled,onRemove:this.handleDeleteTag,collapseTags:this.isCollapseTags,onEnter:this.handleInputEnter,onKeydown:(u,f)=>this.handleKeydown(f)},{prefix:this.prefix?a.createVNode("div",{class:`${this.resolveClassName("select--prefix-area")}`},[a.createVNode("span",null,[this.prefix])]):(c=(o=this.$slots).prefix)==null?void 0:c.call(o),default:this.$slots.tag&&(()=>this.$slots.tag({selected:this.selected})),suffix:()=>t()}):a.createVNode(Da,a.mergeProps({ref:"inputRef",type:"text",modelValue:this.isInput?this.searchKey:this.selectedLabel.join(","),placeholder:this.isInput?this.selectedLabel.join(",")||this.localPlaceholder:this.localPlaceholder,readonly:!this.isInput,selectReadonly:!0,disabled:this.isDisabled,behavior:this.behavior,size:this.size,withValidate:!1,onInput:this.handleInputChange,onEnter:this.handleInputEnter,onKeydown:(u,f)=>this.handleKeydown(f)},this.prefix?{prefix:this.prefix}:null),{...typeof this.$slots.prefix=="function"?{prefix:()=>{var u,f;return(f=(u=this.$slots).prefix)==null?void 0:f.call(u)}}:null,suffix:()=>t()})},i=()=>{var o,c;return a.createVNode("div",{class:this.resolveClassName("select-trigger"),style:{height:this.autoHeight&&this.collapseTags?"32px":""},ref:"triggerRef",onClick:this.handleTogglePopover,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[((c=(o=this.$slots).trigger)==null?void 0:c.call(o,{selected:this.selected}))||n()])},s=()=>{var o,c;return a.createVNode("div",{class:this.resolveClassName("select-content-wrapper"),ref:"contentRef"},[this.filterable&&!this.inputSearch&&a.createVNode("div",{class:this.resolveClassName("select-search-wrapper")},[a.createVNode(Ia,{class:"icon-search",width:16,height:16},null),a.withDirectives(a.createVNode("input",{ref:"searchRef",class:this.resolveClassName("select-search-input"),placeholder:this.localSearchPlaceholder,"onUpdate:modelValue":u=>this.searchKey=u},null),[[a.vModelText,this.searchKey]])]),!this.isShowSelectContent&&a.createVNode("div",{class:this.resolveClassName("select-empty")},[this.searchLoading&&a.createVNode(Gi,{class:"mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),a.createVNode("span",null,[this.curContentText])]),a.createVNode("div",{class:this.resolveClassName("select-content")},[a.createVNode("div",{class:this.resolveClassName("select-dropdown"),style:{maxHeight:`${this.scrollHeight}px`},onScroll:this.handleScroll},[a.withDirectives(a.createVNode("ul",{class:this.resolveClassName("select-options")},[this.isShowSelectAll&&a.createVNode("li",{class:this.resolveClassName("select-option"),onMouseenter:this.handleSelectedAllOptionMouseEnter,onClick:this.handleToggleAll},[this.localSelectAllText]),this.enableVirtualRender?a.createVNode(Ir,{list:this.virtualList,height:this.virtualHeight,lineHeight:32,ref:"virtualRenderRef"},{default:({data:u})=>u.map(f=>{var d,h;return a.createVNode(ml,{key:f[this.idKey],id:f[this.idKey],name:f[this.displayKey]},{default:(h=(d=this.$slots).virtualScrollRender)==null?void 0:h.call(d,{item:f})})})}):this.list.map(u=>a.createVNode(ml,{id:u[this.idKey],name:u[this.displayKey]},null)),(c=(o=this.$slots).default)==null?void 0:c.call(o),this.scrollLoading&&a.createVNode("li",{class:this.resolveClassName("select-options-loading")},[a.createVNode(Gi,{class:"spinner mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),a.createVNode("span",null,[this.localLoadingText])])]),[[a.vShow,this.isShowSelectContent]])]),this.$slots.extension&&a.createVNode("div",{class:this.resolveClassName("select-extension")},[this.$slots.extension()])])])};return a.createVNode("div",{class:e},[a.createVNode($t,a.mergeProps(this.popoverConfig,{onClickoutside:this.handleClickOutside,onAfterShow:this.handlePopoverShow,ref:"popoverRef"}),{default:()=>i(),content:()=>s()})])}}),bd=Ft(Yb,{Option:ml,Group:_b});function Ub(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const{propsMixin:Kb}=ja,vd=Object.assign({},Kb);vd.width.default="400",vd.height.default="100%";const Xb=a.defineComponent({name:"Sideslider",components:{BkModal:ja,BkButton:Et},props:{...vd,direction:{type:String,default:"right",validator:e=>{const t=["left","right"];return t.indexOf(e)<0?(console.error(`direction property is not valid: '${e}',【${t.join(" | ")}】`),!1):!0}}},emits:["closed","update:isShow","shown","hidden","animation-end"],setup(e,{slots:t,emit:n}){const i=async()=>{console.log("slider handleClose");let u=!0;typeof e.beforeClose=="function"&&(u=await e.beforeClose()),u&&(n("update:isShow",!1),n("closed"),setTimeout(()=>{n("animation-end")},250))},s=()=>{setTimeout(()=>{n("shown")},200)},o=()=>{setTimeout(()=>{n("hidden")},200)},{resolveClassName:c}=ye();return()=>{const u={header:()=>{var h;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:`${c("sideslider-header")}`},[a.createVNode("div",{class:`${c("sideslider-close")} ${e.direction}`,onClick:()=>{i()}},null),a.createVNode("div",{class:`${c("sideslider-title")} ${e.direction}`},[((h=t.header)==null?void 0:h.call(t))??e.title])])])},default:()=>{var h;return((h=t.default)==null?void 0:h.call(t))??"Content"},footer:()=>t.footer?a.createVNode("div",{class:`${c("sideslider-footer")}`},[t.footer()]):null},f=`${c("sideslider-wrapper")} ${e.scrollable?"scroll-able":""} ${e.extCls}`,d=t.footer?"calc(100vh - 106px)":"calc(100vh - 52px)";return a.createVNode(ja,a.mergeProps(e,{maxHeight:d,class:f,style:`${e.direction}: 0;`,onHidden:o,onShown:s,onClose:i}),Ub(u)?u:{default:()=>[u]})}}}),h3=Ye(Xb);var g3=function(e){return e.UNKNOWN="",e.ERROR="error",e.LOADING="loading",e}(g3||{});const m3={theme:y.theme().def(bo.PRIMARY),size:y.size(),curStep:y.number.def(1),controllable:y.bool.def(!1),direction:P0(),status:ke("status",{}).def(g3.UNKNOWN),lineType:z0(),text:y.bool,extCls:y.string,steps:y.array.def([]),beforeChange:y.func},p3=Ye(a.defineComponent({name:"Steps",props:m3,emits:["update:curStep","click"],setup(e,{emit:t}){const n=ft("steps"),i=ft("lang"),s=a.ref([]),o=h=>{const m=[];h.forEach(p=>{typeof p=="string"?m.push(p):m.push({title:p.title,icon:p.icon,description:p.description,status:p.status,border:p.border??!0})}),s.value.splice(0,s.value.length,...m)},c=h=>{m3.curStep=h},u=()=>{var h;s.value.splice(0,s.value.length,{title:n.value.step1,icon:1},{title:n.value.step2,icon:2},{title:n.value.step3,icon:3}),(h=e.steps)!=null&&h.length&&o(e.steps)};a.watch(()=>i.value,()=>{u()});const f=async h=>{try{e.controllable&&h!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(m,p)=>{const C=await e.beforeChange(h);C?m(C):p(C)}),t("update:curStep",h),t("click",h))}catch(m){console.warn(m)}};a.onMounted(u),a.watch(()=>e.steps,()=>{o(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{c(e.curStep)},{deep:!0});const{resolveClassName:d}=ye();return{defaultSteps:s,jumpTo:f,resolveClassName:d}},render(){const e=this.resolveClassName("steps"),t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",i=Pe({[`${this.extCls}`]:!!this.extCls,[`${this.resolveClassName(`steps-${this.direction}`)}`]:this.direction,[`${this.resolveClassName(`steps-${this.lineType}`)}`]:this.lineType},`${t} ${e} ${n}`),s=m=>this.curStep>m+1||this.defaultSteps[m].status==="done",o=m=>this.curStep===m+1,c=m=>{const{icon:p}=m;return p?Object.prototype.toString.call(p)==="[object Object]":typeof m=="string"},u=(m,p)=>(p.icon||(p.icon=m),!isNaN(p.icon)),f=m=>m.status==="loading",d=m=>m.status==="error",h=(m,p)=>o(m)&&this.status==="loading"||f(p)?a.createVNode(ls,{class:`${this.resolveClassName("icon")} ${this.resolveClassName("steps-icon")} icon-loading`},null):o(m)&&this.status==="error"||d(p)?a.createVNode(rn,{class:`${this.resolveClassName("steps-icon")}`},null):s(m)?a.createVNode($i,{class:`${this.resolveClassName("steps-icon")}`},null):a.createVNode("span",null,[u(m,p)?m+1:a.createVNode(p.icon,null,null)]);return a.createVNode("div",{class:i},[this.defaultSteps.map((m,p)=>{var C,b;return a.createVNode("div",{class:[this.resolveClassName("step"),m.title?"":this.resolveClassName("step-no-content"),s(p)?"done":"",o(p)?"current":"",o(p)&&this.status==="error"?"isError":"",m.status&&o(p)?[`${this.resolveClassName(`step-${m.status}`)}`]:""]},[a.createVNode("span",{class:[`${this.resolveClassName("step-indicator")}`,`${this.resolveClassName(`step-${c(m)?"icon":"number"}`)}`,`${this.resolveClassName(`step-icon${m.status}`)}`],style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(p+1)}},[((b=(C=this.$slots)[p+1])==null?void 0:b.call(C))??h(p,m)]),m.title?a.createVNode("div",{class:`${this.resolveClassName("step-content")}`},[a.createVNode("div",{class:`${this.resolveClassName("step-title")}`,style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(p+1)}},[m.title]),m.description&&a.createVNode("div",{class:`${this.resolveClassName("step-description")}`,title:m.description},[m.description])]):""])})])}})),qb=a.defineComponent({name:"Switcher",props:{theme:y.theme(),size:y.size(),disabled:y.bool,showText:y.bool,isOutline:y.bool,onText:y.string.def("ON"),offText:y.string.def("OFF"),isSquare:y.bool,extCls:y.string,beforeChange:y.func.def(void 0),trueValue:y.oneOfType([y.string,y.number,y.bool]).def(!0),falseValue:y.oneOfType([y.string,y.number,y.bool]).def(!1),value:y.oneOfType([y.string,y.number,y.bool]).def(!1),modelValue:y.oneOfType([y.string,y.number,y.bool]).def(!1),withValidate:y.bool.def(!0)},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=Fn(),{resolveClassName:i}=ye(),s=a.ref(!1),o=a.computed(()=>e.trueValue===u.value),c=a.ref(e.modelValue!==!1),u=a.computed(()=>c.value?e.modelValue:e.value),f=a.computed(()=>{const m={[e.extCls]:!!e.extCls,[`${i("switcher")}`]:!0,[`${i("switcher-outline")}`]:e.isOutline,[`${i("switcher-square")}`]:e.isSquare,"show-label":e.showText,"is-disabled":e.disabled,"is-checked":o.value,"is-unchecked":!o.value,"is-loading":s.value,[`${i("primary")}`]:e.theme==="primary"};if(e.size&&!e.showText){const p=`${i(`switcher-${e.size}`)}`;m[p]=!0}return m});a.watch(()=>e.modelValue,()=>{var m;c.value=!0,e.withValidate&&((m=n==null?void 0:n.validate)==null||m.call(n,"change"))}),a.watch(()=>e.value,()=>{c.value=!1});const d=m=>{if(m.stopPropagation(),m.preventDefault(),e.disabled||s.value)return;const p=o.value?e.falseValue:e.trueValue,C=!o.value,b=()=>{t("update:modelValue",p),t("change",C)};let v=!0;if(typeof e.beforeChange=="function"&&(v=e.beforeChange(p),typeof v.then=="function"))return s.value=!0,v.then(()=>{b()}).finally(()=>{s.value=!1});v&&b()},h=m=>{(m.code==="Enter"||m.key==="Enter"||m.keyCode===13)&&d(m)};return()=>a.createVNode("div",{class:f.value,onClick:d,tabindex:"0",onKeydown:h},[s.value?a.createVNode(Bo,{class:`${i("switcher-loading")}`},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[o.value?e.onText:e.offText]):""])}}),y3=Ye(qb);var pl=(e=>(e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e.HORIZONTAL="horizontal",e))(pl||{}),C3=(e=>(e.HIGHLIGHT="highlight",e.AUTO="auto",e))(C3||{});const ev=["auto","highlight"],tv=["none","row","col","outer","horizontal"],$e={ROW_INDEX:"__$table_row_index",ROW_UID:"__$uuid",ROW_EXPAND:"__row_expand",ROW_SELECTION:"__row_selection",ROW_SELECTION_ALL:"__row_selection_all",ROW_SELECTION_INDETERMINATE:"__row_selection_indeterminate",ROW_SOURCE_DATA:"__row_source_data",ROW_SKIP_CFG:"__row_skip_config"},Gn={COL_UID:"__col_$uuid",COL_SOURCE_DATA:"__col_source_data",SORT_TYPE:"__sort_type"},Tr=6,Oa=42;var wd=(e=>(e.DEF1="def1",e.DEF2="def2",e))(wd||{});const nv={def1:"#FAFBFD",def2:"#F0F1F5"},yl={large:78,medium:60,small:42},iv=e=>[{value:"small",label:e.value.setting.lineHeight.small,height:yl.small},{value:"medium",label:e.value.setting.lineHeight.medium,height:yl.medium},{value:"large",label:e.value.setting.lineHeight.large,height:yl.large}],b3="InitColumns",v3="BKTableCahce",av="Bk_COlumn_Update_Define",rv=60;var Jt=(e=>(e.ASC="asc",e.DESC="desc",e.NULL="null",e.CUSTOM="custom",e))(Jt||{});const sv=["asc","desc","null","custom"],ea=30;var w3=(e=>(e.CURRENT="current",e.ALL="all",e))(w3||{});ke("showOverflowTooltipMode",{default:"auto"});const ov=ke("columnType",{default:"none"}),Nd=ke("columnType",{default:""});ke("full",{default:"full"}),ke("columnSize",{default:"small"});const lv=nn(),Md=ke("IOverflowTooltipPropType",{}).def(!1);ke("IOverflowTooltipType",{}).def({content:"",disabled:!1,watchCellResize:!0,mode:"auto"});const cv=ke("ISortPropShape",{}).def(!1),uv=ke("IFilterPropShape",{}).def(!1);var N3=(e=>(e.DEBOUNCE="debounce",e.THROTTLE="throttle",e))(N3||{});const Cl=ke("IColumnType",{}).def({width:"100%",label:()=>""}),M3=ke("ITableSettingPropType",{}).def(!1),Id=ke("LabelFunctionStringType",{}),dv=ke("RenderFunctionStringType",{}),I3=ke("SpanFunctionStringType",{}),fv=ke("RowClassFunctionStringType",{}),hv=ke("RowHeightFunctionNumberType",{});ke("FunctionNumberType",{});const bl=ke("StringNumberType",{});ke("IColumnPropType",{}).def({label:void 0,minWidth:ea});const gv={data:y.arrayOf(y.any).def([]),columns:y.arrayOf(Cl).def([]),activeColumn:y.oneOfType([y.number.def(-1),y.arrayOf(y.number.def(-1))]),columnPick:ke("columnPick",{}).def("disabled"),height:bl.def("auto"),stripe:y.bool.def(!1),minHeight:bl.def(Oa*2),maxHeight:bl.def("auto"),rowHeight:hv.def(()=>Oa),headHeight:y.number.def(Oa),showHead:y.bool.def(!0),thead:ke("ITheadType",{}).def({color:wd.DEF1,height:Oa,isShow:!0}),virtualEnabled:y.bool.def(!1),border:y.oneOfType([y.arrayOf(ke("boderType",{})),y.string]).def([pl.ROW]),pagination:y.oneOfType([y.bool.def(!1),y.object.def({})]).def(!1),paginationHeight:y.number.def(rv),remotePagination:y.bool.def(!1),emptyText:y.string,settings:M3,rowClass:y.oneOfType([y.string,y.object,y.func]).def({}),rowStyle:y.oneOfType([y.string,y.object,y.func]).def({}),cellStyle:y.oneOfType([y.string,y.object,y.func]).def({}),cellClass:y.oneOfType([y.string,y.object,y.func]).def({}),scrollLoading:y.oneOfType([y.object,y.bool]).def(void 0),reserveExpand:y.bool.def(!1),selectionKey:y.string.def(""),isSelectedFn:y.func.def(void 0),rowKey:y.oneOfType([y.string,y.func]).def($e.ROW_INDEX),showOverflowTooltip:Md,asyncData:y.bool.def(!1),rowHover:y.oneOf(ev).def(C3.HIGHLIGHT),defaultSort:y.shape({}).def({}),isRowSelectEnable:y.oneOfType([y.func.def(()=>!0),y.bool.def(!0)]).def(!0),resizerWay:ke("ResizerWay",{default:"debounce"}),observerResize:y.bool.def(!0),align:Nd,headerAlign:Nd,prependStyle:y.style().def({})},mv={label:Id,field:Id,render:dv,width:y.oneOfType([y.number,y.string]),minWidth:bl.def(ea),columnKey:y.string.def(""),showOverflowTooltip:Md,type:ov,resizable:y.bool.def(!0),fixed:y.oneOfType([y.bool,lv]).def(!1),sort:cv,filter:uv,colspan:I3.def(()=>1),rowspan:I3.def(()=>1),align:Nd,className:fv,prop:Id,index:y.number.def(void 0)},pv=a.defineComponent({name:"TableColumn",props:mv,setup(e){const t=a.inject(b3,(s,o=!1)=>{},!1),n=a.inject(v3,{queueStack:(s,o)=>o==null?void 0:o()}),i=a.reactive({...e,field:e.prop||e.field});return{initColumns:t,bkTableCache:n,column:i}},unmounted(){this.updateColumnDefine(!0)},mounted(){this.updateColumnDefine()},methods:{updateColumnDefine(e=!1){if(this.$props.index!==void 0&&typeof this.$props.index=="number"){this.updateColumnDefineByIndex(e);return}this.updateColumnDefineByParent()},updateColumnDefineByParent(){const e=()=>{const n=this._.parent.vnode.children.default()||[],i=[],s=o=>{Array.isArray(o)&&o.forEach(c=>{var f,d,h;if(Array.isArray(c)){s(c);return}let u=!0;if(((f=c.type)==null?void 0:f.name)==="TableColumn"){u=Object.hasOwnProperty.call(c.props||{},"key");const m={...c.props,field:c.props.prop||c.props.field,render:(d=c.children)==null?void 0:d.default};i.push(a.unref(m))}(h=c.children)!=null&&h.length&&u&&s(c.children)})};s(n),this.initColumns(i)};typeof this.bkTableCache.queueStack=="function"&&this.bkTableCache.queueStack(av,e)},updateColumnDefineByIndex(e=!1){const t={...this.$props,field:this.$props.prop||this.$props.field,render:this.$slots.default};this.initColumns(a.unref(t),e)}},render(){var e,t;return a.createVNode(a.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{}})])}});class yv{constructor(){De(this,"storage");this.storage={}}queueStack(t,n=()=>{}){this.storage[t]&&clearTimeout(this.storage[t]),this.storage[t]=setTimeout(()=>n())}clearQueueStack(t){this.storage[t]&&clearTimeout(this.storage[t])}}var An=(e=>(e.ON_SORT_BY_CLICK="onSortByClick",e.ON_FILTER_CLICK="onFilterClick",e.ON_SETTING_CHANGE="onSettingChange",e.ON_ROW_EXPAND_CLICK="onRowExpandClick",e.ON_ROW_CHECK="onRowCheck",e))(An||{}),Dt=(e=>(e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.COLUMN_FILTER="columnFilter",e.COLUMN_FILTER_SAVE="colFilterSave",e.ROW_CLICK="rowClick",e.ROW_DBL_CLICK="rowDblclick",e.ROW_EXPAND_CLICK="rowExpand",e.ROW_MOUSE_ENTER="rowMouseEnter",e.ROW_MOUSE_LEAVE="rowMouseLeave",e.PAGE_LIMIT_CHANGE="pageLimitChange",e.PAGE_VALUE_CHANGE="pageValueChange",e.SETTING_CHANGE="settingChange",e.SCROLL_BOTTOM="scrollBottom",e.ROW_SELECT="select",e.ROW_SELECT_ALL="selectAll",e.ROW_SELECT_CHANGE="selectionChange",e.CELL_CLICK="cellClick",e.CELL_DBL_CLICK="cellDblclick",e.NATIVE_CLICK="click",e.NATIVE_DBL_CLICK="dblclick",e))(Dt||{});const Cv=e=>!0,bv=e=>!0,vv=e=>!0,wv=e=>!0,vl=(e,t,n,i,s)=>!0,Nv=e=>!0,Mv=e=>!0,Iv=e=>!0,Lv=e=>!0,L3=e=>!0,Tv=e=>!0,T3=e=>!0,Sv={columnPick:Cv,columnFilter:bv,columnSort:wv,colFilterSave:vv,rowClick:vl,rowDblclick:vl,rowExpand:Nv,select:Mv,selectAll:Iv,selectionChange:Lv,pageLimitChange:L3,pageValueChange:L3,settingChange:Tv,scrollBottom:e=>!0,cellClick:T3,cellDblclick:T3,rowMouseEnter:vl,rowMouseLeave:vl},S3=(e,t)=>{if(e){if(typeof e=="object"){let n=Object.prototype.hasOwnProperty.call(e,"current")?e.current:e.value;return/\d+/.test(n)||(n=1),{...t,...e,current:n}}return t}return{}},kv=(e,t)=>{const n=a.ref(0),i=a.ref(0);let s=a.reactive({count:0,limit:10,current:1,align:"right",layout:["total","limit","list"]});s=S3(e.pagination,s);const o=a.ref(null),c=()=>{if(!e.pagination||e.remotePagination){n.value=0,i.value=t.length;return}n.value=(s.current-1)*s.limit,i.value=s.current*s.limit},u=a.reactive([]),f=(C,b,v)=>{typeof b=="function"&&C.sort((T,w)=>b(T,w,v[Gn.SORT_TYPE]))},d=(C,b)=>{if(typeof b=="function"){const v=C.filter((T,w)=>b(T,w,t));C.length=0,C.push(...v)}},h=(C,b,v)=>{const T=t.slice(),{sortScope:w}=(v==null?void 0:v.sort)??{};w===w3.ALL&&f(T,b,v),u.length=0,u.push(...T.slice(n.value,i.value)),d(u,C),f(u,b,v)},m=(C,b,v)=>{s=S3(e.pagination,s),p(),c(),h(C,b,v)},p=()=>{e.pagination&&(o.value=e.remotePagination?s:{...s,count:t.length})};return{pageData:u,localPagination:o,resolvePageData:h,watchEffectFn:m}},xv=(e,t)=>{const n=a.toRef(e,"scrollLoading"),i=()=>typeof n.value=="boolean"?{loading:!!n.value,inline:!0,title:"",size:La.Normal,mode:Zu.Default,indicator:null}:n.value,s=a.computed(()=>n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object"));return{renderScrollLoading:()=>{var c,u;if(s.value){const{loading:f,size:d,mode:h,title:m,inline:p,indicator:C}=i();return((u=(c=t.slots).fixedBottom)==null?void 0:u.call(c))??a.createVNode(Gi,{loading:f,size:d,mode:h,title:m,inline:p,indicator:C},null)}}}};function Dv(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const jv=e=>{const{proxy:t}=a.getCurrentInstance(),n=a.ref(t.limit);a.watch(()=>t.limit,c=>{n.value=c}),a.watch(()=>t.limitList,c=>{a.nextTick(()=>{c.includes(n.value)||([n.value]=c)})},{immediate:!0});const i=c=>{n.value=c},{resolveClassName:s}=ye();return{limit:n,render:({isFirst:c,isLast:u})=>{let f;return t.showLimit?a.createVNode("div",a.mergeProps({class:{[s("pagination-limit")]:!0,"is-first":c,"is-last":u}},{disabled:t.disabled}),[a.createVNode("div",null,[e.value.eachPage]),a.createVNode(bd,{class:`${s("pagination-limit-select")}`,clearable:!1,size:"small",withValidate:!1,modelValue:n.value,onChange:i,disabled:t.disabled},Dv(f=t.limitList.map((d,h)=>a.createVNode(ml,{id:d,name:`${d}`,key:`${h}_${d}`},null)))?f:{default:()=>[f]}),a.createVNode("div",null,[e.value.strip])]):null}}},Ea=5,Ov=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(1),n=a.computed(()=>t.value===1),i=a.computed(()=>t.value===e.totalPageNum),s=a.ref(!1),o=a.ref(!1),c=a.computed(()=>{s.value=!1,o.value=!1;const b=[];if(e.totalPageNum<=Ea+2){for(let w=2;w<=e.totalPageNum-1;w++)b.push(w);return b}const v=Math.floor(Ea/2);e.totalPageNum>Ea&&(s.value=t.value-v>2,o.value=t.value+v<e.totalPageNum-1);const T=Math.min(e.totalPageNum-Ea,Math.max(2,t.value-v));for(let w=T;w<T+Ea;w++)b.push(w);return b});a.watch(()=>e.modelValue,b=>{a.nextTick(()=>{b>=1&&b<=e.totalPageNum?t.value=b:b<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,b=>{t.value>b&&(t.value=b)})});const u=()=>{n.value||(t.value=t.value-1)},f=()=>{i.value||(t.value=t.value+1)},d=b=>{b!==t.value&&(t.value=b)},h=()=>{t.value=Math.max(1,t.value-Ea)},m=()=>{t.value=Math.min(e.totalPageNum,t.value+Ea)},{resolveClassName:p}=ye();return{current:t,render:({isFirst:b,isLast:v})=>a.createVNode("div",{class:{[`${p("pagination-list")}`]:!0,"is-first":b,"is-last":v}},[a.createVNode("div",{class:{[`${p("pagination-list-pre")}`]:!0,"is-disabled":n.value},onClick:u},[e.prevText||a.createVNode(ri,null,null)]),a.createVNode("div",{class:{[`${p("pagination-list-item")}`]:!0,"is-active":t.value===1},key:"1",onClick:()=>d(1)},[a.createTextVNode("1")]),s.value&&a.createVNode("div",{key:"pre-batch",class:`${p("pagination-list-pre-batch")}`,onClick:h},[a.createVNode(fs,null,null)]),c.value.map(T=>a.createVNode("div",{class:{[`${p("pagination-list-item")}`]:!0,"is-active":t.value===T},key:T,onClick:()=>d(T)},[T])),o.value&&a.createVNode("div",{key:"next-batch",class:`${p("pagination-list-next-batch")}`,onClick:m},[a.createVNode(fs,null,null)]),e.totalPageNum>1&&a.createVNode("div",{class:{[`${p("pagination-list-item")}`]:!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>d(e.totalPageNum)},[e.totalPageNum]),a.createVNode("div",{class:{[`${p("pagination-list-pre")}`]:!0,"is-disabled":i.value},onClick:f},[e.nextText||a.createVNode(On,null,null)])])}},Ev=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(null),n=a.ref(!1),i=a.ref(1),s=a.computed(()=>i.value===1),o=a.computed(()=>i.value===e.totalPageNum);let c=0;const u=a.computed(()=>{const w=[];for(let k=1;k<=e.totalPageNum;k++)w.push(k);return w});a.watch(()=>e.modelValue,w=>{a.nextTick(()=>{w>=1&&w<=e.totalPageNum?i.value=w:w<1?i.value=1:i.value=e.totalPageNum,c=i.value})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,w=>{i.value>w&&(i.value=w)})});const f=()=>{s.value||(i.value=i.value-1)},d=()=>{o.value||(i.value=i.value+1)},h=()=>{n.value=!0},m=()=>{n.value=!1,t.value.textContent=`${c}`,c!==i.value&&(i.value=c)},p=w=>{const k=w.target,I=Number(k.textContent);!I||I<1||I>e.totalPageNum||I===i.value||(c=I)},C=w=>{["Enter","NumpadEnter"].includes(w.code)&&(w.preventDefault(),m())},b=w=>{c=w,m()},{resolveClassName:v}=ye();return{current:i,render:()=>a.createVNode("div",{class:`${v("pagination-small-list")}`},[a.createVNode("div",{class:{[`${v("pagination-btn-pre")}`]:!0,"is-disabled":s.value},onClick:f},[a.createVNode(ri,null,null)]),a.createVNode($t,{theme:"light",trigger:"click",arrow:!1,width:56,boundary:"body",placement:"bottom"},{default:()=>a.createVNode("div",{class:{[`${v("pagination-picker")}`]:!0,"is-focused":n.value}},[a.createVNode("span",{ref:t,class:`${v("pagination-editor")}`,contenteditable:!0,spellcheck:"false",onFocus:h,onBlur:m,onInput:p,onKeydown:C},[i.value]),a.createVNode("span",null,[a.createTextVNode("/")]),a.createVNode("span",{class:`${v("pagination-small-list-total")}`},[e.totalPageNum])]),content:()=>a.createVNode("div",{class:`${v("pagination-picker-list")}`},[u.value.map(w=>a.createVNode("div",{class:{item:!0,"is-actived":w===i.value},key:w,onClick:()=>b(w)},[w]))])}),a.createVNode("div",{class:{[`${v("pagination-btn-next")}`]:!0,"is-disabled":o.value},onClick:d},[a.createVNode(On,null,null)])])}},Av=e=>({isFirst:t,isLast:n})=>{const{props:i}=a.getCurrentInstance();if(!i.showTotalCount)return null;const{resolveClassName:s}=ye();return a.createVNode("div",a.mergeProps({class:{[`${s("pagination-total")}`]:!0,"is-first":t,"is-last":n}},{disabled:i.disabled}),[e.value.total,a.createVNode("div",{class:`${s("pagination-total-num")}`},[i.count]),e.value.strip])},Pv={modelValue:y.number.def(1),count:y.number.def(0).isRequired,limit:y.number.def(10),limitList:y.arrayOf(Number).def([10,20,50,100]),showLimit:y.bool.def(!0),type:y.oneOf(["default","compact"]).def("default"),location:y.oneOf(["left","right"]).def("right"),align:y.oneOf(["left","center","right"]).def("left"),size:y.size(),small:y.bool.def(!1),showTotalCount:y.bool.def(!0),prevText:y.string,nextText:y.string,disabled:y.bool.def(!1),beforeChange:y.func,layout:y.custom(e=>{const t={total:!0,list:!0,limit:!0};return e.some(n=>t[n])},"layout 的值只支持 * total、list、limit *").def(["total","list","limit"])},Ld=Ye(a.defineComponent({name:"Pagination",props:Pv,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const n=ft("pagination"),i=a.ref(0),{count:s,limit:o}=a.toRefs(e),c=Av(n),{current:u,render:f}=Ov(),{current:d,render:h}=Ev(),{limit:m,render:p}=jv(n);a.watch([s,m,o],([b,v])=>{const T=Math.ceil(b/v);i.value=T<1?1:T},{immediate:!0}),a.watch(u,b=>{t.emit("update:modelValue",b),t.emit("change",b)}),a.watch(d,b=>{e.small&&(t.emit("update:modelValue",b),t.emit("change",b))}),a.watch(m,b=>{t.emit("limitChange",b)});const{resolveClassName:C}=ye();return{totalPageNum:i,renderTotal:c,renderList:f,renderLimit:p,renderSmallList:h,resolveClassName:C}},render(){const e=Pe({[`${this.resolveClassName("pagination")}`]:!0,[`${this.resolveClassName(`pagination--${this.size}`)}`]:!0,[`is-align-${this.align}`]:!0}),t={total:this.renderTotal,list:this.small?this.renderSmallList:this.renderList,limit:this.renderLimit};return a.createVNode("div",{class:e},[this.layout.map((n,i)=>t[n]({isFirst:i===0,isLast:i===this.layout.length-1}))])}}));var k3=function(){if(typeof Map<"u")return Map;function e(t,n){var i=-1;return t.some(function(s,o){return s[0]===n?(i=o,!0):!1}),i}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(n){var i=e(this.__entries__,n),s=this.__entries__[i];return s&&s[1]},t.prototype.set=function(n,i){var s=e(this.__entries__,n);~s?this.__entries__[s][1]=i:this.__entries__.push([n,i])},t.prototype.delete=function(n){var i=this.__entries__,s=e(i,n);~s&&i.splice(s,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,i){i===void 0&&(i=null);for(var s=0,o=this.__entries__;s<o.length;s++){var c=o[s];n.call(i,c[1],c[0])}},t}()}(),Td=typeof window<"u"&&typeof document<"u"&&window.document===document,wl=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),zv=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(wl):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),Vv=2;function Rv(e,t){var n=!1,i=!1,s=0;function o(){n&&(n=!1,e()),i&&u()}function c(){zv(o)}function u(){var f=Date.now();if(n){if(f-s<Vv)return;i=!0}else n=!0,i=!1,setTimeout(c,t);s=f}return u}var Jv=20,_v=["top","right","bottom","left","width","height","size","weight"],Qv=typeof MutationObserver<"u",Wv=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Rv(this.refresh.bind(this),Jv)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,i=n.indexOf(t);~i&&n.splice(i,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!Td||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Qv?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!Td||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var n=t.propertyName,i=n===void 0?"":n,s=_v.some(function(o){return!!~i.indexOf(o)});s&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),x3=function(e,t){for(var n=0,i=Object.keys(t);n<i.length;n++){var s=i[n];Object.defineProperty(e,s,{value:t[s],enumerable:!1,writable:!1,configurable:!0})}return e},Sr=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||wl},D3=Ml(0,0,0,0);function Nl(e){return parseFloat(e)||0}function j3(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(i,s){var o=e["border-"+s+"-width"];return i+Nl(o)},0)}function Hv(e){for(var t=["top","right","bottom","left"],n={},i=0,s=t;i<s.length;i++){var o=s[i],c=e["padding-"+o];n[o]=Nl(c)}return n}function Fv(e){var t=e.getBBox();return Ml(0,0,t.width,t.height)}function Bv(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return D3;var i=Sr(e).getComputedStyle(e),s=Hv(i),o=s.left+s.right,c=s.top+s.bottom,u=Nl(i.width),f=Nl(i.height);if(i.boxSizing==="border-box"&&(Math.round(u+o)!==t&&(u-=j3(i,"left","right")+o),Math.round(f+c)!==n&&(f-=j3(i,"top","bottom")+c)),!Gv(e)){var d=Math.round(u+o)-t,h=Math.round(f+c)-n;Math.abs(d)!==1&&(u-=d),Math.abs(h)!==1&&(f-=h)}return Ml(s.left,s.top,u,f)}var $v=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Sr(e).SVGGraphicsElement}:function(e){return e instanceof Sr(e).SVGElement&&typeof e.getBBox=="function"}}();function Gv(e){return e===Sr(e).document.documentElement}function Zv(e){return Td?$v(e)?Fv(e):Bv(e):D3}function Yv(e){var t=e.x,n=e.y,i=e.width,s=e.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,c=Object.create(o.prototype);return x3(c,{x:t,y:n,width:i,height:s,top:n,right:t+i,bottom:s+n,left:t}),c}function Ml(e,t,n,i){return{x:e,y:t,width:n,height:i}}var Uv=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Ml(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=Zv(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),Kv=function(){function e(t,n){var i=Yv(n);x3(this,{target:t,contentRect:i})}return e}(),Xv=function(){function e(t,n,i){if(this.activeObservations_=[],this.observations_=new k3,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=i}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Sr(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new Uv(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Sr(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)&&(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(i){return new Kv(i.target,i.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),O3=typeof WeakMap<"u"?new WeakMap:new k3,E3=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Wv.getInstance(),i=new Xv(t,n,this);O3.set(this,i)}return e}();["observe","unobserve","disconnect"].forEach(function(e){E3.prototype[e]=function(){var t;return(t=O3.get(this))[e].apply(t,arguments)}});var qv=function(){return typeof wl.ResizeObserver<"u"?wl.ResizeObserver:E3}();const zt=(e,t,n)=>{if(typeof t=="string")return Object.prototype.hasOwnProperty.call(e,t)?typeof e[t]=="function"?e[t].call(globalThis,...n):e[t]:void 0;if(Array.isArray(t))return t.map(i=>zt(e,i,n)).filter(i=>i!==void 0).at(0)},Sd=e=>/^\d+$/.test(`${e}`)?[parseInt(`${e}`,10)]:[],e8=e=>A3(e,"auto"),A3=(e,t="100%",n=null)=>{let i="";return/^auto|null|undefined$/ig.test(`${e}`)?i=t:i=/^\d+\.?\d+$/.test(`${e}`)?`${e}px`:e,n&&(i=`calc(${i} - ${n})`),i},t8=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>tv.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},Ls=(e,t=["resizeWidth","calcWidth","width"])=>e[t[0]]??e[t[1]]??e[t[2]],kd=(e,t,n=ea,i=0)=>{const{width:s}=e.getBoundingClientRect()||{},o=s-i;let c=o;const u=[],f=(h,m)=>{const{minWidth:p=void 0}=h;if(p===void 0)return m<ea?ea:m;let C=m;return/^\d+\.?\d*$/.test(`${p}`)&&(C=Number(p)),/^\d+\.?\d*%$/.test(`${p}`)&&(C=Number(p)*o/100),/^\d+\.?\d*px$/i.test(`${p}`)&&(C=Number(`${p}`.replace(/px/i,""))),C},d=(h,m,p=!0)=>{const C=f(h,m),b=m<C?C:m;Object.assign(h,{calcWidth:b}),p&&(c=c-b,c<0&&(c=0))};if(t.forEach((h,m)=>{if(!h.isHidden){const C=String(Ls(h,["resizeWidth","width"]));let b=!0;if(/^\d+\.?\d*(px)?$/.test(C)){const v=Number(C.replace("px",""));d(h,v),b=!1}if(/^\d+\.?\d*%$/.test(C)){let v=n;if(c>0){const T=Number(C.replace("%",""));v=c*T/100}d(h,v),b=!1}b&&u.push(m)}}),u.length>0){let h=n;c>0?u.forEach((m,p)=>{h=c/(u.length-p),d(t[m],h,!1);const{calcWidth:C}=t[m];c=c-C}):u.forEach(m=>{const p=f(t[m],ea);Object.assign(t[m],{calcWidth:p})})}},P3=(e,t,n=60,i=!1,s="throttle")=>{const o=()=>{typeof t=="function"&&t()},c=s==="debounce"?ot.debounce(o,n):ot.throttle(o,n),u=()=>Reflect.apply(c,globalThis,[]),f=new qv(()=>{u()});return i&&typeof t=="function"&&t(),{start:()=>{f.observe(e)},disconnect:()=>{f.unobserve(e),f.disconnect()}}},xd=e=>{const{showHead:t,headHeight:n,thead:i={}}=e;return Object.assign({},{isShow:t,height:n},{...i})},Il=(e,t,n)=>n.type==="index"?e[$e.ROW_INDEX]+1:ot.get(e,t),Ts=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Ts(Reflect.apply(e,globalThis,t),t):[],z3=(e,t,n)=>{const i=V3(e,t,n);return i!==null?i:Mi.v4()},V3=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===$e.ROW_INDEX?`__ROW_INDEX_${n}`:ot.get(e,t.rowKey):typeof t.rowKey=="function"?Reflect.apply(t.rowKey,globalThis,[e]):null,n8=(e,t,n=0)=>{if(e){const i=e.querySelector(t);if(i)return i.offsetHeight>e.offsetHeight-n}return!1},R3=(e,t,n)=>(s=>e.some(o=>o.field===zt(s,["field","type"],[s])))(t)&&n.length&&!n.includes(zt(t,["field","type"],[t])),J3=(e,t,n,i,s)=>typeof e[s]=="function"?Reflect.apply(e[s],globalThis,[{column:e,colIndex:t,row:n,rowIndex:i}]):typeof e[s]=="number"?e[s]:1,_3=(e,t,n,i)=>{const s=J3(e,t,n,i,"colspan"),o=J3(e,t,n,i,"rowspan");return{colspan:s,rowspan:o}},Q3=(e,t)=>{var c,u;const n=e.field,i=f=>Il(f,n,e),s=(f,d)=>{const h=i(f)||"",m=i(d)||"";return typeof h=="number"&&typeof m=="number"?h-m:String.prototype.localeCompare.call(h,m)},o=typeof((c=e.sort)==null?void 0:c.sortFn)=="function"?(u=e.sort)==null?void 0:u.sortFn:s;return t===Jt.NULL?()=>!0:(f,d)=>o(f,d)*(t===Jt.DESC?-1:1)},W3=e=>{const t={[Jt.NULL]:0,[Jt.ASC]:1,[Jt.DESC]:2};return t[e]===void 0?Jt.NULL:Object.keys(t)[(t[e]+1)%3]},H3=e=>{if(typeof e=="string")return{value:e};if(typeof e=="boolean"&&e)return{value:Jt.NULL};if(typeof e=="object"&&e!==null){return e.sortFn,{value:"custom",...e};return e}return null},Ll=(e,{row:t,index:n,isCheckAll:i})=>typeof e.isRowSelectEnable=="boolean"?e.isRowSelectEnable!==!1:typeof e.isRowSelectEnable=="function"?e.isRowSelectEnable({row:t,index:n,isCheckAll:i}):!0,i8=(e,t,n)=>{if(e[$e.ROW_UID]!==void 0)return e[$e.ROW_UID];const i=z3(e,n,t);return i!==void 0&&e[i]!==void 0?e[i]:t},Ss=e=>a.unref(e[$e.ROW_SOURCE_DATA]||e),F3=e=>a.unref(e[Gn.COL_SOURCE_DATA]||e),B3=a.defineComponent({name:"TableCell",props:{column:y.any.def({}),row:y.any.def({}),parentSetting:Md,title:y.string.def(void 0),observerResize:y.bool.def(!0),resizerWay:ke("ResizerWay",{default:N3.DEBOUNCE})},setup(e,{slots:t}){const n=a.ref(),i=a.ref(!1),s=a.computed(()=>({textAlign:e.column.textAlign})),o=()=>/boolean|object/.test(typeof e.column.showOverflowTooltip)&&e.column.showOverflowTooltip!==null?e.column:{showOverflowTooltip:e.parentSetting},{showOverflowTooltip:c=!1}=o();let u=null;const f=()=>{let h=!0,{resizerWay:m}=e,p=n.value.innerText,C="auto",b=!0;return typeof c=="boolean"&&(h=!c),typeof c=="object"&&(h=c.disabled,m=c.resizerWay||"debounce",p=c.content||n.value.innerText,typeof c.content=="function"&&(p=c.content(e.column,e.row)),b=c.watchCellResize,C=c.mode||"auto"),typeof h=="function"&&(h=Reflect.apply(h,this,[e.column,e.row])),{disabled:h,content:p,mode:C,resizerWay:m,watchCellResize:b}},d=()=>{if(!n.value||!Ca(n.value))return;const{mode:h,disabled:m}=f();if(i.value=!m,h==="auto"&&(i.value=Z4(n.value)),h==="static"&&(i.value=!0),i.value){const p=a.ref(f());u===null&&(u=md(n.value,{disabled:p.value.disabled,content:p.value.content,mode:p.value.mode}))}else u==null||u.destroyInstance(n.value),u=null};return a.onMounted(()=>{const{disabled:h,resizerWay:m,watchCellResize:p}=f();if(!h&&(d(),p!==!1&&e.observerResize)){let C=P3(n.value,()=>{d()},60,!0,m);C.start(),a.onBeforeUnmount(()=>{C.disconnect(),C=null})}}),a.onBeforeUnmount(()=>{u==null||u.destroyInstance(n.value)}),()=>{var h;return a.createVNode("div",{class:["cell",e.column.type],style:s.value,ref:n,title:e.title},[(h=t.default)==null?void 0:h.call(t)])}}}),Dd=a.defineComponent({name:"TableRow",render(){var e,t;return a.createVNode(a.Fragment,null,[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}});class a8{constructor(t,n){De(this,"props",null);De(this,"ctx",null);this.props=t,this.ctx=n}}const r8=a.defineComponent({name:"BodyEmpty",props:{list:y.array.def([]),filterList:y.array.def([]),emptyText:y.string},emits:["change"],setup(e){const t=ft("table"),n=a.computed(()=>e.emptyText===void 0?t.value.emptyText:e.emptyText),i=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode(fl,{scene:"part",type:i.value,description:n.value},null)}}),s8=a.defineComponent({name:"HeadFilter",props:{column:Cl,height:y.number.def(Oa)},emits:["change","filterSave"],setup(e,{emit:t}){const{resolveClassName:n}=ye(),i=ft("table"),{column:s}=e,{filter:o}=a.toRefs(e.column),c=a.computed(()=>{var j;return((j=o.value)==null?void 0:j.checked)??[]}),u=a.reactive({isOpen:!1,checked:c.value});a.watch(()=>o.value,()=>{u.checked=c.value},{immediate:!0,deep:!0});const f=a.computed(()=>Pe({[n("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:u.checked.length,opened:u.isOpen})),d=Pe({[n("table-head-filter")]:!0}),h=a.ref(null),m=j=>{u.isOpen=j,j&&setTimeout(()=>{h.value.reset()})},p=`light ${n("table-head-filter")}`,C=a.computed(()=>{const{list:j=[]}=o.value;return j}),b=(j,A="ig")=>new RegExp(`${j}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),A),v=(j,A)=>{const{match:W}=o.value,H=Il(A,zt(s,"field",[s,A]),s);return W==="full"&&j.includes(H),j.some(F=>b(F,"img").test(H))},T=typeof o.value.filterFn=="function"?(j,A,W,H)=>o.value.filterFn(j,A,e.column,W,H):(j,A)=>j.length?v(j,A):!0,w=()=>{k(!0),t("filterSave",[...u.checked]),u.isOpen=!1},k=(j=!1)=>{const{disabled:A}=M(S,i.value.confirm);if(A||j){if(o.value==="custom"){t("change",[...u.checked],null),u.isOpen=!1;return}o.value.checked=u.checked,t("change",[...u.checked],T)}},I=()=>{u.checked.length&&(u.checked.length=0,u.isOpen=!1,a.nextTick(()=>t("change",u.checked,T)))},M=(j,A)=>({disabled:j==="disabled"||j===!1,text:typeof j=="string"?j:A}),{btnSave:S,btnReset:L}=o.value,J=()=>{const{disabled:j,text:A}=M(S,i.value.confirm);return j?a.createVNode("span",{class:"btn-filter-save disabled"},[A]):a.createVNode("span",{class:"btn-filter-save",onClick:w},[A])},x=()=>{const{disabled:j,text:A}=M(L,i.value.reset);return j?"":a.createVNode("span",{class:["btn-filter-reset",u.checked.length?"":"disable"],onClick:I},[A])},O=(j,A)=>{const W=new Set(u.checked);j?W.add(A.value):W.delete(A.value),u.checked.length=0,u.checked.push(...Array.from(W)),k()},E=j=>j.data.length?j.data.map(A=>a.createVNode("div",{class:"list-item"},[a.createVNode($n,{label:A.value,key:A.$index,immediateEmitChange:!1,checked:u.checked.includes(A.value),modelValue:u.checked.includes(A.value),onChange:W=>O(W,A)},{default:()=>[`${A.text}`]})])):a.createVNode("div",{class:"list-item is-empty"},[i.value.emptyText]);return()=>a.createVNode($t,a.mergeProps({trigger:"click",isShow:u.isOpen,placement:"bottom-start",renderType:vo.SHOWN,arrow:!1,offset:0},{theme:p},{onAfterShow:()=>m(!0),onAfterHidden:()=>m(!1)}),{default:()=>a.createVNode(Qo,{class:f.value},null),content:()=>a.createVNode("div",{class:d},[a.createVNode(dl,{class:"content-list"},{default:()=>[a.createVNode(Ir,{lineHeight:32,list:C.value,throttleDelay:0,scrollEvent:!0,ref:h,className:"content-items"},{default:E})]}),a.createVNode("div",{class:"content-footer"},[J(),a.createVNode("span",{class:"btn-filter-split"},null),x()])])})}}),o8=a.defineComponent({name:"HeadSort",props:{column:Cl,defaultSort:y.oneOf(sv).def(Jt.NULL),active:y.bool},emits:["change"],setup(e,{emit:t}){var c,u;const{resolveClassName:n}=ye(),i=((u=(c=e.column)==null?void 0:c.sort)==null?void 0:u.value)||e.defaultSort||Jt.NULL,s=a.ref(i);a.watch(()=>[e.defaultSort],([f])=>{s.value=f});const o=(f,d)=>{f.stopImmediatePropagation(),f.stopPropagation(),f.preventDefault();let h=d;d===Jt.NULL&&(h=W3(d)),s.value===d&&(h=Jt.NULL);const m=Q3(e.column,h),p=H3(e.column.sort);if((p==null?void 0:p.value)==="custom"){t("change",(p==null?void 0:p.sortFn)??m,h);return}t("change",m,h)};return()=>a.createVNode("span",{class:n("head-cell-sort")},[a.createVNode(To,{class:["sort-action","sort-asc",e.active&&s.value===Jt.ASC?"active":""],style:"align-items: flex-end;",onClick:f=>o(f,Jt.ASC)},null),a.createVNode(os,{class:["sort-action","sort-desc",e.active&&s.value===Jt.DESC?"active":""],style:"align-items: flex-start;",onClick:f=>o(f,Jt.DESC)},null)])}});function $3(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const l8=a.defineComponent({name:"Settings",props:{settings:M3,columns:y.arrayOf(Cl).def([]),rowHeight:y.number.def(Oa)},emits:["change"],setup(e,{emit:t,slots:n}){const{resolveClassName:i}=ye(),s=ft("table"),o=iv(s),c=(F,ne)=>zt(F,["id","field","type"],[F,ne]),u=a.ref(!1),f=a.ref(!1),d=a.computed(()=>typeof e.settings=="boolean"?{fields:e.columns.map(F=>({...F,field:F.field||F.type})),checked:[],limit:0,size:"small",sizeList:o,showLineHeight:!0}:e.settings),h=a.ref(d.value.size||"small"),m=a.ref(e.rowHeight),p=a.ref(d.value.checked||[]),b=`light ${i("table-settings")}`,v=a.computed(()=>d.value.fields||e.columns||[]),T={checkAll:u.value,activeSize:h.value,activeHeight:m.value,checkedFields:d.value.checked||[]},w=()=>{Object.assign(T,{checkAll:u.value,activeSize:h.value,activeHeight:m.value,checkedFields:p.value}),t("change",{checked:p.value,size:h.value,height:m.value,fields:a.unref(v)}),f.value=!1},k=()=>{u.value=T.checkAll,h.value=T.activeSize,m.value=T.activeHeight,p.value=T.checkedFields,f.value=!1},I=()=>{f.value=!0},M=F=>{F.stopImmediatePropagation(),F.stopPropagation(),F.preventDefault(),u.value=!u.value;const ne=d.value.fields||e.columns||[],ge=ne.filter((ue,ae)=>ue.disabled&&p.value.includes(c(ue,ae))).map((ue,ae)=>c(ue,ae));if(u.value){const ue=ne.filter(ae=>!ae.disabled).map((ae,Ce)=>c(ae,Ce));p.value.splice(0,p.value.length,...ue,...ge)}else p.value.splice(0,p.value.length,...ge)},S=a.computed(()=>(d.value.limit??0)>0),L=d.value.sizeList||o,J=a.computed(()=>S.value&&(d.value.limit?d.value.limit:0)<=p.value.length),x=(F,ne)=>F.disabled||J.value&&!p.value.includes(c(F,ne)),O=F=>{h.value=F.value,m.value=F.height},E=F=>({"line-size":!0,"is-medium":h.value==="medium",active:F.value===h.value}),j={marginRight:"12px"},A=()=>L.map(F=>a.createVNode("span",{class:E(F),onClick:()=>O(F)},[F.label])),W=a.computed(()=>p.value.length>0&&!v.value.every((F,ne)=>p.value.includes(zt(F,"field",[F,ne])))),H=a.computed(()=>typeof d.value.showLineHeight=="boolean"?d.value.showLineHeight:!0);return a.watch(()=>[p.value],()=>{p.value.length||(u.value=!1),p.value.length&&v.value.every((F,ne)=>p.value.includes(c(F,ne)))&&(u.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{p.value.splice(0,p.value.length,...d.value.checked)},{immediate:!0,deep:!0}),()=>e.settings?a.createVNode($t,a.mergeProps({trigger:"manual",isShow:f.value,placement:"bottom-end",arrow:!0},{theme:b}),{default:()=>a.createVNode("span",{class:"table-head-settings",onClick:I},[a.createVNode(Oo,{style:"color: #c4c6cc;"},null)]),content:()=>{var ne;let F;return a.createVNode("div",{class:"setting-content"},[a.createVNode("div",{class:"setting-head"},[a.createVNode("span",{class:"head-title"},[s.value.setting.title]),a.createVNode(cs,{class:"icon-close-action",onClick:k},null)]),a.createVNode("div",{class:"setting-body"},[a.createVNode("div",{class:"setting-body-title"},[a.createVNode("div",null,[a.createVNode("span",{class:"field-setting-label"},[s.value.setting.fields.title]),S.value?a.createVNode("span",{class:"limit"},[s.value.setting.fields.subtitle(d.value.limit)]):""]),S.value?"":a.createVNode("span",{class:"check-all",onClick:M},[a.createVNode($n,{label:s.value.setting.fields.selectAll,indeterminate:!!W.value,modelValue:p.value.length>0},{default:()=>[s.value.setting.fields.selectAll]})])]),a.createVNode(dl,{class:"setting-body-fields",modelValue:p.value,"onUpdate:modelValue":ge=>p.value=ge},$3(F=v.value.map((ge,ue)=>{let ae;return a.createVNode("div",{class:"field-item"},[a.createVNode($n,{checked:p.value.includes(c(ge,ue)),label:c(ge,ue),disabled:x(ge,ue)},$3(ae=zt(ge,["name","label"],[ge,ue]))?ae:{default:()=>[ae]})])}))?F:{default:()=>[F]}),(ne=n.default)==null?void 0:ne.call(n),H.value?a.createVNode("div",{class:"setting-body-line-height"},[s.value.setting.lineHeight.title,a.createTextVNode(":"),A()]):""]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Et,{theme:"primary",style:j,onClick:w},{default:()=>[s.value.setting.options.ok]}),a.createVNode(Et,{style:j,onClick:k},{default:()=>[s.value.setting.options.cancel]})])])}}):""}}),jd=(e,t,n)=>{const i=(p,C,b)=>({column_fixed:!!p.fixed,column_fixed_left:p.fixed!=="right",column_fixed_right:p.fixed==="right",shadow:p.fixed==="right"?b-C>2:C>0}),s=p=>p.fixed==="right"?"right":"left",o={left:(p=!0)=>t.filter(C=>!C.isHidden&&C.fixed&&C.fixed!=="right").reduce((C,b,v)=>p&&v===0?C:C+Ls(b),0),right:(p=!0)=>t.filter(C=>!C.isHidden&&C.fixed==="right").reduce((C,b,v)=>p&&v===0?C:C+Ls(b),n?Tr:0)},c=(p,C,b=0)=>{const v=C[Gn.COL_UID],T=p==="right"?-1:1,w=t.filter(S=>!S.isHidden),{length:k}=w;let I=p==="right"?k*T:1,M=0;for(I;;){I=I+-1*T;const S=Math.abs(I),L=w[S],J=s(L),x=L[Gn.COL_UID];if(J===p&&v!==x){const O=Ls(L);M=M+O}if(v===x)break}return M+b},u=(p,C=!1)=>{if(!p.fixed||p.isHidden)return{};const b={left:0,right:C?Tr:-1},v=s(p);return b[v]=c(v,p,b[v]),{[v]:`${b[v]}px`}},f=p=>({width:`${o[p](!1)}px`,backgroundColor:e.thead.color,bottom:"0px"}),d=a.computed(()=>{const p={left:!1,right:!1};return t.filter(C=>!C.isHidden&&C.fixed).map(C=>{const b=s(C),v=p[b];return p[b]=!0,{isExist:v,colPos:b,column:C}})}),{resolveClassName:h}=ye();return{fixedWrapperClass:h("table-fixed"),resolveFixedColumnStyle:u,fixedColumns:d,resolveColumnStyle:f,resolveColumnClass:i}};function G3(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}class c8{constructor(t,n,i,s,o,c){De(this,"getRowHeight",(t,n)=>{const{size:i,height:s}=this.setting;return s!=null?zt(this.setting,"height",["tbody",t,n,i]):zt(this.props,"rowHeight",["tbody",t,n])});De(this,"getColumnClass",(t,n)=>({[`${this.uuid}-column-${n}`]:!0,column_fixed:!!t.fixed,column_fixed_left:!!t.fixed,column_fixed_right:t.fixed==="right",[`${t.className}`]:!0}));De(this,"getHeadColumnClass",(t,n)=>({...this.getColumnClass(t,n),active:this.isColActive(n)}));this.props=t,this.context=n,this.reactiveProp=i,this.colgroups=s,this.plugins=new a8(t,n),this.uuid=Mi.v4(),this.events=new Map,this.styleRef=o,this.t=c,this.activeSortIndex=a.ref(-1)}get propActiveCols(){return this.reactiveProp.activeColumns}renderTableHeadSchema(){const{isShow:t=!0}=xd(this.props);if(!t)return null;const n=i=>{var f;const{checked:s=[],size:o,height:c}=i;this.reactiveProp.setting.size=o,this.reactiveProp.setting.height=c;const u=((f=this.props.settings)==null?void 0:f.fields)||[];s.length&&this.colgroups.forEach(d=>{d.isHidden=R3(u,d,s)}),this.emitEvent(An.ON_SETTING_CHANGE,[i])};return[this.props.settings?a.createVNode(l8,{class:"table-head-settings",settings:this.reactiveProp.settings,columns:this.colgroups,rowHeight:this.props.rowHeight,onChange:n},{default:()=>{var i,s;return[(s=(i=this.context.slots).setting)==null?void 0:s.call(i)]}}):"",a.createVNode("table",{cellpadding:0,cellspacing:0},[this.renderColGroup(),this.renderHeader()])]}renderTableBodySchema(t){var i,s;const n=a.computed(()=>this.props.emptyText===void 0?this.t.value.emptyText:this.props.emptyText);return t.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":this.uuid},[this.renderColGroup(),this.renderTBody(t)]):((s=(i=this.context.slots).empty)==null?void 0:s.call(i))??a.createVNode(r8,{filterList:t,list:this.props.data,emptyText:n.value},null)}renderTableFooter(t){return a.createVNode(Ld,a.mergeProps(t,{modelValue:t.current,onLimitChange:n=>this.handlePageLimitChange(n),onChange:n=>this.handlePageChange(n)}),null)}on(t,n){return this.events.has(t)||this.events.set(t,[]),this.events.get(t).push(n),this}destroy(){this.events.clear(),this.events=null}emitEvent(t,n){this.events.has(t)&&this.events.get(t).forEach(i=>{typeof i=="function"&&Reflect.apply(i,this,n)})}handlePageLimitChange(t){Object.assign(this.props.pagination,{limit:t}),this.context.emit(Dt.PAGE_LIMIT_CHANGE,t)}handlePageChange(t){Object.assign(this.props.pagination,{current:t,value:t}),this.context.emit(Dt.PAGE_VALUE_CHANGE,t)}setColumnActive(t,n=!1){const i=this.propActiveCols.find(s=>s.index===t);Object.assign(i,{active:!i.active}),n&&this.propActiveCols.filter(s=>s.index!==t&&s.active).forEach(s=>{Object.assign(s,{active:!1})})}handleColumnHeadClick(t,n){if(this.props.columnPick!=="disabled"&&(this.setColumnActive(t,this.props.columnPick==="single"),this.context.emit(Dt.COLUMN_PICK,this.propActiveCols)),n.sort&&!n.filter){const i=zt(n,["field","type"],[n,t]),s=W3(this.reactiveProp.defaultSort[i]);Object.assign(this.reactiveProp.defaultSort,{[i]:s});const o=Q3(n,s);this.activeSortIndex.value=t,this.emitEvent(An.ON_SORT_BY_CLICK,[{sortFn:o,column:n,index:t,type:s}])}}getSortCell(t,n){const i=zt(t,["field","type"],[t,n]),s=(c,u)=>{Object.assign(this.reactiveProp.defaultSort,{[i]:u}),this.activeSortIndex.value=n,this.emitEvent(An.ON_SORT_BY_CLICK,[{sortFn:c,column:t,index:n,type:u}])},o=this.reactiveProp.defaultSort[i];return a.createVNode(o8,{column:t,defaultSort:o,active:this.activeSortIndex.value===n,onChange:s},null)}getFilterCell(t,n){const i=(o,c)=>{const u=(f,d)=>c(o,f,d);this.emitEvent(An.ON_FILTER_CLICK,[{filterFn:u,checked:o,column:t,index:n}])},s=o=>{this.context.emit(Dt.COLUMN_FILTER_SAVE,{column:t,values:o})};return a.createVNode(s8,{column:t,height:this.props.headHeight,onChange:i,onFilterSave:s},null)}renderHeader(){const t=xd(this.props),{cellFn:n}=t,i={"--row-height":`${zt(t,"height",["thead"])}px`,backgroundColor:this.props.thead.color},s=(d,h)=>typeof n=="function"?n(d,h):zt(d,"label",[d,h]),o=(d,h)=>{if(d.type==="selection"){const v=this.reactiveProp.rowActions.get($e.ROW_SELECTION_ALL);return this.renderCheckboxColumn({[$e.ROW_SELECTION]:!!v},0,!0)}const m=[];d.sort&&m.push(this.getSortCell(d,h)),d.filter&&m.push(this.getFilterCell(d,h));const p=s(d,h);m.unshift(a.createVNode("span",{class:"head-text"},[p]));const C=typeof p=="string"?p:void 0,b={"has-sort":!!d.sort,"has-filter":!!d.filter};return a.createVNode(B3,{class:b,title:C,observerResize:this.props.observerResize,resizerWay:this.props.resizerWay},G3(m)?m:{default:()=>[m]})},c=d=>Array.from(d.listeners.keys()).reduce((h,m)=>{const p=m.split("_").slice(-1)[0];return Object.assign(h,{[p]:C=>{d.listeners.get(m).forEach(b=>Reflect.apply(b,this,[C,d,this]))}})},{}),{resolveFixedColumnStyle:u}=jd(this.props,this.colgroups),f=()=>{if(this.styleRef.value.hasScrollY){const d={width:`${Tr+2}px`,right:"-1px"};return a.createVNode("th",{style:d,class:"column_fixed"},null)}};return a.createVNode(a.Fragment,null,[a.createVNode("thead",{style:i},[a.createVNode(Dd,null,{default:()=>[a.createVNode("tr",null,[this.filterColGroups.map((d,h)=>{var p;const m=Object.assign({},u(d,this.styleRef.value.hasScrollY),{backgroundColor:nv[((p=this.props.thead)==null?void 0:p.color)??wd.DEF1]});return a.createVNode("th",a.mergeProps({colspan:1,rowspan:1,class:[this.getHeadColumnClass(d,h),this.getColumnCustomClass(d),d.align||this.props.headerAlign||this.props.align],style:m,onClick:()=>this.handleColumnHeadClick(h,d)},c(d)),[o(d,h)])}),f()])]})])])}getColumnCustomClass(t,n){const i=t.className;if(i){if(typeof i=="function")return i(n);if(typeof i=="string")return i}return""}renderTBody(t){const{resolveFixedColumnStyle:n}=jd(this.props,this.colgroups),i=t.length;return a.createVNode("tbody",null,[t.map((s,o)=>{const c=[...Ts(this.props.rowStyle,[s,o,this]),{"--row-height":`${this.getRowHeight(s,o)}px`}],u=[...Ts(this.props.rowClass,[s,o,this]),`hover-${this.props.rowHover}`,o%2===1&&this.props.stripe?"stripe-row":""];return[a.createVNode(Dd,null,{default:()=>[a.createVNode("tr",{style:c,class:u,key:V3(s,this.props,o),onClick:f=>this.handleRowClick(f,s,o,t),onDblclick:f=>this.handleRowDblClick(f,s,o,t),onMouseenter:f=>this.handleRowEnter(f,s,o,t),onMouseleave:f=>this.handleRowLeave(f,s,o,t)},[this.filterColGroups.map((f,d)=>{var k;const h=[n(f),...Ts(this.props.cellStyle,[f,d,s,o,this])],m={"expand-cell":f.type==="expand"},{colspan:p,rowspan:C}=_3(f,d,s,o),b=$e.ROW_SKIP_CFG,v=f[Gn.COL_UID],{skipRow:T=!1,skipCol:w=!1}=((k=s[b])==null?void 0:k[v])??{};if(!T&&!w){let I;const M=[this.getColumnClass(f,d),this.getColumnCustomClass(f,s),f.align||this.props.align,...Ts(this.props.cellClass,[f,d,s,o,this]),{"expand-row":s[$e.ROW_EXPAND],"is-last":o+C>=i}],S=(L,J)=>{const x={event:L,row:Ss(s),column:F3(f),cell:{getValue:()=>this.renderCell(s,f,o,t)},rowIndex:o,columnIndex:d};this.context.emit(J,x)};return a.createVNode("td",{class:M,style:h,colspan:p,rowspan:C,onClick:L=>S(L,Dt.CELL_CLICK),onDblclick:L=>S(L,Dt.CELL_DBL_CLICK)},[a.createVNode(B3,{class:m,column:f,row:s,parentSetting:this.props.showOverflowTooltip,observerResize:this.props.observerResize},G3(I=this.renderCell(s,f,o,t))?I:{default:()=>[I]})])}return null})])]}),this.renderExpandRow(s,u,o)]})])}renderExpandRow(t,n,i){if(!!t[$e.ROW_EXPAND]){const o=[...n,{row_expend:!0}],u=`${i8(t,i,this.props)}_expand`;return a.createVNode(Dd,{key:u},{default:()=>{var f,d;return[a.createVNode("tr",{class:o},[a.createVNode("td",{colspan:this.filterColGroups.length,rowspan:1},[((d=(f=this.context.slots).expandRow)==null?void 0:d.call(f,Ss(t)))??a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}}handleRowClick(t,n,i,s){this.context.emit(Dt.ROW_CLICK,t,n,i,s,this)}handleRowDblClick(t,n,i,s){this.context.emit(Dt.ROW_DBL_CLICK,t,n,i,s,this)}handleRowEnter(t,n,i,s){this.context.emit(Dt.ROW_MOUSE_ENTER,t,n,i,s,this)}handleRowLeave(t,n,i,s){this.context.emit(Dt.ROW_MOUSE_LEAVE,t,n,i,s,this)}getExpandCell(t){return!!t[$e.ROW_EXPAND]?a.createVNode(us,null,null):a.createVNode(ps,null,null)}handleRowExpandClick(t,n,i,s,o){this.emitEvent(An.ON_ROW_EXPAND_CLICK,[{row:t,column:n,index:i,rows:s,e:o}])}renderCellCallbackFn(t,n,i,s){const o=Il(t,zt(n,"field",[n,t]),n),c=t[$e.ROW_INDEX],u=typeof c=="number"?c:i,f=this.props.data[u];return n.render({cell:o,data:f,row:t,column:n,index:i,rows:s})}renderCheckboxColumn(t,n,i=!1){const s=u=>{this.emitEvent(An.ON_ROW_CHECK,[{row:t,index:n,isAll:i,value:u}])},o=i&&!!this.reactiveProp.rowActions.get($e.ROW_SELECTION_INDETERMINATE),c=Ll(this.props,{row:t,index:n,isCheckAll:i});return a.createVNode($n,{onChange:s,disabled:!c,modelValue:t[$e.ROW_SELECTION],indeterminate:o},null)}renderExpandColumn(t,n,i,s){const o=()=>{var c,u;return typeof n.render=="function"?this.renderCellCallbackFn(t,n,i,s):((u=(c=this.context.slots).expandCell)==null?void 0:u.call(c,{row:t,column:n,index:i,rows:s}))??this.getExpandCell(t)};return a.createVNode("span",{class:"expand-btn-action",onClick:c=>this.handleRowExpandClick(t,n,i,s,c)},[o()])}renderCell(t,n,i,s){var u;const o=()=>{const f=Il(t,zt(n,"field",[n,t]),n);return typeof n.render=="function"?this.renderCellCallbackFn(t,n,i,s):typeof f=="object"?JSON.stringify(a.unref(f)):f},c={expand:(f,d,h,m)=>this.renderExpandColumn(f,d,h,m),selection:(f,d,h,m)=>this.renderCheckboxColumn(f,h)};return((u=c[n.type])==null?void 0:u.call(c,t,n,i,s))??o()}isColActive(t){return this.props.columnPick!=="disabled"&&this.propActiveCols.some(n=>n.index===t&&n.active)}renderColGroup(){return a.createVNode("colgroup",null,[(this.filterColGroups||[]).map((t,n)=>{const i=Pe({active:this.isColActive(n)}),s=`${e8(Ls(t))}`.replace(/px$/i,"");return a.createVNode("col",{class:i,width:s},null)})])}get filterColGroups(){return this.colgroups.filter(t=>!t.isHidden)}get setting(){return this.reactiveProp.setting}}const Tl=(e,t)=>({initColumns:(s,o=!1)=>{let c=[];if(Array.isArray(s)?c=s:c=[s],o)c.forEach(u=>{const f=t.findIndex(d=>d.label===u.label&&d.field===u.field);if(o){f>=0&&t.splice(f,1);return}});else{let u=!1;c.forEach(f=>{if(f.index!==void 0&&f.index>=0){u=!0;const d=t.findIndex(h=>h.label===f.label&&h.field===f.field);d>=0&&t.splice(d,1),t.push(f)}else{const d=t.findIndex(h=>h.label===f.label&&h.field===f.field);d>=0?t.splice(d,1,f):t.push(f)}}),u&&t.sort((f,d)=>f.index-d.index)}},getColumns:()=>{var s;return t!=null&&t.length?t:(s=e.columns)!=null&&s.length?e.columns:[]}}),Z3=e=>e.columnPick!=="disabled"?e.columnPick==="multi"?Array.isArray(e.activeColumn)?e.activeColumn:Sd(e.activeColumn):Array.isArray(e.activeColumn)?Sd(e.activeColumn[0]):Sd(e.activeColumn):[],u8=(e,t)=>{let n=a.reactive([]);const{getColumns:i}=Tl(e,t);if(e.columnPick==="disabled")return{activeColumns:n};const s=a.reactive(Z3(e)),o=()=>i().map((c,u)=>({index:u,_column:c,active:s.some(f=>f===u)}));return a.watchEffect(()=>{n=o();const c=Z3(e);n.forEach((u,f)=>{Object.assign(u,{active:c.some(d=>d===f)})})}),{activeColumns:n}},d8=(e,t=!0)=>{const n="HeadColumnResize";let i=function(M){return M.MOUSE_MOVE="onMousemove",M.MOUSE_OUT="onMouseout",M.MOUSE_DOWN="onMousedown",M}({}),s=!1,o=!1,c=!1,u=0,f=null,d=0;const h=a.ref(-1e3),m=M=>{o=!1,c=!1;const S=document.body.style;S.cursor="";const L=M.clientX-u,J=(f.resizeWidth??f.calcWidth)+L,x=Number(f.minWidth);f.resizeWidth=J>x?J:x,document.removeEventListener("mouseup",m),document.removeEventListener("mousemove",C),u=0,h.value=-1e3,f=null,M.target.closest("table").querySelectorAll("th").forEach(E=>E.style.setProperty("user-select","inherit"))},p=M=>ot.throttle(()=>{const S=M.clientX-u,L=(f.resizeWidth??f.calcWidth)+S;Number(f.minWidth)<L&&(h.value=M.clientX-u+d)},60),C=M=>{document.body.style.setProperty("cursor",""),p(M)()},b=(M,S)=>{var L,J;ot.isElement(M)&&((L=M.style)==null||L.setProperty("cursor",S),((J=M.childNodes)==null?void 0:J.length)>0&&M.childNodes.forEach(x=>b(x,S)))},v={[i.MOUSE_DOWN]:(M,S)=>{if(!s)return;o=!0,document.body.style.setProperty("cursor","col-resize"),f=S,u=M.clientX;const J=M.target.closest("table");d=u-J.getBoundingClientRect().left,document.addEventListener("mouseup",m),document.addEventListener("mousemove",C)},[i.MOUSE_MOVE]:(M,S)=>{o&&!c&&(c=!0);const L=M.target.closest("th");if(c&&L.style.setProperty("user-select","none"),!c){if(!L)return;const J=L.getBoundingClientRect();J.width>12&&J.right-M.pageX<8?(s=!0,b(L,"col-resize")):(b(L,""),s=!1)}},[i.MOUSE_OUT]:(M,S)=>{const L=M.target;c||b(L,"")}},T=M=>`${n}_${M}`,w=()=>{e.forEach(M=>{M.resizable!==!1&&Object.keys(v).forEach(S=>{const L=T(S);M.listeners.has(L)||M.listeners.set(L,[]),M.listeners.get(L).push(v[S])})})},k=()=>{e.forEach(M=>{Object.keys(v).forEach(S=>{const L=T(S);if(M.listeners.has(L)){const J=M.listeners.get(L);J.length=0}})})};t&&w();const I=a.computed(()=>({position:"absolute",top:0,bottom:0,left:0,width:"1px","background-color":"#ebeef5"}));return{registerResizeEvent:w,resetResizeEvents:k,dragOffsetX:h,dragOffsetXStyle:I}},f8=(e,t,n,i,s)=>{const{getColumns:o}=Tl(e,t),c=a.ref(200),u=a.ref(!1),f=a.computed(()=>e.pagination&&e.data.length),d=a.computed(()=>u.value),h=a.computed(()=>Pe({[Bt("table")]:!0,"has-footer":f.value,"has-scroll-y":u.value||e.virtualEnabled},t8(e.border))),m=Pe({[Bt("table-head")]:!0,"has-settings":!!e.settings}),p=a.computed(()=>o()),C=xd(e),b=a.computed(()=>({"--row-height":`${zt(C,"height",["thead"])}px`,"--scroll-head-left":`-${i.scrollTranslateX}px`,"--scroll-left":`${i.scrollTranslateX}px`})),v={[Bt("table-body")]:!0},T=a.computed(()=>Pe({[Bt("table-footer")]:!0,"is-hidden":!e.pagination||!e.data.length})),w=()=>e.height==="number"?`${e.height}px`:typeof e.height=="string"?e.height:"",k=()=>{if(p.value.every(j=>/^\d+\.?\d*(px)?$/ig.test(`${j.width}`))){const j=p.value.reduce((W,H)=>W+Number(`${H.width}`.replace(/px/ig,"")),0),A=u.value?Tr:0;return`${j+A}px`}return"100%"},I=a.computed(()=>({minHeight:A3(e.minHeight,"auto"),width:k(),maxWidth:"100%",height:w()})),M=(j,A)=>{const W=String(j);if(/^\d+\.?\d*$/.test(W))return Number(W);if(/^\d+\.?\d*px$/ig.test(W))return Number(W.replace("px",""));if(/^\d+\.?\d*%$/ig.test(W)&&typeof A=="number"){const H=Number(W.replace("%",""));return A*H/100}return A},S=a.reactive({display:"","min-height":"",height:"",maxHeight:""}),L=()=>e.showHead?M(e.headHeight,Oa):0,J=()=>{const j=M(e.height,c.value),A=L(),W=M(e.minHeight,c.value),H=e.pagination&&e.data.length?e.paginationHeight:0,F=j-A-H,ne=e.height!=="auto"?`${F}px`:!1,ge=W-A-H,ue=M(e.maxHeight,void 0),ae=typeof ue=="number"?`${ue-A-H}px`:!1;Object.assign(S,{display:s!=null&&s.length?"block":!1,"min-height":`${ge}px`,height:ne,maxHeight:ae})};a.onMounted(()=>{x(n==null?void 0:n.value)});const x=j=>{if(j){const{height:A}=j.parentElement.getBoundingClientRect();c.value=A,J(),O(j)}},O=j=>{if(!j)return;const A=e.virtualEnabled?`.${Bt("virtual-section")}`:`.${Bt("table-body-content")}`,W=j.querySelector(`.${Bt("table-body")}`);u.value=n8(W,A,0)};return{tableClass:h,headClass:m,contentClass:v,footerClass:T,wrapperStyle:I,contentStyle:S,headStyle:b,resetTableHeight:x,updateBorderClass:O,getColumnsWidthOffsetWidth:()=>{let j=0;return u.value&&(j=j+Tr),e.border.includes(pl.OUTER)&&!e.border.includes(pl.NONE)&&(j=j+2),j},hasFooter:f,hasScrollY:u,hasScrollYRef:d}},h8=(e,t)=>{var q,ie;const n=a.reactive([]),{getColumns:i}=Tl(e,t),s=_=>{if(/^\d+/.test(`${_.minWidth}`))return _.minWidth;let P=ea;return _.sort&&(P=P+18),_.filter&&(P=P+28),P},o=a.computed(()=>i()),c=_=>{var X,le;const P=(_==null?void 0:_.checked)||((X=e.settings)==null?void 0:X.checked)||[],Q=(_==null?void 0:_.fields)||((le=e.settings)==null?void 0:le.fields)||[];n.length=0,n.push(...o.value.map(Y=>({...Y,calcWidth:null,resizeWidth:null,minWidth:s(Y),listeners:new Map,isHidden:R3(Q,Y,P),[Gn.COL_UID]:Mi.v4(),[Gn.COL_SOURCE_DATA]:Y})))};typeof e.settings=="object"&&c(e.settings);const{dragOffsetXStyle:u,dragOffsetX:f,resetResizeEvents:d,registerResizeEvent:h}=d8(n,!0),{activeColumns:m}=u8(e,t);a.watch(()=>[e.settings],()=>{var _;(((_=e.settings)==null?void 0:_.checked)||[]).length&&c()});const p=ot.debounce(()=>{c(),d(),h()},120);a.watch(()=>o,()=>{p()},{immediate:!0,deep:!0});const C=e.columns.reduce((_,P,Q)=>{const X=zt(P,["field","type"],[P,Q]),le=H3(P.sort);return le?{..._||{},[X]:le==null?void 0:le.value}:_},null),b=a.reactive({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:m,settings:e.settings,setting:{size:(q=e.settings)==null?void 0:q.size,height:yl[(ie=e.settings)==null?void 0:ie.size]},defaultSort:C||e.defaultSort}),v=_=>{var P;return b.rowActions.has(_)?(P=b.rowActions.get(_))==null?void 0:P.isExpand:!1},T=()=>{Array.isArray(b.defaultSort)&&b.defaultSort.splice(0),b.defaultSort=C||e.defaultSort},w=(_,P=void 0)=>{const Q=_[$e.ROW_UID],X=typeof P=="boolean"?P:!v(Q);b.rowActions.set(Q,Object.assign({},b.rowActions.get(Q)??{},{isExpand:X})),ae()},k=()=>b.rowActions.has($e.ROW_SELECTION_ALL)?b.rowActions.get($e.ROW_SELECTION_ALL):e.selectionKey?A.every(_=>E(_)):!1,I=_=>{const P=_[$e.ROW_UID],{isSelected:Q=!1}=b.rowActions.get(P)||{};return Q},M=(_=I)=>{let P=!1,Q=!1;A.forEach(X=>{const le=_(X);!P&&!le&&(P=!0),!Q&&le&&(Q=!0)}),b.rowActions.set($e.ROW_SELECTION_INDETERMINATE,Q&&P),b.rowActions.set($e.ROW_SELECTION_ALL,Q&&!P)},S=()=>e.columns.some(_=>_.type==="selection"),L=()=>{S()&&M(_=>E(_))},J=(_=void 0)=>{const P=typeof _=="boolean"?_:!k();b.rowActions.set($e.ROW_SELECTION_ALL,P),b.rowActions.set($e.ROW_SELECTION_INDETERMINATE,!1),A.forEach((Q,X)=>{if(Ll(e,{row:Q,index:X,isCheckAll:!1})){const le=Q[$e.ROW_UID],Y=Object.assign({},b.rowActions.get(le)??{},{isSelected:P});b.rowActions.set(le,Y)}}),M(),ae(P),K(null,_,!0)},x=()=>{J(!1)},O=(_,P)=>{const Q=_[$e.ROW_UID];if(Q){const X=typeof P=="boolean"?P:!j(_,Q),le=Object.assign({},b.rowActions.get(Q)??{},{isSelected:X});b.rowActions.set(Q,le),P||b.rowActions.set($e.ROW_SELECTION_ALL,!1),M(),ae(),K(_,P,!1)}},E=(_,P=Q=>I(Q))=>typeof e.isSelectedFn=="function"?Reflect.apply(e.isSelectedFn,void 0,[{row:_,data:e.data}]):typeof e.selectionKey=="string"&&e.selectionKey.length?ot.get(_,e.selectionKey):P(_),j=(_,P,Q)=>E(_,()=>{var le;const X=P===void 0?_[$e.ROW_UID]:P;return Ll(e,{row:_,index:Q,isCheckAll:!1})&&k()?!0:b.rowActions.has(X)?(le=b.rowActions.get(X))==null?void 0:le.isSelected:!1}),A=a.reactive([]),W=a.computed(()=>n.some(_=>typeof _.rowspan=="function"||/^\d$/.test(`${_.rowspan}`)||typeof _.colspan=="function"||/^\d$/.test(`${_.colspan}`))),H=a.computed(()=>n.some(_=>_.type==="selection")),F=a.computed(()=>n.some(_=>_.type==="expand")),ne=a.computed(()=>n.some(_=>_.type==="index")),ge=(_=!1)=>{let P=null;const Q={},X=e.data.map(le=>({[$e.ROW_UID]:Mi.v4(),...le}));if(W.value||H.value||F.value||ne.value){const le=X.map((Y,fe)=>{const ve=z3(Y,e,fe);P=ve;const Ie={...Y,[$e.ROW_UID]:Y[$e.ROW_UID]||ve,[$e.ROW_SOURCE_DATA]:{...Y}};if(W.value){const je=Ce(Y,ve,fe,Q,P);Object.assign(Ie,{[$e.ROW_SKIP_CFG]:je})}return H.value&&Object.assign(Ie,{[$e.ROW_SELECTION]:j(Y,ve,fe)}),ne.value&&Object.assign(Ie,{[$e.ROW_INDEX]:fe}),F.value&&Object.assign(Ie,{[$e.ROW_EXPAND]:_?v(ve):!1}),Ie});A.length=0,A.push(...le),H.value&&L();return}A.length=0,A.push(...X)},ue=(_,P,Q,X)=>{const le=j(Q,Q[$e.ROW_UID],X);return _&&typeof P=="boolean"?P:le},ae=_=>{if(W.value||H.value||F.value||ne.value){let P=null;const Q={};A.forEach((X,le)=>{const Y=X[$e.ROW_UID];if(F.value&&Object.assign(X,{[$e.ROW_EXPAND]:v(X[$e.ROW_UID])}),W.value){const fe=Ce(X,Y,le,Q,P);P=X[$e.ROW_UID],Object.assign(X,{[$e.ROW_SKIP_CFG]:fe})}if(ne.value&&Object.assign(X,{[$e.ROW_INDEX]:le}),H.value){const fe=Ll(e,{row:X,index:le,isCheckAll:!1});Object.assign(X,{[$e.ROW_SELECTION]:ue(fe,_,X,le)})}}),H.value&&typeof _!="boolean"&&L();return}},Ce=(_,P,Q,X,le)=>{let Y=0;const fe=X[le]??{};return X[P]||(X[P]={}),n.forEach((ve,Ie)=>{var Te;const{colspan:je,rowspan:Re}=_3(ve,Ie,_,Q),Ve=ve[Gn.COL_UID],de=((Te=fe[Ve])==null?void 0:Te.skipRowLen)??0,be={[Ve]:{skipRowLen:0,skipRow:!1,skipCol:!1,skipColLen:0}};Y>0&&(be[Ve].skipColLen=Y,be[Ve].skipCol=!0,Y=Y-1),de>1?(be[Ve].skipRowLen=de-1,be[Ve].skipRow=!0):Re>1&&(be[Ve].skipRowLen=Re,be[Ve].skipRow=!1),je>1&&(be[Ve].skipColLen=je,Y=je-1),Object.assign(X[P],{...be})}),X[P]},Z=ot.debounce(ae,120);a.watch([W,H,F,ne],()=>{Z()});const K=(_,P,Q=!1)=>{if(e.asyncData&&e.rowKey){if(Q)e.data.forEach(X=>{ot.has(X,e.selectionKey)&&ot.set(X,e.selectionKey,!!P)});else if(ot.has(_,e.selectionKey)){const X=e.data.find(le=>ot.get(le,e.rowKey)===ot.get(_,e.rowKey));ot.set(X,e.selectionKey,!!P)}}},{fixedColumns:B,resolveColumnStyle:R,resolveColumnClass:G,fixedWrapperClass:re}=jd(e,n,!1);return{colgroups:n,dragOffsetXStyle:u,dragOffsetX:f,reactiveSchema:b,indexData:A,fixedWrapperClass:re,fixedColumns:B,resolveColumnStyle:R,resolveColumnClass:G,initIndexData:ge,updateIndexData:ae,setRowExpand:w,updateColGroups:c,clearSelection:x,toggleAllSelection:J,toggleRowSelection:O,getSelection:()=>A.filter(_=>j(_)),clearSort:T}},Y3=Ft(a.defineComponent({name:"Table",props:gv,emits:Sv,setup(e,t){const n=ft("table");let i=null,s=null,o=null;const c=new yv,u=a.reactive([]),{initColumns:f}=Tl(e,u);a.provide(b3,f),a.provide(v3,c);const d=a.ref(),h=a.ref(),m=a.ref(0),{colgroups:p,dragOffsetXStyle:C,dragOffsetX:b,reactiveSchema:v,indexData:T,fixedColumns:w,resolveColumnStyle:k,resolveColumnClass:I,setRowExpand:M,initIndexData:S,fixedWrapperClass:L,clearSelection:J,toggleAllSelection:x,toggleRowSelection:O,getSelection:E,clearSort:j,updateColGroups:A}=h8(e,u),{pageData:W,localPagination:H,resolvePageData:F,watchEffectFn:ne}=kv(e,T),{tableClass:ge,headClass:ue,contentClass:ae,footerClass:Ce,wrapperStyle:Z,contentStyle:K,headStyle:B,hasScrollYRef:R,updateBorderClass:G,resetTableHeight:re,getColumnsWidthOffsetWidth:oe,hasFooter:q}=f8(e,u,d,v,W),{resolveClassName:ie}=ye(),_=a.computed(()=>({hasScrollY:R.value})),P=new c8(e,t,v,p,_,n),Q=()=>{const Fe=d.value.querySelector(`.${ie("table-body-content")}`),ze=Fe.querySelector("table");if(ze){const Be=ze.scrollWidth,lt=Fe.clientWidth;m.value=Be-lt}};a.watch(()=>[e.data,e.pagination,e.height,e.maxHeight,e.minHeight],()=>{S(e.reserveExpand),ne(o,i,s),a.nextTick(()=>{re(d.value),G(d.value)})},{immediate:!0,deep:!0}),a.watchEffect(()=>{if((d==null?void 0:d.value)instanceof HTMLElement){const Fe=oe();kd(d.value,p,20,Fe),Q()}}),P.on(An.ON_SORT_BY_CLICK,Fe=>{const{sortFn:ze,column:Be,index:lt,type:et}=Fe;typeof ze=="function"&&(i=ze,s=Be,Object.assign(s,{[Gn.SORT_TYPE]:et}),F(o,i,s)),t.emit(Dt.COLUMN_SORT,{column:a.unref(Be[Gn.COL_SOURCE_DATA]),index:lt,type:et})}).on(An.ON_FILTER_CLICK,Fe=>{const{filterFn:ze,checked:Be,column:lt,index:et}=Fe;typeof ze=="function"&&(o=ze,F(o,i,s)),t.emit(Dt.COLUMN_FILTER,{checked:Be,column:a.unref(lt[Gn.COL_SOURCE_DATA]),index:et})}).on(An.ON_SETTING_CHANGE,Fe=>{const{checked:ze=[],size:Be,height:lt,fields:et}=Fe;a.nextTick(()=>{A({checked:ze,fields:et}),G(d.value);const pt=oe();ze.length&&kd(d.value,p,ea,pt),t.emit(Dt.SETTING_CHANGE,{checked:ze,size:Be,height:lt,fields:et})})}).on(An.ON_ROW_EXPAND_CLICK,Fe=>{const{row:ze,column:Be,index:lt,rows:et,e:pt}=Fe;t.emit(Dt.ROW_EXPAND_CLICK,{row:Ss(ze),column:F3(Be),index:lt,rows:et,e:pt}),M(ze,!ze[$e.ROW_EXPAND])}).on(An.ON_ROW_CHECK,({row:Fe,isAll:ze,index:Be,value:lt})=>{ze?(x(lt),t.emit(Dt.ROW_SELECT_ALL,{checked:lt,data:e.data})):(O(Fe,lt),t.emit(Dt.ROW_SELECT,{row:Ss(Fe),index:Be,checked:lt,data:e.data})),t.emit(Dt.ROW_SELECT_CHANGE,{row:Ss(Fe),isAll:ze,index:Be,checked:lt,data:e.data})});const X=Fe=>{const ze=v.pos.bottom??0,Be=Fe[1],{translateX:lt,translateY:et,pos:pt={}}=Be;v.scrollTranslateY=et,v.scrollTranslateX=lt,v.pos=pt;const{bottom:Ue}=pt;Ue<=2&&ze>Ue&&rs(60,()=>{t.emit(Dt.SCROLL_BOTTOM,{...pt,translateX:lt,translateY:et})},!0)(),Q()},le=(Fe={left:0,top:0})=>{var ze,Be;(Be=(ze=h.value)==null?void 0:ze.scrollTo)==null||Be.call(ze,Fe)};a.onMounted(()=>{if(e.observerResize){let Fe=P3(d.value,()=>{if(!d.value)return;(e.height==="100%"||e.height==="auto")&&re(d.value),G(d.value);const ze=oe();kd(d.value,p,20,ze)},180,!0,e.resizerWay);Fe.start(),a.onBeforeUnmount(()=>{Fe.disconnect(),Fe=null})}}),a.onBeforeUnmount(()=>{P.destroy()});const Y=()=>d.value;t.expose({setRowExpand:M,clearSelection:J,toggleAllSelection:x,toggleRowSelection:O,getSelection:E,clearSort:j,scrollTo:le,getRoot:Y});const fe=a.computed(()=>({...ae,"__is-empty":!W.length})),ve=a.computed(()=>({[ie("table-body-content")]:!0,[ie("stripe")]:e.stripe,"with-virtual-render":e.virtualEnabled})),Ie={column_drag_line:!0,"offset-x":!0},je=a.computed(()=>({...C.value,left:`${b.value-v.scrollTranslateX}px`})),Re={"scroll-loading":!0,_bottom:!0},Ve=a.computed(()=>({[ie("fixed-bottom-border")]:!0,"_is-empty":!e.data.length})),de={zIndex:-1,width:0,height:0,display:"none"},be=a.computed(()=>({"--footer-height":q.value?`${e.paginationHeight}px`:"0"})),Te=a.computed(()=>({right:R.value?`${Tr}px`:0,...be.value})),{renderScrollLoading:Je}=xv(e,t),rt=a.computed(()=>e.virtualEnabled?{}:{scrollXName:"",scrollYName:""}),it=a.computed(()=>({"--prepend-left":`${v.scrollTranslateX}px`,position:"sticky",top:0,zIndex:2,...e.prependStyle||{}})),ut=()=>t.slots.prepend?a.createVNode("div",{style:it.value,class:"prepend-row"},[t.slots.prepend()]):null;return()=>{var Fe,ze;return a.createVNode("div",{class:ge.value,style:Z.value,ref:d},[a.createVNode("div",{class:ue,style:B.value},[P.renderTableHeadSchema()]),a.createVNode(Ir,a.mergeProps({ref:h,lineHeight:P.getRowHeight,class:fe.value,style:K,list:W},rt.value,{contentClassName:ve.value,onContentScroll:X,throttleDelay:0,scrollEvent:!0,rowKey:e.rowKey,enabled:e.virtualEnabled,keepAlive:!0}),{beforeContent:()=>ut(),default:Be=>P.renderTableBodySchema(Be.data||W),afterSection:()=>a.createVNode("div",{class:Ve.value},null)}),a.createVNode("div",{class:L,style:Te.value},[w.value.map(({isExist:Be,colPos:lt,column:et})=>Be?"":a.createVNode("div",{class:I(et,v.scrollTranslateX,m.value),style:k(lt)},null)),a.createVNode("div",{class:Ie,style:je.value},null),a.createVNode("div",{class:Re},[Je()])]),a.createVNode("div",{class:Ce.value,style:be.value},[q.value&&P.renderTableFooter(H.value)]),a.createVNode("div",{style:de},[(ze=(Fe=t.slots).default)==null?void 0:ze.call(Fe)])])}}}),{Column:pv}),kr=12;function g8(e){const t=a.reactive({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:(s=[])=>{t.curPage=1,t.totalSize=s.length,t.totalPage=Math.ceil(t.totalSize/t.pageSize)||1;const o=[];if(t.pageSize>0)for(let c=0;c<t.totalSize;c+=t.pageSize)o.push(s.slice(c,c+t.pageSize));t.renderListPaged.splice(0,t.renderListPaged.length,...o),t.curPageList.splice(0,t.curPageList.length,...t.renderListPaged[t.curPage-1]||[])},pageChange:s=>{t.curPage=s,t.curPageList.splice(t.curPageList.length,0,...t.renderListPaged[t.curPage-1]||[]),t.isPageLoading=!1}}}function m8(e){const{useGroup:t,saveKey:n,displayKey:i,list:s}=a.toRefs(e),o=a.ref([]),c=a.ref({});return a.watch([t,n,i,s],()=>{o.value=[];let u=a.markRaw(s.value);t.value&&(u=u.reduce((f,d)=>{let h=[];return d.children&&(h=d.children.map(m=>({group:{groupId:d[n.value],groupName:d[i.value]},...m}))),f.concat(h)},[])),o.value=u,c.value=u.reduce((f,d)=>(f[d[n.value]]=d,f),{})},{immediate:!0,deep:!0}),{flatList:o,saveKeyMap:c}}const U3=e=>{const t=e.length;let n=0;for(let i=0;i<t;i++)e.charCodeAt(i)&65280&&(n+=1),n+=1;return n},K3=(e,t,n)=>{a.watch([n,t],()=>{s()},{flush:"post"});const i=a.ref(null),s=()=>{t.value&&(i.value=null,setTimeout(()=>{const o=Array.from(e.value.querySelectorAll(".tag-item")),c=o.findIndex((u,f)=>f?o[f-1].offsetTop!==u.offsetTop:!1);i.value=c>0?c-1:null}))};return{overflowTagIndex:i}},X3=a.defineComponent({name:"ListTagRender",props:{node:y.object,searchKey:y.oneOfType([y.string,y.arrayOf(y.string)]),displayKey:y.string,searchKeyword:y.string,tpl:{type:Function}},render(){const{resolveClassName:e}=ye(),t=i=>{if(this.searchKeyword){const s=new RegExp(`(${this.searchKeyword})`,"i");return i.replace(s,'<strong class="highlight-text">$1</strong>')}return i};if(this.tpl)return this.tpl(this.node,t,a.h,this);const n=this.node[this.displayKey];return a.createVNode("div",{class:`${e("selector-node")}`},[a.createVNode("span",{class:"text",innerHTML:t(n)},[n])])}}),p8=()=>({modelValue:y.arrayOf(y.string).def([]),placeholder:y.string.def(""),list:y.arrayOf(y.object).def([]),disabled:y.bool.def(!1),tooltipKey:y.string.def(""),saveKey:y.string.def("id"),displayKey:y.string.def("name"),hasDeleteIcon:y.bool.def(!1),clearable:y.bool.def(!0),trigger:ke("treeTriggerType",{}).def("search"),searchKey:y.oneOfType([y.string,y.arrayOf(y.string)]).def("name"),useGroup:y.bool.def(!1),allowCreate:y.bool.def(!1),maxData:y.number.def(-1),maxResult:y.number.def(10),contentMaxHeight:y.number.def(300),contentWidth:y.number.def(190),separator:y.string.def(""),allowNextFocus:y.bool.def(!0),allowAutoMatch:y.bool.def(!1),showClearOnlyHover:y.bool.def(!1),isAsyncList:y.bool.def(!1),leftSpace:y.number.def(0),createTagValidator:{type:Function},filterCallback:{type:Function},tagTpl:{type:Function},tpl:{type:Function},pasteFn:{type:Function},withValidate:{type:Boolean,default:!0},popoverProps:{type:Object,default:()=>({})},collapseTags:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:()=>({})}}),y8=a.defineComponent({name:"TagRender",directives:{bkTooltips:ka},props:{node:y.object,displayKey:y.string,tpl:{type:Function},hasTips:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:()=>({})}},setup(e){const t=a.ref(),n=a.ref(!1),i=a.computed(()=>({boundary:"window",theme:"light",distance:12,content:e.node[e.displayKey],disabled:e.hasTips||!n.value,...e.tagOverflowTips}));return a.onMounted(()=>{n.value=X4(t.value)}),{overflowTips:i,tagRef:t}},render(){return this.tpl?this.tpl(this.node,a.h,this):a.withDirectives(a.createVNode("div",{class:"tag",ref:"tagRef"},[a.createVNode("span",{class:"text"},[this.node[this.displayKey]])]),[[a.resolveDirective("bk-tooltips"),this.overflowTips]])}}),C8=a.defineComponent({name:"TagInput",directives:{bkTooltips:ka},props:p8(),emits:["update:modelValue","change","select","focus","blur","remove","removeAll","input"],setup(e,{emit:t}){const n=Fn(),i=ft("tagInput"),s=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),o=a.reactive({isShow:!1,width:190,offset:{mainAxis:4,crossAxis:0},...e.popoverProps}),{resolveClassName:c}=ye(),{maxResult:u}=a.toRefs(e),{pageState:f,initPage:d,pageChange:h}=g8(u),m=a.ref(""),p=a.ref(null),C=a.ref(null),b=a.ref(null),v=a.ref(null),T=a.ref(null),w=a.ref(null),k=a.computed(()=>!e.disabled&&e.hasDeleteIcon),I=a.computed(()=>e.maxData===1),M=a.computed(()=>x.selectedTagList.length===0&&m.value===""&&!s.isEdit),S=a.computed(()=>e.placeholder||i.value.placeholder),L=a.computed(()=>e.clearable&&!e.disabled&&x.selectedTagList.length!==0&&(e.showClearOnlyHover?s.isHover:!0)),J=a.computed(()=>({[`${c("tag-input-trigger")}`]:!0,active:s.isEdit,disabled:e.disabled})),x=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),O=a.computed(()=>x.selectedTagList.map(de=>de[e.saveKey])),{flatList:E,saveKeyMap:j}=m8(e),A=a.computed(()=>{if(e.useGroup){const de={};return f.curPageList.forEach((be,Te)=>{be.__index__=Te,de[be.group.groupId]||(de[be.group.groupId]={id:be.group.groupId,name:be.group.groupName,children:[]}),de[be.group.groupId].children.push(be)}),Object.keys(de).map(be=>de[be])}return f.curPageList});a.watch([()=>E.value],()=>{a.nextTick(()=>{ge()})},{deep:!0}),a.watch(()=>e.modelValue,de=>{var be;Ce(O.value,de)||(a.nextTick(()=>{ge()}),e.withValidate&&((be=n==null?void 0:n.validate)==null||be.call(n,"change")))}),a.watch(m,ot.debounce(()=>{const de=f.curPageList.length!==0,{value:be}=m;be!==""&&de||be===""&&e.trigger==="focus"&&de?o.isShow=!0:(e.trigger!=="focus"||!de)&&(o.isShow=!1)},150)),a.watch(()=>o.isShow,de=>{W(),de&&T.value&&(a.nextTick(()=>{T.value.scrollTop=0}),T.value.removeEventListener("scroll",H),T.value.addEventListener("scroll",H))}),a.onMounted(()=>{ge()});const W=()=>{var de;o.offset.crossAxis=I.value?0:(de=v.value)==null?void 0:de.offsetLeft},H=()=>{if(f.isPageLoading||T.value.scrollTop===0)return;const{scrollTop:de,offsetHeight:be,scrollHeight:Te}=T.value;if(de+be>=Te){const Je=f.curPage+1;Je<=f.totalPage&&(f.isPageLoading=!0,setTimeout(()=>{h(Je)},500))}},F=()=>{var be;return Array.from(((be=b.value)==null?void 0:be.childNodes)||[]).filter(Te=>![Node.TEXT_NODE,Node.COMMENT_NODE].includes(Te.nodeType))},ne=de=>{if(!e.disabled){if(de!=null&&de.target){const{className:be}=de.target;(be.indexOf(`${c("tag-input-trigger")}`)>-1||be.indexOf("tag-list")>-1)&&b.value.appendChild(v.value)}clearTimeout(w.value),I.value&&O.value.length&&(x.tagListCache=[...O.value],x.selectedTagListCache=[...x.selectedTagList],m.value=x.selectedTagListCache[0][e.saveKey],je(x.selectedTagList[0],0),G()),s.isEdit=!0,setTimeout(()=>{var be;(be=p.value)==null||be.focus(),e.trigger==="focus"&&x.localList.length!==0&&(ue(),o.isShow?W():o.isShow=!0)},200)}},ge=()=>{const{saveKey:de,modelValue:be,displayKey:Te,allowCreate:Je,trigger:rt,isAsyncList:it}=e;if(x.selectedTagList=[],x.localList=E.value,be.length){const ut={};x.selectedTagList=be.map(Fe=>{const ze=j.value[Fe];return ut[Fe]=1,!ze&&Je?{[de]:Fe,[Te]:Fe}:ze}).filter(Fe=>Fe),I.value||(x.localList=x.localList.filter(Fe=>!ut[Fe[de]]))}if(it&&m.value){ue(m.value),f.curPageList.length&&(o.isShow=!0);return}rt==="focus"&&ue()},ue=(de="")=>{const{searchKey:be,filterCallback:Te}=e,Je=de.toLowerCase().trim();if(Je===""){d(x.localList);return}let rt=[];typeof Te=="function"?rt=Te(Je,be,x.localList)||[]:Array.isArray(be)?rt=x.localList.filter(it=>be.some(ut=>it[ut].toLowerCase().indexOf(Je)>-1)):rt=x.localList.filter(it=>it[be].toLowerCase().indexOf(Je)>-1),d(rt)},ae=(de,be)=>{const Te={[`${c("selector-actived")}`]:!0,[`${c("selector-selected")}`]:O.value.includes(de[e.saveKey])};return e.useGroup?Te[`${c("selector-actived")}`]=de.__index__===s.focusItemIndex:Te[`${c("selector-actived")}`]=be===s.focusItemIndex,Te};function Ce(de,be){return de.length!==be.length?!1:be.every((Te,Je)=>de[Je]===Te)}const Z=()=>{x.tagListCache=[],x.selectedTagListCache=[],x.selectedTagList=[]},K=()=>{m.value=""},B=()=>{if(I.value)return 0;const be=F().findIndex(({id:Te})=>Te==="tagInputItem");return be>=0?be:0},R=(de,be,Te=!1)=>{if(!be||!de)return;let Je=be;Te&&(Je=be.nextElementSibling||null),be.parentNode.insertBefore(de,Je)},G=de=>{const{maxData:be,trigger:Te,allowCreate:Je}=e;if(be===-1||be>O.value.length){const{value:rt}=de!=null&&de.target?de.target:m,it=U3(rt);it?(ue(rt),p.value.style.width=`${it*kr}px`):Te==="focus"&&ue()}else oe(),m.value="",o.isShow=!1;s.isEdit=!0,s.focusItemIndex=Je?-1:0,t("input",m.value)},re=()=>{var de;o.width=I.value?(de=C.value)==null?void 0:de.clientWidth:e.contentWidth,t("focus")},oe=()=>{w.value=setTimeout(()=>{var be;const de=m.value;if(K(),s.isEdit=!1,I.value){const[Te]=x.tagListCache;de&&de===Te&&x.selectedTagListCache.length?Ie(x.selectedTagListCache[0],"select"):_("remove")}else if(e.allowAutoMatch&&de){const Te=f.curPageList.find(Je=>Array.isArray(e.searchKey)?e.searchKey.map(it=>Je[it]).includes(de):Je[e.searchKey]===de);Te?q(Te,"select"):e.allowCreate&&q(de,"custom")}o.isShow=!1,t("blur",de,O.value),(be=n==null?void 0:n.validate)==null||be.call(n,"blur")},200)},q=(de,be,Te)=>{Te==null||Te.stopPropagation(),!(!de||de.disabled)&&(I.value&&Z(),Ie(de,be),_("select"),K(),o.isShow=!1)},ie=(de,be,Te)=>{Te==null||Te.stopPropagation(),je(de,be),K(),_("remove",de),p.value.style.width=`${kr}px`},_=(de,be)=>{t(de,be),t("update:modelValue",O.value),t("change",O.value)},P=de=>{de.stopPropagation();const be=x.selectedTagList;x.selectedTagList=[];const Te=be.filter(Je=>j.value[Je[e.saveKey]]);(e.allowCreate&&Te.length!==0||!e.allowCreate)&&!I.value&&x.localList.push(...Te),_("removeAll")},Q=()=>{const de={height:T.value.clientHeight,yAxis:T.value.getBoundingClientRect().y};a.nextTick(()=>{const be=T.value.querySelector(`.${c("selector-actived")}`);if(!be)return;const Te={height:be.clientHeight,yAxis:be.getBoundingClientRect().y};Te.yAxis<de.yAxis&&(T.value.scrollTop=T.value.scrollTop-(de.yAxis-Te.yAxis));const Je=Te.yAxis+Te.height-de.yAxis;Je>de.height&&(T.value.scrollTop=T.value.scrollTop+Je-de.height)})},X=(de,be)=>{const Te=F();R(v.value,Te[de-1]),x.selectedTagList.splice(de-1,1),ne();const Je=j.value[be[e.saveKey]];(e.allowCreate&&Je||!e.allowCreate)&&!I.value&&x.localList.push(be),p.value=`${kr}px`,_("remove")},le=de=>{if(f.isPageLoading)return;let be;const Te=de.target.value,Je=U3(Te),rt=B(),it=F();switch(de.code){case"ArrowUp":if(de.preventDefault(),!o.isShow)return;s.focusItemIndex=s.focusItemIndex-1,s.focusItemIndex=s.focusItemIndex<0?-1:s.focusItemIndex,s.focusItemIndex===-1&&(s.focusItemIndex=f.curPageList.length-1),Q();break;case"ArrowDown":if(de.preventDefault(),!o.isShow)return;s.focusItemIndex=s.focusItemIndex+1,s.focusItemIndex=s.focusItemIndex>f.curPageList.length-1?f.curPageList.length:s.focusItemIndex,s.focusItemIndex===f.curPageList.length&&(s.focusItemIndex=0),Q();break;case"ArrowLeft":if(s.isEdit=!0,!Je){if(rt<1)return;R(v.value,it[rt-1]),ne()}break;case"ArrowRight":if(s.isEdit=!0,!Je){if(rt===it.length-1)return;R(it[rt+1],v.value),ne()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&o.isShow||e.allowCreate&&s.focusItemIndex>=0&&o.isShow?q(f.curPageList[s.focusItemIndex],"select",de):e.allowCreate&&m.value.trim()&&q(m.value,"custom",de),de.preventDefault();break;case"Backspace":rt!==0&&!m.value&&(be=x.selectedTagList[rt-1],X(rt,be));break}},Y=de=>{const be=[],Te=de.split(";"),Je=/^[a-zA-Z][a-zA-Z_]*/g;return Te.forEach(rt=>{const it=rt.match(Je);if(it){const ut=it.join("");be.push({[e.saveKey]:ut,[e.displayKey]:ut})}}),be},fe=de=>{if(de.preventDefault(),I.value)return!1;const{maxData:be,saveKey:Te,displayKey:Je,pasteFn:rt,allowCreate:it}=e,ut=de.clipboardData.getData("text");let ze=(rt?rt(ut):Y(ut)).map(Be=>Be[Te]);if(ze.length){const Be=F(),lt=B(),et=x.localList.map(Ue=>Ue[Te]);if(ze=ze.filter(Ue=>{const Qt=(Ue==null?void 0:Ue.trim())&&!O.value.includes(Ue);return it?Qt:Qt&&et.includes(Ue)}),be!==-1){const Ue=x.selectedTagList.length;if(Ue<be){const Qt=be-Ue;ze.length>Qt&&(ze=[...ze.slice(0,Qt)])}else ze=[]}const pt=it?ze.map(Ue=>x.localList.find(oa=>oa[Te]===Ue)??{[Te]:Ue,[Je]:Ue}):x.localList.filter(Ue=>ze.includes(Ue[Te]));ze.length&&(x.selectedTagList.splice(lt,0,...pt),R(v.value,Be[lt]),p.value.style.width=`${kr}px`,x.localList=x.localList.filter(Ue=>!ze.includes(Ue[Te])),_("select"),ne())}},ve=de=>{e.disabled||(R(v.value,de.currentTarget,!0),p.value.style.width=`${kr}px`,o.isShow&&W())},Ie=(de,be)=>{if(x.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:Te,saveKey:Je,displayKey:rt,createTagValidator:it}=e,ut=B();let Fe=1,ze=!1,Be;const lt=et=>typeof it=="function"?it(et):!0;if(be==="custom")if(Te){let et=de.split(Te);et=et.filter(Ue=>(Ue==null?void 0:Ue.trim())&&!O.value.includes(Ue)&&lt(Ue));const pt=et.map(Ue=>j.value[Ue]||{[Je]:Ue,[rt]:Ue});et.length&&(x.selectedTagList.splice(ut,0,...pt),Fe=pt.length,ze=!0)}else{const et=typeof de=="object";if(Be=et?de[Je]:de.trim(),Be=Be.replace(/\s+/g,""),Be!==void 0&&!O.value.includes(Be)&&lt(Be)){const pt=j.value[Be]||(et?de:{[Je]:Be,[rt]:Be});x.selectedTagList.splice(ut,0,pt),ze=!0}}else de&&(Be=de[Je],Be!==void 0&&!O.value.includes(Be)&&(x.selectedTagList.splice(ut,0,de),ze=!0));ze&&a.nextTick(()=>{for(let et=1;et<=Fe;et++){const Ue=F()[ut+et];R(Ue,v.value)}if(p.value.style.width=`${kr}px`,!I.value){e.allowNextFocus&&ne();const et=O.value.reduce((pt,Ue)=>(pt[Ue]=1,pt),{});x.localList=x.localList.filter(pt=>!et[pt[Je]])}})},je=(de,be)=>{x.selectedTagList.splice(be,1);const Te=j.value[de[e.saveKey]];(e.allowCreate&&Te||!e.allowCreate)&&!I.value&&x.localList.push(de)},Re=a.computed(()=>e.collapseTags?e.collapseTags&&!s.isEdit:e.collapseTags),{overflowTagIndex:Ve}=K3(C,Re,O);return{popoverProps:o,...a.toRefs(s),...a.toRefs(x),...a.toRefs(f),isShowPlaceholder:M,isShowClear:L,placeholderText:S,curInputValue:m,renderList:A,showTagClose:k,tagInputRef:p,bkTagSelectorRef:C,tagListRef:b,tagInputItemRef:v,selectorListRef:T,triggerClass:J,overflowTagIndex:Ve,localCollapseTags:Re,focusInputTrigger:ne,activeClass:ae,handleInput:G,handleFocus:re,handleBlur:oe,handleTagSelected:q,handleTagRemove:ie,handleClear:P,tagFocus:ve,handleKeydown:le,handlePaste:fe,resolveClassName:c}},render(){return a.createVNode("div",{class:`${this.resolveClassName("tag-input")}`,ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode($t,a.mergeProps({theme:`light ${this.resolveClassName("tag-input-popover-content")}`,trigger:"manual",placement:"bottom-start",arrow:!1},this.popoverProps),{default:()=>{var e,t;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`}},[this.selectedTagList.map((n,i)=>{const s={boundary:"window",theme:"light",distance:12,content:n[this.tooltipKey],disabled:!this.tooltipKey},o=this.localCollapseTags&&this.overflowTagIndex&&i>=this.overflowTagIndex;return a.withDirectives(a.createVNode("li",{class:"tag-item",style:{display:o?"none":""},onClick:this.tagFocus},[a.createVNode(y8,{node:n,tpl:this.tagTpl,displayKey:this.displayKey,hasTips:!!this.tooltipKey,tagOverflowTips:this.tagOverflowTips},null),this.showTagClose?a.createVNode(rn,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,n,i)},null):null]),[[a.resolveDirective("bk-tooltips"),s]])}),a.withDirectives(a.createVNode("li",{ref:"tagInputItemRef",id:"tagInputItem",class:"tag-input-item",role:"input"},[a.withDirectives(a.createVNode("input",{type:"text",class:"tag-input",ref:"tagInputRef","onUpdate:modelValue":n=>this.curInputValue=n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onPaste:this.handlePaste},null),[[a.vModelText,this.curInputValue]])]),[[a.vShow,this.isEdit]]),!!this.overflowTagIndex&&this.localCollapseTags&&a.createVNode("li",{class:"tag-item"},[a.createVNode("div",{class:"tag"},[a.createVNode("span",{class:"text"},[a.createTextVNode("+"),this.selectedTagList.length-this.overflowTagIndex])])])]),a.withDirectives(a.createVNode("p",{class:"placeholder"},[this.placeholderText]),[[a.vShow,this.isShowPlaceholder]]),((t=(e=this.$slots)==null?void 0:e.suffix)==null?void 0:t.call(e))??(this.isShowClear&&a.createVNode(an,{class:"clear-icon",onClick:this.handleClear},null))])},content:()=>a.createVNode("div",{class:`${this.resolveClassName("selector-list")}`},[a.createVNode("ul",{ref:"selectorListRef",style:{"max-height":`${this.contentMaxHeight}px`},class:"outside-ul"},[this.renderList.map((e,t)=>this.useGroup?a.createVNode("li",{class:`${this.resolveClassName("selector-group-item")}`},[a.createVNode("span",{class:"group-name"},[e.name,a.createTextVNode(" ("),e.children.length,a.createTextVNode(")")]),a.createVNode("ul",{class:`${this.resolveClassName("selector-group-list-item")}`},[e.children.map((n,i)=>a.createVNode("li",{class:[`${this.resolveClassName("selector-list-item")}`,{disabled:n.disabled},this.activeClass(n,i)],onClick:this.handleTagSelected.bind(this,n,"select")},[a.createVNode(X3,{node:n,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]))])]):a.createVNode("li",{class:[`${this.resolveClassName("selector-list-item")}`,{disabled:e.disabled},this.activeClass(e,t)],onClick:this.handleTagSelected.bind(this,e,"select")},[a.createVNode(X3,{node:e,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)])),this.isPageLoading?a.createVNode("li",{class:`${this.resolveClassName("selector-list-item")} loading`},[a.createVNode(Gi,{theme:"primary",size:La.Small},null)]):null])])})])}}),q3=Ye(C8),b8={direction:P0(),align:fu().def(Co.CENTER),color:y.string.def("#dde4eb"),width:y.number.def(1),type:z0()},e6=Ye(a.defineComponent({name:"Divider",props:b8,render(){const e=()=>this.direction==="vertical"?{borderRight:`${this.width}px ${this.type} ${this.color}`}:{borderBottom:`${this.width}px ${this.type} ${this.color}`},{resolveClassName:t}=ye();let n;return this.$slots.default&&(n=a.createVNode("div",{class:[t("divider-info"),t(`divider-info-${this.align}`)]},[this.$slots.default()])),a.createVNode("div",{class:[t("divider"),t(`divider-${this.direction}`)],style:e()},[n])}}));var Sl=(e=>(e.CARD="card",e.BORDER_CARD="border-card",e.UNBORDER_CARD="unborder-card",e.CARD_TAB="card-tab",e.CARD_GRID="card-grid",e))(Sl||{}),ks=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e))(ks||{});const t6=ke("position",{}).def("top");var n6=(e=>(e.REPLACE="replace",e.INSERT="insert",e))(n6||{});const i6=ke("sortType",{}).def("replace"),v8={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},w8={name:y.oneOfType([y.number,y.string]).def(""),label:y.string||y.func,tips:y.string,closable:y.bool,visible:y.bool.def(!0),disabled:y.bool,sortable:y.bool,renderDirective:du(),panel:y.string||y.func},N8={active:y.oneOfType([y.number,y.string]).def(""),type:ke("type",{}).def("border-card"),tabPosition:t6,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:i6,labelHeight:y.number.def(50),scrollStep:y.number.def(200),extCls:y.string.def(""),validateActive:y.bool.def(!0),showHeader:y.bool.def(!0),changeOnHover:y.bool.def(!1),changeOnHoverDelay:y.number.def(1e3),activeBarSize:y.number.def(2),activeBarColor:y.string.def("#3a84ff")},M8={active:y.oneOfType([y.number,y.string]).def(""),type:ke("type",{}).def("border-card"),activeBarColor:y.string.def("#3a84ff"),activeBarSize:y.number.def(2),panels:{type:Array,default:()=>[]},tabPosition:t6,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:i6,labelHeight:y.number.def(50),scrollStep:y.number.def(200),validateActive:y.bool.def(!0),changeOnHover:y.bool.def(!1),changeOnHoverDelay:y.number.def(1e3),...v8},a6=a.defineComponent({name:"TabNav",directives:{bkTooltips:ka},props:M8,setup(e){const t=a.ref(null),n=a.computed(()=>{const h={width:0,height:0,bottom:0,left:0};if(!t.value)return h;if([ks.LEFT,ks.RIGHT].includes(e.tabPosition)){const{clientHeight:m,offsetTop:p}=t.value,C={width:`${e.activeBarSize}px`,height:`${m}px`,top:`${p}px`,background:e.activeBarColor};return e.tabPosition===ks.LEFT?C.right=0:C.left=0,C}if(e.type===Sl.UNBORDER_CARD){const{clientWidth:m,offsetLeft:p}=t.value;return{width:`${m}px`,height:`${e.activeBarSize}px`,left:`${p}px`,bottom:0,background:e.activeBarColor}}return h}),i=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const h=[];let m=!1;return e.panels.filter((p,C)=>{if(!p.props)return null;const{name:b,label:v,closable:T,visible:w,disabled:k,sortable:I,tips:M}=p.props;if(!w)return!1;e.active===b&&(m=!0);const S=L=>p.slots.label?a.h(p.slots.label):[void 0,""].includes(L)?`选项卡${C+1}`:typeof L=="string"?L:typeof L=="function"?a.h(L):L;return h.push({name:b,closable:T,visible:w,disabled:k,sortable:I,tips:M,tabLabel:S(v)}),!0}),!m&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),h}),s=a.ref(-1),o=a.ref(-1),c=a.ref(""),u=(h,m)=>h===m,f={handleTabAdd(h){e.tabAdd(h)},dragstart(h,m){o.value=h,c.value=e.guid,Object.assign(m.dataTransfer,{effectAllowed:"move"}),e.tabDrag(h,m)},dragenter(h){u(c.value,e.guid)&&(s.value=h)},dragend(){s.value=-1,o.value=-1,c.value=null},drop(h,m){if(!u(c.value,e.guid))return!1;e.tabSort(o.value,h,m)},handleTabChange(h){e.tabChange(h)},handleTabRemove(h,m){e.tabRemove(h,m)}},{resolveClassName:d}=ye();return{...f,activeRef:t,activeBarStyle:n,navs:i,dragenterIndex:s,dragStartIndex:o,draggingEle:c,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4),resolveClassName:d}},render(){const{active:e,closable:t,addable:n,sortable:i,sortType:s,labelHeight:o,dragstart:c,dragenter:u,dragend:f,drop:d}=this,h=()=>this.navs.map((v,T)=>{if(!v)return null;const{name:w,disabled:k,tabLabel:I}=v,M=()=>{const L=[this.resolveClassName("tab-header-item")];return k&&L.push(this.resolveClassName("tab-header--disabled")),e===w&&L.push(this.resolveClassName("tab-header--active")),L.join(" ")},S=(L,J)=>!k&&(L||J);return a.withDirectives(a.createVNode("div",{key:w,onClick:()=>!k&&this.handleTabChange(w),draggable:S(v.sortable,i),onDragstart:L=>c(T,L),ref:e===w?"activeRef":"",onDragenter:L=>{L.preventDefault(),u(T)},onDragleave:L=>{L.preventDefault()},onDragover:L=>{L.preventDefault()},onDragend:L=>{L.preventDefault(),f()},onDrop:L=>{L.preventDefault(),d(T,s)},class:M()},[a.createVNode("div",null,[I]),S(v.closable,t)?a.createVNode("span",{class:this.resolveClassName("tab-header--close"),onClick:()=>this.handleTabRemove(T,v)},[a.createVNode(an,null,null)]):""]),[[a.resolveDirective("bk-tooltips"),{content:v.tips,disabled:!v.tips}]])}),m=()=>{var T,w;const v=[];return typeof this.$slots.add=="function"?v.push((w=(T=this.$slots).add)==null?void 0:w.call(T,a.h)):n&&v.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(ms,{style:"display:flex;",width:26,height:26},null)])),v.length?a.createVNode("div",{class:this.resolveClassName("tab-header-operation")},[v.map((k,I)=>a.createVNode("div",{class:this.resolveClassName("tab-header-item"),key:I},[k]))]):null},p=()=>this.type===Sl.UNBORDER_CARD?a.createVNode("div",{style:this.activeBarStyle,class:this.resolveClassName("tab-header-active-bar")},null):"",C=typeof this.$slots.setting=="function"?a.createVNode("div",{class:this.resolveClassName("tab-header-setting")},[this.$slots.setting()]):null,b=m();return a.createVNode("div",{style:{lineHeight:`${o}px`},class:this.resolveClassName("tab-header")},[a.createVNode("div",{class:[this.resolveClassName("tab-header-nav"),b||C?"tab-header-auto":""]},[p(),h()]),b,C])}}),r6=Ft(a.defineComponent({name:"Tab",components:{TabNav:a6},props:N8,emits:["add-panel","tab-change","remove-panel","sort-change","on-drag-tab","add","change","remove","update:active","sort","drag"],setup(e,{slots:t,emit:n}){const i=a.ref(!1),s=a.ref([]),o=a.getCurrentInstance(),c=(h,m=[])=>{const{children:p}=h;return(p||[]).forEach(C=>{let{type:b}=C;b=b.name||b,b==="TabPanel"&&C.component?m.push(C.component):(b===a.Fragment||b==="template")&&c(C,m)}),m},u=()=>{if(t.default){const{children:h}=o.subTree.children[1];if(!h)return;const m=h[0],p=c(m);p.length!==s.value.length&&(s.value=p)}};a.onMounted(()=>{u(),i.value=!0,a.onUpdated(()=>{u()})});const f={tabAdd(h){n("add",{e:h}),n("add-panel",{e:h})},tabChange(h){n("change",h),n("tab-change",h),n("update:active",h)},tabRemove(h,m){n("remove",h,m),n("remove-panel",h,m)},tabSort(h,m,p){const C=s.value;if(p===n6.INSERT)if(h<m)C.splice(m+1,0,s[h]),C.splice(h,1);else if(h>m)C.splice(m,0,s[h]),C.splice(h+1,1);else return!1;else{const b=C[m];C[m]=C[h],C[h]=b}s.value=[...C],n("sort",h,m,p),n("sort-change",h,m,p)},tabDrag(h,m){n("drag",h,m),n("on-drag-tab",h,m)}},{resolveClassName:d}=ye();return{...f,isMounted:i,panels:s,resolveClassName:d}},render(){var n,i;const e=()=>{const s=[this.resolveClassName("tab"),this.extCls];return this.tabPosition===ks.TOP?s.push(this.resolveClassName(`tab--${this.tabPosition}`),this.resolveClassName(`tab--${this.type}`)):(s.push(this.resolveClassName(`tab--${this.tabPosition}`)),this.type===Sl.CARD_TAB&&s.push(this.resolveClassName("tab--vertical-tab"))),s},t=()=>{const{panels:s,active:o,type:c,closable:u,addable:f,sortable:d,sortType:h,labelHeight:m,scrollStep:p,validateActive:C,changeOnHover:b,changeOnHoverDelay:v,tabPosition:T,activeBarSize:w,activeBarColor:k,tabAdd:I,tabChange:M,tabRemove:S,tabSort:L,tabDrag:J}=this,x={panels:s,active:o,type:c,closable:u,addable:f,sortable:d,sortType:h,labelHeight:m,scrollStep:p,validateActive:C,changeOnHover:b,changeOnHoverDelay:v,tabPosition:T,activeBarSize:w,activeBarColor:k,tabAdd:I,tabChange:M,tabRemove:S,tabSort:L,tabDrag:J};return!s||!Array.isArray(s)?null:a.createVNode(a6,x,this.$slots)};return a.createVNode("div",{class:e()},[t(),a.createVNode("div",{class:this.resolveClassName("tab-content")},[(i=(n=this.$slots).default)==null?void 0:i.call(n)])])}}),{TabPanel:a.defineComponent({name:"TabPanel",props:w8,render(){const e=this.name===this.$parent.active,t=()=>!this.visible||this.renderDirective==="if"&&!e?null:typeof this.panel=="function"?this.panel(a.h):typeof this.$slots.default=="function"?this.$slots.default(null):typeof this.$slots.panel=="function"?this.$slots.panel(null):null,{resolveClassName:n}=ye();return a.withDirectives(a.createVNode("div",{ref:"content",class:n("tab-panel")},[t()]),[[a.vShow,e]])}})}),ki={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let s6=1;const o6=(e,t)=>{let n=t;const i=n.position||"top-right";typeof t=="string"&&(n={message:t});const s=t.onClose,o=n.offsetX||10;let c=n.offsetY||30;const{spacing:u=10}=n;ki[i].forEach(p=>{c+=(p.el.offsetHeight||0)+u}),s6+=1;const f=`message_${s6}`;n={...n,offsetX:o,offsetY:c,id:f};const d=document.createElement("div"),h=a.createVNode(e,n);h.props.onDestroy=p=>{I8(p,i,u,s),a.render(null,d)},h.props.onDetail=(p,C)=>{ki[i].forEach(b=>{var v,T;b.props.id!==C&&((T=(v=b.component)==null?void 0:v.exposed)==null||T.setDetailsShow(null,!1))})},a.render(h,d),ki[i].push(h);let m;h.props.getContainer&&Ca(h.props.getContainer)?m=h.props.getContainer:m=document.body,m.appendChild(d.firstElementChild)};function I8(e,t,n,i){i==null||i();const s=t.startsWith("top")?"top":"bottom";let o=-1;ki[t].forEach((d,h)=>{d.props.id===e&&(o=h)});const u=ki[t][o].el.offsetHeight,f=ki[t].length;for(let d=o;d<f;d++){const h=parseInt(ki[t][d].el.style[s],10)-u-n;ki[t][d].component.props.offsetY=h}ki[t].splice(o,1)}var l6={exports:{}};/*!
67
67
  * clipboard.js v2.0.11
68
68
  * https://clipboardjs.com/
69
69
  *