bkui-vue 0.0.1-beta.205 → 0.0.1-beta.206

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -54,7 +54,7 @@ ${Is(n)}`),i}})}function v4(e){const t=Object.keys(e),n=t.filter(s=>{var o;retur
54
54
  m 0 ${x?"":"-"}${T}
55
55
  a ${T} ${T} 0 1 1 0 ${x?"-":""}${T*2}
56
56
  a ${T} ${T} 0 1 1 0 ${x?"":"-"}${T*2}
57
- `,O={d:E,stroke:m||"#f5f5f5","stroke-linecap":f,"stroke-width":C,"fill-opacity":"0",class:"process-circle-trail",style:L},A={d:E,stroke:c||"#13ce66","stroke-linecap":f,"stroke-width":s>0&&C||0,"fill-opacity":"0",class:`process-circle-path bk-${d}-circle-trail`,style:N};return a.createVNode("div",{class:"progress-outer-circle",style:M},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",O,null),a.createVNode("path",A,null)]),a.createVNode("span",{class:"progress-circle-text",style:p},[n==null?void 0:n.default()])])},pp=(e,{attrs:t,slots:n})=>{const{percent:i,strokeWidth:s,size:o,color:c,titleStyle:f,showText:d,textInside:u,theme:m}=t,p={height:`${s}px`,lineHeight:`${s}px`},C={width:`${i}%`,background:c,animationDuration:"3s"},y=(M=!0)=>(d||n.default)&&(M&&u||!M&&!u)?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:C,class:{"progress-inner":!0,[`bk-${m}`]:!0}},[a.createVNode("div",{class:"inner-text",style:f},[y()])])]),y(!1)])};function E0(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var yp=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("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 f;const{showText:e,format:t,percent:n,textInside:i,titleStyle:s,fixed:o}=this.$props,c=t((f=this.validPercent(n))==null?void 0:f.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=Te(U({},this.$props),{percent:this.validPercent(this.percent)});let n=a.createVNode(pp,t,E0(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(mp,t,E0(e)?e:{default:()=>[e]}));const i={class:De({extCls:!!this.extCls},`bk-progress bk-progress-${this.type}`)};return a.createVNode("div",i,[n])}});const Dr=He(yp),P0=Symbol("RadioGroup");function A0(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const V0=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,i=a.inject(P0,Ao),s=!zf(i),o=a.ref(!1),c=a.computed(()=>s&&i.props.disabled?!0:t.disabled);s?a.watch(()=>i.props.modelValue,u=>{o.value=u===t.label},{immediate:!0}):a.watch(()=>t.modelValue,u=>{u!==""&&(o.value=u===t.label)},{immediate:!0});const f=(u=!0)=>{o.value=u},d=u=>{if(c.value)return;const m=u.target;o.value=m.checked;const p=o.value?t.label:"";n("change",p),n("update:modelValue",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:f,handleChange:d}},bp={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 Cp=a.defineComponent({name:"Radio",props:bp,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=A0(),{isChecked:i,isDisabled:s,setChecked:o,handleChange:c}=V0();return{isFocused:e,isChecked:i,isDisabled:s,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=De({"bk-radio":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked});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),a.createVNode("span",{class:"bk-radio-text"},[this.$slots.default?this.$slots.default():this.label])])}});const vp={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 wp=a.defineComponent({name:"RadioButton",props:vp,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=A0(),{isChecked:i,isDisabled:s,setChecked:o,handleChange:c}=V0();return{isFocused:e,isChecked:i,isDisabled:s,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=De({"bk-radio-button":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked});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),a.createVNode("div",{class:"bk-radio-button-text"},[this.$slots.default?this.$slots.default():this.label])])}});const Mp={name:g.string.def(""),modelValue:g.oneOfType([String,Number,Boolean]),disabled:g.bool,withValidate:g.bool.def(!0)};var Ip=a.defineComponent({name:"RadioGroup",props:Mp,emits:["change","update:modelValue"],setup(e,t){const n=Jn(),i=[],s=f=>{i.push(f)},o=f=>{const d=i.indexOf(f);d>-1&&i.splice(d,1)},c=f=>{const d=f.label;i.forEach(u=>{u!==f&&u.setChecked(!1)}),t.emit("update:modelValue",d),t.emit("change",d)};return a.provide(P0,{props:e,register:s,unregister:o,handleChange:c}),a.watch(()=>e.modelValue,()=>{var f;e.withValidate&&((f=n==null?void 0:n.validate)==null||f.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&i.forEach(f=>{f.setChecked(f.label===e.modelValue)})}),{}},render(){var e;return a.createVNode("div",{class:"bk-radio-group"},[(e=this.$slots)==null?void 0:e.default()])}});const J0=Ft(Cp,{Group:Ip,Button:wp});var $s=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=f=>{if(!e.editable)return;const d=f+1;t("chooseRate",d)},i=f=>{if(!e.editable)return;const d=f+1;t("changeHover",d)},s=f=>De({"bk-is-select":f<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((f,d)=>a.createVNode("svg",{class:s(d),style:c,x:"0px",y:"0px",viewBox:"0 0 64 64",onClick:()=>n(d),onMouseenter:()=>i(d)},[a.createVNode("g",{transform:"translate(-143.000000, -635.000000)"},[a.createVNode("g",{transform:"translate(83.000000, 114.000000)"},[a.createVNode("g",{transform:"translate(15.000000, 384.000000)"},[a.createVNode("g",{transform:"translate(29.000000, 137.000000)"},[a.createVNode("polygon",{class:"st1",points:"48,53 28.2,63.9 32,40.8 16,24.4 38.1,21 48,-0.1 57.8,21 79.9,24.4 63.9,40.8 67.7,63.9"},null)])])])])]))])}}),Np=a.defineComponent({name:"Rate",components:{star:$s},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=Jn(),i=a.ref(0),s=p=>{!e.editable||(t("update:modelValue",p),t("change",p))},o=p=>{i.value=p},c=De({"bk-rate":!0}),d={small:{width:12,height:12},large:{width:18,height:18}}[e.size]||{width:15,height:16},u=a.computed(()=>{const p=Math.floor(e.modelValue),C=(d.width+3)*p,y=d.width*(e.modelValue-p);return{width:`${C+y}px`}}),m={width:d.width,height:d.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($s,a.mergeProps({rate:e.modelValue,"hover-rate":i.value,onChooseRate:s,onChangeHover:o,onMouseleave:()=>o(0)},m),null):[a.createVNode($s,a.mergeProps({rate:5,style:u.value,class:"bk-score-real",editable:!1},m),null),a.createVNode($s,a.mergeProps({rate:0,editable:!1},m),null)]])}});const Q0=He(Np);var Lp=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:f,width:d}=a.toRefs(e),u=a.ref(),m=a.ref(0),p=a.ref(0),C=a.ref(0),y=a.ref(0);let M;const T=a.computed(()=>{var _;return((_=c.value)==null?void 0:_.length)>0?c.value:o.value}),x=a.computed(()=>({width:`${p.value*T.value.length}px`,transform:`translateX(-${p.value*m.value}px)`})),k=a.computed(()=>({width:`${p.value}px`,height:`${C.value}px`})),v=_=>{let le=_;_>=T.value.length&&(le=0),_<0&&(le=T.value.length-1),m.value=le,t("index-change",le)},b=_=>{!_||window.open(_,"_blank")},I=_=>["bk-swiper-img",{"bk-swiper-link":_.link},_.class],L=_=>({"background-image":`url(${_.url})`,"background-color":_.color}),N=_=>({"bk-current-index":m.value===_}),E=()=>{i.value&&(y.value=window.setTimeout(()=>{v(m.value+1),E()},s.value))},O=()=>{window.clearTimeout(y.value)},A=()=>{var le;const _=(le=u.value)==null?void 0:le.parentElement;!_||!window.ResizeObserver||(M=new ResizeObserver(()=>{$()}),M.observe(_))},R=()=>{var _;(_=M.disconnect)==null||_.call(M)},J=_=>{if(_===void 0)return{height:0,width:0};const le=getComputedStyle(_),se=_.clientWidth-parseFloat(le.paddingTop)-parseFloat(le.paddingBottom);return{height:_.clientHeight-parseFloat(le.paddingLeft)-parseFloat(le.paddingRight),width:se}},$=()=>{var le;const _=J((le=u.value)==null?void 0:le.parentElement);p.value=+d.value>0?d.value:_.width,C.value=+f.value>0?f.value:_.height};return a.watch([f,d],$),a.onMounted(()=>{$(),E(),A()}),a.onBeforeUnmount(()=>{O(),R()}),()=>a.createVNode("section",{class:"bk-swiper-home",ref:u,style:k.value},[a.createVNode("hgroup",{style:x.value,class:"bk-transition bk-swiper-main"},[T.value.map(_=>{var le,se;return a.createVNode("h3",{class:"bk-swiper-card",style:k.value},[(se=(le=n.default)==null?void 0:le.call(n,_))!=null?se:a.createVNode("span",{class:I(_),style:L(_),onClick:()=>b(_.link)},null)])})]),a.createVNode("ul",{class:"bk-swiper-index"},[T.value.map((_,le)=>a.createVNode("li",{class:N(le),onMouseover:()=>v(le)},null))]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-prev",onClick:()=>v(m.value-1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-next",onClick:()=>v(m.value+1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)])])}});const R0=He(Lp),Ks=Symbol("BkSelect"),_0=Symbol("BkOptionGroup");function W0(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function Dc(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 kp(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 Tp(e,t){const{popoverMinWidth:n}=e;let i=null;const s=a.ref("auto"),o=a.ref(!1),c=()=>{o.value=!o.value},f=()=>{o.value=!1},d=()=>{o.value=!0},u=()=>{var m;s.value=Math.max((m=t.value)==null?void 0:m.offsetWidth,n)};return a.onMounted(()=>{!t.value||(i=t4(t.value,u,60,!0),i.start())}),a.onBeforeUnmount(()=>{i==null||i.stop(),i=null}),{isPopoverShow:o,popperWidth:s,togglePopover:c,hidePopover:f,showPopover:d}}function xp(e,t){const n=kp(""),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 jr(e=""){return e&&String(e).trim().toLowerCase()}var Xs=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(Ks,null),c=a.inject(_0,null),f=a.computed(()=>{var y;return(y=o==null?void 0:o.selected)==null?void 0:y.some(M=>M.value===s.value)}),d=a.computed(()=>o==null?void 0:o.multiple),u=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)},C=()=>{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)}),Te(U({},a.toRefs(n)),{selected:f,multiple:d,isHover:u,showSelectedIcon:m,handleOptionClick:p,handleMouseEnter:C})},render(){var t,n,i;const e=De({"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(Ui,{class:"bk-select-selected-icon",width:22,height:22},null)]),[[a.vShow,this.visible]])}}),Sp=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(Ks,null),o=a.reactive({groupCollapse:e.collapse,visible:!0}),c=a.ref(new Map),{register:f,unregister:d}=Dc(c),u=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(_0,a.reactive(Te(U({},a.toRefs(e)),{register:f,unregister:d,groupCollapse:a.toRef(o,"groupCollapse")}))),a.onBeforeMount(()=>{s==null||s.registerGroup(n.uid,i)}),a.onBeforeUnmount(()=>{s==null||s.unregisterGroup(n.uid)}),Te(U({},a.toRefs(o)),{groupLabel:u,handleToggleCollapse:m})},render(){var i,s;const e=De({"bk-option-group":!0,collapsible:this.collapsible,disabled:this.disabled}),t=De({"bk-option-group-label":!0,collapsible:this.collapsible}),n=De({"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(ks,{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 Dp={onContentScroll:Function},jp=U({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(Ye("F-scroll-x")),scrollYName:g.string.def(Ye("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)},Dp);var zp=(e,t)=>{const{renderAs:n,contentAs:i}=e,s=(f,d,u,m,p,C,y)=>{t.emit("content-scroll",[f,{translateY:p,translateX:C,pos:y}])},o=a.resolveDirective("bkVirtualRender"),c={lineHeight:e.lineHeight,handleScrollCallback:s,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent};return{rendAsTag:()=>{var f,d,u,m,p,C,y,M,T,x,k,v;return a.h(n,{class:e.className},[(u=(d=(f=t.slots).beforeContent)==null?void 0:d.call(f))!=null?u:"",a.withDirectives(a.h(i,{class:e.contentClassName,style:e.contentStyle},[(C=(p=(m=t.slots).default)==null?void 0:p.call(m,{data:e.list}))!=null?C:""]),[[o,c]]),(T=(M=(y=t.slots).afterContent)==null?void 0:M.call(y))!=null?T:"",(v=(k=(x=t.slots).afterSection)==null?void 0:k.call(x))!=null?v:""])}}};function H0(e,t,n,i){let s=0,o=0,c=0,f=0;for(;s<e;s++){if(f=i(s,[s*n,(s+1)*n,"virtual"]),o+f>t){c=t-o;break}o+=f}return{startIndex:s,height:o,diffHeight:c}}function B0(e,t,n,i,s){if(!i)return;const o=i.scrollTop,c=i.scrollLeft,{scrollTop:f,count:d,groupItemCount:u,startIndex:m,endIndex:p}=n,{offsetHeight:C}=i;let y=0,M=0,T=0;if(typeof e=="number"&&(y=Math.floor(o/e),M=Math.ceil(C/e)+y,T=o%e),typeof e=="function"){const x=H0(d,o,u,e);y=x.startIndex>0?x.startIndex:0,T=x.diffHeight,M=H0(d,C,u,e).startIndex+y+1}if(o!==f||y!==m||M!==p){const x=i.scrollHeight-i.offsetHeight-i.scrollTop;typeof t=="function"&&t(s,y,M,o,T,c,{bottom:x>=0?x:0})}}function Op(e,t,n){const{lineHeight:i=30,handleScrollCallback:s,pagination:o={},onlyScroll:c}=n.value;if(c){const C=t.scrollTop,y=t.scrollLeft,M=t.scrollHeight-t.offsetHeight-t.scrollTop;s(e,null,null,C,C,y,{bottom:M>=0?M:0});return}const{startIndex:f,endIndex:d,groupItemCount:u,count:m,scrollTop:p}=o;B0(i,s,{scrollTop:p,startIndex:f,endIndex:d,groupItemCount:u,count:m},t,e)}const F0=(e=60)=>dt.exports.throttle((t,n,i)=>Op(t,n,i),e),Ep=(e,t,n,i=60)=>{Reflect.apply(F0(i),globalThis,[e,t,n])};var Pp={mounted(e,t){const n=e.parentNode,{throttleDelay:i}=t.value;n.addEventListener("scroll",s=>{Ep(s,n,t,i)})},unbind(e){if(e){const t=e.parentNode;if(!t)return;t.removeEventListener("scroll",F0)}}},Ap=a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:Pp},props:jp,emits:["content-scroll"],setup(e,t){const{renderAs:n,contentAs:i}=e,s=E=>typeof E=="string"?[E]:typeof E=="object"&&!Array.isArray(E)?[E]:E;if(!e.enabled){const{rendAsTag:E}=zp(e,t);return E}const o=a.ref(null),c=a.reactive({startIndex:0,endIndex:0,scrollTop:1,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),f=(E,O,A,R,J,$,_)=>{c.startIndex=O,c.endIndex=A,c.scrollTop=R,c.translateY=J,c.translateX=$,c.pos=_,t.emit("content-scroll",[E,c])};a.onMounted(()=>{a.nextTick(()=>{p(e.list),C()})}),a.watch(()=>e.list,()=>{d(),C()},{deep:!0}),a.watch(()=>e.lineHeight,()=>{d(),C()});const d=()=>{p(e.list)},u=a.ref(0),m=a.ref(0),p=E=>{if(u.value=Math.ceil((E||[]).length/e.groupItemCount),c.count=u.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 A=0;for(let R=0;R<u.value;R++){const J=e.lineHeight.call(this,R,E.slice(R*e.groupItemCount,e.groupItemCount));A+=typeof J=="number"?J:0}m.value=A}else m.value=e.lineHeight*u.value;else m.value=e.abosuteHeight},C=(E=!0)=>{var A;const O=(A=o.value)==null?void 0:A.parentNode;B0(e.lineHeight,f,c,O,null),E&&o.value&&o.value.scrollTo(0,0)},y=a.computed(()=>(e.list||[]).map((E,O)=>Te(U({},E),{$index:O}))),M=a.computed(()=>y.value.slice(c.startIndex*e.groupItemCount,(c.endIndex+e.preloadItemCount)*e.groupItemCount)),T=a.computed(()=>e.scrollPosition==="content"?{top:`${c.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${c.translateY}px)`}:{}),x=a.computed(()=>U({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"?T.value:{})),k=a.computed(()=>{const E=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${m.value<e.minHeight?e.minHeight:m.value}px`,display:E?"none":"block"}}),v=a.computed(()=>[Ye("virtual-render"),e.scrollXName,e.scrollYName,...s(e.className),e.scrollPosition==="container"?Ye("virtual-content"):""]),b=a.computed(()=>[e.scrollPosition==="content"?Ye("virtual-content"):"",...s(e.contentClassName)]),I=a.resolveDirective("bkVirtualRender"),L={lineHeight:e.lineHeight,handleScrollCallback:f,pagination:c,throttleDelay:e.throttleDelay},N=()=>{d(),C()};return t.expose({reset:N}),()=>{var E,O,A,R,J,$,_,le,se,ne,fe,ee;return a.h(n||"div",{ref:o,class:v.value,style:x.value},[(A=(O=(E=t.slots).beforeContent)==null?void 0:O.call(E))!=null?A:"",a.withDirectives(a.h(i||"div",{class:b.value,style:U(U({},T.value),e.contentStyle)},[($=(J=(R=t.slots).default)==null?void 0:J.call(R,{data:M.value}))!=null?$:""]),[[I,L]]),(se=(le=(_=t.slots).afterContent)==null?void 0:le.call(_))!=null?se:"",a.h("div",{class:[Ye("virtual-section")],style:k.value}),(ee=(fe=(ne=t.slots).afterSection)==null?void 0:fe.call(ne))!=null?ee:""])}}});const zr=He(Ap);var Vp=a.defineComponent({name:"Tag",props:{theme:g.theme(["success","info","warning","danger"]).def(""),closable:g.bool.def(!1),type:g.commonType(["","filled","stroke"]).def(""),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(()=>De({"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(Qn,{class:"bk-tag-close",onClick:this.handleClose},null):""])}});const qs=He(Vp);var Jp=a.defineComponent({name:"SelectTagInput",props:{selected:{type:Array,default:()=>[]},tagTheme:g.theme(["success","info","warning","danger"]).def(""),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(Ks,null),{modelValue:s,collapseTags:o,selected:c}=a.toRefs(e),f=a.ref(s.value),d=a.ref(),u=a.ref(null);a.watch(s,()=>{f.value=s.value}),a.watch([c,o],()=>{T()},{flush:"post"});const m=x=>{t("remove",x)},p=()=>{var x;(x=d.value)==null||x.focus()},C=x=>{t("update:modelValue",x.target.value)},y=x=>{switch(x.code){case"Enter":{t("enter",x.target.value,x);break}}},M=x=>{const k=[...n.$el.querySelectorAll(".bk-tag")];return typeof x=="number"?k[x]:k},T=()=>{!o.value||(u.value=null,setTimeout(()=>{const x=M(),k=x.findIndex((v,b)=>b?x[b-1].offsetTop!==v.offsetTop:!1);u.value=k>0?k:null}))};return{select:i,overflowTagIndex:u,value:f,inputRef:d,handleRemoveTag:m,focus:p,handleInput:C,handleKeydown:y}},render(){var i,s,o,c,f,d,u;const e=De({"bk-select-tag":!0,"bk-select-tag--default":!0,"is-disabled":this.disabled,"collapse-tag":this.collapseTags}),t=De({"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},[(f=(c=(o=this.$slots).default)==null?void 0:c.call(o))!=null?f:this.selected.map((m,p)=>a.createVNode(qs,{closable:!0,theme:this.tagTheme,style:{display:this.collapseTags&&this.overflowTagIndex&&p>=this.overflowTagIndex?"none":""},onClose:()=>this.handleRemoveTag(m.value)},{default:()=>{var C;return[(C=this.select)==null?void 0:C.handleGetLabelByValue(m.value)]}})),!!this.overflowTagIndex&&this.collapseTags&&a.createVNode(qs,{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),(u=(d=this.$slots)==null?void 0:d.suffix)==null?void 0:u.call(d)])}}),Qp=a.defineComponent({name:"Select",directives:{clickoutside:kn},props:{modelValue:g.any,multiple:g.bool.def(!1),disabled:g.bool.def(!1),size:g.size().def("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:g.theme(["success","info","warning","danger"]).def(""),behavior:g.oneOf(["normal","simplicity"]).def("normal"),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([])},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:f,loadingText:d,noDataText:u,noMatchText:m,popoverMinWidth:p,showOnInit:C,multipleMode:y,allowCreate:M,customContent:T,showSelectedIcon:x,inputSearch:k,enableVirtualRender:v,showSelectAll:b,scrollHeight:I,list:L,displayKey:N,collapseTags:E,autoHeight:O,popoverOptions:A,allowEmptyValues:R}=a.toRefs(e),J=Jn(),$=a.ref(),_=a.ref(),le=a.ref(),se=a.ref(),ne=a.ref(),fe=a.ref(),ee=a.ref(),ae=a.ref(new Map),Y=a.computed(()=>[...ae.value.values()]),D=a.ref(new Map),V=a.ref([]),W=a.computed(()=>V.value.reduce((Le,ze)=>(Le[ze.value]=ze.label,Le),{})),ie=a.ref();a.watch(n,()=>{var Le;kl(),e.withValidate&&((Le=J==null?void 0:J.validate)==null||Le.call(J,"change"))},{deep:!0}),a.watch(V,()=>{var Le;(Le=ee.value)==null||Le.updatePopover(null,F.value)});const re=a.computed(()=>we.value?L.value:L.value.filter(Le=>{var ze;return(ze=jr(String(Le[N.value])))==null?void 0:ze.includes(ui.value)})),pe=a.computed(()=>i.value||f.value),Ne=a.computed(()=>V.value.map(Le=>{var ze,Ae;return((Ae=(ze=ae.value)==null?void 0:ze.get(Le.value))==null?void 0:Ae.label)||Le.label})),te=a.computed(()=>{const Le=Y.value.reduce((ze,Ae)=>(Ae.disabled||ze.push(Ae.value),ze),[]);return Le.length<=V.value.length&&Le.every(ze=>V.value.some(Ae=>Ae.value===ze))}),K=a.computed(()=>!!D.value.size),G=a.computed(()=>!Y.value.length),ce=a.computed(()=>Y.value.length&&Y.value.every(Le=>!Le.visible)),we=a.computed(()=>s.value&&typeof c.value=="function"),z=a.computed(()=>!(Kr.value||G.value||ce.value)||T.value),B=a.computed(()=>o.value&&b.value&&(!ui.value||!s.value)),Q=a.computed(()=>I.value-12-(B.value?32:0)),de=a.computed(()=>Kr.value?d.value:G.value?u.value:ce.value?m.value:""),Ce=a.computed(()=>O.value?E.value&&!st.value:E.value),F=a.computed(()=>dt.exports.merge({theme:"light bk-select-popover",trigger:"manual",width:ct.value,arrow:!1,placement:"bottom-start",isShow:st.value,reference:ne.value,offset:6},A.value)),{register:oe,unregister:he}=Dc(ae),{register:Me,unregister:je}=Dc(D),{isHover:Be,setHover:_e,cancelHover:Tt}=W0(),at=a.ref(!1),it=()=>{at.value||(at.value=!0,t("focus"))},Lt=()=>{!at.value||(at.value=!1,t("blur"))},{popperWidth:ct,isPopoverShow:st,hidePopover:Re,showPopover:zt,togglePopover:oa}=Tp({popoverMinWidth:p.value},_),Yr=a.computed(()=>(s.value&&k.value||M.value)&&st.value);a.watch(st,Le=>{Le?(qr(),Ha()):ui.value=""});const Ur=a.watch(st,()=>{setTimeout(()=>{var Le,ze;v.value&&((ze=(Le=fe.value)==null?void 0:Le.reset)==null||ze.call(Le)),Ur()})}),Ha=()=>{var Ae;const Le=V.value[0],ze=ae.value.get(Le==null?void 0:Le.value);ze&&!ze.disabled&&ze.visible?ie.value=Le==null?void 0:Le.value:ie.value=(Ae=Y.value.find($n=>!$n.disabled&&$n.visible))==null?void 0:Ae.value},$r=Le=>{!s.value||Y.value.forEach(ze=>{var Ae;ze.visible=(Ae=jr(String(ze.label)))==null?void 0:Ae.includes(jr(Le))})},{searchKey:ui,searchLoading:Kr}=xp(we.value?c.value:$r,Ha),Un=Le=>{Le!==n.value&&(t("change",Le,n.value),t("update:modelValue",Le,n.value))},Il=()=>{pe.value||(it(),oa(),t("toggle",st.value))},Nl=Le=>{!s.value||(ui.value=Le)},Lu=(Le,ze)=>{const Ae=String(Le);!M.value||!Ae||s.value&&Y.value.find(Pi=>jr(String(Pi.label))===jr(Ae))||ae.value.get(Ae)||(ze.stopPropagation(),o.value?(V.value.push({value:Ae,label:Ae}),Un(V.value.map(Pi=>Pi.value))):(V.value=[{value:Ae,label:Ae}],Un(Ae),Re()),ui.value="")},Xr=Le=>{if(!(pe.value||!Le)){if(o.value){const ze=V.value.findIndex(Ae=>Ae.value===Le.value);ze>-1?V.value.splice(ze,1):V.value.push({value:Le.value,label:Le.label||Le.value}),Un(V.value.map(Ae=>Ae.value))}else V.value=[{label:Le.label||Le.value,value:Le.value}],Un(Le.value),Re();qr()}},qr=()=>{setTimeout(()=>{var Le,ze,Ae;!k.value&&!M.value?(Le=se.value)==null||Le.focus():y.value==="tag"?(ze=ne.value)==null||ze.focus():(Ae=$.value)==null||Ae.focus()},0)},ku=Le=>{Le.stopPropagation(),V.value=[],Un(o.value?[]:""),t("clear",o.value?[]:""),Re()},Ll=()=>{ie.value=""},Tu=()=>{te.value?V.value=[]:Y.value.forEach(Le=>{Le.disabled||V.value.find(ze=>ze.value===Le.value)||V.value.push({value:Le.value,label:Le.label||Le.value})}),Un(V.value.map(Le=>Le.value)),qr()},xu=Le=>{const{scrollTop:ze,clientHeight:Ae,scrollHeight:$n}=Le.target;ze+Ae===$n&&t("scroll-end")},Su=Le=>{if(pe.value)return;const ze=V.value.findIndex(Ae=>Ae.value===Le);ze>-1&&(V.value.splice(ze,1),Un(V.value.map(Ae=>Ae.value)))},ca=Le=>{var ze,Ae;return((Ae=(ze=ae.value)==null?void 0:ze.get(Le))==null?void 0:Ae.label)||W.value[Le]||Le},kl=()=>{Array.isArray(n.value)?V.value=[...n.value.map(Le=>({value:Le,label:ca(Le)}))]:!!n.value||R.value.includes(n.value)?V.value=[{value:n.value,label:ca(n.value)}]:V.value=[]},ua=Le=>{var $n,Pi,Tl,xl;if(!(($n=_.value)!=null&&$n.contains(Le.target))&&!((Pi=le.value)!=null&&Pi.contains(Le.target))&&!T.value)return;const ze=Y.value.filter(Qt=>!Qt.disabled&&Qt.visible),Ae=ze.findIndex(Qt=>Qt.value===ie.value);if(!(!ze.length||Ae===-1))switch(Le.code){case"ArrowDown":{Le.preventDefault();const Qt=Ae>=ze.length-1?0:Ae+1;ie.value=(Tl=ze[Qt])==null?void 0:Tl.value;break}case"ArrowUp":{Le.preventDefault();const Qt=Ae===0?ze.length-1:Ae-1;ie.value=(xl=ze[Qt])==null?void 0:xl.value;break}case"Backspace":{if(!o.value||!V.value.length||ui.value.length||Le.target===se.value)return;V.value.pop(),Un(V.value.map(Qt=>Qt.value));break}case"Enter":{if(!st.value)st.value=!0;else{const Qt=ae.value.get(ie.value);Xr(Qt)}break}}},Du=({event:Le})=>{var Ae;const{target:ze}=Le;((Ae=_.value)==null?void 0:Ae.contains(ze))||_.value===ze||(Re(),Lt())};return a.provide(Ks,a.reactive({multiple:o,selected:V,activeOptionValue:ie,showSelectedIcon:x,register:oe,unregister:he,registerGroup:Me,unregisterGroup:je,handleOptionSelected:Xr,handleGetLabelByValue:ca})),a.onMounted(()=>{kl(),setTimeout(()=>{C.value&&zt()}),L4(document,"keydown",ua)}),a.onBeforeMount(()=>{k4(document,"keydown",ua)}),{selected:V,isInput:Yr,options:Y,isDisabled:pe,selectedLabel:Ne,isPopoverShow:st,isHover:Be,popperWidth:ct,inputRef:$,triggerRef:_,contentRef:le,searchRef:se,selectTagInputRef:ne,virtualRenderRef:fe,popoverRef:ee,searchLoading:Kr,isOptionsEmpty:G,isSearchEmpty:ce,isFocus:at,isShowSelectContent:z,curContentText:de,isGroup:K,searchKey:ui,isShowSelectAll:B,virtualHeight:Q,filterList:re,isCollapseTags:Ce,popoverConfig:F,setHover:_e,cancelHover:Tt,handleFocus:it,handleBlur:Lt,handleTogglePopover:Il,handleClear:ku,hidePopover:Re,showPopover:zt,handleToggleAll:Tu,handleOptionSelected:Xr,handleClickOutside:Du,handleScroll:xu,handleDeleteTag:Su,handleInputChange:Nl,handleInputEnter:Lu,handleKeydown:ua,handleSelectedAllOptionMouseEnter:Ll}},render(){const e=De({"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(Ii,{loading:!0,theme:"primary",class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length&&!this.isDisabled?a.createVNode(Gt,{class:"clear-icon",onClick:this.handleClear},null):a.createVNode(za,{class:"angle-up"},null),n=()=>this.multipleMode==="tag"?a.createVNode(Jp,{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(Ki,{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,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(vr,{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":f=>this.searchKey=f},null),[[a.vModelText,this.searchKey]])]),!this.isShowSelectContent&&a.createVNode("div",{class:"bk-select-empty"},[this.searchLoading&&a.createVNode(Ii,{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(zr,{list:this.filterList,height:this.virtualHeight,lineHeight:32,ref:"virtualRenderRef"},{default:({data:f})=>f.map(d=>a.createVNode(Xs,{key:d[this.idKey],value:d[this.idKey],label:d[this.displayKey]},null))}):this.filterList.map(f=>a.createVNode(Xs,{value:f[this.idKey],label:f[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(Ii,{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(Wn,a.mergeProps(this.popoverConfig,{onClickoutside:this.handleClickOutside,ref:"popoverRef"}),{default:()=>i(),content:()=>s()})])}});const jc=Ft(Qp,{Option:Xs,Group:Sp});function Rp(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const{propsMixin:_p}=Xi,zc=Object.assign({},_p);zc.width.default="400",zc.height.default="100%";var Wp=a.defineComponent({name:"Sideslider",components:{BkModal:Xi,BkButton:Zt},props:Te(U({},zc),{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 u,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=(u=t.header)==null?void 0:u.call(t))!=null?m:e.title])])])},default:()=>{var u,m;return(m=(u=t.default)==null?void 0:u.call(t))!=null?m:"Content"},footer:()=>t.footer?a.createVNode("div",{class:"bk-sideslider-footer"},[t.footer()]):null},f=`bk-sideslider-wrapper ${e.scrollable?"scroll-able":""} ${e.extCls}`,d=t.footer?"calc(100vh - 106px)":"calc(100vh - 52px)";return a.createVNode(Xi,a.mergeProps(e,{maxHeight:d,class:f,style:`${e.direction}: 0;`,onHidden:o,onShown:s,onClose:i}),Rp(c)?c:{default:()=>[c]})}}});const G0=He(Wp),Z0={theme:g.theme().def("primary"),size:g.size(),curStep:g.number.def(1),controllable:g.bool.def(!1),direction:g.commonType(["horizontal","vertical"],"direction").def("horizontal"),status:g.commonType(["","error","loading"],"status").def(""),lineType:g.commonType(["dashed","solid"],"lineType").def("dashed"),text:g.bool,extCls:g.string,steps:g.array.def([]),beforeChange:g.func};var Hp=a.defineComponent({name:"Steps",props:Z0,emits:["update:curStep","click"],setup(e,{emit:t}){const n=a.ref([]),i=f=>{const d=[];f.forEach(u=>{var m;typeof u=="string"?d.push(u):d.push({title:u.title,icon:u.icon,description:u.description,status:u.status,border:(m=u.border)!=null?m:!0})}),n.value.splice(0,n.value.length,...d)},s=f=>{Z0.curStep=f},o=()=>{var f;n.value.splice(0,n.value.length,{title:"\u6B65\u9AA41",icon:1},{title:"\u6B65\u9AA42",icon:2},{title:"\u6B65\u9AA43",icon:3}),(f=e.steps)!=null&&f.length&&i(e.steps)},c=async f=>{try{e.controllable&&f!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(d,u)=>{const m=await e.beforeChange(f);m?d(m):u(m)}),t("update:curStep",f),t("click",f))}catch(d){console.warn(d)}};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=De({[`${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:C}=p;return C?Object.prototype.toString.call(C)==="[object Object]":typeof p=="string"},f=(p,C)=>(C.icon||(C.icon=p),!isNaN(C.icon)),d=p=>p.status==="loading",u=p=>p.status==="error",m=(p,C)=>o(p)&&this.status==="loading"||d(C)?a.createVNode(Ts,{class:"bk-icon bk-steps-icon icon-loading"},null):o(p)&&this.status==="error"||u(C)?a.createVNode(Qn,{class:"bk-steps-icon"},null):s(p)?a.createVNode(Ui,{class:"bk-steps-icon"},null):a.createVNode("span",null,[f(p,C)?p+1:a.createVNode(C.icon,null,null)]);return a.createVNode("div",{class:i},[this.defaultSteps.map((p,C)=>{var y,M,T;return a.createVNode("div",{class:["bk-step",p.title?"":"bk-step-no-content",s(C)?"done":"",o(C)?"current":"",o(C)&&this.status==="error"?"isError":"",p.status&&o(C)?[`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(C+1)}},[(T=(M=(y=this.$slots)[C+1])==null?void 0:M.call(y))!=null?T:m(C,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(C+1)}},[p.title]),p.description&&a.createVNode("div",{class:"bk-step-description",title:p.description},[p.description])]):""])})])}});const Y0=He(Hp);var Bp=a.defineComponent({name:"Switcher",props:{theme:g.theme().def(""),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=Jn(),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),f=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 d=m=>{if(m.stopPropagation(),m.preventDefault(),e.disabled||i.value)return;const p=s.value?e.falseValue:e.trueValue,C=!s.value,y=()=>{t("update:modelValue",p),t("change",C)};let M=!0;if(typeof e.beforeChange=="function"&&(M=e.beforeChange(p),typeof M.then=="function"))return i.value=!0,M.then(()=>{y()}).finally(()=>{i.value=!1});M&&y()},u=m=>{(m.code==="Enter"||m.key==="Enter"||m.keyCode===13)&&d(m)};return()=>a.createVNode("div",{class:f.value,onClick:d,tabindex:"0",onKeydown:u},[i.value?a.createVNode(Xo,{class:"bk-switcher-loading"},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[s.value?e.onText:e.offText]):""])}});const U0=He(Bp);var el=(e=>(e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e))(el||{}),$0=(e=>(e.HIGHLIGHT="highlight",e.AUTO="auto",e))($0||{});const Fp=["auto","highlight"],K0=["none","row","col","outer"];var Tn=(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))(Tn||{}),Pt=(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))(Pt||{});const Ut=(...e)=>!0,Gp={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},Ge={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"},Oc=4,ri=42,tl={large:78,medium:60,small:42},Zp=[{value:"small",label:"\u5C0F",height:tl.small},{value:"medium",label:"\u4E2D",height:tl.medium},{value:"large",label:"\u5927",height:tl.large}],X0="InitColumns";var fn=(e=>(e.ASC="asc",e.DESC="desc",e.NULL="null",e))(fn||{});const Yp=["asc","desc","null"];var nl=(e=>(e.CURRENT="current",e.ALL="all",e))(nl||{});const q0={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(),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)})]).def(void 0),type:g.commonType(["selection","index","expand","none"],"columnType").def("none"),resizable:g.bool.def(!0),fixed:g.oneOfType([g.bool,g.commonType(["left","right"],"fixed")]).def(!1),sort:g.oneOfType([g.shape({sortFn:g.func.def(void 0),sortScope:g.commonType(Object.values(nl)).def("current"),value:g.string.def(fn.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:g.commonType(["full","fuzzy"],"full"),filterScope:g.commonType(Object.values(nl)).def("current"),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)},Up={data:g.arrayOf(g.any).def([]),columns:g.arrayOf(g.shape(q0)).def([]),activeColumn:g.oneOfType([g.number.def(-1),g.arrayOf(g.number.def(-1))]),columnPick:g.commonType(["multi","single","disabled"],"columnPick").def("disabled"),height:g.oneOfType([g.number,g.string]).def("auto"),minHeight:g.oneOfType([g.number,g.string]).def(ri*2),maxHeight:g.oneOfType([g.number,g.string]).def("auto"),rowHeight:g.oneOfType([g.number,g.func]).def(ri),headHeight:g.number.def(ri),showHead:g.bool.def(!0),thead:g.shape({height:g.number.def(ri),isShow:g.bool.def(!0),cellFn:g.func.def(void 0)}),virtualEnabled:g.bool.def(!1),border:g.arrayOf(g.commonType(K0,"border")).def([el.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:g.size(["small","medium","large"]).def("small"),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(Ge.ROW_INDEX),showOverflowTooltip:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0)})]).def(!1),asyncData:g.bool.def(!1),rowHover:g.oneOf(Fp).def($0.HIGHLIGHT),defaultSort:g.shape({}).def({})};var eh=a.defineComponent({name:"TableColumn",props:Te(U({},q0),{prop:g.oneOfType([g.func.def(()=>""),g.string.def("")])}),setup(e,{slots:t}){const n=a.inject(X0,i=>{},!1);return a.onMounted(()=>{const i=a.reactive(Te(U({},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 th=(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),Te(U(U({},t),e),{current:n})}return t}return{}};var $p=(e,t)=>{const n=a.ref(0),i=a.ref(0);let s=a.reactive({count:0,limit:10,current:1});s=th(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},f=a.reactive([]),d=(y,M)=>{typeof M=="function"&&y.sort(M)},u=(y,M)=>{if(typeof M=="function"){const T=y.filter((x,k)=>M(x,k,e.data));y.splice(0,y.length,...T)}},m=(y,M,T)=>{var v;const x=t.slice(),{sortScope:k}=(v=T==null?void 0:T.sort)!=null?v:{};k===nl.ALL&&d(x,M),f.splice(0,f.length,...x.slice(n.value,i.value)),u(f,y),d(f,M)},p=(y,M,T)=>{s=th(e.pagination,s),C(),c(),m(y,M,T)},C=()=>{!e.pagination||(o.value=e.remotePagination?s:Te(U({},s),{count:e.data.length}))};return{pageData:f,localPagination:o,resolvePageData:m,watchEffectFn:p}},Kp=(e,t)=>{const n=a.toRef(e,"scrollLoading"),i=()=>typeof n.value=="boolean"?{loading:!!n.value,inline:!0,title:"",size:Rn.Normal,mode:$i.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,f,d;if(s.value){const{loading:u,size:m,mode:p,title:C,inline:y,indicator:M}=i();return(d=(f=(c=t.slots).fixedBottom)==null?void 0:f.call(c))!=null?d:a.createVNode(Ii,{loading:u,size:m,mode:p,title:C,inline:y,indicator:M},null)}}}};function Xp(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var qp=()=>{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(jc,{class:"bk-pagination-limit-select",clearable:!1,size:"small",withValidate:!1,modelValue:t.value,onChange:n,disabled:e.disabled},Xp(c=e.limitList.map((f,d)=>a.createVNode(Xs,{value:f,label:`${f}`,key:`${d}_${f}`},null)))?c:{default:()=>[c]}),a.createVNode("div",null,[a.createTextVNode("\u6761")])]):null}}};const ta=5;var e5=()=>{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 y=[];if(e.totalPageNum<=ta+2){for(let x=2;x<=e.totalPageNum-1;x++)y.push(x);return y}const M=Math.floor(ta/2);e.totalPageNum>ta&&(s.value=t.value-M>2,o.value=t.value+M<e.totalPageNum-1);const T=Math.min(e.totalPageNum-ta,Math.max(2,t.value-M));for(let x=T;x<T+ta;x++)y.push(x);return y});a.watch(()=>e.modelValue,y=>{a.nextTick(()=>{y>=1&&y<=e.totalPageNum?t.value=y:y<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,y=>{t.value>y&&(t.value=y)})});const f=()=>{n.value||(t.value=t.value-1)},d=()=>{i.value||(t.value=t.value+1)},u=y=>{y!==t.value&&(t.value=y)},m=()=>{t.value=Math.max(1,t.value-ta)},p=()=>{t.value=Math.min(e.totalPageNum,t.value+ta)};return{current:t,render:({isFirst:y,isLast:M})=>a.createVNode("div",{class:{"bk-pagination-list":!0,"is-first":y,"is-last":M}},[a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":n.value},onClick:f},[e.prevText||a.createVNode(Mi,null,null)]),a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===1},key:"1",onClick:()=>u(1)},[a.createTextVNode("1")]),s.value&&a.createVNode("div",{key:"pre-batch",class:"bk-pagination-list-pre-batch",onClick:m},[a.createVNode(js,null,null)]),c.value.map(T=>a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===T},key:T,onClick:()=>u(T)},[T])),o.value&&a.createVNode("div",{key:"next-batch",class:"bk-pagination-list-next-batch",onClick:p},[a.createVNode(js,null,null)]),e.totalPageNum>1&&a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>u(e.totalPageNum)},[e.totalPageNum]),a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":i.value},onClick:d},[e.nextText||a.createVNode(Ln,null,null)])])}},t5=()=>{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 f=a.computed(()=>{const x=[];for(let k=1;k<=e.totalPageNum;k++)x.push(k);return x});a.watch(()=>e.modelValue,x=>{a.nextTick(()=>{x>=1&&x<=e.totalPageNum?i.value=x:x<1?i.value=1:i.value=e.totalPageNum,c=i.value})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,x=>{i.value>x&&(i.value=x)})});const d=()=>{s.value||(i.value=i.value-1)},u=()=>{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)},C=x=>{const k=x.target,v=Number(k.textContent);!v||v<1||v>e.totalPageNum||v===i.value||(c=v)},y=x=>{["Enter","NumpadEnter"].includes(x.code)&&(x.preventDefault(),p())},M=x=>{c=x,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:d},[a.createVNode(Mi,null,null)]),a.createVNode(Wn,{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:C,onKeydown:y},[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"},[f.value.map(x=>a.createVNode("div",{class:{item:!0,"is-actived":x===i.value},key:x,onClick:()=>M(x)},[x]))])}),a.createVNode("div",{class:{"bk-pagination-btn-next":!0,"is-disabled":o.value},onClick:u},[a.createVNode(Ln,null,null)])])}},n5=()=>({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 i5={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 a5=a.defineComponent({name:"Pagination",props:i5,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const n=a.ref(0),{count:i,limit:s}=a.toRefs(e),o=n5(),{current:c,render:f}=e5(),{current:d,render:u}=t5(),{limit:m,render:p}=qp();return a.watch([i,m,s],([C,y])=>{const M=Math.ceil(C/y);n.value=M<1?1:M},{immediate:!0}),a.watch(c,C=>{t.emit("update:modelValue",C),t.emit("change",C)}),a.watch(d,C=>{!e.small||(t.emit("update:modelValue",C),t.emit("change",C))}),a.watch(m,C=>{t.emit("limitChange",C)}),{totalPageNum:n,renderTotal:o,renderList:f,renderLimit:p,renderSmallList:u}},render(){const e=De({"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 Ec=He(a5),jt=(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=>jt(e,i,n)).filter(i=>i!==void 0).at(0)},Pc=e=>/^\d+$/.test(`${e}`)?[parseInt(`${e}`,10)]:[],r5=e=>nh(e,"auto"),nh=(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},s5=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>K0.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},Or=(e,t=["resizeWidth","calcWidth","width"])=>{var n,i;return(i=(n=e[t[0]])!=null?n:e[t[1]])!=null?i:e[t[2]]},Ac=(e,t,n=20,i=0)=>{const{width:s}=e.getBoundingClientRect()||{},o=s-i;let c=o;const f=[],d=(m,p)=>{const{minWidth:C=void 0}=m;if(C===void 0)return p;let y=p;return/^\d+\.?\d*$/.test(`${C}`)&&(y=Number(C)),/^\d+\.?\d*%$/.test(`${C}`)&&(y=Number(C)*o/100),/^\d+\.?\d*px$/i.test(`${C}`)&&(y=Number(`${C}`.replace(/px/i,""))),y},u=(m,p,C=!0)=>{const y=d(m,p),M=p<y?y:p;Object.assign(m,{calcWidth:M}),C&&(c=c-M,c<0&&(c=0))};if(t.forEach((m,p)=>{if(!m.isHidden){const y=String(Or(m,["resizeWidth","width"]));let M=!0;if(/^\d+\.?\d*(px)?$/.test(y)){const T=Number(y.replace("px",""));u(m,T),M=!1}if(/^\d+\.?\d*%$/.test(y)){let T=n;if(c>0){const x=Number(y.replace("%",""));T=c*x/100}u(m,T),M=!1}M&&f.push(p)}}),f.length>0){let m=n;c>0&&(m=c/f.length,f.forEach(p=>u(t[p],m,!1)))}},ih=(e,t,n=60,i=!1)=>{const s=dt.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)}}},Vc=e=>{const{showHead:t,headHeight:n,thead:i={}}=e;return Object.assign({},{isShow:t,height:n},U({},i))},il=(e,t,n)=>n.type==="index"?e[Ge.ROW_INDEX]+1:dt.exports.get(e,t),Er=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Er(Reflect.apply(e,globalThis,t),t):[],l5=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===Ge.ROW_INDEX?`__ROW_INDEX_${n}`:dt.exports.get(e,t.rowKey):typeof t.rowKey=="function"?Reflect.apply(t.rowKey,globalThis,[e]):Fi.v4(),o5=(e,t,n=0)=>{if(e){const i=e.querySelector(t);if(i)return i.offsetHeight>e.offsetHeight-n}return!1},c5=(e,t)=>{function n(o,c){const d=(n.canvas||(n.canvas=document.createElement("canvas"))).getContext("2d");return d.font=c,d.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",f=i(o,"font-size")||"16px",d=i(o,"font-family")||"Times New Roman";return`${c} ${f} ${d}`}return n(t||(e==null?void 0:e.innerHTML),s(e))};var ah=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)})]).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,f=null;const d=()=>{let m=!0,p=n.value.innerText;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),{disabled:m,content:p}},u=()=>{if(!n.value||/selection|index|expand/.test(e.column.type)||!ka(n.value))return;const{content:m}=d(),p=c5(n.value,m),C=n.value.clientWidth,y=window.getComputedStyle(n.value),M=["padding-left","padding-right"].reduce((x,k)=>x+Number(y.getPropertyValue(k).replace("px","")),0),T=C-M;if(i.value=p>T,i.value){const x=a.ref(d());f===null&&(f=Mc(n.value,x))}else f==null||f.destroyInstance(n.value),f=null};return a.onMounted(()=>{var p;const{disabled:m}=d();m||(u(),((p=e.column.showOverflowTooltip)==null?void 0:p.watchCellResize)!==!1&&(c=ih(n.value,()=>{u()},60,!0),c.start()))}),a.onBeforeUnmount(()=>{c==null||c.stop(),f==null||f.destroyInstance(n.value)}),()=>{var m;return a.createVNode("div",{class:"cell",ref:n},[(m=t.default)==null?void 0:m.call(t)])}}}),Jc=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)])}}),u5=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(Js,{scene:"part",type:t.value,description:e.emptyText},null)}});function d5(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var f5=a.defineComponent({name:"HeadFilter",props:{column:g.any.def({}),height:g.number.def(ri)},emits:["change","filterSave"],setup(e,{emit:t}){const{column:n}=e,i=a.reactive({isOpen:!1,checked:[]}),s=a.computed(()=>De({[Ye("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:i.checked.length,opened:i.isOpen})),o=De({[Ye("table-head-filter")]:!0}),c=I=>{i.isOpen=I},f=`light ${Ye("table-head-filter")}`,d=a.computed(()=>{const{list:I=[]}=n.filter;return I.map(L=>Te(U({},L),{checked:i.checked.includes(L.value)}))}),u=(I,L="ig")=>new RegExp(`${I}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),L),m=(I,L)=>{const{match:N}=n.filter,E=il(L,jt(n,"field",[n,L]),n);return N==="full"&&I.includes(E),I.some(O=>u(O,"img").test(E))},p=typeof n.filter.filterFn=="function"?(I,L,N,E)=>n.filter.filterFn(I,L,e.column,N,E):(I,L)=>I.length?m(I,L):!0,C=()=>{y(!0),t("filterSave",[...i.checked]),i.isOpen=!1},y=(I=!1)=>{const{disabled:L}=T(x,"\u786E\u5B9A");if(L||I){if(e.column.filter==="custom"){t("change",[...i.checked],null),i.isOpen=!1;return}t("change",[...i.checked],p)}},M=()=>{i.checked.length&&(i.checked.splice(0,i.checked.length),i.isOpen=!1,a.nextTick(()=>t("change",i.checked,p)))},T=(I,L)=>({disabled:I==="disabled"||I===!1,text:typeof I=="string"?I:L}),{btnSave:x,btnReset:k}=n.filter,v=()=>{const{disabled:I,text:L}=T(x,"\u786E\u5B9A");return I?a.createVNode("span",{class:"btn-filter-save disabled"},[L]):a.createVNode("span",{class:"btn-filter-save",onClick:C},[L])},b=()=>{const{disabled:I,text:L}=T(k,"\u91CD\u7F6E");return I?"":a.createVNode("span",{class:["btn-filter-reset",i.checked.length?"":"disable"],onClick:M},[L])};return()=>a.createVNode(Wn,a.mergeProps({trigger:"click",isShow:i.isOpen,placement:"bottom-start",arrow:!1,offset:0},{theme:f},{onAfterShow:()=>c(!0),onAfterHidden:()=>c(!1)}),{default:()=>a.createVNode(Yo,{class:s.value},null),content:()=>{let I;return a.createVNode("div",{class:o},[a.createVNode(sc,{class:"content-list",modelValue:i.checked,"onUpdate:modelValue":L=>i.checked=L,onChange:()=>y(!1)},d5(I=d.value.map(L=>a.createVNode("div",{class:"list-item"},[a.createVNode(Li,{label:L.value},{default:()=>[L.text]})])))?I:{default:()=>[I]}),a.createVNode("div",{class:"content-footer"},[v(),a.createVNode("span",{class:"btn-filter-split"},null),b()])])}})}}),h5=a.defineComponent({name:"HeadSort",props:{column:g.any.def({}),defaultSort:g.oneOf(Yp).def(fn.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||fn.NULL,i=a.ref(n),s=(f,d)=>{var M,T;if(f.stopImmediatePropagation(),f.stopPropagation(),f.preventDefault(),i.value===d?i.value=fn.NULL:i.value=d,e.column.sort==="custom"){t("change",null,d);return}const u=e.column.field,m=x=>il(x,u,e.column),p=(x,k)=>{const v=m(x),b=m(k);return typeof v=="number"&&typeof b=="number"?v-b:String.prototype.localeCompare.call(v,b)},C=typeof((M=e.column.sort)==null?void 0:M.sortFn)=="function"?(T=e.column.sort)==null?void 0:T.sortFn:p,y=i.value===fn.NULL?()=>!0:(x,k)=>C(x,k)*(d===fn.DESC?-1:1);t("change",y,d)};return()=>a.createVNode("span",{class:Ye("head-cell-sort")},[a.createVNode(Vo,{class:["sort-action","sort-asc",i.value===fn.ASC?"active":""],onClick:f=>s(f,fn.ASC)},null),a.createVNode(ks,{class:["sort-action","sort-desc",i.value===fn.DESC?"active":""],onClick:f=>s(f,fn.DESC)},null)])}});class g5{constructor(t,n){ar(this,"props",null);ar(this,"ctx",null);this.props=t,this.ctx=n}}function rh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var m5=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:g.size(["small","medium","large"]).def("small"),sizeList:g.shape([]),showLineHeight:g.bool.def(!0)}),g.bool]).def(!1),columns:g.array.def([]),rowHeight:g.number.def(ri)},emits:["change"],setup(e,{emit:t}){const n=Zp,i=($,_)=>jt($,["field","index"],[$,_]),s=a.ref(!1),o=a.ref(!1),c=typeof e.settings=="boolean"?a.ref({fields:e.columns.map($=>Te(U({},$),{field:$.field||$.type})),checked:[],limit:0,size:"small",sizeList:n,showLineHeight:!0}):a.ref(e.settings),f=a.ref(c.value.size||"small"),d=a.ref(e.rowHeight),u=a.ref(c.value.checked),p=`light ${Ye("table-settings")}`,C={checkAll:s.value,activeSize:f.value,activeHeight:d.value,checkedFields:c.value.checked||[]},y=()=>{Object.assign(C,{checkAll:s.value,activeSize:f.value,activeHeight:d.value,checkedFields:u.value}),t("change",{checked:u.value,size:f.value,height:d.value}),o.value=!1},M=()=>{s.value=C.checkAll,f.value=C.activeSize,d.value=C.activeHeight,u.value=C.checkedFields,o.value=!1},T=()=>{o.value=!0},x=$=>{$.stopImmediatePropagation(),$.stopPropagation(),$.preventDefault(),s.value=!s.value;const _=c.value.fields||e.columns||[];if(s.value)u.value=_.map((le,se)=>i(le,se));else{const le=_.filter(se=>se.disabled).map((se,ne)=>i(se,ne));u.value.splice(0,u.value.length,...le)}},k=a.computed(()=>{var $;return(($=c.value.limit)!=null?$:0)>0}),v=c.value.sizeList||n,b=a.computed(()=>k.value&&(c.value.limit?c.value.limit:0)<=u.value.length),I=($,_)=>$.disabled||b.value&&!u.value.includes(i($,_)),L=$=>{f.value=$.value,d.value=$.height},N=$=>({"line-size":!0,"is-medium":f.value==="medium",active:$.value===f.value}),E={marginRight:"12px"},O=()=>v.map($=>a.createVNode("span",{class:N($),onClick:()=>L($)},[$.label])),A=a.computed(()=>c.value.fields||e.columns||[]),R=a.computed(()=>u.value.length>0&&!A.value.every(($,_)=>u.value.includes(jt($,"field",[$,_])))),J=a.computed(()=>typeof c.value.showLineHeight=="boolean"?c.value.showLineHeight:!0);return a.watch(()=>[u.value],()=>{u.value.length||(s.value=!1),u.value.length&&A.value.every(($,_)=>u.value.includes(i($,_)))&&(s.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{u.value.splice(0,u.value.length,...c.value.checked)},{immediate:!0,deep:!0}),()=>e.settings?a.createVNode(Wn,a.mergeProps({trigger:"manual",isShow:o.value,placement:"bottom-end",arrow:!1},{theme:p}),{default:()=>a.createVNode("span",{class:"table-head-settings",onClick:T},[a.createVNode(Wo,{style:"color: #c4c6cc;"},null)]),content:()=>{let $;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(xs,{class:"icon-close-action",onClick:M},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")]),k.value?a.createVNode("span",{class:"limit"},[a.createTextVNode("\uFF08\u6700\u591A"),c.value.limit,a.createTextVNode("\u9879\uFF09")]):""]),k.value?"":a.createVNode("span",{class:"check-all",onClick:x},[a.createVNode(Li,{label:"\u5168\u9009",indeterminate:Boolean(R.value),modelValue:u.value.length>0},{default:()=>[a.createTextVNode("\u5168\u9009")]})])]),a.createVNode(sc,{class:"setting-body-fields",modelValue:u.value,"onUpdate:modelValue":_=>u.value=_},rh($=A.value.map((_,le)=>{let se;return a.createVNode("div",{class:"field-item"},[a.createVNode(Li,{checked:u.value.includes(i(_,le)),label:i(_,le),disabled:I(_,le)},rh(se=jt(_,"label",[_,le]))?se:{default:()=>[se]})])}))?$:{default:()=>[$]}),J.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(Zt,{theme:"primary",style:E,onClick:y},{default:()=>[a.createTextVNode("\u786E\u5B9A")]}),a.createVNode(Zt,{style:E,onClick:M},{default:()=>[a.createTextVNode("\u53D6\u6D88")]})])])}}):""}}),Qc=(e,t,n)=>{const i=a.computed(()=>e.pagination&&e.data.length?ri:0),s=(p,C,y)=>({column_fixed:!!p.fixed,column_fixed_left:p.fixed!=="right",column_fixed_right:p.fixed==="right",shadow:p.fixed==="right"?C<y:C>0}),o=p=>p.fixed==="right"?"right":"left",c={left:(p=!0)=>t.filter(C=>C.fixed&&C.fixed!=="right").reduce((C,y,M)=>p&&M===0?C:C+Or(y),0),right:(p=!0)=>t.filter(C=>C.fixed==="right").reduce((C,y,M)=>p&&M===0?C:C+Or(y),n?Oc:0)},f=c.right,d=()=>{const p=(M,T)=>{if(!M.fixed)return{};const x=o(M),k=x==="right"?-1:1,v=`${T[x]}px`;return T[x]=T[x]+Or(M)*k,{[x]:v}},C=f(!0);return{fixedOffset:{left:0,right:C},resolveFixedColumnStyle:p}},u=(p,C)=>{const y=T=>({width:`${c[T](!1)}px`,bottom:`${i.value}px`}),M={left:!1,right:!1};return t.filter(T=>!T.isHidden&&T.fixed).map(T=>{const x=o(T),k=M[x];return M[x]=!0,k?"":a.createVNode("div",{class:s(T,p,C),style:y(x)},null)})},m=Ye("table-fixed");return{renderFixedColumns:u,fixedWrapperClass:m,getFixedColumnStyleResolve:d}};function sh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}class p5{constructor(t,n,i,s){ar(this,"getRowHeight",(t,n)=>{const{size:i,height:s}=this.setting;return s!=null?jt(this.setting,"height",["tbody",t,n,i]):jt(this.props,"rowHeight",["tbody",t,n])});ar(this,"getColumnClass",(t,n)=>({[`${this.uuid}-column-${n}`]:!0,column_fixed:!!t.fixed,column_fixed_left:!!t.fixed,column_fixed_right:t.fixed==="right"}));ar(this,"getHeadColumnClass",(t,n)=>Te(U({},this.getColumnClass(t,n)),{active:this.isColActive(n)}));this.props=t,this.context=n,this.reactiveProp=i,this.colgroups=s,this.plugins=new g5(t,n),this.uuid=Fi.v4(),this.events=new Map}get propActiveCols(){return this.reactiveProp.activeColumns}renderTableHeadSchema(){const{isShow:t=!0}=Vc(this.props);if(!t)return null;const n=i=>{const{checked:s=[],size:o,height:c}=i;this.reactiveProp.setting.size=o,this.reactiveProp.setting.height=c,s.length&&this.colgroups.forEach(f=>{f.isHidden=!(s!=null?s:[]).includes(jt(f,["field","type"],[f]))}),this.emitEvent(Tn.ON_SETTING_CHANGE,[i])};return[this.props.settings?a.createVNode(m5,{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(u5,{filterList:t,list:this.props.data,emptyText:this.props.emptyText},null)}renderTableFooter(t){return a.createVNode(Ec,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(Pt.PAGE_LIMIT_CHANGE,t)}handlePageChange(t){Object.assign(this.props.pagination,{current:t,value:t}),this.context.emit(Pt.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){this.props.columnPick!=="disabled"&&(this.setColumnActive(t,this.props.columnPick==="single"),this.context.emit(Pt.COLUMN_PICK,this.propActiveCols))}getSortCell(t,n){const i=(o,c)=>{this.emitEvent(Tn.ON_SORT_BY_CLICK,[{sortFn:o,column:t,index:n,type:c}])};let s=fn.NULL;if(typeof this.props.defaultSort=="object"&&this.props.defaultSort!==null){const o=jt(t,["field","type"],[t,n]);Object.prototype.hasOwnProperty.call(this.props.defaultSort,o)&&(s=this.props.defaultSort[o])}return a.createVNode(h5,{column:t,defaultSort:s,onChange:i},null)}getFilterCell(t,n){const i=(o,c)=>{const f=(d,u)=>c(o,d,u);this.emitEvent(Tn.ON_FILTER_CLICK,[{filterFn:f,checked:o,column:t,index:n}])},s=o=>{this.context.emit(Pt.COLUMN_FILTER_SAVE,{column:t,values:o})};return a.createVNode(f5,{column:t,height:this.props.headHeight,onChange:i,onFilterSave:s},null)}renderHeader(){const t=Vc(this.props),{cellFn:n}=t,i={"--row-height":`${jt(t,"height",["thead"])}px`},s=(u,m)=>{if(u.type==="selection"){const C=this.reactiveProp.rowActions.get(Ge.ROW_SELECTION_ALL);return this.renderCheckboxColumn({[Ge.ROW_SELECTION]:!!C},0,!0)}const p=[];return u.sort&&p.push(this.getSortCell(u,m)),u.filter&&p.push(this.getFilterCell(u,m)),typeof n=="function"?(p.unshift(n(u,m)),p):(p.unshift(jt(u,"label",[u,m])),p)},o=u=>Array.from(u.listeners.keys()).reduce((m,p)=>{const C=p.split("_").slice(-1)[0];return Object.assign(m,{[C]:y=>{u.listeners.get(p).forEach(M=>Reflect.apply(M,this,[y,u,this]))}})},{}),{getFixedColumnStyleResolve:c}=Qc(this.props,this.colgroups),{resolveFixedColumnStyle:f,fixedOffset:d}=c();return a.createVNode("thead",{style:i},[a.createVNode(Jc,null,{default:()=>[a.createVNode("tr",null,[this.filterColgroups.map((u,m)=>{let p;return a.createVNode("th",a.mergeProps({colspan:1,rowspan:1,class:this.getHeadColumnClass(u,m),style:f(u,d),onClick:()=>this.handleColumnHeadClick(m)},o(u)),[a.createVNode(ah,null,sh(p=s(u,m))?p:{default:()=>[p]})])})])]})])}renderTBody(t){const{getFixedColumnStyleResolve:n}=Qc(this.props,this.colgroups);return a.createVNode("tbody",null,[t.map((i,s)=>{const o=[...Er(this.props.rowStyle,[i,s,this]),{"--row-height":`${this.getRowHeight(i,s)}px`}],c=[...Er(this.props.rowClass,[i,s,this]),`hover-${this.props.rowHover}`],{resolveFixedColumnStyle:f,fixedOffset:d}=n(),u=i[Ge.ROW_UID];return[a.createVNode(Jc,{key:u},{default:()=>[a.createVNode("tr",{style:o,class:c,onClick:m=>this.handleRowClick(m,i,s,t),onDblclick:m=>this.handleRowDblClick(m,i,s,t)},[this.filterColgroups.map((m,p)=>{let C;const y=[f(m,d),...Er(this.props.cellStyle,[m,p,i,s,this])],M=[this.getColumnClass(m,p),...Er(this.props.cellClass,[m,p,i,s,this]),{"expand-row":i[Ge.ROW_EXPAND]}],T={cell:!0,"expand-cell":m.type==="expand"},x=`__CELL_${s}_${p}`;return a.createVNode("td",{class:M,style:y,key:x,colspan:1,rowspan:1},[a.createVNode(ah,{class:T,column:m,row:i,parentSetting:this.props.showOverflowTooltip},sh(C=this.renderCell(i,m,s,t))?C:{default:()=>[C]})])})])]}),this.renderExpandRow(i,c)]})])}renderExpandRow(t,n){if(!!t[Ge.ROW_EXPAND]){const s=[...n,{row_expend:!0}],o=`${t[Ge.ROW_UID]}_expand`;return a.createVNode(Jc,{key:o},{default:()=>{var c,f,d;return[a.createVNode("tr",{class:s},[a.createVNode("td",{colspan:this.filterColgroups.length,rowspan:1},[(d=(f=(c=this.context.slots).expandRow)==null?void 0:f.call(c,t[Ge.ROW_SOURCE_DATA]))!=null?d:a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}}handleRowClick(t,n,i,s){this.context.emit(Pt.ROW_CLICK,t,n,i,s,this)}handleRowDblClick(t,n,i,s){this.context.emit(Pt.ROW_DBL_CLICK,t,n,i,s,this)}getExpandCell(t){return!!t[Ge.ROW_EXPAND]?a.createVNode(Ss,null,null):a.createVNode(Ps,null,null)}handleRowExpandClick(t,n,i,s,o){this.emitEvent(Tn.ON_ROW_EXPAND_CLICK,[{row:t,column:n,index:i,rows:s,e:o}])}renderCellCallbackFn(t,n,i,s){const o=il(t,jt(n,"field",[n,t]),n),c=this.props.data[t[Ge.ROW_INDEX]];return n.render({cell:o,data:c,row:t,column:n,index:i,rows:s})}renderCheckboxColumn(t,n,i=!1){const s=c=>{this.emitEvent(Tn.ON_ROW_CHECK,[{row:t,index:n,isAll:i,value:c}])},o=i&&!!this.reactiveProp.rowActions.get(Ge.ROW_SELECTION_INDETERMINATE);return a.createVNode(Li,{onChange:s,modelValue:t[Ge.ROW_SELECTION],indeterminate:o},null)}renderExpandColumn(t,n,i,s){const o=()=>{var c,f,d;return typeof n.render=="function"?this.renderCellCallbackFn(t,n,i,s):(d=(f=(c=this.context.slots).expandCell)==null?void 0:f.call(c,{row:t,column:n,index:i,rows:s}))!=null?d: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 f,d;const o=()=>{const u=il(t,jt(n,"field",[n,t]),n);return typeof n.render=="function"?this.renderCellCallbackFn(t,n,i,s):u},c={expand:(u,m,p,C)=>this.renderExpandColumn(u,m,p,C),selection:(u,m,p,C)=>this.renderCheckboxColumn(u,p)};return(d=(f=c[n.type])==null?void 0:f.call(c,t,n,i,s))!=null?d: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=De({active:this.isColActive(n)}),s=`${r5(Or(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 al=(e,t)=>({initColumns:s=>{let o=[];Array.isArray(s)?o=s:o=[s],o.forEach(c=>{if(!t.find(d=>d.label===c.label&&d.field===c.field)){const d=a.unref(c);t.push(d)}})},getColumns:()=>{var s;return t!=null&&t.length?t:(s=e.columns)!=null&&s.length?e.columns:[]}});const lh=e=>e.columnPick!=="disabled"?e.columnPick==="multi"?Array.isArray(e.activeColumn)?e.activeColumn:Pc(e.activeColumn):Array.isArray(e.activeColumn)?Pc(e.activeColumn[0]):Pc(e.activeColumn):[];var y5=(e,t)=>{let n=a.reactive([]);const{getColumns:i}=al(e,t);if(e.columnPick==="disabled")return{activeColumns:n};const s=a.reactive(lh(e)),o=()=>i().map((c,f)=>({index:f,active:s.some(d=>d===f),_column:c}));return a.watchEffect(()=>{n=o();const c=lh(e);n.forEach((f,d)=>{Object.assign(f,{active:c.some(u=>u===d)})})}),{activeColumns:n}},b5=(e,t=!0)=>{const n="HeadColumnResize";let i;(function(b){b.MOUSE_MOVE="onMousemove",b.MOUSE_OUT="onMouseout",b.MOUSE_DOWN="onMousedown"})(i||(i={}));let s=!1,o=!1,c=!1,f=0,d=null,u=0;const m=a.ref(-1e3),p=b=>{var E;o=!1,c=!1;const I=document.body.style;I.cursor="";const L=b.clientX-f;d.resizeWidth=((E=d.resizeWidth)!=null?E:d.calcWidth)+L,document.removeEventListener("mouseup",p),document.removeEventListener("mousemove",y),f=0,m.value=-1e3,d=null,b.target.closest("table").querySelectorAll("th").forEach(O=>O.style.setProperty("user-select","inherit"))},C=b=>dt.exports.throttle(()=>{m.value=b.clientX-f+u},60),y=b=>{document.body.style.setProperty("cursor",""),C(b)()},M={[i.MOUSE_DOWN]:(b,I)=>{if(!s)return;o=!0,document.body.style.setProperty("cursor","col-resize"),d=I,f=b.clientX;const N=b.target.closest("table");u=f-N.getBoundingClientRect().left,document.addEventListener("mouseup",p),document.addEventListener("mousemove",y)},[i.MOUSE_MOVE]:(b,I)=>{o&&!c&&(c=!0);const L=b.target.closest("th");if(c&&L.style.setProperty("user-select","none"),!c){if(!L)return;const N=L.getBoundingClientRect();N.width>12&&N.right-b.pageX<8?(s=!0,L.style.setProperty("cursor","col-resize")):(L.style.setProperty("cursor",""),s=!1)}},[i.MOUSE_OUT]:(b,I)=>{const L=b.target;c||L.style.setProperty("cursor","")}},T=b=>`${n}_${b}`,x=()=>{e.forEach(b=>{b.resizable!==!1&&Object.keys(M).forEach(I=>{const L=T(I);b.listeners.has(L)||b.listeners.set(L,[]),b.listeners.get(L).push(M[I])})})},k=()=>{e.forEach(b=>{Object.keys(M).forEach(I=>{const L=T(I);if(b.listeners.has(L)){const N=b.listeners.get(L);N.splice(0,N.length)}})})};t&&x();const v=a.computed(()=>({position:"absolute",top:0,bottom:0,left:0,width:"1px","background-color":"#ebeef5"}));return{registerResizeEvent:x,resetResizeEvents:k,dragOffsetX:m,dragOffsetXStyle:v}};const C5=(e,t,n,i,s)=>{const{getColumns:o}=al(e,t),c=a.ref(200),f=a.ref(void 0),d=a.computed(()=>e.pagination&&e.data.length),u=a.computed(()=>De({[Ye("table")]:!0,"has-footer":d.value,"has-scroll-y":f.value||e.virtualEnabled},s5(e.border))),m=De({[Ye("table-head")]:!0,"has-settings":!!e.settings}),p=Vc(e),C=a.computed(()=>({"--row-height":`${jt(p,"height",["thead"])}px`,"--scroll-head-left":`-${i.scrollTranslateX}px`,"--scroll-left":`${i.scrollTranslateX}px`})),y={[Ye("table-body")]:!0},M=a.computed(()=>De({[Ye("table-footer")]:!0,["is-hidden"]:!e.pagination||!e.data.length})),T=()=>{const O=o();if(O.every(A=>/^\d+\.?\d*(px)?$/ig.test(`${A.width}`))){const A=O.reduce((J,$)=>J+Number(`${$.width}`.replace(/px/ig,"")),0),R=f.value?Oc:0;return`${A+R}px`}return"100%"},x=a.computed(()=>({minHeight:nh(e.minHeight,"auto"),width:T(),maxWidth:"100%"})),k=(O,A)=>{const R=String(O);if(/^\d+\.?\d*$/.test(R))return Number(R);if(/^\d+\.?\d*px$/ig.test(R))return Number(R.replace("px",""));if(/^\d+\.?\d*%$/ig.test(R)&&typeof A=="number"){const J=Number(R.replace("%",""));return A*J/100}return A},v=a.reactive({display:"","min-height":"",height:"",maxHeight:""}),b=()=>e.showHead?k(e.headHeight,ri):0,I=()=>{const O=k(e.height,c.value),A=b(),R=k(e.minHeight,c.value),J=e.pagination&&e.data.length?ri:0,$=O-A-J,_=e.height!=="auto"?`${$}px`:!1,le=R-A-J,se=k(e.maxHeight,void 0),ne=typeof se=="number"?`${se-A-J}px`:!1;Object.assign(v,{display:s!=null&&s.length?"block":!1,"min-height":`${le}px`,height:_,maxHeight:ne})};a.onMounted(()=>{L(n==null?void 0:n.value)});const L=O=>{if(O){const{height:A}=O.parentElement.getBoundingClientRect();c.value=A,I(),N(O)}},N=O=>{const A=e.virtualEnabled?`.${Ye("virtual-section")}`:`.${Ye("table-body-content")}`,R=O.querySelector(".bk-table-body");f.value=o5(R,A,0)};return{tableClass:u,headClass:m,contentClass:y,footerClass:M,wrapperStyle:x,contentStyle:v,headStyle:C,resetTableHeight:L,updateBorderClass:N,getColumnsWidthOffsetWidth:()=>{let O=0;return f.value&&(O=O+Oc),e.border.includes(el.OUTER)&&!e.border.includes(el.NONE)&&(O=O+2),O},hasFooter:d,hasScrollY:f}},v5=(e,t)=>{var le,se;const n=a.reactive([]),{getColumns:i}=al(e,t),s=()=>{var ae,Y;const ne=((ae=e.settings)==null?void 0:ae.checked)||[],fe=((Y=e.settings)==null?void 0:Y.fields)||[],ee=D=>fe.some(V=>V.field===jt(D,"field",[D]));n.splice(0,n.length,...i().map(D=>Te(U({},D),{calcWidth:null,resizeWidth:null,listeners:new Map,isHidden:ee(D)&&ne.length&&!ne.includes(jt(D,["field","type"],[D]))})))},{dragOffsetXStyle:o,dragOffsetX:c,resetResizeEvents:f,registerResizeEvent:d}=b5(n,!0),{activeColumns:u}=y5(e,t);a.watch(()=>[e.settings],()=>{var ne;(((ne=e.settings)==null?void 0:ne.checked)||[]).length&&s()}),a.watch(()=>[e.columns,t],()=>{s(),f(),d()},{immediate:!0,deep:!0});const m=a.reactive({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:u,settings:e.settings,setting:{size:(le=e.settings)==null?void 0:le.size,height:tl[(se=e.settings)==null?void 0:se.size]}}),p=ne=>{var fe;return m.rowActions.has(ne)?(fe=m.rowActions.get(ne))==null?void 0:fe.isExpand:!1},C=(ne,fe=void 0)=>{var Y;const ee=ne[Ge.ROW_UID],ae=typeof fe=="boolean"?fe:!p(ee);m.rowActions.set(ee,Object.assign({},(Y=m.rowActions.get(ee))!=null?Y:{},{isExpand:ae})),A()},y=()=>m.rowActions.has(Ge.ROW_SELECTION_ALL)?m.rowActions.get(Ge.ROW_SELECTION_ALL):e.selectionKey?E.every(ne=>L(ne)):!1,M=ne=>{const fe=ne[Ge.ROW_UID],{isSelected:ee=!1}=m.rowActions.get(fe)||{};return ee},T=(ne=M)=>{let fe=!1,ee=!1;E.forEach(ae=>{const Y=ne(ae);!fe&&!Y&&(fe=!0),!ee&&Y&&(ee=!0)}),m.rowActions.set(Ge.ROW_SELECTION_ALL,ee&&!fe),m.rowActions.set(Ge.ROW_SELECTION_INDETERMINATE,ee&&fe)},x=()=>e.columns.some(ne=>ne.type==="selection"),k=()=>{x()&&T(ne=>L(ne))},v=(ne=void 0)=>{const fe=typeof ne=="boolean"?ne:!y();m.rowActions.set(Ge.ROW_SELECTION_ALL,fe),m.rowActions.set(Ge.ROW_SELECTION_INDETERMINATE,!1),E.forEach(ee=>{var D;const ae=ee[Ge.ROW_UID],Y=Object.assign({},(D=m.rowActions.get(ae))!=null?D:{},{isSelected:fe});m.rowActions.set(ae,Y)}),A(fe),R(null,ne,!0)},b=()=>{v(!1)},I=(ne,fe)=>{var ae;const ee=ne[Ge.ROW_UID];if(ee){const Y=typeof fe=="boolean"?fe:!N(ne,ee),D=Object.assign({},(ae=m.rowActions.get(ee))!=null?ae:{},{isSelected:Y});m.rowActions.set(ee,D),fe||m.rowActions.set(Ge.ROW_SELECTION_ALL,!1),T(),A(),R(ne,fe,!1)}},L=(ne,fe=()=>!1)=>typeof e.isSelectedFn=="function"?Reflect.apply(e.isSelectedFn,globalThis,[{row:ne,data:e.data}]):typeof e.selectionKey=="string"&&e.selectionKey.length?dt.exports.get(ne,e.selectionKey):fe(),N=(ne,fe)=>L(ne,()=>{var ae;const ee=fe===void 0?ne[Ge.ROW_UID]:fe;return y()?!0:m.rowActions.has(ee)?(ae=m.rowActions.get(ee))==null?void 0:ae.isSelected:!1}),E=a.reactive([]),O=(ne=!1)=>{E.splice(0,E.length,...e.data.map((fe,ee)=>{const ae=l5(fe,e,ee);return Te(U({},fe),{[Ge.ROW_INDEX]:ee,[Ge.ROW_UID]:ae,[Ge.ROW_EXPAND]:ne?p(ae):!1,[Ge.ROW_SELECTION]:N(fe,ae),[Ge.ROW_SOURCE_DATA]:U({},fe)})})),k()},A=ne=>{E.forEach(fe=>{Object.assign(fe,{[Ge.ROW_EXPAND]:p(fe[Ge.ROW_UID]),[Ge.ROW_SELECTION]:typeof ne=="boolean"?ne:N(fe,fe[Ge.ROW_UID])})}),typeof ne!="boolean"&&k()},R=(ne,fe,ee=!1)=>{if(e.asyncData&&e.rowKey){if(ee)e.data.forEach(ae=>{dt.exports.has(ae,e.selectionKey)&&dt.exports.set(ae,e.selectionKey,!!fe)});else if(dt.exports.has(ne,e.selectionKey)){const ae=e.data.find(Y=>dt.exports.get(Y,e.rowKey)===dt.exports.get(ne,e.rowKey));dt.exports.set(ae,e.selectionKey,!!fe)}}},{renderFixedColumns:J,fixedWrapperClass:$}=Qc(e,n,!1);return{colgroups:n,dragOffsetXStyle:o,dragOffsetX:c,reactiveSchema:m,indexData:E,fixedWrapperClass:$,initIndexData:O,updateIndexData:A,renderFixedColumns:J,setRowExpand:C,updateColGroups:s,clearSelection:b,toggleAllSelection:v,toggleRowSelection:I,getSelection:()=>E.filter(ne=>N(ne))}};var w5=a.defineComponent({name:"Table",props:Up,emits:Gp,setup(e,t){let n=null,i=null,s=null,o=null;const c=a.reactive([]),{initColumns:f}=al(e,c);a.provide(X0,f);const d=a.ref(),u=a.ref(),m=a.ref(0),{colgroups:p,dragOffsetXStyle:C,dragOffsetX:y,reactiveSchema:M,indexData:T,renderFixedColumns:x,setRowExpand:k,initIndexData:v,fixedWrapperClass:b,clearSelection:I,toggleAllSelection:L,toggleRowSelection:N,getSelection:E}=v5(e,c),{pageData:O,localPagination:A,resolvePageData:R,watchEffectFn:J}=$p(e,T),{tableClass:$,headClass:_,contentClass:le,footerClass:se,wrapperStyle:ne,contentStyle:fe,headStyle:ee,updateBorderClass:ae,resetTableHeight:Y,getColumnsWidthOffsetWidth:D,hasFooter:V}=C5(e,c,d,M,O),W=new p5(e,t,M,p),ie=()=>{const Q=d.value.querySelector(".bk-table-body-content"),de=Q.querySelector("table");if(de){const Ce=de.scrollWidth,F=Q.clientWidth;m.value=Ce-F}};a.watch(()=>[e.data,e.pagination,e.height,e.maxHeight,e.minHeight],()=>{v(e.reserveExpand),J(s,n,i),a.nextTick(()=>{Y(d.value),ae(d.value)})},{immediate:!0,deep:!0}),a.watchEffect(()=>{if((d==null?void 0:d.value)instanceof HTMLElement){const Q=D();Ac(d.value,p,20,Q),ie()}}),W.on(Tn.ON_SORT_BY_CLICK,Q=>{var he,Me;const{sortFn:de,column:Ce,index:F,type:oe}=Q;typeof de=="function"&&(n=de,i=Ce,R(s,n,i),(Me=(he=u.value)==null?void 0:he.reset)==null||Me.call(he)),t.emit(Pt.COLUMN_SORT,{column:Ce,index:F,type:oe})}).on(Tn.ON_FILTER_CLICK,Q=>{var he,Me;const{filterFn:de,checked:Ce,column:F,index:oe}=Q;typeof de=="function"&&(s=de,R(s,n,i),(Me=(he=u.value)==null?void 0:he.reset)==null||Me.call(he)),t.emit(Pt.COLUMN_FILTER,{checked:Ce,column:F,index:oe})}).on(Tn.ON_SETTING_CHANGE,Q=>{const{checked:de=[],size:Ce,height:F}=Q;a.nextTick(()=>{var he,Me;ae(d.value);const oe=D();de.length&&Ac(d.value,p,20,oe),(Me=(he=u.value)==null?void 0:he.reset)==null||Me.call(he),t.emit(Pt.SETTING_CHANGE,{checked:de,size:Ce,height:F})})}).on(Tn.ON_ROW_EXPAND_CLICK,Q=>{const{row:de,column:Ce,index:F,rows:oe,e:he}=Q;t.emit(Pt.ROW_EXPAND_CLICK,{row:de[Ge.ROW_SOURCE_DATA],column:Ce,index:F,rows:oe,e:he}),k(de,!de[Ge.ROW_EXPAND])}).on(Tn.ON_ROW_CHECK,({row:Q,isAll:de,index:Ce,value:F})=>{de?(L(F),t.emit(Pt.ROW_SELECT_ALL,{checked:F,data:e.data})):(N(Q,F),t.emit(Pt.ROW_SELECT,{row:Q[Ge.ROW_SOURCE_DATA],index:Ce,checked:F,data:e.data})),t.emit(Pt.ROW_SELECT_CHANGE,{row:Q[Ge.ROW_SOURCE_DATA],isAll:de,index:Ce,checked:F,data:e.data})});const re=Q=>{var je;const de=(je=M.pos.bottom)!=null?je:0,Ce=Q[1],{translateX:F,translateY:oe,pos:he={}}=Ce;M.scrollTranslateY=oe,M.scrollTranslateX=F,M.pos=he;const{bottom:Me}=he;Me<=2&&de>Me&&Ns(60,()=>{t.emit(Pt.SCROLL_BOTTOM,Te(U({},he),{translateX:F,translateY:oe}))},!0)(),ie()};a.onMounted(()=>{o=ih(d.value,()=>{(e.height==="100%"||e.height==="auto")&&Y(d.value),ae(d.value);const Q=D();Ac(d.value,p,20,Q)},60,!0),o.start()}),a.onBeforeUnmount(()=>{o.stop(),o=null,W.destroy()}),t.expose({setRowExpand:k,clearSelection:I,toggleAllSelection:L,toggleRowSelection:N,getSelection:E});const pe=a.computed(()=>Te(U({},le),{"__is-empty":!O.length})),Ne=a.computed(()=>({[Ye("table-body-content")]:!0,"with-virtual-render":e.virtualEnabled})),te={column_drag_line:!0,"offset-x":!0},K=a.computed(()=>Te(U({},C.value),{left:`${y.value-M.scrollTranslateX}px`})),G={"scroll-loading":!0,_bottom:!0},ce=a.computed(()=>({[Ye("fixed-bottom-border")]:!0,"_is-empty":!e.data.length})),we={zIndex:-1,width:0,height:0,display:"none"},{renderScrollLoading:z}=Kp(e,t),B=a.computed(()=>e.virtualEnabled?{}:{scrollXName:"",scrollYName:""});return()=>{var Q,de;return a.createVNode("div",{class:$.value,style:ne.value,ref:d},[a.createVNode("div",{class:_,style:ee.value},[W.renderTableHeadSchema()]),a.createVNode(zr,a.mergeProps({ref:u,lineHeight:W.getRowHeight,class:pe.value,style:fe,list:O},B.value,{contentClassName:Ne.value,onContentScroll:re,throttleDelay:0,scrollEvent:!0,enabled:e.virtualEnabled}),{default:Ce=>W.renderTableBodySchema(Ce.data||e.data),afterSection:()=>a.createVNode("div",{class:ce.value},null)}),a.createVNode("div",{class:b},[x(M.scrollTranslateX,m.value),a.createVNode("div",{class:te,style:K.value},null),a.createVNode("div",{class:G},[z()])]),a.createVNode("div",{class:se.value},[V.value&&W.renderTableFooter(A.value)]),a.createVNode("div",{style:we},[(de=(Q=t.slots).default)==null?void 0:de.call(Q)])])}}});const oh=He(w5);He(eh);const ch=He(eh),Aa=12;function M5(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 I5(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 f=a.markRaw(s.value);t.value&&(f=f.reduce((d,u)=>{let m=[];return u.children&&(m=u.children.map(p=>U({group:{groupId:u[n.value],groupName:u[i.value]}},p))),d.concat(m)},[])),o.value=f,c.value=f.reduce((d,u)=>(d[u[n.value]]=u,d),{})},{immediate:!0}),{flatList:o,saveKeyMap:c}}const uh=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};var dh=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 N5=()=>({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:g.commonType(["focus","search"]).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:()=>({})}});var L5=a.defineComponent({name:"TagRender",props:{node:g.object,displayKey:g.string,tpl:{type:Function}},render(){return this.tpl?this.tpl(this.node,a.h,this):a.createVNode("div",{class:"tag"},[a.createVNode("span",{class:"text"},[this.node[this.displayKey]])])}}),k5=a.defineComponent({name:"TagInput",directives:{bkTooltips:yc},props:N5(),emits:["update:modelValue","change","select","blur","remove","removeAll"],setup(e,{emit:t}){const n=Jn(),i=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),s=a.reactive(U({isShow:!1,width:190,modifiers:[{name:"offset",options:{offset:[0,4]}}]},e.popoverProps)),{maxResult:o}=a.toRefs(e),{pageState:c,initPage:f,pageChange:d}=M5(o),u=a.ref(""),m=a.ref(null),p=a.ref(null),C=a.ref(null),y=a.ref(null),M=a.ref(null),T=a.ref(null),x=a.ref(null),k=a.computed(()=>!e.disabled&&e.hasDeleteIcon),v=a.computed(()=>e.maxData===1),b=a.computed(()=>N.selectedTagList.length===0&&u.value===""&&!i.isEdit),I=a.computed(()=>e.clearable&&!e.disabled&&N.selectedTagList.length!==0&&(e.showClearOnlyHover?i.isHover:!0)),L=a.computed(()=>({"bk-tag-input-trigger":!0,active:i.isEdit,disabled:e.disabled})),N=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),E=a.computed(()=>N.selectedTagList.map(F=>F[e.saveKey])),{flatList:O,saveKeyMap:A}=I5(e),R=a.computed(()=>{if(e.useGroup){const F={};return c.curPageList.forEach((oe,he)=>{oe.__index__=he,F[oe.group.groupId]||(F[oe.group.groupId]={id:oe.group.groupId,name:oe.group.groupName,children:[]}),F[oe.group.groupId].children.push(oe)}),Object.keys(F).map(oe=>F[oe])}return c.curPageList});a.watch([()=>O.value],()=>{a.nextTick(()=>{se()})}),a.watch(()=>e.modelValue,F=>{var oe;ee(E.value,F)||(a.nextTick(()=>{se()}),e.withValidate&&((oe=n==null?void 0:n.validate)==null||oe.call(n,"change")))}),a.watch(u,dt.exports.debounce(()=>{const F=c.curPageList.length!==0,{value:oe}=u;oe!==""&&F||oe===""&&e.trigger==="focus"&&F?s.isShow=!0:(e.trigger!=="focus"||!F)&&(s.isShow=!1)},150)),a.watch(()=>s.isShow,F=>{J(),F&&M.value&&(a.nextTick(()=>{M.value.scrollTop=0}),M.value.removeEventListener("scroll",$),M.value.addEventListener("scroll",$))}),a.onMounted(()=>{se()});const J=()=>{var oe,he;const F=v.value?0:(oe=y.value)==null?void 0:oe.offsetLeft;s.modifiers=[{name:"offset",options:{offset:[F,4]}}],(he=T.value)==null||he.update()},$=()=>{if(c.isPageLoading||M.value.scrollTop===0)return;const{scrollTop:F,offsetHeight:oe,scrollHeight:he}=M.value;if(F+oe>=he){const Me=c.curPage+1;Me<=c.totalPage&&(c.isPageLoading=!0,setTimeout(()=>{d(Me)},500))}},_=()=>{var oe;return Array.from(((oe=C.value)==null?void 0:oe.childNodes)||[]).filter(he=>he.nodeType!==Node.TEXT_NODE)},le=F=>{if(!e.disabled){if(F!=null&&F.target){const{className:oe}=F.target;(oe.indexOf("bk-tag-input-trigger")>-1||oe.indexOf("tag-list")>-1)&&C.value.appendChild(y.value)}clearTimeout(x.value),v.value&&E.value.length&&(N.tagListCache=[...E.value],N.selectedTagListCache=[...N.selectedTagList],u.value=N.selectedTagListCache[0][e.saveKey],Ce(N.selectedTagList[0],0),W()),i.isEdit=!0,a.nextTick(()=>{var oe;(oe=m.value)==null||oe.focus(),e.trigger==="focus"&&N.localList.length!==0&&(ne(),s.isShow?J():s.isShow=!0)})}},se=()=>{const{saveKey:F,modelValue:oe,displayKey:he,allowCreate:Me,trigger:je}=e;if(N.selectedTagList=[],N.localList=O.value,oe.length){const Be={};N.selectedTagList=oe.map(_e=>{const Tt=A.value[_e];return Be[_e]=1,!Tt&&Me?{[F]:_e,[he]:_e}:Tt}).filter(_e=>_e),v.value||(N.localList=N.localList.filter(_e=>!Be[_e[F]]))}je==="focus"&&ne()},ne=(F="")=>{const{searchKey:oe,filterCallback:he}=e,Me=F.toLowerCase().trim();if(Me===""){f(N.localList);return}let je=[];typeof he=="function"?je=he(Me,oe,N.localList)||[]:Array.isArray(oe)?je=N.localList.filter(Be=>oe.some(_e=>Be[_e].toLowerCase().indexOf(Me)>-1)):je=N.localList.filter(Be=>Be[oe].toLowerCase().indexOf(Me)>-1),f(je)},fe=(F,oe)=>{const he={"bk-selector-actived":!1,"bk-selector-selected":E.value.includes(F[e.saveKey])};return e.useGroup?he["bk-selector-actived"]=F.__index__===i.focusItemIndex:he["bk-selector-actived"]=oe===i.focusItemIndex,he};function ee(F,oe){return F.length!==oe.length?!1:oe.every((he,Me)=>F[Me]===he)}const ae=()=>{N.tagListCache=[],N.selectedTagListCache=[],N.selectedTagList=[]},Y=()=>{u.value=""},D=()=>{if(v.value)return 0;const oe=_().findIndex(({id:he})=>he==="tagInputItem");return oe>=0?oe:0},V=(F,oe,he=!1)=>{if(!oe||!F)return;let Me=oe;he&&(Me=oe.nextElementSibling||null),oe.parentNode.insertBefore(F,Me)},W=F=>{const{maxData:oe,trigger:he,allowCreate:Me}=e;if(oe===-1||oe>E.value.length){const{value:je}=F!=null&&F.target?F.target:u,Be=uh(je);Be?(ne(je),m.value.style.width=`${Be*Aa}px`):he==="focus"&&ne()}else re(),u.value="",s.isShow=!1;i.isEdit=!0,i.focusItemIndex=Me?-1:0},ie=()=>{var F;s.width=v.value?(F=p.value)==null?void 0:F.clientWidth:e.contentWidth},re=()=>{x.value=setTimeout(()=>{var oe;const F=u.value;if(Y(),i.isEdit=!1,v.value){const[he]=N.tagListCache;F&&F===he&&N.selectedTagListCache.length?de(N.selectedTagListCache[0],"select"):te("remove")}else if(e.allowAutoMatch&&F){const he=c.curPageList.find(Me=>Array.isArray(e.searchKey)?e.searchKey.map(Be=>Me[Be]).includes(F):Me[e.searchKey]===F);he?pe(he,"select"):e.allowCreate&&pe(F,"custom")}s.isShow=!1,t("blur",F,E.value),(oe=n==null?void 0:n.validate)==null||oe.call(n,"blur")},200)},pe=(F,oe,he)=>{he==null||he.stopPropagation(),!(!F||F.disabled)&&(v.value&&ae(),de(F,oe),te("select"),Y(),s.isShow=!1)},Ne=(F,oe,he)=>{he==null||he.stopPropagation(),Ce(F,oe),Y(),te("remove",F),m.value.style.width=`${Aa}px`},te=(F,oe)=>{t("change",E.value),t(F,oe),t("update:modelValue",E.value)},K=F=>{F.stopPropagation();const oe=N.selectedTagList;N.selectedTagList=[];const he=oe.filter(Me=>A.value[Me[e.saveKey]]);(e.allowCreate&&he.length!==0||!e.allowCreate)&&!v.value&&N.localList.push(...he),te("removeAll")},G=()=>{const F={height:M.value.clientHeight,yAxis:M.value.getBoundingClientRect().y};a.nextTick(()=>{const oe=M.value.querySelector(".bk-selector-actived");if(!oe)return;const he={height:oe.clientHeight,yAxis:oe.getBoundingClientRect().y};he.yAxis<F.yAxis&&(M.value.scrollTop=M.value.scrollTop-(F.yAxis-he.yAxis));const Me=he.yAxis+he.height-F.yAxis;Me>F.height&&(M.value.scrollTop=M.value.scrollTop+Me-F.height)})},ce=(F,oe)=>{const he=_();V(y.value,he[F-1]),N.selectedTagList.splice(F-1,1),le();const Me=A.value[oe[e.saveKey]];(e.allowCreate&&Me||!e.allowCreate)&&!v.value&&N.localList.push(oe),m.value=`${Aa}px`,te("remove")},we=F=>{if(c.isPageLoading)return;let oe;const he=F.target.value,Me=uh(he),je=D(),Be=_();switch(F.code){case"ArrowUp":if(F.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),G();break;case"ArrowDown":if(F.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),G();break;case"ArrowLeft":if(i.isEdit=!0,!Me){if(je<1)return;V(y.value,Be[je-1]),le()}break;case"ArrowRight":if(i.isEdit=!0,!Me){if(je===Be.length-1)return;V(Be[je+1],y.value),le()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&s.isShow||e.allowCreate&&i.focusItemIndex>=0&&s.isShow?pe(c.curPageList[i.focusItemIndex],"select",F):e.allowCreate&&pe(u.value,"custom",F),F.preventDefault();break;case"Backspace":je!==0&&!u.value&&(oe=N.selectedTagList[je-1],ce(je,oe));break}},z=F=>{const oe=[],he=F.split(";"),Me=/^[a-zA-Z][a-zA-Z_]*/g;return he.forEach(je=>{const Be=je.match(Me);if(Be){const _e=Be.join("");oe.push({[e.saveKey]:_e,[e.displayKey]:_e})}}),oe},B=F=>{if(F.preventDefault(),v.value)return!1;const{maxData:oe,saveKey:he,displayKey:Me,pasteFn:je,allowCreate:Be}=e,_e=F.clipboardData.getData("text");let at=(je?je(_e):z(_e)).map(it=>it[he]);if(at.length){const it=_(),Lt=D(),ct=N.localList.map(Re=>Re[he]);if(at=at.filter(Re=>{const zt=(Re==null?void 0:Re.trim())&&!E.value.includes(Re);return Be?zt:zt&&ct.includes(Re)}),oe!==-1){const Re=N.selectedTagList.length;if(Re<oe){const zt=oe-Re;at.length>zt&&(at=[...at.slice(0,zt)])}else at=[]}const st=Be?at.map(Re=>{const zt=N.localList.find(oa=>oa[he]===Re);return zt!=null?zt:{[he]:Re,[Me]:Re}}):N.localList.filter(Re=>at.includes(Re[he]));at.length&&(N.selectedTagList.splice(Lt,0,...st),V(y.value,it[Lt]),m.value.style.width=`${Aa}px`,N.localList=N.localList.filter(Re=>!at.includes(Re[he])),te("select"),le())}},Q=F=>{e.disabled||(V(y.value,F.currentTarget,!0),m.value.style.width=`${Aa}px`,s.isShow&&J())},de=(F,oe)=>{if(N.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:he,saveKey:Me,displayKey:je,createTagValidator:Be}=e,_e=D();let Tt=1,at=!1,it;const Lt=ct=>typeof Be=="function"?Be(ct):!0;if(oe==="custom")if(he){let ct=F.split(he);ct=ct.filter(Re=>(Re==null?void 0:Re.trim())&&!E.value.includes(Re)&&Lt(Re));const st=ct.map(Re=>A.value[Re]||{[Me]:Re,[je]:Re});ct.length&&(N.selectedTagList.splice(_e,0,...st),Tt=st.length,at=!0)}else{const ct=typeof F=="object";if(it=ct?F[Me]:F.trim(),it=it.replace(/\s+/g,""),it!==void 0&&!E.value.includes(it)&&Lt(it)){const st=A.value[it]||(ct?F:{[Me]:it,[je]:it});N.selectedTagList.splice(_e,0,st),at=!0}}else F&&(it=F[Me],it!==void 0&&!E.value.includes(it)&&(N.selectedTagList.splice(_e,0,F),at=!0));at&&a.nextTick(()=>{for(let ct=1;ct<=Tt;ct++){const Re=_()[_e+ct];V(Re,y.value)}if(m.value.style.width=`${Aa}px`,!v.value){e.allowNextFocus&&le();const ct=E.value.reduce((st,Re)=>(st[Re]=1,st),{});N.localList=N.localList.filter(st=>!ct[st[Me]])}})},Ce=(F,oe)=>{N.selectedTagList.splice(oe,1);const he=A.value[F[e.saveKey]];(e.allowCreate&&he||!e.allowCreate)&&!v.value&&N.localList.push(F)};return Te(U(U(U({popoverProps:s},a.toRefs(i)),a.toRefs(N)),a.toRefs(c)),{isShowPlaceholder:b,isShowClear:I,curInputValue:u,renderList:R,showTagClose:k,tagInputRef:m,bkTagSelectorRef:p,tagListRef:C,tagInputItemRef:y,selectorListRef:M,popoverRef:T,triggerClass:L,focusInputTrigger:le,activeClass:fe,handleInput:W,handleFocus:ie,handleBlur:re,handleTagSelected:pe,handleTagRemove:Ne,handleClear:K,tagFocus:Q,handleKeydown:we,handlePaste:B})},render(){return a.createVNode("div",{class:"bk-tag-input",ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode(Qs,a.mergeProps({ref:"popoverRef",theme:"light",trigger:"manual",placement:"bottom-start","content-cls":"bk-tag-input-popover-content",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};return a.withDirectives(a.createVNode("li",{class:"tag-item",onClick:this.tagFocus},[a.createVNode(L5,{node:i,tpl:this.tagTpl,displayKey:this.displayKey},null),this.showTagClose?a.createVNode(Qn,{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]])]),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(Gt,{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(dh,{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(dh,{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(Ii,{theme:"primary",size:Rn.Small},null)]):null])])})])}});const fh=He(k5),T5={direction:g.commonType(["horizontal","vertical"],"direction").def("horizontal"),align:g.commonType(["left","center","right"],"align").def("center"),color:g.string.def("#dde4eb"),width:g.number.def(1),type:g.commonType(["dashed","solid"],"lineType").def("dashed")};var x5=a.defineComponent({name:"Divider",props:T5,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:["bk-divider-info",`bk-divider-info-${this.align}`]},[this.$slots.default()])),a.createVNode("div",{class:["bk-divider",`bk-divider-${this.direction}`],style:e()},[t])}});const hh=He(x5),S5={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},D5={active:g.oneOfType([g.number,g.string]).def(""),type:g.commonType(["card","border-card","unborder-card"],"type").def("border-card"),tabPosition:g.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:g.commonType(["replace","insert","top"],"sortType").def("replace"),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)},j5=U({active:g.oneOfType([g.number,g.string]).def(""),panels:{type:Array,default:()=>[]},tabPosition:g.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:g.commonType(["replace","insert","top"],"sortType").def("replace"),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)},S5),z5={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:g.commonType(["if","show"],"render").def("show"),panel:g.string||g.func};var gh=a.defineComponent({name:"TabNav",props:j5,setup(e){const t=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const f=[];let d=!1;return e.panels.filter((u,m)=>{if(!u.props)return null;const{name:p,label:C,closable:y,visible:M,disabled:T,sortable:x}=u.props;if(!M)return!1;e.active===p&&(d=!0);const k=v=>u.slots.label?a.h(u.slots.label):[void 0,""].includes(v)?`\u9009\u9879\u5361${m+1}`:typeof v=="string"?v:typeof v=="function"?a.h(v):v;return f.push({name:p,closable:y,visible:M,disabled:T,sortable:x,tabLabel:k(C)}),!0}),!d&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),f}),n=a.ref(-1),i=a.ref(-1),s=a.ref(""),o=(f,d)=>f===d;return Te(U({},{handleTabAdd(f){e.tabAdd(f)},dragstart(f,d){i.value=f,s.value=e.guid,Object.assign(d.dataTransfer,{effectAllowed:"move"}),e.tabDrag(f,d)},dragenter(f){o(s.value,e.guid)&&(n.value=f)},dragend(){n.value=-1,i.value=-1,s.value=null},drop(f,d){if(!o(s.value,e.guid))return!1;e.tabSort(i.value,f,d)},handleTabChange(f){e.tabChange(f)},handleTabRemove(f,d){e.tabRemove(f,d)}}),{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:f,dragend:d,drop:u}=this,m=()=>this.navs.map((C,y)=>{if(!C)return null;const{name:M,disabled:T,tabLabel:x}=C,k=()=>{const b=["bk-tab-header-item"];return T&&b.push("bk-tab-header--disabled"),e===M&&b.push("bk-tab-header--active"),b.join(" ")},v=(b,I)=>b||I;return a.createVNode("div",{key:M,onClick:()=>this.handleTabChange(M),draggable:v(C.sortable,i),onDragstart:b=>c(y,b),onDragenter:b=>{b.preventDefault(),f(y)},onDragleave:b=>{b.preventDefault()},onDragover:b=>{b.preventDefault()},onDragend:b=>{b.preventDefault(),d()},onDrop:b=>{b.preventDefault(),u(y,s)},class:k()},[a.createVNode("div",null,[x]),v(C.closable,t)&&a.createVNode(Gt,{class:"bk-tab-header-item-close",onClick:()=>this.handleTabRemove(y,C)},null)])}),p=()=>{var y,M;const C=[];return typeof this.$slots.add=="function"?C.push((M=(y=this.$slots).add)==null?void 0:M.call(y,a.h)):n&&C.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(Es,{width:26,height:26},null)])),C.length?a.createVNode("div",{class:"bk-tab-header-operation"},[C.map((T,x)=>a.createVNode("div",{class:"bk-tab-header-item",key:x},[T]))]):null};return a.createVNode("div",{style:{lineHeight:`${o}px`},class:"bk-tab-header"},[a.createVNode("div",{class:"bk-tab-header-nav"},[m()]),p(),typeof this.$slots.setting=="function"&&a.createVNode("div",{class:"bk-tab-header-setting"},[this.$slots.setting()])])}}),O5=a.defineComponent({name:"Tab",components:{TabNav:gh},props:D5,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=(u,m=[])=>{const{children:p}=u;return(p||[]).forEach(C=>{let{type:y}=C;y=y.name||y,y==="TabPanel"&&C.component?m.push(C.component):(y===a.Fragment||y==="template")&&c(C,m)}),m},f=()=>{if(t.default){const{children:u}=o.subTree.children[1];if(!u)return;const m=u[0],p=c(m);p.length!==s.value.length&&(s.value=p)}};return a.onMounted(()=>{f(),i.value=!0}),a.onUpdated(()=>{f()}),Te(U({},{tabAdd(u){n("add",{e:u}),n("add-panel",{e:u})},tabChange(u){n("change",u),n("tab-change",u),n("update:active",u)},tabRemove(u,m){n("remove",u,m),n("remove-panel",u,m)},tabSort(u,m,p){const C=s.value;if(p==="insert")if(u<m)C.splice(m+1,0,s[u]),C.splice(u,1);else if(u>m)C.splice(m,0,s[u]),C.splice(u+1,1);else return!1;else{const y=C[m];C[m]=C[u],C[u]=y}s.value=[...C],n("sort",u,m,p),n("sort-change",u,m,p)},tabDrag(u,m){n("drag",u,m),n("on-drag-tab",u,m)}}),{isMounted:i,panels:s})},render(){var n,i;const e=()=>this.tabPosition==="top"?`bk-tab bk-tab--${this.tabPosition} bk-tab--${this.type} ${this.extCls}`:`bk-tab bk-tab--${this.tabPosition} ${this.extCls}`,t=()=>{const{panels:s,active:o,type:c,closable:f,addable:d,sortable:u,sortType:m,labelHeight:p,scrollStep:C,validateActive:y,changeOnHover:M,changeOnHoverDelay:T,tabPosition:x,tabAdd:k,tabChange:v,tabRemove:b,tabSort:I,tabDrag:L}=this,N={panels:s,active:o,type:c,closable:f,addable:d,sortable:u,sortType:m,labelHeight:p,scrollStep:C,validateActive:y,changeOnHover:M,changeOnHoverDelay:T,tabPosition:x,tabAdd:k,tabChange:v,tabRemove:b,tabSort:I,tabDrag:L};return!s||!Array.isArray(s)?null:a.createVNode(gh,N,this.$slots)};return a.createVNode("div",{class:e()},[t(),a.createVNode("div",{class:"bk-tab-content"},[(i=(n=this.$slots).default)==null?void 0:i.call(n)])])}}),E5=a.defineComponent({name:"TabPanel",props:z5,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:"bk-tab-panel"},[t()]),[[a.vShow,e]])}});const mh=Ft(O5,{TabPanel:E5}),Di={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let ph=1;const yh=(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:f=10}=n;Di[i].forEach(C=>{c+=(C.el.offsetHeight||0)+f}),ph+=1;const d=`message_${ph}`;n=Te(U({},n),{offsetX:o,offsetY:c,id:d});const u=document.createElement("div"),m=a.createVNode(e,n);m.props.onDestroy=C=>{P5(C,i,f,s),a.render(null,u)},a.render(m,u),Di[i].push(m);let p;m.props.getContainer&&ka(m.props.getContainer)?p=m.props.getContainer:p=document.body,p.appendChild(u.firstElementChild)};function P5(e,t,n,i){i==null||i();const s=t.startsWith("top")?"top":"bottom";let o=-1;Di[t].forEach((u,m)=>{u.props.id===e&&(o=m)});const f=Di[t][o].el.offsetHeight,d=Di[t].length;for(let u=o;u<d;u++){const m=parseInt(Di[t][u].el.style[s],10)-f-n;Di[t][u].component.props.offsetY=m}Di[t].splice(o,1)}const A5={id:g.string.def(""),message:g.string.def(""),theme:g.theme(["primary","warning","success","error"]).def("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 V5=a.defineComponent({name:"Message",props:A5,emits:["destroy"],setup(e,{emit:t}){const n=a.computed(()=>["bk-message",`bk-message-${e.theme}`,`${e.extCls}`]),i=In.getMessageNextIndex(),s=a.computed(()=>e.getContainer&&ka(e.getContainer)),o=a.computed(()=>({top:`${e.offsetY}px`,zIndex:i,position:s.value?"absolute":"fixed"})),c=a.ref(!1);let f=null;const d=()=>{f=setTimeout(()=>{c.value=!1},e.delay)},u=m=>{m.preventDefault(),m.stopPropagation(),c.value=!1};return a.onMounted(()=>{e.delay&&d(),c.value=!0}),a.onUnmounted(()=>{clearTimeout(f)}),a.watch(c,()=>{c.value||t("destroy",e.id)}),{classNames:n,styles:o,visible:c,close:u}},render(){const e=()=>({primary:a.createVNode(Os,null,null),warning:a.createVNode(Nr,null,null),success:a.createVNode(Mr,null,null),error:a.createVNode(Gt,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(Qn,{class:"bk-message-close",onClick:this.close},null)]),[[a.vShow,this.visible]])]})}});const bh=e=>{yh(V5,e)},Ch=e=>{const t=document.createElement("div"),n=a.ref(!1),i=a.shallowRef(e),s=a.defineComponent({name:"DialogConfirm",setup(f,{expose:d}){a.onMounted(()=>{(document.activeElement||document.body).blur(),i.value.isShow!==!1&&(n.value=!0)});const u=async()=>{var y,M;typeof((y=i.value)==null?void 0:y.onClosed)=="function"&&await((M=i.value)==null?void 0:M.onClosed()),n.value=!1},m=async()=>{var y,M;typeof((y=i.value)==null?void 0:y.onConfirm)=="function"&&await((M=i.value)==null?void 0:M.onConfirm()),n.value=!1};function p(y){i.value=y}d({update:p});const C=()=>{const y=[],M=[];if(i.value.subTitle)switch(typeof i.value.subTitle){case"string":y.push(i.value.subTitle);break;case"function":y.push(i.value.subTitle());break;default:y.push(i.value.subTitle);break}return y.length&&M.push(a.h("div",{class:"bk-info-sub-title",style:`text-Align:${i.value.contentAlign||"center"}`},y)),M};return()=>a.createVNode(Zf,Te(U({class:"bk-info-wrapper",headerAlign:"center",footerAlign:"center"},i.value),{isShow:n.value,onClosed:u,onConfirm:m}),C())}}),o=a.createApp(s).mount(t);return{show:()=>{n.value=!0},hide:()=>{n.value=!1},update:f=>{o.update(f)}}},J5={id:g.string.def(""),title:g.string.def(""),message:g.string.def(""),theme:g.theme(["primary","warning","success","error"]).def("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 Q5=a.defineComponent({name:"Notify",props:J5,emits:["destroy"],setup(e,{emit:t}){const n=In.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]),f=a.ref(!1);let d=null;const u=()=>{d=setTimeout(()=>{f.value=!1},e.delay)},m=()=>{f.value=!1};return a.onMounted(()=>{e.delay&&u(),f.value=!0}),a.onUnmounted(()=>{clearTimeout(d)}),a.watch(f,()=>{f.value||t("destroy",e.id)}),{classNames:c,styles:o,visible:f,handleClose:m}},render(){const e=()=>({primary:a.createVNode(Os,null,null),warning:a.createVNode(Nr,null,null),success:a.createVNode(Mr,null,null),error:a.createVNode(Gt,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.message])]),this.dismissable&&a.createVNode(Qn,{class:"bk-notify-icon bk-notify-close",onClick:this.handleClose},null)]),[[a.vShow,this.visible]])]})}});const vh=e=>{yh(Q5,e)},wh=Symbol("MENU_PROVIDER_KEY"),Rc=Symbol("MENU_PROVIDER_KEY_PATH"),R5=e=>{a.provide(wh,e)},_5=e=>{const{parentKeys:t,parentInfo:n}=_c(),i=a.computed(()=>[...t.value,e]);a.provide(Rc,{parentInfo:{key:e,parentKey:n==null?void 0:n.key},parentKeys:i})},Mh=()=>a.inject(wh),_c=()=>{var n;const e=a.getCurrentInstance(),t=e.parent?e.parent.provides:(n=e.vnode.appContext)==null?void 0:n.provides;return t&&Rc in t?a.inject(Rc):{parentInfo:void 0,parentKeys:a.ref([])}},Wc=function(e){return(e||"").split(" ").filter(t=>!!t.trim())};function Ih(e,t){if(!e||!t)return;const n=Wc(t);let i=e.getAttribute("class")||"";if(e.classList){e.classList.remove(...n);return}n.forEach(o=>{i=i.replace(` ${o} `," ")});const s=Wc(i).join(" ");e.setAttribute("class",s)}function Nh(e,t){if(!e)return;let n=e.getAttribute("class")||"";const i=Wc(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 W5=()=>({css:!0,onBeforeEnter:e=>{Nh(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,Ih(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&&(Nh(e,"collapse-transition"),e.style.transitionProperty="height",e.style.height="0px",e.style.maxHeight="0px")},onAfterLeave:e=>{Ih(e,"collapse-transition"),e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow}}),H5={activeKey:String,collapse:Boolean,openedKeys:{type:Array},mode:{type:String,default:"vertical"},uniqueOpen:{type:Boolean,default:!0}};var B5=a.defineComponent({name:"Menu",props:H5,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({}),f=a.computed(()=>e.mode),d=a.ref(e.collapse),u=a.ref([]);a.watchEffect(()=>{e.activeKey!==void 0&&(s.value=e.activeKey)}),a.watch(()=>e.collapse,()=>{d.value=e.collapse,console.info(e.collapse);const M=[...u.value],T=[...o.value];o.value=d.value?[]:M,u.value=d.value?T:[]},{immediate:!0}),a.watch(()=>e.openedKeys,(M=o.value)=>{o.value=M},{immediate:!0});const m=(M,T)=>{c.value=Te(U({},c.value),{[M]:T})},p=M=>{delete c.value[M],c.value=U({},c.value)},C=(M,T)=>{T?e.uniqueOpen?o.value=[M]:o.value.push(M):o.value=o.value.filter(x=>x!==M),n("openChange",T,c.value[M]),n("update:openKeys",[...o.value])},y=M=>{s.value=M,n("click",c.value[M]),n("update:activeKey",M,c.value[M])};return R5({activeKey:s,menuStore:c,registerMenuInfo:m,unregisterMenuInfo:p,mode:f.value,openedKeys:o,collapse:d,handleOpenChange:C,handleActiveChange:y}),i({activeKey:s,openedKeys:o,menuStore:c}),()=>{var M;return a.createVNode("div",{class:{"bk-menu":!0,"is-collapse":d.value}},[(M=t.default)==null?void 0:M.call(t)])}}}),F5=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)])])}}}),G5=a.defineComponent({name:"MenuItem",props:{needIcon:{type:Boolean,default:!0}},emits:["click"],slots:["icon"],setup(e,{slots:t,emit:n}){var y,M;const{registerMenuInfo:i,unregisterMenuInfo:s,activeKey:o,handleActiveChange:c}=Mh(),f=a.getCurrentInstance(),{parentInfo:d}=_c(),u=((M=(y=f.vnode.key)==null?void 0:y.toString)==null?void 0:M.call(y))||String(f.uid),m=a.computed(()=>o.value===u),p=a.computed(()=>e.needIcon);i(u,{key:u,parentKey:d==null?void 0:d.key});const C=T=>{c(u),n("click",T)};return a.onBeforeUnmount(()=>s(u)),()=>{var T,x;return a.createVNode("li",{class:{"bk-menu-item":!0,"is-active":m.value},onClick:C},[p.value&&a.createVNode("span",{class:"item-icon"},[((T=t==null?void 0:t.icon)==null?void 0:T.call(t))||a.createVNode("i",{class:"default-icon"},null)]),a.createVNode("span",{class:"item-content"},[(x=t.default)==null?void 0:x.call(t)])])}}});const Z5={title:{type:String,default:"title"}};var Y5=a.defineComponent({name:"Submenu",props:Z5,emits:["collapse"],slots:["icon"],setup(e,{slots:t,emit:n}){var k,v;const{registerMenuInfo:i,unregisterMenuInfo:s,openedKeys:o,handleOpenChange:c,collapse:f,activeKey:d,menuStore:u}=Mh(),{parentInfo:m}=_c(),p=a.getCurrentInstance(),C=((v=(k=p.vnode.key)==null?void 0:k.toString)==null?void 0:v.call(k))||String(p.uid),y=a.ref(W5()),M=a.computed(()=>o.value.includes(C)),T=a.computed(()=>{var I,L;const b=(L=(I=u.value)==null?void 0:I[d.value])==null?void 0:L.parentKey;return f.value&&b===C&&M});_5(C),i(C,{key:C,parentKey:m==null?void 0:m.key}),a.onBeforeUnmount(()=>s(C));const x=()=>{c(C,!M.value),n("collapse",!M.value,p)};return()=>{var b;return a.createVNode("li",{class:{"bk-menu-submenu":!0,"is-opened":M.value}},[a.createVNode("div",{class:{"submenu-header":!0,"is-collapse":T.value},onClick:x},[a.createVNode("span",{class:"submenu-header-icon"},[((b=t.icon)==null?void 0:b.call(t))||a.createVNode(ec,{class:"menu-icon"},null)]),a.createVNode("span",{class:"submenu-header-content"},[e.title]),a.createVNode(Ls,{class:{"submenu-header-collapse":!0,"is-collapse":o.value.includes(C)}},null)]),a.createVNode(a.Transition,y.value,{default:()=>{var I;return[a.withDirectives(a.createVNode("ul",{class:"submenu-list"},[(I=t.default)==null?void 0:I.call(t)]),[[a.vShow,M.value]])]}})])}}});const Lh=Ft(B5,{Item:G5,Submenu:Y5,Group:F5}),U5={sideTitle:{type:String,default:""},navigationType:{type:String,default:"left-right"}};var kh=a.defineComponent({props:U5,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 $5={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 K5=a.defineComponent({name:"Navigation",props:$5,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,f,d,u,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(kh,{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(kh,{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(Ho,{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"},[(f=(c=this.$slots)["header-set"])==null?void 0:f.call(c)])]]),a.createVNode("div",{class:"container-content",style:{maxHeight:`calc(100vh - ${this.headHeight}px)`}},[(u=(d=this.$slots).default)==null?void 0:u.call(d),a.createVNode("div",{class:"container-footer"},[(p=(m=this.$slots).footer)==null?void 0:p.call(m)])])])])])}});const Th=He(K5),X5={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 Hc=a.defineComponent({props:X5,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 d=n;d.isShow&&d.hide(),d.destroy(),n=null,t("changeVisible",!1)}},o=()=>{n&&Object.keys(n).length!==0?a.nextTick(()=>{n.update()}):a.nextTick(()=>{n=new yf(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 d={};return e.appendToBody&&(d["z-index"]=1060+In.getModalNextIndex()),d}),f=a.reactive({styles:c});return Te(U({},a.toRefs(f)),{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 q5={showTime:{type:Boolean,required:!0},isTime:{type:Boolean,default:!1},timeDisabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}};var ey=a.defineComponent({props:q5,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:d=>{const m=[...c.value.children][d.shiftKey?"shift":"pop"]();document.activeElement===m&&(d.preventDefault(),d.stopPropagation())}}},render(){return a.createVNode("div",{class:"bk-picker-confirm",ref:"elRef",onKeydown:this.handleTab},[this.showTime?a.createVNode("a",{href:"javascript: void(0);",class:"bk-picker-confirm-time",onClick:this.handleToggleTime},[this.labels.time]):"",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])])}}),xh=1e3*60*60*24;function Sh(e,t){return new Date(e,t+1,0).getDate()}function Dh(e,t,n){return t===0&&n>50?e-1:t===11&&n<10?e+1:e}function jh(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),f=1+Math.round((s-c)/xh);i||(f+=c.getDay());var d=Math.ceil(f/7);if(!i){var u=new Date(e,t,n),m=new Date(e+1,0,1),p=m.getDay();u.getTime()>=m.getTime()-xh*p&&(d=1)}return d}function ty(e,t,n){for(var i=this.lang||"en",s=this.onlyDays,o=typeof this.weekStart=="undefined"?1:this.weekStart,c=o===1,f=[],d=new Date(e,t,1),u=d.getDay()||(c?7:0),m=o-u,p=jh(e,t,1,c),C=Sh(e,t),y=Sh(e,t-1),M,T,x,k=Dh(e,t,p),v={month:t,year:e,daysInMonth:C},b=0;b<7;b++){x=m;for(var I=0;I<8;I++){b>0&&I>0&&m++,m>C||m<1?(T=m>C?m-C:y+m,M=m>C?t+1:t-1):(T=m,M=t);var L=function(){return I===0?"weekLabel":b===0?"dayLabel":m<1?"prevMonth":m>C?"nextMonth":"monthDay"}(),N=x!==m&&b>0,E={desc:N?T:p,week:p,type:L,format:c?"ISO 8601":"US",date:N?new Date(Date.UTC(e,M,T)):!1,year:k,index:f.length};n&&(typeof n=="function"?E=n.call(v,E,i):n.forEach(function(O){E=O.call(v,E,i)})),s&&N?f.push(E):s||f.push(E)}b>0&&(p=jh(e,M,T+1,c)),k=Dh(e,t,p)}return v.cells=f,v}var ny=function(e){return ty.bind(e)},iy={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"}},Hn=iy;function ay(e){return e==null?!1:e.constructor===Array||e.constructor===Object}function zh(e,t){for(var n in e)t[n]?ay(e[n])&&zh(e[n],t[n]):t[n]=e[n]}function Oh(e,t){var n=[Hn.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&&Hn.weekPlaceholder?e.desc=Hn.weekPlaceholder:e.index<8?e.desc=Hn.columnNames[t][e.index]:e.index%8==0&&(e.desc=e.week)),e.date&&(e.monthName=Hn.monthNames[t][e.date.getMonth()]),this.monthName||(this.monthName=Hn.monthNames[t][this.month]),this.labels||(this.labels={monthNames:Hn.monthNames[t],columnNames:Hn.columnNames[t],classes:Hn.classes}),e}Oh.setLabels=function(e){zh(e,Hn)};var ry=Oh,sy={Generator:ny,addLabels:ry};function hn(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 At(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function xn(e){At(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 ly(e,t){At(2,arguments);var n=xn(e).getTime(),i=hn(t);return new Date(n+i)}function oy(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 cy(e){return At(1,arguments),e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function uy(e){if(At(1,arguments),!cy(e)&&typeof e!="number")return!1;var t=xn(e);return!isNaN(Number(t))}var dy={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"}},fy=function(e,t,n){var i,s=dy[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},hy=fy;function Bc(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 gy={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},my={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},py={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yy={date:Bc({formats:gy,defaultWidth:"full"}),time:Bc({formats:my,defaultWidth:"full"}),dateTime:Bc({formats:py,defaultWidth:"full"})},by=yy,Cy={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},vy=function(e,t,n,i){return Cy[e]},wy=vy;function Pr(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,f=i.width?String(i.width):c;o=e.formattingValues[f]||e.formattingValues[c]}else{var d=e.defaultWidth,u=i.width?String(i.width):e.defaultWidth;o=e.values[u]||e.values[d]}var m=e.argumentCallback?e.argumentCallback(t):t;return o[m]}}var My={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Iy={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ny={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"]},Ly={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"]},ky={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"}},Ty={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"}},xy=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"},Sy={ordinalNumber:xy,era:Pr({values:My,defaultWidth:"wide"}),quarter:Pr({values:Iy,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Pr({values:Ny,defaultWidth:"wide"}),day:Pr({values:Ly,defaultWidth:"wide"}),dayPeriod:Pr({values:ky,defaultWidth:"wide",formattingValues:Ty,defaultFormattingWidth:"wide"})},Dy=Sy;function Ar(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],f=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(f)?zy(f,function(p){return p.test(c)}):jy(f,function(p){return p.test(c)}),u;u=e.valueCallback?e.valueCallback(d):d,u=n.valueCallback?n.valueCallback(u):u;var m=t.slice(c.length);return{value:u,rest:m}}}function jy(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function zy(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function Oy(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 f=t.slice(s.length);return{value:c,rest:f}}}var Ey=/^(\d+)(th|st|nd|rd)?/i,Py=/\d+/i,Ay={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},Vy={any:[/^b/i,/^(a|c)/i]},Jy={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Qy={any:[/1/i,/2/i,/3/i,/4/i]},Ry={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},_y={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]},Wy={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},Hy={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]},By={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},Fy={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}},Gy={ordinalNumber:Oy({matchPattern:Ey,parsePattern:Py,valueCallback:function(e){return parseInt(e,10)}}),era:Ar({matchPatterns:Ay,defaultMatchWidth:"wide",parsePatterns:Vy,defaultParseWidth:"any"}),quarter:Ar({matchPatterns:Jy,defaultMatchWidth:"wide",parsePatterns:Qy,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Ar({matchPatterns:Ry,defaultMatchWidth:"wide",parsePatterns:_y,defaultParseWidth:"any"}),day:Ar({matchPatterns:Wy,defaultMatchWidth:"wide",parsePatterns:Hy,defaultParseWidth:"any"}),dayPeriod:Ar({matchPatterns:By,defaultMatchWidth:"any",parsePatterns:Fy,defaultParseWidth:"any"})},Zy=Gy,Yy={code:"en-US",formatDistance:hy,formatLong:by,formatRelative:wy,localize:Dy,match:Zy,options:{weekStartsOn:0,firstWeekContainsDate:1}},Uy=Yy;function $y(e,t){At(2,arguments);var n=hn(t);return ly(e,-n)}var Ky=864e5;function Xy(e){At(1,arguments);var t=xn(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/Ky)+1}function rl(e){At(1,arguments);var t=1,n=xn(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 Eh(e){At(1,arguments);var t=xn(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var s=rl(i),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var c=rl(o);return t.getTime()>=s.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}function qy(e){At(1,arguments);var t=Eh(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=rl(n);return i}var eb=6048e5;function tb(e){At(1,arguments);var t=xn(e),n=rl(t).getTime()-qy(t).getTime();return Math.round(n/eb)+1}function sl(e,t){At(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.weekStartsOn,o=s==null?0:hn(s),c=n.weekStartsOn==null?o:hn(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=xn(e),d=f.getUTCDay(),u=(d<c?7:0)+d-c;return f.setUTCDate(f.getUTCDate()-u),f.setUTCHours(0,0,0,0),f}function Ph(e,t){At(1,arguments);var n=xn(e),i=n.getUTCFullYear(),s=t||{},o=s.locale,c=o&&o.options&&o.options.firstWeekContainsDate,f=c==null?1:hn(c),d=s.firstWeekContainsDate==null?f:hn(s.firstWeekContainsDate);if(!(d>=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=new Date(0);u.setUTCFullYear(i+1,0,d),u.setUTCHours(0,0,0,0);var m=sl(u,t),p=new Date(0);p.setUTCFullYear(i,0,d),p.setUTCHours(0,0,0,0);var C=sl(p,t);return n.getTime()>=m.getTime()?i+1:n.getTime()>=C.getTime()?i:i-1}function nb(e,t){At(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.firstWeekContainsDate,o=s==null?1:hn(s),c=n.firstWeekContainsDate==null?o:hn(n.firstWeekContainsDate),f=Ph(e,t),d=new Date(0);d.setUTCFullYear(f,0,c),d.setUTCHours(0,0,0,0);var u=sl(d,t);return u}var ib=6048e5;function ab(e,t){At(1,arguments);var n=xn(e),i=sl(n,t).getTime()-nb(n,t).getTime();return Math.round(i/ib)+1}function tt(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var rb={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return tt(t==="yy"?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):tt(n+1,2)},d:function(e,t){return tt(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 tt(e.getUTCHours()%12||12,t.length)},H:function(e,t){return tt(e.getUTCHours(),t.length)},m:function(e,t){return tt(e.getUTCMinutes(),t.length)},s:function(e,t){return tt(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 tt(s,t.length)}},ji=rb,Va={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},sb={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=Ph(e,i),o=s>0?s:1-s;if(t==="YY"){var c=o%100;return tt(c,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):tt(o,t.length)},R:function(e,t){var n=Eh(e);return tt(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return tt(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 tt(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 tt(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 tt(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=ab(e,i);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):tt(s,t.length)},I:function(e,t,n){var i=tb(e);return t==="Io"?n.ordinalNumber(i,{unit:"week"}):tt(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=Xy(e);return t==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):tt(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 tt(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 tt(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 tt(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=Va.noon:i===0?s=Va.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=Va.evening:i>=12?s=Va.afternoon:i>=4?s=Va.morning:s=Va.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"}):tt(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return i===0&&(i=24),t==="ko"?n.ordinalNumber(i,{unit:"hour"}):tt(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 Vh(o);case"XXXX":case"XX":return na(o);case"XXXXX":case"XXX":default:return na(o,":")}},x:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();switch(t){case"x":return Vh(o);case"xxxx":case"xx":return na(o);case"xxxxx":case"xxx":default:return na(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"+Ah(o,":");case"OOOO":default:return"GMT"+na(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"+Ah(o,":");case"zzzz":default:return"GMT"+na(o,":")}},t:function(e,t,n,i){var s=i._originalDate||e,o=Math.floor(s.getTime()/1e3);return tt(o,t.length)},T:function(e,t,n,i){var s=i._originalDate||e,o=s.getTime();return tt(o,t.length)}};function Ah(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+tt(o,2)}function Vh(e,t){if(e%60===0){var n=e>0?"-":"+";return n+tt(Math.abs(e)/60,2)}return na(e,t)}function na(e,t){var n=t||"",i=e>0?"-":"+",s=Math.abs(e),o=tt(Math.floor(s/60),2),c=tt(s%60,2);return i+o+n+c}var lb=sb;function Jh(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 Qh(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 ob(e,t){var n=e.match(/(P+)(p+)?/)||[],i=n[1],s=n[2];if(!s)return Jh(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}}",Jh(i,t)).replace("{{time}}",Qh(s,t))}var cb={p:Qh,P:ob},ub=cb,db=["D","DD"],fb=["YY","YYYY"];function hb(e){return db.indexOf(e)!==-1}function gb(e){return fb.indexOf(e)!==-1}function Rh(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 mb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yb=/^'([^]*?)'?$/,bb=/''/g,Cb=/[a-zA-Z]/;function vb(e,t,n){At(2,arguments);var i=String(t),s=n||{},o=s.locale||Uy,c=o.options&&o.options.firstWeekContainsDate,f=c==null?1:hn(c),d=s.firstWeekContainsDate==null?f:hn(s.firstWeekContainsDate);if(!(d>=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=o.options&&o.options.weekStartsOn,m=u==null?0:hn(u),p=s.weekStartsOn==null?m:hn(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 C=xn(e);if(!uy(C))throw new RangeError("Invalid time value");var y=oy(C),M=$y(C,y),T={firstWeekContainsDate:d,weekStartsOn:p,locale:o,_originalDate:C},x=i.match(pb).map(function(k){var v=k[0];if(v==="p"||v==="P"){var b=ub[v];return b(k,o.formatLong,T)}return k}).join("").match(mb).map(function(k){if(k==="''")return"'";var v=k[0];if(v==="'")return wb(k);var b=lb[v];if(b)return!s.useAdditionalWeekYearTokens&&gb(k)&&Rh(k,t,e),!s.useAdditionalDayOfYearTokens&&hb(k)&&Rh(k,t,e),b(M,k,o.localize,T);if(v.match(Cb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return k}).join("");return x}function wb(e){return e.match(yb)[1].replace(bb,"'")}const Nt={},_h=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,ia=/\d\d?/,Mb=/\d{3}/,Ib=/\d{4}/,ll=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Wh=function(){};function Hh(e,t){const n=[];for(let i=0,s=e.length;i<s;i++)n.push(e[i].substr(0,t));return n}function Bh(e){return(t,n,i)=>{const s=i[e].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~s&&(t.month=s)}}function Bn(e,t=2){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}const Fh=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Gh=["January","February","March","April","May","June","July","August","September","October","November","December"],Nb=Hh(Gh,3),Lb=Hh(Fh,3);Nt.i18n={dayNamesShort:Lb,dayNames:Fh,monthNamesShort:Nb,monthNames:Gh,amPm:["am","pm"],DoFn(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10)*e%10]}};const Zh={D(e){return e.getDay()},DD(e){return Bn(e.getDay())},Do(e,t){return t.DoFn(e.getDate())},d(e){return e.getDate()},dd(e){return Bn(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 Bn(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 Bn(e.getHours()%12||12)},H(e){return e.getHours()},HH(e){return Bn(e.getHours())},m(e){return e.getMinutes()},mm(e){return Bn(e.getMinutes())},s(e){return e.getSeconds()},ss(e){return Bn(e.getSeconds())},S(e){return Math.round(e.getMilliseconds()/100)},SS(e){return Bn(Math.round(e.getMilliseconds()/10),2)},SSS(e){return Bn(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?"-":"+")+Bn(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)}},ht={d:[ia,(e,t)=>{e.day=t}],M:[ia,(e,t)=>{e.month=t-1}],yy:[ia,(e,t)=>{const i=+`${new Date().getFullYear()}`.substr(0,2);e.year=`${t>68?i-1:i}${t}`}],h:[ia,(e,t)=>{e.hour=t}],m:[ia,(e,t)=>{e.minute=t}],s:[ia,(e,t)=>{e.second=t}],yyyy:[Ib,(e,t)=>{e.year=t}],S:[/\d/,(e,t)=>{e.millisecond=t*100}],SS:[/\d{2}/,(e,t)=>{e.millisecond=t*10}],SSS:[Mb,(e,t)=>{e.millisecond=t}],D:[ia,Wh],ddd:[ll,Wh],MMM:[ll,Bh("monthNamesShort")],MMMM:[ll,Bh("monthNames")],a:[ll,(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)}]};ht.DD=ht.D,ht.dddd=ht.ddd,ht.Do=ht.dd=ht.d,ht.mm=ht.m,ht.hh=ht.H=ht.HH=ht.h,ht.MM=ht.M,ht.ss=ht.s,ht.A=ht.a,Nt.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"},Nt.format=(e,t,n)=>{const i=n||Nt.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=Nt.masks[t]||t||Nt.masks.default,t.replace(_h,s=>s in Zh?Zh[s](e,i):s.slice(1,s.length-1))},Nt.parse=(e,t,n)=>{const i=n||Nt.i18n;if(typeof t!="string")throw new Error("Invalid format in fecha.parse");if(t=Nt.masks[t]||t,e.length>1e3)return!1;let s=!0;const o={};if(t.replace(_h,d=>{if(ht[d]){const u=ht[d],m=e.search(u[0]);~m?e.replace(u[0],p=>(u[1](o,p,i),e=e.substr(m+p.length),p)):s=!1}return ht[d]?"":d.slice(1,d.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 f;return o.timezoneOffset!==null&&o.timezoneOffset!==void 0?(o.minute=+(o.minute||0)-+o.timezoneOffset,f=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))):f=new Date(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0),f};const Fc=" - ",si=(e,t)=>{const n=xn(new Date(e));return!n||isNaN(n.getTime())?"":vb(n,t||"yyyy-MM-dd")},Gc=(e,t)=>{if(Array.isArray(e)&&e.length===2){const n=e[0],i=e[1];if(n&&i)return si(n,t)+Fc+si(i,t)}else if(!Array.isArray(e)&&e instanceof Date)return si(e,t);return""},Zc=(e,t)=>{const n=Array.isArray(e)?e:e.split(Fc);if(n.length===2){const i=n[0],s=n[1];return[i instanceof Date?i:Nt.parse(i,t||"yyyy-MM-dd"),s instanceof Date?s:Nt.parse(s,t||"yyyy-MM-dd")]}return[]},Ja={default:{formatter(e){return e?`${e}`:""},parser(e){return e===void 0||e===""?null:e}},date:{formatter:(e,t)=>si(e,t),parser:(e,t)=>Nt.parse(e,t||"yyyy-MM-dd")},datetime:{formatter:(e,t)=>si(e,t),parser:(e,t)=>Nt.parse(e,t||"yyyy-MM-dd")},daterange:{formatter:Gc,parser:Zc},datetimerange:{formatter:Gc,parser:Zc},timerange:{formatter:Gc,parser:Zc},time:{formatter:(e,t)=>si(e,t),parser:(e,t)=>Nt.parse(e,t||"yyyy-MM-dd")},month:{formatter:(e,t)=>si(e,t),parser:(e,t)=>Nt.parse(e,t||"yyyy-MM-dd")},year:{formatter:(e,t)=>si(e,t),parser:(e,t)=>Nt.parse(e,t||"yyyy-MM-dd")},multiple:{formatter(e,t){return e.filter(Boolean).map(n=>si(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=""),Nt.parse(s,t||"yyyy-MM-dd")})}},number:{formatter(e){return e?`${e}`:""},parser(e){const t=Number(e);return isNaN(e)?null:t}}},Yc=()=>{const e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e},Yh=e=>e.every(t=>!t||typeof t=="string"&&t.trim()===""),ol=e=>e?[e.getHours(),e.getMinutes(),e.getSeconds()]:[0,0,0],Uh={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"},zi=(e,t,n,i)=>{const s=t.includes("range"),{parser:o}=Ja[t]||Ja.default,c=i||Uh[t],f=Ja.multiple.parser;let d=e;if(e&&t==="time"&&!(e instanceof Date))d=o(e,c);else if(n&&e)d=f(e,c);else if(s)if(!e)d=[null,null];else if(typeof e=="string")d=o(e,c);else if(t==="timerange")d=o(e,c).map(u=>u||"");else{const[u,m]=e;u instanceof Date&&m instanceof Date?d=e.map(p=>new Date(p)):typeof u=="string"&&typeof m=="string"?d=o(e.join(Fc),c):(!u||!m)&&(d=[null,null])}else typeof e=="string"&&t.indexOf("time")!==0&&(d=o(e,c)||null);return s||n?d||[]:[d]},Fn=(e,t,n,i)=>{const s=Uh[t];if(n){const{formatter:c}=Ja.multiple;return c(e,i||s)}const{formatter:o}=Ja[t]||Ja.default;return o(e,i||s)},$h=Symbol("date-picker"),Kh=Symbol("time-picker");function Xh(e,t){return e.$children.reduce((n,i)=>{i.$options.name===t&&n.push(i);const s=Xh(i,t);return n.concat(s)},[])}function gn(e,t=""){return["bk-picker-panel-icon-btn",`bk-date-picker-${e}-btn`,`bk-date-picker-${e}-btn-arrow${t}`]}const kb=(e,t)=>new Date(e,t+1,0).getDate(),qh=(e,t)=>{const n=new Date(e),i=n.getMonth()+t,s=kb(n.getFullYear(),i);return s<n.getDate()&&n.setDate(s),n.setMonth(i),n},e9=(()=>{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),f=c[1],d=[c[0],c[2]].map(u=>({label:u.replace(/\[[^\]]+\]/,p=>p.slice(1,-1).replace(t,C=>e[C](s,n))),type:u.indexOf("yy")!==-1?"year":"month"}));return{separator:f,labels:d}}})(),aa=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()},Tb=(e,t,n)=>{if(!t||!n)return!1;const[i,s]=[t,n].sort();return e>=i&&e<=s};function xb(e){return e.toString()[0].toUpperCase()+e.toString().slice(1)}const Sb=(e,...t)=>{const n=new Date(e.getTime());return n.setHours(t[0]),n.setMinutes(t[1]),n.setSeconds(t[2]),n},Db={tableDate:{type:Date,required:!0},disableDate: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 Uc=a.defineComponent({name:"DateTable",props:Db,emits:["pick","pick-click","changeRange"],setup(e,{emit:t}){const n=a.computed(()=>new sy.Generator({onlyDays:!0,weekStart:0})),i=a.computed(()=>{const u=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"];return u.splice(0,7-0).concat(u.splice(0,0))}),s=a.computed(()=>e.selectionMode==="range"&&e.rangeState.selecting?[e.rangeState.from]:e.modelValue),o=a.computed(()=>{const u=e.tableDate.getFullYear(),m=e.tableDate.getMonth(),p=aa(new Date),C=s.value.filter(Boolean).map(aa),[y,M]=s.value.map(aa),T=e.rangeState.from&&aa(e.rangeState.from),x=e.rangeState.to&&aa(e.rangeState.to),k=e.selectionMode==="range",v=typeof e.disableDate=="function"&&e.disableDate;return n.value(u,m,b=>{b.date instanceof Date&&b.date.setTime(b.date.getTime()+b.date.getTimezoneOffset()*6e4);const I=b.date&&aa(b.date),L=b.date&&m===b.date.getMonth();return Te(U({},b),{type:I===p?"today":b.type,selected:L&&C.includes(I),disabled:b.date&&v&&v(new Date(I)),range:L&&k&&Tb(I,T,x),start:L&&k&&I===y,end:L&&k&&I===M})}).cells.slice(0)});return{headerDays:i,cells:o,getCellCls:u=>["bk-date-picker-cells-cell",{["bk-date-picker-cells-cell-selected"]:u.selected||u.start||u.end,["bk-date-picker-cells-cell-disabled"]:u.disabled,["bk-date-picker-cells-cell-today"]:u.type==="today",["bk-date-picker-cells-cell-prev-month"]:u.type==="prevMonth",["bk-date-picker-cells-cell-next-month"]:u.type==="nextMonth",["bk-date-picker-cells-cell-week-label"]:u.type==="weekLabel",["bk-date-picker-cells-cell-range"]:u.range&&!u.start&&!u.end}],handleClick:u=>{if(u.disabled||u.type==="weekLabel")return;const m=new Date(aa(u.date));t("pick",m),t("pick-click")},handleMouseMove:u=>{if(!e.rangeState.selecting||u.disabled)return;const m=u.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 $c={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},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}},disableDate:Function,withValidate:{type:Boolean,default:!0}},Kc={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}},jb={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}},zb={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:()=>[]}},t9=["hours","minutes","seconds"];var Ob=a.defineComponent({name:"TimeSpinner",props:U(U({},zb),Kc),emits:["change","pick-click"],setup(e,{emit:t}){const n=a.reactive({spinerSteps:[1,1,1].map((N,E)=>Math.abs(e.steps[E])||N),compiled:!1,focusedColumn:-1,focusedTime:[0,0,0]}),i=a.computed(()=>{const N=[],E=n.spinerSteps[0],O=n.focusedColumn===0&&n.focusedTime[0],A={text:0,selected:!1,disabled:!1,hide:!1};for(let R=0;R<24;R+=E){const J=JSON.parse(JSON.stringify(A));J.text=R,J.focused=R===O,e.disabledHours.length&&e.disabledHours.indexOf(R)>-1&&(J.disabled=!0,e.hideDisabledOptions&&(J.hide=!0)),e.hours===R&&(J.selected=!0),N.push(J)}return N}),s=a.computed(()=>{const N=[],E=n.spinerSteps[1],O=n.focusedColumn===1&&n.focusedTime[1],A={text:0,selected:!1,disabled:!1,hide:!1};for(let R=0;R<60;R+=E){const J=JSON.parse(JSON.stringify(A));J.text=R,J.focused=R===O,e.disabledMinutes.length&&e.disabledMinutes.indexOf(R)>-1&&(J.disabled=!0,e.hideDisabledOptions&&(J.hide=!0)),e.minutes===R&&(J.selected=!0),N.push(J)}return N}),o=a.computed(()=>{const N=[],E=n.spinerSteps[2],O=n.focusedColumn===2&&n.focusedTime[2],A={text:0,selected:!1,disabled:!1,hide:!1};for(let R=0;R<60;R+=E){const J=JSON.parse(JSON.stringify(A));J.text=R,J.focused=R===O,e.disabledSeconds.length&&e.disabledSeconds.indexOf(R)>-1&&(J.disabled=!0,e.hideDisabledOptions&&(J.hide=!0)),e.seconds===R&&(J.selected=!0),N.push(J)}return N}),c=a.computed(()=>({width:e.showSeconds?"33.33%":"50%"}));a.watch(()=>e.hours,N=>{!n.compiled||T("hours",i.value.findIndex(E=>E.text===N))}),a.watch(()=>e.minutes,N=>{!n.compiled||T("minutes",s.value.findIndex(E=>E.text===N))}),a.watch(()=>e.seconds,N=>{!n.compiled||T("seconds",s.value.findIndex(E=>E.text===N))}),a.watch(()=>n.focusedTime,(N,E)=>{t9.forEach((O,A)=>{if(N[A]===E[A]||typeof N[A]=="undefined")return;const R=this[`${O}List`].findIndex(J=>J.text===N[A]);T(O,R)})}),a.onMounted(()=>{a.nextTick(()=>{n.compiled=!0,u()})});function f(N){let E;return N==="hours"?E=b:N==="minutes"?E=I:E=L,E.value}function d(N){return["bk-time-picker-cells-cell",{["bk-time-picker-cells-cell-selected"]:N.selected,["bk-time-picker-cells-cell-focused"]:N.focused,["bk-time-picker-cells-cell-disabled"]:N.disabled}]}function u(){const N=E=>{f(E).addEventListener("wheel",dt.exports.debounce(()=>{C(E)},32),{passive:!0})};N("hours"),N("minutes"),N("seconds")}function m(N){return f(N).querySelector("li").offsetHeight}function p(N){return f(N).offsetHeight}function C(N){const E=f(N),O=Math.min(Math.round((E.scrollTop-(p(N)*.5-10)/m(N)+3)/m(N)),N==="hours"?23:59);let A;if(N==="hours"?A=i:N==="minutes"?A=s:A=o,A.value.find(J=>J.text===O).disabled)return!1;a.nextTick(()=>{M({[N]:O})})}function y(N,E){if(E.disabled)return;const O={[N]:E.text};M(O)}function M(N){t("change",N),t("pick-click")}function T(N,E){const O=f(N),A=O.scrollTop,R=32*x(N,E);T4(O,A,R,500)}function x(N,E){const O=xb(N),A=e[`disabled${O}`];let R=E;if(A.length&&e.hideDisabledOptions){let J=0;A.forEach($=>$<=E?J+=1:""),R-=J}return R}function k(){a.nextTick(()=>{t9.forEach(N=>{const E=f(N);let O;N==="hours"?O=i:N==="minutes"?O=s:O=o,E.scrollTop=32*O.value.findIndex(A=>A.text===e[N])})})}function v(N){return N<10?`0${N}`:N}const b=a.ref(null),I=a.ref(null),L=a.ref(null);return Te(U({},a.toRefs(n)),{hoursList:i,minutesList:s,secondsList:o,styles:c,hoursRef:b,minutesRef:I,secondsRef:L,getCellCls:d,handleClick:y,updateScroll:k,padTime:v})},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 Eb={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 n9=a.defineComponent({name:"TimePickerPanel",props:U(U(U({},$c),Kc),Eb),emits:["pick","pick-click"],setup(e,{emit:t}){const n=a.reactive({date:e.value[0]||Yc(),showDate:!1}),i=a.inject(Kh),s=a.ref(null),o=a.computed(()=>!(e.format||"").match(/mm$/)),c=a.computed(()=>Nt.format(i.panelDate,e.format)),f=a.computed(()=>e.value[0]?["getHours","getMinutes","getSeconds"].map(p=>n.date[p]()):[]),d=a.computed(()=>{const p=["disabledHours","disabledMinutes","disabledSeconds"];if(e.disabledDate===(()=>!e.value[0]))return p.reduce((x,k)=>(x[k]=this[k],x),{});const C=[24,60,60],M=["Hours","Minutes","Seconds"].map(T=>e[`disabled${T}`]).map((T,x)=>{const k=C[x],v=T;for(let b=0;b<k;b+=e.steps[x]||1){const I=f.value.map((N,E)=>E===x?b:N),L=Sb(n.date,...I);e.disabledDate(L,!0)&&v.push(b)}return v.filter((b,I,L)=>L.indexOf(b)===I)});return p.reduce((T,x,k)=>(T[x]=M[k],T),{})});a.watch(()=>e.value,p=>{let C=p[0]||Yc();C=new Date(C),n.date=C}),a.onMounted(()=>{i&&i.parentName==="DatePanel"&&(n.showDate=!0)});function u(p,C=!0){const y=new Date(n.date);Object.keys(p).forEach(M=>y[`set${Oo(M)}`](p[M])),C&&t("pick",y,!0,"time")}function m(){t("pick-click")}return Te(U({},a.toRefs(n)),{visibleDate:c,showSeconds:o,timeSlots:f,disabledHMS:d,timeSpinnerRef:s,handlePickClick:m,handleChange:u})},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(Ob,{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 Pb={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},disableDate:Function,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}};var Ab=a.defineComponent({name:"DatePanel",props:Pb,emits:["pick","pick-success","pick-clear","pick-click","selection-mode-change"],setup(e,{slots:t,emit:n}){const i=_=>_.match(/^time/)?"time-picker":`${_}-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(Kh,{panelDate:o.panelDate,parentName:c.$options.name});const f=a.ref(null),d=a.ref(null),u=a.ref(null);a.watch(()=>o.currentView,_=>{console.error(11111,_),n("selection-mode-change",_),o.currentView==="time"&&a.nextTick(()=>{f.value.timeSpinnerRef.updateScroll()})}),a.watch(()=>e.selectionMode,_=>{o.currentView=_,o.pickerTable=i(_)});const m=()=>{setTimeout(()=>{o.currentView=e.selectionMode},500)},p=_=>{o.panelDate=_,o.pickerTable==="year-table"?o.pickerTable="month-table":o.pickerTable=i(o.currentView)},C=(_,le)=>{let se=_;e.selectionMode==="year"?se=new Date(_.getFullYear(),0,1):e.selectionMode==="month"?se=new Date(o.panelDate.getFullYear(),_.getMonth(),1):se=new Date(_),o.dates=[se],n("pick",se,!1,le||e.selectionMode)},y=()=>{m(),n("pick-success")},M=()=>{m(),n("pick-clear")},T=_=>{_.value&&n("pick",_.value(),!1,void 0,_),_.onClick&&_.onClick(this),e.shortcutClose&&y()},x=()=>{o.currentView=e.selectionMode,o.pickerTable=i(o.currentView)},k=_=>{e.selectionMode==="year"||o.pickerTable==="year-table"?o.panelDate=new Date(o.panelDate.getFullYear()+_*10,0,1):o.panelDate=qh(o.panelDate,_*12)},v=_=>{o.panelDate=qh(o.panelDate,_)},b=_=>{var le,se;_&&((le=d==null?void 0:d.value)==null||le.updateScroll(),(se=u==null?void 0:u.value)==null||se.updateScroll())},I=a.computed(()=>o.pickerTable===`${o.currentView}-table`?C:p),L=a.computed(()=>{const _="zh-CN",le="[yyyy]-[mm]",se=o.panelDate,{labels:ne,separator:fe}=e9(_,le,se),ee=ae=>()=>{o.pickerTable=i(ae)};return{separator:fe,labels:ne.map(ae=>{const Y=ae;return Y.handler=ee(ae.type),Y})}}),N=a.computed(()=>L.value.labels[0].type==="year"||o.currentView==="date"),E=a.computed(()=>L.value.labels[1].type==="year"||o.currentView==="date"),O=a.computed(()=>o.currentView==="time"),A=()=>{o.currentView=o.currentView==="time"?"date":"time"},R=a.computed(()=>!!t.shortcuts),J=a.computed(()=>!o.dates[0]);function $(){n("pick-click")}return Te(U({},a.toRefs(o)),{panelPickerHandlers:I,datePanelLabel:L,showLabelFirst:N,showLabelSecond:E,handleShortcutClick:T,changeYear:k,changeMonth:v,reset:x,isTime:O,hasShortcuts:R,timeDisabled:J,onToggleVisibility:b,handleToggleTime:A,handlePickSuccess:y,handlePickClear:M,handlePick:C,handlePickClick:$,timePickerRef:f})},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:gn("prev","-double"),onClick:()=>this.changeYear(-1)},[a.createVNode(yr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:gn("prev"),onClick:()=>this.changeMonth(-1)},[a.createVNode(Mi,{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:gn("next","-double"),onClick:()=>this.changeYear(1)},[a.createVNode(br,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:gn("next"),onClick:()=>this.changeMonth(1)},[a.createVNode(Ln,{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(Uc,{tableDate:this.panelDate,disableDate:this.disableDate,selectionMode:this.selectionMode,modelValue:this.dates,focusedDate:this.focusedDate,onPick:this.panelPickerHandlers},null);default:return null}})():a.createVNode(n9,{ref:"timePickerRef",value:this.dates,format:this.format,disabledDate:this.disabledDate,onPick:this.handlePick,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess},null)]),this.confirm?a.createVNode(ey,{clearable:this.clearable,showTime:this.showTime,isTime:this.isTime,"onPick-toggle-time":this.handleToggleTime,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess},null):""]),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 Vb={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},disableDate:Function,focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1}};var Jb=a.defineComponent({name:"DateRangePanel",props:Vb,emits:["pick","pick-success"],setup(e,{slots:t,emit:n}){const[i,s]=e.modelValue.map(D=>D||Yc()),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}),f=(D,V)=>!D||!V?0:D.getTime()-V.getTime(),d=()=>{c.currentView=e.selectionMode,c.leftPickerTable=`${c.currentView}-table`,c.rightPickerTable=`${c.currentView}-table`},u=a.ref(null),m=a.ref(null),p=D=>{var V,W;D&&((V=u==null?void 0:u.value)==null||V.updateScroll(),(W=m==null?void 0:m.value)==null||W.updateScroll())},C=(D,V,W,ie=!0)=>{const re=new Date(c[`${D}PanelDate`]);if(re[`set${V}`](re[`get${V}`]()+W),c[`${D}PanelDate`]=re,!!ie)if(e.splitPanels){const pe=D==="left"?"right":"left";D==="left"&&c.leftPanelDate>=c.rightPanelDate&&C(pe,V,1),D==="right"&&c.rightPanelDate<=c.leftPanelDate&&C(pe,V,-1)}else{const pe=D==="left"?"right":"left",Ne=c[`${pe}PanelDate`],te=new Date(Ne);if(V==="Month"){const K=new Date(te.getFullYear(),te.getMonth()+W+1,0).getDate();te.setDate(Math.min(K,te.getDate()))}te[`set${V}`](te[`get${V}`]()+W),c[`${pe}PanelDate`]=te}},y=D=>{const V=c.currentView==="year"?-10:-1;C(D,"FullYear",V)},M=D=>{const V=c.currentView==="year"?10:1;C(D,"FullYear",V)},T=D=>{C(D,"Month",-1)},x=D=>{C(D,"Month",1)},k=D=>{c[`${D}PickerTable`]="year-table"},v=D=>{c[`${D}PickerTable`]="month-table"},b=D=>{const V="zh-CN",W="[yyyy]-[mm]",ie=c[`${D}PanelDate`],{labels:re,separator:pe}=e9(V,W,ie),Ne=te=>{const K=te==="month"?v:k;return()=>K(D)};return{separator:pe,labels:re.map(te=>{const K=te;return K.handler=Ne(te.type),K})}},I=(D,V)=>{n("pick",c.dates,D,V||e.type)},L=(D,V)=>{if(console.warn("handleRangePick"),c.rangeState.selecting||c.currentView==="time"){if(c.currentView==="time")c.dates=D;else{const[W,ie]=[c.rangeState.from,D].sort(f),re=V==="upToNow"?new Date:new Date(new Date(new Date(ie.setHours(23)).setMinutes(59)).setSeconds(59));c.dates=[W,re],c.rangeState={from:W,to:re,selecting:!1}}I(!1,V||"date")}else c.upToNowEnable=new Date(D).getTime()<new Date().getTime(),c.rangeState={from:D,to:null,selecting:!0}},N=(D,V)=>{if(c[`${D}PanelDate`]=V,c[`${D}PickerTable`]==="year-table"?c[`${D}PickerTable`]="month-table":c[`${D}PickerTable`]=`${c.currentView}-table`,!e.splitPanels){const ie=D==="left"?"right":"left";c[`${ie}PanelDate`]=V,C(ie,"Month",ie==="left"?-1:1,!1)}},E=(D,V)=>{if(!(D!=null&&D.value))return!1;D.onClick&&D.onClick(D,V);const W=typeof D.value=="function"?D.value():D.value,[ie,re]=W;c.rangeState.from=ie,c.rangeState.to=re,c.dates=[ie,re],n("pick",W,!1,"shortcut",D),e.shortcutClose&&n("pick-success")},O=D=>{c.rangeState.to=D};a.watch(()=>e.selectionMode,D=>{c.currentView=D||"range"});const A=a.computed(()=>c.currentView==="time"),R=a.computed(()=>b("left")),J=a.computed(()=>b("right")),$=a.computed(()=>c.leftPickerTable.split("-").shift()),_=a.computed(()=>c.rightPickerTable.split("-").shift()),le=a.computed(()=>R.value.labels[0].type==="year"||c.currentView==="date"),se=a.computed(()=>R.value.labels[1].type==="year"||c.currentView==="date"),ne=a.computed(()=>J.value.labels[0].type==="year"||c.currentView==="date"),fe=a.computed(()=>J.value.labels[1].type==="year"||c.currentView==="date"),ee=a.computed(()=>{const D=`${c.currentView}-table`;return{left:c.leftPickerTable!==D,right:c.rightPickerTable!==D}}),ae=a.computed(()=>({left:ee.value.left?N.bind("left"):L,right:ee.value.right?N.bind("right"):L})),Y=a.computed(()=>{var D;return t.shortcuts||((D=e.shortcuts)==null?void 0:D.length)});return Te(U({},a.toRefs(c)),{isTime:A,hasShortcuts:Y,prevYear:y,nextYear:M,prevMonth:T,nextMonth:x,leftDatePanelLabel:R,rightDatePanelLabel:J,leftDatePanelView:$,rightDatePanelView:_,leftShowLabelFirst:le,leftShowLabelSecond:se,rightShowLabelFirst:ne,rightShowLabelSecond:fe,preSelecting:ee,panelPickerHandlers:ae,handleShortcutClick:E,reset:d,onToggleVisibility:p,handleRangePick:L,handleChangeRange:O})},render(){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:e=>{e.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:gn("prev","-double"),onClick:()=>this.prevYear("left")},[a.createVNode(yr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:gn("prev"),onClick:()=>this.prevMonth("left")},[a.createVNode(Mi,{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:gn("next","-double"),onClick:()=>this.nextYear("left")},[a.createVNode(br,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels||this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:gn("next"),onClick:()=>this.nextMonth("left")},[a.createVNode(Ln,{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(Uc,{selectionMode:"range",tableDate:this.leftPanelDate,disableDate:this.disableDate,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:gn("prev","-double"),onClick:()=>this.prevYear("right")},[a.createVNode(yr,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels&&this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:gn("prev","-double"),onClick:()=>this.prevMonth("right")},[a.createVNode(Mi,{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:gn("next","-double"),onClick:()=>this.nextYear("right")},[a.createVNode(br,{style:{fontSize:"20px",lineHeight:1}},null)]),this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:gn("next"),onClick:()=>this.nextMonth("right")},[a.createVNode(Ln,{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(Uc,{selectionMode:"range",tableDate:this.rightPanelDate,disableDate:this.disableDate,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.hasShortcuts?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[this.$slots.shortcuts?typeof this.$slots.shortcuts=="function"?this.$slots.shortcuts():this.$slots.shortcuts:this.shortcuts.length?a.createVNode("div",{class:"bk-picker-panel-shortcuts"},[this.shortcuts.map((e,t)=>a.createVNode("div",{key:t,class:"shortcuts-item",onClick:()=>this.handleShortcutClick(e,t)},[e.text]))]):""]):null])}}),Qb=a.defineComponent({name:"DatePicker",directives:{clickoutside:kn},props:$c,emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=Jn(),s=e.type.includes("range"),o=s?[null,null]:[null],c=s?e.value||e.modelValue:[e.value||e.modelValue];let f=Yh(c)?o:zi(e.value||e.modelValue,e.type,e.multiple,e.format),d=null;e.shortcutSelectedIndex!==-1&&(d=e.shortcuts[e.shortcutSelectedIndex]||null,d&&(f=d.value()));const u=a.reactive({showClose:!1,visible:!1,internalValue:f,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:f[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:f.map(ol),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:d,onSelectionModeChange:m});function m(te){let K=te;return te.match(/^date/)&&(K="date"),u.selectionMode=["year","month","date","time"].indexOf(K)>-1&&K,u.selectionMode}const p=a.computed(()=>{if(e.multiple)return u.internalValue.slice();const te=e.type.includes("range");let K=u.internalValue.map(G=>G instanceof Date?new Date(G):G||"");return e.type.match(/^time/)&&(K=K.map(G=>Fn(G,e.type,e.multiple,e.format))),te||e.multiple?K:K[0]}),C=a.computed(()=>e.type.match(/^time/)?p.value:e.multiple?Fn(p.value,e.type,e.multiple,e.format):Array.isArray(p.value)?p.value.map(te=>Fn(te,e.type,e.multiple,e.format)):Fn(p.value,e.type,e.multiple,e.format)),y=a.computed(()=>e.type==="daterange"||e.type==="datetimerange"?"DateRangePanel":"DatePanel"),M=a.computed(()=>e.open===null?u.visible:e.open),T=a.computed(()=>Fn(u.internalValue,e.type,e.multiple,e.format)),x=a.computed(()=>{var te;return((te=u.shortcut)==null?void 0:te.text)&&e.useShortcutText?u.shortcut.text:T.value}),k=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),v=a.computed(()=>!!t.header),b=a.computed(()=>!!t.footer),I=a.computed(()=>!!t.shortcuts),L=a.computed(()=>{let te="";return e.fontSize==="medium"?te="medium-font":e.fontSize==="large"&&(te="large-font"),te}),N=a.computed(()=>{let te="";return e.fontSize==="medium"?te="medium-width":e.fontSize==="large"&&(te="large-width"),te}),E=a.computed(()=>{var te;return((te=u.shortcut)==null?void 0:te.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),O=a.computed(()=>e.options),A=a.computed(()=>y.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),R=a.ref(null),J=()=>{var te;(te=R==null?void 0:R.value)==null||te.focus()};a.watch(()=>u.visible,te=>{var K,G;te===!1&&((K=$.value)==null||K.destoryDropdown()),(G=$.value)==null||G.updateDropdown(),n("open-change",te)});const $=a.ref(null);a.watch(()=>e.modelValue,te=>{var K;u.internalValue=zi(te,e.type,e.multiple,e.format),e.withValidate&&((K=i==null?void 0:i.validate)==null||K.call(i,"change"))}),a.watch(()=>e.open,te=>{u.visible=te===!0}),a.watch(()=>e.type,te=>{m(te)}),a.watch(()=>p,(te,K)=>{const G=JSON.stringify(te),ce=JSON.stringify(K);(G!==ce||typeof te!=typeof K)&&n("input",te)}),a.onMounted(()=>{e.type.indexOf("date")>-1,u.timeEnterMode=!0;const te=e.modelValue,K=p.value;(typeof te!=typeof K||JSON.stringify(te)!==JSON.stringify(K))&&n("input",p.value),e.open!==null&&(u.visible=e.open),a.provide($h,{props:e,focus:()=>J()})});const _=a.ref(null),le=te=>{var K;if(u.disableCloseUnderTransfer)return u.disableCloseUnderTransfer=!1,!1;if(te&&te.type==="mousedown"&&u.visible){te.preventDefault(),te.stopPropagation();return}if(u.visible){const G=(K=_==null?void 0:_.value)==null?void 0:K.$el;if(te&&G&&G.contains(te.target))return;u.visible=!1,te==null||te.preventDefault(),te==null||te.stopPropagation();return}u.isFocused=!1,u.disableClickOutSide=!1},se=()=>{var te,K;(te=R==null?void 0:R.value)==null||te.focus(),(K=R==null?void 0:R.value)==null||K.click()},ne=()=>{e.readonly||e.disabled||T!=null&&T.value&&(u.showClose=!0)},fe=te=>{u.showClose=!1},ee=te=>{a.nextTick(()=>{var K;n("change",C.value,te),n("update:modelValue",p.value),e.type.indexOf("time")<0&&((K=R==null?void 0:R.value)==null||K.blur())})},ae=te=>{var de;const K=e.type.includes("range")||e.multiple,G=T.value,ce=te.target.value,we=zi(ce,e.type,e.multiple,e.format),z=K?we:we[0],B=(de=e.disableDate)==null?void 0:de.call(e,z),Q=we.reduce((Ce,F)=>Ce&&F instanceof Date,!0);ce!==G&&!B&&Q?(ee(e.type),u.internalValue=we):u.forceInputRerender=u.forceInputRerender+1},Y=te=>{e.readonly||(u.isFocused=!0,!(te&&te.type==="focus")&&(e.disabled||(u.visible=!0)))},D=()=>{var te;(te=_==null?void 0:_.value)==null||te.reset()},V=te=>{var K,G;if(u.internalFocus){u.internalFocus=!1;return}if(u.visible){te.preventDefault();return}u.isFocused=!1,m(e.type),u.internalValue=u.internalValue.slice(),D(),(K=_==null?void 0:_.value)==null||K.onToggleVisibility(!1),(G=i==null?void 0:i.validate)==null||G.call(i,"blur")},W=te=>{const{keyCode:K}=te;if(K===9&&u.visible)if(te.stopPropagation(),te.preventDefault(),k.value){const ce=".bk-picker-confirm > *",we=$.value.$el.querySelectorAll(ce);u.internalFocus=!0,[...we][te.shiftKey?"pop":"shift"]().focus()}else le();const G=[37,38,39,40];if(!u.visible&&G.includes(K)){u.visible=!0;return}K===27&&u.visible&&(te.stopPropagation(),le()),!!G.includes(K)&&u.focusedTime.active&&te.preventDefault()},ie=()=>{u.visible=!1,u.internalValue=u.internalValue.map(()=>null),n("clear"),ee(e.type),D(),u.showClose=!1,u.shortcut=null,setTimeout(()=>m(e.type),500)},re=()=>{var te;u.visible=!1,a.nextTick(()=>{n("pick-success")}),(te=R==null?void 0:R.value)==null||te.blur(),D()},pe=(te,K=!1,G,ce)=>{let we=te;if(e.multiple){const B=we.getTime(),Q=u.internalValue.findIndex(F=>F&&F.getTime()===B),Ce=[...u.internalValue,we].filter(Boolean).map(F=>F.getTime()).filter((F,oe,he)=>he.indexOf(F)===oe&&oe!==Q);u.internalValue=Ce.map(F=>new Date(F))}else we=zi(te,e.type,e.multiple,e.format),u.internalValue=Array.isArray(we)?we:[we];if(u.internalValue[0]){const[B]=u.internalValue;u.focusedDate=B}u.focusedTime=Te(U({},u.focusedTime),{time:u.internalValue.map(ol)}),k.value||(m(e.type),u.visible=K),G==="upToNow"&&e.type==="daterange"&&re(),u.shortcut=ce,ee(G);const z=e.shortcuts.findIndex(B=>B===u.shortcut);n("shortcut-change",u.shortcut,z)},Ne=a.ref(null);return Te(U({},a.toRefs(u)),{panel:y,publicStringValue:C,opened:M,visualValue:T,displayValue:x,isConfirm:k,hasHeader:v,hasFooter:b,hasShortcuts:I,fontSizeCls:L,longWidthCls:N,localReadonly:E,allowCrossDayProp:A,ownPickerProps:O,pickerDropdownRef:$,inputRef:R,triggerRef:Ne,pickerPanelRef:_,handleClose:le,handleIconClick:se,handleInputMouseenter:ne,handleInputMouseleave:fe,handleFocus:Y,handleBlur:V,handleKeydown:W,handleInputChange:ae,handleClear:ie,onPick:pe,onPickSuccess:re})},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(Gt,{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,{change:this.onPick}))||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(Hc,{class:[this.appendToBody?"bk-date-picker-transfer":""],ref:"pickerDropdownRef",triggerRef:this.triggerRef,placement:this.placement,extPopoverCls:this.extPopoverCls,appendToBody:this.appendToBody},{default:()=>{var o,c,f,d,u,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(f=(c=(o=this.$slots).header)==null?void 0:c.call(o))!=null?f:null]):null,this.panel==="DateRangePanel"?a.createVNode(Jb,{ref:"pickerPanelRef",type:this.type,confirm:this.isConfirm,shortcuts:this.shortcuts,shortcutClose:this.shortcutClose,modelValue:this.internalValue,selectionMode:this.selectionMode,startDate:this.startDate,disableDate:this.disableDate,focusedDate:this.focusedDate,onPick:this.onPick,"onPick-success":this.onPickSuccess,"onSelection-mode-change":this.onSelectionModeChange},t):a.createVNode(Ab,{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,disableDate:this.disableDate,focusedDate:this.focusedDate,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,"onSelection-mode-change":this.onSelectionModeChange},t),this.hasFooter?a.createVNode("div",{class:["bk-date-picker-footer-wrapper",this.footerSlotCls]},[(m=(u=(d=this.$slots).footer)==null?void 0:u.call(d))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}}),Rb=a.defineComponent({name:"TimePicker",directives:{clickoutside:kn},props:U(U(U({},$c),jb),Kc),emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=Jn(),s=e.type.includes("range"),o=s?[null,null]:[null];let c=Yh((s?e.modelValue:[e.modelValue])||[])?o:zi(e.modelValue,e.type,e.multiple,e.format),f=null;e.shortcutSelectedIndex!==-1&&(f=e.shortcuts[e.shortcutSelectedIndex]||null,f&&(c=f.value()));const d=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(ol),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:f,onSelectionModeChange:u});function u(K){let G=K;return K.match(/^date/)&&(G="date"),d.selectionMode=["year","month","date","time"].indexOf(G)>-1&&G,d.selectionMode}const m=a.computed(()=>{if(e.multiple)return d.internalValue.slice();const K=e.type.includes("range");let G=d.internalValue.map(ce=>ce instanceof Date?new Date(ce):ce||"");return e.type.match(/^time/)&&(G=G.map(ce=>Fn(ce,e.type,e.multiple,e.format))),K||e.multiple?G:G[0]}),p=a.computed(()=>e.type.match(/^time/)?m.value:e.multiple?Fn(m.value,e.type,e.multiple,e.format):Array.isArray(m.value)?m.value.map(K=>Fn(K,e.type,e.multiple,e.format)):Fn(m.value,e.type,e.multiple,e.format)),C=a.computed(()=>e.type==="timerange"?"RangeTimePickerPanel":"TimePickerPanel"),y=a.computed(()=>e.open===null?d.visible:e.open),M=a.computed(()=>Fn(d.internalValue,e.type,e.multiple,e.format)),T=a.computed(()=>{var K;return((K=d.shortcut)==null?void 0:K.text)&&e.useShortcutText?d.shortcut.text:M.value}),x=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),k=a.computed(()=>!!t.header),v=a.computed(()=>!!t.footer),b=a.computed(()=>!!t.shortcuts),I=a.computed(()=>{let K="";return e.fontSize==="medium"?K="medium-font":e.fontSize==="large"&&(K="large-font"),K}),L=a.computed(()=>{let K="";return e.fontSize==="medium"?K="medium-width":e.fontSize==="large"&&(K="large-width"),K}),N=a.computed(()=>{var K;return((K=d.shortcut)==null?void 0:K.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),E=a.computed(()=>({disabledHours:e.disabledHours,disabledMinutes:e.disabledMinutes,disabledSeconds:e.disabledSeconds,hideDisabledOptions:e.hideDisabledOptions})),O=a.computed(()=>C.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),A=a.ref(null),R=()=>{var K;(K=A==null?void 0:A.value)==null||K.focus()},{proxy:J}=a.getCurrentInstance();a.watch(()=>d.visible,K=>{K&&a.nextTick(()=>{Xh(J,"TimeSpinner").forEach(ce=>ce.updateScroll())})});const $=a.ref(null);a.watch(()=>e.modelValue,K=>{var G;d.internalValue=zi(K,e.type,e.multiple,e.format),e.withValidate&&((G=i==null?void 0:i.validate)==null||G.call(i,"change"))}),a.watch(()=>e.open,K=>{d.visible=K===!0}),a.watch(()=>e.type,K=>{u(K)}),a.watch(()=>m,(K,G)=>{const ce=JSON.stringify(K),we=JSON.stringify(G);(ce!==we||typeof K!=typeof G)&&n("input",K)}),a.onMounted(()=>{e.type.indexOf("date")>-1,d.timeEnterMode=!0;const K=e.modelValue,G=m.value;(typeof K!=typeof G||JSON.stringify(K)!==JSON.stringify(G))&&n("input",m.value),e.open!==null&&(d.visible=e.open),a.provide($h,{props:e,focus:()=>R()})});const _=a.ref(null),le=K=>{var G;if(d.disableCloseUnderTransfer)return d.disableCloseUnderTransfer=!1,!1;if(K&&K.type==="mousedown"&&d.visible){K.preventDefault(),K.stopPropagation();return}if(d.visible){const ce=(G=_==null?void 0:_.value)==null?void 0:G.$el;if(K&&ce&&ce.contains(K.target))return;d.visible=!1,K==null||K.preventDefault(),K==null||K.stopPropagation();return}d.isFocused=!1,d.disableClickOutSide=!1},se=()=>{var K,G;(K=A==null?void 0:A.value)==null||K.focus(),(G=A==null?void 0:A.value)==null||G.click()},ne=()=>{e.readonly||e.disabled||M!=null&&M.value&&(d.showClose=!0)},fe=K=>{d.showClose=!1},ee=K=>{a.nextTick(()=>{var G;n("change",p.value,K),n("update:modelValue",m.value),e.type.indexOf("time")<0&&((G=A==null?void 0:A.value)==null||G.blur())})},ae=K=>{var Ce;const G=e.type.includes("range")||e.multiple,ce=M.value,we=K.target.value,z=zi(we,e.type,e.multiple,e.format),B=G?z:z[0],Q=(Ce=e.disableDate)==null?void 0:Ce.call(e,B),de=z.reduce((F,oe)=>F&&oe instanceof Date,!0);we!==ce&&!Q&&de?(ee(e.type),d.internalValue=z):d.forceInputRerender=d.forceInputRerender+1},Y=K=>{e.readonly||(d.isFocused=!0,!(K&&K.type==="focus")&&(e.disabled||(d.visible=!0)))},D=()=>{var K;(K=_==null?void 0:_.value)==null||K.reset()},V=K=>{var G,ce;if(d.internalFocus){d.internalFocus=!1;return}if(d.visible){K.preventDefault();return}d.isFocused=!1,u(e.type),d.internalValue=d.internalValue.slice(),D(),(G=_==null?void 0:_.value)==null||G.onToggleVisibility(!1),(ce=i==null?void 0:i.validate)==null||ce.call(i,"blur")},W=K=>{const{keyCode:G}=K;if(G===9&&d.visible)if(K.stopPropagation(),K.preventDefault(),x.value){const we=".bk-picker-confirm > *",z=$.value.$el.querySelectorAll(we);d.internalFocus=!0,[...z][K.shiftKey?"pop":"shift"]().focus()}else le();const ce=[37,38,39,40];if(!d.visible&&ce.includes(G)){d.visible=!0;return}G===27&&d.visible&&(K.stopPropagation(),le()),!!ce.includes(G)&&d.focusedTime.active&&K.preventDefault()},ie=()=>{d.visible=!1,d.internalValue=d.internalValue.map(()=>null),n("clear"),ee(e.type),D(),d.showClose=!1,d.shortcut=null,setTimeout(()=>u(e.type),500)},re=()=>{e.appendToBody&&(d.disableCloseUnderTransfer=!0)},pe=()=>{var K;d.visible=!1,a.nextTick(()=>{n("pick-success")}),(K=A==null?void 0:A.value)==null||K.blur(),D()},Ne=(K,G=!1,ce,we)=>{let z=K;if(e.multiple){const Q=z.getTime(),de=d.internalValue.findIndex(oe=>oe&&oe.getTime()===Q),F=[...d.internalValue,z].filter(Boolean).map(oe=>oe.getTime()).filter((oe,he,Me)=>Me.indexOf(oe)===he&&he!==de);d.internalValue=F.map(oe=>new Date(oe))}else z=zi(K,e.type,e.multiple,e.format),d.internalValue=Array.isArray(z)?z:[z];if(d.internalValue[0]){const[Q]=d.internalValue;d.focusedDate=Q}d.focusedTime=Te(U({},d.focusedTime),{time:d.internalValue.map(ol)}),x.value||(u(e.type),d.visible=G),ce==="upToNow"&&e.type==="daterange"&&pe(),d.shortcut=we,ee(ce);const B=e.shortcuts.findIndex(Q=>Q===d.shortcut);n("shortcut-change",d.shortcut,B)},te=a.ref(null);return console.error(C),console.error(C.value),Te(U({},a.toRefs(d)),{panel:C,publicStringValue:p,opened:y,visualValue:M,displayValue:T,isConfirm:x,hasHeader:k,hasFooter:v,hasShortcuts:b,fontSizeCls:I,longWidthCls:L,localReadonly:N,allowCrossDayProp:O,ownPickerProps:E,pickerDropdownRef:$,inputRef:A,triggerRef:te,pickerPanelRef:_,handleClose:le,handleIconClick:se,handleInputMouseenter:ne,handleInputMouseleave:fe,handleFocus:Y,handleBlur:V,handleKeydown:W,handleInputChange:ae,handleClear:ie,handleTransferClick:re,onPick:Ne,onPickSuccess:pe})},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(Gt,{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(Hc,{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,f,d,u,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(f=(c=(o=this.$slots).header)==null?void 0:c.call(o))!=null?f:null]):null,a.createVNode(n9,{ref:"pickerPanelRef",clearable:this.clearable,confirm:this.isConfirm,shortcuts:this.shortcuts,multiple:this.multiple,shortcutClose:this.shortcutClose,value:this.internalValue,startDate:this.startDate,disableDate:this.disableDate,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=(u=(d=this.$slots).footer)==null?void 0:u.call(d))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}});const i9=He(Qb);var Gn=(e=>(e.OBJECT_ARRAY="objectArray",e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e))(Gn||{});const _b={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 Wb(e,t,n){const i=a.ref([]),s=a.ref([]),o=()=>{e.value.forEach(c=>{const f=c[n.value];t.value.includes(f)?s.value.push(c):i.value.push(c)})};return o(),a.watch(()=>[e,t,n],o),{selectList:i,selectedList:s}}function Hb(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 Bb=a.defineComponent({name:"Transfer",props:_b,emits:["change","update:targetList"],setup(e,{emit:t}){const n=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(b=>b.toString().includes("[object Object]"))?Gn.OBJECT_ARRAY:Gn.BASE_ARRAY:Gn.NOT_ARRAY),i=a.computed(()=>n.value===Gn.BASE_ARRAY?"value":e.settingKey),s=a.computed(()=>n.value===Gn.BASE_ARRAY?"value":e.displayKey),o=a.computed(()=>e.sortKey||s.value),c=a.computed(()=>{switch(n.value){case Gn.BASE_ARRAY:return[...new Set(e.sourceList)].map(v=>({value:v}));case Gn.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:f}=a.toRefs(e),{selectList:d,selectedList:u}=Wb(c,f,i),{selectSearchQuery:m,selectListSearch:p}=Hb(d,s),C=a.computed(()=>[...p.value].sort((v,b)=>{const I=v[o.value],L=b[o.value];return I>L?1:-1})),y=a.computed(()=>[...u.value].sort((v,b)=>{const I=v[o.value],L=b[o.value];return I>L?1:-1})),M=()=>{d.value=[],u.value=[...c.value],k()},T=()=>{d.value=[...c.value],u.value=[],k()},x=(v,b)=>{const I=b?d:u,L=b?u:d,N=I.value.findIndex(E=>E[i.value]===v);L.value.push(...I.value.splice(N,1)),k()},k=()=>{const v=d.value.map(I=>I[i.value]),b=u.value.map(I=>I[i.value]);t("update:targetList",b),t("change",n.value===Gn.BASE_ARRAY?v:d.value.map(I=>a.toRaw(I)),n.value===Gn.BASE_ARRAY?b:u.value.map(I=>a.toRaw(I)),b)};return{selectSearchQuery:m,selectListSearch:p,selectedList:u,selectListSort:C,selectedListSort:y,settingCode:i,displayCode:s,allToRight:M,allToLeft:T,handleItemClick:x}},render(){const e=this.sortable?this.selectListSort:this.selectListSearch,t=this.sortable?this.selectedListSort:this.selectedList,n=c=>{var p,C;const f=c==="left-header",d=f?`${(p=this.title[0])!=null?p:"\u5DE6\u4FA7\u5217\u8868"}`:`${(C=this.title[1])!=null?C:"\u53F3\u4FA7\u5217\u8868"}`,u=f?!e.length:!t.length,m=()=>{u||(f?this.allToRight():this.allToLeft())};return this.$slots[c]?a.createVNode("div",{class:"slot-header"},[this.$slots[c]()]):a.createVNode("div",{class:"header"},[`${d}\uFF08\u5171${f?e.length:t.length}\u6761\uFF09`,a.createVNode("span",{class:{disabled:u},onClick:()=>m()},[f?"\u5168\u90E8\u6DFB\u52A0":"\u6E05\u7A7A"])])},i=c=>{var u;const f=c==="left-empty-content",d=(u=f?this.emptyContent[0]:this.emptyContent[1])!=null?u:f?"\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"},[d])},s=(c,f=!0)=>a.createVNode("div",{class:"item-content"},[a.createVNode("span",{class:"content-text",title:c[this.displayCode]},[c[this.displayCode]]),a.createVNode("span",{class:"icon-wrapper"},[f?a.createVNode(Ro,{class:"bk-icon"},null):a.createVNode(Qn,{class:"bk-icon"},null)])]),o=c=>{const f=c==="left",d=f?e:t,u=f?"source-option":"target-option",m=f?"left-empty-content":"right-empty-content";return d.length?a.createVNode("ul",{class:["content",this.searchable&&f?"is-search":""]},[d.map(p=>{var C,y,M;return a.createVNode("li",{key:p[this.settingCode],class:[this.$slots[u]?"custom-item":""],onClick:()=>this.handleItemClick(p[this.settingCode],f)},[(M=(y=(C=this.$slots)[u])==null?void 0:y.call(C,p))!=null?M:s(p,f)])})]):i(m)};return a.createVNode("div",{class:["bk-transfer",this.extCls]},[a.createVNode("div",{class:"source-list"},[n("left-header"),this.searchable&&a.createVNode(Ki,{modelValue:this.selectSearchQuery,"onUpdate:modelValue":c=>this.selectSearchQuery=c,class:"transfer-search-input",clearable:!0,placeholder:this.searchPlaceholder||"\u8BF7\u8F93\u5165\u641C\u7D22\u5173\u952E\u5B57",type:"search","left-icon":"bk-icon icon-search"},null),o("left")]),a.createVNode("div",{class:"transfer"},null),a.createVNode("div",{class:"target-list"},[n("right-header"),o("right")])])}});const a9=He(Bb);var Vr=(e=>(e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_EXPAND="nodeExpand",e.NODE_CHECKED="nodeChecked",e))(Vr||{});const cl=(...e)=>!0,Fb={nodeClick:cl,nodeCollapse:cl,nodeExpand:cl,nodeChecked:cl};var ge=(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))(ge||{});const Oi={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"},Gb={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:g.commonType(["once","every"],"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([g.commonType(["fuzzy","full"],"TreeSearchMatchType"),g.func]),resultType:g.commonType(["tree","list"],"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),dragSort:g.bool.def(!1),selectable:g.bool.def(!0),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)};var Zb=(e,{slots:t})=>({renderEmpty:n=>a.createVNode(Js,{scene:"part",type:n},{default:()=>{var i,s;return[(s=(i=t.default)==null?void 0:i.call(t))!=null?s:e.emptyText]}})}),ul=(e,t)=>{const n=J=>e.schema.get(J),i=(J,$)=>{var _;return(_=n(J[ge.UUID]))==null?void 0:_[$]},s=(J,$,_)=>{e.schema.set(J[ge.UUID],Te(U({},n(J[ge.UUID])),{[$]:_}))},o=J=>i(J,ge.PATH),c=J=>i(J,ge.UUID),f=J=>i(J,ge.IS_ROOT),d=J=>i(J,ge.IS_OPEN),u=J=>i(J,ge.HAS_CHILD),m=J=>i(J,ge.IS_MATCH),p=J=>i(J,ge.IS_CHECKED),C=J=>i(J,ge.PARENT_ID),y=J=>i({[ge.UUID]:J},ge.PARENT_ID),M=J=>i(J,ge.IS_LOADING),T=(J,$)=>{s(J,ge.IS_LOADING,$)},x=J=>e.schema.delete(J),k=J=>n(C(J)),v=J=>{var $;return typeof J=="object"?d(J):typeof J=="string"?($=n(J))==null?void 0:$[ge.IS_OPEN]:!1},b=J=>v(i(J,ge.PARENT_ID)),I=J=>f(J)||b(J),L=J=>J.split("-").reduce((_,le)=>{const se=Number(le);return Array.isArray(_)?_[se]:_[t.children][se]},t.data),N=J=>{const $=e.schema;return Array.prototype.filter.call(Array.from($.keys()),_=>$.get(_)[ge.PARENT_ID]===J[ge.UUID])},E=J=>L(o({[ge.UUID]:J})),O=J=>f({[ge.UUID]:J})?{[t.children]:t.data}:E(y(J)),A=J=>({[Oi[ge.IS_LOADING]]:i(J,ge.IS_LOADING),[Oi[ge.HAS_CHILD]]:u(J),[Oi[ge.IS_MATCH]]:m(J),[Oi[ge.IS_CHECKED]]:p(J),[Oi[ge.IS_OPEN]]:d(J),[Oi[ge.IS_ROOT]]:f(J),fullPath:i(J,ge.PATH),uuid:c(J),parentId:i(J,ge.PARENT_ID)});return{getSchemaVal:n,getNodeAttr:i,getNodeId:c,getNodeParentId:C,getNodeParentIdById:y,getParentNodeData:O,getParentNode:k,setNodeAttr:s,getNodePath:o,isRootNode:f,isNodeOpened:d,hasChildNode:u,isItemOpen:v,isNodeChecked:p,isNodeMatched:m,isNodeLoading:M,checkNodeIsOpen:I,getSourceNodeByPath:L,getSourceNodeByUID:E,deleteNodeSchema:x,resolveScopedSlotParam:A,setTreeNodeLoading:T,extendNodeAttr:J=>Te(U({},J),{[ge.TREE_NODE_ATTR]:A(J)}),getChildNodes:N}};const r9="1px dashed #c3cdd7",s9=(e,t,n=null,i=null,s=null,o=[])=>{const c=e[t];return typeof c=="boolean"?c?i:s:l9(n,e,t,o)},l9=(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}},o9=(e,t)=>l9(e,t,"label"),Xc=(e,t)=>e.get(t)||{},Yb=(e,t,n)=>{var i;return(i=Xc(e,t))==null?void 0:i[n]},Ub=(e,t)=>({"--level-line":s9(t,"levelLine",e,r9,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),$b=(e,t,n={})=>{const{schema:i}=n,s=Yb(i,e[ge.UUID],ge.DEPTH);return U({"--depth":s},typeof t.levelLine=="function"?{"--level-line":s9(t,"levelLine",e,r9,null,["node"])}:{})},Kb=(e,t,n)=>{const{__is_root:i,__is_open:s}=Xc(t,e[ge.UUID])||{};return{"is-root":i,"bk-tree-node":!0,"is-open":s,"is-virtual-render":n.virtualRender,"level-line":n.levelLine}},Xb=(e,t)=>{const{__is_checked:n,__is_selected:i}=Xc(t,e[ge.UUID])||{};return{"is-checked":n,"is-selected":i,[Ye("node-row")]:!0}},qb=(e,t,n,i,s)=>{eC(e,t,n,{[i]:s})},eC=(e,t,n,i)=>{const o=e.split("-").reduce((c,f)=>{const d=Number(f);return Array.isArray(c)?c[d]:c[n][d]},t);Object.assign(o,i||{})},Jr=e=>e==null?{__IS_NULL:!0}:typeof e=="string"||typeof e=="number"||typeof e=="symbol"?{[ge.UUID]:e}:(Object.prototype.hasOwnProperty.call(e,ge.UUID)||console.error("setNodeAction Error: node id cannot found"),e);var c9=(e,t)=>{const{setNodeAttr:n,getNodePath:i,getNodeAttr:s,resolveScopedSlotParam:o,setTreeNodeLoading:c}=ul(t,e),f=(m,p)=>{if(typeof m=="object"&&m!==null){n(p,ge.IS_OPEN,!0);const C=Array.isArray(m)?m:[m];return qb(i(p),e.data,e.children,e.children,C),Promise.resolve(m)}return Promise.resolve(m)},d=m=>{const{callback:p=null,cache:C=!0}=e.async||{};if(typeof p=="function"&&s(m,ge.IS_ASYNC)){if(n(m,ge.IS_ASYNC_INIT,!0),!s(m,ge.IS_CACHED)){n(m,ge.IS_CACHED,C);const y=o(m),M=p(m,T=>f(T,m),y);if(typeof M=="object"&&M!==null)return c(m,!0),M instanceof Promise?Promise.resolve(M.then(T=>f(T,m)).catch(T=>console.error("load remote data error:",T)).finally(()=>{c(m,!1),n(m,ge.IS_CACHED,!0)})):(f(M,m),c(m,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},u=()=>{const m=t.data.filter(p=>s(p,ge.IS_ASYNC)&&p[Oi[ge.IS_OPEN]]&&!s(p,ge.IS_ASYNC_INIT));m.length&&Promise.all(m.map(p=>d(p))).then(()=>{u()}).catch(p=>{console.warn(p)})};return{asyncNodeClick:d,deepAutoOpen:u}},tC=(e,t,n,i,s,o)=>{let c=e.selected;const{setNodeAttr:f,getNodePath:d,getSchemaVal:u,getNodeAttr:m,getNodeId:p,getChildNodes:C,isRootNode:y,hasChildNode:M,isItemOpen:T,isNodeOpened:x,isNodeLoading:k,isNodeChecked:v,getParentNode:b,resolveScopedSlotParam:I,extendNodeAttr:L}=ul(n,e),{registerNextLoop:N}=o,{asyncNodeClick:E,deepAutoOpen:O}=c9(e,n),A=G=>T(G)?a.createVNode(Go,{class:[Ye("tree-icon"),Ye("node-prefix")]},null):a.createVNode(Zo,{class:[Ye("tree-icon"),Ye("node-prefix")]},null),R=G=>{if(typeof G=="string")return G;if(typeof G=="object"&&G!==null){if(G.__v_isVNode)return G;const{node:ce,className:we,text:z,style:B}=G;return a.h(ce,{class:we,style:B},z)}return null},J=G=>{var ce,we,z;return((z=(we=(ce=t.slots).nodeLoading)==null?void 0:we.call(ce,L(G)))!=null?z:k(G))?a.createVNode(wr,null,null):""},$=G=>{if(t.slots.nodeAction)return t.slots.nodeAction(L(G));let ce=null;return k(G)?J(G):typeof e.prefixIcon=="function"&&(ce=e.prefixIcon(L(G),"node_action"),ce!=="default")?R(ce):(ce==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon)&&(M(G)||G.async||!e.autoCheckChildren)?T(G)?a.createVNode(Ss,{class:Ye("node-prefix")},null):a.createVNode(Ps,{class:Ye("node-prefix")},null):null},_=G=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(L(G));let ce=null;return typeof e.prefixIcon=="function"&&(ce=e.prefixIcon(L(G),"node_type"),ce!=="default")?R(ce):ce==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?y(G)||M(G)?A(G):a.createVNode(qo,{class:[Ye("tree-icon"),Ye("node-prefix")]},null):null},le=(G,ce)=>{const we=b(G);we&&(f(we,ge.IS_CHECKED,ce),y(we)||le(we,ce))},se=(G,ce,we)=>{C(G).forEach(z=>{f({[ge.UUID]:z},ce,we),se({[ge.UUID]:z},ce,we)})},ne=(G,ce)=>{f(G,ge.IS_CHECKED,!!ce),se(G,ge.IS_CHECKED,!!ce),le(G,ce),t.emit(Vr.NODE_CHECKED,s.value.filter(we=>v(we)).map(we=>we[ge.UUID]))},fe=G=>v(G)&&!s.value.filter(ce=>{var we;return(we=d(ce))==null?void 0:we.startsWith(d(G))}).every(ce=>v(ce)),ee=G=>v(G)||s.value.filter(ce=>{var we;return(we=d(ce))==null?void 0:we.startsWith(d(G))}).some(ce=>v(ce)),ae=G=>e.showCheckbox?a.createVNode(Li,{size:"small",modelValue:ee(G),indeterminate:fe(G),onChange:ce=>ne(G,ce)},null):null,Y=(G,ce=null,we=null,z=!0)=>{const B=ce===null?!T(G):!!ce;if(B||se(G,ge.IS_OPEN,B),f(G,ge.IS_OPEN,B),z){const Q=T(G)?Vr.NODE_EXPAND:Vr.NODE_COLLAPSE;t.emit(Q,G,I(G),u(G[ge.UUID]),we)}},D=(G,ce,we)=>{if(Array.isArray(G)){G.forEach(z=>f(Jr(z),ce,we));return}f(Jr(G),ce,we)},V=(G,ce=!0,we=!1)=>{const z=Jr(G);if(!z[ge.IS_NULL])if(we)if(ce){if(D(z,ge.IS_OPEN,!0),!y(z)){const B=m(z,ge.PARENT_ID);V(B,!0,!0)}}else Y(z,!1,null,!1);else D(z,ge.IS_OPEN,ce)},W=(G,ce)=>{if(x(G)){Y(G,!1,ce);return}E(G).finally(()=>{m(G,ge.IS_LOADING)?N("setNodeOpenedAfterLoading",{type:"once",fn:()=>Y(G,!0,ce)}):Y(G,!0,ce)})},ie=(G,ce)=>{G.stopImmediatePropagation(),G.stopPropagation(),G.preventDefault(),W(ce,G)},re=(G,ce=!0,we=!0)=>{const z=Array.isArray(G)?G:[G];if(!z.length)return;const B=Jr(z[0]);B[ge.IS_NULL]||(e.selectable?(c!=null&&f({[ge.UUID]:c},ge.IS_SELECTED,!ce),e.selected&&e.selected!==c&&f({[ge.UUID]:e.selected},ge.IS_SELECTED,!ce),f(B,ge.IS_SELECTED,ce),c=p(B),we&&z.length===1&&V(B,!0,!0),m(B,ge.IS_ASYNC)&&E(B).then(()=>{a.nextTick(()=>{z.shift(),re(z,ce,we)})})):console.warn("props.selectable is false or undefined, please set selectable with true"))},pe=(G,ce)=>{re(G,!0,!1),x(G)||W(G,ce);const we=Vr.NODE_CLICK;t.emit(we,G,I(G),u(G[ge.UUID]),ce)},Ne=(G,ce)=>{if(y(ce))return!1;const we=d(ce),z=`${we}`.split("-").slice(0,G+1);if(z.join("-")===we)return!0;const Q=z.pop(),de=parseInt(Q,10);z.push(`${de+1}`);const Ce=z.join("-");return s.value.some(F=>F[ge.PATH]===Ce)},te=G=>{if(!e.levelLine)return null;const ce=z=>({"--depth":z}),we=m(G,ge.DEPTH)+1;return new Array(we).fill("").map((z,B)=>B).filter(z=>Ne(z,G)).filter(z=>z>0).map(z=>a.createVNode("span",{class:"node-virtual-line",style:ce(we-z)},null))};return{renderTreeNode:G=>{var ce,we,z,B,Q;return a.createVNode("div",{"data-tree-node":p(G),key:p(G),class:Xb(G,n.schema)},[a.createVNode("div",{class:Kb(G,n.schema,e),style:$b(G,e,n),onClick:de=>pe(G,de)},[a.createVNode("span",{class:[Ye("node-action")],onClick:de=>ie(de,G)},[$(G)]),a.createVNode("span",{class:Ye("node-content")},[[ae(G),_(G)],a.createVNode("span",{class:Ye("node-text")},[(z=(we=(ce=t.slots).node)==null?void 0:we.call(ce,L(G)))!=null?z:[o9(G,e)]]),(Q=(B=t.slots).nodeAppend)==null?void 0:Q.call(B,L(G))]),te(G)])])},hanldeTreeNodeClick:W,deepAutoOpen:O,asyncNodeClick:E,setNodeAction:D,setNodeOpened:Y,setSelect:re,setOpen:V}},nC=(e,t,n)=>{const{getSourceNodeByUID:i,getNodeParentIdById:s,getParentNodeData:o,getNodeAttr:c,getNodePath:f,isRootNode:d}=ul(n,e),u=v=>v.target.closest("[data-tree-node]"),m=v=>{u(v).removeEventListener("mouseup",m)},p=v=>{const b=u(v);b.setAttribute("draggable","true"),b.addEventListener("mouseup",m)},C=v=>{v.preventDefault();const b=u(v),I=v.dataTransfer.getData("node-id"),L=b.getAttribute("data-tree-node"),N=T(I,L)?"move":"none";v.dataTransfer.effectAllowed=N,v.dataTransfer.dropEffect=N},y=v=>{v.dataTransfer.effectAllowed="move",v.dataTransfer.dropEffect="move";const b=u(v);v.dataTransfer.setData("text/plain",""),v.dataTransfer.setData("node-id",b.getAttribute("data-tree-node"))},M=v=>{v.preventDefault(),v.stopPropagation();const b=u(v),I=v.dataTransfer.getData("node-id"),L=b.getAttribute("data-tree-node");Reflect.apply(e.dragSort?x:k,globalThis,[I,L])},T=(v,b)=>{const I=f({[ge.UUID]:v}),L=f({[ge.UUID]:b}),N=s(v),E=s(b);return N===E?!0:I.indexOf(L)===-1&&L.indexOf(I)===-1},x=(v,b)=>{if(!T(v,b))return;const I=JSON.parse(JSON.stringify(i(v))),L=JSON.parse(JSON.stringify(i(b))),N=o(v),E=o(b),O=c({[ge.UUID]:v},ge.INDEX),A=c({[ge.UUID]:b},ge.INDEX);N==null||N[e.children].splice(O,1,L),E==null||E[e.children].splice(A,1,I)},k=(v,b)=>{const I=i(v),L=i(b);let N=null;if(d({[ge.UUID]:v}))N=e.data;else{const E=s(v);if(E!=null){N=i(E);const O=c({[ge.UUID]:v},ge.INDEX);N==null||N[e.children].splice(O,1)}}L[e.children]||(L[e.children]=[]),L[e.children].unshift(I)};a.onMounted(()=>{if(e.draggable&&t.value){const v=t.value.$el;v.addEventListener("mousedown",p),v.addEventListener("dragstart",y),v.addEventListener("dragover",C),v.addEventListener("drop",M)}}),a.onUnmounted(()=>{if(e.draggable&&t.value){const v=t.value.$el;v.removeEventListener("mousedown",p),v.removeEventListener("dragstart",y),v.removeEventListener("dragover",C),v.removeEventListener("drop",M)}})},iC=e=>{var C;const t=a.toRef(e,"search"),{openResultNode:n=!1,resultType:i="tree"}=(C=e.search)!=null?C:{},s=y=>["string","number","boolean"].includes(typeof y),o=(y,M)=>y===M,c=(y,M)=>new RegExp(`${y}`,"i").test(`${M}`),f=(y,M)=>Reflect.apply(y,globalThis,M),d=t.value===void 0||t.value===!1,u=(y,M)=>{if(d)return!0;if(s(t.value))return f(c,[t.value,y,M]);const{value:T="",match:x="fuzzy"}=t.value,v=typeof x=="function"?x:x==="fuzzy"?c:o;return`${T}`.length===0?!0:f(v,[T,y,M])},m=a.computed(()=>t.value!==!1&&(s(t.value)?`${t.value}`.length>0:typeof t.value=="object"));return{searchFn:u,refSearch:t,isSearchActive:m,isSearchDisabled:d,openResultNode:n,resultType:i,isTreeUI:i==="tree"}},aC=e=>{var x;const t=(k,v=void 0,b=[])=>{const{data:I,children:L}=k,N=[],E=[];let O=0;const A=new Map;function R(ee,ae,Y,D){if(ee!=null&&A.has(ee)&&![ge.UUID,ge.PARENT_ID].includes(ae)){const V=A.get(ee);Object.prototype.hasOwnProperty.call(V,ae)&&typeof D=="function"&&Reflect.apply(D,self,[V,ae,Y])&&(Object.assign(V,{[ae]:Y}),R(V[ge.PARENT_ID],ae,Y,D))}}function J(ee){let ae=null;return typeof k.nodeKey=="string"&&(ae=ee[k.nodeKey]||Fi.v4()),ae||ee[ge.UUID]||Fi.v4()}const $={[ge.IS_OPEN]:()=>!1,[ge.IS_CHECKED]:()=>!1,[ge.IS_MATCH]:()=>!0,[ge.IS_SELECTED]:ee=>k.selected===ee,[ge.IS_CACHED]:()=>!1,[ge.IS_ASYNC]:()=>null,[ge.IS_LOADING]:()=>!1};function _(ee,ae,Y,D=void 0){let V=D;D===void 0&&typeof $[Y]=="function"&&(V=$[Y](ee,ae));const W=Oi[Y];if(Object.prototype.hasOwnProperty.call(ae,W))return ae[W];const ie=(b||[]).find(pe=>pe[ge.UUID]===ee);let re;return ie&&(re=ie[Y]),re==null&&(re=V),re}function le(ee,ae){return k.selectable?_(ee,ae,ge.IS_SELECTED,k.selected===ee):!1}function se(ee,ae,Y){var W;const D=_(ee,ae,ge.IS_OPEN),V=A.has(Y)?(W=A.get(Y))==null?void 0:W[ge.IS_OPEN]:!0;return D&&V}function ne(ee){return!ee[ge.IS_OPEN]}function fe(ee,ae=0,Y=null,D=null){const V=ee.length;for(let W=0;W<V;W++){const ie=ee[W];if(Array.isArray(ie))fe(ie,ae,Y,D);else if(typeof ie=="object"&&ie!==null){const re=D!==null?`${D}-${W}`:`${W}`,pe=`${J(ie)}`,Ne=!!(ie[L]||[]).length;let te=_(pe,ie,ge.IS_OPEN);k.autoOpenParentNode?te&&R(Y,ge.IS_OPEN,!0,ne):te=se(pe,ie,Y),Object.assign(ie,{[ge.UUID]:pe});const K=k.showCheckbox&&_(pe,ie,ge.IS_CHECKED);K&&N.push(pe),A.set(pe,{[ge.DEPTH]:ae,[ge.INDEX]:W,[ge.UUID]:pe,[ge.PARENT_ID]:Y,[ge.HAS_CHILD]:Ne,[ge.PATH]:re,[ge.IS_ROOT]:Y===null,[ge.ORDER]:O,[ge.IS_SELECTED]:le(pe,ie),[ge.IS_MATCH]:_(pe,ie,ge.IS_MATCH),[ge.IS_OPEN]:te,[ge.IS_CHECKED]:K,[ge.IS_CACHED]:_(pe,ie,ge.IS_CACHED),[ge.IS_ASYNC]:_(pe,ie,ge.IS_ASYNC),[ge.IS_LOADING]:_(pe,ie,ge.IS_LOADING),[L]:null}),O+=1,E.push(Te(U({},JSON.parse(JSON.stringify(ie,(G,ce)=>G===k.children?null:ce))),{[ge.IS_OPEN]:te,[L]:null})),Object.prototype.hasOwnProperty.call(ie,L)&&fe(ie[L]||[],ae+1,pe,re)}}}return fe(v||I),k.showCheckbox&&(N==null||N.forEach(ee=>{Array.from(A.values()).filter(ae=>{var Y;return(Y=ae[ge.PATH])==null?void 0:Y.startsWith(A.get(ee)[ge.PATH])}).forEach(ae=>Object.assign(ae,{[ge.IS_CHECKED]:!0})),R(ee,ge.IS_CHECKED,!0,()=>!0)})),[E,A]},n=t(e),i=new Map,s=[],o=[],c=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),f=a.computed(()=>Array.from(c.schema.values())),{asyncNodeClick:d,deepAutoOpen:u}=c9(e,c),m=k=>{s.push(k)},p=(k,v,b=!0)=>{b&&i.has(k)&&i.delete(k),i.set(k,v)},C=k=>typeof k=="function"?{type:"loop",fn:k}:typeof k=="object"&&typeof k.type=="string"&&typeof k.fn=="function"?k:(console.error("loop event error",k),null),y=k=>{var b;const v=C(k);return v!==null&&Reflect.apply(v.fn,globalThis,[]),(b=v==null?void 0:v.type)!=null?b:"once"},M=()=>{Array.from(i.keys()).forEach(k=>{const v=i.get(k);if(Array.isArray(v)){const b=[];v.forEach((I,L)=>{y(I)==="once"&&b.unshift(L)}),b.length&&b.forEach(I=>v.splice(I,1)),v.length===0&&i.delete(k)}else y(v)==="once"&&i.delete(k)})};a.watch(()=>[e.data],k=>{var b,I;const v=t(e,k,f.value);c.data=v[0],c.schema=v[1],((b=e.async)==null?void 0:b.callback)&&((I=e.async)==null?void 0:I.deepAutoOpen)==="every"&&u(),M()},{deep:!0}),e.selectable&&a.watch(()=>e.selected,k=>{o.length=0,s.forEach(v=>{Reflect.apply(v,globalThis,[k]),o.push(()=>Reflect.apply(v,globalThis,[k]))}),p("afterSelectWatch",o)},{immediate:!0});const T=k=>{p("afterDataUpdate",k)};return(x=e.async)!=null&&x.callback&&u(),{flatData:c,schemaValues:f,asyncNodeClick:d,deepAutoOpen:u,afterDataUpdate:T,registerNextLoop:p,onSelected:m}},rC=a.defineComponent({name:"Tree",props:Gb,emits:Fb,setup(e,t){const{flatData:n,schemaValues:i,onSelected:s,registerNextLoop:o}=aC(e),{setNodeAttr:c,checkNodeIsOpen:f,getNodeAttr:d,getNodePath:u,isRootNode:m,isNodeOpened:p,isNodeChecked:C,isNodeMatched:y,hasChildNode:M}=ul(n,e),{searchFn:T,isSearchActive:x,refSearch:k,openResultNode:v,isTreeUI:b,isSearchDisabled:I}=iC(e);I||a.watch([k],()=>{n.data.forEach(ae=>{const Y=T(o9(ae,e),ae);c(ae,ge.IS_MATCH,Y),v&&R(ae,!0,!0)})});const L=ae=>{if(x.value){const Y=()=>b?i.value.some(D=>{var V;return((V=D[ge.PATH])==null?void 0:V.startsWith(u(ae)))&&D[ge.IS_MATCH]}):!1;return d(ae,ge.IS_MATCH)||Y()}return!0},N=a.computed(()=>n.data.filter(ae=>f(ae)&&L(ae))),{renderTreeNode:E,hanldeTreeNodeClick:O,setNodeOpened:A,setOpen:R,setNodeAction:J,setSelect:$,asyncNodeClick:_}=tC(e,t,n,N,i,{registerNextLoop:o}),le=(ae,Y=!0)=>{J(Jr(ae),ge.IS_CHECKED,Y)};s(ae=>{$(ae,!0,e.autoOpenParentNode)});const se=()=>n;t.expose({hanldeTreeNodeClick:O,isNodeChecked:C,isRootNode:m,isNodeOpened:p,isNodeMatched:y,hasChildNode:M,setOpen:R,setChecked:le,setNodeAction:J,setNodeOpened:A,setSelect:$,asyncNodeClick:_,getData:se});const ne=a.ref(),{renderEmpty:fe}=Zb(e,t);nC(e,ne,n);const ee=ae=>{if(ae.length)return ae.map(E);const Y=x.value?"search-empty":"empty";return fe(Y)};return()=>a.createVNode(zr,{class:Ye("tree"),style:Ub(null,e),list:N.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:Ye("container"),throttleDelay:0,ref:ne},{default:ae=>ee(ae.data||[])})}});const u9=He(rC),d9=e=>e.__v_isVNode;var sC=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(d9(e[n])){i=e[n];break}n=n+1}let s=t-1,o=null;for(;s>=0&&s>n;){if(d9(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 f="bk-compose-form-item-tail";o.props.class&&(f+=` ${o.props.class}`),this.tailBackgroundColor&&(o.props.style=Object.assign(o.props.style||{},{"background-color":this.tailBackgroundColor})),o.props.class=f}}return a.h("div",{class:"bk-compose-form-item"},e)}});const lC={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 oC=a.defineComponent({name:"Form",props:lC,emits:["submit"],setup(e,t){let n=[];const i=d=>{n.push(d)},s=d=>{n=n.reduce((u,m)=>(m!==d&&u.push(m),u),[])};return a.provide(Df,{props:e,register:i,unregister:s}),{handleSubmit:d=>{d.preventDefault(),t.emit("submit")},validate:d=>{let u={};return d?u=(typeof d=="string"?[d]:d).reduce((p,C)=>Te(U({},p),{[C]:!0}),{}):u=n.reduce((m,p)=>p.property?Te(U({},m),{[p.property]:!0}):m,{}),Promise.all(n.reduce((m,p)=>(u[p.property]&&m.push(p.validate()),m),[])).then(()=>Promise.resolve(e.model))},clearValidate:d=>{let u={};d?u=(typeof d=="string"?[d]:d).reduce((p,C)=>Te(U({},p),{[C]:!0}),{}):u=n.reduce((m,p)=>Te(U({},m),{[p.property]:!0}),{}),n.forEach(m=>u[m.property]&&m.clearValidate())}}},render(){var t,n;const e=De({"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)])}}),Sn={required:e=>e!==""&&e!==void 0&&e!==null,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 cC={label:g.string,labelWidth:g.oneOfType([Number,String]),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")},uC=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),dC=e=>{const t=[];return e.required&&t.push({validator:Sn.required,message:`${e.label}\u4E0D\u80FD\u4E3A\u7A7A`,trigger:"blur"}),e.email&&t.push({validator:Sn.email,message:`${e.label}\u683C\u5F0F\u4E0D\u6B63\u786E`,trigger:"blur"}),Number(e.max)>-1&&t.push({validator:n=>Sn.max(n,e.max),message:`${e.label}\u6700\u5927\u503C${e.max}`,trigger:"blur"}),Number(e.min)>-1&&t.push({validator:n=>Sn.min(n,e.min),message:`${e.label}\u6700\u5C0F\u503C${e.min}`,trigger:"blur"}),Number(e.maxlength)>-1&&t.push({validator:n=>Sn.maxlength(n,e.maxlength),message:`${e.label}\u6700\u5927\u957F\u5EA6${e.maxlength}`,trigger:"blur"}),t},fC=(e,t)=>{const n=e.reduce((i,s)=>{let o;if(s.required)o=Sn.required;else if(s.email)o=Sn.email;else if(Number(s.max)>-1)o=c=>Sn.max(c,s.max);else if(Number(s.min)>-1)o=c=>Sn.min(c,s.max);else if(Number(s.maxlength)>-1)o=c=>Sn.min(c,s.max);else if(Object.prototype.toString.call(s.pattern)==="[object RegExp]")o=c=>Sn.pattern(c,s.pattern);else if(Object.prototype.toString.call(s.validator)==="[object Function]")o=s.validator;else return i;return i.push({validator:o,message:s.message,trigger:s.trigger}),i},[]);return[...t,...n]},hC=(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),[]),f9=e=>e!==void 0;var gC=a.defineComponent({name:"FormItem",directives:{bkTooltips:yc},props:cC,setup(e){const t=a.getCurrentInstance(),n=a.reactive({isError:!1,errorMessage:""}),i=N4(),s=Boolean(i),o=a.computed(()=>s?i.props.formType==="vertical":!1),c=a.computed(()=>{const u={width:"",paddingRight:"",textAlign:""},m=f9(e.labelWidth)?e.labelWidth:s&&i.props.labelWidth;f9(m)&&(u.width=`${m}px`,u.paddingRight=m?"":"0px");const p=e.labelPosition||s&&i.props.labelPosition;return p&&(u["text-align"]=p),u}),f=u=>{if(!e.property||s&&!i.props.model)return Promise.resolve(!0);let m=[];s&&i.props.rules&&uC(i.props.rules,e.property)&&(m=i.props.rules[e.property]),e.rules&&(m=e.rules),m=hC(u,fC(m,dC(e))),m.length>0&&(n.isError=!1,n.errorMessage="");const p=dt.exports.get(i.props.model,e.property),C=(()=>{let y=-1;return()=>{if(y=y+1,y>=m.length)return Promise.resolve(!0);const M=m[y];return Promise.resolve().then(()=>{const T=M.validator(p);return typeof T!="boolean"&&typeof T.then=="function"?T.then(x=>{if(x===!1)return Promise.reject(M.message)}).then(()=>C(),()=>(n.isError=!0,n.errorMessage=M.message,Promise.reject(M.message))):T?C():(n.isError=!0,n.errorMessage=M.message,Promise.reject(M.message))})}})();return C()},d=()=>{n.isError=!1,n.errorMessage=""};return a.provide(jf,Te(U({},e),{validate:f,clearValidate:d})),a.onMounted(()=>{s&&i.register(t.proxy)}),a.onBeforeUnmount(()=>{s&&i.unregister(t.proxy)}),Te(U({},a.toRefs(n)),{labelStyles:c,isFormTypeVertical:o,validate:f,clearValidate:d})},render(){var i,s,o,c;const e=De({"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(zs,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},[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"},[(c=(o=this.$slots).default)==null?void 0:c.call(o),n()])])}});const h9=Ft(oC,{FormItem:gC,ComposeFormItem:sC}),mC={span:g.number.def(1),offset:g.number.def(0),pull:g.number.def(0),push:g.number.def(0)};var pC=a.defineComponent({name:"Col",props:mC,emits:[],setup(e,t){const{col:n,gutter:i,flex:s}=a.inject("containerProps"),{span:o,offset:c,pull:f,push:d}=e,u=a.computed(()=>o||n);a.provide("containerProps",{col:u.value,gutter:i,flex:s});const m=function(C){return`${Number((C*100).toFixed(3))}%`},p=a.computed(()=>({width:m(u.value/n),"padding-right":`${i/2}px`,"padding-left":`${i/2}px`,"margin-left":c?m(c/n):null,right:f?m(f/n):null,left:d?m(d/n):null}));return()=>{var C,y;return a.createVNode("div",{class:"bk-grid-col",style:p.value},[(y=(C=t.slots).default)==null?void 0:y.call(C)])}}});const yC={col:g.number.def(24),gutter:g.number.def(20),margin:g.number.def(20),flex:g.bool.def(!1),extCls:g.string};var bC=a.defineComponent({name:"Container",props:yC,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"),f=a.computed(()=>{const{margin:d}=e;return{"padding-right":`${d}px`,"padding-left":`${d}px`}});return()=>{var d,u;return a.createVNode("div",{class:c.value,style:f.value},[(u=(d=t.slots).default)==null?void 0:u.call(d)])}}}),CC=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(()=>Te(U({},s?{display:["-webkit-box","-ms-flexbox","flex"]}:{}),{"margin-right":`-${i/2}px`,"margin-left":`-${i/2}px`}));return()=>{var c,f;return a.createVNode("div",{class:"bk-grid-row",style:o.value},[(f=(c=t.slots).default)==null?void 0:f.call(c)])}}});const dl=Ft(bC,{Row:CC,Col:pC}),vC=["auto","auto-start","auto-end","top","right","bottom","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end"],wC=["hover","click","manual"];var MC=a.defineComponent({name:"Dropdown",props:{isShow:g.bool.def(!1),placement:g.commonType(vC,"placement").def("bottom"),trigger:g.commonType(wC,"trigger").def("hover"),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=De({"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=dt.exports.merge(t,this.popoverOptions);return a.createVNode("div",{class:e},[a.createVNode(Wn,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(" ")])}})])}}),IC=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)])}}),NC=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 g9=Ft(MC,{DropdownMenu:NC,DropdownItem:IC});var qc=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(Tf()),isFiltering:g.bool.def(!1),searchKey:g.oneOfType([g.string,g.number]).def(""),modelValue:g.arrayOf(g.oneOfType([Po(),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=v=>typeof v=="number"?`${v}px`:v,f=c(e.height),d=c(e.width),u=v=>{v.length===0&&(i.list=i.list.slice(0,1),s.value=[]),v.forEach(b=>{const I=n.getNodeById(b);p(I)}),o.value=v},m=v=>{v.isDisabled||(v.config.multiple?o.value=n.getCheckedNodes().map(b=>b.path):o.value=v.path,t("update:modelValue",o.value))},p=v=>{var b;if(!(!v||(v==null?void 0:v.isDisabled))){if(i.list=i.list.slice(0,v.level),s.value=s.value.slice(0,v.level-1),(b=v.children)!=null&&b.length){i.list.push(v.children),s.value.push(v);return}if(n.config.isRemote&&!v.isLeaf){v.loading=!0;const I=L=>{n.appendNodes(L,v||null),i.list.push(v.children),s.value.push(v),v.loading=!1};n.config.remoteMethod(v,I)}}},C=v=>{const{trigger:b,checkAnyLevel:I,multiple:L}=v.config;return{onClick:E=>{(!v.isLeaf||L)&&E.stopPropagation(),b==="click"&&p(v),I&&!L&&m(v),v.isLeaf&&!L&&m(v)},onMouseenter:()=>{b==="hover"&&p(v)}}},y=v=>{const{multiple:b}=v.config;return{onClick:L=>{if(b){L.stopPropagation(),x(v,!v.checked);return}p(v),v.isLeaf&&!b&&m(v)}}},M=v=>(s.value[v.level-1]||{}).id===v.id,T=(v,b)=>{const{multiple:I}=v.config;return I?b.some(L=>pr(L,v.path)):pr(b,v.path)},x=(v,b)=>{v.setNodeCheck(b||!1),m(v)},k=v=>v.loading?a.createVNode(wr,{class:"icon-spinner"},null):a.createVNode(Ln,{class:"icon-angle-right"},null);return a.watch(()=>e.modelValue,v=>{u(v)},{immediate:!0}),a.watch(()=>e.store,v=>{i.list=[v.getNodes()]}),{menus:i,activePath:s,nodeExpandHandler:p,isNodeInPath:M,nodeEvent:C,isCheckedNode:T,checkValue:o,checkNode:x,iconRender:k,panelWidth:d,panelHeight:f,searchPanelEvents:y}},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(Li,{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 m9(e){return e.data.disabled?!0:e.level!==1?m9(e.parent):e.data.disabled}class fl{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 fl(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 m9(this)}broadcast(t,n){const i=`onParent${Oo(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${Oo(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,f=o.checked?1:c;return s+f},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 p9=(e,t)=>e.reduce((n,i)=>(i.isLeaf?n.push(i):(!t&&n.push(i),n=n.concat(p9(i.children,t))),n),[]);class y9{constructor(t){const{list:n}=t;this.data=n,this.config=t,this.nodes=this.data.map(i=>new fl(i,this.config))}getNodes(){return this.nodes}clearChecked(){this.getFlattedNodes().forEach(t=>{t.checked=!1,t.isIndeterminate=!1})}removeTag(t){this.getFlattedNodes().find(n=>pr(t,n.path)?(n.checked=!1,!0):!1)}getFlattedNodes(t=!1){return p9(this.nodes,t)}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getNodeByValue(t){var i;return(i=this.getFlattedNodes().filter(s=>pr(s.path,t))[0])!=null?i:null}getNodeById(t){return this.getFlattedNodes().find(n=>n.id===t)}appendNode(t,n){const i=new fl(t,this.config,n);(n?n.children:this.nodes).push(i)}appendNodes(t,n){t.forEach(i=>this.appendNode(i,n))}}var LC=a.defineComponent({name:"Cascader",directives:{clickoutside:kn},components:{CascaderPanel:qc,BkPopover:Wn},props:{modelValue:g.arrayOf(g.oneOfType([Po(),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}=W0(),f=a.ref(new y9(e)),d=a.ref(!1),u=a.ref(""),m=a.ref([]),{modelValue:p}=a.toRefs(e),C=a.ref(),y=a.ref(""),M=a.ref([]),T=a.ref(!1),x=a.computed({get:()=>p.value,set:J=>{t("update:modelValue",J)}}),k=a.ref(null),v=J=>e.showCompleteName?J.pathNames.join(n):J.pathNames[J.pathNames.length-1],b=()=>{y.value=u.value},I=J=>{var $;if(i){m.value=f.value.getCheckedNodes().map(_=>({text:v(_),key:_.id}));return}if(!e.checkAnyLevel&&(($=k==null?void 0:k.value)==null||$.hide()),J.length===0)u.value="";else{const _=f.value.getNodeByValue(J);if(!_)return;u.value=v(_)}b()},L=J=>{J.stopPropagation(),f.value.clearChecked(),y.value="",I([]),t("update:modelValue",[]),t("clear",JSON.parse(JSON.stringify(e.modelValue)))},N=(J,$,_)=>{_.stopPropagation();const le=JSON.parse(JSON.stringify(J)),se=le.splice($,1)[0];f.value.removeTag(se),I(le),t("update:modelValue",f.value.getCheckedNodes().map(ne=>ne.path))},E=(J,$)=>{I(J),t("update:modelValue",J),$!==void 0&&t("change",J)},O=()=>{f.value=new y9(e),I(e.modelValue)},A=J=>{t("toggle",J.isShow),J.isShow||(T.value=!1)},R=Ns(200,J=>{const $=J.target;if(y.value=$.value,y.value===""){T.value=!1;return}T.value=!0;const _=f.value.getFlattedNodes().filter(le=>(e.checkAnyLevel||le.isLeaf)&&le.pathNames.join(e.separator).includes(y.value));M.value=_,!(k!=null&&k.value.isShow)&&(k==null||k.value.show())});return a.watch(()=>e.modelValue,E,{immediate:!0}),a.watch(()=>e.list,O,{deep:!0,immediate:!0}),{store:f,updateValue:I,panelShow:d,selectedText:u,checkedValue:x,handleClear:L,isHover:s,setHover:o,popover:k,cancelHover:c,selectedTags:m,removeTag:N,cascaderPanel:C,popoverChangeEmitter:A,searchKey:y,suggestions:M,isFiltering:T,searchInputHandler:R}},render(){const e=()=>this.clearable&&this.isHover?a.createVNode(Gt,{class:"bk-icon-clear-icon",onClick:this.handleClear},null):a.createVNode(za,{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(Qn,{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(Wn,{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(qc,{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 b9=Ft(LC,{CascaderPanel:qc});var C9=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),f=a.ref(null),d=a.ref(e.modelValue),u=a.ref(0),m=a.ref(0),p=a.ref(!1),C=a.ref(null),y=a.computed(()=>{var A,R;let E="";if((A=e.params.customContent)!=null&&A[e.modelValue]){const J=e.params.customContent[e.modelValue];E=J.tip||J.label||""}const O=e.params.vertical?"right":"top";return(R=e.params)!=null&&R.showTip?{content:e.params.formatterTipLabel(`${E||(e==null?void 0:e.modelValue)||"0"}`),placement:O}:{content:"",placement:O}}),M=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),T=a.computed(()=>e.params.vertical?{bottom:M.value}:{left:M.value}),x=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),k=E=>{e.params.disable||(E.preventDefault(),v(E),Qr(window,"mousemove",b),Qr(window,"touchmove",b),Qr(window,"mouseup",I),Qr(window,"touchend",I))},v=E=>{n.value=!0,i.value=!0,e.params.vertical?s.value=E.clientY:o.value=E.clientX,c.value=parseFloat(M.value),f.value=c.value},b=E=>{if(n.value){i.value=!1,t("resetSize");let O=0;e.params.vertical?(u.value=E.clientY,O=(s.value-u.value)/e.params.sliderSize*100):(m.value=E.clientX,O=(m.value-o.value)/e.params.sliderSize*100),f.value=c.value+O,L(f.value)}},I=()=>{p.value=!1,n.value&&(setTimeout(()=>{n.value=!1,i.value||(L(f.value),t("emitChange"))},0),hl(window,"mousemove",b),hl(window,"touchmove",b),hl(window,"mouseup",I),hl(window,"touchend",I))},L=E=>{if(E===null||isNaN(E))return;E<0?f.value=0:E>100&&(f.value=100);const O=100/((e.params.maxValue-e.params.minValue)/e.params.step);let R=Math.round(E/O)*O*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;R=parseFloat(R.toFixed(e.params.precision)),t("update:modelValue",R),!n.value&&e.modelValue!==d.value&&(d.value=e.modelValue)};return{renderDom:()=>a.createVNode("div",{class:["bk-slider-button",e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],ref:C,tabindex:"0",style:T.value,onClick:E=>E.stopPropagation(),onMousedown:k},[Boolean(y.value.content)?a.createVNode(Qs,{content:y.value.content,theme:"dark",placement:y.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"]},[x.value]):void 0]),setPosition:L,tip:y}},render(){return this.renderDom()}});const Qr=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},hl=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)};var kC=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),f=a.ref(0),d=a.ref(0),u=a.ref(null),m=a.ref(null),p=a.ref(null),C=a.ref(null),y=a.computed(()=>{const Y=[e.minValue,e.maxValue,e.step].map(D=>{const V=`${D}`.split(".")[1];return V?V.length:0});return Math.max.apply(null,Y)}),M=a.computed(()=>Math.min(s.value,o.value)),T=a.computed(()=>Math.max(s.value,o.value)),x=a.computed(()=>e.range?`${100*(T.value-M.value)/(e.maxValue-e.minValue)}%`:`${100*(s.value-e.minValue)/(e.maxValue-e.minValue)}%`),k=a.computed(()=>e.range?`${100*(M.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),v=a.computed(()=>e.vertical?{height:x.value,bottom:k.value}:{width:x.value,left:k.value}),b=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const Y=(e.maxValue-e.minValue)/e.step,D=100*e.step/(e.maxValue-e.minValue),V=[];for(let W=1;W<Y;W++)V.push(W*D);return e.range?V.filter(W=>W<100*(M.value-e.minValue)/(e.maxValue-e.minValue)||W>100*(T.value-e.minValue)/(e.maxValue-e.minValue)):V.filter(W=>W>100*(s.value-e.minValue)/(e.maxValue-e.minValue))}),I=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),L=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const Y=100*e.step/(e.maxValue-e.minValue),D=[];for(let V=e.minValue,W=0;V<=e.maxValue;V+=e.step,W++){const ie={stepWidth:W*Y,stepLabel:e.formatterLabel(V)};D.push(ie)}return D}),N=a.computed(()=>Array.isArray(e.modelValue)),E=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((Y,D)=>Number(Y)-Number(D)).filter(Y=>Number(Y)>=e.minValue&&Number(Y)<=e.maxValue).map(Y=>{const{tip:D}=e.customContent[Y],{label:V}=e.customContent[Y];return{tip:D||V||"",label:V||"",percent:(Number(Y)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),O=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:y.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{$()}),a.watch(()=>s.value,Y=>{e.range?n("update:modelValue",[M.value,T.value]):n("update:modelValue",Y),f.value=Y}),a.watch(()=>o.value,Y=>{n("update:modelValue",[M.value,T.value]),d.value=Y}),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),A(),Qr(window,"resize",A())});const A=()=>{u.value&&(i.value=u.value[`client${e.vertical?"Height":"Width"}`])},R=Y=>{var D,V;if(Y.stopPropagation(),!e.disable){if(A(),e.vertical){const W=(D=u.value)==null?void 0:D.getBoundingClientRect().bottom;se((W-Y.clientY)/i.value*100)}else{const W=(V=u.value)==null?void 0:V.getBoundingClientRect().left;se((Y.clientX-W)/i.value*100)}_()}},J=()=>e.range?![M.value,T.value].every((Y,D)=>Y===c.value[D]):e.modelValue!==c.value,$=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const Y=e.modelValue;e.range&&Array.isArray(Y)?Y[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):Y[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):Y[0]<e.minValue?n("update:modelValue",[e.minValue,Y[1]]):Y[1]>e.maxValue?n("update:modelValue",[Y[0],e.maxValue]):(s.value=Number(Y[0]),o.value=Number(Y[1]),J()&&(c.value=Y.slice())):!e.range&&typeof Y=="number"&&!isNaN(Y)&&(Y<e.minValue?n("update:modelValue",e.minValue):Y>e.maxValue?n("update:modelValue",e.maxValue):(s.value=Y,J()&&(c.value=Y)))},_=async()=>{await a.nextTick(),n("change",e.range?[M.value,T.value]:e.modelValue)},le=Y=>e.vertical?{bottom:`${Y}%`}:{left:`${Y}%`},se=Y=>{if(!e.range){m.value.setPosition(Y);return}const D=e.minValue+Y*(e.maxValue-e.minValue)/100;Math.abs(M.value-D)<Math.abs(T.value-D)?C.value=s.value<o.value?m.value:p.value:C.value=s.value>o.value?m.value:p.value,C.value.setPosition(Y)},ne=Y=>{if(Y==="")return;const D=parseFloat(Y);D<e.minValue?(f.value=e.minValue,s.value=e.minValue):D>e.maxValue?(f.value=e.maxValue,s.value=e.maxValue):s.value=D},fe=Y=>{if(Y===""||typeof Y=="number")return;const D=parseFloat(Y);D<e.minValue?(d.value=e.minValue,o.value=e.minValue):D>e.maxValue?(d.value=e.maxValue,o.value=e.maxValue):o.value=D},ee=Y=>{let D=0;return Y==="start"?D=e.vertical?e.maxValue:e.minValue:D=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[s.value,o.value].includes(D)?"0":"1"};return{renderDom:()=>{var Y,D;return a.createVNode("div",{class:["bk-slider",e.extCls]},[(Y=t.start)==null?void 0:Y.call(t),a.createVNode("div",{class:"bk-slider-runway",ref:u,style:I.value,onClick:R},[a.createVNode("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:v.value},null),e.showInterval?b.value.map((V,W)=>a.createVNode("div",{key:W,class:["bk-slider-interval",{vertical:e.vertical}],style:le(V)},null)):void 0,e.customContent?E.value.map((V,W)=>a.createVNode("div",{key:W,class:["bk-slider-interval",{vertical:e.vertical}],style:le(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:ee("start")}]},[e.formatterLabel(e.minValue)]),a.createVNode("div",{class:"label-end",style:[{opacity:ee("end")}]},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return L.value.map((V,W)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:W,style:le(V.stepWidth)},[V.stepLabel]));if(e.customContent)return E.value.map((V,W)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:W,style:le(V.percent)},[V.label]))}()]):void 0,a.createVNode(C9,{modelValue:s.value,"onUpdate:modelValue":V=>s.value=V,ref:m,params:O.value,onEmitChange:_,onResetSize:A},null),e.range?a.createVNode(C9,{modelValue:o.value,"onUpdate:modelValue":V=>o.value=V,ref:p,params:O.value,onEmitChange:_,onResetSize:A},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:"bk-slider-input"},[a.createVNode("div",{class:"input-item"},[a.createVNode(Ki,{type:"number",modelValue:f.value,max:e.maxValue,min:e.minValue,onChange:ne},null)]),N.value&&o.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("\uFF5E")]),a.createVNode("div",{class:"input-item"},[a.createVNode(Ki,{type:"number",modelValue:d.value,max:e.maxValue,min:e.minValue,onChange:fe},null)])]:void 0]):void 0,(D=t.end)==null?void 0:D.call(t)])}}},render(){return this.renderDom()}});const v9=He(kC);var TC=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:f,immediate:d,autoMinimize:u}=a.toRefs(e),m=a.ref(!1),p=a.ref(!0),C=a.ref(!1),y=a.ref(null),M=a.ref({}),T=a.ref(null),x=a.ref(null),k=a.ref(null),v=a.ref(null),b=a.computed(()=>["left","right"].includes(n.value)),I=a.computed(()=>b.value?"width":"height"),L=a.computed(()=>{let ee=i.value;return typeof ee=="number"&&(ee=`${ee}px`),{[I.value]:ee}}),N=a.computed(()=>({[`margin-${n.value}`]:`${s.value-o.value}px`,[I.value]:`${o.value}px`})),E=a.computed(()=>u.value?typeof u.value=="boolean"?50:u.value:0),O=()=>{const ee=T.value.getBoundingClientRect();y.value=b.value?ee.width:ee.height},A=new ResizeObserver(O),R=()=>{switch(x.value.style.visibility="visible",n.value){case"left":x.value.style.inset=`0 auto auto ${M.value.aside.width}px`;break;case"right":x.value.style.inset=`0 ${M.value.aside.width}px auto auto`;break;case"top":x.value.style.inset=`${M.value.aside.height}px auto auto 0`;break;case"bottom":x.value.style.inset=`auto auto ${M.value.aside.height}px 0`;break}},J=()=>{k.value.style.display="block",k.value.style.cursor=b.value?"col-resize":"row-resize"},$=ee=>Math.min(c.value,Math.max(f.value,ee),y.value-o.value),_=ee=>{t("before-resize",ee);const ae=v.value.getBoundingClientRect();M.value=Object.freeze({mouse:{clientX:ee.clientX,clientY:ee.clientY},aside:{width:ae.width,height:ae.height}}),J(),d.value||R(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const Y=W=>{t("resizing",W)},D=W=>{let ie;switch(n.value){case"top":ie=W.clientY-M.value.mouse.clientY;break;case"right":ie=M.value.mouse.clientX-W.clientX;break;case"bottom":ie=M.value.mouse.clientY-W.clientY;break;case"left":ie=W.clientX-M.value.mouse.clientX}const re=M.value.aside[I.value]+ie,pe=$(re)+s.value,Ne=`${pe}px`;d.value?v.value.style[I.value]=Ne:x.value.style[n.value]=Ne,Y(pe)},V=()=>{if(x.value.style.visibility="hidden",k.value.style.display="none",document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",V),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{le(),t("after-resize",parseFloat(x.value.style[n.value]))}),d.value)return!1;v.value.style[I.value]=x.value.style[n.value]};document.addEventListener("mousemove",D),document.addEventListener("mouseup",V)},le=()=>{if(!u.value)return!1;const ee=v.value.getBoundingClientRect();if(C.value=m.value=ee[I.value]<=E.value,!C.value)return p.value=!0,!1;ne(),a.nextTick(()=>{v.value.setAttribute(`data-${I.value}`,L.value[I.value])})},se=ee=>{m.value=typeof ee=="boolean"?ee:!m.value,ne(),t("collapse-change",m.value)},ne=()=>{const ee=v.value.getBoundingClientRect();fe(!m.value),m.value?(v.value.setAttribute(`data-${I.value}`,`${ee[I.value]}px`),v.value.style[I.value]="5px"):(p.value=!0,v.value.style[I.value]=v.value.getAttribute(`data-${I.value}`))},fe=ee=>{const ae=()=>{p.value=ee,v.value.style.transition="",v.value.removeEventListener("transitionend",ae)};v.value.addEventListener("transitionend",ae),v.value.style.transition=`${I.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};return a.onMounted(()=>{A.observe(T.value)}),a.onBeforeUnmount(()=>{A.unobserve(T.value)}),{collapsed:m,asideContentVisible:p,minimized:C,limitMax:y,state:M,vertical:b,cssPropKey:I,bkResizeLayoutRef:T,resizeProxyRef:x,resizeMaskRef:k,asideRef:v,triggerStyle:N,asideStyle:L,handleMousedown:_,setCollapse:se}},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(Ln,{class:"bk-resize-collapse",onClick:this.setCollapse},null):a.createVNode(Mi,{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 w9=He(TC),xC={list:g.array.def([]),titleAble:g.bool.def(!1),extCls:g.string};var SC=a.defineComponent({name:"Timeline",props:xC,emits:["select"],setup(e,{emit:t}){const n=a.ref([]),i=c=>{const f=[];c.forEach(d=>{var u;f.push({tag:d.tag,content:d.content,type:d.type,size:d.size,color:d.color,icon:d.icon,filled:d.filled,border:(u=d.border)!=null?u:!0})}),n.value.splice(0,n.value.length,...f)},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(f){console.warn(f)}};return a.onMounted(s),a.watch(()=>e.list,()=>{i(e.list)},{deep:!0}),{defaultTimelines:n,titleSelect:o}},render(){const e=n=>{const{icon:i}=n;return i?typeof i=="function":!1},t=n=>{const i="bk-timeline",s=["blue","red","green","yellow","gray"],o=n.type?`${i}-${n.type}`:`${i}-default`,c=n.size?`${i}-${n.size}`:"",f=n.filled?`${i}-filled`:"",d=n.color&&s.includes(n.color)?`${i}-${n.color}`:"";return De({},`${i} ${o} ${c} ${d} ${f}`)};return a.createVNode("ul",{class:["bk-timeline",this.extCls]},[this.defaultTimelines.map(n=>{var i,s,o;return a.createVNode("li",{class:["bk-timeline-dot",t(n)]},[e(n)?a.createVNode("div",{class:"bk-timeline-icon",style:{border:n.border?`2px solid ${n.color}`:"0px",borderRadius:n.border?"50%":"0"}},[a.createVNode("span",{class:"bk-timeline-icon-inner"},[a.createVNode(n.icon,null,null)])]):"",a.createVNode("div",{class:"bk-timeline-section"},[a.createVNode("div",{class:"bk-timeline-title",onClick:()=>{this.titleSelect(n)}},[(o=(s=(i=this.$slots).default)==null?void 0:s.call(i))!=null?o:a.createVNode("span",{innerHTML:n.tag},null)]),n.content?a.createVNode("div",{class:"bk-timeline-content",innerHTML:n.content},null):""])])})])}});const M9=He(SC),DC={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 jC=a.defineComponent({name:"Process",props:DC,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(f){console.warn(f)}};return a.onMounted(s),{defaultProcessList:n,paddingBottom:i,jumpTo:o}},render(){const e="bk-process",t=De({[`${this.extCls}`]:!!this.extCls},`${e}`),n=f=>f.status==="loading",i=f=>f.status==="error",s=f=>this.curProcess>=f+1||this.defaultProcessList[f].status==="done",o=f=>f.icon?f.icon:"",c=(f,d)=>{if(f===this.curProcess-1&&n(d))return a.createVNode(Ts,{class:"bk-icon bk-process-icon icon-loading"},null);if(f===this.curProcess-1&&i(d))return a.createVNode(Qn,{class:"bk-process-icon"},null);if(f===this.curProcess-1&&o(d))return a.createVNode("span",{class:"bk-process-icon-custom"},[a.createVNode(d.icon,null,null)]);if(s(f))return a.createVNode(Ui,{class:"bk-process-icon-done"},null)};return a.createVNode("div",{class:t},[a.createVNode("ul",{style:{paddingBottom:`${this.paddingBottom}px`}},[this.defaultProcessList.map((f,d)=>a.createVNode("li",{onClick:()=>{this.jumpTo(d+1)},style:{cursor:this.controllable?"pointer":""},class:{success:this.curProcess>=d+1,current:n(f)&&d===this.curProcess-1,error:i(f)&&d===this.curProcess-1}},[f[this.displayKey],c(d,f)]))])])}});const I9=He(jC),ra="bk-upload";var li=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(li||{}),Qa=(e=>(e.NEW="new",e.UPLOADING="uploading",e.SUCCESS="success",e.FAIL="fail",e))(Qa||{});const N9=[li.BUTTON,li.DRAGGABLE,li.PICTURE];var oi={theme:{type:String,default:"draggable",validator:e=>!e||N9.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of \u3010${N9.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 L9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var zC=a.defineComponent({name:"UploadList",props:{theme:oi.theme,disabled:oi.disabled,files:oi.files,multiple:oi.multiple},emits:["remove","retry"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:s,multiple:o}=a.toRefs(e),c=`${ra}-list`,f=a.computed(()=>i.value===li.PICTURE),d=a.computed(()=>f.value&&!o.value),u=a.computed(()=>De({[c]:!0,[`${c}--${i.value}`]:!0,[`${c}--disabled`]:s.value}));function m(v){const b=["Bytes","KB","MB","GB","TB"],I=Math.floor(Math.log(v)/Math.log(1024));return`${(v/1024**I).toFixed(2)}${b[I]}`}function p(v,b){n("remove",v,b)}function C(v,b){n("retry",v,b)}const y=()=>{let v;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},L9(v=e.files.map(b=>{const I=De({[`${c}__item`]:!0,[`${c}__item-picture`]:!0,[`${c}__item--${b.status}`]:!0});return a.createVNode("li",{key:b.uid,class:I},[t!=null&&t.file?t.file({file:b}):M(b)])}))?v:{default:()=>[v]})},M=v=>[a.withDirectives(a.createVNode("img",{src:v.url,class:`${c}__picture-item-thumbnail`,alt:""},null),[[a.vShow,v.status!=="uploading"]]),a.createVNode(a.Fragment,null,[v.status==="uploading"&&a.createVNode(Dr,{class:`${c}__picture-item-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:v.percentage},null)]),a.createVNode(a.Fragment,null,[!s.value&&a.createVNode("div",{class:`${c}__picture-item-actions`},[a.createVNode(Cr,{class:"action-icon",onClick:b=>p(v,b)},null)])])],T=()=>{let v;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},L9(v=e.files.map(b=>{const I=De({[`${c}__item`]:!0,[`${c}__item--${b.status}`]:!0});return a.createVNode("li",{key:b.uid,class:I},[t!=null&&t.file?t.file({file:b}):k(b)])}))?v:{default:()=>[v]})},x=v=>{var O;const b=(O=v==null?void 0:v.raw)==null?void 0:O.type,[I]=(b==null?void 0:b.split("/"))||"";let N={text:Ir,image:Uo,application:Ir,video:nc,audio:_o}[I]||Ir;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(b)&&(N=Jo),a.h(N,{class:`${c}__item-file-icon`})},k=v=>[a.createVNode("div",{class:`${c}__item-icon`},[v.isPic?a.createVNode("img",{src:v.url,class:`${c}__item-thumbnail`,alt:""},null):x(v)]),a.createVNode("div",{class:`${c}__item-summary`},[a.createVNode("div",{class:`${c}__item-name`,title:v.name},[v.name]),v.status!=="uploading"&&a.createVNode("div",{class:`${c}__item-message`,title:v.statusText},[v.status==="success"&&a.createVNode("span",null,[a.createVNode(Ui,{class:`${c}__item-message-success-icon`},null),v.statusText||"\u4E0A\u4F20\u6210\u529F"]),v.status==="fail"&&a.createVNode("span",null,[v.statusText||"\u4E0A\u4F20\u5931\u8D25"])]),v.status==="uploading"&&a.createVNode(Dr,{class:`${c}__item-progress`,showText:!1,percent:v.percentage,size:"small"},null),v.status!=="fail"&&a.createVNode("div",{class:`${c}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-size`},[m(v.size)]),[[a.vShow,v.size]]),a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-percentage`},[v.percentage,a.createTextVNode("%")]),[[a.vShow,v.status==="uploading"]])]),!s.value&&a.createVNode("div",{class:`${c}__item-actions`},[v.status==="fail"&&a.createVNode(Ko,{class:`${c}__item-retry-icon`,onClick:b=>C(v,b)},null),a.createVNode(Cr,{class:`${c}__item-del-icon`,onClick:b=>p(v,b)},null)])])];return()=>{var v;return a.createVNode(a.Fragment,null,[d.value?(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger((v=e.files)==null?void 0:v[0])):a.createVNode("ul",{class:u.value},[f.value?y():T(),(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger())])])}}}),k9=a.defineComponent({name:"UploadTrigger",props:{theme:oi.theme,disabled:oi.disabled,multiple:oi.multiple,accept:oi.accept,file:{type:Object}},emits:["change","remove"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:s,file:o,multiple:c,accept:f}=a.toRefs(e),d=`${ra}-trigger`,u=a.computed(()=>i.value===li.BUTTON),m=a.computed(()=>i.value===li.DRAGGABLE),p=a.computed(()=>i.value===li.PICTURE),C=a.computed(()=>p.value&&!c.value),y=a.computed(()=>p.value&&!f.value?"image/png,image/jpeg,image/jpg":f.value),M=a.ref(null),T=a.computed(()=>{var $,_,le;return De({[d]:!0,[`${d}--${i.value}`]:!0,[`${d}--single-picture`]:C.value,[`${d}--has-file`]:($=o.value)!=null?$:!1,[`${d}--${(_=o.value)==null?void 0:_.status}`]:(le=o.value)!=null?le:!1,[`${d}--dragover`]:L.value,[`${d}--disabled`]:s.value})}),x=()=>{M.value.value=null,M.value.click()},k=$=>{const{files:_}=$.target;n("change",Array.from(_))},v=()=>{e.disabled||x()},b=$=>{$.defaultPrevented||$.target!==$.currentTarget||(($.code==="Enter"||$.code==="Space")&&x(),$.preventDefault())};function I($,_){n("remove",$,_),_.stopPropagation(),_.preventDefault()}const L=a.ref(!1),N=()=>{const $=ne=>{if(s.value)return;ne.preventDefault(),L.value=!1;const fe=Array.from(ne.dataTransfer.files);if(!y.value){n("change",fe);return}const ee=fe.filter(ae=>{const{type:Y,name:D}=ae,V=D.includes(".")?`.${D.split(".").pop()}`:"",W=Y.replace(/\/.*$/,"");return y.value.split(",").map(ie=>ie.trim()).filter(ie=>ie).some(ie=>ie.startsWith(".")?V===ie:/\/\*$/.test(ie)?W===ie.replace(/\/\*$/,""):/^[^/]+\/[^/]+$/.test(ie)?Y===ie:!1)});n("change",ee)},_=ne=>{ne.preventDefault(),L.value=!0},le=()=>{L.value=!1},se=De({[`${d}__draggable`]:!0});return a.createVNode("div",{class:se,onDrop:$,onDragover:_,onDragleave:le},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(As,{class:`${d}__draggable-icon`},null),a.createVNode("div",{class:`${d}__draggable-text`},[a.createTextVNode("\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904\u6216"),a.createVNode("span",{class:`${d}__draggable-upload-link`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])])])},E=()=>a.createVNode(a.Fragment,null,[C.value&&e.file?A(e.file):O()]),O=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${d}__picture-inner`},[a.createVNode(Es,{class:`${d}__picture-icon`},null),a.createVNode("div",{class:`${d}__picture-text`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])]),A=$=>[a.withDirectives(a.createVNode("img",{src:$.url,class:`${d}__picture-thumbnail`,alt:""},null),[[a.vShow,$.status!=="uploading"]]),a.createVNode(a.Fragment,null,[$.status==="uploading"&&a.createVNode(Dr,{class:`${d}__picture-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:$.percentage},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${d}__picture-actions`},[a.createVNode(Cr,{class:"action-icon",onClick:_=>I($,_)},null)])])],R=()=>a.createVNode(Zt,{disabled:s.value},{default:()=>[a.createVNode(As,{class:`${d}__button-icon`},null),a.createVNode("span",{class:`${d}__button-text`},[a.createTextVNode("\u4E0A\u4F20\u6587\u4EF6")])]}),J=()=>{if(u.value)return R();if(m.value)return N();if(p.value)return E()};return()=>{var $;return a.createVNode("div",{class:T.value,tabindex:"0",onClick:v,onKeydown:b},[t.trigger?[t.trigger(),($=t==null?void 0:t.default)==null?void 0:$.call(t)]:J(),a.createVNode("input",{ref:M,class:"bk-upload__input-file",tabindex:"-1",onChange:k,accept:y.value,multiple:c.value,disabled:s.value,type:"file"},null)])}}}),T9={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(k,v){var b=k[0],I=k[1],L=k[2],N=k[3];b+=(I&L|~I&N)+v[0]-680876936|0,b=(b<<7|b>>>25)+I|0,N+=(b&I|~b&L)+v[1]-389564586|0,N=(N<<12|N>>>20)+b|0,L+=(N&b|~N&I)+v[2]+606105819|0,L=(L<<17|L>>>15)+N|0,I+=(L&N|~L&b)+v[3]-1044525330|0,I=(I<<22|I>>>10)+L|0,b+=(I&L|~I&N)+v[4]-176418897|0,b=(b<<7|b>>>25)+I|0,N+=(b&I|~b&L)+v[5]+1200080426|0,N=(N<<12|N>>>20)+b|0,L+=(N&b|~N&I)+v[6]-1473231341|0,L=(L<<17|L>>>15)+N|0,I+=(L&N|~L&b)+v[7]-45705983|0,I=(I<<22|I>>>10)+L|0,b+=(I&L|~I&N)+v[8]+1770035416|0,b=(b<<7|b>>>25)+I|0,N+=(b&I|~b&L)+v[9]-1958414417|0,N=(N<<12|N>>>20)+b|0,L+=(N&b|~N&I)+v[10]-42063|0,L=(L<<17|L>>>15)+N|0,I+=(L&N|~L&b)+v[11]-1990404162|0,I=(I<<22|I>>>10)+L|0,b+=(I&L|~I&N)+v[12]+1804603682|0,b=(b<<7|b>>>25)+I|0,N+=(b&I|~b&L)+v[13]-40341101|0,N=(N<<12|N>>>20)+b|0,L+=(N&b|~N&I)+v[14]-1502002290|0,L=(L<<17|L>>>15)+N|0,I+=(L&N|~L&b)+v[15]+1236535329|0,I=(I<<22|I>>>10)+L|0,b+=(I&N|L&~N)+v[1]-165796510|0,b=(b<<5|b>>>27)+I|0,N+=(b&L|I&~L)+v[6]-1069501632|0,N=(N<<9|N>>>23)+b|0,L+=(N&I|b&~I)+v[11]+643717713|0,L=(L<<14|L>>>18)+N|0,I+=(L&b|N&~b)+v[0]-373897302|0,I=(I<<20|I>>>12)+L|0,b+=(I&N|L&~N)+v[5]-701558691|0,b=(b<<5|b>>>27)+I|0,N+=(b&L|I&~L)+v[10]+38016083|0,N=(N<<9|N>>>23)+b|0,L+=(N&I|b&~I)+v[15]-660478335|0,L=(L<<14|L>>>18)+N|0,I+=(L&b|N&~b)+v[4]-405537848|0,I=(I<<20|I>>>12)+L|0,b+=(I&N|L&~N)+v[9]+568446438|0,b=(b<<5|b>>>27)+I|0,N+=(b&L|I&~L)+v[14]-1019803690|0,N=(N<<9|N>>>23)+b|0,L+=(N&I|b&~I)+v[3]-187363961|0,L=(L<<14|L>>>18)+N|0,I+=(L&b|N&~b)+v[8]+1163531501|0,I=(I<<20|I>>>12)+L|0,b+=(I&N|L&~N)+v[13]-1444681467|0,b=(b<<5|b>>>27)+I|0,N+=(b&L|I&~L)+v[2]-51403784|0,N=(N<<9|N>>>23)+b|0,L+=(N&I|b&~I)+v[7]+1735328473|0,L=(L<<14|L>>>18)+N|0,I+=(L&b|N&~b)+v[12]-1926607734|0,I=(I<<20|I>>>12)+L|0,b+=(I^L^N)+v[5]-378558|0,b=(b<<4|b>>>28)+I|0,N+=(b^I^L)+v[8]-2022574463|0,N=(N<<11|N>>>21)+b|0,L+=(N^b^I)+v[11]+1839030562|0,L=(L<<16|L>>>16)+N|0,I+=(L^N^b)+v[14]-35309556|0,I=(I<<23|I>>>9)+L|0,b+=(I^L^N)+v[1]-1530992060|0,b=(b<<4|b>>>28)+I|0,N+=(b^I^L)+v[4]+1272893353|0,N=(N<<11|N>>>21)+b|0,L+=(N^b^I)+v[7]-155497632|0,L=(L<<16|L>>>16)+N|0,I+=(L^N^b)+v[10]-1094730640|0,I=(I<<23|I>>>9)+L|0,b+=(I^L^N)+v[13]+681279174|0,b=(b<<4|b>>>28)+I|0,N+=(b^I^L)+v[0]-358537222|0,N=(N<<11|N>>>21)+b|0,L+=(N^b^I)+v[3]-722521979|0,L=(L<<16|L>>>16)+N|0,I+=(L^N^b)+v[6]+76029189|0,I=(I<<23|I>>>9)+L|0,b+=(I^L^N)+v[9]-640364487|0,b=(b<<4|b>>>28)+I|0,N+=(b^I^L)+v[12]-421815835|0,N=(N<<11|N>>>21)+b|0,L+=(N^b^I)+v[15]+530742520|0,L=(L<<16|L>>>16)+N|0,I+=(L^N^b)+v[2]-995338651|0,I=(I<<23|I>>>9)+L|0,b+=(L^(I|~N))+v[0]-198630844|0,b=(b<<6|b>>>26)+I|0,N+=(I^(b|~L))+v[7]+1126891415|0,N=(N<<10|N>>>22)+b|0,L+=(b^(N|~I))+v[14]-1416354905|0,L=(L<<15|L>>>17)+N|0,I+=(N^(L|~b))+v[5]-57434055|0,I=(I<<21|I>>>11)+L|0,b+=(L^(I|~N))+v[12]+1700485571|0,b=(b<<6|b>>>26)+I|0,N+=(I^(b|~L))+v[3]-1894986606|0,N=(N<<10|N>>>22)+b|0,L+=(b^(N|~I))+v[10]-1051523|0,L=(L<<15|L>>>17)+N|0,I+=(N^(L|~b))+v[1]-2054922799|0,I=(I<<21|I>>>11)+L|0,b+=(L^(I|~N))+v[8]+1873313359|0,b=(b<<6|b>>>26)+I|0,N+=(I^(b|~L))+v[15]-30611744|0,N=(N<<10|N>>>22)+b|0,L+=(b^(N|~I))+v[6]-1560198380|0,L=(L<<15|L>>>17)+N|0,I+=(N^(L|~b))+v[13]+1309151649|0,I=(I<<21|I>>>11)+L|0,b+=(L^(I|~N))+v[4]-145523070|0,b=(b<<6|b>>>26)+I|0,N+=(I^(b|~L))+v[11]-1120210379|0,N=(N<<10|N>>>22)+b|0,L+=(b^(N|~I))+v[2]+718787259|0,L=(L<<15|L>>>17)+N|0,I+=(N^(L|~b))+v[9]-343485551|0,I=(I<<21|I>>>11)+L|0,k[0]=b+k[0]|0,k[1]=I+k[1]|0,k[2]=L+k[2]|0,k[3]=N+k[3]|0}function o(k){var v=[],b;for(b=0;b<64;b+=4)v[b>>2]=k.charCodeAt(b)+(k.charCodeAt(b+1)<<8)+(k.charCodeAt(b+2)<<16)+(k.charCodeAt(b+3)<<24);return v}function c(k){var v=[],b;for(b=0;b<64;b+=4)v[b>>2]=k[b]+(k[b+1]<<8)+(k[b+2]<<16)+(k[b+3]<<24);return v}function f(k){var v=k.length,b=[1732584193,-271733879,-1732584194,271733878],I,L,N,E,O,A;for(I=64;I<=v;I+=64)s(b,o(k.substring(I-64,I)));for(k=k.substring(I-64),L=k.length,N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],I=0;I<L;I+=1)N[I>>2]|=k.charCodeAt(I)<<(I%4<<3);if(N[I>>2]|=128<<(I%4<<3),I>55)for(s(b,N),I=0;I<16;I+=1)N[I]=0;return E=v*8,E=E.toString(16).match(/(.*?)(.{0,8})$/),O=parseInt(E[2],16),A=parseInt(E[1],16)||0,N[14]=O,N[15]=A,s(b,N),b}function d(k){var v=k.length,b=[1732584193,-271733879,-1732584194,271733878],I,L,N,E,O,A;for(I=64;I<=v;I+=64)s(b,c(k.subarray(I-64,I)));for(k=I-64<v?k.subarray(I-64):new Uint8Array(0),L=k.length,N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],I=0;I<L;I+=1)N[I>>2]|=k[I]<<(I%4<<3);if(N[I>>2]|=128<<(I%4<<3),I>55)for(s(b,N),I=0;I<16;I+=1)N[I]=0;return E=v*8,E=E.toString(16).match(/(.*?)(.{0,8})$/),O=parseInt(E[2],16),A=parseInt(E[1],16)||0,N[14]=O,N[15]=A,s(b,N),b}function u(k){var v="",b;for(b=0;b<4;b+=1)v+=i[k>>b*8+4&15]+i[k>>b*8&15];return v}function m(k){var v;for(v=0;v<k.length;v+=1)k[v]=u(k[v]);return k.join("")}m(f("hello")),typeof ArrayBuffer!="undefined"&&!ArrayBuffer.prototype.slice&&function(){function k(v,b){return v=v|0||0,v<0?Math.max(v+b,0):Math.min(v,b)}ArrayBuffer.prototype.slice=function(v,b){var I=this.byteLength,L=k(v,I),N=I,E,O,A,R;return b!==n&&(N=k(b,I)),L>N?new ArrayBuffer(0):(E=N-L,O=new ArrayBuffer(E),A=new Uint8Array(O),R=new Uint8Array(this,L,E),A.set(R),O)}}();function p(k){return/[\u0080-\uFFFF]/.test(k)&&(k=unescape(encodeURIComponent(k))),k}function C(k,v){var b=k.length,I=new ArrayBuffer(b),L=new Uint8Array(I),N;for(N=0;N<b;N+=1)L[N]=k.charCodeAt(N);return v?L:I}function y(k){return String.fromCharCode.apply(null,new Uint8Array(k))}function M(k,v,b){var I=new Uint8Array(k.byteLength+v.byteLength);return I.set(new Uint8Array(k)),I.set(new Uint8Array(v),k.byteLength),b?I:I.buffer}function T(k){var v=[],b=k.length,I;for(I=0;I<b-1;I+=2)v.push(parseInt(k.substr(I,2),16));return String.fromCharCode.apply(String,v)}function x(){this.reset()}return x.prototype.append=function(k){return this.appendBinary(p(k)),this},x.prototype.appendBinary=function(k){this._buff+=k,this._length+=k.length;var v=this._buff.length,b;for(b=64;b<=v;b+=64)s(this._hash,o(this._buff.substring(b-64,b)));return this._buff=this._buff.substring(b-64),this},x.prototype.end=function(k){var v=this._buff,b=v.length,I,L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],N;for(I=0;I<b;I+=1)L[I>>2]|=v.charCodeAt(I)<<(I%4<<3);return this._finish(L,b),N=m(this._hash),k&&(N=T(N)),this.reset(),N},x.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},x.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},x.prototype.setState=function(k){return this._buff=k.buff,this._length=k.length,this._hash=k.hash,this},x.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},x.prototype._finish=function(k,v){var b=v,I,L,N;if(k[b>>2]|=128<<(b%4<<3),b>55)for(s(this._hash,k),b=0;b<16;b+=1)k[b]=0;I=this._length*8,I=I.toString(16).match(/(.*?)(.{0,8})$/),L=parseInt(I[2],16),N=parseInt(I[1],16)||0,k[14]=L,k[15]=N,s(this._hash,k)},x.hash=function(k,v){return x.hashBinary(p(k),v)},x.hashBinary=function(k,v){var b=f(k),I=m(b);return v?T(I):I},x.ArrayBuffer=function(){this.reset()},x.ArrayBuffer.prototype.append=function(k){var v=M(this._buff.buffer,k,!0),b=v.length,I;for(this._length+=k.byteLength,I=64;I<=b;I+=64)s(this._hash,c(v.subarray(I-64,I)));return this._buff=I-64<b?new Uint8Array(v.buffer.slice(I-64)):new Uint8Array(0),this},x.ArrayBuffer.prototype.end=function(k){var v=this._buff,b=v.length,I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],L,N;for(L=0;L<b;L+=1)I[L>>2]|=v[L]<<(L%4<<3);return this._finish(I,b),N=m(this._hash),k&&(N=T(N)),this.reset(),N},x.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},x.ArrayBuffer.prototype.getState=function(){var k=x.prototype.getState.call(this);return k.buff=y(k.buff),k},x.ArrayBuffer.prototype.setState=function(k){return k.buff=C(k.buff,!0),x.prototype.setState.call(this,k)},x.ArrayBuffer.prototype.destroy=x.prototype.destroy,x.ArrayBuffer.prototype._finish=x.prototype._finish,x.ArrayBuffer.hash=function(k,v){var b=d(new Uint8Array(k)),I=m(b);return v?T(I):I},x})})(T9);var x9=T9.exports;function eu(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const OC=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[f,d]of Object.entries(c))Array.isArray(d)?i.append(f,...d):i.append(f,d)})}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(eu(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,f=o.value;t.setRequestHeader(c,f)});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))gf(c)||t.setRequestHeader(o,String(c));return t.send(i),t},S9=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,EC=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 AC(n,t),o=[];PC(e,n,i,s,o,t),await Promise.all(o).then(()=>{const c={size:n.size,name:n.name,total:i,hash:s},f=new XMLHttpRequest;f.open(e.method,e.mergeUrl,!0),f.onreadystatechange=()=>{if(f.readyState===4){if(f.status<200||f.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(eu(f))}},f.onloadend=()=>{e.onComplete()},f.setRequestHeader("Content-type","application/JSON"),f.send(JSON.stringify(c))})},PC=(e,t,n,i,s,o)=>{for(let c=0;c<n;c++){const f=new Promise((d,u)=>{const m=c*o,p=Math.min(t.size,m+o),C=new FormData;if(e.data){let T=e.data;Array.isArray(T)||(T=[T]),T.forEach(x=>{for(const[k,v]of Object.entries(x))Array.isArray(v)?C.append(k,...v):C.append(k,v)})}if(e.formDataAttributes){let T=e.formDataAttributes;Array.isArray(T)||(T=[T]),T.forEach(x=>{Array.isArray(x.value)?C.append(x.name,...x.value):C.append(x.name,x.value)})}C.append("file",S9.call(t,m,p)),C.append("name",t.name),C.append("total",n.toString()),C.append("index",c.toString()),C.append("size",t.size.toString()),C.append("hash",i.toString());const y=new XMLHttpRequest;if(y.onreadystatechange=()=>{if(y.readyState===4){const T=eu(y);y.status<200||y.status>=300?(u(T),e.onError(new Error("An error occurred during upload"))):d("reponseText")}},y.upload.addEventListener("progress",T=>{const x=T;e.onProgress(x,c)},!1),e.withCredentials&&"withCredentials"in y&&(y.withCredentials=!0),y.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(T=>{const x=T.name,k=T.value;y.setRequestHeader(x,k)});else{const T=e.header.name,x=e.header.value;y.setRequestHeader(T,x)}const M=e.headers||{};if(M instanceof Headers)M.forEach((T,x)=>y.setRequestHeader(x,T));else for(const[T,x]of Object.entries(M))gf(x)||y.setRequestHeader(T,String(x));y.send(C)});s.push(f)}},AC=(e,t)=>new Promise((n,i)=>{const s=Math.ceil(e.size/t);let o=0;const c=new x9.ArrayBuffer,f=new FileReader;function d(){const u=o*t,m=u+t>=e.size?e.size:u+t;f.readAsArrayBuffer(S9.call(e,u,m))}f.onload=u=>{if(c.append(u.target.result),o+=1,o<s)d();else{const m=c.end(),p=new x9;p.append(m),p.append(e.name);const C=p.end();n(C)}},f.onerror=()=>{i(new Error("File slcie failed"))},d()}).catch(n=>{console.log(n)});function D9(e){return Date.now()+e}var VC=(e,t)=>{const n=a.computed(()=>{var C;return typeof e.size=="number"?e.size:(C=e==null?void 0:e.size)==null?void 0:C.maxImgSize}),i=a.computed(()=>{var C;return typeof e.size=="number"?e.size:(C=e==null?void 0:e.size)==null?void 0:C.maxImgSize}),s=a.ref([]);function o(C){return s.value.find(y=>y.uid===C.uid)}let c=0;function f(C){var x;c+=1,C.uid=D9(c);const y={uid:C.uid,name:C.name,status:Qa.NEW,size:C.size,raw:C},M=C.type.startsWith("image/");let T=null;if(M){try{y.url=window.URL.createObjectURL(C)}catch(k){console.error(k)}y.isPic=!0}return e.validateName&&!((x=e.validateName)!=null&&x.test(y.name))&&(y.status=Qa.FAIL,y.statusText="invalid filename",T=new Error(y.statusText)),M&&C.size>n.value*1024**2&&(y.status=Qa.FAIL,y.statusText="invalid file size",T=new Error(y.statusText)),!M&&C.size>i.value*1024**2&&(y.status=Qa.FAIL,y.statusText="invalid file size",T=new Error(y.statusText)),s.value.push(y),T}async function d(C){var T;const y=C instanceof File?o(C):C,M=x=>{var k;t.onRemove(x,s.value),s.value.splice(s.value.indexOf(y),1),(k=x.url)!=null&&k.startsWith("blob:")&&URL.revokeObjectURL(x.url)};e.beforeRemove?await((T=e.beforeRemove)==null?void 0:T.call(e,y,s.value))!==!1&&M(y):M(y)}async function u(C,y,M){const T=o(y);!T||(T.status="fail",T.statusText=C.message,T.response=M)}async function m(C,y){const M=o(y);!M||(M.status="success",M.response=C)}async function p(C,y){const M=o(y);!M||(M.status="uploading",M.percentage=Math.round(C.percent))}return a.watch(()=>e.files,C=>{s.value=C.map(y=>{var M,T;return c+=1,Te(U({},y),{uid:(M=y.uid)!=null?M:D9(c),status:(T=y.status)!=null?T:Qa.SUCCESS})})},{immediate:!0,deep:!0}),{fileList:s,handlePreprocess:f,handleRemove:d,handleError:u,handleSuccess:m,handleProgress:p}},JC=a.defineComponent({name:"Upload",props:oi,emits:["exceed","progress","success","error","delete","done"],setup(e,{slots:t,emit:n,expose:i}){const s=a.shallowRef({}),o=a.computed(()=>e.theme===li.PICTURE),c=a.computed(()=>o.value&&!e.multiple),f=a.computed(()=>{var L;return De({[ra]:!0,[`${ra}--${e.theme}`]:!0,[`${ra}--disabled`]:e.disabled,[`${ra}--single-picture`]:c.value,[e.extCls]:(L=e.extCls)!=null?L:!1})}),d={theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept};function u(L,N){I(L),n("delete",L,N)}const{fileList:m,handlePreprocess:p,handleRemove:C,handleProgress:y,handleSuccess:M,handleError:T}=VC(e,{onRemove:u});function x(L){if(!L.length)return;if(e.limit&&m.value.length+L.length>e.limit){n("exceed",L,m.value);return}let N=L;(!e.multiple||e.limit===1)&&(N=L.slice(0,1));for(const E of N){const O=E,A=p(O);if(A){n("error",O,m.value,A);return}e.autoUpload&&v(O,N)}}function k(L){b(L.raw)}async function v(L,N){var O;if(!e.beforeUpload)return b(L,N);let E;try{E=await((O=e.beforeUpload)==null?void 0:O.call(e,L))}catch{E=!1}if(E===!1){C(L);return}b(L,N)}function b(L,N){const{headers:E,header:O,data:A,formDataAttributes:R,method:J,withCredentials:$,name:_,url:le,sliceUrl:se,mergeUrl:ne,chunkSize:fe,customRequest:ee}=e,{uid:ae}=L,Y={headers:E,header:O,withCredentials:$,file:L,data:A,formDataAttributes:R,method:J,filename:_,action:le,sliceUrl:se,mergeUrl:ne,chunkSize:fe,onProgress:W=>{y(W,L),n("progress",W,L,m.value)},onSuccess:W=>{var re;const ie=W;if((re=e==null?void 0:e.handleResCode)!=null&&re.call(e,ie))M(W,L),n("success",W,L,m.value);else{const pe=new Error((ie==null?void 0:ie.message)||"unknow error");T(pe,L,W),n("error",L,m.value,pe)}delete s.value[ae]},onError:W=>{T(W,L),n("error",L,m.value,W),delete s.value[ae]},onComplete:()=>{N&&N.indexOf(L)===N.length-1&&n("done",m.value)}};let D=e.sliceUpload?EC:OC;ee&&(D=ee);const V=D(Y);s.value[ae]=V,V instanceof Promise&&V.then(Y.onSuccess,Y.onError)}function I(L){let N=s.value;L&&(N={[L.uid]:s.value[L.uid]}),Object.keys(N).forEach(E=>{if(N[E]instanceof XMLHttpRequest){const O=N[E];O==null||O.abort()}delete s.value[E]})}return a.onBeforeUnmount(()=>{m.value.forEach(({url:L})=>{L!=null&&L.startsWith("blob:")&&URL.revokeObjectURL(L)})}),i({handleRemove:C,handleRetry:k}),()=>a.createVNode("div",{class:f.value},[!o.value&&a.createVNode(k9,a.mergeProps(d,{onChange:x}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${ra}__tip`},[e.tip]),a.createVNode(zC,{files:m.value,theme:e.theme,disabled:e.disabled,multiple:e.multiple,onRemove:C,onRetry:k},{innerTrigger:L=>o.value&&a.createVNode(k9,a.mergeProps(d,{file:L,onChange:x,onRemove:C}),t),file:t.file})])}});const j9=He(JC);function Ei(){}Ei.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(T){return s?(setTimeout(function(){s(void 0,T)},0),!0):T}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var f=n.length,d=t.length,u=1,m=f+d,p=[{newPos:-1,components:[]}],C=this.extractCommon(p[0],n,t,0);if(p[0].newPos+1>=f&&C+1>=d)return c([{value:this.join(n),count:n.length}]);function y(){for(var T=-1*u;T<=u;T+=2){var x=void 0,k=p[T-1],v=p[T+1],b=(v?v.newPos:0)-T;k&&(p[T-1]=void 0);var I=k&&k.newPos+1<f,L=v&&0<=b&&b<d;if(!I&&!L){p[T]=void 0;continue}if(!I||L&&k.newPos<v.newPos?(x=RC(v),o.pushComponent(x.components,void 0,!0)):(x=k,x.newPos++,o.pushComponent(x.components,!0,void 0)),b=o.extractCommon(x,n,t,T),x.newPos+1>=f&&b+1>=d)return c(QC(o,x.components,n,t,o.useLongestToken));p[T]=x}u++}if(s)(function T(){setTimeout(function(){if(u>m)return s();y()||T()},0)})();else for(;u<=m;){var M=y();if(M)return M}},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,f=t.newPos,d=f-s,u=0;f+1<o&&d+1<c&&this.equals(n[f+1],i[d+1]);)f++,d++,u++;return u&&t.components.push({count:u}),t.newPos=f,d},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 QC(e,t,n,i,s){for(var o=0,c=t.length,f=0,d=0;o<c;o++){var u=t[o];if(u.removed){if(u.value=e.join(i.slice(d,d+u.count)),d+=u.count,o&&t[o-1].added){var p=t[o-1];t[o-1]=t[o],t[o]=p}}else{if(!u.added&&s){var m=n.slice(f,f+u.count);m=m.map(function(y,M){var T=i[d+M];return T.length>y.length?T:y}),u.value=e.join(m)}else u.value=e.join(n.slice(f,f+u.count));f+=u.count,u.added||(d+=u.count)}}var C=t[c-1];return c>1&&typeof C.value=="string"&&(C.added||C.removed)&&e.equals("",C.value)&&(t[c-2].value+=C.value,t.pop()),t}function RC(e){return{newPos:e.newPos,components:e.components.slice(0)}}var z9=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,O9=/\S/,E9=new Ei;E9.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!O9.test(e)&&!O9.test(t)},E9.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]&&z9.test(t[n])&&z9.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var tu=new Ei;tu.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 _C(e,t,n){return tu.diff(e,t,n)}var WC=new Ei;WC.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var HC=new Ei;HC.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function gl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gl=function(t){return typeof t}:gl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gl(e)}function nu(e){return BC(e)||FC(e)||GC(e)||ZC()}function BC(e){if(Array.isArray(e))return iu(e)}function FC(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function GC(e,t){if(!!e){if(typeof e=="string")return iu(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 iu(e,t)}}function iu(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 ZC(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
57
+ `,O={d:E,stroke:m||"#f5f5f5","stroke-linecap":f,"stroke-width":C,"fill-opacity":"0",class:"process-circle-trail",style:L},A={d:E,stroke:c||"#13ce66","stroke-linecap":f,"stroke-width":s>0&&C||0,"fill-opacity":"0",class:`process-circle-path bk-${d}-circle-trail`,style:N};return a.createVNode("div",{class:"progress-outer-circle",style:M},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",O,null),a.createVNode("path",A,null)]),a.createVNode("span",{class:"progress-circle-text",style:p},[n==null?void 0:n.default()])])},pp=(e,{attrs:t,slots:n})=>{const{percent:i,strokeWidth:s,size:o,color:c,titleStyle:f,showText:d,textInside:u,theme:m}=t,p={height:`${s}px`,lineHeight:`${s}px`},C={width:`${i}%`,background:c,animationDuration:"3s"},y=(M=!0)=>(d||n.default)&&(M&&u||!M&&!u)?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:C,class:{"progress-inner":!0,[`bk-${m}`]:!0}},[a.createVNode("div",{class:"inner-text",style:f},[y()])])]),y(!1)])};function E0(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var yp=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("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 f;const{showText:e,format:t,percent:n,textInside:i,titleStyle:s,fixed:o}=this.$props,c=t((f=this.validPercent(n))==null?void 0:f.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=Te(U({},this.$props),{percent:this.validPercent(this.percent)});let n=a.createVNode(pp,t,E0(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(mp,t,E0(e)?e:{default:()=>[e]}));const i={class:De({extCls:!!this.extCls},`bk-progress bk-progress-${this.type}`)};return a.createVNode("div",i,[n])}});const Dr=He(yp),P0=Symbol("RadioGroup");function A0(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const V0=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,i=a.inject(P0,Ao),s=!zf(i),o=a.ref(!1),c=a.computed(()=>s&&i.props.disabled?!0:t.disabled);s?a.watch(()=>i.props.modelValue,u=>{o.value=u===t.label},{immediate:!0}):a.watch(()=>t.modelValue,u=>{u!==""&&(o.value=u===t.label)},{immediate:!0});const f=(u=!0)=>{o.value=u},d=u=>{if(c.value)return;const m=u.target;o.value=m.checked;const p=o.value?t.label:"";n("change",p),n("update:modelValue",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:f,handleChange:d}},bp={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 Cp=a.defineComponent({name:"Radio",props:bp,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=A0(),{isChecked:i,isDisabled:s,setChecked:o,handleChange:c}=V0();return{isFocused:e,isChecked:i,isDisabled:s,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=De({"bk-radio":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked});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),a.createVNode("span",{class:"bk-radio-text"},[this.$slots.default?this.$slots.default():this.label])])}});const vp={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 wp=a.defineComponent({name:"RadioButton",props:vp,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=A0(),{isChecked:i,isDisabled:s,setChecked:o,handleChange:c}=V0();return{isFocused:e,isChecked:i,isDisabled:s,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=De({"bk-radio-button":!0,"is-focused":this.isFocused,"is-disabled":this.isDisabled,"is-checked":this.isChecked});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),a.createVNode("div",{class:"bk-radio-button-text"},[this.$slots.default?this.$slots.default():this.label])])}});const Mp={name:g.string.def(""),modelValue:g.oneOfType([String,Number,Boolean]),disabled:g.bool,withValidate:g.bool.def(!0)};var Ip=a.defineComponent({name:"RadioGroup",props:Mp,emits:["change","update:modelValue"],setup(e,t){const n=Jn(),i=[],s=f=>{i.push(f)},o=f=>{const d=i.indexOf(f);d>-1&&i.splice(d,1)},c=f=>{const d=f.label;i.forEach(u=>{u!==f&&u.setChecked(!1)}),t.emit("update:modelValue",d),t.emit("change",d)};return a.provide(P0,{props:e,register:s,unregister:o,handleChange:c}),a.watch(()=>e.modelValue,()=>{var f;e.withValidate&&((f=n==null?void 0:n.validate)==null||f.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&i.forEach(f=>{f.setChecked(f.label===e.modelValue)})}),{}},render(){var e;return a.createVNode("div",{class:"bk-radio-group"},[(e=this.$slots)==null?void 0:e.default()])}});const J0=Ft(Cp,{Group:Ip,Button:wp});var $s=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=f=>{if(!e.editable)return;const d=f+1;t("chooseRate",d)},i=f=>{if(!e.editable)return;const d=f+1;t("changeHover",d)},s=f=>De({"bk-is-select":f<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((f,d)=>a.createVNode("svg",{class:s(d),style:c,x:"0px",y:"0px",viewBox:"0 0 64 64",onClick:()=>n(d),onMouseenter:()=>i(d)},[a.createVNode("g",{transform:"translate(-143.000000, -635.000000)"},[a.createVNode("g",{transform:"translate(83.000000, 114.000000)"},[a.createVNode("g",{transform:"translate(15.000000, 384.000000)"},[a.createVNode("g",{transform:"translate(29.000000, 137.000000)"},[a.createVNode("polygon",{class:"st1",points:"48,53 28.2,63.9 32,40.8 16,24.4 38.1,21 48,-0.1 57.8,21 79.9,24.4 63.9,40.8 67.7,63.9"},null)])])])])]))])}}),Np=a.defineComponent({name:"Rate",components:{star:$s},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=Jn(),i=a.ref(0),s=p=>{!e.editable||(t("update:modelValue",p),t("change",p))},o=p=>{i.value=p},c=De({"bk-rate":!0}),d={small:{width:12,height:12},large:{width:18,height:18}}[e.size]||{width:15,height:16},u=a.computed(()=>{const p=Math.floor(e.modelValue),C=(d.width+3)*p,y=d.width*(e.modelValue-p);return{width:`${C+y}px`}}),m={width:d.width,height:d.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($s,a.mergeProps({rate:e.modelValue,"hover-rate":i.value,onChooseRate:s,onChangeHover:o,onMouseleave:()=>o(0)},m),null):[a.createVNode($s,a.mergeProps({rate:5,style:u.value,class:"bk-score-real",editable:!1},m),null),a.createVNode($s,a.mergeProps({rate:0,editable:!1},m),null)]])}});const Q0=He(Np);var Lp=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:f,width:d}=a.toRefs(e),u=a.ref(),m=a.ref(0),p=a.ref(0),C=a.ref(0),y=a.ref(0);let M;const T=a.computed(()=>{var _;return((_=c.value)==null?void 0:_.length)>0?c.value:o.value}),x=a.computed(()=>({width:`${p.value*T.value.length}px`,transform:`translateX(-${p.value*m.value}px)`})),k=a.computed(()=>({width:`${p.value}px`,height:`${C.value}px`})),v=_=>{let le=_;_>=T.value.length&&(le=0),_<0&&(le=T.value.length-1),m.value=le,t("index-change",le)},b=_=>{!_||window.open(_,"_blank")},I=_=>["bk-swiper-img",{"bk-swiper-link":_.link},_.class],L=_=>({"background-image":`url(${_.url})`,"background-color":_.color}),N=_=>({"bk-current-index":m.value===_}),E=()=>{i.value&&(y.value=window.setTimeout(()=>{v(m.value+1),E()},s.value))},O=()=>{window.clearTimeout(y.value)},A=()=>{var le;const _=(le=u.value)==null?void 0:le.parentElement;!_||!window.ResizeObserver||(M=new ResizeObserver(()=>{$()}),M.observe(_))},R=()=>{var _;(_=M.disconnect)==null||_.call(M)},J=_=>{if(_===void 0)return{height:0,width:0};const le=getComputedStyle(_),se=_.clientWidth-parseFloat(le.paddingTop)-parseFloat(le.paddingBottom);return{height:_.clientHeight-parseFloat(le.paddingLeft)-parseFloat(le.paddingRight),width:se}},$=()=>{var le;const _=J((le=u.value)==null?void 0:le.parentElement);p.value=+d.value>0?d.value:_.width,C.value=+f.value>0?f.value:_.height};return a.watch([f,d],$),a.onMounted(()=>{$(),E(),A()}),a.onBeforeUnmount(()=>{O(),R()}),()=>a.createVNode("section",{class:"bk-swiper-home",ref:u,style:k.value},[a.createVNode("hgroup",{style:x.value,class:"bk-transition bk-swiper-main"},[T.value.map(_=>{var le,se;return a.createVNode("h3",{class:"bk-swiper-card",style:k.value},[(se=(le=n.default)==null?void 0:le.call(n,_))!=null?se:a.createVNode("span",{class:I(_),style:L(_),onClick:()=>b(_.link)},null)])})]),a.createVNode("ul",{class:"bk-swiper-index"},[T.value.map((_,le)=>a.createVNode("li",{class:N(le),onMouseover:()=>v(le)},null))]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-prev",onClick:()=>v(m.value-1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-next",onClick:()=>v(m.value+1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)])])}});const R0=He(Lp),Ks=Symbol("BkSelect"),_0=Symbol("BkOptionGroup");function W0(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function Dc(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 kp(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 Tp(e,t){const{popoverMinWidth:n}=e;let i=null;const s=a.ref("auto"),o=a.ref(!1),c=()=>{o.value=!o.value},f=()=>{o.value=!1},d=()=>{o.value=!0},u=()=>{var m;s.value=Math.max((m=t.value)==null?void 0:m.offsetWidth,n)};return a.onMounted(()=>{!t.value||(i=t4(t.value,u,60,!0),i.start())}),a.onBeforeUnmount(()=>{i==null||i.stop(),i=null}),{isPopoverShow:o,popperWidth:s,togglePopover:c,hidePopover:f,showPopover:d}}function xp(e,t){const n=kp(""),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 jr(e=""){return e&&String(e).trim().toLowerCase()}var Xs=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(Ks,null),c=a.inject(_0,null),f=a.computed(()=>{var y;return(y=o==null?void 0:o.selected)==null?void 0:y.some(M=>M.value===s.value)}),d=a.computed(()=>o==null?void 0:o.multiple),u=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)},C=()=>{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)}),Te(U({},a.toRefs(n)),{selected:f,multiple:d,isHover:u,showSelectedIcon:m,handleOptionClick:p,handleMouseEnter:C})},render(){var t,n,i;const e=De({"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(Ui,{class:"bk-select-selected-icon",width:22,height:22},null)]),[[a.vShow,this.visible]])}}),Sp=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(Ks,null),o=a.reactive({groupCollapse:e.collapse,visible:!0}),c=a.ref(new Map),{register:f,unregister:d}=Dc(c),u=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(_0,a.reactive(Te(U({},a.toRefs(e)),{register:f,unregister:d,groupCollapse:a.toRef(o,"groupCollapse")}))),a.onBeforeMount(()=>{s==null||s.registerGroup(n.uid,i)}),a.onBeforeUnmount(()=>{s==null||s.unregisterGroup(n.uid)}),Te(U({},a.toRefs(o)),{groupLabel:u,handleToggleCollapse:m})},render(){var i,s;const e=De({"bk-option-group":!0,collapsible:this.collapsible,disabled:this.disabled}),t=De({"bk-option-group-label":!0,collapsible:this.collapsible}),n=De({"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(ks,{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 Dp={onContentScroll:Function},jp=U({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(Ye("F-scroll-x")),scrollYName:g.string.def(Ye("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)},Dp);var zp=(e,t)=>{const{renderAs:n,contentAs:i}=e,s=(f,d,u,m,p,C,y)=>{t.emit("content-scroll",[f,{translateY:p,translateX:C,pos:y}])},o=a.resolveDirective("bkVirtualRender"),c={lineHeight:e.lineHeight,handleScrollCallback:s,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent};return{rendAsTag:()=>{var f,d,u,m,p,C,y,M,T,x,k,v;return a.h(n,{class:e.className},[(u=(d=(f=t.slots).beforeContent)==null?void 0:d.call(f))!=null?u:"",a.withDirectives(a.h(i,{class:e.contentClassName,style:e.contentStyle},[(C=(p=(m=t.slots).default)==null?void 0:p.call(m,{data:e.list}))!=null?C:""]),[[o,c]]),(T=(M=(y=t.slots).afterContent)==null?void 0:M.call(y))!=null?T:"",(v=(k=(x=t.slots).afterSection)==null?void 0:k.call(x))!=null?v:""])}}};function H0(e,t,n,i){let s=0,o=0,c=0,f=0;for(;s<e;s++){if(f=i(s,[s*n,(s+1)*n,"virtual"]),o+f>t){c=t-o;break}o+=f}return{startIndex:s,height:o,diffHeight:c}}function B0(e,t,n,i,s){if(!i)return;const o=i.scrollTop,c=i.scrollLeft,{scrollTop:f,count:d,groupItemCount:u,startIndex:m,endIndex:p}=n,{offsetHeight:C}=i;let y=0,M=0,T=0;if(typeof e=="number"&&(y=Math.floor(o/e),M=Math.ceil(C/e)+y,T=o%e),typeof e=="function"){const x=H0(d,o,u,e);y=x.startIndex>0?x.startIndex:0,T=x.diffHeight,M=H0(d,C,u,e).startIndex+y+1}if(o!==f||y!==m||M!==p){const x=i.scrollHeight-i.offsetHeight-i.scrollTop;typeof t=="function"&&t(s,y,M,o,T,c,{bottom:x>=0?x:0})}}function Op(e,t,n){const{lineHeight:i=30,handleScrollCallback:s,pagination:o={},onlyScroll:c}=n.value;if(c){const C=t.scrollTop,y=t.scrollLeft,M=t.scrollHeight-t.offsetHeight-t.scrollTop;s(e,null,null,C,C,y,{bottom:M>=0?M:0});return}const{startIndex:f,endIndex:d,groupItemCount:u,count:m,scrollTop:p}=o;B0(i,s,{scrollTop:p,startIndex:f,endIndex:d,groupItemCount:u,count:m},t,e)}const F0=(e=60)=>dt.exports.throttle((t,n,i)=>Op(t,n,i),e),Ep=(e,t,n,i=60)=>{Reflect.apply(F0(i),globalThis,[e,t,n])};var Pp={mounted(e,t){const n=e.parentNode,{throttleDelay:i}=t.value;n.addEventListener("scroll",s=>{Ep(s,n,t,i)})},unbind(e){if(e){const t=e.parentNode;if(!t)return;t.removeEventListener("scroll",F0)}}},Ap=a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:Pp},props:jp,emits:["content-scroll"],setup(e,t){const{renderAs:n,contentAs:i}=e,s=E=>typeof E=="string"?[E]:typeof E=="object"&&!Array.isArray(E)?[E]:E;if(!e.enabled){const{rendAsTag:E}=zp(e,t);return E}const o=a.ref(null),c=a.reactive({startIndex:0,endIndex:0,scrollTop:1,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),f=(E,O,A,R,J,$,_)=>{c.startIndex=O,c.endIndex=A,c.scrollTop=R,c.translateY=J,c.translateX=$,c.pos=_,t.emit("content-scroll",[E,c])};a.onMounted(()=>{a.nextTick(()=>{p(e.list),C()})}),a.watch(()=>e.list,()=>{d(),C()},{deep:!0}),a.watch(()=>e.lineHeight,()=>{d(),C()});const d=()=>{p(e.list)},u=a.ref(0),m=a.ref(0),p=E=>{if(u.value=Math.ceil((E||[]).length/e.groupItemCount),c.count=u.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 A=0;for(let R=0;R<u.value;R++){const J=e.lineHeight.call(this,R,E.slice(R*e.groupItemCount,e.groupItemCount));A+=typeof J=="number"?J:0}m.value=A}else m.value=e.lineHeight*u.value;else m.value=e.abosuteHeight},C=(E=!0)=>{var A;const O=(A=o.value)==null?void 0:A.parentNode;B0(e.lineHeight,f,c,O,null),E&&o.value&&o.value.scrollTo(0,0)},y=a.computed(()=>(e.list||[]).map((E,O)=>Te(U({},E),{$index:O}))),M=a.computed(()=>y.value.slice(c.startIndex*e.groupItemCount,(c.endIndex+e.preloadItemCount)*e.groupItemCount)),T=a.computed(()=>e.scrollPosition==="content"?{top:`${c.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${c.translateY}px)`}:{}),x=a.computed(()=>U({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"?T.value:{})),k=a.computed(()=>{const E=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${m.value<e.minHeight?e.minHeight:m.value}px`,display:E?"none":"block"}}),v=a.computed(()=>[Ye("virtual-render"),e.scrollXName,e.scrollYName,...s(e.className),e.scrollPosition==="container"?Ye("virtual-content"):""]),b=a.computed(()=>[e.scrollPosition==="content"?Ye("virtual-content"):"",...s(e.contentClassName)]),I=a.resolveDirective("bkVirtualRender"),L={lineHeight:e.lineHeight,handleScrollCallback:f,pagination:c,throttleDelay:e.throttleDelay},N=()=>{d(),C()};return t.expose({reset:N}),()=>{var E,O,A,R,J,$,_,le,se,ne,fe,ee;return a.h(n||"div",{ref:o,class:v.value,style:x.value},[(A=(O=(E=t.slots).beforeContent)==null?void 0:O.call(E))!=null?A:"",a.withDirectives(a.h(i||"div",{class:b.value,style:U(U({},T.value),e.contentStyle)},[($=(J=(R=t.slots).default)==null?void 0:J.call(R,{data:M.value}))!=null?$:""]),[[I,L]]),(se=(le=(_=t.slots).afterContent)==null?void 0:le.call(_))!=null?se:"",a.h("div",{class:[Ye("virtual-section")],style:k.value}),(ee=(fe=(ne=t.slots).afterSection)==null?void 0:fe.call(ne))!=null?ee:""])}}});const zr=He(Ap);var Vp=a.defineComponent({name:"Tag",props:{theme:g.theme(["success","info","warning","danger"]).def(""),closable:g.bool.def(!1),type:g.commonType(["","filled","stroke"]).def(""),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(()=>De({"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(Qn,{class:"bk-tag-close",onClick:this.handleClose},null):""])}});const qs=He(Vp);var Jp=a.defineComponent({name:"SelectTagInput",props:{selected:{type:Array,default:()=>[]},tagTheme:g.theme(["success","info","warning","danger"]).def(""),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(Ks,null),{modelValue:s,collapseTags:o,selected:c}=a.toRefs(e),f=a.ref(s.value),d=a.ref(),u=a.ref(null);a.watch(s,()=>{f.value=s.value}),a.watch([c,o],()=>{T()},{flush:"post"});const m=x=>{t("remove",x)},p=()=>{var x;(x=d.value)==null||x.focus()},C=x=>{t("update:modelValue",x.target.value)},y=x=>{switch(x.code){case"Enter":{t("enter",x.target.value,x);break}}},M=x=>{const k=[...n.$el.querySelectorAll(".bk-tag")];return typeof x=="number"?k[x]:k},T=()=>{!o.value||(u.value=null,setTimeout(()=>{const x=M(),k=x.findIndex((v,b)=>b?x[b-1].offsetTop!==v.offsetTop:!1);u.value=k>0?k:null}))};return{select:i,overflowTagIndex:u,value:f,inputRef:d,handleRemoveTag:m,focus:p,handleInput:C,handleKeydown:y}},render(){var i,s,o,c,f,d,u;const e=De({"bk-select-tag":!0,"bk-select-tag--default":!0,"is-disabled":this.disabled,"collapse-tag":this.collapseTags}),t=De({"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},[(f=(c=(o=this.$slots).default)==null?void 0:c.call(o))!=null?f:this.selected.map((m,p)=>a.createVNode(qs,{closable:!0,theme:this.tagTheme,style:{display:this.collapseTags&&this.overflowTagIndex&&p>=this.overflowTagIndex?"none":""},onClose:()=>this.handleRemoveTag(m.value)},{default:()=>{var C;return[(C=this.select)==null?void 0:C.handleGetLabelByValue(m.value)]}})),!!this.overflowTagIndex&&this.collapseTags&&a.createVNode(qs,{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),(u=(d=this.$slots)==null?void 0:d.suffix)==null?void 0:u.call(d)])}}),Qp=a.defineComponent({name:"Select",directives:{clickoutside:kn},props:{modelValue:g.any,multiple:g.bool.def(!1),disabled:g.bool.def(!1),size:g.size().def("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:g.theme(["success","info","warning","danger"]).def(""),behavior:g.oneOf(["normal","simplicity"]).def("normal"),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([])},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:f,loadingText:d,noDataText:u,noMatchText:m,popoverMinWidth:p,showOnInit:C,multipleMode:y,allowCreate:M,customContent:T,showSelectedIcon:x,inputSearch:k,enableVirtualRender:v,showSelectAll:b,scrollHeight:I,list:L,displayKey:N,collapseTags:E,autoHeight:O,popoverOptions:A,allowEmptyValues:R}=a.toRefs(e),J=Jn(),$=a.ref(),_=a.ref(),le=a.ref(),se=a.ref(),ne=a.ref(),fe=a.ref(),ee=a.ref(),ae=a.ref(new Map),Y=a.computed(()=>[...ae.value.values()]),D=a.ref(new Map),V=a.ref([]),W=a.computed(()=>V.value.reduce((Le,ze)=>(Le[ze.value]=ze.label,Le),{})),ie=a.ref();a.watch(n,()=>{var Le;kl(),e.withValidate&&((Le=J==null?void 0:J.validate)==null||Le.call(J,"change"))},{deep:!0}),a.watch(V,()=>{var Le;(Le=ee.value)==null||Le.updatePopover(null,F.value)});const re=a.computed(()=>we.value?L.value:L.value.filter(Le=>{var ze;return(ze=jr(String(Le[N.value])))==null?void 0:ze.includes(ui.value)})),pe=a.computed(()=>i.value||f.value),Ne=a.computed(()=>V.value.map(Le=>{var ze,Ae;return((Ae=(ze=ae.value)==null?void 0:ze.get(Le.value))==null?void 0:Ae.label)||Le.label})),te=a.computed(()=>{const Le=Y.value.reduce((ze,Ae)=>(Ae.disabled||ze.push(Ae.value),ze),[]);return Le.length<=V.value.length&&Le.every(ze=>V.value.some(Ae=>Ae.value===ze))}),K=a.computed(()=>!!D.value.size),G=a.computed(()=>!Y.value.length),ce=a.computed(()=>Y.value.length&&Y.value.every(Le=>!Le.visible)),we=a.computed(()=>s.value&&typeof c.value=="function"),z=a.computed(()=>!(Kr.value||G.value||ce.value)||T.value),B=a.computed(()=>o.value&&b.value&&(!ui.value||!s.value)),Q=a.computed(()=>I.value-12-(B.value?32:0)),de=a.computed(()=>Kr.value?d.value:G.value?u.value:ce.value?m.value:""),Ce=a.computed(()=>O.value?E.value&&!st.value:E.value),F=a.computed(()=>dt.exports.merge({theme:"light bk-select-popover",trigger:"manual",width:ct.value,arrow:!1,placement:"bottom-start",isShow:st.value,reference:ne.value,offset:6},A.value)),{register:oe,unregister:he}=Dc(ae),{register:Me,unregister:je}=Dc(D),{isHover:Be,setHover:_e,cancelHover:Tt}=W0(),at=a.ref(!1),it=()=>{at.value||(at.value=!0,t("focus"))},Lt=()=>{!at.value||(at.value=!1,t("blur"))},{popperWidth:ct,isPopoverShow:st,hidePopover:Re,showPopover:zt,togglePopover:oa}=Tp({popoverMinWidth:p.value},_),Yr=a.computed(()=>(s.value&&k.value||M.value)&&st.value);a.watch(st,Le=>{Le?(qr(),Ha()):ui.value=""});const Ur=a.watch(st,()=>{setTimeout(()=>{var Le,ze;v.value&&((ze=(Le=fe.value)==null?void 0:Le.reset)==null||ze.call(Le)),Ur()})}),Ha=()=>{var Ae;const Le=V.value[0],ze=ae.value.get(Le==null?void 0:Le.value);ze&&!ze.disabled&&ze.visible?ie.value=Le==null?void 0:Le.value:ie.value=(Ae=Y.value.find($n=>!$n.disabled&&$n.visible))==null?void 0:Ae.value},$r=Le=>{!s.value||Y.value.forEach(ze=>{var Ae;ze.visible=(Ae=jr(String(ze.label)))==null?void 0:Ae.includes(jr(Le))})},{searchKey:ui,searchLoading:Kr}=xp(we.value?c.value:$r,Ha),Un=Le=>{Le!==n.value&&(t("change",Le,n.value),t("update:modelValue",Le,n.value))},Il=()=>{pe.value||(it(),oa(),t("toggle",st.value))},Nl=Le=>{!s.value||(ui.value=Le)},Lu=(Le,ze)=>{const Ae=String(Le);!M.value||!Ae||s.value&&Y.value.find(Pi=>jr(String(Pi.label))===jr(Ae))||ae.value.get(Ae)||(ze.stopPropagation(),o.value?(V.value.push({value:Ae,label:Ae}),Un(V.value.map(Pi=>Pi.value))):(V.value=[{value:Ae,label:Ae}],Un(Ae),Re()),ui.value="")},Xr=Le=>{if(!(pe.value||!Le)){if(o.value){const ze=V.value.findIndex(Ae=>Ae.value===Le.value);ze>-1?V.value.splice(ze,1):V.value.push({value:Le.value,label:Le.label||Le.value}),Un(V.value.map(Ae=>Ae.value))}else V.value=[{label:Le.label||Le.value,value:Le.value}],Un(Le.value),Re();qr()}},qr=()=>{setTimeout(()=>{var Le,ze,Ae;!k.value&&!M.value?(Le=se.value)==null||Le.focus():y.value==="tag"?(ze=ne.value)==null||ze.focus():(Ae=$.value)==null||Ae.focus()},0)},ku=Le=>{Le.stopPropagation(),V.value=[],Un(o.value?[]:""),t("clear",o.value?[]:""),Re()},Ll=()=>{ie.value=""},Tu=()=>{te.value?V.value=[]:Y.value.forEach(Le=>{Le.disabled||V.value.find(ze=>ze.value===Le.value)||V.value.push({value:Le.value,label:Le.label||Le.value})}),Un(V.value.map(Le=>Le.value)),qr()},xu=Le=>{const{scrollTop:ze,clientHeight:Ae,scrollHeight:$n}=Le.target;ze+Ae===$n&&t("scroll-end")},Su=Le=>{if(pe.value)return;const ze=V.value.findIndex(Ae=>Ae.value===Le);ze>-1&&(V.value.splice(ze,1),Un(V.value.map(Ae=>Ae.value)))},ca=Le=>{var ze,Ae;return((Ae=(ze=ae.value)==null?void 0:ze.get(Le))==null?void 0:Ae.label)||W.value[Le]||Le},kl=()=>{Array.isArray(n.value)?V.value=[...n.value.map(Le=>({value:Le,label:ca(Le)}))]:!!n.value||R.value.includes(n.value)?V.value=[{value:n.value,label:ca(n.value)}]:V.value=[]},ua=Le=>{var $n,Pi,Tl,xl;if(!(($n=_.value)!=null&&$n.contains(Le.target))&&!((Pi=le.value)!=null&&Pi.contains(Le.target))&&!T.value)return;const ze=Y.value.filter(Qt=>!Qt.disabled&&Qt.visible),Ae=ze.findIndex(Qt=>Qt.value===ie.value);if(!(!ze.length||Ae===-1))switch(Le.code){case"ArrowDown":{Le.preventDefault();const Qt=Ae>=ze.length-1?0:Ae+1;ie.value=(Tl=ze[Qt])==null?void 0:Tl.value;break}case"ArrowUp":{Le.preventDefault();const Qt=Ae===0?ze.length-1:Ae-1;ie.value=(xl=ze[Qt])==null?void 0:xl.value;break}case"Backspace":{if(!o.value||!V.value.length||ui.value.length||Le.target===se.value)return;V.value.pop(),Un(V.value.map(Qt=>Qt.value));break}case"Enter":{if(!st.value)st.value=!0;else{const Qt=ae.value.get(ie.value);Xr(Qt)}break}}},Du=({event:Le})=>{var Ae;const{target:ze}=Le;((Ae=_.value)==null?void 0:Ae.contains(ze))||_.value===ze||(Re(),Lt())};return a.provide(Ks,a.reactive({multiple:o,selected:V,activeOptionValue:ie,showSelectedIcon:x,register:oe,unregister:he,registerGroup:Me,unregisterGroup:je,handleOptionSelected:Xr,handleGetLabelByValue:ca})),a.onMounted(()=>{kl(),setTimeout(()=>{C.value&&zt()}),L4(document,"keydown",ua)}),a.onBeforeMount(()=>{k4(document,"keydown",ua)}),{selected:V,isInput:Yr,options:Y,isDisabled:pe,selectedLabel:Ne,isPopoverShow:st,isHover:Be,popperWidth:ct,inputRef:$,triggerRef:_,contentRef:le,searchRef:se,selectTagInputRef:ne,virtualRenderRef:fe,popoverRef:ee,searchLoading:Kr,isOptionsEmpty:G,isSearchEmpty:ce,isFocus:at,isShowSelectContent:z,curContentText:de,isGroup:K,searchKey:ui,isShowSelectAll:B,virtualHeight:Q,filterList:re,isCollapseTags:Ce,popoverConfig:F,setHover:_e,cancelHover:Tt,handleFocus:it,handleBlur:Lt,handleTogglePopover:Il,handleClear:ku,hidePopover:Re,showPopover:zt,handleToggleAll:Tu,handleOptionSelected:Xr,handleClickOutside:Du,handleScroll:xu,handleDeleteTag:Su,handleInputChange:Nl,handleInputEnter:Lu,handleKeydown:ua,handleSelectedAllOptionMouseEnter:Ll}},render(){const e=De({"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(Ii,{loading:!0,theme:"primary",class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length&&!this.isDisabled?a.createVNode(Gt,{class:"clear-icon",onClick:this.handleClear},null):a.createVNode(za,{class:"angle-up"},null),n=()=>this.multipleMode==="tag"?a.createVNode(Jp,{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(Ki,{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,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(vr,{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":f=>this.searchKey=f},null),[[a.vModelText,this.searchKey]])]),!this.isShowSelectContent&&a.createVNode("div",{class:"bk-select-empty"},[this.searchLoading&&a.createVNode(Ii,{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(zr,{list:this.filterList,height:this.virtualHeight,lineHeight:32,ref:"virtualRenderRef"},{default:({data:f})=>f.map(d=>a.createVNode(Xs,{key:d[this.idKey],value:d[this.idKey],label:d[this.displayKey]},null))}):this.filterList.map(f=>a.createVNode(Xs,{value:f[this.idKey],label:f[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(Ii,{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(Wn,a.mergeProps(this.popoverConfig,{onClickoutside:this.handleClickOutside,ref:"popoverRef"}),{default:()=>i(),content:()=>s()})])}});const jc=Ft(Qp,{Option:Xs,Group:Sp});function Rp(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const{propsMixin:_p}=Xi,zc=Object.assign({},_p);zc.width.default="400",zc.height.default="100%";var Wp=a.defineComponent({name:"Sideslider",components:{BkModal:Xi,BkButton:Zt},props:Te(U({},zc),{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 u,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=(u=t.header)==null?void 0:u.call(t))!=null?m:e.title])])])},default:()=>{var u,m;return(m=(u=t.default)==null?void 0:u.call(t))!=null?m:"Content"},footer:()=>t.footer?a.createVNode("div",{class:"bk-sideslider-footer"},[t.footer()]):null},f=`bk-sideslider-wrapper ${e.scrollable?"scroll-able":""} ${e.extCls}`,d=t.footer?"calc(100vh - 106px)":"calc(100vh - 52px)";return a.createVNode(Xi,a.mergeProps(e,{maxHeight:d,class:f,style:`${e.direction}: 0;`,onHidden:o,onShown:s,onClose:i}),Rp(c)?c:{default:()=>[c]})}}});const G0=He(Wp),Z0={theme:g.theme().def("primary"),size:g.size(),curStep:g.number.def(1),controllable:g.bool.def(!1),direction:g.commonType(["horizontal","vertical"],"direction").def("horizontal"),status:g.commonType(["","error","loading"],"status").def(""),lineType:g.commonType(["dashed","solid"],"lineType").def("dashed"),text:g.bool,extCls:g.string,steps:g.array.def([]),beforeChange:g.func};var Hp=a.defineComponent({name:"Steps",props:Z0,emits:["update:curStep","click"],setup(e,{emit:t}){const n=a.ref([]),i=f=>{const d=[];f.forEach(u=>{var m;typeof u=="string"?d.push(u):d.push({title:u.title,icon:u.icon,description:u.description,status:u.status,border:(m=u.border)!=null?m:!0})}),n.value.splice(0,n.value.length,...d)},s=f=>{Z0.curStep=f},o=()=>{var f;n.value.splice(0,n.value.length,{title:"\u6B65\u9AA41",icon:1},{title:"\u6B65\u9AA42",icon:2},{title:"\u6B65\u9AA43",icon:3}),(f=e.steps)!=null&&f.length&&i(e.steps)},c=async f=>{try{e.controllable&&f!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(d,u)=>{const m=await e.beforeChange(f);m?d(m):u(m)}),t("update:curStep",f),t("click",f))}catch(d){console.warn(d)}};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=De({[`${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:C}=p;return C?Object.prototype.toString.call(C)==="[object Object]":typeof p=="string"},f=(p,C)=>(C.icon||(C.icon=p),!isNaN(C.icon)),d=p=>p.status==="loading",u=p=>p.status==="error",m=(p,C)=>o(p)&&this.status==="loading"||d(C)?a.createVNode(Ts,{class:"bk-icon bk-steps-icon icon-loading"},null):o(p)&&this.status==="error"||u(C)?a.createVNode(Qn,{class:"bk-steps-icon"},null):s(p)?a.createVNode(Ui,{class:"bk-steps-icon"},null):a.createVNode("span",null,[f(p,C)?p+1:a.createVNode(C.icon,null,null)]);return a.createVNode("div",{class:i},[this.defaultSteps.map((p,C)=>{var y,M,T;return a.createVNode("div",{class:["bk-step",p.title?"":"bk-step-no-content",s(C)?"done":"",o(C)?"current":"",o(C)&&this.status==="error"?"isError":"",p.status&&o(C)?[`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(C+1)}},[(T=(M=(y=this.$slots)[C+1])==null?void 0:M.call(y))!=null?T:m(C,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(C+1)}},[p.title]),p.description&&a.createVNode("div",{class:"bk-step-description",title:p.description},[p.description])]):""])})])}});const Y0=He(Hp);var Bp=a.defineComponent({name:"Switcher",props:{theme:g.theme().def(""),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=Jn(),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),f=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 d=m=>{if(m.stopPropagation(),m.preventDefault(),e.disabled||i.value)return;const p=s.value?e.falseValue:e.trueValue,C=!s.value,y=()=>{t("update:modelValue",p),t("change",C)};let M=!0;if(typeof e.beforeChange=="function"&&(M=e.beforeChange(p),typeof M.then=="function"))return i.value=!0,M.then(()=>{y()}).finally(()=>{i.value=!1});M&&y()},u=m=>{(m.code==="Enter"||m.key==="Enter"||m.keyCode===13)&&d(m)};return()=>a.createVNode("div",{class:f.value,onClick:d,tabindex:"0",onKeydown:u},[i.value?a.createVNode(Xo,{class:"bk-switcher-loading"},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[s.value?e.onText:e.offText]):""])}});const U0=He(Bp);var el=(e=>(e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e))(el||{}),$0=(e=>(e.HIGHLIGHT="highlight",e.AUTO="auto",e))($0||{});const Fp=["auto","highlight"],K0=["none","row","col","outer"];var Tn=(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))(Tn||{}),Pt=(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))(Pt||{});const Ut=(...e)=>!0,Gp={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},Ge={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"},Oc=4,ri=42,tl={large:78,medium:60,small:42},Zp=[{value:"small",label:"\u5C0F",height:tl.small},{value:"medium",label:"\u4E2D",height:tl.medium},{value:"large",label:"\u5927",height:tl.large}],X0="InitColumns";var fn=(e=>(e.ASC="asc",e.DESC="desc",e.NULL="null",e))(fn||{});const Yp=["asc","desc","null"];var nl=(e=>(e.CURRENT="current",e.ALL="all",e))(nl||{});const q0={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(),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)})]).def(void 0),type:g.commonType(["selection","index","expand","none"],"columnType").def("none"),resizable:g.bool.def(!0),fixed:g.oneOfType([g.bool,g.commonType(["left","right"],"fixed")]).def(!1),sort:g.oneOfType([g.shape({sortFn:g.func.def(void 0),sortScope:g.commonType(Object.values(nl)).def("current"),value:g.string.def(fn.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:g.commonType(["full","fuzzy"],"full"),filterScope:g.commonType(Object.values(nl)).def("current"),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)},Up={data:g.arrayOf(g.any).def([]),columns:g.arrayOf(g.shape(q0)).def([]),activeColumn:g.oneOfType([g.number.def(-1),g.arrayOf(g.number.def(-1))]),columnPick:g.commonType(["multi","single","disabled"],"columnPick").def("disabled"),height:g.oneOfType([g.number,g.string]).def("auto"),minHeight:g.oneOfType([g.number,g.string]).def(ri*2),maxHeight:g.oneOfType([g.number,g.string]).def("auto"),rowHeight:g.oneOfType([g.number,g.func]).def(ri),headHeight:g.number.def(ri),showHead:g.bool.def(!0),thead:g.shape({height:g.number.def(ri),isShow:g.bool.def(!0),cellFn:g.func.def(void 0)}),virtualEnabled:g.bool.def(!1),border:g.arrayOf(g.commonType(K0,"border")).def([el.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:g.size(["small","medium","large"]).def("small"),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(Ge.ROW_INDEX),showOverflowTooltip:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0)})]).def(!1),asyncData:g.bool.def(!1),rowHover:g.oneOf(Fp).def($0.HIGHLIGHT),defaultSort:g.shape({}).def({})};var eh=a.defineComponent({name:"TableColumn",props:Te(U({},q0),{prop:g.oneOfType([g.func.def(()=>""),g.string.def("")])}),setup(e,{slots:t}){const n=a.inject(X0,i=>{},!1);return a.onMounted(()=>{const i=a.reactive(Te(U({},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 th=(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),Te(U(U({},t),e),{current:n})}return t}return{}};var $p=(e,t)=>{const n=a.ref(0),i=a.ref(0);let s=a.reactive({count:0,limit:10,current:1});s=th(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},f=a.reactive([]),d=(y,M)=>{typeof M=="function"&&y.sort(M)},u=(y,M)=>{if(typeof M=="function"){const T=y.filter((x,k)=>M(x,k,e.data));y.splice(0,y.length,...T)}},m=(y,M,T)=>{var v;const x=t.slice(),{sortScope:k}=(v=T==null?void 0:T.sort)!=null?v:{};k===nl.ALL&&d(x,M),f.splice(0,f.length,...x.slice(n.value,i.value)),u(f,y),d(f,M)},p=(y,M,T)=>{s=th(e.pagination,s),C(),c(),m(y,M,T)},C=()=>{!e.pagination||(o.value=e.remotePagination?s:Te(U({},s),{count:e.data.length}))};return{pageData:f,localPagination:o,resolvePageData:m,watchEffectFn:p}},Kp=(e,t)=>{const n=a.toRef(e,"scrollLoading"),i=()=>typeof n.value=="boolean"?{loading:!!n.value,inline:!0,title:"",size:Rn.Normal,mode:$i.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,f,d;if(s.value){const{loading:u,size:m,mode:p,title:C,inline:y,indicator:M}=i();return(d=(f=(c=t.slots).fixedBottom)==null?void 0:f.call(c))!=null?d:a.createVNode(Ii,{loading:u,size:m,mode:p,title:C,inline:y,indicator:M},null)}}}};function Xp(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var qp=()=>{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(jc,{class:"bk-pagination-limit-select",clearable:!1,size:"small",withValidate:!1,modelValue:t.value,onChange:n,disabled:e.disabled},Xp(c=e.limitList.map((f,d)=>a.createVNode(Xs,{value:f,label:`${f}`,key:`${d}_${f}`},null)))?c:{default:()=>[c]}),a.createVNode("div",null,[a.createTextVNode("\u6761")])]):null}}};const ta=5;var e5=()=>{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 y=[];if(e.totalPageNum<=ta+2){for(let x=2;x<=e.totalPageNum-1;x++)y.push(x);return y}const M=Math.floor(ta/2);e.totalPageNum>ta&&(s.value=t.value-M>2,o.value=t.value+M<e.totalPageNum-1);const T=Math.min(e.totalPageNum-ta,Math.max(2,t.value-M));for(let x=T;x<T+ta;x++)y.push(x);return y});a.watch(()=>e.modelValue,y=>{a.nextTick(()=>{y>=1&&y<=e.totalPageNum?t.value=y:y<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,y=>{t.value>y&&(t.value=y)})});const f=()=>{n.value||(t.value=t.value-1)},d=()=>{i.value||(t.value=t.value+1)},u=y=>{y!==t.value&&(t.value=y)},m=()=>{t.value=Math.max(1,t.value-ta)},p=()=>{t.value=Math.min(e.totalPageNum,t.value+ta)};return{current:t,render:({isFirst:y,isLast:M})=>a.createVNode("div",{class:{"bk-pagination-list":!0,"is-first":y,"is-last":M}},[a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":n.value},onClick:f},[e.prevText||a.createVNode(Mi,null,null)]),a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===1},key:"1",onClick:()=>u(1)},[a.createTextVNode("1")]),s.value&&a.createVNode("div",{key:"pre-batch",class:"bk-pagination-list-pre-batch",onClick:m},[a.createVNode(js,null,null)]),c.value.map(T=>a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===T},key:T,onClick:()=>u(T)},[T])),o.value&&a.createVNode("div",{key:"next-batch",class:"bk-pagination-list-next-batch",onClick:p},[a.createVNode(js,null,null)]),e.totalPageNum>1&&a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>u(e.totalPageNum)},[e.totalPageNum]),a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":i.value},onClick:d},[e.nextText||a.createVNode(Ln,null,null)])])}},t5=()=>{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 f=a.computed(()=>{const x=[];for(let k=1;k<=e.totalPageNum;k++)x.push(k);return x});a.watch(()=>e.modelValue,x=>{a.nextTick(()=>{x>=1&&x<=e.totalPageNum?i.value=x:x<1?i.value=1:i.value=e.totalPageNum,c=i.value})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,x=>{i.value>x&&(i.value=x)})});const d=()=>{s.value||(i.value=i.value-1)},u=()=>{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)},C=x=>{const k=x.target,v=Number(k.textContent);!v||v<1||v>e.totalPageNum||v===i.value||(c=v)},y=x=>{["Enter","NumpadEnter"].includes(x.code)&&(x.preventDefault(),p())},M=x=>{c=x,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:d},[a.createVNode(Mi,null,null)]),a.createVNode(Wn,{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:C,onKeydown:y},[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"},[f.value.map(x=>a.createVNode("div",{class:{item:!0,"is-actived":x===i.value},key:x,onClick:()=>M(x)},[x]))])}),a.createVNode("div",{class:{"bk-pagination-btn-next":!0,"is-disabled":o.value},onClick:u},[a.createVNode(Ln,null,null)])])}},n5=()=>({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 i5={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 a5=a.defineComponent({name:"Pagination",props:i5,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const n=a.ref(0),{count:i,limit:s}=a.toRefs(e),o=n5(),{current:c,render:f}=e5(),{current:d,render:u}=t5(),{limit:m,render:p}=qp();return a.watch([i,m,s],([C,y])=>{const M=Math.ceil(C/y);n.value=M<1?1:M},{immediate:!0}),a.watch(c,C=>{t.emit("update:modelValue",C),t.emit("change",C)}),a.watch(d,C=>{!e.small||(t.emit("update:modelValue",C),t.emit("change",C))}),a.watch(m,C=>{t.emit("limitChange",C)}),{totalPageNum:n,renderTotal:o,renderList:f,renderLimit:p,renderSmallList:u}},render(){const e=De({"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 Ec=He(a5),jt=(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=>jt(e,i,n)).filter(i=>i!==void 0).at(0)},Pc=e=>/^\d+$/.test(`${e}`)?[parseInt(`${e}`,10)]:[],r5=e=>nh(e,"auto"),nh=(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},s5=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>K0.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},Or=(e,t=["resizeWidth","calcWidth","width"])=>{var n,i;return(i=(n=e[t[0]])!=null?n:e[t[1]])!=null?i:e[t[2]]},Ac=(e,t,n=20,i=0)=>{const{width:s}=e.getBoundingClientRect()||{},o=s-i;let c=o;const f=[],d=(m,p)=>{const{minWidth:C=void 0}=m;if(C===void 0)return p;let y=p;return/^\d+\.?\d*$/.test(`${C}`)&&(y=Number(C)),/^\d+\.?\d*%$/.test(`${C}`)&&(y=Number(C)*o/100),/^\d+\.?\d*px$/i.test(`${C}`)&&(y=Number(`${C}`.replace(/px/i,""))),y},u=(m,p,C=!0)=>{const y=d(m,p),M=p<y?y:p;Object.assign(m,{calcWidth:M}),C&&(c=c-M,c<0&&(c=0))};if(t.forEach((m,p)=>{if(!m.isHidden){const y=String(Or(m,["resizeWidth","width"]));let M=!0;if(/^\d+\.?\d*(px)?$/.test(y)){const T=Number(y.replace("px",""));u(m,T),M=!1}if(/^\d+\.?\d*%$/.test(y)){let T=n;if(c>0){const x=Number(y.replace("%",""));T=c*x/100}u(m,T),M=!1}M&&f.push(p)}}),f.length>0){let m=n;c>0&&(m=c/f.length,f.forEach(p=>u(t[p],m,!1)))}},ih=(e,t,n=60,i=!1)=>{const s=dt.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)}}},Vc=e=>{const{showHead:t,headHeight:n,thead:i={}}=e;return Object.assign({},{isShow:t,height:n},U({},i))},il=(e,t,n)=>n.type==="index"?e[Ge.ROW_INDEX]+1:dt.exports.get(e,t),Er=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Er(Reflect.apply(e,globalThis,t),t):[],l5=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===Ge.ROW_INDEX?`__ROW_INDEX_${n}`:dt.exports.get(e,t.rowKey):typeof t.rowKey=="function"?Reflect.apply(t.rowKey,globalThis,[e]):Fi.v4(),o5=(e,t,n=0)=>{if(e){const i=e.querySelector(t);if(i)return i.offsetHeight>e.offsetHeight-n}return!1},c5=(e,t)=>{function n(o,c){const d=(n.canvas||(n.canvas=document.createElement("canvas"))).getContext("2d");return d.font=c,d.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",f=i(o,"font-size")||"16px",d=i(o,"font-family")||"Times New Roman";return`${c} ${f} ${d}`}return n(t||(e==null?void 0:e.innerHTML),s(e))};var ah=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)})]).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,f=null;const d=()=>{let m=!0,p=n.value.innerText;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),{disabled:m,content:p}},u=()=>{if(!n.value||/selection|index|expand/.test(e.column.type)||!ka(n.value))return;const{content:m}=d(),p=c5(n.value,m),C=n.value.clientWidth,y=window.getComputedStyle(n.value),M=["padding-left","padding-right"].reduce((x,k)=>x+Number(y.getPropertyValue(k).replace("px","")),0),T=C-M;if(i.value=p>T,i.value){const x=a.ref(d());f===null&&(f=Mc(n.value,x))}else f==null||f.destroyInstance(n.value),f=null};return a.onMounted(()=>{var p;const{disabled:m}=d();m||(u(),((p=e.column.showOverflowTooltip)==null?void 0:p.watchCellResize)!==!1&&(c=ih(n.value,()=>{u()},60,!0),c.start()))}),a.onBeforeUnmount(()=>{c==null||c.stop(),f==null||f.destroyInstance(n.value)}),()=>{var m;return a.createVNode("div",{class:"cell",ref:n},[(m=t.default)==null?void 0:m.call(t)])}}}),Jc=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)])}}),u5=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(Js,{scene:"part",type:t.value,description:e.emptyText},null)}});function d5(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var f5=a.defineComponent({name:"HeadFilter",props:{column:g.any.def({}),height:g.number.def(ri)},emits:["change","filterSave"],setup(e,{emit:t}){const{column:n}=e,i=a.reactive({isOpen:!1,checked:[]}),s=a.computed(()=>De({[Ye("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:i.checked.length,opened:i.isOpen})),o=De({[Ye("table-head-filter")]:!0}),c=I=>{i.isOpen=I},f=`light ${Ye("table-head-filter")}`,d=a.computed(()=>{const{list:I=[]}=n.filter;return I.map(L=>Te(U({},L),{checked:i.checked.includes(L.value)}))}),u=(I,L="ig")=>new RegExp(`${I}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),L),m=(I,L)=>{const{match:N}=n.filter,E=il(L,jt(n,"field",[n,L]),n);return N==="full"&&I.includes(E),I.some(O=>u(O,"img").test(E))},p=typeof n.filter.filterFn=="function"?(I,L,N,E)=>n.filter.filterFn(I,L,e.column,N,E):(I,L)=>I.length?m(I,L):!0,C=()=>{y(!0),t("filterSave",[...i.checked]),i.isOpen=!1},y=(I=!1)=>{const{disabled:L}=T(x,"\u786E\u5B9A");if(L||I){if(e.column.filter==="custom"){t("change",[...i.checked],null),i.isOpen=!1;return}t("change",[...i.checked],p)}},M=()=>{i.checked.length&&(i.checked.splice(0,i.checked.length),i.isOpen=!1,a.nextTick(()=>t("change",i.checked,p)))},T=(I,L)=>({disabled:I==="disabled"||I===!1,text:typeof I=="string"?I:L}),{btnSave:x,btnReset:k}=n.filter,v=()=>{const{disabled:I,text:L}=T(x,"\u786E\u5B9A");return I?a.createVNode("span",{class:"btn-filter-save disabled"},[L]):a.createVNode("span",{class:"btn-filter-save",onClick:C},[L])},b=()=>{const{disabled:I,text:L}=T(k,"\u91CD\u7F6E");return I?"":a.createVNode("span",{class:["btn-filter-reset",i.checked.length?"":"disable"],onClick:M},[L])};return()=>a.createVNode(Wn,a.mergeProps({trigger:"click",isShow:i.isOpen,placement:"bottom-start",arrow:!1,offset:0},{theme:f},{onAfterShow:()=>c(!0),onAfterHidden:()=>c(!1)}),{default:()=>a.createVNode(Yo,{class:s.value},null),content:()=>{let I;return a.createVNode("div",{class:o},[a.createVNode(sc,{class:"content-list",modelValue:i.checked,"onUpdate:modelValue":L=>i.checked=L,onChange:()=>y(!1)},d5(I=d.value.map(L=>a.createVNode("div",{class:"list-item"},[a.createVNode(Li,{label:L.value},{default:()=>[L.text]})])))?I:{default:()=>[I]}),a.createVNode("div",{class:"content-footer"},[v(),a.createVNode("span",{class:"btn-filter-split"},null),b()])])}})}}),h5=a.defineComponent({name:"HeadSort",props:{column:g.any.def({}),defaultSort:g.oneOf(Yp).def(fn.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||fn.NULL,i=a.ref(n),s=(f,d)=>{var M,T;if(f.stopImmediatePropagation(),f.stopPropagation(),f.preventDefault(),i.value===d?i.value=fn.NULL:i.value=d,e.column.sort==="custom"){t("change",null,d);return}const u=e.column.field,m=x=>il(x,u,e.column),p=(x,k)=>{const v=m(x),b=m(k);return typeof v=="number"&&typeof b=="number"?v-b:String.prototype.localeCompare.call(v,b)},C=typeof((M=e.column.sort)==null?void 0:M.sortFn)=="function"?(T=e.column.sort)==null?void 0:T.sortFn:p,y=i.value===fn.NULL?()=>!0:(x,k)=>C(x,k)*(d===fn.DESC?-1:1);t("change",y,d)};return()=>a.createVNode("span",{class:Ye("head-cell-sort")},[a.createVNode(Vo,{class:["sort-action","sort-asc",i.value===fn.ASC?"active":""],onClick:f=>s(f,fn.ASC)},null),a.createVNode(ks,{class:["sort-action","sort-desc",i.value===fn.DESC?"active":""],onClick:f=>s(f,fn.DESC)},null)])}});class g5{constructor(t,n){ar(this,"props",null);ar(this,"ctx",null);this.props=t,this.ctx=n}}function rh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var m5=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:g.size(["small","medium","large"]).def("small"),sizeList:g.shape([]),showLineHeight:g.bool.def(!0)}),g.bool]).def(!1),columns:g.array.def([]),rowHeight:g.number.def(ri)},emits:["change"],setup(e,{emit:t}){const n=Zp,i=($,_)=>jt($,["field","index"],[$,_]),s=a.ref(!1),o=a.ref(!1),c=typeof e.settings=="boolean"?a.ref({fields:e.columns.map($=>Te(U({},$),{field:$.field||$.type})),checked:[],limit:0,size:"small",sizeList:n,showLineHeight:!0}):a.ref(e.settings),f=a.ref(c.value.size||"small"),d=a.ref(e.rowHeight),u=a.ref(c.value.checked),p=`light ${Ye("table-settings")}`,C={checkAll:s.value,activeSize:f.value,activeHeight:d.value,checkedFields:c.value.checked||[]},y=()=>{Object.assign(C,{checkAll:s.value,activeSize:f.value,activeHeight:d.value,checkedFields:u.value}),t("change",{checked:u.value,size:f.value,height:d.value}),o.value=!1},M=()=>{s.value=C.checkAll,f.value=C.activeSize,d.value=C.activeHeight,u.value=C.checkedFields,o.value=!1},T=()=>{o.value=!0},x=$=>{$.stopImmediatePropagation(),$.stopPropagation(),$.preventDefault(),s.value=!s.value;const _=c.value.fields||e.columns||[];if(s.value)u.value=_.map((le,se)=>i(le,se));else{const le=_.filter(se=>se.disabled).map((se,ne)=>i(se,ne));u.value.splice(0,u.value.length,...le)}},k=a.computed(()=>{var $;return(($=c.value.limit)!=null?$:0)>0}),v=c.value.sizeList||n,b=a.computed(()=>k.value&&(c.value.limit?c.value.limit:0)<=u.value.length),I=($,_)=>$.disabled||b.value&&!u.value.includes(i($,_)),L=$=>{f.value=$.value,d.value=$.height},N=$=>({"line-size":!0,"is-medium":f.value==="medium",active:$.value===f.value}),E={marginRight:"12px"},O=()=>v.map($=>a.createVNode("span",{class:N($),onClick:()=>L($)},[$.label])),A=a.computed(()=>c.value.fields||e.columns||[]),R=a.computed(()=>u.value.length>0&&!A.value.every(($,_)=>u.value.includes(jt($,"field",[$,_])))),J=a.computed(()=>typeof c.value.showLineHeight=="boolean"?c.value.showLineHeight:!0);return a.watch(()=>[u.value],()=>{u.value.length||(s.value=!1),u.value.length&&A.value.every(($,_)=>u.value.includes(i($,_)))&&(s.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{u.value.splice(0,u.value.length,...c.value.checked)},{immediate:!0,deep:!0}),()=>e.settings?a.createVNode(Wn,a.mergeProps({trigger:"manual",isShow:o.value,placement:"bottom-end",arrow:!1},{theme:p}),{default:()=>a.createVNode("span",{class:"table-head-settings",onClick:T},[a.createVNode(Wo,{style:"color: #c4c6cc;"},null)]),content:()=>{let $;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(xs,{class:"icon-close-action",onClick:M},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")]),k.value?a.createVNode("span",{class:"limit"},[a.createTextVNode("\uFF08\u6700\u591A"),c.value.limit,a.createTextVNode("\u9879\uFF09")]):""]),k.value?"":a.createVNode("span",{class:"check-all",onClick:x},[a.createVNode(Li,{label:"\u5168\u9009",indeterminate:Boolean(R.value),modelValue:u.value.length>0},{default:()=>[a.createTextVNode("\u5168\u9009")]})])]),a.createVNode(sc,{class:"setting-body-fields",modelValue:u.value,"onUpdate:modelValue":_=>u.value=_},rh($=A.value.map((_,le)=>{let se;return a.createVNode("div",{class:"field-item"},[a.createVNode(Li,{checked:u.value.includes(i(_,le)),label:i(_,le),disabled:I(_,le)},rh(se=jt(_,"label",[_,le]))?se:{default:()=>[se]})])}))?$:{default:()=>[$]}),J.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(Zt,{theme:"primary",style:E,onClick:y},{default:()=>[a.createTextVNode("\u786E\u5B9A")]}),a.createVNode(Zt,{style:E,onClick:M},{default:()=>[a.createTextVNode("\u53D6\u6D88")]})])])}}):""}}),Qc=(e,t,n)=>{const i=a.computed(()=>e.pagination&&e.data.length?ri:0),s=(p,C,y)=>({column_fixed:!!p.fixed,column_fixed_left:p.fixed!=="right",column_fixed_right:p.fixed==="right",shadow:p.fixed==="right"?C<y:C>0}),o=p=>p.fixed==="right"?"right":"left",c={left:(p=!0)=>t.filter(C=>C.fixed&&C.fixed!=="right").reduce((C,y,M)=>p&&M===0?C:C+Or(y),0),right:(p=!0)=>t.filter(C=>C.fixed==="right").reduce((C,y,M)=>p&&M===0?C:C+Or(y),n?Oc:0)},f=c.right,d=()=>{const p=(M,T)=>{if(!M.fixed)return{};const x=o(M),k=x==="right"?-1:1,v=`${T[x]}px`;return T[x]=T[x]+Or(M)*k,{[x]:v}},C=f(!0);return{fixedOffset:{left:0,right:C},resolveFixedColumnStyle:p}},u=(p,C)=>{const y=T=>({width:`${c[T](!1)}px`,bottom:`${i.value}px`}),M={left:!1,right:!1};return t.filter(T=>!T.isHidden&&T.fixed).map(T=>{const x=o(T),k=M[x];return M[x]=!0,k?"":a.createVNode("div",{class:s(T,p,C),style:y(x)},null)})},m=Ye("table-fixed");return{renderFixedColumns:u,fixedWrapperClass:m,getFixedColumnStyleResolve:d}};function sh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}class p5{constructor(t,n,i,s){ar(this,"getRowHeight",(t,n)=>{const{size:i,height:s}=this.setting;return s!=null?jt(this.setting,"height",["tbody",t,n,i]):jt(this.props,"rowHeight",["tbody",t,n])});ar(this,"getColumnClass",(t,n)=>({[`${this.uuid}-column-${n}`]:!0,column_fixed:!!t.fixed,column_fixed_left:!!t.fixed,column_fixed_right:t.fixed==="right"}));ar(this,"getHeadColumnClass",(t,n)=>Te(U({},this.getColumnClass(t,n)),{active:this.isColActive(n)}));this.props=t,this.context=n,this.reactiveProp=i,this.colgroups=s,this.plugins=new g5(t,n),this.uuid=Fi.v4(),this.events=new Map}get propActiveCols(){return this.reactiveProp.activeColumns}renderTableHeadSchema(){const{isShow:t=!0}=Vc(this.props);if(!t)return null;const n=i=>{const{checked:s=[],size:o,height:c}=i;this.reactiveProp.setting.size=o,this.reactiveProp.setting.height=c,s.length&&this.colgroups.forEach(f=>{f.isHidden=!(s!=null?s:[]).includes(jt(f,["field","type"],[f]))}),this.emitEvent(Tn.ON_SETTING_CHANGE,[i])};return[this.props.settings?a.createVNode(m5,{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(u5,{filterList:t,list:this.props.data,emptyText:this.props.emptyText},null)}renderTableFooter(t){return a.createVNode(Ec,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(Pt.PAGE_LIMIT_CHANGE,t)}handlePageChange(t){Object.assign(this.props.pagination,{current:t,value:t}),this.context.emit(Pt.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){this.props.columnPick!=="disabled"&&(this.setColumnActive(t,this.props.columnPick==="single"),this.context.emit(Pt.COLUMN_PICK,this.propActiveCols))}getSortCell(t,n){const i=(o,c)=>{this.emitEvent(Tn.ON_SORT_BY_CLICK,[{sortFn:o,column:t,index:n,type:c}])};let s=fn.NULL;if(typeof this.props.defaultSort=="object"&&this.props.defaultSort!==null){const o=jt(t,["field","type"],[t,n]);Object.prototype.hasOwnProperty.call(this.props.defaultSort,o)&&(s=this.props.defaultSort[o])}return a.createVNode(h5,{column:t,defaultSort:s,onChange:i},null)}getFilterCell(t,n){const i=(o,c)=>{const f=(d,u)=>c(o,d,u);this.emitEvent(Tn.ON_FILTER_CLICK,[{filterFn:f,checked:o,column:t,index:n}])},s=o=>{this.context.emit(Pt.COLUMN_FILTER_SAVE,{column:t,values:o})};return a.createVNode(f5,{column:t,height:this.props.headHeight,onChange:i,onFilterSave:s},null)}renderHeader(){const t=Vc(this.props),{cellFn:n}=t,i={"--row-height":`${jt(t,"height",["thead"])}px`},s=(u,m)=>{if(u.type==="selection"){const C=this.reactiveProp.rowActions.get(Ge.ROW_SELECTION_ALL);return this.renderCheckboxColumn({[Ge.ROW_SELECTION]:!!C},0,!0)}const p=[];return u.sort&&p.push(this.getSortCell(u,m)),u.filter&&p.push(this.getFilterCell(u,m)),typeof n=="function"?(p.unshift(n(u,m)),p):(p.unshift(jt(u,"label",[u,m])),p)},o=u=>Array.from(u.listeners.keys()).reduce((m,p)=>{const C=p.split("_").slice(-1)[0];return Object.assign(m,{[C]:y=>{u.listeners.get(p).forEach(M=>Reflect.apply(M,this,[y,u,this]))}})},{}),{getFixedColumnStyleResolve:c}=Qc(this.props,this.colgroups),{resolveFixedColumnStyle:f,fixedOffset:d}=c();return a.createVNode("thead",{style:i},[a.createVNode(Jc,null,{default:()=>[a.createVNode("tr",null,[this.filterColgroups.map((u,m)=>{let p;return a.createVNode("th",a.mergeProps({colspan:1,rowspan:1,class:this.getHeadColumnClass(u,m),style:f(u,d),onClick:()=>this.handleColumnHeadClick(m)},o(u)),[a.createVNode(ah,null,sh(p=s(u,m))?p:{default:()=>[p]})])})])]})])}renderTBody(t){const{getFixedColumnStyleResolve:n}=Qc(this.props,this.colgroups);return a.createVNode("tbody",null,[t.map((i,s)=>{const o=[...Er(this.props.rowStyle,[i,s,this]),{"--row-height":`${this.getRowHeight(i,s)}px`}],c=[...Er(this.props.rowClass,[i,s,this]),`hover-${this.props.rowHover}`],{resolveFixedColumnStyle:f,fixedOffset:d}=n(),u=i[Ge.ROW_UID];return[a.createVNode(Jc,{key:u},{default:()=>[a.createVNode("tr",{style:o,class:c,onClick:m=>this.handleRowClick(m,i,s,t),onDblclick:m=>this.handleRowDblClick(m,i,s,t)},[this.filterColgroups.map((m,p)=>{let C;const y=[f(m,d),...Er(this.props.cellStyle,[m,p,i,s,this])],M=[this.getColumnClass(m,p),...Er(this.props.cellClass,[m,p,i,s,this]),{"expand-row":i[Ge.ROW_EXPAND]}],T={cell:!0,"expand-cell":m.type==="expand"},x=`__CELL_${s}_${p}`;return a.createVNode("td",{class:M,style:y,key:x,colspan:1,rowspan:1},[a.createVNode(ah,{class:T,column:m,row:i,parentSetting:this.props.showOverflowTooltip},sh(C=this.renderCell(i,m,s,t))?C:{default:()=>[C]})])})])]}),this.renderExpandRow(i,c)]})])}renderExpandRow(t,n){if(!!t[Ge.ROW_EXPAND]){const s=[...n,{row_expend:!0}],o=`${t[Ge.ROW_UID]}_expand`;return a.createVNode(Jc,{key:o},{default:()=>{var c,f,d;return[a.createVNode("tr",{class:s},[a.createVNode("td",{colspan:this.filterColgroups.length,rowspan:1},[(d=(f=(c=this.context.slots).expandRow)==null?void 0:f.call(c,t[Ge.ROW_SOURCE_DATA]))!=null?d:a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}}handleRowClick(t,n,i,s){this.context.emit(Pt.ROW_CLICK,t,n,i,s,this)}handleRowDblClick(t,n,i,s){this.context.emit(Pt.ROW_DBL_CLICK,t,n,i,s,this)}getExpandCell(t){return!!t[Ge.ROW_EXPAND]?a.createVNode(Ss,null,null):a.createVNode(Ps,null,null)}handleRowExpandClick(t,n,i,s,o){this.emitEvent(Tn.ON_ROW_EXPAND_CLICK,[{row:t,column:n,index:i,rows:s,e:o}])}renderCellCallbackFn(t,n,i,s){const o=il(t,jt(n,"field",[n,t]),n),c=this.props.data[t[Ge.ROW_INDEX]];return n.render({cell:o,data:c,row:t,column:n,index:i,rows:s})}renderCheckboxColumn(t,n,i=!1){const s=c=>{this.emitEvent(Tn.ON_ROW_CHECK,[{row:t,index:n,isAll:i,value:c}])},o=i&&!!this.reactiveProp.rowActions.get(Ge.ROW_SELECTION_INDETERMINATE);return a.createVNode(Li,{onChange:s,modelValue:t[Ge.ROW_SELECTION],indeterminate:o},null)}renderExpandColumn(t,n,i,s){const o=()=>{var c,f,d;return typeof n.render=="function"?this.renderCellCallbackFn(t,n,i,s):(d=(f=(c=this.context.slots).expandCell)==null?void 0:f.call(c,{row:t,column:n,index:i,rows:s}))!=null?d: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 f,d;const o=()=>{const u=il(t,jt(n,"field",[n,t]),n);return typeof n.render=="function"?this.renderCellCallbackFn(t,n,i,s):u},c={expand:(u,m,p,C)=>this.renderExpandColumn(u,m,p,C),selection:(u,m,p,C)=>this.renderCheckboxColumn(u,p)};return(d=(f=c[n.type])==null?void 0:f.call(c,t,n,i,s))!=null?d: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=De({active:this.isColActive(n)}),s=`${r5(Or(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 al=(e,t)=>({initColumns:s=>{let o=[];Array.isArray(s)?o=s:o=[s],o.forEach(c=>{if(!t.find(d=>d.label===c.label&&d.field===c.field)){const d=a.unref(c);t.push(d)}})},getColumns:()=>{var s;return t!=null&&t.length?t:(s=e.columns)!=null&&s.length?e.columns:[]}});const lh=e=>e.columnPick!=="disabled"?e.columnPick==="multi"?Array.isArray(e.activeColumn)?e.activeColumn:Pc(e.activeColumn):Array.isArray(e.activeColumn)?Pc(e.activeColumn[0]):Pc(e.activeColumn):[];var y5=(e,t)=>{let n=a.reactive([]);const{getColumns:i}=al(e,t);if(e.columnPick==="disabled")return{activeColumns:n};const s=a.reactive(lh(e)),o=()=>i().map((c,f)=>({index:f,active:s.some(d=>d===f),_column:c}));return a.watchEffect(()=>{n=o();const c=lh(e);n.forEach((f,d)=>{Object.assign(f,{active:c.some(u=>u===d)})})}),{activeColumns:n}},b5=(e,t=!0)=>{const n="HeadColumnResize";let i;(function(b){b.MOUSE_MOVE="onMousemove",b.MOUSE_OUT="onMouseout",b.MOUSE_DOWN="onMousedown"})(i||(i={}));let s=!1,o=!1,c=!1,f=0,d=null,u=0;const m=a.ref(-1e3),p=b=>{var E;o=!1,c=!1;const I=document.body.style;I.cursor="";const L=b.clientX-f;d.resizeWidth=((E=d.resizeWidth)!=null?E:d.calcWidth)+L,document.removeEventListener("mouseup",p),document.removeEventListener("mousemove",y),f=0,m.value=-1e3,d=null,b.target.closest("table").querySelectorAll("th").forEach(O=>O.style.setProperty("user-select","inherit"))},C=b=>dt.exports.throttle(()=>{m.value=b.clientX-f+u},60),y=b=>{document.body.style.setProperty("cursor",""),C(b)()},M={[i.MOUSE_DOWN]:(b,I)=>{if(!s)return;o=!0,document.body.style.setProperty("cursor","col-resize"),d=I,f=b.clientX;const N=b.target.closest("table");u=f-N.getBoundingClientRect().left,document.addEventListener("mouseup",p),document.addEventListener("mousemove",y)},[i.MOUSE_MOVE]:(b,I)=>{o&&!c&&(c=!0);const L=b.target.closest("th");if(c&&L.style.setProperty("user-select","none"),!c){if(!L)return;const N=L.getBoundingClientRect();N.width>12&&N.right-b.pageX<8?(s=!0,L.style.setProperty("cursor","col-resize")):(L.style.setProperty("cursor",""),s=!1)}},[i.MOUSE_OUT]:(b,I)=>{const L=b.target;c||L.style.setProperty("cursor","")}},T=b=>`${n}_${b}`,x=()=>{e.forEach(b=>{b.resizable!==!1&&Object.keys(M).forEach(I=>{const L=T(I);b.listeners.has(L)||b.listeners.set(L,[]),b.listeners.get(L).push(M[I])})})},k=()=>{e.forEach(b=>{Object.keys(M).forEach(I=>{const L=T(I);if(b.listeners.has(L)){const N=b.listeners.get(L);N.splice(0,N.length)}})})};t&&x();const v=a.computed(()=>({position:"absolute",top:0,bottom:0,left:0,width:"1px","background-color":"#ebeef5"}));return{registerResizeEvent:x,resetResizeEvents:k,dragOffsetX:m,dragOffsetXStyle:v}};const C5=(e,t,n,i,s)=>{const{getColumns:o}=al(e,t),c=a.ref(200),f=a.ref(void 0),d=a.computed(()=>e.pagination&&e.data.length),u=a.computed(()=>De({[Ye("table")]:!0,"has-footer":d.value,"has-scroll-y":f.value||e.virtualEnabled},s5(e.border))),m=De({[Ye("table-head")]:!0,"has-settings":!!e.settings}),p=Vc(e),C=a.computed(()=>({"--row-height":`${jt(p,"height",["thead"])}px`,"--scroll-head-left":`-${i.scrollTranslateX}px`,"--scroll-left":`${i.scrollTranslateX}px`})),y={[Ye("table-body")]:!0},M=a.computed(()=>De({[Ye("table-footer")]:!0,["is-hidden"]:!e.pagination||!e.data.length})),T=()=>{const O=o();if(O.every(A=>/^\d+\.?\d*(px)?$/ig.test(`${A.width}`))){const A=O.reduce((J,$)=>J+Number(`${$.width}`.replace(/px/ig,"")),0),R=f.value?Oc:0;return`${A+R}px`}return"100%"},x=a.computed(()=>({minHeight:nh(e.minHeight,"auto"),width:T(),maxWidth:"100%"})),k=(O,A)=>{const R=String(O);if(/^\d+\.?\d*$/.test(R))return Number(R);if(/^\d+\.?\d*px$/ig.test(R))return Number(R.replace("px",""));if(/^\d+\.?\d*%$/ig.test(R)&&typeof A=="number"){const J=Number(R.replace("%",""));return A*J/100}return A},v=a.reactive({display:"","min-height":"",height:"",maxHeight:""}),b=()=>e.showHead?k(e.headHeight,ri):0,I=()=>{const O=k(e.height,c.value),A=b(),R=k(e.minHeight,c.value),J=e.pagination&&e.data.length?ri:0,$=O-A-J,_=e.height!=="auto"?`${$}px`:!1,le=R-A-J,se=k(e.maxHeight,void 0),ne=typeof se=="number"?`${se-A-J}px`:!1;Object.assign(v,{display:s!=null&&s.length?"block":!1,"min-height":`${le}px`,height:_,maxHeight:ne})};a.onMounted(()=>{L(n==null?void 0:n.value)});const L=O=>{if(O){const{height:A}=O.parentElement.getBoundingClientRect();c.value=A,I(),N(O)}},N=O=>{const A=e.virtualEnabled?`.${Ye("virtual-section")}`:`.${Ye("table-body-content")}`,R=O.querySelector(".bk-table-body");f.value=o5(R,A,0)};return{tableClass:u,headClass:m,contentClass:y,footerClass:M,wrapperStyle:x,contentStyle:v,headStyle:C,resetTableHeight:L,updateBorderClass:N,getColumnsWidthOffsetWidth:()=>{let O=0;return f.value&&(O=O+Oc),e.border.includes(el.OUTER)&&!e.border.includes(el.NONE)&&(O=O+2),O},hasFooter:d,hasScrollY:f}},v5=(e,t)=>{var le,se;const n=a.reactive([]),{getColumns:i}=al(e,t),s=()=>{var ae,Y;const ne=((ae=e.settings)==null?void 0:ae.checked)||[],fe=((Y=e.settings)==null?void 0:Y.fields)||[],ee=D=>fe.some(V=>V.field===jt(D,"field",[D]));n.splice(0,n.length,...i().map(D=>Te(U({},D),{calcWidth:null,resizeWidth:null,listeners:new Map,isHidden:ee(D)&&ne.length&&!ne.includes(jt(D,["field","type"],[D]))})))},{dragOffsetXStyle:o,dragOffsetX:c,resetResizeEvents:f,registerResizeEvent:d}=b5(n,!0),{activeColumns:u}=y5(e,t);a.watch(()=>[e.settings],()=>{var ne;(((ne=e.settings)==null?void 0:ne.checked)||[]).length&&s()}),a.watch(()=>[e.columns,t],()=>{s(),f(),d()},{immediate:!0,deep:!0});const m=a.reactive({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:u,settings:e.settings,setting:{size:(le=e.settings)==null?void 0:le.size,height:tl[(se=e.settings)==null?void 0:se.size]}}),p=ne=>{var fe;return m.rowActions.has(ne)?(fe=m.rowActions.get(ne))==null?void 0:fe.isExpand:!1},C=(ne,fe=void 0)=>{var Y;const ee=ne[Ge.ROW_UID],ae=typeof fe=="boolean"?fe:!p(ee);m.rowActions.set(ee,Object.assign({},(Y=m.rowActions.get(ee))!=null?Y:{},{isExpand:ae})),A()},y=()=>m.rowActions.has(Ge.ROW_SELECTION_ALL)?m.rowActions.get(Ge.ROW_SELECTION_ALL):e.selectionKey?E.every(ne=>L(ne)):!1,M=ne=>{const fe=ne[Ge.ROW_UID],{isSelected:ee=!1}=m.rowActions.get(fe)||{};return ee},T=(ne=M)=>{let fe=!1,ee=!1;E.forEach(ae=>{const Y=ne(ae);!fe&&!Y&&(fe=!0),!ee&&Y&&(ee=!0)}),m.rowActions.set(Ge.ROW_SELECTION_ALL,ee&&!fe),m.rowActions.set(Ge.ROW_SELECTION_INDETERMINATE,ee&&fe)},x=()=>e.columns.some(ne=>ne.type==="selection"),k=()=>{x()&&T(ne=>L(ne))},v=(ne=void 0)=>{const fe=typeof ne=="boolean"?ne:!y();m.rowActions.set(Ge.ROW_SELECTION_ALL,fe),m.rowActions.set(Ge.ROW_SELECTION_INDETERMINATE,!1),E.forEach(ee=>{var D;const ae=ee[Ge.ROW_UID],Y=Object.assign({},(D=m.rowActions.get(ae))!=null?D:{},{isSelected:fe});m.rowActions.set(ae,Y)}),A(fe),R(null,ne,!0)},b=()=>{v(!1)},I=(ne,fe)=>{var ae;const ee=ne[Ge.ROW_UID];if(ee){const Y=typeof fe=="boolean"?fe:!N(ne,ee),D=Object.assign({},(ae=m.rowActions.get(ee))!=null?ae:{},{isSelected:Y});m.rowActions.set(ee,D),fe||m.rowActions.set(Ge.ROW_SELECTION_ALL,!1),T(),A(),R(ne,fe,!1)}},L=(ne,fe=()=>!1)=>typeof e.isSelectedFn=="function"?Reflect.apply(e.isSelectedFn,globalThis,[{row:ne,data:e.data}]):typeof e.selectionKey=="string"&&e.selectionKey.length?dt.exports.get(ne,e.selectionKey):fe(),N=(ne,fe)=>L(ne,()=>{var ae;const ee=fe===void 0?ne[Ge.ROW_UID]:fe;return y()?!0:m.rowActions.has(ee)?(ae=m.rowActions.get(ee))==null?void 0:ae.isSelected:!1}),E=a.reactive([]),O=(ne=!1)=>{E.splice(0,E.length,...e.data.map((fe,ee)=>{const ae=l5(fe,e,ee);return Te(U({},fe),{[Ge.ROW_INDEX]:ee,[Ge.ROW_UID]:ae,[Ge.ROW_EXPAND]:ne?p(ae):!1,[Ge.ROW_SELECTION]:N(fe,ae),[Ge.ROW_SOURCE_DATA]:U({},fe)})})),k()},A=ne=>{E.forEach(fe=>{Object.assign(fe,{[Ge.ROW_EXPAND]:p(fe[Ge.ROW_UID]),[Ge.ROW_SELECTION]:typeof ne=="boolean"?ne:N(fe,fe[Ge.ROW_UID])})}),typeof ne!="boolean"&&k()},R=(ne,fe,ee=!1)=>{if(e.asyncData&&e.rowKey){if(ee)e.data.forEach(ae=>{dt.exports.has(ae,e.selectionKey)&&dt.exports.set(ae,e.selectionKey,!!fe)});else if(dt.exports.has(ne,e.selectionKey)){const ae=e.data.find(Y=>dt.exports.get(Y,e.rowKey)===dt.exports.get(ne,e.rowKey));dt.exports.set(ae,e.selectionKey,!!fe)}}},{renderFixedColumns:J,fixedWrapperClass:$}=Qc(e,n,!1);return{colgroups:n,dragOffsetXStyle:o,dragOffsetX:c,reactiveSchema:m,indexData:E,fixedWrapperClass:$,initIndexData:O,updateIndexData:A,renderFixedColumns:J,setRowExpand:C,updateColGroups:s,clearSelection:b,toggleAllSelection:v,toggleRowSelection:I,getSelection:()=>E.filter(ne=>N(ne))}};var w5=a.defineComponent({name:"Table",props:Up,emits:Gp,setup(e,t){let n=null,i=null,s=null,o=null;const c=a.reactive([]),{initColumns:f}=al(e,c);a.provide(X0,f);const d=a.ref(),u=a.ref(),m=a.ref(0),{colgroups:p,dragOffsetXStyle:C,dragOffsetX:y,reactiveSchema:M,indexData:T,renderFixedColumns:x,setRowExpand:k,initIndexData:v,fixedWrapperClass:b,clearSelection:I,toggleAllSelection:L,toggleRowSelection:N,getSelection:E}=v5(e,c),{pageData:O,localPagination:A,resolvePageData:R,watchEffectFn:J}=$p(e,T),{tableClass:$,headClass:_,contentClass:le,footerClass:se,wrapperStyle:ne,contentStyle:fe,headStyle:ee,updateBorderClass:ae,resetTableHeight:Y,getColumnsWidthOffsetWidth:D,hasFooter:V}=C5(e,c,d,M,O),W=new p5(e,t,M,p),ie=()=>{const Q=d.value.querySelector(".bk-table-body-content"),de=Q.querySelector("table");if(de){const Ce=de.scrollWidth,F=Q.clientWidth;m.value=Ce-F}};a.watch(()=>[e.data,e.pagination,e.height,e.maxHeight,e.minHeight],()=>{v(e.reserveExpand),J(s,n,i),a.nextTick(()=>{Y(d.value),ae(d.value)})},{immediate:!0,deep:!0}),a.watchEffect(()=>{if((d==null?void 0:d.value)instanceof HTMLElement){const Q=D();Ac(d.value,p,20,Q),ie()}}),W.on(Tn.ON_SORT_BY_CLICK,Q=>{var he,Me;const{sortFn:de,column:Ce,index:F,type:oe}=Q;typeof de=="function"&&(n=de,i=Ce,R(s,n,i),(Me=(he=u.value)==null?void 0:he.reset)==null||Me.call(he)),t.emit(Pt.COLUMN_SORT,{column:Ce,index:F,type:oe})}).on(Tn.ON_FILTER_CLICK,Q=>{var he,Me;const{filterFn:de,checked:Ce,column:F,index:oe}=Q;typeof de=="function"&&(s=de,R(s,n,i),(Me=(he=u.value)==null?void 0:he.reset)==null||Me.call(he)),t.emit(Pt.COLUMN_FILTER,{checked:Ce,column:F,index:oe})}).on(Tn.ON_SETTING_CHANGE,Q=>{const{checked:de=[],size:Ce,height:F}=Q;a.nextTick(()=>{var he,Me;ae(d.value);const oe=D();de.length&&Ac(d.value,p,20,oe),(Me=(he=u.value)==null?void 0:he.reset)==null||Me.call(he),t.emit(Pt.SETTING_CHANGE,{checked:de,size:Ce,height:F})})}).on(Tn.ON_ROW_EXPAND_CLICK,Q=>{const{row:de,column:Ce,index:F,rows:oe,e:he}=Q;t.emit(Pt.ROW_EXPAND_CLICK,{row:de[Ge.ROW_SOURCE_DATA],column:Ce,index:F,rows:oe,e:he}),k(de,!de[Ge.ROW_EXPAND])}).on(Tn.ON_ROW_CHECK,({row:Q,isAll:de,index:Ce,value:F})=>{de?(L(F),t.emit(Pt.ROW_SELECT_ALL,{checked:F,data:e.data})):(N(Q,F),t.emit(Pt.ROW_SELECT,{row:Q[Ge.ROW_SOURCE_DATA],index:Ce,checked:F,data:e.data})),t.emit(Pt.ROW_SELECT_CHANGE,{row:Q[Ge.ROW_SOURCE_DATA],isAll:de,index:Ce,checked:F,data:e.data})});const re=Q=>{var je;const de=(je=M.pos.bottom)!=null?je:0,Ce=Q[1],{translateX:F,translateY:oe,pos:he={}}=Ce;M.scrollTranslateY=oe,M.scrollTranslateX=F,M.pos=he;const{bottom:Me}=he;Me<=2&&de>Me&&Ns(60,()=>{t.emit(Pt.SCROLL_BOTTOM,Te(U({},he),{translateX:F,translateY:oe}))},!0)(),ie()};a.onMounted(()=>{o=ih(d.value,()=>{(e.height==="100%"||e.height==="auto")&&Y(d.value),ae(d.value);const Q=D();Ac(d.value,p,20,Q)},60,!0),o.start()}),a.onBeforeUnmount(()=>{o.stop(),o=null,W.destroy()}),t.expose({setRowExpand:k,clearSelection:I,toggleAllSelection:L,toggleRowSelection:N,getSelection:E});const pe=a.computed(()=>Te(U({},le),{"__is-empty":!O.length})),Ne=a.computed(()=>({[Ye("table-body-content")]:!0,"with-virtual-render":e.virtualEnabled})),te={column_drag_line:!0,"offset-x":!0},K=a.computed(()=>Te(U({},C.value),{left:`${y.value-M.scrollTranslateX}px`})),G={"scroll-loading":!0,_bottom:!0},ce=a.computed(()=>({[Ye("fixed-bottom-border")]:!0,"_is-empty":!e.data.length})),we={zIndex:-1,width:0,height:0,display:"none"},{renderScrollLoading:z}=Kp(e,t),B=a.computed(()=>e.virtualEnabled?{}:{scrollXName:"",scrollYName:""});return()=>{var Q,de;return a.createVNode("div",{class:$.value,style:ne.value,ref:d},[a.createVNode("div",{class:_,style:ee.value},[W.renderTableHeadSchema()]),a.createVNode(zr,a.mergeProps({ref:u,lineHeight:W.getRowHeight,class:pe.value,style:fe,list:O},B.value,{contentClassName:Ne.value,onContentScroll:re,throttleDelay:0,scrollEvent:!0,enabled:e.virtualEnabled}),{default:Ce=>W.renderTableBodySchema(Ce.data||e.data),afterSection:()=>a.createVNode("div",{class:ce.value},null)}),a.createVNode("div",{class:b},[x(M.scrollTranslateX,m.value),a.createVNode("div",{class:te,style:K.value},null),a.createVNode("div",{class:G},[z()])]),a.createVNode("div",{class:se.value},[V.value&&W.renderTableFooter(A.value)]),a.createVNode("div",{style:we},[(de=(Q=t.slots).default)==null?void 0:de.call(Q)])])}}});const oh=He(w5);He(eh);const ch=He(eh),Aa=12;function M5(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 I5(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 f=a.markRaw(s.value);t.value&&(f=f.reduce((d,u)=>{let m=[];return u.children&&(m=u.children.map(p=>U({group:{groupId:u[n.value],groupName:u[i.value]}},p))),d.concat(m)},[])),o.value=f,c.value=f.reduce((d,u)=>(d[u[n.value]]=u,d),{})},{immediate:!0}),{flatList:o,saveKeyMap:c}}const uh=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};var dh=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 N5=()=>({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:g.commonType(["focus","search"]).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:()=>({})}});var L5=a.defineComponent({name:"TagRender",props:{node:g.object,displayKey:g.string,tpl:{type:Function}},render(){return this.tpl?this.tpl(this.node,a.h,this):a.createVNode("div",{class:"tag"},[a.createVNode("span",{class:"text"},[this.node[this.displayKey]])])}}),k5=a.defineComponent({name:"TagInput",directives:{bkTooltips:yc},props:N5(),emits:["update:modelValue","change","select","blur","remove","removeAll"],setup(e,{emit:t}){const n=Jn(),i=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),s=a.reactive(U({isShow:!1,width:190,modifiers:[{name:"offset",options:{offset:[0,4]}}]},e.popoverProps)),{maxResult:o}=a.toRefs(e),{pageState:c,initPage:f,pageChange:d}=M5(o),u=a.ref(""),m=a.ref(null),p=a.ref(null),C=a.ref(null),y=a.ref(null),M=a.ref(null),T=a.ref(null),x=a.ref(null),k=a.computed(()=>!e.disabled&&e.hasDeleteIcon),v=a.computed(()=>e.maxData===1),b=a.computed(()=>N.selectedTagList.length===0&&u.value===""&&!i.isEdit),I=a.computed(()=>e.clearable&&!e.disabled&&N.selectedTagList.length!==0&&(e.showClearOnlyHover?i.isHover:!0)),L=a.computed(()=>({"bk-tag-input-trigger":!0,active:i.isEdit,disabled:e.disabled})),N=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),E=a.computed(()=>N.selectedTagList.map(F=>F[e.saveKey])),{flatList:O,saveKeyMap:A}=I5(e),R=a.computed(()=>{if(e.useGroup){const F={};return c.curPageList.forEach((oe,he)=>{oe.__index__=he,F[oe.group.groupId]||(F[oe.group.groupId]={id:oe.group.groupId,name:oe.group.groupName,children:[]}),F[oe.group.groupId].children.push(oe)}),Object.keys(F).map(oe=>F[oe])}return c.curPageList});a.watch([()=>O.value],()=>{a.nextTick(()=>{se()})}),a.watch(()=>e.modelValue,F=>{var oe;ee(E.value,F)||(a.nextTick(()=>{se()}),e.withValidate&&((oe=n==null?void 0:n.validate)==null||oe.call(n,"change")))}),a.watch(u,dt.exports.debounce(()=>{const F=c.curPageList.length!==0,{value:oe}=u;oe!==""&&F||oe===""&&e.trigger==="focus"&&F?s.isShow=!0:(e.trigger!=="focus"||!F)&&(s.isShow=!1)},150)),a.watch(()=>s.isShow,F=>{J(),F&&M.value&&(a.nextTick(()=>{M.value.scrollTop=0}),M.value.removeEventListener("scroll",$),M.value.addEventListener("scroll",$))}),a.onMounted(()=>{se()});const J=()=>{var oe,he;const F=v.value?0:(oe=y.value)==null?void 0:oe.offsetLeft;s.modifiers=[{name:"offset",options:{offset:[F,4]}}],(he=T.value)==null||he.update()},$=()=>{if(c.isPageLoading||M.value.scrollTop===0)return;const{scrollTop:F,offsetHeight:oe,scrollHeight:he}=M.value;if(F+oe>=he){const Me=c.curPage+1;Me<=c.totalPage&&(c.isPageLoading=!0,setTimeout(()=>{d(Me)},500))}},_=()=>{var oe;return Array.from(((oe=C.value)==null?void 0:oe.childNodes)||[]).filter(he=>he.nodeType!==Node.TEXT_NODE)},le=F=>{if(!e.disabled){if(F!=null&&F.target){const{className:oe}=F.target;(oe.indexOf("bk-tag-input-trigger")>-1||oe.indexOf("tag-list")>-1)&&C.value.appendChild(y.value)}clearTimeout(x.value),v.value&&E.value.length&&(N.tagListCache=[...E.value],N.selectedTagListCache=[...N.selectedTagList],u.value=N.selectedTagListCache[0][e.saveKey],Ce(N.selectedTagList[0],0),W()),i.isEdit=!0,a.nextTick(()=>{var oe;(oe=m.value)==null||oe.focus(),e.trigger==="focus"&&N.localList.length!==0&&(ne(),s.isShow?J():s.isShow=!0)})}},se=()=>{const{saveKey:F,modelValue:oe,displayKey:he,allowCreate:Me,trigger:je}=e;if(N.selectedTagList=[],N.localList=O.value,oe.length){const Be={};N.selectedTagList=oe.map(_e=>{const Tt=A.value[_e];return Be[_e]=1,!Tt&&Me?{[F]:_e,[he]:_e}:Tt}).filter(_e=>_e),v.value||(N.localList=N.localList.filter(_e=>!Be[_e[F]]))}je==="focus"&&ne()},ne=(F="")=>{const{searchKey:oe,filterCallback:he}=e,Me=F.toLowerCase().trim();if(Me===""){f(N.localList);return}let je=[];typeof he=="function"?je=he(Me,oe,N.localList)||[]:Array.isArray(oe)?je=N.localList.filter(Be=>oe.some(_e=>Be[_e].toLowerCase().indexOf(Me)>-1)):je=N.localList.filter(Be=>Be[oe].toLowerCase().indexOf(Me)>-1),f(je)},fe=(F,oe)=>{const he={"bk-selector-actived":!1,"bk-selector-selected":E.value.includes(F[e.saveKey])};return e.useGroup?he["bk-selector-actived"]=F.__index__===i.focusItemIndex:he["bk-selector-actived"]=oe===i.focusItemIndex,he};function ee(F,oe){return F.length!==oe.length?!1:oe.every((he,Me)=>F[Me]===he)}const ae=()=>{N.tagListCache=[],N.selectedTagListCache=[],N.selectedTagList=[]},Y=()=>{u.value=""},D=()=>{if(v.value)return 0;const oe=_().findIndex(({id:he})=>he==="tagInputItem");return oe>=0?oe:0},V=(F,oe,he=!1)=>{if(!oe||!F)return;let Me=oe;he&&(Me=oe.nextElementSibling||null),oe.parentNode.insertBefore(F,Me)},W=F=>{const{maxData:oe,trigger:he,allowCreate:Me}=e;if(oe===-1||oe>E.value.length){const{value:je}=F!=null&&F.target?F.target:u,Be=uh(je);Be?(ne(je),m.value.style.width=`${Be*Aa}px`):he==="focus"&&ne()}else re(),u.value="",s.isShow=!1;i.isEdit=!0,i.focusItemIndex=Me?-1:0},ie=()=>{var F;s.width=v.value?(F=p.value)==null?void 0:F.clientWidth:e.contentWidth},re=()=>{x.value=setTimeout(()=>{var oe;const F=u.value;if(Y(),i.isEdit=!1,v.value){const[he]=N.tagListCache;F&&F===he&&N.selectedTagListCache.length?de(N.selectedTagListCache[0],"select"):te("remove")}else if(e.allowAutoMatch&&F){const he=c.curPageList.find(Me=>Array.isArray(e.searchKey)?e.searchKey.map(Be=>Me[Be]).includes(F):Me[e.searchKey]===F);he?pe(he,"select"):e.allowCreate&&pe(F,"custom")}s.isShow=!1,t("blur",F,E.value),(oe=n==null?void 0:n.validate)==null||oe.call(n,"blur")},200)},pe=(F,oe,he)=>{he==null||he.stopPropagation(),!(!F||F.disabled)&&(v.value&&ae(),de(F,oe),te("select"),Y(),s.isShow=!1)},Ne=(F,oe,he)=>{he==null||he.stopPropagation(),Ce(F,oe),Y(),te("remove",F),m.value.style.width=`${Aa}px`},te=(F,oe)=>{t("change",E.value),t(F,oe),t("update:modelValue",E.value)},K=F=>{F.stopPropagation();const oe=N.selectedTagList;N.selectedTagList=[];const he=oe.filter(Me=>A.value[Me[e.saveKey]]);(e.allowCreate&&he.length!==0||!e.allowCreate)&&!v.value&&N.localList.push(...he),te("removeAll")},G=()=>{const F={height:M.value.clientHeight,yAxis:M.value.getBoundingClientRect().y};a.nextTick(()=>{const oe=M.value.querySelector(".bk-selector-actived");if(!oe)return;const he={height:oe.clientHeight,yAxis:oe.getBoundingClientRect().y};he.yAxis<F.yAxis&&(M.value.scrollTop=M.value.scrollTop-(F.yAxis-he.yAxis));const Me=he.yAxis+he.height-F.yAxis;Me>F.height&&(M.value.scrollTop=M.value.scrollTop+Me-F.height)})},ce=(F,oe)=>{const he=_();V(y.value,he[F-1]),N.selectedTagList.splice(F-1,1),le();const Me=A.value[oe[e.saveKey]];(e.allowCreate&&Me||!e.allowCreate)&&!v.value&&N.localList.push(oe),m.value=`${Aa}px`,te("remove")},we=F=>{if(c.isPageLoading)return;let oe;const he=F.target.value,Me=uh(he),je=D(),Be=_();switch(F.code){case"ArrowUp":if(F.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),G();break;case"ArrowDown":if(F.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),G();break;case"ArrowLeft":if(i.isEdit=!0,!Me){if(je<1)return;V(y.value,Be[je-1]),le()}break;case"ArrowRight":if(i.isEdit=!0,!Me){if(je===Be.length-1)return;V(Be[je+1],y.value),le()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&s.isShow||e.allowCreate&&i.focusItemIndex>=0&&s.isShow?pe(c.curPageList[i.focusItemIndex],"select",F):e.allowCreate&&pe(u.value,"custom",F),F.preventDefault();break;case"Backspace":je!==0&&!u.value&&(oe=N.selectedTagList[je-1],ce(je,oe));break}},z=F=>{const oe=[],he=F.split(";"),Me=/^[a-zA-Z][a-zA-Z_]*/g;return he.forEach(je=>{const Be=je.match(Me);if(Be){const _e=Be.join("");oe.push({[e.saveKey]:_e,[e.displayKey]:_e})}}),oe},B=F=>{if(F.preventDefault(),v.value)return!1;const{maxData:oe,saveKey:he,displayKey:Me,pasteFn:je,allowCreate:Be}=e,_e=F.clipboardData.getData("text");let at=(je?je(_e):z(_e)).map(it=>it[he]);if(at.length){const it=_(),Lt=D(),ct=N.localList.map(Re=>Re[he]);if(at=at.filter(Re=>{const zt=(Re==null?void 0:Re.trim())&&!E.value.includes(Re);return Be?zt:zt&&ct.includes(Re)}),oe!==-1){const Re=N.selectedTagList.length;if(Re<oe){const zt=oe-Re;at.length>zt&&(at=[...at.slice(0,zt)])}else at=[]}const st=Be?at.map(Re=>{const zt=N.localList.find(oa=>oa[he]===Re);return zt!=null?zt:{[he]:Re,[Me]:Re}}):N.localList.filter(Re=>at.includes(Re[he]));at.length&&(N.selectedTagList.splice(Lt,0,...st),V(y.value,it[Lt]),m.value.style.width=`${Aa}px`,N.localList=N.localList.filter(Re=>!at.includes(Re[he])),te("select"),le())}},Q=F=>{e.disabled||(V(y.value,F.currentTarget,!0),m.value.style.width=`${Aa}px`,s.isShow&&J())},de=(F,oe)=>{if(N.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:he,saveKey:Me,displayKey:je,createTagValidator:Be}=e,_e=D();let Tt=1,at=!1,it;const Lt=ct=>typeof Be=="function"?Be(ct):!0;if(oe==="custom")if(he){let ct=F.split(he);ct=ct.filter(Re=>(Re==null?void 0:Re.trim())&&!E.value.includes(Re)&&Lt(Re));const st=ct.map(Re=>A.value[Re]||{[Me]:Re,[je]:Re});ct.length&&(N.selectedTagList.splice(_e,0,...st),Tt=st.length,at=!0)}else{const ct=typeof F=="object";if(it=ct?F[Me]:F.trim(),it=it.replace(/\s+/g,""),it!==void 0&&!E.value.includes(it)&&Lt(it)){const st=A.value[it]||(ct?F:{[Me]:it,[je]:it});N.selectedTagList.splice(_e,0,st),at=!0}}else F&&(it=F[Me],it!==void 0&&!E.value.includes(it)&&(N.selectedTagList.splice(_e,0,F),at=!0));at&&a.nextTick(()=>{for(let ct=1;ct<=Tt;ct++){const Re=_()[_e+ct];V(Re,y.value)}if(m.value.style.width=`${Aa}px`,!v.value){e.allowNextFocus&&le();const ct=E.value.reduce((st,Re)=>(st[Re]=1,st),{});N.localList=N.localList.filter(st=>!ct[st[Me]])}})},Ce=(F,oe)=>{N.selectedTagList.splice(oe,1);const he=A.value[F[e.saveKey]];(e.allowCreate&&he||!e.allowCreate)&&!v.value&&N.localList.push(F)};return Te(U(U(U({popoverProps:s},a.toRefs(i)),a.toRefs(N)),a.toRefs(c)),{isShowPlaceholder:b,isShowClear:I,curInputValue:u,renderList:R,showTagClose:k,tagInputRef:m,bkTagSelectorRef:p,tagListRef:C,tagInputItemRef:y,selectorListRef:M,popoverRef:T,triggerClass:L,focusInputTrigger:le,activeClass:fe,handleInput:W,handleFocus:ie,handleBlur:re,handleTagSelected:pe,handleTagRemove:Ne,handleClear:K,tagFocus:Q,handleKeydown:we,handlePaste:B})},render(){return a.createVNode("div",{class:"bk-tag-input",ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode(Qs,a.mergeProps({ref:"popoverRef",theme:"light",trigger:"manual",placement:"bottom-start","content-cls":"bk-tag-input-popover-content",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};return a.withDirectives(a.createVNode("li",{class:"tag-item",onClick:this.tagFocus},[a.createVNode(L5,{node:i,tpl:this.tagTpl,displayKey:this.displayKey},null),this.showTagClose?a.createVNode(Qn,{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]])]),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(Gt,{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(dh,{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(dh,{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(Ii,{theme:"primary",size:Rn.Small},null)]):null])])})])}});const fh=He(k5),T5={direction:g.commonType(["horizontal","vertical"],"direction").def("horizontal"),align:g.commonType(["left","center","right"],"align").def("center"),color:g.string.def("#dde4eb"),width:g.number.def(1),type:g.commonType(["dashed","solid"],"lineType").def("dashed")};var x5=a.defineComponent({name:"Divider",props:T5,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:["bk-divider-info",`bk-divider-info-${this.align}`]},[this.$slots.default()])),a.createVNode("div",{class:["bk-divider",`bk-divider-${this.direction}`],style:e()},[t])}});const hh=He(x5),S5={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},D5={active:g.oneOfType([g.number,g.string]).def(""),type:g.commonType(["card","border-card","unborder-card"],"type").def("border-card"),tabPosition:g.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:g.commonType(["replace","insert","top"],"sortType").def("replace"),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)},j5=U({active:g.oneOfType([g.number,g.string]).def(""),panels:{type:Array,default:()=>[]},tabPosition:g.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:g.commonType(["replace","insert","top"],"sortType").def("replace"),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)},S5),z5={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:g.commonType(["if","show"],"render").def("show"),panel:g.string||g.func};var gh=a.defineComponent({name:"TabNav",props:j5,setup(e){const t=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const f=[];let d=!1;return e.panels.filter((u,m)=>{if(!u.props)return null;const{name:p,label:C,closable:y,visible:M,disabled:T,sortable:x}=u.props;if(!M)return!1;e.active===p&&(d=!0);const k=v=>u.slots.label?a.h(u.slots.label):[void 0,""].includes(v)?`\u9009\u9879\u5361${m+1}`:typeof v=="string"?v:typeof v=="function"?a.h(v):v;return f.push({name:p,closable:y,visible:M,disabled:T,sortable:x,tabLabel:k(C)}),!0}),!d&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),f}),n=a.ref(-1),i=a.ref(-1),s=a.ref(""),o=(f,d)=>f===d;return Te(U({},{handleTabAdd(f){e.tabAdd(f)},dragstart(f,d){i.value=f,s.value=e.guid,Object.assign(d.dataTransfer,{effectAllowed:"move"}),e.tabDrag(f,d)},dragenter(f){o(s.value,e.guid)&&(n.value=f)},dragend(){n.value=-1,i.value=-1,s.value=null},drop(f,d){if(!o(s.value,e.guid))return!1;e.tabSort(i.value,f,d)},handleTabChange(f){e.tabChange(f)},handleTabRemove(f,d){e.tabRemove(f,d)}}),{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:f,dragend:d,drop:u}=this,m=()=>this.navs.map((C,y)=>{if(!C)return null;const{name:M,disabled:T,tabLabel:x}=C,k=()=>{const b=["bk-tab-header-item"];return T&&b.push("bk-tab-header--disabled"),e===M&&b.push("bk-tab-header--active"),b.join(" ")},v=(b,I)=>b||I;return a.createVNode("div",{key:M,onClick:()=>this.handleTabChange(M),draggable:v(C.sortable,i),onDragstart:b=>c(y,b),onDragenter:b=>{b.preventDefault(),f(y)},onDragleave:b=>{b.preventDefault()},onDragover:b=>{b.preventDefault()},onDragend:b=>{b.preventDefault(),d()},onDrop:b=>{b.preventDefault(),u(y,s)},class:k()},[a.createVNode("div",null,[x]),v(C.closable,t)&&a.createVNode(Gt,{class:"bk-tab-header-item-close",onClick:()=>this.handleTabRemove(y,C)},null)])}),p=()=>{var y,M;const C=[];return typeof this.$slots.add=="function"?C.push((M=(y=this.$slots).add)==null?void 0:M.call(y,a.h)):n&&C.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(Es,{width:26,height:26},null)])),C.length?a.createVNode("div",{class:"bk-tab-header-operation"},[C.map((T,x)=>a.createVNode("div",{class:"bk-tab-header-item",key:x},[T]))]):null};return a.createVNode("div",{style:{lineHeight:`${o}px`},class:"bk-tab-header"},[a.createVNode("div",{class:"bk-tab-header-nav"},[m()]),p(),typeof this.$slots.setting=="function"&&a.createVNode("div",{class:"bk-tab-header-setting"},[this.$slots.setting()])])}}),O5=a.defineComponent({name:"Tab",components:{TabNav:gh},props:D5,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=(u,m=[])=>{const{children:p}=u;return(p||[]).forEach(C=>{let{type:y}=C;y=y.name||y,y==="TabPanel"&&C.component?m.push(C.component):(y===a.Fragment||y==="template")&&c(C,m)}),m},f=()=>{if(t.default){const{children:u}=o.subTree.children[1];if(!u)return;const m=u[0],p=c(m);p.length!==s.value.length&&(s.value=p)}};return a.onMounted(()=>{f(),i.value=!0}),a.onUpdated(()=>{f()}),Te(U({},{tabAdd(u){n("add",{e:u}),n("add-panel",{e:u})},tabChange(u){n("change",u),n("tab-change",u),n("update:active",u)},tabRemove(u,m){n("remove",u,m),n("remove-panel",u,m)},tabSort(u,m,p){const C=s.value;if(p==="insert")if(u<m)C.splice(m+1,0,s[u]),C.splice(u,1);else if(u>m)C.splice(m,0,s[u]),C.splice(u+1,1);else return!1;else{const y=C[m];C[m]=C[u],C[u]=y}s.value=[...C],n("sort",u,m,p),n("sort-change",u,m,p)},tabDrag(u,m){n("drag",u,m),n("on-drag-tab",u,m)}}),{isMounted:i,panels:s})},render(){var n,i;const e=()=>this.tabPosition==="top"?`bk-tab bk-tab--${this.tabPosition} bk-tab--${this.type} ${this.extCls}`:`bk-tab bk-tab--${this.tabPosition} ${this.extCls}`,t=()=>{const{panels:s,active:o,type:c,closable:f,addable:d,sortable:u,sortType:m,labelHeight:p,scrollStep:C,validateActive:y,changeOnHover:M,changeOnHoverDelay:T,tabPosition:x,tabAdd:k,tabChange:v,tabRemove:b,tabSort:I,tabDrag:L}=this,N={panels:s,active:o,type:c,closable:f,addable:d,sortable:u,sortType:m,labelHeight:p,scrollStep:C,validateActive:y,changeOnHover:M,changeOnHoverDelay:T,tabPosition:x,tabAdd:k,tabChange:v,tabRemove:b,tabSort:I,tabDrag:L};return!s||!Array.isArray(s)?null:a.createVNode(gh,N,this.$slots)};return a.createVNode("div",{class:e()},[t(),a.createVNode("div",{class:"bk-tab-content"},[(i=(n=this.$slots).default)==null?void 0:i.call(n)])])}}),E5=a.defineComponent({name:"TabPanel",props:z5,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:"bk-tab-panel"},[t()]),[[a.vShow,e]])}});const mh=Ft(O5,{TabPanel:E5}),Di={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let ph=1;const yh=(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:f=10}=n;Di[i].forEach(C=>{c+=(C.el.offsetHeight||0)+f}),ph+=1;const d=`message_${ph}`;n=Te(U({},n),{offsetX:o,offsetY:c,id:d});const u=document.createElement("div"),m=a.createVNode(e,n);m.props.onDestroy=C=>{P5(C,i,f,s),a.render(null,u)},a.render(m,u),Di[i].push(m);let p;m.props.getContainer&&ka(m.props.getContainer)?p=m.props.getContainer:p=document.body,p.appendChild(u.firstElementChild)};function P5(e,t,n,i){i==null||i();const s=t.startsWith("top")?"top":"bottom";let o=-1;Di[t].forEach((u,m)=>{u.props.id===e&&(o=m)});const f=Di[t][o].el.offsetHeight,d=Di[t].length;for(let u=o;u<d;u++){const m=parseInt(Di[t][u].el.style[s],10)-f-n;Di[t][u].component.props.offsetY=m}Di[t].splice(o,1)}const A5={id:g.string.def(""),message:g.string.def(""),theme:g.theme(["primary","warning","success","error"]).def("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 V5=a.defineComponent({name:"Message",props:A5,emits:["destroy"],setup(e,{emit:t}){const n=a.computed(()=>["bk-message",`bk-message-${e.theme}`,`${e.extCls}`]),i=In.getMessageNextIndex(),s=a.computed(()=>e.getContainer&&ka(e.getContainer)),o=a.computed(()=>({top:`${e.offsetY}px`,zIndex:i,position:s.value?"absolute":"fixed"})),c=a.ref(!1);let f=null;const d=()=>{f=setTimeout(()=>{c.value=!1},e.delay)},u=m=>{m.preventDefault(),m.stopPropagation(),c.value=!1};return a.onMounted(()=>{e.delay&&d(),c.value=!0}),a.onUnmounted(()=>{clearTimeout(f)}),a.watch(c,()=>{c.value||t("destroy",e.id)}),{classNames:n,styles:o,visible:c,close:u}},render(){const e=()=>({primary:a.createVNode(Os,null,null),warning:a.createVNode(Nr,null,null),success:a.createVNode(Mr,null,null),error:a.createVNode(Gt,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(Qn,{class:"bk-message-close",onClick:this.close},null)]),[[a.vShow,this.visible]])]})}});const bh=e=>{yh(V5,e)},Ch=e=>{const t=document.createElement("div"),n=a.ref(!1),i=a.shallowRef(e),s=a.defineComponent({name:"DialogConfirm",setup(f,{expose:d}){a.onMounted(()=>{(document.activeElement||document.body).blur(),i.value.isShow!==!1&&(n.value=!0)});const u=async()=>{var y,M;typeof((y=i.value)==null?void 0:y.onClosed)=="function"&&await((M=i.value)==null?void 0:M.onClosed()),n.value=!1},m=async()=>{var y,M;typeof((y=i.value)==null?void 0:y.onConfirm)=="function"&&await((M=i.value)==null?void 0:M.onConfirm()),n.value=!1};function p(y){i.value=y}d({update:p});const C=()=>{const y=[],M=[];if(i.value.subTitle)switch(typeof i.value.subTitle){case"string":y.push(i.value.subTitle);break;case"function":y.push(i.value.subTitle());break;default:y.push(i.value.subTitle);break}return y.length&&M.push(a.h("div",{class:"bk-info-sub-title",style:`text-Align:${i.value.contentAlign||"center"}`},y)),M};return()=>a.createVNode(Zf,Te(U({class:"bk-info-wrapper",headerAlign:"center",footerAlign:"center"},i.value),{isShow:n.value,onClosed:u,onConfirm:m}),C())}}),o=a.createApp(s).mount(t);return{show:()=>{n.value=!0},hide:()=>{n.value=!1},update:f=>{o.update(f)}}},J5={id:g.string.def(""),title:g.string.def(""),message:g.string.def(""),theme:g.theme(["primary","warning","success","error"]).def("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 Q5=a.defineComponent({name:"Notify",props:J5,emits:["destroy"],setup(e,{emit:t}){const n=In.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]),f=a.ref(!1);let d=null;const u=()=>{d=setTimeout(()=>{f.value=!1},e.delay)},m=()=>{f.value=!1};return a.onMounted(()=>{e.delay&&u(),f.value=!0}),a.onUnmounted(()=>{clearTimeout(d)}),a.watch(f,()=>{f.value||t("destroy",e.id)}),{classNames:c,styles:o,visible:f,handleClose:m}},render(){const e=()=>({primary:a.createVNode(Os,null,null),warning:a.createVNode(Nr,null,null),success:a.createVNode(Mr,null,null),error:a.createVNode(Gt,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.message])]),this.dismissable&&a.createVNode(Qn,{class:"bk-notify-icon bk-notify-close",onClick:this.handleClose},null)]),[[a.vShow,this.visible]])]})}});const vh=e=>{yh(Q5,e)},wh=Symbol("MENU_PROVIDER_KEY"),Rc=Symbol("MENU_PROVIDER_KEY_PATH"),R5=e=>{a.provide(wh,e)},_5=e=>{const{parentKeys:t,parentInfo:n}=_c(),i=a.computed(()=>[...t.value,e]);a.provide(Rc,{parentInfo:{key:e,parentKey:n==null?void 0:n.key},parentKeys:i})},Mh=()=>a.inject(wh),_c=()=>{var n;const e=a.getCurrentInstance(),t=e.parent?e.parent.provides:(n=e.vnode.appContext)==null?void 0:n.provides;return t&&Rc in t?a.inject(Rc):{parentInfo:void 0,parentKeys:a.ref([])}},Wc=function(e){return(e||"").split(" ").filter(t=>!!t.trim())};function Ih(e,t){if(!e||!t)return;const n=Wc(t);let i=e.getAttribute("class")||"";if(e.classList){e.classList.remove(...n);return}n.forEach(o=>{i=i.replace(` ${o} `," ")});const s=Wc(i).join(" ");e.setAttribute("class",s)}function Nh(e,t){if(!e)return;let n=e.getAttribute("class")||"";const i=Wc(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 W5=()=>({css:!0,onBeforeEnter:e=>{Nh(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,Ih(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&&(Nh(e,"collapse-transition"),e.style.transitionProperty="height",e.style.height="0px",e.style.maxHeight="0px")},onAfterLeave:e=>{Ih(e,"collapse-transition"),e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow}}),H5={activeKey:String,collapse:Boolean,openedKeys:{type:Array},mode:{type:String,default:"vertical"},uniqueOpen:{type:Boolean,default:!0}};var B5=a.defineComponent({name:"Menu",props:H5,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({}),f=a.computed(()=>e.mode),d=a.ref(e.collapse),u=a.ref([]);a.watchEffect(()=>{e.activeKey!==void 0&&(s.value=e.activeKey)}),a.watch(()=>e.collapse,()=>{d.value=e.collapse,console.info(e.collapse);const M=[...u.value],T=[...o.value];o.value=d.value?[]:M,u.value=d.value?T:[]},{immediate:!0}),a.watch(()=>e.openedKeys,(M=o.value)=>{o.value=M},{immediate:!0});const m=(M,T)=>{c.value=Te(U({},c.value),{[M]:T})},p=M=>{delete c.value[M],c.value=U({},c.value)},C=(M,T)=>{T?e.uniqueOpen?o.value=[M]:o.value.push(M):o.value=o.value.filter(x=>x!==M),n("openChange",T,c.value[M]),n("update:openKeys",[...o.value])},y=M=>{s.value=M,n("click",c.value[M]),n("update:activeKey",M,c.value[M])};return R5({activeKey:s,menuStore:c,registerMenuInfo:m,unregisterMenuInfo:p,mode:f.value,openedKeys:o,collapse:d,handleOpenChange:C,handleActiveChange:y}),i({activeKey:s,openedKeys:o,menuStore:c}),()=>{var M;return a.createVNode("div",{class:{"bk-menu":!0,"is-collapse":d.value}},[(M=t.default)==null?void 0:M.call(t)])}}}),F5=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)])])}}}),G5=a.defineComponent({name:"MenuItem",props:{needIcon:{type:Boolean,default:!0}},emits:["click"],slots:["icon"],setup(e,{slots:t,emit:n}){var y,M;const{registerMenuInfo:i,unregisterMenuInfo:s,activeKey:o,handleActiveChange:c}=Mh(),f=a.getCurrentInstance(),{parentInfo:d}=_c(),u=((M=(y=f.vnode.key)==null?void 0:y.toString)==null?void 0:M.call(y))||String(f.uid),m=a.computed(()=>o.value===u),p=a.computed(()=>e.needIcon);i(u,{key:u,parentKey:d==null?void 0:d.key});const C=T=>{c(u),n("click",T)};return a.onBeforeUnmount(()=>s(u)),()=>{var T,x;return a.createVNode("li",{class:{"bk-menu-item":!0,"is-active":m.value},onClick:C},[p.value&&a.createVNode("span",{class:"item-icon"},[((T=t==null?void 0:t.icon)==null?void 0:T.call(t))||a.createVNode("i",{class:"default-icon"},null)]),a.createVNode("span",{class:"item-content"},[(x=t.default)==null?void 0:x.call(t)])])}}});const Z5={title:{type:String,default:"title"}};var Y5=a.defineComponent({name:"Submenu",props:Z5,emits:["collapse"],slots:["icon"],setup(e,{slots:t,emit:n}){var k,v;const{registerMenuInfo:i,unregisterMenuInfo:s,openedKeys:o,handleOpenChange:c,collapse:f,activeKey:d,menuStore:u}=Mh(),{parentInfo:m}=_c(),p=a.getCurrentInstance(),C=((v=(k=p.vnode.key)==null?void 0:k.toString)==null?void 0:v.call(k))||String(p.uid),y=a.ref(W5()),M=a.computed(()=>o.value.includes(C)),T=a.computed(()=>{var I,L;const b=(L=(I=u.value)==null?void 0:I[d.value])==null?void 0:L.parentKey;return f.value&&b===C&&M});_5(C),i(C,{key:C,parentKey:m==null?void 0:m.key}),a.onBeforeUnmount(()=>s(C));const x=()=>{c(C,!M.value),n("collapse",!M.value,p)};return()=>{var b;return a.createVNode("li",{class:{"bk-menu-submenu":!0,"is-opened":M.value}},[a.createVNode("div",{class:{"submenu-header":!0,"is-collapse":T.value},onClick:x},[a.createVNode("span",{class:"submenu-header-icon"},[((b=t.icon)==null?void 0:b.call(t))||a.createVNode(ec,{class:"menu-icon"},null)]),a.createVNode("span",{class:"submenu-header-content"},[e.title]),a.createVNode(Ls,{class:{"submenu-header-collapse":!0,"is-collapse":o.value.includes(C)}},null)]),a.createVNode(a.Transition,y.value,{default:()=>{var I;return[a.withDirectives(a.createVNode("ul",{class:"submenu-list"},[(I=t.default)==null?void 0:I.call(t)]),[[a.vShow,M.value]])]}})])}}});const Lh=Ft(B5,{Item:G5,Submenu:Y5,Group:F5}),U5={sideTitle:{type:String,default:""},navigationType:{type:String,default:"left-right"}};var kh=a.defineComponent({props:U5,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 $5={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 K5=a.defineComponent({name:"Navigation",props:$5,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,f,d,u,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(kh,{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(kh,{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(Ho,{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"},[(f=(c=this.$slots)["header-set"])==null?void 0:f.call(c)])]]),a.createVNode("div",{class:"container-content",style:{maxHeight:`calc(100vh - ${this.headHeight}px)`}},[(u=(d=this.$slots).default)==null?void 0:u.call(d),a.createVNode("div",{class:"container-footer"},[(p=(m=this.$slots).footer)==null?void 0:p.call(m)])])])])])}});const Th=He(K5),X5={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 Hc=a.defineComponent({props:X5,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 d=n;d.isShow&&d.hide(),d.destroy(),n=null,t("changeVisible",!1)}},o=()=>{n&&Object.keys(n).length!==0?a.nextTick(()=>{n.update()}):a.nextTick(()=>{n=new yf(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 d={};return e.appendToBody&&(d["z-index"]=1060+In.getModalNextIndex()),d}),f=a.reactive({styles:c});return Te(U({},a.toRefs(f)),{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 q5={showTime:{type:Boolean,required:!0},isTime:{type:Boolean,default:!1},timeDisabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}};var ey=a.defineComponent({props:q5,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:d=>{const m=[...c.value.children][d.shiftKey?"shift":"pop"]();document.activeElement===m&&(d.preventDefault(),d.stopPropagation())}}},render(){return a.createVNode("div",{class:"bk-picker-confirm",ref:"elRef",onKeydown:this.handleTab},[this.showTime?a.createVNode("a",{href:"javascript: void(0);",class:"bk-picker-confirm-time",onClick:this.handleToggleTime},[this.labels.time]):"",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])])}}),xh=1e3*60*60*24;function Sh(e,t){return new Date(e,t+1,0).getDate()}function Dh(e,t,n){return t===0&&n>50?e-1:t===11&&n<10?e+1:e}function jh(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),f=1+Math.round((s-c)/xh);i||(f+=c.getDay());var d=Math.ceil(f/7);if(!i){var u=new Date(e,t,n),m=new Date(e+1,0,1),p=m.getDay();u.getTime()>=m.getTime()-xh*p&&(d=1)}return d}function ty(e,t,n){for(var i=this.lang||"en",s=this.onlyDays,o=typeof this.weekStart=="undefined"?1:this.weekStart,c=o===1,f=[],d=new Date(e,t,1),u=d.getDay()||(c?7:0),m=o-u,p=jh(e,t,1,c),C=Sh(e,t),y=Sh(e,t-1),M,T,x,k=Dh(e,t,p),v={month:t,year:e,daysInMonth:C},b=0;b<7;b++){x=m;for(var I=0;I<8;I++){b>0&&I>0&&m++,m>C||m<1?(T=m>C?m-C:y+m,M=m>C?t+1:t-1):(T=m,M=t);var L=function(){return I===0?"weekLabel":b===0?"dayLabel":m<1?"prevMonth":m>C?"nextMonth":"monthDay"}(),N=x!==m&&b>0,E={desc:N?T:p,week:p,type:L,format:c?"ISO 8601":"US",date:N?new Date(Date.UTC(e,M,T)):!1,year:k,index:f.length};n&&(typeof n=="function"?E=n.call(v,E,i):n.forEach(function(O){E=O.call(v,E,i)})),s&&N?f.push(E):s||f.push(E)}b>0&&(p=jh(e,M,T+1,c)),k=Dh(e,t,p)}return v.cells=f,v}var ny=function(e){return ty.bind(e)},iy={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"}},Hn=iy;function ay(e){return e==null?!1:e.constructor===Array||e.constructor===Object}function zh(e,t){for(var n in e)t[n]?ay(e[n])&&zh(e[n],t[n]):t[n]=e[n]}function Oh(e,t){var n=[Hn.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&&Hn.weekPlaceholder?e.desc=Hn.weekPlaceholder:e.index<8?e.desc=Hn.columnNames[t][e.index]:e.index%8==0&&(e.desc=e.week)),e.date&&(e.monthName=Hn.monthNames[t][e.date.getMonth()]),this.monthName||(this.monthName=Hn.monthNames[t][this.month]),this.labels||(this.labels={monthNames:Hn.monthNames[t],columnNames:Hn.columnNames[t],classes:Hn.classes}),e}Oh.setLabels=function(e){zh(e,Hn)};var ry=Oh,sy={Generator:ny,addLabels:ry};function hn(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 At(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function xn(e){At(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 ly(e,t){At(2,arguments);var n=xn(e).getTime(),i=hn(t);return new Date(n+i)}function oy(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 cy(e){return At(1,arguments),e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function uy(e){if(At(1,arguments),!cy(e)&&typeof e!="number")return!1;var t=xn(e);return!isNaN(Number(t))}var dy={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"}},fy=function(e,t,n){var i,s=dy[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},hy=fy;function Bc(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 gy={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},my={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},py={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yy={date:Bc({formats:gy,defaultWidth:"full"}),time:Bc({formats:my,defaultWidth:"full"}),dateTime:Bc({formats:py,defaultWidth:"full"})},by=yy,Cy={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},vy=function(e,t,n,i){return Cy[e]},wy=vy;function Pr(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,f=i.width?String(i.width):c;o=e.formattingValues[f]||e.formattingValues[c]}else{var d=e.defaultWidth,u=i.width?String(i.width):e.defaultWidth;o=e.values[u]||e.values[d]}var m=e.argumentCallback?e.argumentCallback(t):t;return o[m]}}var My={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Iy={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ny={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"]},Ly={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"]},ky={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"}},Ty={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"}},xy=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"},Sy={ordinalNumber:xy,era:Pr({values:My,defaultWidth:"wide"}),quarter:Pr({values:Iy,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:Pr({values:Ny,defaultWidth:"wide"}),day:Pr({values:Ly,defaultWidth:"wide"}),dayPeriod:Pr({values:ky,defaultWidth:"wide",formattingValues:Ty,defaultFormattingWidth:"wide"})},Dy=Sy;function Ar(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],f=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(f)?zy(f,function(p){return p.test(c)}):jy(f,function(p){return p.test(c)}),u;u=e.valueCallback?e.valueCallback(d):d,u=n.valueCallback?n.valueCallback(u):u;var m=t.slice(c.length);return{value:u,rest:m}}}function jy(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function zy(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function Oy(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 f=t.slice(s.length);return{value:c,rest:f}}}var Ey=/^(\d+)(th|st|nd|rd)?/i,Py=/\d+/i,Ay={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},Vy={any:[/^b/i,/^(a|c)/i]},Jy={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Qy={any:[/1/i,/2/i,/3/i,/4/i]},Ry={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},_y={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]},Wy={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},Hy={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]},By={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},Fy={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}},Gy={ordinalNumber:Oy({matchPattern:Ey,parsePattern:Py,valueCallback:function(e){return parseInt(e,10)}}),era:Ar({matchPatterns:Ay,defaultMatchWidth:"wide",parsePatterns:Vy,defaultParseWidth:"any"}),quarter:Ar({matchPatterns:Jy,defaultMatchWidth:"wide",parsePatterns:Qy,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Ar({matchPatterns:Ry,defaultMatchWidth:"wide",parsePatterns:_y,defaultParseWidth:"any"}),day:Ar({matchPatterns:Wy,defaultMatchWidth:"wide",parsePatterns:Hy,defaultParseWidth:"any"}),dayPeriod:Ar({matchPatterns:By,defaultMatchWidth:"any",parsePatterns:Fy,defaultParseWidth:"any"})},Zy=Gy,Yy={code:"en-US",formatDistance:hy,formatLong:by,formatRelative:wy,localize:Dy,match:Zy,options:{weekStartsOn:0,firstWeekContainsDate:1}},Uy=Yy;function $y(e,t){At(2,arguments);var n=hn(t);return ly(e,-n)}var Ky=864e5;function Xy(e){At(1,arguments);var t=xn(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/Ky)+1}function rl(e){At(1,arguments);var t=1,n=xn(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 Eh(e){At(1,arguments);var t=xn(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var s=rl(i),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var c=rl(o);return t.getTime()>=s.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}function qy(e){At(1,arguments);var t=Eh(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=rl(n);return i}var eb=6048e5;function tb(e){At(1,arguments);var t=xn(e),n=rl(t).getTime()-qy(t).getTime();return Math.round(n/eb)+1}function sl(e,t){At(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.weekStartsOn,o=s==null?0:hn(s),c=n.weekStartsOn==null?o:hn(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=xn(e),d=f.getUTCDay(),u=(d<c?7:0)+d-c;return f.setUTCDate(f.getUTCDate()-u),f.setUTCHours(0,0,0,0),f}function Ph(e,t){At(1,arguments);var n=xn(e),i=n.getUTCFullYear(),s=t||{},o=s.locale,c=o&&o.options&&o.options.firstWeekContainsDate,f=c==null?1:hn(c),d=s.firstWeekContainsDate==null?f:hn(s.firstWeekContainsDate);if(!(d>=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=new Date(0);u.setUTCFullYear(i+1,0,d),u.setUTCHours(0,0,0,0);var m=sl(u,t),p=new Date(0);p.setUTCFullYear(i,0,d),p.setUTCHours(0,0,0,0);var C=sl(p,t);return n.getTime()>=m.getTime()?i+1:n.getTime()>=C.getTime()?i:i-1}function nb(e,t){At(1,arguments);var n=t||{},i=n.locale,s=i&&i.options&&i.options.firstWeekContainsDate,o=s==null?1:hn(s),c=n.firstWeekContainsDate==null?o:hn(n.firstWeekContainsDate),f=Ph(e,t),d=new Date(0);d.setUTCFullYear(f,0,c),d.setUTCHours(0,0,0,0);var u=sl(d,t);return u}var ib=6048e5;function ab(e,t){At(1,arguments);var n=xn(e),i=sl(n,t).getTime()-nb(n,t).getTime();return Math.round(i/ib)+1}function tt(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var rb={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return tt(t==="yy"?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):tt(n+1,2)},d:function(e,t){return tt(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 tt(e.getUTCHours()%12||12,t.length)},H:function(e,t){return tt(e.getUTCHours(),t.length)},m:function(e,t){return tt(e.getUTCMinutes(),t.length)},s:function(e,t){return tt(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 tt(s,t.length)}},ji=rb,Va={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},sb={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=Ph(e,i),o=s>0?s:1-s;if(t==="YY"){var c=o%100;return tt(c,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):tt(o,t.length)},R:function(e,t){var n=Eh(e);return tt(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return tt(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 tt(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 tt(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 tt(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=ab(e,i);return t==="wo"?n.ordinalNumber(s,{unit:"week"}):tt(s,t.length)},I:function(e,t,n){var i=tb(e);return t==="Io"?n.ordinalNumber(i,{unit:"week"}):tt(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=Xy(e);return t==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):tt(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 tt(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 tt(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 tt(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=Va.noon:i===0?s=Va.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=Va.evening:i>=12?s=Va.afternoon:i>=4?s=Va.morning:s=Va.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"}):tt(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return i===0&&(i=24),t==="ko"?n.ordinalNumber(i,{unit:"hour"}):tt(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 Vh(o);case"XXXX":case"XX":return na(o);case"XXXXX":case"XXX":default:return na(o,":")}},x:function(e,t,n,i){var s=i._originalDate||e,o=s.getTimezoneOffset();switch(t){case"x":return Vh(o);case"xxxx":case"xx":return na(o);case"xxxxx":case"xxx":default:return na(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"+Ah(o,":");case"OOOO":default:return"GMT"+na(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"+Ah(o,":");case"zzzz":default:return"GMT"+na(o,":")}},t:function(e,t,n,i){var s=i._originalDate||e,o=Math.floor(s.getTime()/1e3);return tt(o,t.length)},T:function(e,t,n,i){var s=i._originalDate||e,o=s.getTime();return tt(o,t.length)}};function Ah(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+tt(o,2)}function Vh(e,t){if(e%60===0){var n=e>0?"-":"+";return n+tt(Math.abs(e)/60,2)}return na(e,t)}function na(e,t){var n=t||"",i=e>0?"-":"+",s=Math.abs(e),o=tt(Math.floor(s/60),2),c=tt(s%60,2);return i+o+n+c}var lb=sb;function Jh(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 Qh(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 ob(e,t){var n=e.match(/(P+)(p+)?/)||[],i=n[1],s=n[2];if(!s)return Jh(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}}",Jh(i,t)).replace("{{time}}",Qh(s,t))}var cb={p:Qh,P:ob},ub=cb,db=["D","DD"],fb=["YY","YYYY"];function hb(e){return db.indexOf(e)!==-1}function gb(e){return fb.indexOf(e)!==-1}function Rh(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 mb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yb=/^'([^]*?)'?$/,bb=/''/g,Cb=/[a-zA-Z]/;function vb(e,t,n){At(2,arguments);var i=String(t),s=n||{},o=s.locale||Uy,c=o.options&&o.options.firstWeekContainsDate,f=c==null?1:hn(c),d=s.firstWeekContainsDate==null?f:hn(s.firstWeekContainsDate);if(!(d>=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var u=o.options&&o.options.weekStartsOn,m=u==null?0:hn(u),p=s.weekStartsOn==null?m:hn(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 C=xn(e);if(!uy(C))throw new RangeError("Invalid time value");var y=oy(C),M=$y(C,y),T={firstWeekContainsDate:d,weekStartsOn:p,locale:o,_originalDate:C},x=i.match(pb).map(function(k){var v=k[0];if(v==="p"||v==="P"){var b=ub[v];return b(k,o.formatLong,T)}return k}).join("").match(mb).map(function(k){if(k==="''")return"'";var v=k[0];if(v==="'")return wb(k);var b=lb[v];if(b)return!s.useAdditionalWeekYearTokens&&gb(k)&&Rh(k,t,e),!s.useAdditionalDayOfYearTokens&&hb(k)&&Rh(k,t,e),b(M,k,o.localize,T);if(v.match(Cb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return k}).join("");return x}function wb(e){return e.match(yb)[1].replace(bb,"'")}const Nt={},_h=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,ia=/\d\d?/,Mb=/\d{3}/,Ib=/\d{4}/,ll=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Wh=function(){};function Hh(e,t){const n=[];for(let i=0,s=e.length;i<s;i++)n.push(e[i].substr(0,t));return n}function Bh(e){return(t,n,i)=>{const s=i[e].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~s&&(t.month=s)}}function Bn(e,t=2){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}const Fh=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Gh=["January","February","March","April","May","June","July","August","September","October","November","December"],Nb=Hh(Gh,3),Lb=Hh(Fh,3);Nt.i18n={dayNamesShort:Lb,dayNames:Fh,monthNamesShort:Nb,monthNames:Gh,amPm:["am","pm"],DoFn(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10)*e%10]}};const Zh={D(e){return e.getDay()},DD(e){return Bn(e.getDay())},Do(e,t){return t.DoFn(e.getDate())},d(e){return e.getDate()},dd(e){return Bn(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 Bn(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 Bn(e.getHours()%12||12)},H(e){return e.getHours()},HH(e){return Bn(e.getHours())},m(e){return e.getMinutes()},mm(e){return Bn(e.getMinutes())},s(e){return e.getSeconds()},ss(e){return Bn(e.getSeconds())},S(e){return Math.round(e.getMilliseconds()/100)},SS(e){return Bn(Math.round(e.getMilliseconds()/10),2)},SSS(e){return Bn(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?"-":"+")+Bn(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)}},ht={d:[ia,(e,t)=>{e.day=t}],M:[ia,(e,t)=>{e.month=t-1}],yy:[ia,(e,t)=>{const i=+`${new Date().getFullYear()}`.substr(0,2);e.year=`${t>68?i-1:i}${t}`}],h:[ia,(e,t)=>{e.hour=t}],m:[ia,(e,t)=>{e.minute=t}],s:[ia,(e,t)=>{e.second=t}],yyyy:[Ib,(e,t)=>{e.year=t}],S:[/\d/,(e,t)=>{e.millisecond=t*100}],SS:[/\d{2}/,(e,t)=>{e.millisecond=t*10}],SSS:[Mb,(e,t)=>{e.millisecond=t}],D:[ia,Wh],ddd:[ll,Wh],MMM:[ll,Bh("monthNamesShort")],MMMM:[ll,Bh("monthNames")],a:[ll,(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)}]};ht.DD=ht.D,ht.dddd=ht.ddd,ht.Do=ht.dd=ht.d,ht.mm=ht.m,ht.hh=ht.H=ht.HH=ht.h,ht.MM=ht.M,ht.ss=ht.s,ht.A=ht.a,Nt.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"},Nt.format=(e,t,n)=>{const i=n||Nt.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=Nt.masks[t]||t||Nt.masks.default,t.replace(_h,s=>s in Zh?Zh[s](e,i):s.slice(1,s.length-1))},Nt.parse=(e,t,n)=>{const i=n||Nt.i18n;if(typeof t!="string")throw new Error("Invalid format in fecha.parse");if(t=Nt.masks[t]||t,e.length>1e3)return!1;let s=!0;const o={};if(t.replace(_h,d=>{if(ht[d]){const u=ht[d],m=e.search(u[0]);~m?e.replace(u[0],p=>(u[1](o,p,i),e=e.substr(m+p.length),p)):s=!1}return ht[d]?"":d.slice(1,d.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 f;return o.timezoneOffset!==null&&o.timezoneOffset!==void 0?(o.minute=+(o.minute||0)-+o.timezoneOffset,f=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))):f=new Date(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0),f};const Fc=" - ",si=(e,t)=>{const n=xn(new Date(e));return!n||isNaN(n.getTime())?"":vb(n,t||"yyyy-MM-dd")},Gc=(e,t)=>{if(Array.isArray(e)&&e.length===2){const n=e[0],i=e[1];if(n&&i)return si(n,t)+Fc+si(i,t)}else if(!Array.isArray(e)&&e instanceof Date)return si(e,t);return""},Zc=(e,t)=>{const n=Array.isArray(e)?e:e.split(Fc);if(n.length===2){const i=n[0],s=n[1];return[i instanceof Date?i:Nt.parse(i,t||"yyyy-MM-dd"),s instanceof Date?s:Nt.parse(s,t||"yyyy-MM-dd")]}return[]},Ja={default:{formatter(e){return e?`${e}`:""},parser(e){return e===void 0||e===""?null:e}},date:{formatter:(e,t)=>si(e,t),parser:(e,t)=>Nt.parse(e,t||"yyyy-MM-dd")},datetime:{formatter:(e,t)=>si(e,t),parser:(e,t)=>Nt.parse(e,t||"yyyy-MM-dd")},daterange:{formatter:Gc,parser:Zc},datetimerange:{formatter:Gc,parser:Zc},timerange:{formatter:Gc,parser:Zc},time:{formatter:(e,t)=>si(e,t),parser:(e,t)=>Nt.parse(e,t||"yyyy-MM-dd")},month:{formatter:(e,t)=>si(e,t),parser:(e,t)=>Nt.parse(e,t||"yyyy-MM-dd")},year:{formatter:(e,t)=>si(e,t),parser:(e,t)=>Nt.parse(e,t||"yyyy-MM-dd")},multiple:{formatter(e,t){return e.filter(Boolean).map(n=>si(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=""),Nt.parse(s,t||"yyyy-MM-dd")})}},number:{formatter(e){return e?`${e}`:""},parser(e){const t=Number(e);return isNaN(e)?null:t}}},Yc=()=>{const e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e},Yh=e=>e.every(t=>!t||typeof t=="string"&&t.trim()===""),ol=e=>e?[e.getHours(),e.getMinutes(),e.getSeconds()]:[0,0,0],Uh={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"},zi=(e,t,n,i)=>{const s=t.includes("range"),{parser:o}=Ja[t]||Ja.default,c=i||Uh[t],f=Ja.multiple.parser;let d=e;if(e&&t==="time"&&!(e instanceof Date))d=o(e,c);else if(n&&e)d=f(e,c);else if(s)if(!e)d=[null,null];else if(typeof e=="string")d=o(e,c);else if(t==="timerange")d=o(e,c).map(u=>u||"");else{const[u,m]=e;u instanceof Date&&m instanceof Date?d=e.map(p=>new Date(p)):typeof u=="string"&&typeof m=="string"?d=o(e.join(Fc),c):(!u||!m)&&(d=[null,null])}else typeof e=="string"&&t.indexOf("time")!==0&&(d=o(e,c)||null);return s||n?d||[]:[d]},Fn=(e,t,n,i)=>{const s=Uh[t];if(n){const{formatter:c}=Ja.multiple;return c(e,i||s)}const{formatter:o}=Ja[t]||Ja.default;return o(e,i||s)},$h=Symbol("date-picker"),Kh=Symbol("time-picker");function Xh(e,t){return e.$children.reduce((n,i)=>{i.$options.name===t&&n.push(i);const s=Xh(i,t);return n.concat(s)},[])}function gn(e,t=""){return["bk-picker-panel-icon-btn",`bk-date-picker-${e}-btn`,`bk-date-picker-${e}-btn-arrow${t}`]}const kb=(e,t)=>new Date(e,t+1,0).getDate(),qh=(e,t)=>{const n=new Date(e),i=n.getMonth()+t,s=kb(n.getFullYear(),i);return s<n.getDate()&&n.setDate(s),n.setMonth(i),n},e9=(()=>{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),f=c[1],d=[c[0],c[2]].map(u=>({label:u.replace(/\[[^\]]+\]/,p=>p.slice(1,-1).replace(t,C=>e[C](s,n))),type:u.indexOf("yy")!==-1?"year":"month"}));return{separator:f,labels:d}}})(),aa=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()},Tb=(e,t,n)=>{if(!t||!n)return!1;const[i,s]=[t,n].sort();return e>=i&&e<=s};function xb(e){return e.toString()[0].toUpperCase()+e.toString().slice(1)}const Sb=(e,...t)=>{const n=new Date(e.getTime());return n.setHours(t[0]),n.setMinutes(t[1]),n.setSeconds(t[2]),n},Db={tableDate:{type:Date,required:!0},disableDate: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 Uc=a.defineComponent({name:"DateTable",props:Db,emits:["pick","pick-click","changeRange"],setup(e,{emit:t}){const n=a.computed(()=>new sy.Generator({onlyDays:!0,weekStart:0})),i=a.computed(()=>{const u=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"];return u.splice(0,7-0).concat(u.splice(0,0))}),s=a.computed(()=>e.selectionMode==="range"&&e.rangeState.selecting?[e.rangeState.from]:e.modelValue),o=a.computed(()=>{const u=e.tableDate.getFullYear(),m=e.tableDate.getMonth(),p=aa(new Date),C=s.value.filter(Boolean).map(aa),[y,M]=s.value.map(aa),T=e.rangeState.from&&aa(e.rangeState.from),x=e.rangeState.to&&aa(e.rangeState.to),k=e.selectionMode==="range",v=typeof e.disableDate=="function"&&e.disableDate;return n.value(u,m,b=>{b.date instanceof Date&&b.date.setTime(b.date.getTime()+b.date.getTimezoneOffset()*6e4);const I=b.date&&aa(b.date),L=b.date&&m===b.date.getMonth();return Te(U({},b),{type:I===p?"today":b.type,selected:L&&C.includes(I),disabled:b.date&&v&&v(new Date(I)),range:L&&k&&Tb(I,T,x),start:L&&k&&I===y,end:L&&k&&I===M})}).cells.slice(0)});return{headerDays:i,cells:o,getCellCls:u=>["bk-date-picker-cells-cell",{["bk-date-picker-cells-cell-selected"]:u.selected||u.start||u.end,["bk-date-picker-cells-cell-disabled"]:u.disabled,["bk-date-picker-cells-cell-today"]:u.type==="today",["bk-date-picker-cells-cell-prev-month"]:u.type==="prevMonth",["bk-date-picker-cells-cell-next-month"]:u.type==="nextMonth",["bk-date-picker-cells-cell-week-label"]:u.type==="weekLabel",["bk-date-picker-cells-cell-range"]:u.range&&!u.start&&!u.end}],handleClick:u=>{if(u.disabled||u.type==="weekLabel")return;const m=new Date(aa(u.date));t("pick",m),t("pick-click")},handleMouseMove:u=>{if(!e.rangeState.selecting||u.disabled)return;const m=u.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 $c={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}},disableDate:Function,withValidate:{type:Boolean,default:!0}},Kc={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}},jb={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}},zb={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:()=>[]}},t9=["hours","minutes","seconds"];var Ob=a.defineComponent({name:"TimeSpinner",props:U(U({},zb),Kc),emits:["change","pick-click"],setup(e,{emit:t}){const n=a.reactive({spinerSteps:[1,1,1].map((N,E)=>Math.abs(e.steps[E])||N),compiled:!1,focusedColumn:-1,focusedTime:[0,0,0]}),i=a.computed(()=>{const N=[],E=n.spinerSteps[0],O=n.focusedColumn===0&&n.focusedTime[0],A={text:0,selected:!1,disabled:!1,hide:!1};for(let R=0;R<24;R+=E){const J=JSON.parse(JSON.stringify(A));J.text=R,J.focused=R===O,e.disabledHours.length&&e.disabledHours.indexOf(R)>-1&&(J.disabled=!0,e.hideDisabledOptions&&(J.hide=!0)),e.hours===R&&(J.selected=!0),N.push(J)}return N}),s=a.computed(()=>{const N=[],E=n.spinerSteps[1],O=n.focusedColumn===1&&n.focusedTime[1],A={text:0,selected:!1,disabled:!1,hide:!1};for(let R=0;R<60;R+=E){const J=JSON.parse(JSON.stringify(A));J.text=R,J.focused=R===O,e.disabledMinutes.length&&e.disabledMinutes.indexOf(R)>-1&&(J.disabled=!0,e.hideDisabledOptions&&(J.hide=!0)),e.minutes===R&&(J.selected=!0),N.push(J)}return N}),o=a.computed(()=>{const N=[],E=n.spinerSteps[2],O=n.focusedColumn===2&&n.focusedTime[2],A={text:0,selected:!1,disabled:!1,hide:!1};for(let R=0;R<60;R+=E){const J=JSON.parse(JSON.stringify(A));J.text=R,J.focused=R===O,e.disabledSeconds.length&&e.disabledSeconds.indexOf(R)>-1&&(J.disabled=!0,e.hideDisabledOptions&&(J.hide=!0)),e.seconds===R&&(J.selected=!0),N.push(J)}return N}),c=a.computed(()=>({width:e.showSeconds?"33.33%":"50%"}));a.watch(()=>e.hours,N=>{!n.compiled||T("hours",i.value.findIndex(E=>E.text===N))}),a.watch(()=>e.minutes,N=>{!n.compiled||T("minutes",s.value.findIndex(E=>E.text===N))}),a.watch(()=>e.seconds,N=>{!n.compiled||T("seconds",s.value.findIndex(E=>E.text===N))}),a.watch(()=>n.focusedTime,(N,E)=>{t9.forEach((O,A)=>{if(N[A]===E[A]||typeof N[A]=="undefined")return;const R=this[`${O}List`].findIndex(J=>J.text===N[A]);T(O,R)})}),a.onMounted(()=>{a.nextTick(()=>{n.compiled=!0,u()})});function f(N){let E;return N==="hours"?E=b:N==="minutes"?E=I:E=L,E.value}function d(N){return["bk-time-picker-cells-cell",{["bk-time-picker-cells-cell-selected"]:N.selected,["bk-time-picker-cells-cell-focused"]:N.focused,["bk-time-picker-cells-cell-disabled"]:N.disabled}]}function u(){const N=E=>{f(E).addEventListener("wheel",dt.exports.debounce(()=>{C(E)},32),{passive:!0})};N("hours"),N("minutes"),N("seconds")}function m(N){return f(N).querySelector("li").offsetHeight}function p(N){return f(N).offsetHeight}function C(N){const E=f(N),O=Math.min(Math.round((E.scrollTop-(p(N)*.5-10)/m(N)+3)/m(N)),N==="hours"?23:59);let A;if(N==="hours"?A=i:N==="minutes"?A=s:A=o,A.value.find(J=>J.text===O).disabled)return!1;a.nextTick(()=>{M({[N]:O})})}function y(N,E){if(E.disabled)return;const O={[N]:E.text};M(O)}function M(N){t("change",N),t("pick-click")}function T(N,E){const O=f(N),A=O.scrollTop,R=32*x(N,E);T4(O,A,R,500)}function x(N,E){const O=xb(N),A=e[`disabled${O}`];let R=E;if(A.length&&e.hideDisabledOptions){let J=0;A.forEach($=>$<=E?J+=1:""),R-=J}return R}function k(){a.nextTick(()=>{t9.forEach(N=>{const E=f(N);let O;N==="hours"?O=i:N==="minutes"?O=s:O=o,E.scrollTop=32*O.value.findIndex(A=>A.text===e[N])})})}function v(N){return N<10?`0${N}`:N}const b=a.ref(null),I=a.ref(null),L=a.ref(null);return Te(U({},a.toRefs(n)),{hoursList:i,minutesList:s,secondsList:o,styles:c,hoursRef:b,minutesRef:I,secondsRef:L,getCellCls:d,handleClick:y,updateScroll:k,padTime:v})},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 Eb={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 n9=a.defineComponent({name:"TimePickerPanel",props:U(U(U({},$c),Kc),Eb),emits:["pick","pick-click"],setup(e,{emit:t}){const n=a.reactive({date:e.value[0]||Yc(),showDate:!1}),i=a.inject(Kh),s=a.ref(null),o=a.computed(()=>!(e.format||"").match(/mm$/)),c=a.computed(()=>Nt.format(i.panelDate,e.format)),f=a.computed(()=>e.value[0]?["getHours","getMinutes","getSeconds"].map(p=>n.date[p]()):[]),d=a.computed(()=>{const p=["disabledHours","disabledMinutes","disabledSeconds"];if(e.disabledDate===(()=>!e.value[0]))return p.reduce((x,k)=>(x[k]=this[k],x),{});const C=[24,60,60],M=["Hours","Minutes","Seconds"].map(T=>e[`disabled${T}`]).map((T,x)=>{const k=C[x],v=T;for(let b=0;b<k;b+=e.steps[x]||1){const I=f.value.map((N,E)=>E===x?b:N),L=Sb(n.date,...I);e.disabledDate(L,!0)&&v.push(b)}return v.filter((b,I,L)=>L.indexOf(b)===I)});return p.reduce((T,x,k)=>(T[x]=M[k],T),{})});a.watch(()=>e.value,p=>{let C=p[0]||Yc();C=new Date(C),n.date=C}),a.onMounted(()=>{i&&i.parentName==="DatePanel"&&(n.showDate=!0)});function u(p,C=!0){const y=new Date(n.date);Object.keys(p).forEach(M=>y[`set${Oo(M)}`](p[M])),C&&t("pick",y,!0,"time")}function m(){t("pick-click")}return Te(U({},a.toRefs(n)),{visibleDate:c,showSeconds:o,timeSlots:f,disabledHMS:d,timeSpinnerRef:s,handlePickClick:m,handleChange:u})},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(Ob,{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 Pb={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},disableDate:Function,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}};var Ab=a.defineComponent({name:"DatePanel",props:Pb,emits:["pick","pick-success","pick-clear","pick-click","selection-mode-change"],setup(e,{slots:t,emit:n}){const i=_=>_.match(/^time/)?"time-picker":`${_}-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(Kh,{panelDate:o.panelDate,parentName:c.$options.name});const f=a.ref(null),d=a.ref(null),u=a.ref(null);a.watch(()=>o.currentView,_=>{console.error(11111,_),n("selection-mode-change",_),o.currentView==="time"&&a.nextTick(()=>{f.value.timeSpinnerRef.updateScroll()})}),a.watch(()=>e.selectionMode,_=>{o.currentView=_,o.pickerTable=i(_)});const m=()=>{setTimeout(()=>{o.currentView=e.selectionMode},500)},p=_=>{o.panelDate=_,o.pickerTable==="year-table"?o.pickerTable="month-table":o.pickerTable=i(o.currentView)},C=(_,le)=>{let se=_;e.selectionMode==="year"?se=new Date(_.getFullYear(),0,1):e.selectionMode==="month"?se=new Date(o.panelDate.getFullYear(),_.getMonth(),1):se=new Date(_),o.dates=[se],n("pick",se,!1,le||e.selectionMode)},y=()=>{m(),n("pick-success")},M=()=>{m(),n("pick-clear")},T=_=>{_.value&&n("pick",_.value(),!1,void 0,_),_.onClick&&_.onClick(this),e.shortcutClose&&y()},x=()=>{o.currentView=e.selectionMode,o.pickerTable=i(o.currentView)},k=_=>{e.selectionMode==="year"||o.pickerTable==="year-table"?o.panelDate=new Date(o.panelDate.getFullYear()+_*10,0,1):o.panelDate=qh(o.panelDate,_*12)},v=_=>{o.panelDate=qh(o.panelDate,_)},b=_=>{var le,se;_&&((le=d==null?void 0:d.value)==null||le.updateScroll(),(se=u==null?void 0:u.value)==null||se.updateScroll())},I=a.computed(()=>o.pickerTable===`${o.currentView}-table`?C:p),L=a.computed(()=>{const _="zh-CN",le="[yyyy]-[mm]",se=o.panelDate,{labels:ne,separator:fe}=e9(_,le,se),ee=ae=>()=>{o.pickerTable=i(ae)};return{separator:fe,labels:ne.map(ae=>{const Y=ae;return Y.handler=ee(ae.type),Y})}}),N=a.computed(()=>L.value.labels[0].type==="year"||o.currentView==="date"),E=a.computed(()=>L.value.labels[1].type==="year"||o.currentView==="date"),O=a.computed(()=>o.currentView==="time"),A=()=>{o.currentView=o.currentView==="time"?"date":"time"},R=a.computed(()=>!!t.shortcuts),J=a.computed(()=>!o.dates[0]);function $(){n("pick-click")}return Te(U({},a.toRefs(o)),{panelPickerHandlers:I,datePanelLabel:L,showLabelFirst:N,showLabelSecond:E,handleShortcutClick:T,changeYear:k,changeMonth:v,reset:x,isTime:O,hasShortcuts:R,timeDisabled:J,onToggleVisibility:b,handleToggleTime:A,handlePickSuccess:y,handlePickClear:M,handlePick:C,handlePickClick:$,timePickerRef:f})},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:gn("prev","-double"),onClick:()=>this.changeYear(-1)},[a.createVNode(yr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:gn("prev"),onClick:()=>this.changeMonth(-1)},[a.createVNode(Mi,{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:gn("next","-double"),onClick:()=>this.changeYear(1)},[a.createVNode(br,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:gn("next"),onClick:()=>this.changeMonth(1)},[a.createVNode(Ln,{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(Uc,{tableDate:this.panelDate,disableDate:this.disableDate,selectionMode:this.selectionMode,modelValue:this.dates,focusedDate:this.focusedDate,onPick:this.panelPickerHandlers},null);default:return null}})():a.createVNode(n9,{ref:"timePickerRef",value:this.dates,format:this.format,disabledDate:this.disabledDate,onPick:this.handlePick,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess},null)]),this.confirm?a.createVNode(ey,{clearable:this.clearable,showTime:this.showTime,isTime:this.isTime,"onPick-toggle-time":this.handleToggleTime,"onPick-clear":this.handlePickClear,"onPick-success":this.handlePickSuccess},null):""]),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 Vb={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},disableDate:Function,focusedDate:{type:Date,required:!0},confirm:{type:Boolean,default:!1}};var Jb=a.defineComponent({name:"DateRangePanel",props:Vb,emits:["pick","pick-success"],setup(e,{slots:t,emit:n}){const[i,s]=e.modelValue.map(D=>D||Yc()),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}),f=(D,V)=>!D||!V?0:D.getTime()-V.getTime(),d=()=>{c.currentView=e.selectionMode,c.leftPickerTable=`${c.currentView}-table`,c.rightPickerTable=`${c.currentView}-table`},u=a.ref(null),m=a.ref(null),p=D=>{var V,W;D&&((V=u==null?void 0:u.value)==null||V.updateScroll(),(W=m==null?void 0:m.value)==null||W.updateScroll())},C=(D,V,W,ie=!0)=>{const re=new Date(c[`${D}PanelDate`]);if(re[`set${V}`](re[`get${V}`]()+W),c[`${D}PanelDate`]=re,!!ie)if(e.splitPanels){const pe=D==="left"?"right":"left";D==="left"&&c.leftPanelDate>=c.rightPanelDate&&C(pe,V,1),D==="right"&&c.rightPanelDate<=c.leftPanelDate&&C(pe,V,-1)}else{const pe=D==="left"?"right":"left",Ne=c[`${pe}PanelDate`],te=new Date(Ne);if(V==="Month"){const K=new Date(te.getFullYear(),te.getMonth()+W+1,0).getDate();te.setDate(Math.min(K,te.getDate()))}te[`set${V}`](te[`get${V}`]()+W),c[`${pe}PanelDate`]=te}},y=D=>{const V=c.currentView==="year"?-10:-1;C(D,"FullYear",V)},M=D=>{const V=c.currentView==="year"?10:1;C(D,"FullYear",V)},T=D=>{C(D,"Month",-1)},x=D=>{C(D,"Month",1)},k=D=>{c[`${D}PickerTable`]="year-table"},v=D=>{c[`${D}PickerTable`]="month-table"},b=D=>{const V="zh-CN",W="[yyyy]-[mm]",ie=c[`${D}PanelDate`],{labels:re,separator:pe}=e9(V,W,ie),Ne=te=>{const K=te==="month"?v:k;return()=>K(D)};return{separator:pe,labels:re.map(te=>{const K=te;return K.handler=Ne(te.type),K})}},I=(D,V)=>{n("pick",c.dates,D,V||e.type)},L=(D,V)=>{if(console.warn("handleRangePick"),c.rangeState.selecting||c.currentView==="time"){if(c.currentView==="time")c.dates=D;else{const[W,ie]=[c.rangeState.from,D].sort(f),re=V==="upToNow"?new Date:new Date(new Date(new Date(ie.setHours(23)).setMinutes(59)).setSeconds(59));c.dates=[W,re],c.rangeState={from:W,to:re,selecting:!1}}I(!1,V||"date")}else c.upToNowEnable=new Date(D).getTime()<new Date().getTime(),c.rangeState={from:D,to:null,selecting:!0}},N=(D,V)=>{if(c[`${D}PanelDate`]=V,c[`${D}PickerTable`]==="year-table"?c[`${D}PickerTable`]="month-table":c[`${D}PickerTable`]=`${c.currentView}-table`,!e.splitPanels){const ie=D==="left"?"right":"left";c[`${ie}PanelDate`]=V,C(ie,"Month",ie==="left"?-1:1,!1)}},E=(D,V)=>{if(!(D!=null&&D.value))return!1;D.onClick&&D.onClick(D,V);const W=typeof D.value=="function"?D.value():D.value,[ie,re]=W;c.rangeState.from=ie,c.rangeState.to=re,c.dates=[ie,re],n("pick",W,!1,"shortcut",D),e.shortcutClose&&n("pick-success")},O=D=>{c.rangeState.to=D};a.watch(()=>e.selectionMode,D=>{c.currentView=D||"range"});const A=a.computed(()=>c.currentView==="time"),R=a.computed(()=>b("left")),J=a.computed(()=>b("right")),$=a.computed(()=>c.leftPickerTable.split("-").shift()),_=a.computed(()=>c.rightPickerTable.split("-").shift()),le=a.computed(()=>R.value.labels[0].type==="year"||c.currentView==="date"),se=a.computed(()=>R.value.labels[1].type==="year"||c.currentView==="date"),ne=a.computed(()=>J.value.labels[0].type==="year"||c.currentView==="date"),fe=a.computed(()=>J.value.labels[1].type==="year"||c.currentView==="date"),ee=a.computed(()=>{const D=`${c.currentView}-table`;return{left:c.leftPickerTable!==D,right:c.rightPickerTable!==D}}),ae=a.computed(()=>({left:ee.value.left?N.bind("left"):L,right:ee.value.right?N.bind("right"):L})),Y=a.computed(()=>{var D;return t.shortcuts||((D=e.shortcuts)==null?void 0:D.length)});return Te(U({},a.toRefs(c)),{isTime:A,hasShortcuts:Y,prevYear:y,nextYear:M,prevMonth:T,nextMonth:x,leftDatePanelLabel:R,rightDatePanelLabel:J,leftDatePanelView:$,rightDatePanelView:_,leftShowLabelFirst:le,leftShowLabelSecond:se,rightShowLabelFirst:ne,rightShowLabelSecond:fe,preSelecting:ee,panelPickerHandlers:ae,handleShortcutClick:E,reset:d,onToggleVisibility:p,handleRangePick:L,handleChangeRange:O})},render(){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:e=>{e.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:gn("prev","-double"),onClick:()=>this.prevYear("left")},[a.createVNode(yr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:gn("prev"),onClick:()=>this.prevMonth("left")},[a.createVNode(Mi,{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:gn("next","-double"),onClick:()=>this.nextYear("left")},[a.createVNode(br,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels||this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:gn("next"),onClick:()=>this.nextMonth("left")},[a.createVNode(Ln,{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(Uc,{selectionMode:"range",tableDate:this.leftPanelDate,disableDate:this.disableDate,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:gn("prev","-double"),onClick:()=>this.prevYear("right")},[a.createVNode(yr,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels&&this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:gn("prev","-double"),onClick:()=>this.prevMonth("right")},[a.createVNode(Mi,{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:gn("next","-double"),onClick:()=>this.nextYear("right")},[a.createVNode(br,{style:{fontSize:"20px",lineHeight:1}},null)]),this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:gn("next"),onClick:()=>this.nextMonth("right")},[a.createVNode(Ln,{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(Uc,{selectionMode:"range",tableDate:this.rightPanelDate,disableDate:this.disableDate,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.hasShortcuts?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[this.$slots.shortcuts?typeof this.$slots.shortcuts=="function"?this.$slots.shortcuts():this.$slots.shortcuts:this.shortcuts.length?a.createVNode("div",{class:"bk-picker-panel-shortcuts"},[this.shortcuts.map((e,t)=>a.createVNode("div",{key:t,class:"shortcuts-item",onClick:()=>this.handleShortcutClick(e,t)},[e.text]))]):""]):null])}}),Qb=a.defineComponent({name:"DatePicker",directives:{clickoutside:kn},props:$c,emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=Jn(),s=e.type.includes("range"),o=s?[null,null]:[null],c=s?e.value||e.modelValue:[e.value||e.modelValue];let f=Yh(c)?o:zi(e.value||e.modelValue,e.type,e.multiple,e.format),d=null;e.shortcutSelectedIndex!==-1&&(d=e.shortcuts[e.shortcutSelectedIndex]||null,d&&(f=d.value()));const u=a.reactive({showClose:!1,visible:!1,internalValue:f,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:f[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:f.map(ol),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:d,onSelectionModeChange:m});function m(te){let K=te;return te.match(/^date/)&&(K="date"),u.selectionMode=["year","month","date","time"].indexOf(K)>-1&&K,u.selectionMode}const p=a.computed(()=>{if(e.multiple)return u.internalValue.slice();const te=e.type.includes("range");let K=u.internalValue.map(G=>G instanceof Date?new Date(G):G||"");return e.type.match(/^time/)&&(K=K.map(G=>Fn(G,e.type,e.multiple,e.format))),te||e.multiple?K:K[0]}),C=a.computed(()=>e.type.match(/^time/)?p.value:e.multiple?Fn(p.value,e.type,e.multiple,e.format):Array.isArray(p.value)?p.value.map(te=>Fn(te,e.type,e.multiple,e.format)):Fn(p.value,e.type,e.multiple,e.format)),y=a.computed(()=>e.type==="daterange"||e.type==="datetimerange"?"DateRangePanel":"DatePanel"),M=a.computed(()=>e.open===null?u.visible:e.open),T=a.computed(()=>Fn(u.internalValue,e.type,e.multiple,e.format)),x=a.computed(()=>{var te;return((te=u.shortcut)==null?void 0:te.text)&&e.useShortcutText?u.shortcut.text:T.value}),k=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),v=a.computed(()=>!!t.header),b=a.computed(()=>!!t.footer),I=a.computed(()=>!!t.shortcuts),L=a.computed(()=>{let te="";return e.fontSize==="medium"?te="medium-font":e.fontSize==="large"&&(te="large-font"),te}),N=a.computed(()=>{let te="";return e.fontSize==="medium"?te="medium-width":e.fontSize==="large"&&(te="large-width"),te}),E=a.computed(()=>{var te;return((te=u.shortcut)==null?void 0:te.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),O=a.computed(()=>e.options),A=a.computed(()=>y.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),R=a.ref(null),J=()=>{var te;(te=R==null?void 0:R.value)==null||te.focus()};a.watch(()=>u.visible,te=>{var K,G;te===!1&&((K=$.value)==null||K.destoryDropdown()),(G=$.value)==null||G.updateDropdown(),n("open-change",te)});const $=a.ref(null);a.watch(()=>e.modelValue,te=>{var K;u.internalValue=zi(te,e.type,e.multiple,e.format),e.withValidate&&((K=i==null?void 0:i.validate)==null||K.call(i,"change"))}),a.watch(()=>e.open,te=>{u.visible=te===!0}),a.watch(()=>e.type,te=>{m(te)}),a.watch(()=>p,(te,K)=>{const G=JSON.stringify(te),ce=JSON.stringify(K);(G!==ce||typeof te!=typeof K)&&n("input",te)}),a.onMounted(()=>{e.type.indexOf("date")>-1,u.timeEnterMode=!0;const te=e.modelValue,K=p.value;(typeof te!=typeof K||JSON.stringify(te)!==JSON.stringify(K))&&n("input",p.value),e.open!==null&&(u.visible=e.open),a.provide($h,{props:e,focus:()=>J()})});const _=a.ref(null),le=te=>{var K;if(u.disableCloseUnderTransfer)return u.disableCloseUnderTransfer=!1,!1;if(te&&te.type==="mousedown"&&u.visible){te.preventDefault(),te.stopPropagation();return}if(u.visible){const G=(K=_==null?void 0:_.value)==null?void 0:K.$el;if(te&&G&&G.contains(te.target))return;u.visible=!1,te==null||te.preventDefault(),te==null||te.stopPropagation();return}u.isFocused=!1,u.disableClickOutSide=!1},se=()=>{var te,K;(te=R==null?void 0:R.value)==null||te.focus(),(K=R==null?void 0:R.value)==null||K.click()},ne=()=>{e.readonly||e.disabled||T!=null&&T.value&&(u.showClose=!0)},fe=te=>{u.showClose=!1},ee=te=>{a.nextTick(()=>{var K;n("change",C.value,te),n("update:modelValue",p.value),e.type.indexOf("time")<0&&((K=R==null?void 0:R.value)==null||K.blur())})},ae=te=>{var de;const K=e.type.includes("range")||e.multiple,G=T.value,ce=te.target.value,we=zi(ce,e.type,e.multiple,e.format),z=K?we:we[0],B=(de=e.disableDate)==null?void 0:de.call(e,z),Q=we.reduce((Ce,F)=>Ce&&F instanceof Date,!0);ce!==G&&!B&&Q?(ee(e.type),u.internalValue=we):u.forceInputRerender=u.forceInputRerender+1},Y=te=>{e.readonly||(u.isFocused=!0,!(te&&te.type==="focus")&&(e.disabled||(u.visible=!0)))},D=()=>{var te;(te=_==null?void 0:_.value)==null||te.reset()},V=te=>{var K,G;if(u.internalFocus){u.internalFocus=!1;return}if(u.visible){te.preventDefault();return}u.isFocused=!1,m(e.type),u.internalValue=u.internalValue.slice(),D(),(K=_==null?void 0:_.value)==null||K.onToggleVisibility(!1),(G=i==null?void 0:i.validate)==null||G.call(i,"blur")},W=te=>{const{keyCode:K}=te;if(K===9&&u.visible)if(te.stopPropagation(),te.preventDefault(),k.value){const ce=".bk-picker-confirm > *",we=$.value.$el.querySelectorAll(ce);u.internalFocus=!0,[...we][te.shiftKey?"pop":"shift"]().focus()}else le();const G=[37,38,39,40];if(!u.visible&&G.includes(K)){u.visible=!0;return}K===27&&u.visible&&(te.stopPropagation(),le()),!!G.includes(K)&&u.focusedTime.active&&te.preventDefault()},ie=()=>{u.visible=!1,u.internalValue=u.internalValue.map(()=>null),n("clear"),ee(e.type),D(),u.showClose=!1,u.shortcut=null,setTimeout(()=>m(e.type),500)},re=()=>{var te;u.visible=!1,a.nextTick(()=>{n("pick-success")}),(te=R==null?void 0:R.value)==null||te.blur(),D()},pe=(te,K=!1,G,ce)=>{let we=te;if(e.multiple){const B=we.getTime(),Q=u.internalValue.findIndex(F=>F&&F.getTime()===B),Ce=[...u.internalValue,we].filter(Boolean).map(F=>F.getTime()).filter((F,oe,he)=>he.indexOf(F)===oe&&oe!==Q);u.internalValue=Ce.map(F=>new Date(F))}else we=zi(te,e.type,e.multiple,e.format),u.internalValue=Array.isArray(we)?we:[we];if(u.internalValue[0]){const[B]=u.internalValue;u.focusedDate=B}u.focusedTime=Te(U({},u.focusedTime),{time:u.internalValue.map(ol)}),k.value||(m(e.type),u.visible=K),G==="upToNow"&&e.type==="daterange"&&re(),u.shortcut=ce,ee(G);const z=e.shortcuts.findIndex(B=>B===u.shortcut);n("shortcut-change",u.shortcut,z)},Ne=a.ref(null);return Te(U({},a.toRefs(u)),{panel:y,publicStringValue:C,opened:M,visualValue:T,displayValue:x,isConfirm:k,hasHeader:v,hasFooter:b,hasShortcuts:I,fontSizeCls:L,longWidthCls:N,localReadonly:E,allowCrossDayProp:A,ownPickerProps:O,pickerDropdownRef:$,inputRef:R,triggerRef:Ne,pickerPanelRef:_,handleClose:le,handleIconClick:se,handleInputMouseenter:ne,handleInputMouseleave:fe,handleFocus:Y,handleBlur:V,handleKeydown:W,handleInputChange:ae,handleClear:ie,onPick:pe,onPickSuccess:re})},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(Gt,{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,{change:this.onPick}))||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(Hc,{class:[this.appendToBody?"bk-date-picker-transfer":""],ref:"pickerDropdownRef",triggerRef:this.triggerRef,placement:this.placement,extPopoverCls:this.extPopoverCls,appendToBody:this.appendToBody},{default:()=>{var o,c,f,d,u,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(f=(c=(o=this.$slots).header)==null?void 0:c.call(o))!=null?f:null]):null,this.panel==="DateRangePanel"?a.createVNode(Jb,{ref:"pickerPanelRef",type:this.type,confirm:this.isConfirm,shortcuts:this.shortcuts,shortcutClose:this.shortcutClose,modelValue:this.internalValue,selectionMode:this.selectionMode,startDate:this.startDate,disableDate:this.disableDate,focusedDate:this.focusedDate,onPick:this.onPick,"onPick-success":this.onPickSuccess,"onSelection-mode-change":this.onSelectionModeChange},t):a.createVNode(Ab,{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,disableDate:this.disableDate,focusedDate:this.focusedDate,onPick:this.onPick,"onPick-clear":this.handleClear,"onPick-success":this.onPickSuccess,"onSelection-mode-change":this.onSelectionModeChange},t),this.hasFooter?a.createVNode("div",{class:["bk-date-picker-footer-wrapper",this.footerSlotCls]},[(m=(u=(d=this.$slots).footer)==null?void 0:u.call(d))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}}),Rb=a.defineComponent({name:"TimePicker",directives:{clickoutside:kn},props:U(U(U({},$c),jb),Kc),emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=Jn(),s=e.type.includes("range"),o=s?[null,null]:[null];let c=Yh((s?e.modelValue:[e.modelValue])||[])?o:zi(e.modelValue,e.type,e.multiple,e.format),f=null;e.shortcutSelectedIndex!==-1&&(f=e.shortcuts[e.shortcutSelectedIndex]||null,f&&(c=f.value()));const d=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(ol),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:f,onSelectionModeChange:u});function u(K){let G=K;return K.match(/^date/)&&(G="date"),d.selectionMode=["year","month","date","time"].indexOf(G)>-1&&G,d.selectionMode}const m=a.computed(()=>{if(e.multiple)return d.internalValue.slice();const K=e.type.includes("range");let G=d.internalValue.map(ce=>ce instanceof Date?new Date(ce):ce||"");return e.type.match(/^time/)&&(G=G.map(ce=>Fn(ce,e.type,e.multiple,e.format))),K||e.multiple?G:G[0]}),p=a.computed(()=>e.type.match(/^time/)?m.value:e.multiple?Fn(m.value,e.type,e.multiple,e.format):Array.isArray(m.value)?m.value.map(K=>Fn(K,e.type,e.multiple,e.format)):Fn(m.value,e.type,e.multiple,e.format)),C=a.computed(()=>e.type==="timerange"?"RangeTimePickerPanel":"TimePickerPanel"),y=a.computed(()=>e.open===null?d.visible:e.open),M=a.computed(()=>Fn(d.internalValue,e.type,e.multiple,e.format)),T=a.computed(()=>{var K;return((K=d.shortcut)==null?void 0:K.text)&&e.useShortcutText?d.shortcut.text:M.value}),x=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),k=a.computed(()=>!!t.header),v=a.computed(()=>!!t.footer),b=a.computed(()=>!!t.shortcuts),I=a.computed(()=>{let K="";return e.fontSize==="medium"?K="medium-font":e.fontSize==="large"&&(K="large-font"),K}),L=a.computed(()=>{let K="";return e.fontSize==="medium"?K="medium-width":e.fontSize==="large"&&(K="large-width"),K}),N=a.computed(()=>{var K;return((K=d.shortcut)==null?void 0:K.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),E=a.computed(()=>({disabledHours:e.disabledHours,disabledMinutes:e.disabledMinutes,disabledSeconds:e.disabledSeconds,hideDisabledOptions:e.hideDisabledOptions})),O=a.computed(()=>C.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),A=a.ref(null),R=()=>{var K;(K=A==null?void 0:A.value)==null||K.focus()},{proxy:J}=a.getCurrentInstance();a.watch(()=>d.visible,K=>{K&&a.nextTick(()=>{Xh(J,"TimeSpinner").forEach(ce=>ce.updateScroll())})});const $=a.ref(null);a.watch(()=>e.modelValue,K=>{var G;d.internalValue=zi(K,e.type,e.multiple,e.format),e.withValidate&&((G=i==null?void 0:i.validate)==null||G.call(i,"change"))}),a.watch(()=>e.open,K=>{d.visible=K===!0}),a.watch(()=>e.type,K=>{u(K)}),a.watch(()=>m,(K,G)=>{const ce=JSON.stringify(K),we=JSON.stringify(G);(ce!==we||typeof K!=typeof G)&&n("input",K)}),a.onMounted(()=>{e.type.indexOf("date")>-1,d.timeEnterMode=!0;const K=e.modelValue,G=m.value;(typeof K!=typeof G||JSON.stringify(K)!==JSON.stringify(G))&&n("input",m.value),e.open!==null&&(d.visible=e.open),a.provide($h,{props:e,focus:()=>R()})});const _=a.ref(null),le=K=>{var G;if(d.disableCloseUnderTransfer)return d.disableCloseUnderTransfer=!1,!1;if(K&&K.type==="mousedown"&&d.visible){K.preventDefault(),K.stopPropagation();return}if(d.visible){const ce=(G=_==null?void 0:_.value)==null?void 0:G.$el;if(K&&ce&&ce.contains(K.target))return;d.visible=!1,K==null||K.preventDefault(),K==null||K.stopPropagation();return}d.isFocused=!1,d.disableClickOutSide=!1},se=()=>{var K,G;(K=A==null?void 0:A.value)==null||K.focus(),(G=A==null?void 0:A.value)==null||G.click()},ne=()=>{e.readonly||e.disabled||M!=null&&M.value&&(d.showClose=!0)},fe=K=>{d.showClose=!1},ee=K=>{a.nextTick(()=>{var G;n("change",p.value,K),n("update:modelValue",m.value),e.type.indexOf("time")<0&&((G=A==null?void 0:A.value)==null||G.blur())})},ae=K=>{var Ce;const G=e.type.includes("range")||e.multiple,ce=M.value,we=K.target.value,z=zi(we,e.type,e.multiple,e.format),B=G?z:z[0],Q=(Ce=e.disableDate)==null?void 0:Ce.call(e,B),de=z.reduce((F,oe)=>F&&oe instanceof Date,!0);we!==ce&&!Q&&de?(ee(e.type),d.internalValue=z):d.forceInputRerender=d.forceInputRerender+1},Y=K=>{e.readonly||(d.isFocused=!0,!(K&&K.type==="focus")&&(e.disabled||(d.visible=!0)))},D=()=>{var K;(K=_==null?void 0:_.value)==null||K.reset()},V=K=>{var G,ce;if(d.internalFocus){d.internalFocus=!1;return}if(d.visible){K.preventDefault();return}d.isFocused=!1,u(e.type),d.internalValue=d.internalValue.slice(),D(),(G=_==null?void 0:_.value)==null||G.onToggleVisibility(!1),(ce=i==null?void 0:i.validate)==null||ce.call(i,"blur")},W=K=>{const{keyCode:G}=K;if(G===9&&d.visible)if(K.stopPropagation(),K.preventDefault(),x.value){const we=".bk-picker-confirm > *",z=$.value.$el.querySelectorAll(we);d.internalFocus=!0,[...z][K.shiftKey?"pop":"shift"]().focus()}else le();const ce=[37,38,39,40];if(!d.visible&&ce.includes(G)){d.visible=!0;return}G===27&&d.visible&&(K.stopPropagation(),le()),!!ce.includes(G)&&d.focusedTime.active&&K.preventDefault()},ie=()=>{d.visible=!1,d.internalValue=d.internalValue.map(()=>null),n("clear"),ee(e.type),D(),d.showClose=!1,d.shortcut=null,setTimeout(()=>u(e.type),500)},re=()=>{e.appendToBody&&(d.disableCloseUnderTransfer=!0)},pe=()=>{var K;d.visible=!1,a.nextTick(()=>{n("pick-success")}),(K=A==null?void 0:A.value)==null||K.blur(),D()},Ne=(K,G=!1,ce,we)=>{let z=K;if(e.multiple){const Q=z.getTime(),de=d.internalValue.findIndex(oe=>oe&&oe.getTime()===Q),F=[...d.internalValue,z].filter(Boolean).map(oe=>oe.getTime()).filter((oe,he,Me)=>Me.indexOf(oe)===he&&he!==de);d.internalValue=F.map(oe=>new Date(oe))}else z=zi(K,e.type,e.multiple,e.format),d.internalValue=Array.isArray(z)?z:[z];if(d.internalValue[0]){const[Q]=d.internalValue;d.focusedDate=Q}d.focusedTime=Te(U({},d.focusedTime),{time:d.internalValue.map(ol)}),x.value||(u(e.type),d.visible=G),ce==="upToNow"&&e.type==="daterange"&&pe(),d.shortcut=we,ee(ce);const B=e.shortcuts.findIndex(Q=>Q===d.shortcut);n("shortcut-change",d.shortcut,B)},te=a.ref(null);return console.error(C),console.error(C.value),Te(U({},a.toRefs(d)),{panel:C,publicStringValue:p,opened:y,visualValue:M,displayValue:T,isConfirm:x,hasHeader:k,hasFooter:v,hasShortcuts:b,fontSizeCls:I,longWidthCls:L,localReadonly:N,allowCrossDayProp:O,ownPickerProps:E,pickerDropdownRef:$,inputRef:A,triggerRef:te,pickerPanelRef:_,handleClose:le,handleIconClick:se,handleInputMouseenter:ne,handleInputMouseleave:fe,handleFocus:Y,handleBlur:V,handleKeydown:W,handleInputChange:ae,handleClear:ie,handleTransferClick:re,onPick:Ne,onPickSuccess:pe})},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(Gt,{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(Hc,{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,f,d,u,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(f=(c=(o=this.$slots).header)==null?void 0:c.call(o))!=null?f:null]):null,a.createVNode(n9,{ref:"pickerPanelRef",clearable:this.clearable,confirm:this.isConfirm,shortcuts:this.shortcuts,multiple:this.multiple,shortcutClose:this.shortcutClose,value:this.internalValue,startDate:this.startDate,disableDate:this.disableDate,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=(u=(d=this.$slots).footer)==null?void 0:u.call(d))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}});const i9=He(Qb);var Gn=(e=>(e.OBJECT_ARRAY="objectArray",e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e))(Gn||{});const _b={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 Wb(e,t,n){const i=a.ref([]),s=a.ref([]),o=()=>{e.value.forEach(c=>{const f=c[n.value];t.value.includes(f)?s.value.push(c):i.value.push(c)})};return o(),a.watch(()=>[e,t,n],o),{selectList:i,selectedList:s}}function Hb(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 Bb=a.defineComponent({name:"Transfer",props:_b,emits:["change","update:targetList"],setup(e,{emit:t}){const n=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(b=>b.toString().includes("[object Object]"))?Gn.OBJECT_ARRAY:Gn.BASE_ARRAY:Gn.NOT_ARRAY),i=a.computed(()=>n.value===Gn.BASE_ARRAY?"value":e.settingKey),s=a.computed(()=>n.value===Gn.BASE_ARRAY?"value":e.displayKey),o=a.computed(()=>e.sortKey||s.value),c=a.computed(()=>{switch(n.value){case Gn.BASE_ARRAY:return[...new Set(e.sourceList)].map(v=>({value:v}));case Gn.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:f}=a.toRefs(e),{selectList:d,selectedList:u}=Wb(c,f,i),{selectSearchQuery:m,selectListSearch:p}=Hb(d,s),C=a.computed(()=>[...p.value].sort((v,b)=>{const I=v[o.value],L=b[o.value];return I>L?1:-1})),y=a.computed(()=>[...u.value].sort((v,b)=>{const I=v[o.value],L=b[o.value];return I>L?1:-1})),M=()=>{d.value=[],u.value=[...c.value],k()},T=()=>{d.value=[...c.value],u.value=[],k()},x=(v,b)=>{const I=b?d:u,L=b?u:d,N=I.value.findIndex(E=>E[i.value]===v);L.value.push(...I.value.splice(N,1)),k()},k=()=>{const v=d.value.map(I=>I[i.value]),b=u.value.map(I=>I[i.value]);t("update:targetList",b),t("change",n.value===Gn.BASE_ARRAY?v:d.value.map(I=>a.toRaw(I)),n.value===Gn.BASE_ARRAY?b:u.value.map(I=>a.toRaw(I)),b)};return{selectSearchQuery:m,selectListSearch:p,selectedList:u,selectListSort:C,selectedListSort:y,settingCode:i,displayCode:s,allToRight:M,allToLeft:T,handleItemClick:x}},render(){const e=this.sortable?this.selectListSort:this.selectListSearch,t=this.sortable?this.selectedListSort:this.selectedList,n=c=>{var p,C;const f=c==="left-header",d=f?`${(p=this.title[0])!=null?p:"\u5DE6\u4FA7\u5217\u8868"}`:`${(C=this.title[1])!=null?C:"\u53F3\u4FA7\u5217\u8868"}`,u=f?!e.length:!t.length,m=()=>{u||(f?this.allToRight():this.allToLeft())};return this.$slots[c]?a.createVNode("div",{class:"slot-header"},[this.$slots[c]()]):a.createVNode("div",{class:"header"},[`${d}\uFF08\u5171${f?e.length:t.length}\u6761\uFF09`,a.createVNode("span",{class:{disabled:u},onClick:()=>m()},[f?"\u5168\u90E8\u6DFB\u52A0":"\u6E05\u7A7A"])])},i=c=>{var u;const f=c==="left-empty-content",d=(u=f?this.emptyContent[0]:this.emptyContent[1])!=null?u:f?"\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"},[d])},s=(c,f=!0)=>a.createVNode("div",{class:"item-content"},[a.createVNode("span",{class:"content-text",title:c[this.displayCode]},[c[this.displayCode]]),a.createVNode("span",{class:"icon-wrapper"},[f?a.createVNode(Ro,{class:"bk-icon"},null):a.createVNode(Qn,{class:"bk-icon"},null)])]),o=c=>{const f=c==="left",d=f?e:t,u=f?"source-option":"target-option",m=f?"left-empty-content":"right-empty-content";return d.length?a.createVNode("ul",{class:["content",this.searchable&&f?"is-search":""]},[d.map(p=>{var C,y,M;return a.createVNode("li",{key:p[this.settingCode],class:[this.$slots[u]?"custom-item":""],onClick:()=>this.handleItemClick(p[this.settingCode],f)},[(M=(y=(C=this.$slots)[u])==null?void 0:y.call(C,p))!=null?M:s(p,f)])})]):i(m)};return a.createVNode("div",{class:["bk-transfer",this.extCls]},[a.createVNode("div",{class:"source-list"},[n("left-header"),this.searchable&&a.createVNode(Ki,{modelValue:this.selectSearchQuery,"onUpdate:modelValue":c=>this.selectSearchQuery=c,class:"transfer-search-input",clearable:!0,placeholder:this.searchPlaceholder||"\u8BF7\u8F93\u5165\u641C\u7D22\u5173\u952E\u5B57",type:"search","left-icon":"bk-icon icon-search"},null),o("left")]),a.createVNode("div",{class:"transfer"},null),a.createVNode("div",{class:"target-list"},[n("right-header"),o("right")])])}});const a9=He(Bb);var Vr=(e=>(e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_EXPAND="nodeExpand",e.NODE_CHECKED="nodeChecked",e))(Vr||{});const cl=(...e)=>!0,Fb={nodeClick:cl,nodeCollapse:cl,nodeExpand:cl,nodeChecked:cl};var ge=(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))(ge||{});const Oi={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"},Gb={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:g.commonType(["once","every"],"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([g.commonType(["fuzzy","full"],"TreeSearchMatchType"),g.func]),resultType:g.commonType(["tree","list"],"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),dragSort:g.bool.def(!1),selectable:g.bool.def(!0),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)};var Zb=(e,{slots:t})=>({renderEmpty:n=>a.createVNode(Js,{scene:"part",type:n},{default:()=>{var i,s;return[(s=(i=t.default)==null?void 0:i.call(t))!=null?s:e.emptyText]}})}),ul=(e,t)=>{const n=J=>e.schema.get(J),i=(J,$)=>{var _;return(_=n(J[ge.UUID]))==null?void 0:_[$]},s=(J,$,_)=>{e.schema.set(J[ge.UUID],Te(U({},n(J[ge.UUID])),{[$]:_}))},o=J=>i(J,ge.PATH),c=J=>i(J,ge.UUID),f=J=>i(J,ge.IS_ROOT),d=J=>i(J,ge.IS_OPEN),u=J=>i(J,ge.HAS_CHILD),m=J=>i(J,ge.IS_MATCH),p=J=>i(J,ge.IS_CHECKED),C=J=>i(J,ge.PARENT_ID),y=J=>i({[ge.UUID]:J},ge.PARENT_ID),M=J=>i(J,ge.IS_LOADING),T=(J,$)=>{s(J,ge.IS_LOADING,$)},x=J=>e.schema.delete(J),k=J=>n(C(J)),v=J=>{var $;return typeof J=="object"?d(J):typeof J=="string"?($=n(J))==null?void 0:$[ge.IS_OPEN]:!1},b=J=>v(i(J,ge.PARENT_ID)),I=J=>f(J)||b(J),L=J=>J.split("-").reduce((_,le)=>{const se=Number(le);return Array.isArray(_)?_[se]:_[t.children][se]},t.data),N=J=>{const $=e.schema;return Array.prototype.filter.call(Array.from($.keys()),_=>$.get(_)[ge.PARENT_ID]===J[ge.UUID])},E=J=>L(o({[ge.UUID]:J})),O=J=>f({[ge.UUID]:J})?{[t.children]:t.data}:E(y(J)),A=J=>({[Oi[ge.IS_LOADING]]:i(J,ge.IS_LOADING),[Oi[ge.HAS_CHILD]]:u(J),[Oi[ge.IS_MATCH]]:m(J),[Oi[ge.IS_CHECKED]]:p(J),[Oi[ge.IS_OPEN]]:d(J),[Oi[ge.IS_ROOT]]:f(J),fullPath:i(J,ge.PATH),uuid:c(J),parentId:i(J,ge.PARENT_ID)});return{getSchemaVal:n,getNodeAttr:i,getNodeId:c,getNodeParentId:C,getNodeParentIdById:y,getParentNodeData:O,getParentNode:k,setNodeAttr:s,getNodePath:o,isRootNode:f,isNodeOpened:d,hasChildNode:u,isItemOpen:v,isNodeChecked:p,isNodeMatched:m,isNodeLoading:M,checkNodeIsOpen:I,getSourceNodeByPath:L,getSourceNodeByUID:E,deleteNodeSchema:x,resolveScopedSlotParam:A,setTreeNodeLoading:T,extendNodeAttr:J=>Te(U({},J),{[ge.TREE_NODE_ATTR]:A(J)}),getChildNodes:N}};const r9="1px dashed #c3cdd7",s9=(e,t,n=null,i=null,s=null,o=[])=>{const c=e[t];return typeof c=="boolean"?c?i:s:l9(n,e,t,o)},l9=(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}},o9=(e,t)=>l9(e,t,"label"),Xc=(e,t)=>e.get(t)||{},Yb=(e,t,n)=>{var i;return(i=Xc(e,t))==null?void 0:i[n]},Ub=(e,t)=>({"--level-line":s9(t,"levelLine",e,r9,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),$b=(e,t,n={})=>{const{schema:i}=n,s=Yb(i,e[ge.UUID],ge.DEPTH);return U({"--depth":s},typeof t.levelLine=="function"?{"--level-line":s9(t,"levelLine",e,r9,null,["node"])}:{})},Kb=(e,t,n)=>{const{__is_root:i,__is_open:s}=Xc(t,e[ge.UUID])||{};return{"is-root":i,"bk-tree-node":!0,"is-open":s,"is-virtual-render":n.virtualRender,"level-line":n.levelLine}},Xb=(e,t)=>{const{__is_checked:n,__is_selected:i}=Xc(t,e[ge.UUID])||{};return{"is-checked":n,"is-selected":i,[Ye("node-row")]:!0}},qb=(e,t,n,i,s)=>{eC(e,t,n,{[i]:s})},eC=(e,t,n,i)=>{const o=e.split("-").reduce((c,f)=>{const d=Number(f);return Array.isArray(c)?c[d]:c[n][d]},t);Object.assign(o,i||{})},Jr=e=>e==null?{__IS_NULL:!0}:typeof e=="string"||typeof e=="number"||typeof e=="symbol"?{[ge.UUID]:e}:(Object.prototype.hasOwnProperty.call(e,ge.UUID)||console.error("setNodeAction Error: node id cannot found"),e);var c9=(e,t)=>{const{setNodeAttr:n,getNodePath:i,getNodeAttr:s,resolveScopedSlotParam:o,setTreeNodeLoading:c}=ul(t,e),f=(m,p)=>{if(typeof m=="object"&&m!==null){n(p,ge.IS_OPEN,!0);const C=Array.isArray(m)?m:[m];return qb(i(p),e.data,e.children,e.children,C),Promise.resolve(m)}return Promise.resolve(m)},d=m=>{const{callback:p=null,cache:C=!0}=e.async||{};if(typeof p=="function"&&s(m,ge.IS_ASYNC)){if(n(m,ge.IS_ASYNC_INIT,!0),!s(m,ge.IS_CACHED)){n(m,ge.IS_CACHED,C);const y=o(m),M=p(m,T=>f(T,m),y);if(typeof M=="object"&&M!==null)return c(m,!0),M instanceof Promise?Promise.resolve(M.then(T=>f(T,m)).catch(T=>console.error("load remote data error:",T)).finally(()=>{c(m,!1),n(m,ge.IS_CACHED,!0)})):(f(M,m),c(m,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},u=()=>{const m=t.data.filter(p=>s(p,ge.IS_ASYNC)&&p[Oi[ge.IS_OPEN]]&&!s(p,ge.IS_ASYNC_INIT));m.length&&Promise.all(m.map(p=>d(p))).then(()=>{u()}).catch(p=>{console.warn(p)})};return{asyncNodeClick:d,deepAutoOpen:u}},tC=(e,t,n,i,s,o)=>{let c=e.selected;const{setNodeAttr:f,getNodePath:d,getSchemaVal:u,getNodeAttr:m,getNodeId:p,getChildNodes:C,isRootNode:y,hasChildNode:M,isItemOpen:T,isNodeOpened:x,isNodeLoading:k,isNodeChecked:v,getParentNode:b,resolveScopedSlotParam:I,extendNodeAttr:L}=ul(n,e),{registerNextLoop:N}=o,{asyncNodeClick:E,deepAutoOpen:O}=c9(e,n),A=G=>T(G)?a.createVNode(Go,{class:[Ye("tree-icon"),Ye("node-prefix")]},null):a.createVNode(Zo,{class:[Ye("tree-icon"),Ye("node-prefix")]},null),R=G=>{if(typeof G=="string")return G;if(typeof G=="object"&&G!==null){if(G.__v_isVNode)return G;const{node:ce,className:we,text:z,style:B}=G;return a.h(ce,{class:we,style:B},z)}return null},J=G=>{var ce,we,z;return((z=(we=(ce=t.slots).nodeLoading)==null?void 0:we.call(ce,L(G)))!=null?z:k(G))?a.createVNode(wr,null,null):""},$=G=>{if(t.slots.nodeAction)return t.slots.nodeAction(L(G));let ce=null;return k(G)?J(G):typeof e.prefixIcon=="function"&&(ce=e.prefixIcon(L(G),"node_action"),ce!=="default")?R(ce):(ce==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon)&&(M(G)||G.async||!e.autoCheckChildren)?T(G)?a.createVNode(Ss,{class:Ye("node-prefix")},null):a.createVNode(Ps,{class:Ye("node-prefix")},null):null},_=G=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(L(G));let ce=null;return typeof e.prefixIcon=="function"&&(ce=e.prefixIcon(L(G),"node_type"),ce!=="default")?R(ce):ce==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?y(G)||M(G)?A(G):a.createVNode(qo,{class:[Ye("tree-icon"),Ye("node-prefix")]},null):null},le=(G,ce)=>{const we=b(G);we&&(f(we,ge.IS_CHECKED,ce),y(we)||le(we,ce))},se=(G,ce,we)=>{C(G).forEach(z=>{f({[ge.UUID]:z},ce,we),se({[ge.UUID]:z},ce,we)})},ne=(G,ce)=>{f(G,ge.IS_CHECKED,!!ce),se(G,ge.IS_CHECKED,!!ce),le(G,ce),t.emit(Vr.NODE_CHECKED,s.value.filter(we=>v(we)).map(we=>we[ge.UUID]))},fe=G=>v(G)&&!s.value.filter(ce=>{var we;return(we=d(ce))==null?void 0:we.startsWith(d(G))}).every(ce=>v(ce)),ee=G=>v(G)||s.value.filter(ce=>{var we;return(we=d(ce))==null?void 0:we.startsWith(d(G))}).some(ce=>v(ce)),ae=G=>e.showCheckbox?a.createVNode(Li,{size:"small",modelValue:ee(G),indeterminate:fe(G),onChange:ce=>ne(G,ce)},null):null,Y=(G,ce=null,we=null,z=!0)=>{const B=ce===null?!T(G):!!ce;if(B||se(G,ge.IS_OPEN,B),f(G,ge.IS_OPEN,B),z){const Q=T(G)?Vr.NODE_EXPAND:Vr.NODE_COLLAPSE;t.emit(Q,G,I(G),u(G[ge.UUID]),we)}},D=(G,ce,we)=>{if(Array.isArray(G)){G.forEach(z=>f(Jr(z),ce,we));return}f(Jr(G),ce,we)},V=(G,ce=!0,we=!1)=>{const z=Jr(G);if(!z[ge.IS_NULL])if(we)if(ce){if(D(z,ge.IS_OPEN,!0),!y(z)){const B=m(z,ge.PARENT_ID);V(B,!0,!0)}}else Y(z,!1,null,!1);else D(z,ge.IS_OPEN,ce)},W=(G,ce)=>{if(x(G)){Y(G,!1,ce);return}E(G).finally(()=>{m(G,ge.IS_LOADING)?N("setNodeOpenedAfterLoading",{type:"once",fn:()=>Y(G,!0,ce)}):Y(G,!0,ce)})},ie=(G,ce)=>{G.stopImmediatePropagation(),G.stopPropagation(),G.preventDefault(),W(ce,G)},re=(G,ce=!0,we=!0)=>{const z=Array.isArray(G)?G:[G];if(!z.length)return;const B=Jr(z[0]);B[ge.IS_NULL]||(e.selectable?(c!=null&&f({[ge.UUID]:c},ge.IS_SELECTED,!ce),e.selected&&e.selected!==c&&f({[ge.UUID]:e.selected},ge.IS_SELECTED,!ce),f(B,ge.IS_SELECTED,ce),c=p(B),we&&z.length===1&&V(B,!0,!0),m(B,ge.IS_ASYNC)&&E(B).then(()=>{a.nextTick(()=>{z.shift(),re(z,ce,we)})})):console.warn("props.selectable is false or undefined, please set selectable with true"))},pe=(G,ce)=>{re(G,!0,!1),x(G)||W(G,ce);const we=Vr.NODE_CLICK;t.emit(we,G,I(G),u(G[ge.UUID]),ce)},Ne=(G,ce)=>{if(y(ce))return!1;const we=d(ce),z=`${we}`.split("-").slice(0,G+1);if(z.join("-")===we)return!0;const Q=z.pop(),de=parseInt(Q,10);z.push(`${de+1}`);const Ce=z.join("-");return s.value.some(F=>F[ge.PATH]===Ce)},te=G=>{if(!e.levelLine)return null;const ce=z=>({"--depth":z}),we=m(G,ge.DEPTH)+1;return new Array(we).fill("").map((z,B)=>B).filter(z=>Ne(z,G)).filter(z=>z>0).map(z=>a.createVNode("span",{class:"node-virtual-line",style:ce(we-z)},null))};return{renderTreeNode:G=>{var ce,we,z,B,Q;return a.createVNode("div",{"data-tree-node":p(G),key:p(G),class:Xb(G,n.schema)},[a.createVNode("div",{class:Kb(G,n.schema,e),style:$b(G,e,n),onClick:de=>pe(G,de)},[a.createVNode("span",{class:[Ye("node-action")],onClick:de=>ie(de,G)},[$(G)]),a.createVNode("span",{class:Ye("node-content")},[[ae(G),_(G)],a.createVNode("span",{class:Ye("node-text")},[(z=(we=(ce=t.slots).node)==null?void 0:we.call(ce,L(G)))!=null?z:[o9(G,e)]]),(Q=(B=t.slots).nodeAppend)==null?void 0:Q.call(B,L(G))]),te(G)])])},hanldeTreeNodeClick:W,deepAutoOpen:O,asyncNodeClick:E,setNodeAction:D,setNodeOpened:Y,setSelect:re,setOpen:V}},nC=(e,t,n)=>{const{getSourceNodeByUID:i,getNodeParentIdById:s,getParentNodeData:o,getNodeAttr:c,getNodePath:f,isRootNode:d}=ul(n,e),u=v=>v.target.closest("[data-tree-node]"),m=v=>{u(v).removeEventListener("mouseup",m)},p=v=>{const b=u(v);b.setAttribute("draggable","true"),b.addEventListener("mouseup",m)},C=v=>{v.preventDefault();const b=u(v),I=v.dataTransfer.getData("node-id"),L=b.getAttribute("data-tree-node"),N=T(I,L)?"move":"none";v.dataTransfer.effectAllowed=N,v.dataTransfer.dropEffect=N},y=v=>{v.dataTransfer.effectAllowed="move",v.dataTransfer.dropEffect="move";const b=u(v);v.dataTransfer.setData("text/plain",""),v.dataTransfer.setData("node-id",b.getAttribute("data-tree-node"))},M=v=>{v.preventDefault(),v.stopPropagation();const b=u(v),I=v.dataTransfer.getData("node-id"),L=b.getAttribute("data-tree-node");Reflect.apply(e.dragSort?x:k,globalThis,[I,L])},T=(v,b)=>{const I=f({[ge.UUID]:v}),L=f({[ge.UUID]:b}),N=s(v),E=s(b);return N===E?!0:I.indexOf(L)===-1&&L.indexOf(I)===-1},x=(v,b)=>{if(!T(v,b))return;const I=JSON.parse(JSON.stringify(i(v))),L=JSON.parse(JSON.stringify(i(b))),N=o(v),E=o(b),O=c({[ge.UUID]:v},ge.INDEX),A=c({[ge.UUID]:b},ge.INDEX);N==null||N[e.children].splice(O,1,L),E==null||E[e.children].splice(A,1,I)},k=(v,b)=>{const I=i(v),L=i(b);let N=null;if(d({[ge.UUID]:v}))N=e.data;else{const E=s(v);if(E!=null){N=i(E);const O=c({[ge.UUID]:v},ge.INDEX);N==null||N[e.children].splice(O,1)}}L[e.children]||(L[e.children]=[]),L[e.children].unshift(I)};a.onMounted(()=>{if(e.draggable&&t.value){const v=t.value.$el;v.addEventListener("mousedown",p),v.addEventListener("dragstart",y),v.addEventListener("dragover",C),v.addEventListener("drop",M)}}),a.onUnmounted(()=>{if(e.draggable&&t.value){const v=t.value.$el;v.removeEventListener("mousedown",p),v.removeEventListener("dragstart",y),v.removeEventListener("dragover",C),v.removeEventListener("drop",M)}})},iC=e=>{var C;const t=a.toRef(e,"search"),{openResultNode:n=!1,resultType:i="tree"}=(C=e.search)!=null?C:{},s=y=>["string","number","boolean"].includes(typeof y),o=(y,M)=>y===M,c=(y,M)=>new RegExp(`${y}`,"i").test(`${M}`),f=(y,M)=>Reflect.apply(y,globalThis,M),d=t.value===void 0||t.value===!1,u=(y,M)=>{if(d)return!0;if(s(t.value))return f(c,[t.value,y,M]);const{value:T="",match:x="fuzzy"}=t.value,v=typeof x=="function"?x:x==="fuzzy"?c:o;return`${T}`.length===0?!0:f(v,[T,y,M])},m=a.computed(()=>t.value!==!1&&(s(t.value)?`${t.value}`.length>0:typeof t.value=="object"));return{searchFn:u,refSearch:t,isSearchActive:m,isSearchDisabled:d,openResultNode:n,resultType:i,isTreeUI:i==="tree"}},aC=e=>{var x;const t=(k,v=void 0,b=[])=>{const{data:I,children:L}=k,N=[],E=[];let O=0;const A=new Map;function R(ee,ae,Y,D){if(ee!=null&&A.has(ee)&&![ge.UUID,ge.PARENT_ID].includes(ae)){const V=A.get(ee);Object.prototype.hasOwnProperty.call(V,ae)&&typeof D=="function"&&Reflect.apply(D,self,[V,ae,Y])&&(Object.assign(V,{[ae]:Y}),R(V[ge.PARENT_ID],ae,Y,D))}}function J(ee){let ae=null;return typeof k.nodeKey=="string"&&(ae=ee[k.nodeKey]||Fi.v4()),ae||ee[ge.UUID]||Fi.v4()}const $={[ge.IS_OPEN]:()=>!1,[ge.IS_CHECKED]:()=>!1,[ge.IS_MATCH]:()=>!0,[ge.IS_SELECTED]:ee=>k.selected===ee,[ge.IS_CACHED]:()=>!1,[ge.IS_ASYNC]:()=>null,[ge.IS_LOADING]:()=>!1};function _(ee,ae,Y,D=void 0){let V=D;D===void 0&&typeof $[Y]=="function"&&(V=$[Y](ee,ae));const W=Oi[Y];if(Object.prototype.hasOwnProperty.call(ae,W))return ae[W];const ie=(b||[]).find(pe=>pe[ge.UUID]===ee);let re;return ie&&(re=ie[Y]),re==null&&(re=V),re}function le(ee,ae){return k.selectable?_(ee,ae,ge.IS_SELECTED,k.selected===ee):!1}function se(ee,ae,Y){var W;const D=_(ee,ae,ge.IS_OPEN),V=A.has(Y)?(W=A.get(Y))==null?void 0:W[ge.IS_OPEN]:!0;return D&&V}function ne(ee){return!ee[ge.IS_OPEN]}function fe(ee,ae=0,Y=null,D=null){const V=ee.length;for(let W=0;W<V;W++){const ie=ee[W];if(Array.isArray(ie))fe(ie,ae,Y,D);else if(typeof ie=="object"&&ie!==null){const re=D!==null?`${D}-${W}`:`${W}`,pe=`${J(ie)}`,Ne=!!(ie[L]||[]).length;let te=_(pe,ie,ge.IS_OPEN);k.autoOpenParentNode?te&&R(Y,ge.IS_OPEN,!0,ne):te=se(pe,ie,Y),Object.assign(ie,{[ge.UUID]:pe});const K=k.showCheckbox&&_(pe,ie,ge.IS_CHECKED);K&&N.push(pe),A.set(pe,{[ge.DEPTH]:ae,[ge.INDEX]:W,[ge.UUID]:pe,[ge.PARENT_ID]:Y,[ge.HAS_CHILD]:Ne,[ge.PATH]:re,[ge.IS_ROOT]:Y===null,[ge.ORDER]:O,[ge.IS_SELECTED]:le(pe,ie),[ge.IS_MATCH]:_(pe,ie,ge.IS_MATCH),[ge.IS_OPEN]:te,[ge.IS_CHECKED]:K,[ge.IS_CACHED]:_(pe,ie,ge.IS_CACHED),[ge.IS_ASYNC]:_(pe,ie,ge.IS_ASYNC),[ge.IS_LOADING]:_(pe,ie,ge.IS_LOADING),[L]:null}),O+=1,E.push(Te(U({},JSON.parse(JSON.stringify(ie,(G,ce)=>G===k.children?null:ce))),{[ge.IS_OPEN]:te,[L]:null})),Object.prototype.hasOwnProperty.call(ie,L)&&fe(ie[L]||[],ae+1,pe,re)}}}return fe(v||I),k.showCheckbox&&(N==null||N.forEach(ee=>{Array.from(A.values()).filter(ae=>{var Y;return(Y=ae[ge.PATH])==null?void 0:Y.startsWith(A.get(ee)[ge.PATH])}).forEach(ae=>Object.assign(ae,{[ge.IS_CHECKED]:!0})),R(ee,ge.IS_CHECKED,!0,()=>!0)})),[E,A]},n=t(e),i=new Map,s=[],o=[],c=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),f=a.computed(()=>Array.from(c.schema.values())),{asyncNodeClick:d,deepAutoOpen:u}=c9(e,c),m=k=>{s.push(k)},p=(k,v,b=!0)=>{b&&i.has(k)&&i.delete(k),i.set(k,v)},C=k=>typeof k=="function"?{type:"loop",fn:k}:typeof k=="object"&&typeof k.type=="string"&&typeof k.fn=="function"?k:(console.error("loop event error",k),null),y=k=>{var b;const v=C(k);return v!==null&&Reflect.apply(v.fn,globalThis,[]),(b=v==null?void 0:v.type)!=null?b:"once"},M=()=>{Array.from(i.keys()).forEach(k=>{const v=i.get(k);if(Array.isArray(v)){const b=[];v.forEach((I,L)=>{y(I)==="once"&&b.unshift(L)}),b.length&&b.forEach(I=>v.splice(I,1)),v.length===0&&i.delete(k)}else y(v)==="once"&&i.delete(k)})};a.watch(()=>[e.data],k=>{var b,I;const v=t(e,k,f.value);c.data=v[0],c.schema=v[1],((b=e.async)==null?void 0:b.callback)&&((I=e.async)==null?void 0:I.deepAutoOpen)==="every"&&u(),M()},{deep:!0}),e.selectable&&a.watch(()=>e.selected,k=>{o.length=0,s.forEach(v=>{Reflect.apply(v,globalThis,[k]),o.push(()=>Reflect.apply(v,globalThis,[k]))}),p("afterSelectWatch",o)},{immediate:!0});const T=k=>{p("afterDataUpdate",k)};return(x=e.async)!=null&&x.callback&&u(),{flatData:c,schemaValues:f,asyncNodeClick:d,deepAutoOpen:u,afterDataUpdate:T,registerNextLoop:p,onSelected:m}},rC=a.defineComponent({name:"Tree",props:Gb,emits:Fb,setup(e,t){const{flatData:n,schemaValues:i,onSelected:s,registerNextLoop:o}=aC(e),{setNodeAttr:c,checkNodeIsOpen:f,getNodeAttr:d,getNodePath:u,isRootNode:m,isNodeOpened:p,isNodeChecked:C,isNodeMatched:y,hasChildNode:M}=ul(n,e),{searchFn:T,isSearchActive:x,refSearch:k,openResultNode:v,isTreeUI:b,isSearchDisabled:I}=iC(e);I||a.watch([k],()=>{n.data.forEach(ae=>{const Y=T(o9(ae,e),ae);c(ae,ge.IS_MATCH,Y),v&&R(ae,!0,!0)})});const L=ae=>{if(x.value){const Y=()=>b?i.value.some(D=>{var V;return((V=D[ge.PATH])==null?void 0:V.startsWith(u(ae)))&&D[ge.IS_MATCH]}):!1;return d(ae,ge.IS_MATCH)||Y()}return!0},N=a.computed(()=>n.data.filter(ae=>f(ae)&&L(ae))),{renderTreeNode:E,hanldeTreeNodeClick:O,setNodeOpened:A,setOpen:R,setNodeAction:J,setSelect:$,asyncNodeClick:_}=tC(e,t,n,N,i,{registerNextLoop:o}),le=(ae,Y=!0)=>{J(Jr(ae),ge.IS_CHECKED,Y)};s(ae=>{$(ae,!0,e.autoOpenParentNode)});const se=()=>n;t.expose({hanldeTreeNodeClick:O,isNodeChecked:C,isRootNode:m,isNodeOpened:p,isNodeMatched:y,hasChildNode:M,setOpen:R,setChecked:le,setNodeAction:J,setNodeOpened:A,setSelect:$,asyncNodeClick:_,getData:se});const ne=a.ref(),{renderEmpty:fe}=Zb(e,t);nC(e,ne,n);const ee=ae=>{if(ae.length)return ae.map(E);const Y=x.value?"search-empty":"empty";return fe(Y)};return()=>a.createVNode(zr,{class:Ye("tree"),style:Ub(null,e),list:N.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:Ye("container"),throttleDelay:0,ref:ne},{default:ae=>ee(ae.data||[])})}});const u9=He(rC),d9=e=>e.__v_isVNode;var sC=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(d9(e[n])){i=e[n];break}n=n+1}let s=t-1,o=null;for(;s>=0&&s>n;){if(d9(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 f="bk-compose-form-item-tail";o.props.class&&(f+=` ${o.props.class}`),this.tailBackgroundColor&&(o.props.style=Object.assign(o.props.style||{},{"background-color":this.tailBackgroundColor})),o.props.class=f}}return a.h("div",{class:"bk-compose-form-item"},e)}});const lC={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 oC=a.defineComponent({name:"Form",props:lC,emits:["submit"],setup(e,t){let n=[];const i=d=>{n.push(d)},s=d=>{n=n.reduce((u,m)=>(m!==d&&u.push(m),u),[])};return a.provide(Df,{props:e,register:i,unregister:s}),{handleSubmit:d=>{d.preventDefault(),t.emit("submit")},validate:d=>{let u={};return d?u=(typeof d=="string"?[d]:d).reduce((p,C)=>Te(U({},p),{[C]:!0}),{}):u=n.reduce((m,p)=>p.property?Te(U({},m),{[p.property]:!0}):m,{}),Promise.all(n.reduce((m,p)=>(u[p.property]&&m.push(p.validate()),m),[])).then(()=>Promise.resolve(e.model))},clearValidate:d=>{let u={};d?u=(typeof d=="string"?[d]:d).reduce((p,C)=>Te(U({},p),{[C]:!0}),{}):u=n.reduce((m,p)=>Te(U({},m),{[p.property]:!0}),{}),n.forEach(m=>u[m.property]&&m.clearValidate())}}},render(){var t,n;const e=De({"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)])}}),Sn={required:e=>e!==""&&e!==void 0&&e!==null,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 cC={label:g.string,labelWidth:g.oneOfType([Number,String]),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")},uC=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),dC=e=>{const t=[];return e.required&&t.push({validator:Sn.required,message:`${e.label}\u4E0D\u80FD\u4E3A\u7A7A`,trigger:"blur"}),e.email&&t.push({validator:Sn.email,message:`${e.label}\u683C\u5F0F\u4E0D\u6B63\u786E`,trigger:"blur"}),Number(e.max)>-1&&t.push({validator:n=>Sn.max(n,e.max),message:`${e.label}\u6700\u5927\u503C${e.max}`,trigger:"blur"}),Number(e.min)>-1&&t.push({validator:n=>Sn.min(n,e.min),message:`${e.label}\u6700\u5C0F\u503C${e.min}`,trigger:"blur"}),Number(e.maxlength)>-1&&t.push({validator:n=>Sn.maxlength(n,e.maxlength),message:`${e.label}\u6700\u5927\u957F\u5EA6${e.maxlength}`,trigger:"blur"}),t},fC=(e,t)=>{const n=e.reduce((i,s)=>{let o;if(s.required)o=Sn.required;else if(s.email)o=Sn.email;else if(Number(s.max)>-1)o=c=>Sn.max(c,s.max);else if(Number(s.min)>-1)o=c=>Sn.min(c,s.max);else if(Number(s.maxlength)>-1)o=c=>Sn.min(c,s.max);else if(Object.prototype.toString.call(s.pattern)==="[object RegExp]")o=c=>Sn.pattern(c,s.pattern);else if(Object.prototype.toString.call(s.validator)==="[object Function]")o=s.validator;else return i;return i.push({validator:o,message:s.message,trigger:s.trigger}),i},[]);return[...t,...n]},hC=(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),[]),f9=e=>e!==void 0;var gC=a.defineComponent({name:"FormItem",directives:{bkTooltips:yc},props:cC,setup(e){const t=a.getCurrentInstance(),n=a.reactive({isError:!1,errorMessage:""}),i=N4(),s=Boolean(i),o=a.computed(()=>s?i.props.formType==="vertical":!1),c=a.computed(()=>{const u={width:"",paddingRight:"",textAlign:""},m=f9(e.labelWidth)?e.labelWidth:s&&i.props.labelWidth;f9(m)&&(u.width=`${m}px`,u.paddingRight=m?"":"0px");const p=e.labelPosition||s&&i.props.labelPosition;return p&&(u["text-align"]=p),u}),f=u=>{if(!e.property||s&&!i.props.model)return Promise.resolve(!0);let m=[];s&&i.props.rules&&uC(i.props.rules,e.property)&&(m=i.props.rules[e.property]),e.rules&&(m=e.rules),m=hC(u,fC(m,dC(e))),m.length>0&&(n.isError=!1,n.errorMessage="");const p=dt.exports.get(i.props.model,e.property),C=(()=>{let y=-1;return()=>{if(y=y+1,y>=m.length)return Promise.resolve(!0);const M=m[y];return Promise.resolve().then(()=>{const T=M.validator(p);return typeof T!="boolean"&&typeof T.then=="function"?T.then(x=>{if(x===!1)return Promise.reject(M.message)}).then(()=>C(),()=>(n.isError=!0,n.errorMessage=M.message,Promise.reject(M.message))):T?C():(n.isError=!0,n.errorMessage=M.message,Promise.reject(M.message))})}})();return C()},d=()=>{n.isError=!1,n.errorMessage=""};return a.provide(jf,Te(U({},e),{validate:f,clearValidate:d})),a.onMounted(()=>{s&&i.register(t.proxy)}),a.onBeforeUnmount(()=>{s&&i.unregister(t.proxy)}),Te(U({},a.toRefs(n)),{labelStyles:c,isFormTypeVertical:o,validate:f,clearValidate:d})},render(){var i,s,o,c;const e=De({"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(zs,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},[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"},[(c=(o=this.$slots).default)==null?void 0:c.call(o),n()])])}});const h9=Ft(oC,{FormItem:gC,ComposeFormItem:sC}),mC={span:g.number.def(1),offset:g.number.def(0),pull:g.number.def(0),push:g.number.def(0)};var pC=a.defineComponent({name:"Col",props:mC,emits:[],setup(e,t){const{col:n,gutter:i,flex:s}=a.inject("containerProps"),{span:o,offset:c,pull:f,push:d}=e,u=a.computed(()=>o||n);a.provide("containerProps",{col:u.value,gutter:i,flex:s});const m=function(C){return`${Number((C*100).toFixed(3))}%`},p=a.computed(()=>({width:m(u.value/n),"padding-right":`${i/2}px`,"padding-left":`${i/2}px`,"margin-left":c?m(c/n):null,right:f?m(f/n):null,left:d?m(d/n):null}));return()=>{var C,y;return a.createVNode("div",{class:"bk-grid-col",style:p.value},[(y=(C=t.slots).default)==null?void 0:y.call(C)])}}});const yC={col:g.number.def(24),gutter:g.number.def(20),margin:g.number.def(20),flex:g.bool.def(!1),extCls:g.string};var bC=a.defineComponent({name:"Container",props:yC,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"),f=a.computed(()=>{const{margin:d}=e;return{"padding-right":`${d}px`,"padding-left":`${d}px`}});return()=>{var d,u;return a.createVNode("div",{class:c.value,style:f.value},[(u=(d=t.slots).default)==null?void 0:u.call(d)])}}}),CC=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(()=>Te(U({},s?{display:["-webkit-box","-ms-flexbox","flex"]}:{}),{"margin-right":`-${i/2}px`,"margin-left":`-${i/2}px`}));return()=>{var c,f;return a.createVNode("div",{class:"bk-grid-row",style:o.value},[(f=(c=t.slots).default)==null?void 0:f.call(c)])}}});const dl=Ft(bC,{Row:CC,Col:pC}),vC=["auto","auto-start","auto-end","top","right","bottom","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end"],wC=["hover","click","manual"];var MC=a.defineComponent({name:"Dropdown",props:{isShow:g.bool.def(!1),placement:g.commonType(vC,"placement").def("bottom"),trigger:g.commonType(wC,"trigger").def("hover"),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=De({"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=dt.exports.merge(t,this.popoverOptions);return a.createVNode("div",{class:e},[a.createVNode(Wn,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(" ")])}})])}}),IC=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)])}}),NC=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 g9=Ft(MC,{DropdownMenu:NC,DropdownItem:IC});var qc=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(Tf()),isFiltering:g.bool.def(!1),searchKey:g.oneOfType([g.string,g.number]).def(""),modelValue:g.arrayOf(g.oneOfType([Po(),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=v=>typeof v=="number"?`${v}px`:v,f=c(e.height),d=c(e.width),u=v=>{v.length===0&&(i.list=i.list.slice(0,1),s.value=[]),v.forEach(b=>{const I=n.getNodeById(b);p(I)}),o.value=v},m=v=>{v.isDisabled||(v.config.multiple?o.value=n.getCheckedNodes().map(b=>b.path):o.value=v.path,t("update:modelValue",o.value))},p=v=>{var b;if(!(!v||(v==null?void 0:v.isDisabled))){if(i.list=i.list.slice(0,v.level),s.value=s.value.slice(0,v.level-1),(b=v.children)!=null&&b.length){i.list.push(v.children),s.value.push(v);return}if(n.config.isRemote&&!v.isLeaf){v.loading=!0;const I=L=>{n.appendNodes(L,v||null),i.list.push(v.children),s.value.push(v),v.loading=!1};n.config.remoteMethod(v,I)}}},C=v=>{const{trigger:b,checkAnyLevel:I,multiple:L}=v.config;return{onClick:E=>{(!v.isLeaf||L)&&E.stopPropagation(),b==="click"&&p(v),I&&!L&&m(v),v.isLeaf&&!L&&m(v)},onMouseenter:()=>{b==="hover"&&p(v)}}},y=v=>{const{multiple:b}=v.config;return{onClick:L=>{if(b){L.stopPropagation(),x(v,!v.checked);return}p(v),v.isLeaf&&!b&&m(v)}}},M=v=>(s.value[v.level-1]||{}).id===v.id,T=(v,b)=>{const{multiple:I}=v.config;return I?b.some(L=>pr(L,v.path)):pr(b,v.path)},x=(v,b)=>{v.setNodeCheck(b||!1),m(v)},k=v=>v.loading?a.createVNode(wr,{class:"icon-spinner"},null):a.createVNode(Ln,{class:"icon-angle-right"},null);return a.watch(()=>e.modelValue,v=>{u(v)},{immediate:!0}),a.watch(()=>e.store,v=>{i.list=[v.getNodes()]}),{menus:i,activePath:s,nodeExpandHandler:p,isNodeInPath:M,nodeEvent:C,isCheckedNode:T,checkValue:o,checkNode:x,iconRender:k,panelWidth:d,panelHeight:f,searchPanelEvents:y}},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(Li,{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 m9(e){return e.data.disabled?!0:e.level!==1?m9(e.parent):e.data.disabled}class fl{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 fl(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 m9(this)}broadcast(t,n){const i=`onParent${Oo(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${Oo(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,f=o.checked?1:c;return s+f},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 p9=(e,t)=>e.reduce((n,i)=>(i.isLeaf?n.push(i):(!t&&n.push(i),n=n.concat(p9(i.children,t))),n),[]);class y9{constructor(t){const{list:n}=t;this.data=n,this.config=t,this.nodes=this.data.map(i=>new fl(i,this.config))}getNodes(){return this.nodes}clearChecked(){this.getFlattedNodes().forEach(t=>{t.checked=!1,t.isIndeterminate=!1})}removeTag(t){this.getFlattedNodes().find(n=>pr(t,n.path)?(n.checked=!1,!0):!1)}getFlattedNodes(t=!1){return p9(this.nodes,t)}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getNodeByValue(t){var i;return(i=this.getFlattedNodes().filter(s=>pr(s.path,t))[0])!=null?i:null}getNodeById(t){return this.getFlattedNodes().find(n=>n.id===t)}appendNode(t,n){const i=new fl(t,this.config,n);(n?n.children:this.nodes).push(i)}appendNodes(t,n){t.forEach(i=>this.appendNode(i,n))}}var LC=a.defineComponent({name:"Cascader",directives:{clickoutside:kn},components:{CascaderPanel:qc,BkPopover:Wn},props:{modelValue:g.arrayOf(g.oneOfType([Po(),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}=W0(),f=a.ref(new y9(e)),d=a.ref(!1),u=a.ref(""),m=a.ref([]),{modelValue:p}=a.toRefs(e),C=a.ref(),y=a.ref(""),M=a.ref([]),T=a.ref(!1),x=a.computed({get:()=>p.value,set:J=>{t("update:modelValue",J)}}),k=a.ref(null),v=J=>e.showCompleteName?J.pathNames.join(n):J.pathNames[J.pathNames.length-1],b=()=>{y.value=u.value},I=J=>{var $;if(i){m.value=f.value.getCheckedNodes().map(_=>({text:v(_),key:_.id}));return}if(!e.checkAnyLevel&&(($=k==null?void 0:k.value)==null||$.hide()),J.length===0)u.value="";else{const _=f.value.getNodeByValue(J);if(!_)return;u.value=v(_)}b()},L=J=>{J.stopPropagation(),f.value.clearChecked(),y.value="",I([]),t("update:modelValue",[]),t("clear",JSON.parse(JSON.stringify(e.modelValue)))},N=(J,$,_)=>{_.stopPropagation();const le=JSON.parse(JSON.stringify(J)),se=le.splice($,1)[0];f.value.removeTag(se),I(le),t("update:modelValue",f.value.getCheckedNodes().map(ne=>ne.path))},E=(J,$)=>{I(J),t("update:modelValue",J),$!==void 0&&t("change",J)},O=()=>{f.value=new y9(e),I(e.modelValue)},A=J=>{t("toggle",J.isShow),J.isShow||(T.value=!1)},R=Ns(200,J=>{const $=J.target;if(y.value=$.value,y.value===""){T.value=!1;return}T.value=!0;const _=f.value.getFlattedNodes().filter(le=>(e.checkAnyLevel||le.isLeaf)&&le.pathNames.join(e.separator).includes(y.value));M.value=_,!(k!=null&&k.value.isShow)&&(k==null||k.value.show())});return a.watch(()=>e.modelValue,E,{immediate:!0}),a.watch(()=>e.list,O,{deep:!0,immediate:!0}),{store:f,updateValue:I,panelShow:d,selectedText:u,checkedValue:x,handleClear:L,isHover:s,setHover:o,popover:k,cancelHover:c,selectedTags:m,removeTag:N,cascaderPanel:C,popoverChangeEmitter:A,searchKey:y,suggestions:M,isFiltering:T,searchInputHandler:R}},render(){const e=()=>this.clearable&&this.isHover?a.createVNode(Gt,{class:"bk-icon-clear-icon",onClick:this.handleClear},null):a.createVNode(za,{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(Qn,{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(Wn,{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(qc,{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 b9=Ft(LC,{CascaderPanel:qc});var C9=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),f=a.ref(null),d=a.ref(e.modelValue),u=a.ref(0),m=a.ref(0),p=a.ref(!1),C=a.ref(null),y=a.computed(()=>{var A,R;let E="";if((A=e.params.customContent)!=null&&A[e.modelValue]){const J=e.params.customContent[e.modelValue];E=J.tip||J.label||""}const O=e.params.vertical?"right":"top";return(R=e.params)!=null&&R.showTip?{content:e.params.formatterTipLabel(`${E||(e==null?void 0:e.modelValue)||"0"}`),placement:O}:{content:"",placement:O}}),M=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),T=a.computed(()=>e.params.vertical?{bottom:M.value}:{left:M.value}),x=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),k=E=>{e.params.disable||(E.preventDefault(),v(E),Qr(window,"mousemove",b),Qr(window,"touchmove",b),Qr(window,"mouseup",I),Qr(window,"touchend",I))},v=E=>{n.value=!0,i.value=!0,e.params.vertical?s.value=E.clientY:o.value=E.clientX,c.value=parseFloat(M.value),f.value=c.value},b=E=>{if(n.value){i.value=!1,t("resetSize");let O=0;e.params.vertical?(u.value=E.clientY,O=(s.value-u.value)/e.params.sliderSize*100):(m.value=E.clientX,O=(m.value-o.value)/e.params.sliderSize*100),f.value=c.value+O,L(f.value)}},I=()=>{p.value=!1,n.value&&(setTimeout(()=>{n.value=!1,i.value||(L(f.value),t("emitChange"))},0),hl(window,"mousemove",b),hl(window,"touchmove",b),hl(window,"mouseup",I),hl(window,"touchend",I))},L=E=>{if(E===null||isNaN(E))return;E<0?f.value=0:E>100&&(f.value=100);const O=100/((e.params.maxValue-e.params.minValue)/e.params.step);let R=Math.round(E/O)*O*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;R=parseFloat(R.toFixed(e.params.precision)),t("update:modelValue",R),!n.value&&e.modelValue!==d.value&&(d.value=e.modelValue)};return{renderDom:()=>a.createVNode("div",{class:["bk-slider-button",e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],ref:C,tabindex:"0",style:T.value,onClick:E=>E.stopPropagation(),onMousedown:k},[Boolean(y.value.content)?a.createVNode(Qs,{content:y.value.content,theme:"dark",placement:y.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"]},[x.value]):void 0]),setPosition:L,tip:y}},render(){return this.renderDom()}});const Qr=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},hl=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)};var kC=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),f=a.ref(0),d=a.ref(0),u=a.ref(null),m=a.ref(null),p=a.ref(null),C=a.ref(null),y=a.computed(()=>{const Y=[e.minValue,e.maxValue,e.step].map(D=>{const V=`${D}`.split(".")[1];return V?V.length:0});return Math.max.apply(null,Y)}),M=a.computed(()=>Math.min(s.value,o.value)),T=a.computed(()=>Math.max(s.value,o.value)),x=a.computed(()=>e.range?`${100*(T.value-M.value)/(e.maxValue-e.minValue)}%`:`${100*(s.value-e.minValue)/(e.maxValue-e.minValue)}%`),k=a.computed(()=>e.range?`${100*(M.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),v=a.computed(()=>e.vertical?{height:x.value,bottom:k.value}:{width:x.value,left:k.value}),b=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const Y=(e.maxValue-e.minValue)/e.step,D=100*e.step/(e.maxValue-e.minValue),V=[];for(let W=1;W<Y;W++)V.push(W*D);return e.range?V.filter(W=>W<100*(M.value-e.minValue)/(e.maxValue-e.minValue)||W>100*(T.value-e.minValue)/(e.maxValue-e.minValue)):V.filter(W=>W>100*(s.value-e.minValue)/(e.maxValue-e.minValue))}),I=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),L=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const Y=100*e.step/(e.maxValue-e.minValue),D=[];for(let V=e.minValue,W=0;V<=e.maxValue;V+=e.step,W++){const ie={stepWidth:W*Y,stepLabel:e.formatterLabel(V)};D.push(ie)}return D}),N=a.computed(()=>Array.isArray(e.modelValue)),E=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((Y,D)=>Number(Y)-Number(D)).filter(Y=>Number(Y)>=e.minValue&&Number(Y)<=e.maxValue).map(Y=>{const{tip:D}=e.customContent[Y],{label:V}=e.customContent[Y];return{tip:D||V||"",label:V||"",percent:(Number(Y)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),O=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:y.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{$()}),a.watch(()=>s.value,Y=>{e.range?n("update:modelValue",[M.value,T.value]):n("update:modelValue",Y),f.value=Y}),a.watch(()=>o.value,Y=>{n("update:modelValue",[M.value,T.value]),d.value=Y}),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),A(),Qr(window,"resize",A())});const A=()=>{u.value&&(i.value=u.value[`client${e.vertical?"Height":"Width"}`])},R=Y=>{var D,V;if(Y.stopPropagation(),!e.disable){if(A(),e.vertical){const W=(D=u.value)==null?void 0:D.getBoundingClientRect().bottom;se((W-Y.clientY)/i.value*100)}else{const W=(V=u.value)==null?void 0:V.getBoundingClientRect().left;se((Y.clientX-W)/i.value*100)}_()}},J=()=>e.range?![M.value,T.value].every((Y,D)=>Y===c.value[D]):e.modelValue!==c.value,$=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const Y=e.modelValue;e.range&&Array.isArray(Y)?Y[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):Y[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):Y[0]<e.minValue?n("update:modelValue",[e.minValue,Y[1]]):Y[1]>e.maxValue?n("update:modelValue",[Y[0],e.maxValue]):(s.value=Number(Y[0]),o.value=Number(Y[1]),J()&&(c.value=Y.slice())):!e.range&&typeof Y=="number"&&!isNaN(Y)&&(Y<e.minValue?n("update:modelValue",e.minValue):Y>e.maxValue?n("update:modelValue",e.maxValue):(s.value=Y,J()&&(c.value=Y)))},_=async()=>{await a.nextTick(),n("change",e.range?[M.value,T.value]:e.modelValue)},le=Y=>e.vertical?{bottom:`${Y}%`}:{left:`${Y}%`},se=Y=>{if(!e.range){m.value.setPosition(Y);return}const D=e.minValue+Y*(e.maxValue-e.minValue)/100;Math.abs(M.value-D)<Math.abs(T.value-D)?C.value=s.value<o.value?m.value:p.value:C.value=s.value>o.value?m.value:p.value,C.value.setPosition(Y)},ne=Y=>{if(Y==="")return;const D=parseFloat(Y);D<e.minValue?(f.value=e.minValue,s.value=e.minValue):D>e.maxValue?(f.value=e.maxValue,s.value=e.maxValue):s.value=D},fe=Y=>{if(Y===""||typeof Y=="number")return;const D=parseFloat(Y);D<e.minValue?(d.value=e.minValue,o.value=e.minValue):D>e.maxValue?(d.value=e.maxValue,o.value=e.maxValue):o.value=D},ee=Y=>{let D=0;return Y==="start"?D=e.vertical?e.maxValue:e.minValue:D=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[s.value,o.value].includes(D)?"0":"1"};return{renderDom:()=>{var Y,D;return a.createVNode("div",{class:["bk-slider",e.extCls]},[(Y=t.start)==null?void 0:Y.call(t),a.createVNode("div",{class:"bk-slider-runway",ref:u,style:I.value,onClick:R},[a.createVNode("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:v.value},null),e.showInterval?b.value.map((V,W)=>a.createVNode("div",{key:W,class:["bk-slider-interval",{vertical:e.vertical}],style:le(V)},null)):void 0,e.customContent?E.value.map((V,W)=>a.createVNode("div",{key:W,class:["bk-slider-interval",{vertical:e.vertical}],style:le(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:ee("start")}]},[e.formatterLabel(e.minValue)]),a.createVNode("div",{class:"label-end",style:[{opacity:ee("end")}]},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return L.value.map((V,W)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:W,style:le(V.stepWidth)},[V.stepLabel]));if(e.customContent)return E.value.map((V,W)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:W,style:le(V.percent)},[V.label]))}()]):void 0,a.createVNode(C9,{modelValue:s.value,"onUpdate:modelValue":V=>s.value=V,ref:m,params:O.value,onEmitChange:_,onResetSize:A},null),e.range?a.createVNode(C9,{modelValue:o.value,"onUpdate:modelValue":V=>o.value=V,ref:p,params:O.value,onEmitChange:_,onResetSize:A},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:"bk-slider-input"},[a.createVNode("div",{class:"input-item"},[a.createVNode(Ki,{type:"number",modelValue:f.value,max:e.maxValue,min:e.minValue,onChange:ne},null)]),N.value&&o.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("\uFF5E")]),a.createVNode("div",{class:"input-item"},[a.createVNode(Ki,{type:"number",modelValue:d.value,max:e.maxValue,min:e.minValue,onChange:fe},null)])]:void 0]):void 0,(D=t.end)==null?void 0:D.call(t)])}}},render(){return this.renderDom()}});const v9=He(kC);var TC=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:f,immediate:d,autoMinimize:u}=a.toRefs(e),m=a.ref(!1),p=a.ref(!0),C=a.ref(!1),y=a.ref(null),M=a.ref({}),T=a.ref(null),x=a.ref(null),k=a.ref(null),v=a.ref(null),b=a.computed(()=>["left","right"].includes(n.value)),I=a.computed(()=>b.value?"width":"height"),L=a.computed(()=>{let ee=i.value;return typeof ee=="number"&&(ee=`${ee}px`),{[I.value]:ee}}),N=a.computed(()=>({[`margin-${n.value}`]:`${s.value-o.value}px`,[I.value]:`${o.value}px`})),E=a.computed(()=>u.value?typeof u.value=="boolean"?50:u.value:0),O=()=>{const ee=T.value.getBoundingClientRect();y.value=b.value?ee.width:ee.height},A=new ResizeObserver(O),R=()=>{switch(x.value.style.visibility="visible",n.value){case"left":x.value.style.inset=`0 auto auto ${M.value.aside.width}px`;break;case"right":x.value.style.inset=`0 ${M.value.aside.width}px auto auto`;break;case"top":x.value.style.inset=`${M.value.aside.height}px auto auto 0`;break;case"bottom":x.value.style.inset=`auto auto ${M.value.aside.height}px 0`;break}},J=()=>{k.value.style.display="block",k.value.style.cursor=b.value?"col-resize":"row-resize"},$=ee=>Math.min(c.value,Math.max(f.value,ee),y.value-o.value),_=ee=>{t("before-resize",ee);const ae=v.value.getBoundingClientRect();M.value=Object.freeze({mouse:{clientX:ee.clientX,clientY:ee.clientY},aside:{width:ae.width,height:ae.height}}),J(),d.value||R(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const Y=W=>{t("resizing",W)},D=W=>{let ie;switch(n.value){case"top":ie=W.clientY-M.value.mouse.clientY;break;case"right":ie=M.value.mouse.clientX-W.clientX;break;case"bottom":ie=M.value.mouse.clientY-W.clientY;break;case"left":ie=W.clientX-M.value.mouse.clientX}const re=M.value.aside[I.value]+ie,pe=$(re)+s.value,Ne=`${pe}px`;d.value?v.value.style[I.value]=Ne:x.value.style[n.value]=Ne,Y(pe)},V=()=>{if(x.value.style.visibility="hidden",k.value.style.display="none",document.removeEventListener("mousemove",D),document.removeEventListener("mouseup",V),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{le(),t("after-resize",parseFloat(x.value.style[n.value]))}),d.value)return!1;v.value.style[I.value]=x.value.style[n.value]};document.addEventListener("mousemove",D),document.addEventListener("mouseup",V)},le=()=>{if(!u.value)return!1;const ee=v.value.getBoundingClientRect();if(C.value=m.value=ee[I.value]<=E.value,!C.value)return p.value=!0,!1;ne(),a.nextTick(()=>{v.value.setAttribute(`data-${I.value}`,L.value[I.value])})},se=ee=>{m.value=typeof ee=="boolean"?ee:!m.value,ne(),t("collapse-change",m.value)},ne=()=>{const ee=v.value.getBoundingClientRect();fe(!m.value),m.value?(v.value.setAttribute(`data-${I.value}`,`${ee[I.value]}px`),v.value.style[I.value]="5px"):(p.value=!0,v.value.style[I.value]=v.value.getAttribute(`data-${I.value}`))},fe=ee=>{const ae=()=>{p.value=ee,v.value.style.transition="",v.value.removeEventListener("transitionend",ae)};v.value.addEventListener("transitionend",ae),v.value.style.transition=`${I.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};return a.onMounted(()=>{A.observe(T.value)}),a.onBeforeUnmount(()=>{A.unobserve(T.value)}),{collapsed:m,asideContentVisible:p,minimized:C,limitMax:y,state:M,vertical:b,cssPropKey:I,bkResizeLayoutRef:T,resizeProxyRef:x,resizeMaskRef:k,asideRef:v,triggerStyle:N,asideStyle:L,handleMousedown:_,setCollapse:se}},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(Ln,{class:"bk-resize-collapse",onClick:this.setCollapse},null):a.createVNode(Mi,{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 w9=He(TC),xC={list:g.array.def([]),titleAble:g.bool.def(!1),extCls:g.string};var SC=a.defineComponent({name:"Timeline",props:xC,emits:["select"],setup(e,{emit:t}){const n=a.ref([]),i=c=>{const f=[];c.forEach(d=>{var u;f.push({tag:d.tag,content:d.content,type:d.type,size:d.size,color:d.color,icon:d.icon,filled:d.filled,border:(u=d.border)!=null?u:!0})}),n.value.splice(0,n.value.length,...f)},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(f){console.warn(f)}};return a.onMounted(s),a.watch(()=>e.list,()=>{i(e.list)},{deep:!0}),{defaultTimelines:n,titleSelect:o}},render(){const e=n=>{const{icon:i}=n;return i?typeof i=="function":!1},t=n=>{const i="bk-timeline",s=["blue","red","green","yellow","gray"],o=n.type?`${i}-${n.type}`:`${i}-default`,c=n.size?`${i}-${n.size}`:"",f=n.filled?`${i}-filled`:"",d=n.color&&s.includes(n.color)?`${i}-${n.color}`:"";return De({},`${i} ${o} ${c} ${d} ${f}`)};return a.createVNode("ul",{class:["bk-timeline",this.extCls]},[this.defaultTimelines.map(n=>{var i,s,o;return a.createVNode("li",{class:["bk-timeline-dot",t(n)]},[e(n)?a.createVNode("div",{class:"bk-timeline-icon",style:{border:n.border?`2px solid ${n.color}`:"0px",borderRadius:n.border?"50%":"0"}},[a.createVNode("span",{class:"bk-timeline-icon-inner"},[a.createVNode(n.icon,null,null)])]):"",a.createVNode("div",{class:"bk-timeline-section"},[a.createVNode("div",{class:"bk-timeline-title",onClick:()=>{this.titleSelect(n)}},[(o=(s=(i=this.$slots).default)==null?void 0:s.call(i))!=null?o:a.createVNode("span",{innerHTML:n.tag},null)]),n.content?a.createVNode("div",{class:"bk-timeline-content",innerHTML:n.content},null):""])])})])}});const M9=He(SC),DC={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 jC=a.defineComponent({name:"Process",props:DC,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(f){console.warn(f)}};return a.onMounted(s),{defaultProcessList:n,paddingBottom:i,jumpTo:o}},render(){const e="bk-process",t=De({[`${this.extCls}`]:!!this.extCls},`${e}`),n=f=>f.status==="loading",i=f=>f.status==="error",s=f=>this.curProcess>=f+1||this.defaultProcessList[f].status==="done",o=f=>f.icon?f.icon:"",c=(f,d)=>{if(f===this.curProcess-1&&n(d))return a.createVNode(Ts,{class:"bk-icon bk-process-icon icon-loading"},null);if(f===this.curProcess-1&&i(d))return a.createVNode(Qn,{class:"bk-process-icon"},null);if(f===this.curProcess-1&&o(d))return a.createVNode("span",{class:"bk-process-icon-custom"},[a.createVNode(d.icon,null,null)]);if(s(f))return a.createVNode(Ui,{class:"bk-process-icon-done"},null)};return a.createVNode("div",{class:t},[a.createVNode("ul",{style:{paddingBottom:`${this.paddingBottom}px`}},[this.defaultProcessList.map((f,d)=>a.createVNode("li",{onClick:()=>{this.jumpTo(d+1)},style:{cursor:this.controllable?"pointer":""},class:{success:this.curProcess>=d+1,current:n(f)&&d===this.curProcess-1,error:i(f)&&d===this.curProcess-1}},[f[this.displayKey],c(d,f)]))])])}});const I9=He(jC),ra="bk-upload";var li=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(li||{}),Qa=(e=>(e.NEW="new",e.UPLOADING="uploading",e.SUCCESS="success",e.FAIL="fail",e))(Qa||{});const N9=[li.BUTTON,li.DRAGGABLE,li.PICTURE];var oi={theme:{type:String,default:"draggable",validator:e=>!e||N9.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of \u3010${N9.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 L9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var zC=a.defineComponent({name:"UploadList",props:{theme:oi.theme,disabled:oi.disabled,files:oi.files,multiple:oi.multiple},emits:["remove","retry"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:s,multiple:o}=a.toRefs(e),c=`${ra}-list`,f=a.computed(()=>i.value===li.PICTURE),d=a.computed(()=>f.value&&!o.value),u=a.computed(()=>De({[c]:!0,[`${c}--${i.value}`]:!0,[`${c}--disabled`]:s.value}));function m(v){const b=["Bytes","KB","MB","GB","TB"],I=Math.floor(Math.log(v)/Math.log(1024));return`${(v/1024**I).toFixed(2)}${b[I]}`}function p(v,b){n("remove",v,b)}function C(v,b){n("retry",v,b)}const y=()=>{let v;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},L9(v=e.files.map(b=>{const I=De({[`${c}__item`]:!0,[`${c}__item-picture`]:!0,[`${c}__item--${b.status}`]:!0});return a.createVNode("li",{key:b.uid,class:I},[t!=null&&t.file?t.file({file:b}):M(b)])}))?v:{default:()=>[v]})},M=v=>[a.withDirectives(a.createVNode("img",{src:v.url,class:`${c}__picture-item-thumbnail`,alt:""},null),[[a.vShow,v.status!=="uploading"]]),a.createVNode(a.Fragment,null,[v.status==="uploading"&&a.createVNode(Dr,{class:`${c}__picture-item-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:v.percentage},null)]),a.createVNode(a.Fragment,null,[!s.value&&a.createVNode("div",{class:`${c}__picture-item-actions`},[a.createVNode(Cr,{class:"action-icon",onClick:b=>p(v,b)},null)])])],T=()=>{let v;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},L9(v=e.files.map(b=>{const I=De({[`${c}__item`]:!0,[`${c}__item--${b.status}`]:!0});return a.createVNode("li",{key:b.uid,class:I},[t!=null&&t.file?t.file({file:b}):k(b)])}))?v:{default:()=>[v]})},x=v=>{var O;const b=(O=v==null?void 0:v.raw)==null?void 0:O.type,[I]=(b==null?void 0:b.split("/"))||"";let N={text:Ir,image:Uo,application:Ir,video:nc,audio:_o}[I]||Ir;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(b)&&(N=Jo),a.h(N,{class:`${c}__item-file-icon`})},k=v=>[a.createVNode("div",{class:`${c}__item-icon`},[v.isPic?a.createVNode("img",{src:v.url,class:`${c}__item-thumbnail`,alt:""},null):x(v)]),a.createVNode("div",{class:`${c}__item-summary`},[a.createVNode("div",{class:`${c}__item-name`,title:v.name},[v.name]),v.status!=="uploading"&&a.createVNode("div",{class:`${c}__item-message`,title:v.statusText},[v.status==="success"&&a.createVNode("span",null,[a.createVNode(Ui,{class:`${c}__item-message-success-icon`},null),v.statusText||"\u4E0A\u4F20\u6210\u529F"]),v.status==="fail"&&a.createVNode("span",null,[v.statusText||"\u4E0A\u4F20\u5931\u8D25"])]),v.status==="uploading"&&a.createVNode(Dr,{class:`${c}__item-progress`,showText:!1,percent:v.percentage,size:"small"},null),v.status!=="fail"&&a.createVNode("div",{class:`${c}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-size`},[m(v.size)]),[[a.vShow,v.size]]),a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-percentage`},[v.percentage,a.createTextVNode("%")]),[[a.vShow,v.status==="uploading"]])]),!s.value&&a.createVNode("div",{class:`${c}__item-actions`},[v.status==="fail"&&a.createVNode(Ko,{class:`${c}__item-retry-icon`,onClick:b=>C(v,b)},null),a.createVNode(Cr,{class:`${c}__item-del-icon`,onClick:b=>p(v,b)},null)])])];return()=>{var v;return a.createVNode(a.Fragment,null,[d.value?(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger((v=e.files)==null?void 0:v[0])):a.createVNode("ul",{class:u.value},[f.value?y():T(),(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger())])])}}}),k9=a.defineComponent({name:"UploadTrigger",props:{theme:oi.theme,disabled:oi.disabled,multiple:oi.multiple,accept:oi.accept,file:{type:Object}},emits:["change","remove"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:s,file:o,multiple:c,accept:f}=a.toRefs(e),d=`${ra}-trigger`,u=a.computed(()=>i.value===li.BUTTON),m=a.computed(()=>i.value===li.DRAGGABLE),p=a.computed(()=>i.value===li.PICTURE),C=a.computed(()=>p.value&&!c.value),y=a.computed(()=>p.value&&!f.value?"image/png,image/jpeg,image/jpg":f.value),M=a.ref(null),T=a.computed(()=>{var $,_,le;return De({[d]:!0,[`${d}--${i.value}`]:!0,[`${d}--single-picture`]:C.value,[`${d}--has-file`]:($=o.value)!=null?$:!1,[`${d}--${(_=o.value)==null?void 0:_.status}`]:(le=o.value)!=null?le:!1,[`${d}--dragover`]:L.value,[`${d}--disabled`]:s.value})}),x=()=>{M.value.value=null,M.value.click()},k=$=>{const{files:_}=$.target;n("change",Array.from(_))},v=()=>{e.disabled||x()},b=$=>{$.defaultPrevented||$.target!==$.currentTarget||(($.code==="Enter"||$.code==="Space")&&x(),$.preventDefault())};function I($,_){n("remove",$,_),_.stopPropagation(),_.preventDefault()}const L=a.ref(!1),N=()=>{const $=ne=>{if(s.value)return;ne.preventDefault(),L.value=!1;const fe=Array.from(ne.dataTransfer.files);if(!y.value){n("change",fe);return}const ee=fe.filter(ae=>{const{type:Y,name:D}=ae,V=D.includes(".")?`.${D.split(".").pop()}`:"",W=Y.replace(/\/.*$/,"");return y.value.split(",").map(ie=>ie.trim()).filter(ie=>ie).some(ie=>ie.startsWith(".")?V===ie:/\/\*$/.test(ie)?W===ie.replace(/\/\*$/,""):/^[^/]+\/[^/]+$/.test(ie)?Y===ie:!1)});n("change",ee)},_=ne=>{ne.preventDefault(),L.value=!0},le=()=>{L.value=!1},se=De({[`${d}__draggable`]:!0});return a.createVNode("div",{class:se,onDrop:$,onDragover:_,onDragleave:le},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(As,{class:`${d}__draggable-icon`},null),a.createVNode("div",{class:`${d}__draggable-text`},[a.createTextVNode("\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904\u6216"),a.createVNode("span",{class:`${d}__draggable-upload-link`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])])])},E=()=>a.createVNode(a.Fragment,null,[C.value&&e.file?A(e.file):O()]),O=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${d}__picture-inner`},[a.createVNode(Es,{class:`${d}__picture-icon`},null),a.createVNode("div",{class:`${d}__picture-text`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])]),A=$=>[a.withDirectives(a.createVNode("img",{src:$.url,class:`${d}__picture-thumbnail`,alt:""},null),[[a.vShow,$.status!=="uploading"]]),a.createVNode(a.Fragment,null,[$.status==="uploading"&&a.createVNode(Dr,{class:`${d}__picture-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:$.percentage},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${d}__picture-actions`},[a.createVNode(Cr,{class:"action-icon",onClick:_=>I($,_)},null)])])],R=()=>a.createVNode(Zt,{disabled:s.value},{default:()=>[a.createVNode(As,{class:`${d}__button-icon`},null),a.createVNode("span",{class:`${d}__button-text`},[a.createTextVNode("\u4E0A\u4F20\u6587\u4EF6")])]}),J=()=>{if(u.value)return R();if(m.value)return N();if(p.value)return E()};return()=>{var $;return a.createVNode("div",{class:T.value,tabindex:"0",onClick:v,onKeydown:b},[t.trigger?[t.trigger(),($=t==null?void 0:t.default)==null?void 0:$.call(t)]:J(),a.createVNode("input",{ref:M,class:"bk-upload__input-file",tabindex:"-1",onChange:k,accept:y.value,multiple:c.value,disabled:s.value,type:"file"},null)])}}}),T9={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(k,v){var b=k[0],I=k[1],L=k[2],N=k[3];b+=(I&L|~I&N)+v[0]-680876936|0,b=(b<<7|b>>>25)+I|0,N+=(b&I|~b&L)+v[1]-389564586|0,N=(N<<12|N>>>20)+b|0,L+=(N&b|~N&I)+v[2]+606105819|0,L=(L<<17|L>>>15)+N|0,I+=(L&N|~L&b)+v[3]-1044525330|0,I=(I<<22|I>>>10)+L|0,b+=(I&L|~I&N)+v[4]-176418897|0,b=(b<<7|b>>>25)+I|0,N+=(b&I|~b&L)+v[5]+1200080426|0,N=(N<<12|N>>>20)+b|0,L+=(N&b|~N&I)+v[6]-1473231341|0,L=(L<<17|L>>>15)+N|0,I+=(L&N|~L&b)+v[7]-45705983|0,I=(I<<22|I>>>10)+L|0,b+=(I&L|~I&N)+v[8]+1770035416|0,b=(b<<7|b>>>25)+I|0,N+=(b&I|~b&L)+v[9]-1958414417|0,N=(N<<12|N>>>20)+b|0,L+=(N&b|~N&I)+v[10]-42063|0,L=(L<<17|L>>>15)+N|0,I+=(L&N|~L&b)+v[11]-1990404162|0,I=(I<<22|I>>>10)+L|0,b+=(I&L|~I&N)+v[12]+1804603682|0,b=(b<<7|b>>>25)+I|0,N+=(b&I|~b&L)+v[13]-40341101|0,N=(N<<12|N>>>20)+b|0,L+=(N&b|~N&I)+v[14]-1502002290|0,L=(L<<17|L>>>15)+N|0,I+=(L&N|~L&b)+v[15]+1236535329|0,I=(I<<22|I>>>10)+L|0,b+=(I&N|L&~N)+v[1]-165796510|0,b=(b<<5|b>>>27)+I|0,N+=(b&L|I&~L)+v[6]-1069501632|0,N=(N<<9|N>>>23)+b|0,L+=(N&I|b&~I)+v[11]+643717713|0,L=(L<<14|L>>>18)+N|0,I+=(L&b|N&~b)+v[0]-373897302|0,I=(I<<20|I>>>12)+L|0,b+=(I&N|L&~N)+v[5]-701558691|0,b=(b<<5|b>>>27)+I|0,N+=(b&L|I&~L)+v[10]+38016083|0,N=(N<<9|N>>>23)+b|0,L+=(N&I|b&~I)+v[15]-660478335|0,L=(L<<14|L>>>18)+N|0,I+=(L&b|N&~b)+v[4]-405537848|0,I=(I<<20|I>>>12)+L|0,b+=(I&N|L&~N)+v[9]+568446438|0,b=(b<<5|b>>>27)+I|0,N+=(b&L|I&~L)+v[14]-1019803690|0,N=(N<<9|N>>>23)+b|0,L+=(N&I|b&~I)+v[3]-187363961|0,L=(L<<14|L>>>18)+N|0,I+=(L&b|N&~b)+v[8]+1163531501|0,I=(I<<20|I>>>12)+L|0,b+=(I&N|L&~N)+v[13]-1444681467|0,b=(b<<5|b>>>27)+I|0,N+=(b&L|I&~L)+v[2]-51403784|0,N=(N<<9|N>>>23)+b|0,L+=(N&I|b&~I)+v[7]+1735328473|0,L=(L<<14|L>>>18)+N|0,I+=(L&b|N&~b)+v[12]-1926607734|0,I=(I<<20|I>>>12)+L|0,b+=(I^L^N)+v[5]-378558|0,b=(b<<4|b>>>28)+I|0,N+=(b^I^L)+v[8]-2022574463|0,N=(N<<11|N>>>21)+b|0,L+=(N^b^I)+v[11]+1839030562|0,L=(L<<16|L>>>16)+N|0,I+=(L^N^b)+v[14]-35309556|0,I=(I<<23|I>>>9)+L|0,b+=(I^L^N)+v[1]-1530992060|0,b=(b<<4|b>>>28)+I|0,N+=(b^I^L)+v[4]+1272893353|0,N=(N<<11|N>>>21)+b|0,L+=(N^b^I)+v[7]-155497632|0,L=(L<<16|L>>>16)+N|0,I+=(L^N^b)+v[10]-1094730640|0,I=(I<<23|I>>>9)+L|0,b+=(I^L^N)+v[13]+681279174|0,b=(b<<4|b>>>28)+I|0,N+=(b^I^L)+v[0]-358537222|0,N=(N<<11|N>>>21)+b|0,L+=(N^b^I)+v[3]-722521979|0,L=(L<<16|L>>>16)+N|0,I+=(L^N^b)+v[6]+76029189|0,I=(I<<23|I>>>9)+L|0,b+=(I^L^N)+v[9]-640364487|0,b=(b<<4|b>>>28)+I|0,N+=(b^I^L)+v[12]-421815835|0,N=(N<<11|N>>>21)+b|0,L+=(N^b^I)+v[15]+530742520|0,L=(L<<16|L>>>16)+N|0,I+=(L^N^b)+v[2]-995338651|0,I=(I<<23|I>>>9)+L|0,b+=(L^(I|~N))+v[0]-198630844|0,b=(b<<6|b>>>26)+I|0,N+=(I^(b|~L))+v[7]+1126891415|0,N=(N<<10|N>>>22)+b|0,L+=(b^(N|~I))+v[14]-1416354905|0,L=(L<<15|L>>>17)+N|0,I+=(N^(L|~b))+v[5]-57434055|0,I=(I<<21|I>>>11)+L|0,b+=(L^(I|~N))+v[12]+1700485571|0,b=(b<<6|b>>>26)+I|0,N+=(I^(b|~L))+v[3]-1894986606|0,N=(N<<10|N>>>22)+b|0,L+=(b^(N|~I))+v[10]-1051523|0,L=(L<<15|L>>>17)+N|0,I+=(N^(L|~b))+v[1]-2054922799|0,I=(I<<21|I>>>11)+L|0,b+=(L^(I|~N))+v[8]+1873313359|0,b=(b<<6|b>>>26)+I|0,N+=(I^(b|~L))+v[15]-30611744|0,N=(N<<10|N>>>22)+b|0,L+=(b^(N|~I))+v[6]-1560198380|0,L=(L<<15|L>>>17)+N|0,I+=(N^(L|~b))+v[13]+1309151649|0,I=(I<<21|I>>>11)+L|0,b+=(L^(I|~N))+v[4]-145523070|0,b=(b<<6|b>>>26)+I|0,N+=(I^(b|~L))+v[11]-1120210379|0,N=(N<<10|N>>>22)+b|0,L+=(b^(N|~I))+v[2]+718787259|0,L=(L<<15|L>>>17)+N|0,I+=(N^(L|~b))+v[9]-343485551|0,I=(I<<21|I>>>11)+L|0,k[0]=b+k[0]|0,k[1]=I+k[1]|0,k[2]=L+k[2]|0,k[3]=N+k[3]|0}function o(k){var v=[],b;for(b=0;b<64;b+=4)v[b>>2]=k.charCodeAt(b)+(k.charCodeAt(b+1)<<8)+(k.charCodeAt(b+2)<<16)+(k.charCodeAt(b+3)<<24);return v}function c(k){var v=[],b;for(b=0;b<64;b+=4)v[b>>2]=k[b]+(k[b+1]<<8)+(k[b+2]<<16)+(k[b+3]<<24);return v}function f(k){var v=k.length,b=[1732584193,-271733879,-1732584194,271733878],I,L,N,E,O,A;for(I=64;I<=v;I+=64)s(b,o(k.substring(I-64,I)));for(k=k.substring(I-64),L=k.length,N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],I=0;I<L;I+=1)N[I>>2]|=k.charCodeAt(I)<<(I%4<<3);if(N[I>>2]|=128<<(I%4<<3),I>55)for(s(b,N),I=0;I<16;I+=1)N[I]=0;return E=v*8,E=E.toString(16).match(/(.*?)(.{0,8})$/),O=parseInt(E[2],16),A=parseInt(E[1],16)||0,N[14]=O,N[15]=A,s(b,N),b}function d(k){var v=k.length,b=[1732584193,-271733879,-1732584194,271733878],I,L,N,E,O,A;for(I=64;I<=v;I+=64)s(b,c(k.subarray(I-64,I)));for(k=I-64<v?k.subarray(I-64):new Uint8Array(0),L=k.length,N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],I=0;I<L;I+=1)N[I>>2]|=k[I]<<(I%4<<3);if(N[I>>2]|=128<<(I%4<<3),I>55)for(s(b,N),I=0;I<16;I+=1)N[I]=0;return E=v*8,E=E.toString(16).match(/(.*?)(.{0,8})$/),O=parseInt(E[2],16),A=parseInt(E[1],16)||0,N[14]=O,N[15]=A,s(b,N),b}function u(k){var v="",b;for(b=0;b<4;b+=1)v+=i[k>>b*8+4&15]+i[k>>b*8&15];return v}function m(k){var v;for(v=0;v<k.length;v+=1)k[v]=u(k[v]);return k.join("")}m(f("hello")),typeof ArrayBuffer!="undefined"&&!ArrayBuffer.prototype.slice&&function(){function k(v,b){return v=v|0||0,v<0?Math.max(v+b,0):Math.min(v,b)}ArrayBuffer.prototype.slice=function(v,b){var I=this.byteLength,L=k(v,I),N=I,E,O,A,R;return b!==n&&(N=k(b,I)),L>N?new ArrayBuffer(0):(E=N-L,O=new ArrayBuffer(E),A=new Uint8Array(O),R=new Uint8Array(this,L,E),A.set(R),O)}}();function p(k){return/[\u0080-\uFFFF]/.test(k)&&(k=unescape(encodeURIComponent(k))),k}function C(k,v){var b=k.length,I=new ArrayBuffer(b),L=new Uint8Array(I),N;for(N=0;N<b;N+=1)L[N]=k.charCodeAt(N);return v?L:I}function y(k){return String.fromCharCode.apply(null,new Uint8Array(k))}function M(k,v,b){var I=new Uint8Array(k.byteLength+v.byteLength);return I.set(new Uint8Array(k)),I.set(new Uint8Array(v),k.byteLength),b?I:I.buffer}function T(k){var v=[],b=k.length,I;for(I=0;I<b-1;I+=2)v.push(parseInt(k.substr(I,2),16));return String.fromCharCode.apply(String,v)}function x(){this.reset()}return x.prototype.append=function(k){return this.appendBinary(p(k)),this},x.prototype.appendBinary=function(k){this._buff+=k,this._length+=k.length;var v=this._buff.length,b;for(b=64;b<=v;b+=64)s(this._hash,o(this._buff.substring(b-64,b)));return this._buff=this._buff.substring(b-64),this},x.prototype.end=function(k){var v=this._buff,b=v.length,I,L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],N;for(I=0;I<b;I+=1)L[I>>2]|=v.charCodeAt(I)<<(I%4<<3);return this._finish(L,b),N=m(this._hash),k&&(N=T(N)),this.reset(),N},x.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},x.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},x.prototype.setState=function(k){return this._buff=k.buff,this._length=k.length,this._hash=k.hash,this},x.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},x.prototype._finish=function(k,v){var b=v,I,L,N;if(k[b>>2]|=128<<(b%4<<3),b>55)for(s(this._hash,k),b=0;b<16;b+=1)k[b]=0;I=this._length*8,I=I.toString(16).match(/(.*?)(.{0,8})$/),L=parseInt(I[2],16),N=parseInt(I[1],16)||0,k[14]=L,k[15]=N,s(this._hash,k)},x.hash=function(k,v){return x.hashBinary(p(k),v)},x.hashBinary=function(k,v){var b=f(k),I=m(b);return v?T(I):I},x.ArrayBuffer=function(){this.reset()},x.ArrayBuffer.prototype.append=function(k){var v=M(this._buff.buffer,k,!0),b=v.length,I;for(this._length+=k.byteLength,I=64;I<=b;I+=64)s(this._hash,c(v.subarray(I-64,I)));return this._buff=I-64<b?new Uint8Array(v.buffer.slice(I-64)):new Uint8Array(0),this},x.ArrayBuffer.prototype.end=function(k){var v=this._buff,b=v.length,I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],L,N;for(L=0;L<b;L+=1)I[L>>2]|=v[L]<<(L%4<<3);return this._finish(I,b),N=m(this._hash),k&&(N=T(N)),this.reset(),N},x.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},x.ArrayBuffer.prototype.getState=function(){var k=x.prototype.getState.call(this);return k.buff=y(k.buff),k},x.ArrayBuffer.prototype.setState=function(k){return k.buff=C(k.buff,!0),x.prototype.setState.call(this,k)},x.ArrayBuffer.prototype.destroy=x.prototype.destroy,x.ArrayBuffer.prototype._finish=x.prototype._finish,x.ArrayBuffer.hash=function(k,v){var b=d(new Uint8Array(k)),I=m(b);return v?T(I):I},x})})(T9);var x9=T9.exports;function eu(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const OC=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[f,d]of Object.entries(c))Array.isArray(d)?i.append(f,...d):i.append(f,d)})}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(eu(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,f=o.value;t.setRequestHeader(c,f)});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))gf(c)||t.setRequestHeader(o,String(c));return t.send(i),t},S9=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,EC=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 AC(n,t),o=[];PC(e,n,i,s,o,t),await Promise.all(o).then(()=>{const c={size:n.size,name:n.name,total:i,hash:s},f=new XMLHttpRequest;f.open(e.method,e.mergeUrl,!0),f.onreadystatechange=()=>{if(f.readyState===4){if(f.status<200||f.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(eu(f))}},f.onloadend=()=>{e.onComplete()},f.setRequestHeader("Content-type","application/JSON"),f.send(JSON.stringify(c))})},PC=(e,t,n,i,s,o)=>{for(let c=0;c<n;c++){const f=new Promise((d,u)=>{const m=c*o,p=Math.min(t.size,m+o),C=new FormData;if(e.data){let T=e.data;Array.isArray(T)||(T=[T]),T.forEach(x=>{for(const[k,v]of Object.entries(x))Array.isArray(v)?C.append(k,...v):C.append(k,v)})}if(e.formDataAttributes){let T=e.formDataAttributes;Array.isArray(T)||(T=[T]),T.forEach(x=>{Array.isArray(x.value)?C.append(x.name,...x.value):C.append(x.name,x.value)})}C.append("file",S9.call(t,m,p)),C.append("name",t.name),C.append("total",n.toString()),C.append("index",c.toString()),C.append("size",t.size.toString()),C.append("hash",i.toString());const y=new XMLHttpRequest;if(y.onreadystatechange=()=>{if(y.readyState===4){const T=eu(y);y.status<200||y.status>=300?(u(T),e.onError(new Error("An error occurred during upload"))):d("reponseText")}},y.upload.addEventListener("progress",T=>{const x=T;e.onProgress(x,c)},!1),e.withCredentials&&"withCredentials"in y&&(y.withCredentials=!0),y.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(T=>{const x=T.name,k=T.value;y.setRequestHeader(x,k)});else{const T=e.header.name,x=e.header.value;y.setRequestHeader(T,x)}const M=e.headers||{};if(M instanceof Headers)M.forEach((T,x)=>y.setRequestHeader(x,T));else for(const[T,x]of Object.entries(M))gf(x)||y.setRequestHeader(T,String(x));y.send(C)});s.push(f)}},AC=(e,t)=>new Promise((n,i)=>{const s=Math.ceil(e.size/t);let o=0;const c=new x9.ArrayBuffer,f=new FileReader;function d(){const u=o*t,m=u+t>=e.size?e.size:u+t;f.readAsArrayBuffer(S9.call(e,u,m))}f.onload=u=>{if(c.append(u.target.result),o+=1,o<s)d();else{const m=c.end(),p=new x9;p.append(m),p.append(e.name);const C=p.end();n(C)}},f.onerror=()=>{i(new Error("File slcie failed"))},d()}).catch(n=>{console.log(n)});function D9(e){return Date.now()+e}var VC=(e,t)=>{const n=a.computed(()=>{var C;return typeof e.size=="number"?e.size:(C=e==null?void 0:e.size)==null?void 0:C.maxImgSize}),i=a.computed(()=>{var C;return typeof e.size=="number"?e.size:(C=e==null?void 0:e.size)==null?void 0:C.maxImgSize}),s=a.ref([]);function o(C){return s.value.find(y=>y.uid===C.uid)}let c=0;function f(C){var x;c+=1,C.uid=D9(c);const y={uid:C.uid,name:C.name,status:Qa.NEW,size:C.size,raw:C},M=C.type.startsWith("image/");let T=null;if(M){try{y.url=window.URL.createObjectURL(C)}catch(k){console.error(k)}y.isPic=!0}return e.validateName&&!((x=e.validateName)!=null&&x.test(y.name))&&(y.status=Qa.FAIL,y.statusText="invalid filename",T=new Error(y.statusText)),M&&C.size>n.value*1024**2&&(y.status=Qa.FAIL,y.statusText="invalid file size",T=new Error(y.statusText)),!M&&C.size>i.value*1024**2&&(y.status=Qa.FAIL,y.statusText="invalid file size",T=new Error(y.statusText)),s.value.push(y),T}async function d(C){var T;const y=C instanceof File?o(C):C,M=x=>{var k;t.onRemove(x,s.value),s.value.splice(s.value.indexOf(y),1),(k=x.url)!=null&&k.startsWith("blob:")&&URL.revokeObjectURL(x.url)};e.beforeRemove?await((T=e.beforeRemove)==null?void 0:T.call(e,y,s.value))!==!1&&M(y):M(y)}async function u(C,y,M){const T=o(y);!T||(T.status="fail",T.statusText=C.message,T.response=M)}async function m(C,y){const M=o(y);!M||(M.status="success",M.response=C)}async function p(C,y){const M=o(y);!M||(M.status="uploading",M.percentage=Math.round(C.percent))}return a.watch(()=>e.files,C=>{s.value=C.map(y=>{var M,T;return c+=1,Te(U({},y),{uid:(M=y.uid)!=null?M:D9(c),status:(T=y.status)!=null?T:Qa.SUCCESS})})},{immediate:!0,deep:!0}),{fileList:s,handlePreprocess:f,handleRemove:d,handleError:u,handleSuccess:m,handleProgress:p}},JC=a.defineComponent({name:"Upload",props:oi,emits:["exceed","progress","success","error","delete","done"],setup(e,{slots:t,emit:n,expose:i}){const s=a.shallowRef({}),o=a.computed(()=>e.theme===li.PICTURE),c=a.computed(()=>o.value&&!e.multiple),f=a.computed(()=>{var L;return De({[ra]:!0,[`${ra}--${e.theme}`]:!0,[`${ra}--disabled`]:e.disabled,[`${ra}--single-picture`]:c.value,[e.extCls]:(L=e.extCls)!=null?L:!1})}),d={theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept};function u(L,N){I(L),n("delete",L,N)}const{fileList:m,handlePreprocess:p,handleRemove:C,handleProgress:y,handleSuccess:M,handleError:T}=VC(e,{onRemove:u});function x(L){if(!L.length)return;if(e.limit&&m.value.length+L.length>e.limit){n("exceed",L,m.value);return}let N=L;(!e.multiple||e.limit===1)&&(N=L.slice(0,1));for(const E of N){const O=E,A=p(O);if(A){n("error",O,m.value,A);return}e.autoUpload&&v(O,N)}}function k(L){b(L.raw)}async function v(L,N){var O;if(!e.beforeUpload)return b(L,N);let E;try{E=await((O=e.beforeUpload)==null?void 0:O.call(e,L))}catch{E=!1}if(E===!1){C(L);return}b(L,N)}function b(L,N){const{headers:E,header:O,data:A,formDataAttributes:R,method:J,withCredentials:$,name:_,url:le,sliceUrl:se,mergeUrl:ne,chunkSize:fe,customRequest:ee}=e,{uid:ae}=L,Y={headers:E,header:O,withCredentials:$,file:L,data:A,formDataAttributes:R,method:J,filename:_,action:le,sliceUrl:se,mergeUrl:ne,chunkSize:fe,onProgress:W=>{y(W,L),n("progress",W,L,m.value)},onSuccess:W=>{var re;const ie=W;if((re=e==null?void 0:e.handleResCode)!=null&&re.call(e,ie))M(W,L),n("success",W,L,m.value);else{const pe=new Error((ie==null?void 0:ie.message)||"unknow error");T(pe,L,W),n("error",L,m.value,pe)}delete s.value[ae]},onError:W=>{T(W,L),n("error",L,m.value,W),delete s.value[ae]},onComplete:()=>{N&&N.indexOf(L)===N.length-1&&n("done",m.value)}};let D=e.sliceUpload?EC:OC;ee&&(D=ee);const V=D(Y);s.value[ae]=V,V instanceof Promise&&V.then(Y.onSuccess,Y.onError)}function I(L){let N=s.value;L&&(N={[L.uid]:s.value[L.uid]}),Object.keys(N).forEach(E=>{if(N[E]instanceof XMLHttpRequest){const O=N[E];O==null||O.abort()}delete s.value[E]})}return a.onBeforeUnmount(()=>{m.value.forEach(({url:L})=>{L!=null&&L.startsWith("blob:")&&URL.revokeObjectURL(L)})}),i({handleRemove:C,handleRetry:k}),()=>a.createVNode("div",{class:f.value},[!o.value&&a.createVNode(k9,a.mergeProps(d,{onChange:x}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${ra}__tip`},[e.tip]),a.createVNode(zC,{files:m.value,theme:e.theme,disabled:e.disabled,multiple:e.multiple,onRemove:C,onRetry:k},{innerTrigger:L=>o.value&&a.createVNode(k9,a.mergeProps(d,{file:L,onChange:x,onRemove:C}),t),file:t.file})])}});const j9=He(JC);function Ei(){}Ei.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(T){return s?(setTimeout(function(){s(void 0,T)},0),!0):T}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var f=n.length,d=t.length,u=1,m=f+d,p=[{newPos:-1,components:[]}],C=this.extractCommon(p[0],n,t,0);if(p[0].newPos+1>=f&&C+1>=d)return c([{value:this.join(n),count:n.length}]);function y(){for(var T=-1*u;T<=u;T+=2){var x=void 0,k=p[T-1],v=p[T+1],b=(v?v.newPos:0)-T;k&&(p[T-1]=void 0);var I=k&&k.newPos+1<f,L=v&&0<=b&&b<d;if(!I&&!L){p[T]=void 0;continue}if(!I||L&&k.newPos<v.newPos?(x=RC(v),o.pushComponent(x.components,void 0,!0)):(x=k,x.newPos++,o.pushComponent(x.components,!0,void 0)),b=o.extractCommon(x,n,t,T),x.newPos+1>=f&&b+1>=d)return c(QC(o,x.components,n,t,o.useLongestToken));p[T]=x}u++}if(s)(function T(){setTimeout(function(){if(u>m)return s();y()||T()},0)})();else for(;u<=m;){var M=y();if(M)return M}},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,f=t.newPos,d=f-s,u=0;f+1<o&&d+1<c&&this.equals(n[f+1],i[d+1]);)f++,d++,u++;return u&&t.components.push({count:u}),t.newPos=f,d},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 QC(e,t,n,i,s){for(var o=0,c=t.length,f=0,d=0;o<c;o++){var u=t[o];if(u.removed){if(u.value=e.join(i.slice(d,d+u.count)),d+=u.count,o&&t[o-1].added){var p=t[o-1];t[o-1]=t[o],t[o]=p}}else{if(!u.added&&s){var m=n.slice(f,f+u.count);m=m.map(function(y,M){var T=i[d+M];return T.length>y.length?T:y}),u.value=e.join(m)}else u.value=e.join(n.slice(f,f+u.count));f+=u.count,u.added||(d+=u.count)}}var C=t[c-1];return c>1&&typeof C.value=="string"&&(C.added||C.removed)&&e.equals("",C.value)&&(t[c-2].value+=C.value,t.pop()),t}function RC(e){return{newPos:e.newPos,components:e.components.slice(0)}}var z9=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,O9=/\S/,E9=new Ei;E9.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!O9.test(e)&&!O9.test(t)},E9.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]&&z9.test(t[n])&&z9.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var tu=new Ei;tu.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 _C(e,t,n){return tu.diff(e,t,n)}var WC=new Ei;WC.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var HC=new Ei;HC.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function gl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?gl=function(t){return typeof t}:gl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gl(e)}function nu(e){return BC(e)||FC(e)||GC(e)||ZC()}function BC(e){if(Array.isArray(e))return iu(e)}function FC(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function GC(e,t){if(!!e){if(typeof e=="string")return iu(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 iu(e,t)}}function iu(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 ZC(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
58
58
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var YC=Object.prototype.toString,Rr=new Ei;Rr.useLongestToken=!0,Rr.tokenize=tu.tokenize,Rr.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(au(e,null,null,s),s," ")},Rr.equals=function(e,t){return Ei.prototype.equals.call(Rr,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function au(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(YC.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]=au(e[o],t,n,i,s);return t.pop(),n.pop(),c}if(e&&e.toJSON&&(e=e.toJSON()),gl(e)==="object"&&e!==null){t.push(e),c={},n.push(c);var f=[],d;for(d in e)e.hasOwnProperty(d)&&f.push(d);for(f.sort(),o=0;o<f.length;o+=1)d=f[o],c[d]=au(e[d],t,n,i,d);t.pop(),n.pop()}else c=e;return c}var ru=new Ei;ru.tokenize=function(e){return e.slice()},ru.join=ru.removeEmpty=function(e){return e};function UC(e,t,n,i,s,o,c){c||(c={}),typeof c.context=="undefined"&&(c.context=4);var f=_C(n,i,c);f.push({value:"",lines:[]});function d(k){return k.map(function(v){return" "+v})}for(var u=[],m=0,p=0,C=[],y=1,M=1,T=function(v){var b=f[v],I=b.lines||b.value.replace(/\n$/,"").split(`
59
59
  `);if(b.lines=I,b.added||b.removed){var L;if(!m){var N=f[v-1];m=y,p=M,N&&(C=c.context>0?d(N.lines.slice(-c.context)):[],m-=C.length,p-=C.length)}(L=C).push.apply(L,nu(I.map(function(le){return(b.added?"+":"-")+le}))),b.added?M+=I.length:y+=I.length}else{if(m)if(I.length<=c.context*2&&v<f.length-2){var E;(E=C).push.apply(E,nu(d(I)))}else{var O,A=Math.min(I.length,c.context);(O=C).push.apply(O,nu(d(I.slice(0,A))));var R={oldStart:m,oldLines:y-m+A,newStart:p,newLines:M-p+A,lines:C};if(v>=f.length-2&&I.length<=c.context){var J=/\n$/.test(n),$=/\n$/.test(i),_=I.length==0&&C.length>R.oldLines;!J&&_&&n.length>0&&C.splice(R.oldLines,0,"\"),(!J&&!_||!$)&&C.push("\")}u.push(R),m=0,p=0,C=[]}y+=I.length,M+=I.length}},x=0;x<f.length;x++)T(x);return{oldFileName:e,newFileName:t,oldHeader:s,newHeader:o,hunks:u}}function $C(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(`
60
60
  `)+`