bkui-vue 0.0.1-beta.356 → 0.0.1-beta.358
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 +1 -1
- package/dist/index.esm.js +18 -5
- package/dist/index.umd.js +1 -1
- package/lib/color-picker/index.js +1 -1
- package/lib/date-picker/base/picker-dropdown.d.ts +1 -0
- package/lib/date-picker/index.js +1 -1
- package/lib/dropdown/dropdown.d.ts +1 -0
- package/lib/dropdown/index.d.ts +3 -0
- package/lib/dropdown/index.js +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
@@ -60,7 +60,7 @@ ${js(n)}`),i}})}function g2(e){const t=Object.keys(e),n=t.filter(s=>{var o;retur
|
|
60
60
|
m 0 ${T?"":"-"}${k}
|
61
61
|
a ${k} ${k} 0 1 1 0 ${T?"-":""}${k*2}
|
62
62
|
a ${k} ${k} 0 1 1 0 ${T?"":"-"}${k*2}
|
63
|
-
`,j={d:z,stroke:m||"#f5f5f5","stroke-linecap":d,"stroke-width":y,"fill-opacity":"0",class:"process-circle-trail",style:M},O={d:z,stroke:c||"#13ce66","stroke-linecap":d,"stroke-width":s>0&&y||0,"fill-opacity":"0",class:`process-circle-path bk-${u}-circle-trail`,style:S};return a.createVNode("div",{class:"progress-outer-circle",style:v},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",j,null),a.createVNode("path",O,null)]),a.createVNode("span",{class:"progress-circle-text",style:p},[n==null?void 0:n.default()])])},s5=(e,{attrs:t,slots:n})=>{const{percent:i,strokeWidth:s,size:o,color:c,titleStyle:d,showText:u,textInside:f,theme:m}=t,p={height:`${s}px`,lineHeight:`${s}px`},y={width:`${i}%`,background:c,animationDuration:"3s"},b=(v=!0)=>(u||n.default)&&(v&&f||!v&&!f)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{class:`bk-progress-${o||"normal"} progress-bar`,style:p},[a.createVNode("div",{style:y,class:{"progress-inner":!0,[`bk-${m}`]:!0}},[a.createVNode("div",{class:"inner-text",style:d},[b()])])]),b(!1)])};function dh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var l5=a.defineComponent({name:"Progress",props:{extCls:g.string,type:g.string.validate(e=>["line","circle","dashboard"].includes(e)).def("line"),percent:g.number.def(0),theme:g.theme().def(Os.PRIMARY),size:g.size(),width:g.number.def(126),strokeWidth:g.number,strokeLinecap:g.string.def("round"),textInside:g.bool.def(!1),showText:g.bool.def(!0),color:g.string,bgColor:g.string,fixed:g.number.validate(e=>e>=0&&e<=20).def(0),format:g.func.def(e=>`${e}%`),titleStyle:g.object.def({fontSize:"16px",verticalAlign:"middle"})},setup(){return{}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var d;const{showText:e,format:t,percent:n,textInside:i,titleStyle:s,fixed:o}=this.$props,c=t((d=this.validPercent(n))==null?void 0:d.toFixed(o));return(e||this.$slots.default)&&i?this.$slots.default?this.$slots.default():a.createVNode("span",null,[c]):!e||i?null:a.createVNode("span",{class:"progress-text",style:typeof c=="string"?s:void 0},[this.$slots.default?this.$slots.default():c])}},render(){const e=this.renderProcessInfo(),t=Se(Z({},this.$props),{percent:this.validPercent(this.percent)});let n=a.createVNode(s5,t,dh(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(r5,t,dh(e)?e:{default:()=>[e]}));const i={class:ze({extCls:!!this.extCls},`bk-progress bk-progress-${this.type}`)};return a.createVNode("div",i,[n])}});const _r=Ge(l5),fh=Symbol("RadioGroup");function hh(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const gh=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,i=a.inject(fh,r0),s=!s0(i),o=a.ref(!1),c=a.computed(()=>s&&i.props.disabled?!0:t.disabled);s?a.watch(()=>i.props.modelValue,f=>{o.value=f===t.label},{immediate:!0}):a.watch(()=>t.modelValue,f=>{f!==""&&(o.value=f===t.label)},{immediate:!0});const d=(f=!0)=>{o.value=f},u=f=>{if(c.value)return;const m=f.target;o.value=m.checked;const p=o.value?t.label:"";n("update:modelValue",p),n("change",p),s&&i.handleChange(e.proxy),a.nextTick(()=>{m.checked!==o.value&&(m.checked=o.value)})};return a.onMounted(()=>{s&&i.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&i.unregister(e.proxy)}),{isChecked:o,isDisabled:c,setChecked:d,handleChange:u}},o5={name:g.string.def(""),label:g.oneOfType([String,Number,Boolean]).isRequired,modelValue:g.oneOfType([String,Number,Boolean]).def(""),checked:g.bool.def(!1),disabled:g.bool.def(!1)};var c5=a.defineComponent({name:"Radio",props:o5,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=hh(),{isChecked:i,isDisabled:s,setChecked:o,handleChange:c}=gh();return{isFocused:e,isChecked:i,isDisabled:s,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=ze({"bk-radio":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("span",{class:"bk-radio-label"},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:"bk-radio-input",type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),t()])}});const u5={name:g.string.def(""),label:g.oneOfType([String,Number,Boolean]).isRequired,modelValue:g.oneOfType([String,Number,Boolean]).def(""),checked:g.bool.def(!1),disabled:g.bool.def(!1),size:g.size()};var d5=a.defineComponent({name:"RadioButton",props:u5,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=hh(),{isChecked:i,isDisabled:s,setChecked:o,handleChange:c}=gh();return{isFocused:e,isChecked:i,isDisabled:s,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=ze({"bk-radio-button":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("div",{class:"bk-radio-button-label"},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:"bk-radio-button-input",type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),t()])}});const f5={name:g.string.def(""),modelValue:g.oneOfType([String,Number,Boolean]),disabled:g.bool,withValidate:g.bool.def(!0)};var h5=a.defineComponent({name:"RadioGroup",props:f5,emits:["change","update:modelValue"],setup(e,t){const n=xn(),i=[],s=d=>{i.push(d)},o=d=>{const u=i.indexOf(d);u>-1&&i.splice(u,1)},c=d=>{const u=d.label;i.forEach(f=>{f!==d&&f.setChecked(!1)}),t.emit("update:modelValue",u),t.emit("change",u)};return a.provide(fh,{props:e,register:s,unregister:o,handleChange:c}),a.watch(()=>e.modelValue,()=>{var d;e.withValidate&&((d=n==null?void 0:n.validate)==null||d.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&i.forEach(d=>{d.setChecked(d.label===e.modelValue)})}),{}},render(){var e;return a.createVNode("div",{class:"bk-radio-group"},[(e=this.$slots)==null?void 0:e.default()])}});const mh=Gt(c5,{Group:h5,Button:d5});var ol=a.defineComponent({name:"Star",props:{rate:g.number.def(0),width:g.number.def(15),height:g.number.def(16),editable:g.bool.def(!0),hoverRate:g.number.def(0),max:g.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=d=>{if(!e.editable)return;const u=d+1;t("chooseRate",u)},i=d=>{if(!e.editable)return;const u=d+1;t("changeHover",u)},s=d=>ze({"bk-is-select":d<Math.floor(o.value),"bk-is-edit":e.editable,"bk-rate-star":!0}),o=a.computed(()=>e.hoverRate||e.rate),c={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:"bk-rate-stars"},[Array(e.max).fill(1).map((d,u)=>a.createVNode("svg",{class:s(u),style:c,x:"0px",y:"0px",viewBox:"0 0 64 64",onClick:()=>n(u),onMouseenter:()=>i(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)])])])])]))])}}),g5=a.defineComponent({name:"Rate",components:{star:ol},props:{modelValue:g.number.def(0),size:g.size(),editable:g.bool.def(!0),withValidate:g.bool.def(!0)},emits:["change","update:modelValue"],setup(e,{emit:t}){const n=xn(),i=a.ref(0),s=p=>{!e.editable||(t("update:modelValue",p),t("change",p))},o=p=>{i.value=p},c=ze({"bk-rate":!0}),u={small:{width:12,height:12},large:{width:18,height:18}}[e.size]||{width:15,height:16},f=a.computed(()=>{const p=Math.floor(e.modelValue),y=(u.width+3)*p,b=u.width*(e.modelValue-p);return{width:`${y+b}px`}}),m={width:u.width,height:u.height};return a.watch(()=>e.modelValue,()=>{var p;e.withValidate&&((p=n==null?void 0:n.validate)==null||p.call(n,"change"))}),()=>a.createVNode("p",{class:c},[e.editable?a.createVNode(ol,a.mergeProps({rate:e.modelValue,"hover-rate":i.value,onChooseRate:s,onChangeHover:o,onMouseleave:()=>o(0)},m),null):[a.createVNode(ol,a.mergeProps({rate:5,style:f.value,class:"bk-score-real",editable:!1},m),null),a.createVNode(ol,a.mergeProps({rate:0,editable:!1},m),null)]])}});const ph=Ge(g5);var m5=a.defineComponent({name:"Swiper",props:{isLoop:g.bool.def(!0),loopTime:g.number.def(8e3),pics:g.array.def([]),list:g.array.def([]),height:g.number,width:g.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:i,loopTime:s,pics:o,list:c,height:d,width:u}=a.toRefs(e),f=a.ref(),m=a.ref(0),p=a.ref(0),y=a.ref(0),b=a.ref(0);let v;const k=a.computed(()=>{var B;return((B=c.value)==null?void 0:B.length)>0?c.value:o.value}),T=a.computed(()=>({width:`${p.value*k.value.length}px`,transform:`translateX(-${p.value*m.value}px)`})),L=a.computed(()=>({width:`${p.value}px`,height:`${y.value}px`})),N=B=>{let ie=B;B>=k.value.length&&(ie=0),B<0&&(ie=k.value.length-1),m.value=ie,t("index-change",ie)},C=B=>{!B||window.open(B,"_blank")},I=B=>["bk-swiper-img",{"bk-swiper-link":B.link},B.class],M=B=>({"background-image":`url(${B.url})`,"background-color":B.color}),S=B=>({"bk-current-index":m.value===B}),z=()=>{i.value&&(b.value=window.setTimeout(()=>{N(m.value+1),z()},s.value))},j=()=>{window.clearTimeout(b.value)},O=()=>{var ie;const B=(ie=f.value)==null?void 0:ie.parentElement;!B||!window.ResizeObserver||(v=new ResizeObserver(()=>{G()}),v.observe(B))},W=()=>{var B;(B=v.disconnect)==null||B.call(v)},P=B=>{if(B===void 0)return{height:0,width:0};const ie=getComputedStyle(B),le=B.clientWidth-parseFloat(ie.paddingTop)-parseFloat(ie.paddingBottom);return{height:B.clientHeight-parseFloat(ie.paddingLeft)-parseFloat(ie.paddingRight),width:le}},G=()=>{var ie;const B=P((ie=f.value)==null?void 0:ie.parentElement);p.value=+u.value>0?u.value:B.width,y.value=+d.value>0?d.value:B.height};return a.watch([d,u],G),a.onMounted(()=>{G(),z(),O()}),a.onBeforeUnmount(()=>{j(),W()}),()=>a.createVNode("section",{class:"bk-swiper-home",ref:f,style:L.value},[a.createVNode("hgroup",{style:T.value,class:"bk-transition bk-swiper-main"},[k.value.map(B=>{var ie,le;return a.createVNode("h3",{class:"bk-swiper-card",style:L.value},[(le=(ie=n.default)==null?void 0:ie.call(n,B))!=null?le:a.createVNode("span",{class:I(B),style:M(B),onClick:()=>C(B.link)},null)])})]),a.createVNode("ul",{class:"bk-swiper-index"},[k.value.map((B,ie)=>a.createVNode("li",{class:S(ie),onMouseover:()=>N(ie)},null))]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-prev",onClick:()=>N(m.value-1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-next",onClick:()=>N(m.value+1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)])])}});const bh=Ge(m5),cl=Symbol("BkSelect"),yh=Symbol("BkOptionGroup");function Ch(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function Fc(e){return{register:(i,s)=>{if(!!s){if(e.value.has(i)){console.warn(`repeat ${i}`,s);return}return e.value.set(i,s)}},unregister:i=>{e.value.delete(i)}}}function p5(e,t=200){let n,i=e;return a.customRef((s,o)=>({get(){return s(),i},set(c){clearTimeout(n),c===void 0||c===""?(i=c,o()):n=setTimeout(()=>{i=c,o()},t)}}))}function b5(e,t){const{popoverMinWidth:n}=e;let i=null;const s=a.ref("auto"),o=a.ref(!1),c=()=>{o.value=!o.value},d=()=>{o.value=!1},u=()=>{o.value=!0},f=()=>{var m;s.value=Math.max((m=t.value)==null?void 0:m.offsetWidth,n)};return a.onMounted(()=>{!t.value||(i=Y4(t.value,f,60,!0),i.start())}),a.onBeforeUnmount(()=>{i==null||i.stop(),i=null}),{isPopoverShow:o,popperWidth:s,togglePopover:c,hidePopover:d,showPopover:u}}function y5(e,t){const n=p5(""),i=a.ref(!1);return a.watch(n,async()=>{try{i.value=!0,await e(n.value),i.value=!1}catch(s){console.error(s)}finally{t==null||t()}}),{searchKey:n,searchLoading:i}}function Fa(e=""){return e&&String(e).trim().toLowerCase()}var ul=a.defineComponent({name:"Option",props:{value:g.any,label:g.string.def(""),disabled:g.bool.def(!1)},setup(e){const{proxy:t}=a.getCurrentInstance(),n=a.reactive({visible:!0}),{disabled:i,value:s}=a.toRefs(e),o=a.inject(cl,null),c=a.inject(yh,null),d=a.computed(()=>{var b;return(b=o==null?void 0:o.selected)==null?void 0:b.some(v=>v.value===s.value)}),u=a.computed(()=>o==null?void 0:o.multiple),f=a.computed(()=>(o==null?void 0:o.activeOptionValue)===s.value),m=a.computed(()=>o==null?void 0:o.showSelectedIcon),p=()=>{i.value||o==null||o.handleOptionSelected(t)},y=()=>{o.activeOptionValue=s.value};return a.onBeforeMount(()=>{o==null||o.register(s.value,t),c==null||c.register(s.value,t)}),a.onBeforeUnmount(()=>{o==null||o.unregister(s.value),c==null||c.unregister(s.value)}),Se(Z({},a.toRefs(n)),{selected:d,multiple:u,isHover:f,showSelectedIcon:m,handleOptionClick:p,handleMouseEnter:y})},render(){var t,n,i;const e=ze({"is-selected":this.selected,"is-disabled":this.disabled,"is-multiple":this.multiple,"is-hover":this.isHover,"bk-select-option":!0});return a.withDirectives(a.createVNode("li",{class:e,onClick:this.handleOptionClick,onMouseenter:this.handleMouseEnter},[(i=(n=(t=this.$slots).default)==null?void 0:n.call(t))!=null?i:a.createVNode("span",{class:"bk-select-option-item",title:this.label},[this.label]),this.multiple&&this.selected&&this.showSelectedIcon&&a.createVNode(na,{class:"bk-select-selected-icon",width:22,height:22},null)]),[[a.vShow,this.visible]])}}),C5=a.defineComponent({name:"Group",props:{label:g.string.def(""),disabled:g.bool.def(!1),collapsible:g.bool.def(!1),collapse:g.bool.def(!1)},setup(e,{emit:t}){const n=a.getCurrentInstance(),{proxy:i}=n,s=a.inject(cl,null),o=a.reactive({groupCollapse:e.collapse,visible:!0}),c=a.ref(new Map),{register:d,unregister:u}=Fc(c),f=a.computed(()=>`${e.label} (${[...c.value.values()].filter(p=>p.visible).length})`),m=()=>{!e.collapsible||e.disabled||(o.groupCollapse=!o.groupCollapse,t("update:collapse",o.groupCollapse))};return a.provide(yh,a.reactive(Se(Z({},a.toRefs(e)),{register:d,unregister:u,groupCollapse:a.toRef(o,"groupCollapse")}))),a.onBeforeMount(()=>{s==null||s.registerGroup(n.uid,i)}),a.onBeforeUnmount(()=>{s==null||s.unregisterGroup(n.uid)}),Se(Z({},a.toRefs(o)),{groupLabel:f,handleToggleCollapse:m})},render(){var i,s;const e=ze({"bk-option-group":!0,collapsible:this.collapsible,disabled:this.disabled}),t=ze({"bk-option-group-label":!0,collapsible:this.collapsible}),n=ze({"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(Js,{class:n},null),a.createVNode("span",{class:"default-group-label-title"},[this.groupLabel])])]),a.withDirectives(a.createVNode("ul",{class:"bk-option-group-content"},[(s=(i=this.$slots).default)==null?void 0:s.call(i)]),[[a.vShow,!this.groupCollapse]])]),[[a.vShow,this.visible]])}});const v5={onContentScroll:Function},w5=Z({list:g.array.def([]),enabled:g.bool.def(!0),scrollEvent:g.bool.def(!1),lineHeight:g.oneOfType([g.number,g.func]).def(30),minHeight:g.number.def(30),height:g.oneOfType([g.string.def("100%"),g.number]).def("100%"),width:g.oneOfType([g.string.def("100%"),g.number]).def("100%"),className:g.oneOfType([g.arrayOf(g.string),g.object,g.arrayOf(g.object),g.string]).def(""),contentClassName:g.oneOfType([g.arrayOf(g.string),g.object,g.arrayOf(g.object),g.string]).def(""),contentStyle:g.object.def({}),scrollXName:g.string.def(je("F-scroll-x")),scrollYName:g.string.def(je("F-scroll-y")),groupItemCount:g.number.def(1),preloadItemCount:g.number.def(1),renderAs:g.string.def("div"),contentAs:g.string.def("div"),scrollOffsetTop:g.number.def(0),scrollPosition:g.string.def("content"),abosuteHeight:g.oneOfType([g.string.def("auto"),g.number]).def("auto"),throttleDelay:g.number.def(60)},v5);var M5=(e,t)=>{const{renderAs:n,contentAs:i}=e,s=(d,u,f,m,p,y,b)=>{t.emit("content-scroll",[d,{translateY:p,translateX:y,pos:b}])},o=a.resolveDirective("bkVirtualRender"),c={lineHeight:e.lineHeight,handleScrollCallback:s,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent};return{rendAsTag:()=>{var d,u,f,m,p,y,b,v,k,T,L,N;return a.h(n,{class:e.className},[(f=(u=(d=t.slots).beforeContent)==null?void 0:u.call(d))!=null?f:"",a.withDirectives(a.h(i,{class:e.contentClassName,style:e.contentStyle},[(y=(p=(m=t.slots).default)==null?void 0:p.call(m,{data:e.list}))!=null?y:""]),[[o,c]]),(k=(v=(b=t.slots).afterContent)==null?void 0:v.call(b))!=null?k:"",(N=(L=(T=t.slots).afterSection)==null?void 0:L.call(T))!=null?N:""])}}};function vh(e,t,n,i){let s=0,o=0,c=0,d=0;for(;s<e;s++){if(d=i(s,[s*n,(s+1)*n,"virtual"]),o+d>t){c=t-o;break}o+=d}return{startIndex:s,height:o,diffHeight:c}}function wh(e,t,n,i,s){if(!i)return;const o=i.scrollTop,c=i.scrollLeft,{scrollTop:d,count:u,groupItemCount:f,startIndex:m,endIndex:p}=n,{offsetHeight:y}=i;let b=0,v=0,k=0;if(typeof e=="number"&&(b=Math.floor(o/e),v=Math.ceil(y/e)+b,k=o%e),typeof e=="function"){const T=vh(u,o,f,e);b=T.startIndex>0?T.startIndex:0,k=T.diffHeight,v=vh(u,y,f,e).startIndex+b+1}if(o!==d||b!==m||v!==p){const T=i.scrollHeight-i.offsetHeight-i.scrollTop;typeof t=="function"&&t(s,b,v,o,k,c,{bottom:T>=0?T:0})}}function I5(e,t,n){const{lineHeight:i=30,handleScrollCallback:s,pagination:o={},onlyScroll:c}=n.value;if(c){const y=t.scrollTop,b=t.scrollLeft,v=t.scrollHeight-t.offsetHeight-t.scrollTop;s(e,null,null,y,y,b,{bottom:v>=0?v:0});return}const{startIndex:d,endIndex:u,groupItemCount:f,count:m,scrollTop:p}=o;wh(i,s,{scrollTop:p,startIndex:d,endIndex:u,groupItemCount:f,count:m},t,e)}const Mh=(e=60)=>ot.exports.throttle((t,n,i)=>I5(t,n,i),e),N5=(e,t,n,i=60)=>{Reflect.apply(Mh(i),globalThis,[e,t,n])};var L5={mounted(e,t){const n=e.parentNode,{throttleDelay:i}=t.value;n.addEventListener("scroll",s=>{N5(s,n,t,i)})},unbind(e){if(e){const t=e.parentNode;if(!t)return;t.removeEventListener("scroll",Mh)}}},k5=a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:L5},props:w5,emits:["content-scroll"],setup(e,t){const{renderAs:n,contentAs:i}=e,s=z=>typeof z=="string"?[z]:typeof z=="object"&&!Array.isArray(z)?[z]:z;if(!e.enabled){const{rendAsTag:z}=M5(e,t);return z}const o=a.ref(null),c=a.reactive({startIndex:0,endIndex:0,scrollTop:1,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),d=(z,j,O,W,P,G,B)=>{c.startIndex=j,c.endIndex=O,c.scrollTop=W,c.translateY=P,c.translateX=G,c.pos=B,t.emit("content-scroll",[z,c])};a.onMounted(()=>{a.nextTick(()=>{p(e.list),y()})}),a.watch(()=>e.list,()=>{u(),y()},{deep:!0}),a.watch(()=>e.lineHeight,()=>{u(),y()});const u=()=>{p(e.list)},f=a.ref(0),m=a.ref(0),p=z=>{if(f.value=Math.ceil((z||[]).length/e.groupItemCount),c.count=f.value,c.startIndex=0,c.endIndex=0,c.translateY=0,c.scrollTop=0,typeof e.abosuteHeight=="string"&&e.abosuteHeight==="auto")if(typeof e.lineHeight=="function"){m.value=0;let O=0;for(let W=0;W<f.value;W++){const P=e.lineHeight.call(this,W,z.slice(W*e.groupItemCount,e.groupItemCount));O+=typeof P=="number"?P:0}m.value=O}else m.value=e.lineHeight*f.value;else m.value=e.abosuteHeight},y=(z=!0)=>{var O;const j=(O=o.value)==null?void 0:O.parentNode;wh(e.lineHeight,d,c,j,null),z&&o.value&&o.value.scrollTo(0,0)},b=a.computed(()=>(e.list||[]).map((z,j)=>Se(Z({},z),{$index:j}))),v=a.computed(()=>b.value.slice(c.startIndex*e.groupItemCount,(c.endIndex+e.preloadItemCount)*e.groupItemCount)),k=a.computed(()=>e.scrollPosition==="content"?{top:`${c.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${c.translateY}px)`}:{}),T=a.computed(()=>Z({height:typeof e.height=="number"?`${e.height}px`:e.height,width:typeof e.width=="number"?`${e.width}px`:e.width,display:"inline-block"},e.scrollPosition==="container"?k.value:{})),L=a.computed(()=>{const z=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${m.value<e.minHeight?e.minHeight:m.value}px`,display:z?"none":"block"}}),N=a.computed(()=>[je("virtual-render"),e.scrollXName,e.scrollYName,...s(e.className),e.scrollPosition==="container"?je("virtual-content"):""]),C=a.computed(()=>[e.scrollPosition==="content"?je("virtual-content"):"",...s(e.contentClassName)]),I=a.resolveDirective("bkVirtualRender"),M={lineHeight:e.lineHeight,handleScrollCallback:d,pagination:c,throttleDelay:e.throttleDelay},S=()=>{u(),y()};return t.expose({reset:S}),()=>{var z,j,O,W,P,G,B,ie,le,ve,Ie,ge;return a.h(n||"div",{ref:o,class:N.value,style:T.value},[(O=(j=(z=t.slots).beforeContent)==null?void 0:j.call(z))!=null?O:"",a.withDirectives(a.h(i||"div",{class:C.value,style:Z(Z({},k.value),e.contentStyle)},[(G=(P=(W=t.slots).default)==null?void 0:P.call(W,{data:v.value}))!=null?G:""]),[[I,M]]),(le=(ie=(B=t.slots).afterContent)==null?void 0:ie.call(B))!=null?le:"",a.h("div",{class:[je("virtual-section")],style:L.value}),(ge=(Ie=(ve=t.slots).afterSection)==null?void 0:Ie.call(ve))!=null?ge:""])}}});const Wr=Ge(k5);var Gc;(function(e){e.UNKNOWN="",e.FILLED="filled",e.STROKE="stroke"})(Gc||(Gc={}));var T5=a.defineComponent({name:"Tag",props:{theme:Ps(),closable:g.bool.def(!1),type:Pe("tagStorkeType",{}).def(Gc.UNKNOWN),checkable:g.bool.def(!1),checked:g.bool.def(!1),radius:g.string.def("2px"),extCls:g.string.def("")},emits:["change","close"],slots:["icon"],setup(e,{emit:t}){const n=a.computed(()=>ze({"bk-tag-closable":e.closable,"bk-tag-checkable":e.checkable,"bk-tag-check":e.checked,[`bk-tag-${e.type}`]:e.type,[`bk-tag-${e.theme}`]:e.theme,[e.extCls]:!!e.extCls},"bk-tag")),i=a.computed(()=>({borderRadius:e.radius}));return{wrapperCls:n,wrapperStyle:i,handleClose:c=>{c.preventDefault(),c.stopPropagation(),t("close",c)},handleClick:c=>{c.preventDefault(),c.stopPropagation(),e.checkable&&t("change",!e.checked)}}},render(){var e,t;return a.createVNode("div",{class:this.wrapperCls,style:this.wrapperStyle,onClick:this.handleClick},[this.$slots.icon?a.createVNode("span",{class:"bk-tag-icon"},[this.$slots.icon()]):"",a.createVNode("span",{class:"bk-tag-text"},[(t=(e=this.$slots).default)==null?void 0:t.call(e)]),this.closable?a.createVNode(Hn,{class:"bk-tag-close",onClick:this.handleClose},null):""])}});const dl=Ge(T5);var S5=a.defineComponent({name:"SelectTagInput",props:{selected:{type:Array,default:()=>[]},tagTheme:Ps(),placeholder:g.string.def(""),filterable:g.bool.def(!1),allowCreate:g.bool.def(!1),disabled:g.bool.def(!1),modelValue:g.any,collapseTags:g.bool.def(!1)},emits:["update:modelValue","remove","enter"],setup(e,{emit:t}){const{proxy:n}=a.getCurrentInstance(),i=a.inject(cl,null),{modelValue:s,collapseTags:o,selected:c}=a.toRefs(e),d=a.ref(s.value),u=a.ref(),f=a.ref(null);a.watch(s,()=>{d.value=s.value}),a.watch([c,o],()=>{k()},{flush:"post"});const m=T=>{t("remove",T)},p=()=>{var T;(T=u.value)==null||T.focus()},y=T=>{t("update:modelValue",T.target.value)},b=T=>{switch(T.code){case"Enter":{t("enter",T.target.value,T);break}}},v=T=>{const L=[...n.$el.querySelectorAll(".bk-tag")];return typeof T=="number"?L[T]:L},k=()=>{!o.value||(f.value=null,setTimeout(()=>{const T=v(),L=T.findIndex((N,C)=>C?T[C-1].offsetTop!==N.offsetTop:!1);f.value=L>0?L:null}))};return{select:i,overflowTagIndex:f,value:d,inputRef:u,handleRemoveTag:m,focus:p,handleInput:y,handleKeydown:b}},render(){var i,s,o,c,d,u,f;const e=ze({"bk-select-tag":!0,"bk-select-tag--default":!0,"is-disabled":this.disabled,"collapse-tag":this.collapseTags}),t=ze({"bk-select-tag-wrapper":!0}),n={display:this.selected.length&&!this.filterable?"none":""};return a.createVNode("div",{class:e},[(s=(i=this.$slots)==null?void 0:i.prefix)==null?void 0:s.call(i),a.createVNode("span",{class:t},[(d=(c=(o=this.$slots).default)==null?void 0:c.call(o))!=null?d:this.selected.map((m,p)=>a.createVNode(dl,{closable:!0,theme:this.tagTheme,style:{display:this.collapseTags&&this.overflowTagIndex&&p>=this.overflowTagIndex?"none":""},onClose:()=>this.handleRemoveTag(m.value)},{default:()=>{var y;return[(y=this.select)==null?void 0:y.handleGetLabelByValue(m.value)]}})),!!this.overflowTagIndex&&this.collapseTags&&a.createVNode(dl,{class:"bk-select-overflow-tag"},{default:()=>[a.createTextVNode("+"),this.selected.length-this.overflowTagIndex]})]),a.createVNode("input",{class:"bk-select-tag-input",ref:"inputRef",type:"text",style:n,placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,disabled:this.disabled,value:this.filterable?this.value:"",onInput:this.handleInput,onKeydown:this.handleKeydown},null),(f=(u=this.$slots)==null?void 0:u.suffix)==null?void 0:f.call(u)])}}),x5=a.defineComponent({name:"Select",directives:{clickoutside:jn},props:{modelValue:g.any,multiple:g.bool.def(!1),disabled:g.bool.def(!1),size:g.size().def(Zo.DEFAULT),clearable:g.bool.def(!0),loading:g.bool.def(!1),filterable:g.bool.def(!1),remoteMethod:g.func,scrollHeight:g.number.def(200),showSelectAll:g.bool.def(!1),popoverMinWidth:g.number.def(0),showOnInit:g.bool.def(!1),multipleMode:g.oneOf(["default","tag"]).def("default"),tagTheme:Ps(),behavior:n0(),collapseTags:g.bool.def(!1),autoHeight:g.bool.def(!0),noDataText:g.string.def("\u65E0\u6570\u636E"),noMatchText:g.string.def("\u65E0\u5339\u914D\u6570\u636E"),loadingText:g.string.def("\u52A0\u8F7D\u4E2D..."),placeholder:g.string.def("\u8BF7\u9009\u62E9"),searchPlaceholder:g.string.def("\u8BF7\u8F93\u5165\u5173\u952E\u5B57"),selectAllText:g.string.def("\u5168\u90E8"),scrollLoading:g.bool.def(!1),allowCreate:g.bool.def(!1),popoverOptions:g.object.def({}),customContent:g.bool.def(!1),list:g.array.def([]),idKey:g.string.def("value"),displayKey:g.string.def("label"),withValidate:g.bool.def(!0),showSelectedIcon:g.bool.def(!0),inputSearch:g.bool.def(!0),enableVirtualRender:g.bool.def(!1),allowEmptyValues:g.array.def([]),autoFocus:g.bool.def(!1)},emits:["update:modelValue","change","toggle","clear","scroll-end","focus","blur"],setup(e,{emit:t}){const{modelValue:n,disabled:i,filterable:s,multiple:o,remoteMethod:c,loading:d,loadingText:u,noDataText:f,noMatchText:m,popoverMinWidth:p,showOnInit:y,multipleMode:b,allowCreate:v,customContent:k,showSelectedIcon:T,inputSearch:L,enableVirtualRender:N,showSelectAll:C,scrollHeight:I,list:M,displayKey:S,collapseTags:z,autoHeight:j,popoverOptions:O,allowEmptyValues:W,autoFocus:P}=a.toRefs(e),G=xn(),B=a.ref(),ie=a.ref(),le=a.ref(),ve=a.ref(),Ie=a.ref(),ge=a.ref(),he=a.ref(),K=a.ref(new Map),$=a.computed(()=>[...K.value.values()]),V=a.ref(new Map),J=a.ref([]),re=a.computed(()=>J.value.reduce((Le,Ae)=>(Le[Ae.value]=Ae.label,Le),{})),U=a.ref();a.watch(n,()=>{var Le;Ql(),e.withValidate&&((Le=G==null?void 0:G.validate)==null||Le.call(G,"blur"))},{deep:!0}),a.watch(J,()=>{var Le;(Le=he.value)==null||Le.updatePopover(null,te.value)});const q=a.computed(()=>D.value?M.value:M.value.filter(Le=>{var Ae;return(Ae=Fa(String(Le[S.value])))==null?void 0:Ae.includes(Fa(mi.value))})),ce=a.computed(()=>i.value||d.value),we=a.computed(()=>J.value.map(Le=>{var Ae,_e;return((_e=(Ae=K.value)==null?void 0:Ae.get(Le.value))==null?void 0:_e.label)||Le.label})),X=a.computed(()=>{const Le=$.value.reduce((Ae,_e)=>(_e.disabled||Ae.push(_e.value),Ae),[]);return Le.length<=J.value.length&&Le.every(Ae=>J.value.some(_e=>_e.value===Ae))}),H=a.computed(()=>!!V.value.size),Q=a.computed(()=>!$.value.length),ae=a.computed(()=>$.value.length&&$.value.every(Le=>!Le.visible)),D=a.computed(()=>s.value&&typeof c.value=="function"),_=a.computed(()=>!(rs.value||Q.value||ae.value)||k.value),R=a.computed(()=>o.value&&C.value&&(!mi.value||!s.value)),de=a.computed(()=>I.value-12-(R.value?32:0)),ue=a.computed(()=>rs.value?u.value:Q.value?f.value:ae.value?m.value:""),me=a.computed(()=>j.value?z.value&&!ct.value:z.value),te=a.computed(()=>ot.exports.merge({theme:"light bk-select-popover",trigger:"manual",width:ft.value,arrow:!1,placement:"bottom-start",isShow:ct.value,reference:Ie.value,offset:6,popoverDelay:0},O.value)),{register:se,unregister:be}=Fc(K),{register:ke,unregister:Oe}=Fc(V),{isHover:Ve,setHover:et,cancelHover:rn}=Ch(),tt=a.ref(!1),rt=()=>{tt.value||(tt.value=!0,t("focus"))},Cn=()=>{!tt.value||(tt.value=!1,t("blur"))},{popperWidth:ft,isPopoverShow:ct,hidePopover:Fe,showPopover:zt,togglePopover:ma}=b5({popoverMinWidth:p.value},ie);a.watch(ct,()=>{t("toggle",ct.value)});const is=a.computed(()=>(s.value&&L.value||v.value)&&ct.value);a.watch(ct,Le=>{Le?setTimeout(()=>{pa(),er()},0):mi.value=""});const er=()=>{var _e;const Le=J.value[0],Ae=K.value.get(Le==null?void 0:Le.value);Ae&&!Ae.disabled&&Ae.visible?U.value=Le==null?void 0:Le.value:U.value=(_e=$.value.find(Xn=>!Xn.disabled&&Xn.visible))==null?void 0:_e.value},as=Le=>{!s.value||$.value.forEach(Ae=>{var _e;Ae.visible=(_e=Fa(String(Ae.label)))==null?void 0:_e.includes(Fa(Le))})},{searchKey:mi,searchLoading:rs}=y5(D.value?c.value:as,er),Kn=Le=>{Le!==n.value&&(t("update:modelValue",Le,n.value),t("change",Le,n.value))},Vl=()=>{ce.value||(rt(),ma())},Jl=Le=>{!s.value||(mi.value=Le)},Fu=(Le,Ae)=>{const _e=String(Le);!v.value||!_e||s.value&&$.value.find(Hi=>Fa(String(Hi.label))===Fa(_e))||K.value.get(_e)||(Ae.stopPropagation(),o.value?(J.value.push({value:_e,label:_e}),Kn(J.value.map(Hi=>Hi.value))):(J.value=[{value:_e,label:_e}],Kn(_e),Fe()),mi.value="")},ss=Le=>{if(!(ce.value||!Le)){if(o.value){const Ae=J.value.findIndex(_e=>_e.value===Le.value);Ae>-1?J.value.splice(Ae,1):J.value.push({value:Le.value,label:Le.label||Le.value}),Kn(J.value.map(_e=>_e.value))}else J.value=[{label:Le.label||Le.value,value:Le.value}],Kn(Le.value),Fe();pa()}},pa=()=>{setTimeout(()=>{var Le,Ae,_e;!L.value&&!v.value?(Le=ve.value)==null||Le.focus():b.value==="tag"?(Ae=Ie.value)==null||Ae.focus():(_e=B.value)==null||_e.focus()},0)},Gu=Le=>{Le.stopPropagation(),J.value=[],Kn(o.value?[]:""),t("clear",o.value?[]:""),Fe()},Rl=()=>{U.value=""},Zu=()=>{X.value?J.value=[]:$.value.forEach(Le=>{Le.disabled||J.value.find(Ae=>Ae.value===Le.value)||J.value.push({value:Le.value,label:Le.label||Le.value})}),Kn(J.value.map(Le=>Le.value)),pa()},Yu=Le=>{const{scrollTop:Ae,clientHeight:_e,scrollHeight:Xn}=Le.target;Ae+_e===Xn&&t("scroll-end")},Uu=Le=>{if(ce.value)return;const Ae=J.value.findIndex(_e=>_e.value===Le);Ae>-1&&(J.value.splice(Ae,1),Kn(J.value.map(_e=>_e.value)))},ba=Le=>{var Ae,_e;return((_e=(Ae=K.value)==null?void 0:Ae.get(Le))==null?void 0:_e.label)||re.value[Le]||Le},Ql=()=>{Array.isArray(n.value)?J.value=[...n.value.map(Le=>({value:Le,label:ba(Le)}))]:!!n.value||W.value.includes(n.value)?J.value=[{value:n.value,label:ba(n.value)}]:J.value=[]},ya=Le=>{var Xn,Hi,_l,ls;if(!((Xn=ie.value)!=null&&Xn.contains(Le.target))&&!((Hi=le.value)!=null&&Hi.contains(Le.target))&&!k.value)return;const Ae=$.value.filter(Xt=>!Xt.disabled&&Xt.visible),_e=Ae.findIndex(Xt=>Xt.value===U.value);if(!(!Ae.length||_e===-1))switch(Le.code){case"ArrowDown":{Le.preventDefault();const Xt=_e>=Ae.length-1?0:_e+1;U.value=(_l=Ae[Xt])==null?void 0:_l.value;break}case"ArrowUp":{Le.preventDefault();const Xt=_e===0?Ae.length-1:_e-1;U.value=(ls=Ae[Xt])==null?void 0:ls.value;break}case"Backspace":{if(!o.value||!J.value.length||mi.value.length||Le.target===ve.value)return;J.value.pop(),Kn(J.value.map(Xt=>Xt.value));break}case"Enter":{if(!ct.value)ct.value=!0;else{const Xt=K.value.get(U.value);ss(Xt)}break}}},$u=({event:Le})=>{var _e;const{target:Ae}=Le;((_e=ie.value)==null?void 0:_e.contains(Ae))||ie.value===Ae||(Fe(),Cn())},Ku=()=>{setTimeout(()=>{var Le,Ae;N.value&&((Ae=(Le=ge.value)==null?void 0:Le.reset)==null||Ae.call(Le))})};return a.provide(cl,a.reactive({multiple:o,selected:J,activeOptionValue:U,showSelectedIcon:T,register:se,unregister:be,registerGroup:ke,unregisterGroup:Oe,handleOptionSelected:ss,handleGetLabelByValue:ba})),a.onMounted(()=>{Ql(),setTimeout(()=>{y.value&&zt(),P.value&&pa()}),C2(document,"keydown",ya)}),a.onBeforeMount(()=>{v2(document,"keydown",ya)}),{selected:J,isInput:is,options:$,isDisabled:ce,selectedLabel:we,isPopoverShow:ct,isHover:Ve,popperWidth:ft,inputRef:B,triggerRef:ie,contentRef:le,searchRef:ve,selectTagInputRef:Ie,virtualRenderRef:ge,popoverRef:he,searchLoading:rs,isOptionsEmpty:Q,isSearchEmpty:ae,isFocus:tt,isShowSelectContent:_,curContentText:ue,isGroup:H,searchKey:mi,isShowSelectAll:R,virtualHeight:de,filterList:q,isCollapseTags:me,popoverConfig:te,focusInput:pa,setHover:et,cancelHover:rn,handleFocus:rt,handleBlur:Cn,handleTogglePopover:Vl,handleClear:Gu,hidePopover:Fe,showPopover:zt,handleToggleAll:Zu,handleOptionSelected:ss,handleClickOutside:$u,handleScroll:Yu,handleDeleteTag:Uu,handleInputChange:Jl,handleInputEnter:Fu,handleKeydown:ya,handleSelectedAllOptionMouseEnter:Rl,handlePopoverShow:Ku}},render(){const e=ze({"bk-select":!0,"popover-show":this.isPopoverShow,"is-disabled":this.isDisabled,"is-focus":this.isFocus,"is-filterable":this.filterable,[this.size]:!0,[this.behavior]:!0}),t=()=>this.loading?a.createVNode(xi,{loading:!0,theme:"primary",class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length&&!this.isDisabled?a.createVNode(Zt,{class:"clear-icon",onClick:this.handleClear},null):a.createVNode(_a,{class:"angle-up"},null),n=()=>this.multipleMode==="tag"?a.createVNode(S5,{ref:"selectTagInputRef",modelValue:this.searchKey,"onUpdate:modelValue":o=>this.searchKey=o,selected:this.selected,tagTheme:this.tagTheme,placeholder:this.placeholder,filterable:this.isInput,disabled:this.isDisabled,onRemove:this.handleDeleteTag,collapseTags:this.isCollapseTags,onEnter:this.handleInputEnter},{prefix:()=>{var o,c;return(c=(o=this.$slots).prefix)==null?void 0:c.call(o)},default:this.$slots.tag&&(()=>this.$slots.tag({selected:this.selected})),suffix:()=>t()}):a.createVNode(ia,{ref:"inputRef",type:"text",modelValue:this.isInput?this.searchKey:this.selectedLabel.join(","),placeholder:this.isInput?this.selectedLabel.join(",")||this.placeholder:this.placeholder,readonly:!this.isInput,selectReadonly:!0,disabled:this.isDisabled,behavior:this.behavior,size:this.size,withValidate:!1,onInput:this.handleInputChange,onEnter:this.handleInputEnter},{prefix:()=>{var o,c;return(c=(o=this.$slots).prefix)==null?void 0:c.call(o)},suffix:()=>t()}),i=()=>a.createVNode("div",{class:"bk-select-trigger",style:{height:this.autoHeight&&this.collapseTags?"32px":""},ref:"triggerRef",onClick:this.handleTogglePopover,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[n()]),s=()=>{var o,c;return a.createVNode("div",{class:"bk-select-content-wrapper",ref:"contentRef"},[this.filterable&&!this.inputSearch&&a.createVNode("div",{class:"bk-select-search-wrapper"},[a.createVNode(Wa,{class:"icon-search",width:16,height:16},null),a.withDirectives(a.createVNode("input",{ref:"searchRef",class:"bk-select-search-input",placeholder:this.searchPlaceholder,"onUpdate:modelValue":d=>this.searchKey=d},null),[[a.vModelText,this.searchKey]])]),!this.isShowSelectContent&&a.createVNode("div",{class:"bk-select-empty"},[this.searchLoading&&a.createVNode(xi,{class:"mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),a.createVNode("span",null,[this.curContentText])]),a.createVNode("div",{class:"bk-select-content"},[a.createVNode("div",{class:"bk-select-dropdown",style:{maxHeight:`${this.scrollHeight}px`},onScroll:this.handleScroll},[a.withDirectives(a.createVNode("ul",{class:"bk-select-options"},[this.isShowSelectAll&&a.createVNode("li",{class:"bk-select-option",onMouseenter:this.handleSelectedAllOptionMouseEnter,onClick:this.handleToggleAll},[this.selectAllText]),this.enableVirtualRender?a.createVNode(Wr,{list:this.filterList,height:this.virtualHeight,lineHeight:32,ref:"virtualRenderRef"},{default:({data:d})=>d.map(u=>a.createVNode(ul,{key:u[this.idKey],value:u[this.idKey],label:u[this.displayKey]},null))}):this.filterList.map(d=>a.createVNode(ul,{value:d[this.idKey],label:d[this.displayKey]},null)),(c=(o=this.$slots).default)==null?void 0:c.call(o),this.scrollLoading&&a.createVNode("li",{class:"bk-select-options-loading"},[a.createVNode(xi,{class:"spinner mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),a.createVNode("span",null,[this.loadingText])])]),[[a.vShow,this.isShowSelectContent]])]),this.$slots.extension&&a.createVNode("div",{class:"bk-select-extension"},[this.$slots.extension()])])])};return a.createVNode("div",{class:e},[a.createVNode(mn,a.mergeProps(this.popoverConfig,{onClickoutside:this.handleClickOutside,onAfterShow:this.handlePopoverShow,ref:"popoverRef"}),{default:()=>i(),content:()=>s()})])}});const Zc=Gt(x5,{Option:ul,Group:C5});function D5(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const{propsMixin:j5}=aa,Yc=Object.assign({},j5);Yc.width.default="400",Yc.height.default="100%";var z5=a.defineComponent({name:"Sideslider",components:{BkModal:aa,BkButton:Pt},props:Se(Z({},Yc),{direction:{type:String,default:"right",validator:e=>{const t=["left","right"];return t.indexOf(e)<0?(console.error(`direction property is not valid: '${e}',\u3010${t.join(" | ")}\u3011`),!1):!0}}}),emits:["closed","update:isShow","shown","hidden","animation-end"],setup(e,{slots:t,emit:n}){const i=async()=>{let c=!0;typeof e.beforeClose=="function"&&(c=await e.beforeClose()),c&&(n("update:isShow",!1),n("closed"),setTimeout(()=>{n("animation-end")},250))},s=()=>{setTimeout(()=>{n("shown")},200)},o=()=>{setTimeout(()=>{n("hidden")},200)};return()=>{const c={header:()=>{var f,m;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"bk-sideslider-header"},[a.createVNode("div",{class:`bk-sideslider-close ${e.direction}`,onClick:()=>{i()}},null),a.createVNode("div",{class:`bk-sideslider-title ${e.direction}`},[(m=(f=t.header)==null?void 0:f.call(t))!=null?m:e.title])])])},default:()=>{var f,m;return(m=(f=t.default)==null?void 0:f.call(t))!=null?m:"Content"},footer:()=>t.footer?a.createVNode("div",{class:"bk-sideslider-footer"},[t.footer()]):null},d=`bk-sideslider-wrapper ${e.scrollable?"scroll-able":""} ${e.extCls}`,u=t.footer?"calc(100vh - 106px)":"calc(100vh - 52px)";return a.createVNode(aa,a.mergeProps(e,{maxHeight:u,class:d,style:`${e.direction}: 0;`,onHidden:o,onShown:s,onClose:i}),D5(c)?c:{default:()=>[c]})}}});const Ih=Ge(z5);var Uc;(function(e){e.UNKNOWN="",e.ERROR="error",e.LOADING="loading"})(Uc||(Uc={}));const Nh={theme:g.theme().def(Os.PRIMARY),size:g.size(),curStep:g.number.def(1),controllable:g.bool.def(!1),direction:qf(),status:Pe("status",{}).def(Uc.UNKNOWN),lineType:e0(),text:g.bool,extCls:g.string,steps:g.array.def([]),beforeChange:g.func};var O5=a.defineComponent({name:"Steps",props:Nh,emits:["update:curStep","click"],setup(e,{emit:t}){const n=a.ref([]),i=d=>{const u=[];d.forEach(f=>{var m;typeof f=="string"?u.push(f):u.push({title:f.title,icon:f.icon,description:f.description,status:f.status,border:(m=f.border)!=null?m:!0})}),n.value.splice(0,n.value.length,...u)},s=d=>{Nh.curStep=d},o=()=>{var d;n.value.splice(0,n.value.length,{title:"\u6B65\u9AA41",icon:1},{title:"\u6B65\u9AA42",icon:2},{title:"\u6B65\u9AA43",icon:3}),(d=e.steps)!=null&&d.length&&i(e.steps)},c=async d=>{try{e.controllable&&d!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(u,f)=>{const m=await e.beforeChange(d);m?u(m):f(m)}),t("update:curStep",d),t("click",d))}catch(u){console.warn(u)}};return a.onMounted(o),a.watch(()=>e.steps,()=>{i(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{s(e.curStep)},{deep:!0}),{defaultSteps:n,jumpTo:c}},render(){const e="bk-steps",t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",i=ze({[`${this.extCls}`]:!!this.extCls,[`bk-steps-${this.direction}`]:this.direction,[`bk-steps-${this.lineType}`]:this.lineType},`${t} ${e} ${n}`),s=p=>this.curStep>p+1||this.defaultSteps[p].status==="done",o=p=>this.curStep===p+1,c=p=>{const{icon:y}=p;return y?Object.prototype.toString.call(y)==="[object Object]":typeof p=="string"},d=(p,y)=>(y.icon||(y.icon=p),!isNaN(y.icon)),u=p=>p.status==="loading",f=p=>p.status==="error",m=(p,y)=>o(p)&&this.status==="loading"||u(y)?a.createVNode(Rs,{class:"bk-icon bk-steps-icon icon-loading"},null):o(p)&&this.status==="error"||f(y)?a.createVNode(Hn,{class:"bk-steps-icon"},null):s(p)?a.createVNode(na,{class:"bk-steps-icon"},null):a.createVNode("span",null,[d(p,y)?p+1:a.createVNode(y.icon,null,null)]);return a.createVNode("div",{class:i},[this.defaultSteps.map((p,y)=>{var b,v,k;return a.createVNode("div",{class:["bk-step",p.title?"":"bk-step-no-content",s(y)?"done":"",o(y)?"current":"",o(y)&&this.status==="error"?"isError":"",p.status&&o(y)?[`bk-step-${p.status}`]:""]},[a.createVNode("span",{class:["bk-step-indicator",`bk-step-${c(p)?"icon":"number"}`,`bk-step-icon${p.status}`],style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(y+1)}},[(k=(v=(b=this.$slots)[y+1])==null?void 0:v.call(b))!=null?k:m(y,p)]),p.title?a.createVNode("div",{class:"bk-step-content"},[a.createVNode("div",{class:"bk-step-title",style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(y+1)}},[p.title]),p.description&&a.createVNode("div",{class:"bk-step-description",title:p.description},[p.description])]):""])})])}});const Lh=Ge(O5);var A5=a.defineComponent({name:"Switcher",props:{theme:g.theme(),size:g.size(),disabled:g.bool,showText:g.bool,isOutline:g.bool,onText:g.string.def("ON"),offText:g.string.def("OFF"),isSquare:g.bool,extCls:g.string,beforeChange:g.func.def(void 0),trueValue:g.oneOfType([g.string,g.number,g.bool]).def(!0),falseValue:g.oneOfType([g.string,g.number,g.bool]).def(!1),value:g.oneOfType([g.string,g.number,g.bool]).def(!1),modelValue:g.oneOfType([g.string,g.number,g.bool]).def(!1),withValidate:g.bool.def(!0)},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=xn(),i=a.ref(!1),s=a.computed(()=>e.trueValue===c.value),o=a.ref(e.modelValue!==!1),c=a.computed(()=>o.value?e.modelValue:e.value),d=a.computed(()=>{const m={[e.extCls]:!!e.extCls,"bk-switcher":!0,"bk-switcher-outline":e.isOutline,"bk-switcher-square":e.isSquare,"show-label":e.showText,"is-disabled":e.disabled,"is-checked":s.value,"is-unchecked":!s.value,"is-loading":i.value,"bk-primary":e.theme==="primary"};if(e.size&&!e.showText){const p=`bk-switcher-${e.size}`;m[p]=!0}return m});a.watch(()=>e.modelValue,()=>{var m;o.value=!0,e.withValidate&&((m=n==null?void 0:n.validate)==null||m.call(n,"change"))}),a.watch(()=>e.value,()=>{o.value=!1});const u=m=>{if(m.stopPropagation(),m.preventDefault(),e.disabled||i.value)return;const p=s.value?e.falseValue:e.trueValue,y=!s.value,b=()=>{t("update:modelValue",p),t("change",y)};let v=!0;if(typeof e.beforeChange=="function"&&(v=e.beforeChange(p),typeof v.then=="function"))return i.value=!0,v.then(()=>{b()}).finally(()=>{i.value=!1});v&&b()},f=m=>{(m.code==="Enter"||m.key==="Enter"||m.keyCode===13)&&u(m)};return()=>a.createVNode("div",{class:d.value,onClick:u,tabindex:"0",onKeydown:f},[i.value?a.createVNode(dc,{class:"bk-switcher-loading"},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[s.value?e.onText:e.offText]):""])}});const kh=Ge(A5);var fl=(e=>(e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e.HORIZONTAL="horizontal",e))(fl||{}),Th=(e=>(e.HIGHLIGHT="highlight",e.AUTO="auto",e))(Th||{});const P5=["auto","highlight"],E5=["none","row","col","outer","horizontal"];var pn=(e=>(e.ON_SORT_BY_CLICK="onSortByClick",e.ON_FILTER_CLICK="onFilterClick",e.ON_SETTING_CHANGE="onSettingChange",e.ON_ROW_EXPAND_CLICK="onRowExpandClick",e.ON_ROW_CHECK="onRowCheck",e))(pn||{}),Et=(e=>(e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.COLUMN_FILTER="columnFilter",e.COLUMN_FILTER_SAVE="colFilterSave",e.ROW_CLICK="rowClick",e.ROW_DBL_CLICK="rowDblclick",e.ROW_EXPAND_CLICK="rowExpand",e.PAGE_LIMIT_CHANGE="pageLimitChange",e.PAGE_VALUE_CHANGE="pageValueChange",e.SETTING_CHANGE="settingChange",e.SCROLL_BOTTOM="scrollBottom",e.ROW_SELECT="select",e.ROW_SELECT_ALL="selectAll",e.ROW_SELECT_CHANGE="selectionChange",e))(Et||{});const Ut=(...e)=>!0,V5={columnPick:Ut,columnFilter:Ut,columnSort:Ut,colFilterSave:Ut,rowClick:Ut,rowDblclick:Ut,rowExpand:Ut,select:Ut,selectAll:Ut,selectionChange:Ut,pageLimitChange:Ut,pageValueChange:Ut,settingChange:Ut,scrollBottom:Ut},He={ROW_INDEX:"__$table_row_index",ROW_UID:"__$uuid",ROW_EXPAND:"__row_expand",ROW_SELECTION:"__row_selection",ROW_SELECTION_ALL:"__row_selection_all",ROW_SELECTION_INDETERMINATE:"__row_selection_indeterminate",ROW_SOURCE_DATA:"__row_source_data",ROW_SKIP_CFG:"__row_skip_config"},oi={COL_UID:"__col_$uuid",COL_SOURCE_DATA:"__col_source_data"},$c=6,ci=42,hl={large:78,medium:60,small:42},J5=[{value:"small",label:"\u5C0F",height:hl.small},{value:"medium",label:"\u4E2D",height:hl.medium},{value:"large",label:"\u5927",height:hl.large}],Sh="InitColumns";var kt=(e=>(e.ASC="asc",e.DESC="desc",e.NULL="null",e.CUSTOM="custom",e))(kt||{});const R5=["asc","desc","null","custom"],Ga=80;var xh=(e=>(e.CURRENT="current",e.ALL="all",e))(xh||{});const Kc=Pe("showOverflowTooltipMode",{default:"auto"}),Q5=Pe("columnType",{default:"none"}),_5=Pe("full",{default:"full"});var Dh=(e=>(e.SMALL="small",e.MEDIUM="medium",e.LARGE="large",e))(Dh||{});const jh=Pe("columnSize",{default:"small"}),W5=Pe("columnSize",{}),zh=Pe("sortScope",{}).def("current"),Oh={label:g.oneOfType([g.func.def(()=>""),g.string.def("")]),field:g.oneOfType([g.func.def(()=>""),g.string.def("")]),render:g.oneOfType([g.func.def(()=>""),g.string.def("")]),width:g.oneOfType([g.number.def(void 0),g.string.def("auto")]),minWidth:g.oneOfType([g.number.def(void 0),g.string.def("auto")]).def(80),columnKey:g.string.def(""),showOverflowTooltip:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0),mode:Kc})]).def(void 0),type:Q5,resizable:g.bool.def(!0),fixed:g.oneOfType([g.bool,W5]).def(!1),sort:g.oneOfType([g.shape({sortFn:g.func.def(void 0),sortScope:zh,value:g.string.def(kt.NULL)}),g.bool,g.string]).def(!1),filter:g.oneOfType([g.shape({list:g.arrayOf(g.any).def([]),filterFn:g.func.def(void 0),match:_5,filterScope:zh,btnSave:g.oneOfType([g.bool,g.string]).def("\u786E\u5B9A"),btnReset:g.oneOfType([g.bool,g.string]).def("\u91CD\u7F6E")}),g.bool,g.string]).def(!1),colspan:g.oneOfType([g.func.def(()=>1),g.number.def(1)]),rowspan:g.oneOfType([g.func.def(()=>1),g.number.def(1)])},H5={data:g.arrayOf(g.any).def([]),columns:g.arrayOf(g.shape(Oh)).def([]),activeColumn:g.oneOfType([g.number.def(-1),g.arrayOf(g.number.def(-1))]),columnPick:Pe("columnPick",{}).def("disabled"),height:g.oneOfType([g.number,g.string]).def("auto"),minHeight:g.oneOfType([g.number,g.string]).def(ci*2),maxHeight:g.oneOfType([g.number,g.string]).def("auto"),rowHeight:g.oneOfType([g.number,g.func]).def(ci),headHeight:g.number.def(ci),showHead:g.bool.def(!0),thead:g.shape({height:g.number.def(ci),isShow:g.bool.def(!0),cellFn:g.func.def(void 0)}),virtualEnabled:g.bool.def(!1),border:g.oneOfType([g.arrayOf(Pe("boderType",{})),g.string]).def([fl.ROW]),pagination:g.oneOfType([g.bool.def(!1),g.object.def({})]).def(!1),remotePagination:g.bool.def(!1),emptyText:g.string.def("\u6682\u65E0\u6570\u636E"),settings:g.oneOfType([g.shape({fields:g.arrayOf(g.shape({label:g.string,field:g.string,disabled:g.bool})),checked:g.arrayOf(g.string),limit:g.number.def(0),size:jh,sizeList:g.shape([]),showLineHeight:g.bool.def(!0)}),g.bool]).def(!1),rowClass:g.oneOfType([g.string,g.object,g.func]).def({}),rowStyle:g.oneOfType([g.string,g.object,g.func]).def({}),cellStyle:g.oneOfType([g.string,g.object,g.func]).def({}),cellClass:g.oneOfType([g.string,g.object,g.func]).def({}),scrollLoading:g.oneOfType([g.object,g.bool]).def(void 0),reserveExpand:g.bool.def(!1),selectionKey:g.string.def(""),isSelectedFn:g.func.def(void 0),rowKey:g.oneOfType([g.string,g.func]).def(He.ROW_INDEX),showOverflowTooltip:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0),mode:Kc})]).def(!1),asyncData:g.bool.def(!1),rowHover:g.oneOf(P5).def(Th.HIGHLIGHT),defaultSort:g.shape({}).def({}),isRowSelectEnable:g.oneOfType([g.func.def(()=>!0),g.bool.def(!0)]).def(!0)};var Ah=a.defineComponent({name:"TableColumn",props:Se(Z({},Oh),{prop:g.oneOfType([g.func.def(()=>""),g.string.def("")])}),setup(e,{slots:t}){const n=a.inject(Sh,i=>{},!1);return a.onMounted(()=>{const i=a.reactive(Se(Z({},e),{field:e.prop||e.field}));n(i),i.render=t.default?s=>{var o;return(o=t.default)==null?void 0:o.call(t,s)}:void 0}),()=>{var i;return a.createVNode(a.Fragment,null,[(i=t.default)==null?void 0:i.call(t,{data:""})])}}});const Ph=(e,t)=>{if(e){if(typeof e=="object"){let n=Object.prototype.hasOwnProperty.call(e,"current")?e.current:e.value;return/\d+/.test(n)||(n=1),Se(Z(Z({},t),e),{current:n})}return t}return{}};var B5=(e,t)=>{const n=a.ref(0),i=a.ref(0);let s=a.reactive({count:0,limit:10,current:1,align:"right",layout:["total","limit","list"]});s=Ph(e.pagination,s);const o=a.ref(null),c=()=>{if(!e.pagination||e.remotePagination){n.value=0,i.value=e.data.length;return}n.value=(s.current-1)*s.limit,i.value=s.current*s.limit},d=a.reactive([]),u=(b,v)=>{typeof v=="function"&&b.sort(v)},f=(b,v)=>{if(typeof v=="function"){const k=b.filter((T,L)=>v(T,L,e.data));b.splice(0,b.length,...k)}},m=(b,v,k)=>{var N;const T=t.slice(),{sortScope:L}=(N=k==null?void 0:k.sort)!=null?N:{};L===xh.ALL&&u(T,v),d.splice(0,d.length,...T.slice(n.value,i.value)),f(d,b),u(d,v)},p=(b,v,k)=>{s=Ph(e.pagination,s),y(),c(),m(b,v,k)},y=()=>{!e.pagination||(o.value=e.remotePagination?s:Se(Z({},s),{count:e.data.length}))};return{pageData:d,localPagination:o,resolvePageData:m,watchEffectFn:p}},F5=(e,t)=>{const n=a.toRef(e,"scrollLoading"),i=()=>typeof n.value=="boolean"?{loading:!!n.value,inline:!0,title:"",size:ii.Normal,mode:Pr.Default,indicator:null}:n.value,s=a.computed(()=>n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object"));return{renderScrollLoading:()=>{var c,d,u;if(s.value){const{loading:f,size:m,mode:p,title:y,inline:b,indicator:v}=i();return(u=(d=(c=t.slots).fixedBottom)==null?void 0:d.call(c))!=null?u:a.createVNode(xi,{loading:f,size:m,mode:p,title:y,inline:b,indicator:v},null)}}}};function G5(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var Z5=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(e.limit);a.watch(()=>e.limit,s=>{t.value=s}),a.watch(()=>e.limitList,s=>{a.nextTick(()=>{s.includes(t.value)||([t.value]=s)})},{immediate:!0});const n=s=>{t.value=s};return{limit:t,render:({isFirst:s,isLast:o})=>{let c;return e.showLimit?a.createVNode("div",a.mergeProps({class:{"bk-pagination-limit":!0,"is-first":s,"is-last":o}},{disabled:e.disabled}),[a.createVNode("div",null,[a.createTextVNode("\u6BCF\u9875")]),a.createVNode(Zc,{class:"bk-pagination-limit-select",clearable:!1,size:"small",withValidate:!1,modelValue:t.value,onChange:n,disabled:e.disabled},G5(c=e.limitList.map((d,u)=>a.createVNode(ul,{value:d,label:`${d}`,key:`${u}_${d}`},null)))?c:{default:()=>[c]}),a.createVNode("div",null,[a.createTextVNode("\u6761")])]):null}}};const la=5;var Y5=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(1),n=a.computed(()=>t.value===1),i=a.computed(()=>t.value===e.totalPageNum),s=a.ref(!1),o=a.ref(!1),c=a.computed(()=>{s.value=!1,o.value=!1;const b=[];if(e.totalPageNum<=la+2){for(let T=2;T<=e.totalPageNum-1;T++)b.push(T);return b}const v=Math.floor(la/2);e.totalPageNum>la&&(s.value=t.value-v>2,o.value=t.value+v<e.totalPageNum-1);const k=Math.min(e.totalPageNum-la,Math.max(2,t.value-v));for(let T=k;T<k+la;T++)b.push(T);return b});a.watch(()=>e.modelValue,b=>{a.nextTick(()=>{b>=1&&b<=e.totalPageNum?t.value=b:b<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,b=>{t.value>b&&(t.value=b)})});const d=()=>{n.value||(t.value=t.value-1)},u=()=>{i.value||(t.value=t.value+1)},f=b=>{b!==t.value&&(t.value=b)},m=()=>{t.value=Math.max(1,t.value-la)},p=()=>{t.value=Math.min(e.totalPageNum,t.value+la)};return{current:t,render:({isFirst:b,isLast:v})=>a.createVNode("div",{class:{"bk-pagination-list":!0,"is-first":b,"is-last":v}},[a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":n.value},onClick:d},[e.prevText||a.createVNode(Si,null,null)]),a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===1},key:"1",onClick:()=>f(1)},[a.createTextVNode("1")]),s.value&&a.createVNode("div",{key:"pre-batch",class:"bk-pagination-list-pre-batch",onClick:m},[a.createVNode(Hs,null,null)]),c.value.map(k=>a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===k},key:k,onClick:()=>f(k)},[k])),o.value&&a.createVNode("div",{key:"next-batch",class:"bk-pagination-list-next-batch",onClick:p},[a.createVNode(Hs,null,null)]),e.totalPageNum>1&&a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>f(e.totalPageNum)},[e.totalPageNum]),a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":i.value},onClick:u},[e.nextText||a.createVNode(Dn,null,null)])])}},U5=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(null),n=a.ref(!1),i=a.ref(1),s=a.computed(()=>i.value===1),o=a.computed(()=>i.value===e.totalPageNum);let c=0;const d=a.computed(()=>{const T=[];for(let L=1;L<=e.totalPageNum;L++)T.push(L);return T});a.watch(()=>e.modelValue,T=>{a.nextTick(()=>{T>=1&&T<=e.totalPageNum?i.value=T:T<1?i.value=1:i.value=e.totalPageNum,c=i.value})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,T=>{i.value>T&&(i.value=T)})});const u=()=>{s.value||(i.value=i.value-1)},f=()=>{o.value||(i.value=i.value+1)},m=()=>{n.value=!0},p=()=>{n.value=!1,t.value.textContent=`${c}`,c!==i.value&&(i.value=c)},y=T=>{const L=T.target,N=Number(L.textContent);!N||N<1||N>e.totalPageNum||N===i.value||(c=N)},b=T=>{["Enter","NumpadEnter"].includes(T.code)&&(T.preventDefault(),p())},v=T=>{c=T,p()};return{current:i,render:()=>a.createVNode("div",{class:"bk-pagination-small-list"},[a.createVNode("div",{class:{"bk-pagination-btn-pre":!0,"is-disabled":s.value},onClick:u},[a.createVNode(Si,null,null)]),a.createVNode(mn,{theme:"light",trigger:"click",arrow:!1,width:56,boundary:"body",placement:"bottom"},{default:()=>a.createVNode("div",{class:{"bk-pagination-picker":!0,"is-focused":n.value}},[a.createVNode("span",{ref:t,class:"bk-pagination-editor",contenteditable:!0,spellcheck:"false",onFocus:m,onBlur:p,onInput:y,onKeydown:b},[i.value]),a.createVNode("span",null,[a.createTextVNode("/")]),a.createVNode("span",{class:"bk-pagination-small-list-total"},[e.totalPageNum])]),content:()=>a.createVNode("div",{class:"bk-pagination-picker-list"},[d.value.map(T=>a.createVNode("div",{class:{item:!0,"is-actived":T===i.value},key:T,onClick:()=>v(T)},[T]))])}),a.createVNode("div",{class:{"bk-pagination-btn-next":!0,"is-disabled":o.value},onClick:f},[a.createVNode(Dn,null,null)])])}},$5=()=>({isFirst:e,isLast:t})=>{const{props:n}=a.getCurrentInstance();return n.showTotalCount?a.createVNode("div",a.mergeProps({class:{"bk-pagination-total":!0,"is-first":e,"is-last":t}},{disabled:n.disabled}),[a.createTextVNode("\u5171\u8BA1"),a.createVNode("div",{class:"bk-pagination-total-num"},[n.count]),a.createTextVNode("\u6761")]):null};const K5={modelValue:g.number.def(1),count:g.number.def(0).isRequired,limit:g.number.def(10),limitList:g.arrayOf(Number).def([10,20,50,100]),showLimit:g.bool.def(!0),type:g.oneOf(["default","compact"]).def("default"),location:g.oneOf(["left","right"]).def("right"),align:g.oneOf(["left","center","right"]).def("left"),size:g.size(),small:g.bool.def(!1),showTotalCount:g.bool.def(!0),prevText:g.string,nextText:g.string,disabled:g.bool.def(!1),beforeChange:g.func,layout:g.custom(e=>{const t={total:!0,list:!0,limit:!0};return e.some(n=>t[n])},"layout \u7684\u503C\u53EA\u652F\u6301 * total\u3001list\u3001limit *").def(["total","list","limit"])};var X5=a.defineComponent({name:"Pagination",props:K5,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const n=a.ref(0),{count:i,limit:s}=a.toRefs(e),o=$5(),{current:c,render:d}=Y5(),{current:u,render:f}=U5(),{limit:m,render:p}=Z5();return a.watch([i,m,s],([y,b])=>{const v=Math.ceil(y/b);n.value=v<1?1:v},{immediate:!0}),a.watch(c,y=>{t.emit("update:modelValue",y),t.emit("change",y)}),a.watch(u,y=>{!e.small||(t.emit("update:modelValue",y),t.emit("change",y))}),a.watch(m,y=>{t.emit("limitChange",y)}),{totalPageNum:n,renderTotal:o,renderList:d,renderLimit:p,renderSmallList:f}},render(){const e=ze({"bk-pagination":!0,[`bk-pagination--${this.size}`]:!0,[`is-align-${this.align}`]:!0}),t={total:this.renderTotal,list:this.small?this.renderSmallList:this.renderList,limit:this.renderLimit};return a.createVNode("div",{class:e},[this.layout.map((n,i)=>t[n]({isFirst:i===0,isLast:i===this.layout.length-1}))])}});const Xc=Ge(X5),St=(e,t,n)=>{if(typeof t=="string")return Object.prototype.hasOwnProperty.call(e,t)?typeof e[t]=="function"?e[t].call(globalThis,...n):e[t]:void 0;if(Array.isArray(t))return t.map(i=>St(e,i,n)).filter(i=>i!==void 0).at(0)},qc=e=>/^\d+$/.test(`${e}`)?[parseInt(`${e}`,10)]:[],q5=e=>Eh(e,"auto"),Eh=(e,t="100%",n=null)=>{let i="";return/^auto|null|undefined$/ig.test(`${e}`)?i=t:i=/^\d+\.?\d+$/.test(`${e}`)?`${e}px`:e,n&&(i=`calc(${i} - ${n})`),i},eb=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>E5.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},Hr=(e,t=["resizeWidth","calcWidth","width"])=>{var n,i;return(i=(n=e[t[0]])!=null?n:e[t[1]])!=null?i:e[t[2]]},eu=(e,t,n=Ga,i=0)=>{const{width:s}=e.getBoundingClientRect()||{},o=s-i;let c=o;const d=[],u=(m,p)=>{const{minWidth:y=void 0}=m;if(y===void 0)return p<Ga?Ga:p;let b=p;return/^\d+\.?\d*$/.test(`${y}`)&&(b=Number(y)),/^\d+\.?\d*%$/.test(`${y}`)&&(b=Number(y)*o/100),/^\d+\.?\d*px$/i.test(`${y}`)&&(b=Number(`${y}`.replace(/px/i,""))),b},f=(m,p,y=!0)=>{const b=u(m,p),v=p<b?b:p;Object.assign(m,{calcWidth:v}),y&&(c=c-v,c<0&&(c=0))};if(t.forEach((m,p)=>{if(!m.isHidden){const b=String(Hr(m,["resizeWidth","width"]));let v=!0;if(/^\d+\.?\d*(px)?$/.test(b)){const k=Number(b.replace("px",""));f(m,k),v=!1}if(/^\d+\.?\d*%$/.test(b)){let k=n;if(c>0){const T=Number(b.replace("%",""));k=c*T/100}f(m,k),v=!1}v&&d.push(p)}}),d.length>0){let m=n;c>0?d.forEach((p,y)=>{m=c/(d.length-y),f(t[p],m,!1);const{calcWidth:b}=t[p];c=c-b}):d.forEach(p=>{const y=u(t[p],Ga);Object.assign(t[p],{calcWidth:y})})}},Vh=(e,t,n=60,i=!1)=>{const s=ot.exports.throttle(()=>{typeof t=="function"&&t()},n),o=new ResizeObserver(()=>{s()});return i&&typeof t=="function"&&t(),{start:()=>{o.observe(e)},stop:()=>{o.disconnect(),o.unobserve(e)}}},tu=e=>{const{showHead:t,headHeight:n,thead:i={}}=e;return Object.assign({},{isShow:t,height:n},Z({},i))},gl=(e,t,n)=>n.type==="index"?e[He.ROW_INDEX]+1:ot.exports.get(e,t),Br=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Br(Reflect.apply(e,globalThis,t),t):[],tb=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===He.ROW_INDEX?`__ROW_INDEX_${n}`:ot.exports.get(e,t.rowKey):typeof t.rowKey=="function"?Reflect.apply(t.rowKey,globalThis,[e]):Li.v4(),nb=(e,t,n=0)=>{if(e){const i=e.querySelector(t);if(i)return i.offsetHeight>e.offsetHeight-n}return!1},ib=(e,t)=>{function n(o,c){const u=(n.canvas||(n.canvas=document.createElement("canvas"))).getContext("2d");return u.font=c,u.measureText(o).width}function i(o,c){return window.getComputedStyle(o,null).getPropertyValue(c)}function s(o=document.body){const c=i(o,"font-weight")||"normal",d=i(o,"font-size")||"16px",u=i(o,"font-family")||"Times New Roman";return`${c} ${d} ${u}`}return n(t||(e==null?void 0:e.innerHTML),s(e))},Jh=(e,t,n)=>(s=>e.some(o=>o.field===St(s,["field","type"],[s])))(t)&&n.length&&!n.includes(St(t,["field","type"],[t])),Rh=(e,t,n,i,s)=>typeof e[s]=="function"?Reflect.apply(e[s],globalThis,[{column:e,colIndex:t,row:n,rowIndex:i}]):typeof e[s]=="number"?e[s]:1,Qh=(e,t,n,i)=>{const s=Rh(e,t,n,i,"colspan"),o=Rh(e,t,n,i,"rowspan");return{colspan:s,rowspan:o}},_h=(e,t)=>{var c,d;const n=e.field,i=u=>gl(u,n,e),s=(u,f)=>{const m=i(u)||"",p=i(f)||"";return typeof m=="number"&&typeof p=="number"?m-p:String.prototype.localeCompare.call(m,p)},o=typeof((c=e.sort)==null?void 0:c.sortFn)=="function"?(d=e.sort)==null?void 0:d.sortFn:s;return t===kt.NULL?()=>!0:(u,f)=>o(u,f)*(t===kt.DESC?-1:1)},Wh=e=>{const t={[kt.NULL]:0,[kt.ASC]:1,[kt.DESC]:2};return e===void 0?kt.NULL:Object.keys(t)[(t[e]+1)%3]},Hh=e=>{if(typeof e=="string")return{value:e};if(typeof e=="boolean"&&e)return{value:kt.NULL};if(typeof e=="object"&&e!==null){return e.sortFn,Z({value:"custom"},e);return e}return null},ml=(e,{row:t,index:n,isCheckAll:i})=>typeof e.isRowSelectEnable=="boolean"?e.isRowSelectEnable!==!1:typeof e.isRowSelectEnable=="function"?e.isRowSelectEnable({row:t,index:n,isCheckAll:i}):!0;var Bh=a.defineComponent({name:"TableCell",props:{column:g.any.def({}),row:g.any.def({}),parentSetting:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0),mode:Kc})]).def(void 0),title:g.string.def(void 0)},setup(e,{slots:t}){const n=a.ref(),i=a.ref(!1),s=()=>/boolean|object/.test(typeof e.column.showOverflowTooltip)&&e.column.showOverflowTooltip!==null?e.column:{showOverflowTooltip:e.parentSetting},{showOverflowTooltip:o=!1}=s();let c=null,d=null;const u=()=>{let m=!0,p=n.value.innerText,y="auto";return typeof o=="boolean"&&(m=!o),typeof o=="object"&&(m=o.disabled,typeof o.content=="function"&&(p=o.content(e.column,e.row)),p=o.content||n.value.innerText,y=o.mode||"auto"),{disabled:m,content:p,mode:y}},f=()=>{if(!n.value||/selection|index|expand/.test(e.column.type)||!Aa(n.value))return;const{content:m,mode:p}=u();if(p==="auto"){const y=ib(n.value,m),b=n.value.clientWidth,v=window.getComputedStyle(n.value),k=["padding-left","padding-right"].reduce((L,N)=>L+Number(v.getPropertyValue(N).replace("px","")),0),T=b-k;i.value=y>T}if(p==="static"&&(i.value=!0),i.value){const y=a.ref(u());d===null&&(d=Jc(n.value,y))}else d==null||d.destroyInstance(n.value),d=null};return a.onMounted(()=>{var p;const{disabled:m}=u();m||(f(),((p=e.column.showOverflowTooltip)==null?void 0:p.watchCellResize)!==!1&&(c=Vh(n.value,()=>{f()},60,!0),c.start()))}),a.onBeforeUnmount(()=>{c==null||c.stop(),d==null||d.destroyInstance(n.value)}),()=>{var m;return a.createVNode("div",{class:["cell",e.column.type],ref:n,title:e.title},[(m=t.default)==null?void 0:m.call(t)])}}}),nu=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)])}}),ab=a.defineComponent({name:"BodyEmpty",props:{list:g.array.def([]),filterList:g.array.def([]),emptyText:g.string.def("\u6682\u65E0\u6570\u636E")},emits:["change"],setup(e){const t=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode($s,{scene:"part",type:t.value,description:e.emptyText},null)}});function rb(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var sb=a.defineComponent({name:"HeadFilter",props:{column:g.any.def({}),height:g.number.def(ci)},emits:["change","filterSave"],setup(e,{emit:t}){const{column:n}=e,i=a.reactive({isOpen:!1,checked:[]}),s=a.computed(()=>ze({[je("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:i.checked.length,opened:i.isOpen})),o=ze({[je("table-head-filter")]:!0}),c=I=>{i.isOpen=I},d=`light ${je("table-head-filter")}`,u=a.computed(()=>{const{list:I=[]}=n.filter;return I.map(M=>Se(Z({},M),{checked:i.checked.includes(M.value)}))}),f=(I,M="ig")=>new RegExp(`${I}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),M),m=(I,M)=>{const{match:S}=n.filter,z=gl(M,St(n,"field",[n,M]),n);return S==="full"&&I.includes(z),I.some(j=>f(j,"img").test(z))},p=typeof n.filter.filterFn=="function"?(I,M,S,z)=>n.filter.filterFn(I,M,e.column,S,z):(I,M)=>I.length?m(I,M):!0,y=()=>{b(!0),t("filterSave",[...i.checked]),i.isOpen=!1},b=(I=!1)=>{const{disabled:M}=k(T,"\u786E\u5B9A");if(M||I){if(e.column.filter==="custom"){t("change",[...i.checked],null),i.isOpen=!1;return}t("change",[...i.checked],p)}},v=()=>{i.checked.length&&(i.checked.splice(0,i.checked.length),i.isOpen=!1,a.nextTick(()=>t("change",i.checked,p)))},k=(I,M)=>({disabled:I==="disabled"||I===!1,text:typeof I=="string"?I:M}),{btnSave:T,btnReset:L}=n.filter,N=()=>{const{disabled:I,text:M}=k(T,"\u786E\u5B9A");return I?a.createVNode("span",{class:"btn-filter-save disabled"},[M]):a.createVNode("span",{class:"btn-filter-save",onClick:y},[M])},C=()=>{const{disabled:I,text:M}=k(L,"\u91CD\u7F6E");return I?"":a.createVNode("span",{class:["btn-filter-reset",i.checked.length?"":"disable"],onClick:v},[M])};return()=>a.createVNode(mn,a.mergeProps({trigger:"click",isShow:i.isOpen,placement:"bottom-start",arrow:!1,offset:0},{theme:d},{onAfterShow:()=>c(!0),onAfterHidden:()=>c(!1)}),{default:()=>a.createVNode(lc,{class:s.value},null),content:()=>{let I;return a.createVNode("div",{class:o},[a.createVNode(vc,{class:"content-list",modelValue:i.checked,"onUpdate:modelValue":M=>i.checked=M,onChange:()=>b(!1)},rb(I=u.value.map(M=>a.createVNode("div",{class:"list-item"},[a.createVNode(ji,{label:M.value},{default:()=>[M.text]})])))?I:{default:()=>[I]}),a.createVNode("div",{class:"content-footer"},[N(),a.createVNode("span",{class:"btn-filter-split"},null),C()])])}})}}),lb=a.defineComponent({name:"HeadSort",props:{column:g.any.def({}),defaultSort:g.oneOf(R5).def(kt.NULL)},emits:["change"],setup(e,{emit:t}){var o,c;const n=((c=(o=e.column)==null?void 0:o.sort)==null?void 0:c.value)||e.defaultSort||kt.NULL,i=a.ref(n);a.watch(()=>[e.defaultSort],([d])=>{i.value=d});const s=(d,u)=>{d.stopImmediatePropagation(),d.stopPropagation(),d.preventDefault();let f=u;u===kt.NULL&&(f=Wh(u)),i.value===u&&(f=kt.NULL);const m=Hh(e.column.sort);if((m==null?void 0:m.value)==="custom"){t("change",m==null?void 0:m.sortFn,f);return}const p=_h(e.column,f);t("change",p,f)};return()=>a.createVNode("span",{class:je("head-cell-sort"),onClick:d=>s(d,kt.NULL)},[a.createVNode($o,{class:["sort-action","sort-asc",i.value===kt.ASC?"active":""],onClick:d=>s(d,kt.ASC)},null),a.createVNode(Js,{class:["sort-action","sort-desc",i.value===kt.DESC?"active":""],onClick:d=>s(d,kt.DESC)},null)])}});class ob{constructor(t,n){mr(this,"props",null);mr(this,"ctx",null);this.props=t,this.ctx=n}}function Fh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var cb=a.defineComponent({name:"Settings",props:{settings:g.oneOfType([g.shape({fields:g.arrayOf(g.shape({label:g.string,field:g.string,disabled:g.bool})),checked:g.arrayOf(g.string),limit:g.number.def(0),size:jh.def(Dh.SMALL),sizeList:g.shape([]),showLineHeight:g.bool.def(!0)}),g.bool]).def(!1),columns:g.array.def([]),rowHeight:g.number.def(ci)},emits:["change"],setup(e,{emit:t}){const n=J5,i=(G,B)=>St(G,["field","type"],[G,B]),s=a.ref(!1),o=a.ref(!1),c=typeof e.settings=="boolean"?a.ref({fields:e.columns.map(G=>Se(Z({},G),{field:G.field||G.type})),checked:[],limit:0,size:"small",sizeList:n,showLineHeight:!0}):a.ref(e.settings),d=a.ref(c.value.size||"small"),u=a.ref(e.rowHeight),f=a.ref(c.value.checked||[]),p=`light ${je("table-settings")}`,y=a.computed(()=>c.value.fields||e.columns||[]),b={checkAll:s.value,activeSize:d.value,activeHeight:u.value,checkedFields:c.value.checked||[]},v=()=>{Object.assign(b,{checkAll:s.value,activeSize:d.value,activeHeight:u.value,checkedFields:f.value}),t("change",{checked:f.value,size:d.value,height:u.value,fields:a.unref(y)}),o.value=!1},k=()=>{s.value=b.checkAll,d.value=b.activeSize,u.value=b.activeHeight,f.value=b.checkedFields,o.value=!1},T=()=>{o.value=!0},L=G=>{G.stopImmediatePropagation(),G.stopPropagation(),G.preventDefault(),s.value=!s.value;const B=c.value.fields||e.columns||[],ie=B.filter((le,ve)=>le.disabled&&f.value.includes(i(le,ve))).map((le,ve)=>i(le,ve));if(s.value){const le=B.filter(ve=>!ve.disabled).map((ve,Ie)=>i(ve,Ie));f.value.splice(0,f.value.length,...le,...ie)}else f.value.splice(0,f.value.length,...ie)},N=a.computed(()=>{var G;return((G=c.value.limit)!=null?G:0)>0}),C=c.value.sizeList||n,I=a.computed(()=>N.value&&(c.value.limit?c.value.limit:0)<=f.value.length),M=(G,B)=>G.disabled||I.value&&!f.value.includes(i(G,B)),S=G=>{d.value=G.value,u.value=G.height},z=G=>({"line-size":!0,"is-medium":d.value==="medium",active:G.value===d.value}),j={marginRight:"12px"},O=()=>C.map(G=>a.createVNode("span",{class:z(G),onClick:()=>S(G)},[G.label])),W=a.computed(()=>f.value.length>0&&!y.value.every((G,B)=>f.value.includes(St(G,"field",[G,B])))),P=a.computed(()=>typeof c.value.showLineHeight=="boolean"?c.value.showLineHeight:!0);return a.watch(()=>[f.value],()=>{f.value.length||(s.value=!1),f.value.length&&y.value.every((G,B)=>f.value.includes(i(G,B)))&&(s.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{f.value.splice(0,f.value.length,...c.value.checked)},{immediate:!0,deep:!0}),()=>e.settings?a.createVNode(mn,a.mergeProps({trigger:"manual",isShow:o.value,placement:"bottom-end",arrow:!0},{theme:p}),{default:()=>a.createVNode("span",{class:"table-head-settings",onClick:T},[a.createVNode(tc,{style:"color: #c4c6cc;"},null)]),content:()=>{let G;return a.createVNode("div",{class:"setting-content"},[a.createVNode("div",{class:"setting-head"},[a.createVNode("span",{class:"head-title"},[a.createTextVNode("\u8868\u683C\u8BBE\u7F6E")]),a.createVNode(Qs,{class:"icon-close-action",onClick:k},null)]),a.createVNode("div",{class:"setting-body"},[a.createVNode("div",{class:"setting-body-title"},[a.createVNode("div",null,[a.createVNode("span",{class:"field-setting-label"},[a.createTextVNode("\u5B57\u6BB5\u663E\u793A\u8BBE\u7F6E")]),N.value?a.createVNode("span",{class:"limit"},[a.createTextVNode("\uFF08\u6700\u591A"),c.value.limit,a.createTextVNode("\u9879\uFF09")]):""]),N.value?"":a.createVNode("span",{class:"check-all",onClick:L},[a.createVNode(ji,{label:"\u5168\u9009",indeterminate:Boolean(W.value),modelValue:f.value.length>0},{default:()=>[a.createTextVNode("\u5168\u9009")]})])]),a.createVNode(vc,{class:"setting-body-fields",modelValue:f.value,"onUpdate:modelValue":B=>f.value=B},Fh(G=y.value.map((B,ie)=>{let le;return a.createVNode("div",{class:"field-item"},[a.createVNode(ji,{checked:f.value.includes(i(B,ie)),label:i(B,ie),disabled:M(B,ie)},Fh(le=St(B,"label",[B,ie]))?le:{default:()=>[le]})])}))?G:{default:()=>[G]}),P.value?a.createVNode("div",{class:"setting-body-line-height"},[a.createTextVNode("\u8868\u683C\u884C\u9AD8\uFF1A"),O()]):""]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Pt,{theme:"primary",style:j,onClick:v},{default:()=>[a.createTextVNode("\u786E\u5B9A")]}),a.createVNode(Pt,{style:j,onClick:k},{default:()=>[a.createTextVNode("\u53D6\u6D88")]})])])}}):""}}),iu=(e,t,n)=>{const i=a.computed(()=>e.pagination&&e.data.length?ci:0),s=(v,k,T)=>({column_fixed:!!v.fixed,column_fixed_left:v.fixed!=="right",column_fixed_right:v.fixed==="right",shadow:v.fixed==="right"?k<T:k>0}),o=v=>v.fixed==="right"?"right":"left",c={left:(v=!0)=>t.filter(k=>k.fixed&&k.fixed!=="right").reduce((k,T,L)=>v&&L===0?k:k+Hr(T),0),right:(v=!0)=>t.filter(k=>k.fixed==="right").reduce((k,T,L)=>v&&L===0?k:k+Hr(T),n?$c:0)},d=(v,k)=>{const T=k[oi.COL_UID],L=v==="right"?-1:1,{length:N}=t;let C=v==="right"?N*L:1,I=0;for(C;;){C=C+-1*L;const M=Math.abs(C),S=t[M],z=o(S),j=S[oi.COL_UID];if(z===v&&T!==j&&(I+=Hr(S)),C===0||T===j)break}return I},u=v=>{if(!v.fixed)return{};const k={left:0,right:0},T=o(v);return k[T]=d(T,v),{[T]:`${k[T]}px`}},f=v=>({width:`${c[v](!1)}px`,bottom:`${i.value}px`}),m={left:!1,right:!1},p=a.computed(()=>t.filter(v=>!v.isHidden&&v.fixed).map(v=>{const k=o(v),T=m[k];return m[k]=!0,{isExist:T,colPos:k,column:v}})),y=(v,k)=>p.value.map(({isExist:T,colPos:L,column:N})=>T?"":a.createVNode("div",{class:s(N,v,k),style:f(L)},null)),b=je("table-fixed");return{renderFixedColumns:y,fixedWrapperClass:b,resolveFixedColumnStyle:u}};function Gh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}class ub{constructor(t,n,i,s){mr(this,"getRowHeight",(t,n)=>{const{size:i,height:s}=this.setting;return s!=null?St(this.setting,"height",["tbody",t,n,i]):St(this.props,"rowHeight",["tbody",t,n])});mr(this,"getColumnClass",(t,n)=>({[`${this.uuid}-column-${n}`]:!0,column_fixed:!!t.fixed,column_fixed_left:!!t.fixed,column_fixed_right:t.fixed==="right"}));mr(this,"getHeadColumnClass",(t,n)=>Se(Z({},this.getColumnClass(t,n)),{active:this.isColActive(n)}));this.props=t,this.context=n,this.reactiveProp=i,this.colgroups=s,this.plugins=new ob(t,n),this.uuid=Li.v4(),this.events=new Map}get propActiveCols(){return this.reactiveProp.activeColumns}renderTableHeadSchema(){const{isShow:t=!0}=tu(this.props);if(!t)return null;const n=i=>{var u;const{checked:s=[],size:o,height:c}=i;this.reactiveProp.setting.size=o,this.reactiveProp.setting.height=c;const d=((u=this.props.settings)==null?void 0:u.fields)||[];s.length&&this.colgroups.forEach(f=>{f.isHidden=Jh(d,f,s)}),this.emitEvent(pn.ON_SETTING_CHANGE,[i])};return[this.props.settings?a.createVNode(cb,{class:"table-head-settings",settings:this.reactiveProp.settings,columns:this.colgroups,rowHeight:this.props.rowHeight,onChange:n},null):"",a.createVNode("table",{cellpadding:0,cellspacing:0},[this.renderColGroup(),this.renderHeader()])]}renderTableBodySchema(t){var n,i,s;return t.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":this.uuid},[this.renderColGroup(),this.renderTBody(t)]):(s=(i=(n=this.context.slots).empty)==null?void 0:i.call(n))!=null?s:a.createVNode(ab,{filterList:t,list:this.props.data,emptyText:this.props.emptyText},null)}renderTableFooter(t){return a.createVNode(Xc,a.mergeProps(t,{modelValue:t.current,onLimitChange:n=>this.handlePageLimitChange(n),onChange:n=>this.handlePageChange(n)}),null)}on(t,n){return this.events.has(t)||this.events.set(t,[]),this.events.get(t).push(n),this}destroy(){this.events.clear(),this.events=null}emitEvent(t,n){this.events.has(t)&&this.events.get(t).forEach(i=>{typeof i=="function"&&Reflect.apply(i,this,n)})}handlePageLimitChange(t){Object.assign(this.props.pagination,{limit:t}),this.context.emit(Et.PAGE_LIMIT_CHANGE,t)}handlePageChange(t){Object.assign(this.props.pagination,{current:t,value:t}),this.context.emit(Et.PAGE_VALUE_CHANGE,t)}setColumnActive(t,n=!1){const i=this.propActiveCols.find(s=>s.index===t);Object.assign(i,{active:!i.active}),n&&this.propActiveCols.filter(s=>s.index!==t&&s.active).forEach(s=>{Object.assign(s,{active:!1})})}handleColumnHeadClick(t,n){if(this.props.columnPick!=="disabled"&&(this.setColumnActive(t,this.props.columnPick==="single"),this.context.emit(Et.COLUMN_PICK,this.propActiveCols)),n.sort&&!n.filter){const i=St(n,["field","type"],[n,t]),s=Wh(this.reactiveProp.defaultSort[i]);Object.assign(this.reactiveProp.defaultSort,{[i]:s});const o=_h(n,s);this.emitEvent(pn.ON_SORT_BY_CLICK,[{sortFn:o,column:n,index:t,type:s}])}}getSortCell(t,n){const i=St(t,["field","type"],[t,n]),s=(c,d)=>{Object.assign(this.reactiveProp.defaultSort,{[i]:d}),this.emitEvent(pn.ON_SORT_BY_CLICK,[{sortFn:c,column:t,index:n,type:d}])},o=this.reactiveProp.defaultSort[i];return a.createVNode(lb,{column:t,defaultSort:o,onChange:s},null)}getFilterCell(t,n){const i=(o,c)=>{const d=(u,f)=>c(o,u,f);this.emitEvent(pn.ON_FILTER_CLICK,[{filterFn:d,checked:o,column:t,index:n}])},s=o=>{this.context.emit(Et.COLUMN_FILTER_SAVE,{column:t,values:o})};return a.createVNode(sb,{column:t,height:this.props.headHeight,onChange:i,onFilterSave:s},null)}renderHeader(){const t=tu(this.props),{cellFn:n}=t,i={"--row-height":`${St(t,"height",["thead"])}px`},s=(u,f)=>typeof n=="function"?n(u,f):St(u,"label",[u,f]),o=(u,f)=>{if(u.type==="selection"){const b=this.reactiveProp.rowActions.get(He.ROW_SELECTION_ALL);return this.renderCheckboxColumn({[He.ROW_SELECTION]:!!b},0,!0)}const m=[];u.sort&&m.push(this.getSortCell(u,f)),u.filter&&m.push(this.getFilterCell(u,f));const p=s(u,f);m.unshift(p);const y=typeof p=="string"?p:void 0;return a.createVNode(Bh,{title:y},Gh(m)?m:{default:()=>[m]})},c=u=>Array.from(u.listeners.keys()).reduce((f,m)=>{const p=m.split("_").slice(-1)[0];return Object.assign(f,{[p]:y=>{u.listeners.get(m).forEach(b=>Reflect.apply(b,this,[y,u,this]))}})},{}),{resolveFixedColumnStyle:d}=iu(this.props,this.colgroups);return a.createVNode("thead",{style:i},[a.createVNode(nu,null,{default:()=>[a.createVNode("tr",null,[this.filterColgroups.map((u,f)=>a.createVNode("th",a.mergeProps({colspan:1,rowspan:1,class:this.getHeadColumnClass(u,f),style:d(u),onClick:()=>this.handleColumnHeadClick(f,u)},c(u)),[o(u,f)]))])]})])}renderTBody(t){const{resolveFixedColumnStyle:n}=iu(this.props,this.colgroups),i=t.length;return a.createVNode("tbody",null,[t.map((s,o)=>{const c=[...Br(this.props.rowStyle,[s,o,this]),{"--row-height":`${this.getRowHeight(s,o)}px`}],d=[...Br(this.props.rowClass,[s,o,this]),`hover-${this.props.rowHover}`],u=s[He.ROW_UID];return[a.createVNode(nu,{key:u},{default:()=>[a.createVNode("tr",{style:c,class:d,onClick:f=>this.handleRowClick(f,s,o,t),onDblclick:f=>this.handleRowDblClick(f,s,o,t)},[this.filterColgroups.map((f,m)=>{var I,M;const p=[n(f),...Br(this.props.cellStyle,[f,m,s,o,this])],y={"expand-cell":f.type==="expand"},b=`__CELL_${o}_${m}`,{colspan:v,rowspan:k}=Qh(f,m,s,o),T=He.ROW_SKIP_CFG,L=f[oi.COL_UID],{skipRow:N=!1,skipCol:C=!1}=(M=(I=s[T])==null?void 0:I[L])!=null?M:{};if(!N&&!C){let S;const z=[this.getColumnClass(f,m),...Br(this.props.cellClass,[f,m,s,o,this]),{"expand-row":s[He.ROW_EXPAND],"is-last":o+k>=i}];return a.createVNode("td",{class:z,style:p,key:b,colspan:v,rowspan:k},[a.createVNode(Bh,{class:y,column:f,row:s,parentSetting:this.props.showOverflowTooltip},Gh(S=this.renderCell(s,f,o,t))?S:{default:()=>[S]})])}return null})])]}),this.renderExpandRow(s,d)]})])}renderExpandRow(t,n){if(!!t[He.ROW_EXPAND]){const s=[...n,{row_expend:!0}],o=`${t[He.ROW_UID]}_expand`;return a.createVNode(nu,{key:o},{default:()=>{var c,d,u;return[a.createVNode("tr",{class:s},[a.createVNode("td",{colspan:this.filterColgroups.length,rowspan:1},[(u=(d=(c=this.context.slots).expandRow)==null?void 0:d.call(c,t[He.ROW_SOURCE_DATA]))!=null?u:a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}}handleRowClick(t,n,i,s){this.context.emit(Et.ROW_CLICK,t,n,i,s,this)}handleRowDblClick(t,n,i,s){this.context.emit(Et.ROW_DBL_CLICK,t,n,i,s,this)}getExpandCell(t){return!!t[He.ROW_EXPAND]?a.createVNode(_s,null,null):a.createVNode(Zs,null,null)}handleRowExpandClick(t,n,i,s,o){this.emitEvent(pn.ON_ROW_EXPAND_CLICK,[{row:t,column:n,index:i,rows:s,e:o}])}renderCellCallbackFn(t,n,i,s){const o=gl(t,St(n,"field",[n,t]),n),c=this.props.data[t[He.ROW_INDEX]];return n.render({cell:o,data:c,row:t,column:n,index:i,rows:s})}renderCheckboxColumn(t,n,i=!1){const s=d=>{this.emitEvent(pn.ON_ROW_CHECK,[{row:t,index:n,isAll:i,value:d}])},o=i&&!!this.reactiveProp.rowActions.get(He.ROW_SELECTION_INDETERMINATE),c=ml(this.props,{row:t,index:n,isCheckAll:i});return a.createVNode(ji,{onChange:s,disabled:!c,modelValue:t[He.ROW_SELECTION],indeterminate:o},null)}renderExpandColumn(t,n,i,s){const o=()=>{var c,d,u;return typeof n.render=="function"?this.renderCellCallbackFn(t,n,i,s):(u=(d=(c=this.context.slots).expandCell)==null?void 0:d.call(c,{row:t,column:n,index:i,rows:s}))!=null?u:this.getExpandCell(t)};return a.createVNode("span",{class:"expand-btn-action",onClick:c=>this.handleRowExpandClick(t,n,i,s,c)},[o()])}renderCell(t,n,i,s){var d,u;const o=()=>{const f=gl(t,St(n,"field",[n,t]),n);return typeof n.render=="function"?this.renderCellCallbackFn(t,n,i,s):f},c={expand:(f,m,p,y)=>this.renderExpandColumn(f,m,p,y),selection:(f,m,p,y)=>this.renderCheckboxColumn(f,p)};return(u=(d=c[n.type])==null?void 0:d.call(c,t,n,i,s))!=null?u:o()}isColActive(t){return this.props.columnPick!=="disabled"&&this.propActiveCols.some(n=>n.index===t&&n.active)}renderColGroup(){return a.createVNode("colgroup",null,[(this.filterColgroups||[]).map((t,n)=>{const i=ze({active:this.isColActive(n)}),s=`${q5(Hr(t))}`.replace(/px$/i,"");return a.createVNode("col",{class:i,width:s},null)})])}get filterColgroups(){return this.colgroups.filter(t=>!t.isHidden)}get setting(){return this.reactiveProp.setting}}var pl=(e,t)=>({initColumns:s=>{let o=[];Array.isArray(s)?o=s:o=[s],o.forEach(c=>{if(!t.find(u=>u.label===c.label&&u.field===c.field)){const u=a.unref(c);t.push(u)}})},getColumns:()=>{var s;return t!=null&&t.length?t:(s=e.columns)!=null&&s.length?e.columns:[]}});const Zh=e=>e.columnPick!=="disabled"?e.columnPick==="multi"?Array.isArray(e.activeColumn)?e.activeColumn:qc(e.activeColumn):Array.isArray(e.activeColumn)?qc(e.activeColumn[0]):qc(e.activeColumn):[];var db=(e,t)=>{let n=a.reactive([]);const{getColumns:i}=pl(e,t);if(e.columnPick==="disabled")return{activeColumns:n};const s=a.reactive(Zh(e)),o=()=>i().map((c,d)=>({index:d,active:s.some(u=>u===d),_column:c}));return a.watchEffect(()=>{n=o();const c=Zh(e);n.forEach((d,u)=>{Object.assign(d,{active:c.some(f=>f===u)})})}),{activeColumns:n}},fb=(e,t=!0)=>{const n="HeadColumnResize";let i;(function(C){C.MOUSE_MOVE="onMousemove",C.MOUSE_OUT="onMouseout",C.MOUSE_DOWN="onMousedown"})(i||(i={}));let s=!1,o=!1,c=!1,d=0,u=null,f=0;const m=a.ref(-1e3),p=C=>{var O;o=!1,c=!1;const I=document.body.style;I.cursor="";const M=C.clientX-d,S=((O=u.resizeWidth)!=null?O:u.calcWidth)+M,z=Number(u.minWidth);u.resizeWidth=S>z?S:z,document.removeEventListener("mouseup",p),document.removeEventListener("mousemove",b),d=0,m.value=-1e3,u=null,C.target.closest("table").querySelectorAll("th").forEach(W=>W.style.setProperty("user-select","inherit"))},y=C=>ot.exports.throttle(()=>{var z;const I=C.clientX-d,M=((z=u.resizeWidth)!=null?z:u.calcWidth)+I;Number(u.minWidth)<M&&(m.value=C.clientX-d+f)},60),b=C=>{document.body.style.setProperty("cursor",""),y(C)()},v={[i.MOUSE_DOWN]:(C,I)=>{if(!s)return;o=!0,document.body.style.setProperty("cursor","col-resize"),u=I,d=C.clientX;const S=C.target.closest("table");f=d-S.getBoundingClientRect().left,document.addEventListener("mouseup",p),document.addEventListener("mousemove",b)},[i.MOUSE_MOVE]:(C,I)=>{o&&!c&&(c=!0);const M=C.target.closest("th");if(c&&M.style.setProperty("user-select","none"),!c){if(!M)return;const S=M.getBoundingClientRect();S.width>12&&S.right-C.pageX<8?(s=!0,M.style.setProperty("cursor","col-resize")):(M.style.setProperty("cursor",""),s=!1)}},[i.MOUSE_OUT]:(C,I)=>{const M=C.target;c||M.style.setProperty("cursor","")}},k=C=>`${n}_${C}`,T=()=>{e.forEach(C=>{C.resizable!==!1&&Object.keys(v).forEach(I=>{const M=k(I);C.listeners.has(M)||C.listeners.set(M,[]),C.listeners.get(M).push(v[I])})})},L=()=>{e.forEach(C=>{Object.keys(v).forEach(I=>{const M=k(I);if(C.listeners.has(M)){const S=C.listeners.get(M);S.splice(0,S.length)}})})};t&&T();const N=a.computed(()=>({position:"absolute",top:0,bottom:0,left:0,width:"1px","background-color":"#ebeef5"}));return{registerResizeEvent:T,resetResizeEvents:L,dragOffsetX:m,dragOffsetXStyle:N}};const hb=(e,t,n,i,s)=>{const{getColumns:o}=pl(e,t),c=a.ref(200),d=a.ref(void 0),u=a.computed(()=>e.pagination&&e.data.length),f=a.computed(()=>ze({[je("table")]:!0,"has-footer":u.value,"has-scroll-y":d.value||e.virtualEnabled},eb(e.border))),m=ze({[je("table-head")]:!0,"has-settings":!!e.settings}),p=tu(e),y=a.computed(()=>({"--row-height":`${St(p,"height",["thead"])}px`,"--scroll-head-left":`-${i.scrollTranslateX}px`,"--scroll-left":`${i.scrollTranslateX}px`})),b={[je("table-body")]:!0},v=a.computed(()=>ze({[je("table-footer")]:!0,["is-hidden"]:!e.pagination||!e.data.length})),k=()=>{const j=o();if(j.every(O=>/^\d+\.?\d*(px)?$/ig.test(`${O.width}`))){const O=j.reduce((P,G)=>P+Number(`${G.width}`.replace(/px/ig,"")),0),W=d.value?$c:0;return`${O+W}px`}return"100%"},T=a.computed(()=>({minHeight:Eh(e.minHeight,"auto"),width:k(),maxWidth:"100%"})),L=(j,O)=>{const W=String(j);if(/^\d+\.?\d*$/.test(W))return Number(W);if(/^\d+\.?\d*px$/ig.test(W))return Number(W.replace("px",""));if(/^\d+\.?\d*%$/ig.test(W)&&typeof O=="number"){const P=Number(W.replace("%",""));return O*P/100}return O},N=a.reactive({display:"","min-height":"",height:"",maxHeight:""}),C=()=>e.showHead?L(e.headHeight,ci):0,I=()=>{const j=L(e.height,c.value),O=C(),W=L(e.minHeight,c.value),P=e.pagination&&e.data.length?ci:0,G=j-O-P,B=e.height!=="auto"?`${G}px`:!1,ie=W-O-P,le=L(e.maxHeight,void 0),ve=typeof le=="number"?`${le-O-P}px`:!1;Object.assign(N,{display:s!=null&&s.length?"block":!1,"min-height":`${ie}px`,height:B,maxHeight:ve})};a.onMounted(()=>{M(n==null?void 0:n.value)});const M=j=>{if(j){const{height:O}=j.parentElement.getBoundingClientRect();c.value=O,I(),S(j)}},S=j=>{const O=e.virtualEnabled?`.${je("virtual-section")}`:`.${je("table-body-content")}`,W=j.querySelector(".bk-table-body");d.value=nb(W,O,0)};return{tableClass:f,headClass:m,contentClass:b,footerClass:v,wrapperStyle:T,contentStyle:N,headStyle:y,resetTableHeight:M,updateBorderClass:S,getColumnsWidthOffsetWidth:()=>{let j=0;return d.value&&(j=j+$c),e.border.includes(fl.OUTER)&&!e.border.includes(fl.NONE)&&(j=j+2),j},hasFooter:u,hasScrollY:d}},gb=(e,t)=>{var K,$;const n=a.reactive([]),{getColumns:i}=pl(e,t),s=V=>{if(/^\d+/.test(`${V.minWidth}`))return V.minWidth;let J=Ga;return V.sort&&(J=J+18),V.filter&&(J=J+28),J},o=V=>{var U,q;const J=(V==null?void 0:V.checked)||((U=e.settings)==null?void 0:U.checked)||[],re=(V==null?void 0:V.fields)||((q=e.settings)==null?void 0:q.fields)||[];n.splice(0,n.length,...i().map(ce=>Se(Z({},ce),{calcWidth:null,resizeWidth:null,minWidth:s(ce),listeners:new Map,isHidden:Jh(re,ce,J),[oi.COL_UID]:Li.v4(),[oi.COL_SOURCE_DATA]:ce})))},{dragOffsetXStyle:c,dragOffsetX:d,resetResizeEvents:u,registerResizeEvent:f}=fb(n,!0),{activeColumns:m}=db(e,t);a.watch(()=>[e.settings],()=>{var V;(((V=e.settings)==null?void 0:V.checked)||[]).length&&o()}),a.watch(()=>[e.columns,t],()=>{o(),u(),f()},{immediate:!0,deep:!0});const p=e.columns.reduce((V,J,re)=>{const U=St(J,["field","type"],[J,re]),q=Hh(J.sort);return q?Se(Z({},V||{}),{[U]:q==null?void 0:q.value}):V},null),y=a.reactive({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:m,settings:e.settings,setting:{size:(K=e.settings)==null?void 0:K.size,height:hl[($=e.settings)==null?void 0:$.size]},defaultSort:p||e.defaultSort}),b=V=>{var J;return y.rowActions.has(V)?(J=y.rowActions.get(V))==null?void 0:J.isExpand:!1},v=()=>{Array.isArray(y.defaultSort)&&y.defaultSort.splice(0),y.defaultSort=p||e.defaultSort},k=(V,J=void 0)=>{var q;const re=V[He.ROW_UID],U=typeof J=="boolean"?J:!b(re);y.rowActions.set(re,Object.assign({},(q=y.rowActions.get(re))!=null?q:{},{isExpand:U})),ie()},T=()=>y.rowActions.has(He.ROW_SELECTION_ALL)?y.rowActions.get(He.ROW_SELECTION_ALL):e.selectionKey?W.every(V=>j(V)):!1,L=V=>{const J=V[He.ROW_UID],{isSelected:re=!1}=y.rowActions.get(J)||{};return re},N=(V=L)=>{let J=!1,re=!1;W.forEach(U=>{const q=V(U);!J&&!q&&(J=!0),!re&&q&&(re=!0)}),y.rowActions.set(He.ROW_SELECTION_INDETERMINATE,re&&J)},C=()=>e.columns.some(V=>V.type==="selection"),I=()=>{C()&&N(V=>j(V))},M=(V=void 0)=>{const J=typeof V=="boolean"?V:!T();y.rowActions.set(He.ROW_SELECTION_ALL,J),y.rowActions.set(He.ROW_SELECTION_INDETERMINATE,!1),W.forEach((re,U)=>{var q;if(ml(e,{row:re,index:U,isCheckAll:!1})){const ce=re[He.ROW_UID],we=Object.assign({},(q=y.rowActions.get(ce))!=null?q:{},{isSelected:J});y.rowActions.set(ce,we)}}),N(),ie(J),ve(null,V,!0)},S=()=>{M(!1)},z=(V,J)=>{var U;const re=V[He.ROW_UID];if(re){const q=typeof J=="boolean"?J:!O(V,re),ce=Object.assign({},(U=y.rowActions.get(re))!=null?U:{},{isSelected:q});y.rowActions.set(re,ce),J||y.rowActions.set(He.ROW_SELECTION_ALL,!1),N(),ie(),ve(V,J,!1)}},j=(V,J=re=>L(re))=>typeof e.isSelectedFn=="function"?Reflect.apply(e.isSelectedFn,globalThis,[{row:V,data:e.data}]):typeof e.selectionKey=="string"&&e.selectionKey.length?ot.exports.get(V,e.selectionKey):J(V),O=(V,J,re)=>j(V,()=>{var q;const U=J===void 0?V[He.ROW_UID]:J;return ml(e,{row:V,index:re,isCheckAll:!1})&&T()?!0:y.rowActions.has(U)?(q=y.rowActions.get(U))==null?void 0:q.isSelected:!1}),W=a.reactive([]),P=a.computed(()=>n.some(V=>typeof V.rowspan=="function"||/^\d$/.test(`${V.rowspan}`)||typeof V.colspan=="function"||/^\d$/.test(`${V.colspan}`))),G=(V=!1)=>{let J=null;const re={};W.splice(0,W.length,...e.data.map((U,q)=>{const ce=tb(U,e,q),we=P.value?le(U,ce,q,re,J):{};return J=ce,Se(Z({},U),{[He.ROW_INDEX]:q,[He.ROW_UID]:ce,[He.ROW_EXPAND]:V?b(ce):!1,[He.ROW_SELECTION]:O(U,ce,q),[He.ROW_SOURCE_DATA]:Z({},U),[He.ROW_SKIP_CFG]:we})})),I()},B=(V,J,re,U)=>{const q=O(re,re[He.ROW_UID],U);return V&&typeof J=="boolean"?J:q},ie=V=>{let J=null;const re={};W.forEach((U,q)=>{const ce=U[He.ROW_UID],we=P.value?le(U,ce,q,re,J):{},X=ml(e,{row:U,index:q,isCheckAll:!1});Object.assign(U,{[He.ROW_EXPAND]:b(U[He.ROW_UID]),[He.ROW_SELECTION]:B(X,V,U,q),[He.ROW_SKIP_CFG]:we}),J=U[He.ROW_UID]}),typeof V!="boolean"&&I()},le=(V,J,re,U,q)=>{var X;let ce=0;const we=(X=U[q])!=null?X:{};return U[J]||(U[J]={}),n.forEach((H,Q)=>{var ue,me;const{colspan:ae,rowspan:D}=Qh(H,Q,V,re),_=H[oi.COL_UID],R=(me=(ue=we[_])==null?void 0:ue.skipRowLen)!=null?me:0,de={[_]:{skipRowLen:0,skipRow:!1,skipCol:!1,skipColLen:0}};ce>0&&(de[_].skipColLen=ce,de[_].skipCol=!0,ce=ce-1),R>1?(de[_].skipRowLen=R-1,de[_].skipRow=!0):D>1&&(de[_].skipRowLen=D,de[_].skipRow=!1),ae>1&&(de[_].skipColLen=ae,ce=ae-1),Object.assign(U[J],Z({},de))}),U[J]},ve=(V,J,re=!1)=>{if(e.asyncData&&e.rowKey){if(re)e.data.forEach(U=>{ot.exports.has(U,e.selectionKey)&&ot.exports.set(U,e.selectionKey,!!J)});else if(ot.exports.has(V,e.selectionKey)){const U=e.data.find(q=>ot.exports.get(q,e.rowKey)===ot.exports.get(V,e.rowKey));ot.exports.set(U,e.selectionKey,!!J)}}},{renderFixedColumns:Ie,fixedWrapperClass:ge}=iu(e,n,!1);return{colgroups:n,dragOffsetXStyle:c,dragOffsetX:d,reactiveSchema:y,indexData:W,fixedWrapperClass:ge,initIndexData:G,updateIndexData:ie,renderFixedColumns:Ie,setRowExpand:k,updateColGroups:o,clearSelection:S,toggleAllSelection:M,toggleRowSelection:z,getSelection:()=>W.filter(V=>O(V)),clearSort:v}};var mb=a.defineComponent({name:"Table",props:H5,emits:V5,setup(e,t){let n=null,i=null,s=null,o=null;const c=a.reactive([]),{initColumns:d}=pl(e,c);a.provide(Sh,d);const u=a.ref(),f=a.ref(),m=a.ref(0),{colgroups:p,dragOffsetXStyle:y,dragOffsetX:b,reactiveSchema:v,indexData:k,renderFixedColumns:T,setRowExpand:L,initIndexData:N,fixedWrapperClass:C,clearSelection:I,toggleAllSelection:M,toggleRowSelection:S,getSelection:z,clearSort:j,updateColGroups:O}=gb(e,c),{pageData:W,localPagination:P,resolvePageData:G,watchEffectFn:B}=B5(e,k),{tableClass:ie,headClass:le,contentClass:ve,footerClass:Ie,wrapperStyle:ge,contentStyle:he,headStyle:K,updateBorderClass:$,resetTableHeight:V,getColumnsWidthOffsetWidth:J,hasFooter:re}=hb(e,c,u,v,W),U=new ub(e,t,v,p),q=()=>{const ue=u.value.querySelector(".bk-table-body-content"),me=ue.querySelector("table");if(me){const te=me.scrollWidth,se=ue.clientWidth;m.value=te-se}};a.watch(()=>[e.data,e.pagination,e.height,e.maxHeight,e.minHeight],()=>{N(e.reserveExpand),B(s,n,i),a.nextTick(()=>{V(u.value),$(u.value)})},{immediate:!0,deep:!0}),a.watchEffect(()=>{if((u==null?void 0:u.value)instanceof HTMLElement){const ue=J();eu(u.value,p,20,ue),q()}}),U.on(pn.ON_SORT_BY_CLICK,ue=>{var ke,Oe;const{sortFn:me,column:te,index:se,type:be}=ue;typeof me=="function"&&(n=me,i=te,G(s,n,i),(Oe=(ke=f.value)==null?void 0:ke.reset)==null||Oe.call(ke)),t.emit(Et.COLUMN_SORT,{column:a.unref(te[oi.COL_SOURCE_DATA]),index:se,type:be})}).on(pn.ON_FILTER_CLICK,ue=>{var ke,Oe;const{filterFn:me,checked:te,column:se,index:be}=ue;typeof me=="function"&&(s=me,G(s,n,i),(Oe=(ke=f.value)==null?void 0:ke.reset)==null||Oe.call(ke)),t.emit(Et.COLUMN_FILTER,{checked:te,column:a.unref(se[oi.COL_SOURCE_DATA]),index:be})}).on(pn.ON_SETTING_CHANGE,ue=>{const{checked:me=[],size:te,height:se,fields:be}=ue;a.nextTick(()=>{var Oe,Ve;O({checked:me,fields:be}),$(u.value);const ke=J();me.length&&eu(u.value,p,Ga,ke),(Ve=(Oe=f.value)==null?void 0:Oe.reset)==null||Ve.call(Oe),t.emit(Et.SETTING_CHANGE,{checked:me,size:te,height:se,fields:be})})}).on(pn.ON_ROW_EXPAND_CLICK,ue=>{const{row:me,column:te,index:se,rows:be,e:ke}=ue;t.emit(Et.ROW_EXPAND_CLICK,{row:a.unref(me[He.ROW_SOURCE_DATA]),column:a.unref(te[oi.COL_SOURCE_DATA]),index:se,rows:be,e:ke}),L(me,!me[He.ROW_EXPAND])}).on(pn.ON_ROW_CHECK,({row:ue,isAll:me,index:te,value:se})=>{me?(M(se),t.emit(Et.ROW_SELECT_ALL,{checked:se,data:e.data})):(S(ue,se),t.emit(Et.ROW_SELECT,{row:a.unref(ue[He.ROW_SOURCE_DATA]),index:te,checked:se,data:e.data})),t.emit(Et.ROW_SELECT_CHANGE,{row:a.unref(ue[He.ROW_SOURCE_DATA]),isAll:me,index:te,checked:se,data:e.data})});const ce=ue=>{var Ve;const me=(Ve=v.pos.bottom)!=null?Ve:0,te=ue[1],{translateX:se,translateY:be,pos:ke={}}=te;v.scrollTranslateY=be,v.scrollTranslateX=se,v.pos=ke;const{bottom:Oe}=ke;Oe<=2&&me>Oe&&Es(60,()=>{t.emit(Et.SCROLL_BOTTOM,Se(Z({},ke),{translateX:se,translateY:be}))},!0)(),q()};a.onMounted(()=>{o=Vh(u.value,()=>{(e.height==="100%"||e.height==="auto")&&V(u.value),$(u.value);const ue=J();eu(u.value,p,20,ue)},60,!0),o.start()}),a.onBeforeUnmount(()=>{o.stop(),o=null,U.destroy()}),t.expose({setRowExpand:L,clearSelection:I,toggleAllSelection:M,toggleRowSelection:S,getSelection:z,clearSort:j});const we=a.computed(()=>Se(Z({},ve),{"__is-empty":!W.length})),X=a.computed(()=>({[je("table-body-content")]:!0,"with-virtual-render":e.virtualEnabled})),H={column_drag_line:!0,"offset-x":!0},Q=a.computed(()=>Se(Z({},y.value),{left:`${b.value-v.scrollTranslateX}px`})),ae={"scroll-loading":!0,_bottom:!0},D=a.computed(()=>({[je("fixed-bottom-border")]:!0,"_is-empty":!e.data.length})),_={zIndex:-1,width:0,height:0,display:"none"},{renderScrollLoading:R}=F5(e,t),de=a.computed(()=>e.virtualEnabled?{}:{scrollXName:"",scrollYName:""});return()=>{var ue,me;return a.createVNode("div",{class:ie.value,style:ge.value,ref:u},[a.createVNode("div",{class:le,style:K.value},[U.renderTableHeadSchema()]),a.createVNode(Wr,a.mergeProps({ref:f,lineHeight:U.getRowHeight,class:we.value,style:he,list:W},de.value,{contentClassName:X.value,onContentScroll:ce,throttleDelay:0,scrollEvent:!0,enabled:e.virtualEnabled}),{default:te=>U.renderTableBodySchema(te.data||e.data),afterSection:()=>a.createVNode("div",{class:D.value},null)}),a.createVNode("div",{class:C},[T(v.scrollTranslateX,m.value),a.createVNode("div",{class:H,style:Q.value},null),a.createVNode("div",{class:ae},[R()])]),a.createVNode("div",{class:Ie.value},[re.value&&U.renderTableFooter(P.value)]),a.createVNode("div",{style:_},[(me=(ue=t.slots).default)==null?void 0:me.call(ue)])])}}});const Yh=Ge(mb);Ge(Ah);const Uh=Ge(Ah),Za=12;function pb(e){const t=a.reactive({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:(s=[])=>{t.curPage=1,t.totalSize=s.length,t.totalPage=Math.ceil(t.totalSize/t.pageSize)||1;const o=[];if(t.pageSize>0)for(let c=0;c<t.totalSize;c+=t.pageSize)o.push(s.slice(c,c+t.pageSize));t.renderListPaged.splice(0,t.renderListPaged.length,...o),t.curPageList.splice(0,t.curPageList.length,...t.renderListPaged[t.curPage-1]||[])},pageChange:s=>{t.curPage=s,t.curPageList.splice(t.curPageList.length,0,...t.renderListPaged[t.curPage-1]||[]),t.isPageLoading=!1}}}function bb(e){const{useGroup:t,saveKey:n,displayKey:i,list:s}=a.toRefs(e),o=a.ref([]),c=a.ref({});return a.watch([t,n,i,s],()=>{o.value=[];let d=a.markRaw(s.value);t.value&&(d=d.reduce((u,f)=>{let m=[];return f.children&&(m=f.children.map(p=>Z({group:{groupId:f[n.value],groupName:f[i.value]}},p))),u.concat(m)},[])),o.value=d,c.value=d.reduce((u,f)=>(u[f[n.value]]=f,u),{})},{immediate:!0}),{flatList:o,saveKeyMap:c}}const $h=e=>{const t=e.length;let n=0;for(let i=0;i<t;i++)(e.charCodeAt(i)&65280)!==0&&(n+=1),n+=1;return n},yb=(e,t,n)=>{a.watch([n,t],()=>{s()},{flush:"post"});const i=a.ref(null),s=()=>{!t.value||(i.value=null,setTimeout(()=>{const o=Array.from(e.value.querySelectorAll(".tag-item")),c=o.findIndex((d,u)=>u?o[u-1].offsetTop!==d.offsetTop:!1);i.value=c>0?c-1:null}))};return{overflowTagIndex:i}};var Kh=a.defineComponent({name:"ListTagRender",props:{node:g.object,searchKey:g.oneOfType([g.string,g.arrayOf(g.string)]),displayKey:g.string,searchKeyword:g.string,tpl:{type:Function}},render(){const e=n=>{if(this.searchKeyword){const i=new RegExp(`(${this.searchKeyword})`,"i");return n.replace(i,'<strong class="highlight-text">$1</strong>')}return n};if(this.tpl)return this.tpl(this.node,e,a.h,this);const t=this.node[this.displayKey];return a.createVNode("div",{class:"bk-selector-node"},[a.createVNode("span",{class:"text",innerHTML:e(t)},[t])])}});const Cb=()=>({modelValue:g.arrayOf(g.string).def([]),placeholder:g.string.def("\u8BF7\u8F93\u5165\u5E76\u6309 Enter \u7ED3\u675F"),list:g.arrayOf(g.object).def([]),disabled:g.bool.def(!1),tooltipKey:g.string.def(""),saveKey:g.string.def("id"),displayKey:g.string.def("name"),hasDeleteIcon:g.bool.def(!1),clearable:g.bool.def(!0),trigger:Pe("treeTriggerType",{}).def("search"),searchKey:g.oneOfType([g.string,g.arrayOf(g.string)]).def("name"),useGroup:g.bool.def(!1),allowCreate:g.bool.def(!1),maxData:g.number.def(-1),maxResult:g.number.def(10),contentMaxHeight:g.number.def(300),contentWidth:g.number.def(190),separator:g.string.def(""),allowNextFocus:g.bool.def(!0),allowAutoMatch:g.bool.def(!1),showClearOnlyHover:g.bool.def(!1),leftSpace:g.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 vb=a.defineComponent({name:"TagRender",directives:{bkTooltips:tl},props:{node:g.object,displayKey:g.string,tpl:{type:Function},hasTips:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:()=>({})}},setup(e){const t=a.ref(),n=a.ref(!1),i=a.computed(()=>Z({boundary:"window",theme:"light",distance:12,content:e.node[e.displayKey],disabled:e.hasTips||!n.value},e.tagOverflowTips));return a.onMounted(()=>{n.value=U4(t.value)}),{overflowTips:i,tagRef:t}},render(){return this.tpl?this.tpl(this.node,a.h,this):a.withDirectives(a.createVNode("div",{class:"tag",ref:"tagRef"},[a.createVNode("span",{class:"text"},[this.node[this.displayKey]])]),[[a.resolveDirective("bk-tooltips"),this.overflowTips]])}}),wb=a.defineComponent({name:"TagInput",directives:{bkTooltips:tl},props:Cb(),emits:["update:modelValue","change","select","focus","blur","remove","removeAll"],setup(e,{emit:t}){const n=xn(),i=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),s=a.reactive(Z({isShow:!1,width:190,offset:{mainAxis:4,crossAxis:0}},e.popoverProps)),{maxResult:o}=a.toRefs(e),{pageState:c,initPage:d,pageChange:u}=pb(o),f=a.ref(""),m=a.ref(null),p=a.ref(null),y=a.ref(null),b=a.ref(null),v=a.ref(null),k=a.ref(null),T=a.computed(()=>!e.disabled&&e.hasDeleteIcon),L=a.computed(()=>e.maxData===1),N=a.computed(()=>M.selectedTagList.length===0&&f.value===""&&!i.isEdit),C=a.computed(()=>e.clearable&&!e.disabled&&M.selectedTagList.length!==0&&(e.showClearOnlyHover?i.isHover:!0)),I=a.computed(()=>({"bk-tag-input-trigger":!0,active:i.isEdit,disabled:e.disabled})),M=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),S=a.computed(()=>M.selectedTagList.map(te=>te[e.saveKey])),{flatList:z,saveKeyMap:j}=bb(e),O=a.computed(()=>{if(e.useGroup){const te={};return c.curPageList.forEach((se,be)=>{se.__index__=be,te[se.group.groupId]||(te[se.group.groupId]={id:se.group.groupId,name:se.group.groupName,children:[]}),te[se.group.groupId].children.push(se)}),Object.keys(te).map(se=>te[se])}return c.curPageList});a.watch([()=>z.value],()=>{a.nextTick(()=>{ie()})}),a.watch(()=>e.modelValue,te=>{var se;Ie(S.value,te)||(a.nextTick(()=>{ie()}),e.withValidate&&((se=n==null?void 0:n.validate)==null||se.call(n,"change")))}),a.watch(f,ot.exports.debounce(()=>{const te=c.curPageList.length!==0,{value:se}=f;se!==""&&te||se===""&&e.trigger==="focus"&&te?s.isShow=!0:(e.trigger!=="focus"||!te)&&(s.isShow=!1)},150)),a.watch(()=>s.isShow,te=>{W(),te&&v.value&&(a.nextTick(()=>{v.value.scrollTop=0}),v.value.removeEventListener("scroll",P),v.value.addEventListener("scroll",P))}),a.onMounted(()=>{ie()});const W=()=>{var te;s.offset.crossAxis=L.value?0:(te=b.value)==null?void 0:te.offsetLeft},P=()=>{if(c.isPageLoading||v.value.scrollTop===0)return;const{scrollTop:te,offsetHeight:se,scrollHeight:be}=v.value;if(te+se>=be){const ke=c.curPage+1;ke<=c.totalPage&&(c.isPageLoading=!0,setTimeout(()=>{u(ke)},500))}},G=()=>{var se;return Array.from(((se=y.value)==null?void 0:se.childNodes)||[]).filter(be=>![Node.TEXT_NODE,Node.COMMENT_NODE].includes(be.nodeType))},B=te=>{if(!e.disabled){if(te!=null&&te.target){const{className:se}=te.target;(se.indexOf("bk-tag-input-trigger")>-1||se.indexOf("tag-list")>-1)&&y.value.appendChild(b.value)}clearTimeout(k.value),L.value&&S.value.length&&(M.tagListCache=[...S.value],M.selectedTagListCache=[...M.selectedTagList],f.value=M.selectedTagListCache[0][e.saveKey],de(M.selectedTagList[0],0),V()),i.isEdit=!0,a.nextTick(()=>{var se;(se=m.value)==null||se.focus(),e.trigger==="focus"&&M.localList.length!==0&&(le(),s.isShow?W():s.isShow=!0)})}},ie=()=>{const{saveKey:te,modelValue:se,displayKey:be,allowCreate:ke,trigger:Oe}=e;if(M.selectedTagList=[],M.localList=z.value,se.length){const Ve={};M.selectedTagList=se.map(et=>{const rn=j.value[et];return Ve[et]=1,!rn&&ke?{[te]:et,[be]:et}:rn}).filter(et=>et),L.value||(M.localList=M.localList.filter(et=>!Ve[et[te]]))}Oe==="focus"&&le()},le=(te="")=>{const{searchKey:se,filterCallback:be}=e,ke=te.toLowerCase().trim();if(ke===""){d(M.localList);return}let Oe=[];typeof be=="function"?Oe=be(ke,se,M.localList)||[]:Array.isArray(se)?Oe=M.localList.filter(Ve=>se.some(et=>Ve[et].toLowerCase().indexOf(ke)>-1)):Oe=M.localList.filter(Ve=>Ve[se].toLowerCase().indexOf(ke)>-1),d(Oe)},ve=(te,se)=>{const be={"bk-selector-actived":!1,"bk-selector-selected":S.value.includes(te[e.saveKey])};return e.useGroup?be["bk-selector-actived"]=te.__index__===i.focusItemIndex:be["bk-selector-actived"]=se===i.focusItemIndex,be};function Ie(te,se){return te.length!==se.length?!1:se.every((be,ke)=>te[ke]===be)}const ge=()=>{M.tagListCache=[],M.selectedTagListCache=[],M.selectedTagList=[]},he=()=>{f.value=""},K=()=>{if(L.value)return 0;const se=G().findIndex(({id:be})=>be==="tagInputItem");return se>=0?se:0},$=(te,se,be=!1)=>{if(!se||!te)return;let ke=se;be&&(ke=se.nextElementSibling||null),se.parentNode.insertBefore(te,ke)},V=te=>{const{maxData:se,trigger:be,allowCreate:ke}=e;if(se===-1||se>S.value.length){const{value:Oe}=te!=null&&te.target?te.target:f,Ve=$h(Oe);Ve?(le(Oe),m.value.style.width=`${Ve*Za}px`):be==="focus"&&le()}else re(),f.value="",s.isShow=!1;i.isEdit=!0,i.focusItemIndex=ke?-1:0},J=()=>{var te;s.width=L.value?(te=p.value)==null?void 0:te.clientWidth:e.contentWidth,t("focus")},re=()=>{k.value=setTimeout(()=>{var se;const te=f.value;if(he(),i.isEdit=!1,L.value){const[be]=M.tagListCache;te&&te===be&&M.selectedTagListCache.length?R(M.selectedTagListCache[0],"select"):ce("remove")}else if(e.allowAutoMatch&&te){const be=c.curPageList.find(ke=>Array.isArray(e.searchKey)?e.searchKey.map(Ve=>ke[Ve]).includes(te):ke[e.searchKey]===te);be?U(be,"select"):e.allowCreate&&U(te,"custom")}s.isShow=!1,t("blur",te,S.value),(se=n==null?void 0:n.validate)==null||se.call(n,"blur")},200)},U=(te,se,be)=>{be==null||be.stopPropagation(),!(!te||te.disabled)&&(L.value&&ge(),R(te,se),ce("select"),he(),s.isShow=!1)},q=(te,se,be)=>{be==null||be.stopPropagation(),de(te,se),he(),ce("remove",te),m.value.style.width=`${Za}px`},ce=(te,se)=>{t(te,se),t("update:modelValue",S.value),t("change",S.value)},we=te=>{te.stopPropagation();const se=M.selectedTagList;M.selectedTagList=[];const be=se.filter(ke=>j.value[ke[e.saveKey]]);(e.allowCreate&&be.length!==0||!e.allowCreate)&&!L.value&&M.localList.push(...be),ce("removeAll")},X=()=>{const te={height:v.value.clientHeight,yAxis:v.value.getBoundingClientRect().y};a.nextTick(()=>{const se=v.value.querySelector(".bk-selector-actived");if(!se)return;const be={height:se.clientHeight,yAxis:se.getBoundingClientRect().y};be.yAxis<te.yAxis&&(v.value.scrollTop=v.value.scrollTop-(te.yAxis-be.yAxis));const ke=be.yAxis+be.height-te.yAxis;ke>te.height&&(v.value.scrollTop=v.value.scrollTop+ke-te.height)})},H=(te,se)=>{const be=G();$(b.value,be[te-1]),M.selectedTagList.splice(te-1,1),B();const ke=j.value[se[e.saveKey]];(e.allowCreate&&ke||!e.allowCreate)&&!L.value&&M.localList.push(se),m.value=`${Za}px`,ce("remove")},Q=te=>{if(c.isPageLoading)return;let se;const be=te.target.value,ke=$h(be),Oe=K(),Ve=G();switch(te.code){case"ArrowUp":if(te.preventDefault(),!s.isShow)return;i.focusItemIndex=i.focusItemIndex-1,i.focusItemIndex=i.focusItemIndex<0?-1:i.focusItemIndex,i.focusItemIndex===-1&&(i.focusItemIndex=c.curPageList.length-1),X();break;case"ArrowDown":if(te.preventDefault(),!s.isShow)return;i.focusItemIndex=i.focusItemIndex+1,i.focusItemIndex=i.focusItemIndex>c.curPageList.length-1?c.curPageList.length:i.focusItemIndex,i.focusItemIndex===c.curPageList.length&&(i.focusItemIndex=0),X();break;case"ArrowLeft":if(i.isEdit=!0,!ke){if(Oe<1)return;$(b.value,Ve[Oe-1]),B()}break;case"ArrowRight":if(i.isEdit=!0,!ke){if(Oe===Ve.length-1)return;$(Ve[Oe+1],b.value),B()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&s.isShow||e.allowCreate&&i.focusItemIndex>=0&&s.isShow?U(c.curPageList[i.focusItemIndex],"select",te):e.allowCreate&&f.value.trim()&&U(f.value,"custom",te),te.preventDefault();break;case"Backspace":Oe!==0&&!f.value&&(se=M.selectedTagList[Oe-1],H(Oe,se));break}},ae=te=>{const se=[],be=te.split(";"),ke=/^[a-zA-Z][a-zA-Z_]*/g;return be.forEach(Oe=>{const Ve=Oe.match(ke);if(Ve){const et=Ve.join("");se.push({[e.saveKey]:et,[e.displayKey]:et})}}),se},D=te=>{if(te.preventDefault(),L.value)return!1;const{maxData:se,saveKey:be,displayKey:ke,pasteFn:Oe,allowCreate:Ve}=e,et=te.clipboardData.getData("text");let tt=(Oe?Oe(et):ae(et)).map(rt=>rt[be]);if(tt.length){const rt=G(),Cn=K(),ft=M.localList.map(Fe=>Fe[be]);if(tt=tt.filter(Fe=>{const zt=(Fe==null?void 0:Fe.trim())&&!S.value.includes(Fe);return Ve?zt:zt&&ft.includes(Fe)}),se!==-1){const Fe=M.selectedTagList.length;if(Fe<se){const zt=se-Fe;tt.length>zt&&(tt=[...tt.slice(0,zt)])}else tt=[]}const ct=Ve?tt.map(Fe=>{const zt=M.localList.find(ma=>ma[be]===Fe);return zt!=null?zt:{[be]:Fe,[ke]:Fe}}):M.localList.filter(Fe=>tt.includes(Fe[be]));tt.length&&(M.selectedTagList.splice(Cn,0,...ct),$(b.value,rt[Cn]),m.value.style.width=`${Za}px`,M.localList=M.localList.filter(Fe=>!tt.includes(Fe[be])),ce("select"),B())}},_=te=>{e.disabled||($(b.value,te.currentTarget,!0),m.value.style.width=`${Za}px`,s.isShow&&W())},R=(te,se)=>{if(M.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:be,saveKey:ke,displayKey:Oe,createTagValidator:Ve}=e,et=K();let rn=1,tt=!1,rt;const Cn=ft=>typeof Ve=="function"?Ve(ft):!0;if(se==="custom")if(be){let ft=te.split(be);ft=ft.filter(Fe=>(Fe==null?void 0:Fe.trim())&&!S.value.includes(Fe)&&Cn(Fe));const ct=ft.map(Fe=>j.value[Fe]||{[ke]:Fe,[Oe]:Fe});ft.length&&(M.selectedTagList.splice(et,0,...ct),rn=ct.length,tt=!0)}else{const ft=typeof te=="object";if(rt=ft?te[ke]:te.trim(),rt=rt.replace(/\s+/g,""),rt!==void 0&&!S.value.includes(rt)&&Cn(rt)){const ct=j.value[rt]||(ft?te:{[ke]:rt,[Oe]:rt});M.selectedTagList.splice(et,0,ct),tt=!0}}else te&&(rt=te[ke],rt!==void 0&&!S.value.includes(rt)&&(M.selectedTagList.splice(et,0,te),tt=!0));tt&&a.nextTick(()=>{for(let ft=1;ft<=rn;ft++){const Fe=G()[et+ft];$(Fe,b.value)}if(m.value.style.width=`${Za}px`,!L.value){e.allowNextFocus&&B();const ft=S.value.reduce((ct,Fe)=>(ct[Fe]=1,ct),{});M.localList=M.localList.filter(ct=>!ft[ct[ke]])}})},de=(te,se)=>{M.selectedTagList.splice(se,1);const be=j.value[te[e.saveKey]];(e.allowCreate&&be||!e.allowCreate)&&!L.value&&M.localList.push(te)},ue=a.computed(()=>e.collapseTags?e.collapseTags&&!i.isEdit:e.collapseTags),{overflowTagIndex:me}=yb(p,ue,S);return Se(Z(Z(Z({popoverProps:s},a.toRefs(i)),a.toRefs(M)),a.toRefs(c)),{isShowPlaceholder:N,isShowClear:C,curInputValue:f,renderList:O,showTagClose:T,tagInputRef:m,bkTagSelectorRef:p,tagListRef:y,tagInputItemRef:b,selectorListRef:v,triggerClass:I,overflowTagIndex:me,localCollapseTags:ue,focusInputTrigger:B,activeClass:ve,handleInput:V,handleFocus:J,handleBlur:re,handleTagSelected:U,handleTagRemove:q,handleClear:we,tagFocus:_,handleKeydown:Q,handlePaste:D})},render(){return a.createVNode("div",{class:"bk-tag-input",ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode(mn,a.mergeProps({theme:"light bk-tag-input-popover-content",trigger:"manual",placement:"bottom-start",arrow:!1},this.popoverProps),{default:()=>{var e,t,n;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`}},[this.selectedTagList.map((i,s)=>{const o={boundary:"window",theme:"light",distance:12,content:i[this.tooltipKey],disabled:!this.tooltipKey},c=this.localCollapseTags&&this.overflowTagIndex&&s>=this.overflowTagIndex;return a.withDirectives(a.createVNode("li",{class:"tag-item",style:{display:c?"none":""},onClick:this.tagFocus},[a.createVNode(vb,{node:i,tpl:this.tagTpl,displayKey:this.displayKey,hasTips:!!this.tooltipKey,tagOverflowTips:this.tagOverflowTips},null),this.showTagClose?a.createVNode(Hn,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,i,s)},null):null]),[[a.resolveDirective("bk-tooltips"),o]])}),a.withDirectives(a.createVNode("li",{ref:"tagInputItemRef",id:"tagInputItem",class:"tag-input-item",role:"input"},[a.withDirectives(a.createVNode("input",{type:"text",class:"tag-input",ref:"tagInputRef","onUpdate:modelValue":i=>this.curInputValue=i,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onPaste:this.handlePaste},null),[[a.vModelText,this.curInputValue]])]),[[a.vShow,this.isEdit]]),!!this.overflowTagIndex&&this.localCollapseTags&&a.createVNode("li",{class:"tag-item"},[a.createVNode("div",{class:"tag"},[a.createVNode("span",{class:"text"},[a.createTextVNode("+"),this.selectedTagList.length-this.overflowTagIndex])])])]),a.withDirectives(a.createVNode("p",{class:"placeholder"},[this.placeholder]),[[a.vShow,this.isShowPlaceholder]]),(n=(t=(e=this.$slots)==null?void 0:e.suffix)==null?void 0:t.call(e))!=null?n:this.isShowClear&&a.createVNode(Zt,{class:"clear-icon",onClick:this.handleClear},null)])},content:()=>a.createVNode("div",{class:"bk-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:"bk-selector-group-item"},[a.createVNode("span",{class:"group-name"},[e.name,a.createTextVNode(" ("),e.children.length,a.createTextVNode(")")]),a.createVNode("ul",{class:"bk-selector-group-list-item"},[e.children.map((n,i)=>a.createVNode("li",{class:["bk-selector-list-item",{disabled:n.disabled},this.activeClass(n,i)],onClick:this.handleTagSelected.bind(this,n,"select")},[a.createVNode(Kh,{node:n,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]))])]):a.createVNode("li",{class:["bk-selector-list-item",{disabled:e.disabled},this.activeClass(e,t)],onClick:this.handleTagSelected.bind(this,e,"select")},[a.createVNode(Kh,{node:e,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)])),this.isPageLoading?a.createVNode("li",{class:"bk-selector-list-item loading"},[a.createVNode(xi,{theme:"primary",size:ii.Small},null)]):null])])})])}});const Xh=Ge(wb),Mb={direction:qf(),align:Uo().def(zs.CENTER),color:g.string.def("#dde4eb"),width:g.number.def(1),type:e0()};var Ib=a.defineComponent({name:"Divider",props:Mb,render(){const e=()=>this.direction==="vertical"?{borderRight:`${this.width}px ${this.type} ${this.color}`}:{borderBottom:`${this.width}px ${this.type} ${this.color}`};let t;return this.$slots.default&&(t=a.createVNode("div",{class:[je("divider-info"),je(`divider-info-${this.align}`)]},[this.$slots.default()])),a.createVNode("div",{class:[je("divider"),je(`divider-${this.direction}`)],style:e()},[t])}});const qh=Ge(Ib);var e9=(e=>(e.CARD="card",e.BORDER_CARD="border-card",e.UNBORDER_CARD="unborder-card",e.CARD_TAB="card-tab",e))(e9||{}),t9=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e))(t9||{});const n9=Pe("position",{}).def("top");var i9=(e=>(e.REPLACE="replace",e.INSERT="insert",e))(i9||{});const a9=Pe("sortType",{}).def("replace"),Nb={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},Lb={active:g.oneOfType([g.number,g.string]).def(""),type:Pe("type",{}).def("border-card"),tabPosition:n9,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:a9,labelHeight:g.number.def(50),scrollStep:g.number.def(200),extCls:g.string.def(""),validateActive:g.bool.def(!0),showHeader:g.bool.def(!0),changeOnHover:g.bool.def(!1),changeOnHoverDelay:g.number.def(1e3)},kb=Z({active:g.oneOfType([g.number,g.string]).def(""),panels:{type:Array,default:()=>[]},tabPosition:n9,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:a9,labelHeight:g.number.def(50),scrollStep:g.number.def(200),validateActive:g.bool.def(!0),changeOnHover:g.bool.def(!1),changeOnHoverDelay:g.number.def(1e3)},Nb),Tb={name:g.oneOfType([g.number,g.string]).def(""),label:g.string||g.func,closable:g.bool,visible:g.bool.def(!0),disabled:g.bool,sortable:g.bool,renderDirective:Yo(),panel:g.string||g.func};var r9=a.defineComponent({name:"TabNav",props:kb,setup(e){const t=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const d=[];let u=!1;return e.panels.filter((f,m)=>{if(!f.props)return null;const{name:p,label:y,closable:b,visible:v,disabled:k,sortable:T}=f.props;if(!v)return!1;e.active===p&&(u=!0);const L=N=>f.slots.label?a.h(f.slots.label):[void 0,""].includes(N)?`\u9009\u9879\u5361${m+1}`:typeof N=="string"?N:typeof N=="function"?a.h(N):N;return d.push({name:p,closable:b,visible:v,disabled:k,sortable:T,tabLabel:L(y)}),!0}),!u&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),d}),n=a.ref(-1),i=a.ref(-1),s=a.ref(""),o=(d,u)=>d===u;return Se(Z({},{handleTabAdd(d){e.tabAdd(d)},dragstart(d,u){i.value=d,s.value=e.guid,Object.assign(u.dataTransfer,{effectAllowed:"move"}),e.tabDrag(d,u)},dragenter(d){o(s.value,e.guid)&&(n.value=d)},dragend(){n.value=-1,i.value=-1,s.value=null},drop(d,u){if(!o(s.value,e.guid))return!1;e.tabSort(i.value,d,u)},handleTabChange(d){e.tabChange(d)},handleTabRemove(d,u){e.tabRemove(d,u)}}),{navs:t,dragenterIndex:n,dragStartIndex:i,draggingEle:s,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4)})},render(){const{active:e,closable:t,addable:n,sortable:i,sortType:s,labelHeight:o,dragstart:c,dragenter:d,dragend:u,drop:f}=this,m=()=>this.navs.map((y,b)=>{if(!y)return null;const{name:v,disabled:k,tabLabel:T}=y,L=()=>{const C=[je("tab-header-item")];return k&&C.push(je("tab-header--disabled")),e===v&&C.push(je("tab-header--active")),C.join(" ")},N=(C,I)=>C||I;return a.createVNode("div",{key:v,onClick:()=>this.handleTabChange(v),draggable:N(y.sortable,i),onDragstart:C=>c(b,C),onDragenter:C=>{C.preventDefault(),d(b)},onDragleave:C=>{C.preventDefault()},onDragover:C=>{C.preventDefault()},onDragend:C=>{C.preventDefault(),u()},onDrop:C=>{C.preventDefault(),f(b,s)},class:L()},[a.createVNode("div",null,[T]),N(y.closable,t)&&a.createVNode(Zt,{class:je("tab-header-item-close"),onClick:()=>this.handleTabRemove(b,y)},null)])}),p=()=>{var b,v;const y=[];return typeof this.$slots.add=="function"?y.push((v=(b=this.$slots).add)==null?void 0:v.call(b,a.h)):n&&y.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(Gs,{style:"display:flex;",width:26,height:26},null)])),y.length?a.createVNode("div",{class:je("tab-header-operation")},[y.map((k,T)=>a.createVNode("div",{class:je("tab-header-item"),key:T},[k]))]):null};return a.createVNode("div",{style:{lineHeight:`${o}px`},class:je("tab-header")},[a.createVNode("div",{class:je("tab-header-nav")},[m()]),p(),typeof this.$slots.setting=="function"&&a.createVNode("div",{class:je("tab-header-setting")},[this.$slots.setting()])])}}),Sb=a.defineComponent({name:"Tab",components:{TabNav:r9},props:Lb,emits:["add-panel","tab-change","remove-panel","sort-change","on-drag-tab","add","change","remove","update:active","sort","drag"],setup(e,{slots:t,emit:n}){const i=a.ref(!1),s=a.ref([]),o=a.getCurrentInstance(),c=(f,m=[])=>{const{children:p}=f;return(p||[]).forEach(y=>{let{type:b}=y;b=b.name||b,b==="TabPanel"&&y.component?m.push(y.component):(b===a.Fragment||b==="template")&&c(y,m)}),m},d=()=>{if(t.default){const{children:f}=o.subTree.children[1];if(!f)return;const m=f[0],p=c(m);p.length!==s.value.length&&(s.value=p)}};return a.onMounted(()=>{d(),i.value=!0}),a.onUpdated(()=>{d()}),Se(Z({},{tabAdd(f){n("add",{e:f}),n("add-panel",{e:f})},tabChange(f){n("change",f),n("tab-change",f),n("update:active",f)},tabRemove(f,m){n("remove",f,m),n("remove-panel",f,m)},tabSort(f,m,p){const y=s.value;if(p===i9.INSERT)if(f<m)y.splice(m+1,0,s[f]),y.splice(f,1);else if(f>m)y.splice(m,0,s[f]),y.splice(f+1,1);else return!1;else{const b=y[m];y[m]=y[f],y[f]=b}s.value=[...y],n("sort",f,m,p),n("sort-change",f,m,p)},tabDrag(f,m){n("drag",f,m),n("on-drag-tab",f,m)}}),{isMounted:i,panels:s})},render(){var n,i;const e=()=>{const s=[je("tab"),this.extCls];return this.tabPosition===t9.TOP?s.push(je(`tab--${this.tabPosition}`),je(`tab--${this.type}`)):(s.push(je(`tab--${this.tabPosition}`)),this.type===e9.CARD_TAB&&s.push(je("tab--vertical-tab"))),s},t=()=>{const{panels:s,active:o,type:c,closable:d,addable:u,sortable:f,sortType:m,labelHeight:p,scrollStep:y,validateActive:b,changeOnHover:v,changeOnHoverDelay:k,tabPosition:T,tabAdd:L,tabChange:N,tabRemove:C,tabSort:I,tabDrag:M}=this,S={panels:s,active:o,type:c,closable:d,addable:u,sortable:f,sortType:m,labelHeight:p,scrollStep:y,validateActive:b,changeOnHover:v,changeOnHoverDelay:k,tabPosition:T,tabAdd:L,tabChange:N,tabRemove:C,tabSort:I,tabDrag:M};return!s||!Array.isArray(s)?null:a.createVNode(r9,S,this.$slots)};return a.createVNode("div",{class:e()},[t(),a.createVNode("div",{class:je("tab-content")},[(i=(n=this.$slots).default)==null?void 0:i.call(n)])])}}),xb=a.defineComponent({name:"TabPanel",props:Tb,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;return a.withDirectives(a.createVNode("div",{ref:"content",class:je("tab-panel")},[t()]),[[a.vShow,e]])}});const s9=Gt(Sb,{TabPanel:xb}),Vi={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let l9=1;const o9=(e,t)=>{let n=t;const i=n.position||"top-right";typeof t=="string"&&(n={message:t});const s=t.onClose,o=n.offsetX||10;let c=n.offsetY||30;const{spacing:d=10}=n;Vi[i].forEach(y=>{c+=(y.el.offsetHeight||0)+d}),l9+=1;const u=`message_${l9}`;n=Se(Z({},n),{offsetX:o,offsetY:c,id:u});const f=document.createElement("div"),m=a.createVNode(e,n);m.props.onDestroy=y=>{Db(y,i,d,s),a.render(null,f)},a.render(m,f),Vi[i].push(m);let p;m.props.getContainer&&Aa(m.props.getContainer)?p=m.props.getContainer:p=document.body,p.appendChild(f.firstElementChild)};function Db(e,t,n,i){i==null||i();const s=t.startsWith("top")?"top":"bottom";let o=-1;Vi[t].forEach((f,m)=>{f.props.id===e&&(o=m)});const d=Vi[t][o].el.offsetHeight,u=Vi[t].length;for(let f=o;f<u;f++){const m=parseInt(Vi[t][f].el.style[s],10)-d-n;Vi[t][f].component.props.offsetY=m}Vi[t].splice(o,1)}var au;(function(e){e.PRIMARY="primary",e.WARNING="warning",e.SUCCESS="success",e.ERROR="error"})(au||(au={}));const jb={id:g.string.def(""),message:g.string.def(""),theme:Pe("messageTheme",{}).def(au.PRIMARY),delay:g.number.def(3e3),dismissable:g.bool.def(!0),offsetY:g.number.def(30),spacing:g.number.def(10),extCls:g.string.def(""),onClose:g.func,getContainer:g.instanceOf(HTMLElement)};var zb=a.defineComponent({name:"Message",props:jb,emits:["destroy"],setup(e,{emit:t}){const n=a.computed(()=>["bk-message",`bk-message-${e.theme}`,`${e.extCls}`]),i=Rn.getMessageNextIndex(),s=a.computed(()=>e.getContainer&&Aa(e.getContainer)),o=a.computed(()=>({top:`${e.offsetY}px`,zIndex:i,position:s.value?"absolute":"fixed"})),c=a.ref(!1);let d=null;const u=()=>{d=setTimeout(()=>{c.value=!1},e.delay)},f=m=>{m.preventDefault(),m.stopPropagation(),c.value=!1};return a.onMounted(()=>{e.delay&&u(),c.value=!0}),a.onUnmounted(()=>{clearTimeout(d)}),a.watch(c,()=>{c.value||t("destroy",e.id)}),{classNames:n,styles:o,visible:c,close:f}},render(){const e=()=>({primary:a.createVNode(Fs,null,null),warning:a.createVNode(Ar,null,null),success:a.createVNode(zr,null,null),error:a.createVNode(Zt,null,null)})[this.theme];return a.createVNode(a.Transition,{name:"bk-message-fade"},{default:()=>[a.withDirectives(a.createVNode("div",{class:this.classNames,style:this.styles},[a.createVNode("div",{class:"bk-message-content"},[a.createVNode("div",{class:"bk-message-icon"},[e()]),this.message]),this.dismissable&&a.createVNode(Hn,{class:"bk-message-close",onClick:this.close},null)]),[[a.vShow,this.visible]])]})}});const c9=e=>{o9(zb,e)},u9=Ge(e=>{const t=document.createElement("div"),n=a.ref(!1),i=a.shallowRef(e),s=a.defineComponent({name:"DialogConfirm",setup(d,{expose:u}){a.onMounted(()=>{(document.activeElement||document.body).blur(),i.value.isShow!==!1&&(n.value=!0)});const f=async()=>{var b,v;typeof((b=i.value)==null?void 0:b.onClosed)=="function"&&await((v=i.value)==null?void 0:v.onClosed()),n.value=!1},m=async()=>{var b,v;typeof((b=i.value)==null?void 0:b.onConfirm)=="function"&&await((v=i.value)==null?void 0:v.onConfirm()),n.value=!1};function p(b){i.value=b}u({update:p});const y=()=>{const b=[],v=[];if(i.value.subTitle)switch(typeof i.value.subTitle){case"string":b.push(i.value.subTitle);break;case"function":b.push(i.value.subTitle());break;default:b.push(i.value.subTitle);break}return b.length&&v.push(a.h("div",{class:"bk-info-sub-title",style:`text-Align:${i.value.contentAlign||"center"}`},b)),v};return()=>a.createVNode(w0,Se(Z({class:"bk-info-wrapper",headerAlign:"center",footerAlign:"center"},i.value),{isShow:n.value,onClosed:f,onConfirm:m}),y())}}),o=a.createApp(s).mount(t);return{show:()=>{n.value=!0},hide:()=>{n.value=!1},update:d=>{o.update(d)}}});var ru;(function(e){e.PRIMARY="primary",e.WARNING="warning",e.SUCCESS="success",e.ERROR="error"})(ru||(ru={}));const Ob={id:g.string.def(""),title:g.string.def(""),message:g.oneOfType([g.string,g.func]).def(""),theme:Pe("notifyTheme",{}).def(ru.PRIMARY),position:g.position().def("top-right"),delay:g.number.def(5e3),dismissable:g.bool.def(!0),offsetX:g.number.def(100),offsetY:g.number.def(30),spacing:g.number.def(10),extCls:g.string.def(""),onClose:g.func};var Ab=a.defineComponent({name:"Notify",props:Ob,emits:["destroy"],setup(e,{emit:t}){const n=Rn.getMessageNextIndex(),i=a.computed(()=>e.position.indexOf("right")>1?"right":"left"),s=a.computed(()=>e.position.startsWith("top")?"top":"bottom"),o=a.computed(()=>({[i.value]:`${e.offsetX}px`,[s.value]:`${e.offsetY}px`,zIndex:n})),c=a.computed(()=>["bk-notify",`bk-notify-${e.theme}`,i.value]),d=a.computed(()=>typeof e.message=="function"?e.message():e.message),u=a.ref(!1);let f=null;const m=()=>{f=setTimeout(()=>{u.value=!1},e.delay)},p=()=>{u.value=!1};return a.onMounted(()=>{e.delay&&m(),u.value=!0}),a.onUnmounted(()=>{clearTimeout(f)}),a.watch(u,()=>{u.value||t("destroy",e.id)}),{classNames:c,styles:o,visible:u,renderMessage:d,handleClose:p}},render(){const e=()=>({primary:a.createVNode(Fs,null,null),warning:a.createVNode(Ar,null,null),success:a.createVNode(zr,null,null),error:a.createVNode(Zt,null,null)})[this.theme];return a.createVNode(a.Transition,{name:"bk-notify-fade"},{default:()=>[a.withDirectives(a.createVNode("div",{class:this.classNames,style:this.styles},[a.createVNode("div",{class:"bk-notify-content"},[a.createVNode("div",{class:"bk-notify-icon"},[e()]),this.title?a.createVNode("div",{class:"bk-notify-content-header"},[this.title]):"",a.createVNode("div",{class:"bk-notify-content-text"},[this.renderMessage])]),this.dismissable&&a.createVNode(Hn,{class:"bk-notify-icon bk-notify-close",onClick:this.handleClose},null)]),[[a.vShow,this.visible]])]})}});const d9=e=>{o9(Ab,e)},f9=Symbol("MENU_PROVIDER_KEY"),su=Symbol("MENU_PROVIDER_KEY_PATH"),Pb=e=>{a.provide(f9,e)},Eb=e=>{const{parentKeys:t,parentInfo:n}=lu(),i=a.computed(()=>[...t.value,e]);a.provide(su,{parentInfo:{key:e,parentKey:n==null?void 0:n.key},parentKeys:i})},h9=()=>a.inject(f9),lu=()=>{var n;const e=a.getCurrentInstance(),t=e.parent?e.parent.provides:(n=e.vnode.appContext)==null?void 0:n.provides;return t&&su in t?a.inject(su):{parentInfo:void 0,parentKeys:a.ref([])}},ou=function(e){return(e||"").split(" ").filter(t=>!!t.trim())};function g9(e,t){if(!e||!t)return;const n=ou(t);let i=e.getAttribute("class")||"";if(e.classList){e.classList.remove(...n);return}n.forEach(o=>{i=i.replace(` ${o} `," ")});const s=ou(i).join(" ");e.setAttribute("class",s)}function m9(e,t){if(!e)return;let n=e.getAttribute("class")||"";const i=ou(n),s=(t||"").split(" ").filter(o=>!i.includes(o)&&!!o.trim());e.classList?e.classList.add(...s):(n+=` ${s.join(" ")}`,e.setAttribute("class",n))}const Vb=()=>({css:!0,onBeforeEnter:e=>{m9(e,"collapse-transition"),e.dataset||(e.dataset={}),e.style.height="0px",e.style.maxHeight="0px"},onEnter:e=>{e.dataset.oldOverflow=e.style.overflow,e.scrollHeight!==0?(e.style.height=`${e.scrollHeight}px`,e.style.maxHeight=`${e.scrollHeight}px`):(e.style.height="0px",e.style.maxHeight="0px"),e.style.overflow="hidden"},onAfterEnter:e=>{e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow,g9(e,"collapse-transition")},onBeforeLeave:e=>{e.dataset||(e.dataset={}),e.dataset.oldOverflow=e.style.overflow,e.style.height=`${e.scrollHeight}px`,e.style.maxHeight=`${e.scrollHeight}px`,e.style.overflow="hidden"},onLeave:e=>{e.scrollHeight!==0&&(m9(e,"collapse-transition"),e.style.transitionProperty="height",e.style.height="0px",e.style.maxHeight="0px")},onAfterLeave:e=>{g9(e,"collapse-transition"),e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow}}),Jb={activeKey:String,collapse:Boolean,openedKeys:{type:Array},mode:{type:String,default:"vertical"},uniqueOpen:{type:Boolean,default:!0}};var Rb=a.defineComponent({name:"Menu",props:Jb,emits:["update:activeKey","update:openKeys","click","openChange"],setup(e,{slots:t,emit:n,expose:i}){const s=a.ref(""),o=a.ref([]),c=a.ref({}),d=a.computed(()=>e.mode),u=a.ref(e.collapse),f=a.ref([]);a.watchEffect(()=>{e.activeKey!==void 0&&(s.value=e.activeKey)}),a.watch(()=>e.collapse,()=>{u.value=e.collapse;const v=[...f.value],k=[...o.value];o.value=u.value?[]:v,f.value=u.value?k:[]},{immediate:!0}),a.watch(()=>e.openedKeys,(v=o.value)=>{o.value=v},{immediate:!0});const m=(v,k)=>{c.value=Se(Z({},c.value),{[v]:k})},p=v=>{delete c.value[v],c.value=Z({},c.value)},y=(v,k)=>{k?e.uniqueOpen?o.value=[v]:o.value.push(v):o.value=o.value.filter(T=>T!==v),n("openChange",k,c.value[v]),n("update:openKeys",[...o.value])},b=v=>{s.value=v,n("click",c.value[v]),n("update:activeKey",v,c.value[v])};return Pb({activeKey:s,menuStore:c,registerMenuInfo:m,unregisterMenuInfo:p,mode:d.value,openedKeys:o,collapse:u,handleOpenChange:y,handleActiveChange:b}),i({activeKey:s,openedKeys:o,menuStore:c}),()=>{var v;return a.createVNode("div",{class:{"bk-menu":!0,"is-collapse":u.value}},[(v=t.default)==null?void 0:v.call(t)])}}}),Qb=a.defineComponent({name:"MenuGroup",props:{name:{type:String,default:""}},setup(e,{slots:t}){return()=>{var n;return a.createVNode("div",{class:"bk-menu-group"},[a.createVNode("div",{class:"group-name"},[e.name]),a.createVNode("ul",{class:"group-wrap"},[(n=t.default)==null?void 0:n.call(t)])])}}}),_b=a.defineComponent({name:"MenuItem",props:{needIcon:{type:Boolean,default:!0}},emits:["click"],slots:["icon"],setup(e,{slots:t,emit:n}){var b,v;const{registerMenuInfo:i,unregisterMenuInfo:s,activeKey:o,handleActiveChange:c}=h9(),d=a.getCurrentInstance(),{parentInfo:u}=lu(),f=((v=(b=d.vnode.key)==null?void 0:b.toString)==null?void 0:v.call(b))||String(d.uid),m=a.computed(()=>o.value===f),p=a.computed(()=>e.needIcon);i(f,{key:f,parentKey:u==null?void 0:u.key});const y=k=>{c(f),n("click",k)};return a.onBeforeUnmount(()=>s(f)),()=>{var k,T;return a.createVNode("li",{class:{"bk-menu-item":!0,"is-active":m.value},onClick:y},[p.value&&a.createVNode("span",{class:"item-icon"},[((k=t==null?void 0:t.icon)==null?void 0:k.call(t))||a.createVNode("i",{class:"default-icon"},null)]),a.createVNode("span",{class:"item-content"},[(T=t.default)==null?void 0:T.call(t)])])}}});const Wb={title:{type:String,default:"title"}};var Hb=a.defineComponent({name:"Submenu",props:Wb,emits:["collapse"],slots:["icon"],setup(e,{slots:t,emit:n}){var L,N;const{registerMenuInfo:i,unregisterMenuInfo:s,openedKeys:o,handleOpenChange:c,collapse:d,activeKey:u,menuStore:f}=h9(),{parentInfo:m}=lu(),p=a.getCurrentInstance(),y=((N=(L=p.vnode.key)==null?void 0:L.toString)==null?void 0:N.call(L))||String(p.uid),b=a.ref(Vb()),v=a.computed(()=>o.value.includes(y)),k=a.computed(()=>{var I,M;const C=(M=(I=f.value)==null?void 0:I[u.value])==null?void 0:M.parentKey;return d.value&&C===y&&v});Eb(y),i(y,{key:y,parentKey:m==null?void 0:m.key}),a.onBeforeUnmount(()=>s(y));const T=()=>{c(y,!v.value),n("collapse",!v.value,p)};return()=>{var C;return a.createVNode("li",{class:{"bk-menu-submenu":!0,"is-opened":v.value}},[a.createVNode("div",{class:{"submenu-header":!0,"is-collapse":k.value},onClick:T},[a.createVNode("span",{class:"submenu-header-icon"},[((C=t.icon)==null?void 0:C.call(t))||a.createVNode(gc,{class:"menu-icon"},null)]),a.createVNode("span",{class:"submenu-header-content"},[e.title]),a.createVNode(Vs,{class:{"submenu-header-collapse":!0,"is-collapse":o.value.includes(y)}},null)]),a.createVNode(a.Transition,b.value,{default:()=>{var I;return[a.withDirectives(a.createVNode("ul",{class:"submenu-list"},[(I=t.default)==null?void 0:I.call(t)]),[[a.vShow,v.value]])]}})])}}});const p9=Gt(Rb,{Item:_b,Submenu:Hb,Group:Qb}),Bb={sideTitle:{type:String,default:""},navigationType:{type:String,default:"left-right"}};var b9=a.defineComponent({props:Bb,slots:["side-icon"],setup(e,{slots:t}){return()=>{var n,i;return a.createVNode("div",{class:"bk-navigation-title",style:{borderBottomWidth:e.navigationType==="left-right"?"0":"1px"}},[((n=t.default)==null?void 0:n.call(t))||[a.createVNode("span",{class:"title-icon"},[((i=t["side-icon"])==null?void 0:i.call(t))||a.createVNode("i",{class:"bk-icon icon-rtx"},null)]),a.createVNode("span",{class:"title-desc"},[e.sideTitle])]])}}});const Fb={navWidth:{type:[Number,String],default:60},hoverWidth:{type:[Number,String],default:260},showSideNavTitle:{type:Boolean,default:!0},sideTitle:{type:String,default:""},headerTitle:{type:String,default:""},hoverLeaveDelay:{type:Number,default:0},hoverEnterDelay:{type:Number,default:100},defaultOpen:Boolean,headHeight:{type:[Number,String],default:52},navigationType:{type:String,default:"left-right",validator(e){return["top-bottom","left-right"].includes(e)}},needMenu:{type:Boolean,default:!0}};var Gb=a.defineComponent({name:"Navigation",props:Fb,emits:["leave","toggle","hover","toggle-click"],slots:["header","menu","footer","side-icon","side-header"],setup(e,{emit:t}){const n=a.ref(e.headerTitle),i=a.reactive({click:!1,hover:!1,delay:!1,timer:null,enterTimer:null});e.defaultOpen&&(i.click=!i.click,i.hover=i.click,t("toggle",i.hover)),a.onBeforeUnmount(()=>{i.timer&&window.clearTimeout(i.timer)});const s=()=>{i.click||(i.enterTimer=setTimeout(()=>{i.hover=!0,i.enterTimer&&window.clearTimeout(i.enterTimer),i.timer&&window.clearTimeout(i.timer),t("hover",i.hover),t("toggle",i.hover)},e.hoverEnterDelay))},o=()=>{i.click||(i.enterTimer&&window.clearTimeout(i.enterTimer),i.timer=setTimeout(()=>{i.hover=!1,window.clearTimeout(i.timer),t("leave",i.hover),t("toggle",i.hover)},e.hoverLeaveDelay))},c=()=>{i.click=!i.click,i.hover=i.click,t("toggle",i.hover),t("toggle-click",i.hover)};return{defaultHeaderTitle:n,nav:i,onBeforeUnmount:a.onBeforeUnmount,handleMouseOver:s,handleMouseLeave:o,handleClick:c}},render(){var e,t,n,i,s,o,c,d,u,f,m,p;return a.createVNode("div",{class:"bk-navigation"},[this.navigationType==="top-bottom"&&a.createVNode("div",{class:"bk-navigation-header",style:{flexBasis:`${this.headHeight}px`}},[a.createVNode(b9,{sideTitle:this.sideTitle},{default:this.$slots["side-header"],"side-icon":this.$slots["side-header"]?void 0:this.$slots["side-icon"]}),a.createVNode("div",{class:"header-right"},[(t=(e=this.$slots).header)==null?void 0:t.call(e)])]),a.createVNode("div",{class:"bk-navigation-wrapper"},[this.needMenu&&a.createVNode("div",{class:"navigation-nav",style:{width:this.nav.click?`${this.hoverWidth}px`:`${this.navWidth}px`}},[a.createVNode("div",{class:"nav-slider",onMouseenter:this.handleMouseOver,onMouseleave:this.handleMouseLeave,style:{width:this.nav.hover?`${this.hoverWidth}px`:`${this.navWidth}px`,borderRight:this.navigationType!=="top-bottom"?"none":"1px solid #DCDEE5"}},[this.navigationType!=="top-bottom"&&this.showSideNavTitle&&a.createVNode(b9,{style:{flexBasis:`${this.headHeight}px`},sideTitle:this.sideTitle},{default:this.$slots["side-header"],"side-icon":this.$slots["side-header"]?void 0:this.$slots["side-icon"]}),a.createVNode("div",{class:"nav-slider-list",style:{height:`calc(100vh - ${+this.headHeight+56}px)`}},[(i=(n=this.$slots).menu)==null?void 0:i.call(n)]),a.createVNode("div",{class:"nav-slider-footer"},[a.createVNode("div",{class:{"is-left":this.navigationType!=="top-bottom","footer-icon":!0},onClick:this.handleClick},[a.createVNode(nc,{class:"footer-icon-svg",style:{transform:this.nav.click?"rotate(180deg)":"rotate(0deg)"}},null)])])])]),a.createVNode("div",{class:"navigation-container",style:{maxWidth:this.needMenu?"calc(100vw - 60px)":"100vw"}},[this.navigationType!=="top-bottom"&&a.createVNode("div",{class:"container-header",style:{flexBasis:`${this.headHeight}px`}},[((o=(s=this.$slots).header)==null?void 0:o.call(s))||[a.createVNode("div",{class:"container-header-title"},[this.headerTitle]),a.createVNode("div",{class:"container-header-sets"},[(d=(c=this.$slots)["header-set"])==null?void 0:d.call(c)])]]),a.createVNode("div",{class:"container-content",style:{maxHeight:`calc(100vh - ${this.headHeight}px)`}},[(f=(u=this.$slots).default)==null?void 0:f.call(u),a.createVNode("div",{class:"container-footer"},[(p=(m=this.$slots).footer)==null?void 0:p.call(m)])])])])])}});const y9=Ge(Gb),Zb={placement:{type:String,default:"bottom-start",validator:e=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].indexOf(e)<0?(console.error(`placement property is not valid: '${e}'`),!1):!0},className:{type:String},extPopoverCls:{type:String},appendToBody:{type:Boolean},triggerRef:{type:Object},onClick:Function};var cu=a.defineComponent({props:Zb,emits:["changeVisible"],setup(e,{emit:t}){let n=Object.create(null);const i=a.ref(null);a.onMounted(()=>{o()}),a.onBeforeUnmount(()=>{s()});const s=()=>{if(n&&Object.keys(n).length!==0){const u=n;u.isShow&&u.hide(),u.destroy(),n=null,t("changeVisible",!1)}},o=()=>{n&&Object.keys(n).length!==0?a.nextTick(()=>{n.update()}):a.nextTick(()=>{n=new G4(e.triggerRef,i.value,{placement:e.placement,trigger:"manual",modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},{name:"offset",options:{offset:[0,4]}}]})})},c=a.computed(()=>{const u={};return e.appendToBody&&(u["z-index"]=1060+Rn.getModalNextIndex()),u}),d=a.reactive({styles:c});return Se(Z({},a.toRefs(d)),{refContentRef:i,updateDropdown:o,destoryDropdown:s})},render(){var e,t,n;return a.createVNode("div",{ref:"refContentRef",class:["bk-date-picker-dropdown",this.className,this.extPopoverCls],style:this.styles,onClick:this.onClick},[(n=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?n:""])}});const Yb={showTime:{type:Boolean,required:!0},isTime:{type:Boolean,default:!1},timeDisabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}};var C9=a.defineComponent({props:Yb,emits:["pick-clear","pick-success","pick-toggle-time"],setup(e,{emit:t}){const n=a.computed(()=>({time:e.isTime?"\u9009\u62E9\u65E5\u671F":"\u9009\u62E9\u65F6\u95F4",clear:"\u6E05\u9664",ok:"\u786E\u5B9A"})),i=()=>{t("pick-clear")},s=()=>{t("pick-success")},o=()=>{e.timeDisabled||t("pick-toggle-time")},c=a.ref(null);return{labels:n,handleClear:i,handleSuccess:s,handleToggleTime:o,handleTab:u=>{const m=[...c.value.children][u.shiftKey?"shift":"pop"]();document.activeElement===m&&(u.preventDefault(),u.stopPropagation())}}},render(){var e,t,n;return a.createVNode("div",{class:"bk-picker-confirm",ref:"elRef",onKeydown:this.handleTab},[this.showTime?a.createVNode(Pt,{text:!0,class:"bk-picker-confirm-time",disabled:this.timeDisabled,onClick:this.handleToggleTime},{default:()=>[this.labels.time]}):"",(n=(t=(e=this.$slots).confirm)==null?void 0:t.call(e))!=null?n:a.createVNode("div",{class:"bk-picker-confirm-action"},[this.clearable?a.createVNode("a",{href:"javascript: void(0);",onClick:this.handleClear,onKeydown:this.handleClear},[this.labels.clear]):"",a.createVNode("a",{href:"javascript: void(0);",class:"confirm",onClick:this.handleSuccess,onKeydown_enter:this.handleSuccess},[this.labels.ok])])])}}),v9=1e3*60*60*24;function w9(e,t){return new Date(e,t+1,0).getDate()}function M9(e,t,n){return t===0&&n>50?e-1:t===11&&n<10?e+1:e}function I9(e,t,n,i){t>11&&(t=0,e++);var s=new Date(e,t,n);i&&s.setDate(s.getDate()+4-(s.getDay()||7));var o=i?s.getFullYear():e,c=new Date(o,0,1),d=1+Math.round((s-c)/v9);i||(d+=c.getDay());var u=Math.ceil(d/7);if(!i){var f=new Date(e,t,n),m=new Date(e+1,0,1),p=m.getDay();f.getTime()>=m.getTime()-v9*p&&(u=1)}return u}function Ub(e,t,n){for(var i=this.lang||"en",s=this.onlyDays,o=typeof this.weekStart=="undefined"?1:this.weekStart,c=o===1,d=[],u=new Date(e,t,1),f=u.getDay()||(c?7:0),m=o-f,p=I9(e,t,1,c),y=w9(e,t),b=w9(e,t-1),v,k,T,L=M9(e,t,p),N={month:t,year:e,daysInMonth:y},C=0;C<7;C++){T=m;for(var I=0;I<8;I++){C>0&&I>0&&m++,m>y||m<1?(k=m>y?m-y:b+m,v=m>y?t+1:t-1):(k=m,v=t);var M=function(){return I===0?"weekLabel":C===0?"dayLabel":m<1?"prevMonth":m>y?"nextMonth":"monthDay"}(),S=T!==m&&C>0,z={desc:S?k:p,week:p,type:M,format:c?"ISO 8601":"US",date:S?new Date(Date.UTC(e,v,k)):!1,year:L,index:d.length};n&&(typeof n=="function"?z=n.call(N,z,i):n.forEach(function(j){z=j.call(N,z,i)})),s&&S?d.push(z):s||d.push(z)}C>0&&(p=I9(e,v,k+1,c)),L=M9(e,t,p)}return N.cells=d,N}var $b=function(e){return Ub.bind(e)},Kb={weekPlaceholder:"",columnNames:{en:{0:"w",1:"monday",2:"tuesday",3:"wednesday",4:"thursday",5:"friday",6:"saturday",7:"sunday"},sv:{0:"v",1:"m\xE5ndag",2:"tisdag",3:"onsdag",4:"torsdag",5:"fredag",6:"l\xF6rdag",7:"s\xF6ndag"},pt:{0:"s",1:"segunda",2:"ter\xE7a",3:"quarta",4:"quinta",5:"sexta",6:"s\xE1bado",7:"domingo"}},monthNames:{en:["January","February","March","April","May","June","July","August","September","October","November","December"],sv:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"],pt:["Janeiro","Fevereiro","Mar\xE7o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"]},classes:{dayLabel:"day-of-week",weekLabel:"week-number",prevMonth:"inactive",nextMonth:"inactive",monthDay:"day-in-month"}},Fn=Kb;function Xb(e){return e==null?!1:e.constructor===Array||e.constructor===Object}function N9(e,t){for(var n in e)t[n]?Xb(e[n])&&N9(e[n],t[n]):t[n]=e[n]}function L9(e,t){var n=[Fn.classes[e.type]];return e.class?e.class=(typeof e.class=="string"?[e.class]:e.class).concat(n):e.class=n,e.type.indexOf("Label")>0&&(e.index==0&&Fn.weekPlaceholder?e.desc=Fn.weekPlaceholder:e.index<8?e.desc=Fn.columnNames[t][e.index]:e.index%8==0&&(e.desc=e.week)),e.date&&(e.monthName=Fn.monthNames[t][e.date.getMonth()]),this.monthName||(this.monthName=Fn.monthNames[t][this.month]),this.labels||(this.labels={monthNames:Fn.monthNames[t],columnNames:Fn.columnNames[t],classes:Fn.classes}),e}L9.setLabels=function(e){N9(e,Fn)};var qb=L9,ey={Generator:$b,addLabels:qb};function bn(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Vt(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function an(e){Vt(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console!="undefined"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn(new Error().stack)),new Date(NaN))}function ty(e,t){Vt(2,arguments);var n=an(e).getTime(),i=bn(t);return new Date(n+i)}function ny(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function iy(e){return Vt(1,arguments),e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ay(e){if(Vt(1,arguments),!iy(e)&&typeof e!="number")return!1;var t=an(e);return!isNaN(Number(t))}var ry={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},sy=function(e,t,n){var i,s=ry[e];return typeof s=="string"?i=s:t===1?i=s.one:i=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},ly=sy;function uu(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,i=e.formats[n]||e.formats[e.defaultWidth];return i}}var oy={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},cy={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},uy={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},dy={date:uu({formats:oy,defaultWidth:"full"}),time:uu({formats:cy,defaultWidth:"full"}),dateTime:uu({formats:uy,defaultWidth:"full"})},fy=dy,hy={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},gy=function(e,t,n,i){return hy[e]},my=gy;function Fr(e){return function(t,n){var i=n||{},s=i.context?String(i.context):"standalone",o;if(s==="formatting"&&e.formattingValues){var c=e.defaultFormattingWidth||e.defaultWidth,d=i.width?String(i.width):c;o=e.formattingValues[d]||e.formattingValues[c]}else{var u=e.defaultWidth,f=i.width?String(i.width):e.defaultWidth;o=e.values[f]||e.values[u]}var m=e.argumentCallback?e.argumentCallback(t):t;return o[m]}}var py={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},by={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},yy={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Cy={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},vy={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},wy={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},My=function(e,t){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Iy={ordinalNumber:My,era:Fr({values:py,defaultWidth:"wide"}),quarter:Fr({values:by,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Fr({values:yy,defaultWidth:"wide"}),day:Fr({values:Cy,defaultWidth:"wide"}),dayPeriod:Fr({values:vy,defaultWidth:"wide",formattingValues:wy,defaultFormattingWidth:"wide"})},Ny=Iy;function Gr(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.width,s=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(s);if(!o)return null;var c=o[0],d=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(d)?ky(d,function(p){return p.test(c)}):Ly(d,function(p){return p.test(c)}),f;f=e.valueCallback?e.valueCallback(u):u,f=n.valueCallback?n.valueCallback(f):f;var m=t.slice(c.length);return{value:f,rest:m}}}function Ly(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function ky(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function Ty(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.match(e.matchPattern);if(!i)return null;var s=i[0],o=t.match(e.parsePattern);if(!o)return null;var c=e.valueCallback?e.valueCallback(o[0]):o[0];c=n.valueCallback?n.valueCallback(c):c;var d=t.slice(s.length);return{value:c,rest:d}}}var Sy=/^(\d+)(th|st|nd|rd)?/i,xy=/\d+/i,Dy={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},jy={any:[/^b/i,/^(a|c)/i]},zy={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Oy={any:[/1/i,/2/i,/3/i,/4/i]},Ay={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Py={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Ey={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Vy={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Jy={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ry={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Qy={ordinalNumber:Ty({matchPattern:Sy,parsePattern:xy,valueCallback:function(e){return parseInt(e,10)}}),era:Gr({matchPatterns:Dy,defaultMatchWidth:"wide",parsePatterns:jy,defaultParseWidth:"any"}),quarter:Gr({matchPatterns:zy,defaultMatchWidth:"wide",parsePatterns:Oy,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Gr({matchPatterns:Ay,defaultMatchWidth:"wide",parsePatterns:Py,defaultParseWidth:"any"}),day:Gr({matchPatterns:Ey,defaultMatchWidth:"wide",parsePatterns:Vy,defaultParseWidth:"any"}),dayPeriod:Gr({matchPatterns:Jy,defaultMatchWidth:"any",parsePatterns:Ry,defaultParseWidth:"any"})},_y=Qy,Wy={code:"en-US",formatDistance:ly,formatLong:fy,formatRelative:my,localize:Ny,match:_y,options:{weekStartsOn:0,firstWeekContainsDate:1}},Hy=Wy;function By(e,t){Vt(2,arguments);var n=bn(t);return ty(e,-n)}var Fy=864e5;function Gy(e){Vt(1,arguments);var t=an(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),s=n-i;return Math.floor(s/Fy)+1}function bl(e){Vt(1,arguments);var t=1,n=an(e),i=n.getUTCDay(),s=(i<t?7:0)+i-t;return n.setUTCDate(n.getUTCDate()-s),n.setUTCHours(0,0,0,0),n}function k9(e){Vt(1,arguments);var t=an(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var s=bl(i),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var c=bl(o);return t.getTime()>=s.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}function Zy(e){Vt(1,arguments);var t=k9(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=bl(n);return i}var Yy=6048e5;function Uy(e){Vt(1,arguments);var t=an(e),n=bl(t).getTime()-Zy(t).getTime();return Math.round(n/Yy)+1}function yl(e,t){Vt(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.weekStartsOn,o=s==null?0:bn(s),c=n.weekStartsOn==null?o:bn(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=an(e),u=d.getUTCDay(),f=(u<c?7:0)+u-c;return d.setUTCDate(d.getUTCDate()-f),d.setUTCHours(0,0,0,0),d}function T9(e,t){Vt(1,arguments);var n=an(e),i=n.getUTCFullYear(),s=t||{},o=s.locale,c=o&&o.options&&o.options.firstWeekContainsDate,d=c==null?1:bn(c),u=s.firstWeekContainsDate==null?d:bn(s.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=new Date(0);f.setUTCFullYear(i+1,0,u),f.setUTCHours(0,0,0,0);var m=yl(f,t),p=new Date(0);p.setUTCFullYear(i,0,u),p.setUTCHours(0,0,0,0);var y=yl(p,t);return n.getTime()>=m.getTime()?i+1:n.getTime()>=y.getTime()?i:i-1}function $y(e,t){Vt(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.firstWeekContainsDate,o=s==null?1:bn(s),c=n.firstWeekContainsDate==null?o:bn(n.firstWeekContainsDate),d=T9(e,t),u=new Date(0);u.setUTCFullYear(d,0,c),u.setUTCHours(0,0,0,0);var f=yl(u,t);return f}var Ky=6048e5;function Xy(e,t){Vt(1,arguments);var n=an(e),i=yl(n,t).getTime()-$y(n,t).getTime();return Math.round(i/Ky)+1}function at(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var qy={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return at(t==="yy"?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):at(n+1,2)},d:function(e,t){return at(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,t){return at(e.getUTCHours()%12||12,t.length)},H:function(e,t){return at(e.getUTCHours(),t.length)},m:function(e,t){return at(e.getUTCMinutes(),t.length)},s:function(e,t){return at(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),s=Math.floor(i*Math.pow(10,n-3));return at(s,t.length)}},Ji=qy,Ya={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},eC={G:function(e,t,n){var i=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){var i=e.getUTCFullYear(),s=i>0?i:1-i;return n.ordinalNumber(s,{unit:"year"})}return Ji.y(e,t)},Y:function(e,t,n,i){var s=T9(e,i),o=s>0?s:1-s;if(t==="YY"){var c=o%100;return at(c,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):at(o,t.length)},R:function(e,t){var n=k9(e);return at(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return at(n,t.length)},Q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return at(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return at(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){var i=e.getUTCMonth();switch(t){case"M":case"MM":return Ji.M(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){var i=e.getUTCMonth();switch(t){case"L":return String(i+1);case"LL":return at(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){var s=Xy(e,i);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):at(s,t.length)},I:function(e,t,n){var i=Uy(e);return t==="Io"?n.ordinalNumber(i,{unit:"week"}):at(i,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Ji.d(e,t)},D:function(e,t,n){var i=Gy(e);return t==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):at(i,t.length)},E:function(e,t,n){var i=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,n,i){var s=e.getUTCDay(),o=(s-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return at(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){var s=e.getUTCDay(),o=(s-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return at(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),s=i===0?7:i;switch(t){case"i":return String(s);case"ii":return at(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){var i=e.getUTCHours(),s=i/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){var i=e.getUTCHours(),s;switch(i===12?s=Ya.noon:i===0?s=Ya.midnight:s=i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i=e.getUTCHours(),s;switch(i>=17?s=Ya.evening:i>=12?s=Ya.afternoon:i>=4?s=Ya.morning:s=Ya.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){var i=e.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return Ji.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Ji.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(i,{unit:"hour"}):at(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return i===0&&(i=24),t==="ko"?n.ordinalNumber(i,{unit:"hour"}):at(i,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Ji.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Ji.s(e,t)},S:function(e,t){return Ji.S(e,t)},X:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return x9(o);case"XXXX":case"XX":return oa(o);case"XXXXX":case"XXX":default:return oa(o,":")}},x:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();switch(t){case"x":return x9(o);case"xxxx":case"xx":return oa(o);case"xxxxx":case"xxx":default:return oa(o,":")}},O:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+S9(o,":");case"OOOO":default:return"GMT"+oa(o,":")}},z:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+S9(o,":");case"zzzz":default:return"GMT"+oa(o,":")}},t:function(e,t,n,i){var s=i._originalDate||e,o=Math.floor(s.getTime()/1e3);return at(o,t.length)},T:function(e,t,n,i){var s=i._originalDate||e,o=s.getTime();return at(o,t.length)}};function S9(e,t){var n=e>0?"-":"+",i=Math.abs(e),s=Math.floor(i/60),o=i%60;if(o===0)return n+String(s);var c=t||"";return n+String(s)+c+at(o,2)}function x9(e,t){if(e%60===0){var n=e>0?"-":"+";return n+at(Math.abs(e)/60,2)}return oa(e,t)}function oa(e,t){var n=t||"",i=e>0?"-":"+",s=Math.abs(e),o=at(Math.floor(s/60),2),c=at(s%60,2);return i+o+n+c}var tC=eC;function D9(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function j9(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}function nC(e,t){var n=e.match(/(P+)(p+)?/)||[],i=n[1],s=n[2];if(!s)return D9(e,t);var o;switch(i){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",D9(i,t)).replace("{{time}}",j9(s,t))}var iC={p:j9,P:nC},aC=iC,rC=["D","DD"],sC=["YY","YYYY"];function lC(e){return rC.indexOf(e)!==-1}function oC(e){return sC.indexOf(e)!==-1}function z9(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var cC=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,uC=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,dC=/^'([^]*?)'?$/,fC=/''/g,hC=/[a-zA-Z]/;function gC(e,t,n){Vt(2,arguments);var i=String(t),s=n||{},o=s.locale||Hy,c=o.options&&o.options.firstWeekContainsDate,d=c==null?1:bn(c),u=s.firstWeekContainsDate==null?d:bn(s.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=o.options&&o.options.weekStartsOn,m=f==null?0:bn(f),p=s.weekStartsOn==null?m:bn(s.weekStartsOn);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var y=an(e);if(!ay(y))throw new RangeError("Invalid time value");var b=ny(y),v=By(y,b),k={firstWeekContainsDate:u,weekStartsOn:p,locale:o,_originalDate:y},T=i.match(uC).map(function(L){var N=L[0];if(N==="p"||N==="P"){var C=aC[N];return C(L,o.formatLong,k)}return L}).join("").match(cC).map(function(L){if(L==="''")return"'";var N=L[0];if(N==="'")return mC(L);var C=tC[N];if(C)return!s.useAdditionalWeekYearTokens&&oC(L)&&z9(L,t,e),!s.useAdditionalDayOfYearTokens&&lC(L)&&z9(L,t,e),C(v,L,o.localize,k);if(N.match(hC))throw new RangeError("Format string contains an unescaped latin alphabet character `"+N+"`");return L}).join("");return T}function mC(e){return e.match(dC)[1].replace(fC,"'")}const vt={},O9=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,ca=/\d\d?/,pC=/\d{3}/,bC=/\d{4}/,Cl=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,A9=function(){};function P9(e,t){const n=[];for(let i=0,s=e.length;i<s;i++)n.push(e[i].substr(0,t));return n}function E9(e){return(t,n,i)=>{const s=i[e].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~s&&(t.month=s)}}function Gn(e,t=2){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}const V9=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],J9=["January","February","March","April","May","June","July","August","September","October","November","December"],yC=P9(J9,3),CC=P9(V9,3);vt.i18n={dayNamesShort:CC,dayNames:V9,monthNamesShort:yC,monthNames:J9,amPm:["am","pm"],DoFn(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10)*e%10]}};const R9={D(e){return e.getDay()},DD(e){return Gn(e.getDay())},Do(e,t){return t.DoFn(e.getDate())},d(e){return e.getDate()},dd(e){return Gn(e.getDate())},ddd(e,t){return t.dayNamesShort[e.getDay()]},dddd(e,t){return t.dayNames[e.getDay()]},M(e){return e.getMonth()+1},MM(e){return Gn(e.getMonth()+1)},MMM(e,t){return t.monthNamesShort[e.getMonth()]},MMMM(e,t){return t.monthNames[e.getMonth()]},yy(e){return String(e.getFullYear()).substr(2)},yyyy(e){return e.getFullYear()},h(e){return e.getHours()%12||12},hh(e){return Gn(e.getHours()%12||12)},H(e){return e.getHours()},HH(e){return Gn(e.getHours())},m(e){return e.getMinutes()},mm(e){return Gn(e.getMinutes())},s(e){return e.getSeconds()},ss(e){return Gn(e.getSeconds())},S(e){return Math.round(e.getMilliseconds()/100)},SS(e){return Gn(Math.round(e.getMilliseconds()/10),2)},SSS(e){return Gn(e.getMilliseconds(),3)},a(e,t){return e.getHours()<12?t.amPm[0]:t.amPm[1]},A(e,t){return e.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},ZZ(e){const t=e.getTimezoneOffset();return(t>0?"-":"+")+Gn(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)}},mt={d:[ca,(e,t)=>{e.day=t}],M:[ca,(e,t)=>{e.month=t-1}],yy:[ca,(e,t)=>{const i=+`${new Date().getFullYear()}`.substr(0,2);e.year=`${t>68?i-1:i}${t}`}],h:[ca,(e,t)=>{e.hour=t}],m:[ca,(e,t)=>{e.minute=t}],s:[ca,(e,t)=>{e.second=t}],yyyy:[bC,(e,t)=>{e.year=t}],S:[/\d/,(e,t)=>{e.millisecond=t*100}],SS:[/\d{2}/,(e,t)=>{e.millisecond=t*10}],SSS:[pC,(e,t)=>{e.millisecond=t}],D:[ca,A9],ddd:[Cl,A9],MMM:[Cl,E9("monthNamesShort")],MMMM:[Cl,E9("monthNames")],a:[Cl,(e,t,n)=>{const i=t.toLowerCase();i===n.amPm[0]?e.isPm=!1:i===n.amPm[1]&&(e.isPm=!0)}],ZZ:[/[\\+\\-]\d\d:?\d\d/,(e,t)=>{const n=`${t}`.match(/([\\+\\-]|\d\d)/gi);let i;n&&(i=+(n[1]*60)+parseInt(n[2],10),e.timezoneOffset=n[0]==="+"?i:-i)}]};mt.DD=mt.D,mt.dddd=mt.ddd,mt.Do=mt.dd=mt.d,mt.mm=mt.m,mt.hh=mt.H=mt.HH=mt.h,mt.MM=mt.M,mt.ss=mt.s,mt.A=mt.a,vt.masks={default:"ddd MMM dd yyyy HH:mm:ss",shortDate:"M/D/yy",mediumDate:"MMM d, yyyy",longDate:"MMMM d, yyyy",fullDate:"dddd, MMMM d, yyyy",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},vt.format=(e,t,n)=>{const i=n||vt.i18n;if(typeof e=="number"&&(e=new Date(e)),Object.prototype.toString.call(e)!=="[object Date]"||isNaN(e.getTime()))throw new Error("Invalid Date in fecha.format");return t=vt.masks[t]||t||vt.masks.default,t.replace(O9,s=>s in R9?R9[s](e,i):s.slice(1,s.length-1))},vt.parse=(e,t,n)=>{const i=n||vt.i18n;if(typeof t!="string")throw new Error("Invalid format in fecha.parse");if(t=vt.masks[t]||t,e.length>1e3)return!1;let s=!0;const o={};if(t.replace(O9,u=>{if(mt[u]){const f=mt[u],m=e.search(f[0]);~m?e.replace(f[0],p=>(f[1](o,p,i),e=e.substr(m+p.length),p)):s=!1}return mt[u]?"":u.slice(1,u.length-1)}),!s)return!1;const c=new Date;o.isPm===!0&&o.hour!==null&&+o.hour!=12?o.hour=+o.hour+12:o.isPm===!1&&+o.hour==12&&(o.hour=0);let d;return o.timezoneOffset!==null&&o.timezoneOffset!==void 0?(o.minute=+(o.minute||0)-+o.timezoneOffset,d=new Date(Date.UTC(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0))):d=new Date(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0),d};const du=" - ",ui=(e,t)=>{const n=an(new Date(e));return!n||isNaN(n.getTime())?"":gC(n,t||"yyyy-MM-dd")},fu=(e,t)=>{if(Array.isArray(e)&&e.length===2){const n=e[0],i=e[1];if(n&&i)return ui(n,t)+du+ui(i,t)}else if(!Array.isArray(e)&&e instanceof Date)return ui(e,t);return""},hu=(e,t)=>{const n=Array.isArray(e)?e:e.split(du);if(n.length===2){const i=n[0],s=n[1];return[i instanceof Date?i:vt.parse(i,t||"yyyy-MM-dd"),s instanceof Date?s:vt.parse(s,t||"yyyy-MM-dd")]}return[]},Ua={default:{formatter(e){return e?`${e}`:""},parser(e){return e===void 0||e===""?null:e}},date:{formatter:(e,t)=>ui(e,t),parser:(e,t)=>vt.parse(e,t||"yyyy-MM-dd")},datetime:{formatter:(e,t)=>ui(e,t),parser:(e,t)=>vt.parse(e,t||"yyyy-MM-dd")},daterange:{formatter:fu,parser:hu},datetimerange:{formatter:fu,parser:hu},timerange:{formatter:fu,parser:hu},time:{formatter:(e,t)=>ui(e,t),parser:(e,t)=>vt.parse(e,t||"yyyy-MM-dd")},month:{formatter:(e,t)=>ui(e,t),parser:(e,t)=>vt.parse(e,t||"yyyy-MM-dd")},year:{formatter:(e,t)=>ui(e,t),parser:(e,t)=>vt.parse(e,t||"yyyy-MM-dd")},multiple:{formatter(e,t){return e.filter(Boolean).map(n=>ui(n,t)).join(",")},parser(e,t){return(typeof e=="string"?e.split(","):e).map(i=>{if(i instanceof Date)return i;let s=i;return typeof i=="string"?s=i.trim():typeof i!="number"&&!i&&(s=""),vt.parse(s,t||"yyyy-MM-dd")})}},number:{formatter(e){return e?`${e}`:""},parser(e){const t=Number(e);return isNaN(e)?null:t}}},ua=()=>{const e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e},Q9=e=>e.every(t=>!t||typeof t=="string"&&t.trim()===""),vl=e=>e?[e.getHours(),e.getMinutes(),e.getSeconds()]:[0,0,0],_9={date:"yyyy-MM-dd",month:"yyyy-MM",year:"yyyy",datetime:"yyyy-MM-dd HH:mm:ss",time:"HH:mm:ss",timerange:"HH:mm:ss",daterange:"yyyy-MM-dd",datetimerange:"yyyy-MM-dd HH:mm:ss"},Ri=(e,t,n,i)=>{const s=t.includes("range"),{parser:o}=Ua[t]||Ua.default,c=i||_9[t],d=Ua.multiple.parser;let u=e;if(e&&t==="time"&&!(e instanceof Date))u=o(e,c);else if(n&&e)u=d(e,c);else if(s)if(!e)u=[null,null];else if(typeof e=="string")u=o(e,c);else if(t==="timerange")u=o(e,c).map(f=>f||"");else{const[f,m]=e;f instanceof Date&&m instanceof Date?u=e.map(p=>new Date(p)):typeof f=="string"&&typeof m=="string"?u=o(e.join(du),c):(!f||!m)&&(u=[null,null])}else typeof e=="string"&&t.indexOf("time")!==0&&(u=o(e,c)||null);return s||n?u||[]:[u]},Zn=(e,t,n,i)=>{const s=_9[t];if(n){const{formatter:c}=Ua.multiple;return c(e,i||s)}const{formatter:o}=Ua[t]||Ua.default;return o(e,i||s)},W9=Symbol("date-picker"),wl=Symbol("time-picker");function yn(e,t=""){return["bk-picker-panel-icon-btn",`bk-date-picker-${e}-btn`,`bk-date-picker-${e}-btn-arrow${t}`]}const vC=(e,t)=>new Date(e,t+1,0).getDate(),H9=(e,t)=>{const n=new Date(e),i=n.getMonth()+t,s=vC(n.getFullYear(),i);return s<n.getDate()&&n.setDate(s),n.setMonth(i),n},B9=(()=>{const e={yyyy:n=>n.getFullYear(),m:n=>n.getMonth()+1,mm:n=>`0${n.getMonth()+1}`.slice(-2),mmm:(n,i)=>n.toLocaleDateString(i,{month:"long"}).slice(0,3),Mmm:(n,i)=>{const s=n.toLocaleDateString(i,{month:"long"});return(s[0].toUpperCase()+s.slice(1).toLowerCase()).slice(0,3)},mmmm:(n,i)=>n.toLocaleDateString(i,{month:"long"}),Mmmm:(n,i)=>{const s=n.toLocaleDateString(i,{month:"long"});return s[0].toUpperCase()+s.slice(1).toLowerCase()}},t=new RegExp(["yyyy","Mmmm","mmmm","Mmm","mmm","mm","m"].join("|"),"g");return(n,i,s)=>{const o=/(\[[^\]]+\])([^\\[\]]+)(\[[^\]]+\])/,c=i.match(o).slice(1),d=c[1],u=[c[0],c[2]].map(f=>({label:f.replace(/\[[^\]]+\]/,p=>p.slice(1,-1).replace(t,y=>e[y](s,n))),type:f.indexOf("yy")!==-1?"year":"month"}));return{separator:d,labels:u}}})(),da=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()},wC=(e,t,n)=>{if(!t||!n)return!1;const[i,s]=[t,n].sort();return e>=i&&e<=s};function MC(e){return e.toString()[0].toUpperCase()+e.toString().slice(1)}const IC=(e,...t)=>{const n=new Date(e.getTime());return n.setHours(t[0]),n.setMinutes(t[1]),n.setSeconds(t[2]),n},NC={tableDate:{type:Date,required:!0},disabledDate:Function,selectionMode:{type:String,required:!0},modelValue:{type:[Date,String,Number,Array]},rangeState:{type:Object,default:()=>({from:null,to:null,selecting:!1})},focusedDate:{type:Date,required:!0}};var gu=a.defineComponent({name:"DateTable",props:NC,emits:["pick","pick-click","changeRange"],setup(e,{emit:t}){const n=a.computed(()=>new ey.Generator({onlyDays:!0,weekStart:0})),i=a.computed(()=>{const f=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"];return f.splice(0,7-0).concat(f.splice(0,0))}),s=a.computed(()=>e.selectionMode==="range"&&e.rangeState.selecting?[e.rangeState.from]:e.modelValue),o=a.computed(()=>{const f=e.tableDate.getFullYear(),m=e.tableDate.getMonth(),p=da(new Date),y=s.value.filter(Boolean).map(da),[b,v]=s.value.map(da),k=e.rangeState.from&&da(e.rangeState.from),T=e.rangeState.to&&da(e.rangeState.to),L=e.selectionMode==="range",N=typeof e.disabledDate=="function"&&e.disabledDate;return n.value(f,m,C=>{C.date instanceof Date&&C.date.setTime(C.date.getTime()+C.date.getTimezoneOffset()*6e4);const I=C.date&&da(C.date),M=C.date&&m===C.date.getMonth();return Se(Z({},C),{type:I===p?"today":C.type,selected:M&&y.includes(I),disabled:C.date&&N&&N(new Date(I)),range:M&&L&&wC(I,k,T),start:M&&L&&I===b,end:M&&L&&I===v})}).cells.slice(0)});return{headerDays:i,cells:o,getCellCls:f=>["bk-date-picker-cells-cell",{["bk-date-picker-cells-cell-selected"]:f.selected||f.start||f.end,["bk-date-picker-cells-cell-disabled"]:f.disabled,["bk-date-picker-cells-cell-today"]:f.type==="today",["bk-date-picker-cells-cell-prev-month"]:f.type==="prevMonth",["bk-date-picker-cells-cell-next-month"]:f.type==="nextMonth",["bk-date-picker-cells-cell-week-label"]:f.type==="weekLabel",["bk-date-picker-cells-cell-range"]:f.range&&!f.start&&!f.end}],handleClick:f=>{if(f.disabled||f.type==="weekLabel")return;const m=new Date(da(f.date));t("pick",m),t("pick-click")},handleMouseMove:f=>{if(!e.rangeState.selecting||f.disabled)return;const m=f.date;t("changeRange",m)}}},render(){return a.createVNode("div",{class:"bk-date-picker-cells"},[a.createVNode("div",{class:"bk-date-picker-cells-header"},[this.headerDays.map(e=>a.createVNode("span",null,[e]))]),this.cells.map(e=>a.createVNode("span",{class:this.getCellCls(e),onClick:()=>this.handleClick(e),onMouseenter:()=>this.handleMouseMove(e)},[a.createVNode("em",null,[e.desc])]))])}});const Ml={type:{type:String,default:"date",validator(e){return["year","month","date","daterange","datetime","datetimerange","time","timerange"].indexOf(e)<0?(console.error(`type property is not valid: '${e}'`),!1):!0}},extPopoverCls:{type:String,default:""},format:String,readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},open:{type:Boolean,default:null},multiple:{type:Boolean,default:!1},timePickerOptions:{type:Object,default:()=>({})},splitPanels:{type:Boolean,default:!0},startDate:Date,placeholder:{type:String,default:""},placement:{type:String,default:"bottom-start",validator:e=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].indexOf(e)<0?(console.error(`placement property is not valid: '${e}'`),!1):!0},transfer:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!1},shortcuts:{type:Array,default:()=>[]},shortcutClose:{type:Boolean,default:!1},modelValue:{type:[Date,String,Number,Array]},value:{type:[Date,String,Number,Array]},options:{type:Object,default:()=>({})},fontSize:{type:String,default:"normal"},upToNow:{type:Boolean,default:!1},useShortcutText:{type:Boolean,default:!1},shortcutSelectedIndex:{type:Number,default:-1},headerSlotCls:{type:String,default:""},footerSlotCls:{type:String,default:""},allowCrossDay:{type:Boolean,default:!1},behavior:{type:String,default:"normal",validator(e){return["simplicity","normal"].indexOf(e)>-1}},disabledDate:Function,withValidate:{type:Boolean,default:!0}},Il={disabledHours:{type:Array,default:()=>[]},disabledMinutes:{type:Array,default:()=>[]},disabledSeconds:{type:Array,default:()=>[]},hideDisabledOptions:{type:Boolean,default:!1},width:{type:Number,default:261},enterMode:{type:Boolean,default:!0}},LC={type:{type:String,default:"time",validator(e){return["time","timerange"].indexOf(e)<0?(console.error(`type property is not valid: '${e}'`),!1):!0}},allowCrossDay:{type:Boolean,default:!1}},kC={hours:{type:[Number,String],default:NaN},minutes:{type:[Number,String],default:NaN},seconds:{type:[Number,String],default:NaN},showSeconds:{type:Boolean,default:!0},steps:{type:Array,default:()=>[]}},F9=["hours","minutes","seconds"];var mu=a.defineComponent({name:"TimeSpinner",props:Z(Z({},kC),Il),emits:["change","pick-click"],setup(e,{emit:t}){const n=a.reactive({spinerSteps:[1,1,1].map((S,z)=>Math.abs(e.steps[z])||S),compiled:!1,focusedColumn:-1,focusedTime:[0,0,0]}),i=a.computed(()=>{const S=[],z=n.spinerSteps[0],j=n.focusedColumn===0&&n.focusedTime[0],O={text:0,selected:!1,disabled:!1,hide:!1};for(let W=0;W<24;W+=z){const P=JSON.parse(JSON.stringify(O));P.text=W,P.focused=W===j,e.disabledHours.length&&e.disabledHours.indexOf(W)>-1&&(P.disabled=!0,e.hideDisabledOptions&&(P.hide=!0)),e.hours===W&&(P.selected=!0),S.push(P)}return S}),s=a.computed(()=>{const S=[],z=n.spinerSteps[1],j=n.focusedColumn===1&&n.focusedTime[1],O={text:0,selected:!1,disabled:!1,hide:!1};for(let W=0;W<60;W+=z){const P=JSON.parse(JSON.stringify(O));P.text=W,P.focused=W===j,e.disabledMinutes.length&&e.disabledMinutes.indexOf(W)>-1&&(P.disabled=!0,e.hideDisabledOptions&&(P.hide=!0)),e.minutes===W&&(P.selected=!0),S.push(P)}return S}),o=a.computed(()=>{const S=[],z=n.spinerSteps[2],j=n.focusedColumn===2&&n.focusedTime[2],O={text:0,selected:!1,disabled:!1,hide:!1};for(let W=0;W<60;W+=z){const P=JSON.parse(JSON.stringify(O));P.text=W,P.focused=W===j,e.disabledSeconds.length&&e.disabledSeconds.indexOf(W)>-1&&(P.disabled=!0,e.hideDisabledOptions&&(P.hide=!0)),e.seconds===W&&(P.selected=!0),S.push(P)}return S}),c=a.computed(()=>({width:e.showSeconds?"33.33%":"50%"}));a.watch(()=>e.hours,S=>{!n.compiled||k("hours",i.value.findIndex(z=>z.text===S))}),a.watch(()=>e.minutes,S=>{!n.compiled||k("minutes",s.value.findIndex(z=>z.text===S))}),a.watch(()=>e.seconds,S=>{!n.compiled||k("seconds",s.value.findIndex(z=>z.text===S))}),a.watch(()=>n.focusedTime,(S,z)=>{F9.forEach((j,O)=>{if(S[O]===z[O]||typeof S[O]=="undefined")return;const W=this[`${j}List`].findIndex(P=>P.text===S[O]);k(j,W)})}),a.onMounted(()=>{a.nextTick(()=>{n.compiled=!0,f()})});function d(S){let z;return S==="hours"?z=C:S==="minutes"?z=I:z=M,z.value}function u(S){return["bk-time-picker-cells-cell",{["bk-time-picker-cells-cell-selected"]:S.selected,["bk-time-picker-cells-cell-focused"]:S.focused,["bk-time-picker-cells-cell-disabled"]:S.disabled}]}function f(){const S=z=>{d(z).addEventListener("wheel",ot.exports.debounce(()=>{y(z)},32),{passive:!0})};S("hours"),S("minutes"),S("seconds")}function m(S){return d(S).querySelector("li").offsetHeight}function p(S){return d(S).offsetHeight}function y(S){const z=d(S),j=Math.min(Math.round((z.scrollTop-(p(S)*.5-10)/m(S)+3)/m(S)),S==="hours"?23:59);let O;if(S==="hours"?O=i:S==="minutes"?O=s:O=o,O.value.find(P=>P.text===j).disabled)return!1;a.nextTick(()=>{v({[S]:j})})}function b(S,z){if(z.disabled)return;const j={[S]:z.text};v(j)}function v(S){t("change",S),t("pick-click")}function k(S,z){const j=d(S),O=j.scrollTop,W=32*T(S,z);w2(j,O,W,500)}function T(S,z){const j=MC(S),O=e[`disabled${j}`];let W=z;if(O.length&&e.hideDisabledOptions){let P=0;O.forEach(G=>G<=z?P+=1:""),W-=P}return W}function L(){a.nextTick(()=>{F9.forEach(S=>{const z=d(S);let j;S==="hours"?j=i:S==="minutes"?j=s:j=o,z.scrollTop=32*j.value.findIndex(O=>O.text===e[S])})})}function N(S){return S<10?`0${S}`:S}const C=a.ref(null),I=a.ref(null),M=a.ref(null);return Se(Z({},a.toRefs(n)),{hoursList:i,minutesList:s,secondsList:o,styles:c,hoursRef:C,minutesRef:I,secondsRef:M,getCellCls:u,handleClick:b,updateScroll:L,padTime:N})},render(){return a.createVNode("div",{class:["bk-time-picker-cells",this.showSeconds?"bk-time-picker-cells-with-seconds":""]},[a.createVNode("div",{class:"bk-time-picker-cells-title-wrapper"},[a.createVNode("div",{class:["bk-time-picker-cells-title",this.focusedColumn===0?"active":""],style:this.styles},[a.createTextVNode("\u65F6")]),a.createVNode("div",{class:["bk-time-picker-cells-title",this.focusedColumn===1?"active":""],style:this.styles},[a.createTextVNode("\u5206")]),a.withDirectives(a.createVNode("div",{class:["bk-time-picker-cells-title",this.focusedColumn===2?"active":""],style:this.styles},[a.createTextVNode("\u79D2")]),[[a.vShow,this.showSeconds]])]),a.createVNode("div",{class:"bk-time-picker-cells-list",ref:"hoursRef",style:this.styles},[a.createVNode("ul",{class:"bk-time-picker-cells-ul"},[this.hoursList.map(e=>a.withDirectives(a.createVNode("li",{class:this.getCellCls(e),onClick:()=>this.handleClick("hours",e)},[this.padTime(e.text)]),[[a.vShow,!e.hide]]))])]),a.createVNode("div",{class:"bk-time-picker-cells-list",ref:"minutesRef",style:this.styles},[a.createVNode("ul",{class:"bk-time-picker-cells-ul"},[this.minutesList.map(e=>a.withDirectives(a.createVNode("li",{class:this.getCellCls(e),onClick:()=>this.handleClick("minutes",e)},[this.padTime(e.text)]),[[a.vShow,!e.hide]]))])]),a.withDirectives(a.createVNode("div",{class:"bk-time-picker-cells-list",ref:"secondsRef",style:this.styles},[a.createVNode("ul",{class:"bk-time-picker-cells-ul"},[this.secondsList.map(e=>a.withDirectives(a.createVNode("li",{class:this.getCellCls(e),onClick:()=>this.handleClick("seconds",e)},[this.padTime(e.text)]),[[a.vShow,!e.hide]]))])]),[[a.vShow,this.showSeconds]])])}});const TC={disabledDate:{type:Function,default:()=>!1},steps:{type:Array,default:()=>[]},format:{type:String,default:"HH:mm:ss"},value:{type:Array,required:!0},confirm:{type:Boolean,default:!1}};var G9=a.defineComponent({name:"TimePanel",props:Z(Z(Z({},Ml),Il),TC),emits:["pick","pick-click"],setup(e,{emit:t}){const n=a.reactive({date:e.value[0]||ua(),showDate:!1}),i=a.inject(wl),s=a.ref(null),o=a.computed(()=>!(e.format||"").match(/mm$/)),c=a.computed(()=>vt.format(i.panelDate,e.format)),d=a.computed(()=>e.value[0]?["getHours","getMinutes","getSeconds"].map(p=>n.date[p]()):[]),u=a.computed(()=>{const p=["disabledHours","disabledMinutes","disabledSeconds"];if(e.disabledDate===(()=>!e.value[0]))return p.reduce((T,L)=>(T[L]=this[L],T),{});const y=[24,60,60],v=["Hours","Minutes","Seconds"].map(k=>e[`disabled${k}`]).map((k,T)=>{const L=y[T],N=k;for(let C=0;C<L;C+=e.steps[T]||1){const I=d.value.map((S,z)=>z===T?C:S),M=IC(n.date,...I);e.disabledDate(M,!0)&&N.push(C)}return N.filter((C,I,M)=>M.indexOf(C)===I)});return p.reduce((k,T,L)=>(k[T]=v[L],k),{})});a.watch(()=>e.value,p=>{let y=p[0]||ua();y=new Date(y),n.date=y}),a.onMounted(()=>{i&&i.parentName==="DatePanel"&&(n.showDate=!0)});function f(p,y=!0){const b=new Date(n.date);Object.keys(p).forEach(v=>b[`set${Lr(v)}`](p[v])),y&&t("pick",b,!0,"time")}function m(){t("pick-click")}return Se(Z({},a.toRefs(n)),{visibleDate:c,showSeconds:o,timeSlots:d,disabledHMS:u,timeSpinnerRef:s,handlePickClick:m,handleChange:f})},render(){return a.createVNode("div",{class:"bk-picker-panel-body-wrapper",onMousedown:e=>{e.preventDefault()}},[a.createVNode("div",{class:"bk-picker-panel-body",style:{width:`${this.width}px`}},[this.showDate?a.createVNode("div",{class:"bk-time-picker-header"},[this.visibleDate]):"",a.createVNode("div",{class:"bk-picker-panel-content"},[a.createVNode(mu,{ref:"timeSpinnerRef",showSeconds:this.showSeconds,steps:this.steps,hours:this.timeSlots[0],minutes:this.timeSlots[1],seconds:this.timeSlots[2],disabledHours:this.disabledHMS.disabledHours,disabledMinutes:this.disabledHMS.disabledMinutes,disabledSeconds:this.disabledHMS.disabledSeconds,hideDisabledOptions:this.hideDisabledOptions,"onPick-click":this.handlePickClick,onChange:this.handleChange},null)])])])}});const SC={modelValue:{type:[Date,String,Number,Array]},shortcuts:{type:Array,default:()=>[]},multiple:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},shortcutClose:{type:Boolean,default:!1},selectionMode:{type:String,default:"date",validator(e){return["year","month","date","time"].indexOf(e)<0?(console.error(`selectionMode property is not valid: '${e}'`),!1):!0}},startDate:{type:Date},focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1},showTime:{type:Boolean,default:!1},format:{type:String,default:"yyyy-MM-dd"},disabledDate:{type:Function,default:()=>!1},timePickerOptions:{type:Object,default:()=>({})}};var xC=a.defineComponent({name:"DatePanel",props:SC,emits:["pick","pick-success","pick-clear","pick-click","selection-mode-change"],setup(e,{slots:t,emit:n}){const i=B=>B.match(/^time/)?"time-picker":`${B}-table`,s=e.modelValue.slice().sort(),o=a.reactive({currentView:e.selectionMode||"date",pickerTable:i(e.selectionMode),dates:s,panelDate:e.startDate||s[0]||new Date}),{proxy:c}=a.getCurrentInstance();a.provide(wl,{panelDate:o.panelDate,parentName:c.$options.name});const d=a.ref(null),u=a.ref(null),f=a.ref(null);a.watch(()=>o.currentView,B=>{n("selection-mode-change",B),o.currentView==="time"&&a.nextTick(()=>{d.value.timeSpinnerRef.updateScroll()})}),a.watch(()=>e.selectionMode,B=>{o.currentView=B,o.pickerTable=i(B)}),a.watch(()=>e.modelValue,B=>{o.dates=B;const ie=e.multiple?o.dates[o.dates.length-1]:e.startDate||o.dates[0];o.panelDate=ie||new Date});const m=()=>{setTimeout(()=>{o.currentView=e.selectionMode},500)},p=B=>{o.panelDate=B,o.pickerTable==="year-table"?o.pickerTable="month-table":o.pickerTable=i(o.currentView)},y=(B,ie)=>{let le=B;e.selectionMode==="year"?le=new Date(B.getFullYear(),0,1):e.selectionMode==="month"?le=new Date(o.panelDate.getFullYear(),B.getMonth(),1):le=new Date(B),o.dates=[le],n("pick",le,!1,ie||e.selectionMode)},b=()=>{m(),n("pick-success")},v=()=>{m(),n("pick-clear")},k=B=>{B.value&&n("pick",B.value(),!1,void 0,B),B.onClick&&B.onClick(this),e.shortcutClose&&b()},T=()=>{o.currentView=e.selectionMode,o.pickerTable=i(o.currentView)},L=B=>{e.selectionMode==="year"||o.pickerTable==="year-table"?o.panelDate=new Date(o.panelDate.getFullYear()+B*10,0,1):o.panelDate=H9(o.panelDate,B*12)},N=B=>{o.panelDate=H9(o.panelDate,B)},C=B=>{var ie,le;B&&((ie=u==null?void 0:u.value)==null||ie.updateScroll(),(le=f==null?void 0:f.value)==null||le.updateScroll())},I=a.computed(()=>o.pickerTable===`${o.currentView}-table`?y:p),M=a.computed(()=>{const B="zh-CN",ie="[yyyy]-[mm]",le=o.panelDate,{labels:ve,separator:Ie}=B9(B,ie,le),ge=he=>()=>{o.pickerTable=i(he)};return{separator:Ie,labels:ve.map(he=>{const K=he;return K.handler=ge(he.type),K})}}),S=a.computed(()=>M.value.labels[0].type==="year"||o.currentView==="date"),z=a.computed(()=>M.value.labels[1].type==="year"||o.currentView==="date"),j=a.computed(()=>o.currentView==="time"),O=()=>{o.currentView=o.currentView==="time"?"date":"time"},W=a.computed(()=>!!t.shortcuts),P=a.computed(()=>!o.dates[0]);function G(){n("pick-click")}return Se(Z({},a.toRefs(o)),{panelPickerHandlers:I,datePanelLabel:M,showLabelFirst:S,showLabelSecond:z,handleShortcutClick:k,changeYear:L,changeMonth:N,reset:T,isTime:j,hasShortcuts:W,timeDisabled:P,onToggleVisibility:C,handleToggleTime:O,handlePickSuccess:b,handlePickClear:v,handlePick:y,handlePickClick:G,timePickerRef:d})},render(){var e,t,n;return a.createVNode("div",{class:["bk-picker-panel-body-wrapper",this.shortcuts.length||this.hasShortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:i=>{i.preventDefault()}},[this.shortcuts.length?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[this.shortcuts.map(i=>a.createVNode("div",{class:"bk-picker-panel-shortcut",onClick:()=>this.handleShortcutClick(i)},[i.text]))]):"",a.createVNode("div",{class:"bk-picker-panel-body",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[a.createVNode("span",{class:yn("prev","-double"),onClick:()=>this.changeYear(-1)},[a.createVNode(Sr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("prev"),onClick:()=>this.changeMonth(-1)},[a.createVNode(Si,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):"",this.datePanelLabel&&Object.keys(this.datePanelLabel).length>0?a.createVNode("span",null,[a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.datePanelLabel.labels[0].handler},[this.datePanelLabel.labels[0].label]),[[a.vShow,this.showLabelFirst]]),this.currentView==="date"?` ${this.datePanelLabel.separator} `:" ",a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.datePanelLabel.labels[1].handler},[this.datePanelLabel.labels[1].label]),[[a.vShow,this.showLabelSecond]])]):"",a.createVNode("span",{class:yn("next","-double"),onClick:()=>this.changeYear(1)},[a.createVNode(xr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("next"),onClick:()=>this.changeMonth(1)},[a.createVNode(Dn,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):""]),[[a.vShow,this.currentView!=="time"]]),a.createVNode("div",{class:"bk-picker-panel-content"},[this.currentView!=="time"?(()=>{switch(this.pickerTable){case"date-table":return a.createVNode(gu,{tableDate:this.panelDate,disabledDate:this.disabledDate,selectionMode:this.selectionMode,modelValue:this.dates,focusedDate:this.focusedDate,onPick:this.panelPickerHandlers},null);default:return null}})():a.createVNode(G9,{ref:"timePickerRef",value:this.dates,format:this.format,disabledDate:this.disabledDate,onPick:this.handlePick,"onPick-click":this.handlePickClick,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess,"onPick-toggle-time":this.handleToggleTime},null)]),this.confirm?a.createVNode(C9,{clearable:this.clearable,showTime:this.showTime,timeDisabled:this.timeDisabled,isTime:this.isTime,"onPick-toggle-time":this.handleToggleTime,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess},this.$slots):""]),this.hasShortcuts?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[(n=(t=(e=this.$slots).shortcuts)==null?void 0:t.call(e))!=null?n:null]):null])}});const DC={steps:{type:Array,default:()=>[]},format:{type:String,default:"HH:mm:ss"},value:{type:Array,required:!0},allowCrossDay:{type:Boolean,default:!1}};var Z9=a.defineComponent({name:"TimeRangePanel",props:Z(Z(Z({},Ml),Il),DC),emits:["pick","pick-click"],setup(e,{emit:t}){const[n,i]=e.value.slice(),s=a.reactive({showDate:!1,dateStart:n||ua(),dateEnd:i||ua()}),o=a.inject(wl),c=a.computed(()=>!(e.format||"").match(/mm$/)),d=a.computed(()=>vt.format(o.dates[0],e.format)),u=a.computed(()=>vt.format(o.dates[1],e.format));a.watch(()=>e.value,T=>{const[L,N]=T.slice();s.dateStart=L||ua(),s.dateEnd=N||ua()}),a.onMounted(()=>{o&&o.parentName==="DatePanel"&&(s.showDate=!0)});function f(){t("pick-click")}function m(T,L,N,C=!0){let I=new Date(s.dateStart),M=new Date(s.dateEnd);Object.keys(L).forEach(S=>{I[`set${Lr(S)}`](L[S])}),Object.keys(N).forEach(S=>{M[`set${Lr(S)}`](N[S])}),!e.allowCrossDay&&M<I&&(T==="start"&&(M=I),T==="end"&&(I=M)),C&&t("pick",[I,M],!0,"time")}function p(T){m("start",T,{})}function y(T){m("end",{},T)}const b=a.ref(null),v=a.ref(null);function k(){var T,L;(T=b==null?void 0:b.value)==null||T.updateScroll(),(L=v==null?void 0:v.value)==null||L.updateScroll()}return Se(Z({},a.toRefs(s)),{showSeconds:c,leftDatePanelLabel:d,rightDatePanelLabel:u,handleStartChange:p,handleEndChange:y,handlePickClick:f,updateScroll:k,timeSpinnerRef:b,timeSpinnerEndRef:v})},render(){return a.createVNode("div",{class:["bk-picker-panel-body-wrapper","bk-time-picker-with-range",this.showSeconds?"bk-time-picker-with-seconds":""],onMousedown:e=>{e.preventDefault()}},[a.createVNode("div",{class:"bk-picker-panel-body",style:{width:`${this.width*2}px`}},[a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-left",style:{width:`${this.width}px`}},[this.showDate?a.createVNode("div",{class:"bk-time-picker-header"},[this.leftDatePanelLabel]):"",a.createVNode(mu,{ref:"timeSpinnerRef",steps:this.steps,showSeconds:this.showSeconds,hours:this.value[0]&&this.dateStart.getHours(),minutes:this.value[0]&&this.dateStart.getMinutes(),seconds:this.value[0]&&this.dateStart.getSeconds(),disabledHours:this.disabledHours,disabledMinutes:this.disabledMinutes,disabledSeconds:this.disabledSeconds,hideDisabledOptions:this.hideDisabledOptions,onChange:this.handleStartChange,"onPick-click":this.handlePickClick},null)]),a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-right",style:{width:`${this.width}px`}},[this.showDate?a.createVNode("div",{class:"bk-time-picker-header"},[this.rightDatePanelLabel]):"",a.createVNode(mu,{ref:"timeSpinnerEndRef",steps:this.steps,showSeconds:this.showSeconds,hours:this.value[1]&&this.dateEnd.getHours(),minutes:this.value[1]&&this.dateEnd.getMinutes(),seconds:this.value[1]&&this.dateEnd.getSeconds(),disabledHours:this.disabledHours,disabledMinutes:this.disabledMinutes,disabledSeconds:this.disabledSeconds,hideDisabledOptions:this.hideDisabledOptions,onChange:this.handleEndChange,"onPick-click":this.handlePickClick},null)])])])}});const jC={modelValue:{type:[Date,String,Number,Array]},type:{type:String,default:"date",validator(e){return["year","month","date","daterange","datetime","datetimerange","time","timerange"].indexOf(e)<0?(console.error(`type property is not valid: '${e}'`),!1):!0}},shortcuts:{type:Array,default:()=>[]},shortcutClose:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},splitPanels:{type:Boolean,default:!0},showTime:{type:Boolean,default:!1},selectionMode:{type:String,default:"date",validator(e){return["year","month","date","time"].indexOf(e)<0?(console.error(`selectionMode property is not valid: '${e}'`),!1):!0}},startDate:{type:Date},upToNow:{type:Boolean,default:!1},disabledDate:Function,focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1},format:{type:String,default:"yyyy-MM-dd"},timePickerOptions:{type:Object,default:()=>({})}};var zC=a.defineComponent({name:"DateRangePanel",props:jC,emits:["pick","pick-success","pick-clear","pick-click"],setup(e,{slots:t,emit:n}){const[i,s]=e.modelValue.map(H=>H||ua()),o=e.startDate?e.startDate:i,c=a.reactive({currentView:e.selectionMode||"date",leftPickerTable:`${e.selectionMode}-table`,rightPickerTable:`${e.selectionMode}-table`,leftPanelDate:o,rightPanelDate:new Date(o.getFullYear(),o.getMonth()+1,1),rangeState:{from:e.modelValue[0],to:e.modelValue[1],selecting:i&&!s},upToNowEnable:!1,dates:e.modelValue}),{proxy:d}=a.getCurrentInstance();a.provide(wl,{dates:c.dates,parentName:d.$options.name});const u=(H,Q)=>!H||!Q?0:H.getTime()-Q.getTime(),f=()=>{c.currentView=e.selectionMode,c.leftPickerTable=`${c.currentView}-table`,c.rightPickerTable=`${c.currentView}-table`},m=a.ref(null),p=a.ref(null),y=H=>{var Q,ae;H&&((Q=m==null?void 0:m.value)==null||Q.updateScroll(),(ae=p==null?void 0:p.value)==null||ae.updateScroll())},b=(H,Q,ae,D=!0)=>{const _=new Date(c[`${H}PanelDate`]);if(_[`set${Q}`](_[`get${Q}`]()+ae),c[`${H}PanelDate`]=_,!!D)if(e.splitPanels){const R=H==="left"?"right":"left";H==="left"&&c.leftPanelDate>=c.rightPanelDate&&b(R,Q,1),H==="right"&&c.rightPanelDate<=c.leftPanelDate&&b(R,Q,-1)}else{const R=H==="left"?"right":"left",de=c[`${R}PanelDate`],ue=new Date(de);if(Q==="Month"){const me=new Date(ue.getFullYear(),ue.getMonth()+ae+1,0).getDate();ue.setDate(Math.min(me,ue.getDate()))}ue[`set${Q}`](ue[`get${Q}`]()+ae),c[`${R}PanelDate`]=ue}},v=H=>{const Q=c.currentView==="year"?-10:-1;b(H,"FullYear",Q)},k=H=>{const Q=c.currentView==="year"?10:1;b(H,"FullYear",Q)},T=H=>{b(H,"Month",-1)},L=H=>{b(H,"Month",1)},N=H=>{c[`${H}PickerTable`]="year-table"},C=H=>{c[`${H}PickerTable`]="month-table"},I=H=>{const Q="zh-CN",ae="[yyyy]-[mm]",D=c[`${H}PanelDate`],{labels:_,separator:R}=B9(Q,ae,D),de=ue=>{const me=ue==="month"?C:N;return()=>me(H)};return{separator:R,labels:_.map(ue=>{const me=ue;return me.handler=de(ue.type),me})}},M=(H,Q)=>{n("pick",c.dates,H,Q||e.type)},S=(H,Q)=>{if(c.rangeState.selecting||c.currentView==="time"){if(c.currentView==="time")c.dates=H;else{const[ae,D]=[c.rangeState.from,H].sort(u),_=Q==="upToNow"?new Date:new Date(new Date(new Date(D.setHours(23)).setMinutes(59)).setSeconds(59));c.dates=[ae,_],c.rangeState={from:ae,to:_,selecting:!1}}M(!1,Q||"date")}else c.upToNowEnable=new Date(H).getTime()<new Date().getTime(),c.rangeState={from:H,to:null,selecting:!0}},z=(H,Q)=>{if(c[`${H}PanelDate`]=Q,c[`${H}PickerTable`]==="year-table"?c[`${H}PickerTable`]="month-table":c[`${H}PickerTable`]=`${c.currentView}-table`,!e.splitPanels){const D=H==="left"?"right":"left";c[`${D}PanelDate`]=Q,b(D,"Month",D==="left"?-1:1,!1)}},j=(H,Q)=>{if(!(H!=null&&H.value))return!1;H.onClick&&H.onClick(H,Q);const ae=typeof H.value=="function"?H.value():H.value,[D,_]=ae;c.rangeState.from=D,c.rangeState.to=_,c.dates=[D,_],n("pick",ae,!1,"shortcut",H),e.shortcutClose&&n("pick-success")},O=H=>{c.rangeState.to=H};function W(H){c.leftPanelDate=H;const Q=new Date(H.getFullYear(),H.getMonth()+1,1),ae=c.dates[1]?c.dates[1].getTime():c.dates[1];c.rightPanelDate=e.splitPanels?new Date(Math.max(ae,Q.getTime())):Q}a.watch(()=>e.selectionMode,H=>{c.currentView=H||"range"}),a.watch(()=>e.modelValue,H=>{const Q=H[0]?an(H[0]):null,ae=H[1]?an(H[1]):null;c.dates=[Q,ae].sort(u),c.rangeState={from:c.dates[0],to:c.dates[1],selecting:!1},W(e.startDate||c.dates[0]||new Date)}),a.watch(()=>c.currentView,H=>{const Q=c.leftPanelDate.getMonth(),ae=c.rightPanelDate.getMonth(),D=c.leftPanelDate.getFullYear()===c.rightPanelDate.getFullYear();H==="date"&&D&&Q===ae&&b("right","Month",1),H==="month"&&D&&b("right","FullYear",1),H==="year"&&D&&b("right","FullYear",10),c.currentView==="time"&&a.nextTick(()=>{X.value.updateScroll()})});const P=a.computed(()=>c.currentView==="time"),G=a.computed(()=>I("left")),B=a.computed(()=>I("right")),ie=a.computed(()=>c.leftPickerTable.split("-").shift()),le=a.computed(()=>c.rightPickerTable.split("-").shift()),ve=a.computed(()=>G.value.labels[0].type==="year"||c.currentView==="date"),Ie=a.computed(()=>G.value.labels[1].type==="year"||c.currentView==="date"),ge=a.computed(()=>B.value.labels[0].type==="year"||c.currentView==="date"),he=a.computed(()=>B.value.labels[1].type==="year"||c.currentView==="date"),K=a.computed(()=>{const H=`${c.currentView}-table`;return{left:c.leftPickerTable!==H,right:c.rightPickerTable!==H}}),$=a.computed(()=>({left:K.value.left?z.bind("left"):S,right:K.value.right?z.bind("right"):S})),V=a.computed(()=>{var H;return t.shortcuts||((H=e.shortcuts)==null?void 0:H.length)}),J=()=>{c.currentView=c.currentView==="time"?"date":"time"},re=()=>{setTimeout(()=>{c.currentView=e.selectionMode},500)},U=()=>{re(),n("pick-success")},q=()=>{re(),n("pick-clear")};function ce(){n("pick-click")}const we=a.computed(()=>!(c.dates[0]&&c.dates[1])),X=a.ref(null);return Se(Z({},a.toRefs(c)),{isTime:P,hasShortcuts:V,prevYear:v,nextYear:k,prevMonth:T,nextMonth:L,leftDatePanelLabel:G,rightDatePanelLabel:B,leftDatePanelView:ie,rightDatePanelView:le,leftShowLabelFirst:ve,leftShowLabelSecond:Ie,rightShowLabelFirst:ge,rightShowLabelSecond:he,preSelecting:K,panelPickerHandlers:$,timeDisabled:we,handleShortcutClick:j,reset:f,onToggleVisibility:y,handleRangePick:S,handleChangeRange:O,handleToggleTime:J,handlePickSuccess:U,handlePickClear:q,handlePickClick:ce,timePickerRef:X})},render(){let e=null;if(this.hasShortcuts){let t="";this.$slots.shortcuts?t=typeof this.$slots.shortcuts=="function"?this.$slots.shortcuts():this.$slots.shortcuts:this.shortcuts.length&&(t=a.createVNode("div",{class:"bk-picker-panel-shortcuts"},[this.shortcuts.map((n,i)=>a.createVNode("div",{key:i,class:"shortcuts-item",onClick:()=>this.handleShortcutClick(n,i)},[n.text]))])),e=a.createVNode("div",{class:"bk-picker-panel-sidebar"},[t])}return a.createVNode("div",{class:["bk-picker-panel-body-wrapper","bk-date-picker-with-range",this.shortcuts.length||this.$slots.shortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:t=>{t.preventDefault()}},[a.createVNode("div",{class:["bk-picker-panel-body",this.showTime?"bk-picker-panel-body-time":"bk-picker-panel-body-date"]},[a.withDirectives(a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-left",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[a.createVNode("span",{class:yn("prev","-double"),onClick:()=>this.prevYear("left")},[a.createVNode(Sr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("prev"),onClick:()=>this.prevMonth("left")},[a.createVNode(Si,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):"",this.leftDatePanelLabel&&Object.keys(this.leftDatePanelLabel).length>0?a.createVNode("span",null,[a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.leftDatePanelLabel.labels[0].handler},[this.leftDatePanelLabel.labels[0].label]),[[a.vShow,this.leftShowLabelFirst]]),this.leftDatePanelView==="date"?` ${this.leftDatePanelLabel.separator} `:" ",a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.leftDatePanelLabel.labels[1].handler},[this.leftDatePanelLabel.labels[1].label]),[[a.vShow,this.leftShowLabelSecond]])]):"",this.splitPanels||this.leftPickerTable!=="date-table"?a.createVNode("span",{class:yn("next","-double"),onClick:()=>this.nextYear("left")},[a.createVNode(xr,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels||this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("next"),onClick:()=>this.nextMonth("left")},[a.createVNode(Dn,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):""]),[[a.vShow,this.currentView!=="time"]]),this.currentView!=="time"?(()=>{switch(this.leftPickerTable){case"date-table":return a.createVNode(gu,{selectionMode:"range",tableDate:this.leftPanelDate,disabledDate:this.disabledDate,rangeState:this.rangeState,modelValue:this.preSelecting.left?[this.dates[0]]:this.dates,focusedDate:this.focusedDate,onChangeRange:this.handleChangeRange,onPick:this.panelPickerHandlers.left},null);default:return null}})():""]),[[a.vShow,!this.isTime]]),a.withDirectives(a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-right",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[this.splitPanels||this.rightPickerTable!=="date-table"?a.createVNode("span",{class:yn("prev","-double"),onClick:()=>this.prevYear("right")},[a.createVNode(Sr,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels&&this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("prev","-double"),onClick:()=>this.prevMonth("right")},[a.createVNode(Si,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):"",this.rightDatePanelLabel&&Object.keys(this.rightDatePanelLabel).length>0?a.createVNode("span",null,[a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.rightDatePanelLabel.labels[0].handler},[this.rightDatePanelLabel.labels[0].label]),[[a.vShow,this.rightShowLabelFirst]]),this.rightDatePanelView==="date"?` ${this.rightDatePanelLabel.separator} `:" ",a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.rightDatePanelLabel.labels[1].handler},[this.rightDatePanelLabel.labels[1].label]),[[a.vShow,this.rightShowLabelSecond]])]):"",this.upToNow?(()=>(this.rangeState.selecting||this.currentView==="time")&&this.upToNowEnable?a.createVNode("span",{class:"up-to-now",onClick:()=>this.handleRangePick(new Date,"upToNow")},[a.createTextVNode("\u81F3\u4ECA")]):a.createVNode("span",{class:"up-to-now disabled"},[a.createTextVNode("\u81F3\u4ECA")]))():"",a.createVNode("span",{class:yn("next","-double"),onClick:()=>this.nextYear("right")},[a.createVNode(xr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("next"),onClick:()=>this.nextMonth("right")},[a.createVNode(Dn,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):""]),[[a.vShow,this.currentView!=="time"]]),this.currentView!=="time"?(()=>{switch(this.rightPickerTable){case"date-table":return a.createVNode(gu,{selectionMode:"range",tableDate:this.rightPanelDate,disabledDate:this.disabledDate,rangeState:this.rangeState,modelValue:this.preSelecting.right?[this.dates[this.dates.length-1]]:this.dates,focusedDate:this.focusedDate,onChangeRange:this.handleChangeRange,onPick:this.panelPickerHandlers.right},null);default:return null}})():""]),[[a.vShow,!this.isTime]]),this.isTime?a.createVNode(Z9,{ref:"timePickerRef",value:this.dates,format:this.format,disabledDate:this.disabledDate,onPick:this.handleRangePick,"onPick-click":this.handlePickClick,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess,"onPick-toggle-time":this.handleToggleTime},null):"",this.confirm?a.createVNode(C9,{clearable:this.clearable,showTime:this.showTime,timeDisabled:this.timeDisabled,isTime:this.isTime,"onPick-toggle-time":this.handleToggleTime,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess},this.$slots):""]),e])}}),OC=a.defineComponent({name:"DatePicker",directives:{clickoutside:jn},props:Ml,emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=xn(),s=e.type.includes("range"),o=s?[null,null]:[null],c=s?e.value||e.modelValue:[e.value||e.modelValue];let d=Q9(c)?o:Ri(e.value||e.modelValue,e.type,e.multiple,e.format),u=null;e.shortcutSelectedIndex!==-1&&(u=e.shortcuts[e.shortcutSelectedIndex]||null,u&&(d=u.value()));const f=a.reactive({showClose:!1,visible:!1,internalValue:d,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:d[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:d.map(vl),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:u,onSelectionModeChange:m});function m(H){let Q=H;return H.match(/^date/)&&(Q="date"),f.selectionMode=["year","month","date","time"].indexOf(Q)>-1&&Q,f.selectionMode}const p=a.computed(()=>{if(e.multiple)return f.internalValue.slice();const H=e.type.includes("range");let Q=f.internalValue.map(ae=>ae instanceof Date?new Date(ae):ae||"");return e.type.match(/^time/)&&(Q=Q.map(ae=>Zn(ae,e.type,e.multiple,e.format))),H||e.multiple?Q:Q[0]}),y=a.computed(()=>e.type.match(/^time/)?p.value:e.multiple?Zn(p.value,e.type,e.multiple,e.format):Array.isArray(p.value)?p.value.map(H=>Zn(H,e.type,e.multiple,e.format)):Zn(p.value,e.type,e.multiple,e.format)),b=a.computed(()=>e.type==="daterange"||e.type==="datetimerange"?"DateRangePanel":"DatePanel"),v=a.computed(()=>e.open===null?f.visible:e.open),k=a.computed(()=>Zn(f.internalValue,e.type,e.multiple,e.format)),T=a.computed(()=>{var H;return((H=f.shortcut)==null?void 0:H.text)&&e.useShortcutText?f.shortcut.text:k.value}),L=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),N=a.computed(()=>!!t.header),C=a.computed(()=>!!t.footer),I=a.computed(()=>!!t.shortcuts),M=a.computed(()=>!!t.confirm),S=a.computed(()=>{let H="";return e.fontSize==="medium"?H="medium-font":e.fontSize==="large"&&(H="large-font"),H}),z=a.computed(()=>{let H="";return e.fontSize==="medium"?H="medium-width":e.fontSize==="large"&&(H="large-width"),H}),j=a.computed(()=>{var H;return((H=f.shortcut)==null?void 0:H.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),O=a.computed(()=>e.options),W=a.computed(()=>b.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),P=a.ref(null),G=()=>{var H;(H=P==null?void 0:P.value)==null||H.focus()};a.watch(()=>f.visible,H=>{var Q,ae;H===!1&&((Q=B.value)==null||Q.destoryDropdown()),(ae=B.value)==null||ae.updateDropdown(),n("open-change",H)});const B=a.ref(null);a.watch(()=>e.modelValue,H=>{var Q;f.internalValue=Ri(H,e.type,e.multiple,e.format),e.withValidate&&((Q=i==null?void 0:i.validate)==null||Q.call(i,"change"))}),a.watch(()=>e.open,H=>{f.visible=H===!0}),a.watch(()=>e.type,H=>{m(H)}),a.watch(()=>p,(H,Q)=>{const ae=JSON.stringify(H),D=JSON.stringify(Q);(ae!==D||typeof H!=typeof Q)&&n("input",H)}),a.onMounted(()=>{e.type.indexOf("date")>-1,f.timeEnterMode=!0;const H=e.modelValue,Q=p.value;(typeof H!=typeof Q||JSON.stringify(H)!==JSON.stringify(Q))&&n("input",p.value),e.open!==null&&(f.visible=e.open),a.provide(W9,{props:e,focus:()=>G()})});const ie=a.ref(null),le=H=>{var Q;if(f.disableCloseUnderTransfer)return f.disableCloseUnderTransfer=!1,!1;if(H&&H.type==="mousedown"&&f.visible){H.preventDefault(),H.stopPropagation();return}if(f.visible){const ae=(Q=ie==null?void 0:ie.value)==null?void 0:Q.$el;if(H&&ae&&ae.contains(H.target))return;f.visible=!1,H==null||H.preventDefault(),H==null||H.stopPropagation();return}f.isFocused=!1,f.disableClickOutSide=!1},ve=()=>{var H,Q;(H=P==null?void 0:P.value)==null||H.focus(),(Q=P==null?void 0:P.value)==null||Q.click()},Ie=()=>{e.readonly||e.disabled||k!=null&&k.value&&(f.showClose=!0)},ge=H=>{f.showClose=!1},he=H=>{a.nextTick(()=>{var Q;n("update:modelValue",p.value),n("change",y.value,H),e.type.indexOf("time")<0&&((Q=P==null?void 0:P.value)==null||Q.blur())})},K=H=>{var me;const Q=e.type.includes("range")||e.multiple,ae=k.value,D=H.target.value,_=Ri(D,e.type,e.multiple,e.format),R=Q?_:_[0],de=(me=e.disabledDate)==null?void 0:me.call(e,R),ue=_.reduce((te,se)=>te&&se instanceof Date,!0);D!==ae&&!de&&ue?(he(e.type),f.internalValue=_):f.forceInputRerender=f.forceInputRerender+1},$=H=>{e.readonly||(f.isFocused=!0,!(H&&H.type==="focus")&&(e.disabled||(f.visible=!0)))},V=()=>{var H;(H=ie==null?void 0:ie.value)==null||H.reset()},J=H=>{var Q,ae;if(f.internalFocus){f.internalFocus=!1;return}if(f.visible){H.preventDefault();return}f.isFocused=!1,m(e.type),f.internalValue=f.internalValue.slice(),V(),(Q=ie==null?void 0:ie.value)==null||Q.onToggleVisibility(!1),(ae=i==null?void 0:i.validate)==null||ae.call(i,"blur")},re=H=>{const{keyCode:Q}=H;if(Q===9&&f.visible)if(H.stopPropagation(),H.preventDefault(),L.value){const D=".bk-picker-confirm > *",_=B.value.$el.querySelectorAll(D);f.internalFocus=!0,[..._][H.shiftKey?"pop":"shift"]().focus()}else le();const ae=[37,38,39,40];if(!f.visible&&ae.includes(Q)){f.visible=!0;return}Q===27&&f.visible&&(H.stopPropagation(),le()),!!ae.includes(Q)&&f.focusedTime.active&&H.preventDefault()},U=()=>{f.visible=!1,f.internalValue=f.internalValue.map(()=>null),n("clear"),he(e.type),V(),f.showClose=!1,f.shortcut=null,setTimeout(()=>m(e.type),500)},q=()=>{var H;f.visible=!1,a.nextTick(()=>{n("pick-success")}),(H=P==null?void 0:P.value)==null||H.blur(),V()},ce=(H,Q=!1,ae,D)=>{let _=H;if(e.multiple){const de=_.getTime(),ue=f.internalValue.findIndex(se=>se&&se.getTime()===de),te=[...f.internalValue,_].filter(Boolean).map(se=>se.getTime()).filter((se,be,ke)=>ke.indexOf(se)===be&&be!==ue);f.internalValue=te.map(se=>new Date(se))}else _=Ri(H,e.type,e.multiple,e.format),f.internalValue=Array.isArray(_)?_:[_];if(f.internalValue[0]){const[de]=f.internalValue;f.focusedDate=de}f.focusedTime=Se(Z({},f.focusedTime),{time:f.internalValue.map(vl)}),L.value||(m(e.type),f.visible=Q),ae==="upToNow"&&e.type==="daterange"&&q(),f.shortcut=D,he(ae);const R=e.shortcuts.findIndex(de=>de===f.shortcut);n("shortcut-change",f.shortcut,R)},we=a.ref(null),X=()=>{var H,Q;(Q=(H=ie.value).handleToggleTime)==null||Q.call(H)};return Se(Z({},a.toRefs(f)),{panel:b,publicStringValue:y,opened:v,visualValue:k,displayValue:T,isConfirm:L,hasHeader:N,hasFooter:C,hasShortcuts:I,hasConfirm:M,fontSizeCls:S,longWidthCls:z,localReadonly:j,allowCrossDayProp:W,ownPickerProps:O,pickerDropdownRef:B,inputRef:P,triggerRef:we,pickerPanelRef:ie,handleClose:le,handleIconClick:ve,handleInputMouseenter:Ie,handleInputMouseleave:ge,handleFocus:$,handleBlur:J,handleKeydown:re,handleInputChange:K,handleClear:U,onPick:ce,onPickSuccess:q,handleToggleTime:X})},render(){var s,o,c;const e=a.createVNode("div",null,[a.createVNode("span",{class:["icon-wrapper",this.disabled?"disabled":""],onClick:this.handleIconClick},[this.type==="time"||this.type==="timerange"?a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"time"},[a.createVNode("path",{fill:"#c4c6cc",d:"M512,128c51.9,0,102.2,10.1,149.5,30.2c45.7,19.3,86.8,47,122.1,82.3s63,76.4,82.3,122.1c20,47.3,30.2,97.6,30.2,149.5S886,614.3,865.9,661.6c-19.3,45.7-47,86.8-82.3,122.1s-76.4,63-122.1,82.3c-47.3,20-97.6,30.2-149.5,30.2S409.8,886.1,362.5,866c-45.7-19.3-86.8-47-122.1-82.3s-63-76.4-82.3-122.1c-20-47.3-30.2-97.6-30.2-149.5s10.1-102.2,30.2-149.5c19.3-45.7,47-86.8,82.3-122.1s76.4-63,122.1-82.3C409.8,138.1,460.1,128,512,128 M512,64C264.6,64,64,264.6,64,512s200.6,448,448,448s448-200.6,448-448S759.4,64,512,64L512,64z"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"512,512 512,256 448,256 448,512 448,576 512,576 768,576 768,512"},null)])]):a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"date"},[a.createVNode("path",{fill:"#c4c6cc",d:"M896,128h-96v64h64v112H160V192h64v-64h-96c-17.7,0-32,14.3-32,32v736c0,17.7,14.3,32,32,32h768c17.7,0,32-14.3,32-32V160C928,142.3,913.7,128,896,128z M160,864V368h704v496H160z"},null),a.createVNode("rect",{x:"416",y:"128",fill:"#c4c6cc",width:"192",height:"64"},null),a.createVNode("rect",{x:"288",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("rect",{x:"672",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"403.7,514.4 557.1,514.4 557.1,515.3 420.1,765.5 483.5,765.5 620.3,504.3 620.3,466.5 403.7,466.5"},null)])])]),a.createVNode("input",{type:"text",class:["bk-date-picker-editor",this.readonly?"readonly":"",this.fontSizeCls,this.behavior==="simplicity"?"only-bottom-border":""],ref:"inputRef",key:this.forceInputRerender,readonly:this.localReadonly,disabled:this.disabled,placeholder:this.placeholder,value:this.displayValue,onFocus:this.handleFocus,onClick:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onChange:this.handleInputChange},null),this.clearable&&this.showClose?a.createVNode(Zt,{onClick:this.handleClear,class:"clear-action"},null):""]),t=this.hasShortcuts?{shortcuts:()=>{var d,u;return((u=(d=this.$slots).shortcuts)==null?void 0:u.call(d,{change:this.onPick}))||null}}:{},n=this.hasConfirm?{confirm:this.$slots.confirm}:{},i=Z(Z({},t),n);return a.withDirectives(a.createVNode("div",{class:["bk-date-picker",this.type==="datetimerange"?"long":"",this.longWidthCls]},[a.createVNode("div",{ref:"triggerRef",class:"bk-date-picker-rel",onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave},[(c=(o=(s=this.$slots).trigger)==null?void 0:o.call(s))!=null?c:e]),a.createVNode(a.Teleport,{to:"body",disabled:!this.appendToBody},{default:()=>[a.createVNode(a.Transition,{name:"bk-fade-down-transition"},{default:()=>[a.withDirectives(a.createVNode(cu,{class:[this.appendToBody?"bk-date-picker-transfer":""],ref:"pickerDropdownRef",triggerRef:this.triggerRef,placement:this.placement,extPopoverCls:this.extPopoverCls,appendToBody:this.appendToBody},{default:()=>{var d,u,f,m,p,y;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(f=(u=(d=this.$slots).header)==null?void 0:u.call(d))!=null?f:null]):null,this.panel==="DateRangePanel"?a.createVNode(zC,{ref:"pickerPanelRef",type:this.type,showTime:this.type==="datetime"||this.type==="datetimerange",confirm:this.isConfirm,shortcuts:this.shortcuts,shortcutClose:this.shortcutClose,modelValue:this.internalValue,selectionMode:this.selectionMode,startDate:this.startDate,disabledDate:this.disabledDate,focusedDate:this.focusedDate,timePickerOptions:this.timePickerOptions,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,"onSelection-mode-change":this.onSelectionModeChange},i):a.createVNode(xC,{ref:"pickerPanelRef",clearable:this.clearable,showTime:this.type==="datetime"||this.type==="datetimerange",confirm:this.isConfirm,shortcuts:this.shortcuts,multiple:this.multiple,shortcutClose:this.shortcutClose,selectionMode:this.selectionMode,modelValue:this.internalValue,startDate:this.startDate,disabledDate:this.disabledDate,focusedDate:this.focusedDate,timePickerOptions:this.timePickerOptions,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,"onSelection-mode-change":this.onSelectionModeChange},i),this.hasFooter?a.createVNode("div",{class:["bk-date-picker-footer-wrapper",this.footerSlotCls]},[(y=(p=(m=this.$slots).footer)==null?void 0:p.call(m))!=null?y:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}}),AC=a.defineComponent({name:"TimePicker",directives:{clickoutside:jn},props:Z(Z(Z({},Ml),LC),Il),emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=xn(),s=e.type.includes("range"),o=s?[null,null]:[null];let c=Q9((s?e.modelValue:[e.modelValue])||[])?o:Ri(e.modelValue,e.type,e.multiple,e.format),d=null;e.shortcutSelectedIndex!==-1&&(d=e.shortcuts[e.shortcutSelectedIndex]||null,d&&(c=d.value()));const u=a.reactive({showClose:!1,visible:!1,internalValue:c,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:c[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:c.map(vl),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:d,onSelectionModeChange:f});function f(X){let H=X;return X.match(/^date/)&&(H="date"),u.selectionMode=["year","month","date","time"].indexOf(H)>-1&&H,u.selectionMode}const m=a.computed(()=>{if(e.multiple)return u.internalValue.slice();const X=e.type.includes("range");let H=u.internalValue.map(Q=>Q instanceof Date?new Date(Q):Q||"");return e.type.match(/^time/)&&(H=H.map(Q=>Zn(Q,e.type,e.multiple,e.format))),X||e.multiple?H:H[0]}),p=a.computed(()=>e.type.match(/^time/)?m.value:e.multiple?Zn(m.value,e.type,e.multiple,e.format):Array.isArray(m.value)?m.value.map(X=>Zn(X,e.type,e.multiple,e.format)):Zn(m.value,e.type,e.multiple,e.format)),y=a.computed(()=>e.type==="timerange"?"RangeTimePickerPanel":"TimePickerPanel"),b=a.computed(()=>e.open===null?u.visible:e.open),v=a.computed(()=>Zn(u.internalValue,e.type,e.multiple,e.format)),k=a.computed(()=>{var X;return((X=u.shortcut)==null?void 0:X.text)&&e.useShortcutText?u.shortcut.text:v.value}),T=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),L=a.computed(()=>!!t.header),N=a.computed(()=>!!t.footer),C=a.computed(()=>!!t.shortcuts),I=a.computed(()=>{let X="";return e.fontSize==="medium"?X="medium-font":e.fontSize==="large"&&(X="large-font"),X}),M=a.computed(()=>{let X="";return e.fontSize==="medium"?X="medium-width":e.fontSize==="large"&&(X="large-width"),X}),S=a.computed(()=>{var X;return((X=u.shortcut)==null?void 0:X.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),z=a.computed(()=>({disabledHours:e.disabledHours,disabledMinutes:e.disabledMinutes,disabledSeconds:e.disabledSeconds,hideDisabledOptions:e.hideDisabledOptions})),j=a.computed(()=>y.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),O=a.ref(null),W=()=>{var X;(X=O==null?void 0:O.value)==null||X.focus()},{proxy:P}=a.getCurrentInstance();a.watch(()=>u.visible,X=>{X&&a.nextTick(()=>{var H,Q;(Q=(H=P.pickerPanelRef)==null?void 0:H.timeSpinnerRef)==null||Q.updateScroll()})});const G=a.ref(null);a.watch(()=>e.modelValue,X=>{var H;u.internalValue=Ri(X,e.type,e.multiple,e.format),e.withValidate&&((H=i==null?void 0:i.validate)==null||H.call(i,"change"))}),a.watch(()=>e.open,X=>{u.visible=X===!0}),a.watch(()=>e.type,X=>{f(X)}),a.watch(()=>m,(X,H)=>{const Q=JSON.stringify(X),ae=JSON.stringify(H);(Q!==ae||typeof X!=typeof H)&&n("input",X)}),a.onMounted(()=>{e.type.indexOf("date")>-1,u.timeEnterMode=!0;const X=e.modelValue,H=m.value;(typeof X!=typeof H||JSON.stringify(X)!==JSON.stringify(H))&&n("input",m.value),e.open!==null&&(u.visible=e.open),a.provide(W9,{props:e,focus:()=>W()})});const B=a.ref(null),ie=X=>{var H;if(u.disableCloseUnderTransfer)return u.disableCloseUnderTransfer=!1,!1;if(X&&X.type==="mousedown"&&u.visible){X.preventDefault(),X.stopPropagation();return}if(u.visible){const Q=(H=B==null?void 0:B.value)==null?void 0:H.$el;if(X&&Q&&Q.contains(X.target))return;u.visible=!1,X==null||X.preventDefault(),X==null||X.stopPropagation();return}u.isFocused=!1,u.disableClickOutSide=!1},le=()=>{var X,H;(X=O==null?void 0:O.value)==null||X.focus(),(H=O==null?void 0:O.value)==null||H.click()},ve=()=>{e.readonly||e.disabled||v!=null&&v.value&&(u.showClose=!0)},Ie=X=>{u.showClose=!1},ge=X=>{a.nextTick(()=>{var H;n("update:modelValue",m.value),n("change",p.value,X),e.type.indexOf("time")<0&&((H=O==null?void 0:O.value)==null||H.blur())})},he=X=>{var ue;const H=e.type.includes("range")||e.multiple,Q=v.value,ae=X.target.value,D=Ri(ae,e.type,e.multiple,e.format),_=H?D:D[0],R=(ue=e.disabledDate)==null?void 0:ue.call(e,_),de=D.reduce((me,te)=>me&&te instanceof Date,!0);ae!==Q&&!R&&de?(ge(e.type),u.internalValue=D):u.forceInputRerender=u.forceInputRerender+1},K=X=>{e.readonly||(u.isFocused=!0,!(X&&X.type==="focus")&&(e.disabled||(u.visible=!0)))},$=()=>{var X,H;(H=(X=B==null?void 0:B.value)==null?void 0:X.reset)==null||H.call(X)},V=X=>{var H,Q;if(u.internalFocus){u.internalFocus=!1;return}if(u.visible){X.preventDefault();return}u.isFocused=!1,f(e.type),u.internalValue=u.internalValue.slice(),$(),(H=B==null?void 0:B.value)==null||H.onToggleVisibility(!1),(Q=i==null?void 0:i.validate)==null||Q.call(i,"blur")},J=X=>{const{keyCode:H}=X;if(H===9&&u.visible)if(X.stopPropagation(),X.preventDefault(),T.value){const ae=".bk-picker-confirm > *",D=G.value.$el.querySelectorAll(ae);u.internalFocus=!0,[...D][X.shiftKey?"pop":"shift"]().focus()}else ie();const Q=[37,38,39,40];if(!u.visible&&Q.includes(H)){u.visible=!0;return}H===27&&u.visible&&(X.stopPropagation(),ie()),!!Q.includes(H)&&u.focusedTime.active&&X.preventDefault()},re=()=>{u.visible=!1,u.internalValue=u.internalValue.map(()=>null),n("clear"),ge(e.type),$(),u.showClose=!1,u.shortcut=null,setTimeout(()=>f(e.type),500)},U=()=>{e.appendToBody&&(u.disableCloseUnderTransfer=!0)},q=()=>{var X;u.visible=!1,a.nextTick(()=>{n("pick-success")}),(X=O==null?void 0:O.value)==null||X.blur(),$()},ce=(X,H=!1,Q,ae)=>{let D=X;if(e.multiple){const R=D.getTime(),de=u.internalValue.findIndex(te=>te&&te.getTime()===R),me=[...u.internalValue,D].filter(Boolean).map(te=>te.getTime()).filter((te,se,be)=>be.indexOf(te)===se&&se!==de);u.internalValue=me.map(te=>new Date(te))}else D=Ri(X,e.type,e.multiple,e.format),u.internalValue=Array.isArray(D)?D:[D];if(u.internalValue[0]){const[R]=u.internalValue;u.focusedDate=R}u.focusedTime=Se(Z({},u.focusedTime),{time:u.internalValue.map(vl)}),T.value||(f(e.type),u.visible=H),Q==="upToNow"&&e.type==="daterange"&&q(),u.shortcut=ae,ge(Q);const _=e.shortcuts.findIndex(R=>R===u.shortcut);n("shortcut-change",u.shortcut,_)},we=a.ref(null);return Se(Z({},a.toRefs(u)),{panel:y,publicStringValue:p,opened:b,visualValue:v,displayValue:k,isConfirm:T,hasHeader:L,hasFooter:N,hasShortcuts:C,fontSizeCls:I,longWidthCls:M,localReadonly:S,allowCrossDayProp:j,ownPickerProps:z,pickerDropdownRef:G,inputRef:O,triggerRef:we,pickerPanelRef:B,handleClose:ie,handleIconClick:le,handleInputMouseenter:ve,handleInputMouseleave:Ie,handleFocus:K,handleBlur:V,handleKeydown:J,handleInputChange:he,handleClear:re,handleTransferClick:U,onPick:ce,onPickSuccess:q})},render(){var n,i,s;const e=a.createVNode("div",null,[a.createVNode("span",{class:["icon-wrapper",this.disabled?"disabled":""],onClick:this.handleIconClick},[this.type==="time"||this.type==="timerange"?a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"time"},[a.createVNode("path",{fill:"#c4c6cc",d:"M512,128c51.9,0,102.2,10.1,149.5,30.2c45.7,19.3,86.8,47,122.1,82.3s63,76.4,82.3,122.1c20,47.3,30.2,97.6,30.2,149.5S886,614.3,865.9,661.6c-19.3,45.7-47,86.8-82.3,122.1s-76.4,63-122.1,82.3c-47.3,20-97.6,30.2-149.5,30.2S409.8,886.1,362.5,866c-45.7-19.3-86.8-47-122.1-82.3s-63-76.4-82.3-122.1c-20-47.3-30.2-97.6-30.2-149.5s10.1-102.2,30.2-149.5c19.3-45.7,47-86.8,82.3-122.1s76.4-63,122.1-82.3C409.8,138.1,460.1,128,512,128 M512,64C264.6,64,64,264.6,64,512s200.6,448,448,448s448-200.6,448-448S759.4,64,512,64L512,64z"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"512,512 512,256 448,256 448,512 448,576 512,576 768,576 768,512"},null)])]):a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"date"},[a.createVNode("path",{fill:"#c4c6cc",d:"M896,128h-96v64h64v112H160V192h64v-64h-96c-17.7,0-32,14.3-32,32v736c0,17.7,14.3,32,32,32h768c17.7,0,32-14.3,32-32V160C928,142.3,913.7,128,896,128z M160,864V368h704v496H160z"},null),a.createVNode("rect",{x:"416",y:"128",fill:"#c4c6cc",width:"192",height:"64"},null),a.createVNode("rect",{x:"288",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("rect",{x:"672",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"403.7,514.4 557.1,514.4 557.1,515.3 420.1,765.5 483.5,765.5 620.3,504.3 620.3,466.5 403.7,466.5"},null)])])]),a.createVNode("input",{type:"text",class:["bk-date-picker-editor",this.readonly?"readonly":"",this.fontSizeCls,this.behavior==="simplicity"?"only-bottom-border":""],ref:"inputRef",key:this.forceInputRerender,readonly:this.localReadonly,disabled:this.disabled,placeholder:this.placeholder,value:this.displayValue,onFocus:this.handleFocus,onClick:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onChange:this.handleInputChange},null),this.clearable&&this.showClose?a.createVNode(Zt,{onClick:this.handleClear,class:"clear-action"},null):""]),t=this.hasShortcuts?{shortcuts:()=>{var o,c;return((c=(o=this.$slots).shortcuts)==null?void 0:c.call(o))||null}}:{};return a.withDirectives(a.createVNode("div",{class:["bk-date-picker",this.type==="datetimerange"?"long":"",this.longWidthCls]},[a.createVNode("div",{ref:"triggerRef",class:"bk-date-picker-rel",onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave},[(s=(i=(n=this.$slots).trigger)==null?void 0:i.call(n))!=null?s:e]),a.createVNode(a.Teleport,{to:"body",disabled:!this.appendToBody},{default:()=>[a.createVNode(a.Transition,{name:"bk-fade-down-transition"},{default:()=>[a.withDirectives(a.createVNode(cu,{class:[this.appendToBody?"bk-date-picker-transfer":""],ref:"pickerDropdownRef",triggerRef:this.triggerRef,placement:this.placement,extPopoverCls:this.extPopoverCls,appendToBody:this.appendToBody,onClick:this.handleTransferClick},{default:()=>{var o,c,d,u,f,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(d=(c=(o=this.$slots).header)==null?void 0:c.call(o))!=null?d:null]):null,this.panel==="RangeTimePickerPanel"?a.createVNode(Z9,{ref:"pickerPanelRef",clearable:this.clearable,shortcuts:this.shortcuts,multiple:this.multiple,shortcutClose:this.shortcutClose,value:this.internalValue,startDate:this.startDate,disabledDate:this.disabledDate,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,disabledHours:this.ownPickerProps.disabledHours,disabledMinutes:this.ownPickerProps.disabledMinutes,disabledSeconds:this.ownPickerProps.disabledSeconds},t):a.createVNode(G9,{ref:"pickerPanelRef",clearable:this.clearable,confirm:this.isConfirm,shortcuts:this.shortcuts,multiple:this.multiple,shortcutClose:this.shortcutClose,value:this.internalValue,startDate:this.startDate,disabledDate:this.disabledDate,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,disabledHours:this.ownPickerProps.disabledHours,disabledMinutes:this.ownPickerProps.disabledMinutes,disabledSeconds:this.ownPickerProps.disabledSeconds},t),this.hasFooter?a.createVNode("div",{class:["bk-date-picker-footer-wrapper",this.footerSlotCls]},[(m=(f=(u=this.$slots).footer)==null?void 0:f.call(u))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}});const Y9=Ge(OC);var Yn=(e=>(e.OBJECT_ARRAY="objectArray",e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e))(Yn||{});const PC={title:g.arrayOf(g.string).def([]),extCls:g.string.def(""),searchPlaceholder:g.string.def(""),settingKey:g.string.def("id"),displayKey:g.string.def("value"),sortKey:g.string.def("value"),showOverflowTips:g.bool.def(!1),searchable:g.bool.def(!1),sortable:g.bool.def(!1),sourceList:g.arrayOf(g.any).def([]),targetList:g.arrayOf(g.any).def([]),emptyContent:g.arrayOf(g.string).def([])};function EC(e,t,n){const i=a.ref([]),s=a.ref([]),o=(c=!1)=>{c&&(i.value=[],s.value=[]),e.value.forEach(d=>{const u=d[n.value];t.value.includes(u)?s.value.push(d):i.value.push(d)})};return o(),a.watch(()=>[e,t,n],()=>{o(!0)},{deep:!0}),{selectList:i,selectedList:s}}function VC(e,t){const n=a.ref(""),i=a.computed(()=>e.value.filter(s=>{const o=s[t.value];return o instanceof Object?!1:o.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:i}}var JC=a.defineComponent({name:"Transfer",props:PC,emits:["change","update:targetList"],setup(e,{emit:t}){const n=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(I=>I.toString().includes("[object Object]"))?Yn.OBJECT_ARRAY:Yn.BASE_ARRAY:Yn.NOT_ARRAY),i=a.computed(()=>n.value===Yn.BASE_ARRAY?"value":e.settingKey),s=a.computed(()=>n.value===Yn.BASE_ARRAY?"value":e.displayKey),o=a.computed(()=>e.sortKey||s.value),c=a.computed(()=>{switch(n.value){case Yn.BASE_ARRAY:return[...new Set(e.sourceList)].map(C=>({value:C}));case Yn.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:d}=a.toRefs(e),{selectList:u,selectedList:f}=EC(c,d,i),{selectSearchQuery:m,selectListSearch:p}=VC(u,s),y=a.computed(()=>[...p.value].sort((C,I)=>{const M=C[o.value],S=I[o.value];return M>S?1:-1})),b=a.computed(()=>[...f.value].sort((C,I)=>{const M=C[o.value],S=I[o.value];return M>S?1:-1}));a.watch(()=>[u,f],()=>{N()},{deep:!0});const v=(C,I)=>{const M=i.value;return C.some(S=>S[M]===I[M])&&I.disabled},k=()=>{u.value=[...c.value.filter(C=>v(u.value,C))],f.value=[...c.value.filter(C=>!v(u.value,C))],N()},T=()=>{u.value=[...c.value.filter(C=>!v(f.value,C))],f.value=[...c.value.filter(C=>v(f.value,C))],N()},L=(C,I)=>{if(C.disabled)return;const M=C[i.value],S=I?u:f,z=I?f:u,j=S.value.findIndex(O=>O[i.value]===M);z.value.push(...S.value.splice(j,1)),N()},N=()=>{const C=u.value.map(M=>M[i.value]),I=f.value.map(M=>M[i.value]);t("update:targetList",I),t("change",n.value===Yn.BASE_ARRAY?C:u.value.map(M=>a.toRaw(M)),n.value===Yn.BASE_ARRAY?I:f.value.map(M=>a.toRaw(M)),I)};return{selectSearchQuery:m,selectListSearch:p,selectedList:f,selectListSort:y,selectedListSort:b,settingCode:i,displayCode:s,allToRight:k,allToLeft:T,handleItemClick:L}},render(){const e=this.sortable?this.selectListSort:this.selectListSearch,t=this.sortable?this.selectedListSort:this.selectedList,n=c=>{var p,y;const d=c==="left-header",u=d?`${(p=this.title[0])!=null?p:"\u6E90\u5217\u8868"}`:`${(y=this.title[1])!=null?y:"\u76EE\u6807\u5217\u8868"}`,f=d?!e.length:!t.length,m=()=>{f||(d?this.allToRight():this.allToLeft())};return this.$slots[c]?a.createVNode("div",{class:"slot-header"},[this.$slots[c]()]):a.createVNode("div",{class:"header"},[`${u}\uFF08${d?e.length:t.length}\uFF09`,a.createVNode("span",{class:{disabled:f},onClick:()=>m()},[d?"\u9009\u62E9\u5168\u90E8":"\u6E05\u7A7A"])])},i=c=>{var f;const d=c==="left-empty-content",u=(f=d?this.emptyContent[0]:this.emptyContent[1])!=null?f:d?"\u65E0\u6570\u636E":"\u672A\u9009\u62E9\u4EFB\u4F55\u9879";return this.$slots[c]?a.createVNode("div",null,[this.$slots[c]()]):a.createVNode("div",{class:"empty"},[u])},s=(c,d=!0)=>a.createVNode("div",{class:["item-content",{"is-disabled":c.disabled}]},[a.createVNode("span",{class:"content-text",title:c[this.displayCode]},[c[this.displayCode]]),a.createVNode("span",{class:"icon-wrapper"},[d?a.createVNode(qo,{class:"bk-icon icon-move"},null):a.createVNode(Hn,{class:"bk-icon icon-delete"},null)])]),o=c=>{const d=c==="left",u=d?e:t,f=d?"source-option":"target-option",m=d?"left-empty-content":"right-empty-content";return u.length?a.createVNode("ul",{class:["content",this.searchable&&d?"is-search":""]},[u.map(p=>{var y,b,v;return a.createVNode("li",{key:p[this.settingCode],class:[this.$slots[f]?"custom-item":""],onClick:()=>this.handleItemClick(p,d)},[(v=(b=(y=this.$slots)[f])==null?void 0:b.call(y,p))!=null?v:s(p,d)])})]):i(m)};return a.createVNode("div",{class:["bk-transfer",this.extCls]},[a.createVNode("div",{class:"source-list"},[n("left-header"),this.searchable&&a.createVNode(ia,{modelValue:this.selectSearchQuery,"onUpdate:modelValue":c=>this.selectSearchQuery=c,class:"transfer-search-input",clearable:!0,placeholder:this.searchPlaceholder||"\u641C\u7D22"},{prefix:()=>a.createVNode(Wa,{class:"icon-search"},null)}),o("left")]),a.createVNode(hc,{class:"transfer"},null),a.createVNode("div",{class:"target-list"},[n("right-header"),o("right")])])}});const U9=Ge(JC);var di=(e=>(e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_EXPAND="nodeExpand",e.NODE_CHECKED="nodeChecked",e.NODE_DRAG_START="nodeDragStart",e.NODE_DRAG_OVER="nodeDragOver",e.NODE_DRAG_LEAVE="nodeDragLeave",e.NODE_DROP="nodeDrop",e))(di||{});const Qi=(...e)=>!0,RC={nodeClick:Qi,nodeCollapse:Qi,nodeExpand:Qi,nodeChecked:Qi,nodeDragStart:Qi,nodeDragOver:Qi,nodeDragLeave:Qi,nodeDrop:Qi};var fe=(e=>(e.DEPTH="__depth",e.INDEX="__index",e.UUID="__uuid",e.PARENT_ID="__parent_id",e.HAS_CHILD="__has_child",e.PATH="__path",e.IS_ROOT="__is_root",e.ORDER="__order",e.IS_OPEN="__is_open",e.IS_CHECKED="__is_checked",e.IS_SELECTED="__is_selected",e.IS_ASYNC_INIT="__is_async_init",e.IS_MATCH="__is_match",e.IS_NULL="__IS_NULL",e.IS_CACHED="__is_cached",e.IS_ASYNC="__is_async",e.IS_LOADING="__is_loading",e.TREE_NODE_ATTR="__attr__",e))(fe||{});const _i={__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 $9=(e=>(e.CLICK="click",e.SELECTED="selected",e.EXPAND="expand",e.COLLAPSE="collapse",e))($9||{});const QC={data:g.arrayOf(g.any).def([]),label:g.oneOfType([g.func.def(void 0),g.string.def("label")]),nodeKey:g.string.def(void 0),children:g.string.def("children"),indent:g.number.def(18),lineHeight:g.number.def(32),levelLine:g.oneOfType([g.bool.def(!1),g.func.def(void 0),g.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:g.bool.def(!1),prefixIcon:g.oneOfType([g.func.def(()=>{}),g.bool.def(!1)]).def(!0),async:g.shape({callback:g.func.def(void 0),cache:g.bool.def(!0),deepAutoOpen:Pe("columnType",{}).def("once")}),offsetLeft:g.number.def(5),search:g.oneOfType([g.shape({value:g.oneOfType([g.number,g.string,g.bool]).def(""),match:g.oneOfType([Pe("TreeSearchMatchType",{}).def("fuzzy"),g.func]),resultType:Pe("treeSearchResultType",{}).def("tree"),openResultNode:g.bool}),g.string,g.number,g.bool]).def(void 0),emptyText:g.string.def("\u6CA1\u6709\u6570\u636E"),draggable:g.bool.def(!1),disableDrag:g.func.def(null),disableDrop:g.func.def(null),dragSort:g.bool.def(!1),selectable:g.oneOfType([g.bool,g.func]).def(!0),disabledFolderSelectable:g.bool.def(!1),showCheckbox:g.bool.def(!1),showNodeTypeIcon:g.bool.def(!0),selected:g.oneOfType([g.string,null,g.number,g.object]).def(null),autoCheckChildren:g.bool.def(!0),autoOpenParentNode:g.bool.def(!0),expandAll:g.bool.def(!1),nodeContentAction:g.oneOfType([g.arrayOf(Pe("nodeContentActionType",{}).def($9.CLICK)),g.func.def(()=>["selected"])]).def(["selected","expand","click"])};var _C=(e,{slots:t})=>({renderEmpty:n=>a.createVNode($s,{scene:"part",type:n},{default:()=>{var i,s;return[(s=(i=t.default)==null?void 0:i.call(t))!=null?s:e.emptyText]}})}),Nl=(e,t)=>{const n=P=>e.schema.get(P),i=(P,G)=>{var B;return(B=n(P[fe.UUID]))==null?void 0:B[G]},s=(P,G,B)=>{e.schema.set(P[fe.UUID],Se(Z({},n(P[fe.UUID])),{[G]:B}))},o=P=>i(P,fe.PATH),c=P=>i(P,fe.UUID),d=P=>i(P,fe.IS_ROOT),u=P=>i(P,fe.IS_OPEN),f=P=>i(P,fe.HAS_CHILD),m=P=>i(P,fe.IS_MATCH),p=P=>i(P,fe.IS_CHECKED),y=P=>i(P,fe.PARENT_ID),b=P=>i({[fe.UUID]:P},fe.PARENT_ID),v=P=>i(P,fe.IS_LOADING),k=(P,G)=>{s(P,fe.IS_LOADING,G)},T=P=>e.schema.delete(P),L=P=>n(y(P)),N=P=>{var G;return typeof P=="object"?u(P):typeof P=="string"?(G=n(P))==null?void 0:G[fe.IS_OPEN]:!1},C=P=>N(i(P,fe.PARENT_ID)),I=P=>d(P)||C(P),M=P=>P.split("-").reduce((B,ie)=>{const le=Number(ie);return Array.isArray(B)?B[le]:B[t.children][le]},t.data),S=P=>{const G=e.schema;return Array.prototype.filter.call(Array.from(G.keys()),B=>G.get(B)[fe.PARENT_ID]===P[fe.UUID])},z=P=>M(o({[fe.UUID]:P})),j=P=>d({[fe.UUID]:P})?{[t.children]:t.data}:z(b(P)),O=P=>({[_i[fe.IS_LOADING]]:i(P,fe.IS_LOADING),[_i[fe.HAS_CHILD]]:f(P),[_i[fe.IS_MATCH]]:m(P),[_i[fe.IS_CHECKED]]:p(P),[_i[fe.IS_OPEN]]:u(P),[_i[fe.IS_ROOT]]:d(P),fullPath:i(P,fe.PATH),uuid:c(P),parentId:i(P,fe.PARENT_ID)});return{getSchemaVal:n,getNodeAttr:i,getNodeId:c,getNodeParentId:y,getNodeParentIdById:b,getParentNodeData:j,getParentNode:L,setNodeAttr:s,getNodePath:o,isRootNode:d,isNodeOpened:u,hasChildNode:f,isItemOpen:N,isNodeChecked:p,isNodeMatched:m,isNodeLoading:v,checkNodeIsOpen:I,getSourceNodeByPath:M,getSourceNodeByUID:z,deleteNodeSchema:T,resolveScopedSlotParam:O,setTreeNodeLoading:k,extendNodeAttr:P=>Se(Z({},P),{[fe.TREE_NODE_ATTR]:O(P)}),getChildNodes:S}};const K9="1px dashed #c3cdd7",X9=(e,t,n=null,i=null,s=null,o=[])=>{const c=e[t];return typeof c=="boolean"?c?i:s:q9(n,e,t,o)},q9=(e,t,n,i=[])=>{const s=t[n];if(typeof s=="string")return typeof e=="object"&&e!==null?(Object.prototype.hasOwnProperty.call(e,s)||console.error(`cannot find node label with key ${s}`),e[s]):s;if(typeof s=="function"){const o=s.apply(globalThis,[e,...i]);if(typeof o=="string")return o;console.error("props label with function return value is not string, please check and return string");return}},e3=(e,t)=>q9(e,t,"label"),pu=(e,t)=>e.get(t)||{},WC=(e,t,n)=>{var i;return(i=pu(e,t))==null?void 0:i[n]},HC=(e,t)=>({"--level-line":X9(t,"levelLine",e,K9,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),BC=(e,t,n={})=>{const{schema:i}=n,s=WC(i,e[fe.UUID],fe.DEPTH);return Z({"--depth":s},typeof t.levelLine=="function"?{"--level-line":X9(t,"levelLine",e,K9,null,["node"])}:{})},FC=(e,t,n)=>{const{__is_root:i,__is_open:s}=pu(t,e[fe.UUID])||{};return{"is-root":i,"bk-tree-node":!0,"is-open":s,"is-virtual-render":n.virtualRender,"level-line":n.levelLine}},GC=(e,t)=>{const{__is_checked:n,__is_selected:i}=pu(t,e[fe.UUID])||{};return{"is-checked":n,"is-selected":i,"node-folder":e.is_folder,"node-leaf":e.is_leaf,[je("node-row")]:!0}},ZC=(e,t,n,i,s)=>{YC(e,t,n,{[i]:s})},YC=(e,t,n,i)=>{const o=e.split("-").reduce((c,d)=>{const u=Number(d);return Array.isArray(c)?c[u]:c[n][u]},t);Object.assign(o,i||{})},Zr=e=>e==null?{__IS_NULL:!0}:typeof e=="string"||typeof e=="number"||typeof e=="symbol"?{[fe.UUID]:e}:(Object.prototype.hasOwnProperty.call(e,fe.UUID)||console.error("setNodeAction Error: node id cannot found"),e);var t3=(e,t)=>{const{setNodeAttr:n,getNodePath:i,getNodeAttr:s,resolveScopedSlotParam:o,setTreeNodeLoading:c}=Nl(t,e),d=(m,p)=>{if(typeof m=="object"&&m!==null){n(p,fe.IS_OPEN,!0);const y=Array.isArray(m)?m:[m];return ZC(i(p),e.data,e.children,e.children,y),Promise.resolve(m)}return Promise.resolve(m)},u=m=>{const{callback:p=null,cache:y=!0}=e.async||{};if(typeof p=="function"&&s(m,fe.IS_ASYNC)){if(n(m,fe.IS_ASYNC_INIT,!0),!s(m,fe.IS_CACHED)){n(m,fe.IS_CACHED,y);const b=o(m),v=p(m,k=>d(k,m),b);if(typeof v=="object"&&v!==null)return c(m,!0),v instanceof Promise?Promise.resolve(v.then(k=>d(k,m)).catch(k=>console.error("load remote data error:",k)).finally(()=>{c(m,!1),n(m,fe.IS_CACHED,!0)})):(d(v,m),c(m,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},f=()=>{const m=t.data.filter(p=>s(p,fe.IS_ASYNC)&&p[_i[fe.IS_OPEN]]&&!s(p,fe.IS_ASYNC_INIT));m.length&&Promise.all(m.map(p=>u(p))).then(()=>{f()}).catch(p=>{console.warn(p)})};return{asyncNodeClick:u,deepAutoOpen:f}},UC=(e,t,n,i,s,o)=>{let c=e.selected;const{setNodeAttr:d,getNodePath:u,getSchemaVal:f,getNodeAttr:m,getNodeId:p,getChildNodes:y,isRootNode:b,hasChildNode:v,isItemOpen:k,isNodeOpened:T,isNodeLoading:L,isNodeChecked:N,getParentNode:C,resolveScopedSlotParam:I,extendNodeAttr:M}=Nl(n,e),{registerNextLoop:S}=o,{asyncNodeClick:z,deepAutoOpen:j}=t3(e,n),O=Q=>k(Q)?a.createVNode(rc,{class:[je("tree-icon"),je("node-prefix")]},null):a.createVNode(sc,{class:[je("tree-icon"),je("node-prefix")]},null),W=Q=>{if(typeof Q=="string")return Q;if(typeof Q=="object"&&Q!==null){if(Q.__v_isVNode)return Q;const{node:ae,className:D,text:_,style:R}=Q;return a.h(ae,{class:D,style:R},_)}return null},P=Q=>{var ae,D,_;return((_=(D=(ae=t.slots).nodeLoading)==null?void 0:D.call(ae,M(Q)))!=null?_:L(Q))?a.createVNode(jr,null,null):""},G=Q=>{if(t.slots.nodeAction)return t.slots.nodeAction(M(Q));let ae=null;return L(Q)?P(Q):typeof e.prefixIcon=="function"&&(ae=e.prefixIcon(M(Q),"node_action"),ae!=="default")?W(ae):(ae==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon)&&(v(Q)||Q.async||!e.autoCheckChildren)?k(Q)?a.createVNode(_s,{class:je("node-prefix")},null):a.createVNode(Zs,{class:je("node-prefix")},null):null},B=Q=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(M(Q));let ae=null;return typeof e.prefixIcon=="function"&&(ae=e.prefixIcon(M(Q),"node_type"),ae!=="default")?W(ae):ae==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?b(Q)||v(Q)?O(Q):a.createVNode(fc,{class:[je("tree-icon"),je("node-prefix")]},null):null},ie=(Q,ae)=>{const D=C(Q);D&&(d(D,fe.IS_CHECKED,ae),b(D)||ie(D,ae))},le=(Q,ae,D)=>{y(Q).forEach(_=>{d({[fe.UUID]:_},ae,D),le({[fe.UUID]:_},ae,D)})},ve=(Q,ae)=>{d(Q,fe.IS_CHECKED,!!ae),le(Q,fe.IS_CHECKED,!!ae),ie(Q,ae),t.emit(di.NODE_CHECKED,s.value.filter(D=>N(D)).map(D=>D[fe.UUID]))},Ie=Q=>N(Q)&&!s.value.filter(ae=>{var D;return(D=u(ae))==null?void 0:D.startsWith(u(Q))}).every(ae=>N(ae)),ge=Q=>N(Q)||s.value.filter(ae=>{var D;return(D=u(ae))==null?void 0:D.startsWith(u(Q))}).some(ae=>N(ae)),he=Q=>e.showCheckbox?a.createVNode(ji,{size:"small",modelValue:ge(Q),indeterminate:Ie(Q),onChange:ae=>ve(Q,ae)},null):null,K=(Q,ae=null,D=null,_=!0)=>{const R=ae===null?!k(Q):!!ae;if(R||le(Q,fe.IS_OPEN,R),d(Q,fe.IS_OPEN,R),_){const de=k(Q)?di.NODE_EXPAND:di.NODE_COLLAPSE;t.emit(de,Q,I(Q),f(Q[fe.UUID]),D)}},$=(Q,ae,D)=>{if(Array.isArray(Q)){Q.forEach(_=>d(Zr(_),ae,D));return}d(Zr(Q),ae,D)},V=(Q,ae=!0,D=!1)=>{const _=Zr(Q);if(!_[fe.IS_NULL])if(D)if(ae){if($(_,fe.IS_OPEN,!0),!b(_)){const R=m(_,fe.PARENT_ID);V(R,!0,!0)}}else K(_,!1,null,!1);else $(_,fe.IS_OPEN,ae)},J=(Q,ae)=>{if(T(Q)){K(Q,!1,ae);return}z(Q).finally(()=>{m(Q,fe.IS_LOADING)?S("setNodeOpenedAfterLoading",{type:"once",fn:()=>K(Q,!0,ae)}):K(Q,!0,ae)})},re=(Q,ae)=>{Q.stopImmediatePropagation(),Q.stopPropagation(),Q.preventDefault(),J(ae,Q)},U=(Q,ae=!0,D=!0)=>{const _=Array.isArray(Q)?Q:[Q];if(!_.length)return;const R=Zr(_[0]);if(!R[fe.IS_NULL]){if(!e.selectable||typeof e.selectable=="function"&&!e.selectable(Q)||e.disabledFolderSelectable&&(Q==null?void 0:Q.is_folder)===!0){console.warn("props.selectable is false or undefined, please set selectable with true");return}c!=null&&d({[fe.UUID]:c},fe.IS_SELECTED,!ae),e.selected&&e.selected!==c&&d({[fe.UUID]:e.selected},fe.IS_SELECTED,!ae),d(R,fe.IS_SELECTED,ae),c=p(R),D&&_.length===1&&V(R,!0,!0),m(R,fe.IS_ASYNC)&&z(R).then(()=>{a.nextTick(()=>{_.shift(),U(_,ae,D)})})}},q=Q=>typeof e.nodeContentAction=="function"?Reflect.apply(e.nodeContentAction,globalThis,[{node:Q}]):typeof e.nodeContentAction=="string"?[e.nodeContentAction]:Array.isArray(e.nodeContentAction)?e.nodeContentAction:["selected","expand","click"],ce=(Q,ae)=>{const D=q(Q);if(D.includes("selected")&&U(Q,!0,!1),D.includes("expand")&&(T(Q)||J(Q,ae)),D.includes("collapse")&&T(Q)&&J(Q,ae),D.includes("click")){const _=di.NODE_CLICK;t.emit(_,Q,I(Q),f(Q[fe.UUID]),ae)}},we=(Q,ae)=>{if(b(ae))return!1;const D=u(ae),_=`${D}`.split("-").slice(0,Q+1);if(_.join("-")===D)return!0;const de=_.pop(),ue=parseInt(de,10);_.push(`${ue+1}`);const me=_.join("-");return s.value.some(te=>te[fe.PATH]===me)},X=Q=>{if(!e.levelLine)return null;const ae=_=>({"--depth":_}),D=m(Q,fe.DEPTH)+1;return new Array(D).fill("").map((_,R)=>R).filter(_=>we(_,Q)).filter(_=>_>0).map(_=>a.createVNode("span",{class:"node-virtual-line",style:ae(D-_)},null))};return{renderTreeNode:Q=>{var ae,D,_,R,de;return a.createVNode("div",{"data-tree-node":p(Q),key:p(Q),class:GC(Q,n.schema)},[a.createVNode("div",{class:FC(Q,n.schema,e),style:BC(Q,e,n),onClick:ue=>ce(Q,ue)},[a.createVNode("div",{class:[je("node-action")],onClick:ue=>re(ue,Q)},[G(Q)]),a.createVNode("div",{class:je("node-content")},[[he(Q),B(Q)],a.createVNode("span",{class:je("node-text")},[(_=(D=(ae=t.slots).node)==null?void 0:D.call(ae,M(Q)))!=null?_:[e3(Q,e)]]),(de=(R=t.slots).nodeAppend)==null?void 0:de.call(R,M(Q))]),X(Q)])])},handleTreeNodeClick:J,deepAutoOpen:j,asyncNodeClick:z,setNodeAction:$,setNodeOpened:K,setSelect:U,setOpen:V}},$C=(e,t,n,i)=>{const{getSourceNodeByUID:s,getNodeParentIdById:o,getParentNodeData:c,getNodeAttr:d,getNodePath:u,isRootNode:f}=Nl(i,e),m=a.computed(()=>typeof e.disableDrag=="function"),p=a.computed(()=>typeof e.disableDrop=="function"),y=z=>z.target.closest("[data-tree-node]"),b=z=>{var O;const j=(O=z==null?void 0:z.dataset)==null?void 0:O.treeNode;return s(j)},v=z=>{y(z).removeEventListener("mouseup",v)},k=z=>{const j=y(z),O=b(j);if(O.draggable===!1||m.value&&e.disableDrag(O)){j.classList.add("bk-tree-drag-disabled");return}j.setAttribute("draggable","true"),j.addEventListener("mouseup",v)},T=z=>{z.preventDefault();const j=y(z),O=b(j);if(t.emit(di.NODE_DRAG_OVER,z,j,O),p.value&&(e==null?void 0:e.disableDrop(O))){z.dataTransfer.effectAllowed="move",z.dataTransfer.dropEffect="none",j.classList.add("bk-tree-drop-disabled");return}j.classList.add("bk-tree-drop-active");const W=z.dataTransfer.getData("node-id"),P=j.getAttribute("data-tree-node"),G=C(W,P)?"move":"none";z.dataTransfer.effectAllowed=G,z.dataTransfer.dropEffect=G},L=z=>{z.dataTransfer.effectAllowed="move",z.dataTransfer.dropEffect="move";const j=y(z);z.dataTransfer.setData("text/plain",""),z.dataTransfer.setData("node-id",j.getAttribute("data-tree-node")),t.emit(di.NODE_DRAG_START,z,j)},N=z=>{z.preventDefault(),z.stopPropagation();const j=y(z);j.classList.remove("bk-tree-drop-active","bk-tree-drop-disabled");const O=b(j);if(p.value&&e.disableDrop(O))return;const W=z.dataTransfer.getData("node-id"),P=j.getAttribute("data-tree-node");Reflect.apply(e.dragSort?I:M,globalThis,[W,P]),t.emit(di.NODE_DROP,z,j,O)},C=(z,j)=>{const O=u({[fe.UUID]:z}),W=u({[fe.UUID]:j}),P=o(z),G=o(j);return P===G?!0:O.indexOf(W)===-1&&W.indexOf(O)===-1},I=(z,j)=>{if(!C(z,j))return;const O=JSON.parse(JSON.stringify(s(z))),W=JSON.parse(JSON.stringify(s(j))),P=c(z),G=c(j),B=d({[fe.UUID]:z},fe.INDEX),ie=d({[fe.UUID]:j},fe.INDEX);P==null||P[e.children].splice(B,1,W),G==null||G[e.children].splice(ie,1,O)},M=(z,j)=>{const O=s(z),W=s(j);let P=null;if(f({[fe.UUID]:z}))P=e.data;else{const G=o(z);if(G!=null){P=s(G);const B=d({[fe.UUID]:z},fe.INDEX);P==null||P[e.children].splice(B,1)}}W[e.children]||(W[e.children]=[]),W[e.children].unshift(O)},S=z=>{z.preventDefault();const j=y(z);j.classList.remove("bk-tree-drop-active","bk-tree-drop-disabled"),t.emit(di.NODE_DRAG_LEAVE,z,j)};a.onMounted(()=>{if(e.draggable&&n.value){const z=n.value.$el;z.addEventListener("mousedown",k),z.addEventListener("dragstart",L),z.addEventListener("dragover",T),z.addEventListener("dragleave",S),z.addEventListener("drop",N)}}),a.onUnmounted(()=>{if(e.draggable&&n.value){const z=n.value.$el;z.removeEventListener("mousedown",k),z.removeEventListener("dragstart",L),z.removeEventListener("dragover",T),z.removeEventListener("dragleave",S),z.removeEventListener("drop",N)}})},KC=e=>{var y;const t=a.toRef(e,"search"),{openResultNode:n=!1,resultType:i="tree"}=(y=e.search)!=null?y:{},s=b=>["string","number","boolean"].includes(typeof b),o=(b,v)=>b===v,c=(b,v)=>new RegExp(`${b}`,"i").test(`${v}`),d=(b,v)=>Reflect.apply(b,globalThis,v),u=t.value===void 0||t.value===!1,f=(b,v)=>{if(u)return!0;if(s(t.value))return d(c,[t.value,b,v]);const{value:k="",match:T="fuzzy"}=t.value,N=typeof T=="function"?T:T==="fuzzy"?c:o;return`${k}`.length===0?!0:d(N,[k,b,v])},m=a.computed(()=>t.value!==!1&&(s(t.value)?`${t.value}`.length>0:typeof t.value=="object"));return{searchFn:f,refSearch:t,isSearchActive:m,isSearchDisabled:u,openResultNode:n,resultType:i,isTreeUI:i==="tree"}},XC=e=>{var T;const t=(L,N=void 0,C=[])=>{const{data:I,children:M}=L,S=[],z=[];let j=0;const O=new Map;function W(ge,he,K,$){if(ge!=null&&O.has(ge)&&![fe.UUID,fe.PARENT_ID].includes(he)){const V=O.get(ge);Object.prototype.hasOwnProperty.call(V,he)&&typeof $=="function"&&Reflect.apply($,self,[V,he,K])&&(Object.assign(V,{[he]:K}),W(V[fe.PARENT_ID],he,K,$))}}function P(ge){let he=null;return typeof L.nodeKey=="string"&&(he=ge[L.nodeKey]||Li.v4()),he||ge[fe.UUID]||Li.v4()}const G={[fe.IS_OPEN]:()=>!!L.expandAll,[fe.IS_CHECKED]:()=>!1,[fe.IS_MATCH]:()=>!0,[fe.IS_SELECTED]:ge=>L.selected===ge,[fe.IS_CACHED]:()=>!1,[fe.IS_ASYNC]:()=>null,[fe.IS_LOADING]:()=>!1};function B(ge,he,K,$=void 0){let V=$;$===void 0&&typeof G[K]=="function"&&(V=G[K](ge,he));const J=_i[K];if(Object.prototype.hasOwnProperty.call(he,J))return he[J];const re=(C||[]).find(q=>q[fe.UUID]===ge);let U;return re&&(U=re[K]),U==null&&(U=V),U}function ie(ge,he){return L.selectable?B(ge,he,fe.IS_SELECTED,L.selected===ge):!1}function le(ge,he,K){var J;const $=B(ge,he,fe.IS_OPEN),V=O.has(K)?(J=O.get(K))==null?void 0:J[fe.IS_OPEN]:!0;return $&&V}function ve(ge){return!ge[fe.IS_OPEN]}function Ie(ge,he=0,K=null,$=null){const V=ge.length;for(let J=0;J<V;J++){const re=ge[J];if(Array.isArray(re))Ie(re,he,K,$);else if(typeof re=="object"&&re!==null){const U=$!==null?`${$}-${J}`:`${J}`,q=`${P(re)}`,ce=!!(re[M]||[]).length;let we=B(q,re,fe.IS_OPEN);L.autoOpenParentNode?we&&W(K,fe.IS_OPEN,!0,ve):we=le(q,re,K),Object.assign(re,{[fe.UUID]:q});const X=L.showCheckbox&&B(q,re,fe.IS_CHECKED);X&&S.push(q),O.set(q,{[fe.DEPTH]:he,[fe.INDEX]:J,[fe.UUID]:q,[fe.PARENT_ID]:K,[fe.HAS_CHILD]:ce,[fe.PATH]:U,[fe.IS_ROOT]:K===null,[fe.ORDER]:j,[fe.IS_SELECTED]:ie(q,re),[fe.IS_MATCH]:B(q,re,fe.IS_MATCH),[fe.IS_OPEN]:we,[fe.IS_CHECKED]:X,[fe.IS_CACHED]:B(q,re,fe.IS_CACHED),[fe.IS_ASYNC]:B(q,re,fe.IS_ASYNC),[fe.IS_LOADING]:B(q,re,fe.IS_LOADING),[M]:null}),j+=1,z.push(Se(Z({},JSON.parse(JSON.stringify(re,(H,Q)=>H===L.children?null:Q))),{[fe.IS_OPEN]:we,[M]:null})),Object.prototype.hasOwnProperty.call(re,M)&&Ie(re[M]||[],he+1,q,U)}}}return Ie(N||I),L.showCheckbox&&(S==null||S.forEach(ge=>{Array.from(O.values()).filter(he=>{var K;return(K=he[fe.PATH])==null?void 0:K.startsWith(O.get(ge)[fe.PATH])}).forEach(he=>Object.assign(he,{[fe.IS_CHECKED]:!0})),W(ge,fe.IS_CHECKED,!0,()=>!0)})),[z,O]},n=t(e),i=new Map,s=[],o=[],c=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),d=a.computed(()=>Array.from(c.schema.values())),{asyncNodeClick:u,deepAutoOpen:f}=t3(e,c),m=L=>{s.push(L)},p=(L,N,C=!0)=>{C&&i.has(L)&&i.delete(L),i.set(L,N)},y=L=>typeof L=="function"?{type:"loop",fn:L}:typeof L=="object"&&typeof L.type=="string"&&typeof L.fn=="function"?L:(console.error("loop event error",L),null),b=L=>{var C;const N=y(L);return N!==null&&Reflect.apply(N.fn,globalThis,[]),(C=N==null?void 0:N.type)!=null?C:"once"},v=()=>{Array.from(i.keys()).forEach(L=>{const N=i.get(L);if(Array.isArray(N)){const C=[];N.forEach((I,M)=>{b(I)==="once"&&C.unshift(M)}),C.length&&C.forEach(I=>N.splice(I,1)),N.length===0&&i.delete(L)}else b(N)==="once"&&i.delete(L)})};a.watch(()=>[e.data],L=>{var C,I;const N=t(e,L,d.value);c.data=N[0],c.schema=N[1],((C=e.async)==null?void 0:C.callback)&&((I=e.async)==null?void 0:I.deepAutoOpen)==="every"&&f(),v()},{deep:!0}),e.selectable&&a.onMounted(()=>{a.watch(()=>e.selected,L=>{o.length=0,s.forEach(N=>{Reflect.apply(N,globalThis,[L]),o.push(()=>Reflect.apply(N,globalThis,[L]))}),p("afterSelectWatch",o)},{immediate:!0})});const k=L=>{p("afterDataUpdate",L)};return(T=e.async)!=null&&T.callback&&f(),{flatData:c,schemaValues:d,asyncNodeClick:u,deepAutoOpen:f,afterDataUpdate:k,registerNextLoop:p,onSelected:m}},qC=a.defineComponent({name:"Tree",props:QC,emits:RC,setup(e,t){const{flatData:n,schemaValues:i,onSelected:s,registerNextLoop:o}=XC(e),{setNodeAttr:c,checkNodeIsOpen:d,getNodeAttr:u,getNodePath:f,isRootNode:m,isNodeOpened:p,isNodeChecked:y,isNodeMatched:b,hasChildNode:v}=Nl(n,e),{searchFn:k,isSearchActive:T,refSearch:L,openResultNode:N,isTreeUI:C,isSearchDisabled:I}=KC(e);I||a.watch([L],()=>{n.data.forEach(he=>{const K=k(e3(he,e),he);c(he,fe.IS_MATCH,K),N&&W(he,!0,!0)})});const M=he=>{if(T.value){const K=()=>C?i.value.some($=>{var V;return((V=$[fe.PATH])==null?void 0:V.startsWith(f(he)))&&$[fe.IS_MATCH]}):!1;return u(he,fe.IS_MATCH)||K()}return!0},S=a.computed(()=>n.data.filter(he=>d(he)&&M(he))),{renderTreeNode:z,handleTreeNodeClick:j,setNodeOpened:O,setOpen:W,setNodeAction:P,setSelect:G,asyncNodeClick:B}=UC(e,t,n,S,i,{registerNextLoop:o}),ie=(he,K=!0)=>{P(Zr(he),fe.IS_CHECKED,K)};s(he=>{G(he,!0,e.autoOpenParentNode)});const le=()=>n;t.expose({handleTreeNodeClick:j,isNodeChecked:y,isRootNode:m,isNodeOpened:p,isNodeMatched:b,hasChildNode:v,setOpen:W,setChecked:ie,setNodeAction:P,setNodeOpened:O,setSelect:G,asyncNodeClick:B,getData:le});const ve=a.ref(),{renderEmpty:Ie}=_C(e,t);$C(e,t,ve,n);const ge=he=>{if(he.length)return he.map(z);const K=T.value?"search-empty":"empty";return Ie(K)};return()=>a.createVNode(Wr,{class:je("tree"),style:HC(null,e),list:S.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:je("container"),throttleDelay:0,ref:ve},{default:he=>ge(he.data||[])})}});const n3=Ge(qC),i3=e=>e.__v_isVNode;var e8=a.defineComponent({name:"ComposeFormItem",props:{headBackgroundColor:{type:String,default:"#FAFBFD"},tailBackgroundColor:String},render(){if(!this.$slots.default)return null;const e=this.$slots.default();if(e.length>1){const t=e.length;let n=0,i=null;for(;n<t;){if(i3(e[n])){i=e[n];break}n=n+1}let s=t-1,o=null;for(;s>=0&&s>n;){if(i3(e[s])){o=e[s];break}s=s-1}if(i&&o){i.props||(i.props={});let c="bk-compose-form-item-head";i.props.class&&(c+=` ${i.props.class}`),this.headBackgroundColor&&(i.props.style=Object.assign(i.props.style||{},{"background-color":this.headBackgroundColor})),i.props.class=c,o.props||(o.props={});let d="bk-compose-form-item-tail";o.props.class&&(d+=` ${o.props.class}`),this.tailBackgroundColor&&(o.props.style=Object.assign(o.props.style||{},{"background-color":this.tailBackgroundColor})),o.props.class=d}}return a.h("div",{class:"bk-compose-form-item"},e)}});const t8={formType:g.oneOf(["default","vertical"]).def("default"),labelWidth:g.oneOfType([Number,String]),labelPosition:g.oneOf(["left","center","right"]),model:g.object,rules:g.object};var n8=a.defineComponent({name:"Form",props:t8,emits:["submit"],setup(e,t){let n=[];const i=u=>{n.push(u)},s=u=>{n=n.reduce((f,m)=>(m!==u&&f.push(m),f),[])};return a.provide(i0,{props:e,register:i,unregister:s}),{handleSubmit:u=>{u.preventDefault(),t.emit("submit")},validate:u=>{let f={};return u?f=(typeof u=="string"?[u]:u).reduce((p,y)=>Se(Z({},p),{[y]:!0}),{}):f=n.reduce((m,p)=>p.property?Se(Z({},m),{[p.property]:!0}):m,{}),Promise.all(n.reduce((m,p)=>(f[p.property]&&m.push(p.validate()),m),[])).then(()=>Promise.resolve(e.model))},clearValidate:u=>{let f={};u?f=(typeof u=="string"?[u]:u).reduce((p,y)=>Se(Z({},p),{[y]:!0}),{}):f=n.reduce((m,p)=>Se(Z({},m),{[p.property]:!0}),{}),n.forEach(m=>f[m.property]&&m.clearValidate())}}},render(){var t,n;const e=ze({"bk-form":!0,[`bk-form--${this.formType}`]:!0});return a.createVNode("form",{class:e,onSubmit:this.handleSubmit},[(n=(t=this.$slots).default)==null?void 0:n.call(t)])}});const bu=e=>typeof e.message=="function"?e.message():e.message;var On={required:e=>typeof e=="number"||typeof e=="boolean"||Pa.isDate(e)?!0:!Pa.isEmpty(e),min:(e,t)=>e>=t,max:(e,t)=>t>=e,email:e=>/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(e),maxlength:(e,t)=>e.length<=t,pattern:(e,t)=>t.test(e)};const i8={label:g.string,labelWidth:g.oneOfType([Number,String]).def(150),labelPosition:g.oneOf(["left","center","right"]),property:g.string.def(""),required:g.bool.def(!1),email:g.bool.def(!1),max:g.number,min:g.number,maxlength:g.number,rules:g.array,autoCheck:g.bool.def(!1),description:g.string,errorDisplayType:g.oneOf(["tooltips","normal"]).def("normal")},a8=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r8=e=>{const t=[],n=e.label||"";return e.required&&t.push({required:!0,validator:On.required,message:`${n}\u4E0D\u80FD\u4E3A\u7A7A`,trigger:"change"}),e.email&&t.push({email:!0,validator:On.email,message:`${n}\u683C\u5F0F\u4E0D\u6B63\u786E`,trigger:"change"}),Number(e.max)>-1&&t.push({validator:i=>On.max(i,e.max),message:`${n}\u6700\u5927\u503C ${e.max}`,trigger:"change"}),Number(e.min)>-1&&t.push({validator:i=>On.min(i,e.min),message:`${n}\u6700\u5C0F\u503C ${e.min}`,trigger:"change"}),Number(e.maxlength)>-1&&t.push({validator:i=>On.maxlength(i,e.maxlength),message:`${n}\u6700\u5927\u957F\u5EA6 ${e.maxlength}`,trigger:"change"}),t},s8=(e,t)=>{let n=!1,i=!1;const s=e.reduce((c,d)=>{let u;if(d.required)u=ot.exports.isFunction(d.validator)?d.validator:On.required,n=!0;else if(d.email)u=ot.exports.isFunction(d.validator)?d.validator:On.email,i=!0;else if(Number(d.max)>-1)u=f=>On.max(f,d.max);else if(Number(d.min)>-1)u=f=>On.min(f,d.max);else if(Number(d.maxlength)>-1)u=f=>On.min(f,d.max);else if(Object.prototype.toString.call(d.pattern)==="[object RegExp]")u=f=>On.pattern(f,d.pattern);else if(ot.exports.isFunction(d.validator))u=d.validator;else return c;return c.push({validator:u,message:d.message||"\u9A8C\u8BC1\u9519\u8BEF",trigger:d.trigger||"blur"}),c},[]);return[...t.reduce((c,d)=>(d.required&&n||d.email&&i||c.push(d),c),[]),...s]},l8=(e,t)=>t.reduce((n,i)=>!i.trigger||!e?(n.push(i),n):((Array.isArray(i.trigger)?i.trigger:[i.trigger]).includes(e)&&n.push(i),n),[]),a3=e=>e!==void 0;var o8=a.defineComponent({name:"FormItem",directives:{bkTooltips:tl},props:i8,setup(e,t){const n=y2(),i=Boolean(n),s=xn(),o=Boolean(s),c=a.getCurrentInstance(),d=a.reactive({isError:!1,errorMessage:""}),u=a.computed(()=>i?n.props.formType==="vertical":!1),f=a.computed(()=>!!(e.label||t.slots.label)),m=a.computed(()=>{const v={width:"",paddingRight:"",textAlign:""},k=e.labelPosition||i&&n.props.labelPosition;if(k&&(v["text-align"]=k),n.props.formType==="vertical"||!e.label&&o)return v;const T=a3(e.labelWidth)?e.labelWidth:i&&n.props.labelWidth;return a3(T)&&(v.width=`${T}px`,v.paddingRight=T?"":"0px"),v}),p=a.computed(()=>({["margin-left"]:m.value.width})),y=v=>{if(!e.property||i&&!n.props.model)return Promise.resolve(!0);let k=[];i&&n.props.rules&&a8(n.props.rules,e.property)&&(k=n.props.rules[e.property]),e.rules&&(k=e.rules),k=l8(v,s8(k,r8(e))),k.length>0&&(d.isError=!1,d.errorMessage="");const T=ot.exports.get(n.props.model,e.property),L=(()=>{let N=-1;return()=>{if(N=N+1,N>=k.length)return Promise.resolve(!0);const C=k[N];return Promise.resolve().then(()=>{const I=C.validator(T);return typeof I!="boolean"&&typeof I.then=="function"?I.then(M=>{if(M===!1)return Promise.reject(bu(C))}).then(()=>L(),()=>(d.isError=!0,d.errorMessage=bu(C),Promise.reject(d.errorMessage))):I?L():(d.isError=!0,d.errorMessage=typeof I=="string"?I:bu(C),Promise.reject(d.errorMessage))})}})();return L()},b=()=>{d.isError=!1,d.errorMessage=""};return a.provide(a0,Se(Z({},e),{validate:y,clearValidate:b})),a.onMounted(()=>{i&&n.register(c.proxy)}),a.onBeforeUnmount(()=>{i&&n.unregister(c.proxy)}),Se(Z({},a.toRefs(d)),{isShowLabel:f,labelStyles:m,contentStyles:p,isFormTypeVertical:u,validate:y,clearValidate:b})},render(){var i,s,o,c;const e=ze({"bk-form-item":!0,"is-error":this.isError,"is-required":this.required}),t=()=>this.$slots.label?this.$slots.label():this.description?a.withDirectives(a.createVNode("span",{class:{"bk-form-label-description":Boolean(this.description)}},[this.label]),[[a.resolveDirective("bk-tooltips"),this.description]]):this.label,n=()=>this.isError?this.errorDisplayType==="tooltips"?a.withDirectives(a.createVNode("div",{class:"bk-form-error-tips"},[a.createVNode(Bs,null,null)]),[[a.resolveDirective("bk-tooltips"),this.errorMessage]]):a.createVNode("div",{class:"bk-form-error"},[this.$slots.error?this.$slots.error(this.errorMessage):this.errorMessage]):null;return a.createVNode("div",{class:e},[this.isShowLabel&&a.createVNode("div",{class:"bk-form-label",style:this.labelStyles},[t(),this.isFormTypeVertical&&((s=(i=this.$slots).labelAppend)==null?void 0:s.call(i))]),a.createVNode("div",{class:"bk-form-content",style:this.contentStyles},[(c=(o=this.$slots).default)==null?void 0:c.call(o),n()])])}});const r3=Gt(n8,{FormItem:o8,ComposeFormItem:e8}),c8={span:g.number.def(1),offset:g.number.def(0),pull:g.number.def(0),push:g.number.def(0)};var u8=a.defineComponent({name:"Col",props:c8,emits:[],setup(e,t){const{col:n,gutter:i,flex:s}=a.inject("containerProps"),{span:o,offset:c,pull:d,push:u}=e,f=a.computed(()=>o||n);a.provide("containerProps",{col:f.value,gutter:i,flex:s});const m=function(y){return`${Number((y*100).toFixed(3))}%`},p=a.computed(()=>({width:m(f.value/n),"padding-right":`${i/2}px`,"padding-left":`${i/2}px`,"margin-left":c?m(c/n):null,right:d?m(d/n):null,left:u?m(u/n):null}));return()=>{var y,b;return a.createVNode("div",{class:"bk-grid-col",style:p.value},[(b=(y=t.slots).default)==null?void 0:b.call(y)])}}});const d8={col:g.number.def(24),gutter:g.number.def(20),margin:g.number.def(20),flex:g.bool.def(!1),extCls:g.string};var f8=a.defineComponent({name:"Container",props:d8,emits:[],setup(e,t){const{col:n,gutter:i,flex:s,extCls:o}=e;a.provide("containerProps",{col:n,gutter:i,flex:s});const c=a.computed(()=>o?`bk-grid-container ${o}`:"bk-grid-container"),d=a.computed(()=>{const{margin:u}=e;return{"padding-right":`${u}px`,"padding-left":`${u}px`}});return()=>{var u,f;return a.createVNode("div",{class:c.value,style:d.value},[(f=(u=t.slots).default)==null?void 0:f.call(u)])}}}),h8=a.defineComponent({name:"Row",emits:[],setup(e,t){const{col:n,gutter:i,flex:s}=a.inject("containerProps");a.provide("containerProps",{col:n,gutter:i,flex:s});const o=a.computed(()=>Se(Z({},s?{display:["-webkit-box","-ms-flexbox","flex"]}:{}),{"margin-right":`-${i/2}px`,"margin-left":`-${i/2}px`}));return()=>{var c,d;return a.createVNode("div",{class:"bk-grid-row",style:o.value},[(d=(c=t.slots).default)==null?void 0:d.call(c)])}}});const Ll=Gt(f8,{Row:h8,Col:u8});var g8=a.defineComponent({name:"Dropdown",props:{isShow:g.bool.def(!1),placement:$f(),trigger:Kf(),disabled:g.bool.def(!1),popoverOptions:g.object.def({}),extCls:g.string},emits:["showChange","show","hide"],setup(e,{emit:t}){const n=o=>{t("showChange",o)};return{afterShow:()=>{t("show"),n(!0)},afterHidden:()=>{t("hide"),n(!1)}}},render(){const e=ze({"bk-dropdown":!0},this.$props.extCls),t={theme:"light bk-dropdown-popover",trigger:this.trigger,arrow:!1,placement:this.placement,isShow:this.isShow,disabled:this.disabled},n=ot.exports.merge(t,this.popoverOptions);return a.createVNode("div",{class:e},[a.createVNode(mn,a.mergeProps(n,{onAfterShow:this.afterShow,onAfterHidden:this.afterHidden}),{default:()=>{var i,s;return a.createVNode("div",{class:"bk-dropdown-reference"},[a.createTextVNode(" "),(s=(i=this.$slots).default)==null?void 0:s.call(i),a.createTextVNode(" ")])},content:()=>{var i,s;return a.createVNode("div",{class:"bk-dropdown-content"},[a.createTextVNode(" "),(s=(i=this.$slots).content)==null?void 0:s.call(i),a.createTextVNode(" ")])}})])}}),m8=a.defineComponent({name:"DropdownItem",props:{extCls:g.string},emits:["click"],setup(e,{emit:t}){const n=s=>{s.stopPropagation(),t("click",s)};return{wrapperCLasses:a.computed(()=>["bk-dropdown-item",e.extCls]),handleClick:n}},render(){var e,t;return a.createVNode("li",{class:this.wrapperCLasses,onClick:this.handleClick},[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}}),p8=a.defineComponent({name:"DropdownMenu",props:{extCls:g.string},setup(e){return{wrapperCLasses:a.computed(()=>["bk-dropdown-menu",e.extCls])}},render(){var e,t;return a.createVNode("ul",{class:this.wrapperCLasses},[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}});const s3=Gt(g8,{DropdownMenu:p8,DropdownItem:m8});var yu=a.defineComponent({name:"CascaderPanel",props:{width:g.oneOfType([g.number,g.string]).def("auto"),height:g.oneOfType([g.number,g.string]).def(216),store:g.object.def({}),separator:g.string.def(""),suggestions:g.arrayOf(Zf()),isFiltering:g.bool.def(!1),searchKey:g.oneOfType([g.string,g.number]).def(""),modelValue:g.arrayOf(g.oneOfType([Go(),String,Number]))},emits:["update:modelValue"],setup(e,{emit:t}){const{store:n}=e,i=a.reactive({list:[e.store.getNodes()]}),s=a.ref([]),o=a.ref([]),c=N=>typeof N=="number"?`${N}px`:N,d=c(e.height),u=c(e.width),f=N=>{N.length===0&&(i.list=i.list.slice(0,1),s.value=[]),N.forEach(C=>{const I=n.getNodeById(C);p(I)}),o.value=N},m=N=>{N.isDisabled||(N.config.multiple?o.value=n.getCheckedNodes().map(C=>C.path):o.value=N.path,t("update:modelValue",o.value))},p=N=>{var C;if(!(!N||(N==null?void 0:N.isDisabled))){if(i.list=i.list.slice(0,N.level),s.value=s.value.slice(0,N.level-1),(C=N.children)!=null&&C.length){i.list.push(N.children),s.value.push(N);return}if(n.config.isRemote&&!N.isLeaf){N.loading=!0;const I=M=>{n.appendNodes(M,N||null),i.list.push(N.children),s.value.push(N),N.loading=!1};n.config.remoteMethod(N,I)}}},y=N=>{const{trigger:C,checkAnyLevel:I,multiple:M}=N.config;return{onClick:z=>{(!N.isLeaf||M)&&z.stopPropagation(),C==="click"&&p(N),I&&!M&&m(N),N.isLeaf&&!M&&m(N)},onMouseenter:()=>{C==="hover"&&p(N)}}},b=N=>{const{multiple:C}=N.config;return{onClick:M=>{if(C){M.stopPropagation(),T(N,!N.checked);return}p(N),N.isLeaf&&!C&&m(N)}}},v=N=>(s.value[N.level-1]||{}).id===N.id,k=(N,C)=>{const{multiple:I}=N.config;return I?C.some(M=>Tr(M,N.path)):Tr(C,N.path)},T=(N,C)=>{N.setNodeCheck(C||!1),m(N)},L=N=>N.loading?a.createVNode(jr,{class:"icon-spinner"},null):a.createVNode(Dn,{class:"icon-angle-right"},null);return a.watch(()=>e.modelValue,N=>{f(N)},{immediate:!0}),a.watch(()=>e.store,N=>{i.list=[N.getNodes()]}),{menus:i,activePath:s,nodeExpandHandler:p,isNodeInPath:v,nodeEvent:y,isCheckedNode:k,checkValue:o,checkNode:T,iconRender:L,panelWidth:u,panelHeight:d,searchPanelEvents:b}},render(){const e=parseInt(this.panelWidth,10)>200?this.panelWidth:`${200}px`,t=()=>this.suggestions.length?a.createVNode("ul",{class:"bk-cascader-panel bk-scroll-y",style:{height:this.panelHeight,width:this.panelWidth}},[this.suggestions.map(n=>a.createVNode("li",a.mergeProps({class:["bk-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",{class:"bk-cascader-search-empty",style:{width:e}},[a.createVNode("span",null,[a.createTextVNode("\u6682\u65E0\u641C\u7D22\u7ED3\u679C")])]);return a.createVNode("div",{class:"bk-cascader-panel-wrapper"},[this.isFiltering?t():this.menus.list.map(n=>a.createVNode("ul",{class:"bk-cascader-panel bk-scroll-y",style:{height:this.panelHeight,width:this.panelWidth}},[n.map(i=>{var s,o;return a.createVNode("li",a.mergeProps({class:["bk-cascader-node",{"is-selected":this.isNodeInPath(i)},{"is-disabled":i.isDisabled},{"is-checked":!i.config.multiple&&this.isCheckedNode(i,this.checkValue)}]},Object.assign(this.nodeEvent(i),i.config.multiple?{}:{})),[i.config.multiple&&a.createVNode(ji,{disabled:i.isDisabled,modelValue:i.checked,"onUpdate:modelValue":c=>i.checked=c,indeterminate:i.isIndeterminate,onChange:c=>this.checkNode(i,c)},null),(o=(s=this.$slots).default)==null?void 0:o.call(s,{node:i,data:i.data}),i.isLeaf?"":this.iconRender(i)])})]))])}});function l3(e){return e.data.disabled?!0:e.level!==1?l3(e.parent):e.data.disabled}class kl{constructor(t,n,i){this.data=t,this.config=n,this.parent=i||null,this.leaf=t.leaf,this.level=this.parent?this.parent.level+1:1,this.initState()}initState(){const{idKey:t,nameKey:n,childrenKey:i}=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[i];this.children=(s||[]).map(o=>new kl(o,this.config,this)),this.pathNodes=this.calculateNodesPath(),this.path=this.pathNodes.map(o=>o.id),this.pathNames=this.pathNodes.map(o=>o.name)}get isLeaf(){var t;return this.config.isRemote?this.leaf||(this.loaded?!this.children.length:!1):!(Array.isArray(this.children)&&((t=this.children)==null?void 0:t.length)!==0)}get isDisabled(){return l3(this)}broadcast(t,n){const i=`onParent${Lr(t)}`;this.children.forEach(s=>{var o;s&&(s.broadcast(t,n),(o=s[i])==null||o.call(s,n))})}emit(t){var s;const{parent:n}=this,i=`onChild${Lr(t)}`;n&&((s=n[i])==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),i=n.length?n.every(s=>s.checked):!1;this.setCheckState(i)}setCheckState(t){const n=this.children.length,i=this.children.reduce((s,o)=>{const c=o.isIndeterminate?.5:0,d=o.checked?1:c;return s+d},0);this.checked=t,this.isIndeterminate=i!==n&&i>0}setNodeCheck(t){if(this.checked!==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 o3=(e,t)=>e.reduce((n,i)=>(i.isLeaf?n.push(i):(!t&&n.push(i),n=n.concat(o3(i.children,t))),n),[]);class c3{constructor(t){const{list:n}=t;this.data=n,this.config=t,this.nodes=this.data.map(i=>new kl(i,this.config))}getNodes(){return this.nodes}clearChecked(){this.getFlattedNodes().forEach(t=>{t.checked=!1,t.isIndeterminate=!1})}removeTag(t){this.getFlattedNodes().find(n=>Tr(t,n.path)?(n.checked=!1,!0):!1)}getFlattedNodes(t=!1){return o3(this.nodes,t)}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getNodeByValue(t){var i;return(i=this.getFlattedNodes().filter(s=>Tr(s.path,t))[0])!=null?i:null}getNodeById(t){return this.getFlattedNodes().find(n=>n.id===t)}appendNode(t,n){const i=new kl(t,this.config,n);(n?n.children:this.nodes).push(i)}appendNodes(t,n){t.forEach(i=>this.appendNode(i,n))}}var b8=a.defineComponent({name:"Cascader",directives:{clickoutside:jn},components:{CascaderPanel:yu,BkPopover:mn},props:{modelValue:g.arrayOf(g.oneOfType([Go(),String,Number])),list:g.array.def([]),placeholder:g.string.def("\u8BF7\u9009\u62E9"),filterable:g.bool.def(!1),multiple:g.bool.def(!1),disabled:g.bool.def(!1),clearable:g.bool.def(!0),trigger:g.string.def("click"),checkAnyLevel:g.bool.def(!1),isRemote:g.bool.def(!1),remoteMethod:g.func,showCompleteName:g.bool.def(!0),idKey:g.string.def("id"),nameKey:g.string.def("name"),childrenKey:g.string.def("children"),separator:g.string.def("/"),limitOneLine:g.bool.def(!1),extCls:g.string.def(""),scrollHeight:g.oneOfType([g.number,g.string]).def(216),scrollWidth:g.oneOfType([g.number,g.string]).def("auto")},emits:["update:modelValue","change","clear","toggle"],setup(e,{emit:t}){const{separator:n,multiple:i}=e,{isHover:s,setHover:o,cancelHover:c}=Ch(),d=a.ref(new c3(e)),u=a.ref(!1),f=a.ref(""),m=a.ref([]),{modelValue:p}=a.toRefs(e),y=a.ref(),b=a.ref(""),v=a.ref([]),k=a.ref(!1),T=a.computed({get:()=>p.value,set:P=>{t("update:modelValue",P)}}),L=a.ref(null),N=P=>e.showCompleteName?P.pathNames.join(n):P.pathNames[P.pathNames.length-1],C=()=>{b.value=f.value},I=P=>{var G;if(i){m.value=d.value.getCheckedNodes().map(B=>({text:N(B),key:B.id}));return}if(!e.checkAnyLevel&&((G=L==null?void 0:L.value)==null||G.hide()),P.length===0)f.value="";else{const B=d.value.getNodeByValue(P);if(!B)return;f.value=N(B)}C()},M=P=>{P.stopPropagation(),d.value.clearChecked(),b.value="",I([]),t("update:modelValue",[]),t("clear",JSON.parse(JSON.stringify(e.modelValue)))},S=(P,G,B)=>{B.stopPropagation();const ie=JSON.parse(JSON.stringify(P)),le=ie.splice(G,1)[0];d.value.removeTag(le),I(ie),t("update:modelValue",d.value.getCheckedNodes().map(ve=>ve.path))},z=(P,G)=>{I(P),t("update:modelValue",P),G!==void 0&&t("change",P)},j=()=>{d.value=new c3(e),I(e.modelValue)},O=P=>{t("toggle",P.isShow),P.isShow||(k.value=!1)},W=Es(200,P=>{const G=P.target;if(b.value=G.value,b.value===""){k.value=!1;return}k.value=!0;const B=d.value.getFlattedNodes().filter(ie=>(e.checkAnyLevel||ie.isLeaf)&&ie.pathNames.join(e.separator).includes(b.value));v.value=B,!(L!=null&&L.value.isShow)&&(L==null||L.value.show())});return a.watch(()=>e.modelValue,z,{immediate:!0}),a.watch(()=>e.list,j,{deep:!0,immediate:!0}),{store:d,updateValue:I,panelShow:u,selectedText:f,checkedValue:T,handleClear:M,isHover:s,setHover:o,popover:L,cancelHover:c,selectedTags:m,removeTag:S,cascaderPanel:y,popoverChangeEmitter:O,searchKey:b,suggestions:v,isFiltering:k,searchInputHandler:W}},render(){const e=()=>this.clearable&&this.isHover?a.createVNode(Zt,{class:"bk-icon-clear-icon",onClick:this.handleClear},null):a.createVNode(_a,{class:"bk-icon-angle-up"},null),t=()=>this.limitOneLine?a.createVNode("span",null,[this.selectedText]):a.createVNode("div",{class:"cascader-tag-list"},[this.selectedTags.map((n,i)=>a.createVNode("span",{class:"cascader-tag-item"},[a.createVNode("span",{class:"cascader-tag-item-name"},[n.text]),a.createVNode(Hn,{class:"bk-icon-clear-icon",onClick:s=>this.removeTag(this.modelValue,i,s)},null)]))]);return a.createVNode("div",{class:["bk-cascader","bk-cascader-wrapper",this.extCls,{"bk-is-show-panel":this.panelShow,"is-unselected":this.modelValue.length===0,"is-hover":this.isHover,"is-filterable":this.filterable}],tabindex:"0","data-placeholder":this.placeholder,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[e(),a.createVNode(mn,{placement:"bottom-start",theme:"light bk-cascader-popover",trigger:"click",arrow:!1,class:"bk-cascader-popover-wrapper",ref:"popover",onAfterHidden:this.popoverChangeEmitter,onAfterShow:this.popoverChangeEmitter,boundary:"body"},{default:()=>a.createVNode("div",{class:"bk-cascader-name"},[this.multiple&&this.selectedTags.length>0&&t(),this.filterable?a.createVNode("input",{class:"bk-cascader-search-input",type:"text",onInput:this.searchInputHandler,placeholder:this.placeholder,value:this.searchKey},null):a.createVNode("span",null,[this.selectedText])]),content:()=>a.createVNode("div",{class:"bk-cascader-popover"},[a.createVNode(yu,{store:this.store,ref:"cascaderPanel",width:this.scrollWidth,height:this.scrollHeight,"search-key":this.searchKey,separator:this.separator,"is-filtering":this.isFiltering,suggestions:this.suggestions,modelValue:this.checkedValue,"onUpdate:modelValue":n=>this.checkedValue=n},{default:n=>this.$slots.default?this.$slots.default(n):a.createVNode("span",{class:"bk-cascader-node-name"},[n.node.name])})])})])}});const u3=Gt(b8,{CascaderPanel:yu});var d3=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),i=a.ref(!1),s=a.ref(0),o=a.ref(0),c=a.ref(0),d=a.ref(null),u=a.ref(e.modelValue),f=a.ref(0),m=a.ref(0),p=a.ref(!1),y=a.ref(null),b=a.computed(()=>{var O,W;let z="";if((O=e.params.customContent)!=null&&O[e.modelValue]){const P=e.params.customContent[e.modelValue];z=P.tip||P.label||""}const j=e.params.vertical?As.RIGHT:As.TOP;return(W=e.params)!=null&&W.showTip?{content:e.params.formatterTipLabel(`${z||(e==null?void 0:e.modelValue)||"0"}`),placement:j}:{content:"",placement:j}}),v=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),k=a.computed(()=>e.params.vertical?{bottom:v.value}:{left:v.value}),T=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),L=z=>{e.params.disable||(z.preventDefault(),N(z),Yr(window,"mousemove",C),Yr(window,"touchmove",C),Yr(window,"mouseup",I),Yr(window,"touchend",I))},N=z=>{n.value=!0,i.value=!0,e.params.vertical?s.value=z.clientY:o.value=z.clientX,c.value=parseFloat(v.value),d.value=c.value},C=z=>{if(n.value){i.value=!1,t("resetSize");let j=0;e.params.vertical?(f.value=z.clientY,j=(s.value-f.value)/e.params.sliderSize*100):(m.value=z.clientX,j=(m.value-o.value)/e.params.sliderSize*100),d.value=c.value+j,M(d.value)}},I=()=>{p.value=!1,n.value&&(setTimeout(()=>{n.value=!1,i.value||(M(d.value),t("emitChange"))},0),Tl(window,"mousemove",C),Tl(window,"touchmove",C),Tl(window,"mouseup",I),Tl(window,"touchend",I))},M=z=>{if(z===null||isNaN(z))return;z<0?d.value=0:z>100&&(d.value=100);const j=100/((e.params.maxValue-e.params.minValue)/e.params.step);let W=Math.round(z/j)*j*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;W=parseFloat(W.toFixed(e.params.precision)),t("update:modelValue",W),!n.value&&e.modelValue!==u.value&&(u.value=e.modelValue)};return{renderDom:()=>a.createVNode("div",{class:["bk-slider-button",e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],ref:y,tabindex:"0",style:k.value,onClick:z=>z.stopPropagation(),onMousedown:L},[Boolean(b.value.content)?a.createVNode(mn,{content:b.value.content,theme:"dark",placement:b.value.placement,boundary:document.body},{default:()=>[a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]}):a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null),e.params.showButtonLabel&&!e.params.showIntervalLabel?a.createVNode("div",{class:["slider-button-label",e.params.vertical?"vertical":"horizontal"]},[T.value]):void 0]),setPosition:M,tip:b}},render(){return this.renderDom()}});const Yr=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},Tl=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)};var y8=a.defineComponent({name:"Slider",props:{modelValue:g.oneOfType([g.array,g.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}},emits:["update:modelValue","change"],setup(e,{slots:t,emit:n}){const i=a.ref(1),s=a.ref(null),o=a.ref(null),c=a.ref(null),d=a.ref(0),u=a.ref(0),f=a.ref(null),m=a.ref(null),p=a.ref(null),y=a.ref(null),b=a.computed(()=>{const K=[e.minValue,e.maxValue,e.step].map($=>{const V=`${$}`.split(".")[1];return V?V.length:0});return Math.max.apply(null,K)}),v=a.computed(()=>Math.min(s.value,o.value)),k=a.computed(()=>Math.max(s.value,o.value)),T=a.computed(()=>e.range?`${100*(k.value-v.value)/(e.maxValue-e.minValue)}%`:`${100*(s.value-e.minValue)/(e.maxValue-e.minValue)}%`),L=a.computed(()=>e.range?`${100*(v.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),N=a.computed(()=>e.vertical?{height:T.value,bottom:L.value}:{width:T.value,left:L.value}),C=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const K=(e.maxValue-e.minValue)/e.step,$=100*e.step/(e.maxValue-e.minValue),V=[];for(let J=1;J<K;J++)V.push(J*$);return e.range?V.filter(J=>J<100*(v.value-e.minValue)/(e.maxValue-e.minValue)||J>100*(k.value-e.minValue)/(e.maxValue-e.minValue)):V.filter(J=>J>100*(s.value-e.minValue)/(e.maxValue-e.minValue))}),I=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),M=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const K=100*e.step/(e.maxValue-e.minValue),$=[];for(let V=e.minValue,J=0;V<=e.maxValue;V+=e.step,J++){const re={stepWidth:J*K,stepLabel:e.formatterLabel(V)};$.push(re)}return $}),S=a.computed(()=>Array.isArray(e.modelValue)),z=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((K,$)=>Number(K)-Number($)).filter(K=>Number(K)>=e.minValue&&Number(K)<=e.maxValue).map(K=>{const{tip:$}=e.customContent[K],{label:V}=e.customContent[K];return{tip:$||V||"",label:V||"",percent:(Number(K)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),j=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:b.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{G()}),a.watch(()=>s.value,K=>{e.range?n("update:modelValue",[v.value,k.value]):n("update:modelValue",K),d.value=K}),a.watch(()=>o.value,K=>{n("update:modelValue",[v.value,k.value]),u.value=K}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(s.value=Math.max(e.minValue,Number(e.modelValue[0])),o.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(s.value=e.minValue,o.value=e.maxValue),c.value=[s.value,o.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?s.value=e.minValue:s.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),c.value=s.value),O(),Yr(window,"resize",O())});const O=()=>{f.value&&(i.value=f.value[`client${e.vertical?"Height":"Width"}`])},W=K=>{var $,V;if(K.stopPropagation(),!e.disable){if(O(),e.vertical){const J=($=f.value)==null?void 0:$.getBoundingClientRect().bottom;le((J-K.clientY)/i.value*100)}else{const J=(V=f.value)==null?void 0:V.getBoundingClientRect().left;le((K.clientX-J)/i.value*100)}B()}},P=()=>e.range?![v.value,k.value].every((K,$)=>K===c.value[$]):e.modelValue!==c.value,G=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const K=e.modelValue;e.range&&Array.isArray(K)?K[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):K[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):K[0]<e.minValue?n("update:modelValue",[e.minValue,K[1]]):K[1]>e.maxValue?n("update:modelValue",[K[0],e.maxValue]):(s.value=Number(K[0]),o.value=Number(K[1]),P()&&(c.value=K.slice())):!e.range&&typeof K=="number"&&!isNaN(K)&&(K<e.minValue?n("update:modelValue",e.minValue):K>e.maxValue?n("update:modelValue",e.maxValue):(s.value=K,P()&&(c.value=K)))},B=async()=>{await a.nextTick(),n("change",e.range?[v.value,k.value]:e.modelValue)},ie=K=>e.vertical?{bottom:`${K}%`}:{left:`${K}%`},le=K=>{if(!e.range){m.value.setPosition(K);return}const $=e.minValue+K*(e.maxValue-e.minValue)/100;Math.abs(v.value-$)<Math.abs(k.value-$)?y.value=s.value<o.value?m.value:p.value:y.value=s.value>o.value?m.value:p.value,y.value.setPosition(K)},ve=K=>{if(K==="")return;const $=parseFloat(K);$<e.minValue?(d.value=e.minValue,s.value=e.minValue):$>e.maxValue?(d.value=e.maxValue,s.value=e.maxValue):s.value=$},Ie=K=>{if(K===""||typeof K=="number")return;const $=parseFloat(K);$<e.minValue?(u.value=e.minValue,o.value=e.minValue):$>e.maxValue?(u.value=e.maxValue,o.value=e.maxValue):o.value=$},ge=K=>{let $=0;return K==="start"?$=e.vertical?e.maxValue:e.minValue:$=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[s.value,o.value].includes($)?"0":"1"};return{renderDom:()=>{var K,$;return a.createVNode("div",{class:["bk-slider",e.extCls]},[(K=t.start)==null?void 0:K.call(t),a.createVNode("div",{class:"bk-slider-runway",ref:f,style:I.value,onClick:W},[a.createVNode("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:N.value},null),e.showInterval?C.value.map((V,J)=>a.createVNode("div",{key:J,class:["bk-slider-interval",{vertical:e.vertical}],style:ie(V)},null)):void 0,e.customContent?z.value.map((V,J)=>a.createVNode("div",{key:J,class:["bk-slider-interval",{vertical:e.vertical}],style:ie(V.percent)},null)):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?a.createVNode("div",{class:["bk-slider-labels",e.vertical?"vertical":"horizontal"]},[function(){if(e.showBetweenLabel)return[a.createVNode("div",{class:"label-start",style:[{opacity:ge("start")}]},[e.formatterLabel(e.minValue)]),a.createVNode("div",{class:"label-end",style:[{opacity:ge("end")}]},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return M.value.map((V,J)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:J,style:ie(V.stepWidth)},[V.stepLabel]));if(e.customContent)return z.value.map((V,J)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:J,style:ie(V.percent)},[V.label]))}()]):void 0,a.createVNode(d3,{modelValue:s.value,"onUpdate:modelValue":V=>s.value=V,ref:m,params:j.value,onEmitChange:B,onResetSize:O},null),e.range?a.createVNode(d3,{modelValue:o.value,"onUpdate:modelValue":V=>o.value=V,ref:p,params:j.value,onEmitChange:B,onResetSize:O},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:"bk-slider-input"},[a.createVNode("div",{class:"input-item"},[a.createVNode(ia,{type:"number",modelValue:d.value,max:e.maxValue,min:e.minValue,onChange:ve},null)]),S.value&&o.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("\uFF5E")]),a.createVNode("div",{class:"input-item"},[a.createVNode(ia,{type:"number",modelValue:u.value,max:e.maxValue,min:e.minValue,onChange:Ie},null)])]:void 0]):void 0,($=t.end)==null?void 0:$.call(t)])}}},render(){return this.renderDom()}});const f3=Ge(y8);var C8=a.defineComponent({name:"ResizeLayout",props:{placement:g.placement().def("left"),min:g.number.def(3),max:g.number.def(1/0),triggerWidth:g.number.def(5),triggerOffset:g.number.def(3),initialDivide:g.oneOfType([String,Number]).def("20%"),immediate:g.bool,disabled:g.bool,collapsible:g.bool,autoMinimize:g.oneOfType([Boolean,Number]).def(!1),border:g.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:n,initialDivide:i,triggerOffset:s,triggerWidth:o,max:c,min:d,immediate:u,autoMinimize:f}=a.toRefs(e),m=a.ref(!1),p=a.ref(!0),y=a.ref(!1),b=a.ref(null),v=a.ref({}),k=a.ref(null),T=a.ref(null),L=a.ref(null),N=a.ref(null),C=a.computed(()=>["left","right"].includes(n.value)),I=a.computed(()=>C.value?"width":"height"),M=a.computed(()=>{let ge=i.value;return typeof ge=="number"&&(ge=`${ge}px`),{[I.value]:ge}}),S=a.computed(()=>({[`margin-${n.value}`]:`${s.value-o.value}px`,[I.value]:`${o.value}px`})),z=a.computed(()=>f.value?typeof f.value=="boolean"?50:f.value:0),j=()=>{const ge=k.value.getBoundingClientRect();b.value=C.value?ge.width:ge.height},O=new ResizeObserver(j),W=()=>{switch(T.value.style.visibility="visible",n.value){case"left":T.value.style.inset=`0 auto auto ${v.value.aside.width}px`;break;case"right":T.value.style.inset=`0 ${v.value.aside.width}px auto auto`;break;case"top":T.value.style.inset=`${v.value.aside.height}px auto auto 0`;break;case"bottom":T.value.style.inset=`auto auto ${v.value.aside.height}px 0`;break}},P=()=>{L.value.style.display="block",L.value.style.cursor=C.value?"col-resize":"row-resize"},G=ge=>Math.min(c.value,Math.max(d.value,ge),b.value-o.value),B=ge=>{t("before-resize",ge);const he=N.value.getBoundingClientRect();v.value=Object.freeze({mouse:{clientX:ge.clientX,clientY:ge.clientY},aside:{width:he.width,height:he.height}}),P(),u.value||W(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const K=J=>{t("resizing",J)},$=J=>{let re;switch(n.value){case"top":re=J.clientY-v.value.mouse.clientY;break;case"right":re=v.value.mouse.clientX-J.clientX;break;case"bottom":re=v.value.mouse.clientY-J.clientY;break;case"left":re=J.clientX-v.value.mouse.clientX}const U=v.value.aside[I.value]+re,q=G(U)+s.value,ce=`${q}px`;u.value?N.value.style[I.value]=ce:T.value.style[n.value]=ce,K(q)},V=()=>{if(T.value.style.visibility="hidden",L.value.style.display="none",document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",V),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{ie(),t("after-resize",parseFloat(T.value.style[n.value]))}),u.value)return!1;N.value.style[I.value]=T.value.style[n.value]};document.addEventListener("mousemove",$),document.addEventListener("mouseup",V)},ie=()=>{if(!f.value)return!1;const ge=N.value.getBoundingClientRect();if(y.value=m.value=ge[I.value]<=z.value,!y.value)return p.value=!0,!1;ve(),a.nextTick(()=>{N.value.setAttribute(`data-${I.value}`,M.value[I.value])})},le=ge=>{m.value=typeof ge=="boolean"?ge:!m.value,ve(),t("collapse-change",m.value)},ve=()=>{const ge=N.value.getBoundingClientRect();Ie(!m.value),m.value?(N.value.setAttribute(`data-${I.value}`,`${ge[I.value]}px`),N.value.style[I.value]="5px"):(p.value=!0,N.value.style[I.value]=N.value.getAttribute(`data-${I.value}`))},Ie=ge=>{const he=()=>{p.value=ge,N.value.style.transition="",N.value.removeEventListener("transitionend",he)};N.value.addEventListener("transitionend",he),N.value.style.transition=`${I.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};return a.onMounted(()=>{O.observe(k.value)}),a.onBeforeUnmount(()=>{O.unobserve(k.value)}),{collapsed:m,asideContentVisible:p,minimized:y,limitMax:b,state:v,vertical:C,cssPropKey:I,bkResizeLayoutRef:k,resizeProxyRef:T,resizeMaskRef:L,asideRef:N,triggerStyle:S,asideStyle:M,handleMousedown:B,setCollapse:le}},render(){var t,n,i,s,o,c;const e=["bk-resize-layout",`bk-resize-layout-${this.placement}`,{"bk-resize-layout-collapsed":this.collapsed,"bk-resize-layout-border":this.border}];return a.createVNode("div",{ref:"bkResizeLayoutRef",class:e},[a.createVNode("aside",{class:"bk-resize-layout-aside",ref:"asideRef",style:this.asideStyle},[a.withDirectives(a.createVNode("div",{class:"bk-resize-layout-aside-content"},[(n=(t=this.$slots).aside)==null?void 0:n.call(t)]),[[a.vShow,this.asideContentVisible]]),a.withDirectives(a.createVNode("i",{class:"bk-resize-trigger",style:this.triggerStyle,onMousedown:a.withModifiers(this.handleMousedown,["left"])},null),[[a.vShow,!this.disabled&&(!this.collapsed||this.autoMinimize)]]),a.withDirectives(a.createVNode("i",{class:["bk-resize-proxy",this.placement],ref:"resizeProxyRef"},null),[[a.vShow,!this.collapsed||this.autoMinimize]]),this.collapsible&&(((s=(i=this.$slots)["collapse-trigger"])==null?void 0:s.call(i))||(this.collapsed?a.createVNode(Dn,{class:"bk-resize-collapse",onClick:this.setCollapse},null):a.createVNode(Si,{class:"bk-resize-collapse",onClick:this.setCollapse},null)))]),a.createVNode("main",{class:"bk-resize-layout-main"},[(c=(o=this.$slots).main)==null?void 0:c.call(o)]),a.createVNode("div",{class:"bk-resize-mask",ref:"resizeMaskRef"},null)])}});const h3=Ge(C8),v8={list:g.array.def([]),titleAble:g.bool.def(!1),extCls:g.string};var w8=a.defineComponent({name:"Timeline",props:v8,emits:["select"],setup(e,{emit:t}){const n=a.ref([]),i=c=>{const d=[];c.forEach(u=>{var f;d.push({tag:u.tag,content:u.content,type:u.type,size:u.size,color:u.color,icon:u.icon,filled:u.filled,border:(f=u.border)!=null?f:!0})}),n.value.splice(0,n.value.length,...d)},s=()=>{var c;n.value.splice(0,n.value.length,{tag:"\u6B65\u9AA41",content:"\u5185\u5BB91"},{tag:"\u6B65\u9AA42",content:"\u5185\u5BB92"},{tag:"\u6B65\u9AA43",content:"\u5185\u5BB93"}),(c=e.list)!=null&&c.length&&i(e.list)},o=c=>{try{t("select",c)}catch(d){console.warn(d)}};return a.onMounted(s),a.watch(()=>e.list,()=>{i(e.list)},{deep:!0}),{defaultTimelines:n,titleSelect:o}},render(){const e=i=>{const{icon:s}=i;return s?typeof s=="object"||typeof s=="function":!1},t=i=>{const s="bk-timeline",o=["blue","red","green","yellow","gray"],c=i.type?`${s}-${i.type}`:`${s}-default`,d=i.size?`${s}-${i.size}`:"",u=i.filled?`${s}-filled`:"",f=i.color&&o.includes(i.color)?`${s}-${i.color}`:"",m=e(i)?`${s}-custom`:"";return ze({},`${s} ${c} ${d} ${f} ${u} ${m}`)},n=i=>this.$slots.content?a.createVNode("div",{class:"bk-timeline-content"},[this.$slots.content(i)]):a.createVNode("div",{class:"bk-timeline-content",innerHTML:i.content},null);return a.createVNode("ul",{class:["bk-timeline",this.extCls]},[this.defaultTimelines.map(i=>{var s,o,c;return a.createVNode("li",{class:["bk-timeline-dot",t(i)]},[e(i)?a.createVNode("div",{class:"bk-timeline-icon",style:{border:i.border?`2px solid ${i.color}`:"0px",borderRadius:i.border?"50%":"0"}},[a.createVNode("span",{class:"bk-timeline-icon-inner"},[typeof i.icon=="function"?a.createVNode(i.icon,null,null):i.icon])]):"",a.createVNode("div",{class:"bk-timeline-section"},[a.createVNode("div",{class:"bk-timeline-title",onClick:()=>{this.titleSelect(i)}},[(c=(o=(s=this.$slots).default)==null?void 0:o.call(s,i))!=null?c:a.createVNode("span",{innerHTML:i.tag},null)]),i.content?n(i):""])])})])}});const g3=Ge(w8),M8={list:g.array.def([]),controllable:g.bool.def(!1),showSteps:g.bool.def(!1),curProcess:g.number.def(0),displayKey:g.string.def("content"),extCls:g.string};var I8=a.defineComponent({name:"Process",props:M8,emits:["update:curProcess","click"],setup(e,{emit:t}){const n=a.ref([]),i=a.ref(0),s=()=>{var c;n.value.splice(0,n.value.length,{content:"\u6B65\u9AA41"},{content:"\u6B65\u9AA42"},{content:"\u6B65\u9AA43"},{content:"\u6B65\u9AA44"}),(c=e.list)!=null&&c.length&&n.value.splice(0,n.value.length,...e.list)},o=async c=>{try{e.controllable&&c!==e.curProcess&&(t("update:curProcess",c),t("click",c))}catch(d){console.warn(d)}};return a.onMounted(s),{defaultProcessList:n,paddingBottom:i,jumpTo:o}},render(){const e="bk-process",t=ze({[`${this.extCls}`]:!!this.extCls},`${e}`),n=d=>d.status==="loading",i=d=>d.status==="error",s=d=>this.curProcess>=d+1||this.defaultProcessList[d].status==="done",o=d=>d.icon?d.icon:"",c=(d,u)=>{if(d===this.curProcess-1&&n(u))return a.createVNode(Rs,{class:"bk-icon bk-process-icon icon-loading"},null);if(d===this.curProcess-1&&i(u))return a.createVNode(Hn,{class:"bk-process-icon"},null);if(d===this.curProcess-1&&o(u))return a.createVNode("span",{class:"bk-process-icon-custom"},[a.createVNode(u.icon,null,null)]);if(s(d))return a.createVNode(na,{class:"bk-process-icon-done"},null)};return a.createVNode("div",{class:t},[a.createVNode("ul",{style:{paddingBottom:`${this.paddingBottom}px`}},[this.defaultProcessList.map((d,u)=>a.createVNode("li",{onClick:()=>{this.jumpTo(u+1)},style:{cursor:this.controllable?"pointer":""},class:{success:this.curProcess>=u+1,current:n(d)&&u===this.curProcess-1,error:i(d)&&u===this.curProcess-1}},[d[this.displayKey],c(u,d)]))])])}});const m3=Ge(I8),fa="bk-upload";var fi=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(fi||{}),$a=(e=>(e.NEW="new",e.UPLOADING="uploading",e.SUCCESS="success",e.FAIL="fail",e))($a||{});const p3=[fi.BUTTON,fi.DRAGGABLE,fi.PICTURE];var hi={theme:{type:String,default:"draggable",validator:e=>!e||p3.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of \u3010${p3.join(" | ")}\u3011`),!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,beforeUpload:{type:Function},beforeRemove:{type:Function},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10}};function b3(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var N8=a.defineComponent({name:"UploadList",props:{theme:hi.theme,disabled:hi.disabled,files:hi.files,multiple:hi.multiple},emits:["remove","retry"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:s,multiple:o}=a.toRefs(e),c=`${fa}-list`,d=a.computed(()=>i.value===fi.PICTURE),u=a.computed(()=>d.value&&!o.value),f=a.computed(()=>ze({[c]:!0,[`${c}--${i.value}`]:!0,[`${c}--disabled`]:s.value}));function m(N){const C=["Bytes","KB","MB","GB","TB"],I=Math.floor(Math.log(N)/Math.log(1024));return`${(N/1024**I).toFixed(2)}${C[I]}`}function p(N,C){n("remove",N,C)}function y(N,C){n("retry",N,C)}const b=()=>{let N;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},b3(N=e.files.map(C=>{const I=ze({[`${c}__item`]:!0,[`${c}__item-picture`]:!0,[`${c}__item--${C.status}`]:!0});return a.createVNode("li",{key:C.uid,class:I},[t!=null&&t.file?t.file({file:C}):v(C)])}))?N:{default:()=>[N]})},v=N=>[a.withDirectives(a.createVNode("img",{src:N.url,class:`${c}__picture-item-thumbnail`,alt:""},null),[[a.vShow,N.status!=="uploading"]]),a.createVNode(a.Fragment,null,[N.status==="uploading"&&a.createVNode(_r,{class:`${c}__picture-item-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:N.percentage},null)]),a.createVNode(a.Fragment,null,[!s.value&&a.createVNode("div",{class:`${c}__picture-item-actions`},[a.createVNode(Dr,{class:"action-icon",onClick:C=>p(N,C)},null)])])],k=()=>{let N;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},b3(N=e.files.map(C=>{const I=ze({[`${c}__item`]:!0,[`${c}__item--${C.status}`]:!0});return a.createVNode("li",{key:C.uid,class:I},[t!=null&&t.file?t.file({file:C}):L(C)])}))?N:{default:()=>[N]})},T=N=>{var j;const C=(j=N==null?void 0:N.raw)==null?void 0:j.type,[I]=(C==null?void 0:C.split("/"))||"";let S={text:Or,image:oc,application:Or,video:pc,audio:ec}[I]||Or;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(C)&&(S=Ko),a.h(S,{class:`${c}__item-file-icon`})},L=N=>[a.createVNode("div",{class:`${c}__item-icon`},[N.isPic?a.createVNode("img",{src:N.url,class:`${c}__item-thumbnail`,alt:""},null):T(N)]),a.createVNode("div",{class:`${c}__item-summary`},[a.createVNode("div",{class:`${c}__item-name`,title:N.name},[N.name]),N.status!=="uploading"&&a.createVNode("div",{class:`${c}__item-message`,title:N.statusText},[N.status==="success"&&a.createVNode("span",null,[a.createVNode(na,{class:`${c}__item-message-success-icon`},null),N.statusText||"\u4E0A\u4F20\u6210\u529F"]),N.status==="fail"&&a.createVNode("span",null,[N.statusText||"\u4E0A\u4F20\u5931\u8D25"])]),N.status==="uploading"&&a.createVNode(_r,{class:`${c}__item-progress`,showText:!1,percent:N.percentage,size:"small"},null),N.status!=="fail"&&a.createVNode("div",{class:`${c}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-size`},[m(N.size)]),[[a.vShow,N.size]]),a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-percentage`},[N.percentage,a.createTextVNode("%")]),[[a.vShow,N.status==="uploading"]])]),!s.value&&a.createVNode("div",{class:`${c}__item-actions`},[N.status==="fail"&&a.createVNode(uc,{class:`${c}__item-retry-icon`,onClick:C=>y(N,C)},null),a.createVNode(Dr,{class:`${c}__item-del-icon`,onClick:C=>p(N,C)},null)])])];return()=>{var N;return a.createVNode(a.Fragment,null,[u.value?(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger((N=e.files)==null?void 0:N[0])):a.createVNode("ul",{class:f.value},[d.value?b():k(),(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger())])])}}}),y3=a.defineComponent({name:"UploadTrigger",props:{theme:hi.theme,disabled:hi.disabled,multiple:hi.multiple,accept:hi.accept,file:{type:Object}},emits:["change","remove"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:s,file:o,multiple:c,accept:d}=a.toRefs(e),u=`${fa}-trigger`,f=a.computed(()=>i.value===fi.BUTTON),m=a.computed(()=>i.value===fi.DRAGGABLE),p=a.computed(()=>i.value===fi.PICTURE),y=a.computed(()=>p.value&&!c.value),b=a.computed(()=>p.value&&!d.value?"image/png,image/jpeg,image/jpg":d.value),v=a.ref(null),k=a.computed(()=>{var G,B,ie;return ze({[u]:!0,[`${u}--${i.value}`]:!0,[`${u}--single-picture`]:y.value,[`${u}--has-file`]:(G=o.value)!=null?G:!1,[`${u}--${(B=o.value)==null?void 0:B.status}`]:(ie=o.value)!=null?ie:!1,[`${u}--dragover`]:M.value,[`${u}--disabled`]:s.value})}),T=()=>{v.value.value=null,v.value.click()},L=G=>{const{files:B}=G.target;n("change",Array.from(B))},N=()=>{e.disabled||T()},C=G=>{G.defaultPrevented||G.target!==G.currentTarget||((G.code==="Enter"||G.code==="Space")&&T(),G.preventDefault())};function I(G,B){n("remove",G,B),B.stopPropagation(),B.preventDefault()}const M=a.ref(!1),S=()=>{const G=ve=>{if(s.value)return;ve.preventDefault(),M.value=!1;const Ie=Array.from(ve.dataTransfer.files);if(!b.value){n("change",Ie);return}const ge=Ie.filter(he=>{const{type:K,name:$}=he,V=$.includes(".")?`.${$.split(".").pop()}`:"",J=K.replace(/\/.*$/,"");return b.value.split(",").map(re=>re.trim()).filter(re=>re).some(re=>re.startsWith(".")?V===re:/\/\*$/.test(re)?J===re.replace(/\/\*$/,""):/^[^/]+\/[^/]+$/.test(re)?K===re:!1)});n("change",ge)},B=ve=>{ve.preventDefault(),M.value=!0},ie=()=>{M.value=!1},le=ze({[`${u}__draggable`]:!0});return a.createVNode("div",{class:le,onDrop:G,onDragover:B,onDragleave:ie},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Ys,{class:`${u}__draggable-icon`},null),a.createVNode("div",{class:`${u}__draggable-text`},[a.createTextVNode("\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904\u6216"),a.createVNode("span",{class:`${u}__draggable-upload-link`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])])])},z=()=>a.createVNode(a.Fragment,null,[y.value&&e.file?O(e.file):j()]),j=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${u}__picture-inner`},[a.createVNode(Gs,{class:`${u}__picture-icon`},null),a.createVNode("div",{class:`${u}__picture-text`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])]),O=G=>[a.withDirectives(a.createVNode("img",{src:G.url,class:`${u}__picture-thumbnail`,alt:""},null),[[a.vShow,G.status!=="uploading"]]),a.createVNode(a.Fragment,null,[G.status==="uploading"&&a.createVNode(_r,{class:`${u}__picture-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:G.percentage},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${u}__picture-actions`},[a.createVNode(Dr,{class:"action-icon",onClick:B=>I(G,B)},null)])])],W=()=>a.createVNode(Pt,{disabled:s.value},{default:()=>[a.createVNode(Ys,{class:`${u}__button-icon`},null),a.createVNode("span",{class:`${u}__button-text`},[a.createTextVNode("\u4E0A\u4F20\u6587\u4EF6")])]}),P=()=>{if(f.value)return W();if(m.value)return S();if(p.value)return z()};return()=>{var G;return a.createVNode("div",{class:k.value,tabindex:"0",onClick:N,onKeydown:C},[t.trigger?[t.trigger(),(G=t==null?void 0:t.default)==null?void 0:G.call(t)]:P(),a.createVNode("input",{ref:v,class:"bk-upload__input-file",tabindex:"-1",onChange:L,accept:b.value,multiple:c.value,disabled:s.value,type:"file"},null)])}}}),C3={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(n){var i=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function s(L,N){var C=L[0],I=L[1],M=L[2],S=L[3];C+=(I&M|~I&S)+N[0]-680876936|0,C=(C<<7|C>>>25)+I|0,S+=(C&I|~C&M)+N[1]-389564586|0,S=(S<<12|S>>>20)+C|0,M+=(S&C|~S&I)+N[2]+606105819|0,M=(M<<17|M>>>15)+S|0,I+=(M&S|~M&C)+N[3]-1044525330|0,I=(I<<22|I>>>10)+M|0,C+=(I&M|~I&S)+N[4]-176418897|0,C=(C<<7|C>>>25)+I|0,S+=(C&I|~C&M)+N[5]+1200080426|0,S=(S<<12|S>>>20)+C|0,M+=(S&C|~S&I)+N[6]-1473231341|0,M=(M<<17|M>>>15)+S|0,I+=(M&S|~M&C)+N[7]-45705983|0,I=(I<<22|I>>>10)+M|0,C+=(I&M|~I&S)+N[8]+1770035416|0,C=(C<<7|C>>>25)+I|0,S+=(C&I|~C&M)+N[9]-1958414417|0,S=(S<<12|S>>>20)+C|0,M+=(S&C|~S&I)+N[10]-42063|0,M=(M<<17|M>>>15)+S|0,I+=(M&S|~M&C)+N[11]-1990404162|0,I=(I<<22|I>>>10)+M|0,C+=(I&M|~I&S)+N[12]+1804603682|0,C=(C<<7|C>>>25)+I|0,S+=(C&I|~C&M)+N[13]-40341101|0,S=(S<<12|S>>>20)+C|0,M+=(S&C|~S&I)+N[14]-1502002290|0,M=(M<<17|M>>>15)+S|0,I+=(M&S|~M&C)+N[15]+1236535329|0,I=(I<<22|I>>>10)+M|0,C+=(I&S|M&~S)+N[1]-165796510|0,C=(C<<5|C>>>27)+I|0,S+=(C&M|I&~M)+N[6]-1069501632|0,S=(S<<9|S>>>23)+C|0,M+=(S&I|C&~I)+N[11]+643717713|0,M=(M<<14|M>>>18)+S|0,I+=(M&C|S&~C)+N[0]-373897302|0,I=(I<<20|I>>>12)+M|0,C+=(I&S|M&~S)+N[5]-701558691|0,C=(C<<5|C>>>27)+I|0,S+=(C&M|I&~M)+N[10]+38016083|0,S=(S<<9|S>>>23)+C|0,M+=(S&I|C&~I)+N[15]-660478335|0,M=(M<<14|M>>>18)+S|0,I+=(M&C|S&~C)+N[4]-405537848|0,I=(I<<20|I>>>12)+M|0,C+=(I&S|M&~S)+N[9]+568446438|0,C=(C<<5|C>>>27)+I|0,S+=(C&M|I&~M)+N[14]-1019803690|0,S=(S<<9|S>>>23)+C|0,M+=(S&I|C&~I)+N[3]-187363961|0,M=(M<<14|M>>>18)+S|0,I+=(M&C|S&~C)+N[8]+1163531501|0,I=(I<<20|I>>>12)+M|0,C+=(I&S|M&~S)+N[13]-1444681467|0,C=(C<<5|C>>>27)+I|0,S+=(C&M|I&~M)+N[2]-51403784|0,S=(S<<9|S>>>23)+C|0,M+=(S&I|C&~I)+N[7]+1735328473|0,M=(M<<14|M>>>18)+S|0,I+=(M&C|S&~C)+N[12]-1926607734|0,I=(I<<20|I>>>12)+M|0,C+=(I^M^S)+N[5]-378558|0,C=(C<<4|C>>>28)+I|0,S+=(C^I^M)+N[8]-2022574463|0,S=(S<<11|S>>>21)+C|0,M+=(S^C^I)+N[11]+1839030562|0,M=(M<<16|M>>>16)+S|0,I+=(M^S^C)+N[14]-35309556|0,I=(I<<23|I>>>9)+M|0,C+=(I^M^S)+N[1]-1530992060|0,C=(C<<4|C>>>28)+I|0,S+=(C^I^M)+N[4]+1272893353|0,S=(S<<11|S>>>21)+C|0,M+=(S^C^I)+N[7]-155497632|0,M=(M<<16|M>>>16)+S|0,I+=(M^S^C)+N[10]-1094730640|0,I=(I<<23|I>>>9)+M|0,C+=(I^M^S)+N[13]+681279174|0,C=(C<<4|C>>>28)+I|0,S+=(C^I^M)+N[0]-358537222|0,S=(S<<11|S>>>21)+C|0,M+=(S^C^I)+N[3]-722521979|0,M=(M<<16|M>>>16)+S|0,I+=(M^S^C)+N[6]+76029189|0,I=(I<<23|I>>>9)+M|0,C+=(I^M^S)+N[9]-640364487|0,C=(C<<4|C>>>28)+I|0,S+=(C^I^M)+N[12]-421815835|0,S=(S<<11|S>>>21)+C|0,M+=(S^C^I)+N[15]+530742520|0,M=(M<<16|M>>>16)+S|0,I+=(M^S^C)+N[2]-995338651|0,I=(I<<23|I>>>9)+M|0,C+=(M^(I|~S))+N[0]-198630844|0,C=(C<<6|C>>>26)+I|0,S+=(I^(C|~M))+N[7]+1126891415|0,S=(S<<10|S>>>22)+C|0,M+=(C^(S|~I))+N[14]-1416354905|0,M=(M<<15|M>>>17)+S|0,I+=(S^(M|~C))+N[5]-57434055|0,I=(I<<21|I>>>11)+M|0,C+=(M^(I|~S))+N[12]+1700485571|0,C=(C<<6|C>>>26)+I|0,S+=(I^(C|~M))+N[3]-1894986606|0,S=(S<<10|S>>>22)+C|0,M+=(C^(S|~I))+N[10]-1051523|0,M=(M<<15|M>>>17)+S|0,I+=(S^(M|~C))+N[1]-2054922799|0,I=(I<<21|I>>>11)+M|0,C+=(M^(I|~S))+N[8]+1873313359|0,C=(C<<6|C>>>26)+I|0,S+=(I^(C|~M))+N[15]-30611744|0,S=(S<<10|S>>>22)+C|0,M+=(C^(S|~I))+N[6]-1560198380|0,M=(M<<15|M>>>17)+S|0,I+=(S^(M|~C))+N[13]+1309151649|0,I=(I<<21|I>>>11)+M|0,C+=(M^(I|~S))+N[4]-145523070|0,C=(C<<6|C>>>26)+I|0,S+=(I^(C|~M))+N[11]-1120210379|0,S=(S<<10|S>>>22)+C|0,M+=(C^(S|~I))+N[2]+718787259|0,M=(M<<15|M>>>17)+S|0,I+=(S^(M|~C))+N[9]-343485551|0,I=(I<<21|I>>>11)+M|0,L[0]=C+L[0]|0,L[1]=I+L[1]|0,L[2]=M+L[2]|0,L[3]=S+L[3]|0}function o(L){var N=[],C;for(C=0;C<64;C+=4)N[C>>2]=L.charCodeAt(C)+(L.charCodeAt(C+1)<<8)+(L.charCodeAt(C+2)<<16)+(L.charCodeAt(C+3)<<24);return N}function c(L){var N=[],C;for(C=0;C<64;C+=4)N[C>>2]=L[C]+(L[C+1]<<8)+(L[C+2]<<16)+(L[C+3]<<24);return N}function d(L){var N=L.length,C=[1732584193,-271733879,-1732584194,271733878],I,M,S,z,j,O;for(I=64;I<=N;I+=64)s(C,o(L.substring(I-64,I)));for(L=L.substring(I-64),M=L.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],I=0;I<M;I+=1)S[I>>2]|=L.charCodeAt(I)<<(I%4<<3);if(S[I>>2]|=128<<(I%4<<3),I>55)for(s(C,S),I=0;I<16;I+=1)S[I]=0;return z=N*8,z=z.toString(16).match(/(.*?)(.{0,8})$/),j=parseInt(z[2],16),O=parseInt(z[1],16)||0,S[14]=j,S[15]=O,s(C,S),C}function u(L){var N=L.length,C=[1732584193,-271733879,-1732584194,271733878],I,M,S,z,j,O;for(I=64;I<=N;I+=64)s(C,c(L.subarray(I-64,I)));for(L=I-64<N?L.subarray(I-64):new Uint8Array(0),M=L.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],I=0;I<M;I+=1)S[I>>2]|=L[I]<<(I%4<<3);if(S[I>>2]|=128<<(I%4<<3),I>55)for(s(C,S),I=0;I<16;I+=1)S[I]=0;return z=N*8,z=z.toString(16).match(/(.*?)(.{0,8})$/),j=parseInt(z[2],16),O=parseInt(z[1],16)||0,S[14]=j,S[15]=O,s(C,S),C}function f(L){var N="",C;for(C=0;C<4;C+=1)N+=i[L>>C*8+4&15]+i[L>>C*8&15];return N}function m(L){var N;for(N=0;N<L.length;N+=1)L[N]=f(L[N]);return L.join("")}m(d("hello")),typeof ArrayBuffer!="undefined"&&!ArrayBuffer.prototype.slice&&function(){function L(N,C){return N=N|0||0,N<0?Math.max(N+C,0):Math.min(N,C)}ArrayBuffer.prototype.slice=function(N,C){var I=this.byteLength,M=L(N,I),S=I,z,j,O,W;return C!==n&&(S=L(C,I)),M>S?new ArrayBuffer(0):(z=S-M,j=new ArrayBuffer(z),O=new Uint8Array(j),W=new Uint8Array(this,M,z),O.set(W),j)}}();function p(L){return/[\u0080-\uFFFF]/.test(L)&&(L=unescape(encodeURIComponent(L))),L}function y(L,N){var C=L.length,I=new ArrayBuffer(C),M=new Uint8Array(I),S;for(S=0;S<C;S+=1)M[S]=L.charCodeAt(S);return N?M:I}function b(L){return String.fromCharCode.apply(null,new Uint8Array(L))}function v(L,N,C){var I=new Uint8Array(L.byteLength+N.byteLength);return I.set(new Uint8Array(L)),I.set(new Uint8Array(N),L.byteLength),C?I:I.buffer}function k(L){var N=[],C=L.length,I;for(I=0;I<C-1;I+=2)N.push(parseInt(L.substr(I,2),16));return String.fromCharCode.apply(String,N)}function T(){this.reset()}return T.prototype.append=function(L){return this.appendBinary(p(L)),this},T.prototype.appendBinary=function(L){this._buff+=L,this._length+=L.length;var N=this._buff.length,C;for(C=64;C<=N;C+=64)s(this._hash,o(this._buff.substring(C-64,C)));return this._buff=this._buff.substring(C-64),this},T.prototype.end=function(L){var N=this._buff,C=N.length,I,M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S;for(I=0;I<C;I+=1)M[I>>2]|=N.charCodeAt(I)<<(I%4<<3);return this._finish(M,C),S=m(this._hash),L&&(S=k(S)),this.reset(),S},T.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},T.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},T.prototype.setState=function(L){return this._buff=L.buff,this._length=L.length,this._hash=L.hash,this},T.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},T.prototype._finish=function(L,N){var C=N,I,M,S;if(L[C>>2]|=128<<(C%4<<3),C>55)for(s(this._hash,L),C=0;C<16;C+=1)L[C]=0;I=this._length*8,I=I.toString(16).match(/(.*?)(.{0,8})$/),M=parseInt(I[2],16),S=parseInt(I[1],16)||0,L[14]=M,L[15]=S,s(this._hash,L)},T.hash=function(L,N){return T.hashBinary(p(L),N)},T.hashBinary=function(L,N){var C=d(L),I=m(C);return N?k(I):I},T.ArrayBuffer=function(){this.reset()},T.ArrayBuffer.prototype.append=function(L){var N=v(this._buff.buffer,L,!0),C=N.length,I;for(this._length+=L.byteLength,I=64;I<=C;I+=64)s(this._hash,c(N.subarray(I-64,I)));return this._buff=I-64<C?new Uint8Array(N.buffer.slice(I-64)):new Uint8Array(0),this},T.ArrayBuffer.prototype.end=function(L){var N=this._buff,C=N.length,I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M,S;for(M=0;M<C;M+=1)I[M>>2]|=N[M]<<(M%4<<3);return this._finish(I,C),S=m(this._hash),L&&(S=k(S)),this.reset(),S},T.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},T.ArrayBuffer.prototype.getState=function(){var L=T.prototype.getState.call(this);return L.buff=b(L.buff),L},T.ArrayBuffer.prototype.setState=function(L){return L.buff=y(L.buff,!0),T.prototype.setState.call(this,L)},T.ArrayBuffer.prototype.destroy=T.prototype.destroy,T.ArrayBuffer.prototype._finish=T.prototype._finish,T.ArrayBuffer.hash=function(L,N){var C=u(new Uint8Array(L)),I=m(C);return N?k(I):I},T})})(C3);var v3=C3.exports;function Cu(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const L8=e=>{if(typeof XMLHttpRequest=="undefined")throw new Error("XMLHttpRequest is undefined");const t=new XMLHttpRequest,{action:n}=e;t.upload&&t.upload.addEventListener("progress",o=>{const c=o;c.percent=o.total>0?o.loaded/o.total*100:0,e.onProgress(c)});const i=new FormData;if(e.data){let o=e.data;Array.isArray(o)||(o=[o]),o.forEach(c=>{for(const[d,u]of Object.entries(c))Array.isArray(u)?i.append(d,...u):i.append(d,u)})}if(e.formDataAttributes){let o=e.formDataAttributes;Array.isArray(o)||(o=[o]),o.forEach(c=>{Array.isArray(c.value)?i.append(c.name,...c.value):i.append(c.name,c.value)})}if(i.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(new Error("An error occurred during upload"))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(Cu(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(o=>{const c=o.name,d=o.value;t.setRequestHeader(c,d)});else{const o=e.header.name,c=e.header.value;t.setRequestHeader(o,c)}const s=e.headers||{};if(s instanceof Headers)s.forEach((o,c)=>t.setRequestHeader(c,o));else for(const[o,c]of Object.entries(s))Pf(c)||t.setRequestHeader(o,String(c));return t.send(i),t},w3=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,k8=async e=>{const t=e.chunkSize*1024*1024,{file:n}=e;if(!n)throw new Error("File not found");const i=Math.ceil(n.size/t),s=await S8(n,t),o=[];T8(e,n,i,s,o,t),await Promise.all(o).then(()=>{const c={size:n.size,name:n.name,total:i,hash:s},d=new XMLHttpRequest;d.open(e.method,e.mergeUrl,!0),d.onreadystatechange=()=>{if(d.readyState===4){if(d.status<200||d.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(Cu(d))}},d.onloadend=()=>{e.onComplete()},d.setRequestHeader("Content-type","application/JSON"),d.send(JSON.stringify(c))})},T8=(e,t,n,i,s,o)=>{for(let c=0;c<n;c++){const d=new Promise((u,f)=>{const m=c*o,p=Math.min(t.size,m+o),y=new FormData;if(e.data){let k=e.data;Array.isArray(k)||(k=[k]),k.forEach(T=>{for(const[L,N]of Object.entries(T))Array.isArray(N)?y.append(L,...N):y.append(L,N)})}if(e.formDataAttributes){let k=e.formDataAttributes;Array.isArray(k)||(k=[k]),k.forEach(T=>{Array.isArray(T.value)?y.append(T.name,...T.value):y.append(T.name,T.value)})}y.append("file",w3.call(t,m,p)),y.append("name",t.name),y.append("total",n.toString()),y.append("index",c.toString()),y.append("size",t.size.toString()),y.append("hash",i.toString());const b=new XMLHttpRequest;if(b.onreadystatechange=()=>{if(b.readyState===4){const k=Cu(b);b.status<200||b.status>=300?(f(k),e.onError(new Error("An error occurred during upload"))):u("reponseText")}},b.upload.addEventListener("progress",k=>{const T=k;e.onProgress(T,c)},!1),e.withCredentials&&"withCredentials"in b&&(b.withCredentials=!0),b.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(k=>{const T=k.name,L=k.value;b.setRequestHeader(T,L)});else{const k=e.header.name,T=e.header.value;b.setRequestHeader(k,T)}const v=e.headers||{};if(v instanceof Headers)v.forEach((k,T)=>b.setRequestHeader(T,k));else for(const[k,T]of Object.entries(v))Pf(T)||b.setRequestHeader(k,String(T));b.send(y)});s.push(d)}},S8=(e,t)=>new Promise((n,i)=>{const s=Math.ceil(e.size/t);let o=0;const c=new v3.ArrayBuffer,d=new FileReader;function u(){const f=o*t,m=f+t>=e.size?e.size:f+t;d.readAsArrayBuffer(w3.call(e,f,m))}d.onload=f=>{if(c.append(f.target.result),o+=1,o<s)u();else{const m=c.end(),p=new v3;p.append(m),p.append(e.name);const y=p.end();n(y)}},d.onerror=()=>{i(new Error("File slcie failed"))},u()}).catch(n=>{console.log(n)});function M3(e){return Date.now()+e}var x8=(e,t)=>{const n=a.computed(()=>{var y;return typeof e.size=="number"?e.size:(y=e==null?void 0:e.size)==null?void 0:y.maxImgSize}),i=a.computed(()=>{var y;return typeof e.size=="number"?e.size:(y=e==null?void 0:e.size)==null?void 0:y.maxImgSize}),s=a.ref([]);function o(y){return s.value.find(b=>b.uid===y.uid)}let c=0;function d(y){var T;c+=1,y.uid=M3(c);const b={uid:y.uid,name:y.name,status:$a.NEW,size:y.size,raw:y},v=y.type.startsWith("image/");let k=null;if(v){try{b.url=window.URL.createObjectURL(y)}catch(L){console.error(L)}b.isPic=!0}return e.validateName&&!((T=e.validateName)!=null&&T.test(b.name))&&(b.status=$a.FAIL,b.statusText="invalid filename",k=new Error(b.statusText)),v&&y.size>n.value*1024**2&&(b.status=$a.FAIL,b.statusText="invalid file size",k=new Error(b.statusText)),!v&&y.size>i.value*1024**2&&(b.status=$a.FAIL,b.statusText="invalid file size",k=new Error(b.statusText)),s.value.push(b),k}async function u(y){var k;const b=y instanceof File?o(y):y,v=T=>{var L;t.onRemove(T,s.value),s.value.splice(s.value.indexOf(b),1),(L=T.url)!=null&&L.startsWith("blob:")&&URL.revokeObjectURL(T.url)};e.beforeRemove?await((k=e.beforeRemove)==null?void 0:k.call(e,b,s.value))!==!1&&v(b):v(b)}async function f(y,b,v){const k=o(b);!k||(k.status="fail",k.statusText=y.message,k.response=v)}async function m(y,b){const v=o(b);!v||(v.status="success",v.response=y)}async function p(y,b){const v=o(b);!v||(v.status="uploading",v.percentage=Math.round(y.percent))}return a.watch(()=>e.files,y=>{s.value=y.map(b=>{var v,k;return c+=1,Se(Z({},b),{uid:(v=b.uid)!=null?v:M3(c),status:(k=b.status)!=null?k:$a.SUCCESS})})},{immediate:!0,deep:!0}),{fileList:s,handlePreprocess:d,handleRemove:u,handleError:f,handleSuccess:m,handleProgress:p}},D8=a.defineComponent({name:"Upload",props:hi,emits:["exceed","progress","success","error","delete","done"],setup(e,{slots:t,emit:n,expose:i}){const s=a.shallowRef({}),o=a.computed(()=>e.theme===fi.PICTURE),c=a.computed(()=>o.value&&!e.multiple),d=a.computed(()=>{var M;return ze({[fa]:!0,[`${fa}--${e.theme}`]:!0,[`${fa}--disabled`]:e.disabled,[`${fa}--single-picture`]:c.value,[e.extCls]:(M=e.extCls)!=null?M:!1})}),u={theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept};function f(M,S){I(M),n("delete",M,S)}const{fileList:m,handlePreprocess:p,handleRemove:y,handleProgress:b,handleSuccess:v,handleError:k}=x8(e,{onRemove:f});function T(M){if(!M.length)return;if(e.limit&&m.value.length+M.length>e.limit){n("exceed",M,m.value);return}let S=M;(!e.multiple||e.limit===1)&&(S=M.slice(0,1));for(const z of S){const j=z,O=p(j);if(O){n("error",j,m.value,O);return}e.autoUpload&&N(j,S)}}function L(M){C(M.raw)}async function N(M,S){var j;if(!e.beforeUpload)return C(M,S);let z;try{z=await((j=e.beforeUpload)==null?void 0:j.call(e,M))}catch{z=!1}if(z===!1){y(M);return}C(M,S)}function C(M,S){const{headers:z,header:j,data:O,formDataAttributes:W,method:P,withCredentials:G,name:B,url:ie,sliceUrl:le,mergeUrl:ve,chunkSize:Ie,customRequest:ge}=e,{uid:he}=M,K={headers:z,header:j,withCredentials:G,file:M,data:O,formDataAttributes:W,method:P,filename:B,action:ie,sliceUrl:le,mergeUrl:ve,chunkSize:Ie,onProgress:J=>{b(J,M),n("progress",J,M,m.value)},onSuccess:J=>{var U;const re=J;if((U=e==null?void 0:e.handleResCode)!=null&&U.call(e,re))v(J,M),n("success",J,M,m.value);else{const q=new Error((re==null?void 0:re.message)||"unknow error");k(q,M,J),n("error",M,m.value,q)}delete s.value[he]},onError:J=>{k(J,M),n("error",M,m.value,J),delete s.value[he]},onComplete:()=>{S&&S.indexOf(M)===S.length-1&&n("done",m.value)}};let $=e.sliceUpload?k8:L8;ge&&($=ge);const V=$(K);s.value[he]=V,V instanceof Promise&&V.then(K.onSuccess,K.onError)}function I(M){let S=s.value;M&&(S={[M.uid]:s.value[M.uid]}),Object.keys(S).forEach(z=>{if(S[z]instanceof XMLHttpRequest){const j=S[z];j==null||j.abort()}delete s.value[z]})}return a.onBeforeUnmount(()=>{m.value.forEach(({url:M})=>{M!=null&&M.startsWith("blob:")&&URL.revokeObjectURL(M)})}),i({handleRemove:y,handleRetry:L}),()=>a.createVNode("div",{class:d.value},[!o.value&&a.createVNode(y3,a.mergeProps(u,{onChange:T}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${fa}__tip`},[e.tip]),a.createVNode(N8,{files:m.value,theme:e.theme,disabled:e.disabled,multiple:e.multiple,onRemove:y,onRetry:L},{innerTrigger:M=>o.value&&a.createVNode(y3,a.mergeProps(u,{file:M,onChange:T,onRemove:y}),t),file:t.file})])}});const I3=Ge(D8);function Wi(){}Wi.prototype={diff:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.callback;typeof i=="function"&&(s=i,i={}),this.options=i;var o=this;function c(k){return s?(setTimeout(function(){s(void 0,k)},0),!0):k}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var d=n.length,u=t.length,f=1,m=d+u,p=[{newPos:-1,components:[]}],y=this.extractCommon(p[0],n,t,0);if(p[0].newPos+1>=d&&y+1>=u)return c([{value:this.join(n),count:n.length}]);function b(){for(var k=-1*f;k<=f;k+=2){var T=void 0,L=p[k-1],N=p[k+1],C=(N?N.newPos:0)-k;L&&(p[k-1]=void 0);var I=L&&L.newPos+1<d,M=N&&0<=C&&C<u;if(!I&&!M){p[k]=void 0;continue}if(!I||M&&L.newPos<N.newPos?(T=z8(N),o.pushComponent(T.components,void 0,!0)):(T=L,T.newPos++,o.pushComponent(T.components,!0,void 0)),C=o.extractCommon(T,n,t,k),T.newPos+1>=d&&C+1>=u)return c(j8(o,T.components,n,t,o.useLongestToken));p[k]=T}f++}if(s)(function k(){setTimeout(function(){if(f>m)return s();b()||k()},0)})();else for(;f<=m;){var v=b();if(v)return v}},pushComponent:function(t,n,i){var s=t[t.length-1];s&&s.added===n&&s.removed===i?t[t.length-1]={count:s.count+1,added:n,removed:i}:t.push({count:1,added:n,removed:i})},extractCommon:function(t,n,i,s){for(var o=n.length,c=i.length,d=t.newPos,u=d-s,f=0;d+1<o&&u+1<c&&this.equals(n[d+1],i[u+1]);)d++,u++,f++;return f&&t.components.push({count:f}),t.newPos=d,u},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],i=0;i<t.length;i++)t[i]&&n.push(t[i]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function j8(e,t,n,i,s){for(var o=0,c=t.length,d=0,u=0;o<c;o++){var f=t[o];if(f.removed){if(f.value=e.join(i.slice(u,u+f.count)),u+=f.count,o&&t[o-1].added){var p=t[o-1];t[o-1]=t[o],t[o]=p}}else{if(!f.added&&s){var m=n.slice(d,d+f.count);m=m.map(function(b,v){var k=i[u+v];return k.length>b.length?k:b}),f.value=e.join(m)}else f.value=e.join(n.slice(d,d+f.count));d+=f.count,f.added||(u+=f.count)}}var y=t[c-1];return c>1&&typeof y.value=="string"&&(y.added||y.removed)&&e.equals("",y.value)&&(t[c-2].value+=y.value,t.pop()),t}function z8(e){return{newPos:e.newPos,components:e.components.slice(0)}}var N3=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,L3=/\S/,k3=new Wi;k3.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!L3.test(e)&&!L3.test(t)},k3.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]&&N3.test(t[n])&&N3.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var vu=new Wi;vu.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;i<n.length;i++){var s=n[i];i%2&&!this.options.newlineIsToken?t[t.length-1]+=s:(this.options.ignoreWhitespace&&(s=s.trim()),t.push(s))}return t};function O8(e,t,n){return vu.diff(e,t,n)}var A8=new Wi;A8.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var P8=new Wi;P8.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Sl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Sl=function(t){return typeof t}:Sl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sl(e)}function wu(e){return E8(e)||V8(e)||J8(e)||R8()}function E8(e){if(Array.isArray(e))return Mu(e)}function V8(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function J8(e,t){if(!!e){if(typeof e=="string")return Mu(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 Mu(e,t)}}function Mu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function R8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
63
|
+
`,j={d:z,stroke:m||"#f5f5f5","stroke-linecap":d,"stroke-width":y,"fill-opacity":"0",class:"process-circle-trail",style:M},O={d:z,stroke:c||"#13ce66","stroke-linecap":d,"stroke-width":s>0&&y||0,"fill-opacity":"0",class:`process-circle-path bk-${u}-circle-trail`,style:S};return a.createVNode("div",{class:"progress-outer-circle",style:v},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",j,null),a.createVNode("path",O,null)]),a.createVNode("span",{class:"progress-circle-text",style:p},[n==null?void 0:n.default()])])},s5=(e,{attrs:t,slots:n})=>{const{percent:i,strokeWidth:s,size:o,color:c,titleStyle:d,showText:u,textInside:f,theme:m}=t,p={height:`${s}px`,lineHeight:`${s}px`},y={width:`${i}%`,background:c,animationDuration:"3s"},b=(v=!0)=>(u||n.default)&&(v&&f||!v&&!f)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{class:`bk-progress-${o||"normal"} progress-bar`,style:p},[a.createVNode("div",{style:y,class:{"progress-inner":!0,[`bk-${m}`]:!0}},[a.createVNode("div",{class:"inner-text",style:d},[b()])])]),b(!1)])};function dh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var l5=a.defineComponent({name:"Progress",props:{extCls:g.string,type:g.string.validate(e=>["line","circle","dashboard"].includes(e)).def("line"),percent:g.number.def(0),theme:g.theme().def(Os.PRIMARY),size:g.size(),width:g.number.def(126),strokeWidth:g.number,strokeLinecap:g.string.def("round"),textInside:g.bool.def(!1),showText:g.bool.def(!0),color:g.string,bgColor:g.string,fixed:g.number.validate(e=>e>=0&&e<=20).def(0),format:g.func.def(e=>`${e}%`),titleStyle:g.object.def({fontSize:"16px",verticalAlign:"middle"})},setup(){return{}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var d;const{showText:e,format:t,percent:n,textInside:i,titleStyle:s,fixed:o}=this.$props,c=t((d=this.validPercent(n))==null?void 0:d.toFixed(o));return(e||this.$slots.default)&&i?this.$slots.default?this.$slots.default():a.createVNode("span",null,[c]):!e||i?null:a.createVNode("span",{class:"progress-text",style:typeof c=="string"?s:void 0},[this.$slots.default?this.$slots.default():c])}},render(){const e=this.renderProcessInfo(),t=Se(Z({},this.$props),{percent:this.validPercent(this.percent)});let n=a.createVNode(s5,t,dh(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(r5,t,dh(e)?e:{default:()=>[e]}));const i={class:ze({extCls:!!this.extCls},`bk-progress bk-progress-${this.type}`)};return a.createVNode("div",i,[n])}});const _r=Ge(l5),fh=Symbol("RadioGroup");function hh(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const gh=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,i=a.inject(fh,r0),s=!s0(i),o=a.ref(!1),c=a.computed(()=>s&&i.props.disabled?!0:t.disabled);s?a.watch(()=>i.props.modelValue,f=>{o.value=f===t.label},{immediate:!0}):a.watch(()=>t.modelValue,f=>{f!==""&&(o.value=f===t.label)},{immediate:!0});const d=(f=!0)=>{o.value=f},u=f=>{if(c.value)return;const m=f.target;o.value=m.checked;const p=o.value?t.label:"";n("update:modelValue",p),n("change",p),s&&i.handleChange(e.proxy),a.nextTick(()=>{m.checked!==o.value&&(m.checked=o.value)})};return a.onMounted(()=>{s&&i.register(e.proxy)}),a.onBeforeUnmount(()=>{s&&i.unregister(e.proxy)}),{isChecked:o,isDisabled:c,setChecked:d,handleChange:u}},o5={name:g.string.def(""),label:g.oneOfType([String,Number,Boolean]).isRequired,modelValue:g.oneOfType([String,Number,Boolean]).def(""),checked:g.bool.def(!1),disabled:g.bool.def(!1)};var c5=a.defineComponent({name:"Radio",props:o5,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=hh(),{isChecked:i,isDisabled:s,setChecked:o,handleChange:c}=gh();return{isFocused:e,isChecked:i,isDisabled:s,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=ze({"bk-radio":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("span",{class:"bk-radio-label"},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:"bk-radio-input",type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),t()])}});const u5={name:g.string.def(""),label:g.oneOfType([String,Number,Boolean]).isRequired,modelValue:g.oneOfType([String,Number,Boolean]).def(""),checked:g.bool.def(!1),disabled:g.bool.def(!1),size:g.size()};var d5=a.defineComponent({name:"RadioButton",props:u5,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=hh(),{isChecked:i,isDisabled:s,setChecked:o,handleChange:c}=gh();return{isFocused:e,isChecked:i,isDisabled:s,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=ze({"bk-radio-button":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked}),t=()=>!this.label&&!this.$slots.default?null:a.createVNode("div",{class:"bk-radio-button-label"},[this.$slots.default?this.$slots.default():this.label]);return a.createVNode("label",{class:e,tabindex:"0"},[a.createVNode("input",{class:"bk-radio-button-input",type:"radio",tabindex:"0",value:this.label,checked:this.isChecked,disabled:this.isDisabled,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange},null),t()])}});const f5={name:g.string.def(""),modelValue:g.oneOfType([String,Number,Boolean]),disabled:g.bool,withValidate:g.bool.def(!0)};var h5=a.defineComponent({name:"RadioGroup",props:f5,emits:["change","update:modelValue"],setup(e,t){const n=xn(),i=[],s=d=>{i.push(d)},o=d=>{const u=i.indexOf(d);u>-1&&i.splice(u,1)},c=d=>{const u=d.label;i.forEach(f=>{f!==d&&f.setChecked(!1)}),t.emit("update:modelValue",u),t.emit("change",u)};return a.provide(fh,{props:e,register:s,unregister:o,handleChange:c}),a.watch(()=>e.modelValue,()=>{var d;e.withValidate&&((d=n==null?void 0:n.validate)==null||d.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&i.forEach(d=>{d.setChecked(d.label===e.modelValue)})}),{}},render(){var e;return a.createVNode("div",{class:"bk-radio-group"},[(e=this.$slots)==null?void 0:e.default()])}});const mh=Gt(c5,{Group:h5,Button:d5});var ol=a.defineComponent({name:"Star",props:{rate:g.number.def(0),width:g.number.def(15),height:g.number.def(16),editable:g.bool.def(!0),hoverRate:g.number.def(0),max:g.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=d=>{if(!e.editable)return;const u=d+1;t("chooseRate",u)},i=d=>{if(!e.editable)return;const u=d+1;t("changeHover",u)},s=d=>ze({"bk-is-select":d<Math.floor(o.value),"bk-is-edit":e.editable,"bk-rate-star":!0}),o=a.computed(()=>e.hoverRate||e.rate),c={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:"bk-rate-stars"},[Array(e.max).fill(1).map((d,u)=>a.createVNode("svg",{class:s(u),style:c,x:"0px",y:"0px",viewBox:"0 0 64 64",onClick:()=>n(u),onMouseenter:()=>i(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)])])])])]))])}}),g5=a.defineComponent({name:"Rate",components:{star:ol},props:{modelValue:g.number.def(0),size:g.size(),editable:g.bool.def(!0),withValidate:g.bool.def(!0)},emits:["change","update:modelValue"],setup(e,{emit:t}){const n=xn(),i=a.ref(0),s=p=>{!e.editable||(t("update:modelValue",p),t("change",p))},o=p=>{i.value=p},c=ze({"bk-rate":!0}),u={small:{width:12,height:12},large:{width:18,height:18}}[e.size]||{width:15,height:16},f=a.computed(()=>{const p=Math.floor(e.modelValue),y=(u.width+3)*p,b=u.width*(e.modelValue-p);return{width:`${y+b}px`}}),m={width:u.width,height:u.height};return a.watch(()=>e.modelValue,()=>{var p;e.withValidate&&((p=n==null?void 0:n.validate)==null||p.call(n,"change"))}),()=>a.createVNode("p",{class:c},[e.editable?a.createVNode(ol,a.mergeProps({rate:e.modelValue,"hover-rate":i.value,onChooseRate:s,onChangeHover:o,onMouseleave:()=>o(0)},m),null):[a.createVNode(ol,a.mergeProps({rate:5,style:f.value,class:"bk-score-real",editable:!1},m),null),a.createVNode(ol,a.mergeProps({rate:0,editable:!1},m),null)]])}});const ph=Ge(g5);var m5=a.defineComponent({name:"Swiper",props:{isLoop:g.bool.def(!0),loopTime:g.number.def(8e3),pics:g.array.def([]),list:g.array.def([]),height:g.number,width:g.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:i,loopTime:s,pics:o,list:c,height:d,width:u}=a.toRefs(e),f=a.ref(),m=a.ref(0),p=a.ref(0),y=a.ref(0),b=a.ref(0);let v;const k=a.computed(()=>{var B;return((B=c.value)==null?void 0:B.length)>0?c.value:o.value}),T=a.computed(()=>({width:`${p.value*k.value.length}px`,transform:`translateX(-${p.value*m.value}px)`})),L=a.computed(()=>({width:`${p.value}px`,height:`${y.value}px`})),N=B=>{let ie=B;B>=k.value.length&&(ie=0),B<0&&(ie=k.value.length-1),m.value=ie,t("index-change",ie)},C=B=>{!B||window.open(B,"_blank")},I=B=>["bk-swiper-img",{"bk-swiper-link":B.link},B.class],M=B=>({"background-image":`url(${B.url})`,"background-color":B.color}),S=B=>({"bk-current-index":m.value===B}),z=()=>{i.value&&(b.value=window.setTimeout(()=>{N(m.value+1),z()},s.value))},j=()=>{window.clearTimeout(b.value)},O=()=>{var ie;const B=(ie=f.value)==null?void 0:ie.parentElement;!B||!window.ResizeObserver||(v=new ResizeObserver(()=>{G()}),v.observe(B))},W=()=>{var B;(B=v.disconnect)==null||B.call(v)},P=B=>{if(B===void 0)return{height:0,width:0};const ie=getComputedStyle(B),le=B.clientWidth-parseFloat(ie.paddingTop)-parseFloat(ie.paddingBottom);return{height:B.clientHeight-parseFloat(ie.paddingLeft)-parseFloat(ie.paddingRight),width:le}},G=()=>{var ie;const B=P((ie=f.value)==null?void 0:ie.parentElement);p.value=+u.value>0?u.value:B.width,y.value=+d.value>0?d.value:B.height};return a.watch([d,u],G),a.onMounted(()=>{G(),z(),O()}),a.onBeforeUnmount(()=>{j(),W()}),()=>a.createVNode("section",{class:"bk-swiper-home",ref:f,style:L.value},[a.createVNode("hgroup",{style:T.value,class:"bk-transition bk-swiper-main"},[k.value.map(B=>{var ie,le;return a.createVNode("h3",{class:"bk-swiper-card",style:L.value},[(le=(ie=n.default)==null?void 0:ie.call(n,B))!=null?le:a.createVNode("span",{class:I(B),style:M(B),onClick:()=>C(B.link)},null)])})]),a.createVNode("ul",{class:"bk-swiper-index"},[k.value.map((B,ie)=>a.createVNode("li",{class:S(ie),onMouseover:()=>N(ie)},null))]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-prev",onClick:()=>N(m.value-1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-next",onClick:()=>N(m.value+1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)])])}});const bh=Ge(m5),cl=Symbol("BkSelect"),yh=Symbol("BkOptionGroup");function Ch(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function Fc(e){return{register:(i,s)=>{if(!!s){if(e.value.has(i)){console.warn(`repeat ${i}`,s);return}return e.value.set(i,s)}},unregister:i=>{e.value.delete(i)}}}function p5(e,t=200){let n,i=e;return a.customRef((s,o)=>({get(){return s(),i},set(c){clearTimeout(n),c===void 0||c===""?(i=c,o()):n=setTimeout(()=>{i=c,o()},t)}}))}function b5(e,t){const{popoverMinWidth:n}=e;let i=null;const s=a.ref("auto"),o=a.ref(!1),c=()=>{o.value=!o.value},d=()=>{o.value=!1},u=()=>{o.value=!0},f=()=>{var m;s.value=Math.max((m=t.value)==null?void 0:m.offsetWidth,n)};return a.onMounted(()=>{!t.value||(i=Y4(t.value,f,60,!0),i.start())}),a.onBeforeUnmount(()=>{i==null||i.stop(),i=null}),{isPopoverShow:o,popperWidth:s,togglePopover:c,hidePopover:d,showPopover:u}}function y5(e,t){const n=p5(""),i=a.ref(!1);return a.watch(n,async()=>{try{i.value=!0,await e(n.value),i.value=!1}catch(s){console.error(s)}finally{t==null||t()}}),{searchKey:n,searchLoading:i}}function Fa(e=""){return e&&String(e).trim().toLowerCase()}var ul=a.defineComponent({name:"Option",props:{value:g.any,label:g.string.def(""),disabled:g.bool.def(!1)},setup(e){const{proxy:t}=a.getCurrentInstance(),n=a.reactive({visible:!0}),{disabled:i,value:s}=a.toRefs(e),o=a.inject(cl,null),c=a.inject(yh,null),d=a.computed(()=>{var b;return(b=o==null?void 0:o.selected)==null?void 0:b.some(v=>v.value===s.value)}),u=a.computed(()=>o==null?void 0:o.multiple),f=a.computed(()=>(o==null?void 0:o.activeOptionValue)===s.value),m=a.computed(()=>o==null?void 0:o.showSelectedIcon),p=()=>{i.value||o==null||o.handleOptionSelected(t)},y=()=>{o.activeOptionValue=s.value};return a.onBeforeMount(()=>{o==null||o.register(s.value,t),c==null||c.register(s.value,t)}),a.onBeforeUnmount(()=>{o==null||o.unregister(s.value),c==null||c.unregister(s.value)}),Se(Z({},a.toRefs(n)),{selected:d,multiple:u,isHover:f,showSelectedIcon:m,handleOptionClick:p,handleMouseEnter:y})},render(){var t,n,i;const e=ze({"is-selected":this.selected,"is-disabled":this.disabled,"is-multiple":this.multiple,"is-hover":this.isHover,"bk-select-option":!0});return a.withDirectives(a.createVNode("li",{class:e,onClick:this.handleOptionClick,onMouseenter:this.handleMouseEnter},[(i=(n=(t=this.$slots).default)==null?void 0:n.call(t))!=null?i:a.createVNode("span",{class:"bk-select-option-item",title:this.label},[this.label]),this.multiple&&this.selected&&this.showSelectedIcon&&a.createVNode(na,{class:"bk-select-selected-icon",width:22,height:22},null)]),[[a.vShow,this.visible]])}}),C5=a.defineComponent({name:"Group",props:{label:g.string.def(""),disabled:g.bool.def(!1),collapsible:g.bool.def(!1),collapse:g.bool.def(!1)},setup(e,{emit:t}){const n=a.getCurrentInstance(),{proxy:i}=n,s=a.inject(cl,null),o=a.reactive({groupCollapse:e.collapse,visible:!0}),c=a.ref(new Map),{register:d,unregister:u}=Fc(c),f=a.computed(()=>`${e.label} (${[...c.value.values()].filter(p=>p.visible).length})`),m=()=>{!e.collapsible||e.disabled||(o.groupCollapse=!o.groupCollapse,t("update:collapse",o.groupCollapse))};return a.provide(yh,a.reactive(Se(Z({},a.toRefs(e)),{register:d,unregister:u,groupCollapse:a.toRef(o,"groupCollapse")}))),a.onBeforeMount(()=>{s==null||s.registerGroup(n.uid,i)}),a.onBeforeUnmount(()=>{s==null||s.unregisterGroup(n.uid)}),Se(Z({},a.toRefs(o)),{groupLabel:f,handleToggleCollapse:m})},render(){var i,s;const e=ze({"bk-option-group":!0,collapsible:this.collapsible,disabled:this.disabled}),t=ze({"bk-option-group-label":!0,collapsible:this.collapsible}),n=ze({"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(Js,{class:n},null),a.createVNode("span",{class:"default-group-label-title"},[this.groupLabel])])]),a.withDirectives(a.createVNode("ul",{class:"bk-option-group-content"},[(s=(i=this.$slots).default)==null?void 0:s.call(i)]),[[a.vShow,!this.groupCollapse]])]),[[a.vShow,this.visible]])}});const v5={onContentScroll:Function},w5=Z({list:g.array.def([]),enabled:g.bool.def(!0),scrollEvent:g.bool.def(!1),lineHeight:g.oneOfType([g.number,g.func]).def(30),minHeight:g.number.def(30),height:g.oneOfType([g.string.def("100%"),g.number]).def("100%"),width:g.oneOfType([g.string.def("100%"),g.number]).def("100%"),className:g.oneOfType([g.arrayOf(g.string),g.object,g.arrayOf(g.object),g.string]).def(""),contentClassName:g.oneOfType([g.arrayOf(g.string),g.object,g.arrayOf(g.object),g.string]).def(""),contentStyle:g.object.def({}),scrollXName:g.string.def(je("F-scroll-x")),scrollYName:g.string.def(je("F-scroll-y")),groupItemCount:g.number.def(1),preloadItemCount:g.number.def(1),renderAs:g.string.def("div"),contentAs:g.string.def("div"),scrollOffsetTop:g.number.def(0),scrollPosition:g.string.def("content"),abosuteHeight:g.oneOfType([g.string.def("auto"),g.number]).def("auto"),throttleDelay:g.number.def(60)},v5);var M5=(e,t)=>{const{renderAs:n,contentAs:i}=e,s=(d,u,f,m,p,y,b)=>{t.emit("content-scroll",[d,{translateY:p,translateX:y,pos:b}])},o=a.resolveDirective("bkVirtualRender"),c={lineHeight:e.lineHeight,handleScrollCallback:s,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent};return{rendAsTag:()=>{var d,u,f,m,p,y,b,v,k,T,L,N;return a.h(n,{class:e.className},[(f=(u=(d=t.slots).beforeContent)==null?void 0:u.call(d))!=null?f:"",a.withDirectives(a.h(i,{class:e.contentClassName,style:e.contentStyle},[(y=(p=(m=t.slots).default)==null?void 0:p.call(m,{data:e.list}))!=null?y:""]),[[o,c]]),(k=(v=(b=t.slots).afterContent)==null?void 0:v.call(b))!=null?k:"",(N=(L=(T=t.slots).afterSection)==null?void 0:L.call(T))!=null?N:""])}}};function vh(e,t,n,i){let s=0,o=0,c=0,d=0;for(;s<e;s++){if(d=i(s,[s*n,(s+1)*n,"virtual"]),o+d>t){c=t-o;break}o+=d}return{startIndex:s,height:o,diffHeight:c}}function wh(e,t,n,i,s){if(!i)return;const o=i.scrollTop,c=i.scrollLeft,{scrollTop:d,count:u,groupItemCount:f,startIndex:m,endIndex:p}=n,{offsetHeight:y}=i;let b=0,v=0,k=0;if(typeof e=="number"&&(b=Math.floor(o/e),v=Math.ceil(y/e)+b,k=o%e),typeof e=="function"){const T=vh(u,o,f,e);b=T.startIndex>0?T.startIndex:0,k=T.diffHeight,v=vh(u,y,f,e).startIndex+b+1}if(o!==d||b!==m||v!==p){const T=i.scrollHeight-i.offsetHeight-i.scrollTop;typeof t=="function"&&t(s,b,v,o,k,c,{bottom:T>=0?T:0})}}function I5(e,t,n){const{lineHeight:i=30,handleScrollCallback:s,pagination:o={},onlyScroll:c}=n.value;if(c){const y=t.scrollTop,b=t.scrollLeft,v=t.scrollHeight-t.offsetHeight-t.scrollTop;s(e,null,null,y,y,b,{bottom:v>=0?v:0});return}const{startIndex:d,endIndex:u,groupItemCount:f,count:m,scrollTop:p}=o;wh(i,s,{scrollTop:p,startIndex:d,endIndex:u,groupItemCount:f,count:m},t,e)}const Mh=(e=60)=>ot.exports.throttle((t,n,i)=>I5(t,n,i),e),N5=(e,t,n,i=60)=>{Reflect.apply(Mh(i),globalThis,[e,t,n])};var L5={mounted(e,t){const n=e.parentNode,{throttleDelay:i}=t.value;n.addEventListener("scroll",s=>{N5(s,n,t,i)})},unbind(e){if(e){const t=e.parentNode;if(!t)return;t.removeEventListener("scroll",Mh)}}},k5=a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:L5},props:w5,emits:["content-scroll"],setup(e,t){const{renderAs:n,contentAs:i}=e,s=z=>typeof z=="string"?[z]:typeof z=="object"&&!Array.isArray(z)?[z]:z;if(!e.enabled){const{rendAsTag:z}=M5(e,t);return z}const o=a.ref(null),c=a.reactive({startIndex:0,endIndex:0,scrollTop:1,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),d=(z,j,O,W,P,G,B)=>{c.startIndex=j,c.endIndex=O,c.scrollTop=W,c.translateY=P,c.translateX=G,c.pos=B,t.emit("content-scroll",[z,c])};a.onMounted(()=>{a.nextTick(()=>{p(e.list),y()})}),a.watch(()=>e.list,()=>{u(),y()},{deep:!0}),a.watch(()=>e.lineHeight,()=>{u(),y()});const u=()=>{p(e.list)},f=a.ref(0),m=a.ref(0),p=z=>{if(f.value=Math.ceil((z||[]).length/e.groupItemCount),c.count=f.value,c.startIndex=0,c.endIndex=0,c.translateY=0,c.scrollTop=0,typeof e.abosuteHeight=="string"&&e.abosuteHeight==="auto")if(typeof e.lineHeight=="function"){m.value=0;let O=0;for(let W=0;W<f.value;W++){const P=e.lineHeight.call(this,W,z.slice(W*e.groupItemCount,e.groupItemCount));O+=typeof P=="number"?P:0}m.value=O}else m.value=e.lineHeight*f.value;else m.value=e.abosuteHeight},y=(z=!0)=>{var O;const j=(O=o.value)==null?void 0:O.parentNode;wh(e.lineHeight,d,c,j,null),z&&o.value&&o.value.scrollTo(0,0)},b=a.computed(()=>(e.list||[]).map((z,j)=>Se(Z({},z),{$index:j}))),v=a.computed(()=>b.value.slice(c.startIndex*e.groupItemCount,(c.endIndex+e.preloadItemCount)*e.groupItemCount)),k=a.computed(()=>e.scrollPosition==="content"?{top:`${c.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${c.translateY}px)`}:{}),T=a.computed(()=>Z({height:typeof e.height=="number"?`${e.height}px`:e.height,width:typeof e.width=="number"?`${e.width}px`:e.width,display:"inline-block"},e.scrollPosition==="container"?k.value:{})),L=a.computed(()=>{const z=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${m.value<e.minHeight?e.minHeight:m.value}px`,display:z?"none":"block"}}),N=a.computed(()=>[je("virtual-render"),e.scrollXName,e.scrollYName,...s(e.className),e.scrollPosition==="container"?je("virtual-content"):""]),C=a.computed(()=>[e.scrollPosition==="content"?je("virtual-content"):"",...s(e.contentClassName)]),I=a.resolveDirective("bkVirtualRender"),M={lineHeight:e.lineHeight,handleScrollCallback:d,pagination:c,throttleDelay:e.throttleDelay},S=()=>{u(),y()};return t.expose({reset:S}),()=>{var z,j,O,W,P,G,B,ie,le,ve,Ie,ge;return a.h(n||"div",{ref:o,class:N.value,style:T.value},[(O=(j=(z=t.slots).beforeContent)==null?void 0:j.call(z))!=null?O:"",a.withDirectives(a.h(i||"div",{class:C.value,style:Z(Z({},k.value),e.contentStyle)},[(G=(P=(W=t.slots).default)==null?void 0:P.call(W,{data:v.value}))!=null?G:""]),[[I,M]]),(le=(ie=(B=t.slots).afterContent)==null?void 0:ie.call(B))!=null?le:"",a.h("div",{class:[je("virtual-section")],style:L.value}),(ge=(Ie=(ve=t.slots).afterSection)==null?void 0:Ie.call(ve))!=null?ge:""])}}});const Wr=Ge(k5);var Gc;(function(e){e.UNKNOWN="",e.FILLED="filled",e.STROKE="stroke"})(Gc||(Gc={}));var T5=a.defineComponent({name:"Tag",props:{theme:Ps(),closable:g.bool.def(!1),type:Pe("tagStorkeType",{}).def(Gc.UNKNOWN),checkable:g.bool.def(!1),checked:g.bool.def(!1),radius:g.string.def("2px"),extCls:g.string.def("")},emits:["change","close"],slots:["icon"],setup(e,{emit:t}){const n=a.computed(()=>ze({"bk-tag-closable":e.closable,"bk-tag-checkable":e.checkable,"bk-tag-check":e.checked,[`bk-tag-${e.type}`]:e.type,[`bk-tag-${e.theme}`]:e.theme,[e.extCls]:!!e.extCls},"bk-tag")),i=a.computed(()=>({borderRadius:e.radius}));return{wrapperCls:n,wrapperStyle:i,handleClose:c=>{c.preventDefault(),c.stopPropagation(),t("close",c)},handleClick:c=>{c.preventDefault(),c.stopPropagation(),e.checkable&&t("change",!e.checked)}}},render(){var e,t;return a.createVNode("div",{class:this.wrapperCls,style:this.wrapperStyle,onClick:this.handleClick},[this.$slots.icon?a.createVNode("span",{class:"bk-tag-icon"},[this.$slots.icon()]):"",a.createVNode("span",{class:"bk-tag-text"},[(t=(e=this.$slots).default)==null?void 0:t.call(e)]),this.closable?a.createVNode(Hn,{class:"bk-tag-close",onClick:this.handleClose},null):""])}});const dl=Ge(T5);var S5=a.defineComponent({name:"SelectTagInput",props:{selected:{type:Array,default:()=>[]},tagTheme:Ps(),placeholder:g.string.def(""),filterable:g.bool.def(!1),allowCreate:g.bool.def(!1),disabled:g.bool.def(!1),modelValue:g.any,collapseTags:g.bool.def(!1)},emits:["update:modelValue","remove","enter"],setup(e,{emit:t}){const{proxy:n}=a.getCurrentInstance(),i=a.inject(cl,null),{modelValue:s,collapseTags:o,selected:c}=a.toRefs(e),d=a.ref(s.value),u=a.ref(),f=a.ref(null);a.watch(s,()=>{d.value=s.value}),a.watch([c,o],()=>{k()},{flush:"post"});const m=T=>{t("remove",T)},p=()=>{var T;(T=u.value)==null||T.focus()},y=T=>{t("update:modelValue",T.target.value)},b=T=>{switch(T.code){case"Enter":{t("enter",T.target.value,T);break}}},v=T=>{const L=[...n.$el.querySelectorAll(".bk-tag")];return typeof T=="number"?L[T]:L},k=()=>{!o.value||(f.value=null,setTimeout(()=>{const T=v(),L=T.findIndex((N,C)=>C?T[C-1].offsetTop!==N.offsetTop:!1);f.value=L>0?L:null}))};return{select:i,overflowTagIndex:f,value:d,inputRef:u,handleRemoveTag:m,focus:p,handleInput:y,handleKeydown:b}},render(){var i,s,o,c,d,u,f;const e=ze({"bk-select-tag":!0,"bk-select-tag--default":!0,"is-disabled":this.disabled,"collapse-tag":this.collapseTags}),t=ze({"bk-select-tag-wrapper":!0}),n={display:this.selected.length&&!this.filterable?"none":""};return a.createVNode("div",{class:e},[(s=(i=this.$slots)==null?void 0:i.prefix)==null?void 0:s.call(i),a.createVNode("span",{class:t},[(d=(c=(o=this.$slots).default)==null?void 0:c.call(o))!=null?d:this.selected.map((m,p)=>a.createVNode(dl,{closable:!0,theme:this.tagTheme,style:{display:this.collapseTags&&this.overflowTagIndex&&p>=this.overflowTagIndex?"none":""},onClose:()=>this.handleRemoveTag(m.value)},{default:()=>{var y;return[(y=this.select)==null?void 0:y.handleGetLabelByValue(m.value)]}})),!!this.overflowTagIndex&&this.collapseTags&&a.createVNode(dl,{class:"bk-select-overflow-tag"},{default:()=>[a.createTextVNode("+"),this.selected.length-this.overflowTagIndex]})]),a.createVNode("input",{class:"bk-select-tag-input",ref:"inputRef",type:"text",style:n,placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,disabled:this.disabled,value:this.filterable?this.value:"",onInput:this.handleInput,onKeydown:this.handleKeydown},null),(f=(u=this.$slots)==null?void 0:u.suffix)==null?void 0:f.call(u)])}}),x5=a.defineComponent({name:"Select",directives:{clickoutside:jn},props:{modelValue:g.any,multiple:g.bool.def(!1),disabled:g.bool.def(!1),size:g.size().def(Zo.DEFAULT),clearable:g.bool.def(!0),loading:g.bool.def(!1),filterable:g.bool.def(!1),remoteMethod:g.func,scrollHeight:g.number.def(200),showSelectAll:g.bool.def(!1),popoverMinWidth:g.number.def(0),showOnInit:g.bool.def(!1),multipleMode:g.oneOf(["default","tag"]).def("default"),tagTheme:Ps(),behavior:n0(),collapseTags:g.bool.def(!1),autoHeight:g.bool.def(!0),noDataText:g.string.def("\u65E0\u6570\u636E"),noMatchText:g.string.def("\u65E0\u5339\u914D\u6570\u636E"),loadingText:g.string.def("\u52A0\u8F7D\u4E2D..."),placeholder:g.string.def("\u8BF7\u9009\u62E9"),searchPlaceholder:g.string.def("\u8BF7\u8F93\u5165\u5173\u952E\u5B57"),selectAllText:g.string.def("\u5168\u90E8"),scrollLoading:g.bool.def(!1),allowCreate:g.bool.def(!1),popoverOptions:g.object.def({}),customContent:g.bool.def(!1),list:g.array.def([]),idKey:g.string.def("value"),displayKey:g.string.def("label"),withValidate:g.bool.def(!0),showSelectedIcon:g.bool.def(!0),inputSearch:g.bool.def(!0),enableVirtualRender:g.bool.def(!1),allowEmptyValues:g.array.def([]),autoFocus:g.bool.def(!1)},emits:["update:modelValue","change","toggle","clear","scroll-end","focus","blur"],setup(e,{emit:t}){const{modelValue:n,disabled:i,filterable:s,multiple:o,remoteMethod:c,loading:d,loadingText:u,noDataText:f,noMatchText:m,popoverMinWidth:p,showOnInit:y,multipleMode:b,allowCreate:v,customContent:k,showSelectedIcon:T,inputSearch:L,enableVirtualRender:N,showSelectAll:C,scrollHeight:I,list:M,displayKey:S,collapseTags:z,autoHeight:j,popoverOptions:O,allowEmptyValues:W,autoFocus:P}=a.toRefs(e),G=xn(),B=a.ref(),ie=a.ref(),le=a.ref(),ve=a.ref(),Ie=a.ref(),ge=a.ref(),he=a.ref(),K=a.ref(new Map),$=a.computed(()=>[...K.value.values()]),V=a.ref(new Map),J=a.ref([]),re=a.computed(()=>J.value.reduce((Le,Ae)=>(Le[Ae.value]=Ae.label,Le),{})),U=a.ref();a.watch(n,()=>{var Le;Ql(),e.withValidate&&((Le=G==null?void 0:G.validate)==null||Le.call(G,"blur"))},{deep:!0}),a.watch(J,()=>{var Le;(Le=he.value)==null||Le.updatePopover(null,te.value)});const q=a.computed(()=>D.value?M.value:M.value.filter(Le=>{var Ae;return(Ae=Fa(String(Le[S.value])))==null?void 0:Ae.includes(Fa(mi.value))})),ce=a.computed(()=>i.value||d.value),we=a.computed(()=>J.value.map(Le=>{var Ae,_e;return((_e=(Ae=K.value)==null?void 0:Ae.get(Le.value))==null?void 0:_e.label)||Le.label})),X=a.computed(()=>{const Le=$.value.reduce((Ae,_e)=>(_e.disabled||Ae.push(_e.value),Ae),[]);return Le.length<=J.value.length&&Le.every(Ae=>J.value.some(_e=>_e.value===Ae))}),H=a.computed(()=>!!V.value.size),Q=a.computed(()=>!$.value.length),ae=a.computed(()=>$.value.length&&$.value.every(Le=>!Le.visible)),D=a.computed(()=>s.value&&typeof c.value=="function"),_=a.computed(()=>!(rs.value||Q.value||ae.value)||k.value),R=a.computed(()=>o.value&&C.value&&(!mi.value||!s.value)),de=a.computed(()=>I.value-12-(R.value?32:0)),ue=a.computed(()=>rs.value?u.value:Q.value?f.value:ae.value?m.value:""),me=a.computed(()=>j.value?z.value&&!ct.value:z.value),te=a.computed(()=>ot.exports.merge({theme:"light bk-select-popover",trigger:"manual",width:ft.value,arrow:!1,placement:"bottom-start",isShow:ct.value,reference:Ie.value,offset:6,popoverDelay:0},O.value)),{register:se,unregister:be}=Fc(K),{register:ke,unregister:Oe}=Fc(V),{isHover:Ve,setHover:et,cancelHover:rn}=Ch(),tt=a.ref(!1),rt=()=>{tt.value||(tt.value=!0,t("focus"))},Cn=()=>{!tt.value||(tt.value=!1,t("blur"))},{popperWidth:ft,isPopoverShow:ct,hidePopover:Fe,showPopover:zt,togglePopover:ma}=b5({popoverMinWidth:p.value},ie);a.watch(ct,()=>{t("toggle",ct.value)});const is=a.computed(()=>(s.value&&L.value||v.value)&&ct.value);a.watch(ct,Le=>{Le?setTimeout(()=>{pa(),er()},0):mi.value=""});const er=()=>{var _e;const Le=J.value[0],Ae=K.value.get(Le==null?void 0:Le.value);Ae&&!Ae.disabled&&Ae.visible?U.value=Le==null?void 0:Le.value:U.value=(_e=$.value.find(Xn=>!Xn.disabled&&Xn.visible))==null?void 0:_e.value},as=Le=>{!s.value||$.value.forEach(Ae=>{var _e;Ae.visible=(_e=Fa(String(Ae.label)))==null?void 0:_e.includes(Fa(Le))})},{searchKey:mi,searchLoading:rs}=y5(D.value?c.value:as,er),Kn=Le=>{Le!==n.value&&(t("update:modelValue",Le,n.value),t("change",Le,n.value))},Vl=()=>{ce.value||(rt(),ma())},Jl=Le=>{!s.value||(mi.value=Le)},Fu=(Le,Ae)=>{const _e=String(Le);!v.value||!_e||s.value&&$.value.find(Hi=>Fa(String(Hi.label))===Fa(_e))||K.value.get(_e)||(Ae.stopPropagation(),o.value?(J.value.push({value:_e,label:_e}),Kn(J.value.map(Hi=>Hi.value))):(J.value=[{value:_e,label:_e}],Kn(_e),Fe()),mi.value="")},ss=Le=>{if(!(ce.value||!Le)){if(o.value){const Ae=J.value.findIndex(_e=>_e.value===Le.value);Ae>-1?J.value.splice(Ae,1):J.value.push({value:Le.value,label:Le.label||Le.value}),Kn(J.value.map(_e=>_e.value))}else J.value=[{label:Le.label||Le.value,value:Le.value}],Kn(Le.value),Fe();pa()}},pa=()=>{setTimeout(()=>{var Le,Ae,_e;!L.value&&!v.value?(Le=ve.value)==null||Le.focus():b.value==="tag"?(Ae=Ie.value)==null||Ae.focus():(_e=B.value)==null||_e.focus()},0)},Gu=Le=>{Le.stopPropagation(),J.value=[],Kn(o.value?[]:""),t("clear",o.value?[]:""),Fe()},Rl=()=>{U.value=""},Zu=()=>{X.value?J.value=[]:$.value.forEach(Le=>{Le.disabled||J.value.find(Ae=>Ae.value===Le.value)||J.value.push({value:Le.value,label:Le.label||Le.value})}),Kn(J.value.map(Le=>Le.value)),pa()},Yu=Le=>{const{scrollTop:Ae,clientHeight:_e,scrollHeight:Xn}=Le.target;Ae+_e===Xn&&t("scroll-end")},Uu=Le=>{if(ce.value)return;const Ae=J.value.findIndex(_e=>_e.value===Le);Ae>-1&&(J.value.splice(Ae,1),Kn(J.value.map(_e=>_e.value)))},ba=Le=>{var Ae,_e;return((_e=(Ae=K.value)==null?void 0:Ae.get(Le))==null?void 0:_e.label)||re.value[Le]||Le},Ql=()=>{Array.isArray(n.value)?J.value=[...n.value.map(Le=>({value:Le,label:ba(Le)}))]:!!n.value||W.value.includes(n.value)?J.value=[{value:n.value,label:ba(n.value)}]:J.value=[]},ya=Le=>{var Xn,Hi,_l,ls;if(!((Xn=ie.value)!=null&&Xn.contains(Le.target))&&!((Hi=le.value)!=null&&Hi.contains(Le.target))&&!k.value)return;const Ae=$.value.filter(Xt=>!Xt.disabled&&Xt.visible),_e=Ae.findIndex(Xt=>Xt.value===U.value);if(!(!Ae.length||_e===-1))switch(Le.code){case"ArrowDown":{Le.preventDefault();const Xt=_e>=Ae.length-1?0:_e+1;U.value=(_l=Ae[Xt])==null?void 0:_l.value;break}case"ArrowUp":{Le.preventDefault();const Xt=_e===0?Ae.length-1:_e-1;U.value=(ls=Ae[Xt])==null?void 0:ls.value;break}case"Backspace":{if(!o.value||!J.value.length||mi.value.length||Le.target===ve.value)return;J.value.pop(),Kn(J.value.map(Xt=>Xt.value));break}case"Enter":{if(!ct.value)ct.value=!0;else{const Xt=K.value.get(U.value);ss(Xt)}break}}},$u=({event:Le})=>{var _e;const{target:Ae}=Le;((_e=ie.value)==null?void 0:_e.contains(Ae))||ie.value===Ae||(Fe(),Cn())},Ku=()=>{setTimeout(()=>{var Le,Ae;N.value&&((Ae=(Le=ge.value)==null?void 0:Le.reset)==null||Ae.call(Le))})};return a.provide(cl,a.reactive({multiple:o,selected:J,activeOptionValue:U,showSelectedIcon:T,register:se,unregister:be,registerGroup:ke,unregisterGroup:Oe,handleOptionSelected:ss,handleGetLabelByValue:ba})),a.onMounted(()=>{Ql(),setTimeout(()=>{y.value&&zt(),P.value&&pa()}),C2(document,"keydown",ya)}),a.onBeforeMount(()=>{v2(document,"keydown",ya)}),{selected:J,isInput:is,options:$,isDisabled:ce,selectedLabel:we,isPopoverShow:ct,isHover:Ve,popperWidth:ft,inputRef:B,triggerRef:ie,contentRef:le,searchRef:ve,selectTagInputRef:Ie,virtualRenderRef:ge,popoverRef:he,searchLoading:rs,isOptionsEmpty:Q,isSearchEmpty:ae,isFocus:tt,isShowSelectContent:_,curContentText:ue,isGroup:H,searchKey:mi,isShowSelectAll:R,virtualHeight:de,filterList:q,isCollapseTags:me,popoverConfig:te,focusInput:pa,setHover:et,cancelHover:rn,handleFocus:rt,handleBlur:Cn,handleTogglePopover:Vl,handleClear:Gu,hidePopover:Fe,showPopover:zt,handleToggleAll:Zu,handleOptionSelected:ss,handleClickOutside:$u,handleScroll:Yu,handleDeleteTag:Uu,handleInputChange:Jl,handleInputEnter:Fu,handleKeydown:ya,handleSelectedAllOptionMouseEnter:Rl,handlePopoverShow:Ku}},render(){const e=ze({"bk-select":!0,"popover-show":this.isPopoverShow,"is-disabled":this.isDisabled,"is-focus":this.isFocus,"is-filterable":this.filterable,[this.size]:!0,[this.behavior]:!0}),t=()=>this.loading?a.createVNode(xi,{loading:!0,theme:"primary",class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length&&!this.isDisabled?a.createVNode(Zt,{class:"clear-icon",onClick:this.handleClear},null):a.createVNode(_a,{class:"angle-up"},null),n=()=>this.multipleMode==="tag"?a.createVNode(S5,{ref:"selectTagInputRef",modelValue:this.searchKey,"onUpdate:modelValue":o=>this.searchKey=o,selected:this.selected,tagTheme:this.tagTheme,placeholder:this.placeholder,filterable:this.isInput,disabled:this.isDisabled,onRemove:this.handleDeleteTag,collapseTags:this.isCollapseTags,onEnter:this.handleInputEnter},{prefix:()=>{var o,c;return(c=(o=this.$slots).prefix)==null?void 0:c.call(o)},default:this.$slots.tag&&(()=>this.$slots.tag({selected:this.selected})),suffix:()=>t()}):a.createVNode(ia,{ref:"inputRef",type:"text",modelValue:this.isInput?this.searchKey:this.selectedLabel.join(","),placeholder:this.isInput?this.selectedLabel.join(",")||this.placeholder:this.placeholder,readonly:!this.isInput,selectReadonly:!0,disabled:this.isDisabled,behavior:this.behavior,size:this.size,withValidate:!1,onInput:this.handleInputChange,onEnter:this.handleInputEnter},{prefix:()=>{var o,c;return(c=(o=this.$slots).prefix)==null?void 0:c.call(o)},suffix:()=>t()}),i=()=>a.createVNode("div",{class:"bk-select-trigger",style:{height:this.autoHeight&&this.collapseTags?"32px":""},ref:"triggerRef",onClick:this.handleTogglePopover,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[n()]),s=()=>{var o,c;return a.createVNode("div",{class:"bk-select-content-wrapper",ref:"contentRef"},[this.filterable&&!this.inputSearch&&a.createVNode("div",{class:"bk-select-search-wrapper"},[a.createVNode(Wa,{class:"icon-search",width:16,height:16},null),a.withDirectives(a.createVNode("input",{ref:"searchRef",class:"bk-select-search-input",placeholder:this.searchPlaceholder,"onUpdate:modelValue":d=>this.searchKey=d},null),[[a.vModelText,this.searchKey]])]),!this.isShowSelectContent&&a.createVNode("div",{class:"bk-select-empty"},[this.searchLoading&&a.createVNode(xi,{class:"mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),a.createVNode("span",null,[this.curContentText])]),a.createVNode("div",{class:"bk-select-content"},[a.createVNode("div",{class:"bk-select-dropdown",style:{maxHeight:`${this.scrollHeight}px`},onScroll:this.handleScroll},[a.withDirectives(a.createVNode("ul",{class:"bk-select-options"},[this.isShowSelectAll&&a.createVNode("li",{class:"bk-select-option",onMouseenter:this.handleSelectedAllOptionMouseEnter,onClick:this.handleToggleAll},[this.selectAllText]),this.enableVirtualRender?a.createVNode(Wr,{list:this.filterList,height:this.virtualHeight,lineHeight:32,ref:"virtualRenderRef"},{default:({data:d})=>d.map(u=>a.createVNode(ul,{key:u[this.idKey],value:u[this.idKey],label:u[this.displayKey]},null))}):this.filterList.map(d=>a.createVNode(ul,{value:d[this.idKey],label:d[this.displayKey]},null)),(c=(o=this.$slots).default)==null?void 0:c.call(o),this.scrollLoading&&a.createVNode("li",{class:"bk-select-options-loading"},[a.createVNode(xi,{class:"spinner mr5",theme:"primary",loading:!0,mode:"spin",size:"mini"},null),a.createVNode("span",null,[this.loadingText])])]),[[a.vShow,this.isShowSelectContent]])]),this.$slots.extension&&a.createVNode("div",{class:"bk-select-extension"},[this.$slots.extension()])])])};return a.createVNode("div",{class:e},[a.createVNode(mn,a.mergeProps(this.popoverConfig,{onClickoutside:this.handleClickOutside,onAfterShow:this.handlePopoverShow,ref:"popoverRef"}),{default:()=>i(),content:()=>s()})])}});const Zc=Gt(x5,{Option:ul,Group:C5});function D5(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const{propsMixin:j5}=aa,Yc=Object.assign({},j5);Yc.width.default="400",Yc.height.default="100%";var z5=a.defineComponent({name:"Sideslider",components:{BkModal:aa,BkButton:Pt},props:Se(Z({},Yc),{direction:{type:String,default:"right",validator:e=>{const t=["left","right"];return t.indexOf(e)<0?(console.error(`direction property is not valid: '${e}',\u3010${t.join(" | ")}\u3011`),!1):!0}}}),emits:["closed","update:isShow","shown","hidden","animation-end"],setup(e,{slots:t,emit:n}){const i=async()=>{let c=!0;typeof e.beforeClose=="function"&&(c=await e.beforeClose()),c&&(n("update:isShow",!1),n("closed"),setTimeout(()=>{n("animation-end")},250))},s=()=>{setTimeout(()=>{n("shown")},200)},o=()=>{setTimeout(()=>{n("hidden")},200)};return()=>{const c={header:()=>{var f,m;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"bk-sideslider-header"},[a.createVNode("div",{class:`bk-sideslider-close ${e.direction}`,onClick:()=>{i()}},null),a.createVNode("div",{class:`bk-sideslider-title ${e.direction}`},[(m=(f=t.header)==null?void 0:f.call(t))!=null?m:e.title])])])},default:()=>{var f,m;return(m=(f=t.default)==null?void 0:f.call(t))!=null?m:"Content"},footer:()=>t.footer?a.createVNode("div",{class:"bk-sideslider-footer"},[t.footer()]):null},d=`bk-sideslider-wrapper ${e.scrollable?"scroll-able":""} ${e.extCls}`,u=t.footer?"calc(100vh - 106px)":"calc(100vh - 52px)";return a.createVNode(aa,a.mergeProps(e,{maxHeight:u,class:d,style:`${e.direction}: 0;`,onHidden:o,onShown:s,onClose:i}),D5(c)?c:{default:()=>[c]})}}});const Ih=Ge(z5);var Uc;(function(e){e.UNKNOWN="",e.ERROR="error",e.LOADING="loading"})(Uc||(Uc={}));const Nh={theme:g.theme().def(Os.PRIMARY),size:g.size(),curStep:g.number.def(1),controllable:g.bool.def(!1),direction:qf(),status:Pe("status",{}).def(Uc.UNKNOWN),lineType:e0(),text:g.bool,extCls:g.string,steps:g.array.def([]),beforeChange:g.func};var O5=a.defineComponent({name:"Steps",props:Nh,emits:["update:curStep","click"],setup(e,{emit:t}){const n=a.ref([]),i=d=>{const u=[];d.forEach(f=>{var m;typeof f=="string"?u.push(f):u.push({title:f.title,icon:f.icon,description:f.description,status:f.status,border:(m=f.border)!=null?m:!0})}),n.value.splice(0,n.value.length,...u)},s=d=>{Nh.curStep=d},o=()=>{var d;n.value.splice(0,n.value.length,{title:"\u6B65\u9AA41",icon:1},{title:"\u6B65\u9AA42",icon:2},{title:"\u6B65\u9AA43",icon:3}),(d=e.steps)!=null&&d.length&&i(e.steps)},c=async d=>{try{e.controllable&&d!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(u,f)=>{const m=await e.beforeChange(d);m?u(m):f(m)}),t("update:curStep",d),t("click",d))}catch(u){console.warn(u)}};return a.onMounted(o),a.watch(()=>e.steps,()=>{i(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{s(e.curStep)},{deep:!0}),{defaultSteps:n,jumpTo:c}},render(){const e="bk-steps",t=this.theme?`${e}-${this.theme}`:"",n=this.size?`${e}-${this.size}`:"",i=ze({[`${this.extCls}`]:!!this.extCls,[`bk-steps-${this.direction}`]:this.direction,[`bk-steps-${this.lineType}`]:this.lineType},`${t} ${e} ${n}`),s=p=>this.curStep>p+1||this.defaultSteps[p].status==="done",o=p=>this.curStep===p+1,c=p=>{const{icon:y}=p;return y?Object.prototype.toString.call(y)==="[object Object]":typeof p=="string"},d=(p,y)=>(y.icon||(y.icon=p),!isNaN(y.icon)),u=p=>p.status==="loading",f=p=>p.status==="error",m=(p,y)=>o(p)&&this.status==="loading"||u(y)?a.createVNode(Rs,{class:"bk-icon bk-steps-icon icon-loading"},null):o(p)&&this.status==="error"||f(y)?a.createVNode(Hn,{class:"bk-steps-icon"},null):s(p)?a.createVNode(na,{class:"bk-steps-icon"},null):a.createVNode("span",null,[d(p,y)?p+1:a.createVNode(y.icon,null,null)]);return a.createVNode("div",{class:i},[this.defaultSteps.map((p,y)=>{var b,v,k;return a.createVNode("div",{class:["bk-step",p.title?"":"bk-step-no-content",s(y)?"done":"",o(y)?"current":"",o(y)&&this.status==="error"?"isError":"",p.status&&o(y)?[`bk-step-${p.status}`]:""]},[a.createVNode("span",{class:["bk-step-indicator",`bk-step-${c(p)?"icon":"number"}`,`bk-step-icon${p.status}`],style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(y+1)}},[(k=(v=(b=this.$slots)[y+1])==null?void 0:v.call(b))!=null?k:m(y,p)]),p.title?a.createVNode("div",{class:"bk-step-content"},[a.createVNode("div",{class:"bk-step-title",style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(y+1)}},[p.title]),p.description&&a.createVNode("div",{class:"bk-step-description",title:p.description},[p.description])]):""])})])}});const Lh=Ge(O5);var A5=a.defineComponent({name:"Switcher",props:{theme:g.theme(),size:g.size(),disabled:g.bool,showText:g.bool,isOutline:g.bool,onText:g.string.def("ON"),offText:g.string.def("OFF"),isSquare:g.bool,extCls:g.string,beforeChange:g.func.def(void 0),trueValue:g.oneOfType([g.string,g.number,g.bool]).def(!0),falseValue:g.oneOfType([g.string,g.number,g.bool]).def(!1),value:g.oneOfType([g.string,g.number,g.bool]).def(!1),modelValue:g.oneOfType([g.string,g.number,g.bool]).def(!1),withValidate:g.bool.def(!0)},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=xn(),i=a.ref(!1),s=a.computed(()=>e.trueValue===c.value),o=a.ref(e.modelValue!==!1),c=a.computed(()=>o.value?e.modelValue:e.value),d=a.computed(()=>{const m={[e.extCls]:!!e.extCls,"bk-switcher":!0,"bk-switcher-outline":e.isOutline,"bk-switcher-square":e.isSquare,"show-label":e.showText,"is-disabled":e.disabled,"is-checked":s.value,"is-unchecked":!s.value,"is-loading":i.value,"bk-primary":e.theme==="primary"};if(e.size&&!e.showText){const p=`bk-switcher-${e.size}`;m[p]=!0}return m});a.watch(()=>e.modelValue,()=>{var m;o.value=!0,e.withValidate&&((m=n==null?void 0:n.validate)==null||m.call(n,"change"))}),a.watch(()=>e.value,()=>{o.value=!1});const u=m=>{if(m.stopPropagation(),m.preventDefault(),e.disabled||i.value)return;const p=s.value?e.falseValue:e.trueValue,y=!s.value,b=()=>{t("update:modelValue",p),t("change",y)};let v=!0;if(typeof e.beforeChange=="function"&&(v=e.beforeChange(p),typeof v.then=="function"))return i.value=!0,v.then(()=>{b()}).finally(()=>{i.value=!1});v&&b()},f=m=>{(m.code==="Enter"||m.key==="Enter"||m.keyCode===13)&&u(m)};return()=>a.createVNode("div",{class:d.value,onClick:u,tabindex:"0",onKeydown:f},[i.value?a.createVNode(dc,{class:"bk-switcher-loading"},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[s.value?e.onText:e.offText]):""])}});const kh=Ge(A5);var fl=(e=>(e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e.HORIZONTAL="horizontal",e))(fl||{}),Th=(e=>(e.HIGHLIGHT="highlight",e.AUTO="auto",e))(Th||{});const P5=["auto","highlight"],E5=["none","row","col","outer","horizontal"];var pn=(e=>(e.ON_SORT_BY_CLICK="onSortByClick",e.ON_FILTER_CLICK="onFilterClick",e.ON_SETTING_CHANGE="onSettingChange",e.ON_ROW_EXPAND_CLICK="onRowExpandClick",e.ON_ROW_CHECK="onRowCheck",e))(pn||{}),Et=(e=>(e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.COLUMN_FILTER="columnFilter",e.COLUMN_FILTER_SAVE="colFilterSave",e.ROW_CLICK="rowClick",e.ROW_DBL_CLICK="rowDblclick",e.ROW_EXPAND_CLICK="rowExpand",e.PAGE_LIMIT_CHANGE="pageLimitChange",e.PAGE_VALUE_CHANGE="pageValueChange",e.SETTING_CHANGE="settingChange",e.SCROLL_BOTTOM="scrollBottom",e.ROW_SELECT="select",e.ROW_SELECT_ALL="selectAll",e.ROW_SELECT_CHANGE="selectionChange",e))(Et||{});const Ut=(...e)=>!0,V5={columnPick:Ut,columnFilter:Ut,columnSort:Ut,colFilterSave:Ut,rowClick:Ut,rowDblclick:Ut,rowExpand:Ut,select:Ut,selectAll:Ut,selectionChange:Ut,pageLimitChange:Ut,pageValueChange:Ut,settingChange:Ut,scrollBottom:Ut},He={ROW_INDEX:"__$table_row_index",ROW_UID:"__$uuid",ROW_EXPAND:"__row_expand",ROW_SELECTION:"__row_selection",ROW_SELECTION_ALL:"__row_selection_all",ROW_SELECTION_INDETERMINATE:"__row_selection_indeterminate",ROW_SOURCE_DATA:"__row_source_data",ROW_SKIP_CFG:"__row_skip_config"},oi={COL_UID:"__col_$uuid",COL_SOURCE_DATA:"__col_source_data"},$c=6,ci=42,hl={large:78,medium:60,small:42},J5=[{value:"small",label:"\u5C0F",height:hl.small},{value:"medium",label:"\u4E2D",height:hl.medium},{value:"large",label:"\u5927",height:hl.large}],Sh="InitColumns";var kt=(e=>(e.ASC="asc",e.DESC="desc",e.NULL="null",e.CUSTOM="custom",e))(kt||{});const R5=["asc","desc","null","custom"],Ga=80;var xh=(e=>(e.CURRENT="current",e.ALL="all",e))(xh||{});const Kc=Pe("showOverflowTooltipMode",{default:"auto"}),Q5=Pe("columnType",{default:"none"}),_5=Pe("full",{default:"full"});var Dh=(e=>(e.SMALL="small",e.MEDIUM="medium",e.LARGE="large",e))(Dh||{});const jh=Pe("columnSize",{default:"small"}),W5=Pe("columnSize",{}),zh=Pe("sortScope",{}).def("current"),Oh={label:g.oneOfType([g.func.def(()=>""),g.string.def("")]),field:g.oneOfType([g.func.def(()=>""),g.string.def("")]),render:g.oneOfType([g.func.def(()=>""),g.string.def("")]),width:g.oneOfType([g.number.def(void 0),g.string.def("auto")]),minWidth:g.oneOfType([g.number.def(void 0),g.string.def("auto")]).def(80),columnKey:g.string.def(""),showOverflowTooltip:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0),mode:Kc})]).def(void 0),type:Q5,resizable:g.bool.def(!0),fixed:g.oneOfType([g.bool,W5]).def(!1),sort:g.oneOfType([g.shape({sortFn:g.func.def(void 0),sortScope:zh,value:g.string.def(kt.NULL)}),g.bool,g.string]).def(!1),filter:g.oneOfType([g.shape({list:g.arrayOf(g.any).def([]),filterFn:g.func.def(void 0),match:_5,filterScope:zh,btnSave:g.oneOfType([g.bool,g.string]).def("\u786E\u5B9A"),btnReset:g.oneOfType([g.bool,g.string]).def("\u91CD\u7F6E")}),g.bool,g.string]).def(!1),colspan:g.oneOfType([g.func.def(()=>1),g.number.def(1)]),rowspan:g.oneOfType([g.func.def(()=>1),g.number.def(1)])},H5={data:g.arrayOf(g.any).def([]),columns:g.arrayOf(g.shape(Oh)).def([]),activeColumn:g.oneOfType([g.number.def(-1),g.arrayOf(g.number.def(-1))]),columnPick:Pe("columnPick",{}).def("disabled"),height:g.oneOfType([g.number,g.string]).def("auto"),minHeight:g.oneOfType([g.number,g.string]).def(ci*2),maxHeight:g.oneOfType([g.number,g.string]).def("auto"),rowHeight:g.oneOfType([g.number,g.func]).def(ci),headHeight:g.number.def(ci),showHead:g.bool.def(!0),thead:g.shape({height:g.number.def(ci),isShow:g.bool.def(!0),cellFn:g.func.def(void 0)}),virtualEnabled:g.bool.def(!1),border:g.oneOfType([g.arrayOf(Pe("boderType",{})),g.string]).def([fl.ROW]),pagination:g.oneOfType([g.bool.def(!1),g.object.def({})]).def(!1),remotePagination:g.bool.def(!1),emptyText:g.string.def("\u6682\u65E0\u6570\u636E"),settings:g.oneOfType([g.shape({fields:g.arrayOf(g.shape({label:g.string,field:g.string,disabled:g.bool})),checked:g.arrayOf(g.string),limit:g.number.def(0),size:jh,sizeList:g.shape([]),showLineHeight:g.bool.def(!0)}),g.bool]).def(!1),rowClass:g.oneOfType([g.string,g.object,g.func]).def({}),rowStyle:g.oneOfType([g.string,g.object,g.func]).def({}),cellStyle:g.oneOfType([g.string,g.object,g.func]).def({}),cellClass:g.oneOfType([g.string,g.object,g.func]).def({}),scrollLoading:g.oneOfType([g.object,g.bool]).def(void 0),reserveExpand:g.bool.def(!1),selectionKey:g.string.def(""),isSelectedFn:g.func.def(void 0),rowKey:g.oneOfType([g.string,g.func]).def(He.ROW_INDEX),showOverflowTooltip:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0),mode:Kc})]).def(!1),asyncData:g.bool.def(!1),rowHover:g.oneOf(P5).def(Th.HIGHLIGHT),defaultSort:g.shape({}).def({}),isRowSelectEnable:g.oneOfType([g.func.def(()=>!0),g.bool.def(!0)]).def(!0)};var Ah=a.defineComponent({name:"TableColumn",props:Se(Z({},Oh),{prop:g.oneOfType([g.func.def(()=>""),g.string.def("")])}),setup(e,{slots:t}){const n=a.inject(Sh,i=>{},!1);return a.onMounted(()=>{const i=a.reactive(Se(Z({},e),{field:e.prop||e.field}));n(i),i.render=t.default?s=>{var o;return(o=t.default)==null?void 0:o.call(t,s)}:void 0}),()=>{var i;return a.createVNode(a.Fragment,null,[(i=t.default)==null?void 0:i.call(t,{data:""})])}}});const Ph=(e,t)=>{if(e){if(typeof e=="object"){let n=Object.prototype.hasOwnProperty.call(e,"current")?e.current:e.value;return/\d+/.test(n)||(n=1),Se(Z(Z({},t),e),{current:n})}return t}return{}};var B5=(e,t)=>{const n=a.ref(0),i=a.ref(0);let s=a.reactive({count:0,limit:10,current:1,align:"right",layout:["total","limit","list"]});s=Ph(e.pagination,s);const o=a.ref(null),c=()=>{if(!e.pagination||e.remotePagination){n.value=0,i.value=e.data.length;return}n.value=(s.current-1)*s.limit,i.value=s.current*s.limit},d=a.reactive([]),u=(b,v)=>{typeof v=="function"&&b.sort(v)},f=(b,v)=>{if(typeof v=="function"){const k=b.filter((T,L)=>v(T,L,e.data));b.splice(0,b.length,...k)}},m=(b,v,k)=>{var N;const T=t.slice(),{sortScope:L}=(N=k==null?void 0:k.sort)!=null?N:{};L===xh.ALL&&u(T,v),d.splice(0,d.length,...T.slice(n.value,i.value)),f(d,b),u(d,v)},p=(b,v,k)=>{s=Ph(e.pagination,s),y(),c(),m(b,v,k)},y=()=>{!e.pagination||(o.value=e.remotePagination?s:Se(Z({},s),{count:e.data.length}))};return{pageData:d,localPagination:o,resolvePageData:m,watchEffectFn:p}},F5=(e,t)=>{const n=a.toRef(e,"scrollLoading"),i=()=>typeof n.value=="boolean"?{loading:!!n.value,inline:!0,title:"",size:ii.Normal,mode:Pr.Default,indicator:null}:n.value,s=a.computed(()=>n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object"));return{renderScrollLoading:()=>{var c,d,u;if(s.value){const{loading:f,size:m,mode:p,title:y,inline:b,indicator:v}=i();return(u=(d=(c=t.slots).fixedBottom)==null?void 0:d.call(c))!=null?u:a.createVNode(xi,{loading:f,size:m,mode:p,title:y,inline:b,indicator:v},null)}}}};function G5(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var Z5=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(e.limit);a.watch(()=>e.limit,s=>{t.value=s}),a.watch(()=>e.limitList,s=>{a.nextTick(()=>{s.includes(t.value)||([t.value]=s)})},{immediate:!0});const n=s=>{t.value=s};return{limit:t,render:({isFirst:s,isLast:o})=>{let c;return e.showLimit?a.createVNode("div",a.mergeProps({class:{"bk-pagination-limit":!0,"is-first":s,"is-last":o}},{disabled:e.disabled}),[a.createVNode("div",null,[a.createTextVNode("\u6BCF\u9875")]),a.createVNode(Zc,{class:"bk-pagination-limit-select",clearable:!1,size:"small",withValidate:!1,modelValue:t.value,onChange:n,disabled:e.disabled},G5(c=e.limitList.map((d,u)=>a.createVNode(ul,{value:d,label:`${d}`,key:`${u}_${d}`},null)))?c:{default:()=>[c]}),a.createVNode("div",null,[a.createTextVNode("\u6761")])]):null}}};const la=5;var Y5=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(1),n=a.computed(()=>t.value===1),i=a.computed(()=>t.value===e.totalPageNum),s=a.ref(!1),o=a.ref(!1),c=a.computed(()=>{s.value=!1,o.value=!1;const b=[];if(e.totalPageNum<=la+2){for(let T=2;T<=e.totalPageNum-1;T++)b.push(T);return b}const v=Math.floor(la/2);e.totalPageNum>la&&(s.value=t.value-v>2,o.value=t.value+v<e.totalPageNum-1);const k=Math.min(e.totalPageNum-la,Math.max(2,t.value-v));for(let T=k;T<k+la;T++)b.push(T);return b});a.watch(()=>e.modelValue,b=>{a.nextTick(()=>{b>=1&&b<=e.totalPageNum?t.value=b:b<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,b=>{t.value>b&&(t.value=b)})});const d=()=>{n.value||(t.value=t.value-1)},u=()=>{i.value||(t.value=t.value+1)},f=b=>{b!==t.value&&(t.value=b)},m=()=>{t.value=Math.max(1,t.value-la)},p=()=>{t.value=Math.min(e.totalPageNum,t.value+la)};return{current:t,render:({isFirst:b,isLast:v})=>a.createVNode("div",{class:{"bk-pagination-list":!0,"is-first":b,"is-last":v}},[a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":n.value},onClick:d},[e.prevText||a.createVNode(Si,null,null)]),a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===1},key:"1",onClick:()=>f(1)},[a.createTextVNode("1")]),s.value&&a.createVNode("div",{key:"pre-batch",class:"bk-pagination-list-pre-batch",onClick:m},[a.createVNode(Hs,null,null)]),c.value.map(k=>a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===k},key:k,onClick:()=>f(k)},[k])),o.value&&a.createVNode("div",{key:"next-batch",class:"bk-pagination-list-next-batch",onClick:p},[a.createVNode(Hs,null,null)]),e.totalPageNum>1&&a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>f(e.totalPageNum)},[e.totalPageNum]),a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":i.value},onClick:u},[e.nextText||a.createVNode(Dn,null,null)])])}},U5=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(null),n=a.ref(!1),i=a.ref(1),s=a.computed(()=>i.value===1),o=a.computed(()=>i.value===e.totalPageNum);let c=0;const d=a.computed(()=>{const T=[];for(let L=1;L<=e.totalPageNum;L++)T.push(L);return T});a.watch(()=>e.modelValue,T=>{a.nextTick(()=>{T>=1&&T<=e.totalPageNum?i.value=T:T<1?i.value=1:i.value=e.totalPageNum,c=i.value})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,T=>{i.value>T&&(i.value=T)})});const u=()=>{s.value||(i.value=i.value-1)},f=()=>{o.value||(i.value=i.value+1)},m=()=>{n.value=!0},p=()=>{n.value=!1,t.value.textContent=`${c}`,c!==i.value&&(i.value=c)},y=T=>{const L=T.target,N=Number(L.textContent);!N||N<1||N>e.totalPageNum||N===i.value||(c=N)},b=T=>{["Enter","NumpadEnter"].includes(T.code)&&(T.preventDefault(),p())},v=T=>{c=T,p()};return{current:i,render:()=>a.createVNode("div",{class:"bk-pagination-small-list"},[a.createVNode("div",{class:{"bk-pagination-btn-pre":!0,"is-disabled":s.value},onClick:u},[a.createVNode(Si,null,null)]),a.createVNode(mn,{theme:"light",trigger:"click",arrow:!1,width:56,boundary:"body",placement:"bottom"},{default:()=>a.createVNode("div",{class:{"bk-pagination-picker":!0,"is-focused":n.value}},[a.createVNode("span",{ref:t,class:"bk-pagination-editor",contenteditable:!0,spellcheck:"false",onFocus:m,onBlur:p,onInput:y,onKeydown:b},[i.value]),a.createVNode("span",null,[a.createTextVNode("/")]),a.createVNode("span",{class:"bk-pagination-small-list-total"},[e.totalPageNum])]),content:()=>a.createVNode("div",{class:"bk-pagination-picker-list"},[d.value.map(T=>a.createVNode("div",{class:{item:!0,"is-actived":T===i.value},key:T,onClick:()=>v(T)},[T]))])}),a.createVNode("div",{class:{"bk-pagination-btn-next":!0,"is-disabled":o.value},onClick:f},[a.createVNode(Dn,null,null)])])}},$5=()=>({isFirst:e,isLast:t})=>{const{props:n}=a.getCurrentInstance();return n.showTotalCount?a.createVNode("div",a.mergeProps({class:{"bk-pagination-total":!0,"is-first":e,"is-last":t}},{disabled:n.disabled}),[a.createTextVNode("\u5171\u8BA1"),a.createVNode("div",{class:"bk-pagination-total-num"},[n.count]),a.createTextVNode("\u6761")]):null};const K5={modelValue:g.number.def(1),count:g.number.def(0).isRequired,limit:g.number.def(10),limitList:g.arrayOf(Number).def([10,20,50,100]),showLimit:g.bool.def(!0),type:g.oneOf(["default","compact"]).def("default"),location:g.oneOf(["left","right"]).def("right"),align:g.oneOf(["left","center","right"]).def("left"),size:g.size(),small:g.bool.def(!1),showTotalCount:g.bool.def(!0),prevText:g.string,nextText:g.string,disabled:g.bool.def(!1),beforeChange:g.func,layout:g.custom(e=>{const t={total:!0,list:!0,limit:!0};return e.some(n=>t[n])},"layout \u7684\u503C\u53EA\u652F\u6301 * total\u3001list\u3001limit *").def(["total","list","limit"])};var X5=a.defineComponent({name:"Pagination",props:K5,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const n=a.ref(0),{count:i,limit:s}=a.toRefs(e),o=$5(),{current:c,render:d}=Y5(),{current:u,render:f}=U5(),{limit:m,render:p}=Z5();return a.watch([i,m,s],([y,b])=>{const v=Math.ceil(y/b);n.value=v<1?1:v},{immediate:!0}),a.watch(c,y=>{t.emit("update:modelValue",y),t.emit("change",y)}),a.watch(u,y=>{!e.small||(t.emit("update:modelValue",y),t.emit("change",y))}),a.watch(m,y=>{t.emit("limitChange",y)}),{totalPageNum:n,renderTotal:o,renderList:d,renderLimit:p,renderSmallList:f}},render(){const e=ze({"bk-pagination":!0,[`bk-pagination--${this.size}`]:!0,[`is-align-${this.align}`]:!0}),t={total:this.renderTotal,list:this.small?this.renderSmallList:this.renderList,limit:this.renderLimit};return a.createVNode("div",{class:e},[this.layout.map((n,i)=>t[n]({isFirst:i===0,isLast:i===this.layout.length-1}))])}});const Xc=Ge(X5),St=(e,t,n)=>{if(typeof t=="string")return Object.prototype.hasOwnProperty.call(e,t)?typeof e[t]=="function"?e[t].call(globalThis,...n):e[t]:void 0;if(Array.isArray(t))return t.map(i=>St(e,i,n)).filter(i=>i!==void 0).at(0)},qc=e=>/^\d+$/.test(`${e}`)?[parseInt(`${e}`,10)]:[],q5=e=>Eh(e,"auto"),Eh=(e,t="100%",n=null)=>{let i="";return/^auto|null|undefined$/ig.test(`${e}`)?i=t:i=/^\d+\.?\d+$/.test(`${e}`)?`${e}px`:e,n&&(i=`calc(${i} - ${n})`),i},eb=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>E5.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},Hr=(e,t=["resizeWidth","calcWidth","width"])=>{var n,i;return(i=(n=e[t[0]])!=null?n:e[t[1]])!=null?i:e[t[2]]},eu=(e,t,n=Ga,i=0)=>{const{width:s}=e.getBoundingClientRect()||{},o=s-i;let c=o;const d=[],u=(m,p)=>{const{minWidth:y=void 0}=m;if(y===void 0)return p<Ga?Ga:p;let b=p;return/^\d+\.?\d*$/.test(`${y}`)&&(b=Number(y)),/^\d+\.?\d*%$/.test(`${y}`)&&(b=Number(y)*o/100),/^\d+\.?\d*px$/i.test(`${y}`)&&(b=Number(`${y}`.replace(/px/i,""))),b},f=(m,p,y=!0)=>{const b=u(m,p),v=p<b?b:p;Object.assign(m,{calcWidth:v}),y&&(c=c-v,c<0&&(c=0))};if(t.forEach((m,p)=>{if(!m.isHidden){const b=String(Hr(m,["resizeWidth","width"]));let v=!0;if(/^\d+\.?\d*(px)?$/.test(b)){const k=Number(b.replace("px",""));f(m,k),v=!1}if(/^\d+\.?\d*%$/.test(b)){let k=n;if(c>0){const T=Number(b.replace("%",""));k=c*T/100}f(m,k),v=!1}v&&d.push(p)}}),d.length>0){let m=n;c>0?d.forEach((p,y)=>{m=c/(d.length-y),f(t[p],m,!1);const{calcWidth:b}=t[p];c=c-b}):d.forEach(p=>{const y=u(t[p],Ga);Object.assign(t[p],{calcWidth:y})})}},Vh=(e,t,n=60,i=!1)=>{const s=ot.exports.throttle(()=>{typeof t=="function"&&t()},n),o=new ResizeObserver(()=>{s()});return i&&typeof t=="function"&&t(),{start:()=>{o.observe(e)},stop:()=>{o.disconnect(),o.unobserve(e)}}},tu=e=>{const{showHead:t,headHeight:n,thead:i={}}=e;return Object.assign({},{isShow:t,height:n},Z({},i))},gl=(e,t,n)=>n.type==="index"?e[He.ROW_INDEX]+1:ot.exports.get(e,t),Br=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Br(Reflect.apply(e,globalThis,t),t):[],tb=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===He.ROW_INDEX?`__ROW_INDEX_${n}`:ot.exports.get(e,t.rowKey):typeof t.rowKey=="function"?Reflect.apply(t.rowKey,globalThis,[e]):Li.v4(),nb=(e,t,n=0)=>{if(e){const i=e.querySelector(t);if(i)return i.offsetHeight>e.offsetHeight-n}return!1},ib=(e,t)=>{function n(o,c){const u=(n.canvas||(n.canvas=document.createElement("canvas"))).getContext("2d");return u.font=c,u.measureText(o).width}function i(o,c){return window.getComputedStyle(o,null).getPropertyValue(c)}function s(o=document.body){const c=i(o,"font-weight")||"normal",d=i(o,"font-size")||"16px",u=i(o,"font-family")||"Times New Roman";return`${c} ${d} ${u}`}return n(t||(e==null?void 0:e.innerHTML),s(e))},Jh=(e,t,n)=>(s=>e.some(o=>o.field===St(s,["field","type"],[s])))(t)&&n.length&&!n.includes(St(t,["field","type"],[t])),Rh=(e,t,n,i,s)=>typeof e[s]=="function"?Reflect.apply(e[s],globalThis,[{column:e,colIndex:t,row:n,rowIndex:i}]):typeof e[s]=="number"?e[s]:1,Qh=(e,t,n,i)=>{const s=Rh(e,t,n,i,"colspan"),o=Rh(e,t,n,i,"rowspan");return{colspan:s,rowspan:o}},_h=(e,t)=>{var c,d;const n=e.field,i=u=>gl(u,n,e),s=(u,f)=>{const m=i(u)||"",p=i(f)||"";return typeof m=="number"&&typeof p=="number"?m-p:String.prototype.localeCompare.call(m,p)},o=typeof((c=e.sort)==null?void 0:c.sortFn)=="function"?(d=e.sort)==null?void 0:d.sortFn:s;return t===kt.NULL?()=>!0:(u,f)=>o(u,f)*(t===kt.DESC?-1:1)},Wh=e=>{const t={[kt.NULL]:0,[kt.ASC]:1,[kt.DESC]:2};return e===void 0?kt.NULL:Object.keys(t)[(t[e]+1)%3]},Hh=e=>{if(typeof e=="string")return{value:e};if(typeof e=="boolean"&&e)return{value:kt.NULL};if(typeof e=="object"&&e!==null){return e.sortFn,Z({value:"custom"},e);return e}return null},ml=(e,{row:t,index:n,isCheckAll:i})=>typeof e.isRowSelectEnable=="boolean"?e.isRowSelectEnable!==!1:typeof e.isRowSelectEnable=="function"?e.isRowSelectEnable({row:t,index:n,isCheckAll:i}):!0;var Bh=a.defineComponent({name:"TableCell",props:{column:g.any.def({}),row:g.any.def({}),parentSetting:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0),mode:Kc})]).def(void 0),title:g.string.def(void 0)},setup(e,{slots:t}){const n=a.ref(),i=a.ref(!1),s=()=>/boolean|object/.test(typeof e.column.showOverflowTooltip)&&e.column.showOverflowTooltip!==null?e.column:{showOverflowTooltip:e.parentSetting},{showOverflowTooltip:o=!1}=s();let c=null,d=null;const u=()=>{let m=!0,p=n.value.innerText,y="auto";return typeof o=="boolean"&&(m=!o),typeof o=="object"&&(m=o.disabled,typeof o.content=="function"&&(p=o.content(e.column,e.row)),p=o.content||n.value.innerText,y=o.mode||"auto"),{disabled:m,content:p,mode:y}},f=()=>{if(!n.value||/selection|index|expand/.test(e.column.type)||!Aa(n.value))return;const{content:m,mode:p}=u();if(p==="auto"){const y=ib(n.value,m),b=n.value.clientWidth,v=window.getComputedStyle(n.value),k=["padding-left","padding-right"].reduce((L,N)=>L+Number(v.getPropertyValue(N).replace("px","")),0),T=b-k;i.value=y>T}if(p==="static"&&(i.value=!0),i.value){const y=a.ref(u());d===null&&(d=Jc(n.value,y))}else d==null||d.destroyInstance(n.value),d=null};return a.onMounted(()=>{var p;const{disabled:m}=u();m||(f(),((p=e.column.showOverflowTooltip)==null?void 0:p.watchCellResize)!==!1&&(c=Vh(n.value,()=>{f()},60,!0),c.start()))}),a.onBeforeUnmount(()=>{c==null||c.stop(),d==null||d.destroyInstance(n.value)}),()=>{var m;return a.createVNode("div",{class:["cell",e.column.type],ref:n,title:e.title},[(m=t.default)==null?void 0:m.call(t)])}}}),nu=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)])}}),ab=a.defineComponent({name:"BodyEmpty",props:{list:g.array.def([]),filterList:g.array.def([]),emptyText:g.string.def("\u6682\u65E0\u6570\u636E")},emits:["change"],setup(e){const t=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode($s,{scene:"part",type:t.value,description:e.emptyText},null)}});function rb(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var sb=a.defineComponent({name:"HeadFilter",props:{column:g.any.def({}),height:g.number.def(ci)},emits:["change","filterSave"],setup(e,{emit:t}){const{column:n}=e,i=a.reactive({isOpen:!1,checked:[]}),s=a.computed(()=>ze({[je("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:i.checked.length,opened:i.isOpen})),o=ze({[je("table-head-filter")]:!0}),c=I=>{i.isOpen=I},d=`light ${je("table-head-filter")}`,u=a.computed(()=>{const{list:I=[]}=n.filter;return I.map(M=>Se(Z({},M),{checked:i.checked.includes(M.value)}))}),f=(I,M="ig")=>new RegExp(`${I}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),M),m=(I,M)=>{const{match:S}=n.filter,z=gl(M,St(n,"field",[n,M]),n);return S==="full"&&I.includes(z),I.some(j=>f(j,"img").test(z))},p=typeof n.filter.filterFn=="function"?(I,M,S,z)=>n.filter.filterFn(I,M,e.column,S,z):(I,M)=>I.length?m(I,M):!0,y=()=>{b(!0),t("filterSave",[...i.checked]),i.isOpen=!1},b=(I=!1)=>{const{disabled:M}=k(T,"\u786E\u5B9A");if(M||I){if(e.column.filter==="custom"){t("change",[...i.checked],null),i.isOpen=!1;return}t("change",[...i.checked],p)}},v=()=>{i.checked.length&&(i.checked.splice(0,i.checked.length),i.isOpen=!1,a.nextTick(()=>t("change",i.checked,p)))},k=(I,M)=>({disabled:I==="disabled"||I===!1,text:typeof I=="string"?I:M}),{btnSave:T,btnReset:L}=n.filter,N=()=>{const{disabled:I,text:M}=k(T,"\u786E\u5B9A");return I?a.createVNode("span",{class:"btn-filter-save disabled"},[M]):a.createVNode("span",{class:"btn-filter-save",onClick:y},[M])},C=()=>{const{disabled:I,text:M}=k(L,"\u91CD\u7F6E");return I?"":a.createVNode("span",{class:["btn-filter-reset",i.checked.length?"":"disable"],onClick:v},[M])};return()=>a.createVNode(mn,a.mergeProps({trigger:"click",isShow:i.isOpen,placement:"bottom-start",arrow:!1,offset:0},{theme:d},{onAfterShow:()=>c(!0),onAfterHidden:()=>c(!1)}),{default:()=>a.createVNode(lc,{class:s.value},null),content:()=>{let I;return a.createVNode("div",{class:o},[a.createVNode(vc,{class:"content-list",modelValue:i.checked,"onUpdate:modelValue":M=>i.checked=M,onChange:()=>b(!1)},rb(I=u.value.map(M=>a.createVNode("div",{class:"list-item"},[a.createVNode(ji,{label:M.value},{default:()=>[M.text]})])))?I:{default:()=>[I]}),a.createVNode("div",{class:"content-footer"},[N(),a.createVNode("span",{class:"btn-filter-split"},null),C()])])}})}}),lb=a.defineComponent({name:"HeadSort",props:{column:g.any.def({}),defaultSort:g.oneOf(R5).def(kt.NULL)},emits:["change"],setup(e,{emit:t}){var o,c;const n=((c=(o=e.column)==null?void 0:o.sort)==null?void 0:c.value)||e.defaultSort||kt.NULL,i=a.ref(n);a.watch(()=>[e.defaultSort],([d])=>{i.value=d});const s=(d,u)=>{d.stopImmediatePropagation(),d.stopPropagation(),d.preventDefault();let f=u;u===kt.NULL&&(f=Wh(u)),i.value===u&&(f=kt.NULL);const m=Hh(e.column.sort);if((m==null?void 0:m.value)==="custom"){t("change",m==null?void 0:m.sortFn,f);return}const p=_h(e.column,f);t("change",p,f)};return()=>a.createVNode("span",{class:je("head-cell-sort"),onClick:d=>s(d,kt.NULL)},[a.createVNode($o,{class:["sort-action","sort-asc",i.value===kt.ASC?"active":""],onClick:d=>s(d,kt.ASC)},null),a.createVNode(Js,{class:["sort-action","sort-desc",i.value===kt.DESC?"active":""],onClick:d=>s(d,kt.DESC)},null)])}});class ob{constructor(t,n){mr(this,"props",null);mr(this,"ctx",null);this.props=t,this.ctx=n}}function Fh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var cb=a.defineComponent({name:"Settings",props:{settings:g.oneOfType([g.shape({fields:g.arrayOf(g.shape({label:g.string,field:g.string,disabled:g.bool})),checked:g.arrayOf(g.string),limit:g.number.def(0),size:jh.def(Dh.SMALL),sizeList:g.shape([]),showLineHeight:g.bool.def(!0)}),g.bool]).def(!1),columns:g.array.def([]),rowHeight:g.number.def(ci)},emits:["change"],setup(e,{emit:t}){const n=J5,i=(G,B)=>St(G,["field","type"],[G,B]),s=a.ref(!1),o=a.ref(!1),c=typeof e.settings=="boolean"?a.ref({fields:e.columns.map(G=>Se(Z({},G),{field:G.field||G.type})),checked:[],limit:0,size:"small",sizeList:n,showLineHeight:!0}):a.ref(e.settings),d=a.ref(c.value.size||"small"),u=a.ref(e.rowHeight),f=a.ref(c.value.checked||[]),p=`light ${je("table-settings")}`,y=a.computed(()=>c.value.fields||e.columns||[]),b={checkAll:s.value,activeSize:d.value,activeHeight:u.value,checkedFields:c.value.checked||[]},v=()=>{Object.assign(b,{checkAll:s.value,activeSize:d.value,activeHeight:u.value,checkedFields:f.value}),t("change",{checked:f.value,size:d.value,height:u.value,fields:a.unref(y)}),o.value=!1},k=()=>{s.value=b.checkAll,d.value=b.activeSize,u.value=b.activeHeight,f.value=b.checkedFields,o.value=!1},T=()=>{o.value=!0},L=G=>{G.stopImmediatePropagation(),G.stopPropagation(),G.preventDefault(),s.value=!s.value;const B=c.value.fields||e.columns||[],ie=B.filter((le,ve)=>le.disabled&&f.value.includes(i(le,ve))).map((le,ve)=>i(le,ve));if(s.value){const le=B.filter(ve=>!ve.disabled).map((ve,Ie)=>i(ve,Ie));f.value.splice(0,f.value.length,...le,...ie)}else f.value.splice(0,f.value.length,...ie)},N=a.computed(()=>{var G;return((G=c.value.limit)!=null?G:0)>0}),C=c.value.sizeList||n,I=a.computed(()=>N.value&&(c.value.limit?c.value.limit:0)<=f.value.length),M=(G,B)=>G.disabled||I.value&&!f.value.includes(i(G,B)),S=G=>{d.value=G.value,u.value=G.height},z=G=>({"line-size":!0,"is-medium":d.value==="medium",active:G.value===d.value}),j={marginRight:"12px"},O=()=>C.map(G=>a.createVNode("span",{class:z(G),onClick:()=>S(G)},[G.label])),W=a.computed(()=>f.value.length>0&&!y.value.every((G,B)=>f.value.includes(St(G,"field",[G,B])))),P=a.computed(()=>typeof c.value.showLineHeight=="boolean"?c.value.showLineHeight:!0);return a.watch(()=>[f.value],()=>{f.value.length||(s.value=!1),f.value.length&&y.value.every((G,B)=>f.value.includes(i(G,B)))&&(s.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{f.value.splice(0,f.value.length,...c.value.checked)},{immediate:!0,deep:!0}),()=>e.settings?a.createVNode(mn,a.mergeProps({trigger:"manual",isShow:o.value,placement:"bottom-end",arrow:!0},{theme:p}),{default:()=>a.createVNode("span",{class:"table-head-settings",onClick:T},[a.createVNode(tc,{style:"color: #c4c6cc;"},null)]),content:()=>{let G;return a.createVNode("div",{class:"setting-content"},[a.createVNode("div",{class:"setting-head"},[a.createVNode("span",{class:"head-title"},[a.createTextVNode("\u8868\u683C\u8BBE\u7F6E")]),a.createVNode(Qs,{class:"icon-close-action",onClick:k},null)]),a.createVNode("div",{class:"setting-body"},[a.createVNode("div",{class:"setting-body-title"},[a.createVNode("div",null,[a.createVNode("span",{class:"field-setting-label"},[a.createTextVNode("\u5B57\u6BB5\u663E\u793A\u8BBE\u7F6E")]),N.value?a.createVNode("span",{class:"limit"},[a.createTextVNode("\uFF08\u6700\u591A"),c.value.limit,a.createTextVNode("\u9879\uFF09")]):""]),N.value?"":a.createVNode("span",{class:"check-all",onClick:L},[a.createVNode(ji,{label:"\u5168\u9009",indeterminate:Boolean(W.value),modelValue:f.value.length>0},{default:()=>[a.createTextVNode("\u5168\u9009")]})])]),a.createVNode(vc,{class:"setting-body-fields",modelValue:f.value,"onUpdate:modelValue":B=>f.value=B},Fh(G=y.value.map((B,ie)=>{let le;return a.createVNode("div",{class:"field-item"},[a.createVNode(ji,{checked:f.value.includes(i(B,ie)),label:i(B,ie),disabled:M(B,ie)},Fh(le=St(B,"label",[B,ie]))?le:{default:()=>[le]})])}))?G:{default:()=>[G]}),P.value?a.createVNode("div",{class:"setting-body-line-height"},[a.createTextVNode("\u8868\u683C\u884C\u9AD8\uFF1A"),O()]):""]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Pt,{theme:"primary",style:j,onClick:v},{default:()=>[a.createTextVNode("\u786E\u5B9A")]}),a.createVNode(Pt,{style:j,onClick:k},{default:()=>[a.createTextVNode("\u53D6\u6D88")]})])])}}):""}}),iu=(e,t,n)=>{const i=a.computed(()=>e.pagination&&e.data.length?ci:0),s=(v,k,T)=>({column_fixed:!!v.fixed,column_fixed_left:v.fixed!=="right",column_fixed_right:v.fixed==="right",shadow:v.fixed==="right"?k<T:k>0}),o=v=>v.fixed==="right"?"right":"left",c={left:(v=!0)=>t.filter(k=>k.fixed&&k.fixed!=="right").reduce((k,T,L)=>v&&L===0?k:k+Hr(T),0),right:(v=!0)=>t.filter(k=>k.fixed==="right").reduce((k,T,L)=>v&&L===0?k:k+Hr(T),n?$c:0)},d=(v,k)=>{const T=k[oi.COL_UID],L=v==="right"?-1:1,{length:N}=t;let C=v==="right"?N*L:1,I=0;for(C;;){C=C+-1*L;const M=Math.abs(C),S=t[M],z=o(S),j=S[oi.COL_UID];if(z===v&&T!==j&&(I+=Hr(S)),C===0||T===j)break}return I},u=v=>{if(!v.fixed)return{};const k={left:0,right:0},T=o(v);return k[T]=d(T,v),{[T]:`${k[T]}px`}},f=v=>({width:`${c[v](!1)}px`,bottom:`${i.value}px`}),m={left:!1,right:!1},p=a.computed(()=>t.filter(v=>!v.isHidden&&v.fixed).map(v=>{const k=o(v),T=m[k];return m[k]=!0,{isExist:T,colPos:k,column:v}})),y=(v,k)=>p.value.map(({isExist:T,colPos:L,column:N})=>T?"":a.createVNode("div",{class:s(N,v,k),style:f(L)},null)),b=je("table-fixed");return{renderFixedColumns:y,fixedWrapperClass:b,resolveFixedColumnStyle:u}};function Gh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}class ub{constructor(t,n,i,s){mr(this,"getRowHeight",(t,n)=>{const{size:i,height:s}=this.setting;return s!=null?St(this.setting,"height",["tbody",t,n,i]):St(this.props,"rowHeight",["tbody",t,n])});mr(this,"getColumnClass",(t,n)=>({[`${this.uuid}-column-${n}`]:!0,column_fixed:!!t.fixed,column_fixed_left:!!t.fixed,column_fixed_right:t.fixed==="right"}));mr(this,"getHeadColumnClass",(t,n)=>Se(Z({},this.getColumnClass(t,n)),{active:this.isColActive(n)}));this.props=t,this.context=n,this.reactiveProp=i,this.colgroups=s,this.plugins=new ob(t,n),this.uuid=Li.v4(),this.events=new Map}get propActiveCols(){return this.reactiveProp.activeColumns}renderTableHeadSchema(){const{isShow:t=!0}=tu(this.props);if(!t)return null;const n=i=>{var u;const{checked:s=[],size:o,height:c}=i;this.reactiveProp.setting.size=o,this.reactiveProp.setting.height=c;const d=((u=this.props.settings)==null?void 0:u.fields)||[];s.length&&this.colgroups.forEach(f=>{f.isHidden=Jh(d,f,s)}),this.emitEvent(pn.ON_SETTING_CHANGE,[i])};return[this.props.settings?a.createVNode(cb,{class:"table-head-settings",settings:this.reactiveProp.settings,columns:this.colgroups,rowHeight:this.props.rowHeight,onChange:n},null):"",a.createVNode("table",{cellpadding:0,cellspacing:0},[this.renderColGroup(),this.renderHeader()])]}renderTableBodySchema(t){var n,i,s;return t.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":this.uuid},[this.renderColGroup(),this.renderTBody(t)]):(s=(i=(n=this.context.slots).empty)==null?void 0:i.call(n))!=null?s:a.createVNode(ab,{filterList:t,list:this.props.data,emptyText:this.props.emptyText},null)}renderTableFooter(t){return a.createVNode(Xc,a.mergeProps(t,{modelValue:t.current,onLimitChange:n=>this.handlePageLimitChange(n),onChange:n=>this.handlePageChange(n)}),null)}on(t,n){return this.events.has(t)||this.events.set(t,[]),this.events.get(t).push(n),this}destroy(){this.events.clear(),this.events=null}emitEvent(t,n){this.events.has(t)&&this.events.get(t).forEach(i=>{typeof i=="function"&&Reflect.apply(i,this,n)})}handlePageLimitChange(t){Object.assign(this.props.pagination,{limit:t}),this.context.emit(Et.PAGE_LIMIT_CHANGE,t)}handlePageChange(t){Object.assign(this.props.pagination,{current:t,value:t}),this.context.emit(Et.PAGE_VALUE_CHANGE,t)}setColumnActive(t,n=!1){const i=this.propActiveCols.find(s=>s.index===t);Object.assign(i,{active:!i.active}),n&&this.propActiveCols.filter(s=>s.index!==t&&s.active).forEach(s=>{Object.assign(s,{active:!1})})}handleColumnHeadClick(t,n){if(this.props.columnPick!=="disabled"&&(this.setColumnActive(t,this.props.columnPick==="single"),this.context.emit(Et.COLUMN_PICK,this.propActiveCols)),n.sort&&!n.filter){const i=St(n,["field","type"],[n,t]),s=Wh(this.reactiveProp.defaultSort[i]);Object.assign(this.reactiveProp.defaultSort,{[i]:s});const o=_h(n,s);this.emitEvent(pn.ON_SORT_BY_CLICK,[{sortFn:o,column:n,index:t,type:s}])}}getSortCell(t,n){const i=St(t,["field","type"],[t,n]),s=(c,d)=>{Object.assign(this.reactiveProp.defaultSort,{[i]:d}),this.emitEvent(pn.ON_SORT_BY_CLICK,[{sortFn:c,column:t,index:n,type:d}])},o=this.reactiveProp.defaultSort[i];return a.createVNode(lb,{column:t,defaultSort:o,onChange:s},null)}getFilterCell(t,n){const i=(o,c)=>{const d=(u,f)=>c(o,u,f);this.emitEvent(pn.ON_FILTER_CLICK,[{filterFn:d,checked:o,column:t,index:n}])},s=o=>{this.context.emit(Et.COLUMN_FILTER_SAVE,{column:t,values:o})};return a.createVNode(sb,{column:t,height:this.props.headHeight,onChange:i,onFilterSave:s},null)}renderHeader(){const t=tu(this.props),{cellFn:n}=t,i={"--row-height":`${St(t,"height",["thead"])}px`},s=(u,f)=>typeof n=="function"?n(u,f):St(u,"label",[u,f]),o=(u,f)=>{if(u.type==="selection"){const b=this.reactiveProp.rowActions.get(He.ROW_SELECTION_ALL);return this.renderCheckboxColumn({[He.ROW_SELECTION]:!!b},0,!0)}const m=[];u.sort&&m.push(this.getSortCell(u,f)),u.filter&&m.push(this.getFilterCell(u,f));const p=s(u,f);m.unshift(p);const y=typeof p=="string"?p:void 0;return a.createVNode(Bh,{title:y},Gh(m)?m:{default:()=>[m]})},c=u=>Array.from(u.listeners.keys()).reduce((f,m)=>{const p=m.split("_").slice(-1)[0];return Object.assign(f,{[p]:y=>{u.listeners.get(m).forEach(b=>Reflect.apply(b,this,[y,u,this]))}})},{}),{resolveFixedColumnStyle:d}=iu(this.props,this.colgroups);return a.createVNode("thead",{style:i},[a.createVNode(nu,null,{default:()=>[a.createVNode("tr",null,[this.filterColgroups.map((u,f)=>a.createVNode("th",a.mergeProps({colspan:1,rowspan:1,class:this.getHeadColumnClass(u,f),style:d(u),onClick:()=>this.handleColumnHeadClick(f,u)},c(u)),[o(u,f)]))])]})])}renderTBody(t){const{resolveFixedColumnStyle:n}=iu(this.props,this.colgroups),i=t.length;return a.createVNode("tbody",null,[t.map((s,o)=>{const c=[...Br(this.props.rowStyle,[s,o,this]),{"--row-height":`${this.getRowHeight(s,o)}px`}],d=[...Br(this.props.rowClass,[s,o,this]),`hover-${this.props.rowHover}`],u=s[He.ROW_UID];return[a.createVNode(nu,{key:u},{default:()=>[a.createVNode("tr",{style:c,class:d,onClick:f=>this.handleRowClick(f,s,o,t),onDblclick:f=>this.handleRowDblClick(f,s,o,t)},[this.filterColgroups.map((f,m)=>{var I,M;const p=[n(f),...Br(this.props.cellStyle,[f,m,s,o,this])],y={"expand-cell":f.type==="expand"},b=`__CELL_${o}_${m}`,{colspan:v,rowspan:k}=Qh(f,m,s,o),T=He.ROW_SKIP_CFG,L=f[oi.COL_UID],{skipRow:N=!1,skipCol:C=!1}=(M=(I=s[T])==null?void 0:I[L])!=null?M:{};if(!N&&!C){let S;const z=[this.getColumnClass(f,m),...Br(this.props.cellClass,[f,m,s,o,this]),{"expand-row":s[He.ROW_EXPAND],"is-last":o+k>=i}];return a.createVNode("td",{class:z,style:p,key:b,colspan:v,rowspan:k},[a.createVNode(Bh,{class:y,column:f,row:s,parentSetting:this.props.showOverflowTooltip},Gh(S=this.renderCell(s,f,o,t))?S:{default:()=>[S]})])}return null})])]}),this.renderExpandRow(s,d)]})])}renderExpandRow(t,n){if(!!t[He.ROW_EXPAND]){const s=[...n,{row_expend:!0}],o=`${t[He.ROW_UID]}_expand`;return a.createVNode(nu,{key:o},{default:()=>{var c,d,u;return[a.createVNode("tr",{class:s},[a.createVNode("td",{colspan:this.filterColgroups.length,rowspan:1},[(u=(d=(c=this.context.slots).expandRow)==null?void 0:d.call(c,t[He.ROW_SOURCE_DATA]))!=null?u:a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}}handleRowClick(t,n,i,s){this.context.emit(Et.ROW_CLICK,t,n,i,s,this)}handleRowDblClick(t,n,i,s){this.context.emit(Et.ROW_DBL_CLICK,t,n,i,s,this)}getExpandCell(t){return!!t[He.ROW_EXPAND]?a.createVNode(_s,null,null):a.createVNode(Zs,null,null)}handleRowExpandClick(t,n,i,s,o){this.emitEvent(pn.ON_ROW_EXPAND_CLICK,[{row:t,column:n,index:i,rows:s,e:o}])}renderCellCallbackFn(t,n,i,s){const o=gl(t,St(n,"field",[n,t]),n),c=this.props.data[t[He.ROW_INDEX]];return n.render({cell:o,data:c,row:t,column:n,index:i,rows:s})}renderCheckboxColumn(t,n,i=!1){const s=d=>{this.emitEvent(pn.ON_ROW_CHECK,[{row:t,index:n,isAll:i,value:d}])},o=i&&!!this.reactiveProp.rowActions.get(He.ROW_SELECTION_INDETERMINATE),c=ml(this.props,{row:t,index:n,isCheckAll:i});return a.createVNode(ji,{onChange:s,disabled:!c,modelValue:t[He.ROW_SELECTION],indeterminate:o},null)}renderExpandColumn(t,n,i,s){const o=()=>{var c,d,u;return typeof n.render=="function"?this.renderCellCallbackFn(t,n,i,s):(u=(d=(c=this.context.slots).expandCell)==null?void 0:d.call(c,{row:t,column:n,index:i,rows:s}))!=null?u:this.getExpandCell(t)};return a.createVNode("span",{class:"expand-btn-action",onClick:c=>this.handleRowExpandClick(t,n,i,s,c)},[o()])}renderCell(t,n,i,s){var d,u;const o=()=>{const f=gl(t,St(n,"field",[n,t]),n);return typeof n.render=="function"?this.renderCellCallbackFn(t,n,i,s):f},c={expand:(f,m,p,y)=>this.renderExpandColumn(f,m,p,y),selection:(f,m,p,y)=>this.renderCheckboxColumn(f,p)};return(u=(d=c[n.type])==null?void 0:d.call(c,t,n,i,s))!=null?u:o()}isColActive(t){return this.props.columnPick!=="disabled"&&this.propActiveCols.some(n=>n.index===t&&n.active)}renderColGroup(){return a.createVNode("colgroup",null,[(this.filterColgroups||[]).map((t,n)=>{const i=ze({active:this.isColActive(n)}),s=`${q5(Hr(t))}`.replace(/px$/i,"");return a.createVNode("col",{class:i,width:s},null)})])}get filterColgroups(){return this.colgroups.filter(t=>!t.isHidden)}get setting(){return this.reactiveProp.setting}}var pl=(e,t)=>({initColumns:s=>{let o=[];Array.isArray(s)?o=s:o=[s],o.forEach(c=>{if(!t.find(u=>u.label===c.label&&u.field===c.field)){const u=a.unref(c);t.push(u)}})},getColumns:()=>{var s;return t!=null&&t.length?t:(s=e.columns)!=null&&s.length?e.columns:[]}});const Zh=e=>e.columnPick!=="disabled"?e.columnPick==="multi"?Array.isArray(e.activeColumn)?e.activeColumn:qc(e.activeColumn):Array.isArray(e.activeColumn)?qc(e.activeColumn[0]):qc(e.activeColumn):[];var db=(e,t)=>{let n=a.reactive([]);const{getColumns:i}=pl(e,t);if(e.columnPick==="disabled")return{activeColumns:n};const s=a.reactive(Zh(e)),o=()=>i().map((c,d)=>({index:d,active:s.some(u=>u===d),_column:c}));return a.watchEffect(()=>{n=o();const c=Zh(e);n.forEach((d,u)=>{Object.assign(d,{active:c.some(f=>f===u)})})}),{activeColumns:n}},fb=(e,t=!0)=>{const n="HeadColumnResize";let i;(function(C){C.MOUSE_MOVE="onMousemove",C.MOUSE_OUT="onMouseout",C.MOUSE_DOWN="onMousedown"})(i||(i={}));let s=!1,o=!1,c=!1,d=0,u=null,f=0;const m=a.ref(-1e3),p=C=>{var O;o=!1,c=!1;const I=document.body.style;I.cursor="";const M=C.clientX-d,S=((O=u.resizeWidth)!=null?O:u.calcWidth)+M,z=Number(u.minWidth);u.resizeWidth=S>z?S:z,document.removeEventListener("mouseup",p),document.removeEventListener("mousemove",b),d=0,m.value=-1e3,u=null,C.target.closest("table").querySelectorAll("th").forEach(W=>W.style.setProperty("user-select","inherit"))},y=C=>ot.exports.throttle(()=>{var z;const I=C.clientX-d,M=((z=u.resizeWidth)!=null?z:u.calcWidth)+I;Number(u.minWidth)<M&&(m.value=C.clientX-d+f)},60),b=C=>{document.body.style.setProperty("cursor",""),y(C)()},v={[i.MOUSE_DOWN]:(C,I)=>{if(!s)return;o=!0,document.body.style.setProperty("cursor","col-resize"),u=I,d=C.clientX;const S=C.target.closest("table");f=d-S.getBoundingClientRect().left,document.addEventListener("mouseup",p),document.addEventListener("mousemove",b)},[i.MOUSE_MOVE]:(C,I)=>{o&&!c&&(c=!0);const M=C.target.closest("th");if(c&&M.style.setProperty("user-select","none"),!c){if(!M)return;const S=M.getBoundingClientRect();S.width>12&&S.right-C.pageX<8?(s=!0,M.style.setProperty("cursor","col-resize")):(M.style.setProperty("cursor",""),s=!1)}},[i.MOUSE_OUT]:(C,I)=>{const M=C.target;c||M.style.setProperty("cursor","")}},k=C=>`${n}_${C}`,T=()=>{e.forEach(C=>{C.resizable!==!1&&Object.keys(v).forEach(I=>{const M=k(I);C.listeners.has(M)||C.listeners.set(M,[]),C.listeners.get(M).push(v[I])})})},L=()=>{e.forEach(C=>{Object.keys(v).forEach(I=>{const M=k(I);if(C.listeners.has(M)){const S=C.listeners.get(M);S.splice(0,S.length)}})})};t&&T();const N=a.computed(()=>({position:"absolute",top:0,bottom:0,left:0,width:"1px","background-color":"#ebeef5"}));return{registerResizeEvent:T,resetResizeEvents:L,dragOffsetX:m,dragOffsetXStyle:N}};const hb=(e,t,n,i,s)=>{const{getColumns:o}=pl(e,t),c=a.ref(200),d=a.ref(void 0),u=a.computed(()=>e.pagination&&e.data.length),f=a.computed(()=>ze({[je("table")]:!0,"has-footer":u.value,"has-scroll-y":d.value||e.virtualEnabled},eb(e.border))),m=ze({[je("table-head")]:!0,"has-settings":!!e.settings}),p=tu(e),y=a.computed(()=>({"--row-height":`${St(p,"height",["thead"])}px`,"--scroll-head-left":`-${i.scrollTranslateX}px`,"--scroll-left":`${i.scrollTranslateX}px`})),b={[je("table-body")]:!0},v=a.computed(()=>ze({[je("table-footer")]:!0,["is-hidden"]:!e.pagination||!e.data.length})),k=()=>{const j=o();if(j.every(O=>/^\d+\.?\d*(px)?$/ig.test(`${O.width}`))){const O=j.reduce((P,G)=>P+Number(`${G.width}`.replace(/px/ig,"")),0),W=d.value?$c:0;return`${O+W}px`}return"100%"},T=a.computed(()=>({minHeight:Eh(e.minHeight,"auto"),width:k(),maxWidth:"100%"})),L=(j,O)=>{const W=String(j);if(/^\d+\.?\d*$/.test(W))return Number(W);if(/^\d+\.?\d*px$/ig.test(W))return Number(W.replace("px",""));if(/^\d+\.?\d*%$/ig.test(W)&&typeof O=="number"){const P=Number(W.replace("%",""));return O*P/100}return O},N=a.reactive({display:"","min-height":"",height:"",maxHeight:""}),C=()=>e.showHead?L(e.headHeight,ci):0,I=()=>{const j=L(e.height,c.value),O=C(),W=L(e.minHeight,c.value),P=e.pagination&&e.data.length?ci:0,G=j-O-P,B=e.height!=="auto"?`${G}px`:!1,ie=W-O-P,le=L(e.maxHeight,void 0),ve=typeof le=="number"?`${le-O-P}px`:!1;Object.assign(N,{display:s!=null&&s.length?"block":!1,"min-height":`${ie}px`,height:B,maxHeight:ve})};a.onMounted(()=>{M(n==null?void 0:n.value)});const M=j=>{if(j){const{height:O}=j.parentElement.getBoundingClientRect();c.value=O,I(),S(j)}},S=j=>{const O=e.virtualEnabled?`.${je("virtual-section")}`:`.${je("table-body-content")}`,W=j.querySelector(".bk-table-body");d.value=nb(W,O,0)};return{tableClass:f,headClass:m,contentClass:b,footerClass:v,wrapperStyle:T,contentStyle:N,headStyle:y,resetTableHeight:M,updateBorderClass:S,getColumnsWidthOffsetWidth:()=>{let j=0;return d.value&&(j=j+$c),e.border.includes(fl.OUTER)&&!e.border.includes(fl.NONE)&&(j=j+2),j},hasFooter:u,hasScrollY:d}},gb=(e,t)=>{var K,$;const n=a.reactive([]),{getColumns:i}=pl(e,t),s=V=>{if(/^\d+/.test(`${V.minWidth}`))return V.minWidth;let J=Ga;return V.sort&&(J=J+18),V.filter&&(J=J+28),J},o=V=>{var U,q;const J=(V==null?void 0:V.checked)||((U=e.settings)==null?void 0:U.checked)||[],re=(V==null?void 0:V.fields)||((q=e.settings)==null?void 0:q.fields)||[];n.splice(0,n.length,...i().map(ce=>Se(Z({},ce),{calcWidth:null,resizeWidth:null,minWidth:s(ce),listeners:new Map,isHidden:Jh(re,ce,J),[oi.COL_UID]:Li.v4(),[oi.COL_SOURCE_DATA]:ce})))},{dragOffsetXStyle:c,dragOffsetX:d,resetResizeEvents:u,registerResizeEvent:f}=fb(n,!0),{activeColumns:m}=db(e,t);a.watch(()=>[e.settings],()=>{var V;(((V=e.settings)==null?void 0:V.checked)||[]).length&&o()}),a.watch(()=>[e.columns,t],()=>{o(),u(),f()},{immediate:!0,deep:!0});const p=e.columns.reduce((V,J,re)=>{const U=St(J,["field","type"],[J,re]),q=Hh(J.sort);return q?Se(Z({},V||{}),{[U]:q==null?void 0:q.value}):V},null),y=a.reactive({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:m,settings:e.settings,setting:{size:(K=e.settings)==null?void 0:K.size,height:hl[($=e.settings)==null?void 0:$.size]},defaultSort:p||e.defaultSort}),b=V=>{var J;return y.rowActions.has(V)?(J=y.rowActions.get(V))==null?void 0:J.isExpand:!1},v=()=>{Array.isArray(y.defaultSort)&&y.defaultSort.splice(0),y.defaultSort=p||e.defaultSort},k=(V,J=void 0)=>{var q;const re=V[He.ROW_UID],U=typeof J=="boolean"?J:!b(re);y.rowActions.set(re,Object.assign({},(q=y.rowActions.get(re))!=null?q:{},{isExpand:U})),ie()},T=()=>y.rowActions.has(He.ROW_SELECTION_ALL)?y.rowActions.get(He.ROW_SELECTION_ALL):e.selectionKey?W.every(V=>j(V)):!1,L=V=>{const J=V[He.ROW_UID],{isSelected:re=!1}=y.rowActions.get(J)||{};return re},N=(V=L)=>{let J=!1,re=!1;W.forEach(U=>{const q=V(U);!J&&!q&&(J=!0),!re&&q&&(re=!0)}),y.rowActions.set(He.ROW_SELECTION_INDETERMINATE,re&&J)},C=()=>e.columns.some(V=>V.type==="selection"),I=()=>{C()&&N(V=>j(V))},M=(V=void 0)=>{const J=typeof V=="boolean"?V:!T();y.rowActions.set(He.ROW_SELECTION_ALL,J),y.rowActions.set(He.ROW_SELECTION_INDETERMINATE,!1),W.forEach((re,U)=>{var q;if(ml(e,{row:re,index:U,isCheckAll:!1})){const ce=re[He.ROW_UID],we=Object.assign({},(q=y.rowActions.get(ce))!=null?q:{},{isSelected:J});y.rowActions.set(ce,we)}}),N(),ie(J),ve(null,V,!0)},S=()=>{M(!1)},z=(V,J)=>{var U;const re=V[He.ROW_UID];if(re){const q=typeof J=="boolean"?J:!O(V,re),ce=Object.assign({},(U=y.rowActions.get(re))!=null?U:{},{isSelected:q});y.rowActions.set(re,ce),J||y.rowActions.set(He.ROW_SELECTION_ALL,!1),N(),ie(),ve(V,J,!1)}},j=(V,J=re=>L(re))=>typeof e.isSelectedFn=="function"?Reflect.apply(e.isSelectedFn,globalThis,[{row:V,data:e.data}]):typeof e.selectionKey=="string"&&e.selectionKey.length?ot.exports.get(V,e.selectionKey):J(V),O=(V,J,re)=>j(V,()=>{var q;const U=J===void 0?V[He.ROW_UID]:J;return ml(e,{row:V,index:re,isCheckAll:!1})&&T()?!0:y.rowActions.has(U)?(q=y.rowActions.get(U))==null?void 0:q.isSelected:!1}),W=a.reactive([]),P=a.computed(()=>n.some(V=>typeof V.rowspan=="function"||/^\d$/.test(`${V.rowspan}`)||typeof V.colspan=="function"||/^\d$/.test(`${V.colspan}`))),G=(V=!1)=>{let J=null;const re={};W.splice(0,W.length,...e.data.map((U,q)=>{const ce=tb(U,e,q),we=P.value?le(U,ce,q,re,J):{};return J=ce,Se(Z({},U),{[He.ROW_INDEX]:q,[He.ROW_UID]:ce,[He.ROW_EXPAND]:V?b(ce):!1,[He.ROW_SELECTION]:O(U,ce,q),[He.ROW_SOURCE_DATA]:Z({},U),[He.ROW_SKIP_CFG]:we})})),I()},B=(V,J,re,U)=>{const q=O(re,re[He.ROW_UID],U);return V&&typeof J=="boolean"?J:q},ie=V=>{let J=null;const re={};W.forEach((U,q)=>{const ce=U[He.ROW_UID],we=P.value?le(U,ce,q,re,J):{},X=ml(e,{row:U,index:q,isCheckAll:!1});Object.assign(U,{[He.ROW_EXPAND]:b(U[He.ROW_UID]),[He.ROW_SELECTION]:B(X,V,U,q),[He.ROW_SKIP_CFG]:we}),J=U[He.ROW_UID]}),typeof V!="boolean"&&I()},le=(V,J,re,U,q)=>{var X;let ce=0;const we=(X=U[q])!=null?X:{};return U[J]||(U[J]={}),n.forEach((H,Q)=>{var ue,me;const{colspan:ae,rowspan:D}=Qh(H,Q,V,re),_=H[oi.COL_UID],R=(me=(ue=we[_])==null?void 0:ue.skipRowLen)!=null?me:0,de={[_]:{skipRowLen:0,skipRow:!1,skipCol:!1,skipColLen:0}};ce>0&&(de[_].skipColLen=ce,de[_].skipCol=!0,ce=ce-1),R>1?(de[_].skipRowLen=R-1,de[_].skipRow=!0):D>1&&(de[_].skipRowLen=D,de[_].skipRow=!1),ae>1&&(de[_].skipColLen=ae,ce=ae-1),Object.assign(U[J],Z({},de))}),U[J]},ve=(V,J,re=!1)=>{if(e.asyncData&&e.rowKey){if(re)e.data.forEach(U=>{ot.exports.has(U,e.selectionKey)&&ot.exports.set(U,e.selectionKey,!!J)});else if(ot.exports.has(V,e.selectionKey)){const U=e.data.find(q=>ot.exports.get(q,e.rowKey)===ot.exports.get(V,e.rowKey));ot.exports.set(U,e.selectionKey,!!J)}}},{renderFixedColumns:Ie,fixedWrapperClass:ge}=iu(e,n,!1);return{colgroups:n,dragOffsetXStyle:c,dragOffsetX:d,reactiveSchema:y,indexData:W,fixedWrapperClass:ge,initIndexData:G,updateIndexData:ie,renderFixedColumns:Ie,setRowExpand:k,updateColGroups:o,clearSelection:S,toggleAllSelection:M,toggleRowSelection:z,getSelection:()=>W.filter(V=>O(V)),clearSort:v}};var mb=a.defineComponent({name:"Table",props:H5,emits:V5,setup(e,t){let n=null,i=null,s=null,o=null;const c=a.reactive([]),{initColumns:d}=pl(e,c);a.provide(Sh,d);const u=a.ref(),f=a.ref(),m=a.ref(0),{colgroups:p,dragOffsetXStyle:y,dragOffsetX:b,reactiveSchema:v,indexData:k,renderFixedColumns:T,setRowExpand:L,initIndexData:N,fixedWrapperClass:C,clearSelection:I,toggleAllSelection:M,toggleRowSelection:S,getSelection:z,clearSort:j,updateColGroups:O}=gb(e,c),{pageData:W,localPagination:P,resolvePageData:G,watchEffectFn:B}=B5(e,k),{tableClass:ie,headClass:le,contentClass:ve,footerClass:Ie,wrapperStyle:ge,contentStyle:he,headStyle:K,updateBorderClass:$,resetTableHeight:V,getColumnsWidthOffsetWidth:J,hasFooter:re}=hb(e,c,u,v,W),U=new ub(e,t,v,p),q=()=>{const ue=u.value.querySelector(".bk-table-body-content"),me=ue.querySelector("table");if(me){const te=me.scrollWidth,se=ue.clientWidth;m.value=te-se}};a.watch(()=>[e.data,e.pagination,e.height,e.maxHeight,e.minHeight],()=>{N(e.reserveExpand),B(s,n,i),a.nextTick(()=>{V(u.value),$(u.value)})},{immediate:!0,deep:!0}),a.watchEffect(()=>{if((u==null?void 0:u.value)instanceof HTMLElement){const ue=J();eu(u.value,p,20,ue),q()}}),U.on(pn.ON_SORT_BY_CLICK,ue=>{var ke,Oe;const{sortFn:me,column:te,index:se,type:be}=ue;typeof me=="function"&&(n=me,i=te,G(s,n,i),(Oe=(ke=f.value)==null?void 0:ke.reset)==null||Oe.call(ke)),t.emit(Et.COLUMN_SORT,{column:a.unref(te[oi.COL_SOURCE_DATA]),index:se,type:be})}).on(pn.ON_FILTER_CLICK,ue=>{var ke,Oe;const{filterFn:me,checked:te,column:se,index:be}=ue;typeof me=="function"&&(s=me,G(s,n,i),(Oe=(ke=f.value)==null?void 0:ke.reset)==null||Oe.call(ke)),t.emit(Et.COLUMN_FILTER,{checked:te,column:a.unref(se[oi.COL_SOURCE_DATA]),index:be})}).on(pn.ON_SETTING_CHANGE,ue=>{const{checked:me=[],size:te,height:se,fields:be}=ue;a.nextTick(()=>{var Oe,Ve;O({checked:me,fields:be}),$(u.value);const ke=J();me.length&&eu(u.value,p,Ga,ke),(Ve=(Oe=f.value)==null?void 0:Oe.reset)==null||Ve.call(Oe),t.emit(Et.SETTING_CHANGE,{checked:me,size:te,height:se,fields:be})})}).on(pn.ON_ROW_EXPAND_CLICK,ue=>{const{row:me,column:te,index:se,rows:be,e:ke}=ue;t.emit(Et.ROW_EXPAND_CLICK,{row:a.unref(me[He.ROW_SOURCE_DATA]),column:a.unref(te[oi.COL_SOURCE_DATA]),index:se,rows:be,e:ke}),L(me,!me[He.ROW_EXPAND])}).on(pn.ON_ROW_CHECK,({row:ue,isAll:me,index:te,value:se})=>{me?(M(se),t.emit(Et.ROW_SELECT_ALL,{checked:se,data:e.data})):(S(ue,se),t.emit(Et.ROW_SELECT,{row:a.unref(ue[He.ROW_SOURCE_DATA]),index:te,checked:se,data:e.data})),t.emit(Et.ROW_SELECT_CHANGE,{row:a.unref(ue[He.ROW_SOURCE_DATA]),isAll:me,index:te,checked:se,data:e.data})});const ce=ue=>{var Ve;const me=(Ve=v.pos.bottom)!=null?Ve:0,te=ue[1],{translateX:se,translateY:be,pos:ke={}}=te;v.scrollTranslateY=be,v.scrollTranslateX=se,v.pos=ke;const{bottom:Oe}=ke;Oe<=2&&me>Oe&&Es(60,()=>{t.emit(Et.SCROLL_BOTTOM,Se(Z({},ke),{translateX:se,translateY:be}))},!0)(),q()};a.onMounted(()=>{o=Vh(u.value,()=>{(e.height==="100%"||e.height==="auto")&&V(u.value),$(u.value);const ue=J();eu(u.value,p,20,ue)},60,!0),o.start()}),a.onBeforeUnmount(()=>{o.stop(),o=null,U.destroy()}),t.expose({setRowExpand:L,clearSelection:I,toggleAllSelection:M,toggleRowSelection:S,getSelection:z,clearSort:j});const we=a.computed(()=>Se(Z({},ve),{"__is-empty":!W.length})),X=a.computed(()=>({[je("table-body-content")]:!0,"with-virtual-render":e.virtualEnabled})),H={column_drag_line:!0,"offset-x":!0},Q=a.computed(()=>Se(Z({},y.value),{left:`${b.value-v.scrollTranslateX}px`})),ae={"scroll-loading":!0,_bottom:!0},D=a.computed(()=>({[je("fixed-bottom-border")]:!0,"_is-empty":!e.data.length})),_={zIndex:-1,width:0,height:0,display:"none"},{renderScrollLoading:R}=F5(e,t),de=a.computed(()=>e.virtualEnabled?{}:{scrollXName:"",scrollYName:""});return()=>{var ue,me;return a.createVNode("div",{class:ie.value,style:ge.value,ref:u},[a.createVNode("div",{class:le,style:K.value},[U.renderTableHeadSchema()]),a.createVNode(Wr,a.mergeProps({ref:f,lineHeight:U.getRowHeight,class:we.value,style:he,list:W},de.value,{contentClassName:X.value,onContentScroll:ce,throttleDelay:0,scrollEvent:!0,enabled:e.virtualEnabled}),{default:te=>U.renderTableBodySchema(te.data||e.data),afterSection:()=>a.createVNode("div",{class:D.value},null)}),a.createVNode("div",{class:C},[T(v.scrollTranslateX,m.value),a.createVNode("div",{class:H,style:Q.value},null),a.createVNode("div",{class:ae},[R()])]),a.createVNode("div",{class:Ie.value},[re.value&&U.renderTableFooter(P.value)]),a.createVNode("div",{style:_},[(me=(ue=t.slots).default)==null?void 0:me.call(ue)])])}}});const Yh=Ge(mb);Ge(Ah);const Uh=Ge(Ah),Za=12;function pb(e){const t=a.reactive({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:(s=[])=>{t.curPage=1,t.totalSize=s.length,t.totalPage=Math.ceil(t.totalSize/t.pageSize)||1;const o=[];if(t.pageSize>0)for(let c=0;c<t.totalSize;c+=t.pageSize)o.push(s.slice(c,c+t.pageSize));t.renderListPaged.splice(0,t.renderListPaged.length,...o),t.curPageList.splice(0,t.curPageList.length,...t.renderListPaged[t.curPage-1]||[])},pageChange:s=>{t.curPage=s,t.curPageList.splice(t.curPageList.length,0,...t.renderListPaged[t.curPage-1]||[]),t.isPageLoading=!1}}}function bb(e){const{useGroup:t,saveKey:n,displayKey:i,list:s}=a.toRefs(e),o=a.ref([]),c=a.ref({});return a.watch([t,n,i,s],()=>{o.value=[];let d=a.markRaw(s.value);t.value&&(d=d.reduce((u,f)=>{let m=[];return f.children&&(m=f.children.map(p=>Z({group:{groupId:f[n.value],groupName:f[i.value]}},p))),u.concat(m)},[])),o.value=d,c.value=d.reduce((u,f)=>(u[f[n.value]]=f,u),{})},{immediate:!0}),{flatList:o,saveKeyMap:c}}const $h=e=>{const t=e.length;let n=0;for(let i=0;i<t;i++)(e.charCodeAt(i)&65280)!==0&&(n+=1),n+=1;return n},yb=(e,t,n)=>{a.watch([n,t],()=>{s()},{flush:"post"});const i=a.ref(null),s=()=>{!t.value||(i.value=null,setTimeout(()=>{const o=Array.from(e.value.querySelectorAll(".tag-item")),c=o.findIndex((d,u)=>u?o[u-1].offsetTop!==d.offsetTop:!1);i.value=c>0?c-1:null}))};return{overflowTagIndex:i}};var Kh=a.defineComponent({name:"ListTagRender",props:{node:g.object,searchKey:g.oneOfType([g.string,g.arrayOf(g.string)]),displayKey:g.string,searchKeyword:g.string,tpl:{type:Function}},render(){const e=n=>{if(this.searchKeyword){const i=new RegExp(`(${this.searchKeyword})`,"i");return n.replace(i,'<strong class="highlight-text">$1</strong>')}return n};if(this.tpl)return this.tpl(this.node,e,a.h,this);const t=this.node[this.displayKey];return a.createVNode("div",{class:"bk-selector-node"},[a.createVNode("span",{class:"text",innerHTML:e(t)},[t])])}});const Cb=()=>({modelValue:g.arrayOf(g.string).def([]),placeholder:g.string.def("\u8BF7\u8F93\u5165\u5E76\u6309 Enter \u7ED3\u675F"),list:g.arrayOf(g.object).def([]),disabled:g.bool.def(!1),tooltipKey:g.string.def(""),saveKey:g.string.def("id"),displayKey:g.string.def("name"),hasDeleteIcon:g.bool.def(!1),clearable:g.bool.def(!0),trigger:Pe("treeTriggerType",{}).def("search"),searchKey:g.oneOfType([g.string,g.arrayOf(g.string)]).def("name"),useGroup:g.bool.def(!1),allowCreate:g.bool.def(!1),maxData:g.number.def(-1),maxResult:g.number.def(10),contentMaxHeight:g.number.def(300),contentWidth:g.number.def(190),separator:g.string.def(""),allowNextFocus:g.bool.def(!0),allowAutoMatch:g.bool.def(!1),showClearOnlyHover:g.bool.def(!1),leftSpace:g.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 vb=a.defineComponent({name:"TagRender",directives:{bkTooltips:tl},props:{node:g.object,displayKey:g.string,tpl:{type:Function},hasTips:{type:Boolean,default:!1},tagOverflowTips:{type:Object,default:()=>({})}},setup(e){const t=a.ref(),n=a.ref(!1),i=a.computed(()=>Z({boundary:"window",theme:"light",distance:12,content:e.node[e.displayKey],disabled:e.hasTips||!n.value},e.tagOverflowTips));return a.onMounted(()=>{n.value=U4(t.value)}),{overflowTips:i,tagRef:t}},render(){return this.tpl?this.tpl(this.node,a.h,this):a.withDirectives(a.createVNode("div",{class:"tag",ref:"tagRef"},[a.createVNode("span",{class:"text"},[this.node[this.displayKey]])]),[[a.resolveDirective("bk-tooltips"),this.overflowTips]])}}),wb=a.defineComponent({name:"TagInput",directives:{bkTooltips:tl},props:Cb(),emits:["update:modelValue","change","select","focus","blur","remove","removeAll"],setup(e,{emit:t}){const n=xn(),i=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),s=a.reactive(Z({isShow:!1,width:190,offset:{mainAxis:4,crossAxis:0}},e.popoverProps)),{maxResult:o}=a.toRefs(e),{pageState:c,initPage:d,pageChange:u}=pb(o),f=a.ref(""),m=a.ref(null),p=a.ref(null),y=a.ref(null),b=a.ref(null),v=a.ref(null),k=a.ref(null),T=a.computed(()=>!e.disabled&&e.hasDeleteIcon),L=a.computed(()=>e.maxData===1),N=a.computed(()=>M.selectedTagList.length===0&&f.value===""&&!i.isEdit),C=a.computed(()=>e.clearable&&!e.disabled&&M.selectedTagList.length!==0&&(e.showClearOnlyHover?i.isHover:!0)),I=a.computed(()=>({"bk-tag-input-trigger":!0,active:i.isEdit,disabled:e.disabled})),M=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),S=a.computed(()=>M.selectedTagList.map(te=>te[e.saveKey])),{flatList:z,saveKeyMap:j}=bb(e),O=a.computed(()=>{if(e.useGroup){const te={};return c.curPageList.forEach((se,be)=>{se.__index__=be,te[se.group.groupId]||(te[se.group.groupId]={id:se.group.groupId,name:se.group.groupName,children:[]}),te[se.group.groupId].children.push(se)}),Object.keys(te).map(se=>te[se])}return c.curPageList});a.watch([()=>z.value],()=>{a.nextTick(()=>{ie()})}),a.watch(()=>e.modelValue,te=>{var se;Ie(S.value,te)||(a.nextTick(()=>{ie()}),e.withValidate&&((se=n==null?void 0:n.validate)==null||se.call(n,"change")))}),a.watch(f,ot.exports.debounce(()=>{const te=c.curPageList.length!==0,{value:se}=f;se!==""&&te||se===""&&e.trigger==="focus"&&te?s.isShow=!0:(e.trigger!=="focus"||!te)&&(s.isShow=!1)},150)),a.watch(()=>s.isShow,te=>{W(),te&&v.value&&(a.nextTick(()=>{v.value.scrollTop=0}),v.value.removeEventListener("scroll",P),v.value.addEventListener("scroll",P))}),a.onMounted(()=>{ie()});const W=()=>{var te;s.offset.crossAxis=L.value?0:(te=b.value)==null?void 0:te.offsetLeft},P=()=>{if(c.isPageLoading||v.value.scrollTop===0)return;const{scrollTop:te,offsetHeight:se,scrollHeight:be}=v.value;if(te+se>=be){const ke=c.curPage+1;ke<=c.totalPage&&(c.isPageLoading=!0,setTimeout(()=>{u(ke)},500))}},G=()=>{var se;return Array.from(((se=y.value)==null?void 0:se.childNodes)||[]).filter(be=>![Node.TEXT_NODE,Node.COMMENT_NODE].includes(be.nodeType))},B=te=>{if(!e.disabled){if(te!=null&&te.target){const{className:se}=te.target;(se.indexOf("bk-tag-input-trigger")>-1||se.indexOf("tag-list")>-1)&&y.value.appendChild(b.value)}clearTimeout(k.value),L.value&&S.value.length&&(M.tagListCache=[...S.value],M.selectedTagListCache=[...M.selectedTagList],f.value=M.selectedTagListCache[0][e.saveKey],de(M.selectedTagList[0],0),V()),i.isEdit=!0,a.nextTick(()=>{var se;(se=m.value)==null||se.focus(),e.trigger==="focus"&&M.localList.length!==0&&(le(),s.isShow?W():s.isShow=!0)})}},ie=()=>{const{saveKey:te,modelValue:se,displayKey:be,allowCreate:ke,trigger:Oe}=e;if(M.selectedTagList=[],M.localList=z.value,se.length){const Ve={};M.selectedTagList=se.map(et=>{const rn=j.value[et];return Ve[et]=1,!rn&&ke?{[te]:et,[be]:et}:rn}).filter(et=>et),L.value||(M.localList=M.localList.filter(et=>!Ve[et[te]]))}Oe==="focus"&&le()},le=(te="")=>{const{searchKey:se,filterCallback:be}=e,ke=te.toLowerCase().trim();if(ke===""){d(M.localList);return}let Oe=[];typeof be=="function"?Oe=be(ke,se,M.localList)||[]:Array.isArray(se)?Oe=M.localList.filter(Ve=>se.some(et=>Ve[et].toLowerCase().indexOf(ke)>-1)):Oe=M.localList.filter(Ve=>Ve[se].toLowerCase().indexOf(ke)>-1),d(Oe)},ve=(te,se)=>{const be={"bk-selector-actived":!1,"bk-selector-selected":S.value.includes(te[e.saveKey])};return e.useGroup?be["bk-selector-actived"]=te.__index__===i.focusItemIndex:be["bk-selector-actived"]=se===i.focusItemIndex,be};function Ie(te,se){return te.length!==se.length?!1:se.every((be,ke)=>te[ke]===be)}const ge=()=>{M.tagListCache=[],M.selectedTagListCache=[],M.selectedTagList=[]},he=()=>{f.value=""},K=()=>{if(L.value)return 0;const se=G().findIndex(({id:be})=>be==="tagInputItem");return se>=0?se:0},$=(te,se,be=!1)=>{if(!se||!te)return;let ke=se;be&&(ke=se.nextElementSibling||null),se.parentNode.insertBefore(te,ke)},V=te=>{const{maxData:se,trigger:be,allowCreate:ke}=e;if(se===-1||se>S.value.length){const{value:Oe}=te!=null&&te.target?te.target:f,Ve=$h(Oe);Ve?(le(Oe),m.value.style.width=`${Ve*Za}px`):be==="focus"&&le()}else re(),f.value="",s.isShow=!1;i.isEdit=!0,i.focusItemIndex=ke?-1:0},J=()=>{var te;s.width=L.value?(te=p.value)==null?void 0:te.clientWidth:e.contentWidth,t("focus")},re=()=>{k.value=setTimeout(()=>{var se;const te=f.value;if(he(),i.isEdit=!1,L.value){const[be]=M.tagListCache;te&&te===be&&M.selectedTagListCache.length?R(M.selectedTagListCache[0],"select"):ce("remove")}else if(e.allowAutoMatch&&te){const be=c.curPageList.find(ke=>Array.isArray(e.searchKey)?e.searchKey.map(Ve=>ke[Ve]).includes(te):ke[e.searchKey]===te);be?U(be,"select"):e.allowCreate&&U(te,"custom")}s.isShow=!1,t("blur",te,S.value),(se=n==null?void 0:n.validate)==null||se.call(n,"blur")},200)},U=(te,se,be)=>{be==null||be.stopPropagation(),!(!te||te.disabled)&&(L.value&&ge(),R(te,se),ce("select"),he(),s.isShow=!1)},q=(te,se,be)=>{be==null||be.stopPropagation(),de(te,se),he(),ce("remove",te),m.value.style.width=`${Za}px`},ce=(te,se)=>{t(te,se),t("update:modelValue",S.value),t("change",S.value)},we=te=>{te.stopPropagation();const se=M.selectedTagList;M.selectedTagList=[];const be=se.filter(ke=>j.value[ke[e.saveKey]]);(e.allowCreate&&be.length!==0||!e.allowCreate)&&!L.value&&M.localList.push(...be),ce("removeAll")},X=()=>{const te={height:v.value.clientHeight,yAxis:v.value.getBoundingClientRect().y};a.nextTick(()=>{const se=v.value.querySelector(".bk-selector-actived");if(!se)return;const be={height:se.clientHeight,yAxis:se.getBoundingClientRect().y};be.yAxis<te.yAxis&&(v.value.scrollTop=v.value.scrollTop-(te.yAxis-be.yAxis));const ke=be.yAxis+be.height-te.yAxis;ke>te.height&&(v.value.scrollTop=v.value.scrollTop+ke-te.height)})},H=(te,se)=>{const be=G();$(b.value,be[te-1]),M.selectedTagList.splice(te-1,1),B();const ke=j.value[se[e.saveKey]];(e.allowCreate&&ke||!e.allowCreate)&&!L.value&&M.localList.push(se),m.value=`${Za}px`,ce("remove")},Q=te=>{if(c.isPageLoading)return;let se;const be=te.target.value,ke=$h(be),Oe=K(),Ve=G();switch(te.code){case"ArrowUp":if(te.preventDefault(),!s.isShow)return;i.focusItemIndex=i.focusItemIndex-1,i.focusItemIndex=i.focusItemIndex<0?-1:i.focusItemIndex,i.focusItemIndex===-1&&(i.focusItemIndex=c.curPageList.length-1),X();break;case"ArrowDown":if(te.preventDefault(),!s.isShow)return;i.focusItemIndex=i.focusItemIndex+1,i.focusItemIndex=i.focusItemIndex>c.curPageList.length-1?c.curPageList.length:i.focusItemIndex,i.focusItemIndex===c.curPageList.length&&(i.focusItemIndex=0),X();break;case"ArrowLeft":if(i.isEdit=!0,!ke){if(Oe<1)return;$(b.value,Ve[Oe-1]),B()}break;case"ArrowRight":if(i.isEdit=!0,!ke){if(Oe===Ve.length-1)return;$(Ve[Oe+1],b.value),B()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&s.isShow||e.allowCreate&&i.focusItemIndex>=0&&s.isShow?U(c.curPageList[i.focusItemIndex],"select",te):e.allowCreate&&f.value.trim()&&U(f.value,"custom",te),te.preventDefault();break;case"Backspace":Oe!==0&&!f.value&&(se=M.selectedTagList[Oe-1],H(Oe,se));break}},ae=te=>{const se=[],be=te.split(";"),ke=/^[a-zA-Z][a-zA-Z_]*/g;return be.forEach(Oe=>{const Ve=Oe.match(ke);if(Ve){const et=Ve.join("");se.push({[e.saveKey]:et,[e.displayKey]:et})}}),se},D=te=>{if(te.preventDefault(),L.value)return!1;const{maxData:se,saveKey:be,displayKey:ke,pasteFn:Oe,allowCreate:Ve}=e,et=te.clipboardData.getData("text");let tt=(Oe?Oe(et):ae(et)).map(rt=>rt[be]);if(tt.length){const rt=G(),Cn=K(),ft=M.localList.map(Fe=>Fe[be]);if(tt=tt.filter(Fe=>{const zt=(Fe==null?void 0:Fe.trim())&&!S.value.includes(Fe);return Ve?zt:zt&&ft.includes(Fe)}),se!==-1){const Fe=M.selectedTagList.length;if(Fe<se){const zt=se-Fe;tt.length>zt&&(tt=[...tt.slice(0,zt)])}else tt=[]}const ct=Ve?tt.map(Fe=>{const zt=M.localList.find(ma=>ma[be]===Fe);return zt!=null?zt:{[be]:Fe,[ke]:Fe}}):M.localList.filter(Fe=>tt.includes(Fe[be]));tt.length&&(M.selectedTagList.splice(Cn,0,...ct),$(b.value,rt[Cn]),m.value.style.width=`${Za}px`,M.localList=M.localList.filter(Fe=>!tt.includes(Fe[be])),ce("select"),B())}},_=te=>{e.disabled||($(b.value,te.currentTarget,!0),m.value.style.width=`${Za}px`,s.isShow&&W())},R=(te,se)=>{if(M.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:be,saveKey:ke,displayKey:Oe,createTagValidator:Ve}=e,et=K();let rn=1,tt=!1,rt;const Cn=ft=>typeof Ve=="function"?Ve(ft):!0;if(se==="custom")if(be){let ft=te.split(be);ft=ft.filter(Fe=>(Fe==null?void 0:Fe.trim())&&!S.value.includes(Fe)&&Cn(Fe));const ct=ft.map(Fe=>j.value[Fe]||{[ke]:Fe,[Oe]:Fe});ft.length&&(M.selectedTagList.splice(et,0,...ct),rn=ct.length,tt=!0)}else{const ft=typeof te=="object";if(rt=ft?te[ke]:te.trim(),rt=rt.replace(/\s+/g,""),rt!==void 0&&!S.value.includes(rt)&&Cn(rt)){const ct=j.value[rt]||(ft?te:{[ke]:rt,[Oe]:rt});M.selectedTagList.splice(et,0,ct),tt=!0}}else te&&(rt=te[ke],rt!==void 0&&!S.value.includes(rt)&&(M.selectedTagList.splice(et,0,te),tt=!0));tt&&a.nextTick(()=>{for(let ft=1;ft<=rn;ft++){const Fe=G()[et+ft];$(Fe,b.value)}if(m.value.style.width=`${Za}px`,!L.value){e.allowNextFocus&&B();const ft=S.value.reduce((ct,Fe)=>(ct[Fe]=1,ct),{});M.localList=M.localList.filter(ct=>!ft[ct[ke]])}})},de=(te,se)=>{M.selectedTagList.splice(se,1);const be=j.value[te[e.saveKey]];(e.allowCreate&&be||!e.allowCreate)&&!L.value&&M.localList.push(te)},ue=a.computed(()=>e.collapseTags?e.collapseTags&&!i.isEdit:e.collapseTags),{overflowTagIndex:me}=yb(p,ue,S);return Se(Z(Z(Z({popoverProps:s},a.toRefs(i)),a.toRefs(M)),a.toRefs(c)),{isShowPlaceholder:N,isShowClear:C,curInputValue:f,renderList:O,showTagClose:T,tagInputRef:m,bkTagSelectorRef:p,tagListRef:y,tagInputItemRef:b,selectorListRef:v,triggerClass:I,overflowTagIndex:me,localCollapseTags:ue,focusInputTrigger:B,activeClass:ve,handleInput:V,handleFocus:J,handleBlur:re,handleTagSelected:U,handleTagRemove:q,handleClear:we,tagFocus:_,handleKeydown:Q,handlePaste:D})},render(){return a.createVNode("div",{class:"bk-tag-input",ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode(mn,a.mergeProps({theme:"light bk-tag-input-popover-content",trigger:"manual",placement:"bottom-start",arrow:!1},this.popoverProps),{default:()=>{var e,t,n;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`}},[this.selectedTagList.map((i,s)=>{const o={boundary:"window",theme:"light",distance:12,content:i[this.tooltipKey],disabled:!this.tooltipKey},c=this.localCollapseTags&&this.overflowTagIndex&&s>=this.overflowTagIndex;return a.withDirectives(a.createVNode("li",{class:"tag-item",style:{display:c?"none":""},onClick:this.tagFocus},[a.createVNode(vb,{node:i,tpl:this.tagTpl,displayKey:this.displayKey,hasTips:!!this.tooltipKey,tagOverflowTips:this.tagOverflowTips},null),this.showTagClose?a.createVNode(Hn,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,i,s)},null):null]),[[a.resolveDirective("bk-tooltips"),o]])}),a.withDirectives(a.createVNode("li",{ref:"tagInputItemRef",id:"tagInputItem",class:"tag-input-item",role:"input"},[a.withDirectives(a.createVNode("input",{type:"text",class:"tag-input",ref:"tagInputRef","onUpdate:modelValue":i=>this.curInputValue=i,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onPaste:this.handlePaste},null),[[a.vModelText,this.curInputValue]])]),[[a.vShow,this.isEdit]]),!!this.overflowTagIndex&&this.localCollapseTags&&a.createVNode("li",{class:"tag-item"},[a.createVNode("div",{class:"tag"},[a.createVNode("span",{class:"text"},[a.createTextVNode("+"),this.selectedTagList.length-this.overflowTagIndex])])])]),a.withDirectives(a.createVNode("p",{class:"placeholder"},[this.placeholder]),[[a.vShow,this.isShowPlaceholder]]),(n=(t=(e=this.$slots)==null?void 0:e.suffix)==null?void 0:t.call(e))!=null?n:this.isShowClear&&a.createVNode(Zt,{class:"clear-icon",onClick:this.handleClear},null)])},content:()=>a.createVNode("div",{class:"bk-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:"bk-selector-group-item"},[a.createVNode("span",{class:"group-name"},[e.name,a.createTextVNode(" ("),e.children.length,a.createTextVNode(")")]),a.createVNode("ul",{class:"bk-selector-group-list-item"},[e.children.map((n,i)=>a.createVNode("li",{class:["bk-selector-list-item",{disabled:n.disabled},this.activeClass(n,i)],onClick:this.handleTagSelected.bind(this,n,"select")},[a.createVNode(Kh,{node:n,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]))])]):a.createVNode("li",{class:["bk-selector-list-item",{disabled:e.disabled},this.activeClass(e,t)],onClick:this.handleTagSelected.bind(this,e,"select")},[a.createVNode(Kh,{node:e,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)])),this.isPageLoading?a.createVNode("li",{class:"bk-selector-list-item loading"},[a.createVNode(xi,{theme:"primary",size:ii.Small},null)]):null])])})])}});const Xh=Ge(wb),Mb={direction:qf(),align:Uo().def(zs.CENTER),color:g.string.def("#dde4eb"),width:g.number.def(1),type:e0()};var Ib=a.defineComponent({name:"Divider",props:Mb,render(){const e=()=>this.direction==="vertical"?{borderRight:`${this.width}px ${this.type} ${this.color}`}:{borderBottom:`${this.width}px ${this.type} ${this.color}`};let t;return this.$slots.default&&(t=a.createVNode("div",{class:[je("divider-info"),je(`divider-info-${this.align}`)]},[this.$slots.default()])),a.createVNode("div",{class:[je("divider"),je(`divider-${this.direction}`)],style:e()},[t])}});const qh=Ge(Ib);var e9=(e=>(e.CARD="card",e.BORDER_CARD="border-card",e.UNBORDER_CARD="unborder-card",e.CARD_TAB="card-tab",e))(e9||{}),t9=(e=>(e.LEFT="left",e.RIGHT="right",e.TOP="top",e))(t9||{});const n9=Pe("position",{}).def("top");var i9=(e=>(e.REPLACE="replace",e.INSERT="insert",e))(i9||{});const a9=Pe("sortType",{}).def("replace"),Nb={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},Lb={active:g.oneOfType([g.number,g.string]).def(""),type:Pe("type",{}).def("border-card"),tabPosition:n9,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:a9,labelHeight:g.number.def(50),scrollStep:g.number.def(200),extCls:g.string.def(""),validateActive:g.bool.def(!0),showHeader:g.bool.def(!0),changeOnHover:g.bool.def(!1),changeOnHoverDelay:g.number.def(1e3)},kb=Z({active:g.oneOfType([g.number,g.string]).def(""),panels:{type:Array,default:()=>[]},tabPosition:n9,closable:Boolean,addable:Boolean,sortable:Boolean,sortType:a9,labelHeight:g.number.def(50),scrollStep:g.number.def(200),validateActive:g.bool.def(!0),changeOnHover:g.bool.def(!1),changeOnHoverDelay:g.number.def(1e3)},Nb),Tb={name:g.oneOfType([g.number,g.string]).def(""),label:g.string||g.func,closable:g.bool,visible:g.bool.def(!0),disabled:g.bool,sortable:g.bool,renderDirective:Yo(),panel:g.string||g.func};var r9=a.defineComponent({name:"TabNav",props:kb,setup(e){const t=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const d=[];let u=!1;return e.panels.filter((f,m)=>{if(!f.props)return null;const{name:p,label:y,closable:b,visible:v,disabled:k,sortable:T}=f.props;if(!v)return!1;e.active===p&&(u=!0);const L=N=>f.slots.label?a.h(f.slots.label):[void 0,""].includes(N)?`\u9009\u9879\u5361${m+1}`:typeof N=="string"?N:typeof N=="function"?a.h(N):N;return d.push({name:p,closable:b,visible:v,disabled:k,sortable:T,tabLabel:L(y)}),!0}),!u&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),d}),n=a.ref(-1),i=a.ref(-1),s=a.ref(""),o=(d,u)=>d===u;return Se(Z({},{handleTabAdd(d){e.tabAdd(d)},dragstart(d,u){i.value=d,s.value=e.guid,Object.assign(u.dataTransfer,{effectAllowed:"move"}),e.tabDrag(d,u)},dragenter(d){o(s.value,e.guid)&&(n.value=d)},dragend(){n.value=-1,i.value=-1,s.value=null},drop(d,u){if(!o(s.value,e.guid))return!1;e.tabSort(i.value,d,u)},handleTabChange(d){e.tabChange(d)},handleTabRemove(d,u){e.tabRemove(d,u)}}),{navs:t,dragenterIndex:n,dragStartIndex:i,draggingEle:s,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4)})},render(){const{active:e,closable:t,addable:n,sortable:i,sortType:s,labelHeight:o,dragstart:c,dragenter:d,dragend:u,drop:f}=this,m=()=>this.navs.map((y,b)=>{if(!y)return null;const{name:v,disabled:k,tabLabel:T}=y,L=()=>{const C=[je("tab-header-item")];return k&&C.push(je("tab-header--disabled")),e===v&&C.push(je("tab-header--active")),C.join(" ")},N=(C,I)=>C||I;return a.createVNode("div",{key:v,onClick:()=>this.handleTabChange(v),draggable:N(y.sortable,i),onDragstart:C=>c(b,C),onDragenter:C=>{C.preventDefault(),d(b)},onDragleave:C=>{C.preventDefault()},onDragover:C=>{C.preventDefault()},onDragend:C=>{C.preventDefault(),u()},onDrop:C=>{C.preventDefault(),f(b,s)},class:L()},[a.createVNode("div",null,[T]),N(y.closable,t)&&a.createVNode(Zt,{class:je("tab-header-item-close"),onClick:()=>this.handleTabRemove(b,y)},null)])}),p=()=>{var b,v;const y=[];return typeof this.$slots.add=="function"?y.push((v=(b=this.$slots).add)==null?void 0:v.call(b,a.h)):n&&y.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(Gs,{style:"display:flex;",width:26,height:26},null)])),y.length?a.createVNode("div",{class:je("tab-header-operation")},[y.map((k,T)=>a.createVNode("div",{class:je("tab-header-item"),key:T},[k]))]):null};return a.createVNode("div",{style:{lineHeight:`${o}px`},class:je("tab-header")},[a.createVNode("div",{class:je("tab-header-nav")},[m()]),p(),typeof this.$slots.setting=="function"&&a.createVNode("div",{class:je("tab-header-setting")},[this.$slots.setting()])])}}),Sb=a.defineComponent({name:"Tab",components:{TabNav:r9},props:Lb,emits:["add-panel","tab-change","remove-panel","sort-change","on-drag-tab","add","change","remove","update:active","sort","drag"],setup(e,{slots:t,emit:n}){const i=a.ref(!1),s=a.ref([]),o=a.getCurrentInstance(),c=(f,m=[])=>{const{children:p}=f;return(p||[]).forEach(y=>{let{type:b}=y;b=b.name||b,b==="TabPanel"&&y.component?m.push(y.component):(b===a.Fragment||b==="template")&&c(y,m)}),m},d=()=>{if(t.default){const{children:f}=o.subTree.children[1];if(!f)return;const m=f[0],p=c(m);p.length!==s.value.length&&(s.value=p)}};return a.onMounted(()=>{d(),i.value=!0}),a.onUpdated(()=>{d()}),Se(Z({},{tabAdd(f){n("add",{e:f}),n("add-panel",{e:f})},tabChange(f){n("change",f),n("tab-change",f),n("update:active",f)},tabRemove(f,m){n("remove",f,m),n("remove-panel",f,m)},tabSort(f,m,p){const y=s.value;if(p===i9.INSERT)if(f<m)y.splice(m+1,0,s[f]),y.splice(f,1);else if(f>m)y.splice(m,0,s[f]),y.splice(f+1,1);else return!1;else{const b=y[m];y[m]=y[f],y[f]=b}s.value=[...y],n("sort",f,m,p),n("sort-change",f,m,p)},tabDrag(f,m){n("drag",f,m),n("on-drag-tab",f,m)}}),{isMounted:i,panels:s})},render(){var n,i;const e=()=>{const s=[je("tab"),this.extCls];return this.tabPosition===t9.TOP?s.push(je(`tab--${this.tabPosition}`),je(`tab--${this.type}`)):(s.push(je(`tab--${this.tabPosition}`)),this.type===e9.CARD_TAB&&s.push(je("tab--vertical-tab"))),s},t=()=>{const{panels:s,active:o,type:c,closable:d,addable:u,sortable:f,sortType:m,labelHeight:p,scrollStep:y,validateActive:b,changeOnHover:v,changeOnHoverDelay:k,tabPosition:T,tabAdd:L,tabChange:N,tabRemove:C,tabSort:I,tabDrag:M}=this,S={panels:s,active:o,type:c,closable:d,addable:u,sortable:f,sortType:m,labelHeight:p,scrollStep:y,validateActive:b,changeOnHover:v,changeOnHoverDelay:k,tabPosition:T,tabAdd:L,tabChange:N,tabRemove:C,tabSort:I,tabDrag:M};return!s||!Array.isArray(s)?null:a.createVNode(r9,S,this.$slots)};return a.createVNode("div",{class:e()},[t(),a.createVNode("div",{class:je("tab-content")},[(i=(n=this.$slots).default)==null?void 0:i.call(n)])])}}),xb=a.defineComponent({name:"TabPanel",props:Tb,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;return a.withDirectives(a.createVNode("div",{ref:"content",class:je("tab-panel")},[t()]),[[a.vShow,e]])}});const s9=Gt(Sb,{TabPanel:xb}),Vi={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let l9=1;const o9=(e,t)=>{let n=t;const i=n.position||"top-right";typeof t=="string"&&(n={message:t});const s=t.onClose,o=n.offsetX||10;let c=n.offsetY||30;const{spacing:d=10}=n;Vi[i].forEach(y=>{c+=(y.el.offsetHeight||0)+d}),l9+=1;const u=`message_${l9}`;n=Se(Z({},n),{offsetX:o,offsetY:c,id:u});const f=document.createElement("div"),m=a.createVNode(e,n);m.props.onDestroy=y=>{Db(y,i,d,s),a.render(null,f)},a.render(m,f),Vi[i].push(m);let p;m.props.getContainer&&Aa(m.props.getContainer)?p=m.props.getContainer:p=document.body,p.appendChild(f.firstElementChild)};function Db(e,t,n,i){i==null||i();const s=t.startsWith("top")?"top":"bottom";let o=-1;Vi[t].forEach((f,m)=>{f.props.id===e&&(o=m)});const d=Vi[t][o].el.offsetHeight,u=Vi[t].length;for(let f=o;f<u;f++){const m=parseInt(Vi[t][f].el.style[s],10)-d-n;Vi[t][f].component.props.offsetY=m}Vi[t].splice(o,1)}var au;(function(e){e.PRIMARY="primary",e.WARNING="warning",e.SUCCESS="success",e.ERROR="error"})(au||(au={}));const jb={id:g.string.def(""),message:g.string.def(""),theme:Pe("messageTheme",{}).def(au.PRIMARY),delay:g.number.def(3e3),dismissable:g.bool.def(!0),offsetY:g.number.def(30),spacing:g.number.def(10),extCls:g.string.def(""),onClose:g.func,getContainer:g.instanceOf(HTMLElement)};var zb=a.defineComponent({name:"Message",props:jb,emits:["destroy"],setup(e,{emit:t}){const n=a.computed(()=>["bk-message",`bk-message-${e.theme}`,`${e.extCls}`]),i=Rn.getMessageNextIndex(),s=a.computed(()=>e.getContainer&&Aa(e.getContainer)),o=a.computed(()=>({top:`${e.offsetY}px`,zIndex:i,position:s.value?"absolute":"fixed"})),c=a.ref(!1);let d=null;const u=()=>{d=setTimeout(()=>{c.value=!1},e.delay)},f=m=>{m.preventDefault(),m.stopPropagation(),c.value=!1};return a.onMounted(()=>{e.delay&&u(),c.value=!0}),a.onUnmounted(()=>{clearTimeout(d)}),a.watch(c,()=>{c.value||t("destroy",e.id)}),{classNames:n,styles:o,visible:c,close:f}},render(){const e=()=>({primary:a.createVNode(Fs,null,null),warning:a.createVNode(Ar,null,null),success:a.createVNode(zr,null,null),error:a.createVNode(Zt,null,null)})[this.theme];return a.createVNode(a.Transition,{name:"bk-message-fade"},{default:()=>[a.withDirectives(a.createVNode("div",{class:this.classNames,style:this.styles},[a.createVNode("div",{class:"bk-message-content"},[a.createVNode("div",{class:"bk-message-icon"},[e()]),this.message]),this.dismissable&&a.createVNode(Hn,{class:"bk-message-close",onClick:this.close},null)]),[[a.vShow,this.visible]])]})}});const c9=e=>{o9(zb,e)},u9=Ge(e=>{const t=document.createElement("div"),n=a.ref(!1),i=a.shallowRef(e),s=a.defineComponent({name:"DialogConfirm",setup(d,{expose:u}){a.onMounted(()=>{(document.activeElement||document.body).blur(),i.value.isShow!==!1&&(n.value=!0)});const f=async()=>{var b,v;typeof((b=i.value)==null?void 0:b.onClosed)=="function"&&await((v=i.value)==null?void 0:v.onClosed()),n.value=!1},m=async()=>{var b,v;typeof((b=i.value)==null?void 0:b.onConfirm)=="function"&&await((v=i.value)==null?void 0:v.onConfirm()),n.value=!1};function p(b){i.value=b}u({update:p});const y=()=>{const b=[],v=[];if(i.value.subTitle)switch(typeof i.value.subTitle){case"string":b.push(i.value.subTitle);break;case"function":b.push(i.value.subTitle());break;default:b.push(i.value.subTitle);break}return b.length&&v.push(a.h("div",{class:"bk-info-sub-title",style:`text-Align:${i.value.contentAlign||"center"}`},b)),v};return()=>a.createVNode(w0,Se(Z({class:"bk-info-wrapper",headerAlign:"center",footerAlign:"center"},i.value),{isShow:n.value,onClosed:f,onConfirm:m}),y())}}),o=a.createApp(s).mount(t);return{show:()=>{n.value=!0},hide:()=>{n.value=!1},update:d=>{o.update(d)}}});var ru;(function(e){e.PRIMARY="primary",e.WARNING="warning",e.SUCCESS="success",e.ERROR="error"})(ru||(ru={}));const Ob={id:g.string.def(""),title:g.string.def(""),message:g.oneOfType([g.string,g.func]).def(""),theme:Pe("notifyTheme",{}).def(ru.PRIMARY),position:g.position().def("top-right"),delay:g.number.def(5e3),dismissable:g.bool.def(!0),offsetX:g.number.def(100),offsetY:g.number.def(30),spacing:g.number.def(10),extCls:g.string.def(""),onClose:g.func};var Ab=a.defineComponent({name:"Notify",props:Ob,emits:["destroy"],setup(e,{emit:t}){const n=Rn.getMessageNextIndex(),i=a.computed(()=>e.position.indexOf("right")>1?"right":"left"),s=a.computed(()=>e.position.startsWith("top")?"top":"bottom"),o=a.computed(()=>({[i.value]:`${e.offsetX}px`,[s.value]:`${e.offsetY}px`,zIndex:n})),c=a.computed(()=>["bk-notify",`bk-notify-${e.theme}`,i.value]),d=a.computed(()=>typeof e.message=="function"?e.message():e.message),u=a.ref(!1);let f=null;const m=()=>{f=setTimeout(()=>{u.value=!1},e.delay)},p=()=>{u.value=!1};return a.onMounted(()=>{e.delay&&m(),u.value=!0}),a.onUnmounted(()=>{clearTimeout(f)}),a.watch(u,()=>{u.value||t("destroy",e.id)}),{classNames:c,styles:o,visible:u,renderMessage:d,handleClose:p}},render(){const e=()=>({primary:a.createVNode(Fs,null,null),warning:a.createVNode(Ar,null,null),success:a.createVNode(zr,null,null),error:a.createVNode(Zt,null,null)})[this.theme];return a.createVNode(a.Transition,{name:"bk-notify-fade"},{default:()=>[a.withDirectives(a.createVNode("div",{class:this.classNames,style:this.styles},[a.createVNode("div",{class:"bk-notify-content"},[a.createVNode("div",{class:"bk-notify-icon"},[e()]),this.title?a.createVNode("div",{class:"bk-notify-content-header"},[this.title]):"",a.createVNode("div",{class:"bk-notify-content-text"},[this.renderMessage])]),this.dismissable&&a.createVNode(Hn,{class:"bk-notify-icon bk-notify-close",onClick:this.handleClose},null)]),[[a.vShow,this.visible]])]})}});const d9=e=>{o9(Ab,e)},f9=Symbol("MENU_PROVIDER_KEY"),su=Symbol("MENU_PROVIDER_KEY_PATH"),Pb=e=>{a.provide(f9,e)},Eb=e=>{const{parentKeys:t,parentInfo:n}=lu(),i=a.computed(()=>[...t.value,e]);a.provide(su,{parentInfo:{key:e,parentKey:n==null?void 0:n.key},parentKeys:i})},h9=()=>a.inject(f9),lu=()=>{var n;const e=a.getCurrentInstance(),t=e.parent?e.parent.provides:(n=e.vnode.appContext)==null?void 0:n.provides;return t&&su in t?a.inject(su):{parentInfo:void 0,parentKeys:a.ref([])}},ou=function(e){return(e||"").split(" ").filter(t=>!!t.trim())};function g9(e,t){if(!e||!t)return;const n=ou(t);let i=e.getAttribute("class")||"";if(e.classList){e.classList.remove(...n);return}n.forEach(o=>{i=i.replace(` ${o} `," ")});const s=ou(i).join(" ");e.setAttribute("class",s)}function m9(e,t){if(!e)return;let n=e.getAttribute("class")||"";const i=ou(n),s=(t||"").split(" ").filter(o=>!i.includes(o)&&!!o.trim());e.classList?e.classList.add(...s):(n+=` ${s.join(" ")}`,e.setAttribute("class",n))}const Vb=()=>({css:!0,onBeforeEnter:e=>{m9(e,"collapse-transition"),e.dataset||(e.dataset={}),e.style.height="0px",e.style.maxHeight="0px"},onEnter:e=>{e.dataset.oldOverflow=e.style.overflow,e.scrollHeight!==0?(e.style.height=`${e.scrollHeight}px`,e.style.maxHeight=`${e.scrollHeight}px`):(e.style.height="0px",e.style.maxHeight="0px"),e.style.overflow="hidden"},onAfterEnter:e=>{e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow,g9(e,"collapse-transition")},onBeforeLeave:e=>{e.dataset||(e.dataset={}),e.dataset.oldOverflow=e.style.overflow,e.style.height=`${e.scrollHeight}px`,e.style.maxHeight=`${e.scrollHeight}px`,e.style.overflow="hidden"},onLeave:e=>{e.scrollHeight!==0&&(m9(e,"collapse-transition"),e.style.transitionProperty="height",e.style.height="0px",e.style.maxHeight="0px")},onAfterLeave:e=>{g9(e,"collapse-transition"),e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow}}),Jb={activeKey:String,collapse:Boolean,openedKeys:{type:Array},mode:{type:String,default:"vertical"},uniqueOpen:{type:Boolean,default:!0}};var Rb=a.defineComponent({name:"Menu",props:Jb,emits:["update:activeKey","update:openKeys","click","openChange"],setup(e,{slots:t,emit:n,expose:i}){const s=a.ref(""),o=a.ref([]),c=a.ref({}),d=a.computed(()=>e.mode),u=a.ref(e.collapse),f=a.ref([]);a.watchEffect(()=>{e.activeKey!==void 0&&(s.value=e.activeKey)}),a.watch(()=>e.collapse,()=>{u.value=e.collapse;const v=[...f.value],k=[...o.value];o.value=u.value?[]:v,f.value=u.value?k:[]},{immediate:!0}),a.watch(()=>e.openedKeys,(v=o.value)=>{o.value=v},{immediate:!0});const m=(v,k)=>{c.value=Se(Z({},c.value),{[v]:k})},p=v=>{delete c.value[v],c.value=Z({},c.value)},y=(v,k)=>{k?e.uniqueOpen?o.value=[v]:o.value.push(v):o.value=o.value.filter(T=>T!==v),n("openChange",k,c.value[v]),n("update:openKeys",[...o.value])},b=v=>{s.value=v,n("click",c.value[v]),n("update:activeKey",v,c.value[v])};return Pb({activeKey:s,menuStore:c,registerMenuInfo:m,unregisterMenuInfo:p,mode:d.value,openedKeys:o,collapse:u,handleOpenChange:y,handleActiveChange:b}),i({activeKey:s,openedKeys:o,menuStore:c}),()=>{var v;return a.createVNode("div",{class:{"bk-menu":!0,"is-collapse":u.value}},[(v=t.default)==null?void 0:v.call(t)])}}}),Qb=a.defineComponent({name:"MenuGroup",props:{name:{type:String,default:""}},setup(e,{slots:t}){return()=>{var n;return a.createVNode("div",{class:"bk-menu-group"},[a.createVNode("div",{class:"group-name"},[e.name]),a.createVNode("ul",{class:"group-wrap"},[(n=t.default)==null?void 0:n.call(t)])])}}}),_b=a.defineComponent({name:"MenuItem",props:{needIcon:{type:Boolean,default:!0}},emits:["click"],slots:["icon"],setup(e,{slots:t,emit:n}){var b,v;const{registerMenuInfo:i,unregisterMenuInfo:s,activeKey:o,handleActiveChange:c}=h9(),d=a.getCurrentInstance(),{parentInfo:u}=lu(),f=((v=(b=d.vnode.key)==null?void 0:b.toString)==null?void 0:v.call(b))||String(d.uid),m=a.computed(()=>o.value===f),p=a.computed(()=>e.needIcon);i(f,{key:f,parentKey:u==null?void 0:u.key});const y=k=>{c(f),n("click",k)};return a.onBeforeUnmount(()=>s(f)),()=>{var k,T;return a.createVNode("li",{class:{"bk-menu-item":!0,"is-active":m.value},onClick:y},[p.value&&a.createVNode("span",{class:"item-icon"},[((k=t==null?void 0:t.icon)==null?void 0:k.call(t))||a.createVNode("i",{class:"default-icon"},null)]),a.createVNode("span",{class:"item-content"},[(T=t.default)==null?void 0:T.call(t)])])}}});const Wb={title:{type:String,default:"title"}};var Hb=a.defineComponent({name:"Submenu",props:Wb,emits:["collapse"],slots:["icon"],setup(e,{slots:t,emit:n}){var L,N;const{registerMenuInfo:i,unregisterMenuInfo:s,openedKeys:o,handleOpenChange:c,collapse:d,activeKey:u,menuStore:f}=h9(),{parentInfo:m}=lu(),p=a.getCurrentInstance(),y=((N=(L=p.vnode.key)==null?void 0:L.toString)==null?void 0:N.call(L))||String(p.uid),b=a.ref(Vb()),v=a.computed(()=>o.value.includes(y)),k=a.computed(()=>{var I,M;const C=(M=(I=f.value)==null?void 0:I[u.value])==null?void 0:M.parentKey;return d.value&&C===y&&v});Eb(y),i(y,{key:y,parentKey:m==null?void 0:m.key}),a.onBeforeUnmount(()=>s(y));const T=()=>{c(y,!v.value),n("collapse",!v.value,p)};return()=>{var C;return a.createVNode("li",{class:{"bk-menu-submenu":!0,"is-opened":v.value}},[a.createVNode("div",{class:{"submenu-header":!0,"is-collapse":k.value},onClick:T},[a.createVNode("span",{class:"submenu-header-icon"},[((C=t.icon)==null?void 0:C.call(t))||a.createVNode(gc,{class:"menu-icon"},null)]),a.createVNode("span",{class:"submenu-header-content"},[e.title]),a.createVNode(Vs,{class:{"submenu-header-collapse":!0,"is-collapse":o.value.includes(y)}},null)]),a.createVNode(a.Transition,b.value,{default:()=>{var I;return[a.withDirectives(a.createVNode("ul",{class:"submenu-list"},[(I=t.default)==null?void 0:I.call(t)]),[[a.vShow,v.value]])]}})])}}});const p9=Gt(Rb,{Item:_b,Submenu:Hb,Group:Qb}),Bb={sideTitle:{type:String,default:""},navigationType:{type:String,default:"left-right"}};var b9=a.defineComponent({props:Bb,slots:["side-icon"],setup(e,{slots:t}){return()=>{var n,i;return a.createVNode("div",{class:"bk-navigation-title",style:{borderBottomWidth:e.navigationType==="left-right"?"0":"1px"}},[((n=t.default)==null?void 0:n.call(t))||[a.createVNode("span",{class:"title-icon"},[((i=t["side-icon"])==null?void 0:i.call(t))||a.createVNode("i",{class:"bk-icon icon-rtx"},null)]),a.createVNode("span",{class:"title-desc"},[e.sideTitle])]])}}});const Fb={navWidth:{type:[Number,String],default:60},hoverWidth:{type:[Number,String],default:260},showSideNavTitle:{type:Boolean,default:!0},sideTitle:{type:String,default:""},headerTitle:{type:String,default:""},hoverLeaveDelay:{type:Number,default:0},hoverEnterDelay:{type:Number,default:100},defaultOpen:Boolean,headHeight:{type:[Number,String],default:52},navigationType:{type:String,default:"left-right",validator(e){return["top-bottom","left-right"].includes(e)}},needMenu:{type:Boolean,default:!0}};var Gb=a.defineComponent({name:"Navigation",props:Fb,emits:["leave","toggle","hover","toggle-click"],slots:["header","menu","footer","side-icon","side-header"],setup(e,{emit:t}){const n=a.ref(e.headerTitle),i=a.reactive({click:!1,hover:!1,delay:!1,timer:null,enterTimer:null});e.defaultOpen&&(i.click=!i.click,i.hover=i.click,t("toggle",i.hover)),a.onBeforeUnmount(()=>{i.timer&&window.clearTimeout(i.timer)});const s=()=>{i.click||(i.enterTimer=setTimeout(()=>{i.hover=!0,i.enterTimer&&window.clearTimeout(i.enterTimer),i.timer&&window.clearTimeout(i.timer),t("hover",i.hover),t("toggle",i.hover)},e.hoverEnterDelay))},o=()=>{i.click||(i.enterTimer&&window.clearTimeout(i.enterTimer),i.timer=setTimeout(()=>{i.hover=!1,window.clearTimeout(i.timer),t("leave",i.hover),t("toggle",i.hover)},e.hoverLeaveDelay))},c=()=>{i.click=!i.click,i.hover=i.click,t("toggle",i.hover),t("toggle-click",i.hover)};return{defaultHeaderTitle:n,nav:i,onBeforeUnmount:a.onBeforeUnmount,handleMouseOver:s,handleMouseLeave:o,handleClick:c}},render(){var e,t,n,i,s,o,c,d,u,f,m,p;return a.createVNode("div",{class:"bk-navigation"},[this.navigationType==="top-bottom"&&a.createVNode("div",{class:"bk-navigation-header",style:{flexBasis:`${this.headHeight}px`}},[a.createVNode(b9,{sideTitle:this.sideTitle},{default:this.$slots["side-header"],"side-icon":this.$slots["side-header"]?void 0:this.$slots["side-icon"]}),a.createVNode("div",{class:"header-right"},[(t=(e=this.$slots).header)==null?void 0:t.call(e)])]),a.createVNode("div",{class:"bk-navigation-wrapper"},[this.needMenu&&a.createVNode("div",{class:"navigation-nav",style:{width:this.nav.click?`${this.hoverWidth}px`:`${this.navWidth}px`}},[a.createVNode("div",{class:"nav-slider",onMouseenter:this.handleMouseOver,onMouseleave:this.handleMouseLeave,style:{width:this.nav.hover?`${this.hoverWidth}px`:`${this.navWidth}px`,borderRight:this.navigationType!=="top-bottom"?"none":"1px solid #DCDEE5"}},[this.navigationType!=="top-bottom"&&this.showSideNavTitle&&a.createVNode(b9,{style:{flexBasis:`${this.headHeight}px`},sideTitle:this.sideTitle},{default:this.$slots["side-header"],"side-icon":this.$slots["side-header"]?void 0:this.$slots["side-icon"]}),a.createVNode("div",{class:"nav-slider-list",style:{height:`calc(100vh - ${+this.headHeight+56}px)`}},[(i=(n=this.$slots).menu)==null?void 0:i.call(n)]),a.createVNode("div",{class:"nav-slider-footer"},[a.createVNode("div",{class:{"is-left":this.navigationType!=="top-bottom","footer-icon":!0},onClick:this.handleClick},[a.createVNode(nc,{class:"footer-icon-svg",style:{transform:this.nav.click?"rotate(180deg)":"rotate(0deg)"}},null)])])])]),a.createVNode("div",{class:"navigation-container",style:{maxWidth:this.needMenu?"calc(100vw - 60px)":"100vw"}},[this.navigationType!=="top-bottom"&&a.createVNode("div",{class:"container-header",style:{flexBasis:`${this.headHeight}px`}},[((o=(s=this.$slots).header)==null?void 0:o.call(s))||[a.createVNode("div",{class:"container-header-title"},[this.headerTitle]),a.createVNode("div",{class:"container-header-sets"},[(d=(c=this.$slots)["header-set"])==null?void 0:d.call(c)])]]),a.createVNode("div",{class:"container-content",style:{maxHeight:`calc(100vh - ${this.headHeight}px)`}},[(f=(u=this.$slots).default)==null?void 0:f.call(u),a.createVNode("div",{class:"container-footer"},[(p=(m=this.$slots).footer)==null?void 0:p.call(m)])])])])])}});const y9=Ge(Gb),Zb={placement:{type:String,default:"bottom-start",validator:e=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].indexOf(e)<0?(console.error(`placement property is not valid: '${e}'`),!1):!0},className:{type:String},extPopoverCls:{type:String},appendToBody:{type:Boolean},triggerRef:{type:Object},onClick:Function};var cu=a.defineComponent({props:Zb,emits:["changeVisible"],setup(e,{emit:t}){let n=Object.create(null);const i=a.ref(null);a.onMounted(()=>{c()}),a.onBeforeUnmount(()=>{o()});const s=()=>{var f;n&&((f=n==null?void 0:n.forceUpdate)==null||f.call(n))},o=()=>{if(n&&Object.keys(n).length!==0){const f=n;f.isShow&&f.hide(),f.destroy(),n=null,t("changeVisible",!1)}},c=()=>{n&&Object.keys(n).length!==0?a.nextTick(()=>{n.update()}):a.nextTick(()=>{n=new G4(e.triggerRef,i.value,{placement:e.placement,trigger:"manual",modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},{name:"offset",options:{offset:[0,4]}}]})})},d=a.computed(()=>{const f={};return e.appendToBody&&(f["z-index"]=1060+Rn.getModalNextIndex()),f}),u=a.reactive({styles:d});return Se(Z({},a.toRefs(u)),{refContentRef:i,forceUpdate:s,updateDropdown:c,destoryDropdown:o})},render(){var e,t,n;return a.createVNode("div",{ref:"refContentRef",class:["bk-date-picker-dropdown",this.className,this.extPopoverCls],style:this.styles,onClick:this.onClick},[(n=(t=(e=this.$slots).default)==null?void 0:t.call(e))!=null?n:""])}});const Yb={showTime:{type:Boolean,required:!0},isTime:{type:Boolean,default:!1},timeDisabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}};var C9=a.defineComponent({props:Yb,emits:["pick-clear","pick-success","pick-toggle-time"],setup(e,{emit:t}){const n=a.computed(()=>({time:e.isTime?"\u9009\u62E9\u65E5\u671F":"\u9009\u62E9\u65F6\u95F4",clear:"\u6E05\u9664",ok:"\u786E\u5B9A"})),i=()=>{t("pick-clear")},s=()=>{t("pick-success")},o=()=>{e.timeDisabled||t("pick-toggle-time")},c=a.ref(null);return{labels:n,handleClear:i,handleSuccess:s,handleToggleTime:o,handleTab:u=>{const m=[...c.value.children][u.shiftKey?"shift":"pop"]();document.activeElement===m&&(u.preventDefault(),u.stopPropagation())}}},render(){var e,t,n;return a.createVNode("div",{class:"bk-picker-confirm",ref:"elRef",onKeydown:this.handleTab},[this.showTime?a.createVNode(Pt,{text:!0,class:"bk-picker-confirm-time",disabled:this.timeDisabled,onClick:this.handleToggleTime},{default:()=>[this.labels.time]}):"",(n=(t=(e=this.$slots).confirm)==null?void 0:t.call(e))!=null?n:a.createVNode("div",{class:"bk-picker-confirm-action"},[this.clearable?a.createVNode("a",{href:"javascript: void(0);",onClick:this.handleClear,onKeydown:this.handleClear},[this.labels.clear]):"",a.createVNode("a",{href:"javascript: void(0);",class:"confirm",onClick:this.handleSuccess,onKeydown_enter:this.handleSuccess},[this.labels.ok])])])}}),v9=1e3*60*60*24;function w9(e,t){return new Date(e,t+1,0).getDate()}function M9(e,t,n){return t===0&&n>50?e-1:t===11&&n<10?e+1:e}function I9(e,t,n,i){t>11&&(t=0,e++);var s=new Date(e,t,n);i&&s.setDate(s.getDate()+4-(s.getDay()||7));var o=i?s.getFullYear():e,c=new Date(o,0,1),d=1+Math.round((s-c)/v9);i||(d+=c.getDay());var u=Math.ceil(d/7);if(!i){var f=new Date(e,t,n),m=new Date(e+1,0,1),p=m.getDay();f.getTime()>=m.getTime()-v9*p&&(u=1)}return u}function Ub(e,t,n){for(var i=this.lang||"en",s=this.onlyDays,o=typeof this.weekStart=="undefined"?1:this.weekStart,c=o===1,d=[],u=new Date(e,t,1),f=u.getDay()||(c?7:0),m=o-f,p=I9(e,t,1,c),y=w9(e,t),b=w9(e,t-1),v,k,T,L=M9(e,t,p),N={month:t,year:e,daysInMonth:y},C=0;C<7;C++){T=m;for(var I=0;I<8;I++){C>0&&I>0&&m++,m>y||m<1?(k=m>y?m-y:b+m,v=m>y?t+1:t-1):(k=m,v=t);var M=function(){return I===0?"weekLabel":C===0?"dayLabel":m<1?"prevMonth":m>y?"nextMonth":"monthDay"}(),S=T!==m&&C>0,z={desc:S?k:p,week:p,type:M,format:c?"ISO 8601":"US",date:S?new Date(Date.UTC(e,v,k)):!1,year:L,index:d.length};n&&(typeof n=="function"?z=n.call(N,z,i):n.forEach(function(j){z=j.call(N,z,i)})),s&&S?d.push(z):s||d.push(z)}C>0&&(p=I9(e,v,k+1,c)),L=M9(e,t,p)}return N.cells=d,N}var $b=function(e){return Ub.bind(e)},Kb={weekPlaceholder:"",columnNames:{en:{0:"w",1:"monday",2:"tuesday",3:"wednesday",4:"thursday",5:"friday",6:"saturday",7:"sunday"},sv:{0:"v",1:"m\xE5ndag",2:"tisdag",3:"onsdag",4:"torsdag",5:"fredag",6:"l\xF6rdag",7:"s\xF6ndag"},pt:{0:"s",1:"segunda",2:"ter\xE7a",3:"quarta",4:"quinta",5:"sexta",6:"s\xE1bado",7:"domingo"}},monthNames:{en:["January","February","March","April","May","June","July","August","September","October","November","December"],sv:["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"],pt:["Janeiro","Fevereiro","Mar\xE7o","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"]},classes:{dayLabel:"day-of-week",weekLabel:"week-number",prevMonth:"inactive",nextMonth:"inactive",monthDay:"day-in-month"}},Fn=Kb;function Xb(e){return e==null?!1:e.constructor===Array||e.constructor===Object}function N9(e,t){for(var n in e)t[n]?Xb(e[n])&&N9(e[n],t[n]):t[n]=e[n]}function L9(e,t){var n=[Fn.classes[e.type]];return e.class?e.class=(typeof e.class=="string"?[e.class]:e.class).concat(n):e.class=n,e.type.indexOf("Label")>0&&(e.index==0&&Fn.weekPlaceholder?e.desc=Fn.weekPlaceholder:e.index<8?e.desc=Fn.columnNames[t][e.index]:e.index%8==0&&(e.desc=e.week)),e.date&&(e.monthName=Fn.monthNames[t][e.date.getMonth()]),this.monthName||(this.monthName=Fn.monthNames[t][this.month]),this.labels||(this.labels={monthNames:Fn.monthNames[t],columnNames:Fn.columnNames[t],classes:Fn.classes}),e}L9.setLabels=function(e){N9(e,Fn)};var qb=L9,ey={Generator:$b,addLabels:qb};function bn(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Vt(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function an(e){Vt(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console!="undefined"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn(new Error().stack)),new Date(NaN))}function ty(e,t){Vt(2,arguments);var n=an(e).getTime(),i=bn(t);return new Date(n+i)}function ny(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function iy(e){return Vt(1,arguments),e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ay(e){if(Vt(1,arguments),!iy(e)&&typeof e!="number")return!1;var t=an(e);return!isNaN(Number(t))}var ry={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},sy=function(e,t,n){var i,s=ry[e];return typeof s=="string"?i=s:t===1?i=s.one:i=s.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},ly=sy;function uu(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth,i=e.formats[n]||e.formats[e.defaultWidth];return i}}var oy={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},cy={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},uy={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},dy={date:uu({formats:oy,defaultWidth:"full"}),time:uu({formats:cy,defaultWidth:"full"}),dateTime:uu({formats:uy,defaultWidth:"full"})},fy=dy,hy={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},gy=function(e,t,n,i){return hy[e]},my=gy;function Fr(e){return function(t,n){var i=n||{},s=i.context?String(i.context):"standalone",o;if(s==="formatting"&&e.formattingValues){var c=e.defaultFormattingWidth||e.defaultWidth,d=i.width?String(i.width):c;o=e.formattingValues[d]||e.formattingValues[c]}else{var u=e.defaultWidth,f=i.width?String(i.width):e.defaultWidth;o=e.values[f]||e.values[u]}var m=e.argumentCallback?e.argumentCallback(t):t;return o[m]}}var py={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},by={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},yy={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Cy={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},vy={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},wy={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},My=function(e,t){var n=Number(e),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Iy={ordinalNumber:My,era:Fr({values:py,defaultWidth:"wide"}),quarter:Fr({values:by,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Fr({values:yy,defaultWidth:"wide"}),day:Fr({values:Cy,defaultWidth:"wide"}),dayPeriod:Fr({values:vy,defaultWidth:"wide",formattingValues:wy,defaultFormattingWidth:"wide"})},Ny=Iy;function Gr(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.width,s=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(s);if(!o)return null;var c=o[0],d=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(d)?ky(d,function(p){return p.test(c)}):Ly(d,function(p){return p.test(c)}),f;f=e.valueCallback?e.valueCallback(u):u,f=n.valueCallback?n.valueCallback(f):f;var m=t.slice(c.length);return{value:f,rest:m}}}function Ly(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function ky(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function Ty(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=t.match(e.matchPattern);if(!i)return null;var s=i[0],o=t.match(e.parsePattern);if(!o)return null;var c=e.valueCallback?e.valueCallback(o[0]):o[0];c=n.valueCallback?n.valueCallback(c):c;var d=t.slice(s.length);return{value:c,rest:d}}}var Sy=/^(\d+)(th|st|nd|rd)?/i,xy=/\d+/i,Dy={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},jy={any:[/^b/i,/^(a|c)/i]},zy={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Oy={any:[/1/i,/2/i,/3/i,/4/i]},Ay={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Py={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Ey={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Vy={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Jy={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ry={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Qy={ordinalNumber:Ty({matchPattern:Sy,parsePattern:xy,valueCallback:function(e){return parseInt(e,10)}}),era:Gr({matchPatterns:Dy,defaultMatchWidth:"wide",parsePatterns:jy,defaultParseWidth:"any"}),quarter:Gr({matchPatterns:zy,defaultMatchWidth:"wide",parsePatterns:Oy,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Gr({matchPatterns:Ay,defaultMatchWidth:"wide",parsePatterns:Py,defaultParseWidth:"any"}),day:Gr({matchPatterns:Ey,defaultMatchWidth:"wide",parsePatterns:Vy,defaultParseWidth:"any"}),dayPeriod:Gr({matchPatterns:Jy,defaultMatchWidth:"any",parsePatterns:Ry,defaultParseWidth:"any"})},_y=Qy,Wy={code:"en-US",formatDistance:ly,formatLong:fy,formatRelative:my,localize:Ny,match:_y,options:{weekStartsOn:0,firstWeekContainsDate:1}},Hy=Wy;function By(e,t){Vt(2,arguments);var n=bn(t);return ty(e,-n)}var Fy=864e5;function Gy(e){Vt(1,arguments);var t=an(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),s=n-i;return Math.floor(s/Fy)+1}function bl(e){Vt(1,arguments);var t=1,n=an(e),i=n.getUTCDay(),s=(i<t?7:0)+i-t;return n.setUTCDate(n.getUTCDate()-s),n.setUTCHours(0,0,0,0),n}function k9(e){Vt(1,arguments);var t=an(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var s=bl(i),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var c=bl(o);return t.getTime()>=s.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}function Zy(e){Vt(1,arguments);var t=k9(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=bl(n);return i}var Yy=6048e5;function Uy(e){Vt(1,arguments);var t=an(e),n=bl(t).getTime()-Zy(t).getTime();return Math.round(n/Yy)+1}function yl(e,t){Vt(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.weekStartsOn,o=s==null?0:bn(s),c=n.weekStartsOn==null?o:bn(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=an(e),u=d.getUTCDay(),f=(u<c?7:0)+u-c;return d.setUTCDate(d.getUTCDate()-f),d.setUTCHours(0,0,0,0),d}function T9(e,t){Vt(1,arguments);var n=an(e),i=n.getUTCFullYear(),s=t||{},o=s.locale,c=o&&o.options&&o.options.firstWeekContainsDate,d=c==null?1:bn(c),u=s.firstWeekContainsDate==null?d:bn(s.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=new Date(0);f.setUTCFullYear(i+1,0,u),f.setUTCHours(0,0,0,0);var m=yl(f,t),p=new Date(0);p.setUTCFullYear(i,0,u),p.setUTCHours(0,0,0,0);var y=yl(p,t);return n.getTime()>=m.getTime()?i+1:n.getTime()>=y.getTime()?i:i-1}function $y(e,t){Vt(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.firstWeekContainsDate,o=s==null?1:bn(s),c=n.firstWeekContainsDate==null?o:bn(n.firstWeekContainsDate),d=T9(e,t),u=new Date(0);u.setUTCFullYear(d,0,c),u.setUTCHours(0,0,0,0);var f=yl(u,t);return f}var Ky=6048e5;function Xy(e,t){Vt(1,arguments);var n=an(e),i=yl(n,t).getTime()-$y(n,t).getTime();return Math.round(i/Ky)+1}function at(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var qy={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return at(t==="yy"?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):at(n+1,2)},d:function(e,t){return at(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,t){return at(e.getUTCHours()%12||12,t.length)},H:function(e,t){return at(e.getUTCHours(),t.length)},m:function(e,t){return at(e.getUTCMinutes(),t.length)},s:function(e,t){return at(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),s=Math.floor(i*Math.pow(10,n-3));return at(s,t.length)}},Ji=qy,Ya={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},eC={G:function(e,t,n){var i=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});case"GGGG":default:return n.era(i,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){var i=e.getUTCFullYear(),s=i>0?i:1-i;return n.ordinalNumber(s,{unit:"year"})}return Ji.y(e,t)},Y:function(e,t,n,i){var s=T9(e,i),o=s>0?s:1-s;if(t==="YY"){var c=o%100;return at(c,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):at(o,t.length)},R:function(e,t){var n=k9(e);return at(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return at(n,t.length)},Q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return at(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,n){var i=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return at(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,n){var i=e.getUTCMonth();switch(t){case"M":case"MM":return Ji.M(e,t);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,n){var i=e.getUTCMonth();switch(t){case"L":return String(i+1);case"LL":return at(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,n,i){var s=Xy(e,i);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):at(s,t.length)},I:function(e,t,n){var i=Uy(e);return t==="Io"?n.ordinalNumber(i,{unit:"week"}):at(i,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Ji.d(e,t)},D:function(e,t,n){var i=Gy(e);return t==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):at(i,t.length)},E:function(e,t,n){var i=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});case"EEEE":default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,n,i){var s=e.getUTCDay(),o=(s-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return at(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){var s=e.getUTCDay(),o=(s-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return at(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),s=i===0?7:i;switch(t){case"i":return String(s);case"ii":return at(s,t.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});case"iiii":default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,n){var i=e.getUTCHours(),s=i/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,n){var i=e.getUTCHours(),s;switch(i===12?s=Ya.noon:i===0?s=Ya.midnight:s=i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i=e.getUTCHours(),s;switch(i>=17?s=Ya.evening:i>=12?s=Ya.afternoon:i>=4?s=Ya.morning:s=Ya.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){var i=e.getUTCHours()%12;return i===0&&(i=12),n.ordinalNumber(i,{unit:"hour"})}return Ji.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Ji.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(i,{unit:"hour"}):at(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return i===0&&(i=24),t==="ko"?n.ordinalNumber(i,{unit:"hour"}):at(i,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Ji.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Ji.s(e,t)},S:function(e,t){return Ji.S(e,t)},X:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return x9(o);case"XXXX":case"XX":return oa(o);case"XXXXX":case"XXX":default:return oa(o,":")}},x:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();switch(t){case"x":return x9(o);case"xxxx":case"xx":return oa(o);case"xxxxx":case"xxx":default:return oa(o,":")}},O:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+S9(o,":");case"OOOO":default:return"GMT"+oa(o,":")}},z:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+S9(o,":");case"zzzz":default:return"GMT"+oa(o,":")}},t:function(e,t,n,i){var s=i._originalDate||e,o=Math.floor(s.getTime()/1e3);return at(o,t.length)},T:function(e,t,n,i){var s=i._originalDate||e,o=s.getTime();return at(o,t.length)}};function S9(e,t){var n=e>0?"-":"+",i=Math.abs(e),s=Math.floor(i/60),o=i%60;if(o===0)return n+String(s);var c=t||"";return n+String(s)+c+at(o,2)}function x9(e,t){if(e%60===0){var n=e>0?"-":"+";return n+at(Math.abs(e)/60,2)}return oa(e,t)}function oa(e,t){var n=t||"",i=e>0?"-":"+",s=Math.abs(e),o=at(Math.floor(s/60),2),c=at(s%60,2);return i+o+n+c}var tC=eC;function D9(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function j9(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}function nC(e,t){var n=e.match(/(P+)(p+)?/)||[],i=n[1],s=n[2];if(!s)return D9(e,t);var o;switch(i){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",D9(i,t)).replace("{{time}}",j9(s,t))}var iC={p:j9,P:nC},aC=iC,rC=["D","DD"],sC=["YY","YYYY"];function lC(e){return rC.indexOf(e)!==-1}function oC(e){return sC.indexOf(e)!==-1}function z9(e,t,n){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(n,"`; see: https://git.io/fxCyr"))}var cC=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,uC=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,dC=/^'([^]*?)'?$/,fC=/''/g,hC=/[a-zA-Z]/;function gC(e,t,n){Vt(2,arguments);var i=String(t),s=n||{},o=s.locale||Hy,c=o.options&&o.options.firstWeekContainsDate,d=c==null?1:bn(c),u=s.firstWeekContainsDate==null?d:bn(s.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=o.options&&o.options.weekStartsOn,m=f==null?0:bn(f),p=s.weekStartsOn==null?m:bn(s.weekStartsOn);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!o.localize)throw new RangeError("locale must contain localize property");if(!o.formatLong)throw new RangeError("locale must contain formatLong property");var y=an(e);if(!ay(y))throw new RangeError("Invalid time value");var b=ny(y),v=By(y,b),k={firstWeekContainsDate:u,weekStartsOn:p,locale:o,_originalDate:y},T=i.match(uC).map(function(L){var N=L[0];if(N==="p"||N==="P"){var C=aC[N];return C(L,o.formatLong,k)}return L}).join("").match(cC).map(function(L){if(L==="''")return"'";var N=L[0];if(N==="'")return mC(L);var C=tC[N];if(C)return!s.useAdditionalWeekYearTokens&&oC(L)&&z9(L,t,e),!s.useAdditionalDayOfYearTokens&&lC(L)&&z9(L,t,e),C(v,L,o.localize,k);if(N.match(hC))throw new RangeError("Format string contains an unescaped latin alphabet character `"+N+"`");return L}).join("");return T}function mC(e){return e.match(dC)[1].replace(fC,"'")}const vt={},O9=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,ca=/\d\d?/,pC=/\d{3}/,bC=/\d{4}/,Cl=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,A9=function(){};function P9(e,t){const n=[];for(let i=0,s=e.length;i<s;i++)n.push(e[i].substr(0,t));return n}function E9(e){return(t,n,i)=>{const s=i[e].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~s&&(t.month=s)}}function Gn(e,t=2){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}const V9=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],J9=["January","February","March","April","May","June","July","August","September","October","November","December"],yC=P9(J9,3),CC=P9(V9,3);vt.i18n={dayNamesShort:CC,dayNames:V9,monthNamesShort:yC,monthNames:J9,amPm:["am","pm"],DoFn(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10)*e%10]}};const R9={D(e){return e.getDay()},DD(e){return Gn(e.getDay())},Do(e,t){return t.DoFn(e.getDate())},d(e){return e.getDate()},dd(e){return Gn(e.getDate())},ddd(e,t){return t.dayNamesShort[e.getDay()]},dddd(e,t){return t.dayNames[e.getDay()]},M(e){return e.getMonth()+1},MM(e){return Gn(e.getMonth()+1)},MMM(e,t){return t.monthNamesShort[e.getMonth()]},MMMM(e,t){return t.monthNames[e.getMonth()]},yy(e){return String(e.getFullYear()).substr(2)},yyyy(e){return e.getFullYear()},h(e){return e.getHours()%12||12},hh(e){return Gn(e.getHours()%12||12)},H(e){return e.getHours()},HH(e){return Gn(e.getHours())},m(e){return e.getMinutes()},mm(e){return Gn(e.getMinutes())},s(e){return e.getSeconds()},ss(e){return Gn(e.getSeconds())},S(e){return Math.round(e.getMilliseconds()/100)},SS(e){return Gn(Math.round(e.getMilliseconds()/10),2)},SSS(e){return Gn(e.getMilliseconds(),3)},a(e,t){return e.getHours()<12?t.amPm[0]:t.amPm[1]},A(e,t){return e.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},ZZ(e){const t=e.getTimezoneOffset();return(t>0?"-":"+")+Gn(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)}},mt={d:[ca,(e,t)=>{e.day=t}],M:[ca,(e,t)=>{e.month=t-1}],yy:[ca,(e,t)=>{const i=+`${new Date().getFullYear()}`.substr(0,2);e.year=`${t>68?i-1:i}${t}`}],h:[ca,(e,t)=>{e.hour=t}],m:[ca,(e,t)=>{e.minute=t}],s:[ca,(e,t)=>{e.second=t}],yyyy:[bC,(e,t)=>{e.year=t}],S:[/\d/,(e,t)=>{e.millisecond=t*100}],SS:[/\d{2}/,(e,t)=>{e.millisecond=t*10}],SSS:[pC,(e,t)=>{e.millisecond=t}],D:[ca,A9],ddd:[Cl,A9],MMM:[Cl,E9("monthNamesShort")],MMMM:[Cl,E9("monthNames")],a:[Cl,(e,t,n)=>{const i=t.toLowerCase();i===n.amPm[0]?e.isPm=!1:i===n.amPm[1]&&(e.isPm=!0)}],ZZ:[/[\\+\\-]\d\d:?\d\d/,(e,t)=>{const n=`${t}`.match(/([\\+\\-]|\d\d)/gi);let i;n&&(i=+(n[1]*60)+parseInt(n[2],10),e.timezoneOffset=n[0]==="+"?i:-i)}]};mt.DD=mt.D,mt.dddd=mt.ddd,mt.Do=mt.dd=mt.d,mt.mm=mt.m,mt.hh=mt.H=mt.HH=mt.h,mt.MM=mt.M,mt.ss=mt.s,mt.A=mt.a,vt.masks={default:"ddd MMM dd yyyy HH:mm:ss",shortDate:"M/D/yy",mediumDate:"MMM d, yyyy",longDate:"MMMM d, yyyy",fullDate:"dddd, MMMM d, yyyy",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},vt.format=(e,t,n)=>{const i=n||vt.i18n;if(typeof e=="number"&&(e=new Date(e)),Object.prototype.toString.call(e)!=="[object Date]"||isNaN(e.getTime()))throw new Error("Invalid Date in fecha.format");return t=vt.masks[t]||t||vt.masks.default,t.replace(O9,s=>s in R9?R9[s](e,i):s.slice(1,s.length-1))},vt.parse=(e,t,n)=>{const i=n||vt.i18n;if(typeof t!="string")throw new Error("Invalid format in fecha.parse");if(t=vt.masks[t]||t,e.length>1e3)return!1;let s=!0;const o={};if(t.replace(O9,u=>{if(mt[u]){const f=mt[u],m=e.search(f[0]);~m?e.replace(f[0],p=>(f[1](o,p,i),e=e.substr(m+p.length),p)):s=!1}return mt[u]?"":u.slice(1,u.length-1)}),!s)return!1;const c=new Date;o.isPm===!0&&o.hour!==null&&+o.hour!=12?o.hour=+o.hour+12:o.isPm===!1&&+o.hour==12&&(o.hour=0);let d;return o.timezoneOffset!==null&&o.timezoneOffset!==void 0?(o.minute=+(o.minute||0)-+o.timezoneOffset,d=new Date(Date.UTC(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0))):d=new Date(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0),d};const du=" - ",ui=(e,t)=>{const n=an(new Date(e));return!n||isNaN(n.getTime())?"":gC(n,t||"yyyy-MM-dd")},fu=(e,t)=>{if(Array.isArray(e)&&e.length===2){const n=e[0],i=e[1];if(n&&i)return ui(n,t)+du+ui(i,t)}else if(!Array.isArray(e)&&e instanceof Date)return ui(e,t);return""},hu=(e,t)=>{const n=Array.isArray(e)?e:e.split(du);if(n.length===2){const i=n[0],s=n[1];return[i instanceof Date?i:vt.parse(i,t||"yyyy-MM-dd"),s instanceof Date?s:vt.parse(s,t||"yyyy-MM-dd")]}return[]},Ua={default:{formatter(e){return e?`${e}`:""},parser(e){return e===void 0||e===""?null:e}},date:{formatter:(e,t)=>ui(e,t),parser:(e,t)=>vt.parse(e,t||"yyyy-MM-dd")},datetime:{formatter:(e,t)=>ui(e,t),parser:(e,t)=>vt.parse(e,t||"yyyy-MM-dd")},daterange:{formatter:fu,parser:hu},datetimerange:{formatter:fu,parser:hu},timerange:{formatter:fu,parser:hu},time:{formatter:(e,t)=>ui(e,t),parser:(e,t)=>vt.parse(e,t||"yyyy-MM-dd")},month:{formatter:(e,t)=>ui(e,t),parser:(e,t)=>vt.parse(e,t||"yyyy-MM-dd")},year:{formatter:(e,t)=>ui(e,t),parser:(e,t)=>vt.parse(e,t||"yyyy-MM-dd")},multiple:{formatter(e,t){return e.filter(Boolean).map(n=>ui(n,t)).join(",")},parser(e,t){return(typeof e=="string"?e.split(","):e).map(i=>{if(i instanceof Date)return i;let s=i;return typeof i=="string"?s=i.trim():typeof i!="number"&&!i&&(s=""),vt.parse(s,t||"yyyy-MM-dd")})}},number:{formatter(e){return e?`${e}`:""},parser(e){const t=Number(e);return isNaN(e)?null:t}}},ua=()=>{const e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e},Q9=e=>e.every(t=>!t||typeof t=="string"&&t.trim()===""),vl=e=>e?[e.getHours(),e.getMinutes(),e.getSeconds()]:[0,0,0],_9={date:"yyyy-MM-dd",month:"yyyy-MM",year:"yyyy",datetime:"yyyy-MM-dd HH:mm:ss",time:"HH:mm:ss",timerange:"HH:mm:ss",daterange:"yyyy-MM-dd",datetimerange:"yyyy-MM-dd HH:mm:ss"},Ri=(e,t,n,i)=>{const s=t.includes("range"),{parser:o}=Ua[t]||Ua.default,c=i||_9[t],d=Ua.multiple.parser;let u=e;if(e&&t==="time"&&!(e instanceof Date))u=o(e,c);else if(n&&e)u=d(e,c);else if(s)if(!e)u=[null,null];else if(typeof e=="string")u=o(e,c);else if(t==="timerange")u=o(e,c).map(f=>f||"");else{const[f,m]=e;f instanceof Date&&m instanceof Date?u=e.map(p=>new Date(p)):typeof f=="string"&&typeof m=="string"?u=o(e.join(du),c):(!f||!m)&&(u=[null,null])}else typeof e=="string"&&t.indexOf("time")!==0&&(u=o(e,c)||null);return s||n?u||[]:[u]},Zn=(e,t,n,i)=>{const s=_9[t];if(n){const{formatter:c}=Ua.multiple;return c(e,i||s)}const{formatter:o}=Ua[t]||Ua.default;return o(e,i||s)},W9=Symbol("date-picker"),wl=Symbol("time-picker");function yn(e,t=""){return["bk-picker-panel-icon-btn",`bk-date-picker-${e}-btn`,`bk-date-picker-${e}-btn-arrow${t}`]}const vC=(e,t)=>new Date(e,t+1,0).getDate(),H9=(e,t)=>{const n=new Date(e),i=n.getMonth()+t,s=vC(n.getFullYear(),i);return s<n.getDate()&&n.setDate(s),n.setMonth(i),n},B9=(()=>{const e={yyyy:n=>n.getFullYear(),m:n=>n.getMonth()+1,mm:n=>`0${n.getMonth()+1}`.slice(-2),mmm:(n,i)=>n.toLocaleDateString(i,{month:"long"}).slice(0,3),Mmm:(n,i)=>{const s=n.toLocaleDateString(i,{month:"long"});return(s[0].toUpperCase()+s.slice(1).toLowerCase()).slice(0,3)},mmmm:(n,i)=>n.toLocaleDateString(i,{month:"long"}),Mmmm:(n,i)=>{const s=n.toLocaleDateString(i,{month:"long"});return s[0].toUpperCase()+s.slice(1).toLowerCase()}},t=new RegExp(["yyyy","Mmmm","mmmm","Mmm","mmm","mm","m"].join("|"),"g");return(n,i,s)=>{const o=/(\[[^\]]+\])([^\\[\]]+)(\[[^\]]+\])/,c=i.match(o).slice(1),d=c[1],u=[c[0],c[2]].map(f=>({label:f.replace(/\[[^\]]+\]/,p=>p.slice(1,-1).replace(t,y=>e[y](s,n))),type:f.indexOf("yy")!==-1?"year":"month"}));return{separator:d,labels:u}}})(),da=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()},wC=(e,t,n)=>{if(!t||!n)return!1;const[i,s]=[t,n].sort();return e>=i&&e<=s};function MC(e){return e.toString()[0].toUpperCase()+e.toString().slice(1)}const IC=(e,...t)=>{const n=new Date(e.getTime());return n.setHours(t[0]),n.setMinutes(t[1]),n.setSeconds(t[2]),n},NC={tableDate:{type:Date,required:!0},disabledDate:Function,selectionMode:{type:String,required:!0},modelValue:{type:[Date,String,Number,Array]},rangeState:{type:Object,default:()=>({from:null,to:null,selecting:!1})},focusedDate:{type:Date,required:!0}};var gu=a.defineComponent({name:"DateTable",props:NC,emits:["pick","pick-click","changeRange"],setup(e,{emit:t}){const n=a.computed(()=>new ey.Generator({onlyDays:!0,weekStart:0})),i=a.computed(()=>{const f=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"];return f.splice(0,7-0).concat(f.splice(0,0))}),s=a.computed(()=>e.selectionMode==="range"&&e.rangeState.selecting?[e.rangeState.from]:e.modelValue),o=a.computed(()=>{const f=e.tableDate.getFullYear(),m=e.tableDate.getMonth(),p=da(new Date),y=s.value.filter(Boolean).map(da),[b,v]=s.value.map(da),k=e.rangeState.from&&da(e.rangeState.from),T=e.rangeState.to&&da(e.rangeState.to),L=e.selectionMode==="range",N=typeof e.disabledDate=="function"&&e.disabledDate;return n.value(f,m,C=>{C.date instanceof Date&&C.date.setTime(C.date.getTime()+C.date.getTimezoneOffset()*6e4);const I=C.date&&da(C.date),M=C.date&&m===C.date.getMonth();return Se(Z({},C),{type:I===p?"today":C.type,selected:M&&y.includes(I),disabled:C.date&&N&&N(new Date(I)),range:M&&L&&wC(I,k,T),start:M&&L&&I===b,end:M&&L&&I===v})}).cells.slice(0)});return{headerDays:i,cells:o,getCellCls:f=>["bk-date-picker-cells-cell",{["bk-date-picker-cells-cell-selected"]:f.selected||f.start||f.end,["bk-date-picker-cells-cell-disabled"]:f.disabled,["bk-date-picker-cells-cell-today"]:f.type==="today",["bk-date-picker-cells-cell-prev-month"]:f.type==="prevMonth",["bk-date-picker-cells-cell-next-month"]:f.type==="nextMonth",["bk-date-picker-cells-cell-week-label"]:f.type==="weekLabel",["bk-date-picker-cells-cell-range"]:f.range&&!f.start&&!f.end}],handleClick:f=>{if(f.disabled||f.type==="weekLabel")return;const m=new Date(da(f.date));t("pick",m),t("pick-click")},handleMouseMove:f=>{if(!e.rangeState.selecting||f.disabled)return;const m=f.date;t("changeRange",m)}}},render(){return a.createVNode("div",{class:"bk-date-picker-cells"},[a.createVNode("div",{class:"bk-date-picker-cells-header"},[this.headerDays.map(e=>a.createVNode("span",null,[e]))]),this.cells.map(e=>a.createVNode("span",{class:this.getCellCls(e),onClick:()=>this.handleClick(e),onMouseenter:()=>this.handleMouseMove(e)},[a.createVNode("em",null,[e.desc])]))])}});const Ml={type:{type:String,default:"date",validator(e){return["year","month","date","daterange","datetime","datetimerange","time","timerange"].indexOf(e)<0?(console.error(`type property is not valid: '${e}'`),!1):!0}},extPopoverCls:{type:String,default:""},format:String,readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},open:{type:Boolean,default:null},multiple:{type:Boolean,default:!1},timePickerOptions:{type:Object,default:()=>({})},splitPanels:{type:Boolean,default:!0},startDate:Date,placeholder:{type:String,default:""},placement:{type:String,default:"bottom-start",validator:e=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].indexOf(e)<0?(console.error(`placement property is not valid: '${e}'`),!1):!0},transfer:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!1},shortcuts:{type:Array,default:()=>[]},shortcutClose:{type:Boolean,default:!1},modelValue:{type:[Date,String,Number,Array]},value:{type:[Date,String,Number,Array]},options:{type:Object,default:()=>({})},fontSize:{type:String,default:"normal"},upToNow:{type:Boolean,default:!1},useShortcutText:{type:Boolean,default:!1},shortcutSelectedIndex:{type:Number,default:-1},headerSlotCls:{type:String,default:""},footerSlotCls:{type:String,default:""},allowCrossDay:{type:Boolean,default:!1},behavior:{type:String,default:"normal",validator(e){return["simplicity","normal"].indexOf(e)>-1}},disabledDate:Function,withValidate:{type:Boolean,default:!0}},Il={disabledHours:{type:Array,default:()=>[]},disabledMinutes:{type:Array,default:()=>[]},disabledSeconds:{type:Array,default:()=>[]},hideDisabledOptions:{type:Boolean,default:!1},width:{type:Number,default:261},enterMode:{type:Boolean,default:!0}},LC={type:{type:String,default:"time",validator(e){return["time","timerange"].indexOf(e)<0?(console.error(`type property is not valid: '${e}'`),!1):!0}},allowCrossDay:{type:Boolean,default:!1}},kC={hours:{type:[Number,String],default:NaN},minutes:{type:[Number,String],default:NaN},seconds:{type:[Number,String],default:NaN},showSeconds:{type:Boolean,default:!0},steps:{type:Array,default:()=>[]}},F9=["hours","minutes","seconds"];var mu=a.defineComponent({name:"TimeSpinner",props:Z(Z({},kC),Il),emits:["change","pick-click"],setup(e,{emit:t}){const n=a.reactive({spinerSteps:[1,1,1].map((S,z)=>Math.abs(e.steps[z])||S),compiled:!1,focusedColumn:-1,focusedTime:[0,0,0]}),i=a.computed(()=>{const S=[],z=n.spinerSteps[0],j=n.focusedColumn===0&&n.focusedTime[0],O={text:0,selected:!1,disabled:!1,hide:!1};for(let W=0;W<24;W+=z){const P=JSON.parse(JSON.stringify(O));P.text=W,P.focused=W===j,e.disabledHours.length&&e.disabledHours.indexOf(W)>-1&&(P.disabled=!0,e.hideDisabledOptions&&(P.hide=!0)),e.hours===W&&(P.selected=!0),S.push(P)}return S}),s=a.computed(()=>{const S=[],z=n.spinerSteps[1],j=n.focusedColumn===1&&n.focusedTime[1],O={text:0,selected:!1,disabled:!1,hide:!1};for(let W=0;W<60;W+=z){const P=JSON.parse(JSON.stringify(O));P.text=W,P.focused=W===j,e.disabledMinutes.length&&e.disabledMinutes.indexOf(W)>-1&&(P.disabled=!0,e.hideDisabledOptions&&(P.hide=!0)),e.minutes===W&&(P.selected=!0),S.push(P)}return S}),o=a.computed(()=>{const S=[],z=n.spinerSteps[2],j=n.focusedColumn===2&&n.focusedTime[2],O={text:0,selected:!1,disabled:!1,hide:!1};for(let W=0;W<60;W+=z){const P=JSON.parse(JSON.stringify(O));P.text=W,P.focused=W===j,e.disabledSeconds.length&&e.disabledSeconds.indexOf(W)>-1&&(P.disabled=!0,e.hideDisabledOptions&&(P.hide=!0)),e.seconds===W&&(P.selected=!0),S.push(P)}return S}),c=a.computed(()=>({width:e.showSeconds?"33.33%":"50%"}));a.watch(()=>e.hours,S=>{!n.compiled||k("hours",i.value.findIndex(z=>z.text===S))}),a.watch(()=>e.minutes,S=>{!n.compiled||k("minutes",s.value.findIndex(z=>z.text===S))}),a.watch(()=>e.seconds,S=>{!n.compiled||k("seconds",s.value.findIndex(z=>z.text===S))}),a.watch(()=>n.focusedTime,(S,z)=>{F9.forEach((j,O)=>{if(S[O]===z[O]||typeof S[O]=="undefined")return;const W=this[`${j}List`].findIndex(P=>P.text===S[O]);k(j,W)})}),a.onMounted(()=>{a.nextTick(()=>{n.compiled=!0,f()})});function d(S){let z;return S==="hours"?z=C:S==="minutes"?z=I:z=M,z.value}function u(S){return["bk-time-picker-cells-cell",{["bk-time-picker-cells-cell-selected"]:S.selected,["bk-time-picker-cells-cell-focused"]:S.focused,["bk-time-picker-cells-cell-disabled"]:S.disabled}]}function f(){const S=z=>{d(z).addEventListener("wheel",ot.exports.debounce(()=>{y(z)},32),{passive:!0})};S("hours"),S("minutes"),S("seconds")}function m(S){return d(S).querySelector("li").offsetHeight}function p(S){return d(S).offsetHeight}function y(S){const z=d(S),j=Math.min(Math.round((z.scrollTop-(p(S)*.5-10)/m(S)+3)/m(S)),S==="hours"?23:59);let O;if(S==="hours"?O=i:S==="minutes"?O=s:O=o,O.value.find(P=>P.text===j).disabled)return!1;a.nextTick(()=>{v({[S]:j})})}function b(S,z){if(z.disabled)return;const j={[S]:z.text};v(j)}function v(S){t("change",S),t("pick-click")}function k(S,z){const j=d(S),O=j.scrollTop,W=32*T(S,z);w2(j,O,W,500)}function T(S,z){const j=MC(S),O=e[`disabled${j}`];let W=z;if(O.length&&e.hideDisabledOptions){let P=0;O.forEach(G=>G<=z?P+=1:""),W-=P}return W}function L(){a.nextTick(()=>{F9.forEach(S=>{const z=d(S);let j;S==="hours"?j=i:S==="minutes"?j=s:j=o,z.scrollTop=32*j.value.findIndex(O=>O.text===e[S])})})}function N(S){return S<10?`0${S}`:S}const C=a.ref(null),I=a.ref(null),M=a.ref(null);return Se(Z({},a.toRefs(n)),{hoursList:i,minutesList:s,secondsList:o,styles:c,hoursRef:C,minutesRef:I,secondsRef:M,getCellCls:u,handleClick:b,updateScroll:L,padTime:N})},render(){return a.createVNode("div",{class:["bk-time-picker-cells",this.showSeconds?"bk-time-picker-cells-with-seconds":""]},[a.createVNode("div",{class:"bk-time-picker-cells-title-wrapper"},[a.createVNode("div",{class:["bk-time-picker-cells-title",this.focusedColumn===0?"active":""],style:this.styles},[a.createTextVNode("\u65F6")]),a.createVNode("div",{class:["bk-time-picker-cells-title",this.focusedColumn===1?"active":""],style:this.styles},[a.createTextVNode("\u5206")]),a.withDirectives(a.createVNode("div",{class:["bk-time-picker-cells-title",this.focusedColumn===2?"active":""],style:this.styles},[a.createTextVNode("\u79D2")]),[[a.vShow,this.showSeconds]])]),a.createVNode("div",{class:"bk-time-picker-cells-list",ref:"hoursRef",style:this.styles},[a.createVNode("ul",{class:"bk-time-picker-cells-ul"},[this.hoursList.map(e=>a.withDirectives(a.createVNode("li",{class:this.getCellCls(e),onClick:()=>this.handleClick("hours",e)},[this.padTime(e.text)]),[[a.vShow,!e.hide]]))])]),a.createVNode("div",{class:"bk-time-picker-cells-list",ref:"minutesRef",style:this.styles},[a.createVNode("ul",{class:"bk-time-picker-cells-ul"},[this.minutesList.map(e=>a.withDirectives(a.createVNode("li",{class:this.getCellCls(e),onClick:()=>this.handleClick("minutes",e)},[this.padTime(e.text)]),[[a.vShow,!e.hide]]))])]),a.withDirectives(a.createVNode("div",{class:"bk-time-picker-cells-list",ref:"secondsRef",style:this.styles},[a.createVNode("ul",{class:"bk-time-picker-cells-ul"},[this.secondsList.map(e=>a.withDirectives(a.createVNode("li",{class:this.getCellCls(e),onClick:()=>this.handleClick("seconds",e)},[this.padTime(e.text)]),[[a.vShow,!e.hide]]))])]),[[a.vShow,this.showSeconds]])])}});const TC={disabledDate:{type:Function,default:()=>!1},steps:{type:Array,default:()=>[]},format:{type:String,default:"HH:mm:ss"},value:{type:Array,required:!0},confirm:{type:Boolean,default:!1}};var G9=a.defineComponent({name:"TimePanel",props:Z(Z(Z({},Ml),Il),TC),emits:["pick","pick-click"],setup(e,{emit:t}){const n=a.reactive({date:e.value[0]||ua(),showDate:!1}),i=a.inject(wl),s=a.ref(null),o=a.computed(()=>!(e.format||"").match(/mm$/)),c=a.computed(()=>vt.format(i.panelDate,e.format)),d=a.computed(()=>e.value[0]?["getHours","getMinutes","getSeconds"].map(p=>n.date[p]()):[]),u=a.computed(()=>{const p=["disabledHours","disabledMinutes","disabledSeconds"];if(e.disabledDate===(()=>!e.value[0]))return p.reduce((T,L)=>(T[L]=this[L],T),{});const y=[24,60,60],v=["Hours","Minutes","Seconds"].map(k=>e[`disabled${k}`]).map((k,T)=>{const L=y[T],N=k;for(let C=0;C<L;C+=e.steps[T]||1){const I=d.value.map((S,z)=>z===T?C:S),M=IC(n.date,...I);e.disabledDate(M,!0)&&N.push(C)}return N.filter((C,I,M)=>M.indexOf(C)===I)});return p.reduce((k,T,L)=>(k[T]=v[L],k),{})});a.watch(()=>e.value,p=>{let y=p[0]||ua();y=new Date(y),n.date=y}),a.onMounted(()=>{i&&i.parentName==="DatePanel"&&(n.showDate=!0)});function f(p,y=!0){const b=new Date(n.date);Object.keys(p).forEach(v=>b[`set${Lr(v)}`](p[v])),y&&t("pick",b,!0,"time")}function m(){t("pick-click")}return Se(Z({},a.toRefs(n)),{visibleDate:c,showSeconds:o,timeSlots:d,disabledHMS:u,timeSpinnerRef:s,handlePickClick:m,handleChange:f})},render(){return a.createVNode("div",{class:"bk-picker-panel-body-wrapper",onMousedown:e=>{e.preventDefault()}},[a.createVNode("div",{class:"bk-picker-panel-body",style:{width:`${this.width}px`}},[this.showDate?a.createVNode("div",{class:"bk-time-picker-header"},[this.visibleDate]):"",a.createVNode("div",{class:"bk-picker-panel-content"},[a.createVNode(mu,{ref:"timeSpinnerRef",showSeconds:this.showSeconds,steps:this.steps,hours:this.timeSlots[0],minutes:this.timeSlots[1],seconds:this.timeSlots[2],disabledHours:this.disabledHMS.disabledHours,disabledMinutes:this.disabledHMS.disabledMinutes,disabledSeconds:this.disabledHMS.disabledSeconds,hideDisabledOptions:this.hideDisabledOptions,"onPick-click":this.handlePickClick,onChange:this.handleChange},null)])])])}});const SC={modelValue:{type:[Date,String,Number,Array]},shortcuts:{type:Array,default:()=>[]},multiple:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},shortcutClose:{type:Boolean,default:!1},selectionMode:{type:String,default:"date",validator(e){return["year","month","date","time"].indexOf(e)<0?(console.error(`selectionMode property is not valid: '${e}'`),!1):!0}},startDate:{type:Date},focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1},showTime:{type:Boolean,default:!1},format:{type:String,default:"yyyy-MM-dd"},disabledDate:{type:Function,default:()=>!1},timePickerOptions:{type:Object,default:()=>({})}};var xC=a.defineComponent({name:"DatePanel",props:SC,emits:["pick","pick-success","pick-clear","pick-click","selection-mode-change"],setup(e,{slots:t,emit:n}){const i=B=>B.match(/^time/)?"time-picker":`${B}-table`,s=e.modelValue.slice().sort(),o=a.reactive({currentView:e.selectionMode||"date",pickerTable:i(e.selectionMode),dates:s,panelDate:e.startDate||s[0]||new Date}),{proxy:c}=a.getCurrentInstance();a.provide(wl,{panelDate:o.panelDate,parentName:c.$options.name});const d=a.ref(null),u=a.ref(null),f=a.ref(null);a.watch(()=>o.currentView,B=>{n("selection-mode-change",B),o.currentView==="time"&&a.nextTick(()=>{d.value.timeSpinnerRef.updateScroll()})}),a.watch(()=>e.selectionMode,B=>{o.currentView=B,o.pickerTable=i(B)}),a.watch(()=>e.modelValue,B=>{o.dates=B;const ie=e.multiple?o.dates[o.dates.length-1]:e.startDate||o.dates[0];o.panelDate=ie||new Date});const m=()=>{setTimeout(()=>{o.currentView=e.selectionMode},500)},p=B=>{o.panelDate=B,o.pickerTable==="year-table"?o.pickerTable="month-table":o.pickerTable=i(o.currentView)},y=(B,ie)=>{let le=B;e.selectionMode==="year"?le=new Date(B.getFullYear(),0,1):e.selectionMode==="month"?le=new Date(o.panelDate.getFullYear(),B.getMonth(),1):le=new Date(B),o.dates=[le],n("pick",le,!1,ie||e.selectionMode)},b=()=>{m(),n("pick-success")},v=()=>{m(),n("pick-clear")},k=B=>{B.value&&n("pick",B.value(),!1,void 0,B),B.onClick&&B.onClick(this),e.shortcutClose&&b()},T=()=>{o.currentView=e.selectionMode,o.pickerTable=i(o.currentView)},L=B=>{e.selectionMode==="year"||o.pickerTable==="year-table"?o.panelDate=new Date(o.panelDate.getFullYear()+B*10,0,1):o.panelDate=H9(o.panelDate,B*12)},N=B=>{o.panelDate=H9(o.panelDate,B)},C=B=>{var ie,le;B&&((ie=u==null?void 0:u.value)==null||ie.updateScroll(),(le=f==null?void 0:f.value)==null||le.updateScroll())},I=a.computed(()=>o.pickerTable===`${o.currentView}-table`?y:p),M=a.computed(()=>{const B="zh-CN",ie="[yyyy]-[mm]",le=o.panelDate,{labels:ve,separator:Ie}=B9(B,ie,le),ge=he=>()=>{o.pickerTable=i(he)};return{separator:Ie,labels:ve.map(he=>{const K=he;return K.handler=ge(he.type),K})}}),S=a.computed(()=>M.value.labels[0].type==="year"||o.currentView==="date"),z=a.computed(()=>M.value.labels[1].type==="year"||o.currentView==="date"),j=a.computed(()=>o.currentView==="time"),O=()=>{o.currentView=o.currentView==="time"?"date":"time"},W=a.computed(()=>!!t.shortcuts),P=a.computed(()=>!o.dates[0]);function G(){n("pick-click")}return Se(Z({},a.toRefs(o)),{panelPickerHandlers:I,datePanelLabel:M,showLabelFirst:S,showLabelSecond:z,handleShortcutClick:k,changeYear:L,changeMonth:N,reset:T,isTime:j,hasShortcuts:W,timeDisabled:P,onToggleVisibility:C,handleToggleTime:O,handlePickSuccess:b,handlePickClear:v,handlePick:y,handlePickClick:G,timePickerRef:d})},render(){var e,t,n;return a.createVNode("div",{class:["bk-picker-panel-body-wrapper",this.shortcuts.length||this.hasShortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:i=>{i.preventDefault()}},[this.shortcuts.length?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[this.shortcuts.map(i=>a.createVNode("div",{class:"bk-picker-panel-shortcut",onClick:()=>this.handleShortcutClick(i)},[i.text]))]):"",a.createVNode("div",{class:"bk-picker-panel-body",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[a.createVNode("span",{class:yn("prev","-double"),onClick:()=>this.changeYear(-1)},[a.createVNode(Sr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("prev"),onClick:()=>this.changeMonth(-1)},[a.createVNode(Si,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):"",this.datePanelLabel&&Object.keys(this.datePanelLabel).length>0?a.createVNode("span",null,[a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.datePanelLabel.labels[0].handler},[this.datePanelLabel.labels[0].label]),[[a.vShow,this.showLabelFirst]]),this.currentView==="date"?` ${this.datePanelLabel.separator} `:" ",a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.datePanelLabel.labels[1].handler},[this.datePanelLabel.labels[1].label]),[[a.vShow,this.showLabelSecond]])]):"",a.createVNode("span",{class:yn("next","-double"),onClick:()=>this.changeYear(1)},[a.createVNode(xr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("next"),onClick:()=>this.changeMonth(1)},[a.createVNode(Dn,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):""]),[[a.vShow,this.currentView!=="time"]]),a.createVNode("div",{class:"bk-picker-panel-content"},[this.currentView!=="time"?(()=>{switch(this.pickerTable){case"date-table":return a.createVNode(gu,{tableDate:this.panelDate,disabledDate:this.disabledDate,selectionMode:this.selectionMode,modelValue:this.dates,focusedDate:this.focusedDate,onPick:this.panelPickerHandlers},null);default:return null}})():a.createVNode(G9,{ref:"timePickerRef",value:this.dates,format:this.format,disabledDate:this.disabledDate,onPick:this.handlePick,"onPick-click":this.handlePickClick,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess,"onPick-toggle-time":this.handleToggleTime},null)]),this.confirm?a.createVNode(C9,{clearable:this.clearable,showTime:this.showTime,timeDisabled:this.timeDisabled,isTime:this.isTime,"onPick-toggle-time":this.handleToggleTime,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess},this.$slots):""]),this.hasShortcuts?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[(n=(t=(e=this.$slots).shortcuts)==null?void 0:t.call(e))!=null?n:null]):null])}});const DC={steps:{type:Array,default:()=>[]},format:{type:String,default:"HH:mm:ss"},value:{type:Array,required:!0},allowCrossDay:{type:Boolean,default:!1}};var Z9=a.defineComponent({name:"TimeRangePanel",props:Z(Z(Z({},Ml),Il),DC),emits:["pick","pick-click"],setup(e,{emit:t}){const[n,i]=e.value.slice(),s=a.reactive({showDate:!1,dateStart:n||ua(),dateEnd:i||ua()}),o=a.inject(wl),c=a.computed(()=>!(e.format||"").match(/mm$/)),d=a.computed(()=>vt.format(o.dates[0],e.format)),u=a.computed(()=>vt.format(o.dates[1],e.format));a.watch(()=>e.value,T=>{const[L,N]=T.slice();s.dateStart=L||ua(),s.dateEnd=N||ua()}),a.onMounted(()=>{o&&o.parentName==="DatePanel"&&(s.showDate=!0)});function f(){t("pick-click")}function m(T,L,N,C=!0){let I=new Date(s.dateStart),M=new Date(s.dateEnd);Object.keys(L).forEach(S=>{I[`set${Lr(S)}`](L[S])}),Object.keys(N).forEach(S=>{M[`set${Lr(S)}`](N[S])}),!e.allowCrossDay&&M<I&&(T==="start"&&(M=I),T==="end"&&(I=M)),C&&t("pick",[I,M],!0,"time")}function p(T){m("start",T,{})}function y(T){m("end",{},T)}const b=a.ref(null),v=a.ref(null);function k(){var T,L;(T=b==null?void 0:b.value)==null||T.updateScroll(),(L=v==null?void 0:v.value)==null||L.updateScroll()}return Se(Z({},a.toRefs(s)),{showSeconds:c,leftDatePanelLabel:d,rightDatePanelLabel:u,handleStartChange:p,handleEndChange:y,handlePickClick:f,updateScroll:k,timeSpinnerRef:b,timeSpinnerEndRef:v})},render(){return a.createVNode("div",{class:["bk-picker-panel-body-wrapper","bk-time-picker-with-range",this.showSeconds?"bk-time-picker-with-seconds":""],onMousedown:e=>{e.preventDefault()}},[a.createVNode("div",{class:"bk-picker-panel-body",style:{width:`${this.width*2}px`}},[a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-left",style:{width:`${this.width}px`}},[this.showDate?a.createVNode("div",{class:"bk-time-picker-header"},[this.leftDatePanelLabel]):"",a.createVNode(mu,{ref:"timeSpinnerRef",steps:this.steps,showSeconds:this.showSeconds,hours:this.value[0]&&this.dateStart.getHours(),minutes:this.value[0]&&this.dateStart.getMinutes(),seconds:this.value[0]&&this.dateStart.getSeconds(),disabledHours:this.disabledHours,disabledMinutes:this.disabledMinutes,disabledSeconds:this.disabledSeconds,hideDisabledOptions:this.hideDisabledOptions,onChange:this.handleStartChange,"onPick-click":this.handlePickClick},null)]),a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-right",style:{width:`${this.width}px`}},[this.showDate?a.createVNode("div",{class:"bk-time-picker-header"},[this.rightDatePanelLabel]):"",a.createVNode(mu,{ref:"timeSpinnerEndRef",steps:this.steps,showSeconds:this.showSeconds,hours:this.value[1]&&this.dateEnd.getHours(),minutes:this.value[1]&&this.dateEnd.getMinutes(),seconds:this.value[1]&&this.dateEnd.getSeconds(),disabledHours:this.disabledHours,disabledMinutes:this.disabledMinutes,disabledSeconds:this.disabledSeconds,hideDisabledOptions:this.hideDisabledOptions,onChange:this.handleEndChange,"onPick-click":this.handlePickClick},null)])])])}});const jC={modelValue:{type:[Date,String,Number,Array]},type:{type:String,default:"date",validator(e){return["year","month","date","daterange","datetime","datetimerange","time","timerange"].indexOf(e)<0?(console.error(`type property is not valid: '${e}'`),!1):!0}},shortcuts:{type:Array,default:()=>[]},shortcutClose:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},splitPanels:{type:Boolean,default:!0},showTime:{type:Boolean,default:!1},selectionMode:{type:String,default:"date",validator(e){return["year","month","date","time"].indexOf(e)<0?(console.error(`selectionMode property is not valid: '${e}'`),!1):!0}},startDate:{type:Date},upToNow:{type:Boolean,default:!1},disabledDate:Function,focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1},format:{type:String,default:"yyyy-MM-dd"},timePickerOptions:{type:Object,default:()=>({})}};var zC=a.defineComponent({name:"DateRangePanel",props:jC,emits:["pick","pick-success","pick-clear","pick-click"],setup(e,{slots:t,emit:n}){const[i,s]=e.modelValue.map(H=>H||ua()),o=e.startDate?e.startDate:i,c=a.reactive({currentView:e.selectionMode||"date",leftPickerTable:`${e.selectionMode}-table`,rightPickerTable:`${e.selectionMode}-table`,leftPanelDate:o,rightPanelDate:new Date(o.getFullYear(),o.getMonth()+1,1),rangeState:{from:e.modelValue[0],to:e.modelValue[1],selecting:i&&!s},upToNowEnable:!1,dates:e.modelValue}),{proxy:d}=a.getCurrentInstance();a.provide(wl,{dates:c.dates,parentName:d.$options.name});const u=(H,Q)=>!H||!Q?0:H.getTime()-Q.getTime(),f=()=>{c.currentView=e.selectionMode,c.leftPickerTable=`${c.currentView}-table`,c.rightPickerTable=`${c.currentView}-table`},m=a.ref(null),p=a.ref(null),y=H=>{var Q,ae;H&&((Q=m==null?void 0:m.value)==null||Q.updateScroll(),(ae=p==null?void 0:p.value)==null||ae.updateScroll())},b=(H,Q,ae,D=!0)=>{const _=new Date(c[`${H}PanelDate`]);if(_[`set${Q}`](_[`get${Q}`]()+ae),c[`${H}PanelDate`]=_,!!D)if(e.splitPanels){const R=H==="left"?"right":"left";H==="left"&&c.leftPanelDate>=c.rightPanelDate&&b(R,Q,1),H==="right"&&c.rightPanelDate<=c.leftPanelDate&&b(R,Q,-1)}else{const R=H==="left"?"right":"left",de=c[`${R}PanelDate`],ue=new Date(de);if(Q==="Month"){const me=new Date(ue.getFullYear(),ue.getMonth()+ae+1,0).getDate();ue.setDate(Math.min(me,ue.getDate()))}ue[`set${Q}`](ue[`get${Q}`]()+ae),c[`${R}PanelDate`]=ue}},v=H=>{const Q=c.currentView==="year"?-10:-1;b(H,"FullYear",Q)},k=H=>{const Q=c.currentView==="year"?10:1;b(H,"FullYear",Q)},T=H=>{b(H,"Month",-1)},L=H=>{b(H,"Month",1)},N=H=>{c[`${H}PickerTable`]="year-table"},C=H=>{c[`${H}PickerTable`]="month-table"},I=H=>{const Q="zh-CN",ae="[yyyy]-[mm]",D=c[`${H}PanelDate`],{labels:_,separator:R}=B9(Q,ae,D),de=ue=>{const me=ue==="month"?C:N;return()=>me(H)};return{separator:R,labels:_.map(ue=>{const me=ue;return me.handler=de(ue.type),me})}},M=(H,Q)=>{n("pick",c.dates,H,Q||e.type)},S=(H,Q)=>{if(c.rangeState.selecting||c.currentView==="time"){if(c.currentView==="time")c.dates=H;else{const[ae,D]=[c.rangeState.from,H].sort(u),_=Q==="upToNow"?new Date:new Date(new Date(new Date(D.setHours(23)).setMinutes(59)).setSeconds(59));c.dates=[ae,_],c.rangeState={from:ae,to:_,selecting:!1}}M(!1,Q||"date")}else c.upToNowEnable=new Date(H).getTime()<new Date().getTime(),c.rangeState={from:H,to:null,selecting:!0}},z=(H,Q)=>{if(c[`${H}PanelDate`]=Q,c[`${H}PickerTable`]==="year-table"?c[`${H}PickerTable`]="month-table":c[`${H}PickerTable`]=`${c.currentView}-table`,!e.splitPanels){const D=H==="left"?"right":"left";c[`${D}PanelDate`]=Q,b(D,"Month",D==="left"?-1:1,!1)}},j=(H,Q)=>{if(!(H!=null&&H.value))return!1;H.onClick&&H.onClick(H,Q);const ae=typeof H.value=="function"?H.value():H.value,[D,_]=ae;c.rangeState.from=D,c.rangeState.to=_,c.dates=[D,_],n("pick",ae,!1,"shortcut",H),e.shortcutClose&&n("pick-success")},O=H=>{c.rangeState.to=H};function W(H){c.leftPanelDate=H;const Q=new Date(H.getFullYear(),H.getMonth()+1,1),ae=c.dates[1]?c.dates[1].getTime():c.dates[1];c.rightPanelDate=e.splitPanels?new Date(Math.max(ae,Q.getTime())):Q}a.watch(()=>e.selectionMode,H=>{c.currentView=H||"range"}),a.watch(()=>e.modelValue,H=>{const Q=H[0]?an(H[0]):null,ae=H[1]?an(H[1]):null;c.dates=[Q,ae].sort(u),c.rangeState={from:c.dates[0],to:c.dates[1],selecting:!1},W(e.startDate||c.dates[0]||new Date)}),a.watch(()=>c.currentView,H=>{const Q=c.leftPanelDate.getMonth(),ae=c.rightPanelDate.getMonth(),D=c.leftPanelDate.getFullYear()===c.rightPanelDate.getFullYear();H==="date"&&D&&Q===ae&&b("right","Month",1),H==="month"&&D&&b("right","FullYear",1),H==="year"&&D&&b("right","FullYear",10),c.currentView==="time"&&a.nextTick(()=>{X.value.updateScroll()})});const P=a.computed(()=>c.currentView==="time"),G=a.computed(()=>I("left")),B=a.computed(()=>I("right")),ie=a.computed(()=>c.leftPickerTable.split("-").shift()),le=a.computed(()=>c.rightPickerTable.split("-").shift()),ve=a.computed(()=>G.value.labels[0].type==="year"||c.currentView==="date"),Ie=a.computed(()=>G.value.labels[1].type==="year"||c.currentView==="date"),ge=a.computed(()=>B.value.labels[0].type==="year"||c.currentView==="date"),he=a.computed(()=>B.value.labels[1].type==="year"||c.currentView==="date"),K=a.computed(()=>{const H=`${c.currentView}-table`;return{left:c.leftPickerTable!==H,right:c.rightPickerTable!==H}}),$=a.computed(()=>({left:K.value.left?z.bind("left"):S,right:K.value.right?z.bind("right"):S})),V=a.computed(()=>{var H;return t.shortcuts||((H=e.shortcuts)==null?void 0:H.length)}),J=()=>{c.currentView=c.currentView==="time"?"date":"time"},re=()=>{setTimeout(()=>{c.currentView=e.selectionMode},500)},U=()=>{re(),n("pick-success")},q=()=>{re(),n("pick-clear")};function ce(){n("pick-click")}const we=a.computed(()=>!(c.dates[0]&&c.dates[1])),X=a.ref(null);return Se(Z({},a.toRefs(c)),{isTime:P,hasShortcuts:V,prevYear:v,nextYear:k,prevMonth:T,nextMonth:L,leftDatePanelLabel:G,rightDatePanelLabel:B,leftDatePanelView:ie,rightDatePanelView:le,leftShowLabelFirst:ve,leftShowLabelSecond:Ie,rightShowLabelFirst:ge,rightShowLabelSecond:he,preSelecting:K,panelPickerHandlers:$,timeDisabled:we,handleShortcutClick:j,reset:f,onToggleVisibility:y,handleRangePick:S,handleChangeRange:O,handleToggleTime:J,handlePickSuccess:U,handlePickClear:q,handlePickClick:ce,timePickerRef:X})},render(){let e=null;if(this.hasShortcuts){let t="";this.$slots.shortcuts?t=typeof this.$slots.shortcuts=="function"?this.$slots.shortcuts():this.$slots.shortcuts:this.shortcuts.length&&(t=a.createVNode("div",{class:"bk-picker-panel-shortcuts"},[this.shortcuts.map((n,i)=>a.createVNode("div",{key:i,class:"shortcuts-item",onClick:()=>this.handleShortcutClick(n,i)},[n.text]))])),e=a.createVNode("div",{class:"bk-picker-panel-sidebar"},[t])}return a.createVNode("div",{class:["bk-picker-panel-body-wrapper","bk-date-picker-with-range",this.shortcuts.length||this.$slots.shortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:t=>{t.preventDefault()}},[a.createVNode("div",{class:["bk-picker-panel-body",this.showTime?"bk-picker-panel-body-time":"bk-picker-panel-body-date"]},[a.withDirectives(a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-left",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[a.createVNode("span",{class:yn("prev","-double"),onClick:()=>this.prevYear("left")},[a.createVNode(Sr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("prev"),onClick:()=>this.prevMonth("left")},[a.createVNode(Si,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):"",this.leftDatePanelLabel&&Object.keys(this.leftDatePanelLabel).length>0?a.createVNode("span",null,[a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.leftDatePanelLabel.labels[0].handler},[this.leftDatePanelLabel.labels[0].label]),[[a.vShow,this.leftShowLabelFirst]]),this.leftDatePanelView==="date"?` ${this.leftDatePanelLabel.separator} `:" ",a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.leftDatePanelLabel.labels[1].handler},[this.leftDatePanelLabel.labels[1].label]),[[a.vShow,this.leftShowLabelSecond]])]):"",this.splitPanels||this.leftPickerTable!=="date-table"?a.createVNode("span",{class:yn("next","-double"),onClick:()=>this.nextYear("left")},[a.createVNode(xr,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels||this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("next"),onClick:()=>this.nextMonth("left")},[a.createVNode(Dn,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):""]),[[a.vShow,this.currentView!=="time"]]),this.currentView!=="time"?(()=>{switch(this.leftPickerTable){case"date-table":return a.createVNode(gu,{selectionMode:"range",tableDate:this.leftPanelDate,disabledDate:this.disabledDate,rangeState:this.rangeState,modelValue:this.preSelecting.left?[this.dates[0]]:this.dates,focusedDate:this.focusedDate,onChangeRange:this.handleChangeRange,onPick:this.panelPickerHandlers.left},null);default:return null}})():""]),[[a.vShow,!this.isTime]]),a.withDirectives(a.createVNode("div",{class:"bk-picker-panel-content bk-picker-panel-content-right",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[this.splitPanels||this.rightPickerTable!=="date-table"?a.createVNode("span",{class:yn("prev","-double"),onClick:()=>this.prevYear("right")},[a.createVNode(Sr,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels&&this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("prev","-double"),onClick:()=>this.prevMonth("right")},[a.createVNode(Si,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):"",this.rightDatePanelLabel&&Object.keys(this.rightDatePanelLabel).length>0?a.createVNode("span",null,[a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.rightDatePanelLabel.labels[0].handler},[this.rightDatePanelLabel.labels[0].label]),[[a.vShow,this.rightShowLabelFirst]]),this.rightDatePanelView==="date"?` ${this.rightDatePanelLabel.separator} `:" ",a.withDirectives(a.createVNode("span",{class:"bk-date-picker-header-label",onClick:()=>this.rightDatePanelLabel.labels[1].handler},[this.rightDatePanelLabel.labels[1].label]),[[a.vShow,this.rightShowLabelSecond]])]):"",this.upToNow?(()=>(this.rangeState.selecting||this.currentView==="time")&&this.upToNowEnable?a.createVNode("span",{class:"up-to-now",onClick:()=>this.handleRangePick(new Date,"upToNow")},[a.createTextVNode("\u81F3\u4ECA")]):a.createVNode("span",{class:"up-to-now disabled"},[a.createTextVNode("\u81F3\u4ECA")]))():"",a.createVNode("span",{class:yn("next","-double"),onClick:()=>this.nextYear("right")},[a.createVNode(xr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:yn("next"),onClick:()=>this.nextMonth("right")},[a.createVNode(Dn,{style:{fontSize:"20px",lineHeight:1}},null)]),[[a.vShow,this.currentView==="date"]]):""]),[[a.vShow,this.currentView!=="time"]]),this.currentView!=="time"?(()=>{switch(this.rightPickerTable){case"date-table":return a.createVNode(gu,{selectionMode:"range",tableDate:this.rightPanelDate,disabledDate:this.disabledDate,rangeState:this.rangeState,modelValue:this.preSelecting.right?[this.dates[this.dates.length-1]]:this.dates,focusedDate:this.focusedDate,onChangeRange:this.handleChangeRange,onPick:this.panelPickerHandlers.right},null);default:return null}})():""]),[[a.vShow,!this.isTime]]),this.isTime?a.createVNode(Z9,{ref:"timePickerRef",value:this.dates,format:this.format,disabledDate:this.disabledDate,onPick:this.handleRangePick,"onPick-click":this.handlePickClick,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess,"onPick-toggle-time":this.handleToggleTime},null):"",this.confirm?a.createVNode(C9,{clearable:this.clearable,showTime:this.showTime,timeDisabled:this.timeDisabled,isTime:this.isTime,"onPick-toggle-time":this.handleToggleTime,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess},this.$slots):""]),e])}}),OC=a.defineComponent({name:"DatePicker",directives:{clickoutside:jn},props:Ml,emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=xn(),s=e.type.includes("range"),o=s?[null,null]:[null],c=s?e.value||e.modelValue:[e.value||e.modelValue];let d=Q9(c)?o:Ri(e.value||e.modelValue,e.type,e.multiple,e.format),u=null;e.shortcutSelectedIndex!==-1&&(u=e.shortcuts[e.shortcutSelectedIndex]||null,u&&(d=u.value()));const f=a.reactive({showClose:!1,visible:!1,internalValue:d,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:d[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:d.map(vl),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:u,onSelectionModeChange:m});function m(H){let Q=H;return H.match(/^date/)&&(Q="date"),f.selectionMode=["year","month","date","time"].indexOf(Q)>-1&&Q,f.selectionMode}const p=a.computed(()=>{if(e.multiple)return f.internalValue.slice();const H=e.type.includes("range");let Q=f.internalValue.map(ae=>ae instanceof Date?new Date(ae):ae||"");return e.type.match(/^time/)&&(Q=Q.map(ae=>Zn(ae,e.type,e.multiple,e.format))),H||e.multiple?Q:Q[0]}),y=a.computed(()=>e.type.match(/^time/)?p.value:e.multiple?Zn(p.value,e.type,e.multiple,e.format):Array.isArray(p.value)?p.value.map(H=>Zn(H,e.type,e.multiple,e.format)):Zn(p.value,e.type,e.multiple,e.format)),b=a.computed(()=>e.type==="daterange"||e.type==="datetimerange"?"DateRangePanel":"DatePanel"),v=a.computed(()=>e.open===null?f.visible:e.open),k=a.computed(()=>Zn(f.internalValue,e.type,e.multiple,e.format)),T=a.computed(()=>{var H;return((H=f.shortcut)==null?void 0:H.text)&&e.useShortcutText?f.shortcut.text:k.value}),L=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),N=a.computed(()=>!!t.header),C=a.computed(()=>!!t.footer),I=a.computed(()=>!!t.shortcuts),M=a.computed(()=>!!t.confirm),S=a.computed(()=>{let H="";return e.fontSize==="medium"?H="medium-font":e.fontSize==="large"&&(H="large-font"),H}),z=a.computed(()=>{let H="";return e.fontSize==="medium"?H="medium-width":e.fontSize==="large"&&(H="large-width"),H}),j=a.computed(()=>{var H;return((H=f.shortcut)==null?void 0:H.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),O=a.computed(()=>e.options),W=a.computed(()=>b.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),P=a.ref(null),G=()=>{var H;(H=P==null?void 0:P.value)==null||H.focus()};a.watch(()=>f.visible,H=>{var Q,ae;H===!1&&((Q=B.value)==null||Q.destoryDropdown()),(ae=B.value)==null||ae.updateDropdown(),n("open-change",H)});const B=a.ref(null);a.watch(()=>e.modelValue,H=>{var Q;f.internalValue=Ri(H,e.type,e.multiple,e.format),e.withValidate&&((Q=i==null?void 0:i.validate)==null||Q.call(i,"change"))}),a.watch(()=>e.open,H=>{f.visible=H===!0}),a.watch(()=>e.type,H=>{m(H)}),a.watch(()=>p,(H,Q)=>{const ae=JSON.stringify(H),D=JSON.stringify(Q);(ae!==D||typeof H!=typeof Q)&&n("input",H)}),a.onMounted(()=>{e.type.indexOf("date")>-1,f.timeEnterMode=!0;const H=e.modelValue,Q=p.value;(typeof H!=typeof Q||JSON.stringify(H)!==JSON.stringify(Q))&&n("input",p.value),e.open!==null&&(f.visible=e.open),a.provide(W9,{props:e,focus:()=>G()})});const ie=a.ref(null),le=H=>{var Q;if(f.disableCloseUnderTransfer)return f.disableCloseUnderTransfer=!1,!1;if(H&&H.type==="mousedown"&&f.visible){H.preventDefault(),H.stopPropagation();return}if(f.visible){const ae=(Q=ie==null?void 0:ie.value)==null?void 0:Q.$el;if(H&&ae&&ae.contains(H.target))return;f.visible=!1,H==null||H.preventDefault(),H==null||H.stopPropagation();return}f.isFocused=!1,f.disableClickOutSide=!1},ve=()=>{var H,Q;(H=P==null?void 0:P.value)==null||H.focus(),(Q=P==null?void 0:P.value)==null||Q.click()},Ie=()=>{e.readonly||e.disabled||k!=null&&k.value&&(f.showClose=!0)},ge=H=>{f.showClose=!1},he=H=>{a.nextTick(()=>{var Q;n("update:modelValue",p.value),n("change",y.value,H),e.type.indexOf("time")<0&&((Q=P==null?void 0:P.value)==null||Q.blur())})},K=H=>{var me;const Q=e.type.includes("range")||e.multiple,ae=k.value,D=H.target.value,_=Ri(D,e.type,e.multiple,e.format),R=Q?_:_[0],de=(me=e.disabledDate)==null?void 0:me.call(e,R),ue=_.reduce((te,se)=>te&&se instanceof Date,!0);D!==ae&&!de&&ue?(he(e.type),f.internalValue=_):f.forceInputRerender=f.forceInputRerender+1},$=H=>{e.readonly||(f.isFocused=!0,!(H&&H.type==="focus")&&(e.disabled||(f.visible=!0)))},V=()=>{var H;(H=ie==null?void 0:ie.value)==null||H.reset()},J=H=>{var Q,ae;if(f.internalFocus){f.internalFocus=!1;return}if(f.visible){H.preventDefault();return}f.isFocused=!1,m(e.type),f.internalValue=f.internalValue.slice(),V(),(Q=ie==null?void 0:ie.value)==null||Q.onToggleVisibility(!1),(ae=i==null?void 0:i.validate)==null||ae.call(i,"blur")},re=H=>{const{keyCode:Q}=H;if(Q===9&&f.visible)if(H.stopPropagation(),H.preventDefault(),L.value){const D=".bk-picker-confirm > *",_=B.value.$el.querySelectorAll(D);f.internalFocus=!0,[..._][H.shiftKey?"pop":"shift"]().focus()}else le();const ae=[37,38,39,40];if(!f.visible&&ae.includes(Q)){f.visible=!0;return}Q===27&&f.visible&&(H.stopPropagation(),le()),!!ae.includes(Q)&&f.focusedTime.active&&H.preventDefault()},U=()=>{f.visible=!1,f.internalValue=f.internalValue.map(()=>null),n("clear"),he(e.type),V(),f.showClose=!1,f.shortcut=null,setTimeout(()=>m(e.type),500)},q=()=>{var H;f.visible=!1,a.nextTick(()=>{n("pick-success")}),(H=P==null?void 0:P.value)==null||H.blur(),V()},ce=(H,Q=!1,ae,D)=>{let _=H;if(e.multiple){const de=_.getTime(),ue=f.internalValue.findIndex(se=>se&&se.getTime()===de),te=[...f.internalValue,_].filter(Boolean).map(se=>se.getTime()).filter((se,be,ke)=>ke.indexOf(se)===be&&be!==ue);f.internalValue=te.map(se=>new Date(se))}else _=Ri(H,e.type,e.multiple,e.format),f.internalValue=Array.isArray(_)?_:[_];if(f.internalValue[0]){const[de]=f.internalValue;f.focusedDate=de}f.focusedTime=Se(Z({},f.focusedTime),{time:f.internalValue.map(vl)}),L.value||(m(e.type),f.visible=Q),ae==="upToNow"&&e.type==="daterange"&&q(),f.shortcut=D,he(ae);const R=e.shortcuts.findIndex(de=>de===f.shortcut);n("shortcut-change",f.shortcut,R)},we=a.ref(null),X=()=>{var H,Q;(Q=(H=ie.value).handleToggleTime)==null||Q.call(H)};return Se(Z({},a.toRefs(f)),{panel:b,publicStringValue:y,opened:v,visualValue:k,displayValue:T,isConfirm:L,hasHeader:N,hasFooter:C,hasShortcuts:I,hasConfirm:M,fontSizeCls:S,longWidthCls:z,localReadonly:j,allowCrossDayProp:W,ownPickerProps:O,pickerDropdownRef:B,inputRef:P,triggerRef:we,pickerPanelRef:ie,handleClose:le,handleIconClick:ve,handleInputMouseenter:Ie,handleInputMouseleave:ge,handleFocus:$,handleBlur:J,handleKeydown:re,handleInputChange:K,handleClear:U,onPick:ce,onPickSuccess:q,handleToggleTime:X})},render(){var s,o,c;const e=a.createVNode("div",null,[a.createVNode("span",{class:["icon-wrapper",this.disabled?"disabled":""],onClick:this.handleIconClick},[this.type==="time"||this.type==="timerange"?a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"time"},[a.createVNode("path",{fill:"#c4c6cc",d:"M512,128c51.9,0,102.2,10.1,149.5,30.2c45.7,19.3,86.8,47,122.1,82.3s63,76.4,82.3,122.1c20,47.3,30.2,97.6,30.2,149.5S886,614.3,865.9,661.6c-19.3,45.7-47,86.8-82.3,122.1s-76.4,63-122.1,82.3c-47.3,20-97.6,30.2-149.5,30.2S409.8,886.1,362.5,866c-45.7-19.3-86.8-47-122.1-82.3s-63-76.4-82.3-122.1c-20-47.3-30.2-97.6-30.2-149.5s10.1-102.2,30.2-149.5c19.3-45.7,47-86.8,82.3-122.1s76.4-63,122.1-82.3C409.8,138.1,460.1,128,512,128 M512,64C264.6,64,64,264.6,64,512s200.6,448,448,448s448-200.6,448-448S759.4,64,512,64L512,64z"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"512,512 512,256 448,256 448,512 448,576 512,576 768,576 768,512"},null)])]):a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"date"},[a.createVNode("path",{fill:"#c4c6cc",d:"M896,128h-96v64h64v112H160V192h64v-64h-96c-17.7,0-32,14.3-32,32v736c0,17.7,14.3,32,32,32h768c17.7,0,32-14.3,32-32V160C928,142.3,913.7,128,896,128z M160,864V368h704v496H160z"},null),a.createVNode("rect",{x:"416",y:"128",fill:"#c4c6cc",width:"192",height:"64"},null),a.createVNode("rect",{x:"288",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("rect",{x:"672",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"403.7,514.4 557.1,514.4 557.1,515.3 420.1,765.5 483.5,765.5 620.3,504.3 620.3,466.5 403.7,466.5"},null)])])]),a.createVNode("input",{type:"text",class:["bk-date-picker-editor",this.readonly?"readonly":"",this.fontSizeCls,this.behavior==="simplicity"?"only-bottom-border":""],ref:"inputRef",key:this.forceInputRerender,readonly:this.localReadonly,disabled:this.disabled,placeholder:this.placeholder,value:this.displayValue,onFocus:this.handleFocus,onClick:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onChange:this.handleInputChange},null),this.clearable&&this.showClose?a.createVNode(Zt,{onClick:this.handleClear,class:"clear-action"},null):""]),t=this.hasShortcuts?{shortcuts:()=>{var d,u;return((u=(d=this.$slots).shortcuts)==null?void 0:u.call(d,{change:this.onPick}))||null}}:{},n=this.hasConfirm?{confirm:this.$slots.confirm}:{},i=Z(Z({},t),n);return a.withDirectives(a.createVNode("div",{class:["bk-date-picker",this.type==="datetimerange"?"long":"",this.longWidthCls]},[a.createVNode("div",{ref:"triggerRef",class:"bk-date-picker-rel",onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave},[(c=(o=(s=this.$slots).trigger)==null?void 0:o.call(s))!=null?c:e]),a.createVNode(a.Teleport,{to:"body",disabled:!this.appendToBody},{default:()=>[a.createVNode(a.Transition,{name:"bk-fade-down-transition"},{default:()=>[a.withDirectives(a.createVNode(cu,{class:[this.appendToBody?"bk-date-picker-transfer":""],ref:"pickerDropdownRef",triggerRef:this.triggerRef,placement:this.placement,extPopoverCls:this.extPopoverCls,appendToBody:this.appendToBody},{default:()=>{var d,u,f,m,p,y;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(f=(u=(d=this.$slots).header)==null?void 0:u.call(d))!=null?f:null]):null,this.panel==="DateRangePanel"?a.createVNode(zC,{ref:"pickerPanelRef",type:this.type,showTime:this.type==="datetime"||this.type==="datetimerange",confirm:this.isConfirm,shortcuts:this.shortcuts,shortcutClose:this.shortcutClose,modelValue:this.internalValue,selectionMode:this.selectionMode,startDate:this.startDate,disabledDate:this.disabledDate,focusedDate:this.focusedDate,timePickerOptions:this.timePickerOptions,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,"onSelection-mode-change":this.onSelectionModeChange},i):a.createVNode(xC,{ref:"pickerPanelRef",clearable:this.clearable,showTime:this.type==="datetime"||this.type==="datetimerange",confirm:this.isConfirm,shortcuts:this.shortcuts,multiple:this.multiple,shortcutClose:this.shortcutClose,selectionMode:this.selectionMode,modelValue:this.internalValue,startDate:this.startDate,disabledDate:this.disabledDate,focusedDate:this.focusedDate,timePickerOptions:this.timePickerOptions,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,"onSelection-mode-change":this.onSelectionModeChange},i),this.hasFooter?a.createVNode("div",{class:["bk-date-picker-footer-wrapper",this.footerSlotCls]},[(y=(p=(m=this.$slots).footer)==null?void 0:p.call(m))!=null?y:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}}),AC=a.defineComponent({name:"TimePicker",directives:{clickoutside:jn},props:Z(Z(Z({},Ml),LC),Il),emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=xn(),s=e.type.includes("range"),o=s?[null,null]:[null];let c=Q9((s?e.modelValue:[e.modelValue])||[])?o:Ri(e.modelValue,e.type,e.multiple,e.format),d=null;e.shortcutSelectedIndex!==-1&&(d=e.shortcuts[e.shortcutSelectedIndex]||null,d&&(c=d.value()));const u=a.reactive({showClose:!1,visible:!1,internalValue:c,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:c[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:c.map(vl),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:d,onSelectionModeChange:f});function f(X){let H=X;return X.match(/^date/)&&(H="date"),u.selectionMode=["year","month","date","time"].indexOf(H)>-1&&H,u.selectionMode}const m=a.computed(()=>{if(e.multiple)return u.internalValue.slice();const X=e.type.includes("range");let H=u.internalValue.map(Q=>Q instanceof Date?new Date(Q):Q||"");return e.type.match(/^time/)&&(H=H.map(Q=>Zn(Q,e.type,e.multiple,e.format))),X||e.multiple?H:H[0]}),p=a.computed(()=>e.type.match(/^time/)?m.value:e.multiple?Zn(m.value,e.type,e.multiple,e.format):Array.isArray(m.value)?m.value.map(X=>Zn(X,e.type,e.multiple,e.format)):Zn(m.value,e.type,e.multiple,e.format)),y=a.computed(()=>e.type==="timerange"?"RangeTimePickerPanel":"TimePickerPanel"),b=a.computed(()=>e.open===null?u.visible:e.open),v=a.computed(()=>Zn(u.internalValue,e.type,e.multiple,e.format)),k=a.computed(()=>{var X;return((X=u.shortcut)==null?void 0:X.text)&&e.useShortcutText?u.shortcut.text:v.value}),T=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),L=a.computed(()=>!!t.header),N=a.computed(()=>!!t.footer),C=a.computed(()=>!!t.shortcuts),I=a.computed(()=>{let X="";return e.fontSize==="medium"?X="medium-font":e.fontSize==="large"&&(X="large-font"),X}),M=a.computed(()=>{let X="";return e.fontSize==="medium"?X="medium-width":e.fontSize==="large"&&(X="large-width"),X}),S=a.computed(()=>{var X;return((X=u.shortcut)==null?void 0:X.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),z=a.computed(()=>({disabledHours:e.disabledHours,disabledMinutes:e.disabledMinutes,disabledSeconds:e.disabledSeconds,hideDisabledOptions:e.hideDisabledOptions})),j=a.computed(()=>y.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),O=a.ref(null),W=()=>{var X;(X=O==null?void 0:O.value)==null||X.focus()},{proxy:P}=a.getCurrentInstance(),G=a.ref(null);a.watch(()=>u.visible,X=>{var H,Q;X&&((Q=(H=G.value)==null?void 0:H.forceUpdate)==null||Q.call(H),a.nextTick(()=>{var ae,D;(D=(ae=P.pickerPanelRef)==null?void 0:ae.timeSpinnerRef)==null||D.updateScroll()}))}),a.watch(()=>e.modelValue,X=>{var H;u.internalValue=Ri(X,e.type,e.multiple,e.format),e.withValidate&&((H=i==null?void 0:i.validate)==null||H.call(i,"change"))}),a.watch(()=>e.open,X=>{u.visible=X===!0}),a.watch(()=>e.type,X=>{f(X)}),a.watch(()=>m,(X,H)=>{const Q=JSON.stringify(X),ae=JSON.stringify(H);(Q!==ae||typeof X!=typeof H)&&n("input",X)}),a.onMounted(()=>{e.type.indexOf("date")>-1,u.timeEnterMode=!0;const X=e.modelValue,H=m.value;(typeof X!=typeof H||JSON.stringify(X)!==JSON.stringify(H))&&n("input",m.value),e.open!==null&&(u.visible=e.open),a.provide(W9,{props:e,focus:()=>W()})});const B=a.ref(null),ie=X=>{var H;if(u.disableCloseUnderTransfer)return u.disableCloseUnderTransfer=!1,!1;if(X&&X.type==="mousedown"&&u.visible){X.preventDefault(),X.stopPropagation();return}if(u.visible){const Q=(H=B==null?void 0:B.value)==null?void 0:H.$el;if(X&&Q&&Q.contains(X.target))return;u.visible=!1,X==null||X.preventDefault(),X==null||X.stopPropagation();return}u.isFocused=!1,u.disableClickOutSide=!1},le=()=>{var X,H;(X=O==null?void 0:O.value)==null||X.focus(),(H=O==null?void 0:O.value)==null||H.click()},ve=()=>{e.readonly||e.disabled||v!=null&&v.value&&(u.showClose=!0)},Ie=X=>{u.showClose=!1},ge=X=>{a.nextTick(()=>{var H;n("update:modelValue",m.value),n("change",p.value,X),e.type.indexOf("time")<0&&((H=O==null?void 0:O.value)==null||H.blur())})},he=X=>{var ue;const H=e.type.includes("range")||e.multiple,Q=v.value,ae=X.target.value,D=Ri(ae,e.type,e.multiple,e.format),_=H?D:D[0],R=(ue=e.disabledDate)==null?void 0:ue.call(e,_),de=D.reduce((me,te)=>me&&te instanceof Date,!0);ae!==Q&&!R&&de?(ge(e.type),u.internalValue=D):u.forceInputRerender=u.forceInputRerender+1},K=X=>{e.readonly||(u.isFocused=!0,!(X&&X.type==="focus")&&(e.disabled||(u.visible=!0)))},$=()=>{var X,H;(H=(X=B==null?void 0:B.value)==null?void 0:X.reset)==null||H.call(X)},V=X=>{var H,Q;if(u.internalFocus){u.internalFocus=!1;return}if(u.visible){X.preventDefault();return}u.isFocused=!1,f(e.type),u.internalValue=u.internalValue.slice(),$(),(H=B==null?void 0:B.value)==null||H.onToggleVisibility(!1),(Q=i==null?void 0:i.validate)==null||Q.call(i,"blur")},J=X=>{const{keyCode:H}=X;if(H===9&&u.visible)if(X.stopPropagation(),X.preventDefault(),T.value){const ae=".bk-picker-confirm > *",D=G.value.$el.querySelectorAll(ae);u.internalFocus=!0,[...D][X.shiftKey?"pop":"shift"]().focus()}else ie();const Q=[37,38,39,40];if(!u.visible&&Q.includes(H)){u.visible=!0;return}H===27&&u.visible&&(X.stopPropagation(),ie()),!!Q.includes(H)&&u.focusedTime.active&&X.preventDefault()},re=()=>{u.visible=!1,u.internalValue=u.internalValue.map(()=>null),n("clear"),ge(e.type),$(),u.showClose=!1,u.shortcut=null,setTimeout(()=>f(e.type),500)},U=()=>{e.appendToBody&&(u.disableCloseUnderTransfer=!0)},q=()=>{var X;u.visible=!1,a.nextTick(()=>{n("pick-success")}),(X=O==null?void 0:O.value)==null||X.blur(),$()},ce=(X,H=!1,Q,ae)=>{let D=X;if(e.multiple){const R=D.getTime(),de=u.internalValue.findIndex(te=>te&&te.getTime()===R),me=[...u.internalValue,D].filter(Boolean).map(te=>te.getTime()).filter((te,se,be)=>be.indexOf(te)===se&&se!==de);u.internalValue=me.map(te=>new Date(te))}else D=Ri(X,e.type,e.multiple,e.format),u.internalValue=Array.isArray(D)?D:[D];if(u.internalValue[0]){const[R]=u.internalValue;u.focusedDate=R}u.focusedTime=Se(Z({},u.focusedTime),{time:u.internalValue.map(vl)}),T.value||(f(e.type),u.visible=H),Q==="upToNow"&&e.type==="daterange"&&q(),u.shortcut=ae,ge(Q);const _=e.shortcuts.findIndex(R=>R===u.shortcut);n("shortcut-change",u.shortcut,_)},we=a.ref(null);return Se(Z({},a.toRefs(u)),{panel:y,publicStringValue:p,opened:b,visualValue:v,displayValue:k,isConfirm:T,hasHeader:L,hasFooter:N,hasShortcuts:C,fontSizeCls:I,longWidthCls:M,localReadonly:S,allowCrossDayProp:j,ownPickerProps:z,pickerDropdownRef:G,inputRef:O,triggerRef:we,pickerPanelRef:B,handleClose:ie,handleIconClick:le,handleInputMouseenter:ve,handleInputMouseleave:Ie,handleFocus:K,handleBlur:V,handleKeydown:J,handleInputChange:he,handleClear:re,handleTransferClick:U,onPick:ce,onPickSuccess:q})},render(){var n,i,s;const e=a.createVNode("div",null,[a.createVNode("span",{class:["icon-wrapper",this.disabled?"disabled":""],onClick:this.handleIconClick},[this.type==="time"||this.type==="timerange"?a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"time"},[a.createVNode("path",{fill:"#c4c6cc",d:"M512,128c51.9,0,102.2,10.1,149.5,30.2c45.7,19.3,86.8,47,122.1,82.3s63,76.4,82.3,122.1c20,47.3,30.2,97.6,30.2,149.5S886,614.3,865.9,661.6c-19.3,45.7-47,86.8-82.3,122.1s-76.4,63-122.1,82.3c-47.3,20-97.6,30.2-149.5,30.2S409.8,886.1,362.5,866c-45.7-19.3-86.8-47-122.1-82.3s-63-76.4-82.3-122.1c-20-47.3-30.2-97.6-30.2-149.5s10.1-102.2,30.2-149.5c19.3-45.7,47-86.8,82.3-122.1s76.4-63,122.1-82.3C409.8,138.1,460.1,128,512,128 M512,64C264.6,64,64,264.6,64,512s200.6,448,448,448s448-200.6,448-448S759.4,64,512,64L512,64z"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"512,512 512,256 448,256 448,512 448,576 512,576 768,576 768,512"},null)])]):a.createVNode("svg",{class:"picker-icon",x:"0px",y:"0px",viewBox:"0 0 1024 1024"},[a.createVNode("g",{id:"date"},[a.createVNode("path",{fill:"#c4c6cc",d:"M896,128h-96v64h64v112H160V192h64v-64h-96c-17.7,0-32,14.3-32,32v736c0,17.7,14.3,32,32,32h768c17.7,0,32-14.3,32-32V160C928,142.3,913.7,128,896,128z M160,864V368h704v496H160z"},null),a.createVNode("rect",{x:"416",y:"128",fill:"#c4c6cc",width:"192",height:"64"},null),a.createVNode("rect",{x:"288",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("rect",{x:"672",y:"96",fill:"#c4c6cc",width:"64",height:"128"},null),a.createVNode("polygon",{fill:"#c4c6cc",points:"403.7,514.4 557.1,514.4 557.1,515.3 420.1,765.5 483.5,765.5 620.3,504.3 620.3,466.5 403.7,466.5"},null)])])]),a.createVNode("input",{type:"text",class:["bk-date-picker-editor",this.readonly?"readonly":"",this.fontSizeCls,this.behavior==="simplicity"?"only-bottom-border":""],ref:"inputRef",key:this.forceInputRerender,readonly:this.localReadonly,disabled:this.disabled,placeholder:this.placeholder,value:this.displayValue,onFocus:this.handleFocus,onClick:this.handleFocus,onBlur:this.handleBlur,onKeydown:this.handleKeydown,onChange:this.handleInputChange},null),this.clearable&&this.showClose?a.createVNode(Zt,{onClick:this.handleClear,class:"clear-action"},null):""]),t=this.hasShortcuts?{shortcuts:()=>{var o,c;return((c=(o=this.$slots).shortcuts)==null?void 0:c.call(o))||null}}:{};return a.withDirectives(a.createVNode("div",{class:["bk-date-picker",this.type==="datetimerange"?"long":"",this.longWidthCls]},[a.createVNode("div",{ref:"triggerRef",class:"bk-date-picker-rel",onMouseenter:this.handleInputMouseenter,onMouseleave:this.handleInputMouseleave},[(s=(i=(n=this.$slots).trigger)==null?void 0:i.call(n))!=null?s:e]),a.createVNode(a.Teleport,{to:"body",disabled:!this.appendToBody},{default:()=>[a.createVNode(a.Transition,{name:"bk-fade-down-transition"},{default:()=>[a.withDirectives(a.createVNode(cu,{class:[this.appendToBody?"bk-date-picker-transfer":""],ref:"pickerDropdownRef",triggerRef:this.triggerRef,placement:this.placement,extPopoverCls:this.extPopoverCls,appendToBody:this.appendToBody,onClick:this.handleTransferClick},{default:()=>{var o,c,d,u,f,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(d=(c=(o=this.$slots).header)==null?void 0:c.call(o))!=null?d:null]):null,this.panel==="RangeTimePickerPanel"?a.createVNode(Z9,{ref:"pickerPanelRef",clearable:this.clearable,shortcuts:this.shortcuts,multiple:this.multiple,shortcutClose:this.shortcutClose,value:this.internalValue,startDate:this.startDate,disabledDate:this.disabledDate,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,disabledHours:this.ownPickerProps.disabledHours,disabledMinutes:this.ownPickerProps.disabledMinutes,disabledSeconds:this.ownPickerProps.disabledSeconds},t):a.createVNode(G9,{ref:"pickerPanelRef",clearable:this.clearable,confirm:this.isConfirm,shortcuts:this.shortcuts,multiple:this.multiple,shortcutClose:this.shortcutClose,value:this.internalValue,startDate:this.startDate,disabledDate:this.disabledDate,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,disabledHours:this.ownPickerProps.disabledHours,disabledMinutes:this.ownPickerProps.disabledMinutes,disabledSeconds:this.ownPickerProps.disabledSeconds},t),this.hasFooter?a.createVNode("div",{class:["bk-date-picker-footer-wrapper",this.footerSlotCls]},[(m=(f=(u=this.$slots).footer)==null?void 0:f.call(u))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}});const Y9=Ge(OC);var Yn=(e=>(e.OBJECT_ARRAY="objectArray",e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e))(Yn||{});const PC={title:g.arrayOf(g.string).def([]),extCls:g.string.def(""),searchPlaceholder:g.string.def(""),settingKey:g.string.def("id"),displayKey:g.string.def("value"),sortKey:g.string.def("value"),showOverflowTips:g.bool.def(!1),searchable:g.bool.def(!1),sortable:g.bool.def(!1),sourceList:g.arrayOf(g.any).def([]),targetList:g.arrayOf(g.any).def([]),emptyContent:g.arrayOf(g.string).def([])};function EC(e,t,n){const i=a.ref([]),s=a.ref([]),o=(c=!1)=>{c&&(i.value=[],s.value=[]),e.value.forEach(d=>{const u=d[n.value];t.value.includes(u)?s.value.push(d):i.value.push(d)})};return o(),a.watch(()=>[e,t,n],()=>{o(!0)},{deep:!0}),{selectList:i,selectedList:s}}function VC(e,t){const n=a.ref(""),i=a.computed(()=>e.value.filter(s=>{const o=s[t.value];return o instanceof Object?!1:o.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:i}}var JC=a.defineComponent({name:"Transfer",props:PC,emits:["change","update:targetList"],setup(e,{emit:t}){const n=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(I=>I.toString().includes("[object Object]"))?Yn.OBJECT_ARRAY:Yn.BASE_ARRAY:Yn.NOT_ARRAY),i=a.computed(()=>n.value===Yn.BASE_ARRAY?"value":e.settingKey),s=a.computed(()=>n.value===Yn.BASE_ARRAY?"value":e.displayKey),o=a.computed(()=>e.sortKey||s.value),c=a.computed(()=>{switch(n.value){case Yn.BASE_ARRAY:return[...new Set(e.sourceList)].map(C=>({value:C}));case Yn.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:d}=a.toRefs(e),{selectList:u,selectedList:f}=EC(c,d,i),{selectSearchQuery:m,selectListSearch:p}=VC(u,s),y=a.computed(()=>[...p.value].sort((C,I)=>{const M=C[o.value],S=I[o.value];return M>S?1:-1})),b=a.computed(()=>[...f.value].sort((C,I)=>{const M=C[o.value],S=I[o.value];return M>S?1:-1}));a.watch(()=>[u,f],()=>{N()},{deep:!0});const v=(C,I)=>{const M=i.value;return C.some(S=>S[M]===I[M])&&I.disabled},k=()=>{u.value=[...c.value.filter(C=>v(u.value,C))],f.value=[...c.value.filter(C=>!v(u.value,C))],N()},T=()=>{u.value=[...c.value.filter(C=>!v(f.value,C))],f.value=[...c.value.filter(C=>v(f.value,C))],N()},L=(C,I)=>{if(C.disabled)return;const M=C[i.value],S=I?u:f,z=I?f:u,j=S.value.findIndex(O=>O[i.value]===M);z.value.push(...S.value.splice(j,1)),N()},N=()=>{const C=u.value.map(M=>M[i.value]),I=f.value.map(M=>M[i.value]);t("update:targetList",I),t("change",n.value===Yn.BASE_ARRAY?C:u.value.map(M=>a.toRaw(M)),n.value===Yn.BASE_ARRAY?I:f.value.map(M=>a.toRaw(M)),I)};return{selectSearchQuery:m,selectListSearch:p,selectedList:f,selectListSort:y,selectedListSort:b,settingCode:i,displayCode:s,allToRight:k,allToLeft:T,handleItemClick:L}},render(){const e=this.sortable?this.selectListSort:this.selectListSearch,t=this.sortable?this.selectedListSort:this.selectedList,n=c=>{var p,y;const d=c==="left-header",u=d?`${(p=this.title[0])!=null?p:"\u6E90\u5217\u8868"}`:`${(y=this.title[1])!=null?y:"\u76EE\u6807\u5217\u8868"}`,f=d?!e.length:!t.length,m=()=>{f||(d?this.allToRight():this.allToLeft())};return this.$slots[c]?a.createVNode("div",{class:"slot-header"},[this.$slots[c]()]):a.createVNode("div",{class:"header"},[`${u}\uFF08${d?e.length:t.length}\uFF09`,a.createVNode("span",{class:{disabled:f},onClick:()=>m()},[d?"\u9009\u62E9\u5168\u90E8":"\u6E05\u7A7A"])])},i=c=>{var f;const d=c==="left-empty-content",u=(f=d?this.emptyContent[0]:this.emptyContent[1])!=null?f:d?"\u65E0\u6570\u636E":"\u672A\u9009\u62E9\u4EFB\u4F55\u9879";return this.$slots[c]?a.createVNode("div",null,[this.$slots[c]()]):a.createVNode("div",{class:"empty"},[u])},s=(c,d=!0)=>a.createVNode("div",{class:["item-content",{"is-disabled":c.disabled}]},[a.createVNode("span",{class:"content-text",title:c[this.displayCode]},[c[this.displayCode]]),a.createVNode("span",{class:"icon-wrapper"},[d?a.createVNode(qo,{class:"bk-icon icon-move"},null):a.createVNode(Hn,{class:"bk-icon icon-delete"},null)])]),o=c=>{const d=c==="left",u=d?e:t,f=d?"source-option":"target-option",m=d?"left-empty-content":"right-empty-content";return u.length?a.createVNode("ul",{class:["content",this.searchable&&d?"is-search":""]},[u.map(p=>{var y,b,v;return a.createVNode("li",{key:p[this.settingCode],class:[this.$slots[f]?"custom-item":""],onClick:()=>this.handleItemClick(p,d)},[(v=(b=(y=this.$slots)[f])==null?void 0:b.call(y,p))!=null?v:s(p,d)])})]):i(m)};return a.createVNode("div",{class:["bk-transfer",this.extCls]},[a.createVNode("div",{class:"source-list"},[n("left-header"),this.searchable&&a.createVNode(ia,{modelValue:this.selectSearchQuery,"onUpdate:modelValue":c=>this.selectSearchQuery=c,class:"transfer-search-input",clearable:!0,placeholder:this.searchPlaceholder||"\u641C\u7D22"},{prefix:()=>a.createVNode(Wa,{class:"icon-search"},null)}),o("left")]),a.createVNode(hc,{class:"transfer"},null),a.createVNode("div",{class:"target-list"},[n("right-header"),o("right")])])}});const U9=Ge(JC);var di=(e=>(e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_EXPAND="nodeExpand",e.NODE_CHECKED="nodeChecked",e.NODE_DRAG_START="nodeDragStart",e.NODE_DRAG_OVER="nodeDragOver",e.NODE_DRAG_LEAVE="nodeDragLeave",e.NODE_DROP="nodeDrop",e))(di||{});const Qi=(...e)=>!0,RC={nodeClick:Qi,nodeCollapse:Qi,nodeExpand:Qi,nodeChecked:Qi,nodeDragStart:Qi,nodeDragOver:Qi,nodeDragLeave:Qi,nodeDrop:Qi};var fe=(e=>(e.DEPTH="__depth",e.INDEX="__index",e.UUID="__uuid",e.PARENT_ID="__parent_id",e.HAS_CHILD="__has_child",e.PATH="__path",e.IS_ROOT="__is_root",e.ORDER="__order",e.IS_OPEN="__is_open",e.IS_CHECKED="__is_checked",e.IS_SELECTED="__is_selected",e.IS_ASYNC_INIT="__is_async_init",e.IS_MATCH="__is_match",e.IS_NULL="__IS_NULL",e.IS_CACHED="__is_cached",e.IS_ASYNC="__is_async",e.IS_LOADING="__is_loading",e.TREE_NODE_ATTR="__attr__",e))(fe||{});const _i={__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 $9=(e=>(e.CLICK="click",e.SELECTED="selected",e.EXPAND="expand",e.COLLAPSE="collapse",e))($9||{});const QC={data:g.arrayOf(g.any).def([]),label:g.oneOfType([g.func.def(void 0),g.string.def("label")]),nodeKey:g.string.def(void 0),children:g.string.def("children"),indent:g.number.def(18),lineHeight:g.number.def(32),levelLine:g.oneOfType([g.bool.def(!1),g.func.def(void 0),g.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:g.bool.def(!1),prefixIcon:g.oneOfType([g.func.def(()=>{}),g.bool.def(!1)]).def(!0),async:g.shape({callback:g.func.def(void 0),cache:g.bool.def(!0),deepAutoOpen:Pe("columnType",{}).def("once")}),offsetLeft:g.number.def(5),search:g.oneOfType([g.shape({value:g.oneOfType([g.number,g.string,g.bool]).def(""),match:g.oneOfType([Pe("TreeSearchMatchType",{}).def("fuzzy"),g.func]),resultType:Pe("treeSearchResultType",{}).def("tree"),openResultNode:g.bool}),g.string,g.number,g.bool]).def(void 0),emptyText:g.string.def("\u6CA1\u6709\u6570\u636E"),draggable:g.bool.def(!1),disableDrag:g.func.def(null),disableDrop:g.func.def(null),dragSort:g.bool.def(!1),selectable:g.oneOfType([g.bool,g.func]).def(!0),disabledFolderSelectable:g.bool.def(!1),showCheckbox:g.bool.def(!1),showNodeTypeIcon:g.bool.def(!0),selected:g.oneOfType([g.string,null,g.number,g.object]).def(null),autoCheckChildren:g.bool.def(!0),autoOpenParentNode:g.bool.def(!0),expandAll:g.bool.def(!1),nodeContentAction:g.oneOfType([g.arrayOf(Pe("nodeContentActionType",{}).def($9.CLICK)),g.func.def(()=>["selected"])]).def(["selected","expand","click"])};var _C=(e,{slots:t})=>({renderEmpty:n=>a.createVNode($s,{scene:"part",type:n},{default:()=>{var i,s;return[(s=(i=t.default)==null?void 0:i.call(t))!=null?s:e.emptyText]}})}),Nl=(e,t)=>{const n=P=>e.schema.get(P),i=(P,G)=>{var B;return(B=n(P[fe.UUID]))==null?void 0:B[G]},s=(P,G,B)=>{e.schema.set(P[fe.UUID],Se(Z({},n(P[fe.UUID])),{[G]:B}))},o=P=>i(P,fe.PATH),c=P=>i(P,fe.UUID),d=P=>i(P,fe.IS_ROOT),u=P=>i(P,fe.IS_OPEN),f=P=>i(P,fe.HAS_CHILD),m=P=>i(P,fe.IS_MATCH),p=P=>i(P,fe.IS_CHECKED),y=P=>i(P,fe.PARENT_ID),b=P=>i({[fe.UUID]:P},fe.PARENT_ID),v=P=>i(P,fe.IS_LOADING),k=(P,G)=>{s(P,fe.IS_LOADING,G)},T=P=>e.schema.delete(P),L=P=>n(y(P)),N=P=>{var G;return typeof P=="object"?u(P):typeof P=="string"?(G=n(P))==null?void 0:G[fe.IS_OPEN]:!1},C=P=>N(i(P,fe.PARENT_ID)),I=P=>d(P)||C(P),M=P=>P.split("-").reduce((B,ie)=>{const le=Number(ie);return Array.isArray(B)?B[le]:B[t.children][le]},t.data),S=P=>{const G=e.schema;return Array.prototype.filter.call(Array.from(G.keys()),B=>G.get(B)[fe.PARENT_ID]===P[fe.UUID])},z=P=>M(o({[fe.UUID]:P})),j=P=>d({[fe.UUID]:P})?{[t.children]:t.data}:z(b(P)),O=P=>({[_i[fe.IS_LOADING]]:i(P,fe.IS_LOADING),[_i[fe.HAS_CHILD]]:f(P),[_i[fe.IS_MATCH]]:m(P),[_i[fe.IS_CHECKED]]:p(P),[_i[fe.IS_OPEN]]:u(P),[_i[fe.IS_ROOT]]:d(P),fullPath:i(P,fe.PATH),uuid:c(P),parentId:i(P,fe.PARENT_ID)});return{getSchemaVal:n,getNodeAttr:i,getNodeId:c,getNodeParentId:y,getNodeParentIdById:b,getParentNodeData:j,getParentNode:L,setNodeAttr:s,getNodePath:o,isRootNode:d,isNodeOpened:u,hasChildNode:f,isItemOpen:N,isNodeChecked:p,isNodeMatched:m,isNodeLoading:v,checkNodeIsOpen:I,getSourceNodeByPath:M,getSourceNodeByUID:z,deleteNodeSchema:T,resolveScopedSlotParam:O,setTreeNodeLoading:k,extendNodeAttr:P=>Se(Z({},P),{[fe.TREE_NODE_ATTR]:O(P)}),getChildNodes:S}};const K9="1px dashed #c3cdd7",X9=(e,t,n=null,i=null,s=null,o=[])=>{const c=e[t];return typeof c=="boolean"?c?i:s:q9(n,e,t,o)},q9=(e,t,n,i=[])=>{const s=t[n];if(typeof s=="string")return typeof e=="object"&&e!==null?(Object.prototype.hasOwnProperty.call(e,s)||console.error(`cannot find node label with key ${s}`),e[s]):s;if(typeof s=="function"){const o=s.apply(globalThis,[e,...i]);if(typeof o=="string")return o;console.error("props label with function return value is not string, please check and return string");return}},e3=(e,t)=>q9(e,t,"label"),pu=(e,t)=>e.get(t)||{},WC=(e,t,n)=>{var i;return(i=pu(e,t))==null?void 0:i[n]},HC=(e,t)=>({"--level-line":X9(t,"levelLine",e,K9,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),BC=(e,t,n={})=>{const{schema:i}=n,s=WC(i,e[fe.UUID],fe.DEPTH);return Z({"--depth":s},typeof t.levelLine=="function"?{"--level-line":X9(t,"levelLine",e,K9,null,["node"])}:{})},FC=(e,t,n)=>{const{__is_root:i,__is_open:s}=pu(t,e[fe.UUID])||{};return{"is-root":i,"bk-tree-node":!0,"is-open":s,"is-virtual-render":n.virtualRender,"level-line":n.levelLine}},GC=(e,t)=>{const{__is_checked:n,__is_selected:i}=pu(t,e[fe.UUID])||{};return{"is-checked":n,"is-selected":i,"node-folder":e.is_folder,"node-leaf":e.is_leaf,[je("node-row")]:!0}},ZC=(e,t,n,i,s)=>{YC(e,t,n,{[i]:s})},YC=(e,t,n,i)=>{const o=e.split("-").reduce((c,d)=>{const u=Number(d);return Array.isArray(c)?c[u]:c[n][u]},t);Object.assign(o,i||{})},Zr=e=>e==null?{__IS_NULL:!0}:typeof e=="string"||typeof e=="number"||typeof e=="symbol"?{[fe.UUID]:e}:(Object.prototype.hasOwnProperty.call(e,fe.UUID)||console.error("setNodeAction Error: node id cannot found"),e);var t3=(e,t)=>{const{setNodeAttr:n,getNodePath:i,getNodeAttr:s,resolveScopedSlotParam:o,setTreeNodeLoading:c}=Nl(t,e),d=(m,p)=>{if(typeof m=="object"&&m!==null){n(p,fe.IS_OPEN,!0);const y=Array.isArray(m)?m:[m];return ZC(i(p),e.data,e.children,e.children,y),Promise.resolve(m)}return Promise.resolve(m)},u=m=>{const{callback:p=null,cache:y=!0}=e.async||{};if(typeof p=="function"&&s(m,fe.IS_ASYNC)){if(n(m,fe.IS_ASYNC_INIT,!0),!s(m,fe.IS_CACHED)){n(m,fe.IS_CACHED,y);const b=o(m),v=p(m,k=>d(k,m),b);if(typeof v=="object"&&v!==null)return c(m,!0),v instanceof Promise?Promise.resolve(v.then(k=>d(k,m)).catch(k=>console.error("load remote data error:",k)).finally(()=>{c(m,!1),n(m,fe.IS_CACHED,!0)})):(d(v,m),c(m,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},f=()=>{const m=t.data.filter(p=>s(p,fe.IS_ASYNC)&&p[_i[fe.IS_OPEN]]&&!s(p,fe.IS_ASYNC_INIT));m.length&&Promise.all(m.map(p=>u(p))).then(()=>{f()}).catch(p=>{console.warn(p)})};return{asyncNodeClick:u,deepAutoOpen:f}},UC=(e,t,n,i,s,o)=>{let c=e.selected;const{setNodeAttr:d,getNodePath:u,getSchemaVal:f,getNodeAttr:m,getNodeId:p,getChildNodes:y,isRootNode:b,hasChildNode:v,isItemOpen:k,isNodeOpened:T,isNodeLoading:L,isNodeChecked:N,getParentNode:C,resolveScopedSlotParam:I,extendNodeAttr:M}=Nl(n,e),{registerNextLoop:S}=o,{asyncNodeClick:z,deepAutoOpen:j}=t3(e,n),O=Q=>k(Q)?a.createVNode(rc,{class:[je("tree-icon"),je("node-prefix")]},null):a.createVNode(sc,{class:[je("tree-icon"),je("node-prefix")]},null),W=Q=>{if(typeof Q=="string")return Q;if(typeof Q=="object"&&Q!==null){if(Q.__v_isVNode)return Q;const{node:ae,className:D,text:_,style:R}=Q;return a.h(ae,{class:D,style:R},_)}return null},P=Q=>{var ae,D,_;return((_=(D=(ae=t.slots).nodeLoading)==null?void 0:D.call(ae,M(Q)))!=null?_:L(Q))?a.createVNode(jr,null,null):""},G=Q=>{if(t.slots.nodeAction)return t.slots.nodeAction(M(Q));let ae=null;return L(Q)?P(Q):typeof e.prefixIcon=="function"&&(ae=e.prefixIcon(M(Q),"node_action"),ae!=="default")?W(ae):(ae==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon)&&(v(Q)||Q.async||!e.autoCheckChildren)?k(Q)?a.createVNode(_s,{class:je("node-prefix")},null):a.createVNode(Zs,{class:je("node-prefix")},null):null},B=Q=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(M(Q));let ae=null;return typeof e.prefixIcon=="function"&&(ae=e.prefixIcon(M(Q),"node_type"),ae!=="default")?W(ae):ae==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?b(Q)||v(Q)?O(Q):a.createVNode(fc,{class:[je("tree-icon"),je("node-prefix")]},null):null},ie=(Q,ae)=>{const D=C(Q);D&&(d(D,fe.IS_CHECKED,ae),b(D)||ie(D,ae))},le=(Q,ae,D)=>{y(Q).forEach(_=>{d({[fe.UUID]:_},ae,D),le({[fe.UUID]:_},ae,D)})},ve=(Q,ae)=>{d(Q,fe.IS_CHECKED,!!ae),le(Q,fe.IS_CHECKED,!!ae),ie(Q,ae),t.emit(di.NODE_CHECKED,s.value.filter(D=>N(D)).map(D=>D[fe.UUID]))},Ie=Q=>N(Q)&&!s.value.filter(ae=>{var D;return(D=u(ae))==null?void 0:D.startsWith(u(Q))}).every(ae=>N(ae)),ge=Q=>N(Q)||s.value.filter(ae=>{var D;return(D=u(ae))==null?void 0:D.startsWith(u(Q))}).some(ae=>N(ae)),he=Q=>e.showCheckbox?a.createVNode(ji,{size:"small",modelValue:ge(Q),indeterminate:Ie(Q),onChange:ae=>ve(Q,ae)},null):null,K=(Q,ae=null,D=null,_=!0)=>{const R=ae===null?!k(Q):!!ae;if(R||le(Q,fe.IS_OPEN,R),d(Q,fe.IS_OPEN,R),_){const de=k(Q)?di.NODE_EXPAND:di.NODE_COLLAPSE;t.emit(de,Q,I(Q),f(Q[fe.UUID]),D)}},$=(Q,ae,D)=>{if(Array.isArray(Q)){Q.forEach(_=>d(Zr(_),ae,D));return}d(Zr(Q),ae,D)},V=(Q,ae=!0,D=!1)=>{const _=Zr(Q);if(!_[fe.IS_NULL])if(D)if(ae){if($(_,fe.IS_OPEN,!0),!b(_)){const R=m(_,fe.PARENT_ID);V(R,!0,!0)}}else K(_,!1,null,!1);else $(_,fe.IS_OPEN,ae)},J=(Q,ae)=>{if(T(Q)){K(Q,!1,ae);return}z(Q).finally(()=>{m(Q,fe.IS_LOADING)?S("setNodeOpenedAfterLoading",{type:"once",fn:()=>K(Q,!0,ae)}):K(Q,!0,ae)})},re=(Q,ae)=>{Q.stopImmediatePropagation(),Q.stopPropagation(),Q.preventDefault(),J(ae,Q)},U=(Q,ae=!0,D=!0)=>{const _=Array.isArray(Q)?Q:[Q];if(!_.length)return;const R=Zr(_[0]);if(!R[fe.IS_NULL]){if(!e.selectable||typeof e.selectable=="function"&&!e.selectable(Q)||e.disabledFolderSelectable&&(Q==null?void 0:Q.is_folder)===!0){console.warn("props.selectable is false or undefined, please set selectable with true");return}c!=null&&d({[fe.UUID]:c},fe.IS_SELECTED,!ae),e.selected&&e.selected!==c&&d({[fe.UUID]:e.selected},fe.IS_SELECTED,!ae),d(R,fe.IS_SELECTED,ae),c=p(R),D&&_.length===1&&V(R,!0,!0),m(R,fe.IS_ASYNC)&&z(R).then(()=>{a.nextTick(()=>{_.shift(),U(_,ae,D)})})}},q=Q=>typeof e.nodeContentAction=="function"?Reflect.apply(e.nodeContentAction,globalThis,[{node:Q}]):typeof e.nodeContentAction=="string"?[e.nodeContentAction]:Array.isArray(e.nodeContentAction)?e.nodeContentAction:["selected","expand","click"],ce=(Q,ae)=>{const D=q(Q);if(D.includes("selected")&&U(Q,!0,!1),D.includes("expand")&&(T(Q)||J(Q,ae)),D.includes("collapse")&&T(Q)&&J(Q,ae),D.includes("click")){const _=di.NODE_CLICK;t.emit(_,Q,I(Q),f(Q[fe.UUID]),ae)}},we=(Q,ae)=>{if(b(ae))return!1;const D=u(ae),_=`${D}`.split("-").slice(0,Q+1);if(_.join("-")===D)return!0;const de=_.pop(),ue=parseInt(de,10);_.push(`${ue+1}`);const me=_.join("-");return s.value.some(te=>te[fe.PATH]===me)},X=Q=>{if(!e.levelLine)return null;const ae=_=>({"--depth":_}),D=m(Q,fe.DEPTH)+1;return new Array(D).fill("").map((_,R)=>R).filter(_=>we(_,Q)).filter(_=>_>0).map(_=>a.createVNode("span",{class:"node-virtual-line",style:ae(D-_)},null))};return{renderTreeNode:Q=>{var ae,D,_,R,de;return a.createVNode("div",{"data-tree-node":p(Q),key:p(Q),class:GC(Q,n.schema)},[a.createVNode("div",{class:FC(Q,n.schema,e),style:BC(Q,e,n),onClick:ue=>ce(Q,ue)},[a.createVNode("div",{class:[je("node-action")],onClick:ue=>re(ue,Q)},[G(Q)]),a.createVNode("div",{class:je("node-content")},[[he(Q),B(Q)],a.createVNode("span",{class:je("node-text")},[(_=(D=(ae=t.slots).node)==null?void 0:D.call(ae,M(Q)))!=null?_:[e3(Q,e)]]),(de=(R=t.slots).nodeAppend)==null?void 0:de.call(R,M(Q))]),X(Q)])])},handleTreeNodeClick:J,deepAutoOpen:j,asyncNodeClick:z,setNodeAction:$,setNodeOpened:K,setSelect:U,setOpen:V}},$C=(e,t,n,i)=>{const{getSourceNodeByUID:s,getNodeParentIdById:o,getParentNodeData:c,getNodeAttr:d,getNodePath:u,isRootNode:f}=Nl(i,e),m=a.computed(()=>typeof e.disableDrag=="function"),p=a.computed(()=>typeof e.disableDrop=="function"),y=z=>z.target.closest("[data-tree-node]"),b=z=>{var O;const j=(O=z==null?void 0:z.dataset)==null?void 0:O.treeNode;return s(j)},v=z=>{y(z).removeEventListener("mouseup",v)},k=z=>{const j=y(z),O=b(j);if(O.draggable===!1||m.value&&e.disableDrag(O)){j.classList.add("bk-tree-drag-disabled");return}j.setAttribute("draggable","true"),j.addEventListener("mouseup",v)},T=z=>{z.preventDefault();const j=y(z),O=b(j);if(t.emit(di.NODE_DRAG_OVER,z,j,O),p.value&&(e==null?void 0:e.disableDrop(O))){z.dataTransfer.effectAllowed="move",z.dataTransfer.dropEffect="none",j.classList.add("bk-tree-drop-disabled");return}j.classList.add("bk-tree-drop-active");const W=z.dataTransfer.getData("node-id"),P=j.getAttribute("data-tree-node"),G=C(W,P)?"move":"none";z.dataTransfer.effectAllowed=G,z.dataTransfer.dropEffect=G},L=z=>{z.dataTransfer.effectAllowed="move",z.dataTransfer.dropEffect="move";const j=y(z);z.dataTransfer.setData("text/plain",""),z.dataTransfer.setData("node-id",j.getAttribute("data-tree-node")),t.emit(di.NODE_DRAG_START,z,j)},N=z=>{z.preventDefault(),z.stopPropagation();const j=y(z);j.classList.remove("bk-tree-drop-active","bk-tree-drop-disabled");const O=b(j);if(p.value&&e.disableDrop(O))return;const W=z.dataTransfer.getData("node-id"),P=j.getAttribute("data-tree-node");Reflect.apply(e.dragSort?I:M,globalThis,[W,P]),t.emit(di.NODE_DROP,z,j,O)},C=(z,j)=>{const O=u({[fe.UUID]:z}),W=u({[fe.UUID]:j}),P=o(z),G=o(j);return P===G?!0:O.indexOf(W)===-1&&W.indexOf(O)===-1},I=(z,j)=>{if(!C(z,j))return;const O=JSON.parse(JSON.stringify(s(z))),W=JSON.parse(JSON.stringify(s(j))),P=c(z),G=c(j),B=d({[fe.UUID]:z},fe.INDEX),ie=d({[fe.UUID]:j},fe.INDEX);P==null||P[e.children].splice(B,1,W),G==null||G[e.children].splice(ie,1,O)},M=(z,j)=>{const O=s(z),W=s(j);let P=null;if(f({[fe.UUID]:z}))P=e.data;else{const G=o(z);if(G!=null){P=s(G);const B=d({[fe.UUID]:z},fe.INDEX);P==null||P[e.children].splice(B,1)}}W[e.children]||(W[e.children]=[]),W[e.children].unshift(O)},S=z=>{z.preventDefault();const j=y(z);j.classList.remove("bk-tree-drop-active","bk-tree-drop-disabled"),t.emit(di.NODE_DRAG_LEAVE,z,j)};a.onMounted(()=>{if(e.draggable&&n.value){const z=n.value.$el;z.addEventListener("mousedown",k),z.addEventListener("dragstart",L),z.addEventListener("dragover",T),z.addEventListener("dragleave",S),z.addEventListener("drop",N)}}),a.onUnmounted(()=>{if(e.draggable&&n.value){const z=n.value.$el;z.removeEventListener("mousedown",k),z.removeEventListener("dragstart",L),z.removeEventListener("dragover",T),z.removeEventListener("dragleave",S),z.removeEventListener("drop",N)}})},KC=e=>{var y;const t=a.toRef(e,"search"),{openResultNode:n=!1,resultType:i="tree"}=(y=e.search)!=null?y:{},s=b=>["string","number","boolean"].includes(typeof b),o=(b,v)=>b===v,c=(b,v)=>new RegExp(`${b}`,"i").test(`${v}`),d=(b,v)=>Reflect.apply(b,globalThis,v),u=t.value===void 0||t.value===!1,f=(b,v)=>{if(u)return!0;if(s(t.value))return d(c,[t.value,b,v]);const{value:k="",match:T="fuzzy"}=t.value,N=typeof T=="function"?T:T==="fuzzy"?c:o;return`${k}`.length===0?!0:d(N,[k,b,v])},m=a.computed(()=>t.value!==!1&&(s(t.value)?`${t.value}`.length>0:typeof t.value=="object"));return{searchFn:f,refSearch:t,isSearchActive:m,isSearchDisabled:u,openResultNode:n,resultType:i,isTreeUI:i==="tree"}},XC=e=>{var T;const t=(L,N=void 0,C=[])=>{const{data:I,children:M}=L,S=[],z=[];let j=0;const O=new Map;function W(ge,he,K,$){if(ge!=null&&O.has(ge)&&![fe.UUID,fe.PARENT_ID].includes(he)){const V=O.get(ge);Object.prototype.hasOwnProperty.call(V,he)&&typeof $=="function"&&Reflect.apply($,self,[V,he,K])&&(Object.assign(V,{[he]:K}),W(V[fe.PARENT_ID],he,K,$))}}function P(ge){let he=null;return typeof L.nodeKey=="string"&&(he=ge[L.nodeKey]||Li.v4()),he||ge[fe.UUID]||Li.v4()}const G={[fe.IS_OPEN]:()=>!!L.expandAll,[fe.IS_CHECKED]:()=>!1,[fe.IS_MATCH]:()=>!0,[fe.IS_SELECTED]:ge=>L.selected===ge,[fe.IS_CACHED]:()=>!1,[fe.IS_ASYNC]:()=>null,[fe.IS_LOADING]:()=>!1};function B(ge,he,K,$=void 0){let V=$;$===void 0&&typeof G[K]=="function"&&(V=G[K](ge,he));const J=_i[K];if(Object.prototype.hasOwnProperty.call(he,J))return he[J];const re=(C||[]).find(q=>q[fe.UUID]===ge);let U;return re&&(U=re[K]),U==null&&(U=V),U}function ie(ge,he){return L.selectable?B(ge,he,fe.IS_SELECTED,L.selected===ge):!1}function le(ge,he,K){var J;const $=B(ge,he,fe.IS_OPEN),V=O.has(K)?(J=O.get(K))==null?void 0:J[fe.IS_OPEN]:!0;return $&&V}function ve(ge){return!ge[fe.IS_OPEN]}function Ie(ge,he=0,K=null,$=null){const V=ge.length;for(let J=0;J<V;J++){const re=ge[J];if(Array.isArray(re))Ie(re,he,K,$);else if(typeof re=="object"&&re!==null){const U=$!==null?`${$}-${J}`:`${J}`,q=`${P(re)}`,ce=!!(re[M]||[]).length;let we=B(q,re,fe.IS_OPEN);L.autoOpenParentNode?we&&W(K,fe.IS_OPEN,!0,ve):we=le(q,re,K),Object.assign(re,{[fe.UUID]:q});const X=L.showCheckbox&&B(q,re,fe.IS_CHECKED);X&&S.push(q),O.set(q,{[fe.DEPTH]:he,[fe.INDEX]:J,[fe.UUID]:q,[fe.PARENT_ID]:K,[fe.HAS_CHILD]:ce,[fe.PATH]:U,[fe.IS_ROOT]:K===null,[fe.ORDER]:j,[fe.IS_SELECTED]:ie(q,re),[fe.IS_MATCH]:B(q,re,fe.IS_MATCH),[fe.IS_OPEN]:we,[fe.IS_CHECKED]:X,[fe.IS_CACHED]:B(q,re,fe.IS_CACHED),[fe.IS_ASYNC]:B(q,re,fe.IS_ASYNC),[fe.IS_LOADING]:B(q,re,fe.IS_LOADING),[M]:null}),j+=1,z.push(Se(Z({},JSON.parse(JSON.stringify(re,(H,Q)=>H===L.children?null:Q))),{[fe.IS_OPEN]:we,[M]:null})),Object.prototype.hasOwnProperty.call(re,M)&&Ie(re[M]||[],he+1,q,U)}}}return Ie(N||I),L.showCheckbox&&(S==null||S.forEach(ge=>{Array.from(O.values()).filter(he=>{var K;return(K=he[fe.PATH])==null?void 0:K.startsWith(O.get(ge)[fe.PATH])}).forEach(he=>Object.assign(he,{[fe.IS_CHECKED]:!0})),W(ge,fe.IS_CHECKED,!0,()=>!0)})),[z,O]},n=t(e),i=new Map,s=[],o=[],c=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),d=a.computed(()=>Array.from(c.schema.values())),{asyncNodeClick:u,deepAutoOpen:f}=t3(e,c),m=L=>{s.push(L)},p=(L,N,C=!0)=>{C&&i.has(L)&&i.delete(L),i.set(L,N)},y=L=>typeof L=="function"?{type:"loop",fn:L}:typeof L=="object"&&typeof L.type=="string"&&typeof L.fn=="function"?L:(console.error("loop event error",L),null),b=L=>{var C;const N=y(L);return N!==null&&Reflect.apply(N.fn,globalThis,[]),(C=N==null?void 0:N.type)!=null?C:"once"},v=()=>{Array.from(i.keys()).forEach(L=>{const N=i.get(L);if(Array.isArray(N)){const C=[];N.forEach((I,M)=>{b(I)==="once"&&C.unshift(M)}),C.length&&C.forEach(I=>N.splice(I,1)),N.length===0&&i.delete(L)}else b(N)==="once"&&i.delete(L)})};a.watch(()=>[e.data],L=>{var C,I;const N=t(e,L,d.value);c.data=N[0],c.schema=N[1],((C=e.async)==null?void 0:C.callback)&&((I=e.async)==null?void 0:I.deepAutoOpen)==="every"&&f(),v()},{deep:!0}),e.selectable&&a.onMounted(()=>{a.watch(()=>e.selected,L=>{o.length=0,s.forEach(N=>{Reflect.apply(N,globalThis,[L]),o.push(()=>Reflect.apply(N,globalThis,[L]))}),p("afterSelectWatch",o)},{immediate:!0})});const k=L=>{p("afterDataUpdate",L)};return(T=e.async)!=null&&T.callback&&f(),{flatData:c,schemaValues:d,asyncNodeClick:u,deepAutoOpen:f,afterDataUpdate:k,registerNextLoop:p,onSelected:m}},qC=a.defineComponent({name:"Tree",props:QC,emits:RC,setup(e,t){const{flatData:n,schemaValues:i,onSelected:s,registerNextLoop:o}=XC(e),{setNodeAttr:c,checkNodeIsOpen:d,getNodeAttr:u,getNodePath:f,isRootNode:m,isNodeOpened:p,isNodeChecked:y,isNodeMatched:b,hasChildNode:v}=Nl(n,e),{searchFn:k,isSearchActive:T,refSearch:L,openResultNode:N,isTreeUI:C,isSearchDisabled:I}=KC(e);I||a.watch([L],()=>{n.data.forEach(he=>{const K=k(e3(he,e),he);c(he,fe.IS_MATCH,K),N&&W(he,!0,!0)})});const M=he=>{if(T.value){const K=()=>C?i.value.some($=>{var V;return((V=$[fe.PATH])==null?void 0:V.startsWith(f(he)))&&$[fe.IS_MATCH]}):!1;return u(he,fe.IS_MATCH)||K()}return!0},S=a.computed(()=>n.data.filter(he=>d(he)&&M(he))),{renderTreeNode:z,handleTreeNodeClick:j,setNodeOpened:O,setOpen:W,setNodeAction:P,setSelect:G,asyncNodeClick:B}=UC(e,t,n,S,i,{registerNextLoop:o}),ie=(he,K=!0)=>{P(Zr(he),fe.IS_CHECKED,K)};s(he=>{G(he,!0,e.autoOpenParentNode)});const le=()=>n;t.expose({handleTreeNodeClick:j,isNodeChecked:y,isRootNode:m,isNodeOpened:p,isNodeMatched:b,hasChildNode:v,setOpen:W,setChecked:ie,setNodeAction:P,setNodeOpened:O,setSelect:G,asyncNodeClick:B,getData:le});const ve=a.ref(),{renderEmpty:Ie}=_C(e,t);$C(e,t,ve,n);const ge=he=>{if(he.length)return he.map(z);const K=T.value?"search-empty":"empty";return Ie(K)};return()=>a.createVNode(Wr,{class:je("tree"),style:HC(null,e),list:S.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:je("container"),throttleDelay:0,ref:ve},{default:he=>ge(he.data||[])})}});const n3=Ge(qC),i3=e=>e.__v_isVNode;var e8=a.defineComponent({name:"ComposeFormItem",props:{headBackgroundColor:{type:String,default:"#FAFBFD"},tailBackgroundColor:String},render(){if(!this.$slots.default)return null;const e=this.$slots.default();if(e.length>1){const t=e.length;let n=0,i=null;for(;n<t;){if(i3(e[n])){i=e[n];break}n=n+1}let s=t-1,o=null;for(;s>=0&&s>n;){if(i3(e[s])){o=e[s];break}s=s-1}if(i&&o){i.props||(i.props={});let c="bk-compose-form-item-head";i.props.class&&(c+=` ${i.props.class}`),this.headBackgroundColor&&(i.props.style=Object.assign(i.props.style||{},{"background-color":this.headBackgroundColor})),i.props.class=c,o.props||(o.props={});let d="bk-compose-form-item-tail";o.props.class&&(d+=` ${o.props.class}`),this.tailBackgroundColor&&(o.props.style=Object.assign(o.props.style||{},{"background-color":this.tailBackgroundColor})),o.props.class=d}}return a.h("div",{class:"bk-compose-form-item"},e)}});const t8={formType:g.oneOf(["default","vertical"]).def("default"),labelWidth:g.oneOfType([Number,String]),labelPosition:g.oneOf(["left","center","right"]),model:g.object,rules:g.object};var n8=a.defineComponent({name:"Form",props:t8,emits:["submit"],setup(e,t){let n=[];const i=u=>{n.push(u)},s=u=>{n=n.reduce((f,m)=>(m!==u&&f.push(m),f),[])};return a.provide(i0,{props:e,register:i,unregister:s}),{handleSubmit:u=>{u.preventDefault(),t.emit("submit")},validate:u=>{let f={};return u?f=(typeof u=="string"?[u]:u).reduce((p,y)=>Se(Z({},p),{[y]:!0}),{}):f=n.reduce((m,p)=>p.property?Se(Z({},m),{[p.property]:!0}):m,{}),Promise.all(n.reduce((m,p)=>(f[p.property]&&m.push(p.validate()),m),[])).then(()=>Promise.resolve(e.model))},clearValidate:u=>{let f={};u?f=(typeof u=="string"?[u]:u).reduce((p,y)=>Se(Z({},p),{[y]:!0}),{}):f=n.reduce((m,p)=>Se(Z({},m),{[p.property]:!0}),{}),n.forEach(m=>f[m.property]&&m.clearValidate())}}},render(){var t,n;const e=ze({"bk-form":!0,[`bk-form--${this.formType}`]:!0});return a.createVNode("form",{class:e,onSubmit:this.handleSubmit},[(n=(t=this.$slots).default)==null?void 0:n.call(t)])}});const bu=e=>typeof e.message=="function"?e.message():e.message;var On={required:e=>typeof e=="number"||typeof e=="boolean"||Pa.isDate(e)?!0:!Pa.isEmpty(e),min:(e,t)=>e>=t,max:(e,t)=>t>=e,email:e=>/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(e),maxlength:(e,t)=>e.length<=t,pattern:(e,t)=>t.test(e)};const i8={label:g.string,labelWidth:g.oneOfType([Number,String]).def(150),labelPosition:g.oneOf(["left","center","right"]),property:g.string.def(""),required:g.bool.def(!1),email:g.bool.def(!1),max:g.number,min:g.number,maxlength:g.number,rules:g.array,autoCheck:g.bool.def(!1),description:g.string,errorDisplayType:g.oneOf(["tooltips","normal"]).def("normal")},a8=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r8=e=>{const t=[],n=e.label||"";return e.required&&t.push({required:!0,validator:On.required,message:`${n}\u4E0D\u80FD\u4E3A\u7A7A`,trigger:"change"}),e.email&&t.push({email:!0,validator:On.email,message:`${n}\u683C\u5F0F\u4E0D\u6B63\u786E`,trigger:"change"}),Number(e.max)>-1&&t.push({validator:i=>On.max(i,e.max),message:`${n}\u6700\u5927\u503C ${e.max}`,trigger:"change"}),Number(e.min)>-1&&t.push({validator:i=>On.min(i,e.min),message:`${n}\u6700\u5C0F\u503C ${e.min}`,trigger:"change"}),Number(e.maxlength)>-1&&t.push({validator:i=>On.maxlength(i,e.maxlength),message:`${n}\u6700\u5927\u957F\u5EA6 ${e.maxlength}`,trigger:"change"}),t},s8=(e,t)=>{let n=!1,i=!1;const s=e.reduce((c,d)=>{let u;if(d.required)u=ot.exports.isFunction(d.validator)?d.validator:On.required,n=!0;else if(d.email)u=ot.exports.isFunction(d.validator)?d.validator:On.email,i=!0;else if(Number(d.max)>-1)u=f=>On.max(f,d.max);else if(Number(d.min)>-1)u=f=>On.min(f,d.max);else if(Number(d.maxlength)>-1)u=f=>On.min(f,d.max);else if(Object.prototype.toString.call(d.pattern)==="[object RegExp]")u=f=>On.pattern(f,d.pattern);else if(ot.exports.isFunction(d.validator))u=d.validator;else return c;return c.push({validator:u,message:d.message||"\u9A8C\u8BC1\u9519\u8BEF",trigger:d.trigger||"blur"}),c},[]);return[...t.reduce((c,d)=>(d.required&&n||d.email&&i||c.push(d),c),[]),...s]},l8=(e,t)=>t.reduce((n,i)=>!i.trigger||!e?(n.push(i),n):((Array.isArray(i.trigger)?i.trigger:[i.trigger]).includes(e)&&n.push(i),n),[]),a3=e=>e!==void 0;var o8=a.defineComponent({name:"FormItem",directives:{bkTooltips:tl},props:i8,setup(e,t){const n=y2(),i=Boolean(n),s=xn(),o=Boolean(s),c=a.getCurrentInstance(),d=a.reactive({isError:!1,errorMessage:""}),u=a.computed(()=>i?n.props.formType==="vertical":!1),f=a.computed(()=>!!(e.label||t.slots.label)),m=a.computed(()=>{const v={width:"",paddingRight:"",textAlign:""},k=e.labelPosition||i&&n.props.labelPosition;if(k&&(v["text-align"]=k),n.props.formType==="vertical"||!e.label&&o)return v;const T=a3(e.labelWidth)?e.labelWidth:i&&n.props.labelWidth;return a3(T)&&(v.width=`${T}px`,v.paddingRight=T?"":"0px"),v}),p=a.computed(()=>({["margin-left"]:m.value.width})),y=v=>{if(!e.property||i&&!n.props.model)return Promise.resolve(!0);let k=[];i&&n.props.rules&&a8(n.props.rules,e.property)&&(k=n.props.rules[e.property]),e.rules&&(k=e.rules),k=l8(v,s8(k,r8(e))),k.length>0&&(d.isError=!1,d.errorMessage="");const T=ot.exports.get(n.props.model,e.property),L=(()=>{let N=-1;return()=>{if(N=N+1,N>=k.length)return Promise.resolve(!0);const C=k[N];return Promise.resolve().then(()=>{const I=C.validator(T);return typeof I!="boolean"&&typeof I.then=="function"?I.then(M=>{if(M===!1)return Promise.reject(bu(C))}).then(()=>L(),()=>(d.isError=!0,d.errorMessage=bu(C),Promise.reject(d.errorMessage))):I?L():(d.isError=!0,d.errorMessage=typeof I=="string"?I:bu(C),Promise.reject(d.errorMessage))})}})();return L()},b=()=>{d.isError=!1,d.errorMessage=""};return a.provide(a0,Se(Z({},e),{validate:y,clearValidate:b})),a.onMounted(()=>{i&&n.register(c.proxy)}),a.onBeforeUnmount(()=>{i&&n.unregister(c.proxy)}),Se(Z({},a.toRefs(d)),{isShowLabel:f,labelStyles:m,contentStyles:p,isFormTypeVertical:u,validate:y,clearValidate:b})},render(){var i,s,o,c;const e=ze({"bk-form-item":!0,"is-error":this.isError,"is-required":this.required}),t=()=>this.$slots.label?this.$slots.label():this.description?a.withDirectives(a.createVNode("span",{class:{"bk-form-label-description":Boolean(this.description)}},[this.label]),[[a.resolveDirective("bk-tooltips"),this.description]]):this.label,n=()=>this.isError?this.errorDisplayType==="tooltips"?a.withDirectives(a.createVNode("div",{class:"bk-form-error-tips"},[a.createVNode(Bs,null,null)]),[[a.resolveDirective("bk-tooltips"),this.errorMessage]]):a.createVNode("div",{class:"bk-form-error"},[this.$slots.error?this.$slots.error(this.errorMessage):this.errorMessage]):null;return a.createVNode("div",{class:e},[this.isShowLabel&&a.createVNode("div",{class:"bk-form-label",style:this.labelStyles},[t(),this.isFormTypeVertical&&((s=(i=this.$slots).labelAppend)==null?void 0:s.call(i))]),a.createVNode("div",{class:"bk-form-content",style:this.contentStyles},[(c=(o=this.$slots).default)==null?void 0:c.call(o),n()])])}});const r3=Gt(n8,{FormItem:o8,ComposeFormItem:e8}),c8={span:g.number.def(1),offset:g.number.def(0),pull:g.number.def(0),push:g.number.def(0)};var u8=a.defineComponent({name:"Col",props:c8,emits:[],setup(e,t){const{col:n,gutter:i,flex:s}=a.inject("containerProps"),{span:o,offset:c,pull:d,push:u}=e,f=a.computed(()=>o||n);a.provide("containerProps",{col:f.value,gutter:i,flex:s});const m=function(y){return`${Number((y*100).toFixed(3))}%`},p=a.computed(()=>({width:m(f.value/n),"padding-right":`${i/2}px`,"padding-left":`${i/2}px`,"margin-left":c?m(c/n):null,right:d?m(d/n):null,left:u?m(u/n):null}));return()=>{var y,b;return a.createVNode("div",{class:"bk-grid-col",style:p.value},[(b=(y=t.slots).default)==null?void 0:b.call(y)])}}});const d8={col:g.number.def(24),gutter:g.number.def(20),margin:g.number.def(20),flex:g.bool.def(!1),extCls:g.string};var f8=a.defineComponent({name:"Container",props:d8,emits:[],setup(e,t){const{col:n,gutter:i,flex:s,extCls:o}=e;a.provide("containerProps",{col:n,gutter:i,flex:s});const c=a.computed(()=>o?`bk-grid-container ${o}`:"bk-grid-container"),d=a.computed(()=>{const{margin:u}=e;return{"padding-right":`${u}px`,"padding-left":`${u}px`}});return()=>{var u,f;return a.createVNode("div",{class:c.value,style:d.value},[(f=(u=t.slots).default)==null?void 0:f.call(u)])}}}),h8=a.defineComponent({name:"Row",emits:[],setup(e,t){const{col:n,gutter:i,flex:s}=a.inject("containerProps");a.provide("containerProps",{col:n,gutter:i,flex:s});const o=a.computed(()=>Se(Z({},s?{display:["-webkit-box","-ms-flexbox","flex"]}:{}),{"margin-right":`-${i/2}px`,"margin-left":`-${i/2}px`}));return()=>{var c,d;return a.createVNode("div",{class:"bk-grid-row",style:o.value},[(d=(c=t.slots).default)==null?void 0:d.call(c)])}}});const Ll=Gt(f8,{Row:h8,Col:u8});var g8=a.defineComponent({name:"Dropdown",props:{isShow:g.bool.def(!1),placement:$f(),trigger:Kf(),disabled:g.bool.def(!1),popoverOptions:g.object.def({}),extCls:g.string},emits:["showChange","show","hide"],setup(e,{emit:t}){const n=c=>{t("showChange",c)},i=()=>{t("show"),n(!0)},s=()=>{t("hide"),n(!1)},o=a.ref(null);return{afterShow:i,afterHidden:s,popoverRef:o}},render(){const e=ze({"bk-dropdown":!0},this.$props.extCls),t={theme:"light bk-dropdown-popover",trigger:this.trigger,arrow:!1,placement:this.placement,isShow:this.isShow,disabled:this.disabled},n=ot.exports.merge(t,this.popoverOptions);return a.createVNode("div",{class:e},[a.createVNode(mn,a.mergeProps({ref:"popoverRef"},n,{onAfterShow:this.afterShow,onAfterHidden:this.afterHidden}),{default:()=>{var i,s;return a.createVNode("div",{class:"bk-dropdown-reference"},[a.createTextVNode(" "),(s=(i=this.$slots).default)==null?void 0:s.call(i),a.createTextVNode(" ")])},content:()=>{var i,s;return a.createVNode("div",{class:"bk-dropdown-content"},[a.createTextVNode(" "),(s=(i=this.$slots).content)==null?void 0:s.call(i),a.createTextVNode(" ")])}})])}}),m8=a.defineComponent({name:"DropdownItem",props:{extCls:g.string},emits:["click"],setup(e,{emit:t}){const n=s=>{s.stopPropagation(),t("click",s)};return{wrapperCLasses:a.computed(()=>["bk-dropdown-item",e.extCls]),handleClick:n}},render(){var e,t;return a.createVNode("li",{class:this.wrapperCLasses,onClick:this.handleClick},[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}}),p8=a.defineComponent({name:"DropdownMenu",props:{extCls:g.string},setup(e){return{wrapperCLasses:a.computed(()=>["bk-dropdown-menu",e.extCls])}},render(){var e,t;return a.createVNode("ul",{class:this.wrapperCLasses},[(t=(e=this.$slots).default)==null?void 0:t.call(e)])}});const s3=Gt(g8,{DropdownMenu:p8,DropdownItem:m8});var yu=a.defineComponent({name:"CascaderPanel",props:{width:g.oneOfType([g.number,g.string]).def("auto"),height:g.oneOfType([g.number,g.string]).def(216),store:g.object.def({}),separator:g.string.def(""),suggestions:g.arrayOf(Zf()),isFiltering:g.bool.def(!1),searchKey:g.oneOfType([g.string,g.number]).def(""),modelValue:g.arrayOf(g.oneOfType([Go(),String,Number]))},emits:["update:modelValue"],setup(e,{emit:t}){const{store:n}=e,i=a.reactive({list:[e.store.getNodes()]}),s=a.ref([]),o=a.ref([]),c=N=>typeof N=="number"?`${N}px`:N,d=c(e.height),u=c(e.width),f=N=>{N.length===0&&(i.list=i.list.slice(0,1),s.value=[]),N.forEach(C=>{const I=n.getNodeById(C);p(I)}),o.value=N},m=N=>{N.isDisabled||(N.config.multiple?o.value=n.getCheckedNodes().map(C=>C.path):o.value=N.path,t("update:modelValue",o.value))},p=N=>{var C;if(!(!N||(N==null?void 0:N.isDisabled))){if(i.list=i.list.slice(0,N.level),s.value=s.value.slice(0,N.level-1),(C=N.children)!=null&&C.length){i.list.push(N.children),s.value.push(N);return}if(n.config.isRemote&&!N.isLeaf){N.loading=!0;const I=M=>{n.appendNodes(M,N||null),i.list.push(N.children),s.value.push(N),N.loading=!1};n.config.remoteMethod(N,I)}}},y=N=>{const{trigger:C,checkAnyLevel:I,multiple:M}=N.config;return{onClick:z=>{(!N.isLeaf||M)&&z.stopPropagation(),C==="click"&&p(N),I&&!M&&m(N),N.isLeaf&&!M&&m(N)},onMouseenter:()=>{C==="hover"&&p(N)}}},b=N=>{const{multiple:C}=N.config;return{onClick:M=>{if(C){M.stopPropagation(),T(N,!N.checked);return}p(N),N.isLeaf&&!C&&m(N)}}},v=N=>(s.value[N.level-1]||{}).id===N.id,k=(N,C)=>{const{multiple:I}=N.config;return I?C.some(M=>Tr(M,N.path)):Tr(C,N.path)},T=(N,C)=>{N.setNodeCheck(C||!1),m(N)},L=N=>N.loading?a.createVNode(jr,{class:"icon-spinner"},null):a.createVNode(Dn,{class:"icon-angle-right"},null);return a.watch(()=>e.modelValue,N=>{f(N)},{immediate:!0}),a.watch(()=>e.store,N=>{i.list=[N.getNodes()]}),{menus:i,activePath:s,nodeExpandHandler:p,isNodeInPath:v,nodeEvent:y,isCheckedNode:k,checkValue:o,checkNode:T,iconRender:L,panelWidth:u,panelHeight:d,searchPanelEvents:b}},render(){const e=parseInt(this.panelWidth,10)>200?this.panelWidth:`${200}px`,t=()=>this.suggestions.length?a.createVNode("ul",{class:"bk-cascader-panel bk-scroll-y",style:{height:this.panelHeight,width:this.panelWidth}},[this.suggestions.map(n=>a.createVNode("li",a.mergeProps({class:["bk-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",{class:"bk-cascader-search-empty",style:{width:e}},[a.createVNode("span",null,[a.createTextVNode("\u6682\u65E0\u641C\u7D22\u7ED3\u679C")])]);return a.createVNode("div",{class:"bk-cascader-panel-wrapper"},[this.isFiltering?t():this.menus.list.map(n=>a.createVNode("ul",{class:"bk-cascader-panel bk-scroll-y",style:{height:this.panelHeight,width:this.panelWidth}},[n.map(i=>{var s,o;return a.createVNode("li",a.mergeProps({class:["bk-cascader-node",{"is-selected":this.isNodeInPath(i)},{"is-disabled":i.isDisabled},{"is-checked":!i.config.multiple&&this.isCheckedNode(i,this.checkValue)}]},Object.assign(this.nodeEvent(i),i.config.multiple?{}:{})),[i.config.multiple&&a.createVNode(ji,{disabled:i.isDisabled,modelValue:i.checked,"onUpdate:modelValue":c=>i.checked=c,indeterminate:i.isIndeterminate,onChange:c=>this.checkNode(i,c)},null),(o=(s=this.$slots).default)==null?void 0:o.call(s,{node:i,data:i.data}),i.isLeaf?"":this.iconRender(i)])})]))])}});function l3(e){return e.data.disabled?!0:e.level!==1?l3(e.parent):e.data.disabled}class kl{constructor(t,n,i){this.data=t,this.config=n,this.parent=i||null,this.leaf=t.leaf,this.level=this.parent?this.parent.level+1:1,this.initState()}initState(){const{idKey:t,nameKey:n,childrenKey:i}=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[i];this.children=(s||[]).map(o=>new kl(o,this.config,this)),this.pathNodes=this.calculateNodesPath(),this.path=this.pathNodes.map(o=>o.id),this.pathNames=this.pathNodes.map(o=>o.name)}get isLeaf(){var t;return this.config.isRemote?this.leaf||(this.loaded?!this.children.length:!1):!(Array.isArray(this.children)&&((t=this.children)==null?void 0:t.length)!==0)}get isDisabled(){return l3(this)}broadcast(t,n){const i=`onParent${Lr(t)}`;this.children.forEach(s=>{var o;s&&(s.broadcast(t,n),(o=s[i])==null||o.call(s,n))})}emit(t){var s;const{parent:n}=this,i=`onChild${Lr(t)}`;n&&((s=n[i])==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),i=n.length?n.every(s=>s.checked):!1;this.setCheckState(i)}setCheckState(t){const n=this.children.length,i=this.children.reduce((s,o)=>{const c=o.isIndeterminate?.5:0,d=o.checked?1:c;return s+d},0);this.checked=t,this.isIndeterminate=i!==n&&i>0}setNodeCheck(t){if(this.checked!==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 o3=(e,t)=>e.reduce((n,i)=>(i.isLeaf?n.push(i):(!t&&n.push(i),n=n.concat(o3(i.children,t))),n),[]);class c3{constructor(t){const{list:n}=t;this.data=n,this.config=t,this.nodes=this.data.map(i=>new kl(i,this.config))}getNodes(){return this.nodes}clearChecked(){this.getFlattedNodes().forEach(t=>{t.checked=!1,t.isIndeterminate=!1})}removeTag(t){this.getFlattedNodes().find(n=>Tr(t,n.path)?(n.checked=!1,!0):!1)}getFlattedNodes(t=!1){return o3(this.nodes,t)}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getNodeByValue(t){var i;return(i=this.getFlattedNodes().filter(s=>Tr(s.path,t))[0])!=null?i:null}getNodeById(t){return this.getFlattedNodes().find(n=>n.id===t)}appendNode(t,n){const i=new kl(t,this.config,n);(n?n.children:this.nodes).push(i)}appendNodes(t,n){t.forEach(i=>this.appendNode(i,n))}}var b8=a.defineComponent({name:"Cascader",directives:{clickoutside:jn},components:{CascaderPanel:yu,BkPopover:mn},props:{modelValue:g.arrayOf(g.oneOfType([Go(),String,Number])),list:g.array.def([]),placeholder:g.string.def("\u8BF7\u9009\u62E9"),filterable:g.bool.def(!1),multiple:g.bool.def(!1),disabled:g.bool.def(!1),clearable:g.bool.def(!0),trigger:g.string.def("click"),checkAnyLevel:g.bool.def(!1),isRemote:g.bool.def(!1),remoteMethod:g.func,showCompleteName:g.bool.def(!0),idKey:g.string.def("id"),nameKey:g.string.def("name"),childrenKey:g.string.def("children"),separator:g.string.def("/"),limitOneLine:g.bool.def(!1),extCls:g.string.def(""),scrollHeight:g.oneOfType([g.number,g.string]).def(216),scrollWidth:g.oneOfType([g.number,g.string]).def("auto")},emits:["update:modelValue","change","clear","toggle"],setup(e,{emit:t}){const{separator:n,multiple:i}=e,{isHover:s,setHover:o,cancelHover:c}=Ch(),d=a.ref(new c3(e)),u=a.ref(!1),f=a.ref(""),m=a.ref([]),{modelValue:p}=a.toRefs(e),y=a.ref(),b=a.ref(""),v=a.ref([]),k=a.ref(!1),T=a.computed({get:()=>p.value,set:P=>{t("update:modelValue",P)}}),L=a.ref(null),N=P=>e.showCompleteName?P.pathNames.join(n):P.pathNames[P.pathNames.length-1],C=()=>{b.value=f.value},I=P=>{var G;if(i){m.value=d.value.getCheckedNodes().map(B=>({text:N(B),key:B.id}));return}if(!e.checkAnyLevel&&((G=L==null?void 0:L.value)==null||G.hide()),P.length===0)f.value="";else{const B=d.value.getNodeByValue(P);if(!B)return;f.value=N(B)}C()},M=P=>{P.stopPropagation(),d.value.clearChecked(),b.value="",I([]),t("update:modelValue",[]),t("clear",JSON.parse(JSON.stringify(e.modelValue)))},S=(P,G,B)=>{B.stopPropagation();const ie=JSON.parse(JSON.stringify(P)),le=ie.splice(G,1)[0];d.value.removeTag(le),I(ie),t("update:modelValue",d.value.getCheckedNodes().map(ve=>ve.path))},z=(P,G)=>{I(P),t("update:modelValue",P),G!==void 0&&t("change",P)},j=()=>{d.value=new c3(e),I(e.modelValue)},O=P=>{t("toggle",P.isShow),P.isShow||(k.value=!1)},W=Es(200,P=>{const G=P.target;if(b.value=G.value,b.value===""){k.value=!1;return}k.value=!0;const B=d.value.getFlattedNodes().filter(ie=>(e.checkAnyLevel||ie.isLeaf)&&ie.pathNames.join(e.separator).includes(b.value));v.value=B,!(L!=null&&L.value.isShow)&&(L==null||L.value.show())});return a.watch(()=>e.modelValue,z,{immediate:!0}),a.watch(()=>e.list,j,{deep:!0,immediate:!0}),{store:d,updateValue:I,panelShow:u,selectedText:f,checkedValue:T,handleClear:M,isHover:s,setHover:o,popover:L,cancelHover:c,selectedTags:m,removeTag:S,cascaderPanel:y,popoverChangeEmitter:O,searchKey:b,suggestions:v,isFiltering:k,searchInputHandler:W}},render(){const e=()=>this.clearable&&this.isHover?a.createVNode(Zt,{class:"bk-icon-clear-icon",onClick:this.handleClear},null):a.createVNode(_a,{class:"bk-icon-angle-up"},null),t=()=>this.limitOneLine?a.createVNode("span",null,[this.selectedText]):a.createVNode("div",{class:"cascader-tag-list"},[this.selectedTags.map((n,i)=>a.createVNode("span",{class:"cascader-tag-item"},[a.createVNode("span",{class:"cascader-tag-item-name"},[n.text]),a.createVNode(Hn,{class:"bk-icon-clear-icon",onClick:s=>this.removeTag(this.modelValue,i,s)},null)]))]);return a.createVNode("div",{class:["bk-cascader","bk-cascader-wrapper",this.extCls,{"bk-is-show-panel":this.panelShow,"is-unselected":this.modelValue.length===0,"is-hover":this.isHover,"is-filterable":this.filterable}],tabindex:"0","data-placeholder":this.placeholder,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[e(),a.createVNode(mn,{placement:"bottom-start",theme:"light bk-cascader-popover",trigger:"click",arrow:!1,class:"bk-cascader-popover-wrapper",ref:"popover",onAfterHidden:this.popoverChangeEmitter,onAfterShow:this.popoverChangeEmitter,boundary:"body"},{default:()=>a.createVNode("div",{class:"bk-cascader-name"},[this.multiple&&this.selectedTags.length>0&&t(),this.filterable?a.createVNode("input",{class:"bk-cascader-search-input",type:"text",onInput:this.searchInputHandler,placeholder:this.placeholder,value:this.searchKey},null):a.createVNode("span",null,[this.selectedText])]),content:()=>a.createVNode("div",{class:"bk-cascader-popover"},[a.createVNode(yu,{store:this.store,ref:"cascaderPanel",width:this.scrollWidth,height:this.scrollHeight,"search-key":this.searchKey,separator:this.separator,"is-filtering":this.isFiltering,suggestions:this.suggestions,modelValue:this.checkedValue,"onUpdate:modelValue":n=>this.checkedValue=n},{default:n=>this.$slots.default?this.$slots.default(n):a.createVNode("span",{class:"bk-cascader-node-name"},[n.node.name])})])})])}});const u3=Gt(b8,{CascaderPanel:yu});var d3=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),i=a.ref(!1),s=a.ref(0),o=a.ref(0),c=a.ref(0),d=a.ref(null),u=a.ref(e.modelValue),f=a.ref(0),m=a.ref(0),p=a.ref(!1),y=a.ref(null),b=a.computed(()=>{var O,W;let z="";if((O=e.params.customContent)!=null&&O[e.modelValue]){const P=e.params.customContent[e.modelValue];z=P.tip||P.label||""}const j=e.params.vertical?As.RIGHT:As.TOP;return(W=e.params)!=null&&W.showTip?{content:e.params.formatterTipLabel(`${z||(e==null?void 0:e.modelValue)||"0"}`),placement:j}:{content:"",placement:j}}),v=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),k=a.computed(()=>e.params.vertical?{bottom:v.value}:{left:v.value}),T=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),L=z=>{e.params.disable||(z.preventDefault(),N(z),Yr(window,"mousemove",C),Yr(window,"touchmove",C),Yr(window,"mouseup",I),Yr(window,"touchend",I))},N=z=>{n.value=!0,i.value=!0,e.params.vertical?s.value=z.clientY:o.value=z.clientX,c.value=parseFloat(v.value),d.value=c.value},C=z=>{if(n.value){i.value=!1,t("resetSize");let j=0;e.params.vertical?(f.value=z.clientY,j=(s.value-f.value)/e.params.sliderSize*100):(m.value=z.clientX,j=(m.value-o.value)/e.params.sliderSize*100),d.value=c.value+j,M(d.value)}},I=()=>{p.value=!1,n.value&&(setTimeout(()=>{n.value=!1,i.value||(M(d.value),t("emitChange"))},0),Tl(window,"mousemove",C),Tl(window,"touchmove",C),Tl(window,"mouseup",I),Tl(window,"touchend",I))},M=z=>{if(z===null||isNaN(z))return;z<0?d.value=0:z>100&&(d.value=100);const j=100/((e.params.maxValue-e.params.minValue)/e.params.step);let W=Math.round(z/j)*j*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;W=parseFloat(W.toFixed(e.params.precision)),t("update:modelValue",W),!n.value&&e.modelValue!==u.value&&(u.value=e.modelValue)};return{renderDom:()=>a.createVNode("div",{class:["bk-slider-button",e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],ref:y,tabindex:"0",style:k.value,onClick:z=>z.stopPropagation(),onMousedown:L},[Boolean(b.value.content)?a.createVNode(mn,{content:b.value.content,theme:"dark",placement:b.value.placement,boundary:document.body},{default:()=>[a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]}):a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null),e.params.showButtonLabel&&!e.params.showIntervalLabel?a.createVNode("div",{class:["slider-button-label",e.params.vertical?"vertical":"horizontal"]},[T.value]):void 0]),setPosition:M,tip:b}},render(){return this.renderDom()}});const Yr=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},Tl=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)};var y8=a.defineComponent({name:"Slider",props:{modelValue:g.oneOfType([g.array,g.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}},emits:["update:modelValue","change"],setup(e,{slots:t,emit:n}){const i=a.ref(1),s=a.ref(null),o=a.ref(null),c=a.ref(null),d=a.ref(0),u=a.ref(0),f=a.ref(null),m=a.ref(null),p=a.ref(null),y=a.ref(null),b=a.computed(()=>{const K=[e.minValue,e.maxValue,e.step].map($=>{const V=`${$}`.split(".")[1];return V?V.length:0});return Math.max.apply(null,K)}),v=a.computed(()=>Math.min(s.value,o.value)),k=a.computed(()=>Math.max(s.value,o.value)),T=a.computed(()=>e.range?`${100*(k.value-v.value)/(e.maxValue-e.minValue)}%`:`${100*(s.value-e.minValue)/(e.maxValue-e.minValue)}%`),L=a.computed(()=>e.range?`${100*(v.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),N=a.computed(()=>e.vertical?{height:T.value,bottom:L.value}:{width:T.value,left:L.value}),C=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const K=(e.maxValue-e.minValue)/e.step,$=100*e.step/(e.maxValue-e.minValue),V=[];for(let J=1;J<K;J++)V.push(J*$);return e.range?V.filter(J=>J<100*(v.value-e.minValue)/(e.maxValue-e.minValue)||J>100*(k.value-e.minValue)/(e.maxValue-e.minValue)):V.filter(J=>J>100*(s.value-e.minValue)/(e.maxValue-e.minValue))}),I=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),M=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const K=100*e.step/(e.maxValue-e.minValue),$=[];for(let V=e.minValue,J=0;V<=e.maxValue;V+=e.step,J++){const re={stepWidth:J*K,stepLabel:e.formatterLabel(V)};$.push(re)}return $}),S=a.computed(()=>Array.isArray(e.modelValue)),z=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((K,$)=>Number(K)-Number($)).filter(K=>Number(K)>=e.minValue&&Number(K)<=e.maxValue).map(K=>{const{tip:$}=e.customContent[K],{label:V}=e.customContent[K];return{tip:$||V||"",label:V||"",percent:(Number(K)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),j=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:b.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{G()}),a.watch(()=>s.value,K=>{e.range?n("update:modelValue",[v.value,k.value]):n("update:modelValue",K),d.value=K}),a.watch(()=>o.value,K=>{n("update:modelValue",[v.value,k.value]),u.value=K}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(s.value=Math.max(e.minValue,Number(e.modelValue[0])),o.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(s.value=e.minValue,o.value=e.maxValue),c.value=[s.value,o.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?s.value=e.minValue:s.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),c.value=s.value),O(),Yr(window,"resize",O())});const O=()=>{f.value&&(i.value=f.value[`client${e.vertical?"Height":"Width"}`])},W=K=>{var $,V;if(K.stopPropagation(),!e.disable){if(O(),e.vertical){const J=($=f.value)==null?void 0:$.getBoundingClientRect().bottom;le((J-K.clientY)/i.value*100)}else{const J=(V=f.value)==null?void 0:V.getBoundingClientRect().left;le((K.clientX-J)/i.value*100)}B()}},P=()=>e.range?![v.value,k.value].every((K,$)=>K===c.value[$]):e.modelValue!==c.value,G=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const K=e.modelValue;e.range&&Array.isArray(K)?K[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):K[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):K[0]<e.minValue?n("update:modelValue",[e.minValue,K[1]]):K[1]>e.maxValue?n("update:modelValue",[K[0],e.maxValue]):(s.value=Number(K[0]),o.value=Number(K[1]),P()&&(c.value=K.slice())):!e.range&&typeof K=="number"&&!isNaN(K)&&(K<e.minValue?n("update:modelValue",e.minValue):K>e.maxValue?n("update:modelValue",e.maxValue):(s.value=K,P()&&(c.value=K)))},B=async()=>{await a.nextTick(),n("change",e.range?[v.value,k.value]:e.modelValue)},ie=K=>e.vertical?{bottom:`${K}%`}:{left:`${K}%`},le=K=>{if(!e.range){m.value.setPosition(K);return}const $=e.minValue+K*(e.maxValue-e.minValue)/100;Math.abs(v.value-$)<Math.abs(k.value-$)?y.value=s.value<o.value?m.value:p.value:y.value=s.value>o.value?m.value:p.value,y.value.setPosition(K)},ve=K=>{if(K==="")return;const $=parseFloat(K);$<e.minValue?(d.value=e.minValue,s.value=e.minValue):$>e.maxValue?(d.value=e.maxValue,s.value=e.maxValue):s.value=$},Ie=K=>{if(K===""||typeof K=="number")return;const $=parseFloat(K);$<e.minValue?(u.value=e.minValue,o.value=e.minValue):$>e.maxValue?(u.value=e.maxValue,o.value=e.maxValue):o.value=$},ge=K=>{let $=0;return K==="start"?$=e.vertical?e.maxValue:e.minValue:$=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[s.value,o.value].includes($)?"0":"1"};return{renderDom:()=>{var K,$;return a.createVNode("div",{class:["bk-slider",e.extCls]},[(K=t.start)==null?void 0:K.call(t),a.createVNode("div",{class:"bk-slider-runway",ref:f,style:I.value,onClick:W},[a.createVNode("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:N.value},null),e.showInterval?C.value.map((V,J)=>a.createVNode("div",{key:J,class:["bk-slider-interval",{vertical:e.vertical}],style:ie(V)},null)):void 0,e.customContent?z.value.map((V,J)=>a.createVNode("div",{key:J,class:["bk-slider-interval",{vertical:e.vertical}],style:ie(V.percent)},null)):void 0,e.showBetweenLabel||e.showIntervalLabel||e.customContent?a.createVNode("div",{class:["bk-slider-labels",e.vertical?"vertical":"horizontal"]},[function(){if(e.showBetweenLabel)return[a.createVNode("div",{class:"label-start",style:[{opacity:ge("start")}]},[e.formatterLabel(e.minValue)]),a.createVNode("div",{class:"label-end",style:[{opacity:ge("end")}]},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return M.value.map((V,J)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:J,style:ie(V.stepWidth)},[V.stepLabel]));if(e.customContent)return z.value.map((V,J)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:J,style:ie(V.percent)},[V.label]))}()]):void 0,a.createVNode(d3,{modelValue:s.value,"onUpdate:modelValue":V=>s.value=V,ref:m,params:j.value,onEmitChange:B,onResetSize:O},null),e.range?a.createVNode(d3,{modelValue:o.value,"onUpdate:modelValue":V=>o.value=V,ref:p,params:j.value,onEmitChange:B,onResetSize:O},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:"bk-slider-input"},[a.createVNode("div",{class:"input-item"},[a.createVNode(ia,{type:"number",modelValue:d.value,max:e.maxValue,min:e.minValue,onChange:ve},null)]),S.value&&o.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("\uFF5E")]),a.createVNode("div",{class:"input-item"},[a.createVNode(ia,{type:"number",modelValue:u.value,max:e.maxValue,min:e.minValue,onChange:Ie},null)])]:void 0]):void 0,($=t.end)==null?void 0:$.call(t)])}}},render(){return this.renderDom()}});const f3=Ge(y8);var C8=a.defineComponent({name:"ResizeLayout",props:{placement:g.placement().def("left"),min:g.number.def(3),max:g.number.def(1/0),triggerWidth:g.number.def(5),triggerOffset:g.number.def(3),initialDivide:g.oneOfType([String,Number]).def("20%"),immediate:g.bool,disabled:g.bool,collapsible:g.bool,autoMinimize:g.oneOfType([Boolean,Number]).def(!1),border:g.bool.def(!0)},emits:["before-resize","resizing","after-resize","collapse-change"],setup(e,{emit:t}){const{placement:n,initialDivide:i,triggerOffset:s,triggerWidth:o,max:c,min:d,immediate:u,autoMinimize:f}=a.toRefs(e),m=a.ref(!1),p=a.ref(!0),y=a.ref(!1),b=a.ref(null),v=a.ref({}),k=a.ref(null),T=a.ref(null),L=a.ref(null),N=a.ref(null),C=a.computed(()=>["left","right"].includes(n.value)),I=a.computed(()=>C.value?"width":"height"),M=a.computed(()=>{let ge=i.value;return typeof ge=="number"&&(ge=`${ge}px`),{[I.value]:ge}}),S=a.computed(()=>({[`margin-${n.value}`]:`${s.value-o.value}px`,[I.value]:`${o.value}px`})),z=a.computed(()=>f.value?typeof f.value=="boolean"?50:f.value:0),j=()=>{const ge=k.value.getBoundingClientRect();b.value=C.value?ge.width:ge.height},O=new ResizeObserver(j),W=()=>{switch(T.value.style.visibility="visible",n.value){case"left":T.value.style.inset=`0 auto auto ${v.value.aside.width}px`;break;case"right":T.value.style.inset=`0 ${v.value.aside.width}px auto auto`;break;case"top":T.value.style.inset=`${v.value.aside.height}px auto auto 0`;break;case"bottom":T.value.style.inset=`auto auto ${v.value.aside.height}px 0`;break}},P=()=>{L.value.style.display="block",L.value.style.cursor=C.value?"col-resize":"row-resize"},G=ge=>Math.min(c.value,Math.max(d.value,ge),b.value-o.value),B=ge=>{t("before-resize",ge);const he=N.value.getBoundingClientRect();v.value=Object.freeze({mouse:{clientX:ge.clientX,clientY:ge.clientY},aside:{width:he.width,height:he.height}}),P(),u.value||W(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const K=J=>{t("resizing",J)},$=J=>{let re;switch(n.value){case"top":re=J.clientY-v.value.mouse.clientY;break;case"right":re=v.value.mouse.clientX-J.clientX;break;case"bottom":re=v.value.mouse.clientY-J.clientY;break;case"left":re=J.clientX-v.value.mouse.clientX}const U=v.value.aside[I.value]+re,q=G(U)+s.value,ce=`${q}px`;u.value?N.value.style[I.value]=ce:T.value.style[n.value]=ce,K(q)},V=()=>{if(T.value.style.visibility="hidden",L.value.style.display="none",document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",V),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{ie(),t("after-resize",parseFloat(T.value.style[n.value]))}),u.value)return!1;N.value.style[I.value]=T.value.style[n.value]};document.addEventListener("mousemove",$),document.addEventListener("mouseup",V)},ie=()=>{if(!f.value)return!1;const ge=N.value.getBoundingClientRect();if(y.value=m.value=ge[I.value]<=z.value,!y.value)return p.value=!0,!1;ve(),a.nextTick(()=>{N.value.setAttribute(`data-${I.value}`,M.value[I.value])})},le=ge=>{m.value=typeof ge=="boolean"?ge:!m.value,ve(),t("collapse-change",m.value)},ve=()=>{const ge=N.value.getBoundingClientRect();Ie(!m.value),m.value?(N.value.setAttribute(`data-${I.value}`,`${ge[I.value]}px`),N.value.style[I.value]="5px"):(p.value=!0,N.value.style[I.value]=N.value.getAttribute(`data-${I.value}`))},Ie=ge=>{const he=()=>{p.value=ge,N.value.style.transition="",N.value.removeEventListener("transitionend",he)};N.value.addEventListener("transitionend",he),N.value.style.transition=`${I.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};return a.onMounted(()=>{O.observe(k.value)}),a.onBeforeUnmount(()=>{O.unobserve(k.value)}),{collapsed:m,asideContentVisible:p,minimized:y,limitMax:b,state:v,vertical:C,cssPropKey:I,bkResizeLayoutRef:k,resizeProxyRef:T,resizeMaskRef:L,asideRef:N,triggerStyle:S,asideStyle:M,handleMousedown:B,setCollapse:le}},render(){var t,n,i,s,o,c;const e=["bk-resize-layout",`bk-resize-layout-${this.placement}`,{"bk-resize-layout-collapsed":this.collapsed,"bk-resize-layout-border":this.border}];return a.createVNode("div",{ref:"bkResizeLayoutRef",class:e},[a.createVNode("aside",{class:"bk-resize-layout-aside",ref:"asideRef",style:this.asideStyle},[a.withDirectives(a.createVNode("div",{class:"bk-resize-layout-aside-content"},[(n=(t=this.$slots).aside)==null?void 0:n.call(t)]),[[a.vShow,this.asideContentVisible]]),a.withDirectives(a.createVNode("i",{class:"bk-resize-trigger",style:this.triggerStyle,onMousedown:a.withModifiers(this.handleMousedown,["left"])},null),[[a.vShow,!this.disabled&&(!this.collapsed||this.autoMinimize)]]),a.withDirectives(a.createVNode("i",{class:["bk-resize-proxy",this.placement],ref:"resizeProxyRef"},null),[[a.vShow,!this.collapsed||this.autoMinimize]]),this.collapsible&&(((s=(i=this.$slots)["collapse-trigger"])==null?void 0:s.call(i))||(this.collapsed?a.createVNode(Dn,{class:"bk-resize-collapse",onClick:this.setCollapse},null):a.createVNode(Si,{class:"bk-resize-collapse",onClick:this.setCollapse},null)))]),a.createVNode("main",{class:"bk-resize-layout-main"},[(c=(o=this.$slots).main)==null?void 0:c.call(o)]),a.createVNode("div",{class:"bk-resize-mask",ref:"resizeMaskRef"},null)])}});const h3=Ge(C8),v8={list:g.array.def([]),titleAble:g.bool.def(!1),extCls:g.string};var w8=a.defineComponent({name:"Timeline",props:v8,emits:["select"],setup(e,{emit:t}){const n=a.ref([]),i=c=>{const d=[];c.forEach(u=>{var f;d.push({tag:u.tag,content:u.content,type:u.type,size:u.size,color:u.color,icon:u.icon,filled:u.filled,border:(f=u.border)!=null?f:!0})}),n.value.splice(0,n.value.length,...d)},s=()=>{var c;n.value.splice(0,n.value.length,{tag:"\u6B65\u9AA41",content:"\u5185\u5BB91"},{tag:"\u6B65\u9AA42",content:"\u5185\u5BB92"},{tag:"\u6B65\u9AA43",content:"\u5185\u5BB93"}),(c=e.list)!=null&&c.length&&i(e.list)},o=c=>{try{t("select",c)}catch(d){console.warn(d)}};return a.onMounted(s),a.watch(()=>e.list,()=>{i(e.list)},{deep:!0}),{defaultTimelines:n,titleSelect:o}},render(){const e=i=>{const{icon:s}=i;return s?typeof s=="object"||typeof s=="function":!1},t=i=>{const s="bk-timeline",o=["blue","red","green","yellow","gray"],c=i.type?`${s}-${i.type}`:`${s}-default`,d=i.size?`${s}-${i.size}`:"",u=i.filled?`${s}-filled`:"",f=i.color&&o.includes(i.color)?`${s}-${i.color}`:"",m=e(i)?`${s}-custom`:"";return ze({},`${s} ${c} ${d} ${f} ${u} ${m}`)},n=i=>this.$slots.content?a.createVNode("div",{class:"bk-timeline-content"},[this.$slots.content(i)]):a.createVNode("div",{class:"bk-timeline-content",innerHTML:i.content},null);return a.createVNode("ul",{class:["bk-timeline",this.extCls]},[this.defaultTimelines.map(i=>{var s,o,c;return a.createVNode("li",{class:["bk-timeline-dot",t(i)]},[e(i)?a.createVNode("div",{class:"bk-timeline-icon",style:{border:i.border?`2px solid ${i.color}`:"0px",borderRadius:i.border?"50%":"0"}},[a.createVNode("span",{class:"bk-timeline-icon-inner"},[typeof i.icon=="function"?a.createVNode(i.icon,null,null):i.icon])]):"",a.createVNode("div",{class:"bk-timeline-section"},[a.createVNode("div",{class:"bk-timeline-title",onClick:()=>{this.titleSelect(i)}},[(c=(o=(s=this.$slots).default)==null?void 0:o.call(s,i))!=null?c:a.createVNode("span",{innerHTML:i.tag},null)]),i.content?n(i):""])])})])}});const g3=Ge(w8),M8={list:g.array.def([]),controllable:g.bool.def(!1),showSteps:g.bool.def(!1),curProcess:g.number.def(0),displayKey:g.string.def("content"),extCls:g.string};var I8=a.defineComponent({name:"Process",props:M8,emits:["update:curProcess","click"],setup(e,{emit:t}){const n=a.ref([]),i=a.ref(0),s=()=>{var c;n.value.splice(0,n.value.length,{content:"\u6B65\u9AA41"},{content:"\u6B65\u9AA42"},{content:"\u6B65\u9AA43"},{content:"\u6B65\u9AA44"}),(c=e.list)!=null&&c.length&&n.value.splice(0,n.value.length,...e.list)},o=async c=>{try{e.controllable&&c!==e.curProcess&&(t("update:curProcess",c),t("click",c))}catch(d){console.warn(d)}};return a.onMounted(s),{defaultProcessList:n,paddingBottom:i,jumpTo:o}},render(){const e="bk-process",t=ze({[`${this.extCls}`]:!!this.extCls},`${e}`),n=d=>d.status==="loading",i=d=>d.status==="error",s=d=>this.curProcess>=d+1||this.defaultProcessList[d].status==="done",o=d=>d.icon?d.icon:"",c=(d,u)=>{if(d===this.curProcess-1&&n(u))return a.createVNode(Rs,{class:"bk-icon bk-process-icon icon-loading"},null);if(d===this.curProcess-1&&i(u))return a.createVNode(Hn,{class:"bk-process-icon"},null);if(d===this.curProcess-1&&o(u))return a.createVNode("span",{class:"bk-process-icon-custom"},[a.createVNode(u.icon,null,null)]);if(s(d))return a.createVNode(na,{class:"bk-process-icon-done"},null)};return a.createVNode("div",{class:t},[a.createVNode("ul",{style:{paddingBottom:`${this.paddingBottom}px`}},[this.defaultProcessList.map((d,u)=>a.createVNode("li",{onClick:()=>{this.jumpTo(u+1)},style:{cursor:this.controllable?"pointer":""},class:{success:this.curProcess>=u+1,current:n(d)&&u===this.curProcess-1,error:i(d)&&u===this.curProcess-1}},[d[this.displayKey],c(u,d)]))])])}});const m3=Ge(I8),fa="bk-upload";var fi=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(fi||{}),$a=(e=>(e.NEW="new",e.UPLOADING="uploading",e.SUCCESS="success",e.FAIL="fail",e))($a||{});const p3=[fi.BUTTON,fi.DRAGGABLE,fi.PICTURE];var hi={theme:{type:String,default:"draggable",validator:e=>!e||p3.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of \u3010${p3.join(" | ")}\u3011`),!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,beforeUpload:{type:Function},beforeRemove:{type:Function},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10}};function b3(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var N8=a.defineComponent({name:"UploadList",props:{theme:hi.theme,disabled:hi.disabled,files:hi.files,multiple:hi.multiple},emits:["remove","retry"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:s,multiple:o}=a.toRefs(e),c=`${fa}-list`,d=a.computed(()=>i.value===fi.PICTURE),u=a.computed(()=>d.value&&!o.value),f=a.computed(()=>ze({[c]:!0,[`${c}--${i.value}`]:!0,[`${c}--disabled`]:s.value}));function m(N){const C=["Bytes","KB","MB","GB","TB"],I=Math.floor(Math.log(N)/Math.log(1024));return`${(N/1024**I).toFixed(2)}${C[I]}`}function p(N,C){n("remove",N,C)}function y(N,C){n("retry",N,C)}const b=()=>{let N;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},b3(N=e.files.map(C=>{const I=ze({[`${c}__item`]:!0,[`${c}__item-picture`]:!0,[`${c}__item--${C.status}`]:!0});return a.createVNode("li",{key:C.uid,class:I},[t!=null&&t.file?t.file({file:C}):v(C)])}))?N:{default:()=>[N]})},v=N=>[a.withDirectives(a.createVNode("img",{src:N.url,class:`${c}__picture-item-thumbnail`,alt:""},null),[[a.vShow,N.status!=="uploading"]]),a.createVNode(a.Fragment,null,[N.status==="uploading"&&a.createVNode(_r,{class:`${c}__picture-item-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:N.percentage},null)]),a.createVNode(a.Fragment,null,[!s.value&&a.createVNode("div",{class:`${c}__picture-item-actions`},[a.createVNode(Dr,{class:"action-icon",onClick:C=>p(N,C)},null)])])],k=()=>{let N;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},b3(N=e.files.map(C=>{const I=ze({[`${c}__item`]:!0,[`${c}__item--${C.status}`]:!0});return a.createVNode("li",{key:C.uid,class:I},[t!=null&&t.file?t.file({file:C}):L(C)])}))?N:{default:()=>[N]})},T=N=>{var j;const C=(j=N==null?void 0:N.raw)==null?void 0:j.type,[I]=(C==null?void 0:C.split("/"))||"";let S={text:Or,image:oc,application:Or,video:pc,audio:ec}[I]||Or;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(C)&&(S=Ko),a.h(S,{class:`${c}__item-file-icon`})},L=N=>[a.createVNode("div",{class:`${c}__item-icon`},[N.isPic?a.createVNode("img",{src:N.url,class:`${c}__item-thumbnail`,alt:""},null):T(N)]),a.createVNode("div",{class:`${c}__item-summary`},[a.createVNode("div",{class:`${c}__item-name`,title:N.name},[N.name]),N.status!=="uploading"&&a.createVNode("div",{class:`${c}__item-message`,title:N.statusText},[N.status==="success"&&a.createVNode("span",null,[a.createVNode(na,{class:`${c}__item-message-success-icon`},null),N.statusText||"\u4E0A\u4F20\u6210\u529F"]),N.status==="fail"&&a.createVNode("span",null,[N.statusText||"\u4E0A\u4F20\u5931\u8D25"])]),N.status==="uploading"&&a.createVNode(_r,{class:`${c}__item-progress`,showText:!1,percent:N.percentage,size:"small"},null),N.status!=="fail"&&a.createVNode("div",{class:`${c}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-size`},[m(N.size)]),[[a.vShow,N.size]]),a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-percentage`},[N.percentage,a.createTextVNode("%")]),[[a.vShow,N.status==="uploading"]])]),!s.value&&a.createVNode("div",{class:`${c}__item-actions`},[N.status==="fail"&&a.createVNode(uc,{class:`${c}__item-retry-icon`,onClick:C=>y(N,C)},null),a.createVNode(Dr,{class:`${c}__item-del-icon`,onClick:C=>p(N,C)},null)])])];return()=>{var N;return a.createVNode(a.Fragment,null,[u.value?(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger((N=e.files)==null?void 0:N[0])):a.createVNode("ul",{class:f.value},[d.value?b():k(),(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger())])])}}}),y3=a.defineComponent({name:"UploadTrigger",props:{theme:hi.theme,disabled:hi.disabled,multiple:hi.multiple,accept:hi.accept,file:{type:Object}},emits:["change","remove"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:s,file:o,multiple:c,accept:d}=a.toRefs(e),u=`${fa}-trigger`,f=a.computed(()=>i.value===fi.BUTTON),m=a.computed(()=>i.value===fi.DRAGGABLE),p=a.computed(()=>i.value===fi.PICTURE),y=a.computed(()=>p.value&&!c.value),b=a.computed(()=>p.value&&!d.value?"image/png,image/jpeg,image/jpg":d.value),v=a.ref(null),k=a.computed(()=>{var G,B,ie;return ze({[u]:!0,[`${u}--${i.value}`]:!0,[`${u}--single-picture`]:y.value,[`${u}--has-file`]:(G=o.value)!=null?G:!1,[`${u}--${(B=o.value)==null?void 0:B.status}`]:(ie=o.value)!=null?ie:!1,[`${u}--dragover`]:M.value,[`${u}--disabled`]:s.value})}),T=()=>{v.value.value=null,v.value.click()},L=G=>{const{files:B}=G.target;n("change",Array.from(B))},N=()=>{e.disabled||T()},C=G=>{G.defaultPrevented||G.target!==G.currentTarget||((G.code==="Enter"||G.code==="Space")&&T(),G.preventDefault())};function I(G,B){n("remove",G,B),B.stopPropagation(),B.preventDefault()}const M=a.ref(!1),S=()=>{const G=ve=>{if(s.value)return;ve.preventDefault(),M.value=!1;const Ie=Array.from(ve.dataTransfer.files);if(!b.value){n("change",Ie);return}const ge=Ie.filter(he=>{const{type:K,name:$}=he,V=$.includes(".")?`.${$.split(".").pop()}`:"",J=K.replace(/\/.*$/,"");return b.value.split(",").map(re=>re.trim()).filter(re=>re).some(re=>re.startsWith(".")?V===re:/\/\*$/.test(re)?J===re.replace(/\/\*$/,""):/^[^/]+\/[^/]+$/.test(re)?K===re:!1)});n("change",ge)},B=ve=>{ve.preventDefault(),M.value=!0},ie=()=>{M.value=!1},le=ze({[`${u}__draggable`]:!0});return a.createVNode("div",{class:le,onDrop:G,onDragover:B,onDragleave:ie},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Ys,{class:`${u}__draggable-icon`},null),a.createVNode("div",{class:`${u}__draggable-text`},[a.createTextVNode("\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904\u6216"),a.createVNode("span",{class:`${u}__draggable-upload-link`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])])])},z=()=>a.createVNode(a.Fragment,null,[y.value&&e.file?O(e.file):j()]),j=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${u}__picture-inner`},[a.createVNode(Gs,{class:`${u}__picture-icon`},null),a.createVNode("div",{class:`${u}__picture-text`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])]),O=G=>[a.withDirectives(a.createVNode("img",{src:G.url,class:`${u}__picture-thumbnail`,alt:""},null),[[a.vShow,G.status!=="uploading"]]),a.createVNode(a.Fragment,null,[G.status==="uploading"&&a.createVNode(_r,{class:`${u}__picture-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:G.percentage},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${u}__picture-actions`},[a.createVNode(Dr,{class:"action-icon",onClick:B=>I(G,B)},null)])])],W=()=>a.createVNode(Pt,{disabled:s.value},{default:()=>[a.createVNode(Ys,{class:`${u}__button-icon`},null),a.createVNode("span",{class:`${u}__button-text`},[a.createTextVNode("\u4E0A\u4F20\u6587\u4EF6")])]}),P=()=>{if(f.value)return W();if(m.value)return S();if(p.value)return z()};return()=>{var G;return a.createVNode("div",{class:k.value,tabindex:"0",onClick:N,onKeydown:C},[t.trigger?[t.trigger(),(G=t==null?void 0:t.default)==null?void 0:G.call(t)]:P(),a.createVNode("input",{ref:v,class:"bk-upload__input-file",tabindex:"-1",onChange:L,accept:b.value,multiple:c.value,disabled:s.value,type:"file"},null)])}}}),C3={exports:{}};(function(e,t){(function(n){e.exports=n()})(function(n){var i=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function s(L,N){var C=L[0],I=L[1],M=L[2],S=L[3];C+=(I&M|~I&S)+N[0]-680876936|0,C=(C<<7|C>>>25)+I|0,S+=(C&I|~C&M)+N[1]-389564586|0,S=(S<<12|S>>>20)+C|0,M+=(S&C|~S&I)+N[2]+606105819|0,M=(M<<17|M>>>15)+S|0,I+=(M&S|~M&C)+N[3]-1044525330|0,I=(I<<22|I>>>10)+M|0,C+=(I&M|~I&S)+N[4]-176418897|0,C=(C<<7|C>>>25)+I|0,S+=(C&I|~C&M)+N[5]+1200080426|0,S=(S<<12|S>>>20)+C|0,M+=(S&C|~S&I)+N[6]-1473231341|0,M=(M<<17|M>>>15)+S|0,I+=(M&S|~M&C)+N[7]-45705983|0,I=(I<<22|I>>>10)+M|0,C+=(I&M|~I&S)+N[8]+1770035416|0,C=(C<<7|C>>>25)+I|0,S+=(C&I|~C&M)+N[9]-1958414417|0,S=(S<<12|S>>>20)+C|0,M+=(S&C|~S&I)+N[10]-42063|0,M=(M<<17|M>>>15)+S|0,I+=(M&S|~M&C)+N[11]-1990404162|0,I=(I<<22|I>>>10)+M|0,C+=(I&M|~I&S)+N[12]+1804603682|0,C=(C<<7|C>>>25)+I|0,S+=(C&I|~C&M)+N[13]-40341101|0,S=(S<<12|S>>>20)+C|0,M+=(S&C|~S&I)+N[14]-1502002290|0,M=(M<<17|M>>>15)+S|0,I+=(M&S|~M&C)+N[15]+1236535329|0,I=(I<<22|I>>>10)+M|0,C+=(I&S|M&~S)+N[1]-165796510|0,C=(C<<5|C>>>27)+I|0,S+=(C&M|I&~M)+N[6]-1069501632|0,S=(S<<9|S>>>23)+C|0,M+=(S&I|C&~I)+N[11]+643717713|0,M=(M<<14|M>>>18)+S|0,I+=(M&C|S&~C)+N[0]-373897302|0,I=(I<<20|I>>>12)+M|0,C+=(I&S|M&~S)+N[5]-701558691|0,C=(C<<5|C>>>27)+I|0,S+=(C&M|I&~M)+N[10]+38016083|0,S=(S<<9|S>>>23)+C|0,M+=(S&I|C&~I)+N[15]-660478335|0,M=(M<<14|M>>>18)+S|0,I+=(M&C|S&~C)+N[4]-405537848|0,I=(I<<20|I>>>12)+M|0,C+=(I&S|M&~S)+N[9]+568446438|0,C=(C<<5|C>>>27)+I|0,S+=(C&M|I&~M)+N[14]-1019803690|0,S=(S<<9|S>>>23)+C|0,M+=(S&I|C&~I)+N[3]-187363961|0,M=(M<<14|M>>>18)+S|0,I+=(M&C|S&~C)+N[8]+1163531501|0,I=(I<<20|I>>>12)+M|0,C+=(I&S|M&~S)+N[13]-1444681467|0,C=(C<<5|C>>>27)+I|0,S+=(C&M|I&~M)+N[2]-51403784|0,S=(S<<9|S>>>23)+C|0,M+=(S&I|C&~I)+N[7]+1735328473|0,M=(M<<14|M>>>18)+S|0,I+=(M&C|S&~C)+N[12]-1926607734|0,I=(I<<20|I>>>12)+M|0,C+=(I^M^S)+N[5]-378558|0,C=(C<<4|C>>>28)+I|0,S+=(C^I^M)+N[8]-2022574463|0,S=(S<<11|S>>>21)+C|0,M+=(S^C^I)+N[11]+1839030562|0,M=(M<<16|M>>>16)+S|0,I+=(M^S^C)+N[14]-35309556|0,I=(I<<23|I>>>9)+M|0,C+=(I^M^S)+N[1]-1530992060|0,C=(C<<4|C>>>28)+I|0,S+=(C^I^M)+N[4]+1272893353|0,S=(S<<11|S>>>21)+C|0,M+=(S^C^I)+N[7]-155497632|0,M=(M<<16|M>>>16)+S|0,I+=(M^S^C)+N[10]-1094730640|0,I=(I<<23|I>>>9)+M|0,C+=(I^M^S)+N[13]+681279174|0,C=(C<<4|C>>>28)+I|0,S+=(C^I^M)+N[0]-358537222|0,S=(S<<11|S>>>21)+C|0,M+=(S^C^I)+N[3]-722521979|0,M=(M<<16|M>>>16)+S|0,I+=(M^S^C)+N[6]+76029189|0,I=(I<<23|I>>>9)+M|0,C+=(I^M^S)+N[9]-640364487|0,C=(C<<4|C>>>28)+I|0,S+=(C^I^M)+N[12]-421815835|0,S=(S<<11|S>>>21)+C|0,M+=(S^C^I)+N[15]+530742520|0,M=(M<<16|M>>>16)+S|0,I+=(M^S^C)+N[2]-995338651|0,I=(I<<23|I>>>9)+M|0,C+=(M^(I|~S))+N[0]-198630844|0,C=(C<<6|C>>>26)+I|0,S+=(I^(C|~M))+N[7]+1126891415|0,S=(S<<10|S>>>22)+C|0,M+=(C^(S|~I))+N[14]-1416354905|0,M=(M<<15|M>>>17)+S|0,I+=(S^(M|~C))+N[5]-57434055|0,I=(I<<21|I>>>11)+M|0,C+=(M^(I|~S))+N[12]+1700485571|0,C=(C<<6|C>>>26)+I|0,S+=(I^(C|~M))+N[3]-1894986606|0,S=(S<<10|S>>>22)+C|0,M+=(C^(S|~I))+N[10]-1051523|0,M=(M<<15|M>>>17)+S|0,I+=(S^(M|~C))+N[1]-2054922799|0,I=(I<<21|I>>>11)+M|0,C+=(M^(I|~S))+N[8]+1873313359|0,C=(C<<6|C>>>26)+I|0,S+=(I^(C|~M))+N[15]-30611744|0,S=(S<<10|S>>>22)+C|0,M+=(C^(S|~I))+N[6]-1560198380|0,M=(M<<15|M>>>17)+S|0,I+=(S^(M|~C))+N[13]+1309151649|0,I=(I<<21|I>>>11)+M|0,C+=(M^(I|~S))+N[4]-145523070|0,C=(C<<6|C>>>26)+I|0,S+=(I^(C|~M))+N[11]-1120210379|0,S=(S<<10|S>>>22)+C|0,M+=(C^(S|~I))+N[2]+718787259|0,M=(M<<15|M>>>17)+S|0,I+=(S^(M|~C))+N[9]-343485551|0,I=(I<<21|I>>>11)+M|0,L[0]=C+L[0]|0,L[1]=I+L[1]|0,L[2]=M+L[2]|0,L[3]=S+L[3]|0}function o(L){var N=[],C;for(C=0;C<64;C+=4)N[C>>2]=L.charCodeAt(C)+(L.charCodeAt(C+1)<<8)+(L.charCodeAt(C+2)<<16)+(L.charCodeAt(C+3)<<24);return N}function c(L){var N=[],C;for(C=0;C<64;C+=4)N[C>>2]=L[C]+(L[C+1]<<8)+(L[C+2]<<16)+(L[C+3]<<24);return N}function d(L){var N=L.length,C=[1732584193,-271733879,-1732584194,271733878],I,M,S,z,j,O;for(I=64;I<=N;I+=64)s(C,o(L.substring(I-64,I)));for(L=L.substring(I-64),M=L.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],I=0;I<M;I+=1)S[I>>2]|=L.charCodeAt(I)<<(I%4<<3);if(S[I>>2]|=128<<(I%4<<3),I>55)for(s(C,S),I=0;I<16;I+=1)S[I]=0;return z=N*8,z=z.toString(16).match(/(.*?)(.{0,8})$/),j=parseInt(z[2],16),O=parseInt(z[1],16)||0,S[14]=j,S[15]=O,s(C,S),C}function u(L){var N=L.length,C=[1732584193,-271733879,-1732584194,271733878],I,M,S,z,j,O;for(I=64;I<=N;I+=64)s(C,c(L.subarray(I-64,I)));for(L=I-64<N?L.subarray(I-64):new Uint8Array(0),M=L.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],I=0;I<M;I+=1)S[I>>2]|=L[I]<<(I%4<<3);if(S[I>>2]|=128<<(I%4<<3),I>55)for(s(C,S),I=0;I<16;I+=1)S[I]=0;return z=N*8,z=z.toString(16).match(/(.*?)(.{0,8})$/),j=parseInt(z[2],16),O=parseInt(z[1],16)||0,S[14]=j,S[15]=O,s(C,S),C}function f(L){var N="",C;for(C=0;C<4;C+=1)N+=i[L>>C*8+4&15]+i[L>>C*8&15];return N}function m(L){var N;for(N=0;N<L.length;N+=1)L[N]=f(L[N]);return L.join("")}m(d("hello")),typeof ArrayBuffer!="undefined"&&!ArrayBuffer.prototype.slice&&function(){function L(N,C){return N=N|0||0,N<0?Math.max(N+C,0):Math.min(N,C)}ArrayBuffer.prototype.slice=function(N,C){var I=this.byteLength,M=L(N,I),S=I,z,j,O,W;return C!==n&&(S=L(C,I)),M>S?new ArrayBuffer(0):(z=S-M,j=new ArrayBuffer(z),O=new Uint8Array(j),W=new Uint8Array(this,M,z),O.set(W),j)}}();function p(L){return/[\u0080-\uFFFF]/.test(L)&&(L=unescape(encodeURIComponent(L))),L}function y(L,N){var C=L.length,I=new ArrayBuffer(C),M=new Uint8Array(I),S;for(S=0;S<C;S+=1)M[S]=L.charCodeAt(S);return N?M:I}function b(L){return String.fromCharCode.apply(null,new Uint8Array(L))}function v(L,N,C){var I=new Uint8Array(L.byteLength+N.byteLength);return I.set(new Uint8Array(L)),I.set(new Uint8Array(N),L.byteLength),C?I:I.buffer}function k(L){var N=[],C=L.length,I;for(I=0;I<C-1;I+=2)N.push(parseInt(L.substr(I,2),16));return String.fromCharCode.apply(String,N)}function T(){this.reset()}return T.prototype.append=function(L){return this.appendBinary(p(L)),this},T.prototype.appendBinary=function(L){this._buff+=L,this._length+=L.length;var N=this._buff.length,C;for(C=64;C<=N;C+=64)s(this._hash,o(this._buff.substring(C-64,C)));return this._buff=this._buff.substring(C-64),this},T.prototype.end=function(L){var N=this._buff,C=N.length,I,M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S;for(I=0;I<C;I+=1)M[I>>2]|=N.charCodeAt(I)<<(I%4<<3);return this._finish(M,C),S=m(this._hash),L&&(S=k(S)),this.reset(),S},T.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},T.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},T.prototype.setState=function(L){return this._buff=L.buff,this._length=L.length,this._hash=L.hash,this},T.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},T.prototype._finish=function(L,N){var C=N,I,M,S;if(L[C>>2]|=128<<(C%4<<3),C>55)for(s(this._hash,L),C=0;C<16;C+=1)L[C]=0;I=this._length*8,I=I.toString(16).match(/(.*?)(.{0,8})$/),M=parseInt(I[2],16),S=parseInt(I[1],16)||0,L[14]=M,L[15]=S,s(this._hash,L)},T.hash=function(L,N){return T.hashBinary(p(L),N)},T.hashBinary=function(L,N){var C=d(L),I=m(C);return N?k(I):I},T.ArrayBuffer=function(){this.reset()},T.ArrayBuffer.prototype.append=function(L){var N=v(this._buff.buffer,L,!0),C=N.length,I;for(this._length+=L.byteLength,I=64;I<=C;I+=64)s(this._hash,c(N.subarray(I-64,I)));return this._buff=I-64<C?new Uint8Array(N.buffer.slice(I-64)):new Uint8Array(0),this},T.ArrayBuffer.prototype.end=function(L){var N=this._buff,C=N.length,I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M,S;for(M=0;M<C;M+=1)I[M>>2]|=N[M]<<(M%4<<3);return this._finish(I,C),S=m(this._hash),L&&(S=k(S)),this.reset(),S},T.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},T.ArrayBuffer.prototype.getState=function(){var L=T.prototype.getState.call(this);return L.buff=b(L.buff),L},T.ArrayBuffer.prototype.setState=function(L){return L.buff=y(L.buff,!0),T.prototype.setState.call(this,L)},T.ArrayBuffer.prototype.destroy=T.prototype.destroy,T.ArrayBuffer.prototype._finish=T.prototype._finish,T.ArrayBuffer.hash=function(L,N){var C=u(new Uint8Array(L)),I=m(C);return N?k(I):I},T})})(C3);var v3=C3.exports;function Cu(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const L8=e=>{if(typeof XMLHttpRequest=="undefined")throw new Error("XMLHttpRequest is undefined");const t=new XMLHttpRequest,{action:n}=e;t.upload&&t.upload.addEventListener("progress",o=>{const c=o;c.percent=o.total>0?o.loaded/o.total*100:0,e.onProgress(c)});const i=new FormData;if(e.data){let o=e.data;Array.isArray(o)||(o=[o]),o.forEach(c=>{for(const[d,u]of Object.entries(c))Array.isArray(u)?i.append(d,...u):i.append(d,u)})}if(e.formDataAttributes){let o=e.formDataAttributes;Array.isArray(o)||(o=[o]),o.forEach(c=>{Array.isArray(c.value)?i.append(c.name,...c.value):i.append(c.name,c.value)})}if(i.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(new Error("An error occurred during upload"))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(Cu(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(o=>{const c=o.name,d=o.value;t.setRequestHeader(c,d)});else{const o=e.header.name,c=e.header.value;t.setRequestHeader(o,c)}const s=e.headers||{};if(s instanceof Headers)s.forEach((o,c)=>t.setRequestHeader(c,o));else for(const[o,c]of Object.entries(s))Pf(c)||t.setRequestHeader(o,String(c));return t.send(i),t},w3=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,k8=async e=>{const t=e.chunkSize*1024*1024,{file:n}=e;if(!n)throw new Error("File not found");const i=Math.ceil(n.size/t),s=await S8(n,t),o=[];T8(e,n,i,s,o,t),await Promise.all(o).then(()=>{const c={size:n.size,name:n.name,total:i,hash:s},d=new XMLHttpRequest;d.open(e.method,e.mergeUrl,!0),d.onreadystatechange=()=>{if(d.readyState===4){if(d.status<200||d.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(Cu(d))}},d.onloadend=()=>{e.onComplete()},d.setRequestHeader("Content-type","application/JSON"),d.send(JSON.stringify(c))})},T8=(e,t,n,i,s,o)=>{for(let c=0;c<n;c++){const d=new Promise((u,f)=>{const m=c*o,p=Math.min(t.size,m+o),y=new FormData;if(e.data){let k=e.data;Array.isArray(k)||(k=[k]),k.forEach(T=>{for(const[L,N]of Object.entries(T))Array.isArray(N)?y.append(L,...N):y.append(L,N)})}if(e.formDataAttributes){let k=e.formDataAttributes;Array.isArray(k)||(k=[k]),k.forEach(T=>{Array.isArray(T.value)?y.append(T.name,...T.value):y.append(T.name,T.value)})}y.append("file",w3.call(t,m,p)),y.append("name",t.name),y.append("total",n.toString()),y.append("index",c.toString()),y.append("size",t.size.toString()),y.append("hash",i.toString());const b=new XMLHttpRequest;if(b.onreadystatechange=()=>{if(b.readyState===4){const k=Cu(b);b.status<200||b.status>=300?(f(k),e.onError(new Error("An error occurred during upload"))):u("reponseText")}},b.upload.addEventListener("progress",k=>{const T=k;e.onProgress(T,c)},!1),e.withCredentials&&"withCredentials"in b&&(b.withCredentials=!0),b.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(k=>{const T=k.name,L=k.value;b.setRequestHeader(T,L)});else{const k=e.header.name,T=e.header.value;b.setRequestHeader(k,T)}const v=e.headers||{};if(v instanceof Headers)v.forEach((k,T)=>b.setRequestHeader(T,k));else for(const[k,T]of Object.entries(v))Pf(T)||b.setRequestHeader(k,String(T));b.send(y)});s.push(d)}},S8=(e,t)=>new Promise((n,i)=>{const s=Math.ceil(e.size/t);let o=0;const c=new v3.ArrayBuffer,d=new FileReader;function u(){const f=o*t,m=f+t>=e.size?e.size:f+t;d.readAsArrayBuffer(w3.call(e,f,m))}d.onload=f=>{if(c.append(f.target.result),o+=1,o<s)u();else{const m=c.end(),p=new v3;p.append(m),p.append(e.name);const y=p.end();n(y)}},d.onerror=()=>{i(new Error("File slcie failed"))},u()}).catch(n=>{console.log(n)});function M3(e){return Date.now()+e}var x8=(e,t)=>{const n=a.computed(()=>{var y;return typeof e.size=="number"?e.size:(y=e==null?void 0:e.size)==null?void 0:y.maxImgSize}),i=a.computed(()=>{var y;return typeof e.size=="number"?e.size:(y=e==null?void 0:e.size)==null?void 0:y.maxImgSize}),s=a.ref([]);function o(y){return s.value.find(b=>b.uid===y.uid)}let c=0;function d(y){var T;c+=1,y.uid=M3(c);const b={uid:y.uid,name:y.name,status:$a.NEW,size:y.size,raw:y},v=y.type.startsWith("image/");let k=null;if(v){try{b.url=window.URL.createObjectURL(y)}catch(L){console.error(L)}b.isPic=!0}return e.validateName&&!((T=e.validateName)!=null&&T.test(b.name))&&(b.status=$a.FAIL,b.statusText="invalid filename",k=new Error(b.statusText)),v&&y.size>n.value*1024**2&&(b.status=$a.FAIL,b.statusText="invalid file size",k=new Error(b.statusText)),!v&&y.size>i.value*1024**2&&(b.status=$a.FAIL,b.statusText="invalid file size",k=new Error(b.statusText)),s.value.push(b),k}async function u(y){var k;const b=y instanceof File?o(y):y,v=T=>{var L;t.onRemove(T,s.value),s.value.splice(s.value.indexOf(b),1),(L=T.url)!=null&&L.startsWith("blob:")&&URL.revokeObjectURL(T.url)};e.beforeRemove?await((k=e.beforeRemove)==null?void 0:k.call(e,b,s.value))!==!1&&v(b):v(b)}async function f(y,b,v){const k=o(b);!k||(k.status="fail",k.statusText=y.message,k.response=v)}async function m(y,b){const v=o(b);!v||(v.status="success",v.response=y)}async function p(y,b){const v=o(b);!v||(v.status="uploading",v.percentage=Math.round(y.percent))}return a.watch(()=>e.files,y=>{s.value=y.map(b=>{var v,k;return c+=1,Se(Z({},b),{uid:(v=b.uid)!=null?v:M3(c),status:(k=b.status)!=null?k:$a.SUCCESS})})},{immediate:!0,deep:!0}),{fileList:s,handlePreprocess:d,handleRemove:u,handleError:f,handleSuccess:m,handleProgress:p}},D8=a.defineComponent({name:"Upload",props:hi,emits:["exceed","progress","success","error","delete","done"],setup(e,{slots:t,emit:n,expose:i}){const s=a.shallowRef({}),o=a.computed(()=>e.theme===fi.PICTURE),c=a.computed(()=>o.value&&!e.multiple),d=a.computed(()=>{var M;return ze({[fa]:!0,[`${fa}--${e.theme}`]:!0,[`${fa}--disabled`]:e.disabled,[`${fa}--single-picture`]:c.value,[e.extCls]:(M=e.extCls)!=null?M:!1})}),u={theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept};function f(M,S){I(M),n("delete",M,S)}const{fileList:m,handlePreprocess:p,handleRemove:y,handleProgress:b,handleSuccess:v,handleError:k}=x8(e,{onRemove:f});function T(M){if(!M.length)return;if(e.limit&&m.value.length+M.length>e.limit){n("exceed",M,m.value);return}let S=M;(!e.multiple||e.limit===1)&&(S=M.slice(0,1));for(const z of S){const j=z,O=p(j);if(O){n("error",j,m.value,O);return}e.autoUpload&&N(j,S)}}function L(M){C(M.raw)}async function N(M,S){var j;if(!e.beforeUpload)return C(M,S);let z;try{z=await((j=e.beforeUpload)==null?void 0:j.call(e,M))}catch{z=!1}if(z===!1){y(M);return}C(M,S)}function C(M,S){const{headers:z,header:j,data:O,formDataAttributes:W,method:P,withCredentials:G,name:B,url:ie,sliceUrl:le,mergeUrl:ve,chunkSize:Ie,customRequest:ge}=e,{uid:he}=M,K={headers:z,header:j,withCredentials:G,file:M,data:O,formDataAttributes:W,method:P,filename:B,action:ie,sliceUrl:le,mergeUrl:ve,chunkSize:Ie,onProgress:J=>{b(J,M),n("progress",J,M,m.value)},onSuccess:J=>{var U;const re=J;if((U=e==null?void 0:e.handleResCode)!=null&&U.call(e,re))v(J,M),n("success",J,M,m.value);else{const q=new Error((re==null?void 0:re.message)||"unknow error");k(q,M,J),n("error",M,m.value,q)}delete s.value[he]},onError:J=>{k(J,M),n("error",M,m.value,J),delete s.value[he]},onComplete:()=>{S&&S.indexOf(M)===S.length-1&&n("done",m.value)}};let $=e.sliceUpload?k8:L8;ge&&($=ge);const V=$(K);s.value[he]=V,V instanceof Promise&&V.then(K.onSuccess,K.onError)}function I(M){let S=s.value;M&&(S={[M.uid]:s.value[M.uid]}),Object.keys(S).forEach(z=>{if(S[z]instanceof XMLHttpRequest){const j=S[z];j==null||j.abort()}delete s.value[z]})}return a.onBeforeUnmount(()=>{m.value.forEach(({url:M})=>{M!=null&&M.startsWith("blob:")&&URL.revokeObjectURL(M)})}),i({handleRemove:y,handleRetry:L}),()=>a.createVNode("div",{class:d.value},[!o.value&&a.createVNode(y3,a.mergeProps(u,{onChange:T}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${fa}__tip`},[e.tip]),a.createVNode(N8,{files:m.value,theme:e.theme,disabled:e.disabled,multiple:e.multiple,onRemove:y,onRetry:L},{innerTrigger:M=>o.value&&a.createVNode(y3,a.mergeProps(u,{file:M,onChange:T,onRemove:y}),t),file:t.file})])}});const I3=Ge(D8);function Wi(){}Wi.prototype={diff:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=i.callback;typeof i=="function"&&(s=i,i={}),this.options=i;var o=this;function c(k){return s?(setTimeout(function(){s(void 0,k)},0),!0):k}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var d=n.length,u=t.length,f=1,m=d+u,p=[{newPos:-1,components:[]}],y=this.extractCommon(p[0],n,t,0);if(p[0].newPos+1>=d&&y+1>=u)return c([{value:this.join(n),count:n.length}]);function b(){for(var k=-1*f;k<=f;k+=2){var T=void 0,L=p[k-1],N=p[k+1],C=(N?N.newPos:0)-k;L&&(p[k-1]=void 0);var I=L&&L.newPos+1<d,M=N&&0<=C&&C<u;if(!I&&!M){p[k]=void 0;continue}if(!I||M&&L.newPos<N.newPos?(T=z8(N),o.pushComponent(T.components,void 0,!0)):(T=L,T.newPos++,o.pushComponent(T.components,!0,void 0)),C=o.extractCommon(T,n,t,k),T.newPos+1>=d&&C+1>=u)return c(j8(o,T.components,n,t,o.useLongestToken));p[k]=T}f++}if(s)(function k(){setTimeout(function(){if(f>m)return s();b()||k()},0)})();else for(;f<=m;){var v=b();if(v)return v}},pushComponent:function(t,n,i){var s=t[t.length-1];s&&s.added===n&&s.removed===i?t[t.length-1]={count:s.count+1,added:n,removed:i}:t.push({count:1,added:n,removed:i})},extractCommon:function(t,n,i,s){for(var o=n.length,c=i.length,d=t.newPos,u=d-s,f=0;d+1<o&&u+1<c&&this.equals(n[d+1],i[u+1]);)d++,u++,f++;return f&&t.components.push({count:f}),t.newPos=d,u},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],i=0;i<t.length;i++)t[i]&&n.push(t[i]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function j8(e,t,n,i,s){for(var o=0,c=t.length,d=0,u=0;o<c;o++){var f=t[o];if(f.removed){if(f.value=e.join(i.slice(u,u+f.count)),u+=f.count,o&&t[o-1].added){var p=t[o-1];t[o-1]=t[o],t[o]=p}}else{if(!f.added&&s){var m=n.slice(d,d+f.count);m=m.map(function(b,v){var k=i[u+v];return k.length>b.length?k:b}),f.value=e.join(m)}else f.value=e.join(n.slice(d,d+f.count));d+=f.count,f.added||(u+=f.count)}}var y=t[c-1];return c>1&&typeof y.value=="string"&&(y.added||y.removed)&&e.equals("",y.value)&&(t[c-2].value+=y.value,t.pop()),t}function z8(e){return{newPos:e.newPos,components:e.components.slice(0)}}var N3=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,L3=/\S/,k3=new Wi;k3.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!L3.test(e)&&!L3.test(t)},k3.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]&&N3.test(t[n])&&N3.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var vu=new Wi;vu.tokenize=function(e){var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var i=0;i<n.length;i++){var s=n[i];i%2&&!this.options.newlineIsToken?t[t.length-1]+=s:(this.options.ignoreWhitespace&&(s=s.trim()),t.push(s))}return t};function O8(e,t,n){return vu.diff(e,t,n)}var A8=new Wi;A8.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var P8=new Wi;P8.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Sl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Sl=function(t){return typeof t}:Sl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sl(e)}function wu(e){return E8(e)||V8(e)||J8(e)||R8()}function E8(e){if(Array.isArray(e))return Mu(e)}function V8(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function J8(e,t){if(!!e){if(typeof e=="string")return Mu(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 Mu(e,t)}}function Mu(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function R8(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
64
64
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Q8=Object.prototype.toString,Ur=new Wi;Ur.useLongestToken=!0,Ur.tokenize=vu.tokenize,Ur.castInput=function(e){var t=this.options,n=t.undefinedReplacement,i=t.stringifyReplacer,s=i===void 0?function(o,c){return typeof c=="undefined"?n:c}:i;return typeof e=="string"?e:JSON.stringify(Iu(e,null,null,s),s," ")},Ur.equals=function(e,t){return Wi.prototype.equals.call(Ur,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Iu(e,t,n,i,s){t=t||[],n=n||[],i&&(e=i(s,e));var o;for(o=0;o<t.length;o+=1)if(t[o]===e)return n[o];var c;if(Q8.call(e)==="[object Array]"){for(t.push(e),c=new Array(e.length),n.push(c),o=0;o<e.length;o+=1)c[o]=Iu(e[o],t,n,i,s);return t.pop(),n.pop(),c}if(e&&e.toJSON&&(e=e.toJSON()),Sl(e)==="object"&&e!==null){t.push(e),c={},n.push(c);var d=[],u;for(u in e)e.hasOwnProperty(u)&&d.push(u);for(d.sort(),o=0;o<d.length;o+=1)u=d[o],c[u]=Iu(e[u],t,n,i,u);t.pop(),n.pop()}else c=e;return c}var Nu=new Wi;Nu.tokenize=function(e){return e.slice()},Nu.join=Nu.removeEmpty=function(e){return e};function _8(e,t,n,i,s,o,c){c||(c={}),typeof c.context=="undefined"&&(c.context=4);var d=O8(n,i,c);d.push({value:"",lines:[]});function u(L){return L.map(function(N){return" "+N})}for(var f=[],m=0,p=0,y=[],b=1,v=1,k=function(N){var C=d[N],I=C.lines||C.value.replace(/\n$/,"").split(`
|
65
65
|
`);if(C.lines=I,C.added||C.removed){var M;if(!m){var S=d[N-1];m=b,p=v,S&&(y=c.context>0?u(S.lines.slice(-c.context)):[],m-=y.length,p-=y.length)}(M=y).push.apply(M,wu(I.map(function(ie){return(C.added?"+":"-")+ie}))),C.added?v+=I.length:b+=I.length}else{if(m)if(I.length<=c.context*2&&N<d.length-2){var z;(z=y).push.apply(z,wu(u(I)))}else{var j,O=Math.min(I.length,c.context);(j=y).push.apply(j,wu(u(I.slice(0,O))));var W={oldStart:m,oldLines:b-m+O,newStart:p,newLines:v-p+O,lines:y};if(N>=d.length-2&&I.length<=c.context){var P=/\n$/.test(n),G=/\n$/.test(i),B=I.length==0&&y.length>W.oldLines;!P&&B&&n.length>0&&y.splice(W.oldLines,0,"\"),(!P&&!B||!G)&&y.push("\")}f.push(W),m=0,p=0,y=[]}b+=I.length,v+=I.length}},T=0;T<d.length;T++)k(T);return{oldFileName:e,newFileName:t,oldHeader:s,newHeader:o,hunks:f}}function W8(e){var t=[];e.oldFileName==e.newFileName&&t.push("Index: "+e.oldFileName),t.push("==================================================================="),t.push("--- "+e.oldFileName+(typeof e.oldHeader=="undefined"?"":" "+e.oldHeader)),t.push("+++ "+e.newFileName+(typeof e.newHeader=="undefined"?"":" "+e.newHeader));for(var n=0;n<e.hunks.length;n++){var i=e.hunks[n];i.oldLines===0&&(i.oldStart-=1),i.newLines===0&&(i.newStart-=1),t.push("@@ -"+i.oldStart+","+i.oldLines+" +"+i.newStart+","+i.newLines+" @@"),t.push.apply(t,i.lines)}return t.join(`
|
66
66
|
`)+`
|