bkui-vue 2.0.2-beta.56 → 2.0.2-beta.58
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 +3 -3
- package/dist/index.umd.js +2 -2
- package/lib/index.js +1 -1
- package/lib/input/index.js +5 -2
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
@@ -40,7 +40,7 @@ ${ho(n)}`),r}})}function O8(e){const t=Object.keys(e),n=t.filter(s=>{var i;retur
|
|
40
40
|
z-index:-1000 !important;
|
41
41
|
top:0 !important;
|
42
42
|
right:0 !important;
|
43
|
-
`,iC=["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 oC(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:iC.map(o=>`${o}:${t.getPropertyValue(o)}`).join(";"),paddingSize:r,borderSize:s,boxSizing:n}}function y1(e,t=1,n){var f;Jt||(Jt=document.createElement("textarea"),document.body.appendChild(Jt));const{paddingSize:r,borderSize:s,boxSizing:i,contextStyle:o}=oC(e);Jt.setAttribute("style",`${o};${sC}`),Jt.value=e.value||e.placeholder||"";let l=Jt.scrollHeight;const c={};i==="border-box"?l=l+s:i==="content-box"&&(l=l-r),Jt.value="";const d=Jt.scrollHeight-r;if(Number.isInteger(t)){let u=d*t;i==="border-box"&&(u=u+r+s),l=Math.max(u,l),c.minHeight=`${u}px`}if(Number.isInteger(n)){let u=d*n;i==="border-box"&&(u=u+r+s),l=Math.min(u,l)}return c.height=`${l}px`,(f=Jt.parentNode)==null||f.removeChild(Jt),Jt=void 0,c}const lC={type:m.string.def("text"),clearable:m.bool,disabled:m.bool,readonly:m.bool,placeholder:m.string.def(""),prefixIcon:m.string,suffixIcon:m.string,suffix:m.string,prefix:m.string,step:m.number,max:m.number,min:m.number,maxlength:m.number,maxcharacter:m.number,behavior:d0(),showWordLimit:m.bool,showControl:m.bool.def(!0),showClearOnlyHover:m.bool.def(!0),precision:m.number.def(0).validate(e=>e>=0&&e<20),modelValue:m.oneOfType([m.string,m.number]),size:m.size(),rows:m.number,selectReadonly:m.bool.def(!1),withValidate:m.bool.def(!0),overMaxLengthLimit:m.bool.def(!1),showOverflowTooltips:m.bool.def(!0),tooltipsOptions:{type:Object,default:()=>({})},resize:m.bool.def(!0),autosize:m.oneOfType([Boolean,Object]).def(!1),stopPropagation:m.bool.def(!0)};let Re=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 Nr(e,t){return!0}function cC(e,t){return!0}function Eu(e){return e}const uC={[Re.UPDATE]:Nr,[Re.FOCUS]:e=>e,[Re.BLUR]:e=>e,[Re.CHANGE]:Nr,[Re.CLEAR]:()=>!0,[Re.INPUT]:Nr,[Re.KEYPRESS]:Nr,[Re.KEYDOWN]:Nr,[Re.KEYUP]:Nr,[Re.ENTER]:Nr,[Re.PASTE]:cC,[Re.COMPOSITIONSTART]:Eu,[Re.COMPOSITIONUPDATE]:Eu,[Re.COMPOSITIONEND]:Eu},dC=a.defineComponent({name:"Input",directives:{bkTooltips:Dn},inheritAttrs:!1,props:lC,emits:uC,setup(e,t){const{resolveClassName:n}=he(),r=on(),s=Be("input"),i=a.ref(!1),o=a.ref(!1),l=a.computed(()=>e.type==="textarea"),c=a.computed(()=>l.value?n("textarea"):n("input")),{class:d,style:f,...u}=t.attrs,h=a.ref(),p=a.ref(typeof e.modelValue>"u"||e.modelValue===null?{}:{value:e.modelValue}),g=a.computed(()=>Ae({[`${c.value}--${e.size}`]:!!e.size,resizable:e.resize,"is-focused":i.value,"is-readonly":e.readonly&&!e.selectReadonly,"is-disabled":e.disabled,"is-simplicity":e.behavior==="simplicity",[`${t.attrs.class}`]:!!t.attrs.class},c.value)),v=a.ref(!1),b=a.ref(),y=oe("suffix-icon"),N={search:()=>a.createVNode(jr,null,null),password:()=>a.createVNode(tl,{class:y,onClick:pe},null)},w=a.computed(()=>{const ie=N[e.type];return x.value?a.createVNode(_a,{class:y,onClick:pe},null):ie?a.createVNode(ie,{class:y},null):null}),C=a.computed(()=>e.type==="number"),S=a.computed(()=>Math.floor(e.maxlength??e.maxcharacter??0)),x=a.ref(!1),E=a.computed(()=>Ae({"show-clear-only-hover":e.showClearOnlyHover,[`${c.value}--clear-icon`]:!0},y)),T=a.computed(()=>Ae({[oe("max-length")]:!0,"is-over-limit":S.value-V.value<0})),O=ie=>typeof e.maxcharacter=="number"?ie.split("").reduce((F,K,W)=>(F.len+=K.charCodeAt(0)>255?2:1,F.len>e.maxcharacter&&F.pos===-1&&(F.pos=W),F),{len:0,pos:-1}):{len:ie.length,pos:-1},V=a.computed(()=>{const ie=e.modelValue??"";return O(ie).len}),_=a.computed(()=>Ae({"is-disabled":e.disabled||e.modelValue>=e.max})),L=a.computed(()=>Ae({"is-disabled":e.disabled||e.modelValue<=e.min})),I=a.computed(()=>{var ie;return R.value&&S.value-V.value===0?{content:s.value.maxlengthLimitTips,...e.tooltipsOptions||{}}:e.showOverflowTooltips&&v.value&&e.modelValue?{content:(ie=e.modelValue)==null?void 0:ie.toString(),sameWidth:!0,...e.tooltipsOptions||{}}:{disabled:!0,...e.tooltipsOptions||{}}}),R=a.computed(()=>typeof e.maxlength=="number"||typeof e.maxcharacter=="number");a.watch(()=>e.type,()=>{a.nextTick(M)}),a.watch(()=>e.modelValue,ie=>{var F;e.withValidate&&((F=r==null?void 0:r.validate)==null||F.call(r,"change")),p.value={value:ie},a.nextTick(M)}),a.onMounted(()=>{var ie,F;a.nextTick(M),Object.prototype.hasOwnProperty.call(t.attrs,"autofocus")&&((F=(ie=h.value)==null?void 0:ie.focus)==null||F.call(ie))}),t.expose({focus(){h.value.focus()},blur(){h.value.blur(),i.value=!1},clear:P});function M(){j(),A()}function j(){var F,K,W;const ie=((F=h.value)==null?void 0:F.offsetParent)===null;if(!(!l.value||ie||e.resize))if(e.autosize){const q=(K=e.autosize)==null?void 0:K.minRows,se=(W=e.autosize)==null?void 0:W.maxRows,fe=y1(h.value,q,se);b.value={overflowY:"hidden",...fe},a.nextTick(()=>{b.value=fe})}else b.value={minHeight:y1(h.value).minHeight}}function H(){var ie,F;return((ie=h.value)==null?void 0:ie.scrollWidth)>((F=h.value)==null?void 0:F.clientWidth)+2}function A(){setTimeout(()=>{v.value=H()})}function P(){if(e.disabled)return;const ie=C.value?e.min:"";t.emit(Re.UPDATE,ie,null),t.emit(Re.CHANGE,ie,null),t.emit(Re.CLEAR)}function B(ie){i.value=!0,t.emit(Re.FOCUS,ie)}function z(ie){var F;i.value=!1,t.emit(Re.BLUR,ie),e.withValidate&&((F=r==null?void 0:r.validate)==null||F.call(r,"blur"))}function D(ie){return F=>{if(e.stopPropagation&&F.stopPropagation(),R.value&&!e.overMaxLengthLimit){const K=O(F.target.value);if(K.len>=S.value&&(ie===Re.KEYDOWN||ie===Re.INPUT)&&!o.value){const W=K.pos>0?F.target.value.slice(0,K.pos):F.target.value;p.value={value:W},t.emit(Re.UPDATE,W,F),t.emit(Re.INPUT,W,F);return}}if(ie===Re.KEYDOWN&&(F.code==="Enter"||F.key==="Enter"||F.keyCode===13)&&t.emit(Re.ENTER,C.value?X(F.target.value,0):F.target.value,F),!(o.value&&[Re.INPUT,Re.CHANGE,Re.KEYDOWN].some(K=>ie===K))){if(ie===Re.INPUT)t.emit(Re.UPDATE,C.value?(()=>{const K=Number.isInteger(e.precision)?e.precision:0,W=F.target.value;return W===""||W===null||W===void 0||Number.isNaN(W)?ae(e.min)?e.min:0:(+W).toFixed(K)})():F.target.value,F);else if(ie===Re.CHANGE&&C.value&&F.target.value!==""){const K=X(F.target.value,0);t.emit(Re.UPDATE,K,F),t.emit(ie,K,F);return}t.emit(ie,C.value?X(F.target.value,0):F.target.value,F)}}}const[k,G,U,te,$,Q]=[Re.KEYUP,Re.KEYDOWN,Re.KEYPRESS,Re.PASTE,Re.CHANGE,Re.INPUT].map(D);function ne(){o.value=!0}function le(ie){o.value=!1,Q(ie)}function ae(ie){return typeof ie=="number"&&!Number.isNaN(ie)}function X(ie,F,K=!0){const W=Number(F),q=ae(W)?W:1,se=Number.isInteger(e.precision)?e.precision:0,fe=Number(ie);if(Number.isNaN(fe))return ae(e.min)?e.min:0;let ee=fe+(K?q:-1*q);return ae(e.max)&&(ee=Math.min(ee,e.max)),ae(e.min)&&(ee=Math.max(ee,e.min)),+ee.toFixed(se)}function J(ie){if(e.disabled)return;const F=X(e.modelValue,e.step);t.emit(Re.UPDATE,F,ie),t.emit(Re.CHANGE,F,ie)}function Y(ie){if(e.disabled)return;const F=X(e.modelValue,e.step,!1);t.emit(Re.UPDATE,F,ie),t.emit(Re.CHANGE,F,ie)}function oe(ie){return`${c.value}--${ie}`}function pe(){x.value=!x.value}const Z=a.computed(()=>({maxlength:!e.overMaxLengthLimit&&e.maxlength,placeholder:e.placeholder||s.value.placeholder,readonly:e.readonly,disabled:e.disabled})),ce={onInput:Q,onFocus:B,onBlur:z,onPaste:te,onChange:$,onKeypress:U,onKeydown:G,onKeyup:k,onCompositionstart:ne,onCompositionend:le};return()=>{var ie,F,K,W;return a.withDirectives(a.createVNode("div",{style:f,class:g.value},[((F=(ie=t.slots)==null?void 0:ie.prefix)==null?void 0:F.call(ie))??(e.prefix&&a.createVNode("div",{class:oe("prefix-area")},[a.createVNode("span",{class:oe("prefix-area--text")},[e.prefix])])),l.value?a.createVNode("textarea",a.mergeProps({ref:h,spellcheck:!1},u,ce,Z.value,{style:b.value,rows:e.rows},p.value),null):a.createVNode("input",a.mergeProps({spellcheck:!1},u,{ref:h,class:`${c.value}--text`,max:e.max,min:e.min,step:e.step,type:x.value&&e.type==="password"?"text":e.type},ce,Z.value,p.value),null),e.clearable&&!!e.modelValue&&a.createVNode("span",{class:E.value,onClick:P},[a.createVNode(Vt,null,null)]),w.value,R.value&&(e.showWordLimit||l.value)&&a.createVNode("p",{class:T.value},[e.overMaxLengthLimit?S.value-V.value:a.createVNode(a.Fragment,null,[V.value,a.createTextVNode(" / "),a.createVNode("span",null,[S.value])])]),C.value&&e.showControl&&a.createVNode("div",{class:oe("number-control")},[a.createVNode(ms,{class:_.value,onClick:J},null),a.createVNode(ms,{class:L.value,onClick:Y},null)]),((W=(K=t.slots)==null?void 0:K.suffix)==null?void 0:W.call(K))??(e.suffix&&a.createVNode("div",{class:oe("suffix-area")},[a.createVNode("span",{class:oe("suffix-area--text")},[e.suffix])]))]),[[a.resolveDirective("bk-tooltips"),I.value]])}}}),hr=Ie(dC),fC=a.defineComponent({name:"Card",props:{title:m.string,showHeader:m.bool.def(!0),showFooter:m.bool.def(!1),collapseStatus:m.bool.def(!0),border:m.bool.def(!0),disableHeaderStyle:m.bool.def(!1),position:m.string.def("left"),isEdit:m.bool.def(!1),isCollapse:m.bool.def(!1)},emits:["update:collapseStatus","edit"],setup(e,{emit:t}){const n=a.ref(!0),r=a.ref(!1),s=a.ref(""),i=()=>{e.isCollapse&&(n.value=!n.value,t("update:collapseStatus",n.value))},o=()=>{r.value=!r.value},l=()=>{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:c}=he(),d=c("card");return{collapseActive:n,showInput:r,renderTitle:s,handleCollapse:i,saveEdit:l,clickEdit:o,wrapperClsName:d}},render(){var s,i,o,l;const e=Ae({[`${this.wrapperClsName}`]:!0,[`${this.wrapperClsName}-border-none`]:!this.$props.border},""),t=Ae({[`${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(hr,{class:`${this.wrapperClsName}-input`,modelValue:this.renderTitle,"onUpdate:modelValue":c=>this.renderTitle=c,onBlur:this.saveEdit},null):this.renderTitle]),r=a.createVNode("span",{class:`${this.wrapperClsName}-icon`,onClick:this.handleCollapse},[this.collapseActive?a.createVNode(Sa,null,null):a.createVNode($t,null,null)]);return a.createVNode("div",{class:e},[this.$props.showHeader?a.createVNode("div",{class:t},[this.$props.isCollapse&&(((i=(s=this.$slots).icon)==null?void 0:i.call(s))??r),((l=(o=this.$slots).header)==null?void 0:l.call(o))??n,this.$props.isEdit&&!this.showInput&&a.createVNode(Fo,{class:`${this.wrapperClsName}-edit`,onClick:this.clickEdit},null)]):"",a.createVNode(Lp,null,{default:()=>{var c,d,f,u;return[a.withDirectives(a.createVNode("div",null,[a.createVNode("div",{class:`${this.wrapperClsName}-body`},[((d=(c=this.$slots).default)==null?void 0:d.call(c))??"Content"]),this.$props.showFooter?a.createVNode("div",{class:`${this.wrapperClsName}-footer`},[((u=(f=this.$slots).footer)==null?void 0:u.call(f))??"Footer"]):""]),[[a.vShow,this.collapseActive]])]}})])}}),Xp=Ie(fC),sl=Symbol("BkSelect"),Jp=Symbol("BkOptionGroup");function Zp(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function Vf(e){return{register:(r,s)=>{if(s)return e.value.set(r,s)},unregister:(r,s)=>{if(s){if(e.value.get(r)!==s)return;e.value.delete(r)}else e.value.delete(r)}}}function b1(e,t=200){let n,r=e;return a.customRef((s,i)=>({get(){return s(),r},set(o){clearTimeout(n),o===void 0||o===""?(r=o,i()):n=setTimeout(()=>{r=o,i()},t)}}))}function hC(e,t){const{popoverMinWidth:n}=e;let r=null;const s=a.ref("auto"),i=a.ref(!1),o=()=>{i.value=!i.value},l=()=>{i.value=!1},c=()=>{i.value=!0},d=()=>{var f;s.value=Math.max((f=t.value)==null?void 0:f.offsetWidth,n)};return a.onMounted(()=>{t.value&&(r=f8(t.value,d,60,!0),r.start())}),a.onBeforeUnmount(()=>{r==null||r.stop(),r=null}),{isPopoverShow:i,popperWidth:s,togglePopover:o,hidePopover:l,showPopover:c}}function mC(e,t){const n=b1(""),r=b1(""),s=a.computed(()=>r.value||n.value),i=a.ref(!1);return a.watch(s,async()=>{try{i.value=!0,await e(s.value),i.value=!1}catch(o){console.error(o)}finally{t==null||t()}}),{customOptionName:n,searchValue:r,curSearchValue:s,searchLoading:i}}function qr(e=""){return e&&String(e).trim().toLowerCase()}function pC(e,t){if(!e||!t)return!0;const{top:n,bottom:r}=e.getBoundingClientRect(),{top:s,bottom:i}=t.getBoundingClientRect();return n>=s&&r<=i}const Qp=Symbol("CheckboxGroup");function gC(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const vC=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,r=a.inject(Qp,tp),s=!np(r),i=a.ref(),o=a.ref(t.checked),l=a.ref(!1),c=a.computed(()=>s&&r.props.disabled?!0:t.disabled),d=h=>{const p=o.value?t.trueLabel:t.falseLabel;n("update:modelValue",p),n("change",p,h),s&&r.handleChange(),a.nextTick(()=>{i.value&&i.value.checked!==o.value&&(i.value.checked=o.value)})};s?a.watch(()=>r.props.modelValue,h=>{o.value=h.includes(t.label)},{deep:!0}):a.watch(()=>t.modelValue,h=>{h!==""&&(o.value=h===t.trueLabel)},{immediate:!0}),a.watch(()=>t.checked,()=>{o.value=t.checked,t.immediateEmitChange!==!1&&d()});const f=(h=!0)=>{o.value=h},u=h=>{if(t.readonly)return;const p=h.target;if(c.value||l.value)return;l.value=!0;const g=p.checked;Promise.resolve(t.beforeChange?t.beforeChange(g):!0).then(v=>{if(v)o.value=g,d(h);else return Promise.reject()}).catch(v=>{console.error(v),p.checked=o.value}).finally(()=>{l.value=!1})};return a.onMounted(()=>{s&&r.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&r.unregister(e.proxy)}),{inputRef:i,isChecked:o,isPrechecking:l,isDisabled:c,setChecked:f,handleChange:u}},yC={modelValue:m.oneOfType([m.bool,m.string,m.number]),label:m.oneOfType([m.bool,m.string,m.number]),trueLabel:m.oneOfType([m.bool,m.string,m.number]).def(!0),falseLabel:m.oneOfType([m.bool,m.string,m.number]).def(!1),disabled:m.bool.def(!1),checked:m.bool.def(!1),indeterminate:m.bool,beforeChange:xa().def(()=>!0),size:m.size().def(c0.DEFAULT),immediateEmitChange:m.bool.def(!0),readonly:m.bool.def(!1),outline:m.bool.def(!1)},bC=a.defineComponent({name:"Checkbox",props:yC,emits:{"update:modelValue":e=>e!==void 0,change:(e,t)=>e!==void 0,click:e=>!0},setup(e){const[t,{blur:n,focus:r}]=gC(),{inputRef:s,isChecked:i,isPrechecking:o,isDisabled:l,setChecked:c,handleChange:d}=vC(),{resolveClassName:f}=he();return{inputRef:s,isFocus:t,isChecked:i,isPrechecking:o,isDisabled:l,setChecked:c,handleBlur:n,handleFocus:r,handleChange:d,size:e.size,resolveClassName:f}},render(){const e=Ae({[`${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,"is-outline":this.outline}),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(Ko,{class:`${this.resolveClassName("checkbox-checking")}`},null)])}}),wC={modelValue:m.array,disabled:m.bool,withValidate:m.bool.def(!0)},il=a.defineComponent({name:"CheckboxGroup",props:wC,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(e,t){const n=on(),r=[],s=c=>{r.push(c)},i=c=>{const d=r.indexOf(c);d>-1&&r.splice(d,1)},o=()=>{const c=r.reduce((d,f)=>(f.isChecked&&d.push(f.label),d),[]);t.emit("update:modelValue",c),t.emit("change",c)};a.provide(Qp,{name:"CheckboxGroup",props:e,register:s,unregister:i,handleChange:o}),a.watch(()=>e.modelValue,()=>{var c;e.withValidate&&((c=n==null?void 0:n.validate)==null||c.call(n,"change"))}),a.onMounted(()=>{const c=e.modelValue||[];r.forEach(d=>{c.includes(d.label)&&d.setChecked(!0)})});const{resolveClassName:l}=he();return{resolveClassName:l}},render(){var e;return a.createVNode("div",{class:`${this.resolveClassName("checkbox-group")}`},[(e=this.$slots)==null?void 0:e.default()])}}),Ct=St(bC,{Group:il});var Ou,w1;function CC(){if(w1)return Ou;w1=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return Ou=t,Ou}var Au,C1;function NC(){if(C1)return Au;C1=1;function e(t){return this.__data__.has(t)}return Au=e,Au}var Lu,N1;function xC(){if(N1)return Lu;N1=1;var e=h0(),t=CC(),n=NC();function r(s){var i=-1,o=s==null?0:s.length;for(this.__data__=new e;++i<o;)this.add(s[i])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Lu=r,Lu}var Vu,x1;function SC(){if(x1)return Vu;x1=1;function e(t,n){for(var r=-1,s=t==null?0:t.length;++r<s;)if(n(t[r],r,t))return!0;return!1}return Vu=e,Vu}var Du,S1;function TC(){if(S1)return Du;S1=1;function e(t,n){return t.has(n)}return Du=e,Du}var ku,T1;function eg(){if(T1)return ku;T1=1;var e=xC(),t=SC(),n=TC(),r=1,s=2;function i(o,l,c,d,f,u){var h=c&r,p=o.length,g=l.length;if(p!=g&&!(h&&g>p))return!1;var v=u.get(o),b=u.get(l);if(v&&b)return v==l&&b==o;var y=-1,N=!0,w=c&s?new e:void 0;for(u.set(o,l),u.set(l,o);++y<p;){var C=o[y],S=l[y];if(d)var x=h?d(S,C,y,l,o,u):d(C,S,y,o,l,u);if(x!==void 0){if(x)continue;N=!1;break}if(w){if(!t(l,function(E,T){if(!n(w,T)&&(C===E||f(C,E,c,d,u)))return w.push(T)})){N=!1;break}}else if(!(C===S||f(C,S,c,d,u))){N=!1;break}}return u.delete(o),u.delete(l),N}return ku=i,ku}var Ru,_1;function _C(){if(_1)return Ru;_1=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(s,i){r[++n]=[i,s]}),r}return Ru=e,Ru}var Iu,E1;function EC(){if(E1)return Iu;E1=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(s){r[++n]=s}),r}return Iu=e,Iu}var Pu,O1;function OC(){if(O1)return Pu;O1=1;var e=_s(),t=op(),n=Os(),r=eg(),s=_C(),i=EC(),o=1,l=2,c="[object Boolean]",d="[object Date]",f="[object Error]",u="[object Map]",h="[object Number]",p="[object RegExp]",g="[object Set]",v="[object String]",b="[object Symbol]",y="[object ArrayBuffer]",N="[object DataView]",w=e?e.prototype:void 0,C=w?w.valueOf:void 0;function S(x,E,T,O,V,_,L){switch(T){case N:if(x.byteLength!=E.byteLength||x.byteOffset!=E.byteOffset)return!1;x=x.buffer,E=E.buffer;case y:return!(x.byteLength!=E.byteLength||!_(new t(x),new t(E)));case c:case d:case h:return n(+x,+E);case f:return x.name==E.name&&x.message==E.message;case p:case v:return x==E+"";case u:var I=s;case g:var R=O&o;if(I||(I=i),x.size!=E.size&&!R)return!1;var M=L.get(x);if(M)return M==E;O|=l,L.set(x,E);var j=r(I(x),I(E),O,V,_,L);return L.delete(x),j;case b:if(C)return C.call(x)==C.call(E)}return!1}return Pu=S,Pu}var Mu,A1;function tg(){if(A1)return Mu;A1=1;function e(t,n){for(var r=-1,s=n.length,i=t.length;++r<s;)t[i+r]=n[r];return t}return Mu=e,Mu}var $u,L1;function ng(){if(L1)return $u;L1=1;var e=tg(),t=un();function n(r,s,i){var o=s(r);return t(r)?o:e(o,i(r))}return $u=n,$u}var Fu,V1;function AC(){if(V1)return Fu;V1=1;function e(t,n){for(var r=-1,s=t==null?0:t.length,i=0,o=[];++r<s;){var l=t[r];n(l,r,t)&&(o[i++]=l)}return o}return Fu=e,Fu}var Hu,D1;function rg(){if(D1)return Hu;D1=1;function e(){return[]}return Hu=e,Hu}var Bu,k1;function oh(){if(k1)return Bu;k1=1;var e=AC(),t=rg(),n=Object.prototype,r=n.propertyIsEnumerable,s=Object.getOwnPropertySymbols,i=s?function(o){return o==null?[]:(o=Object(o),e(s(o),function(l){return r.call(o,l)}))}:t;return Bu=i,Bu}var zu,R1;function LC(){if(R1)return zu;R1=1;var e=up(),t=e(Object.keys,Object);return zu=t,zu}var ju,I1;function ag(){if(I1)return ju;I1=1;var e=xo(),t=LC(),n=Object.prototype,r=n.hasOwnProperty;function s(i){if(!e(i))return t(i);var o=[];for(var l in Object(i))r.call(i,l)&&l!="constructor"&&o.push(l);return o}return ju=s,ju}var Uu,P1;function lh(){if(P1)return Uu;P1=1;var e=pp(),t=ag(),n=As();function r(s){return n(s)?e(s):t(s)}return Uu=r,Uu}var Wu,M1;function sg(){if(M1)return Wu;M1=1;var e=ng(),t=oh(),n=lh();function r(s){return e(s,n,t)}return Wu=r,Wu}var qu,$1;function VC(){if($1)return qu;$1=1;var e=sg(),t=1,n=Object.prototype,r=n.hasOwnProperty;function s(i,o,l,c,d,f){var u=l&t,h=e(i),p=h.length,g=e(o),v=g.length;if(p!=v&&!u)return!1;for(var b=p;b--;){var y=h[b];if(!(u?y in o:r.call(o,y)))return!1}var N=f.get(i),w=f.get(o);if(N&&w)return N==o&&w==i;var C=!0;f.set(i,o),f.set(o,i);for(var S=u;++b<p;){y=h[b];var x=i[y],E=o[y];if(c)var T=u?c(E,x,y,o,i,f):c(x,E,y,i,o,f);if(!(T===void 0?x===E||d(x,E,l,c,f):T)){C=!1;break}S||(S=y=="constructor")}if(C&&!S){var O=i.constructor,V=o.constructor;O!=V&&"constructor"in i&&"constructor"in o&&!(typeof O=="function"&&O instanceof O&&typeof V=="function"&&V instanceof V)&&(C=!1)}return f.delete(i),f.delete(o),C}return qu=s,qu}var Gu,F1;function DC(){if(F1)return Gu;F1=1;var e=Br(),t=cn(),n=e(t,"DataView");return Gu=n,Gu}var Ku,H1;function kC(){if(H1)return Ku;H1=1;var e=Br(),t=cn(),n=e(t,"Promise");return Ku=n,Ku}var Yu,B1;function RC(){if(B1)return Yu;B1=1;var e=Br(),t=cn(),n=e(t,"Set");return Yu=n,Yu}var Xu,z1;function IC(){if(z1)return Xu;z1=1;var e=Br(),t=cn(),n=e(t,"WeakMap");return Xu=n,Xu}var Ju,j1;function Us(){if(j1)return Ju;j1=1;var e=DC(),t=f0(),n=kC(),r=RC(),s=IC(),i=Gn(),o=rp(),l="[object Map]",c="[object Object]",d="[object Promise]",f="[object Set]",u="[object WeakMap]",h="[object DataView]",p=o(e),g=o(t),v=o(n),b=o(r),y=o(s),N=i;return(e&&N(new e(new ArrayBuffer(1)))!=h||t&&N(new t)!=l||n&&N(n.resolve())!=d||r&&N(new r)!=f||s&&N(new s)!=u)&&(N=function(w){var C=i(w),S=C==c?w.constructor:void 0,x=S?o(S):"";if(x)switch(x){case p:return h;case g:return l;case v:return d;case b:return f;case y:return u}return C}),Ju=N,Ju}var Zu,U1;function PC(){if(U1)return Zu;U1=1;var e=m0(),t=eg(),n=OC(),r=VC(),s=Us(),i=un(),o=Ls(),l=Eo(),c=1,d="[object Arguments]",f="[object Array]",u="[object Object]",h=Object.prototype,p=h.hasOwnProperty;function g(v,b,y,N,w,C){var S=i(v),x=i(b),E=S?f:s(v),T=x?f:s(b);E=E==d?u:E,T=T==d?u:T;var O=E==u,V=T==u,_=E==T;if(_&&o(v)){if(!o(b))return!1;S=!0,O=!1}if(_&&!O)return C||(C=new e),S||l(v)?t(v,b,y,N,w,C):n(v,b,E,y,N,w,C);if(!(y&c)){var L=O&&p.call(v,"__wrapped__"),I=V&&p.call(b,"__wrapped__");if(L||I){var R=L?v.value():v,M=I?b.value():b;return C||(C=new e),w(R,M,y,N,C)}}return _?(C||(C=new e),r(v,b,y,N,w,C)):!1}return Zu=g,Zu}var Qu,W1;function MC(){if(W1)return Qu;W1=1;var e=PC(),t=Ht();function n(r,s,i,o,l){return r===s?!0:r==null||s==null||!t(r)&&!t(s)?r!==r&&s!==s:e(r,s,i,o,n,l)}return Qu=n,Qu}var ed,q1;function $C(){if(q1)return ed;q1=1;var e=MC();function t(n,r){return e(n,r)}return ed=t,ed}var FC=$C();const ch=lt(FC),Gi=a.defineComponent({name:"Option",props:{id:{type:[String,Number],require:!0},name:m.oneOfType([m.number,m.string]),disabled:m.bool.def(!1),order:m.number.def(0)},setup(e,{attrs:t}){const{proxy:n}=a.getCurrentInstance(),r=a.reactive({visible:!0}),{disabled:s,id:i,name:o}=a.toRefs(e),l=a.computed(()=>o.value!==void 0?o.value:t.label),c=a.computed(()=>i.value!==void 0?i.value:t.value),d=a.inject(sl,null),f=a.inject(Jp,null),u=a.computed(()=>{var E;return(E=d==null?void 0:d.selected)==null?void 0:E.some(T=>ch(T.value,c.value))}),h=a.computed(()=>d==null?void 0:d.multiple),p=a.computed(()=>(d==null?void 0:d.activeOptionValue)===c.value),g=a.computed(()=>(d==null?void 0:d.showSelectedIcon)&&h.value),v=a.computed(()=>d==null?void 0:d.selectedStyle),b=a.computed(()=>d==null?void 0:d.curSearchValue),y=a.computed(()=>d==null?void 0:d.highlightKeyword),N=()=>{s.value||d==null||d.handleOptionSelected(n)},w=()=>{d.activeOptionValue=c.value},C=()=>{d.activeOptionValue=""},S=E=>{if(!E)return E;let T=b.value;const O=T.length;if(!(T!=null&&T.trim().length)||!E.toLocaleLowerCase().includes(T.toLocaleLowerCase()))return E;const V=[];let _=-1;return T=T.replace(/([.*/]{1})/gim,"\\$1"),E.replace(new RegExp(`${T}`,"igm"),(L,I)=>(V.length===0&&I!==0?V.push(E.slice(0,I)):_>=0&&V.push(E.slice(_+L.length,I)),V.push(a.createVNode("span",{class:"is-keyword"},[L])),_=I,L)),_>=0&&V.push(E.slice(_+O)),V.length?V:E};a.onBeforeMount(()=>{d==null||d.register(c.value,n),f==null||f.register(c.value,n)}),a.onBeforeUnmount(()=>{d==null||d.unregister(c.value,n),f==null||f.unregister(c.value,n)});const{resolveClassName:x}=he();return{...a.toRefs(r),selected:u,multiple:h,isHover:p,showSelectedIcon:g,selectedStyle:v,optionName:l,optionID:c,highlightKeyword:y,handleOptionClick:N,handleMouseEnter:w,handleMouseLeave:C,resolveClassName:x,transformNode:S}},render(){var t,n;const e=Ae({"is-selected":this.selected,"is-disabled":this.disabled,"is-multiple":this.multiple,"is-hover":this.isHover,"is-checkbox":this.selectedStyle===_i.CHECKBOX,[this.resolveClassName("select-option")]:!0});return a.withDirectives(a.createVNode("li",{class:e,onClick:this.handleOptionClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave},[this.showSelectedIcon&&this.selectedStyle===_i.CHECKBOX&&a.createVNode(Ct,{class:this.resolveClassName("select-checkbox"),disabled:this.disabled,modelValue:this.selected},null),((n=(t=this.$slots).default)==null?void 0:n.call(t))??a.createVNode("span",{class:this.resolveClassName("select-option-item"),title:String(this.optionName)},[this.highlightKeyword?this.transformNode(String(this.optionName)):this.optionName]),this.showSelectedIcon&&this.selected&&this.selectedStyle===_i.CHECK&&a.createVNode(zr,{width:22,height:22,class:this.resolveClassName("select-selected-icon")},null)]),[[a.vShow,this.visible]])}}),HC=a.defineComponent({name:"OptionGroup",props:{label:m.string.def(""),disabled:m.bool.def(!1),collapsible:m.bool.def(!1),collapse:m.bool.def(!1)},setup(e,{emit:t}){const n=a.getCurrentInstance(),{proxy:r}=n,s=a.inject(sl,null),i=a.reactive({groupCollapse:e.collapse,visible:!0}),o=a.ref(new Map),{register:l,unregister:c}=Vf(o),d=a.computed(()=>`${e.label} (${[...o.value.values()].filter(h=>h.visible).length})`),f=()=>{!e.collapsible||e.disabled||(i.groupCollapse=!i.groupCollapse,t("update:collapse",i.groupCollapse))};a.provide(Jp,a.reactive({...a.toRefs(e),register:l,unregister:c,groupCollapse:a.toRef(i,"groupCollapse")})),a.onBeforeMount(()=>{s==null||s.registerGroup(n.uid,r)}),a.onBeforeUnmount(()=>{s==null||s.unregisterGroup(n.uid)});const{resolveClassName:u}=he();return{...a.toRefs(i),groupLabel:d,handleToggleCollapse:f,resolveClassName:u}},render(){var r,s;const e=Ae({[this.resolveClassName("option-group")]:!0,collapsible:this.collapsible,disabled:this.disabled}),t=Ae({[this.resolveClassName("option-group-label")]:!0,collapsible:this.collapsible}),n=Ae({"default-group-label-icon":!0,collapse:this.groupCollapse});return a.withDirectives(a.createVNode("ul",{class:e},[a.createVNode("li",{class:t,onClick:this.handleToggleCollapse},[this.$slots.label?this.$slots.label():a.createVNode("span",{class:"default-group-label"},[this.collapsible&&a.createVNode(Rs,{class:n},null),a.createVNode("span",{class:"default-group-label-title"},[this.groupLabel])])]),a.withDirectives(a.createVNode("ul",{class:this.resolveClassName("option-group-content")},[(s=(r=this.$slots).default)==null?void 0:s.call(r)]),[[a.vShow,!this.groupCollapse]])]),[[a.vShow,this.visible]])}});function ui(e){const t=document.createElement("div");return t.className=e,t}const G1=typeof Element<"u"&&Element.prototype.matches;function or(e,t){const n=uh(e);if(!G1)throw new Error("No element matching method supported");return G1.call(n,t)}function Jr(e){const t=uh(e);t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}function K1(e,t){return Array.prototype.filter.call(e.children,n=>or(n,t))}function Ke(e){return parseInt(e,10)||0}function BC(e){return or(e,"input,[contenteditable]")||or(e,"select,[contenteditable]")||or(e,"textarea,[contenteditable]")||or(e,"button,[contenteditable]")}function zC(e){const t=yn(e);return Ke(t.width)+Ke(t.paddingLeft)+Ke(t.paddingRight)+Ke(t.borderLeftWidth)+Ke(t.borderRightWidth)}const Kr={isWebKit:typeof document<"u"&&"WebkitAppearance"in document.documentElement.style,supportsTouch:typeof window<"u"&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:typeof navigator<"u"&&navigator.msMaxTouchPoints,isChrome:typeof navigator<"u"&&/Chrome/i.test(navigator==null?void 0:navigator.userAgent)},uh=e=>e.isVirtualElement?e.delegateElement:e;function yn(e){return getComputedStyle(uh(e))}function Et(e,t){for(const n in t){let r=t[n];typeof r=="number"&&(r=`${r}px`),e.style[n]=r}return e}function Nn(e){const t=e.element,n=Math.floor(t.scrollTop),r=t.getBoundingClientRect();e.containerWidth=Math.round(r.width),e.containerHeight=Math.round(r.height),e.contentWidth=t.scrollWidth,e.contentHeight=t.scrollHeight,t.contains(e.scrollbarXRail)||(K1(t,e.cls.element.rail("x")).forEach(s=>Jr(s)),t.appendChild(e.scrollbarXRail)),t.contains(e.scrollbarYRail)||(K1(t,e.cls.element.rail("y")).forEach(s=>Jr(s)),t.appendChild(e.scrollbarYRail)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=Y1(e,Ke(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=Ke((e.negativeScrollAdjustment+t.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):e.scrollbarXActive=!1,!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=Y1(e,Ke(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=e.element.isVirtualElement?jC(e):Ke(n*(e.railYHeight-e.scrollbarYHeight)/(e.contentHeight-e.containerHeight))):e.scrollbarYActive=!1,e.scrollbarXLeft>=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),UC(t,e),e.scrollbarXActive?t.classList.add(e.cls.state.active("x")):(t.classList.remove(e.cls.state.active("x")),e.scrollbarXWidth=0,e.scrollbarXLeft=0,t.scrollLeft=e.isRtl===!0?e.contentWidth:0),e.scrollbarYActive?t.classList.add(e.cls.state.active("y")):(t.classList.remove(e.cls.state.active("y")),e.scrollbarYHeight=0,e.scrollbarYTop=0,t.scrollTop=0)}function jC(e){const t=Ke(e.element.virtualScrollTop);return t>=0?t:0}function Y1(e,t){return e.settings.minScrollbarLength&&(t=Math.max(t,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(t=Math.min(t,e.settings.maxScrollbarLength)),t}function UC(e,t){const n={width:t.railXWidth},r=e.isVirtualElement?0:Math.floor(e.scrollTop);t.isRtl?n.left=t.negativeScrollAdjustment+e.scrollLeft+t.containerWidth-t.contentWidth:n.left=e.scrollLeft,t.isScrollbarXUsingBottom?n.bottom=t.scrollbarXBottom-r:n.top=t.scrollbarXTop+r,Et(t.scrollbarXRail,n);const s={top:r,height:t.railYHeight};t.isScrollbarYUsingRight?t.isRtl?s.right=t.contentWidth-(t.negativeScrollAdjustment+e.scrollLeft)-t.scrollbarYRight-t.scrollbarYOuterWidth-9:s.right=t.scrollbarYRight-e.scrollLeft:t.isRtl?s.left=t.negativeScrollAdjustment+e.scrollLeft+t.containerWidth*2-t.contentWidth-t.scrollbarYLeft-t.scrollbarYOuterWidth:s.left=t.scrollbarYLeft+e.scrollLeft,Et(t.scrollbarYRail,s),Et(t.scrollbarX,{left:t.scrollbarXLeft,width:t.scrollbarXWidth-t.railBorderXWidth}),Et(t.scrollbarY,{top:t.scrollbarYTop,height:t.scrollbarYHeight-t.railBorderYWidth})}function WC(e){e.event.bind(e.scrollbarY,"mousedown",t=>t.stopPropagation()),e.event.bind(e.scrollbarYRail,"mousedown",t=>{const n=t.pageY-window.pageYOffset-e.scrollbarYRail.getBoundingClientRect().top,r=n>e.scrollbarYTop?1:-1;e.element.isVirtualElement?e.element.scrollTop=n/(e.element.offsetHeight/e.element.scrollHeight):e.element.scrollTop+=r*e.containerHeight,e.element.scrollTop+=r*e.containerHeight,Nn(e),t.stopPropagation()}),e.event.bind(e.scrollbarX,"mousedown",t=>t.stopPropagation()),e.event.bind(e.scrollbarXRail,"mousedown",t=>{const r=t.pageX-window.pageXOffset-e.scrollbarXRail.getBoundingClientRect().left>e.scrollbarXLeft?1:-1;e.element.scrollLeft+=r*e.containerWidth,Nn(e),t.stopPropagation()})}class qC{constructor(t="bk"){ye(this,"main");ye(this,"rtl");ye(this,"element");ye(this,"state");this.main=`${t}-scrollbar`,this.rtl=`${t}-rtl`,this.element={thumb:n=>`${t}__thumb-${n}`,rail:n=>`${t}__rail-${n}`,size:n=>`${t}-scroll-size-${n}`,consuming:`${t}__child--consume`},this.state={focus:`${t}--focus`,clicking:`${t}--clicking`,active:n=>`${t}--active-${n}`,scrolling:n=>`${t}--scrolling-${n}`}}}const ig={x:null,y:null};function og(e,t){const n=e.element.classList,r=e.cls.state.scrolling(t);n.contains(r)?clearTimeout(ig[t]):n.add(r)}function lg(e,t){ig[t]=setTimeout(()=>e.isAlive&&e.element.classList.remove(e.cls.state.scrolling(t)),e.settings.scrollingThreshold)}function GC(e,t){og(e,t),lg(e,t)}function KC(e){X1(e,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),X1(e,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])}function X1(e,[t,n,r,s,i,o,l,c,d]){const f=e.element;let u=null,h=null,p=null;function g(y){var N;(N=y.touches)!=null&&N[0]&&(y[r]=y.touches[0].pageY),f[l]=u+p*(y[r]-h),og(e,c),Nn(e),y.stopPropagation(),y.type.startsWith("touch")&&y.changedTouches.length>1&&y.preventDefault()}function v(){lg(e,c),e[d].classList.remove(e.cls.state.clicking),e.event.unbind(e.ownerDocument,"mousemove",g)}function b(y,N){u=f[l],N&&y.touches&&(y[r]=y.touches[0].pageY),h=y[r],p=(e[n]-e[t])/(e[s]-e[o]),N?e.event.bind(e.ownerDocument,"touchmove",g):(e.event.bind(e.ownerDocument,"mousemove",g),e.event.once(e.ownerDocument,"mouseup",v),y.preventDefault()),e[d].classList.add(e.cls.state.clicking),y.stopPropagation()}e.event.bind(e[i],"mousedown",y=>{b(y)}),e.event.bind(e[i],"touchstart",y=>{b(y,!0)})}function YC(e){const t=e.element,n=()=>or(t,":hover"),r=()=>or(e.scrollbarX,":focus")||or(e.scrollbarY,":focus");function s(l,c){const d=Math.floor(t.scrollTop);if(l===0){if(!e.scrollbarYActive)return!1;if(d===0&&c>0||d>=e.contentHeight-e.containerHeight&&c<0)return!e.settings.wheelPropagation}const f=t.scrollLeft;if(c===0){if(!e.scrollbarXActive)return!1;if(f===0&&l<0||f>=e.contentWidth-e.containerWidth&&l>0)return!e.settings.wheelPropagation}return!0}function i(){return t.isVirtualElement?e.containerHeight/e.element.scrollHeight*e.containerHeight:e.containerHeight}function o(){return t.isVirtualElement?e.containerHeight:e.contentHeight}e.event.bind(e.ownerDocument,"keydown",l=>{var h;if((h=l.isDefaultPrevented)!=null&&h.call(l)||l.defaultPrevented||!n()&&!r())return;let d=document.activeElement?document.activeElement:e.ownerDocument.activeElement;if(d){if(d.tagName==="IFRAME")d=d.contentDocument.activeElement;else for(;d.shadowRoot;)d=d.shadowRoot.activeElement;if(BC(d))return}let f=0,u=0;switch(l.which){case 37:l.metaKey?f=-e.contentWidth:l.altKey?f=-e.containerWidth:f=-30;break;case 38:l.metaKey?u=o():l.altKey?u=i():u=30;break;case 39:l.metaKey?f=e.contentWidth:l.altKey?f=e.containerWidth:f=30;break;case 40:l.metaKey?u=-o():l.altKey?u=-i():u=-30;break;case 32:l.shiftKey?u=i():u=-i();break;case 33:u=i();break;case 34:u=-i();break;case 36:u=o();break;case 35:u=-o();break;default:return}e.settings.suppressScrollX&&f!==0||e.settings.suppressScrollY&&u!==0||(t.scrollTop-=u,t.scrollLeft+=f,Nn(e),s(f,u)&&l.preventDefault())})}function XC(e){const t=e.element.isVirtualElement,n=t?e.element.delegateElement:e.element;function r(d,f){const u=t?e.element.virtualScrollTop:n.scrollTop,h=Math.floor(u),p=u===0,g=()=>t?h+e.scrollbarYHeight>=e.railYHeight:h+e.element.offsetHeight===e.element.scrollHeight,v=n.scrollLeft===0,b=n.scrollLeft+n.offsetWidth===n.scrollWidth;let y;return Math.abs(f)>Math.abs(d)?y=p||g():y=v||b,y?!e.settings.wheelPropagation:!0}function s(d){let f=d.deltaX,u=-1*d.deltaY;return(typeof f>"u"||typeof u>"u")&&(f=-1*d.wheelDeltaX/6,u=d.wheelDeltaY/6),d.deltaMode&&d.deltaMode===1&&(f*=10,u*=10),f!==f&&u!==u&&(f=0,u=d.wheelDelta),d.shiftKey?[-u,-f]:[f,u]}function i(d,f,u){if(!Kr.isWebKit&&n.querySelector("select:focus"))return!0;if(!n.contains(d))return!1;let h=d;for(;h&&h!==n;){if(h.classList.contains(e.cls.element.consuming))return!0;const p=yn(h);if(u&&p.overflowY.match(/(scroll|auto)/)){const g=h.scrollHeight-h.clientHeight;if(g>0&&(h.scrollTop>0&&u<0||h.scrollTop<g&&u>0))return!0}if(f&&p.overflowX.match(/(scroll|auto)/)){const g=h.scrollWidth-h.clientWidth;if(g>0&&(h.scrollLeft>0&&f<0||h.scrollLeft<g&&f>0))return!0}h=h.parentNode}return!1}const o=()=>e.element.scrollHeight-e.element.offsetHeight;function l(d){let f=e.element.scrollTop-d;const u=o();f>u&&(f=u),f<0&&(f=0),e.element.scrollTop=f}function c(d){const[f,u]=s(d);if(i(d.target,f,u))return;let h=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(l(u?u*e.settings.wheelSpeed:-f*e.settings.wheelSpeed),h=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(f?n.scrollLeft+=f*e.settings.wheelSpeed:n.scrollLeft-=u*e.settings.wheelSpeed,h=!0):(l(u*e.settings.wheelSpeed),n.scrollLeft+=f*e.settings.wheelSpeed),Nn(e),h=h||r(f,u),h&&!d.ctrlKey&&(d.stopPropagation(),d.preventDefault())}typeof window.onwheel<"u"?e.event.bind(n,"wheel",c):typeof window.onmousewheel<"u"&&e.event.bind(n,"mousewheel",c)}function JC(e){if(!Kr.supportsTouch&&!Kr.supportsIePointer)return;const t=e.element;function n(g,v){const b=Math.floor(t.scrollTop),y=t.scrollLeft,N=Math.abs(g),w=Math.abs(v);if(w>N){if(v<0&&b===e.contentHeight-e.containerHeight||v>0&&b===0)return window.scrollY===0&&v>0&&Kr.isChrome}else if(N>w&&(g<0&&y===e.contentWidth-e.containerWidth||g>0&&y===0))return!0;return!0}function r(g,v){t.scrollLeft-=g,t.scrollTop-=v,Nn(e)}let s={},i=0,o={},l=null;function c(g){return g.targetTouches?g.targetTouches[0]:g}function d(g){return g.pointerType&&g.pointerType==="pen"&&g.buttons===0?!1:!!(g.targetTouches&&g.targetTouches.length===1||g.pointerType&&g.pointerType!=="mouse"&&g.pointerType!==g.MSPOINTER_TYPE_MOUSE)}function f(g){if(!d(g))return;const v=c(g);s.pageX=v.pageX,s.pageY=v.pageY,i=new Date().getTime(),l!==null&&clearInterval(l)}function u(g,v,b){if(!t.contains(g))return!1;let y=g;for(;y&&y!==t;){if(y.classList.contains(e.cls.element.consuming))return!0;const N=yn(y);if(b&&N.overflowY.match(/(scroll|auto)/)){const w=y.scrollHeight-y.clientHeight;if(w>0&&(y.scrollTop>0&&b<0||y.scrollTop<w&&b>0))return!0}if(v&&N.overflowX.match(/(scroll|auto)/)){const w=y.scrollWidth-y.clientWidth;if(w>0&&(y.scrollLeft>0&&v<0||y.scrollLeft<w&&v>0))return!0}y=y.parentNode}return!1}function h(g){if(d(g)){const v=c(g),b={pageX:v.pageX,pageY:v.pageY},y=b.pageX-s.pageX,N=b.pageY-s.pageY;if(u(g.target,y,N))return;r(y,N),s=b;const w=new Date().getTime(),C=w-i;C>0&&(o.x=y/C,o.y=N/C,i=w),n(y,N)&&g.preventDefault()}}function p(){e.settings.swipeEasing&&(clearInterval(l),l=setInterval(function(){if(e.isInitialized){clearInterval(l);return}if(!o.x&&!o.y){clearInterval(l);return}if(Math.abs(o.x)<.01&&Math.abs(o.y)<.01){clearInterval(l);return}if(!e.element){clearInterval(l);return}r(o.x*30,o.y*30),o.x*=.8,o.y*=.8},10))}Kr.supportsTouch?(e.event.bind(t,"touchstart",f),e.event.bind(t,"touchmove",h),e.event.bind(t,"touchend",p)):Kr.supportsIePointer&&(window.PointerEvent?(e.event.bind(t,"pointerdown",f),e.event.bind(t,"pointermove",h),e.event.bind(t,"pointerup",p)):window.MSPointerEvent&&(e.event.bind(t,"MSPointerDown",f),e.event.bind(t,"MSPointerMove",h),e.event.bind(t,"MSPointerUp",p)))}class ZC{constructor(t){ye(this,"element");ye(this,"handlers");this.element=t,this.handlers={}}bind(t,n){typeof this.handlers[t]>"u"&&(this.handlers[t]=[]),this.handlers[t].push(n),this.element.addEventListener(t,n,!1)}unbind(t,n){this.handlers[t]=this.handlers[t].filter(r=>n&&r!==n?!0:(this.element.removeEventListener(t,r,!1),!1))}unbindAll(){for(const t in this.handlers)this.unbind(t)}get isEmpty(){return Object.keys(this.handlers).every(t=>this.handlers[t].length===0)}}class QC{constructor(){ye(this,"eventElements");this.eventElements=[]}eventElement(t){let n=this.eventElements.filter(r=>r.element===t)[0];return n||(n=new ZC(t),this.eventElements.push(n)),n}bind(t,n,r){this.eventElement(t).bind(n,r)}unbind(t,n,r){const s=this.eventElement(t);s.unbind(n,r),s.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(s),1)}unbindAll(){this.eventElements.forEach(t=>t.unbindAll()),this.eventElements=[]}once(t,n,r){const s=this.eventElement(t),i=o=>{s.unbind(n,i),r(o)};s.bind(n,i)}}function di(e){if(typeof window.CustomEvent=="function")return new CustomEvent(e);{const t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}}function fi(e,t,n,r=!0,s=!1){let i;if(t==="top")i=["contentHeight","containerHeight","scrollTop","y","up","down"];else if(t==="left")i=["contentWidth","containerWidth","scrollLeft","x","left","right"];else throw new Error("A proper axis should be provided");eN(e,n,i,r,s)}function eN(e,t,[n,r,s,i,o,l],c=!0,d=!1){const f=e.element;e.reach[i]=null,f[s]<1&&(e.reach[i]="start"),f[s]>e[n]-e[r]-1&&(e.reach[i]="end"),t&&(f.dispatchEvent(di(`ps-scroll-${i}`)),t<0?f.dispatchEvent(di(`ps-scroll-${o}`)):t>0&&f.dispatchEvent(di(`ps-scroll-${l}`)),c&&GC(e,i)),e.reach[i]&&(t||d)&&f.dispatchEvent(di(`ps-${i}-reach-${e.reach[i]}`))}const tN=()=>({handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:16,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1,classPrefix:"bk",scrollSize:"normal"}),nN={"click-rail":WC,"drag-thumb":KC,keyboard:YC,wheel:XC,touch:JC};class rN{constructor({scrollHeight:t,delegateElement:n,onScollCallback:r}){ye(this,"isVirtualElement",!0);ye(this,"scrollHeight");ye(this,"virtualScrollTop");ye(this,"virtualScrollLeft");ye(this,"scrollTop",0);ye(this,"onScollCallback");ye(this,"delegateElement");return this.scrollHeight=t,this.delegateElement=n,this.virtualScrollTop=0,this.virtualScrollLeft=0,this.onScollCallback=r,new Proxy(this,{get:(s,i,o)=>{if(i in s){const l=Reflect.get(s,i,o);if(l!==void 0)return l}if(n&&i in n){const l=n[i];return typeof l=="function"?l.bind(n):l}},set:(s,i,o)=>{if(i in s){if(i==="scrollTop"){s.virtualScrollTop=o*s.delegateElement.offsetHeight/s.scrollHeight;const l=s.scrollTop!==o;return s.scrollTop=o,l&&this.handleScrollChanged("scrollTop"),!0}return s[i]=o,!0}return n&&i in n?(n[i]=o,this.handleScrollChanged(i),!0):(s[i]=o,!0)}})}handleScrollChanged(t){var n;if(["scrollLeft","scrollTop"].includes(t)){const r={offset:{x:this.delegateElement.scrollLeft,y:this.scrollTop}};(n=this.onScollCallback)==null||n.call(this,r)}}scrollTo({x:t,y:n}){this.delegateElement.scrollLeft=t,this.scrollTop=n,this.delegateElement.scrollTo(t,n)}}class dh{constructor(t,n={}){ye(this,"element");ye(this,"containerWidth");ye(this,"containerHeight");ye(this,"contentWidth");ye(this,"settings");ye(this,"contentHeight");ye(this,"isRtl");ye(this,"isNegativeScroll");ye(this,"negativeScrollAdjustment");ye(this,"event");ye(this,"ownerDocument");ye(this,"scrollbarXRail");ye(this,"scrollbarX");ye(this,"scrollbarXActive");ye(this,"scrollbarXWidth");ye(this,"scrollbarXLeft");ye(this,"scrollbarXBottom");ye(this,"isScrollbarXUsingBottom");ye(this,"scrollbarXTop");ye(this,"railBorderXWidth");ye(this,"railXMarginWidth");ye(this,"railXWidth");ye(this,"railXRatio");ye(this,"scrollbarYRail");ye(this,"scrollbarY");ye(this,"scrollbarYActive");ye(this,"scrollbarYHeight");ye(this,"scrollbarYTop");ye(this,"scrollbarYRight");ye(this,"isScrollbarYUsingRight");ye(this,"scrollbarYLeft");ye(this,"scrollbarYOuterWidth");ye(this,"railBorderYWidth");ye(this,"railYMarginHeight");ye(this,"railYHeight");ye(this,"railYRatio");ye(this,"reach");ye(this,"isAlive");ye(this,"lastScrollTop");ye(this,"lastScrollLeft");ye(this,"cls");if(typeof t=="string"&&(t=document.querySelector(t)),!(t!=null&&t.nodeName)&&!(t!=null&&t.isVirtualElement))throw new Error("no element is specified to initialize PerfectScrollbar");this.settings={...tN(),...n},this.element=t,this.cls=new qC(this.settings.classPrefix),t.classList.add(this.cls.main),this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;const r=()=>t.classList.add(this.cls.state.focus),s=()=>t.classList.remove(this.cls.state.focus);this.isRtl=yn(t).direction==="rtl",this.isRtl&&t.classList.add(this.cls.rtl),this.isNegativeScroll=(()=>{const l=t.scrollLeft;let c=null;return t.scrollLeft=-1,c=t.scrollLeft<0,t.scrollLeft=l,c})(),this.negativeScrollAdjustment=this.isNegativeScroll?t.scrollWidth-t.clientWidth:0,this.event=new QC,this.ownerDocument=t.ownerDocument||document,this.scrollbarXRail=ui(this.cls.element.rail("x")),this.scrollbarXRail.classList.add(this.cls.element.size(this.settings.scrollSize)),t.appendChild(this.scrollbarXRail),this.scrollbarX=ui(this.cls.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex","0"),this.event.bind(this.scrollbarX,"focus",r),this.event.bind(this.scrollbarX,"blur",s),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;const i=yn(this.scrollbarXRail);this.scrollbarXBottom=parseInt(i.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=Ke(i.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=Ke(i.borderLeftWidth)+Ke(i.borderRightWidth),Et(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=Ke(i.marginLeft)+Ke(i.marginRight),Et(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=ui(this.cls.element.rail("y")),this.scrollbarYRail.classList.add(this.cls.element.size(this.settings.scrollSize)),t.appendChild(this.scrollbarYRail),this.scrollbarY=ui(this.cls.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex","0"),this.event.bind(this.scrollbarY,"focus",r),this.event.bind(this.scrollbarY,"blur",s),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;const o=yn(this.scrollbarYRail);this.scrollbarYRight=parseInt(o.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=Ke(o.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?zC(this.scrollbarY):null,this.railBorderYWidth=Ke(o.borderTopWidth)+Ke(o.borderBottomWidth),Et(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=Ke(o.marginTop)+Ke(o.marginBottom),Et(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:t.scrollLeft<=0?"start":t.scrollLeft>=(this.contentWidth??0)-this.containerWidth?"end":null,y:t.scrollTop<=0?"start":t.scrollTop>=(this.contentHeight??0)-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(l=>nN[l](this)),this.lastScrollTop=Math.floor(t.scrollTop),this.lastScrollLeft=t.scrollLeft,this.event.bind(this.element,"scroll",l=>this.onScroll(l)),Nn(this)}update(t){this.isAlive&&(t!=null&&t.isVirtualElement&&(this.element=t),this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,Et(this.scrollbarXRail,{display:"block"}),Et(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=Ke(yn(this.scrollbarXRail).marginLeft)+Ke(yn(this.scrollbarXRail).marginRight),this.railYMarginHeight=Ke(yn(this.scrollbarYRail).marginTop)+Ke(yn(this.scrollbarYRail).marginBottom),Et(this.scrollbarXRail,{display:"none"}),Et(this.scrollbarYRail,{display:"none"}),Nn(this),fi(this,"top",0,!1,!0),fi(this,"left",0,!1,!0),Et(this.scrollbarXRail,{display:""}),Et(this.scrollbarYRail,{display:""}))}onScroll(t){this.isAlive&&(Nn(this),fi(this,"top",this.element.scrollTop-this.lastScrollTop),fi(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)}scrollTo({x:t,y:n}){n!==void 0&&typeof n=="number"&&(this.element.scrollTop=n),t!==void 0&&typeof t=="number"&&(this.element.scrollLeft=t),Nn(this)}destroy(){this.isAlive&&(this.event.unbindAll(),Jr(this.scrollbarX),Jr(this.scrollbarY),Jr(this.scrollbarXRail),Jr(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)}removePsClasses(){this.element.className=this.element.className.split(" ").filter(t=>!t.match(new RegExp(`^${this.settings.classPrefix}([-_].+|)$`))).join(" ")}}const aN={onContentScroll:Function},sN={list:m.array.def([]),enabled:m.bool.def(!0),scrollEvent:m.bool.def(!1),lineHeight:m.oneOfType([m.number,m.func]).def(30),minHeight:m.number.def(30),maxHeight:m.oneOfType([m.number,m.string]),height:m.oneOfType([m.string.def("100%"),m.number]).def("100%"),width:m.oneOfType([m.string.def("100%"),m.number]).def("100%"),className:m.oneOfType([m.arrayOf(m.string),m.object,m.arrayOf(m.object),m.string]).def(""),contentClassName:m.oneOfType([m.arrayOf(m.string),m.object,m.arrayOf(m.object),m.string]).def(""),contentStyle:m.object.def({}),scrollXName:m.string.def(ji("F-scroll-x")),scrollYName:m.string.def(ji("F-scroll-y")),groupItemCount:m.number.def(1),preloadItemCount:m.number.def(1),renderAs:m.string.def("div"),scrollOffsetTop:m.number.def(0),scrollPosition:m.string.def("content"),abosuteHeight:m.oneOfType([m.string.def("auto"),m.number]).def("auto"),throttleDelay:m.number.def(60),rowKey:m.string.def(void 0),keepAlive:m.bool.def(!1),scrollbar:xe("IScrollbarOption",{default:{enabled:!0}}),autoReset:m.bool.def(!0),wrapperStyle:m.any.def({}),autoIndex:m.bool.def(!0),...aN},cg=(e,t)=>({fixToTop:r=>{const{id:s,index:i,item:o}=r;let l=typeof i=="number"?i-1:0;if(s!==void 0&&(l=e.list.findIndex(c=>c[e.rowKey]===s)??l),o!==void 0&&(l=e.list.findIndex(c=>o[e.rowKey]===c[e.rowKey])??l),typeof l=="number"){const d=(l>=0?l:0)*e.lineHeight;t(0,d)}return null}}),ug=e=>{let t=null;return{init:i=>{var o;t=new dh(i.value,{scrollingThreshold:120,scrollSize:(o=e.scrollbar)==null?void 0:o.size})},instance:t,scrollTo:(i,o)=>{t==null||t.scrollTo({x:i,y:o})},update:()=>t==null?void 0:t.update(),updateScrollHeight:i=>{t!=null&&t.element&&((t==null?void 0:t.element).scrollHeight=i,t==null||t.update())}}};function J1(e,t,n){let r=0,s=0,i=0,o=0;for(;r<e;r++){if(o=n({index:r}),s+o>t){i=t-s,r=r+Math.round(i/o);break}s+=o}return{startIndex:r,height:s,diffHeight:i}}function dg(e,t,n,r,s){if(!r||!s.offset)return;const i=s.offset.y>=0?s.offset.y:0,o=s.offset.x>=0?s.offset.x:0,l=r.scrollHeight,c=r.offsetHeight,{count:d,groupItemCount:f}=n;let u=0,h=0,p=0;if(typeof e=="number"&&(u=Math.ceil(i/e),h=Math.ceil(c/e)+u,p=i%e),typeof e=="function"){const v=Math.ceil(d/f),b=J1(v,i,e);u=b.startIndex>0?b.startIndex:0,p=b.diffHeight,h=J1(v,c,e).startIndex+u+1}const g=l-c-i;return typeof t=="function"&&t(s,u,h,i,i,o,{bottom:g>=0?g:0,scrollbar:s}),{targetStartIndex:u,targetEndIndex:h,elScrollTop:i,translateY:p,elScrollLeft:o}}class fh{constructor(t,n){ye(this,"binding");ye(this,"wrapper");ye(this,"delay");ye(this,"delegateWrapper");ye(this,"getEvent",t=>{const{scrollbar:n={enabled:!1}}=this.binding.value;if(n.enabled)return{offset:t.offset??{x:t.target.scrollLeft,y:t.target.scrollTop}};if(t!=null&&t.offset)return{offset:t==null?void 0:t.offset};const r=t.target.scrollTop;return{offset:{x:t.target.scrollLeft,y:r}}});this.binding=t,this.wrapper=n;const{throttleDelay:r}=t.value;this.delay=r,this.delegateWrapper=void 0}get scrollHeight(){var t,n;return((t=this.delegateWrapper)==null?void 0:t.scrollHeight)??((n=this.wrapper)==null?void 0:n.scrollHeight)}get offsetHeight(){var t,n;return((t=this.delegateWrapper)==null?void 0:t.offsetHeight)??((n=this.wrapper)==null?void 0:n.offsetHeight)}setDelegateWrapper(t){this.delegateWrapper=t}render(t){var h,p;const{lineHeight:n=30,handleScrollCallback:r,pagination:s={},onlyScroll:i}=this.binding.value;if(i){const g=(h=t.offset)==null?void 0:h.y,v=((p=t.offset)==null?void 0:p.x)??0,b=this.scrollHeight-this.offsetHeight-g;r(t,null,null,g,g,v,{bottom:b>=0?b:0,scrollbar:t});return}const{startIndex:o,endIndex:l,groupItemCount:c,count:d,scrollTop:f,scrollLeft:u}=s;dg(n,r,{groupItemCount:c,count:d},this.delegateWrapper??this.wrapper,t)}executeThrottledRender(t){Fr(this.render.bind(this),this.delay)(this.getEvent(t))}install(){var t;(t=this.wrapper)==null||t.addEventListener("scroll",this.executeThrottledRender.bind(this))}uninstall(){var t,n;(n=(t=this.wrapper)==null?void 0:t.removeListener)==null||n.call(t,"scroll",this.executeThrottledRender.bind(this))}setBinding(t){this.binding=t}}let er=null;const iN={mounted(e,t){const n=e.parentNode;er=new fh(t,e),n.addEventListener("scroll",er.executeThrottledRender.bind(er))},updated(e,t){er==null||er.setBinding(t)},unbind(e){if(e){const t=e.parentNode;if(!t||!er)return;t.removeEventListener("scroll",er.executeThrottledRender)}}},oN=(e,t)=>{const{renderAs:n}=e,r=a.ref(null),{init:s,scrollTo:i}=ug(e),o=a.reactive({x:0,y:0}),l=(p,g,v,b,y,N,w)=>{const{scrollbar:C}=w;C!=null&&C.offset&&Object.assign(o,(C==null?void 0:C.offset)??{}),t.emit("content-scroll",[p,{translateY:y,translateX:N,pos:w}])};let c=null;const d=a.computed(()=>({lineHeight:e.lineHeight,scrollbar:e.scrollbar,handleScrollCallback:l,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent})),f=a.computed(()=>{const p=typeof e.height=="number"?`${e.height}px`:e.height;return{height:p,width:typeof e.width=="number"?`${e.width}px`:e.width,display:"inline-block",maxHeight:e.maxHeight??p,...e.wrapperStyle}}),{fixToTop:u}=cg(e,i);t.expose({scrollTo:i,fixToTop:u,refRoot:r,refContent:r}),a.onMounted(()=>{var p;c=new fh(d,r.value),(p=e.scrollbar)!=null&&p.enabled&&s(r),c.install()}),a.onUnmounted(()=>{c==null||c.uninstall()});const h=a.computed(()=>e.scrollbar.enabled?[e.className]:[e.className]);return{rendAsTag:()=>{var p,g,v,b,y,N,w,C;return a.h(n,{class:h.value,style:f.value,ref:r},[((g=(p=t.slots).beforeContent)==null?void 0:g.call(p))??"",((b=(v=t.slots).default)==null?void 0:b.call(v,{data:e.list}))??"",((N=(y=t.slots).afterContent)==null?void 0:N.call(y))??"",((C=(w=t.slots).afterSection)==null?void 0:C.call(w))??""])}}},lN=a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:iN},props:sN,emits:["content-scroll"],slots:Object,setup(e,t){const{renderAs:n}=e,r=B=>typeof B=="string"?[B]:typeof B=="object"&&!Array.isArray(B)?[B]:B;if(!e.enabled){const{rendAsTag:B}=oN(e,t);return B}const s=a.ref(null),i=a.ref(0),o=a.ref(0),l=a.ref(0),c=a.ref(null),d=B=>{let z=B*e.groupItemCount,D=(B+1)*e.groupItemCount;if(D>i.value){const k=D-z;D=i.value,z=D-k}return{index:z,rows:e.list.slice(z,D),items:[z,D],type:"virtual"}},f=()=>typeof e.lineHeight=="function"?({index:B})=>e.lineHeight(d(B)):e.lineHeight,u=a.computed(()=>({lineHeight:f(),handleScrollCallback:S,pagination:y,throttleDelay:e.throttleDelay,scrollbar:e.scrollbar})),{init:h,scrollTo:p,updateScrollHeight:g,update:v}=ug(e);let b=null;const y=a.reactive({startIndex:0,endIndex:0,scrollTop:1,scrollLeft:0,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),N=a.ref([]),w=()=>typeof e.height=="number"?e.height:c.value.offsetHeight,C=()=>{const B=w();let z=Math.ceil(i.value/e.groupItemCount),D=0,k=0,G=0;for(;z>0;z--)if(k=e.lineHeight(d(z)),D=D+k,D>B){G=D-B;break}return{diffHeight:G,startIndex:z}},S=(B,z,D,k,G,U,te)=>{Object.assign(y,{startIndex:z,endIndex:D,scrollTop:k,translateX:U,translateY:G,scrollLeft:U,pos:te});let Q=y.startIndex*e.groupItemCount,ne=y.endIndex*e.groupItemCount;const le=O.value.length;le<ne&&(ne=le,typeof e.lineHeight=="function"?Q=C().startIndex:(Q=ne-Math.floor(s.value.offsetHeight/e.lineHeight),Q=Q<0?0:Q));const ae=O.value.slice(Q,ne);N.value=ae,B&&t.emit("content-scroll",[B,y,ae])};a.onMounted(()=>{var B;if(b=new fh(u,s.value),(B=e.scrollbar)!=null&&B.enabled){c.value=new rN({delegateElement:s.value,scrollHeight:o.value,onScollCallback:P}),h(c),g(l.value),b.executeThrottledRender.call(b,{offset:{x:0,y:0}});return}b.install()}),a.onUnmounted(()=>{b==null||b.uninstall()});const x=()=>{E(e.list)},E=B=>{if(i.value=Math.ceil((B||[]).length/e.groupItemCount),y.count=i.value,typeof e.abosuteHeight=="string"&&e.abosuteHeight==="auto")if(typeof e.lineHeight=="function"){o.value=0;let D=0;const k=Math.ceil(i.value/e.groupItemCount);for(let G=0;G<k;G++){const U=e.lineHeight.apply(this,[d(G)]);D+=typeof U=="number"?U:0}o.value=D}else o.value=e.lineHeight*i.value;else o.value=e.abosuteHeight;L()},T=(B={left:0,top:0})=>{const z=s.value,D=typeof e.height=="number"?{scrollHeight:o.value,offsetHeight:e.height}:z;dg(e.lineHeight,S,y,D,{target:z})},O=a.computed(()=>e.rowKey!==void 0||!e.autoIndex?e.list:(e.list||[]).map((B,z)=>({...B,$index:z}))),V=a.computed(()=>e.scrollPosition==="content"?{}:{}),_=a.computed(()=>({height:typeof e.height=="number"?`${e.height}px`:e.height,width:typeof e.width=="number"?`${e.width}px`:e.width,display:"inline-block",maxHeight:e.maxHeight?`${e.maxHeight}px`:!1,minHeight:e.minHeight?`${e.minHeight}px`:!1,...e.scrollPosition==="container"?V.value:{},...e.wrapperStyle})),L=()=>{l.value=o.value<e.minHeight?e.minHeight:o.value},{resolveClassName:I}=he(),R=a.computed(()=>[I("virtual-render"),...r(e.className),e.scrollPosition==="container"?I("virtual-content"):""]),M=()=>{x(),T(),b==null||b.executeThrottledRender.call(b,{offset:{x:0,y:0}})},{fixToTop:j}=cg(e,p),H=()=>{const B=s.value,z=typeof e.height=="number"?{scrollHeight:o.value,offsetHeight:e.height}:B;b==null||b.setDelegateWrapper(z)},A=()=>{b==null||b.setBinding(u),x(),g(l.value),H(),v(),T(),a.nextTick(()=>{b==null||b.executeThrottledRender.call(b,{offset:{x:y.scrollLeft,y:y.scrollTop}})})};a.watch(()=>e.height,()=>{A()}),a.watch(()=>[e.list,e.list.length],()=>{A()},{immediate:!0}),t.expose({reset:M,scrollTo:p,fixToTop:j,updateScroll:v,refRoot:s,refContent:s});const P=B=>{b.executeThrottledRender.call(b,B)};return()=>{var B,z,D,k,G,U,te,$;return a.h(n||"div",{ref:s,class:[...R.value],style:_.value},[((z=(B=t.slots).beforeContent)==null?void 0:z.call(B))??"",((k=(D=t.slots).default)==null?void 0:k.call(D,{data:N.value}))??"",((U=(G=t.slots).afterContent)==null?void 0:U.call(G))??"",(($=(te=t.slots).afterSection)==null?void 0:$.call(te))??""])}}}),Ws=Ie(lN),cN=["阿","哎","安","肮","凹","八","挀","扳","邦","勹","陂","奔","伻","屄","边","灬","憋","汃","冫","癶","峬","嚓","偲","参","仓","撡","冊","嵾","曽","叉","芆","辿","伥","抄","车","抻","阷","吃","充","抽","出","欻","揣","巛","刅","吹","旾","逴","呲","匆","凑","粗","汆","崔","邨","搓","咑","呆","丹","当","刀","嘚","扥","灯","氐","甸","刁","爹","丁","丟","东","吺","厾","耑","垖","吨","多","妸","诶","奀","鞥","儿","发","帆","匚","飞","分","丰","覅","仏","紑","夫","旮","侅","甘","冈","皋","戈","给","根","刯","工","勾","估","瓜","乖","关","光","归","丨","呙","哈","咍","佄","夯","茠","诃","黒","拫","亨","噷","叿","齁","乎","花","怀","欢","巟","灰","昏","吙","丌","加","戋","江","艽","阶","巾","坕","冂","丩","凥","姢","噘","军","咔","开","刊","忼","尻","匼","肎","劥","空","抠","扝","夸","蒯","宽","匡","亏","坤","扩","垃","来","兰","啷","捞","肋","勒","崚","哩","俩","奁","良","撩","毟","拎","伶","溜","囖","龙","瞜","噜","驴","娈","掠","抡","罗","呣","妈","埋","嫚","牤","猫","么","呅","门","甿","咪","宀","喵","乜","民","名","谬","摸","哞","毪","嗯","拏","腉","囡","囔","孬","疒","娞","恁","能","妮","拈","娘","鸟","捏","囜","宁","妞","农","羺","奴","女","奻","疟","黁","挪","喔","讴","妑","拍","眅","乓","抛","呸","喷","匉","丕","囨","剽","氕","姘","乒","钋","剖","仆","七","掐","千","呛","悄","癿","亲","靑","卭","丘","区","峑","缺","夋","呥","穣","娆","惹","人","扔","日","茸","厹","邚","挼","堧","婑","瞤","捼","仨","毢","三","桒","掻","閪","森","僧","杀","筛","山","伤","弰","奢","申","升","尸","収","书","刷","衰","闩","双","脽","吮","说","厶","忪","捜","苏","狻","夊","孙","唆","他","囼","坍","汤","夲","忑","熥","剔","天","旫","帖","厅","囲","偷","凸","湍","推","吞","乇","穵","歪","弯","尣","危","昷","翁","挝","乌","夕","虲","仙","乡","灱","些","心","星","凶","休","吁","吅","削","坃","丫","恹","央","幺","倻","一","囙","应","哟","佣","优","扜","囦","曰","晕","帀","災","兂","匨","傮","则","贼","怎","増","扎","捚","沾","张","佋","蜇","贞","争","之","中","州","朱","抓","拽","专","妆","隹","宒","卓","乲","宗","邹","租","钻","厜","尊","昨","兙"],uN=["A","AI","AN","ANG","AO","BA","BAI","BAN","BANG","BAO","BEI","BEN","BENG","BI","BIAN","BIAO","BIE","BIN","BING","BO","BU","CA","CAI","CAN","CANG","CAO","CE","CEN","CENG","CHA","CHAI","CHAN","CHANG","CHAO","CHE","CHEN","CHENG","CHI","CHONG","CHOU","CHU","CHUA","CHUAI","CHUAN","CHUANG","CHUI","CHUN","CHUO","CI","CONG","COU","CU","CUAN","CUI","CUN","CUO","DA","DAI","DAN","DANG","DAO","DE","DEN","DENG","DI","DIAN","DIAO","DIE","DING","DIU","DONG","DOU","DU","DUAN","DUI","DUN","DUO","E","EI","EN","ENG","ER","FA","FAN","FANG","FEI","FEN","FENG","FIAO","FO","FOU","FU","GA","GAI","GAN","GANG","GAO","GE","GEI","GEN","GENG","GONG","GOU","GU","GUA","GUAI","GUAN","GUANG","GUI","GUN","GUO","HA","HAI","HAN","HANG","HAO","HE","HEI","HEN","HENG","HM","HONG","HOU","HU","HUA","HUAI","HUAN","HUANG","HUI","HUN","HUO","JI","JIA","JIAN","JIANG","JIAO","JIE","JIN","JING","JIONG","JIU","JU","JUAN","JUE","JUN","KA","KAI","KAN","KANG","KAO","KE","KEN","KENG","KONG","KOU","KU","KUA","KUAI","KUAN","KUANG","KUI","KUN","KUO","LA","LAI","LAN","LANG","LAO","LE","LEI","LENG","LI","LIA","LIAN","LIANG","LIAO","LIE","LIN","LING","LIU","LO","LONG","LOU","LU","LV","LUAN","LVE","LUN","LUO","M","MA","MAI","MAN","MANG","MAO","ME","MEI","MEN","MENG","MI","MIAN","MIAO","MIE","MIN","MING","MIU","MO","MOU","MU","N","NA","NAI","NAN","NANG","NAO","NE","NEI","NEN","NENG","NI","NIAN","NIANG","NIAO","NIE","NIN","NING","NIU","NONG","NOU","NU","NV","NUAN","NVE","NUN","NUO","O","OU","PA","PAI","PAN","PANG","PAO","PEI","PEN","PENG","PI","PIAN","PIAO","PIE","PIN","PING","PO","POU","PU","QI","QIA","QIAN","QIANG","QIAO","QIE","QIN","QING","QIONG","QIU","QU","QUAN","QUE","QUN","RAN","RANG","RAO","RE","REN","RENG","RI","RONG","ROU","RU","RUA","RUAN","RUI","RUN","RUO","SA","SAI","SAN","SANG","SAO","SE","SEN","SENG","SHA","SHAI","SHAN","SHANG","SHAO","SHE","SHEN","SHENG","SHI","SHOU","SHU","SHUA","SHUAI","SHUAN","SHUANG","SHUI","SHUN","SHUO","SI","SONG","SOU","SU","SUAN","SUI","SUN","SUO","TA","TAI","TAN","TANG","TAO","TE","TENG","TI","TIAN","TIAO","TIE","TING","TONG","TOU","TU","TUAN","TUI","TUN","TUO","WA","WAI","WAN","WANG","WEI","WEN","WENG","WO","WU","XI","XIA","XIAN","XIANG","XIAO","XIE","XIN","XING","XIONG","XIU","XU","XUAN","XUE","XUN","YA","YAN","YANG","YAO","YE","YI","YIN","YING","YO","YONG","YOU","YU","YUAN","YUE","YUN","ZA","ZAI","ZAN","ZANG","ZAO","ZE","ZEI","ZEN","ZENG","ZHA","ZHAI","ZHAN","ZHANG","ZHAO","ZHE","ZHEN","ZHENG","ZHI","ZHONG","ZHOU","ZHU","ZHUA","ZHUAI","ZHUAN","ZHUANG","ZHUI","ZHUN","ZHUO","ZI","ZONG","ZOU","ZU","ZUAN","ZUI","ZUN","ZUO",""],dN={曾:"ZENG",沈:"SHEN",嗲:"DIA",碡:"ZHOU",聒:"GUO",炔:"QUE",蚵:"KE",砉:"HUA",嬤:"MO",嬷:"MO",蹒:"PAN",蹊:"XI",丬:"PAN",霰:"XIAN",莘:"XIN",豉:"CHI",饧:"XING",筠:"JUN",长:"CHANG",帧:"ZHEN",峙:"SHI",郍:"NA",芎:"XIONG",谁:"SHUI"},Oi={PINYINS:uN,UNIHANS:cN,EXCEPTIONS:dN},fN="阿",hN="鿿",mN=1,Qa=2,td=3;let Ia=null,Ai;function pN(e){e&&(typeof e=="function"&&(e=[e]),e.forEach&&e.forEach(t=>{typeof t=="function"&&t(Oi)}))}function fg(e){return!e&&Ia!==null||(typeof Intl=="object"&&Intl.Collator?(Ai=new Intl.Collator(["zh-Hans-CN","zh-CN"]),Ia=Intl.Collator.supportedLocalesOf(["zh-CN"]).length===1):Ia=!1),Ia}function hg(e){const{UNIHANS:t}=Oi,{PINYINS:n}=Oi,{EXCEPTIONS:r}=Oi,s={source:e};if(e in r)return s.type=Qa,s.target=r[e],s;let i=-1,o;if(e.charCodeAt(0)<256)return s.type=mN,s.target=e,s;if(o=Ai.compare(e,fN),o<0)return s.type=td,s.target=e,s;if(o===0)s.type=Qa,i=0;else{if(o=Ai.compare(e,hN),o>0)return s.type=td,s.target=e,s;o===0&&(s.type=Qa,i=t.length-1)}if(s.type=Qa,i<0){let l=0,c=t.length-1;for(;l<=c;){i=~~((l+c)/2);const d=t[i];if(o=Ai.compare(e,d),o===0)break;o>0?l=i+1:c=i-1}}return o<0&&i--,s.target=n[i],s.target||(s.type=td,s.target=s.source),s}function Z1(e){return typeof e!="string"||!fg()?e:e.split("").map(t=>hg(t))}const Li={isSupported:fg,parse:Z1,patchDict:pN,genToken:hg,convertToPinyin(e,t,n){return Z1(e).map(r=>t&&r.type===Qa?r.target.toLowerCase():r.target).join(n||"")}};function gN(e){e.EXCEPTIONS={嗲:"DIA",碡:"ZHOU",聒:"GUO",炔:"QUE",蚵:"KE",砉:"HUA",嬷:"MO",蹊:"XI",丬:"PAN",霰:"XIAN",豉:"CHI",饧:"XING",帧:"ZHEN",芎:"XIONG",谁:"SHUI",钶:"KE"},e.UNIHANS[91]="伕",e.UNIHANS[347]="仚",e.UNIHANS[393]="诌",e.UNIHANS[39]="婤",e.UNIHANS[50]="腠",e.UNIHANS[369]="攸",e.UNIHANS[123]="乯",e.UNIHANS[171]="刕",e.UNIHANS[102]="佝",e.UNIHANS[126]="犿",e.UNIHANS[176]="列",e.UNIHANS[178]="刢",e.UNIHANS[252]="娝",e.UNIHANS[330]="偸"}function vN(e){return typeof e!="function"?!1:e("伕").target==="FOU"&&e("仚").target==="XIA"&&e("诌").target==="ZHONG"&&e("婤").target==="CHONG"&&e("腠").target==="CONG"&&e("攸").target==="YONG"&&e("乯").target==="HOU"&&e("刕").target==="LENG"&&e("佝").target==="GONG"&&e("犿").target==="HUAI"&&e("列").target==="LIAO"&&e("刢").target==="LIN"&&e("钶").target==="E"}const Q1={patcher:gN,shouldPatch:vN};Li.isSupported()&&Q1.shouldPatch(Li.genToken)&&Li.patchDict(Q1);var mg=function(e){return e.FILLED="filled",e.STROKE="stroke",e.UNKNOWN="",e}(mg||{});const yN=a.defineComponent({name:"Tag",props:{theme:vo().def(""),closable:m.bool.def(!1),type:xe("tagStorkeType",{}).def(mg.UNKNOWN),checkable:m.bool.def(!1),checked:m.bool.def(!1),radius:m.string.def("2px"),size:m.size()},emits:["change","close"],slots:Object,setup(e,{emit:t}){const{resolveClassName:n}=he();return{wrapperStyle:a.computed(()=>({borderRadius:e.radius})),handleClose:o=>{o.preventDefault(),o.stopPropagation(),t("close",o)},handleClick:o=>{o.preventDefault(),o.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(wt,{class:`${this.resolveClassName("tag-close")}`,onClick:this.handleClose},null)])}}),ws=Ie(yN);var bN=Fm();const gr=lt(bN),wN=a.defineComponent({name:"SelectTagInput",directives:{bkTooltips:Dn},props:{selected:{type:Array,default:()=>[]},tagTheme:vo(),placeholder:m.string.def(""),filterable:m.bool.def(!1),allowCreate:m.bool.def(!1),disabled:m.bool.def(!1),modelValue:m.any,collapseTags:m.bool.def(!1),behavior:d0()},emits:["update:modelValue","remove","enter","keydown"],setup(e,{emit:t}){const{resolveClassName:n}=he(),r=a.inject(sl,null),{modelValue:s,collapseTags:i,selected:o}=a.toRefs(e),l=a.ref(s.value),c=a.ref(),d=a.ref(null),f=a.computed(()=>o.value.slice(d.value,o.value.length).map(T=>r==null?void 0:r.handleGetLabelByValue(T.value)).join(", "));a.watch(s,()=>{l.value=s.value}),a.watch([o,i],()=>{C()},{flush:"post"});const u=T=>{t("remove",T)},h=()=>{var T;(T=c.value)==null||T.focus()},p=()=>{var T;(T=c.value)==null||T.blur()},g=T=>{t("update:modelValue",T)},v=T=>{t("update:modelValue",T.target.value)},b=T=>{switch(T.code){case"NumpadEnter":case"Enter":{t("enter",T.target.value,T);break}}t("keydown",T.target.value,T)},y=a.ref([]),N=a.ref(),w=T=>y.value.map(V=>V==null?void 0:V.$el).filter(V=>!!V),C=()=>{i.value&&(d.value=null,setTimeout(()=>{var V,_;const T=w(),O=T.findIndex((L,I)=>I?T[I-1].offsetTop!==L.offsetTop:!1);d.value=O>0?O:null,((V=T[d.value])==null?void 0:V.offsetTop)!==((_=N.value)==null?void 0:_.offsetTop)&&d.value>1&&(d.value-=1)}))},S=gr(C,150),x=a.ref(),E=new ResizeObserver(()=>{S()});return a.onMounted(()=>{x.value&&E.observe(x.value)}),a.onBeforeUnmount(()=>{x.value&&E.unobserve(x.value)}),{collapseTagRef:N,tagWrapperRef:x,tagsRefs:y,select:r,overflowTagIndex:d,value:l,inputRef:c,overflowContent:f,handleRemoveTag:u,focus:h,blur:p,updateModelValue:g,handleInput:v,handleKeydown:b,resolveClassName:n}},render(){var s,i,o,l,c,d,f,u;const e=(i=(s=this.$slots)==null?void 0:s.prefix)==null?void 0:i.call(s),t=Ae({[this.resolveClassName("select-tag")]:!0,[this.resolveClassName("select-tag--default")]:!0,"is-disabled":this.disabled,"collapse-tag":this.collapseTags,"has-prefix":!!e,"is-simplicity":this.behavior==="simplicity"}),n=Ae({[this.resolveClassName("select-tag-wrapper")]:!0}),r={display:this.selected.length&&!this.filterable?"none":""};return a.createVNode("div",{ref:"tagWrapperRef",class:t},[(l=(o=this.$slots)==null?void 0:o.prefix)==null?void 0:l.call(o),a.createVNode("div",{class:n},[((d=(c=this.$slots).default)==null?void 0:d.call(c))??this.selected.map((h,p)=>a.createVNode(ws,{key:h.value,ref:g=>this.tagsRefs[p]=g,style:{display:this.collapseTags&&this.overflowTagIndex&&p>=this.overflowTagIndex?"none":""},theme:this.tagTheme,closable:!0,onClose:()=>this.handleRemoveTag(h.value)},{default:()=>{var g,v;return[((v=(g=this.$slots).tagRender)==null?void 0:v.call(g,h))??a.createVNode(Kp,{type:"tips"},{default:()=>{var b;return[(b=this.select)==null?void 0:b.handleGetLabelByValue(h.value)]}})]}})),a.withDirectives(a.createVNode(ws,{ref:"collapseTagRef",style:{display:this.overflowTagIndex&&this.collapseTags?"":"none"},class:this.resolveClassName("select-overflow-tag")},{default:()=>[a.createTextVNode("+"),this.selected.length-this.overflowTagIndex]}),[[a.resolveDirective("bk-tooltips"),{content:this.overflowContent,disabled:!this.overflowTagIndex||!this.collapseTags,extCls:this.resolveClassName("select-tooltips")}]]),a.createVNode("input",{ref:"inputRef",style:r,class:this.resolveClassName("select-tag-input"),disabled:this.disabled,placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,type:"text",value:this.filterable?this.value:"",onInput:this.handleInput,onKeydown:this.handleKeydown},null)]),(u=(f=this.$slots)==null?void 0:f.suffix)==null?void 0:u.call(f)])}}),CN=a.defineComponent({name:"Select",directives:{clickoutside:Ln},props:{modelValue:m.any,multiple:m.bool.def(!1),disabled:m.bool.def(!1),size:m.size().def(c0.DEFAULT),clearable:m.bool.def(!0),loading:m.bool.def(!1),filterable:m.bool.def(!1),remoteMethod:m.func,scrollHeight:m.number.def(204),minHeight:m.number,showAll:m.bool.def(!1),allOptionText:m.string.def(""),allOptionId:m.oneOfType([m.number,m.string]),showSelectAll:m.bool.def(!1),popoverMinWidth:m.number.def(0),showOnInit:m.bool.def(!1),multipleMode:m.oneOf(["default","tag"]).def("default"),tagTheme:vo(),behavior:d0(),collapseTags:m.bool.def(!1),autoHeight:m.bool.def(!0),noDataText:m.string,noMatchText:m.string,loadingText:m.string,placeholder:m.string,searchPlaceholder:m.string,selectAllText:m.string,scrollLoading:m.bool.def(!1),allowCreate:m.bool.def(!1),popoverOptions:Object,customContent:m.bool.def(!1),list:m.arrayOf(m.any).def([]),idKey:m.string.def("value"),displayKey:m.string.def("label"),withValidate:m.bool.def(!0),showSelectedIcon:m.bool.def(!0),inputSearch:m.bool.def(!1),enableVirtualRender:m.bool.def(!1),allowEmptyValues:m.array.def([]),autoFocus:m.bool.def(!1),disableFocusBehavior:m.bool.def(!1),keepSearchValue:m.bool.def(!1),prefix:m.string,selectedStyle:M8(),filterOption:{type:Function},searchWithPinyin:m.bool.def(!0),highlightKeyword:m.bool.def(!1),trigger:{type:String,default:"default"},disableScrollToSelectedOption:m.bool.def(!1),inputTooltipsOptions:{type:Object,default:()=>({})}},emits:["update:modelValue","change","toggle","clear","scroll-end","focus","blur","tag-remove","select","deselect","search-change"],setup(e,{emit:t}){const n=Be("select"),{resolveClassName:r}=he(),{modelValue:s,disabled:i,filterable:o,multiple:l,remoteMethod:c,loading:d,popoverMinWidth:f,showOnInit:u,multipleMode:h,allowCreate:p,customContent:g,showSelectedIcon:v,inputSearch:b,enableVirtualRender:y,showSelectAll:N,showAll:w,allOptionId:C,scrollHeight:S,list:x,displayKey:E,idKey:T,collapseTags:O,autoHeight:V,popoverOptions:_,allowEmptyValues:L,autoFocus:I,keepSearchValue:R,selectedStyle:M,filterOption:j,searchWithPinyin:H,highlightKeyword:A,disableFocusBehavior:P,trigger:B,disableScrollToSelectedOption:z}=a.toRefs(e),D=a.ref(null),k=a.computed(()=>e.allOptionText),G=a.computed(()=>e.noDataText===void 0?n.value.noData:e.noDataText),U=a.computed(()=>e.noMatchText===void 0?n.value.noMatchedData:e.noMatchText),te=a.computed(()=>e.loadingText===void 0?n.value.loading:e.loadingText),$=a.computed(()=>e.placeholder===void 0?n.value.pleaseSelect:e.placeholder),Q=a.computed(()=>e.searchPlaceholder===void 0?n.value.enterKeywords:e.searchPlaceholder),ne=a.computed(()=>e.selectAllText===void 0?n.value.selectAll:e.selectAllText),le=on(),ae=a.ref(),X=a.ref(),J=a.ref(),Y=a.ref(),oe=a.ref(),pe=a.ref(),Z=a.ref(),ce=a.ref(new Map),ie=a.computed(()=>[...ce.value.values()].sort((ve,Ne)=>ve.order-Ne.order)),F=a.ref(new Map),K=a.ref([]),W=a.computed(()=>K.value.reduce((ve,Ne)=>(ve[Ne.value]=Ne.label,ve),{[`${C.value}`]:n.value.all})),q=a.ref(),se=a.computed(()=>x.value.reduce((ve,Ne)=>(ve[Ne[T.value]]=Ne[E.value],ve),{}));a.watch([ce,x],()=>{ti()}),a.watch(s,()=>{var ve;ti(),e.withValidate&&((ve=le==null?void 0:le.validate)==null||ve.call(le,"change"))},{deep:!0}),a.watch(K,()=>{var ve;(ve=Z.value)==null||ve.updatePopover(null,yr.value)});const fe=a.computed(()=>ke.value?x.value:x.value.filter(ve=>Oe(ze.value,String(ve[E.value]),ve))),ee=a.computed(()=>i.value||d.value),de=a.computed(()=>K.value.map(ve=>{var Ne,_e;return((_e=(Ne=ce.value)==null?void 0:Ne.get(ve.value))==null?void 0:_e.optionName)||se.value[ve.value]||ve.label})),ue=a.computed(()=>{const ve=ie.value.reduce((Ne,_e)=>(_e.disabled||Ne.push(_e.optionID),Ne),[]);return ve.length<=K.value.length&&ve.every(Ne=>K.value.some(_e=>_e.value===Ne))}),ge=a.computed(()=>{var ve;return K.value.length===1&&((ve=K.value[0])==null?void 0:ve.value)===C.value}),Se=a.computed(()=>!!F.value.size),Le=a.computed(()=>!ie.value.length),Ve=a.computed(()=>ie.value.length&&ie.value.every(ve=>!ve.visible)),ke=a.computed(()=>o.value&&typeof c.value=="function"),Me=a.computed(()=>!!(j.value&&typeof j.value=="function")),at=a.computed(()=>!(tt.value||Le.value||Ve.value)||g.value),Ue=a.computed(()=>l.value&&N.value&&(!ze.value||!o.value)),ft=a.computed(()=>l.value&&w.value),We=a.computed(()=>S.value-12-(Ue.value?32:0)),Pe=a.ref(32),Fe=a.computed(()=>y.value?fe.value.length*Pe.value>We.value:!1),Xn=a.computed(()=>Math.ceil(We.value/Pe.value)),dn=a.computed(()=>tt.value?te.value:Ve.value||x.value.length&&!fe.value.length?U.value:Le.value?G.value:""),Ur=a.computed(()=>V.value?O.value&&!mn.value:O.value),yr=a.computed(()=>ks({theme:`light ${r("select-popover")}`,trigger:"manual",width:Va.value,arrow:!1,placement:"bottom-start",isShow:mn.value,reference:pe.value,offset:4,popoverDelay:0,renderType:go.AUTO,referenceCls:r("select-popover-reference")},_.value)),{register:Je,unregister:fn}=Vf(ce),{register:wl,unregister:Ks}=Vf(F),{isHover:La,setHover:Ys,cancelHover:Xs}=Zp(),br=a.ref(!1),kt=()=>{br.value||(br.value=!0,t("focus"))},hn=()=>{br.value&&(br.value=!1,ei(),t("blur"))},{popperWidth:Va,isPopoverShow:mn,hidePopover:Wr,showPopover:Da,togglePopover:Yt}=hC({popoverMinWidth:f.value},X),wr=()=>{B.value!=="manual"&&Wr()},Js=()=>{B.value!=="manual"&&Da()},ka=a.computed(()=>o.value&&b.value&&mn.value||p.value);a.watch(mn,ve=>{t("toggle",mn.value),ve?(document.addEventListener("keydown",Rh),setTimeout(()=>{kn(),Qs(),Zs()},10)):(R.value||(we.value=""),document.removeEventListener("keydown",Rh))});const Zs=()=>{var Ne,_e,qe;if(Fe.value||z.value)return;const ve=(_e=(Ne=J.value)==null?void 0:Ne.querySelectorAll)==null?void 0:_e.call(Ne,".is-selected");(qe=ve==null?void 0:ve[0])==null||qe.scrollIntoView({block:"center"})},Qs=()=>{var _e;const ve=K.value[0],Ne=ce.value.get(ve==null?void 0:ve.value);Ne&&!Ne.disabled&&Ne.visible?q.value=ve==null?void 0:ve.value:q.value=(_e=ie.value.find(qe=>!qe.disabled&&qe.visible))==null?void 0:_e.optionID},Oe=(ve,Ne,_e={})=>{var qe,Rn;if(Me.value)return!!j.value(ve,{..._e});if(H.value){const In=Li.parse(Ne).map(Zn=>Zn.type===2?Zn.target.toLowerCase():Zn.target),ni=In.reduce((Zn,mt)=>Zn+mt[0],"");return In.join("").indexOf(ve)!==-1||ni.indexOf(ve)!==-1||((qe=qr(String(Ne)))==null?void 0:qe.includes(qr(ve)))}return(Rn=qr(String(Ne)))==null?void 0:Rn.includes(qr(ve))},re=ve=>{o.value&&(ve?ie.value.forEach(Ne=>{Ne.visible=Oe(ve,String(Ne.optionName),{...Ne.$props,...Ne.$attrs})}):ie.value.forEach(Ne=>{Ne.visible=!0}))},{searchValue:we,customOptionName:Te,curSearchValue:ze,searchLoading:tt}=mC(ke.value?c.value:re,Qs);a.watch(we,()=>{oe.value.scrollTop=0,q.value="",t("search-change",we.value)});const He=ve=>{ve!==s.value&&(t("update:modelValue",ve,s.value),t("change",ve,s.value),ti(),l.value&&(Te.value=""))},ht=()=>{ee.value||B.value==="manual"||(kt(),Yt())},Xt=ve=>{o.value&&(Te.value=ve)},Cr=(ve,Ne)=>{const _e=String(ve);if(!p.value||!_e)return;Ne.stopPropagation(),Ne.preventDefault();const qe=ie.value.find(In=>qr(String(In.optionName))===qr(_e));if(o.value&&qe){Jn(qe);return}ce.value.get(_e)||(l.value?(K.value.push({value:_e,label:_e}),He(K.value.map(In=>In.value))):(K.value=[{value:_e,label:_e}],He(_e),wr()))},Jn=ve=>{if(ee.value||!ve)return;const Ne=K.value.findIndex(_e=>_e.value===C.value);if(Ne>-1&&K.value.splice(Ne,1),l.value){const _e=K.value.findIndex(qe=>qe.value===ve.optionID);_e>-1?(K.value.splice(_e,1),He(K.value.map(qe=>qe.value)),t("deselect",ve.optionID)):(K.value.push({value:ve.optionID,label:ve.optionName||ve.optionID}),He(K.value.map(qe=>qe.value)),t("select",ve.optionID),st()),kn()}else K.value=[{label:ve.optionName||ve.optionID,value:ve.optionID}],He(ve.optionID),t("select",ve.optionID),wr(),hn()},st=()=>{var ve;["tag"].includes(h.value)&&ka.value&&((ve=pe.value)==null||ve.updateModelValue(""))},kn=()=>{P.value||setTimeout(()=>{var ve,Ne,_e;!b.value&&!p.value?(ve=Y.value)==null||ve.focus():h.value==="tag"?(Ne=pe.value)==null||Ne.focus():(_e=ae.value)==null||_e.focus()},0)},ei=()=>{setTimeout(()=>{var ve,Ne;h.value==="tag"?(ve=pe.value)==null||ve.blur():(Ne=ae.value)==null||Ne.blur()},0)},R4=ve=>{ve.stopPropagation(),K.value=[],Te.value="",st(),He(l.value?[]:""),t("clear",l.value?[]:""),wr()},I4=()=>{q.value=""},P4=()=>{var ve;if(ue.value)K.value=[];else{const Ne=new Map;ie.value.forEach(_e=>{_e.disabled||Ne.has(_e.optionID)||Ne.set(_e.optionID,_e.optionName||_e.optionID)}),(ve=x.value)==null||ve.forEach(_e=>{_e.disabled||Ne.has(_e[T.value])||Ne.set(_e[T.value],_e[E.value])}),K.value=Array.from(Ne.keys()).map(_e=>({value:_e,label:Ne.get(_e)}))}He(K.value.map(Ne=>Ne.value)),kn()},M4=()=>{if(!ft.value)return;K.value.findIndex(Ne=>Ne.value===C.value)>-1?K.value=[]:K.value=[{value:C.value,label:n.value.all}],He(K.value.map(Ne=>Ne.value)),kn()},$4=ve=>{const{scrollTop:Ne,clientHeight:_e,scrollHeight:qe}=ve.target;Ne+_e===qe&&t("scroll-end")},F4=ve=>{if(ee.value)return;const Ne=K.value.findIndex(_e=>_e.value===ve);Ne>-1&&(K.value.splice(Ne,1),He(K.value.map(_e=>_e.value)),t("tag-remove",ve))},Cl=ve=>{var _e,qe;let Ne=ve;if(typeof Ne=="object"){for(const Rn of ce.value.keys())if(ch(Rn,Ne)){Ne=Rn;break}}return((qe=(_e=ce.value)==null?void 0:_e.get(Ne))==null?void 0:qe.optionName)||se.value[Ne]||W.value[Ne]||Ne},ti=()=>{Array.isArray(s.value)?K.value=[...s.value.map(ve=>({value:ve,label:Cl(ve)}))]:s.value||L.value.includes(s.value)?K.value=[{value:s.value,label:Cl(s.value)}]:K.value=[]},H4=ve=>{K.value=ve.map(Ne=>({label:Ne[E.value],value:Ne[T.value]}))},Rh=ve=>{var qe,Rn,In,ni,Zn;if(!mn.value||Fe.value)return;const Ne=ie.value.filter(mt=>!mt.disabled&&mt.visible),_e=Ne.findIndex(mt=>mt.optionID===q.value);switch(ve.code){case"ArrowUp":case"ArrowDown":{ve.preventDefault();let mt=0;ve.code==="ArrowDown"?mt=_e>=Ne.length-1?0:_e+1:mt=_e===0?Ne.length-1:_e-1,pC((qe=Ne[mt])==null?void 0:qe.$el,J.value)||(In=(Rn=Ne[mt])==null?void 0:Rn.$el)==null||In.scrollIntoView(),q.value=(ni=Ne[mt])==null?void 0:ni.optionID;break}case"Backspace":{if(!l.value||!K.value.length||Te.value.length||ve.target===Y.value)return;K.value.pop(),He(K.value.map(mt=>mt.value));break}case"NumpadEnter":case"Enter":{const{value:mt}=ve.target;if(p.value&&mt||ve.target===Y.value&&((Zn=Y.value)!=null&&Zn.value))return;const z4=ce.value.get(q.value);Jn(z4);break}}},B4=({event:ve})=>{var _e;const{target:Ne}=ve;(_e=X.value)!=null&&_e.contains(Ne)||X.value===Ne||(wr(),hn())};return a.provide(sl,a.reactive({multiple:l,selected:K,activeOptionValue:q,showSelectedIcon:v,selectedStyle:M,curSearchValue:ze,highlightKeyword:A,register:Je,unregister:fn,registerGroup:wl,unregisterGroup:Ks,handleOptionSelected:Jn,handleGetLabelByValue:Cl})),a.onMounted(()=>{ti(),setTimeout(()=>{u.value&&Js(),I.value&&kn()})}),{t:n,selected:K,isInput:ka,options:ie,isDisabled:ee,selectedLabel:de,isPopoverShow:mn,isHover:La,popperWidth:Va,inputRef:ae,triggerRef:X,contentRef:J,searchRef:Y,scrollContainerRef:oe,selectTagInputRef:pe,popoverRef:Z,searchLoading:tt,isOptionsEmpty:Le,isSearchEmpty:Ve,isFocus:br,isShowSelectContent:at,curContentText:dn,isGroup:Se,searchValue:we,curSearchValue:ze,customOptionName:Te,isShowAll:ft,isShowSelectAll:Ue,virtualHeight:We,filterList:fe,isCollapseTags:Ur,popoverConfig:yr,isAllSelected:ue,isAll:ge,displayAllText:k,focusInput:kn,setHover:Ys,cancelHover:Xs,handleFocus:kt,handleBlur:hn,handleTogglePopover:ht,handleClear:R4,hidePopover:Wr,showPopover:Da,toggleSelectAll:P4,toggleAll:M4,handleOptionSelected:Jn,handleClickOutside:B4,handleScroll:$4,handleDeleteTag:F4,handleInputChange:Xt,handleSelectedAllOptionMouseEnter:I4,localLoadingText:te,localPlaceholder:$,localSearchPlaceholder:Q,localSelectAllText:ne,resolveClassName:r,handleCreateCustomOption:Cr,handlePopoverShown:()=>{var ve;(ve=D.value)==null||ve.scrollTo(0,1)},virtualLineHeight:Pe,isEnableVirtualRender:Fe,preloadItemCount:Xn,virtualRenderRef:D,setSelected:H4}},render(){const e=Ae({[`${this.resolveClassName("select")}`]:!0,"popover-show":this.isPopoverShow,"is-disabled":this.isDisabled,"is-focus":this.isFocus,"is-filterable":this.filterable,[this.size]:!0,[this.behavior]:!0}),t=()=>{var u,h,p;return this.loading?a.createVNode(ur,{class:"spinner",loading:!0,mode:"spin",size:"mini",theme:"primary"},null):this.clearable&&this.isHover&&this.selected.length&&!this.isDisabled||this.allowCreate&&this.isHover&&this.customOptionName&&!this.isDisabled?a.createVNode(Vt,{class:"clear-icon",onClick:this.handleClear},null):(u=this.$slots)!=null&&u.suffix?a.createVNode("span",{class:"angle-down"},[(p=(h=this.$slots)==null?void 0:h.suffix)==null?void 0:p.call(h)]):a.createVNode(Sa,{class:"angle-down"},null)},n=()=>{var u;return this.prefix?()=>a.createVNode("div",{class:`${this.resolveClassName("select--prefix-area")}`},[a.createVNode("span",null,[this.prefix])]):(u=this.$slots)!=null&&u.prefix?()=>{var h,p;return(p=(h=this.$slots)==null?void 0:h.prefix)==null?void 0:p.call(h)}:void 0},r=()=>{if(this.isShowSelectAll)return a.createVNode("li",{class:this.resolveClassName("select-option"),onClick:this.toggleSelectAll,onMouseenter:this.handleSelectedAllOptionMouseEnter},[this.selectedStyle==="checkbox"&&a.createVNode(Ct,{class:this.resolveClassName("select-checkbox"),indeterminate:!this.isAllSelected&&!!this.selected.length&&!this.isAll,modelValue:this.isAllSelected},null),this.localSelectAllText])},s=()=>{var u,h;return((h=(u=this.$slots)==null?void 0:u.allOptionIcon)==null?void 0:h.call(u))||a.createVNode(Jo,{class:"select-all-icon"},null)},i=()=>a.createVNode("span",null,[this.displayAllText||this.t.all]),o=()=>{var u;if(this.isShowAll)return a.createVNode("div",{class:this.resolveClassName("select-all")},[a.createVNode("div",{class:["wrapper",this.selected.length===1&&((u=this.selected[0])==null?void 0:u.value)===this.allOptionId?"active":""],onClick:this.toggleAll},[s(),i()])])},l=()=>{var u,h,p;return this.multipleMode==="tag"?a.createVNode(wN,{ref:"selectTagInputRef",modelValue:this.customOptionName,"onUpdate:modelValue":g=>this.customOptionName=g,behavior:this.behavior,collapseTags:this.isCollapseTags,disabled:this.isDisabled,filterable:this.isInput,placeholder:this.localPlaceholder,selected:this.selected,tagTheme:this.tagTheme,onEnter:this.handleCreateCustomOption,onRemove:this.handleDeleteTag},{prefix:n(),default:((u=this.$slots)==null?void 0:u.tag)&&(()=>{var g;return(g=this.$slots)==null?void 0:g.tag({selected:this.selected})}),tagRender:((h=this.$slots)==null?void 0:h.tagRender)&&(g=>{var v;return(v=this.$slots)==null?void 0:v.tagRender(g)}),suffix:()=>t()}):a.createVNode(hr,a.mergeProps({ref:"inputRef",behavior:this.behavior,disabled:this.isDisabled,modelValue:this.isInput&&this.customOptionName?this.customOptionName:this.selectedLabel.join(","),placeholder:this.isInput?this.selectedLabel.join(",")||this.localPlaceholder:this.localPlaceholder,readonly:!this.isInput,selectReadonly:!0,size:this.size,stopPropagation:!1,tooltipsOptions:this.inputTooltipsOptions,type:"text",withValidate:!1,onEnter:this.handleCreateCustomOption,onInput:this.handleInputChange},this.prefix?{prefix:this.prefix}:null),{...typeof((p=this.$slots)==null?void 0:p.prefix)=="function"?{prefix:()=>{var g,v;return(v=(g=this.$slots)==null?void 0:g.prefix)==null?void 0:v.call(g)}}:null,suffix:()=>t()})},c=()=>{var u,h;return a.createVNode("div",{ref:"triggerRef",style:{height:this.autoHeight&&this.collapseTags?"32px":""},class:this.resolveClassName("select-trigger"),onClick:this.handleTogglePopover,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[((h=(u=this.$slots)==null?void 0:u.trigger)==null?void 0:h.call(u,{selected:this.selected}))||l()])},d=()=>this.isEnableVirtualRender?a.createVNode(Ws,{ref:"virtualRenderRef",height:this.virtualHeight,lineHeight:this.virtualLineHeight,list:this.filterList,preloadItemCount:this.preloadItemCount,scrollbar:{enabled:!0,size:"small"}},{default:({data:u})=>{var p,g;const h=((p=this.$slots)==null?void 0:p.optionRender)||((g=this.$slots)==null?void 0:g.virtualScrollRender);return u.map(v=>a.createVNode(Gi,{id:v[this.idKey],key:v[this.idKey],disabled:!!v.disabled,name:v[this.displayKey]},typeof h=="function"?{default:()=>h({item:v})}:null))}}):this.filterList.map(u=>{var p,g;const h=((p=this.$slots)==null?void 0:p.optionRender)||((g=this.$slots)==null?void 0:g.virtualScrollRender);return a.createVNode(Gi,{id:u[this.idKey],key:u[this.idKey],disabled:!!u.disabled,name:u[this.displayKey]},typeof h=="function"?{default:()=>h({item:u})}:null)}),f=()=>{var u,h,p,g;return a.createVNode("div",{ref:"contentRef",class:this.resolveClassName("select-content-wrapper")},[o(),this.filterable&&!this.inputSearch&&a.createVNode("div",{class:this.resolveClassName("select-search-wrapper")},[a.createVNode(jr,{width:16,height:16,class:"icon-search"},null),a.withDirectives(a.createVNode("input",{ref:"searchRef",class:this.resolveClassName("select-search-input"),"onUpdate:modelValue":v=>this.searchValue=v,placeholder:this.localSearchPlaceholder},null),[[a.vModelText,this.searchValue]])]),!this.isShowSelectContent&&a.createVNode("div",{class:this.resolveClassName("select-empty")},[this.searchLoading&&a.createVNode(ur,{class:"mr5",loading:!0,mode:"spin",size:"mini",theme:"primary"},null),a.createVNode("span",null,[this.curContentText])]),a.createVNode("div",{class:this.resolveClassName("select-content")},[a.createVNode("div",{ref:"scrollContainerRef",style:{maxHeight:`${this.scrollHeight}px`,minHeight:`${this.minHeight}px`},class:this.isEnableVirtualRender?"":this.resolveClassName("select-dropdown"),onScroll:this.handleScroll},[a.createVNode("ul",{class:this.resolveClassName("select-options")},[r(),d(),(h=(u=this.$slots)==null?void 0:u.default)==null?void 0:h.call(u),this.scrollLoading&&a.createVNode("li",{class:this.resolveClassName("select-options-loading")},[a.createVNode(ur,{class:"spinner mr5",loading:!0,mode:"spin",size:"mini",theme:"primary"},null),a.createVNode("span",null,[this.localLoadingText])])])]),((p=this.$slots)==null?void 0:p.extension)&&a.createVNode("div",{class:this.resolveClassName("select-extension")},[(g=this.$slots)==null?void 0:g.extension()])])])};return a.createVNode("div",{class:e},[a.createVNode(Dt,a.mergeProps(this.popoverConfig,{ref:"popoverRef",onAfterShow:this.handlePopoverShown,onClickoutside:this.handleClickOutside}),{default:()=>c(),content:()=>f()})])}}),hh=St(CN,{Option:Gi,Group:HC}),Pn=10;function NN(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 i=[];if(t.pageSize>0)for(let o=0;o<t.totalSize;o+=t.pageSize)i.push(s.slice(o,o+t.pageSize));t.renderListPaged.splice(0,t.renderListPaged.length,...i),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 xN(e){const{useGroup:t,saveKey:n,displayKey:r,list:s}=a.toRefs(e),i=a.ref([]),o=a.ref({});return a.watch([t,n,r,s],()=>{i.value=[];let l=a.markRaw(s.value);t.value&&(l=l.reduce((c,d)=>{let f=[];return d.children&&(f=d.children.map(u=>({group:{groupId:d[n.value],groupName:d[r.value]},...u}))),c.concat(f)},[])),i.value=l,o.value=l.reduce((c,d)=>(c[d[n.value]]=d,c),{})},{immediate:!0,deep:!0}),{flatList:i,saveKeyMap:o}}const e6=e=>{const t=e.length;let n=0;for(let r=0;r<t;r++)(e.charCodeAt(r)&65280)!==0&&(n+=1),n+=1;return n},pg=(e,t,n)=>{a.watch([n,t],()=>{s()},{flush:"post"});const r=a.ref(null),s=()=>{t.value&&(r.value=null,setTimeout(()=>{const i=Array.from(e.value.querySelectorAll(".tag-item")),o=i.findIndex((l,c)=>c?i[c-1].offsetTop!==l.offsetTop:!1);r.value=o>0?o-1:null}))};return{overflowTagIndex:r}};var nd,t6;function SN(){if(t6)return nd;t6=1;function e(t,n){for(var r=-1,s=t==null?0:t.length,i=Array(s);++r<s;)i[r]=n(t[r],r,t);return i}return nd=e,nd}var rd,n6;function gg(){if(n6)return rd;n6=1;var e=_s(),t=SN(),n=un(),r=fo(),s=e?e.prototype:void 0,i=s?s.toString:void 0;function o(l){if(typeof l=="string")return l;if(n(l))return t(l,o)+"";if(r(l))return i?i.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return rd=o,rd}var ad,r6;function TN(){if(r6)return ad;r6=1;function e(t,n,r){var s=-1,i=t.length;n<0&&(n=-n>i?0:i+n),r=r>i?i:r,r<0&&(r+=i),i=n>r?0:r-n>>>0,n>>>=0;for(var o=Array(i);++s<i;)o[s]=t[s+n];return o}return ad=e,ad}var sd,a6;function _N(){if(a6)return sd;a6=1;var e=TN();function t(n,r,s){var i=n.length;return s=s===void 0?i:s,!r&&s>=i?n:e(n,r,s)}return sd=t,sd}var id,s6;function EN(){if(s6)return id;s6=1;function e(t,n,r,s){for(var i=t.length,o=r+(s?1:-1);s?o--:++o<i;)if(n(t[o],o,t))return o;return-1}return id=e,id}var od,i6;function ON(){if(i6)return od;i6=1;function e(t){return t!==t}return od=e,od}var ld,o6;function AN(){if(o6)return ld;o6=1;function e(t,n,r){for(var s=r-1,i=t.length;++s<i;)if(t[s]===n)return s;return-1}return ld=e,ld}var cd,l6;function vg(){if(l6)return cd;l6=1;var e=EN(),t=ON(),n=AN();function r(s,i,o){return i===i?n(s,i,o):e(s,t,o)}return cd=r,cd}var ud,c6;function LN(){if(c6)return ud;c6=1;var e=vg();function t(n,r){for(var s=n.length;s--&&e(r,n[s],0)>-1;);return s}return ud=t,ud}var dd,u6;function VN(){if(u6)return dd;u6=1;var e=vg();function t(n,r){for(var s=-1,i=n.length;++s<i&&e(r,n[s],0)>-1;);return s}return dd=t,dd}var fd,d6;function DN(){if(d6)return fd;d6=1;function e(t){return t.split("")}return fd=e,fd}var hd,f6;function kN(){if(f6)return hd;f6=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",s=t+n+r,i="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+s+i+"]");function c(d){return l.test(d)}return hd=c,hd}var md,h6;function RN(){if(h6)return md;h6=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",s=t+n+r,i="\\ufe0e\\ufe0f",o="["+e+"]",l="["+s+"]",c="\\ud83c[\\udffb-\\udfff]",d="(?:"+l+"|"+c+")",f="[^"+e+"]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",g=d+"?",v="["+i+"]?",b="(?:"+p+"(?:"+[f,u,h].join("|")+")"+v+g+")*",y=v+g+b,N="(?:"+[f+l+"?",l,u,h,o].join("|")+")",w=RegExp(c+"(?="+c+")|"+N+y,"g");function C(S){return S.match(w)||[]}return md=C,md}var pd,m6;function IN(){if(m6)return pd;m6=1;var e=DN(),t=kN(),n=RN();function r(s){return t(s)?n(s):e(s)}return pd=r,pd}var gd,p6;function yg(){if(p6)return gd;p6=1;var e=gg();function t(n){return n==null?"":e(n)}return gd=t,gd}var vd,g6;function PN(){if(g6)return vd;g6=1;var e=gg(),t=Mm(),n=_N(),r=LN(),s=VN(),i=IN(),o=yg();function l(c,d,f){if(c=o(c),c&&(f||d===void 0))return t(c);if(!c||!(d=e(d)))return c;var u=i(c),h=i(d),p=s(u,h),g=r(u,h)+1;return n(u,p,g).join("")}return vd=l,vd}var MN=PN();const $N=lt(MN);/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:bg,setPrototypeOf:v6,isFrozen:FN,getPrototypeOf:HN,getOwnPropertyDescriptor:BN}=Object;let{freeze:Nt,seal:Kt,create:wg}=Object,{apply:Df,construct:kf}=typeof Reflect<"u"&&Reflect;Nt||(Nt=function(t){return t});Kt||(Kt=function(t){return t});Df||(Df=function(t,n,r){return t.apply(n,r)});kf||(kf=function(t,n){return new t(...n)});const hi=xt(Array.prototype.forEach),zN=xt(Array.prototype.lastIndexOf),y6=xt(Array.prototype.pop),Pa=xt(Array.prototype.push),jN=xt(Array.prototype.splice),Vi=xt(String.prototype.toLowerCase),yd=xt(String.prototype.toString),b6=xt(String.prototype.match),Ma=xt(String.prototype.replace),UN=xt(String.prototype.indexOf),WN=xt(String.prototype.trim),en=xt(Object.prototype.hasOwnProperty),gt=xt(RegExp.prototype.test),$a=qN(TypeError);function xt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return Df(e,t,r)}}function qN(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return kf(e,n)}}function $e(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Vi;v6&&v6(e,null);let r=t.length;for(;r--;){let s=t[r];if(typeof s=="string"){const i=n(s);i!==s&&(FN(t)||(t[r]=i),s=i)}e[s]=!0}return e}function GN(e){for(let t=0;t<e.length;t++)en(e,t)||(e[t]=null);return e}function $n(e){const t=wg(null);for(const[n,r]of bg(e))en(e,n)&&(Array.isArray(r)?t[n]=GN(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=$n(r):t[n]=r);return t}function Fa(e,t){for(;e!==null;){const r=BN(e,t);if(r){if(r.get)return xt(r.get);if(typeof r.value=="function")return xt(r.value)}e=HN(e)}function n(){return null}return n}const w6=Nt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),bd=Nt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),wd=Nt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),KN=Nt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Cd=Nt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),YN=Nt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),C6=Nt(["#text"]),N6=Nt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Nd=Nt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),x6=Nt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),mi=Nt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),XN=Kt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),JN=Kt(/<%[\w\W]*|[\w\W]*%>/gm),ZN=Kt(/\$\{[\w\W]*/gm),QN=Kt(/^data-[\-\w.\u00B7-\uFFFF]+$/),ex=Kt(/^aria-[\-\w]+$/),Cg=Kt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tx=Kt(/^(?:\w+script|data):/i),nx=Kt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ng=Kt(/^html$/i),rx=Kt(/^[a-z][.\w]*(-[.\w]+)+$/i);var S6=Object.freeze({__proto__:null,ARIA_ATTR:ex,ATTR_WHITESPACE:nx,CUSTOM_ELEMENT:rx,DATA_ATTR:QN,DOCTYPE_NAME:Ng,ERB_EXPR:JN,IS_ALLOWED_URI:Cg,IS_SCRIPT_OR_DATA:tx,MUSTACHE_EXPR:XN,TMPLIT_EXPR:ZN});const Ha={element:1,text:3,progressingInstruction:7,comment:8,document:9},ax=function(){return typeof window>"u"?null:window},sx=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(r=n.getAttribute(s));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},T6=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function xg(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ax();const t=Oe=>xg(Oe);if(t.version="3.2.6",t.removed=[],!e||!e.document||e.document.nodeType!==Ha.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const r=n,s=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:h,trustedTypes:p}=e,g=c.prototype,v=Fa(g,"cloneNode"),b=Fa(g,"remove"),y=Fa(g,"nextSibling"),N=Fa(g,"childNodes"),w=Fa(g,"parentNode");if(typeof o=="function"){const Oe=n.createElement("template");Oe.content&&Oe.content.ownerDocument&&(n=Oe.content.ownerDocument)}let C,S="";const{implementation:x,createNodeIterator:E,createDocumentFragment:T,getElementsByTagName:O}=n,{importNode:V}=r;let _=T6();t.isSupported=typeof bg=="function"&&typeof w=="function"&&x&&x.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:L,ERB_EXPR:I,TMPLIT_EXPR:R,DATA_ATTR:M,ARIA_ATTR:j,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:A,CUSTOM_ELEMENT:P}=S6;let{IS_ALLOWED_URI:B}=S6,z=null;const D=$e({},[...w6,...bd,...wd,...Cd,...C6]);let k=null;const G=$e({},[...N6,...Nd,...x6,...mi]);let U=Object.seal(wg(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),te=null,$=null,Q=!0,ne=!0,le=!1,ae=!0,X=!1,J=!0,Y=!1,oe=!1,pe=!1,Z=!1,ce=!1,ie=!1,F=!0,K=!1;const W="user-content-";let q=!0,se=!1,fe={},ee=null;const de=$e({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ue=null;const ge=$e({},["audio","video","img","source","image","track"]);let Se=null;const Le=$e({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",ke="http://www.w3.org/2000/svg",Me="http://www.w3.org/1999/xhtml";let at=Me,Ue=!1,ft=null;const We=$e({},[Ve,ke,Me],yd);let Pe=$e({},["mi","mo","mn","ms","mtext"]),Fe=$e({},["annotation-xml"]);const Xn=$e({},["title","style","font","a","script"]);let dn=null;const Ur=["application/xhtml+xml","text/html"],yr="text/html";let Je=null,fn=null;const wl=n.createElement("form"),Ks=function(re){return re instanceof RegExp||re instanceof Function},La=function(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(fn&&fn===re)){if((!re||typeof re!="object")&&(re={}),re=$n(re),dn=Ur.indexOf(re.PARSER_MEDIA_TYPE)===-1?yr:re.PARSER_MEDIA_TYPE,Je=dn==="application/xhtml+xml"?yd:Vi,z=en(re,"ALLOWED_TAGS")?$e({},re.ALLOWED_TAGS,Je):D,k=en(re,"ALLOWED_ATTR")?$e({},re.ALLOWED_ATTR,Je):G,ft=en(re,"ALLOWED_NAMESPACES")?$e({},re.ALLOWED_NAMESPACES,yd):We,Se=en(re,"ADD_URI_SAFE_ATTR")?$e($n(Le),re.ADD_URI_SAFE_ATTR,Je):Le,ue=en(re,"ADD_DATA_URI_TAGS")?$e($n(ge),re.ADD_DATA_URI_TAGS,Je):ge,ee=en(re,"FORBID_CONTENTS")?$e({},re.FORBID_CONTENTS,Je):de,te=en(re,"FORBID_TAGS")?$e({},re.FORBID_TAGS,Je):$n({}),$=en(re,"FORBID_ATTR")?$e({},re.FORBID_ATTR,Je):$n({}),fe=en(re,"USE_PROFILES")?re.USE_PROFILES:!1,Q=re.ALLOW_ARIA_ATTR!==!1,ne=re.ALLOW_DATA_ATTR!==!1,le=re.ALLOW_UNKNOWN_PROTOCOLS||!1,ae=re.ALLOW_SELF_CLOSE_IN_ATTR!==!1,X=re.SAFE_FOR_TEMPLATES||!1,J=re.SAFE_FOR_XML!==!1,Y=re.WHOLE_DOCUMENT||!1,Z=re.RETURN_DOM||!1,ce=re.RETURN_DOM_FRAGMENT||!1,ie=re.RETURN_TRUSTED_TYPE||!1,pe=re.FORCE_BODY||!1,F=re.SANITIZE_DOM!==!1,K=re.SANITIZE_NAMED_PROPS||!1,q=re.KEEP_CONTENT!==!1,se=re.IN_PLACE||!1,B=re.ALLOWED_URI_REGEXP||Cg,at=re.NAMESPACE||Me,Pe=re.MATHML_TEXT_INTEGRATION_POINTS||Pe,Fe=re.HTML_INTEGRATION_POINTS||Fe,U=re.CUSTOM_ELEMENT_HANDLING||{},re.CUSTOM_ELEMENT_HANDLING&&Ks(re.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=re.CUSTOM_ELEMENT_HANDLING.tagNameCheck),re.CUSTOM_ELEMENT_HANDLING&&Ks(re.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=re.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),re.CUSTOM_ELEMENT_HANDLING&&typeof re.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(U.allowCustomizedBuiltInElements=re.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&(ne=!1),ce&&(Z=!0),fe&&(z=$e({},C6),k=[],fe.html===!0&&($e(z,w6),$e(k,N6)),fe.svg===!0&&($e(z,bd),$e(k,Nd),$e(k,mi)),fe.svgFilters===!0&&($e(z,wd),$e(k,Nd),$e(k,mi)),fe.mathMl===!0&&($e(z,Cd),$e(k,x6),$e(k,mi))),re.ADD_TAGS&&(z===D&&(z=$n(z)),$e(z,re.ADD_TAGS,Je)),re.ADD_ATTR&&(k===G&&(k=$n(k)),$e(k,re.ADD_ATTR,Je)),re.ADD_URI_SAFE_ATTR&&$e(Se,re.ADD_URI_SAFE_ATTR,Je),re.FORBID_CONTENTS&&(ee===de&&(ee=$n(ee)),$e(ee,re.FORBID_CONTENTS,Je)),q&&(z["#text"]=!0),Y&&$e(z,["html","head","body"]),z.table&&($e(z,["tbody"]),delete te.tbody),re.TRUSTED_TYPES_POLICY){if(typeof re.TRUSTED_TYPES_POLICY.createHTML!="function")throw $a('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof re.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $a('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=re.TRUSTED_TYPES_POLICY,S=C.createHTML("")}else C===void 0&&(C=sx(p,s)),C!==null&&typeof S=="string"&&(S=C.createHTML(""));Nt&&Nt(re),fn=re}},Ys=$e({},[...bd,...wd,...KN]),Xs=$e({},[...Cd,...YN]),br=function(re){let we=w(re);(!we||!we.tagName)&&(we={namespaceURI:at,tagName:"template"});const Te=Vi(re.tagName),ze=Vi(we.tagName);return ft[re.namespaceURI]?re.namespaceURI===ke?we.namespaceURI===Me?Te==="svg":we.namespaceURI===Ve?Te==="svg"&&(ze==="annotation-xml"||Pe[ze]):!!Ys[Te]:re.namespaceURI===Ve?we.namespaceURI===Me?Te==="math":we.namespaceURI===ke?Te==="math"&&Fe[ze]:!!Xs[Te]:re.namespaceURI===Me?we.namespaceURI===ke&&!Fe[ze]||we.namespaceURI===Ve&&!Pe[ze]?!1:!Xs[Te]&&(Xn[Te]||!Ys[Te]):!!(dn==="application/xhtml+xml"&&ft[re.namespaceURI]):!1},kt=function(re){Pa(t.removed,{element:re});try{w(re).removeChild(re)}catch{b(re)}},hn=function(re,we){try{Pa(t.removed,{attribute:we.getAttributeNode(re),from:we})}catch{Pa(t.removed,{attribute:null,from:we})}if(we.removeAttribute(re),re==="is")if(Z||ce)try{kt(we)}catch{}else try{we.setAttribute(re,"")}catch{}},Va=function(re){let we=null,Te=null;if(pe)re="<remove></remove>"+re;else{const He=b6(re,/^[\r\n\t ]+/);Te=He&&He[0]}dn==="application/xhtml+xml"&&at===Me&&(re='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+re+"</body></html>");const ze=C?C.createHTML(re):re;if(at===Me)try{we=new h().parseFromString(ze,dn)}catch{}if(!we||!we.documentElement){we=x.createDocument(at,"template",null);try{we.documentElement.innerHTML=Ue?S:ze}catch{}}const tt=we.body||we.documentElement;return re&&Te&&tt.insertBefore(n.createTextNode(Te),tt.childNodes[0]||null),at===Me?O.call(we,Y?"html":"body")[0]:Y?we.documentElement:tt},mn=function(re){return E.call(re.ownerDocument||re,re,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Wr=function(re){return re instanceof u&&(typeof re.nodeName!="string"||typeof re.textContent!="string"||typeof re.removeChild!="function"||!(re.attributes instanceof f)||typeof re.removeAttribute!="function"||typeof re.setAttribute!="function"||typeof re.namespaceURI!="string"||typeof re.insertBefore!="function"||typeof re.hasChildNodes!="function")},Da=function(re){return typeof l=="function"&&re instanceof l};function Yt(Oe,re,we){hi(Oe,Te=>{Te.call(t,re,we,fn)})}const wr=function(re){let we=null;if(Yt(_.beforeSanitizeElements,re,null),Wr(re))return kt(re),!0;const Te=Je(re.nodeName);if(Yt(_.uponSanitizeElement,re,{tagName:Te,allowedTags:z}),J&&re.hasChildNodes()&&!Da(re.firstElementChild)&>(/<[/\w!]/g,re.innerHTML)&>(/<[/\w!]/g,re.textContent)||re.nodeType===Ha.progressingInstruction||J&&re.nodeType===Ha.comment&>(/<[/\w]/g,re.data))return kt(re),!0;if(!z[Te]||te[Te]){if(!te[Te]&&ka(Te)&&(U.tagNameCheck instanceof RegExp&>(U.tagNameCheck,Te)||U.tagNameCheck instanceof Function&&U.tagNameCheck(Te)))return!1;if(q&&!ee[Te]){const ze=w(re)||re.parentNode,tt=N(re)||re.childNodes;if(tt&&ze){const He=tt.length;for(let ht=He-1;ht>=0;--ht){const Xt=v(tt[ht],!0);Xt.__removalCount=(re.__removalCount||0)+1,ze.insertBefore(Xt,y(re))}}}return kt(re),!0}return re instanceof c&&!br(re)||(Te==="noscript"||Te==="noembed"||Te==="noframes")&>(/<\/no(script|embed|frames)/i,re.innerHTML)?(kt(re),!0):(X&&re.nodeType===Ha.text&&(we=re.textContent,hi([L,I,R],ze=>{we=Ma(we,ze," ")}),re.textContent!==we&&(Pa(t.removed,{element:re.cloneNode()}),re.textContent=we)),Yt(_.afterSanitizeElements,re,null),!1)},Js=function(re,we,Te){if(F&&(we==="id"||we==="name")&&(Te in n||Te in wl))return!1;if(!(ne&&!$[we]&>(M,we))){if(!(Q&>(j,we))){if(!k[we]||$[we]){if(!(ka(re)&&(U.tagNameCheck instanceof RegExp&>(U.tagNameCheck,re)||U.tagNameCheck instanceof Function&&U.tagNameCheck(re))&&(U.attributeNameCheck instanceof RegExp&>(U.attributeNameCheck,we)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(we))||we==="is"&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&>(U.tagNameCheck,Te)||U.tagNameCheck instanceof Function&&U.tagNameCheck(Te))))return!1}else if(!Se[we]){if(!gt(B,Ma(Te,A,""))){if(!((we==="src"||we==="xlink:href"||we==="href")&&re!=="script"&&UN(Te,"data:")===0&&ue[re])){if(!(le&&!gt(H,Ma(Te,A,"")))){if(Te)return!1}}}}}}return!0},ka=function(re){return re!=="annotation-xml"&&b6(re,P)},Zs=function(re){Yt(_.beforeSanitizeAttributes,re,null);const{attributes:we}=re;if(!we||Wr(re))return;const Te={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:k,forceKeepAttr:void 0};let ze=we.length;for(;ze--;){const tt=we[ze],{name:He,namespaceURI:ht,value:Xt}=tt,Cr=Je(He),Jn=Xt;let st=He==="value"?Jn:WN(Jn);if(Te.attrName=Cr,Te.attrValue=st,Te.keepAttr=!0,Te.forceKeepAttr=void 0,Yt(_.uponSanitizeAttribute,re,Te),st=Te.attrValue,K&&(Cr==="id"||Cr==="name")&&(hn(He,re),st=W+st),J&>(/((--!?|])>)|<\/(style|title)/i,st)){hn(He,re);continue}if(Te.forceKeepAttr)continue;if(!Te.keepAttr){hn(He,re);continue}if(!ae&>(/\/>/i,st)){hn(He,re);continue}X&&hi([L,I,R],ei=>{st=Ma(st,ei," ")});const kn=Je(re.nodeName);if(!Js(kn,Cr,st)){hn(He,re);continue}if(C&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!ht)switch(p.getAttributeType(kn,Cr)){case"TrustedHTML":{st=C.createHTML(st);break}case"TrustedScriptURL":{st=C.createScriptURL(st);break}}if(st!==Jn)try{ht?re.setAttributeNS(ht,He,st):re.setAttribute(He,st),Wr(re)?kt(re):y6(t.removed)}catch{hn(He,re)}}Yt(_.afterSanitizeAttributes,re,null)},Qs=function Oe(re){let we=null;const Te=mn(re);for(Yt(_.beforeSanitizeShadowDOM,re,null);we=Te.nextNode();)Yt(_.uponSanitizeShadowNode,we,null),wr(we),Zs(we),we.content instanceof i&&Oe(we.content);Yt(_.afterSanitizeShadowDOM,re,null)};return t.sanitize=function(Oe){let re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},we=null,Te=null,ze=null,tt=null;if(Ue=!Oe,Ue&&(Oe="<!-->"),typeof Oe!="string"&&!Da(Oe))if(typeof Oe.toString=="function"){if(Oe=Oe.toString(),typeof Oe!="string")throw $a("dirty is not a string, aborting")}else throw $a("toString is not a function");if(!t.isSupported)return Oe;if(oe||La(re),t.removed=[],typeof Oe=="string"&&(se=!1),se){if(Oe.nodeName){const Xt=Je(Oe.nodeName);if(!z[Xt]||te[Xt])throw $a("root node is forbidden and cannot be sanitized in-place")}}else if(Oe instanceof l)we=Va("<!---->"),Te=we.ownerDocument.importNode(Oe,!0),Te.nodeType===Ha.element&&Te.nodeName==="BODY"||Te.nodeName==="HTML"?we=Te:we.appendChild(Te);else{if(!Z&&!X&&!Y&&Oe.indexOf("<")===-1)return C&&ie?C.createHTML(Oe):Oe;if(we=Va(Oe),!we)return Z?null:ie?S:""}we&&pe&&kt(we.firstChild);const He=mn(se?Oe:we);for(;ze=He.nextNode();)wr(ze),Zs(ze),ze.content instanceof i&&Qs(ze.content);if(se)return Oe;if(Z){if(ce)for(tt=T.call(we.ownerDocument);we.firstChild;)tt.appendChild(we.firstChild);else tt=we;return(k.shadowroot||k.shadowrootmode)&&(tt=V.call(r,tt,!0)),tt}let ht=Y?we.outerHTML:we.innerHTML;return Y&&z["!doctype"]&&we.ownerDocument&&we.ownerDocument.doctype&&we.ownerDocument.doctype.name&>(Ng,we.ownerDocument.doctype.name)&&(ht="<!DOCTYPE "+we.ownerDocument.doctype.name+`>
|
43
|
+
`,iC=["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 oC(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:iC.map(o=>`${o}:${t.getPropertyValue(o)}`).join(";"),paddingSize:r,borderSize:s,boxSizing:n}}function y1(e,t=1,n){var f;Jt||(Jt=document.createElement("textarea"),document.body.appendChild(Jt));const{paddingSize:r,borderSize:s,boxSizing:i,contextStyle:o}=oC(e);Jt.setAttribute("style",`${o};${sC}`),Jt.value=e.value||e.placeholder||"";let l=Jt.scrollHeight;const c={};i==="border-box"?l=l+s:i==="content-box"&&(l=l-r),Jt.value="";const d=Jt.scrollHeight-r;if(Number.isInteger(t)){let u=d*t;i==="border-box"&&(u=u+r+s),l=Math.max(u,l),c.minHeight=`${u}px`}if(Number.isInteger(n)){let u=d*n;i==="border-box"&&(u=u+r+s),l=Math.min(u,l)}return c.height=`${l}px`,(f=Jt.parentNode)==null||f.removeChild(Jt),Jt=void 0,c}const lC={type:m.string.def("text"),clearable:m.bool,disabled:m.bool,readonly:m.bool,placeholder:m.string.def(""),prefixIcon:m.string,suffixIcon:m.string,suffix:m.string,prefix:m.string,step:m.number,max:m.number,min:m.number,maxlength:m.number,maxcharacter:m.number,behavior:d0(),showWordLimit:m.bool,showControl:m.bool.def(!0),showClearOnlyHover:m.bool.def(!0),precision:m.number.def(0).validate(e=>e>=0&&e<20),modelValue:m.oneOfType([m.string,m.number]),size:m.size(),rows:m.number,selectReadonly:m.bool.def(!1),withValidate:m.bool.def(!0),overMaxLengthLimit:m.bool.def(!1),showOverflowTooltips:m.bool.def(!0),tooltipsOptions:{type:Object,default:()=>({})},resize:m.bool.def(!0),autosize:m.oneOfType([Boolean,Object]).def(!1),stopPropagation:m.bool.def(!0)};let Re=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 Nr(e,t){return!0}function cC(e,t){return!0}function Eu(e){return e}const uC={[Re.UPDATE]:Nr,[Re.FOCUS]:e=>e,[Re.BLUR]:e=>e,[Re.CHANGE]:Nr,[Re.CLEAR]:()=>!0,[Re.INPUT]:Nr,[Re.KEYPRESS]:Nr,[Re.KEYDOWN]:Nr,[Re.KEYUP]:Nr,[Re.ENTER]:Nr,[Re.PASTE]:cC,[Re.COMPOSITIONSTART]:Eu,[Re.COMPOSITIONUPDATE]:Eu,[Re.COMPOSITIONEND]:Eu},dC=a.defineComponent({name:"Input",directives:{bkTooltips:Dn},inheritAttrs:!1,props:lC,emits:uC,setup(e,t){const{resolveClassName:n}=he(),r=on(),s=Be("input"),i=a.ref(!1),o=a.ref(!1),l=a.computed(()=>e.type==="textarea"),c=a.computed(()=>l.value?n("textarea"):n("input")),{class:d,style:f,...u}=t.attrs,h=a.ref(),p=a.ref(typeof e.modelValue>"u"||e.modelValue===null?{}:{value:e.modelValue}),g=a.computed(()=>Ae({[`${c.value}--${e.size}`]:!!e.size,resizable:e.resize,"is-focused":i.value,"is-readonly":e.readonly&&!e.selectReadonly,"is-disabled":e.disabled,"is-simplicity":e.behavior==="simplicity",[`${t.attrs.class}`]:!!t.attrs.class},c.value)),v=a.ref(!1),b=a.ref(),y=oe("suffix-icon"),N={search:()=>a.createVNode(jr,null,null),password:()=>a.createVNode(tl,{class:y,onClick:pe},null)},w=a.computed(()=>{const ie=N[e.type];return x.value?a.createVNode(_a,{class:y,onClick:pe},null):ie?a.createVNode(ie,{class:y},null):null}),C=a.computed(()=>e.type==="number"),S=a.computed(()=>Math.floor(e.maxlength??e.maxcharacter??0)),x=a.ref(!1),E=a.computed(()=>Ae({"show-clear-only-hover":e.showClearOnlyHover,[`${c.value}--clear-icon`]:!0},y)),T=a.computed(()=>Ae({[oe("max-length")]:!0,"is-over-limit":S.value-V.value<0})),O=ie=>typeof e.maxcharacter=="number"?ie.split("").reduce((F,K,W)=>(F.len+=K.charCodeAt(0)>255?2:1,F.len>e.maxcharacter&&F.pos===-1&&(F.pos=W),F),{len:0,pos:-1}):{len:ie.length,pos:-1},V=a.computed(()=>{const ie=e.modelValue??"";return O(ie).len}),_=a.computed(()=>Ae({"is-disabled":e.disabled||e.modelValue>=e.max})),L=a.computed(()=>Ae({"is-disabled":e.disabled||e.modelValue<=e.min})),I=a.computed(()=>{var ie;return R.value&&S.value-V.value===0?{content:s.value.maxlengthLimitTips,...e.tooltipsOptions||{}}:e.showOverflowTooltips&&v.value&&e.modelValue?{content:(ie=e.modelValue)==null?void 0:ie.toString(),sameWidth:!0,...e.tooltipsOptions||{}}:{disabled:!0,...e.tooltipsOptions||{}}}),R=a.computed(()=>typeof e.maxlength=="number"||typeof e.maxcharacter=="number");a.watch(()=>e.type,()=>{a.nextTick(M)}),a.watch(()=>e.modelValue,ie=>{var F;e.withValidate&&((F=r==null?void 0:r.validate)==null||F.call(r,"change")),p.value={value:ie},a.nextTick(M)}),a.onMounted(()=>{var ie,F;a.nextTick(M),Object.prototype.hasOwnProperty.call(t.attrs,"autofocus")&&((F=(ie=h.value)==null?void 0:ie.focus)==null||F.call(ie))}),t.expose({focus(){h.value.focus()},blur(){h.value.blur(),i.value=!1},clear:P});function M(){j(),A()}function j(){var F,K,W;const ie=((F=h.value)==null?void 0:F.offsetParent)===null;if(!(!l.value||ie||e.resize))if(e.autosize){const q=(K=e.autosize)==null?void 0:K.minRows,se=(W=e.autosize)==null?void 0:W.maxRows,fe=y1(h.value,q,se);b.value={overflowY:"hidden",...fe},a.nextTick(()=>{b.value=fe})}else b.value={minHeight:y1(h.value).minHeight}}function H(){var ie,F;return((ie=h.value)==null?void 0:ie.scrollWidth)>((F=h.value)==null?void 0:F.clientWidth)+2}function A(){setTimeout(()=>{v.value=H()})}function P(){if(e.disabled)return;const ie=C.value?e.min:"";t.emit(Re.UPDATE,ie,null),t.emit(Re.CHANGE,ie,null),t.emit(Re.CLEAR)}function B(ie){i.value=!0,t.emit(Re.FOCUS,ie)}function z(ie){var F;i.value=!1,t.emit(Re.BLUR,ie),e.withValidate&&((F=r==null?void 0:r.validate)==null||F.call(r,"blur"))}function D(ie){return F=>{if(e.stopPropagation&&F.stopPropagation(),R.value&&!e.overMaxLengthLimit){const K=O(F.target.value);if(K.len>=S.value&&(ie===Re.KEYDOWN||ie===Re.INPUT)&&!o.value){const W=K.pos>0?F.target.value.slice(0,K.pos):F.target.value;p.value={value:W},t.emit(Re.UPDATE,W,F),t.emit(Re.INPUT,W,F);return}}if(ie===Re.KEYDOWN&&(F.code==="Enter"||F.key==="Enter"||F.keyCode===13)&&t.emit(Re.ENTER,C.value?X(F.target.value,0):F.target.value,F),!(o.value&&[Re.INPUT,Re.CHANGE,Re.KEYDOWN].some(K=>ie===K))){if(ie===Re.INPUT)t.emit(Re.UPDATE,C.value?(()=>{const K=Number.isInteger(e.precision)?e.precision:0,W=F.target.value;return Number.isNaN(W)?ae(e.min)?e.min:0:W===""||W===null||W===void 0?"":(+W).toFixed(K)})():F.target.value,F);else if(ie===Re.CHANGE&&C.value){const K=X(F.target.value,0);t.emit(Re.UPDATE,K,F),t.emit(ie,K,F);return}t.emit(ie,C.value?X(F.target.value,0):F.target.value,F)}}}const[k,G,U,te,$,Q]=[Re.KEYUP,Re.KEYDOWN,Re.KEYPRESS,Re.PASTE,Re.CHANGE,Re.INPUT].map(D);function ne(){o.value=!0}function le(ie){o.value=!1,Q(ie)}function ae(ie){return typeof ie=="number"&&!Number.isNaN(ie)}function X(ie,F,K=!0){const W=Number(F),q=ae(W)?W:1,se=Number.isInteger(e.precision)?e.precision:0,fe=Number(ie);if(Number.isNaN(fe))return ae(e.min)?e.min:0;let ee=fe+(K?q:-1*q);return ae(e.max)&&(ee=Math.min(ee,e.max)),ae(e.min)&&(ee=Math.max(ee,e.min)),+ee.toFixed(se)}function J(ie){if(e.disabled)return;const F=X(e.modelValue,e.step);t.emit(Re.UPDATE,F,ie),t.emit(Re.CHANGE,F,ie)}function Y(ie){if(e.disabled)return;const F=X(e.modelValue,e.step,!1);t.emit(Re.UPDATE,F,ie),t.emit(Re.CHANGE,F,ie)}function oe(ie){return`${c.value}--${ie}`}function pe(){x.value=!x.value}const Z=a.computed(()=>({maxlength:!e.overMaxLengthLimit&&e.maxlength,placeholder:e.placeholder||s.value.placeholder,readonly:e.readonly,disabled:e.disabled})),ce={onInput:Q,onFocus:B,onBlur:z,onPaste:te,onChange:$,onKeypress:U,onKeydown:G,onKeyup:k,onCompositionstart:ne,onCompositionend:le};return()=>{var ie,F,K,W;return a.withDirectives(a.createVNode("div",{style:f,class:g.value},[((F=(ie=t.slots)==null?void 0:ie.prefix)==null?void 0:F.call(ie))??(e.prefix&&a.createVNode("div",{class:oe("prefix-area")},[a.createVNode("span",{class:oe("prefix-area--text")},[e.prefix])])),l.value?a.createVNode("textarea",a.mergeProps({ref:h,spellcheck:!1},u,ce,Z.value,{style:b.value,rows:e.rows},p.value),null):a.createVNode("input",a.mergeProps({spellcheck:!1},u,{ref:h,class:`${c.value}--text`,max:e.max,min:e.min,step:e.step,type:x.value&&e.type==="password"?"text":e.type},ce,Z.value,p.value),null),e.clearable&&!!e.modelValue&&a.createVNode("span",{class:E.value,onClick:P},[a.createVNode(Vt,null,null)]),w.value,R.value&&(e.showWordLimit||l.value)&&a.createVNode("p",{class:T.value},[e.overMaxLengthLimit?S.value-V.value:a.createVNode(a.Fragment,null,[V.value,a.createTextVNode(" / "),a.createVNode("span",null,[S.value])])]),C.value&&e.showControl&&a.createVNode("div",{class:oe("number-control")},[a.createVNode(ms,{class:_.value,onClick:J},null),a.createVNode(ms,{class:L.value,onClick:Y},null)]),((W=(K=t.slots)==null?void 0:K.suffix)==null?void 0:W.call(K))??(e.suffix&&a.createVNode("div",{class:oe("suffix-area")},[a.createVNode("span",{class:oe("suffix-area--text")},[e.suffix])]))]),[[a.resolveDirective("bk-tooltips"),I.value]])}}}),hr=Ie(dC),fC=a.defineComponent({name:"Card",props:{title:m.string,showHeader:m.bool.def(!0),showFooter:m.bool.def(!1),collapseStatus:m.bool.def(!0),border:m.bool.def(!0),disableHeaderStyle:m.bool.def(!1),position:m.string.def("left"),isEdit:m.bool.def(!1),isCollapse:m.bool.def(!1)},emits:["update:collapseStatus","edit"],setup(e,{emit:t}){const n=a.ref(!0),r=a.ref(!1),s=a.ref(""),i=()=>{e.isCollapse&&(n.value=!n.value,t("update:collapseStatus",n.value))},o=()=>{r.value=!r.value},l=()=>{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:c}=he(),d=c("card");return{collapseActive:n,showInput:r,renderTitle:s,handleCollapse:i,saveEdit:l,clickEdit:o,wrapperClsName:d}},render(){var s,i,o,l;const e=Ae({[`${this.wrapperClsName}`]:!0,[`${this.wrapperClsName}-border-none`]:!this.$props.border},""),t=Ae({[`${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(hr,{class:`${this.wrapperClsName}-input`,modelValue:this.renderTitle,"onUpdate:modelValue":c=>this.renderTitle=c,onBlur:this.saveEdit},null):this.renderTitle]),r=a.createVNode("span",{class:`${this.wrapperClsName}-icon`,onClick:this.handleCollapse},[this.collapseActive?a.createVNode(Sa,null,null):a.createVNode($t,null,null)]);return a.createVNode("div",{class:e},[this.$props.showHeader?a.createVNode("div",{class:t},[this.$props.isCollapse&&(((i=(s=this.$slots).icon)==null?void 0:i.call(s))??r),((l=(o=this.$slots).header)==null?void 0:l.call(o))??n,this.$props.isEdit&&!this.showInput&&a.createVNode(Fo,{class:`${this.wrapperClsName}-edit`,onClick:this.clickEdit},null)]):"",a.createVNode(Lp,null,{default:()=>{var c,d,f,u;return[a.withDirectives(a.createVNode("div",null,[a.createVNode("div",{class:`${this.wrapperClsName}-body`},[((d=(c=this.$slots).default)==null?void 0:d.call(c))??"Content"]),this.$props.showFooter?a.createVNode("div",{class:`${this.wrapperClsName}-footer`},[((u=(f=this.$slots).footer)==null?void 0:u.call(f))??"Footer"]):""]),[[a.vShow,this.collapseActive]])]}})])}}),Xp=Ie(fC),sl=Symbol("BkSelect"),Jp=Symbol("BkOptionGroup");function Zp(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function Vf(e){return{register:(r,s)=>{if(s)return e.value.set(r,s)},unregister:(r,s)=>{if(s){if(e.value.get(r)!==s)return;e.value.delete(r)}else e.value.delete(r)}}}function b1(e,t=200){let n,r=e;return a.customRef((s,i)=>({get(){return s(),r},set(o){clearTimeout(n),o===void 0||o===""?(r=o,i()):n=setTimeout(()=>{r=o,i()},t)}}))}function hC(e,t){const{popoverMinWidth:n}=e;let r=null;const s=a.ref("auto"),i=a.ref(!1),o=()=>{i.value=!i.value},l=()=>{i.value=!1},c=()=>{i.value=!0},d=()=>{var f;s.value=Math.max((f=t.value)==null?void 0:f.offsetWidth,n)};return a.onMounted(()=>{t.value&&(r=f8(t.value,d,60,!0),r.start())}),a.onBeforeUnmount(()=>{r==null||r.stop(),r=null}),{isPopoverShow:i,popperWidth:s,togglePopover:o,hidePopover:l,showPopover:c}}function mC(e,t){const n=b1(""),r=b1(""),s=a.computed(()=>r.value||n.value),i=a.ref(!1);return a.watch(s,async()=>{try{i.value=!0,await e(s.value),i.value=!1}catch(o){console.error(o)}finally{t==null||t()}}),{customOptionName:n,searchValue:r,curSearchValue:s,searchLoading:i}}function qr(e=""){return e&&String(e).trim().toLowerCase()}function pC(e,t){if(!e||!t)return!0;const{top:n,bottom:r}=e.getBoundingClientRect(),{top:s,bottom:i}=t.getBoundingClientRect();return n>=s&&r<=i}const Qp=Symbol("CheckboxGroup");function gC(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const vC=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,r=a.inject(Qp,tp),s=!np(r),i=a.ref(),o=a.ref(t.checked),l=a.ref(!1),c=a.computed(()=>s&&r.props.disabled?!0:t.disabled),d=h=>{const p=o.value?t.trueLabel:t.falseLabel;n("update:modelValue",p),n("change",p,h),s&&r.handleChange(),a.nextTick(()=>{i.value&&i.value.checked!==o.value&&(i.value.checked=o.value)})};s?a.watch(()=>r.props.modelValue,h=>{o.value=h.includes(t.label)},{deep:!0}):a.watch(()=>t.modelValue,h=>{h!==""&&(o.value=h===t.trueLabel)},{immediate:!0}),a.watch(()=>t.checked,()=>{o.value=t.checked,t.immediateEmitChange!==!1&&d()});const f=(h=!0)=>{o.value=h},u=h=>{if(t.readonly)return;const p=h.target;if(c.value||l.value)return;l.value=!0;const g=p.checked;Promise.resolve(t.beforeChange?t.beforeChange(g):!0).then(v=>{if(v)o.value=g,d(h);else return Promise.reject()}).catch(v=>{console.error(v),p.checked=o.value}).finally(()=>{l.value=!1})};return a.onMounted(()=>{s&&r.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&r.unregister(e.proxy)}),{inputRef:i,isChecked:o,isPrechecking:l,isDisabled:c,setChecked:f,handleChange:u}},yC={modelValue:m.oneOfType([m.bool,m.string,m.number]),label:m.oneOfType([m.bool,m.string,m.number]),trueLabel:m.oneOfType([m.bool,m.string,m.number]).def(!0),falseLabel:m.oneOfType([m.bool,m.string,m.number]).def(!1),disabled:m.bool.def(!1),checked:m.bool.def(!1),indeterminate:m.bool,beforeChange:xa().def(()=>!0),size:m.size().def(c0.DEFAULT),immediateEmitChange:m.bool.def(!0),readonly:m.bool.def(!1),outline:m.bool.def(!1)},bC=a.defineComponent({name:"Checkbox",props:yC,emits:{"update:modelValue":e=>e!==void 0,change:(e,t)=>e!==void 0,click:e=>!0},setup(e){const[t,{blur:n,focus:r}]=gC(),{inputRef:s,isChecked:i,isPrechecking:o,isDisabled:l,setChecked:c,handleChange:d}=vC(),{resolveClassName:f}=he();return{inputRef:s,isFocus:t,isChecked:i,isPrechecking:o,isDisabled:l,setChecked:c,handleBlur:n,handleFocus:r,handleChange:d,size:e.size,resolveClassName:f}},render(){const e=Ae({[`${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,"is-outline":this.outline}),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(Ko,{class:`${this.resolveClassName("checkbox-checking")}`},null)])}}),wC={modelValue:m.array,disabled:m.bool,withValidate:m.bool.def(!0)},il=a.defineComponent({name:"CheckboxGroup",props:wC,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(e,t){const n=on(),r=[],s=c=>{r.push(c)},i=c=>{const d=r.indexOf(c);d>-1&&r.splice(d,1)},o=()=>{const c=r.reduce((d,f)=>(f.isChecked&&d.push(f.label),d),[]);t.emit("update:modelValue",c),t.emit("change",c)};a.provide(Qp,{name:"CheckboxGroup",props:e,register:s,unregister:i,handleChange:o}),a.watch(()=>e.modelValue,()=>{var c;e.withValidate&&((c=n==null?void 0:n.validate)==null||c.call(n,"change"))}),a.onMounted(()=>{const c=e.modelValue||[];r.forEach(d=>{c.includes(d.label)&&d.setChecked(!0)})});const{resolveClassName:l}=he();return{resolveClassName:l}},render(){var e;return a.createVNode("div",{class:`${this.resolveClassName("checkbox-group")}`},[(e=this.$slots)==null?void 0:e.default()])}}),Ct=St(bC,{Group:il});var Ou,w1;function CC(){if(w1)return Ou;w1=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return Ou=t,Ou}var Au,C1;function NC(){if(C1)return Au;C1=1;function e(t){return this.__data__.has(t)}return Au=e,Au}var Lu,N1;function xC(){if(N1)return Lu;N1=1;var e=h0(),t=CC(),n=NC();function r(s){var i=-1,o=s==null?0:s.length;for(this.__data__=new e;++i<o;)this.add(s[i])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Lu=r,Lu}var Vu,x1;function SC(){if(x1)return Vu;x1=1;function e(t,n){for(var r=-1,s=t==null?0:t.length;++r<s;)if(n(t[r],r,t))return!0;return!1}return Vu=e,Vu}var Du,S1;function TC(){if(S1)return Du;S1=1;function e(t,n){return t.has(n)}return Du=e,Du}var ku,T1;function eg(){if(T1)return ku;T1=1;var e=xC(),t=SC(),n=TC(),r=1,s=2;function i(o,l,c,d,f,u){var h=c&r,p=o.length,g=l.length;if(p!=g&&!(h&&g>p))return!1;var v=u.get(o),b=u.get(l);if(v&&b)return v==l&&b==o;var y=-1,N=!0,w=c&s?new e:void 0;for(u.set(o,l),u.set(l,o);++y<p;){var C=o[y],S=l[y];if(d)var x=h?d(S,C,y,l,o,u):d(C,S,y,o,l,u);if(x!==void 0){if(x)continue;N=!1;break}if(w){if(!t(l,function(E,T){if(!n(w,T)&&(C===E||f(C,E,c,d,u)))return w.push(T)})){N=!1;break}}else if(!(C===S||f(C,S,c,d,u))){N=!1;break}}return u.delete(o),u.delete(l),N}return ku=i,ku}var Ru,_1;function _C(){if(_1)return Ru;_1=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(s,i){r[++n]=[i,s]}),r}return Ru=e,Ru}var Iu,E1;function EC(){if(E1)return Iu;E1=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(s){r[++n]=s}),r}return Iu=e,Iu}var Pu,O1;function OC(){if(O1)return Pu;O1=1;var e=_s(),t=op(),n=Os(),r=eg(),s=_C(),i=EC(),o=1,l=2,c="[object Boolean]",d="[object Date]",f="[object Error]",u="[object Map]",h="[object Number]",p="[object RegExp]",g="[object Set]",v="[object String]",b="[object Symbol]",y="[object ArrayBuffer]",N="[object DataView]",w=e?e.prototype:void 0,C=w?w.valueOf:void 0;function S(x,E,T,O,V,_,L){switch(T){case N:if(x.byteLength!=E.byteLength||x.byteOffset!=E.byteOffset)return!1;x=x.buffer,E=E.buffer;case y:return!(x.byteLength!=E.byteLength||!_(new t(x),new t(E)));case c:case d:case h:return n(+x,+E);case f:return x.name==E.name&&x.message==E.message;case p:case v:return x==E+"";case u:var I=s;case g:var R=O&o;if(I||(I=i),x.size!=E.size&&!R)return!1;var M=L.get(x);if(M)return M==E;O|=l,L.set(x,E);var j=r(I(x),I(E),O,V,_,L);return L.delete(x),j;case b:if(C)return C.call(x)==C.call(E)}return!1}return Pu=S,Pu}var Mu,A1;function tg(){if(A1)return Mu;A1=1;function e(t,n){for(var r=-1,s=n.length,i=t.length;++r<s;)t[i+r]=n[r];return t}return Mu=e,Mu}var $u,L1;function ng(){if(L1)return $u;L1=1;var e=tg(),t=un();function n(r,s,i){var o=s(r);return t(r)?o:e(o,i(r))}return $u=n,$u}var Fu,V1;function AC(){if(V1)return Fu;V1=1;function e(t,n){for(var r=-1,s=t==null?0:t.length,i=0,o=[];++r<s;){var l=t[r];n(l,r,t)&&(o[i++]=l)}return o}return Fu=e,Fu}var Hu,D1;function rg(){if(D1)return Hu;D1=1;function e(){return[]}return Hu=e,Hu}var Bu,k1;function oh(){if(k1)return Bu;k1=1;var e=AC(),t=rg(),n=Object.prototype,r=n.propertyIsEnumerable,s=Object.getOwnPropertySymbols,i=s?function(o){return o==null?[]:(o=Object(o),e(s(o),function(l){return r.call(o,l)}))}:t;return Bu=i,Bu}var zu,R1;function LC(){if(R1)return zu;R1=1;var e=up(),t=e(Object.keys,Object);return zu=t,zu}var ju,I1;function ag(){if(I1)return ju;I1=1;var e=xo(),t=LC(),n=Object.prototype,r=n.hasOwnProperty;function s(i){if(!e(i))return t(i);var o=[];for(var l in Object(i))r.call(i,l)&&l!="constructor"&&o.push(l);return o}return ju=s,ju}var Uu,P1;function lh(){if(P1)return Uu;P1=1;var e=pp(),t=ag(),n=As();function r(s){return n(s)?e(s):t(s)}return Uu=r,Uu}var Wu,M1;function sg(){if(M1)return Wu;M1=1;var e=ng(),t=oh(),n=lh();function r(s){return e(s,n,t)}return Wu=r,Wu}var qu,$1;function VC(){if($1)return qu;$1=1;var e=sg(),t=1,n=Object.prototype,r=n.hasOwnProperty;function s(i,o,l,c,d,f){var u=l&t,h=e(i),p=h.length,g=e(o),v=g.length;if(p!=v&&!u)return!1;for(var b=p;b--;){var y=h[b];if(!(u?y in o:r.call(o,y)))return!1}var N=f.get(i),w=f.get(o);if(N&&w)return N==o&&w==i;var C=!0;f.set(i,o),f.set(o,i);for(var S=u;++b<p;){y=h[b];var x=i[y],E=o[y];if(c)var T=u?c(E,x,y,o,i,f):c(x,E,y,i,o,f);if(!(T===void 0?x===E||d(x,E,l,c,f):T)){C=!1;break}S||(S=y=="constructor")}if(C&&!S){var O=i.constructor,V=o.constructor;O!=V&&"constructor"in i&&"constructor"in o&&!(typeof O=="function"&&O instanceof O&&typeof V=="function"&&V instanceof V)&&(C=!1)}return f.delete(i),f.delete(o),C}return qu=s,qu}var Gu,F1;function DC(){if(F1)return Gu;F1=1;var e=Br(),t=cn(),n=e(t,"DataView");return Gu=n,Gu}var Ku,H1;function kC(){if(H1)return Ku;H1=1;var e=Br(),t=cn(),n=e(t,"Promise");return Ku=n,Ku}var Yu,B1;function RC(){if(B1)return Yu;B1=1;var e=Br(),t=cn(),n=e(t,"Set");return Yu=n,Yu}var Xu,z1;function IC(){if(z1)return Xu;z1=1;var e=Br(),t=cn(),n=e(t,"WeakMap");return Xu=n,Xu}var Ju,j1;function Us(){if(j1)return Ju;j1=1;var e=DC(),t=f0(),n=kC(),r=RC(),s=IC(),i=Gn(),o=rp(),l="[object Map]",c="[object Object]",d="[object Promise]",f="[object Set]",u="[object WeakMap]",h="[object DataView]",p=o(e),g=o(t),v=o(n),b=o(r),y=o(s),N=i;return(e&&N(new e(new ArrayBuffer(1)))!=h||t&&N(new t)!=l||n&&N(n.resolve())!=d||r&&N(new r)!=f||s&&N(new s)!=u)&&(N=function(w){var C=i(w),S=C==c?w.constructor:void 0,x=S?o(S):"";if(x)switch(x){case p:return h;case g:return l;case v:return d;case b:return f;case y:return u}return C}),Ju=N,Ju}var Zu,U1;function PC(){if(U1)return Zu;U1=1;var e=m0(),t=eg(),n=OC(),r=VC(),s=Us(),i=un(),o=Ls(),l=Eo(),c=1,d="[object Arguments]",f="[object Array]",u="[object Object]",h=Object.prototype,p=h.hasOwnProperty;function g(v,b,y,N,w,C){var S=i(v),x=i(b),E=S?f:s(v),T=x?f:s(b);E=E==d?u:E,T=T==d?u:T;var O=E==u,V=T==u,_=E==T;if(_&&o(v)){if(!o(b))return!1;S=!0,O=!1}if(_&&!O)return C||(C=new e),S||l(v)?t(v,b,y,N,w,C):n(v,b,E,y,N,w,C);if(!(y&c)){var L=O&&p.call(v,"__wrapped__"),I=V&&p.call(b,"__wrapped__");if(L||I){var R=L?v.value():v,M=I?b.value():b;return C||(C=new e),w(R,M,y,N,C)}}return _?(C||(C=new e),r(v,b,y,N,w,C)):!1}return Zu=g,Zu}var Qu,W1;function MC(){if(W1)return Qu;W1=1;var e=PC(),t=Ht();function n(r,s,i,o,l){return r===s?!0:r==null||s==null||!t(r)&&!t(s)?r!==r&&s!==s:e(r,s,i,o,n,l)}return Qu=n,Qu}var ed,q1;function $C(){if(q1)return ed;q1=1;var e=MC();function t(n,r){return e(n,r)}return ed=t,ed}var FC=$C();const ch=lt(FC),Gi=a.defineComponent({name:"Option",props:{id:{type:[String,Number],require:!0},name:m.oneOfType([m.number,m.string]),disabled:m.bool.def(!1),order:m.number.def(0)},setup(e,{attrs:t}){const{proxy:n}=a.getCurrentInstance(),r=a.reactive({visible:!0}),{disabled:s,id:i,name:o}=a.toRefs(e),l=a.computed(()=>o.value!==void 0?o.value:t.label),c=a.computed(()=>i.value!==void 0?i.value:t.value),d=a.inject(sl,null),f=a.inject(Jp,null),u=a.computed(()=>{var E;return(E=d==null?void 0:d.selected)==null?void 0:E.some(T=>ch(T.value,c.value))}),h=a.computed(()=>d==null?void 0:d.multiple),p=a.computed(()=>(d==null?void 0:d.activeOptionValue)===c.value),g=a.computed(()=>(d==null?void 0:d.showSelectedIcon)&&h.value),v=a.computed(()=>d==null?void 0:d.selectedStyle),b=a.computed(()=>d==null?void 0:d.curSearchValue),y=a.computed(()=>d==null?void 0:d.highlightKeyword),N=()=>{s.value||d==null||d.handleOptionSelected(n)},w=()=>{d.activeOptionValue=c.value},C=()=>{d.activeOptionValue=""},S=E=>{if(!E)return E;let T=b.value;const O=T.length;if(!(T!=null&&T.trim().length)||!E.toLocaleLowerCase().includes(T.toLocaleLowerCase()))return E;const V=[];let _=-1;return T=T.replace(/([.*/]{1})/gim,"\\$1"),E.replace(new RegExp(`${T}`,"igm"),(L,I)=>(V.length===0&&I!==0?V.push(E.slice(0,I)):_>=0&&V.push(E.slice(_+L.length,I)),V.push(a.createVNode("span",{class:"is-keyword"},[L])),_=I,L)),_>=0&&V.push(E.slice(_+O)),V.length?V:E};a.onBeforeMount(()=>{d==null||d.register(c.value,n),f==null||f.register(c.value,n)}),a.onBeforeUnmount(()=>{d==null||d.unregister(c.value,n),f==null||f.unregister(c.value,n)});const{resolveClassName:x}=he();return{...a.toRefs(r),selected:u,multiple:h,isHover:p,showSelectedIcon:g,selectedStyle:v,optionName:l,optionID:c,highlightKeyword:y,handleOptionClick:N,handleMouseEnter:w,handleMouseLeave:C,resolveClassName:x,transformNode:S}},render(){var t,n;const e=Ae({"is-selected":this.selected,"is-disabled":this.disabled,"is-multiple":this.multiple,"is-hover":this.isHover,"is-checkbox":this.selectedStyle===_i.CHECKBOX,[this.resolveClassName("select-option")]:!0});return a.withDirectives(a.createVNode("li",{class:e,onClick:this.handleOptionClick,onMouseenter:this.handleMouseEnter,onMouseleave:this.handleMouseLeave},[this.showSelectedIcon&&this.selectedStyle===_i.CHECKBOX&&a.createVNode(Ct,{class:this.resolveClassName("select-checkbox"),disabled:this.disabled,modelValue:this.selected},null),((n=(t=this.$slots).default)==null?void 0:n.call(t))??a.createVNode("span",{class:this.resolveClassName("select-option-item"),title:String(this.optionName)},[this.highlightKeyword?this.transformNode(String(this.optionName)):this.optionName]),this.showSelectedIcon&&this.selected&&this.selectedStyle===_i.CHECK&&a.createVNode(zr,{width:22,height:22,class:this.resolveClassName("select-selected-icon")},null)]),[[a.vShow,this.visible]])}}),HC=a.defineComponent({name:"OptionGroup",props:{label:m.string.def(""),disabled:m.bool.def(!1),collapsible:m.bool.def(!1),collapse:m.bool.def(!1)},setup(e,{emit:t}){const n=a.getCurrentInstance(),{proxy:r}=n,s=a.inject(sl,null),i=a.reactive({groupCollapse:e.collapse,visible:!0}),o=a.ref(new Map),{register:l,unregister:c}=Vf(o),d=a.computed(()=>`${e.label} (${[...o.value.values()].filter(h=>h.visible).length})`),f=()=>{!e.collapsible||e.disabled||(i.groupCollapse=!i.groupCollapse,t("update:collapse",i.groupCollapse))};a.provide(Jp,a.reactive({...a.toRefs(e),register:l,unregister:c,groupCollapse:a.toRef(i,"groupCollapse")})),a.onBeforeMount(()=>{s==null||s.registerGroup(n.uid,r)}),a.onBeforeUnmount(()=>{s==null||s.unregisterGroup(n.uid)});const{resolveClassName:u}=he();return{...a.toRefs(i),groupLabel:d,handleToggleCollapse:f,resolveClassName:u}},render(){var r,s;const e=Ae({[this.resolveClassName("option-group")]:!0,collapsible:this.collapsible,disabled:this.disabled}),t=Ae({[this.resolveClassName("option-group-label")]:!0,collapsible:this.collapsible}),n=Ae({"default-group-label-icon":!0,collapse:this.groupCollapse});return a.withDirectives(a.createVNode("ul",{class:e},[a.createVNode("li",{class:t,onClick:this.handleToggleCollapse},[this.$slots.label?this.$slots.label():a.createVNode("span",{class:"default-group-label"},[this.collapsible&&a.createVNode(Rs,{class:n},null),a.createVNode("span",{class:"default-group-label-title"},[this.groupLabel])])]),a.withDirectives(a.createVNode("ul",{class:this.resolveClassName("option-group-content")},[(s=(r=this.$slots).default)==null?void 0:s.call(r)]),[[a.vShow,!this.groupCollapse]])]),[[a.vShow,this.visible]])}});function ui(e){const t=document.createElement("div");return t.className=e,t}const G1=typeof Element<"u"&&Element.prototype.matches;function or(e,t){const n=uh(e);if(!G1)throw new Error("No element matching method supported");return G1.call(n,t)}function Jr(e){const t=uh(e);t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}function K1(e,t){return Array.prototype.filter.call(e.children,n=>or(n,t))}function Ke(e){return parseInt(e,10)||0}function BC(e){return or(e,"input,[contenteditable]")||or(e,"select,[contenteditable]")||or(e,"textarea,[contenteditable]")||or(e,"button,[contenteditable]")}function zC(e){const t=yn(e);return Ke(t.width)+Ke(t.paddingLeft)+Ke(t.paddingRight)+Ke(t.borderLeftWidth)+Ke(t.borderRightWidth)}const Kr={isWebKit:typeof document<"u"&&"WebkitAppearance"in document.documentElement.style,supportsTouch:typeof window<"u"&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:typeof navigator<"u"&&navigator.msMaxTouchPoints,isChrome:typeof navigator<"u"&&/Chrome/i.test(navigator==null?void 0:navigator.userAgent)},uh=e=>e.isVirtualElement?e.delegateElement:e;function yn(e){return getComputedStyle(uh(e))}function Et(e,t){for(const n in t){let r=t[n];typeof r=="number"&&(r=`${r}px`),e.style[n]=r}return e}function Nn(e){const t=e.element,n=Math.floor(t.scrollTop),r=t.getBoundingClientRect();e.containerWidth=Math.round(r.width),e.containerHeight=Math.round(r.height),e.contentWidth=t.scrollWidth,e.contentHeight=t.scrollHeight,t.contains(e.scrollbarXRail)||(K1(t,e.cls.element.rail("x")).forEach(s=>Jr(s)),t.appendChild(e.scrollbarXRail)),t.contains(e.scrollbarYRail)||(K1(t,e.cls.element.rail("y")).forEach(s=>Jr(s)),t.appendChild(e.scrollbarYRail)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset<e.contentWidth?(e.scrollbarXActive=!0,e.railXWidth=e.containerWidth-e.railXMarginWidth,e.railXRatio=e.containerWidth/e.railXWidth,e.scrollbarXWidth=Y1(e,Ke(e.railXWidth*e.containerWidth/e.contentWidth)),e.scrollbarXLeft=Ke((e.negativeScrollAdjustment+t.scrollLeft)*(e.railXWidth-e.scrollbarXWidth)/(e.contentWidth-e.containerWidth))):e.scrollbarXActive=!1,!e.settings.suppressScrollY&&e.containerHeight+e.settings.scrollYMarginOffset<e.contentHeight?(e.scrollbarYActive=!0,e.railYHeight=e.containerHeight-e.railYMarginHeight,e.railYRatio=e.containerHeight/e.railYHeight,e.scrollbarYHeight=Y1(e,Ke(e.railYHeight*e.containerHeight/e.contentHeight)),e.scrollbarYTop=e.element.isVirtualElement?jC(e):Ke(n*(e.railYHeight-e.scrollbarYHeight)/(e.contentHeight-e.containerHeight))):e.scrollbarYActive=!1,e.scrollbarXLeft>=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),UC(t,e),e.scrollbarXActive?t.classList.add(e.cls.state.active("x")):(t.classList.remove(e.cls.state.active("x")),e.scrollbarXWidth=0,e.scrollbarXLeft=0,t.scrollLeft=e.isRtl===!0?e.contentWidth:0),e.scrollbarYActive?t.classList.add(e.cls.state.active("y")):(t.classList.remove(e.cls.state.active("y")),e.scrollbarYHeight=0,e.scrollbarYTop=0,t.scrollTop=0)}function jC(e){const t=Ke(e.element.virtualScrollTop);return t>=0?t:0}function Y1(e,t){return e.settings.minScrollbarLength&&(t=Math.max(t,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(t=Math.min(t,e.settings.maxScrollbarLength)),t}function UC(e,t){const n={width:t.railXWidth},r=e.isVirtualElement?0:Math.floor(e.scrollTop);t.isRtl?n.left=t.negativeScrollAdjustment+e.scrollLeft+t.containerWidth-t.contentWidth:n.left=e.scrollLeft,t.isScrollbarXUsingBottom?n.bottom=t.scrollbarXBottom-r:n.top=t.scrollbarXTop+r,Et(t.scrollbarXRail,n);const s={top:r,height:t.railYHeight};t.isScrollbarYUsingRight?t.isRtl?s.right=t.contentWidth-(t.negativeScrollAdjustment+e.scrollLeft)-t.scrollbarYRight-t.scrollbarYOuterWidth-9:s.right=t.scrollbarYRight-e.scrollLeft:t.isRtl?s.left=t.negativeScrollAdjustment+e.scrollLeft+t.containerWidth*2-t.contentWidth-t.scrollbarYLeft-t.scrollbarYOuterWidth:s.left=t.scrollbarYLeft+e.scrollLeft,Et(t.scrollbarYRail,s),Et(t.scrollbarX,{left:t.scrollbarXLeft,width:t.scrollbarXWidth-t.railBorderXWidth}),Et(t.scrollbarY,{top:t.scrollbarYTop,height:t.scrollbarYHeight-t.railBorderYWidth})}function WC(e){e.event.bind(e.scrollbarY,"mousedown",t=>t.stopPropagation()),e.event.bind(e.scrollbarYRail,"mousedown",t=>{const n=t.pageY-window.pageYOffset-e.scrollbarYRail.getBoundingClientRect().top,r=n>e.scrollbarYTop?1:-1;e.element.isVirtualElement?e.element.scrollTop=n/(e.element.offsetHeight/e.element.scrollHeight):e.element.scrollTop+=r*e.containerHeight,e.element.scrollTop+=r*e.containerHeight,Nn(e),t.stopPropagation()}),e.event.bind(e.scrollbarX,"mousedown",t=>t.stopPropagation()),e.event.bind(e.scrollbarXRail,"mousedown",t=>{const r=t.pageX-window.pageXOffset-e.scrollbarXRail.getBoundingClientRect().left>e.scrollbarXLeft?1:-1;e.element.scrollLeft+=r*e.containerWidth,Nn(e),t.stopPropagation()})}class qC{constructor(t="bk"){ye(this,"main");ye(this,"rtl");ye(this,"element");ye(this,"state");this.main=`${t}-scrollbar`,this.rtl=`${t}-rtl`,this.element={thumb:n=>`${t}__thumb-${n}`,rail:n=>`${t}__rail-${n}`,size:n=>`${t}-scroll-size-${n}`,consuming:`${t}__child--consume`},this.state={focus:`${t}--focus`,clicking:`${t}--clicking`,active:n=>`${t}--active-${n}`,scrolling:n=>`${t}--scrolling-${n}`}}}const ig={x:null,y:null};function og(e,t){const n=e.element.classList,r=e.cls.state.scrolling(t);n.contains(r)?clearTimeout(ig[t]):n.add(r)}function lg(e,t){ig[t]=setTimeout(()=>e.isAlive&&e.element.classList.remove(e.cls.state.scrolling(t)),e.settings.scrollingThreshold)}function GC(e,t){og(e,t),lg(e,t)}function KC(e){X1(e,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),X1(e,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])}function X1(e,[t,n,r,s,i,o,l,c,d]){const f=e.element;let u=null,h=null,p=null;function g(y){var N;(N=y.touches)!=null&&N[0]&&(y[r]=y.touches[0].pageY),f[l]=u+p*(y[r]-h),og(e,c),Nn(e),y.stopPropagation(),y.type.startsWith("touch")&&y.changedTouches.length>1&&y.preventDefault()}function v(){lg(e,c),e[d].classList.remove(e.cls.state.clicking),e.event.unbind(e.ownerDocument,"mousemove",g)}function b(y,N){u=f[l],N&&y.touches&&(y[r]=y.touches[0].pageY),h=y[r],p=(e[n]-e[t])/(e[s]-e[o]),N?e.event.bind(e.ownerDocument,"touchmove",g):(e.event.bind(e.ownerDocument,"mousemove",g),e.event.once(e.ownerDocument,"mouseup",v),y.preventDefault()),e[d].classList.add(e.cls.state.clicking),y.stopPropagation()}e.event.bind(e[i],"mousedown",y=>{b(y)}),e.event.bind(e[i],"touchstart",y=>{b(y,!0)})}function YC(e){const t=e.element,n=()=>or(t,":hover"),r=()=>or(e.scrollbarX,":focus")||or(e.scrollbarY,":focus");function s(l,c){const d=Math.floor(t.scrollTop);if(l===0){if(!e.scrollbarYActive)return!1;if(d===0&&c>0||d>=e.contentHeight-e.containerHeight&&c<0)return!e.settings.wheelPropagation}const f=t.scrollLeft;if(c===0){if(!e.scrollbarXActive)return!1;if(f===0&&l<0||f>=e.contentWidth-e.containerWidth&&l>0)return!e.settings.wheelPropagation}return!0}function i(){return t.isVirtualElement?e.containerHeight/e.element.scrollHeight*e.containerHeight:e.containerHeight}function o(){return t.isVirtualElement?e.containerHeight:e.contentHeight}e.event.bind(e.ownerDocument,"keydown",l=>{var h;if((h=l.isDefaultPrevented)!=null&&h.call(l)||l.defaultPrevented||!n()&&!r())return;let d=document.activeElement?document.activeElement:e.ownerDocument.activeElement;if(d){if(d.tagName==="IFRAME")d=d.contentDocument.activeElement;else for(;d.shadowRoot;)d=d.shadowRoot.activeElement;if(BC(d))return}let f=0,u=0;switch(l.which){case 37:l.metaKey?f=-e.contentWidth:l.altKey?f=-e.containerWidth:f=-30;break;case 38:l.metaKey?u=o():l.altKey?u=i():u=30;break;case 39:l.metaKey?f=e.contentWidth:l.altKey?f=e.containerWidth:f=30;break;case 40:l.metaKey?u=-o():l.altKey?u=-i():u=-30;break;case 32:l.shiftKey?u=i():u=-i();break;case 33:u=i();break;case 34:u=-i();break;case 36:u=o();break;case 35:u=-o();break;default:return}e.settings.suppressScrollX&&f!==0||e.settings.suppressScrollY&&u!==0||(t.scrollTop-=u,t.scrollLeft+=f,Nn(e),s(f,u)&&l.preventDefault())})}function XC(e){const t=e.element.isVirtualElement,n=t?e.element.delegateElement:e.element;function r(d,f){const u=t?e.element.virtualScrollTop:n.scrollTop,h=Math.floor(u),p=u===0,g=()=>t?h+e.scrollbarYHeight>=e.railYHeight:h+e.element.offsetHeight===e.element.scrollHeight,v=n.scrollLeft===0,b=n.scrollLeft+n.offsetWidth===n.scrollWidth;let y;return Math.abs(f)>Math.abs(d)?y=p||g():y=v||b,y?!e.settings.wheelPropagation:!0}function s(d){let f=d.deltaX,u=-1*d.deltaY;return(typeof f>"u"||typeof u>"u")&&(f=-1*d.wheelDeltaX/6,u=d.wheelDeltaY/6),d.deltaMode&&d.deltaMode===1&&(f*=10,u*=10),f!==f&&u!==u&&(f=0,u=d.wheelDelta),d.shiftKey?[-u,-f]:[f,u]}function i(d,f,u){if(!Kr.isWebKit&&n.querySelector("select:focus"))return!0;if(!n.contains(d))return!1;let h=d;for(;h&&h!==n;){if(h.classList.contains(e.cls.element.consuming))return!0;const p=yn(h);if(u&&p.overflowY.match(/(scroll|auto)/)){const g=h.scrollHeight-h.clientHeight;if(g>0&&(h.scrollTop>0&&u<0||h.scrollTop<g&&u>0))return!0}if(f&&p.overflowX.match(/(scroll|auto)/)){const g=h.scrollWidth-h.clientWidth;if(g>0&&(h.scrollLeft>0&&f<0||h.scrollLeft<g&&f>0))return!0}h=h.parentNode}return!1}const o=()=>e.element.scrollHeight-e.element.offsetHeight;function l(d){let f=e.element.scrollTop-d;const u=o();f>u&&(f=u),f<0&&(f=0),e.element.scrollTop=f}function c(d){const[f,u]=s(d);if(i(d.target,f,u))return;let h=!1;e.settings.useBothWheelAxes?e.scrollbarYActive&&!e.scrollbarXActive?(l(u?u*e.settings.wheelSpeed:-f*e.settings.wheelSpeed),h=!0):e.scrollbarXActive&&!e.scrollbarYActive&&(f?n.scrollLeft+=f*e.settings.wheelSpeed:n.scrollLeft-=u*e.settings.wheelSpeed,h=!0):(l(u*e.settings.wheelSpeed),n.scrollLeft+=f*e.settings.wheelSpeed),Nn(e),h=h||r(f,u),h&&!d.ctrlKey&&(d.stopPropagation(),d.preventDefault())}typeof window.onwheel<"u"?e.event.bind(n,"wheel",c):typeof window.onmousewheel<"u"&&e.event.bind(n,"mousewheel",c)}function JC(e){if(!Kr.supportsTouch&&!Kr.supportsIePointer)return;const t=e.element;function n(g,v){const b=Math.floor(t.scrollTop),y=t.scrollLeft,N=Math.abs(g),w=Math.abs(v);if(w>N){if(v<0&&b===e.contentHeight-e.containerHeight||v>0&&b===0)return window.scrollY===0&&v>0&&Kr.isChrome}else if(N>w&&(g<0&&y===e.contentWidth-e.containerWidth||g>0&&y===0))return!0;return!0}function r(g,v){t.scrollLeft-=g,t.scrollTop-=v,Nn(e)}let s={},i=0,o={},l=null;function c(g){return g.targetTouches?g.targetTouches[0]:g}function d(g){return g.pointerType&&g.pointerType==="pen"&&g.buttons===0?!1:!!(g.targetTouches&&g.targetTouches.length===1||g.pointerType&&g.pointerType!=="mouse"&&g.pointerType!==g.MSPOINTER_TYPE_MOUSE)}function f(g){if(!d(g))return;const v=c(g);s.pageX=v.pageX,s.pageY=v.pageY,i=new Date().getTime(),l!==null&&clearInterval(l)}function u(g,v,b){if(!t.contains(g))return!1;let y=g;for(;y&&y!==t;){if(y.classList.contains(e.cls.element.consuming))return!0;const N=yn(y);if(b&&N.overflowY.match(/(scroll|auto)/)){const w=y.scrollHeight-y.clientHeight;if(w>0&&(y.scrollTop>0&&b<0||y.scrollTop<w&&b>0))return!0}if(v&&N.overflowX.match(/(scroll|auto)/)){const w=y.scrollWidth-y.clientWidth;if(w>0&&(y.scrollLeft>0&&v<0||y.scrollLeft<w&&v>0))return!0}y=y.parentNode}return!1}function h(g){if(d(g)){const v=c(g),b={pageX:v.pageX,pageY:v.pageY},y=b.pageX-s.pageX,N=b.pageY-s.pageY;if(u(g.target,y,N))return;r(y,N),s=b;const w=new Date().getTime(),C=w-i;C>0&&(o.x=y/C,o.y=N/C,i=w),n(y,N)&&g.preventDefault()}}function p(){e.settings.swipeEasing&&(clearInterval(l),l=setInterval(function(){if(e.isInitialized){clearInterval(l);return}if(!o.x&&!o.y){clearInterval(l);return}if(Math.abs(o.x)<.01&&Math.abs(o.y)<.01){clearInterval(l);return}if(!e.element){clearInterval(l);return}r(o.x*30,o.y*30),o.x*=.8,o.y*=.8},10))}Kr.supportsTouch?(e.event.bind(t,"touchstart",f),e.event.bind(t,"touchmove",h),e.event.bind(t,"touchend",p)):Kr.supportsIePointer&&(window.PointerEvent?(e.event.bind(t,"pointerdown",f),e.event.bind(t,"pointermove",h),e.event.bind(t,"pointerup",p)):window.MSPointerEvent&&(e.event.bind(t,"MSPointerDown",f),e.event.bind(t,"MSPointerMove",h),e.event.bind(t,"MSPointerUp",p)))}class ZC{constructor(t){ye(this,"element");ye(this,"handlers");this.element=t,this.handlers={}}bind(t,n){typeof this.handlers[t]>"u"&&(this.handlers[t]=[]),this.handlers[t].push(n),this.element.addEventListener(t,n,!1)}unbind(t,n){this.handlers[t]=this.handlers[t].filter(r=>n&&r!==n?!0:(this.element.removeEventListener(t,r,!1),!1))}unbindAll(){for(const t in this.handlers)this.unbind(t)}get isEmpty(){return Object.keys(this.handlers).every(t=>this.handlers[t].length===0)}}class QC{constructor(){ye(this,"eventElements");this.eventElements=[]}eventElement(t){let n=this.eventElements.filter(r=>r.element===t)[0];return n||(n=new ZC(t),this.eventElements.push(n)),n}bind(t,n,r){this.eventElement(t).bind(n,r)}unbind(t,n,r){const s=this.eventElement(t);s.unbind(n,r),s.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(s),1)}unbindAll(){this.eventElements.forEach(t=>t.unbindAll()),this.eventElements=[]}once(t,n,r){const s=this.eventElement(t),i=o=>{s.unbind(n,i),r(o)};s.bind(n,i)}}function di(e){if(typeof window.CustomEvent=="function")return new CustomEvent(e);{const t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}}function fi(e,t,n,r=!0,s=!1){let i;if(t==="top")i=["contentHeight","containerHeight","scrollTop","y","up","down"];else if(t==="left")i=["contentWidth","containerWidth","scrollLeft","x","left","right"];else throw new Error("A proper axis should be provided");eN(e,n,i,r,s)}function eN(e,t,[n,r,s,i,o,l],c=!0,d=!1){const f=e.element;e.reach[i]=null,f[s]<1&&(e.reach[i]="start"),f[s]>e[n]-e[r]-1&&(e.reach[i]="end"),t&&(f.dispatchEvent(di(`ps-scroll-${i}`)),t<0?f.dispatchEvent(di(`ps-scroll-${o}`)):t>0&&f.dispatchEvent(di(`ps-scroll-${l}`)),c&&GC(e,i)),e.reach[i]&&(t||d)&&f.dispatchEvent(di(`ps-${i}-reach-${e.reach[i]}`))}const tN=()=>({handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:16,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1,classPrefix:"bk",scrollSize:"normal"}),nN={"click-rail":WC,"drag-thumb":KC,keyboard:YC,wheel:XC,touch:JC};class rN{constructor({scrollHeight:t,delegateElement:n,onScollCallback:r}){ye(this,"isVirtualElement",!0);ye(this,"scrollHeight");ye(this,"virtualScrollTop");ye(this,"virtualScrollLeft");ye(this,"scrollTop",0);ye(this,"onScollCallback");ye(this,"delegateElement");return this.scrollHeight=t,this.delegateElement=n,this.virtualScrollTop=0,this.virtualScrollLeft=0,this.onScollCallback=r,new Proxy(this,{get:(s,i,o)=>{if(i in s){const l=Reflect.get(s,i,o);if(l!==void 0)return l}if(n&&i in n){const l=n[i];return typeof l=="function"?l.bind(n):l}},set:(s,i,o)=>{if(i in s){if(i==="scrollTop"){s.virtualScrollTop=o*s.delegateElement.offsetHeight/s.scrollHeight;const l=s.scrollTop!==o;return s.scrollTop=o,l&&this.handleScrollChanged("scrollTop"),!0}return s[i]=o,!0}return n&&i in n?(n[i]=o,this.handleScrollChanged(i),!0):(s[i]=o,!0)}})}handleScrollChanged(t){var n;if(["scrollLeft","scrollTop"].includes(t)){const r={offset:{x:this.delegateElement.scrollLeft,y:this.scrollTop}};(n=this.onScollCallback)==null||n.call(this,r)}}scrollTo({x:t,y:n}){this.delegateElement.scrollLeft=t,this.scrollTop=n,this.delegateElement.scrollTo(t,n)}}class dh{constructor(t,n={}){ye(this,"element");ye(this,"containerWidth");ye(this,"containerHeight");ye(this,"contentWidth");ye(this,"settings");ye(this,"contentHeight");ye(this,"isRtl");ye(this,"isNegativeScroll");ye(this,"negativeScrollAdjustment");ye(this,"event");ye(this,"ownerDocument");ye(this,"scrollbarXRail");ye(this,"scrollbarX");ye(this,"scrollbarXActive");ye(this,"scrollbarXWidth");ye(this,"scrollbarXLeft");ye(this,"scrollbarXBottom");ye(this,"isScrollbarXUsingBottom");ye(this,"scrollbarXTop");ye(this,"railBorderXWidth");ye(this,"railXMarginWidth");ye(this,"railXWidth");ye(this,"railXRatio");ye(this,"scrollbarYRail");ye(this,"scrollbarY");ye(this,"scrollbarYActive");ye(this,"scrollbarYHeight");ye(this,"scrollbarYTop");ye(this,"scrollbarYRight");ye(this,"isScrollbarYUsingRight");ye(this,"scrollbarYLeft");ye(this,"scrollbarYOuterWidth");ye(this,"railBorderYWidth");ye(this,"railYMarginHeight");ye(this,"railYHeight");ye(this,"railYRatio");ye(this,"reach");ye(this,"isAlive");ye(this,"lastScrollTop");ye(this,"lastScrollLeft");ye(this,"cls");if(typeof t=="string"&&(t=document.querySelector(t)),!(t!=null&&t.nodeName)&&!(t!=null&&t.isVirtualElement))throw new Error("no element is specified to initialize PerfectScrollbar");this.settings={...tN(),...n},this.element=t,this.cls=new qC(this.settings.classPrefix),t.classList.add(this.cls.main),this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;const r=()=>t.classList.add(this.cls.state.focus),s=()=>t.classList.remove(this.cls.state.focus);this.isRtl=yn(t).direction==="rtl",this.isRtl&&t.classList.add(this.cls.rtl),this.isNegativeScroll=(()=>{const l=t.scrollLeft;let c=null;return t.scrollLeft=-1,c=t.scrollLeft<0,t.scrollLeft=l,c})(),this.negativeScrollAdjustment=this.isNegativeScroll?t.scrollWidth-t.clientWidth:0,this.event=new QC,this.ownerDocument=t.ownerDocument||document,this.scrollbarXRail=ui(this.cls.element.rail("x")),this.scrollbarXRail.classList.add(this.cls.element.size(this.settings.scrollSize)),t.appendChild(this.scrollbarXRail),this.scrollbarX=ui(this.cls.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex","0"),this.event.bind(this.scrollbarX,"focus",r),this.event.bind(this.scrollbarX,"blur",s),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;const i=yn(this.scrollbarXRail);this.scrollbarXBottom=parseInt(i.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=Ke(i.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=Ke(i.borderLeftWidth)+Ke(i.borderRightWidth),Et(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=Ke(i.marginLeft)+Ke(i.marginRight),Et(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=ui(this.cls.element.rail("y")),this.scrollbarYRail.classList.add(this.cls.element.size(this.settings.scrollSize)),t.appendChild(this.scrollbarYRail),this.scrollbarY=ui(this.cls.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex","0"),this.event.bind(this.scrollbarY,"focus",r),this.event.bind(this.scrollbarY,"blur",s),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;const o=yn(this.scrollbarYRail);this.scrollbarYRight=parseInt(o.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=Ke(o.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?zC(this.scrollbarY):null,this.railBorderYWidth=Ke(o.borderTopWidth)+Ke(o.borderBottomWidth),Et(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=Ke(o.marginTop)+Ke(o.marginBottom),Et(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:t.scrollLeft<=0?"start":t.scrollLeft>=(this.contentWidth??0)-this.containerWidth?"end":null,y:t.scrollTop<=0?"start":t.scrollTop>=(this.contentHeight??0)-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(l=>nN[l](this)),this.lastScrollTop=Math.floor(t.scrollTop),this.lastScrollLeft=t.scrollLeft,this.event.bind(this.element,"scroll",l=>this.onScroll(l)),Nn(this)}update(t){this.isAlive&&(t!=null&&t.isVirtualElement&&(this.element=t),this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,Et(this.scrollbarXRail,{display:"block"}),Et(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=Ke(yn(this.scrollbarXRail).marginLeft)+Ke(yn(this.scrollbarXRail).marginRight),this.railYMarginHeight=Ke(yn(this.scrollbarYRail).marginTop)+Ke(yn(this.scrollbarYRail).marginBottom),Et(this.scrollbarXRail,{display:"none"}),Et(this.scrollbarYRail,{display:"none"}),Nn(this),fi(this,"top",0,!1,!0),fi(this,"left",0,!1,!0),Et(this.scrollbarXRail,{display:""}),Et(this.scrollbarYRail,{display:""}))}onScroll(t){this.isAlive&&(Nn(this),fi(this,"top",this.element.scrollTop-this.lastScrollTop),fi(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)}scrollTo({x:t,y:n}){n!==void 0&&typeof n=="number"&&(this.element.scrollTop=n),t!==void 0&&typeof t=="number"&&(this.element.scrollLeft=t),Nn(this)}destroy(){this.isAlive&&(this.event.unbindAll(),Jr(this.scrollbarX),Jr(this.scrollbarY),Jr(this.scrollbarXRail),Jr(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)}removePsClasses(){this.element.className=this.element.className.split(" ").filter(t=>!t.match(new RegExp(`^${this.settings.classPrefix}([-_].+|)$`))).join(" ")}}const aN={onContentScroll:Function},sN={list:m.array.def([]),enabled:m.bool.def(!0),scrollEvent:m.bool.def(!1),lineHeight:m.oneOfType([m.number,m.func]).def(30),minHeight:m.number.def(30),maxHeight:m.oneOfType([m.number,m.string]),height:m.oneOfType([m.string.def("100%"),m.number]).def("100%"),width:m.oneOfType([m.string.def("100%"),m.number]).def("100%"),className:m.oneOfType([m.arrayOf(m.string),m.object,m.arrayOf(m.object),m.string]).def(""),contentClassName:m.oneOfType([m.arrayOf(m.string),m.object,m.arrayOf(m.object),m.string]).def(""),contentStyle:m.object.def({}),scrollXName:m.string.def(ji("F-scroll-x")),scrollYName:m.string.def(ji("F-scroll-y")),groupItemCount:m.number.def(1),preloadItemCount:m.number.def(1),renderAs:m.string.def("div"),scrollOffsetTop:m.number.def(0),scrollPosition:m.string.def("content"),abosuteHeight:m.oneOfType([m.string.def("auto"),m.number]).def("auto"),throttleDelay:m.number.def(60),rowKey:m.string.def(void 0),keepAlive:m.bool.def(!1),scrollbar:xe("IScrollbarOption",{default:{enabled:!0}}),autoReset:m.bool.def(!0),wrapperStyle:m.any.def({}),autoIndex:m.bool.def(!0),...aN},cg=(e,t)=>({fixToTop:r=>{const{id:s,index:i,item:o}=r;let l=typeof i=="number"?i-1:0;if(s!==void 0&&(l=e.list.findIndex(c=>c[e.rowKey]===s)??l),o!==void 0&&(l=e.list.findIndex(c=>o[e.rowKey]===c[e.rowKey])??l),typeof l=="number"){const d=(l>=0?l:0)*e.lineHeight;t(0,d)}return null}}),ug=e=>{let t=null;return{init:i=>{var o;t=new dh(i.value,{scrollingThreshold:120,scrollSize:(o=e.scrollbar)==null?void 0:o.size})},instance:t,scrollTo:(i,o)=>{t==null||t.scrollTo({x:i,y:o})},update:()=>t==null?void 0:t.update(),updateScrollHeight:i=>{t!=null&&t.element&&((t==null?void 0:t.element).scrollHeight=i,t==null||t.update())}}};function J1(e,t,n){let r=0,s=0,i=0,o=0;for(;r<e;r++){if(o=n({index:r}),s+o>t){i=t-s,r=r+Math.round(i/o);break}s+=o}return{startIndex:r,height:s,diffHeight:i}}function dg(e,t,n,r,s){if(!r||!s.offset)return;const i=s.offset.y>=0?s.offset.y:0,o=s.offset.x>=0?s.offset.x:0,l=r.scrollHeight,c=r.offsetHeight,{count:d,groupItemCount:f}=n;let u=0,h=0,p=0;if(typeof e=="number"&&(u=Math.ceil(i/e),h=Math.ceil(c/e)+u,p=i%e),typeof e=="function"){const v=Math.ceil(d/f),b=J1(v,i,e);u=b.startIndex>0?b.startIndex:0,p=b.diffHeight,h=J1(v,c,e).startIndex+u+1}const g=l-c-i;return typeof t=="function"&&t(s,u,h,i,i,o,{bottom:g>=0?g:0,scrollbar:s}),{targetStartIndex:u,targetEndIndex:h,elScrollTop:i,translateY:p,elScrollLeft:o}}class fh{constructor(t,n){ye(this,"binding");ye(this,"wrapper");ye(this,"delay");ye(this,"delegateWrapper");ye(this,"getEvent",t=>{const{scrollbar:n={enabled:!1}}=this.binding.value;if(n.enabled)return{offset:t.offset??{x:t.target.scrollLeft,y:t.target.scrollTop}};if(t!=null&&t.offset)return{offset:t==null?void 0:t.offset};const r=t.target.scrollTop;return{offset:{x:t.target.scrollLeft,y:r}}});this.binding=t,this.wrapper=n;const{throttleDelay:r}=t.value;this.delay=r,this.delegateWrapper=void 0}get scrollHeight(){var t,n;return((t=this.delegateWrapper)==null?void 0:t.scrollHeight)??((n=this.wrapper)==null?void 0:n.scrollHeight)}get offsetHeight(){var t,n;return((t=this.delegateWrapper)==null?void 0:t.offsetHeight)??((n=this.wrapper)==null?void 0:n.offsetHeight)}setDelegateWrapper(t){this.delegateWrapper=t}render(t){var h,p;const{lineHeight:n=30,handleScrollCallback:r,pagination:s={},onlyScroll:i}=this.binding.value;if(i){const g=(h=t.offset)==null?void 0:h.y,v=((p=t.offset)==null?void 0:p.x)??0,b=this.scrollHeight-this.offsetHeight-g;r(t,null,null,g,g,v,{bottom:b>=0?b:0,scrollbar:t});return}const{startIndex:o,endIndex:l,groupItemCount:c,count:d,scrollTop:f,scrollLeft:u}=s;dg(n,r,{groupItemCount:c,count:d},this.delegateWrapper??this.wrapper,t)}executeThrottledRender(t){Fr(this.render.bind(this),this.delay)(this.getEvent(t))}install(){var t;(t=this.wrapper)==null||t.addEventListener("scroll",this.executeThrottledRender.bind(this))}uninstall(){var t,n;(n=(t=this.wrapper)==null?void 0:t.removeListener)==null||n.call(t,"scroll",this.executeThrottledRender.bind(this))}setBinding(t){this.binding=t}}let er=null;const iN={mounted(e,t){const n=e.parentNode;er=new fh(t,e),n.addEventListener("scroll",er.executeThrottledRender.bind(er))},updated(e,t){er==null||er.setBinding(t)},unbind(e){if(e){const t=e.parentNode;if(!t||!er)return;t.removeEventListener("scroll",er.executeThrottledRender)}}},oN=(e,t)=>{const{renderAs:n}=e,r=a.ref(null),{init:s,scrollTo:i}=ug(e),o=a.reactive({x:0,y:0}),l=(p,g,v,b,y,N,w)=>{const{scrollbar:C}=w;C!=null&&C.offset&&Object.assign(o,(C==null?void 0:C.offset)??{}),t.emit("content-scroll",[p,{translateY:y,translateX:N,pos:w}])};let c=null;const d=a.computed(()=>({lineHeight:e.lineHeight,scrollbar:e.scrollbar,handleScrollCallback:l,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent})),f=a.computed(()=>{const p=typeof e.height=="number"?`${e.height}px`:e.height;return{height:p,width:typeof e.width=="number"?`${e.width}px`:e.width,display:"inline-block",maxHeight:e.maxHeight??p,...e.wrapperStyle}}),{fixToTop:u}=cg(e,i);t.expose({scrollTo:i,fixToTop:u,refRoot:r,refContent:r}),a.onMounted(()=>{var p;c=new fh(d,r.value),(p=e.scrollbar)!=null&&p.enabled&&s(r),c.install()}),a.onUnmounted(()=>{c==null||c.uninstall()});const h=a.computed(()=>e.scrollbar.enabled?[e.className]:[e.className]);return{rendAsTag:()=>{var p,g,v,b,y,N,w,C;return a.h(n,{class:h.value,style:f.value,ref:r},[((g=(p=t.slots).beforeContent)==null?void 0:g.call(p))??"",((b=(v=t.slots).default)==null?void 0:b.call(v,{data:e.list}))??"",((N=(y=t.slots).afterContent)==null?void 0:N.call(y))??"",((C=(w=t.slots).afterSection)==null?void 0:C.call(w))??""])}}},lN=a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:iN},props:sN,emits:["content-scroll"],slots:Object,setup(e,t){const{renderAs:n}=e,r=B=>typeof B=="string"?[B]:typeof B=="object"&&!Array.isArray(B)?[B]:B;if(!e.enabled){const{rendAsTag:B}=oN(e,t);return B}const s=a.ref(null),i=a.ref(0),o=a.ref(0),l=a.ref(0),c=a.ref(null),d=B=>{let z=B*e.groupItemCount,D=(B+1)*e.groupItemCount;if(D>i.value){const k=D-z;D=i.value,z=D-k}return{index:z,rows:e.list.slice(z,D),items:[z,D],type:"virtual"}},f=()=>typeof e.lineHeight=="function"?({index:B})=>e.lineHeight(d(B)):e.lineHeight,u=a.computed(()=>({lineHeight:f(),handleScrollCallback:S,pagination:y,throttleDelay:e.throttleDelay,scrollbar:e.scrollbar})),{init:h,scrollTo:p,updateScrollHeight:g,update:v}=ug(e);let b=null;const y=a.reactive({startIndex:0,endIndex:0,scrollTop:1,scrollLeft:0,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),N=a.ref([]),w=()=>typeof e.height=="number"?e.height:c.value.offsetHeight,C=()=>{const B=w();let z=Math.ceil(i.value/e.groupItemCount),D=0,k=0,G=0;for(;z>0;z--)if(k=e.lineHeight(d(z)),D=D+k,D>B){G=D-B;break}return{diffHeight:G,startIndex:z}},S=(B,z,D,k,G,U,te)=>{Object.assign(y,{startIndex:z,endIndex:D,scrollTop:k,translateX:U,translateY:G,scrollLeft:U,pos:te});let Q=y.startIndex*e.groupItemCount,ne=y.endIndex*e.groupItemCount;const le=O.value.length;le<ne&&(ne=le,typeof e.lineHeight=="function"?Q=C().startIndex:(Q=ne-Math.floor(s.value.offsetHeight/e.lineHeight),Q=Q<0?0:Q));const ae=O.value.slice(Q,ne);N.value=ae,B&&t.emit("content-scroll",[B,y,ae])};a.onMounted(()=>{var B;if(b=new fh(u,s.value),(B=e.scrollbar)!=null&&B.enabled){c.value=new rN({delegateElement:s.value,scrollHeight:o.value,onScollCallback:P}),h(c),g(l.value),b.executeThrottledRender.call(b,{offset:{x:0,y:0}});return}b.install()}),a.onUnmounted(()=>{b==null||b.uninstall()});const x=()=>{E(e.list)},E=B=>{if(i.value=Math.ceil((B||[]).length/e.groupItemCount),y.count=i.value,typeof e.abosuteHeight=="string"&&e.abosuteHeight==="auto")if(typeof e.lineHeight=="function"){o.value=0;let D=0;const k=Math.ceil(i.value/e.groupItemCount);for(let G=0;G<k;G++){const U=e.lineHeight.apply(this,[d(G)]);D+=typeof U=="number"?U:0}o.value=D}else o.value=e.lineHeight*i.value;else o.value=e.abosuteHeight;L()},T=(B={left:0,top:0})=>{const z=s.value,D=typeof e.height=="number"?{scrollHeight:o.value,offsetHeight:e.height}:z;dg(e.lineHeight,S,y,D,{target:z})},O=a.computed(()=>e.rowKey!==void 0||!e.autoIndex?e.list:(e.list||[]).map((B,z)=>({...B,$index:z}))),V=a.computed(()=>e.scrollPosition==="content"?{}:{}),_=a.computed(()=>({height:typeof e.height=="number"?`${e.height}px`:e.height,width:typeof e.width=="number"?`${e.width}px`:e.width,display:"inline-block",maxHeight:e.maxHeight?`${e.maxHeight}px`:!1,minHeight:e.minHeight?`${e.minHeight}px`:!1,...e.scrollPosition==="container"?V.value:{},...e.wrapperStyle})),L=()=>{l.value=o.value<e.minHeight?e.minHeight:o.value},{resolveClassName:I}=he(),R=a.computed(()=>[I("virtual-render"),...r(e.className),e.scrollPosition==="container"?I("virtual-content"):""]),M=()=>{x(),T(),b==null||b.executeThrottledRender.call(b,{offset:{x:0,y:0}})},{fixToTop:j}=cg(e,p),H=()=>{const B=s.value,z=typeof e.height=="number"?{scrollHeight:o.value,offsetHeight:e.height}:B;b==null||b.setDelegateWrapper(z)},A=()=>{b==null||b.setBinding(u),x(),g(l.value),H(),v(),T(),a.nextTick(()=>{b==null||b.executeThrottledRender.call(b,{offset:{x:y.scrollLeft,y:y.scrollTop}})})};a.watch(()=>e.height,()=>{A()}),a.watch(()=>[e.list,e.list.length],()=>{A()},{immediate:!0}),t.expose({reset:M,scrollTo:p,fixToTop:j,updateScroll:v,refRoot:s,refContent:s});const P=B=>{b.executeThrottledRender.call(b,B)};return()=>{var B,z,D,k,G,U,te,$;return a.h(n||"div",{ref:s,class:[...R.value],style:_.value},[((z=(B=t.slots).beforeContent)==null?void 0:z.call(B))??"",((k=(D=t.slots).default)==null?void 0:k.call(D,{data:N.value}))??"",((U=(G=t.slots).afterContent)==null?void 0:U.call(G))??"",(($=(te=t.slots).afterSection)==null?void 0:$.call(te))??""])}}}),Ws=Ie(lN),cN=["阿","哎","安","肮","凹","八","挀","扳","邦","勹","陂","奔","伻","屄","边","灬","憋","汃","冫","癶","峬","嚓","偲","参","仓","撡","冊","嵾","曽","叉","芆","辿","伥","抄","车","抻","阷","吃","充","抽","出","欻","揣","巛","刅","吹","旾","逴","呲","匆","凑","粗","汆","崔","邨","搓","咑","呆","丹","当","刀","嘚","扥","灯","氐","甸","刁","爹","丁","丟","东","吺","厾","耑","垖","吨","多","妸","诶","奀","鞥","儿","发","帆","匚","飞","分","丰","覅","仏","紑","夫","旮","侅","甘","冈","皋","戈","给","根","刯","工","勾","估","瓜","乖","关","光","归","丨","呙","哈","咍","佄","夯","茠","诃","黒","拫","亨","噷","叿","齁","乎","花","怀","欢","巟","灰","昏","吙","丌","加","戋","江","艽","阶","巾","坕","冂","丩","凥","姢","噘","军","咔","开","刊","忼","尻","匼","肎","劥","空","抠","扝","夸","蒯","宽","匡","亏","坤","扩","垃","来","兰","啷","捞","肋","勒","崚","哩","俩","奁","良","撩","毟","拎","伶","溜","囖","龙","瞜","噜","驴","娈","掠","抡","罗","呣","妈","埋","嫚","牤","猫","么","呅","门","甿","咪","宀","喵","乜","民","名","谬","摸","哞","毪","嗯","拏","腉","囡","囔","孬","疒","娞","恁","能","妮","拈","娘","鸟","捏","囜","宁","妞","农","羺","奴","女","奻","疟","黁","挪","喔","讴","妑","拍","眅","乓","抛","呸","喷","匉","丕","囨","剽","氕","姘","乒","钋","剖","仆","七","掐","千","呛","悄","癿","亲","靑","卭","丘","区","峑","缺","夋","呥","穣","娆","惹","人","扔","日","茸","厹","邚","挼","堧","婑","瞤","捼","仨","毢","三","桒","掻","閪","森","僧","杀","筛","山","伤","弰","奢","申","升","尸","収","书","刷","衰","闩","双","脽","吮","说","厶","忪","捜","苏","狻","夊","孙","唆","他","囼","坍","汤","夲","忑","熥","剔","天","旫","帖","厅","囲","偷","凸","湍","推","吞","乇","穵","歪","弯","尣","危","昷","翁","挝","乌","夕","虲","仙","乡","灱","些","心","星","凶","休","吁","吅","削","坃","丫","恹","央","幺","倻","一","囙","应","哟","佣","优","扜","囦","曰","晕","帀","災","兂","匨","傮","则","贼","怎","増","扎","捚","沾","张","佋","蜇","贞","争","之","中","州","朱","抓","拽","专","妆","隹","宒","卓","乲","宗","邹","租","钻","厜","尊","昨","兙"],uN=["A","AI","AN","ANG","AO","BA","BAI","BAN","BANG","BAO","BEI","BEN","BENG","BI","BIAN","BIAO","BIE","BIN","BING","BO","BU","CA","CAI","CAN","CANG","CAO","CE","CEN","CENG","CHA","CHAI","CHAN","CHANG","CHAO","CHE","CHEN","CHENG","CHI","CHONG","CHOU","CHU","CHUA","CHUAI","CHUAN","CHUANG","CHUI","CHUN","CHUO","CI","CONG","COU","CU","CUAN","CUI","CUN","CUO","DA","DAI","DAN","DANG","DAO","DE","DEN","DENG","DI","DIAN","DIAO","DIE","DING","DIU","DONG","DOU","DU","DUAN","DUI","DUN","DUO","E","EI","EN","ENG","ER","FA","FAN","FANG","FEI","FEN","FENG","FIAO","FO","FOU","FU","GA","GAI","GAN","GANG","GAO","GE","GEI","GEN","GENG","GONG","GOU","GU","GUA","GUAI","GUAN","GUANG","GUI","GUN","GUO","HA","HAI","HAN","HANG","HAO","HE","HEI","HEN","HENG","HM","HONG","HOU","HU","HUA","HUAI","HUAN","HUANG","HUI","HUN","HUO","JI","JIA","JIAN","JIANG","JIAO","JIE","JIN","JING","JIONG","JIU","JU","JUAN","JUE","JUN","KA","KAI","KAN","KANG","KAO","KE","KEN","KENG","KONG","KOU","KU","KUA","KUAI","KUAN","KUANG","KUI","KUN","KUO","LA","LAI","LAN","LANG","LAO","LE","LEI","LENG","LI","LIA","LIAN","LIANG","LIAO","LIE","LIN","LING","LIU","LO","LONG","LOU","LU","LV","LUAN","LVE","LUN","LUO","M","MA","MAI","MAN","MANG","MAO","ME","MEI","MEN","MENG","MI","MIAN","MIAO","MIE","MIN","MING","MIU","MO","MOU","MU","N","NA","NAI","NAN","NANG","NAO","NE","NEI","NEN","NENG","NI","NIAN","NIANG","NIAO","NIE","NIN","NING","NIU","NONG","NOU","NU","NV","NUAN","NVE","NUN","NUO","O","OU","PA","PAI","PAN","PANG","PAO","PEI","PEN","PENG","PI","PIAN","PIAO","PIE","PIN","PING","PO","POU","PU","QI","QIA","QIAN","QIANG","QIAO","QIE","QIN","QING","QIONG","QIU","QU","QUAN","QUE","QUN","RAN","RANG","RAO","RE","REN","RENG","RI","RONG","ROU","RU","RUA","RUAN","RUI","RUN","RUO","SA","SAI","SAN","SANG","SAO","SE","SEN","SENG","SHA","SHAI","SHAN","SHANG","SHAO","SHE","SHEN","SHENG","SHI","SHOU","SHU","SHUA","SHUAI","SHUAN","SHUANG","SHUI","SHUN","SHUO","SI","SONG","SOU","SU","SUAN","SUI","SUN","SUO","TA","TAI","TAN","TANG","TAO","TE","TENG","TI","TIAN","TIAO","TIE","TING","TONG","TOU","TU","TUAN","TUI","TUN","TUO","WA","WAI","WAN","WANG","WEI","WEN","WENG","WO","WU","XI","XIA","XIAN","XIANG","XIAO","XIE","XIN","XING","XIONG","XIU","XU","XUAN","XUE","XUN","YA","YAN","YANG","YAO","YE","YI","YIN","YING","YO","YONG","YOU","YU","YUAN","YUE","YUN","ZA","ZAI","ZAN","ZANG","ZAO","ZE","ZEI","ZEN","ZENG","ZHA","ZHAI","ZHAN","ZHANG","ZHAO","ZHE","ZHEN","ZHENG","ZHI","ZHONG","ZHOU","ZHU","ZHUA","ZHUAI","ZHUAN","ZHUANG","ZHUI","ZHUN","ZHUO","ZI","ZONG","ZOU","ZU","ZUAN","ZUI","ZUN","ZUO",""],dN={曾:"ZENG",沈:"SHEN",嗲:"DIA",碡:"ZHOU",聒:"GUO",炔:"QUE",蚵:"KE",砉:"HUA",嬤:"MO",嬷:"MO",蹒:"PAN",蹊:"XI",丬:"PAN",霰:"XIAN",莘:"XIN",豉:"CHI",饧:"XING",筠:"JUN",长:"CHANG",帧:"ZHEN",峙:"SHI",郍:"NA",芎:"XIONG",谁:"SHUI"},Oi={PINYINS:uN,UNIHANS:cN,EXCEPTIONS:dN},fN="阿",hN="鿿",mN=1,Qa=2,td=3;let Ia=null,Ai;function pN(e){e&&(typeof e=="function"&&(e=[e]),e.forEach&&e.forEach(t=>{typeof t=="function"&&t(Oi)}))}function fg(e){return!e&&Ia!==null||(typeof Intl=="object"&&Intl.Collator?(Ai=new Intl.Collator(["zh-Hans-CN","zh-CN"]),Ia=Intl.Collator.supportedLocalesOf(["zh-CN"]).length===1):Ia=!1),Ia}function hg(e){const{UNIHANS:t}=Oi,{PINYINS:n}=Oi,{EXCEPTIONS:r}=Oi,s={source:e};if(e in r)return s.type=Qa,s.target=r[e],s;let i=-1,o;if(e.charCodeAt(0)<256)return s.type=mN,s.target=e,s;if(o=Ai.compare(e,fN),o<0)return s.type=td,s.target=e,s;if(o===0)s.type=Qa,i=0;else{if(o=Ai.compare(e,hN),o>0)return s.type=td,s.target=e,s;o===0&&(s.type=Qa,i=t.length-1)}if(s.type=Qa,i<0){let l=0,c=t.length-1;for(;l<=c;){i=~~((l+c)/2);const d=t[i];if(o=Ai.compare(e,d),o===0)break;o>0?l=i+1:c=i-1}}return o<0&&i--,s.target=n[i],s.target||(s.type=td,s.target=s.source),s}function Z1(e){return typeof e!="string"||!fg()?e:e.split("").map(t=>hg(t))}const Li={isSupported:fg,parse:Z1,patchDict:pN,genToken:hg,convertToPinyin(e,t,n){return Z1(e).map(r=>t&&r.type===Qa?r.target.toLowerCase():r.target).join(n||"")}};function gN(e){e.EXCEPTIONS={嗲:"DIA",碡:"ZHOU",聒:"GUO",炔:"QUE",蚵:"KE",砉:"HUA",嬷:"MO",蹊:"XI",丬:"PAN",霰:"XIAN",豉:"CHI",饧:"XING",帧:"ZHEN",芎:"XIONG",谁:"SHUI",钶:"KE"},e.UNIHANS[91]="伕",e.UNIHANS[347]="仚",e.UNIHANS[393]="诌",e.UNIHANS[39]="婤",e.UNIHANS[50]="腠",e.UNIHANS[369]="攸",e.UNIHANS[123]="乯",e.UNIHANS[171]="刕",e.UNIHANS[102]="佝",e.UNIHANS[126]="犿",e.UNIHANS[176]="列",e.UNIHANS[178]="刢",e.UNIHANS[252]="娝",e.UNIHANS[330]="偸"}function vN(e){return typeof e!="function"?!1:e("伕").target==="FOU"&&e("仚").target==="XIA"&&e("诌").target==="ZHONG"&&e("婤").target==="CHONG"&&e("腠").target==="CONG"&&e("攸").target==="YONG"&&e("乯").target==="HOU"&&e("刕").target==="LENG"&&e("佝").target==="GONG"&&e("犿").target==="HUAI"&&e("列").target==="LIAO"&&e("刢").target==="LIN"&&e("钶").target==="E"}const Q1={patcher:gN,shouldPatch:vN};Li.isSupported()&&Q1.shouldPatch(Li.genToken)&&Li.patchDict(Q1);var mg=function(e){return e.FILLED="filled",e.STROKE="stroke",e.UNKNOWN="",e}(mg||{});const yN=a.defineComponent({name:"Tag",props:{theme:vo().def(""),closable:m.bool.def(!1),type:xe("tagStorkeType",{}).def(mg.UNKNOWN),checkable:m.bool.def(!1),checked:m.bool.def(!1),radius:m.string.def("2px"),size:m.size()},emits:["change","close"],slots:Object,setup(e,{emit:t}){const{resolveClassName:n}=he();return{wrapperStyle:a.computed(()=>({borderRadius:e.radius})),handleClose:o=>{o.preventDefault(),o.stopPropagation(),t("close",o)},handleClick:o=>{o.preventDefault(),o.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(wt,{class:`${this.resolveClassName("tag-close")}`,onClick:this.handleClose},null)])}}),ws=Ie(yN);var bN=Fm();const gr=lt(bN),wN=a.defineComponent({name:"SelectTagInput",directives:{bkTooltips:Dn},props:{selected:{type:Array,default:()=>[]},tagTheme:vo(),placeholder:m.string.def(""),filterable:m.bool.def(!1),allowCreate:m.bool.def(!1),disabled:m.bool.def(!1),modelValue:m.any,collapseTags:m.bool.def(!1),behavior:d0()},emits:["update:modelValue","remove","enter","keydown"],setup(e,{emit:t}){const{resolveClassName:n}=he(),r=a.inject(sl,null),{modelValue:s,collapseTags:i,selected:o}=a.toRefs(e),l=a.ref(s.value),c=a.ref(),d=a.ref(null),f=a.computed(()=>o.value.slice(d.value,o.value.length).map(T=>r==null?void 0:r.handleGetLabelByValue(T.value)).join(", "));a.watch(s,()=>{l.value=s.value}),a.watch([o,i],()=>{C()},{flush:"post"});const u=T=>{t("remove",T)},h=()=>{var T;(T=c.value)==null||T.focus()},p=()=>{var T;(T=c.value)==null||T.blur()},g=T=>{t("update:modelValue",T)},v=T=>{t("update:modelValue",T.target.value)},b=T=>{switch(T.code){case"NumpadEnter":case"Enter":{t("enter",T.target.value,T);break}}t("keydown",T.target.value,T)},y=a.ref([]),N=a.ref(),w=T=>y.value.map(V=>V==null?void 0:V.$el).filter(V=>!!V),C=()=>{i.value&&(d.value=null,setTimeout(()=>{var V,_;const T=w(),O=T.findIndex((L,I)=>I?T[I-1].offsetTop!==L.offsetTop:!1);d.value=O>0?O:null,((V=T[d.value])==null?void 0:V.offsetTop)!==((_=N.value)==null?void 0:_.offsetTop)&&d.value>1&&(d.value-=1)}))},S=gr(C,150),x=a.ref(),E=new ResizeObserver(()=>{S()});return a.onMounted(()=>{x.value&&E.observe(x.value)}),a.onBeforeUnmount(()=>{x.value&&E.unobserve(x.value)}),{collapseTagRef:N,tagWrapperRef:x,tagsRefs:y,select:r,overflowTagIndex:d,value:l,inputRef:c,overflowContent:f,handleRemoveTag:u,focus:h,blur:p,updateModelValue:g,handleInput:v,handleKeydown:b,resolveClassName:n}},render(){var s,i,o,l,c,d,f,u;const e=(i=(s=this.$slots)==null?void 0:s.prefix)==null?void 0:i.call(s),t=Ae({[this.resolveClassName("select-tag")]:!0,[this.resolveClassName("select-tag--default")]:!0,"is-disabled":this.disabled,"collapse-tag":this.collapseTags,"has-prefix":!!e,"is-simplicity":this.behavior==="simplicity"}),n=Ae({[this.resolveClassName("select-tag-wrapper")]:!0}),r={display:this.selected.length&&!this.filterable?"none":""};return a.createVNode("div",{ref:"tagWrapperRef",class:t},[(l=(o=this.$slots)==null?void 0:o.prefix)==null?void 0:l.call(o),a.createVNode("div",{class:n},[((d=(c=this.$slots).default)==null?void 0:d.call(c))??this.selected.map((h,p)=>a.createVNode(ws,{key:h.value,ref:g=>this.tagsRefs[p]=g,style:{display:this.collapseTags&&this.overflowTagIndex&&p>=this.overflowTagIndex?"none":""},theme:this.tagTheme,closable:!0,onClose:()=>this.handleRemoveTag(h.value)},{default:()=>{var g,v;return[((v=(g=this.$slots).tagRender)==null?void 0:v.call(g,h))??a.createVNode(Kp,{type:"tips"},{default:()=>{var b;return[(b=this.select)==null?void 0:b.handleGetLabelByValue(h.value)]}})]}})),a.withDirectives(a.createVNode(ws,{ref:"collapseTagRef",style:{display:this.overflowTagIndex&&this.collapseTags?"":"none"},class:this.resolveClassName("select-overflow-tag")},{default:()=>[a.createTextVNode("+"),this.selected.length-this.overflowTagIndex]}),[[a.resolveDirective("bk-tooltips"),{content:this.overflowContent,disabled:!this.overflowTagIndex||!this.collapseTags,extCls:this.resolveClassName("select-tooltips")}]]),a.createVNode("input",{ref:"inputRef",style:r,class:this.resolveClassName("select-tag-input"),disabled:this.disabled,placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,type:"text",value:this.filterable?this.value:"",onInput:this.handleInput,onKeydown:this.handleKeydown},null)]),(u=(f=this.$slots)==null?void 0:f.suffix)==null?void 0:u.call(f)])}}),CN=a.defineComponent({name:"Select",directives:{clickoutside:Ln},props:{modelValue:m.any,multiple:m.bool.def(!1),disabled:m.bool.def(!1),size:m.size().def(c0.DEFAULT),clearable:m.bool.def(!0),loading:m.bool.def(!1),filterable:m.bool.def(!1),remoteMethod:m.func,scrollHeight:m.number.def(204),minHeight:m.number,showAll:m.bool.def(!1),allOptionText:m.string.def(""),allOptionId:m.oneOfType([m.number,m.string]),showSelectAll:m.bool.def(!1),popoverMinWidth:m.number.def(0),showOnInit:m.bool.def(!1),multipleMode:m.oneOf(["default","tag"]).def("default"),tagTheme:vo(),behavior:d0(),collapseTags:m.bool.def(!1),autoHeight:m.bool.def(!0),noDataText:m.string,noMatchText:m.string,loadingText:m.string,placeholder:m.string,searchPlaceholder:m.string,selectAllText:m.string,scrollLoading:m.bool.def(!1),allowCreate:m.bool.def(!1),popoverOptions:Object,customContent:m.bool.def(!1),list:m.arrayOf(m.any).def([]),idKey:m.string.def("value"),displayKey:m.string.def("label"),withValidate:m.bool.def(!0),showSelectedIcon:m.bool.def(!0),inputSearch:m.bool.def(!1),enableVirtualRender:m.bool.def(!1),allowEmptyValues:m.array.def([]),autoFocus:m.bool.def(!1),disableFocusBehavior:m.bool.def(!1),keepSearchValue:m.bool.def(!1),prefix:m.string,selectedStyle:M8(),filterOption:{type:Function},searchWithPinyin:m.bool.def(!0),highlightKeyword:m.bool.def(!1),trigger:{type:String,default:"default"},disableScrollToSelectedOption:m.bool.def(!1),inputTooltipsOptions:{type:Object,default:()=>({})}},emits:["update:modelValue","change","toggle","clear","scroll-end","focus","blur","tag-remove","select","deselect","search-change"],setup(e,{emit:t}){const n=Be("select"),{resolveClassName:r}=he(),{modelValue:s,disabled:i,filterable:o,multiple:l,remoteMethod:c,loading:d,popoverMinWidth:f,showOnInit:u,multipleMode:h,allowCreate:p,customContent:g,showSelectedIcon:v,inputSearch:b,enableVirtualRender:y,showSelectAll:N,showAll:w,allOptionId:C,scrollHeight:S,list:x,displayKey:E,idKey:T,collapseTags:O,autoHeight:V,popoverOptions:_,allowEmptyValues:L,autoFocus:I,keepSearchValue:R,selectedStyle:M,filterOption:j,searchWithPinyin:H,highlightKeyword:A,disableFocusBehavior:P,trigger:B,disableScrollToSelectedOption:z}=a.toRefs(e),D=a.ref(null),k=a.computed(()=>e.allOptionText),G=a.computed(()=>e.noDataText===void 0?n.value.noData:e.noDataText),U=a.computed(()=>e.noMatchText===void 0?n.value.noMatchedData:e.noMatchText),te=a.computed(()=>e.loadingText===void 0?n.value.loading:e.loadingText),$=a.computed(()=>e.placeholder===void 0?n.value.pleaseSelect:e.placeholder),Q=a.computed(()=>e.searchPlaceholder===void 0?n.value.enterKeywords:e.searchPlaceholder),ne=a.computed(()=>e.selectAllText===void 0?n.value.selectAll:e.selectAllText),le=on(),ae=a.ref(),X=a.ref(),J=a.ref(),Y=a.ref(),oe=a.ref(),pe=a.ref(),Z=a.ref(),ce=a.ref(new Map),ie=a.computed(()=>[...ce.value.values()].sort((ve,Ne)=>ve.order-Ne.order)),F=a.ref(new Map),K=a.ref([]),W=a.computed(()=>K.value.reduce((ve,Ne)=>(ve[Ne.value]=Ne.label,ve),{[`${C.value}`]:n.value.all})),q=a.ref(),se=a.computed(()=>x.value.reduce((ve,Ne)=>(ve[Ne[T.value]]=Ne[E.value],ve),{}));a.watch([ce,x],()=>{ti()}),a.watch(s,()=>{var ve;ti(),e.withValidate&&((ve=le==null?void 0:le.validate)==null||ve.call(le,"change"))},{deep:!0}),a.watch(K,()=>{var ve;(ve=Z.value)==null||ve.updatePopover(null,yr.value)});const fe=a.computed(()=>ke.value?x.value:x.value.filter(ve=>Oe(ze.value,String(ve[E.value]),ve))),ee=a.computed(()=>i.value||d.value),de=a.computed(()=>K.value.map(ve=>{var Ne,_e;return((_e=(Ne=ce.value)==null?void 0:Ne.get(ve.value))==null?void 0:_e.optionName)||se.value[ve.value]||ve.label})),ue=a.computed(()=>{const ve=ie.value.reduce((Ne,_e)=>(_e.disabled||Ne.push(_e.optionID),Ne),[]);return ve.length<=K.value.length&&ve.every(Ne=>K.value.some(_e=>_e.value===Ne))}),ge=a.computed(()=>{var ve;return K.value.length===1&&((ve=K.value[0])==null?void 0:ve.value)===C.value}),Se=a.computed(()=>!!F.value.size),Le=a.computed(()=>!ie.value.length),Ve=a.computed(()=>ie.value.length&&ie.value.every(ve=>!ve.visible)),ke=a.computed(()=>o.value&&typeof c.value=="function"),Me=a.computed(()=>!!(j.value&&typeof j.value=="function")),at=a.computed(()=>!(tt.value||Le.value||Ve.value)||g.value),Ue=a.computed(()=>l.value&&N.value&&(!ze.value||!o.value)),ft=a.computed(()=>l.value&&w.value),We=a.computed(()=>S.value-12-(Ue.value?32:0)),Pe=a.ref(32),Fe=a.computed(()=>y.value?fe.value.length*Pe.value>We.value:!1),Xn=a.computed(()=>Math.ceil(We.value/Pe.value)),dn=a.computed(()=>tt.value?te.value:Ve.value||x.value.length&&!fe.value.length?U.value:Le.value?G.value:""),Ur=a.computed(()=>V.value?O.value&&!mn.value:O.value),yr=a.computed(()=>ks({theme:`light ${r("select-popover")}`,trigger:"manual",width:Va.value,arrow:!1,placement:"bottom-start",isShow:mn.value,reference:pe.value,offset:4,popoverDelay:0,renderType:go.AUTO,referenceCls:r("select-popover-reference")},_.value)),{register:Je,unregister:fn}=Vf(ce),{register:wl,unregister:Ks}=Vf(F),{isHover:La,setHover:Ys,cancelHover:Xs}=Zp(),br=a.ref(!1),kt=()=>{br.value||(br.value=!0,t("focus"))},hn=()=>{br.value&&(br.value=!1,ei(),t("blur"))},{popperWidth:Va,isPopoverShow:mn,hidePopover:Wr,showPopover:Da,togglePopover:Yt}=hC({popoverMinWidth:f.value},X),wr=()=>{B.value!=="manual"&&Wr()},Js=()=>{B.value!=="manual"&&Da()},ka=a.computed(()=>o.value&&b.value&&mn.value||p.value);a.watch(mn,ve=>{t("toggle",mn.value),ve?(document.addEventListener("keydown",Rh),setTimeout(()=>{kn(),Qs(),Zs()},10)):(R.value||(we.value=""),document.removeEventListener("keydown",Rh))});const Zs=()=>{var Ne,_e,qe;if(Fe.value||z.value)return;const ve=(_e=(Ne=J.value)==null?void 0:Ne.querySelectorAll)==null?void 0:_e.call(Ne,".is-selected");(qe=ve==null?void 0:ve[0])==null||qe.scrollIntoView({block:"center"})},Qs=()=>{var _e;const ve=K.value[0],Ne=ce.value.get(ve==null?void 0:ve.value);Ne&&!Ne.disabled&&Ne.visible?q.value=ve==null?void 0:ve.value:q.value=(_e=ie.value.find(qe=>!qe.disabled&&qe.visible))==null?void 0:_e.optionID},Oe=(ve,Ne,_e={})=>{var qe,Rn;if(Me.value)return!!j.value(ve,{..._e});if(H.value){const In=Li.parse(Ne).map(Zn=>Zn.type===2?Zn.target.toLowerCase():Zn.target),ni=In.reduce((Zn,mt)=>Zn+mt[0],"");return In.join("").indexOf(ve)!==-1||ni.indexOf(ve)!==-1||((qe=qr(String(Ne)))==null?void 0:qe.includes(qr(ve)))}return(Rn=qr(String(Ne)))==null?void 0:Rn.includes(qr(ve))},re=ve=>{o.value&&(ve?ie.value.forEach(Ne=>{Ne.visible=Oe(ve,String(Ne.optionName),{...Ne.$props,...Ne.$attrs})}):ie.value.forEach(Ne=>{Ne.visible=!0}))},{searchValue:we,customOptionName:Te,curSearchValue:ze,searchLoading:tt}=mC(ke.value?c.value:re,Qs);a.watch(we,()=>{oe.value.scrollTop=0,q.value="",t("search-change",we.value)});const He=ve=>{ve!==s.value&&(t("update:modelValue",ve,s.value),t("change",ve,s.value),ti(),l.value&&(Te.value=""))},ht=()=>{ee.value||B.value==="manual"||(kt(),Yt())},Xt=ve=>{o.value&&(Te.value=ve)},Cr=(ve,Ne)=>{const _e=String(ve);if(!p.value||!_e)return;Ne.stopPropagation(),Ne.preventDefault();const qe=ie.value.find(In=>qr(String(In.optionName))===qr(_e));if(o.value&&qe){Jn(qe);return}ce.value.get(_e)||(l.value?(K.value.push({value:_e,label:_e}),He(K.value.map(In=>In.value))):(K.value=[{value:_e,label:_e}],He(_e),wr()))},Jn=ve=>{if(ee.value||!ve)return;const Ne=K.value.findIndex(_e=>_e.value===C.value);if(Ne>-1&&K.value.splice(Ne,1),l.value){const _e=K.value.findIndex(qe=>qe.value===ve.optionID);_e>-1?(K.value.splice(_e,1),He(K.value.map(qe=>qe.value)),t("deselect",ve.optionID)):(K.value.push({value:ve.optionID,label:ve.optionName||ve.optionID}),He(K.value.map(qe=>qe.value)),t("select",ve.optionID),st()),kn()}else K.value=[{label:ve.optionName||ve.optionID,value:ve.optionID}],He(ve.optionID),t("select",ve.optionID),wr(),hn()},st=()=>{var ve;["tag"].includes(h.value)&&ka.value&&((ve=pe.value)==null||ve.updateModelValue(""))},kn=()=>{P.value||setTimeout(()=>{var ve,Ne,_e;!b.value&&!p.value?(ve=Y.value)==null||ve.focus():h.value==="tag"?(Ne=pe.value)==null||Ne.focus():(_e=ae.value)==null||_e.focus()},0)},ei=()=>{setTimeout(()=>{var ve,Ne;h.value==="tag"?(ve=pe.value)==null||ve.blur():(Ne=ae.value)==null||Ne.blur()},0)},R4=ve=>{ve.stopPropagation(),K.value=[],Te.value="",st(),He(l.value?[]:""),t("clear",l.value?[]:""),wr()},I4=()=>{q.value=""},P4=()=>{var ve;if(ue.value)K.value=[];else{const Ne=new Map;ie.value.forEach(_e=>{_e.disabled||Ne.has(_e.optionID)||Ne.set(_e.optionID,_e.optionName||_e.optionID)}),(ve=x.value)==null||ve.forEach(_e=>{_e.disabled||Ne.has(_e[T.value])||Ne.set(_e[T.value],_e[E.value])}),K.value=Array.from(Ne.keys()).map(_e=>({value:_e,label:Ne.get(_e)}))}He(K.value.map(Ne=>Ne.value)),kn()},M4=()=>{if(!ft.value)return;K.value.findIndex(Ne=>Ne.value===C.value)>-1?K.value=[]:K.value=[{value:C.value,label:n.value.all}],He(K.value.map(Ne=>Ne.value)),kn()},$4=ve=>{const{scrollTop:Ne,clientHeight:_e,scrollHeight:qe}=ve.target;Ne+_e===qe&&t("scroll-end")},F4=ve=>{if(ee.value)return;const Ne=K.value.findIndex(_e=>_e.value===ve);Ne>-1&&(K.value.splice(Ne,1),He(K.value.map(_e=>_e.value)),t("tag-remove",ve))},Cl=ve=>{var _e,qe;let Ne=ve;if(typeof Ne=="object"){for(const Rn of ce.value.keys())if(ch(Rn,Ne)){Ne=Rn;break}}return((qe=(_e=ce.value)==null?void 0:_e.get(Ne))==null?void 0:qe.optionName)||se.value[Ne]||W.value[Ne]||Ne},ti=()=>{Array.isArray(s.value)?K.value=[...s.value.map(ve=>({value:ve,label:Cl(ve)}))]:s.value||L.value.includes(s.value)?K.value=[{value:s.value,label:Cl(s.value)}]:K.value=[]},H4=ve=>{K.value=ve.map(Ne=>({label:Ne[E.value],value:Ne[T.value]}))},Rh=ve=>{var qe,Rn,In,ni,Zn;if(!mn.value||Fe.value)return;const Ne=ie.value.filter(mt=>!mt.disabled&&mt.visible),_e=Ne.findIndex(mt=>mt.optionID===q.value);switch(ve.code){case"ArrowUp":case"ArrowDown":{ve.preventDefault();let mt=0;ve.code==="ArrowDown"?mt=_e>=Ne.length-1?0:_e+1:mt=_e===0?Ne.length-1:_e-1,pC((qe=Ne[mt])==null?void 0:qe.$el,J.value)||(In=(Rn=Ne[mt])==null?void 0:Rn.$el)==null||In.scrollIntoView(),q.value=(ni=Ne[mt])==null?void 0:ni.optionID;break}case"Backspace":{if(!l.value||!K.value.length||Te.value.length||ve.target===Y.value)return;K.value.pop(),He(K.value.map(mt=>mt.value));break}case"NumpadEnter":case"Enter":{const{value:mt}=ve.target;if(p.value&&mt||ve.target===Y.value&&((Zn=Y.value)!=null&&Zn.value))return;const z4=ce.value.get(q.value);Jn(z4);break}}},B4=({event:ve})=>{var _e;const{target:Ne}=ve;(_e=X.value)!=null&&_e.contains(Ne)||X.value===Ne||(wr(),hn())};return a.provide(sl,a.reactive({multiple:l,selected:K,activeOptionValue:q,showSelectedIcon:v,selectedStyle:M,curSearchValue:ze,highlightKeyword:A,register:Je,unregister:fn,registerGroup:wl,unregisterGroup:Ks,handleOptionSelected:Jn,handleGetLabelByValue:Cl})),a.onMounted(()=>{ti(),setTimeout(()=>{u.value&&Js(),I.value&&kn()})}),{t:n,selected:K,isInput:ka,options:ie,isDisabled:ee,selectedLabel:de,isPopoverShow:mn,isHover:La,popperWidth:Va,inputRef:ae,triggerRef:X,contentRef:J,searchRef:Y,scrollContainerRef:oe,selectTagInputRef:pe,popoverRef:Z,searchLoading:tt,isOptionsEmpty:Le,isSearchEmpty:Ve,isFocus:br,isShowSelectContent:at,curContentText:dn,isGroup:Se,searchValue:we,curSearchValue:ze,customOptionName:Te,isShowAll:ft,isShowSelectAll:Ue,virtualHeight:We,filterList:fe,isCollapseTags:Ur,popoverConfig:yr,isAllSelected:ue,isAll:ge,displayAllText:k,focusInput:kn,setHover:Ys,cancelHover:Xs,handleFocus:kt,handleBlur:hn,handleTogglePopover:ht,handleClear:R4,hidePopover:Wr,showPopover:Da,toggleSelectAll:P4,toggleAll:M4,handleOptionSelected:Jn,handleClickOutside:B4,handleScroll:$4,handleDeleteTag:F4,handleInputChange:Xt,handleSelectedAllOptionMouseEnter:I4,localLoadingText:te,localPlaceholder:$,localSearchPlaceholder:Q,localSelectAllText:ne,resolveClassName:r,handleCreateCustomOption:Cr,handlePopoverShown:()=>{var ve;(ve=D.value)==null||ve.scrollTo(0,1)},virtualLineHeight:Pe,isEnableVirtualRender:Fe,preloadItemCount:Xn,virtualRenderRef:D,setSelected:H4}},render(){const e=Ae({[`${this.resolveClassName("select")}`]:!0,"popover-show":this.isPopoverShow,"is-disabled":this.isDisabled,"is-focus":this.isFocus,"is-filterable":this.filterable,[this.size]:!0,[this.behavior]:!0}),t=()=>{var u,h,p;return this.loading?a.createVNode(ur,{class:"spinner",loading:!0,mode:"spin",size:"mini",theme:"primary"},null):this.clearable&&this.isHover&&this.selected.length&&!this.isDisabled||this.allowCreate&&this.isHover&&this.customOptionName&&!this.isDisabled?a.createVNode(Vt,{class:"clear-icon",onClick:this.handleClear},null):(u=this.$slots)!=null&&u.suffix?a.createVNode("span",{class:"angle-down"},[(p=(h=this.$slots)==null?void 0:h.suffix)==null?void 0:p.call(h)]):a.createVNode(Sa,{class:"angle-down"},null)},n=()=>{var u;return this.prefix?()=>a.createVNode("div",{class:`${this.resolveClassName("select--prefix-area")}`},[a.createVNode("span",null,[this.prefix])]):(u=this.$slots)!=null&&u.prefix?()=>{var h,p;return(p=(h=this.$slots)==null?void 0:h.prefix)==null?void 0:p.call(h)}:void 0},r=()=>{if(this.isShowSelectAll)return a.createVNode("li",{class:this.resolveClassName("select-option"),onClick:this.toggleSelectAll,onMouseenter:this.handleSelectedAllOptionMouseEnter},[this.selectedStyle==="checkbox"&&a.createVNode(Ct,{class:this.resolveClassName("select-checkbox"),indeterminate:!this.isAllSelected&&!!this.selected.length&&!this.isAll,modelValue:this.isAllSelected},null),this.localSelectAllText])},s=()=>{var u,h;return((h=(u=this.$slots)==null?void 0:u.allOptionIcon)==null?void 0:h.call(u))||a.createVNode(Jo,{class:"select-all-icon"},null)},i=()=>a.createVNode("span",null,[this.displayAllText||this.t.all]),o=()=>{var u;if(this.isShowAll)return a.createVNode("div",{class:this.resolveClassName("select-all")},[a.createVNode("div",{class:["wrapper",this.selected.length===1&&((u=this.selected[0])==null?void 0:u.value)===this.allOptionId?"active":""],onClick:this.toggleAll},[s(),i()])])},l=()=>{var u,h,p;return this.multipleMode==="tag"?a.createVNode(wN,{ref:"selectTagInputRef",modelValue:this.customOptionName,"onUpdate:modelValue":g=>this.customOptionName=g,behavior:this.behavior,collapseTags:this.isCollapseTags,disabled:this.isDisabled,filterable:this.isInput,placeholder:this.localPlaceholder,selected:this.selected,tagTheme:this.tagTheme,onEnter:this.handleCreateCustomOption,onRemove:this.handleDeleteTag},{prefix:n(),default:((u=this.$slots)==null?void 0:u.tag)&&(()=>{var g;return(g=this.$slots)==null?void 0:g.tag({selected:this.selected})}),tagRender:((h=this.$slots)==null?void 0:h.tagRender)&&(g=>{var v;return(v=this.$slots)==null?void 0:v.tagRender(g)}),suffix:()=>t()}):a.createVNode(hr,a.mergeProps({ref:"inputRef",behavior:this.behavior,disabled:this.isDisabled,modelValue:this.isInput&&this.customOptionName?this.customOptionName:this.selectedLabel.join(","),placeholder:this.isInput?this.selectedLabel.join(",")||this.localPlaceholder:this.localPlaceholder,readonly:!this.isInput,selectReadonly:!0,size:this.size,stopPropagation:!1,tooltipsOptions:this.inputTooltipsOptions,type:"text",withValidate:!1,onEnter:this.handleCreateCustomOption,onInput:this.handleInputChange},this.prefix?{prefix:this.prefix}:null),{...typeof((p=this.$slots)==null?void 0:p.prefix)=="function"?{prefix:()=>{var g,v;return(v=(g=this.$slots)==null?void 0:g.prefix)==null?void 0:v.call(g)}}:null,suffix:()=>t()})},c=()=>{var u,h;return a.createVNode("div",{ref:"triggerRef",style:{height:this.autoHeight&&this.collapseTags?"32px":""},class:this.resolveClassName("select-trigger"),onClick:this.handleTogglePopover,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[((h=(u=this.$slots)==null?void 0:u.trigger)==null?void 0:h.call(u,{selected:this.selected}))||l()])},d=()=>this.isEnableVirtualRender?a.createVNode(Ws,{ref:"virtualRenderRef",height:this.virtualHeight,lineHeight:this.virtualLineHeight,list:this.filterList,preloadItemCount:this.preloadItemCount,scrollbar:{enabled:!0,size:"small"}},{default:({data:u})=>{var p,g;const h=((p=this.$slots)==null?void 0:p.optionRender)||((g=this.$slots)==null?void 0:g.virtualScrollRender);return u.map(v=>a.createVNode(Gi,{id:v[this.idKey],key:v[this.idKey],disabled:!!v.disabled,name:v[this.displayKey]},typeof h=="function"?{default:()=>h({item:v})}:null))}}):this.filterList.map(u=>{var p,g;const h=((p=this.$slots)==null?void 0:p.optionRender)||((g=this.$slots)==null?void 0:g.virtualScrollRender);return a.createVNode(Gi,{id:u[this.idKey],key:u[this.idKey],disabled:!!u.disabled,name:u[this.displayKey]},typeof h=="function"?{default:()=>h({item:u})}:null)}),f=()=>{var u,h,p,g;return a.createVNode("div",{ref:"contentRef",class:this.resolveClassName("select-content-wrapper")},[o(),this.filterable&&!this.inputSearch&&a.createVNode("div",{class:this.resolveClassName("select-search-wrapper")},[a.createVNode(jr,{width:16,height:16,class:"icon-search"},null),a.withDirectives(a.createVNode("input",{ref:"searchRef",class:this.resolveClassName("select-search-input"),"onUpdate:modelValue":v=>this.searchValue=v,placeholder:this.localSearchPlaceholder},null),[[a.vModelText,this.searchValue]])]),!this.isShowSelectContent&&a.createVNode("div",{class:this.resolveClassName("select-empty")},[this.searchLoading&&a.createVNode(ur,{class:"mr5",loading:!0,mode:"spin",size:"mini",theme:"primary"},null),a.createVNode("span",null,[this.curContentText])]),a.createVNode("div",{class:this.resolveClassName("select-content")},[a.createVNode("div",{ref:"scrollContainerRef",style:{maxHeight:`${this.scrollHeight}px`,minHeight:`${this.minHeight}px`},class:this.isEnableVirtualRender?"":this.resolveClassName("select-dropdown"),onScroll:this.handleScroll},[a.createVNode("ul",{class:this.resolveClassName("select-options")},[r(),d(),(h=(u=this.$slots)==null?void 0:u.default)==null?void 0:h.call(u),this.scrollLoading&&a.createVNode("li",{class:this.resolveClassName("select-options-loading")},[a.createVNode(ur,{class:"spinner mr5",loading:!0,mode:"spin",size:"mini",theme:"primary"},null),a.createVNode("span",null,[this.localLoadingText])])])]),((p=this.$slots)==null?void 0:p.extension)&&a.createVNode("div",{class:this.resolveClassName("select-extension")},[(g=this.$slots)==null?void 0:g.extension()])])])};return a.createVNode("div",{class:e},[a.createVNode(Dt,a.mergeProps(this.popoverConfig,{ref:"popoverRef",onAfterShow:this.handlePopoverShown,onClickoutside:this.handleClickOutside}),{default:()=>c(),content:()=>f()})])}}),hh=St(CN,{Option:Gi,Group:HC}),Pn=10;function NN(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 i=[];if(t.pageSize>0)for(let o=0;o<t.totalSize;o+=t.pageSize)i.push(s.slice(o,o+t.pageSize));t.renderListPaged.splice(0,t.renderListPaged.length,...i),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 xN(e){const{useGroup:t,saveKey:n,displayKey:r,list:s}=a.toRefs(e),i=a.ref([]),o=a.ref({});return a.watch([t,n,r,s],()=>{i.value=[];let l=a.markRaw(s.value);t.value&&(l=l.reduce((c,d)=>{let f=[];return d.children&&(f=d.children.map(u=>({group:{groupId:d[n.value],groupName:d[r.value]},...u}))),c.concat(f)},[])),i.value=l,o.value=l.reduce((c,d)=>(c[d[n.value]]=d,c),{})},{immediate:!0,deep:!0}),{flatList:i,saveKeyMap:o}}const e6=e=>{const t=e.length;let n=0;for(let r=0;r<t;r++)(e.charCodeAt(r)&65280)!==0&&(n+=1),n+=1;return n},pg=(e,t,n)=>{a.watch([n,t],()=>{s()},{flush:"post"});const r=a.ref(null),s=()=>{t.value&&(r.value=null,setTimeout(()=>{const i=Array.from(e.value.querySelectorAll(".tag-item")),o=i.findIndex((l,c)=>c?i[c-1].offsetTop!==l.offsetTop:!1);r.value=o>0?o-1:null}))};return{overflowTagIndex:r}};var nd,t6;function SN(){if(t6)return nd;t6=1;function e(t,n){for(var r=-1,s=t==null?0:t.length,i=Array(s);++r<s;)i[r]=n(t[r],r,t);return i}return nd=e,nd}var rd,n6;function gg(){if(n6)return rd;n6=1;var e=_s(),t=SN(),n=un(),r=fo(),s=e?e.prototype:void 0,i=s?s.toString:void 0;function o(l){if(typeof l=="string")return l;if(n(l))return t(l,o)+"";if(r(l))return i?i.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return rd=o,rd}var ad,r6;function TN(){if(r6)return ad;r6=1;function e(t,n,r){var s=-1,i=t.length;n<0&&(n=-n>i?0:i+n),r=r>i?i:r,r<0&&(r+=i),i=n>r?0:r-n>>>0,n>>>=0;for(var o=Array(i);++s<i;)o[s]=t[s+n];return o}return ad=e,ad}var sd,a6;function _N(){if(a6)return sd;a6=1;var e=TN();function t(n,r,s){var i=n.length;return s=s===void 0?i:s,!r&&s>=i?n:e(n,r,s)}return sd=t,sd}var id,s6;function EN(){if(s6)return id;s6=1;function e(t,n,r,s){for(var i=t.length,o=r+(s?1:-1);s?o--:++o<i;)if(n(t[o],o,t))return o;return-1}return id=e,id}var od,i6;function ON(){if(i6)return od;i6=1;function e(t){return t!==t}return od=e,od}var ld,o6;function AN(){if(o6)return ld;o6=1;function e(t,n,r){for(var s=r-1,i=t.length;++s<i;)if(t[s]===n)return s;return-1}return ld=e,ld}var cd,l6;function vg(){if(l6)return cd;l6=1;var e=EN(),t=ON(),n=AN();function r(s,i,o){return i===i?n(s,i,o):e(s,t,o)}return cd=r,cd}var ud,c6;function LN(){if(c6)return ud;c6=1;var e=vg();function t(n,r){for(var s=n.length;s--&&e(r,n[s],0)>-1;);return s}return ud=t,ud}var dd,u6;function VN(){if(u6)return dd;u6=1;var e=vg();function t(n,r){for(var s=-1,i=n.length;++s<i&&e(r,n[s],0)>-1;);return s}return dd=t,dd}var fd,d6;function DN(){if(d6)return fd;d6=1;function e(t){return t.split("")}return fd=e,fd}var hd,f6;function kN(){if(f6)return hd;f6=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",s=t+n+r,i="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+s+i+"]");function c(d){return l.test(d)}return hd=c,hd}var md,h6;function RN(){if(h6)return md;h6=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",s=t+n+r,i="\\ufe0e\\ufe0f",o="["+e+"]",l="["+s+"]",c="\\ud83c[\\udffb-\\udfff]",d="(?:"+l+"|"+c+")",f="[^"+e+"]",u="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",g=d+"?",v="["+i+"]?",b="(?:"+p+"(?:"+[f,u,h].join("|")+")"+v+g+")*",y=v+g+b,N="(?:"+[f+l+"?",l,u,h,o].join("|")+")",w=RegExp(c+"(?="+c+")|"+N+y,"g");function C(S){return S.match(w)||[]}return md=C,md}var pd,m6;function IN(){if(m6)return pd;m6=1;var e=DN(),t=kN(),n=RN();function r(s){return t(s)?n(s):e(s)}return pd=r,pd}var gd,p6;function yg(){if(p6)return gd;p6=1;var e=gg();function t(n){return n==null?"":e(n)}return gd=t,gd}var vd,g6;function PN(){if(g6)return vd;g6=1;var e=gg(),t=Mm(),n=_N(),r=LN(),s=VN(),i=IN(),o=yg();function l(c,d,f){if(c=o(c),c&&(f||d===void 0))return t(c);if(!c||!(d=e(d)))return c;var u=i(c),h=i(d),p=s(u,h),g=r(u,h)+1;return n(u,p,g).join("")}return vd=l,vd}var MN=PN();const $N=lt(MN);/*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:bg,setPrototypeOf:v6,isFrozen:FN,getPrototypeOf:HN,getOwnPropertyDescriptor:BN}=Object;let{freeze:Nt,seal:Kt,create:wg}=Object,{apply:Df,construct:kf}=typeof Reflect<"u"&&Reflect;Nt||(Nt=function(t){return t});Kt||(Kt=function(t){return t});Df||(Df=function(t,n,r){return t.apply(n,r)});kf||(kf=function(t,n){return new t(...n)});const hi=xt(Array.prototype.forEach),zN=xt(Array.prototype.lastIndexOf),y6=xt(Array.prototype.pop),Pa=xt(Array.prototype.push),jN=xt(Array.prototype.splice),Vi=xt(String.prototype.toLowerCase),yd=xt(String.prototype.toString),b6=xt(String.prototype.match),Ma=xt(String.prototype.replace),UN=xt(String.prototype.indexOf),WN=xt(String.prototype.trim),en=xt(Object.prototype.hasOwnProperty),gt=xt(RegExp.prototype.test),$a=qN(TypeError);function xt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return Df(e,t,r)}}function qN(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return kf(e,n)}}function $e(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Vi;v6&&v6(e,null);let r=t.length;for(;r--;){let s=t[r];if(typeof s=="string"){const i=n(s);i!==s&&(FN(t)||(t[r]=i),s=i)}e[s]=!0}return e}function GN(e){for(let t=0;t<e.length;t++)en(e,t)||(e[t]=null);return e}function $n(e){const t=wg(null);for(const[n,r]of bg(e))en(e,n)&&(Array.isArray(r)?t[n]=GN(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=$n(r):t[n]=r);return t}function Fa(e,t){for(;e!==null;){const r=BN(e,t);if(r){if(r.get)return xt(r.get);if(typeof r.value=="function")return xt(r.value)}e=HN(e)}function n(){return null}return n}const w6=Nt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),bd=Nt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),wd=Nt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),KN=Nt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Cd=Nt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),YN=Nt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),C6=Nt(["#text"]),N6=Nt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Nd=Nt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),x6=Nt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),mi=Nt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),XN=Kt(/\{\{[\w\W]*|[\w\W]*\}\}/gm),JN=Kt(/<%[\w\W]*|[\w\W]*%>/gm),ZN=Kt(/\$\{[\w\W]*/gm),QN=Kt(/^data-[\-\w.\u00B7-\uFFFF]+$/),ex=Kt(/^aria-[\-\w]+$/),Cg=Kt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),tx=Kt(/^(?:\w+script|data):/i),nx=Kt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ng=Kt(/^html$/i),rx=Kt(/^[a-z][.\w]*(-[.\w]+)+$/i);var S6=Object.freeze({__proto__:null,ARIA_ATTR:ex,ATTR_WHITESPACE:nx,CUSTOM_ELEMENT:rx,DATA_ATTR:QN,DOCTYPE_NAME:Ng,ERB_EXPR:JN,IS_ALLOWED_URI:Cg,IS_SCRIPT_OR_DATA:tx,MUSTACHE_EXPR:XN,TMPLIT_EXPR:ZN});const Ha={element:1,text:3,progressingInstruction:7,comment:8,document:9},ax=function(){return typeof window>"u"?null:window},sx=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const s="data-tt-policy-suffix";n&&n.hasAttribute(s)&&(r=n.getAttribute(s));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}},T6=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function xg(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ax();const t=Oe=>xg(Oe);if(t.version="3.2.6",t.removed=[],!e||!e.document||e.document.nodeType!==Ha.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const r=n,s=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:o,Node:l,Element:c,NodeFilter:d,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:h,trustedTypes:p}=e,g=c.prototype,v=Fa(g,"cloneNode"),b=Fa(g,"remove"),y=Fa(g,"nextSibling"),N=Fa(g,"childNodes"),w=Fa(g,"parentNode");if(typeof o=="function"){const Oe=n.createElement("template");Oe.content&&Oe.content.ownerDocument&&(n=Oe.content.ownerDocument)}let C,S="";const{implementation:x,createNodeIterator:E,createDocumentFragment:T,getElementsByTagName:O}=n,{importNode:V}=r;let _=T6();t.isSupported=typeof bg=="function"&&typeof w=="function"&&x&&x.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:L,ERB_EXPR:I,TMPLIT_EXPR:R,DATA_ATTR:M,ARIA_ATTR:j,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:A,CUSTOM_ELEMENT:P}=S6;let{IS_ALLOWED_URI:B}=S6,z=null;const D=$e({},[...w6,...bd,...wd,...Cd,...C6]);let k=null;const G=$e({},[...N6,...Nd,...x6,...mi]);let U=Object.seal(wg(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),te=null,$=null,Q=!0,ne=!0,le=!1,ae=!0,X=!1,J=!0,Y=!1,oe=!1,pe=!1,Z=!1,ce=!1,ie=!1,F=!0,K=!1;const W="user-content-";let q=!0,se=!1,fe={},ee=null;const de=$e({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ue=null;const ge=$e({},["audio","video","img","source","image","track"]);let Se=null;const Le=$e({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",ke="http://www.w3.org/2000/svg",Me="http://www.w3.org/1999/xhtml";let at=Me,Ue=!1,ft=null;const We=$e({},[Ve,ke,Me],yd);let Pe=$e({},["mi","mo","mn","ms","mtext"]),Fe=$e({},["annotation-xml"]);const Xn=$e({},["title","style","font","a","script"]);let dn=null;const Ur=["application/xhtml+xml","text/html"],yr="text/html";let Je=null,fn=null;const wl=n.createElement("form"),Ks=function(re){return re instanceof RegExp||re instanceof Function},La=function(){let re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(fn&&fn===re)){if((!re||typeof re!="object")&&(re={}),re=$n(re),dn=Ur.indexOf(re.PARSER_MEDIA_TYPE)===-1?yr:re.PARSER_MEDIA_TYPE,Je=dn==="application/xhtml+xml"?yd:Vi,z=en(re,"ALLOWED_TAGS")?$e({},re.ALLOWED_TAGS,Je):D,k=en(re,"ALLOWED_ATTR")?$e({},re.ALLOWED_ATTR,Je):G,ft=en(re,"ALLOWED_NAMESPACES")?$e({},re.ALLOWED_NAMESPACES,yd):We,Se=en(re,"ADD_URI_SAFE_ATTR")?$e($n(Le),re.ADD_URI_SAFE_ATTR,Je):Le,ue=en(re,"ADD_DATA_URI_TAGS")?$e($n(ge),re.ADD_DATA_URI_TAGS,Je):ge,ee=en(re,"FORBID_CONTENTS")?$e({},re.FORBID_CONTENTS,Je):de,te=en(re,"FORBID_TAGS")?$e({},re.FORBID_TAGS,Je):$n({}),$=en(re,"FORBID_ATTR")?$e({},re.FORBID_ATTR,Je):$n({}),fe=en(re,"USE_PROFILES")?re.USE_PROFILES:!1,Q=re.ALLOW_ARIA_ATTR!==!1,ne=re.ALLOW_DATA_ATTR!==!1,le=re.ALLOW_UNKNOWN_PROTOCOLS||!1,ae=re.ALLOW_SELF_CLOSE_IN_ATTR!==!1,X=re.SAFE_FOR_TEMPLATES||!1,J=re.SAFE_FOR_XML!==!1,Y=re.WHOLE_DOCUMENT||!1,Z=re.RETURN_DOM||!1,ce=re.RETURN_DOM_FRAGMENT||!1,ie=re.RETURN_TRUSTED_TYPE||!1,pe=re.FORCE_BODY||!1,F=re.SANITIZE_DOM!==!1,K=re.SANITIZE_NAMED_PROPS||!1,q=re.KEEP_CONTENT!==!1,se=re.IN_PLACE||!1,B=re.ALLOWED_URI_REGEXP||Cg,at=re.NAMESPACE||Me,Pe=re.MATHML_TEXT_INTEGRATION_POINTS||Pe,Fe=re.HTML_INTEGRATION_POINTS||Fe,U=re.CUSTOM_ELEMENT_HANDLING||{},re.CUSTOM_ELEMENT_HANDLING&&Ks(re.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=re.CUSTOM_ELEMENT_HANDLING.tagNameCheck),re.CUSTOM_ELEMENT_HANDLING&&Ks(re.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=re.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),re.CUSTOM_ELEMENT_HANDLING&&typeof re.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(U.allowCustomizedBuiltInElements=re.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&(ne=!1),ce&&(Z=!0),fe&&(z=$e({},C6),k=[],fe.html===!0&&($e(z,w6),$e(k,N6)),fe.svg===!0&&($e(z,bd),$e(k,Nd),$e(k,mi)),fe.svgFilters===!0&&($e(z,wd),$e(k,Nd),$e(k,mi)),fe.mathMl===!0&&($e(z,Cd),$e(k,x6),$e(k,mi))),re.ADD_TAGS&&(z===D&&(z=$n(z)),$e(z,re.ADD_TAGS,Je)),re.ADD_ATTR&&(k===G&&(k=$n(k)),$e(k,re.ADD_ATTR,Je)),re.ADD_URI_SAFE_ATTR&&$e(Se,re.ADD_URI_SAFE_ATTR,Je),re.FORBID_CONTENTS&&(ee===de&&(ee=$n(ee)),$e(ee,re.FORBID_CONTENTS,Je)),q&&(z["#text"]=!0),Y&&$e(z,["html","head","body"]),z.table&&($e(z,["tbody"]),delete te.tbody),re.TRUSTED_TYPES_POLICY){if(typeof re.TRUSTED_TYPES_POLICY.createHTML!="function")throw $a('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof re.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw $a('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');C=re.TRUSTED_TYPES_POLICY,S=C.createHTML("")}else C===void 0&&(C=sx(p,s)),C!==null&&typeof S=="string"&&(S=C.createHTML(""));Nt&&Nt(re),fn=re}},Ys=$e({},[...bd,...wd,...KN]),Xs=$e({},[...Cd,...YN]),br=function(re){let we=w(re);(!we||!we.tagName)&&(we={namespaceURI:at,tagName:"template"});const Te=Vi(re.tagName),ze=Vi(we.tagName);return ft[re.namespaceURI]?re.namespaceURI===ke?we.namespaceURI===Me?Te==="svg":we.namespaceURI===Ve?Te==="svg"&&(ze==="annotation-xml"||Pe[ze]):!!Ys[Te]:re.namespaceURI===Ve?we.namespaceURI===Me?Te==="math":we.namespaceURI===ke?Te==="math"&&Fe[ze]:!!Xs[Te]:re.namespaceURI===Me?we.namespaceURI===ke&&!Fe[ze]||we.namespaceURI===Ve&&!Pe[ze]?!1:!Xs[Te]&&(Xn[Te]||!Ys[Te]):!!(dn==="application/xhtml+xml"&&ft[re.namespaceURI]):!1},kt=function(re){Pa(t.removed,{element:re});try{w(re).removeChild(re)}catch{b(re)}},hn=function(re,we){try{Pa(t.removed,{attribute:we.getAttributeNode(re),from:we})}catch{Pa(t.removed,{attribute:null,from:we})}if(we.removeAttribute(re),re==="is")if(Z||ce)try{kt(we)}catch{}else try{we.setAttribute(re,"")}catch{}},Va=function(re){let we=null,Te=null;if(pe)re="<remove></remove>"+re;else{const He=b6(re,/^[\r\n\t ]+/);Te=He&&He[0]}dn==="application/xhtml+xml"&&at===Me&&(re='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+re+"</body></html>");const ze=C?C.createHTML(re):re;if(at===Me)try{we=new h().parseFromString(ze,dn)}catch{}if(!we||!we.documentElement){we=x.createDocument(at,"template",null);try{we.documentElement.innerHTML=Ue?S:ze}catch{}}const tt=we.body||we.documentElement;return re&&Te&&tt.insertBefore(n.createTextNode(Te),tt.childNodes[0]||null),at===Me?O.call(we,Y?"html":"body")[0]:Y?we.documentElement:tt},mn=function(re){return E.call(re.ownerDocument||re,re,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Wr=function(re){return re instanceof u&&(typeof re.nodeName!="string"||typeof re.textContent!="string"||typeof re.removeChild!="function"||!(re.attributes instanceof f)||typeof re.removeAttribute!="function"||typeof re.setAttribute!="function"||typeof re.namespaceURI!="string"||typeof re.insertBefore!="function"||typeof re.hasChildNodes!="function")},Da=function(re){return typeof l=="function"&&re instanceof l};function Yt(Oe,re,we){hi(Oe,Te=>{Te.call(t,re,we,fn)})}const wr=function(re){let we=null;if(Yt(_.beforeSanitizeElements,re,null),Wr(re))return kt(re),!0;const Te=Je(re.nodeName);if(Yt(_.uponSanitizeElement,re,{tagName:Te,allowedTags:z}),J&&re.hasChildNodes()&&!Da(re.firstElementChild)&>(/<[/\w!]/g,re.innerHTML)&>(/<[/\w!]/g,re.textContent)||re.nodeType===Ha.progressingInstruction||J&&re.nodeType===Ha.comment&>(/<[/\w]/g,re.data))return kt(re),!0;if(!z[Te]||te[Te]){if(!te[Te]&&ka(Te)&&(U.tagNameCheck instanceof RegExp&>(U.tagNameCheck,Te)||U.tagNameCheck instanceof Function&&U.tagNameCheck(Te)))return!1;if(q&&!ee[Te]){const ze=w(re)||re.parentNode,tt=N(re)||re.childNodes;if(tt&&ze){const He=tt.length;for(let ht=He-1;ht>=0;--ht){const Xt=v(tt[ht],!0);Xt.__removalCount=(re.__removalCount||0)+1,ze.insertBefore(Xt,y(re))}}}return kt(re),!0}return re instanceof c&&!br(re)||(Te==="noscript"||Te==="noembed"||Te==="noframes")&>(/<\/no(script|embed|frames)/i,re.innerHTML)?(kt(re),!0):(X&&re.nodeType===Ha.text&&(we=re.textContent,hi([L,I,R],ze=>{we=Ma(we,ze," ")}),re.textContent!==we&&(Pa(t.removed,{element:re.cloneNode()}),re.textContent=we)),Yt(_.afterSanitizeElements,re,null),!1)},Js=function(re,we,Te){if(F&&(we==="id"||we==="name")&&(Te in n||Te in wl))return!1;if(!(ne&&!$[we]&>(M,we))){if(!(Q&>(j,we))){if(!k[we]||$[we]){if(!(ka(re)&&(U.tagNameCheck instanceof RegExp&>(U.tagNameCheck,re)||U.tagNameCheck instanceof Function&&U.tagNameCheck(re))&&(U.attributeNameCheck instanceof RegExp&>(U.attributeNameCheck,we)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(we))||we==="is"&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&>(U.tagNameCheck,Te)||U.tagNameCheck instanceof Function&&U.tagNameCheck(Te))))return!1}else if(!Se[we]){if(!gt(B,Ma(Te,A,""))){if(!((we==="src"||we==="xlink:href"||we==="href")&&re!=="script"&&UN(Te,"data:")===0&&ue[re])){if(!(le&&!gt(H,Ma(Te,A,"")))){if(Te)return!1}}}}}}return!0},ka=function(re){return re!=="annotation-xml"&&b6(re,P)},Zs=function(re){Yt(_.beforeSanitizeAttributes,re,null);const{attributes:we}=re;if(!we||Wr(re))return;const Te={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:k,forceKeepAttr:void 0};let ze=we.length;for(;ze--;){const tt=we[ze],{name:He,namespaceURI:ht,value:Xt}=tt,Cr=Je(He),Jn=Xt;let st=He==="value"?Jn:WN(Jn);if(Te.attrName=Cr,Te.attrValue=st,Te.keepAttr=!0,Te.forceKeepAttr=void 0,Yt(_.uponSanitizeAttribute,re,Te),st=Te.attrValue,K&&(Cr==="id"||Cr==="name")&&(hn(He,re),st=W+st),J&>(/((--!?|])>)|<\/(style|title)/i,st)){hn(He,re);continue}if(Te.forceKeepAttr)continue;if(!Te.keepAttr){hn(He,re);continue}if(!ae&>(/\/>/i,st)){hn(He,re);continue}X&&hi([L,I,R],ei=>{st=Ma(st,ei," ")});const kn=Je(re.nodeName);if(!Js(kn,Cr,st)){hn(He,re);continue}if(C&&typeof p=="object"&&typeof p.getAttributeType=="function"&&!ht)switch(p.getAttributeType(kn,Cr)){case"TrustedHTML":{st=C.createHTML(st);break}case"TrustedScriptURL":{st=C.createScriptURL(st);break}}if(st!==Jn)try{ht?re.setAttributeNS(ht,He,st):re.setAttribute(He,st),Wr(re)?kt(re):y6(t.removed)}catch{hn(He,re)}}Yt(_.afterSanitizeAttributes,re,null)},Qs=function Oe(re){let we=null;const Te=mn(re);for(Yt(_.beforeSanitizeShadowDOM,re,null);we=Te.nextNode();)Yt(_.uponSanitizeShadowNode,we,null),wr(we),Zs(we),we.content instanceof i&&Oe(we.content);Yt(_.afterSanitizeShadowDOM,re,null)};return t.sanitize=function(Oe){let re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},we=null,Te=null,ze=null,tt=null;if(Ue=!Oe,Ue&&(Oe="<!-->"),typeof Oe!="string"&&!Da(Oe))if(typeof Oe.toString=="function"){if(Oe=Oe.toString(),typeof Oe!="string")throw $a("dirty is not a string, aborting")}else throw $a("toString is not a function");if(!t.isSupported)return Oe;if(oe||La(re),t.removed=[],typeof Oe=="string"&&(se=!1),se){if(Oe.nodeName){const Xt=Je(Oe.nodeName);if(!z[Xt]||te[Xt])throw $a("root node is forbidden and cannot be sanitized in-place")}}else if(Oe instanceof l)we=Va("<!---->"),Te=we.ownerDocument.importNode(Oe,!0),Te.nodeType===Ha.element&&Te.nodeName==="BODY"||Te.nodeName==="HTML"?we=Te:we.appendChild(Te);else{if(!Z&&!X&&!Y&&Oe.indexOf("<")===-1)return C&&ie?C.createHTML(Oe):Oe;if(we=Va(Oe),!we)return Z?null:ie?S:""}we&&pe&&kt(we.firstChild);const He=mn(se?Oe:we);for(;ze=He.nextNode();)wr(ze),Zs(ze),ze.content instanceof i&&Qs(ze.content);if(se)return Oe;if(Z){if(ce)for(tt=T.call(we.ownerDocument);we.firstChild;)tt.appendChild(we.firstChild);else tt=we;return(k.shadowroot||k.shadowrootmode)&&(tt=V.call(r,tt,!0)),tt}let ht=Y?we.outerHTML:we.innerHTML;return Y&&z["!doctype"]&&we.ownerDocument&&we.ownerDocument.doctype&&we.ownerDocument.doctype.name&>(Ng,we.ownerDocument.doctype.name)&&(ht="<!DOCTYPE "+we.ownerDocument.doctype.name+`>
|
44
44
|
`+ht),X&&hi([L,I,R],Xt=>{ht=Ma(ht,Xt," ")}),C&&ie?C.createHTML(ht):ht},t.setConfig=function(){let Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};La(Oe),oe=!0},t.clearConfig=function(){fn=null,oe=!1},t.isValidAttribute=function(Oe,re,we){fn||La({});const Te=Je(Oe),ze=Je(re);return Js(Te,ze,we)},t.addHook=function(Oe,re){typeof re=="function"&&Pa(_[Oe],re)},t.removeHook=function(Oe,re){if(re!==void 0){const we=zN(_[Oe],re);return we===-1?void 0:jN(_[Oe],we,1)[0]}return y6(_[Oe])},t.removeHooks=function(Oe){_[Oe]=[]},t.removeAllHooks=function(){_=T6()},t}var Ki=xg();const _6=a.defineComponent({name:"ListTagRender",props:{node:m.object,searchKey:m.oneOfType([m.string,m.arrayOf(m.string)]),displayKey:m.string,searchKeyword:m.string,tpl:{type:Function},disabled:m.bool.def(!1)},render(){const{resolveClassName:e}=he(),t=r=>{if(this.searchKeyword&&!this.disabled){const s=new RegExp(`(${this.searchKeyword})`,"i");return Ki.sanitize(r.replace(s,'<strong class="highlight-text">$1</strong>'))}return Ki.sanitize(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)},null)])}}),ix=()=>({modelValue:m.arrayOf(m.string).def([]),placeholder:m.string.def(""),list:m.arrayOf(m.object).def([]),disabled:m.bool.def(!1),tooltipKey:m.string.def(""),saveKey:m.string.def("id"),displayKey:m.string.def("name"),hasDeleteIcon:m.bool.def(!1),clearable:m.bool.def(!0),trigger:xe("treeTriggerType",{}).def("search"),searchKey:m.oneOfType([m.string,m.arrayOf(m.string)]).def("name"),useGroup:m.bool.def(!1),allowCreate:m.bool.def(!1),clearTextSpace:m.bool.def(!0),maxData:m.number.def(-1),maxResult:m.number.def(10),contentMaxHeight:m.number.def(300),contentWidth:m.number.def(190),separator:m.string.def(""),allowNextFocus:m.bool.def(!0),allowAutoMatch:m.bool.def(!1),showClearOnlyHover:m.bool.def(!1),isAsyncList:m.bool.def(!1),leftSpace:m.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:()=>({})}});var xd,E6;function ox(){if(E6)return xd;E6=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,s){return r!=null&&t.call(r,s)}return xd=n,xd}var Sd,O6;function lx(){if(O6)return Sd;O6=1;var e=un(),t=fo(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function s(i,o){if(e(i))return!1;var l=typeof i;return l=="number"||l=="symbol"||l=="boolean"||i==null||t(i)?!0:r.test(i)||!n.test(i)||o!=null&&i in Object(o)}return Sd=s,Sd}var Td,A6;function cx(){if(A6)return Td;A6=1;var e=h0(),t="Expected a function";function n(r,s){if(typeof r!="function"||s!=null&&typeof s!="function")throw new TypeError(t);var i=function(){var o=arguments,l=s?s.apply(this,o):o[0],c=i.cache;if(c.has(l))return c.get(l);var d=r.apply(this,o);return i.cache=c.set(l,d)||c,d};return i.cache=new(n.Cache||e),i}return n.Cache=e,Td=n,Td}var _d,L6;function ux(){if(L6)return _d;L6=1;var e=cx(),t=500;function n(r){var s=e(r,function(o){return i.size===t&&i.clear(),o}),i=s.cache;return s}return _d=n,_d}var Ed,V6;function dx(){if(V6)return Ed;V6=1;var e=ux(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(s){var i=[];return s.charCodeAt(0)===46&&i.push(""),s.replace(t,function(o,l,c,d){i.push(c?d.replace(n,"$1"):l||o)}),i});return Ed=r,Ed}var Od,D6;function Sg(){if(D6)return Od;D6=1;var e=un(),t=lx(),n=dx(),r=yg();function s(i,o){return e(i)?i:t(i,o)?[i]:n(r(i))}return Od=s,Od}var Ad,k6;function Tg(){if(k6)return Ad;k6=1;var e=fo();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return Ad=t,Ad}var Ld,R6;function fx(){if(R6)return Ld;R6=1;var e=Sg(),t=So(),n=un(),r=b0(),s=y0(),i=Tg();function o(l,c,d){c=e(c,l);for(var f=-1,u=c.length,h=!1;++f<u;){var p=i(c[f]);if(!(h=l!=null&&d(l,p)))break;l=l[p]}return h||++f!=u?h:(u=l==null?0:l.length,!!u&&s(u)&&r(p,u)&&(n(l)||t(l)))}return Ld=o,Ld}var Vd,I6;function hx(){if(I6)return Vd;I6=1;var e=ox(),t=fx();function n(r,s){return r!=null&&t(r,s,e)}return Vd=n,Vd}var mx=hx();const px=lt(mx),gx=a.defineComponent({name:"TagRender",directives:{bkTooltips:Dn},props:{node:m.object,displayKey:m.string,tooltipKey:m.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:!px(e.node,e.tooltipKey)||!n.value,...e.tagOverflowTips}));return a.onMounted(()=>{n.value=h8(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]])}}),vx=a.defineComponent({name:"TagInput",directives:{bkTooltips:Dn},props:ix(),emits:["update:modelValue","change","select","focus","blur","remove","removeAll","input"],setup(e,{emit:t}){const n=on(),r=Be("tagInput"),s=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),i=a.reactive({isShow:!1,width:190,offset:{mainAxis:4,crossAxis:0},...e.popoverProps}),{resolveClassName:o}=he(),{maxResult:l}=a.toRefs(e),{pageState:c,initPage:d,pageChange:f}=NN(l),u=a.ref(""),h=a.ref(null),p=a.ref(null),g=a.ref(null),v=a.ref(null),b=a.ref(null),y=a.ref(),N=a.ref(null),w=a.computed(()=>!e.disabled&&e.hasDeleteIcon),C=a.computed(()=>e.maxData===1),S=a.computed(()=>O.selectedTagList.length===0&&u.value===""&&!s.isEdit),x=a.computed(()=>e.placeholder||r.value.placeholder),E=a.computed(()=>e.clearable&&!e.disabled&&O.selectedTagList.length!==0&&(e.showClearOnlyHover?s.isHover:!0)),T=a.computed(()=>({[`${o("tag-input-trigger")}`]:!0,active:s.isEdit,disabled:e.disabled})),O=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),V=a.computed(()=>O.selectedTagList.map(ee=>ee[e.saveKey])),{flatList:_,saveKeyMap:L}=xN(e),I=a.computed(()=>{if(e.useGroup){const ee={};return c.curPageList.forEach((de,ue)=>{var Le,Ve,ke;const ge=(Le=de.group)==null?void 0:Le.groupId,Se=(Ve=de.group)==null?void 0:Ve.groupName;de.__index__=ue,ge&&!ee[ge]&&(ee[ge]={id:ge,name:Se,children:[]}),(ke=ee==null?void 0:ee[ge])==null||ke.children.push(de)}),Object.keys(ee).map(de=>ee[de])}return c.curPageList});a.watch([()=>_.value],()=>{a.nextTick(()=>{A()})},{deep:!0}),a.watch(()=>e.modelValue,ee=>{var de;z(V.value,ee)||(a.nextTick(()=>{A()}),e.withValidate&&((de=n==null?void 0:n.validate)==null||de.call(n,"change")))}),a.watch(u,gr(()=>{const ee=c.curPageList.length!==0,{value:de}=u;de!==""&&ee||de===""&&e.trigger==="focus"&&ee?i.isShow=!0:(e.trigger!=="focus"||!ee)&&(i.isShow=!1)},150)),a.watch(()=>i.isShow,ee=>{R(),ee&&b.value&&(a.nextTick(()=>{b.value.scrollTop=0}),b.value.removeEventListener("scroll",M),b.value.addEventListener("scroll",M))}),a.onMounted(()=>{A()});const R=()=>{var ee;i.offset.crossAxis=C.value?0:(ee=v.value)==null?void 0:ee.offsetLeft},M=()=>{if(c.isPageLoading||b.value.scrollTop===0)return;const{scrollTop:ee,offsetHeight:de,scrollHeight:ue}=b.value;if(ee+de>=ue){const ge=c.curPage+1;ge<=c.totalPage&&(c.isPageLoading=!0,setTimeout(()=>{f(ge)},500))}},j=()=>{var de;return Array.from(((de=g.value)==null?void 0:de.childNodes)||[]).filter(ue=>![Node.TEXT_NODE,Node.COMMENT_NODE].includes(ue.nodeType))},H=ee=>{if(!e.disabled){if(ee!=null&&ee.target){const{className:de}=ee.target;(de.indexOf(`${o("tag-input-trigger")}`)>-1||de.indexOf("tag-list")>-1)&&g.value.appendChild(v.value)}clearTimeout(N.value),C.value&&V.value.length&&(O.tagListCache=[...V.value],O.selectedTagListCache=[...O.selectedTagList],u.value=O.selectedTagListCache[0][e.saveKey],W(O.selectedTagList[0],0),Q()),s.isEdit=!0,setTimeout(()=>{var de;(de=h.value)==null||de.focus(),e.trigger==="focus"&&O.localList.length!==0&&(P(),i.isShow?R():i.isShow=!0)},200)}},A=()=>{const{saveKey:ee,modelValue:de,displayKey:ue,allowCreate:ge,trigger:Se,isAsyncList:Le}=e;if(O.selectedTagList=[],O.localList=_.value,de.length){const Ve={};O.selectedTagList=de.map(ke=>{const Me=L.value[ke];return Ve[ke]=1,!Me&&ge?{[ee]:ke,[ue]:ke}:Me}).filter(ke=>ke),C.value||(O.localList=O.localList.filter(ke=>!Ve[ke[ee]]))}if(Le&&u.value){P(u.value),c.curPageList.length&&(i.isShow=!0);return}Se==="focus"&&P()},P=(ee="")=>{const{searchKey:de,filterCallback:ue}=e,ge=ee.toLowerCase().trim();if(ge===""){d(O.localList);return}let Se=[];typeof ue=="function"?Se=ue(ge,de,O.localList)||[]:Array.isArray(de)?Se=O.localList.filter(Le=>de.some(Ve=>Le[Ve].toLowerCase().indexOf(ge)>-1)):Se=O.localList.filter(Le=>Le[de].toLowerCase().indexOf(ge)>-1),d(Se)},B=(ee,de)=>{const ue={[`${o("selector-actived")}`]:!0,[`${o("selector-selected")}`]:V.value.includes(ee[e.saveKey])};return e.useGroup?ue[`${o("selector-actived")}`]=ee.__index__===s.focusItemIndex:ue[`${o("selector-actived")}`]=de===s.focusItemIndex,ue};function z(ee,de){return ee.length!==de.length?!1:de.every((ue,ge)=>ee[ge]===ue)}const D=()=>{O.tagListCache=[],O.selectedTagListCache=[],O.selectedTagList=[]},k=()=>{u.value="",h.value.style.width=`${Pn}px`},G=()=>{if(C.value)return 0;const de=j().filter(ue=>ue.className!=="").findIndex(({id:ue})=>ue==="tagInputItem");return de>=0?de:0},U=(ee,de,ue=!1)=>{if(!de||!ee)return;let ge=de;ue&&(ge=de.nextElementSibling||null),de.parentNode.insertBefore(ee,ge)},te=ee=>{if(!e6(ee)){h.value.style.width=`${Pn}px`;return}const ue=document.createElement("span");ue.style.visibility="hidden",ue.style.position="absolute",ue.style.whiteSpace="pre",ue.style.font=window.getComputedStyle(h.value).font,ue.textContent=ee,document.body.appendChild(ue);const ge=ue.offsetWidth;document.body.removeChild(ue),h.value.style.width=`${Math.max(ge+10,Pn)}px`},$=()=>{te(u.value)},Q=ee=>{const{maxData:de,trigger:ue,allowCreate:ge}=e;if(de===-1||de>V.value.length){const{value:Se}=ee!=null&&ee.target?ee.target:u;Se?(P(Se),te(Se)):(ue==="focus"&&P(),h.value.style.width=`${Pn}px`)}else le(),u.value="",i.isShow=!1;s.isEdit=!0,s.focusItemIndex=ge?-1:0,t("input",u.value)},ne=()=>{var ee;i.width=C.value?(ee=p.value)==null?void 0:ee.clientWidth:e.contentWidth,t("focus")},le=()=>{N.value=setTimeout(()=>{var de;const ee=u.value;if(k(),s.isEdit=!1,e.allowAutoMatch&&ee){if(C.value){const[ge]=O.tagListCache;ee===ge&&O.selectedTagListCache.length&&K(O.selectedTagListCache[0],"select")}const ue=c.curPageList.find(ge=>Array.isArray(e.searchKey)?e.searchKey.map(Le=>ge[Le]).includes(ee):ge[e.searchKey]===ee);ue?ae(ue,"select"):e.allowCreate&&ae(ee,"custom")}i.isShow=!1,t("blur",ee,V.value),(de=n==null?void 0:n.validate)==null||de.call(n,"blur")},200)},ae=(ee,de,ue)=>{ue==null||ue.stopPropagation(),!(!ee||ee.disabled)&&(C.value&&D(),K(ee,de),J("select"),k(),i.isShow=!1)},X=(ee,de,ue)=>{ue==null||ue.stopPropagation(),W(ee,de),k(),J("remove",ee),h.value.style.width=`${Pn}px`},J=(ee,de)=>{t(ee,de),t("update:modelValue",V.value),t("change",V.value)},Y=ee=>{ee.stopPropagation();const de=O.selectedTagList;O.selectedTagList=[];const ue=de.filter(ge=>L.value[ge[e.saveKey]]);(e.allowCreate&&ue.length!==0||!e.allowCreate)&&!C.value&&O.localList.push(...ue),J("removeAll")},oe=()=>{const ee={height:b.value.clientHeight,yAxis:b.value.getBoundingClientRect().y};a.nextTick(()=>{const de=b.value.querySelector(`.${o("selector-actived")}`);if(!de)return;const ue={height:de.clientHeight,yAxis:de.getBoundingClientRect().y};ue.yAxis<ee.yAxis&&(b.value.scrollTop=b.value.scrollTop-(ee.yAxis-ue.yAxis));const ge=ue.yAxis+ue.height-ee.yAxis;ge>ee.height&&(b.value.scrollTop=b.value.scrollTop+ge-ee.height)})},pe=(ee,de)=>{const ue=j();U(v.value,ue[ee-1]),O.selectedTagList.splice(ee-1,1),H();const ge=de&&L.value[de[e.saveKey]];(e.allowCreate&&ge||!e.allowCreate)&&!C.value&&O.localList.push(de),h.value.style.width=`${Pn}px`,J("remove")},Z=ee=>{if(c.isPageLoading||ee.isComposing)return;let de;const ue=ee.target.value,ge=e6(ue),Se=G(),Le=j();switch(ee.code){case"ArrowUp":if(ee.preventDefault(),!i.isShow)return;s.focusItemIndex=s.focusItemIndex-1,s.focusItemIndex=s.focusItemIndex<0?-1:s.focusItemIndex,s.focusItemIndex===-1&&(s.focusItemIndex=c.curPageList.length-1),oe();break;case"ArrowDown":if(ee.preventDefault(),!i.isShow)return;s.focusItemIndex=s.focusItemIndex+1,s.focusItemIndex=s.focusItemIndex>c.curPageList.length-1?c.curPageList.length:s.focusItemIndex,s.focusItemIndex===c.curPageList.length&&(s.focusItemIndex=0),oe();break;case"ArrowLeft":if(s.isEdit=!0,!ge){if(Se<1)return;U(v.value,Le[Se-1]),H()}break;case"ArrowRight":if(s.isEdit=!0,!ge){if(Se===Le.length-1)return;U(Le[Se+1],v.value),H()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&i.isShow||e.allowCreate&&s.focusItemIndex>=0&&i.isShow?ae(c.curPageList[s.focusItemIndex],"select",ee):e.allowCreate&&u.value.trim()&&ae(u.value,"custom",ee),ee.preventDefault();break;case"Backspace":Se!==0&&!u.value&&(de=O.selectedTagList[Se-1],pe(Se,de));break}},ce=ee=>{const de=[];return ee.split(";").forEach(ge=>{$N(ge)&&de.push({[e.saveKey]:ge,[e.displayKey]:ge})}),de},ie=ee=>{ee.preventDefault();const{maxData:de,saveKey:ue,displayKey:ge,pasteFn:Se,allowCreate:Le}=e,Ve=ee.clipboardData.getData("text");let Me=(Se?Se(Ve):ce(Ve)).map(at=>at[ue]);if(Me.length){const at=j(),Ue=G(),ft=O.localList.map(Pe=>Pe[ue]);if(Me=Me.filter(Pe=>{const Fe=(Pe==null?void 0:Pe.trim())&&!V.value.includes(Pe);return Le?Fe:Fe&&ft.includes(Pe)}),de!==-1){const Pe=O.selectedTagList.length;if(Pe<de){const Fe=de-Pe;Me.length>Fe&&(Me=[...Me.slice(0,Fe)])}else Me=[]}const We=Le?Me.map(Pe=>O.localList.find(Xn=>Xn[ue]===Pe)??{[ue]:Pe,[ge]:Pe}):O.localList.filter(Pe=>Me.includes(Pe[ue]));Me.length&&(O.selectedTagList.splice(Ue,0,...We),U(v.value,at[Ue]),h.value.style.width=`${Pn}px`,O.localList=O.localList.filter(Pe=>!Me.includes(Pe[ue])),J("select"),H())}k()},F=ee=>{e.disabled||(U(v.value,ee.currentTarget,!0),h.value.style.width=`${Pn}px`,i.isShow&&R())},K=(ee,de)=>{if(O.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:ue,saveKey:ge,displayKey:Se,createTagValidator:Le,clearTextSpace:Ve}=e,ke=G();let Me=1,at=!1,Ue;const ft=We=>typeof Le=="function"?Le(We):!0;if(de==="custom")if(ue){let We=ee.split(ue);We=We.filter(Fe=>(Fe==null?void 0:Fe.trim())&&!V.value.includes(Fe)&&ft(Fe));const Pe=We.map(Fe=>L.value[Fe]||{[ge]:Fe,[Se]:Fe});We.length&&(O.selectedTagList.splice(ke,0,...Pe),Me=Pe.length,at=!0)}else{const We=typeof ee=="object";if(Ue=We?ee[ge]:ee.trim(),Ve&&(Ue=Ue.replace(/\s+/g,"")),Ue!==void 0&&!V.value.includes(Ue)&&ft(Ue)){const Pe=L.value[Ue]||(We?ee:{[ge]:Ue,[Se]:Ue});O.selectedTagList.splice(ke,0,Pe),at=!0}}else ee&&(Ue=ee[ge],Ue!==void 0&&!V.value.includes(Ue)&&(O.selectedTagList.splice(ke,0,ee),at=!0));at&&a.nextTick(()=>{for(let We=1;We<=Me;We++){const Fe=j()[ke+We];U(Fe,v.value)}if(h.value.style.width=`${Pn}px`,!C.value){e.allowNextFocus&&H();const We=V.value.reduce((Pe,Fe)=>(Pe[Fe]=1,Pe),{});O.localList=O.localList.filter(Pe=>!We[Pe[ge]])}})},W=(ee,de)=>{O.selectedTagList.splice(de,1);const ue=L.value[ee[e.saveKey]];(e.allowCreate&&ue||!e.allowCreate)&&!C.value&&O.localList.push(ee)},q=a.computed(()=>e.collapseTags?e.collapseTags&&!s.isEdit:e.collapseTags),{overflowTagIndex:se}=pg(p,q,V),fe=a.computed(()=>O.selectedTagList.reduce((ee,de,ue)=>(se.value!==null&&ue>=se.value&&ee.push(de[e.displayKey]),ee),[]));return{popoverProps:i,...a.toRefs(s),...a.toRefs(O),...a.toRefs(c),isShowPlaceholder:S,isShowClear:E,placeholderText:x,curInputValue:u,renderList:I,showTagClose:w,tagInputRef:h,bkTagSelectorRef:p,tagListRef:g,tagInputItemRef:v,inputValueRef:y,selectorListRef:b,triggerClass:T,overflowTagIndex:se,localCollapseTags:q,collapseTooltip:fe,focusInputTrigger:H,activeClass:B,handleInput:Q,handleCompositionEnd:$,handleFocus:ne,handleBlur:le,handleTagSelected:ae,handleTagRemove:X,handleClear:Y,tagFocus:F,handleKeydown:Z,handlePaste:ie,resolveClassName:o}},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(Dt,a.mergeProps({arrow:!1,placement:"bottom-start",referenceCls:this.resolveClassName("tag-input-popover-reference"),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(gx,{displayKey:this.displayKey,node:n,tagOverflowTips:this.tagOverflowTips,tooltipKey:this.tooltipKey||this.displayKey,tpl:this.tagTpl},null),this.showTagClose&&a.createVNode(wt,{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,spellcheck:"false",type:"text",onBlur:this.handleBlur,onCompositionend:this.handleCompositionEnd,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.createVNode("div",{key:"inputValuePlaceholder",ref:"inputValueRef",style:"position: absolute; white-space: nowrap; border-box; visibility: hidden; z-index: 1"},[this.curInputValue])]),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(Vt,{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(_6,{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(_6,{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(ur,{size:Dr.Small,theme:"primary"},null)]):null])])})])}}),_g=Ie(vx),Eg=a.defineComponent({name:"CascaderPanel",props:{width:m.oneOfType([m.number,m.string]).def("auto"),height:m.oneOfType([m.number,m.string]).def(216),store:m.object.def({}),separator:m.string.def(""),suggestions:m.arrayOf(Gm()),isFiltering:m.bool.def(!1),searchKey:m.oneOfType([m.string,m.number]).def(""),modelValue:m.arrayOf(m.oneOfType([l0(),String,Number]))},emits:["update:modelValue"],setup(e,{emit:t}){const n=Be("cascader"),{resolveClassName:r}=he(),{store:s}=a.toRefs(e),i=a.reactive({list:[e.store.getNodes()]}),o=a.ref([]),l=a.ref([]),c=T=>typeof T=="number"?`${T}px`:T,d=c(e.height),f=c(e.width),u=T=>{(!T||T.length===0)&&(i.list=i.list.slice(0,1),o.value=[]),h(T),l.value=T},h=T=>{if(l.value.length===0||!s.value.config.multiple){let V=[];if(s.value.config.multiple)for(const _ of T)_.length>V.length&&(V=_);else V=T;V.forEach(_=>{const L=s.value.getNodeById(_);if(L){const I=M=>{var H;if(!M||M!=null&&M.isDisabled)return;const j=M.level;i.list=i.list.slice(0,j),o.value=o.value.slice(0,j-1),(H=M.children)!=null&&H.length&&i.list.length===j&&(i.list.push(M.children),o.value.push(M))},R=M=>{M.parent&&R(M.parent),I(M)};R(L)}})}},p=T=>{if(!T.isDisabled){if(T.config.multiple){const O=s.value.config.checkAnyLevel?s.value.getCheckedNodes():s.value.getCheckedLeafNodes();l.value=O.map(V=>V.path)}else l.value=T.path;t("update:modelValue",l.value)}},g=T=>{var O;if(!(!T||T!=null&&T.isDisabled)){if(i.list=i.list.slice(0,T.level),o.value=o.value.slice(0,T.level-1),(O=T.children)!=null&&O.length){i.list.push(T.children),o.value.push(T);return}if(s.value.config.isRemote&&!T.isLeaf){T.loading=!0;const V=_=>{s.value.appendNodes(_,T||null),i.list.push(T.children),o.value.push(T),T.loading=!1};s.value.config.remoteMethod(T,V)}}},v=T=>{const{trigger:O,checkAnyLevel:V,multiple:_}=T.config;return{onClick:I=>{(!T.isLeaf||_)&&I.stopPropagation(),O==="click"&&g(T),V&&!_&&p(T),T.isLeaf&&!_&&p(T)},onMouseenter:()=>{O==="hover"&&g(T)}}},b=T=>{const{multiple:O}=T.config;return{onClick:_=>{if(O){_.stopPropagation(),x(T,!T.checked);return}g(T),T.isLeaf&&!O&&p(T)}}},y=()=>{i.list.forEach((T,O)=>{const V=document.querySelector(`.${r("cascader-panel")}:nth-child(${O+1}) .${r("cascader-node.is-selected")}, .${r("cascader-node.is-checked")}`);V&&a.nextTick(()=>{V.scrollIntoView()})})},N=n.value.noData,{emptyText:w}=n.value,C=T=>(o.value[T.level-1]||{}).id===T.id,S=(T,O)=>{const{multiple:V}=T.config;return V?O.some(_=>ea(_,T.path)):ea(O,T.path)},x=(T,O)=>{T.setNodeCheck(O||!1),p(T)},E=T=>T.loading?a.createVNode(Ea,{class:r("icon-spinner")},null):a.createVNode($t,{class:r("icon-angle-right")},null);return a.watch(()=>e.modelValue,T=>{u(T)},{immediate:!0}),a.watch(()=>e.store,T=>{i.list=[T.getNodes()]}),{menus:i,activePath:o,nodeExpandHandler:g,isNodeInPath:C,nodeEvent:v,isCheckedNode:S,checkValue:l,checkNode:x,iconRender:E,panelWidth:f,panelHeight:d,searchPanelEvents:b,expandByNodeList:h,noDataText:N,emptyText:w,resolveClassName:r,scrollToSelected:y}},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,r)=>{var s,i;return a.createVNode("ul",{style:{height:this.panelHeight,width:this.panelWidth},class:[this.resolveClassName("cascader-panel"),this.resolveClassName("scroll-y")]},[(i=(s=this.$slots).panel)==null?void 0:i.call(s,{nodes:n,level:r,activePath:this.activePath}),n.length?n.map(o=>{var l,c;return a.createVNode("li",a.mergeProps({class:[this.resolveClassName("cascader-node"),{"is-selected":this.isNodeInPath(o)},{"is-disabled":o.isDisabled},{"is-checked":!o.config.multiple&&this.isCheckedNode(o,this.checkValue)}]},Object.assign(this.nodeEvent(o),o.config.multiple?{}:{})),[o.config.multiple&&a.createVNode(Ct,{style:"margin-right: 5px",modelValue:o.checked,"onUpdate:modelValue":d=>o.checked=d,disabled:o.isDisabled,indeterminate:o.isIndeterminate,onChange:d=>this.checkNode(o,!!d)},null),(c=(l=this.$slots).default)==null?void 0:c.call(l,{node:o,data:o.data}),o.isLeaf?"":this.iconRender(o)])}):a.createVNode("div",{class:this.resolveClassName("cascader-panel-empty-wrapper")},[this.noDataText])])})])}});function Og(e){return e.data.disabled?!0:e.level!==1?Og(e.parent):e.data.disabled}let P6=class Ag{constructor(t,n,r){ye(this,"data");ye(this,"config");ye(this,"parent");ye(this,"level");ye(this,"id");ye(this,"name");ye(this,"loading");ye(this,"loaded");ye(this,"checked");ye(this,"isIndeterminate");ye(this,"children");ye(this,"leaf");ye(this,"pathNodes");ye(this,"path");ye(this,"pathNames");ye(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(i=>new Ag(i,this.config,this)),this.pathNodes=this.calculateNodesPath(),this.path=this.pathNodes.map(i=>i.id),this.pathNames=this.pathNodes.map(i=>i.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 Og(this)}broadcast(t,n){const r=`onParent${fs(t)}`;this.children.forEach(s=>{var i;s&&(s.broadcast(t,n),(i=s[r])==null||i.call(s,n))})}emit(t){var s;const{parent:n}=this,r=`onChild${fs(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,i)=>{const o=i.isIndeterminate?.5:0,l=i.checked?1:o;return s+l},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 Lg=(e,t)=>e.reduce((n,r)=>(r.isLeaf?n.push(r):(!t&&n.push(r),n=n.concat(Lg(r.children,t))),n),[]);class M6{constructor(t){ye(this,"data");ye(this,"config");ye(this,"nodes");const{list:n}=t;this.data=n,this.config=t,this.nodes=this.data.map(r=>new P6(r,this.config))}getNodes(){return this.nodes}clearChecked(){this.getFlattedNodes().forEach(t=>{t.setNodeCheck(!1),t.isIndeterminate=!1})}removeTag(t){this.getFlattedNodes().find(n=>ea(t,n.path)?(n.setNodeCheck(!1),!0):!1)}getFlattedNodes(t=!1){return Lg(this.nodes,t)}setNodesCheck(t){this.getFlattedNodes().forEach(n=>{n.setNodeCheck(!1);const r=t.find(s=>ea(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=>ea(r.path,t))[0]??null}getNodeById(t){return this.getFlattedNodes().find(n=>n.id===t)}appendNode(t,n){const r=new P6(t,this.config,n);(n?n.children:this.nodes).push(r)}appendNodes(t,n){t.forEach(r=>this.appendNode(r,n))}}const yx=a.defineComponent({name:"Cascader",directives:{bkTooltips:Dn},props:{modelValue:m.arrayOf(m.oneOfType([l0(),String,Number])),list:m.array.def([]),placeholder:m.string.def(""),behavior:m.string.def("normal"),filterable:m.bool.def(!1),multiple:m.bool.def(!1),disabled:m.bool.def(!1),clearable:m.bool.def(!0),trigger:m.string.def("click"),checkAnyLevel:m.bool.def(!1),isRemote:m.bool.def(!1),remoteMethod:m.func,showCompleteName:m.bool.def(!0),idKey:m.string.def("id"),nameKey:m.string.def("name"),childrenKey:m.string.def("children"),separator:m.string.def("/"),limitOneLine:m.bool.def(!1),popoverOptions:Object,extCls:m.string.def(""),filterMethod:m.func,scrollHeight:m.oneOfType([m.number,m.string]).def(216),scrollWidth:m.oneOfType([m.number,m.string]).def("auto"),customTextFillback:m.func,customTagsFillback:m.func,changeEmitsNodes:m.bool.def(!1),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=Be("cascader"),{separator:s,multiple:i}=e,{isHover:o,setHover:l,cancelHover:c}=Zp(),d=a.ref(new M6(e)),f=a.ref(!1),u=a.ref(""),h=a.ref([]),{modelValue:p}=a.toRefs(e),g=a.ref(),v=a.ref(""),b=a.ref([]),y=a.ref(!1),N=a.ref(!1),w=a.ref(!1),C=a.ref(!1),S=a.computed({get:()=>p.value,set:$=>{t("update:modelValue",$)}}),x=a.ref(null),E=a.ref(null),T=a.ref(null),O=a.computed(()=>{const $=e.placeholder?e.placeholder:r.value.pleaseSelect;return p.value.length===0?$:""}),V=a.computed(()=>e.customTextFillback?e.customTextFillback(e.modelValue,d.value.getFlattedNodes()):u.value),_=$=>e.showCompleteName?$.pathNames.join(s):$.pathNames[$.pathNames.length-1],L=()=>{v.value=u.value},I=()=>{if(!e.multiple){v.value=u.value;return}v.value=""},R=$=>{var ne;if(i){d.value.setNodesCheck($),h.value=d.value.getCheckedNodes().filter(le=>d.value.config.checkAnyLevel||le.isLeaf).map(le=>({text:_(le),key:le.id})),u.value=h.value.map(le=>le.text).join(", ");return}e.checkAnyLevel||(ne=x==null?void 0:x.value)==null||ne.hide();const Q=d.value.getNodeByValue($);u.value=Q?_(Q):"",L()},M=$=>{$.stopPropagation(),d.value.clearChecked(),v.value="",R([]),t("update:modelValue",[]),t("clear",JSON.parse(JSON.stringify(e.modelValue)))},j=($,Q,ne)=>{f.value=!0,ne.stopPropagation();const le=JSON.parse(JSON.stringify($)),ae=le.splice(Q,1)[0];N.value=!0,d.value.removeTag(ae),R(le),t("update:modelValue",d.value.getCheckedNodes().filter(X=>d.value.config.checkAnyLevel||X.isLeaf).map(X=>X.path)),setTimeout(()=>{N.value=w.value,f.value=!1})},H=($,Q)=>{var le;R($),t("update:modelValue",$);const ne=e.changeEmitsNodes?d.value.getNodeByValue($):$;Q!==void 0&&t("change",ne),(le=T==null?void 0:T.value)==null||le.focus(),y.value=!1},A=()=>{d.value=new M6(e),R(e.modelValue)},P=$=>{C.value=$.isShow,t("toggle",$.isShow),N.value=$.isShow,w.value=$.isShow,a.nextTick(()=>{var Q,ne;$.isShow&&((Q=T.value)==null||Q.focus(),(ne=g.value)==null||ne.scrollToSelected())}),$.isShow&&z(),$.isShow||(y.value=!1)},B=Es(200,$=>{const Q=$.target;if(v.value=Q.value,v.value===""){y.value=!1;return}y.value=!0,y.value=!0;const ne=e.filterMethod?e.filterMethod:ae=>(e.checkAnyLevel||ae.isLeaf)&&ae.pathNames.join(e.separator).includes(v.value),le=d.value.getFlattedNodes().filter(ae=>ne(ae,v.value));b.value=le,!(x!=null&&x.value.isShow)&&(x==null||x.value.show())}),z=()=>{t("focus")};a.watch(()=>e.modelValue,H,{immediate:!0}),a.watch(()=>e.list,A,{deep:!0,immediate:!0});const D=a.computed(()=>e.customTagsFillback?e.customTagsFillback(e.modelValue,d.value.getFlattedNodes()):h.value.map($=>$.text)),k=a.computed(()=>e.collapseTags?e.collapseTags&&w.value:e.collapseTags),G=a.computed(()=>e.collapseTags?e.collapseTags&&N.value:e.collapseTags),{overflowTagIndex:U}=n.trigger?{overflowTagIndex:null}:pg(E,G,D),{resolveClassName:te}=he();return{calcuPlaceholder:O,bkCascaderRef:E,inputRef:T,overflowTagIndex:U,isCollapse:k,isFocus:w,isAlways:f,store:d,updateValue:R,selectedText:u,checkedValue:S,handleClear:M,isHover:o,setHover:l,popover:x,cancelHover:c,selectedTags:h,removeTag:j,cascaderPanel:g,popoverChangeEmitter:P,searchKey:v,suggestions:b,isFiltering:y,searchInputHandler:B,focusEmitter:z,tagList:D,isEdit:N,displayText:V,resolveClassName:te,isShowPanel:C,searchBlueHandler:I}},render(){const e=()=>{var o;return this.clearable&&this.isHover&&!this.disabled&&((o=this.modelValue)==null?void 0:o.length)>0?a.createVNode(Vt,{class:this.resolveClassName("icon-clear-icon"),onClick:this.handleClear},null):a.createVNode(Ta,{class:[this.resolveClassName("icon-angle-up"),this.isShowPanel?"active":""]},null)};this.overflowTagIndex=this.overflowTagIndex===0?1:this.overflowTagIndex;const t=this.tagList.reduce((o,l,c)=>(this.overflowTagIndex!==null&&c>=this.overflowTagIndex&&o.push(l),o),[]),n=()=>this.limitOneLine?a.createVNode("span",{class:"cascader-selected-text"},[this.displayText]):a.createVNode("div",{class:"cascader-tag-list"},[this.tagList.map((o,l)=>{const c=!this.isCollapse&&this.overflowTagIndex!==null&&l>=this.overflowTagIndex;return a.createVNode("span",{key:o,style:{display:c?"none":""},class:"tag-item"},[a.createVNode("span",{class:"tag-item-name"},[o]),a.createVNode(wt,{class:this.resolveClassName("icon-clear-icon"),onClick:d=>{d.stopPropagation(),this.removeTag(this.modelValue,l,d)}},null)])}),this.overflowTagIndex!==null&&!this.isCollapse&&a.withDirectives(a.createVNode(ws,{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=ks({always:this.isAlways,arrow:!1,boundary:"body",disabled:this.disabled,hideIgnoreReference:!0,offset:4,placement:"bottom-start",referenceCls:this.resolveClassName("cascader-popover-reference"),theme:`light ${this.resolveClassName("cascader-popover")}`,trigger:"click"},this.popoverOptions),i=()=>a.createVNode(Dt,a.mergeProps({ref:"popover",class:this.resolveClassName("cascader-popover-wrapper"),onAfterHidden:this.popoverChangeEmitter,onAfterShow:this.popoverChangeEmitter},s),{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:()=>{var o,l;return a.createVNode("div",{class:this.resolveClassName("cascader-popover")},[a.createVNode(Eg,{ref:"cascaderPanel",width:this.scrollWidth,height:this.scrollHeight,modelValue:this.checkedValue,"onUpdate:modelValue":c=>this.checkedValue=c,"is-filtering":this.isFiltering,"search-key":this.searchKey,separator:this.separator,store:this.store,suggestions:this.suggestions},{default:c=>this.$slots.default?this.$slots.default(c):a.createVNode("span",{class:this.resolveClassName("cascader-node-name")},[c.node.name]),panel:c=>this.$slots.panel?this.$slots.panel(c):null}),(l=(o=this.$slots).extension)==null?void 0:l.call(o)])}});return a.createVNode("div",{class:[this.resolveClassName("cascader-wrapper"),this.floatMode?"float-mode":""]},[this.$slots.trigger?i():a.createVNode("div",{ref:"bkCascaderRef",class:[this.resolveClassName("cascader"),this.extCls,{"is-unselected":!this.modelValue||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(),i()])])}}),Vg=St(yx,{CascaderPanel:Eg});function vr(){}vr.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 i=this;function o(v){return s?(setTimeout(function(){s(void 0,v)},0),!0):v}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var l=n.length,c=t.length,d=1,f=l+c,u=[{newPos:-1,components:[]}],h=this.extractCommon(u[0],n,t,0);if(u[0].newPos+1>=l&&h+1>=c)return o([{value:this.join(n),count:n.length}]);function p(){for(var v=-1*d;v<=d;v+=2){var b=void 0,y=u[v-1],N=u[v+1],w=(N?N.newPos:0)-v;y&&(u[v-1]=void 0);var C=y&&y.newPos+1<l,S=N&&0<=w&&w<c;if(!C&&!S){u[v]=void 0;continue}if(!C||S&&y.newPos<N.newPos?(b=wx(N),i.pushComponent(b.components,void 0,!0)):(b=y,b.newPos++,i.pushComponent(b.components,!0,void 0)),w=i.extractCommon(b,n,t,v),b.newPos+1>=l&&w+1>=c)return o(bx(i,b.components,n,t,i.useLongestToken));u[v]=b}d++}if(s)(function v(){setTimeout(function(){if(d>f)return s();p()||v()},0)})();else for(;d<=f;){var g=p();if(g)return g}},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 i=n.length,o=r.length,l=t.newPos,c=l-s,d=0;l+1<i&&c+1<o&&this.equals(n[l+1],r[c+1]);)l++,c++,d++;return d&&t.components.push({count:d}),t.newPos=l,c},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 bx(e,t,n,r,s){for(var i=0,o=t.length,l=0,c=0;i<o;i++){var d=t[i];if(d.removed){if(d.value=e.join(r.slice(c,c+d.count)),c+=d.count,i&&t[i-1].added){var u=t[i-1];t[i-1]=t[i],t[i]=u}}else{if(!d.added&&s){var f=n.slice(l,l+d.count);f=f.map(function(p,g){var v=r[c+g];return v.length>p.length?v:p}),d.value=e.join(f)}else d.value=e.join(n.slice(l,l+d.count));l+=d.count,d.added||(c+=d.count)}}var h=t[o-1];return o>1&&typeof h.value=="string"&&(h.added||h.removed)&&e.equals("",h.value)&&(t[o-2].value+=h.value,t.pop()),t}function wx(e){return{newPos:e.newPos,components:e.components.slice(0)}}var $6=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,F6=/\S/,Dg=new vr;Dg.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!F6.test(e)&&!F6.test(t)};Dg.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]&&$6.test(t[n])&&$6.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var mh=new vr;mh.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 Cx(e,t,n){return mh.diff(e,t,n)}var Nx=new vr;Nx.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var xx=new vr;xx.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Di(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Di=function(t){return typeof t}:Di=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Di(e)}function Dd(e){return Sx(e)||Tx(e)||_x(e)||Ex()}function Sx(e){if(Array.isArray(e))return Rf(e)}function Tx(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function _x(e,t){if(e){if(typeof e=="string")return Rf(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 Rf(e,t)}}function Rf(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 Ex(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
45
45
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ox=Object.prototype.toString,Cs=new vr;Cs.useLongestToken=!0;Cs.tokenize=mh.tokenize;Cs.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,s=r===void 0?function(i,o){return typeof o>"u"?n:o}:r;return typeof e=="string"?e:JSON.stringify(If(e,null,null,s),s," ")};Cs.equals=function(e,t){return vr.prototype.equals.call(Cs,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function If(e,t,n,r,s){t=t||[],n=n||[],r&&(e=r(s,e));var i;for(i=0;i<t.length;i+=1)if(t[i]===e)return n[i];var o;if(Ox.call(e)==="[object Array]"){for(t.push(e),o=new Array(e.length),n.push(o),i=0;i<e.length;i+=1)o[i]=If(e[i],t,n,r,s);return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),Di(e)==="object"&&e!==null){t.push(e),o={},n.push(o);var l=[],c;for(c in e)e.hasOwnProperty(c)&&l.push(c);for(l.sort(),i=0;i<l.length;i+=1)c=l[i],o[c]=If(e[c],t,n,r,c);t.pop(),n.pop()}else o=e;return o}var Pf=new vr;Pf.tokenize=function(e){return e.slice()};Pf.join=Pf.removeEmpty=function(e){return e};function Ax(e,t,n,r,s,i,o){o||(o={}),typeof o.context>"u"&&(o.context=4);var l=Cx(n,r,o);l.push({value:"",lines:[]});function c(y){return y.map(function(N){return" "+N})}for(var d=[],f=0,u=0,h=[],p=1,g=1,v=function(N){var w=l[N],C=w.lines||w.value.replace(/\n$/,"").split(`
|
46
46
|
`);if(w.lines=C,w.added||w.removed){var S;if(!f){var x=l[N-1];f=p,u=g,x&&(h=o.context>0?c(x.lines.slice(-o.context)):[],f-=h.length,u-=h.length)}(S=h).push.apply(S,Dd(C.map(function(R){return(w.added?"+":"-")+R}))),w.added?g+=C.length:p+=C.length}else{if(f)if(C.length<=o.context*2&&N<l.length-2){var E;(E=h).push.apply(E,Dd(c(C)))}else{var T,O=Math.min(C.length,o.context);(T=h).push.apply(T,Dd(c(C.slice(0,O))));var V={oldStart:f,oldLines:p-f+O,newStart:u,newLines:g-u+O,lines:h};if(N>=l.length-2&&C.length<=o.context){var _=/\n$/.test(n),L=/\n$/.test(r),I=C.length==0&&h.length>V.oldLines;!_&&I&&n.length>0&&h.splice(V.oldLines,0,"\"),(!_&&!I||!L)&&h.push("\")}d.push(V),f=0,u=0,h=[]}p+=C.length,g+=C.length}},b=0;b<l.length;b++)v(b);return{oldFileName:e,newFileName:t,oldHeader:s,newHeader:i,hunks:d}}function Lx(e){var t=[];t.push("Index: "+e.oldFileName),t.push("==================================================================="),t.push("--- "+e.oldFileName+(" "+e.oldHeader)),t.push("+++ "+e.newFileName+(" "+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(`
|
@@ -359,4 +359,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
359
359
|
m 0 ${y?"":"-"}${b}
|
360
360
|
a ${b} ${b} 0 1 1 0 ${y?"-":""}${b*2}
|
361
361
|
a ${b} ${b} 0 1 1 0 ${y?"":"-"}${b*2}
|
362
|
-
`,O={d:T,stroke:u||"#f5f5f5","stroke-linecap":c,"stroke-width":p,"fill-opacity":"0",class:"process-circle-trail",style:x},V={d:T,stroke:l||"#13ce66","stroke-linecap":c,"stroke-width":i>0&&p||0,"fill-opacity":"0",class:`process-circle-path ${r(`${d}-circle-trail`)}`,style:E};return a.createVNode("div",{style:v,class:"progress-outer-circle"},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",O,null),a.createVNode("path",V,null)]),a.createVNode("span",{style:h,class:"progress-circle-text"},[n==null?void 0:n.default()])])},QO=(e,{attrs:t,slots:n})=>{const{resolveClassName:r}=he(),{percent:s,strokeWidth:i,size:o,color:l,titleStyle:c,showText:d,textInside:f,theme:u}=t,h={height:`${i}px`,lineHeight:`${i}px`},p={width:`${s}%`,background:l,animationDuration:"3s"},g=(v=!0)=>(d||n.default)&&(v&&f||!v&&!f)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{style:h,class:`${r(`progress-${o||"normal"}`)} progress-bar`},[a.createVNode("div",{style:p,class:{"progress-inner":!0,[`${r(`${u}`)}`]:!0}},[a.createVNode("div",{style:c,class:"inner-text"},[g()])])]),g(!1)])};function em(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const eA={extCls:m.string,type:P8(),percent:m.number.def(0),theme:m.theme().def(po.PRIMARY),size:m.size(),width:m.number.def(126),strokeWidth:m.number,strokeLinecap:I8(),textInside:m.bool.def(!1),showText:m.bool.def(!0),color:m.string,bgColor:m.string,fixed:m.number.validate(e=>e>=0&&e<=20).def(0),format:m.func.def(e=>`${e}%`),titleStyle:m.object.def({fontSize:"16px",verticalAlign:"middle"})},tA=a.defineComponent({name:"Progress",props:eA,setup(){const{resolveClassName:e}=he();return{resolveClassName:e}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var l;const{showText:e,format:t,percent:n,textInside:r,titleStyle:s,fixed:i}=this.$props,o=t((l=this.validPercent(n))==null?void 0:l.toFixed(i));return(e||this.$slots.default)&&r?this.$slots.default?this.$slots.default():a.createVNode("span",null,[o]):!e||r?null:a.createVNode("span",{style:typeof o=="string"?s:void 0,class:"progress-text"},[this.$slots.default?this.$slots.default():o])}},render(){const e=this.renderProcessInfo(),t={...this.$props,percent:this.validPercent(this.percent)};let n=a.createVNode(QO,t,em(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(ZO,t,em(e)?e:{default:()=>[e]}));const r={class:Ae({extCls:!!this.extCls},`${this.resolveClassName("progress")} ${this.resolveClassName(`progress-${this.type}`)}`)};return a.createVNode("div",r,[n])}}),xs=Ie(tA),Iv=Symbol("RadioGroup");function Pv(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const Mv=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,r=a.inject(Iv,tp),s=!np(r),i=a.ref(!1),o=a.ref(!1),l=a.ref("default"),c=a.computed(()=>s&&r.props.disabled?!0:t.disabled);s?(l.value=r.props.size,a.watch(()=>r.props.modelValue,u=>{i.value=u===t.label},{immediate:!0})):a.watch(()=>t.modelValue,u=>{u!==""&&(i.value=u===t.label)},{immediate:!0});const d=(u=!0)=>{i.value=u},f=u=>{if(c.value||o.value)return;const h=u.target,p=h.checked;Promise.resolve(s?r.props.beforeChange(p):t.beforeChange(p)).then(g=>{if(g){i.value=h.checked;const v=i.value?t.label:"";return n("update:modelValue",v),n("change",v),s&&r.handleChange(e.proxy),a.nextTick(()=>{h.checked!==i.value&&(h.checked=i.value)}),Promise.resolve(!0)}return Promise.reject()}).catch(()=>{h.checked=i.value}).finally(()=>{o.value=!1})};return a.onMounted(()=>{s&&r.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&r.unregister(e.proxy)}),{size:l,isChecked:i,isDisabled:c,setChecked:d,handleChange:f}},nA={name:m.string.def(""),label:m.oneOfType([m.bool,m.string,m.number]).isRequired,modelValue:m.oneOfType([m.bool,m.string,m.number]).def(""),checked:m.bool.def(!1),disabled:m.bool.def(!1),beforeChange:xa().def(()=>!0)},rA=a.defineComponent({name:"Radio",props:nA,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=Pv(),{size:r,isChecked:s,isDisabled:i,setChecked:o,handleChange:l}=Mv(),{resolveClassName:c}=he();return{size:r,isFocused:e,isChecked:s,isDisabled:i,setChecked:o,handleBlur:t,handleFocus:n,handleChange:l,resolveClassName:c}},render(){const e=Ae({[`${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()])}}),aA={name:m.string.def(""),label:m.oneOfType([m.bool,m.string,m.number]).isRequired,modelValue:m.oneOfType([m.bool,m.string,m.number]).def(""),checked:m.bool.def(!1),disabled:m.bool.def(!1),size:m.size(),beforeChange:xa().def(()=>!0)},sA=a.defineComponent({name:"RadioButton",props:aA,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=Pv(),{size:r,isChecked:s,isDisabled:i,setChecked:o,handleChange:l}=Mv(),{resolveClassName:c}=he();return{isFocused:e,size:r,isChecked:s,isDisabled:i,setChecked:o,handleBlur:t,handleFocus:n,handleChange:l,resolveClassName:c}},render(){const e=Ae({[`${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()])}}),iA={name:m.string.def(""),modelValue:m.oneOfType([m.bool,m.string,m.number]),disabled:m.bool,withValidate:m.bool.def(!0),type:m.oneOf(["tab","capsule","card"]).def("tab"),size:m.size(),beforeChange:xa().def(()=>!0)},oA=a.defineComponent({name:"RadioGroup",props:iA,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(e,t){const n=on(),r=[],s=c=>{r.push(c)},i=c=>{const d=r.indexOf(c);d>-1&&r.splice(d,1)},o=c=>{const d=c.label;r.forEach(f=>{f!==c&&f.setChecked(!1)}),t.emit("update:modelValue",d),t.emit("change",d)};a.provide(Iv,{props:e,register:s,unregister:i,handleChange:o}),a.watch(()=>e.modelValue,()=>{var c;e.withValidate&&((c=n==null?void 0:n.validate)==null||c.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&r.forEach(c=>{c.setChecked(c.label===e.modelValue)})});const{resolveClassName:l}=he();return{resolveClassName:l}},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()])}}),to=St(rA,{Group:oA,Button:sA}),yi=a.defineComponent({name:"Star",props:{rate:m.number.def(0),width:m.number.def(16),height:m.number.def(16),editable:m.bool.def(!0),hoverRate:m.number.def(0),max:m.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=d=>{if(!e.editable)return;const f=d+1;t("chooseRate",f)},r=(d,f)=>{if(!e.editable)return;const u=d+1;t("changeHover",u),a.nextTick(()=>{f.target.classList.add(i("is-hover"))})},s=d=>{e.editable&&a.nextTick(()=>{d.target.classList.remove(i("is-hover"))})},{resolveClassName:i}=he(),o=d=>Ae({[`${i("is-select")}`]:d<Math.floor(l.value),[`${i("is-edit")}`]:e.editable,[`${i("rate-star")}`]:!0}),l=a.computed(()=>e.hoverRate||e.rate),c={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:`${i("rate-stars")}`},[Array(e.max).fill(1).map((d,f)=>a.createVNode("svg",{style:c,class:o(f),viewBox:"0 0 64 64",x:"0px",y:"0px",onClick:()=>n(f),onMouseenter:u=>r(f,u),onMouseleave:u=>s(u)},[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)])])])])]))])}}),lA=a.defineComponent({name:"Rate",components:{star:yi},props:{modelValue:m.number.def(0),size:m.size(),editable:m.bool.def(!0),withValidate:m.bool.def(!0)},emits:["change","hover-change","update:modelValue"],setup(e,{emit:t}){const{resolveClassName:n}=he(),r=on(),s=a.ref(0),i=h=>{e.editable&&(t("update:modelValue",h),t("change",h))},o=h=>{s.value=h,t("hover-change",h)},l=Ae({[`${n("rate")}`]:!0}),d={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 h=Math.floor(e.modelValue),p=(d.width+3)*h,g=d.width*(e.modelValue-h);return{width:`${p+g}px`}}),u={width:d.width,height:d.height};return a.watch(()=>e.modelValue,()=>{var h;e.withValidate&&((h=r==null?void 0:r.validate)==null||h.call(r,"change"))}),()=>a.createVNode("p",{class:l},[e.editable?a.createVNode(yi,a.mergeProps({"hover-rate":s.value,rate:e.modelValue,onChangeHover:o,onChooseRate:i,onMouseleave:()=>o(0)},u),null):[a.createVNode(yi,a.mergeProps({style:f.value,class:`${n("score-real")}`,editable:!1,rate:5},u),null),a.createVNode(yi,a.mergeProps({editable:!1,rate:0},u),null)]])}}),$v=Ie(lA),cA=a.defineComponent({name:"ResizeLayout",props:{placement:m.placement().def("left"),min:m.number.def(3),max:m.number.def(1/0),triggerWidth:m.number.def(5),triggerOffset:m.number.def(3),initialDivide:m.oneOfType([String,Number]).def("20%"),immediate:m.bool,disabled:m.bool,collapsible:m.bool,isCollapsed:m.bool.def(!1),autoMinimize:m.oneOfType([Boolean,Number]).def(!1),border:m.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:n,initialDivide:r,triggerOffset:s,triggerWidth:i,max:o,min:l,immediate:c,autoMinimize:d,collapsible:f,isCollapsed:u}=a.toRefs(e),h=a.ref(u.value),p=a.ref(!0),g=a.ref(!1),v=a.ref(null),b=a.ref({}),y=a.ref(null),N=a.ref(null),w=a.ref(null),C=a.ref(null),S=a.computed(()=>["left","right"].includes(n.value)),x=a.computed(()=>S.value?"width":"height"),E=a.computed(()=>{let D=r.value;return l.value!==3&&typeof D!="number"?`${l.value}px`:(typeof D=="number"&&(D=D<=l.value?`${l.value}px`:`${D}px`),D)}),T=a.computed(()=>f.value&&u.value?{[x.value]:"0px"}:{[x.value]:E.value}),O=a.computed(()=>({[`margin-${n.value}`]:`${s.value-i.value}px`,[x.value]:`${i.value}px`})),V=a.computed(()=>d.value?typeof d.value=="boolean"?50:d.value:0),_=()=>{const D=y.value.getBoundingClientRect();v.value=S.value?D.width:D.height};let L=new ResizeObserver(_);const I=()=>{switch(N.value.style.visibility="visible",n.value){case"left":N.value.style.inset=`0 auto auto ${b.value.aside.width}px`;break;case"right":N.value.style.inset=`0 ${b.value.aside.width}px auto auto`;break;case"top":N.value.style.inset=`${b.value.aside.height}px auto auto 0`;break;case"bottom":N.value.style.inset=`auto auto ${b.value.aside.height}px 0`;break}},R=()=>{w.value.style.display="block",w.value.style.cursor=S.value?"col-resize":"row-resize"},M=D=>Math.min(o.value,Math.max(l.value,D),v.value-i.value),j=D=>{t("before-resize",D);const k=C.value.getBoundingClientRect();b.value=Object.freeze({mouse:{clientX:D.clientX,clientY:D.clientY},aside:{width:k.width,height:k.height}}),R(),c.value||I(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const G=$=>{t("resizing",$)},U=$=>{let Q;switch(n.value){case"top":Q=$.clientY-b.value.mouse.clientY;break;case"right":Q=b.value.mouse.clientX-$.clientX;break;case"bottom":Q=b.value.mouse.clientY-$.clientY;break;case"left":Q=$.clientX-b.value.mouse.clientX}const ne=b.value.aside[x.value]+Q,le=M(ne)+s.value,ae=`${le}px`;c.value?C.value.style[x.value]=ae:N.value.style[n.value]=ae,G(le)},te=()=>{if(N.value.style.visibility="hidden",w.value.style.display="none",document.removeEventListener("mousemove",U),document.removeEventListener("mouseup",te),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{H(),t("after-resize",parseFloat(N.value.style[n.value]))}),c.value)return!1;C.value.style[x.value]=N.value.style[n.value]};document.addEventListener("mousemove",U),document.addEventListener("mouseup",te)},H=()=>{if(!d.value)return!1;const D=C.value.getBoundingClientRect();if(g.value=h.value=D[x.value]<=V.value,!g.value)return p.value=!0,!1;P(),a.nextTick(()=>{C.value.setAttribute(`data-${x.value}`,T.value[x.value])})},A=D=>{h.value=typeof D=="boolean"?D:!h.value,P(),t("collapse-change",h.value)},P=()=>{const D=C.value.getBoundingClientRect();B(!h.value),h.value?(C.value.setAttribute(`data-${x.value}`,`${D[x.value]}px`),C.value.style[x.value]=e.collapsible?"0px":"5px"):(p.value=!0,C.value.style[x.value]=C.value.getAttribute(`data-${x.value}`)||E.value)},B=D=>{const k=()=>{p.value=D,C.value.style.transition="",C.value.removeEventListener("transitionend",k)};C.value.addEventListener("transitionend",k),C.value.style.transition=`${x.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};a.watch(u,()=>{h.value=u.value,A(h.value)}),a.onMounted(()=>{L.observe(y.value)}),a.onBeforeUnmount(()=>{y.value&&(L.unobserve(y.value),L=null)});const{resolveClassName:z}=he();return{collapsed:h,asideContentVisible:p,minimized:g,limitMax:v,state:b,vertical:S,cssPropKey:x,bkResizeLayoutRef:y,resizeProxyRef:N,resizeMaskRef:w,asideRef:C,triggerStyle:O,asideStyle:T,handleMousedown:j,setCollapse:A,resolveClassName:z}},render(){var t,n,r,s,i,o;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($t,{width:26,height:26,class:`${this.resolveClassName("resize-collapse")}`,onClick:this.setCollapse},null):a.createVNode(an,{width:26,height:26,class:`${this.resolveClassName("resize-collapse")}`,onClick:this.setCollapse},null)))]),a.createVNode("main",{class:`${this.resolveClassName("resize-layout-main")}`},[(o=(i=this.$slots).main)==null?void 0:o.call(i)]),a.createVNode("div",{ref:"resizeMaskRef",class:`${this.resolveClassName("resize-mask")}`},null)])}}),Fv=Ie(cA);var pf=null;function uA(e){return pf||(pf=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)}).bind(window)),pf(e)}var gf=null;function dA(e){gf||(gf=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}).bind(window)),gf(e)}function fA(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 bi(e,t){t===void 0&&(t={});var n=document.createElement(e);return Object.keys(t).forEach(function(r){n[r]=t[r]}),n}function Hv(e,t,n){var r=window.getComputedStyle(e,null)||{display:"none"};return r[t]}function Kf(e){if(!e||!document.documentElement.contains(e))return{detached:!0,rendered:!1};for(var t=e;t&&t!==document;){if(Hv(t,"display")==="none")return{detached:!1,rendered:!1};t=t.parentNode}return{detached:!1,rendered:!0}}var hA='.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%}',Yf=0,Pi=null;function mA(e,t){e.__resize_mutation_handler__||(e.__resize_mutation_handler__=vA.bind(e));var n=e.__resize_listeners__;if(!n){if(e.__resize_listeners__=[],window.ResizeObserver){var r=e.offsetWidth,s=e.offsetHeight,i=new ResizeObserver(function(){!e.__resize_observer_triggered__&&(e.__resize_observer_triggered__=!0,e.offsetWidth===r&&e.offsetHeight===s)||no(e)}),o=Kf(e),l=o.detached,c=o.rendered;e.__resize_observer_triggered__=l===!1&&c===!1,e.__resize_observer__=i,i.observe(e)}else if(e.attachEvent&&e.addEventListener)e.__resize_legacy_resize_handler__=function(){no(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(Yf||(Pi=fA(hA)),yA(e),e.__resize_rendered__=Kf(e).rendered,window.MutationObserver){var d=new MutationObserver(e.__resize_mutation_handler__);d.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),e.__resize_mutation_observer__=d}}e.__resize_listeners__.push(t),Yf++}function pA(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",Lh),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}!--Yf&&Pi&&Pi.parentNode.removeChild(Pi)}}function gA(e){var t=e.__resize_last__,n=t.width,r=t.height,s=e.offsetWidth,i=e.offsetHeight;return s!==n||i!==r?{width:s,height:i}:null}function vA(){var e=Kf(this),t=e.rendered,n=e.detached;t!==this.__resize_rendered__&&(!n&&this.__resize_triggers__&&(Vh(this),this.addEventListener("scroll",Lh,!0)),this.__resize_rendered__=t,no(this))}function Lh(){var e=this;Vh(this),this.__resize_raf__&&dA(this.__resize_raf__),this.__resize_raf__=uA(function(){var t=gA(e);t&&(e.__resize_last__=t,no(e))})}function no(e){!e||!e.__resize_listeners__||e.__resize_listeners__.forEach(function(t){t.call(e,e)})}function yA(e){var t=Hv(e,"position");(!t||t==="static")&&(e.style.position="relative"),e.__resize_old_position__=t,e.__resize_last__={};var n=bi("div",{className:"resize-triggers"}),r=bi("div",{className:"resize-expand-trigger"}),s=bi("div"),i=bi("div",{className:"resize-contract-trigger"});r.appendChild(s),n.appendChild(r),n.appendChild(i),e.appendChild(n),e.__resize_triggers__={triggers:n,expand:r,expandChild:s,contract:i},Vh(e),e.addEventListener("scroll",Lh,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}function Vh(e){var t=e.__resize_triggers__,n=t.expand,r=t.expandChild,s=t.contract,i=s.scrollWidth,o=s.scrollHeight,l=n.offsetWidth,c=n.offsetHeight,d=n.scrollWidth,f=n.scrollHeight;s.scrollLeft=i,s.scrollTop=o,r.style.width=l+1+"px",r.style.height=c+1+"px",n.scrollLeft=d,n.scrollTop=f}var zt=(e=>(e.ALL="all",e.NEED_KEY="need-key",e))(zt||{});const Bv=Symbol("SEARCH_SELECT_PROVIDER_KEY"),bA=e=>{a.provide(Bv,e)},zv=()=>a.inject(Bv);var sr=(e=>(e.DEFAULT="default",e.EDIT="edit",e))(sr||{});const jv=/(\||,|、|\r\n|\n)/gm,Uv=/^(\||,|、|\r\n|\n)$/;var Ca=(e=>(e.AND="&",e.OR="|",e))(Ca||{});class Zr{constructor(t,n="default"){ye(this,"id");ye(this,"name");ye(this,"values",[]);ye(this,"condition");ye(this,"logical");ye(this,"nameRenderKey",Er(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=Er(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(i=>i.name===s);if(!this.multiple){const s=n.join(` ${this.logical} `).trim(),i=r(s);return[{id:i?i.id:s,name:i?i.name:s,disabled:!!(i!=null&&i.disabled)}]}return n.map(s=>{const i=this.values.find(l=>l.name===s);if(i)return i;const o=r(s);return{id:o?o.id:s,name:o?o.name:s,disabled:!!(o!=null&&o.disabled)}})}addValues(t,n=!0){const r=t.split(jv).filter(l=>l.trim()&&!Uv.test(l)),s=n?this.values.map(l=>l.name):[],o=[...r,...s].filter(l=>l.trim()).join(this.logical);this.values=this.str2Values(o)}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 wA=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:Ca.OR},maxHeight:{type:Number,default:()=>392}},emits:["selectItem","selectCondition","footerClick","update:logical"],setup(e,{emit:t}){const n=Be("searchSelect"),{resolveClassName:r}=he(),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),i=a.computed(()=>({maxHeight:`${e.maxHeight}px`}));function o(g){t("selectItem",g)}function l(g){t("selectCondition",g)}function c(g){t("footerClick",g)}const d=a.computed(()=>{var g,v;return(g=e.list)!=null&&g.length?(v=e.keyword)!=null&&v.length?e.list.filter(b=>b.name.toLocaleLowerCase().includes(e.keyword.toLocaleLowerCase())):e.list:[]});function f(g){if(!g)return g;let{keyword:v}=e;if(!(v!=null&&v.trim().length)||!g.toLocaleLowerCase().includes(v.toLocaleLowerCase().trim()))return g;const b=v.trim().length,y=[];let N=-1;return v=v.replace(/([.*/]{1})/gim,"\\$1").trim(),g.replace(new RegExp(`${v}`,"igm"),(w,C)=>(y.length===0&&C!==0?y.push(g.slice(0,C)):N>=0&&y.push(g.slice(N+w.length,C)),y.push(a.createVNode("span",{class:"is-keyword"},[w])),N=C,w)),N>=0&&y.push(g.slice(N+b)),y.length?y:g}function u(g){var v;return(v=g.value)!=null&&v.name?[a.createVNode("span",{class:"menu-name"},[g.name,a.createTextVNode(":")]),g.value.name]:f(g.name)}function h(g,v){g.stopPropagation(),g.preventDefault(),o(v)}function p(g){t("update:logical",g)}return{handleClick:o,handleClickCondition:l,handleClickFooterBtn:c,handleSelectedChange:h,handleLogicalChange:p,filterList:d,getSearchNode:u,localFooterBtns:s,resolveClassName:r,resolveContentStyles:i,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:i=>this.handleSelectedChange(i,s)},[a.createVNode(Ct,{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(to,{label:"|",modelValue:this.logical,onChange:this.handleLogicalChange},{default:()=>[this.t.or,a.createTextVNode(" |")]}),a.createVNode(to,{label:"&",modelValue:this.logical,onChange:this.handleLogicalChange},{default:()=>[this.t.and,a.createTextVNode(" &")]})])]);return a.createVNode("div",{style:this.resolveContentStyles,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()])}}),Wv=a.defineComponent({name:"SearchSelectInput",directives:{clickoutside:Ln},props:{data:{type:Array,required:!0},showInputBefore:Boolean,showCondition:Boolean,clickOutside:Function,placeholder:String,conditions:{type:Array,default:()=>[]},defaultUsingItem:Object,mode:{type:String,default:sr.DEFAULT},maxHeight:{type:Number,default:()=>392},getMenuList:Function,validateValues:Function,valueBehavior:String},emits:["focus","add","delete","selectKey"],slots:Object,setup(e,{emit:t,expose:n}){const r=Be("searchSelect"),{resolveClassName:s}=he(),i=a.ref(null),o=a.ref(null),l=a.ref(""),c=a.ref(!1),d=a.ref(!1),f=a.ref(!1),u=a.ref(e.defaultUsingItem),h=a.ref(""),p=a.ref(!1),g=Es(100,U);let v=!1;const b=a.ref([]),y=a.ref([]),{editKey:N,onValidate:w,searchData:C}=zv(),S=a.computed(()=>{var W;return((W=u.value)==null?void 0:W.logical)||Ca.OR}),x=a.ref(Er(10)),E=a.ref(!1);a.watch(N,()=>{e.mode===sr.DEFAULT&&N.value&&(f.value=!1)}),a.watch([y,f],()=>{var q,se;f.value&&((q=y.value)==null?void 0:q.some(fe=>!fe.disabled))?v||(h.value=e.valueBehavior===zt.NEED_KEY&&((se=y.value.find(fe=>!fe.disabled))==null?void 0:se.id)||"",v=!0,document.addEventListener("keydown",T)):(document.removeEventListener("keydown",T),v=!1,e.valueBehavior!==zt.NEED_KEY&&(h.value=""))});function T(W){switch(W.code){case"ArrowDown":case"ArrowUp":O(W);break;case"Enter":case"NumpadEnter":V(W);break}}function O(W){var fe;W.preventDefault(),(fe=i.value)==null||fe.blur();const q=y.value.length;let se=y.value.findIndex(ee=>ee.id===h.value);for(let ee=0;ee<q;ee++){se=(se+(W.code==="ArrowDown"?1:-1)+q)%q;const de=y.value[se];if(de&&!de.disabled){const ue=document.getElementById(de.id);ue==null||ue.focus(),h.value=de.id;break}}}function V(W){var se;if(!v)return;W.preventDefault();const q=(se=y.value)==null?void 0:se.find(fe=>fe.id===h.value);q&&P(q)}function _(W){var q,se,fe;if(!((q=o.value)!=null&&q.contains(W.target)||!((se=e.clickOutside)!=null&&se.call(e,W.target,o.value)))){if((fe=u.value)!=null&&fe.isCustomMenu){e.mode===sr.EDIT&&(H().then(ee=>ee&&X()),f.value=!1);return}if(e.mode===sr.EDIT||u.value){u.value&&H().then(ee=>ee&&X()),u.value||t("focus",!1);return}d.value=!1,f.value=!1,t("focus",d.value)}}let L=!1;function I(W){if(!L){if(c.value=!1,e.mode===sr.EDIT&&u.value&&!d.value){const q=Array.from(i.value.querySelectorAll(`[data-type="${u.value.values.length?"value":u.value.type}"]`));if(!q.length)return;W==null||W.preventDefault();const se=document.createRange(),fe=window.getSelection();se.selectNodeContents(q.at(-1)),fe==null||fe.removeAllRanges(),L=!0,setTimeout(()=>{L=!1},200),fe.addRange(se),ne(!0,!1);return}U(),ne(!1,!d.value)}}function R(W){W.preventDefault();const q=W.clipboardData.getData("text").trim();if(!u.value){const se=J(q);if(se){u.value=se,ne(!0,!0);return}l.value=q.split(jv).filter(fe=>fe.trim()&&!Uv.test(fe)).join(` ${S.value} `),i.value.innerText=l.value,ne(),g();return}u.value.addValues(q),g()}function M(W){if(E.value)return;ae();const q=W.target.innerText;if(u.value){if(u.value&&!q){x.value=Er(10),h.value="",u.value=null,l.value="",setTimeout(()=>{ne(!0,!0),a.nextTick(Q)},200);return}}else{l.value=q,g();return}l.value=u.value.isSpecialType()?q:q.replace(u.value.name,"").replace(":",""),g()}function j(W){var q;if(!E.value)switch(W.code){case"Enter":case"NumpadEnter":if(W.preventDefault(),e.valueBehavior===zt.NEED_KEY&&y.value.some(se=>se.id===h.value)){!u.value&&((q=l.value)!=null&&q.length)&&W.preventDefault();return}H(W).then(se=>se&&X());break;case"Backspace":case"Delete":A(W);break;default:c.value=!1;break}}async function H(W){var se,fe,ee;return W==null||W.preventDefault(),await new Promise(de=>setTimeout(de,0)),u.value?l.value?await $():!((se=u.value)!=null&&se.isSpecialType())&&((fe=u.value)==null?void 0:fe.values.length)<1?(c.value=!c.value,!1):(await G()&&((ee=u.value)!=null&&ee.isCustomMenu&&(f.value=!1),le()),!1):!l.value||e.valueBehavior===zt.NEED_KEY?void 0:await te()}function A(W){var q,se,fe;if(!u.value&&!l.value){h.value="",t("delete"),setTimeout(U,16);return}if((q=u.value)!=null&&q.values.length){if(u.value.type==="text"||!((se=u.value.children)!=null&&se.length))return;W.preventDefault();const ee=window.getSelection();if((ee==null?void 0:ee.rangeCount)>0){let ge=ee.getRangeAt(0).startContainer;for(;ge&&ge.parentNode!==i.value;)ge=ge.parentNode;const Se=((fe=ge==null?void 0:ge.dataset)==null?void 0:fe.index)||-1;u.value.values.splice(+Se,1),l.value="",ne(!1,!1);return}}else(!l.value||l.value.length===1)&&(u.value=null,l.value="",U());w("")}async function P(W,q){var se,fe,ee,de,ue;if((se=W.value)!=null&&se.id){const ge=new Zr({...W,id:W.realId??W.id},q);if(ge.addValues(W.value.name,!1),e.valueBehavior===zt.NEED_KEY&&h.value){le(ge),ne(!0),h.value="";return}if(u.value=ge,!await G(u.value.values)){u.value=null;return}le(u.value),ne(!0),h.value="";return}if(!u.value||((fe=u.value)==null?void 0:fe.type)==="condition"){u.value=new Zr(W,q??((ee=u.value)==null?void 0:ee.type)),l.value="";const ge=((de=u.value)==null?void 0:de.type)==="condition";ge||t("selectKey",{id:W.id,name:W.name,values:[]}),ge&&le(),f.value=ge||!!u.value.children.length,ne(e.valueBehavior===zt.NEED_KEY&&!!h.value),typeof e.getMenuList=="function"&&a.nextTick(Q);return}u.value&&(u.value.addValue(W),a.nextTick(Y)),await G(u.value.values)&&(u.value.multiple||le(),e.valueBehavior===zt.NEED_KEY&&((ue=u.value)!=null&&ue.multiple)&&ne())}function B(W){P(W,"condition")}function z(W){var q;switch(W.id){case"confirm":if(!((q=u.value)!=null&&q.values.length))return;l.value="",H();break;case"cancel":u.value.values=[],f.value=!1;break}}function D(W){u.value&&(u.value.logical=W)}async function k(W,q){if(typeof e.validateValues=="function"){let se="";try{se=await e.validateValues(W??null,q)}catch{se=!1}if(typeof se=="string"||se===!1)return w(se||"校验错误"),!1}return w(""),!0}async function G(W){if(!u.value)return await k(null,W);const{searchItem:q,validate:se,values:fe}=u.value;return se&&typeof e.validateValues=="function"?await k(q,W??fe):(w(""),!0)}async function U(){var q,se,fe,ee,de;let W=[];if(typeof e.getMenuList=="function"&&(!((q=e.data)!=null&&q.length)&&!u.value||u.value&&u.value.type!=="condition"&&(((se=u.value.searchItem)==null?void 0:se.async)===void 0||u.value.searchItem.async===!0)))p.value=!0,W=await e.getMenuList((fe=u.value)==null?void 0:fe.searchItem,l.value.trim()).catch(()=>[]),p.value=!1;else if(u!=null&&u.value)u.value.type==="condition"?W=e.conditions:(!((de=u.value.values)!=null&&de.length)||u.value.multiple||e.mode===sr.EDIT)&&(W=u.value.children.filter(ue=>ue.name.toLocaleLowerCase().includes(l.value.toLocaleLowerCase().trim())));else if(!((ee=l.value)!=null&&ee.length))W=e.data.filter(ue=>!ue.isSelected).slice();else for(const ue of e.data.filter(ge=>!ge.isSelected))if(ue.name.toLocaleLowerCase().includes(l.value.toLocaleLowerCase())){W.push(ue);const Se=[];for(const Le of ue.children||[])Se.push({...ue,realId:ue.id,id:Er(10),value:Le});!Se.length&&!ue.onlyRecommendChildren&&Se.push({...ue,realId:ue.id,id:Er(10),value:{id:l.value,name:l.value}}),W.push(...Se)}else{const Se=[];for(const Le of ue.children||[])Le.name.toLocaleLowerCase().includes(l.value.toLocaleLowerCase().trim())&&Se.push({...ue,realId:ue.id,id:Er(10),value:Le});!Se.length&&!ue.onlyRecommendChildren&&Se.push({...ue,value:{id:l.value,name:l.value}}),W.push(...Se)}if(y.value=W,console.log("list",W),e.valueBehavior===zt.NEED_KEY){const ue=W.find(ge=>!ge.disabled);ue&&(!h.value||h.value&&!W.some(ge=>ge.id===h.value))&&(h.value=ue.id)}}async function te(){const W=J(l.value),q=(W==null?void 0:W.values)||[{id:l.value,name:l.value}];if(await G(q))return t("add",W||new Zr({...q[0]},"text")),l.value="",U(),!0}async function $(){let W=[];if(u.value.isSpecialType()){const se=J(l.value);se&&(u.value=se,W=se.values)}if(W=W.length?W:u.value.str2Values(l.value),!!await G(W))return u.value.type==="text"?(u.value.name=l.value,u.value.id=l.value):u.value.values=W,t("add",u.value),l.value="",u.value=null,ne(!0),!0}function Q(){if(!i.value)return;const W=document.createRange(),q=window.getSelection();W.selectNodeContents(i.value),W.collapse(!1),q.removeAllRanges(),q.addRange(W)}function ne(W=!1,q=!0){W&&setTimeout(U,16),d.value=!0,f.value=!0,c.value=!1,!e.getMenuList&&q&&a.nextTick(Q),t("focus",d.value)}function le(W){var se;t("add",W??u.value);const q=!((se=u.value)!=null&&se.isCustomMenu);u.value=null,l.value="",q&&(ne(!0,q),a.nextTick(X))}function ae(){if(!i.value)return;const W=i.value.querySelectorAll("br");W==null||W.forEach(q=>q.remove())}function X(){i.value&&(l.value="",a.nextTick(()=>{i.value.innerText="",ae()}))}function J(W){const[q,se]=W.split(":");if(q!=null&&q.trim()){const fe=C.value.find(ee=>ee.name===q.trim());if(fe){const ee=new Zr({...fe},"default");return ee.addValues(se),ee}}}function Y(){var W;(W=l.value)!=null&&W.length&&(l.value="",Array.from(i.value.childNodes).forEach(se=>{var fe;se.nodeType===Node.TEXT_NODE&&((fe=se.textContent)!=null&&fe.trim())&&i.value.removeChild(se)}))}function oe(){var W;(W=i.value)==null||W.focus()}async function pe(){await H().then(W=>W&&X()),f.value=!1,i.value.blur()}function Z(){l.value="",c.value=!1,f.value=!1,u.value=null,a.nextTick(X)}function ce(W){u.value.values=[{id:W,name:W}],H().then(q=>q&&X())}function ie(){u.value||(h.value="")}function F(W){E.value=!1,l.value=W.data,M(W)}function K(){E.value=!0}return n({inputFocusForWrapper:oe,inputEnterForWrapper:pe,inputClearForWrapper:Z,handleInputFocus:I,isFocus:d,refleshMenuHover:ie}),{popoverRef:o,inputRef:i,keyword:l,loading:p,remoteMenuList:b,menuList:y,menuHoverId:h,isFocus:d,isComposition:E,usingItem:u,showPopover:f,showNoSelectValueError:c,debounceSetMenuList:g,documentArrowEvent:O,handleClickOutside:_,handleInputFocus:I,handleInputChange:M,handleInputPaste:R,handleLogicalChange:D,handleInputKeyup:j,handleSelectItem:P,handleSelectConditionItem:B,handleMenuFooterClick:z,resolveClassName:s,inputFocusForWrapper:oe,inputEnterForWrapper:pe,inputClearForWrapper:Z,deleteInputTextNode:Y,customPanelSubmit:ce,refleshMenuHover:ie,t:r,inputKey:x,handleCompositionEnd:F,handleCompositionStart:K}},render(){var f,u;const{multiple:e,values:t,placeholder:n,inputInnerHtml:r,isCustomMenu:s}=this.usingItem||{},i=!((f=this.keyword)!=null&&f.length)&&!(t!=null&&t.length)&&n,o=this.loading||this.showNoSelectValueError||this.showPopover&&(!!s||!!((u=this.menuList)!=null&&u.length)),l=!this.usingItem&&this.showCondition,c=()=>{var h,p,g,v;return a.withDirectives(a.createVNode("div",{key:this.inputKey,ref:"inputRef",class:{"div-input":!0,"input-before":this.showInputBefore&&!((h=this.keyword)!=null&&h.length),"input-after":i},contenteditable:!0,"data-placeholder":!this.isComposition&&!r&&!this.keyword?this.placeholder:"","data-tips":this.isComposition?"":n||"",spellcheck:"false",onCompositionend:this.handleCompositionEnd,onCompositionstart:this.handleCompositionStart,onFocus:this.handleInputFocus,onInput:this.handleInputChange,onKeydown:this.handleInputKeyup,onPaste:this.handleInputPaste},[((p=this.usingItem)==null?void 0:p.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:b=>b.preventDefault()},[this.usingItem.name,a.createTextVNode(": ")])),(v=(g=this.usingItem)==null?void 0:g.values)==null?void 0:v.map((b,y)=>a.createVNode("span",{key:y,"data-id":b.id,"data-index":y,"data-key":b.name,"data-type":"value"},[b.name,y<this.usingItem.values.length-1?` ${this.usingItem.logical} `:""]))]),[[a.resolveDirective("clickoutside"),this.handleClickOutside]])},d=()=>{var h,p,g,v,b;return this.loading?a.createVNode("div",null,[this.t.loading]):this.showNoSelectValueError?a.createVNode("div",null,[this.t.filterQueryMustHasValue]):(h=this.usingItem)!=null&&h.isCustomMenu&&this.$slots.menu?a.createVNode("div",{ref:"popoverRef",class:this.resolveClassName("search-select-popover")},[this.$slots.menu({value:(p=this.usingItem.values)==null?void 0:p[0],id:this.usingItem.id,name:this.usingItem.name,onSubmit:this.customPanelSubmit})]):(g=this.menuList)!=null&&g.length?a.createVNode("div",{ref:"popoverRef",class:this.resolveClassName("search-select-popover")},[a.createVNode(wA,{conditions:l?this.conditions:[],hoverId:this.menuHoverId,keyword:this.keyword,list:this.menuList,logical:(v=this.usingItem)==null?void 0:v.logical,maxHeight:this.maxHeight,multiple:!!e,selected:(t==null?void 0:t.map(y=>y.id))||[],showLogical:(b=this.usingItem)==null?void 0:b.showLogical,onFooterClick:this.handleMenuFooterClick,onSelectCondition:this.handleSelectConditionItem,onSelectItem:this.handleSelectItem,"onUpdate:logical":this.handleLogicalChange},null)]):void 0};return a.createVNode(Dt,{key:this.inputKey,arrow:!1,disableOutsideClick:!0,isShow:o,placement:"bottom-start",theme:"light",trigger:"manual"},{default:c,content:d})}}),CA=a.defineComponent({name:"SearchSelected",props:{data:{type:Array,required:!0},selectedList:{type:Array,required:!0},overflowIndex:{type:Number,default:-1},maxHeight:{type:Number,default:()=>392},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:i,onEditBlur:o,editKey:l}=zv();function c(g){t("delete",g)}function d(g,v,b){g.preventDefault(),g.stopPropagation(),s(v,b),t("selectKey",{id:v.id,name:v.name,values:v.values.slice()}),setTimeout(()=>n.value.handleInputFocus(),200)}function f(g,v){i(g,v)}function u(g){g||o()}function h(g){var v;return!((v=r.value)!=null&&v.contains(g))}function p(g){const v=new Zr(g.searchItem,g.type);return v.values=g.values.slice(),v.logical=g.logical||Ca.OR,v}return{inputRef:n,selectedInputRef:r,editKey:l,copySelectedItem:p,handleDeleteSelected:c,handleEditSelected:d,handleInputOutside:h,handleAddSelected:f,handleInputFocus:u}},render(){const e=(t,n)=>this.editKey===`${t.id}_${n}`?a.createVNode("div",{key:this.editKey.toString(),ref:"selectedInputRef",class:"selected-input"},[a.createVNode(Wv,{key:this.editKey.toString(),ref:"inputRef",clickOutside:this.handleInputOutside,conditions:this.conditions,data:this.data,defaultUsingItem:this.copySelectedItem(t),getMenuList:this.getMenuList,maxHeight:this.maxHeight,mode:sr.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(wt,{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)])])}}),vf=40,tm=6,nm=26,NA=32,xA={data:{type:Array,default:()=>[]},modelValue:{type:Array,default:()=>[]},maxHeight:{type:Number,default:NA*12+8},conditions:{type:Array,default:()=>[]},clearable:{type:Boolean,default:!0},placeholder:String,getMenuList:Function,validateValues:Function,uniqueSelect:{type:Boolean,default:!1},valueBehavior:{type:String,default:zt.ALL,validator(e){return[zt.ALL,zt.NEED_KEY].includes(e)}}},SA=a.defineComponent({name:"SearchSelect",directives:{clickoutside:Ln},props:xA,emits:["update:modelValue","search","selectKey"],slots:Object,setup(e,{emit:t}){const n=Be("searchSelect"),{resolveClassName:r}=he(),s=a.computed(()=>e.conditions===void 0?[{id:"or",name:n.value.or},{id:"and",name:n.value.and}]:e.conditions),i=a.ref(null),o=a.ref(null),l=a.ref(!1),c=a.ref([]),d=a.ref(-1),f=Es(32,N),u=a.ref(""),h=a.ref(""),p=a.shallowRef([]);a.watch(()=>e.data,()=>{p.value=JSON.parse(JSON.stringify(e.data));for(const _ of p.value||[])_.isSelected=e.uniqueSelect&&e.modelValue.some(L=>L.id===_.id)},{immediate:!0}),a.watch(()=>e.modelValue,_=>{var I;if(!(_!=null&&_.length)){c.value=[];for(const R of p.value||[])R.isSelected=!1;return}const L=[];for(const R of _){const M=c.value.find(j=>j.id===R.id&&j.name===R.name);if((M==null?void 0:M.toValueKey())===JSON.stringify(R))M.values=R.values||[],M.logical=R.logical||Ca.OR,L.push(M);else{let j=e.data.find(P=>P.id===R.id),H="default";j||(j=e.conditions.find(P=>P.id===R.id),j&&(H="condition")),!j&&!((I=R.values)!=null&&I.length)&&(H="text");const A=new Zr(j||R,H);A.values=R.values||[],A.logical=R.logical||Ca.OR,L.push(A)}}c.value=L,p.value=JSON.parse(JSON.stringify(e.data||[]));for(const R of p.value)R.isSelected=e.uniqueSelect&&!!L.some(M=>M.id===R.id)},{immediate:!0,deep:!0}),a.onMounted(()=>{mA(o.value.querySelector(`.${r("search-select-container")}`),f),f()}),a.onBeforeUnmount(()=>{pA(o.value.querySelector(`.${r("search-select-container")}`),f)}),bA({onEditClick:g,onEditEnter:v,onEditBlur:b,onValidate:y,editKey:u,searchData:a.computed(()=>e.data),isClickOutside:S});function g(_,L){u.value=`${_.id}_${L}`}function v(_,L){const I=c.value.slice();I.splice(L,1,_),t("update:modelValue",I.map(R=>R.toValue())),u.value=""}function b(){u.value="",y("")}function y(_){h.value=_||""}function N(){if(l.value||c.value.length<1){d.value=-1;return}const _=o.value.querySelector(`.${r("search-select-container")}`),L=o.value.querySelector(".search-container").clientWidth-tm-2,I=_.querySelectorAll(".search-container-selected:not(.overflow-selected)");let R=0,M=0,j=0;for(;M===0&&R<=L-vf&&j<=I.length-1;){const H=I[j];if(H.clientHeight>nm){d.value=j;return}R+=H?H.clientWidth+tm:0,R>=L-vf&&(M=j),j+=1}if(M===I.length-1&&R<=L){d.value=-1;return}d.value=R>=L-vf?M:M-1}function w(){u.value||i.value.inputFocusForWrapper()}function C(_){_.stopPropagation(),c.value=[],d.value=-1,i.value.inputClearForWrapper(),t("update:modelValue",[])}function S(_){var L;return!((L=o.value)!=null&&L.contains(_))}function x(_){const L=c.value.slice();L.push(_),y(""),t("update:modelValue",L.map(I=>I.toValue()))}function E(_){const L=c.value.slice();L.splice(typeof _=="number"?_:c.value.length-1,1),y(""),i.value.refleshMenuHover(),t("update:modelValue",L.map(I=>I.toValue()))}function T(_){var L;_&&(d.value=-1),_===!1&&((L=o.value.querySelector(`.${r("search-select-container")}`))==null||L.scrollTo(0,0)),l.value=_}function O(_){i.value.inputEnterForWrapper(),t("search",_)}function V(_){t("selectKey",_)}return{inputRef:i,wrapRef:o,isFocus:l,copyData:p,selectedList:c,overflowIndex:d,validateStr:h,onEditClick:g,onEditEnter:v,handleWrapClick:w,handleInputFocus:T,handleResize:N,handleClearAll:C,handleInputOutside:S,handleAddSelected:x,handleDeleteSelected:E,handleClickSearch:O,localConditions:s,resolveClassName:r,handleSelectedKey:V,t:n}},render(){var r,s;const e=`${this.isFocus?this.maxHeight:nm}`.replace("px",""),t=!!this.selectedList.length&&this.selectedList.slice(-1)[0].type!=="condition",n=Object.assign({},this.$slots.menu?{menu:i=>{var o,l;return(l=(o=this.$slots).menu)==null?void 0:l.call(o,i)}}:{});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:{"max-height":`${e}px`},class:"search-container"},[a.createVNode(CA,{conditions:this.localConditions,data:this.copyData,getMenuList:this.getMenuList,maxHeight:this.maxHeight,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(Wv,{ref:"inputRef",clickOutside:this.handleInputOutside,conditions:this.localConditions,data:this.copyData,getMenuList:this.getMenuList,maxHeight:this.maxHeight,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(Vt,{class:"search-clear",onClick:this.handleClearAll},null),this.$slots.append?this.$slots.append():a.createVNode(jr,{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($s,{class:"select-tips"},null),this.validateStr||""])])])}}),qv=Ie(SA);function TA(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const Gv=Sh(hl);Gv.width.default="400";const _A=a.defineComponent({name:"Sideslider",inheritAttrs:!1,props:{...Gv,title:m.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:i}=he(),o=async()=>{let d=!0;typeof e.beforeClose=="function"&&(d=await e.beforeClose()),d&&(t("update:isShow",!1),t("closed"),t("animation-end"))},l=()=>{t("shown")},c=()=>{t("hidden")};return()=>{const d={header:()=>{var u;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:`${i("sideslider-header")}`},[a.createVNode("div",{class:`${i("sideslider-close")}`,onClick:()=>void o()},[e.direction==="left"?a.createVNode(an,null,null):a.createVNode($t,null,null)]),a.createVNode("div",{class:`${i("sideslider-title")}`},[((u=r.header)==null?void 0:u.call(r))??e.title])])])},default:()=>{var u;return a.createVNode("div",{class:`${i("sideslider-content")}`},[(u=r.default)==null?void 0:u.call(r)])}};r.footer&&Object.assign(d,{footer:()=>a.createVNode("div",{class:`${i("sideslider-footer")}`},[r.footer()])});const f={...n};return s.vnode.scopeId&&(f[s.vnode.scopeId]=""),a.createVNode(Gs,a.mergeProps(f,{width:e.width,class:{[i("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:o,onHidden:c,onShown:l}),TA(d)?d:{default:()=>[d]})}}}),Kv=Ie(_A),rm=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),i=a.ref(0),o=a.ref(0),l=a.ref(null),c=a.ref(e.modelValue),d=a.ref(0),f=a.ref(0),u=a.ref(!1),h=a.ref(null),p=a.computed(()=>{var V,_;let T="";if((V=e.params.customContent)!=null&&V[e.modelValue]){const L=e.params.customContent[e.modelValue];T=L.tip||L.label||""}const O=e.params.vertical?hs.RIGHT:hs.TOP;return(_=e.params)!=null&&_.showTip?{content:e.params.formatterTipLabel(`${T||(e==null?void 0:e.modelValue)||"0"}`),placement:O}:{content:"",placement:O}}),g=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),v=a.computed(()=>e.params.vertical?{bottom:g.value}:{left:g.value}),b=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),y=T=>{e.params.disable||(T.preventDefault(),N(T),ts(window,"mousemove",w),ts(window,"touchmove",w),ts(window,"mouseup",C),ts(window,"touchend",C))},N=T=>{n.value=!0,r.value=!0,e.params.vertical?s.value=T.clientY:i.value=T.clientX,o.value=parseFloat(g.value),l.value=o.value},w=T=>{if(n.value){r.value=!1,t("resetSize");let O=0;e.params.vertical?(d.value=T.clientY,O=(s.value-d.value)/e.params.sliderSize*100):(f.value=T.clientX,O=(f.value-i.value)/e.params.sliderSize*100),l.value=o.value+O,S(l.value)}},C=()=>{u.value=!1,n.value&&(setTimeout(()=>{n.value=!1,r.value||(S(l.value),t("emitChange"))},0),wi(window,"mousemove",w),wi(window,"touchmove",w),wi(window,"mouseup",C),wi(window,"touchend",C))},S=T=>{if(T===null||isNaN(T))return;T<0?l.value=0:T>100&&(l.value=100);const O=100/((e.params.maxValue-e.params.minValue)/e.params.step);let _=Math.round(T/O)*O*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;_=parseFloat(_.toFixed(e.params.precision)),t("update:modelValue",_),!n.value&&e.modelValue!==c.value&&(c.value=e.modelValue)},{resolveClassName:x}=he();return{renderDom:()=>a.createVNode("div",{ref:h,style:v.value,class:[`${x("slider-button")}`,e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],tabindex:"0",onClick:T=>T.stopPropagation(),onMousedown:y},[p.value.content?a.createVNode(a.Fragment,null,[a.createVNode(Dt,{boundary:document.body,content:p.value.content,placement:p.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"]},[b.value])]):null]),setPosition:S,tip:p}},render(){return this.renderDom()}}),ts=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},wi=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)},EA=a.defineComponent({name:"Slider",props:{modelValue:m.oneOfType([m.arrayOf(m.number),m.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),i=a.ref(null),o=a.ref(null),l=a.ref(0),c=a.ref(0),d=a.ref(null),f=a.ref(null),u=a.ref(null),h=a.ref(null),p=a.computed(()=>{const D=[e.minValue,e.maxValue,e.step].map(k=>{const G=`${k}`.split(".")[1];return G?G.length:0});return Math.max.apply(null,D)}),g=a.computed(()=>Math.min(s.value,i.value)),v=a.computed(()=>Math.max(s.value,i.value)),b=a.computed(()=>e.range?`${100*(v.value-g.value)/(e.maxValue-e.minValue)}%`:`${100*(s.value-e.minValue)/(e.maxValue-e.minValue)}%`),y=a.computed(()=>e.range?`${100*(g.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),N=a.computed(()=>e.vertical?{height:b.value,bottom:y.value}:{width:b.value,left:y.value}),w=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const D=(e.maxValue-e.minValue)/e.step,k=100*e.step/(e.maxValue-e.minValue),G=[];for(let U=1;U<D;U++)G.push(U*k);return e.range?G.filter(U=>U<100*(g.value-e.minValue)/(e.maxValue-e.minValue)||U>100*(v.value-e.minValue)/(e.maxValue-e.minValue)):G.filter(U=>U>100*(s.value-e.minValue)/(e.maxValue-e.minValue))}),C=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),S=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const D=100*e.step/(e.maxValue-e.minValue),k=[];for(let G=e.minValue,U=0;G<=e.maxValue;G+=e.step,U++){const te={stepWidth:U*D,stepLabel:e.formatterLabel(G)};k.push(te)}return k}),x=a.computed(()=>Array.isArray(e.modelValue)),E=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((D,k)=>Number(D)-Number(k)).filter(D=>Number(D)>=e.minValue&&Number(D)<=e.maxValue).map(D=>{const{tip:k}=e.customContent[D],{label:G}=e.customContent[D];return{tip:k||G||"",label:G||"",percent:(Number(D)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),T=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:p.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:r.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{L()}),a.watch(()=>s.value,D=>{e.range?n("update:modelValue",[g.value,v.value]):n("update:modelValue",D),l.value=D}),a.watch(()=>i.value,D=>{n("update:modelValue",[g.value,v.value]),c.value=D}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(s.value=Math.max(e.minValue,Number(e.modelValue[0])),i.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(s.value=e.minValue,i.value=e.maxValue),o.value=[s.value,i.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?s.value=e.minValue:s.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),o.value=s.value),O(),ts(window,"resize",O())});const O=()=>{d.value&&(r.value=d.value[`client${e.vertical?"Height":"Width"}`])},V=D=>{var k,G;if(D.stopPropagation(),!e.disable){if(O(),e.vertical){const U=(k=d.value)==null?void 0:k.getBoundingClientRect().bottom;M((U-D.clientY)/r.value*100)}else{const U=(G=d.value)==null?void 0:G.getBoundingClientRect().left;M((D.clientX-U)/r.value*100)}I()}},_=()=>e.range?![g.value,v.value].every((D,k)=>{var G;return D===((G=o.value)==null?void 0:G[k])}):e.modelValue!==o.value,L=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const D=e.modelValue;e.range&&Array.isArray(D)?D[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):D[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):D[0]<e.minValue?n("update:modelValue",[e.minValue,D[1]]):D[1]>e.maxValue?n("update:modelValue",[D[0],e.maxValue]):(s.value=Number(D[0]),i.value=Number(D[1]),_()&&(o.value=D.slice())):!e.range&&typeof D=="number"&&!isNaN(D)&&(D<e.minValue?n("update:modelValue",e.minValue):D>e.maxValue?n("update:modelValue",e.maxValue):(s.value=D,_()&&(o.value=D)))},I=async()=>{await a.nextTick(),n("change",e.range?[g.value,v.value]:e.modelValue)},R=D=>e.vertical?{bottom:`${D}%`}:{left:`${D}%`},M=D=>{if(!e.range){f.value.setPosition(D);return}const k=e.minValue+D*(e.maxValue-e.minValue)/100;Math.abs(g.value-k)<Math.abs(v.value-k)?h.value=s.value<i.value?f.value:u.value:h.value=s.value>i.value?f.value:u.value,h.value.setPosition(D)},j=D=>{if(D==="")return;const k=parseFloat(D);k<e.minValue?(l.value=e.minValue,s.value=e.minValue):k>e.maxValue?(l.value=e.maxValue,s.value=e.maxValue):s.value=k},H=D=>{if(D==="")return;const k=parseFloat(D.toString());k<e.minValue?(c.value=e.minValue,i.value=e.minValue):k>e.maxValue?(c.value=e.maxValue,i.value=e.maxValue):i.value=k},A=D=>{let k=0;return D==="start"?k=e.vertical?e.maxValue:e.minValue:k=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[s.value,i.value].includes(k)?"0":"1"},{resolveClassName:P}=he(),B=(D,k)=>{let G=k.stepWidth??k.percent??k;if(e.labelClick){D.stopPropagation(),D.stopImmediatePropagation(),D.preventDefault();let U;if(typeof e.labelClick=="function"){const te={percent:G,step:k};if(U=e.labelClick(D,te),U===!1)return}G=typeof U=="number"?U:G,console.log("handleStepLabelClick",G),M(G);return}};return{renderDom:()=>{var D,k;return a.createVNode("div",{class:[`${P("slider")}`,e.extCls]},[(D=t.start)==null?void 0:D.call(t),a.createVNode("div",{ref:d,style:C.value,class:`${P("slider-runway")}`,onClick:V},[a.createVNode("div",{style:N.value,class:[`${P("slider-bar")}`,e.vertical?"vertical":"horizontal",{disable:e.disable}]},null),e.showInterval?w.value.map((G,U)=>U===0||U===w.value.length-1?null:a.createVNode("div",{key:U,style:R(G),class:[`${P("slider-interval")}`,{vertical:e.vertical}],onClick:te=>B(te,G)},null)):null,e.customContent?E.value.map((G,U)=>U===0||U===E.value.length-1?null:a.createVNode("div",{key:U,style:R(G.percent),class:[`${P("slider-interval")}`,{vertical:e.vertical}],onClick:te=>B(te,G)},null)):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?a.createVNode("div",{class:[`${P("slider-labels")}`,e.vertical?"vertical":"horizontal"]},[function(){if(e.showBetweenLabel)return[a.createVNode("div",{style:[{opacity:A("start")}],class:"label-start"},[e.formatterLabel(e.minValue)]),a.createVNode("div",{style:[{opacity:A("end")}],class:"label-end"},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return S.value.map((G,U)=>a.createVNode("div",{key:U,style:R(G.stepWidth),class:[`${P("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:te=>B(te,G)},[G.stepLabel]));if(e.customContent)return E.value.map((G,U)=>a.createVNode("div",{key:U,style:R(G.percent),class:[`${P("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:te=>B(te,G)},[G.label]))}()]):void 0,a.createVNode(rm,{ref:f,modelValue:s.value,"onUpdate:modelValue":G=>s.value=G,params:T.value,onEmitChange:I,onResetSize:O},null),e.range?a.createVNode(rm,{ref:u,modelValue:i.value,"onUpdate:modelValue":G=>i.value=G,params:T.value,onEmitChange:I,onResetSize:O},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:`${P("slider-input")}`},[a.createVNode("div",{class:"input-item"},[a.createVNode(hr,{max:e.maxValue,min:e.minValue,modelValue:l.value,type:"number",onChange:j},null)]),x.value&&i.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("~")]),a.createVNode("div",{class:"input-item"},[a.createVNode(hr,{max:e.maxValue,min:e.minValue,modelValue:c.value,type:"number",onChange:H},null)])]:void 0]):void 0,(k=t.end)==null?void 0:k.call(t)])}}},render(){return this.renderDom()}}),Yv=Ie(EA);var Xv=function(e){return e.ERROR="error",e.LOADING="loading",e.UNKNOWN="",e}(Xv||{});const am={theme:m.theme().def(po.PRIMARY),size:m.size(),curStep:m.number.def(1),controllable:m.bool.def(!1),direction:Jm(),status:xe("status",{}).def(Xv.UNKNOWN),lineType:Zm(),extCls:m.string,steps:m.array.def([]),beforeChange:m.func},OA=a.defineComponent({name:"Steps",props:am,emits:["update:curStep","click"],setup(e,{emit:t}){const n=Be("steps"),r=Be("lang"),s=a.ref([]),i=f=>{const u=[];f.forEach(h=>{typeof h=="string"?u.push(h):u.push({title:h.title,icon:h.icon,description:h.description,status:h.status,border:h.border??!0})}),s.value.splice(0,s.value.length,...u)},o=f=>{am.curStep=f},l=()=>{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&&i(e.steps)};a.watch(()=>r.value,()=>{l()});const c=async f=>{try{e.controllable&&f!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(u,h)=>{const p=await e.beforeChange(f);p?u(p):h(p)}),t("update:curStep",f),t("click",f))}catch(u){console.warn(u)}};a.onMounted(l),a.watch(()=>e.steps,()=>{i(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{o(e.curStep)},{deep:!0});const{resolveClassName:d}=he();return{defaultSteps:s,jumpTo:c,resolveClassName:d}},render(){const e=this.resolveClassName("steps"),t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",r=Ae({[`${this.extCls}`]:!!this.extCls,[`${this.resolveClassName(`steps-${this.direction}`)}`]:this.direction,[`${this.resolveClassName(`steps-${this.lineType}`)}`]:this.lineType},`${t} ${e} ${n}`),s=u=>this.curStep>u+1||this.defaultSteps[u].status==="done",i=u=>this.curStep===u+1,o=u=>{const{icon:h}=u;return h?Object.prototype.toString.call(h)==="[object Object]":typeof u=="string"},l=(u,h)=>(h.icon||(h.icon=u),!isNaN(h.icon)),c=u=>u.status==="loading",d=u=>u.status==="error",f=(u,h)=>i(u)&&this.status==="loading"||c(h)?a.createVNode(Is,{class:`${this.resolveClassName("icon")} ${this.resolveClassName("steps-icon")} icon-loading`},null):i(u)&&this.status==="error"||d(h)?a.createVNode(wt,{class:`${this.resolveClassName("steps-icon")}`},null):s(u)?a.createVNode(zr,{class:`${this.resolveClassName("steps-icon")}`},null):a.createVNode("span",null,[l(u,h)?u+1:a.createVNode(h.icon,null,null)]);return a.createVNode("div",{class:r},[this.defaultSteps.map((u,h)=>{var p,g;return a.createVNode("div",{class:[this.resolveClassName("step"),u.title?"":this.resolveClassName("step-no-content"),s(h)?"done":"",i(h)?"current":"",i(h)&&this.status==="error"?"is-error":"",u.status&&i(h)?[`${this.resolveClassName(`step-${u.status}`)}`]:""]},[a.createVNode("span",{style:{cursor:this.controllable?"pointer":""},class:[`${this.resolveClassName("step-indicator")}`,`${this.resolveClassName(`step-${o(u)?"icon":"number"}`)}`,`${this.resolveClassName(`step-icon${u.status}`)}`],onClick:()=>{this.jumpTo(h+1)}},[((g=(p=this.$slots)[h+1])==null?void 0:g.call(p))??f(h,u)]),u.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(h+1)}},[u.title]),u.description&&a.createVNode("div",{class:`${this.resolveClassName("step-description")}`,title:u.description},[u.description])]):""])})])}}),Jv=Ie(OA),AA=a.defineComponent({name:"Swiper",props:{isLoop:m.bool.def(!0),loopTime:m.number.def(8e3),pics:m.array.def([]),list:m.array.def([]),height:m.number,width:m.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:r,loopTime:s,pics:i,list:o,height:l,width:c}=a.toRefs(e),d=a.ref(),f=a.ref(0),u=a.ref(0),h=a.ref(0),p=a.ref(0);let g;const{resolveClassName:v}=he(),b=a.computed(()=>{var R;return((R=o.value)==null?void 0:R.length)>0?o.value:i.value}),y=a.computed(()=>({width:`${u.value*b.value.length}px`,transform:`translateX(-${u.value*f.value}px)`})),N=a.computed(()=>({width:`${u.value}px`,height:`${h.value}px`})),w=R=>{let M=R;R>=b.value.length&&(M=0),R<0&&(M=b.value.length-1),f.value=M,t("index-change",M)},C=R=>{R&&window.open(R,"_blank")},S=R=>[`${v("swiper-img")}`,{[`${v("swiper-link")}`]:R.link},R.class],x=R=>({"background-image":`url(${R.url})`,"background-color":R.color}),E=R=>({[`${v("current-index")}`]:f.value===R}),T=()=>{r.value&&(p.value=window.setTimeout(()=>{w(f.value+1),T()},s.value))},O=()=>{window.clearTimeout(p.value)},V=()=>{var M;const R=(M=d.value)==null?void 0:M.parentElement;!R||!window.ResizeObserver||(g=new ResizeObserver(()=>{I()}),g.observe(R))},_=()=>{var R;(R=g.disconnect)==null||R.call(g)},L=R=>{if(R===void 0)return{height:0,width:0};const M=getComputedStyle(R),j=R.clientWidth-parseFloat(M.paddingTop)-parseFloat(M.paddingBottom);return{height:R.clientHeight-parseFloat(M.paddingLeft)-parseFloat(M.paddingRight),width:j}},I=()=>{var M;const R=L((M=d.value)==null?void 0:M.parentElement);u.value=+c.value>0?c.value:R.width,h.value=+l.value>0?l.value:R.height};return a.watch([l,c],I),a.onMounted(()=>{I(),T(),V()}),a.onBeforeUnmount(()=>{O(),_()}),()=>a.createVNode("section",{ref:d,style:N.value,class:`${v("swiper-home")}`},[a.createVNode("hgroup",{style:y.value,class:`${v("transition")} ${v("swiper-main")}`},[b.value.map(R=>{var M;return a.createVNode("h3",{style:N.value,class:`${v("swiper-card")}`},[((M=n.default)==null?void 0:M.call(n,R))??a.createVNode("span",{style:x(R),class:S(R),onClick:()=>C(R.link)},null)])})]),a.createVNode("ul",{class:`${v("swiper-index")}`},[b.value.map((R,M)=>a.createVNode("li",{class:E(M),onMouseover:()=>w(M)},null))]),a.createVNode("span",{class:`${v("swiper-nav")} ${v("nav-prev")}`,onClick:()=>w(f.value-1)},[a.createVNode("i",{class:`${v("swiper-nav-icon")}`},null)]),a.createVNode("span",{class:`${v("swiper-nav")} ${v("nav-next")}`,onClick:()=>w(f.value+1)},[a.createVNode("i",{class:`${v("swiper-nav-icon")}`},null)])])}}),Zv=Ie(AA),LA={theme:R8(),size:m.size(),disabled:m.bool,showText:m.bool,isOutline:m.bool,onText:m.string.def("ON"),offText:m.string.def("OFF"),isSquare:m.bool,extCls:m.string,beforeChange:m.func.def(void 0),trueValue:m.oneOfType([m.string,m.number,m.bool]).def(!0),falseValue:m.oneOfType([m.string,m.number,m.bool]).def(!1),value:m.oneOfType([m.string,m.number,m.bool]).def(!1),modelValue:m.oneOfType([m.string,m.number,m.bool]).def(!1),withValidate:m.bool.def(!0)};let ro=function(e){return e.CHANGE="change",e.UPDATE="update:modelValue",e}({});function VA(e){return e}function DA(e){return!!e}const kA={[ro.UPDATE]:VA,[ro.CHANGE]:DA},RA=a.defineComponent({name:"Switcher",props:LA,emits:kA,setup(e,{emit:t}){const n=on(),{resolveClassName:r}=he(),s=a.ref(!1),i=a.computed(()=>e.trueValue===l.value),o=a.ref(e.modelValue!==!1),l=a.computed(()=>o.value?e.modelValue:e.value),c=a.computed(()=>{const u={[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":i.value,"is-unchecked":!i.value,"is-loading":s.value,[`${r("primary")}`]:e.theme==="primary"};if(e.size&&!e.showText){const h=`${r(`switcher-${e.size}`)}`;u[h]=!0}return u});a.watch(()=>e.modelValue,()=>{var u;o.value=!0,e.withValidate&&((u=n==null?void 0:n.validate)==null||u.call(n,"change"))}),a.watch(()=>e.value,()=>{o.value=!1});const d=u=>{if(u.stopPropagation(),u.preventDefault(),e.disabled||s.value)return;const h=i.value?e.falseValue:e.trueValue,p=!i.value,g=()=>{t(ro.UPDATE,h),t(ro.CHANGE,p)};let v=!0;if(typeof e.beforeChange=="function"&&(v=e.beforeChange(h),typeof v.then=="function"))return s.value=!0,v.then(()=>{g()}).finally(()=>{s.value=!1});v&&g()},f=u=>{(u.code==="Enter"||u.key==="Enter"||u.keyCode===13)&&d(u)};return()=>a.createVNode("div",{class:c.value,tabindex:"0",onClick:d,onKeydown:f},[s.value?a.createVNode(Xo,{class:`${r("switcher-loading")}`},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[i.value?e.onText:e.offText]):""])}}),Qv=Ie(RA);var ao=(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))(ao||{}),is=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e))(is||{});const e4=xe("position",{}).def("top");var t4=(e=>(e.INSERT="insert",e.REPLACE="replace",e))(t4||{});const n4=xe("sortType",{}).def("replace"),IA={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},PA={name:m.oneOfType([m.number,m.string]).def(""),label:m.string||m.func,tips:m.string,closable:m.bool,visible:m.bool.def(!0),disabled:m.bool,sortable:m.bool,renderDirective:mo(),panel:m.string||m.func,num:m.number.def(void 0),numDisplayType:m.string.def("default")},MA={active:m.oneOfType([m.number,m.string]).def(""),type:xe("type",{}).def("border-card"),tabPosition:e4,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:n4,labelHeight:m.number.def(50),extCls:m.string.def(""),validateActive:m.bool.def(!0),activeBarSize:m.number.def(2),activeBarColor:m.string.def("#3a84ff"),beforeChange:{type:Function}},$A={active:m.oneOfType([m.number,m.string]).def(""),type:xe("type",{}).def("border-card"),activeBarColor:m.string.def("#3a84ff"),activeBarSize:m.number.def(2),panels:{type:Array,default:()=>[]},tabPosition:e4,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:n4,labelHeight:m.number.def(50),validateActive:m.bool.def(!0),...IA},sm=a.defineComponent({name:"TabNav",directives:{bkTooltips:Dn},props:$A,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([is.LEFT,is.RIGHT].includes(e.tabPosition)){const{clientHeight:h,offsetTop:p}=t.value,g={width:`${e.activeBarSize}px`,height:`${h}px`,top:`${p}px`,background:e.activeBarColor};return e.tabPosition===is.LEFT?g.right=0:g.left=0,g}if(e.type===ao.UNBORDER_CARD){const{clientWidth:h,offsetLeft:p}=t.value;return{width:`${h}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 u=!1;return e.panels.filter((p,g)=>{if(!p.props)return null;const{name:v,label:b,num:y,closable:N,visible:w,disabled:C,sortable:S,tips:x,numDisplayType:E}=p.props;if(!w)return!1;e.active===v&&(u=!0);const T=O=>p.slots.label?a.h(p.slots.label):[void 0,""].includes(O)?`选项卡${g+1}`:typeof O=="string"?O:typeof O=="function"?a.h(O):O;return f.push({name:v,closable:N,visible:w,disabled:C,sortable:S,tips:x,numDisplayType:E,tabLabel:T(b),tabNum:y}),!0}),!u&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),f}),s=a.ref(-1),i=a.ref(-1),o=a.ref(""),l=(f,u)=>f===u,c={handleTabAdd(f){e.tabAdd(f)},dragstart(f,u){i.value=f,o.value=e.guid,Object.assign(u.dataTransfer,{effectAllowed:"move"}),e.tabDrag(f,u)},dragenter(f){l(o.value,e.guid)&&(s.value=f)},dragend(){s.value=-1,i.value=-1,o.value=null},drop(f,u){if(!l(o.value,e.guid))return!1;e.tabSort(i.value,f,u)},handleTabChange(f){e.tabChange(f)},handleTabRemove(f,u){e.tabRemove(f,u)}},{resolveClassName:d}=he();return{...c,activeRef:t,activeBarStyle:n,tableNavList:r,dragenterIndex:s,dragStartIndex:i,draggingEle:o,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4),resolveClassName:d}},render(){const{active:e,closable:t,addable:n,sortable:r,sortType:s,labelHeight:i,dragstart:o,dragenter:l,dragend:c,drop:d}=this,f=()=>this.tableNavList.map((v,b)=>{if(!v)return null;const{name:y,disabled:N,tabLabel:w,tabNum:C,numDisplayType:S}=v,x=()=>{const V=[this.resolveClassName("tab-header-item")];return N&&V.push(this.resolveClassName("tab-header--disabled")),e===y&&V.push(this.resolveClassName("tab-header--active")),V.join(" ")},E=(V,_)=>!N&&(V||_),T=(V,_)=>E(V.closable,t)?a.createVNode("span",{class:this.resolveClassName("tab-header--close"),onClick:()=>this.handleTabRemove(_,V)},[a.createVNode(Vt,null,null)]):"",O=()=>["bracket"].includes(S)?`(${C})`:C;return a.withDirectives(a.createVNode("div",{key:y,ref:e===y?"activeRef":"tabLabelRef",class:x(),draggable:E(v.sortable,r),onClick:()=>!N&&this.handleTabChange(y),onDragend:V=>{V.preventDefault(),c()},onDragenter:V=>{V.preventDefault(),l(b)},onDragleave:V=>{V.preventDefault()},onDragover:V=>{V.preventDefault()},onDragstart:V=>o(b,V),onDrop:V=>{V.preventDefault(),d(b,s)}},[isNaN(C)?a.createVNode("div",null,[w]):a.createVNode("div",{class:this.resolveClassName("tab-header--has-num")},[a.createVNode("div",{class:this.resolveClassName("tab-header--has-num-left")},[w]),a.createVNode("div",{class:this.resolveClassName("tab-header--has-num-right")},[a.createVNode("div",{class:this.resolveClassName(`tab-header--has-num-${S}`)},[O()]),T==null?void 0:T(v,b)])]),isNaN(C)?T==null?void 0:T(v,b):""]),[[a.resolveDirective("bk-tooltips"),{content:v.tips||"",disabled:!v.tips}]])}),u=()=>{var b,y;const v=[];return typeof this.$slots.add=="function"?v.push((y=(b=this.$slots).add)==null?void 0:y.call(b,a.h)):n&&v.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(Hs,{style:"display:flex;",width:26,height:26},null)])),v.length?a.createVNode("div",{class:this.resolveClassName("tab-header-operation")},[v.map((N,w)=>a.createVNode("div",{key:w,class:this.resolveClassName("tab-header-item")},[N]))]):null},h=()=>this.type===ao.UNBORDER_CARD?a.createVNode("div",{style:this.activeBarStyle,class:this.resolveClassName("tab-header-active-bar")},null):"",p=typeof this.$slots.setting=="function"?a.createVNode("div",{class:this.resolveClassName("tab-header-setting")},[this.$slots.setting()]):null,g=u();return a.createVNode("div",{style:{lineHeight:`${i}px`},class:this.resolveClassName("tab-header")},[a.createVNode("div",{class:[this.resolveClassName("tab-header-nav"),g||p?"tab-header-auto":""]},[h(),f()]),g,p])}}),FA=a.defineComponent({name:"Tab",components:{TabNav:sm},props:MA,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([]),i=a.getCurrentInstance(),o=(f,u=[])=>{const{children:h}=f;return(h||[]).forEach(p=>{let{type:g}=p;g=g.name||g,g==="TabPanel"&&p.component?u.push(p.component):(g===a.Fragment||g==="template")&&o(p,u)}),u},l=()=>{if(t.default){const{children:f}=i.subTree.children[1];if(!f)return;const u=f[0],h=o(u);h.length!==s.value.length&&(s.value=h)}};a.onMounted(()=>{l(),r.value=!0,a.onUpdated(()=>{l()})});const c={tabAdd(f){n("add",{e:f}),n("add-panel",{e:f})},tabChange(f){var u;(((u=e.beforeChange)==null?void 0:u.call(e,f))??!0)&&(n("change",f),n("tab-change",f),n("update:active",f))},tabRemove(f,u){n("remove",f,u),n("remove-panel",f,u)},tabSort(f,u,h){const p=s.value;if(h===t4.INSERT)if(f<u)p.splice(u+1,0,s[f]),p.splice(f,1);else if(f>u)p.splice(u,0,s[f]),p.splice(f+1,1);else return!1;else{const g=p[u];p[u]=p[f],p[f]=g}s.value=[...p],n("sort",f,u,h),n("sort-change",f,u,h)},tabDrag(f,u){n("drag",f,u),n("on-drag-tab",f,u)}},{resolveClassName:d}=he();return{...c,isMounted:r,panels:s,resolveClassName:d}},render(){var n,r;const e=()=>{const s=[this.resolveClassName("tab"),this.extCls];return this.tabPosition===is.TOP?s.push(this.resolveClassName(`tab--${this.tabPosition}`),this.resolveClassName(`tab--${this.type}`)):(s.push(this.resolveClassName(`tab--${this.tabPosition}`)),this.type===ao.CARD_TAB&&s.push(this.resolveClassName("tab--vertical-tab"))),s},t=()=>{const{panels:s,active:i,type:o,closable:l,addable:c,sortable:d,sortType:f,labelHeight:u,validateActive:h,tabPosition:p,activeBarSize:g,activeBarColor:v,tabAdd:b,tabChange:y,tabRemove:N,tabSort:w,tabDrag:C}=this,S={panels:s,active:i,type:o,closable:l,addable:c,sortable:d,sortType:f,labelHeight:u,validateActive:h,tabPosition:p,activeBarSize:g,activeBarColor:v,tabAdd:b,tabChange:y,tabRemove:N,tabSort:w,tabDrag:C};return!s||!Array.isArray(s)?null:a.createVNode(sm,S,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)])])}}),HA=a.defineComponent({name:"TabPanel",props:PA,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}=he();return a.withDirectives(a.createVNode("div",{ref:"content",class:n("tab-panel")},[t()]),[[a.vShow,e]])}}),r4=St(FA,{TabPanel:HA});var a4=(e=>(e.COL="col",e.HORIZONTAL="horizontal",e.NONE="none",e.OUTER="outer",e.ROW="row",e))(a4||{}),s4=(e=>(e.AUTO="auto",e.HIGHLIGHT="highlight",e))(s4||{});const BA=["auto","highlight"],zA=["none","row","col","outer","horizontal"],De={ROW_INDEX:"row_index",ROW_UID:"row_id",ROW_EXPAND:"row_expand",ROW_SELECTION:"row_selection",ROW_SELECTION_INDETERMINATE:"row_selection_indeterminate",ROW_SPAN:"row_span",ROW_HEIGHT:"row_height"},be={COL_UID:"col_$uuid",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_RESIZEABLE:"col_resizeable",COL_FIXED_STYLE:"col_fixed_style",COL_RECT:"col_rect",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"},i4=8,lr=42;var gl=(e=>(e.DEF1="def1",e.DEF2="def2",e))(gl||{});const o4={def1:"#FAFBFD",def2:"#F0F1F5"},os={large:78,medium:60,small:42},jA=e=>[{value:"small",label:e.value.setting.lineHeight.small,height:os.small},{value:"medium",label:e.value.setting.lineHeight.medium,height:os.medium},{value:"large",label:e.value.setting.lineHeight.large,height:os.large}],l4=Symbol("bkInitColumns"),UA=60;var ct=(e=>(e.ASC="asc",e.CUSTOM="custom",e.DESC="desc",e.NULL="null",e))(ct||{});const WA=["asc","desc","null","custom"],Qr=80,Tr={},qA={};xe("showOverflowTooltipMode",{default:"auto"});const GA=xe("columnType",{default:"__COL_TYPE_NONE"}),Xf=xe("columnType",{default:""});xe("full",{default:"full"});xe("columnSize",{default:"small"});const KA=bt(),Dh=xe("IOverflowTooltipPropType",{default:!1,type:[Boolean,Object]}),YA=xe("ISortPropShape",{default:!1,type:[Boolean,String,Object]}),XA=xe("IFilterPropShape",{default:!1,type:[Boolean,Object]});var c4=(e=>(e.DEBOUNCE="debounce",e.THROTTLE="throttle",e))(c4||{});const vl=xe("IColumnType",{default:{width:"100%",label:""},type:[Object]}),JA=xe("ITableSettingPropType",{default:!1,type:[Boolean,Object]}),yf=xe("LabelFunctionStringType",{}),ZA=xe("RenderFunctionStringType",{}),im=xe("SpanFunctionStringType",{}),QA=xe("RowClassFunctionStringType",{}),eL=xe("RowHeightFunctionNumberType",{});xe("FunctionNumberType",{});const Mi=e=>xe("StringNumberType",{}).def(e);xe("IColumnPropType",{default:{label:void 0,minWidth:Qr},type:[Object]});var u4=(e=>(e.independent="independent",e.interdependent="interdependent",e))(u4||{});const tL={data:m.arrayOf(m.any).def([]),columns:m.arrayOf(vl).def([]),activeColumn:m.oneOfType([m.number.def(-1),m.arrayOf(m.number.def(-1))]),columnPick:xe("columnPick",{}).def("disabled"),height:Mi("auto"),stripe:m.bool.def(!1),minHeight:Mi(lr),maxHeight:Mi("auto"),rowHeight:eL,headHeight:m.number.def(lr),showHead:m.bool.def(!0),sortValFormat:m.arrayOf(m.any).def([""]),thead:xe("ITheadType",{}).def({color:gl.DEF1,height:lr,isShow:!0}),virtualEnabled:m.bool.def(!1),border:m.oneOfType([m.arrayOf(xe("boderType",{})),m.string]).def([a4.ROW]),pagination:m.oneOfType([m.bool.def(!1),m.object.def({})]).def(!1),paginationHeight:m.number.def(UA),remotePagination:m.bool.def(!1),acrossAll:m.bool.def(!1),emptyText:m.string,emptyCellText:m.oneOfType([m.string,m.func]).def(""),isEmptyCell:m.oneOfType([m.arrayOf(bt),m.arrayOf(null),m.arrayOf(void 0),m.func]).def(["",void 0,null]),settings:JA,rowClass:m.oneOfType([m.string,m.object,m.func]).def({}),rowStyle:m.oneOfType([m.string,m.object,m.func]).def({}),cellStyle:m.oneOfType([m.string,m.object,m.func]).def({}),cellClass:m.oneOfType([m.string,m.object,m.func]).def({}),scrollLoading:m.oneOfType([m.object,m.bool]).def(void 0),reserveExpand:m.bool.def(!1),selectionKey:m.string.def(""),checked:m.array.def([]),isSelectedFn:m.func.def(void 0),rowKey:m.oneOfType([m.string,m.func]).def(De.ROW_INDEX),showOverflowTooltip:Dh,asyncData:m.bool.def(!1),rowHover:m.oneOf(BA).def(s4.HIGHLIGHT),defaultSort:m.shape({}).def({}),isRowSelectEnable:m.oneOfType([m.func.def(()=>!0),m.bool.def(!0)]).def(!0),resizerWay:xe("ResizerWay",{default:"debounce"}),observerResize:m.bool.def(!0),intersectionObserver:m.bool.def(!1),align:Xf,headerAlign:Xf,prependStyle:m.style().def({}),colSortBehavior:xe("IColSortBehavior",{default:"independent"}),isFlex:m.bool.def(!0),rowDraggable:m.oneOfType([m.func,m.bool,m.object]).def(!1),shiftMultiChecked:m.bool.def(!1),scrollbar:m.bool.def(!0),fixedBottom:xe("FixedBottomOption",{default:{position:"relative",height:lr}}).def(null),appendLastRow:xe("AppendLastRowOption",{default:{type:"default",cellRender:void 0}})},nL={label:yf,field:yf,render:ZA,width:m.oneOfType([m.number,m.string]),minWidth:Mi(Qr),columnKey:m.string.def(""),showOverflowTooltip:Dh,type:GA,resizable:m.bool.def(!0),fixed:m.oneOfType([m.bool,KA]).def(!1),sort:YA,filter:XA,colspan:im.def(1),rowspan:im.def(1),align:Xf,className:QA,prop:yf,index:m.number.def(void 0)},rL=a.defineComponent({name:"TableColumn",props:nL,setup(e,{}){const t=a.inject(l4,()=>{}),n={},r=(s,i)=>{const o=a.toRaw(i);return Object.keys(o).every(c=>typeof o[c]=="function"?s[c]!==void 0:c==="children"?!0:ch(s[c],i[c]))};a.watch(()=>[e],()=>{r(n,e)||(t(),Object.assign(n,a.toRaw(e)))},{immediate:!0,deep:!0}),a.onUnmounted(()=>{t()})},render(){var e,t;try{const r=[(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{},column:{},$index:-1})];return a.h("div",r)}catch{return a.h("div",[])}}});var Xe=(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))(Xe||{});const aL=e=>!0,sL=e=>!0,iL=e=>!0,oL=e=>!0,Ci=(e,t,n,r,s)=>!0,lL=e=>!0,cL=e=>!0,uL=e=>!0,dL=e=>!0,om=e=>!0,fL=e=>!0,lm=e=>!0,hL=e=>!0,mL=e=>!0,pL={columnPick:aL,columnFilter:sL,columnSort:oL,colFilterSave:iL,rowClick:Ci,rowDblclick:Ci,rowExpand:lL,select:cL,selectAll:uL,selectionChange:dL,pageLimitChange:om,pageValueChange:om,settingChange:fL,scrollBottom:hL,cellClick:lm,cellDblclick:lm,rowMouseEnter:Ci,rowMouseLeave:Ci,dragend:mL},gL=(e,{afterResize:t})=>{const{getColumnAttribute:n,getColumnOrderWidth:r,setColumnAttribute:s,setNextColumnWidth:i,getPreColumn:o}=e,l=B=>n(B,be.LISTENERS),c="HeadColumnResize";let d=function(B){return B.MOUSE_DOWN="onMousedown",B.MOUSE_MOVE="onMousemove",B.MOUSE_OUT="onMouseout",B}({}),f=!1,u=!1,h=!1,p=0,g=null,v="right",b=null,y=null,N=0;const w=new WeakMap,C=a.ref(-1e3),S=[be.WIDTH],x=B=>{B.stopImmediatePropagation(),B.stopPropagation(),B.preventDefault()},E=B=>{x(B),u=!1,h=!1;const z=r(g,S)+N,D=r(g,[be.COL_MIN_WIDTH]),k=z>D?z:D;i(g,k),s(g,be.WIDTH,k),document.removeEventListener("mouseup",E),C.value=-1e3,N=0,_(b),t==null||t(),b=null;const G=B.target;M(G),g=null},T=Fr(B=>{C.value=C.value+B}),O=B=>{x(B),document.body.style.setProperty("user-select","none");const z=B.clientX-p;N=N+z,p=B.clientX;const D=r(g,S)+z;r(g,[be.COL_MIN_WIDTH])<D&&T(z)},V=gr(B=>{document.body.style.setProperty("user-select","none"),B==null||B.classList.add("col-resize-hover")}),_=B=>{V.cancel(),document.body.style.removeProperty("user-select"),B==null||B.classList.remove("col-resize-hover")},L=B=>{if(!f)return;I(B.target),p=B.clientX;const z=v==="left"?o(y):y;s(z,be.COL_IS_DRAG,!0),g=z,b=B.target.closest("table");const D=b.getBoundingClientRect();C.value=B.clientX-D.left,V(b),u=!0,document.addEventListener("mouseup",E)},I=B=>{var D,k;((k=(D=B==null?void 0:B.parentElement)==null?void 0:D.parentElement)==null?void 0:k.querySelectorAll(".col-pointer-hover")).forEach(G=>{G==null||G.classList.remove("col-pointer-hover"),G==null||G.classList.remove("poiner-left"),G==null||G.classList.remove("poiner-right")})},R=(B,z)=>{const D=B.parentElement;D==null||D.classList.add("col-pointer-hover"),D==null||D.classList.add(`poiner-${z}`);const k=z==="right"?D.nextElementSibling:D.previousElementSibling,G=z==="right"?"left":"right";k==null||k.classList.add("col-pointer-hover"),k==null||k.classList.add(`poiner-${G}`)},M=B=>{h||(C.value=-1e3,B.classList.remove("cell-resize"),I(B),w.set(B,!1),document.removeEventListener("mousedown",L))},j={[d.MOUSE_MOVE]:(B,z,D)=>{if(x(B),u){h=!0,O(B);return}const k=B.target;if(!h){if(!k)return;const{offsetWidth:G}=k,U=B.offsetX;G>12&&(G-U<8||U<8&&D>0)?(f=!0,v=U<8?"left":"right",w.get(k)||(w.set(k,!0),k.classList.add("cell-resize"),R(k,v),y=z,document.addEventListener("mousedown",L))):(f=!1,M(k))}},[d.MOUSE_OUT]:(B,z,D)=>{const k=B.target;M(k)}},H=B=>`${c}_${B}`,A=()=>{e.tableColumnList.forEach(B=>{if(e.getColumnAttribute(B,be.COL_RESIZEABLE)){const z=l(B);Object.keys(j).forEach(D=>{const k=H(D);z!=null&&z.has(k)||z.set(k,[]),z.get(k).push(j[D])})}})},P=()=>{e.tableColumnList.forEach(B=>{const z=l(B);Object.keys(j).forEach(D=>{const k=H(D);if(z!=null&&z.has(k)){const G=z.get(k);G.length=0}})})};return a.watch(()=>[e.tableColumnList],()=>{P(),A()},{immediate:!0,deep:!0}),{dragOffsetX:C}},vL=()=>{const e=[];let t=0;const n=new WeakMap,r=d=>a.isRef(d)?a.unref(d):a.toRaw(d),s=d=>Object.keys(d??{}).reduce((f,u)=>{const h=u.replace(/-(\w)/g,(p,g)=>g.toUpperCase());return Object.assign(f,{[h]:r(d[u])})},{}),i=d=>(n.has(d)||n.set(d,rn()),n.get(d)),o=(d,f,u)=>{var h,p;if((h=d==null?void 0:d.component)!=null&&h.subTree){l((p=d==null?void 0:d.component)==null?void 0:p.subTree,f);return}if(typeof d=="function")return d();if(Array.isArray(d)){d.forEach(g=>l(g,f));return}if(Array.isArray(d==null?void 0:d.children)){d.children.forEach(g=>l(g,f));return}if(!u&&a.isVNode(d)&&(d!=null&&d.children)&&typeof(d==null?void 0:d.children)=="object"){Object.keys(d.children).forEach(g=>l(d.children[g],f));return}},l=(d,f)=>{var h,p,g;let u=f;if(!(!d||((h=d.type)==null?void 0:h.name)==="Table")){if(((p=d.type)==null?void 0:p.name)==="TableColumn"){const v=Object.assign({index:t},s(d.props),{field:d.props.prop||d.props.field,render:d.props.render??((g=d.children)==null?void 0:g.default),uniqueId:i(d),children:[]}),b=(f==null?void 0:f.children)??e;b.some(y=>y.uniqueId===v.uniqueId)||(b.push(v),t=t+1,d.children&&o(d,v,!0));return}o(d,u)}};return{resolveColumns:d=>{var u,h,p,g;e.length=0,t=0;const f=d==null?void 0:d.find(v=>{var b;return((b=v.type)==null?void 0:b.name)==="GhostBody"});return f&&((u=f.component)!=null&&u.subTree?l((h=f.component)==null?void 0:h.subTree):(((g=(p=f.children)==null?void 0:p.default)==null?void 0:g.call(p))??[]).forEach(v=>l(v))),e.sort((v,b)=>v.index-b.index),e}}};var d4=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(s,i){return s[0]===n?(r=i,!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,i=this.__entries__;s<i.length;s++){var o=i[s];n.call(r,o[1],o[0])}},t}()}(),Jf=typeof window<"u"&&typeof document<"u"&&window.document===document,so=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")()}(),yL=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(so):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),bL=2;function wL(e,t){var n=!1,r=!1,s=0;function i(){n&&(n=!1,e()),r&&l()}function o(){yL(i)}function l(){var c=Date.now();if(n){if(c-s<bL)return;r=!0}else n=!0,r=!1,setTimeout(o,t);s=c}return l}var CL=20,NL=["top","right","bottom","left","width","height","size","weight"],xL=typeof MutationObserver<"u",SL=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=wL(this.refresh.bind(this),CL)}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(){!Jf||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),xL?(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(){!Jf||!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=NL.some(function(i){return!!~r.indexOf(i)});s&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),f4=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},Na=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||so},h4=yl(0,0,0,0);function io(e){return parseFloat(e)||0}function cm(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,s){var i=e["border-"+s+"-width"];return r+io(i)},0)}function TL(e){for(var t=["top","right","bottom","left"],n={},r=0,s=t;r<s.length;r++){var i=s[r],o=e["padding-"+i];n[i]=io(o)}return n}function _L(e){var t=e.getBBox();return yl(0,0,t.width,t.height)}function EL(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return h4;var r=Na(e).getComputedStyle(e),s=TL(r),i=s.left+s.right,o=s.top+s.bottom,l=io(r.width),c=io(r.height);if(r.boxSizing==="border-box"&&(Math.round(l+i)!==t&&(l-=cm(r,"left","right")+i),Math.round(c+o)!==n&&(c-=cm(r,"top","bottom")+o)),!AL(e)){var d=Math.round(l+i)-t,f=Math.round(c+o)-n;Math.abs(d)!==1&&(l-=d),Math.abs(f)!==1&&(c-=f)}return yl(s.left,s.top,l,c)}var OL=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Na(e).SVGGraphicsElement}:function(e){return e instanceof Na(e).SVGElement&&typeof e.getBBox=="function"}}();function AL(e){return e===Na(e).document.documentElement}function LL(e){return Jf?OL(e)?_L(e):EL(e):h4}function VL(e){var t=e.x,n=e.y,r=e.width,s=e.height,i=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,o=Object.create(i.prototype);return f4(o,{x:t,y:n,width:r,height:s,top:n,right:t+r,bottom:s+n,left:t}),o}function yl(e,t,n,r){return{x:e,y:t,width:n,height:r}}var DL=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=yl(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=LL(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}(),kL=function(){function e(t,n){var r=VL(n);f4(this,{target:t,contentRect:r})}return e}(),RL=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new d4,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 Na(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new DL(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 Na(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 kL(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}(),m4=typeof WeakMap<"u"?new WeakMap:new d4,p4=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=SL.getInstance(),r=new RL(t,n,this);m4.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){p4.prototype[e]=function(){var t;return(t=m4.get(this))[e].apply(t,arguments)}});var IL=function(){return typeof so.ResizeObserver<"u"?so.ResizeObserver:p4}();const ot=(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=>ot(e,r,n)).filter(r=>r!==void 0).at(0)}},PL=e=>kr(e,"auto"),kr=(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},ML=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>zA.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},g4=(e,t,n=60,r=!1,s="throttle")=>{const i=()=>{typeof t=="function"&&t()},o=s==="debounce"?gr(i,n):ep(i),l=()=>Reflect.apply(o,void 0,[]),c=new IL(()=>{l()});return r&&typeof t=="function"&&t(),{start:()=>{c.observe(e)},disconnect:()=>{c.unobserve(e),c.disconnect()}}},kh=e=>{const{showHead:t,headHeight:n,thead:r={}}=e;return Object.assign({},{isShow:t,height:n},r)},$L=(e,t="ig")=>new RegExp(`${e}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),t),oo=(e,t,n)=>{let r;return(typeof e=="string"||typeof e=="number"||typeof e=="boolean")&&(r=e),typeof e=="object"&&(r=pl(e,t)),n!=null&&n.length&&(n.forEach(s=>{if(typeof s=="function")r=s(r,e,t);else if(typeof r=="string"){const i=r.match(typeof s=="string"?$L(s):s);r=(i==null?void 0:i[1])??r}}),/^-?\d+.?\d*$/.test(r)&&(r=Number(r))),r},FL=(e,t)=>pl(e,t),Yr=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Yr(Reflect.apply(e,void 0,t),t):[],HL=(e,t,n)=>{const r=BL(e,t,n);return r!==null?r:rn()},BL=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===De.ROW_INDEX?`__ROW_INDEX_${n}`:t.rowKey:typeof t.rowKey=="function"?Reflect.apply(t.rowKey,void 0,[e]):null,um=(e,t,n)=>{const r=i=>i.field??i.id;return(i=>e.some(o=>r(o)===ot(i,["field","type"],[i])))(t)&&n.length&&!n.includes(ot(t,["field","type"],[t]))},lo=(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,zL=(e,t,n,r)=>{const s=lo(e,t,n,r,"colspan"),i=lo(e,t,n,r,"rowspan");return{colspan:s,rowspan:i}},v4=(e,t,n=[])=>{var d,f;const r=e.field,s=u=>oo(u,r,n),i=e.type==="index",o=(u,h,p,g)=>{const v=i?p:s(u)??"",b=i?g:s(h)??"";return typeof v=="number"&&typeof b=="number"?v-b:String.prototype.localeCompare.call(v,b)},l=typeof((d=e.sort)==null?void 0:d.sortFn)=="function"?(f=e.sort)==null?void 0:f.sortFn:o,c=(u,h,p,g)=>l(u,h,p,g)*(t===ct.DESC?-1:1);return t===ct.NULL?(u,h)=>!0:c},jL=e=>{const t={[ct.NULL]:3,[ct.ASC]:1,[ct.DESC]:2};return t[e]===void 0?ct.ASC:Object.keys(t)[(t[e]+1)%3]},UL=(e,t,n=[])=>typeof e=="string"?{value:e}:typeof e=="boolean"&&e?{value:ct.NULL}:typeof e=="object"&&e!==null?typeof e.sortFn=="function"?{value:"custom",...e}:Object.assign({},{sortFn:v4(t,e.value??ct.NULL,n)},e):null,co=(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,WL=(e,t,n)=>{const r=HL(e,n,t);return r!==void 0&&e[r]!==void 0?pl(e,r):t},qL=(e,t)=>{const{value:n,sortFn:r,sortScope:s}=UL(e.sort??t.defaultSort,e)??{};return{type:n,fn:r,scope:s,active:!!e.sort,enabled:!!e.sort}},GL=e=>typeof e.filter=="object"?{...e.filter,enabled:!0}:{enabled:!!e.filter,checked:[]},Ni=e=>a.isProxy(e)?a.toRaw(e):e,KL=e=>{const t=Be("table"),n=a.reactive(new WeakMap),r=a.reactive([]),s=rn(),i=a.reactive([]),o=a.reactive([]),l=a.reactive([]),c=new WeakMap,d=(F,K={})=>{i.forEach(q=>q.active=!1);const W=i.find(q=>q.col===F);if(W){Object.assign(W,K,{active:!0});return}i.push({col:F,...K,active:!0})},f=(F,K,W)=>{let q=0;return/^\d+\.?\d*(px)?$/.test(`${F[K]}`)&&(q=Number(`${F[K]}`.replace(/px/,"")),$(F,be.WIDTH,q),M(F,{width:q,left:null,right:null})),/^\d+\.?\d*%$/.test(`${F[K]}`)&&(q=Number(`${F[K]}`.replace(/%/,""))/100*W,$(F,be.WIDTH,q),M(F,{width:q,left:null,right:null})),q},u=F=>{let K=F,W=Qr;const q=(ee,de="width")=>{const ue=[];return ee.forEach(ge=>{const Se=f(ge,de,F);K=K-Se,[void 0,null,"auto","undefined","null",""].includes(ge[de])&&ue.push(ge)}),K>0&&ue.length&&(W=K/ue.length),ue},se=q(p);q(se,"minWidth").forEach(ee=>{const de=W>Qr?W:Qr;$(ee,be.WIDTH,de),M(ee,{width:de,left:null,right:null})})},h=(F,K={})=>{const W=o.find(q=>q.col===F);if(W){Object.assign(W,K);return}o.push({col:F,...K})},p=a.reactive([]),g=()=>{p.length=0,p.push(...r.filter(F=>!k(F)))},v=()=>{var F,K;return e.rowDraggable?{minWidth:50,width:((F=e.rowDraggable)==null?void 0:F.width)??60,label:((K=e.rowDraggable)==null?void 0:K.label)??t.value.sort,type:"drag"}:null},b=(F=["rowspan","colspan"])=>r.some(K=>F.some(W=>typeof K[W]=="function"||/^\d$/.test(`${K[W]}`))),y=a.computed(()=>b(["colspan"])),N=a.computed(()=>b(["rowspan"])),w=(F,K,W)=>{let q=W;const se=lo(F,K,null,null,"colspan"),fe={skipCol:!1,skipColLen:0};return q>0&&(fe.skipColLen=q,fe.skipCol=!0,q=q-1),se>1&&(fe.skipColLen=se,q=se-1),{...fe,skipColumnNum:q}},C=F=>{if(/^\d+/.test(`${F.minWidth}`))return F.minWidth;let K=Qr;return F.sort&&(K=K+18),F.filter&&(K=K+28),K},S=(F,K)=>{const W=ne(F,be.LISTENERS);return W?Array.from(W==null?void 0:W.keys()).reduce((q,se)=>{const fe=se.split("_").slice(-1)[0];return Object.assign(q,{[fe]:ee=>{W.get(se).forEach(de=>Reflect.apply(de,void 0,[ee,F,K]))}})},{}):{}},x=F=>{if(!F.filter)return null;const K=(se,fe="ig")=>new RegExp(`${se}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fe),W=(se,fe)=>{const{match:ee}=F.filter,de=oo(fe,ot(F,"field",[F,fe]));return ee!=="fuzzy"?se.includes(de):se.some(ue=>K(ue,"img").test(de))};return typeof F.filter.filterFn=="function"?(se,fe,ee,de)=>F.filter.filterFn(se,fe,F,ee,de):(se,fe)=>se.length?W(se,fe):!0},E=F=>{l.length=0;let K=0;const W=[],q=v();q&&F.unshift(q);const se=(ue,ge=1)=>{ue.length&&K<ge&&(K=ge),ue.forEach(Se=>se(Se.children??[],ge+1))};se(F);const fe=(ue,ge)=>{if(ue){const Se=c.get(ue);Se.thColspan=Se.thColspan+ge,Se.offsetLeft=Se.offsetLeft+ge,fe(Se.parent,ge)}},ee=(ue,ge,Se,Le)=>{var Fe,Xn,dn,Ur,yr;const Ve=a.toRaw(ue);let ke=Le;l[ge]===void 0&&(l[ge]=[]);const Me=!!(((Fe=Ve.children)==null?void 0:Fe.length)??!1);(((Xn=Ve.children)==null?void 0:Xn.length)??!1)||W.push(Ve),c.has(Ve)||c.set(Ve,{thColspan:1,thRowspan:1,isGroup:Me,offsetLeft:Le});const at=c.get(Ve),Ue=((dn=Ve.children)==null?void 0:dn.length)??0,ft=((Ur=Ve.children)==null?void 0:Ur.length)??1,We=Ue>0?1:K-ge,Pe=ke+(Ue>0?Ue-1:0);return Object.assign(at,{thColspan:ft>0?ft:1,parent:Se,thRowspan:We,offsetLeft:Pe}),l[ge].push(Ve),ft>1&&fe(Se,ft-1),(yr=Ve.children)==null||yr.forEach((Je,fn)=>{ke=ke+ee(Je,ge+1,Ve,ke+fn)}),Ue>0?Ue-1:0};let de=0;return F.forEach((ue,ge)=>{de=de+ee(ue,0,null,de+ge)}),W},T=F=>c.get(F),O=()=>{i.length=0;let F=0;(r||[]).forEach((K,W)=>{const{skipCol:q,skipColumnNum:se,skipColLen:fe}=y.value?w(K,W,F):{skipCol:!1,skipColumnNum:0,skipColLen:0};if(F=se,!n.has(K)){const{type:ee,fn:de,scope:ue,active:ge,enabled:Se}=qL(K,e),Le=x(K),Ve=e.settings??{},ke=GL(K);ke.enabled&&h(K,{[be.COL_FILTER_FN]:Le,[be.COL_FILTER_VALUES]:ke.checked??[]}),Se&&d(K,{[be.COL_SORT_TYPE]:ee,[be.COL_SORT_FN]:de,[be.COL_SORT_SCOPE]:ue}),n.set(K,{[be.CALC_WIDTH]:void 0,[be.RESIZE_WIDTH]:void 0,[be.COL_RECT]:a.reactive({width:null,left:null,right:null,height:null}),[be.COL_MIN_WIDTH]:C(K),[be.LISTENERS]:new Map,[be.WIDTH]:K.width,[be.IS_HIDDEN]:um(Ve.fields??[],K,Ve.checked??[]),[be.COL_SORT_TYPE]:a.ref(ee),[be.COL_SORT_FN]:de,[be.COL_FILTER_OBJ]:ke,[be.COL_FILTER_FN]:Le,[be.COL_FILTER_SCOPE]:void 0,[be.COL_SORT_SCOPE]:ue,[be.COL_SORT_ACTIVE]:a.ref(ge),[be.COL_IS_DRAG]:!1,[be.COL_SPAN]:{skipCol:q,skipColumnNum:se,skipColLen:fe},[be.COL_UID]:rn(),[be.SELECTION_DISABLED]:!1,[be.SELECTION_INDETERMINATE]:!1,[be.SELECTION_VAL]:!1,[be.COL_RESIZEABLE]:K.resizable!==!1,[be.COL_FIXED_STYLE]:a.reactive({})})}Object.assign(n.get(K),{[be.COL_SPAN]:{skipCol:q,skipColumnNum:se,skipColLen:fe},[be.COL_MIN_WIDTH]:C(K)})})},V=(F,K)=>{$(F,be.COL_FIXED_STYLE,K)},_=F=>ne(F,be.COL_FIXED_STYLE)??{},L=F=>ne(F,be.COL_RECT),I=F=>ne(F,be.CALC_WIDTH),R=F=>ne(F,be.WIDTH),M=(F,{left:K,right:W,width:q,height:se})=>{const fe=L(F),ee={left:K??fe.left,right:W??fe.right,width:q??fe.width,height:se??fe.height};$(F,be.COL_RECT,ee)},j=gr((F,K)=>{r.length=0,r.push(...E(F)),O(),g(),K==null||K()}),H=(F,K=!1)=>{$(F,be.IS_HIDDEN,K)},A=(F,K)=>{$(F,be.RESIZE_WIDTH,K)},P=(F,K)=>{const{type:W,fn:q,scope:se,active:fe}=K,ee={[be.COL_SORT_TYPE]:W,[be.COL_SORT_FN]:q,[be.COL_SORT_ACTIVE]:fe,[be.COL_SORT_SCOPE]:se};[be.COL_SORT_TYPE,be.COL_SORT_FN,be.COL_SORT_ACTIVE,be.COL_SORT_SCOPE].forEach(de=>{ee[de]!==void 0&&$(F,de,ee[de])})},B=(F,K)=>{n.has(F)&&Object.assign(n.get(F)[be.COL_FILTER_OBJ],K)},z=[be.WIDTH],D=(F,K=z)=>ne(F,K[0])??ne(F,K[1])??ne(F,K[2]),k=F=>ne(F,be.IS_HIDDEN)??!1,G=F=>ne(F,be.COL_UID),U=(F,K,W)=>{[be.COL_SORT_FN,be.COL_SORT_SCOPE,be.COL_SORT_TYPE].includes(K)&&d(F,{[K]:W}),[be.COL_FILTER_FN,be.COL_FILTER_VALUES].includes(K)&&h(F,{[K]:W})},te=(F,K)=>{const W=p.findIndex(fe=>fe===F),q=D(F)-K,se=p[W+1];se&&$(se,be.WIDTH,D(se)+q)},$=(F,K,W)=>{U(F,K,W);const q=n.get(F);if(q&&Object.prototype.hasOwnProperty.call(q,K)){if(a.isRef(q[K])){q[K].value=W;return}q[K]=W}},Q=(F,K)=>{const W=K||F.checked||[],q=F.fields||[];r.forEach(se=>{$(se,be.IS_HIDDEN,um(q,se,W))})},ne=(F,K)=>{var q;const W=(q=n.get(F))==null?void 0:q[K];return a.isRef(W)?W.value:W},le=(F,K)=>{var W;return(W=n.get(F))==null?void 0:W[K]},ae=(F,K)=>({[`${s}-column-${K}`]:!1,column_fixed:!!F.fixed,column_fixed_left:!!F.fixed,column_fixed_right:F.fixed==="right"});return{needColSpan:y,needRowSpan:N,tableColumnSchema:n,tableColumnList:r,visibleColumns:p,debounceUpdateColumns:j,sortColumns:i,filterColumns:o,columnGroup:l,columnGroupMap:c,clearColumnSort:()=>{r.forEach(F=>{$(F,be.COL_SORT_ACTIVE,!1),$(F,be.COL_FILTER_FN,void 0)})},clearSelectionAll:()=>{const F=p.find(K=>K.type==="selection");F&&($(F,be.SELECTION_VAL,!1),$(F,be.SELECTION_INDETERMINATE,!1))},formatColumns:O,flatColumnTemplate:E,isHiddenColumn:k,getColumnId:G,getColumnOrderWidth:D,getColumnAttribute:ne,getHeadColumnClass:(F,K)=>({...ae(F,K)}),getColumnClass:ae,getFixedStlye:_,getColumnRect:L,getColumnCustomClass:(F,K)=>{const W=F.className;if(W){if(typeof W=="function")return W(K);if(typeof W=="string")return W}return""},getColumnRefAttribute:le,getColumnCalcWidth:I,getColumnWidth:R,getLeftColumnsWidth:(F,K=!1)=>{let W=!0,q=0,se=0;for(;W&&se<p.length;){if(F===p[se]){K&&(q=q+R(p[se])),W=!1;break}q=q+R(p[se]),se=se+1}return q},getGroupAttribute:T,getPreColumn:F=>{const W=p.findIndex(q=>q===F)-1;return p[W]},getColumnIndex:F=>p.findIndex(K=>K===F),resolveEventListener:S,setColumnIsHidden:H,setColumnResizeWidth:A,setColumnSortOption:P,setColumnFilterOption:B,setColumnAttributeBySettings:Q,setColumnAttribute:$,setColumnSortActive:(F,K)=>{e.colSortBehavior===u4.independent&&r.forEach(W=>{$(W,be.COL_SORT_ACTIVE,!1)}),$(F,be.COL_SORT_ACTIVE,K)},setFixedStyle:V,setColumnRect:M,setVisibleColumns:g,setNextColumnWidth:te,resolveColsCalcWidth:u}},YL=(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(b=>{r.addEventListener(b,y=>{y.preventDefault(),y.stopPropagation(),y.dataTransfer.dropEffect="move"})});let s=null,i="";const o=(b,y)=>{if(y==="--top"){b.parentNode.insertBefore(r,b);return}if(b.nextElementSibling===null){b.parentNode.append(r);return}b.parentNode.insertBefore(r,b.nextElementSibling)},l=b=>{e.rowDraggable&&(b==null||b())},c=b=>b.target.closest("tr"),d=(b,y)=>{const{y:N}=y,{top:w,bottom:C}=b.getBoundingClientRect(),S=N-w>C-N?"--bottom":"--top";f(b),b.classList.add(S),o(b,S)},f=(b,y=["--bottom","--top"])=>{y.forEach(N=>b.classList.remove(N))};return{onDragenter:b=>{const y=c(b);b.preventDefault(),b.stopPropagation(),l(()=>{b.dataTransfer.dropEffect="move",y.classList.add("--drag-enter"),d(y,b),s=y})},onDragleave:b=>{l(()=>{const y=c(b);i=y.classList.contains("--bottom")?"--bottom":"--top",f(y,["--drag-enter","--bottom","--top"])})},onDragstart:b=>{l(()=>{const y=c(b);r.style.setProperty("height",`${y.offsetHeight}px`),r.style.setProperty("width",`${y.offsetWidth}px`),y.classList.add("--drag-start"),b.dataTransfer.setDragImage(y,0,0),b.dataTransfer.setData("text/plain",null),b.dataTransfer.dropEffect="move";const{rowIndex:N}=b.target.dataset;b.dataTransfer.setData("data-row-index",N)})},onDragover:b=>{b.preventDefault(),b.stopPropagation(),b.dataTransfer.dropEffect="move";const y=c(b);d(y,b)},onDragend:b=>{var S;if(b.preventDefault(),b.stopPropagation(),r.remove(),!s)return;const y=s,{rowIndex:N}=y.dataset;let w=Number(N);const C=(S=b.target.dataset)==null?void 0:S.rowIndex;i==="--bottom"&&(w=w+1),t.changePageRowIndex(Number(C),w),s=null,i="",n.emit(Xe.DRAG_END,{sourceEvent:b,data:t.pageRowList})}}},XL=(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"}),i=a.reactive({right:0,width:"0"}),o=()=>{let f=0;const{length:u}=r.value;for(let p=u-1;p>=0;p--){const g=r.value[p],v=t.getColumnWidth(g);t.setColumnRect(g,{right:f,width:v}),t.setFixedStyle(g,{right:`${f}px`}),f=f+v}let h=0;n.value.forEach(p=>{const g=t.getColumnWidth(p);t.setColumnRect(p,{left:h,width:g}),t.setFixedStyle(p,{left:`${h}px`}),h=h+g}),s.width=`${h}px`,i.width=`${f}px`},l=()=>n.value.length>0?a.createVNode("div",{style:s,class:"column_fixed column_fixed_left"},null):null,c=()=>{if(r.value.length>0)return a.createVNode("div",{style:i,class:"column_fixed column_fixed_right"},null)};return{renderFixedRows:()=>[l(),c()],resolveFixedColumnStyle:o}},JL=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)])}}}),ZL=(e,t)=>{const n=a.toRef(e,"scrollLoading"),r=()=>{var o;return typeof n.value=="boolean"?{loading:!!n.value||(((o=e.fixedBottom)==null?void 0:o.loading)??!1),inline:!0,title:"",size:Dr.Normal,mode:Z0.Default,indicator:null}:n.value},s=a.computed(()=>{var o;return n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object")||(((o=e.fixedBottom)==null?void 0:o.loading)??!1)});return{renderScrollLoading:()=>{var o,l,c,d;if(s.value){const{loading:f,size:u,mode:h,title:p,inline:g,indicator:v}=r();return((l=(o=t.slots).fixedBottom)==null?void 0:l.call(o))??a.createVNode(ur,{loading:f,size:u,mode:h,title:p,inline:g,indicator:v},null)}return((d=(c=t.slots).fixedBottom)==null?void 0:d.call(c))??null}}},QL=(e,t)=>{const n=a.ref(null),r=a.ref(null),s=a.ref(null),i=a.ref(null),o=a.ref(0),l=a.ref(0),c=a.ref(0),d=a.ref(-1e4),f=a.ref(0),u=a.reactive({}),h=a.reactive([]),p=a.ref(lr),g=a.ref(1),v=a.computed(()=>{var q,se,fe;return(q=t.slots)!=null&&q.fixedBottom&&((se=e.fixedBottom)==null?void 0:se.position)==="relative"?((fe=e.fixedBottom)==null?void 0:fe.height)??lr:0}),{resolveClassName:b}=he(),{renderScrollLoading:y}=ZL(e,t),N=a.computed(()=>Ae({[b("table")]:!0},ML(e.border))),w=a.computed(()=>({height:kr(e.height),maxHeight:kr(e.maxHeight),minHeight:kr(e.minHeight)})),C=a.computed(()=>Ae({[b("table-head")]:!0,"has-settings":!!e.settings,"has-group":g.value>1})),S=()=>{var fe,ee,de,ue;const q=f.value>0?"0 0 10px rgb(0 0 0 / 12%)":null,se=o.value>0?"0 0 10px rgb(0 0 0 / 12%)":null;(ee=(fe=n.value)==null?void 0:fe.style)==null||ee.setProperty("--shadow-right",q),(ue=(de=n.value)==null?void 0:de.style)==null||ue.setProperty("--shadow-left",se)},x=ep(()=>{var q,se,fe,ee,de,ue,ge,Se,Le,Ve;(se=(q=n.value)==null?void 0:q.style)==null||se.setProperty("--drag-offset-x",`${d.value+o.value}px`),(ee=(fe=n.value)==null?void 0:fe.style)==null||ee.setProperty("--drag-offset-h-x",`${d.value-2}px`),(ue=(de=n.value)==null?void 0:de.style)==null||ue.setProperty("--translate-y",`${l.value}px`),(Se=(ge=n.value)==null?void 0:ge.style)==null||Se.setProperty("--translate-x",`${o.value}px`),(Ve=(Le=n.value)==null?void 0:Le.style)==null||Ve.setProperty("--translate-x-1",`-${o.value}px`),S()}),E=q=>{o.value=q,x()},T=q=>{g.value=q},O=q=>{l.value=q,x()},V=()=>{var q,se,fe,ee,de,ue,ge,Se,Le,Ve;(se=(q=n.value)==null?void 0:q.style)==null||se.setProperty("--drag-offset-x","-1000px"),(ee=(fe=n.value)==null?void 0:fe.style)==null||ee.setProperty("--drag-offset-h-x","-1000px"),(ue=(de=n.value)==null?void 0:de.style)==null||ue.setProperty("--translate-y","0px"),(Se=(ge=n.value)==null?void 0:ge.style)==null||Se.setProperty("--translate-x","0px"),(Ve=(Le=n.value)==null?void 0:Le.style)==null||Ve.setProperty("--translate-x-1","0px")},_=q=>{d.value=q,x()},L=kh(e),I=a.computed(()=>ot(L,"height",["thead"])*g.value),R=a.computed(()=>{var q;return{"--row-height":`${I.value}px`,"--background-color":o4[((q=e.thead)==null?void 0:q.color)??gl.DEF1],paddingRight:e.scrollbar?null:`${i4}px`}}),M={[b("table-body")]:!0,"is-bk-scrollbar":e.scrollbar},j=a.computed(()=>Ae({[b("table-footer")]:!0,"is-hidden":te.value===0})),H=q=>a.createVNode("div",{ref:n,style:w.value,class:N.value},[q,a.createVNode(JL,null,{default:()=>{var se,fe;return[(fe=(se=t.slots).default)==null?void 0:fe.call(se)]}})]),A=(q,se,fe)=>a.createVNode("div",{ref:r,style:R.value,class:C.value},[q==null?void 0:q(),a.createVNode("div",{class:"col-resize-drag"},null),a.createVNode("div",{class:oe},[fe==null?void 0:fe()]),se==null?void 0:se()]),P=a.computed(()=>({position:"sticky",top:0,zIndex:2,...e.prependStyle||{}})),B=()=>t.slots.prepend?a.createVNode("div",{style:P.value,class:"prepend-row"},[t.slots.prepend()]):null,z=a.ref("auto"),D=a.computed(()=>{if(/^\d+\.?\d*(px|%)$/.test(`${w.value.maxHeight}`)){const q=e.showHead?I.value:0,se=te.value+q+v.value;return`calc(${w.value.maxHeight} - ${se}px)`}return null}),k=q=>q-I.value-v.value-te.value,G=(q,se=!0)=>{if(se){z.value=k(q);return}z.value=q},U=q=>{z.value=q},te=a.ref(0),$=a.computed(()=>({"--footer-height":`${te.value}px`})),Q=q=>{te.value=q},ne=gr((...q)=>{t.emit(Xe.SCROLL_BOTTOM,{...q})}),le=()=>{var fe,ee,de,ue;const q=((ee=(fe=s.value)==null?void 0:fe.refRoot)==null?void 0:ee.scrollWidth)??0,se=((ue=(de=s.value)==null?void 0:de.refRoot)==null?void 0:ue.offsetWidth)??0;f.value=q-se-(o==null?void 0:o.value)},ae=q=>{p.value=q},X=q=>{c.value=u.bottom??0;const se=q[1],{translateX:fe,translateY:ee,pos:de={}}=se;E(fe),O(ee),le(),Object.assign(u,de||{});const{bottom:ue}=de;ue<=2&&c.value>ue&&ne({...de,translateX:fe,translateY:ee})},J={column_drag_line:!0,"offset-x":!0,"resize-column":!0},Y=a.computed(()=>({[b("table-body-content")]:!0,[b("stripe")]:e.stripe})),oe=a.computed(()=>({[b("table-fixed")]:!0,"has-virtual-scroll":e.virtualEnabled})),pe=b("table-fixed-bottom"),Z=a.computed(()=>{var q,se,fe;return{minHeight:`${((q=e.fixedBottom)==null?void 0:q.minHeight)??lr}px`,position:((se=e.fixedBottom)==null?void 0:se.position)??"absolute",height:((fe=e.fixedBottom)==null?void 0:fe.height)??null}});a.onMounted(()=>{le(),V()});const ce=()=>{const q=y==null?void 0:y();return q?a.createVNode("div",{style:Z.value,class:pe},[q]):null};return{renderContainer:H,renderHeader:A,renderBody:(q,se,fe)=>a.createVNode(Ws,{ref:s,height:z.value,class:M,contentClassName:Y.value,enabled:e.virtualEnabled,lineHeight:p.value,list:q,maxHeight:D.value,rowKey:e.rowKey,scrollEvent:!0,scrollbar:{enabled:e.scrollbar},throttleDelay:120,onContentScroll:X},{beforeContent:()=>B(),default:ee=>se==null?void 0:se((ee==null?void 0:ee.data)??[]),afterSection:()=>[a.createVNode("div",{class:J},null),a.createVNode("div",{class:oe.value},[fe==null?void 0:fe()])]}),renderFooter:q=>a.createVNode("div",{ref:i,style:$.value,class:j.value},[q]),renderFixedBottom:()=>ce(),getBodyHeight:k,setBodyHeight:G,setVirtualBodyHeight:U,setFootHeight:Q,setTranslateX:E,setDragOffsetX:_,setFixedColumns:q=>{h.length=0,h.push(...q)},setOffsetRight:le,setLineHeight:ae,setHeaderRowCount:T,initRootStyleVars:V,refRoot:n,refHead:r,refBody:s,refFooter:i}},eV=(e,t,n=[],r=!0)=>{let s=null;const i=()=>{s&&(s.disconnect(),s=null)};return a.watch(e,()=>{Lr(e.value)&&(i(),s=g4(e.value,()=>{t==null||t.apply(...n)},60,!0,"debounce"),r&&s.start())},{flush:"post",immediate:!0}),{instance:s}},tV=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=l=>{Object.assign(t,{enabled:!!e.pagination},l),t.current>r.value&&(t.current=1)},i=(l=!0)=>{n.value=!l};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 o=a.computed(()=>t.enabled&&t.count>0);return{options:t,isShowPagination:o,setPagination:s,disabledPagination:i}},nV=a.defineComponent({name:"BodyEmpty",props:{list:m.array.def([]),filterList:m.array.def([]),emptyText:m.string},emits:["change"],setup(e){const t=Be("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(ml,{description:n.value,scene:"part",type:r.value},null)}}),Zf=a.defineComponent({name:"TableCell",props:{column:vl,row:m.any.def({}),parentSetting:Dh,title:m.string.def(void 0),observerResize:m.bool.def(!0),intersectionObserver:m.bool.def(!1),isHead:m.bool.def(!1),isExpandChild:m.bool.def(!1),headExplain:m.string,resizerWay:xe("ResizerWay",{default:c4.DEBOUNCE})},setup(e,{slots:t}){const n=a.ref(),r=a.ref(!1),s=a.ref(!e.intersectionObserver),i=a.computed(()=>({textAlign:e.column.textAlign,minWidth:kr(e.column.minWidth,null)})),o=()=>{if(/boolean|object/.test(typeof e.column.showOverflowTooltip)&&e.column.showOverflowTooltip!==null){const{content:y="",mode:N=void 0,popoverOption:w={}}=e.column.showOverflowTooltip,C={showOverflowTooltip:{content:y,disabled:!e.column.showOverflowTooltip,mode:N,resizerWay:void 0,watchCellResize:void 0,popoverOption:w,allowHtml:!1}};return e.parentSetting!==null&&typeof e.parentSetting=="object"&&(Object.assign(C.showOverflowTooltip,e.parentSetting,{disabled:!e.column.showOverflowTooltip}),typeof e.column.showOverflowTooltip=="object"&&Object.assign(C.showOverflowTooltip,e.column.showOverflowTooltip)),C}return{showOverflowTooltip:e.parentSetting}};let l=null;const c=(y=!1)=>{var w;const N=f();return y?((w=N==null?void 0:N.cloneNode)==null?void 0:w.call(N,!0))??"":(N==null?void 0:N.innerText)??""},d=()=>{var O,V;const{showOverflowTooltip:y=!1}=o();let N=!0,{resizerWay:w}=e;const C=c(y.allowHtml);let S=()=>C,x={},E="auto",T=!0;if(typeof y=="boolean"&&(N=!y),typeof y=="object"&&(N=y.disabled,x=y.popoverOption,w=y.resizerWay||"debounce",S=()=>y.content||C,typeof y.content=="function"&&(S=()=>y.content(e.column,e.row)),T=y.watchCellResize,E=y.mode||"auto"),typeof N=="function"&&(N=Reflect.apply(N,this,[e.column,e.row])),e.column.explain){let _=!0;typeof y=="boolean"&&(_=!y),typeof y=="object"&&(_=y.disabled),N=_,E="static",typeof e.column.explain=="object"&&(S=()=>ot(e.column.explain,"content",[e.column,e.row])||C)}return e.isHead&&(N=!(((V=(O=e.column)==null?void 0:O.showOverflowTooltip)==null?void 0:V.showHead)??!0),E="auto",S=()=>{var _,L;return((L=(_=f())==null?void 0:_.cloneNode)==null?void 0:L.call(_,!0))??""},e.headExplain&&(E="static",S=()=>e.headExplain)),e.column.type==="expand"&&!e.isHead&&!e.isExpandChild&&(N=!0),{disabled:N,content:S,mode:E,resizerWay:w,watchCellResize:T,popoverOption:x}},f=()=>{var y,N;return e.isHead?(N=(y=n.value)==null?void 0:y.querySelector)==null?void 0:N.call(y,".head-text"):n.value},u=()=>{const y=f();if(!y||!Lr(y))return;const{mode:N,disabled:w}=d();if(r.value=!w,N==="auto"&&(r.value=xm(y)),N==="static"&&(r.value=!0),r.value){const C=a.ref(d());l===null&&(l=ih(y,{disabled:C.value.disabled,content:C.value.content,mode:C.value.mode,popoverOption:C.value.popoverOption}))}else l==null||l.destroyInstance(y),l=null};let h=null;const p=()=>{const{disabled:y,resizerWay:N,watchCellResize:w}=d();y||(u(),w!==!1&&e.observerResize&&(h=g4(n.value,()=>{u()},60,!0,N),h.start()))};let g=null;const v=()=>{e.intersectionObserver&&(g=new IntersectionObserver(y=>{if(y[0].intersectionRatio<=0){s.value=!1,l==null||l.destroyInstance(n.value);return}s.value=!0,p()},{threshold:.5}),g==null||g.observe(n.value))};a.onMounted(()=>{v(),s.value&&p()}),a.onBeforeUnmount(()=>{h==null||h.disconnect(),h=null,l==null||l.destroyInstance(n.value),g==null||g.disconnect(),g=null});const b=e.headExplain||e.column.explain;return()=>{var y;return a.createVNode("div",{ref:n,style:i.value,class:["cell",e.column.type,b?"explain":""]},[s.value?(y=t.default)==null?void 0:y.call(t):"--"])}}}),xi=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)])}}),rV=({props:e,rows:t,ctx:n,columns:r,row:s,index:i,column:o,isChild:l=!1,multiShiftKey:c})=>{const{isShiftKeyDown:d,getStore:f,setStore:u,setStoreStart:h,clearStoreStart:p}=c,g=()=>{const x=(_,L)=>{L.stopImmediatePropagation(),L.preventDefault(),L.stopPropagation(),d.value||(_?h(s,i):p()),t.setRowSelection(s,_),r.setColumnAttribute(o,be.SELECTION_INDETERMINATE,t.getRowIndeterminate()),r.setColumnAttribute(o,be.SELECTION_VAL,t.getRowCheckedAllValue()),n.emit(Xe.ROW_SELECT,{row:s,index:i,checked:_,data:e.data}),n.emit(Xe.ROW_SELECT_CHANGE,{row:s,index:i,checked:_,data:e.data})},E=()=>{if(d.value){const _=u(s,i);if(_){const{start:L,end:I}=f(),R=L.index<I.index?L.index:I.index,M=L.index<I.index?I.index:L.index;(t.pageRowList.slice(R,M+1)??[]).forEach(j=>{co(e,{row:s,index:i,isCheckAll:!1})&&t.setRowSelection(j,!0)})}return n.emit(Xe.ROW_SELECT,{row:s,index:i,checked:!0,data:e.data,isShiftKeyDown:!0}),n.emit(Xe.ROW_SELECT_CHANGE,{row:s,index:i,checked:!0,data:e.data,isShiftKeyDown:!0}),Promise.resolve(!_)}return Promise.resolve(!0)},T=t.getRowAttribute(s,De.ROW_SELECTION_INDETERMINATE),O=t.getRowAttribute(s,De.ROW_SELECTION),V=co(e,{row:s,index:i,isCheckAll:!1});return a.createVNode(Ct,{beforeChange:E,disabled:!V,indeterminate:T,modelValue:O,onChange:x},null)},v=x=>Array.isArray(e.isEmptyCell)?e.isEmptyCell.some(E=>E===x):typeof e.isEmptyCell=="function"?e.isEmptyCell({cellText:x,row:s,column:o}):mv(x),b=()=>{var T;const x=()=>{if(ot(o,"type",[o,s])==="index")return t.getRowAttribute(a.toRaw(s),De.ROW_INDEX);const V=ot(o,"field",[o,s]),_=oo(s,V);if(typeof o.render=="function")return y();if(typeof _=="boolean"||typeof _=="number")return`${_}`;if(typeof _=="object"&&_!==null)return JSON.stringify(a.unref(_));if(v(_)){const{emptyCellText:L}=e;if(L)return typeof L=="function"?L({row:s,column:o,index:i}):L}return _},E={expand:()=>l?"":C(),selection:()=>g(),drag:S};return((T=E[o.type])==null?void 0:T.call(E,s,o,i,t))??x()},y=()=>{const x=oo(s,ot(o,"field",[o,s])),E=s;return o.render({cell:x,data:E,row:s,column:o,index:i,rows:t.tableRowList.value})},N=()=>{var T,O;const E=t.getRowAttribute(s,De.ROW_EXPAND)?a.createVNode(Ms,null,null):a.createVNode(Bs,null,null);return a.createVNode("span",null,[[E,((O=(T=n.slots).expandContent)==null?void 0:O.call(T,s))??""]])},w=x=>{t.setRowExpand(s,!t.getRowAttribute(s,De.ROW_EXPAND)),n.emit(Xe.ROW_EXPAND_CLICK,{row:s,column:o,index:i,rows:t.tableRowList.value,e:x})},C=()=>{const x=()=>{var E,T;return typeof o.render=="function"?y():((T=(E=n.slots).expandCell)==null?void 0:T.call(E,{row:s,column:o,index:i,rows:t}))??N()};return a.createVNode("span",{class:"expand-btn-action",onClick:E=>w(E)},[x()])},S=()=>{var O,V,_;const x=((O=e.rowDraggable)==null?void 0:O.render)??e.rowDraggable;if(typeof x=="function")return x(s,o,i,t.tableRowList.value);const E=((V=e.rowDraggable)==null?void 0:V.fontSize)??"14px";return((_=e.rowDraggable)==null?void 0:_.icon)??a.createVNode(Wo,{style:`'--font-size: ${E};'`,class:"drag-cell"},null)};return{renderCell:b}},y4=()=>{const e=n=>{let r={paddingSize:0,borderSize:0,marginSize:0};if(!n)return r;function s(h){const p=h.trim().split(" ").map(g=>Number.parseFloat(g));return p.length===1?{distanceLeft:p.at(0),distanceRight:p.at(0)}:p.length===2?{distanceLeft:p.at(1),distanceRight:p.at(1)}:p.length===3||p.length===4?{distanceLeft:p.at(p.length-1),distanceRight:p.at(1)}:{distanceLeft:0,distanceRight:0}}const i=getComputedStyle(n),o=i.getPropertyValue("padding"),l=i.getPropertyValue("margin"),c=i.getPropertyValue("border");r.borderSize=Number.parseFloat(i.getPropertyValue("border-left-width"))+Number.parseFloat(i.getPropertyValue("border-right-width")),r.paddingSize=Number.parseFloat(i.getPropertyValue("padding-left"))+Number.parseFloat(i.getPropertyValue("padding-right")),r.marginSize=Number.parseFloat(i.getPropertyValue("margin-left"))+Number.parseFloat(i.getPropertyValue("margin-right"));const d=o!==""&&o!=="0px"&&o!==void 0,f=l!==""&&l!=="0px"&&l!==void 0,u=c!==""&&c.indexOf("0px")===-1&&c!==void 0;if(d){const{distanceLeft:h,distanceRight:p}=s(o);r.paddingSize=h+p}if(f){const{distanceLeft:h,distanceRight:p}=s(l);r.marginSize=h+p}return u&&(r.borderSize=Number.parseFloat(i.getPropertyValue("border-width"))),r};return{renderDomStyles:e,resolveOverflowTips:(n,r,s)=>{var l,c;const i=s.value[n],o=(l=r.value)==null?void 0:l.querySelector(".bk-checkbox-label");if(i&&o){const f=e(i),u=e(o),h=e(r.value),p=(i==null?void 0:i.offsetWidth)+(f==null?void 0:f.borderSize)+(f==null?void 0:f.marginSize)+(f==null?void 0:f.paddingSize)+(h==null?void 0:h.borderSize)+(h==null?void 0:h.marginSize)+(h==null?void 0:h.paddingSize)+(u==null?void 0:u.marginSize)+(u==null?void 0:u.paddingSize),g=((c=r.value)==null?void 0:c.offsetWidth)||0;if((i==null?void 0:i.offsetWidth)>g||16+p>g)return!0}return!1}}};function dm(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const Si=32,aV=a.defineComponent({name:"HeadFilter",directives:{bkTooltips:Dn},props:{column:vl,height:m.number.def(Si)},emits:["change","filterSave","reset"],setup(e,{emit:t}){const{resolveClassName:n}=he(),{resolveOverflowTips:r}=y4(),s=Be("table"),i=a.computed(()=>{var A;return(A=e.column)==null?void 0:A.filter}),o=a.computed(()=>{var A;return((A=i.value)==null?void 0:A.checked)??[]}),l=a.ref(""),c=a.ref(),d=a.ref([]),f=a.reactive({isOpen:!1,checked:[]});f.checked.push(...o.value),a.watch(()=>o,A=>{f.checked.length=0,f.checked=[],f.checked.push(...A.value)},{deep:!0});const u=a.computed(()=>Ae({[n("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:f.checked.length,opened:f.isOpen})),h=Ae({[n("table-head-filter")]:!0}),p=a.ref(null),g=A=>{f.isOpen=A,A&&setTimeout(()=>{var P;(P=p.value)==null||P.reset()}),A||(l.value="")},v=`light ${n("table-head-filter")}`,b=a.computed(()=>{const{list:A=[]}=i.value;return A.filter(B=>{const z=x(l.value);return z.test(B.label)||z.test(B.text)||z.test(B.value)})}),y=5,N=a.computed(()=>{var A;return((A=i.value)==null?void 0:A.maxHeight)??Si*y}),w=a.computed(()=>{const{height:A,list:P=[]}=i.value;return A||P.length*Si}),C=a.computed(()=>{const A=Si*2;return b.value.length>y?N.value:A}),S=a.computed(()=>({maxHeight:`${N.value}px`,minHeight:`${C.value}px`,height:/%$/.test(`${w.value}`)?w.value:`${w.value}px`})),x=(A,P="ig")=>new RegExp(`${A}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),P),E=()=>{T(!0),t("filterSave",f.checked),f.isOpen=!1},T=(A=!1)=>{const{disabled:P}=V(_,s.value.confirm);if(P||A){if(i.value==="custom"){t("change",f.checked,null),f.isOpen=!1;return}t("change",f.checked)}},O=()=>{f.checked.length&&(f.checked.length=0,f.isOpen=!1,t("change",f.checked),t("reset",f.checked))},V=(A,P)=>({disabled:A==="disabled"||A===!1,text:typeof A=="string"?A:P}),{btnSave:_,btnReset:L}=i.value,I=()=>{const{disabled:A,text:P}=V(_,s.value.confirm);return A?a.createVNode("span",{class:"btn-filter-save disabled"},[P]):a.createVNode(it,{style:"width: 56px; margin-right: 8px;",size:"small",theme:"primary",onClick:E},dm(P)?P:{default:()=>[P]})},R=()=>{const{disabled:A,text:P}=V(L,s.value.reset);return A?"":a.createVNode(it,{style:"width: 56px;",disabled:f.checked.length===0,size:"small",onClick:O},dm(P)?P:{default:()=>[P]})},M=(A,P)=>{const B=new Set(f.checked);A?B.add(P.value):B.delete(P.value),f.checked.length=0,f.checked.push(...Array.from(B)),i.value.checked=[...f.checked],T()},j=async()=>{await new Promise(A=>setTimeout(A,0)),b.value.forEach(A=>{Object.prototype.hasOwnProperty.call(A,"showOverflowTooltip")||(A.showOverflowTooltip=r(`list-item-${A.value}-ref`,c,d))})},H=A=>A.length?(j(),A.map(P=>a.withDirectives(a.createVNode("div",{key:P.value,ref:c,class:"list-item"},[a.createVNode(Ct,{checked:f.checked.includes(P.value),immediateEmitChange:!1,label:P.value,modelValue:f.checked.includes(P.value),onChange:B=>M(B,P)},{default:()=>[a.createVNode("span",{ref:B=>d.value[`list-item-${P.value}-ref`]=B},[`${P.text}`])]})]),[[a.resolveDirective("bk-tooltips"),{content:P.tipKey||P.text,placement:"right",disabled:!P.showOverflowTooltip}]]))):a.createVNode("div",{class:"list-item is-empty"},[s.value.emptyText]);return()=>a.createVNode(Dt,a.mergeProps({arrow:!1,isShow:f.isOpen,offset:0,placement:"bottom-start",renderType:go.SHOWN,trigger:"click"},{theme:v},{onAfterHidden:()=>g(!1),onAfterShow:()=>g(!0)}),{default:()=>a.createVNode(Uo,{class:u.value},null),content:()=>a.createVNode("div",{class:h},[a.createVNode("div",{style:"padding: 4px 10px;"},[a.createVNode(hr,{modelValue:l.value,"onUpdate:modelValue":A=>l.value=A},null)]),a.createVNode(il,{class:"content-list"},{default:()=>[a.createVNode("div",{style:S.value,class:"content-items"},[H(b.value)])]}),a.createVNode("div",{class:"content-footer"},[I(),R()])])})}}),sV=a.defineComponent({name:"HeadSort",props:{column:vl,defaultSort:m.oneOf(WA).def(ct.NULL),active:m.bool,sortValFormat:m.arrayOf(m.any).def([""])},emits:["change"],setup(e,{emit:t,expose:n}){var c,d;const{resolveClassName:r}=he(),s=((d=(c=e.column)==null?void 0:c.sort)==null?void 0:d.value)??e.defaultSort??ct.NULL,i=a.ref(s);a.watch(()=>[e.defaultSort],([f])=>{i.value=f},{immediate:!0});const o=f=>{i.value=f},l=(f,u)=>{f.stopImmediatePropagation(),f.stopPropagation(),f.preventDefault(),t("change",{type:u,isCancel:u===i.value})};return n({setNextSortType:o}),()=>a.createVNode("span",{class:r("head-cell-sort")},[a.createVNode(Lo,{style:"align-items: flex-end;",class:["sort-action","sort-asc",e.active&&i.value===ct.ASC?"active":""],onClick:f=>l(f,ct.ASC)},null),a.createVNode(Rs,{style:"align-items: flex-start;",class:["sort-action","sort-desc",e.active&&i.value===ct.DESC?"active":""],onClick:f=>l(f,ct.DESC)},null)])}});function iV(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const oV=({props:e,columns:t,rows:n,ctx:r,column:s,index:i})=>{var R;const o=a.ref(t.getColumnAttribute(s,be.COL_SORT_TYPE)),l=a.ref(t.getColumnAttribute(s,be.COL_SORT_ACTIVE)),c=a.toRaw(s),d=a.ref(null),f=M=>{const{isCancel:j,type:H=t.getColumnRefAttribute(s,be.COL_SORT_TYPE)}=M??{},A=j?ct.NULL:H,P=v4(s,A,e.sortValFormat);t.setColumnAttribute(s,be.COL_SORT_TYPE,A),t.setColumnAttribute(s,be.COL_SORT_FN,P),t.setColumnSortActive(s,A!==ct.NULL),o.value=A,l.value=A!==ct.NULL,r.emit(Xe.COLUMN_SORT,{column:s,index:i,type:A})},u=()=>a.createVNode(sV,{active:l.value,column:s,defaultSort:o.value,sortValFormat:e.sortValFormat,onChange:f},null),h=()=>{const M=A=>{r.emit(Xe.COLUMN_FILTER,{checked:A,column:a.unref(s),index:i})},j=A=>{t.setColumnAttribute(s,be.COL_FILTER_VALUES,A),r.emit(Xe.COLUMN_FILTER_SAVE,{values:A})},H=()=>{t.setColumnAttribute(s,be.COL_FILTER_VALUES,[]),r.emit(Xe.COLUMN_FILTER,{checked:[],column:a.unref(s),index:i})};return a.createVNode(aV,{height:e.headHeight,column:s,onChange:M,onFilterSave:j,onReset:H},null)},p=kh(e),{cellFn:g}=p,v=()=>typeof g=="function"?g({index:i,column:s}):typeof s.renderHead=="function"?s.renderHead({index:i,column:s}):ot(s,"label",[i]),b=()=>{const M=[];s.sort&&M.push(u()),s.filter&&M.push(h());const j=v();M.unshift(a.createVNode("span",{class:"head-text"},[j]));const H=typeof j=="string"?j:void 0,A={"has-sort":!!s.sort,"has-filter":!!s.filter};return{cells:M,showTitle:H,headClass:A}},y=(M,j="current")=>{t.setColumnAttribute(s,be.SELECTION_VAL,M),t.setColumnAttribute(s,be.SELECTION_INDETERMINATE,!1),n.setRowSelectionAll(M),r.emit(Xe.ROW_SELECT_ALL,{checked:M,data:e.data,type:j})},N=M=>{y(!0,M)},{resolveClassName:w}=he(),C=w("across-page-popover"),S=()=>{const M=t.getColumnAttribute(s,be.SELECTION_DISABLED),j=t.getColumnAttribute(s,be.SELECTION_VAL),H=t.getColumnAttribute(s,be.SELECTION_INDETERMINATE);return s.acrossPage?a.createVNode("span",{class:"across-page-cell"},[a.createVNode(Ct,{disabled:M,indeterminate:H,modelValue:j,outline:!0,onChange:A=>y(A)},null),a.createVNode(Dt,{ref:d,extCls:C,arrow:!1,placement:"bottom-start",theme:"light",trigger:"click"},{default:()=>a.createVNode("span",{class:"dropwn-icon"},null),content:()=>a.createVNode("div",{class:"dropwn-content"},[a.createVNode("div",{onClick:()=>N("current")},[a.createTextVNode("本页全选")]),a.createVNode("div",{onClick:()=>N("all")},[a.createTextVNode("跨页全选")])])})]):a.createVNode(Ct,{disabled:M,indeterminate:H,modelValue:j,onChange:A=>y(A)},null)},x=()=>{if(s.type==="selection")return[S()];const{headClass:M,showTitle:j,cells:H}=b();return a.createVNode(Zf,{class:M,column:s,headExplain:ot(s.explain,"head",[s]),isHead:!0,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,resizerWay:e.resizerWay,title:j},iV(H)?H:{default:()=>[H]})},E=()=>{if(!t.getColumnAttribute(s,be.COL_IS_DRAG)&&s.sort&&!s.filter){const j={isCancel:!1,type:jL(t.getColumnRefAttribute(s,be.COL_SORT_TYPE))};f(j)}},T=Object.assign(t.getFixedStlye(s),{"--background-color":o4[((R=e.thead)==null?void 0:R.color)??gl.DEF1]}),O=t.getGroupAttribute(c),V=a.computed(()=>[t.getHeadColumnClass(s,i),t.getColumnCustomClass(s),s.align||e.headerAlign||e.align,{"is-last-child":(O==null?void 0:O.offsetLeft)+1===t.visibleColumns.length}]),_=a.computed(()=>V.value.concat([{"is-head-group":O==null?void 0:O.isGroup,"is-head-group-child":!!(O!=null&&O.parent)}])),L=()=>ot(s,"label",[i,s]);return{getTH:()=>O!=null&&O.isGroup?a.createVNode("th",{style:T,class:_.value,colspan:O==null?void 0:O.thColspan,rowspan:O==null?void 0:O.thRowspan},[L()]):a.createVNode("th",a.mergeProps({style:T,class:V.value,colspan:O==null?void 0:O.thColspan,"data-id":t.getColumnId(s),rowspan:O==null?void 0:O.thRowspan,onClick:()=>E()},t.resolveEventListener(s,i)),[x()])}},lV=e=>{const t=a.ref(!1),n={start:null,end:null},r=u=>{u.key==="Shift"&&(t.value=!0)},s=u=>{u.key==="Shift"&&(t.value=!1,c())},i=(u,h)=>{n.start={index:h??null,row:u??null}},o=()=>{i()},l=(u,h)=>n.start===null&&n.end===null?(n.start={index:h,row:u},!1):(n.end={index:h,row:u},!0),c=()=>{n.start=null,n.end=null};return e.shiftMultiChecked&&(window.addEventListener("keydown",r),window.addEventListener("keyup",s)),{isShiftKeyDown:t,setStore:l,getStore:()=>n,clearStore:c,setStoreStart:i,clearStoreStart:o,removeMultiCheckedEvents:()=>{e.shiftMultiChecked&&(window.removeEventListener("keydown",r),window.removeEventListener("keyup",s))}}};function cV(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const uV=({props:e,ctx:t,columns:n,rows:r,pagination:s})=>{const i=Be("table"),o=rn();let l={};const c=lV(e),d=()=>a.createVNode("colgroup",null,[(n.visibleColumns||[]).map((_,L)=>{const I=`${PL(n.getColumnOrderWidth(_))}`.replace(/px$/i,""),R=n.getColumnAttribute(_,be.COL_MIN_WIDTH);return a.createVNode("col",{style:{width:kr(I,"auto"),minWidth:kr(R,"auto")}},null)})]),f=()=>{const _=kh(e),L={"--row-height":`${ot(_,"height",["thead"])}px`,backgroundColor:e.thead.color};return a.createVNode(a.Fragment,null,[a.createVNode("thead",{style:L},[n.columnGroup.map((I,R)=>a.createVNode("tr",null,[I.map((M,j)=>{if(n.isHiddenColumn(M))return null;const{getTH:H}=oV({props:e,ctx:t,columns:n,column:M,index:j,rows:r});return H()})]))])])},u=()=>e.showHead?a.createVNode("table",{cellpadding:0,cellspacing:0},[d(),f()]):null,h=()=>{const _="append-last-row",L=[...Yr(e.rowStyle,[]),{"--row-height":`${g(null,null,"append-last-row")}px`}];if(e.appendLastRow.type==="default")return t.slots.appendLastRow?a.createVNode(xi,{key:_},{default:()=>{var I,R;return[a.createVNode("tr",{key:_,style:L},[a.createVNode("td",{colspan:n.visibleColumns.length},[((R=(I=e.appendLastRow).cellRender)==null?void 0:R.call(I,null,null))??t.slots.appendLastRow()])])]}}):void 0;if(e.appendLastRow.type==="summary")return a.createVNode(xi,{key:_},{default:()=>[a.createVNode("tr",{key:_,style:L},[n.visibleColumns.map((I,R)=>a.createVNode("td",null,[a.createVNode(Zf,null,{default:()=>{var M,j;return[((j=(M=e.appendLastRow).cellRender)==null?void 0:j.call(M,I,R))??I.field??I.prop]}})]))])]})},p=_=>{let L={};const I=new WeakMap,R=n.needRowSpan.value;return a.createVNode("tbody",null,[_.map((M,j)=>{const H=x(M,j,L,_,I,R);return L=M,H}),h()])},g=r.getRowHeight,v=_=>{l=_},b=_=>{var R,M;const L=_??r.pageRowList,I=a.computed(()=>e.emptyText===void 0?i.value.emptyText:e.emptyText);return L.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":o},[d(),p(L)]):((M=(R=t.slots).empty)==null?void 0:M.call(R))??a.createVNode(nV,{emptyText:I.value,filterList:L,list:e.data},null)},y=(_,L,I,R)=>{var j;((j=_.target)==null?void 0:j.tagName)!=="INPUT"&&t.emit(Xe.ROW_CLICK,_,L,I,R)},N=(_,L,I,R)=>{t.emit(Xe.ROW_DBL_CLICK,_,L,I,R)},w=(_,L,I,R)=>{t.emit(Xe.ROW_MOUSE_ENTER,_,L,I,R)},C=(_,L,I,R)=>{t.emit(Xe.ROW_MOUSE_LEAVE,_,L,I,R)},S=(_,L,I,R,M)=>{var P;M.has(_)||M.set(_,new WeakMap),M.get(_).has(R)||M.get(_).set(R,{skipRowLen:0,skipRow:!1});let{skipRowLen:j=0}=((P=M.get(I))==null?void 0:P.get(R))??{},H=!1;const A=lo(R,null,_,L,"rowspan");return j>1?(j=j-1,H=!0):A>1&&(j=A,H=!1),Object.assign(M.get(_).get(R),{skipRowLen:j,skipRow:H}),{skipRowLen:j,skipRow:H}},x=(_,L,I,R,M,j,H=!1)=>{const A=R.length,P=[...Yr(e.rowStyle,[_,L]),{"--row-height":`${g(_,L)}px`}],B=[...Yr(e.rowClass,[_,L]),`hover-${e.rowHover}`,L%2===1&&e.stripe?"stripe-row":""],z=r.getRowAttribute(_,De.ROW_UID);return[a.createVNode(xi,{key:z},{default:()=>[a.createVNode("tr",a.mergeProps({key:z,style:P,class:B,"data-row-index":L,draggable:!!e.rowDraggable,onClick:D=>y(D,_,L,R),onDblclick:D=>N(D,_,L,R),onMouseenter:D=>w(D,_,L,R),onMouseleave:D=>C(D,_,L,R)},l),[n.visibleColumns.map((D,k)=>{const G=[n.getFixedStlye(D),...Yr(e.cellStyle,[D,k,_,L])],{colspan:U,rowspan:te}=zL(D,k,_,L),{skipCol:$}=n.getColumnAttribute(D,be.COL_SPAN),{skipRow:Q}=j&&!H?S(_,L,I,D,M):{skipRow:!1},ne={"expand-cell":D.type==="expand"};if(!Q&&!$){let le;const ae=[n.getColumnClass(D,k),n.getColumnCustomClass(D,_),D.align||e.align,...Yr(e.cellClass,[D,k,_,L]),{"expand-row":r.getRowAttribute(_,De.ROW_EXPAND),"is-last":L+te>=A}],X=`${z}_${k}`,J=`${z}_${k}_cell`,{renderCell:Y}=rV({props:e,rows:r,ctx:t,columns:n,row:_,index:L,column:D,isChild:H,multiShiftKey:c}),oe=(pe,Z)=>{const ce={event:pe,row:_,column:D,cell:{getValue:()=>Y()},rowIndex:L,columnIndex:k};t.emit(Z,ce)};return a.createVNode("td",{key:X,style:G,class:ae,colspan:U,"data-id":X,rowspan:te,onClick:pe=>oe(pe,Xe.CELL_CLICK),onDblclick:pe=>oe(pe,Xe.CELL_DBL_CLICK)},[a.createVNode(Zf,{key:J,class:ne,column:D,"data-id":J,intersectionObserver:e.intersectionObserver,isExpandChild:H,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,row:_},cV(le=Y())?le:{default:()=>[le]})])}return null})])]}),E(_,B)]},E=(_,L,I)=>{if(r.getRowAttribute(_,De.ROW_EXPAND)){const M=[...L,{row_expend:!0}],H=`${r.getRowAttribute(_,De.ROW_UID)}_expand`;return Array.isArray(_.children)?_.children.map((A,P)=>x(A,P,{},_,{},!1,!0)):a.createVNode(xi,{key:H},{default:()=>{var A,P;return[a.createVNode("tr",{class:M},[a.createVNode("td",{colspan:n.visibleColumns.length,rowspan:1},[((P=(A=t.slots).expandRow)==null?void 0:P.call(A,_))??a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}},T=_=>{s.setPagination({limit:_}),t.emit(Xe.PAGE_LIMIT_CHANGE,_)},O=_=>{if(typeof e.pagination=="object"&&_!==s.options.current){s.setPagination({current:_,value:_}),t.emit(Xe.PAGE_VALUE_CHANGE,_);return}typeof e.pagination=="boolean"&&e.pagination!==!1&&t.emit(Xe.PAGE_VALUE_CHANGE,_)},V=()=>{if(s.isShowPagination.value)return a.createVNode(Ah,a.mergeProps({style:"width: 100%;"},s.options,{modelValue:s.options.current,onChange:_=>O(_),onLimitChange:_=>T(_)}),null)};return a.onUnmounted(()=>{c.removeMultiCheckedEvents()}),{renderColumns:u,renderTBody:b,renderTFoot:V,setDragEvents:v}},dV=e=>{const t=a.reactive(new WeakMap),n=a.ref([]),r=a.reactive([]),s=H=>e.isRowSelectEnable?typeof e.isSelectedFn=="function"?e.isSelectedFn(l(H)):Array.isArray(e.checked)?e.checked.some(A=>typeof A!="object"?e.selectionKey.length&&Object.prototype.hasOwnProperty.call(H,e.selectionKey)?FL(H,e.selectionKey)===A:(console.warn("props.selectionKey is undefined or null or empty"),!1):Ni(A)===Ni(H)):!1:!1,i=(H,A,P)=>typeof e.rowHeight=="function"||/^\d+/.test(`${e.rowHeight}`)?ot(e,"rowHeight",[{index:A,type:P??"tbody",row:H}]):lr,o=()=>{let H=!1,A=!1;n.value.forEach((P,B)=>{const z=Ni(P);let D=WL(z,rn(),e);const k=s(z);k?H=!0:A=!0,t.has(z)||t.set(z,{[De.ROW_EXPAND]:!1,[De.ROW_SELECTION]:k,[De.ROW_UID]:D,[De.ROW_INDEX]:B+1,[De.ROW_SELECTION_INDETERMINATE]:!1});const G=t.get(z);D=G[De.ROW_UID],G[De.ROW_INDEX]=B+1,G[De.ROW_HEIGHT]=i(P,B)}),t.set(Tr,{[De.ROW_SELECTION]:H,[De.ROW_SELECTION_INDETERMINATE]:H&&A})},l=(H,A)=>({row:H,index:A??c(H,De.ROW_INDEX),isSelectAll:c(Tr,De.ROW_SELECTION)}),c=(H,A)=>{var P;return(P=t.get(H))==null?void 0:P[A]},d=H=>{t.set(qA,{[De.ROW_SPAN]:H})},f=(H,A)=>co(e,{row:H,index:A})?c(H,De.ROW_SELECTION):!0,u=H=>{if(typeof e.isSelectedFn=="function"){x(H,e.isSelectedFn(l(H)));return}x(H,!c(H,De.ROW_SELECTION))},h=H=>{const A=H??!p();if(t.set(Tr,{[De.ROW_SELECTION]:A,[De.ROW_SELECTION_INDETERMINATE]:!1}),e.acrossAll){n.value.forEach((P,B)=>x(P,A,B));return}r.forEach((P,B)=>x(P,A,B))},p=()=>e.acrossAll?n.value.every((H,A)=>f(H,A)):r.every((H,A)=>f(H,A)),g=()=>e.acrossAll?n.value.some(H=>c(H,De.ROW_SELECTION)):r.some(H=>c(H,De.ROW_SELECTION)),v=H=>{h(H)},b=()=>{const H=p();S(Tr,De.ROW_SELECTION,H),S(Tr,De.ROW_SELECTION_INDETERMINATE,!H&&g())},y=()=>c(Tr,De.ROW_SELECTION_INDETERMINATE),N=()=>c(Tr,De.ROW_SELECTION),w=(H,A)=>{if(A){S(A,De.ROW_HEIGHT,H);return}n.value.forEach(P=>S(P,De.ROW_HEIGHT,H))},C=(H,A,P)=>H?c(H,De.ROW_HEIGHT):i(H,A,P),S=(H,A,P)=>{const B=Ni(H),z=t.get(B);z&&Object.prototype.hasOwnProperty.call(z,A)&&(z[A]=P)},x=(H,A,P)=>{let B=A;typeof e.isSelectedFn=="function"&&(B=e.isSelectedFn(l(H,P))),co(e,{row:H,index:P??c(H,De.ROW_INDEX)})&&S(H,De.ROW_SELECTION,B),b()},E=(H,A)=>{S(H,De.ROW_INDEX,A)},T=(H,A)=>{S(H,De.ROW_EXPAND,A)},O=H=>{let A=0;const P=50,B=()=>{const z=A+P;r.push(...H.slice(A,z)),z<H.length&&(A=z,setTimeout(()=>{B()}))};if(H.length>P){B();return}r.push(...H)};return{setRowIndex:E,setRowExpand:T,isRowChecked:f,setPageRowList:H=>{r.length=0,O(H)},setTableRowList:H=>{n.value.length=0,n.value.push(...H),o()},clearSelection:()=>{n.value.forEach(H=>x(H,!1))},formatDataSchema:o,toggleRowSelection:u,setRowSelectionAll:v,setRowSelection:x,setAllRowExpand:H=>{n.value.forEach(A=>T(A,H??!0))},setRowHeight:w,setTableIsNeedRowSpan:d,getRowAttribute:c,getRowSelection:()=>n.value.filter(H=>c(H,De.ROW_SELECTION)),getRowIndeterminate:y,getRowCheckedAllValue:N,getCurrentPageRowsHeight:()=>r.reduce((H,A)=>H+C(A),0),changePageRowIndex:(H,A)=>{const P=r[H];r.splice(A,0,P);const B=H<A?H:H+1;r.splice(B,1)},toggleAllSelection:h,getRowHeight:C,tableRowList:n,tableRowSchema:t,pageRowList:r}};function fV(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const hV=(e,t,n,r)=>{const s=Be("table"),{resolveClassName:i}=he(),{resolveOverflowTips:o}=y4(),l=jA(s),c=a.ref(!1),d=a.ref(),f=a.ref([]),u=(U,te)=>ot(U,["id","field","type"],[U,te]),h=()=>({enabled:!0,fields:e.columns.map(U=>Object.assign({},U,{field:U.field||U.type})),checked:[],limit:0,size:"small",sizeList:l,showLineHeight:!0,extCls:"",trigger:"manual",height:os.small}),p=U=>typeof U=="boolean"&&U!==!1?h():U?Object.assign({},h(),U):{enabled:!1},g=a.ref(null),v=a.reactive(h()),b=U=>{Object.assign(v,p(U))};a.watch(()=>[e.settings],()=>{b(e.settings)},{immediate:!0,deep:!0});const y=a.ref(v.size||"small"),N=a.ref(os.small),w=a.ref(v.checked||[]),S=`light ${i("table-settings")}`,x=a.computed(()=>v.fields||e.columns||[]),E={checkAll:c.value,activeSize:y.value,activeHeight:N.value,checkedFields:v.checked||[]},T=()=>{var te;Object.assign(E,{checkAll:c.value,activeSize:y.value,activeHeight:N.value,checkedFields:w.value});const U={checked:w.value,size:y.value,height:N.value,fields:a.unref(x)};Object.assign(v,U),n.setColumnAttributeBySettings(v,U.checked),n.setVisibleColumns(),r==null||r(U),(te=g.value)==null||te.hide(),t.emit(Xe.SETTING_CHANGE,U)},O=()=>{var U;c.value=E.checkAll,y.value=E.activeSize,N.value=E.activeHeight,w.value=E.checkedFields,(U=g.value)==null||U.hide()},V=()=>{var U;v.trigger==="manual"&&((U=g.value)==null||U.show())},_=U=>{U.stopImmediatePropagation(),U.stopPropagation(),U.preventDefault(),c.value=!c.value;const te=v.fields||e.columns||[],$=te.filter((Q,ne)=>Q.disabled&&w.value.includes(u(Q,ne))).map((Q,ne)=>u(Q,ne));if(c.value){const Q=te.filter(ne=>!ne.disabled).map((ne,le)=>u(ne,le));w.value.splice(0,w.value.length,...Q,...$)}else w.value.splice(0,w.value.length,...$)},L=a.computed(()=>(v.limit??0)>0),I=v.sizeList||l,R=a.computed(()=>L.value&&(v.limit?v.limit:0)<=w.value.length),M=(U,te)=>U.disabled||R.value&&!w.value.includes(u(U,te)),j=U=>{y.value=U.value,N.value=U.height},H=U=>({"line-size":!0,"is-medium":y.value==="medium",active:U.value===y.value}),A={marginRight:"12px"},P=()=>I.map(U=>a.createVNode("span",{class:H(U),onClick:()=>j(U)},[U.label])),B=a.computed(()=>w.value.length>0&&w.value.length<x.value.length),z=a.computed(()=>typeof v.showLineHeight=="boolean"?v.showLineHeight:!0);a.watch(()=>[w.value],()=>{w.value.length||(c.value=!1),w.value.length&&x.value.every((U,te)=>w.value.includes(u(U,te)))&&(c.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{w.value.splice(0,w.value.length,...v.checked)},{immediate:!0,deep:!0});const D=async()=>{await new Promise(U=>setTimeout(U,0)),x.value.forEach((U,te)=>{Object.prototype.hasOwnProperty.call(U,"showOverflowTooltip")||(U.showOverflowTooltip=o(`field-item-${ot(U,["id","field","type"],[U,te])}-ref`,d,f))})},k=()=>{var $,Q,ne,le;let U;const te=(Q=($=t.slots).settings)==null?void 0:Q.call($);return te||D(),te??a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"setting-head"},[a.createVNode("span",{class:"head-title"},[s.value.setting.title]),a.createVNode(Ps,{class:"icon-close-action",onClick:O},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]),L.value?a.createVNode("span",{class:"limit"},[s.value.setting.fields.subtitle(v.limit)]):""]),L.value?"":a.createVNode("span",{class:"check-all",onClick:_},[a.createVNode(Ct,{indeterminate:!!B.value,label:s.value.setting.fields.selectAll,modelValue:w.value.length>0},{default:()=>[s.value.setting.fields.selectAll]})])]),a.createVNode(il,{class:"setting-body-fields",modelValue:w.value,"onUpdate:modelValue":ae=>w.value=ae},fV(U=x.value.map((ae,X)=>a.createVNode("div",{ref:d,class:"field-item"},[a.createVNode(Ct,{checked:w.value.includes(u(ae,X)),disabled:M(ae,X),label:u(ae,X)},{default:()=>[a.withDirectives(a.createVNode("span",{ref:J=>f.value[`field-item-${ot(ae,["id","field","type"],[ae,X])}-ref`]=J},[ot(ae,["name","label"],[ae,X])]),[[a.resolveDirective("bk-tooltips"),{placement:"top-start",content:ot(ae,["name","label"],[ae,X]),disabled:!ae.showOverflowTooltip}]])]})])))?U:{default:()=>[U]}),(le=(ne=t.slots).setting)==null?void 0:le.call(ne),z.value?a.createVNode("div",{class:"setting-body-line-height"},[s.value.setting.lineHeight.title,a.createTextVNode(":"),P()]):""]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(it,{style:A,theme:"primary",onClick:T},{default:()=>[s.value.setting.options.ok]}),a.createVNode(it,{style:A,onClick:O},{default:()=>[s.value.setting.options.cancel]})])])};return{options:v,renderSettings:()=>e.settings?a.createVNode(Dt,a.mergeProps({ref:g,extCls:v.extCls,arrow:!0,placement:"bottom-end",trigger:v.trigger??"manual"},{theme:S}),{default:()=>a.createVNode("span",{class:"table-head-settings",onClick:V},[a.createVNode(Po,{style:"color: #c4c6cc;"},null)]),content:()=>a.createVNode("div",{class:"setting-content"},[k()])}):null}},mV=a.defineComponent({name:"Table",directives:{bkTooltips:Dn},props:tL,emits:pL,setup(e,t){process.env.NODE_ENV!=="production"&&console.warn("BkTable 组件后续将不再维护,请迁移至新组件 @blueking/table");const n=KL(e),r=dV(e),s=tV(e),{renderContainer:i,renderFixedBottom:o,renderBody:l,renderHeader:c,renderFooter:d,setBodyHeight:f,setFootHeight:u,setDragOffsetX:h,setOffsetRight:p,setHeaderRowCount:g,setLineHeight:v,getBodyHeight:b,refBody:y,refRoot:N}=QL(e,t),w=(...ne)=>{var le;return(le=y.value)==null?void 0:le.scrollTo(...ne)};typeof e.rowHeight=="function"?v(ne=>r.getRowHeight(ne.rows[0],ne.index)):v(e.rowHeight);const S=hV(e,t,n,({checked:ne,height:le})=>{(ne==null?void 0:ne.length)>0&&w(0,0),typeof e.rowHeight!="function"&&(r.setRowHeight(le),v(le))}),x=YL(e,r,t),{renderColumns:E,renderTBody:T,renderTFoot:O,setDragEvents:V}=uV({props:e,ctx:t,columns:n,rows:r,pagination:s});V(x);const{resolveColumns:_}=vL(),L=a.getCurrentInstance(),I=()=>{var le;const ne=((le=L.subTree)==null?void 0:le.children)??[];n.debounceUpdateColumns(_(ne),()=>{g(n.columnGroup.length)})};a.provide(l4,I);const{renderFixedRows:R,resolveFixedColumnStyle:M}=XL(e,n),j=()=>{var le;const ne=((le=N.value)==null?void 0:le.offsetWidth)-(e.scrollbar?1:i4)||0;n.resolveColsCalcWidth(ne),M()},{dragOffsetX:H}=gL(n,{afterResize:M}),A=a.ref(!1),P=ne=>{if(!s.isShowPagination.value||e.remotePagination)return ne;const le=(s.options.current-1)*s.options.limit,ae=le+s.options.limit;return ne.slice(le,ae)},B=()=>{let ne=r.tableRowList.value.slice();return n.filterColumns.forEach(le=>{var ae;!n.isHiddenColumn(le.col)&&le[be.COL_FILTER_FN]&&((ae=le[be.COL_FILTER_VALUES])!=null&&ae.length)&&(ne=ne.filter((X,J)=>le[be.COL_FILTER_FN](le[be.COL_FILTER_VALUES],X,J,e.data)))}),n.sortColumns.forEach(le=>{!n.isHiddenColumn(le.col)&&le[be.COL_SORT_FN]&&le.active&&ne.sort((ae,X)=>{let J=null,Y=null;return le.col.type==="index"&&(J=r.getRowAttribute(ae,De.ROW_INDEX),Y=r.getRowAttribute(X,De.ROW_INDEX)),le[be.COL_SORT_FN](ae,X,J,Y)})}),ne},z=a.computed(()=>s.isShowPagination.value?e.paginationHeight:0),D=()=>{u(z.value),/^\d+\.?\d*(px)?$/.test(`${e.height}`)&&f(Number(`${e.height}`.replace("px","")))},k=a.ref(!1),G=gr((ne=!0)=>{const le=B();e.remotePagination||s.setPagination({count:le.length});const ae=P(le);r.setPageRowList(ae),ne&&(k.value=!0),a.nextTick(()=>{p(),$(),k.value&&(w(0,0),k.value=!1)})},64),U=a.ref(!1);let te=null;eV(N,()=>{if(!U.value){if(U.value=!0,e.virtualEnabled&&ra(N.value)){if(A.value){setTimeout(()=>{A.value=!1});return}const ne=N.value.offsetHeight;A.value=!0,f(ne),p()}j(),p(),w(0,0);return}te&&clearTimeout(te),te=setTimeout(()=>{U.value=!1})});const $=()=>{if(e.virtualEnabled){let le=r.getCurrentPageRowsHeight();if(/^\d+\.?\d*(px)?$/.test(`${e.maxHeight}`)){const ae=b(Number(`${e.maxHeight}`.replace("px","")));if(le>ae){f(ae,!1);return}}f(le,!1)}};a.watch(()=>[e.columns],()=>{n.debounceUpdateColumns(e.columns,()=>{g(n.columnGroup.length)})},{immediate:!0}),a.watch(()=>[H.value],()=>{h(H.value)}),a.watch(()=>[n.visibleColumns],()=>{a.nextTick(()=>j())},{immediate:!0,deep:!0}),a.watch(()=>[n.filterColumns],()=>{G()},{deep:!0}),a.watch(()=>[n.sortColumns],()=>{G(!1)},{deep:!0}),a.watch(()=>[s.isShowPagination.value],()=>{D()},{immediate:!0}),a.watch(()=>[e.data],()=>{r.setTableRowList(e.data),G(!1)},{immediate:!0,deep:!0}),a.watch(()=>[s.options.count,s.options.limit,s.options.current],()=>{G(!1)},{immediate:!0});const Q=a.computed(()=>r.pageRowList.length);return a.watch(Q,(ne,le)=>{var ae,X;ne<le&&((X=(ae=y==null?void 0:y.value)==null?void 0:ae.updateScroll)==null||X.call(ae),w(void 0,0))}),t.expose({setRowExpand:r.setRowExpand,setAllRowExpand:r.setAllRowExpand,clearSelection:()=>{r.clearSelection(),n.clearSelectionAll()},toggleAllSelection:r.toggleAllSelection,toggleRowSelection:r.toggleRowSelection,getSelection:r.getRowSelection,setRowSelection:r.setRowSelection,clearSort:n.clearColumnSort,scrollTo:w,getRoot:()=>N.value}),()=>i([c(E,S.renderSettings,R),l(r.pageRowList,T,R),o(),d(O())])}}),b4=St(mV,{Column:rL}),w4=Ie(A_),pV={list:m.arrayOf(m.shape({tag:m.string,content:m.oneOfType([m.string,m.object]),type:m.string,size:m.string,color:m.string,icon:m.func,filled:m.bool,border:m.bool,nodeType:m.timelineNodeType()}).isRequired),titleAble:m.bool.def(!1)},gV=a.defineComponent({name:"Timeline",props:pV,emits:["select"],setup(e,{emit:t}){const n=a.shallowRef([]),{resolveClassName:r}=he(),s=i=>{t("select",i)};return a.watch(()=>e.list,()=>{n.value=e.list.map(i=>({tag:i.tag,content:i.content,type:i.type,size:i.size,color:i.color,icon:i.icon,filled:i.filled,border:i.border??!0,nodeType:i.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"),i=["blue","red","green","yellow","gray"],o=r.type?`${s}-${r.type}`:`${s}-default`,l=r.size?`${s}-${r.size}`:"",c=r.filled?`${s}-filled`:"",d=r.color&&i.includes(r.color)?`${s}-${r.color}`:"",f=e(r)?`${s}-custom`:"";return Ae({},`${s} ${o} ${l} ${d} ${c} ${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:typeof r.content=="string"?Ki.sanitize(r.content):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:Ki.sanitize(r.tag||"")},null)]),n(r)])]))])}}),C4=Ie(gV);var vn=(e=>(e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e.OBJECT_ARRAY="objectArray",e))(vn||{});const vV={title:m.arrayOf(m.string).def([]),extCls:m.string.def(""),searchPlaceholder:m.string.def(""),settingKey:m.string.def("id"),displayKey:m.string.def("value"),sortKey:m.string.def("value"),showOverflowTips:m.bool.def(!1),searchable:m.bool.def(!1),sortable:m.bool.def(!1),sourceList:m.arrayOf(m.any).def([]),targetList:m.arrayOf(m.any).def([]),emptyContent:m.arrayOf(m.string).def([]),multiple:m.bool.def(!1)};function yV(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}function bV(e,t,n){const r=a.ref([]),s=a.ref([]),i=(o=!1)=>{o&&(r.value=[],s.value=[]),e.value.forEach(l=>{const c=l[n.value];t.value.includes(c)?s.value.push(l):r.value.push(l)})};return i(),a.watch(()=>[e,t,n],()=>{i(!0)},{deep:!0}),{selectList:r,selectedList:s}}function wV(e,t){const n=a.ref(""),r=a.computed(()=>e.value.filter(s=>{const i=s[t.value];return i instanceof Object?!1:i.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:r}}const CV=a.defineComponent({name:"Transfer",props:vV,emits:["change","update:targetList"],setup(e,{emit:t}){const n=Be("transfer"),r=a.ref({source:!1,target:!1}),s=a.ref({source:[],target:[]}),i=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(_=>_.toString().includes("[object Object]"))?vn.OBJECT_ARRAY:vn.BASE_ARRAY:vn.NOT_ARRAY),o=a.computed(()=>i.value===vn.BASE_ARRAY?"value":e.settingKey),l=a.computed(()=>i.value===vn.BASE_ARRAY?"value":e.displayKey),c=a.computed(()=>e.sortKey||l.value),d=a.computed(()=>{switch(i.value){case vn.BASE_ARRAY:return[...new Set(e.sourceList)].map(V=>({value:V}));case vn.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:f}=a.toRefs(e),{selectList:u,selectedList:h}=bV(d,f,o),{selectSearchQuery:p,selectListSearch:g}=wV(u,l),v=a.computed(()=>[...g.value].sort((V,_)=>{const L=V[c.value],I=_[c.value];return L>I?1:-1})),b=a.computed(()=>[...h.value].sort((V,_)=>{const L=V[c.value],I=_[c.value];return L>I?1:-1}));a.watch(()=>[u,h],()=>{e.multiple||S()},{deep:!0});const y=(V,_)=>{const L=o.value;return V.some(I=>I[L]===_[L])&&_.disabled},N=()=>{u.value=[...d.value.filter(V=>y(u.value,V))],h.value=[...d.value.filter(V=>!y(u.value,V))],S()},w=()=>{u.value=[...d.value.filter(V=>!y(h.value,V))],h.value=[...d.value.filter(V=>y(h.value,V))],S()},C=(V,_)=>{if(V.disabled)return;const L=V[o.value],I=_?u:h,R=_?h:u,M=I.value.findIndex(j=>j[o.value]===L);R.value.push(...I.value.splice(M,1)),S()},S=()=>{const V=u.value.map(L=>L[o.value]),_=h.value.map(L=>L[o.value]);t("update:targetList",_),t("change",i.value===vn.BASE_ARRAY?V:u.value.map(L=>a.toRaw(L)),i.value===vn.BASE_ARRAY?_:h.value.map(L=>a.toRaw(L)),_)},x=V=>{const _=V==="source"?u:h;r.value[V]=s.value[V].length===_.value.length},E=(V,_)=>{const L=_==="source"?u:h;s.value[_]=V?L.value.map(I=>I[o.value]):[]},T=V=>{const _=V==="left",L=_?u:h,I=_?h:u,R=s.value[_?"source":"target"],M=L.value.filter(j=>R.includes(j[o.value]));L.value=L.value.filter(j=>!R.includes(j[o.value])),I.value.push(...M),s.value[_?"source":"target"]=[],S()},{resolveClassName:O}=he();return{selectSearchQuery:p,selectListSearch:g,selectedList:h,selectListSort:v,selectedListSort:b,settingCode:o,displayCode:l,allToRight:N,allToLeft:w,handleItemClick:C,t:n,handleAllChecked:E,multipleSelectAllValue:r,multipleSelectList:s,handleMultipleChange:T,handleItemChecked:x,resolveClassName:O}},render(){const{multiple:e}=this.$props,t=this.sortable?this.selectListSort:this.selectListSearch,n=this.sortable?this.selectedListSort:this.selectedList,r=l=>{const c=l==="left-header",d=c?"source":"target",f=c?`${this.title[0]??this.t.sourceList}`:`${this.title[1]??this.t.targetList}`,u=c?!t.length:!n.length,h=!!this.multipleSelectList[d].length&&!this.multipleSelectAllValue[d],p=this.multipleSelectList[d].length,g=()=>{u||(c?this.allToRight():this.allToLeft())};return this.$slots[l]?a.createVNode("div",{class:"slot-header"},[this.$slots[l]()]):a.createVNode("div",{class:"header"},[this.multiple?a.createVNode(Ct,{class:"header-checkbox",modelValue:this.multipleSelectAllValue[d],"onUpdate:modelValue":v=>this.multipleSelectAllValue[d]=v,indeterminate:h,label:f,onChange:v=>this.handleAllChecked(v,d)},null):a.createVNode(a.Fragment,null,[`${f}(${c?t.length:n.length})`]),this.multiple?a.createVNode("div",{class:"select-total-count"},[a.createVNode("span",{class:"select-count"},[p]),a.createVNode("span",{class:"count-delimiter"},[a.createTextVNode("/")]),a.createVNode("span",{class:"total-count"},[c?t.length:n.length])]):a.createVNode("span",{class:{"select-all":!0,disabled:u},onClick:()=>g()},[c?this.t.selectAll:this.t.removeAll])])},s=l=>{const c=l==="left-empty-content",d=(c?this.emptyContent[0]:this.emptyContent[1])??(c?this.t.noData:this.t.noSelected);return this.$slots[l]?a.createVNode("div",null,[this.$slots[l]()]):a.createVNode("div",{class:"empty"},[d])},i=(l,c=!0)=>a.createVNode("div",{class:["item-content",{"is-disabled":l.disabled}]},[a.createVNode("span",{class:"content-text",title:l[this.displayCode]},[l[this.displayCode]]),!e&&a.createVNode("span",{class:"icon-wrapper"},[c?a.createVNode(ko,{class:this.resolveClassName("icon")},null):a.createVNode(wt,{class:[this.resolveClassName("icon"),this.resolveClassName("icon-delete")]},null)])]),o=l=>{let c;const d=l==="left",f=l==="left"?"source":"target",u=d?t:n,h=d?"source-option":"target-option",p=d?"left-empty-content":"right-empty-content",g=e?a.createVNode(il,{class:"content is-flex",modelValue:this.multipleSelectList[f],"onUpdate:modelValue":v=>this.multipleSelectList[f]=v,onChange:()=>this.handleItemChecked(f)},yV(c=u.map(v=>a.createVNode("div",null,[a.createVNode(Ct,{class:"checkbox-item",label:v[this.settingCode]},{default:()=>{var b,y;return[((y=(b=this.$slots)[h])==null?void 0:y.call(b,v))??i(v,d)]}})])))?c:{default:()=>[c]}):a.createVNode("ul",{class:["content",this.searchable&&d?"is-search":""]},[u.map(v=>{var b,y;return a.createVNode("li",{key:v[this.settingCode],class:[this.$slots[h]?"custom-item":""],onClick:()=>this.handleItemClick(v,d)},[((y=(b=this.$slots)[h])==null?void 0:y.call(b,v))??i(v,d)])})]);return u.length?g:s(p)};return a.createVNode("div",{class:[`${this.resolveClassName("transfer")}`,this.extCls]},[a.createVNode("div",{class:"source-list"},[r("left-header"),this.searchable&&a.createVNode(hr,{class:"transfer-search-input",modelValue:this.selectSearchQuery,"onUpdate:modelValue":l=>this.selectSearchQuery=l,clearable:!0,placeholder:this.searchPlaceholder||this.t.search},{prefix:()=>a.createVNode(jr,{class:this.resolveClassName("icon-search")},null)}),o("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($t,null,null)]),a.createVNode("div",{class:["transfer-button",{disabled:!this.multipleSelectList.target.length}],onClick:()=>this.handleMultipleChange("right")},[a.createVNode(an,null,null)])]):a.createVNode(Qo,{class:this.resolveClassName("transfer-icon")},null),a.createVNode("div",{class:"target-list"},[r("right-header"),o("right")])])}}),N4=Ie(CV);var Ot=(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_SORT="nodeDragSort",e.NODE_DRAG_START="nodeDragStart",e.NODE_DROP="nodeDrop",e.NODE_ENTER_VIEW="nodeEnterView",e.NODE_EXPAND="nodeExpand",e.NODE_SELECTED="nodeSelected",e))(Ot||{});const Zt=(...e)=>!0,NV={nodeClick:Zt,nodeCollapse:Zt,nodeExpand:Zt,nodeChecked:Zt,nodeDragStart:Zt,nodeDragOver:Zt,nodeDragLeave:Zt,nodeDragSort:Zt,nodeDrop:Zt,nodeEnterView:Zt,nodeSelected:Zt};var me=(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))(me||{});const ir={__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 x4=(e=>(e.CLICK="click",e.COLLAPSE="collapse",e.EXPAND="expand",e.SELECTED="selected",e))(x4||{});const xV={data:m.arrayOf(m.any).def([]),label:m.oneOfType([m.func.def(void 0),m.string.def("label")]),nodeKey:m.string.def(void 0),children:m.string.def("children"),indent:m.number.def(16),lineHeight:m.number.def(32),height:m.number,levelLine:m.oneOfType([m.bool.def(!1),m.func.def(void 0),m.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:m.bool.def(!1),prefixIcon:m.oneOfType([m.func.def(()=>{}),m.bool.def(!1)]).def(!0),async:m.shape({callback:m.func.def(void 0),cache:m.bool.def(!0),deepAutoOpen:xe("columnType",{}).def("once"),trigger:m.arrayOf(m.oneOf(["expand","click","checked"])).def(null)}),offsetLeft:m.number.def(5),search:m.oneOfType([m.shape({value:m.oneOfType([m.number,m.string,m.bool]).def(""),match:m.oneOfType([bt(),m.func]).def("fuzzy"),resultType:bt().def("tree"),showChildNodes:m.bool.def(!1)}),m.string,m.number,m.bool]).def(void 0),emptyText:m.string.def("没有数据"),draggable:m.bool.def(!1),disableDrag:m.func,disableDrop:m.func,dragThreshold:m.number.def(.2),dragSort:m.bool.def(!1),dragSortMode:m.oneOf(["any","next"]).def("any"),selectable:m.oneOfType([m.bool,m.func]).def(!0),disabledFolderSelectable:m.bool.def(!1),showCheckbox:m.oneOfType([m.bool,m.func]).def(!1),checked:m.arrayOf(m.any).def([]),showNodeTypeIcon:m.bool.def(!0),selected:m.oneOfType([m.string,m.number,m.object]),autoCheckChildren:m.oneOfType([m.bool,m.func]).def(!0),autoOpenParentNode:m.bool.def(!0),expandAll:m.bool.def(!1),nodeContentAction:m.oneOfType([m.arrayOf(xe("nodeContentActionType",{}).def(x4.CLICK)),m.func.def(()=>["selected"])]).def(["selected","expand","click"]),keepSlotData:m.bool.def(!1),checkStrictly:m.bool.def(!0),intersectionObserver:m.oneOfType([m.bool.def(!1),m.shape({enabled:m.bool.def(!1),callback:m.func.def(void 0)})]).def(!1)},SV=e=>({renderEmpty:t=>a.createVNode(ml,{scene:"part",type:t},{default:()=>[e.emptyText]})}),TV=e=>{const t={enabled:e.intersectionObserver,once:!1,callback:null};let n=null,r=[],s=null;const i=()=>typeof e.intersectionObserver=="boolean"?t:typeof e.intersectionObserver=="object"?Object.assign({},t,e.intersectionObserver):t,o=a.computed(i),l=h=>h instanceof NodeList?Array.from(h):Array.isArray(h)?h:[h];return{unobserveAll:()=>{r==null||r.forEach(h=>{ra(h)&&(n==null||n.unobserve(h))}),n==null||n.disconnect(),s==null||s.disconnect()},intersectionObserver:o,initIntersectionObserver:(h,p,g)=>{if(o.value.enabled){if(!h){console.error("intersectionObserver.target is undefined");return}r=l(h);const v=Object.assign({rootMargin:"0px"},p);n=new IntersectionObserver(function(b){b.forEach(y=>{var N,w,C;if(console.log("entry",y.target),y.isIntersecting){const S=((N=g==null?void 0:g.beforeResponse)==null?void 0:N.call(g,y))??y;(C=(w=o.value).callback)==null||C.call(w,S),o.value.once&&n.unobserve(y.target)}})},v),r.forEach(b=>{ra(b)&&n.observe(b)})}},initRootMutationObserver:(h,p)=>{if(o.value.enabled&&!e.virtualRender&&ra(h)){const g={attributes:!0,childList:!0,subtree:!0};s=new MutationObserver((...v)=>{p==null||p(...v)}),s.observe(h,g)}},getLastVisibleElement:(h,p)=>{const{offsetHeight:g}=p,v=p.querySelectorAll("[data-tree-node]"),b=g+h;return Array.from(v).filter(N=>N.offsetHeight+N.offsetTop>=b&&N.offsetTop<b)}}},bl=(e,t)=>{const n=A=>e.schema.get(A),r=(A,P)=>{var B;return(B=n(A))==null?void 0:B[P]},s=(A,P,B,z)=>{if(!e.schema.has(A)){console.warn("node is not in schema, please check",z,A);return}e.schema.set(A,Object.assign({},n(A),{[P]:B}))},i=A=>e.data.find(P=>c(P)===A),o=(A,P,B)=>{if(Array.isArray(A)){Array.prototype.forEach.call(A,z=>s(i(z),P,B,A));return}s(i(A),P,B,A)},l=A=>r(A,me.PATH),c=A=>r(A,me.UUID),d=A=>r(A,me.IS_OPEN),f=A=>r(A,me.HAS_CHILD),u=A=>r(A,me.IS_MATCH),h=A=>r(A,me.IS_CHECKED),p=A=>r(r(A,me.PARENT),me.UUID),g=A=>r(A,me.IS_LOADING),v=A=>r(A,me.PARENT),b=A=>r(A,me.IS_MATCH),y=(A,P)=>{const B=e.data.find(z=>c(z)===A);return r(B,P)},N=A=>typeof A=="string"?y(A,me.IS_ROOT):r(A,me.IS_ROOT),w=A=>{const P=e.data.find(B=>c(B)===A);return p(P)},C=A=>{const P=e.data.find(B=>c(B)===A);return l(P)},S=(A,P)=>{s(A,me.IS_LOADING,P)},x=A=>typeof A=="object"?d(A):typeof A=="string"?y(A,me.IS_OPEN):!1,E=(A,P)=>r(r(A,me.PARENT),P),T=A=>x(r(A,me.PARENT)),O=A=>N(A)||x(A)||T(A),V=(A,P)=>{const z=A.split("-").reduce((D,k)=>{const G=Number(k);return Array.isArray(D)?D[G]:D[t.children][G]},t.data);return P&&Object.assign(z,{[me.UUID]:P}),z},_=A=>A[t.children]??[],L=A=>e.data.find(P=>c(P)===A),I=A=>{let P=A;return typeof P=="string"&&(P=L(P)),N(P)?{[t.children]:t.data}:v(P)},R=A=>({[ir[me.IS_LOADING]]:r(A,me.IS_LOADING),[ir[me.HAS_CHILD]]:f(A),[ir[me.IS_MATCH]]:u(A),[ir[me.IS_CHECKED]]:h(A),[ir[me.IS_OPEN]]:d(A),[ir[me.IS_ROOT]]:N(A),fullPath:r(A,me.PATH),uuid:c(A),parent:r(A,me.PARENT),parentId:c(r(A,me.PARENT))});return{getSchemaVal:n,getNodeAttr:r,getNodeId:c,getNodeById:i,getNodeParentId:p,getParentNodeData:I,getNodePathById:C,getNodeAttrById:y,getNodeParentIdById:w,getParentNodeAttr:E,getParentNode:v,setNodeAttr:s,setNodeAttrById:o,getNodePath:l,isRootNode:N,isNodeOpened:d,hasChildNode:f,isItemOpen:x,isNodeChecked:h,isNodeMatched:u,isNodeLoading:g,checkNodeIsOpen:O,getSourceNodeByPath:V,getSourceNodeByUID:L,isMatchedNode:b,resolveScopedSlotParam:R,setTreeNodeLoading:S,extendNodeAttr:A=>Object.assign({},A,{[me.TREE_NODE_ATTR]:R(A)}),getChildNodes:_,extendNodeScopedData:A=>({data:A,attributes:R(A)}),getIntersectionResponse:A=>{var G;if(!A)return null;let P=A;ra(A)&&(P=i(A.getAttribute("data-tree-node")));const B=r(P,me.DEPTH),z=r(P,me.IS_ROOT),D=r(P,me.PARENT),k=z?r(P,me.INDEX):(G=D==null?void 0:D[t.children])==null?void 0:G.findIndex(U=>U===P);return{level:B,target:A,index:k,parent:D,node:P,isRoot:z}}}},S4="1px dashed #c3cdd7",T4=(e,t,n=null,r=null,s=null,i=[])=>{const o=e[t];return typeof o=="boolean"?o?r:s:_4(n,e,t,i)},_4=(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 i=s.apply(void 0,[e,...r]);if(typeof i=="string")return i;console.error("props label with function return value is not string, please check and return string");return}},E4=(e,t)=>_4(e,t,"label"),_V=(e,t)=>({"--level-line":T4(t,"levelLine",e,S4,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),EV=(e,t,n,r=!0)=>{var o;const{schema:s}=n,i=(o=s.get(e))==null?void 0:o[me.DEPTH];if(r){const l=["node"],c=()=>T4(t,"levelLine",e,S4,null,l);return{"--depth":i,...typeof t.levelLine=="function"?{"--level-line":c()}:{}}}return{}},OV=(e,t,n,r=!0)=>{const{__is_root:s,__is_open:i}=t.get(e)||{},{resolveClassName:o}=he();return{"is-root":s,[`${o("tree-node")}`]:!0,"is-open":i,"is-virtual-render":n.virtualRender,"level-line":n.levelLine&&r}},AV=(e,t)=>{const{__is_checked:n,__is_selected:r}=t.get(e)||{},{resolveClassName:s}=he();return{"is-checked":n,"is-selected":r,"node-folder":e.is_folder,"node-leaf":e.is_leaf,[`${s("node-row")}`]:!0}},LV=(e,t,n,r,s)=>{VV(e,t,n,{[r]:s})},VV=(e,t,n,r)=>{const i=e.split("-").reduce((o,l)=>{const c=Number(l);return Array.isArray(o)?o[c]:o[n][c]},t);Object.assign(i,r||{})},ns=e=>e??{__IS_NULL:!0},$i=(e,t,n)=>Array.isArray(t)?t.some(r=>$i(e,r,n)):typeof t=="string"||typeof t=="number"?t===n:e===t,O4=(e,t)=>typeof e.showCheckbox=="function"?e.showCheckbox(t):e.showCheckbox,A4=(e,t)=>{const{setNodeAttr:n,getNodePath:r,getNodeAttr:s,resolveScopedSlotParam:i,setTreeNodeLoading:o}=bl(t,e),l=(f,u)=>{if(typeof f=="object"&&f!==null){n(u,me.IS_OPEN,!0);const h=Array.isArray(f)?f:[f];return LV(r(u),e.data,e.children,e.children,h),Promise.resolve(f)}return Promise.resolve(f)},c=f=>{const{callback:u=null,cache:h=!0}=e.async||{};if(typeof u=="function"&&s(f,me.IS_ASYNC)){if(n(f,me.IS_ASYNC_INIT,!0),!s(f,me.IS_CACHED)){n(f,me.IS_CACHED,h);const p=i(f),g=u(f,v=>l(v,f),p);if(typeof g=="object"&&g!==null)return o(f,!0),g instanceof Promise?Promise.resolve(g.then(v=>l(v,f)).catch(v=>console.error("load remote data error:",v)).finally(()=>{o(f,!1),n(f,me.IS_CACHED,!0)})):(l(g,f),o(f,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},d=()=>{const f=t.data.filter(u=>s(u,me.IS_ASYNC)&&u[ir[me.IS_OPEN]]&&!s(u,me.IS_ASYNC_INIT));f.length&&Promise.all(f.map(u=>c(u))).then(()=>{d()}).catch(u=>{console.warn(u)})};return{asyncNodeClick:c,deepAutoOpen:d}},DV=(e,t,n,r,s)=>{let i=e.selected;const{setNodeAttr:o,setNodeAttrById:l,getNodePath:c,getSchemaVal:d,getNodeAttr:f,getNodeId:u,getChildNodes:h,isRootNode:p,hasChildNode:g,isItemOpen:v,isNodeOpened:b,isNodeLoading:y,isNodeChecked:N,getParentNode:w,resolveScopedSlotParam:C,extendNodeAttr:S,extendNodeScopedData:x}=bl(n,e),{resolveClassName:E}=he(),{registerNextLoop:T}=s,{asyncNodeClick:O,deepAutoOpen:V}=A4(e,n),_=Z=>v(Z)?a.createVNode(jo,{class:[E("tree-icon"),E("node-prefix")]},null):a.createVNode(zo,{class:[E("tree-icon"),E("node-prefix")]},null),L=Z=>{if(typeof Z=="string")return Z;if(typeof Z=="object"&&Z!==null){if(a.isVNode(Z))return Z;const{node:ce,className:ie,text:F,style:K}=Z;return a.h(ce,{class:ie,style:K},F)}return null},I=Z=>{var ce,ie;return((ie=(ce=t.slots).nodeLoading)==null?void 0:ie.call(ce,Y(Z)))??y(Z)?a.createVNode(Ea,null,null):""},R=Z=>{if(t.slots.nodeAction)return t.slots.nodeAction(Y(Z));let ce=null;if(y(Z))return I(Z);if(typeof e.prefixIcon=="function"&&(ce=e.prefixIcon(Y(Z),"node_action"),ce!=="default"))return L(ce);if(ce==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon){const ie=typeof e.autoCheckChildren=="function"?e.autoCheckChildren(Z):e.autoCheckChildren;if(g(Z)||Z.async||!ie)return v(Z)?a.createVNode(Ms,{class:E("node-prefix")},null):a.createVNode(Bs,{class:E("node-prefix")},null)}return null},M=Z=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(Y(Z));let ce=null;return typeof e.prefixIcon=="function"&&(ce=e.prefixIcon(Y(Z),"node_type"),ce!=="default")?L(ce):ce==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?p(Z)||g(Z)?_(Z):a.createVNode(Zo,{class:[E("tree-icon"),E("node-prefix")]},null):null},j=(Z,ce)=>{const ie=w(Z);if(ie){const F=ce||(h(ie)||[]).some(K=>N(K));o(ie,me.IS_CHECKED,F),o(ie,me.IS_INDETERMINATE,(h(ie)||[]).some(K=>!N(K)||B(K))),p(ie)||j(ie,ce)}},H=(Z,ce,ie)=>{h(Z).forEach(F=>{Array.isArray(ce)?ce.forEach((K,W)=>{o(F,K,ie[W])}):o(F,ce,ie),H(F,ce,ie)})},A=Z=>{var ce,ie,F;return(ie=(ce=e.async)==null?void 0:ce.trigger)!=null&&ie.length?(F=e.async)==null?void 0:F.trigger.includes(Z):!0},P=(Z,ce,ie)=>{ie==null||ie.preventDefault(),ie==null||ie.stopImmediatePropagation(),ie==null||ie.stopPropagation(),o(Z,me.IS_CHECKED,!!ce),ce&&o(Z,me.IS_INDETERMINATE,!1),e.checkStrictly&&(H(Z,[me.IS_CHECKED,me.IS_INDETERMINATE],[!!ce,!1]),j(Z,ce)),t.emit(Ot.NODE_CHECKED,n.data.filter(F=>N(F)),n.data.filter(F=>B(F))),le(Z,ie,"checked")},B=Z=>N(Z)&&f(Z,me.IS_INDETERMINATE),z=Z=>O4(e,x(Z))?a.createVNode("span",{class:"node-check-box",onClick:oe},[a.createVNode(Ct,{indeterminate:B(Z),modelValue:N(Z),size:"small",onChange:(ce,ie)=>P(Z,!!ce,ie)},null)]):null,D=(Z,ce=null,ie=null,F=!0)=>{const K=ce===null?!v(Z):!!ce;if(K||H(Z,me.IS_OPEN,K),o(Z,me.IS_OPEN,K),F){const W=v(Z)?Ot.NODE_EXPAND:Ot.NODE_COLLAPSE;t.emit(W,Z,C(Z),d(Z),ie)}},k=(Z,ce,ie)=>{if(Array.isArray(Z)){Z.forEach(F=>o(ns(F),ce,ie));return}o(ns(Z),ce,ie)},G=(Z,ce=!0,ie=!1)=>{U(Z,me.IS_OPEN,ce,ie&&ce)},U=(Z,ce,ie,F=!1)=>{const K=ns(Z);if(K[me.IS_NULL])return;const W=Array.isArray(ce)?ce:[ce],q=Array.isArray(ie)?ie:[ie];if(F){if(W.forEach((se,fe)=>k(K,se,q[fe])),!p(K)){const se=w(K);W.forEach((fe,ee)=>{f(se,fe)!==ie&&U(se,fe,q[ee],F)})}}else W.forEach((se,fe)=>k(K,se,q[fe]))},te=(Z,ce,ie)=>{if(v(Z)){D(Z,!1,ce,!0);return}A(ie)&&O(Z).finally(()=>{f(Z,me.IS_LOADING)?T("setNodeOpenedAfterLoading",{type:"once",fn:()=>D(Z,!0,ce,!0)}):D(Z,!0,ce,!0)})},$=(Z,ce)=>{Z.stopImmediatePropagation(),Z.stopPropagation(),Z.preventDefault(),te(ce,Z,"expand")},Q=(Z,ce=!0,ie=!0,F=!1,K="")=>{const W=Array.isArray(Z)?Z:[Z];if(!W.length)return;let q=ns(W[0]);if((typeof q=="string"||typeof q=="number"||typeof q=="symbol")&&(q=n.data.find(se=>u(se)===q)??{[me.IS_NULL]:!0}),!q[me.IS_NULL]){if(!e.selectable||typeof e.selectable=="function"&&!e.selectable(Z)||e.disabledFolderSelectable&&q.is_folder===!0){console.warn("props.selectable is false or undefined, please set selectable with true");return}i!=null&&l(i,me.IS_SELECTED,!ce),e.selected&&e.selected!==i&&l(e.selected,me.IS_SELECTED,!ce),o(q,me.IS_SELECTED,ce),i=u(q),F&&t.emit(Ot.NODE_SELECTED,{selected:ce,node:q}),ie&&W.length===1&&G(q,!0,!0),f(q,me.IS_ASYNC)&&A(K)&&O(q).then(()=>{a.nextTick(()=>{W.shift(),Q(W,ce,ie,F,K)})})}},ne=Z=>typeof e.nodeContentAction=="function"?Reflect.apply(e.nodeContentAction,void 0,[{node:Z}]):typeof e.nodeContentAction=="string"?[e.nodeContentAction]:Array.isArray(e.nodeContentAction)?e.nodeContentAction:["selected","expand","click"],le=(Z,ce,ie)=>{const F=ne(Z);if(F.includes("selected")&&Q(Z,!0,!0,!0,ie),F.includes("expand")&&(b(Z)||te(Z,ce,ie)),F.includes("collapse")&&b(Z)&&te(Z,ce,ie),F.includes("click")){const K=Ot.NODE_CLICK;t.emit(K,Z,C(Z),d(Z),ce)}},ae=(Z,ce)=>{if(p(ce))return!1;const ie=c(ce),F=`${ie}`.split("-").slice(0,Z+1);if(F.join("-")===ie)return!0;const W=F.pop(),q=parseInt(W,10);F.push(`${q+1}`);const se=F.join("-");return n.data.some(fe=>c(fe)===se)},X=Z=>{if(!e.levelLine)return null;const ce=F=>({"--depth":F}),ie=(f(Z,me.DEPTH)??0)+1;return new Array(ie).fill("").map((F,K)=>K).filter(F=>ae(F,Z)).filter(F=>F>0).map(F=>a.createVNode("span",{style:ce(ie-F),class:"node-virtual-line"},null))},J=Z=>{var ce,ie,F,K;return t.slots.node?(ie=(ce=t.slots).node)==null?void 0:ie.call(ce,Y(Z)):t.slots.default?(K=(F=t.slots).default)==null?void 0:K.call(F,x(Z)):[E4(Z,e)]},Y=Z=>e.keepSlotData?x(Z):S(Z),oe=Z=>{Z.stopImmediatePropagation(),Z.stopPropagation()};return{renderTreeNode:(Z,ce=!0)=>{var F,K;const ie=R(Z);return a.createVNode("div",{key:u(Z),class:AV(Z,n.schema),"data-tree-node":u(Z)},[a.createVNode("div",{style:EV(Z,e,n,ce),class:OV(Z,n.schema,e,ce),onClick:W=>le(Z,W,"click")},[a.createVNode("div",{class:[E("node-action"),ie?"":"empty-child"],onClick:W=>$(W,Z)},[ie]),a.createVNode("div",{class:E("node-content")},[[z(Z),M(Z)],a.createVNode("span",{class:E("node-text")},[J(Z)]),(K=(F=t.slots).nodeAppend)==null?void 0:K.call(F,Y(Z))]),ce&&X(Z)])])},handleTreeNodeClick:te,deepAutoOpen:V,asyncNodeClick:O,setNodeAction:k,setNodeOpened:D,setSelect:Q,setOpen:G,setNodeAttribute:U,isIndeterminate:B}},kV=(e,t,n,r)=>{const{getSourceNodeByUID:s,getParentNodeData:i,getNodeParentIdById:o,extendNodeAttr:l,getNodeAttrById:c,isRootNode:d,setNodeAttrById:f}=bl(r,e),{resolveClassName:u}=he(),h=a.computed(()=>typeof e.disableDrag=="function"),p=a.computed(()=>typeof e.disableDrop=="function"),g=e.dragThreshold||.2;let v="",b=null,y=new WeakMap;const N=A=>A.target.closest("[data-tree-node]"),w=A=>{var B;const P=(B=A==null?void 0:A.dataset)==null?void 0:B.treeNode;return s(P)},C=(A,P,B)=>{B.forEach(z=>A.classList.remove(z)),P.forEach(z=>A.classList.add(z))},S=A=>{N(A).removeEventListener("mouseup",S)},x=A=>{const P=N(A),B=w(P);if(B.draggable===!1||h.value&&e.disableDrag(B)){P.classList.add(`${u("tree-drag-disabled")}`);return}P.setAttribute("draggable","true"),P.addEventListener("mouseup",S)},E="drop-before",T="drop-after",O="drop-inner";let V=null;const _=Fr(A=>{if(A.preventDefault(),!b)return;const P=N(A);V!==P&&(V==null||V.classList.remove(E,T,O),V=P);const B=l(w(P));y.has(P)||y.set(P,P.getBoundingClientRect());const z=A.clientY,{top:D,height:k}=y.get(P),G=k*g,U=z-D;if(U<G?C(P,[E],[T,O]):U>k-G?C(P,[T],[E,O]):C(P,[O],[E,T]),t.emit(Ot.NODE_DRAG_OVER,A,P,B),p.value&&(e!=null&&e.disableDrop(B))){A.dataTransfer.effectAllowed="move",A.dataTransfer.dropEffect="none",P.classList.add(`${u("tree-drop-disabled")}`);return}P.classList.add(`${u("tree-drop-active")}`);let te=A.dataTransfer.getData("node-id");te=v;const $=P.getAttribute("data-tree-node"),Q=R(te,$)?"move":"none";A.dataTransfer.effectAllowed=Q,A.dataTransfer.dropEffect=Q}),L=A=>{A.dataTransfer.effectAllowed="move",A.dataTransfer.dropEffect="move";const P=N(A);A.dataTransfer.setData("text/plain","");const B=P.getAttribute("data-tree-node");v=B,b=P,A.dataTransfer.setData("node-id",B),t.emit(Ot.NODE_DRAG_START,A,P)},I=A=>{A.preventDefault(),A.stopPropagation();const P=N(A);if(!P)return;P.classList.remove(`${u("tree-drop-active")}`,`${u("tree-drop-disabled")}`);const B=l(w(P));if(p.value&&e.disableDrop(B))return;const z=v,D=P.getAttribute("data-tree-node");z!==D&&(V!=null&&V.classList.contains(O)?Reflect.apply(j,void 0,[z,D]):(V!=null&&V.classList.contains(T)||V!=null&&V.classList.contains(E))&&Reflect.apply(M,void 0,[z,D]),t.emit(Ot.NODE_DROP,A,P,B)),y=new WeakMap,V==null||V.classList.remove(T,E,O),V=null},R=(A,P)=>A!==P,M=(A,P)=>{if(!e.dragSort||!R(A,P))return;const B=s(A),z=s(P);if(!B||!z)return;const D=i(A),k=i(P);if(!D||!k||e.dragSortMode==="next"&&D!==k)return;const G=e.children,U=D[G],te=k[G];if(!Array.isArray(U))return;let $=U.findIndex(ne=>ne===B),Q=te.findIndex(ne=>ne===z);$===-1||Q===-1||(U.splice($,1),V!=null&&V.classList.contains(T)?($<Q&&(Q=Q-1),Q=Q+1):V!=null&&V.classList.contains(E),te.splice(Q,0,B),te.forEach((ne,le)=>{const ae=c(ne[me.UUID],me.UUID)||ne[me.UUID];ae&&f(ae,me.INDEX,le)}),U.forEach((ne,le)=>{const ae=c(ne[me.UUID],me.UUID)||ne[me.UUID];ae&&f(ae,me.INDEX,le)}),t.emit(Ot.NODE_DRAG_SORT,{sourceNode:B,targetNode:z,sourceIndex:$,targetIndex:Q,targetSlibings:te}))},j=(A,P)=>{const B=s(A),z=s(P);let D=null;if(d(A))D=e.data;else{const k=o(A);if(k!=null){D=s(k);const G=c(A,me.INDEX);D==null||D[e.children].splice(G,1)}}z[e.children]||(z[e.children]=[]),z[e.children].unshift(B)},H=A=>{A.preventDefault();const P=N(A);y.has(P)&&y.delete(P),P.classList.remove(`${u("tree-drop-active")}`,`${u("tree-drop-disabled")}`),P.classList.remove(T,E,O),t.emit(Ot.NODE_DRAG_LEAVE,A,P)};a.onMounted(()=>{if((e.draggable||e.dragSort)&&n.value){const A=n.value.$el;A.addEventListener("mousedown",x),A.addEventListener("dragstart",L),A.addEventListener("dragover",_),A.addEventListener("dragleave",H),A.addEventListener("drop",I)}}),a.onUnmounted(()=>{if((e.draggable||e.dragSort)&&n.value){const A=n.value.$el;A.removeEventListener("mousedown",x),A.removeEventListener("dragstart",L),A.removeEventListener("dragover",_),A.removeEventListener("dragleave",H),A.removeEventListener("drop",I)}})},RV=e=>{const t=a.toRef(e,"search"),{resultType:n="tree",showChildNodes:r=!0}=e.search??{},s=h=>["string","number","boolean"].includes(typeof h),i=(h,p)=>h===p,o=(h,p)=>new RegExp(`${h}`,"i").test(`${p}`),l=(h,p)=>Reflect.apply(h,void 0,p),c=t.value===void 0||t.value===!1,d=(h,p)=>{if(c)return!0;if(s(t.value))return`${t.value}`.length===0?!1:l(o,[t.value,h,p]);const{value:g="",match:v="fuzzy"}=t.value,y=typeof v=="function"?v:v==="fuzzy"?o:i;return`${g}`.length===0?!1:l(y,[g,h,p])},f=a.computed(()=>{if(t.value===!1)return!1;if(s(t.value))return`${t.value}`.length>0;const{value:h=""}=t.value;return`${h}`.length>0}),u=a.computed(()=>n==="tree");return{searchFn:d,refSearch:t,isSearchActive:f,isSearchDisabled:c,resultType:n,isTreeUI:u,showChildNodes:r}},IV=e=>{var v;const t=(b=void 0,y=null)=>{const{data:N,children:w}=e,C=[],S=[];let x=0;const E=new WeakMap;function T(A,P,B,z){if(A!=null&&E.has(A)){const D=E.get(A);if(Object.prototype.hasOwnProperty.call(D,P)&&typeof z=="function"&&Reflect.apply(z,self,[D,P,B,A])){if(D[P]===B)return;Object.assign(D,{[P]:B}),T(D[me.PARENT],P,B,z)}}}function O(A){let P=null;return typeof e.nodeKey=="string"&&(P=A[e.nodeKey]||rn()),P||A[me.UUID]||rn()}const V={[me.IS_OPEN]:()=>!!e.expandAll,[me.IS_CHECKED]:()=>!1,[me.IS_MATCH]:()=>!1,[me.IS_SELECTED]:(A,P)=>$i(A,e.selected,P),[me.IS_CACHED]:()=>!1,[me.IS_ASYNC]:()=>null,[me.IS_LOADING]:()=>!1};function _(A,P,B,z=void 0){let D=z;z===void 0&&typeof V[B]=="function"&&(D=V[B](P,A));const k=ir[B];if(Object.prototype.hasOwnProperty.call(P,k))return P[k];const G=(y==null?void 0:y.get(P))??void 0;let U;return G&&(U=G[B]),U==null&&(U=D),U}function L(A,P){if(!e.selectable)return!1;const B=$i(P,e.selected,A);return _(A,P,me.IS_SELECTED,B)}function I(A,P,B){var k;const z=_(A,P,me.IS_OPEN),D=E.has(B)?(k=E.get(B))==null?void 0:k[me.IS_OPEN]:!0;return z&&D}function R(A,P,B){if(!O4(e,{data:A,attributes:B}))return!1;const D=$i(A,e.checked,P);return _(P,A,me.IS_CHECKED,D)}function M(A){return!((A==null?void 0:A[me.IS_OPEN])??!1)}function j(A,P,B,z){return A[me.IS_INDETERMINATE]=(z[e.children]||[]).some(D=>{var k;return!(((k=E.get(D))==null?void 0:k[me.IS_CHECKED])??!1)}),!0}function H(A,P=0,B=null,z=null){const D=A.length;for(let k=0;k<D;k++){const G=A[k];if(Array.isArray(G))H(G,P,B,z);else if(typeof G=="object"&&G!==null){const U=z!==null?`${z}-${k}`:`${k}`,te=`${O(G)}`,$=!!(G[w]||[]).length;let Q=_(te,G,me.IS_OPEN);e.autoOpenParentNode?Q&&T(B,me.IS_OPEN,!0,M):Q=I(te,G,B);const ne={[me.DEPTH]:P,[me.INDEX]:k,[me.UUID]:te,[me.PARENT]:B,[me.HAS_CHILD]:$,[me.PATH]:U,[me.IS_ROOT]:B===null,[me.ORDER]:x,[me.IS_SELECTED]:L(te,G),[me.IS_MATCH]:_(te,G,me.IS_MATCH),[me.IS_OPEN]:Q,[me.IS_CHECKED]:void 0,[me.IS_CACHED]:_(te,G,me.IS_CACHED),[me.IS_ASYNC]:_(te,G,me.IS_ASYNC),[me.IS_LOADING]:_(te,G,me.IS_LOADING),[me.IS_INDETERMINATE]:!1};ne[me.IS_CHECKED]=R(G,te,ne),ne[me.IS_CHECKED]&&C.push(G),E.set(G,ne),S.push(G),x+=1,Object.prototype.hasOwnProperty.call(G,w)&&H(G[w]||[],P+1,G,U)}}}return H(b??N),e.showCheckbox!==!1&&e.checkStrictly&&(C==null||C.forEach(A=>{T(A,me.IS_CHECKED,!0,j)})),[S,E]},n=t(),r=new Map,s=[],i=[],o=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),{asyncNodeClick:l,deepAutoOpen:c}=A4(e,o),d=b=>{s.push(b)},f=(b,y,N=!0)=>{N&&r.has(b)&&r.delete(b),r.set(b,y)},u=b=>typeof b=="function"?{type:"loop",fn:b}:typeof b=="object"&&typeof b.type=="string"&&typeof b.fn=="function"?b:(console.error("loop event error",b),null),h=b=>{const y=u(b);return y!==null&&Reflect.apply(y.fn,void 0,[]),(y==null?void 0:y.type)??"once"},p=()=>{Array.from(r.keys()).forEach(b=>{const y=r.get(b);if(Array.isArray(y)){const N=[];y.forEach((w,C)=>{h(w)==="once"&&N.unshift(C)}),N.length&&N.forEach(w=>y.splice(w,1)),y.length===0&&r.delete(b)}else h(y)==="once"&&r.delete(b)})};a.watch(()=>[e.data],b=>{var N,w;const y=t(b[0],o.schema);o.data=y[0],o.schema=y[1],(N=e.async)!=null&&N.callback&&((w=e.async)==null?void 0:w.deepAutoOpen)==="every"&&c(),p()},{deep:!0}),e.selectable&&a.onMounted(()=>{a.watch(()=>e.selected,b=>{i.length=0,s.forEach(y=>{Reflect.apply(y,void 0,[b]),i.push(()=>Reflect.apply(y,void 0,[b]))}),f("afterSelectWatch",i)},{immediate:!0})});const g=b=>{f("afterDataUpdate",b)};return(v=e.async)!=null&&v.callback&&c(),{flatData:o,asyncNodeClick:l,deepAutoOpen:c,afterDataUpdate:g,registerNextLoop:f,onSelected:d}},PV=a.defineComponent({name:"Tree",props:xV,emits:NV,setup(e,t){const n=a.ref(),{flatData:r,onSelected:s,registerNextLoop:i}=IV(e),{checkNodeIsOpen:o,isRootNode:l,isNodeOpened:c,isNodeChecked:d,isNodeMatched:f,hasChildNode:u,getNodePath:h,getNodeId:p,getNodeAttr:g,getNodeById:v,getParentNode:b,getIntersectionResponse:y}=bl(r,e),{searchFn:N,isSearchActive:w,refSearch:C,isSearchDisabled:S,isTreeUI:x,showChildNodes:E}=RV(e),T=a.reactive([]),O=ae=>{if(w.value){if(E){const J=`${h(ae)??""}-`;return o(ae)&&(f(ae)||T.some(Y=>J.indexOf(`${Y}-`)===0))}return o(ae)&&f(ae)}return o(ae)},V=a.computed(()=>r.data.filter(ae=>O(ae))),{getLastVisibleElement:_,intersectionObserver:L}=TV(e),{renderTreeNode:I,handleTreeNodeClick:R,setOpen:M,setNodeAction:j,setSelect:H,asyncNodeClick:A,setNodeAttribute:P,isIndeterminate:B}=DV(e,t,r,V,{registerNextLoop:i}),z=Es(120,()=>{T.length=0,r.data.forEach(ae=>{const X=N(E4(ae,e),ae);X&&T.push(h(ae)),P(ae,[me.IS_MATCH],[X],x.value&&X)})});S||a.watch([C],()=>{z()},{deep:!0,immediate:!0}),a.onMounted(()=>{e.virtualRender&&a.nextTick(()=>{U()})});const D=(ae,X=!0,J=!1)=>{j(ns(ae),me.IS_CHECKED,X),J&&t.emit(Ot.NODE_CHECKED,r.data.filter(Y=>d(Y)),r.data.filter(Y=>B(Y)))};s(ae=>{H(ae,!0,e.autoOpenParentNode,!0)});const k=()=>r;a.watch(()=>[e.checked],()=>{D(e.checked,!0)});const G=()=>{var ae;(ae=n.value)==null||ae.reset()},U=ae=>{if(ae==null){n.value.fixToTop({index:1});return}if(e.nodeKey&&Object.prototype.hasOwnProperty.call(ae,e.nodeKey)){n.value.fixToTop({index:V.value.findIndex(J=>J[e.nodeKey]===ae[e.nodeKey])+1});return}if(ae.id!==void 0&&ae.id!==null){n.value.fixToTop({index:V.value.findIndex(J=>J[e.nodeKey]===ae.id)+1});return}if(ae.index>=0){n.value.fixToTop({index:ae.index});return}const X=p(ae);if(X){n.value.fixToTop({index:V.value.findIndex(J=>p(J)===X)+1});return}},te=(ae,X=!0,J=!1)=>{D(v(ae),X,J)};t.expose({handleTreeNodeClick:R,isNodeChecked:d,isRootNode:l,isNodeOpened:c,isNodeMatched:f,hasChildNode:u,setOpen:M,setChecked:D,setCheckedById:te,setNodeAction:j,setNodeOpened:M,setSelect:H,scrollToTop:U,asyncNodeClick:A,getData:k,reset:G,getNodeAttr:g,getParentNode:b});const{renderEmpty:$}=SV(e);kV(e,t,n,r);const Q=ae=>{var J,Y;if(ae.length)return ae.map(oe=>I(oe,!w.value||x.value));const X=w.value?"search-empty":"empty";return((Y=(J=t.slots).empty)==null?void 0:Y.call(J))??$(X)},ne=([ae,X,J])=>{var Y,oe,pe,Z;if(L.value.enabled&&ae.offset.y>5){if(!e.virtualRender){const ie=_(ae.offset.y,n.value.refRoot),F=y(ie[0]);(oe=(Y=L.value)==null?void 0:Y.callback)==null||oe.call(Y,F),t.emit(Ot.NODE_ENTER_VIEW,F);return}const ce=y(J.slice(-1)[0]);(Z=(pe=L.value)==null?void 0:pe.callback)==null||Z.call(pe,ce),t.emit(Ot.NODE_ENTER_VIEW,ce);return}},{resolveClassName:le}=he();return()=>a.createVNode(Ws,{ref:n,style:_V(null,e),height:e.height,class:le("tree"),contentClassName:le("container"),enabled:e.virtualRender,keepAlive:!0,lineHeight:e.lineHeight,list:V.value,rowKey:me.UUID,throttleDelay:0,onContentScroll:ne},{default:ae=>Q(ae.data||[])})}}),L4=Ie(PV),Or="upload";var zn=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(zn||{}),Qf=(e=>(e.BINARY="binary",e.FORMDATA="formdata",e))(Qf||{}),Xr=(e=>(e.FAIL="fail",e.NEW="new",e.SUCCESS="success",e.UPLOADING="uploading",e))(Xr||{});const fm=[zn.BUTTON,zn.DRAGGABLE,zn.PICTURE],hm=[Qf.FORMDATA,Qf.BINARY],jt={type:{type:String,default:"formdata",validator:e=>!e||hm.includes(e)?!0:(console.error(`invalid type, ${e}, the type must be one of 【${hm.join(" | ")}】`),!1)},theme:{type:String,default:"draggable",validator:e=>!e||fm.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of 【${fm.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},isShowPreview:{type:Boolean,default:!0}};function mm(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const MV=a.defineComponent({name:"UploadList",props:{theme:jt.theme,disabled:jt.disabled,files:jt.files,multiple:jt.multiple,isShowPreview:jt.isShowPreview},emits:["remove","preview","retry"],setup(e,{slots:t,emit:n}){const r=Be("upload"),{resolveClassName:s}=he(),{theme:i,disabled:o,multiple:l,isShowPreview:c}=a.toRefs(e),d=`${s(Or)}-list`,f=a.computed(()=>i.value===zn.PICTURE),u=a.computed(()=>f.value&&!l.value),h=a.computed(()=>Ae({[d]:!0,[`${d}--${i.value}`]:!0,[`${d}--disabled`]:o.value}));function p(x){const E=["Bytes","KB","MB","GB","TB"],T=Math.floor(Math.log(x)/Math.log(1024));return`${(x/1024**T).toFixed(2)}${E[T]}`}function g(x,E,T){n("preview",x,E,T)}function v(x,E){n("remove",x,E)}function b(x,E){n("retry",x,E)}const y=()=>{let x;return a.createVNode(a.TransitionGroup,{name:`${d}__item`},mm(x=e.files.map(E=>{const T=Ae({[`${d}__item`]:!0,[`${d}__item-picture`]:!0,[`${d}__item--${E.status}`]:!0});return a.createVNode("li",{key:E.uid,class:T},[t!=null&&t.file?t.file({file:E}):N(E)])}))?x:{default:()=>[x]})},N=x=>[a.withDirectives(a.createVNode("img",{class:`${d}__picture-item-thumbnail`,alt:"",src:x.url},null),[[a.vShow,x.status!=="uploading"]]),a.createVNode(a.Fragment,null,[x.status==="uploading"&&a.createVNode(xs,{width:50,class:`${d}__picture-item-progress`,bgColor:"#333",color:"#3a84ff",percent:x.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!o.value&&a.createVNode("div",{class:`${d}__picture-item-actions`},[c.value&&a.createVNode(_a,{class:"action-icon",onClick:E=>g(x,e.files,E)},null),a.createVNode(ya,{class:"action-icon",onClick:E=>v(x,E)},null)])])],w=()=>{let x;return a.createVNode(a.TransitionGroup,{name:`${d}__item`},mm(x=e.files.map(E=>{const T=Ae({[`${d}__item`]:!0,[`${d}__item--${E.status}`]:!0});return a.createVNode("li",{key:E.uid,class:T},[t!=null&&t.file?t.file({file:E}):S(E)])}))?x:{default:()=>[x]})},C=x=>{var L;const E=(L=x==null?void 0:x.raw)==null?void 0:L.type,[T]=(E==null?void 0:E.split("/"))||"";let V={text:ta,image:qo,application:ta,video:nl,audio:Io}[T]||ta;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(E)&&(V=Vo),a.h(V,{class:`${d}__item-file-icon`})},S=x=>[a.createVNode("div",{class:`${d}__item-icon`},[x.isPic?a.createVNode("img",{class:`${d}__item-thumbnail`,alt:"",src:x.url},null):C(x)]),a.createVNode("div",{class:`${d}__item-summary`},[a.createVNode("div",{class:`${d}__item-name`,title:x.name},[x.name]),x.status!=="uploading"&&a.createVNode("div",{class:`${d}__item-message`,title:x.statusText},[x.status==="success"&&a.createVNode(a.Fragment,null,[a.createVNode(zr,{class:`${d}__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(xs,{class:`${d}__item-progress`,percent:x.percentage,showText:!1,size:"small"},null),x.status!=="fail"&&a.createVNode("div",{class:`${d}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${d}__item-speed-size`},[p(x.size)]),[[a.vShow,x.size]]),a.withDirectives(a.createVNode("span",{class:`${d}__item-speed-percentage`},[x.percentage,a.createTextVNode("%")]),[[a.vShow,x.status==="uploading"]])]),!o.value&&a.createVNode("div",{class:`${d}__item-actions`},[x.status==="fail"&&a.createVNode(Yo,{class:`${d}__item-retry-icon`,onClick:E=>b(x,E)},null),a.createVNode(ya,{class:`${d}__item-del-icon`,onClick:E=>v(x,E)},null)])])];return()=>{var x,E,T;return a.createVNode(a.Fragment,null,[u.value?(E=t==null?void 0:t.innerTrigger)==null?void 0:E.call(t,(x=e.files)==null?void 0:x[0]):a.createVNode("ul",{class:h.value},[f.value?y():w(),(T=t==null?void 0:t.innerTrigger)==null?void 0:T.call(t)])])}}}),pm=a.defineComponent({name:"UploadTrigger",props:{theme:jt.theme,disabled:jt.disabled,multiple:jt.multiple,accept:jt.accept,file:{type:Object},selectChange:jt.selectChange,isShowPreview:jt.isShowPreview},emits:["change","remove","preview"],setup(e,{slots:t,emit:n}){const r=Be("upload"),{resolveClassName:s}=he(),{theme:i,disabled:o,file:l,multiple:c,accept:d,isShowPreview:f}=a.toRefs(e),u=`${s(Or)}-trigger`,h=a.computed(()=>i.value===zn.BUTTON),p=a.computed(()=>i.value===zn.DRAGGABLE),g=a.computed(()=>i.value===zn.PICTURE),v=a.computed(()=>g.value&&!c.value),b=a.computed(()=>g.value&&!d.value?"image/png,image/jpeg,image/jpg":d.value),y=a.ref(null),N=a.computed(()=>{var j;return Ae({[u]:!0,[`${u}--${i.value}`]:!0,[`${u}--single-picture`]:v.value,[`${u}--has-file`]:l.value??!1,[`${u}--${(j=l.value)==null?void 0:j.status}`]:l.value??!1,[`${u}--dragover`]:O.value,[`${u}--disabled`]:o.value})}),w=()=>{y.value.value=null,y.value.click()},C=j=>{var A;if(e.selectChange&&((A=e.selectChange)==null?void 0:A.call(e,j))===!1)return!1;const{files:H}=j.target;n("change",Array.from(H))},S=()=>{e.disabled||w()},x=j=>{j.defaultPrevented||j.target!==j.currentTarget||((j.code==="Enter"||j.code==="Space")&&w(),j.preventDefault())};function E(j,H){n("remove",j,H),H.stopPropagation(),H.preventDefault()}function T(j,H){n("preview",j,[j],H),H.stopPropagation(),H.preventDefault()}const O=a.ref(!1),V=()=>{const j=B=>{var D;if(o.value)return;if(B.preventDefault(),O.value=!1,e.selectChange&&((D=e.selectChange)==null?void 0:D.call(e,B))===!1)return!1;const z=Array.from(B.dataTransfer.files);n("change",z)},H=B=>{B.preventDefault(),O.value=!0},A=()=>{O.value=!1},P=Ae({[`${u}__draggable`]:!0});return a.createVNode("div",{class:P,onDragleave:A,onDragover:H,onDrop:j},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(gs,{class:`${u}__draggable-icon`},null),a.createVNode("div",{class:`${u}__draggable-text`},[r.value.drapFileOr,a.createVNode("span",{class:`${u}__draggable-upload-link`},[r.value.clickUpload])])])])},_=()=>a.createVNode(a.Fragment,null,[v.value&&e.file?I(e.file):L()]),L=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${u}__picture-inner`},[a.createVNode(Hs,{class:`${u}__picture-icon`},null),a.createVNode("div",{class:`${u}__picture-text`},[r.value.clickUpload])])]),I=j=>[a.withDirectives(a.createVNode("img",{class:`${u}__picture-thumbnail`,alt:"",src:j.url},null),[[a.vShow,j.status!=="uploading"]]),a.createVNode(a.Fragment,null,[j.status==="uploading"&&a.createVNode(xs,{width:50,class:`${u}__picture-progress`,bgColor:"#333",color:"#3a84ff",percent:j.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${u}__picture-actions`},[f.value&&a.createVNode(_a,{class:"action-icon",onClick:H=>T(j,H)},null),a.createVNode(ya,{class:"action-icon",onClick:H=>E(j,H)},null)])])],R=()=>a.createVNode(it,{disabled:o.value},{default:()=>[a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(gs,{class:`${u}__button-icon`},null),a.createVNode("span",{class:`${u}__button-text`},[r.value.uploadLabel])])])]}),M=()=>{if(h.value)return R();if(p.value)return V();if(g.value)return _()};return()=>{var j;return a.createVNode("div",{class:N.value,tabindex:"0",onClick:S,onKeydown:x},[t.trigger?[t.trigger(),(j=t==null?void 0:t.default)==null?void 0:j.call(t)]:M(),a.createVNode("input",{ref:y,class:`${u}__input-file`,accept:b.value,disabled:o.value,multiple:c.value,tabindex:"-1",type:"file",onChange:C},null)])}}});var bf={exports:{}},gm;function $V(){return gm||(gm=1,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(y,N){var w=y[0],C=y[1],S=y[2],x=y[3];w+=(C&S|~C&x)+N[0]-680876936|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[1]-389564586|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[2]+606105819|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[3]-1044525330|0,C=(C<<22|C>>>10)+S|0,w+=(C&S|~C&x)+N[4]-176418897|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[5]+1200080426|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[6]-1473231341|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[7]-45705983|0,C=(C<<22|C>>>10)+S|0,w+=(C&S|~C&x)+N[8]+1770035416|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[9]-1958414417|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[10]-42063|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[11]-1990404162|0,C=(C<<22|C>>>10)+S|0,w+=(C&S|~C&x)+N[12]+1804603682|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[13]-40341101|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[14]-1502002290|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[15]+1236535329|0,C=(C<<22|C>>>10)+S|0,w+=(C&x|S&~x)+N[1]-165796510|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[6]-1069501632|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[11]+643717713|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[0]-373897302|0,C=(C<<20|C>>>12)+S|0,w+=(C&x|S&~x)+N[5]-701558691|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[10]+38016083|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[15]-660478335|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[4]-405537848|0,C=(C<<20|C>>>12)+S|0,w+=(C&x|S&~x)+N[9]+568446438|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[14]-1019803690|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[3]-187363961|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[8]+1163531501|0,C=(C<<20|C>>>12)+S|0,w+=(C&x|S&~x)+N[13]-1444681467|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[2]-51403784|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[7]+1735328473|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[12]-1926607734|0,C=(C<<20|C>>>12)+S|0,w+=(C^S^x)+N[5]-378558|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[8]-2022574463|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[11]+1839030562|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[14]-35309556|0,C=(C<<23|C>>>9)+S|0,w+=(C^S^x)+N[1]-1530992060|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[4]+1272893353|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[7]-155497632|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[10]-1094730640|0,C=(C<<23|C>>>9)+S|0,w+=(C^S^x)+N[13]+681279174|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[0]-358537222|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[3]-722521979|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[6]+76029189|0,C=(C<<23|C>>>9)+S|0,w+=(C^S^x)+N[9]-640364487|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[12]-421815835|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[15]+530742520|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[2]-995338651|0,C=(C<<23|C>>>9)+S|0,w+=(S^(C|~x))+N[0]-198630844|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[7]+1126891415|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[14]-1416354905|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[5]-57434055|0,C=(C<<21|C>>>11)+S|0,w+=(S^(C|~x))+N[12]+1700485571|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[3]-1894986606|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[10]-1051523|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[1]-2054922799|0,C=(C<<21|C>>>11)+S|0,w+=(S^(C|~x))+N[8]+1873313359|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[15]-30611744|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[6]-1560198380|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[13]+1309151649|0,C=(C<<21|C>>>11)+S|0,w+=(S^(C|~x))+N[4]-145523070|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[11]-1120210379|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[2]+718787259|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[9]-343485551|0,C=(C<<21|C>>>11)+S|0,y[0]=w+y[0]|0,y[1]=C+y[1]|0,y[2]=S+y[2]|0,y[3]=x+y[3]|0}function i(y){var N=[],w;for(w=0;w<64;w+=4)N[w>>2]=y.charCodeAt(w)+(y.charCodeAt(w+1)<<8)+(y.charCodeAt(w+2)<<16)+(y.charCodeAt(w+3)<<24);return N}function o(y){var N=[],w;for(w=0;w<64;w+=4)N[w>>2]=y[w]+(y[w+1]<<8)+(y[w+2]<<16)+(y[w+3]<<24);return N}function l(y){var N=y.length,w=[1732584193,-271733879,-1732584194,271733878],C,S,x,E,T,O;for(C=64;C<=N;C+=64)s(w,i(y.substring(C-64,C)));for(y=y.substring(C-64),S=y.length,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C=0;C<S;C+=1)x[C>>2]|=y.charCodeAt(C)<<(C%4<<3);if(x[C>>2]|=128<<(C%4<<3),C>55)for(s(w,x),C=0;C<16;C+=1)x[C]=0;return E=N*8,E=E.toString(16).match(/(.*?)(.{0,8})$/),T=parseInt(E[2],16),O=parseInt(E[1],16)||0,x[14]=T,x[15]=O,s(w,x),w}function c(y){var N=y.length,w=[1732584193,-271733879,-1732584194,271733878],C,S,x,E,T,O;for(C=64;C<=N;C+=64)s(w,o(y.subarray(C-64,C)));for(y=C-64<N?y.subarray(C-64):new Uint8Array(0),S=y.length,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C=0;C<S;C+=1)x[C>>2]|=y[C]<<(C%4<<3);if(x[C>>2]|=128<<(C%4<<3),C>55)for(s(w,x),C=0;C<16;C+=1)x[C]=0;return E=N*8,E=E.toString(16).match(/(.*?)(.{0,8})$/),T=parseInt(E[2],16),O=parseInt(E[1],16)||0,x[14]=T,x[15]=O,s(w,x),w}function d(y){var N="",w;for(w=0;w<4;w+=1)N+=r[y>>w*8+4&15]+r[y>>w*8&15];return N}function f(y){var N;for(N=0;N<y.length;N+=1)y[N]=d(y[N]);return y.join("")}f(l("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function y(N,w){return N=N|0||0,N<0?Math.max(N+w,0):Math.min(N,w)}ArrayBuffer.prototype.slice=function(N,w){var C=this.byteLength,S=y(N,C),x=C,E,T,O,V;return w!==n&&(x=y(w,C)),S>x?new ArrayBuffer(0):(E=x-S,T=new ArrayBuffer(E),O=new Uint8Array(T),V=new Uint8Array(this,S,E),O.set(V),T)}}();function u(y){return/[\u0080-\uFFFF]/.test(y)&&(y=unescape(encodeURIComponent(y))),y}function h(y,N){var w=y.length,C=new ArrayBuffer(w),S=new Uint8Array(C),x;for(x=0;x<w;x+=1)S[x]=y.charCodeAt(x);return N?S:C}function p(y){return String.fromCharCode.apply(null,new Uint8Array(y))}function g(y,N,w){var C=new Uint8Array(y.byteLength+N.byteLength);return C.set(new Uint8Array(y)),C.set(new Uint8Array(N),y.byteLength),C}function v(y){var N=[],w=y.length,C;for(C=0;C<w-1;C+=2)N.push(parseInt(y.substr(C,2),16));return String.fromCharCode.apply(String,N)}function b(){this.reset()}return b.prototype.append=function(y){return this.appendBinary(u(y)),this},b.prototype.appendBinary=function(y){this._buff+=y,this._length+=y.length;var N=this._buff.length,w;for(w=64;w<=N;w+=64)s(this._hash,i(this._buff.substring(w-64,w)));return this._buff=this._buff.substring(w-64),this},b.prototype.end=function(y){var N=this._buff,w=N.length,C,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x;for(C=0;C<w;C+=1)S[C>>2]|=N.charCodeAt(C)<<(C%4<<3);return this._finish(S,w),x=f(this._hash),y&&(x=v(x)),this.reset(),x},b.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},b.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},b.prototype.setState=function(y){return this._buff=y.buff,this._length=y.length,this._hash=y.hash,this},b.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},b.prototype._finish=function(y,N){var w=N,C,S,x;if(y[w>>2]|=128<<(w%4<<3),w>55)for(s(this._hash,y),w=0;w<16;w+=1)y[w]=0;C=this._length*8,C=C.toString(16).match(/(.*?)(.{0,8})$/),S=parseInt(C[2],16),x=parseInt(C[1],16)||0,y[14]=S,y[15]=x,s(this._hash,y)},b.hash=function(y,N){return b.hashBinary(u(y),N)},b.hashBinary=function(y,N){var w=l(y),C=f(w);return N?v(C):C},b.ArrayBuffer=function(){this.reset()},b.ArrayBuffer.prototype.append=function(y){var N=g(this._buff.buffer,y),w=N.length,C;for(this._length+=y.byteLength,C=64;C<=w;C+=64)s(this._hash,o(N.subarray(C-64,C)));return this._buff=C-64<w?new Uint8Array(N.buffer.slice(C-64)):new Uint8Array(0),this},b.ArrayBuffer.prototype.end=function(y){var N=this._buff,w=N.length,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S,x;for(S=0;S<w;S+=1)C[S>>2]|=N[S]<<(S%4<<3);return this._finish(C,w),x=f(this._hash),y&&(x=v(x)),this.reset(),x},b.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},b.ArrayBuffer.prototype.getState=function(){var y=b.prototype.getState.call(this);return y.buff=p(y.buff),y},b.ArrayBuffer.prototype.setState=function(y){return y.buff=h(y.buff,!0),b.prototype.setState.call(this,y)},b.ArrayBuffer.prototype.destroy=b.prototype.destroy,b.ArrayBuffer.prototype._finish=b.prototype._finish,b.ArrayBuffer.hash=function(y,N){var w=c(new Uint8Array(y)),C=f(w);return N?v(C):C},b})}(bf)),bf.exports}var FV=$V();const vm=lt(FV),cr="An error occurred during upload";function ls(e){const t=e.responseText||e.response;if(!t)return t||{};try{return JSON.parse(t)}catch{return t}}const HV=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",l=>{const c=l;c.percent=l.total>0?l.loaded/l.total*100:0,e.onProgress(c)});const i=new FormData;if(s&&e.data){let l=e.data;Array.isArray(l)||(l=[l]),l.forEach(c=>{for(const[d,f]of Object.entries(c))Array.isArray(f)?i.append(d,...f):i.append(d,f)})}if(s&&e.formDataAttributes){let l=e.formDataAttributes;Array.isArray(l)||(l=[l]),l.forEach(c=>{Array.isArray(c.value)?i.append(c.name,...c.value):i.append(c.name,c.value)})}if(s&&i.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{let l=new Error(cr);const c=ls(t);c&&(l=new Error(c.message||cr)),console.log(c,l),e.onError(l)}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300){const l=ls(t);let c=new Error(cr);return l&&(c=new Error(l.message||cr)),e.onError(c)}e.onSuccess(ls(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(l=>{const c=l.name,d=l.value;t.setRequestHeader(c,d)});else{const l=e.header.name,c=e.header.value;t.setRequestHeader(l,c)}const o=e.headers||{};if(o instanceof Headers)o.forEach((l,c)=>t.setRequestHeader(c,l));else for(const[l,c]of Object.entries(o))wm(c)||t.setRequestHeader(l,String(c));return t.send(s?i:e.file),t},V4=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,BV=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 jV(n,t),i=[];zV(e,n,r,s,i,t),await Promise.all(i).then(()=>{const o={size:n.size,name:n.name,total:r,hash:s},l=new XMLHttpRequest;l.open(e.method,e.mergeUrl,!0),l.onreadystatechange=()=>{if(l.readyState===4){const c=ls(l);if(l.status<200||l.status>=300){let d=new Error(cr);return c&&(d=new Error(c.message||cr)),e.onError(d)}e.onSuccess(c)}},l.onloadend=()=>{e.onComplete()},l.setRequestHeader("Content-type","application/JSON"),l.send(JSON.stringify(o))})},zV=(e,t,n,r,s,i)=>{for(let o=0;o<n;o++){const l=new Promise((c,d)=>{const f=o*i,u=Math.min(t.size,f+i),h=new FormData;if(e.data){let v=e.data;Array.isArray(v)||(v=[v]),v.forEach(b=>{for(const[y,N]of Object.entries(b))Array.isArray(N)?h.append(y,...N):h.append(y,N)})}if(e.formDataAttributes){let v=e.formDataAttributes;Array.isArray(v)||(v=[v]),v.forEach(b=>{Array.isArray(b.value)?h.append(b.name,...b.value):h.append(b.name,b.value)})}h.append("file",V4.call(t,f,u)),h.append("name",t.name),h.append("total",n.toString()),h.append("index",o.toString()),h.append("size",t.size.toString()),h.append("hash",r.toString());const p=new XMLHttpRequest;if(p.onreadystatechange=()=>{if(p.readyState===4){const v=ls(p);if(p.status<200||p.status>=300){d(v);let b=new Error(cr);v&&(b=new Error(v.message||cr)),e.onError(b)}else c("reponseText")}},p.upload.addEventListener("progress",v=>{const b=v;e.onProgress(b,o)},!1),e.withCredentials&&"withCredentials"in p&&(p.withCredentials=!0),p.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(v=>{const b=v.name,y=v.value;p.setRequestHeader(b,y)});else{const v=e.header.name,b=e.header.value;p.setRequestHeader(v,b)}const g=e.headers||{};if(g instanceof Headers)g.forEach((v,b)=>p.setRequestHeader(b,v));else for(const[v,b]of Object.entries(g))wm(b)||p.setRequestHeader(v,String(b));p.send(h)});s.push(l)}},jV=(e,t)=>new Promise((n,r)=>{const s=Math.ceil(e.size/t);let i=0;const o=new vm.ArrayBuffer,l=new FileReader;function c(){const d=i*t,f=d+t>=e.size?e.size:d+t;l.readAsArrayBuffer(V4.call(e,d,f))}l.onload=d=>{if(o.append(d.target.result),i+=1,i<s)c();else{const f=o.end(),u=new vm;u.append(f),u.append(e.name);const h=u.end();n(h)}},l.onerror=()=>{r(new Error("File slice failed"))},c()}).catch(n=>{console.log(n)});function ym(e){return Date.now()+e}const UV=(e,t)=>{const n=a.computed(()=>{var h;return typeof e.size=="number"?e.size:(h=e==null?void 0:e.size)==null?void 0:h.maxImgSize}),r=a.computed(()=>{var h;return typeof e.size=="number"?e.size:(h=e==null?void 0:e.size)==null?void 0:h.maxImgSize}),s=a.ref([]);function i(h){return s.value.find(p=>p.uid===h.uid)}let o=0;function l(h){var b;o+=1,h.uid=ym(o);const p={uid:h.uid,name:h.name,status:Xr.NEW,size:h.size,raw:h},g=h.type.startsWith("image/");let v=null;if(g){try{p.url=window.URL.createObjectURL(h)}catch(y){console.error(y)}p.isPic=!0}return e.validateName&&!((b=e.validateName)!=null&&b.test(p.name))&&(p.status=Xr.FAIL,p.statusText="invalid filename",v=new Error(p.statusText)),g&&h.size>n.value*1024**2&&(p.status=Xr.FAIL,p.statusText="invalid file size",v=new Error(p.statusText)),!g&&h.size>r.value*1024**2&&(p.status=Xr.FAIL,p.statusText="invalid file size",v=new Error(p.statusText)),s.value.push(p),v}async function c(h){var v;const p=h instanceof File?i(h):h,g=b=>{var y;t.onRemove(b,s.value),s.value.splice(s.value.indexOf(p),1),(y=b.url)!=null&&y.startsWith("blob:")&&URL.revokeObjectURL(b.url)};e.beforeRemove?await((v=e.beforeRemove)==null?void 0:v.call(e,p,s.value))!==!1&&g(p):g(p)}async function d(h,p,g){const v=i(p);v&&(v.status="fail",v.statusText=h.message,v.response=g)}async function f(h,p){const g=i(p);g&&(g.status="success",g.response=h)}async function u(h,p){const g=i(p);g&&(g.status="uploading",g.percentage=Math.round(h.percent))}return a.watch(()=>e.files,h=>{s.value=h.map(p=>(o+=1,{...p,uid:p.uid??ym(o),status:p.status??Xr.SUCCESS}))},{immediate:!0,deep:!0}),{fileList:s,handlePreprocess:l,handleRemove:c,handleError:d,handleSuccess:f,handleProgress:u}},WV=a.defineComponent({name:"Upload",props:jt,emits:["exceed","progress","success","error","delete","done","preview"],setup(e,{slots:t,emit:n,expose:r}){const{resolveClassName:s}=he(),i=a.shallowRef({}),o=a.computed(()=>e.theme===zn.PICTURE),l=a.computed(()=>o.value&&!e.multiple),c=a.computed(()=>Ae({[`${s(Or)}`]:!0,[`${s(Or)}--${e.theme}`]:!0,[`${s(Or)}--disabled`]:e.disabled,[`${s(Or)}--single-picture`]:l.value,[e.extCls]:e.extCls??!1})),d=a.computed(()=>({theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept,isShowPreview:e.isShowPreview,selectChange:e.selectChange}));function f(E,T){x(E),n("delete",E,T)}const{fileList:u,handlePreprocess:h,handleRemove:p,handleProgress:g,handleSuccess:v,handleError:b}=UV(e,{onRemove:f});function y(E){if(!E.length)return;if(e.limit>1&&u.value.length+E.length>e.limit){n("exceed",E,u.value);return}!e.multiple&&e.limit===1&&(u.value=[]);let T=E;(!e.multiple||e.limit===1)&&(T=E.slice(0,1));for(const O of T){const V=O,_=h(V);if(_){n("error",V,u.value,_);return}e.autoUpload&&C(V,T)}}function N(E,T){n("preview",E,T)}function w(E){S(E.raw)}async function C(E,T){var V;if(!e.beforeUpload)return S(E,T);let O;try{O=await((V=e.beforeUpload)==null?void 0:V.call(e,E,T))}catch{O=!1}if(O===!1){p(E);return}S(E,T)}function S(E,T){const{type:O,headers:V,header:_,data:L,formDataAttributes:I,method:R,withCredentials:M,name:j,url:H,sliceUrl:A,mergeUrl:P,chunkSize:B,customRequest:z}=e,{uid:D}=E,k={type:O,headers:V,header:_,withCredentials:M,file:E,data:L,formDataAttributes:I,method:R,filename:j,action:H,sliceUrl:A,mergeUrl:P,chunkSize:B,onProgress:te=>{g(te,E),n("progress",te,E,u.value)},onSuccess:te=>{var Q;const $=te;if((Q=e==null?void 0:e.handleResCode)!=null&&Q.call(e,$))v(te,E),n("success",te,E,u.value);else{const ne=new Error(($==null?void 0:$.message)||"unknow error");b(ne,E,te),n("error",E,u.value,ne)}delete i.value[D]},onError:te=>{b(te,E),n("error",E,u.value,te),delete i.value[D]},onComplete:()=>{T&&T.indexOf(E)===T.length-1&&n("done",u.value)}};let G=e.sliceUpload?BV:HV;z&&(G=z);const U=G(k);i.value[D]=U,U instanceof Promise&&U.then(k.onSuccess,k.onError)}function x(E){let T=i.value;E&&(T={[E.uid]:i.value[E.uid]}),Object.keys(T).forEach(O=>{if(T[O]instanceof XMLHttpRequest){const V=T[O];V==null||V.abort()}delete i.value[O]})}return a.onBeforeUnmount(()=>{u.value.forEach(({url:E})=>{E!=null&&E.startsWith("blob:")&&URL.revokeObjectURL(E)})}),r({handlePreview:N,handleRemove:p,handleRetry:w}),()=>a.createVNode("div",{class:c.value},[!o.value&&a.createVNode(pm,a.mergeProps(d.value,{onChange:y}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${s(Or)}__tip`},[e.tip]),a.createVNode(MV,{disabled:e.disabled,files:u.value,isShowPreview:e.isShowPreview,multiple:e.multiple,theme:e.theme,onPreview:N,onRemove:p,onRetry:w},{innerTrigger:E=>o.value&&a.createVNode(pm,a.mergeProps(d.value,{file:E,onChange:y,onPreview:N,onRemove:p}),t),file:t.file})])}}),D4=Ie(WV),wf=Object.freeze(Object.defineProperty({__proto__:null,$bkPopover:sh,Affix:bp,Alert:Cp,AnimateNumber:Np,Backtop:xp,Badge:Sp,Breadcrumb:_p,Button:it,Card:Xp,Cascader:Vg,Checkbox:Ct,CodeDiff:$g,Collapse:Hg,ColorPicker:ov,ConfigProvider:yp,Container:lv,DatePicker:rv,Dialog:uv,Divider:dv,Dropdown:fv,Exception:ml,FixedNavbar:hv,Form:pv,InfoBox:vv,Input:hr,Link:bv,Loading:ur,Menu:Cv,Message:Ov,Modal:Gs,Navigation:Av,Notify:Vv,OverflowTitle:Yp,Pagination:Ah,PopConfirm:Dv,Popover:Dt,Popover2:kv,Process:Rv,Progress:xs,Radio:to,Rate:$v,ResizeLayout:Fv,SearchSelect:qv,Select:hh,Sideslider:Kv,Slider:Yv,Steps:Jv,Swiper:Zv,Switcher:Qv,Tab:r4,Table:b4,Tag:ws,TagInput:_g,TimePicker:w4,Timeline:C4,Transfer:N4,Tree:L4,Upload:D4,VirtualRender:Ws,scrollbar:dh},Symbol.toStringTag,{value:"Module"})),bm=(e="Bk")=>(t,n)=>{const r=t.config.globalProperties.bkUIPrefix||e;Object.keys(wf).forEach(s=>{const i=wf[s];"install"in i?t.use(i,{prefix:r}):t.component(r+s,wf[s])}),n&&w0(n,t)},qV={createInstall:bm,install:bm()},k4="2.0.2-beta.56";window.__bkui_vue_version__=k4;exports.$bkPopover=sh;exports.Affix=bp;exports.Alert=Cp;exports.AnimateNumber=Np;exports.Backtop=xp;exports.Badge=Sp;exports.Breadcrumb=_p;exports.Button=it;exports.Card=Xp;exports.Cascader=Vg;exports.Checkbox=Ct;exports.CodeDiff=$g;exports.Collapse=Hg;exports.ColorPicker=ov;exports.ConfigProvider=yp;exports.Container=lv;exports.DatePicker=rv;exports.Dialog=uv;exports.Divider=dv;exports.Dropdown=fv;exports.Exception=ml;exports.FixedNavbar=hv;exports.Form=pv;exports.InfoBox=vv;exports.Input=hr;exports.Link=bv;exports.Loading=ur;exports.Menu=Cv;exports.Message=Ov;exports.Modal=Gs;exports.Navigation=Av;exports.Notify=Vv;exports.OverflowTitle=Yp;exports.Pagination=Ah;exports.PopConfirm=Dv;exports.Popover=Dt;exports.Popover2=kv;exports.Process=Rv;exports.Progress=xs;exports.Radio=to;exports.Rate=$v;exports.ResizeLayout=Fv;exports.SearchSelect=qv;exports.Select=hh;exports.Sideslider=Kv;exports.Slider=Yv;exports.Steps=Jv;exports.Swiper=Zv;exports.Switcher=Qv;exports.Tab=r4;exports.Table=b4;exports.Tag=ws;exports.TagInput=_g;exports.TimePicker=w4;exports.Timeline=C4;exports.Transfer=N4;exports.Tree=L4;exports.Upload=D4;exports.VirtualRender=Ws;exports.bkEllipsis=Hw;exports.bkEllipsisInstance=ih;exports.bkLoading=Op;exports.bkTooltips=Dn;exports.clickoutside=Ln;exports.default=qV;exports.defaultRootConfig=Pr;exports.mousewheel=Xw;exports.overflowTitle=aC;exports.provideGlobalConfig=w0;exports.rootProviderKey=pa;exports.scrollbar=dh;exports.setPrefixVariable=_f;exports.useGlobalConfig=P7;exports.useLocale=Be;exports.usePrefix=he;exports.version=k4;
|
362
|
+
`,O={d:T,stroke:u||"#f5f5f5","stroke-linecap":c,"stroke-width":p,"fill-opacity":"0",class:"process-circle-trail",style:x},V={d:T,stroke:l||"#13ce66","stroke-linecap":c,"stroke-width":i>0&&p||0,"fill-opacity":"0",class:`process-circle-path ${r(`${d}-circle-trail`)}`,style:E};return a.createVNode("div",{style:v,class:"progress-outer-circle"},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",O,null),a.createVNode("path",V,null)]),a.createVNode("span",{style:h,class:"progress-circle-text"},[n==null?void 0:n.default()])])},QO=(e,{attrs:t,slots:n})=>{const{resolveClassName:r}=he(),{percent:s,strokeWidth:i,size:o,color:l,titleStyle:c,showText:d,textInside:f,theme:u}=t,h={height:`${i}px`,lineHeight:`${i}px`},p={width:`${s}%`,background:l,animationDuration:"3s"},g=(v=!0)=>(d||n.default)&&(v&&f||!v&&!f)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{style:h,class:`${r(`progress-${o||"normal"}`)} progress-bar`},[a.createVNode("div",{style:p,class:{"progress-inner":!0,[`${r(`${u}`)}`]:!0}},[a.createVNode("div",{style:c,class:"inner-text"},[g()])])]),g(!1)])};function em(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const eA={extCls:m.string,type:P8(),percent:m.number.def(0),theme:m.theme().def(po.PRIMARY),size:m.size(),width:m.number.def(126),strokeWidth:m.number,strokeLinecap:I8(),textInside:m.bool.def(!1),showText:m.bool.def(!0),color:m.string,bgColor:m.string,fixed:m.number.validate(e=>e>=0&&e<=20).def(0),format:m.func.def(e=>`${e}%`),titleStyle:m.object.def({fontSize:"16px",verticalAlign:"middle"})},tA=a.defineComponent({name:"Progress",props:eA,setup(){const{resolveClassName:e}=he();return{resolveClassName:e}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var l;const{showText:e,format:t,percent:n,textInside:r,titleStyle:s,fixed:i}=this.$props,o=t((l=this.validPercent(n))==null?void 0:l.toFixed(i));return(e||this.$slots.default)&&r?this.$slots.default?this.$slots.default():a.createVNode("span",null,[o]):!e||r?null:a.createVNode("span",{style:typeof o=="string"?s:void 0,class:"progress-text"},[this.$slots.default?this.$slots.default():o])}},render(){const e=this.renderProcessInfo(),t={...this.$props,percent:this.validPercent(this.percent)};let n=a.createVNode(QO,t,em(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(ZO,t,em(e)?e:{default:()=>[e]}));const r={class:Ae({extCls:!!this.extCls},`${this.resolveClassName("progress")} ${this.resolveClassName(`progress-${this.type}`)}`)};return a.createVNode("div",r,[n])}}),xs=Ie(tA),Iv=Symbol("RadioGroup");function Pv(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const Mv=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,r=a.inject(Iv,tp),s=!np(r),i=a.ref(!1),o=a.ref(!1),l=a.ref("default"),c=a.computed(()=>s&&r.props.disabled?!0:t.disabled);s?(l.value=r.props.size,a.watch(()=>r.props.modelValue,u=>{i.value=u===t.label},{immediate:!0})):a.watch(()=>t.modelValue,u=>{u!==""&&(i.value=u===t.label)},{immediate:!0});const d=(u=!0)=>{i.value=u},f=u=>{if(c.value||o.value)return;const h=u.target,p=h.checked;Promise.resolve(s?r.props.beforeChange(p):t.beforeChange(p)).then(g=>{if(g){i.value=h.checked;const v=i.value?t.label:"";return n("update:modelValue",v),n("change",v),s&&r.handleChange(e.proxy),a.nextTick(()=>{h.checked!==i.value&&(h.checked=i.value)}),Promise.resolve(!0)}return Promise.reject()}).catch(()=>{h.checked=i.value}).finally(()=>{o.value=!1})};return a.onMounted(()=>{s&&r.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&r.unregister(e.proxy)}),{size:l,isChecked:i,isDisabled:c,setChecked:d,handleChange:f}},nA={name:m.string.def(""),label:m.oneOfType([m.bool,m.string,m.number]).isRequired,modelValue:m.oneOfType([m.bool,m.string,m.number]).def(""),checked:m.bool.def(!1),disabled:m.bool.def(!1),beforeChange:xa().def(()=>!0)},rA=a.defineComponent({name:"Radio",props:nA,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=Pv(),{size:r,isChecked:s,isDisabled:i,setChecked:o,handleChange:l}=Mv(),{resolveClassName:c}=he();return{size:r,isFocused:e,isChecked:s,isDisabled:i,setChecked:o,handleBlur:t,handleFocus:n,handleChange:l,resolveClassName:c}},render(){const e=Ae({[`${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()])}}),aA={name:m.string.def(""),label:m.oneOfType([m.bool,m.string,m.number]).isRequired,modelValue:m.oneOfType([m.bool,m.string,m.number]).def(""),checked:m.bool.def(!1),disabled:m.bool.def(!1),size:m.size(),beforeChange:xa().def(()=>!0)},sA=a.defineComponent({name:"RadioButton",props:aA,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(){const[e,{blur:t,focus:n}]=Pv(),{size:r,isChecked:s,isDisabled:i,setChecked:o,handleChange:l}=Mv(),{resolveClassName:c}=he();return{isFocused:e,size:r,isChecked:s,isDisabled:i,setChecked:o,handleBlur:t,handleFocus:n,handleChange:l,resolveClassName:c}},render(){const e=Ae({[`${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()])}}),iA={name:m.string.def(""),modelValue:m.oneOfType([m.bool,m.string,m.number]),disabled:m.bool,withValidate:m.bool.def(!0),type:m.oneOf(["tab","capsule","card"]).def("tab"),size:m.size(),beforeChange:xa().def(()=>!0)},oA=a.defineComponent({name:"RadioGroup",props:iA,emits:{"update:modelValue":e=>e!==void 0,change:e=>e!==void 0},setup(e,t){const n=on(),r=[],s=c=>{r.push(c)},i=c=>{const d=r.indexOf(c);d>-1&&r.splice(d,1)},o=c=>{const d=c.label;r.forEach(f=>{f!==c&&f.setChecked(!1)}),t.emit("update:modelValue",d),t.emit("change",d)};a.provide(Iv,{props:e,register:s,unregister:i,handleChange:o}),a.watch(()=>e.modelValue,()=>{var c;e.withValidate&&((c=n==null?void 0:n.validate)==null||c.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&r.forEach(c=>{c.setChecked(c.label===e.modelValue)})});const{resolveClassName:l}=he();return{resolveClassName:l}},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()])}}),to=St(rA,{Group:oA,Button:sA}),yi=a.defineComponent({name:"Star",props:{rate:m.number.def(0),width:m.number.def(16),height:m.number.def(16),editable:m.bool.def(!0),hoverRate:m.number.def(0),max:m.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=d=>{if(!e.editable)return;const f=d+1;t("chooseRate",f)},r=(d,f)=>{if(!e.editable)return;const u=d+1;t("changeHover",u),a.nextTick(()=>{f.target.classList.add(i("is-hover"))})},s=d=>{e.editable&&a.nextTick(()=>{d.target.classList.remove(i("is-hover"))})},{resolveClassName:i}=he(),o=d=>Ae({[`${i("is-select")}`]:d<Math.floor(l.value),[`${i("is-edit")}`]:e.editable,[`${i("rate-star")}`]:!0}),l=a.computed(()=>e.hoverRate||e.rate),c={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:`${i("rate-stars")}`},[Array(e.max).fill(1).map((d,f)=>a.createVNode("svg",{style:c,class:o(f),viewBox:"0 0 64 64",x:"0px",y:"0px",onClick:()=>n(f),onMouseenter:u=>r(f,u),onMouseleave:u=>s(u)},[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)])])])])]))])}}),lA=a.defineComponent({name:"Rate",components:{star:yi},props:{modelValue:m.number.def(0),size:m.size(),editable:m.bool.def(!0),withValidate:m.bool.def(!0)},emits:["change","hover-change","update:modelValue"],setup(e,{emit:t}){const{resolveClassName:n}=he(),r=on(),s=a.ref(0),i=h=>{e.editable&&(t("update:modelValue",h),t("change",h))},o=h=>{s.value=h,t("hover-change",h)},l=Ae({[`${n("rate")}`]:!0}),d={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 h=Math.floor(e.modelValue),p=(d.width+3)*h,g=d.width*(e.modelValue-h);return{width:`${p+g}px`}}),u={width:d.width,height:d.height};return a.watch(()=>e.modelValue,()=>{var h;e.withValidate&&((h=r==null?void 0:r.validate)==null||h.call(r,"change"))}),()=>a.createVNode("p",{class:l},[e.editable?a.createVNode(yi,a.mergeProps({"hover-rate":s.value,rate:e.modelValue,onChangeHover:o,onChooseRate:i,onMouseleave:()=>o(0)},u),null):[a.createVNode(yi,a.mergeProps({style:f.value,class:`${n("score-real")}`,editable:!1,rate:5},u),null),a.createVNode(yi,a.mergeProps({editable:!1,rate:0},u),null)]])}}),$v=Ie(lA),cA=a.defineComponent({name:"ResizeLayout",props:{placement:m.placement().def("left"),min:m.number.def(3),max:m.number.def(1/0),triggerWidth:m.number.def(5),triggerOffset:m.number.def(3),initialDivide:m.oneOfType([String,Number]).def("20%"),immediate:m.bool,disabled:m.bool,collapsible:m.bool,isCollapsed:m.bool.def(!1),autoMinimize:m.oneOfType([Boolean,Number]).def(!1),border:m.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:n,initialDivide:r,triggerOffset:s,triggerWidth:i,max:o,min:l,immediate:c,autoMinimize:d,collapsible:f,isCollapsed:u}=a.toRefs(e),h=a.ref(u.value),p=a.ref(!0),g=a.ref(!1),v=a.ref(null),b=a.ref({}),y=a.ref(null),N=a.ref(null),w=a.ref(null),C=a.ref(null),S=a.computed(()=>["left","right"].includes(n.value)),x=a.computed(()=>S.value?"width":"height"),E=a.computed(()=>{let D=r.value;return l.value!==3&&typeof D!="number"?`${l.value}px`:(typeof D=="number"&&(D=D<=l.value?`${l.value}px`:`${D}px`),D)}),T=a.computed(()=>f.value&&u.value?{[x.value]:"0px"}:{[x.value]:E.value}),O=a.computed(()=>({[`margin-${n.value}`]:`${s.value-i.value}px`,[x.value]:`${i.value}px`})),V=a.computed(()=>d.value?typeof d.value=="boolean"?50:d.value:0),_=()=>{const D=y.value.getBoundingClientRect();v.value=S.value?D.width:D.height};let L=new ResizeObserver(_);const I=()=>{switch(N.value.style.visibility="visible",n.value){case"left":N.value.style.inset=`0 auto auto ${b.value.aside.width}px`;break;case"right":N.value.style.inset=`0 ${b.value.aside.width}px auto auto`;break;case"top":N.value.style.inset=`${b.value.aside.height}px auto auto 0`;break;case"bottom":N.value.style.inset=`auto auto ${b.value.aside.height}px 0`;break}},R=()=>{w.value.style.display="block",w.value.style.cursor=S.value?"col-resize":"row-resize"},M=D=>Math.min(o.value,Math.max(l.value,D),v.value-i.value),j=D=>{t("before-resize",D);const k=C.value.getBoundingClientRect();b.value=Object.freeze({mouse:{clientX:D.clientX,clientY:D.clientY},aside:{width:k.width,height:k.height}}),R(),c.value||I(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const G=$=>{t("resizing",$)},U=$=>{let Q;switch(n.value){case"top":Q=$.clientY-b.value.mouse.clientY;break;case"right":Q=b.value.mouse.clientX-$.clientX;break;case"bottom":Q=b.value.mouse.clientY-$.clientY;break;case"left":Q=$.clientX-b.value.mouse.clientX}const ne=b.value.aside[x.value]+Q,le=M(ne)+s.value,ae=`${le}px`;c.value?C.value.style[x.value]=ae:N.value.style[n.value]=ae,G(le)},te=()=>{if(N.value.style.visibility="hidden",w.value.style.display="none",document.removeEventListener("mousemove",U),document.removeEventListener("mouseup",te),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{H(),t("after-resize",parseFloat(N.value.style[n.value]))}),c.value)return!1;C.value.style[x.value]=N.value.style[n.value]};document.addEventListener("mousemove",U),document.addEventListener("mouseup",te)},H=()=>{if(!d.value)return!1;const D=C.value.getBoundingClientRect();if(g.value=h.value=D[x.value]<=V.value,!g.value)return p.value=!0,!1;P(),a.nextTick(()=>{C.value.setAttribute(`data-${x.value}`,T.value[x.value])})},A=D=>{h.value=typeof D=="boolean"?D:!h.value,P(),t("collapse-change",h.value)},P=()=>{const D=C.value.getBoundingClientRect();B(!h.value),h.value?(C.value.setAttribute(`data-${x.value}`,`${D[x.value]}px`),C.value.style[x.value]=e.collapsible?"0px":"5px"):(p.value=!0,C.value.style[x.value]=C.value.getAttribute(`data-${x.value}`)||E.value)},B=D=>{const k=()=>{p.value=D,C.value.style.transition="",C.value.removeEventListener("transitionend",k)};C.value.addEventListener("transitionend",k),C.value.style.transition=`${x.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};a.watch(u,()=>{h.value=u.value,A(h.value)}),a.onMounted(()=>{L.observe(y.value)}),a.onBeforeUnmount(()=>{y.value&&(L.unobserve(y.value),L=null)});const{resolveClassName:z}=he();return{collapsed:h,asideContentVisible:p,minimized:g,limitMax:v,state:b,vertical:S,cssPropKey:x,bkResizeLayoutRef:y,resizeProxyRef:N,resizeMaskRef:w,asideRef:C,triggerStyle:O,asideStyle:T,handleMousedown:j,setCollapse:A,resolveClassName:z}},render(){var t,n,r,s,i,o;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($t,{width:26,height:26,class:`${this.resolveClassName("resize-collapse")}`,onClick:this.setCollapse},null):a.createVNode(an,{width:26,height:26,class:`${this.resolveClassName("resize-collapse")}`,onClick:this.setCollapse},null)))]),a.createVNode("main",{class:`${this.resolveClassName("resize-layout-main")}`},[(o=(i=this.$slots).main)==null?void 0:o.call(i)]),a.createVNode("div",{ref:"resizeMaskRef",class:`${this.resolveClassName("resize-mask")}`},null)])}}),Fv=Ie(cA);var pf=null;function uA(e){return pf||(pf=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){return setTimeout(t,16)}).bind(window)),pf(e)}var gf=null;function dA(e){gf||(gf=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}).bind(window)),gf(e)}function fA(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 bi(e,t){t===void 0&&(t={});var n=document.createElement(e);return Object.keys(t).forEach(function(r){n[r]=t[r]}),n}function Hv(e,t,n){var r=window.getComputedStyle(e,null)||{display:"none"};return r[t]}function Kf(e){if(!e||!document.documentElement.contains(e))return{detached:!0,rendered:!1};for(var t=e;t&&t!==document;){if(Hv(t,"display")==="none")return{detached:!1,rendered:!1};t=t.parentNode}return{detached:!1,rendered:!0}}var hA='.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%}',Yf=0,Pi=null;function mA(e,t){e.__resize_mutation_handler__||(e.__resize_mutation_handler__=vA.bind(e));var n=e.__resize_listeners__;if(!n){if(e.__resize_listeners__=[],window.ResizeObserver){var r=e.offsetWidth,s=e.offsetHeight,i=new ResizeObserver(function(){!e.__resize_observer_triggered__&&(e.__resize_observer_triggered__=!0,e.offsetWidth===r&&e.offsetHeight===s)||no(e)}),o=Kf(e),l=o.detached,c=o.rendered;e.__resize_observer_triggered__=l===!1&&c===!1,e.__resize_observer__=i,i.observe(e)}else if(e.attachEvent&&e.addEventListener)e.__resize_legacy_resize_handler__=function(){no(e)},e.attachEvent("onresize",e.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",e.__resize_mutation_handler__);else if(Yf||(Pi=fA(hA)),yA(e),e.__resize_rendered__=Kf(e).rendered,window.MutationObserver){var d=new MutationObserver(e.__resize_mutation_handler__);d.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),e.__resize_mutation_observer__=d}}e.__resize_listeners__.push(t),Yf++}function pA(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",Lh),e.removeChild(e.__resize_triggers__.triggers),e.__resize_triggers__=null),e.__resize_listeners__=null}!--Yf&&Pi&&Pi.parentNode.removeChild(Pi)}}function gA(e){var t=e.__resize_last__,n=t.width,r=t.height,s=e.offsetWidth,i=e.offsetHeight;return s!==n||i!==r?{width:s,height:i}:null}function vA(){var e=Kf(this),t=e.rendered,n=e.detached;t!==this.__resize_rendered__&&(!n&&this.__resize_triggers__&&(Vh(this),this.addEventListener("scroll",Lh,!0)),this.__resize_rendered__=t,no(this))}function Lh(){var e=this;Vh(this),this.__resize_raf__&&dA(this.__resize_raf__),this.__resize_raf__=uA(function(){var t=gA(e);t&&(e.__resize_last__=t,no(e))})}function no(e){!e||!e.__resize_listeners__||e.__resize_listeners__.forEach(function(t){t.call(e,e)})}function yA(e){var t=Hv(e,"position");(!t||t==="static")&&(e.style.position="relative"),e.__resize_old_position__=t,e.__resize_last__={};var n=bi("div",{className:"resize-triggers"}),r=bi("div",{className:"resize-expand-trigger"}),s=bi("div"),i=bi("div",{className:"resize-contract-trigger"});r.appendChild(s),n.appendChild(r),n.appendChild(i),e.appendChild(n),e.__resize_triggers__={triggers:n,expand:r,expandChild:s,contract:i},Vh(e),e.addEventListener("scroll",Lh,!0),e.__resize_last__={width:e.offsetWidth,height:e.offsetHeight}}function Vh(e){var t=e.__resize_triggers__,n=t.expand,r=t.expandChild,s=t.contract,i=s.scrollWidth,o=s.scrollHeight,l=n.offsetWidth,c=n.offsetHeight,d=n.scrollWidth,f=n.scrollHeight;s.scrollLeft=i,s.scrollTop=o,r.style.width=l+1+"px",r.style.height=c+1+"px",n.scrollLeft=d,n.scrollTop=f}var zt=(e=>(e.ALL="all",e.NEED_KEY="need-key",e))(zt||{});const Bv=Symbol("SEARCH_SELECT_PROVIDER_KEY"),bA=e=>{a.provide(Bv,e)},zv=()=>a.inject(Bv);var sr=(e=>(e.DEFAULT="default",e.EDIT="edit",e))(sr||{});const jv=/(\||,|、|\r\n|\n)/gm,Uv=/^(\||,|、|\r\n|\n)$/;var Ca=(e=>(e.AND="&",e.OR="|",e))(Ca||{});class Zr{constructor(t,n="default"){ye(this,"id");ye(this,"name");ye(this,"values",[]);ye(this,"condition");ye(this,"logical");ye(this,"nameRenderKey",Er(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=Er(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(i=>i.name===s);if(!this.multiple){const s=n.join(` ${this.logical} `).trim(),i=r(s);return[{id:i?i.id:s,name:i?i.name:s,disabled:!!(i!=null&&i.disabled)}]}return n.map(s=>{const i=this.values.find(l=>l.name===s);if(i)return i;const o=r(s);return{id:o?o.id:s,name:o?o.name:s,disabled:!!(o!=null&&o.disabled)}})}addValues(t,n=!0){const r=t.split(jv).filter(l=>l.trim()&&!Uv.test(l)),s=n?this.values.map(l=>l.name):[],o=[...r,...s].filter(l=>l.trim()).join(this.logical);this.values=this.str2Values(o)}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 wA=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:Ca.OR},maxHeight:{type:Number,default:()=>392}},emits:["selectItem","selectCondition","footerClick","update:logical"],setup(e,{emit:t}){const n=Be("searchSelect"),{resolveClassName:r}=he(),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),i=a.computed(()=>({maxHeight:`${e.maxHeight}px`}));function o(g){t("selectItem",g)}function l(g){t("selectCondition",g)}function c(g){t("footerClick",g)}const d=a.computed(()=>{var g,v;return(g=e.list)!=null&&g.length?(v=e.keyword)!=null&&v.length?e.list.filter(b=>b.name.toLocaleLowerCase().includes(e.keyword.toLocaleLowerCase())):e.list:[]});function f(g){if(!g)return g;let{keyword:v}=e;if(!(v!=null&&v.trim().length)||!g.toLocaleLowerCase().includes(v.toLocaleLowerCase().trim()))return g;const b=v.trim().length,y=[];let N=-1;return v=v.replace(/([.*/]{1})/gim,"\\$1").trim(),g.replace(new RegExp(`${v}`,"igm"),(w,C)=>(y.length===0&&C!==0?y.push(g.slice(0,C)):N>=0&&y.push(g.slice(N+w.length,C)),y.push(a.createVNode("span",{class:"is-keyword"},[w])),N=C,w)),N>=0&&y.push(g.slice(N+b)),y.length?y:g}function u(g){var v;return(v=g.value)!=null&&v.name?[a.createVNode("span",{class:"menu-name"},[g.name,a.createTextVNode(":")]),g.value.name]:f(g.name)}function h(g,v){g.stopPropagation(),g.preventDefault(),o(v)}function p(g){t("update:logical",g)}return{handleClick:o,handleClickCondition:l,handleClickFooterBtn:c,handleSelectedChange:h,handleLogicalChange:p,filterList:d,getSearchNode:u,localFooterBtns:s,resolveClassName:r,resolveContentStyles:i,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:i=>this.handleSelectedChange(i,s)},[a.createVNode(Ct,{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(to,{label:"|",modelValue:this.logical,onChange:this.handleLogicalChange},{default:()=>[this.t.or,a.createTextVNode(" |")]}),a.createVNode(to,{label:"&",modelValue:this.logical,onChange:this.handleLogicalChange},{default:()=>[this.t.and,a.createTextVNode(" &")]})])]);return a.createVNode("div",{style:this.resolveContentStyles,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()])}}),Wv=a.defineComponent({name:"SearchSelectInput",directives:{clickoutside:Ln},props:{data:{type:Array,required:!0},showInputBefore:Boolean,showCondition:Boolean,clickOutside:Function,placeholder:String,conditions:{type:Array,default:()=>[]},defaultUsingItem:Object,mode:{type:String,default:sr.DEFAULT},maxHeight:{type:Number,default:()=>392},getMenuList:Function,validateValues:Function,valueBehavior:String},emits:["focus","add","delete","selectKey"],slots:Object,setup(e,{emit:t,expose:n}){const r=Be("searchSelect"),{resolveClassName:s}=he(),i=a.ref(null),o=a.ref(null),l=a.ref(""),c=a.ref(!1),d=a.ref(!1),f=a.ref(!1),u=a.ref(e.defaultUsingItem),h=a.ref(""),p=a.ref(!1),g=Es(100,U);let v=!1;const b=a.ref([]),y=a.ref([]),{editKey:N,onValidate:w,searchData:C}=zv(),S=a.computed(()=>{var W;return((W=u.value)==null?void 0:W.logical)||Ca.OR}),x=a.ref(Er(10)),E=a.ref(!1);a.watch(N,()=>{e.mode===sr.DEFAULT&&N.value&&(f.value=!1)}),a.watch([y,f],()=>{var q,se;f.value&&((q=y.value)==null?void 0:q.some(fe=>!fe.disabled))?v||(h.value=e.valueBehavior===zt.NEED_KEY&&((se=y.value.find(fe=>!fe.disabled))==null?void 0:se.id)||"",v=!0,document.addEventListener("keydown",T)):(document.removeEventListener("keydown",T),v=!1,e.valueBehavior!==zt.NEED_KEY&&(h.value=""))});function T(W){switch(W.code){case"ArrowDown":case"ArrowUp":O(W);break;case"Enter":case"NumpadEnter":V(W);break}}function O(W){var fe;W.preventDefault(),(fe=i.value)==null||fe.blur();const q=y.value.length;let se=y.value.findIndex(ee=>ee.id===h.value);for(let ee=0;ee<q;ee++){se=(se+(W.code==="ArrowDown"?1:-1)+q)%q;const de=y.value[se];if(de&&!de.disabled){const ue=document.getElementById(de.id);ue==null||ue.focus(),h.value=de.id;break}}}function V(W){var se;if(!v)return;W.preventDefault();const q=(se=y.value)==null?void 0:se.find(fe=>fe.id===h.value);q&&P(q)}function _(W){var q,se,fe;if(!((q=o.value)!=null&&q.contains(W.target)||!((se=e.clickOutside)!=null&&se.call(e,W.target,o.value)))){if((fe=u.value)!=null&&fe.isCustomMenu){e.mode===sr.EDIT&&(H().then(ee=>ee&&X()),f.value=!1);return}if(e.mode===sr.EDIT||u.value){u.value&&H().then(ee=>ee&&X()),u.value||t("focus",!1);return}d.value=!1,f.value=!1,t("focus",d.value)}}let L=!1;function I(W){if(!L){if(c.value=!1,e.mode===sr.EDIT&&u.value&&!d.value){const q=Array.from(i.value.querySelectorAll(`[data-type="${u.value.values.length?"value":u.value.type}"]`));if(!q.length)return;W==null||W.preventDefault();const se=document.createRange(),fe=window.getSelection();se.selectNodeContents(q.at(-1)),fe==null||fe.removeAllRanges(),L=!0,setTimeout(()=>{L=!1},200),fe.addRange(se),ne(!0,!1);return}U(),ne(!1,!d.value)}}function R(W){W.preventDefault();const q=W.clipboardData.getData("text").trim();if(!u.value){const se=J(q);if(se){u.value=se,ne(!0,!0);return}l.value=q.split(jv).filter(fe=>fe.trim()&&!Uv.test(fe)).join(` ${S.value} `),i.value.innerText=l.value,ne(),g();return}u.value.addValues(q),g()}function M(W){if(E.value)return;ae();const q=W.target.innerText;if(u.value){if(u.value&&!q){x.value=Er(10),h.value="",u.value=null,l.value="",setTimeout(()=>{ne(!0,!0),a.nextTick(Q)},200);return}}else{l.value=q,g();return}l.value=u.value.isSpecialType()?q:q.replace(u.value.name,"").replace(":",""),g()}function j(W){var q;if(!E.value)switch(W.code){case"Enter":case"NumpadEnter":if(W.preventDefault(),e.valueBehavior===zt.NEED_KEY&&y.value.some(se=>se.id===h.value)){!u.value&&((q=l.value)!=null&&q.length)&&W.preventDefault();return}H(W).then(se=>se&&X());break;case"Backspace":case"Delete":A(W);break;default:c.value=!1;break}}async function H(W){var se,fe,ee;return W==null||W.preventDefault(),await new Promise(de=>setTimeout(de,0)),u.value?l.value?await $():!((se=u.value)!=null&&se.isSpecialType())&&((fe=u.value)==null?void 0:fe.values.length)<1?(c.value=!c.value,!1):(await G()&&((ee=u.value)!=null&&ee.isCustomMenu&&(f.value=!1),le()),!1):!l.value||e.valueBehavior===zt.NEED_KEY?void 0:await te()}function A(W){var q,se,fe;if(!u.value&&!l.value){h.value="",t("delete"),setTimeout(U,16);return}if((q=u.value)!=null&&q.values.length){if(u.value.type==="text"||!((se=u.value.children)!=null&&se.length))return;W.preventDefault();const ee=window.getSelection();if((ee==null?void 0:ee.rangeCount)>0){let ge=ee.getRangeAt(0).startContainer;for(;ge&&ge.parentNode!==i.value;)ge=ge.parentNode;const Se=((fe=ge==null?void 0:ge.dataset)==null?void 0:fe.index)||-1;u.value.values.splice(+Se,1),l.value="",ne(!1,!1);return}}else(!l.value||l.value.length===1)&&(u.value=null,l.value="",U());w("")}async function P(W,q){var se,fe,ee,de,ue;if((se=W.value)!=null&&se.id){const ge=new Zr({...W,id:W.realId??W.id},q);if(ge.addValues(W.value.name,!1),e.valueBehavior===zt.NEED_KEY&&h.value){le(ge),ne(!0),h.value="";return}if(u.value=ge,!await G(u.value.values)){u.value=null;return}le(u.value),ne(!0),h.value="";return}if(!u.value||((fe=u.value)==null?void 0:fe.type)==="condition"){u.value=new Zr(W,q??((ee=u.value)==null?void 0:ee.type)),l.value="";const ge=((de=u.value)==null?void 0:de.type)==="condition";ge||t("selectKey",{id:W.id,name:W.name,values:[]}),ge&&le(),f.value=ge||!!u.value.children.length,ne(e.valueBehavior===zt.NEED_KEY&&!!h.value),typeof e.getMenuList=="function"&&a.nextTick(Q);return}u.value&&(u.value.addValue(W),a.nextTick(Y)),await G(u.value.values)&&(u.value.multiple||le(),e.valueBehavior===zt.NEED_KEY&&((ue=u.value)!=null&&ue.multiple)&&ne())}function B(W){P(W,"condition")}function z(W){var q;switch(W.id){case"confirm":if(!((q=u.value)!=null&&q.values.length))return;l.value="",H();break;case"cancel":u.value.values=[],f.value=!1;break}}function D(W){u.value&&(u.value.logical=W)}async function k(W,q){if(typeof e.validateValues=="function"){let se="";try{se=await e.validateValues(W??null,q)}catch{se=!1}if(typeof se=="string"||se===!1)return w(se||"校验错误"),!1}return w(""),!0}async function G(W){if(!u.value)return await k(null,W);const{searchItem:q,validate:se,values:fe}=u.value;return se&&typeof e.validateValues=="function"?await k(q,W??fe):(w(""),!0)}async function U(){var q,se,fe,ee,de;let W=[];if(typeof e.getMenuList=="function"&&(!((q=e.data)!=null&&q.length)&&!u.value||u.value&&u.value.type!=="condition"&&(((se=u.value.searchItem)==null?void 0:se.async)===void 0||u.value.searchItem.async===!0)))p.value=!0,W=await e.getMenuList((fe=u.value)==null?void 0:fe.searchItem,l.value.trim()).catch(()=>[]),p.value=!1;else if(u!=null&&u.value)u.value.type==="condition"?W=e.conditions:(!((de=u.value.values)!=null&&de.length)||u.value.multiple||e.mode===sr.EDIT)&&(W=u.value.children.filter(ue=>ue.name.toLocaleLowerCase().includes(l.value.toLocaleLowerCase().trim())));else if(!((ee=l.value)!=null&&ee.length))W=e.data.filter(ue=>!ue.isSelected).slice();else for(const ue of e.data.filter(ge=>!ge.isSelected))if(ue.name.toLocaleLowerCase().includes(l.value.toLocaleLowerCase())){W.push(ue);const Se=[];for(const Le of ue.children||[])Se.push({...ue,realId:ue.id,id:Er(10),value:Le});!Se.length&&!ue.onlyRecommendChildren&&Se.push({...ue,realId:ue.id,id:Er(10),value:{id:l.value,name:l.value}}),W.push(...Se)}else{const Se=[];for(const Le of ue.children||[])Le.name.toLocaleLowerCase().includes(l.value.toLocaleLowerCase().trim())&&Se.push({...ue,realId:ue.id,id:Er(10),value:Le});!Se.length&&!ue.onlyRecommendChildren&&Se.push({...ue,value:{id:l.value,name:l.value}}),W.push(...Se)}if(y.value=W,console.log("list",W),e.valueBehavior===zt.NEED_KEY){const ue=W.find(ge=>!ge.disabled);ue&&(!h.value||h.value&&!W.some(ge=>ge.id===h.value))&&(h.value=ue.id)}}async function te(){const W=J(l.value),q=(W==null?void 0:W.values)||[{id:l.value,name:l.value}];if(await G(q))return t("add",W||new Zr({...q[0]},"text")),l.value="",U(),!0}async function $(){let W=[];if(u.value.isSpecialType()){const se=J(l.value);se&&(u.value=se,W=se.values)}if(W=W.length?W:u.value.str2Values(l.value),!!await G(W))return u.value.type==="text"?(u.value.name=l.value,u.value.id=l.value):u.value.values=W,t("add",u.value),l.value="",u.value=null,ne(!0),!0}function Q(){if(!i.value)return;const W=document.createRange(),q=window.getSelection();W.selectNodeContents(i.value),W.collapse(!1),q.removeAllRanges(),q.addRange(W)}function ne(W=!1,q=!0){W&&setTimeout(U,16),d.value=!0,f.value=!0,c.value=!1,!e.getMenuList&&q&&a.nextTick(Q),t("focus",d.value)}function le(W){var se;t("add",W??u.value);const q=!((se=u.value)!=null&&se.isCustomMenu);u.value=null,l.value="",q&&(ne(!0,q),a.nextTick(X))}function ae(){if(!i.value)return;const W=i.value.querySelectorAll("br");W==null||W.forEach(q=>q.remove())}function X(){i.value&&(l.value="",a.nextTick(()=>{i.value.innerText="",ae()}))}function J(W){const[q,se]=W.split(":");if(q!=null&&q.trim()){const fe=C.value.find(ee=>ee.name===q.trim());if(fe){const ee=new Zr({...fe},"default");return ee.addValues(se),ee}}}function Y(){var W;(W=l.value)!=null&&W.length&&(l.value="",Array.from(i.value.childNodes).forEach(se=>{var fe;se.nodeType===Node.TEXT_NODE&&((fe=se.textContent)!=null&&fe.trim())&&i.value.removeChild(se)}))}function oe(){var W;(W=i.value)==null||W.focus()}async function pe(){await H().then(W=>W&&X()),f.value=!1,i.value.blur()}function Z(){l.value="",c.value=!1,f.value=!1,u.value=null,a.nextTick(X)}function ce(W){u.value.values=[{id:W,name:W}],H().then(q=>q&&X())}function ie(){u.value||(h.value="")}function F(W){E.value=!1,l.value=W.data,M(W)}function K(){E.value=!0}return n({inputFocusForWrapper:oe,inputEnterForWrapper:pe,inputClearForWrapper:Z,handleInputFocus:I,isFocus:d,refleshMenuHover:ie}),{popoverRef:o,inputRef:i,keyword:l,loading:p,remoteMenuList:b,menuList:y,menuHoverId:h,isFocus:d,isComposition:E,usingItem:u,showPopover:f,showNoSelectValueError:c,debounceSetMenuList:g,documentArrowEvent:O,handleClickOutside:_,handleInputFocus:I,handleInputChange:M,handleInputPaste:R,handleLogicalChange:D,handleInputKeyup:j,handleSelectItem:P,handleSelectConditionItem:B,handleMenuFooterClick:z,resolveClassName:s,inputFocusForWrapper:oe,inputEnterForWrapper:pe,inputClearForWrapper:Z,deleteInputTextNode:Y,customPanelSubmit:ce,refleshMenuHover:ie,t:r,inputKey:x,handleCompositionEnd:F,handleCompositionStart:K}},render(){var f,u;const{multiple:e,values:t,placeholder:n,inputInnerHtml:r,isCustomMenu:s}=this.usingItem||{},i=!((f=this.keyword)!=null&&f.length)&&!(t!=null&&t.length)&&n,o=this.loading||this.showNoSelectValueError||this.showPopover&&(!!s||!!((u=this.menuList)!=null&&u.length)),l=!this.usingItem&&this.showCondition,c=()=>{var h,p,g,v;return a.withDirectives(a.createVNode("div",{key:this.inputKey,ref:"inputRef",class:{"div-input":!0,"input-before":this.showInputBefore&&!((h=this.keyword)!=null&&h.length),"input-after":i},contenteditable:!0,"data-placeholder":!this.isComposition&&!r&&!this.keyword?this.placeholder:"","data-tips":this.isComposition?"":n||"",spellcheck:"false",onCompositionend:this.handleCompositionEnd,onCompositionstart:this.handleCompositionStart,onFocus:this.handleInputFocus,onInput:this.handleInputChange,onKeydown:this.handleInputKeyup,onPaste:this.handleInputPaste},[((p=this.usingItem)==null?void 0:p.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:b=>b.preventDefault()},[this.usingItem.name,a.createTextVNode(": ")])),(v=(g=this.usingItem)==null?void 0:g.values)==null?void 0:v.map((b,y)=>a.createVNode("span",{key:y,"data-id":b.id,"data-index":y,"data-key":b.name,"data-type":"value"},[b.name,y<this.usingItem.values.length-1?` ${this.usingItem.logical} `:""]))]),[[a.resolveDirective("clickoutside"),this.handleClickOutside]])},d=()=>{var h,p,g,v,b;return this.loading?a.createVNode("div",null,[this.t.loading]):this.showNoSelectValueError?a.createVNode("div",null,[this.t.filterQueryMustHasValue]):(h=this.usingItem)!=null&&h.isCustomMenu&&this.$slots.menu?a.createVNode("div",{ref:"popoverRef",class:this.resolveClassName("search-select-popover")},[this.$slots.menu({value:(p=this.usingItem.values)==null?void 0:p[0],id:this.usingItem.id,name:this.usingItem.name,onSubmit:this.customPanelSubmit})]):(g=this.menuList)!=null&&g.length?a.createVNode("div",{ref:"popoverRef",class:this.resolveClassName("search-select-popover")},[a.createVNode(wA,{conditions:l?this.conditions:[],hoverId:this.menuHoverId,keyword:this.keyword,list:this.menuList,logical:(v=this.usingItem)==null?void 0:v.logical,maxHeight:this.maxHeight,multiple:!!e,selected:(t==null?void 0:t.map(y=>y.id))||[],showLogical:(b=this.usingItem)==null?void 0:b.showLogical,onFooterClick:this.handleMenuFooterClick,onSelectCondition:this.handleSelectConditionItem,onSelectItem:this.handleSelectItem,"onUpdate:logical":this.handleLogicalChange},null)]):void 0};return a.createVNode(Dt,{key:this.inputKey,arrow:!1,disableOutsideClick:!0,isShow:o,placement:"bottom-start",theme:"light",trigger:"manual"},{default:c,content:d})}}),CA=a.defineComponent({name:"SearchSelected",props:{data:{type:Array,required:!0},selectedList:{type:Array,required:!0},overflowIndex:{type:Number,default:-1},maxHeight:{type:Number,default:()=>392},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:i,onEditBlur:o,editKey:l}=zv();function c(g){t("delete",g)}function d(g,v,b){g.preventDefault(),g.stopPropagation(),s(v,b),t("selectKey",{id:v.id,name:v.name,values:v.values.slice()}),setTimeout(()=>n.value.handleInputFocus(),200)}function f(g,v){i(g,v)}function u(g){g||o()}function h(g){var v;return!((v=r.value)!=null&&v.contains(g))}function p(g){const v=new Zr(g.searchItem,g.type);return v.values=g.values.slice(),v.logical=g.logical||Ca.OR,v}return{inputRef:n,selectedInputRef:r,editKey:l,copySelectedItem:p,handleDeleteSelected:c,handleEditSelected:d,handleInputOutside:h,handleAddSelected:f,handleInputFocus:u}},render(){const e=(t,n)=>this.editKey===`${t.id}_${n}`?a.createVNode("div",{key:this.editKey.toString(),ref:"selectedInputRef",class:"selected-input"},[a.createVNode(Wv,{key:this.editKey.toString(),ref:"inputRef",clickOutside:this.handleInputOutside,conditions:this.conditions,data:this.data,defaultUsingItem:this.copySelectedItem(t),getMenuList:this.getMenuList,maxHeight:this.maxHeight,mode:sr.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(wt,{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)])])}}),vf=40,tm=6,nm=26,NA=32,xA={data:{type:Array,default:()=>[]},modelValue:{type:Array,default:()=>[]},maxHeight:{type:Number,default:NA*12+8},conditions:{type:Array,default:()=>[]},clearable:{type:Boolean,default:!0},placeholder:String,getMenuList:Function,validateValues:Function,uniqueSelect:{type:Boolean,default:!1},valueBehavior:{type:String,default:zt.ALL,validator(e){return[zt.ALL,zt.NEED_KEY].includes(e)}}},SA=a.defineComponent({name:"SearchSelect",directives:{clickoutside:Ln},props:xA,emits:["update:modelValue","search","selectKey"],slots:Object,setup(e,{emit:t}){const n=Be("searchSelect"),{resolveClassName:r}=he(),s=a.computed(()=>e.conditions===void 0?[{id:"or",name:n.value.or},{id:"and",name:n.value.and}]:e.conditions),i=a.ref(null),o=a.ref(null),l=a.ref(!1),c=a.ref([]),d=a.ref(-1),f=Es(32,N),u=a.ref(""),h=a.ref(""),p=a.shallowRef([]);a.watch(()=>e.data,()=>{p.value=JSON.parse(JSON.stringify(e.data));for(const _ of p.value||[])_.isSelected=e.uniqueSelect&&e.modelValue.some(L=>L.id===_.id)},{immediate:!0}),a.watch(()=>e.modelValue,_=>{var I;if(!(_!=null&&_.length)){c.value=[];for(const R of p.value||[])R.isSelected=!1;return}const L=[];for(const R of _){const M=c.value.find(j=>j.id===R.id&&j.name===R.name);if((M==null?void 0:M.toValueKey())===JSON.stringify(R))M.values=R.values||[],M.logical=R.logical||Ca.OR,L.push(M);else{let j=e.data.find(P=>P.id===R.id),H="default";j||(j=e.conditions.find(P=>P.id===R.id),j&&(H="condition")),!j&&!((I=R.values)!=null&&I.length)&&(H="text");const A=new Zr(j||R,H);A.values=R.values||[],A.logical=R.logical||Ca.OR,L.push(A)}}c.value=L,p.value=JSON.parse(JSON.stringify(e.data||[]));for(const R of p.value)R.isSelected=e.uniqueSelect&&!!L.some(M=>M.id===R.id)},{immediate:!0,deep:!0}),a.onMounted(()=>{mA(o.value.querySelector(`.${r("search-select-container")}`),f),f()}),a.onBeforeUnmount(()=>{pA(o.value.querySelector(`.${r("search-select-container")}`),f)}),bA({onEditClick:g,onEditEnter:v,onEditBlur:b,onValidate:y,editKey:u,searchData:a.computed(()=>e.data),isClickOutside:S});function g(_,L){u.value=`${_.id}_${L}`}function v(_,L){const I=c.value.slice();I.splice(L,1,_),t("update:modelValue",I.map(R=>R.toValue())),u.value=""}function b(){u.value="",y("")}function y(_){h.value=_||""}function N(){if(l.value||c.value.length<1){d.value=-1;return}const _=o.value.querySelector(`.${r("search-select-container")}`),L=o.value.querySelector(".search-container").clientWidth-tm-2,I=_.querySelectorAll(".search-container-selected:not(.overflow-selected)");let R=0,M=0,j=0;for(;M===0&&R<=L-vf&&j<=I.length-1;){const H=I[j];if(H.clientHeight>nm){d.value=j;return}R+=H?H.clientWidth+tm:0,R>=L-vf&&(M=j),j+=1}if(M===I.length-1&&R<=L){d.value=-1;return}d.value=R>=L-vf?M:M-1}function w(){u.value||i.value.inputFocusForWrapper()}function C(_){_.stopPropagation(),c.value=[],d.value=-1,i.value.inputClearForWrapper(),t("update:modelValue",[])}function S(_){var L;return!((L=o.value)!=null&&L.contains(_))}function x(_){const L=c.value.slice();L.push(_),y(""),t("update:modelValue",L.map(I=>I.toValue()))}function E(_){const L=c.value.slice();L.splice(typeof _=="number"?_:c.value.length-1,1),y(""),i.value.refleshMenuHover(),t("update:modelValue",L.map(I=>I.toValue()))}function T(_){var L;_&&(d.value=-1),_===!1&&((L=o.value.querySelector(`.${r("search-select-container")}`))==null||L.scrollTo(0,0)),l.value=_}function O(_){i.value.inputEnterForWrapper(),t("search",_)}function V(_){t("selectKey",_)}return{inputRef:i,wrapRef:o,isFocus:l,copyData:p,selectedList:c,overflowIndex:d,validateStr:h,onEditClick:g,onEditEnter:v,handleWrapClick:w,handleInputFocus:T,handleResize:N,handleClearAll:C,handleInputOutside:S,handleAddSelected:x,handleDeleteSelected:E,handleClickSearch:O,localConditions:s,resolveClassName:r,handleSelectedKey:V,t:n}},render(){var r,s;const e=`${this.isFocus?this.maxHeight:nm}`.replace("px",""),t=!!this.selectedList.length&&this.selectedList.slice(-1)[0].type!=="condition",n=Object.assign({},this.$slots.menu?{menu:i=>{var o,l;return(l=(o=this.$slots).menu)==null?void 0:l.call(o,i)}}:{});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:{"max-height":`${e}px`},class:"search-container"},[a.createVNode(CA,{conditions:this.localConditions,data:this.copyData,getMenuList:this.getMenuList,maxHeight:this.maxHeight,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(Wv,{ref:"inputRef",clickOutside:this.handleInputOutside,conditions:this.localConditions,data:this.copyData,getMenuList:this.getMenuList,maxHeight:this.maxHeight,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(Vt,{class:"search-clear",onClick:this.handleClearAll},null),this.$slots.append?this.$slots.append():a.createVNode(jr,{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($s,{class:"select-tips"},null),this.validateStr||""])])])}}),qv=Ie(SA);function TA(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const Gv=Sh(hl);Gv.width.default="400";const _A=a.defineComponent({name:"Sideslider",inheritAttrs:!1,props:{...Gv,title:m.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:i}=he(),o=async()=>{let d=!0;typeof e.beforeClose=="function"&&(d=await e.beforeClose()),d&&(t("update:isShow",!1),t("closed"),t("animation-end"))},l=()=>{t("shown")},c=()=>{t("hidden")};return()=>{const d={header:()=>{var u;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:`${i("sideslider-header")}`},[a.createVNode("div",{class:`${i("sideslider-close")}`,onClick:()=>void o()},[e.direction==="left"?a.createVNode(an,null,null):a.createVNode($t,null,null)]),a.createVNode("div",{class:`${i("sideslider-title")}`},[((u=r.header)==null?void 0:u.call(r))??e.title])])])},default:()=>{var u;return a.createVNode("div",{class:`${i("sideslider-content")}`},[(u=r.default)==null?void 0:u.call(r)])}};r.footer&&Object.assign(d,{footer:()=>a.createVNode("div",{class:`${i("sideslider-footer")}`},[r.footer()])});const f={...n};return s.vnode.scopeId&&(f[s.vnode.scopeId]=""),a.createVNode(Gs,a.mergeProps(f,{width:e.width,class:{[i("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:o,onHidden:c,onShown:l}),TA(d)?d:{default:()=>[d]})}}}),Kv=Ie(_A),rm=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),i=a.ref(0),o=a.ref(0),l=a.ref(null),c=a.ref(e.modelValue),d=a.ref(0),f=a.ref(0),u=a.ref(!1),h=a.ref(null),p=a.computed(()=>{var V,_;let T="";if((V=e.params.customContent)!=null&&V[e.modelValue]){const L=e.params.customContent[e.modelValue];T=L.tip||L.label||""}const O=e.params.vertical?hs.RIGHT:hs.TOP;return(_=e.params)!=null&&_.showTip?{content:e.params.formatterTipLabel(`${T||(e==null?void 0:e.modelValue)||"0"}`),placement:O}:{content:"",placement:O}}),g=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),v=a.computed(()=>e.params.vertical?{bottom:g.value}:{left:g.value}),b=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),y=T=>{e.params.disable||(T.preventDefault(),N(T),ts(window,"mousemove",w),ts(window,"touchmove",w),ts(window,"mouseup",C),ts(window,"touchend",C))},N=T=>{n.value=!0,r.value=!0,e.params.vertical?s.value=T.clientY:i.value=T.clientX,o.value=parseFloat(g.value),l.value=o.value},w=T=>{if(n.value){r.value=!1,t("resetSize");let O=0;e.params.vertical?(d.value=T.clientY,O=(s.value-d.value)/e.params.sliderSize*100):(f.value=T.clientX,O=(f.value-i.value)/e.params.sliderSize*100),l.value=o.value+O,S(l.value)}},C=()=>{u.value=!1,n.value&&(setTimeout(()=>{n.value=!1,r.value||(S(l.value),t("emitChange"))},0),wi(window,"mousemove",w),wi(window,"touchmove",w),wi(window,"mouseup",C),wi(window,"touchend",C))},S=T=>{if(T===null||isNaN(T))return;T<0?l.value=0:T>100&&(l.value=100);const O=100/((e.params.maxValue-e.params.minValue)/e.params.step);let _=Math.round(T/O)*O*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;_=parseFloat(_.toFixed(e.params.precision)),t("update:modelValue",_),!n.value&&e.modelValue!==c.value&&(c.value=e.modelValue)},{resolveClassName:x}=he();return{renderDom:()=>a.createVNode("div",{ref:h,style:v.value,class:[`${x("slider-button")}`,e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],tabindex:"0",onClick:T=>T.stopPropagation(),onMousedown:y},[p.value.content?a.createVNode(a.Fragment,null,[a.createVNode(Dt,{boundary:document.body,content:p.value.content,placement:p.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"]},[b.value])]):null]),setPosition:S,tip:p}},render(){return this.renderDom()}}),ts=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},wi=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)},EA=a.defineComponent({name:"Slider",props:{modelValue:m.oneOfType([m.arrayOf(m.number),m.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),i=a.ref(null),o=a.ref(null),l=a.ref(0),c=a.ref(0),d=a.ref(null),f=a.ref(null),u=a.ref(null),h=a.ref(null),p=a.computed(()=>{const D=[e.minValue,e.maxValue,e.step].map(k=>{const G=`${k}`.split(".")[1];return G?G.length:0});return Math.max.apply(null,D)}),g=a.computed(()=>Math.min(s.value,i.value)),v=a.computed(()=>Math.max(s.value,i.value)),b=a.computed(()=>e.range?`${100*(v.value-g.value)/(e.maxValue-e.minValue)}%`:`${100*(s.value-e.minValue)/(e.maxValue-e.minValue)}%`),y=a.computed(()=>e.range?`${100*(g.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),N=a.computed(()=>e.vertical?{height:b.value,bottom:y.value}:{width:b.value,left:y.value}),w=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const D=(e.maxValue-e.minValue)/e.step,k=100*e.step/(e.maxValue-e.minValue),G=[];for(let U=1;U<D;U++)G.push(U*k);return e.range?G.filter(U=>U<100*(g.value-e.minValue)/(e.maxValue-e.minValue)||U>100*(v.value-e.minValue)/(e.maxValue-e.minValue)):G.filter(U=>U>100*(s.value-e.minValue)/(e.maxValue-e.minValue))}),C=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),S=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const D=100*e.step/(e.maxValue-e.minValue),k=[];for(let G=e.minValue,U=0;G<=e.maxValue;G+=e.step,U++){const te={stepWidth:U*D,stepLabel:e.formatterLabel(G)};k.push(te)}return k}),x=a.computed(()=>Array.isArray(e.modelValue)),E=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((D,k)=>Number(D)-Number(k)).filter(D=>Number(D)>=e.minValue&&Number(D)<=e.maxValue).map(D=>{const{tip:k}=e.customContent[D],{label:G}=e.customContent[D];return{tip:k||G||"",label:G||"",percent:(Number(D)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),T=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:p.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:r.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{L()}),a.watch(()=>s.value,D=>{e.range?n("update:modelValue",[g.value,v.value]):n("update:modelValue",D),l.value=D}),a.watch(()=>i.value,D=>{n("update:modelValue",[g.value,v.value]),c.value=D}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(s.value=Math.max(e.minValue,Number(e.modelValue[0])),i.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(s.value=e.minValue,i.value=e.maxValue),o.value=[s.value,i.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?s.value=e.minValue:s.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),o.value=s.value),O(),ts(window,"resize",O())});const O=()=>{d.value&&(r.value=d.value[`client${e.vertical?"Height":"Width"}`])},V=D=>{var k,G;if(D.stopPropagation(),!e.disable){if(O(),e.vertical){const U=(k=d.value)==null?void 0:k.getBoundingClientRect().bottom;M((U-D.clientY)/r.value*100)}else{const U=(G=d.value)==null?void 0:G.getBoundingClientRect().left;M((D.clientX-U)/r.value*100)}I()}},_=()=>e.range?![g.value,v.value].every((D,k)=>{var G;return D===((G=o.value)==null?void 0:G[k])}):e.modelValue!==o.value,L=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const D=e.modelValue;e.range&&Array.isArray(D)?D[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):D[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):D[0]<e.minValue?n("update:modelValue",[e.minValue,D[1]]):D[1]>e.maxValue?n("update:modelValue",[D[0],e.maxValue]):(s.value=Number(D[0]),i.value=Number(D[1]),_()&&(o.value=D.slice())):!e.range&&typeof D=="number"&&!isNaN(D)&&(D<e.minValue?n("update:modelValue",e.minValue):D>e.maxValue?n("update:modelValue",e.maxValue):(s.value=D,_()&&(o.value=D)))},I=async()=>{await a.nextTick(),n("change",e.range?[g.value,v.value]:e.modelValue)},R=D=>e.vertical?{bottom:`${D}%`}:{left:`${D}%`},M=D=>{if(!e.range){f.value.setPosition(D);return}const k=e.minValue+D*(e.maxValue-e.minValue)/100;Math.abs(g.value-k)<Math.abs(v.value-k)?h.value=s.value<i.value?f.value:u.value:h.value=s.value>i.value?f.value:u.value,h.value.setPosition(D)},j=D=>{if(D==="")return;const k=parseFloat(D);k<e.minValue?(l.value=e.minValue,s.value=e.minValue):k>e.maxValue?(l.value=e.maxValue,s.value=e.maxValue):s.value=k},H=D=>{if(D==="")return;const k=parseFloat(D.toString());k<e.minValue?(c.value=e.minValue,i.value=e.minValue):k>e.maxValue?(c.value=e.maxValue,i.value=e.maxValue):i.value=k},A=D=>{let k=0;return D==="start"?k=e.vertical?e.maxValue:e.minValue:k=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[s.value,i.value].includes(k)?"0":"1"},{resolveClassName:P}=he(),B=(D,k)=>{let G=k.stepWidth??k.percent??k;if(e.labelClick){D.stopPropagation(),D.stopImmediatePropagation(),D.preventDefault();let U;if(typeof e.labelClick=="function"){const te={percent:G,step:k};if(U=e.labelClick(D,te),U===!1)return}G=typeof U=="number"?U:G,console.log("handleStepLabelClick",G),M(G);return}};return{renderDom:()=>{var D,k;return a.createVNode("div",{class:[`${P("slider")}`,e.extCls]},[(D=t.start)==null?void 0:D.call(t),a.createVNode("div",{ref:d,style:C.value,class:`${P("slider-runway")}`,onClick:V},[a.createVNode("div",{style:N.value,class:[`${P("slider-bar")}`,e.vertical?"vertical":"horizontal",{disable:e.disable}]},null),e.showInterval?w.value.map((G,U)=>U===0||U===w.value.length-1?null:a.createVNode("div",{key:U,style:R(G),class:[`${P("slider-interval")}`,{vertical:e.vertical}],onClick:te=>B(te,G)},null)):null,e.customContent?E.value.map((G,U)=>U===0||U===E.value.length-1?null:a.createVNode("div",{key:U,style:R(G.percent),class:[`${P("slider-interval")}`,{vertical:e.vertical}],onClick:te=>B(te,G)},null)):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?a.createVNode("div",{class:[`${P("slider-labels")}`,e.vertical?"vertical":"horizontal"]},[function(){if(e.showBetweenLabel)return[a.createVNode("div",{style:[{opacity:A("start")}],class:"label-start"},[e.formatterLabel(e.minValue)]),a.createVNode("div",{style:[{opacity:A("end")}],class:"label-end"},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return S.value.map((G,U)=>a.createVNode("div",{key:U,style:R(G.stepWidth),class:[`${P("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:te=>B(te,G)},[G.stepLabel]));if(e.customContent)return E.value.map((G,U)=>a.createVNode("div",{key:U,style:R(G.percent),class:[`${P("slider-label")}`,e.vertical?"vertical":"horizontal"],onClick:te=>B(te,G)},[G.label]))}()]):void 0,a.createVNode(rm,{ref:f,modelValue:s.value,"onUpdate:modelValue":G=>s.value=G,params:T.value,onEmitChange:I,onResetSize:O},null),e.range?a.createVNode(rm,{ref:u,modelValue:i.value,"onUpdate:modelValue":G=>i.value=G,params:T.value,onEmitChange:I,onResetSize:O},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:`${P("slider-input")}`},[a.createVNode("div",{class:"input-item"},[a.createVNode(hr,{max:e.maxValue,min:e.minValue,modelValue:l.value,type:"number",onChange:j},null)]),x.value&&i.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("~")]),a.createVNode("div",{class:"input-item"},[a.createVNode(hr,{max:e.maxValue,min:e.minValue,modelValue:c.value,type:"number",onChange:H},null)])]:void 0]):void 0,(k=t.end)==null?void 0:k.call(t)])}}},render(){return this.renderDom()}}),Yv=Ie(EA);var Xv=function(e){return e.ERROR="error",e.LOADING="loading",e.UNKNOWN="",e}(Xv||{});const am={theme:m.theme().def(po.PRIMARY),size:m.size(),curStep:m.number.def(1),controllable:m.bool.def(!1),direction:Jm(),status:xe("status",{}).def(Xv.UNKNOWN),lineType:Zm(),extCls:m.string,steps:m.array.def([]),beforeChange:m.func},OA=a.defineComponent({name:"Steps",props:am,emits:["update:curStep","click"],setup(e,{emit:t}){const n=Be("steps"),r=Be("lang"),s=a.ref([]),i=f=>{const u=[];f.forEach(h=>{typeof h=="string"?u.push(h):u.push({title:h.title,icon:h.icon,description:h.description,status:h.status,border:h.border??!0})}),s.value.splice(0,s.value.length,...u)},o=f=>{am.curStep=f},l=()=>{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&&i(e.steps)};a.watch(()=>r.value,()=>{l()});const c=async f=>{try{e.controllable&&f!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(u,h)=>{const p=await e.beforeChange(f);p?u(p):h(p)}),t("update:curStep",f),t("click",f))}catch(u){console.warn(u)}};a.onMounted(l),a.watch(()=>e.steps,()=>{i(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{o(e.curStep)},{deep:!0});const{resolveClassName:d}=he();return{defaultSteps:s,jumpTo:c,resolveClassName:d}},render(){const e=this.resolveClassName("steps"),t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",r=Ae({[`${this.extCls}`]:!!this.extCls,[`${this.resolveClassName(`steps-${this.direction}`)}`]:this.direction,[`${this.resolveClassName(`steps-${this.lineType}`)}`]:this.lineType},`${t} ${e} ${n}`),s=u=>this.curStep>u+1||this.defaultSteps[u].status==="done",i=u=>this.curStep===u+1,o=u=>{const{icon:h}=u;return h?Object.prototype.toString.call(h)==="[object Object]":typeof u=="string"},l=(u,h)=>(h.icon||(h.icon=u),!isNaN(h.icon)),c=u=>u.status==="loading",d=u=>u.status==="error",f=(u,h)=>i(u)&&this.status==="loading"||c(h)?a.createVNode(Is,{class:`${this.resolveClassName("icon")} ${this.resolveClassName("steps-icon")} icon-loading`},null):i(u)&&this.status==="error"||d(h)?a.createVNode(wt,{class:`${this.resolveClassName("steps-icon")}`},null):s(u)?a.createVNode(zr,{class:`${this.resolveClassName("steps-icon")}`},null):a.createVNode("span",null,[l(u,h)?u+1:a.createVNode(h.icon,null,null)]);return a.createVNode("div",{class:r},[this.defaultSteps.map((u,h)=>{var p,g;return a.createVNode("div",{class:[this.resolveClassName("step"),u.title?"":this.resolveClassName("step-no-content"),s(h)?"done":"",i(h)?"current":"",i(h)&&this.status==="error"?"is-error":"",u.status&&i(h)?[`${this.resolveClassName(`step-${u.status}`)}`]:""]},[a.createVNode("span",{style:{cursor:this.controllable?"pointer":""},class:[`${this.resolveClassName("step-indicator")}`,`${this.resolveClassName(`step-${o(u)?"icon":"number"}`)}`,`${this.resolveClassName(`step-icon${u.status}`)}`],onClick:()=>{this.jumpTo(h+1)}},[((g=(p=this.$slots)[h+1])==null?void 0:g.call(p))??f(h,u)]),u.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(h+1)}},[u.title]),u.description&&a.createVNode("div",{class:`${this.resolveClassName("step-description")}`,title:u.description},[u.description])]):""])})])}}),Jv=Ie(OA),AA=a.defineComponent({name:"Swiper",props:{isLoop:m.bool.def(!0),loopTime:m.number.def(8e3),pics:m.array.def([]),list:m.array.def([]),height:m.number,width:m.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:r,loopTime:s,pics:i,list:o,height:l,width:c}=a.toRefs(e),d=a.ref(),f=a.ref(0),u=a.ref(0),h=a.ref(0),p=a.ref(0);let g;const{resolveClassName:v}=he(),b=a.computed(()=>{var R;return((R=o.value)==null?void 0:R.length)>0?o.value:i.value}),y=a.computed(()=>({width:`${u.value*b.value.length}px`,transform:`translateX(-${u.value*f.value}px)`})),N=a.computed(()=>({width:`${u.value}px`,height:`${h.value}px`})),w=R=>{let M=R;R>=b.value.length&&(M=0),R<0&&(M=b.value.length-1),f.value=M,t("index-change",M)},C=R=>{R&&window.open(R,"_blank")},S=R=>[`${v("swiper-img")}`,{[`${v("swiper-link")}`]:R.link},R.class],x=R=>({"background-image":`url(${R.url})`,"background-color":R.color}),E=R=>({[`${v("current-index")}`]:f.value===R}),T=()=>{r.value&&(p.value=window.setTimeout(()=>{w(f.value+1),T()},s.value))},O=()=>{window.clearTimeout(p.value)},V=()=>{var M;const R=(M=d.value)==null?void 0:M.parentElement;!R||!window.ResizeObserver||(g=new ResizeObserver(()=>{I()}),g.observe(R))},_=()=>{var R;(R=g.disconnect)==null||R.call(g)},L=R=>{if(R===void 0)return{height:0,width:0};const M=getComputedStyle(R),j=R.clientWidth-parseFloat(M.paddingTop)-parseFloat(M.paddingBottom);return{height:R.clientHeight-parseFloat(M.paddingLeft)-parseFloat(M.paddingRight),width:j}},I=()=>{var M;const R=L((M=d.value)==null?void 0:M.parentElement);u.value=+c.value>0?c.value:R.width,h.value=+l.value>0?l.value:R.height};return a.watch([l,c],I),a.onMounted(()=>{I(),T(),V()}),a.onBeforeUnmount(()=>{O(),_()}),()=>a.createVNode("section",{ref:d,style:N.value,class:`${v("swiper-home")}`},[a.createVNode("hgroup",{style:y.value,class:`${v("transition")} ${v("swiper-main")}`},[b.value.map(R=>{var M;return a.createVNode("h3",{style:N.value,class:`${v("swiper-card")}`},[((M=n.default)==null?void 0:M.call(n,R))??a.createVNode("span",{style:x(R),class:S(R),onClick:()=>C(R.link)},null)])})]),a.createVNode("ul",{class:`${v("swiper-index")}`},[b.value.map((R,M)=>a.createVNode("li",{class:E(M),onMouseover:()=>w(M)},null))]),a.createVNode("span",{class:`${v("swiper-nav")} ${v("nav-prev")}`,onClick:()=>w(f.value-1)},[a.createVNode("i",{class:`${v("swiper-nav-icon")}`},null)]),a.createVNode("span",{class:`${v("swiper-nav")} ${v("nav-next")}`,onClick:()=>w(f.value+1)},[a.createVNode("i",{class:`${v("swiper-nav-icon")}`},null)])])}}),Zv=Ie(AA),LA={theme:R8(),size:m.size(),disabled:m.bool,showText:m.bool,isOutline:m.bool,onText:m.string.def("ON"),offText:m.string.def("OFF"),isSquare:m.bool,extCls:m.string,beforeChange:m.func.def(void 0),trueValue:m.oneOfType([m.string,m.number,m.bool]).def(!0),falseValue:m.oneOfType([m.string,m.number,m.bool]).def(!1),value:m.oneOfType([m.string,m.number,m.bool]).def(!1),modelValue:m.oneOfType([m.string,m.number,m.bool]).def(!1),withValidate:m.bool.def(!0)};let ro=function(e){return e.CHANGE="change",e.UPDATE="update:modelValue",e}({});function VA(e){return e}function DA(e){return!!e}const kA={[ro.UPDATE]:VA,[ro.CHANGE]:DA},RA=a.defineComponent({name:"Switcher",props:LA,emits:kA,setup(e,{emit:t}){const n=on(),{resolveClassName:r}=he(),s=a.ref(!1),i=a.computed(()=>e.trueValue===l.value),o=a.ref(e.modelValue!==!1),l=a.computed(()=>o.value?e.modelValue:e.value),c=a.computed(()=>{const u={[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":i.value,"is-unchecked":!i.value,"is-loading":s.value,[`${r("primary")}`]:e.theme==="primary"};if(e.size&&!e.showText){const h=`${r(`switcher-${e.size}`)}`;u[h]=!0}return u});a.watch(()=>e.modelValue,()=>{var u;o.value=!0,e.withValidate&&((u=n==null?void 0:n.validate)==null||u.call(n,"change"))}),a.watch(()=>e.value,()=>{o.value=!1});const d=u=>{if(u.stopPropagation(),u.preventDefault(),e.disabled||s.value)return;const h=i.value?e.falseValue:e.trueValue,p=!i.value,g=()=>{t(ro.UPDATE,h),t(ro.CHANGE,p)};let v=!0;if(typeof e.beforeChange=="function"&&(v=e.beforeChange(h),typeof v.then=="function"))return s.value=!0,v.then(()=>{g()}).finally(()=>{s.value=!1});v&&g()},f=u=>{(u.code==="Enter"||u.key==="Enter"||u.keyCode===13)&&d(u)};return()=>a.createVNode("div",{class:c.value,tabindex:"0",onClick:d,onKeydown:f},[s.value?a.createVNode(Xo,{class:`${r("switcher-loading")}`},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[i.value?e.onText:e.offText]):""])}}),Qv=Ie(RA);var ao=(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))(ao||{}),is=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e))(is||{});const e4=xe("position",{}).def("top");var t4=(e=>(e.INSERT="insert",e.REPLACE="replace",e))(t4||{});const n4=xe("sortType",{}).def("replace"),IA={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},PA={name:m.oneOfType([m.number,m.string]).def(""),label:m.string||m.func,tips:m.string,closable:m.bool,visible:m.bool.def(!0),disabled:m.bool,sortable:m.bool,renderDirective:mo(),panel:m.string||m.func,num:m.number.def(void 0),numDisplayType:m.string.def("default")},MA={active:m.oneOfType([m.number,m.string]).def(""),type:xe("type",{}).def("border-card"),tabPosition:e4,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:n4,labelHeight:m.number.def(50),extCls:m.string.def(""),validateActive:m.bool.def(!0),activeBarSize:m.number.def(2),activeBarColor:m.string.def("#3a84ff"),beforeChange:{type:Function}},$A={active:m.oneOfType([m.number,m.string]).def(""),type:xe("type",{}).def("border-card"),activeBarColor:m.string.def("#3a84ff"),activeBarSize:m.number.def(2),panels:{type:Array,default:()=>[]},tabPosition:e4,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:n4,labelHeight:m.number.def(50),validateActive:m.bool.def(!0),...IA},sm=a.defineComponent({name:"TabNav",directives:{bkTooltips:Dn},props:$A,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([is.LEFT,is.RIGHT].includes(e.tabPosition)){const{clientHeight:h,offsetTop:p}=t.value,g={width:`${e.activeBarSize}px`,height:`${h}px`,top:`${p}px`,background:e.activeBarColor};return e.tabPosition===is.LEFT?g.right=0:g.left=0,g}if(e.type===ao.UNBORDER_CARD){const{clientWidth:h,offsetLeft:p}=t.value;return{width:`${h}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 u=!1;return e.panels.filter((p,g)=>{if(!p.props)return null;const{name:v,label:b,num:y,closable:N,visible:w,disabled:C,sortable:S,tips:x,numDisplayType:E}=p.props;if(!w)return!1;e.active===v&&(u=!0);const T=O=>p.slots.label?a.h(p.slots.label):[void 0,""].includes(O)?`选项卡${g+1}`:typeof O=="string"?O:typeof O=="function"?a.h(O):O;return f.push({name:v,closable:N,visible:w,disabled:C,sortable:S,tips:x,numDisplayType:E,tabLabel:T(b),tabNum:y}),!0}),!u&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),f}),s=a.ref(-1),i=a.ref(-1),o=a.ref(""),l=(f,u)=>f===u,c={handleTabAdd(f){e.tabAdd(f)},dragstart(f,u){i.value=f,o.value=e.guid,Object.assign(u.dataTransfer,{effectAllowed:"move"}),e.tabDrag(f,u)},dragenter(f){l(o.value,e.guid)&&(s.value=f)},dragend(){s.value=-1,i.value=-1,o.value=null},drop(f,u){if(!l(o.value,e.guid))return!1;e.tabSort(i.value,f,u)},handleTabChange(f){e.tabChange(f)},handleTabRemove(f,u){e.tabRemove(f,u)}},{resolveClassName:d}=he();return{...c,activeRef:t,activeBarStyle:n,tableNavList:r,dragenterIndex:s,dragStartIndex:i,draggingEle:o,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4),resolveClassName:d}},render(){const{active:e,closable:t,addable:n,sortable:r,sortType:s,labelHeight:i,dragstart:o,dragenter:l,dragend:c,drop:d}=this,f=()=>this.tableNavList.map((v,b)=>{if(!v)return null;const{name:y,disabled:N,tabLabel:w,tabNum:C,numDisplayType:S}=v,x=()=>{const V=[this.resolveClassName("tab-header-item")];return N&&V.push(this.resolveClassName("tab-header--disabled")),e===y&&V.push(this.resolveClassName("tab-header--active")),V.join(" ")},E=(V,_)=>!N&&(V||_),T=(V,_)=>E(V.closable,t)?a.createVNode("span",{class:this.resolveClassName("tab-header--close"),onClick:()=>this.handleTabRemove(_,V)},[a.createVNode(Vt,null,null)]):"",O=()=>["bracket"].includes(S)?`(${C})`:C;return a.withDirectives(a.createVNode("div",{key:y,ref:e===y?"activeRef":"tabLabelRef",class:x(),draggable:E(v.sortable,r),onClick:()=>!N&&this.handleTabChange(y),onDragend:V=>{V.preventDefault(),c()},onDragenter:V=>{V.preventDefault(),l(b)},onDragleave:V=>{V.preventDefault()},onDragover:V=>{V.preventDefault()},onDragstart:V=>o(b,V),onDrop:V=>{V.preventDefault(),d(b,s)}},[isNaN(C)?a.createVNode("div",null,[w]):a.createVNode("div",{class:this.resolveClassName("tab-header--has-num")},[a.createVNode("div",{class:this.resolveClassName("tab-header--has-num-left")},[w]),a.createVNode("div",{class:this.resolveClassName("tab-header--has-num-right")},[a.createVNode("div",{class:this.resolveClassName(`tab-header--has-num-${S}`)},[O()]),T==null?void 0:T(v,b)])]),isNaN(C)?T==null?void 0:T(v,b):""]),[[a.resolveDirective("bk-tooltips"),{content:v.tips||"",disabled:!v.tips}]])}),u=()=>{var b,y;const v=[];return typeof this.$slots.add=="function"?v.push((y=(b=this.$slots).add)==null?void 0:y.call(b,a.h)):n&&v.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(Hs,{style:"display:flex;",width:26,height:26},null)])),v.length?a.createVNode("div",{class:this.resolveClassName("tab-header-operation")},[v.map((N,w)=>a.createVNode("div",{key:w,class:this.resolveClassName("tab-header-item")},[N]))]):null},h=()=>this.type===ao.UNBORDER_CARD?a.createVNode("div",{style:this.activeBarStyle,class:this.resolveClassName("tab-header-active-bar")},null):"",p=typeof this.$slots.setting=="function"?a.createVNode("div",{class:this.resolveClassName("tab-header-setting")},[this.$slots.setting()]):null,g=u();return a.createVNode("div",{style:{lineHeight:`${i}px`},class:this.resolveClassName("tab-header")},[a.createVNode("div",{class:[this.resolveClassName("tab-header-nav"),g||p?"tab-header-auto":""]},[h(),f()]),g,p])}}),FA=a.defineComponent({name:"Tab",components:{TabNav:sm},props:MA,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([]),i=a.getCurrentInstance(),o=(f,u=[])=>{const{children:h}=f;return(h||[]).forEach(p=>{let{type:g}=p;g=g.name||g,g==="TabPanel"&&p.component?u.push(p.component):(g===a.Fragment||g==="template")&&o(p,u)}),u},l=()=>{if(t.default){const{children:f}=i.subTree.children[1];if(!f)return;const u=f[0],h=o(u);h.length!==s.value.length&&(s.value=h)}};a.onMounted(()=>{l(),r.value=!0,a.onUpdated(()=>{l()})});const c={tabAdd(f){n("add",{e:f}),n("add-panel",{e:f})},tabChange(f){var u;(((u=e.beforeChange)==null?void 0:u.call(e,f))??!0)&&(n("change",f),n("tab-change",f),n("update:active",f))},tabRemove(f,u){n("remove",f,u),n("remove-panel",f,u)},tabSort(f,u,h){const p=s.value;if(h===t4.INSERT)if(f<u)p.splice(u+1,0,s[f]),p.splice(f,1);else if(f>u)p.splice(u,0,s[f]),p.splice(f+1,1);else return!1;else{const g=p[u];p[u]=p[f],p[f]=g}s.value=[...p],n("sort",f,u,h),n("sort-change",f,u,h)},tabDrag(f,u){n("drag",f,u),n("on-drag-tab",f,u)}},{resolveClassName:d}=he();return{...c,isMounted:r,panels:s,resolveClassName:d}},render(){var n,r;const e=()=>{const s=[this.resolveClassName("tab"),this.extCls];return this.tabPosition===is.TOP?s.push(this.resolveClassName(`tab--${this.tabPosition}`),this.resolveClassName(`tab--${this.type}`)):(s.push(this.resolveClassName(`tab--${this.tabPosition}`)),this.type===ao.CARD_TAB&&s.push(this.resolveClassName("tab--vertical-tab"))),s},t=()=>{const{panels:s,active:i,type:o,closable:l,addable:c,sortable:d,sortType:f,labelHeight:u,validateActive:h,tabPosition:p,activeBarSize:g,activeBarColor:v,tabAdd:b,tabChange:y,tabRemove:N,tabSort:w,tabDrag:C}=this,S={panels:s,active:i,type:o,closable:l,addable:c,sortable:d,sortType:f,labelHeight:u,validateActive:h,tabPosition:p,activeBarSize:g,activeBarColor:v,tabAdd:b,tabChange:y,tabRemove:N,tabSort:w,tabDrag:C};return!s||!Array.isArray(s)?null:a.createVNode(sm,S,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)])])}}),HA=a.defineComponent({name:"TabPanel",props:PA,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}=he();return a.withDirectives(a.createVNode("div",{ref:"content",class:n("tab-panel")},[t()]),[[a.vShow,e]])}}),r4=St(FA,{TabPanel:HA});var a4=(e=>(e.COL="col",e.HORIZONTAL="horizontal",e.NONE="none",e.OUTER="outer",e.ROW="row",e))(a4||{}),s4=(e=>(e.AUTO="auto",e.HIGHLIGHT="highlight",e))(s4||{});const BA=["auto","highlight"],zA=["none","row","col","outer","horizontal"],De={ROW_INDEX:"row_index",ROW_UID:"row_id",ROW_EXPAND:"row_expand",ROW_SELECTION:"row_selection",ROW_SELECTION_INDETERMINATE:"row_selection_indeterminate",ROW_SPAN:"row_span",ROW_HEIGHT:"row_height"},be={COL_UID:"col_$uuid",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_RESIZEABLE:"col_resizeable",COL_FIXED_STYLE:"col_fixed_style",COL_RECT:"col_rect",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"},i4=8,lr=42;var gl=(e=>(e.DEF1="def1",e.DEF2="def2",e))(gl||{});const o4={def1:"#FAFBFD",def2:"#F0F1F5"},os={large:78,medium:60,small:42},jA=e=>[{value:"small",label:e.value.setting.lineHeight.small,height:os.small},{value:"medium",label:e.value.setting.lineHeight.medium,height:os.medium},{value:"large",label:e.value.setting.lineHeight.large,height:os.large}],l4=Symbol("bkInitColumns"),UA=60;var ct=(e=>(e.ASC="asc",e.CUSTOM="custom",e.DESC="desc",e.NULL="null",e))(ct||{});const WA=["asc","desc","null","custom"],Qr=80,Tr={},qA={};xe("showOverflowTooltipMode",{default:"auto"});const GA=xe("columnType",{default:"__COL_TYPE_NONE"}),Xf=xe("columnType",{default:""});xe("full",{default:"full"});xe("columnSize",{default:"small"});const KA=bt(),Dh=xe("IOverflowTooltipPropType",{default:!1,type:[Boolean,Object]}),YA=xe("ISortPropShape",{default:!1,type:[Boolean,String,Object]}),XA=xe("IFilterPropShape",{default:!1,type:[Boolean,Object]});var c4=(e=>(e.DEBOUNCE="debounce",e.THROTTLE="throttle",e))(c4||{});const vl=xe("IColumnType",{default:{width:"100%",label:""},type:[Object]}),JA=xe("ITableSettingPropType",{default:!1,type:[Boolean,Object]}),yf=xe("LabelFunctionStringType",{}),ZA=xe("RenderFunctionStringType",{}),im=xe("SpanFunctionStringType",{}),QA=xe("RowClassFunctionStringType",{}),eL=xe("RowHeightFunctionNumberType",{});xe("FunctionNumberType",{});const Mi=e=>xe("StringNumberType",{}).def(e);xe("IColumnPropType",{default:{label:void 0,minWidth:Qr},type:[Object]});var u4=(e=>(e.independent="independent",e.interdependent="interdependent",e))(u4||{});const tL={data:m.arrayOf(m.any).def([]),columns:m.arrayOf(vl).def([]),activeColumn:m.oneOfType([m.number.def(-1),m.arrayOf(m.number.def(-1))]),columnPick:xe("columnPick",{}).def("disabled"),height:Mi("auto"),stripe:m.bool.def(!1),minHeight:Mi(lr),maxHeight:Mi("auto"),rowHeight:eL,headHeight:m.number.def(lr),showHead:m.bool.def(!0),sortValFormat:m.arrayOf(m.any).def([""]),thead:xe("ITheadType",{}).def({color:gl.DEF1,height:lr,isShow:!0}),virtualEnabled:m.bool.def(!1),border:m.oneOfType([m.arrayOf(xe("boderType",{})),m.string]).def([a4.ROW]),pagination:m.oneOfType([m.bool.def(!1),m.object.def({})]).def(!1),paginationHeight:m.number.def(UA),remotePagination:m.bool.def(!1),acrossAll:m.bool.def(!1),emptyText:m.string,emptyCellText:m.oneOfType([m.string,m.func]).def(""),isEmptyCell:m.oneOfType([m.arrayOf(bt),m.arrayOf(null),m.arrayOf(void 0),m.func]).def(["",void 0,null]),settings:JA,rowClass:m.oneOfType([m.string,m.object,m.func]).def({}),rowStyle:m.oneOfType([m.string,m.object,m.func]).def({}),cellStyle:m.oneOfType([m.string,m.object,m.func]).def({}),cellClass:m.oneOfType([m.string,m.object,m.func]).def({}),scrollLoading:m.oneOfType([m.object,m.bool]).def(void 0),reserveExpand:m.bool.def(!1),selectionKey:m.string.def(""),checked:m.array.def([]),isSelectedFn:m.func.def(void 0),rowKey:m.oneOfType([m.string,m.func]).def(De.ROW_INDEX),showOverflowTooltip:Dh,asyncData:m.bool.def(!1),rowHover:m.oneOf(BA).def(s4.HIGHLIGHT),defaultSort:m.shape({}).def({}),isRowSelectEnable:m.oneOfType([m.func.def(()=>!0),m.bool.def(!0)]).def(!0),resizerWay:xe("ResizerWay",{default:"debounce"}),observerResize:m.bool.def(!0),intersectionObserver:m.bool.def(!1),align:Xf,headerAlign:Xf,prependStyle:m.style().def({}),colSortBehavior:xe("IColSortBehavior",{default:"independent"}),isFlex:m.bool.def(!0),rowDraggable:m.oneOfType([m.func,m.bool,m.object]).def(!1),shiftMultiChecked:m.bool.def(!1),scrollbar:m.bool.def(!0),fixedBottom:xe("FixedBottomOption",{default:{position:"relative",height:lr}}).def(null),appendLastRow:xe("AppendLastRowOption",{default:{type:"default",cellRender:void 0}})},nL={label:yf,field:yf,render:ZA,width:m.oneOfType([m.number,m.string]),minWidth:Mi(Qr),columnKey:m.string.def(""),showOverflowTooltip:Dh,type:GA,resizable:m.bool.def(!0),fixed:m.oneOfType([m.bool,KA]).def(!1),sort:YA,filter:XA,colspan:im.def(1),rowspan:im.def(1),align:Xf,className:QA,prop:yf,index:m.number.def(void 0)},rL=a.defineComponent({name:"TableColumn",props:nL,setup(e,{}){const t=a.inject(l4,()=>{}),n={},r=(s,i)=>{const o=a.toRaw(i);return Object.keys(o).every(c=>typeof o[c]=="function"?s[c]!==void 0:c==="children"?!0:ch(s[c],i[c]))};a.watch(()=>[e],()=>{r(n,e)||(t(),Object.assign(n,a.toRaw(e)))},{immediate:!0,deep:!0}),a.onUnmounted(()=>{t()})},render(){var e,t;try{const r=[(t=(e=this.$slots).default)==null?void 0:t.call(e,{row:{},column:{},$index:-1})];return a.h("div",r)}catch{return a.h("div",[])}}});var Xe=(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))(Xe||{});const aL=e=>!0,sL=e=>!0,iL=e=>!0,oL=e=>!0,Ci=(e,t,n,r,s)=>!0,lL=e=>!0,cL=e=>!0,uL=e=>!0,dL=e=>!0,om=e=>!0,fL=e=>!0,lm=e=>!0,hL=e=>!0,mL=e=>!0,pL={columnPick:aL,columnFilter:sL,columnSort:oL,colFilterSave:iL,rowClick:Ci,rowDblclick:Ci,rowExpand:lL,select:cL,selectAll:uL,selectionChange:dL,pageLimitChange:om,pageValueChange:om,settingChange:fL,scrollBottom:hL,cellClick:lm,cellDblclick:lm,rowMouseEnter:Ci,rowMouseLeave:Ci,dragend:mL},gL=(e,{afterResize:t})=>{const{getColumnAttribute:n,getColumnOrderWidth:r,setColumnAttribute:s,setNextColumnWidth:i,getPreColumn:o}=e,l=B=>n(B,be.LISTENERS),c="HeadColumnResize";let d=function(B){return B.MOUSE_DOWN="onMousedown",B.MOUSE_MOVE="onMousemove",B.MOUSE_OUT="onMouseout",B}({}),f=!1,u=!1,h=!1,p=0,g=null,v="right",b=null,y=null,N=0;const w=new WeakMap,C=a.ref(-1e3),S=[be.WIDTH],x=B=>{B.stopImmediatePropagation(),B.stopPropagation(),B.preventDefault()},E=B=>{x(B),u=!1,h=!1;const z=r(g,S)+N,D=r(g,[be.COL_MIN_WIDTH]),k=z>D?z:D;i(g,k),s(g,be.WIDTH,k),document.removeEventListener("mouseup",E),C.value=-1e3,N=0,_(b),t==null||t(),b=null;const G=B.target;M(G),g=null},T=Fr(B=>{C.value=C.value+B}),O=B=>{x(B),document.body.style.setProperty("user-select","none");const z=B.clientX-p;N=N+z,p=B.clientX;const D=r(g,S)+z;r(g,[be.COL_MIN_WIDTH])<D&&T(z)},V=gr(B=>{document.body.style.setProperty("user-select","none"),B==null||B.classList.add("col-resize-hover")}),_=B=>{V.cancel(),document.body.style.removeProperty("user-select"),B==null||B.classList.remove("col-resize-hover")},L=B=>{if(!f)return;I(B.target),p=B.clientX;const z=v==="left"?o(y):y;s(z,be.COL_IS_DRAG,!0),g=z,b=B.target.closest("table");const D=b.getBoundingClientRect();C.value=B.clientX-D.left,V(b),u=!0,document.addEventListener("mouseup",E)},I=B=>{var D,k;((k=(D=B==null?void 0:B.parentElement)==null?void 0:D.parentElement)==null?void 0:k.querySelectorAll(".col-pointer-hover")).forEach(G=>{G==null||G.classList.remove("col-pointer-hover"),G==null||G.classList.remove("poiner-left"),G==null||G.classList.remove("poiner-right")})},R=(B,z)=>{const D=B.parentElement;D==null||D.classList.add("col-pointer-hover"),D==null||D.classList.add(`poiner-${z}`);const k=z==="right"?D.nextElementSibling:D.previousElementSibling,G=z==="right"?"left":"right";k==null||k.classList.add("col-pointer-hover"),k==null||k.classList.add(`poiner-${G}`)},M=B=>{h||(C.value=-1e3,B.classList.remove("cell-resize"),I(B),w.set(B,!1),document.removeEventListener("mousedown",L))},j={[d.MOUSE_MOVE]:(B,z,D)=>{if(x(B),u){h=!0,O(B);return}const k=B.target;if(!h){if(!k)return;const{offsetWidth:G}=k,U=B.offsetX;G>12&&(G-U<8||U<8&&D>0)?(f=!0,v=U<8?"left":"right",w.get(k)||(w.set(k,!0),k.classList.add("cell-resize"),R(k,v),y=z,document.addEventListener("mousedown",L))):(f=!1,M(k))}},[d.MOUSE_OUT]:(B,z,D)=>{const k=B.target;M(k)}},H=B=>`${c}_${B}`,A=()=>{e.tableColumnList.forEach(B=>{if(e.getColumnAttribute(B,be.COL_RESIZEABLE)){const z=l(B);Object.keys(j).forEach(D=>{const k=H(D);z!=null&&z.has(k)||z.set(k,[]),z.get(k).push(j[D])})}})},P=()=>{e.tableColumnList.forEach(B=>{const z=l(B);Object.keys(j).forEach(D=>{const k=H(D);if(z!=null&&z.has(k)){const G=z.get(k);G.length=0}})})};return a.watch(()=>[e.tableColumnList],()=>{P(),A()},{immediate:!0,deep:!0}),{dragOffsetX:C}},vL=()=>{const e=[];let t=0;const n=new WeakMap,r=d=>a.isRef(d)?a.unref(d):a.toRaw(d),s=d=>Object.keys(d??{}).reduce((f,u)=>{const h=u.replace(/-(\w)/g,(p,g)=>g.toUpperCase());return Object.assign(f,{[h]:r(d[u])})},{}),i=d=>(n.has(d)||n.set(d,rn()),n.get(d)),o=(d,f,u)=>{var h,p;if((h=d==null?void 0:d.component)!=null&&h.subTree){l((p=d==null?void 0:d.component)==null?void 0:p.subTree,f);return}if(typeof d=="function")return d();if(Array.isArray(d)){d.forEach(g=>l(g,f));return}if(Array.isArray(d==null?void 0:d.children)){d.children.forEach(g=>l(g,f));return}if(!u&&a.isVNode(d)&&(d!=null&&d.children)&&typeof(d==null?void 0:d.children)=="object"){Object.keys(d.children).forEach(g=>l(d.children[g],f));return}},l=(d,f)=>{var h,p,g;let u=f;if(!(!d||((h=d.type)==null?void 0:h.name)==="Table")){if(((p=d.type)==null?void 0:p.name)==="TableColumn"){const v=Object.assign({index:t},s(d.props),{field:d.props.prop||d.props.field,render:d.props.render??((g=d.children)==null?void 0:g.default),uniqueId:i(d),children:[]}),b=(f==null?void 0:f.children)??e;b.some(y=>y.uniqueId===v.uniqueId)||(b.push(v),t=t+1,d.children&&o(d,v,!0));return}o(d,u)}};return{resolveColumns:d=>{var u,h,p,g;e.length=0,t=0;const f=d==null?void 0:d.find(v=>{var b;return((b=v.type)==null?void 0:b.name)==="GhostBody"});return f&&((u=f.component)!=null&&u.subTree?l((h=f.component)==null?void 0:h.subTree):(((g=(p=f.children)==null?void 0:p.default)==null?void 0:g.call(p))??[]).forEach(v=>l(v))),e.sort((v,b)=>v.index-b.index),e}}};var d4=function(){if(typeof Map<"u")return Map;function e(t,n){var r=-1;return t.some(function(s,i){return s[0]===n?(r=i,!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,i=this.__entries__;s<i.length;s++){var o=i[s];n.call(r,o[1],o[0])}},t}()}(),Jf=typeof window<"u"&&typeof document<"u"&&window.document===document,so=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")()}(),yL=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(so):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),bL=2;function wL(e,t){var n=!1,r=!1,s=0;function i(){n&&(n=!1,e()),r&&l()}function o(){yL(i)}function l(){var c=Date.now();if(n){if(c-s<bL)return;r=!0}else n=!0,r=!1,setTimeout(o,t);s=c}return l}var CL=20,NL=["top","right","bottom","left","width","height","size","weight"],xL=typeof MutationObserver<"u",SL=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=wL(this.refresh.bind(this),CL)}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(){!Jf||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),xL?(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(){!Jf||!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=NL.some(function(i){return!!~r.indexOf(i)});s&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),f4=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},Na=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||so},h4=yl(0,0,0,0);function io(e){return parseFloat(e)||0}function cm(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(r,s){var i=e["border-"+s+"-width"];return r+io(i)},0)}function TL(e){for(var t=["top","right","bottom","left"],n={},r=0,s=t;r<s.length;r++){var i=s[r],o=e["padding-"+i];n[i]=io(o)}return n}function _L(e){var t=e.getBBox();return yl(0,0,t.width,t.height)}function EL(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return h4;var r=Na(e).getComputedStyle(e),s=TL(r),i=s.left+s.right,o=s.top+s.bottom,l=io(r.width),c=io(r.height);if(r.boxSizing==="border-box"&&(Math.round(l+i)!==t&&(l-=cm(r,"left","right")+i),Math.round(c+o)!==n&&(c-=cm(r,"top","bottom")+o)),!AL(e)){var d=Math.round(l+i)-t,f=Math.round(c+o)-n;Math.abs(d)!==1&&(l-=d),Math.abs(f)!==1&&(c-=f)}return yl(s.left,s.top,l,c)}var OL=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof Na(e).SVGGraphicsElement}:function(e){return e instanceof Na(e).SVGElement&&typeof e.getBBox=="function"}}();function AL(e){return e===Na(e).document.documentElement}function LL(e){return Jf?OL(e)?_L(e):EL(e):h4}function VL(e){var t=e.x,n=e.y,r=e.width,s=e.height,i=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,o=Object.create(i.prototype);return f4(o,{x:t,y:n,width:r,height:s,top:n,right:t+r,bottom:s+n,left:t}),o}function yl(e,t,n,r){return{x:e,y:t,width:n,height:r}}var DL=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=yl(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=LL(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}(),kL=function(){function e(t,n){var r=VL(n);f4(this,{target:t,contentRect:r})}return e}(),RL=function(){function e(t,n,r){if(this.activeObservations_=[],this.observations_=new d4,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 Na(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new DL(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 Na(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 kL(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}(),m4=typeof WeakMap<"u"?new WeakMap:new d4,p4=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=SL.getInstance(),r=new RL(t,n,this);m4.set(this,r)}return e}();["observe","unobserve","disconnect"].forEach(function(e){p4.prototype[e]=function(){var t;return(t=m4.get(this))[e].apply(t,arguments)}});var IL=function(){return typeof so.ResizeObserver<"u"?so.ResizeObserver:p4}();const ot=(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=>ot(e,r,n)).filter(r=>r!==void 0).at(0)}},PL=e=>kr(e,"auto"),kr=(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},ML=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>zA.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},g4=(e,t,n=60,r=!1,s="throttle")=>{const i=()=>{typeof t=="function"&&t()},o=s==="debounce"?gr(i,n):ep(i),l=()=>Reflect.apply(o,void 0,[]),c=new IL(()=>{l()});return r&&typeof t=="function"&&t(),{start:()=>{c.observe(e)},disconnect:()=>{c.unobserve(e),c.disconnect()}}},kh=e=>{const{showHead:t,headHeight:n,thead:r={}}=e;return Object.assign({},{isShow:t,height:n},r)},$L=(e,t="ig")=>new RegExp(`${e}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),t),oo=(e,t,n)=>{let r;return(typeof e=="string"||typeof e=="number"||typeof e=="boolean")&&(r=e),typeof e=="object"&&(r=pl(e,t)),n!=null&&n.length&&(n.forEach(s=>{if(typeof s=="function")r=s(r,e,t);else if(typeof r=="string"){const i=r.match(typeof s=="string"?$L(s):s);r=(i==null?void 0:i[1])??r}}),/^-?\d+.?\d*$/.test(r)&&(r=Number(r))),r},FL=(e,t)=>pl(e,t),Yr=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Yr(Reflect.apply(e,void 0,t),t):[],HL=(e,t,n)=>{const r=BL(e,t,n);return r!==null?r:rn()},BL=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===De.ROW_INDEX?`__ROW_INDEX_${n}`:t.rowKey:typeof t.rowKey=="function"?Reflect.apply(t.rowKey,void 0,[e]):null,um=(e,t,n)=>{const r=i=>i.field??i.id;return(i=>e.some(o=>r(o)===ot(i,["field","type"],[i])))(t)&&n.length&&!n.includes(ot(t,["field","type"],[t]))},lo=(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,zL=(e,t,n,r)=>{const s=lo(e,t,n,r,"colspan"),i=lo(e,t,n,r,"rowspan");return{colspan:s,rowspan:i}},v4=(e,t,n=[])=>{var d,f;const r=e.field,s=u=>oo(u,r,n),i=e.type==="index",o=(u,h,p,g)=>{const v=i?p:s(u)??"",b=i?g:s(h)??"";return typeof v=="number"&&typeof b=="number"?v-b:String.prototype.localeCompare.call(v,b)},l=typeof((d=e.sort)==null?void 0:d.sortFn)=="function"?(f=e.sort)==null?void 0:f.sortFn:o,c=(u,h,p,g)=>l(u,h,p,g)*(t===ct.DESC?-1:1);return t===ct.NULL?(u,h)=>!0:c},jL=e=>{const t={[ct.NULL]:3,[ct.ASC]:1,[ct.DESC]:2};return t[e]===void 0?ct.ASC:Object.keys(t)[(t[e]+1)%3]},UL=(e,t,n=[])=>typeof e=="string"?{value:e}:typeof e=="boolean"&&e?{value:ct.NULL}:typeof e=="object"&&e!==null?typeof e.sortFn=="function"?{value:"custom",...e}:Object.assign({},{sortFn:v4(t,e.value??ct.NULL,n)},e):null,co=(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,WL=(e,t,n)=>{const r=HL(e,n,t);return r!==void 0&&e[r]!==void 0?pl(e,r):t},qL=(e,t)=>{const{value:n,sortFn:r,sortScope:s}=UL(e.sort??t.defaultSort,e)??{};return{type:n,fn:r,scope:s,active:!!e.sort,enabled:!!e.sort}},GL=e=>typeof e.filter=="object"?{...e.filter,enabled:!0}:{enabled:!!e.filter,checked:[]},Ni=e=>a.isProxy(e)?a.toRaw(e):e,KL=e=>{const t=Be("table"),n=a.reactive(new WeakMap),r=a.reactive([]),s=rn(),i=a.reactive([]),o=a.reactive([]),l=a.reactive([]),c=new WeakMap,d=(F,K={})=>{i.forEach(q=>q.active=!1);const W=i.find(q=>q.col===F);if(W){Object.assign(W,K,{active:!0});return}i.push({col:F,...K,active:!0})},f=(F,K,W)=>{let q=0;return/^\d+\.?\d*(px)?$/.test(`${F[K]}`)&&(q=Number(`${F[K]}`.replace(/px/,"")),$(F,be.WIDTH,q),M(F,{width:q,left:null,right:null})),/^\d+\.?\d*%$/.test(`${F[K]}`)&&(q=Number(`${F[K]}`.replace(/%/,""))/100*W,$(F,be.WIDTH,q),M(F,{width:q,left:null,right:null})),q},u=F=>{let K=F,W=Qr;const q=(ee,de="width")=>{const ue=[];return ee.forEach(ge=>{const Se=f(ge,de,F);K=K-Se,[void 0,null,"auto","undefined","null",""].includes(ge[de])&&ue.push(ge)}),K>0&&ue.length&&(W=K/ue.length),ue},se=q(p);q(se,"minWidth").forEach(ee=>{const de=W>Qr?W:Qr;$(ee,be.WIDTH,de),M(ee,{width:de,left:null,right:null})})},h=(F,K={})=>{const W=o.find(q=>q.col===F);if(W){Object.assign(W,K);return}o.push({col:F,...K})},p=a.reactive([]),g=()=>{p.length=0,p.push(...r.filter(F=>!k(F)))},v=()=>{var F,K;return e.rowDraggable?{minWidth:50,width:((F=e.rowDraggable)==null?void 0:F.width)??60,label:((K=e.rowDraggable)==null?void 0:K.label)??t.value.sort,type:"drag"}:null},b=(F=["rowspan","colspan"])=>r.some(K=>F.some(W=>typeof K[W]=="function"||/^\d$/.test(`${K[W]}`))),y=a.computed(()=>b(["colspan"])),N=a.computed(()=>b(["rowspan"])),w=(F,K,W)=>{let q=W;const se=lo(F,K,null,null,"colspan"),fe={skipCol:!1,skipColLen:0};return q>0&&(fe.skipColLen=q,fe.skipCol=!0,q=q-1),se>1&&(fe.skipColLen=se,q=se-1),{...fe,skipColumnNum:q}},C=F=>{if(/^\d+/.test(`${F.minWidth}`))return F.minWidth;let K=Qr;return F.sort&&(K=K+18),F.filter&&(K=K+28),K},S=(F,K)=>{const W=ne(F,be.LISTENERS);return W?Array.from(W==null?void 0:W.keys()).reduce((q,se)=>{const fe=se.split("_").slice(-1)[0];return Object.assign(q,{[fe]:ee=>{W.get(se).forEach(de=>Reflect.apply(de,void 0,[ee,F,K]))}})},{}):{}},x=F=>{if(!F.filter)return null;const K=(se,fe="ig")=>new RegExp(`${se}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),fe),W=(se,fe)=>{const{match:ee}=F.filter,de=oo(fe,ot(F,"field",[F,fe]));return ee!=="fuzzy"?se.includes(de):se.some(ue=>K(ue,"img").test(de))};return typeof F.filter.filterFn=="function"?(se,fe,ee,de)=>F.filter.filterFn(se,fe,F,ee,de):(se,fe)=>se.length?W(se,fe):!0},E=F=>{l.length=0;let K=0;const W=[],q=v();q&&F.unshift(q);const se=(ue,ge=1)=>{ue.length&&K<ge&&(K=ge),ue.forEach(Se=>se(Se.children??[],ge+1))};se(F);const fe=(ue,ge)=>{if(ue){const Se=c.get(ue);Se.thColspan=Se.thColspan+ge,Se.offsetLeft=Se.offsetLeft+ge,fe(Se.parent,ge)}},ee=(ue,ge,Se,Le)=>{var Fe,Xn,dn,Ur,yr;const Ve=a.toRaw(ue);let ke=Le;l[ge]===void 0&&(l[ge]=[]);const Me=!!(((Fe=Ve.children)==null?void 0:Fe.length)??!1);(((Xn=Ve.children)==null?void 0:Xn.length)??!1)||W.push(Ve),c.has(Ve)||c.set(Ve,{thColspan:1,thRowspan:1,isGroup:Me,offsetLeft:Le});const at=c.get(Ve),Ue=((dn=Ve.children)==null?void 0:dn.length)??0,ft=((Ur=Ve.children)==null?void 0:Ur.length)??1,We=Ue>0?1:K-ge,Pe=ke+(Ue>0?Ue-1:0);return Object.assign(at,{thColspan:ft>0?ft:1,parent:Se,thRowspan:We,offsetLeft:Pe}),l[ge].push(Ve),ft>1&&fe(Se,ft-1),(yr=Ve.children)==null||yr.forEach((Je,fn)=>{ke=ke+ee(Je,ge+1,Ve,ke+fn)}),Ue>0?Ue-1:0};let de=0;return F.forEach((ue,ge)=>{de=de+ee(ue,0,null,de+ge)}),W},T=F=>c.get(F),O=()=>{i.length=0;let F=0;(r||[]).forEach((K,W)=>{const{skipCol:q,skipColumnNum:se,skipColLen:fe}=y.value?w(K,W,F):{skipCol:!1,skipColumnNum:0,skipColLen:0};if(F=se,!n.has(K)){const{type:ee,fn:de,scope:ue,active:ge,enabled:Se}=qL(K,e),Le=x(K),Ve=e.settings??{},ke=GL(K);ke.enabled&&h(K,{[be.COL_FILTER_FN]:Le,[be.COL_FILTER_VALUES]:ke.checked??[]}),Se&&d(K,{[be.COL_SORT_TYPE]:ee,[be.COL_SORT_FN]:de,[be.COL_SORT_SCOPE]:ue}),n.set(K,{[be.CALC_WIDTH]:void 0,[be.RESIZE_WIDTH]:void 0,[be.COL_RECT]:a.reactive({width:null,left:null,right:null,height:null}),[be.COL_MIN_WIDTH]:C(K),[be.LISTENERS]:new Map,[be.WIDTH]:K.width,[be.IS_HIDDEN]:um(Ve.fields??[],K,Ve.checked??[]),[be.COL_SORT_TYPE]:a.ref(ee),[be.COL_SORT_FN]:de,[be.COL_FILTER_OBJ]:ke,[be.COL_FILTER_FN]:Le,[be.COL_FILTER_SCOPE]:void 0,[be.COL_SORT_SCOPE]:ue,[be.COL_SORT_ACTIVE]:a.ref(ge),[be.COL_IS_DRAG]:!1,[be.COL_SPAN]:{skipCol:q,skipColumnNum:se,skipColLen:fe},[be.COL_UID]:rn(),[be.SELECTION_DISABLED]:!1,[be.SELECTION_INDETERMINATE]:!1,[be.SELECTION_VAL]:!1,[be.COL_RESIZEABLE]:K.resizable!==!1,[be.COL_FIXED_STYLE]:a.reactive({})})}Object.assign(n.get(K),{[be.COL_SPAN]:{skipCol:q,skipColumnNum:se,skipColLen:fe},[be.COL_MIN_WIDTH]:C(K)})})},V=(F,K)=>{$(F,be.COL_FIXED_STYLE,K)},_=F=>ne(F,be.COL_FIXED_STYLE)??{},L=F=>ne(F,be.COL_RECT),I=F=>ne(F,be.CALC_WIDTH),R=F=>ne(F,be.WIDTH),M=(F,{left:K,right:W,width:q,height:se})=>{const fe=L(F),ee={left:K??fe.left,right:W??fe.right,width:q??fe.width,height:se??fe.height};$(F,be.COL_RECT,ee)},j=gr((F,K)=>{r.length=0,r.push(...E(F)),O(),g(),K==null||K()}),H=(F,K=!1)=>{$(F,be.IS_HIDDEN,K)},A=(F,K)=>{$(F,be.RESIZE_WIDTH,K)},P=(F,K)=>{const{type:W,fn:q,scope:se,active:fe}=K,ee={[be.COL_SORT_TYPE]:W,[be.COL_SORT_FN]:q,[be.COL_SORT_ACTIVE]:fe,[be.COL_SORT_SCOPE]:se};[be.COL_SORT_TYPE,be.COL_SORT_FN,be.COL_SORT_ACTIVE,be.COL_SORT_SCOPE].forEach(de=>{ee[de]!==void 0&&$(F,de,ee[de])})},B=(F,K)=>{n.has(F)&&Object.assign(n.get(F)[be.COL_FILTER_OBJ],K)},z=[be.WIDTH],D=(F,K=z)=>ne(F,K[0])??ne(F,K[1])??ne(F,K[2]),k=F=>ne(F,be.IS_HIDDEN)??!1,G=F=>ne(F,be.COL_UID),U=(F,K,W)=>{[be.COL_SORT_FN,be.COL_SORT_SCOPE,be.COL_SORT_TYPE].includes(K)&&d(F,{[K]:W}),[be.COL_FILTER_FN,be.COL_FILTER_VALUES].includes(K)&&h(F,{[K]:W})},te=(F,K)=>{const W=p.findIndex(fe=>fe===F),q=D(F)-K,se=p[W+1];se&&$(se,be.WIDTH,D(se)+q)},$=(F,K,W)=>{U(F,K,W);const q=n.get(F);if(q&&Object.prototype.hasOwnProperty.call(q,K)){if(a.isRef(q[K])){q[K].value=W;return}q[K]=W}},Q=(F,K)=>{const W=K||F.checked||[],q=F.fields||[];r.forEach(se=>{$(se,be.IS_HIDDEN,um(q,se,W))})},ne=(F,K)=>{var q;const W=(q=n.get(F))==null?void 0:q[K];return a.isRef(W)?W.value:W},le=(F,K)=>{var W;return(W=n.get(F))==null?void 0:W[K]},ae=(F,K)=>({[`${s}-column-${K}`]:!1,column_fixed:!!F.fixed,column_fixed_left:!!F.fixed,column_fixed_right:F.fixed==="right"});return{needColSpan:y,needRowSpan:N,tableColumnSchema:n,tableColumnList:r,visibleColumns:p,debounceUpdateColumns:j,sortColumns:i,filterColumns:o,columnGroup:l,columnGroupMap:c,clearColumnSort:()=>{r.forEach(F=>{$(F,be.COL_SORT_ACTIVE,!1),$(F,be.COL_FILTER_FN,void 0)})},clearSelectionAll:()=>{const F=p.find(K=>K.type==="selection");F&&($(F,be.SELECTION_VAL,!1),$(F,be.SELECTION_INDETERMINATE,!1))},formatColumns:O,flatColumnTemplate:E,isHiddenColumn:k,getColumnId:G,getColumnOrderWidth:D,getColumnAttribute:ne,getHeadColumnClass:(F,K)=>({...ae(F,K)}),getColumnClass:ae,getFixedStlye:_,getColumnRect:L,getColumnCustomClass:(F,K)=>{const W=F.className;if(W){if(typeof W=="function")return W(K);if(typeof W=="string")return W}return""},getColumnRefAttribute:le,getColumnCalcWidth:I,getColumnWidth:R,getLeftColumnsWidth:(F,K=!1)=>{let W=!0,q=0,se=0;for(;W&&se<p.length;){if(F===p[se]){K&&(q=q+R(p[se])),W=!1;break}q=q+R(p[se]),se=se+1}return q},getGroupAttribute:T,getPreColumn:F=>{const W=p.findIndex(q=>q===F)-1;return p[W]},getColumnIndex:F=>p.findIndex(K=>K===F),resolveEventListener:S,setColumnIsHidden:H,setColumnResizeWidth:A,setColumnSortOption:P,setColumnFilterOption:B,setColumnAttributeBySettings:Q,setColumnAttribute:$,setColumnSortActive:(F,K)=>{e.colSortBehavior===u4.independent&&r.forEach(W=>{$(W,be.COL_SORT_ACTIVE,!1)}),$(F,be.COL_SORT_ACTIVE,K)},setFixedStyle:V,setColumnRect:M,setVisibleColumns:g,setNextColumnWidth:te,resolveColsCalcWidth:u}},YL=(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(b=>{r.addEventListener(b,y=>{y.preventDefault(),y.stopPropagation(),y.dataTransfer.dropEffect="move"})});let s=null,i="";const o=(b,y)=>{if(y==="--top"){b.parentNode.insertBefore(r,b);return}if(b.nextElementSibling===null){b.parentNode.append(r);return}b.parentNode.insertBefore(r,b.nextElementSibling)},l=b=>{e.rowDraggable&&(b==null||b())},c=b=>b.target.closest("tr"),d=(b,y)=>{const{y:N}=y,{top:w,bottom:C}=b.getBoundingClientRect(),S=N-w>C-N?"--bottom":"--top";f(b),b.classList.add(S),o(b,S)},f=(b,y=["--bottom","--top"])=>{y.forEach(N=>b.classList.remove(N))};return{onDragenter:b=>{const y=c(b);b.preventDefault(),b.stopPropagation(),l(()=>{b.dataTransfer.dropEffect="move",y.classList.add("--drag-enter"),d(y,b),s=y})},onDragleave:b=>{l(()=>{const y=c(b);i=y.classList.contains("--bottom")?"--bottom":"--top",f(y,["--drag-enter","--bottom","--top"])})},onDragstart:b=>{l(()=>{const y=c(b);r.style.setProperty("height",`${y.offsetHeight}px`),r.style.setProperty("width",`${y.offsetWidth}px`),y.classList.add("--drag-start"),b.dataTransfer.setDragImage(y,0,0),b.dataTransfer.setData("text/plain",null),b.dataTransfer.dropEffect="move";const{rowIndex:N}=b.target.dataset;b.dataTransfer.setData("data-row-index",N)})},onDragover:b=>{b.preventDefault(),b.stopPropagation(),b.dataTransfer.dropEffect="move";const y=c(b);d(y,b)},onDragend:b=>{var S;if(b.preventDefault(),b.stopPropagation(),r.remove(),!s)return;const y=s,{rowIndex:N}=y.dataset;let w=Number(N);const C=(S=b.target.dataset)==null?void 0:S.rowIndex;i==="--bottom"&&(w=w+1),t.changePageRowIndex(Number(C),w),s=null,i="",n.emit(Xe.DRAG_END,{sourceEvent:b,data:t.pageRowList})}}},XL=(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"}),i=a.reactive({right:0,width:"0"}),o=()=>{let f=0;const{length:u}=r.value;for(let p=u-1;p>=0;p--){const g=r.value[p],v=t.getColumnWidth(g);t.setColumnRect(g,{right:f,width:v}),t.setFixedStyle(g,{right:`${f}px`}),f=f+v}let h=0;n.value.forEach(p=>{const g=t.getColumnWidth(p);t.setColumnRect(p,{left:h,width:g}),t.setFixedStyle(p,{left:`${h}px`}),h=h+g}),s.width=`${h}px`,i.width=`${f}px`},l=()=>n.value.length>0?a.createVNode("div",{style:s,class:"column_fixed column_fixed_left"},null):null,c=()=>{if(r.value.length>0)return a.createVNode("div",{style:i,class:"column_fixed column_fixed_right"},null)};return{renderFixedRows:()=>[l(),c()],resolveFixedColumnStyle:o}},JL=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)])}}}),ZL=(e,t)=>{const n=a.toRef(e,"scrollLoading"),r=()=>{var o;return typeof n.value=="boolean"?{loading:!!n.value||(((o=e.fixedBottom)==null?void 0:o.loading)??!1),inline:!0,title:"",size:Dr.Normal,mode:Z0.Default,indicator:null}:n.value},s=a.computed(()=>{var o;return n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object")||(((o=e.fixedBottom)==null?void 0:o.loading)??!1)});return{renderScrollLoading:()=>{var o,l,c,d;if(s.value){const{loading:f,size:u,mode:h,title:p,inline:g,indicator:v}=r();return((l=(o=t.slots).fixedBottom)==null?void 0:l.call(o))??a.createVNode(ur,{loading:f,size:u,mode:h,title:p,inline:g,indicator:v},null)}return((d=(c=t.slots).fixedBottom)==null?void 0:d.call(c))??null}}},QL=(e,t)=>{const n=a.ref(null),r=a.ref(null),s=a.ref(null),i=a.ref(null),o=a.ref(0),l=a.ref(0),c=a.ref(0),d=a.ref(-1e4),f=a.ref(0),u=a.reactive({}),h=a.reactive([]),p=a.ref(lr),g=a.ref(1),v=a.computed(()=>{var q,se,fe;return(q=t.slots)!=null&&q.fixedBottom&&((se=e.fixedBottom)==null?void 0:se.position)==="relative"?((fe=e.fixedBottom)==null?void 0:fe.height)??lr:0}),{resolveClassName:b}=he(),{renderScrollLoading:y}=ZL(e,t),N=a.computed(()=>Ae({[b("table")]:!0},ML(e.border))),w=a.computed(()=>({height:kr(e.height),maxHeight:kr(e.maxHeight),minHeight:kr(e.minHeight)})),C=a.computed(()=>Ae({[b("table-head")]:!0,"has-settings":!!e.settings,"has-group":g.value>1})),S=()=>{var fe,ee,de,ue;const q=f.value>0?"0 0 10px rgb(0 0 0 / 12%)":null,se=o.value>0?"0 0 10px rgb(0 0 0 / 12%)":null;(ee=(fe=n.value)==null?void 0:fe.style)==null||ee.setProperty("--shadow-right",q),(ue=(de=n.value)==null?void 0:de.style)==null||ue.setProperty("--shadow-left",se)},x=ep(()=>{var q,se,fe,ee,de,ue,ge,Se,Le,Ve;(se=(q=n.value)==null?void 0:q.style)==null||se.setProperty("--drag-offset-x",`${d.value+o.value}px`),(ee=(fe=n.value)==null?void 0:fe.style)==null||ee.setProperty("--drag-offset-h-x",`${d.value-2}px`),(ue=(de=n.value)==null?void 0:de.style)==null||ue.setProperty("--translate-y",`${l.value}px`),(Se=(ge=n.value)==null?void 0:ge.style)==null||Se.setProperty("--translate-x",`${o.value}px`),(Ve=(Le=n.value)==null?void 0:Le.style)==null||Ve.setProperty("--translate-x-1",`-${o.value}px`),S()}),E=q=>{o.value=q,x()},T=q=>{g.value=q},O=q=>{l.value=q,x()},V=()=>{var q,se,fe,ee,de,ue,ge,Se,Le,Ve;(se=(q=n.value)==null?void 0:q.style)==null||se.setProperty("--drag-offset-x","-1000px"),(ee=(fe=n.value)==null?void 0:fe.style)==null||ee.setProperty("--drag-offset-h-x","-1000px"),(ue=(de=n.value)==null?void 0:de.style)==null||ue.setProperty("--translate-y","0px"),(Se=(ge=n.value)==null?void 0:ge.style)==null||Se.setProperty("--translate-x","0px"),(Ve=(Le=n.value)==null?void 0:Le.style)==null||Ve.setProperty("--translate-x-1","0px")},_=q=>{d.value=q,x()},L=kh(e),I=a.computed(()=>ot(L,"height",["thead"])*g.value),R=a.computed(()=>{var q;return{"--row-height":`${I.value}px`,"--background-color":o4[((q=e.thead)==null?void 0:q.color)??gl.DEF1],paddingRight:e.scrollbar?null:`${i4}px`}}),M={[b("table-body")]:!0,"is-bk-scrollbar":e.scrollbar},j=a.computed(()=>Ae({[b("table-footer")]:!0,"is-hidden":te.value===0})),H=q=>a.createVNode("div",{ref:n,style:w.value,class:N.value},[q,a.createVNode(JL,null,{default:()=>{var se,fe;return[(fe=(se=t.slots).default)==null?void 0:fe.call(se)]}})]),A=(q,se,fe)=>a.createVNode("div",{ref:r,style:R.value,class:C.value},[q==null?void 0:q(),a.createVNode("div",{class:"col-resize-drag"},null),a.createVNode("div",{class:oe},[fe==null?void 0:fe()]),se==null?void 0:se()]),P=a.computed(()=>({position:"sticky",top:0,zIndex:2,...e.prependStyle||{}})),B=()=>t.slots.prepend?a.createVNode("div",{style:P.value,class:"prepend-row"},[t.slots.prepend()]):null,z=a.ref("auto"),D=a.computed(()=>{if(/^\d+\.?\d*(px|%)$/.test(`${w.value.maxHeight}`)){const q=e.showHead?I.value:0,se=te.value+q+v.value;return`calc(${w.value.maxHeight} - ${se}px)`}return null}),k=q=>q-I.value-v.value-te.value,G=(q,se=!0)=>{if(se){z.value=k(q);return}z.value=q},U=q=>{z.value=q},te=a.ref(0),$=a.computed(()=>({"--footer-height":`${te.value}px`})),Q=q=>{te.value=q},ne=gr((...q)=>{t.emit(Xe.SCROLL_BOTTOM,{...q})}),le=()=>{var fe,ee,de,ue;const q=((ee=(fe=s.value)==null?void 0:fe.refRoot)==null?void 0:ee.scrollWidth)??0,se=((ue=(de=s.value)==null?void 0:de.refRoot)==null?void 0:ue.offsetWidth)??0;f.value=q-se-(o==null?void 0:o.value)},ae=q=>{p.value=q},X=q=>{c.value=u.bottom??0;const se=q[1],{translateX:fe,translateY:ee,pos:de={}}=se;E(fe),O(ee),le(),Object.assign(u,de||{});const{bottom:ue}=de;ue<=2&&c.value>ue&&ne({...de,translateX:fe,translateY:ee})},J={column_drag_line:!0,"offset-x":!0,"resize-column":!0},Y=a.computed(()=>({[b("table-body-content")]:!0,[b("stripe")]:e.stripe})),oe=a.computed(()=>({[b("table-fixed")]:!0,"has-virtual-scroll":e.virtualEnabled})),pe=b("table-fixed-bottom"),Z=a.computed(()=>{var q,se,fe;return{minHeight:`${((q=e.fixedBottom)==null?void 0:q.minHeight)??lr}px`,position:((se=e.fixedBottom)==null?void 0:se.position)??"absolute",height:((fe=e.fixedBottom)==null?void 0:fe.height)??null}});a.onMounted(()=>{le(),V()});const ce=()=>{const q=y==null?void 0:y();return q?a.createVNode("div",{style:Z.value,class:pe},[q]):null};return{renderContainer:H,renderHeader:A,renderBody:(q,se,fe)=>a.createVNode(Ws,{ref:s,height:z.value,class:M,contentClassName:Y.value,enabled:e.virtualEnabled,lineHeight:p.value,list:q,maxHeight:D.value,rowKey:e.rowKey,scrollEvent:!0,scrollbar:{enabled:e.scrollbar},throttleDelay:120,onContentScroll:X},{beforeContent:()=>B(),default:ee=>se==null?void 0:se((ee==null?void 0:ee.data)??[]),afterSection:()=>[a.createVNode("div",{class:J},null),a.createVNode("div",{class:oe.value},[fe==null?void 0:fe()])]}),renderFooter:q=>a.createVNode("div",{ref:i,style:$.value,class:j.value},[q]),renderFixedBottom:()=>ce(),getBodyHeight:k,setBodyHeight:G,setVirtualBodyHeight:U,setFootHeight:Q,setTranslateX:E,setDragOffsetX:_,setFixedColumns:q=>{h.length=0,h.push(...q)},setOffsetRight:le,setLineHeight:ae,setHeaderRowCount:T,initRootStyleVars:V,refRoot:n,refHead:r,refBody:s,refFooter:i}},eV=(e,t,n=[],r=!0)=>{let s=null;const i=()=>{s&&(s.disconnect(),s=null)};return a.watch(e,()=>{Lr(e.value)&&(i(),s=g4(e.value,()=>{t==null||t.apply(...n)},60,!0,"debounce"),r&&s.start())},{flush:"post",immediate:!0}),{instance:s}},tV=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=l=>{Object.assign(t,{enabled:!!e.pagination},l),t.current>r.value&&(t.current=1)},i=(l=!0)=>{n.value=!l};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 o=a.computed(()=>t.enabled&&t.count>0);return{options:t,isShowPagination:o,setPagination:s,disabledPagination:i}},nV=a.defineComponent({name:"BodyEmpty",props:{list:m.array.def([]),filterList:m.array.def([]),emptyText:m.string},emits:["change"],setup(e){const t=Be("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(ml,{description:n.value,scene:"part",type:r.value},null)}}),Zf=a.defineComponent({name:"TableCell",props:{column:vl,row:m.any.def({}),parentSetting:Dh,title:m.string.def(void 0),observerResize:m.bool.def(!0),intersectionObserver:m.bool.def(!1),isHead:m.bool.def(!1),isExpandChild:m.bool.def(!1),headExplain:m.string,resizerWay:xe("ResizerWay",{default:c4.DEBOUNCE})},setup(e,{slots:t}){const n=a.ref(),r=a.ref(!1),s=a.ref(!e.intersectionObserver),i=a.computed(()=>({textAlign:e.column.textAlign,minWidth:kr(e.column.minWidth,null)})),o=()=>{if(/boolean|object/.test(typeof e.column.showOverflowTooltip)&&e.column.showOverflowTooltip!==null){const{content:y="",mode:N=void 0,popoverOption:w={}}=e.column.showOverflowTooltip,C={showOverflowTooltip:{content:y,disabled:!e.column.showOverflowTooltip,mode:N,resizerWay:void 0,watchCellResize:void 0,popoverOption:w,allowHtml:!1}};return e.parentSetting!==null&&typeof e.parentSetting=="object"&&(Object.assign(C.showOverflowTooltip,e.parentSetting,{disabled:!e.column.showOverflowTooltip}),typeof e.column.showOverflowTooltip=="object"&&Object.assign(C.showOverflowTooltip,e.column.showOverflowTooltip)),C}return{showOverflowTooltip:e.parentSetting}};let l=null;const c=(y=!1)=>{var w;const N=f();return y?((w=N==null?void 0:N.cloneNode)==null?void 0:w.call(N,!0))??"":(N==null?void 0:N.innerText)??""},d=()=>{var O,V;const{showOverflowTooltip:y=!1}=o();let N=!0,{resizerWay:w}=e;const C=c(y.allowHtml);let S=()=>C,x={},E="auto",T=!0;if(typeof y=="boolean"&&(N=!y),typeof y=="object"&&(N=y.disabled,x=y.popoverOption,w=y.resizerWay||"debounce",S=()=>y.content||C,typeof y.content=="function"&&(S=()=>y.content(e.column,e.row)),T=y.watchCellResize,E=y.mode||"auto"),typeof N=="function"&&(N=Reflect.apply(N,this,[e.column,e.row])),e.column.explain){let _=!0;typeof y=="boolean"&&(_=!y),typeof y=="object"&&(_=y.disabled),N=_,E="static",typeof e.column.explain=="object"&&(S=()=>ot(e.column.explain,"content",[e.column,e.row])||C)}return e.isHead&&(N=!(((V=(O=e.column)==null?void 0:O.showOverflowTooltip)==null?void 0:V.showHead)??!0),E="auto",S=()=>{var _,L;return((L=(_=f())==null?void 0:_.cloneNode)==null?void 0:L.call(_,!0))??""},e.headExplain&&(E="static",S=()=>e.headExplain)),e.column.type==="expand"&&!e.isHead&&!e.isExpandChild&&(N=!0),{disabled:N,content:S,mode:E,resizerWay:w,watchCellResize:T,popoverOption:x}},f=()=>{var y,N;return e.isHead?(N=(y=n.value)==null?void 0:y.querySelector)==null?void 0:N.call(y,".head-text"):n.value},u=()=>{const y=f();if(!y||!Lr(y))return;const{mode:N,disabled:w}=d();if(r.value=!w,N==="auto"&&(r.value=xm(y)),N==="static"&&(r.value=!0),r.value){const C=a.ref(d());l===null&&(l=ih(y,{disabled:C.value.disabled,content:C.value.content,mode:C.value.mode,popoverOption:C.value.popoverOption}))}else l==null||l.destroyInstance(y),l=null};let h=null;const p=()=>{const{disabled:y,resizerWay:N,watchCellResize:w}=d();y||(u(),w!==!1&&e.observerResize&&(h=g4(n.value,()=>{u()},60,!0,N),h.start()))};let g=null;const v=()=>{e.intersectionObserver&&(g=new IntersectionObserver(y=>{if(y[0].intersectionRatio<=0){s.value=!1,l==null||l.destroyInstance(n.value);return}s.value=!0,p()},{threshold:.5}),g==null||g.observe(n.value))};a.onMounted(()=>{v(),s.value&&p()}),a.onBeforeUnmount(()=>{h==null||h.disconnect(),h=null,l==null||l.destroyInstance(n.value),g==null||g.disconnect(),g=null});const b=e.headExplain||e.column.explain;return()=>{var y;return a.createVNode("div",{ref:n,style:i.value,class:["cell",e.column.type,b?"explain":""]},[s.value?(y=t.default)==null?void 0:y.call(t):"--"])}}}),xi=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)])}}),rV=({props:e,rows:t,ctx:n,columns:r,row:s,index:i,column:o,isChild:l=!1,multiShiftKey:c})=>{const{isShiftKeyDown:d,getStore:f,setStore:u,setStoreStart:h,clearStoreStart:p}=c,g=()=>{const x=(_,L)=>{L.stopImmediatePropagation(),L.preventDefault(),L.stopPropagation(),d.value||(_?h(s,i):p()),t.setRowSelection(s,_),r.setColumnAttribute(o,be.SELECTION_INDETERMINATE,t.getRowIndeterminate()),r.setColumnAttribute(o,be.SELECTION_VAL,t.getRowCheckedAllValue()),n.emit(Xe.ROW_SELECT,{row:s,index:i,checked:_,data:e.data}),n.emit(Xe.ROW_SELECT_CHANGE,{row:s,index:i,checked:_,data:e.data})},E=()=>{if(d.value){const _=u(s,i);if(_){const{start:L,end:I}=f(),R=L.index<I.index?L.index:I.index,M=L.index<I.index?I.index:L.index;(t.pageRowList.slice(R,M+1)??[]).forEach(j=>{co(e,{row:s,index:i,isCheckAll:!1})&&t.setRowSelection(j,!0)})}return n.emit(Xe.ROW_SELECT,{row:s,index:i,checked:!0,data:e.data,isShiftKeyDown:!0}),n.emit(Xe.ROW_SELECT_CHANGE,{row:s,index:i,checked:!0,data:e.data,isShiftKeyDown:!0}),Promise.resolve(!_)}return Promise.resolve(!0)},T=t.getRowAttribute(s,De.ROW_SELECTION_INDETERMINATE),O=t.getRowAttribute(s,De.ROW_SELECTION),V=co(e,{row:s,index:i,isCheckAll:!1});return a.createVNode(Ct,{beforeChange:E,disabled:!V,indeterminate:T,modelValue:O,onChange:x},null)},v=x=>Array.isArray(e.isEmptyCell)?e.isEmptyCell.some(E=>E===x):typeof e.isEmptyCell=="function"?e.isEmptyCell({cellText:x,row:s,column:o}):mv(x),b=()=>{var T;const x=()=>{if(ot(o,"type",[o,s])==="index")return t.getRowAttribute(a.toRaw(s),De.ROW_INDEX);const V=ot(o,"field",[o,s]),_=oo(s,V);if(typeof o.render=="function")return y();if(typeof _=="boolean"||typeof _=="number")return`${_}`;if(typeof _=="object"&&_!==null)return JSON.stringify(a.unref(_));if(v(_)){const{emptyCellText:L}=e;if(L)return typeof L=="function"?L({row:s,column:o,index:i}):L}return _},E={expand:()=>l?"":C(),selection:()=>g(),drag:S};return((T=E[o.type])==null?void 0:T.call(E,s,o,i,t))??x()},y=()=>{const x=oo(s,ot(o,"field",[o,s])),E=s;return o.render({cell:x,data:E,row:s,column:o,index:i,rows:t.tableRowList.value})},N=()=>{var T,O;const E=t.getRowAttribute(s,De.ROW_EXPAND)?a.createVNode(Ms,null,null):a.createVNode(Bs,null,null);return a.createVNode("span",null,[[E,((O=(T=n.slots).expandContent)==null?void 0:O.call(T,s))??""]])},w=x=>{t.setRowExpand(s,!t.getRowAttribute(s,De.ROW_EXPAND)),n.emit(Xe.ROW_EXPAND_CLICK,{row:s,column:o,index:i,rows:t.tableRowList.value,e:x})},C=()=>{const x=()=>{var E,T;return typeof o.render=="function"?y():((T=(E=n.slots).expandCell)==null?void 0:T.call(E,{row:s,column:o,index:i,rows:t}))??N()};return a.createVNode("span",{class:"expand-btn-action",onClick:E=>w(E)},[x()])},S=()=>{var O,V,_;const x=((O=e.rowDraggable)==null?void 0:O.render)??e.rowDraggable;if(typeof x=="function")return x(s,o,i,t.tableRowList.value);const E=((V=e.rowDraggable)==null?void 0:V.fontSize)??"14px";return((_=e.rowDraggable)==null?void 0:_.icon)??a.createVNode(Wo,{style:`'--font-size: ${E};'`,class:"drag-cell"},null)};return{renderCell:b}},y4=()=>{const e=n=>{let r={paddingSize:0,borderSize:0,marginSize:0};if(!n)return r;function s(h){const p=h.trim().split(" ").map(g=>Number.parseFloat(g));return p.length===1?{distanceLeft:p.at(0),distanceRight:p.at(0)}:p.length===2?{distanceLeft:p.at(1),distanceRight:p.at(1)}:p.length===3||p.length===4?{distanceLeft:p.at(p.length-1),distanceRight:p.at(1)}:{distanceLeft:0,distanceRight:0}}const i=getComputedStyle(n),o=i.getPropertyValue("padding"),l=i.getPropertyValue("margin"),c=i.getPropertyValue("border");r.borderSize=Number.parseFloat(i.getPropertyValue("border-left-width"))+Number.parseFloat(i.getPropertyValue("border-right-width")),r.paddingSize=Number.parseFloat(i.getPropertyValue("padding-left"))+Number.parseFloat(i.getPropertyValue("padding-right")),r.marginSize=Number.parseFloat(i.getPropertyValue("margin-left"))+Number.parseFloat(i.getPropertyValue("margin-right"));const d=o!==""&&o!=="0px"&&o!==void 0,f=l!==""&&l!=="0px"&&l!==void 0,u=c!==""&&c.indexOf("0px")===-1&&c!==void 0;if(d){const{distanceLeft:h,distanceRight:p}=s(o);r.paddingSize=h+p}if(f){const{distanceLeft:h,distanceRight:p}=s(l);r.marginSize=h+p}return u&&(r.borderSize=Number.parseFloat(i.getPropertyValue("border-width"))),r};return{renderDomStyles:e,resolveOverflowTips:(n,r,s)=>{var l,c;const i=s.value[n],o=(l=r.value)==null?void 0:l.querySelector(".bk-checkbox-label");if(i&&o){const f=e(i),u=e(o),h=e(r.value),p=(i==null?void 0:i.offsetWidth)+(f==null?void 0:f.borderSize)+(f==null?void 0:f.marginSize)+(f==null?void 0:f.paddingSize)+(h==null?void 0:h.borderSize)+(h==null?void 0:h.marginSize)+(h==null?void 0:h.paddingSize)+(u==null?void 0:u.marginSize)+(u==null?void 0:u.paddingSize),g=((c=r.value)==null?void 0:c.offsetWidth)||0;if((i==null?void 0:i.offsetWidth)>g||16+p>g)return!0}return!1}}};function dm(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const Si=32,aV=a.defineComponent({name:"HeadFilter",directives:{bkTooltips:Dn},props:{column:vl,height:m.number.def(Si)},emits:["change","filterSave","reset"],setup(e,{emit:t}){const{resolveClassName:n}=he(),{resolveOverflowTips:r}=y4(),s=Be("table"),i=a.computed(()=>{var A;return(A=e.column)==null?void 0:A.filter}),o=a.computed(()=>{var A;return((A=i.value)==null?void 0:A.checked)??[]}),l=a.ref(""),c=a.ref(),d=a.ref([]),f=a.reactive({isOpen:!1,checked:[]});f.checked.push(...o.value),a.watch(()=>o,A=>{f.checked.length=0,f.checked=[],f.checked.push(...A.value)},{deep:!0});const u=a.computed(()=>Ae({[n("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:f.checked.length,opened:f.isOpen})),h=Ae({[n("table-head-filter")]:!0}),p=a.ref(null),g=A=>{f.isOpen=A,A&&setTimeout(()=>{var P;(P=p.value)==null||P.reset()}),A||(l.value="")},v=`light ${n("table-head-filter")}`,b=a.computed(()=>{const{list:A=[]}=i.value;return A.filter(B=>{const z=x(l.value);return z.test(B.label)||z.test(B.text)||z.test(B.value)})}),y=5,N=a.computed(()=>{var A;return((A=i.value)==null?void 0:A.maxHeight)??Si*y}),w=a.computed(()=>{const{height:A,list:P=[]}=i.value;return A||P.length*Si}),C=a.computed(()=>{const A=Si*2;return b.value.length>y?N.value:A}),S=a.computed(()=>({maxHeight:`${N.value}px`,minHeight:`${C.value}px`,height:/%$/.test(`${w.value}`)?w.value:`${w.value}px`})),x=(A,P="ig")=>new RegExp(`${A}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),P),E=()=>{T(!0),t("filterSave",f.checked),f.isOpen=!1},T=(A=!1)=>{const{disabled:P}=V(_,s.value.confirm);if(P||A){if(i.value==="custom"){t("change",f.checked,null),f.isOpen=!1;return}t("change",f.checked)}},O=()=>{f.checked.length&&(f.checked.length=0,f.isOpen=!1,t("change",f.checked),t("reset",f.checked))},V=(A,P)=>({disabled:A==="disabled"||A===!1,text:typeof A=="string"?A:P}),{btnSave:_,btnReset:L}=i.value,I=()=>{const{disabled:A,text:P}=V(_,s.value.confirm);return A?a.createVNode("span",{class:"btn-filter-save disabled"},[P]):a.createVNode(it,{style:"width: 56px; margin-right: 8px;",size:"small",theme:"primary",onClick:E},dm(P)?P:{default:()=>[P]})},R=()=>{const{disabled:A,text:P}=V(L,s.value.reset);return A?"":a.createVNode(it,{style:"width: 56px;",disabled:f.checked.length===0,size:"small",onClick:O},dm(P)?P:{default:()=>[P]})},M=(A,P)=>{const B=new Set(f.checked);A?B.add(P.value):B.delete(P.value),f.checked.length=0,f.checked.push(...Array.from(B)),i.value.checked=[...f.checked],T()},j=async()=>{await new Promise(A=>setTimeout(A,0)),b.value.forEach(A=>{Object.prototype.hasOwnProperty.call(A,"showOverflowTooltip")||(A.showOverflowTooltip=r(`list-item-${A.value}-ref`,c,d))})},H=A=>A.length?(j(),A.map(P=>a.withDirectives(a.createVNode("div",{key:P.value,ref:c,class:"list-item"},[a.createVNode(Ct,{checked:f.checked.includes(P.value),immediateEmitChange:!1,label:P.value,modelValue:f.checked.includes(P.value),onChange:B=>M(B,P)},{default:()=>[a.createVNode("span",{ref:B=>d.value[`list-item-${P.value}-ref`]=B},[`${P.text}`])]})]),[[a.resolveDirective("bk-tooltips"),{content:P.tipKey||P.text,placement:"right",disabled:!P.showOverflowTooltip}]]))):a.createVNode("div",{class:"list-item is-empty"},[s.value.emptyText]);return()=>a.createVNode(Dt,a.mergeProps({arrow:!1,isShow:f.isOpen,offset:0,placement:"bottom-start",renderType:go.SHOWN,trigger:"click"},{theme:v},{onAfterHidden:()=>g(!1),onAfterShow:()=>g(!0)}),{default:()=>a.createVNode(Uo,{class:u.value},null),content:()=>a.createVNode("div",{class:h},[a.createVNode("div",{style:"padding: 4px 10px;"},[a.createVNode(hr,{modelValue:l.value,"onUpdate:modelValue":A=>l.value=A},null)]),a.createVNode(il,{class:"content-list"},{default:()=>[a.createVNode("div",{style:S.value,class:"content-items"},[H(b.value)])]}),a.createVNode("div",{class:"content-footer"},[I(),R()])])})}}),sV=a.defineComponent({name:"HeadSort",props:{column:vl,defaultSort:m.oneOf(WA).def(ct.NULL),active:m.bool,sortValFormat:m.arrayOf(m.any).def([""])},emits:["change"],setup(e,{emit:t,expose:n}){var c,d;const{resolveClassName:r}=he(),s=((d=(c=e.column)==null?void 0:c.sort)==null?void 0:d.value)??e.defaultSort??ct.NULL,i=a.ref(s);a.watch(()=>[e.defaultSort],([f])=>{i.value=f},{immediate:!0});const o=f=>{i.value=f},l=(f,u)=>{f.stopImmediatePropagation(),f.stopPropagation(),f.preventDefault(),t("change",{type:u,isCancel:u===i.value})};return n({setNextSortType:o}),()=>a.createVNode("span",{class:r("head-cell-sort")},[a.createVNode(Lo,{style:"align-items: flex-end;",class:["sort-action","sort-asc",e.active&&i.value===ct.ASC?"active":""],onClick:f=>l(f,ct.ASC)},null),a.createVNode(Rs,{style:"align-items: flex-start;",class:["sort-action","sort-desc",e.active&&i.value===ct.DESC?"active":""],onClick:f=>l(f,ct.DESC)},null)])}});function iV(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const oV=({props:e,columns:t,rows:n,ctx:r,column:s,index:i})=>{var R;const o=a.ref(t.getColumnAttribute(s,be.COL_SORT_TYPE)),l=a.ref(t.getColumnAttribute(s,be.COL_SORT_ACTIVE)),c=a.toRaw(s),d=a.ref(null),f=M=>{const{isCancel:j,type:H=t.getColumnRefAttribute(s,be.COL_SORT_TYPE)}=M??{},A=j?ct.NULL:H,P=v4(s,A,e.sortValFormat);t.setColumnAttribute(s,be.COL_SORT_TYPE,A),t.setColumnAttribute(s,be.COL_SORT_FN,P),t.setColumnSortActive(s,A!==ct.NULL),o.value=A,l.value=A!==ct.NULL,r.emit(Xe.COLUMN_SORT,{column:s,index:i,type:A})},u=()=>a.createVNode(sV,{active:l.value,column:s,defaultSort:o.value,sortValFormat:e.sortValFormat,onChange:f},null),h=()=>{const M=A=>{r.emit(Xe.COLUMN_FILTER,{checked:A,column:a.unref(s),index:i})},j=A=>{t.setColumnAttribute(s,be.COL_FILTER_VALUES,A),r.emit(Xe.COLUMN_FILTER_SAVE,{values:A})},H=()=>{t.setColumnAttribute(s,be.COL_FILTER_VALUES,[]),r.emit(Xe.COLUMN_FILTER,{checked:[],column:a.unref(s),index:i})};return a.createVNode(aV,{height:e.headHeight,column:s,onChange:M,onFilterSave:j,onReset:H},null)},p=kh(e),{cellFn:g}=p,v=()=>typeof g=="function"?g({index:i,column:s}):typeof s.renderHead=="function"?s.renderHead({index:i,column:s}):ot(s,"label",[i]),b=()=>{const M=[];s.sort&&M.push(u()),s.filter&&M.push(h());const j=v();M.unshift(a.createVNode("span",{class:"head-text"},[j]));const H=typeof j=="string"?j:void 0,A={"has-sort":!!s.sort,"has-filter":!!s.filter};return{cells:M,showTitle:H,headClass:A}},y=(M,j="current")=>{t.setColumnAttribute(s,be.SELECTION_VAL,M),t.setColumnAttribute(s,be.SELECTION_INDETERMINATE,!1),n.setRowSelectionAll(M),r.emit(Xe.ROW_SELECT_ALL,{checked:M,data:e.data,type:j})},N=M=>{y(!0,M)},{resolveClassName:w}=he(),C=w("across-page-popover"),S=()=>{const M=t.getColumnAttribute(s,be.SELECTION_DISABLED),j=t.getColumnAttribute(s,be.SELECTION_VAL),H=t.getColumnAttribute(s,be.SELECTION_INDETERMINATE);return s.acrossPage?a.createVNode("span",{class:"across-page-cell"},[a.createVNode(Ct,{disabled:M,indeterminate:H,modelValue:j,outline:!0,onChange:A=>y(A)},null),a.createVNode(Dt,{ref:d,extCls:C,arrow:!1,placement:"bottom-start",theme:"light",trigger:"click"},{default:()=>a.createVNode("span",{class:"dropwn-icon"},null),content:()=>a.createVNode("div",{class:"dropwn-content"},[a.createVNode("div",{onClick:()=>N("current")},[a.createTextVNode("本页全选")]),a.createVNode("div",{onClick:()=>N("all")},[a.createTextVNode("跨页全选")])])})]):a.createVNode(Ct,{disabled:M,indeterminate:H,modelValue:j,onChange:A=>y(A)},null)},x=()=>{if(s.type==="selection")return[S()];const{headClass:M,showTitle:j,cells:H}=b();return a.createVNode(Zf,{class:M,column:s,headExplain:ot(s.explain,"head",[s]),isHead:!0,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,resizerWay:e.resizerWay,title:j},iV(H)?H:{default:()=>[H]})},E=()=>{if(!t.getColumnAttribute(s,be.COL_IS_DRAG)&&s.sort&&!s.filter){const j={isCancel:!1,type:jL(t.getColumnRefAttribute(s,be.COL_SORT_TYPE))};f(j)}},T=Object.assign(t.getFixedStlye(s),{"--background-color":o4[((R=e.thead)==null?void 0:R.color)??gl.DEF1]}),O=t.getGroupAttribute(c),V=a.computed(()=>[t.getHeadColumnClass(s,i),t.getColumnCustomClass(s),s.align||e.headerAlign||e.align,{"is-last-child":(O==null?void 0:O.offsetLeft)+1===t.visibleColumns.length}]),_=a.computed(()=>V.value.concat([{"is-head-group":O==null?void 0:O.isGroup,"is-head-group-child":!!(O!=null&&O.parent)}])),L=()=>ot(s,"label",[i,s]);return{getTH:()=>O!=null&&O.isGroup?a.createVNode("th",{style:T,class:_.value,colspan:O==null?void 0:O.thColspan,rowspan:O==null?void 0:O.thRowspan},[L()]):a.createVNode("th",a.mergeProps({style:T,class:V.value,colspan:O==null?void 0:O.thColspan,"data-id":t.getColumnId(s),rowspan:O==null?void 0:O.thRowspan,onClick:()=>E()},t.resolveEventListener(s,i)),[x()])}},lV=e=>{const t=a.ref(!1),n={start:null,end:null},r=u=>{u.key==="Shift"&&(t.value=!0)},s=u=>{u.key==="Shift"&&(t.value=!1,c())},i=(u,h)=>{n.start={index:h??null,row:u??null}},o=()=>{i()},l=(u,h)=>n.start===null&&n.end===null?(n.start={index:h,row:u},!1):(n.end={index:h,row:u},!0),c=()=>{n.start=null,n.end=null};return e.shiftMultiChecked&&(window.addEventListener("keydown",r),window.addEventListener("keyup",s)),{isShiftKeyDown:t,setStore:l,getStore:()=>n,clearStore:c,setStoreStart:i,clearStoreStart:o,removeMultiCheckedEvents:()=>{e.shiftMultiChecked&&(window.removeEventListener("keydown",r),window.removeEventListener("keyup",s))}}};function cV(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const uV=({props:e,ctx:t,columns:n,rows:r,pagination:s})=>{const i=Be("table"),o=rn();let l={};const c=lV(e),d=()=>a.createVNode("colgroup",null,[(n.visibleColumns||[]).map((_,L)=>{const I=`${PL(n.getColumnOrderWidth(_))}`.replace(/px$/i,""),R=n.getColumnAttribute(_,be.COL_MIN_WIDTH);return a.createVNode("col",{style:{width:kr(I,"auto"),minWidth:kr(R,"auto")}},null)})]),f=()=>{const _=kh(e),L={"--row-height":`${ot(_,"height",["thead"])}px`,backgroundColor:e.thead.color};return a.createVNode(a.Fragment,null,[a.createVNode("thead",{style:L},[n.columnGroup.map((I,R)=>a.createVNode("tr",null,[I.map((M,j)=>{if(n.isHiddenColumn(M))return null;const{getTH:H}=oV({props:e,ctx:t,columns:n,column:M,index:j,rows:r});return H()})]))])])},u=()=>e.showHead?a.createVNode("table",{cellpadding:0,cellspacing:0},[d(),f()]):null,h=()=>{const _="append-last-row",L=[...Yr(e.rowStyle,[]),{"--row-height":`${g(null,null,"append-last-row")}px`}];if(e.appendLastRow.type==="default")return t.slots.appendLastRow?a.createVNode(xi,{key:_},{default:()=>{var I,R;return[a.createVNode("tr",{key:_,style:L},[a.createVNode("td",{colspan:n.visibleColumns.length},[((R=(I=e.appendLastRow).cellRender)==null?void 0:R.call(I,null,null))??t.slots.appendLastRow()])])]}}):void 0;if(e.appendLastRow.type==="summary")return a.createVNode(xi,{key:_},{default:()=>[a.createVNode("tr",{key:_,style:L},[n.visibleColumns.map((I,R)=>a.createVNode("td",null,[a.createVNode(Zf,null,{default:()=>{var M,j;return[((j=(M=e.appendLastRow).cellRender)==null?void 0:j.call(M,I,R))??I.field??I.prop]}})]))])]})},p=_=>{let L={};const I=new WeakMap,R=n.needRowSpan.value;return a.createVNode("tbody",null,[_.map((M,j)=>{const H=x(M,j,L,_,I,R);return L=M,H}),h()])},g=r.getRowHeight,v=_=>{l=_},b=_=>{var R,M;const L=_??r.pageRowList,I=a.computed(()=>e.emptyText===void 0?i.value.emptyText:e.emptyText);return L.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":o},[d(),p(L)]):((M=(R=t.slots).empty)==null?void 0:M.call(R))??a.createVNode(nV,{emptyText:I.value,filterList:L,list:e.data},null)},y=(_,L,I,R)=>{var j;((j=_.target)==null?void 0:j.tagName)!=="INPUT"&&t.emit(Xe.ROW_CLICK,_,L,I,R)},N=(_,L,I,R)=>{t.emit(Xe.ROW_DBL_CLICK,_,L,I,R)},w=(_,L,I,R)=>{t.emit(Xe.ROW_MOUSE_ENTER,_,L,I,R)},C=(_,L,I,R)=>{t.emit(Xe.ROW_MOUSE_LEAVE,_,L,I,R)},S=(_,L,I,R,M)=>{var P;M.has(_)||M.set(_,new WeakMap),M.get(_).has(R)||M.get(_).set(R,{skipRowLen:0,skipRow:!1});let{skipRowLen:j=0}=((P=M.get(I))==null?void 0:P.get(R))??{},H=!1;const A=lo(R,null,_,L,"rowspan");return j>1?(j=j-1,H=!0):A>1&&(j=A,H=!1),Object.assign(M.get(_).get(R),{skipRowLen:j,skipRow:H}),{skipRowLen:j,skipRow:H}},x=(_,L,I,R,M,j,H=!1)=>{const A=R.length,P=[...Yr(e.rowStyle,[_,L]),{"--row-height":`${g(_,L)}px`}],B=[...Yr(e.rowClass,[_,L]),`hover-${e.rowHover}`,L%2===1&&e.stripe?"stripe-row":""],z=r.getRowAttribute(_,De.ROW_UID);return[a.createVNode(xi,{key:z},{default:()=>[a.createVNode("tr",a.mergeProps({key:z,style:P,class:B,"data-row-index":L,draggable:!!e.rowDraggable,onClick:D=>y(D,_,L,R),onDblclick:D=>N(D,_,L,R),onMouseenter:D=>w(D,_,L,R),onMouseleave:D=>C(D,_,L,R)},l),[n.visibleColumns.map((D,k)=>{const G=[n.getFixedStlye(D),...Yr(e.cellStyle,[D,k,_,L])],{colspan:U,rowspan:te}=zL(D,k,_,L),{skipCol:$}=n.getColumnAttribute(D,be.COL_SPAN),{skipRow:Q}=j&&!H?S(_,L,I,D,M):{skipRow:!1},ne={"expand-cell":D.type==="expand"};if(!Q&&!$){let le;const ae=[n.getColumnClass(D,k),n.getColumnCustomClass(D,_),D.align||e.align,...Yr(e.cellClass,[D,k,_,L]),{"expand-row":r.getRowAttribute(_,De.ROW_EXPAND),"is-last":L+te>=A}],X=`${z}_${k}`,J=`${z}_${k}_cell`,{renderCell:Y}=rV({props:e,rows:r,ctx:t,columns:n,row:_,index:L,column:D,isChild:H,multiShiftKey:c}),oe=(pe,Z)=>{const ce={event:pe,row:_,column:D,cell:{getValue:()=>Y()},rowIndex:L,columnIndex:k};t.emit(Z,ce)};return a.createVNode("td",{key:X,style:G,class:ae,colspan:U,"data-id":X,rowspan:te,onClick:pe=>oe(pe,Xe.CELL_CLICK),onDblclick:pe=>oe(pe,Xe.CELL_DBL_CLICK)},[a.createVNode(Zf,{key:J,class:ne,column:D,"data-id":J,intersectionObserver:e.intersectionObserver,isExpandChild:H,observerResize:e.observerResize,parentSetting:e.showOverflowTooltip,row:_},cV(le=Y())?le:{default:()=>[le]})])}return null})])]}),E(_,B)]},E=(_,L,I)=>{if(r.getRowAttribute(_,De.ROW_EXPAND)){const M=[...L,{row_expend:!0}],H=`${r.getRowAttribute(_,De.ROW_UID)}_expand`;return Array.isArray(_.children)?_.children.map((A,P)=>x(A,P,{},_,{},!1,!0)):a.createVNode(xi,{key:H},{default:()=>{var A,P;return[a.createVNode("tr",{class:M},[a.createVNode("td",{colspan:n.visibleColumns.length,rowspan:1},[((P=(A=t.slots).expandRow)==null?void 0:P.call(A,_))??a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}},T=_=>{s.setPagination({limit:_}),t.emit(Xe.PAGE_LIMIT_CHANGE,_)},O=_=>{if(typeof e.pagination=="object"&&_!==s.options.current){s.setPagination({current:_,value:_}),t.emit(Xe.PAGE_VALUE_CHANGE,_);return}typeof e.pagination=="boolean"&&e.pagination!==!1&&t.emit(Xe.PAGE_VALUE_CHANGE,_)},V=()=>{if(s.isShowPagination.value)return a.createVNode(Ah,a.mergeProps({style:"width: 100%;"},s.options,{modelValue:s.options.current,onChange:_=>O(_),onLimitChange:_=>T(_)}),null)};return a.onUnmounted(()=>{c.removeMultiCheckedEvents()}),{renderColumns:u,renderTBody:b,renderTFoot:V,setDragEvents:v}},dV=e=>{const t=a.reactive(new WeakMap),n=a.ref([]),r=a.reactive([]),s=H=>e.isRowSelectEnable?typeof e.isSelectedFn=="function"?e.isSelectedFn(l(H)):Array.isArray(e.checked)?e.checked.some(A=>typeof A!="object"?e.selectionKey.length&&Object.prototype.hasOwnProperty.call(H,e.selectionKey)?FL(H,e.selectionKey)===A:(console.warn("props.selectionKey is undefined or null or empty"),!1):Ni(A)===Ni(H)):!1:!1,i=(H,A,P)=>typeof e.rowHeight=="function"||/^\d+/.test(`${e.rowHeight}`)?ot(e,"rowHeight",[{index:A,type:P??"tbody",row:H}]):lr,o=()=>{let H=!1,A=!1;n.value.forEach((P,B)=>{const z=Ni(P);let D=WL(z,rn(),e);const k=s(z);k?H=!0:A=!0,t.has(z)||t.set(z,{[De.ROW_EXPAND]:!1,[De.ROW_SELECTION]:k,[De.ROW_UID]:D,[De.ROW_INDEX]:B+1,[De.ROW_SELECTION_INDETERMINATE]:!1});const G=t.get(z);D=G[De.ROW_UID],G[De.ROW_INDEX]=B+1,G[De.ROW_HEIGHT]=i(P,B)}),t.set(Tr,{[De.ROW_SELECTION]:H,[De.ROW_SELECTION_INDETERMINATE]:H&&A})},l=(H,A)=>({row:H,index:A??c(H,De.ROW_INDEX),isSelectAll:c(Tr,De.ROW_SELECTION)}),c=(H,A)=>{var P;return(P=t.get(H))==null?void 0:P[A]},d=H=>{t.set(qA,{[De.ROW_SPAN]:H})},f=(H,A)=>co(e,{row:H,index:A})?c(H,De.ROW_SELECTION):!0,u=H=>{if(typeof e.isSelectedFn=="function"){x(H,e.isSelectedFn(l(H)));return}x(H,!c(H,De.ROW_SELECTION))},h=H=>{const A=H??!p();if(t.set(Tr,{[De.ROW_SELECTION]:A,[De.ROW_SELECTION_INDETERMINATE]:!1}),e.acrossAll){n.value.forEach((P,B)=>x(P,A,B));return}r.forEach((P,B)=>x(P,A,B))},p=()=>e.acrossAll?n.value.every((H,A)=>f(H,A)):r.every((H,A)=>f(H,A)),g=()=>e.acrossAll?n.value.some(H=>c(H,De.ROW_SELECTION)):r.some(H=>c(H,De.ROW_SELECTION)),v=H=>{h(H)},b=()=>{const H=p();S(Tr,De.ROW_SELECTION,H),S(Tr,De.ROW_SELECTION_INDETERMINATE,!H&&g())},y=()=>c(Tr,De.ROW_SELECTION_INDETERMINATE),N=()=>c(Tr,De.ROW_SELECTION),w=(H,A)=>{if(A){S(A,De.ROW_HEIGHT,H);return}n.value.forEach(P=>S(P,De.ROW_HEIGHT,H))},C=(H,A,P)=>H?c(H,De.ROW_HEIGHT):i(H,A,P),S=(H,A,P)=>{const B=Ni(H),z=t.get(B);z&&Object.prototype.hasOwnProperty.call(z,A)&&(z[A]=P)},x=(H,A,P)=>{let B=A;typeof e.isSelectedFn=="function"&&(B=e.isSelectedFn(l(H,P))),co(e,{row:H,index:P??c(H,De.ROW_INDEX)})&&S(H,De.ROW_SELECTION,B),b()},E=(H,A)=>{S(H,De.ROW_INDEX,A)},T=(H,A)=>{S(H,De.ROW_EXPAND,A)},O=H=>{let A=0;const P=50,B=()=>{const z=A+P;r.push(...H.slice(A,z)),z<H.length&&(A=z,setTimeout(()=>{B()}))};if(H.length>P){B();return}r.push(...H)};return{setRowIndex:E,setRowExpand:T,isRowChecked:f,setPageRowList:H=>{r.length=0,O(H)},setTableRowList:H=>{n.value.length=0,n.value.push(...H),o()},clearSelection:()=>{n.value.forEach(H=>x(H,!1))},formatDataSchema:o,toggleRowSelection:u,setRowSelectionAll:v,setRowSelection:x,setAllRowExpand:H=>{n.value.forEach(A=>T(A,H??!0))},setRowHeight:w,setTableIsNeedRowSpan:d,getRowAttribute:c,getRowSelection:()=>n.value.filter(H=>c(H,De.ROW_SELECTION)),getRowIndeterminate:y,getRowCheckedAllValue:N,getCurrentPageRowsHeight:()=>r.reduce((H,A)=>H+C(A),0),changePageRowIndex:(H,A)=>{const P=r[H];r.splice(A,0,P);const B=H<A?H:H+1;r.splice(B,1)},toggleAllSelection:h,getRowHeight:C,tableRowList:n,tableRowSchema:t,pageRowList:r}};function fV(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const hV=(e,t,n,r)=>{const s=Be("table"),{resolveClassName:i}=he(),{resolveOverflowTips:o}=y4(),l=jA(s),c=a.ref(!1),d=a.ref(),f=a.ref([]),u=(U,te)=>ot(U,["id","field","type"],[U,te]),h=()=>({enabled:!0,fields:e.columns.map(U=>Object.assign({},U,{field:U.field||U.type})),checked:[],limit:0,size:"small",sizeList:l,showLineHeight:!0,extCls:"",trigger:"manual",height:os.small}),p=U=>typeof U=="boolean"&&U!==!1?h():U?Object.assign({},h(),U):{enabled:!1},g=a.ref(null),v=a.reactive(h()),b=U=>{Object.assign(v,p(U))};a.watch(()=>[e.settings],()=>{b(e.settings)},{immediate:!0,deep:!0});const y=a.ref(v.size||"small"),N=a.ref(os.small),w=a.ref(v.checked||[]),S=`light ${i("table-settings")}`,x=a.computed(()=>v.fields||e.columns||[]),E={checkAll:c.value,activeSize:y.value,activeHeight:N.value,checkedFields:v.checked||[]},T=()=>{var te;Object.assign(E,{checkAll:c.value,activeSize:y.value,activeHeight:N.value,checkedFields:w.value});const U={checked:w.value,size:y.value,height:N.value,fields:a.unref(x)};Object.assign(v,U),n.setColumnAttributeBySettings(v,U.checked),n.setVisibleColumns(),r==null||r(U),(te=g.value)==null||te.hide(),t.emit(Xe.SETTING_CHANGE,U)},O=()=>{var U;c.value=E.checkAll,y.value=E.activeSize,N.value=E.activeHeight,w.value=E.checkedFields,(U=g.value)==null||U.hide()},V=()=>{var U;v.trigger==="manual"&&((U=g.value)==null||U.show())},_=U=>{U.stopImmediatePropagation(),U.stopPropagation(),U.preventDefault(),c.value=!c.value;const te=v.fields||e.columns||[],$=te.filter((Q,ne)=>Q.disabled&&w.value.includes(u(Q,ne))).map((Q,ne)=>u(Q,ne));if(c.value){const Q=te.filter(ne=>!ne.disabled).map((ne,le)=>u(ne,le));w.value.splice(0,w.value.length,...Q,...$)}else w.value.splice(0,w.value.length,...$)},L=a.computed(()=>(v.limit??0)>0),I=v.sizeList||l,R=a.computed(()=>L.value&&(v.limit?v.limit:0)<=w.value.length),M=(U,te)=>U.disabled||R.value&&!w.value.includes(u(U,te)),j=U=>{y.value=U.value,N.value=U.height},H=U=>({"line-size":!0,"is-medium":y.value==="medium",active:U.value===y.value}),A={marginRight:"12px"},P=()=>I.map(U=>a.createVNode("span",{class:H(U),onClick:()=>j(U)},[U.label])),B=a.computed(()=>w.value.length>0&&w.value.length<x.value.length),z=a.computed(()=>typeof v.showLineHeight=="boolean"?v.showLineHeight:!0);a.watch(()=>[w.value],()=>{w.value.length||(c.value=!1),w.value.length&&x.value.every((U,te)=>w.value.includes(u(U,te)))&&(c.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{w.value.splice(0,w.value.length,...v.checked)},{immediate:!0,deep:!0});const D=async()=>{await new Promise(U=>setTimeout(U,0)),x.value.forEach((U,te)=>{Object.prototype.hasOwnProperty.call(U,"showOverflowTooltip")||(U.showOverflowTooltip=o(`field-item-${ot(U,["id","field","type"],[U,te])}-ref`,d,f))})},k=()=>{var $,Q,ne,le;let U;const te=(Q=($=t.slots).settings)==null?void 0:Q.call($);return te||D(),te??a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"setting-head"},[a.createVNode("span",{class:"head-title"},[s.value.setting.title]),a.createVNode(Ps,{class:"icon-close-action",onClick:O},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]),L.value?a.createVNode("span",{class:"limit"},[s.value.setting.fields.subtitle(v.limit)]):""]),L.value?"":a.createVNode("span",{class:"check-all",onClick:_},[a.createVNode(Ct,{indeterminate:!!B.value,label:s.value.setting.fields.selectAll,modelValue:w.value.length>0},{default:()=>[s.value.setting.fields.selectAll]})])]),a.createVNode(il,{class:"setting-body-fields",modelValue:w.value,"onUpdate:modelValue":ae=>w.value=ae},fV(U=x.value.map((ae,X)=>a.createVNode("div",{ref:d,class:"field-item"},[a.createVNode(Ct,{checked:w.value.includes(u(ae,X)),disabled:M(ae,X),label:u(ae,X)},{default:()=>[a.withDirectives(a.createVNode("span",{ref:J=>f.value[`field-item-${ot(ae,["id","field","type"],[ae,X])}-ref`]=J},[ot(ae,["name","label"],[ae,X])]),[[a.resolveDirective("bk-tooltips"),{placement:"top-start",content:ot(ae,["name","label"],[ae,X]),disabled:!ae.showOverflowTooltip}]])]})])))?U:{default:()=>[U]}),(le=(ne=t.slots).setting)==null?void 0:le.call(ne),z.value?a.createVNode("div",{class:"setting-body-line-height"},[s.value.setting.lineHeight.title,a.createTextVNode(":"),P()]):""]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(it,{style:A,theme:"primary",onClick:T},{default:()=>[s.value.setting.options.ok]}),a.createVNode(it,{style:A,onClick:O},{default:()=>[s.value.setting.options.cancel]})])])};return{options:v,renderSettings:()=>e.settings?a.createVNode(Dt,a.mergeProps({ref:g,extCls:v.extCls,arrow:!0,placement:"bottom-end",trigger:v.trigger??"manual"},{theme:S}),{default:()=>a.createVNode("span",{class:"table-head-settings",onClick:V},[a.createVNode(Po,{style:"color: #c4c6cc;"},null)]),content:()=>a.createVNode("div",{class:"setting-content"},[k()])}):null}},mV=a.defineComponent({name:"Table",directives:{bkTooltips:Dn},props:tL,emits:pL,setup(e,t){process.env.NODE_ENV!=="production"&&console.warn("BkTable 组件后续将不再维护,请迁移至新组件 @blueking/table");const n=KL(e),r=dV(e),s=tV(e),{renderContainer:i,renderFixedBottom:o,renderBody:l,renderHeader:c,renderFooter:d,setBodyHeight:f,setFootHeight:u,setDragOffsetX:h,setOffsetRight:p,setHeaderRowCount:g,setLineHeight:v,getBodyHeight:b,refBody:y,refRoot:N}=QL(e,t),w=(...ne)=>{var le;return(le=y.value)==null?void 0:le.scrollTo(...ne)};typeof e.rowHeight=="function"?v(ne=>r.getRowHeight(ne.rows[0],ne.index)):v(e.rowHeight);const S=hV(e,t,n,({checked:ne,height:le})=>{(ne==null?void 0:ne.length)>0&&w(0,0),typeof e.rowHeight!="function"&&(r.setRowHeight(le),v(le))}),x=YL(e,r,t),{renderColumns:E,renderTBody:T,renderTFoot:O,setDragEvents:V}=uV({props:e,ctx:t,columns:n,rows:r,pagination:s});V(x);const{resolveColumns:_}=vL(),L=a.getCurrentInstance(),I=()=>{var le;const ne=((le=L.subTree)==null?void 0:le.children)??[];n.debounceUpdateColumns(_(ne),()=>{g(n.columnGroup.length)})};a.provide(l4,I);const{renderFixedRows:R,resolveFixedColumnStyle:M}=XL(e,n),j=()=>{var le;const ne=((le=N.value)==null?void 0:le.offsetWidth)-(e.scrollbar?1:i4)||0;n.resolveColsCalcWidth(ne),M()},{dragOffsetX:H}=gL(n,{afterResize:M}),A=a.ref(!1),P=ne=>{if(!s.isShowPagination.value||e.remotePagination)return ne;const le=(s.options.current-1)*s.options.limit,ae=le+s.options.limit;return ne.slice(le,ae)},B=()=>{let ne=r.tableRowList.value.slice();return n.filterColumns.forEach(le=>{var ae;!n.isHiddenColumn(le.col)&&le[be.COL_FILTER_FN]&&((ae=le[be.COL_FILTER_VALUES])!=null&&ae.length)&&(ne=ne.filter((X,J)=>le[be.COL_FILTER_FN](le[be.COL_FILTER_VALUES],X,J,e.data)))}),n.sortColumns.forEach(le=>{!n.isHiddenColumn(le.col)&&le[be.COL_SORT_FN]&&le.active&&ne.sort((ae,X)=>{let J=null,Y=null;return le.col.type==="index"&&(J=r.getRowAttribute(ae,De.ROW_INDEX),Y=r.getRowAttribute(X,De.ROW_INDEX)),le[be.COL_SORT_FN](ae,X,J,Y)})}),ne},z=a.computed(()=>s.isShowPagination.value?e.paginationHeight:0),D=()=>{u(z.value),/^\d+\.?\d*(px)?$/.test(`${e.height}`)&&f(Number(`${e.height}`.replace("px","")))},k=a.ref(!1),G=gr((ne=!0)=>{const le=B();e.remotePagination||s.setPagination({count:le.length});const ae=P(le);r.setPageRowList(ae),ne&&(k.value=!0),a.nextTick(()=>{p(),$(),k.value&&(w(0,0),k.value=!1)})},64),U=a.ref(!1);let te=null;eV(N,()=>{if(!U.value){if(U.value=!0,e.virtualEnabled&&ra(N.value)){if(A.value){setTimeout(()=>{A.value=!1});return}const ne=N.value.offsetHeight;A.value=!0,f(ne),p()}j(),p(),w(0,0);return}te&&clearTimeout(te),te=setTimeout(()=>{U.value=!1})});const $=()=>{if(e.virtualEnabled){let le=r.getCurrentPageRowsHeight();if(/^\d+\.?\d*(px)?$/.test(`${e.maxHeight}`)){const ae=b(Number(`${e.maxHeight}`.replace("px","")));if(le>ae){f(ae,!1);return}}f(le,!1)}};a.watch(()=>[e.columns],()=>{n.debounceUpdateColumns(e.columns,()=>{g(n.columnGroup.length)})},{immediate:!0}),a.watch(()=>[H.value],()=>{h(H.value)}),a.watch(()=>[n.visibleColumns],()=>{a.nextTick(()=>j())},{immediate:!0,deep:!0}),a.watch(()=>[n.filterColumns],()=>{G()},{deep:!0}),a.watch(()=>[n.sortColumns],()=>{G(!1)},{deep:!0}),a.watch(()=>[s.isShowPagination.value],()=>{D()},{immediate:!0}),a.watch(()=>[e.data],()=>{r.setTableRowList(e.data),G(!1)},{immediate:!0,deep:!0}),a.watch(()=>[s.options.count,s.options.limit,s.options.current],()=>{G(!1)},{immediate:!0});const Q=a.computed(()=>r.pageRowList.length);return a.watch(Q,(ne,le)=>{var ae,X;ne<le&&((X=(ae=y==null?void 0:y.value)==null?void 0:ae.updateScroll)==null||X.call(ae),w(void 0,0))}),t.expose({setRowExpand:r.setRowExpand,setAllRowExpand:r.setAllRowExpand,clearSelection:()=>{r.clearSelection(),n.clearSelectionAll()},toggleAllSelection:r.toggleAllSelection,toggleRowSelection:r.toggleRowSelection,getSelection:r.getRowSelection,setRowSelection:r.setRowSelection,clearSort:n.clearColumnSort,scrollTo:w,getRoot:()=>N.value}),()=>i([c(E,S.renderSettings,R),l(r.pageRowList,T,R),o(),d(O())])}}),b4=St(mV,{Column:rL}),w4=Ie(A_),pV={list:m.arrayOf(m.shape({tag:m.string,content:m.oneOfType([m.string,m.object]),type:m.string,size:m.string,color:m.string,icon:m.func,filled:m.bool,border:m.bool,nodeType:m.timelineNodeType()}).isRequired),titleAble:m.bool.def(!1)},gV=a.defineComponent({name:"Timeline",props:pV,emits:["select"],setup(e,{emit:t}){const n=a.shallowRef([]),{resolveClassName:r}=he(),s=i=>{t("select",i)};return a.watch(()=>e.list,()=>{n.value=e.list.map(i=>({tag:i.tag,content:i.content,type:i.type,size:i.size,color:i.color,icon:i.icon,filled:i.filled,border:i.border??!0,nodeType:i.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"),i=["blue","red","green","yellow","gray"],o=r.type?`${s}-${r.type}`:`${s}-default`,l=r.size?`${s}-${r.size}`:"",c=r.filled?`${s}-filled`:"",d=r.color&&i.includes(r.color)?`${s}-${r.color}`:"",f=e(r)?`${s}-custom`:"";return Ae({},`${s} ${o} ${l} ${d} ${c} ${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:typeof r.content=="string"?Ki.sanitize(r.content):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:Ki.sanitize(r.tag||"")},null)]),n(r)])]))])}}),C4=Ie(gV);var vn=(e=>(e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e.OBJECT_ARRAY="objectArray",e))(vn||{});const vV={title:m.arrayOf(m.string).def([]),extCls:m.string.def(""),searchPlaceholder:m.string.def(""),settingKey:m.string.def("id"),displayKey:m.string.def("value"),sortKey:m.string.def("value"),showOverflowTips:m.bool.def(!1),searchable:m.bool.def(!1),sortable:m.bool.def(!1),sourceList:m.arrayOf(m.any).def([]),targetList:m.arrayOf(m.any).def([]),emptyContent:m.arrayOf(m.string).def([]),multiple:m.bool.def(!1)};function yV(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}function bV(e,t,n){const r=a.ref([]),s=a.ref([]),i=(o=!1)=>{o&&(r.value=[],s.value=[]),e.value.forEach(l=>{const c=l[n.value];t.value.includes(c)?s.value.push(l):r.value.push(l)})};return i(),a.watch(()=>[e,t,n],()=>{i(!0)},{deep:!0}),{selectList:r,selectedList:s}}function wV(e,t){const n=a.ref(""),r=a.computed(()=>e.value.filter(s=>{const i=s[t.value];return i instanceof Object?!1:i.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:r}}const CV=a.defineComponent({name:"Transfer",props:vV,emits:["change","update:targetList"],setup(e,{emit:t}){const n=Be("transfer"),r=a.ref({source:!1,target:!1}),s=a.ref({source:[],target:[]}),i=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(_=>_.toString().includes("[object Object]"))?vn.OBJECT_ARRAY:vn.BASE_ARRAY:vn.NOT_ARRAY),o=a.computed(()=>i.value===vn.BASE_ARRAY?"value":e.settingKey),l=a.computed(()=>i.value===vn.BASE_ARRAY?"value":e.displayKey),c=a.computed(()=>e.sortKey||l.value),d=a.computed(()=>{switch(i.value){case vn.BASE_ARRAY:return[...new Set(e.sourceList)].map(V=>({value:V}));case vn.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:f}=a.toRefs(e),{selectList:u,selectedList:h}=bV(d,f,o),{selectSearchQuery:p,selectListSearch:g}=wV(u,l),v=a.computed(()=>[...g.value].sort((V,_)=>{const L=V[c.value],I=_[c.value];return L>I?1:-1})),b=a.computed(()=>[...h.value].sort((V,_)=>{const L=V[c.value],I=_[c.value];return L>I?1:-1}));a.watch(()=>[u,h],()=>{e.multiple||S()},{deep:!0});const y=(V,_)=>{const L=o.value;return V.some(I=>I[L]===_[L])&&_.disabled},N=()=>{u.value=[...d.value.filter(V=>y(u.value,V))],h.value=[...d.value.filter(V=>!y(u.value,V))],S()},w=()=>{u.value=[...d.value.filter(V=>!y(h.value,V))],h.value=[...d.value.filter(V=>y(h.value,V))],S()},C=(V,_)=>{if(V.disabled)return;const L=V[o.value],I=_?u:h,R=_?h:u,M=I.value.findIndex(j=>j[o.value]===L);R.value.push(...I.value.splice(M,1)),S()},S=()=>{const V=u.value.map(L=>L[o.value]),_=h.value.map(L=>L[o.value]);t("update:targetList",_),t("change",i.value===vn.BASE_ARRAY?V:u.value.map(L=>a.toRaw(L)),i.value===vn.BASE_ARRAY?_:h.value.map(L=>a.toRaw(L)),_)},x=V=>{const _=V==="source"?u:h;r.value[V]=s.value[V].length===_.value.length},E=(V,_)=>{const L=_==="source"?u:h;s.value[_]=V?L.value.map(I=>I[o.value]):[]},T=V=>{const _=V==="left",L=_?u:h,I=_?h:u,R=s.value[_?"source":"target"],M=L.value.filter(j=>R.includes(j[o.value]));L.value=L.value.filter(j=>!R.includes(j[o.value])),I.value.push(...M),s.value[_?"source":"target"]=[],S()},{resolveClassName:O}=he();return{selectSearchQuery:p,selectListSearch:g,selectedList:h,selectListSort:v,selectedListSort:b,settingCode:o,displayCode:l,allToRight:N,allToLeft:w,handleItemClick:C,t:n,handleAllChecked:E,multipleSelectAllValue:r,multipleSelectList:s,handleMultipleChange:T,handleItemChecked:x,resolveClassName:O}},render(){const{multiple:e}=this.$props,t=this.sortable?this.selectListSort:this.selectListSearch,n=this.sortable?this.selectedListSort:this.selectedList,r=l=>{const c=l==="left-header",d=c?"source":"target",f=c?`${this.title[0]??this.t.sourceList}`:`${this.title[1]??this.t.targetList}`,u=c?!t.length:!n.length,h=!!this.multipleSelectList[d].length&&!this.multipleSelectAllValue[d],p=this.multipleSelectList[d].length,g=()=>{u||(c?this.allToRight():this.allToLeft())};return this.$slots[l]?a.createVNode("div",{class:"slot-header"},[this.$slots[l]()]):a.createVNode("div",{class:"header"},[this.multiple?a.createVNode(Ct,{class:"header-checkbox",modelValue:this.multipleSelectAllValue[d],"onUpdate:modelValue":v=>this.multipleSelectAllValue[d]=v,indeterminate:h,label:f,onChange:v=>this.handleAllChecked(v,d)},null):a.createVNode(a.Fragment,null,[`${f}(${c?t.length:n.length})`]),this.multiple?a.createVNode("div",{class:"select-total-count"},[a.createVNode("span",{class:"select-count"},[p]),a.createVNode("span",{class:"count-delimiter"},[a.createTextVNode("/")]),a.createVNode("span",{class:"total-count"},[c?t.length:n.length])]):a.createVNode("span",{class:{"select-all":!0,disabled:u},onClick:()=>g()},[c?this.t.selectAll:this.t.removeAll])])},s=l=>{const c=l==="left-empty-content",d=(c?this.emptyContent[0]:this.emptyContent[1])??(c?this.t.noData:this.t.noSelected);return this.$slots[l]?a.createVNode("div",null,[this.$slots[l]()]):a.createVNode("div",{class:"empty"},[d])},i=(l,c=!0)=>a.createVNode("div",{class:["item-content",{"is-disabled":l.disabled}]},[a.createVNode("span",{class:"content-text",title:l[this.displayCode]},[l[this.displayCode]]),!e&&a.createVNode("span",{class:"icon-wrapper"},[c?a.createVNode(ko,{class:this.resolveClassName("icon")},null):a.createVNode(wt,{class:[this.resolveClassName("icon"),this.resolveClassName("icon-delete")]},null)])]),o=l=>{let c;const d=l==="left",f=l==="left"?"source":"target",u=d?t:n,h=d?"source-option":"target-option",p=d?"left-empty-content":"right-empty-content",g=e?a.createVNode(il,{class:"content is-flex",modelValue:this.multipleSelectList[f],"onUpdate:modelValue":v=>this.multipleSelectList[f]=v,onChange:()=>this.handleItemChecked(f)},yV(c=u.map(v=>a.createVNode("div",null,[a.createVNode(Ct,{class:"checkbox-item",label:v[this.settingCode]},{default:()=>{var b,y;return[((y=(b=this.$slots)[h])==null?void 0:y.call(b,v))??i(v,d)]}})])))?c:{default:()=>[c]}):a.createVNode("ul",{class:["content",this.searchable&&d?"is-search":""]},[u.map(v=>{var b,y;return a.createVNode("li",{key:v[this.settingCode],class:[this.$slots[h]?"custom-item":""],onClick:()=>this.handleItemClick(v,d)},[((y=(b=this.$slots)[h])==null?void 0:y.call(b,v))??i(v,d)])})]);return u.length?g:s(p)};return a.createVNode("div",{class:[`${this.resolveClassName("transfer")}`,this.extCls]},[a.createVNode("div",{class:"source-list"},[r("left-header"),this.searchable&&a.createVNode(hr,{class:"transfer-search-input",modelValue:this.selectSearchQuery,"onUpdate:modelValue":l=>this.selectSearchQuery=l,clearable:!0,placeholder:this.searchPlaceholder||this.t.search},{prefix:()=>a.createVNode(jr,{class:this.resolveClassName("icon-search")},null)}),o("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($t,null,null)]),a.createVNode("div",{class:["transfer-button",{disabled:!this.multipleSelectList.target.length}],onClick:()=>this.handleMultipleChange("right")},[a.createVNode(an,null,null)])]):a.createVNode(Qo,{class:this.resolveClassName("transfer-icon")},null),a.createVNode("div",{class:"target-list"},[r("right-header"),o("right")])])}}),N4=Ie(CV);var Ot=(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_SORT="nodeDragSort",e.NODE_DRAG_START="nodeDragStart",e.NODE_DROP="nodeDrop",e.NODE_ENTER_VIEW="nodeEnterView",e.NODE_EXPAND="nodeExpand",e.NODE_SELECTED="nodeSelected",e))(Ot||{});const Zt=(...e)=>!0,NV={nodeClick:Zt,nodeCollapse:Zt,nodeExpand:Zt,nodeChecked:Zt,nodeDragStart:Zt,nodeDragOver:Zt,nodeDragLeave:Zt,nodeDragSort:Zt,nodeDrop:Zt,nodeEnterView:Zt,nodeSelected:Zt};var me=(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))(me||{});const ir={__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 x4=(e=>(e.CLICK="click",e.COLLAPSE="collapse",e.EXPAND="expand",e.SELECTED="selected",e))(x4||{});const xV={data:m.arrayOf(m.any).def([]),label:m.oneOfType([m.func.def(void 0),m.string.def("label")]),nodeKey:m.string.def(void 0),children:m.string.def("children"),indent:m.number.def(16),lineHeight:m.number.def(32),height:m.number,levelLine:m.oneOfType([m.bool.def(!1),m.func.def(void 0),m.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:m.bool.def(!1),prefixIcon:m.oneOfType([m.func.def(()=>{}),m.bool.def(!1)]).def(!0),async:m.shape({callback:m.func.def(void 0),cache:m.bool.def(!0),deepAutoOpen:xe("columnType",{}).def("once"),trigger:m.arrayOf(m.oneOf(["expand","click","checked"])).def(null)}),offsetLeft:m.number.def(5),search:m.oneOfType([m.shape({value:m.oneOfType([m.number,m.string,m.bool]).def(""),match:m.oneOfType([bt(),m.func]).def("fuzzy"),resultType:bt().def("tree"),showChildNodes:m.bool.def(!1)}),m.string,m.number,m.bool]).def(void 0),emptyText:m.string.def("没有数据"),draggable:m.bool.def(!1),disableDrag:m.func,disableDrop:m.func,dragThreshold:m.number.def(.2),dragSort:m.bool.def(!1),dragSortMode:m.oneOf(["any","next"]).def("any"),selectable:m.oneOfType([m.bool,m.func]).def(!0),disabledFolderSelectable:m.bool.def(!1),showCheckbox:m.oneOfType([m.bool,m.func]).def(!1),checked:m.arrayOf(m.any).def([]),showNodeTypeIcon:m.bool.def(!0),selected:m.oneOfType([m.string,m.number,m.object]),autoCheckChildren:m.oneOfType([m.bool,m.func]).def(!0),autoOpenParentNode:m.bool.def(!0),expandAll:m.bool.def(!1),nodeContentAction:m.oneOfType([m.arrayOf(xe("nodeContentActionType",{}).def(x4.CLICK)),m.func.def(()=>["selected"])]).def(["selected","expand","click"]),keepSlotData:m.bool.def(!1),checkStrictly:m.bool.def(!0),intersectionObserver:m.oneOfType([m.bool.def(!1),m.shape({enabled:m.bool.def(!1),callback:m.func.def(void 0)})]).def(!1)},SV=e=>({renderEmpty:t=>a.createVNode(ml,{scene:"part",type:t},{default:()=>[e.emptyText]})}),TV=e=>{const t={enabled:e.intersectionObserver,once:!1,callback:null};let n=null,r=[],s=null;const i=()=>typeof e.intersectionObserver=="boolean"?t:typeof e.intersectionObserver=="object"?Object.assign({},t,e.intersectionObserver):t,o=a.computed(i),l=h=>h instanceof NodeList?Array.from(h):Array.isArray(h)?h:[h];return{unobserveAll:()=>{r==null||r.forEach(h=>{ra(h)&&(n==null||n.unobserve(h))}),n==null||n.disconnect(),s==null||s.disconnect()},intersectionObserver:o,initIntersectionObserver:(h,p,g)=>{if(o.value.enabled){if(!h){console.error("intersectionObserver.target is undefined");return}r=l(h);const v=Object.assign({rootMargin:"0px"},p);n=new IntersectionObserver(function(b){b.forEach(y=>{var N,w,C;if(console.log("entry",y.target),y.isIntersecting){const S=((N=g==null?void 0:g.beforeResponse)==null?void 0:N.call(g,y))??y;(C=(w=o.value).callback)==null||C.call(w,S),o.value.once&&n.unobserve(y.target)}})},v),r.forEach(b=>{ra(b)&&n.observe(b)})}},initRootMutationObserver:(h,p)=>{if(o.value.enabled&&!e.virtualRender&&ra(h)){const g={attributes:!0,childList:!0,subtree:!0};s=new MutationObserver((...v)=>{p==null||p(...v)}),s.observe(h,g)}},getLastVisibleElement:(h,p)=>{const{offsetHeight:g}=p,v=p.querySelectorAll("[data-tree-node]"),b=g+h;return Array.from(v).filter(N=>N.offsetHeight+N.offsetTop>=b&&N.offsetTop<b)}}},bl=(e,t)=>{const n=A=>e.schema.get(A),r=(A,P)=>{var B;return(B=n(A))==null?void 0:B[P]},s=(A,P,B,z)=>{if(!e.schema.has(A)){console.warn("node is not in schema, please check",z,A);return}e.schema.set(A,Object.assign({},n(A),{[P]:B}))},i=A=>e.data.find(P=>c(P)===A),o=(A,P,B)=>{if(Array.isArray(A)){Array.prototype.forEach.call(A,z=>s(i(z),P,B,A));return}s(i(A),P,B,A)},l=A=>r(A,me.PATH),c=A=>r(A,me.UUID),d=A=>r(A,me.IS_OPEN),f=A=>r(A,me.HAS_CHILD),u=A=>r(A,me.IS_MATCH),h=A=>r(A,me.IS_CHECKED),p=A=>r(r(A,me.PARENT),me.UUID),g=A=>r(A,me.IS_LOADING),v=A=>r(A,me.PARENT),b=A=>r(A,me.IS_MATCH),y=(A,P)=>{const B=e.data.find(z=>c(z)===A);return r(B,P)},N=A=>typeof A=="string"?y(A,me.IS_ROOT):r(A,me.IS_ROOT),w=A=>{const P=e.data.find(B=>c(B)===A);return p(P)},C=A=>{const P=e.data.find(B=>c(B)===A);return l(P)},S=(A,P)=>{s(A,me.IS_LOADING,P)},x=A=>typeof A=="object"?d(A):typeof A=="string"?y(A,me.IS_OPEN):!1,E=(A,P)=>r(r(A,me.PARENT),P),T=A=>x(r(A,me.PARENT)),O=A=>N(A)||x(A)||T(A),V=(A,P)=>{const z=A.split("-").reduce((D,k)=>{const G=Number(k);return Array.isArray(D)?D[G]:D[t.children][G]},t.data);return P&&Object.assign(z,{[me.UUID]:P}),z},_=A=>A[t.children]??[],L=A=>e.data.find(P=>c(P)===A),I=A=>{let P=A;return typeof P=="string"&&(P=L(P)),N(P)?{[t.children]:t.data}:v(P)},R=A=>({[ir[me.IS_LOADING]]:r(A,me.IS_LOADING),[ir[me.HAS_CHILD]]:f(A),[ir[me.IS_MATCH]]:u(A),[ir[me.IS_CHECKED]]:h(A),[ir[me.IS_OPEN]]:d(A),[ir[me.IS_ROOT]]:N(A),fullPath:r(A,me.PATH),uuid:c(A),parent:r(A,me.PARENT),parentId:c(r(A,me.PARENT))});return{getSchemaVal:n,getNodeAttr:r,getNodeId:c,getNodeById:i,getNodeParentId:p,getParentNodeData:I,getNodePathById:C,getNodeAttrById:y,getNodeParentIdById:w,getParentNodeAttr:E,getParentNode:v,setNodeAttr:s,setNodeAttrById:o,getNodePath:l,isRootNode:N,isNodeOpened:d,hasChildNode:f,isItemOpen:x,isNodeChecked:h,isNodeMatched:u,isNodeLoading:g,checkNodeIsOpen:O,getSourceNodeByPath:V,getSourceNodeByUID:L,isMatchedNode:b,resolveScopedSlotParam:R,setTreeNodeLoading:S,extendNodeAttr:A=>Object.assign({},A,{[me.TREE_NODE_ATTR]:R(A)}),getChildNodes:_,extendNodeScopedData:A=>({data:A,attributes:R(A)}),getIntersectionResponse:A=>{var G;if(!A)return null;let P=A;ra(A)&&(P=i(A.getAttribute("data-tree-node")));const B=r(P,me.DEPTH),z=r(P,me.IS_ROOT),D=r(P,me.PARENT),k=z?r(P,me.INDEX):(G=D==null?void 0:D[t.children])==null?void 0:G.findIndex(U=>U===P);return{level:B,target:A,index:k,parent:D,node:P,isRoot:z}}}},S4="1px dashed #c3cdd7",T4=(e,t,n=null,r=null,s=null,i=[])=>{const o=e[t];return typeof o=="boolean"?o?r:s:_4(n,e,t,i)},_4=(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 i=s.apply(void 0,[e,...r]);if(typeof i=="string")return i;console.error("props label with function return value is not string, please check and return string");return}},E4=(e,t)=>_4(e,t,"label"),_V=(e,t)=>({"--level-line":T4(t,"levelLine",e,S4,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),EV=(e,t,n,r=!0)=>{var o;const{schema:s}=n,i=(o=s.get(e))==null?void 0:o[me.DEPTH];if(r){const l=["node"],c=()=>T4(t,"levelLine",e,S4,null,l);return{"--depth":i,...typeof t.levelLine=="function"?{"--level-line":c()}:{}}}return{}},OV=(e,t,n,r=!0)=>{const{__is_root:s,__is_open:i}=t.get(e)||{},{resolveClassName:o}=he();return{"is-root":s,[`${o("tree-node")}`]:!0,"is-open":i,"is-virtual-render":n.virtualRender,"level-line":n.levelLine&&r}},AV=(e,t)=>{const{__is_checked:n,__is_selected:r}=t.get(e)||{},{resolveClassName:s}=he();return{"is-checked":n,"is-selected":r,"node-folder":e.is_folder,"node-leaf":e.is_leaf,[`${s("node-row")}`]:!0}},LV=(e,t,n,r,s)=>{VV(e,t,n,{[r]:s})},VV=(e,t,n,r)=>{const i=e.split("-").reduce((o,l)=>{const c=Number(l);return Array.isArray(o)?o[c]:o[n][c]},t);Object.assign(i,r||{})},ns=e=>e??{__IS_NULL:!0},$i=(e,t,n)=>Array.isArray(t)?t.some(r=>$i(e,r,n)):typeof t=="string"||typeof t=="number"?t===n:e===t,O4=(e,t)=>typeof e.showCheckbox=="function"?e.showCheckbox(t):e.showCheckbox,A4=(e,t)=>{const{setNodeAttr:n,getNodePath:r,getNodeAttr:s,resolveScopedSlotParam:i,setTreeNodeLoading:o}=bl(t,e),l=(f,u)=>{if(typeof f=="object"&&f!==null){n(u,me.IS_OPEN,!0);const h=Array.isArray(f)?f:[f];return LV(r(u),e.data,e.children,e.children,h),Promise.resolve(f)}return Promise.resolve(f)},c=f=>{const{callback:u=null,cache:h=!0}=e.async||{};if(typeof u=="function"&&s(f,me.IS_ASYNC)){if(n(f,me.IS_ASYNC_INIT,!0),!s(f,me.IS_CACHED)){n(f,me.IS_CACHED,h);const p=i(f),g=u(f,v=>l(v,f),p);if(typeof g=="object"&&g!==null)return o(f,!0),g instanceof Promise?Promise.resolve(g.then(v=>l(v,f)).catch(v=>console.error("load remote data error:",v)).finally(()=>{o(f,!1),n(f,me.IS_CACHED,!0)})):(l(g,f),o(f,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},d=()=>{const f=t.data.filter(u=>s(u,me.IS_ASYNC)&&u[ir[me.IS_OPEN]]&&!s(u,me.IS_ASYNC_INIT));f.length&&Promise.all(f.map(u=>c(u))).then(()=>{d()}).catch(u=>{console.warn(u)})};return{asyncNodeClick:c,deepAutoOpen:d}},DV=(e,t,n,r,s)=>{let i=e.selected;const{setNodeAttr:o,setNodeAttrById:l,getNodePath:c,getSchemaVal:d,getNodeAttr:f,getNodeId:u,getChildNodes:h,isRootNode:p,hasChildNode:g,isItemOpen:v,isNodeOpened:b,isNodeLoading:y,isNodeChecked:N,getParentNode:w,resolveScopedSlotParam:C,extendNodeAttr:S,extendNodeScopedData:x}=bl(n,e),{resolveClassName:E}=he(),{registerNextLoop:T}=s,{asyncNodeClick:O,deepAutoOpen:V}=A4(e,n),_=Z=>v(Z)?a.createVNode(jo,{class:[E("tree-icon"),E("node-prefix")]},null):a.createVNode(zo,{class:[E("tree-icon"),E("node-prefix")]},null),L=Z=>{if(typeof Z=="string")return Z;if(typeof Z=="object"&&Z!==null){if(a.isVNode(Z))return Z;const{node:ce,className:ie,text:F,style:K}=Z;return a.h(ce,{class:ie,style:K},F)}return null},I=Z=>{var ce,ie;return((ie=(ce=t.slots).nodeLoading)==null?void 0:ie.call(ce,Y(Z)))??y(Z)?a.createVNode(Ea,null,null):""},R=Z=>{if(t.slots.nodeAction)return t.slots.nodeAction(Y(Z));let ce=null;if(y(Z))return I(Z);if(typeof e.prefixIcon=="function"&&(ce=e.prefixIcon(Y(Z),"node_action"),ce!=="default"))return L(ce);if(ce==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon){const ie=typeof e.autoCheckChildren=="function"?e.autoCheckChildren(Z):e.autoCheckChildren;if(g(Z)||Z.async||!ie)return v(Z)?a.createVNode(Ms,{class:E("node-prefix")},null):a.createVNode(Bs,{class:E("node-prefix")},null)}return null},M=Z=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(Y(Z));let ce=null;return typeof e.prefixIcon=="function"&&(ce=e.prefixIcon(Y(Z),"node_type"),ce!=="default")?L(ce):ce==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?p(Z)||g(Z)?_(Z):a.createVNode(Zo,{class:[E("tree-icon"),E("node-prefix")]},null):null},j=(Z,ce)=>{const ie=w(Z);if(ie){const F=ce||(h(ie)||[]).some(K=>N(K));o(ie,me.IS_CHECKED,F),o(ie,me.IS_INDETERMINATE,(h(ie)||[]).some(K=>!N(K)||B(K))),p(ie)||j(ie,ce)}},H=(Z,ce,ie)=>{h(Z).forEach(F=>{Array.isArray(ce)?ce.forEach((K,W)=>{o(F,K,ie[W])}):o(F,ce,ie),H(F,ce,ie)})},A=Z=>{var ce,ie,F;return(ie=(ce=e.async)==null?void 0:ce.trigger)!=null&&ie.length?(F=e.async)==null?void 0:F.trigger.includes(Z):!0},P=(Z,ce,ie)=>{ie==null||ie.preventDefault(),ie==null||ie.stopImmediatePropagation(),ie==null||ie.stopPropagation(),o(Z,me.IS_CHECKED,!!ce),ce&&o(Z,me.IS_INDETERMINATE,!1),e.checkStrictly&&(H(Z,[me.IS_CHECKED,me.IS_INDETERMINATE],[!!ce,!1]),j(Z,ce)),t.emit(Ot.NODE_CHECKED,n.data.filter(F=>N(F)),n.data.filter(F=>B(F))),le(Z,ie,"checked")},B=Z=>N(Z)&&f(Z,me.IS_INDETERMINATE),z=Z=>O4(e,x(Z))?a.createVNode("span",{class:"node-check-box",onClick:oe},[a.createVNode(Ct,{indeterminate:B(Z),modelValue:N(Z),size:"small",onChange:(ce,ie)=>P(Z,!!ce,ie)},null)]):null,D=(Z,ce=null,ie=null,F=!0)=>{const K=ce===null?!v(Z):!!ce;if(K||H(Z,me.IS_OPEN,K),o(Z,me.IS_OPEN,K),F){const W=v(Z)?Ot.NODE_EXPAND:Ot.NODE_COLLAPSE;t.emit(W,Z,C(Z),d(Z),ie)}},k=(Z,ce,ie)=>{if(Array.isArray(Z)){Z.forEach(F=>o(ns(F),ce,ie));return}o(ns(Z),ce,ie)},G=(Z,ce=!0,ie=!1)=>{U(Z,me.IS_OPEN,ce,ie&&ce)},U=(Z,ce,ie,F=!1)=>{const K=ns(Z);if(K[me.IS_NULL])return;const W=Array.isArray(ce)?ce:[ce],q=Array.isArray(ie)?ie:[ie];if(F){if(W.forEach((se,fe)=>k(K,se,q[fe])),!p(K)){const se=w(K);W.forEach((fe,ee)=>{f(se,fe)!==ie&&U(se,fe,q[ee],F)})}}else W.forEach((se,fe)=>k(K,se,q[fe]))},te=(Z,ce,ie)=>{if(v(Z)){D(Z,!1,ce,!0);return}A(ie)&&O(Z).finally(()=>{f(Z,me.IS_LOADING)?T("setNodeOpenedAfterLoading",{type:"once",fn:()=>D(Z,!0,ce,!0)}):D(Z,!0,ce,!0)})},$=(Z,ce)=>{Z.stopImmediatePropagation(),Z.stopPropagation(),Z.preventDefault(),te(ce,Z,"expand")},Q=(Z,ce=!0,ie=!0,F=!1,K="")=>{const W=Array.isArray(Z)?Z:[Z];if(!W.length)return;let q=ns(W[0]);if((typeof q=="string"||typeof q=="number"||typeof q=="symbol")&&(q=n.data.find(se=>u(se)===q)??{[me.IS_NULL]:!0}),!q[me.IS_NULL]){if(!e.selectable||typeof e.selectable=="function"&&!e.selectable(Z)||e.disabledFolderSelectable&&q.is_folder===!0){console.warn("props.selectable is false or undefined, please set selectable with true");return}i!=null&&l(i,me.IS_SELECTED,!ce),e.selected&&e.selected!==i&&l(e.selected,me.IS_SELECTED,!ce),o(q,me.IS_SELECTED,ce),i=u(q),F&&t.emit(Ot.NODE_SELECTED,{selected:ce,node:q}),ie&&W.length===1&&G(q,!0,!0),f(q,me.IS_ASYNC)&&A(K)&&O(q).then(()=>{a.nextTick(()=>{W.shift(),Q(W,ce,ie,F,K)})})}},ne=Z=>typeof e.nodeContentAction=="function"?Reflect.apply(e.nodeContentAction,void 0,[{node:Z}]):typeof e.nodeContentAction=="string"?[e.nodeContentAction]:Array.isArray(e.nodeContentAction)?e.nodeContentAction:["selected","expand","click"],le=(Z,ce,ie)=>{const F=ne(Z);if(F.includes("selected")&&Q(Z,!0,!0,!0,ie),F.includes("expand")&&(b(Z)||te(Z,ce,ie)),F.includes("collapse")&&b(Z)&&te(Z,ce,ie),F.includes("click")){const K=Ot.NODE_CLICK;t.emit(K,Z,C(Z),d(Z),ce)}},ae=(Z,ce)=>{if(p(ce))return!1;const ie=c(ce),F=`${ie}`.split("-").slice(0,Z+1);if(F.join("-")===ie)return!0;const W=F.pop(),q=parseInt(W,10);F.push(`${q+1}`);const se=F.join("-");return n.data.some(fe=>c(fe)===se)},X=Z=>{if(!e.levelLine)return null;const ce=F=>({"--depth":F}),ie=(f(Z,me.DEPTH)??0)+1;return new Array(ie).fill("").map((F,K)=>K).filter(F=>ae(F,Z)).filter(F=>F>0).map(F=>a.createVNode("span",{style:ce(ie-F),class:"node-virtual-line"},null))},J=Z=>{var ce,ie,F,K;return t.slots.node?(ie=(ce=t.slots).node)==null?void 0:ie.call(ce,Y(Z)):t.slots.default?(K=(F=t.slots).default)==null?void 0:K.call(F,x(Z)):[E4(Z,e)]},Y=Z=>e.keepSlotData?x(Z):S(Z),oe=Z=>{Z.stopImmediatePropagation(),Z.stopPropagation()};return{renderTreeNode:(Z,ce=!0)=>{var F,K;const ie=R(Z);return a.createVNode("div",{key:u(Z),class:AV(Z,n.schema),"data-tree-node":u(Z)},[a.createVNode("div",{style:EV(Z,e,n,ce),class:OV(Z,n.schema,e,ce),onClick:W=>le(Z,W,"click")},[a.createVNode("div",{class:[E("node-action"),ie?"":"empty-child"],onClick:W=>$(W,Z)},[ie]),a.createVNode("div",{class:E("node-content")},[[z(Z),M(Z)],a.createVNode("span",{class:E("node-text")},[J(Z)]),(K=(F=t.slots).nodeAppend)==null?void 0:K.call(F,Y(Z))]),ce&&X(Z)])])},handleTreeNodeClick:te,deepAutoOpen:V,asyncNodeClick:O,setNodeAction:k,setNodeOpened:D,setSelect:Q,setOpen:G,setNodeAttribute:U,isIndeterminate:B}},kV=(e,t,n,r)=>{const{getSourceNodeByUID:s,getParentNodeData:i,getNodeParentIdById:o,extendNodeAttr:l,getNodeAttrById:c,isRootNode:d,setNodeAttrById:f}=bl(r,e),{resolveClassName:u}=he(),h=a.computed(()=>typeof e.disableDrag=="function"),p=a.computed(()=>typeof e.disableDrop=="function"),g=e.dragThreshold||.2;let v="",b=null,y=new WeakMap;const N=A=>A.target.closest("[data-tree-node]"),w=A=>{var B;const P=(B=A==null?void 0:A.dataset)==null?void 0:B.treeNode;return s(P)},C=(A,P,B)=>{B.forEach(z=>A.classList.remove(z)),P.forEach(z=>A.classList.add(z))},S=A=>{N(A).removeEventListener("mouseup",S)},x=A=>{const P=N(A),B=w(P);if(B.draggable===!1||h.value&&e.disableDrag(B)){P.classList.add(`${u("tree-drag-disabled")}`);return}P.setAttribute("draggable","true"),P.addEventListener("mouseup",S)},E="drop-before",T="drop-after",O="drop-inner";let V=null;const _=Fr(A=>{if(A.preventDefault(),!b)return;const P=N(A);V!==P&&(V==null||V.classList.remove(E,T,O),V=P);const B=l(w(P));y.has(P)||y.set(P,P.getBoundingClientRect());const z=A.clientY,{top:D,height:k}=y.get(P),G=k*g,U=z-D;if(U<G?C(P,[E],[T,O]):U>k-G?C(P,[T],[E,O]):C(P,[O],[E,T]),t.emit(Ot.NODE_DRAG_OVER,A,P,B),p.value&&(e!=null&&e.disableDrop(B))){A.dataTransfer.effectAllowed="move",A.dataTransfer.dropEffect="none",P.classList.add(`${u("tree-drop-disabled")}`);return}P.classList.add(`${u("tree-drop-active")}`);let te=A.dataTransfer.getData("node-id");te=v;const $=P.getAttribute("data-tree-node"),Q=R(te,$)?"move":"none";A.dataTransfer.effectAllowed=Q,A.dataTransfer.dropEffect=Q}),L=A=>{A.dataTransfer.effectAllowed="move",A.dataTransfer.dropEffect="move";const P=N(A);A.dataTransfer.setData("text/plain","");const B=P.getAttribute("data-tree-node");v=B,b=P,A.dataTransfer.setData("node-id",B),t.emit(Ot.NODE_DRAG_START,A,P)},I=A=>{A.preventDefault(),A.stopPropagation();const P=N(A);if(!P)return;P.classList.remove(`${u("tree-drop-active")}`,`${u("tree-drop-disabled")}`);const B=l(w(P));if(p.value&&e.disableDrop(B))return;const z=v,D=P.getAttribute("data-tree-node");z!==D&&(V!=null&&V.classList.contains(O)?Reflect.apply(j,void 0,[z,D]):(V!=null&&V.classList.contains(T)||V!=null&&V.classList.contains(E))&&Reflect.apply(M,void 0,[z,D]),t.emit(Ot.NODE_DROP,A,P,B)),y=new WeakMap,V==null||V.classList.remove(T,E,O),V=null},R=(A,P)=>A!==P,M=(A,P)=>{if(!e.dragSort||!R(A,P))return;const B=s(A),z=s(P);if(!B||!z)return;const D=i(A),k=i(P);if(!D||!k||e.dragSortMode==="next"&&D!==k)return;const G=e.children,U=D[G],te=k[G];if(!Array.isArray(U))return;let $=U.findIndex(ne=>ne===B),Q=te.findIndex(ne=>ne===z);$===-1||Q===-1||(U.splice($,1),V!=null&&V.classList.contains(T)?($<Q&&(Q=Q-1),Q=Q+1):V!=null&&V.classList.contains(E),te.splice(Q,0,B),te.forEach((ne,le)=>{const ae=c(ne[me.UUID],me.UUID)||ne[me.UUID];ae&&f(ae,me.INDEX,le)}),U.forEach((ne,le)=>{const ae=c(ne[me.UUID],me.UUID)||ne[me.UUID];ae&&f(ae,me.INDEX,le)}),t.emit(Ot.NODE_DRAG_SORT,{sourceNode:B,targetNode:z,sourceIndex:$,targetIndex:Q,targetSlibings:te}))},j=(A,P)=>{const B=s(A),z=s(P);let D=null;if(d(A))D=e.data;else{const k=o(A);if(k!=null){D=s(k);const G=c(A,me.INDEX);D==null||D[e.children].splice(G,1)}}z[e.children]||(z[e.children]=[]),z[e.children].unshift(B)},H=A=>{A.preventDefault();const P=N(A);y.has(P)&&y.delete(P),P.classList.remove(`${u("tree-drop-active")}`,`${u("tree-drop-disabled")}`),P.classList.remove(T,E,O),t.emit(Ot.NODE_DRAG_LEAVE,A,P)};a.onMounted(()=>{if((e.draggable||e.dragSort)&&n.value){const A=n.value.$el;A.addEventListener("mousedown",x),A.addEventListener("dragstart",L),A.addEventListener("dragover",_),A.addEventListener("dragleave",H),A.addEventListener("drop",I)}}),a.onUnmounted(()=>{if((e.draggable||e.dragSort)&&n.value){const A=n.value.$el;A.removeEventListener("mousedown",x),A.removeEventListener("dragstart",L),A.removeEventListener("dragover",_),A.removeEventListener("dragleave",H),A.removeEventListener("drop",I)}})},RV=e=>{const t=a.toRef(e,"search"),{resultType:n="tree",showChildNodes:r=!0}=e.search??{},s=h=>["string","number","boolean"].includes(typeof h),i=(h,p)=>h===p,o=(h,p)=>new RegExp(`${h}`,"i").test(`${p}`),l=(h,p)=>Reflect.apply(h,void 0,p),c=t.value===void 0||t.value===!1,d=(h,p)=>{if(c)return!0;if(s(t.value))return`${t.value}`.length===0?!1:l(o,[t.value,h,p]);const{value:g="",match:v="fuzzy"}=t.value,y=typeof v=="function"?v:v==="fuzzy"?o:i;return`${g}`.length===0?!1:l(y,[g,h,p])},f=a.computed(()=>{if(t.value===!1)return!1;if(s(t.value))return`${t.value}`.length>0;const{value:h=""}=t.value;return`${h}`.length>0}),u=a.computed(()=>n==="tree");return{searchFn:d,refSearch:t,isSearchActive:f,isSearchDisabled:c,resultType:n,isTreeUI:u,showChildNodes:r}},IV=e=>{var v;const t=(b=void 0,y=null)=>{const{data:N,children:w}=e,C=[],S=[];let x=0;const E=new WeakMap;function T(A,P,B,z){if(A!=null&&E.has(A)){const D=E.get(A);if(Object.prototype.hasOwnProperty.call(D,P)&&typeof z=="function"&&Reflect.apply(z,self,[D,P,B,A])){if(D[P]===B)return;Object.assign(D,{[P]:B}),T(D[me.PARENT],P,B,z)}}}function O(A){let P=null;return typeof e.nodeKey=="string"&&(P=A[e.nodeKey]||rn()),P||A[me.UUID]||rn()}const V={[me.IS_OPEN]:()=>!!e.expandAll,[me.IS_CHECKED]:()=>!1,[me.IS_MATCH]:()=>!1,[me.IS_SELECTED]:(A,P)=>$i(A,e.selected,P),[me.IS_CACHED]:()=>!1,[me.IS_ASYNC]:()=>null,[me.IS_LOADING]:()=>!1};function _(A,P,B,z=void 0){let D=z;z===void 0&&typeof V[B]=="function"&&(D=V[B](P,A));const k=ir[B];if(Object.prototype.hasOwnProperty.call(P,k))return P[k];const G=(y==null?void 0:y.get(P))??void 0;let U;return G&&(U=G[B]),U==null&&(U=D),U}function L(A,P){if(!e.selectable)return!1;const B=$i(P,e.selected,A);return _(A,P,me.IS_SELECTED,B)}function I(A,P,B){var k;const z=_(A,P,me.IS_OPEN),D=E.has(B)?(k=E.get(B))==null?void 0:k[me.IS_OPEN]:!0;return z&&D}function R(A,P,B){if(!O4(e,{data:A,attributes:B}))return!1;const D=$i(A,e.checked,P);return _(P,A,me.IS_CHECKED,D)}function M(A){return!((A==null?void 0:A[me.IS_OPEN])??!1)}function j(A,P,B,z){return A[me.IS_INDETERMINATE]=(z[e.children]||[]).some(D=>{var k;return!(((k=E.get(D))==null?void 0:k[me.IS_CHECKED])??!1)}),!0}function H(A,P=0,B=null,z=null){const D=A.length;for(let k=0;k<D;k++){const G=A[k];if(Array.isArray(G))H(G,P,B,z);else if(typeof G=="object"&&G!==null){const U=z!==null?`${z}-${k}`:`${k}`,te=`${O(G)}`,$=!!(G[w]||[]).length;let Q=_(te,G,me.IS_OPEN);e.autoOpenParentNode?Q&&T(B,me.IS_OPEN,!0,M):Q=I(te,G,B);const ne={[me.DEPTH]:P,[me.INDEX]:k,[me.UUID]:te,[me.PARENT]:B,[me.HAS_CHILD]:$,[me.PATH]:U,[me.IS_ROOT]:B===null,[me.ORDER]:x,[me.IS_SELECTED]:L(te,G),[me.IS_MATCH]:_(te,G,me.IS_MATCH),[me.IS_OPEN]:Q,[me.IS_CHECKED]:void 0,[me.IS_CACHED]:_(te,G,me.IS_CACHED),[me.IS_ASYNC]:_(te,G,me.IS_ASYNC),[me.IS_LOADING]:_(te,G,me.IS_LOADING),[me.IS_INDETERMINATE]:!1};ne[me.IS_CHECKED]=R(G,te,ne),ne[me.IS_CHECKED]&&C.push(G),E.set(G,ne),S.push(G),x+=1,Object.prototype.hasOwnProperty.call(G,w)&&H(G[w]||[],P+1,G,U)}}}return H(b??N),e.showCheckbox!==!1&&e.checkStrictly&&(C==null||C.forEach(A=>{T(A,me.IS_CHECKED,!0,j)})),[S,E]},n=t(),r=new Map,s=[],i=[],o=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),{asyncNodeClick:l,deepAutoOpen:c}=A4(e,o),d=b=>{s.push(b)},f=(b,y,N=!0)=>{N&&r.has(b)&&r.delete(b),r.set(b,y)},u=b=>typeof b=="function"?{type:"loop",fn:b}:typeof b=="object"&&typeof b.type=="string"&&typeof b.fn=="function"?b:(console.error("loop event error",b),null),h=b=>{const y=u(b);return y!==null&&Reflect.apply(y.fn,void 0,[]),(y==null?void 0:y.type)??"once"},p=()=>{Array.from(r.keys()).forEach(b=>{const y=r.get(b);if(Array.isArray(y)){const N=[];y.forEach((w,C)=>{h(w)==="once"&&N.unshift(C)}),N.length&&N.forEach(w=>y.splice(w,1)),y.length===0&&r.delete(b)}else h(y)==="once"&&r.delete(b)})};a.watch(()=>[e.data],b=>{var N,w;const y=t(b[0],o.schema);o.data=y[0],o.schema=y[1],(N=e.async)!=null&&N.callback&&((w=e.async)==null?void 0:w.deepAutoOpen)==="every"&&c(),p()},{deep:!0}),e.selectable&&a.onMounted(()=>{a.watch(()=>e.selected,b=>{i.length=0,s.forEach(y=>{Reflect.apply(y,void 0,[b]),i.push(()=>Reflect.apply(y,void 0,[b]))}),f("afterSelectWatch",i)},{immediate:!0})});const g=b=>{f("afterDataUpdate",b)};return(v=e.async)!=null&&v.callback&&c(),{flatData:o,asyncNodeClick:l,deepAutoOpen:c,afterDataUpdate:g,registerNextLoop:f,onSelected:d}},PV=a.defineComponent({name:"Tree",props:xV,emits:NV,setup(e,t){const n=a.ref(),{flatData:r,onSelected:s,registerNextLoop:i}=IV(e),{checkNodeIsOpen:o,isRootNode:l,isNodeOpened:c,isNodeChecked:d,isNodeMatched:f,hasChildNode:u,getNodePath:h,getNodeId:p,getNodeAttr:g,getNodeById:v,getParentNode:b,getIntersectionResponse:y}=bl(r,e),{searchFn:N,isSearchActive:w,refSearch:C,isSearchDisabled:S,isTreeUI:x,showChildNodes:E}=RV(e),T=a.reactive([]),O=ae=>{if(w.value){if(E){const J=`${h(ae)??""}-`;return o(ae)&&(f(ae)||T.some(Y=>J.indexOf(`${Y}-`)===0))}return o(ae)&&f(ae)}return o(ae)},V=a.computed(()=>r.data.filter(ae=>O(ae))),{getLastVisibleElement:_,intersectionObserver:L}=TV(e),{renderTreeNode:I,handleTreeNodeClick:R,setOpen:M,setNodeAction:j,setSelect:H,asyncNodeClick:A,setNodeAttribute:P,isIndeterminate:B}=DV(e,t,r,V,{registerNextLoop:i}),z=Es(120,()=>{T.length=0,r.data.forEach(ae=>{const X=N(E4(ae,e),ae);X&&T.push(h(ae)),P(ae,[me.IS_MATCH],[X],x.value&&X)})});S||a.watch([C],()=>{z()},{deep:!0,immediate:!0}),a.onMounted(()=>{e.virtualRender&&a.nextTick(()=>{U()})});const D=(ae,X=!0,J=!1)=>{j(ns(ae),me.IS_CHECKED,X),J&&t.emit(Ot.NODE_CHECKED,r.data.filter(Y=>d(Y)),r.data.filter(Y=>B(Y)))};s(ae=>{H(ae,!0,e.autoOpenParentNode,!0)});const k=()=>r;a.watch(()=>[e.checked],()=>{D(e.checked,!0)});const G=()=>{var ae;(ae=n.value)==null||ae.reset()},U=ae=>{if(ae==null){n.value.fixToTop({index:1});return}if(e.nodeKey&&Object.prototype.hasOwnProperty.call(ae,e.nodeKey)){n.value.fixToTop({index:V.value.findIndex(J=>J[e.nodeKey]===ae[e.nodeKey])+1});return}if(ae.id!==void 0&&ae.id!==null){n.value.fixToTop({index:V.value.findIndex(J=>J[e.nodeKey]===ae.id)+1});return}if(ae.index>=0){n.value.fixToTop({index:ae.index});return}const X=p(ae);if(X){n.value.fixToTop({index:V.value.findIndex(J=>p(J)===X)+1});return}},te=(ae,X=!0,J=!1)=>{D(v(ae),X,J)};t.expose({handleTreeNodeClick:R,isNodeChecked:d,isRootNode:l,isNodeOpened:c,isNodeMatched:f,hasChildNode:u,setOpen:M,setChecked:D,setCheckedById:te,setNodeAction:j,setNodeOpened:M,setSelect:H,scrollToTop:U,asyncNodeClick:A,getData:k,reset:G,getNodeAttr:g,getParentNode:b});const{renderEmpty:$}=SV(e);kV(e,t,n,r);const Q=ae=>{var J,Y;if(ae.length)return ae.map(oe=>I(oe,!w.value||x.value));const X=w.value?"search-empty":"empty";return((Y=(J=t.slots).empty)==null?void 0:Y.call(J))??$(X)},ne=([ae,X,J])=>{var Y,oe,pe,Z;if(L.value.enabled&&ae.offset.y>5){if(!e.virtualRender){const ie=_(ae.offset.y,n.value.refRoot),F=y(ie[0]);(oe=(Y=L.value)==null?void 0:Y.callback)==null||oe.call(Y,F),t.emit(Ot.NODE_ENTER_VIEW,F);return}const ce=y(J.slice(-1)[0]);(Z=(pe=L.value)==null?void 0:pe.callback)==null||Z.call(pe,ce),t.emit(Ot.NODE_ENTER_VIEW,ce);return}},{resolveClassName:le}=he();return()=>a.createVNode(Ws,{ref:n,style:_V(null,e),height:e.height,class:le("tree"),contentClassName:le("container"),enabled:e.virtualRender,keepAlive:!0,lineHeight:e.lineHeight,list:V.value,rowKey:me.UUID,throttleDelay:0,onContentScroll:ne},{default:ae=>Q(ae.data||[])})}}),L4=Ie(PV),Or="upload";var zn=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(zn||{}),Qf=(e=>(e.BINARY="binary",e.FORMDATA="formdata",e))(Qf||{}),Xr=(e=>(e.FAIL="fail",e.NEW="new",e.SUCCESS="success",e.UPLOADING="uploading",e))(Xr||{});const fm=[zn.BUTTON,zn.DRAGGABLE,zn.PICTURE],hm=[Qf.FORMDATA,Qf.BINARY],jt={type:{type:String,default:"formdata",validator:e=>!e||hm.includes(e)?!0:(console.error(`invalid type, ${e}, the type must be one of 【${hm.join(" | ")}】`),!1)},theme:{type:String,default:"draggable",validator:e=>!e||fm.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of 【${fm.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},isShowPreview:{type:Boolean,default:!0}};function mm(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const MV=a.defineComponent({name:"UploadList",props:{theme:jt.theme,disabled:jt.disabled,files:jt.files,multiple:jt.multiple,isShowPreview:jt.isShowPreview},emits:["remove","preview","retry"],setup(e,{slots:t,emit:n}){const r=Be("upload"),{resolveClassName:s}=he(),{theme:i,disabled:o,multiple:l,isShowPreview:c}=a.toRefs(e),d=`${s(Or)}-list`,f=a.computed(()=>i.value===zn.PICTURE),u=a.computed(()=>f.value&&!l.value),h=a.computed(()=>Ae({[d]:!0,[`${d}--${i.value}`]:!0,[`${d}--disabled`]:o.value}));function p(x){const E=["Bytes","KB","MB","GB","TB"],T=Math.floor(Math.log(x)/Math.log(1024));return`${(x/1024**T).toFixed(2)}${E[T]}`}function g(x,E,T){n("preview",x,E,T)}function v(x,E){n("remove",x,E)}function b(x,E){n("retry",x,E)}const y=()=>{let x;return a.createVNode(a.TransitionGroup,{name:`${d}__item`},mm(x=e.files.map(E=>{const T=Ae({[`${d}__item`]:!0,[`${d}__item-picture`]:!0,[`${d}__item--${E.status}`]:!0});return a.createVNode("li",{key:E.uid,class:T},[t!=null&&t.file?t.file({file:E}):N(E)])}))?x:{default:()=>[x]})},N=x=>[a.withDirectives(a.createVNode("img",{class:`${d}__picture-item-thumbnail`,alt:"",src:x.url},null),[[a.vShow,x.status!=="uploading"]]),a.createVNode(a.Fragment,null,[x.status==="uploading"&&a.createVNode(xs,{width:50,class:`${d}__picture-item-progress`,bgColor:"#333",color:"#3a84ff",percent:x.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!o.value&&a.createVNode("div",{class:`${d}__picture-item-actions`},[c.value&&a.createVNode(_a,{class:"action-icon",onClick:E=>g(x,e.files,E)},null),a.createVNode(ya,{class:"action-icon",onClick:E=>v(x,E)},null)])])],w=()=>{let x;return a.createVNode(a.TransitionGroup,{name:`${d}__item`},mm(x=e.files.map(E=>{const T=Ae({[`${d}__item`]:!0,[`${d}__item--${E.status}`]:!0});return a.createVNode("li",{key:E.uid,class:T},[t!=null&&t.file?t.file({file:E}):S(E)])}))?x:{default:()=>[x]})},C=x=>{var L;const E=(L=x==null?void 0:x.raw)==null?void 0:L.type,[T]=(E==null?void 0:E.split("/"))||"";let V={text:ta,image:qo,application:ta,video:nl,audio:Io}[T]||ta;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(E)&&(V=Vo),a.h(V,{class:`${d}__item-file-icon`})},S=x=>[a.createVNode("div",{class:`${d}__item-icon`},[x.isPic?a.createVNode("img",{class:`${d}__item-thumbnail`,alt:"",src:x.url},null):C(x)]),a.createVNode("div",{class:`${d}__item-summary`},[a.createVNode("div",{class:`${d}__item-name`,title:x.name},[x.name]),x.status!=="uploading"&&a.createVNode("div",{class:`${d}__item-message`,title:x.statusText},[x.status==="success"&&a.createVNode(a.Fragment,null,[a.createVNode(zr,{class:`${d}__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(xs,{class:`${d}__item-progress`,percent:x.percentage,showText:!1,size:"small"},null),x.status!=="fail"&&a.createVNode("div",{class:`${d}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${d}__item-speed-size`},[p(x.size)]),[[a.vShow,x.size]]),a.withDirectives(a.createVNode("span",{class:`${d}__item-speed-percentage`},[x.percentage,a.createTextVNode("%")]),[[a.vShow,x.status==="uploading"]])]),!o.value&&a.createVNode("div",{class:`${d}__item-actions`},[x.status==="fail"&&a.createVNode(Yo,{class:`${d}__item-retry-icon`,onClick:E=>b(x,E)},null),a.createVNode(ya,{class:`${d}__item-del-icon`,onClick:E=>v(x,E)},null)])])];return()=>{var x,E,T;return a.createVNode(a.Fragment,null,[u.value?(E=t==null?void 0:t.innerTrigger)==null?void 0:E.call(t,(x=e.files)==null?void 0:x[0]):a.createVNode("ul",{class:h.value},[f.value?y():w(),(T=t==null?void 0:t.innerTrigger)==null?void 0:T.call(t)])])}}}),pm=a.defineComponent({name:"UploadTrigger",props:{theme:jt.theme,disabled:jt.disabled,multiple:jt.multiple,accept:jt.accept,file:{type:Object},selectChange:jt.selectChange,isShowPreview:jt.isShowPreview},emits:["change","remove","preview"],setup(e,{slots:t,emit:n}){const r=Be("upload"),{resolveClassName:s}=he(),{theme:i,disabled:o,file:l,multiple:c,accept:d,isShowPreview:f}=a.toRefs(e),u=`${s(Or)}-trigger`,h=a.computed(()=>i.value===zn.BUTTON),p=a.computed(()=>i.value===zn.DRAGGABLE),g=a.computed(()=>i.value===zn.PICTURE),v=a.computed(()=>g.value&&!c.value),b=a.computed(()=>g.value&&!d.value?"image/png,image/jpeg,image/jpg":d.value),y=a.ref(null),N=a.computed(()=>{var j;return Ae({[u]:!0,[`${u}--${i.value}`]:!0,[`${u}--single-picture`]:v.value,[`${u}--has-file`]:l.value??!1,[`${u}--${(j=l.value)==null?void 0:j.status}`]:l.value??!1,[`${u}--dragover`]:O.value,[`${u}--disabled`]:o.value})}),w=()=>{y.value.value=null,y.value.click()},C=j=>{var A;if(e.selectChange&&((A=e.selectChange)==null?void 0:A.call(e,j))===!1)return!1;const{files:H}=j.target;n("change",Array.from(H))},S=()=>{e.disabled||w()},x=j=>{j.defaultPrevented||j.target!==j.currentTarget||((j.code==="Enter"||j.code==="Space")&&w(),j.preventDefault())};function E(j,H){n("remove",j,H),H.stopPropagation(),H.preventDefault()}function T(j,H){n("preview",j,[j],H),H.stopPropagation(),H.preventDefault()}const O=a.ref(!1),V=()=>{const j=B=>{var D;if(o.value)return;if(B.preventDefault(),O.value=!1,e.selectChange&&((D=e.selectChange)==null?void 0:D.call(e,B))===!1)return!1;const z=Array.from(B.dataTransfer.files);n("change",z)},H=B=>{B.preventDefault(),O.value=!0},A=()=>{O.value=!1},P=Ae({[`${u}__draggable`]:!0});return a.createVNode("div",{class:P,onDragleave:A,onDragover:H,onDrop:j},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(gs,{class:`${u}__draggable-icon`},null),a.createVNode("div",{class:`${u}__draggable-text`},[r.value.drapFileOr,a.createVNode("span",{class:`${u}__draggable-upload-link`},[r.value.clickUpload])])])])},_=()=>a.createVNode(a.Fragment,null,[v.value&&e.file?I(e.file):L()]),L=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${u}__picture-inner`},[a.createVNode(Hs,{class:`${u}__picture-icon`},null),a.createVNode("div",{class:`${u}__picture-text`},[r.value.clickUpload])])]),I=j=>[a.withDirectives(a.createVNode("img",{class:`${u}__picture-thumbnail`,alt:"",src:j.url},null),[[a.vShow,j.status!=="uploading"]]),a.createVNode(a.Fragment,null,[j.status==="uploading"&&a.createVNode(xs,{width:50,class:`${u}__picture-progress`,bgColor:"#333",color:"#3a84ff",percent:j.percentage,titleStyle:{color:"#fff"},type:"circle"},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${u}__picture-actions`},[f.value&&a.createVNode(_a,{class:"action-icon",onClick:H=>T(j,H)},null),a.createVNode(ya,{class:"action-icon",onClick:H=>E(j,H)},null)])])],R=()=>a.createVNode(it,{disabled:o.value},{default:()=>[a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(gs,{class:`${u}__button-icon`},null),a.createVNode("span",{class:`${u}__button-text`},[r.value.uploadLabel])])])]}),M=()=>{if(h.value)return R();if(p.value)return V();if(g.value)return _()};return()=>{var j;return a.createVNode("div",{class:N.value,tabindex:"0",onClick:S,onKeydown:x},[t.trigger?[t.trigger(),(j=t==null?void 0:t.default)==null?void 0:j.call(t)]:M(),a.createVNode("input",{ref:y,class:`${u}__input-file`,accept:b.value,disabled:o.value,multiple:c.value,tabindex:"-1",type:"file",onChange:C},null)])}}});var bf={exports:{}},gm;function $V(){return gm||(gm=1,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(y,N){var w=y[0],C=y[1],S=y[2],x=y[3];w+=(C&S|~C&x)+N[0]-680876936|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[1]-389564586|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[2]+606105819|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[3]-1044525330|0,C=(C<<22|C>>>10)+S|0,w+=(C&S|~C&x)+N[4]-176418897|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[5]+1200080426|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[6]-1473231341|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[7]-45705983|0,C=(C<<22|C>>>10)+S|0,w+=(C&S|~C&x)+N[8]+1770035416|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[9]-1958414417|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[10]-42063|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[11]-1990404162|0,C=(C<<22|C>>>10)+S|0,w+=(C&S|~C&x)+N[12]+1804603682|0,w=(w<<7|w>>>25)+C|0,x+=(w&C|~w&S)+N[13]-40341101|0,x=(x<<12|x>>>20)+w|0,S+=(x&w|~x&C)+N[14]-1502002290|0,S=(S<<17|S>>>15)+x|0,C+=(S&x|~S&w)+N[15]+1236535329|0,C=(C<<22|C>>>10)+S|0,w+=(C&x|S&~x)+N[1]-165796510|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[6]-1069501632|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[11]+643717713|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[0]-373897302|0,C=(C<<20|C>>>12)+S|0,w+=(C&x|S&~x)+N[5]-701558691|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[10]+38016083|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[15]-660478335|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[4]-405537848|0,C=(C<<20|C>>>12)+S|0,w+=(C&x|S&~x)+N[9]+568446438|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[14]-1019803690|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[3]-187363961|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[8]+1163531501|0,C=(C<<20|C>>>12)+S|0,w+=(C&x|S&~x)+N[13]-1444681467|0,w=(w<<5|w>>>27)+C|0,x+=(w&S|C&~S)+N[2]-51403784|0,x=(x<<9|x>>>23)+w|0,S+=(x&C|w&~C)+N[7]+1735328473|0,S=(S<<14|S>>>18)+x|0,C+=(S&w|x&~w)+N[12]-1926607734|0,C=(C<<20|C>>>12)+S|0,w+=(C^S^x)+N[5]-378558|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[8]-2022574463|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[11]+1839030562|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[14]-35309556|0,C=(C<<23|C>>>9)+S|0,w+=(C^S^x)+N[1]-1530992060|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[4]+1272893353|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[7]-155497632|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[10]-1094730640|0,C=(C<<23|C>>>9)+S|0,w+=(C^S^x)+N[13]+681279174|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[0]-358537222|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[3]-722521979|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[6]+76029189|0,C=(C<<23|C>>>9)+S|0,w+=(C^S^x)+N[9]-640364487|0,w=(w<<4|w>>>28)+C|0,x+=(w^C^S)+N[12]-421815835|0,x=(x<<11|x>>>21)+w|0,S+=(x^w^C)+N[15]+530742520|0,S=(S<<16|S>>>16)+x|0,C+=(S^x^w)+N[2]-995338651|0,C=(C<<23|C>>>9)+S|0,w+=(S^(C|~x))+N[0]-198630844|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[7]+1126891415|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[14]-1416354905|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[5]-57434055|0,C=(C<<21|C>>>11)+S|0,w+=(S^(C|~x))+N[12]+1700485571|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[3]-1894986606|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[10]-1051523|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[1]-2054922799|0,C=(C<<21|C>>>11)+S|0,w+=(S^(C|~x))+N[8]+1873313359|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[15]-30611744|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[6]-1560198380|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[13]+1309151649|0,C=(C<<21|C>>>11)+S|0,w+=(S^(C|~x))+N[4]-145523070|0,w=(w<<6|w>>>26)+C|0,x+=(C^(w|~S))+N[11]-1120210379|0,x=(x<<10|x>>>22)+w|0,S+=(w^(x|~C))+N[2]+718787259|0,S=(S<<15|S>>>17)+x|0,C+=(x^(S|~w))+N[9]-343485551|0,C=(C<<21|C>>>11)+S|0,y[0]=w+y[0]|0,y[1]=C+y[1]|0,y[2]=S+y[2]|0,y[3]=x+y[3]|0}function i(y){var N=[],w;for(w=0;w<64;w+=4)N[w>>2]=y.charCodeAt(w)+(y.charCodeAt(w+1)<<8)+(y.charCodeAt(w+2)<<16)+(y.charCodeAt(w+3)<<24);return N}function o(y){var N=[],w;for(w=0;w<64;w+=4)N[w>>2]=y[w]+(y[w+1]<<8)+(y[w+2]<<16)+(y[w+3]<<24);return N}function l(y){var N=y.length,w=[1732584193,-271733879,-1732584194,271733878],C,S,x,E,T,O;for(C=64;C<=N;C+=64)s(w,i(y.substring(C-64,C)));for(y=y.substring(C-64),S=y.length,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C=0;C<S;C+=1)x[C>>2]|=y.charCodeAt(C)<<(C%4<<3);if(x[C>>2]|=128<<(C%4<<3),C>55)for(s(w,x),C=0;C<16;C+=1)x[C]=0;return E=N*8,E=E.toString(16).match(/(.*?)(.{0,8})$/),T=parseInt(E[2],16),O=parseInt(E[1],16)||0,x[14]=T,x[15]=O,s(w,x),w}function c(y){var N=y.length,w=[1732584193,-271733879,-1732584194,271733878],C,S,x,E,T,O;for(C=64;C<=N;C+=64)s(w,o(y.subarray(C-64,C)));for(y=C-64<N?y.subarray(C-64):new Uint8Array(0),S=y.length,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],C=0;C<S;C+=1)x[C>>2]|=y[C]<<(C%4<<3);if(x[C>>2]|=128<<(C%4<<3),C>55)for(s(w,x),C=0;C<16;C+=1)x[C]=0;return E=N*8,E=E.toString(16).match(/(.*?)(.{0,8})$/),T=parseInt(E[2],16),O=parseInt(E[1],16)||0,x[14]=T,x[15]=O,s(w,x),w}function d(y){var N="",w;for(w=0;w<4;w+=1)N+=r[y>>w*8+4&15]+r[y>>w*8&15];return N}function f(y){var N;for(N=0;N<y.length;N+=1)y[N]=d(y[N]);return y.join("")}f(l("hello")),typeof ArrayBuffer<"u"&&!ArrayBuffer.prototype.slice&&function(){function y(N,w){return N=N|0||0,N<0?Math.max(N+w,0):Math.min(N,w)}ArrayBuffer.prototype.slice=function(N,w){var C=this.byteLength,S=y(N,C),x=C,E,T,O,V;return w!==n&&(x=y(w,C)),S>x?new ArrayBuffer(0):(E=x-S,T=new ArrayBuffer(E),O=new Uint8Array(T),V=new Uint8Array(this,S,E),O.set(V),T)}}();function u(y){return/[\u0080-\uFFFF]/.test(y)&&(y=unescape(encodeURIComponent(y))),y}function h(y,N){var w=y.length,C=new ArrayBuffer(w),S=new Uint8Array(C),x;for(x=0;x<w;x+=1)S[x]=y.charCodeAt(x);return N?S:C}function p(y){return String.fromCharCode.apply(null,new Uint8Array(y))}function g(y,N,w){var C=new Uint8Array(y.byteLength+N.byteLength);return C.set(new Uint8Array(y)),C.set(new Uint8Array(N),y.byteLength),C}function v(y){var N=[],w=y.length,C;for(C=0;C<w-1;C+=2)N.push(parseInt(y.substr(C,2),16));return String.fromCharCode.apply(String,N)}function b(){this.reset()}return b.prototype.append=function(y){return this.appendBinary(u(y)),this},b.prototype.appendBinary=function(y){this._buff+=y,this._length+=y.length;var N=this._buff.length,w;for(w=64;w<=N;w+=64)s(this._hash,i(this._buff.substring(w-64,w)));return this._buff=this._buff.substring(w-64),this},b.prototype.end=function(y){var N=this._buff,w=N.length,C,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x;for(C=0;C<w;C+=1)S[C>>2]|=N.charCodeAt(C)<<(C%4<<3);return this._finish(S,w),x=f(this._hash),y&&(x=v(x)),this.reset(),x},b.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},b.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},b.prototype.setState=function(y){return this._buff=y.buff,this._length=y.length,this._hash=y.hash,this},b.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},b.prototype._finish=function(y,N){var w=N,C,S,x;if(y[w>>2]|=128<<(w%4<<3),w>55)for(s(this._hash,y),w=0;w<16;w+=1)y[w]=0;C=this._length*8,C=C.toString(16).match(/(.*?)(.{0,8})$/),S=parseInt(C[2],16),x=parseInt(C[1],16)||0,y[14]=S,y[15]=x,s(this._hash,y)},b.hash=function(y,N){return b.hashBinary(u(y),N)},b.hashBinary=function(y,N){var w=l(y),C=f(w);return N?v(C):C},b.ArrayBuffer=function(){this.reset()},b.ArrayBuffer.prototype.append=function(y){var N=g(this._buff.buffer,y),w=N.length,C;for(this._length+=y.byteLength,C=64;C<=w;C+=64)s(this._hash,o(N.subarray(C-64,C)));return this._buff=C-64<w?new Uint8Array(N.buffer.slice(C-64)):new Uint8Array(0),this},b.ArrayBuffer.prototype.end=function(y){var N=this._buff,w=N.length,C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S,x;for(S=0;S<w;S+=1)C[S>>2]|=N[S]<<(S%4<<3);return this._finish(C,w),x=f(this._hash),y&&(x=v(x)),this.reset(),x},b.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},b.ArrayBuffer.prototype.getState=function(){var y=b.prototype.getState.call(this);return y.buff=p(y.buff),y},b.ArrayBuffer.prototype.setState=function(y){return y.buff=h(y.buff,!0),b.prototype.setState.call(this,y)},b.ArrayBuffer.prototype.destroy=b.prototype.destroy,b.ArrayBuffer.prototype._finish=b.prototype._finish,b.ArrayBuffer.hash=function(y,N){var w=c(new Uint8Array(y)),C=f(w);return N?v(C):C},b})}(bf)),bf.exports}var FV=$V();const vm=lt(FV),cr="An error occurred during upload";function ls(e){const t=e.responseText||e.response;if(!t)return t||{};try{return JSON.parse(t)}catch{return t}}const HV=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",l=>{const c=l;c.percent=l.total>0?l.loaded/l.total*100:0,e.onProgress(c)});const i=new FormData;if(s&&e.data){let l=e.data;Array.isArray(l)||(l=[l]),l.forEach(c=>{for(const[d,f]of Object.entries(c))Array.isArray(f)?i.append(d,...f):i.append(d,f)})}if(s&&e.formDataAttributes){let l=e.formDataAttributes;Array.isArray(l)||(l=[l]),l.forEach(c=>{Array.isArray(c.value)?i.append(c.name,...c.value):i.append(c.name,c.value)})}if(s&&i.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{let l=new Error(cr);const c=ls(t);c&&(l=new Error(c.message||cr)),console.log(c,l),e.onError(l)}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300){const l=ls(t);let c=new Error(cr);return l&&(c=new Error(l.message||cr)),e.onError(c)}e.onSuccess(ls(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(l=>{const c=l.name,d=l.value;t.setRequestHeader(c,d)});else{const l=e.header.name,c=e.header.value;t.setRequestHeader(l,c)}const o=e.headers||{};if(o instanceof Headers)o.forEach((l,c)=>t.setRequestHeader(c,l));else for(const[l,c]of Object.entries(o))wm(c)||t.setRequestHeader(l,String(c));return t.send(s?i:e.file),t},V4=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,BV=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 jV(n,t),i=[];zV(e,n,r,s,i,t),await Promise.all(i).then(()=>{const o={size:n.size,name:n.name,total:r,hash:s},l=new XMLHttpRequest;l.open(e.method,e.mergeUrl,!0),l.onreadystatechange=()=>{if(l.readyState===4){const c=ls(l);if(l.status<200||l.status>=300){let d=new Error(cr);return c&&(d=new Error(c.message||cr)),e.onError(d)}e.onSuccess(c)}},l.onloadend=()=>{e.onComplete()},l.setRequestHeader("Content-type","application/JSON"),l.send(JSON.stringify(o))})},zV=(e,t,n,r,s,i)=>{for(let o=0;o<n;o++){const l=new Promise((c,d)=>{const f=o*i,u=Math.min(t.size,f+i),h=new FormData;if(e.data){let v=e.data;Array.isArray(v)||(v=[v]),v.forEach(b=>{for(const[y,N]of Object.entries(b))Array.isArray(N)?h.append(y,...N):h.append(y,N)})}if(e.formDataAttributes){let v=e.formDataAttributes;Array.isArray(v)||(v=[v]),v.forEach(b=>{Array.isArray(b.value)?h.append(b.name,...b.value):h.append(b.name,b.value)})}h.append("file",V4.call(t,f,u)),h.append("name",t.name),h.append("total",n.toString()),h.append("index",o.toString()),h.append("size",t.size.toString()),h.append("hash",r.toString());const p=new XMLHttpRequest;if(p.onreadystatechange=()=>{if(p.readyState===4){const v=ls(p);if(p.status<200||p.status>=300){d(v);let b=new Error(cr);v&&(b=new Error(v.message||cr)),e.onError(b)}else c("reponseText")}},p.upload.addEventListener("progress",v=>{const b=v;e.onProgress(b,o)},!1),e.withCredentials&&"withCredentials"in p&&(p.withCredentials=!0),p.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(v=>{const b=v.name,y=v.value;p.setRequestHeader(b,y)});else{const v=e.header.name,b=e.header.value;p.setRequestHeader(v,b)}const g=e.headers||{};if(g instanceof Headers)g.forEach((v,b)=>p.setRequestHeader(b,v));else for(const[v,b]of Object.entries(g))wm(b)||p.setRequestHeader(v,String(b));p.send(h)});s.push(l)}},jV=(e,t)=>new Promise((n,r)=>{const s=Math.ceil(e.size/t);let i=0;const o=new vm.ArrayBuffer,l=new FileReader;function c(){const d=i*t,f=d+t>=e.size?e.size:d+t;l.readAsArrayBuffer(V4.call(e,d,f))}l.onload=d=>{if(o.append(d.target.result),i+=1,i<s)c();else{const f=o.end(),u=new vm;u.append(f),u.append(e.name);const h=u.end();n(h)}},l.onerror=()=>{r(new Error("File slice failed"))},c()}).catch(n=>{console.log(n)});function ym(e){return Date.now()+e}const UV=(e,t)=>{const n=a.computed(()=>{var h;return typeof e.size=="number"?e.size:(h=e==null?void 0:e.size)==null?void 0:h.maxImgSize}),r=a.computed(()=>{var h;return typeof e.size=="number"?e.size:(h=e==null?void 0:e.size)==null?void 0:h.maxImgSize}),s=a.ref([]);function i(h){return s.value.find(p=>p.uid===h.uid)}let o=0;function l(h){var b;o+=1,h.uid=ym(o);const p={uid:h.uid,name:h.name,status:Xr.NEW,size:h.size,raw:h},g=h.type.startsWith("image/");let v=null;if(g){try{p.url=window.URL.createObjectURL(h)}catch(y){console.error(y)}p.isPic=!0}return e.validateName&&!((b=e.validateName)!=null&&b.test(p.name))&&(p.status=Xr.FAIL,p.statusText="invalid filename",v=new Error(p.statusText)),g&&h.size>n.value*1024**2&&(p.status=Xr.FAIL,p.statusText="invalid file size",v=new Error(p.statusText)),!g&&h.size>r.value*1024**2&&(p.status=Xr.FAIL,p.statusText="invalid file size",v=new Error(p.statusText)),s.value.push(p),v}async function c(h){var v;const p=h instanceof File?i(h):h,g=b=>{var y;t.onRemove(b,s.value),s.value.splice(s.value.indexOf(p),1),(y=b.url)!=null&&y.startsWith("blob:")&&URL.revokeObjectURL(b.url)};e.beforeRemove?await((v=e.beforeRemove)==null?void 0:v.call(e,p,s.value))!==!1&&g(p):g(p)}async function d(h,p,g){const v=i(p);v&&(v.status="fail",v.statusText=h.message,v.response=g)}async function f(h,p){const g=i(p);g&&(g.status="success",g.response=h)}async function u(h,p){const g=i(p);g&&(g.status="uploading",g.percentage=Math.round(h.percent))}return a.watch(()=>e.files,h=>{s.value=h.map(p=>(o+=1,{...p,uid:p.uid??ym(o),status:p.status??Xr.SUCCESS}))},{immediate:!0,deep:!0}),{fileList:s,handlePreprocess:l,handleRemove:c,handleError:d,handleSuccess:f,handleProgress:u}},WV=a.defineComponent({name:"Upload",props:jt,emits:["exceed","progress","success","error","delete","done","preview"],setup(e,{slots:t,emit:n,expose:r}){const{resolveClassName:s}=he(),i=a.shallowRef({}),o=a.computed(()=>e.theme===zn.PICTURE),l=a.computed(()=>o.value&&!e.multiple),c=a.computed(()=>Ae({[`${s(Or)}`]:!0,[`${s(Or)}--${e.theme}`]:!0,[`${s(Or)}--disabled`]:e.disabled,[`${s(Or)}--single-picture`]:l.value,[e.extCls]:e.extCls??!1})),d=a.computed(()=>({theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept,isShowPreview:e.isShowPreview,selectChange:e.selectChange}));function f(E,T){x(E),n("delete",E,T)}const{fileList:u,handlePreprocess:h,handleRemove:p,handleProgress:g,handleSuccess:v,handleError:b}=UV(e,{onRemove:f});function y(E){if(!E.length)return;if(e.limit>1&&u.value.length+E.length>e.limit){n("exceed",E,u.value);return}!e.multiple&&e.limit===1&&(u.value=[]);let T=E;(!e.multiple||e.limit===1)&&(T=E.slice(0,1));for(const O of T){const V=O,_=h(V);if(_){n("error",V,u.value,_);return}e.autoUpload&&C(V,T)}}function N(E,T){n("preview",E,T)}function w(E){S(E.raw)}async function C(E,T){var V;if(!e.beforeUpload)return S(E,T);let O;try{O=await((V=e.beforeUpload)==null?void 0:V.call(e,E,T))}catch{O=!1}if(O===!1){p(E);return}S(E,T)}function S(E,T){const{type:O,headers:V,header:_,data:L,formDataAttributes:I,method:R,withCredentials:M,name:j,url:H,sliceUrl:A,mergeUrl:P,chunkSize:B,customRequest:z}=e,{uid:D}=E,k={type:O,headers:V,header:_,withCredentials:M,file:E,data:L,formDataAttributes:I,method:R,filename:j,action:H,sliceUrl:A,mergeUrl:P,chunkSize:B,onProgress:te=>{g(te,E),n("progress",te,E,u.value)},onSuccess:te=>{var Q;const $=te;if((Q=e==null?void 0:e.handleResCode)!=null&&Q.call(e,$))v(te,E),n("success",te,E,u.value);else{const ne=new Error(($==null?void 0:$.message)||"unknow error");b(ne,E,te),n("error",E,u.value,ne)}delete i.value[D]},onError:te=>{b(te,E),n("error",E,u.value,te),delete i.value[D]},onComplete:()=>{T&&T.indexOf(E)===T.length-1&&n("done",u.value)}};let G=e.sliceUpload?BV:HV;z&&(G=z);const U=G(k);i.value[D]=U,U instanceof Promise&&U.then(k.onSuccess,k.onError)}function x(E){let T=i.value;E&&(T={[E.uid]:i.value[E.uid]}),Object.keys(T).forEach(O=>{if(T[O]instanceof XMLHttpRequest){const V=T[O];V==null||V.abort()}delete i.value[O]})}return a.onBeforeUnmount(()=>{u.value.forEach(({url:E})=>{E!=null&&E.startsWith("blob:")&&URL.revokeObjectURL(E)})}),r({handlePreview:N,handleRemove:p,handleRetry:w}),()=>a.createVNode("div",{class:c.value},[!o.value&&a.createVNode(pm,a.mergeProps(d.value,{onChange:y}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${s(Or)}__tip`},[e.tip]),a.createVNode(MV,{disabled:e.disabled,files:u.value,isShowPreview:e.isShowPreview,multiple:e.multiple,theme:e.theme,onPreview:N,onRemove:p,onRetry:w},{innerTrigger:E=>o.value&&a.createVNode(pm,a.mergeProps(d.value,{file:E,onChange:y,onPreview:N,onRemove:p}),t),file:t.file})])}}),D4=Ie(WV),wf=Object.freeze(Object.defineProperty({__proto__:null,$bkPopover:sh,Affix:bp,Alert:Cp,AnimateNumber:Np,Backtop:xp,Badge:Sp,Breadcrumb:_p,Button:it,Card:Xp,Cascader:Vg,Checkbox:Ct,CodeDiff:$g,Collapse:Hg,ColorPicker:ov,ConfigProvider:yp,Container:lv,DatePicker:rv,Dialog:uv,Divider:dv,Dropdown:fv,Exception:ml,FixedNavbar:hv,Form:pv,InfoBox:vv,Input:hr,Link:bv,Loading:ur,Menu:Cv,Message:Ov,Modal:Gs,Navigation:Av,Notify:Vv,OverflowTitle:Yp,Pagination:Ah,PopConfirm:Dv,Popover:Dt,Popover2:kv,Process:Rv,Progress:xs,Radio:to,Rate:$v,ResizeLayout:Fv,SearchSelect:qv,Select:hh,Sideslider:Kv,Slider:Yv,Steps:Jv,Swiper:Zv,Switcher:Qv,Tab:r4,Table:b4,Tag:ws,TagInput:_g,TimePicker:w4,Timeline:C4,Transfer:N4,Tree:L4,Upload:D4,VirtualRender:Ws,scrollbar:dh},Symbol.toStringTag,{value:"Module"})),bm=(e="Bk")=>(t,n)=>{const r=t.config.globalProperties.bkUIPrefix||e;Object.keys(wf).forEach(s=>{const i=wf[s];"install"in i?t.use(i,{prefix:r}):t.component(r+s,wf[s])}),n&&w0(n,t)},qV={createInstall:bm,install:bm()},k4="2.0.2-beta.58";window.__bkui_vue_version__=k4;exports.$bkPopover=sh;exports.Affix=bp;exports.Alert=Cp;exports.AnimateNumber=Np;exports.Backtop=xp;exports.Badge=Sp;exports.Breadcrumb=_p;exports.Button=it;exports.Card=Xp;exports.Cascader=Vg;exports.Checkbox=Ct;exports.CodeDiff=$g;exports.Collapse=Hg;exports.ColorPicker=ov;exports.ConfigProvider=yp;exports.Container=lv;exports.DatePicker=rv;exports.Dialog=uv;exports.Divider=dv;exports.Dropdown=fv;exports.Exception=ml;exports.FixedNavbar=hv;exports.Form=pv;exports.InfoBox=vv;exports.Input=hr;exports.Link=bv;exports.Loading=ur;exports.Menu=Cv;exports.Message=Ov;exports.Modal=Gs;exports.Navigation=Av;exports.Notify=Vv;exports.OverflowTitle=Yp;exports.Pagination=Ah;exports.PopConfirm=Dv;exports.Popover=Dt;exports.Popover2=kv;exports.Process=Rv;exports.Progress=xs;exports.Radio=to;exports.Rate=$v;exports.ResizeLayout=Fv;exports.SearchSelect=qv;exports.Select=hh;exports.Sideslider=Kv;exports.Slider=Yv;exports.Steps=Jv;exports.Swiper=Zv;exports.Switcher=Qv;exports.Tab=r4;exports.Table=b4;exports.Tag=ws;exports.TagInput=_g;exports.TimePicker=w4;exports.Timeline=C4;exports.Transfer=N4;exports.Tree=L4;exports.Upload=D4;exports.VirtualRender=Ws;exports.bkEllipsis=Hw;exports.bkEllipsisInstance=ih;exports.bkLoading=Op;exports.bkTooltips=Dn;exports.clickoutside=Ln;exports.default=qV;exports.defaultRootConfig=Pr;exports.mousewheel=Xw;exports.overflowTitle=aC;exports.provideGlobalConfig=w0;exports.rootProviderKey=pa;exports.scrollbar=dh;exports.setPrefixVariable=_f;exports.useGlobalConfig=P7;exports.useLocale=Be;exports.usePrefix=he;exports.version=k4;
|