bkui-vue 2.0.1-beta.50 → 2.0.1-beta.51
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.cjs.js +2 -2
- package/dist/index.esm.js +6 -6
- package/dist/index.umd.js +2 -2
- package/lib/index.js +1 -1
- package/lib/input/index.js +3 -3
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
@@ -40,7 +40,7 @@ ${pl(n)}`),r}})}function Gv(e){const t=Object.keys(e),n=t.filter(s=>{var o;retur
|
|
40
40
|
z-index:-1000 !important;
|
41
41
|
top:0 !important;
|
42
42
|
right:0 !important;
|
43
|
-
`,$E=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function VE(e){const t=window.getComputedStyle(e),n=t.getPropertyValue("box-sizing"),r=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),s=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:$E.map(c=>`${c}:${t.getPropertyValue(c)}`).join(";"),paddingSize:r,borderSize:s,boxSizing:n}}function N6(e,t=1,n){var f;sr||(sr=document.createElement("textarea"),document.body.appendChild(sr));const{paddingSize:r,borderSize:s,boxSizing:o,contextStyle:c}=VE(e);sr.setAttribute("style",`${c};${AE}`),sr.value=e.value||e.placeholder||"";let d=sr.scrollHeight;const u={};o==="border-box"?d=d+s:o==="content-box"&&(d=d-r),sr.value="";const h=sr.scrollHeight-r;if(Number.isInteger(t)){let m=h*t;o==="border-box"&&(m=m+r+s),d=Math.max(m,d),u.minHeight=`${m}px`}if(Number.isInteger(n)){let m=h*n;o==="border-box"&&(m=m+r+s),d=Math.min(m,d)}return u.height=`${d}px`,(f=sr.parentNode)==null||f.removeChild(sr),sr=void 0,u}const DE={type:v.string.def("text"),clearable:v.bool,disabled:v.bool,readonly:v.bool,placeholder:v.string.def(""),prefixIcon:v.string,suffixIcon:v.string,suffix:v.string,prefix:v.string,step:v.integer,max:v.integer,min:v.integer,maxlength:v.integer,maxcharacter:v.integer,behavior:Uu(),showWordLimit:v.bool,showControl:v.bool.def(!0),showClearOnlyHover:v.bool.def(!0),precision:v.number.def(0).validate(e=>e>=0&&e<20),modelValue:v.oneOfType([v.string,v.number]),size:v.size(),rows:v.number,selectReadonly:v.bool.def(!1),withValidate:v.bool.def(!0),overMaxLengthLimit:v.bool.def(!1),showOverflowTooltips:v.bool.def(!0),resize:v.bool.def(!0),autosize:v.oneOfType([Boolean,Object]).def(!1),stopPropagation:v.bool.def(!0)};let Ze=function(e){return e.BLUR="blur",e.CHANGE="change",e.CLEAR="clear",e.COMPOSITIONEND="compositionend",e.COMPOSITIONSTART="compositionstart",e.COMPOSITIONUPDATE="compositionupdate",e.ENTER="enter",e.FOCUS="focus",e.INPUT="input",e.KEYDOWN="keydown",e.KEYPRESS="keypress",e.KEYUP="keyup",e.PASTE="paste",e.UPDATE="update:modelValue",e}({});function Xa(e,t){return!0}function kE(e,t){return!0}function n0(e){return e}const IE={[Ze.UPDATE]:Xa,[Ze.FOCUS]:e=>e,[Ze.BLUR]:e=>e,[Ze.CHANGE]:Xa,[Ze.CLEAR]:()=>!0,[Ze.INPUT]:Xa,[Ze.KEYPRESS]:Xa,[Ze.KEYDOWN]:Xa,[Ze.KEYUP]:Xa,[Ze.ENTER]:Xa,[Ze.PASTE]:kE,[Ze.COMPOSITIONSTART]:n0,[Ze.COMPOSITIONUPDATE]:n0,[Ze.COMPOSITIONEND]:n0},va=Je(a.defineComponent({name:"Input",directives:{bkTooltips:pa},inheritAttrs:!1,props:DE,emits:IE,setup(e,t){const{resolveClassName:n}=xe(),r=Qn(),s=dt("input"),o=a.ref(!1),c=a.ref(!1),d=a.computed(()=>e.type==="textarea"),u=a.computed(()=>d.value?n("textarea"):n("input")),{class:h,style:f,...m}=t.attrs,p=a.ref(),y=a.ref(typeof e.modelValue>"u"||e.modelValue===null?{}:{value:e.modelValue}),b=a.computed(()=>Ue({[`${u.value}--${e.size}`]:!!e.size,resizable:e.resize,"is-focused":o.value,"is-readonly":e.readonly&&!e.selectReadonly,"is-disabled":e.disabled,"is-simplicity":e.behavior==="simplicity",[`${t.attrs.class}`]:!!t.attrs.class},u.value)),N=a.ref(!1),w=a.ref({}),C=()=>{var G,ee;if(d.value)if(e.autosize){const W=(G=e.autosize)==null?void 0:G.minRows,te=(ee=e.autosize)==null?void 0:ee.maxRows,be=N6(p.value,W,te);w.value={overflowY:"hidden",...be},a.nextTick(()=>{w.value=be})}else w.value={minHeight:N6(p.value).minHeight}},_=(G=>{let ee=!1;return()=>{var te;if(ee||!e.autosize)return;((te=p.value)==null?void 0:te.offsetParent)===null||(G(),ee=!0)}})(C),x=z("suffix-icon"),O={search:()=>a.createVNode(Wa,null,null),password:()=>a.createVNode(dc,{class:x,onClick:he},null)},T=a.computed(()=>{const G=O[e.type];return R.value?a.createVNode(Yl,{class:x,onClick:he},null):G?a.createVNode(G,{class:x},null):null}),$=a.computed(()=>e.type==="number"),D=a.computed(()=>Math.floor(e.maxlength??e.maxcharacter??0)),R=a.ref(!1),P=a.computed(()=>Ue({"show-clear-only-hover":e.showClearOnlyHover,[`${u.value}--clear-icon`]:!0},x)),I=a.computed(()=>Ue({[z("max-length")]:!0,"is-over-limit":D.value-k.value<0})),A=G=>typeof e.maxcharacter=="number"?G.split("").reduce((ee,W,te)=>(ee.len+=W.charCodeAt(0)>255?2:1,ee.len>e.maxcharacter&&ee.pos===-1&&(ee.pos=te),ee),{len:0,pos:-1}):{len:G.length,pos:-1},k=a.computed(()=>{const G=e.modelValue??"";return A(G).len}),L=a.computed(()=>Ue({"is-disabled":e.disabled||e.modelValue>=e.max})),F=a.computed(()=>Ue({"is-disabled":e.disabled||e.modelValue<=e.min})),Z=a.computed(()=>{var G;return ae.value&&D.value-k.value===0?{content:s.value.maxlengthLimitTips}:e.showOverflowTooltips&&N.value&&e.modelValue?{content:(G=e.modelValue)==null?void 0:G.toString(),sameWidth:!0}:{disabled:!0}}),ae=a.computed(()=>typeof e.maxlength=="number"||typeof e.maxcharacter=="number"),K=new ResizeObserver(()=>{_(),ie()});a.watch(()=>e.type,async()=>{await a.nextTick(),C()}),a.watch(()=>e.modelValue,G=>{var ee;e.withValidate&&((ee=r==null?void 0:r.validate)==null||ee.call(r,"change")),y.value={value:G},a.nextTick(()=>C()),ie()}),a.onMounted(()=>{var G,ee;ie(),K.observe(p.value),a.nextTick(()=>C()),Object.prototype.hasOwnProperty.call(t.attrs,"autofocus")&&((ee=(G=p.value)==null?void 0:G.focus)==null||ee.call(G))}),a.onBeforeUnmount(()=>{K.disconnect()}),t.expose({focus(){p.value.focus()},blur(){p.value.blur(),o.value=!1},clear:X});function fe(){var G,ee;return((G=p.value)==null?void 0:G.scrollWidth)>((ee=p.value)==null?void 0:ee.clientWidth)+2}function ie(){setTimeout(()=>{N.value=fe()})}function X(){if(e.disabled)return;const G=$.value?e.min:"";t.emit(Ze.UPDATE,G,null),t.emit(Ze.CHANGE,G,null),t.emit(Ze.CLEAR)}function U(G){o.value=!0,t.emit(Ze.FOCUS,G)}function B(G){var ee;o.value=!1,t.emit(Ze.BLUR,G),e.withValidate&&((ee=r==null?void 0:r.validate)==null||ee.call(r,"blur"))}function Y(G){return ee=>{if(e.stopPropagation&&ee.stopPropagation(),ae.value&&!e.overMaxLengthLimit){const W=A(ee.target.value);if(W.len>=D.value&&(G===Ze.KEYDOWN||G===Ze.INPUT)&&!c.value){const te=W.pos>0?ee.target.value.slice(0,W.pos):ee.target.value;y.value={value:te},t.emit(Ze.UPDATE,te,ee),t.emit(Ze.INPUT,te,ee);return}}if(G===Ze.KEYDOWN&&(ee.code==="Enter"||ee.key==="Enter"||ee.keyCode===13)&&t.emit(Ze.ENTER,$.value?ce(ee.target.value,0):ee.target.value,ee),!(c.value&&[Ze.INPUT,Ze.CHANGE,Ze.KEYDOWN].some(W=>G===W))){if(G===Ze.INPUT)t.emit(Ze.UPDATE,ee.target.value,ee);else if(G===Ze.CHANGE&&$.value&&ee.target.value!==""){const W=ce(ee.target.value,0);t.emit(Ze.UPDATE,W,ee),t.emit(G,W,ee);return}t.emit(G,ee.target.value,ee)}}}const[Q,ue,se,we,ne,ye]=[Ze.KEYUP,Ze.KEYDOWN,Ze.KEYPRESS,Ze.PASTE,Ze.CHANGE,Ze.INPUT].map(Y);function le(){c.value=!0}function ge(G){c.value=!1,ye(G)}function j(G){return typeof G=="number"}function ce(G,ee,W=!0){const te=Number(ee)||1,be=Number.isInteger(e.precision)?e.precision:0,$e=Number(G),Ve=j(te)?te:1;if(Number.isNaN($e))return j(e.min)?e.min:0;let Re=$e+(W?Ve:-1*Ve);return j(e.max)&&(Re=Math.min(Re,e.max)),j(e.min)&&(Re=Math.max(Re,e.min)),+Re.toFixed(be)}function Ce(G){if(e.disabled)return;const ee=ce(e.modelValue,e.step);t.emit(Ze.UPDATE,ee,G),t.emit(Ze.CHANGE,ee,G)}function oe(G){if(e.disabled)return;const ee=ce(e.modelValue,e.step,!1);t.emit(Ze.UPDATE,ee,G),t.emit(Ze.CHANGE,ee,G)}function z(G){return`${u.value}--${G}`}function he(){R.value=!R.value}const pe=a.computed(()=>({maxlength:!e.overMaxLengthLimit&&e.maxlength,placeholder:e.placeholder||s.value.placeholder,readonly:e.readonly,disabled:e.disabled})),q={onInput:ye,onFocus:U,onBlur:B,onPaste:we,onChange:ne,onKeypress:se,onKeydown:ue,onKeyup:Q,onCompositionstart:le,onCompositionend:ge};return()=>{var G,ee,W,te;return a.withDirectives(a.createVNode("div",{style:f,class:b.value},[((ee=(G=t.slots)==null?void 0:G.prefix)==null?void 0:ee.call(G))??(e.prefix&&a.createVNode("div",{class:z("prefix-area")},[a.createVNode("span",{class:z("prefix-area--text")},[e.prefix])])),d.value?a.createVNode("textarea",a.mergeProps({ref:p,spellcheck:!1},m,q,pe.value,{style:w.value,rows:e.rows},y.value),null):a.createVNode("input",a.mergeProps({spellcheck:!1},m,{ref:p,class:`${u.value}--text`,max:e.max,min:e.min,step:e.step,type:R.value&&e.type==="password"?"text":e.type},q,pe.value,y.value),null),!d.value&&e.clearable&&!!e.modelValue&&a.createVNode("span",{class:P.value,onClick:X},[a.createVNode(un,null,null)]),T.value,ae.value&&(e.showWordLimit||d.value)&&a.createVNode("p",{class:I.value},[e.overMaxLengthLimit?D.value-k.value:a.createVNode(a.Fragment,null,[k.value,a.createTextVNode(" / "),a.createVNode("span",null,[D.value])])]),$.value&&e.showControl&&a.createVNode("div",{class:z("number-control")},[a.createVNode(no,{class:L.value,onClick:Ce},null),a.createVNode(no,{class:F.value,onClick:oe},null)]),((te=(W=t.slots)==null?void 0:W.suffix)==null?void 0:te.call(W))??(e.suffix&&a.createVNode("div",{class:z("suffix-area")},[a.createVNode("span",{class:z("suffix-area--text")},[e.suffix])]))]),[[a.resolveDirective("bk-tooltips"),Z.value]])}}})),PE=a.defineComponent({name:"Card",props:{title:v.string,showHeader:v.bool.def(!0),showFooter:v.bool.def(!1),collapseStatus:v.bool.def(!0),border:v.bool.def(!0),disableHeaderStyle:v.bool.def(!1),position:v.string.def("left"),isEdit:v.bool.def(!1),isCollapse:v.bool.def(!1)},emits:["update:collapseStatus","edit"],setup(e,{emit:t}){const n=a.ref(!0),r=a.ref(!1),s=a.ref(""),o=()=>{e.isCollapse&&(n.value=!n.value,t("update:collapseStatus",n.value))},c=()=>{r.value=!r.value},d=()=>{r.value=!r.value,t("edit",s)};a.watch(()=>e.collapseStatus,f=>{e.isCollapse&&(n.value=f)},{immediate:!0}),a.watch(()=>e.title,f=>{s.value=f},{immediate:!0});const{resolveClassName:u}=xe(),h=u("card");return{collapseActive:n,showInput:r,renderTitle:s,handleCollapse:o,saveEdit:d,clickEdit:c,wrapperClsName:h}},render(){var s,o,c,d;const e=Ue({[`${this.wrapperClsName}`]:!0,[`${this.wrapperClsName}-border-none`]:!this.$props.border},""),t=Ue({[`${this.wrapperClsName}-head`]:!0,[`${this.wrapperClsName}-head-${this.$props.position}`]:this.$props.isCollapse&&this.$props.position,"no-line-height":this.$props.disableHeaderStyle,collapse:!this.collapseActive},""),n=a.createVNode("div",{class:"title",title:this.renderTitle},[this.showInput?a.createVNode(va,{class:`${this.wrapperClsName}-input`,modelValue:this.renderTitle,"onUpdate:modelValue":u=>this.renderTitle=u,onBlur:this.saveEdit},null):this.renderTitle]),r=a.createVNode("span",{class:`${this.wrapperClsName}-icon`,onClick:this.handleCollapse},[this.collapseActive?a.createVNode(Ps,null,null):a.createVNode(_n,null,null)]);return a.createVNode("div",{class:e},[this.$props.showHeader?a.createVNode("div",{class:t},[this.$props.isCollapse&&(((o=(s=this.$slots).icon)==null?void 0:o.call(s))??r),((d=(c=this.$slots).header)==null?void 0:d.call(c))??n,this.$props.isEdit&&!this.showInput&&a.createVNode(Kl,{class:`${this.wrapperClsName}-edit`,onClick:this.clickEdit},null)]):"",a.createVNode(O1,null,{default:()=>{var u,h,f,m;return[a.withDirectives(a.createVNode("div",null,[a.createVNode("div",{class:`${this.wrapperClsName}-body`},[((h=(u=this.$slots).default)==null?void 0:h.call(u))??"Content"]),this.$props.showFooter?a.createVNode("div",{class:`${this.wrapperClsName}-footer`},[((m=(f=this.$slots).footer)==null?void 0:m.call(f))??"Footer"]):""]),[[a.vShow,this.collapseActive]])]}})])}}),x6=Je(PE);var _6=function(e){return e.FILLED="filled",e.STROKE="stroke",e.UNKNOWN="",e}(_6||{});const ME=a.defineComponent({name:"Tag",props:{theme:wl().def(""),closable:v.bool.def(!1),type:Pe("tagStorkeType",{}).def(_6.UNKNOWN),checkable:v.bool.def(!1),checked:v.bool.def(!1),radius:v.string.def("2px"),size:v.size()},emits:["change","close"],slots:Object,setup(e,{emit:t}){const{resolveClassName:n}=xe();return{wrapperStyle:a.computed(()=>({borderRadius:e.radius})),handleClose:c=>{c.preventDefault(),c.stopPropagation(),t("close",c)},handleClick:c=>{c.preventDefault(),c.stopPropagation(),e.checkable&&t("change",!e.checked)},resolveClassName:n}},render(){var t,n;const e={[this.resolveClassName("tag")]:!0,[this.resolveClassName("tag-closable")]:this.closable,[this.resolveClassName("tag-checkable")]:this.checkable,[this.resolveClassName("tag-check")]:this.checked,[this.resolveClassName(`tag-${this.type}`)]:this.type,[this.resolveClassName(`tag-${this.theme}`)]:this.theme,[this.resolveClassName(`tag--${this.size}`)]:!0};return a.createVNode("div",{style:this.wrapperStyle,class:e,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")}`},[(n=(t=this.$slots).default)==null?void 0:n.call(t)]),this.closable&&a.createVNode(tn,{class:`${this.resolveClassName("tag-close")}`,onClick:this.handleClose},null)])}}),po=Je(ME),Sc=Symbol("BkSelect"),S6=Symbol("BkOptionGroup");function T6(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function r0(e){return{register:(r,s)=>{if(s&&!e.value.has(r))return e.value.set(r,s)},unregister:r=>{e.value.delete(r)}}}function E6(e,t=200){let n,r=e;return a.customRef((s,o)=>({get(){return s(),r},set(c){clearTimeout(n),c===void 0||c===""?(r=c,o()):n=setTimeout(()=>{r=c,o()},t)}}))}function RE(e,t){const{popoverMinWidth:n}=e;let r=null;const s=a.ref("auto"),o=a.ref(!1),c=()=>{o.value=!o.value},d=()=>{o.value=!1},u=()=>{o.value=!0},h=()=>{var f;s.value=Math.max((f=t.value)==null?void 0:f.offsetWidth,n)};return a.onMounted(()=>{t.value&&(r=Lv(t.value,h,60,!0),r.start())}),a.onBeforeUnmount(()=>{r==null||r.stop(),r=null}),{isPopoverShow:o,popperWidth:s,togglePopover:c,hidePopover:d,showPopover:u}}function FE(e,t){const n=E6(""),r=E6(""),s=a.computed(()=>r.value||n.value),o=a.ref(!1);return a.watch(s,async()=>{try{o.value=!0,await e(s.value),o.value=!1}catch(c){console.error(c)}finally{t==null||t()}}),{customOptionName:n,searchValue:r,curSearchValue:s,searchLoading:o}}function Gs(e=""){return e&&String(e).trim().toLowerCase()}function HE(e,t){if(!e||!t)return!0;const{top:n,bottom:r}=e.getBoundingClientRect(),{top:s,bottom:o}=t.getBoundingClientRect();return n>=s&&r<=o}const Ks=12;function BE(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 zE(e){const{useGroup:t,saveKey:n,displayKey:r,list:s}=a.toRefs(e),o=a.ref([]),c=a.ref({});return a.watch([t,n,r,s],()=>{o.value=[];let d=a.markRaw(s.value);t.value&&(d=d.reduce((u,h)=>{let f=[];return h.children&&(f=h.children.map(m=>({group:{groupId:h[n.value],groupName:h[r.value]},...m}))),u.concat(f)},[])),o.value=d,c.value=d.reduce((u,h)=>(u[h[n.value]]=h,u),{})},{immediate:!0,deep:!0}),{flatList:o,saveKeyMap:c}}const O6=e=>{const t=e.length;let n=0;for(let r=0;r<t;r++)e.charCodeAt(r)&65280&&(n+=1),n+=1;return n},L6=(e,t,n)=>{a.watch([n,t],()=>{s()},{flush:"post"});const r=a.ref(null),s=()=>{t.value&&(r.value=null,setTimeout(()=>{const o=Array.from(e.value.querySelectorAll(".tag-item")),c=o.findIndex((d,u)=>u?o[u-1].offsetTop!==d.offsetTop:!1);r.value=c>0?c-1:null}))};return{overflowTagIndex:r}},A6=Symbol("CheckboxGroup");function UE(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const jE=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,r=a.inject(A6,I3),s=!P3(r),o=a.ref(),c=a.ref(t.checked),d=a.ref(!1),u=a.computed(()=>s&&r.props.disabled?!0:t.disabled),h=p=>{const y=c.value?t.trueLabel:t.falseLabel;n("update:modelValue",y),n("change",y,p),s&&r.handleChange(),a.nextTick(()=>{o.value.checked!==c.value&&(o.value.checked=c.value)})};s?a.watch(()=>r.props.modelValue,p=>{c.value=p.includes(t.label)},{deep:!0}):a.watch(()=>t.modelValue,p=>{p!==""&&(c.value=p===t.trueLabel)},{immediate:!0}),a.watch(()=>t.checked,()=>{c.value=t.checked,t.immediateEmitChange!==!1&&h()});const f=(p=!0)=>{c.value=p},m=p=>{const y=p.target;if(u.value||d.value)return;d.value=!0;const b=y.checked;Promise.resolve(t.beforeChange?t.beforeChange(b):!0).then(N=>{if(N)c.value=b,h(p);else return Promise.reject()}).catch(N=>{console.error(N),y.checked=c.value}).finally(()=>{d.value=!1})};return a.onMounted(()=>{s&&r.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&r.unregister(e.proxy)}),{inputRef:o,isChecked:c,isPrechecking:d,isDisabled:u,setChecked:f,handleChange:m}},WE={modelValue:v.oneOfType([v.bool,v.string,v.number]),label:v.oneOfType([v.bool,v.string,v.number]),trueLabel:v.oneOfType([v.bool,v.string,v.number]).def(!0),falseLabel:v.oneOfType([v.bool,v.string,v.number]).def(!1),disabled:v.bool.def(!1),checked:v.bool.def(!1),indeterminate:v.bool,beforeChange:Es().def(()=>!0),size:v.size().def(Fu.DEFAULT),immediateEmitChange:v.bool.def(!0)},GE=a.defineComponent({name:"Checkbox",props:WE,emits:{"update:modelValue":e=>e!==void 0,change:(e,t)=>e!==void 0,click:e=>!0},setup(e){const[t,{blur:n,focus:r}]=UE(),{inputRef:s,isChecked:o,isPrechecking:c,isDisabled:d,setChecked:u,handleChange:h}=jE(),{resolveClassName:f}=xe();return{inputRef:s,isFocus:t,isChecked:o,isPrechecking:c,isDisabled:d,setChecked:u,handleBlur:n,handleFocus:r,handleChange:h,size:e.size,resolveClassName:f}},render(){const e=Ue({[`${this.resolveClassName("checkbox")}`]:!0,[`${this.resolveClassName("checkbox")}-${this.size}`]:!0,"is-focused":this.isFocus,"is-checked":this.isChecked,"is-disabled":this.isDisabled,"is-indeterminated":this.indeterminate,"is-prechecking":this.isPrechecking}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("span",{class:`${this.resolveClassName("checkbox-label")}`},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e},[a.createVNode("span",{class:this.resolveClassName("checkbox-input")},[a.createVNode("input",{ref:"inputRef",class:`${this.resolveClassName("checkbox-original")}`,checked:this.isChecked,disabled:this.isDisabled||this.isPrechecking,role:"checkbox",type:"checkbox",onChange:this.handleChange},null)]),t(),this.isPrechecking&&a.createVNode(rc,{class:`${this.resolveClassName("checkbox-checking")}`},null)])}}),KE={modelValue:v.array,disabled:v.bool,withValidate:v.bool.def(!0)},Tc=a.defineComponent({name:"CheckboxGroup",props:KE,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(e,t){const n=Qn(),r=[],s=u=>{r.push(u)},o=u=>{const h=r.indexOf(u);h>-1&&r.splice(h,1)},c=()=>{const u=r.reduce((h,f)=>(f.isChecked&&h.push(f.label),h),[]);t.emit("update:modelValue",u),t.emit("change",u)};a.provide(A6,{name:"CheckboxGroup",props:e,register:s,unregister:o,handleChange:c}),a.watch(()=>e.modelValue,()=>{var u;e.withValidate&&((u=n==null?void 0:n.validate)==null||u.call(n,"change"))}),a.onMounted(()=>{const u=e.modelValue||[];r.forEach(h=>{u.includes(h.label)&&h.setChecked(!0)})});const{resolveClassName:d}=xe();return{resolveClassName:d}},render(){var e;return a.createVNode("div",{class:`${this.resolveClassName("checkbox-group")}`},[(e=this.$slots)==null?void 0:e.default()])}}),hn=en(GE,{Group:Tc}),$6=a.defineComponent({name:"CascaderPanel",props:{width:v.oneOfType([v.number,v.string]).def("auto"),height:v.oneOfType([v.number,v.string]).def(216),store:v.object.def({}),separator:v.string.def(""),suggestions:v.arrayOf(T3()),isFiltering:v.bool.def(!1),searchKey:v.oneOfType([v.string,v.number]).def(""),modelValue:v.arrayOf(v.oneOfType([Ru(),String,Number]))},emits:["update:modelValue"],setup(e,{emit:t}){const n=dt("cascader"),{resolveClassName:r}=xe(),{store:s}=e,o=a.reactive({list:[e.store.getNodes()]}),c=a.ref([]),d=a.ref([]),u=$=>typeof $=="number"?`${$}px`:$,h=u(e.height),f=u(e.width),m=$=>{$.length===0&&(o.list=o.list.slice(0,1),c.value=[]),p($),d.value=$},p=$=>{let D=[];if(s.config.multiple)for(const R of $)R.length>D.length&&(D=R);else D=$;D.forEach(R=>{const P=s.getNodeById(R);b(P)})},y=$=>{if(!$.isDisabled){if($.config.multiple){const D=s.config.checkAnyLevel?s.getCheckedNodes():s.getCheckedLeafNodes();d.value=D.map(R=>R.path)}else d.value=$.path;t("update:modelValue",d.value)}},b=$=>{var D;if(!(!$||$!=null&&$.isDisabled)){if(o.list=o.list.slice(0,$.level),c.value=c.value.slice(0,$.level-1),(D=$.children)!=null&&D.length){o.list.push($.children),c.value.push($);return}if(s.config.isRemote&&!$.isLeaf){$.loading=!0;const R=P=>{s.appendNodes(P,$||null),o.list.push($.children),c.value.push($),$.loading=!1};s.config.remoteMethod($,R)}}},N=$=>{const{trigger:D,checkAnyLevel:R,multiple:P}=$.config;return{onClick:A=>{(!$.isLeaf||P)&&A.stopPropagation(),D==="click"&&b($),R&&!P&&y($),$.isLeaf&&!P&&y($)},onMouseenter:()=>{D==="hover"&&b($)}}},w=$=>{const{multiple:D}=$.config;return{onClick:P=>{if(D){P.stopPropagation(),O($,!$.checked);return}b($),$.isLeaf&&!D&&y($)}}},C=n.value.noData,{emptyText:E}=n.value,_=$=>(c.value[$.level-1]||{}).id===$.id,x=($,D)=>{const{multiple:R}=$.config;return R?D.some(P=>Os(P,$.path)):Os(D,$.path)},O=($,D)=>{$.setNodeCheck(D||!1),y($)},T=$=>$.loading?a.createVNode(Fs,{class:r("icon-spinner")},null):a.createVNode(_n,{class:r("icon-angle-right")},null);return a.watch(()=>e.modelValue,$=>{m($)},{immediate:!0}),a.watch(()=>e.store,$=>{o.list=[$.getNodes()]}),{menus:o,activePath:c,nodeExpandHandler:b,isNodeInPath:_,nodeEvent:N,isCheckedNode:x,checkValue:d,checkNode:O,iconRender:T,panelWidth:f,panelHeight:h,searchPanelEvents:w,expandByNodeList:p,noDataText:C,emptyText:E,resolveClassName:r}},render(){const e=parseInt(this.panelWidth,10)>200?this.panelWidth:"200px",t=()=>this.suggestions.length?a.createVNode("ul",{style:{height:this.panelHeight,width:this.panelWidth},class:[this.resolveClassName("cascader-panel"),this.resolveClassName("scroll-y")]},[this.suggestions.map(n=>a.createVNode("li",a.mergeProps({class:[this.resolveClassName("cascader-node"),{"is-selected":this.isNodeInPath(n)},{"is-disabled":n.isDisabled},{"is-checked":this.isCheckedNode(n,this.checkValue)}]},this.searchPanelEvents(n)),[n.pathNames.join(this.separator)]))]):a.createVNode("div",{style:{width:e},class:this.resolveClassName("cascader-search-empty")},[a.createVNode("span",null,[this.noDataText])]);return a.createVNode("div",{class:this.resolveClassName("cascader-panel-wrapper")},[this.isFiltering?t():this.menus.list.map(n=>a.createVNode("ul",{style:{height:this.panelHeight,width:this.panelWidth},class:[this.resolveClassName("cascader-panel"),this.resolveClassName("scroll-y")]},[n.length?n.map(r=>{var s,o;return a.createVNode("li",a.mergeProps({class:[this.resolveClassName("cascader-node"),{"is-selected":this.isNodeInPath(r)},{"is-disabled":r.isDisabled},{"is-checked":!r.config.multiple&&this.isCheckedNode(r,this.checkValue)}]},Object.assign(this.nodeEvent(r),r.config.multiple?{}:{})),[r.config.multiple&&a.createVNode(hn,{style:"margin-right: 5px",modelValue:r.checked,"onUpdate:modelValue":c=>r.checked=c,disabled:r.isDisabled,indeterminate:r.isIndeterminate,onChange:c=>this.checkNode(r,!!c)},null),(o=(s=this.$slots).default)==null?void 0:o.call(s,{node:r,data:r.data}),r.isLeaf?"":this.iconRender(r)])}):a.createVNode("div",{class:this.resolveClassName("cascader-panel-empty-wrapper")},[this.noDataText])]))])}});function V6(e){return e.data.disabled?!0:e.level!==1?V6(e.parent):e.data.disabled}let D6=class p8{constructor(t,n,r){Le(this,"data");Le(this,"config");Le(this,"parent");Le(this,"level");Le(this,"id");Le(this,"name");Le(this,"loading");Le(this,"loaded");Le(this,"checked");Le(this,"isIndeterminate");Le(this,"children");Le(this,"leaf");Le(this,"pathNodes");Le(this,"path");Le(this,"pathNames");Le(this,"nodes");this.data=t,this.config=n,this.parent=r||null,this.leaf=t.leaf,this.level=this.parent?this.parent.level+1:1,this.initState()}initState(){const{idKey:t,nameKey:n,childrenKey:r}=this.config;this.id=this.data[t],this.name=this.data[n],this.loading=!1,this.loaded=!1,this.checked=!1;const s=this.data[r];this.children=(s||[]).map(o=>new p8(o,this.config,this)),this.pathNodes=this.calculateNodesPath(),this.path=this.pathNodes.map(o=>o.id),this.pathNames=this.pathNodes.map(o=>o.name)}get isLeaf(){var t;return this.config.isRemote?this.leaf||(this.loaded?!this.children.length:!1):!(Array.isArray(this.children)&&((t=this.children)==null?void 0:t.length)!==0)}get isDisabled(){return V6(this)}broadcast(t,n){const r=`onParent${zi(t)}`;this.children.forEach(s=>{var o;s&&(s.broadcast(t,n),(o=s[r])==null||o.call(s,n))})}emit(t){var s;const{parent:n}=this,r=`onChild${zi(t)}`;n&&((s=n[r])==null||s.call(n),n.emit(t))}onParentCheck(t){this.isDisabled||this.setCheckState(t)}onChildCheck(){const{children:t}=this,n=t.filter(s=>!s.isDisabled),r=n.length?n.every(s=>s.checked):!1;this.setCheckState(r)}setCheckState(t){const n=this.children.length,r=this.children.reduce((s,o)=>{const c=o.isIndeterminate?.5:0,d=o.checked?1:c;return s+d},0);this.checked=t,this.isIndeterminate=r!==n&&r>0}setNodeCheck(t){if(this.config.checkAnyLevel){this.checked=t;return}this.broadcast("check",t),this.setCheckState(t),this.emit("check")}calculateNodesPath(){const t=[this];let{parent:n}=this;for(;n;)t.unshift(n),n=n.parent;return t}};const k6=(e,t)=>e.reduce((n,r)=>(r.isLeaf?n.push(r):(!t&&n.push(r),n=n.concat(k6(r.children,t))),n),[]);class I6{constructor(t){Le(this,"data");Le(this,"config");Le(this,"nodes");const{list:n}=t;this.data=n,this.config=t,this.nodes=this.data.map(r=>new D6(r,this.config))}getNodes(){return this.nodes}clearChecked(){this.getFlattedNodes().forEach(t=>{t.setNodeCheck(!1),t.isIndeterminate=!1})}removeTag(t){this.getFlattedNodes().find(n=>Os(t,n.path)?(n.setNodeCheck(!1),!0):!1)}getFlattedNodes(t=!1){return k6(this.nodes,t)}setNodesCheck(t){this.getFlattedNodes().forEach(n=>{n.setNodeCheck(!1);const r=t.find(s=>Os(n.path,s));r&&this.getNodeByValue(r).setNodeCheck(!0)})}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getCheckedLeafNodes(){return this.getFlattedNodes().filter(t=>t.isLeaf&&t.checked)}getNodeByValue(t){return this.getFlattedNodes().filter(r=>Os(r.path,t))[0]??null}getNodeById(t){return this.getFlattedNodes().find(n=>n.id===t)}appendNode(t,n){const r=new D6(t,this.config,n);(n?n.children:this.nodes).push(r)}appendNodes(t,n){t.forEach(r=>this.appendNode(r,n))}}const YE=a.defineComponent({name:"Cascader",directives:{bkTooltips:pa},props:{modelValue:v.arrayOf(v.oneOfType([Ru(),String,Number])),list:v.array.def([]),placeholder:v.string.def(""),behavior:v.string.def("normal"),filterable:v.bool.def(!1),multiple:v.bool.def(!1),disabled:v.bool.def(!1),clearable:v.bool.def(!0),trigger:v.string.def("click"),checkAnyLevel:v.bool.def(!1),isRemote:v.bool.def(!1),remoteMethod:v.func,showCompleteName:v.bool.def(!0),idKey:v.string.def("id"),nameKey:v.string.def("name"),childrenKey:v.string.def("children"),separator:v.string.def("/"),limitOneLine:v.bool.def(!1),extCls:v.string.def(""),filterMethod:v.func,scrollHeight:v.oneOfType([v.number,v.string]).def(216),scrollWidth:v.oneOfType([v.number,v.string]).def("auto"),customTextFillback:v.func,customTagsFillback:v.func,collapseTags:{type:Boolean,default:!0},floatMode:{type:Boolean,default:!1}},emits:["update:modelValue","change","clear","toggle","focus"],setup(e,{emit:t,slots:n}){const r=dt("cascader"),{separator:s,multiple:o}=e,{isHover:c,setHover:d,cancelHover:u}=T6(),h=a.ref(new I6(e)),f=a.ref(""),m=a.ref([]),{modelValue:p}=a.toRefs(e),y=a.ref(),b=a.ref(""),N=a.ref([]),w=a.ref(!1),C=a.ref(!1),E=a.ref(!1),_=a.ref(!1),x=a.computed({get:()=>p.value,set:ue=>{t("update:modelValue",ue)}}),O=a.ref(null),T=a.ref(null),$=a.ref(null),D=a.computed(()=>e.placeholder?e.placeholder:r.value.pleaseSelect),R=a.computed(()=>e.customTextFillback?e.customTextFillback(e.modelValue,h.value.getFlattedNodes()):f.value),P=ue=>e.showCompleteName?ue.pathNames.join(s):ue.pathNames[ue.pathNames.length-1],I=()=>{b.value=f.value},A=()=>{if(!e.multiple){b.value=f.value;return}b.value=""},k=ue=>{var we;if(o){h.value.setNodesCheck(ue),m.value=h.value.getCheckedNodes().filter(ne=>h.value.config.checkAnyLevel||ne.isLeaf).map(ne=>({text:P(ne),key:ne.id})),f.value=m.value.map(ne=>ne.text).join(", ");return}e.checkAnyLevel||(we=O==null?void 0:O.value)==null||we.hide();const se=h.value.getNodeByValue(ue);f.value=se?P(se):"",I()},L=ue=>{ue.stopPropagation(),h.value.clearChecked(),b.value="",k([]),t("update:modelValue",[]),t("clear",JSON.parse(JSON.stringify(e.modelValue)))},F=(ue,se,we)=>{we.stopPropagation();const ne=JSON.parse(JSON.stringify(ue)),ye=ne.splice(se,1)[0];C.value=!0,h.value.removeTag(ye),k(ne),t("update:modelValue",h.value.getCheckedNodes().map(le=>le.path)),setTimeout(()=>{C.value=E.value})},Z=(ue,se)=>{var we;k(ue),t("update:modelValue",ue),se!==void 0&&t("change",ue),(we=$==null?void 0:$.value)==null||we.focus(),w.value=!1},ae=()=>{h.value=new I6(e),k(e.modelValue)},K=ue=>{_.value=ue.isShow,t("toggle",ue.isShow),C.value=ue.isShow,E.value=ue.isShow,a.nextTick(()=>{var se;ue&&((se=$.value)==null||se.focus())}),ue.isShow&&ie(),ue.isShow||(w.value=!1)},fe=Gi(200,ue=>{const se=ue.target;if(b.value=se.value,b.value===""){w.value=!1;return}w.value=!0,w.value=!0;const we=e.filterMethod?e.filterMethod:ye=>(e.checkAnyLevel||ye.isLeaf)&&ye.pathNames.join(e.separator).includes(b.value),ne=h.value.getFlattedNodes().filter(ye=>we(ye,b.value));N.value=ne,!(O!=null&&O.value.isShow)&&(O==null||O.value.show())}),ie=()=>{t("focus")};a.watch(()=>e.modelValue,Z,{immediate:!0}),a.watch(()=>e.list,ae,{deep:!0,immediate:!0});const X=a.computed(()=>e.customTagsFillback?e.customTagsFillback(e.modelValue,h.value.getFlattedNodes()):m.value.map(ue=>ue.text)),U=a.computed(()=>e.collapseTags?e.collapseTags&&E.value:e.collapseTags),B=a.computed(()=>e.collapseTags?e.collapseTags&&C.value:e.collapseTags),{overflowTagIndex:Y}=n.trigger?{overflowTagIndex:null}:L6(T,B,X),{resolveClassName:Q}=xe();return{calcuPlaceholder:D,bkCascaderRef:T,inputRef:$,overflowTagIndex:Y,isCollapse:U,isFocus:E,store:h,updateValue:k,selectedText:f,checkedValue:x,handleClear:L,isHover:c,setHover:d,popover:O,cancelHover:u,selectedTags:m,removeTag:F,cascaderPanel:y,popoverChangeEmitter:K,searchKey:b,suggestions:N,isFiltering:w,searchInputHandler:fe,focusEmitter:ie,tagList:X,isEdit:C,displayText:R,resolveClassName:Q,isShowPanel:_,searchBlueHandler:A}},render(){const e=()=>this.clearable&&this.isHover&&!this.disabled?a.createVNode(un,{class:this.resolveClassName("icon-clear-icon"),onClick:this.handleClear},null):a.createVNode(Ms,{class:[this.resolveClassName("icon-angle-up"),this.isShowPanel?"active":""]},null);this.overflowTagIndex=this.overflowTagIndex===0?1:this.overflowTagIndex;const t=this.tagList.reduce((o,c,d)=>(this.overflowTagIndex!==null&&d>=this.overflowTagIndex&&o.push(c),o),[]),n=()=>this.limitOneLine?a.createVNode("span",{class:"cascader-selected-text"},[this.displayText]):a.createVNode("div",{class:"cascader-tag-list"},[this.tagList.map((o,c)=>{const d=!this.isCollapse&&this.overflowTagIndex!==null&&c>=this.overflowTagIndex;return a.createVNode("span",{key:o,style:{display:d?"none":""},class:"tag-item"},[a.createVNode("span",{class:"tag-item-name"},[o]),a.createVNode(tn,{class:this.resolveClassName("icon-clear-icon"),onClick:u=>{u.stopPropagation(),this.removeTag(this.modelValue,c,u)}},null)])}),this.overflowTagIndex!==null&&!this.isCollapse&&a.withDirectives(a.createVNode(po,{style:"margin-top: 0"},{default:()=>[a.createTextVNode("+"),this.selectedTags.length-this.overflowTagIndex]}),[[a.resolveDirective("bk-tooltips"),t.join(", ")]])]),r=()=>this.multiple?null:a.createVNode("span",null,[this.displayText]),s=()=>a.createVNode(Tn,{ref:"popover",class:this.resolveClassName("cascader-popover-wrapper"),arrow:!1,boundary:"body",disabled:this.disabled,offset:4,placement:"bottom-start",theme:`light ${this.resolveClassName("cascader-popover")}`,trigger:"click",onAfterHidden:this.popoverChangeEmitter,onAfterShow:this.popoverChangeEmitter},{default:()=>this.$slots.trigger?this.$slots.trigger({selected:this.modelValue,isShow:this.isShowPanel}):a.createVNode("div",{class:[this.resolveClassName("cascader-name"),this.resolveClassName("scroll-y")]},[this.multiple&&this.selectedTags.length>0&&n(),this.filterable?(this.isCollapse||this.selectedTags.length===0)&&a.createVNode("input",{ref:"inputRef",class:[this.resolveClassName("cascader-search-input"),{"is-disabled":this.disabled}],disabled:this.disabled,placeholder:this.calcuPlaceholder,type:"text",value:this.searchKey,onBlur:this.searchBlueHandler,onInput:this.searchInputHandler},null):r()]),content:()=>a.createVNode("div",{class:this.resolveClassName("cascader-popover")},[a.createVNode($6,{ref:"cascaderPanel",width:this.scrollWidth,height:this.scrollHeight,modelValue:this.checkedValue,"onUpdate:modelValue":o=>this.checkedValue=o,"is-filtering":this.isFiltering,"search-key":this.searchKey,separator:this.separator,store:this.store,suggestions:this.suggestions},{default:o=>this.$slots.default?this.$slots.default(o):a.createVNode("span",{class:this.resolveClassName("cascader-node-name")},[o.node.name])})])});return a.createVNode("div",{class:[this.resolveClassName("cascader-wrapper"),this.floatMode?"float-mode":""]},[this.$slots.trigger?s():a.createVNode("div",{ref:"bkCascaderRef",class:[this.resolveClassName("cascader"),this.extCls,{"is-unselected":this.modelValue.length===0,"is-hover":this.isHover,"is-filterable":this.filterable,"is-focus":this.isFocus,"is-disabled":this.disabled,"is-simplicity":this.behavior==="simplicity"}],"data-placeholder":this.calcuPlaceholder,tabindex:"0",onMouseenter:this.setHover,onMouseleave:this.cancelHover},[e(),s()])])}}),P6=en(YE,{CascaderPanel:$6});function ya(){}ya.prototype={diff:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=r.callback;typeof r=="function"&&(s=r,r={}),this.options=r;var o=this;function c(N){return s?(setTimeout(function(){s(void 0,N)},0),!0):N}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var d=n.length,u=t.length,h=1,f=d+u,m=[{newPos:-1,components:[]}],p=this.extractCommon(m[0],n,t,0);if(m[0].newPos+1>=d&&p+1>=u)return c([{value:this.join(n),count:n.length}]);function y(){for(var N=-1*h;N<=h;N+=2){var w=void 0,C=m[N-1],E=m[N+1],_=(E?E.newPos:0)-N;C&&(m[N-1]=void 0);var x=C&&C.newPos+1<d,O=E&&0<=_&&_<u;if(!x&&!O){m[N]=void 0;continue}if(!x||O&&C.newPos<E.newPos?(w=qE(E),o.pushComponent(w.components,void 0,!0)):(w=C,w.newPos++,o.pushComponent(w.components,!0,void 0)),_=o.extractCommon(w,n,t,N),w.newPos+1>=d&&_+1>=u)return c(XE(o,w.components,n,t,o.useLongestToken));m[N]=w}h++}if(s)(function N(){setTimeout(function(){if(h>f)return s();y()||N()},0)})();else for(;h<=f;){var b=y();if(b)return b}},pushComponent:function(t,n,r){var s=t[t.length-1];s&&s.added===n&&s.removed===r?t[t.length-1]={count:s.count+1,added:n,removed:r}:t.push({count:1,added:n,removed:r})},extractCommon:function(t,n,r,s){for(var o=n.length,c=r.length,d=t.newPos,u=d-s,h=0;d+1<o&&u+1<c&&this.equals(n[d+1],r[u+1]);)d++,u++,h++;return h&&t.components.push({count:h}),t.newPos=d,u},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function XE(e,t,n,r,s){for(var o=0,c=t.length,d=0,u=0;o<c;o++){var h=t[o];if(h.removed){if(h.value=e.join(r.slice(u,u+h.count)),u+=h.count,o&&t[o-1].added){var m=t[o-1];t[o-1]=t[o],t[o]=m}}else{if(!h.added&&s){var f=n.slice(d,d+h.count);f=f.map(function(y,b){var N=r[u+b];return N.length>y.length?N:y}),h.value=e.join(f)}else h.value=e.join(n.slice(d,d+h.count));d+=h.count,h.added||(u+=h.count)}}var p=t[c-1];return c>1&&typeof p.value=="string"&&(p.added||p.removed)&&e.equals("",p.value)&&(t[c-2].value+=p.value,t.pop()),t}function qE(e){return{newPos:e.newPos,components:e.components.slice(0)}}var M6=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,R6=/\S/,F6=new ya;F6.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!R6.test(e)&&!R6.test(t)},F6.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&M6.test(t[n])&&M6.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var a0=new ya;a0.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var s=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=s:(this.options.ignoreWhitespace&&(s=s.trim()),t.push(s))}return t};function JE(e,t,n){return a0.diff(e,t,n)}var ZE=new ya;ZE.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var QE=new ya;QE.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Ec(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ec=function(t){return typeof t}:Ec=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ec(e)}function s0(e){return eO(e)||tO(e)||nO(e)||rO()}function eO(e){if(Array.isArray(e))return i0(e)}function tO(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function nO(e,t){if(e){if(typeof e=="string")return i0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i0(e,t)}}function i0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rO(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
43
|
+
`,$E=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function VE(e){const t=window.getComputedStyle(e),n=t.getPropertyValue("box-sizing"),r=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),s=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:$E.map(c=>`${c}:${t.getPropertyValue(c)}`).join(";"),paddingSize:r,borderSize:s,boxSizing:n}}function N6(e,t=1,n){var f;sr||(sr=document.createElement("textarea"),document.body.appendChild(sr));const{paddingSize:r,borderSize:s,boxSizing:o,contextStyle:c}=VE(e);sr.setAttribute("style",`${c};${AE}`),sr.value=e.value||e.placeholder||"";let d=sr.scrollHeight;const u={};o==="border-box"?d=d+s:o==="content-box"&&(d=d-r),sr.value="";const h=sr.scrollHeight-r;if(Number.isInteger(t)){let m=h*t;o==="border-box"&&(m=m+r+s),d=Math.max(m,d),u.minHeight=`${m}px`}if(Number.isInteger(n)){let m=h*n;o==="border-box"&&(m=m+r+s),d=Math.min(m,d)}return u.height=`${d}px`,(f=sr.parentNode)==null||f.removeChild(sr),sr=void 0,u}const DE={type:v.string.def("text"),clearable:v.bool,disabled:v.bool,readonly:v.bool,placeholder:v.string.def(""),prefixIcon:v.string,suffixIcon:v.string,suffix:v.string,prefix:v.string,step:v.integer,max:v.integer,min:v.integer,maxlength:v.integer,maxcharacter:v.integer,behavior:Uu(),showWordLimit:v.bool,showControl:v.bool.def(!0),showClearOnlyHover:v.bool.def(!0),precision:v.number.def(0).validate(e=>e>=0&&e<20),modelValue:v.oneOfType([v.string,v.number]),size:v.size(),rows:v.number,selectReadonly:v.bool.def(!1),withValidate:v.bool.def(!0),overMaxLengthLimit:v.bool.def(!1),showOverflowTooltips:v.bool.def(!0),resize:v.bool.def(!0),autosize:v.oneOfType([Boolean,Object]).def(!1),stopPropagation:v.bool.def(!0)};let Ze=function(e){return e.BLUR="blur",e.CHANGE="change",e.CLEAR="clear",e.COMPOSITIONEND="compositionend",e.COMPOSITIONSTART="compositionstart",e.COMPOSITIONUPDATE="compositionupdate",e.ENTER="enter",e.FOCUS="focus",e.INPUT="input",e.KEYDOWN="keydown",e.KEYPRESS="keypress",e.KEYUP="keyup",e.PASTE="paste",e.UPDATE="update:modelValue",e}({});function Xa(e,t){return!0}function kE(e,t){return!0}function n0(e){return e}const IE={[Ze.UPDATE]:Xa,[Ze.FOCUS]:e=>e,[Ze.BLUR]:e=>e,[Ze.CHANGE]:Xa,[Ze.CLEAR]:()=>!0,[Ze.INPUT]:Xa,[Ze.KEYPRESS]:Xa,[Ze.KEYDOWN]:Xa,[Ze.KEYUP]:Xa,[Ze.ENTER]:Xa,[Ze.PASTE]:kE,[Ze.COMPOSITIONSTART]:n0,[Ze.COMPOSITIONUPDATE]:n0,[Ze.COMPOSITIONEND]:n0},va=Je(a.defineComponent({name:"Input",directives:{bkTooltips:pa},inheritAttrs:!1,props:DE,emits:IE,setup(e,t){const{resolveClassName:n}=xe(),r=Qn(),s=dt("input"),o=a.ref(!1),c=a.ref(!1),d=a.computed(()=>e.type==="textarea"),u=a.computed(()=>d.value?n("textarea"):n("input")),{class:h,style:f,...m}=t.attrs,p=a.ref(),y=a.ref(typeof e.modelValue>"u"||e.modelValue===null?{}:{value:e.modelValue}),b=a.computed(()=>Ue({[`${u.value}--${e.size}`]:!!e.size,resizable:e.resize,"is-focused":o.value,"is-readonly":e.readonly&&!e.selectReadonly,"is-disabled":e.disabled,"is-simplicity":e.behavior==="simplicity",[`${t.attrs.class}`]:!!t.attrs.class},u.value)),N=a.ref(!1),w=a.ref({}),C=()=>{var G,ee;if(d.value)if(e.autosize){const W=(G=e.autosize)==null?void 0:G.minRows,te=(ee=e.autosize)==null?void 0:ee.maxRows,be=N6(p.value,W,te);w.value={overflowY:"hidden",...be},a.nextTick(()=>{w.value=be})}else w.value={minHeight:N6(p.value).minHeight}},_=(G=>{let ee=!1;return()=>{var te;if(ee||!e.autosize)return;((te=p.value)==null?void 0:te.offsetParent)===null||(G(),ee=!0)}})(C),x=z("suffix-icon"),O={search:()=>a.createVNode(Wa,null,null),password:()=>a.createVNode(dc,{class:x,onClick:he},null)},T=a.computed(()=>{const G=O[e.type];return R.value?a.createVNode(Yl,{class:x,onClick:he},null):G?a.createVNode(G,{class:x},null):null}),$=a.computed(()=>e.type==="number"),D=a.computed(()=>Math.floor(e.maxlength??e.maxcharacter??0)),R=a.ref(!1),P=a.computed(()=>Ue({"show-clear-only-hover":e.showClearOnlyHover,[`${u.value}--clear-icon`]:!0},x)),I=a.computed(()=>Ue({[z("max-length")]:!0,"is-over-limit":D.value-k.value<0})),A=G=>typeof e.maxcharacter=="number"?G.split("").reduce((ee,W,te)=>(ee.len+=W.charCodeAt(0)>255?2:1,ee.len>e.maxcharacter&&ee.pos===-1&&(ee.pos=te),ee),{len:0,pos:-1}):{len:G.length,pos:-1},k=a.computed(()=>{const G=e.modelValue??"";return A(G).len}),L=a.computed(()=>Ue({"is-disabled":e.disabled||e.modelValue>=e.max})),F=a.computed(()=>Ue({"is-disabled":e.disabled||e.modelValue<=e.min})),Z=a.computed(()=>{var G;return ae.value&&D.value-k.value===0?{content:s.value.maxlengthLimitTips}:e.showOverflowTooltips&&N.value&&e.modelValue?{content:(G=e.modelValue)==null?void 0:G.toString(),sameWidth:!0}:{disabled:!0}}),ae=a.computed(()=>typeof e.maxlength=="number"||typeof e.maxcharacter=="number"),K=new ResizeObserver(()=>{_(),ie()});a.watch(()=>e.type,async()=>{await a.nextTick(),C()}),a.watch(()=>e.modelValue,G=>{var ee;e.withValidate&&((ee=r==null?void 0:r.validate)==null||ee.call(r,"change")),y.value={value:G},a.nextTick(()=>C()),ie()}),a.onMounted(()=>{var G,ee;ie(),K.observe(p.value),a.nextTick(()=>C()),Object.prototype.hasOwnProperty.call(t.attrs,"autofocus")&&((ee=(G=p.value)==null?void 0:G.focus)==null||ee.call(G))}),a.onBeforeUnmount(()=>{K.disconnect()}),t.expose({focus(){p.value.focus()},blur(){p.value.blur(),o.value=!1},clear:X});function fe(){var G,ee;return((G=p.value)==null?void 0:G.scrollWidth)>((ee=p.value)==null?void 0:ee.clientWidth)+2}function ie(){setTimeout(()=>{N.value=fe()})}function X(){if(e.disabled)return;const G=$.value?e.min:"";t.emit(Ze.UPDATE,G,null),t.emit(Ze.CHANGE,G,null),t.emit(Ze.CLEAR)}function U(G){o.value=!0,t.emit(Ze.FOCUS,G)}function B(G){var ee;o.value=!1,t.emit(Ze.BLUR,G),e.withValidate&&((ee=r==null?void 0:r.validate)==null||ee.call(r,"blur"))}function Y(G){return ee=>{if(e.stopPropagation&&ee.stopPropagation(),ae.value&&!e.overMaxLengthLimit){const W=A(ee.target.value);if(W.len>=D.value&&(G===Ze.KEYDOWN||G===Ze.INPUT)&&!c.value){const te=W.pos>0?ee.target.value.slice(0,W.pos):ee.target.value;y.value={value:te},t.emit(Ze.UPDATE,te,ee),t.emit(Ze.INPUT,te,ee);return}}if(G===Ze.KEYDOWN&&(ee.code==="Enter"||ee.key==="Enter"||ee.keyCode===13)&&t.emit(Ze.ENTER,$.value?ce(ee.target.value,0):ee.target.value,ee),!(c.value&&[Ze.INPUT,Ze.CHANGE,Ze.KEYDOWN].some(W=>G===W))){if(G===Ze.INPUT)t.emit(Ze.UPDATE,ee.target.value,ee);else if(G===Ze.CHANGE&&$.value&&ee.target.value!==""){const W=ce(ee.target.value,0);t.emit(Ze.UPDATE,W,ee),t.emit(G,W,ee);return}t.emit(G,ee.target.value,ee)}}}const[Q,ue,se,we,ne,ye]=[Ze.KEYUP,Ze.KEYDOWN,Ze.KEYPRESS,Ze.PASTE,Ze.CHANGE,Ze.INPUT].map(Y);function le(){c.value=!0}function ge(G){c.value=!1,ye(G)}function j(G){return typeof G=="number"&&!Number.isNaN(G)}function ce(G,ee,W=!0){const te=Number(ee),be=j(te)?te:1,$e=Number.isInteger(e.precision)?e.precision:0,Ve=Number(G);if(Number.isNaN(Ve))return j(e.min)?e.min:0;let Re=Ve+(W?be:-1*be);return j(e.max)&&(Re=Math.min(Re,e.max)),j(e.min)&&(Re=Math.max(Re,e.min)),+Re.toFixed($e)}function Ce(G){if(e.disabled)return;const ee=ce(e.modelValue,e.step);t.emit(Ze.UPDATE,ee,G),t.emit(Ze.CHANGE,ee,G)}function oe(G){if(e.disabled)return;const ee=ce(e.modelValue,e.step,!1);t.emit(Ze.UPDATE,ee,G),t.emit(Ze.CHANGE,ee,G)}function z(G){return`${u.value}--${G}`}function he(){R.value=!R.value}const pe=a.computed(()=>({maxlength:!e.overMaxLengthLimit&&e.maxlength,placeholder:e.placeholder||s.value.placeholder,readonly:e.readonly,disabled:e.disabled})),q={onInput:ye,onFocus:U,onBlur:B,onPaste:we,onChange:ne,onKeypress:se,onKeydown:ue,onKeyup:Q,onCompositionstart:le,onCompositionend:ge};return()=>{var G,ee,W,te;return a.withDirectives(a.createVNode("div",{style:f,class:b.value},[((ee=(G=t.slots)==null?void 0:G.prefix)==null?void 0:ee.call(G))??(e.prefix&&a.createVNode("div",{class:z("prefix-area")},[a.createVNode("span",{class:z("prefix-area--text")},[e.prefix])])),d.value?a.createVNode("textarea",a.mergeProps({ref:p,spellcheck:!1},m,q,pe.value,{style:w.value,rows:e.rows},y.value),null):a.createVNode("input",a.mergeProps({spellcheck:!1},m,{ref:p,class:`${u.value}--text`,max:e.max,min:e.min,step:e.step,type:R.value&&e.type==="password"?"text":e.type},q,pe.value,y.value),null),!d.value&&e.clearable&&!!e.modelValue&&a.createVNode("span",{class:P.value,onClick:X},[a.createVNode(un,null,null)]),T.value,ae.value&&(e.showWordLimit||d.value)&&a.createVNode("p",{class:I.value},[e.overMaxLengthLimit?D.value-k.value:a.createVNode(a.Fragment,null,[k.value,a.createTextVNode(" / "),a.createVNode("span",null,[D.value])])]),$.value&&e.showControl&&a.createVNode("div",{class:z("number-control")},[a.createVNode(no,{class:L.value,onClick:Ce},null),a.createVNode(no,{class:F.value,onClick:oe},null)]),((te=(W=t.slots)==null?void 0:W.suffix)==null?void 0:te.call(W))??(e.suffix&&a.createVNode("div",{class:z("suffix-area")},[a.createVNode("span",{class:z("suffix-area--text")},[e.suffix])]))]),[[a.resolveDirective("bk-tooltips"),Z.value]])}}})),PE=a.defineComponent({name:"Card",props:{title:v.string,showHeader:v.bool.def(!0),showFooter:v.bool.def(!1),collapseStatus:v.bool.def(!0),border:v.bool.def(!0),disableHeaderStyle:v.bool.def(!1),position:v.string.def("left"),isEdit:v.bool.def(!1),isCollapse:v.bool.def(!1)},emits:["update:collapseStatus","edit"],setup(e,{emit:t}){const n=a.ref(!0),r=a.ref(!1),s=a.ref(""),o=()=>{e.isCollapse&&(n.value=!n.value,t("update:collapseStatus",n.value))},c=()=>{r.value=!r.value},d=()=>{r.value=!r.value,t("edit",s)};a.watch(()=>e.collapseStatus,f=>{e.isCollapse&&(n.value=f)},{immediate:!0}),a.watch(()=>e.title,f=>{s.value=f},{immediate:!0});const{resolveClassName:u}=xe(),h=u("card");return{collapseActive:n,showInput:r,renderTitle:s,handleCollapse:o,saveEdit:d,clickEdit:c,wrapperClsName:h}},render(){var s,o,c,d;const e=Ue({[`${this.wrapperClsName}`]:!0,[`${this.wrapperClsName}-border-none`]:!this.$props.border},""),t=Ue({[`${this.wrapperClsName}-head`]:!0,[`${this.wrapperClsName}-head-${this.$props.position}`]:this.$props.isCollapse&&this.$props.position,"no-line-height":this.$props.disableHeaderStyle,collapse:!this.collapseActive},""),n=a.createVNode("div",{class:"title",title:this.renderTitle},[this.showInput?a.createVNode(va,{class:`${this.wrapperClsName}-input`,modelValue:this.renderTitle,"onUpdate:modelValue":u=>this.renderTitle=u,onBlur:this.saveEdit},null):this.renderTitle]),r=a.createVNode("span",{class:`${this.wrapperClsName}-icon`,onClick:this.handleCollapse},[this.collapseActive?a.createVNode(Ps,null,null):a.createVNode(_n,null,null)]);return a.createVNode("div",{class:e},[this.$props.showHeader?a.createVNode("div",{class:t},[this.$props.isCollapse&&(((o=(s=this.$slots).icon)==null?void 0:o.call(s))??r),((d=(c=this.$slots).header)==null?void 0:d.call(c))??n,this.$props.isEdit&&!this.showInput&&a.createVNode(Kl,{class:`${this.wrapperClsName}-edit`,onClick:this.clickEdit},null)]):"",a.createVNode(O1,null,{default:()=>{var u,h,f,m;return[a.withDirectives(a.createVNode("div",null,[a.createVNode("div",{class:`${this.wrapperClsName}-body`},[((h=(u=this.$slots).default)==null?void 0:h.call(u))??"Content"]),this.$props.showFooter?a.createVNode("div",{class:`${this.wrapperClsName}-footer`},[((m=(f=this.$slots).footer)==null?void 0:m.call(f))??"Footer"]):""]),[[a.vShow,this.collapseActive]])]}})])}}),x6=Je(PE);var _6=function(e){return e.FILLED="filled",e.STROKE="stroke",e.UNKNOWN="",e}(_6||{});const ME=a.defineComponent({name:"Tag",props:{theme:wl().def(""),closable:v.bool.def(!1),type:Pe("tagStorkeType",{}).def(_6.UNKNOWN),checkable:v.bool.def(!1),checked:v.bool.def(!1),radius:v.string.def("2px"),size:v.size()},emits:["change","close"],slots:Object,setup(e,{emit:t}){const{resolveClassName:n}=xe();return{wrapperStyle:a.computed(()=>({borderRadius:e.radius})),handleClose:c=>{c.preventDefault(),c.stopPropagation(),t("close",c)},handleClick:c=>{c.preventDefault(),c.stopPropagation(),e.checkable&&t("change",!e.checked)},resolveClassName:n}},render(){var t,n;const e={[this.resolveClassName("tag")]:!0,[this.resolveClassName("tag-closable")]:this.closable,[this.resolveClassName("tag-checkable")]:this.checkable,[this.resolveClassName("tag-check")]:this.checked,[this.resolveClassName(`tag-${this.type}`)]:this.type,[this.resolveClassName(`tag-${this.theme}`)]:this.theme,[this.resolveClassName(`tag--${this.size}`)]:!0};return a.createVNode("div",{style:this.wrapperStyle,class:e,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")}`},[(n=(t=this.$slots).default)==null?void 0:n.call(t)]),this.closable&&a.createVNode(tn,{class:`${this.resolveClassName("tag-close")}`,onClick:this.handleClose},null)])}}),po=Je(ME),Sc=Symbol("BkSelect"),S6=Symbol("BkOptionGroup");function T6(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function r0(e){return{register:(r,s)=>{if(s&&!e.value.has(r))return e.value.set(r,s)},unregister:r=>{e.value.delete(r)}}}function E6(e,t=200){let n,r=e;return a.customRef((s,o)=>({get(){return s(),r},set(c){clearTimeout(n),c===void 0||c===""?(r=c,o()):n=setTimeout(()=>{r=c,o()},t)}}))}function RE(e,t){const{popoverMinWidth:n}=e;let r=null;const s=a.ref("auto"),o=a.ref(!1),c=()=>{o.value=!o.value},d=()=>{o.value=!1},u=()=>{o.value=!0},h=()=>{var f;s.value=Math.max((f=t.value)==null?void 0:f.offsetWidth,n)};return a.onMounted(()=>{t.value&&(r=Lv(t.value,h,60,!0),r.start())}),a.onBeforeUnmount(()=>{r==null||r.stop(),r=null}),{isPopoverShow:o,popperWidth:s,togglePopover:c,hidePopover:d,showPopover:u}}function FE(e,t){const n=E6(""),r=E6(""),s=a.computed(()=>r.value||n.value),o=a.ref(!1);return a.watch(s,async()=>{try{o.value=!0,await e(s.value),o.value=!1}catch(c){console.error(c)}finally{t==null||t()}}),{customOptionName:n,searchValue:r,curSearchValue:s,searchLoading:o}}function Gs(e=""){return e&&String(e).trim().toLowerCase()}function HE(e,t){if(!e||!t)return!0;const{top:n,bottom:r}=e.getBoundingClientRect(),{top:s,bottom:o}=t.getBoundingClientRect();return n>=s&&r<=o}const Ks=12;function BE(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 zE(e){const{useGroup:t,saveKey:n,displayKey:r,list:s}=a.toRefs(e),o=a.ref([]),c=a.ref({});return a.watch([t,n,r,s],()=>{o.value=[];let d=a.markRaw(s.value);t.value&&(d=d.reduce((u,h)=>{let f=[];return h.children&&(f=h.children.map(m=>({group:{groupId:h[n.value],groupName:h[r.value]},...m}))),u.concat(f)},[])),o.value=d,c.value=d.reduce((u,h)=>(u[h[n.value]]=h,u),{})},{immediate:!0,deep:!0}),{flatList:o,saveKeyMap:c}}const O6=e=>{const t=e.length;let n=0;for(let r=0;r<t;r++)e.charCodeAt(r)&65280&&(n+=1),n+=1;return n},L6=(e,t,n)=>{a.watch([n,t],()=>{s()},{flush:"post"});const r=a.ref(null),s=()=>{t.value&&(r.value=null,setTimeout(()=>{const o=Array.from(e.value.querySelectorAll(".tag-item")),c=o.findIndex((d,u)=>u?o[u-1].offsetTop!==d.offsetTop:!1);r.value=c>0?c-1:null}))};return{overflowTagIndex:r}},A6=Symbol("CheckboxGroup");function UE(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const jE=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,r=a.inject(A6,I3),s=!P3(r),o=a.ref(),c=a.ref(t.checked),d=a.ref(!1),u=a.computed(()=>s&&r.props.disabled?!0:t.disabled),h=p=>{const y=c.value?t.trueLabel:t.falseLabel;n("update:modelValue",y),n("change",y,p),s&&r.handleChange(),a.nextTick(()=>{o.value.checked!==c.value&&(o.value.checked=c.value)})};s?a.watch(()=>r.props.modelValue,p=>{c.value=p.includes(t.label)},{deep:!0}):a.watch(()=>t.modelValue,p=>{p!==""&&(c.value=p===t.trueLabel)},{immediate:!0}),a.watch(()=>t.checked,()=>{c.value=t.checked,t.immediateEmitChange!==!1&&h()});const f=(p=!0)=>{c.value=p},m=p=>{const y=p.target;if(u.value||d.value)return;d.value=!0;const b=y.checked;Promise.resolve(t.beforeChange?t.beforeChange(b):!0).then(N=>{if(N)c.value=b,h(p);else return Promise.reject()}).catch(N=>{console.error(N),y.checked=c.value}).finally(()=>{d.value=!1})};return a.onMounted(()=>{s&&r.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&r.unregister(e.proxy)}),{inputRef:o,isChecked:c,isPrechecking:d,isDisabled:u,setChecked:f,handleChange:m}},WE={modelValue:v.oneOfType([v.bool,v.string,v.number]),label:v.oneOfType([v.bool,v.string,v.number]),trueLabel:v.oneOfType([v.bool,v.string,v.number]).def(!0),falseLabel:v.oneOfType([v.bool,v.string,v.number]).def(!1),disabled:v.bool.def(!1),checked:v.bool.def(!1),indeterminate:v.bool,beforeChange:Es().def(()=>!0),size:v.size().def(Fu.DEFAULT),immediateEmitChange:v.bool.def(!0)},GE=a.defineComponent({name:"Checkbox",props:WE,emits:{"update:modelValue":e=>e!==void 0,change:(e,t)=>e!==void 0,click:e=>!0},setup(e){const[t,{blur:n,focus:r}]=UE(),{inputRef:s,isChecked:o,isPrechecking:c,isDisabled:d,setChecked:u,handleChange:h}=jE(),{resolveClassName:f}=xe();return{inputRef:s,isFocus:t,isChecked:o,isPrechecking:c,isDisabled:d,setChecked:u,handleBlur:n,handleFocus:r,handleChange:h,size:e.size,resolveClassName:f}},render(){const e=Ue({[`${this.resolveClassName("checkbox")}`]:!0,[`${this.resolveClassName("checkbox")}-${this.size}`]:!0,"is-focused":this.isFocus,"is-checked":this.isChecked,"is-disabled":this.isDisabled,"is-indeterminated":this.indeterminate,"is-prechecking":this.isPrechecking}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("span",{class:`${this.resolveClassName("checkbox-label")}`},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e},[a.createVNode("span",{class:this.resolveClassName("checkbox-input")},[a.createVNode("input",{ref:"inputRef",class:`${this.resolveClassName("checkbox-original")}`,checked:this.isChecked,disabled:this.isDisabled||this.isPrechecking,role:"checkbox",type:"checkbox",onChange:this.handleChange},null)]),t(),this.isPrechecking&&a.createVNode(rc,{class:`${this.resolveClassName("checkbox-checking")}`},null)])}}),KE={modelValue:v.array,disabled:v.bool,withValidate:v.bool.def(!0)},Tc=a.defineComponent({name:"CheckboxGroup",props:KE,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(e,t){const n=Qn(),r=[],s=u=>{r.push(u)},o=u=>{const h=r.indexOf(u);h>-1&&r.splice(h,1)},c=()=>{const u=r.reduce((h,f)=>(f.isChecked&&h.push(f.label),h),[]);t.emit("update:modelValue",u),t.emit("change",u)};a.provide(A6,{name:"CheckboxGroup",props:e,register:s,unregister:o,handleChange:c}),a.watch(()=>e.modelValue,()=>{var u;e.withValidate&&((u=n==null?void 0:n.validate)==null||u.call(n,"change"))}),a.onMounted(()=>{const u=e.modelValue||[];r.forEach(h=>{u.includes(h.label)&&h.setChecked(!0)})});const{resolveClassName:d}=xe();return{resolveClassName:d}},render(){var e;return a.createVNode("div",{class:`${this.resolveClassName("checkbox-group")}`},[(e=this.$slots)==null?void 0:e.default()])}}),hn=en(GE,{Group:Tc}),$6=a.defineComponent({name:"CascaderPanel",props:{width:v.oneOfType([v.number,v.string]).def("auto"),height:v.oneOfType([v.number,v.string]).def(216),store:v.object.def({}),separator:v.string.def(""),suggestions:v.arrayOf(T3()),isFiltering:v.bool.def(!1),searchKey:v.oneOfType([v.string,v.number]).def(""),modelValue:v.arrayOf(v.oneOfType([Ru(),String,Number]))},emits:["update:modelValue"],setup(e,{emit:t}){const n=dt("cascader"),{resolveClassName:r}=xe(),{store:s}=e,o=a.reactive({list:[e.store.getNodes()]}),c=a.ref([]),d=a.ref([]),u=$=>typeof $=="number"?`${$}px`:$,h=u(e.height),f=u(e.width),m=$=>{$.length===0&&(o.list=o.list.slice(0,1),c.value=[]),p($),d.value=$},p=$=>{let D=[];if(s.config.multiple)for(const R of $)R.length>D.length&&(D=R);else D=$;D.forEach(R=>{const P=s.getNodeById(R);b(P)})},y=$=>{if(!$.isDisabled){if($.config.multiple){const D=s.config.checkAnyLevel?s.getCheckedNodes():s.getCheckedLeafNodes();d.value=D.map(R=>R.path)}else d.value=$.path;t("update:modelValue",d.value)}},b=$=>{var D;if(!(!$||$!=null&&$.isDisabled)){if(o.list=o.list.slice(0,$.level),c.value=c.value.slice(0,$.level-1),(D=$.children)!=null&&D.length){o.list.push($.children),c.value.push($);return}if(s.config.isRemote&&!$.isLeaf){$.loading=!0;const R=P=>{s.appendNodes(P,$||null),o.list.push($.children),c.value.push($),$.loading=!1};s.config.remoteMethod($,R)}}},N=$=>{const{trigger:D,checkAnyLevel:R,multiple:P}=$.config;return{onClick:A=>{(!$.isLeaf||P)&&A.stopPropagation(),D==="click"&&b($),R&&!P&&y($),$.isLeaf&&!P&&y($)},onMouseenter:()=>{D==="hover"&&b($)}}},w=$=>{const{multiple:D}=$.config;return{onClick:P=>{if(D){P.stopPropagation(),O($,!$.checked);return}b($),$.isLeaf&&!D&&y($)}}},C=n.value.noData,{emptyText:E}=n.value,_=$=>(c.value[$.level-1]||{}).id===$.id,x=($,D)=>{const{multiple:R}=$.config;return R?D.some(P=>Os(P,$.path)):Os(D,$.path)},O=($,D)=>{$.setNodeCheck(D||!1),y($)},T=$=>$.loading?a.createVNode(Fs,{class:r("icon-spinner")},null):a.createVNode(_n,{class:r("icon-angle-right")},null);return a.watch(()=>e.modelValue,$=>{m($)},{immediate:!0}),a.watch(()=>e.store,$=>{o.list=[$.getNodes()]}),{menus:o,activePath:c,nodeExpandHandler:b,isNodeInPath:_,nodeEvent:N,isCheckedNode:x,checkValue:d,checkNode:O,iconRender:T,panelWidth:f,panelHeight:h,searchPanelEvents:w,expandByNodeList:p,noDataText:C,emptyText:E,resolveClassName:r}},render(){const e=parseInt(this.panelWidth,10)>200?this.panelWidth:"200px",t=()=>this.suggestions.length?a.createVNode("ul",{style:{height:this.panelHeight,width:this.panelWidth},class:[this.resolveClassName("cascader-panel"),this.resolveClassName("scroll-y")]},[this.suggestions.map(n=>a.createVNode("li",a.mergeProps({class:[this.resolveClassName("cascader-node"),{"is-selected":this.isNodeInPath(n)},{"is-disabled":n.isDisabled},{"is-checked":this.isCheckedNode(n,this.checkValue)}]},this.searchPanelEvents(n)),[n.pathNames.join(this.separator)]))]):a.createVNode("div",{style:{width:e},class:this.resolveClassName("cascader-search-empty")},[a.createVNode("span",null,[this.noDataText])]);return a.createVNode("div",{class:this.resolveClassName("cascader-panel-wrapper")},[this.isFiltering?t():this.menus.list.map(n=>a.createVNode("ul",{style:{height:this.panelHeight,width:this.panelWidth},class:[this.resolveClassName("cascader-panel"),this.resolveClassName("scroll-y")]},[n.length?n.map(r=>{var s,o;return a.createVNode("li",a.mergeProps({class:[this.resolveClassName("cascader-node"),{"is-selected":this.isNodeInPath(r)},{"is-disabled":r.isDisabled},{"is-checked":!r.config.multiple&&this.isCheckedNode(r,this.checkValue)}]},Object.assign(this.nodeEvent(r),r.config.multiple?{}:{})),[r.config.multiple&&a.createVNode(hn,{style:"margin-right: 5px",modelValue:r.checked,"onUpdate:modelValue":c=>r.checked=c,disabled:r.isDisabled,indeterminate:r.isIndeterminate,onChange:c=>this.checkNode(r,!!c)},null),(o=(s=this.$slots).default)==null?void 0:o.call(s,{node:r,data:r.data}),r.isLeaf?"":this.iconRender(r)])}):a.createVNode("div",{class:this.resolveClassName("cascader-panel-empty-wrapper")},[this.noDataText])]))])}});function V6(e){return e.data.disabled?!0:e.level!==1?V6(e.parent):e.data.disabled}let D6=class p8{constructor(t,n,r){Le(this,"data");Le(this,"config");Le(this,"parent");Le(this,"level");Le(this,"id");Le(this,"name");Le(this,"loading");Le(this,"loaded");Le(this,"checked");Le(this,"isIndeterminate");Le(this,"children");Le(this,"leaf");Le(this,"pathNodes");Le(this,"path");Le(this,"pathNames");Le(this,"nodes");this.data=t,this.config=n,this.parent=r||null,this.leaf=t.leaf,this.level=this.parent?this.parent.level+1:1,this.initState()}initState(){const{idKey:t,nameKey:n,childrenKey:r}=this.config;this.id=this.data[t],this.name=this.data[n],this.loading=!1,this.loaded=!1,this.checked=!1;const s=this.data[r];this.children=(s||[]).map(o=>new p8(o,this.config,this)),this.pathNodes=this.calculateNodesPath(),this.path=this.pathNodes.map(o=>o.id),this.pathNames=this.pathNodes.map(o=>o.name)}get isLeaf(){var t;return this.config.isRemote?this.leaf||(this.loaded?!this.children.length:!1):!(Array.isArray(this.children)&&((t=this.children)==null?void 0:t.length)!==0)}get isDisabled(){return V6(this)}broadcast(t,n){const r=`onParent${zi(t)}`;this.children.forEach(s=>{var o;s&&(s.broadcast(t,n),(o=s[r])==null||o.call(s,n))})}emit(t){var s;const{parent:n}=this,r=`onChild${zi(t)}`;n&&((s=n[r])==null||s.call(n),n.emit(t))}onParentCheck(t){this.isDisabled||this.setCheckState(t)}onChildCheck(){const{children:t}=this,n=t.filter(s=>!s.isDisabled),r=n.length?n.every(s=>s.checked):!1;this.setCheckState(r)}setCheckState(t){const n=this.children.length,r=this.children.reduce((s,o)=>{const c=o.isIndeterminate?.5:0,d=o.checked?1:c;return s+d},0);this.checked=t,this.isIndeterminate=r!==n&&r>0}setNodeCheck(t){if(this.config.checkAnyLevel){this.checked=t;return}this.broadcast("check",t),this.setCheckState(t),this.emit("check")}calculateNodesPath(){const t=[this];let{parent:n}=this;for(;n;)t.unshift(n),n=n.parent;return t}};const k6=(e,t)=>e.reduce((n,r)=>(r.isLeaf?n.push(r):(!t&&n.push(r),n=n.concat(k6(r.children,t))),n),[]);class I6{constructor(t){Le(this,"data");Le(this,"config");Le(this,"nodes");const{list:n}=t;this.data=n,this.config=t,this.nodes=this.data.map(r=>new D6(r,this.config))}getNodes(){return this.nodes}clearChecked(){this.getFlattedNodes().forEach(t=>{t.setNodeCheck(!1),t.isIndeterminate=!1})}removeTag(t){this.getFlattedNodes().find(n=>Os(t,n.path)?(n.setNodeCheck(!1),!0):!1)}getFlattedNodes(t=!1){return k6(this.nodes,t)}setNodesCheck(t){this.getFlattedNodes().forEach(n=>{n.setNodeCheck(!1);const r=t.find(s=>Os(n.path,s));r&&this.getNodeByValue(r).setNodeCheck(!0)})}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getCheckedLeafNodes(){return this.getFlattedNodes().filter(t=>t.isLeaf&&t.checked)}getNodeByValue(t){return this.getFlattedNodes().filter(r=>Os(r.path,t))[0]??null}getNodeById(t){return this.getFlattedNodes().find(n=>n.id===t)}appendNode(t,n){const r=new D6(t,this.config,n);(n?n.children:this.nodes).push(r)}appendNodes(t,n){t.forEach(r=>this.appendNode(r,n))}}const YE=a.defineComponent({name:"Cascader",directives:{bkTooltips:pa},props:{modelValue:v.arrayOf(v.oneOfType([Ru(),String,Number])),list:v.array.def([]),placeholder:v.string.def(""),behavior:v.string.def("normal"),filterable:v.bool.def(!1),multiple:v.bool.def(!1),disabled:v.bool.def(!1),clearable:v.bool.def(!0),trigger:v.string.def("click"),checkAnyLevel:v.bool.def(!1),isRemote:v.bool.def(!1),remoteMethod:v.func,showCompleteName:v.bool.def(!0),idKey:v.string.def("id"),nameKey:v.string.def("name"),childrenKey:v.string.def("children"),separator:v.string.def("/"),limitOneLine:v.bool.def(!1),extCls:v.string.def(""),filterMethod:v.func,scrollHeight:v.oneOfType([v.number,v.string]).def(216),scrollWidth:v.oneOfType([v.number,v.string]).def("auto"),customTextFillback:v.func,customTagsFillback:v.func,collapseTags:{type:Boolean,default:!0},floatMode:{type:Boolean,default:!1}},emits:["update:modelValue","change","clear","toggle","focus"],setup(e,{emit:t,slots:n}){const r=dt("cascader"),{separator:s,multiple:o}=e,{isHover:c,setHover:d,cancelHover:u}=T6(),h=a.ref(new I6(e)),f=a.ref(""),m=a.ref([]),{modelValue:p}=a.toRefs(e),y=a.ref(),b=a.ref(""),N=a.ref([]),w=a.ref(!1),C=a.ref(!1),E=a.ref(!1),_=a.ref(!1),x=a.computed({get:()=>p.value,set:ue=>{t("update:modelValue",ue)}}),O=a.ref(null),T=a.ref(null),$=a.ref(null),D=a.computed(()=>e.placeholder?e.placeholder:r.value.pleaseSelect),R=a.computed(()=>e.customTextFillback?e.customTextFillback(e.modelValue,h.value.getFlattedNodes()):f.value),P=ue=>e.showCompleteName?ue.pathNames.join(s):ue.pathNames[ue.pathNames.length-1],I=()=>{b.value=f.value},A=()=>{if(!e.multiple){b.value=f.value;return}b.value=""},k=ue=>{var we;if(o){h.value.setNodesCheck(ue),m.value=h.value.getCheckedNodes().filter(ne=>h.value.config.checkAnyLevel||ne.isLeaf).map(ne=>({text:P(ne),key:ne.id})),f.value=m.value.map(ne=>ne.text).join(", ");return}e.checkAnyLevel||(we=O==null?void 0:O.value)==null||we.hide();const se=h.value.getNodeByValue(ue);f.value=se?P(se):"",I()},L=ue=>{ue.stopPropagation(),h.value.clearChecked(),b.value="",k([]),t("update:modelValue",[]),t("clear",JSON.parse(JSON.stringify(e.modelValue)))},F=(ue,se,we)=>{we.stopPropagation();const ne=JSON.parse(JSON.stringify(ue)),ye=ne.splice(se,1)[0];C.value=!0,h.value.removeTag(ye),k(ne),t("update:modelValue",h.value.getCheckedNodes().map(le=>le.path)),setTimeout(()=>{C.value=E.value})},Z=(ue,se)=>{var we;k(ue),t("update:modelValue",ue),se!==void 0&&t("change",ue),(we=$==null?void 0:$.value)==null||we.focus(),w.value=!1},ae=()=>{h.value=new I6(e),k(e.modelValue)},K=ue=>{_.value=ue.isShow,t("toggle",ue.isShow),C.value=ue.isShow,E.value=ue.isShow,a.nextTick(()=>{var se;ue&&((se=$.value)==null||se.focus())}),ue.isShow&&ie(),ue.isShow||(w.value=!1)},fe=Gi(200,ue=>{const se=ue.target;if(b.value=se.value,b.value===""){w.value=!1;return}w.value=!0,w.value=!0;const we=e.filterMethod?e.filterMethod:ye=>(e.checkAnyLevel||ye.isLeaf)&&ye.pathNames.join(e.separator).includes(b.value),ne=h.value.getFlattedNodes().filter(ye=>we(ye,b.value));N.value=ne,!(O!=null&&O.value.isShow)&&(O==null||O.value.show())}),ie=()=>{t("focus")};a.watch(()=>e.modelValue,Z,{immediate:!0}),a.watch(()=>e.list,ae,{deep:!0,immediate:!0});const X=a.computed(()=>e.customTagsFillback?e.customTagsFillback(e.modelValue,h.value.getFlattedNodes()):m.value.map(ue=>ue.text)),U=a.computed(()=>e.collapseTags?e.collapseTags&&E.value:e.collapseTags),B=a.computed(()=>e.collapseTags?e.collapseTags&&C.value:e.collapseTags),{overflowTagIndex:Y}=n.trigger?{overflowTagIndex:null}:L6(T,B,X),{resolveClassName:Q}=xe();return{calcuPlaceholder:D,bkCascaderRef:T,inputRef:$,overflowTagIndex:Y,isCollapse:U,isFocus:E,store:h,updateValue:k,selectedText:f,checkedValue:x,handleClear:L,isHover:c,setHover:d,popover:O,cancelHover:u,selectedTags:m,removeTag:F,cascaderPanel:y,popoverChangeEmitter:K,searchKey:b,suggestions:N,isFiltering:w,searchInputHandler:fe,focusEmitter:ie,tagList:X,isEdit:C,displayText:R,resolveClassName:Q,isShowPanel:_,searchBlueHandler:A}},render(){const e=()=>this.clearable&&this.isHover&&!this.disabled?a.createVNode(un,{class:this.resolveClassName("icon-clear-icon"),onClick:this.handleClear},null):a.createVNode(Ms,{class:[this.resolveClassName("icon-angle-up"),this.isShowPanel?"active":""]},null);this.overflowTagIndex=this.overflowTagIndex===0?1:this.overflowTagIndex;const t=this.tagList.reduce((o,c,d)=>(this.overflowTagIndex!==null&&d>=this.overflowTagIndex&&o.push(c),o),[]),n=()=>this.limitOneLine?a.createVNode("span",{class:"cascader-selected-text"},[this.displayText]):a.createVNode("div",{class:"cascader-tag-list"},[this.tagList.map((o,c)=>{const d=!this.isCollapse&&this.overflowTagIndex!==null&&c>=this.overflowTagIndex;return a.createVNode("span",{key:o,style:{display:d?"none":""},class:"tag-item"},[a.createVNode("span",{class:"tag-item-name"},[o]),a.createVNode(tn,{class:this.resolveClassName("icon-clear-icon"),onClick:u=>{u.stopPropagation(),this.removeTag(this.modelValue,c,u)}},null)])}),this.overflowTagIndex!==null&&!this.isCollapse&&a.withDirectives(a.createVNode(po,{style:"margin-top: 0"},{default:()=>[a.createTextVNode("+"),this.selectedTags.length-this.overflowTagIndex]}),[[a.resolveDirective("bk-tooltips"),t.join(", ")]])]),r=()=>this.multiple?null:a.createVNode("span",null,[this.displayText]),s=()=>a.createVNode(Tn,{ref:"popover",class:this.resolveClassName("cascader-popover-wrapper"),arrow:!1,boundary:"body",disabled:this.disabled,offset:4,placement:"bottom-start",theme:`light ${this.resolveClassName("cascader-popover")}`,trigger:"click",onAfterHidden:this.popoverChangeEmitter,onAfterShow:this.popoverChangeEmitter},{default:()=>this.$slots.trigger?this.$slots.trigger({selected:this.modelValue,isShow:this.isShowPanel}):a.createVNode("div",{class:[this.resolveClassName("cascader-name"),this.resolveClassName("scroll-y")]},[this.multiple&&this.selectedTags.length>0&&n(),this.filterable?(this.isCollapse||this.selectedTags.length===0)&&a.createVNode("input",{ref:"inputRef",class:[this.resolveClassName("cascader-search-input"),{"is-disabled":this.disabled}],disabled:this.disabled,placeholder:this.calcuPlaceholder,type:"text",value:this.searchKey,onBlur:this.searchBlueHandler,onInput:this.searchInputHandler},null):r()]),content:()=>a.createVNode("div",{class:this.resolveClassName("cascader-popover")},[a.createVNode($6,{ref:"cascaderPanel",width:this.scrollWidth,height:this.scrollHeight,modelValue:this.checkedValue,"onUpdate:modelValue":o=>this.checkedValue=o,"is-filtering":this.isFiltering,"search-key":this.searchKey,separator:this.separator,store:this.store,suggestions:this.suggestions},{default:o=>this.$slots.default?this.$slots.default(o):a.createVNode("span",{class:this.resolveClassName("cascader-node-name")},[o.node.name])})])});return a.createVNode("div",{class:[this.resolveClassName("cascader-wrapper"),this.floatMode?"float-mode":""]},[this.$slots.trigger?s():a.createVNode("div",{ref:"bkCascaderRef",class:[this.resolveClassName("cascader"),this.extCls,{"is-unselected":this.modelValue.length===0,"is-hover":this.isHover,"is-filterable":this.filterable,"is-focus":this.isFocus,"is-disabled":this.disabled,"is-simplicity":this.behavior==="simplicity"}],"data-placeholder":this.calcuPlaceholder,tabindex:"0",onMouseenter:this.setHover,onMouseleave:this.cancelHover},[e(),s()])])}}),P6=en(YE,{CascaderPanel:$6});function ya(){}ya.prototype={diff:function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=r.callback;typeof r=="function"&&(s=r,r={}),this.options=r;var o=this;function c(N){return s?(setTimeout(function(){s(void 0,N)},0),!0):N}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var d=n.length,u=t.length,h=1,f=d+u,m=[{newPos:-1,components:[]}],p=this.extractCommon(m[0],n,t,0);if(m[0].newPos+1>=d&&p+1>=u)return c([{value:this.join(n),count:n.length}]);function y(){for(var N=-1*h;N<=h;N+=2){var w=void 0,C=m[N-1],E=m[N+1],_=(E?E.newPos:0)-N;C&&(m[N-1]=void 0);var x=C&&C.newPos+1<d,O=E&&0<=_&&_<u;if(!x&&!O){m[N]=void 0;continue}if(!x||O&&C.newPos<E.newPos?(w=qE(E),o.pushComponent(w.components,void 0,!0)):(w=C,w.newPos++,o.pushComponent(w.components,!0,void 0)),_=o.extractCommon(w,n,t,N),w.newPos+1>=d&&_+1>=u)return c(XE(o,w.components,n,t,o.useLongestToken));m[N]=w}h++}if(s)(function N(){setTimeout(function(){if(h>f)return s();y()||N()},0)})();else for(;h<=f;){var b=y();if(b)return b}},pushComponent:function(t,n,r){var s=t[t.length-1];s&&s.added===n&&s.removed===r?t[t.length-1]={count:s.count+1,added:n,removed:r}:t.push({count:1,added:n,removed:r})},extractCommon:function(t,n,r,s){for(var o=n.length,c=r.length,d=t.newPos,u=d-s,h=0;d+1<o&&u+1<c&&this.equals(n[d+1],r[u+1]);)d++,u++,h++;return h&&t.components.push({count:h}),t.newPos=d,u},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function XE(e,t,n,r,s){for(var o=0,c=t.length,d=0,u=0;o<c;o++){var h=t[o];if(h.removed){if(h.value=e.join(r.slice(u,u+h.count)),u+=h.count,o&&t[o-1].added){var m=t[o-1];t[o-1]=t[o],t[o]=m}}else{if(!h.added&&s){var f=n.slice(d,d+h.count);f=f.map(function(y,b){var N=r[u+b];return N.length>y.length?N:y}),h.value=e.join(f)}else h.value=e.join(n.slice(d,d+h.count));d+=h.count,h.added||(u+=h.count)}}var p=t[c-1];return c>1&&typeof p.value=="string"&&(p.added||p.removed)&&e.equals("",p.value)&&(t[c-2].value+=p.value,t.pop()),t}function qE(e){return{newPos:e.newPos,components:e.components.slice(0)}}var M6=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,R6=/\S/,F6=new ya;F6.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!R6.test(e)&&!R6.test(t)},F6.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&M6.test(t[n])&&M6.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var a0=new ya;a0.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var s=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=s:(this.options.ignoreWhitespace&&(s=s.trim()),t.push(s))}return t};function JE(e,t,n){return a0.diff(e,t,n)}var ZE=new ya;ZE.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var QE=new ya;QE.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Ec(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ec=function(t){return typeof t}:Ec=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ec(e)}function s0(e){return eO(e)||tO(e)||nO(e)||rO()}function eO(e){if(Array.isArray(e))return i0(e)}function tO(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function nO(e,t){if(e){if(typeof e=="string")return i0(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i0(e,t)}}function i0(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rO(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
44
44
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var aO=Object.prototype.toString,vo=new ya;vo.useLongestToken=!0,vo.tokenize=a0.tokenize,vo.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,s=r===void 0?function(o,c){return typeof c>"u"?n:c}:r;return typeof e=="string"?e:JSON.stringify(o0(e,null,null,s),s," ")},vo.equals=function(e,t){return ya.prototype.equals.call(vo,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function o0(e,t,n,r,s){t=t||[],n=n||[],r&&(e=r(s,e));var o;for(o=0;o<t.length;o+=1)if(t[o]===e)return n[o];var c;if(aO.call(e)==="[object Array]"){for(t.push(e),c=new Array(e.length),n.push(c),o=0;o<e.length;o+=1)c[o]=o0(e[o],t,n,r,s);return t.pop(),n.pop(),c}if(e&&e.toJSON&&(e=e.toJSON()),Ec(e)==="object"&&e!==null){t.push(e),c={},n.push(c);var d=[],u;for(u in e)e.hasOwnProperty(u)&&d.push(u);for(d.sort(),o=0;o<d.length;o+=1)u=d[o],c[u]=o0(e[u],t,n,r,u);t.pop(),n.pop()}else c=e;return c}var l0=new ya;l0.tokenize=function(e){return e.slice()},l0.join=l0.removeEmpty=function(e){return e};function sO(e,t,n,r,s,o,c){c||(c={}),typeof c.context>"u"&&(c.context=4);var d=JE(n,r,c);d.push({value:"",lines:[]});function u(C){return C.map(function(E){return" "+E})}for(var h=[],f=0,m=0,p=[],y=1,b=1,N=function(E){var _=d[E],x=_.lines||_.value.replace(/\n$/,"").split(`
|
45
45
|
`);if(_.lines=x,_.added||_.removed){var O;if(!f){var T=d[E-1];f=y,m=b,T&&(p=c.context>0?u(T.lines.slice(-c.context)):[],f-=p.length,m-=p.length)}(O=p).push.apply(O,s0(x.map(function(L){return(_.added?"+":"-")+L}))),_.added?b+=x.length:y+=x.length}else{if(f)if(x.length<=c.context*2&&E<d.length-2){var $;($=p).push.apply($,s0(u(x)))}else{var D,R=Math.min(x.length,c.context);(D=p).push.apply(D,s0(u(x.slice(0,R))));var P={oldStart:f,oldLines:y-f+R,newStart:m,newLines:b-m+R,lines:p};if(E>=d.length-2&&x.length<=c.context){var I=/\n$/.test(n),A=/\n$/.test(r),k=x.length==0&&p.length>P.oldLines;!I&&k&&n.length>0&&p.splice(P.oldLines,0,"\"),(!I&&!k||!A)&&p.push("\")}h.push(P),f=0,m=0,p=[]}y+=x.length,b+=x.length}},w=0;w<d.length;w++)N(w);return{oldFileName:e,newFileName:t,oldHeader:s,newHeader:o,hunks:h}}function iO(e){var t=[];e.oldFileName==e.newFileName&&t.push("Index: "+e.oldFileName),t.push("==================================================================="),t.push("--- "+e.oldFileName+(typeof e.oldHeader>"u"?"":" "+e.oldHeader)),t.push("+++ "+e.newFileName+(typeof e.newHeader>"u"?"":" "+e.newHeader));for(var n=0;n<e.hunks.length;n++){var r=e.hunks[n];r.oldLines===0&&(r.oldStart-=1),r.newLines===0&&(r.newStart-=1),t.push("@@ -"+r.oldStart+","+r.oldLines+" +"+r.newStart+","+r.newLines+" @@"),t.push.apply(t,r.lines)}return t.join(`
|
46
46
|
`)+`
|
@@ -384,4 +384,4 @@ function print() { __p += __j.call(arguments, '') }
|
|
384
384
|
m 0 ${C?"":"-"}${w}
|
385
385
|
a ${w} ${w} 0 1 1 0 ${C?"-":""}${w*2}
|
386
386
|
a ${w} ${w} 0 1 1 0 ${C?"":"-"}${w*2}
|
387
|
-
`,R={d:D,stroke:m||"#f5f5f5","stroke-linecap":u,"stroke-width":y,"fill-opacity":"0",class:"process-circle-trail",style:T},P={d:D,stroke:d||"#13ce66","stroke-linecap":u,"stroke-width":o>0&&y||0,"fill-opacity":"0",class:`process-circle-path ${r(`${h}-circle-trail`)}`,style:$};return a.createVNode("div",{style:N,class:"progress-outer-circle"},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",R,null),a.createVNode("path",P,null)]),a.createVNode("span",{style:p,class:"progress-circle-text"},[n==null?void 0:n.default()])])},mF=(e,{attrs:t,slots:n})=>{const{resolveClassName:r}=xe(),{percent:s,strokeWidth:o,size:c,color:d,titleStyle:u,showText:h,textInside:f,theme:m}=t,p={height:`${o}px`,lineHeight:`${o}px`},y={width:`${s}%`,background:d,animationDuration:"3s"},b=(N=!0)=>(h||n.default)&&(N&&f||!N&&!f)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{style:p,class:`${r(`progress-${c||"normal"}`)} progress-bar`},[a.createVNode("div",{style:y,class:{"progress-inner":!0,[`${r(`${m}`)}`]:!0}},[a.createVNode("div",{style:u,class:"inner-text"},[b()])])]),b(!1)])};function Ig(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const gF={extCls:v.string,type:ey(),percent:v.number.def(0),theme:v.theme().def(yl.PRIMARY),size:v.size(),width:v.number.def(126),strokeWidth:v.number,strokeLinecap:Qv(),textInside:v.bool.def(!1),showText:v.bool.def(!0),color:v.string,bgColor:v.string,fixed:v.number.validate(e=>e>=0&&e<=20).def(0),format:v.func.def(e=>`${e}%`),titleStyle:v.object.def({fontSize:"16px",verticalAlign:"middle"})},ko=Je(a.defineComponent({name:"Progress",props:gF,setup(){const{resolveClassName:e}=xe();return{resolveClassName:e}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var d;const{showText:e,format:t,percent:n,textInside:r,titleStyle:s,fixed:o}=this.$props,c=t((d=this.validPercent(n))==null?void 0:d.toFixed(o));return(e||this.$slots.default)&&r?this.$slots.default?this.$slots.default():a.createVNode("span",null,[c]):!e||r?null:a.createVNode("span",{style:typeof c=="string"?s:void 0,class:"progress-text"},[this.$slots.default?this.$slots.default():c])}},render(){const e=this.renderProcessInfo(),t={...this.$props,percent:this.validPercent(this.percent)};let n=a.createVNode(mF,t,Ig(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(hF,t,Ig(e)?e:{default:()=>[e]}));const r={class:Ue({extCls:!!this.extCls},`${this.resolveClassName("progress")} ${this.resolveClassName(`progress-${this.type}`)}`)};return a.createVNode("div",r,[n])}})),Pg=Symbol("RadioGroup");function Mg(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const Rg=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,r=a.inject(Pg,I3),s=!P3(r),o=a.ref(!1),c=a.ref(!1),d=a.ref("default"),u=a.computed(()=>s&&r.props.disabled?!0:t.disabled);s?(d.value=r.props.size,a.watch(()=>r.props.modelValue,m=>{o.value=m===t.label},{immediate:!0})):a.watch(()=>t.modelValue,m=>{m!==""&&(o.value=m===t.label)},{immediate:!0});const h=(m=!0)=>{o.value=m},f=m=>{if(u.value||c.value)return;const p=m.target,y=p.checked;Promise.resolve(s?r.props.beforeChange(y):t.beforeChange(y)).then(b=>{if(b){o.value=p.checked;const N=o.value?t.label:"";return n("update:modelValue",N),n("change",N),s&&r.handleChange(e.proxy),a.nextTick(()=>{p.checked!==o.value&&(p.checked=o.value)}),Promise.resolve(!0)}return Promise.reject()}).catch(()=>{p.checked=o.value}).finally(()=>{c.value=!1})};return a.onMounted(()=>{s&&r.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&r.unregister(e.proxy)}),{size:d,isChecked:o,isDisabled:u,setChecked:h,handleChange:f}},pF={name:v.string.def(""),label:v.oneOfType([v.bool,v.string,v.number]).isRequired,modelValue:v.oneOfType([v.bool,v.string,v.number]).def(""),checked:v.bool.def(!1),disabled:v.bool.def(!1),beforeChange:Es().def(()=>!0)},vF=a.defineComponent({name:"Radio",props:pF,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=Mg(),{size:r,isChecked:s,isDisabled:o,setChecked:c,handleChange:d}=Rg(),{resolveClassName:u}=xe();return{size:r,isFocused:e,isChecked:s,isDisabled:o,setChecked:c,handleBlur:t,handleFocus:n,handleChange:d,resolveClassName:u}},render(){const e=Ue({[`${this.resolveClassName("radio")}`]:!0,[`${this.resolveClassName("radio")}-${this.size}`]:!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")}`,checked:this.isChecked,disabled:this.isDisabled,tabindex:"0",type:"radio",value:this.label,onBlur:this.handleBlur,onChange:this.handleChange,onFocus:this.handleFocus},null),t()])}}),yF={name:v.string.def(""),label:v.oneOfType([v.bool,v.string,v.number]).isRequired,modelValue:v.oneOfType([v.bool,v.string,v.number]).def(""),checked:v.bool.def(!1),disabled:v.bool.def(!1),size:v.size(),beforeChange:Es().def(()=>!0)},bF=a.defineComponent({name:"RadioButton",props:yF,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=Mg(),{size:r,isChecked:s,isDisabled:o,setChecked:c,handleChange:d}=Rg(),{resolveClassName:u}=xe();return{isFocused:e,size:r,isChecked:s,isDisabled:o,setChecked:c,handleBlur:t,handleFocus:n,handleChange:d,resolveClassName:u}},render(){const e=Ue({[`${this.resolveClassName("radio-button")}`]:!0,[`${this.resolveClassName("radio-button")}-${this.size}`]:!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")}`,checked:this.isChecked,disabled:this.isDisabled,tabindex:"0",type:"radio",value:this.label,onBlur:this.handleBlur,onChange:this.handleChange,onFocus:this.handleFocus},null),t()])}}),wF={name:v.string.def(""),modelValue:v.oneOfType([v.bool,v.string,v.number]),disabled:v.bool,withValidate:v.bool.def(!0),type:v.oneOf(["tab","capsule","card"]).def("tab"),size:v.size(),beforeChange:Es().def(()=>!0)},od=en(vF,{Group:a.defineComponent({name:"RadioGroup",props:wF,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(e,t){const n=Qn(),r=[],s=u=>{r.push(u)},o=u=>{const h=r.indexOf(u);h>-1&&r.splice(h,1)},c=u=>{const h=u.label;r.forEach(f=>{f!==u&&f.setChecked(!1)}),t.emit("update:modelValue",h),t.emit("change",h)};a.provide(Pg,{props:e,register:s,unregister:o,handleChange:c}),a.watch(()=>e.modelValue,()=>{var u;e.withValidate&&((u=n==null?void 0:n.validate)==null||u.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&r.forEach(u=>{u.setChecked(u.label===e.modelValue)})});const{resolveClassName:d}=xe();return{resolveClassName:d}},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:bF}),ld=a.defineComponent({name:"Star",props:{rate:v.number.def(0),width:v.number.def(16),height:v.number.def(16),editable:v.bool.def(!0),hoverRate:v.number.def(0),max:v.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=h=>{if(!e.editable)return;const f=h+1;t("chooseRate",f)},r=(h,f)=>{if(!e.editable)return;const m=h+1;t("changeHover",m),a.nextTick(()=>{f.target.classList.add(o("is-hover"))})},s=h=>{e.editable&&a.nextTick(()=>{h.target.classList.remove(o("is-hover"))})},{resolveClassName:o}=xe(),c=h=>Ue({[`${o("is-select")}`]:h<Math.floor(d.value),[`${o("is-edit")}`]:e.editable,[`${o("rate-star")}`]:!0}),d=a.computed(()=>e.hoverRate||e.rate),u={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:`${o("rate-stars")}`},[Array(e.max).fill(1).map((h,f)=>a.createVNode("svg",{style:u,class:c(f),viewBox:"0 0 64 64",x:"0px",y:"0px",onClick:()=>n(f),onMouseenter:m=>r(f,m),onMouseleave:m=>s(m)},[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)])])])])]))])}}),CF=a.defineComponent({name:"Rate",components:{star:ld},props:{modelValue:v.number.def(0),size:v.size(),editable:v.bool.def(!0),withValidate:v.bool.def(!0)},emits:["change","hover-change","update:modelValue"],setup(e,{emit:t}){const{resolveClassName:n}=xe(),r=Qn(),s=a.ref(0),o=p=>{e.editable&&(t("update:modelValue",p),t("change",p))},c=p=>{s.value=p,t("hover-change",p)},d=Ue({[`${n("rate")}`]:!0}),h={small:{width:12,height:12},large:{width:18,height:18},huge:{width:24,height:24}}[e.size]||{width:16,height:16},f=a.computed(()=>{const p=Math.floor(e.modelValue),y=(h.width+3)*p,b=h.width*(e.modelValue-p);return{width:`${y+b}px`}}),m={width:h.width,height:h.height};return a.watch(()=>e.modelValue,()=>{var p;e.withValidate&&((p=r==null?void 0:r.validate)==null||p.call(r,"change"))}),()=>a.createVNode("p",{class:d},[e.editable?a.createVNode(ld,a.mergeProps({"hover-rate":s.value,rate:e.modelValue,onChangeHover:c,onChooseRate:o,onMouseleave:()=>c(0)},m),null):[a.createVNode(ld,a.mergeProps({style:f.value,class:`${n("score-real")}`,editable:!1,rate:5},m),null),a.createVNode(ld,a.mergeProps({editable:!1,rate:0},m),null)]])}}),Fg=Je(CF),NF=a.defineComponent({name:"ResizeLayout",props:{placement:v.placement().def("left"),min:v.number.def(3),max:v.number.def(1/0),triggerWidth:v.number.def(5),triggerOffset:v.number.def(3),initialDivide:v.oneOfType([String,Number]).def("20%"),immediate:v.bool,disabled:v.bool,collapsible:v.bool,isCollapsed:v.bool.def(!1),autoMinimize:v.oneOfType([Boolean,Number]).def(!1),border:v.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:n,initialDivide:r,triggerOffset:s,triggerWidth:o,max:c,min:d,immediate:u,autoMinimize:h,collapsible:f,isCollapsed:m}=a.toRefs(e),p=a.ref(m.value),y=a.ref(!0),b=a.ref(!1),N=a.ref(null),w=a.ref({}),C=a.ref(null),E=a.ref(null),_=a.ref(null),x=a.ref(null),O=a.computed(()=>["left","right"].includes(n.value)),T=a.computed(()=>O.value?"width":"height"),$=a.computed(()=>{let U=r.value;return typeof U=="number"&&(U=U<=d.value?`${d.value}px`:`${U}px`),U}),D=a.computed(()=>f.value&&m.value?{[T.value]:"0px"}:{[T.value]:$.value}),R=a.computed(()=>({[`margin-${n.value}`]:`${s.value-o.value}px`,[T.value]:`${o.value}px`})),P=a.computed(()=>h.value?typeof h.value=="boolean"?50:h.value:0),I=()=>{const U=C.value.getBoundingClientRect();N.value=O.value?U.width:U.height};let A=new ResizeObserver(I);const k=()=>{switch(E.value.style.visibility="visible",n.value){case"left":E.value.style.inset=`0 auto auto ${w.value.aside.width}px`;break;case"right":E.value.style.inset=`0 ${w.value.aside.width}px auto auto`;break;case"top":E.value.style.inset=`${w.value.aside.height}px auto auto 0`;break;case"bottom":E.value.style.inset=`auto auto ${w.value.aside.height}px 0`;break}},L=()=>{_.value.style.display="block",_.value.style.cursor=O.value?"col-resize":"row-resize"},F=U=>Math.min(c.value,Math.max(d.value,U),N.value-o.value),Z=U=>{t("before-resize",U);const B=x.value.getBoundingClientRect();w.value=Object.freeze({mouse:{clientX:U.clientX,clientY:U.clientY},aside:{width:B.width,height:B.height}}),L(),u.value||k(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const Y=se=>{t("resizing",se)},Q=se=>{let we;switch(n.value){case"top":we=se.clientY-w.value.mouse.clientY;break;case"right":we=w.value.mouse.clientX-se.clientX;break;case"bottom":we=w.value.mouse.clientY-se.clientY;break;case"left":we=se.clientX-w.value.mouse.clientX}const ne=w.value.aside[T.value]+we,ye=F(ne)+s.value,le=`${ye}px`;u.value?x.value.style[T.value]=le:E.value.style[n.value]=le,Y(ye)},ue=()=>{if(E.value.style.visibility="hidden",_.value.style.display="none",document.removeEventListener("mousemove",Q),document.removeEventListener("mouseup",ue),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{ae(),t("after-resize",parseFloat(E.value.style[n.value]))}),u.value)return!1;x.value.style[T.value]=E.value.style[n.value]};document.addEventListener("mousemove",Q),document.addEventListener("mouseup",ue)},ae=()=>{if(!h.value)return!1;const U=x.value.getBoundingClientRect();if(b.value=p.value=U[T.value]<=P.value,!b.value)return y.value=!0,!1;fe(),a.nextTick(()=>{x.value.setAttribute(`data-${T.value}`,D.value[T.value])})},K=U=>{p.value=typeof U=="boolean"?U:!p.value,fe(),t("collapse-change",p.value)},fe=()=>{const U=x.value.getBoundingClientRect();ie(!p.value),p.value?(x.value.setAttribute(`data-${T.value}`,`${U[T.value]}px`),x.value.style[T.value]=e.collapsible?"0px":"5px"):(y.value=!0,x.value.style[T.value]=x.value.getAttribute(`data-${T.value}`)||$.value)},ie=U=>{const B=()=>{y.value=U,x.value.style.transition="",x.value.removeEventListener("transitionend",B)};x.value.addEventListener("transitionend",B),x.value.style.transition=`${T.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};a.watch(m,()=>{p.value=m.value,K(p.value)}),a.onMounted(()=>{A.observe(C.value)}),a.onBeforeUnmount(()=>{C.value&&(A.unobserve(C.value),A=null)});const{resolveClassName:X}=xe();return{collapsed:p,asideContentVisible:y,minimized:b,limitMax:N,state:w,vertical:O,cssPropKey:T,bkResizeLayoutRef:C,resizeProxyRef:E,resizeMaskRef:_,asideRef:x,triggerStyle:R,asideStyle:D,handleMousedown:Z,setCollapse:K,resolveClassName:X}},render(){var t,n,r,s,o,c;const e=[`${this.resolveClassName("resize-layout")}`,`${this.resolveClassName(`resize-layout-${this.placement}`)}`,{[`${this.resolveClassName("resize-layout-collapsed")}`]:this.collapsed,[`${this.resolveClassName("resize-layout-border")}`]:this.border,[`${this.resolveClassName("resize-layout-collapsible")}`]:this.collapsible}];return a.createVNode("div",{ref:"bkResizeLayoutRef",class:e},[a.createVNode("aside",{ref:"asideRef",style:this.asideStyle,class:`${this.resolveClassName("resize-layout-aside")}`},[a.withDirectives(a.createVNode("div",{class:`${this.resolveClassName("resize-layout-aside-content")}`},[(n=(t=this.$slots).aside)==null?void 0:n.call(t)]),[[a.vShow,this.asideContentVisible]]),a.withDirectives(a.createVNode("i",{style:this.triggerStyle,class:`${this.resolveClassName("resize-trigger")}`,onMousedown:a.withModifiers(this.handleMousedown,["left"])},null),[[a.vShow,!this.disabled&&(!this.collapsed||this.autoMinimize)]]),a.withDirectives(a.createVNode("i",{ref:"resizeProxyRef",class:[`${this.resolveClassName("resize-proxy")}`,this.placement]},null),[[a.vShow,!this.collapsed||this.autoMinimize]]),this.collapsible&&(((s=(r=this.$slots)["collapse-trigger"])==null?void 0:s.call(r))||(this.collapsed?a.createVNode(_n,{width:26,height:26,class:`${this.resolveClassName("resize-collapse")}`,onClick:this.setCollapse},null):a.createVNode(rr,{width:26,height:26,class:`${this.resolveClassName("resize-collapse")}`,onClick:this.setCollapse},null)))]),a.createVNode("main",{class:`${this.resolveClassName("resize-layout-main")}`},[(c=(o=this.$slots).main)==null?void 0:c.call(o)]),a.createVNode("div",{ref:"resizeMaskRef",class:`${this.resolveClassName("resize-mask")}`},null)])}}),Hg=Je(NF);var J0=null;function xF(e){return J0||(J0=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)}).bind(window)),J0(e)}var Z0=null;function _F(e){Z0||(Z0=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}).bind(window)),Z0(e)}function SF(e){var t=document.createElement("style");return t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),(document.querySelector("head")||document.body).appendChild(t),t}function cd(e,t){t===void 0&&(t={});var n=document.createElement(e);return Object.keys(t).forEach(function(r){n[r]=t[r]}),n}function Bg(e,t,n){var r=window.getComputedStyle(e,n||null)||{display:"none"};return r[t]}function Q0(e){if(!document.documentElement.contains(e))return{detached:!0,rendered:!1};for(var t=e;t!==document;){if(Bg(t,"display")==="none")return{detached:!1,rendered:!1};t=t.parentNode}return{detached:!1,rendered:!0}}var TF='.resize-triggers{visibility:hidden;opacity:0;pointer-events:none}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:"";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}',e2=0,dd=null;function EF(e,t){e.__resize_mutation_handler__||(e.__resize_mutation_handler__=AF.bind(e));var n=e.__resize_listeners__;if(!n){if(e.__resize_listeners__=[],window.ResizeObserver){var r=e.offsetWidth,s=e.offsetHeight,o=new ResizeObserver(function(){!e.__resize_observer_triggered__&&(e.__resize_observer_triggered__=!0,e.offsetWidth===r&&e.offsetHeight===s)||ud(e)}),c=Q0(e),d=c.detached,u=c.rendered;e.__resize_observer_triggered__=d===!1&&u===!1,e.__resize_observer__=o,o.observe(e)}else if(e.attachEvent&&e.addEventListener)e.__resize_legacy_resize_handler__=function(){ud(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(e2||(dd=SF(TF)),$F(e),e.__resize_rendered__=Q0(e).rendered,window.MutationObserver){var h=new MutationObserver(e.__resize_mutation_handler__);h.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),e.__resize_mutation_observer__=h}}e.__resize_listeners__.push(t),e2++}function OF(e,t){var n=e.__resize_listeners__;if(n){if(t&&n.splice(n.indexOf(t),1),!n.length||!t){if(e.detachEvent&&e.removeEventListener){e.detachEvent("onresize",e.__resize_legacy_resize_handler__),document.removeEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);return}e.__resize_observer__?(e.__resize_observer__.unobserve(e),e.__resize_observer__.disconnect(),e.__resize_observer__=null):(e.__resize_mutation_observer__&&(e.__resize_mutation_observer__.disconnect(),e.__resize_mutation_observer__=null),e.removeEventListener("scroll",t2),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}!--e2&&dd&&dd.parentNode.removeChild(dd)}}function LF(e){var t=e.__resize_last__,n=t.width,r=t.height,s=e.offsetWidth,o=e.offsetHeight;return s!==n||o!==r?{width:s,height:o}:null}function AF(){var e=Q0(this),t=e.rendered,n=e.detached;t!==this.__resize_rendered__&&(!n&&this.__resize_triggers__&&(n2(this),this.addEventListener("scroll",t2,!0)),this.__resize_rendered__=t,ud(this))}function t2(){var e=this;n2(this),this.__resize_raf__&&_F(this.__resize_raf__),this.__resize_raf__=xF(function(){var t=LF(e);t&&(e.__resize_last__=t,ud(e))})}function ud(e){!e||!e.__resize_listeners__||e.__resize_listeners__.forEach(function(t){t.call(e,e)})}function $F(e){var t=Bg(e,"position");(!t||t==="static")&&(e.style.position="relative"),e.__resize_old_position__=t,e.__resize_last__={};var n=cd("div",{className:"resize-triggers"}),r=cd("div",{className:"resize-expand-trigger"}),s=cd("div"),o=cd("div",{className:"resize-contract-trigger"});r.appendChild(s),n.appendChild(r),n.appendChild(o),e.appendChild(n),e.__resize_triggers__={triggers:n,expand:r,expandChild:s,contract:o},n2(e),e.addEventListener("scroll",t2,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}function n2(e){var t=e.__resize_triggers__,n=t.expand,r=t.expandChild,s=t.contract,o=s.scrollWidth,c=s.scrollHeight,d=n.offsetWidth,u=n.offsetHeight,h=n.scrollWidth,f=n.scrollHeight;s.scrollLeft=o,s.scrollTop=c,r.style.width=d+1+"px",r.style.height=u+1+"px",n.scrollLeft=h,n.scrollTop=f}var zn=(e=>(e.ALL="all",e.NEED_KEY="need-key",e))(zn||{});const zg=Symbol("SEARCH_SELECT_PROVIDER_KEY"),VF=e=>{a.provide(zg,e)},Ug=()=>a.inject(zg);var _a=(e=>(e.DEFAULT="default",e.EDIT="edit",e))(_a||{});const jg=/(\||,|、|\r\n|\n)/gm,Wg=/^(\||,|、|\r\n|\n)$/;var ri=(e=>(e.AND="&",e.OR="|",e))(ri||{});class ai{constructor(t,n="default"){Le(this,"id");Le(this,"name");Le(this,"values",[]);Le(this,"condition");Le(this,"logical");Le(this,"nameRenderKey",Bi(4));this.searchItem=t,this.type=n,this.id=t.id,this.name=t.name,this.logical=t.logical||"|",this.type=n}get multiple(){return!!this.searchItem.multiple}get placeholder(){return this.searchItem.placeholder||""}get children(){return this.searchItem.children||[]}get validate(){return!this.searchItem.noValidate}get inputInnerHtml(){var t;return this.isSpecialType()?this.name:`${this.keyInnerHtml}${((t=this.values)==null?void 0:t.map(n=>n.name).join(` ${this.logical} `))||""}`}get inputInnerText(){var t;return this.isSpecialType()?this.name:`${this.keyInnerText}${((t=this.values)==null?void 0:t.map(n=>n.name).join(` ${this.logical} `))||""}`}get keyInnerHtml(){return this.isSpecialType()?this.name:this.name?`${this.name}: `:""}get keyInnerText(){return this.isSpecialType()?this.name:this.name?`${this.name}: `:""}get showLogical(){return!!this.searchItem.showLogicalPanel}get isCustomMenu(){return this.searchItem.isCustomMenu}isSpecialType(){return["text","condition"].includes(this.type)}addValue(t){if(this.nameRenderKey=Bi(4),this.multiple){const n=this.values.findIndex(r=>r.id===t.id);if(n>-1){this.values.splice(n,1);return}this.values.push(t);return}this.values=[t]}str2Values(t){const n=t==null?void 0:t.split(this.logical).map(s=>s.trim()).filter(s=>s);if(!(n!=null&&n.length))return[];const r=s=>this.children.find(o=>o.name===s);if(!this.multiple){const s=n.join(` ${this.logical} `).trim(),o=r(s);return[{id:o?o.id:s,name:o?o.name:s,disabled:!!(o!=null&&o.disabled)}]}return n.map(s=>{const o=this.values.find(d=>d.name===s);if(o)return o;const c=r(s);return{id:c?c.id:s,name:c?c.name:s,disabled:!!(c!=null&&c.disabled)}})}addValues(t,n=!0){const r=t.split(jg).filter(d=>d.trim()&&!Wg.test(d)),s=n?this.values.map(d=>d.name):[],c=[...r,...s].filter(d=>d.trim()).join(this.logical);this.values=this.str2Values(c)}getValue(t){return this.values.find(n=>n.id===t)||this.values.find(n=>n.name===t)}toValue(){var n;const t={id:this.id,name:this.name};return(n=this.values)!=null&&n.length&&(t.values=this.values.map(r=>({id:r.id,name:r.name})),this.multiple&&this.logical!=="|"&&(t.logical=this.logical)),this.type&&this.type!=="default"&&(t.type=this.type),t}toValueKey(){return JSON.stringify(this.toValue())}isInValueList(t){return this.children.some(n=>n.id===(t==null?void 0:t.id))}}const DF=a.defineComponent({name:"SearchSelectMenu",props:{list:{type:Array},hoverId:String,keyword:{type:String,default:""},multiple:{type:Boolean,default:!1},selected:{type:Array,default:()=>[]},conditions:{type:Array},footerBtns:{type:Array,default:()=>[]},showLogical:{type:Boolean,default:!0},logical:{type:String,default:ri.OR}},emits:["selectItem","selectCondition","footerClick","update:logical"],setup(e,{emit:t}){const n=dt("searchSelect"),{resolveClassName:r}=xe(),s=a.computed(()=>e.footerBtns===void 0||e.footerBtns.length===0?[{id:"confirm",name:n.value.ok},{id:"cancel",name:n.value.cancel,disabled:!1}]:e.footerBtns);function o(y){t("selectItem",y)}function c(y){t("selectCondition",y)}function d(y){t("footerClick",y)}const u=a.computed(()=>{var y,b;return(y=e.list)!=null&&y.length?(b=e.keyword)!=null&&b.length?e.list.filter(N=>N.name.toLocaleLowerCase().includes(e.keyword.toLocaleLowerCase())):e.list:[]});function h(y){if(!y)return y;let{keyword:b}=e;const N=b.length;if(!(b!=null&&b.trim().length)||!y.toLocaleLowerCase().includes(b.toLocaleLowerCase()))return y;const w=[];let C=-1;return b=b.replace(/([.*/]{1})/gim,"\\$1"),y.replace(new RegExp(`${b}`,"igm"),(E,_)=>(w.length===0&&_!==0?w.push(y.slice(0,_)):C>=0&&w.push(y.slice(C+E.length,_)),w.push(a.createVNode("span",{class:"is-keyword"},[E])),C=_,E)),C>=0&&w.push(y.slice(C+N)),w.length?w:y}function f(y){var b;return(b=y.value)!=null&&b.name?[a.createVNode("span",{class:"menu-name"},[y.name,a.createTextVNode(":")]),y.value.name]:h(y.name)}function m(y,b){y.stopPropagation(),y.preventDefault(),o(b)}function p(y){t("update:logical",y)}return{handleClick:o,handleClickCondition:c,handleClickFooterBtn:d,handleSelectedChange:m,handleLogicalChange:p,filterList:u,getSearchNode:f,localFooterBtns:s,resolveClassName:r,t:n}},render(){var n,r;const e=a.createVNode("ul",{class:"menu-content"},[(n=this.list)==null?void 0:n.map(s=>a.createVNode("li",{id:s.id,key:s.id,class:`menu-item ${s.disabled?"is-disabled":""} ${this.hoverId===s.id&&!s.disabled?"is-hover":""}`,tabindex:"-1",onClick:()=>!s.disabled&&this.handleClick(s)},[a.createVNode(a.Fragment,null,[this.multiple&&a.createVNode("span",{onClick:o=>this.handleSelectedChange(o,s)},[a.createVNode(hn,{class:"is-selected",modelValue:this.selected.includes(s.id)},null)]),this.getSearchNode(s)])]))]),t=()=>!this.showLogical||!this.multiple?e:a.createVNode("div",{class:"menu-content-wrapper"},[e,a.createVNode("div",{class:"menu-condition"},[a.createVNode("div",{class:"menu-condition-title"},[this.t.logical]),a.createVNode(od,{label:"|",modelValue:this.logical,onChange:this.handleLogicalChange},{default:()=>[this.t.or,a.createTextVNode(" |")]}),a.createVNode(od,{label:"&",modelValue:this.logical,onChange:this.handleLogicalChange},{default:()=>[this.t.and,a.createTextVNode(" &")]})])]);return a.createVNode("div",{class:this.resolveClassName("search-select-menu")},[!!((r=this.conditions)!=null&&r.length)&&a.createVNode("ul",{class:"menu-header"},[this.conditions.map(s=>a.createVNode("li",{key:s.id,class:`menu-header-item ${s.disabled?"is-disabled":""}`,onClick:()=>!s.disabled&&this.handleClickCondition(s)},[s.name]))]),t()])}}),Gg=a.defineComponent({name:"SearchSelectInput",directives:{clickoutside:br},props:{data:{type:Array,required:!0},showInputBefore:Boolean,showCondition:Boolean,clickOutside:Function,placeholder:String,conditions:{type:Array,default:()=>[]},defaultUsingItem:Object,mode:{type:String,default:_a.DEFAULT},getMenuList:Function,validateValues:Function,valueBehavior:String},emits:["focus","add","delete","selectKey"],slots:Object,setup(e,{emit:t,expose:n}){const r=dt("searchSelect"),{resolveClassName:s}=xe(),o=a.ref(null),c=a.ref(null),d=a.ref(""),u=a.ref(!1),h=a.ref(!1),f=a.ref(!1),m=a.ref(e.defaultUsingItem),p=a.ref(""),y=a.ref(!1),b=Gi(100,B);let N=!1;const w=a.ref([]),C=a.ref([]),{editKey:E,onValidate:_,searchData:x}=Ug(),O=a.computed(()=>{var z;return((z=m.value)==null?void 0:z.logical)||ri.OR});a.watch(E,()=>{e.mode===_a.DEFAULT&&E.value&&(f.value=!1)}),a.watch([C,f],()=>{var he,pe;f.value&&((he=C.value)==null?void 0:he.some(q=>!q.disabled))?N||(p.value=e.valueBehavior===zn.NEED_KEY&&((pe=C.value.find(q=>!q.disabled))==null?void 0:pe.id)||"",N=!0,document.addEventListener("keydown",T)):(document.removeEventListener("keydown",T),N=!1,e.valueBehavior!==zn.NEED_KEY&&(p.value=""))});function T(z){switch(z.code){case"ArrowDown":case"ArrowUp":$(z);break;case"Enter":case"NumpadEnter":D(z);break}}function $(z){var q;z.preventDefault(),(q=o.value)==null||q.blur();const he=C.value.length;let pe=C.value.findIndex(G=>G.id===p.value);for(let G=0;G<he;G++){pe=(pe+(z.code==="ArrowDown"?1:-1)+he)%he;const ee=C.value[pe];if(ee&&!ee.disabled){const W=document.getElementById(ee.id);W==null||W.focus(),p.value=ee.id;break}}}function D(z){var pe;if(!N)return;z.preventDefault();const he=(pe=C.value)==null?void 0:pe.find(q=>q.id===p.value);he&&ae(he)}function R(z){var he,pe,q;if(!((he=c.value)!=null&&he.contains(z.target)||!((pe=e.clickOutside)!=null&&pe.call(e,z.target,c.value)))){if((q=m.value)!=null&&q.isCustomMenu){e.mode===_a.EDIT&&(F().then(G=>G&&ne()),f.value=!1);return}if(e.mode===_a.EDIT||m.value){m.value&&F().then(G=>G&&ne()),m.value||t("focus",!1);return}h.value=!1,f.value=!1,t("focus",h.value)}}let P=!1;function I(z){if(!P){if(u.value=!1,e.mode===_a.EDIT&&m.value&&!h.value){const he=Array.from(o.value.querySelectorAll(`[data-type="${m.value.values.length?"value":m.value.type}"]`));if(!he.length)return;z==null||z.preventDefault();const pe=document.createRange(),q=window.getSelection();pe.selectNodeContents(he.at(-1)),q==null||q.removeAllRanges(),P=!0,setTimeout(()=>{P=!1},200),q.addRange(pe),se(!0,!1);return}B(),se(!1,!h.value)}}function A(z){z.preventDefault();const he=z.clipboardData.getData("text").trim();if(!m.value){const pe=ye(he);if(pe){m.value=pe,se(!0,!0);return}d.value=he.split(jg).filter(q=>q.trim()&&!Wg.test(q)).join(` ${O.value} `),o.value.innerText=d.value,se(),b();return}m.value.addValues(he),b()}function k(z){const he=z.target.innerText.trim();if(!m.value){d.value=he,b();return}d.value=m.value.isSpecialType()?he:he.replace(m.value.name,"").replace(":","").trim(),b()}function L(z){var he;switch(z.code){case"Enter":case"NumpadEnter":if(e.valueBehavior===zn.NEED_KEY&&C.value.some(pe=>pe.id===p.value)){!m.value&&((he=d.value)!=null&&he.length)&&z.preventDefault();return}F(z).then(pe=>pe&&ne());break;case"Backspace":Z(z);default:u.value=!1;break}}async function F(z){var pe,q,G;return z==null||z.preventDefault(),await new Promise(ee=>setTimeout(ee,0)),m.value?d.value?await Q():!((pe=m.value)!=null&&pe.isSpecialType())&&((q=m.value)==null?void 0:q.values.length)<1?(u.value=!u.value,!1):(await U()&&((G=m.value)!=null&&G.isCustomMenu&&(f.value=!1),we()),!1):!d.value||e.valueBehavior===zn.NEED_KEY?void 0:await Y()}function Z(z){var he,pe,q;if(!m.value&&!d.value){p.value="",t("delete"),setTimeout(B,16);return}if((he=m.value)!=null&&he.values.length){if(m.value.type==="text"||!((pe=m.value.children)!=null&&pe.length))return;z.preventDefault();const G=window.getSelection();if((G==null?void 0:G.rangeCount)>0){let te=G.getRangeAt(0).startContainer;for(;te&&te.parentNode!==o.value;)te=te.parentNode;const be=((q=te==null?void 0:te.dataset)==null?void 0:q.index)||-1;m.value.values.splice(+be,1),d.value="",se(!1,!1);return}}else d.value||(m.value=null,d.value="",B());_("")}async function ae(z,he){var pe,q,G,ee,W;if((pe=z.value)!=null&&pe.id){const te=new ai({...z,id:z.realId??z.id},he);if(te.addValues(z.value.name,!1),e.valueBehavior===zn.NEED_KEY&&p.value){we(te),se(!0),p.value="";return}if(m.value=te,!await U(m.value.values)){m.value=null;return}we(m.value),se(!0),p.value="";return}if(!m.value||((q=m.value)==null?void 0:q.type)==="condition"){m.value=new ai(z,he??((G=m.value)==null?void 0:G.type)),d.value="";const te=((ee=m.value)==null?void 0:ee.type)==="condition";te||t("selectKey",{id:z.id,name:z.name,values:[]}),te&&we(),f.value=te||!!m.value.children.length,se(e.valueBehavior===zn.NEED_KEY&&!!p.value);return}m.value&&(m.value.addValue(z),a.nextTick(le)),await U(m.value.values)&&(m.value.multiple||we(),e.valueBehavior===zn.NEED_KEY&&((W=m.value)!=null&&W.multiple)&&se())}function K(z){ae(z,"condition")}function fe(z){var he;switch(z.id){case"confirm":if(!((he=m.value)!=null&&he.values.length))return;d.value="",F();break;case"cancel":m.value.values=[],f.value=!1;break}}function ie(z){m.value&&(m.value.logical=z)}async function X(z,he){if(typeof e.validateValues=="function"){let pe="";try{pe=await e.validateValues(z??null,he)}catch{pe=!1}if(typeof pe=="string"||pe===!1)return _(pe||"校验错误"),!1}return _(""),!0}async function U(z){if(!m.value)return await X(null,z);const{searchItem:he,validate:pe,values:q}=m.value;return pe&&typeof e.validateValues=="function"?await X(he,z??q):(_(""),!0)}async function B(){var he,pe,q,G,ee;let z=[];if(typeof e.getMenuList=="function"&&(!((he=e.data)!=null&&he.length)&&!m.value||m.value&&m.value.type!=="condition"&&(((pe=m.value.searchItem)==null?void 0:pe.async)===void 0||m.value.searchItem.async===!0))?(y.value=!0,z=await e.getMenuList((q=m.value)==null?void 0:q.searchItem,d.value).catch(()=>[]),y.value=!1):m!=null&&m.value?m.value.type==="condition"?z=e.conditions:(!((ee=m.value.values)!=null&&ee.length)||m.value.multiple||e.mode===_a.EDIT)&&(z=m.value.children.filter(W=>W.name.toLocaleLowerCase().includes(d.value.toLocaleLowerCase()))):(G=d.value)!=null&&G.length?e.data.filter(W=>!W.isSelected).forEach(W=>{var be,$e;if(W.name.toLocaleLowerCase().includes(d.value.toLocaleLowerCase())){z.push(W);const Ve=[];(be=W.children)==null||be.forEach(Re=>{Ve.push({...W,realId:W.id,id:Bi(10),value:Re})}),!Ve.length&&!W.onlyRecommendChildren&&Ve.push({...W,realId:W.id,id:Bi(10),value:{id:d.value,name:d.value}}),z.push(...Ve)}else{const Ve=[];($e=W.children)==null||$e.forEach(Re=>{Re.name.toLocaleLowerCase().includes(d.value.toLocaleLowerCase())&&Ve.push({...W,realId:W.id,id:Bi(10),value:Re})}),!Ve.length&&!W.onlyRecommendChildren&&Ve.push({...W,value:{id:d.value,name:d.value}}),z.push(...Ve)}}):z=e.data.filter(W=>!W.isSelected).slice(),C.value=z,e.valueBehavior===zn.NEED_KEY){const W=z.find(te=>!te.disabled);W&&(!p.value||p.value&&!z.some(te=>te.id===p.value))&&(p.value=W.id)}}async function Y(){const z=ye(d.value),he=(z==null?void 0:z.values)||[{id:d.value,name:d.value}];if(await U(he))return t("add",z||new ai({...he[0]},"text")),d.value="",B(),!0}async function Q(){let z=[];if(m.value.isSpecialType()){const pe=ye(d.value);pe&&(m.value=pe,z=pe.values)}if(z=z.length?z:m.value.str2Values(d.value),!!await U(z))return m.value.type==="text"?(m.value.name=d.value,m.value.id=d.value):m.value.values=z,t("add",m.value),d.value="",m.value=null,se(!0),!0}function ue(){if(!o.value)return;const z=document.createRange(),he=window.getSelection();z.selectNodeContents(o.value),z.collapse(!1),he.removeAllRanges(),he.addRange(z)}function se(z=!1,he=!0){z&&setTimeout(B,16),h.value=!0,f.value=!0,u.value=!1,!e.getMenuList&&he&&a.nextTick(ue),t("focus",h.value)}function we(z){var pe;t("add",z??m.value);const he=!((pe=m.value)!=null&&pe.isCustomMenu);m.value=null,d.value="",he&&(se(!0,he),a.nextTick(ne))}function ne(){o.value&&(d.value="",a.nextTick(()=>o.value.innerText=""))}function ye(z){const[he,pe]=z.split(":");if(he!=null&&he.trim()){const q=x.value.find(G=>G.name===he.trim());if(q){const G=new ai({...q},"default");return G.addValues(pe),G}}}function le(){var z;(z=d.value)!=null&&z.length&&(d.value="",Array.from(o.value.childNodes).forEach(pe=>{var q;pe.nodeType===Node.TEXT_NODE&&((q=pe.textContent)!=null&&q.trim())&&o.value.removeChild(pe)}))}function ge(){var z;(z=o.value)==null||z.focus()}async function j(){await F().then(z=>z&&ne()),f.value=!1,o.value.blur()}function ce(){d.value="",u.value=!1,f.value=!1,m.value=null,a.nextTick(ne)}function Ce(z){m.value.values=[{id:z,name:z}],F().then(he=>he&&ne())}function oe(){m.value||(p.value="")}return n({inputFocusForWrapper:ge,inputEnterForWrapper:j,inputClearForWrapper:ce,handleInputFocus:I,isFocus:h,refleshMenuHover:oe}),{popoverRef:c,inputRef:o,keyword:d,loading:y,remoteMenuList:w,menuList:C,menuHoverId:p,isFocus:h,usingItem:m,showPopover:f,showNoSelectValueError:u,debounceSetMenuList:b,documentArrowEvent:$,handleClickOutside:R,handleInputFocus:I,handleInputChange:k,handleInputPaste:A,handleLogicalChange:ie,handleInputKeyup:L,handleSelectItem:ae,handleSelectConditionItem:K,handleMenuFooterClick:fe,resolveClassName:s,inputFocusForWrapper:ge,inputEnterForWrapper:j,inputClearForWrapper:ce,deleteInputTextNode:le,customPanelSubmit:Ce,refleshMenuHover:oe,t:r}},render(){var f,m;const{multiple:e,values:t,placeholder:n,inputInnerHtml:r,isCustomMenu:s}=this.usingItem||{},o=!((f=this.keyword)!=null&&f.length)&&!(t!=null&&t.length)&&n,c=this.loading||this.showNoSelectValueError||this.showPopover&&(!!s||!!((m=this.menuList)!=null&&m.length)),d=!this.usingItem&&this.showCondition,u=()=>{var p,y,b,N;return a.withDirectives(a.createVNode("div",{ref:"inputRef",class:{"div-input":!0,"input-before":this.showInputBefore&&!((p=this.keyword)!=null&&p.length),"input-after":o},contenteditable:!0,"data-placeholder":!r&&!this.keyword?this.placeholder:"","data-tips":n||"",spellcheck:"false",onFocus:this.handleInputFocus,onInput:this.handleInputChange,onKeydown:this.handleInputKeyup,onPaste:this.handleInputPaste},[((y=this.usingItem)==null?void 0:y.name)&&(this.usingItem.isSpecialType()?a.createVNode("span",{key:this.usingItem.nameRenderKey,"data-key":this.usingItem.name,"data-type":this.usingItem.type},[this.usingItem.name]):a.createVNode("span",{key:this.usingItem.nameRenderKey,style:{color:"#979BA5"},contenteditable:!1,"data-key":this.usingItem.name,"data-type":this.usingItem.type,onMousedown:w=>w.preventDefault()},[this.usingItem.name,a.createTextVNode(": ")])),(N=(b=this.usingItem)==null?void 0:b.values)==null?void 0:N.map((w,C)=>a.createVNode("span",{key:C,"data-id":w.id,"data-index":C,"data-key":w.name,"data-type":"value"},[w.name,C<this.usingItem.values.length-1?` ${this.usingItem.logical} `:""]))]),[[a.resolveDirective("clickoutside"),this.handleClickOutside]])},h=()=>{var p,y,b,N,w;return this.loading?a.createVNode("div",null,[this.t.loading]):this.showNoSelectValueError?a.createVNode("div",null,[this.t.filterQueryMustHasValue]):(p=this.usingItem)!=null&&p.isCustomMenu&&this.$slots.menu?a.createVNode("div",{ref:"popoverRef",class:this.resolveClassName("search-select-popover")},[this.$slots.menu({value:(y=this.usingItem.values)==null?void 0:y[0],id:this.usingItem.id,name:this.usingItem.name,onSubmit:this.customPanelSubmit})]):(b=this.menuList)!=null&&b.length?a.createVNode("div",{ref:"popoverRef",class:this.resolveClassName("search-select-popover")},[a.createVNode(DF,{conditions:d?this.conditions:[],hoverId:this.menuHoverId,keyword:this.keyword,list:this.menuList,logical:(N=this.usingItem)==null?void 0:N.logical,multiple:!!e,selected:(t==null?void 0:t.map(C=>C.id))||[],showLogical:(w=this.usingItem)==null?void 0:w.showLogical,onFooterClick:this.handleMenuFooterClick,onSelectCondition:this.handleSelectConditionItem,onSelectItem:this.handleSelectItem,"onUpdate:logical":this.handleLogicalChange},null)]):void 0};return a.createVNode(Tn,{arrow:!1,disableOutsideClick:!0,isShow:c,placement:"bottom-start",theme:"light",trigger:"manual"},{default:u,content:h})}}),kF=a.defineComponent({name:"SearchSelected",props:{data:{type:Array,required:!0},selectedList:{type:Array,required:!0},overflowIndex:{type:Number,default:-1},conditions:{type:Array,default:()=>[]},getMenuList:Function,validateValues:Function,valueBehavior:String},emits:["delete","selectKey"],setup(e,{emit:t}){const n=a.ref(null),r=a.ref(null),{onEditClick:s,onEditEnter:o,onEditBlur:c,editKey:d}=Ug();function u(b){t("delete",b)}function h(b,N,w){b.preventDefault(),b.stopPropagation(),s(N,w),t("selectKey",{id:N.id,name:N.name,values:N.values.slice()}),setTimeout(()=>n.value.handleInputFocus(),200)}function f(b,N){o(b,N)}function m(b){b||c()}function p(b){var N;return!((N=r.value)!=null&&N.contains(b))}function y(b){const N=new ai(b.searchItem,b.type);return N.values=b.values.slice(),N.logical=b.logical||ri.OR,N}return{inputRef:n,selectedInputRef:r,editKey:d,copySelectedItem:y,handleDeleteSelected:u,handleEditSelected:h,handleInputOutside:p,handleAddSelected:f,handleInputFocus:m}},render(){const e=(t,n)=>this.editKey===`${t.id}_${n}`?a.createVNode("div",{key:this.editKey.toString(),ref:"selectedInputRef",class:"selected-input"},[a.createVNode(Gg,{key:this.editKey.toString(),ref:"inputRef",clickOutside:this.handleInputOutside,conditions:this.conditions,data:this.data,defaultUsingItem:this.copySelectedItem(t),getMenuList:this.getMenuList,mode:_a.EDIT,showCondition:!1,validateValues:this.validateValues,valueBehavior:this.valueBehavior,onAdd:r=>this.handleAddSelected(r,n),onFocus:this.handleInputFocus},{...this.$slots})]):a.createVNode("li",{key:`${t.id}_${n}`,class:`search-container-selected ${(this.overflowIndex>=0?n<this.overflowIndex:n>=0)?"":"hidden-selected"}`},[a.createVNode("span",{class:"selected-name",onClick:r=>this.handleEditSelected(r,t,n)},[t.inputInnerText]),a.createVNode(tn,{class:"selected-clear",onClick:()=>this.handleDeleteSelected(n)},null)]);return a.createVNode(a.Fragment,null,[this.selectedList.map((t,n)=>[this.overflowIndex>=0&&n===this.overflowIndex&&a.createVNode("div",{class:"search-container-selected overflow-selected"},[a.createTextVNode("+"),this.selectedList.length-this.overflowIndex]),e(t,n)])])}}),r2=40,Kg=6,Yg=26,IF={data:{type:Array,default:()=>[]},modelValue:{type:Array,default:()=>[]},maxHeight:{type:Number,default:120},conditions:{type:Array,default:()=>[]},clearable:{type:Boolean,default:!0},placeholder:String,getMenuList:Function,validateValues:Function,uniqueSelect:{type:Boolean,default:!1},valueBehavior:{type:String,default:zn.ALL,validator(e){return[zn.ALL,zn.NEED_KEY].includes(e)}}},Xg=Je(a.defineComponent({name:"SearchSelect",directives:{clickoutside:br},props:IF,emits:["update:modelValue","search","selectKey"],slots:Object,setup(e,{emit:t}){const n=dt("searchSelect"),{resolveClassName:r}=xe(),s=a.computed(()=>e.conditions===void 0?[{id:"or",name:n.value.or},{id:"and",name:n.value.and}]:e.conditions),o=a.ref(null),c=a.ref(null),d=a.ref(!1),u=a.ref([]),h=a.ref(-1),f=Gi(32,E),m=a.ref(""),p=a.ref(""),y=a.shallowRef([]);a.watch(()=>e.data,()=>{var I;y.value=JSON.parse(JSON.stringify(e.data)),(I=y.value)==null||I.forEach(A=>{A.isSelected=e.uniqueSelect&&!!e.modelValue.some(k=>k.id===A.id)})},{immediate:!0}),a.watch(()=>e.modelValue,I=>{var k;if(!(I!=null&&I.length)){u.value=[],(k=y.value)==null||k.forEach(L=>{L.isSelected=!1});return}const A=[];I.forEach(L=>{var Z;const F=u.value.find(ae=>ae.id===L.id&&ae.name===L.name);if((F==null?void 0:F.toValueKey())===JSON.stringify(L))F.values=L.values||[],F.logical=L.logical||ri.OR,A.push(F);else{let ae=e.data.find(ie=>ie.id===L.id),K="default";ae||(ae=e.conditions.find(ie=>ie.id===L.id),ae&&(K="condition")),!ae&&!((Z=L.values)!=null&&Z.length)&&(K="text");const fe=new ai(ae||L,K);fe.values=L.values||[],fe.logical=L.logical||ri.OR,A.push(fe)}}),u.value=A,y.value=JSON.parse(JSON.stringify(e.data||[])),y.value.forEach(L=>{L.isSelected=e.uniqueSelect&&!!A.some(F=>F.id===L.id)})},{immediate:!0,deep:!0}),a.onMounted(()=>{EF(c.value.querySelector(`.${r("search-select-container")}`),f)}),a.onBeforeUnmount(()=>{OF(c.value.querySelector(`.${r("search-select-container")}`),f)}),VF({onEditClick:b,onEditEnter:N,onEditBlur:w,onValidate:C,editKey:m,searchData:a.computed(()=>e.data),isClickOutside:O});function b(I,A){m.value=`${I.id}_${A}`}function N(I,A){const k=u.value.slice();k.splice(A,1,I),t("update:modelValue",k.map(L=>L.toValue())),m.value=""}function w(){m.value="",C("")}function C(I){p.value=I||""}function E(){if(d.value||u.value.length<1){h.value=-1;return}const I=c.value.querySelector(`.${r("search-select-container")}`),A=c.value.querySelector(".search-container").clientWidth-Kg-2,k=I.querySelectorAll(".search-container-selected:not(.overflow-selected)");let L=0,F=0,Z=0;for(;F===0&&L<=A-r2&&Z<=k.length-1;){const ae=k[Z];if(ae.clientHeight>Yg){h.value=Z;return}L+=ae?ae.clientWidth+Kg:0,L>=A-r2&&(F=Z),Z+=1}if(F===k.length-1&&L<=A){h.value=-1;return}h.value=L>=A-r2?F:F-1}function _(){m.value||o.value.inputFocusForWrapper()}function x(){u.value=[],h.value=-1,o.value.inputClearForWrapper(),t("update:modelValue",[])}function O(I){var A;return!((A=c.value)!=null&&A.contains(I))}function T(I){const A=u.value.slice();A.push(I),C(""),t("update:modelValue",A.map(k=>k.toValue()))}function $(I){const A=u.value.slice();A.splice(typeof I=="number"?I:u.value.length-1,1),C(""),o.value.refleshMenuHover(),t("update:modelValue",A.map(k=>k.toValue()))}function D(I){var A;I&&(h.value=-1),I===!1&&((A=c.value.querySelector(`.${r("search-select-container")}`))==null||A.scrollTo(0,0)),d.value=I}function R(I){o.value.inputEnterForWrapper(),t("search",I)}function P(I){t("selectKey",I)}return{inputRef:o,wrapRef:c,isFocus:d,copyData:y,selectedList:u,overflowIndex:h,validateStr:p,onEditClick:b,onEditEnter:N,handleWrapClick:_,handleInputFocus:D,handleResize:E,handleClearAll:x,handleInputOutside:O,handleAddSelected:T,handleDeleteSelected:$,handleClickSearch:R,localConditions:s,resolveClassName:r,handleSelectedKey:P,t:n}},render(){var r,s;const e=`${this.isFocus?this.maxHeight:Yg}px`,t=!!this.selectedList.length&&this.selectedList.slice(-1)[0].type!=="condition",n=Object.assign({},this.$slots.menu?{menu:o=>{var c,d;return(d=(c=this.$slots).menu)==null?void 0:d.call(c,o)}}:{});return a.createVNode("div",{ref:"wrapRef",class:this.resolveClassName("search-select")},[a.createVNode("div",{class:{[this.resolveClassName("search-select-container")]:!0,"is-focus":this.isFocus},onClick:this.handleWrapClick},[a.createVNode("div",{class:"search-prefix"},[(s=(r=this.$slots).prepend)==null?void 0:s.call(r)]),a.createVNode("div",{style:{maxHeight:e},class:"search-container"},[a.createVNode(kF,{conditions:this.localConditions,data:this.copyData,getMenuList:this.getMenuList,overflowIndex:this.overflowIndex,selectedList:this.selectedList,validateValues:this.validateValues,valueBehavior:this.valueBehavior,onDelete:this.handleDeleteSelected,onSelectKey:this.handleSelectedKey},{...n}),a.createVNode("div",{class:"search-container-input"},[a.createVNode(Gg,{ref:"inputRef",clickOutside:this.handleInputOutside,conditions:this.localConditions,data:this.copyData,getMenuList:this.getMenuList,placeholder:this.placeholder||this.t.pleaseSelect,showCondition:t,showInputBefore:!this.selectedList.length,validateValues:this.validateValues,valueBehavior:this.valueBehavior,onAdd:this.handleAddSelected,onDelete:this.handleDeleteSelected,onFocus:this.handleInputFocus,onSelectKey:this.handleSelectedKey},{...n})])]),a.createVNode("div",{class:"search-nextfix"},[this.clearable&&!!this.selectedList.length&&a.createVNode(un,{class:"search-clear",onClick:this.handleClearAll},null),this.$slots.append?this.$slots.append():a.createVNode(Wa,{class:`search-nextfix-icon ${this.isFocus?"is-focus":""}`,onClick:this.handleClickSearch},null)])]),!!this.validateStr.length&&a.createVNode("div",{class:this.resolveClassName("search-select-tips")},[this.$slots.validate?this.$slots.validate():a.createVNode(a.Fragment,null,[a.createVNode(ao,{class:"select-tips"},null),this.validateStr||""])])])}}));function PF(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const qg=gm(Wc);qg.width.default="400";const MF=a.defineComponent({name:"Sideslider",inheritAttrs:!1,props:{...qg,title:v.string.def(""),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,{emit:t}){const n=a.useAttrs(),r=a.useSlots(),s=a.getCurrentInstance(),{resolveClassName:o}=xe(),c=async()=>{let h=!0;typeof e.beforeClose=="function"&&(h=await e.beforeClose()),h&&(t("update:isShow",!1),t("closed"),t("animation-end"))},d=()=>{t("shown")},u=()=>{t("hidden")};return()=>{const h={header:()=>{var m;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:`${o("sideslider-header")}`},[a.createVNode("div",{class:`${o("sideslider-close")}`,onClick:c},[e.direction==="left"?a.createVNode(rr,null,null):a.createVNode(_n,null,null)]),a.createVNode("div",{class:`${o("sideslider-title")}`},[((m=r.header)==null?void 0:m.call(r))??e.title])])])},default:()=>{var m;return a.createVNode("div",{class:`${o("sideslider-content")}`},[(m=r.default)==null?void 0:m.call(r)])}};r.footer&&Object.assign(h,{footer:()=>a.createVNode("div",{class:`${o("sideslider-footer")}`},[r.footer()])});const f={...n};return s.vnode.scopeId&&(f[s.vnode.scopeId]=""),a.createVNode(Lo,a.mergeProps(f,{width:e.width,class:{[o("sideslider")]:!0,[`is-position-${e.direction}`]:e.direction},extCls:e.extCls,animateType:e.direction,backgroundColor:e.backgroundColor,closeIcon:!1,escClose:e.escClose,isShow:e.isShow,quickClose:e.quickClose,renderDirective:e.renderDirective,showMask:e.showMask,transfer:e.transfer,zIndex:e.zIndex,onClose:c,onHidden:u,onShown:d}),PF(h)?h:{default:()=>[h]})}}}),Jg=Je(MF),Zg=a.defineComponent({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:()=>({})}},emits:["emitChange","resetSize","update:modelValue"],setup(e,{emit:t}){const n=a.ref(!1),r=a.ref(!1),s=a.ref(0),o=a.ref(0),c=a.ref(0),d=a.ref(null),u=a.ref(e.modelValue),h=a.ref(0),f=a.ref(0),m=a.ref(!1),p=a.ref(null),y=a.computed(()=>{var P,I;let D="";if((P=e.params.customContent)!=null&&P[e.modelValue]){const A=e.params.customContent[e.modelValue];D=A.tip||A.label||""}const R=e.params.vertical?Wi.RIGHT:Wi.TOP;return(I=e.params)!=null&&I.showTip?{content:e.params.formatterTipLabel(`${D||(e==null?void 0:e.modelValue)||"0"}`),placement:R}:{content:"",placement:R}}),b=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),N=a.computed(()=>e.params.vertical?{bottom:b.value}:{left:b.value}),w=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),C=D=>{e.params.disable||(D.preventDefault(),E(D),Io(window,"mousemove",_),Io(window,"touchmove",_),Io(window,"mouseup",x),Io(window,"touchend",x))},E=D=>{n.value=!0,r.value=!0,e.params.vertical?s.value=D.clientY:o.value=D.clientX,c.value=parseFloat(b.value),d.value=c.value},_=D=>{if(n.value){r.value=!1,t("resetSize");let R=0;e.params.vertical?(h.value=D.clientY,R=(s.value-h.value)/e.params.sliderSize*100):(f.value=D.clientX,R=(f.value-o.value)/e.params.sliderSize*100),d.value=c.value+R,O(d.value)}},x=()=>{m.value=!1,n.value&&(setTimeout(()=>{n.value=!1,r.value||(O(d.value),t("emitChange"))},0),fd(window,"mousemove",_),fd(window,"touchmove",_),fd(window,"mouseup",x),fd(window,"touchend",x))},O=D=>{if(D===null||isNaN(D))return;D<0?d.value=0:D>100&&(d.value=100);const R=100/((e.params.maxValue-e.params.minValue)/e.params.step);let I=Math.round(D/R)*R*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;I=parseFloat(I.toFixed(e.params.precision)),t("update:modelValue",I),!n.value&&e.modelValue!==u.value&&(u.value=e.modelValue)},{resolveClassName:T}=xe();return{renderDom:()=>a.createVNode("div",{ref:p,style:N.value,class:[`${T("slider-button")}`,e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],tabindex:"0",onClick:D=>D.stopPropagation(),onMousedown:C},[y.value.content?a.createVNode(a.Fragment,null,[a.createVNode(Tn,{boundary:document.body,content:y.value.content,placement:y.value.placement,theme:"dark"},{default:()=>[a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]})]):a.createVNode(a.Fragment,null,[a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]),e.params.showButtonLabel&&!e.params.showIntervalLabel?a.createVNode(a.Fragment,null,[a.createVNode("div",{class:["slider-button-label",e.params.vertical?"vertical":"horizontal"]},[w.value])]):null]),setPosition:O,tip:y}},render(){return this.renderDom()}}),Io=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},fd=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)},RF=a.defineComponent({name:"Slider",props:{modelValue:v.oneOfType([v.arrayOf(v.number),v.number]),extCls:{type:String,default:""},vertical:{type:Boolean,default:!1},height:{type:String,default:"200px"},disable:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},maxValue:{type:[Number],default:100},minValue:{type:[Number],default:0},step:{type:[Number],default:1},range:{type:Boolean,default:!1},showInterval:{type:Boolean,default:!1},showIntervalLabel:{type:Boolean,default:!1},showButtonLabel:{type:Boolean,default:!1},showBetweenLabel:{type:Boolean,default:!1},showInput:{type:Boolean,default:!1},customContent:{type:Object,default:null},formatterLabel:{type:Function,default:e=>e},formatterButtonLabel:{type:Function,default:e=>e},formatterTipLabel:{type:Function,default:e=>e},labelClick:{type:[Boolean,Function],default:!1}},emits:["update:modelValue","change"],setup(e,{slots:t,emit:n}){const r=a.ref(1),s=a.ref(null),o=a.ref(null),c=a.ref(null),d=a.ref(0),u=a.ref(0),h=a.ref(null),f=a.ref(null),m=a.ref(null),p=a.ref(null),y=a.computed(()=>{const U=[e.minValue,e.maxValue,e.step].map(B=>{const Y=`${B}`.split(".")[1];return Y?Y.length:0});return Math.max.apply(null,U)}),b=a.computed(()=>Math.min(s.value,o.value)),N=a.computed(()=>Math.max(s.value,o.value)),w=a.computed(()=>e.range?`${100*(N.value-b.value)/(e.maxValue-e.minValue)}%`:`${100*(s.value-e.minValue)/(e.maxValue-e.minValue)}%`),C=a.computed(()=>e.range?`${100*(b.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),E=a.computed(()=>e.vertical?{height:w.value,bottom:C.value}:{width:w.value,left:C.value}),_=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const U=(e.maxValue-e.minValue)/e.step,B=100*e.step/(e.maxValue-e.minValue),Y=[];for(let Q=1;Q<U;Q++)Y.push(Q*B);return e.range?Y.filter(Q=>Q<100*(b.value-e.minValue)/(e.maxValue-e.minValue)||Q>100*(N.value-e.minValue)/(e.maxValue-e.minValue)):Y.filter(Q=>Q>100*(s.value-e.minValue)/(e.maxValue-e.minValue))}),x=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),O=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const U=100*e.step/(e.maxValue-e.minValue),B=[];for(let Y=e.minValue,Q=0;Y<=e.maxValue;Y+=e.step,Q++){const ue={stepWidth:Q*U,stepLabel:e.formatterLabel(Y)};B.push(ue)}return B}),T=a.computed(()=>Array.isArray(e.modelValue)),$=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((U,B)=>Number(U)-Number(B)).filter(U=>Number(U)>=e.minValue&&Number(U)<=e.maxValue).map(U=>{const{tip:B}=e.customContent[U],{label:Y}=e.customContent[U];return{tip:B||Y||"",label:Y||"",percent:(Number(U)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),D=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:y.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:r.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{A()}),a.watch(()=>s.value,U=>{e.range?n("update:modelValue",[b.value,N.value]):n("update:modelValue",U),d.value=U}),a.watch(()=>o.value,U=>{n("update:modelValue",[b.value,N.value]),u.value=U}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(s.value=Math.max(e.minValue,Number(e.modelValue[0])),o.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(s.value=e.minValue,o.value=e.maxValue),c.value=[s.value,o.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?s.value=e.minValue:s.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),c.value=s.value),R(),Io(window,"resize",R())});const R=()=>{h.value&&(r.value=h.value[`client${e.vertical?"Height":"Width"}`])},P=U=>{var B,Y;if(U.stopPropagation(),!e.disable){if(R(),e.vertical){const Q=(B=h.value)==null?void 0:B.getBoundingClientRect().bottom;F((Q-U.clientY)/r.value*100)}else{const Q=(Y=h.value)==null?void 0:Y.getBoundingClientRect().left;F((U.clientX-Q)/r.value*100)}k()}},I=()=>e.range?![b.value,N.value].every((U,B)=>U===c.value[B]):e.modelValue!==c.value,A=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const U=e.modelValue;e.range&&Array.isArray(U)?U[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):U[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):U[0]<e.minValue?n("update:modelValue",[e.minValue,U[1]]):U[1]>e.maxValue?n("update:modelValue",[U[0],e.maxValue]):(s.value=Number(U[0]),o.value=Number(U[1]),I()&&(c.value=U.slice())):!e.range&&typeof U=="number"&&!isNaN(U)&&(U<e.minValue?n("update:modelValue",e.minValue):U>e.maxValue?n("update:modelValue",e.maxValue):(s.value=U,I()&&(c.value=U)))},k=async()=>{await a.nextTick(),n("change",e.range?[b.value,N.value]:e.modelValue)},L=U=>e.vertical?{bottom:`${U}%`}:{left:`${U}%`},F=U=>{if(!e.range){f.value.setPosition(U);return}const B=e.minValue+U*(e.maxValue-e.minValue)/100;Math.abs(b.value-B)<Math.abs(N.value-B)?p.value=s.value<o.value?f.value:m.value:p.value=s.value>o.value?f.value:m.value,p.value.setPosition(U)},Z=U=>{if(U==="")return;const B=parseFloat(U);B<e.minValue?(d.value=e.minValue,s.value=e.minValue):B>e.maxValue?(d.value=e.maxValue,s.value=e.maxValue):s.value=B},ae=U=>{if(U==="")return;const B=parseFloat(U.toString());B<e.minValue?(u.value=e.minValue,o.value=e.minValue):B>e.maxValue?(u.value=e.maxValue,o.value=e.maxValue):o.value=B},K=U=>{let B=0;return U==="start"?B=e.vertical?e.maxValue:e.minValue:B=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[s.value,o.value].includes(B)?"0":"1"},{resolveClassName:fe}=xe(),ie=(U,B)=>{let Y=B.stepWidth??B.percent??B;if(e.labelClick){U.stopPropagation(),U.stopImmediatePropagation(),U.preventDefault();let Q;if(typeof e.labelClick=="function"){const ue={percent:Y,step:B};if(Q=e.labelClick(U,ue),Q===!1)return}Y=typeof Q=="number"?Q:Y,console.log("handleStepLabelClick",Y),F(Y);return}};return{renderDom:()=>{var U,B;return a.createVNode("div",{class:[`${fe("slider")}`,e.extCls]},[(U=t.start)==null?void 0:U.call(t),a.createVNode("div",{ref:h,style:x.value,class:`${fe("slider-runway")}`,onClick:P},[a.createVNode("div",{style:E.value,class:[`${fe("slider-bar")}`,e.vertical?"vertical":"horizontal",{disable:e.disable}]},null),e.showInterval?_.value.map((Y,Q)=>Q===0||Q===_.value.length-1?null:a.createVNode("div",{key:Q,style:L(Y),class:[`${fe("slider-interval")}`,{vertical:e.vertical}],onClick:ue=>ie(ue,Y)},null)):null,e.customContent?$.value.map((Y,Q)=>Q===0||Q===$.value.length-1?null:a.createVNode("div",{key:Q,style:L(Y.percent),class:[`${fe("slider-interval")}`,{vertical:e.vertical}],onClick:ue=>ie(ue,Y)},null)):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?a.createVNode("div",{class:[`${fe("slider-labels")}`,e.vertical?"vertical":"horizontal"]},[function(){if(e.showBetweenLabel)return[a.createVNode("div",{style:[{opacity:K("start")}],class:"label-start"},[e.formatterLabel(e.minValue)]),a.createVNode("div",{style:[{opacity:K("end")}],class:"label-end"},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return O.value.map((Y,Q)=>a.createVNode("div",{key:Q,style:L(Y.stepWidth),class:[`${fe("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:ue=>ie(ue,Y)},[Y.stepLabel]));if(e.customContent)return $.value.map((Y,Q)=>a.createVNode("div",{key:Q,style:L(Y.percent),class:[`${fe("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:ue=>ie(ue,Y)},[Y.label]))}()]):void 0,a.createVNode(Zg,{ref:f,modelValue:s.value,"onUpdate:modelValue":Y=>s.value=Y,params:D.value,onEmitChange:k,onResetSize:R},null),e.range?a.createVNode(Zg,{ref:m,modelValue:o.value,"onUpdate:modelValue":Y=>o.value=Y,params:D.value,onEmitChange:k,onResetSize:R},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:`${fe("slider-input")}`},[a.createVNode("div",{class:"input-item"},[a.createVNode(va,{max:e.maxValue,min:e.minValue,modelValue:d.value,type:"number",onChange:Z},null)]),T.value&&o.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("~")]),a.createVNode("div",{class:"input-item"},[a.createVNode(va,{max:e.maxValue,min:e.minValue,modelValue:u.value,type:"number",onChange:ae},null)])]:void 0]):void 0,(B=t.end)==null?void 0:B.call(t)])}}},render(){return this.renderDom()}}),Qg=Je(RF);var ep=function(e){return e.ERROR="error",e.LOADING="loading",e.UNKNOWN="",e}(ep||{});const tp={theme:v.theme().def(yl.PRIMARY),size:v.size(),curStep:v.number.def(1),controllable:v.bool.def(!1),direction:A3(),status:Pe("status",{}).def(ep.UNKNOWN),lineType:$3(),extCls:v.string,steps:v.array.def([]),beforeChange:v.func},np=Je(a.defineComponent({name:"Steps",props:tp,emits:["update:curStep","click"],setup(e,{emit:t}){const n=dt("steps"),r=dt("lang"),s=a.ref([]),o=f=>{const m=[];f.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=f=>{tp.curStep=f},d=()=>{var f;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}),(f=e.steps)!=null&&f.length&&o(e.steps)};a.watch(()=>r.value,()=>{d()});const u=async f=>{try{e.controllable&&f!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(m,p)=>{const y=await e.beforeChange(f);y?m(y):p(y)}),t("update:curStep",f),t("click",f))}catch(m){console.warn(m)}};a.onMounted(d),a.watch(()=>e.steps,()=>{o(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{c(e.curStep)},{deep:!0});const{resolveClassName:h}=xe();return{defaultSteps:s,jumpTo:u,resolveClassName:h}},render(){const e=this.resolveClassName("steps"),t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",r=Ue({[`${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"},d=(m,p)=>(p.icon||(p.icon=m),!isNaN(p.icon)),u=m=>m.status==="loading",h=m=>m.status==="error",f=(m,p)=>o(m)&&this.status==="loading"||u(p)?a.createVNode(Qi,{class:`${this.resolveClassName("icon")} ${this.resolveClassName("steps-icon")} icon-loading`},null):o(m)&&this.status==="error"||h(p)?a.createVNode(tn,{class:`${this.resolveClassName("steps-icon")}`},null):s(m)?a.createVNode(ja,{class:`${this.resolveClassName("steps-icon")}`},null):a.createVNode("span",null,[d(m,p)?m+1:a.createVNode(p.icon,null,null)]);return a.createVNode("div",{class:r},[this.defaultSteps.map((m,p)=>{var y,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"?"is-error":"",m.status&&o(p)?[`${this.resolveClassName(`step-${m.status}`)}`]:""]},[a.createVNode("span",{style:{cursor:this.controllable?"pointer":""},class:[`${this.resolveClassName("step-indicator")}`,`${this.resolveClassName(`step-${c(m)?"icon":"number"}`)}`,`${this.resolveClassName(`step-icon${m.status}`)}`],onClick:()=>{this.jumpTo(p+1)}},[((b=(y=this.$slots)[p+1])==null?void 0:b.call(y))??f(p,m)]),m.title?a.createVNode("div",{class:`${this.resolveClassName("step-content")}`},[a.createVNode("div",{style:{cursor:this.controllable?"pointer":""},class:`${this.resolveClassName("step-title")}`,onClick:()=>{this.jumpTo(p+1)}},[m.title]),m.description&&a.createVNode("div",{class:`${this.resolveClassName("step-description")}`,title:m.description},[m.description])]):""])})])}})),FF=a.defineComponent({name:"Swiper",props:{isLoop:v.bool.def(!0),loopTime:v.number.def(8e3),pics:v.array.def([]),list:v.array.def([]),height:v.number,width:v.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:r,loopTime:s,pics:o,list:c,height:d,width:u}=a.toRefs(e),h=a.ref(),f=a.ref(0),m=a.ref(0),p=a.ref(0),y=a.ref(0);let b;const{resolveClassName:N}=xe(),w=a.computed(()=>{var L;return((L=c.value)==null?void 0:L.length)>0?c.value:o.value}),C=a.computed(()=>({width:`${m.value*w.value.length}px`,transform:`translateX(-${m.value*f.value}px)`})),E=a.computed(()=>({width:`${m.value}px`,height:`${p.value}px`})),_=L=>{let F=L;L>=w.value.length&&(F=0),L<0&&(F=w.value.length-1),f.value=F,t("index-change",F)},x=L=>{L&&window.open(L,"_blank")},O=L=>[`${N("swiper-img")}`,{[`${N("swiper-link")}`]:L.link},L.class],T=L=>({"background-image":`url(${L.url})`,"background-color":L.color}),$=L=>({[`${N("current-index")}`]:f.value===L}),D=()=>{r.value&&(y.value=window.setTimeout(()=>{_(f.value+1),D()},s.value))},R=()=>{window.clearTimeout(y.value)},P=()=>{var F;const L=(F=h.value)==null?void 0:F.parentElement;!L||!window.ResizeObserver||(b=new ResizeObserver(()=>{k()}),b.observe(L))},I=()=>{var L;(L=b.disconnect)==null||L.call(b)},A=L=>{if(L===void 0)return{height:0,width:0};const F=getComputedStyle(L),Z=L.clientWidth-parseFloat(F.paddingTop)-parseFloat(F.paddingBottom);return{height:L.clientHeight-parseFloat(F.paddingLeft)-parseFloat(F.paddingRight),width:Z}},k=()=>{var F;const L=A((F=h.value)==null?void 0:F.parentElement);m.value=+u.value>0?u.value:L.width,p.value=+d.value>0?d.value:L.height};return a.watch([d,u],k),a.onMounted(()=>{k(),D(),P()}),a.onBeforeUnmount(()=>{R(),I()}),()=>a.createVNode("section",{ref:h,style:E.value,class:`${N("swiper-home")}`},[a.createVNode("hgroup",{style:C.value,class:`${N("transition")} ${N("swiper-main")}`},[w.value.map(L=>{var F;return a.createVNode("h3",{style:E.value,class:`${N("swiper-card")}`},[((F=n.default)==null?void 0:F.call(n,L))??a.createVNode("span",{style:T(L),class:O(L),onClick:()=>x(L.link)},null)])})]),a.createVNode("ul",{class:`${N("swiper-index")}`},[w.value.map((L,F)=>a.createVNode("li",{class:$(F),onMouseover:()=>_(F)},null))]),a.createVNode("span",{class:`${N("swiper-nav")} ${N("nav-prev")}`,onClick:()=>_(f.value-1)},[a.createVNode("i",{class:`${N("swiper-nav-icon")}`},null)]),a.createVNode("span",{class:`${N("swiper-nav")} ${N("nav-next")}`,onClick:()=>_(f.value+1)},[a.createVNode("i",{class:`${N("swiper-nav-icon")}`},null)])])}}),rp=Je(FF),HF={theme:Zv(),size:v.size(),disabled:v.bool,showText:v.bool,isOutline:v.bool,onText:v.string.def("ON"),offText:v.string.def("OFF"),isSquare:v.bool,extCls:v.string,beforeChange:v.func.def(void 0),trueValue:v.oneOfType([v.string,v.number,v.bool]).def(!0),falseValue:v.oneOfType([v.string,v.number,v.bool]).def(!1),value:v.oneOfType([v.string,v.number,v.bool]).def(!1),modelValue:v.oneOfType([v.string,v.number,v.bool]).def(!1),withValidate:v.bool.def(!0)};let hd=function(e){return e.CHANGE="change",e.UPDATE="update:modelValue",e}({});function BF(e){return e}function zF(e){return!!e}const UF={[hd.UPDATE]:BF,[hd.CHANGE]:zF},ap=Je(a.defineComponent({name:"Switcher",props:HF,emits:UF,setup(e,{emit:t}){const n=Qn(),{resolveClassName:r}=xe(),s=a.ref(!1),o=a.computed(()=>e.trueValue===d.value),c=a.ref(e.modelValue!==!1),d=a.computed(()=>c.value?e.modelValue:e.value),u=a.computed(()=>{const m={[e.extCls]:!!e.extCls,[`${r("switcher")}`]:!0,[`${r("switcher-outline")}`]:e.isOutline,[`${r("switcher-square")}`]:e.isSquare,"show-label":e.showText,"is-disabled":e.disabled,"is-checked":o.value,"is-unchecked":!o.value,"is-loading":s.value,[`${r("primary")}`]:e.theme==="primary"};if(e.size&&!e.showText){const p=`${r(`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 h=m=>{if(m.stopPropagation(),m.preventDefault(),e.disabled||s.value)return;const p=o.value?e.falseValue:e.trueValue,y=!o.value,b=()=>{t(hd.UPDATE,p),t(hd.CHANGE,y)};let N=!0;if(typeof e.beforeChange=="function"&&(N=e.beforeChange(p),typeof N.then=="function"))return s.value=!0,N.then(()=>{b()}).finally(()=>{s.value=!1});N&&b()},f=m=>{(m.code==="Enter"||m.key==="Enter"||m.keyCode===13)&&h(m)};return()=>a.createVNode("div",{class:u.value,tabindex:"0",onClick:h,onKeydown:f},[s.value?a.createVNode(sc,{class:`${r("switcher-loading")}`},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[o.value?e.onText:e.offText]):""])}}));var md=(e=>(e.BORDER_CARD="border-card",e.CARD="card",e.CARD_GRID="card-grid",e.CARD_TAB="card-tab",e.UNBORDER_CARD="unborder-card",e))(md||{}),Po=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e))(Po||{});const sp=Pe("position",{}).def("top");var ip=(e=>(e.INSERT="insert",e.REPLACE="replace",e))(ip||{});const op=Pe("sortType",{}).def("replace"),jF={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},WF={name:v.oneOfType([v.number,v.string]).def(""),label:v.string||v.func,tips:v.string,closable:v.bool,visible:v.bool.def(!0),disabled:v.bool,sortable:v.bool,renderDirective:Hu(),panel:v.string||v.func},GF={active:v.oneOfType([v.number,v.string]).def(""),type:Pe("type",{}).def("border-card"),tabPosition:sp,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:op,labelHeight:v.number.def(50),extCls:v.string.def(""),validateActive:v.bool.def(!0),activeBarSize:v.number.def(2),activeBarColor:v.string.def("#3a84ff")},KF={active:v.oneOfType([v.number,v.string]).def(""),type:Pe("type",{}).def("border-card"),activeBarColor:v.string.def("#3a84ff"),activeBarSize:v.number.def(2),panels:{type:Array,default:()=>[]},tabPosition:sp,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:op,labelHeight:v.number.def(50),validateActive:v.bool.def(!0),...jF},lp=a.defineComponent({name:"TabNav",directives:{bkTooltips:pa},props:KF,setup(e){const t=a.ref(null),n=a.computed(()=>{const f={width:0,height:0,bottom:0,left:0};if(!t.value)return f;if([Po.LEFT,Po.RIGHT].includes(e.tabPosition)){const{clientHeight:m,offsetTop:p}=t.value,y={width:`${e.activeBarSize}px`,height:`${m}px`,top:`${p}px`,background:e.activeBarColor};return e.tabPosition===Po.LEFT?y.right=0:y.left=0,y}if(e.type===md.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 f}),r=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const f=[];let m=!1;return e.panels.filter((p,y)=>{if(!p.props)return null;const{name:b,label:N,closable:w,visible:C,disabled:E,sortable:_,tips:x}=p.props;if(!C)return!1;e.active===b&&(m=!0);const O=T=>p.slots.label?a.h(p.slots.label):[void 0,""].includes(T)?`选项卡${y+1}`:typeof T=="string"?T:typeof T=="function"?a.h(T):T;return f.push({name:b,closable:w,visible:C,disabled:E,sortable:_,tips:x,tabLabel:O(N)}),!0}),!m&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),f}),s=a.ref(-1),o=a.ref(-1),c=a.ref(""),d=(f,m)=>f===m,u={handleTabAdd(f){e.tabAdd(f)},dragstart(f,m){o.value=f,c.value=e.guid,Object.assign(m.dataTransfer,{effectAllowed:"move"}),e.tabDrag(f,m)},dragenter(f){d(c.value,e.guid)&&(s.value=f)},dragend(){s.value=-1,o.value=-1,c.value=null},drop(f,m){if(!d(c.value,e.guid))return!1;e.tabSort(o.value,f,m)},handleTabChange(f){e.tabChange(f)},handleTabRemove(f,m){e.tabRemove(f,m)}},{resolveClassName:h}=xe();return{...u,activeRef:t,activeBarStyle:n,navs:r,dragenterIndex:s,dragStartIndex:o,draggingEle:c,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4),resolveClassName:h}},render(){const{active:e,closable:t,addable:n,sortable:r,sortType:s,labelHeight:o,dragstart:c,dragenter:d,dragend:u,drop:h}=this,f=()=>this.navs.map((N,w)=>{if(!N)return null;const{name:C,disabled:E,tabLabel:_}=N,x=()=>{const T=[this.resolveClassName("tab-header-item")];return E&&T.push(this.resolveClassName("tab-header--disabled")),e===C&&T.push(this.resolveClassName("tab-header--active")),T.join(" ")},O=(T,$)=>!E&&(T||$);return a.withDirectives(a.createVNode("div",{key:C,ref:e===C?"activeRef":"",class:x(),draggable:O(N.sortable,r),onClick:()=>!E&&this.handleTabChange(C),onDragend:T=>{T.preventDefault(),u()},onDragenter:T=>{T.preventDefault(),d(w)},onDragleave:T=>{T.preventDefault()},onDragover:T=>{T.preventDefault()},onDragstart:T=>c(w,T),onDrop:T=>{T.preventDefault(),h(w,s)}},[a.createVNode("div",null,[_]),O(N.closable,t)?a.createVNode("span",{class:this.resolveClassName("tab-header--close"),onClick:()=>this.handleTabRemove(w,N)},[a.createVNode(un,null,null)]):""]),[[a.resolveDirective("bk-tooltips"),{content:N.tips||"",disabled:!N.tips}]])}),m=()=>{var w,C;const N=[];return typeof this.$slots.add=="function"?N.push((C=(w=this.$slots).add)==null?void 0:C.call(w,a.h)):n&&N.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(io,{style:"display:flex;",width:26,height:26},null)])),N.length?a.createVNode("div",{class:this.resolveClassName("tab-header-operation")},[N.map((E,_)=>a.createVNode("div",{key:_,class:this.resolveClassName("tab-header-item")},[E]))]):null},p=()=>this.type===md.UNBORDER_CARD?a.createVNode("div",{style:this.activeBarStyle,class:this.resolveClassName("tab-header-active-bar")},null):"",y=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||y?"tab-header-auto":""]},[p(),f()]),b,y])}}),cp=en(a.defineComponent({name:"Tab",components:{TabNav:lp},props:GF,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 r=a.ref(!1),s=a.ref([]),o=a.getCurrentInstance(),c=(f,m=[])=>{const{children:p}=f;return(p||[]).forEach(y=>{let{type:b}=y;b=b.name||b,b==="TabPanel"&&y.component?m.push(y.component):(b===a.Fragment||b==="template")&&c(y,m)}),m},d=()=>{if(t.default){const{children:f}=o.subTree.children[1];if(!f)return;const m=f[0],p=c(m);p.length!==s.value.length&&(s.value=p)}};a.onMounted(()=>{d(),r.value=!0,a.onUpdated(()=>{d()})});const u={tabAdd(f){n("add",{e:f}),n("add-panel",{e:f})},tabChange(f){n("change",f),n("tab-change",f),n("update:active",f)},tabRemove(f,m){n("remove",f,m),n("remove-panel",f,m)},tabSort(f,m,p){const y=s.value;if(p===ip.INSERT)if(f<m)y.splice(m+1,0,s[f]),y.splice(f,1);else if(f>m)y.splice(m,0,s[f]),y.splice(f+1,1);else return!1;else{const b=y[m];y[m]=y[f],y[f]=b}s.value=[...y],n("sort",f,m,p),n("sort-change",f,m,p)},tabDrag(f,m){n("drag",f,m),n("on-drag-tab",f,m)}},{resolveClassName:h}=xe();return{...u,isMounted:r,panels:s,resolveClassName:h}},render(){var n,r;const e=()=>{const s=[this.resolveClassName("tab"),this.extCls];return this.tabPosition===Po.TOP?s.push(this.resolveClassName(`tab--${this.tabPosition}`),this.resolveClassName(`tab--${this.type}`)):(s.push(this.resolveClassName(`tab--${this.tabPosition}`)),this.type===md.CARD_TAB&&s.push(this.resolveClassName("tab--vertical-tab"))),s},t=()=>{const{panels:s,active:o,type:c,closable:d,addable:u,sortable:h,sortType:f,labelHeight:m,validateActive:p,tabPosition:y,activeBarSize:b,activeBarColor:N,tabAdd:w,tabChange:C,tabRemove:E,tabSort:_,tabDrag:x}=this,O={panels:s,active:o,type:c,closable:d,addable:u,sortable:h,sortType:f,labelHeight:m,validateActive:p,tabPosition:y,activeBarSize:b,activeBarColor:N,tabAdd:w,tabChange:C,tabRemove:E,tabSort:_,tabDrag:x};return!s||!Array.isArray(s)?null:a.createVNode(lp,O,this.$slots)};return a.createVNode("div",{class:e()},[t(),a.createVNode("div",{class:this.resolveClassName("tab-content")},[(r=(n=this.$slots).default)==null?void 0:r.call(n)])])}}),{TabPanel:a.defineComponent({name:"TabPanel",props:WF,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}=xe();return a.withDirectives(a.createVNode("div",{ref:"content",class:n("tab-panel")},[t()]),[[a.vShow,e]])}})});var dp=(e=>(e.COL="col",e.HORIZONTAL="horizontal",e.NONE="none",e.OUTER="outer",e.ROW="row",e))(dp||{}),up=(e=>(e.AUTO="auto",e.HIGHLIGHT="highlight",e))(up||{});const YF=["auto","highlight"],XF=["none","row","col","outer","horizontal"],et={ROW_INDEX:"row_index",ROW_UID:"row_id",ROW_EXPAND:"row_expand",ROW_SELECTION:"row_selection",ROW_SELECTION_INDETERMINATE:"row_selection_indeterminate",ROW_SOURCE_DATA:"row_source_data",ROW_SKIP_CFG:"row_skip_config",ROW_SPAN:"row_span"},Ae={COL_UID:"col_$uuid",COL_SOURCE_DATA:"col_source_data",COL_MIN_WIDTH:"col_min_width",COL_SORT_ACTIVE:"col_sort_active",COL_SORT_TYPE:"col_sort_type",COL_SORT_FN:"col_sort_fn",COL_SORT_SCOPE:"col_sort_scope",COL_FILTER_FN:"col_filter_fn",COL_FILTER_VALUES:"col_filter_values",COL_FILTER_OBJ:"col_filter_obj",COL_FILTER_SCOPE:"col_filter_scope",COL_IS_DRAG:"col_is_drag",COL_SPAN:"col_span",COL_CELL_RENDER:"col_cell_render",COL_TEXT_RENDER:"col_text_render",COL_RESIZEABLE:"col_resizeable",COL_FIXED_STYLE:"col_fixed_style",COL_RECT:"col_rect",HEAD_CELL_RENDER:"head_cell_render",HEAD_TEXT_RENDER:"head_text_render",SELECTION_DISABLED:"selection_disabled",SELECTION_INDETERMINATE:"selection_indeterminate",SELECTION_VAL:"selection_val",WIDTH:"width",CALC_WIDTH:"calcWidth",RESIZE_WIDTH:"resizeWidth",LISTENERS:"listeners",IS_HIDDEN:"isHidden"},fp=8,ns=42;var gd=(e=>(e.DEF1="def1",e.DEF2="def2",e))(gd||{});const hp={def1:"#FAFBFD",def2:"#F0F1F5"},Mo={large:78,medium:60,small:42},qF=e=>[{value:"small",label:e.value.setting.lineHeight.small,height:Mo.small},{value:"medium",label:e.value.setting.lineHeight.medium,height:Mo.medium},{value:"large",label:e.value.setting.lineHeight.large,height:Mo.large}],mp=Symbol("bkInitColumns"),JF=60;var Bt=(e=>(e.ASC="asc",e.CUSTOM="custom",e.DESC="desc",e.NULL="null",e))(Bt||{});const ZF=["asc","desc","null","custom"],si=80,rs={},QF={};Pe("showOverflowTooltipMode",{default:"auto"});const eH=Pe("columnType",{default:"__COL_TYPE_NONE"}),a2=Pe("columnType",{default:""});Pe("full",{default:"full"}),Pe("columnSize",{default:"small"});const tH=Qt(),s2=Pe("IOverflowTooltipPropType",{default:!1,type:[Boolean,Object]}),nH=Pe("ISortPropShape",{default:!1,type:[Boolean,String,Object]}),rH=Pe("IFilterPropShape",{default:!1,type:[Boolean,Object]});var gp=(e=>(e.DEBOUNCE="debounce",e.THROTTLE="throttle",e))(gp||{});const pd=Pe("IColumnType",{default:{width:"100%",label:""},type:[Object]}),aH=Pe("ITableSettingPropType",{default:!1,type:[Boolean,Object]}),i2=Pe("LabelFunctionStringType",{}),sH=Pe("RenderFunctionStringType",{}),pp=Pe("SpanFunctionStringType",{}),iH=Pe("RowClassFunctionStringType",{}),oH=Pe("RowHeightFunctionNumberType",{});Pe("FunctionNumberType",{});const vd=e=>Pe("StringNumberType",{}).def(e);Pe("IColumnPropType",{default:{label:void 0,minWidth:si},type:[Object]});var vp=(e=>(e.independent="independent",e.interdependent="interdependent",e))(vp||{});const lH={data:v.arrayOf(v.any).def([]),columns:v.arrayOf(pd).def([]),activeColumn:v.oneOfType([v.number.def(-1),v.arrayOf(v.number.def(-1))]),columnPick:Pe("columnPick",{}).def("disabled"),height:vd("auto"),stripe:v.bool.def(!1),minHeight:vd(ns),maxHeight:vd("auto"),rowHeight:oH,headHeight:v.number.def(ns),showHead:v.bool.def(!0),sortValFormat:v.arrayOf(v.any).def([""]),thead:Pe("ITheadType",{}).def({color:gd.DEF1,height:ns,isShow:!0}),virtualEnabled:v.bool.def(!1),border:v.oneOfType([v.arrayOf(Pe("boderType",{})),v.string]).def([dp.ROW]),pagination:v.oneOfType([v.bool.def(!1),v.object.def({})]).def(!1),paginationHeight:v.number.def(JF),remotePagination:v.bool.def(!1),acrossAll:v.bool.def(!1),emptyText:v.string,emptyCellText:v.oneOfType([v.string,v.func]).def(""),isEmptyCell:v.oneOfType([v.arrayOf(Qt),v.arrayOf(null),v.arrayOf(void 0),v.func]).def(["",void 0,null]),settings:aH,rowClass:v.oneOfType([v.string,v.object,v.func]).def({}),rowStyle:v.oneOfType([v.string,v.object,v.func]).def({}),cellStyle:v.oneOfType([v.string,v.object,v.func]).def({}),cellClass:v.oneOfType([v.string,v.object,v.func]).def({}),scrollLoading:v.oneOfType([v.object,v.bool]).def(void 0),reserveExpand:v.bool.def(!1),selectionKey:v.string.def(""),checked:v.array.def([]),isSelectedFn:v.func.def(void 0),rowKey:v.oneOfType([v.string,v.func]).def(et.ROW_INDEX),showOverflowTooltip:s2,asyncData:v.bool.def(!1),rowHover:v.oneOf(YF).def(up.HIGHLIGHT),defaultSort:v.shape({}).def({}),isRowSelectEnable:v.oneOfType([v.func.def(()=>!0),v.bool.def(!0)]).def(!0),resizerWay:Pe("ResizerWay",{default:"debounce"}),observerResize:v.bool.def(!0),intersectionObserver:v.bool.def(!1),align:a2,headerAlign:a2,prependStyle:v.style().def({}),colSortBehavior:Pe("IColSortBehavior",{default:"independent"}),isFlex:v.bool.def(!0),rowDraggable:v.oneOfType([v.func,v.bool,v.object]).def(!1),shiftMultiChecked:v.bool.def(!1),scrollbar:v.bool.def(!0),fixedBottom:Pe("FixedBottomOption",{default:{position:"relative",height:ns}}).def(null),appendLastRow:Pe("AppendLastRowOption",{default:{type:"default",cellRender:void 0}})},cH={label:i2,field:i2,render:sH,width:v.oneOfType([v.number,v.string]),minWidth:vd(si),columnKey:v.string.def(""),showOverflowTooltip:s2,type:eH,resizable:v.bool.def(!0),fixed:v.oneOfType([v.bool,tH]).def(!1),sort:nH,filter:rH,colspan:pp.def(1),rowspan:pp.def(1),align:a2,className:iH,prop:i2,index:v.number.def(void 0)},dH=a.defineComponent({name:"TableColumn",props:cH,setup(e,{}){const t=a.inject(mp,()=>{}),n={};return a.watch(()=>[e],()=>{pn.isEqual(n,a.toRaw(e))||(t(),Object.assign(n,a.toRaw(e)))},{immediate:!0,deep:!0}),a.onUnmounted(()=>{t()}),()=>{}}});var St=(e=>(e.CELL_CLICK="cellClick",e.CELL_DBL_CLICK="cellDblclick",e.COLUMN_FILTER="columnFilter",e.COLUMN_FILTER_SAVE="colFilterSave",e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.DRAG_END="dragend",e.NATIVE_CLICK="click",e.NATIVE_DBL_CLICK="dblclick",e.PAGE_LIMIT_CHANGE="pageLimitChange",e.PAGE_VALUE_CHANGE="pageValueChange",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.ROW_SELECT="select",e.ROW_SELECT_ALL="selectAll",e.ROW_SELECT_CHANGE="selectionChange",e.SCROLL_BOTTOM="scrollBottom",e.SETTING_CHANGE="settingChange",e))(St||{});const uH=e=>!0,fH=e=>!0,hH=e=>!0,mH=e=>!0,yd=(e,t,n,r,s)=>!0,gH=e=>!0,pH=e=>!0,vH=e=>!0,yH=e=>!0,yp=e=>!0,bH=e=>!0,bp=e=>!0,wH={columnPick:uH,columnFilter:fH,columnSort:mH,colFilterSave:hH,rowClick:yd,rowDblclick:yd,rowExpand:gH,select:pH,selectAll:vH,selectionChange:yH,pageLimitChange:yp,pageValueChange:yp,settingChange:bH,scrollBottom:e=>!0,cellClick:bp,cellDblclick:bp,rowMouseEnter:yd,rowMouseLeave:yd,dragend:e=>!0},CH=(e,{afterResize:t})=>{const{getColumnAttribute:n,getColumnOrderWidth:r,setColumnAttribute:s,setNextColumnWidth:o,getPreColumn:c}=e,d=ie=>n(ie,Ae.LISTENERS),u="HeadColumnResize";let h=function(ie){return ie.MOUSE_DOWN="onMousedown",ie.MOUSE_MOVE="onMousemove",ie.MOUSE_OUT="onMouseout",ie}({}),f=!1,m=!1,p=!1,y=0,b=null,N="right",w=null,C=null,E=0;const _=new WeakMap,x=a.ref(-1e3),O=[Ae.WIDTH],T=ie=>{ie.stopImmediatePropagation(),ie.stopPropagation(),ie.preventDefault()},$=ie=>{T(ie),m=!1,p=!1;const X=r(b,O)+E,U=r(b,[Ae.COL_MIN_WIDTH]),B=X>U?X:U;o(b,B),s(b,Ae.WIDTH,B),document.removeEventListener("mouseup",$),x.value=-1e3,E=0,I(w),t==null||t(),w=null;const Y=ie.target;F(Y),b=null},D=pn.throttle(ie=>{x.value=x.value+ie}),R=ie=>{T(ie),document.body.style.setProperty("user-select","none");const X=ie.clientX-y;E=E+X,y=ie.clientX;const U=r(b,O)+X;r(b,[Ae.COL_MIN_WIDTH])<U&&D(X)},P=pn.debounce(ie=>{document.body.style.setProperty("user-select","none"),ie==null||ie.classList.add("col-resize-hover")}),I=ie=>{P.cancel(),document.body.style.removeProperty("user-select"),ie==null||ie.classList.remove("col-resize-hover")},A=ie=>{if(!f)return;k(ie.target),y=ie.clientX;const X=N==="left"?c(C):C;s(X,Ae.COL_IS_DRAG,!0),b=X,w=ie.target.closest("table");const U=w.getBoundingClientRect();x.value=ie.clientX-U.left,P(w),m=!0,document.addEventListener("mouseup",$)},k=ie=>{var U,B;((B=(U=ie==null?void 0:ie.parentElement)==null?void 0:U.parentElement)==null?void 0:B.querySelectorAll(".col-pointer-hover")).forEach(Y=>{Y==null||Y.classList.remove("col-pointer-hover"),Y==null||Y.classList.remove("poiner-left"),Y==null||Y.classList.remove("poiner-right")})},L=(ie,X)=>{const U=ie.parentElement;U==null||U.classList.add("col-pointer-hover"),U==null||U.classList.add(`poiner-${X}`);const B=X==="right"?U.nextElementSibling:U.previousElementSibling,Y=X==="right"?"left":"right";B==null||B.classList.add("col-pointer-hover"),B==null||B.classList.add(`poiner-${Y}`)},F=ie=>{p||(x.value=-1e3,ie.classList.remove("cell-resize"),k(ie),_.set(ie,!1),document.removeEventListener("mousedown",A))},Z={[h.MOUSE_MOVE]:(ie,X,U)=>{if(T(ie),m){p=!0,R(ie);return}const B=ie.target;if(!p){if(!B)return;const{offsetWidth:Y}=B,Q=ie.offsetX;Y>12&&(Y-Q<8||Q<8&&U>0)?(f=!0,N=Q<8?"left":"right",_.get(B)||(_.set(B,!0),B.classList.add("cell-resize"),L(B,N),C=X,document.addEventListener("mousedown",A))):(f=!1,F(B))}},[h.MOUSE_OUT]:(ie,X,U)=>{const B=ie.target;F(B)}},ae=ie=>`${u}_${ie}`,K=()=>{e.tableColumnList.forEach(ie=>{if(e.getColumnAttribute(ie,Ae.COL_RESIZEABLE)){const X=d(ie);Object.keys(Z).forEach(U=>{const B=ae(U);X!=null&&X.has(B)||X.set(B,[]),X.get(B).push(Z[U])})}})},fe=()=>{e.tableColumnList.forEach(ie=>{const X=d(ie);Object.keys(Z).forEach(U=>{const B=ae(U);if(X!=null&&X.has(B)){const Y=X.get(B);Y.length=0}})})};return a.watch(()=>[e.tableColumnList],()=>{fe(),K()},{immediate:!0,deep:!0}),{dragOffsetX:x}},NH=()=>{const e=[];let t=0;const n=new WeakMap,r=h=>a.isRef(h)?a.unref(h):a.toRaw(h),s=h=>Object.keys(h??{}).reduce((f,m)=>{const p=m.replace(/-(\w)/g,(y,b)=>b.toUpperCase());return Object.assign(f,{[p]:r(h[m])})},{}),o=h=>(n.has(h)||n.set(h,er()),n.get(h)),c=(h,f,m)=>{var p,y;if((p=h==null?void 0:h.component)!=null&&p.subTree){d((y=h==null?void 0:h.component)==null?void 0:y.subTree,f);return}if(typeof h=="function")return h();if(Array.isArray(h)){h.forEach(b=>d(b,f));return}if(Array.isArray(h==null?void 0:h.children)){h.children.forEach(b=>d(b,f));return}if(!m&&a.isVNode(h)&&(h!=null&&h.children)&&typeof(h==null?void 0:h.children)=="object"){Object.keys(h.children).forEach(b=>d(h.children[b],f));return}},d=(h,f)=>{var p,y,b;let m=f;if(!(!h||((p=h.type)==null?void 0:p.name)==="Table")){if(((y=h.type)==null?void 0:y.name)==="TableColumn"){const N=Object.assign({index:t},s(h.props),{field:h.props.prop||h.props.field,render:h.props.render??((b=h.children)==null?void 0:b.default),uniqueId:o(h),children:[]}),w=(f==null?void 0:f.children)??e;w.some(C=>C.uniqueId===N.uniqueId)||(w.push(N),t=t+1,h.children&&c(h,N,!0));return}c(h,m)}};return{resolveColumns:h=>{var m,p,y,b;e.length=0,t=0;const f=h==null?void 0:h.find(N=>{var w;return((w=N.type)==null?void 0:w.name)==="GhostBody"});return f&&((m=f.component)!=null&&m.subTree?d((p=f.component)==null?void 0:p.subTree):(((b=(y=f.children)==null?void 0:y.default)==null?void 0:b.call(y))??[]).forEach(N=>d(N))),e.sort((N,w)=>N.index-w.index),e}}};var wp=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(s,o){return s[0]===n?(r=o,!0):!1}),r}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 r=e(this.__entries__,n),s=this.__entries__[r];return s&&s[1]},t.prototype.set=function(n,r){var s=e(this.__entries__,n);~s?this.__entries__[s][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,s=e(r,n);~s&&r.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,r){r===void 0&&(r=null);for(var s=0,o=this.__entries__;s<o.length;s++){var c=o[s];n.call(r,c[1],c[0])}},t}()}(),o2=typeof window<"u"&&typeof document<"u"&&window.document===document,bd=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")()}(),xH=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(bd):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),_H=2;function SH(e,t){var n=!1,r=!1,s=0;function o(){n&&(n=!1,e()),r&&d()}function c(){xH(o)}function d(){var u=Date.now();if(n){if(u-s<_H)return;r=!0}else n=!0,r=!1,setTimeout(c,t);s=u}return d}var TH=20,EH=["top","right","bottom","left","width","height","size","weight"],OH=typeof MutationObserver<"u",LH=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=SH(this.refresh.bind(this),TH)}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_,r=n.indexOf(t);~r&&n.splice(r,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(){!o2||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),OH?(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(){!o2||!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,r=n===void 0?"":n,s=EH.some(function(o){return!!~r.indexOf(o)});s&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Cp=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var s=r[n];Object.defineProperty(e,s,{value:t[s],enumerable:!1,writable:!1,configurable:!0})}return e},ii=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||bd},Np=Cd(0,0,0,0);function wd(e){return parseFloat(e)||0}function xp(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,s){var o=e["border-"+s+"-width"];return r+wd(o)},0)}function AH(e){for(var t=["top","right","bottom","left"],n={},r=0,s=t;r<s.length;r++){var o=s[r],c=e["padding-"+o];n[o]=wd(c)}return n}function $H(e){var t=e.getBBox();return Cd(0,0,t.width,t.height)}function VH(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Np;var r=ii(e).getComputedStyle(e),s=AH(r),o=s.left+s.right,c=s.top+s.bottom,d=wd(r.width),u=wd(r.height);if(r.boxSizing==="border-box"&&(Math.round(d+o)!==t&&(d-=xp(r,"left","right")+o),Math.round(u+c)!==n&&(u-=xp(r,"top","bottom")+c)),!kH(e)){var h=Math.round(d+o)-t,f=Math.round(u+c)-n;Math.abs(h)!==1&&(d-=h),Math.abs(f)!==1&&(u-=f)}return Cd(s.left,s.top,d,u)}var DH=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof ii(e).SVGGraphicsElement}:function(e){return e instanceof ii(e).SVGElement&&typeof e.getBBox=="function"}}();function kH(e){return e===ii(e).document.documentElement}function IH(e){return o2?DH(e)?$H(e):VH(e):Np}function PH(e){var t=e.x,n=e.y,r=e.width,s=e.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,c=Object.create(o.prototype);return Cp(c,{x:t,y:n,width:r,height:s,top:n,right:t+r,bottom:s+n,left:t}),c}function Cd(e,t,n,r){return{x:e,y:t,width:n,height:r}}var MH=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Cd(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=IH(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}(),RH=function(){function e(t,n){var r=PH(n);Cp(this,{target:t,contentRect:r})}return e}(),FH=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new wp,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}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 ii(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new MH(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 ii(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(r){return new RH(r.target,r.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}(),_p=typeof WeakMap<"u"?new WeakMap:new wp,Sp=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=LH.getInstance(),r=new FH(t,n,this);_p.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){Sp.prototype[e]=function(){var t;return(t=_p.get(this))[e].apply(t,arguments)}});var HH=function(){return typeof bd.ResizeObserver<"u"?bd.ResizeObserver:Sp}();const Gt=(e,t,n)=>{if(e!=null){if(typeof t=="string")return Object.prototype.hasOwnProperty.call(e,t)?typeof e[t]=="function"?e[t].call(void 0,...n):e[t]:void 0;if(Array.isArray(t))return t.map(r=>Gt(e,r,n)).filter(r=>r!==void 0).at(0)}},BH=e=>as(e,"auto"),as=(e,t="100%",n=null)=>{let r="";return/^null|undefined$/gi.test(`${e}`)?r=t:r=/^\d+\.?\d+$/.test(`${e}`)?`${e}px`:e,n&&(r=`calc(${r} - ${n})`),r},zH=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>XF.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},Tp=(e,t,n=60,r=!1,s="throttle")=>{const o=()=>{typeof t=="function"&&t()},c=s==="debounce"?hl(o,n):k3(o),d=()=>Reflect.apply(c,void 0,[]),u=new HH(()=>{d()});return r&&typeof t=="function"&&t(),{start:()=>{u.observe(e)},disconnect:()=>{u.unobserve(e),u.disconnect()}}},l2=e=>{const{showHead:t,headHeight:n,thead:r={}}=e;return Object.assign({},{isShow:t,height:n},r)},UH=(e,t="ig")=>new RegExp(`${e}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),t),Nd=(e,t,n)=>{let r;return(typeof e=="string"||typeof e=="number"||typeof e=="boolean")&&(r=e),typeof e=="object"&&(r=Yc(e,t)),n!=null&&n.length&&(n.forEach(s=>{if(typeof s=="function")r=s(r,e,t);else if(typeof r=="string"){const o=r.match(typeof s=="string"?UH(s):s);r=(o==null?void 0:o[1])??r}}),/^-?\d+.?\d*$/.test(r)&&(r=Number(r))),r},jH=(e,t)=>Yc(e,t),oi=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?oi(Reflect.apply(e,void 0,t),t):[],WH=(e,t,n)=>{const r=GH(e,t,n);return r!==null?r:er()},GH=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===et.ROW_INDEX?`__ROW_INDEX_${n}`:t.rowKey:typeof t.rowKey=="function"?Reflect.apply(t.rowKey,void 0,[e]):null,Ep=(e,t,n)=>{const r=o=>o.field??o.id;return(o=>e.some(c=>r(c)===Gt(o,["field","type"],[o])))(t)&&n.length&&!n.includes(Gt(t,["field","type"],[t]))},xd=(e,t,n,r,s)=>typeof e[s]=="function"?Reflect.apply(e[s],void 0,[{column:e,colIndex:t,row:n,rowIndex:r}]):typeof e[s]=="number"?e[s]:1,KH=(e,t,n,r)=>{const s=xd(e,t,n,r,"colspan"),o=xd(e,t,n,r,"rowspan");return{colspan:s,rowspan:o}},Op=(e,t,n=[])=>{var u,h;const r=e.field,s=f=>Nd(f,r,n),o=e.type==="index",c=(f,m,p,y)=>{const b=o?p:s(f)??"",N=o?y:s(m)??"";return typeof b=="number"&&typeof N=="number"?b-N:String.prototype.localeCompare.call(b,N)},d=typeof((u=e.sort)==null?void 0:u.sortFn)=="function"?(h=e.sort)==null?void 0:h.sortFn:c;return t===Bt.NULL?(f,m)=>!0:(f,m,p,y)=>d(f,m,p,y)*(t===Bt.DESC?-1:1)},YH=e=>{const t={[Bt.NULL]:3,[Bt.ASC]:1,[Bt.DESC]:2};return t[e]===void 0?Bt.ASC:Object.keys(t)[(t[e]+1)%3]},XH=(e,t,n=[])=>typeof e=="string"?{value:e}:typeof e=="boolean"&&e?{value:Bt.NULL}:typeof e=="object"&&e!==null?typeof e.sortFn=="function"?{value:"custom",...e}:Object.assign({},{sortFn:Op(t,e.value??Bt.NULL,n)},e):null,_d=(e,{row:t,index:n,isCheckAll:r})=>typeof e.isRowSelectEnable=="boolean"?e.isRowSelectEnable!==!1:typeof e.isRowSelectEnable=="function"?e.isRowSelectEnable({row:t,index:n,isCheckAll:r}):!0,qH=(e,t,n)=>{const r=WH(e,n,t);return r!==void 0&&e[r]!==void 0?Yc(e,r):t},JH=(e,t)=>{const{value:n,sortFn:r,sortScope:s}=XH(e.sort??t.defaultSort,e)??{};return{type:n,fn:r,scope:s,active:!!e.sort,enabled:!!e.sort}},ZH=e=>typeof e.filter=="object"?{...e.filter,enabled:!0}:{enabled:!!e.filter,checked:[]},Sd=e=>a.isProxy(e)?a.toRaw(e):e,QH=e=>{const t=dt("table"),n=a.reactive(new WeakMap),r=a.reactive([]),s=er(),o=a.reactive([]),c=a.reactive([]),d=a.reactive([]),u=new WeakMap,h=(q,G={})=>{o.forEach(W=>W.active=!1);const ee=o.find(W=>W.col===q);if(ee){Object.assign(ee,G,{active:!0});return}o.push({col:q,...G,active:!0})},f=(q,G,ee)=>{let W=0;return/^\d+\.?\d*(px)?$/.test(`${q[G]}`)&&(W=Number(`${q[G]}`.replace(/px/,"")),se(q,Ae.WIDTH,W),F(q,{width:W,left:null,right:null})),/^\d+\.?\d*%$/.test(`${q[G]}`)&&(W=Number(`${q[G]}`.replace(/%/,""))/100*ee,se(q,Ae.WIDTH,W),F(q,{width:W,left:null,right:null})),W},m=q=>{let G=q,ee=si;const W=($e,Ve="width")=>{const Re=[];return $e.forEach(We=>{const nt=f(We,Ve,q);G=G-nt,[void 0,null,"auto","undefined","null",""].includes(We[Ve])&&Re.push(We)}),G>0&&Re.length&&(ee=G/Re.length),Re},te=W(y);W(te,"minWidth").forEach($e=>{const Ve=ee>si?ee:si;se($e,Ae.WIDTH,Ve),F($e,{width:Ve,left:null,right:null})})},p=(q,G={})=>{const ee=c.find(W=>W.col===q);if(ee){Object.assign(ee,G);return}c.push({col:q,...G})},y=a.reactive([]),b=()=>{y.length=0,y.push(...r.filter(q=>!B(q)))},N=()=>{var q,G;return e.rowDraggable?{minWidth:50,width:((q=e.rowDraggable)==null?void 0:q.width)??60,label:((G=e.rowDraggable)==null?void 0:G.label)??t.value.sort,type:"drag"}:null},w=(q=["rowspan","colspan"])=>r.some(G=>q.some(ee=>typeof G[ee]=="function"||/^\d$/.test(`${G[ee]}`))),C=a.computed(()=>w(["colspan"])),E=a.computed(()=>w(["rowspan"])),_=(q,G,ee)=>{let W=ee;const te=xd(q,G,null,null,"colspan"),be={skipCol:!1,skipColLen:0};return W>0&&(be.skipColLen=W,be.skipCol=!0,W=W-1),te>1&&(be.skipColLen=te,W=te-1),{...be,skipColumnNum:W}},x=q=>{if(/^\d+/.test(`${q.minWidth}`))return q.minWidth;let G=si;return q.sort&&(G=G+18),q.filter&&(G=G+28),G},O=(q,G)=>{const ee=ne(q,Ae.LISTENERS);return ee?Array.from(ee==null?void 0:ee.keys()).reduce((W,te)=>{const be=te.split("_").slice(-1)[0];return Object.assign(W,{[be]:$e=>{ee.get(te).forEach(Ve=>Reflect.apply(Ve,void 0,[$e,q,G]))}})},{}):{}},T=q=>{if(!q.filter)return null;const G=(te,be="ig")=>new RegExp(`${te}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),be),ee=(te,be)=>{const{match:$e}=q.filter,Ve=Nd(be,Gt(q,"field",[q,be]));return $e!=="fuzzy"?te.includes(Ve):te.some(Re=>G(Re,"img").test(Ve))};return typeof q.filter.filterFn=="function"?(te,be,$e,Ve)=>q.filter.filterFn(te,be,q,$e,Ve):(te,be)=>te.length?ee(te,be):!0},$=q=>{d.length=0;let G=0;const ee=[],W=N();W&&q.unshift(W);const te=(Re,We=1)=>{Re.length&&G<We&&(G=We),Re.forEach(nt=>te(nt.children??[],We+1))};te(q);const be=(Re,We)=>{if(Re){const nt=u.get(Re);nt.thColspan=nt.thColspan+We,nt.offsetLeft=nt.offsetLeft+We,be(nt.parent,We)}},$e=(Re,We,nt,st)=>{var os,ls,cs,ci,di;const at=a.toRaw(Re);let Vt=st;d[We]===void 0&&(d[We]=[]);const gt=!!(((os=at.children)==null?void 0:os.length)??!1);(((ls=at.children)==null?void 0:ls.length)??!1)||ee.push(at),u.has(at)||u.set(at,{thColspan:1,thRowspan:1,isGroup:gt,offsetLeft:st});const Lt=u.get(at),Ye=((cs=at.children)==null?void 0:cs.length)??0,Kt=((ci=at.children)==null?void 0:ci.length)??1,is=Ye>0?1:G-We,Fo=Vt+(Ye>0?Ye-1:0);return Object.assign(Lt,{thColspan:Kt>0?Kt:1,parent:nt,thRowspan:is,offsetLeft:Fo}),d[We].push(at),Kt>1&&be(nt,Kt-1),(di=at.children)==null||di.forEach((Ho,Bo)=>{Vt=Vt+$e(Ho,We+1,at,Vt+Bo)}),Ye>0?Ye-1:0};let Ve=0;return q.forEach((Re,We)=>{Ve=Ve+$e(Re,0,null,Ve+We)}),ee},D=q=>u.get(q),R=()=>{o.length=0;let q=0;(r||[]).forEach((G,ee)=>{const{skipCol:W,skipColumnNum:te,skipColLen:be}=C.value?_(G,ee,q):{skipCol:!1,skipColumnNum:0,skipColLen:0};if(q=te,!n.has(G)){const{type:$e,fn:Ve,scope:Re,active:We,enabled:nt}=JH(G,e),st=T(G),at=e.settings??{},Vt=ZH(G);Vt.enabled&&p(G,{[Ae.COL_FILTER_FN]:st,[Ae.COL_FILTER_VALUES]:Vt.checked??[]}),nt&&h(G,{[Ae.COL_SORT_TYPE]:$e,[Ae.COL_SORT_FN]:Ve,[Ae.COL_SORT_SCOPE]:Re}),n.set(G,{[Ae.CALC_WIDTH]:void 0,[Ae.RESIZE_WIDTH]:void 0,[Ae.COL_RECT]:a.reactive({width:null,left:null,right:null,height:null}),[Ae.COL_MIN_WIDTH]:x(G),[Ae.LISTENERS]:new Map,[Ae.WIDTH]:G.width,[Ae.IS_HIDDEN]:Ep(at.fields??[],G,at.checked??[]),[Ae.COL_SORT_TYPE]:a.ref($e),[Ae.COL_SORT_FN]:Ve,[Ae.COL_FILTER_OBJ]:Vt,[Ae.COL_FILTER_FN]:st,[Ae.COL_FILTER_SCOPE]:void 0,[Ae.COL_SORT_SCOPE]:Re,[Ae.COL_SORT_ACTIVE]:a.ref(We),[Ae.COL_IS_DRAG]:!1,[Ae.COL_SPAN]:{skipCol:W,skipColumnNum:te,skipColLen:be},[Ae.COL_UID]:er(),[Ae.SELECTION_DISABLED]:!1,[Ae.SELECTION_INDETERMINATE]:!1,[Ae.SELECTION_VAL]:!1,[Ae.COL_RESIZEABLE]:G.resizable!==!1,[Ae.COL_FIXED_STYLE]:a.reactive({})})}Object.assign(n.get(G),{[Ae.COL_SPAN]:{skipCol:W,skipColumnNum:te,skipColLen:be},[Ae.COL_MIN_WIDTH]:x(G)})})},P=(q,G)=>{se(q,Ae.COL_FIXED_STYLE,G)},I=q=>ne(q,Ae.COL_FIXED_STYLE)??{},A=q=>ne(q,Ae.COL_RECT),k=q=>ne(q,Ae.CALC_WIDTH),L=q=>ne(q,Ae.WIDTH),F=(q,{left:G,right:ee,width:W,height:te})=>{const be=A(q),$e={left:G??be.left,right:ee??be.right,width:W??be.width,height:te??be.height};se(q,Ae.COL_RECT,$e)},Z=pn.debounce((q,G)=>{r.length=0,r.push(...$(q)),R(),b(),G==null||G()}),ae=(q,G=!1)=>{se(q,Ae.IS_HIDDEN,G)},K=(q,G)=>{se(q,Ae.RESIZE_WIDTH,G)},fe=(q,G)=>{const{type:ee,fn:W,scope:te,active:be}=G,$e={[Ae.COL_SORT_TYPE]:ee,[Ae.COL_SORT_FN]:W,[Ae.COL_SORT_ACTIVE]:be,[Ae.COL_SORT_SCOPE]:te};[Ae.COL_SORT_TYPE,Ae.COL_SORT_FN,Ae.COL_SORT_ACTIVE,Ae.COL_SORT_SCOPE].forEach(Ve=>{$e[Ve]!==void 0&&se(q,Ve,$e[Ve])})},ie=(q,G)=>{n.has(q)&&Object.assign(n.get(q)[Ae.COL_FILTER_OBJ],G)},X=[Ae.WIDTH],U=(q,G=X)=>ne(q,G[0])??ne(q,G[1])??ne(q,G[2]),B=q=>ne(q,Ae.IS_HIDDEN)??!1,Y=q=>ne(q,Ae.COL_UID),Q=(q,G,ee)=>{[Ae.COL_SORT_FN,Ae.COL_SORT_SCOPE,Ae.COL_SORT_TYPE].includes(G)&&h(q,{[G]:ee}),[Ae.COL_FILTER_FN,Ae.COL_FILTER_VALUES].includes(G)&&p(q,{[G]:ee})},ue=(q,G)=>{const ee=y.findIndex(be=>be===q),W=U(q)-G,te=y[ee+1];te&&se(te,Ae.WIDTH,U(te)+W)},se=(q,G,ee)=>{Q(q,G,ee);const W=n.get(q);if(W&&Object.prototype.hasOwnProperty.call(W,G)){if(a.isRef(W[G])){W[G].value=ee;return}W[G]=ee}},we=(q,G)=>{const ee=G||q.checked||[],W=q.fields||[];r.forEach(te=>{se(te,Ae.IS_HIDDEN,Ep(W,te,ee))})},ne=(q,G)=>{var W;const ee=(W=n.get(q))==null?void 0:W[G];return a.isRef(ee)?ee.value:ee},ye=(q,G)=>{var ee;return(ee=n.get(q))==null?void 0:ee[G]},le=(q,G)=>({[`${s}-column-${G}`]:!1,column_fixed:!!q.fixed,column_fixed_left:!!q.fixed,column_fixed_right:q.fixed==="right"});return{needColSpan:C,needRowSpan:E,tableColumnSchema:n,tableColumnList:r,visibleColumns:y,debounceUpdateColumns:Z,sortColumns:o,filterColumns:c,columnGroup:d,columnGroupMap:u,clearColumnSort:()=>{r.forEach(q=>{se(q,Ae.COL_SORT_ACTIVE,!1),se(q,Ae.COL_FILTER_FN,void 0)})},clearSelectionAll:()=>{const q=y.find(G=>G.type==="selection");q&&(se(q,Ae.SELECTION_VAL,!1),se(q,Ae.SELECTION_INDETERMINATE,!1))},formatColumns:R,flatColumnTemplate:$,isHiddenColumn:B,getColumnId:Y,getColumnOrderWidth:U,getColumnAttribute:ne,getHeadColumnClass:(q,G)=>({...le(q,G)}),getColumnClass:le,getFixedStlye:I,getColumnRect:A,getColumnCustomClass:(q,G)=>{const ee=q.className;if(ee){if(typeof ee=="function")return ee(G);if(typeof ee=="string")return ee}return""},getColumnRefAttribute:ye,getColumnCalcWidth:k,getColumnWidth:L,getLeftColumnsWidth:(q,G=!1)=>{let ee=!0,W=0,te=0;for(;ee&&te<y.length;){if(q===y[te]){G&&(W=W+L(y[te])),ee=!1;break}W=W+L(y[te]),te=te+1}return W},getGroupAttribute:D,getPreColumn:q=>{const ee=y.findIndex(W=>W===q)-1;return y[ee]},getColumnIndex:q=>y.findIndex(G=>G===q),resolveEventListener:O,setColumnIsHidden:ae,setColumnResizeWidth:K,setColumnSortOption:fe,setColumnFilterOption:ie,setColumnAttributeBySettings:we,setColumnAttribute:se,setColumnSortActive:(q,G)=>{e.colSortBehavior===vp.independent&&r.forEach(ee=>{se(ee,Ae.COL_SORT_ACTIVE,!1)}),se(q,Ae.COL_SORT_ACTIVE,G)},setFixedStyle:P,setColumnRect:F,setVisibleColumns:b,setNextColumnWidth:ue,resolveColsCalcWidth:m}},eB=(e,t,n)=>{if(!e.rowDraggable)return{};const r=document.createElement("div");r.style.setProperty("height","20px"),r.style.setProperty("width","100%"),r.style.setProperty("background","#E2EDFF"),r.style.setProperty("cursor","move"),["dragenter","dragover"].forEach(w=>{r.addEventListener(w,C=>{C.preventDefault(),C.stopPropagation(),C.dataTransfer.dropEffect="move"})});let s=null,o="";const c=(w,C)=>{if(C==="--top"){w.parentNode.insertBefore(r,w);return}if(w.nextElementSibling===null){w.parentNode.append(r);return}w.parentNode.insertBefore(r,w.nextElementSibling)},d=w=>{e.rowDraggable&&(w==null||w())},u=w=>w.target.closest("tr"),h=(w,C)=>{const{y:E}=C,{top:_,bottom:x}=w.getBoundingClientRect(),O=E-_>x-E?"--bottom":"--top";f(w),w.classList.add(O),c(w,O)},f=(w,C=["--bottom","--top"])=>{C.forEach(E=>w.classList.remove(E))};return{onDragenter:w=>{const C=u(w);w.preventDefault(),w.stopPropagation(),d(()=>{w.dataTransfer.dropEffect="move",C.classList.add("--drag-enter"),h(C,w),s=C})},onDragleave:w=>{d(()=>{const C=u(w);o=C.classList.contains("--bottom")?"--bottom":"--top",f(C,["--drag-enter","--bottom","--top"])})},onDragstart:w=>{d(()=>{const C=u(w);r.style.setProperty("height",`${C.offsetHeight}px`),r.style.setProperty("width",`${C.offsetWidth}px`),C.classList.add("--drag-start"),w.dataTransfer.setDragImage(C,0,0),w.dataTransfer.setData("text/plain",null),w.dataTransfer.dropEffect="move";const{rowIndex:E}=w.target.dataset;w.dataTransfer.setData("data-row-index",E)})},onDragover:w=>{w.preventDefault(),w.stopPropagation(),w.dataTransfer.dropEffect="move";const C=u(w);h(C,w)},onDragend:w=>{var O;if(w.preventDefault(),w.stopPropagation(),r.remove(),!s)return;const C=s,{rowIndex:E}=C.dataset;let _=Number(E);const x=(O=w.target.dataset)==null?void 0:O.rowIndex;o==="--bottom"&&(_=_+1),t.changePageRowIndex(Number(x),_),s=null,o="",n.emit(St.DRAG_END,{sourceEvent:w,data:t.tableRowList})}}},tB=(e,t)=>{const n=a.computed(()=>t.visibleColumns.filter(f=>!!f.fixed&&f.fixed!=="right")),r=a.computed(()=>t.visibleColumns.filter(f=>!!f.fixed&&f.fixed==="right")),s=a.reactive({left:0,width:"0"}),o=a.reactive({right:0,width:"0"}),c=()=>{let f=0;const{length:m}=r.value;for(let y=m-1;y>=0;y--){const b=r.value[y],N=t.getColumnWidth(b);t.setColumnRect(b,{right:f,width:N}),t.setFixedStyle(b,{right:`${f}px`}),f=f+N}let p=0;n.value.forEach(y=>{const b=t.getColumnWidth(y);t.setColumnRect(y,{left:p,width:b}),t.setFixedStyle(y,{left:`${p}px`}),p=p+b}),s.width=`${p}px`,o.width=`${f}px`},d=()=>n.value.length>0?a.createVNode("div",{style:s,class:"column_fixed column_fixed_left"},null):null,u=()=>{if(r.value.length>0)return a.createVNode("div",{style:o,class:"column_fixed column_fixed_right"},null)};return{renderFixedRows:()=>[d(),u()],resolveFixedColumnStyle:c}},nB=a.defineComponent({name:"GhostBody",setup(e,t){const n={zIndex:-1,width:0,height:0,display:"none"};return()=>{var r,s;return a.createVNode("div",{style:n},[(s=(r=t.slots).default)==null?void 0:s.call(r)])}}}),rB=(e,t)=>{const n=a.toRef(e,"scrollLoading"),r=()=>{var c;return typeof n.value=="boolean"?{loading:!!n.value||(((c=e.fixedBottom)==null?void 0:c.loading)??!1),inline:!0,title:"",size:Ga.Normal,mode:If.Default,indicator:null}:n.value},s=a.computed(()=>{var c;return n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object")||(((c=e.fixedBottom)==null?void 0:c.loading)??!1)});return{renderScrollLoading:()=>{var c,d,u,h;if(s.value){const{loading:f,size:m,mode:p,title:y,inline:b,indicator:N}=r();return((d=(c=t.slots).fixedBottom)==null?void 0:d.call(c))??a.createVNode(da,{loading:f,size:m,mode:p,title:y,inline:b,indicator:N},null)}return((h=(u=t.slots).fixedBottom)==null?void 0:h.call(u))??null}}},aB=(e,t)=>{const n=a.ref(null),r=a.ref(null),s=a.ref(null),o=a.ref(null),c=a.ref(0),d=a.ref(0),u=a.ref(0),h=a.ref(-1e4),f=a.ref(0),m=a.reactive({}),p=a.reactive([]),y=a.ref(e.rowHeight??ns),b=a.ref(1),N=a.computed(()=>{var ee,W,te;return(ee=t.slots)!=null&&ee.fixedBottom&&((W=e.fixedBottom)==null?void 0:W.position)==="relative"?((te=e.fixedBottom)==null?void 0:te.height)??ns:0}),{resolveClassName:w}=xe(),{renderScrollLoading:C}=rB(e,t),E=a.computed(()=>Ue({[w("table")]:!0},zH(e.border))),_=a.computed(()=>({height:as(e.height),maxHeight:as(e.maxHeight),minHeight:as(e.minHeight)})),x=a.computed(()=>Ue({[w("table-head")]:!0,"has-settings":!!e.settings,"has-group":b.value>1})),O=()=>{var te,be,$e,Ve;const ee=f.value>0?"0 0 10px rgb(0 0 0 / 12%)":null,W=c.value>0?"0 0 10px rgb(0 0 0 / 12%)":null;(be=(te=n.value)==null?void 0:te.style)==null||be.setProperty("--shadow-right",ee),(Ve=($e=n.value)==null?void 0:$e.style)==null||Ve.setProperty("--shadow-left",W)},T=k3(()=>{var ee,W,te,be,$e,Ve,Re,We,nt,st;(W=(ee=n.value)==null?void 0:ee.style)==null||W.setProperty("--drag-offset-x",`${h.value+c.value}px`),(be=(te=n.value)==null?void 0:te.style)==null||be.setProperty("--drag-offset-h-x",`${h.value-2}px`),(Ve=($e=n.value)==null?void 0:$e.style)==null||Ve.setProperty("--translate-y",`${d.value}px`),(We=(Re=n.value)==null?void 0:Re.style)==null||We.setProperty("--translate-x",`${c.value}px`),(st=(nt=n.value)==null?void 0:nt.style)==null||st.setProperty("--translate-x-1",`-${c.value}px`),O()}),$=ee=>{c.value=ee,T()},D=ee=>{b.value=ee},R=ee=>{d.value=ee,T()},P=()=>{var ee,W,te,be,$e,Ve,Re,We,nt,st;(W=(ee=n.value)==null?void 0:ee.style)==null||W.setProperty("--drag-offset-x","-1000px"),(be=(te=n.value)==null?void 0:te.style)==null||be.setProperty("--drag-offset-h-x","-1000px"),(Ve=($e=n.value)==null?void 0:$e.style)==null||Ve.setProperty("--translate-y","0px"),(We=(Re=n.value)==null?void 0:Re.style)==null||We.setProperty("--translate-x","0px"),(st=(nt=n.value)==null?void 0:nt.style)==null||st.setProperty("--translate-x-1","0px")},I=ee=>{h.value=ee,T()},A=l2(e),k=a.computed(()=>Gt(A,"height",["thead"])*b.value),L=a.computed(()=>{var ee;return{"--row-height":`${k.value}px`,"--background-color":hp[((ee=e.thead)==null?void 0:ee.color)??gd.DEF1],paddingRight:e.scrollbar?null:`${fp}px`}}),F={[w("table-body")]:!0,"is-bk-scrollbar":e.scrollbar},Z=a.computed(()=>Ue({[w("table-footer")]:!0,"is-hidden":Q.value===0})),ae=ee=>a.createVNode("div",{ref:n,style:_.value,class:E.value},[ee,a.createVNode(nB,null,{default:()=>{var W,te;return[(te=(W=t.slots).default)==null?void 0:te.call(W)]}})]),K=(ee,W,te)=>a.createVNode("div",{ref:r,style:L.value,class:x.value},[ee==null?void 0:ee(),a.createVNode("div",{class:"col-resize-drag"},null),a.createVNode("div",{class:ce},[te==null?void 0:te()]),W==null?void 0:W()]),fe=a.computed(()=>({position:"sticky",top:0,zIndex:2,...e.prependStyle||{}})),ie=()=>t.slots.prepend?a.createVNode("div",{style:fe.value,class:"prepend-row"},[t.slots.prepend()]):null,X=a.ref("auto"),U=a.computed(()=>{if(/^\d+\.?\d*(px|%)$/.test(`${_.value.maxHeight}`)){const ee=e.showHead?k.value:0,W=Q.value+ee+N.value;return`calc(${_.value.maxHeight} - ${W}px)`}return null}),B=ee=>{X.value=ee-k.value-N.value-Q.value},Y=ee=>{X.value=ee},Q=a.ref(0),ue=a.computed(()=>({"--footer-height":`${Q.value}px`})),se=ee=>{Q.value=ee},we=pn.debounce((...ee)=>{t.emit(St.SCROLL_BOTTOM,{...ee})}),ne=()=>{var te,be,$e,Ve;const ee=((be=(te=s.value)==null?void 0:te.refRoot)==null?void 0:be.scrollWidth)??0,W=((Ve=($e=s.value)==null?void 0:$e.refRoot)==null?void 0:Ve.offsetWidth)??0;f.value=ee-W-(c==null?void 0:c.value)},ye=ee=>{y.value=ee},le=ee=>{u.value=m.bottom??0;const W=ee[1],{translateX:te,translateY:be,pos:$e={}}=W;$(te),R(be),ne(),Object.assign(m,$e||{});const{bottom:Ve}=$e;Ve<=2&&u.value>Ve&&we({...$e,translateX:te,translateY:be})},ge={column_drag_line:!0,"offset-x":!0,"resize-column":!0},j=a.computed(()=>({[w("table-body-content")]:!0,[w("stripe")]:e.stripe})),ce=a.computed(()=>({[w("table-fixed")]:!0,"has-virtual-scroll":e.virtualEnabled})),Ce=w("table-fixed-bottom"),oe=a.computed(()=>{var ee,W;return{minHeight:`${y.value}px`,position:((ee=e.fixedBottom)==null?void 0:ee.position)??"absolute",height:((W=e.fixedBottom)==null?void 0:W.height)??null}});a.onMounted(()=>{ne(),P()});const z=()=>{const ee=C==null?void 0:C();return ee?a.createVNode("div",{style:oe.value,class:Ce},[ee]):null};return{renderContainer:ae,renderHeader:K,renderBody:(ee,W,te)=>a.createVNode(ni,{ref:s,height:X.value,class:F,contentClassName:j.value,enabled:e.virtualEnabled,lineHeight:y.value,list:ee,maxHeight:U.value,rowKey:e.rowKey,scrollEvent:!0,scrollbar:{enabled:e.scrollbar},throttleDelay:120,onContentScroll:le},{beforeContent:()=>ie(),default:be=>W==null?void 0:W((be==null?void 0:be.data)??[]),afterSection:()=>[a.createVNode("div",{class:ge},null),a.createVNode("div",{class:ce.value},[te==null?void 0:te()])]}),renderFooter:ee=>a.createVNode("div",{ref:o,style:ue.value,class:Z.value},[ee]),renderFixedBottom:()=>z(),setBodyHeight:B,setVirtualBodyHeight:Y,setFootHeight:se,setTranslateX:$,setDragOffsetX:I,setFixedColumns:ee=>{p.length=0,p.push(...ee)},setOffsetRight:ne,setLineHeight:ye,setHeaderRowCount:D,initRootStyleVars:P,refRoot:n,refHead:r,refBody:s,refFooter:o}},sB=(e,t,n=[],r=!0)=>{let s=null;const o=()=>{s&&(s.disconnect(),s=null)};return a.watch(e,()=>{Rr(e.value)&&(o(),s=Tp(e.value,()=>{t==null||t.apply(...n)},60,!0,"debounce"),r&&s.start())},{flush:"post",immediate:!0}),{instance:s}},iB=e=>{const t=a.reactive({enabled:!1,count:0,limit:10,current:1,align:"right",layout:["total","limit","list"]}),n=a.ref(!0),r=a.computed(()=>Math.ceil(t.count/t.limit)),s=d=>{Object.assign(t,{enabled:!!e.pagination},d),t.current>r.value&&(t.current=1)},o=(d=!0)=>{n.value=!d};a.watch(()=>[e.pagination],()=>{typeof e.pagination=="object"&&s(a.toRaw(e.pagination)),t.enabled=n.value&&!!e.pagination},{immediate:!0,deep:!0}),a.watch(()=>[e.data],()=>{e.remotePagination||s({count:e.data.length})},{immediate:!0});const c=a.computed(()=>t.enabled&&t.count>0);return{options:t,isShowPagination:c,setPagination:s,disabledPagination:o}},oB=a.defineComponent({name:"BodyEmpty",props:{list:v.array.def([]),filterList:v.array.def([]),emptyText:v.string},emits:["change"],setup(e){const t=dt("table"),n=a.computed(()=>e.emptyText===void 0?t.value.emptyText:e.emptyText),r=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode(Kc,{description:n.value,scene:"part",type:r.value},null)}}),c2=a.defineComponent({name:"TableCell",props:{column:pd,row:v.any.def({}),parentSetting:s2,title:v.string.def(void 0),observerResize:v.bool.def(!0),intersectionObserver:v.bool.def(!1),isHead:v.bool.def(!1),isExpandChild:v.bool.def(!1),headExplain:v.string,resizerWay:Pe("ResizerWay",{default:gp.DEBOUNCE})},setup(e,{slots:t}){const n=a.ref(),r=a.ref(!1),s=a.ref(!e.intersectionObserver),o=a.computed(()=>({textAlign:e.column.textAlign,minWidth:as(e.column.minWidth,null)})),c=()=>{if(/boolean|object/.test(typeof e.column.showOverflowTooltip)&&e.column.showOverflowTooltip!==null){const{content:C="",mode:E=void 0,popoverOption:_={}}=e.column.showOverflowTooltip,x={showOverflowTooltip:{content:C,disabled:!e.column.showOverflowTooltip,mode:E,resizerWay:void 0,watchCellResize:void 0,popoverOption:_,allowHtml:!1}};return e.parentSetting!==null&&typeof e.parentSetting=="object"&&(Object.assign(x.showOverflowTooltip,e.parentSetting,{disabled:!e.column.showOverflowTooltip}),typeof e.column.showOverflowTooltip=="object"&&Object.assign(x.showOverflowTooltip,e.column.showOverflowTooltip)),x}return{showOverflowTooltip:e.parentSetting}};let d=null;const u=(C=!1)=>{var _;const E=f();return C?((_=E==null?void 0:E.cloneNode)==null?void 0:_.call(E,!0))??"":(E==null?void 0:E.innerText)??""},h=()=>{var R,P;const{showOverflowTooltip:C=!1}=c();let E=!0,{resizerWay:_}=e;const x=u(C.allowHtml);let O=()=>x,T={},$="auto",D=!0;return typeof C=="boolean"&&(E=!C),typeof C=="object"&&(E=C.disabled,T=C.popoverOption,_=C.resizerWay||"debounce",O=()=>C.content||x,typeof C.content=="function"&&(O=()=>C.content(e.column,e.row)),D=C.watchCellResize,$=C.mode||"auto"),typeof E=="function"&&(E=Reflect.apply(E,this,[e.column,e.row])),e.column.explain&&(E=!1,$="static",typeof e.column.explain=="object"&&(O=()=>Gt(e.column.explain,"content",[e.column,e.row]))),e.isHead&&(E=!(((P=(R=e.column)==null?void 0:R.showOverflowTooltip)==null?void 0:P.showHead)??!0),$="auto",O=()=>{var I,A;return((A=(I=f())==null?void 0:I.cloneNode)==null?void 0:A.call(I,!0))??""},e.headExplain&&($="static",O=()=>e.headExplain)),e.column.type==="expand"&&!e.isHead&&!e.isExpandChild&&(E=!0),{disabled:E,content:O,mode:$,resizerWay:_,watchCellResize:D,popoverOption:T}},f=()=>{var C,E;return e.isHead?(E=(C=n.value)==null?void 0:C.querySelector)==null?void 0:E.call(C,".head-text"):n.value},m=()=>{const C=f();if(!C||!Rr(C))return;const{mode:E,disabled:_}=h();if(r.value=!_,E==="auto"&&(r.value=Rh(C)),E==="static"&&(r.value=!0),r.value){const x=a.ref(h());d===null&&(d=Gf(C,{disabled:x.value.disabled,content:x.value.content,mode:x.value.mode,popoverOption:x.value.popoverOption}))}else d==null||d.destroyInstance(C),d=null};let p=null;const y=()=>{const{disabled:C,resizerWay:E,watchCellResize:_}=h();C||(m(),_!==!1&&e.observerResize&&(p=Tp(n.value,()=>{m()},60,!0,E),p.start()))};let b=null;const N=()=>{e.intersectionObserver&&(b=new IntersectionObserver(C=>{if(C[0].intersectionRatio<=0){s.value=!1,d==null||d.destroyInstance(n.value);return}s.value=!0,y()},{threshold:.5}),b==null||b.observe(n.value))};a.onMounted(()=>{N(),s.value&&y()}),a.onBeforeUnmount(()=>{p==null||p.disconnect(),p=null,d==null||d.destroyInstance(n.value),b==null||b.disconnect(),b=null});const w=e.headExplain||e.column.explain;return()=>{var C;return a.createVNode("div",{ref:n,style:o.value,class:["cell",e.column.type,w?"explain":""]},[s.value?(C=t.default)==null?void 0:C.call(t):"--"])}}}),Td=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)])}}),lB=({props:e,rows:t,ctx:n,columns:r,row:s,index:o,column:c,isChild:d=!1,multiShiftKey:u})=>{const{isShiftKeyDown:h,getStore:f,setStore:m,setStoreStart:p,clearStoreStart:y}=u,b=()=>{const T=(I,A)=>{A.stopImmediatePropagation(),A.preventDefault(),A.stopPropagation(),h.value||(I?p(s,o):y()),t.setRowSelection(s,I),r.setColumnAttribute(c,Ae.SELECTION_INDETERMINATE,t.getRowIndeterminate()),r.setColumnAttribute(c,Ae.SELECTION_VAL,t.getRowCheckedAllValue()),n.emit(St.ROW_SELECT,{row:s,index:o,checked:I,data:e.data}),n.emit(St.ROW_SELECT_CHANGE,{row:s,index:o,checked:I,data:e.data})},$=()=>{if(h.value){const I=m(s,o);if(I){const{start:A,end:k}=f(),L=A.index<k.index?A.index:k.index,F=A.index<k.index?k.index:A.index;(t.pageRowList.slice(L,F+1)??[]).forEach(Z=>{_d(e,{row:s,index:o,isCheckAll:!1})&&t.setRowSelection(Z,!0)})}return n.emit(St.ROW_SELECT,{row:s,index:o,checked:!0,data:e.data,isShiftKeyDown:!0}),n.emit(St.ROW_SELECT_CHANGE,{row:s,index:o,checked:!0,data:e.data,isShiftKeyDown:!0}),Promise.resolve(!I)}return Promise.resolve(!0)},D=t.getRowAttribute(s,et.ROW_SELECTION_INDETERMINATE),R=t.getRowAttribute(s,et.ROW_SELECTION),P=_d(e,{row:s,index:o,isCheckAll:!1});return a.createVNode(hn,{beforeChange:$,disabled:!P,indeterminate:D,modelValue:R,onChange:T},null)},N=T=>Array.isArray(e.isEmptyCell)?e.isEmptyCell.some($=>$===T):typeof e.isEmptyCell=="function"?e.isEmptyCell({cellText:T,row:s,column:c}):pn.isEmpty(T),w=()=>{var D;const T=()=>{if(Gt(c,"type",[c,s])==="index")return t.getRowAttribute(a.toRaw(s),et.ROW_INDEX);const P=Gt(c,"field",[c,s]),I=Nd(s,P);if(typeof c.render=="function")return C();if(typeof I=="boolean"||typeof I=="number")return`${I}`;if(typeof I=="object"&&I!==null)return JSON.stringify(a.unref(I));if(N(I)){const{emptyCellText:A}=e;if(A)return typeof A=="function"?A({row:s,column:c,index:o}):A}return I},$={expand:()=>d?"":x(),selection:()=>b(),drag:O};return((D=$[c.type])==null?void 0:D.call($,s,c,o,t))??T()},C=()=>{const T=Nd(s,Gt(c,"field",[c,s])),$=s;return c.render({cell:T,data:$,row:s,column:c,index:o,rows:t.tableRowList.value})},E=()=>{var D,R;const $=t.getRowAttribute(s,et.ROW_EXPAND)?a.createVNode(to,null,null):a.createVNode(oo,null,null);return a.createVNode("span",null,[[$,((R=(D=n.slots).expandContent)==null?void 0:R.call(D,s))??""]])},_=T=>{t.setRowExpand(s,!t.getRowAttribute(s,et.ROW_EXPAND)),n.emit(St.ROW_EXPAND_CLICK,{row:s,column:c,index:o,rows:t.tableRowList.value,e:T})},x=()=>{const T=()=>{var $,D;return typeof c.render=="function"?C():((D=($=n.slots).expandCell)==null?void 0:D.call($,{row:s,column:c,index:o,rows:t}))??E()};return a.createVNode("span",{class:"expand-btn-action",onClick:$=>_($)},[T()])},O=()=>{var R,P,I;const T=((R=e.rowDraggable)==null?void 0:R.render)??e.rowDraggable;if(typeof T=="function")return T(s,c,o,t.tableRowList.value);const $=((P=e.rowDraggable)==null?void 0:P.fontSize)??"14px";return((I=e.rowDraggable)==null?void 0:I.icon)??a.createVNode(ec,{style:`'--font-size: ${$};'`,class:"drag-cell"},null)};return{renderCell:w}};function Lp(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const d2=32,cB=a.defineComponent({name:"HeadFilter",props:{column:pd,height:v.number.def(d2)},emits:["change","filterSave","reset"],setup(e,{emit:t}){const{resolveClassName:n}=xe(),r=dt("table"),s=a.computed(()=>{var k;return(k=e.column)==null?void 0:k.filter}),o=a.computed(()=>{var k;return((k=s.value)==null?void 0:k.checked)??[]}),c=a.ref(""),d=a.reactive({isOpen:!1,checked:o.value});a.watch(()=>o,()=>{d.checked.length=0,d.checked=[],d.checked.push(...o.value)},{deep:!0});const u=a.computed(()=>Ue({[n("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:d.checked.length,opened:d.isOpen})),h=Ue({[n("table-head-filter")]:!0}),f=a.ref(null),m=k=>{d.isOpen=k,k&&setTimeout(()=>{f.value.reset()}),k||(c.value="")},p=`light ${n("table-head-filter")}`,y=a.computed(()=>{const{list:k=[]}=s.value;return k.filter(F=>{const Z=E(c.value);return Z.test(F.label)||Z.test(F.value)})}),b=5,N=a.computed(()=>{var k;return((k=s.value)==null?void 0:k.maxHeight)??d2*b}),w=a.computed(()=>{var k;return((k=s.value)==null?void 0:k.height)||"100%"}),C=a.computed(()=>{const k=d2*2;return y.value.length>b?N.value:k}),E=(k,L="ig")=>new RegExp(`${k}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),L),_=()=>{x(!0),t("filterSave",d.checked),d.isOpen=!1},x=(k=!1)=>{const{disabled:L}=T($,r.value.confirm);if(L||k){if(s.value==="custom"){t("change",d.checked,null),d.isOpen=!1;return}t("change",d.checked)}},O=()=>{d.checked.length&&(d.checked.length=0,d.isOpen=!1,t("change",d.checked),t("reset",d.checked))},T=(k,L)=>({disabled:k==="disabled"||k===!1,text:typeof k=="string"?k:L}),{btnSave:$,btnReset:D}=s.value,R=()=>{const{disabled:k,text:L}=T($,r.value.confirm);return k?a.createVNode("span",{class:"btn-filter-save disabled"},[L]):a.createVNode(Rt,{style:"width: 56px; margin-right: 8px;",size:"small",theme:"primary",onClick:_},Lp(L)?L:{default:()=>[L]})},P=()=>{const{disabled:k,text:L}=T(D,r.value.reset);return k?"":a.createVNode(Rt,{style:"width: 56px;",disabled:d.checked.length===0,size:"small",onClick:O},Lp(L)?L:{default:()=>[L]})},I=(k,L)=>{const F=new Set(d.checked);k?F.add(L.value):F.delete(L.value),d.checked.length=0,d.checked.push(...Array.from(F)),x()},A=k=>k.data.length?k.data.map(L=>a.createVNode("div",{key:L.value,class:"list-item"},[a.createVNode(hn,{checked:d.checked.includes(L.value),immediateEmitChange:!1,label:L.value,modelValue:d.checked.includes(L.value),onChange:F=>I(F,L)},{default:()=>[`${L.text}`]})])):a.createVNode("div",{class:"list-item is-empty"},[r.value.emptyText]);return()=>a.createVNode(Tn,a.mergeProps({arrow:!1,isShow:d.isOpen,offset:0,placement:"bottom-start",renderType:bl.SHOWN,trigger:"click"},{theme:p},{onAfterHidden:()=>m(!1),onAfterShow:()=>m(!0)}),{default:()=>a.createVNode(Ql,{class:u.value},null),content:()=>a.createVNode("div",{class:h},[a.createVNode("div",{style:"padding: 4px 10px;"},[a.createVNode(va,{modelValue:c.value,"onUpdate:modelValue":k=>c.value=k},null)]),a.createVNode(Tc,{class:"content-list"},{default:()=>[a.createVNode(ni,{ref:f,height:w.value,className:"content-items",lineHeight:32,list:y.value,maxHeight:N.value,minHeight:C.value,scrollEvent:!0,throttleDelay:0},{default:A})]}),a.createVNode("div",{class:"content-footer"},[R(),P()])])})}}),dB=a.defineComponent({name:"HeadSort",props:{column:pd,defaultSort:v.oneOf(ZF).def(Bt.NULL),active:v.bool,sortValFormat:v.arrayOf(v.any).def([""])},emits:["change"],setup(e,{emit:t,expose:n}){var u,h;const{resolveClassName:r}=xe(),s=((h=(u=e.column)==null?void 0:u.sort)==null?void 0:h.value)??e.defaultSort??Bt.NULL,o=a.ref(s);a.watch(()=>[e.defaultSort],([f])=>{o.value=f},{immediate:!0});const c=f=>{o.value=f},d=(f,m)=>{f.stopImmediatePropagation(),f.stopPropagation(),f.preventDefault(),t("change",{type:m,isCancel:m===o.value})};return n({setNextSortType:c}),()=>a.createVNode("span",{class:r("head-cell-sort")},[a.createVNode(Rl,{style:"align-items: flex-end;",class:["sort-action","sort-asc",e.active&&o.value===Bt.ASC?"active":""],onClick:f=>d(f,Bt.ASC)},null),a.createVNode(Zi,{style:"align-items: flex-start;",class:["sort-action","sort-desc",e.active&&o.value===Bt.DESC?"active":""],onClick:f=>d(f,Bt.DESC)},null)])}});function uB(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const fB=({props:e,columns:t,rows:n,ctx:r,column:s,index:o})=>{var R;const c=a.ref(t.getColumnAttribute(s,Ae.COL_SORT_TYPE)),d=a.ref(t.getColumnAttribute(s,Ae.COL_SORT_ACTIVE)),u=a.toRaw(s),h=P=>{const{isCancel:I,type:A=t.getColumnRefAttribute(s,Ae.COL_SORT_TYPE)}=P??{},k=I?Bt.NULL:A,L=Op(s,k,e.sortValFormat);t.setColumnAttribute(s,Ae.COL_SORT_TYPE,k),t.setColumnAttribute(s,Ae.COL_SORT_FN,L),t.setColumnSortActive(s,k!==Bt.NULL),c.value=k,d.value=k!==Bt.NULL,r.emit(St.COLUMN_SORT,{column:s,index:o,type:k})},f=()=>a.createVNode(dB,{active:d.value,column:s,defaultSort:c.value,sortValFormat:e.sortValFormat,onChange:h},null),m=()=>{const P=k=>{r.emit(St.COLUMN_FILTER,{checked:k,column:a.unref(s),index:o})},I=k=>{t.setColumnAttribute(s,Ae.COL_FILTER_VALUES,k),r.emit(St.COLUMN_FILTER_SAVE,{values:k})},A=()=>{t.setColumnAttribute(s,Ae.COL_FILTER_VALUES,[]),r.emit(St.COLUMN_FILTER,{checked:[],column:a.unref(s),index:o})};return a.createVNode(cB,{height:e.headHeight,column:s,onChange:P,onFilterSave:I,onReset:A},null)},p=l2(e),{cellFn:y}=p,b=()=>typeof y=="function"?y({index:o,column:s}):typeof s.renderHead=="function"?s.renderHead({index:o,column:s}):Gt(s,"label",[o]),N=()=>{const P=[];s.sort&&P.push(f()),s.filter&&P.push(m());const I=b();P.unshift(a.createVNode("span",{class:"head-text"},[I]));const A=typeof I=="string"?I:void 0,k={"has-sort":!!s.sort,"has-filter":!!s.filter};return{cells:P,showTitle:A,headClass:k}},w=()=>{const P=L=>{t.setColumnAttribute(s,Ae.SELECTION_VAL,L),t.setColumnAttribute(s,Ae.SELECTION_INDETERMINATE,!1),n.setRowSelectionAll(L),r.emit(St.ROW_SELECT_ALL,{checked:L,data:e.data})},I=t.getColumnAttribute(s,Ae.SELECTION_DISABLED),A=t.getColumnAttribute(s,Ae.SELECTION_VAL),k=t.getColumnAttribute(s,Ae.SELECTION_INDETERMINATE);return a.createVNode(hn,{disabled:I,indeterminate:k,modelValue:A,onChange:P},null)},C=()=>{if(s.type==="selection")return[w()];const{headClass:P,showTitle:I,cells:A}=N();return a.createVNode(c2,{class:P,column:s,headExplain:Gt(s.explain,"head",[s]),isHead:!0,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,resizerWay:e.resizerWay,title:I},uB(A)?A:{default:()=>[A]})},E=()=>{if(!t.getColumnAttribute(s,Ae.COL_IS_DRAG)&&s.sort&&!s.filter){const I={isCancel:!1,type:YH(t.getColumnRefAttribute(s,Ae.COL_SORT_TYPE))};h(I)}},_=Object.assign(t.getFixedStlye(s),{"--background-color":hp[((R=e.thead)==null?void 0:R.color)??gd.DEF1]}),x=t.getGroupAttribute(u),O=a.computed(()=>[t.getHeadColumnClass(s,o),t.getColumnCustomClass(s),s.align||e.headerAlign||e.align,{"is-last-child":(x==null?void 0:x.offsetLeft)+1===t.visibleColumns.length}]),T=a.computed(()=>O.value.concat([{"is-head-group":x==null?void 0:x.isGroup,"is-head-group-child":!!(x!=null&&x.parent)}])),$=()=>Gt(s,"label",[o,s]);return{getTH:()=>x!=null&&x.isGroup?a.createVNode("th",{style:_,class:T.value,colspan:x==null?void 0:x.thColspan,rowspan:x==null?void 0:x.thRowspan},[$()]):a.createVNode("th",a.mergeProps({style:_,class:O.value,colspan:x==null?void 0:x.thColspan,"data-id":t.getColumnId(s),rowspan:x==null?void 0:x.thRowspan,onClick:()=>E()},t.resolveEventListener(s,o)),[C()])}},hB=e=>{const t=a.ref(!1),n={start:null,end:null},r=m=>{m.key==="Shift"&&(t.value=!0)},s=m=>{m.key==="Shift"&&(t.value=!1,u())},o=(m,p)=>{n.start={index:p??null,row:m??null}},c=()=>{o()},d=(m,p)=>n.start===null&&n.end===null?(n.start={index:p,row:m},!1):(n.end={index:p,row:m},!0),u=()=>{n.start=null,n.end=null};return e.shiftMultiChecked&&(window.addEventListener("keydown",r),window.addEventListener("keyup",s)),{isShiftKeyDown:t,setStore:d,getStore:()=>n,clearStore:u,setStoreStart:o,clearStoreStart:c,removeMultiCheckedEvents:()=>{e.shiftMultiChecked&&(window.removeEventListener("keydown",r),window.removeEventListener("keyup",s))}}};function mB(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const gB=({props:e,ctx:t,columns:n,rows:r,pagination:s,settings:o})=>{const c=dt("table"),d=er();let u={};const h=hB(e),f=()=>a.createVNode("colgroup",null,[(n.visibleColumns||[]).map((A,k)=>{const L=`${BH(n.getColumnOrderWidth(A))}`.replace(/px$/i,""),F=n.getColumnAttribute(A,Ae.COL_MIN_WIDTH);return a.createVNode("col",{style:{width:as(L,"auto"),minWidth:as(F,"auto")}},null)})]),m=()=>{const A=l2(e),k={"--row-height":`${Gt(A,"height",["thead"])}px`,backgroundColor:e.thead.color};return a.createVNode(a.Fragment,null,[a.createVNode("thead",{style:k},[n.columnGroup.map((L,F)=>a.createVNode("tr",null,[L.map((Z,ae)=>{if(n.isHiddenColumn(Z))return null;const{getTH:K}=fB({props:e,ctx:t,columns:n,column:Z,index:ae,rows:r,rowIndex:F});return K()})]))])])},p=()=>e.showHead?a.createVNode("table",{cellpadding:0,cellspacing:0},[f(),m()]):null,y=()=>{const A="append-last-row",k=[...oi(e.rowStyle,[]),{"--row-height":`${N(null,null,"append-last-row")}px`}];if(e.appendLastRow.type==="default")return t.slots.appendLastRow?a.createVNode(Td,{key:A},{default:()=>{var L,F;return[a.createVNode("tr",{key:A,style:k},[a.createVNode("td",{colspan:n.visibleColumns.length},[((F=(L=e.appendLastRow).cellRender)==null?void 0:F.call(L,null,null))??t.slots.appendLastRow()])])]}}):void 0;if(e.appendLastRow.type==="summary")return a.createVNode(Td,{key:A},{default:()=>[a.createVNode("tr",{key:A,style:k},[n.visibleColumns.map((L,F)=>a.createVNode("td",null,[a.createVNode(c2,null,{default:()=>{var Z,ae;return[((ae=(Z=e.appendLastRow).cellRender)==null?void 0:ae.call(Z,L,F))??L.field??L.prop]}})]))])]})},b=A=>{let k={};const L=new WeakMap,F=n.needRowSpan.value;return a.createVNode("tbody",null,[A.map((Z,ae)=>{const K=$(Z,ae,k,A,L,F);return k=Z,K}),y()])},N=(A,k,L)=>{if(typeof e.rowHeight=="function"||/^\d+/.test(`${e.rowHeight}`))return Gt(e,"rowHeight",[{index:k,type:L??"tbody",row:A}]);const{size:F,height:Z,enabled:ae}=o.options;return ae&&Z!==null&&Z!==void 0?Gt(o.options,"height",["tbody",A,k,F]):ns},w=A=>{u=A},C=A=>{var F,Z;const k=A??r.pageRowList,L=a.computed(()=>e.emptyText===void 0?c.value.emptyText:e.emptyText);return k.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":d},[f(),b(k)]):((Z=(F=t.slots).empty)==null?void 0:Z.call(F))??a.createVNode(oB,{emptyText:L.value,filterList:k,list:e.data},null)},E=(A,k,L,F)=>{t.emit(St.ROW_CLICK,A,k,L,F)},_=(A,k,L,F)=>{t.emit(St.ROW_DBL_CLICK,A,k,L,F)},x=(A,k,L,F)=>{t.emit(St.ROW_MOUSE_ENTER,A,k,L,F)},O=(A,k,L,F)=>{t.emit(St.ROW_MOUSE_LEAVE,A,k,L,F)},T=(A,k,L,F,Z)=>{var ie;Z.has(A)||Z.set(A,new WeakMap),Z.get(A).has(F)||Z.get(A).set(F,{skipRowLen:0,skipRow:!1});let{skipRowLen:ae=0}=((ie=Z.get(L))==null?void 0:ie.get(F))??{},K=!1;const fe=xd(F,null,A,k,"rowspan");return ae>1?(ae=ae-1,K=!0):fe>1&&(ae=fe,K=!1),Object.assign(Z.get(A).get(F),{skipRowLen:ae,skipRow:K}),{skipRowLen:ae,skipRow:K}},$=(A,k,L,F,Z,ae,K=!1)=>{const fe=F.length,ie=[...oi(e.rowStyle,[A,k]),{"--row-height":`${N(A,k)}px`}],X=[...oi(e.rowClass,[A,k]),`hover-${e.rowHover}`,k%2===1&&e.stripe?"stripe-row":""],U=r.getRowAttribute(A,et.ROW_UID);return[a.createVNode(Td,{key:U},{default:()=>[a.createVNode("tr",a.mergeProps({key:U,style:ie,class:X,"data-row-index":k,draggable:!!e.rowDraggable,onClick:B=>E(B,A,k,F),onDblclick:B=>_(B,A,k,F),onMouseenter:B=>x(B,A,k,F),onMouseleave:B=>O(B,A,k,F)},u),[n.visibleColumns.map((B,Y)=>{const Q=[n.getFixedStlye(B),...oi(e.cellStyle,[B,Y,A,k])],{colspan:ue,rowspan:se}=KH(B,Y,A,k),{skipCol:we}=n.getColumnAttribute(B,Ae.COL_SPAN),{skipRow:ne}=ae&&!K?T(A,k,L,B,Z):{skipRow:!1},ye={"expand-cell":B.type==="expand"};if(!ne&&!we){let le;const ge=[n.getColumnClass(B,Y),n.getColumnCustomClass(B,A),B.align||e.align,...oi(e.cellClass,[B,Y,A,k]),{"expand-row":r.getRowAttribute(A,et.ROW_EXPAND),"is-last":k+se>=fe}],j=`${U}_${Y}`,ce=`${U}_${Y}_cell`,{renderCell:Ce}=lB({props:e,rows:r,ctx:t,columns:n,row:A,index:k,column:B,isChild:K,multiShiftKey:h}),oe=(z,he)=>{const pe={event:z,row:A,column:B,cell:{getValue:()=>Ce()},rowIndex:k,columnIndex:Y};t.emit(he,pe)};return a.createVNode("td",{key:j,style:Q,class:ge,colspan:ue,"data-id":j,rowspan:se,onClick:z=>oe(z,St.CELL_CLICK),onDblclick:z=>oe(z,St.CELL_DBL_CLICK)},[a.createVNode(c2,{key:ce,class:ye,column:B,"data-id":ce,intersectionObserver:e.intersectionObserver,isExpandChild:K,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,row:A},mB(le=Ce())?le:{default:()=>[le]})])}return null})])]}),D(A,X)]},D=(A,k,L)=>{if(r.getRowAttribute(A,et.ROW_EXPAND)){const Z=[...k,{row_expend:!0}],K=`${r.getRowAttribute(A,et.ROW_UID)}_expand`;return Array.isArray(A.children)?A.children.map((fe,ie)=>$(fe,ie,{},A,{},!1,!0)):a.createVNode(Td,{key:K},{default:()=>{var fe,ie;return[a.createVNode("tr",{class:Z},[a.createVNode("td",{colspan:n.visibleColumns.length,rowspan:1},[((ie=(fe=t.slots).expandRow)==null?void 0:ie.call(fe,A))??a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}},R=A=>{s.setPagination({limit:A}),t.emit(St.PAGE_LIMIT_CHANGE,A)},P=A=>{if(typeof e.pagination=="object"&&A!==s.options.current){s.setPagination({current:A,value:A}),t.emit(St.PAGE_VALUE_CHANGE,A);return}typeof e.pagination=="boolean"&&e.pagination!==!1&&t.emit(St.PAGE_VALUE_CHANGE,A)},I=()=>{if(s.isShowPagination.value)return a.createVNode(q0,a.mergeProps({style:"width: 100%;"},s.options,{modelValue:s.options.current,onChange:A=>P(A),onLimitChange:A=>R(A)}),null)};return a.onUnmounted(()=>{h.removeMultiCheckedEvents()}),{renderColumns:p,renderTBody:C,renderTFoot:I,setDragEvents:w}},pB=e=>{const t=a.reactive(new WeakMap),n=a.ref([]),r=a.reactive([]),s=k=>e.isRowSelectEnable?typeof e.isSelectedFn=="function"?e.isSelectedFn(c(k)):Array.isArray(e.checked)?e.checked.some(L=>typeof L!="object"?e.selectionKey.length&&Object.prototype.hasOwnProperty.call(k,e.selectionKey)?jH(k,e.selectionKey)===L:(console.warn("props.selectionKey is undefined or null or empty"),!1):Sd(L)===Sd(k)):!1:!1,o=()=>{let k=!1,L=!1;n.value.forEach((F,Z)=>{const ae=Sd(F);let K=qH(ae,er(),e);const fe=s(ae);fe?k=!0:L=!0,t.has(ae)||t.set(ae,{[et.ROW_EXPAND]:!1,[et.ROW_SELECTION]:fe,[et.ROW_UID]:K,[et.ROW_INDEX]:Z+1,[et.ROW_SELECTION_INDETERMINATE]:!1});const ie=t.get(ae);K=ie[et.ROW_UID],ie[et.ROW_INDEX]=Z+1}),t.set(rs,{[et.ROW_SELECTION]:k,[et.ROW_SELECTION_INDETERMINATE]:k&&L})},c=(k,L)=>({row:k,index:L??d(k,et.ROW_INDEX),isSelectAll:d(rs,et.ROW_SELECTION)}),d=(k,L)=>{var F;return(F=t.get(k))==null?void 0:F[L]},u=k=>{t.set(QF,{[et.ROW_SPAN]:k})},h=(k,L)=>_d(e,{row:k,index:L})?d(k,et.ROW_SELECTION):!0,f=k=>{if(typeof e.isSelectedFn=="function"){_(k,e.isSelectedFn(c(k)));return}_(k,!d(k,et.ROW_SELECTION))},m=k=>{const L=k??!p();if(t.set(rs,{[et.ROW_SELECTION]:L,[et.ROW_SELECTION_INDETERMINATE]:!1}),e.acrossAll){n.value.forEach((F,Z)=>_(F,L,Z));return}r.forEach((F,Z)=>_(F,L,Z))},p=()=>e.acrossAll?n.value.every((k,L)=>h(k,L)):r.every((k,L)=>h(k,L)),y=()=>e.acrossAll?n.value.some(k=>d(k,et.ROW_SELECTION)):r.some(k=>d(k,et.ROW_SELECTION)),b=k=>{m(k)},N=()=>{const k=p();E(rs,et.ROW_SELECTION,k),E(rs,et.ROW_SELECTION_INDETERMINATE,!k&&y())},w=()=>d(rs,et.ROW_SELECTION_INDETERMINATE),C=()=>d(rs,et.ROW_SELECTION),E=(k,L,F)=>{const Z=Sd(k),ae=t.get(Z);ae&&Object.prototype.hasOwnProperty.call(ae,L)&&(ae[L]=F)},_=(k,L,F)=>{let Z=L;typeof e.isSelectedFn=="function"&&(Z=e.isSelectedFn(c(k,F))),_d(e,{row:k,index:F??d(k,et.ROW_INDEX)})&&E(k,et.ROW_SELECTION,Z),N()},x=(k,L)=>{E(k,et.ROW_INDEX,L)},O=(k,L)=>{E(k,et.ROW_EXPAND,L)},T=k=>{let L=0;const F=50,Z=()=>{const ae=L+F;r.push(...k.slice(L,ae)),ae<k.length&&(L=ae,setTimeout(()=>{Z()}))};if(k.length>F){Z();return}r.push(...k)};return{setRowIndex:x,setRowExpand:O,isRowChecked:h,setPageRowList:k=>{r.length=0,T(k)},setTableRowList:k=>{n.value.length=0,n.value.push(...k),o()},clearSelection:()=>{n.value.forEach(k=>_(k,!1))},formatDataSchema:o,toggleRowSelection:f,setRowSelectionAll:b,setRowSelection:_,setAllRowExpand:k=>{n.value.forEach(L=>O(L,k??!0))},setTableIsNeedRowSpan:u,getRowAttribute:d,getRowSelection:()=>n.value.filter(k=>d(k,et.ROW_SELECTION)),getRowIndeterminate:w,getRowCheckedAllValue:C,changePageRowIndex:(k,L)=>{const F=r[k];r.splice(L,0,F);const Z=k<L?k:k+1;r.splice(Z,1)},toggleAllSelection:m,tableRowList:n,tableRowSchema:t,pageRowList:r}};function Ap(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const vB=(e,t,n,r)=>{const s=dt("table"),{resolveClassName:o}=xe(),c=qF(s),d=a.ref(!1),u=(X,U)=>Gt(X,["id","field","type"],[X,U]),h=()=>({enabled:!0,fields:e.columns.map(X=>Object.assign({},X,{field:X.field||X.type})),checked:[],limit:0,size:"small",sizeList:c,showLineHeight:!0,extCls:"",trigger:"manual",height:Mo.small}),f=X=>typeof X=="boolean"&&X!==!1?h():X?Object.assign({},h(),X):{enabled:!1},m=a.ref(null),p=a.reactive(h()),y=X=>{Object.assign(p,f(X))};a.watch(()=>[e.settings],()=>{y(e.settings)},{immediate:!0,deep:!0});const b=a.ref(p.size||"small"),N=a.ref(Mo.small),w=a.ref(p.checked||[]),E=`light ${o("table-settings")}`,_=a.computed(()=>p.fields||e.columns||[]),x={checkAll:d.value,activeSize:b.value,activeHeight:N.value,checkedFields:p.checked||[]},O=()=>{var U;Object.assign(x,{checkAll:d.value,activeSize:b.value,activeHeight:N.value,checkedFields:w.value});const X={checked:w.value,size:b.value,height:N.value,fields:a.unref(_)};Object.assign(p,X),n.setColumnAttributeBySettings(p,X.checked),n.setVisibleColumns(),r==null||r(X.checked),(U=m.value)==null||U.hide(),t.emit(St.SETTING_CHANGE,X)},T=()=>{var X;d.value=x.checkAll,b.value=x.activeSize,N.value=x.activeHeight,w.value=x.checkedFields,(X=m.value)==null||X.hide()},$=()=>{var X;p.trigger==="manual"&&((X=m.value)==null||X.show())},D=X=>{X.stopImmediatePropagation(),X.stopPropagation(),X.preventDefault(),d.value=!d.value;const U=p.fields||e.columns||[],B=U.filter((Y,Q)=>Y.disabled&&w.value.includes(u(Y,Q))).map((Y,Q)=>u(Y,Q));if(d.value){const Y=U.filter(Q=>!Q.disabled).map((Q,ue)=>u(Q,ue));w.value.splice(0,w.value.length,...Y,...B)}else w.value.splice(0,w.value.length,...B)},R=a.computed(()=>(p.limit??0)>0),P=p.sizeList||c,I=a.computed(()=>R.value&&(p.limit?p.limit:0)<=w.value.length),A=(X,U)=>X.disabled||I.value&&!w.value.includes(u(X,U)),k=X=>{b.value=X.value,N.value=X.height},L=X=>({"line-size":!0,"is-medium":b.value==="medium",active:X.value===b.value}),F={marginRight:"12px"},Z=()=>P.map(X=>a.createVNode("span",{class:L(X),onClick:()=>k(X)},[X.label])),ae=a.computed(()=>w.value.length>0&&w.value.length<_.value.length),K=a.computed(()=>typeof p.showLineHeight=="boolean"?p.showLineHeight:!0);a.watch(()=>[w.value],()=>{w.value.length||(d.value=!1),w.value.length&&_.value.every((X,U)=>w.value.includes(u(X,U)))&&(d.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{w.value.splice(0,w.value.length,...p.checked)},{immediate:!0,deep:!0});const fe=()=>{var U,B,Y,Q;let X;return((B=(U=t.slots).settings)==null?void 0:B.call(U))??a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"setting-head"},[a.createVNode("span",{class:"head-title"},[s.value.setting.title]),a.createVNode(eo,{class:"icon-close-action",onClick:T},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]),R.value?a.createVNode("span",{class:"limit"},[s.value.setting.fields.subtitle(p.limit)]):""]),R.value?"":a.createVNode("span",{class:"check-all",onClick:D},[a.createVNode(hn,{indeterminate:!!ae.value,label:s.value.setting.fields.selectAll,modelValue:w.value.length>0},{default:()=>[s.value.setting.fields.selectAll]})])]),a.createVNode(Tc,{class:"setting-body-fields",modelValue:w.value,"onUpdate:modelValue":ue=>w.value=ue},Ap(X=_.value.map((ue,se)=>{let we;return a.createVNode("div",{class:"field-item"},[a.createVNode(hn,{checked:w.value.includes(u(ue,se)),disabled:A(ue,se),label:u(ue,se)},Ap(we=Gt(ue,["name","label"],[ue,se]))?we:{default:()=>[we]})])}))?X:{default:()=>[X]}),(Q=(Y=t.slots).setting)==null?void 0:Q.call(Y),K.value?a.createVNode("div",{class:"setting-body-line-height"},[s.value.setting.lineHeight.title,a.createTextVNode(":"),Z()]):""]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Rt,{style:F,theme:"primary",onClick:O},{default:()=>[s.value.setting.options.ok]}),a.createVNode(Rt,{style:F,onClick:T},{default:()=>[s.value.setting.options.cancel]})])])};return{options:p,renderSettings:()=>e.settings?a.createVNode(Tn,a.mergeProps({ref:m,extCls:p.extCls,arrow:!0,placement:"bottom-end",trigger:p.trigger??"manual"},{theme:E}),{default:()=>a.createVNode("span",{class:"table-head-settings",onClick:$},[a.createVNode(jl,{style:"color: #c4c6cc;"},null)]),content:()=>a.createVNode("div",{class:"setting-content"},[fe()])}):null}},$p=en(a.defineComponent({name:"Table",props:lH,emits:wH,setup(e,t){const n=QH(e),r=pB(e),s=iB(e),{renderContainer:o,renderFixedBottom:c,renderBody:d,renderHeader:u,renderFooter:h,setBodyHeight:f,setFootHeight:m,setDragOffsetX:p,setOffsetRight:y,setHeaderRowCount:b,refBody:N,refRoot:w}=aB(e,t),C=(...Y)=>{var Q;return(Q=N.value)==null?void 0:Q.scrollTo(...Y)},_=vB(e,t,n,Y=>{(Y==null?void 0:Y.length)>0&&C(0,0)}),x=eB(e,r,t),{renderColumns:O,renderTBody:T,renderTFoot:$,setDragEvents:D}=gB({props:e,ctx:t,columns:n,rows:r,pagination:s,settings:_});D(x);const{resolveColumns:R}=NH(),P=a.getCurrentInstance(),I=()=>{var Q;const Y=((Q=P.subTree)==null?void 0:Q.children)??[];n.debounceUpdateColumns(R(Y),()=>{b(n.columnGroup.length)})};a.provide(mp,I);const{renderFixedRows:A,resolveFixedColumnStyle:k}=tB(e,n),L=()=>{var Q;const Y=((Q=w.value)==null?void 0:Q.offsetWidth)-(e.scrollbar?1:fp);n.resolveColsCalcWidth(Y),k()},{dragOffsetX:F}=CH(n,{afterResize:k}),Z=a.ref(!1),ae=Y=>{if(!s.isShowPagination.value||e.remotePagination)return Y;const Q=(s.options.current-1)*s.options.limit,ue=Q+s.options.limit;return Y.slice(Q,ue)},K=()=>{let Y=r.tableRowList.value.slice();return n.filterColumns.forEach(Q=>{var ue;!n.isHiddenColumn(Q.col)&&Q[Ae.COL_FILTER_FN]&&((ue=Q[Ae.COL_FILTER_VALUES])!=null&&ue.length)&&(Y=Y.filter((se,we)=>Q[Ae.COL_FILTER_FN](Q[Ae.COL_FILTER_VALUES],se,we,e.data)))}),n.sortColumns.forEach(Q=>{!n.isHiddenColumn(Q.col)&&Q[Ae.COL_SORT_FN]&&Q.active&&Y.sort((ue,se)=>{let we=null,ne=null;return Q.col.type==="index"&&(we=r.getRowAttribute(ue,et.ROW_INDEX),ne=r.getRowAttribute(se,et.ROW_INDEX)),Q[Ae.COL_SORT_FN](ue,se,we,ne)})}),Y},fe=a.computed(()=>s.isShowPagination.value?e.paginationHeight:0),ie=()=>{m(fe.value),/^\d+\.?\d*(px)?$/.test(`${e.height}`)&&f(Number(`${e.height}`.replace("px","")))},X=pn.debounce((Y=!0)=>{const Q=K();e.remotePagination||s.setPagination({count:Q.length});const ue=ae(Q);r.setPageRowList(ue),a.nextTick(()=>{y(),Y&&C(0,0)})},64),U=a.ref(!1);let B=null;return sB(w,()=>{if(!U.value){if(U.value=!0,(e.height==="100%"||e.virtualEnabled)&&pn.isElement(w.value)){if(Z.value){setTimeout(()=>{Z.value=!1});return}const Y=w.value.offsetHeight;Z.value=!0,f(Y),y()}L(),y(),C(0,0);return}B&&clearTimeout(B),B=setTimeout(()=>{U.value=!1})}),a.watch(()=>[e.columns],()=>{n.debounceUpdateColumns(e.columns,()=>{b(n.columnGroup.length)})},{immediate:!0}),a.watch(()=>[F.value],()=>{p(F.value)}),a.watch(()=>[n.visibleColumns],()=>{a.nextTick(()=>L())},{immediate:!0,deep:!0}),a.watch(()=>[n.sortColumns,n.filterColumns],()=>{X()},{deep:!0}),a.watch(()=>[s.isShowPagination.value],()=>{ie()},{immediate:!0}),a.watch(()=>[e.data],()=>{r.setTableRowList(e.data),X(!1)},{immediate:!0,deep:!0}),a.watch(()=>[s.options.count,s.options.limit,s.options.current],()=>{X()},{immediate:!0}),t.expose({setRowExpand:r.setRowExpand,setAllRowExpand:r.setAllRowExpand,clearSelection:()=>{r.clearSelection(),n.clearSelectionAll()},toggleAllSelection:r.toggleAllSelection,toggleRowSelection:r.toggleRowSelection,getSelection:r.getRowSelection,clearSort:n.clearColumnSort,scrollTo:C,getRoot:()=>w.value}),()=>o([u(O,_.renderSettings,A),d(r.pageRowList,T,A),c(),h($())])}}),{Column:dH}),Vp=a.defineComponent({name:"ListTagRender",props:{node:v.object,searchKey:v.oneOfType([v.string,v.arrayOf(v.string)]),displayKey:v.string,searchKeyword:v.string,tpl:{type:Function},disabled:v.bool.def(!1)},render(){const{resolveClassName:e}=xe(),t=r=>{if(this.searchKeyword&&!this.disabled){const s=new RegExp(`(${this.searchKeyword})`,"i");return r.replace(s,'<strong class="highlight-text">$1</strong>')}return r};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])])}}),yB=()=>({modelValue:v.arrayOf(v.string).def([]),placeholder:v.string.def(""),list:v.arrayOf(v.object).def([]),disabled:v.bool.def(!1),tooltipKey:v.string.def(""),saveKey:v.string.def("id"),displayKey:v.string.def("name"),hasDeleteIcon:v.bool.def(!1),clearable:v.bool.def(!0),trigger:Pe("treeTriggerType",{}).def("search"),searchKey:v.oneOfType([v.string,v.arrayOf(v.string)]).def("name"),useGroup:v.bool.def(!1),allowCreate:v.bool.def(!1),maxData:v.number.def(-1),maxResult:v.number.def(10),contentMaxHeight:v.number.def(300),contentWidth:v.number.def(190),separator:v.string.def(""),allowNextFocus:v.bool.def(!0),allowAutoMatch:v.bool.def(!1),showClearOnlyHover:v.bool.def(!1),isAsyncList:v.bool.def(!1),leftSpace:v.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:()=>({})}}),bB=a.defineComponent({name:"TagRender",directives:{bkTooltips:pa},props:{node:v.object,displayKey:v.string,tooltipKey:v.string,tpl:{type:Function},hasTips:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:()=>({})}},setup(e){const t=a.ref(),n=a.ref(!1),r=a.computed(()=>({boundary:"window",theme:"light",distance:12,content:e.node[e.tooltipKey],disabled:!KR.has(e.node,e.tooltipKey)||!n.value,...e.tagOverflowTips}));return a.onMounted(()=>{n.value=Av(t.value)}),{overflowTips:r,tagRef:t}},render(){return this.tpl?this.tpl(this.node,a.h,this):a.withDirectives(a.createVNode("div",{ref:"tagRef",class:"tag"},[a.createVNode("span",{class:"text"},[this.node[this.displayKey]])]),[[a.resolveDirective("bk-tooltips"),this.overflowTips]])}}),wB=a.defineComponent({name:"TagInput",directives:{bkTooltips:pa},props:yB(),emits:["update:modelValue","change","select","focus","blur","remove","removeAll","input"],setup(e,{emit:t}){const n=Qn(),r=dt("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}=xe(),{maxResult:d}=a.toRefs(e),{pageState:u,initPage:h,pageChange:f}=BE(d),m=a.ref(""),p=a.ref(null),y=a.ref(null),b=a.ref(null),N=a.ref(null),w=a.ref(null),C=a.ref(null),E=a.computed(()=>!e.disabled&&e.hasDeleteIcon),_=a.computed(()=>e.maxData===1),x=a.computed(()=>D.selectedTagList.length===0&&m.value===""&&!s.isEdit),O=a.computed(()=>e.placeholder||r.value.placeholder),T=a.computed(()=>e.clearable&&!e.disabled&&D.selectedTagList.length!==0&&(e.showClearOnlyHover?s.isHover:!0)),$=a.computed(()=>({[`${c("tag-input-trigger")}`]:!0,active:s.isEdit,disabled:e.disabled})),D=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),R=a.computed(()=>D.selectedTagList.map(W=>W[e.saveKey])),{flatList:P,saveKeyMap:I}=zE(e),A=a.computed(()=>{if(e.useGroup){const W={};return u.curPageList.forEach((te,be)=>{te.__index__=be,W[te.group.groupId]||(W[te.group.groupId]={id:te.group.groupId,name:te.group.groupName,children:[]}),W[te.group.groupId].children.push(te)}),Object.keys(W).map(te=>W[te])}return u.curPageList});a.watch([()=>P.value],()=>{a.nextTick(()=>{ae()})},{deep:!0}),a.watch(()=>e.modelValue,W=>{var te;ie(R.value,W)||(a.nextTick(()=>{ae()}),e.withValidate&&((te=n==null?void 0:n.validate)==null||te.call(n,"change")))}),a.watch(m,hl(()=>{const W=u.curPageList.length!==0,{value:te}=m;te!==""&&W||te===""&&e.trigger==="focus"&&W?o.isShow=!0:(e.trigger!=="focus"||!W)&&(o.isShow=!1)},150)),a.watch(()=>o.isShow,W=>{k(),W&&w.value&&(a.nextTick(()=>{w.value.scrollTop=0}),w.value.removeEventListener("scroll",L),w.value.addEventListener("scroll",L))}),a.onMounted(()=>{ae()});const k=()=>{var W;o.offset.crossAxis=_.value?0:(W=N.value)==null?void 0:W.offsetLeft},L=()=>{if(u.isPageLoading||w.value.scrollTop===0)return;const{scrollTop:W,offsetHeight:te,scrollHeight:be}=w.value;if(W+te>=be){const $e=u.curPage+1;$e<=u.totalPage&&(u.isPageLoading=!0,setTimeout(()=>{f($e)},500))}},F=()=>{var te;return Array.from(((te=b.value)==null?void 0:te.childNodes)||[]).filter(be=>![Node.TEXT_NODE,Node.COMMENT_NODE].includes(be.nodeType))},Z=W=>{if(!e.disabled){if(W!=null&&W.target){const{className:te}=W.target;(te.indexOf(`${c("tag-input-trigger")}`)>-1||te.indexOf("tag-list")>-1)&&b.value.appendChild(N.value)}clearTimeout(C.value),_.value&&R.value.length&&(D.tagListCache=[...R.value],D.selectedTagListCache=[...D.selectedTagList],m.value=D.selectedTagListCache[0][e.saveKey],pe(D.selectedTagList[0],0),Q()),s.isEdit=!0,setTimeout(()=>{var te;(te=p.value)==null||te.focus(),e.trigger==="focus"&&D.localList.length!==0&&(K(),o.isShow?k():o.isShow=!0)},200)}},ae=()=>{const{saveKey:W,modelValue:te,displayKey:be,allowCreate:$e,trigger:Ve,isAsyncList:Re}=e;if(D.selectedTagList=[],D.localList=P.value,te.length){const We={};D.selectedTagList=te.map(nt=>{const st=I.value[nt];return We[nt]=1,!st&&$e?{[W]:nt,[be]:nt}:st}).filter(nt=>nt),_.value||(D.localList=D.localList.filter(nt=>!We[nt[W]]))}if(Re&&m.value){K(m.value),u.curPageList.length&&(o.isShow=!0);return}Ve==="focus"&&K()},K=(W="")=>{const{searchKey:te,filterCallback:be}=e,$e=W.toLowerCase().trim();if($e===""){h(D.localList);return}let Ve=[];typeof be=="function"?Ve=be($e,te,D.localList)||[]:Array.isArray(te)?Ve=D.localList.filter(Re=>te.some(We=>Re[We].toLowerCase().indexOf($e)>-1)):Ve=D.localList.filter(Re=>Re[te].toLowerCase().indexOf($e)>-1),h(Ve)},fe=(W,te)=>{const be={[`${c("selector-actived")}`]:!0,[`${c("selector-selected")}`]:R.value.includes(W[e.saveKey])};return e.useGroup?be[`${c("selector-actived")}`]=W.__index__===s.focusItemIndex:be[`${c("selector-actived")}`]=te===s.focusItemIndex,be};function ie(W,te){return W.length!==te.length?!1:te.every((be,$e)=>W[$e]===be)}const X=()=>{D.tagListCache=[],D.selectedTagListCache=[],D.selectedTagList=[]},U=()=>{m.value=""},B=()=>{if(_.value)return 0;const te=F().findIndex(({id:be})=>be==="tagInputItem");return te>=0?te:0},Y=(W,te,be=!1)=>{if(!te||!W)return;let $e=te;be&&($e=te.nextElementSibling||null),te.parentNode.insertBefore(W,$e)},Q=W=>{const{maxData:te,trigger:be,allowCreate:$e}=e;if(te===-1||te>R.value.length){const{value:Ve}=W!=null&&W.target?W.target:m,Re=O6(Ve);Re?(K(Ve),p.value.style.width=`${Re*Ks}px`):be==="focus"&&K()}else se(),m.value="",o.isShow=!1;s.isEdit=!0,s.focusItemIndex=$e?-1:0,t("input",m.value)},ue=()=>{var W;o.width=_.value?(W=y.value)==null?void 0:W.clientWidth:e.contentWidth,t("focus")},se=()=>{C.value=setTimeout(()=>{var te;const W=m.value;if(U(),s.isEdit=!1,e.allowAutoMatch&&W){if(_.value){const[$e]=D.tagListCache;W===$e&&D.selectedTagListCache.length?he(D.selectedTagListCache[0],"select"):ye("remove")}const be=u.curPageList.find($e=>Array.isArray(e.searchKey)?e.searchKey.map(Re=>$e[Re]).includes(W):$e[e.searchKey]===W);be?we(be,"select"):e.allowCreate&&we(W,"custom")}o.isShow=!1,t("blur",W,R.value),(te=n==null?void 0:n.validate)==null||te.call(n,"blur")},200)},we=(W,te,be)=>{be==null||be.stopPropagation(),!(!W||W.disabled)&&(_.value&&X(),he(W,te),ye("select"),U(),o.isShow=!1)},ne=(W,te,be)=>{be==null||be.stopPropagation(),pe(W,te),U(),ye("remove",W),p.value.style.width=`${Ks}px`},ye=(W,te)=>{t(W,te),t("update:modelValue",R.value),t("change",R.value)},le=W=>{W.stopPropagation();const te=D.selectedTagList;D.selectedTagList=[];const be=te.filter($e=>I.value[$e[e.saveKey]]);(e.allowCreate&&be.length!==0||!e.allowCreate)&&!_.value&&D.localList.push(...be),ye("removeAll")},ge=()=>{const W={height:w.value.clientHeight,yAxis:w.value.getBoundingClientRect().y};a.nextTick(()=>{const te=w.value.querySelector(`.${c("selector-actived")}`);if(!te)return;const be={height:te.clientHeight,yAxis:te.getBoundingClientRect().y};be.yAxis<W.yAxis&&(w.value.scrollTop=w.value.scrollTop-(W.yAxis-be.yAxis));const $e=be.yAxis+be.height-W.yAxis;$e>W.height&&(w.value.scrollTop=w.value.scrollTop+$e-W.height)})},j=(W,te)=>{const be=F();Y(N.value,be[W-1]),D.selectedTagList.splice(W-1,1),Z();const $e=I.value[te[e.saveKey]];(e.allowCreate&&$e||!e.allowCreate)&&!_.value&&D.localList.push(te),p.value=`${Ks}px`,ye("remove")},ce=W=>{if(u.isPageLoading)return;let te;const be=W.target.value,$e=O6(be),Ve=B(),Re=F();switch(W.code){case"ArrowUp":if(W.preventDefault(),!o.isShow)return;s.focusItemIndex=s.focusItemIndex-1,s.focusItemIndex=s.focusItemIndex<0?-1:s.focusItemIndex,s.focusItemIndex===-1&&(s.focusItemIndex=u.curPageList.length-1),ge();break;case"ArrowDown":if(W.preventDefault(),!o.isShow)return;s.focusItemIndex=s.focusItemIndex+1,s.focusItemIndex=s.focusItemIndex>u.curPageList.length-1?u.curPageList.length:s.focusItemIndex,s.focusItemIndex===u.curPageList.length&&(s.focusItemIndex=0),ge();break;case"ArrowLeft":if(s.isEdit=!0,!$e){if(Ve<1)return;Y(N.value,Re[Ve-1]),Z()}break;case"ArrowRight":if(s.isEdit=!0,!$e){if(Ve===Re.length-1)return;Y(Re[Ve+1],N.value),Z()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&o.isShow||e.allowCreate&&s.focusItemIndex>=0&&o.isShow?we(u.curPageList[s.focusItemIndex],"select",W):e.allowCreate&&m.value.trim()&&we(m.value,"custom",W),W.preventDefault();break;case"Backspace":Ve!==0&&!m.value&&(te=D.selectedTagList[Ve-1],j(Ve,te));break}},Ce=W=>{const te=[],be=W.split(";"),$e=/^[a-zA-Z][a-zA-Z_]*/g;return be.forEach(Ve=>{const Re=Ve.match($e);if(Re){const We=Re.join("");te.push({[e.saveKey]:We,[e.displayKey]:We})}}),te},oe=W=>{if(W.preventDefault(),_.value)return!1;const{maxData:te,saveKey:be,displayKey:$e,pasteFn:Ve,allowCreate:Re}=e,We=W.clipboardData.getData("text");let st=(Ve?Ve(We):Ce(We)).map(at=>at[be]);if(st.length){const at=F(),Vt=B(),gt=D.localList.map(Ye=>Ye[be]);if(st=st.filter(Ye=>{const Kt=(Ye==null?void 0:Ye.trim())&&!R.value.includes(Ye);return Re?Kt:Kt&>.includes(Ye)}),te!==-1){const Ye=D.selectedTagList.length;if(Ye<te){const Kt=te-Ye;st.length>Kt&&(st=[...st.slice(0,Kt)])}else st=[]}const Lt=Re?st.map(Ye=>D.localList.find(is=>is[be]===Ye)??{[be]:Ye,[$e]:Ye}):D.localList.filter(Ye=>st.includes(Ye[be]));st.length&&(D.selectedTagList.splice(Vt,0,...Lt),Y(N.value,at[Vt]),p.value.style.width=`${Ks}px`,D.localList=D.localList.filter(Ye=>!st.includes(Ye[be])),ye("select"),Z())}},z=W=>{e.disabled||(Y(N.value,W.currentTarget,!0),p.value.style.width=`${Ks}px`,o.isShow&&k())},he=(W,te)=>{if(D.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:be,saveKey:$e,displayKey:Ve,createTagValidator:Re}=e,We=B();let nt=1,st=!1,at;const Vt=gt=>typeof Re=="function"?Re(gt):!0;if(te==="custom")if(be){let gt=W.split(be);gt=gt.filter(Ye=>(Ye==null?void 0:Ye.trim())&&!R.value.includes(Ye)&&Vt(Ye));const Lt=gt.map(Ye=>I.value[Ye]||{[$e]:Ye,[Ve]:Ye});gt.length&&(D.selectedTagList.splice(We,0,...Lt),nt=Lt.length,st=!0)}else{const gt=typeof W=="object";if(at=gt?W[$e]:W.trim(),at=at.replace(/\s+/g,""),at!==void 0&&!R.value.includes(at)&&Vt(at)){const Lt=I.value[at]||(gt?W:{[$e]:at,[Ve]:at});D.selectedTagList.splice(We,0,Lt),st=!0}}else W&&(at=W[$e],at!==void 0&&!R.value.includes(at)&&(D.selectedTagList.splice(We,0,W),st=!0));st&&a.nextTick(()=>{for(let gt=1;gt<=nt;gt++){const Ye=F()[We+gt];Y(Ye,N.value)}if(p.value.style.width=`${Ks}px`,!_.value){e.allowNextFocus&&Z();const gt=R.value.reduce((Lt,Ye)=>(Lt[Ye]=1,Lt),{});D.localList=D.localList.filter(Lt=>!gt[Lt[$e]])}})},pe=(W,te)=>{D.selectedTagList.splice(te,1);const be=I.value[W[e.saveKey]];(e.allowCreate&&be||!e.allowCreate)&&!_.value&&D.localList.push(W)},q=a.computed(()=>e.collapseTags?e.collapseTags&&!s.isEdit:e.collapseTags),{overflowTagIndex:G}=L6(y,q,R),ee=a.computed(()=>D.selectedTagList.reduce((W,te,be)=>(G.value!==null&&be>=G.value&&W.push(te[e.displayKey]),W),[]));return{popoverProps:o,...a.toRefs(s),...a.toRefs(D),...a.toRefs(u),isShowPlaceholder:x,isShowClear:T,placeholderText:O,curInputValue:m,renderList:A,showTagClose:E,tagInputRef:p,bkTagSelectorRef:y,tagListRef:b,tagInputItemRef:N,selectorListRef:w,triggerClass:$,overflowTagIndex:G,localCollapseTags:q,collapseTooltip:ee,focusInputTrigger:Z,activeClass:fe,handleInput:Q,handleFocus:ue,handleBlur:se,handleTagSelected:we,handleTagRemove:ne,handleClear:le,tagFocus:z,handleKeydown:ce,handlePaste:oe,resolveClassName:c}},render(){return a.createVNode("div",{ref:"bkTagSelectorRef",class:`${this.resolveClassName("tag-input")}`,onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode(Tn,a.mergeProps({arrow:!1,placement:"bottom-start",theme:`light ${this.resolveClassName("tag-input-popover-content")}`,trigger:"manual"},this.popoverProps),{default:()=>{var e,t;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`},class:"tag-list"},[this.selectedTagList.map((n,r)=>{const s=this.localCollapseTags&&this.overflowTagIndex&&r>=this.overflowTagIndex;return a.createVNode("li",{style:{display:s?"none":""},class:"tag-item",onClick:this.tagFocus},[a.createVNode(bB,{displayKey:this.displayKey,node:n,tagOverflowTips:this.tagOverflowTips,tooltipKey:this.tooltipKey||this.displayKey,tpl:this.tagTpl},null),this.showTagClose&&a.createVNode(tn,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,n,r)},null)])}),a.withDirectives(a.createVNode("li",{id:"tagInputItem",ref:"tagInputItemRef",class:"tag-input-item",role:"input"},[a.withDirectives(a.createVNode("input",{ref:"tagInputRef",class:"tag-input","onUpdate:modelValue":n=>this.curInputValue=n,type:"text",onBlur:this.handleBlur,onFocus:this.handleFocus,onInput:this.handleInput,onKeydown:this.handleKeydown,onPaste:this.handlePaste},null),[[a.vModelText,this.curInputValue]])]),[[a.vShow,this.isEdit]]),!!this.overflowTagIndex&&this.localCollapseTags&&a.withDirectives(a.createVNode("li",{class:"tag-item"},[a.createVNode("div",{class:"tag"},[a.createVNode("span",{class:"text"},[a.createTextVNode("+"),this.selectedTagList.length-this.overflowTagIndex])])]),[[a.resolveDirective("bk-tooltips"),this.collapseTooltip.join(", ")]])]),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(un,{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,r)=>a.createVNode("li",{class:[`${this.resolveClassName("selector-list-item")}`,{disabled:n.disabled},this.activeClass(n,r)],onClick:this.handleTagSelected.bind(this,n,"select")},[a.createVNode(Vp,{disabled:n.disabled,displayKey:this.displayKey,node:n,searchKey:this.searchKey,searchKeyword:this.curInputValue,tpl:this.tpl},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(Vp,{disabled:e.disabled,displayKey:this.displayKey,node:e,searchKey:this.searchKey,searchKeyword:this.curInputValue,tpl:this.tpl},null)])),this.isPageLoading?a.createVNode("li",{class:`${this.resolveClassName("selector-list-item")} loading`},[a.createVNode(da,{size:Ga.Small,theme:"primary"},null)]):null])])})])}}),Dp=Je(wB),kp=Je(x$),CB={list:v.arrayOf(v.shape({tag:v.string,content:v.oneOfType([v.string,v.object]),type:v.string,size:v.string,color:v.string,icon:v.func,filled:v.bool,border:v.bool,nodeType:v.timelineNodeType()}).isRequired),titleAble:v.bool.def(!1)},Ed=Je(a.defineComponent({name:"Timeline",props:CB,emits:["select"],setup(e,{emit:t}){const n=a.shallowRef([]),{resolveClassName:r}=xe(),s=o=>{t("select",o)};return a.watch(()=>e.list,()=>{n.value=e.list.map(o=>({tag:o.tag,content:o.content,type:o.type,size:o.size,color:o.color,icon:o.icon,filled:o.filled,border:o.border??!0,nodeType:o.nodeType||"template"}))},{immediate:!0,deep:!0}),{defaultTimelines:n,handleTitleSelect:s,resolveClassName:r}},render(){const e=r=>{const{icon:s}=r;return typeof s=="object"||typeof s=="function"},t=r=>{const s=this.resolveClassName("timeline"),o=["blue","red","green","yellow","gray"],c=r.type?`${s}-${r.type}`:`${s}-default`,d=r.size?`${s}-${r.size}`:"",u=r.filled?`${s}-filled`:"",h=r.color&&o.includes(r.color)?`${s}-${r.color}`:"",f=e(r)?`${s}-custom`:"";return Ue({},`${s} ${c} ${d} ${h} ${u} ${f}`)},n=r=>this.$slots.content?a.createVNode("div",{class:`${this.resolveClassName("timeline-content")}`},[this.$slots.content(r)]):r.nodeType==="vnode"?a.createVNode("div",{class:`${this.resolveClassName("timeline-content")}`},[r.content]):a.createVNode("div",{class:`${this.resolveClassName("timeline-content")}`,innerHTML:r.content},null);return a.createVNode("ul",{class:this.resolveClassName("timeline")},[this.defaultTimelines.map(r=>a.createVNode("li",{class:[`${this.resolveClassName("timeline-dot")}`,t(r)]},[e(r)&&a.createVNode("div",{style:{border:r.border?`2px solid ${r.color}`:"0px",borderRadius:r.border?"50%":"0"},class:`${this.resolveClassName("timeline-icon")}`},[a.createVNode("span",{class:`${this.resolveClassName("timeline-icon-inner")}`},[typeof r.icon=="function"?a.createVNode(r.icon,null,null):r.icon])]),a.createVNode("div",{class:`${this.resolveClassName("timeline-section")}`},[a.createVNode("div",{class:`${this.resolveClassName("timeline-title")}`,onClick:()=>this.handleTitleSelect(r)},[r.nodeType==="vnode"?r.tag:a.createVNode("span",{innerHTML:r.tag},null)]),n(r)])]))])}}));var Vr=(e=>(e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e.OBJECT_ARRAY="objectArray",e))(Vr||{});const NB={title:v.arrayOf(v.string).def([]),extCls:v.string.def(""),searchPlaceholder:v.string.def(""),settingKey:v.string.def("id"),displayKey:v.string.def("value"),sortKey:v.string.def("value"),showOverflowTips:v.bool.def(!1),searchable:v.bool.def(!1),sortable:v.bool.def(!1),sourceList:v.arrayOf(v.any).def([]),targetList:v.arrayOf(v.any).def([]),emptyContent:v.arrayOf(v.string).def([]),multiple:v.bool.def(!1)};function xB(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}function _B(e,t,n){const r=a.ref([]),s=a.ref([]),o=(c=!1)=>{c&&(r.value=[],s.value=[]),e.value.forEach(d=>{const u=d[n.value];t.value.includes(u)?s.value.push(d):r.value.push(d)})};return o(),a.watch(()=>[e,t,n],()=>{o(!0)},{deep:!0}),{selectList:r,selectedList:s}}function SB(e,t){const n=a.ref(""),r=a.computed(()=>e.value.filter(s=>{const o=s[t.value];return o instanceof Object?!1:o.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:r}}const Ip=Je(a.defineComponent({name:"Transfer",props:NB,emits:["change","update:targetList"],setup(e,{emit:t}){const n=dt("transfer"),r=a.ref({source:!1,target:!1}),s=a.ref({source:[],target:[]}),o=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(I=>I.toString().includes("[object Object]"))?Vr.OBJECT_ARRAY:Vr.BASE_ARRAY:Vr.NOT_ARRAY),c=a.computed(()=>o.value===Vr.BASE_ARRAY?"value":e.settingKey),d=a.computed(()=>o.value===Vr.BASE_ARRAY?"value":e.displayKey),u=a.computed(()=>e.sortKey||d.value),h=a.computed(()=>{switch(o.value){case Vr.BASE_ARRAY:return[...new Set(e.sourceList)].map(P=>({value:P}));case Vr.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:f}=a.toRefs(e),{selectList:m,selectedList:p}=_B(h,f,c),{selectSearchQuery:y,selectListSearch:b}=SB(m,d),N=a.computed(()=>[...b.value].sort((P,I)=>{const A=P[u.value],k=I[u.value];return A>k?1:-1})),w=a.computed(()=>[...p.value].sort((P,I)=>{const A=P[u.value],k=I[u.value];return A>k?1:-1}));a.watch(()=>[m,p],()=>{e.multiple||O()},{deep:!0});const C=(P,I)=>{const A=c.value;return P.some(k=>k[A]===I[A])&&I.disabled},E=()=>{m.value=[...h.value.filter(P=>C(m.value,P))],p.value=[...h.value.filter(P=>!C(m.value,P))],O()},_=()=>{m.value=[...h.value.filter(P=>!C(p.value,P))],p.value=[...h.value.filter(P=>C(p.value,P))],O()},x=(P,I)=>{if(P.disabled)return;const A=P[c.value],k=I?m:p,L=I?p:m,F=k.value.findIndex(Z=>Z[c.value]===A);L.value.push(...k.value.splice(F,1)),O()},O=()=>{const P=m.value.map(A=>A[c.value]),I=p.value.map(A=>A[c.value]);t("update:targetList",I),t("change",o.value===Vr.BASE_ARRAY?P:m.value.map(A=>a.toRaw(A)),o.value===Vr.BASE_ARRAY?I:p.value.map(A=>a.toRaw(A)),I)},T=P=>{const I=P==="source"?m:p;r.value[P]=s.value[P].length===I.value.length},$=(P,I)=>{const A=I==="source"?m:p;s.value[I]=P?A.value.map(k=>k[c.value]):[]},D=P=>{const I=P==="left",A=I?m:p,k=I?p:m,L=s.value[I?"source":"target"],F=A.value.filter(Z=>L.includes(Z[c.value]));A.value=A.value.filter(Z=>!L.includes(Z[c.value])),k.value.push(...F),s.value[I?"source":"target"]=[],O()},{resolveClassName:R}=xe();return{selectSearchQuery:y,selectListSearch:b,selectedList:p,selectListSort:N,selectedListSort:w,settingCode:c,displayCode:d,allToRight:E,allToLeft:_,handleItemClick:x,t:n,handleAllChecked:$,multipleSelectAllValue:r,multipleSelectList:s,handleMultipleChange:D,handleItemChecked:T,resolveClassName:R}},render(){const{multiple:e}=this.$props,t=this.sortable?this.selectListSort:this.selectListSearch,n=this.sortable?this.selectedListSort:this.selectedList,r=d=>{const u=d==="left-header",h=u?"source":"target",f=u?`${this.title[0]??this.t.sourceList}`:`${this.title[1]??this.t.targetList}`,m=u?!t.length:!n.length,p=!!this.multipleSelectList[h].length&&!this.multipleSelectAllValue[h],y=this.multipleSelectList[h].length,b=()=>{m||(u?this.allToRight():this.allToLeft())};return this.$slots[d]?a.createVNode("div",{class:"slot-header"},[this.$slots[d]()]):a.createVNode("div",{class:"header"},[this.multiple?a.createVNode(hn,{class:"header-checkbox",modelValue:this.multipleSelectAllValue[h],"onUpdate:modelValue":N=>this.multipleSelectAllValue[h]=N,indeterminate:p,label:f,onChange:N=>this.handleAllChecked(N,h)},null):a.createVNode(a.Fragment,null,[`${f}(${u?t.length:n.length})`]),this.multiple?a.createVNode("div",{class:"select-total-count"},[a.createVNode("span",{class:"select-count"},[y]),a.createVNode("span",{class:"count-delimiter"},[a.createTextVNode("/")]),a.createVNode("span",{class:"total-count"},[u?t.length:n.length])]):a.createVNode("span",{class:{"select-all":!0,disabled:m},onClick:()=>b()},[u?this.t.selectAll:this.t.removeAll])])},s=d=>{const u=d==="left-empty-content",h=(u?this.emptyContent[0]:this.emptyContent[1])??(u?this.t.noData:this.t.noSelected);return this.$slots[d]?a.createVNode("div",null,[this.$slots[d]()]):a.createVNode("div",{class:"empty"},[h])},o=(d,u=!0)=>a.createVNode("div",{class:["item-content",{"is-disabled":d.disabled}]},[a.createVNode("span",{class:"content-text",title:d[this.displayCode]},[d[this.displayCode]]),!e&&a.createVNode("span",{class:"icon-wrapper"},[u?a.createVNode(Bl,{class:this.resolveClassName("icon")},null):a.createVNode(tn,{class:[this.resolveClassName("icon"),this.resolveClassName("icon-delete")]},null)])]),c=d=>{let u;const h=d==="left",f=d==="left"?"source":"target",m=h?t:n,p=h?"source-option":"target-option",y=h?"left-empty-content":"right-empty-content",b=e?a.createVNode(Tc,{class:"content is-flex",modelValue:this.multipleSelectList[f],"onUpdate:modelValue":N=>this.multipleSelectList[f]=N,onChange:()=>this.handleItemChecked(f)},xB(u=m.map(N=>a.createVNode("div",null,[a.createVNode(hn,{class:"checkbox-item",label:N[this.settingCode]},{default:()=>{var w,C;return[((C=(w=this.$slots)[p])==null?void 0:C.call(w,N))??o(N,h)]}})])))?u:{default:()=>[u]}):a.createVNode("ul",{class:["content",this.searchable&&h?"is-search":""]},[m.map(N=>{var w,C;return a.createVNode("li",{key:N[this.settingCode],class:[this.$slots[p]?"custom-item":""],onClick:()=>this.handleItemClick(N,h)},[((C=(w=this.$slots)[p])==null?void 0:C.call(w,N))??o(N,h)])})]);return m.length?b:s(y)};return a.createVNode("div",{class:[`${this.resolveClassName("transfer")}`,this.extCls]},[a.createVNode("div",{class:"source-list"},[r("left-header"),this.searchable&&a.createVNode(va,{class:"transfer-search-input",modelValue:this.selectSearchQuery,"onUpdate:modelValue":d=>this.selectSearchQuery=d,clearable:!0,placeholder:this.searchPlaceholder||this.t.search},{prefix:()=>a.createVNode(Wa,{class:this.resolveClassName("icon-search")},null)}),c("left")]),e?a.createVNode("div",{class:"transfer-button-group"},[a.createVNode("div",{class:["transfer-button",{disabled:!this.multipleSelectList.source.length}],onClick:()=>this.handleMultipleChange("left")},[a.createVNode(_n,null,null)]),a.createVNode("div",{class:["transfer-button",{disabled:!this.multipleSelectList.target.length}],onClick:()=>this.handleMultipleChange("right")},[a.createVNode(rr,null,null)])]):a.createVNode(lc,{class:this.resolveClassName("transfer-icon")},null),a.createVNode("div",{class:"target-list"},[r("right-header"),c("right")])])}}));var An=(e=>(e.NODE_CHECKED="nodeChecked",e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_DRAG_LEAVE="nodeDragLeave",e.NODE_DRAG_OVER="nodeDragOver",e.NODE_DRAG_START="nodeDragStart",e.NODE_DROP="nodeDrop",e.NODE_ENTER_VIEW="nodeEnterView",e.NODE_EXPAND="nodeExpand",e.NODE_SELECTED="nodeSelected",e))(An||{});const Dr=(...e)=>!0,TB={nodeClick:Dr,nodeCollapse:Dr,nodeExpand:Dr,nodeChecked:Dr,nodeDragStart:Dr,nodeDragOver:Dr,nodeDragLeave:Dr,nodeDrop:Dr,nodeEnterView:Dr,nodeSelected:Dr};var Te=(e=>(e.DEPTH="__depth",e.HAS_CHILD="__has_child",e.INDEX="__index",e.IS_ASYNC="__is_async",e.IS_ASYNC_INIT="__is_async_init",e.IS_CACHED="__is_cached",e.IS_CHECKED="__is_checked",e.IS_INDETERMINATE="__is_indeterminate",e.IS_LOADING="__is_loading",e.IS_MATCH="__is_match",e.IS_NULL="__IS_NULL",e.IS_OPEN="__is_open",e.IS_ROOT="__is_root",e.IS_SELECTED="__is_selected",e.ORDER="__order",e.PARENT="__parent",e.PATH="__path",e.TREE_NODE_ATTR="__attr__",e.UUID="__uuid",e))(Te||{});const Sa={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"};var Pp=(e=>(e.CLICK="click",e.COLLAPSE="collapse",e.EXPAND="expand",e.SELECTED="selected",e))(Pp||{});const EB={data:v.arrayOf(v.any).def([]),label:v.oneOfType([v.func.def(void 0),v.string.def("label")]),nodeKey:v.string.def(void 0),children:v.string.def("children"),indent:v.number.def(16),lineHeight:v.number.def(32),height:v.number,levelLine:v.oneOfType([v.bool.def(!1),v.func.def(void 0),v.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:v.bool.def(!1),prefixIcon:v.oneOfType([v.func.def(()=>{}),v.bool.def(!1)]).def(!0),async:v.shape({callback:v.func.def(void 0),cache:v.bool.def(!0),deepAutoOpen:Pe("columnType",{}).def("once")}),offsetLeft:v.number.def(5),search:v.oneOfType([v.shape({value:v.oneOfType([v.number,v.string,v.bool]).def(""),match:v.oneOfType([Qt(),v.func]).def("fuzzy"),resultType:Qt().def("tree"),showChildNodes:v.bool.def(!1)}),v.string,v.number,v.bool]).def(void 0),emptyText:v.string.def("没有数据"),draggable:v.bool.def(!1),disableDrag:v.func,disableDrop:v.func,dragSort:v.bool.def(!1),selectable:v.oneOfType([v.bool,v.func]).def(!0),disabledFolderSelectable:v.bool.def(!1),showCheckbox:v.oneOfType([v.bool,v.func]).def(!1),checked:v.arrayOf(v.any).def([]),showNodeTypeIcon:v.bool.def(!0),selected:v.oneOfType([v.string,v.number,v.object]),autoCheckChildren:v.oneOfType([v.bool,v.func]).def(!0),autoOpenParentNode:v.bool.def(!0),expandAll:v.bool.def(!1),nodeContentAction:v.oneOfType([v.arrayOf(Pe("nodeContentActionType",{}).def(Pp.CLICK)),v.func.def(()=>["selected"])]).def(["selected","expand","click"]),keepSlotData:v.bool.def(!1),checkStrictly:v.bool.def(!0),intersectionObserver:v.oneOfType([v.bool.def(!1),v.shape({enabled:v.bool.def(!1),callback:v.func.def(void 0)})]).def(!1)},OB=e=>({renderEmpty:t=>a.createVNode(Kc,{scene:"part",type:t},{default:()=>[e.emptyText]})}),LB=e=>{const t={enabled:e.intersectionObserver,once:!1,callback:null};let n=null,r=[],s=null;const o=()=>typeof e.intersectionObserver=="boolean"?t:typeof e.intersectionObserver=="object"?Object.assign({},t,e.intersectionObserver):t,c=a.computed(o),d=p=>p instanceof NodeList?Array.from(p):Array.isArray(p)?p:[p];return{unobserveAll:()=>{r==null||r.forEach(p=>{pn.isElement(p)&&(n==null||n.unobserve(p))}),n==null||n.disconnect(),s==null||s.disconnect()},intersectionObserver:c,initIntersectionObserver:(p,y,b)=>{if(c.value.enabled){if(!p){console.error("intersectionObserver.target is undefined");return}r=d(p);const N=Object.assign({rootMargin:"0px"},y);n=new IntersectionObserver(function(w){w.forEach(C=>{var E,_,x;if(console.log("entry",C.target),C.isIntersecting){const O=((E=b==null?void 0:b.beforeResponse)==null?void 0:E.call(b,C))??C;(x=(_=c.value).callback)==null||x.call(_,O),c.value.once&&n.unobserve(C.target)}})},N),r.forEach(w=>{pn.isElement(w)&&n.observe(w)})}},initRootMutationObserver:(p,y)=>{if(c.value.enabled&&!e.virtualRender&&pn.isElement(p)){const b={attributes:!0,childList:!0,subtree:!0};s=new MutationObserver((...N)=>{y==null||y(...N)}),s.observe(p,b)}},getLastVisibleElement:(p,y)=>{const{offsetHeight:b}=y,N=y.querySelectorAll("[data-tree-node]"),w=b+p;return Array.from(N).filter(E=>E.offsetHeight+E.offsetTop>=w&&E.offsetTop<w)}}},Od=(e,t)=>{const n=K=>e.schema.get(K),r=(K,fe)=>{var ie;return(ie=n(K))==null?void 0:ie[fe]},s=(K,fe,ie,X)=>{if(!e.schema.has(K)){console.warn("node is not in schema, please check",X,K);return}e.schema.set(K,Object.assign({},n(K),{[fe]:ie}))},o=K=>e.data.find(fe=>u(fe)===K),c=(K,fe,ie)=>{if(Array.isArray(K)){Array.prototype.forEach.call(K,X=>s(o(X),fe,ie,K));return}s(o(K),fe,ie,K)},d=K=>r(K,Te.PATH),u=K=>r(K,Te.UUID),h=K=>r(K,Te.IS_OPEN),f=K=>r(K,Te.HAS_CHILD),m=K=>r(K,Te.IS_MATCH),p=K=>r(K,Te.IS_CHECKED),y=K=>r(r(K,Te.PARENT),Te.UUID),b=K=>r(K,Te.IS_LOADING),N=K=>r(K,Te.PARENT),w=K=>r(K,Te.IS_MATCH),C=(K,fe)=>{const ie=e.data.find(X=>u(X)===K);return r(ie,fe)},E=K=>typeof K=="string"?C(K,Te.IS_ROOT):r(K,Te.IS_ROOT),_=K=>{const fe=e.data.find(ie=>u(ie)===K);return y(fe)},x=K=>{const fe=e.data.find(ie=>u(ie)===K);return d(fe)},O=(K,fe)=>{s(K,Te.IS_LOADING,fe)},T=K=>typeof K=="object"?h(K):typeof K=="string"?C(K,Te.IS_OPEN):!1,$=(K,fe)=>r(r(K,Te.PARENT),fe),D=K=>T(r(K,Te.PARENT)),R=K=>E(K)||T(K)||D(K),P=(K,fe)=>{const X=K.split("-").reduce((U,B)=>{const Y=Number(B);return Array.isArray(U)?U[Y]:U[t.children][Y]},t.data);return fe&&Object.assign(X,{[Te.UUID]:fe}),X},I=K=>K[t.children]??[],A=K=>e.data.find(fe=>u(fe)===K),k=K=>E(K)?{[t.children]:t.data}:N(K),L=K=>({[Sa[Te.IS_LOADING]]:r(K,Te.IS_LOADING),[Sa[Te.HAS_CHILD]]:f(K),[Sa[Te.IS_MATCH]]:m(K),[Sa[Te.IS_CHECKED]]:p(K),[Sa[Te.IS_OPEN]]:h(K),[Sa[Te.IS_ROOT]]:E(K),fullPath:r(K,Te.PATH),uuid:u(K),parent:r(K,Te.PARENT),parentId:u(r(K,Te.PARENT))});return{getSchemaVal:n,getNodeAttr:r,getNodeId:u,getNodeById:o,getNodeParentId:y,getParentNodeData:k,getNodePathById:x,getNodeAttrById:C,getNodeParentIdById:_,getParentNodeAttr:$,getParentNode:N,setNodeAttr:s,setNodeAttrById:c,getNodePath:d,isRootNode:E,isNodeOpened:h,hasChildNode:f,isItemOpen:T,isNodeChecked:p,isNodeMatched:m,isNodeLoading:b,checkNodeIsOpen:R,getSourceNodeByPath:P,getSourceNodeByUID:A,isMatchedNode:w,resolveScopedSlotParam:L,setTreeNodeLoading:O,extendNodeAttr:K=>Object.assign({},K,{[Te.TREE_NODE_ATTR]:L(K)}),getChildNodes:I,extendNodeScopedData:K=>({data:K,attributes:L(K)}),getIntersectionResponse:K=>{var Y;if(!K)return null;let fe=K;pn.isElement(K)&&(fe=o(K.getAttribute("data-tree-node")));const ie=r(fe,Te.DEPTH),X=r(fe,Te.IS_ROOT),U=r(fe,Te.PARENT),B=X?r(fe,Te.INDEX):(Y=U==null?void 0:U[t.children])==null?void 0:Y.findIndex(Q=>Q===fe);return{level:ie,target:K,index:B,parent:U,node:fe,isRoot:X}}}},Mp="1px dashed #c3cdd7",Rp=(e,t,n=null,r=null,s=null,o=[])=>{const c=e[t];return typeof c=="boolean"?c?r:s:Fp(n,e,t,o)},Fp=(e,t,n,r=[])=>{const s=t[n];if(typeof s=="string")return typeof e=="object"&&e!==null?(Object.prototype.hasOwnProperty.call(e,s)||console.error(`cannot find node label with key ${s}`),e[s]):s;if(typeof s=="function"){const o=s.apply(void 0,[e,...r]);if(typeof o=="string")return o;console.error("props label with function return value is not string, please check and return string");return}},Hp=(e,t)=>Fp(e,t,"label"),AB=(e,t)=>({"--level-line":Rp(t,"levelLine",e,Mp,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),$B=(e,t,n,r=!0)=>{var c;const{schema:s}=n,o=(c=s.get(e))==null?void 0:c[Te.DEPTH];if(r){const d=["node"];return{"--depth":o,...typeof t.levelLine=="function"?{"--level-line":Rp(t,"levelLine",e,Mp,null,d)}:{}}}return{}},VB=(e,t,n,r=!0)=>{const{__is_root:s,__is_open:o}=t.get(e)||{},{resolveClassName:c}=xe();return{"is-root":s,[`${c("tree-node")}`]:!0,"is-open":o,"is-virtual-render":n.virtualRender,"level-line":n.levelLine&&r}},DB=(e,t)=>{const{__is_checked:n,__is_selected:r}=t.get(e)||{},{resolveClassName:s}=xe();return{"is-checked":n,"is-selected":r,"node-folder":e.is_folder,"node-leaf":e.is_leaf,[`${s("node-row")}`]:!0}},kB=(e,t,n,r,s)=>{IB(e,t,n,{[r]:s})},IB=(e,t,n,r)=>{const o=e.split("-").reduce((c,d)=>{const u=Number(d);return Array.isArray(c)?c[u]:c[n][u]},t);Object.assign(o,r||{})},Ro=e=>e??{__IS_NULL:!0},Ld=(e,t,n)=>Array.isArray(t)?t.some(r=>Ld(e,r,n)):typeof t=="string"||typeof t=="number"?t===n:e===t,Bp=(e,t)=>typeof e.showCheckbox=="function"?e.showCheckbox(t):e.showCheckbox,zp=(e,t)=>{const{setNodeAttr:n,getNodePath:r,getNodeAttr:s,resolveScopedSlotParam:o,setTreeNodeLoading:c}=Od(t,e),d=(f,m)=>{if(typeof f=="object"&&f!==null){n(m,Te.IS_OPEN,!0);const p=Array.isArray(f)?f:[f];return kB(r(m),e.data,e.children,e.children,p),Promise.resolve(f)}return Promise.resolve(f)},u=f=>{const{callback:m=null,cache:p=!0}=e.async||{};if(typeof m=="function"&&s(f,Te.IS_ASYNC)){if(n(f,Te.IS_ASYNC_INIT,!0),!s(f,Te.IS_CACHED)){n(f,Te.IS_CACHED,p);const y=o(f),b=m(f,N=>d(N,f),y);if(typeof b=="object"&&b!==null)return c(f,!0),b instanceof Promise?Promise.resolve(b.then(N=>d(N,f)).catch(N=>console.error("load remote data error:",N)).finally(()=>{c(f,!1),n(f,Te.IS_CACHED,!0)})):(d(b,f),c(f,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},h=()=>{const f=t.data.filter(m=>s(m,Te.IS_ASYNC)&&m[Sa[Te.IS_OPEN]]&&!s(m,Te.IS_ASYNC_INIT));f.length&&Promise.all(f.map(m=>u(m))).then(()=>{h()}).catch(m=>{console.warn(m)})};return{asyncNodeClick:u,deepAutoOpen:h}},PB=(e,t,n,r,s)=>{let o=e.selected;const{setNodeAttr:c,setNodeAttrById:d,getNodePath:u,getSchemaVal:h,getNodeAttr:f,getNodeId:m,getChildNodes:p,isRootNode:y,hasChildNode:b,isItemOpen:N,isNodeOpened:w,isNodeLoading:C,isNodeChecked:E,getParentNode:_,resolveScopedSlotParam:x,extendNodeAttr:O,extendNodeScopedData:T}=Od(n,e),{resolveClassName:$}=xe(),{registerNextLoop:D}=s,{asyncNodeClick:R,deepAutoOpen:P}=zp(e,n),I=oe=>N(oe)?a.createVNode(Zl,{class:[$("tree-icon"),$("node-prefix")]},null):a.createVNode(Jl,{class:[$("tree-icon"),$("node-prefix")]},null),A=oe=>{if(typeof oe=="string")return oe;if(typeof oe=="object"&&oe!==null){if(a.isVNode(oe))return oe;const{node:z,className:he,text:pe,style:q}=oe;return a.h(z,{class:he,style:q},pe)}return null},k=oe=>{var z,he;return((he=(z=t.slots).nodeLoading)==null?void 0:he.call(z,j(oe)))??C(oe)?a.createVNode(Fs,null,null):""},L=oe=>{if(t.slots.nodeAction)return t.slots.nodeAction(j(oe));let z=null;if(C(oe))return k(oe);if(typeof e.prefixIcon=="function"&&(z=e.prefixIcon(j(oe),"node_action"),z!=="default"))return A(z);if(z==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon){const he=typeof e.autoCheckChildren=="function"?e.autoCheckChildren(oe):e.autoCheckChildren;if(b(oe)||oe.async||!he)return N(oe)?a.createVNode(to,{class:$("node-prefix")},null):a.createVNode(oo,{class:$("node-prefix")},null)}return null},F=oe=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(j(oe));let z=null;return typeof e.prefixIcon=="function"&&(z=e.prefixIcon(j(oe),"node_type"),z!=="default")?A(z):z==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?y(oe)||b(oe)?I(oe):a.createVNode(oc,{class:[$("tree-icon"),$("node-prefix")]},null):null},Z=(oe,z)=>{const he=_(oe);if(he){const pe=z||(p(he)||[]).some(q=>E(q));c(he,Te.IS_CHECKED,pe),c(he,Te.IS_INDETERMINATE,(p(he)||[]).some(q=>!E(q)||fe(q))),y(he)||Z(he,z)}},ae=(oe,z,he)=>{p(oe).forEach(pe=>{Array.isArray(z)?z.forEach((q,G)=>{c(pe,q,he[G])}):c(pe,z,he),ae(pe,z,he)})},K=(oe,z,he)=>{he==null||he.preventDefault(),he==null||he.stopImmediatePropagation(),he==null||he.stopPropagation(),c(oe,Te.IS_CHECKED,!!z),z&&c(oe,Te.IS_INDETERMINATE,!1),e.checkStrictly&&(ae(oe,[Te.IS_CHECKED,Te.IS_INDETERMINATE],[!!z,!1]),Z(oe,z)),t.emit(An.NODE_CHECKED,n.data.filter(pe=>E(pe)),n.data.filter(pe=>fe(pe))),ne(oe,he)},fe=oe=>E(oe)&&f(oe,Te.IS_INDETERMINATE),ie=oe=>Bp(e,T(oe))?a.createVNode("span",{onClick:ce},[a.createVNode(hn,{indeterminate:fe(oe),modelValue:E(oe),size:"small",onChange:(z,he)=>K(oe,!!z,he)},null)]):null,X=(oe,z=null,he=null,pe=!0)=>{const q=z===null?!N(oe):!!z;if(q||ae(oe,Te.IS_OPEN,q),c(oe,Te.IS_OPEN,q),pe){const G=N(oe)?An.NODE_EXPAND:An.NODE_COLLAPSE;t.emit(G,oe,x(oe),h(oe),he)}},U=(oe,z,he)=>{if(Array.isArray(oe)){oe.forEach(pe=>c(Ro(pe),z,he));return}c(Ro(oe),z,he)},B=(oe,z=!0,he=!1)=>{Y(oe,Te.IS_OPEN,z,he&&z)},Y=(oe,z,he,pe=!1)=>{const q=Ro(oe);if(q[Te.IS_NULL])return;const G=Array.isArray(z)?z:[z],ee=Array.isArray(he)?he:[he];if(pe){if(G.forEach((W,te)=>U(q,W,ee[te])),!y(q)){const W=_(q);G.forEach((te,be)=>{f(W,te)!==he&&Y(W,te,ee[be],pe)})}}else G.forEach((W,te)=>U(q,W,ee[te]))},Q=(oe,z)=>{if(N(oe)){X(oe,!1,z,!0);return}R(oe).finally(()=>{f(oe,Te.IS_LOADING)?D("setNodeOpenedAfterLoading",{type:"once",fn:()=>X(oe,!0,z,!0)}):X(oe,!0,z,!0)})},ue=(oe,z)=>{oe.stopImmediatePropagation(),oe.stopPropagation(),oe.preventDefault(),Q(z,oe)},se=(oe,z=!0,he=!0,pe=!1)=>{const q=Array.isArray(oe)?oe:[oe];if(!q.length)return;let G=Ro(q[0]);if((typeof G=="string"||typeof G=="number"||typeof G=="symbol")&&(G=n.data.find(ee=>m(ee)===G)??{[Te.IS_NULL]:!0}),!G[Te.IS_NULL]){if(!e.selectable||typeof e.selectable=="function"&&!e.selectable(oe)||e.disabledFolderSelectable&&G.is_folder===!0){console.warn("props.selectable is false or undefined, please set selectable with true");return}o!=null&&d(o,Te.IS_SELECTED,!z),e.selected&&e.selected!==o&&d(e.selected,Te.IS_SELECTED,!z),c(G,Te.IS_SELECTED,z),o=m(G),pe&&t.emit(An.NODE_SELECTED,{selected:z,node:G}),he&&q.length===1&&B(G,!0,!0),f(G,Te.IS_ASYNC)&&R(G).then(()=>{a.nextTick(()=>{q.shift(),se(q,z,he)})})}},we=oe=>typeof e.nodeContentAction=="function"?Reflect.apply(e.nodeContentAction,void 0,[{node:oe}]):typeof e.nodeContentAction=="string"?[e.nodeContentAction]:Array.isArray(e.nodeContentAction)?e.nodeContentAction:["selected","expand","click"],ne=(oe,z)=>{const he=we(oe);if(he.includes("selected")&&se(oe,!0,!0,!0),he.includes("expand")&&(w(oe)||Q(oe,z)),he.includes("collapse")&&w(oe)&&Q(oe,z),he.includes("click")){const pe=An.NODE_CLICK;t.emit(pe,oe,x(oe),h(oe),z)}},ye=(oe,z)=>{if(y(z))return!1;const he=u(z),pe=`${he}`.split("-").slice(0,oe+1);if(pe.join("-")===he)return!0;const G=pe.pop(),ee=parseInt(G,10);pe.push(`${ee+1}`);const W=pe.join("-");return n.data.some(te=>u(te)===W)},le=oe=>{if(!e.levelLine)return null;const z=pe=>({"--depth":pe}),he=(f(oe,Te.DEPTH)??0)+1;return new Array(he).fill("").map((pe,q)=>q).filter(pe=>ye(pe,oe)).filter(pe=>pe>0).map(pe=>a.createVNode("span",{style:z(he-pe),class:"node-virtual-line"},null))},ge=oe=>{var z,he,pe,q;return t.slots.node?(he=(z=t.slots).node)==null?void 0:he.call(z,j(oe)):t.slots.default?(q=(pe=t.slots).default)==null?void 0:q.call(pe,T(oe)):[Hp(oe,e)]},j=oe=>e.keepSlotData?T(oe):O(oe),ce=oe=>{oe.stopImmediatePropagation(),oe.stopPropagation()};return{renderTreeNode:(oe,z=!0)=>{var he,pe;return a.createVNode("div",{key:m(oe),class:DB(oe,n.schema),"data-tree-node":m(oe)},[a.createVNode("div",{style:$B(oe,e,n,z),class:VB(oe,n.schema,e,z),onClick:q=>ne(oe,q)},[a.createVNode("div",{class:[$("node-action")],onClick:q=>ue(q,oe)},[L(oe)]),a.createVNode("div",{class:$("node-content")},[[ie(oe),F(oe)],a.createVNode("span",{class:$("node-text")},[ge(oe)]),(pe=(he=t.slots).nodeAppend)==null?void 0:pe.call(he,j(oe))]),z&&le(oe)])])},handleTreeNodeClick:Q,deepAutoOpen:P,asyncNodeClick:R,setNodeAction:U,setNodeOpened:X,setSelect:se,setOpen:B,setNodeAttribute:Y,isIndeterminate:fe}},MB=(e,t,n,r)=>{const{getSourceNodeByUID:s,getParentNodeData:o,getNodeParentIdById:c,extendNodeAttr:d,getNodeAttrById:u,getNodePathById:h,isRootNode:f}=Od(r,e),{resolveClassName:m}=xe(),p=a.computed(()=>typeof e.disableDrag=="function"),y=a.computed(()=>typeof e.disableDrop=="function");let b="";const N=P=>P.target.closest("[data-tree-node]"),w=P=>{var A;const I=(A=P==null?void 0:P.dataset)==null?void 0:A.treeNode;return s(I)},C=P=>{N(P).removeEventListener("mouseup",C)},E=P=>{const I=N(P),A=w(I);if(A.draggable===!1||p.value&&e.disableDrag(A)){I.classList.add(`${m("tree-drag-disabled")}`);return}I.setAttribute("draggable","true"),I.addEventListener("mouseup",C)},_=P=>{P.preventDefault();const I=N(P),A=d(w(I));if(t.emit(An.NODE_DRAG_OVER,P,I,A),y.value&&(e!=null&&e.disableDrop(A))){P.dataTransfer.effectAllowed="move",P.dataTransfer.dropEffect="none",I.classList.add(`${m("tree-drop-disabled")}`);return}I.classList.add(`${m("tree-drop-active")}`);let k=P.dataTransfer.getData("node-id");k=b;const L=I.getAttribute("data-tree-node"),F=T(k,L)?"move":"none";P.dataTransfer.effectAllowed=F,P.dataTransfer.dropEffect=F},x=P=>{P.dataTransfer.effectAllowed="move",P.dataTransfer.dropEffect="move";const I=N(P);P.dataTransfer.setData("text/plain","");const A=I.getAttribute("data-tree-node");b=A,P.dataTransfer.setData("node-id",A),t.emit(An.NODE_DRAG_START,P,I)},O=P=>{P.preventDefault(),P.stopPropagation();const I=N(P);I.classList.remove(`${m("tree-drop-active")}`,`${m("tree-drop-disabled")}`);const A=d(w(I));if(y.value&&e.disableDrop(A))return;const k=b,L=I.getAttribute("data-tree-node");Reflect.apply(e.dragSort?$:D,void 0,[k,L]),t.emit(An.NODE_DROP,P,I,A)},T=(P,I)=>{const A=h(P),k=h(I),L=c(P),F=c(I);return L===F?!0:A.indexOf(k)===-1&&k.indexOf(A)===-1},$=(P,I)=>{if(!T(P,I))return;const A=JSON.parse(JSON.stringify(s(P))),k=JSON.parse(JSON.stringify(s(I))),L=o(P),F=o(I),Z=u(P,Te.INDEX),ae=u(I,Te.INDEX);L==null||L[e.children].splice(Z,1,k),F==null||F[e.children].splice(ae,1,A)},D=(P,I)=>{const A=s(P),k=s(I);let L=null;if(f(P))L=e.data;else{const F=c(P);if(F!=null){L=s(F);const Z=u(P,Te.INDEX);L==null||L[e.children].splice(Z,1)}}k[e.children]||(k[e.children]=[]),k[e.children].unshift(A)},R=P=>{P.preventDefault();const I=N(P);I.classList.remove(`${m("tree-drop-active")}`,`${m("tree-drop-disabled")}`),t.emit(An.NODE_DRAG_LEAVE,P,I)};a.onMounted(()=>{if(e.draggable&&n.value){const P=n.value.$el;P.addEventListener("mousedown",E),P.addEventListener("dragstart",x),P.addEventListener("dragover",_),P.addEventListener("dragleave",R),P.addEventListener("drop",O)}}),a.onUnmounted(()=>{if(e.draggable&&n.value){const P=n.value.$el;P.removeEventListener("mousedown",E),P.removeEventListener("dragstart",x),P.removeEventListener("dragover",_),P.removeEventListener("dragleave",R),P.removeEventListener("drop",O)}})},RB=e=>{const t=a.toRef(e,"search"),{resultType:n="tree",showChildNodes:r=!0}=e.search??{},s=p=>["string","number","boolean"].includes(typeof p),o=(p,y)=>p===y,c=(p,y)=>new RegExp(`${p}`,"i").test(`${y}`),d=(p,y)=>Reflect.apply(p,void 0,y),u=t.value===void 0||t.value===!1,h=(p,y)=>{if(u)return!0;if(s(t.value))return`${t.value}`.length===0?!1:d(c,[t.value,p,y]);const{value:b="",match:N="fuzzy"}=t.value,C=typeof N=="function"?N:N==="fuzzy"?c:o;return`${b}`.length===0?!1:d(C,[b,p,y])},f=a.computed(()=>{if(t.value===!1)return!1;if(s(t.value))return`${t.value}`.length>0;const{value:p=""}=t.value;return`${p}`.length>0}),m=a.computed(()=>n==="tree");return{searchFn:h,refSearch:t,isSearchActive:f,isSearchDisabled:u,resultType:n,isTreeUI:m,showChildNodes:r}},FB=e=>{var N;const t=(w=void 0,C=null)=>{const{data:E,children:_}=e,x=[],O=[];let T=0;const $=new WeakMap;function D(K,fe,ie,X){if(K!=null&&$.has(K)){const U=$.get(K);if(Object.prototype.hasOwnProperty.call(U,fe)&&typeof X=="function"&&Reflect.apply(X,self,[U,fe,ie,K])){if(U[fe]===ie)return;Object.assign(U,{[fe]:ie}),D(U[Te.PARENT],fe,ie,X)}}}function R(K){let fe=null;return typeof e.nodeKey=="string"&&(fe=K[e.nodeKey]||er()),fe||K[Te.UUID]||er()}const P={[Te.IS_OPEN]:()=>!!e.expandAll,[Te.IS_CHECKED]:()=>!1,[Te.IS_MATCH]:()=>!1,[Te.IS_SELECTED]:(K,fe)=>Ld(K,e.selected,fe),[Te.IS_CACHED]:()=>!1,[Te.IS_ASYNC]:()=>null,[Te.IS_LOADING]:()=>!1};function I(K,fe,ie,X=void 0){let U=X;X===void 0&&typeof P[ie]=="function"&&(U=P[ie](fe,K));const B=Sa[ie];if(Object.prototype.hasOwnProperty.call(fe,B))return fe[B];const Y=(C==null?void 0:C.get(fe))??void 0;let Q;return Y&&(Q=Y[ie]),Q==null&&(Q=U),Q}function A(K,fe){if(!e.selectable)return!1;const ie=Ld(fe,e.selected,K);return I(K,fe,Te.IS_SELECTED,ie)}function k(K,fe,ie){var B;const X=I(K,fe,Te.IS_OPEN),U=$.has(ie)?(B=$.get(ie))==null?void 0:B[Te.IS_OPEN]:!0;return X&&U}function L(K,fe,ie){if(!Bp(e,{data:K,attributes:ie}))return!1;const U=Ld(K,e.checked,fe);return I(fe,K,Te.IS_CHECKED,U)}function F(K){return!((K==null?void 0:K[Te.IS_OPEN])??!1)}function Z(K,fe,ie,X){return K[Te.IS_INDETERMINATE]=(X[e.children]||[]).some(U=>{var B;return!(((B=$.get(U))==null?void 0:B[Te.IS_CHECKED])??!1)}),!0}function ae(K,fe=0,ie=null,X=null){const U=K.length;for(let B=0;B<U;B++){const Y=K[B];if(Array.isArray(Y))ae(Y,fe,ie,X);else if(typeof Y=="object"&&Y!==null){const Q=X!==null?`${X}-${B}`:`${B}`,ue=`${R(Y)}`,se=!!(Y[_]||[]).length;let we=I(ue,Y,Te.IS_OPEN);e.autoOpenParentNode?we&&D(ie,Te.IS_OPEN,!0,F):we=k(ue,Y,ie);const ne={[Te.DEPTH]:fe,[Te.INDEX]:B,[Te.UUID]:ue,[Te.PARENT]:ie,[Te.HAS_CHILD]:se,[Te.PATH]:Q,[Te.IS_ROOT]:ie===null,[Te.ORDER]:T,[Te.IS_SELECTED]:A(ue,Y),[Te.IS_MATCH]:I(ue,Y,Te.IS_MATCH),[Te.IS_OPEN]:we,[Te.IS_CHECKED]:void 0,[Te.IS_CACHED]:I(ue,Y,Te.IS_CACHED),[Te.IS_ASYNC]:I(ue,Y,Te.IS_ASYNC),[Te.IS_LOADING]:I(ue,Y,Te.IS_LOADING),[Te.IS_INDETERMINATE]:!1};ne[Te.IS_CHECKED]=L(Y,ue,ne),ne[Te.IS_CHECKED]&&x.push(Y),$.set(Y,ne),O.push(Y),T+=1,Object.prototype.hasOwnProperty.call(Y,_)&&ae(Y[_]||[],fe+1,Y,Q)}}}return ae(w??E),e.showCheckbox!==!1&&e.checkStrictly&&(x==null||x.forEach(K=>{D(K,Te.IS_CHECKED,!0,Z)})),[O,$]},n=t(),r=new Map,s=[],o=[],c=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),{asyncNodeClick:d,deepAutoOpen:u}=zp(e,c),h=w=>{s.push(w)},f=(w,C,E=!0)=>{E&&r.has(w)&&r.delete(w),r.set(w,C)},m=w=>typeof w=="function"?{type:"loop",fn:w}:typeof w=="object"&&typeof w.type=="string"&&typeof w.fn=="function"?w:(console.error("loop event error",w),null),p=w=>{const C=m(w);return C!==null&&Reflect.apply(C.fn,void 0,[]),(C==null?void 0:C.type)??"once"},y=()=>{Array.from(r.keys()).forEach(w=>{const C=r.get(w);if(Array.isArray(C)){const E=[];C.forEach((_,x)=>{p(_)==="once"&&E.unshift(x)}),E.length&&E.forEach(_=>C.splice(_,1)),C.length===0&&r.delete(w)}else p(C)==="once"&&r.delete(w)})};a.watch(()=>[e.data],w=>{var E,_;const C=t(w[0],c.schema);c.data=C[0],c.schema=C[1],(E=e.async)!=null&&E.callback&&((_=e.async)==null?void 0:_.deepAutoOpen)==="every"&&u(),y()},{deep:!0}),e.selectable&&a.onMounted(()=>{a.watch(()=>e.selected,w=>{o.length=0,s.forEach(C=>{Reflect.apply(C,void 0,[w]),o.push(()=>Reflect.apply(C,void 0,[w]))}),f("afterSelectWatch",o)},{immediate:!0})});const b=w=>{f("afterDataUpdate",w)};return(N=e.async)!=null&&N.callback&&u(),{flatData:c,asyncNodeClick:d,deepAutoOpen:u,afterDataUpdate:b,registerNextLoop:f,onSelected:h}},Up=Je(a.defineComponent({name:"Tree",props:EB,emits:TB,setup(e,t){const n=a.ref(),{flatData:r,onSelected:s,registerNextLoop:o}=FB(e),{checkNodeIsOpen:c,isRootNode:d,isNodeOpened:u,isNodeChecked:h,isNodeMatched:f,hasChildNode:m,getNodePath:p,getNodeId:y,getNodeAttr:b,getParentNode:N,getIntersectionResponse:w}=Od(r,e),{searchFn:C,isSearchActive:E,refSearch:_,isSearchDisabled:x,isTreeUI:O,showChildNodes:T}=RB(e),$=a.reactive([]),D=ne=>{if(E.value){if(T){const le=`${p(ne)??""}-`;return c(ne)&&(f(ne)||$.some(ge=>le.indexOf(`${ge}-`)===0))}return c(ne)&&f(ne)}return c(ne)},R=a.computed(()=>r.data.filter(ne=>D(ne))),{getLastVisibleElement:P,intersectionObserver:I}=LB(e),{renderTreeNode:A,handleTreeNodeClick:k,setOpen:L,setNodeAction:F,setSelect:Z,asyncNodeClick:ae,setNodeAttribute:K,isIndeterminate:fe}=PB(e,t,r,R,{registerNextLoop:o}),ie=Gi(120,()=>{$.length=0,r.data.forEach(ne=>{const ye=C(Hp(ne,e),ne);ye&&$.push(p(ne)),K(ne,[Te.IS_MATCH],[ye],O.value&&ye)})});x||a.watch([_],()=>{ie()},{deep:!0,immediate:!0}),a.onMounted(()=>{e.virtualRender&&a.nextTick(()=>{Y()})});const X=(ne,ye=!0,le=!1)=>{F(Ro(ne),Te.IS_CHECKED,ye),le&&t.emit(An.NODE_CHECKED,r.data.filter(ge=>h(ge)),r.data.filter(ge=>fe(ge)))};s(ne=>{Z(ne,!0,e.autoOpenParentNode,!0)});const U=()=>r;a.watch(()=>[e.checked],()=>{X(e.checked,!0)});const B=()=>{var ne;(ne=n.value)==null||ne.reset()},Y=ne=>{if(ne==null){n.value.fixToTop({index:1});return}if(e.nodeKey&&Object.prototype.hasOwnProperty.call(ne,e.nodeKey)){n.value.fixToTop({index:R.value.findIndex(le=>le[e.nodeKey]===ne[e.nodeKey])+1});return}if(ne.id!==void 0&&ne.id!==null){n.value.fixToTop({index:R.value.findIndex(le=>le[e.nodeKey]===ne.id)+1});return}if(ne.index>=0){n.value.fixToTop({index:ne.index});return}const ye=y(ne);if(ye){n.value.fixToTop({index:R.value.findIndex(le=>y(le)===ye)+1});return}};t.expose({handleTreeNodeClick:k,isNodeChecked:h,isRootNode:d,isNodeOpened:u,isNodeMatched:f,hasChildNode:m,setOpen:L,setChecked:X,setNodeAction:F,setNodeOpened:L,setSelect:Z,scrollToTop:Y,asyncNodeClick:ae,getData:U,reset:B,getNodeAttr:b,getParentNode:N});const{renderEmpty:Q}=OB(e);MB(e,t,n,r);const ue=ne=>{var le,ge;if(ne.length)return ne.map(j=>A(j,!E.value||O.value));const ye=E.value?"search-empty":"empty";return((ge=(le=t.slots).empty)==null?void 0:ge.call(le))??Q(ye)},se=([ne,ye,le])=>{var ge,j,ce,Ce;if(I.value.enabled&&ne.offset.y>5){if(!e.virtualRender){const z=P(ne.offset.y,n.value.refRoot),he=w(z[0]);(j=(ge=I.value)==null?void 0:ge.callback)==null||j.call(ge,he),t.emit(An.NODE_ENTER_VIEW,he);return}const oe=w(le.slice(-1)[0]);(Ce=(ce=I.value)==null?void 0:ce.callback)==null||Ce.call(ce,oe),t.emit(An.NODE_ENTER_VIEW,oe);return}},{resolveClassName:we}=xe();return()=>a.createVNode(ni,{ref:n,style:AB(null,e),height:e.height,class:we("tree"),contentClassName:we("container"),enabled:e.virtualRender,keepAlive:!0,lineHeight:e.lineHeight,list:R.value,rowKey:Te.UUID,throttleDelay:0,onContentScroll:se},{default:ne=>ue(ne.data||[])})}})),ss="upload";var qr=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(qr||{}),u2=(e=>(e.FORMDATA="formdata",e.BINARY="binary",e))(u2||{}),li=(e=>(e.FAIL="fail",e.NEW="new",e.SUCCESS="success",e.UPLOADING="uploading",e))(li||{});const jp=[qr.BUTTON,qr.DRAGGABLE,qr.PICTURE],Wp=[u2.FORMDATA,u2.BINARY],kr={type:{type:String,default:"formdata",validator:e=>!e||Wp.includes(e)?!0:(console.error(`invalid type, ${e}, the type must be one of 【${Wp.join(" | ")}】`),!1)},theme:{type:String,default:"draggable",validator:e=>!e||jp.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of 【${jp.join(" | ")}】`),!1)},files:{type:Array,default:()=>[]},name:{type:String,default:"upload_file"},multiple:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},autoUpload:{type:Boolean,default:!0},accept:{type:String},delayTime:{type:Number,default:0},url:{type:String,required:!1},method:{type:String,default:"post"},size:{type:[Number,Object],default(){return{maxFileSize:5,maxImgSize:1}}},handleResCode:{type:Function,default(e){return!!(e&&e.code===0)}},headers:{type:Object,default:()=>({})},header:{type:[Array,Object],default:()=>[]},tip:{type:String,default:""},validateName:{type:RegExp},withCredentials:{type:Boolean,default:!1},limit:Number,data:{type:[Array,Object],default:()=>[]},formDataAttributes:{type:[Array,Object],default:()=>[]},extCls:{type:String,default:""},customRequest:Function,selectChange:{type:Function},beforeUpload:{type:Function},beforeRemove:{type:Function},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10}};function Gp(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const HB=a.defineComponent({name:"UploadList",props:{theme:kr.theme,disabled:kr.disabled,files:kr.files,multiple:kr.multiple},emits:["remove","retry"],setup(e,{slots:t,emit:n}){const r=dt("upload"),{resolveClassName:s}=xe(),{theme:o,disabled:c,multiple:d}=a.toRefs(e),u=`${s(ss)}-list`,h=a.computed(()=>o.value===qr.PICTURE),f=a.computed(()=>h.value&&!d.value),m=a.computed(()=>Ue({[u]:!0,[`${u}--${o.value}`]:!0,[`${u}--disabled`]:c.value}));function p(x){const O=["Bytes","KB","MB","GB","TB"],T=Math.floor(Math.log(x)/Math.log(1024));return`${(x/1024**T).toFixed(2)}${O[T]}`}function y(x,O){n("remove",x,O)}function b(x,O){n("retry",x,O)}const N=()=>{let x;return a.createVNode(a.TransitionGroup,{name:`${u}__item`},Gp(x=e.files.map(O=>{const T=Ue({[`${u}__item`]:!0,[`${u}__item-picture`]:!0,[`${u}__item--${O.status}`]:!0});return a.createVNode("li",{key:O.uid,class:T},[t!=null&&t.file?t.file({file:O}):w(O)])}))?x:{default:()=>[x]})},w=x=>[a.withDirectives(a.createVNode("img",{class:`${u}__picture-item-thumbnail`,alt:"",src:x.url},null),[[a.vShow,x.status!=="uploading"]]),a.createVNode(a.Fragment,null,[x.status==="uploading"&&a.createVNode(ko,{width:50,class:`${u}__picture-item-progress`,bgColor:"#333",color:"#3a84ff",percent:x.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!c.value&&a.createVNode("div",{class:`${u}__picture-item-actions`},[a.createVNode(Rs,{class:"action-icon",onClick:O=>y(x,O)},null)])])],C=()=>{let x;return a.createVNode(a.TransitionGroup,{name:`${u}__item`},Gp(x=e.files.map(O=>{const T=Ue({[`${u}__item`]:!0,[`${u}__item--${O.status}`]:!0});return a.createVNode("li",{key:O.uid,class:T},[t!=null&&t.file?t.file({file:O}):_(O)])}))?x:{default:()=>[x]})},E=x=>{var P;const O=(P=x==null?void 0:x.raw)==null?void 0:P.type,[T]=(O==null?void 0:O.split("/"))||"";let D={text:Bs,image:tc,application:Bs,video:uc,audio:Ul}[T]||Bs;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(O)&&(D=Fl),a.h(D,{class:`${u}__item-file-icon`})},_=x=>[a.createVNode("div",{class:`${u}__item-icon`},[x.isPic?a.createVNode("img",{class:`${u}__item-thumbnail`,alt:"",src:x.url},null):E(x)]),a.createVNode("div",{class:`${u}__item-summary`},[a.createVNode("div",{class:`${u}__item-name`,title:x.name},[x.name]),x.status!=="uploading"&&a.createVNode("div",{class:`${u}__item-message`,title:x.statusText},[x.status==="success"&&a.createVNode(a.Fragment,null,[a.createVNode(ja,{class:`${u}__item-message-success-icon`},null),x.statusText||r.value.uploadSuccess]),x.status==="fail"&&a.createVNode(a.Fragment,null,[x.statusText||r.value.uploadFailed])]),x.status==="uploading"&&a.createVNode(ko,{class:`${u}__item-progress`,percent:x.percentage,showText:!1,size:"small"},null),x.status!=="fail"&&a.createVNode("div",{class:`${u}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${u}__item-speed-size`},[p(x.size)]),[[a.vShow,x.size]]),a.withDirectives(a.createVNode("span",{class:`${u}__item-speed-percentage`},[x.percentage,a.createTextVNode("%")]),[[a.vShow,x.status==="uploading"]])]),!c.value&&a.createVNode("div",{class:`${u}__item-actions`},[x.status==="fail"&&a.createVNode(ac,{class:`${u}__item-retry-icon`,onClick:O=>b(x,O)},null),a.createVNode(Rs,{class:`${u}__item-del-icon`,onClick:O=>y(x,O)},null)])])];return()=>{var x;return a.createVNode(a.Fragment,null,[f.value?(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger((x=e.files)==null?void 0:x[0])):a.createVNode("ul",{class:m.value},[h.value?N():C(),(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger())])])}}}),Kp=a.defineComponent({name:"UploadTrigger",props:{theme:kr.theme,disabled:kr.disabled,multiple:kr.multiple,accept:kr.accept,file:{type:Object},selectChange:kr.selectChange},emits:["change","remove"],setup(e,{slots:t,emit:n}){const r=dt("upload"),{resolveClassName:s}=xe(),{theme:o,disabled:c,file:d,multiple:u,accept:h}=a.toRefs(e),f=`${s(ss)}-trigger`,m=a.computed(()=>o.value===qr.BUTTON),p=a.computed(()=>o.value===qr.DRAGGABLE),y=a.computed(()=>o.value===qr.PICTURE),b=a.computed(()=>y.value&&!u.value),N=a.computed(()=>y.value&&!h.value?"image/png,image/jpeg,image/jpg":h.value),w=a.ref(null),C=a.computed(()=>{var L;return Ue({[f]:!0,[`${f}--${o.value}`]:!0,[`${f}--single-picture`]:b.value,[`${f}--has-file`]:d.value??!1,[`${f}--${(L=d.value)==null?void 0:L.status}`]:d.value??!1,[`${f}--dragover`]:$.value,[`${f}--disabled`]:c.value})}),E=()=>{w.value.value=null,w.value.click()},_=L=>{var Z;if(e.selectChange&&((Z=e.selectChange)==null?void 0:Z.call(e,L))===!1)return!1;const{files:F}=L.target;n("change",Array.from(F))},x=()=>{e.disabled||E()},O=L=>{L.defaultPrevented||L.target!==L.currentTarget||((L.code==="Enter"||L.code==="Space")&&E(),L.preventDefault())};function T(L,F){n("remove",L,F),F.stopPropagation(),F.preventDefault()}const $=a.ref(!1),D=()=>{const L=K=>{var ie;if(c.value)return;if(K.preventDefault(),$.value=!1,e.selectChange&&((ie=e.selectChange)==null?void 0:ie.call(e,K))===!1)return!1;const fe=Array.from(K.dataTransfer.files);n("change",fe)},F=K=>{K.preventDefault(),$.value=!0},Z=()=>{$.value=!1},ae=Ue({[`${f}__draggable`]:!0});return a.createVNode("div",{class:ae,onDragleave:Z,onDragover:F,onDrop:L},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(lo,{class:`${f}__draggable-icon`},null),a.createVNode("div",{class:`${f}__draggable-text`},[r.value.drapFileOr,a.createVNode("span",{class:`${f}__draggable-upload-link`},[r.value.clickUpload])])])])},R=()=>a.createVNode(a.Fragment,null,[b.value&&e.file?I(e.file):P()]),P=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${f}__picture-inner`},[a.createVNode(io,{class:`${f}__picture-icon`},null),a.createVNode("div",{class:`${f}__picture-text`},[r.value.clickUpload])])]),I=L=>[a.withDirectives(a.createVNode("img",{class:`${f}__picture-thumbnail`,alt:"",src:L.url},null),[[a.vShow,L.status!=="uploading"]]),a.createVNode(a.Fragment,null,[L.status==="uploading"&&a.createVNode(ko,{width:50,class:`${f}__picture-progress`,bgColor:"#333",color:"#3a84ff",percent:L.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${f}__picture-actions`},[a.createVNode(Rs,{class:"action-icon",onClick:F=>T(L,F)},null)])])],A=()=>a.createVNode(Rt,{disabled:c.value},{default:()=>[a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(lo,{class:`${f}__button-icon`},null),a.createVNode("span",{class:`${f}__button-text`},[r.value.uploadLabel])])])]}),k=()=>{if(m.value)return A();if(p.value)return D();if(y.value)return R()};return()=>{var L;return a.createVNode("div",{class:C.value,tabindex:"0",onClick:x,onKeydown:O},[t.trigger?[t.trigger(),(L=t==null?void 0:t.default)==null?void 0:L.call(t)]:k(),a.createVNode("input",{ref:w,class:`${f}__input-file`,accept:N.value,disabled:c.value,multiple:u.value,tabindex:"-1",type:"file",onChange:_},null)])}}});var Yp={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(n){var r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function s(C,E){var _=C[0],x=C[1],O=C[2],T=C[3];_+=(x&O|~x&T)+E[0]-680876936|0,_=(_<<7|_>>>25)+x|0,T+=(_&x|~_&O)+E[1]-389564586|0,T=(T<<12|T>>>20)+_|0,O+=(T&_|~T&x)+E[2]+606105819|0,O=(O<<17|O>>>15)+T|0,x+=(O&T|~O&_)+E[3]-1044525330|0,x=(x<<22|x>>>10)+O|0,_+=(x&O|~x&T)+E[4]-176418897|0,_=(_<<7|_>>>25)+x|0,T+=(_&x|~_&O)+E[5]+1200080426|0,T=(T<<12|T>>>20)+_|0,O+=(T&_|~T&x)+E[6]-1473231341|0,O=(O<<17|O>>>15)+T|0,x+=(O&T|~O&_)+E[7]-45705983|0,x=(x<<22|x>>>10)+O|0,_+=(x&O|~x&T)+E[8]+1770035416|0,_=(_<<7|_>>>25)+x|0,T+=(_&x|~_&O)+E[9]-1958414417|0,T=(T<<12|T>>>20)+_|0,O+=(T&_|~T&x)+E[10]-42063|0,O=(O<<17|O>>>15)+T|0,x+=(O&T|~O&_)+E[11]-1990404162|0,x=(x<<22|x>>>10)+O|0,_+=(x&O|~x&T)+E[12]+1804603682|0,_=(_<<7|_>>>25)+x|0,T+=(_&x|~_&O)+E[13]-40341101|0,T=(T<<12|T>>>20)+_|0,O+=(T&_|~T&x)+E[14]-1502002290|0,O=(O<<17|O>>>15)+T|0,x+=(O&T|~O&_)+E[15]+1236535329|0,x=(x<<22|x>>>10)+O|0,_+=(x&T|O&~T)+E[1]-165796510|0,_=(_<<5|_>>>27)+x|0,T+=(_&O|x&~O)+E[6]-1069501632|0,T=(T<<9|T>>>23)+_|0,O+=(T&x|_&~x)+E[11]+643717713|0,O=(O<<14|O>>>18)+T|0,x+=(O&_|T&~_)+E[0]-373897302|0,x=(x<<20|x>>>12)+O|0,_+=(x&T|O&~T)+E[5]-701558691|0,_=(_<<5|_>>>27)+x|0,T+=(_&O|x&~O)+E[10]+38016083|0,T=(T<<9|T>>>23)+_|0,O+=(T&x|_&~x)+E[15]-660478335|0,O=(O<<14|O>>>18)+T|0,x+=(O&_|T&~_)+E[4]-405537848|0,x=(x<<20|x>>>12)+O|0,_+=(x&T|O&~T)+E[9]+568446438|0,_=(_<<5|_>>>27)+x|0,T+=(_&O|x&~O)+E[14]-1019803690|0,T=(T<<9|T>>>23)+_|0,O+=(T&x|_&~x)+E[3]-187363961|0,O=(O<<14|O>>>18)+T|0,x+=(O&_|T&~_)+E[8]+1163531501|0,x=(x<<20|x>>>12)+O|0,_+=(x&T|O&~T)+E[13]-1444681467|0,_=(_<<5|_>>>27)+x|0,T+=(_&O|x&~O)+E[2]-51403784|0,T=(T<<9|T>>>23)+_|0,O+=(T&x|_&~x)+E[7]+1735328473|0,O=(O<<14|O>>>18)+T|0,x+=(O&_|T&~_)+E[12]-1926607734|0,x=(x<<20|x>>>12)+O|0,_+=(x^O^T)+E[5]-378558|0,_=(_<<4|_>>>28)+x|0,T+=(_^x^O)+E[8]-2022574463|0,T=(T<<11|T>>>21)+_|0,O+=(T^_^x)+E[11]+1839030562|0,O=(O<<16|O>>>16)+T|0,x+=(O^T^_)+E[14]-35309556|0,x=(x<<23|x>>>9)+O|0,_+=(x^O^T)+E[1]-1530992060|0,_=(_<<4|_>>>28)+x|0,T+=(_^x^O)+E[4]+1272893353|0,T=(T<<11|T>>>21)+_|0,O+=(T^_^x)+E[7]-155497632|0,O=(O<<16|O>>>16)+T|0,x+=(O^T^_)+E[10]-1094730640|0,x=(x<<23|x>>>9)+O|0,_+=(x^O^T)+E[13]+681279174|0,_=(_<<4|_>>>28)+x|0,T+=(_^x^O)+E[0]-358537222|0,T=(T<<11|T>>>21)+_|0,O+=(T^_^x)+E[3]-722521979|0,O=(O<<16|O>>>16)+T|0,x+=(O^T^_)+E[6]+76029189|0,x=(x<<23|x>>>9)+O|0,_+=(x^O^T)+E[9]-640364487|0,_=(_<<4|_>>>28)+x|0,T+=(_^x^O)+E[12]-421815835|0,T=(T<<11|T>>>21)+_|0,O+=(T^_^x)+E[15]+530742520|0,O=(O<<16|O>>>16)+T|0,x+=(O^T^_)+E[2]-995338651|0,x=(x<<23|x>>>9)+O|0,_+=(O^(x|~T))+E[0]-198630844|0,_=(_<<6|_>>>26)+x|0,T+=(x^(_|~O))+E[7]+1126891415|0,T=(T<<10|T>>>22)+_|0,O+=(_^(T|~x))+E[14]-1416354905|0,O=(O<<15|O>>>17)+T|0,x+=(T^(O|~_))+E[5]-57434055|0,x=(x<<21|x>>>11)+O|0,_+=(O^(x|~T))+E[12]+1700485571|0,_=(_<<6|_>>>26)+x|0,T+=(x^(_|~O))+E[3]-1894986606|0,T=(T<<10|T>>>22)+_|0,O+=(_^(T|~x))+E[10]-1051523|0,O=(O<<15|O>>>17)+T|0,x+=(T^(O|~_))+E[1]-2054922799|0,x=(x<<21|x>>>11)+O|0,_+=(O^(x|~T))+E[8]+1873313359|0,_=(_<<6|_>>>26)+x|0,T+=(x^(_|~O))+E[15]-30611744|0,T=(T<<10|T>>>22)+_|0,O+=(_^(T|~x))+E[6]-1560198380|0,O=(O<<15|O>>>17)+T|0,x+=(T^(O|~_))+E[13]+1309151649|0,x=(x<<21|x>>>11)+O|0,_+=(O^(x|~T))+E[4]-145523070|0,_=(_<<6|_>>>26)+x|0,T+=(x^(_|~O))+E[11]-1120210379|0,T=(T<<10|T>>>22)+_|0,O+=(_^(T|~x))+E[2]+718787259|0,O=(O<<15|O>>>17)+T|0,x+=(T^(O|~_))+E[9]-343485551|0,x=(x<<21|x>>>11)+O|0,C[0]=_+C[0]|0,C[1]=x+C[1]|0,C[2]=O+C[2]|0,C[3]=T+C[3]|0}function o(C){var E=[],_;for(_=0;_<64;_+=4)E[_>>2]=C.charCodeAt(_)+(C.charCodeAt(_+1)<<8)+(C.charCodeAt(_+2)<<16)+(C.charCodeAt(_+3)<<24);return E}function c(C){var E=[],_;for(_=0;_<64;_+=4)E[_>>2]=C[_]+(C[_+1]<<8)+(C[_+2]<<16)+(C[_+3]<<24);return E}function d(C){var E=C.length,_=[1732584193,-271733879,-1732584194,271733878],x,O,T,$,D,R;for(x=64;x<=E;x+=64)s(_,o(C.substring(x-64,x)));for(C=C.substring(x-64),O=C.length,T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x=0;x<O;x+=1)T[x>>2]|=C.charCodeAt(x)<<(x%4<<3);if(T[x>>2]|=128<<(x%4<<3),x>55)for(s(_,T),x=0;x<16;x+=1)T[x]=0;return $=E*8,$=$.toString(16).match(/(.*?)(.{0,8})$/),D=parseInt($[2],16),R=parseInt($[1],16)||0,T[14]=D,T[15]=R,s(_,T),_}function u(C){var E=C.length,_=[1732584193,-271733879,-1732584194,271733878],x,O,T,$,D,R;for(x=64;x<=E;x+=64)s(_,c(C.subarray(x-64,x)));for(C=x-64<E?C.subarray(x-64):new Uint8Array(0),O=C.length,T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x=0;x<O;x+=1)T[x>>2]|=C[x]<<(x%4<<3);if(T[x>>2]|=128<<(x%4<<3),x>55)for(s(_,T),x=0;x<16;x+=1)T[x]=0;return $=E*8,$=$.toString(16).match(/(.*?)(.{0,8})$/),D=parseInt($[2],16),R=parseInt($[1],16)||0,T[14]=D,T[15]=R,s(_,T),_}function h(C){var E="",_;for(_=0;_<4;_+=1)E+=r[C>>_*8+4&15]+r[C>>_*8&15];return E}function f(C){var E;for(E=0;E<C.length;E+=1)C[E]=h(C[E]);return C.join("")}f(d("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function C(E,_){return E=E|0||0,E<0?Math.max(E+_,0):Math.min(E,_)}ArrayBuffer.prototype.slice=function(E,_){var x=this.byteLength,O=C(E,x),T=x,$,D,R,P;return _!==n&&(T=C(_,x)),O>T?new ArrayBuffer(0):($=T-O,D=new ArrayBuffer($),R=new Uint8Array(D),P=new Uint8Array(this,O,$),R.set(P),D)}}();function m(C){return/[\u0080-\uFFFF]/.test(C)&&(C=unescape(encodeURIComponent(C))),C}function p(C,E){var _=C.length,x=new ArrayBuffer(_),O=new Uint8Array(x),T;for(T=0;T<_;T+=1)O[T]=C.charCodeAt(T);return E?O:x}function y(C){return String.fromCharCode.apply(null,new Uint8Array(C))}function b(C,E,_){var x=new Uint8Array(C.byteLength+E.byteLength);return x.set(new Uint8Array(C)),x.set(new Uint8Array(E),C.byteLength),_?x:x.buffer}function N(C){var E=[],_=C.length,x;for(x=0;x<_-1;x+=2)E.push(parseInt(C.substr(x,2),16));return String.fromCharCode.apply(String,E)}function w(){this.reset()}return w.prototype.append=function(C){return this.appendBinary(m(C)),this},w.prototype.appendBinary=function(C){this._buff+=C,this._length+=C.length;var E=this._buff.length,_;for(_=64;_<=E;_+=64)s(this._hash,o(this._buff.substring(_-64,_)));return this._buff=this._buff.substring(_-64),this},w.prototype.end=function(C){var E=this._buff,_=E.length,x,O=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],T;for(x=0;x<_;x+=1)O[x>>2]|=E.charCodeAt(x)<<(x%4<<3);return this._finish(O,_),T=f(this._hash),C&&(T=N(T)),this.reset(),T},w.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},w.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},w.prototype.setState=function(C){return this._buff=C.buff,this._length=C.length,this._hash=C.hash,this},w.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},w.prototype._finish=function(C,E){var _=E,x,O,T;if(C[_>>2]|=128<<(_%4<<3),_>55)for(s(this._hash,C),_=0;_<16;_+=1)C[_]=0;x=this._length*8,x=x.toString(16).match(/(.*?)(.{0,8})$/),O=parseInt(x[2],16),T=parseInt(x[1],16)||0,C[14]=O,C[15]=T,s(this._hash,C)},w.hash=function(C,E){return w.hashBinary(m(C),E)},w.hashBinary=function(C,E){var _=d(C),x=f(_);return E?N(x):x},w.ArrayBuffer=function(){this.reset()},w.ArrayBuffer.prototype.append=function(C){var E=b(this._buff.buffer,C,!0),_=E.length,x;for(this._length+=C.byteLength,x=64;x<=_;x+=64)s(this._hash,c(E.subarray(x-64,x)));return this._buff=x-64<_?new Uint8Array(E.buffer.slice(x-64)):new Uint8Array(0),this},w.ArrayBuffer.prototype.end=function(C){var E=this._buff,_=E.length,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],O,T;for(O=0;O<_;O+=1)x[O>>2]|=E[O]<<(O%4<<3);return this._finish(x,_),T=f(this._hash),C&&(T=N(T)),this.reset(),T},w.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},w.ArrayBuffer.prototype.getState=function(){var C=w.prototype.getState.call(this);return C.buff=y(C.buff),C},w.ArrayBuffer.prototype.setState=function(C){return C.buff=p(C.buff,!0),w.prototype.setState.call(this,C)},w.ArrayBuffer.prototype.destroy=w.prototype.destroy,w.ArrayBuffer.prototype._finish=w.prototype._finish,w.ArrayBuffer.hash=function(C,E){var _=u(new Uint8Array(C)),x=f(_);return E?N(x):x},w})})(Yp);var BB=Yp.exports;const Xp=jt(BB);function f2(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const zB=e=>{if(typeof XMLHttpRequest>"u")throw new Error("XMLHttpRequest is undefined");const t=new XMLHttpRequest,{action:n,type:r}=e,s=r==="formdata";t.upload&&t.upload.addEventListener("progress",d=>{const u=d;u.percent=d.total>0?d.loaded/d.total*100:0,e.onProgress(u)});const o=new FormData;if(s&&e.data){let d=e.data;Array.isArray(d)||(d=[d]),d.forEach(u=>{for(const[h,f]of Object.entries(u))Array.isArray(f)?o.append(h,...f):o.append(h,f)})}if(s&&e.formDataAttributes){let d=e.formDataAttributes;Array.isArray(d)||(d=[d]),d.forEach(u=>{Array.isArray(u.value)?o.append(u.name,...u.value):o.append(u.name,u.value)})}if(s&&o.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(new Error("An error occurred during upload"))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(f2(t))}),t.addEventListener("loadend",()=>{e.onComplete()}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0),e.header)if(Array.isArray(e.header))e.header.forEach(d=>{const u=d.name,h=d.value;t.setRequestHeader(u,h)});else{const d=e.header.name,u=e.header.value;t.setRequestHeader(d,u)}const c=e.headers||{};if(c instanceof Headers)c.forEach((d,u)=>t.setRequestHeader(u,d));else for(const[d,u]of Object.entries(c))Ih(u)||t.setRequestHeader(d,String(u));return t.send(s?o:e.file),t},qp=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,UB=async e=>{const t=e.chunkSize*1024*1024,{file:n}=e;if(!n)throw new Error("File not found");const r=Math.ceil(n.size/t),s=await WB(n,t),o=[];jB(e,n,r,s,o,t),await Promise.all(o).then(()=>{const c={size:n.size,name:n.name,total:r,hash:s},d=new XMLHttpRequest;d.open(e.method,e.mergeUrl,!0),d.onreadystatechange=()=>{if(d.readyState===4){if(d.status<200||d.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(f2(d))}},d.onloadend=()=>{e.onComplete()},d.setRequestHeader("Content-type","application/JSON"),d.send(JSON.stringify(c))})},jB=(e,t,n,r,s,o)=>{for(let c=0;c<n;c++){const d=new Promise((u,h)=>{const f=c*o,m=Math.min(t.size,f+o),p=new FormData;if(e.data){let N=e.data;Array.isArray(N)||(N=[N]),N.forEach(w=>{for(const[C,E]of Object.entries(w))Array.isArray(E)?p.append(C,...E):p.append(C,E)})}if(e.formDataAttributes){let N=e.formDataAttributes;Array.isArray(N)||(N=[N]),N.forEach(w=>{Array.isArray(w.value)?p.append(w.name,...w.value):p.append(w.name,w.value)})}p.append("file",qp.call(t,f,m)),p.append("name",t.name),p.append("total",n.toString()),p.append("index",c.toString()),p.append("size",t.size.toString()),p.append("hash",r.toString());const y=new XMLHttpRequest;if(y.onreadystatechange=()=>{if(y.readyState===4){const N=f2(y);y.status<200||y.status>=300?(h(N),e.onError(new Error("An error occurred during upload"))):u("reponseText")}},y.upload.addEventListener("progress",N=>{const w=N;e.onProgress(w,c)},!1),e.withCredentials&&"withCredentials"in y&&(y.withCredentials=!0),y.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(N=>{const w=N.name,C=N.value;y.setRequestHeader(w,C)});else{const N=e.header.name,w=e.header.value;y.setRequestHeader(N,w)}const b=e.headers||{};if(b instanceof Headers)b.forEach((N,w)=>y.setRequestHeader(w,N));else for(const[N,w]of Object.entries(b))Ih(w)||y.setRequestHeader(N,String(w));y.send(p)});s.push(d)}},WB=(e,t)=>new Promise((n,r)=>{const s=Math.ceil(e.size/t);let o=0;const c=new Xp.ArrayBuffer,d=new FileReader;function u(){const h=o*t,f=h+t>=e.size?e.size:h+t;d.readAsArrayBuffer(qp.call(e,h,f))}d.onload=h=>{if(c.append(h.target.result),o+=1,o<s)u();else{const f=c.end(),m=new Xp;m.append(f),m.append(e.name);const p=m.end();n(p)}},d.onerror=()=>{r(new Error("File slcie failed"))},u()}).catch(n=>{console.log(n)});function Jp(e){return Date.now()+e}const GB=(e,t)=>{const n=a.computed(()=>{var p;return typeof e.size=="number"?e.size:(p=e==null?void 0:e.size)==null?void 0:p.maxImgSize}),r=a.computed(()=>{var p;return typeof e.size=="number"?e.size:(p=e==null?void 0:e.size)==null?void 0:p.maxImgSize}),s=a.ref([]);function o(p){return s.value.find(y=>y.uid===p.uid)}let c=0;function d(p){var w;c+=1,p.uid=Jp(c);const y={uid:p.uid,name:p.name,status:li.NEW,size:p.size,raw:p},b=p.type.startsWith("image/");let N=null;if(b){try{y.url=window.URL.createObjectURL(p)}catch(C){console.error(C)}y.isPic=!0}return e.validateName&&!((w=e.validateName)!=null&&w.test(y.name))&&(y.status=li.FAIL,y.statusText="invalid filename",N=new Error(y.statusText)),b&&p.size>n.value*1024**2&&(y.status=li.FAIL,y.statusText="invalid file size",N=new Error(y.statusText)),!b&&p.size>r.value*1024**2&&(y.status=li.FAIL,y.statusText="invalid file size",N=new Error(y.statusText)),s.value.push(y),N}async function u(p){var N;const y=p instanceof File?o(p):p,b=w=>{var C;t.onRemove(w,s.value),s.value.splice(s.value.indexOf(y),1),(C=w.url)!=null&&C.startsWith("blob:")&&URL.revokeObjectURL(w.url)};e.beforeRemove?await((N=e.beforeRemove)==null?void 0:N.call(e,y,s.value))!==!1&&b(y):b(y)}async function h(p,y,b){const N=o(y);N&&(N.status="fail",N.statusText=p.message,N.response=b)}async function f(p,y){const b=o(y);b&&(b.status="success",b.response=p)}async function m(p,y){const b=o(y);b&&(b.status="uploading",b.percentage=Math.round(p.percent))}return a.watch(()=>e.files,p=>{s.value=p.map(y=>(c+=1,{...y,uid:y.uid??Jp(c),status:y.status??li.SUCCESS}))},{immediate:!0,deep:!0}),{fileList:s,handlePreprocess:d,handleRemove:u,handleError:h,handleSuccess:f,handleProgress:m}},Zp=Je(a.defineComponent({name:"Upload",props:kr,emits:["exceed","progress","success","error","delete","done"],setup(e,{slots:t,emit:n,expose:r}){const{resolveClassName:s}=xe(),o=a.shallowRef({}),c=a.computed(()=>e.theme===qr.PICTURE),d=a.computed(()=>c.value&&!e.multiple),u=a.computed(()=>Ue({[`${s(ss)}`]:!0,[`${s(ss)}--${e.theme}`]:!0,[`${s(ss)}--disabled`]:e.disabled,[`${s(ss)}--single-picture`]:d.value,[e.extCls]:e.extCls??!1})),h=a.computed(()=>({theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept,selectChange:e.selectChange}));function f(T,$){O(T),n("delete",T,$)}const{fileList:m,handlePreprocess:p,handleRemove:y,handleProgress:b,handleSuccess:N,handleError:w}=GB(e,{onRemove:f});function C(T){if(!T.length)return;if(e.limit>1&&m.value.length+T.length>e.limit){n("exceed",T,m.value);return}!e.multiple&&e.limit===1&&(m.value=[]);let $=T;(!e.multiple||e.limit===1)&&($=T.slice(0,1));for(const D of $){const R=D,P=p(R);if(P){n("error",R,m.value,P);return}e.autoUpload&&_(R,$)}}function E(T){x(T.raw)}async function _(T,$){var R;if(!e.beforeUpload)return x(T,$);let D;try{D=await((R=e.beforeUpload)==null?void 0:R.call(e,T))}catch{D=!1}if(D===!1){y(T);return}x(T,$)}function x(T,$){const{type:D,headers:R,header:P,data:I,formDataAttributes:A,method:k,withCredentials:L,name:F,url:Z,sliceUrl:ae,mergeUrl:K,chunkSize:fe,customRequest:ie}=e,{uid:X}=T,U={type:D,headers:R,header:P,withCredentials:L,file:T,data:I,formDataAttributes:A,method:k,filename:F,action:Z,sliceUrl:ae,mergeUrl:K,chunkSize:fe,onProgress:Q=>{b(Q,T),n("progress",Q,T,m.value)},onSuccess:Q=>{var se;const ue=Q;if((se=e==null?void 0:e.handleResCode)!=null&&se.call(e,ue))N(Q,T),n("success",Q,T,m.value);else{const we=new Error((ue==null?void 0:ue.message)||"unknow error");w(we,T,Q),n("error",T,m.value,we)}delete o.value[X]},onError:Q=>{w(Q,T),n("error",T,m.value,Q),delete o.value[X]},onComplete:()=>{$&&$.indexOf(T)===$.length-1&&n("done",m.value)}};let B=e.sliceUpload?UB:zB;ie&&(B=ie);const Y=B(U);o.value[X]=Y,Y instanceof Promise&&Y.then(U.onSuccess,U.onError)}function O(T){let $=o.value;T&&($={[T.uid]:o.value[T.uid]}),Object.keys($).forEach(D=>{if($[D]instanceof XMLHttpRequest){const R=$[D];R==null||R.abort()}delete o.value[D]})}return a.onBeforeUnmount(()=>{m.value.forEach(({url:T})=>{T!=null&&T.startsWith("blob:")&&URL.revokeObjectURL(T)})}),r({handleRemove:y,handleRetry:E}),()=>a.createVNode("div",{class:u.value},[!c.value&&a.createVNode(Kp,a.mergeProps(h.value,{onChange:C}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${s(ss)}__tip`},[e.tip]),a.createVNode(HB,{disabled:e.disabled,files:m.value,multiple:e.multiple,theme:e.theme,onRemove:y,onRetry:E},{innerTrigger:T=>c.value&&a.createVNode(Kp,a.mergeProps(h.value,{file:T,onChange:C,onRemove:y}),t),file:t.file})])}})),h2=Object.freeze(Object.defineProperty({__proto__:null,$bkPopover:wc,Affix:y1,Alert:w1,AnimateNumber:C1,Backtop:N1,Badge:x1,Breadcrumb:S1,Button:Rt,Card:x6,Cascader:P6,Checkbox:hn,CodeDiff:t9,Collapse:r9,ColorPicker:m9,ConfigProvider:v1,Container:Ic,DatePicker:W9,Dialog:vm,Divider:ym,Dropdown:bm,Exception:Kc,FixedNavbar:Cm,Form:Vm,InfoBox:km,Input:va,Link:Pm,Loading:da,Menu:Bm,Message:Zm,Modal:Lo,Navigation:eg,Notify:ng,OverflowTitle:C6,Pagination:q0,PopConfirm:Vg,Popover:Tn,Popover2:Dg,Process:kg,Progress:ko,Radio:od,Rate:Fg,ResizeLayout:Hg,SearchSelect:Xg,Select:X0,Sideslider:Jg,Slider:Qg,Steps:np,Swiper:rp,Switcher:ap,Tab:cp,Table:$p,Tag:po,TagInput:Dp,TimeLine:Ed,TimePicker:kp,Timeline:Ed,Transfer:Ip,Tree:Up,Upload:Zp,VirtualRender:ni,containerProps:Ic,scrollbar:G0},Symbol.toStringTag,{value:"Module"})),Qp=(e="Bk")=>(t,n)=>{const r=t.config.globalProperties.bkUIPrefix||e;Object.keys(h2).forEach(s=>{const o=h2[s];"install"in o?t.use(o,{prefix:r}):t.component(r+s,h2[s])}),n&&tf(n,t)},KB={createInstall:Qp,install:Qp()},YB=Object.freeze(Object.defineProperty({__proto__:null,$bkPopover:wc},Symbol.toStringTag,{value:"Module"})),e4="2.0.1-beta.50";window.__bkui_vue_version__=e4,De.$bkPopover=wc,De.Affix=y1,De.Alert=w1,De.AnimateNumber=C1,De.Backtop=N1,De.Badge=x1,De.Breadcrumb=S1,De.Button=Rt,De.Card=x6,De.Cascader=P6,De.Checkbox=hn,De.CodeDiff=t9,De.Collapse=r9,De.ColorPicker=m9,De.ConfigProvider=v1,De.Container=Ic,De.DatePicker=W9,De.Dialog=vm,De.Divider=ym,De.Dropdown=bm,De.Exception=Kc,De.FixedNavbar=Cm,De.Form=Vm,De.InfoBox=km,De.Input=va,De.Link=Pm,De.Loading=da,De.Menu=Bm,De.Message=Zm,De.Modal=Lo,De.Navigation=eg,De.Notify=ng,De.OverflowTitle=C6,De.Pagination=q0,De.PopConfirm=Vg,De.Popover=Tn,De.Popover2=Dg,De.Process=kg,De.Progress=ko,De.Radio=od,De.Rate=Fg,De.ResizeLayout=Hg,De.SearchSelect=Xg,De.Select=X0,De.Sideslider=Jg,De.Slider=Qg,De.Steps=np,De.Swiper=rp,De.Switcher=ap,De.Tab=cp,De.Table=$p,De.Tag=po,De.TagInput=Dp,De.TimeLine=Ed,De.TimePicker=kp,De.Timeline=Ed,De.Transfer=Ip,De.Tree=Up,De.Upload=Zp,De.VirtualRender=ni,De.bkEllipsis=cE,De.bkEllipsisInstance=Gf,De.bkTooltips=pa,De.clickoutside=br,De.containerProps=Ic,De.default=KB,De.defaultRootConfig=Ua,De.mousewheel=NE,De.overflowTitle=LE,De.plugins=YB,De.provideGlobalConfig=tf,De.rootProviderKey=Ds,De.scrollbar=G0,De.setPrefixVariable=ef,De.useGlobalConfig=o_,De.useLocale=dt,De.usePrefix=xe,De.version=e4,Object.defineProperties(De,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
387
|
+
`,R={d:D,stroke:m||"#f5f5f5","stroke-linecap":u,"stroke-width":y,"fill-opacity":"0",class:"process-circle-trail",style:T},P={d:D,stroke:d||"#13ce66","stroke-linecap":u,"stroke-width":o>0&&y||0,"fill-opacity":"0",class:`process-circle-path ${r(`${h}-circle-trail`)}`,style:$};return a.createVNode("div",{style:N,class:"progress-outer-circle"},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",R,null),a.createVNode("path",P,null)]),a.createVNode("span",{style:p,class:"progress-circle-text"},[n==null?void 0:n.default()])])},mF=(e,{attrs:t,slots:n})=>{const{resolveClassName:r}=xe(),{percent:s,strokeWidth:o,size:c,color:d,titleStyle:u,showText:h,textInside:f,theme:m}=t,p={height:`${o}px`,lineHeight:`${o}px`},y={width:`${s}%`,background:d,animationDuration:"3s"},b=(N=!0)=>(h||n.default)&&(N&&f||!N&&!f)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{style:p,class:`${r(`progress-${c||"normal"}`)} progress-bar`},[a.createVNode("div",{style:y,class:{"progress-inner":!0,[`${r(`${m}`)}`]:!0}},[a.createVNode("div",{style:u,class:"inner-text"},[b()])])]),b(!1)])};function Ig(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const gF={extCls:v.string,type:ey(),percent:v.number.def(0),theme:v.theme().def(yl.PRIMARY),size:v.size(),width:v.number.def(126),strokeWidth:v.number,strokeLinecap:Qv(),textInside:v.bool.def(!1),showText:v.bool.def(!0),color:v.string,bgColor:v.string,fixed:v.number.validate(e=>e>=0&&e<=20).def(0),format:v.func.def(e=>`${e}%`),titleStyle:v.object.def({fontSize:"16px",verticalAlign:"middle"})},ko=Je(a.defineComponent({name:"Progress",props:gF,setup(){const{resolveClassName:e}=xe();return{resolveClassName:e}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var d;const{showText:e,format:t,percent:n,textInside:r,titleStyle:s,fixed:o}=this.$props,c=t((d=this.validPercent(n))==null?void 0:d.toFixed(o));return(e||this.$slots.default)&&r?this.$slots.default?this.$slots.default():a.createVNode("span",null,[c]):!e||r?null:a.createVNode("span",{style:typeof c=="string"?s:void 0,class:"progress-text"},[this.$slots.default?this.$slots.default():c])}},render(){const e=this.renderProcessInfo(),t={...this.$props,percent:this.validPercent(this.percent)};let n=a.createVNode(mF,t,Ig(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(hF,t,Ig(e)?e:{default:()=>[e]}));const r={class:Ue({extCls:!!this.extCls},`${this.resolveClassName("progress")} ${this.resolveClassName(`progress-${this.type}`)}`)};return a.createVNode("div",r,[n])}})),Pg=Symbol("RadioGroup");function Mg(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const Rg=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,r=a.inject(Pg,I3),s=!P3(r),o=a.ref(!1),c=a.ref(!1),d=a.ref("default"),u=a.computed(()=>s&&r.props.disabled?!0:t.disabled);s?(d.value=r.props.size,a.watch(()=>r.props.modelValue,m=>{o.value=m===t.label},{immediate:!0})):a.watch(()=>t.modelValue,m=>{m!==""&&(o.value=m===t.label)},{immediate:!0});const h=(m=!0)=>{o.value=m},f=m=>{if(u.value||c.value)return;const p=m.target,y=p.checked;Promise.resolve(s?r.props.beforeChange(y):t.beforeChange(y)).then(b=>{if(b){o.value=p.checked;const N=o.value?t.label:"";return n("update:modelValue",N),n("change",N),s&&r.handleChange(e.proxy),a.nextTick(()=>{p.checked!==o.value&&(p.checked=o.value)}),Promise.resolve(!0)}return Promise.reject()}).catch(()=>{p.checked=o.value}).finally(()=>{c.value=!1})};return a.onMounted(()=>{s&&r.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&r.unregister(e.proxy)}),{size:d,isChecked:o,isDisabled:u,setChecked:h,handleChange:f}},pF={name:v.string.def(""),label:v.oneOfType([v.bool,v.string,v.number]).isRequired,modelValue:v.oneOfType([v.bool,v.string,v.number]).def(""),checked:v.bool.def(!1),disabled:v.bool.def(!1),beforeChange:Es().def(()=>!0)},vF=a.defineComponent({name:"Radio",props:pF,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=Mg(),{size:r,isChecked:s,isDisabled:o,setChecked:c,handleChange:d}=Rg(),{resolveClassName:u}=xe();return{size:r,isFocused:e,isChecked:s,isDisabled:o,setChecked:c,handleBlur:t,handleFocus:n,handleChange:d,resolveClassName:u}},render(){const e=Ue({[`${this.resolveClassName("radio")}`]:!0,[`${this.resolveClassName("radio")}-${this.size}`]:!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")}`,checked:this.isChecked,disabled:this.isDisabled,tabindex:"0",type:"radio",value:this.label,onBlur:this.handleBlur,onChange:this.handleChange,onFocus:this.handleFocus},null),t()])}}),yF={name:v.string.def(""),label:v.oneOfType([v.bool,v.string,v.number]).isRequired,modelValue:v.oneOfType([v.bool,v.string,v.number]).def(""),checked:v.bool.def(!1),disabled:v.bool.def(!1),size:v.size(),beforeChange:Es().def(()=>!0)},bF=a.defineComponent({name:"RadioButton",props:yF,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=Mg(),{size:r,isChecked:s,isDisabled:o,setChecked:c,handleChange:d}=Rg(),{resolveClassName:u}=xe();return{isFocused:e,size:r,isChecked:s,isDisabled:o,setChecked:c,handleBlur:t,handleFocus:n,handleChange:d,resolveClassName:u}},render(){const e=Ue({[`${this.resolveClassName("radio-button")}`]:!0,[`${this.resolveClassName("radio-button")}-${this.size}`]:!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")}`,checked:this.isChecked,disabled:this.isDisabled,tabindex:"0",type:"radio",value:this.label,onBlur:this.handleBlur,onChange:this.handleChange,onFocus:this.handleFocus},null),t()])}}),wF={name:v.string.def(""),modelValue:v.oneOfType([v.bool,v.string,v.number]),disabled:v.bool,withValidate:v.bool.def(!0),type:v.oneOf(["tab","capsule","card"]).def("tab"),size:v.size(),beforeChange:Es().def(()=>!0)},od=en(vF,{Group:a.defineComponent({name:"RadioGroup",props:wF,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(e,t){const n=Qn(),r=[],s=u=>{r.push(u)},o=u=>{const h=r.indexOf(u);h>-1&&r.splice(h,1)},c=u=>{const h=u.label;r.forEach(f=>{f!==u&&f.setChecked(!1)}),t.emit("update:modelValue",h),t.emit("change",h)};a.provide(Pg,{props:e,register:s,unregister:o,handleChange:c}),a.watch(()=>e.modelValue,()=>{var u;e.withValidate&&((u=n==null?void 0:n.validate)==null||u.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&r.forEach(u=>{u.setChecked(u.label===e.modelValue)})});const{resolveClassName:d}=xe();return{resolveClassName:d}},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:bF}),ld=a.defineComponent({name:"Star",props:{rate:v.number.def(0),width:v.number.def(16),height:v.number.def(16),editable:v.bool.def(!0),hoverRate:v.number.def(0),max:v.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=h=>{if(!e.editable)return;const f=h+1;t("chooseRate",f)},r=(h,f)=>{if(!e.editable)return;const m=h+1;t("changeHover",m),a.nextTick(()=>{f.target.classList.add(o("is-hover"))})},s=h=>{e.editable&&a.nextTick(()=>{h.target.classList.remove(o("is-hover"))})},{resolveClassName:o}=xe(),c=h=>Ue({[`${o("is-select")}`]:h<Math.floor(d.value),[`${o("is-edit")}`]:e.editable,[`${o("rate-star")}`]:!0}),d=a.computed(()=>e.hoverRate||e.rate),u={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:`${o("rate-stars")}`},[Array(e.max).fill(1).map((h,f)=>a.createVNode("svg",{style:u,class:c(f),viewBox:"0 0 64 64",x:"0px",y:"0px",onClick:()=>n(f),onMouseenter:m=>r(f,m),onMouseleave:m=>s(m)},[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)])])])])]))])}}),CF=a.defineComponent({name:"Rate",components:{star:ld},props:{modelValue:v.number.def(0),size:v.size(),editable:v.bool.def(!0),withValidate:v.bool.def(!0)},emits:["change","hover-change","update:modelValue"],setup(e,{emit:t}){const{resolveClassName:n}=xe(),r=Qn(),s=a.ref(0),o=p=>{e.editable&&(t("update:modelValue",p),t("change",p))},c=p=>{s.value=p,t("hover-change",p)},d=Ue({[`${n("rate")}`]:!0}),h={small:{width:12,height:12},large:{width:18,height:18},huge:{width:24,height:24}}[e.size]||{width:16,height:16},f=a.computed(()=>{const p=Math.floor(e.modelValue),y=(h.width+3)*p,b=h.width*(e.modelValue-p);return{width:`${y+b}px`}}),m={width:h.width,height:h.height};return a.watch(()=>e.modelValue,()=>{var p;e.withValidate&&((p=r==null?void 0:r.validate)==null||p.call(r,"change"))}),()=>a.createVNode("p",{class:d},[e.editable?a.createVNode(ld,a.mergeProps({"hover-rate":s.value,rate:e.modelValue,onChangeHover:c,onChooseRate:o,onMouseleave:()=>c(0)},m),null):[a.createVNode(ld,a.mergeProps({style:f.value,class:`${n("score-real")}`,editable:!1,rate:5},m),null),a.createVNode(ld,a.mergeProps({editable:!1,rate:0},m),null)]])}}),Fg=Je(CF),NF=a.defineComponent({name:"ResizeLayout",props:{placement:v.placement().def("left"),min:v.number.def(3),max:v.number.def(1/0),triggerWidth:v.number.def(5),triggerOffset:v.number.def(3),initialDivide:v.oneOfType([String,Number]).def("20%"),immediate:v.bool,disabled:v.bool,collapsible:v.bool,isCollapsed:v.bool.def(!1),autoMinimize:v.oneOfType([Boolean,Number]).def(!1),border:v.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:n,initialDivide:r,triggerOffset:s,triggerWidth:o,max:c,min:d,immediate:u,autoMinimize:h,collapsible:f,isCollapsed:m}=a.toRefs(e),p=a.ref(m.value),y=a.ref(!0),b=a.ref(!1),N=a.ref(null),w=a.ref({}),C=a.ref(null),E=a.ref(null),_=a.ref(null),x=a.ref(null),O=a.computed(()=>["left","right"].includes(n.value)),T=a.computed(()=>O.value?"width":"height"),$=a.computed(()=>{let U=r.value;return typeof U=="number"&&(U=U<=d.value?`${d.value}px`:`${U}px`),U}),D=a.computed(()=>f.value&&m.value?{[T.value]:"0px"}:{[T.value]:$.value}),R=a.computed(()=>({[`margin-${n.value}`]:`${s.value-o.value}px`,[T.value]:`${o.value}px`})),P=a.computed(()=>h.value?typeof h.value=="boolean"?50:h.value:0),I=()=>{const U=C.value.getBoundingClientRect();N.value=O.value?U.width:U.height};let A=new ResizeObserver(I);const k=()=>{switch(E.value.style.visibility="visible",n.value){case"left":E.value.style.inset=`0 auto auto ${w.value.aside.width}px`;break;case"right":E.value.style.inset=`0 ${w.value.aside.width}px auto auto`;break;case"top":E.value.style.inset=`${w.value.aside.height}px auto auto 0`;break;case"bottom":E.value.style.inset=`auto auto ${w.value.aside.height}px 0`;break}},L=()=>{_.value.style.display="block",_.value.style.cursor=O.value?"col-resize":"row-resize"},F=U=>Math.min(c.value,Math.max(d.value,U),N.value-o.value),Z=U=>{t("before-resize",U);const B=x.value.getBoundingClientRect();w.value=Object.freeze({mouse:{clientX:U.clientX,clientY:U.clientY},aside:{width:B.width,height:B.height}}),L(),u.value||k(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const Y=se=>{t("resizing",se)},Q=se=>{let we;switch(n.value){case"top":we=se.clientY-w.value.mouse.clientY;break;case"right":we=w.value.mouse.clientX-se.clientX;break;case"bottom":we=w.value.mouse.clientY-se.clientY;break;case"left":we=se.clientX-w.value.mouse.clientX}const ne=w.value.aside[T.value]+we,ye=F(ne)+s.value,le=`${ye}px`;u.value?x.value.style[T.value]=le:E.value.style[n.value]=le,Y(ye)},ue=()=>{if(E.value.style.visibility="hidden",_.value.style.display="none",document.removeEventListener("mousemove",Q),document.removeEventListener("mouseup",ue),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{ae(),t("after-resize",parseFloat(E.value.style[n.value]))}),u.value)return!1;x.value.style[T.value]=E.value.style[n.value]};document.addEventListener("mousemove",Q),document.addEventListener("mouseup",ue)},ae=()=>{if(!h.value)return!1;const U=x.value.getBoundingClientRect();if(b.value=p.value=U[T.value]<=P.value,!b.value)return y.value=!0,!1;fe(),a.nextTick(()=>{x.value.setAttribute(`data-${T.value}`,D.value[T.value])})},K=U=>{p.value=typeof U=="boolean"?U:!p.value,fe(),t("collapse-change",p.value)},fe=()=>{const U=x.value.getBoundingClientRect();ie(!p.value),p.value?(x.value.setAttribute(`data-${T.value}`,`${U[T.value]}px`),x.value.style[T.value]=e.collapsible?"0px":"5px"):(y.value=!0,x.value.style[T.value]=x.value.getAttribute(`data-${T.value}`)||$.value)},ie=U=>{const B=()=>{y.value=U,x.value.style.transition="",x.value.removeEventListener("transitionend",B)};x.value.addEventListener("transitionend",B),x.value.style.transition=`${T.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};a.watch(m,()=>{p.value=m.value,K(p.value)}),a.onMounted(()=>{A.observe(C.value)}),a.onBeforeUnmount(()=>{C.value&&(A.unobserve(C.value),A=null)});const{resolveClassName:X}=xe();return{collapsed:p,asideContentVisible:y,minimized:b,limitMax:N,state:w,vertical:O,cssPropKey:T,bkResizeLayoutRef:C,resizeProxyRef:E,resizeMaskRef:_,asideRef:x,triggerStyle:R,asideStyle:D,handleMousedown:Z,setCollapse:K,resolveClassName:X}},render(){var t,n,r,s,o,c;const e=[`${this.resolveClassName("resize-layout")}`,`${this.resolveClassName(`resize-layout-${this.placement}`)}`,{[`${this.resolveClassName("resize-layout-collapsed")}`]:this.collapsed,[`${this.resolveClassName("resize-layout-border")}`]:this.border,[`${this.resolveClassName("resize-layout-collapsible")}`]:this.collapsible}];return a.createVNode("div",{ref:"bkResizeLayoutRef",class:e},[a.createVNode("aside",{ref:"asideRef",style:this.asideStyle,class:`${this.resolveClassName("resize-layout-aside")}`},[a.withDirectives(a.createVNode("div",{class:`${this.resolveClassName("resize-layout-aside-content")}`},[(n=(t=this.$slots).aside)==null?void 0:n.call(t)]),[[a.vShow,this.asideContentVisible]]),a.withDirectives(a.createVNode("i",{style:this.triggerStyle,class:`${this.resolveClassName("resize-trigger")}`,onMousedown:a.withModifiers(this.handleMousedown,["left"])},null),[[a.vShow,!this.disabled&&(!this.collapsed||this.autoMinimize)]]),a.withDirectives(a.createVNode("i",{ref:"resizeProxyRef",class:[`${this.resolveClassName("resize-proxy")}`,this.placement]},null),[[a.vShow,!this.collapsed||this.autoMinimize]]),this.collapsible&&(((s=(r=this.$slots)["collapse-trigger"])==null?void 0:s.call(r))||(this.collapsed?a.createVNode(_n,{width:26,height:26,class:`${this.resolveClassName("resize-collapse")}`,onClick:this.setCollapse},null):a.createVNode(rr,{width:26,height:26,class:`${this.resolveClassName("resize-collapse")}`,onClick:this.setCollapse},null)))]),a.createVNode("main",{class:`${this.resolveClassName("resize-layout-main")}`},[(c=(o=this.$slots).main)==null?void 0:c.call(o)]),a.createVNode("div",{ref:"resizeMaskRef",class:`${this.resolveClassName("resize-mask")}`},null)])}}),Hg=Je(NF);var J0=null;function xF(e){return J0||(J0=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)}).bind(window)),J0(e)}var Z0=null;function _F(e){Z0||(Z0=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}).bind(window)),Z0(e)}function SF(e){var t=document.createElement("style");return t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e)),(document.querySelector("head")||document.body).appendChild(t),t}function cd(e,t){t===void 0&&(t={});var n=document.createElement(e);return Object.keys(t).forEach(function(r){n[r]=t[r]}),n}function Bg(e,t,n){var r=window.getComputedStyle(e,n||null)||{display:"none"};return r[t]}function Q0(e){if(!document.documentElement.contains(e))return{detached:!0,rendered:!1};for(var t=e;t!==document;){if(Bg(t,"display")==="none")return{detached:!1,rendered:!1};t=t.parentNode}return{detached:!1,rendered:!0}}var TF='.resize-triggers{visibility:hidden;opacity:0;pointer-events:none}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:"";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}',e2=0,dd=null;function EF(e,t){e.__resize_mutation_handler__||(e.__resize_mutation_handler__=AF.bind(e));var n=e.__resize_listeners__;if(!n){if(e.__resize_listeners__=[],window.ResizeObserver){var r=e.offsetWidth,s=e.offsetHeight,o=new ResizeObserver(function(){!e.__resize_observer_triggered__&&(e.__resize_observer_triggered__=!0,e.offsetWidth===r&&e.offsetHeight===s)||ud(e)}),c=Q0(e),d=c.detached,u=c.rendered;e.__resize_observer_triggered__=d===!1&&u===!1,e.__resize_observer__=o,o.observe(e)}else if(e.attachEvent&&e.addEventListener)e.__resize_legacy_resize_handler__=function(){ud(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(e2||(dd=SF(TF)),$F(e),e.__resize_rendered__=Q0(e).rendered,window.MutationObserver){var h=new MutationObserver(e.__resize_mutation_handler__);h.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),e.__resize_mutation_observer__=h}}e.__resize_listeners__.push(t),e2++}function OF(e,t){var n=e.__resize_listeners__;if(n){if(t&&n.splice(n.indexOf(t),1),!n.length||!t){if(e.detachEvent&&e.removeEventListener){e.detachEvent("onresize",e.__resize_legacy_resize_handler__),document.removeEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);return}e.__resize_observer__?(e.__resize_observer__.unobserve(e),e.__resize_observer__.disconnect(),e.__resize_observer__=null):(e.__resize_mutation_observer__&&(e.__resize_mutation_observer__.disconnect(),e.__resize_mutation_observer__=null),e.removeEventListener("scroll",t2),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}!--e2&&dd&&dd.parentNode.removeChild(dd)}}function LF(e){var t=e.__resize_last__,n=t.width,r=t.height,s=e.offsetWidth,o=e.offsetHeight;return s!==n||o!==r?{width:s,height:o}:null}function AF(){var e=Q0(this),t=e.rendered,n=e.detached;t!==this.__resize_rendered__&&(!n&&this.__resize_triggers__&&(n2(this),this.addEventListener("scroll",t2,!0)),this.__resize_rendered__=t,ud(this))}function t2(){var e=this;n2(this),this.__resize_raf__&&_F(this.__resize_raf__),this.__resize_raf__=xF(function(){var t=LF(e);t&&(e.__resize_last__=t,ud(e))})}function ud(e){!e||!e.__resize_listeners__||e.__resize_listeners__.forEach(function(t){t.call(e,e)})}function $F(e){var t=Bg(e,"position");(!t||t==="static")&&(e.style.position="relative"),e.__resize_old_position__=t,e.__resize_last__={};var n=cd("div",{className:"resize-triggers"}),r=cd("div",{className:"resize-expand-trigger"}),s=cd("div"),o=cd("div",{className:"resize-contract-trigger"});r.appendChild(s),n.appendChild(r),n.appendChild(o),e.appendChild(n),e.__resize_triggers__={triggers:n,expand:r,expandChild:s,contract:o},n2(e),e.addEventListener("scroll",t2,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}function n2(e){var t=e.__resize_triggers__,n=t.expand,r=t.expandChild,s=t.contract,o=s.scrollWidth,c=s.scrollHeight,d=n.offsetWidth,u=n.offsetHeight,h=n.scrollWidth,f=n.scrollHeight;s.scrollLeft=o,s.scrollTop=c,r.style.width=d+1+"px",r.style.height=u+1+"px",n.scrollLeft=h,n.scrollTop=f}var zn=(e=>(e.ALL="all",e.NEED_KEY="need-key",e))(zn||{});const zg=Symbol("SEARCH_SELECT_PROVIDER_KEY"),VF=e=>{a.provide(zg,e)},Ug=()=>a.inject(zg);var _a=(e=>(e.DEFAULT="default",e.EDIT="edit",e))(_a||{});const jg=/(\||,|、|\r\n|\n)/gm,Wg=/^(\||,|、|\r\n|\n)$/;var ri=(e=>(e.AND="&",e.OR="|",e))(ri||{});class ai{constructor(t,n="default"){Le(this,"id");Le(this,"name");Le(this,"values",[]);Le(this,"condition");Le(this,"logical");Le(this,"nameRenderKey",Bi(4));this.searchItem=t,this.type=n,this.id=t.id,this.name=t.name,this.logical=t.logical||"|",this.type=n}get multiple(){return!!this.searchItem.multiple}get placeholder(){return this.searchItem.placeholder||""}get children(){return this.searchItem.children||[]}get validate(){return!this.searchItem.noValidate}get inputInnerHtml(){var t;return this.isSpecialType()?this.name:`${this.keyInnerHtml}${((t=this.values)==null?void 0:t.map(n=>n.name).join(` ${this.logical} `))||""}`}get inputInnerText(){var t;return this.isSpecialType()?this.name:`${this.keyInnerText}${((t=this.values)==null?void 0:t.map(n=>n.name).join(` ${this.logical} `))||""}`}get keyInnerHtml(){return this.isSpecialType()?this.name:this.name?`${this.name}: `:""}get keyInnerText(){return this.isSpecialType()?this.name:this.name?`${this.name}: `:""}get showLogical(){return!!this.searchItem.showLogicalPanel}get isCustomMenu(){return this.searchItem.isCustomMenu}isSpecialType(){return["text","condition"].includes(this.type)}addValue(t){if(this.nameRenderKey=Bi(4),this.multiple){const n=this.values.findIndex(r=>r.id===t.id);if(n>-1){this.values.splice(n,1);return}this.values.push(t);return}this.values=[t]}str2Values(t){const n=t==null?void 0:t.split(this.logical).map(s=>s.trim()).filter(s=>s);if(!(n!=null&&n.length))return[];const r=s=>this.children.find(o=>o.name===s);if(!this.multiple){const s=n.join(` ${this.logical} `).trim(),o=r(s);return[{id:o?o.id:s,name:o?o.name:s,disabled:!!(o!=null&&o.disabled)}]}return n.map(s=>{const o=this.values.find(d=>d.name===s);if(o)return o;const c=r(s);return{id:c?c.id:s,name:c?c.name:s,disabled:!!(c!=null&&c.disabled)}})}addValues(t,n=!0){const r=t.split(jg).filter(d=>d.trim()&&!Wg.test(d)),s=n?this.values.map(d=>d.name):[],c=[...r,...s].filter(d=>d.trim()).join(this.logical);this.values=this.str2Values(c)}getValue(t){return this.values.find(n=>n.id===t)||this.values.find(n=>n.name===t)}toValue(){var n;const t={id:this.id,name:this.name};return(n=this.values)!=null&&n.length&&(t.values=this.values.map(r=>({id:r.id,name:r.name})),this.multiple&&this.logical!=="|"&&(t.logical=this.logical)),this.type&&this.type!=="default"&&(t.type=this.type),t}toValueKey(){return JSON.stringify(this.toValue())}isInValueList(t){return this.children.some(n=>n.id===(t==null?void 0:t.id))}}const DF=a.defineComponent({name:"SearchSelectMenu",props:{list:{type:Array},hoverId:String,keyword:{type:String,default:""},multiple:{type:Boolean,default:!1},selected:{type:Array,default:()=>[]},conditions:{type:Array},footerBtns:{type:Array,default:()=>[]},showLogical:{type:Boolean,default:!0},logical:{type:String,default:ri.OR}},emits:["selectItem","selectCondition","footerClick","update:logical"],setup(e,{emit:t}){const n=dt("searchSelect"),{resolveClassName:r}=xe(),s=a.computed(()=>e.footerBtns===void 0||e.footerBtns.length===0?[{id:"confirm",name:n.value.ok},{id:"cancel",name:n.value.cancel,disabled:!1}]:e.footerBtns);function o(y){t("selectItem",y)}function c(y){t("selectCondition",y)}function d(y){t("footerClick",y)}const u=a.computed(()=>{var y,b;return(y=e.list)!=null&&y.length?(b=e.keyword)!=null&&b.length?e.list.filter(N=>N.name.toLocaleLowerCase().includes(e.keyword.toLocaleLowerCase())):e.list:[]});function h(y){if(!y)return y;let{keyword:b}=e;const N=b.length;if(!(b!=null&&b.trim().length)||!y.toLocaleLowerCase().includes(b.toLocaleLowerCase()))return y;const w=[];let C=-1;return b=b.replace(/([.*/]{1})/gim,"\\$1"),y.replace(new RegExp(`${b}`,"igm"),(E,_)=>(w.length===0&&_!==0?w.push(y.slice(0,_)):C>=0&&w.push(y.slice(C+E.length,_)),w.push(a.createVNode("span",{class:"is-keyword"},[E])),C=_,E)),C>=0&&w.push(y.slice(C+N)),w.length?w:y}function f(y){var b;return(b=y.value)!=null&&b.name?[a.createVNode("span",{class:"menu-name"},[y.name,a.createTextVNode(":")]),y.value.name]:h(y.name)}function m(y,b){y.stopPropagation(),y.preventDefault(),o(b)}function p(y){t("update:logical",y)}return{handleClick:o,handleClickCondition:c,handleClickFooterBtn:d,handleSelectedChange:m,handleLogicalChange:p,filterList:u,getSearchNode:f,localFooterBtns:s,resolveClassName:r,t:n}},render(){var n,r;const e=a.createVNode("ul",{class:"menu-content"},[(n=this.list)==null?void 0:n.map(s=>a.createVNode("li",{id:s.id,key:s.id,class:`menu-item ${s.disabled?"is-disabled":""} ${this.hoverId===s.id&&!s.disabled?"is-hover":""}`,tabindex:"-1",onClick:()=>!s.disabled&&this.handleClick(s)},[a.createVNode(a.Fragment,null,[this.multiple&&a.createVNode("span",{onClick:o=>this.handleSelectedChange(o,s)},[a.createVNode(hn,{class:"is-selected",modelValue:this.selected.includes(s.id)},null)]),this.getSearchNode(s)])]))]),t=()=>!this.showLogical||!this.multiple?e:a.createVNode("div",{class:"menu-content-wrapper"},[e,a.createVNode("div",{class:"menu-condition"},[a.createVNode("div",{class:"menu-condition-title"},[this.t.logical]),a.createVNode(od,{label:"|",modelValue:this.logical,onChange:this.handleLogicalChange},{default:()=>[this.t.or,a.createTextVNode(" |")]}),a.createVNode(od,{label:"&",modelValue:this.logical,onChange:this.handleLogicalChange},{default:()=>[this.t.and,a.createTextVNode(" &")]})])]);return a.createVNode("div",{class:this.resolveClassName("search-select-menu")},[!!((r=this.conditions)!=null&&r.length)&&a.createVNode("ul",{class:"menu-header"},[this.conditions.map(s=>a.createVNode("li",{key:s.id,class:`menu-header-item ${s.disabled?"is-disabled":""}`,onClick:()=>!s.disabled&&this.handleClickCondition(s)},[s.name]))]),t()])}}),Gg=a.defineComponent({name:"SearchSelectInput",directives:{clickoutside:br},props:{data:{type:Array,required:!0},showInputBefore:Boolean,showCondition:Boolean,clickOutside:Function,placeholder:String,conditions:{type:Array,default:()=>[]},defaultUsingItem:Object,mode:{type:String,default:_a.DEFAULT},getMenuList:Function,validateValues:Function,valueBehavior:String},emits:["focus","add","delete","selectKey"],slots:Object,setup(e,{emit:t,expose:n}){const r=dt("searchSelect"),{resolveClassName:s}=xe(),o=a.ref(null),c=a.ref(null),d=a.ref(""),u=a.ref(!1),h=a.ref(!1),f=a.ref(!1),m=a.ref(e.defaultUsingItem),p=a.ref(""),y=a.ref(!1),b=Gi(100,B);let N=!1;const w=a.ref([]),C=a.ref([]),{editKey:E,onValidate:_,searchData:x}=Ug(),O=a.computed(()=>{var z;return((z=m.value)==null?void 0:z.logical)||ri.OR});a.watch(E,()=>{e.mode===_a.DEFAULT&&E.value&&(f.value=!1)}),a.watch([C,f],()=>{var he,pe;f.value&&((he=C.value)==null?void 0:he.some(q=>!q.disabled))?N||(p.value=e.valueBehavior===zn.NEED_KEY&&((pe=C.value.find(q=>!q.disabled))==null?void 0:pe.id)||"",N=!0,document.addEventListener("keydown",T)):(document.removeEventListener("keydown",T),N=!1,e.valueBehavior!==zn.NEED_KEY&&(p.value=""))});function T(z){switch(z.code){case"ArrowDown":case"ArrowUp":$(z);break;case"Enter":case"NumpadEnter":D(z);break}}function $(z){var q;z.preventDefault(),(q=o.value)==null||q.blur();const he=C.value.length;let pe=C.value.findIndex(G=>G.id===p.value);for(let G=0;G<he;G++){pe=(pe+(z.code==="ArrowDown"?1:-1)+he)%he;const ee=C.value[pe];if(ee&&!ee.disabled){const W=document.getElementById(ee.id);W==null||W.focus(),p.value=ee.id;break}}}function D(z){var pe;if(!N)return;z.preventDefault();const he=(pe=C.value)==null?void 0:pe.find(q=>q.id===p.value);he&&ae(he)}function R(z){var he,pe,q;if(!((he=c.value)!=null&&he.contains(z.target)||!((pe=e.clickOutside)!=null&&pe.call(e,z.target,c.value)))){if((q=m.value)!=null&&q.isCustomMenu){e.mode===_a.EDIT&&(F().then(G=>G&&ne()),f.value=!1);return}if(e.mode===_a.EDIT||m.value){m.value&&F().then(G=>G&&ne()),m.value||t("focus",!1);return}h.value=!1,f.value=!1,t("focus",h.value)}}let P=!1;function I(z){if(!P){if(u.value=!1,e.mode===_a.EDIT&&m.value&&!h.value){const he=Array.from(o.value.querySelectorAll(`[data-type="${m.value.values.length?"value":m.value.type}"]`));if(!he.length)return;z==null||z.preventDefault();const pe=document.createRange(),q=window.getSelection();pe.selectNodeContents(he.at(-1)),q==null||q.removeAllRanges(),P=!0,setTimeout(()=>{P=!1},200),q.addRange(pe),se(!0,!1);return}B(),se(!1,!h.value)}}function A(z){z.preventDefault();const he=z.clipboardData.getData("text").trim();if(!m.value){const pe=ye(he);if(pe){m.value=pe,se(!0,!0);return}d.value=he.split(jg).filter(q=>q.trim()&&!Wg.test(q)).join(` ${O.value} `),o.value.innerText=d.value,se(),b();return}m.value.addValues(he),b()}function k(z){const he=z.target.innerText.trim();if(!m.value){d.value=he,b();return}d.value=m.value.isSpecialType()?he:he.replace(m.value.name,"").replace(":","").trim(),b()}function L(z){var he;switch(z.code){case"Enter":case"NumpadEnter":if(e.valueBehavior===zn.NEED_KEY&&C.value.some(pe=>pe.id===p.value)){!m.value&&((he=d.value)!=null&&he.length)&&z.preventDefault();return}F(z).then(pe=>pe&&ne());break;case"Backspace":Z(z);default:u.value=!1;break}}async function F(z){var pe,q,G;return z==null||z.preventDefault(),await new Promise(ee=>setTimeout(ee,0)),m.value?d.value?await Q():!((pe=m.value)!=null&&pe.isSpecialType())&&((q=m.value)==null?void 0:q.values.length)<1?(u.value=!u.value,!1):(await U()&&((G=m.value)!=null&&G.isCustomMenu&&(f.value=!1),we()),!1):!d.value||e.valueBehavior===zn.NEED_KEY?void 0:await Y()}function Z(z){var he,pe,q;if(!m.value&&!d.value){p.value="",t("delete"),setTimeout(B,16);return}if((he=m.value)!=null&&he.values.length){if(m.value.type==="text"||!((pe=m.value.children)!=null&&pe.length))return;z.preventDefault();const G=window.getSelection();if((G==null?void 0:G.rangeCount)>0){let te=G.getRangeAt(0).startContainer;for(;te&&te.parentNode!==o.value;)te=te.parentNode;const be=((q=te==null?void 0:te.dataset)==null?void 0:q.index)||-1;m.value.values.splice(+be,1),d.value="",se(!1,!1);return}}else d.value||(m.value=null,d.value="",B());_("")}async function ae(z,he){var pe,q,G,ee,W;if((pe=z.value)!=null&&pe.id){const te=new ai({...z,id:z.realId??z.id},he);if(te.addValues(z.value.name,!1),e.valueBehavior===zn.NEED_KEY&&p.value){we(te),se(!0),p.value="";return}if(m.value=te,!await U(m.value.values)){m.value=null;return}we(m.value),se(!0),p.value="";return}if(!m.value||((q=m.value)==null?void 0:q.type)==="condition"){m.value=new ai(z,he??((G=m.value)==null?void 0:G.type)),d.value="";const te=((ee=m.value)==null?void 0:ee.type)==="condition";te||t("selectKey",{id:z.id,name:z.name,values:[]}),te&&we(),f.value=te||!!m.value.children.length,se(e.valueBehavior===zn.NEED_KEY&&!!p.value);return}m.value&&(m.value.addValue(z),a.nextTick(le)),await U(m.value.values)&&(m.value.multiple||we(),e.valueBehavior===zn.NEED_KEY&&((W=m.value)!=null&&W.multiple)&&se())}function K(z){ae(z,"condition")}function fe(z){var he;switch(z.id){case"confirm":if(!((he=m.value)!=null&&he.values.length))return;d.value="",F();break;case"cancel":m.value.values=[],f.value=!1;break}}function ie(z){m.value&&(m.value.logical=z)}async function X(z,he){if(typeof e.validateValues=="function"){let pe="";try{pe=await e.validateValues(z??null,he)}catch{pe=!1}if(typeof pe=="string"||pe===!1)return _(pe||"校验错误"),!1}return _(""),!0}async function U(z){if(!m.value)return await X(null,z);const{searchItem:he,validate:pe,values:q}=m.value;return pe&&typeof e.validateValues=="function"?await X(he,z??q):(_(""),!0)}async function B(){var he,pe,q,G,ee;let z=[];if(typeof e.getMenuList=="function"&&(!((he=e.data)!=null&&he.length)&&!m.value||m.value&&m.value.type!=="condition"&&(((pe=m.value.searchItem)==null?void 0:pe.async)===void 0||m.value.searchItem.async===!0))?(y.value=!0,z=await e.getMenuList((q=m.value)==null?void 0:q.searchItem,d.value).catch(()=>[]),y.value=!1):m!=null&&m.value?m.value.type==="condition"?z=e.conditions:(!((ee=m.value.values)!=null&&ee.length)||m.value.multiple||e.mode===_a.EDIT)&&(z=m.value.children.filter(W=>W.name.toLocaleLowerCase().includes(d.value.toLocaleLowerCase()))):(G=d.value)!=null&&G.length?e.data.filter(W=>!W.isSelected).forEach(W=>{var be,$e;if(W.name.toLocaleLowerCase().includes(d.value.toLocaleLowerCase())){z.push(W);const Ve=[];(be=W.children)==null||be.forEach(Re=>{Ve.push({...W,realId:W.id,id:Bi(10),value:Re})}),!Ve.length&&!W.onlyRecommendChildren&&Ve.push({...W,realId:W.id,id:Bi(10),value:{id:d.value,name:d.value}}),z.push(...Ve)}else{const Ve=[];($e=W.children)==null||$e.forEach(Re=>{Re.name.toLocaleLowerCase().includes(d.value.toLocaleLowerCase())&&Ve.push({...W,realId:W.id,id:Bi(10),value:Re})}),!Ve.length&&!W.onlyRecommendChildren&&Ve.push({...W,value:{id:d.value,name:d.value}}),z.push(...Ve)}}):z=e.data.filter(W=>!W.isSelected).slice(),C.value=z,e.valueBehavior===zn.NEED_KEY){const W=z.find(te=>!te.disabled);W&&(!p.value||p.value&&!z.some(te=>te.id===p.value))&&(p.value=W.id)}}async function Y(){const z=ye(d.value),he=(z==null?void 0:z.values)||[{id:d.value,name:d.value}];if(await U(he))return t("add",z||new ai({...he[0]},"text")),d.value="",B(),!0}async function Q(){let z=[];if(m.value.isSpecialType()){const pe=ye(d.value);pe&&(m.value=pe,z=pe.values)}if(z=z.length?z:m.value.str2Values(d.value),!!await U(z))return m.value.type==="text"?(m.value.name=d.value,m.value.id=d.value):m.value.values=z,t("add",m.value),d.value="",m.value=null,se(!0),!0}function ue(){if(!o.value)return;const z=document.createRange(),he=window.getSelection();z.selectNodeContents(o.value),z.collapse(!1),he.removeAllRanges(),he.addRange(z)}function se(z=!1,he=!0){z&&setTimeout(B,16),h.value=!0,f.value=!0,u.value=!1,!e.getMenuList&&he&&a.nextTick(ue),t("focus",h.value)}function we(z){var pe;t("add",z??m.value);const he=!((pe=m.value)!=null&&pe.isCustomMenu);m.value=null,d.value="",he&&(se(!0,he),a.nextTick(ne))}function ne(){o.value&&(d.value="",a.nextTick(()=>o.value.innerText=""))}function ye(z){const[he,pe]=z.split(":");if(he!=null&&he.trim()){const q=x.value.find(G=>G.name===he.trim());if(q){const G=new ai({...q},"default");return G.addValues(pe),G}}}function le(){var z;(z=d.value)!=null&&z.length&&(d.value="",Array.from(o.value.childNodes).forEach(pe=>{var q;pe.nodeType===Node.TEXT_NODE&&((q=pe.textContent)!=null&&q.trim())&&o.value.removeChild(pe)}))}function ge(){var z;(z=o.value)==null||z.focus()}async function j(){await F().then(z=>z&&ne()),f.value=!1,o.value.blur()}function ce(){d.value="",u.value=!1,f.value=!1,m.value=null,a.nextTick(ne)}function Ce(z){m.value.values=[{id:z,name:z}],F().then(he=>he&&ne())}function oe(){m.value||(p.value="")}return n({inputFocusForWrapper:ge,inputEnterForWrapper:j,inputClearForWrapper:ce,handleInputFocus:I,isFocus:h,refleshMenuHover:oe}),{popoverRef:c,inputRef:o,keyword:d,loading:y,remoteMenuList:w,menuList:C,menuHoverId:p,isFocus:h,usingItem:m,showPopover:f,showNoSelectValueError:u,debounceSetMenuList:b,documentArrowEvent:$,handleClickOutside:R,handleInputFocus:I,handleInputChange:k,handleInputPaste:A,handleLogicalChange:ie,handleInputKeyup:L,handleSelectItem:ae,handleSelectConditionItem:K,handleMenuFooterClick:fe,resolveClassName:s,inputFocusForWrapper:ge,inputEnterForWrapper:j,inputClearForWrapper:ce,deleteInputTextNode:le,customPanelSubmit:Ce,refleshMenuHover:oe,t:r}},render(){var f,m;const{multiple:e,values:t,placeholder:n,inputInnerHtml:r,isCustomMenu:s}=this.usingItem||{},o=!((f=this.keyword)!=null&&f.length)&&!(t!=null&&t.length)&&n,c=this.loading||this.showNoSelectValueError||this.showPopover&&(!!s||!!((m=this.menuList)!=null&&m.length)),d=!this.usingItem&&this.showCondition,u=()=>{var p,y,b,N;return a.withDirectives(a.createVNode("div",{ref:"inputRef",class:{"div-input":!0,"input-before":this.showInputBefore&&!((p=this.keyword)!=null&&p.length),"input-after":o},contenteditable:!0,"data-placeholder":!r&&!this.keyword?this.placeholder:"","data-tips":n||"",spellcheck:"false",onFocus:this.handleInputFocus,onInput:this.handleInputChange,onKeydown:this.handleInputKeyup,onPaste:this.handleInputPaste},[((y=this.usingItem)==null?void 0:y.name)&&(this.usingItem.isSpecialType()?a.createVNode("span",{key:this.usingItem.nameRenderKey,"data-key":this.usingItem.name,"data-type":this.usingItem.type},[this.usingItem.name]):a.createVNode("span",{key:this.usingItem.nameRenderKey,style:{color:"#979BA5"},contenteditable:!1,"data-key":this.usingItem.name,"data-type":this.usingItem.type,onMousedown:w=>w.preventDefault()},[this.usingItem.name,a.createTextVNode(": ")])),(N=(b=this.usingItem)==null?void 0:b.values)==null?void 0:N.map((w,C)=>a.createVNode("span",{key:C,"data-id":w.id,"data-index":C,"data-key":w.name,"data-type":"value"},[w.name,C<this.usingItem.values.length-1?` ${this.usingItem.logical} `:""]))]),[[a.resolveDirective("clickoutside"),this.handleClickOutside]])},h=()=>{var p,y,b,N,w;return this.loading?a.createVNode("div",null,[this.t.loading]):this.showNoSelectValueError?a.createVNode("div",null,[this.t.filterQueryMustHasValue]):(p=this.usingItem)!=null&&p.isCustomMenu&&this.$slots.menu?a.createVNode("div",{ref:"popoverRef",class:this.resolveClassName("search-select-popover")},[this.$slots.menu({value:(y=this.usingItem.values)==null?void 0:y[0],id:this.usingItem.id,name:this.usingItem.name,onSubmit:this.customPanelSubmit})]):(b=this.menuList)!=null&&b.length?a.createVNode("div",{ref:"popoverRef",class:this.resolveClassName("search-select-popover")},[a.createVNode(DF,{conditions:d?this.conditions:[],hoverId:this.menuHoverId,keyword:this.keyword,list:this.menuList,logical:(N=this.usingItem)==null?void 0:N.logical,multiple:!!e,selected:(t==null?void 0:t.map(C=>C.id))||[],showLogical:(w=this.usingItem)==null?void 0:w.showLogical,onFooterClick:this.handleMenuFooterClick,onSelectCondition:this.handleSelectConditionItem,onSelectItem:this.handleSelectItem,"onUpdate:logical":this.handleLogicalChange},null)]):void 0};return a.createVNode(Tn,{arrow:!1,disableOutsideClick:!0,isShow:c,placement:"bottom-start",theme:"light",trigger:"manual"},{default:u,content:h})}}),kF=a.defineComponent({name:"SearchSelected",props:{data:{type:Array,required:!0},selectedList:{type:Array,required:!0},overflowIndex:{type:Number,default:-1},conditions:{type:Array,default:()=>[]},getMenuList:Function,validateValues:Function,valueBehavior:String},emits:["delete","selectKey"],setup(e,{emit:t}){const n=a.ref(null),r=a.ref(null),{onEditClick:s,onEditEnter:o,onEditBlur:c,editKey:d}=Ug();function u(b){t("delete",b)}function h(b,N,w){b.preventDefault(),b.stopPropagation(),s(N,w),t("selectKey",{id:N.id,name:N.name,values:N.values.slice()}),setTimeout(()=>n.value.handleInputFocus(),200)}function f(b,N){o(b,N)}function m(b){b||c()}function p(b){var N;return!((N=r.value)!=null&&N.contains(b))}function y(b){const N=new ai(b.searchItem,b.type);return N.values=b.values.slice(),N.logical=b.logical||ri.OR,N}return{inputRef:n,selectedInputRef:r,editKey:d,copySelectedItem:y,handleDeleteSelected:u,handleEditSelected:h,handleInputOutside:p,handleAddSelected:f,handleInputFocus:m}},render(){const e=(t,n)=>this.editKey===`${t.id}_${n}`?a.createVNode("div",{key:this.editKey.toString(),ref:"selectedInputRef",class:"selected-input"},[a.createVNode(Gg,{key:this.editKey.toString(),ref:"inputRef",clickOutside:this.handleInputOutside,conditions:this.conditions,data:this.data,defaultUsingItem:this.copySelectedItem(t),getMenuList:this.getMenuList,mode:_a.EDIT,showCondition:!1,validateValues:this.validateValues,valueBehavior:this.valueBehavior,onAdd:r=>this.handleAddSelected(r,n),onFocus:this.handleInputFocus},{...this.$slots})]):a.createVNode("li",{key:`${t.id}_${n}`,class:`search-container-selected ${(this.overflowIndex>=0?n<this.overflowIndex:n>=0)?"":"hidden-selected"}`},[a.createVNode("span",{class:"selected-name",onClick:r=>this.handleEditSelected(r,t,n)},[t.inputInnerText]),a.createVNode(tn,{class:"selected-clear",onClick:()=>this.handleDeleteSelected(n)},null)]);return a.createVNode(a.Fragment,null,[this.selectedList.map((t,n)=>[this.overflowIndex>=0&&n===this.overflowIndex&&a.createVNode("div",{class:"search-container-selected overflow-selected"},[a.createTextVNode("+"),this.selectedList.length-this.overflowIndex]),e(t,n)])])}}),r2=40,Kg=6,Yg=26,IF={data:{type:Array,default:()=>[]},modelValue:{type:Array,default:()=>[]},maxHeight:{type:Number,default:120},conditions:{type:Array,default:()=>[]},clearable:{type:Boolean,default:!0},placeholder:String,getMenuList:Function,validateValues:Function,uniqueSelect:{type:Boolean,default:!1},valueBehavior:{type:String,default:zn.ALL,validator(e){return[zn.ALL,zn.NEED_KEY].includes(e)}}},Xg=Je(a.defineComponent({name:"SearchSelect",directives:{clickoutside:br},props:IF,emits:["update:modelValue","search","selectKey"],slots:Object,setup(e,{emit:t}){const n=dt("searchSelect"),{resolveClassName:r}=xe(),s=a.computed(()=>e.conditions===void 0?[{id:"or",name:n.value.or},{id:"and",name:n.value.and}]:e.conditions),o=a.ref(null),c=a.ref(null),d=a.ref(!1),u=a.ref([]),h=a.ref(-1),f=Gi(32,E),m=a.ref(""),p=a.ref(""),y=a.shallowRef([]);a.watch(()=>e.data,()=>{var I;y.value=JSON.parse(JSON.stringify(e.data)),(I=y.value)==null||I.forEach(A=>{A.isSelected=e.uniqueSelect&&!!e.modelValue.some(k=>k.id===A.id)})},{immediate:!0}),a.watch(()=>e.modelValue,I=>{var k;if(!(I!=null&&I.length)){u.value=[],(k=y.value)==null||k.forEach(L=>{L.isSelected=!1});return}const A=[];I.forEach(L=>{var Z;const F=u.value.find(ae=>ae.id===L.id&&ae.name===L.name);if((F==null?void 0:F.toValueKey())===JSON.stringify(L))F.values=L.values||[],F.logical=L.logical||ri.OR,A.push(F);else{let ae=e.data.find(ie=>ie.id===L.id),K="default";ae||(ae=e.conditions.find(ie=>ie.id===L.id),ae&&(K="condition")),!ae&&!((Z=L.values)!=null&&Z.length)&&(K="text");const fe=new ai(ae||L,K);fe.values=L.values||[],fe.logical=L.logical||ri.OR,A.push(fe)}}),u.value=A,y.value=JSON.parse(JSON.stringify(e.data||[])),y.value.forEach(L=>{L.isSelected=e.uniqueSelect&&!!A.some(F=>F.id===L.id)})},{immediate:!0,deep:!0}),a.onMounted(()=>{EF(c.value.querySelector(`.${r("search-select-container")}`),f)}),a.onBeforeUnmount(()=>{OF(c.value.querySelector(`.${r("search-select-container")}`),f)}),VF({onEditClick:b,onEditEnter:N,onEditBlur:w,onValidate:C,editKey:m,searchData:a.computed(()=>e.data),isClickOutside:O});function b(I,A){m.value=`${I.id}_${A}`}function N(I,A){const k=u.value.slice();k.splice(A,1,I),t("update:modelValue",k.map(L=>L.toValue())),m.value=""}function w(){m.value="",C("")}function C(I){p.value=I||""}function E(){if(d.value||u.value.length<1){h.value=-1;return}const I=c.value.querySelector(`.${r("search-select-container")}`),A=c.value.querySelector(".search-container").clientWidth-Kg-2,k=I.querySelectorAll(".search-container-selected:not(.overflow-selected)");let L=0,F=0,Z=0;for(;F===0&&L<=A-r2&&Z<=k.length-1;){const ae=k[Z];if(ae.clientHeight>Yg){h.value=Z;return}L+=ae?ae.clientWidth+Kg:0,L>=A-r2&&(F=Z),Z+=1}if(F===k.length-1&&L<=A){h.value=-1;return}h.value=L>=A-r2?F:F-1}function _(){m.value||o.value.inputFocusForWrapper()}function x(){u.value=[],h.value=-1,o.value.inputClearForWrapper(),t("update:modelValue",[])}function O(I){var A;return!((A=c.value)!=null&&A.contains(I))}function T(I){const A=u.value.slice();A.push(I),C(""),t("update:modelValue",A.map(k=>k.toValue()))}function $(I){const A=u.value.slice();A.splice(typeof I=="number"?I:u.value.length-1,1),C(""),o.value.refleshMenuHover(),t("update:modelValue",A.map(k=>k.toValue()))}function D(I){var A;I&&(h.value=-1),I===!1&&((A=c.value.querySelector(`.${r("search-select-container")}`))==null||A.scrollTo(0,0)),d.value=I}function R(I){o.value.inputEnterForWrapper(),t("search",I)}function P(I){t("selectKey",I)}return{inputRef:o,wrapRef:c,isFocus:d,copyData:y,selectedList:u,overflowIndex:h,validateStr:p,onEditClick:b,onEditEnter:N,handleWrapClick:_,handleInputFocus:D,handleResize:E,handleClearAll:x,handleInputOutside:O,handleAddSelected:T,handleDeleteSelected:$,handleClickSearch:R,localConditions:s,resolveClassName:r,handleSelectedKey:P,t:n}},render(){var r,s;const e=`${this.isFocus?this.maxHeight:Yg}px`,t=!!this.selectedList.length&&this.selectedList.slice(-1)[0].type!=="condition",n=Object.assign({},this.$slots.menu?{menu:o=>{var c,d;return(d=(c=this.$slots).menu)==null?void 0:d.call(c,o)}}:{});return a.createVNode("div",{ref:"wrapRef",class:this.resolveClassName("search-select")},[a.createVNode("div",{class:{[this.resolveClassName("search-select-container")]:!0,"is-focus":this.isFocus},onClick:this.handleWrapClick},[a.createVNode("div",{class:"search-prefix"},[(s=(r=this.$slots).prepend)==null?void 0:s.call(r)]),a.createVNode("div",{style:{maxHeight:e},class:"search-container"},[a.createVNode(kF,{conditions:this.localConditions,data:this.copyData,getMenuList:this.getMenuList,overflowIndex:this.overflowIndex,selectedList:this.selectedList,validateValues:this.validateValues,valueBehavior:this.valueBehavior,onDelete:this.handleDeleteSelected,onSelectKey:this.handleSelectedKey},{...n}),a.createVNode("div",{class:"search-container-input"},[a.createVNode(Gg,{ref:"inputRef",clickOutside:this.handleInputOutside,conditions:this.localConditions,data:this.copyData,getMenuList:this.getMenuList,placeholder:this.placeholder||this.t.pleaseSelect,showCondition:t,showInputBefore:!this.selectedList.length,validateValues:this.validateValues,valueBehavior:this.valueBehavior,onAdd:this.handleAddSelected,onDelete:this.handleDeleteSelected,onFocus:this.handleInputFocus,onSelectKey:this.handleSelectedKey},{...n})])]),a.createVNode("div",{class:"search-nextfix"},[this.clearable&&!!this.selectedList.length&&a.createVNode(un,{class:"search-clear",onClick:this.handleClearAll},null),this.$slots.append?this.$slots.append():a.createVNode(Wa,{class:`search-nextfix-icon ${this.isFocus?"is-focus":""}`,onClick:this.handleClickSearch},null)])]),!!this.validateStr.length&&a.createVNode("div",{class:this.resolveClassName("search-select-tips")},[this.$slots.validate?this.$slots.validate():a.createVNode(a.Fragment,null,[a.createVNode(ao,{class:"select-tips"},null),this.validateStr||""])])])}}));function PF(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const qg=gm(Wc);qg.width.default="400";const MF=a.defineComponent({name:"Sideslider",inheritAttrs:!1,props:{...qg,title:v.string.def(""),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,{emit:t}){const n=a.useAttrs(),r=a.useSlots(),s=a.getCurrentInstance(),{resolveClassName:o}=xe(),c=async()=>{let h=!0;typeof e.beforeClose=="function"&&(h=await e.beforeClose()),h&&(t("update:isShow",!1),t("closed"),t("animation-end"))},d=()=>{t("shown")},u=()=>{t("hidden")};return()=>{const h={header:()=>{var m;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:`${o("sideslider-header")}`},[a.createVNode("div",{class:`${o("sideslider-close")}`,onClick:c},[e.direction==="left"?a.createVNode(rr,null,null):a.createVNode(_n,null,null)]),a.createVNode("div",{class:`${o("sideslider-title")}`},[((m=r.header)==null?void 0:m.call(r))??e.title])])])},default:()=>{var m;return a.createVNode("div",{class:`${o("sideslider-content")}`},[(m=r.default)==null?void 0:m.call(r)])}};r.footer&&Object.assign(h,{footer:()=>a.createVNode("div",{class:`${o("sideslider-footer")}`},[r.footer()])});const f={...n};return s.vnode.scopeId&&(f[s.vnode.scopeId]=""),a.createVNode(Lo,a.mergeProps(f,{width:e.width,class:{[o("sideslider")]:!0,[`is-position-${e.direction}`]:e.direction},extCls:e.extCls,animateType:e.direction,backgroundColor:e.backgroundColor,closeIcon:!1,escClose:e.escClose,isShow:e.isShow,quickClose:e.quickClose,renderDirective:e.renderDirective,showMask:e.showMask,transfer:e.transfer,zIndex:e.zIndex,onClose:c,onHidden:u,onShown:d}),PF(h)?h:{default:()=>[h]})}}}),Jg=Je(MF),Zg=a.defineComponent({name:"SliderButton",props:{modelValue:{type:Number,default:0},params:{type:Object,default:()=>({})}},emits:["emitChange","resetSize","update:modelValue"],setup(e,{emit:t}){const n=a.ref(!1),r=a.ref(!1),s=a.ref(0),o=a.ref(0),c=a.ref(0),d=a.ref(null),u=a.ref(e.modelValue),h=a.ref(0),f=a.ref(0),m=a.ref(!1),p=a.ref(null),y=a.computed(()=>{var P,I;let D="";if((P=e.params.customContent)!=null&&P[e.modelValue]){const A=e.params.customContent[e.modelValue];D=A.tip||A.label||""}const R=e.params.vertical?Wi.RIGHT:Wi.TOP;return(I=e.params)!=null&&I.showTip?{content:e.params.formatterTipLabel(`${D||(e==null?void 0:e.modelValue)||"0"}`),placement:R}:{content:"",placement:R}}),b=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),N=a.computed(()=>e.params.vertical?{bottom:b.value}:{left:b.value}),w=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),C=D=>{e.params.disable||(D.preventDefault(),E(D),Io(window,"mousemove",_),Io(window,"touchmove",_),Io(window,"mouseup",x),Io(window,"touchend",x))},E=D=>{n.value=!0,r.value=!0,e.params.vertical?s.value=D.clientY:o.value=D.clientX,c.value=parseFloat(b.value),d.value=c.value},_=D=>{if(n.value){r.value=!1,t("resetSize");let R=0;e.params.vertical?(h.value=D.clientY,R=(s.value-h.value)/e.params.sliderSize*100):(f.value=D.clientX,R=(f.value-o.value)/e.params.sliderSize*100),d.value=c.value+R,O(d.value)}},x=()=>{m.value=!1,n.value&&(setTimeout(()=>{n.value=!1,r.value||(O(d.value),t("emitChange"))},0),fd(window,"mousemove",_),fd(window,"touchmove",_),fd(window,"mouseup",x),fd(window,"touchend",x))},O=D=>{if(D===null||isNaN(D))return;D<0?d.value=0:D>100&&(d.value=100);const R=100/((e.params.maxValue-e.params.minValue)/e.params.step);let I=Math.round(D/R)*R*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;I=parseFloat(I.toFixed(e.params.precision)),t("update:modelValue",I),!n.value&&e.modelValue!==u.value&&(u.value=e.modelValue)},{resolveClassName:T}=xe();return{renderDom:()=>a.createVNode("div",{ref:p,style:N.value,class:[`${T("slider-button")}`,e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],tabindex:"0",onClick:D=>D.stopPropagation(),onMousedown:C},[y.value.content?a.createVNode(a.Fragment,null,[a.createVNode(Tn,{boundary:document.body,content:y.value.content,placement:y.value.placement,theme:"dark"},{default:()=>[a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]})]):a.createVNode(a.Fragment,null,[a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]),e.params.showButtonLabel&&!e.params.showIntervalLabel?a.createVNode(a.Fragment,null,[a.createVNode("div",{class:["slider-button-label",e.params.vertical?"vertical":"horizontal"]},[w.value])]):null]),setPosition:O,tip:y}},render(){return this.renderDom()}}),Io=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},fd=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)},RF=a.defineComponent({name:"Slider",props:{modelValue:v.oneOfType([v.arrayOf(v.number),v.number]),extCls:{type:String,default:""},vertical:{type:Boolean,default:!1},height:{type:String,default:"200px"},disable:{type:Boolean,default:!1},showTip:{type:Boolean,default:!1},maxValue:{type:[Number],default:100},minValue:{type:[Number],default:0},step:{type:[Number],default:1},range:{type:Boolean,default:!1},showInterval:{type:Boolean,default:!1},showIntervalLabel:{type:Boolean,default:!1},showButtonLabel:{type:Boolean,default:!1},showBetweenLabel:{type:Boolean,default:!1},showInput:{type:Boolean,default:!1},customContent:{type:Object,default:null},formatterLabel:{type:Function,default:e=>e},formatterButtonLabel:{type:Function,default:e=>e},formatterTipLabel:{type:Function,default:e=>e},labelClick:{type:[Boolean,Function],default:!1}},emits:["update:modelValue","change"],setup(e,{slots:t,emit:n}){const r=a.ref(1),s=a.ref(null),o=a.ref(null),c=a.ref(null),d=a.ref(0),u=a.ref(0),h=a.ref(null),f=a.ref(null),m=a.ref(null),p=a.ref(null),y=a.computed(()=>{const U=[e.minValue,e.maxValue,e.step].map(B=>{const Y=`${B}`.split(".")[1];return Y?Y.length:0});return Math.max.apply(null,U)}),b=a.computed(()=>Math.min(s.value,o.value)),N=a.computed(()=>Math.max(s.value,o.value)),w=a.computed(()=>e.range?`${100*(N.value-b.value)/(e.maxValue-e.minValue)}%`:`${100*(s.value-e.minValue)/(e.maxValue-e.minValue)}%`),C=a.computed(()=>e.range?`${100*(b.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),E=a.computed(()=>e.vertical?{height:w.value,bottom:C.value}:{width:w.value,left:C.value}),_=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const U=(e.maxValue-e.minValue)/e.step,B=100*e.step/(e.maxValue-e.minValue),Y=[];for(let Q=1;Q<U;Q++)Y.push(Q*B);return e.range?Y.filter(Q=>Q<100*(b.value-e.minValue)/(e.maxValue-e.minValue)||Q>100*(N.value-e.minValue)/(e.maxValue-e.minValue)):Y.filter(Q=>Q>100*(s.value-e.minValue)/(e.maxValue-e.minValue))}),x=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),O=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const U=100*e.step/(e.maxValue-e.minValue),B=[];for(let Y=e.minValue,Q=0;Y<=e.maxValue;Y+=e.step,Q++){const ue={stepWidth:Q*U,stepLabel:e.formatterLabel(Y)};B.push(ue)}return B}),T=a.computed(()=>Array.isArray(e.modelValue)),$=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((U,B)=>Number(U)-Number(B)).filter(U=>Number(U)>=e.minValue&&Number(U)<=e.maxValue).map(U=>{const{tip:B}=e.customContent[U],{label:Y}=e.customContent[U];return{tip:B||Y||"",label:Y||"",percent:(Number(U)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),D=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:y.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:r.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{A()}),a.watch(()=>s.value,U=>{e.range?n("update:modelValue",[b.value,N.value]):n("update:modelValue",U),d.value=U}),a.watch(()=>o.value,U=>{n("update:modelValue",[b.value,N.value]),u.value=U}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(s.value=Math.max(e.minValue,Number(e.modelValue[0])),o.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(s.value=e.minValue,o.value=e.maxValue),c.value=[s.value,o.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?s.value=e.minValue:s.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),c.value=s.value),R(),Io(window,"resize",R())});const R=()=>{h.value&&(r.value=h.value[`client${e.vertical?"Height":"Width"}`])},P=U=>{var B,Y;if(U.stopPropagation(),!e.disable){if(R(),e.vertical){const Q=(B=h.value)==null?void 0:B.getBoundingClientRect().bottom;F((Q-U.clientY)/r.value*100)}else{const Q=(Y=h.value)==null?void 0:Y.getBoundingClientRect().left;F((U.clientX-Q)/r.value*100)}k()}},I=()=>e.range?![b.value,N.value].every((U,B)=>U===c.value[B]):e.modelValue!==c.value,A=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const U=e.modelValue;e.range&&Array.isArray(U)?U[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):U[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):U[0]<e.minValue?n("update:modelValue",[e.minValue,U[1]]):U[1]>e.maxValue?n("update:modelValue",[U[0],e.maxValue]):(s.value=Number(U[0]),o.value=Number(U[1]),I()&&(c.value=U.slice())):!e.range&&typeof U=="number"&&!isNaN(U)&&(U<e.minValue?n("update:modelValue",e.minValue):U>e.maxValue?n("update:modelValue",e.maxValue):(s.value=U,I()&&(c.value=U)))},k=async()=>{await a.nextTick(),n("change",e.range?[b.value,N.value]:e.modelValue)},L=U=>e.vertical?{bottom:`${U}%`}:{left:`${U}%`},F=U=>{if(!e.range){f.value.setPosition(U);return}const B=e.minValue+U*(e.maxValue-e.minValue)/100;Math.abs(b.value-B)<Math.abs(N.value-B)?p.value=s.value<o.value?f.value:m.value:p.value=s.value>o.value?f.value:m.value,p.value.setPosition(U)},Z=U=>{if(U==="")return;const B=parseFloat(U);B<e.minValue?(d.value=e.minValue,s.value=e.minValue):B>e.maxValue?(d.value=e.maxValue,s.value=e.maxValue):s.value=B},ae=U=>{if(U==="")return;const B=parseFloat(U.toString());B<e.minValue?(u.value=e.minValue,o.value=e.minValue):B>e.maxValue?(u.value=e.maxValue,o.value=e.maxValue):o.value=B},K=U=>{let B=0;return U==="start"?B=e.vertical?e.maxValue:e.minValue:B=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[s.value,o.value].includes(B)?"0":"1"},{resolveClassName:fe}=xe(),ie=(U,B)=>{let Y=B.stepWidth??B.percent??B;if(e.labelClick){U.stopPropagation(),U.stopImmediatePropagation(),U.preventDefault();let Q;if(typeof e.labelClick=="function"){const ue={percent:Y,step:B};if(Q=e.labelClick(U,ue),Q===!1)return}Y=typeof Q=="number"?Q:Y,console.log("handleStepLabelClick",Y),F(Y);return}};return{renderDom:()=>{var U,B;return a.createVNode("div",{class:[`${fe("slider")}`,e.extCls]},[(U=t.start)==null?void 0:U.call(t),a.createVNode("div",{ref:h,style:x.value,class:`${fe("slider-runway")}`,onClick:P},[a.createVNode("div",{style:E.value,class:[`${fe("slider-bar")}`,e.vertical?"vertical":"horizontal",{disable:e.disable}]},null),e.showInterval?_.value.map((Y,Q)=>Q===0||Q===_.value.length-1?null:a.createVNode("div",{key:Q,style:L(Y),class:[`${fe("slider-interval")}`,{vertical:e.vertical}],onClick:ue=>ie(ue,Y)},null)):null,e.customContent?$.value.map((Y,Q)=>Q===0||Q===$.value.length-1?null:a.createVNode("div",{key:Q,style:L(Y.percent),class:[`${fe("slider-interval")}`,{vertical:e.vertical}],onClick:ue=>ie(ue,Y)},null)):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?a.createVNode("div",{class:[`${fe("slider-labels")}`,e.vertical?"vertical":"horizontal"]},[function(){if(e.showBetweenLabel)return[a.createVNode("div",{style:[{opacity:K("start")}],class:"label-start"},[e.formatterLabel(e.minValue)]),a.createVNode("div",{style:[{opacity:K("end")}],class:"label-end"},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return O.value.map((Y,Q)=>a.createVNode("div",{key:Q,style:L(Y.stepWidth),class:[`${fe("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:ue=>ie(ue,Y)},[Y.stepLabel]));if(e.customContent)return $.value.map((Y,Q)=>a.createVNode("div",{key:Q,style:L(Y.percent),class:[`${fe("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:ue=>ie(ue,Y)},[Y.label]))}()]):void 0,a.createVNode(Zg,{ref:f,modelValue:s.value,"onUpdate:modelValue":Y=>s.value=Y,params:D.value,onEmitChange:k,onResetSize:R},null),e.range?a.createVNode(Zg,{ref:m,modelValue:o.value,"onUpdate:modelValue":Y=>o.value=Y,params:D.value,onEmitChange:k,onResetSize:R},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:`${fe("slider-input")}`},[a.createVNode("div",{class:"input-item"},[a.createVNode(va,{max:e.maxValue,min:e.minValue,modelValue:d.value,type:"number",onChange:Z},null)]),T.value&&o.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("~")]),a.createVNode("div",{class:"input-item"},[a.createVNode(va,{max:e.maxValue,min:e.minValue,modelValue:u.value,type:"number",onChange:ae},null)])]:void 0]):void 0,(B=t.end)==null?void 0:B.call(t)])}}},render(){return this.renderDom()}}),Qg=Je(RF);var ep=function(e){return e.ERROR="error",e.LOADING="loading",e.UNKNOWN="",e}(ep||{});const tp={theme:v.theme().def(yl.PRIMARY),size:v.size(),curStep:v.number.def(1),controllable:v.bool.def(!1),direction:A3(),status:Pe("status",{}).def(ep.UNKNOWN),lineType:$3(),extCls:v.string,steps:v.array.def([]),beforeChange:v.func},np=Je(a.defineComponent({name:"Steps",props:tp,emits:["update:curStep","click"],setup(e,{emit:t}){const n=dt("steps"),r=dt("lang"),s=a.ref([]),o=f=>{const m=[];f.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=f=>{tp.curStep=f},d=()=>{var f;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}),(f=e.steps)!=null&&f.length&&o(e.steps)};a.watch(()=>r.value,()=>{d()});const u=async f=>{try{e.controllable&&f!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(m,p)=>{const y=await e.beforeChange(f);y?m(y):p(y)}),t("update:curStep",f),t("click",f))}catch(m){console.warn(m)}};a.onMounted(d),a.watch(()=>e.steps,()=>{o(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{c(e.curStep)},{deep:!0});const{resolveClassName:h}=xe();return{defaultSteps:s,jumpTo:u,resolveClassName:h}},render(){const e=this.resolveClassName("steps"),t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",r=Ue({[`${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"},d=(m,p)=>(p.icon||(p.icon=m),!isNaN(p.icon)),u=m=>m.status==="loading",h=m=>m.status==="error",f=(m,p)=>o(m)&&this.status==="loading"||u(p)?a.createVNode(Qi,{class:`${this.resolveClassName("icon")} ${this.resolveClassName("steps-icon")} icon-loading`},null):o(m)&&this.status==="error"||h(p)?a.createVNode(tn,{class:`${this.resolveClassName("steps-icon")}`},null):s(m)?a.createVNode(ja,{class:`${this.resolveClassName("steps-icon")}`},null):a.createVNode("span",null,[d(m,p)?m+1:a.createVNode(p.icon,null,null)]);return a.createVNode("div",{class:r},[this.defaultSteps.map((m,p)=>{var y,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"?"is-error":"",m.status&&o(p)?[`${this.resolveClassName(`step-${m.status}`)}`]:""]},[a.createVNode("span",{style:{cursor:this.controllable?"pointer":""},class:[`${this.resolveClassName("step-indicator")}`,`${this.resolveClassName(`step-${c(m)?"icon":"number"}`)}`,`${this.resolveClassName(`step-icon${m.status}`)}`],onClick:()=>{this.jumpTo(p+1)}},[((b=(y=this.$slots)[p+1])==null?void 0:b.call(y))??f(p,m)]),m.title?a.createVNode("div",{class:`${this.resolveClassName("step-content")}`},[a.createVNode("div",{style:{cursor:this.controllable?"pointer":""},class:`${this.resolveClassName("step-title")}`,onClick:()=>{this.jumpTo(p+1)}},[m.title]),m.description&&a.createVNode("div",{class:`${this.resolveClassName("step-description")}`,title:m.description},[m.description])]):""])})])}})),FF=a.defineComponent({name:"Swiper",props:{isLoop:v.bool.def(!0),loopTime:v.number.def(8e3),pics:v.array.def([]),list:v.array.def([]),height:v.number,width:v.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:r,loopTime:s,pics:o,list:c,height:d,width:u}=a.toRefs(e),h=a.ref(),f=a.ref(0),m=a.ref(0),p=a.ref(0),y=a.ref(0);let b;const{resolveClassName:N}=xe(),w=a.computed(()=>{var L;return((L=c.value)==null?void 0:L.length)>0?c.value:o.value}),C=a.computed(()=>({width:`${m.value*w.value.length}px`,transform:`translateX(-${m.value*f.value}px)`})),E=a.computed(()=>({width:`${m.value}px`,height:`${p.value}px`})),_=L=>{let F=L;L>=w.value.length&&(F=0),L<0&&(F=w.value.length-1),f.value=F,t("index-change",F)},x=L=>{L&&window.open(L,"_blank")},O=L=>[`${N("swiper-img")}`,{[`${N("swiper-link")}`]:L.link},L.class],T=L=>({"background-image":`url(${L.url})`,"background-color":L.color}),$=L=>({[`${N("current-index")}`]:f.value===L}),D=()=>{r.value&&(y.value=window.setTimeout(()=>{_(f.value+1),D()},s.value))},R=()=>{window.clearTimeout(y.value)},P=()=>{var F;const L=(F=h.value)==null?void 0:F.parentElement;!L||!window.ResizeObserver||(b=new ResizeObserver(()=>{k()}),b.observe(L))},I=()=>{var L;(L=b.disconnect)==null||L.call(b)},A=L=>{if(L===void 0)return{height:0,width:0};const F=getComputedStyle(L),Z=L.clientWidth-parseFloat(F.paddingTop)-parseFloat(F.paddingBottom);return{height:L.clientHeight-parseFloat(F.paddingLeft)-parseFloat(F.paddingRight),width:Z}},k=()=>{var F;const L=A((F=h.value)==null?void 0:F.parentElement);m.value=+u.value>0?u.value:L.width,p.value=+d.value>0?d.value:L.height};return a.watch([d,u],k),a.onMounted(()=>{k(),D(),P()}),a.onBeforeUnmount(()=>{R(),I()}),()=>a.createVNode("section",{ref:h,style:E.value,class:`${N("swiper-home")}`},[a.createVNode("hgroup",{style:C.value,class:`${N("transition")} ${N("swiper-main")}`},[w.value.map(L=>{var F;return a.createVNode("h3",{style:E.value,class:`${N("swiper-card")}`},[((F=n.default)==null?void 0:F.call(n,L))??a.createVNode("span",{style:T(L),class:O(L),onClick:()=>x(L.link)},null)])})]),a.createVNode("ul",{class:`${N("swiper-index")}`},[w.value.map((L,F)=>a.createVNode("li",{class:$(F),onMouseover:()=>_(F)},null))]),a.createVNode("span",{class:`${N("swiper-nav")} ${N("nav-prev")}`,onClick:()=>_(f.value-1)},[a.createVNode("i",{class:`${N("swiper-nav-icon")}`},null)]),a.createVNode("span",{class:`${N("swiper-nav")} ${N("nav-next")}`,onClick:()=>_(f.value+1)},[a.createVNode("i",{class:`${N("swiper-nav-icon")}`},null)])])}}),rp=Je(FF),HF={theme:Zv(),size:v.size(),disabled:v.bool,showText:v.bool,isOutline:v.bool,onText:v.string.def("ON"),offText:v.string.def("OFF"),isSquare:v.bool,extCls:v.string,beforeChange:v.func.def(void 0),trueValue:v.oneOfType([v.string,v.number,v.bool]).def(!0),falseValue:v.oneOfType([v.string,v.number,v.bool]).def(!1),value:v.oneOfType([v.string,v.number,v.bool]).def(!1),modelValue:v.oneOfType([v.string,v.number,v.bool]).def(!1),withValidate:v.bool.def(!0)};let hd=function(e){return e.CHANGE="change",e.UPDATE="update:modelValue",e}({});function BF(e){return e}function zF(e){return!!e}const UF={[hd.UPDATE]:BF,[hd.CHANGE]:zF},ap=Je(a.defineComponent({name:"Switcher",props:HF,emits:UF,setup(e,{emit:t}){const n=Qn(),{resolveClassName:r}=xe(),s=a.ref(!1),o=a.computed(()=>e.trueValue===d.value),c=a.ref(e.modelValue!==!1),d=a.computed(()=>c.value?e.modelValue:e.value),u=a.computed(()=>{const m={[e.extCls]:!!e.extCls,[`${r("switcher")}`]:!0,[`${r("switcher-outline")}`]:e.isOutline,[`${r("switcher-square")}`]:e.isSquare,"show-label":e.showText,"is-disabled":e.disabled,"is-checked":o.value,"is-unchecked":!o.value,"is-loading":s.value,[`${r("primary")}`]:e.theme==="primary"};if(e.size&&!e.showText){const p=`${r(`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 h=m=>{if(m.stopPropagation(),m.preventDefault(),e.disabled||s.value)return;const p=o.value?e.falseValue:e.trueValue,y=!o.value,b=()=>{t(hd.UPDATE,p),t(hd.CHANGE,y)};let N=!0;if(typeof e.beforeChange=="function"&&(N=e.beforeChange(p),typeof N.then=="function"))return s.value=!0,N.then(()=>{b()}).finally(()=>{s.value=!1});N&&b()},f=m=>{(m.code==="Enter"||m.key==="Enter"||m.keyCode===13)&&h(m)};return()=>a.createVNode("div",{class:u.value,tabindex:"0",onClick:h,onKeydown:f},[s.value?a.createVNode(sc,{class:`${r("switcher-loading")}`},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[o.value?e.onText:e.offText]):""])}}));var md=(e=>(e.BORDER_CARD="border-card",e.CARD="card",e.CARD_GRID="card-grid",e.CARD_TAB="card-tab",e.UNBORDER_CARD="unborder-card",e))(md||{}),Po=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e))(Po||{});const sp=Pe("position",{}).def("top");var ip=(e=>(e.INSERT="insert",e.REPLACE="replace",e))(ip||{});const op=Pe("sortType",{}).def("replace"),jF={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},WF={name:v.oneOfType([v.number,v.string]).def(""),label:v.string||v.func,tips:v.string,closable:v.bool,visible:v.bool.def(!0),disabled:v.bool,sortable:v.bool,renderDirective:Hu(),panel:v.string||v.func},GF={active:v.oneOfType([v.number,v.string]).def(""),type:Pe("type",{}).def("border-card"),tabPosition:sp,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:op,labelHeight:v.number.def(50),extCls:v.string.def(""),validateActive:v.bool.def(!0),activeBarSize:v.number.def(2),activeBarColor:v.string.def("#3a84ff")},KF={active:v.oneOfType([v.number,v.string]).def(""),type:Pe("type",{}).def("border-card"),activeBarColor:v.string.def("#3a84ff"),activeBarSize:v.number.def(2),panels:{type:Array,default:()=>[]},tabPosition:sp,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:op,labelHeight:v.number.def(50),validateActive:v.bool.def(!0),...jF},lp=a.defineComponent({name:"TabNav",directives:{bkTooltips:pa},props:KF,setup(e){const t=a.ref(null),n=a.computed(()=>{const f={width:0,height:0,bottom:0,left:0};if(!t.value)return f;if([Po.LEFT,Po.RIGHT].includes(e.tabPosition)){const{clientHeight:m,offsetTop:p}=t.value,y={width:`${e.activeBarSize}px`,height:`${m}px`,top:`${p}px`,background:e.activeBarColor};return e.tabPosition===Po.LEFT?y.right=0:y.left=0,y}if(e.type===md.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 f}),r=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const f=[];let m=!1;return e.panels.filter((p,y)=>{if(!p.props)return null;const{name:b,label:N,closable:w,visible:C,disabled:E,sortable:_,tips:x}=p.props;if(!C)return!1;e.active===b&&(m=!0);const O=T=>p.slots.label?a.h(p.slots.label):[void 0,""].includes(T)?`选项卡${y+1}`:typeof T=="string"?T:typeof T=="function"?a.h(T):T;return f.push({name:b,closable:w,visible:C,disabled:E,sortable:_,tips:x,tabLabel:O(N)}),!0}),!m&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),f}),s=a.ref(-1),o=a.ref(-1),c=a.ref(""),d=(f,m)=>f===m,u={handleTabAdd(f){e.tabAdd(f)},dragstart(f,m){o.value=f,c.value=e.guid,Object.assign(m.dataTransfer,{effectAllowed:"move"}),e.tabDrag(f,m)},dragenter(f){d(c.value,e.guid)&&(s.value=f)},dragend(){s.value=-1,o.value=-1,c.value=null},drop(f,m){if(!d(c.value,e.guid))return!1;e.tabSort(o.value,f,m)},handleTabChange(f){e.tabChange(f)},handleTabRemove(f,m){e.tabRemove(f,m)}},{resolveClassName:h}=xe();return{...u,activeRef:t,activeBarStyle:n,navs:r,dragenterIndex:s,dragStartIndex:o,draggingEle:c,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4),resolveClassName:h}},render(){const{active:e,closable:t,addable:n,sortable:r,sortType:s,labelHeight:o,dragstart:c,dragenter:d,dragend:u,drop:h}=this,f=()=>this.navs.map((N,w)=>{if(!N)return null;const{name:C,disabled:E,tabLabel:_}=N,x=()=>{const T=[this.resolveClassName("tab-header-item")];return E&&T.push(this.resolveClassName("tab-header--disabled")),e===C&&T.push(this.resolveClassName("tab-header--active")),T.join(" ")},O=(T,$)=>!E&&(T||$);return a.withDirectives(a.createVNode("div",{key:C,ref:e===C?"activeRef":"",class:x(),draggable:O(N.sortable,r),onClick:()=>!E&&this.handleTabChange(C),onDragend:T=>{T.preventDefault(),u()},onDragenter:T=>{T.preventDefault(),d(w)},onDragleave:T=>{T.preventDefault()},onDragover:T=>{T.preventDefault()},onDragstart:T=>c(w,T),onDrop:T=>{T.preventDefault(),h(w,s)}},[a.createVNode("div",null,[_]),O(N.closable,t)?a.createVNode("span",{class:this.resolveClassName("tab-header--close"),onClick:()=>this.handleTabRemove(w,N)},[a.createVNode(un,null,null)]):""]),[[a.resolveDirective("bk-tooltips"),{content:N.tips||"",disabled:!N.tips}]])}),m=()=>{var w,C;const N=[];return typeof this.$slots.add=="function"?N.push((C=(w=this.$slots).add)==null?void 0:C.call(w,a.h)):n&&N.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(io,{style:"display:flex;",width:26,height:26},null)])),N.length?a.createVNode("div",{class:this.resolveClassName("tab-header-operation")},[N.map((E,_)=>a.createVNode("div",{key:_,class:this.resolveClassName("tab-header-item")},[E]))]):null},p=()=>this.type===md.UNBORDER_CARD?a.createVNode("div",{style:this.activeBarStyle,class:this.resolveClassName("tab-header-active-bar")},null):"",y=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||y?"tab-header-auto":""]},[p(),f()]),b,y])}}),cp=en(a.defineComponent({name:"Tab",components:{TabNav:lp},props:GF,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 r=a.ref(!1),s=a.ref([]),o=a.getCurrentInstance(),c=(f,m=[])=>{const{children:p}=f;return(p||[]).forEach(y=>{let{type:b}=y;b=b.name||b,b==="TabPanel"&&y.component?m.push(y.component):(b===a.Fragment||b==="template")&&c(y,m)}),m},d=()=>{if(t.default){const{children:f}=o.subTree.children[1];if(!f)return;const m=f[0],p=c(m);p.length!==s.value.length&&(s.value=p)}};a.onMounted(()=>{d(),r.value=!0,a.onUpdated(()=>{d()})});const u={tabAdd(f){n("add",{e:f}),n("add-panel",{e:f})},tabChange(f){n("change",f),n("tab-change",f),n("update:active",f)},tabRemove(f,m){n("remove",f,m),n("remove-panel",f,m)},tabSort(f,m,p){const y=s.value;if(p===ip.INSERT)if(f<m)y.splice(m+1,0,s[f]),y.splice(f,1);else if(f>m)y.splice(m,0,s[f]),y.splice(f+1,1);else return!1;else{const b=y[m];y[m]=y[f],y[f]=b}s.value=[...y],n("sort",f,m,p),n("sort-change",f,m,p)},tabDrag(f,m){n("drag",f,m),n("on-drag-tab",f,m)}},{resolveClassName:h}=xe();return{...u,isMounted:r,panels:s,resolveClassName:h}},render(){var n,r;const e=()=>{const s=[this.resolveClassName("tab"),this.extCls];return this.tabPosition===Po.TOP?s.push(this.resolveClassName(`tab--${this.tabPosition}`),this.resolveClassName(`tab--${this.type}`)):(s.push(this.resolveClassName(`tab--${this.tabPosition}`)),this.type===md.CARD_TAB&&s.push(this.resolveClassName("tab--vertical-tab"))),s},t=()=>{const{panels:s,active:o,type:c,closable:d,addable:u,sortable:h,sortType:f,labelHeight:m,validateActive:p,tabPosition:y,activeBarSize:b,activeBarColor:N,tabAdd:w,tabChange:C,tabRemove:E,tabSort:_,tabDrag:x}=this,O={panels:s,active:o,type:c,closable:d,addable:u,sortable:h,sortType:f,labelHeight:m,validateActive:p,tabPosition:y,activeBarSize:b,activeBarColor:N,tabAdd:w,tabChange:C,tabRemove:E,tabSort:_,tabDrag:x};return!s||!Array.isArray(s)?null:a.createVNode(lp,O,this.$slots)};return a.createVNode("div",{class:e()},[t(),a.createVNode("div",{class:this.resolveClassName("tab-content")},[(r=(n=this.$slots).default)==null?void 0:r.call(n)])])}}),{TabPanel:a.defineComponent({name:"TabPanel",props:WF,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}=xe();return a.withDirectives(a.createVNode("div",{ref:"content",class:n("tab-panel")},[t()]),[[a.vShow,e]])}})});var dp=(e=>(e.COL="col",e.HORIZONTAL="horizontal",e.NONE="none",e.OUTER="outer",e.ROW="row",e))(dp||{}),up=(e=>(e.AUTO="auto",e.HIGHLIGHT="highlight",e))(up||{});const YF=["auto","highlight"],XF=["none","row","col","outer","horizontal"],et={ROW_INDEX:"row_index",ROW_UID:"row_id",ROW_EXPAND:"row_expand",ROW_SELECTION:"row_selection",ROW_SELECTION_INDETERMINATE:"row_selection_indeterminate",ROW_SOURCE_DATA:"row_source_data",ROW_SKIP_CFG:"row_skip_config",ROW_SPAN:"row_span"},Ae={COL_UID:"col_$uuid",COL_SOURCE_DATA:"col_source_data",COL_MIN_WIDTH:"col_min_width",COL_SORT_ACTIVE:"col_sort_active",COL_SORT_TYPE:"col_sort_type",COL_SORT_FN:"col_sort_fn",COL_SORT_SCOPE:"col_sort_scope",COL_FILTER_FN:"col_filter_fn",COL_FILTER_VALUES:"col_filter_values",COL_FILTER_OBJ:"col_filter_obj",COL_FILTER_SCOPE:"col_filter_scope",COL_IS_DRAG:"col_is_drag",COL_SPAN:"col_span",COL_CELL_RENDER:"col_cell_render",COL_TEXT_RENDER:"col_text_render",COL_RESIZEABLE:"col_resizeable",COL_FIXED_STYLE:"col_fixed_style",COL_RECT:"col_rect",HEAD_CELL_RENDER:"head_cell_render",HEAD_TEXT_RENDER:"head_text_render",SELECTION_DISABLED:"selection_disabled",SELECTION_INDETERMINATE:"selection_indeterminate",SELECTION_VAL:"selection_val",WIDTH:"width",CALC_WIDTH:"calcWidth",RESIZE_WIDTH:"resizeWidth",LISTENERS:"listeners",IS_HIDDEN:"isHidden"},fp=8,ns=42;var gd=(e=>(e.DEF1="def1",e.DEF2="def2",e))(gd||{});const hp={def1:"#FAFBFD",def2:"#F0F1F5"},Mo={large:78,medium:60,small:42},qF=e=>[{value:"small",label:e.value.setting.lineHeight.small,height:Mo.small},{value:"medium",label:e.value.setting.lineHeight.medium,height:Mo.medium},{value:"large",label:e.value.setting.lineHeight.large,height:Mo.large}],mp=Symbol("bkInitColumns"),JF=60;var Bt=(e=>(e.ASC="asc",e.CUSTOM="custom",e.DESC="desc",e.NULL="null",e))(Bt||{});const ZF=["asc","desc","null","custom"],si=80,rs={},QF={};Pe("showOverflowTooltipMode",{default:"auto"});const eH=Pe("columnType",{default:"__COL_TYPE_NONE"}),a2=Pe("columnType",{default:""});Pe("full",{default:"full"}),Pe("columnSize",{default:"small"});const tH=Qt(),s2=Pe("IOverflowTooltipPropType",{default:!1,type:[Boolean,Object]}),nH=Pe("ISortPropShape",{default:!1,type:[Boolean,String,Object]}),rH=Pe("IFilterPropShape",{default:!1,type:[Boolean,Object]});var gp=(e=>(e.DEBOUNCE="debounce",e.THROTTLE="throttle",e))(gp||{});const pd=Pe("IColumnType",{default:{width:"100%",label:""},type:[Object]}),aH=Pe("ITableSettingPropType",{default:!1,type:[Boolean,Object]}),i2=Pe("LabelFunctionStringType",{}),sH=Pe("RenderFunctionStringType",{}),pp=Pe("SpanFunctionStringType",{}),iH=Pe("RowClassFunctionStringType",{}),oH=Pe("RowHeightFunctionNumberType",{});Pe("FunctionNumberType",{});const vd=e=>Pe("StringNumberType",{}).def(e);Pe("IColumnPropType",{default:{label:void 0,minWidth:si},type:[Object]});var vp=(e=>(e.independent="independent",e.interdependent="interdependent",e))(vp||{});const lH={data:v.arrayOf(v.any).def([]),columns:v.arrayOf(pd).def([]),activeColumn:v.oneOfType([v.number.def(-1),v.arrayOf(v.number.def(-1))]),columnPick:Pe("columnPick",{}).def("disabled"),height:vd("auto"),stripe:v.bool.def(!1),minHeight:vd(ns),maxHeight:vd("auto"),rowHeight:oH,headHeight:v.number.def(ns),showHead:v.bool.def(!0),sortValFormat:v.arrayOf(v.any).def([""]),thead:Pe("ITheadType",{}).def({color:gd.DEF1,height:ns,isShow:!0}),virtualEnabled:v.bool.def(!1),border:v.oneOfType([v.arrayOf(Pe("boderType",{})),v.string]).def([dp.ROW]),pagination:v.oneOfType([v.bool.def(!1),v.object.def({})]).def(!1),paginationHeight:v.number.def(JF),remotePagination:v.bool.def(!1),acrossAll:v.bool.def(!1),emptyText:v.string,emptyCellText:v.oneOfType([v.string,v.func]).def(""),isEmptyCell:v.oneOfType([v.arrayOf(Qt),v.arrayOf(null),v.arrayOf(void 0),v.func]).def(["",void 0,null]),settings:aH,rowClass:v.oneOfType([v.string,v.object,v.func]).def({}),rowStyle:v.oneOfType([v.string,v.object,v.func]).def({}),cellStyle:v.oneOfType([v.string,v.object,v.func]).def({}),cellClass:v.oneOfType([v.string,v.object,v.func]).def({}),scrollLoading:v.oneOfType([v.object,v.bool]).def(void 0),reserveExpand:v.bool.def(!1),selectionKey:v.string.def(""),checked:v.array.def([]),isSelectedFn:v.func.def(void 0),rowKey:v.oneOfType([v.string,v.func]).def(et.ROW_INDEX),showOverflowTooltip:s2,asyncData:v.bool.def(!1),rowHover:v.oneOf(YF).def(up.HIGHLIGHT),defaultSort:v.shape({}).def({}),isRowSelectEnable:v.oneOfType([v.func.def(()=>!0),v.bool.def(!0)]).def(!0),resizerWay:Pe("ResizerWay",{default:"debounce"}),observerResize:v.bool.def(!0),intersectionObserver:v.bool.def(!1),align:a2,headerAlign:a2,prependStyle:v.style().def({}),colSortBehavior:Pe("IColSortBehavior",{default:"independent"}),isFlex:v.bool.def(!0),rowDraggable:v.oneOfType([v.func,v.bool,v.object]).def(!1),shiftMultiChecked:v.bool.def(!1),scrollbar:v.bool.def(!0),fixedBottom:Pe("FixedBottomOption",{default:{position:"relative",height:ns}}).def(null),appendLastRow:Pe("AppendLastRowOption",{default:{type:"default",cellRender:void 0}})},cH={label:i2,field:i2,render:sH,width:v.oneOfType([v.number,v.string]),minWidth:vd(si),columnKey:v.string.def(""),showOverflowTooltip:s2,type:eH,resizable:v.bool.def(!0),fixed:v.oneOfType([v.bool,tH]).def(!1),sort:nH,filter:rH,colspan:pp.def(1),rowspan:pp.def(1),align:a2,className:iH,prop:i2,index:v.number.def(void 0)},dH=a.defineComponent({name:"TableColumn",props:cH,setup(e,{}){const t=a.inject(mp,()=>{}),n={};return a.watch(()=>[e],()=>{pn.isEqual(n,a.toRaw(e))||(t(),Object.assign(n,a.toRaw(e)))},{immediate:!0,deep:!0}),a.onUnmounted(()=>{t()}),()=>{}}});var St=(e=>(e.CELL_CLICK="cellClick",e.CELL_DBL_CLICK="cellDblclick",e.COLUMN_FILTER="columnFilter",e.COLUMN_FILTER_SAVE="colFilterSave",e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.DRAG_END="dragend",e.NATIVE_CLICK="click",e.NATIVE_DBL_CLICK="dblclick",e.PAGE_LIMIT_CHANGE="pageLimitChange",e.PAGE_VALUE_CHANGE="pageValueChange",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.ROW_SELECT="select",e.ROW_SELECT_ALL="selectAll",e.ROW_SELECT_CHANGE="selectionChange",e.SCROLL_BOTTOM="scrollBottom",e.SETTING_CHANGE="settingChange",e))(St||{});const uH=e=>!0,fH=e=>!0,hH=e=>!0,mH=e=>!0,yd=(e,t,n,r,s)=>!0,gH=e=>!0,pH=e=>!0,vH=e=>!0,yH=e=>!0,yp=e=>!0,bH=e=>!0,bp=e=>!0,wH={columnPick:uH,columnFilter:fH,columnSort:mH,colFilterSave:hH,rowClick:yd,rowDblclick:yd,rowExpand:gH,select:pH,selectAll:vH,selectionChange:yH,pageLimitChange:yp,pageValueChange:yp,settingChange:bH,scrollBottom:e=>!0,cellClick:bp,cellDblclick:bp,rowMouseEnter:yd,rowMouseLeave:yd,dragend:e=>!0},CH=(e,{afterResize:t})=>{const{getColumnAttribute:n,getColumnOrderWidth:r,setColumnAttribute:s,setNextColumnWidth:o,getPreColumn:c}=e,d=ie=>n(ie,Ae.LISTENERS),u="HeadColumnResize";let h=function(ie){return ie.MOUSE_DOWN="onMousedown",ie.MOUSE_MOVE="onMousemove",ie.MOUSE_OUT="onMouseout",ie}({}),f=!1,m=!1,p=!1,y=0,b=null,N="right",w=null,C=null,E=0;const _=new WeakMap,x=a.ref(-1e3),O=[Ae.WIDTH],T=ie=>{ie.stopImmediatePropagation(),ie.stopPropagation(),ie.preventDefault()},$=ie=>{T(ie),m=!1,p=!1;const X=r(b,O)+E,U=r(b,[Ae.COL_MIN_WIDTH]),B=X>U?X:U;o(b,B),s(b,Ae.WIDTH,B),document.removeEventListener("mouseup",$),x.value=-1e3,E=0,I(w),t==null||t(),w=null;const Y=ie.target;F(Y),b=null},D=pn.throttle(ie=>{x.value=x.value+ie}),R=ie=>{T(ie),document.body.style.setProperty("user-select","none");const X=ie.clientX-y;E=E+X,y=ie.clientX;const U=r(b,O)+X;r(b,[Ae.COL_MIN_WIDTH])<U&&D(X)},P=pn.debounce(ie=>{document.body.style.setProperty("user-select","none"),ie==null||ie.classList.add("col-resize-hover")}),I=ie=>{P.cancel(),document.body.style.removeProperty("user-select"),ie==null||ie.classList.remove("col-resize-hover")},A=ie=>{if(!f)return;k(ie.target),y=ie.clientX;const X=N==="left"?c(C):C;s(X,Ae.COL_IS_DRAG,!0),b=X,w=ie.target.closest("table");const U=w.getBoundingClientRect();x.value=ie.clientX-U.left,P(w),m=!0,document.addEventListener("mouseup",$)},k=ie=>{var U,B;((B=(U=ie==null?void 0:ie.parentElement)==null?void 0:U.parentElement)==null?void 0:B.querySelectorAll(".col-pointer-hover")).forEach(Y=>{Y==null||Y.classList.remove("col-pointer-hover"),Y==null||Y.classList.remove("poiner-left"),Y==null||Y.classList.remove("poiner-right")})},L=(ie,X)=>{const U=ie.parentElement;U==null||U.classList.add("col-pointer-hover"),U==null||U.classList.add(`poiner-${X}`);const B=X==="right"?U.nextElementSibling:U.previousElementSibling,Y=X==="right"?"left":"right";B==null||B.classList.add("col-pointer-hover"),B==null||B.classList.add(`poiner-${Y}`)},F=ie=>{p||(x.value=-1e3,ie.classList.remove("cell-resize"),k(ie),_.set(ie,!1),document.removeEventListener("mousedown",A))},Z={[h.MOUSE_MOVE]:(ie,X,U)=>{if(T(ie),m){p=!0,R(ie);return}const B=ie.target;if(!p){if(!B)return;const{offsetWidth:Y}=B,Q=ie.offsetX;Y>12&&(Y-Q<8||Q<8&&U>0)?(f=!0,N=Q<8?"left":"right",_.get(B)||(_.set(B,!0),B.classList.add("cell-resize"),L(B,N),C=X,document.addEventListener("mousedown",A))):(f=!1,F(B))}},[h.MOUSE_OUT]:(ie,X,U)=>{const B=ie.target;F(B)}},ae=ie=>`${u}_${ie}`,K=()=>{e.tableColumnList.forEach(ie=>{if(e.getColumnAttribute(ie,Ae.COL_RESIZEABLE)){const X=d(ie);Object.keys(Z).forEach(U=>{const B=ae(U);X!=null&&X.has(B)||X.set(B,[]),X.get(B).push(Z[U])})}})},fe=()=>{e.tableColumnList.forEach(ie=>{const X=d(ie);Object.keys(Z).forEach(U=>{const B=ae(U);if(X!=null&&X.has(B)){const Y=X.get(B);Y.length=0}})})};return a.watch(()=>[e.tableColumnList],()=>{fe(),K()},{immediate:!0,deep:!0}),{dragOffsetX:x}},NH=()=>{const e=[];let t=0;const n=new WeakMap,r=h=>a.isRef(h)?a.unref(h):a.toRaw(h),s=h=>Object.keys(h??{}).reduce((f,m)=>{const p=m.replace(/-(\w)/g,(y,b)=>b.toUpperCase());return Object.assign(f,{[p]:r(h[m])})},{}),o=h=>(n.has(h)||n.set(h,er()),n.get(h)),c=(h,f,m)=>{var p,y;if((p=h==null?void 0:h.component)!=null&&p.subTree){d((y=h==null?void 0:h.component)==null?void 0:y.subTree,f);return}if(typeof h=="function")return h();if(Array.isArray(h)){h.forEach(b=>d(b,f));return}if(Array.isArray(h==null?void 0:h.children)){h.children.forEach(b=>d(b,f));return}if(!m&&a.isVNode(h)&&(h!=null&&h.children)&&typeof(h==null?void 0:h.children)=="object"){Object.keys(h.children).forEach(b=>d(h.children[b],f));return}},d=(h,f)=>{var p,y,b;let m=f;if(!(!h||((p=h.type)==null?void 0:p.name)==="Table")){if(((y=h.type)==null?void 0:y.name)==="TableColumn"){const N=Object.assign({index:t},s(h.props),{field:h.props.prop||h.props.field,render:h.props.render??((b=h.children)==null?void 0:b.default),uniqueId:o(h),children:[]}),w=(f==null?void 0:f.children)??e;w.some(C=>C.uniqueId===N.uniqueId)||(w.push(N),t=t+1,h.children&&c(h,N,!0));return}c(h,m)}};return{resolveColumns:h=>{var m,p,y,b;e.length=0,t=0;const f=h==null?void 0:h.find(N=>{var w;return((w=N.type)==null?void 0:w.name)==="GhostBody"});return f&&((m=f.component)!=null&&m.subTree?d((p=f.component)==null?void 0:p.subTree):(((b=(y=f.children)==null?void 0:y.default)==null?void 0:b.call(y))??[]).forEach(N=>d(N))),e.sort((N,w)=>N.index-w.index),e}}};var wp=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(s,o){return s[0]===n?(r=o,!0):!1}),r}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 r=e(this.__entries__,n),s=this.__entries__[r];return s&&s[1]},t.prototype.set=function(n,r){var s=e(this.__entries__,n);~s?this.__entries__[s][1]=r:this.__entries__.push([n,r])},t.prototype.delete=function(n){var r=this.__entries__,s=e(r,n);~s&&r.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,r){r===void 0&&(r=null);for(var s=0,o=this.__entries__;s<o.length;s++){var c=o[s];n.call(r,c[1],c[0])}},t}()}(),o2=typeof window<"u"&&typeof document<"u"&&window.document===document,bd=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")()}(),xH=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(bd):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),_H=2;function SH(e,t){var n=!1,r=!1,s=0;function o(){n&&(n=!1,e()),r&&d()}function c(){xH(o)}function d(){var u=Date.now();if(n){if(u-s<_H)return;r=!0}else n=!0,r=!1,setTimeout(c,t);s=u}return d}var TH=20,EH=["top","right","bottom","left","width","height","size","weight"],OH=typeof MutationObserver<"u",LH=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=SH(this.refresh.bind(this),TH)}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_,r=n.indexOf(t);~r&&n.splice(r,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(){!o2||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),OH?(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(){!o2||!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,r=n===void 0?"":n,s=EH.some(function(o){return!!~r.indexOf(o)});s&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Cp=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var s=r[n];Object.defineProperty(e,s,{value:t[s],enumerable:!1,writable:!1,configurable:!0})}return e},ii=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||bd},Np=Cd(0,0,0,0);function wd(e){return parseFloat(e)||0}function xp(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,s){var o=e["border-"+s+"-width"];return r+wd(o)},0)}function AH(e){for(var t=["top","right","bottom","left"],n={},r=0,s=t;r<s.length;r++){var o=s[r],c=e["padding-"+o];n[o]=wd(c)}return n}function $H(e){var t=e.getBBox();return Cd(0,0,t.width,t.height)}function VH(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return Np;var r=ii(e).getComputedStyle(e),s=AH(r),o=s.left+s.right,c=s.top+s.bottom,d=wd(r.width),u=wd(r.height);if(r.boxSizing==="border-box"&&(Math.round(d+o)!==t&&(d-=xp(r,"left","right")+o),Math.round(u+c)!==n&&(u-=xp(r,"top","bottom")+c)),!kH(e)){var h=Math.round(d+o)-t,f=Math.round(u+c)-n;Math.abs(h)!==1&&(d-=h),Math.abs(f)!==1&&(u-=f)}return Cd(s.left,s.top,d,u)}var DH=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof ii(e).SVGGraphicsElement}:function(e){return e instanceof ii(e).SVGElement&&typeof e.getBBox=="function"}}();function kH(e){return e===ii(e).document.documentElement}function IH(e){return o2?DH(e)?$H(e):VH(e):Np}function PH(e){var t=e.x,n=e.y,r=e.width,s=e.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,c=Object.create(o.prototype);return Cp(c,{x:t,y:n,width:r,height:s,top:n,right:t+r,bottom:s+n,left:t}),c}function Cd(e,t,n,r){return{x:e,y:t,width:n,height:r}}var MH=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Cd(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=IH(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}(),RH=function(){function e(t,n){var r=PH(n);Cp(this,{target:t,contentRect:r})}return e}(),FH=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new wp,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=r}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 ii(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new MH(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 ii(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(r){return new RH(r.target,r.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}(),_p=typeof WeakMap<"u"?new WeakMap:new wp,Sp=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=LH.getInstance(),r=new FH(t,n,this);_p.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){Sp.prototype[e]=function(){var t;return(t=_p.get(this))[e].apply(t,arguments)}});var HH=function(){return typeof bd.ResizeObserver<"u"?bd.ResizeObserver:Sp}();const Gt=(e,t,n)=>{if(e!=null){if(typeof t=="string")return Object.prototype.hasOwnProperty.call(e,t)?typeof e[t]=="function"?e[t].call(void 0,...n):e[t]:void 0;if(Array.isArray(t))return t.map(r=>Gt(e,r,n)).filter(r=>r!==void 0).at(0)}},BH=e=>as(e,"auto"),as=(e,t="100%",n=null)=>{let r="";return/^null|undefined$/gi.test(`${e}`)?r=t:r=/^\d+\.?\d+$/.test(`${e}`)?`${e}px`:e,n&&(r=`calc(${r} - ${n})`),r},zH=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>XF.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},Tp=(e,t,n=60,r=!1,s="throttle")=>{const o=()=>{typeof t=="function"&&t()},c=s==="debounce"?hl(o,n):k3(o),d=()=>Reflect.apply(c,void 0,[]),u=new HH(()=>{d()});return r&&typeof t=="function"&&t(),{start:()=>{u.observe(e)},disconnect:()=>{u.unobserve(e),u.disconnect()}}},l2=e=>{const{showHead:t,headHeight:n,thead:r={}}=e;return Object.assign({},{isShow:t,height:n},r)},UH=(e,t="ig")=>new RegExp(`${e}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),t),Nd=(e,t,n)=>{let r;return(typeof e=="string"||typeof e=="number"||typeof e=="boolean")&&(r=e),typeof e=="object"&&(r=Yc(e,t)),n!=null&&n.length&&(n.forEach(s=>{if(typeof s=="function")r=s(r,e,t);else if(typeof r=="string"){const o=r.match(typeof s=="string"?UH(s):s);r=(o==null?void 0:o[1])??r}}),/^-?\d+.?\d*$/.test(r)&&(r=Number(r))),r},jH=(e,t)=>Yc(e,t),oi=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?oi(Reflect.apply(e,void 0,t),t):[],WH=(e,t,n)=>{const r=GH(e,t,n);return r!==null?r:er()},GH=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===et.ROW_INDEX?`__ROW_INDEX_${n}`:t.rowKey:typeof t.rowKey=="function"?Reflect.apply(t.rowKey,void 0,[e]):null,Ep=(e,t,n)=>{const r=o=>o.field??o.id;return(o=>e.some(c=>r(c)===Gt(o,["field","type"],[o])))(t)&&n.length&&!n.includes(Gt(t,["field","type"],[t]))},xd=(e,t,n,r,s)=>typeof e[s]=="function"?Reflect.apply(e[s],void 0,[{column:e,colIndex:t,row:n,rowIndex:r}]):typeof e[s]=="number"?e[s]:1,KH=(e,t,n,r)=>{const s=xd(e,t,n,r,"colspan"),o=xd(e,t,n,r,"rowspan");return{colspan:s,rowspan:o}},Op=(e,t,n=[])=>{var u,h;const r=e.field,s=f=>Nd(f,r,n),o=e.type==="index",c=(f,m,p,y)=>{const b=o?p:s(f)??"",N=o?y:s(m)??"";return typeof b=="number"&&typeof N=="number"?b-N:String.prototype.localeCompare.call(b,N)},d=typeof((u=e.sort)==null?void 0:u.sortFn)=="function"?(h=e.sort)==null?void 0:h.sortFn:c;return t===Bt.NULL?(f,m)=>!0:(f,m,p,y)=>d(f,m,p,y)*(t===Bt.DESC?-1:1)},YH=e=>{const t={[Bt.NULL]:3,[Bt.ASC]:1,[Bt.DESC]:2};return t[e]===void 0?Bt.ASC:Object.keys(t)[(t[e]+1)%3]},XH=(e,t,n=[])=>typeof e=="string"?{value:e}:typeof e=="boolean"&&e?{value:Bt.NULL}:typeof e=="object"&&e!==null?typeof e.sortFn=="function"?{value:"custom",...e}:Object.assign({},{sortFn:Op(t,e.value??Bt.NULL,n)},e):null,_d=(e,{row:t,index:n,isCheckAll:r})=>typeof e.isRowSelectEnable=="boolean"?e.isRowSelectEnable!==!1:typeof e.isRowSelectEnable=="function"?e.isRowSelectEnable({row:t,index:n,isCheckAll:r}):!0,qH=(e,t,n)=>{const r=WH(e,n,t);return r!==void 0&&e[r]!==void 0?Yc(e,r):t},JH=(e,t)=>{const{value:n,sortFn:r,sortScope:s}=XH(e.sort??t.defaultSort,e)??{};return{type:n,fn:r,scope:s,active:!!e.sort,enabled:!!e.sort}},ZH=e=>typeof e.filter=="object"?{...e.filter,enabled:!0}:{enabled:!!e.filter,checked:[]},Sd=e=>a.isProxy(e)?a.toRaw(e):e,QH=e=>{const t=dt("table"),n=a.reactive(new WeakMap),r=a.reactive([]),s=er(),o=a.reactive([]),c=a.reactive([]),d=a.reactive([]),u=new WeakMap,h=(q,G={})=>{o.forEach(W=>W.active=!1);const ee=o.find(W=>W.col===q);if(ee){Object.assign(ee,G,{active:!0});return}o.push({col:q,...G,active:!0})},f=(q,G,ee)=>{let W=0;return/^\d+\.?\d*(px)?$/.test(`${q[G]}`)&&(W=Number(`${q[G]}`.replace(/px/,"")),se(q,Ae.WIDTH,W),F(q,{width:W,left:null,right:null})),/^\d+\.?\d*%$/.test(`${q[G]}`)&&(W=Number(`${q[G]}`.replace(/%/,""))/100*ee,se(q,Ae.WIDTH,W),F(q,{width:W,left:null,right:null})),W},m=q=>{let G=q,ee=si;const W=($e,Ve="width")=>{const Re=[];return $e.forEach(We=>{const nt=f(We,Ve,q);G=G-nt,[void 0,null,"auto","undefined","null",""].includes(We[Ve])&&Re.push(We)}),G>0&&Re.length&&(ee=G/Re.length),Re},te=W(y);W(te,"minWidth").forEach($e=>{const Ve=ee>si?ee:si;se($e,Ae.WIDTH,Ve),F($e,{width:Ve,left:null,right:null})})},p=(q,G={})=>{const ee=c.find(W=>W.col===q);if(ee){Object.assign(ee,G);return}c.push({col:q,...G})},y=a.reactive([]),b=()=>{y.length=0,y.push(...r.filter(q=>!B(q)))},N=()=>{var q,G;return e.rowDraggable?{minWidth:50,width:((q=e.rowDraggable)==null?void 0:q.width)??60,label:((G=e.rowDraggable)==null?void 0:G.label)??t.value.sort,type:"drag"}:null},w=(q=["rowspan","colspan"])=>r.some(G=>q.some(ee=>typeof G[ee]=="function"||/^\d$/.test(`${G[ee]}`))),C=a.computed(()=>w(["colspan"])),E=a.computed(()=>w(["rowspan"])),_=(q,G,ee)=>{let W=ee;const te=xd(q,G,null,null,"colspan"),be={skipCol:!1,skipColLen:0};return W>0&&(be.skipColLen=W,be.skipCol=!0,W=W-1),te>1&&(be.skipColLen=te,W=te-1),{...be,skipColumnNum:W}},x=q=>{if(/^\d+/.test(`${q.minWidth}`))return q.minWidth;let G=si;return q.sort&&(G=G+18),q.filter&&(G=G+28),G},O=(q,G)=>{const ee=ne(q,Ae.LISTENERS);return ee?Array.from(ee==null?void 0:ee.keys()).reduce((W,te)=>{const be=te.split("_").slice(-1)[0];return Object.assign(W,{[be]:$e=>{ee.get(te).forEach(Ve=>Reflect.apply(Ve,void 0,[$e,q,G]))}})},{}):{}},T=q=>{if(!q.filter)return null;const G=(te,be="ig")=>new RegExp(`${te}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),be),ee=(te,be)=>{const{match:$e}=q.filter,Ve=Nd(be,Gt(q,"field",[q,be]));return $e!=="fuzzy"?te.includes(Ve):te.some(Re=>G(Re,"img").test(Ve))};return typeof q.filter.filterFn=="function"?(te,be,$e,Ve)=>q.filter.filterFn(te,be,q,$e,Ve):(te,be)=>te.length?ee(te,be):!0},$=q=>{d.length=0;let G=0;const ee=[],W=N();W&&q.unshift(W);const te=(Re,We=1)=>{Re.length&&G<We&&(G=We),Re.forEach(nt=>te(nt.children??[],We+1))};te(q);const be=(Re,We)=>{if(Re){const nt=u.get(Re);nt.thColspan=nt.thColspan+We,nt.offsetLeft=nt.offsetLeft+We,be(nt.parent,We)}},$e=(Re,We,nt,st)=>{var os,ls,cs,ci,di;const at=a.toRaw(Re);let Vt=st;d[We]===void 0&&(d[We]=[]);const gt=!!(((os=at.children)==null?void 0:os.length)??!1);(((ls=at.children)==null?void 0:ls.length)??!1)||ee.push(at),u.has(at)||u.set(at,{thColspan:1,thRowspan:1,isGroup:gt,offsetLeft:st});const Lt=u.get(at),Ye=((cs=at.children)==null?void 0:cs.length)??0,Kt=((ci=at.children)==null?void 0:ci.length)??1,is=Ye>0?1:G-We,Fo=Vt+(Ye>0?Ye-1:0);return Object.assign(Lt,{thColspan:Kt>0?Kt:1,parent:nt,thRowspan:is,offsetLeft:Fo}),d[We].push(at),Kt>1&&be(nt,Kt-1),(di=at.children)==null||di.forEach((Ho,Bo)=>{Vt=Vt+$e(Ho,We+1,at,Vt+Bo)}),Ye>0?Ye-1:0};let Ve=0;return q.forEach((Re,We)=>{Ve=Ve+$e(Re,0,null,Ve+We)}),ee},D=q=>u.get(q),R=()=>{o.length=0;let q=0;(r||[]).forEach((G,ee)=>{const{skipCol:W,skipColumnNum:te,skipColLen:be}=C.value?_(G,ee,q):{skipCol:!1,skipColumnNum:0,skipColLen:0};if(q=te,!n.has(G)){const{type:$e,fn:Ve,scope:Re,active:We,enabled:nt}=JH(G,e),st=T(G),at=e.settings??{},Vt=ZH(G);Vt.enabled&&p(G,{[Ae.COL_FILTER_FN]:st,[Ae.COL_FILTER_VALUES]:Vt.checked??[]}),nt&&h(G,{[Ae.COL_SORT_TYPE]:$e,[Ae.COL_SORT_FN]:Ve,[Ae.COL_SORT_SCOPE]:Re}),n.set(G,{[Ae.CALC_WIDTH]:void 0,[Ae.RESIZE_WIDTH]:void 0,[Ae.COL_RECT]:a.reactive({width:null,left:null,right:null,height:null}),[Ae.COL_MIN_WIDTH]:x(G),[Ae.LISTENERS]:new Map,[Ae.WIDTH]:G.width,[Ae.IS_HIDDEN]:Ep(at.fields??[],G,at.checked??[]),[Ae.COL_SORT_TYPE]:a.ref($e),[Ae.COL_SORT_FN]:Ve,[Ae.COL_FILTER_OBJ]:Vt,[Ae.COL_FILTER_FN]:st,[Ae.COL_FILTER_SCOPE]:void 0,[Ae.COL_SORT_SCOPE]:Re,[Ae.COL_SORT_ACTIVE]:a.ref(We),[Ae.COL_IS_DRAG]:!1,[Ae.COL_SPAN]:{skipCol:W,skipColumnNum:te,skipColLen:be},[Ae.COL_UID]:er(),[Ae.SELECTION_DISABLED]:!1,[Ae.SELECTION_INDETERMINATE]:!1,[Ae.SELECTION_VAL]:!1,[Ae.COL_RESIZEABLE]:G.resizable!==!1,[Ae.COL_FIXED_STYLE]:a.reactive({})})}Object.assign(n.get(G),{[Ae.COL_SPAN]:{skipCol:W,skipColumnNum:te,skipColLen:be},[Ae.COL_MIN_WIDTH]:x(G)})})},P=(q,G)=>{se(q,Ae.COL_FIXED_STYLE,G)},I=q=>ne(q,Ae.COL_FIXED_STYLE)??{},A=q=>ne(q,Ae.COL_RECT),k=q=>ne(q,Ae.CALC_WIDTH),L=q=>ne(q,Ae.WIDTH),F=(q,{left:G,right:ee,width:W,height:te})=>{const be=A(q),$e={left:G??be.left,right:ee??be.right,width:W??be.width,height:te??be.height};se(q,Ae.COL_RECT,$e)},Z=pn.debounce((q,G)=>{r.length=0,r.push(...$(q)),R(),b(),G==null||G()}),ae=(q,G=!1)=>{se(q,Ae.IS_HIDDEN,G)},K=(q,G)=>{se(q,Ae.RESIZE_WIDTH,G)},fe=(q,G)=>{const{type:ee,fn:W,scope:te,active:be}=G,$e={[Ae.COL_SORT_TYPE]:ee,[Ae.COL_SORT_FN]:W,[Ae.COL_SORT_ACTIVE]:be,[Ae.COL_SORT_SCOPE]:te};[Ae.COL_SORT_TYPE,Ae.COL_SORT_FN,Ae.COL_SORT_ACTIVE,Ae.COL_SORT_SCOPE].forEach(Ve=>{$e[Ve]!==void 0&&se(q,Ve,$e[Ve])})},ie=(q,G)=>{n.has(q)&&Object.assign(n.get(q)[Ae.COL_FILTER_OBJ],G)},X=[Ae.WIDTH],U=(q,G=X)=>ne(q,G[0])??ne(q,G[1])??ne(q,G[2]),B=q=>ne(q,Ae.IS_HIDDEN)??!1,Y=q=>ne(q,Ae.COL_UID),Q=(q,G,ee)=>{[Ae.COL_SORT_FN,Ae.COL_SORT_SCOPE,Ae.COL_SORT_TYPE].includes(G)&&h(q,{[G]:ee}),[Ae.COL_FILTER_FN,Ae.COL_FILTER_VALUES].includes(G)&&p(q,{[G]:ee})},ue=(q,G)=>{const ee=y.findIndex(be=>be===q),W=U(q)-G,te=y[ee+1];te&&se(te,Ae.WIDTH,U(te)+W)},se=(q,G,ee)=>{Q(q,G,ee);const W=n.get(q);if(W&&Object.prototype.hasOwnProperty.call(W,G)){if(a.isRef(W[G])){W[G].value=ee;return}W[G]=ee}},we=(q,G)=>{const ee=G||q.checked||[],W=q.fields||[];r.forEach(te=>{se(te,Ae.IS_HIDDEN,Ep(W,te,ee))})},ne=(q,G)=>{var W;const ee=(W=n.get(q))==null?void 0:W[G];return a.isRef(ee)?ee.value:ee},ye=(q,G)=>{var ee;return(ee=n.get(q))==null?void 0:ee[G]},le=(q,G)=>({[`${s}-column-${G}`]:!1,column_fixed:!!q.fixed,column_fixed_left:!!q.fixed,column_fixed_right:q.fixed==="right"});return{needColSpan:C,needRowSpan:E,tableColumnSchema:n,tableColumnList:r,visibleColumns:y,debounceUpdateColumns:Z,sortColumns:o,filterColumns:c,columnGroup:d,columnGroupMap:u,clearColumnSort:()=>{r.forEach(q=>{se(q,Ae.COL_SORT_ACTIVE,!1),se(q,Ae.COL_FILTER_FN,void 0)})},clearSelectionAll:()=>{const q=y.find(G=>G.type==="selection");q&&(se(q,Ae.SELECTION_VAL,!1),se(q,Ae.SELECTION_INDETERMINATE,!1))},formatColumns:R,flatColumnTemplate:$,isHiddenColumn:B,getColumnId:Y,getColumnOrderWidth:U,getColumnAttribute:ne,getHeadColumnClass:(q,G)=>({...le(q,G)}),getColumnClass:le,getFixedStlye:I,getColumnRect:A,getColumnCustomClass:(q,G)=>{const ee=q.className;if(ee){if(typeof ee=="function")return ee(G);if(typeof ee=="string")return ee}return""},getColumnRefAttribute:ye,getColumnCalcWidth:k,getColumnWidth:L,getLeftColumnsWidth:(q,G=!1)=>{let ee=!0,W=0,te=0;for(;ee&&te<y.length;){if(q===y[te]){G&&(W=W+L(y[te])),ee=!1;break}W=W+L(y[te]),te=te+1}return W},getGroupAttribute:D,getPreColumn:q=>{const ee=y.findIndex(W=>W===q)-1;return y[ee]},getColumnIndex:q=>y.findIndex(G=>G===q),resolveEventListener:O,setColumnIsHidden:ae,setColumnResizeWidth:K,setColumnSortOption:fe,setColumnFilterOption:ie,setColumnAttributeBySettings:we,setColumnAttribute:se,setColumnSortActive:(q,G)=>{e.colSortBehavior===vp.independent&&r.forEach(ee=>{se(ee,Ae.COL_SORT_ACTIVE,!1)}),se(q,Ae.COL_SORT_ACTIVE,G)},setFixedStyle:P,setColumnRect:F,setVisibleColumns:b,setNextColumnWidth:ue,resolveColsCalcWidth:m}},eB=(e,t,n)=>{if(!e.rowDraggable)return{};const r=document.createElement("div");r.style.setProperty("height","20px"),r.style.setProperty("width","100%"),r.style.setProperty("background","#E2EDFF"),r.style.setProperty("cursor","move"),["dragenter","dragover"].forEach(w=>{r.addEventListener(w,C=>{C.preventDefault(),C.stopPropagation(),C.dataTransfer.dropEffect="move"})});let s=null,o="";const c=(w,C)=>{if(C==="--top"){w.parentNode.insertBefore(r,w);return}if(w.nextElementSibling===null){w.parentNode.append(r);return}w.parentNode.insertBefore(r,w.nextElementSibling)},d=w=>{e.rowDraggable&&(w==null||w())},u=w=>w.target.closest("tr"),h=(w,C)=>{const{y:E}=C,{top:_,bottom:x}=w.getBoundingClientRect(),O=E-_>x-E?"--bottom":"--top";f(w),w.classList.add(O),c(w,O)},f=(w,C=["--bottom","--top"])=>{C.forEach(E=>w.classList.remove(E))};return{onDragenter:w=>{const C=u(w);w.preventDefault(),w.stopPropagation(),d(()=>{w.dataTransfer.dropEffect="move",C.classList.add("--drag-enter"),h(C,w),s=C})},onDragleave:w=>{d(()=>{const C=u(w);o=C.classList.contains("--bottom")?"--bottom":"--top",f(C,["--drag-enter","--bottom","--top"])})},onDragstart:w=>{d(()=>{const C=u(w);r.style.setProperty("height",`${C.offsetHeight}px`),r.style.setProperty("width",`${C.offsetWidth}px`),C.classList.add("--drag-start"),w.dataTransfer.setDragImage(C,0,0),w.dataTransfer.setData("text/plain",null),w.dataTransfer.dropEffect="move";const{rowIndex:E}=w.target.dataset;w.dataTransfer.setData("data-row-index",E)})},onDragover:w=>{w.preventDefault(),w.stopPropagation(),w.dataTransfer.dropEffect="move";const C=u(w);h(C,w)},onDragend:w=>{var O;if(w.preventDefault(),w.stopPropagation(),r.remove(),!s)return;const C=s,{rowIndex:E}=C.dataset;let _=Number(E);const x=(O=w.target.dataset)==null?void 0:O.rowIndex;o==="--bottom"&&(_=_+1),t.changePageRowIndex(Number(x),_),s=null,o="",n.emit(St.DRAG_END,{sourceEvent:w,data:t.tableRowList})}}},tB=(e,t)=>{const n=a.computed(()=>t.visibleColumns.filter(f=>!!f.fixed&&f.fixed!=="right")),r=a.computed(()=>t.visibleColumns.filter(f=>!!f.fixed&&f.fixed==="right")),s=a.reactive({left:0,width:"0"}),o=a.reactive({right:0,width:"0"}),c=()=>{let f=0;const{length:m}=r.value;for(let y=m-1;y>=0;y--){const b=r.value[y],N=t.getColumnWidth(b);t.setColumnRect(b,{right:f,width:N}),t.setFixedStyle(b,{right:`${f}px`}),f=f+N}let p=0;n.value.forEach(y=>{const b=t.getColumnWidth(y);t.setColumnRect(y,{left:p,width:b}),t.setFixedStyle(y,{left:`${p}px`}),p=p+b}),s.width=`${p}px`,o.width=`${f}px`},d=()=>n.value.length>0?a.createVNode("div",{style:s,class:"column_fixed column_fixed_left"},null):null,u=()=>{if(r.value.length>0)return a.createVNode("div",{style:o,class:"column_fixed column_fixed_right"},null)};return{renderFixedRows:()=>[d(),u()],resolveFixedColumnStyle:c}},nB=a.defineComponent({name:"GhostBody",setup(e,t){const n={zIndex:-1,width:0,height:0,display:"none"};return()=>{var r,s;return a.createVNode("div",{style:n},[(s=(r=t.slots).default)==null?void 0:s.call(r)])}}}),rB=(e,t)=>{const n=a.toRef(e,"scrollLoading"),r=()=>{var c;return typeof n.value=="boolean"?{loading:!!n.value||(((c=e.fixedBottom)==null?void 0:c.loading)??!1),inline:!0,title:"",size:Ga.Normal,mode:If.Default,indicator:null}:n.value},s=a.computed(()=>{var c;return n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object")||(((c=e.fixedBottom)==null?void 0:c.loading)??!1)});return{renderScrollLoading:()=>{var c,d,u,h;if(s.value){const{loading:f,size:m,mode:p,title:y,inline:b,indicator:N}=r();return((d=(c=t.slots).fixedBottom)==null?void 0:d.call(c))??a.createVNode(da,{loading:f,size:m,mode:p,title:y,inline:b,indicator:N},null)}return((h=(u=t.slots).fixedBottom)==null?void 0:h.call(u))??null}}},aB=(e,t)=>{const n=a.ref(null),r=a.ref(null),s=a.ref(null),o=a.ref(null),c=a.ref(0),d=a.ref(0),u=a.ref(0),h=a.ref(-1e4),f=a.ref(0),m=a.reactive({}),p=a.reactive([]),y=a.ref(e.rowHeight??ns),b=a.ref(1),N=a.computed(()=>{var ee,W,te;return(ee=t.slots)!=null&&ee.fixedBottom&&((W=e.fixedBottom)==null?void 0:W.position)==="relative"?((te=e.fixedBottom)==null?void 0:te.height)??ns:0}),{resolveClassName:w}=xe(),{renderScrollLoading:C}=rB(e,t),E=a.computed(()=>Ue({[w("table")]:!0},zH(e.border))),_=a.computed(()=>({height:as(e.height),maxHeight:as(e.maxHeight),minHeight:as(e.minHeight)})),x=a.computed(()=>Ue({[w("table-head")]:!0,"has-settings":!!e.settings,"has-group":b.value>1})),O=()=>{var te,be,$e,Ve;const ee=f.value>0?"0 0 10px rgb(0 0 0 / 12%)":null,W=c.value>0?"0 0 10px rgb(0 0 0 / 12%)":null;(be=(te=n.value)==null?void 0:te.style)==null||be.setProperty("--shadow-right",ee),(Ve=($e=n.value)==null?void 0:$e.style)==null||Ve.setProperty("--shadow-left",W)},T=k3(()=>{var ee,W,te,be,$e,Ve,Re,We,nt,st;(W=(ee=n.value)==null?void 0:ee.style)==null||W.setProperty("--drag-offset-x",`${h.value+c.value}px`),(be=(te=n.value)==null?void 0:te.style)==null||be.setProperty("--drag-offset-h-x",`${h.value-2}px`),(Ve=($e=n.value)==null?void 0:$e.style)==null||Ve.setProperty("--translate-y",`${d.value}px`),(We=(Re=n.value)==null?void 0:Re.style)==null||We.setProperty("--translate-x",`${c.value}px`),(st=(nt=n.value)==null?void 0:nt.style)==null||st.setProperty("--translate-x-1",`-${c.value}px`),O()}),$=ee=>{c.value=ee,T()},D=ee=>{b.value=ee},R=ee=>{d.value=ee,T()},P=()=>{var ee,W,te,be,$e,Ve,Re,We,nt,st;(W=(ee=n.value)==null?void 0:ee.style)==null||W.setProperty("--drag-offset-x","-1000px"),(be=(te=n.value)==null?void 0:te.style)==null||be.setProperty("--drag-offset-h-x","-1000px"),(Ve=($e=n.value)==null?void 0:$e.style)==null||Ve.setProperty("--translate-y","0px"),(We=(Re=n.value)==null?void 0:Re.style)==null||We.setProperty("--translate-x","0px"),(st=(nt=n.value)==null?void 0:nt.style)==null||st.setProperty("--translate-x-1","0px")},I=ee=>{h.value=ee,T()},A=l2(e),k=a.computed(()=>Gt(A,"height",["thead"])*b.value),L=a.computed(()=>{var ee;return{"--row-height":`${k.value}px`,"--background-color":hp[((ee=e.thead)==null?void 0:ee.color)??gd.DEF1],paddingRight:e.scrollbar?null:`${fp}px`}}),F={[w("table-body")]:!0,"is-bk-scrollbar":e.scrollbar},Z=a.computed(()=>Ue({[w("table-footer")]:!0,"is-hidden":Q.value===0})),ae=ee=>a.createVNode("div",{ref:n,style:_.value,class:E.value},[ee,a.createVNode(nB,null,{default:()=>{var W,te;return[(te=(W=t.slots).default)==null?void 0:te.call(W)]}})]),K=(ee,W,te)=>a.createVNode("div",{ref:r,style:L.value,class:x.value},[ee==null?void 0:ee(),a.createVNode("div",{class:"col-resize-drag"},null),a.createVNode("div",{class:ce},[te==null?void 0:te()]),W==null?void 0:W()]),fe=a.computed(()=>({position:"sticky",top:0,zIndex:2,...e.prependStyle||{}})),ie=()=>t.slots.prepend?a.createVNode("div",{style:fe.value,class:"prepend-row"},[t.slots.prepend()]):null,X=a.ref("auto"),U=a.computed(()=>{if(/^\d+\.?\d*(px|%)$/.test(`${_.value.maxHeight}`)){const ee=e.showHead?k.value:0,W=Q.value+ee+N.value;return`calc(${_.value.maxHeight} - ${W}px)`}return null}),B=ee=>{X.value=ee-k.value-N.value-Q.value},Y=ee=>{X.value=ee},Q=a.ref(0),ue=a.computed(()=>({"--footer-height":`${Q.value}px`})),se=ee=>{Q.value=ee},we=pn.debounce((...ee)=>{t.emit(St.SCROLL_BOTTOM,{...ee})}),ne=()=>{var te,be,$e,Ve;const ee=((be=(te=s.value)==null?void 0:te.refRoot)==null?void 0:be.scrollWidth)??0,W=((Ve=($e=s.value)==null?void 0:$e.refRoot)==null?void 0:Ve.offsetWidth)??0;f.value=ee-W-(c==null?void 0:c.value)},ye=ee=>{y.value=ee},le=ee=>{u.value=m.bottom??0;const W=ee[1],{translateX:te,translateY:be,pos:$e={}}=W;$(te),R(be),ne(),Object.assign(m,$e||{});const{bottom:Ve}=$e;Ve<=2&&u.value>Ve&&we({...$e,translateX:te,translateY:be})},ge={column_drag_line:!0,"offset-x":!0,"resize-column":!0},j=a.computed(()=>({[w("table-body-content")]:!0,[w("stripe")]:e.stripe})),ce=a.computed(()=>({[w("table-fixed")]:!0,"has-virtual-scroll":e.virtualEnabled})),Ce=w("table-fixed-bottom"),oe=a.computed(()=>{var ee,W;return{minHeight:`${y.value}px`,position:((ee=e.fixedBottom)==null?void 0:ee.position)??"absolute",height:((W=e.fixedBottom)==null?void 0:W.height)??null}});a.onMounted(()=>{ne(),P()});const z=()=>{const ee=C==null?void 0:C();return ee?a.createVNode("div",{style:oe.value,class:Ce},[ee]):null};return{renderContainer:ae,renderHeader:K,renderBody:(ee,W,te)=>a.createVNode(ni,{ref:s,height:X.value,class:F,contentClassName:j.value,enabled:e.virtualEnabled,lineHeight:y.value,list:ee,maxHeight:U.value,rowKey:e.rowKey,scrollEvent:!0,scrollbar:{enabled:e.scrollbar},throttleDelay:120,onContentScroll:le},{beforeContent:()=>ie(),default:be=>W==null?void 0:W((be==null?void 0:be.data)??[]),afterSection:()=>[a.createVNode("div",{class:ge},null),a.createVNode("div",{class:ce.value},[te==null?void 0:te()])]}),renderFooter:ee=>a.createVNode("div",{ref:o,style:ue.value,class:Z.value},[ee]),renderFixedBottom:()=>z(),setBodyHeight:B,setVirtualBodyHeight:Y,setFootHeight:se,setTranslateX:$,setDragOffsetX:I,setFixedColumns:ee=>{p.length=0,p.push(...ee)},setOffsetRight:ne,setLineHeight:ye,setHeaderRowCount:D,initRootStyleVars:P,refRoot:n,refHead:r,refBody:s,refFooter:o}},sB=(e,t,n=[],r=!0)=>{let s=null;const o=()=>{s&&(s.disconnect(),s=null)};return a.watch(e,()=>{Rr(e.value)&&(o(),s=Tp(e.value,()=>{t==null||t.apply(...n)},60,!0,"debounce"),r&&s.start())},{flush:"post",immediate:!0}),{instance:s}},iB=e=>{const t=a.reactive({enabled:!1,count:0,limit:10,current:1,align:"right",layout:["total","limit","list"]}),n=a.ref(!0),r=a.computed(()=>Math.ceil(t.count/t.limit)),s=d=>{Object.assign(t,{enabled:!!e.pagination},d),t.current>r.value&&(t.current=1)},o=(d=!0)=>{n.value=!d};a.watch(()=>[e.pagination],()=>{typeof e.pagination=="object"&&s(a.toRaw(e.pagination)),t.enabled=n.value&&!!e.pagination},{immediate:!0,deep:!0}),a.watch(()=>[e.data],()=>{e.remotePagination||s({count:e.data.length})},{immediate:!0});const c=a.computed(()=>t.enabled&&t.count>0);return{options:t,isShowPagination:c,setPagination:s,disabledPagination:o}},oB=a.defineComponent({name:"BodyEmpty",props:{list:v.array.def([]),filterList:v.array.def([]),emptyText:v.string},emits:["change"],setup(e){const t=dt("table"),n=a.computed(()=>e.emptyText===void 0?t.value.emptyText:e.emptyText),r=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode(Kc,{description:n.value,scene:"part",type:r.value},null)}}),c2=a.defineComponent({name:"TableCell",props:{column:pd,row:v.any.def({}),parentSetting:s2,title:v.string.def(void 0),observerResize:v.bool.def(!0),intersectionObserver:v.bool.def(!1),isHead:v.bool.def(!1),isExpandChild:v.bool.def(!1),headExplain:v.string,resizerWay:Pe("ResizerWay",{default:gp.DEBOUNCE})},setup(e,{slots:t}){const n=a.ref(),r=a.ref(!1),s=a.ref(!e.intersectionObserver),o=a.computed(()=>({textAlign:e.column.textAlign,minWidth:as(e.column.minWidth,null)})),c=()=>{if(/boolean|object/.test(typeof e.column.showOverflowTooltip)&&e.column.showOverflowTooltip!==null){const{content:C="",mode:E=void 0,popoverOption:_={}}=e.column.showOverflowTooltip,x={showOverflowTooltip:{content:C,disabled:!e.column.showOverflowTooltip,mode:E,resizerWay:void 0,watchCellResize:void 0,popoverOption:_,allowHtml:!1}};return e.parentSetting!==null&&typeof e.parentSetting=="object"&&(Object.assign(x.showOverflowTooltip,e.parentSetting,{disabled:!e.column.showOverflowTooltip}),typeof e.column.showOverflowTooltip=="object"&&Object.assign(x.showOverflowTooltip,e.column.showOverflowTooltip)),x}return{showOverflowTooltip:e.parentSetting}};let d=null;const u=(C=!1)=>{var _;const E=f();return C?((_=E==null?void 0:E.cloneNode)==null?void 0:_.call(E,!0))??"":(E==null?void 0:E.innerText)??""},h=()=>{var R,P;const{showOverflowTooltip:C=!1}=c();let E=!0,{resizerWay:_}=e;const x=u(C.allowHtml);let O=()=>x,T={},$="auto",D=!0;return typeof C=="boolean"&&(E=!C),typeof C=="object"&&(E=C.disabled,T=C.popoverOption,_=C.resizerWay||"debounce",O=()=>C.content||x,typeof C.content=="function"&&(O=()=>C.content(e.column,e.row)),D=C.watchCellResize,$=C.mode||"auto"),typeof E=="function"&&(E=Reflect.apply(E,this,[e.column,e.row])),e.column.explain&&(E=!1,$="static",typeof e.column.explain=="object"&&(O=()=>Gt(e.column.explain,"content",[e.column,e.row]))),e.isHead&&(E=!(((P=(R=e.column)==null?void 0:R.showOverflowTooltip)==null?void 0:P.showHead)??!0),$="auto",O=()=>{var I,A;return((A=(I=f())==null?void 0:I.cloneNode)==null?void 0:A.call(I,!0))??""},e.headExplain&&($="static",O=()=>e.headExplain)),e.column.type==="expand"&&!e.isHead&&!e.isExpandChild&&(E=!0),{disabled:E,content:O,mode:$,resizerWay:_,watchCellResize:D,popoverOption:T}},f=()=>{var C,E;return e.isHead?(E=(C=n.value)==null?void 0:C.querySelector)==null?void 0:E.call(C,".head-text"):n.value},m=()=>{const C=f();if(!C||!Rr(C))return;const{mode:E,disabled:_}=h();if(r.value=!_,E==="auto"&&(r.value=Rh(C)),E==="static"&&(r.value=!0),r.value){const x=a.ref(h());d===null&&(d=Gf(C,{disabled:x.value.disabled,content:x.value.content,mode:x.value.mode,popoverOption:x.value.popoverOption}))}else d==null||d.destroyInstance(C),d=null};let p=null;const y=()=>{const{disabled:C,resizerWay:E,watchCellResize:_}=h();C||(m(),_!==!1&&e.observerResize&&(p=Tp(n.value,()=>{m()},60,!0,E),p.start()))};let b=null;const N=()=>{e.intersectionObserver&&(b=new IntersectionObserver(C=>{if(C[0].intersectionRatio<=0){s.value=!1,d==null||d.destroyInstance(n.value);return}s.value=!0,y()},{threshold:.5}),b==null||b.observe(n.value))};a.onMounted(()=>{N(),s.value&&y()}),a.onBeforeUnmount(()=>{p==null||p.disconnect(),p=null,d==null||d.destroyInstance(n.value),b==null||b.disconnect(),b=null});const w=e.headExplain||e.column.explain;return()=>{var C;return a.createVNode("div",{ref:n,style:o.value,class:["cell",e.column.type,w?"explain":""]},[s.value?(C=t.default)==null?void 0:C.call(t):"--"])}}}),Td=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)])}}),lB=({props:e,rows:t,ctx:n,columns:r,row:s,index:o,column:c,isChild:d=!1,multiShiftKey:u})=>{const{isShiftKeyDown:h,getStore:f,setStore:m,setStoreStart:p,clearStoreStart:y}=u,b=()=>{const T=(I,A)=>{A.stopImmediatePropagation(),A.preventDefault(),A.stopPropagation(),h.value||(I?p(s,o):y()),t.setRowSelection(s,I),r.setColumnAttribute(c,Ae.SELECTION_INDETERMINATE,t.getRowIndeterminate()),r.setColumnAttribute(c,Ae.SELECTION_VAL,t.getRowCheckedAllValue()),n.emit(St.ROW_SELECT,{row:s,index:o,checked:I,data:e.data}),n.emit(St.ROW_SELECT_CHANGE,{row:s,index:o,checked:I,data:e.data})},$=()=>{if(h.value){const I=m(s,o);if(I){const{start:A,end:k}=f(),L=A.index<k.index?A.index:k.index,F=A.index<k.index?k.index:A.index;(t.pageRowList.slice(L,F+1)??[]).forEach(Z=>{_d(e,{row:s,index:o,isCheckAll:!1})&&t.setRowSelection(Z,!0)})}return n.emit(St.ROW_SELECT,{row:s,index:o,checked:!0,data:e.data,isShiftKeyDown:!0}),n.emit(St.ROW_SELECT_CHANGE,{row:s,index:o,checked:!0,data:e.data,isShiftKeyDown:!0}),Promise.resolve(!I)}return Promise.resolve(!0)},D=t.getRowAttribute(s,et.ROW_SELECTION_INDETERMINATE),R=t.getRowAttribute(s,et.ROW_SELECTION),P=_d(e,{row:s,index:o,isCheckAll:!1});return a.createVNode(hn,{beforeChange:$,disabled:!P,indeterminate:D,modelValue:R,onChange:T},null)},N=T=>Array.isArray(e.isEmptyCell)?e.isEmptyCell.some($=>$===T):typeof e.isEmptyCell=="function"?e.isEmptyCell({cellText:T,row:s,column:c}):pn.isEmpty(T),w=()=>{var D;const T=()=>{if(Gt(c,"type",[c,s])==="index")return t.getRowAttribute(a.toRaw(s),et.ROW_INDEX);const P=Gt(c,"field",[c,s]),I=Nd(s,P);if(typeof c.render=="function")return C();if(typeof I=="boolean"||typeof I=="number")return`${I}`;if(typeof I=="object"&&I!==null)return JSON.stringify(a.unref(I));if(N(I)){const{emptyCellText:A}=e;if(A)return typeof A=="function"?A({row:s,column:c,index:o}):A}return I},$={expand:()=>d?"":x(),selection:()=>b(),drag:O};return((D=$[c.type])==null?void 0:D.call($,s,c,o,t))??T()},C=()=>{const T=Nd(s,Gt(c,"field",[c,s])),$=s;return c.render({cell:T,data:$,row:s,column:c,index:o,rows:t.tableRowList.value})},E=()=>{var D,R;const $=t.getRowAttribute(s,et.ROW_EXPAND)?a.createVNode(to,null,null):a.createVNode(oo,null,null);return a.createVNode("span",null,[[$,((R=(D=n.slots).expandContent)==null?void 0:R.call(D,s))??""]])},_=T=>{t.setRowExpand(s,!t.getRowAttribute(s,et.ROW_EXPAND)),n.emit(St.ROW_EXPAND_CLICK,{row:s,column:c,index:o,rows:t.tableRowList.value,e:T})},x=()=>{const T=()=>{var $,D;return typeof c.render=="function"?C():((D=($=n.slots).expandCell)==null?void 0:D.call($,{row:s,column:c,index:o,rows:t}))??E()};return a.createVNode("span",{class:"expand-btn-action",onClick:$=>_($)},[T()])},O=()=>{var R,P,I;const T=((R=e.rowDraggable)==null?void 0:R.render)??e.rowDraggable;if(typeof T=="function")return T(s,c,o,t.tableRowList.value);const $=((P=e.rowDraggable)==null?void 0:P.fontSize)??"14px";return((I=e.rowDraggable)==null?void 0:I.icon)??a.createVNode(ec,{style:`'--font-size: ${$};'`,class:"drag-cell"},null)};return{renderCell:w}};function Lp(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const d2=32,cB=a.defineComponent({name:"HeadFilter",props:{column:pd,height:v.number.def(d2)},emits:["change","filterSave","reset"],setup(e,{emit:t}){const{resolveClassName:n}=xe(),r=dt("table"),s=a.computed(()=>{var k;return(k=e.column)==null?void 0:k.filter}),o=a.computed(()=>{var k;return((k=s.value)==null?void 0:k.checked)??[]}),c=a.ref(""),d=a.reactive({isOpen:!1,checked:o.value});a.watch(()=>o,()=>{d.checked.length=0,d.checked=[],d.checked.push(...o.value)},{deep:!0});const u=a.computed(()=>Ue({[n("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:d.checked.length,opened:d.isOpen})),h=Ue({[n("table-head-filter")]:!0}),f=a.ref(null),m=k=>{d.isOpen=k,k&&setTimeout(()=>{f.value.reset()}),k||(c.value="")},p=`light ${n("table-head-filter")}`,y=a.computed(()=>{const{list:k=[]}=s.value;return k.filter(F=>{const Z=E(c.value);return Z.test(F.label)||Z.test(F.value)})}),b=5,N=a.computed(()=>{var k;return((k=s.value)==null?void 0:k.maxHeight)??d2*b}),w=a.computed(()=>{var k;return((k=s.value)==null?void 0:k.height)||"100%"}),C=a.computed(()=>{const k=d2*2;return y.value.length>b?N.value:k}),E=(k,L="ig")=>new RegExp(`${k}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),L),_=()=>{x(!0),t("filterSave",d.checked),d.isOpen=!1},x=(k=!1)=>{const{disabled:L}=T($,r.value.confirm);if(L||k){if(s.value==="custom"){t("change",d.checked,null),d.isOpen=!1;return}t("change",d.checked)}},O=()=>{d.checked.length&&(d.checked.length=0,d.isOpen=!1,t("change",d.checked),t("reset",d.checked))},T=(k,L)=>({disabled:k==="disabled"||k===!1,text:typeof k=="string"?k:L}),{btnSave:$,btnReset:D}=s.value,R=()=>{const{disabled:k,text:L}=T($,r.value.confirm);return k?a.createVNode("span",{class:"btn-filter-save disabled"},[L]):a.createVNode(Rt,{style:"width: 56px; margin-right: 8px;",size:"small",theme:"primary",onClick:_},Lp(L)?L:{default:()=>[L]})},P=()=>{const{disabled:k,text:L}=T(D,r.value.reset);return k?"":a.createVNode(Rt,{style:"width: 56px;",disabled:d.checked.length===0,size:"small",onClick:O},Lp(L)?L:{default:()=>[L]})},I=(k,L)=>{const F=new Set(d.checked);k?F.add(L.value):F.delete(L.value),d.checked.length=0,d.checked.push(...Array.from(F)),x()},A=k=>k.data.length?k.data.map(L=>a.createVNode("div",{key:L.value,class:"list-item"},[a.createVNode(hn,{checked:d.checked.includes(L.value),immediateEmitChange:!1,label:L.value,modelValue:d.checked.includes(L.value),onChange:F=>I(F,L)},{default:()=>[`${L.text}`]})])):a.createVNode("div",{class:"list-item is-empty"},[r.value.emptyText]);return()=>a.createVNode(Tn,a.mergeProps({arrow:!1,isShow:d.isOpen,offset:0,placement:"bottom-start",renderType:bl.SHOWN,trigger:"click"},{theme:p},{onAfterHidden:()=>m(!1),onAfterShow:()=>m(!0)}),{default:()=>a.createVNode(Ql,{class:u.value},null),content:()=>a.createVNode("div",{class:h},[a.createVNode("div",{style:"padding: 4px 10px;"},[a.createVNode(va,{modelValue:c.value,"onUpdate:modelValue":k=>c.value=k},null)]),a.createVNode(Tc,{class:"content-list"},{default:()=>[a.createVNode(ni,{ref:f,height:w.value,className:"content-items",lineHeight:32,list:y.value,maxHeight:N.value,minHeight:C.value,scrollEvent:!0,throttleDelay:0},{default:A})]}),a.createVNode("div",{class:"content-footer"},[R(),P()])])})}}),dB=a.defineComponent({name:"HeadSort",props:{column:pd,defaultSort:v.oneOf(ZF).def(Bt.NULL),active:v.bool,sortValFormat:v.arrayOf(v.any).def([""])},emits:["change"],setup(e,{emit:t,expose:n}){var u,h;const{resolveClassName:r}=xe(),s=((h=(u=e.column)==null?void 0:u.sort)==null?void 0:h.value)??e.defaultSort??Bt.NULL,o=a.ref(s);a.watch(()=>[e.defaultSort],([f])=>{o.value=f},{immediate:!0});const c=f=>{o.value=f},d=(f,m)=>{f.stopImmediatePropagation(),f.stopPropagation(),f.preventDefault(),t("change",{type:m,isCancel:m===o.value})};return n({setNextSortType:c}),()=>a.createVNode("span",{class:r("head-cell-sort")},[a.createVNode(Rl,{style:"align-items: flex-end;",class:["sort-action","sort-asc",e.active&&o.value===Bt.ASC?"active":""],onClick:f=>d(f,Bt.ASC)},null),a.createVNode(Zi,{style:"align-items: flex-start;",class:["sort-action","sort-desc",e.active&&o.value===Bt.DESC?"active":""],onClick:f=>d(f,Bt.DESC)},null)])}});function uB(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const fB=({props:e,columns:t,rows:n,ctx:r,column:s,index:o})=>{var R;const c=a.ref(t.getColumnAttribute(s,Ae.COL_SORT_TYPE)),d=a.ref(t.getColumnAttribute(s,Ae.COL_SORT_ACTIVE)),u=a.toRaw(s),h=P=>{const{isCancel:I,type:A=t.getColumnRefAttribute(s,Ae.COL_SORT_TYPE)}=P??{},k=I?Bt.NULL:A,L=Op(s,k,e.sortValFormat);t.setColumnAttribute(s,Ae.COL_SORT_TYPE,k),t.setColumnAttribute(s,Ae.COL_SORT_FN,L),t.setColumnSortActive(s,k!==Bt.NULL),c.value=k,d.value=k!==Bt.NULL,r.emit(St.COLUMN_SORT,{column:s,index:o,type:k})},f=()=>a.createVNode(dB,{active:d.value,column:s,defaultSort:c.value,sortValFormat:e.sortValFormat,onChange:h},null),m=()=>{const P=k=>{r.emit(St.COLUMN_FILTER,{checked:k,column:a.unref(s),index:o})},I=k=>{t.setColumnAttribute(s,Ae.COL_FILTER_VALUES,k),r.emit(St.COLUMN_FILTER_SAVE,{values:k})},A=()=>{t.setColumnAttribute(s,Ae.COL_FILTER_VALUES,[]),r.emit(St.COLUMN_FILTER,{checked:[],column:a.unref(s),index:o})};return a.createVNode(cB,{height:e.headHeight,column:s,onChange:P,onFilterSave:I,onReset:A},null)},p=l2(e),{cellFn:y}=p,b=()=>typeof y=="function"?y({index:o,column:s}):typeof s.renderHead=="function"?s.renderHead({index:o,column:s}):Gt(s,"label",[o]),N=()=>{const P=[];s.sort&&P.push(f()),s.filter&&P.push(m());const I=b();P.unshift(a.createVNode("span",{class:"head-text"},[I]));const A=typeof I=="string"?I:void 0,k={"has-sort":!!s.sort,"has-filter":!!s.filter};return{cells:P,showTitle:A,headClass:k}},w=()=>{const P=L=>{t.setColumnAttribute(s,Ae.SELECTION_VAL,L),t.setColumnAttribute(s,Ae.SELECTION_INDETERMINATE,!1),n.setRowSelectionAll(L),r.emit(St.ROW_SELECT_ALL,{checked:L,data:e.data})},I=t.getColumnAttribute(s,Ae.SELECTION_DISABLED),A=t.getColumnAttribute(s,Ae.SELECTION_VAL),k=t.getColumnAttribute(s,Ae.SELECTION_INDETERMINATE);return a.createVNode(hn,{disabled:I,indeterminate:k,modelValue:A,onChange:P},null)},C=()=>{if(s.type==="selection")return[w()];const{headClass:P,showTitle:I,cells:A}=N();return a.createVNode(c2,{class:P,column:s,headExplain:Gt(s.explain,"head",[s]),isHead:!0,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,resizerWay:e.resizerWay,title:I},uB(A)?A:{default:()=>[A]})},E=()=>{if(!t.getColumnAttribute(s,Ae.COL_IS_DRAG)&&s.sort&&!s.filter){const I={isCancel:!1,type:YH(t.getColumnRefAttribute(s,Ae.COL_SORT_TYPE))};h(I)}},_=Object.assign(t.getFixedStlye(s),{"--background-color":hp[((R=e.thead)==null?void 0:R.color)??gd.DEF1]}),x=t.getGroupAttribute(u),O=a.computed(()=>[t.getHeadColumnClass(s,o),t.getColumnCustomClass(s),s.align||e.headerAlign||e.align,{"is-last-child":(x==null?void 0:x.offsetLeft)+1===t.visibleColumns.length}]),T=a.computed(()=>O.value.concat([{"is-head-group":x==null?void 0:x.isGroup,"is-head-group-child":!!(x!=null&&x.parent)}])),$=()=>Gt(s,"label",[o,s]);return{getTH:()=>x!=null&&x.isGroup?a.createVNode("th",{style:_,class:T.value,colspan:x==null?void 0:x.thColspan,rowspan:x==null?void 0:x.thRowspan},[$()]):a.createVNode("th",a.mergeProps({style:_,class:O.value,colspan:x==null?void 0:x.thColspan,"data-id":t.getColumnId(s),rowspan:x==null?void 0:x.thRowspan,onClick:()=>E()},t.resolveEventListener(s,o)),[C()])}},hB=e=>{const t=a.ref(!1),n={start:null,end:null},r=m=>{m.key==="Shift"&&(t.value=!0)},s=m=>{m.key==="Shift"&&(t.value=!1,u())},o=(m,p)=>{n.start={index:p??null,row:m??null}},c=()=>{o()},d=(m,p)=>n.start===null&&n.end===null?(n.start={index:p,row:m},!1):(n.end={index:p,row:m},!0),u=()=>{n.start=null,n.end=null};return e.shiftMultiChecked&&(window.addEventListener("keydown",r),window.addEventListener("keyup",s)),{isShiftKeyDown:t,setStore:d,getStore:()=>n,clearStore:u,setStoreStart:o,clearStoreStart:c,removeMultiCheckedEvents:()=>{e.shiftMultiChecked&&(window.removeEventListener("keydown",r),window.removeEventListener("keyup",s))}}};function mB(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const gB=({props:e,ctx:t,columns:n,rows:r,pagination:s,settings:o})=>{const c=dt("table"),d=er();let u={};const h=hB(e),f=()=>a.createVNode("colgroup",null,[(n.visibleColumns||[]).map((A,k)=>{const L=`${BH(n.getColumnOrderWidth(A))}`.replace(/px$/i,""),F=n.getColumnAttribute(A,Ae.COL_MIN_WIDTH);return a.createVNode("col",{style:{width:as(L,"auto"),minWidth:as(F,"auto")}},null)})]),m=()=>{const A=l2(e),k={"--row-height":`${Gt(A,"height",["thead"])}px`,backgroundColor:e.thead.color};return a.createVNode(a.Fragment,null,[a.createVNode("thead",{style:k},[n.columnGroup.map((L,F)=>a.createVNode("tr",null,[L.map((Z,ae)=>{if(n.isHiddenColumn(Z))return null;const{getTH:K}=fB({props:e,ctx:t,columns:n,column:Z,index:ae,rows:r,rowIndex:F});return K()})]))])])},p=()=>e.showHead?a.createVNode("table",{cellpadding:0,cellspacing:0},[f(),m()]):null,y=()=>{const A="append-last-row",k=[...oi(e.rowStyle,[]),{"--row-height":`${N(null,null,"append-last-row")}px`}];if(e.appendLastRow.type==="default")return t.slots.appendLastRow?a.createVNode(Td,{key:A},{default:()=>{var L,F;return[a.createVNode("tr",{key:A,style:k},[a.createVNode("td",{colspan:n.visibleColumns.length},[((F=(L=e.appendLastRow).cellRender)==null?void 0:F.call(L,null,null))??t.slots.appendLastRow()])])]}}):void 0;if(e.appendLastRow.type==="summary")return a.createVNode(Td,{key:A},{default:()=>[a.createVNode("tr",{key:A,style:k},[n.visibleColumns.map((L,F)=>a.createVNode("td",null,[a.createVNode(c2,null,{default:()=>{var Z,ae;return[((ae=(Z=e.appendLastRow).cellRender)==null?void 0:ae.call(Z,L,F))??L.field??L.prop]}})]))])]})},b=A=>{let k={};const L=new WeakMap,F=n.needRowSpan.value;return a.createVNode("tbody",null,[A.map((Z,ae)=>{const K=$(Z,ae,k,A,L,F);return k=Z,K}),y()])},N=(A,k,L)=>{if(typeof e.rowHeight=="function"||/^\d+/.test(`${e.rowHeight}`))return Gt(e,"rowHeight",[{index:k,type:L??"tbody",row:A}]);const{size:F,height:Z,enabled:ae}=o.options;return ae&&Z!==null&&Z!==void 0?Gt(o.options,"height",["tbody",A,k,F]):ns},w=A=>{u=A},C=A=>{var F,Z;const k=A??r.pageRowList,L=a.computed(()=>e.emptyText===void 0?c.value.emptyText:e.emptyText);return k.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":d},[f(),b(k)]):((Z=(F=t.slots).empty)==null?void 0:Z.call(F))??a.createVNode(oB,{emptyText:L.value,filterList:k,list:e.data},null)},E=(A,k,L,F)=>{t.emit(St.ROW_CLICK,A,k,L,F)},_=(A,k,L,F)=>{t.emit(St.ROW_DBL_CLICK,A,k,L,F)},x=(A,k,L,F)=>{t.emit(St.ROW_MOUSE_ENTER,A,k,L,F)},O=(A,k,L,F)=>{t.emit(St.ROW_MOUSE_LEAVE,A,k,L,F)},T=(A,k,L,F,Z)=>{var ie;Z.has(A)||Z.set(A,new WeakMap),Z.get(A).has(F)||Z.get(A).set(F,{skipRowLen:0,skipRow:!1});let{skipRowLen:ae=0}=((ie=Z.get(L))==null?void 0:ie.get(F))??{},K=!1;const fe=xd(F,null,A,k,"rowspan");return ae>1?(ae=ae-1,K=!0):fe>1&&(ae=fe,K=!1),Object.assign(Z.get(A).get(F),{skipRowLen:ae,skipRow:K}),{skipRowLen:ae,skipRow:K}},$=(A,k,L,F,Z,ae,K=!1)=>{const fe=F.length,ie=[...oi(e.rowStyle,[A,k]),{"--row-height":`${N(A,k)}px`}],X=[...oi(e.rowClass,[A,k]),`hover-${e.rowHover}`,k%2===1&&e.stripe?"stripe-row":""],U=r.getRowAttribute(A,et.ROW_UID);return[a.createVNode(Td,{key:U},{default:()=>[a.createVNode("tr",a.mergeProps({key:U,style:ie,class:X,"data-row-index":k,draggable:!!e.rowDraggable,onClick:B=>E(B,A,k,F),onDblclick:B=>_(B,A,k,F),onMouseenter:B=>x(B,A,k,F),onMouseleave:B=>O(B,A,k,F)},u),[n.visibleColumns.map((B,Y)=>{const Q=[n.getFixedStlye(B),...oi(e.cellStyle,[B,Y,A,k])],{colspan:ue,rowspan:se}=KH(B,Y,A,k),{skipCol:we}=n.getColumnAttribute(B,Ae.COL_SPAN),{skipRow:ne}=ae&&!K?T(A,k,L,B,Z):{skipRow:!1},ye={"expand-cell":B.type==="expand"};if(!ne&&!we){let le;const ge=[n.getColumnClass(B,Y),n.getColumnCustomClass(B,A),B.align||e.align,...oi(e.cellClass,[B,Y,A,k]),{"expand-row":r.getRowAttribute(A,et.ROW_EXPAND),"is-last":k+se>=fe}],j=`${U}_${Y}`,ce=`${U}_${Y}_cell`,{renderCell:Ce}=lB({props:e,rows:r,ctx:t,columns:n,row:A,index:k,column:B,isChild:K,multiShiftKey:h}),oe=(z,he)=>{const pe={event:z,row:A,column:B,cell:{getValue:()=>Ce()},rowIndex:k,columnIndex:Y};t.emit(he,pe)};return a.createVNode("td",{key:j,style:Q,class:ge,colspan:ue,"data-id":j,rowspan:se,onClick:z=>oe(z,St.CELL_CLICK),onDblclick:z=>oe(z,St.CELL_DBL_CLICK)},[a.createVNode(c2,{key:ce,class:ye,column:B,"data-id":ce,intersectionObserver:e.intersectionObserver,isExpandChild:K,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,row:A},mB(le=Ce())?le:{default:()=>[le]})])}return null})])]}),D(A,X)]},D=(A,k,L)=>{if(r.getRowAttribute(A,et.ROW_EXPAND)){const Z=[...k,{row_expend:!0}],K=`${r.getRowAttribute(A,et.ROW_UID)}_expand`;return Array.isArray(A.children)?A.children.map((fe,ie)=>$(fe,ie,{},A,{},!1,!0)):a.createVNode(Td,{key:K},{default:()=>{var fe,ie;return[a.createVNode("tr",{class:Z},[a.createVNode("td",{colspan:n.visibleColumns.length,rowspan:1},[((ie=(fe=t.slots).expandRow)==null?void 0:ie.call(fe,A))??a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}},R=A=>{s.setPagination({limit:A}),t.emit(St.PAGE_LIMIT_CHANGE,A)},P=A=>{if(typeof e.pagination=="object"&&A!==s.options.current){s.setPagination({current:A,value:A}),t.emit(St.PAGE_VALUE_CHANGE,A);return}typeof e.pagination=="boolean"&&e.pagination!==!1&&t.emit(St.PAGE_VALUE_CHANGE,A)},I=()=>{if(s.isShowPagination.value)return a.createVNode(q0,a.mergeProps({style:"width: 100%;"},s.options,{modelValue:s.options.current,onChange:A=>P(A),onLimitChange:A=>R(A)}),null)};return a.onUnmounted(()=>{h.removeMultiCheckedEvents()}),{renderColumns:p,renderTBody:C,renderTFoot:I,setDragEvents:w}},pB=e=>{const t=a.reactive(new WeakMap),n=a.ref([]),r=a.reactive([]),s=k=>e.isRowSelectEnable?typeof e.isSelectedFn=="function"?e.isSelectedFn(c(k)):Array.isArray(e.checked)?e.checked.some(L=>typeof L!="object"?e.selectionKey.length&&Object.prototype.hasOwnProperty.call(k,e.selectionKey)?jH(k,e.selectionKey)===L:(console.warn("props.selectionKey is undefined or null or empty"),!1):Sd(L)===Sd(k)):!1:!1,o=()=>{let k=!1,L=!1;n.value.forEach((F,Z)=>{const ae=Sd(F);let K=qH(ae,er(),e);const fe=s(ae);fe?k=!0:L=!0,t.has(ae)||t.set(ae,{[et.ROW_EXPAND]:!1,[et.ROW_SELECTION]:fe,[et.ROW_UID]:K,[et.ROW_INDEX]:Z+1,[et.ROW_SELECTION_INDETERMINATE]:!1});const ie=t.get(ae);K=ie[et.ROW_UID],ie[et.ROW_INDEX]=Z+1}),t.set(rs,{[et.ROW_SELECTION]:k,[et.ROW_SELECTION_INDETERMINATE]:k&&L})},c=(k,L)=>({row:k,index:L??d(k,et.ROW_INDEX),isSelectAll:d(rs,et.ROW_SELECTION)}),d=(k,L)=>{var F;return(F=t.get(k))==null?void 0:F[L]},u=k=>{t.set(QF,{[et.ROW_SPAN]:k})},h=(k,L)=>_d(e,{row:k,index:L})?d(k,et.ROW_SELECTION):!0,f=k=>{if(typeof e.isSelectedFn=="function"){_(k,e.isSelectedFn(c(k)));return}_(k,!d(k,et.ROW_SELECTION))},m=k=>{const L=k??!p();if(t.set(rs,{[et.ROW_SELECTION]:L,[et.ROW_SELECTION_INDETERMINATE]:!1}),e.acrossAll){n.value.forEach((F,Z)=>_(F,L,Z));return}r.forEach((F,Z)=>_(F,L,Z))},p=()=>e.acrossAll?n.value.every((k,L)=>h(k,L)):r.every((k,L)=>h(k,L)),y=()=>e.acrossAll?n.value.some(k=>d(k,et.ROW_SELECTION)):r.some(k=>d(k,et.ROW_SELECTION)),b=k=>{m(k)},N=()=>{const k=p();E(rs,et.ROW_SELECTION,k),E(rs,et.ROW_SELECTION_INDETERMINATE,!k&&y())},w=()=>d(rs,et.ROW_SELECTION_INDETERMINATE),C=()=>d(rs,et.ROW_SELECTION),E=(k,L,F)=>{const Z=Sd(k),ae=t.get(Z);ae&&Object.prototype.hasOwnProperty.call(ae,L)&&(ae[L]=F)},_=(k,L,F)=>{let Z=L;typeof e.isSelectedFn=="function"&&(Z=e.isSelectedFn(c(k,F))),_d(e,{row:k,index:F??d(k,et.ROW_INDEX)})&&E(k,et.ROW_SELECTION,Z),N()},x=(k,L)=>{E(k,et.ROW_INDEX,L)},O=(k,L)=>{E(k,et.ROW_EXPAND,L)},T=k=>{let L=0;const F=50,Z=()=>{const ae=L+F;r.push(...k.slice(L,ae)),ae<k.length&&(L=ae,setTimeout(()=>{Z()}))};if(k.length>F){Z();return}r.push(...k)};return{setRowIndex:x,setRowExpand:O,isRowChecked:h,setPageRowList:k=>{r.length=0,T(k)},setTableRowList:k=>{n.value.length=0,n.value.push(...k),o()},clearSelection:()=>{n.value.forEach(k=>_(k,!1))},formatDataSchema:o,toggleRowSelection:f,setRowSelectionAll:b,setRowSelection:_,setAllRowExpand:k=>{n.value.forEach(L=>O(L,k??!0))},setTableIsNeedRowSpan:u,getRowAttribute:d,getRowSelection:()=>n.value.filter(k=>d(k,et.ROW_SELECTION)),getRowIndeterminate:w,getRowCheckedAllValue:C,changePageRowIndex:(k,L)=>{const F=r[k];r.splice(L,0,F);const Z=k<L?k:k+1;r.splice(Z,1)},toggleAllSelection:m,tableRowList:n,tableRowSchema:t,pageRowList:r}};function Ap(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const vB=(e,t,n,r)=>{const s=dt("table"),{resolveClassName:o}=xe(),c=qF(s),d=a.ref(!1),u=(X,U)=>Gt(X,["id","field","type"],[X,U]),h=()=>({enabled:!0,fields:e.columns.map(X=>Object.assign({},X,{field:X.field||X.type})),checked:[],limit:0,size:"small",sizeList:c,showLineHeight:!0,extCls:"",trigger:"manual",height:Mo.small}),f=X=>typeof X=="boolean"&&X!==!1?h():X?Object.assign({},h(),X):{enabled:!1},m=a.ref(null),p=a.reactive(h()),y=X=>{Object.assign(p,f(X))};a.watch(()=>[e.settings],()=>{y(e.settings)},{immediate:!0,deep:!0});const b=a.ref(p.size||"small"),N=a.ref(Mo.small),w=a.ref(p.checked||[]),E=`light ${o("table-settings")}`,_=a.computed(()=>p.fields||e.columns||[]),x={checkAll:d.value,activeSize:b.value,activeHeight:N.value,checkedFields:p.checked||[]},O=()=>{var U;Object.assign(x,{checkAll:d.value,activeSize:b.value,activeHeight:N.value,checkedFields:w.value});const X={checked:w.value,size:b.value,height:N.value,fields:a.unref(_)};Object.assign(p,X),n.setColumnAttributeBySettings(p,X.checked),n.setVisibleColumns(),r==null||r(X.checked),(U=m.value)==null||U.hide(),t.emit(St.SETTING_CHANGE,X)},T=()=>{var X;d.value=x.checkAll,b.value=x.activeSize,N.value=x.activeHeight,w.value=x.checkedFields,(X=m.value)==null||X.hide()},$=()=>{var X;p.trigger==="manual"&&((X=m.value)==null||X.show())},D=X=>{X.stopImmediatePropagation(),X.stopPropagation(),X.preventDefault(),d.value=!d.value;const U=p.fields||e.columns||[],B=U.filter((Y,Q)=>Y.disabled&&w.value.includes(u(Y,Q))).map((Y,Q)=>u(Y,Q));if(d.value){const Y=U.filter(Q=>!Q.disabled).map((Q,ue)=>u(Q,ue));w.value.splice(0,w.value.length,...Y,...B)}else w.value.splice(0,w.value.length,...B)},R=a.computed(()=>(p.limit??0)>0),P=p.sizeList||c,I=a.computed(()=>R.value&&(p.limit?p.limit:0)<=w.value.length),A=(X,U)=>X.disabled||I.value&&!w.value.includes(u(X,U)),k=X=>{b.value=X.value,N.value=X.height},L=X=>({"line-size":!0,"is-medium":b.value==="medium",active:X.value===b.value}),F={marginRight:"12px"},Z=()=>P.map(X=>a.createVNode("span",{class:L(X),onClick:()=>k(X)},[X.label])),ae=a.computed(()=>w.value.length>0&&w.value.length<_.value.length),K=a.computed(()=>typeof p.showLineHeight=="boolean"?p.showLineHeight:!0);a.watch(()=>[w.value],()=>{w.value.length||(d.value=!1),w.value.length&&_.value.every((X,U)=>w.value.includes(u(X,U)))&&(d.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{w.value.splice(0,w.value.length,...p.checked)},{immediate:!0,deep:!0});const fe=()=>{var U,B,Y,Q;let X;return((B=(U=t.slots).settings)==null?void 0:B.call(U))??a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"setting-head"},[a.createVNode("span",{class:"head-title"},[s.value.setting.title]),a.createVNode(eo,{class:"icon-close-action",onClick:T},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]),R.value?a.createVNode("span",{class:"limit"},[s.value.setting.fields.subtitle(p.limit)]):""]),R.value?"":a.createVNode("span",{class:"check-all",onClick:D},[a.createVNode(hn,{indeterminate:!!ae.value,label:s.value.setting.fields.selectAll,modelValue:w.value.length>0},{default:()=>[s.value.setting.fields.selectAll]})])]),a.createVNode(Tc,{class:"setting-body-fields",modelValue:w.value,"onUpdate:modelValue":ue=>w.value=ue},Ap(X=_.value.map((ue,se)=>{let we;return a.createVNode("div",{class:"field-item"},[a.createVNode(hn,{checked:w.value.includes(u(ue,se)),disabled:A(ue,se),label:u(ue,se)},Ap(we=Gt(ue,["name","label"],[ue,se]))?we:{default:()=>[we]})])}))?X:{default:()=>[X]}),(Q=(Y=t.slots).setting)==null?void 0:Q.call(Y),K.value?a.createVNode("div",{class:"setting-body-line-height"},[s.value.setting.lineHeight.title,a.createTextVNode(":"),Z()]):""]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Rt,{style:F,theme:"primary",onClick:O},{default:()=>[s.value.setting.options.ok]}),a.createVNode(Rt,{style:F,onClick:T},{default:()=>[s.value.setting.options.cancel]})])])};return{options:p,renderSettings:()=>e.settings?a.createVNode(Tn,a.mergeProps({ref:m,extCls:p.extCls,arrow:!0,placement:"bottom-end",trigger:p.trigger??"manual"},{theme:E}),{default:()=>a.createVNode("span",{class:"table-head-settings",onClick:$},[a.createVNode(jl,{style:"color: #c4c6cc;"},null)]),content:()=>a.createVNode("div",{class:"setting-content"},[fe()])}):null}},$p=en(a.defineComponent({name:"Table",props:lH,emits:wH,setup(e,t){const n=QH(e),r=pB(e),s=iB(e),{renderContainer:o,renderFixedBottom:c,renderBody:d,renderHeader:u,renderFooter:h,setBodyHeight:f,setFootHeight:m,setDragOffsetX:p,setOffsetRight:y,setHeaderRowCount:b,refBody:N,refRoot:w}=aB(e,t),C=(...Y)=>{var Q;return(Q=N.value)==null?void 0:Q.scrollTo(...Y)},_=vB(e,t,n,Y=>{(Y==null?void 0:Y.length)>0&&C(0,0)}),x=eB(e,r,t),{renderColumns:O,renderTBody:T,renderTFoot:$,setDragEvents:D}=gB({props:e,ctx:t,columns:n,rows:r,pagination:s,settings:_});D(x);const{resolveColumns:R}=NH(),P=a.getCurrentInstance(),I=()=>{var Q;const Y=((Q=P.subTree)==null?void 0:Q.children)??[];n.debounceUpdateColumns(R(Y),()=>{b(n.columnGroup.length)})};a.provide(mp,I);const{renderFixedRows:A,resolveFixedColumnStyle:k}=tB(e,n),L=()=>{var Q;const Y=((Q=w.value)==null?void 0:Q.offsetWidth)-(e.scrollbar?1:fp);n.resolveColsCalcWidth(Y),k()},{dragOffsetX:F}=CH(n,{afterResize:k}),Z=a.ref(!1),ae=Y=>{if(!s.isShowPagination.value||e.remotePagination)return Y;const Q=(s.options.current-1)*s.options.limit,ue=Q+s.options.limit;return Y.slice(Q,ue)},K=()=>{let Y=r.tableRowList.value.slice();return n.filterColumns.forEach(Q=>{var ue;!n.isHiddenColumn(Q.col)&&Q[Ae.COL_FILTER_FN]&&((ue=Q[Ae.COL_FILTER_VALUES])!=null&&ue.length)&&(Y=Y.filter((se,we)=>Q[Ae.COL_FILTER_FN](Q[Ae.COL_FILTER_VALUES],se,we,e.data)))}),n.sortColumns.forEach(Q=>{!n.isHiddenColumn(Q.col)&&Q[Ae.COL_SORT_FN]&&Q.active&&Y.sort((ue,se)=>{let we=null,ne=null;return Q.col.type==="index"&&(we=r.getRowAttribute(ue,et.ROW_INDEX),ne=r.getRowAttribute(se,et.ROW_INDEX)),Q[Ae.COL_SORT_FN](ue,se,we,ne)})}),Y},fe=a.computed(()=>s.isShowPagination.value?e.paginationHeight:0),ie=()=>{m(fe.value),/^\d+\.?\d*(px)?$/.test(`${e.height}`)&&f(Number(`${e.height}`.replace("px","")))},X=pn.debounce((Y=!0)=>{const Q=K();e.remotePagination||s.setPagination({count:Q.length});const ue=ae(Q);r.setPageRowList(ue),a.nextTick(()=>{y(),Y&&C(0,0)})},64),U=a.ref(!1);let B=null;return sB(w,()=>{if(!U.value){if(U.value=!0,(e.height==="100%"||e.virtualEnabled)&&pn.isElement(w.value)){if(Z.value){setTimeout(()=>{Z.value=!1});return}const Y=w.value.offsetHeight;Z.value=!0,f(Y),y()}L(),y(),C(0,0);return}B&&clearTimeout(B),B=setTimeout(()=>{U.value=!1})}),a.watch(()=>[e.columns],()=>{n.debounceUpdateColumns(e.columns,()=>{b(n.columnGroup.length)})},{immediate:!0}),a.watch(()=>[F.value],()=>{p(F.value)}),a.watch(()=>[n.visibleColumns],()=>{a.nextTick(()=>L())},{immediate:!0,deep:!0}),a.watch(()=>[n.sortColumns,n.filterColumns],()=>{X()},{deep:!0}),a.watch(()=>[s.isShowPagination.value],()=>{ie()},{immediate:!0}),a.watch(()=>[e.data],()=>{r.setTableRowList(e.data),X(!1)},{immediate:!0,deep:!0}),a.watch(()=>[s.options.count,s.options.limit,s.options.current],()=>{X()},{immediate:!0}),t.expose({setRowExpand:r.setRowExpand,setAllRowExpand:r.setAllRowExpand,clearSelection:()=>{r.clearSelection(),n.clearSelectionAll()},toggleAllSelection:r.toggleAllSelection,toggleRowSelection:r.toggleRowSelection,getSelection:r.getRowSelection,clearSort:n.clearColumnSort,scrollTo:C,getRoot:()=>w.value}),()=>o([u(O,_.renderSettings,A),d(r.pageRowList,T,A),c(),h($())])}}),{Column:dH}),Vp=a.defineComponent({name:"ListTagRender",props:{node:v.object,searchKey:v.oneOfType([v.string,v.arrayOf(v.string)]),displayKey:v.string,searchKeyword:v.string,tpl:{type:Function},disabled:v.bool.def(!1)},render(){const{resolveClassName:e}=xe(),t=r=>{if(this.searchKeyword&&!this.disabled){const s=new RegExp(`(${this.searchKeyword})`,"i");return r.replace(s,'<strong class="highlight-text">$1</strong>')}return r};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])])}}),yB=()=>({modelValue:v.arrayOf(v.string).def([]),placeholder:v.string.def(""),list:v.arrayOf(v.object).def([]),disabled:v.bool.def(!1),tooltipKey:v.string.def(""),saveKey:v.string.def("id"),displayKey:v.string.def("name"),hasDeleteIcon:v.bool.def(!1),clearable:v.bool.def(!0),trigger:Pe("treeTriggerType",{}).def("search"),searchKey:v.oneOfType([v.string,v.arrayOf(v.string)]).def("name"),useGroup:v.bool.def(!1),allowCreate:v.bool.def(!1),maxData:v.number.def(-1),maxResult:v.number.def(10),contentMaxHeight:v.number.def(300),contentWidth:v.number.def(190),separator:v.string.def(""),allowNextFocus:v.bool.def(!0),allowAutoMatch:v.bool.def(!1),showClearOnlyHover:v.bool.def(!1),isAsyncList:v.bool.def(!1),leftSpace:v.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:()=>({})}}),bB=a.defineComponent({name:"TagRender",directives:{bkTooltips:pa},props:{node:v.object,displayKey:v.string,tooltipKey:v.string,tpl:{type:Function},hasTips:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:()=>({})}},setup(e){const t=a.ref(),n=a.ref(!1),r=a.computed(()=>({boundary:"window",theme:"light",distance:12,content:e.node[e.tooltipKey],disabled:!KR.has(e.node,e.tooltipKey)||!n.value,...e.tagOverflowTips}));return a.onMounted(()=>{n.value=Av(t.value)}),{overflowTips:r,tagRef:t}},render(){return this.tpl?this.tpl(this.node,a.h,this):a.withDirectives(a.createVNode("div",{ref:"tagRef",class:"tag"},[a.createVNode("span",{class:"text"},[this.node[this.displayKey]])]),[[a.resolveDirective("bk-tooltips"),this.overflowTips]])}}),wB=a.defineComponent({name:"TagInput",directives:{bkTooltips:pa},props:yB(),emits:["update:modelValue","change","select","focus","blur","remove","removeAll","input"],setup(e,{emit:t}){const n=Qn(),r=dt("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}=xe(),{maxResult:d}=a.toRefs(e),{pageState:u,initPage:h,pageChange:f}=BE(d),m=a.ref(""),p=a.ref(null),y=a.ref(null),b=a.ref(null),N=a.ref(null),w=a.ref(null),C=a.ref(null),E=a.computed(()=>!e.disabled&&e.hasDeleteIcon),_=a.computed(()=>e.maxData===1),x=a.computed(()=>D.selectedTagList.length===0&&m.value===""&&!s.isEdit),O=a.computed(()=>e.placeholder||r.value.placeholder),T=a.computed(()=>e.clearable&&!e.disabled&&D.selectedTagList.length!==0&&(e.showClearOnlyHover?s.isHover:!0)),$=a.computed(()=>({[`${c("tag-input-trigger")}`]:!0,active:s.isEdit,disabled:e.disabled})),D=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),R=a.computed(()=>D.selectedTagList.map(W=>W[e.saveKey])),{flatList:P,saveKeyMap:I}=zE(e),A=a.computed(()=>{if(e.useGroup){const W={};return u.curPageList.forEach((te,be)=>{te.__index__=be,W[te.group.groupId]||(W[te.group.groupId]={id:te.group.groupId,name:te.group.groupName,children:[]}),W[te.group.groupId].children.push(te)}),Object.keys(W).map(te=>W[te])}return u.curPageList});a.watch([()=>P.value],()=>{a.nextTick(()=>{ae()})},{deep:!0}),a.watch(()=>e.modelValue,W=>{var te;ie(R.value,W)||(a.nextTick(()=>{ae()}),e.withValidate&&((te=n==null?void 0:n.validate)==null||te.call(n,"change")))}),a.watch(m,hl(()=>{const W=u.curPageList.length!==0,{value:te}=m;te!==""&&W||te===""&&e.trigger==="focus"&&W?o.isShow=!0:(e.trigger!=="focus"||!W)&&(o.isShow=!1)},150)),a.watch(()=>o.isShow,W=>{k(),W&&w.value&&(a.nextTick(()=>{w.value.scrollTop=0}),w.value.removeEventListener("scroll",L),w.value.addEventListener("scroll",L))}),a.onMounted(()=>{ae()});const k=()=>{var W;o.offset.crossAxis=_.value?0:(W=N.value)==null?void 0:W.offsetLeft},L=()=>{if(u.isPageLoading||w.value.scrollTop===0)return;const{scrollTop:W,offsetHeight:te,scrollHeight:be}=w.value;if(W+te>=be){const $e=u.curPage+1;$e<=u.totalPage&&(u.isPageLoading=!0,setTimeout(()=>{f($e)},500))}},F=()=>{var te;return Array.from(((te=b.value)==null?void 0:te.childNodes)||[]).filter(be=>![Node.TEXT_NODE,Node.COMMENT_NODE].includes(be.nodeType))},Z=W=>{if(!e.disabled){if(W!=null&&W.target){const{className:te}=W.target;(te.indexOf(`${c("tag-input-trigger")}`)>-1||te.indexOf("tag-list")>-1)&&b.value.appendChild(N.value)}clearTimeout(C.value),_.value&&R.value.length&&(D.tagListCache=[...R.value],D.selectedTagListCache=[...D.selectedTagList],m.value=D.selectedTagListCache[0][e.saveKey],pe(D.selectedTagList[0],0),Q()),s.isEdit=!0,setTimeout(()=>{var te;(te=p.value)==null||te.focus(),e.trigger==="focus"&&D.localList.length!==0&&(K(),o.isShow?k():o.isShow=!0)},200)}},ae=()=>{const{saveKey:W,modelValue:te,displayKey:be,allowCreate:$e,trigger:Ve,isAsyncList:Re}=e;if(D.selectedTagList=[],D.localList=P.value,te.length){const We={};D.selectedTagList=te.map(nt=>{const st=I.value[nt];return We[nt]=1,!st&&$e?{[W]:nt,[be]:nt}:st}).filter(nt=>nt),_.value||(D.localList=D.localList.filter(nt=>!We[nt[W]]))}if(Re&&m.value){K(m.value),u.curPageList.length&&(o.isShow=!0);return}Ve==="focus"&&K()},K=(W="")=>{const{searchKey:te,filterCallback:be}=e,$e=W.toLowerCase().trim();if($e===""){h(D.localList);return}let Ve=[];typeof be=="function"?Ve=be($e,te,D.localList)||[]:Array.isArray(te)?Ve=D.localList.filter(Re=>te.some(We=>Re[We].toLowerCase().indexOf($e)>-1)):Ve=D.localList.filter(Re=>Re[te].toLowerCase().indexOf($e)>-1),h(Ve)},fe=(W,te)=>{const be={[`${c("selector-actived")}`]:!0,[`${c("selector-selected")}`]:R.value.includes(W[e.saveKey])};return e.useGroup?be[`${c("selector-actived")}`]=W.__index__===s.focusItemIndex:be[`${c("selector-actived")}`]=te===s.focusItemIndex,be};function ie(W,te){return W.length!==te.length?!1:te.every((be,$e)=>W[$e]===be)}const X=()=>{D.tagListCache=[],D.selectedTagListCache=[],D.selectedTagList=[]},U=()=>{m.value=""},B=()=>{if(_.value)return 0;const te=F().findIndex(({id:be})=>be==="tagInputItem");return te>=0?te:0},Y=(W,te,be=!1)=>{if(!te||!W)return;let $e=te;be&&($e=te.nextElementSibling||null),te.parentNode.insertBefore(W,$e)},Q=W=>{const{maxData:te,trigger:be,allowCreate:$e}=e;if(te===-1||te>R.value.length){const{value:Ve}=W!=null&&W.target?W.target:m,Re=O6(Ve);Re?(K(Ve),p.value.style.width=`${Re*Ks}px`):be==="focus"&&K()}else se(),m.value="",o.isShow=!1;s.isEdit=!0,s.focusItemIndex=$e?-1:0,t("input",m.value)},ue=()=>{var W;o.width=_.value?(W=y.value)==null?void 0:W.clientWidth:e.contentWidth,t("focus")},se=()=>{C.value=setTimeout(()=>{var te;const W=m.value;if(U(),s.isEdit=!1,e.allowAutoMatch&&W){if(_.value){const[$e]=D.tagListCache;W===$e&&D.selectedTagListCache.length?he(D.selectedTagListCache[0],"select"):ye("remove")}const be=u.curPageList.find($e=>Array.isArray(e.searchKey)?e.searchKey.map(Re=>$e[Re]).includes(W):$e[e.searchKey]===W);be?we(be,"select"):e.allowCreate&&we(W,"custom")}o.isShow=!1,t("blur",W,R.value),(te=n==null?void 0:n.validate)==null||te.call(n,"blur")},200)},we=(W,te,be)=>{be==null||be.stopPropagation(),!(!W||W.disabled)&&(_.value&&X(),he(W,te),ye("select"),U(),o.isShow=!1)},ne=(W,te,be)=>{be==null||be.stopPropagation(),pe(W,te),U(),ye("remove",W),p.value.style.width=`${Ks}px`},ye=(W,te)=>{t(W,te),t("update:modelValue",R.value),t("change",R.value)},le=W=>{W.stopPropagation();const te=D.selectedTagList;D.selectedTagList=[];const be=te.filter($e=>I.value[$e[e.saveKey]]);(e.allowCreate&&be.length!==0||!e.allowCreate)&&!_.value&&D.localList.push(...be),ye("removeAll")},ge=()=>{const W={height:w.value.clientHeight,yAxis:w.value.getBoundingClientRect().y};a.nextTick(()=>{const te=w.value.querySelector(`.${c("selector-actived")}`);if(!te)return;const be={height:te.clientHeight,yAxis:te.getBoundingClientRect().y};be.yAxis<W.yAxis&&(w.value.scrollTop=w.value.scrollTop-(W.yAxis-be.yAxis));const $e=be.yAxis+be.height-W.yAxis;$e>W.height&&(w.value.scrollTop=w.value.scrollTop+$e-W.height)})},j=(W,te)=>{const be=F();Y(N.value,be[W-1]),D.selectedTagList.splice(W-1,1),Z();const $e=I.value[te[e.saveKey]];(e.allowCreate&&$e||!e.allowCreate)&&!_.value&&D.localList.push(te),p.value=`${Ks}px`,ye("remove")},ce=W=>{if(u.isPageLoading)return;let te;const be=W.target.value,$e=O6(be),Ve=B(),Re=F();switch(W.code){case"ArrowUp":if(W.preventDefault(),!o.isShow)return;s.focusItemIndex=s.focusItemIndex-1,s.focusItemIndex=s.focusItemIndex<0?-1:s.focusItemIndex,s.focusItemIndex===-1&&(s.focusItemIndex=u.curPageList.length-1),ge();break;case"ArrowDown":if(W.preventDefault(),!o.isShow)return;s.focusItemIndex=s.focusItemIndex+1,s.focusItemIndex=s.focusItemIndex>u.curPageList.length-1?u.curPageList.length:s.focusItemIndex,s.focusItemIndex===u.curPageList.length&&(s.focusItemIndex=0),ge();break;case"ArrowLeft":if(s.isEdit=!0,!$e){if(Ve<1)return;Y(N.value,Re[Ve-1]),Z()}break;case"ArrowRight":if(s.isEdit=!0,!$e){if(Ve===Re.length-1)return;Y(Re[Ve+1],N.value),Z()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&o.isShow||e.allowCreate&&s.focusItemIndex>=0&&o.isShow?we(u.curPageList[s.focusItemIndex],"select",W):e.allowCreate&&m.value.trim()&&we(m.value,"custom",W),W.preventDefault();break;case"Backspace":Ve!==0&&!m.value&&(te=D.selectedTagList[Ve-1],j(Ve,te));break}},Ce=W=>{const te=[],be=W.split(";"),$e=/^[a-zA-Z][a-zA-Z_]*/g;return be.forEach(Ve=>{const Re=Ve.match($e);if(Re){const We=Re.join("");te.push({[e.saveKey]:We,[e.displayKey]:We})}}),te},oe=W=>{if(W.preventDefault(),_.value)return!1;const{maxData:te,saveKey:be,displayKey:$e,pasteFn:Ve,allowCreate:Re}=e,We=W.clipboardData.getData("text");let st=(Ve?Ve(We):Ce(We)).map(at=>at[be]);if(st.length){const at=F(),Vt=B(),gt=D.localList.map(Ye=>Ye[be]);if(st=st.filter(Ye=>{const Kt=(Ye==null?void 0:Ye.trim())&&!R.value.includes(Ye);return Re?Kt:Kt&>.includes(Ye)}),te!==-1){const Ye=D.selectedTagList.length;if(Ye<te){const Kt=te-Ye;st.length>Kt&&(st=[...st.slice(0,Kt)])}else st=[]}const Lt=Re?st.map(Ye=>D.localList.find(is=>is[be]===Ye)??{[be]:Ye,[$e]:Ye}):D.localList.filter(Ye=>st.includes(Ye[be]));st.length&&(D.selectedTagList.splice(Vt,0,...Lt),Y(N.value,at[Vt]),p.value.style.width=`${Ks}px`,D.localList=D.localList.filter(Ye=>!st.includes(Ye[be])),ye("select"),Z())}},z=W=>{e.disabled||(Y(N.value,W.currentTarget,!0),p.value.style.width=`${Ks}px`,o.isShow&&k())},he=(W,te)=>{if(D.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:be,saveKey:$e,displayKey:Ve,createTagValidator:Re}=e,We=B();let nt=1,st=!1,at;const Vt=gt=>typeof Re=="function"?Re(gt):!0;if(te==="custom")if(be){let gt=W.split(be);gt=gt.filter(Ye=>(Ye==null?void 0:Ye.trim())&&!R.value.includes(Ye)&&Vt(Ye));const Lt=gt.map(Ye=>I.value[Ye]||{[$e]:Ye,[Ve]:Ye});gt.length&&(D.selectedTagList.splice(We,0,...Lt),nt=Lt.length,st=!0)}else{const gt=typeof W=="object";if(at=gt?W[$e]:W.trim(),at=at.replace(/\s+/g,""),at!==void 0&&!R.value.includes(at)&&Vt(at)){const Lt=I.value[at]||(gt?W:{[$e]:at,[Ve]:at});D.selectedTagList.splice(We,0,Lt),st=!0}}else W&&(at=W[$e],at!==void 0&&!R.value.includes(at)&&(D.selectedTagList.splice(We,0,W),st=!0));st&&a.nextTick(()=>{for(let gt=1;gt<=nt;gt++){const Ye=F()[We+gt];Y(Ye,N.value)}if(p.value.style.width=`${Ks}px`,!_.value){e.allowNextFocus&&Z();const gt=R.value.reduce((Lt,Ye)=>(Lt[Ye]=1,Lt),{});D.localList=D.localList.filter(Lt=>!gt[Lt[$e]])}})},pe=(W,te)=>{D.selectedTagList.splice(te,1);const be=I.value[W[e.saveKey]];(e.allowCreate&&be||!e.allowCreate)&&!_.value&&D.localList.push(W)},q=a.computed(()=>e.collapseTags?e.collapseTags&&!s.isEdit:e.collapseTags),{overflowTagIndex:G}=L6(y,q,R),ee=a.computed(()=>D.selectedTagList.reduce((W,te,be)=>(G.value!==null&&be>=G.value&&W.push(te[e.displayKey]),W),[]));return{popoverProps:o,...a.toRefs(s),...a.toRefs(D),...a.toRefs(u),isShowPlaceholder:x,isShowClear:T,placeholderText:O,curInputValue:m,renderList:A,showTagClose:E,tagInputRef:p,bkTagSelectorRef:y,tagListRef:b,tagInputItemRef:N,selectorListRef:w,triggerClass:$,overflowTagIndex:G,localCollapseTags:q,collapseTooltip:ee,focusInputTrigger:Z,activeClass:fe,handleInput:Q,handleFocus:ue,handleBlur:se,handleTagSelected:we,handleTagRemove:ne,handleClear:le,tagFocus:z,handleKeydown:ce,handlePaste:oe,resolveClassName:c}},render(){return a.createVNode("div",{ref:"bkTagSelectorRef",class:`${this.resolveClassName("tag-input")}`,onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode(Tn,a.mergeProps({arrow:!1,placement:"bottom-start",theme:`light ${this.resolveClassName("tag-input-popover-content")}`,trigger:"manual"},this.popoverProps),{default:()=>{var e,t;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`},class:"tag-list"},[this.selectedTagList.map((n,r)=>{const s=this.localCollapseTags&&this.overflowTagIndex&&r>=this.overflowTagIndex;return a.createVNode("li",{style:{display:s?"none":""},class:"tag-item",onClick:this.tagFocus},[a.createVNode(bB,{displayKey:this.displayKey,node:n,tagOverflowTips:this.tagOverflowTips,tooltipKey:this.tooltipKey||this.displayKey,tpl:this.tagTpl},null),this.showTagClose&&a.createVNode(tn,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,n,r)},null)])}),a.withDirectives(a.createVNode("li",{id:"tagInputItem",ref:"tagInputItemRef",class:"tag-input-item",role:"input"},[a.withDirectives(a.createVNode("input",{ref:"tagInputRef",class:"tag-input","onUpdate:modelValue":n=>this.curInputValue=n,type:"text",onBlur:this.handleBlur,onFocus:this.handleFocus,onInput:this.handleInput,onKeydown:this.handleKeydown,onPaste:this.handlePaste},null),[[a.vModelText,this.curInputValue]])]),[[a.vShow,this.isEdit]]),!!this.overflowTagIndex&&this.localCollapseTags&&a.withDirectives(a.createVNode("li",{class:"tag-item"},[a.createVNode("div",{class:"tag"},[a.createVNode("span",{class:"text"},[a.createTextVNode("+"),this.selectedTagList.length-this.overflowTagIndex])])]),[[a.resolveDirective("bk-tooltips"),this.collapseTooltip.join(", ")]])]),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(un,{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,r)=>a.createVNode("li",{class:[`${this.resolveClassName("selector-list-item")}`,{disabled:n.disabled},this.activeClass(n,r)],onClick:this.handleTagSelected.bind(this,n,"select")},[a.createVNode(Vp,{disabled:n.disabled,displayKey:this.displayKey,node:n,searchKey:this.searchKey,searchKeyword:this.curInputValue,tpl:this.tpl},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(Vp,{disabled:e.disabled,displayKey:this.displayKey,node:e,searchKey:this.searchKey,searchKeyword:this.curInputValue,tpl:this.tpl},null)])),this.isPageLoading?a.createVNode("li",{class:`${this.resolveClassName("selector-list-item")} loading`},[a.createVNode(da,{size:Ga.Small,theme:"primary"},null)]):null])])})])}}),Dp=Je(wB),kp=Je(x$),CB={list:v.arrayOf(v.shape({tag:v.string,content:v.oneOfType([v.string,v.object]),type:v.string,size:v.string,color:v.string,icon:v.func,filled:v.bool,border:v.bool,nodeType:v.timelineNodeType()}).isRequired),titleAble:v.bool.def(!1)},Ed=Je(a.defineComponent({name:"Timeline",props:CB,emits:["select"],setup(e,{emit:t}){const n=a.shallowRef([]),{resolveClassName:r}=xe(),s=o=>{t("select",o)};return a.watch(()=>e.list,()=>{n.value=e.list.map(o=>({tag:o.tag,content:o.content,type:o.type,size:o.size,color:o.color,icon:o.icon,filled:o.filled,border:o.border??!0,nodeType:o.nodeType||"template"}))},{immediate:!0,deep:!0}),{defaultTimelines:n,handleTitleSelect:s,resolveClassName:r}},render(){const e=r=>{const{icon:s}=r;return typeof s=="object"||typeof s=="function"},t=r=>{const s=this.resolveClassName("timeline"),o=["blue","red","green","yellow","gray"],c=r.type?`${s}-${r.type}`:`${s}-default`,d=r.size?`${s}-${r.size}`:"",u=r.filled?`${s}-filled`:"",h=r.color&&o.includes(r.color)?`${s}-${r.color}`:"",f=e(r)?`${s}-custom`:"";return Ue({},`${s} ${c} ${d} ${h} ${u} ${f}`)},n=r=>this.$slots.content?a.createVNode("div",{class:`${this.resolveClassName("timeline-content")}`},[this.$slots.content(r)]):r.nodeType==="vnode"?a.createVNode("div",{class:`${this.resolveClassName("timeline-content")}`},[r.content]):a.createVNode("div",{class:`${this.resolveClassName("timeline-content")}`,innerHTML:r.content},null);return a.createVNode("ul",{class:this.resolveClassName("timeline")},[this.defaultTimelines.map(r=>a.createVNode("li",{class:[`${this.resolveClassName("timeline-dot")}`,t(r)]},[e(r)&&a.createVNode("div",{style:{border:r.border?`2px solid ${r.color}`:"0px",borderRadius:r.border?"50%":"0"},class:`${this.resolveClassName("timeline-icon")}`},[a.createVNode("span",{class:`${this.resolveClassName("timeline-icon-inner")}`},[typeof r.icon=="function"?a.createVNode(r.icon,null,null):r.icon])]),a.createVNode("div",{class:`${this.resolveClassName("timeline-section")}`},[a.createVNode("div",{class:`${this.resolveClassName("timeline-title")}`,onClick:()=>this.handleTitleSelect(r)},[r.nodeType==="vnode"?r.tag:a.createVNode("span",{innerHTML:r.tag},null)]),n(r)])]))])}}));var Vr=(e=>(e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e.OBJECT_ARRAY="objectArray",e))(Vr||{});const NB={title:v.arrayOf(v.string).def([]),extCls:v.string.def(""),searchPlaceholder:v.string.def(""),settingKey:v.string.def("id"),displayKey:v.string.def("value"),sortKey:v.string.def("value"),showOverflowTips:v.bool.def(!1),searchable:v.bool.def(!1),sortable:v.bool.def(!1),sourceList:v.arrayOf(v.any).def([]),targetList:v.arrayOf(v.any).def([]),emptyContent:v.arrayOf(v.string).def([]),multiple:v.bool.def(!1)};function xB(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}function _B(e,t,n){const r=a.ref([]),s=a.ref([]),o=(c=!1)=>{c&&(r.value=[],s.value=[]),e.value.forEach(d=>{const u=d[n.value];t.value.includes(u)?s.value.push(d):r.value.push(d)})};return o(),a.watch(()=>[e,t,n],()=>{o(!0)},{deep:!0}),{selectList:r,selectedList:s}}function SB(e,t){const n=a.ref(""),r=a.computed(()=>e.value.filter(s=>{const o=s[t.value];return o instanceof Object?!1:o.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:r}}const Ip=Je(a.defineComponent({name:"Transfer",props:NB,emits:["change","update:targetList"],setup(e,{emit:t}){const n=dt("transfer"),r=a.ref({source:!1,target:!1}),s=a.ref({source:[],target:[]}),o=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(I=>I.toString().includes("[object Object]"))?Vr.OBJECT_ARRAY:Vr.BASE_ARRAY:Vr.NOT_ARRAY),c=a.computed(()=>o.value===Vr.BASE_ARRAY?"value":e.settingKey),d=a.computed(()=>o.value===Vr.BASE_ARRAY?"value":e.displayKey),u=a.computed(()=>e.sortKey||d.value),h=a.computed(()=>{switch(o.value){case Vr.BASE_ARRAY:return[...new Set(e.sourceList)].map(P=>({value:P}));case Vr.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:f}=a.toRefs(e),{selectList:m,selectedList:p}=_B(h,f,c),{selectSearchQuery:y,selectListSearch:b}=SB(m,d),N=a.computed(()=>[...b.value].sort((P,I)=>{const A=P[u.value],k=I[u.value];return A>k?1:-1})),w=a.computed(()=>[...p.value].sort((P,I)=>{const A=P[u.value],k=I[u.value];return A>k?1:-1}));a.watch(()=>[m,p],()=>{e.multiple||O()},{deep:!0});const C=(P,I)=>{const A=c.value;return P.some(k=>k[A]===I[A])&&I.disabled},E=()=>{m.value=[...h.value.filter(P=>C(m.value,P))],p.value=[...h.value.filter(P=>!C(m.value,P))],O()},_=()=>{m.value=[...h.value.filter(P=>!C(p.value,P))],p.value=[...h.value.filter(P=>C(p.value,P))],O()},x=(P,I)=>{if(P.disabled)return;const A=P[c.value],k=I?m:p,L=I?p:m,F=k.value.findIndex(Z=>Z[c.value]===A);L.value.push(...k.value.splice(F,1)),O()},O=()=>{const P=m.value.map(A=>A[c.value]),I=p.value.map(A=>A[c.value]);t("update:targetList",I),t("change",o.value===Vr.BASE_ARRAY?P:m.value.map(A=>a.toRaw(A)),o.value===Vr.BASE_ARRAY?I:p.value.map(A=>a.toRaw(A)),I)},T=P=>{const I=P==="source"?m:p;r.value[P]=s.value[P].length===I.value.length},$=(P,I)=>{const A=I==="source"?m:p;s.value[I]=P?A.value.map(k=>k[c.value]):[]},D=P=>{const I=P==="left",A=I?m:p,k=I?p:m,L=s.value[I?"source":"target"],F=A.value.filter(Z=>L.includes(Z[c.value]));A.value=A.value.filter(Z=>!L.includes(Z[c.value])),k.value.push(...F),s.value[I?"source":"target"]=[],O()},{resolveClassName:R}=xe();return{selectSearchQuery:y,selectListSearch:b,selectedList:p,selectListSort:N,selectedListSort:w,settingCode:c,displayCode:d,allToRight:E,allToLeft:_,handleItemClick:x,t:n,handleAllChecked:$,multipleSelectAllValue:r,multipleSelectList:s,handleMultipleChange:D,handleItemChecked:T,resolveClassName:R}},render(){const{multiple:e}=this.$props,t=this.sortable?this.selectListSort:this.selectListSearch,n=this.sortable?this.selectedListSort:this.selectedList,r=d=>{const u=d==="left-header",h=u?"source":"target",f=u?`${this.title[0]??this.t.sourceList}`:`${this.title[1]??this.t.targetList}`,m=u?!t.length:!n.length,p=!!this.multipleSelectList[h].length&&!this.multipleSelectAllValue[h],y=this.multipleSelectList[h].length,b=()=>{m||(u?this.allToRight():this.allToLeft())};return this.$slots[d]?a.createVNode("div",{class:"slot-header"},[this.$slots[d]()]):a.createVNode("div",{class:"header"},[this.multiple?a.createVNode(hn,{class:"header-checkbox",modelValue:this.multipleSelectAllValue[h],"onUpdate:modelValue":N=>this.multipleSelectAllValue[h]=N,indeterminate:p,label:f,onChange:N=>this.handleAllChecked(N,h)},null):a.createVNode(a.Fragment,null,[`${f}(${u?t.length:n.length})`]),this.multiple?a.createVNode("div",{class:"select-total-count"},[a.createVNode("span",{class:"select-count"},[y]),a.createVNode("span",{class:"count-delimiter"},[a.createTextVNode("/")]),a.createVNode("span",{class:"total-count"},[u?t.length:n.length])]):a.createVNode("span",{class:{"select-all":!0,disabled:m},onClick:()=>b()},[u?this.t.selectAll:this.t.removeAll])])},s=d=>{const u=d==="left-empty-content",h=(u?this.emptyContent[0]:this.emptyContent[1])??(u?this.t.noData:this.t.noSelected);return this.$slots[d]?a.createVNode("div",null,[this.$slots[d]()]):a.createVNode("div",{class:"empty"},[h])},o=(d,u=!0)=>a.createVNode("div",{class:["item-content",{"is-disabled":d.disabled}]},[a.createVNode("span",{class:"content-text",title:d[this.displayCode]},[d[this.displayCode]]),!e&&a.createVNode("span",{class:"icon-wrapper"},[u?a.createVNode(Bl,{class:this.resolveClassName("icon")},null):a.createVNode(tn,{class:[this.resolveClassName("icon"),this.resolveClassName("icon-delete")]},null)])]),c=d=>{let u;const h=d==="left",f=d==="left"?"source":"target",m=h?t:n,p=h?"source-option":"target-option",y=h?"left-empty-content":"right-empty-content",b=e?a.createVNode(Tc,{class:"content is-flex",modelValue:this.multipleSelectList[f],"onUpdate:modelValue":N=>this.multipleSelectList[f]=N,onChange:()=>this.handleItemChecked(f)},xB(u=m.map(N=>a.createVNode("div",null,[a.createVNode(hn,{class:"checkbox-item",label:N[this.settingCode]},{default:()=>{var w,C;return[((C=(w=this.$slots)[p])==null?void 0:C.call(w,N))??o(N,h)]}})])))?u:{default:()=>[u]}):a.createVNode("ul",{class:["content",this.searchable&&h?"is-search":""]},[m.map(N=>{var w,C;return a.createVNode("li",{key:N[this.settingCode],class:[this.$slots[p]?"custom-item":""],onClick:()=>this.handleItemClick(N,h)},[((C=(w=this.$slots)[p])==null?void 0:C.call(w,N))??o(N,h)])})]);return m.length?b:s(y)};return a.createVNode("div",{class:[`${this.resolveClassName("transfer")}`,this.extCls]},[a.createVNode("div",{class:"source-list"},[r("left-header"),this.searchable&&a.createVNode(va,{class:"transfer-search-input",modelValue:this.selectSearchQuery,"onUpdate:modelValue":d=>this.selectSearchQuery=d,clearable:!0,placeholder:this.searchPlaceholder||this.t.search},{prefix:()=>a.createVNode(Wa,{class:this.resolveClassName("icon-search")},null)}),c("left")]),e?a.createVNode("div",{class:"transfer-button-group"},[a.createVNode("div",{class:["transfer-button",{disabled:!this.multipleSelectList.source.length}],onClick:()=>this.handleMultipleChange("left")},[a.createVNode(_n,null,null)]),a.createVNode("div",{class:["transfer-button",{disabled:!this.multipleSelectList.target.length}],onClick:()=>this.handleMultipleChange("right")},[a.createVNode(rr,null,null)])]):a.createVNode(lc,{class:this.resolveClassName("transfer-icon")},null),a.createVNode("div",{class:"target-list"},[r("right-header"),c("right")])])}}));var An=(e=>(e.NODE_CHECKED="nodeChecked",e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_DRAG_LEAVE="nodeDragLeave",e.NODE_DRAG_OVER="nodeDragOver",e.NODE_DRAG_START="nodeDragStart",e.NODE_DROP="nodeDrop",e.NODE_ENTER_VIEW="nodeEnterView",e.NODE_EXPAND="nodeExpand",e.NODE_SELECTED="nodeSelected",e))(An||{});const Dr=(...e)=>!0,TB={nodeClick:Dr,nodeCollapse:Dr,nodeExpand:Dr,nodeChecked:Dr,nodeDragStart:Dr,nodeDragOver:Dr,nodeDragLeave:Dr,nodeDrop:Dr,nodeEnterView:Dr,nodeSelected:Dr};var Te=(e=>(e.DEPTH="__depth",e.HAS_CHILD="__has_child",e.INDEX="__index",e.IS_ASYNC="__is_async",e.IS_ASYNC_INIT="__is_async_init",e.IS_CACHED="__is_cached",e.IS_CHECKED="__is_checked",e.IS_INDETERMINATE="__is_indeterminate",e.IS_LOADING="__is_loading",e.IS_MATCH="__is_match",e.IS_NULL="__IS_NULL",e.IS_OPEN="__is_open",e.IS_ROOT="__is_root",e.IS_SELECTED="__is_selected",e.ORDER="__order",e.PARENT="__parent",e.PATH="__path",e.TREE_NODE_ATTR="__attr__",e.UUID="__uuid",e))(Te||{});const Sa={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"};var Pp=(e=>(e.CLICK="click",e.COLLAPSE="collapse",e.EXPAND="expand",e.SELECTED="selected",e))(Pp||{});const EB={data:v.arrayOf(v.any).def([]),label:v.oneOfType([v.func.def(void 0),v.string.def("label")]),nodeKey:v.string.def(void 0),children:v.string.def("children"),indent:v.number.def(16),lineHeight:v.number.def(32),height:v.number,levelLine:v.oneOfType([v.bool.def(!1),v.func.def(void 0),v.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:v.bool.def(!1),prefixIcon:v.oneOfType([v.func.def(()=>{}),v.bool.def(!1)]).def(!0),async:v.shape({callback:v.func.def(void 0),cache:v.bool.def(!0),deepAutoOpen:Pe("columnType",{}).def("once")}),offsetLeft:v.number.def(5),search:v.oneOfType([v.shape({value:v.oneOfType([v.number,v.string,v.bool]).def(""),match:v.oneOfType([Qt(),v.func]).def("fuzzy"),resultType:Qt().def("tree"),showChildNodes:v.bool.def(!1)}),v.string,v.number,v.bool]).def(void 0),emptyText:v.string.def("没有数据"),draggable:v.bool.def(!1),disableDrag:v.func,disableDrop:v.func,dragSort:v.bool.def(!1),selectable:v.oneOfType([v.bool,v.func]).def(!0),disabledFolderSelectable:v.bool.def(!1),showCheckbox:v.oneOfType([v.bool,v.func]).def(!1),checked:v.arrayOf(v.any).def([]),showNodeTypeIcon:v.bool.def(!0),selected:v.oneOfType([v.string,v.number,v.object]),autoCheckChildren:v.oneOfType([v.bool,v.func]).def(!0),autoOpenParentNode:v.bool.def(!0),expandAll:v.bool.def(!1),nodeContentAction:v.oneOfType([v.arrayOf(Pe("nodeContentActionType",{}).def(Pp.CLICK)),v.func.def(()=>["selected"])]).def(["selected","expand","click"]),keepSlotData:v.bool.def(!1),checkStrictly:v.bool.def(!0),intersectionObserver:v.oneOfType([v.bool.def(!1),v.shape({enabled:v.bool.def(!1),callback:v.func.def(void 0)})]).def(!1)},OB=e=>({renderEmpty:t=>a.createVNode(Kc,{scene:"part",type:t},{default:()=>[e.emptyText]})}),LB=e=>{const t={enabled:e.intersectionObserver,once:!1,callback:null};let n=null,r=[],s=null;const o=()=>typeof e.intersectionObserver=="boolean"?t:typeof e.intersectionObserver=="object"?Object.assign({},t,e.intersectionObserver):t,c=a.computed(o),d=p=>p instanceof NodeList?Array.from(p):Array.isArray(p)?p:[p];return{unobserveAll:()=>{r==null||r.forEach(p=>{pn.isElement(p)&&(n==null||n.unobserve(p))}),n==null||n.disconnect(),s==null||s.disconnect()},intersectionObserver:c,initIntersectionObserver:(p,y,b)=>{if(c.value.enabled){if(!p){console.error("intersectionObserver.target is undefined");return}r=d(p);const N=Object.assign({rootMargin:"0px"},y);n=new IntersectionObserver(function(w){w.forEach(C=>{var E,_,x;if(console.log("entry",C.target),C.isIntersecting){const O=((E=b==null?void 0:b.beforeResponse)==null?void 0:E.call(b,C))??C;(x=(_=c.value).callback)==null||x.call(_,O),c.value.once&&n.unobserve(C.target)}})},N),r.forEach(w=>{pn.isElement(w)&&n.observe(w)})}},initRootMutationObserver:(p,y)=>{if(c.value.enabled&&!e.virtualRender&&pn.isElement(p)){const b={attributes:!0,childList:!0,subtree:!0};s=new MutationObserver((...N)=>{y==null||y(...N)}),s.observe(p,b)}},getLastVisibleElement:(p,y)=>{const{offsetHeight:b}=y,N=y.querySelectorAll("[data-tree-node]"),w=b+p;return Array.from(N).filter(E=>E.offsetHeight+E.offsetTop>=w&&E.offsetTop<w)}}},Od=(e,t)=>{const n=K=>e.schema.get(K),r=(K,fe)=>{var ie;return(ie=n(K))==null?void 0:ie[fe]},s=(K,fe,ie,X)=>{if(!e.schema.has(K)){console.warn("node is not in schema, please check",X,K);return}e.schema.set(K,Object.assign({},n(K),{[fe]:ie}))},o=K=>e.data.find(fe=>u(fe)===K),c=(K,fe,ie)=>{if(Array.isArray(K)){Array.prototype.forEach.call(K,X=>s(o(X),fe,ie,K));return}s(o(K),fe,ie,K)},d=K=>r(K,Te.PATH),u=K=>r(K,Te.UUID),h=K=>r(K,Te.IS_OPEN),f=K=>r(K,Te.HAS_CHILD),m=K=>r(K,Te.IS_MATCH),p=K=>r(K,Te.IS_CHECKED),y=K=>r(r(K,Te.PARENT),Te.UUID),b=K=>r(K,Te.IS_LOADING),N=K=>r(K,Te.PARENT),w=K=>r(K,Te.IS_MATCH),C=(K,fe)=>{const ie=e.data.find(X=>u(X)===K);return r(ie,fe)},E=K=>typeof K=="string"?C(K,Te.IS_ROOT):r(K,Te.IS_ROOT),_=K=>{const fe=e.data.find(ie=>u(ie)===K);return y(fe)},x=K=>{const fe=e.data.find(ie=>u(ie)===K);return d(fe)},O=(K,fe)=>{s(K,Te.IS_LOADING,fe)},T=K=>typeof K=="object"?h(K):typeof K=="string"?C(K,Te.IS_OPEN):!1,$=(K,fe)=>r(r(K,Te.PARENT),fe),D=K=>T(r(K,Te.PARENT)),R=K=>E(K)||T(K)||D(K),P=(K,fe)=>{const X=K.split("-").reduce((U,B)=>{const Y=Number(B);return Array.isArray(U)?U[Y]:U[t.children][Y]},t.data);return fe&&Object.assign(X,{[Te.UUID]:fe}),X},I=K=>K[t.children]??[],A=K=>e.data.find(fe=>u(fe)===K),k=K=>E(K)?{[t.children]:t.data}:N(K),L=K=>({[Sa[Te.IS_LOADING]]:r(K,Te.IS_LOADING),[Sa[Te.HAS_CHILD]]:f(K),[Sa[Te.IS_MATCH]]:m(K),[Sa[Te.IS_CHECKED]]:p(K),[Sa[Te.IS_OPEN]]:h(K),[Sa[Te.IS_ROOT]]:E(K),fullPath:r(K,Te.PATH),uuid:u(K),parent:r(K,Te.PARENT),parentId:u(r(K,Te.PARENT))});return{getSchemaVal:n,getNodeAttr:r,getNodeId:u,getNodeById:o,getNodeParentId:y,getParentNodeData:k,getNodePathById:x,getNodeAttrById:C,getNodeParentIdById:_,getParentNodeAttr:$,getParentNode:N,setNodeAttr:s,setNodeAttrById:c,getNodePath:d,isRootNode:E,isNodeOpened:h,hasChildNode:f,isItemOpen:T,isNodeChecked:p,isNodeMatched:m,isNodeLoading:b,checkNodeIsOpen:R,getSourceNodeByPath:P,getSourceNodeByUID:A,isMatchedNode:w,resolveScopedSlotParam:L,setTreeNodeLoading:O,extendNodeAttr:K=>Object.assign({},K,{[Te.TREE_NODE_ATTR]:L(K)}),getChildNodes:I,extendNodeScopedData:K=>({data:K,attributes:L(K)}),getIntersectionResponse:K=>{var Y;if(!K)return null;let fe=K;pn.isElement(K)&&(fe=o(K.getAttribute("data-tree-node")));const ie=r(fe,Te.DEPTH),X=r(fe,Te.IS_ROOT),U=r(fe,Te.PARENT),B=X?r(fe,Te.INDEX):(Y=U==null?void 0:U[t.children])==null?void 0:Y.findIndex(Q=>Q===fe);return{level:ie,target:K,index:B,parent:U,node:fe,isRoot:X}}}},Mp="1px dashed #c3cdd7",Rp=(e,t,n=null,r=null,s=null,o=[])=>{const c=e[t];return typeof c=="boolean"?c?r:s:Fp(n,e,t,o)},Fp=(e,t,n,r=[])=>{const s=t[n];if(typeof s=="string")return typeof e=="object"&&e!==null?(Object.prototype.hasOwnProperty.call(e,s)||console.error(`cannot find node label with key ${s}`),e[s]):s;if(typeof s=="function"){const o=s.apply(void 0,[e,...r]);if(typeof o=="string")return o;console.error("props label with function return value is not string, please check and return string");return}},Hp=(e,t)=>Fp(e,t,"label"),AB=(e,t)=>({"--level-line":Rp(t,"levelLine",e,Mp,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),$B=(e,t,n,r=!0)=>{var c;const{schema:s}=n,o=(c=s.get(e))==null?void 0:c[Te.DEPTH];if(r){const d=["node"];return{"--depth":o,...typeof t.levelLine=="function"?{"--level-line":Rp(t,"levelLine",e,Mp,null,d)}:{}}}return{}},VB=(e,t,n,r=!0)=>{const{__is_root:s,__is_open:o}=t.get(e)||{},{resolveClassName:c}=xe();return{"is-root":s,[`${c("tree-node")}`]:!0,"is-open":o,"is-virtual-render":n.virtualRender,"level-line":n.levelLine&&r}},DB=(e,t)=>{const{__is_checked:n,__is_selected:r}=t.get(e)||{},{resolveClassName:s}=xe();return{"is-checked":n,"is-selected":r,"node-folder":e.is_folder,"node-leaf":e.is_leaf,[`${s("node-row")}`]:!0}},kB=(e,t,n,r,s)=>{IB(e,t,n,{[r]:s})},IB=(e,t,n,r)=>{const o=e.split("-").reduce((c,d)=>{const u=Number(d);return Array.isArray(c)?c[u]:c[n][u]},t);Object.assign(o,r||{})},Ro=e=>e??{__IS_NULL:!0},Ld=(e,t,n)=>Array.isArray(t)?t.some(r=>Ld(e,r,n)):typeof t=="string"||typeof t=="number"?t===n:e===t,Bp=(e,t)=>typeof e.showCheckbox=="function"?e.showCheckbox(t):e.showCheckbox,zp=(e,t)=>{const{setNodeAttr:n,getNodePath:r,getNodeAttr:s,resolveScopedSlotParam:o,setTreeNodeLoading:c}=Od(t,e),d=(f,m)=>{if(typeof f=="object"&&f!==null){n(m,Te.IS_OPEN,!0);const p=Array.isArray(f)?f:[f];return kB(r(m),e.data,e.children,e.children,p),Promise.resolve(f)}return Promise.resolve(f)},u=f=>{const{callback:m=null,cache:p=!0}=e.async||{};if(typeof m=="function"&&s(f,Te.IS_ASYNC)){if(n(f,Te.IS_ASYNC_INIT,!0),!s(f,Te.IS_CACHED)){n(f,Te.IS_CACHED,p);const y=o(f),b=m(f,N=>d(N,f),y);if(typeof b=="object"&&b!==null)return c(f,!0),b instanceof Promise?Promise.resolve(b.then(N=>d(N,f)).catch(N=>console.error("load remote data error:",N)).finally(()=>{c(f,!1),n(f,Te.IS_CACHED,!0)})):(d(b,f),c(f,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},h=()=>{const f=t.data.filter(m=>s(m,Te.IS_ASYNC)&&m[Sa[Te.IS_OPEN]]&&!s(m,Te.IS_ASYNC_INIT));f.length&&Promise.all(f.map(m=>u(m))).then(()=>{h()}).catch(m=>{console.warn(m)})};return{asyncNodeClick:u,deepAutoOpen:h}},PB=(e,t,n,r,s)=>{let o=e.selected;const{setNodeAttr:c,setNodeAttrById:d,getNodePath:u,getSchemaVal:h,getNodeAttr:f,getNodeId:m,getChildNodes:p,isRootNode:y,hasChildNode:b,isItemOpen:N,isNodeOpened:w,isNodeLoading:C,isNodeChecked:E,getParentNode:_,resolveScopedSlotParam:x,extendNodeAttr:O,extendNodeScopedData:T}=Od(n,e),{resolveClassName:$}=xe(),{registerNextLoop:D}=s,{asyncNodeClick:R,deepAutoOpen:P}=zp(e,n),I=oe=>N(oe)?a.createVNode(Zl,{class:[$("tree-icon"),$("node-prefix")]},null):a.createVNode(Jl,{class:[$("tree-icon"),$("node-prefix")]},null),A=oe=>{if(typeof oe=="string")return oe;if(typeof oe=="object"&&oe!==null){if(a.isVNode(oe))return oe;const{node:z,className:he,text:pe,style:q}=oe;return a.h(z,{class:he,style:q},pe)}return null},k=oe=>{var z,he;return((he=(z=t.slots).nodeLoading)==null?void 0:he.call(z,j(oe)))??C(oe)?a.createVNode(Fs,null,null):""},L=oe=>{if(t.slots.nodeAction)return t.slots.nodeAction(j(oe));let z=null;if(C(oe))return k(oe);if(typeof e.prefixIcon=="function"&&(z=e.prefixIcon(j(oe),"node_action"),z!=="default"))return A(z);if(z==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon){const he=typeof e.autoCheckChildren=="function"?e.autoCheckChildren(oe):e.autoCheckChildren;if(b(oe)||oe.async||!he)return N(oe)?a.createVNode(to,{class:$("node-prefix")},null):a.createVNode(oo,{class:$("node-prefix")},null)}return null},F=oe=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(j(oe));let z=null;return typeof e.prefixIcon=="function"&&(z=e.prefixIcon(j(oe),"node_type"),z!=="default")?A(z):z==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?y(oe)||b(oe)?I(oe):a.createVNode(oc,{class:[$("tree-icon"),$("node-prefix")]},null):null},Z=(oe,z)=>{const he=_(oe);if(he){const pe=z||(p(he)||[]).some(q=>E(q));c(he,Te.IS_CHECKED,pe),c(he,Te.IS_INDETERMINATE,(p(he)||[]).some(q=>!E(q)||fe(q))),y(he)||Z(he,z)}},ae=(oe,z,he)=>{p(oe).forEach(pe=>{Array.isArray(z)?z.forEach((q,G)=>{c(pe,q,he[G])}):c(pe,z,he),ae(pe,z,he)})},K=(oe,z,he)=>{he==null||he.preventDefault(),he==null||he.stopImmediatePropagation(),he==null||he.stopPropagation(),c(oe,Te.IS_CHECKED,!!z),z&&c(oe,Te.IS_INDETERMINATE,!1),e.checkStrictly&&(ae(oe,[Te.IS_CHECKED,Te.IS_INDETERMINATE],[!!z,!1]),Z(oe,z)),t.emit(An.NODE_CHECKED,n.data.filter(pe=>E(pe)),n.data.filter(pe=>fe(pe))),ne(oe,he)},fe=oe=>E(oe)&&f(oe,Te.IS_INDETERMINATE),ie=oe=>Bp(e,T(oe))?a.createVNode("span",{onClick:ce},[a.createVNode(hn,{indeterminate:fe(oe),modelValue:E(oe),size:"small",onChange:(z,he)=>K(oe,!!z,he)},null)]):null,X=(oe,z=null,he=null,pe=!0)=>{const q=z===null?!N(oe):!!z;if(q||ae(oe,Te.IS_OPEN,q),c(oe,Te.IS_OPEN,q),pe){const G=N(oe)?An.NODE_EXPAND:An.NODE_COLLAPSE;t.emit(G,oe,x(oe),h(oe),he)}},U=(oe,z,he)=>{if(Array.isArray(oe)){oe.forEach(pe=>c(Ro(pe),z,he));return}c(Ro(oe),z,he)},B=(oe,z=!0,he=!1)=>{Y(oe,Te.IS_OPEN,z,he&&z)},Y=(oe,z,he,pe=!1)=>{const q=Ro(oe);if(q[Te.IS_NULL])return;const G=Array.isArray(z)?z:[z],ee=Array.isArray(he)?he:[he];if(pe){if(G.forEach((W,te)=>U(q,W,ee[te])),!y(q)){const W=_(q);G.forEach((te,be)=>{f(W,te)!==he&&Y(W,te,ee[be],pe)})}}else G.forEach((W,te)=>U(q,W,ee[te]))},Q=(oe,z)=>{if(N(oe)){X(oe,!1,z,!0);return}R(oe).finally(()=>{f(oe,Te.IS_LOADING)?D("setNodeOpenedAfterLoading",{type:"once",fn:()=>X(oe,!0,z,!0)}):X(oe,!0,z,!0)})},ue=(oe,z)=>{oe.stopImmediatePropagation(),oe.stopPropagation(),oe.preventDefault(),Q(z,oe)},se=(oe,z=!0,he=!0,pe=!1)=>{const q=Array.isArray(oe)?oe:[oe];if(!q.length)return;let G=Ro(q[0]);if((typeof G=="string"||typeof G=="number"||typeof G=="symbol")&&(G=n.data.find(ee=>m(ee)===G)??{[Te.IS_NULL]:!0}),!G[Te.IS_NULL]){if(!e.selectable||typeof e.selectable=="function"&&!e.selectable(oe)||e.disabledFolderSelectable&&G.is_folder===!0){console.warn("props.selectable is false or undefined, please set selectable with true");return}o!=null&&d(o,Te.IS_SELECTED,!z),e.selected&&e.selected!==o&&d(e.selected,Te.IS_SELECTED,!z),c(G,Te.IS_SELECTED,z),o=m(G),pe&&t.emit(An.NODE_SELECTED,{selected:z,node:G}),he&&q.length===1&&B(G,!0,!0),f(G,Te.IS_ASYNC)&&R(G).then(()=>{a.nextTick(()=>{q.shift(),se(q,z,he)})})}},we=oe=>typeof e.nodeContentAction=="function"?Reflect.apply(e.nodeContentAction,void 0,[{node:oe}]):typeof e.nodeContentAction=="string"?[e.nodeContentAction]:Array.isArray(e.nodeContentAction)?e.nodeContentAction:["selected","expand","click"],ne=(oe,z)=>{const he=we(oe);if(he.includes("selected")&&se(oe,!0,!0,!0),he.includes("expand")&&(w(oe)||Q(oe,z)),he.includes("collapse")&&w(oe)&&Q(oe,z),he.includes("click")){const pe=An.NODE_CLICK;t.emit(pe,oe,x(oe),h(oe),z)}},ye=(oe,z)=>{if(y(z))return!1;const he=u(z),pe=`${he}`.split("-").slice(0,oe+1);if(pe.join("-")===he)return!0;const G=pe.pop(),ee=parseInt(G,10);pe.push(`${ee+1}`);const W=pe.join("-");return n.data.some(te=>u(te)===W)},le=oe=>{if(!e.levelLine)return null;const z=pe=>({"--depth":pe}),he=(f(oe,Te.DEPTH)??0)+1;return new Array(he).fill("").map((pe,q)=>q).filter(pe=>ye(pe,oe)).filter(pe=>pe>0).map(pe=>a.createVNode("span",{style:z(he-pe),class:"node-virtual-line"},null))},ge=oe=>{var z,he,pe,q;return t.slots.node?(he=(z=t.slots).node)==null?void 0:he.call(z,j(oe)):t.slots.default?(q=(pe=t.slots).default)==null?void 0:q.call(pe,T(oe)):[Hp(oe,e)]},j=oe=>e.keepSlotData?T(oe):O(oe),ce=oe=>{oe.stopImmediatePropagation(),oe.stopPropagation()};return{renderTreeNode:(oe,z=!0)=>{var he,pe;return a.createVNode("div",{key:m(oe),class:DB(oe,n.schema),"data-tree-node":m(oe)},[a.createVNode("div",{style:$B(oe,e,n,z),class:VB(oe,n.schema,e,z),onClick:q=>ne(oe,q)},[a.createVNode("div",{class:[$("node-action")],onClick:q=>ue(q,oe)},[L(oe)]),a.createVNode("div",{class:$("node-content")},[[ie(oe),F(oe)],a.createVNode("span",{class:$("node-text")},[ge(oe)]),(pe=(he=t.slots).nodeAppend)==null?void 0:pe.call(he,j(oe))]),z&&le(oe)])])},handleTreeNodeClick:Q,deepAutoOpen:P,asyncNodeClick:R,setNodeAction:U,setNodeOpened:X,setSelect:se,setOpen:B,setNodeAttribute:Y,isIndeterminate:fe}},MB=(e,t,n,r)=>{const{getSourceNodeByUID:s,getParentNodeData:o,getNodeParentIdById:c,extendNodeAttr:d,getNodeAttrById:u,getNodePathById:h,isRootNode:f}=Od(r,e),{resolveClassName:m}=xe(),p=a.computed(()=>typeof e.disableDrag=="function"),y=a.computed(()=>typeof e.disableDrop=="function");let b="";const N=P=>P.target.closest("[data-tree-node]"),w=P=>{var A;const I=(A=P==null?void 0:P.dataset)==null?void 0:A.treeNode;return s(I)},C=P=>{N(P).removeEventListener("mouseup",C)},E=P=>{const I=N(P),A=w(I);if(A.draggable===!1||p.value&&e.disableDrag(A)){I.classList.add(`${m("tree-drag-disabled")}`);return}I.setAttribute("draggable","true"),I.addEventListener("mouseup",C)},_=P=>{P.preventDefault();const I=N(P),A=d(w(I));if(t.emit(An.NODE_DRAG_OVER,P,I,A),y.value&&(e!=null&&e.disableDrop(A))){P.dataTransfer.effectAllowed="move",P.dataTransfer.dropEffect="none",I.classList.add(`${m("tree-drop-disabled")}`);return}I.classList.add(`${m("tree-drop-active")}`);let k=P.dataTransfer.getData("node-id");k=b;const L=I.getAttribute("data-tree-node"),F=T(k,L)?"move":"none";P.dataTransfer.effectAllowed=F,P.dataTransfer.dropEffect=F},x=P=>{P.dataTransfer.effectAllowed="move",P.dataTransfer.dropEffect="move";const I=N(P);P.dataTransfer.setData("text/plain","");const A=I.getAttribute("data-tree-node");b=A,P.dataTransfer.setData("node-id",A),t.emit(An.NODE_DRAG_START,P,I)},O=P=>{P.preventDefault(),P.stopPropagation();const I=N(P);I.classList.remove(`${m("tree-drop-active")}`,`${m("tree-drop-disabled")}`);const A=d(w(I));if(y.value&&e.disableDrop(A))return;const k=b,L=I.getAttribute("data-tree-node");Reflect.apply(e.dragSort?$:D,void 0,[k,L]),t.emit(An.NODE_DROP,P,I,A)},T=(P,I)=>{const A=h(P),k=h(I),L=c(P),F=c(I);return L===F?!0:A.indexOf(k)===-1&&k.indexOf(A)===-1},$=(P,I)=>{if(!T(P,I))return;const A=JSON.parse(JSON.stringify(s(P))),k=JSON.parse(JSON.stringify(s(I))),L=o(P),F=o(I),Z=u(P,Te.INDEX),ae=u(I,Te.INDEX);L==null||L[e.children].splice(Z,1,k),F==null||F[e.children].splice(ae,1,A)},D=(P,I)=>{const A=s(P),k=s(I);let L=null;if(f(P))L=e.data;else{const F=c(P);if(F!=null){L=s(F);const Z=u(P,Te.INDEX);L==null||L[e.children].splice(Z,1)}}k[e.children]||(k[e.children]=[]),k[e.children].unshift(A)},R=P=>{P.preventDefault();const I=N(P);I.classList.remove(`${m("tree-drop-active")}`,`${m("tree-drop-disabled")}`),t.emit(An.NODE_DRAG_LEAVE,P,I)};a.onMounted(()=>{if(e.draggable&&n.value){const P=n.value.$el;P.addEventListener("mousedown",E),P.addEventListener("dragstart",x),P.addEventListener("dragover",_),P.addEventListener("dragleave",R),P.addEventListener("drop",O)}}),a.onUnmounted(()=>{if(e.draggable&&n.value){const P=n.value.$el;P.removeEventListener("mousedown",E),P.removeEventListener("dragstart",x),P.removeEventListener("dragover",_),P.removeEventListener("dragleave",R),P.removeEventListener("drop",O)}})},RB=e=>{const t=a.toRef(e,"search"),{resultType:n="tree",showChildNodes:r=!0}=e.search??{},s=p=>["string","number","boolean"].includes(typeof p),o=(p,y)=>p===y,c=(p,y)=>new RegExp(`${p}`,"i").test(`${y}`),d=(p,y)=>Reflect.apply(p,void 0,y),u=t.value===void 0||t.value===!1,h=(p,y)=>{if(u)return!0;if(s(t.value))return`${t.value}`.length===0?!1:d(c,[t.value,p,y]);const{value:b="",match:N="fuzzy"}=t.value,C=typeof N=="function"?N:N==="fuzzy"?c:o;return`${b}`.length===0?!1:d(C,[b,p,y])},f=a.computed(()=>{if(t.value===!1)return!1;if(s(t.value))return`${t.value}`.length>0;const{value:p=""}=t.value;return`${p}`.length>0}),m=a.computed(()=>n==="tree");return{searchFn:h,refSearch:t,isSearchActive:f,isSearchDisabled:u,resultType:n,isTreeUI:m,showChildNodes:r}},FB=e=>{var N;const t=(w=void 0,C=null)=>{const{data:E,children:_}=e,x=[],O=[];let T=0;const $=new WeakMap;function D(K,fe,ie,X){if(K!=null&&$.has(K)){const U=$.get(K);if(Object.prototype.hasOwnProperty.call(U,fe)&&typeof X=="function"&&Reflect.apply(X,self,[U,fe,ie,K])){if(U[fe]===ie)return;Object.assign(U,{[fe]:ie}),D(U[Te.PARENT],fe,ie,X)}}}function R(K){let fe=null;return typeof e.nodeKey=="string"&&(fe=K[e.nodeKey]||er()),fe||K[Te.UUID]||er()}const P={[Te.IS_OPEN]:()=>!!e.expandAll,[Te.IS_CHECKED]:()=>!1,[Te.IS_MATCH]:()=>!1,[Te.IS_SELECTED]:(K,fe)=>Ld(K,e.selected,fe),[Te.IS_CACHED]:()=>!1,[Te.IS_ASYNC]:()=>null,[Te.IS_LOADING]:()=>!1};function I(K,fe,ie,X=void 0){let U=X;X===void 0&&typeof P[ie]=="function"&&(U=P[ie](fe,K));const B=Sa[ie];if(Object.prototype.hasOwnProperty.call(fe,B))return fe[B];const Y=(C==null?void 0:C.get(fe))??void 0;let Q;return Y&&(Q=Y[ie]),Q==null&&(Q=U),Q}function A(K,fe){if(!e.selectable)return!1;const ie=Ld(fe,e.selected,K);return I(K,fe,Te.IS_SELECTED,ie)}function k(K,fe,ie){var B;const X=I(K,fe,Te.IS_OPEN),U=$.has(ie)?(B=$.get(ie))==null?void 0:B[Te.IS_OPEN]:!0;return X&&U}function L(K,fe,ie){if(!Bp(e,{data:K,attributes:ie}))return!1;const U=Ld(K,e.checked,fe);return I(fe,K,Te.IS_CHECKED,U)}function F(K){return!((K==null?void 0:K[Te.IS_OPEN])??!1)}function Z(K,fe,ie,X){return K[Te.IS_INDETERMINATE]=(X[e.children]||[]).some(U=>{var B;return!(((B=$.get(U))==null?void 0:B[Te.IS_CHECKED])??!1)}),!0}function ae(K,fe=0,ie=null,X=null){const U=K.length;for(let B=0;B<U;B++){const Y=K[B];if(Array.isArray(Y))ae(Y,fe,ie,X);else if(typeof Y=="object"&&Y!==null){const Q=X!==null?`${X}-${B}`:`${B}`,ue=`${R(Y)}`,se=!!(Y[_]||[]).length;let we=I(ue,Y,Te.IS_OPEN);e.autoOpenParentNode?we&&D(ie,Te.IS_OPEN,!0,F):we=k(ue,Y,ie);const ne={[Te.DEPTH]:fe,[Te.INDEX]:B,[Te.UUID]:ue,[Te.PARENT]:ie,[Te.HAS_CHILD]:se,[Te.PATH]:Q,[Te.IS_ROOT]:ie===null,[Te.ORDER]:T,[Te.IS_SELECTED]:A(ue,Y),[Te.IS_MATCH]:I(ue,Y,Te.IS_MATCH),[Te.IS_OPEN]:we,[Te.IS_CHECKED]:void 0,[Te.IS_CACHED]:I(ue,Y,Te.IS_CACHED),[Te.IS_ASYNC]:I(ue,Y,Te.IS_ASYNC),[Te.IS_LOADING]:I(ue,Y,Te.IS_LOADING),[Te.IS_INDETERMINATE]:!1};ne[Te.IS_CHECKED]=L(Y,ue,ne),ne[Te.IS_CHECKED]&&x.push(Y),$.set(Y,ne),O.push(Y),T+=1,Object.prototype.hasOwnProperty.call(Y,_)&&ae(Y[_]||[],fe+1,Y,Q)}}}return ae(w??E),e.showCheckbox!==!1&&e.checkStrictly&&(x==null||x.forEach(K=>{D(K,Te.IS_CHECKED,!0,Z)})),[O,$]},n=t(),r=new Map,s=[],o=[],c=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),{asyncNodeClick:d,deepAutoOpen:u}=zp(e,c),h=w=>{s.push(w)},f=(w,C,E=!0)=>{E&&r.has(w)&&r.delete(w),r.set(w,C)},m=w=>typeof w=="function"?{type:"loop",fn:w}:typeof w=="object"&&typeof w.type=="string"&&typeof w.fn=="function"?w:(console.error("loop event error",w),null),p=w=>{const C=m(w);return C!==null&&Reflect.apply(C.fn,void 0,[]),(C==null?void 0:C.type)??"once"},y=()=>{Array.from(r.keys()).forEach(w=>{const C=r.get(w);if(Array.isArray(C)){const E=[];C.forEach((_,x)=>{p(_)==="once"&&E.unshift(x)}),E.length&&E.forEach(_=>C.splice(_,1)),C.length===0&&r.delete(w)}else p(C)==="once"&&r.delete(w)})};a.watch(()=>[e.data],w=>{var E,_;const C=t(w[0],c.schema);c.data=C[0],c.schema=C[1],(E=e.async)!=null&&E.callback&&((_=e.async)==null?void 0:_.deepAutoOpen)==="every"&&u(),y()},{deep:!0}),e.selectable&&a.onMounted(()=>{a.watch(()=>e.selected,w=>{o.length=0,s.forEach(C=>{Reflect.apply(C,void 0,[w]),o.push(()=>Reflect.apply(C,void 0,[w]))}),f("afterSelectWatch",o)},{immediate:!0})});const b=w=>{f("afterDataUpdate",w)};return(N=e.async)!=null&&N.callback&&u(),{flatData:c,asyncNodeClick:d,deepAutoOpen:u,afterDataUpdate:b,registerNextLoop:f,onSelected:h}},Up=Je(a.defineComponent({name:"Tree",props:EB,emits:TB,setup(e,t){const n=a.ref(),{flatData:r,onSelected:s,registerNextLoop:o}=FB(e),{checkNodeIsOpen:c,isRootNode:d,isNodeOpened:u,isNodeChecked:h,isNodeMatched:f,hasChildNode:m,getNodePath:p,getNodeId:y,getNodeAttr:b,getParentNode:N,getIntersectionResponse:w}=Od(r,e),{searchFn:C,isSearchActive:E,refSearch:_,isSearchDisabled:x,isTreeUI:O,showChildNodes:T}=RB(e),$=a.reactive([]),D=ne=>{if(E.value){if(T){const le=`${p(ne)??""}-`;return c(ne)&&(f(ne)||$.some(ge=>le.indexOf(`${ge}-`)===0))}return c(ne)&&f(ne)}return c(ne)},R=a.computed(()=>r.data.filter(ne=>D(ne))),{getLastVisibleElement:P,intersectionObserver:I}=LB(e),{renderTreeNode:A,handleTreeNodeClick:k,setOpen:L,setNodeAction:F,setSelect:Z,asyncNodeClick:ae,setNodeAttribute:K,isIndeterminate:fe}=PB(e,t,r,R,{registerNextLoop:o}),ie=Gi(120,()=>{$.length=0,r.data.forEach(ne=>{const ye=C(Hp(ne,e),ne);ye&&$.push(p(ne)),K(ne,[Te.IS_MATCH],[ye],O.value&&ye)})});x||a.watch([_],()=>{ie()},{deep:!0,immediate:!0}),a.onMounted(()=>{e.virtualRender&&a.nextTick(()=>{Y()})});const X=(ne,ye=!0,le=!1)=>{F(Ro(ne),Te.IS_CHECKED,ye),le&&t.emit(An.NODE_CHECKED,r.data.filter(ge=>h(ge)),r.data.filter(ge=>fe(ge)))};s(ne=>{Z(ne,!0,e.autoOpenParentNode,!0)});const U=()=>r;a.watch(()=>[e.checked],()=>{X(e.checked,!0)});const B=()=>{var ne;(ne=n.value)==null||ne.reset()},Y=ne=>{if(ne==null){n.value.fixToTop({index:1});return}if(e.nodeKey&&Object.prototype.hasOwnProperty.call(ne,e.nodeKey)){n.value.fixToTop({index:R.value.findIndex(le=>le[e.nodeKey]===ne[e.nodeKey])+1});return}if(ne.id!==void 0&&ne.id!==null){n.value.fixToTop({index:R.value.findIndex(le=>le[e.nodeKey]===ne.id)+1});return}if(ne.index>=0){n.value.fixToTop({index:ne.index});return}const ye=y(ne);if(ye){n.value.fixToTop({index:R.value.findIndex(le=>y(le)===ye)+1});return}};t.expose({handleTreeNodeClick:k,isNodeChecked:h,isRootNode:d,isNodeOpened:u,isNodeMatched:f,hasChildNode:m,setOpen:L,setChecked:X,setNodeAction:F,setNodeOpened:L,setSelect:Z,scrollToTop:Y,asyncNodeClick:ae,getData:U,reset:B,getNodeAttr:b,getParentNode:N});const{renderEmpty:Q}=OB(e);MB(e,t,n,r);const ue=ne=>{var le,ge;if(ne.length)return ne.map(j=>A(j,!E.value||O.value));const ye=E.value?"search-empty":"empty";return((ge=(le=t.slots).empty)==null?void 0:ge.call(le))??Q(ye)},se=([ne,ye,le])=>{var ge,j,ce,Ce;if(I.value.enabled&&ne.offset.y>5){if(!e.virtualRender){const z=P(ne.offset.y,n.value.refRoot),he=w(z[0]);(j=(ge=I.value)==null?void 0:ge.callback)==null||j.call(ge,he),t.emit(An.NODE_ENTER_VIEW,he);return}const oe=w(le.slice(-1)[0]);(Ce=(ce=I.value)==null?void 0:ce.callback)==null||Ce.call(ce,oe),t.emit(An.NODE_ENTER_VIEW,oe);return}},{resolveClassName:we}=xe();return()=>a.createVNode(ni,{ref:n,style:AB(null,e),height:e.height,class:we("tree"),contentClassName:we("container"),enabled:e.virtualRender,keepAlive:!0,lineHeight:e.lineHeight,list:R.value,rowKey:Te.UUID,throttleDelay:0,onContentScroll:se},{default:ne=>ue(ne.data||[])})}})),ss="upload";var qr=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(qr||{}),u2=(e=>(e.FORMDATA="formdata",e.BINARY="binary",e))(u2||{}),li=(e=>(e.FAIL="fail",e.NEW="new",e.SUCCESS="success",e.UPLOADING="uploading",e))(li||{});const jp=[qr.BUTTON,qr.DRAGGABLE,qr.PICTURE],Wp=[u2.FORMDATA,u2.BINARY],kr={type:{type:String,default:"formdata",validator:e=>!e||Wp.includes(e)?!0:(console.error(`invalid type, ${e}, the type must be one of 【${Wp.join(" | ")}】`),!1)},theme:{type:String,default:"draggable",validator:e=>!e||jp.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of 【${jp.join(" | ")}】`),!1)},files:{type:Array,default:()=>[]},name:{type:String,default:"upload_file"},multiple:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},autoUpload:{type:Boolean,default:!0},accept:{type:String},delayTime:{type:Number,default:0},url:{type:String,required:!1},method:{type:String,default:"post"},size:{type:[Number,Object],default(){return{maxFileSize:5,maxImgSize:1}}},handleResCode:{type:Function,default(e){return!!(e&&e.code===0)}},headers:{type:Object,default:()=>({})},header:{type:[Array,Object],default:()=>[]},tip:{type:String,default:""},validateName:{type:RegExp},withCredentials:{type:Boolean,default:!1},limit:Number,data:{type:[Array,Object],default:()=>[]},formDataAttributes:{type:[Array,Object],default:()=>[]},extCls:{type:String,default:""},customRequest:Function,selectChange:{type:Function},beforeUpload:{type:Function},beforeRemove:{type:Function},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10}};function Gp(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const HB=a.defineComponent({name:"UploadList",props:{theme:kr.theme,disabled:kr.disabled,files:kr.files,multiple:kr.multiple},emits:["remove","retry"],setup(e,{slots:t,emit:n}){const r=dt("upload"),{resolveClassName:s}=xe(),{theme:o,disabled:c,multiple:d}=a.toRefs(e),u=`${s(ss)}-list`,h=a.computed(()=>o.value===qr.PICTURE),f=a.computed(()=>h.value&&!d.value),m=a.computed(()=>Ue({[u]:!0,[`${u}--${o.value}`]:!0,[`${u}--disabled`]:c.value}));function p(x){const O=["Bytes","KB","MB","GB","TB"],T=Math.floor(Math.log(x)/Math.log(1024));return`${(x/1024**T).toFixed(2)}${O[T]}`}function y(x,O){n("remove",x,O)}function b(x,O){n("retry",x,O)}const N=()=>{let x;return a.createVNode(a.TransitionGroup,{name:`${u}__item`},Gp(x=e.files.map(O=>{const T=Ue({[`${u}__item`]:!0,[`${u}__item-picture`]:!0,[`${u}__item--${O.status}`]:!0});return a.createVNode("li",{key:O.uid,class:T},[t!=null&&t.file?t.file({file:O}):w(O)])}))?x:{default:()=>[x]})},w=x=>[a.withDirectives(a.createVNode("img",{class:`${u}__picture-item-thumbnail`,alt:"",src:x.url},null),[[a.vShow,x.status!=="uploading"]]),a.createVNode(a.Fragment,null,[x.status==="uploading"&&a.createVNode(ko,{width:50,class:`${u}__picture-item-progress`,bgColor:"#333",color:"#3a84ff",percent:x.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!c.value&&a.createVNode("div",{class:`${u}__picture-item-actions`},[a.createVNode(Rs,{class:"action-icon",onClick:O=>y(x,O)},null)])])],C=()=>{let x;return a.createVNode(a.TransitionGroup,{name:`${u}__item`},Gp(x=e.files.map(O=>{const T=Ue({[`${u}__item`]:!0,[`${u}__item--${O.status}`]:!0});return a.createVNode("li",{key:O.uid,class:T},[t!=null&&t.file?t.file({file:O}):_(O)])}))?x:{default:()=>[x]})},E=x=>{var P;const O=(P=x==null?void 0:x.raw)==null?void 0:P.type,[T]=(O==null?void 0:O.split("/"))||"";let D={text:Bs,image:tc,application:Bs,video:uc,audio:Ul}[T]||Bs;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(O)&&(D=Fl),a.h(D,{class:`${u}__item-file-icon`})},_=x=>[a.createVNode("div",{class:`${u}__item-icon`},[x.isPic?a.createVNode("img",{class:`${u}__item-thumbnail`,alt:"",src:x.url},null):E(x)]),a.createVNode("div",{class:`${u}__item-summary`},[a.createVNode("div",{class:`${u}__item-name`,title:x.name},[x.name]),x.status!=="uploading"&&a.createVNode("div",{class:`${u}__item-message`,title:x.statusText},[x.status==="success"&&a.createVNode(a.Fragment,null,[a.createVNode(ja,{class:`${u}__item-message-success-icon`},null),x.statusText||r.value.uploadSuccess]),x.status==="fail"&&a.createVNode(a.Fragment,null,[x.statusText||r.value.uploadFailed])]),x.status==="uploading"&&a.createVNode(ko,{class:`${u}__item-progress`,percent:x.percentage,showText:!1,size:"small"},null),x.status!=="fail"&&a.createVNode("div",{class:`${u}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${u}__item-speed-size`},[p(x.size)]),[[a.vShow,x.size]]),a.withDirectives(a.createVNode("span",{class:`${u}__item-speed-percentage`},[x.percentage,a.createTextVNode("%")]),[[a.vShow,x.status==="uploading"]])]),!c.value&&a.createVNode("div",{class:`${u}__item-actions`},[x.status==="fail"&&a.createVNode(ac,{class:`${u}__item-retry-icon`,onClick:O=>b(x,O)},null),a.createVNode(Rs,{class:`${u}__item-del-icon`,onClick:O=>y(x,O)},null)])])];return()=>{var x;return a.createVNode(a.Fragment,null,[f.value?(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger((x=e.files)==null?void 0:x[0])):a.createVNode("ul",{class:m.value},[h.value?N():C(),(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger())])])}}}),Kp=a.defineComponent({name:"UploadTrigger",props:{theme:kr.theme,disabled:kr.disabled,multiple:kr.multiple,accept:kr.accept,file:{type:Object},selectChange:kr.selectChange},emits:["change","remove"],setup(e,{slots:t,emit:n}){const r=dt("upload"),{resolveClassName:s}=xe(),{theme:o,disabled:c,file:d,multiple:u,accept:h}=a.toRefs(e),f=`${s(ss)}-trigger`,m=a.computed(()=>o.value===qr.BUTTON),p=a.computed(()=>o.value===qr.DRAGGABLE),y=a.computed(()=>o.value===qr.PICTURE),b=a.computed(()=>y.value&&!u.value),N=a.computed(()=>y.value&&!h.value?"image/png,image/jpeg,image/jpg":h.value),w=a.ref(null),C=a.computed(()=>{var L;return Ue({[f]:!0,[`${f}--${o.value}`]:!0,[`${f}--single-picture`]:b.value,[`${f}--has-file`]:d.value??!1,[`${f}--${(L=d.value)==null?void 0:L.status}`]:d.value??!1,[`${f}--dragover`]:$.value,[`${f}--disabled`]:c.value})}),E=()=>{w.value.value=null,w.value.click()},_=L=>{var Z;if(e.selectChange&&((Z=e.selectChange)==null?void 0:Z.call(e,L))===!1)return!1;const{files:F}=L.target;n("change",Array.from(F))},x=()=>{e.disabled||E()},O=L=>{L.defaultPrevented||L.target!==L.currentTarget||((L.code==="Enter"||L.code==="Space")&&E(),L.preventDefault())};function T(L,F){n("remove",L,F),F.stopPropagation(),F.preventDefault()}const $=a.ref(!1),D=()=>{const L=K=>{var ie;if(c.value)return;if(K.preventDefault(),$.value=!1,e.selectChange&&((ie=e.selectChange)==null?void 0:ie.call(e,K))===!1)return!1;const fe=Array.from(K.dataTransfer.files);n("change",fe)},F=K=>{K.preventDefault(),$.value=!0},Z=()=>{$.value=!1},ae=Ue({[`${f}__draggable`]:!0});return a.createVNode("div",{class:ae,onDragleave:Z,onDragover:F,onDrop:L},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(lo,{class:`${f}__draggable-icon`},null),a.createVNode("div",{class:`${f}__draggable-text`},[r.value.drapFileOr,a.createVNode("span",{class:`${f}__draggable-upload-link`},[r.value.clickUpload])])])])},R=()=>a.createVNode(a.Fragment,null,[b.value&&e.file?I(e.file):P()]),P=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${f}__picture-inner`},[a.createVNode(io,{class:`${f}__picture-icon`},null),a.createVNode("div",{class:`${f}__picture-text`},[r.value.clickUpload])])]),I=L=>[a.withDirectives(a.createVNode("img",{class:`${f}__picture-thumbnail`,alt:"",src:L.url},null),[[a.vShow,L.status!=="uploading"]]),a.createVNode(a.Fragment,null,[L.status==="uploading"&&a.createVNode(ko,{width:50,class:`${f}__picture-progress`,bgColor:"#333",color:"#3a84ff",percent:L.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${f}__picture-actions`},[a.createVNode(Rs,{class:"action-icon",onClick:F=>T(L,F)},null)])])],A=()=>a.createVNode(Rt,{disabled:c.value},{default:()=>[a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(lo,{class:`${f}__button-icon`},null),a.createVNode("span",{class:`${f}__button-text`},[r.value.uploadLabel])])])]}),k=()=>{if(m.value)return A();if(p.value)return D();if(y.value)return R()};return()=>{var L;return a.createVNode("div",{class:C.value,tabindex:"0",onClick:x,onKeydown:O},[t.trigger?[t.trigger(),(L=t==null?void 0:t.default)==null?void 0:L.call(t)]:k(),a.createVNode("input",{ref:w,class:`${f}__input-file`,accept:N.value,disabled:c.value,multiple:u.value,tabindex:"-1",type:"file",onChange:_},null)])}}});var Yp={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(n){var r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function s(C,E){var _=C[0],x=C[1],O=C[2],T=C[3];_+=(x&O|~x&T)+E[0]-680876936|0,_=(_<<7|_>>>25)+x|0,T+=(_&x|~_&O)+E[1]-389564586|0,T=(T<<12|T>>>20)+_|0,O+=(T&_|~T&x)+E[2]+606105819|0,O=(O<<17|O>>>15)+T|0,x+=(O&T|~O&_)+E[3]-1044525330|0,x=(x<<22|x>>>10)+O|0,_+=(x&O|~x&T)+E[4]-176418897|0,_=(_<<7|_>>>25)+x|0,T+=(_&x|~_&O)+E[5]+1200080426|0,T=(T<<12|T>>>20)+_|0,O+=(T&_|~T&x)+E[6]-1473231341|0,O=(O<<17|O>>>15)+T|0,x+=(O&T|~O&_)+E[7]-45705983|0,x=(x<<22|x>>>10)+O|0,_+=(x&O|~x&T)+E[8]+1770035416|0,_=(_<<7|_>>>25)+x|0,T+=(_&x|~_&O)+E[9]-1958414417|0,T=(T<<12|T>>>20)+_|0,O+=(T&_|~T&x)+E[10]-42063|0,O=(O<<17|O>>>15)+T|0,x+=(O&T|~O&_)+E[11]-1990404162|0,x=(x<<22|x>>>10)+O|0,_+=(x&O|~x&T)+E[12]+1804603682|0,_=(_<<7|_>>>25)+x|0,T+=(_&x|~_&O)+E[13]-40341101|0,T=(T<<12|T>>>20)+_|0,O+=(T&_|~T&x)+E[14]-1502002290|0,O=(O<<17|O>>>15)+T|0,x+=(O&T|~O&_)+E[15]+1236535329|0,x=(x<<22|x>>>10)+O|0,_+=(x&T|O&~T)+E[1]-165796510|0,_=(_<<5|_>>>27)+x|0,T+=(_&O|x&~O)+E[6]-1069501632|0,T=(T<<9|T>>>23)+_|0,O+=(T&x|_&~x)+E[11]+643717713|0,O=(O<<14|O>>>18)+T|0,x+=(O&_|T&~_)+E[0]-373897302|0,x=(x<<20|x>>>12)+O|0,_+=(x&T|O&~T)+E[5]-701558691|0,_=(_<<5|_>>>27)+x|0,T+=(_&O|x&~O)+E[10]+38016083|0,T=(T<<9|T>>>23)+_|0,O+=(T&x|_&~x)+E[15]-660478335|0,O=(O<<14|O>>>18)+T|0,x+=(O&_|T&~_)+E[4]-405537848|0,x=(x<<20|x>>>12)+O|0,_+=(x&T|O&~T)+E[9]+568446438|0,_=(_<<5|_>>>27)+x|0,T+=(_&O|x&~O)+E[14]-1019803690|0,T=(T<<9|T>>>23)+_|0,O+=(T&x|_&~x)+E[3]-187363961|0,O=(O<<14|O>>>18)+T|0,x+=(O&_|T&~_)+E[8]+1163531501|0,x=(x<<20|x>>>12)+O|0,_+=(x&T|O&~T)+E[13]-1444681467|0,_=(_<<5|_>>>27)+x|0,T+=(_&O|x&~O)+E[2]-51403784|0,T=(T<<9|T>>>23)+_|0,O+=(T&x|_&~x)+E[7]+1735328473|0,O=(O<<14|O>>>18)+T|0,x+=(O&_|T&~_)+E[12]-1926607734|0,x=(x<<20|x>>>12)+O|0,_+=(x^O^T)+E[5]-378558|0,_=(_<<4|_>>>28)+x|0,T+=(_^x^O)+E[8]-2022574463|0,T=(T<<11|T>>>21)+_|0,O+=(T^_^x)+E[11]+1839030562|0,O=(O<<16|O>>>16)+T|0,x+=(O^T^_)+E[14]-35309556|0,x=(x<<23|x>>>9)+O|0,_+=(x^O^T)+E[1]-1530992060|0,_=(_<<4|_>>>28)+x|0,T+=(_^x^O)+E[4]+1272893353|0,T=(T<<11|T>>>21)+_|0,O+=(T^_^x)+E[7]-155497632|0,O=(O<<16|O>>>16)+T|0,x+=(O^T^_)+E[10]-1094730640|0,x=(x<<23|x>>>9)+O|0,_+=(x^O^T)+E[13]+681279174|0,_=(_<<4|_>>>28)+x|0,T+=(_^x^O)+E[0]-358537222|0,T=(T<<11|T>>>21)+_|0,O+=(T^_^x)+E[3]-722521979|0,O=(O<<16|O>>>16)+T|0,x+=(O^T^_)+E[6]+76029189|0,x=(x<<23|x>>>9)+O|0,_+=(x^O^T)+E[9]-640364487|0,_=(_<<4|_>>>28)+x|0,T+=(_^x^O)+E[12]-421815835|0,T=(T<<11|T>>>21)+_|0,O+=(T^_^x)+E[15]+530742520|0,O=(O<<16|O>>>16)+T|0,x+=(O^T^_)+E[2]-995338651|0,x=(x<<23|x>>>9)+O|0,_+=(O^(x|~T))+E[0]-198630844|0,_=(_<<6|_>>>26)+x|0,T+=(x^(_|~O))+E[7]+1126891415|0,T=(T<<10|T>>>22)+_|0,O+=(_^(T|~x))+E[14]-1416354905|0,O=(O<<15|O>>>17)+T|0,x+=(T^(O|~_))+E[5]-57434055|0,x=(x<<21|x>>>11)+O|0,_+=(O^(x|~T))+E[12]+1700485571|0,_=(_<<6|_>>>26)+x|0,T+=(x^(_|~O))+E[3]-1894986606|0,T=(T<<10|T>>>22)+_|0,O+=(_^(T|~x))+E[10]-1051523|0,O=(O<<15|O>>>17)+T|0,x+=(T^(O|~_))+E[1]-2054922799|0,x=(x<<21|x>>>11)+O|0,_+=(O^(x|~T))+E[8]+1873313359|0,_=(_<<6|_>>>26)+x|0,T+=(x^(_|~O))+E[15]-30611744|0,T=(T<<10|T>>>22)+_|0,O+=(_^(T|~x))+E[6]-1560198380|0,O=(O<<15|O>>>17)+T|0,x+=(T^(O|~_))+E[13]+1309151649|0,x=(x<<21|x>>>11)+O|0,_+=(O^(x|~T))+E[4]-145523070|0,_=(_<<6|_>>>26)+x|0,T+=(x^(_|~O))+E[11]-1120210379|0,T=(T<<10|T>>>22)+_|0,O+=(_^(T|~x))+E[2]+718787259|0,O=(O<<15|O>>>17)+T|0,x+=(T^(O|~_))+E[9]-343485551|0,x=(x<<21|x>>>11)+O|0,C[0]=_+C[0]|0,C[1]=x+C[1]|0,C[2]=O+C[2]|0,C[3]=T+C[3]|0}function o(C){var E=[],_;for(_=0;_<64;_+=4)E[_>>2]=C.charCodeAt(_)+(C.charCodeAt(_+1)<<8)+(C.charCodeAt(_+2)<<16)+(C.charCodeAt(_+3)<<24);return E}function c(C){var E=[],_;for(_=0;_<64;_+=4)E[_>>2]=C[_]+(C[_+1]<<8)+(C[_+2]<<16)+(C[_+3]<<24);return E}function d(C){var E=C.length,_=[1732584193,-271733879,-1732584194,271733878],x,O,T,$,D,R;for(x=64;x<=E;x+=64)s(_,o(C.substring(x-64,x)));for(C=C.substring(x-64),O=C.length,T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x=0;x<O;x+=1)T[x>>2]|=C.charCodeAt(x)<<(x%4<<3);if(T[x>>2]|=128<<(x%4<<3),x>55)for(s(_,T),x=0;x<16;x+=1)T[x]=0;return $=E*8,$=$.toString(16).match(/(.*?)(.{0,8})$/),D=parseInt($[2],16),R=parseInt($[1],16)||0,T[14]=D,T[15]=R,s(_,T),_}function u(C){var E=C.length,_=[1732584193,-271733879,-1732584194,271733878],x,O,T,$,D,R;for(x=64;x<=E;x+=64)s(_,c(C.subarray(x-64,x)));for(C=x-64<E?C.subarray(x-64):new Uint8Array(0),O=C.length,T=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x=0;x<O;x+=1)T[x>>2]|=C[x]<<(x%4<<3);if(T[x>>2]|=128<<(x%4<<3),x>55)for(s(_,T),x=0;x<16;x+=1)T[x]=0;return $=E*8,$=$.toString(16).match(/(.*?)(.{0,8})$/),D=parseInt($[2],16),R=parseInt($[1],16)||0,T[14]=D,T[15]=R,s(_,T),_}function h(C){var E="",_;for(_=0;_<4;_+=1)E+=r[C>>_*8+4&15]+r[C>>_*8&15];return E}function f(C){var E;for(E=0;E<C.length;E+=1)C[E]=h(C[E]);return C.join("")}f(d("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function C(E,_){return E=E|0||0,E<0?Math.max(E+_,0):Math.min(E,_)}ArrayBuffer.prototype.slice=function(E,_){var x=this.byteLength,O=C(E,x),T=x,$,D,R,P;return _!==n&&(T=C(_,x)),O>T?new ArrayBuffer(0):($=T-O,D=new ArrayBuffer($),R=new Uint8Array(D),P=new Uint8Array(this,O,$),R.set(P),D)}}();function m(C){return/[\u0080-\uFFFF]/.test(C)&&(C=unescape(encodeURIComponent(C))),C}function p(C,E){var _=C.length,x=new ArrayBuffer(_),O=new Uint8Array(x),T;for(T=0;T<_;T+=1)O[T]=C.charCodeAt(T);return E?O:x}function y(C){return String.fromCharCode.apply(null,new Uint8Array(C))}function b(C,E,_){var x=new Uint8Array(C.byteLength+E.byteLength);return x.set(new Uint8Array(C)),x.set(new Uint8Array(E),C.byteLength),_?x:x.buffer}function N(C){var E=[],_=C.length,x;for(x=0;x<_-1;x+=2)E.push(parseInt(C.substr(x,2),16));return String.fromCharCode.apply(String,E)}function w(){this.reset()}return w.prototype.append=function(C){return this.appendBinary(m(C)),this},w.prototype.appendBinary=function(C){this._buff+=C,this._length+=C.length;var E=this._buff.length,_;for(_=64;_<=E;_+=64)s(this._hash,o(this._buff.substring(_-64,_)));return this._buff=this._buff.substring(_-64),this},w.prototype.end=function(C){var E=this._buff,_=E.length,x,O=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],T;for(x=0;x<_;x+=1)O[x>>2]|=E.charCodeAt(x)<<(x%4<<3);return this._finish(O,_),T=f(this._hash),C&&(T=N(T)),this.reset(),T},w.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},w.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},w.prototype.setState=function(C){return this._buff=C.buff,this._length=C.length,this._hash=C.hash,this},w.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},w.prototype._finish=function(C,E){var _=E,x,O,T;if(C[_>>2]|=128<<(_%4<<3),_>55)for(s(this._hash,C),_=0;_<16;_+=1)C[_]=0;x=this._length*8,x=x.toString(16).match(/(.*?)(.{0,8})$/),O=parseInt(x[2],16),T=parseInt(x[1],16)||0,C[14]=O,C[15]=T,s(this._hash,C)},w.hash=function(C,E){return w.hashBinary(m(C),E)},w.hashBinary=function(C,E){var _=d(C),x=f(_);return E?N(x):x},w.ArrayBuffer=function(){this.reset()},w.ArrayBuffer.prototype.append=function(C){var E=b(this._buff.buffer,C,!0),_=E.length,x;for(this._length+=C.byteLength,x=64;x<=_;x+=64)s(this._hash,c(E.subarray(x-64,x)));return this._buff=x-64<_?new Uint8Array(E.buffer.slice(x-64)):new Uint8Array(0),this},w.ArrayBuffer.prototype.end=function(C){var E=this._buff,_=E.length,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],O,T;for(O=0;O<_;O+=1)x[O>>2]|=E[O]<<(O%4<<3);return this._finish(x,_),T=f(this._hash),C&&(T=N(T)),this.reset(),T},w.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},w.ArrayBuffer.prototype.getState=function(){var C=w.prototype.getState.call(this);return C.buff=y(C.buff),C},w.ArrayBuffer.prototype.setState=function(C){return C.buff=p(C.buff,!0),w.prototype.setState.call(this,C)},w.ArrayBuffer.prototype.destroy=w.prototype.destroy,w.ArrayBuffer.prototype._finish=w.prototype._finish,w.ArrayBuffer.hash=function(C,E){var _=u(new Uint8Array(C)),x=f(_);return E?N(x):x},w})})(Yp);var BB=Yp.exports;const Xp=jt(BB);function f2(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const zB=e=>{if(typeof XMLHttpRequest>"u")throw new Error("XMLHttpRequest is undefined");const t=new XMLHttpRequest,{action:n,type:r}=e,s=r==="formdata";t.upload&&t.upload.addEventListener("progress",d=>{const u=d;u.percent=d.total>0?d.loaded/d.total*100:0,e.onProgress(u)});const o=new FormData;if(s&&e.data){let d=e.data;Array.isArray(d)||(d=[d]),d.forEach(u=>{for(const[h,f]of Object.entries(u))Array.isArray(f)?o.append(h,...f):o.append(h,f)})}if(s&&e.formDataAttributes){let d=e.formDataAttributes;Array.isArray(d)||(d=[d]),d.forEach(u=>{Array.isArray(u.value)?o.append(u.name,...u.value):o.append(u.name,u.value)})}if(s&&o.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(new Error("An error occurred during upload"))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(f2(t))}),t.addEventListener("loadend",()=>{e.onComplete()}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0),e.header)if(Array.isArray(e.header))e.header.forEach(d=>{const u=d.name,h=d.value;t.setRequestHeader(u,h)});else{const d=e.header.name,u=e.header.value;t.setRequestHeader(d,u)}const c=e.headers||{};if(c instanceof Headers)c.forEach((d,u)=>t.setRequestHeader(u,d));else for(const[d,u]of Object.entries(c))Ih(u)||t.setRequestHeader(d,String(u));return t.send(s?o:e.file),t},qp=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,UB=async e=>{const t=e.chunkSize*1024*1024,{file:n}=e;if(!n)throw new Error("File not found");const r=Math.ceil(n.size/t),s=await WB(n,t),o=[];jB(e,n,r,s,o,t),await Promise.all(o).then(()=>{const c={size:n.size,name:n.name,total:r,hash:s},d=new XMLHttpRequest;d.open(e.method,e.mergeUrl,!0),d.onreadystatechange=()=>{if(d.readyState===4){if(d.status<200||d.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(f2(d))}},d.onloadend=()=>{e.onComplete()},d.setRequestHeader("Content-type","application/JSON"),d.send(JSON.stringify(c))})},jB=(e,t,n,r,s,o)=>{for(let c=0;c<n;c++){const d=new Promise((u,h)=>{const f=c*o,m=Math.min(t.size,f+o),p=new FormData;if(e.data){let N=e.data;Array.isArray(N)||(N=[N]),N.forEach(w=>{for(const[C,E]of Object.entries(w))Array.isArray(E)?p.append(C,...E):p.append(C,E)})}if(e.formDataAttributes){let N=e.formDataAttributes;Array.isArray(N)||(N=[N]),N.forEach(w=>{Array.isArray(w.value)?p.append(w.name,...w.value):p.append(w.name,w.value)})}p.append("file",qp.call(t,f,m)),p.append("name",t.name),p.append("total",n.toString()),p.append("index",c.toString()),p.append("size",t.size.toString()),p.append("hash",r.toString());const y=new XMLHttpRequest;if(y.onreadystatechange=()=>{if(y.readyState===4){const N=f2(y);y.status<200||y.status>=300?(h(N),e.onError(new Error("An error occurred during upload"))):u("reponseText")}},y.upload.addEventListener("progress",N=>{const w=N;e.onProgress(w,c)},!1),e.withCredentials&&"withCredentials"in y&&(y.withCredentials=!0),y.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(N=>{const w=N.name,C=N.value;y.setRequestHeader(w,C)});else{const N=e.header.name,w=e.header.value;y.setRequestHeader(N,w)}const b=e.headers||{};if(b instanceof Headers)b.forEach((N,w)=>y.setRequestHeader(w,N));else for(const[N,w]of Object.entries(b))Ih(w)||y.setRequestHeader(N,String(w));y.send(p)});s.push(d)}},WB=(e,t)=>new Promise((n,r)=>{const s=Math.ceil(e.size/t);let o=0;const c=new Xp.ArrayBuffer,d=new FileReader;function u(){const h=o*t,f=h+t>=e.size?e.size:h+t;d.readAsArrayBuffer(qp.call(e,h,f))}d.onload=h=>{if(c.append(h.target.result),o+=1,o<s)u();else{const f=c.end(),m=new Xp;m.append(f),m.append(e.name);const p=m.end();n(p)}},d.onerror=()=>{r(new Error("File slcie failed"))},u()}).catch(n=>{console.log(n)});function Jp(e){return Date.now()+e}const GB=(e,t)=>{const n=a.computed(()=>{var p;return typeof e.size=="number"?e.size:(p=e==null?void 0:e.size)==null?void 0:p.maxImgSize}),r=a.computed(()=>{var p;return typeof e.size=="number"?e.size:(p=e==null?void 0:e.size)==null?void 0:p.maxImgSize}),s=a.ref([]);function o(p){return s.value.find(y=>y.uid===p.uid)}let c=0;function d(p){var w;c+=1,p.uid=Jp(c);const y={uid:p.uid,name:p.name,status:li.NEW,size:p.size,raw:p},b=p.type.startsWith("image/");let N=null;if(b){try{y.url=window.URL.createObjectURL(p)}catch(C){console.error(C)}y.isPic=!0}return e.validateName&&!((w=e.validateName)!=null&&w.test(y.name))&&(y.status=li.FAIL,y.statusText="invalid filename",N=new Error(y.statusText)),b&&p.size>n.value*1024**2&&(y.status=li.FAIL,y.statusText="invalid file size",N=new Error(y.statusText)),!b&&p.size>r.value*1024**2&&(y.status=li.FAIL,y.statusText="invalid file size",N=new Error(y.statusText)),s.value.push(y),N}async function u(p){var N;const y=p instanceof File?o(p):p,b=w=>{var C;t.onRemove(w,s.value),s.value.splice(s.value.indexOf(y),1),(C=w.url)!=null&&C.startsWith("blob:")&&URL.revokeObjectURL(w.url)};e.beforeRemove?await((N=e.beforeRemove)==null?void 0:N.call(e,y,s.value))!==!1&&b(y):b(y)}async function h(p,y,b){const N=o(y);N&&(N.status="fail",N.statusText=p.message,N.response=b)}async function f(p,y){const b=o(y);b&&(b.status="success",b.response=p)}async function m(p,y){const b=o(y);b&&(b.status="uploading",b.percentage=Math.round(p.percent))}return a.watch(()=>e.files,p=>{s.value=p.map(y=>(c+=1,{...y,uid:y.uid??Jp(c),status:y.status??li.SUCCESS}))},{immediate:!0,deep:!0}),{fileList:s,handlePreprocess:d,handleRemove:u,handleError:h,handleSuccess:f,handleProgress:m}},Zp=Je(a.defineComponent({name:"Upload",props:kr,emits:["exceed","progress","success","error","delete","done"],setup(e,{slots:t,emit:n,expose:r}){const{resolveClassName:s}=xe(),o=a.shallowRef({}),c=a.computed(()=>e.theme===qr.PICTURE),d=a.computed(()=>c.value&&!e.multiple),u=a.computed(()=>Ue({[`${s(ss)}`]:!0,[`${s(ss)}--${e.theme}`]:!0,[`${s(ss)}--disabled`]:e.disabled,[`${s(ss)}--single-picture`]:d.value,[e.extCls]:e.extCls??!1})),h=a.computed(()=>({theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept,selectChange:e.selectChange}));function f(T,$){O(T),n("delete",T,$)}const{fileList:m,handlePreprocess:p,handleRemove:y,handleProgress:b,handleSuccess:N,handleError:w}=GB(e,{onRemove:f});function C(T){if(!T.length)return;if(e.limit>1&&m.value.length+T.length>e.limit){n("exceed",T,m.value);return}!e.multiple&&e.limit===1&&(m.value=[]);let $=T;(!e.multiple||e.limit===1)&&($=T.slice(0,1));for(const D of $){const R=D,P=p(R);if(P){n("error",R,m.value,P);return}e.autoUpload&&_(R,$)}}function E(T){x(T.raw)}async function _(T,$){var R;if(!e.beforeUpload)return x(T,$);let D;try{D=await((R=e.beforeUpload)==null?void 0:R.call(e,T))}catch{D=!1}if(D===!1){y(T);return}x(T,$)}function x(T,$){const{type:D,headers:R,header:P,data:I,formDataAttributes:A,method:k,withCredentials:L,name:F,url:Z,sliceUrl:ae,mergeUrl:K,chunkSize:fe,customRequest:ie}=e,{uid:X}=T,U={type:D,headers:R,header:P,withCredentials:L,file:T,data:I,formDataAttributes:A,method:k,filename:F,action:Z,sliceUrl:ae,mergeUrl:K,chunkSize:fe,onProgress:Q=>{b(Q,T),n("progress",Q,T,m.value)},onSuccess:Q=>{var se;const ue=Q;if((se=e==null?void 0:e.handleResCode)!=null&&se.call(e,ue))N(Q,T),n("success",Q,T,m.value);else{const we=new Error((ue==null?void 0:ue.message)||"unknow error");w(we,T,Q),n("error",T,m.value,we)}delete o.value[X]},onError:Q=>{w(Q,T),n("error",T,m.value,Q),delete o.value[X]},onComplete:()=>{$&&$.indexOf(T)===$.length-1&&n("done",m.value)}};let B=e.sliceUpload?UB:zB;ie&&(B=ie);const Y=B(U);o.value[X]=Y,Y instanceof Promise&&Y.then(U.onSuccess,U.onError)}function O(T){let $=o.value;T&&($={[T.uid]:o.value[T.uid]}),Object.keys($).forEach(D=>{if($[D]instanceof XMLHttpRequest){const R=$[D];R==null||R.abort()}delete o.value[D]})}return a.onBeforeUnmount(()=>{m.value.forEach(({url:T})=>{T!=null&&T.startsWith("blob:")&&URL.revokeObjectURL(T)})}),r({handleRemove:y,handleRetry:E}),()=>a.createVNode("div",{class:u.value},[!c.value&&a.createVNode(Kp,a.mergeProps(h.value,{onChange:C}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${s(ss)}__tip`},[e.tip]),a.createVNode(HB,{disabled:e.disabled,files:m.value,multiple:e.multiple,theme:e.theme,onRemove:y,onRetry:E},{innerTrigger:T=>c.value&&a.createVNode(Kp,a.mergeProps(h.value,{file:T,onChange:C,onRemove:y}),t),file:t.file})])}})),h2=Object.freeze(Object.defineProperty({__proto__:null,$bkPopover:wc,Affix:y1,Alert:w1,AnimateNumber:C1,Backtop:N1,Badge:x1,Breadcrumb:S1,Button:Rt,Card:x6,Cascader:P6,Checkbox:hn,CodeDiff:t9,Collapse:r9,ColorPicker:m9,ConfigProvider:v1,Container:Ic,DatePicker:W9,Dialog:vm,Divider:ym,Dropdown:bm,Exception:Kc,FixedNavbar:Cm,Form:Vm,InfoBox:km,Input:va,Link:Pm,Loading:da,Menu:Bm,Message:Zm,Modal:Lo,Navigation:eg,Notify:ng,OverflowTitle:C6,Pagination:q0,PopConfirm:Vg,Popover:Tn,Popover2:Dg,Process:kg,Progress:ko,Radio:od,Rate:Fg,ResizeLayout:Hg,SearchSelect:Xg,Select:X0,Sideslider:Jg,Slider:Qg,Steps:np,Swiper:rp,Switcher:ap,Tab:cp,Table:$p,Tag:po,TagInput:Dp,TimeLine:Ed,TimePicker:kp,Timeline:Ed,Transfer:Ip,Tree:Up,Upload:Zp,VirtualRender:ni,containerProps:Ic,scrollbar:G0},Symbol.toStringTag,{value:"Module"})),Qp=(e="Bk")=>(t,n)=>{const r=t.config.globalProperties.bkUIPrefix||e;Object.keys(h2).forEach(s=>{const o=h2[s];"install"in o?t.use(o,{prefix:r}):t.component(r+s,h2[s])}),n&&tf(n,t)},KB={createInstall:Qp,install:Qp()},YB=Object.freeze(Object.defineProperty({__proto__:null,$bkPopover:wc},Symbol.toStringTag,{value:"Module"})),e4="2.0.1-beta.51";window.__bkui_vue_version__=e4,De.$bkPopover=wc,De.Affix=y1,De.Alert=w1,De.AnimateNumber=C1,De.Backtop=N1,De.Badge=x1,De.Breadcrumb=S1,De.Button=Rt,De.Card=x6,De.Cascader=P6,De.Checkbox=hn,De.CodeDiff=t9,De.Collapse=r9,De.ColorPicker=m9,De.ConfigProvider=v1,De.Container=Ic,De.DatePicker=W9,De.Dialog=vm,De.Divider=ym,De.Dropdown=bm,De.Exception=Kc,De.FixedNavbar=Cm,De.Form=Vm,De.InfoBox=km,De.Input=va,De.Link=Pm,De.Loading=da,De.Menu=Bm,De.Message=Zm,De.Modal=Lo,De.Navigation=eg,De.Notify=ng,De.OverflowTitle=C6,De.Pagination=q0,De.PopConfirm=Vg,De.Popover=Tn,De.Popover2=Dg,De.Process=kg,De.Progress=ko,De.Radio=od,De.Rate=Fg,De.ResizeLayout=Hg,De.SearchSelect=Xg,De.Select=X0,De.Sideslider=Jg,De.Slider=Qg,De.Steps=np,De.Swiper=rp,De.Switcher=ap,De.Tab=cp,De.Table=$p,De.Tag=po,De.TagInput=Dp,De.TimeLine=Ed,De.TimePicker=kp,De.Timeline=Ed,De.Transfer=Ip,De.Tree=Up,De.Upload=Zp,De.VirtualRender=ni,De.bkEllipsis=cE,De.bkEllipsisInstance=Gf,De.bkTooltips=pa,De.clickoutside=br,De.containerProps=Ic,De.default=KB,De.defaultRootConfig=Ua,De.mousewheel=NE,De.overflowTitle=LE,De.plugins=YB,De.provideGlobalConfig=tf,De.rootProviderKey=Ds,De.scrollbar=G0,De.setPrefixVariable=ef,De.useGlobalConfig=o_,De.useLocale=dt,De.usePrefix=xe,De.version=e4,Object.defineProperties(De,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|