bkui-vue 0.0.1-beta.182 → 0.0.1-beta.183

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 @@ ${ps(n)}`),i}})}function X1(e){const t=Object.keys(e),n=t.filter(l=>{var o;retur
54
54
  m 0 ${x?"":"-"}${N}
55
55
  a ${N} ${N} 0 1 1 0 ${x?"-":""}${N*2}
56
56
  a ${N} ${N} 0 1 1 0 ${x?"":"-"}${N*2}
57
- `,O={d:A,stroke:m||"#f5f5f5","stroke-linecap":d,"stroke-width":v,"fill-opacity":"0",class:"process-circle-trail",style:L},J={d:A,stroke:c||"#13ce66","stroke-linecap":d,"stroke-width":l>0&&v||0,"fill-opacity":"0",class:`process-circle-path bk-${h}-circle-trail`,style:k};return a.createVNode("div",{class:"progress-outer-circle",style:I},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",O,null),a.createVNode("path",J,null)]),a.createVNode("span",{class:"progress-circle-text",style:p},[n==null?void 0:n.default()])])},Gm=(e,{attrs:t,slots:n})=>{const{percent:i,strokeWidth:l,size:o,color:c,titleStyle:d,showText:h,textInside:f,theme:m}=t,p={height:`${l}px`,lineHeight:`${l}px`},v={width:`${i}%`,background:c,animationDuration:"3s"},C=(I=!0)=>(h||n.default)&&(I&&f||!I&&!f)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{class:`bk-progress-${o||"normal"} progress-bar`,style:p},[a.createVNode("div",{style:v,class:{"progress-inner":!0,[`bk-${m}`]:!0}},[a.createVNode("div",{class:"inner-text",style:d},[C()])])]),C(!1)])};function w0(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var _m=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 d;const{showText:e,format:t,percent:n,textInside:i,titleStyle:l,fixed:o}=this.$props,c=t((d=this.validPercent(n))==null?void 0:d.toFixed(o));return(e||this.$slots.default)&&i?this.$slots.default?this.$slots.default():a.createVNode("span",null,[c]):!e||i?null:a.createVNode("span",{class:"progress-text",style:typeof c=="string"?l:void 0},[this.$slots.default?this.$slots.default():c])}},render(){const e=this.renderProcessInfo(),t=Te(F({},this.$props),{percent:this.validPercent(this.percent)});let n=a.createVNode(Gm,t,w0(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(Zm,t,w0(e)?e:{default:()=>[e]}));const i={class:Se({extCls:!!this.extCls},`bk-progress bk-progress-${this.type}`)};return a.createVNode("div",i,[n])}});const wr=Ge(_m),v0=Symbol("RadioGroup");function I0(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const N0=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,i=a.inject(v0,To),l=!bf(i),o=a.ref(!1),c=a.computed(()=>l&&i.props.disabled?!0:t.disabled);l?a.watch(()=>i.props.modelValue,f=>{o.value=f===t.label},{immediate:!0}):a.watch(()=>t.modelValue,f=>{f!==""&&(o.value=f===t.label)},{immediate:!0});const d=(f=!0)=>{o.value=f},h=f=>{if(c.value)return;const m=f.target;o.value=m.checked;const p=o.value?t.label:"";n("change",p),n("update:modelValue",p),l&&i.handleChange(e.proxy),a.nextTick(()=>{m.checked!==o.value&&(m.checked=o.value)})};return a.onMounted(()=>{l&&i.register(e.proxy)}),a.onBeforeUnmount(()=>{l&&i.unregister(e.proxy)}),{isChecked:o,isDisabled:c,setChecked:d,handleChange:h}},Ym={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 Fm=a.defineComponent({name:"Radio",props:Ym,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=I0(),{isChecked:i,isDisabled:l,setChecked:o,handleChange:c}=N0();return{isFocused:e,isChecked:i,isDisabled:l,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=Se({"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 Um={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 $m=a.defineComponent({name:"RadioButton",props:Um,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=I0(),{isChecked:i,isDisabled:l,setChecked:o,handleChange:c}=N0();return{isFocused:e,isChecked:i,isDisabled:l,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=Se({"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 Xm={name:g.string.def(""),modelValue:g.oneOfType([String,Number,Boolean]),disabled:g.bool,withValidate:g.bool.def(!0)};var Km=a.defineComponent({name:"RadioGroup",props:Xm,emits:["change","update:modelValue"],setup(e,t){const n=On(),i=[],l=d=>{i.push(d)},o=d=>{const h=i.indexOf(d);h>-1&&i.splice(h,1)},c=d=>{const h=d.label;i.forEach(f=>{f!==d&&f.setChecked(!1)}),t.emit("update:modelValue",h),t.emit("change",h)};return a.provide(v0,{props:e,register:l,unregister:o,handleChange:c}),a.watch(()=>e.modelValue,()=>{var d;e.withValidate&&((d=n==null?void 0:n.validate)==null||d.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&i.forEach(d=>{d.setChecked(d.label===e.modelValue)})}),{}},render(){var e;return a.createVNode("div",{class:"bk-radio-group"},[(e=this.$slots)==null?void 0:e.default()])}});const L0=Rt(Fm,{Group:Km,Button:$m});var Gs=a.defineComponent({name:"Star",props:{rate:g.number.def(0),width:g.number.def(15),height:g.number.def(16),editable:g.bool.def(!0),hoverRate:g.number.def(0),max:g.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=d=>{if(!e.editable)return;const h=d+1;t("chooseRate",h)},i=d=>{if(!e.editable)return;const h=d+1;t("changeHover",h)},l=d=>Se({"bk-is-select":d<Math.floor(o.value),"bk-is-edit":e.editable,"bk-rate-star":!0}),o=a.computed(()=>e.hoverRate||e.rate),c={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:"bk-rate-stars"},[Array(e.max).fill(1).map((d,h)=>a.createVNode("svg",{class:l(h),style:c,x:"0px",y:"0px",viewBox:"0 0 64 64",onClick:()=>n(h),onMouseenter:()=>i(h)},[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)])])])])]))])}}),qm=a.defineComponent({name:"Rate",components:{star:Gs},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=On(),i=a.ref(0),l=p=>{!e.editable||(t("update:modelValue",p),t("change",p))},o=p=>{i.value=p},c=Se({"bk-rate":!0}),h={small:{width:12,height:12},large:{width:18,height:18}}[e.size]||{width:15,height:16},f=a.computed(()=>{const p=Math.floor(e.modelValue),v=(h.width+3)*p,C=h.width*(e.modelValue-p);return{width:`${v+C}px`}}),m={width:h.width,height:h.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(Gs,a.mergeProps({rate:e.modelValue,"hover-rate":i.value,onChooseRate:l,onChangeHover:o,onMouseleave:()=>o(0)},m),null):[a.createVNode(Gs,a.mergeProps({rate:5,style:f.value,class:"bk-score-real",editable:!1},m),null),a.createVNode(Gs,a.mergeProps({rate:0,editable:!1},m),null)]])}});const k0=Ge(qm);var ep=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:l,pics:o,list:c,height:d,width:h}=a.toRefs(e),f=a.ref(),m=a.ref(0),p=a.ref(0),v=a.ref(0),C=a.ref(0);let I;const N=a.computed(()=>{var H;return((H=c.value)==null?void 0:H.length)>0?c.value:o.value}),x=a.computed(()=>({width:`${p.value*N.value.length}px`,transform:`translateX(-${p.value*m.value}px)`})),T=a.computed(()=>({width:`${p.value}px`,height:`${v.value}px`})),y=H=>{let le=H;H>=N.value.length&&(le=0),H<0&&(le=N.value.length-1),m.value=le,t("index-change",le)},b=H=>{!H||window.open(H,"_blank")},M=H=>["bk-swiper-img",{"bk-swiper-link":H.link},H.class],L=H=>({"background-image":`url(${H.url})`,"background-color":H.color}),k=H=>({"bk-current-index":m.value===H}),A=()=>{i.value&&(C.value=window.setTimeout(()=>{y(m.value+1),A()},l.value))},O=()=>{window.clearTimeout(C.value)},J=()=>{var le;const H=(le=f.value)==null?void 0:le.parentElement;!H||!window.ResizeObserver||(I=new ResizeObserver(()=>{ee()}),I.observe(H))},P=()=>{var H;(H=I.disconnect)==null||H.call(I)},E=H=>{if(H===void 0)return{height:0,width:0};const le=getComputedStyle(H),de=H.clientWidth-parseFloat(le.paddingTop)-parseFloat(le.paddingBottom);return{height:H.clientHeight-parseFloat(le.paddingLeft)-parseFloat(le.paddingRight),width:de}},ee=()=>{var le;const H=E((le=f.value)==null?void 0:le.parentElement);p.value=+h.value>0?h.value:H.width,v.value=+d.value>0?d.value:H.height};return a.watch([d,h],ee),a.onMounted(()=>{ee(),A(),J()}),a.onBeforeUnmount(()=>{O(),P()}),()=>a.createVNode("section",{class:"bk-swiper-home",ref:f,style:T.value},[a.createVNode("hgroup",{style:x.value,class:"bk-transition bk-swiper-main"},[N.value.map(H=>{var le,de;return a.createVNode("h3",{class:"bk-swiper-card",style:T.value},[(de=(le=n.default)==null?void 0:le.call(n,H))!=null?de:a.createVNode("span",{class:M(H),style:L(H),onClick:()=>b(H.link)},null)])})]),a.createVNode("ul",{class:"bk-swiper-index"},[N.value.map((H,le)=>a.createVNode("li",{class:k(le),onMouseover:()=>y(le)},null))]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-prev",onClick:()=>y(m.value-1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-next",onClick:()=>y(m.value+1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)])])}});const T0=Ge(ep),wc=Symbol("BkSelect"),x0=Symbol("BkOptionGroup");function S0(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function vc(e){return{register:(i,l)=>{if(!!l){if(e.value.has(i)){console.warn(`repeat ${i}`,l);return}return e.value.set(i,l)}},unregister:i=>{e.value.delete(i)}}}function tp(e,t=200){let n,i=e;return a.customRef((l,o)=>({get(){return l(),i},set(c){clearTimeout(n),c===void 0||c===""?(i=c,o()):n=setTimeout(()=>{i=c,o()},t)}}))}function np(e,t){const{popoverMinWidth:n}=e;let i=null;const l=a.ref("auto"),o=a.ref(!1),c=()=>{o.value=!o.value},d=()=>{o.value=!1},h=()=>{o.value=!0},f=()=>{var m;l.value=Math.max((m=t.value)==null?void 0:m.offsetWidth,n)};return a.onMounted(()=>{!t.value||(i=z1(t.value,f,60,!0),i.start())}),a.onBeforeUnmount(()=>{i==null||i.stop(),i=null}),{isPopoverShow:o,popperWidth:l,togglePopover:c,hidePopover:d,showPopover:h}}function ip(e,t){const n=tp(""),i=a.ref(!1);return a.watch(n,async()=>{try{i.value=!0,await e(n.value),i.value=!1}catch(l){console.error(l)}finally{t==null||t()}}),{searchKey:n,searchLoading:i}}function vr(e=""){return e&&String(e).trim().toLowerCase()}var _s=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:l}=a.toRefs(e),o=a.inject(wc,null),c=a.inject(x0,null),d=a.computed(()=>{var C;return(C=o==null?void 0:o.selected)==null?void 0:C.some(I=>I.value===l.value)}),h=a.computed(()=>o==null?void 0:o.multiple),f=a.computed(()=>(o==null?void 0:o.activeOptionValue)===l.value),m=a.computed(()=>o==null?void 0:o.showSelectedIcon),p=()=>{i.value||o==null||o.handleOptionSelected(t)},v=()=>{o.activeOptionValue=l.value};return a.onBeforeMount(()=>{o==null||o.register(l.value,t),c==null||c.register(l.value,t)}),a.onBeforeUnmount(()=>{o==null||o.unregister(l.value),c==null||c.unregister(l.value)}),Te(F({},a.toRefs(n)),{selected:d,multiple:h,isHover:f,showSelectedIcon:m,handleOptionClick:p,handleMouseEnter:v})},render(){var t,n,i;const e=Se({"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(ka,{class:"bk-select-selected-icon",width:22,height:22},null)]),[[a.vShow,this.visible]])}}),ap=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,l=a.inject(wc,null),o=a.reactive({groupCollapse:e.collapse,visible:!0}),c=a.ref(new Map),{register:d,unregister:h}=vc(c),f=a.computed(()=>`${e.label} (${[...c.value.values()].filter(p=>p.visible).length})`),m=()=>{!e.collapsible||e.disabled||(o.groupCollapse=!o.groupCollapse,t("update:collapse",o.groupCollapse))};return a.provide(x0,a.reactive(Te(F({},a.toRefs(e)),{register:d,unregister:h,groupCollapse:a.toRef(o,"groupCollapse")}))),a.onBeforeMount(()=>{l==null||l.registerGroup(n.uid,i)}),a.onBeforeUnmount(()=>{l==null||l.unregisterGroup(n.uid)}),Te(F({},a.toRefs(o)),{groupLabel:f,handleToggleCollapse:m})},render(){var i,l;const e=Se({"bk-option-group":!0,collapsible:this.collapsible,disabled:this.disabled}),t=Se({"bk-option-group-label":!0,collapsible:this.collapsible}),n=Se({"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(ys,{class:n},null),a.createVNode("span",{class:"default-group-label-title"},[this.groupLabel])])]),a.withDirectives(a.createVNode("ul",{class:"bk-option-group-content"},[(l=(i=this.$slots).default)==null?void 0:l.call(i)]),[[a.vShow,!this.groupCollapse]])]),[[a.vShow,this.visible]])}});const rp={onContentScroll:Function},sp=F({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(Ze("F-scroll-x")),scrollYName:g.string.def(Ze("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)},rp);var lp=(e,t)=>{const{renderAs:n,contentAs:i}=e,l=(d,h,f,m,p,v,C)=>{t.emit("content-scroll",[d,{translateY:p,translateX:v,pos:C}])},o=a.resolveDirective("bkVirtualRender"),c={lineHeight:e.lineHeight,handleScrollCallback:l,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent};return{rendAsTag:()=>{var d,h,f,m,p,v,C,I,N,x,T,y;return a.h(n,{class:e.className},[(f=(h=(d=t.slots).beforeContent)==null?void 0:h.call(d))!=null?f:"",a.withDirectives(a.h(i,{class:e.contentClassName,style:e.contentStyle},[(v=(p=(m=t.slots).default)==null?void 0:p.call(m,{data:e.list}))!=null?v:""]),[[o,c]]),(N=(I=(C=t.slots).afterContent)==null?void 0:I.call(C))!=null?N:"",(y=(T=(x=t.slots).afterSection)==null?void 0:T.call(x))!=null?y:""])}}};function D0(e,t,n,i){let l=0,o=0,c=0,d=0;for(;l<e;l++){if(d=i(l,[l*n,(l+1)*n,"virtual"]),o+d>t){c=t-o;break}o+=d}return{startIndex:l,height:o,diffHeight:c}}function j0(e,t,n,i,l){if(!i)return;const o=i.scrollTop,c=i.scrollLeft,{scrollTop:d,count:h,groupItemCount:f,startIndex:m,endIndex:p}=n,{offsetHeight:v}=i;let C=0,I=0,N=0;if(typeof e=="number"&&(C=Math.floor(o/e),I=Math.ceil(v/e)+C,N=o%e),typeof e=="function"){const x=D0(h,o,f,e);C=x.startIndex>0?x.startIndex:0,N=x.diffHeight,I=D0(h,v,f,e).startIndex+C+1}if(o!==d||C!==m||I!==p){const x=i.scrollHeight-i.offsetHeight-i.scrollTop;typeof t=="function"&&t(l,C,I,o,N,c,{bottom:x>=0?x:0})}}function op(e,t,n){const{lineHeight:i=30,handleScrollCallback:l,pagination:o={},onlyScroll:c}=n.value;if(c){const v=t.scrollTop,C=t.scrollLeft,I=t.scrollHeight-t.offsetHeight-t.scrollTop;l(e,null,null,v,v,C,{bottom:I>=0?I:0});return}const{startIndex:d,endIndex:h,groupItemCount:f,count:m,scrollTop:p}=o;j0(i,l,{scrollTop:p,startIndex:d,endIndex:h,groupItemCount:f,count:m},t,e)}const z0=(e=60)=>jt.exports.throttle((t,n,i)=>op(t,n,i),e),cp=(e,t,n,i=60)=>{Reflect.apply(z0(i),globalThis,[e,t,n])};var up={mounted(e,t){const n=e.parentNode,{throttleDelay:i}=t.value;n.addEventListener("scroll",l=>{cp(l,n,t,i)})},unbind(e){if(e){const t=e.parentNode;if(!t)return;t.removeEventListener("scroll",z0)}}},dp=a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:up},props:sp,emits:["content-scroll"],setup(e,t){const{renderAs:n,contentAs:i}=e,l=A=>typeof A=="string"?[A]:typeof A=="object"&&!Array.isArray(A)?[A]:A;if(!e.enabled){const{rendAsTag:A}=lp(e,t);return A}const o=a.ref(null),c=a.reactive({startIndex:0,endIndex:0,scrollTop:1,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),d=(A,O,J,P,E,ee,H)=>{c.startIndex=O,c.endIndex=J,c.scrollTop=P,c.translateY=E,c.translateX=ee,c.pos=H,t.emit("content-scroll",[A,c])};a.onMounted(()=>{a.nextTick(()=>{p(e.list),v()})}),a.watch(()=>e.list,()=>{h(),v()},{deep:!0}),a.watch(()=>e.lineHeight,()=>{h(),v()});const h=()=>{p(e.list)},f=a.ref(0),m=a.ref(0),p=A=>{if(f.value=Math.ceil((A||[]).length/e.groupItemCount),c.count=f.value,c.startIndex=0,c.endIndex=0,c.translateY=0,c.scrollTop=0,typeof e.abosuteHeight=="string"&&e.abosuteHeight==="auto")if(typeof e.lineHeight=="function"){m.value=0;let J=0;for(let P=0;P<f.value;P++){const E=e.lineHeight.call(this,P,A.slice(P*e.groupItemCount,e.groupItemCount));J+=typeof E=="number"?E:0}m.value=J}else m.value=e.lineHeight*f.value;else m.value=e.abosuteHeight},v=(A=!0)=>{var J;const O=(J=o.value)==null?void 0:J.parentNode;j0(e.lineHeight,d,c,O,null),A&&o.value&&o.value.scrollTo(0,0)},C=a.computed(()=>(e.list||[]).map((A,O)=>Te(F({},A),{$index:O}))),I=a.computed(()=>C.value.slice(c.startIndex*e.groupItemCount,(c.endIndex+e.preloadItemCount)*e.groupItemCount)),N=a.computed(()=>e.scrollPosition==="content"?{top:`${c.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${c.translateY}px)`}:{}),x=a.computed(()=>F({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"?N.value:{})),T=a.computed(()=>{const A=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${m.value<e.minHeight?e.minHeight:m.value}px`,display:A?"none":"block"}}),y=a.computed(()=>[Ze("virtual-render"),e.scrollXName,e.scrollYName,...l(e.className),e.scrollPosition==="container"?Ze("virtual-content"):""]),b=a.computed(()=>[e.scrollPosition==="content"?Ze("virtual-content"):"",...l(e.contentClassName)]),M=a.resolveDirective("bkVirtualRender"),L={lineHeight:e.lineHeight,handleScrollCallback:d,pagination:c,throttleDelay:e.throttleDelay},k=()=>{h(),v()};return t.expose({reset:k}),()=>{var A,O,J,P,E,ee,H,le,de,he,ye,re;return a.h(n||"div",{ref:o,class:y.value,style:x.value},[(J=(O=(A=t.slots).beforeContent)==null?void 0:O.call(A))!=null?J:"",a.withDirectives(a.h(i||"div",{class:b.value,style:F(F({},N.value),e.contentStyle)},[(ee=(E=(P=t.slots).default)==null?void 0:E.call(P,{data:I.value}))!=null?ee:""]),[[M,L]]),(de=(le=(H=t.slots).afterContent)==null?void 0:le.call(H))!=null?de:"",a.h("div",{class:[Ze("virtual-section")],style:T.value}),(re=(ye=(he=t.slots).afterSection)==null?void 0:ye.call(he))!=null?re:""])}}});const Ir=Ge(dp);var fp=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(()=>Se({"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(An,{class:"bk-tag-close",onClick:this.handleClose},null):""])}});const Ys=Ge(fp);var hp=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(),{modelValue:i,collapseTags:l,selected:o}=a.toRefs(e),c=a.ref(i.value),d=a.ref(),h=a.ref(null);a.watch(i,()=>{c.value=i.value}),a.watch([o,l],()=>{I()},{flush:"post"});const f=N=>{t("remove",N)},m=()=>{var N;(N=d.value)==null||N.focus()},p=N=>{t("update:modelValue",N.target.value)},v=N=>{switch(N.code){case"Enter":{t("enter",N.target.value,N);break}}},C=N=>{const x=[...n.$el.querySelectorAll(".bk-tag")];return typeof N=="number"?x[N]:x},I=()=>{!l.value||(h.value=null,setTimeout(()=>{const N=C(),x=N.findIndex((T,y)=>y?N[y-1].offsetTop!==T.offsetTop:!1);x-1>-1?h.value=x-1:h.value=null}))};return{overflowTagIndex:h,value:c,inputRef:d,handleRemoveTag:f,focus:m,handleInput:p,handleKeydown:v}},render(){var i,l,o,c,d,h,f;const e=Se({"bk-select-tag":!0,"bk-select-tag--default":!0,"is-disabled":this.disabled,"collapse-tag":this.collapseTags}),t=Se({"bk-select-tag-wrapper":!0}),n={display:this.selected.length&&!this.filterable?"none":""};return a.createVNode("div",{class:e},[(l=(i=this.$slots)==null?void 0:i.prefix)==null?void 0:l.call(i),a.createVNode("span",{class:t},[(d=(c=(o=this.$slots).default)==null?void 0:c.call(o))!=null?d:this.selected.map((m,p)=>a.createVNode(Ys,{closable:!0,theme:this.tagTheme,style:{display:this.collapseTags&&this.overflowTagIndex&&p>=this.overflowTagIndex?"none":""},onClose:()=>this.handleRemoveTag(m.value)},{default:()=>[m.label]})),this.overflowTagIndex&&this.collapseTags&&a.createVNode(Ys,{class:"bk-select-overflow-tag"},{default:()=>[a.createTextVNode("+"),this.selected.length-this.overflowTagIndex]})]),a.createVNode("input",{class:"bk-select-tag-input",ref:"inputRef",type:"text",style:n,placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,disabled:this.disabled,value:this.filterable?this.value:"",onInput:this.handleInput,onKeydown:this.handleKeydown},null),(f=(h=this.$slots)==null?void 0:h.suffix)==null?void 0:f.call(h)])}}),gp=a.defineComponent({name:"Select",directives:{clickoutside:$n},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)},emits:["update:modelValue","change","toggle","clear","scroll-end","focus","blur"],setup(e,{emit:t}){const{modelValue:n,disabled:i,filterable:l,multiple:o,remoteMethod:c,loading:d,loadingText:h,noDataText:f,noMatchText:m,popoverMinWidth:p,showOnInit:v,multipleMode:C,allowCreate:I,customContent:N,showSelectedIcon:x,inputSearch:T,enableVirtualRender:y,showSelectAll:b,scrollHeight:M,list:L,displayKey:k,collapseTags:A,autoHeight:O,popoverOptions:J}=a.toRefs(e),P=On(),E=a.ref(),ee=a.ref(),H=a.ref(),le=a.ref(),de=a.ref(),he=a.ref(),ye=a.ref(),re=a.ref(new Map),K=a.computed(()=>[...re.value.values()]),B=a.ref(new Map),V=a.ref([]),$=a.computed(()=>V.value.reduce((ve,De)=>(ve[De.value]=De.label,ve),{})),X=a.ref();a.watch(n,()=>{var ve;Va(),e.withValidate&&((ve=P==null?void 0:P.validate)==null||ve.call(P,"change"))},{deep:!0}),a.watch(V,()=>{var ve;(ve=ye.value)==null||ve.updatePopover(null,te.value)});const fe=a.computed(()=>ae.value?L.value:L.value.filter(ve=>{var De;return(De=vr(String(ve[k.value])))==null?void 0:De.includes(Ln.value)})),ce=a.computed(()=>i.value||d.value),Ce=a.computed(()=>V.value.map(ve=>{var De,Oe;return((Oe=(De=re.value)==null?void 0:De.get(ve.value))==null?void 0:Oe.label)||ve.label})),Ee=a.computed(()=>{const ve=K.value.reduce((De,Oe)=>(Oe.disabled||De.push(Oe.value),De),[]);return ve.length<=V.value.length&&ve.every(De=>V.value.some(Oe=>Oe.value===De))}),ne=a.computed(()=>!!B.value.size),Y=a.computed(()=>!K.value.length),Z=a.computed(()=>K.value.length&&K.value.every(ve=>!ve.visible)),ae=a.computed(()=>l.value&&typeof c.value=="function"),pe=a.computed(()=>!(Hr.value||Y.value||Z.value)||N.value),D=a.computed(()=>o.value&&b.value&&(!Ln.value||!l.value)),W=a.computed(()=>M.value-12-(D.value?32:0)),Q=a.computed(()=>Hr.value?h.value:Y.value?f.value:Z.value?m.value:""),G=a.computed(()=>O.value?A.value&&!Re.value:A.value),te=a.computed(()=>jt.exports.merge({theme:"light bk-select-popover",trigger:"manual",width:Xe.value,arrow:!1,placement:"bottom-start",isShow:Re.value,reference:de.value,offset:6},J.value)),{register:ie,unregister:Me}=vc(re),{register:Ie,unregister:Le}=vc(B),{isHover:He,setHover:ot,cancelHover:Fe}=S0(),Ke=a.ref(!1),$t=()=>{Ke.value||(Ke.value=!0,t("focus"))},xt=()=>{!Ke.value||(Ke.value=!1,t("blur"))},{popperWidth:Xe,isPopoverShow:Re,hidePopover:qe,showPopover:ji,togglePopover:Jr}=np({popoverMinWidth:p.value},ee),Qr=a.computed(()=>(l.value&&T.value||I.value)&&Re.value);a.watch(Re,ve=>{ve?(Zr(),Ea()):Ln.value=""});const Rr=a.watch(Re,()=>{setTimeout(()=>{var ve,De;y.value&&((De=(ve=he.value)==null?void 0:ve.reset)==null||De.call(ve)),Rr()})}),Ea=()=>{var Oe;const ve=V.value[0],De=re.value.get(ve==null?void 0:ve.value);De&&!De.disabled&&De.visible?X.value=ve==null?void 0:ve.value:X.value=(Oe=K.value.find(Gn=>!Gn.disabled&&Gn.visible))==null?void 0:Oe.value},Wr=ve=>{!l.value||K.value.forEach(De=>{var Oe;De.visible=(Oe=vr(String(De.label)))==null?void 0:Oe.includes(vr(ve))})},{searchKey:Ln,searchLoading:Hr}=ip(ae.value?c.value:Wr,Ea),Zn=ve=>{ve!==n.value&&(t("change",ve,n.value),t("update:modelValue",ve,n.value))},du=()=>{ce.value||($t(),Jr(),t("toggle",Re.value))},fl=ve=>{!l.value||(Ln.value=ve)},hl=(ve,De)=>{const Oe=String(ve);!I.value||!Oe||l.value&&K.value.find(zi=>vr(String(zi.label))===vr(Oe))||re.value.get(Oe)||(De.stopPropagation(),o.value?(V.value.push({value:Oe,label:Oe}),Zn(V.value.map(zi=>zi.value))):(V.value=[{value:Oe,label:Oe}],Zn(Oe),qe()),Ln.value="")},Br=ve=>{if(!(ce.value||!ve)){if(o.value){const De=V.value.findIndex(Oe=>Oe.value===ve.value);De>-1?V.value.splice(De,1):V.value.push({value:ve.value,label:ve.label||ve.value}),Zn(V.value.map(Oe=>Oe.value))}else V.value=[{label:ve.label||ve.value,value:ve.value}],Zn(ve.value),qe();Zr()}},Zr=()=>{setTimeout(()=>{var ve,De,Oe;!T.value&&!I.value?(ve=le.value)==null||ve.focus():C.value==="tag"?(De=de.value)==null||De.focus():(Oe=E.value)==null||Oe.focus()},0)},fu=ve=>{ve.stopPropagation(),V.value=[],Zn(o.value?[]:""),t("clear",o.value?[]:""),qe()},hu=()=>{X.value=""},gl=()=>{Ee.value?V.value=[]:K.value.forEach(ve=>{ve.disabled||V.value.find(De=>De.value===ve.value)||V.value.push({value:ve.value,label:ve.label||ve.value})}),Zn(V.value.map(ve=>ve.value)),Zr()},gu=ve=>{const{scrollTop:De,clientHeight:Oe,scrollHeight:Gn}=ve.target;De+Oe===Gn&&t("scroll-end")},mu=ve=>{if(ce.value)return;const De=V.value.findIndex(Oe=>Oe.value===ve);De>-1&&(V.value.splice(De,1),Zn(V.value.map(Oe=>Oe.value)))},ml=ve=>{var De,Oe;return((Oe=(De=re.value)==null?void 0:De.get(ve))==null?void 0:Oe.label)||$.value[ve]||ve},Va=()=>{Array.isArray(n.value)?V.value=[...n.value.map(ve=>({value:ve,label:ml(ve)}))]:n.value!==void 0&&n.value!==""&&(V.value=[{value:n.value,label:ml(n.value)}])},Gr=ve=>{var Gn,zi,pl,bl;if(!((Gn=ee.value)!=null&&Gn.contains(ve.target))&&!((zi=H.value)!=null&&zi.contains(ve.target))&&!N.value)return;const De=K.value.filter(Gt=>!Gt.disabled&&Gt.visible),Oe=De.findIndex(Gt=>Gt.value===X.value);if(!(!De.length||Oe===-1))switch(ve.code){case"ArrowDown":{ve.preventDefault();const Gt=Oe>=De.length-1?0:Oe+1;X.value=(pl=De[Gt])==null?void 0:pl.value;break}case"ArrowUp":{ve.preventDefault();const Gt=Oe===0?De.length-1:Oe-1;X.value=(bl=De[Gt])==null?void 0:bl.value;break}case"Backspace":{if(!o.value||!V.value.length||Ln.value.length||ve.target===le.value)return;V.value.pop(),Zn(V.value.map(Gt=>Gt.value));break}case"Enter":{if(!Re.value)Re.value=!0;else{const Gt=re.value.get(X.value);Br(Gt)}break}}},_r=({event:ve})=>{var Oe;const{target:De}=ve;((Oe=ee.value)==null?void 0:Oe.contains(De))||ee.value===De||(qe(),xt())};return a.provide(wc,a.reactive({multiple:o,selected:V,activeOptionValue:X,showSelectedIcon:x,register:ie,unregister:Me,registerGroup:Ie,unregisterGroup:Le,handleOptionSelected:Br})),a.onMounted(()=>{Va(),setTimeout(()=>{v.value&&ji()}),n4(document,"keydown",Gr)}),a.onBeforeMount(()=>{i4(document,"keydown",Gr)}),{selected:V,isInput:Qr,options:K,isDisabled:ce,selectedLabel:Ce,isPopoverShow:Re,isHover:He,popperWidth:Xe,inputRef:E,triggerRef:ee,contentRef:H,searchRef:le,selectTagInputRef:de,virtualRenderRef:he,popoverRef:ye,searchLoading:Hr,isOptionsEmpty:Y,isSearchEmpty:Z,isFocus:Ke,isShowSelectContent:pe,curContentText:Q,isGroup:ne,searchKey:Ln,isShowSelectAll:D,virtualHeight:W,filterList:fe,isCollapseTags:G,popoverConfig:te,setHover:ot,cancelHover:Fe,handleFocus:$t,handleBlur:xt,handleTogglePopover:du,handleClear:fu,hidePopover:qe,showPopover:ji,handleToggleAll:gl,handleOptionSelected:Br,handleClickOutside:_r,handleScroll:gu,handleDeleteTag:mu,handleInputChange:fl,handleInputEnter:hl,handleKeydown:Gr,handleSelectedAllOptionMouseEnter:hu}},render(){const e=Se({"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(Ci,{loading:!0,theme:"primary",class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length&&!this.isDisabled?a.createVNode(wn,{class:"clear-icon",onClick:this.handleClear},null):a.createVNode(La,{class:"angle-up"},null),n=()=>{var o,c;return this.multipleMode==="tag"?a.createVNode(hp,{ref:"selectTagInputRef",modelValue:this.searchKey,"onUpdate:modelValue":d=>this.searchKey=d,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 d,h;return(h=(d=this.$slots).prefix)==null?void 0:h.call(d)},default:(c=(o=this.$slots).tag)==null?void 0:c.call(o,{selected:this.selected}),suffix:()=>t()}):a.createVNode(Fi,{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 d,h;return(h=(d=this.$slots).prefix)==null?void 0:h.call(d)},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()]),l=()=>{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(Ts,{class:"icon-search",width:16,height:16},null),a.withDirectives(a.createVNode("input",{ref:"searchRef",class:"bk-select-search-input",placeholder:this.searchPlaceholder,"onUpdate:modelValue":d=>this.searchKey=d},null),[[a.vModelText,this.searchKey]])]),!this.isShowSelectContent&&a.createVNode("div",{class:"bk-select-empty"},[this.searchLoading&&a.createVNode(Ci,{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(Ir,{list:this.filterList,height:this.virtualHeight,lineHeight:32,ref:"virtualRenderRef"},{default:({data:d})=>d.map(h=>a.createVNode(_s,{key:h[this.idKey],value:h[this.idKey],label:h[this.displayKey]},null))}):this.list.map(d=>a.createVNode(_s,{value:d[this.idKey],label:d[this.displayKey]},null)),(c=(o=this.$slots).default)==null?void 0:c.call(o),this.scrollLoading&&a.createVNode("li",{class:"bk-select-options-loading"},[a.createVNode(Ci,{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(ti,a.mergeProps(this.popoverConfig,{onClickoutside:this.handleClickOutside,ref:"popoverRef"}),{default:()=>i(),content:()=>l()})])}});const Ic=Rt(gp,{Option:_s,Group:ap});function mp(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const{propsMixin:pp}=$i,Nc=Object.assign({},pp);Nc.width.default="400",Nc.height.default="100%";var bp=a.defineComponent({name:"Sideslider",components:{BkModal:$i,BkButton:Wt},props:Te(F({},Nc),{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))},l=()=>{setTimeout(()=>{n("shown")},200)},o=()=>{setTimeout(()=>{n("hidden")},200)};return()=>{const c={header:()=>{var f,m;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"bk-sideslider-header"},[a.createVNode("div",{class:`bk-sideslider-close ${e.direction}`,onClick:()=>{i()}},null),a.createVNode("div",{class:`bk-sideslider-title ${e.direction}`},[(m=(f=t.header)==null?void 0:f.call(t))!=null?m:e.title])])])},default:()=>{var f,m;return(m=(f=t.default)==null?void 0:f.call(t))!=null?m:"Content"},footer:()=>t.footer?a.createVNode("div",{class:"bk-sideslider-footer"},[t.footer()]):null},d=`bk-sideslider-wrapper ${e.scrollable?"scroll-able":""} ${e.extCls}`,h=t.footer?"calc(100vh - 106px)":"calc(100vh - 52px)";return a.createVNode($i,a.mergeProps(e,{maxHeight:h,class:d,style:`${e.direction}: 0;`,onHidden:o,onShown:l,onClose:i}),mp(c)?c:{default:()=>[c]})}}});const P0=Ge(bp),O0={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 yp=a.defineComponent({name:"Steps",props:O0,emits:["update:curStep","click"],setup(e,{emit:t}){const n=a.ref([]),i=d=>{const h=[];d.forEach(f=>{var m;typeof f=="string"?h.push(f):h.push({title:f.title,icon:f.icon,description:f.description,status:f.status,border:(m=f.border)!=null?m:!0})}),n.value.splice(0,n.value.length,...h)},l=d=>{O0.curStep=d},o=()=>{var d;n.value.splice(0,n.value.length,{title:"\u6B65\u9AA41",icon:1},{title:"\u6B65\u9AA42",icon:2},{title:"\u6B65\u9AA43",icon:3}),(d=e.steps)!=null&&d.length&&i(e.steps)},c=async d=>{try{e.controllable&&d!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(h,f)=>{const m=await e.beforeChange(d);m?h(m):f(m)}),t("update:curStep",d),t("click",d))}catch(h){console.warn(h)}};return a.onMounted(o),a.watch(()=>e.steps,()=>{i(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{l(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=Se({[`${this.extCls}`]:!!this.extCls,[`bk-steps-${this.direction}`]:this.direction,[`bk-steps-${this.lineType}`]:this.lineType},`${t} ${e} ${n}`),l=p=>this.curStep>p+1||this.defaultSteps[p].status==="done",o=p=>this.curStep===p+1,c=p=>{const{icon:v}=p;return v?Object.prototype.toString.call(v)==="[object Object]":typeof p=="string"},d=(p,v)=>(v.icon||(v.icon=p),!isNaN(v.icon)),h=p=>p.status==="loading",f=p=>p.status==="error",m=(p,v)=>o(p)&&this.status==="loading"||h(v)?a.createVNode(Cs,{class:"bk-icon bk-steps-icon icon-loading"},null):o(p)&&this.status==="error"||f(v)?a.createVNode(An,{class:"bk-steps-icon"},null):l(p)?a.createVNode(ka,{class:"bk-steps-icon"},null):a.createVNode("span",null,[d(p,v)?p+1:a.createVNode(v.icon,null,null)]);return a.createVNode("div",{class:i},[this.defaultSteps.map((p,v)=>{var C,I,N;return a.createVNode("div",{class:["bk-step",p.title?"":"bk-step-no-content",l(v)?"done":"",o(v)?"current":"",o(v)&&this.status==="error"?"isError":"",p.status&&o(v)?[`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(v+1)}},[(N=(I=(C=this.$slots)[v+1])==null?void 0:I.call(C))!=null?N:m(v,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(v+1)}},[p.title]),p.description&&a.createVNode("div",{class:"bk-step-description",title:p.description},[p.description])]):""])})])}});const A0=Ge(yp);var Cp=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=On(),i=a.ref(!1),l=a.computed(()=>e.trueValue===c.value),o=a.ref(e.modelValue!==!1),c=a.computed(()=>o.value?e.modelValue:e.value),d=a.computed(()=>{const m={[e.extCls]:!!e.extCls,"bk-switcher":!0,"bk-switcher-outline":e.isOutline,"bk-switcher-square":e.isSquare,"show-label":e.showText,"is-disabled":e.disabled,"is-checked":l.value,"is-unchecked":!l.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 h=m=>{if(m.stopPropagation(),m.preventDefault(),e.disabled||i.value)return;const p=l.value?e.falseValue:e.trueValue,v=!l.value,C=()=>{t("update:modelValue",p),t("change",v)};let I=!0;if(typeof e.beforeChange=="function"&&(I=e.beforeChange(p),typeof I.then=="function"))return i.value=!0,I.then(()=>{C()}).finally(()=>{i.value=!1});I&&C()},f=m=>{(m.code==="Enter"||m.key==="Enter"||m.keyCode===13)&&h(m)};return()=>a.createVNode("div",{class:d.value,onClick:h,tabindex:"0",onKeydown:f},[i.value?a.createVNode(Zo,{class:"bk-switcher-loading"},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[l.value?e.onText:e.offText]):""])}});const E0=Ge(Cp);var Fs=(e=>(e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e))(Fs||{});const V0=["none","row","col","outer"];var ni=(e=>(e.ON_SORT_BY_CLICK="onSortByClick",e.ON_FILTER_CLICK="onFilterClick",e.ON_SETTING_CHANGE="onSettingChange",e.ON_ROW_EXPAND_CLICK="onRowExpandClick",e))(ni||{}),ln=(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))(ln||{});const vn=(...e)=>!0,Mp={columnPick:vn,columnFilter:vn,columnSort:vn,rowClick:vn,rowDblclick:vn,rowExpand:vn,pageLimitChange:vn,pageValueChange:vn,settingChange:vn,scrollBottom:vn,colFilterSave:vn},Tt={ROW_INDEX:"__$table_row_index",ROW_UID:"__$uuid",ROW_EXPAND:"__row_expand"},Lc=4,ii=42,Us={large:78,medium:60,small:42},wp=[{value:"small",label:"\u5C0F",height:Us.small},{value:"medium",label:"\u4E2D",height:Us.medium},{value:"large",label:"\u5927",height:Us.large}];var $s=(e=>(e.CURRENT="current",e.ALL="all",e))($s||{});const vp={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(),showOverflowTooltip:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0)})]).def(!1),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($s)).def("current")}),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($s)).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)},Ip={data:g.arrayOf(g.any).def([]),columns:g.arrayOf(g.shape(vp)).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(ii*2),maxHeight:g.oneOfType([g.number,g.string]).def("auto"),rowHeight:g.oneOfType([g.number,g.func]).def(ii),headHeight:g.number.def(ii),showHead:g.bool.def(!0),thead:g.shape({height:g.number.def(ii),isShow:g.bool.def(!0),cellFn:g.func.def(void 0)}),virtualEnabled:g.bool.def(!1),border:g.arrayOf(g.commonType(V0,"border")).def([Fs.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([])}),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),rowKey:g.oneOfType([g.string,g.func]).def(Tt.ROW_INDEX)},J0=(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(F(F({},t),e),{current:n})}return t}return{}};var Np=(e,t)=>{const n=a.ref(0),i=a.ref(0);let l=a.reactive({count:0,limit:10,current:1});l=J0(e.pagination,l);const o=a.ref(null),c=()=>{if(!e.pagination||e.remotePagination){n.value=0,i.value=e.data.length;return}n.value=(l.current-1)*l.limit,i.value=l.current*l.limit},d=a.reactive([]),h=(C,I)=>{typeof I=="function"&&C.sort(I)},f=(C,I)=>{if(typeof I=="function"){const N=C.filter((x,T)=>I(x,T,e.data));C.splice(0,C.length,...N)}},m=(C,I,N)=>{var y;const x=t.slice(),{sortScope:T}=(y=N==null?void 0:N.sort)!=null?y:{};T===$s.ALL&&h(x,I),d.splice(0,d.length,...x.slice(n.value,i.value)),f(d,C),h(d,I)},p=(C,I,N)=>{l=J0(e.pagination,l),v(),c(),m(C,I,N)},v=()=>{!e.pagination||(o.value=e.remotePagination?l:Te(F({},l),{count:e.data.length}))};return{pageData:d,localPagination:o,resolvePageData:m,watchEffectFn:p}},Lp=(e,t)=>{const n=a.toRef(e,"scrollLoading"),i=()=>typeof n.value=="boolean"?{loading:!!n.value,inline:!0,title:"",size:En.Normal,mode:Yi.Default,indicator:null}:n.value,l=a.computed(()=>n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object"));return{renderScrollLoading:()=>{var c,d,h;if(l.value){const{loading:f,size:m,mode:p,title:v,inline:C,indicator:I}=i();return(h=(d=(c=t.slots).fixedBottom)==null?void 0:d.call(c))!=null?h:a.createVNode(Ci,{loading:f,size:m,mode:p,title:v,inline:C,indicator:I},null)}}}};function kp(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var Tp=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(e.limit);a.watch(()=>e.limit,l=>{t.value=l}),a.watch(()=>e.limitList,l=>{a.nextTick(()=>{l.includes(t.value)||([t.value]=l)})},{immediate:!0});const n=l=>{t.value=l};return{limit:t,render:({isFirst:l,isLast:o})=>{let c;return e.showLimit?a.createVNode("div",a.mergeProps({class:{"bk-pagination-limit":!0,"is-first":l,"is-last":o}},{disabled:e.disabled}),[a.createVNode("div",null,[a.createTextVNode("\u6BCF\u9875")]),a.createVNode(Ic,{class:"bk-pagination-limit-select",clearable:!1,size:"small",modelValue:t.value,onChange:n,disabled:e.disabled},kp(c=e.limitList.map((d,h)=>a.createVNode(_s,{value:d,label:`${d}`,key:`${h}_${d}`},null)))?c:{default:()=>[c]}),a.createVNode("div",null,[a.createTextVNode("\u6761")])]):null}}};const qi=5;var xp=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(1),n=a.computed(()=>t.value===1),i=a.computed(()=>t.value===e.totalPageNum),l=a.ref(!1),o=a.ref(!1),c=a.computed(()=>{l.value=!1,o.value=!1;const C=[];if(e.totalPageNum<=qi+2){for(let x=2;x<=e.totalPageNum-1;x++)C.push(x);return C}const I=Math.floor(qi/2);e.totalPageNum>qi&&(l.value=t.value-I>2,o.value=t.value+I<e.totalPageNum-1);const N=Math.min(e.totalPageNum-qi,Math.max(2,t.value-I));for(let x=N;x<N+qi;x++)C.push(x);return C});a.watch(()=>e.modelValue,C=>{a.nextTick(()=>{C>=1&&C<=e.totalPageNum?t.value=C:C<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,C=>{t.value>C&&(t.value=C)})});const d=()=>{n.value||(t.value=t.value-1)},h=()=>{i.value||(t.value=t.value+1)},f=C=>{C!==t.value&&(t.value=C)},m=()=>{t.value=Math.max(1,t.value-qi)},p=()=>{t.value=Math.min(e.totalPageNum,t.value+qi)};return{current:t,render:({isFirst:C,isLast:I})=>a.createVNode("div",{class:{"bk-pagination-list":!0,"is-first":C,"is-last":I}},[a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":n.value},onClick:d},[e.prevText||a.createVNode(yi,null,null)]),a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===1},key:"1",onClick:()=>f(1)},[a.createTextVNode("1")]),l.value&&a.createVNode("div",{key:"pre-batch",class:"bk-pagination-list-pre-batch",onClick:m},[a.createVNode(Is,null,null)]),c.value.map(N=>a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===N},key:N,onClick:()=>f(N)},[N])),o.value&&a.createVNode("div",{key:"next-batch",class:"bk-pagination-list-next-batch",onClick:p},[a.createVNode(Is,null,null)]),e.totalPageNum>1&&a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>f(e.totalPageNum)},[e.totalPageNum]),a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":i.value},onClick:h},[e.nextText||a.createVNode(Mn,null,null)])])}},Sp=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(null),n=a.ref(!1),i=a.ref(1),l=a.computed(()=>i.value===1),o=a.computed(()=>i.value===e.totalPageNum);let c=0;const d=a.computed(()=>{const x=[];for(let T=1;T<=e.totalPageNum;T++)x.push(T);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 h=()=>{l.value||(i.value=i.value-1)},f=()=>{o.value||(i.value=i.value+1)},m=()=>{n.value=!0},p=()=>{n.value=!1,t.value.textContent=`${c}`,c!==i.value&&(i.value=c)},v=x=>{const T=x.target,y=Number(T.textContent);!y||y<1||y>e.totalPageNum||y===i.value||(c=y)},C=x=>{["Enter","NumpadEnter"].includes(x.code)&&(x.preventDefault(),p())},I=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":l.value},onClick:h},[a.createVNode(yi,null,null)]),a.createVNode(ti,{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:v,onKeydown:C},[i.value]),a.createVNode("span",null,[a.createTextVNode("/")]),a.createVNode("span",{class:"bk-pagination-small-list-total"},[e.totalPageNum])]),content:()=>a.createVNode("div",{class:"bk-pagination-picker-list"},[d.value.map(x=>a.createVNode("div",{class:{item:!0,"is-actived":x===i.value},key:x,onClick:()=>I(x)},[x]))])}),a.createVNode("div",{class:{"bk-pagination-btn-next":!0,"is-disabled":o.value},onClick:f},[a.createVNode(Mn,null,null)])])}},Dp=()=>({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 jp={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 zp=a.defineComponent({name:"Pagination",props:jp,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const n=a.ref(0),{count:i,limit:l}=a.toRefs(e),o=Dp(),{current:c,render:d}=xp(),{current:h,render:f}=Sp(),{limit:m,render:p}=Tp();return a.watch([i,m,l],([v,C])=>{const I=Math.ceil(v/C);n.value=I<1?1:I},{immediate:!0}),a.watch(c,v=>{t.emit("update:modelValue",v),t.emit("change",v)}),a.watch(h,v=>{!e.small||(t.emit("update:modelValue",v),t.emit("change",v))}),a.watch(m,v=>{t.emit("limitChange",v)}),{totalPageNum:n,renderTotal:o,renderList:d,renderLimit:p,renderSmallList:f}},render(){const e=Se({"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 kc=Ge(zp),It=(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=>It(e,i,n)).filter(i=>i!==void 0).at(0)},Tc=e=>/^\d+$/.test(`${e}`)?[parseInt(`${e}`,10)]:[],Pp=e=>Q0(e,"auto"),Q0=(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},Op=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>V0.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},Nr=(e,t=["resizeWidth","calcWidth","width"])=>{var n,i;return(i=(n=e[t[0]])!=null?n:e[t[1]])!=null?i:e[t[2]]},xc=(e,t,n=20,i=0)=>{const{width:l}=e.getBoundingClientRect()||{},o=l-i;let c=o;const d=[],h=(m,p)=>{const{minWidth:v=void 0}=m;if(v===void 0)return p;let C=p;return/^\d+\.?\d*$/.test(`${v}`)&&(C=Number(v)),/^\d+\.?\d*%$/.test(`${v}`)&&(C=Number(v)*o/100),/^\d+\.?\d*px$/i.test(`${v}`)&&(C=Number(`${v}`.replace(/px/i,""))),C},f=(m,p,v=!0)=>{const C=h(m,p),I=p<C?C:p;Object.assign(m,{calcWidth:I}),v&&(c=c-I,c<0&&(c=0))};if(t.forEach((m,p)=>{if(!m.isHidden){const C=String(Nr(m,["resizeWidth","width"]));let I=!0;if(/^\d+\.?\d*(px)?$/.test(C)){const N=Number(C.replace("px",""));f(m,N),I=!1}if(/^\d+\.?\d*%$/.test(C)){let N=n;if(c>0){const x=Number(C.replace("%",""));N=c*x/100}f(m,N),I=!1}I&&d.push(p)}}),d.length>0){let m=n;c>0&&(m=c/d.length,d.forEach(p=>f(t[p],m,!1)))}},R0=(e,t,n=60,i=!1)=>{const l=jt.exports.throttle(()=>{typeof t=="function"&&t()},n),o=new ResizeObserver(()=>{l()});return i&&typeof t=="function"&&t(),{start:()=>{o.observe(e)},stop:()=>{o.disconnect(),o.unobserve(e)}}},Sc=e=>{const{showHead:t,headHeight:n,thead:i={}}=e;return Object.assign({},{isShow:t,height:n},F({},i))},Dc=(e,t,n)=>n.type==="index"?e[Tt.ROW_INDEX]+1:jt.exports.get(e,t),Lr=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Lr(Reflect.apply(e,globalThis,t),t):[],Ap=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===Tt.ROW_INDEX?`__ROW_INDEX_${n}`:t.rowKey.split(".").reduce((l,o)=>Object.prototype.hasOwnProperty.call(l,o)?l[o]:l,e):typeof t.rowKey=="function"?Reflect.apply(t.rowKey,globalThis,[e]):Hi.v4(),Ep=(e,t,n=0)=>{if(e){const i=e.querySelector(t);if(i)return i.offsetHeight>e.offsetHeight-n}return!1},Vp=(e,t)=>{function n(o,c){const h=(n.canvas||(n.canvas=document.createElement("canvas"))).getContext("2d");return h.font=c,h.measureText(o).width}function i(o,c){return window.getComputedStyle(o,null).getPropertyValue(c)}function l(o=document.body){const c=i(o,"font-weight")||"normal",d=i(o,"font-size")||"16px",h=i(o,"font-family")||"Times New Roman";return`${c} ${d} ${h}`}return n(t||(e==null?void 0:e.innerHTML),l(e))};var W0=a.defineComponent({name:"TableCell",props:{column:g.any.def({}),row:g.any.def({})},setup(e,{slots:t}){const n=a.ref(),i=a.ref(!1),{showOverflowTooltip:l=!1}=e.column||{};let o=null,c=null;const d=()=>{let f=!0,m=n.value.innerText;return typeof l=="boolean"&&(f=!l),typeof l=="object"&&(f=l.disabled,typeof l.content=="function"&&(m=l.content(e.column,e.row)),m=l.content||n.value.innerText),{disabled:f,content:m}},h=()=>{if(!n.value)return;const f=Vp(n.value),m=n.value.clientWidth;if(i.value=f>m,i.value){const p=a.ref(d());c===null&&(c=hc(n.value,p))}else c==null||c.destroyInstance(n.value),c=null};return a.onMounted(()=>{var m;const{disabled:f}=d();f||(h(),((m=e.column.showOverflowTooltip)==null?void 0:m.watchCellResize)!==!1&&(o=R0(n.value,()=>{h()},60,!0),o.start()))}),a.onBeforeUnmount(()=>{o.stop(),c==null||c.destroyInstance(n.value)}),()=>{var f;return a.createVNode("div",{class:"cell",ref:n},[(f=t.default)==null?void 0:f.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)])}}),Jp=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(Ps,{scene:"part",type:t.value,description:e.emptyText},null)}});function Qp(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var Rp=a.defineComponent({name:"HeadFilter",props:{column:g.any.def({}),height:g.number.def(ii)},emits:["change","filterSave"],setup(e,{emit:t}){const{column:n}=e,i=a.reactive({isOpen:!1,checked:[]}),l=a.computed(()=>Se({[Ze("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:i.checked.length,opened:i.isOpen})),o=Se({[Ze("table-head-filter")]:!0}),c=M=>{i.isOpen=M},d=`light ${Ze("table-head-filter")}`,h=a.computed(()=>{const{list:M=[]}=n.filter;return M.map(L=>Te(F({},L),{checked:i.checked.includes(L.value)}))}),f=(M,L="ig")=>new RegExp(`${M}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),L),m=(M,L)=>{const{match:k}=n.filter,A=Dc(L,It(n,"field",[n,L]),n);return k==="full"&&M.includes(A),M.some(O=>f(O,"img").test(A))},p=typeof n.filter.filterFn=="function"?(M,L,k,A)=>n.filter.filterFn(M,L,e.column,k,A):(M,L)=>M.length?m(M,L):!0,v=()=>{C(!0),t("filterSave",[...i.checked]),i.isOpen=!1},C=(M=!1)=>{const{disabled:L}=N(x,"\u786E\u5B9A");if(L||M){if(e.column.filter==="custom"){t("change",[...i.checked],null),i.isOpen=!1;return}t("change",[...i.checked],p)}},I=()=>{i.checked.length&&(i.checked.splice(0,i.checked.length),i.isOpen=!1,a.nextTick(()=>t("change",i.checked,p)))},N=(M,L)=>({disabled:M==="disabled"||M===!1,text:typeof M=="string"?M:L}),{btnSave:x,btnReset:T}=n.filter,y=()=>{const{disabled:M,text:L}=N(x,"\u786E\u5B9A");return M?a.createVNode("span",{class:"btn-filter-save disabled"},[L]):a.createVNode("span",{class:"btn-filter-save",onClick:v},[L])},b=()=>{const{disabled:M,text:L}=N(T,"\u91CD\u7F6E");return M?"":a.createVNode("span",{class:["btn-filter-reset",i.checked.length?"":"disable"],onClick:I},[L])};return()=>a.createVNode(ti,a.mergeProps({trigger:"click",isShow:i.isOpen,placement:"bottom-end",arrow:!1,offset:0},{theme:d},{onAfterShow:()=>c(!0),onAfterHidden:()=>c(!1)}),{default:()=>a.createVNode(Ro,{class:l.value},null),content:()=>{let M;return a.createVNode("div",{class:o},[a.createVNode(Ko,{class:"content-list",modelValue:i.checked,"onUpdate:modelValue":L=>i.checked=L,onChange:()=>C(!1)},Qp(M=h.value.map(L=>a.createVNode("div",{class:"list-item"},[a.createVNode(Ui,{label:L.value},{default:()=>[L.text]})])))?M:{default:()=>[M]}),a.createVNode("div",{class:"content-footer"},[y(),a.createVNode("span",{class:"btn-filter-split"},null),b()])])}})}}),Li=(e=>(e.ASC="asc",e.DESC="desc",e.NULL="null",e))(Li||{}),Wp=a.defineComponent({name:"HeadSort",props:{column:g.any.def({})},emits:["change"],setup(e,{emit:t}){const n=a.ref(""),i=(l,o)=>{var p,v;if(l.stopImmediatePropagation(),l.stopPropagation(),l.preventDefault(),n.value===o?n.value=Li.NULL:n.value=o,e.column.sort==="custom"){t("change",null,o);return}const c=e.column.field,d=C=>Dc(C,c,e.column),h=(C,I)=>{const N=d(C),x=d(I);return typeof N=="number"&&typeof x=="number"?N-x:String.prototype.localeCompare.call(N,x)},f=typeof((p=e.column.sort)==null?void 0:p.sortFn)=="function"?(v=e.column.sort)==null?void 0:v.sortFn:h,m=n.value===Li.NULL?()=>!0:(C,I)=>f(C,I)*(o===Li.DESC?-1:1);t("change",m,o)};return()=>a.createVNode("span",{class:Ze("head-cell-sort")},[a.createVNode(xo,{class:["sort-action","sort-asc",n.value===Li.ASC?"active":""],onClick:l=>i(l,Li.ASC)},null),a.createVNode(ys,{class:["sort-action","sort-desc",n.value===Li.DESC?"active":""],onClick:l=>i(l,Li.DESC)},null)])}});class Hp{constructor(t,n){Ka(this,"props",null);Ka(this,"ctx",null);this.props=t,this.ctx=n}}function H0(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var Bp=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([])}),g.bool]).def(!1),columns:g.array.def([]),rowHeight:g.number.def(ii)},emits:["change"],setup(e,{emit:t}){const n=wp,i=a.ref(!1),l=a.ref(!1),o=typeof e.settings=="boolean"?a.ref({fields:e.columns.map(P=>Te(F({},P),{field:P.field||P.type})),checked:[],limit:0,size:"small",sizeList:n}):a.ref(e.settings),c=a.ref(o.value.size||"small"),d=a.ref(e.rowHeight),h=a.ref(o.value.checked),m=`light ${Ze("table-settings")}`,p={checkAll:i.value,activeSize:c.value,activeHeight:d.value},v=()=>{t("change",{checked:h.value,size:c.value,height:d.value}),l.value=!1},C=()=>{i.value=p.checkAll,c.value=p.activeSize,d.value=p.activeHeight,h.value=o.value.checked||[],l.value=!1},I=()=>{Object.assign(p,{checkAll:i.value,activeSize:c.value,activeHeight:d.value}),l.value=!0},N=P=>{P.stopImmediatePropagation(),P.stopPropagation(),P.preventDefault(),i.value=!i.value;const E=o.value.fields||e.columns||[];if(i.value)h.value=E.map((ee,H)=>It(ee,"field",[ee,H]));else{const ee=E.filter(H=>H.disabled).map((H,le)=>It(H,"field",[H,le]));h.value.splice(0,h.value.length,...ee)}},x=a.computed(()=>{var P;return((P=o.value.limit)!=null?P:0)>0}),T=o.value.sizeList||n,y=a.computed(()=>x.value&&(o.value.limit?o.value.limit:0)<=h.value.length),b=(P,E)=>P.disabled||y.value&&!h.value.includes(It(P,"field",[P,E])),M=P=>{c.value=P.value,d.value=P.height},L=P=>({"line-size":!0,"is-medium":c.value==="medium",active:P.value===c.value}),k={marginRight:"12px"},A=()=>T.map(P=>a.createVNode("span",{class:L(P),onClick:()=>M(P)},[P.label])),O=a.computed(()=>o.value.fields||e.columns||[]),J=a.computed(()=>h.value.length>0&&!O.value.every((P,E)=>h.value.includes(It(P,"field",[P,E]))));return a.watch(()=>[h.value],()=>{h.value.length||(i.value=!1),h.value.length&&O.value.every((P,E)=>h.value.includes(It(P,"field",[P,E])))&&(i.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{h.value.splice(0,h.value.length,...o.value.checked)},{immediate:!0,deep:!0}),()=>e.settings?a.createVNode(ti,a.mergeProps({trigger:"manual",isShow:l.value,placement:"bottom-end",arrow:!1},{theme:m}),{default:()=>a.createVNode("span",{class:"table-head-settings"},[a.createVNode(Po,{style:"color: #c4c6cc;",onClick:I},null)]),content:()=>{let P;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(Ms,{class:"icon-close-action",onClick:C},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")]),x.value?a.createVNode("span",{class:"limit"},[a.createTextVNode("\uFF08\u6700\u591A"),o.value.limit,a.createTextVNode("\u9879\uFF09")]):""]),x.value?"":a.createVNode("span",{class:"check-all",onClick:N},[a.createVNode(Ui,{label:"\u5168\u9009",indeterminate:Boolean(J.value),modelValue:h.value.length>0},{default:()=>[a.createTextVNode("\u5168\u9009")]})])]),a.createVNode(Ko,{class:"setting-body-fields",modelValue:h.value,"onUpdate:modelValue":E=>h.value=E},H0(P=O.value.map((E,ee)=>{let H;return a.createVNode("div",{class:"field-item"},[a.createVNode(Ui,{label:It(E,"field",[E,ee]),checked:h.value.includes(It(E,"field",[E,ee])),disabled:b(E,ee)},H0(H=It(E,"label",[E,ee]))?H:{default:()=>[H]})])}))?P:{default:()=>[P]}),a.createVNode("div",{class:"setting-body-line-height"},[a.createTextVNode("\u8868\u683C\u884C\u9AD8\uFF1A"),A()])]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Wt,{theme:"primary",style:k,onClick:v},{default:()=>[a.createTextVNode("\u786E\u5B9A")]}),a.createVNode(Wt,{style:k,onClick:C},{default:()=>[a.createTextVNode("\u53D6\u6D88")]})])])}}):""}}),zc=(e,t,n)=>{const i=a.computed(()=>e.pagination&&e.data.length?ii:0),l=(p,v,C)=>({column_fixed:!!p.fixed,column_fixed_left:p.fixed!=="right",column_fixed_right:p.fixed==="right",shadow:p.fixed==="right"?v<C:v>0}),o=p=>p.fixed==="right"?"right":"left",c={left:(p=!0)=>t.filter(v=>v.fixed&&v.fixed!=="right").reduce((v,C,I)=>p&&I===0?v:v+Nr(C),0),right:(p=!0)=>t.filter(v=>v.fixed==="right").reduce((v,C,I)=>p&&I===0?v:v+Nr(C),n?Lc:0)},d=c.right,h=()=>{const p=(I,N)=>{if(!I.fixed)return{};const x=o(I),T=x==="right"?-1:1,y=`${N[x]}px`;return N[x]=N[x]+Nr(I)*T,{[x]:y}},v=d(!0);return{fixedOffset:{left:0,right:v},resolveFixedColumnStyle:p}},f=(p,v)=>{const C=N=>({width:`${c[N](!1)}px`,bottom:`${i.value}px`}),I={left:!1,right:!1};return t.filter(N=>!N.isHidden&&N.fixed).map(N=>{const x=o(N),T=I[x];return I[x]=!0,T?"":a.createVNode("div",{class:l(N,p,v),style:C(x)},null)})},m=Ze("table-fixed");return{renderFixedColumns:f,fixedWrapperClass:m,getFixedColumnStyleResolve:h}};function B0(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}class Zp{constructor(t,n,i,l){Ka(this,"getRowHeight",(t,n)=>{const{size:i,height:l}=this.setting;return l!=null?It(this.setting,"height",["tbody",t,n,i]):It(this.props,"rowHeight",["tbody",t,n])});Ka(this,"getColumnClass",(t,n)=>({[`${this.uuid}-column-${n}`]:!0,column_fixed:!!t.fixed,column_fixed_left:!!t.fixed,column_fixed_right:t.fixed==="right"}));Ka(this,"getHeadColumnClass",(t,n)=>Te(F({},this.getColumnClass(t,n)),{active:this.isColActive(n)}));this.props=t,this.context=n,this.reactiveProp=i,this.colgroups=l,this.plugins=new Hp(t,n),this.uuid=Hi.v4(),this.events=new Map}get propActiveCols(){return this.reactiveProp.activeColumns}renderTableHeadSchema(){const{isShow:t=!0}=Sc(this.props);if(!t)return null;const n=i=>{const{checked:l=[],size:o,height:c}=i;this.reactiveProp.setting.size=o,this.reactiveProp.setting.height=c,l.length&&this.colgroups.forEach(d=>{d.isHidden=!(l!=null?l:[]).includes(It(d,["field","type"],[d]))}),this.emitEvent(ni.ON_SETTING_CHANGE,[i])};return[this.props.settings?a.createVNode(Bp,{class:"table-head-settings",settings:this.reactiveProp.settings,columns:this.props.columns,rowHeight:this.props.rowHeight,onChange:n},null):"",a.createVNode("table",{cellpadding:0,cellspacing:0},[this.renderColGroup(),this.renderHeader()])]}renderTableBodySchema(t){var n,i,l;return t.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":this.uuid},[this.renderColGroup(),this.renderTBody(t)]):(l=(i=(n=this.context.slots).empty)==null?void 0:i.call(n))!=null?l:a.createVNode(Jp,{filterList:t,list:this.props.data,emptyText:this.props.emptyText},null)}renderTableFooter(t){return a.createVNode(kc,a.mergeProps(t,{modelValue:t.current,onLimitChange:n=>this.handlePageLimitChange(n),onChange:n=>this.hanlePageChange(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(ln.PAGE_LIMIT_CHANGE,t)}hanlePageChange(t){Object.assign(this.props.pagination,{current:t,value:t}),this.context.emit(ln.PAGE_VALUE_CHANGE,t)}setColumnActive(t,n=!1){const i=this.propActiveCols.find(l=>l.index===t);Object.assign(i,{active:!i.active}),n&&this.propActiveCols.filter(l=>l.index!==t&&l.active).forEach(l=>{Object.assign(l,{active:!1})})}handleColumnHeadClick(t){this.props.columnPick!=="disabled"&&(this.setColumnActive(t,this.props.columnPick==="single"),this.context.emit(ln.COLUMN_PICK,this.propActiveCols))}getSortCell(t,n){const i=(l,o)=>{this.emitEvent(ni.ON_SORT_BY_CLICK,[{sortFn:l,column:t,index:n,type:o}])};return a.createVNode(Wp,{column:t,onChange:i},null)}getFilterCell(t,n){const i=(o,c)=>{const d=(h,f)=>c(o,h,f);this.emitEvent(ni.ON_FILTER_CLICK,[{filterFn:d,checked:o,column:t,index:n}])},l=o=>{this.context.emit(ln.COLUMN_FILTER_SAVE,{column:t,values:o})};return a.createVNode(Rp,{column:t,height:this.props.headHeight,onChange:i,onFilterSave:l},null)}renderHeader(){const t=Sc(this.props),{cellFn:n}=t,i={"--row-height":`${It(t,"height",["thead"])}px`},l=(f,m)=>{const p=[];return f.sort&&p.push(this.getSortCell(f,m)),f.filter&&p.push(this.getFilterCell(f,m)),typeof n=="function"?(p.unshift(n(f,m)),p):(p.unshift(It(f,"label",[f,m])),p)},o=f=>Array.from(f.listeners.keys()).reduce((m,p)=>{const v=p.split("_").slice(-1)[0];return Object.assign(m,{[v]:C=>{f.listeners.get(p).forEach(I=>Reflect.apply(I,this,[C,f,this]))}})},{}),{getFixedColumnStyleResolve:c}=zc(this.props,this.colgroups),{resolveFixedColumnStyle:d,fixedOffset:h}=c();return a.createVNode("thead",{style:i},[a.createVNode(jc,null,{default:()=>[a.createVNode("tr",null,[this.filterColgroups.map((f,m)=>{let p;return a.createVNode("th",a.mergeProps({colspan:1,rowspan:1,class:this.getHeadColumnClass(f,m),style:d(f,h),onClick:()=>this.handleColumnHeadClick(m)},o(f)),[a.createVNode(W0,null,B0(p=l(f,m))?p:{default:()=>[p]})])})])]})])}renderTBody(t){const{getFixedColumnStyleResolve:n}=zc(this.props,this.colgroups);return a.createVNode("tbody",null,[t.map((i,l)=>{const o=[...Lr(this.props.rowStyle,[i,l,this]),{"--row-height":`${this.getRowHeight(i,l)}px`}],c=[...Lr(this.props.rowClass,[i,l,this])],{resolveFixedColumnStyle:d,fixedOffset:h}=n(),f=`${this.uuid}-${i[Tt.ROW_UID]}`;return[a.createVNode(jc,{key:f},{default:()=>[a.createVNode("tr",{style:o,class:c,onClick:m=>this.handleRowClick(m,i,l,t),onDblclick:m=>this.handleRowDblClick(m,i,l,t)},[this.filterColgroups.map((m,p)=>{let v;const C=[d(m,h),...Lr(this.props.cellStyle,[m,p,i,l,this])],I=[this.getColumnClass(m,p),...Lr(this.props.cellClass,[m,p,i,l,this]),{"expand-row":i[Tt.ROW_EXPAND]}],N={cell:!0,"expand-cell":m.type==="expand"},x=`__CELL_${l}_${p}`;return a.createVNode("td",{class:I,style:C,key:x,colspan:1,rowspan:1},[a.createVNode(W0,{class:N,column:m,row:i},B0(v=this.renderCell(i,m,l,t))?v:{default:()=>[v]})])})])]}),this.renderExpandRow(i,c)]})])}renderExpandRow(t,n){if(!!t[Tt.ROW_EXPAND]){const l=[...n,{row_expend:!0}],o=`${this.uuid}-${t[Tt.ROW_UID]}_expand`;return a.createVNode(jc,{key:o},{default:()=>{var c,d,h;return[a.createVNode("tr",{class:l},[a.createVNode("td",{colspan:this.filterColgroups.length,rowspan:1},[(h=(d=(c=this.context.slots).expandRow)==null?void 0:d.call(c,t))!=null?h:a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}}handleRowClick(t,n,i,l){this.context.emit(ln.ROW_CLICK,t,n,i,l,this)}handleRowDblClick(t,n,i,l){this.context.emit(ln.ROW_DBL_CLICK,t,n,i,l,this)}getExpandCell(t){return!!t[Tt.ROW_EXPAND]?a.createVNode(ws,null,null):a.createVNode(ks,null,null)}handleRowExpandClick(t,n,i,l,o){this.emitEvent(ni.ON_ROW_EXPAND_CLICK,[{row:t,column:n,index:i,rows:l,e:o}])}renderCell(t,n,i,l){if(n.type==="expand"){const c=()=>{var d,h,f;return typeof n.render=="function"?n.render(null,t,i,l):(f=(h=(d=this.context.slots).expandCell)==null?void 0:h.call(d,{row:t,column:n,index:i,rows:l}))!=null?f:this.getExpandCell(t)};return a.createVNode("span",{class:"expand-btn-action",onClick:d=>this.handleRowExpandClick(t,n,i,l,d)},[c()])}const o=Dc(t,It(n,"field",[n,t]),n);if(typeof n.render=="function"){const c=this.props.data[t[Tt.ROW_INDEX]];return n.render({cell:o,data:c,row:t,column:n,index:i,rows:l})}return 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=Se({active:this.isColActive(n)}),l=`${Pp(Nr(t))}`.replace(/px$/i,"");return a.createVNode("col",{class:i,width:l},null)})])}get filterColgroups(){return this.colgroups.filter(t=>!t.isHidden)}get setting(){return this.reactiveProp.setting}}const Z0=e=>e.columnPick!=="disabled"?e.columnPick==="multi"?Array.isArray(e.activeColumn)?e.activeColumn:Tc(e.activeColumn):Array.isArray(e.activeColumn)?Tc(e.activeColumn[0]):Tc(e.activeColumn):[];var Gp=e=>{let t=a.reactive([]);if(e.columnPick==="disabled")return{activeColumns:t};const n=a.reactive(Z0(e)),i=()=>(e.columns||[]).map((l,o)=>({index:o,active:n.some(c=>c===o),_column:l}));return a.watchEffect(()=>{t=i();const l=Z0(e);t.forEach((o,c)=>{Object.assign(o,{active:l.some(d=>d===c)})})}),{activeColumns:t}},_p=(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 l=!1,o=!1,c=!1,d=0,h=null,f=0;const m=a.ref(-1e3),p=b=>{var A;o=!1,c=!1;const M=document.body.style;M.cursor="";const L=b.clientX-d;h.resizeWidth=((A=h.resizeWidth)!=null?A:h.calcWidth)+L,document.removeEventListener("mouseup",p),document.removeEventListener("mousemove",C),d=0,m.value=-1e3,h=null,b.target.closest("table").querySelectorAll("th").forEach(O=>O.style.setProperty("user-select","inherit"))},v=b=>jt.exports.throttle(()=>{m.value=b.clientX-d+f},60),C=b=>{document.body.style.setProperty("cursor",""),v(b)()},I={[i.MOUSE_DOWN]:(b,M)=>{if(!l)return;o=!0,document.body.style.setProperty("cursor","col-resize"),h=M,d=b.clientX;const k=b.target.closest("table");f=d-k.getBoundingClientRect().left,document.addEventListener("mouseup",p),document.addEventListener("mousemove",C)},[i.MOUSE_MOVE]:(b,M)=>{o&&!c&&(c=!0);const L=b.target.closest("th");if(c&&L.style.setProperty("user-select","none"),!c){if(!L)return;const k=L.getBoundingClientRect();k.width>12&&k.right-b.pageX<8?(l=!0,L.style.setProperty("cursor","col-resize")):(L.style.setProperty("cursor",""),l=!1)}},[i.MOUSE_OUT]:(b,M)=>{const L=b.target;c||L.style.setProperty("cursor","")}},N=b=>`${n}_${b}`,x=()=>{e.forEach(b=>{b.resizable!==!1&&Object.keys(I).forEach(M=>{const L=N(M);b.listeners.has(L)||b.listeners.set(L,[]),b.listeners.get(L).push(I[M])})})},T=()=>{e.forEach(b=>{Object.keys(I).forEach(M=>{const L=N(M);if(b.listeners.has(L)){const k=b.listeners.get(L);k.splice(0,k.length)}})})};t&&x();const y=a.computed(()=>({position:"absolute",top:0,bottom:0,left:0,width:"1px","background-color":"#ebeef5"}));return{registerResizeEvent:x,resetResizeEvents:T,dragOffsetX:m,dragOffsetXStyle:y}};const Yp=(e,t,n,i)=>{const l=a.ref(200),o=a.ref(void 0),c=a.computed(()=>e.pagination&&e.data.length),d=a.computed(()=>Se({[Ze("table")]:!0,"has-footer":c.value,"has-scroll-y":o.value||e.virtualEnabled},Op(e.border))),h=Se({[Ze("table-head")]:!0,"has-settings":!!e.settings}),f=Sc(e),m=a.computed(()=>({"--row-height":`${It(f,"height",["thead"])}px`,"--scroll-head-left":`-${n.scrollTranslateX}px`,"--scroll-left":`${n.scrollTranslateX}px`})),p={[Ze("table-body")]:!0},v=a.computed(()=>Se({[Ze("table-footer")]:!0,["is-hidden"]:!e.pagination||!e.data.length})),C=()=>{if(e.columns.every(k=>/^\d+\.?\d*(px)?$/ig.test(`${k.width}`))){const k=e.columns.reduce((O,J)=>O+Number(`${J.width}`.replace(/px/ig,"")),0),A=o.value?Lc:0;return`${k+A}px`}return"100%"},I=a.computed(()=>({minHeight:Q0(e.minHeight,"auto"),width:C(),maxWidth:"100%"})),N=(k,A)=>{const O=String(k);if(/^\d+\.?\d*$/.test(O))return Number(O);if(/^\d+\.?\d*px$/ig.test(O))return Number(O.replace("px",""));if(/^\d+\.?\d*%$/ig.test(O)&&typeof A=="number"){const J=Number(O.replace("%",""));return A*J/100}return A},x=a.reactive({}),T=()=>e.showHead?N(e.headHeight,ii):0,y=()=>{const k=N(e.height,l.value),A=T(),O=N(e.minHeight,l.value),J=e.pagination&&e.data.length?ii:0,P=k-A-J,E=e.height!=="auto"?`${P}px`:!1,ee=O-A-J,H=N(e.maxHeight,void 0),le=typeof H=="number"?`${H-A-J}px`:!1;Object.assign(x,{display:i!=null&&i.length?"block":!1,"min-height":`${ee}px`,height:E,maxHeight:le})};a.onMounted(()=>{b(t==null?void 0:t.value)});const b=k=>{if(k){const{height:A}=k.parentElement.getBoundingClientRect();l.value=A,y(),M(k)}},M=k=>{const A=e.virtualEnabled?`.${Ze("virtual-section")}`:`.${Ze("table-body-content")}`,O=k.querySelector(".bk-table-body");o.value=Ep(O,A,0)};return{tableClass:d,headClass:h,contentClass:p,footerClass:v,wrapperStyle:I,contentStyle:x,headStyle:m,resetTableHeight:b,updateBorderClass:M,getColumnsWidthOffsetWidth:()=>{let k=0;return o.value&&(k=k+Lc),e.border.includes(Fs.OUTER)&&!e.border.includes(Fs.NONE)&&(k=k+2),k},hasFooter:c,hasScrollY:o}},Fp=e=>{var x,T;const t=a.reactive([]),n=()=>{t.splice(0,t.length,...(e.columns||[]).map(y=>Te(F({},y),{calcWidth:null,resizeWidth:null,listeners:new Map})))},{dragOffsetXStyle:i,dragOffsetX:l,resetResizeEvents:o,registerResizeEvent:c}=_p(t,!0),{activeColumns:d}=Gp(e);a.watch(()=>e.columns,()=>{n(),o(),c()},{immediate:!0,deep:!0});const h=a.reactive({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:d,settings:e.settings,setting:{size:(x=e.settings)==null?void 0:x.size,height:Us[(T=e.settings)==null?void 0:T.size]}}),f=y=>{var b;return h.rowActions.has(y)?(b=h.rowActions.get(y))==null?void 0:b.isExpand:!1},m=(y,b=void 0)=>{var k;const M=y[Tt.ROW_UID],L=typeof b=="boolean"?b:!f(M);h.rowActions.set(M,Object.assign({},(k=h.rowActions.get(M))!=null?k:{},{isExpand:L})),C()},p=a.reactive([]),v=(y=!1)=>{p.splice(0,p.length,...e.data.map((b,M)=>{const L=Ap(b,e,M);return Te(F({},b),{[Tt.ROW_INDEX]:M,[Tt.ROW_UID]:L,[Tt.ROW_EXPAND]:y?f(L):!1})}))},C=()=>{p.forEach(y=>{Object.assign(y,{[Tt.ROW_EXPAND]:f(y[Tt.ROW_UID])})})},{renderFixedColumns:I,fixedWrapperClass:N}=zc(e,t,!1);return{colgroups:t,dragOffsetXStyle:i,dragOffsetX:l,reactiveSchema:h,indexData:p,fixedWrapperClass:N,initIndexData:v,updateIndexData:C,renderFixedColumns:I,setRowExpand:m,updateColGroups:n}};var Up=a.defineComponent({name:"Table",props:Ip,emits:Mp,setup(e,t){let n=null,i=null,l=null,o=null;const c=a.ref(),d=a.ref(),h=a.ref(0),{colgroups:f,dragOffsetXStyle:m,dragOffsetX:p,reactiveSchema:v,indexData:C,renderFixedColumns:I,setRowExpand:N,initIndexData:x,fixedWrapperClass:T}=Fp(e),{pageData:y,localPagination:b,resolvePageData:M,watchEffectFn:L}=Np(e,C),{tableClass:k,headClass:A,contentClass:O,footerClass:J,wrapperStyle:P,contentStyle:E,headStyle:ee,updateBorderClass:H,resetTableHeight:le,getColumnsWidthOffsetWidth:de,hasFooter:he}=Yp(e,c,v,y),ye=new Zp(e,t,v,f),re=()=>{const ne=c.value.querySelector(".bk-table-body-content"),Y=ne.querySelector("table");if(Y){const Z=Y.scrollWidth,ae=ne.clientWidth;h.value=Z-ae}};a.watch(()=>[e.data,e.pagination],()=>{x(e.reserveExpand),L(l,n,i),a.nextTick(()=>{le(c.value),H(c.value)})},{immediate:!0,deep:!0}),a.watchEffect(()=>{if((c==null?void 0:c.value)instanceof HTMLElement){const ne=de();xc(c.value,f,20,ne),re()}}),ye.on(ni.ON_SORT_BY_CLICK,ne=>{var D,W;const{sortFn:Y,column:Z,index:ae,type:pe}=ne;typeof Y=="function"&&(n=Y,i=Z,M(l,n,i),(W=(D=d.value)==null?void 0:D.reset)==null||W.call(D)),t.emit(ln.COLUMN_SORT,{column:Z,index:ae,type:pe})}).on(ni.ON_FILTER_CLICK,ne=>{var D,W;const{filterFn:Y,checked:Z,column:ae,index:pe}=ne;typeof Y=="function"&&(l=Y,M(l,n,i),(W=(D=d.value)==null?void 0:D.reset)==null||W.call(D)),t.emit(ln.COLUMN_FILTER,{checked:Z,column:ae,index:pe})}).on(ni.ON_SETTING_CHANGE,ne=>{const{checked:Y=[],size:Z,height:ae}=ne;a.nextTick(()=>{var D,W;H(c.value);const pe=de();Y.length&&xc(c.value,f,20,pe),(W=(D=d.value)==null?void 0:D.reset)==null||W.call(D),t.emit(ln.SETTING_CHANGE,{checked:Y,size:Z,height:ae})})}).on(ni.ON_ROW_EXPAND_CLICK,ne=>{const{row:Y,column:Z,index:ae,rows:pe,e:D}=ne;t.emit(ln.ROW_EXPAND_CLICK,{row:Y,column:Z,index:ae,rows:pe,e:D}),N(Y,!Y[Tt.ROW_EXPAND])});const K=ne=>{var Q;const Y=(Q=v.pos.bottom)!=null?Q:0,Z=ne[1],{translateX:ae,translateY:pe,pos:D={}}=Z;v.scrollTranslateY=pe,v.scrollTranslateX=ae,v.pos=D;const{bottom:W}=D;W<=2&&Y>W&&yf(60,()=>{t.emit(ln.SCROLL_BOTTOM,Te(F({},D),{translateX:ae,translateY:pe}))},!0)(),re()};a.onMounted(()=>{o=R0(c.value,()=>{(e.height==="100%"||e.height==="auto")&&le(c.value),H(c.value);const ne=de();xc(c.value,f,20,ne)},60,!0),o.start()}),a.onBeforeUnmount(()=>{o.stop(),o=null,ye.destroy()}),t.expose({setRowExpand:N});const B=a.computed(()=>Te(F({},O),{"__is-empty":!y.length})),V={[Ze("table-body-content")]:!0,"with-virtual-render":e.virtualEnabled},$={column_drag_line:!0,"offset-x":!0},X=a.computed(()=>Te(F({},m.value),{left:`${p.value-v.scrollTranslateX}px`})),fe={"scroll-loading":!0,_bottom:!0},ce={[Ze("fixed-bottom-border")]:!0,"_is-empty":!e.data.length},{renderScrollLoading:Ce}=Lp(e,t),Ee=e.virtualEnabled?{}:{scrollXName:"",scrollYName:""};return()=>a.createVNode("div",{class:k.value,style:P.value,ref:c},[a.createVNode("div",{class:A,style:ee.value},[ye.renderTableHeadSchema()]),a.createVNode(Ir,a.mergeProps({ref:d,lineHeight:ye.getRowHeight,class:B.value,style:E,list:y},Ee,{contentClassName:V,onContentScroll:K,throttleDelay:0,scrollEvent:!0,enabled:e.virtualEnabled}),{default:ne=>ye.renderTableBodySchema(ne.data||e.data),afterSection:()=>a.createVNode("div",{class:ce},null)}),a.createVNode("div",{class:T},[I(v.scrollTranslateX,h.value),a.createVNode("div",{class:$,style:X.value},null),a.createVNode("div",{class:fe},[Ce()])]),a.createVNode("div",{class:J.value},[he.value&&ye.renderTableFooter(b.value)])])}});const G0=Ge(Up),Da=12;function $p(e){const t=a.reactive({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:(l=[])=>{t.curPage=1,t.totalSize=l.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(l.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:l=>{t.curPage=l,t.curPageList.splice(t.curPageList.length,0,...t.renderListPaged[t.curPage-1]||[]),t.isPageLoading=!1}}}function Xp(e){const{useGroup:t,saveKey:n,displayKey:i,list:l}=a.toRefs(e),o=a.reactive([]);a.watch([t,n,i,l],()=>{o.splice(0,o.length);let d=l.value;t.value&&(d=l.value.reduce((h,f)=>{let m=[];return f.children&&(m=f.children.map(p=>F({group:{groupId:f[n.value],groupName:f[i.value]}},p))),h.concat(m)},[])),c(d)},{immediate:!0,deep:!0});function c(d){const f=d.length;for(let m=0;m<f;m+=3e4){const p=d.slice(m,Math.min(m+3e4,f));o.push(...p)}}return o}const _0=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 Y0=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,default:null}},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 Kp=()=>({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,default:null},filterCallback:{type:Function,default:null},tagTpl:{type:Function,default:null},tpl:{type:Function,default:null},pasteFn:{type:Function,default:null},withValidate:{type:Boolean,default:!0}});var qp=a.defineComponent({name:"TagRender",props:{node:g.object,displayKey:g.string,tpl:{type:Function,default:null}},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]])])}}),e5=a.defineComponent({name:"TagInput",directives:{bkTooltips:cc},props:Kp(),emits:["update:modelValue","change","select","blur","remove","removeAll"],setup(e,{emit:t}){const n=On(),i=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),l=a.reactive({isShow:!1,width:190,modifiers:[{name:"offset",options:{offset:[0,4]}}]}),{maxResult:o}=a.toRefs(e),{pageState:c,initPage:d,pageChange:h}=$p(o),f=a.ref(""),m=a.ref(null),p=a.ref(null),v=a.ref(null),C=a.ref(null),I=a.ref(null),N=a.ref(null),x=a.ref(null),T=a.computed(()=>!e.disabled&&e.hasDeleteIcon),y=a.computed(()=>e.maxData===1),b=a.computed(()=>P.selectedTagList.length===0&&f.value===""&&!i.isEdit),M=a.computed(()=>e.clearable&&!e.disabled&&P.selectedTagList.length!==0&&(e.showClearOnlyHover?i.isHover:!0)),L=a.computed(()=>({"bk-tag-input-trigger":!0,active:i.isEdit,disabled:e.disabled}));a.watch([()=>[...e.modelValue],()=>[...e.list]],()=>{var G;a.nextTick(()=>{le()}),e.withValidate&&((G=n==null?void 0:n.validate)==null||G.call(n,"change"))}),a.watch(f,jt.exports.debounce(()=>{const G=c.curPageList.length!==0,{value:te}=f;te!==""&&G||te===""&&e.trigger==="focus"&&G?l.isShow=!0:(e.trigger!=="focus"||!G)&&(l.isShow=!1)},150)),a.watch(()=>l.isShow,G=>{k(),G&&I.value&&(a.nextTick(()=>{I.value.scrollTop=0}),I.value.removeEventListener("scroll",A),I.value.addEventListener("scroll",A))});const k=()=>{var te,ie;const G=y.value?0:(te=C.value)==null?void 0:te.offsetLeft;l.modifiers=[{name:"offset",options:{offset:[G,4]}}],(ie=N.value)==null||ie.update()},A=()=>{if(c.isPageLoading||I.value.scrollTop===0)return;const{scrollTop:G,offsetHeight:te,scrollHeight:ie}=I.value;if(G+te>=ie){const Me=c.curPage+1;Me<=c.totalPage&&(c.isPageLoading=!0,setTimeout(()=>{h(Me)},500))}},O=()=>{var te;return Array.from(((te=v.value)==null?void 0:te.childNodes)||[]).filter(ie=>ie.nodeType!==Node.TEXT_NODE)},J=G=>{if(!e.disabled){if(G!=null&&G.target){const{className:te}=G.target;(te.indexOf("bk-tag-input-trigger")>-1||te.indexOf("tag-list")>-1)&&v.value.appendChild(C.value)}clearTimeout(x.value),y.value&&E.value.length&&(P.tagListCache=[...E.value],P.selectedTagListCache=[...P.selectedTagList],f.value=P.selectedTagListCache[0][e.saveKey],Q(P.selectedTagList[0],0),V()),i.isEdit=!0,a.nextTick(()=>{var te;(te=m.value)==null||te.focus(),e.trigger==="focus"&&P.localList.length!==0&&(de(),l.isShow?k():l.isShow=!0)})}},P=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),E=a.computed(()=>P.selectedTagList.map(G=>G[e.saveKey])),ee=Xp(e),H=a.computed(()=>{if(e.useGroup){const G={};return c.curPageList.forEach((te,ie)=>{te.__index__=ie,G[te.group.groupId]||(G[te.group.groupId]={id:te.group.groupId,name:te.group.groupName,children:[]}),G[te.group.groupId].children.push(te)}),Object.keys(G).map(te=>G[te])}return c.curPageList}),le=()=>{const{saveKey:G,modelValue:te,displayKey:ie,allowCreate:Me,trigger:Ie}=e;P.selectedTagList=[],P.localList=[...ee],te.length&&(te.forEach(Le=>{const He=P.localList.find(ot=>Le===ot[G]);He!==void 0?P.selectedTagList.push(He):Me&&!E.value.includes(Le)&&P.selectedTagList.push({[G]:Le,[ie]:Le})}),y.value||(P.localList=P.localList.filter(Le=>!te.includes(Le[G])))),Ie==="focus"&&de()},de=(G="")=>{const{searchKey:te,filterCallback:ie}=e,Me=G.toLowerCase();let Ie=[];if(typeof ie=="function")Ie=ie(Me,te,P.localList)||[];else if(Array.isArray(te)){const Le=te.map(He=>P.localList.filter(ot=>ot[He].toLowerCase().indexOf(Me)!==-1));Ie=Array.from(new Set(Le.flat()))}else Ie=P.localList.filter(Le=>Le[te].toLowerCase().indexOf(Me)!==-1);d(Ie)},he=(G,te)=>{const ie={"bk-selector-actived":!1,"bk-selector-selected":E.value.includes(G[e.saveKey])};return e.useGroup?ie["bk-selector-actived"]=G.__index__===i.focusItemIndex:ie["bk-selector-actived"]=te===i.focusItemIndex,ie};a.onMounted(()=>{le()});const ye=()=>{P.tagListCache=[],P.selectedTagListCache=[],P.selectedTagList=[]},re=()=>{f.value=""},K=()=>{if(y.value)return 0;const te=O().findIndex(({id:ie})=>ie==="tagInputItem");return te>=0?te:0},B=(G,te,ie=!1)=>{if(!te||!G)return;let Me=te;ie&&(Me=te.nextElementSibling||null),te.parentNode.insertBefore(G,Me)},V=G=>{const{maxData:te,trigger:ie,allowCreate:Me}=e;if(te===-1||te>E.value.length){const{value:Ie}=G!=null&&G.target?G.target:f,Le=_0(Ie);Le?(de(Ie),m.value.style.width=`${Le*Da}px`):ie==="focus"&&de()}else X(),f.value="",l.isShow=!1;i.isEdit=!0,i.focusItemIndex=Me?-1:0},$=()=>{var G;l.width=y.value?(G=p.value)==null?void 0:G.clientWidth:e.contentWidth},X=()=>{x.value=setTimeout(()=>{var te;const G=f.value;if(re(),i.isEdit=!1,y.value){const[ie]=P.tagListCache;G&&G===ie&&P.selectedTagListCache.length?W(P.selectedTagListCache[0],"select"):Ce("remove")}else if(e.allowAutoMatch&&G){const ie=c.curPageList.find(Me=>Array.isArray(e.searchKey)?e.searchKey.map(Le=>Me[Le]).includes(G):Me[e.searchKey]===G);ie?fe(ie,"select"):e.allowCreate&&fe(G,"custom")}l.isShow=!1,t("blur",G,E.value),(te=n==null?void 0:n.validate)==null||te.call(n,"blur")},200)},fe=(G,te,ie)=>{ie==null||ie.stopPropagation(),!(!G||G.disabled)&&(y.value&&ye(),W(G,te),Ce("select"),re(),l.isShow=!1)},ce=(G,te,ie)=>{ie==null||ie.stopPropagation(),Q(G,te),re(),Ce("remove",G),m.value.style.width=`${Da}px`},Ce=(G,te)=>{t("change",E.value),t(G,te),t("update:modelValue",E.value)},Ee=G=>{G.stopPropagation();const te=P.selectedTagList;P.selectedTagList=[];const ie=ee.filter(Me=>te.some(Ie=>Ie[e.saveKey]===Me[e.saveKey]));(e.allowCreate&&ie.length!==0||!e.allowCreate)&&!y.value&&P.localList.push(...ie),Ce("removeAll")},ne=()=>{const G={height:I.value.clientHeight,yAxis:I.value.getBoundingClientRect().y};a.nextTick(()=>{const te=I.value.querySelector(".bk-selector-actived");if(!te)return;const ie={height:te.clientHeight,yAxis:te.getBoundingClientRect().y};ie.yAxis<G.yAxis&&(I.value.scrollTop=I.value.scrollTop-(G.yAxis-ie.yAxis));const Me=ie.yAxis+ie.height-G.yAxis;Me>G.height&&(I.value.scrollTop=I.value.scrollTop+Me-G.height)})},Y=(G,te)=>{const ie=O();B(C.value,ie[G-1]),P.selectedTagList.splice(G-1,1),J();const Me=ee.some(Ie=>Ie===te[e.saveKey]);(e.allowCreate&&Me||!e.allowCreate)&&!y.value&&P.localList.push(te),m.value=`${Da}px`,Ce("remove")},Z=G=>{if(c.isPageLoading)return;let te;const ie=G.target.value,Me=_0(ie),Ie=K(),Le=O();switch(G.code){case"ArrowUp":if(G.preventDefault(),!l.isShow)return;i.focusItemIndex=i.focusItemIndex-1,i.focusItemIndex=i.focusItemIndex<0?-1:i.focusItemIndex,i.focusItemIndex===-1&&(i.focusItemIndex=c.curPageList.length-1),ne();break;case"ArrowDown":if(G.preventDefault(),!l.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),ne();break;case"ArrowLeft":if(i.isEdit=!0,!Me){if(Ie<1)return;B(C.value,Le[Ie-1]),J()}break;case"ArrowRight":if(i.isEdit=!0,!Me){if(Ie===Le.length-1)return;B(Le[Ie+1],C.value),J()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&l.isShow||e.allowCreate&&i.focusItemIndex>=0&&l.isShow?fe(c.curPageList[i.focusItemIndex],"select",G):e.allowCreate&&fe(f.value,"custom",G),G.preventDefault();break;case"Backspace":Ie!==0&&!f.value&&(te=P.selectedTagList[Ie-1],Y(Ie,te));break}},ae=G=>{const te=[],ie=G.split(";"),Me=/^[a-zA-Z][a-zA-Z_]*/g;return ie.forEach(Ie=>{const Le=Ie.match(Me);if(Le){const He=Le.join("");te.push({[e.saveKey]:He,[e.displayKey]:He})}}),te},pe=G=>{if(G.preventDefault(),y.value)return!1;const{maxData:te,saveKey:ie,displayKey:Me,pasteFn:Ie,allowCreate:Le}=e,He=G.clipboardData.getData("text");let Fe=(Ie?Ie(He):ae(He)).map(Ke=>Ke[ie]);if(Fe.length){const Ke=O(),$t=K(),xt=P.localList.map(Re=>Re[ie]);if(Fe=Fe.filter(Re=>{const qe=(Re==null?void 0:Re.trim())&&!E.value.includes(Re);return Le?qe:qe&&xt.includes(Re)}),te!==-1){const Re=P.selectedTagList.length;if(Re<te){const qe=te-Re;Fe.length>qe&&(Fe=[...Fe.slice(0,qe)])}else Fe=[]}const Xe=Le?Fe.map(Re=>{const qe=P.localList.find(ji=>ji[ie]===Re);return qe!=null?qe:{[ie]:Re,[Me]:Re}}):P.localList.filter(Re=>Fe.includes(Re[ie]));Fe.length&&(P.selectedTagList.splice($t,0,...Xe),B(C.value,Ke[$t]),m.value.style.width=`${Da}px`,P.localList=P.localList.filter(Re=>!Fe.includes(Re[ie])),Ce("select"),J())}},D=G=>{e.disabled||(B(C.value,G.currentTarget,!0),m.value.style.width=`${Da}px`,l.isShow&&k())},W=(G,te)=>{if(P.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:ie,saveKey:Me,displayKey:Ie,createTagValidator:Le}=e,He=K();let ot=1,Fe=!1,Ke;const $t=Xe=>typeof Le=="function"?Le(Xe):!0,xt=Xe=>P.localList.find(Re=>Re[Me]===Xe);if(te==="custom")if(ie){let Xe=G.split(ie);Xe=Xe.filter(qe=>(qe==null?void 0:qe.trim())&&!E.value.includes(qe)&&$t(qe));const Re=Xe.map(qe=>xt(qe)||{[Me]:qe,[Ie]:qe});Xe.length&&(P.selectedTagList.splice(He,0,...Re),ot=Re.length,Fe=!0)}else{const Xe=typeof G=="object";if(Ke=Xe?G[Me]:G.trim(),Ke=Ke.replace(/\s+/g,""),Ke!==void 0&&!E.value.includes(Ke)&&$t(Ke)){const Re=xt(Ke)||(Xe?G:{[Me]:Ke,[Ie]:Ke});P.selectedTagList.splice(He,0,Re),Fe=!0}}else G&&(Ke=G[Me],Ke!==void 0&&!E.value.includes(Ke)&&(P.selectedTagList.splice(He,0,G),Fe=!0));Fe&&a.nextTick(()=>{for(let Xe=1;Xe<=ot;Xe++){const qe=O()[He+Xe];B(qe,C.value)}m.value.style.width=`${Da}px`,y.value||(e.allowNextFocus&&J(),P.localList=P.localList.filter(Xe=>!E.value.includes(Xe[Me])))})},Q=(G,te)=>{P.selectedTagList.splice(te,1);const ie=ee.some(Me=>Me===G[e.saveKey]);(e.allowCreate&&ie||!e.allowCreate)&&!y.value&&P.localList.push(G)};return Te(F(F(F({popoverProps:l},a.toRefs(i)),a.toRefs(P)),a.toRefs(c)),{isShowPlaceholder:b,isShowClear:M,curInputValue:f,formatList:ee,renderList:H,showTagClose:T,tagInputRef:m,bkTagSelectorRef:p,tagListRef:v,tagInputItemRef:C,selectorListRef:I,popoverRef:N,triggerClass:L,focusInputTrigger:J,activeClass:he,handleInput:V,handleFocus:$,handleBlur:X,handleTagSelected:fe,handleTagRemove:ce,handleClear:Ee,tagFocus:D,handleKeydown:Z,handlePaste:pe})},render(){const e=()=>this.useGroup?this.renderList.map(t=>a.createVNode("li",{class:"bk-selector-group-item"},[a.createVNode("span",{class:"group-name"},[t.name,a.createTextVNode(" ("),t.children.length,a.createTextVNode(")")]),a.createVNode("ul",{class:"bk-selector-group-list-item"},[t.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(Y0,{node:n,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]))])])):this.renderList.map((t,n)=>a.createVNode("li",{class:["bk-selector-list-item",{disabled:t.disabled},this.activeClass(t,n)],onClick:this.handleTagSelected.bind(this,t,"select")},[a.createVNode(Y0,{node:t,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]));return a.createVNode("div",{class:"bk-tag-input",ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode(Os,{ref:"popoverRef",theme:"light",trigger:"manual",placement:"bottom-start",arrow:!1,width:this.popoverProps.width,isShow:this.popoverProps.isShow,modifiers:this.popoverProps.modifiers},{default:()=>{var t,n,i;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`}},[this.selectedTagList.map((l,o)=>{const c={boundary:"window",theme:"light",distance:12,content:l[this.tooltipKey],disabled:!this.tooltipKey};return a.withDirectives(a.createVNode("li",{class:"tag-item",onClick:this.tagFocus},[a.createVNode(qp,{node:l,tpl:this.tagTpl,displayKey:this.displayKey},null),this.showTagClose?a.createVNode(An,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,l,o)},null):null]),[[a.resolveDirective("bk-tooltips"),c]])}),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":l=>this.curInputValue=l,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]]),(i=(n=(t=this.$slots)==null?void 0:t.suffix)==null?void 0:n.call(t))!=null?i:this.isShowClear&&a.createVNode(wn,{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"},[e(),this.isPageLoading?a.createVNode("li",{class:"bk-selector-list-item loading"},[a.createVNode(Ci,{theme:"primary",size:En.Small},null)]):null])])})])}});const F0=Ge(e5),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 n5=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 U0=Ge(n5),i5={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},a5={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)},r5=F({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)},i5),s5={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 $0=a.defineComponent({name:"TabNav",props:r5,setup(e){const t=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const d=[];let h=!1;return e.panels.filter((f,m)=>{if(!f.props)return null;const{name:p,label:v,closable:C,visible:I,disabled:N,sortable:x}=f.props;if(!I)return!1;e.active===p&&(h=!0);const T=y=>f.slots.label?a.h(f.slots.label):[void 0,""].includes(y)?`\u9009\u9879\u5361${m+1}`:typeof y=="string"?y:typeof y=="function"?a.h(y):y;return d.push({name:p,closable:C,visible:I,disabled:N,sortable:x,tabLabel:T(v)}),!0}),!h&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),d}),n=a.ref(-1),i=a.ref(-1),l=a.ref(""),o=(d,h)=>d===h;return Te(F({},{handleTabAdd(d){e.tabAdd(d)},dragstart(d,h){i.value=d,l.value=e.guid,Object.assign(h.dataTransfer,{effectAllowed:"move"}),e.tabDrag(d,h)},dragenter(d){o(l.value,e.guid)&&(n.value=d)},dragend(){n.value=-1,i.value=-1,l.value=null},drop(d,h){if(!o(l.value,e.guid))return!1;e.tabSort(i.value,d,h)},handleTabChange(d){e.tabChange(d)},handleTabRemove(d,h){e.tabRemove(d,h)}}),{navs:t,dragenterIndex:n,dragStartIndex:i,draggingEle:l,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4)})},render(){const{active:e,closable:t,addable:n,sortable:i,sortType:l,labelHeight:o,dragstart:c,dragenter:d,dragend:h,drop:f}=this,m=()=>this.navs.map((v,C)=>{if(!v)return null;const{name:I,disabled:N,tabLabel:x}=v,T=()=>{const b=["bk-tab-header-item"];return N&&b.push("bk-tab-header--disabled"),e===I&&b.push("bk-tab-header--active"),b.join(" ")},y=(b,M)=>b||M;return a.createVNode("div",{key:I,onClick:()=>this.handleTabChange(I),draggable:y(v.sortable,i),onDragstart:b=>c(C,b),onDragenter:b=>{b.preventDefault(),d(C)},onDragleave:b=>{b.preventDefault()},onDragover:b=>{b.preventDefault()},onDragend:b=>{b.preventDefault(),h()},onDrop:b=>{b.preventDefault(),f(C,l)},class:T()},[a.createVNode("div",null,[x]),y(v.closable,t)&&a.createVNode(wn,{class:"bk-tab-header-item-close",onClick:()=>this.handleTabRemove(C,v)},null)])}),p=()=>{var C,I;const v=[];return typeof this.$slots.add=="function"?v.push((I=(C=this.$slots).add)==null?void 0:I.call(C,a.h)):n&&v.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(Ls,{width:26,height:26},null)])),v.length?a.createVNode("div",{class:"bk-tab-header-operation"},[v.map((N,x)=>a.createVNode("div",{class:"bk-tab-header-item",key:x},[N]))]):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()])])}}),l5=a.defineComponent({name:"Tab",components:{TabNav:$0},props:a5,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),l=a.ref([]),o=a.getCurrentInstance(),c=(f,m=[])=>{const{children:p}=f;return(p||[]).forEach(v=>{let{type:C}=v;C=C.name||C,C==="TabPanel"&&v.component?m.push(v.component):(C===a.Fragment||C==="template")&&c(v,m)}),m},d=()=>{if(t.default){const{children:f}=o.subTree.children[1];if(!f)return;const m=f[0],p=c(m);p.length!==l.value.length&&(l.value=p)}};return a.onMounted(()=>{d(),i.value=!0}),a.onUpdated(()=>{d()}),Te(F({},{tabAdd(f){n("add",{e:f}),n("add-panel",{e:f})},tabChange(f){n("change",f),n("tab-change",f),n("update:active",f)},tabRemove(f,m){n("remove",f,m),n("remove-panel",f,m)},tabSort(f,m,p){const v=l.value;if(p==="insert")if(f<m)v.splice(m+1,0,l[f]),v.splice(f,1);else if(f>m)v.splice(m,0,l[f]),v.splice(f+1,1);else return!1;else{const C=v[m];v[m]=v[f],v[f]=C}l.value=[...v],n("sort",f,m,p),n("sort-change",f,m,p)},tabDrag(f,m){n("drag",f,m),n("on-drag-tab",f,m)}}),{isMounted:i,panels:l})},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:l,active:o,type:c,closable:d,addable:h,sortable:f,sortType:m,labelHeight:p,scrollStep:v,validateActive:C,changeOnHover:I,changeOnHoverDelay:N,tabPosition:x,tabAdd:T,tabChange:y,tabRemove:b,tabSort:M,tabDrag:L}=this,k={panels:l,active:o,type:c,closable:d,addable:h,sortable:f,sortType:m,labelHeight:p,scrollStep:v,validateActive:C,changeOnHover:I,changeOnHoverDelay:N,tabPosition:x,tabAdd:T,tabChange:y,tabRemove:b,tabSort:M,tabDrag:L};return!l||!Array.isArray(l)?null:a.createVNode($0,k,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)])])}}),o5=a.defineComponent({name:"TabPanel",props:s5,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 X0=Rt(l5,{TabPanel:o5}),ki={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let K0=1;const q0=(e,t)=>{let n=t;const i=n.position||"top-right";typeof t=="string"&&(n={message:t});const l=t.onClose,o=n.offsetX||10;let c=n.offsetY||30;const{spacing:d=10}=n;ki[i].forEach(v=>{c+=(v.el.offsetHeight||0)+d}),K0+=1;const h=`message_${K0}`;n=Te(F({},n),{offsetX:o,offsetY:c,id:h});const f=document.createElement("div"),m=a.createVNode(e,n);m.props.onDestroy=v=>{c5(v,i,d,l),a.render(null,f)},a.render(m,f),ki[i].push(m);let p;m.props.getContainer&&or(m.props.getContainer)?p=m.props.getContainer:p=document.body,p.appendChild(f.firstElementChild)};function c5(e,t,n,i){i==null||i();const l=t.startsWith("top")?"top":"bottom";let o=-1;ki[t].forEach((f,m)=>{f.props.id===e&&(o=m)});const d=ki[t][o].el.offsetHeight,h=ki[t].length;for(let f=o;f<h;f++){const m=parseInt(ki[t][f].el.style[l],10)-d-n;ki[t][f].component.props.offsetY=m}ki[t].splice(o,1)}const u5={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 d5=a.defineComponent({name:"Message",props:u5,emits:["destroy"],setup(e,{emit:t}){const n=a.computed(()=>["bk-message",`bk-message-${e.theme}`,`${e.extCls}`]),i=yn.getMessageNextIndex(),l=a.computed(()=>e.getContainer&&or(e.getContainer)),o=a.computed(()=>({top:`${e.offsetY}px`,zIndex:i,position:l.value?"absolute":"fixed"})),c=a.ref(!1);let d=null;const h=()=>{d=setTimeout(()=>{c.value=!1},e.delay)},f=m=>{m.preventDefault(),m.stopPropagation(),c.value=!1};return a.onMounted(()=>{e.delay&&h(),c.value=!0}),a.onUnmounted(()=>{clearTimeout(d)}),a.watch(c,()=>{c.value||t("destroy",e.id)}),{classNames:n,styles:o,visible:c,close:f}},render(){const e=()=>({primary:a.createVNode(Ns,null,null),warning:a.createVNode(js,null,null),success:a.createVNode(Ss,null,null),error:a.createVNode(wn,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(An,{class:"bk-message-close",onClick:this.close},null)]),[[a.vShow,this.visible]])]})}});const e9=e=>{q0(d5,e)},t9=e=>{const t=document.createElement("div"),n=a.ref(!1),i=a.shallowRef(e),l=a.defineComponent({name:"DialogConfirm",setup(d,{expose:h}){a.onMounted(()=>{(document.activeElement||document.body).blur(),i.value.isShow!==!1&&(n.value=!0)});const f=async()=>{var C,I;typeof((C=i.value)==null?void 0:C.onClosed)=="function"&&await((I=i.value)==null?void 0:I.onClosed()),n.value=!1},m=async()=>{var C,I;typeof((C=i.value)==null?void 0:C.onConfirm)=="function"&&await((I=i.value)==null?void 0:I.onConfirm()),n.value=!1};function p(C){i.value=C}h({update:p});const v=()=>{const C=[];if(i.value.subTitle)switch(typeof i.value.subTitle){case"string":C.push(a.h("div",i.value.subTitle));break;case"function":C.push(a.h("div",i.value.subTitle()));break;default:C.push(a.h(i.value.subTitle));break}return C};return()=>a.createVNode(Pf,Te(F({},i.value),{isShow:n.value,onClosed:f,onConfirm:m}),v())}}),o=a.createApp(l).mount(t);return{show:()=>{n.value=!0},hide:()=>{n.value=!1},update:d=>{o.update(d)}}},f5={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 h5=a.defineComponent({name:"Notify",props:f5,emits:["destroy"],setup(e,{emit:t}){const n=yn.getMessageNextIndex(),i=a.computed(()=>e.position.indexOf("right")>1?"right":"left"),l=a.computed(()=>e.position.startsWith("top")?"top":"bottom"),o=a.computed(()=>({[i.value]:`${e.offsetX}px`,[l.value]:`${e.offsetY}px`,zIndex:n})),c=a.computed(()=>["bk-notify",`bk-notify-${e.theme}`,i.value]),d=a.ref(!1);let h=null;const f=()=>{h=setTimeout(()=>{d.value=!1},e.delay)},m=()=>{d.value=!1};return a.onMounted(()=>{e.delay&&f(),d.value=!0}),a.onUnmounted(()=>{clearTimeout(h)}),a.watch(d,()=>{d.value||t("destroy",e.id)}),{classNames:c,styles:o,visible:d,handleClose:m}},render(){const e=()=>({primary:a.createVNode(Ns,null,null),warning:a.createVNode(js,null,null),success:a.createVNode(Ss,null,null),error:a.createVNode(wn,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(An,{class:"bk-notify-icon bk-notify-close",onClick:this.handleClose},null)]),[[a.vShow,this.visible]])]})}});const n9=e=>{q0(h5,e)},i9=Symbol("MENU_PROVIDER_KEY"),Pc=Symbol("MENU_PROVIDER_KEY_PATH"),g5=e=>{a.provide(i9,e)},m5=e=>{const{parentKeys:t,parentInfo:n}=Oc(),i=a.computed(()=>[...t.value,e]);a.provide(Pc,{parentInfo:{key:e,parentKey:n==null?void 0:n.key},parentKeys:i})},a9=()=>a.inject(i9),Oc=()=>{var n;const e=a.getCurrentInstance(),t=e.parent?e.parent.provides:(n=e.vnode.appContext)==null?void 0:n.provides;return t&&Pc in t?a.inject(Pc):{parentInfo:void 0,parentKeys:a.ref([])}},Ac=function(e){return(e||"").split(" ").filter(t=>!!t.trim())};function r9(e,t){if(!e||!t)return;const n=Ac(t);let i=e.getAttribute("class")||"";if(e.classList){e.classList.remove(...n);return}n.forEach(o=>{i=i.replace(` ${o} `," ")});const l=Ac(i).join(" ");e.setAttribute("class",l)}function s9(e,t){if(!e)return;let n=e.getAttribute("class")||"";const i=Ac(n),l=(t||"").split(" ").filter(o=>!i.includes(o)&&!!o.trim());e.classList?e.classList.add(...l):(n+=` ${l.join(" ")}`,e.setAttribute("class",n))}const p5=()=>({css:!0,onBeforeEnter:e=>{s9(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,r9(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&&(s9(e,"collapse-transition"),e.style.transitionProperty="height",e.style.height="0px",e.style.maxHeight="0px")},onAfterLeave:e=>{r9(e,"collapse-transition"),e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow}}),b5={activeKey:String,collapse:Boolean,openedKeys:{type:Array},mode:{type:String,default:"vertical"},uniqueOpen:{type:Boolean,default:!0}};var y5=a.defineComponent({name:"Menu",props:b5,emits:["update:activeKey","update:openKeys","click","openChange"],setup(e,{slots:t,emit:n,expose:i}){const l=a.ref(""),o=a.ref([]),c=a.ref({}),d=a.computed(()=>e.mode),h=a.ref(e.collapse),f=a.ref([]);a.watchEffect(()=>{e.activeKey!==void 0&&(l.value=e.activeKey)}),a.watch(()=>e.collapse,()=>{h.value=e.collapse,console.info(e.collapse);const I=[...f.value],N=[...o.value];o.value=h.value?[]:I,f.value=h.value?N:[]},{immediate:!0}),a.watch(()=>e.openedKeys,(I=o.value)=>{o.value=I},{immediate:!0});const m=(I,N)=>{c.value=Te(F({},c.value),{[I]:N})},p=I=>{delete c.value[I],c.value=F({},c.value)},v=(I,N)=>{N?e.uniqueOpen?o.value=[I]:o.value.push(I):o.value=o.value.filter(x=>x!==I),n("openChange",N,c.value[I]),n("update:openKeys",[...o.value])},C=I=>{l.value=I,n("click",c.value[I]),n("update:activeKey",I,c.value[I])};return g5({activeKey:l,menuStore:c,registerMenuInfo:m,unregisterMenuInfo:p,mode:d.value,openedKeys:o,collapse:h,handleOpenChange:v,handleActiveChange:C}),i({activeKey:l,openedKeys:o,menuStore:c}),()=>{var I;return a.createVNode("div",{class:{"bk-menu":!0,"is-collapse":h.value}},[(I=t.default)==null?void 0:I.call(t)])}}}),C5=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)])])}}}),M5=a.defineComponent({name:"MenuItem",props:{needIcon:{type:Boolean,default:!0}},emits:["click"],slots:["icon"],setup(e,{slots:t,emit:n}){var C,I;const{registerMenuInfo:i,unregisterMenuInfo:l,activeKey:o,handleActiveChange:c}=a9(),d=a.getCurrentInstance(),{parentInfo:h}=Oc(),f=((I=(C=d.vnode.key)==null?void 0:C.toString)==null?void 0:I.call(C))||String(d.uid),m=a.computed(()=>o.value===f),p=a.computed(()=>e.needIcon);i(f,{key:f,parentKey:h==null?void 0:h.key});const v=N=>{c(f),n("click",N)};return a.onBeforeUnmount(()=>l(f)),()=>{var N,x;return a.createVNode("li",{class:{"bk-menu-item":!0,"is-active":m.value},onClick:v},[p.value&&a.createVNode("span",{class:"item-icon"},[((N=t==null?void 0:t.icon)==null?void 0:N.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 w5={title:{type:String,default:"title"}};var v5=a.defineComponent({name:"Submenu",props:w5,emits:["collapse"],slots:["icon"],setup(e,{slots:t,emit:n}){var T,y;const{registerMenuInfo:i,unregisterMenuInfo:l,openedKeys:o,handleOpenChange:c,collapse:d,activeKey:h,menuStore:f}=a9(),{parentInfo:m}=Oc(),p=a.getCurrentInstance(),v=((y=(T=p.vnode.key)==null?void 0:T.toString)==null?void 0:y.call(T))||String(p.uid),C=a.ref(p5()),I=a.computed(()=>o.value.includes(v)),N=a.computed(()=>{var M,L;const b=(L=(M=f.value)==null?void 0:M[h.value])==null?void 0:L.parentKey;return d.value&&b===v&&I});m5(v),i(v,{key:v,parentKey:m==null?void 0:m.key}),a.onBeforeUnmount(()=>l(v));const x=()=>{c(v,!I.value),n("collapse",!I.value,p)};return()=>{var b;return a.createVNode("li",{class:{"bk-menu-submenu":!0,"is-opened":I.value}},[a.createVNode("div",{class:{"submenu-header":!0,"is-collapse":N.value},onClick:x},[a.createVNode("span",{class:"submenu-header-icon"},[((b=t.icon)==null?void 0:b.call(t))||a.createVNode(_o,{class:"menu-icon"},null)]),a.createVNode("span",{class:"submenu-header-content"},[e.title]),a.createVNode(bs,{class:{"submenu-header-collapse":!0,"is-collapse":o.value.includes(v)}},null)]),a.createVNode(a.Transition,C.value,{default:()=>{var M;return[a.withDirectives(a.createVNode("ul",{class:"submenu-list"},[(M=t.default)==null?void 0:M.call(t)]),[[a.vShow,I.value]])]}})])}}});const l9=Rt(y5,{Item:M5,Submenu:v5,Group:C5}),I5={sideTitle:{type:String,default:""},navigationType:{type:String,default:"left-right"}};var o9=a.defineComponent({props:I5,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 N5={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 L5=a.defineComponent({name:"Navigation",props:N5,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 l=()=>{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:l,handleMouseLeave:o,handleClick:c}},render(){var e,t,n,i,l,o,c,d,h,f,m,p;return a.createVNode("div",{class:"bk-navigation"},[this.navigationType==="top-bottom"&&a.createVNode("div",{class:"bk-navigation-header",style:{flexBasis:`${this.headHeight}px`}},[a.createVNode(o9,{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(o9,{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(Oo,{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=(l=this.$slots).header)==null?void 0:o.call(l))||[a.createVNode("div",{class:"container-header-title"},[this.headerTitle]),a.createVNode("div",{class:"container-header-sets"},[(d=(c=this.$slots)["header-set"])==null?void 0:d.call(c)])]]),a.createVNode("div",{class:"container-content",style:{maxHeight:`calc(100vh - ${this.headHeight}px)`}},[(f=(h=this.$slots).default)==null?void 0:f.call(h),a.createVNode("div",{class:"container-footer"},[(p=(m=this.$slots).footer)==null?void 0:p.call(m)])])])])])}});const c9=Ge(L5),k5={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 Ec=a.defineComponent({props:k5,emits:["changeVisible"],setup(e,{emit:t}){let n=Object.create(null);const i=a.ref(null);a.onMounted(()=>{o()}),a.onBeforeUnmount(()=>{l()});const l=()=>{if(n&&Object.keys(n).length!==0){const h=n;h.isShow&&h.hide(),h.destroy(),n=null,t("changeVisible",!1)}},o=()=>{n&&Object.keys(n).length!==0?a.nextTick(()=>{n.update()}):a.nextTick(()=>{n=new tf(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 h={};return e.appendToBody&&(h["z-index"]=1060+yn.getModalNextIndex()),h}),d=a.reactive({styles:c});return Te(F({},a.toRefs(d)),{refContentRef:i,updateDropdown:o,destoryDropdown:l})},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 T5={showTime:{type:Boolean,required:!0},isTime:{type:Boolean,default:!1},timeDisabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}};var x5=a.defineComponent({props:T5,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")},l=()=>{t("pick-success")},o=()=>{e.timeDisabled||t("pick-toggle-time")},c=a.ref(null);return{labels:n,handleClear:i,handleSuccess:l,handleToggleTime:o,handleTab:h=>{const m=[...c.value.children][h.shiftKey?"shift":"pop"]();document.activeElement===m&&(h.preventDefault(),h.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])])}}),u9=1e3*60*60*24;function d9(e,t){return new Date(e,t+1,0).getDate()}function f9(e,t,n){return t===0&&n>50?e-1:t===11&&n<10?e+1:e}function h9(e,t,n,i){t>11&&(t=0,e++);var l=new Date(e,t,n);i&&l.setDate(l.getDate()+4-(l.getDay()||7));var o=i?l.getFullYear():e,c=new Date(o,0,1),d=1+Math.round((l-c)/u9);i||(d+=c.getDay());var h=Math.ceil(d/7);if(!i){var f=new Date(e,t,n),m=new Date(e+1,0,1),p=m.getDay();f.getTime()>=m.getTime()-u9*p&&(h=1)}return h}function S5(e,t,n){for(var i=this.lang||"en",l=this.onlyDays,o=typeof this.weekStart=="undefined"?1:this.weekStart,c=o===1,d=[],h=new Date(e,t,1),f=h.getDay()||(c?7:0),m=o-f,p=h9(e,t,1,c),v=d9(e,t),C=d9(e,t-1),I,N,x,T=f9(e,t,p),y={month:t,year:e,daysInMonth:v},b=0;b<7;b++){x=m;for(var M=0;M<8;M++){b>0&&M>0&&m++,m>v||m<1?(N=m>v?m-v:C+m,I=m>v?t+1:t-1):(N=m,I=t);var L=function(){return M===0?"weekLabel":b===0?"dayLabel":m<1?"prevMonth":m>v?"nextMonth":"monthDay"}(),k=x!==m&&b>0,A={desc:k?N:p,week:p,type:L,format:c?"ISO 8601":"US",date:k?new Date(Date.UTC(e,I,N)):!1,year:T,index:d.length};n&&(typeof n=="function"?A=n.call(y,A,i):n.forEach(function(O){A=O.call(y,A,i)})),l&&k?d.push(A):l||d.push(A)}b>0&&(p=h9(e,I,N+1,c)),T=f9(e,t,p)}return y.cells=d,y}var D5=function(e){return S5.bind(e)},j5={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"}},Jn=j5;function z5(e){return e==null?!1:e.constructor===Array||e.constructor===Object}function g9(e,t){for(var n in e)t[n]?z5(e[n])&&g9(e[n],t[n]):t[n]=e[n]}function m9(e,t){var n=[Jn.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&&Jn.weekPlaceholder?e.desc=Jn.weekPlaceholder:e.index<8?e.desc=Jn.columnNames[t][e.index]:e.index%8==0&&(e.desc=e.week)),e.date&&(e.monthName=Jn.monthNames[t][e.date.getMonth()]),this.monthName||(this.monthName=Jn.monthNames[t][this.month]),this.labels||(this.labels={monthNames:Jn.monthNames[t],columnNames:Jn.columnNames[t],classes:Jn.classes}),e}m9.setLabels=function(e){g9(e,Jn)};var P5=m9,O5={Generator:D5,addLabels:P5};function on(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 zt(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function In(e){zt(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 A5(e,t){zt(2,arguments);var n=In(e).getTime(),i=on(t);return new Date(n+i)}function E5(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 V5(e){return zt(1,arguments),e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function J5(e){if(zt(1,arguments),!V5(e)&&typeof e!="number")return!1;var t=In(e);return!isNaN(Number(t))}var Q5={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"}},R5=function(e,t,n){var i,l=Q5[e];return typeof l=="string"?i=l:t===1?i=l.one:i=l.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},W5=R5;function Vc(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 H5={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},B5={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Z5={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},G5={date:Vc({formats:H5,defaultWidth:"full"}),time:Vc({formats:B5,defaultWidth:"full"}),dateTime:Vc({formats:Z5,defaultWidth:"full"})},_5=G5,Y5={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},F5=function(e,t,n,i){return Y5[e]},U5=F5;function kr(e){return function(t,n){var i=n||{},l=i.context?String(i.context):"standalone",o;if(l==="formatting"&&e.formattingValues){var c=e.defaultFormattingWidth||e.defaultWidth,d=i.width?String(i.width):c;o=e.formattingValues[d]||e.formattingValues[c]}else{var h=e.defaultWidth,f=i.width?String(i.width):e.defaultWidth;o=e.values[f]||e.values[h]}var m=e.argumentCallback?e.argumentCallback(t):t;return o[m]}}var $5={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},X5={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},K5={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"]},q5={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"]},eb={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"}},tb={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"}},nb=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"},ib={ordinalNumber:nb,era:kr({values:$5,defaultWidth:"wide"}),quarter:kr({values:X5,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:kr({values:K5,defaultWidth:"wide"}),day:kr({values:q5,defaultWidth:"wide"}),dayPeriod:kr({values:eb,defaultWidth:"wide",formattingValues:tb,defaultFormattingWidth:"wide"})},ab=ib;function Tr(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.width,l=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(l);if(!o)return null;var c=o[0],d=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],h=Array.isArray(d)?sb(d,function(p){return p.test(c)}):rb(d,function(p){return p.test(c)}),f;f=e.valueCallback?e.valueCallback(h):h,f=n.valueCallback?n.valueCallback(f):f;var m=t.slice(c.length);return{value:f,rest:m}}}function rb(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function sb(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function lb(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 l=i[0],o=t.match(e.parsePattern);if(!o)return null;var c=e.valueCallback?e.valueCallback(o[0]):o[0];c=n.valueCallback?n.valueCallback(c):c;var d=t.slice(l.length);return{value:c,rest:d}}}var ob=/^(\d+)(th|st|nd|rd)?/i,cb=/\d+/i,ub={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},db={any:[/^b/i,/^(a|c)/i]},fb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},hb={any:[/1/i,/2/i,/3/i,/4/i]},gb={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},mb={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]},pb={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},bb={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]},yb={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},Cb={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}},Mb={ordinalNumber:lb({matchPattern:ob,parsePattern:cb,valueCallback:function(e){return parseInt(e,10)}}),era:Tr({matchPatterns:ub,defaultMatchWidth:"wide",parsePatterns:db,defaultParseWidth:"any"}),quarter:Tr({matchPatterns:fb,defaultMatchWidth:"wide",parsePatterns:hb,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Tr({matchPatterns:gb,defaultMatchWidth:"wide",parsePatterns:mb,defaultParseWidth:"any"}),day:Tr({matchPatterns:pb,defaultMatchWidth:"wide",parsePatterns:bb,defaultParseWidth:"any"}),dayPeriod:Tr({matchPatterns:yb,defaultMatchWidth:"any",parsePatterns:Cb,defaultParseWidth:"any"})},wb=Mb,vb={code:"en-US",formatDistance:W5,formatLong:_5,formatRelative:U5,localize:ab,match:wb,options:{weekStartsOn:0,firstWeekContainsDate:1}},Ib=vb;function Nb(e,t){zt(2,arguments);var n=on(t);return A5(e,-n)}var Lb=864e5;function kb(e){zt(1,arguments);var t=In(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),l=n-i;return Math.floor(l/Lb)+1}function Xs(e){zt(1,arguments);var t=1,n=In(e),i=n.getUTCDay(),l=(i<t?7:0)+i-t;return n.setUTCDate(n.getUTCDate()-l),n.setUTCHours(0,0,0,0),n}function p9(e){zt(1,arguments);var t=In(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var l=Xs(i),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var c=Xs(o);return t.getTime()>=l.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}function Tb(e){zt(1,arguments);var t=p9(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=Xs(n);return i}var xb=6048e5;function Sb(e){zt(1,arguments);var t=In(e),n=Xs(t).getTime()-Tb(t).getTime();return Math.round(n/xb)+1}function Ks(e,t){zt(1,arguments);var n=t||{},i=n.locale,l=i&&i.options&&i.options.weekStartsOn,o=l==null?0:on(l),c=n.weekStartsOn==null?o:on(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=In(e),h=d.getUTCDay(),f=(h<c?7:0)+h-c;return d.setUTCDate(d.getUTCDate()-f),d.setUTCHours(0,0,0,0),d}function b9(e,t){zt(1,arguments);var n=In(e),i=n.getUTCFullYear(),l=t||{},o=l.locale,c=o&&o.options&&o.options.firstWeekContainsDate,d=c==null?1:on(c),h=l.firstWeekContainsDate==null?d:on(l.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=new Date(0);f.setUTCFullYear(i+1,0,h),f.setUTCHours(0,0,0,0);var m=Ks(f,t),p=new Date(0);p.setUTCFullYear(i,0,h),p.setUTCHours(0,0,0,0);var v=Ks(p,t);return n.getTime()>=m.getTime()?i+1:n.getTime()>=v.getTime()?i:i-1}function Db(e,t){zt(1,arguments);var n=t||{},i=n.locale,l=i&&i.options&&i.options.firstWeekContainsDate,o=l==null?1:on(l),c=n.firstWeekContainsDate==null?o:on(n.firstWeekContainsDate),d=b9(e,t),h=new Date(0);h.setUTCFullYear(d,0,c),h.setUTCHours(0,0,0,0);var f=Ks(h,t);return f}var jb=6048e5;function zb(e,t){zt(1,arguments);var n=In(e),i=Ks(n,t).getTime()-Db(n,t).getTime();return Math.round(i/jb)+1}function nt(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var Pb={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return nt(t==="yy"?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):nt(n+1,2)},d:function(e,t){return nt(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 nt(e.getUTCHours()%12||12,t.length)},H:function(e,t){return nt(e.getUTCHours(),t.length)},m:function(e,t){return nt(e.getUTCMinutes(),t.length)},s:function(e,t){return nt(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),l=Math.floor(i*Math.pow(10,n-3));return nt(l,t.length)}},Ti=Pb,ja={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ob={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(),l=i>0?i:1-i;return n.ordinalNumber(l,{unit:"year"})}return Ti.y(e,t)},Y:function(e,t,n,i){var l=b9(e,i),o=l>0?l:1-l;if(t==="YY"){var c=o%100;return nt(c,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):nt(o,t.length)},R:function(e,t){var n=p9(e);return nt(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return nt(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 nt(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 nt(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 Ti.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 nt(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 l=zb(e,i);return t==="wo"?n.ordinalNumber(l,{unit:"week"}):nt(l,t.length)},I:function(e,t,n){var i=Sb(e);return t==="Io"?n.ordinalNumber(i,{unit:"week"}):nt(i,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Ti.d(e,t)},D:function(e,t,n){var i=kb(e);return t==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):nt(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 l=e.getUTCDay(),o=(l-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return nt(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(l,{width:"short",context:"formatting"});case"eeee":default:return n.day(l,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){var l=e.getUTCDay(),o=(l-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return nt(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(l,{width:"narrow",context:"standalone"});case"cccccc":return n.day(l,{width:"short",context:"standalone"});case"cccc":default:return n.day(l,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),l=i===0?7:i;switch(t){case"i":return String(l);case"ii":return nt(l,t.length);case"io":return n.ordinalNumber(l,{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(),l=i/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(e,t,n){var i=e.getUTCHours(),l;switch(i===12?l=ja.noon:i===0?l=ja.midnight:l=i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i=e.getUTCHours(),l;switch(i>=17?l=ja.evening:i>=12?l=ja.afternoon:i>=4?l=ja.morning:l=ja.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(l,{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 Ti.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Ti.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(i,{unit:"hour"}):nt(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return i===0&&(i=24),t==="ko"?n.ordinalNumber(i,{unit:"hour"}):nt(i,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Ti.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Ti.s(e,t)},S:function(e,t){return Ti.S(e,t)},X:function(e,t,n,i){var l=i._originalDate||e,o=l.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return C9(o);case"XXXX":case"XX":return ea(o);case"XXXXX":case"XXX":default:return ea(o,":")}},x:function(e,t,n,i){var l=i._originalDate||e,o=l.getTimezoneOffset();switch(t){case"x":return C9(o);case"xxxx":case"xx":return ea(o);case"xxxxx":case"xxx":default:return ea(o,":")}},O:function(e,t,n,i){var l=i._originalDate||e,o=l.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+y9(o,":");case"OOOO":default:return"GMT"+ea(o,":")}},z:function(e,t,n,i){var l=i._originalDate||e,o=l.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+y9(o,":");case"zzzz":default:return"GMT"+ea(o,":")}},t:function(e,t,n,i){var l=i._originalDate||e,o=Math.floor(l.getTime()/1e3);return nt(o,t.length)},T:function(e,t,n,i){var l=i._originalDate||e,o=l.getTime();return nt(o,t.length)}};function y9(e,t){var n=e>0?"-":"+",i=Math.abs(e),l=Math.floor(i/60),o=i%60;if(o===0)return n+String(l);var c=t||"";return n+String(l)+c+nt(o,2)}function C9(e,t){if(e%60===0){var n=e>0?"-":"+";return n+nt(Math.abs(e)/60,2)}return ea(e,t)}function ea(e,t){var n=t||"",i=e>0?"-":"+",l=Math.abs(e),o=nt(Math.floor(l/60),2),c=nt(l%60,2);return i+o+n+c}var Ab=Ob;function M9(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 w9(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 Eb(e,t){var n=e.match(/(P+)(p+)?/)||[],i=n[1],l=n[2];if(!l)return M9(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}}",M9(i,t)).replace("{{time}}",w9(l,t))}var Vb={p:w9,P:Eb},Jb=Vb,Qb=["D","DD"],Rb=["YY","YYYY"];function Wb(e){return Qb.indexOf(e)!==-1}function Hb(e){return Rb.indexOf(e)!==-1}function v9(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 Bb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Zb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Gb=/^'([^]*?)'?$/,_b=/''/g,Yb=/[a-zA-Z]/;function Fb(e,t,n){zt(2,arguments);var i=String(t),l=n||{},o=l.locale||Ib,c=o.options&&o.options.firstWeekContainsDate,d=c==null?1:on(c),h=l.firstWeekContainsDate==null?d:on(l.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=o.options&&o.options.weekStartsOn,m=f==null?0:on(f),p=l.weekStartsOn==null?m:on(l.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 v=In(e);if(!J5(v))throw new RangeError("Invalid time value");var C=E5(v),I=Nb(v,C),N={firstWeekContainsDate:h,weekStartsOn:p,locale:o,_originalDate:v},x=i.match(Zb).map(function(T){var y=T[0];if(y==="p"||y==="P"){var b=Jb[y];return b(T,o.formatLong,N)}return T}).join("").match(Bb).map(function(T){if(T==="''")return"'";var y=T[0];if(y==="'")return Ub(T);var b=Ab[y];if(b)return!l.useAdditionalWeekYearTokens&&Hb(T)&&v9(T,t,e),!l.useAdditionalDayOfYearTokens&&Wb(T)&&v9(T,t,e),b(I,T,o.localize,N);if(y.match(Yb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return T}).join("");return x}function Ub(e){return e.match(Gb)[1].replace(_b,"'")}const wt={},I9=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,ta=/\d\d?/,$b=/\d{3}/,Xb=/\d{4}/,qs=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,N9=function(){};function L9(e,t){const n=[];for(let i=0,l=e.length;i<l;i++)n.push(e[i].substr(0,t));return n}function k9(e){return(t,n,i)=>{const l=i[e].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~l&&(t.month=l)}}function Qn(e,t=2){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}const T9=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],x9=["January","February","March","April","May","June","July","August","September","October","November","December"],Kb=L9(x9,3),qb=L9(T9,3);wt.i18n={dayNamesShort:qb,dayNames:T9,monthNamesShort:Kb,monthNames:x9,amPm:["am","pm"],DoFn(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10)*e%10]}};const S9={D(e){return e.getDay()},DD(e){return Qn(e.getDay())},Do(e,t){return t.DoFn(e.getDate())},d(e){return e.getDate()},dd(e){return Qn(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 Qn(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 Qn(e.getHours()%12||12)},H(e){return e.getHours()},HH(e){return Qn(e.getHours())},m(e){return e.getMinutes()},mm(e){return Qn(e.getMinutes())},s(e){return e.getSeconds()},ss(e){return Qn(e.getSeconds())},S(e){return Math.round(e.getMilliseconds()/100)},SS(e){return Qn(Math.round(e.getMilliseconds()/10),2)},SSS(e){return Qn(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?"-":"+")+Qn(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)}},ut={d:[ta,(e,t)=>{e.day=t}],M:[ta,(e,t)=>{e.month=t-1}],yy:[ta,(e,t)=>{const i=+`${new Date().getFullYear()}`.substr(0,2);e.year=`${t>68?i-1:i}${t}`}],h:[ta,(e,t)=>{e.hour=t}],m:[ta,(e,t)=>{e.minute=t}],s:[ta,(e,t)=>{e.second=t}],yyyy:[Xb,(e,t)=>{e.year=t}],S:[/\d/,(e,t)=>{e.millisecond=t*100}],SS:[/\d{2}/,(e,t)=>{e.millisecond=t*10}],SSS:[$b,(e,t)=>{e.millisecond=t}],D:[ta,N9],ddd:[qs,N9],MMM:[qs,k9("monthNamesShort")],MMMM:[qs,k9("monthNames")],a:[qs,(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)}]};ut.DD=ut.D,ut.dddd=ut.ddd,ut.Do=ut.dd=ut.d,ut.mm=ut.m,ut.hh=ut.H=ut.HH=ut.h,ut.MM=ut.M,ut.ss=ut.s,ut.A=ut.a,wt.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"},wt.format=(e,t,n)=>{const i=n||wt.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=wt.masks[t]||t||wt.masks.default,t.replace(I9,l=>l in S9?S9[l](e,i):l.slice(1,l.length-1))},wt.parse=(e,t,n)=>{const i=n||wt.i18n;if(typeof t!="string")throw new Error("Invalid format in fecha.parse");if(t=wt.masks[t]||t,e.length>1e3)return!1;let l=!0;const o={};if(t.replace(I9,h=>{if(ut[h]){const f=ut[h],m=e.search(f[0]);~m?e.replace(f[0],p=>(f[1](o,p,i),e=e.substr(m+p.length),p)):l=!1}return ut[h]?"":h.slice(1,h.length-1)}),!l)return!1;const c=new Date;o.isPm===!0&&o.hour!==null&&+o.hour!=12?o.hour=+o.hour+12:o.isPm===!1&&+o.hour==12&&(o.hour=0);let d;return o.timezoneOffset!==null&&o.timezoneOffset!==void 0?(o.minute=+(o.minute||0)-+o.timezoneOffset,d=new Date(Date.UTC(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0))):d=new Date(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0),d};const Jc=" - ",ai=(e,t)=>{const n=In(new Date(e));return!n||isNaN(n.getTime())?"":Fb(n,t||"yyyy-MM-dd")},Qc=(e,t)=>{if(Array.isArray(e)&&e.length===2){const n=e[0],i=e[1];if(n&&i)return ai(n,t)+Jc+ai(i,t)}else if(!Array.isArray(e)&&e instanceof Date)return ai(e,t);return""},Rc=(e,t)=>{const n=Array.isArray(e)?e:e.split(Jc);if(n.length===2){const i=n[0],l=n[1];return[i instanceof Date?i:wt.parse(i,t||"yyyy-MM-dd"),l instanceof Date?l:wt.parse(l,t||"yyyy-MM-dd")]}return[]},za={default:{formatter(e){return e?`${e}`:""},parser(e){return e===void 0||e===""?null:e}},date:{formatter:(e,t)=>ai(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},datetime:{formatter:(e,t)=>ai(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},daterange:{formatter:Qc,parser:Rc},datetimerange:{formatter:Qc,parser:Rc},timerange:{formatter:Qc,parser:Rc},time:{formatter:(e,t)=>ai(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},month:{formatter:(e,t)=>ai(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},year:{formatter:(e,t)=>ai(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},multiple:{formatter(e,t){return e.filter(Boolean).map(n=>ai(n,t)).join(",")},parser(e,t){return(typeof e=="string"?e.split(","):e).map(i=>{if(i instanceof Date)return i;let l=i;return typeof i=="string"?l=i.trim():typeof i!="number"&&!i&&(l=""),wt.parse(l,t||"yyyy-MM-dd")})}},number:{formatter(e){return e?`${e}`:""},parser(e){const t=Number(e);return isNaN(e)?null:t}}},Wc=()=>{const e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e},D9=e=>e.every(t=>!t||typeof t=="string"&&t.trim()===""),el=e=>e?[e.getHours(),e.getMinutes(),e.getSeconds()]:[0,0,0],j9={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"},xi=(e,t,n,i)=>{const l=t.includes("range"),{parser:o}=za[t]||za.default,c=i||j9[t],d=za.multiple.parser;let h=e;if(e&&t==="time"&&!(e instanceof Date))h=o(e,c);else if(n&&e)h=d(e,c);else if(l)if(!e)h=[null,null];else if(typeof e=="string")h=o(e,c);else if(t==="timerange")h=o(e,c).map(f=>f||"");else{const[f,m]=e;f instanceof Date&&m instanceof Date?h=e.map(p=>new Date(p)):typeof f=="string"&&typeof m=="string"?h=o(e.join(Jc),c):(!f||!m)&&(h=[null,null])}else typeof e=="string"&&t.indexOf("time")!==0&&(h=o(e,c)||null);return l||n?h||[]:[h]},Rn=(e,t,n,i)=>{const l=j9[t];if(n){const{formatter:c}=za.multiple;return c(e,i||l)}const{formatter:o}=za[t]||za.default;return o(e,i||l)},z9=Symbol("date-picker"),P9=Symbol("time-picker");function O9(e,t){return e.$children.reduce((n,i)=>{i.$options.name===t&&n.push(i);const l=O9(i,t);return n.concat(l)},[])}function cn(e,t=""){return["bk-picker-panel-icon-btn",`bk-date-picker-${e}-btn`,`bk-date-picker-${e}-btn-arrow${t}`]}const ey=(e,t)=>new Date(e,t+1,0).getDate(),A9=(e,t)=>{const n=new Date(e),i=n.getMonth()+t,l=ey(n.getFullYear(),i);return l<n.getDate()&&n.setDate(l),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 l=n.toLocaleDateString(i,{month:"long"});return(l[0].toUpperCase()+l.slice(1).toLowerCase()).slice(0,3)},mmmm:(n,i)=>n.toLocaleDateString(i,{month:"long"}),Mmmm:(n,i)=>{const l=n.toLocaleDateString(i,{month:"long"});return l[0].toUpperCase()+l.slice(1).toLowerCase()}},t=new RegExp(["yyyy","Mmmm","mmmm","Mmm","mmm","mm","m"].join("|"),"g");return(n,i,l)=>{const o=/(\[[^\]]+\])([^\\[\]]+)(\[[^\]]+\])/,c=i.match(o).slice(1),d=c[1],h=[c[0],c[2]].map(f=>({label:f.replace(/\[[^\]]+\]/,p=>p.slice(1,-1).replace(t,v=>e[v](l,n))),type:f.indexOf("yy")!==-1?"year":"month"}));return{separator:d,labels:h}}})(),na=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()},ty=(e,t,n)=>{if(!t||!n)return!1;const[i,l]=[t,n].sort();return e>=i&&e<=l};function ny(e){return e.toString()[0].toUpperCase()+e.toString().slice(1)}const iy=(e,...t)=>{const n=new Date(e.getTime());return n.setHours(t[0]),n.setMinutes(t[1]),n.setSeconds(t[2]),n},ay={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 Hc=a.defineComponent({name:"DateTable",props:ay,emits:["pick","pick-click","changeRange"],setup(e,{emit:t}){const n=a.computed(()=>new O5.Generator({onlyDays:!0,weekStart:0})),i=a.computed(()=>{const f=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"];return f.splice(0,7-0).concat(f.splice(0,0))}),l=a.computed(()=>e.selectionMode==="range"&&e.rangeState.selecting?[e.rangeState.from]:e.modelValue),o=a.computed(()=>{const f=e.tableDate.getFullYear(),m=e.tableDate.getMonth(),p=na(new Date),v=l.value.filter(Boolean).map(na),[C,I]=l.value.map(na),N=e.rangeState.from&&na(e.rangeState.from),x=e.rangeState.to&&na(e.rangeState.to),T=e.selectionMode==="range",y=typeof e.disableDate=="function"&&e.disableDate;return n.value(f,m,b=>{b.date instanceof Date&&b.date.setTime(b.date.getTime()+b.date.getTimezoneOffset()*6e4);const M=b.date&&na(b.date),L=b.date&&m===b.date.getMonth();return Te(F({},b),{type:M===p?"today":b.type,selected:L&&v.includes(M),disabled:b.date&&y&&y(new Date(M)),range:L&&T&&ty(M,N,x),start:L&&T&&M===C,end:L&&T&&M===I})}).cells.slice(0)});return{headerDays:i,cells:o,getCellCls:f=>["bk-date-picker-cells-cell",{["bk-date-picker-cells-cell-selected"]:f.selected||f.start||f.end,["bk-date-picker-cells-cell-disabled"]:f.disabled,["bk-date-picker-cells-cell-today"]:f.type==="today",["bk-date-picker-cells-cell-prev-month"]:f.type==="prevMonth",["bk-date-picker-cells-cell-next-month"]:f.type==="nextMonth",["bk-date-picker-cells-cell-week-label"]:f.type==="weekLabel",["bk-date-picker-cells-cell-range"]:f.range&&!f.start&&!f.end}],handleClick:f=>{if(f.disabled||f.type==="weekLabel")return;const m=new Date(na(f.date));t("pick",m),t("pick-click")},handleMouseMove:f=>{if(!e.rangeState.selecting||f.disabled)return;const m=f.date;t("changeRange",m)}}},render(){return a.createVNode("div",{class:"bk-date-picker-cells"},[a.createVNode("div",{class:"bk-date-picker-cells-header"},[this.headerDays.map(e=>a.createVNode("span",null,[e]))]),this.cells.map(e=>a.createVNode("span",{class:this.getCellCls(e),onClick:()=>this.handleClick(e),onMouseenter:()=>this.handleMouseMove(e)},[a.createVNode("em",null,[e.desc])]))])}});const Bc={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}},Zc={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}},ry={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}},sy={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:()=>[]}},V9=["hours","minutes","seconds"];var ly=a.defineComponent({name:"TimeSpinner",props:F(F({},sy),Zc),emits:["change","pick-click"],setup(e,{emit:t}){const n=a.reactive({spinerSteps:[1,1,1].map((k,A)=>Math.abs(e.steps[A])||k),compiled:!1,focusedColumn:-1,focusedTime:[0,0,0]}),i=a.computed(()=>{const k=[],A=n.spinerSteps[0],O=n.focusedColumn===0&&n.focusedTime[0],J={text:0,selected:!1,disabled:!1,hide:!1};for(let P=0;P<24;P+=A){const E=JSON.parse(JSON.stringify(J));E.text=P,E.focused=P===O,e.disabledHours.length&&e.disabledHours.indexOf(P)>-1&&(E.disabled=!0,e.hideDisabledOptions&&(E.hide=!0)),e.hours===P&&(E.selected=!0),k.push(E)}return k}),l=a.computed(()=>{const k=[],A=n.spinerSteps[1],O=n.focusedColumn===1&&n.focusedTime[1],J={text:0,selected:!1,disabled:!1,hide:!1};for(let P=0;P<60;P+=A){const E=JSON.parse(JSON.stringify(J));E.text=P,E.focused=P===O,e.disabledMinutes.length&&e.disabledMinutes.indexOf(P)>-1&&(E.disabled=!0,e.hideDisabledOptions&&(E.hide=!0)),e.minutes===P&&(E.selected=!0),k.push(E)}return k}),o=a.computed(()=>{const k=[],A=n.spinerSteps[2],O=n.focusedColumn===2&&n.focusedTime[2],J={text:0,selected:!1,disabled:!1,hide:!1};for(let P=0;P<60;P+=A){const E=JSON.parse(JSON.stringify(J));E.text=P,E.focused=P===O,e.disabledSeconds.length&&e.disabledSeconds.indexOf(P)>-1&&(E.disabled=!0,e.hideDisabledOptions&&(E.hide=!0)),e.seconds===P&&(E.selected=!0),k.push(E)}return k}),c=a.computed(()=>({width:e.showSeconds?"33.33%":"50%"}));a.watch(()=>e.hours,k=>{!n.compiled||N("hours",i.value.findIndex(A=>A.text===k))}),a.watch(()=>e.minutes,k=>{!n.compiled||N("minutes",l.value.findIndex(A=>A.text===k))}),a.watch(()=>e.seconds,k=>{!n.compiled||N("seconds",l.value.findIndex(A=>A.text===k))}),a.watch(()=>n.focusedTime,(k,A)=>{V9.forEach((O,J)=>{if(k[J]===A[J]||typeof k[J]=="undefined")return;const P=this[`${O}List`].findIndex(E=>E.text===k[J]);N(O,P)})}),a.onMounted(()=>{a.nextTick(()=>{n.compiled=!0,f()})});function d(k){let A;return k==="hours"?A=b:k==="minutes"?A=M:A=L,A.value}function h(k){return["bk-time-picker-cells-cell",{["bk-time-picker-cells-cell-selected"]:k.selected,["bk-time-picker-cells-cell-focused"]:k.focused,["bk-time-picker-cells-cell-disabled"]:k.disabled}]}function f(){const k=A=>{d(A).addEventListener("wheel",jt.exports.debounce(()=>{v(A)},32),{passive:!0})};k("hours"),k("minutes"),k("seconds")}function m(k){return d(k).querySelector("li").offsetHeight}function p(k){return d(k).offsetHeight}function v(k){const A=d(k),O=Math.min(Math.round((A.scrollTop-(p(k)*.5-10)/m(k)+3)/m(k)),k==="hours"?23:59);let J;if(k==="hours"?J=i:k==="minutes"?J=l:J=o,J.value.find(E=>E.text===O).disabled)return!1;a.nextTick(()=>{I({[k]:O})})}function C(k,A){if(A.disabled)return;const O={[k]:A.text};I(O)}function I(k){t("change",k),t("pick-click")}function N(k,A){const O=d(k),J=O.scrollTop,P=32*x(k,A);a4(O,J,P,500)}function x(k,A){const O=ny(k),J=e[`disabled${O}`];let P=A;if(J.length&&e.hideDisabledOptions){let E=0;J.forEach(ee=>ee<=A?E+=1:""),P-=E}return P}function T(){a.nextTick(()=>{V9.forEach(k=>{const A=d(k);let O;k==="hours"?O=i:k==="minutes"?O=l:O=o,A.scrollTop=32*O.value.findIndex(J=>J.text===e[k])})})}function y(k){return k<10?`0${k}`:k}const b=a.ref(null),M=a.ref(null),L=a.ref(null);return Te(F({},a.toRefs(n)),{hoursList:i,minutesList:l,secondsList:o,styles:c,hoursRef:b,minutesRef:M,secondsRef:L,getCellCls:h,handleClick:C,updateScroll:T,padTime:y})},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 oy={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 J9=a.defineComponent({name:"TimePickerPanel",props:F(F(F({},Bc),Zc),oy),emits:["pick","pick-click"],setup(e,{emit:t}){const n=a.reactive({date:e.value[0]||Wc(),showDate:!1}),i=a.inject(P9),l=a.ref(null),o=a.computed(()=>!(e.format||"").match(/mm$/)),c=a.computed(()=>wt.format(i.panelDate,e.format)),d=a.computed(()=>e.value[0]?["getHours","getMinutes","getSeconds"].map(p=>n.date[p]()):[]),h=a.computed(()=>{const p=["disabledHours","disabledMinutes","disabledSeconds"];if(e.disabledDate===(()=>!e.value[0]))return p.reduce((x,T)=>(x[T]=this[T],x),{});const v=[24,60,60],I=["Hours","Minutes","Seconds"].map(N=>e[`disabled${N}`]).map((N,x)=>{const T=v[x],y=N;for(let b=0;b<T;b+=e.steps[x]||1){const M=d.value.map((k,A)=>A===x?b:k),L=iy(n.date,...M);e.disabledDate(L,!0)&&y.push(b)}return y.filter((b,M,L)=>L.indexOf(b)===M)});return p.reduce((N,x,T)=>(N[x]=I[T],N),{})});a.watch(()=>e.value,p=>{let v=p[0]||Wc();v=new Date(v),n.date=v}),a.onMounted(()=>{i&&i.parentName==="DatePanel"&&(n.showDate=!0)});function f(p,v=!0){const C=new Date(n.date);Object.keys(p).forEach(I=>C[`set${Io(I)}`](p[I])),v&&t("pick",C,!0,"time")}function m(){t("pick-click")}return Te(F({},a.toRefs(n)),{visibleDate:c,showSeconds:o,timeSlots:d,disabledHMS:h,timeSpinnerRef:l,handlePickClick:m,handleChange:f})},render(){return a.createVNode("div",{class:"bk-picker-panel-body-wrapper",onMousedown:e=>{e.preventDefault()}},[a.createVNode("div",{class:"bk-picker-panel-body",style:{width:`${this.width}px`}},[this.showDate?a.createVNode("div",{class:"bk-time-picker-header"},[this.visibleDate]):"",a.createVNode("div",{class:"bk-picker-panel-content"},[a.createVNode(ly,{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 cy={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 uy=a.defineComponent({name:"DatePanel",props:cy,emits:["pick","pick-success","pick-clear","pick-click","selection-mode-change"],setup(e,{slots:t,emit:n}){const i=H=>H.match(/^time/)?"time-picker":`${H}-table`,l=e.modelValue.slice().sort(),o=a.reactive({currentView:e.selectionMode||"date",pickerTable:i(e.selectionMode),dates:l,panelDate:e.startDate||l[0]||new Date}),{proxy:c}=a.getCurrentInstance();a.provide(P9,{panelDate:o.panelDate,parentName:c.$options.name});const d=a.ref(null),h=a.ref(null),f=a.ref(null);a.watch(()=>o.currentView,H=>{console.error(11111,H),n("selection-mode-change",H),o.currentView==="time"&&a.nextTick(()=>{d.value.timeSpinnerRef.updateScroll()})}),a.watch(()=>e.selectionMode,H=>{o.currentView=H,o.pickerTable=i(H)});const m=()=>{setTimeout(()=>{o.currentView=e.selectionMode},500)},p=H=>{o.panelDate=H,o.pickerTable==="year-table"?o.pickerTable="month-table":o.pickerTable=i(o.currentView)},v=(H,le)=>{let de=H;e.selectionMode==="year"?de=new Date(H.getFullYear(),0,1):e.selectionMode==="month"?de=new Date(o.panelDate.getFullYear(),H.getMonth(),1):de=new Date(H),o.dates=[de],n("pick",de,!1,le||e.selectionMode)},C=()=>{m(),n("pick-success")},I=()=>{m(),n("pick-clear")},N=H=>{H.value&&n("pick",H.value(),!1,void 0,H),H.onClick&&H.onClick(this),e.shortcutClose&&C()},x=()=>{o.currentView=e.selectionMode,o.pickerTable=i(o.currentView)},T=H=>{e.selectionMode==="year"||o.pickerTable==="year-table"?o.panelDate=new Date(o.panelDate.getFullYear()+H*10,0,1):o.panelDate=A9(o.panelDate,H*12)},y=H=>{o.panelDate=A9(o.panelDate,H)},b=H=>{var le,de;H&&((le=h==null?void 0:h.value)==null||le.updateScroll(),(de=f==null?void 0:f.value)==null||de.updateScroll())},M=a.computed(()=>o.pickerTable===`${o.currentView}-table`?v:p),L=a.computed(()=>{const H="zh-CN",le="[yyyy]-[mm]",de=o.panelDate,{labels:he,separator:ye}=E9(H,le,de),re=K=>()=>{o.pickerTable=i(K)};return{separator:ye,labels:he.map(K=>{const B=K;return B.handler=re(K.type),B})}}),k=a.computed(()=>L.value.labels[0].type==="year"||o.currentView==="date"),A=a.computed(()=>L.value.labels[1].type==="year"||o.currentView==="date"),O=a.computed(()=>o.currentView==="time"),J=()=>{o.currentView=o.currentView==="time"?"date":"time"},P=a.computed(()=>!!t.shortcuts),E=a.computed(()=>!o.dates[0]);function ee(){n("pick-click")}return Te(F({},a.toRefs(o)),{panelPickerHandlers:M,datePanelLabel:L,showLabelFirst:k,showLabelSecond:A,handleShortcutClick:N,changeYear:T,changeMonth:y,reset:x,isTime:O,hasShortcuts:P,timeDisabled:E,onToggleVisibility:b,handleToggleTime:J,handlePickSuccess:C,handlePickClear:I,handlePick:v,handlePickClick:ee,timePickerRef:d})},render(){var e,t,n;return a.createVNode("div",{class:["bk-picker-panel-body-wrapper",this.shortcuts.length||this.hasShortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:i=>{i.preventDefault()}},[this.shortcuts.length?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[this.shortcuts.map(i=>a.createVNode("div",{class:"bk-picker-panel-shortcut",onClick:()=>this.handleShortcutClick(i)},[i.text]))]):"",a.createVNode("div",{class:"bk-picker-panel-body",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[a.createVNode("span",{class:cn("prev","-double"),onClick:()=>this.changeYear(-1)},[a.createVNode(dr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:cn("prev"),onClick:()=>this.changeMonth(-1)},[a.createVNode(yi,{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:cn("next","-double"),onClick:()=>this.changeYear(1)},[a.createVNode(fr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:cn("next"),onClick:()=>this.changeMonth(1)},[a.createVNode(Mn,{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(Hc,{tableDate:this.panelDate,disableDate:this.disableDate,selectionMode:this.selectionMode,modelValue:this.dates,focusedDate:this.focusedDate,onPick:this.panelPickerHandlers},null);default:return null}})():a.createVNode(J9,{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(x5,{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 dy={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 fy=a.defineComponent({name:"DateRangePanel",props:dy,emits:["pick","pick-success"],setup(e,{slots:t,emit:n}){const[i,l]=e.modelValue.map(V=>V||Wc()),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&&!l},upToNowEnable:!1,dates:e.modelValue}),d=(V,$)=>!V||!$?0:V.getTime()-$.getTime(),h=()=>{c.currentView=e.selectionMode,c.leftPickerTable=`${c.currentView}-table`,c.rightPickerTable=`${c.currentView}-table`},f=a.ref(null),m=a.ref(null),p=V=>{var $,X;V&&(($=f==null?void 0:f.value)==null||$.updateScroll(),(X=m==null?void 0:m.value)==null||X.updateScroll())},v=(V,$,X,fe=!0)=>{const ce=new Date(c[`${V}PanelDate`]);if(ce[`set${$}`](ce[`get${$}`]()+X),c[`${V}PanelDate`]=ce,!!fe)if(e.splitPanels){const Ce=V==="left"?"right":"left";V==="left"&&c.leftPanelDate>=c.rightPanelDate&&v(Ce,$,1),V==="right"&&c.rightPanelDate<=c.leftPanelDate&&v(Ce,$,-1)}else{const Ce=V==="left"?"right":"left",Ee=c[`${Ce}PanelDate`],ne=new Date(Ee);if($==="Month"){const Y=new Date(ne.getFullYear(),ne.getMonth()+X+1,0).getDate();ne.setDate(Math.min(Y,ne.getDate()))}ne[`set${$}`](ne[`get${$}`]()+X),c[`${Ce}PanelDate`]=ne}},C=V=>{const $=c.currentView==="year"?-10:-1;v(V,"FullYear",$)},I=V=>{const $=c.currentView==="year"?10:1;v(V,"FullYear",$)},N=V=>{v(V,"Month",-1)},x=V=>{v(V,"Month",1)},T=V=>{c[`${V}PickerTable`]="year-table"},y=V=>{c[`${V}PickerTable`]="month-table"},b=V=>{const $="zh-CN",X="[yyyy]-[mm]",fe=c[`${V}PanelDate`],{labels:ce,separator:Ce}=E9($,X,fe),Ee=ne=>{const Y=ne==="month"?y:T;return()=>Y(V)};return{separator:Ce,labels:ce.map(ne=>{const Y=ne;return Y.handler=Ee(ne.type),Y})}},M=(V,$)=>{n("pick",c.dates,V,$||e.type)},L=(V,$)=>{if(console.warn("handleRangePick"),c.rangeState.selecting||c.currentView==="time"){if(c.currentView==="time")c.dates=V;else{const[X,fe]=[c.rangeState.from,V].sort(d),ce=$==="upToNow"?new Date:new Date(new Date(new Date(fe.setHours(23)).setMinutes(59)).setSeconds(59));c.dates=[X,ce],c.rangeState={from:X,to:ce,selecting:!1}}M(!1,$||"date")}else c.upToNowEnable=new Date(V).getTime()<new Date().getTime(),c.rangeState={from:V,to:null,selecting:!0}},k=(V,$)=>{if(c[`${V}PanelDate`]=$,c[`${V}PickerTable`]==="year-table"?c[`${V}PickerTable`]="month-table":c[`${V}PickerTable`]=`${c.currentView}-table`,!e.splitPanels){const fe=V==="left"?"right":"left";c[`${fe}PanelDate`]=$,v(fe,"Month",fe==="left"?-1:1,!1)}},A=(V,$)=>{if(!(V!=null&&V.value))return!1;V.onClick&&V.onClick(V,$);const X=typeof V.value=="function"?V.value():V.value,[fe,ce]=X;c.rangeState.from=fe,c.rangeState.to=ce,c.dates=[fe,ce],n("pick",X,!1,"shortcut",V),e.shortcutClose&&n("pick-success")},O=V=>{c.rangeState.to=V};a.watch(()=>e.selectionMode,V=>{c.currentView=V||"range"});const J=a.computed(()=>c.currentView==="time"),P=a.computed(()=>b("left")),E=a.computed(()=>b("right")),ee=a.computed(()=>c.leftPickerTable.split("-").shift()),H=a.computed(()=>c.rightPickerTable.split("-").shift()),le=a.computed(()=>P.value.labels[0].type==="year"||c.currentView==="date"),de=a.computed(()=>P.value.labels[1].type==="year"||c.currentView==="date"),he=a.computed(()=>E.value.labels[0].type==="year"||c.currentView==="date"),ye=a.computed(()=>E.value.labels[1].type==="year"||c.currentView==="date"),re=a.computed(()=>{const V=`${c.currentView}-table`;return{left:c.leftPickerTable!==V,right:c.rightPickerTable!==V}}),K=a.computed(()=>({left:re.value.left?k.bind("left"):L,right:re.value.right?k.bind("right"):L})),B=a.computed(()=>{var V;return t.shortcuts||((V=e.shortcuts)==null?void 0:V.length)});return Te(F({},a.toRefs(c)),{isTime:J,hasShortcuts:B,prevYear:C,nextYear:I,prevMonth:N,nextMonth:x,leftDatePanelLabel:P,rightDatePanelLabel:E,leftDatePanelView:ee,rightDatePanelView:H,leftShowLabelFirst:le,leftShowLabelSecond:de,rightShowLabelFirst:he,rightShowLabelSecond:ye,preSelecting:re,panelPickerHandlers:K,handleShortcutClick:A,reset:h,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:cn("prev","-double"),onClick:()=>this.prevYear("left")},[a.createVNode(dr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:cn("prev"),onClick:()=>this.prevMonth("left")},[a.createVNode(yi,{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:cn("next","-double"),onClick:()=>this.nextYear("left")},[a.createVNode(fr,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels||this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:cn("next"),onClick:()=>this.nextMonth("left")},[a.createVNode(Mn,{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(Hc,{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:cn("prev","-double"),onClick:()=>this.prevYear("right")},[a.createVNode(dr,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels&&this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:cn("prev","-double"),onClick:()=>this.prevMonth("right")},[a.createVNode(yi,{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:cn("next","-double"),onClick:()=>this.nextYear("right")},[a.createVNode(fr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:cn("next"),onClick:()=>this.nextMonth("right")},[a.createVNode(Mn,{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(Hc,{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])}}),hy=a.defineComponent({name:"DatePicker",directives:{clickoutside:$n},props:Bc,emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=On(),l=e.type.includes("range"),o=l?[null,null]:[null],c=l?e.value||e.modelValue:[e.value||e.modelValue];let d=D9(c)?o:xi(e.value||e.modelValue,e.type,e.multiple,e.format),h=null;e.shortcutSelectedIndex!==-1&&(h=e.shortcuts[e.shortcutSelectedIndex]||null,h&&(d=h.value()));const f=a.reactive({showClose:!1,visible:!1,internalValue:d,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:d[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:d.map(el),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:h,onSelectionModeChange:m});function m(ne){let Y=ne;return ne.match(/^date/)&&(Y="date"),f.selectionMode=["year","month","date","time"].indexOf(Y)>-1&&Y,f.selectionMode}const p=a.computed(()=>{if(e.multiple)return f.internalValue.slice();const ne=e.type.includes("range");let Y=f.internalValue.map(Z=>Z instanceof Date?new Date(Z):Z||"");return e.type.match(/^time/)&&(Y=Y.map(Z=>Rn(Z,e.type,e.multiple,e.format))),ne||e.multiple?Y:Y[0]}),v=a.computed(()=>e.type.match(/^time/)?p.value:e.multiple?Rn(p.value,e.type,e.multiple,e.format):Array.isArray(p.value)?p.value.map(ne=>Rn(ne,e.type,e.multiple,e.format)):Rn(p.value,e.type,e.multiple,e.format)),C=a.computed(()=>e.type==="daterange"||e.type==="datetimerange"?"DateRangePanel":"DatePanel"),I=a.computed(()=>e.open===null?f.visible:e.open),N=a.computed(()=>Rn(f.internalValue,e.type,e.multiple,e.format)),x=a.computed(()=>{var ne;return((ne=f.shortcut)==null?void 0:ne.text)&&e.useShortcutText?f.shortcut.text:N.value}),T=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),y=a.computed(()=>!!t.header),b=a.computed(()=>!!t.footer),M=a.computed(()=>!!t.shortcuts),L=a.computed(()=>{let ne="";return e.fontSize==="medium"?ne="medium-font":e.fontSize==="large"&&(ne="large-font"),ne}),k=a.computed(()=>{let ne="";return e.fontSize==="medium"?ne="medium-width":e.fontSize==="large"&&(ne="large-width"),ne}),A=a.computed(()=>{var ne;return((ne=f.shortcut)==null?void 0:ne.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),O=a.computed(()=>e.options),J=a.computed(()=>C.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),P=a.ref(null),E=()=>{var ne;(ne=P==null?void 0:P.value)==null||ne.focus()};a.watch(()=>f.visible,ne=>{var Y,Z;ne===!1&&((Y=ee.value)==null||Y.destoryDropdown()),(Z=ee.value)==null||Z.updateDropdown(),n("open-change",ne)});const ee=a.ref(null);a.watch(()=>e.modelValue,ne=>{var Y;f.internalValue=xi(ne,e.type,e.multiple,e.format),e.withValidate&&((Y=i==null?void 0:i.validate)==null||Y.call(i,"change"))}),a.watch(()=>e.open,ne=>{f.visible=ne===!0}),a.watch(()=>e.type,ne=>{m(ne)}),a.watch(()=>p,(ne,Y)=>{const Z=JSON.stringify(ne),ae=JSON.stringify(Y);(Z!==ae||typeof ne!=typeof Y)&&n("input",ne)}),a.onMounted(()=>{e.type.indexOf("date")>-1,f.timeEnterMode=!0;const ne=e.modelValue,Y=p.value;(typeof ne!=typeof Y||JSON.stringify(ne)!==JSON.stringify(Y))&&n("input",p.value),e.open!==null&&(f.visible=e.open),a.provide(z9,{props:e,focus:()=>E()})});const H=a.ref(null),le=ne=>{var Y;if(f.disableCloseUnderTransfer)return f.disableCloseUnderTransfer=!1,!1;if(ne&&ne.type==="mousedown"&&f.visible){ne.preventDefault(),ne.stopPropagation();return}if(f.visible){const Z=(Y=H==null?void 0:H.value)==null?void 0:Y.$el;if(ne&&Z&&Z.contains(ne.target))return;f.visible=!1,ne==null||ne.preventDefault(),ne==null||ne.stopPropagation();return}f.isFocused=!1,f.disableClickOutSide=!1},de=()=>{var ne,Y;(ne=P==null?void 0:P.value)==null||ne.focus(),(Y=P==null?void 0:P.value)==null||Y.click()},he=()=>{e.readonly||e.disabled||N!=null&&N.value&&(f.showClose=!0)},ye=ne=>{f.showClose=!1},re=ne=>{a.nextTick(()=>{var Y;n("change",v.value,ne),n("update:modelValue",p.value),e.type.indexOf("time")<0&&((Y=P==null?void 0:P.value)==null||Y.blur())})},K=ne=>{var G;const Y=e.type.includes("range")||e.multiple,Z=N.value,ae=ne.target.value,pe=xi(ae,e.type,e.multiple,e.format),D=Y?pe:pe[0],W=(G=e.disableDate)==null?void 0:G.call(e,D),Q=pe.reduce((te,ie)=>te&&ie instanceof Date,!0);ae!==Z&&!W&&Q?(re(e.type),f.internalValue=pe):f.forceInputRerender=f.forceInputRerender+1},B=ne=>{e.readonly||(f.isFocused=!0,!(ne&&ne.type==="focus")&&(e.disabled||(f.visible=!0)))},V=()=>{var ne;(ne=H==null?void 0:H.value)==null||ne.reset()},$=ne=>{var Y,Z;if(f.internalFocus){f.internalFocus=!1;return}if(f.visible){ne.preventDefault();return}f.isFocused=!1,m(e.type),f.internalValue=f.internalValue.slice(),V(),(Y=H==null?void 0:H.value)==null||Y.onToggleVisibility(!1),(Z=i==null?void 0:i.validate)==null||Z.call(i,"blur")},X=ne=>{const{keyCode:Y}=ne;if(Y===9&&f.visible)if(ne.stopPropagation(),ne.preventDefault(),T.value){const ae=".bk-picker-confirm > *",pe=ee.value.$el.querySelectorAll(ae);f.internalFocus=!0,[...pe][ne.shiftKey?"pop":"shift"]().focus()}else le();const Z=[37,38,39,40];if(!f.visible&&Z.includes(Y)){f.visible=!0;return}Y===27&&f.visible&&(ne.stopPropagation(),le()),!!Z.includes(Y)&&f.focusedTime.active&&ne.preventDefault()},fe=()=>{f.visible=!1,f.internalValue=f.internalValue.map(()=>null),n("clear"),re(e.type),V(),f.showClose=!1,f.shortcut=null,setTimeout(()=>m(e.type),500)},ce=()=>{var ne;f.visible=!1,a.nextTick(()=>{n("pick-success")}),(ne=P==null?void 0:P.value)==null||ne.blur(),V()},Ce=(ne,Y=!1,Z,ae)=>{let pe=ne;if(e.multiple){const W=pe.getTime(),Q=f.internalValue.findIndex(ie=>ie&&ie.getTime()===W),te=[...f.internalValue,pe].filter(Boolean).map(ie=>ie.getTime()).filter((ie,Me,Ie)=>Ie.indexOf(ie)===Me&&Me!==Q);f.internalValue=te.map(ie=>new Date(ie))}else pe=xi(ne,e.type,e.multiple,e.format),f.internalValue=Array.isArray(pe)?pe:[pe];if(f.internalValue[0]){const[W]=f.internalValue;f.focusedDate=W}f.focusedTime=Te(F({},f.focusedTime),{time:f.internalValue.map(el)}),T.value||(m(e.type),f.visible=Y),Z==="upToNow"&&e.type==="daterange"&&ce(),f.shortcut=ae,re(Z);const D=e.shortcuts.findIndex(W=>W===f.shortcut);n("shortcut-change",f.shortcut,D)},Ee=a.ref(null);return Te(F({},a.toRefs(f)),{panel:C,publicStringValue:v,opened:I,visualValue:N,displayValue:x,isConfirm:T,hasHeader:y,hasFooter:b,hasShortcuts:M,fontSizeCls:L,longWidthCls:k,localReadonly:A,allowCrossDayProp:J,ownPickerProps:O,pickerDropdownRef:ee,inputRef:P,triggerRef:Ee,pickerPanelRef:H,handleClose:le,handleIconClick:de,handleInputMouseenter:he,handleInputMouseleave:ye,handleFocus:B,handleBlur:$,handleKeydown:X,handleInputChange:K,handleClear:fe,onPick:Ce,onPickSuccess:ce})},render(){var n,i,l;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(wn,{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},[(l=(i=(n=this.$slots).trigger)==null?void 0:i.call(n))!=null?l: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(Ec,{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,d,h,f,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(d=(c=(o=this.$slots).header)==null?void 0:c.call(o))!=null?d:null]):null,this.panel==="DateRangePanel"?a.createVNode(fy,{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(uy,{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=(f=(h=this.$slots).footer)==null?void 0:f.call(h))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}}),gy=a.defineComponent({name:"TimePicker",directives:{clickoutside:$n},props:F(F(F({},Bc),ry),Zc),emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=On(),l=e.type.includes("range"),o=l?[null,null]:[null];let c=D9((l?e.modelValue:[e.modelValue])||[])?o:xi(e.modelValue,e.type,e.multiple,e.format),d=null;e.shortcutSelectedIndex!==-1&&(d=e.shortcuts[e.shortcutSelectedIndex]||null,d&&(c=d.value()));const h=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(el),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:d,onSelectionModeChange:f});function f(Y){let Z=Y;return Y.match(/^date/)&&(Z="date"),h.selectionMode=["year","month","date","time"].indexOf(Z)>-1&&Z,h.selectionMode}const m=a.computed(()=>{if(e.multiple)return h.internalValue.slice();const Y=e.type.includes("range");let Z=h.internalValue.map(ae=>ae instanceof Date?new Date(ae):ae||"");return e.type.match(/^time/)&&(Z=Z.map(ae=>Rn(ae,e.type,e.multiple,e.format))),Y||e.multiple?Z:Z[0]}),p=a.computed(()=>e.type.match(/^time/)?m.value:e.multiple?Rn(m.value,e.type,e.multiple,e.format):Array.isArray(m.value)?m.value.map(Y=>Rn(Y,e.type,e.multiple,e.format)):Rn(m.value,e.type,e.multiple,e.format)),v=a.computed(()=>e.type==="timerange"?"RangeTimePickerPanel":"TimePickerPanel"),C=a.computed(()=>e.open===null?h.visible:e.open),I=a.computed(()=>Rn(h.internalValue,e.type,e.multiple,e.format)),N=a.computed(()=>{var Y;return((Y=h.shortcut)==null?void 0:Y.text)&&e.useShortcutText?h.shortcut.text:I.value}),x=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),T=a.computed(()=>!!t.header),y=a.computed(()=>!!t.footer),b=a.computed(()=>!!t.shortcuts),M=a.computed(()=>{let Y="";return e.fontSize==="medium"?Y="medium-font":e.fontSize==="large"&&(Y="large-font"),Y}),L=a.computed(()=>{let Y="";return e.fontSize==="medium"?Y="medium-width":e.fontSize==="large"&&(Y="large-width"),Y}),k=a.computed(()=>{var Y;return((Y=h.shortcut)==null?void 0:Y.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),A=a.computed(()=>({disabledHours:e.disabledHours,disabledMinutes:e.disabledMinutes,disabledSeconds:e.disabledSeconds,hideDisabledOptions:e.hideDisabledOptions})),O=a.computed(()=>v.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),J=a.ref(null),P=()=>{var Y;(Y=J==null?void 0:J.value)==null||Y.focus()},{proxy:E}=a.getCurrentInstance();a.watch(()=>h.visible,Y=>{Y&&a.nextTick(()=>{O9(E,"TimeSpinner").forEach(ae=>ae.updateScroll())})});const ee=a.ref(null);a.watch(()=>e.modelValue,Y=>{var Z;h.internalValue=xi(Y,e.type,e.multiple,e.format),e.withValidate&&((Z=i==null?void 0:i.validate)==null||Z.call(i,"change"))}),a.watch(()=>e.open,Y=>{h.visible=Y===!0}),a.watch(()=>e.type,Y=>{f(Y)}),a.watch(()=>m,(Y,Z)=>{const ae=JSON.stringify(Y),pe=JSON.stringify(Z);(ae!==pe||typeof Y!=typeof Z)&&n("input",Y)}),a.onMounted(()=>{e.type.indexOf("date")>-1,h.timeEnterMode=!0;const Y=e.modelValue,Z=m.value;(typeof Y!=typeof Z||JSON.stringify(Y)!==JSON.stringify(Z))&&n("input",m.value),e.open!==null&&(h.visible=e.open),a.provide(z9,{props:e,focus:()=>P()})});const H=a.ref(null),le=Y=>{var Z;if(h.disableCloseUnderTransfer)return h.disableCloseUnderTransfer=!1,!1;if(Y&&Y.type==="mousedown"&&h.visible){Y.preventDefault(),Y.stopPropagation();return}if(h.visible){const ae=(Z=H==null?void 0:H.value)==null?void 0:Z.$el;if(Y&&ae&&ae.contains(Y.target))return;h.visible=!1,Y==null||Y.preventDefault(),Y==null||Y.stopPropagation();return}h.isFocused=!1,h.disableClickOutSide=!1},de=()=>{var Y,Z;(Y=J==null?void 0:J.value)==null||Y.focus(),(Z=J==null?void 0:J.value)==null||Z.click()},he=()=>{e.readonly||e.disabled||I!=null&&I.value&&(h.showClose=!0)},ye=Y=>{h.showClose=!1},re=Y=>{a.nextTick(()=>{var Z;n("change",p.value,Y),n("update:modelValue",m.value),e.type.indexOf("time")<0&&((Z=J==null?void 0:J.value)==null||Z.blur())})},K=Y=>{var te;const Z=e.type.includes("range")||e.multiple,ae=I.value,pe=Y.target.value,D=xi(pe,e.type,e.multiple,e.format),W=Z?D:D[0],Q=(te=e.disableDate)==null?void 0:te.call(e,W),G=D.reduce((ie,Me)=>ie&&Me instanceof Date,!0);pe!==ae&&!Q&&G?(re(e.type),h.internalValue=D):h.forceInputRerender=h.forceInputRerender+1},B=Y=>{e.readonly||(h.isFocused=!0,!(Y&&Y.type==="focus")&&(e.disabled||(h.visible=!0)))},V=()=>{var Y;(Y=H==null?void 0:H.value)==null||Y.reset()},$=Y=>{var Z,ae;if(h.internalFocus){h.internalFocus=!1;return}if(h.visible){Y.preventDefault();return}h.isFocused=!1,f(e.type),h.internalValue=h.internalValue.slice(),V(),(Z=H==null?void 0:H.value)==null||Z.onToggleVisibility(!1),(ae=i==null?void 0:i.validate)==null||ae.call(i,"blur")},X=Y=>{const{keyCode:Z}=Y;if(Z===9&&h.visible)if(Y.stopPropagation(),Y.preventDefault(),x.value){const pe=".bk-picker-confirm > *",D=ee.value.$el.querySelectorAll(pe);h.internalFocus=!0,[...D][Y.shiftKey?"pop":"shift"]().focus()}else le();const ae=[37,38,39,40];if(!h.visible&&ae.includes(Z)){h.visible=!0;return}Z===27&&h.visible&&(Y.stopPropagation(),le()),!!ae.includes(Z)&&h.focusedTime.active&&Y.preventDefault()},fe=()=>{h.visible=!1,h.internalValue=h.internalValue.map(()=>null),n("clear"),re(e.type),V(),h.showClose=!1,h.shortcut=null,setTimeout(()=>f(e.type),500)},ce=()=>{e.appendToBody&&(h.disableCloseUnderTransfer=!0)},Ce=()=>{var Y;h.visible=!1,a.nextTick(()=>{n("pick-success")}),(Y=J==null?void 0:J.value)==null||Y.blur(),V()},Ee=(Y,Z=!1,ae,pe)=>{let D=Y;if(e.multiple){const Q=D.getTime(),G=h.internalValue.findIndex(Me=>Me&&Me.getTime()===Q),ie=[...h.internalValue,D].filter(Boolean).map(Me=>Me.getTime()).filter((Me,Ie,Le)=>Le.indexOf(Me)===Ie&&Ie!==G);h.internalValue=ie.map(Me=>new Date(Me))}else D=xi(Y,e.type,e.multiple,e.format),h.internalValue=Array.isArray(D)?D:[D];if(h.internalValue[0]){const[Q]=h.internalValue;h.focusedDate=Q}h.focusedTime=Te(F({},h.focusedTime),{time:h.internalValue.map(el)}),x.value||(f(e.type),h.visible=Z),ae==="upToNow"&&e.type==="daterange"&&Ce(),h.shortcut=pe,re(ae);const W=e.shortcuts.findIndex(Q=>Q===h.shortcut);n("shortcut-change",h.shortcut,W)},ne=a.ref(null);return console.error(v),console.error(v.value),Te(F({},a.toRefs(h)),{panel:v,publicStringValue:p,opened:C,visualValue:I,displayValue:N,isConfirm:x,hasHeader:T,hasFooter:y,hasShortcuts:b,fontSizeCls:M,longWidthCls:L,localReadonly:k,allowCrossDayProp:O,ownPickerProps:A,pickerDropdownRef:ee,inputRef:J,triggerRef:ne,pickerPanelRef:H,handleClose:le,handleIconClick:de,handleInputMouseenter:he,handleInputMouseleave:ye,handleFocus:B,handleBlur:$,handleKeydown:X,handleInputChange:K,handleClear:fe,handleTransferClick:ce,onPick:Ee,onPickSuccess:Ce})},render(){var n,i,l;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(wn,{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},[(l=(i=(n=this.$slots).trigger)==null?void 0:i.call(n))!=null?l: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(Ec,{class:[this.appendToBody?"bk-date-picker-transfer":""],ref:"pickerDropdownRef",triggerRef:this.triggerRef,placement:this.placement,extPopoverCls:this.extPopoverCls,appendToBody:this.appendToBody,onClick:this.handleTransferClick},{default:()=>{var o,c,d,h,f,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(d=(c=(o=this.$slots).header)==null?void 0:c.call(o))!=null?d:null]):null,a.createVNode(J9,{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=(f=(h=this.$slots).footer)==null?void 0:f.call(h))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}});const Q9=Ge(hy);var Wn=(e=>(e.OBJECT_ARRAY="objectArray",e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e))(Wn||{});const my={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 py(e,t,n){const i=a.ref([]),l=a.ref([]),o=()=>{e.value.forEach(c=>{const d=c[n.value];t.value.includes(d)?l.value.push(c):i.value.push(c)})};return o(),a.watch(()=>[e,t,n],o),{selectList:i,selectedList:l}}function by(e,t){const n=a.ref(""),i=a.computed(()=>e.value.filter(l=>{const o=l[t.value];return o instanceof Object?!1:o.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:i}}var yy=a.defineComponent({name:"Transfer",props:my,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]"))?Wn.OBJECT_ARRAY:Wn.BASE_ARRAY:Wn.NOT_ARRAY),i=a.computed(()=>n.value===Wn.BASE_ARRAY?"value":e.settingKey),l=a.computed(()=>n.value===Wn.BASE_ARRAY?"value":e.displayKey),o=a.computed(()=>e.sortKey||l.value),c=a.computed(()=>{switch(n.value){case Wn.BASE_ARRAY:return[...new Set(e.sourceList)].map(y=>({value:y}));case Wn.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:d}=a.toRefs(e),{selectList:h,selectedList:f}=py(c,d,i),{selectSearchQuery:m,selectListSearch:p}=by(h,l),v=a.computed(()=>[...p.value].sort((y,b)=>{const M=y[o.value],L=b[o.value];return M>L?1:-1})),C=a.computed(()=>[...f.value].sort((y,b)=>{const M=y[o.value],L=b[o.value];return M>L?1:-1})),I=()=>{h.value=[],f.value=[...c.value],T()},N=()=>{h.value=[...c.value],f.value=[],T()},x=(y,b)=>{const M=b?h:f,L=b?f:h,k=M.value.findIndex(A=>A[i.value]===y);L.value.push(...M.value.splice(k,1)),T()},T=()=>{const y=h.value.map(M=>M[i.value]),b=f.value.map(M=>M[i.value]);t("update:targetList",b),t("change",n.value===Wn.BASE_ARRAY?y:h.value.map(M=>a.toRaw(M)),n.value===Wn.BASE_ARRAY?b:f.value.map(M=>a.toRaw(M)),b)};return{selectSearchQuery:m,selectListSearch:p,selectedList:f,selectListSort:v,selectedListSort:C,settingCode:i,displayCode:l,allToRight:I,allToLeft:N,handleItemClick:x}},render(){const e=this.sortable?this.selectListSort:this.selectListSearch,t=this.sortable?this.selectedListSort:this.selectedList,n=c=>{var p,v;const d=c==="left-header",h=d?`${(p=this.title[0])!=null?p:"\u5DE6\u4FA7\u5217\u8868"}`:`${(v=this.title[1])!=null?v:"\u53F3\u4FA7\u5217\u8868"}`,f=d?!e.length:!t.length,m=()=>{f||(d?this.allToRight():this.allToLeft())};return this.$slots[c]?a.createVNode("div",{class:"slot-header"},[this.$slots[c]()]):a.createVNode("div",{class:"header"},[`${h}\uFF08\u5171${d?e.length:t.length}\u6761\uFF09`,a.createVNode("span",{class:{disabled:f},onClick:()=>m()},[d?"\u5168\u90E8\u6DFB\u52A0":"\u6E05\u7A7A"])])},i=c=>{var f;const d=c==="left-empty-content",h=(f=d?this.emptyContent[0]:this.emptyContent[1])!=null?f:d?"\u65E0\u6570\u636E":"\u672A\u9009\u62E9\u4EFB\u4F55\u9879";return this.$slots[c]?a.createVNode("div",null,[this.$slots[c]()]):a.createVNode("div",{class:"empty"},[h])},l=(c,d=!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"},[d?a.createVNode(jo,{class:"bk-icon"},null):a.createVNode(An,{class:"bk-icon"},null)])]),o=c=>{const d=c==="left",h=d?e:t,f=d?"source-option":"target-option",m=d?"left-empty-content":"right-empty-content";return h.length?a.createVNode("ul",{class:["content",this.searchable&&d?"is-search":""]},[h.map(p=>{var v,C,I;return a.createVNode("li",{key:p[this.settingCode],class:[this.$slots[f]?"custom-item":""],onClick:()=>this.handleItemClick(p[this.settingCode],d)},[(I=(C=(v=this.$slots)[f])==null?void 0:C.call(v,p))!=null?I:l(p,d)])})]):i(m)};return a.createVNode("div",{class:["bk-transfer",this.extCls]},[a.createVNode("div",{class:"source-list"},[n("left-header"),this.searchable&&a.createVNode(Fi,{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 R9=Ge(yy);var xr=(e=>(e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_EXPAND="nodeExpand",e.NODE_CHECKED="nodeChecked",e))(xr||{});const tl=(...e)=>!0,Cy={nodeClick:tl,nodeCollapse:tl,nodeExpand:tl,nodeChecked:tl};var oe=(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))(oe||{});const Si={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"},My={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 wy=(e,{slots:t})=>({renderEmpty:n=>a.createVNode(Ps,{scene:"part",type:n},{default:()=>{var i,l;return[(l=(i=t.default)==null?void 0:i.call(t))!=null?l:e.emptyText]}})}),nl=(e,t)=>{const n=E=>e.schema.get(E),i=(E,ee)=>{var H;return(H=n(E[oe.UUID]))==null?void 0:H[ee]},l=(E,ee,H)=>{e.schema.set(E[oe.UUID],Te(F({},n(E[oe.UUID])),{[ee]:H}))},o=E=>i(E,oe.PATH),c=E=>i(E,oe.UUID),d=E=>i(E,oe.IS_ROOT),h=E=>i(E,oe.IS_OPEN),f=E=>i(E,oe.HAS_CHILD),m=E=>i(E,oe.IS_MATCH),p=E=>i(E,oe.IS_CHECKED),v=E=>i(E,oe.PARENT_ID),C=E=>i({[oe.UUID]:E},oe.PARENT_ID),I=E=>i(E,oe.IS_LOADING),N=(E,ee)=>{l(E,oe.IS_LOADING,ee)},x=E=>e.schema.delete(E),T=E=>n(v(E)),y=E=>{var ee;return typeof E=="object"?h(E):typeof E=="string"?(ee=n(E))==null?void 0:ee[oe.IS_OPEN]:!1},b=E=>y(i(E,oe.PARENT_ID)),M=E=>d(E)||b(E),L=E=>E.split("-").reduce((H,le)=>{const de=Number(le);return Array.isArray(H)?H[de]:H[t.children][de]},t.data),k=E=>{const ee=e.schema;return Array.prototype.filter.call(Array.from(ee.keys()),H=>ee.get(H)[oe.PARENT_ID]===E[oe.UUID])},A=E=>L(o({[oe.UUID]:E})),O=E=>d({[oe.UUID]:E})?{[t.children]:t.data}:A(C(E)),J=E=>({[Si[oe.IS_LOADING]]:i(E,oe.IS_LOADING),[Si[oe.HAS_CHILD]]:f(E),[Si[oe.IS_MATCH]]:m(E),[Si[oe.IS_CHECKED]]:p(E),[Si[oe.IS_OPEN]]:h(E),[Si[oe.IS_ROOT]]:d(E),fullPath:i(E,oe.PATH),uuid:c(E),parentId:i(E,oe.PARENT_ID)});return{getSchemaVal:n,getNodeAttr:i,getNodeId:c,getNodeParentId:v,getNodeParentIdById:C,getParentNodeData:O,getParentNode:T,setNodeAttr:l,getNodePath:o,isRootNode:d,isNodeOpened:h,hasChildNode:f,isItemOpen:y,isNodeChecked:p,isNodeMatched:m,isNodeLoading:I,checkNodeIsOpen:M,getSourceNodeByPath:L,getSourceNodeByUID:A,deleteNodeSchema:x,resolveScopedSlotParam:J,setTreeNodeLoading:N,extendNodeAttr:E=>Te(F({},E),{[oe.TREE_NODE_ATTR]:J(E)}),getChildNodes:k}};const W9="1px dashed #c3cdd7",H9=(e,t,n=null,i=null,l=null,o=[])=>{const c=e[t];return typeof c=="boolean"?c?i:l:B9(n,e,t,o)},B9=(e,t,n,i=[])=>{const l=t[n];if(typeof l=="string")return typeof e=="object"&&e!==null?(Object.prototype.hasOwnProperty.call(e,l)||console.error(`cannot find node label with key ${l}`),e[l]):l;if(typeof l=="function"){const o=l.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}},Z9=(e,t)=>B9(e,t,"label"),Gc=(e,t)=>e.get(t)||{},vy=(e,t,n)=>{var i;return(i=Gc(e,t))==null?void 0:i[n]},Iy=(e,t)=>({"--level-line":H9(t,"levelLine",e,W9,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),Ny=(e,t,n={})=>{const{schema:i}=n,l=vy(i,e[oe.UUID],oe.DEPTH);return F({"--depth":l},typeof t.levelLine=="function"?{"--level-line":H9(t,"levelLine",e,W9,null,["node"])}:{})},Ly=(e,t,n)=>{const{__is_root:i,__is_open:l}=Gc(t,e[oe.UUID])||{};return{"is-root":i,"bk-tree-node":!0,"is-open":l,"is-virtual-render":n.virtualRender,"level-line":n.levelLine}},ky=(e,t)=>{const{__is_checked:n,__is_selected:i}=Gc(t,e[oe.UUID])||{};return{"is-checked":n,"is-selected":i,[Ze("node-row")]:!0}},Ty=(e,t,n,i,l)=>{xy(e,t,n,{[i]:l})},xy=(e,t,n,i)=>{const o=e.split("-").reduce((c,d)=>{const h=Number(d);return Array.isArray(c)?c[h]:c[n][h]},t);Object.assign(o,i||{})},Sr=e=>e==null?{__IS_NULL:!0}:typeof e=="string"||typeof e=="number"||typeof e=="symbol"?{[oe.UUID]:e}:(Object.prototype.hasOwnProperty.call(e,oe.UUID)||console.error("setNodeAction Error: node id cannot found"),e);var G9=(e,t)=>{const{setNodeAttr:n,getNodePath:i,getNodeAttr:l,resolveScopedSlotParam:o,setTreeNodeLoading:c}=nl(t,e),d=(m,p)=>{if(typeof m=="object"&&m!==null){n(p,oe.IS_OPEN,!0);const v=Array.isArray(m)?m:[m];return Ty(i(p),e.data,e.children,e.children,v),Promise.resolve(m)}return Promise.resolve(m)},h=m=>{const{callback:p=null,cache:v=!0}=e.async||{};if(typeof p=="function"&&l(m,oe.IS_ASYNC)){if(n(m,oe.IS_ASYNC_INIT,!0),!l(m,oe.IS_CACHED)){n(m,oe.IS_CACHED,v);const C=o(m),I=p(m,N=>d(N,m),C);if(typeof I=="object"&&I!==null)return c(m,!0),I instanceof Promise?Promise.resolve(I.then(N=>d(N,m)).catch(N=>console.error("load remote data error:",N)).finally(()=>{c(m,!1),n(m,oe.IS_CACHED,!0)})):(d(I,m),c(m,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},f=()=>{const m=t.data.filter(p=>l(p,oe.IS_ASYNC)&&p[Si[oe.IS_OPEN]]&&!l(p,oe.IS_ASYNC_INIT));m.length&&Promise.all(m.map(p=>h(p))).then(()=>{f()}).catch(p=>{console.warn(p)})};return{asyncNodeClick:h,deepAutoOpen:f}},Sy=(e,t,n,i,l,o)=>{let c=e.selected;const{setNodeAttr:d,getNodePath:h,getSchemaVal:f,getNodeAttr:m,getNodeId:p,getChildNodes:v,isRootNode:C,hasChildNode:I,isItemOpen:N,isNodeOpened:x,isNodeLoading:T,isNodeChecked:y,getParentNode:b,resolveScopedSlotParam:M,extendNodeAttr:L}=nl(n,e),{registerNextLoop:k}=o,{asyncNodeClick:A,deepAutoOpen:O}=G9(e,n),J=Z=>N(Z)?a.createVNode(Jo,{class:[Ze("tree-icon"),Ze("node-prefix")]},null):a.createVNode(Qo,{class:[Ze("tree-icon"),Ze("node-prefix")]},null),P=Z=>{if(typeof Z=="string")return Z;if(typeof Z=="object"&&Z!==null){if(Z.__v_isVNode)return Z;const{node:ae,className:pe,text:D,style:W}=Z;return a.h(ae,{class:pe,style:W},D)}return null},E=Z=>{var ae,pe,D;return((D=(pe=(ae=t.slots).nodeLoading)==null?void 0:pe.call(ae,L(Z)))!=null?D:T(Z))?a.createVNode(xs,null,null):""},ee=Z=>{if(t.slots.nodeAction)return t.slots.nodeAction(L(Z));let ae=null;return T(Z)?E(Z):typeof e.prefixIcon=="function"&&(ae=e.prefixIcon(L(Z),"node_action"),ae!=="default")?P(ae):(ae==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon)&&(I(Z)||Z.async||!e.autoCheckChildren)?N(Z)?a.createVNode(ws,{class:Ze("node-prefix")},null):a.createVNode(ks,{class:Ze("node-prefix")},null):null},H=Z=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(L(Z));let ae=null;return typeof e.prefixIcon=="function"&&(ae=e.prefixIcon(L(Z),"node_type"),ae!=="default")?P(ae):ae==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?C(Z)||I(Z)?J(Z):a.createVNode(Go,{class:[Ze("tree-icon"),Ze("node-prefix")]},null):null},le=(Z,ae)=>{const pe=b(Z);pe&&(d(pe,oe.IS_CHECKED,ae),C(pe)||le(pe,ae))},de=(Z,ae,pe)=>{v(Z).forEach(D=>{d({[oe.UUID]:D},ae,pe),de({[oe.UUID]:D},ae,pe)})},he=(Z,ae)=>{d(Z,oe.IS_CHECKED,!!ae),de(Z,oe.IS_CHECKED,!!ae),le(Z,ae),t.emit(xr.NODE_CHECKED,l.value.filter(pe=>y(pe)).map(pe=>pe[oe.UUID]))},ye=Z=>y(Z)&&!l.value.filter(ae=>{var pe;return(pe=h(ae))==null?void 0:pe.startsWith(h(Z))}).every(ae=>y(ae)),re=Z=>y(Z)||l.value.filter(ae=>{var pe;return(pe=h(ae))==null?void 0:pe.startsWith(h(Z))}).some(ae=>y(ae)),K=Z=>e.showCheckbox?a.createVNode(Ui,{size:"small",modelValue:re(Z),indeterminate:ye(Z),onChange:ae=>he(Z,ae)},null):null,B=(Z,ae=null,pe=null,D=!0)=>{const W=ae===null?!N(Z):!!ae;if(W||de(Z,oe.IS_OPEN,W),d(Z,oe.IS_OPEN,W),D){const Q=N(Z)?xr.NODE_EXPAND:xr.NODE_COLLAPSE;t.emit(Q,Z,M(Z),f(Z[oe.UUID]),pe)}},V=(Z,ae,pe)=>{if(Array.isArray(Z)){Z.forEach(D=>d(Sr(D),ae,pe));return}d(Sr(Z),ae,pe)},$=(Z,ae=!0,pe=!1)=>{const D=Sr(Z);if(!D[oe.IS_NULL])if(pe)if(ae){if(V(D,oe.IS_OPEN,!0),!C(D)){const W=m(D,oe.PARENT_ID);$(W,!0,!0)}}else B(D,!1,null,!1);else V(D,oe.IS_OPEN,ae)},X=(Z,ae)=>{if(x(Z)){B(Z,!1,ae);return}A(Z).finally(()=>{m(Z,oe.IS_LOADING)?k("setNodeOpenedAfterLoading",{type:"once",fn:()=>B(Z,!0,ae)}):B(Z,!0,ae)})},fe=(Z,ae)=>{Z.stopImmediatePropagation(),Z.stopPropagation(),Z.preventDefault(),X(ae,Z)},ce=(Z,ae=!0,pe=!0)=>{const D=Array.isArray(Z)?Z:[Z];if(!D.length)return;const W=Sr(D[0]);W[oe.IS_NULL]||(e.selectable?(c!=null&&d({[oe.UUID]:c},oe.IS_SELECTED,!ae),e.selected&&e.selected!==c&&d({[oe.UUID]:e.selected},oe.IS_SELECTED,!ae),d(W,oe.IS_SELECTED,ae),c=p(W),pe&&D.length===1&&$(W,!0,!0),m(W,oe.IS_ASYNC)&&A(W).then(()=>{a.nextTick(()=>{D.shift(),ce(D,ae,pe)})})):console.warn("props.selectable is false or undefined, please set selectable with true"))},Ce=(Z,ae)=>{ce(Z,!0,!1),x(Z)||X(Z,ae);const pe=xr.NODE_CLICK;t.emit(pe,Z,M(Z),f(Z[oe.UUID]),ae)},Ee=(Z,ae)=>{if(C(ae))return!1;const pe=h(ae),D=`${pe}`.split("-").slice(0,Z+1);if(D.join("-")===pe)return!0;const Q=D.pop(),G=parseInt(Q,10);D.push(`${G+1}`);const te=D.join("-");return l.value.some(ie=>ie[oe.PATH]===te)},ne=Z=>{if(!e.levelLine)return null;const ae=D=>({"--depth":D}),pe=m(Z,oe.DEPTH)+1;return new Array(pe).fill("").map((D,W)=>W).filter(D=>Ee(D,Z)).filter(D=>D>0).map(D=>a.createVNode("span",{class:"node-virtual-line",style:ae(pe-D)},null))};return{renderTreeNode:Z=>{var ae,pe,D,W,Q;return a.createVNode("div",{"data-tree-node":p(Z),key:p(Z),class:ky(Z,n.schema)},[a.createVNode("div",{class:Ly(Z,n.schema,e),style:Ny(Z,e,n),onClick:G=>Ce(Z,G)},[a.createVNode("span",{class:[Ze("node-action")],onClick:G=>fe(G,Z)},[ee(Z)]),a.createVNode("span",{class:Ze("node-content")},[[K(Z),H(Z)],a.createVNode("span",{class:Ze("node-text")},[(D=(pe=(ae=t.slots).node)==null?void 0:pe.call(ae,L(Z)))!=null?D:[Z9(Z,e)]]),(Q=(W=t.slots).nodeAppend)==null?void 0:Q.call(W,L(Z))]),ne(Z)])])},hanldeTreeNodeClick:X,deepAutoOpen:O,asyncNodeClick:A,setNodeAction:V,setNodeOpened:B,setSelect:ce,setOpen:$}},Dy=(e,t,n)=>{const{getSourceNodeByUID:i,getNodeParentIdById:l,getParentNodeData:o,getNodeAttr:c,getNodePath:d,isRootNode:h}=nl(n,e),f=y=>y.target.closest("[data-tree-node]"),m=y=>{f(y).removeEventListener("mouseup",m)},p=y=>{const b=f(y);b.setAttribute("draggable","true"),b.addEventListener("mouseup",m)},v=y=>{y.preventDefault();const b=f(y),M=y.dataTransfer.getData("node-id"),L=b.getAttribute("data-tree-node"),k=N(M,L)?"move":"none";y.dataTransfer.effectAllowed=k,y.dataTransfer.dropEffect=k},C=y=>{y.dataTransfer.effectAllowed="move",y.dataTransfer.dropEffect="move";const b=f(y);y.dataTransfer.setData("text/plain",""),y.dataTransfer.setData("node-id",b.getAttribute("data-tree-node"))},I=y=>{y.preventDefault(),y.stopPropagation();const b=f(y),M=y.dataTransfer.getData("node-id"),L=b.getAttribute("data-tree-node");Reflect.apply(e.dragSort?x:T,globalThis,[M,L])},N=(y,b)=>{const M=d({[oe.UUID]:y}),L=d({[oe.UUID]:b}),k=l(y),A=l(b);return k===A?!0:M.indexOf(L)===-1&&L.indexOf(M)===-1},x=(y,b)=>{if(!N(y,b))return;const M=JSON.parse(JSON.stringify(i(y))),L=JSON.parse(JSON.stringify(i(b))),k=o(y),A=o(b),O=c({[oe.UUID]:y},oe.INDEX),J=c({[oe.UUID]:b},oe.INDEX);k==null||k[e.children].splice(O,1,L),A==null||A[e.children].splice(J,1,M)},T=(y,b)=>{const M=i(y),L=i(b);let k=null;if(h({[oe.UUID]:y}))k=e.data;else{const A=l(y);if(A!=null){k=i(A);const O=c({[oe.UUID]:y},oe.INDEX);k==null||k[e.children].splice(O,1)}}L[e.children]||(L[e.children]=[]),L[e.children].unshift(M)};a.onMounted(()=>{if(e.draggable&&t.value){const y=t.value.$el;y.addEventListener("mousedown",p),y.addEventListener("dragstart",C),y.addEventListener("dragover",v),y.addEventListener("drop",I)}}),a.onUnmounted(()=>{if(e.draggable&&t.value){const y=t.value.$el;y.removeEventListener("mousedown",p),y.removeEventListener("dragstart",C),y.removeEventListener("dragover",v),y.removeEventListener("drop",I)}})},jy=e=>{var v;const t=a.toRef(e,"search"),{openResultNode:n=!1,resultType:i="tree"}=(v=e.search)!=null?v:{},l=C=>["string","number","boolean"].includes(typeof C),o=(C,I)=>C===I,c=(C,I)=>new RegExp(`${C}`,"i").test(`${I}`),d=(C,I)=>Reflect.apply(C,globalThis,I),h=t.value===void 0||t.value===!1,f=(C,I)=>{if(h)return!0;if(l(t.value))return d(c,[t.value,C,I]);const{value:N="",match:x="fuzzy"}=t.value,y=typeof x=="function"?x:x==="fuzzy"?c:o;return`${N}`.length===0?!0:d(y,[N,C,I])},m=a.computed(()=>t.value!==!1&&(l(t.value)?`${t.value}`.length>0:typeof t.value=="object"));return{searchFn:f,refSearch:t,isSearchActive:m,isSearchDisabled:h,openResultNode:n,resultType:i,isTreeUI:i==="tree"}},zy=e=>{var x;const t=(T,y=void 0,b=[])=>{const{data:M,children:L}=T,k=[],A=[];let O=0;const J=new Map;function P(re,K,B,V){if(re!=null&&J.has(re)&&![oe.UUID,oe.PARENT_ID].includes(K)){const $=J.get(re);Object.prototype.hasOwnProperty.call($,K)&&typeof V=="function"&&Reflect.apply(V,self,[$,K,B])&&(Object.assign($,{[K]:B}),P($[oe.PARENT_ID],K,B,V))}}function E(re){let K=null;return typeof T.nodeKey=="string"&&(K=re[T.nodeKey]||Hi.v4()),K||re[oe.UUID]||Hi.v4()}const ee={[oe.IS_OPEN]:()=>!1,[oe.IS_CHECKED]:()=>!1,[oe.IS_MATCH]:()=>!0,[oe.IS_SELECTED]:re=>T.selected===re,[oe.IS_CACHED]:()=>!1,[oe.IS_ASYNC]:()=>null,[oe.IS_LOADING]:()=>!1};function H(re,K,B,V=void 0){let $=V;V===void 0&&typeof ee[B]=="function"&&($=ee[B](re,K));const X=Si[B];if(Object.prototype.hasOwnProperty.call(K,X))return K[X];const fe=(b||[]).find(Ce=>Ce[oe.UUID]===re);let ce;return fe&&(ce=fe[B]),ce==null&&(ce=$),ce}function le(re,K){return T.selectable?H(re,K,oe.IS_SELECTED,T.selected===re):!1}function de(re,K,B){var X;const V=H(re,K,oe.IS_OPEN),$=J.has(B)?(X=J.get(B))==null?void 0:X[oe.IS_OPEN]:!0;return V&&$}function he(re){return!re[oe.IS_OPEN]}function ye(re,K=0,B=null,V=null){const $=re.length;for(let X=0;X<$;X++){const fe=re[X];if(Array.isArray(fe))ye(fe,K,B,V);else if(typeof fe=="object"&&fe!==null){const ce=V!==null?`${V}-${X}`:`${X}`,Ce=`${E(fe)}`,Ee=!!(fe[L]||[]).length;let ne=H(Ce,fe,oe.IS_OPEN);T.autoOpenParentNode?ne&&P(B,oe.IS_OPEN,!0,he):ne=de(Ce,fe,B),Object.assign(fe,{[oe.UUID]:Ce});const Y=T.showCheckbox&&H(Ce,fe,oe.IS_CHECKED);Y&&k.push(Ce),J.set(Ce,{[oe.DEPTH]:K,[oe.INDEX]:X,[oe.UUID]:Ce,[oe.PARENT_ID]:B,[oe.HAS_CHILD]:Ee,[oe.PATH]:ce,[oe.IS_ROOT]:B===null,[oe.ORDER]:O,[oe.IS_SELECTED]:le(Ce,fe),[oe.IS_MATCH]:H(Ce,fe,oe.IS_MATCH),[oe.IS_OPEN]:ne,[oe.IS_CHECKED]:Y,[oe.IS_CACHED]:H(Ce,fe,oe.IS_CACHED),[oe.IS_ASYNC]:H(Ce,fe,oe.IS_ASYNC),[oe.IS_LOADING]:H(Ce,fe,oe.IS_LOADING),[L]:null}),O+=1,A.push(Te(F({},JSON.parse(JSON.stringify(fe,(Z,ae)=>Z===T.children?null:ae))),{[oe.IS_OPEN]:ne,[L]:null})),Object.prototype.hasOwnProperty.call(fe,L)&&ye(fe[L]||[],K+1,Ce,ce)}}}return ye(y||M),T.showCheckbox&&(k==null||k.forEach(re=>{Array.from(J.values()).filter(K=>{var B;return(B=K[oe.PATH])==null?void 0:B.startsWith(J.get(re)[oe.PATH])}).forEach(K=>Object.assign(K,{[oe.IS_CHECKED]:!0})),P(re,oe.IS_CHECKED,!0,()=>!0)})),[A,J]},n=t(e),i=new Map,l=[],o=[],c=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),d=a.computed(()=>Array.from(c.schema.values())),{asyncNodeClick:h,deepAutoOpen:f}=G9(e,c),m=T=>{l.push(T)},p=(T,y,b=!0)=>{b&&i.has(T)&&i.delete(T),i.set(T,y)},v=T=>typeof T=="function"?{type:"loop",fn:T}:typeof T=="object"&&typeof T.type=="string"&&typeof T.fn=="function"?T:(console.error("loop event error",T),null),C=T=>{var b;const y=v(T);return y!==null&&Reflect.apply(y.fn,globalThis,[]),(b=y==null?void 0:y.type)!=null?b:"once"},I=()=>{Array.from(i.keys()).forEach(T=>{const y=i.get(T);if(Array.isArray(y)){const b=[];y.forEach((M,L)=>{C(M)==="once"&&b.unshift(L)}),b.length&&b.forEach(M=>y.splice(M,1)),y.length===0&&i.delete(T)}else C(y)==="once"&&i.delete(T)})};a.watch(()=>[e.data],T=>{var b,M;const y=t(e,T,d.value);c.data=y[0],c.schema=y[1],((b=e.async)==null?void 0:b.callback)&&((M=e.async)==null?void 0:M.deepAutoOpen)==="every"&&f(),I()},{deep:!0}),e.selectable&&a.watch(()=>e.selected,T=>{o.length=0,l.forEach(y=>{Reflect.apply(y,globalThis,[T]),o.push(()=>Reflect.apply(y,globalThis,[T]))}),p("afterSelectWatch",o)},{immediate:!0});const N=T=>{p("afterDataUpdate",T)};return(x=e.async)!=null&&x.callback&&f(),{flatData:c,schemaValues:d,asyncNodeClick:h,deepAutoOpen:f,afterDataUpdate:N,registerNextLoop:p,onSelected:m}},Py=a.defineComponent({name:"Tree",props:My,emits:Cy,setup(e,t){const{flatData:n,schemaValues:i,onSelected:l,registerNextLoop:o}=zy(e),{setNodeAttr:c,checkNodeIsOpen:d,getNodeAttr:h,getNodePath:f,isRootNode:m,isNodeOpened:p,isNodeChecked:v,isNodeMatched:C,hasChildNode:I}=nl(n,e),{searchFn:N,isSearchActive:x,refSearch:T,openResultNode:y,isTreeUI:b,isSearchDisabled:M}=jy(e);M||a.watch([T],()=>{n.data.forEach(K=>{const B=N(Z9(K,e),K);c(K,oe.IS_MATCH,B),y&&P(K,!0,!0)})});const L=K=>{if(x.value){const B=()=>b?i.value.some(V=>{var $;return(($=V[oe.PATH])==null?void 0:$.startsWith(f(K)))&&V[oe.IS_MATCH]}):!1;return h(K,oe.IS_MATCH)||B()}return!0},k=a.computed(()=>n.data.filter(K=>d(K)&&L(K))),{renderTreeNode:A,hanldeTreeNodeClick:O,setNodeOpened:J,setOpen:P,setNodeAction:E,setSelect:ee,asyncNodeClick:H}=Sy(e,t,n,k,i,{registerNextLoop:o}),le=(K,B=!0)=>{E(Sr(K),oe.IS_CHECKED,B)};l(K=>{ee(K,!0,e.autoOpenParentNode)});const de=()=>n;t.expose({hanldeTreeNodeClick:O,isNodeChecked:v,isRootNode:m,isNodeOpened:p,isNodeMatched:C,hasChildNode:I,setOpen:P,setChecked:le,setNodeAction:E,setNodeOpened:J,setSelect:ee,asyncNodeClick:H,getData:de});const he=a.ref(),{renderEmpty:ye}=wy(e,t);Dy(e,he,n);const re=K=>{if(K.length)return K.map(A);const B=x.value?"search-empty":"empty";return ye(B)};return()=>a.createVNode(Ir,{class:Ze("tree"),style:Iy(null,e),list:k.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:Ze("container"),throttleDelay:0,ref:he},{default:K=>re(K.data||[])})}});const _9=Ge(Py),Y9=e=>e.__v_isVNode;var Oy=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(Y9(e[n])){i=e[n];break}n=n+1}let l=t-1,o=null;for(;l>=0&&l>n;){if(Y9(e[l])){o=e[l];break}l=l-1}if(i&&o){i.props||(i.props={});let c="bk-compose-form-item-head";i.props.class&&(c+=` ${i.props.class}`),this.headBackgroundColor&&(i.props.style=Object.assign(i.props.style||{},{"background-color":this.headBackgroundColor})),i.props.class=c,o.props||(o.props={});let d="bk-compose-form-item-tail";o.props.class&&(d+=` ${o.props.class}`),this.tailBackgroundColor&&(o.props.style=Object.assign(o.props.style||{},{"background-color":this.tailBackgroundColor})),o.props.class=d}}return a.h("div",{class:"bk-compose-form-item"},e)}});const Ay={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 Ey=a.defineComponent({name:"Form",props:Ay,emits:["submit"],setup(e,t){let n=[];const i=h=>{n.push(h)},l=h=>{n=n.reduce((f,m)=>(m!==h&&f.push(m),f),[])};return a.provide(mf,{props:e,register:i,unregister:l}),{handleSubmit:h=>{h.preventDefault(),t.emit("submit")},validate:h=>{let f={};return h?f=(typeof h=="string"?[h]:h).reduce((p,v)=>Te(F({},p),{[v]:!0}),{}):f=n.reduce((m,p)=>p.property?Te(F({},m),{[p.property]:!0}):m,{}),Promise.all(n.reduce((m,p)=>(f[p.property]&&m.push(p.validate()),m),[])).then(()=>Promise.resolve(e.model))},clearValidate:h=>{let f={};h?f=(typeof h=="string"?[h]:h).reduce((p,v)=>Te(F({},p),{[v]:!0}),{}):f=n.reduce((m,p)=>Te(F({},m),{[p.property]:!0}),{}),n.forEach(m=>f[m.property]&&m.clearValidate())}}},render(){var t,n;const e=Se({"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)])}}),Nn={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 Vy={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")},Jy=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Qy=e=>{const t=[];return e.required&&t.push({validator:Nn.required,message:`${e.label}\u4E0D\u80FD\u4E3A\u7A7A`,trigger:"blur"}),e.email&&t.push({validator:Nn.email,message:`${e.label}\u683C\u5F0F\u4E0D\u6B63\u786E`,trigger:"blur"}),Number(e.max)>-1&&t.push({validator:n=>Nn.max(n,e.max),message:`${e.label}\u6700\u5927\u503C${e.max}`,trigger:"blur"}),Number(e.min)>-1&&t.push({validator:n=>Nn.min(n,e.min),message:`${e.label}\u6700\u5C0F\u503C${e.min}`,trigger:"blur"}),Number(e.maxlength)>-1&&t.push({validator:n=>Nn.maxlength(n,e.maxlength),message:`${e.label}\u6700\u5927\u957F\u5EA6${e.maxlength}`,trigger:"blur"}),t},Ry=(e,t)=>{const n=e.reduce((i,l)=>{let o;if(l.required)o=Nn.required;else if(l.email)o=Nn.email;else if(Number(l.max)>-1)o=c=>Nn.max(c,l.max);else if(Number(l.min)>-1)o=c=>Nn.min(c,l.max);else if(Number(l.maxlength)>-1)o=c=>Nn.min(c,l.max);else if(Object.prototype.toString.call(l.pattern)==="[object RegExp]")o=c=>Nn.pattern(c,l.pattern);else if(Object.prototype.toString.call(l.validator)==="[object Function]")o=l.validator;else return i;return i.push({validator:o,message:l.message,trigger:l.trigger}),i},[]);return[...t,...n]},Wy=(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 Hy=a.defineComponent({name:"FormItem",directives:{bkTooltips:cc},props:Vy,setup(e){const t=a.getCurrentInstance(),n=a.reactive({isError:!1,errorMessage:""}),i=t4(),l=Boolean(i),o=a.computed(()=>l?i.props.formType==="vertical":!1),c=a.computed(()=>{const f={width:"",paddingRight:"",textAlign:""},m=F9(e.labelWidth)?e.labelWidth:l&&i.props.labelWidth;F9(m)&&(f.width=`${m}px`,f.paddingRight=m?"":"0px");const p=e.labelPosition||l&&i.props.labelPosition;return p&&(f["text-align"]=p),f}),d=f=>{if(!e.property||l&&!i.props.model)return Promise.resolve(!0);let m=[];l&&i.props.rules&&Jy(i.props.rules,e.property)&&(m=i.props.rules[e.property]),e.rules&&(m=e.rules),m=Wy(f,Ry(m,Qy(e))),m.length>0&&(n.isError=!1,n.errorMessage="");const p=jt.exports.get(i.props.model,e.property),v=(()=>{let C=-1;return()=>{if(C=C+1,C>=m.length)return Promise.resolve(!0);const I=m[C];return Promise.resolve().then(()=>{const N=I.validator(p);return typeof N!="boolean"&&typeof N.then=="function"?N.then(x=>{if(x===!1)return Promise.reject(I.message)}).then(()=>v(),()=>(n.isError=!0,n.errorMessage=I.message,Promise.reject(I.message))):N?v():(n.isError=!0,n.errorMessage=I.message,Promise.reject(I.message))})}})();return v()},h=()=>{n.isError=!1,n.errorMessage=""};return a.provide(pf,Te(F({},e),{validate:d,clearValidate:h})),a.onMounted(()=>{l&&i.register(t.proxy)}),a.onBeforeUnmount(()=>{l&&i.unregister(t.proxy)}),Te(F({},a.toRefs(n)),{labelStyles:c,isFormTypeVertical:o,validate:d,clearValidate:h})},render(){var i,l,o,c;const e=Se({"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(Eo,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&&((l=(i=this.$slots).labelAppend)==null?void 0:l.call(i))]),a.createVNode("div",{class:"bk-form-content"},[(c=(o=this.$slots).default)==null?void 0:c.call(o),n()])])}});const U9=Rt(Ey,{FormItem:Hy,ComposeFormItem:Oy}),By={span:g.number.def(1),offset:g.number.def(0),pull:g.number.def(0),push:g.number.def(0)};var Zy=a.defineComponent({name:"Col",props:By,emits:[],setup(e,t){const{col:n,gutter:i,flex:l}=a.inject("containerProps"),{span:o,offset:c,pull:d,push:h}=e,f=a.computed(()=>o||n);a.provide("containerProps",{col:f.value,gutter:i,flex:l});const m=function(v){return`${Number((v*100).toFixed(3))}%`},p=a.computed(()=>({width:m(f.value/n),"padding-right":`${i/2}px`,"padding-left":`${i/2}px`,"margin-left":c?m(c/n):null,right:d?m(d/n):null,left:h?m(h/n):null}));return()=>{var v,C;return a.createVNode("div",{class:"bk-grid-col",style:p.value},[(C=(v=t.slots).default)==null?void 0:C.call(v)])}}});const Gy={col:g.number.def(24),gutter:g.number.def(20),margin:g.number.def(20),flex:g.bool.def(!1),extCls:g.string};var _y=a.defineComponent({name:"Container",props:Gy,emits:[],setup(e,t){const{col:n,gutter:i,flex:l,extCls:o}=e;a.provide("containerProps",{col:n,gutter:i,flex:l});const c=a.computed(()=>o?`bk-grid-container ${o}`:"bk-grid-container"),d=a.computed(()=>{const{margin:h}=e;return{"padding-right":`${h}px`,"padding-left":`${h}px`}});return()=>{var h,f;return a.createVNode("div",{class:c.value,style:d.value},[(f=(h=t.slots).default)==null?void 0:f.call(h)])}}}),Yy=a.defineComponent({name:"Row",emits:[],setup(e,t){const{col:n,gutter:i,flex:l}=a.inject("containerProps");a.provide("containerProps",{col:n,gutter:i,flex:l});const o=a.computed(()=>Te(F({},l?{display:["-webkit-box","-ms-flexbox","flex"]}:{}),{"margin-right":`-${i/2}px`,"margin-left":`-${i/2}px`}));return()=>{var c,d;return a.createVNode("div",{class:"bk-grid-row",style:o.value},[(d=(c=t.slots).default)==null?void 0:d.call(c)])}}});const il=Rt(_y,{Row:Yy,Col:Zy}),Fy=["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"],Uy=["hover","click","manual"];var $y=a.defineComponent({name:"Dropdown",props:{isShow:g.bool.def(!1),placement:g.commonType(Fy,"placement").def("bottom"),trigger:g.commonType(Uy,"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=Se({"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=jt.exports.merge(t,this.popoverOptions);return a.createVNode("div",{class:e},[a.createVNode(ti,a.mergeProps(n,{onAfterShow:this.afterShow,onAfterHidden:this.afterHidden}),{default:()=>{var i,l;return a.createVNode("div",{class:"bk-dropdown-reference"},[a.createTextVNode(" "),(l=(i=this.$slots).default)==null?void 0:l.call(i),a.createTextVNode(" ")])},content:()=>{var i,l;return a.createVNode("div",{class:"bk-dropdown-content"},[a.createTextVNode(" "),(l=(i=this.$slots).content)==null?void 0:l.call(i),a.createTextVNode(" ")])}})])}}),Xy=a.defineComponent({name:"DropdownItem",props:{extCls:g.string},emits:["click"],setup(e,{emit:t}){const n=l=>{l.stopPropagation(),t("click",l)};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)])}}),Ky=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 $9=Rt($y,{DropdownMenu:Ky,DropdownItem:Xy});var _c=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(ff()),isFiltering:g.bool.def(!1),searchKey:g.oneOfType([g.string,g.number]).def(""),modelValue:g.arrayOf(g.oneOfType([ko(),String,Number]))},emits:["update:modelValue"],setup(e,{emit:t}){const{store:n}=e,i=a.reactive({list:[e.store.getNodes()]}),l=a.ref([]),o=a.ref([]),c=y=>typeof y=="number"?`${y}px`:y,d=c(e.height),h=c(e.width),f=y=>{y.length===0&&(i.list=i.list.slice(0,1),l.value=[]),y.forEach(b=>{const M=n.getNodeById(b);p(M)}),o.value=y},m=y=>{y.isDisabled||(y.config.multiple?o.value=n.getCheckedNodes().map(b=>b.path):o.value=y.path,t("update:modelValue",o.value))},p=y=>{var b;if(!(!y||(y==null?void 0:y.isDisabled))){if(i.list=i.list.slice(0,y.level),l.value=l.value.slice(0,y.level-1),(b=y.children)!=null&&b.length){i.list.push(y.children),l.value.push(y);return}if(n.config.isRemote&&!y.isLeaf){y.loading=!0;const M=L=>{n.appendNodes(L,y||null),i.list.push(y.children),l.value.push(y),y.loading=!1};n.config.remoteMethod(y,M)}}},v=y=>{const{trigger:b,checkAnyLevel:M,multiple:L}=y.config;return{onClick:A=>{(!y.isLeaf||L)&&A.stopPropagation(),b==="click"&&p(y),M&&!L&&m(y),y.isLeaf&&!L&&m(y)},onMouseenter:()=>{b==="hover"&&p(y)}}},C=y=>{const{multiple:b}=y.config;return{onClick:L=>{if(b){L.stopPropagation(),x(y,!y.checked);return}p(y),y.isLeaf&&!b&&m(y)}}},I=y=>(l.value[y.level-1]||{}).id===y.id,N=(y,b)=>{const{multiple:M}=y.config;return M?b.some(L=>ur(L,y.path)):ur(b,y.path)},x=(y,b)=>{y.setNodeCheck(b||!1),m(y)},T=y=>y.loading?a.createVNode(xs,{class:"icon-spinner"},null):a.createVNode(Mn,{class:"icon-angle-right"},null);return a.watch(()=>e.modelValue,y=>{f(y)},{immediate:!0}),a.watch(()=>e.store,y=>{i.list=[y.getNodes()]}),{menus:i,activePath:l,nodeExpandHandler:p,isNodeInPath:I,nodeEvent:v,isCheckedNode:N,checkValue:o,checkNode:x,iconRender:T,panelWidth:h,panelHeight:d,searchPanelEvents:C}},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 l,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(Ui,{disabled:i.isDisabled,modelValue:i.checked,"onUpdate:modelValue":c=>i.checked=c,indeterminate:i.isIndeterminate,onChange:c=>this.checkNode(i,c)},null),(o=(l=this.$slots).default)==null?void 0:o.call(l,{node:i,data:i.data}),i.isLeaf?"":this.iconRender(i)])})]))])}});function X9(e){return e.data.disabled?!0:e.level!==1?X9(e.parent):e.data.disabled}class al{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 l=this.data[i];this.children=(l||[]).map(o=>new al(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 X9(this)}broadcast(t,n){const i=`onParent${Io(t)}`;this.children.forEach(l=>{var o;l&&(l.broadcast(t,n),(o=l[i])==null||o.call(l,n))})}emit(t){var l;const{parent:n}=this,i=`onChild${Io(t)}`;n&&((l=n[i])==null||l.call(n),n.emit(t))}onParentCheck(t){this.isDisabled||this.setCheckState(t)}onChildCheck(){const{children:t}=this,n=t.filter(l=>!l.isDisabled),i=n.length?n.every(l=>l.checked):!1;this.setCheckState(i)}setCheckState(t){const n=this.children.length,i=this.children.reduce((l,o)=>{const c=o.isIndeterminate?.5:0,d=o.checked?1:c;return l+d},0);this.checked=t,this.isIndeterminate=i!==n&&i>0}setNodeCheck(t){if(this.checked!==t){if(this.config.checkAnyLevel){this.checked=t;return}this.broadcast("check",t),this.setCheckState(t),this.emit("check")}}calculateNodesPath(){const t=[this];let{parent:n}=this;for(;n;)t.unshift(n),n=n.parent;return t}}const K9=(e,t)=>e.reduce((n,i)=>(i.isLeaf?n.push(i):(!t&&n.push(i),n=n.concat(K9(i.children,t))),n),[]);class q9{constructor(t){const{list:n}=t;this.data=n,this.config=t,this.nodes=this.data.map(i=>new al(i,this.config))}getNodes(){return this.nodes}clearChecked(){this.getFlattedNodes().forEach(t=>{t.checked=!1,t.isIndeterminate=!1})}removeTag(t){this.getFlattedNodes().find(n=>ur(t,n.path)?(n.checked=!1,!0):!1)}getFlattedNodes(t=!1){return K9(this.nodes,t)}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getNodeByValue(t){var i;return(i=this.getFlattedNodes().filter(l=>ur(l.path,t))[0])!=null?i:null}getNodeById(t){return this.getFlattedNodes().find(n=>n.id===t)}appendNode(t,n){const i=new al(t,this.config,n);(n?n.children:this.nodes).push(i)}appendNodes(t,n){t.forEach(i=>this.appendNode(i,n))}}var qy=a.defineComponent({name:"Cascader",directives:{clickoutside:$n},components:{CascaderPanel:_c,BkPopover:ti},props:{modelValue:g.arrayOf(g.oneOfType([ko(),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:l,setHover:o,cancelHover:c}=S0(),d=a.ref(new q9(e)),h=a.ref(!1),f=a.ref(""),m=a.ref([]),{modelValue:p}=a.toRefs(e),v=a.ref(),C=a.ref(""),I=a.ref([]),N=a.ref(!1),x=a.computed({get:()=>p.value,set:E=>{t("update:modelValue",E)}}),T=a.ref(null),y=E=>e.showCompleteName?E.pathNames.join(n):E.pathNames[E.pathNames.length-1],b=()=>{C.value=f.value},M=E=>{var ee;if(i){m.value=d.value.getCheckedNodes().map(H=>({text:y(H),key:H.id}));return}if(!e.checkAnyLevel&&((ee=T==null?void 0:T.value)==null||ee.hide()),E.length===0)f.value="";else{const H=d.value.getNodeByValue(E);if(!H)return;f.value=y(H)}b()},L=E=>{E.stopPropagation(),d.value.clearChecked(),C.value="",M([]),t("update:modelValue",[]),t("clear",JSON.parse(JSON.stringify(e.modelValue)))},k=(E,ee,H)=>{H.stopPropagation();const le=JSON.parse(JSON.stringify(E)),de=le.splice(ee,1)[0];d.value.removeTag(de),M(le),t("update:modelValue",d.value.getCheckedNodes().map(he=>he.path))},A=(E,ee)=>{M(E),t("update:modelValue",E),ee!==void 0&&t("change",E)},O=()=>{d.value=new q9(e),M(e.modelValue)},J=E=>{t("toggle",E.isShow),E.isShow||(N.value=!1)},P=yf(200,E=>{const ee=E.target;if(C.value=ee.value,C.value===""){N.value=!1;return}N.value=!0;const H=d.value.getFlattedNodes().filter(le=>(e.checkAnyLevel||le.isLeaf)&&le.pathNames.join(e.separator).includes(C.value));I.value=H,!(T!=null&&T.value.isShow)&&(T==null||T.value.show())});return a.watch(()=>e.modelValue,A,{immediate:!0}),a.watch(()=>e.list,O,{deep:!0,immediate:!0}),{store:d,updateValue:M,panelShow:h,selectedText:f,checkedValue:x,handleClear:L,isHover:l,setHover:o,popover:T,cancelHover:c,selectedTags:m,removeTag:k,cascaderPanel:v,popoverChangeEmitter:J,searchKey:C,suggestions:I,isFiltering:N,searchInputHandler:P}},render(){const e=()=>this.clearable&&this.isHover?a.createVNode(wn,{class:"bk-icon-clear-icon",onClick:this.handleClear},null):a.createVNode(La,{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(An,{class:"bk-icon-clear-icon",onClick:l=>this.removeTag(this.modelValue,i,l)},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(ti,{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(_c,{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 eh=Rt(qy,{CascaderPanel:_c});var th=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),l=a.ref(0),o=a.ref(0),c=a.ref(0),d=a.ref(null),h=a.ref(e.modelValue),f=a.ref(0),m=a.ref(0),p=a.ref(!1),v=a.ref(null),C=a.computed(()=>{var J,P;let A="";if((J=e.params.customContent)!=null&&J[e.modelValue]){const E=e.params.customContent[e.modelValue];A=E.tip||E.label||""}const O=e.params.vertical?"right":"top";return(P=e.params)!=null&&P.showTip?{content:e.params.formatterTipLabel(`${A||(e==null?void 0:e.modelValue)||"0"}`),placement:O}:{content:"",placement:O}}),I=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),N=a.computed(()=>e.params.vertical?{bottom:I.value}:{left:I.value}),x=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),T=A=>{e.params.disable||(A.preventDefault(),y(A),Dr(window,"mousemove",b),Dr(window,"touchmove",b),Dr(window,"mouseup",M),Dr(window,"touchend",M))},y=A=>{n.value=!0,i.value=!0,e.params.vertical?l.value=A.clientY:o.value=A.clientX,c.value=parseFloat(I.value),d.value=c.value},b=A=>{if(n.value){i.value=!1,t("resetSize");let O=0;e.params.vertical?(f.value=A.clientY,O=(l.value-f.value)/e.params.sliderSize*100):(m.value=A.clientX,O=(m.value-o.value)/e.params.sliderSize*100),d.value=c.value+O,L(d.value)}},M=()=>{p.value=!1,n.value&&(setTimeout(()=>{n.value=!1,i.value||(L(d.value),t("emitChange"))},0),rl(window,"mousemove",b),rl(window,"touchmove",b),rl(window,"mouseup",M),rl(window,"touchend",M))},L=A=>{if(A===null||isNaN(A))return;A<0?d.value=0:A>100&&(d.value=100);const O=100/((e.params.maxValue-e.params.minValue)/e.params.step);let P=Math.round(A/O)*O*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;P=parseFloat(P.toFixed(e.params.precision)),t("update:modelValue",P),!n.value&&e.modelValue!==h.value&&(h.value=e.modelValue)};return{renderDom:()=>a.createVNode("div",{class:["bk-slider-button",e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],ref:v,tabindex:"0",style:N.value,onClick:A=>A.stopPropagation(),onMousedown:T},[Boolean(C.value.content)?a.createVNode(Os,{content:C.value.content,theme:"dark",placement:C.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:C}},render(){return this.renderDom()}});const Dr=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},rl=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)};var eC=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),l=a.ref(null),o=a.ref(null),c=a.ref(null),d=a.ref(0),h=a.ref(0),f=a.ref(null),m=a.ref(null),p=a.ref(null),v=a.ref(null),C=a.computed(()=>{const B=[e.minValue,e.maxValue,e.step].map(V=>{const $=`${V}`.split(".")[1];return $?$.length:0});return Math.max.apply(null,B)}),I=a.computed(()=>Math.min(l.value,o.value)),N=a.computed(()=>Math.max(l.value,o.value)),x=a.computed(()=>e.range?`${100*(N.value-I.value)/(e.maxValue-e.minValue)}%`:`${100*(l.value-e.minValue)/(e.maxValue-e.minValue)}%`),T=a.computed(()=>e.range?`${100*(I.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),y=a.computed(()=>e.vertical?{height:x.value,bottom:T.value}:{width:x.value,left:T.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 B=(e.maxValue-e.minValue)/e.step,V=100*e.step/(e.maxValue-e.minValue),$=[];for(let X=1;X<B;X++)$.push(X*V);return e.range?$.filter(X=>X<100*(I.value-e.minValue)/(e.maxValue-e.minValue)||X>100*(N.value-e.minValue)/(e.maxValue-e.minValue)):$.filter(X=>X>100*(l.value-e.minValue)/(e.maxValue-e.minValue))}),M=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 B=100*e.step/(e.maxValue-e.minValue),V=[];for(let $=e.minValue,X=0;$<=e.maxValue;$+=e.step,X++){const fe={stepWidth:X*B,stepLabel:e.formatterLabel($)};V.push(fe)}return V}),k=a.computed(()=>Array.isArray(e.modelValue)),A=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((B,V)=>Number(B)-Number(V)).filter(B=>Number(B)>=e.minValue&&Number(B)<=e.maxValue).map(B=>{const{tip:V}=e.customContent[B],{label:$}=e.customContent[B];return{tip:V||$||"",label:$||"",percent:(Number(B)-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:C.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{ee()}),a.watch(()=>l.value,B=>{e.range?n("update:modelValue",[I.value,N.value]):n("update:modelValue",B),d.value=B}),a.watch(()=>o.value,B=>{n("update:modelValue",[I.value,N.value]),h.value=B}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(l.value=Math.max(e.minValue,Number(e.modelValue[0])),o.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(l.value=e.minValue,o.value=e.maxValue),c.value=[l.value,o.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?l.value=e.minValue:l.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),c.value=l.value),J(),Dr(window,"resize",J())});const J=()=>{f.value&&(i.value=f.value[`client${e.vertical?"Height":"Width"}`])},P=B=>{var V,$;if(B.stopPropagation(),!e.disable){if(J(),e.vertical){const X=(V=f.value)==null?void 0:V.getBoundingClientRect().bottom;de((X-B.clientY)/i.value*100)}else{const X=($=f.value)==null?void 0:$.getBoundingClientRect().left;de((B.clientX-X)/i.value*100)}H()}},E=()=>e.range?![I.value,N.value].every((B,V)=>B===c.value[V]):e.modelValue!==c.value,ee=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const B=e.modelValue;e.range&&Array.isArray(B)?B[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):B[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):B[0]<e.minValue?n("update:modelValue",[e.minValue,B[1]]):B[1]>e.maxValue?n("update:modelValue",[B[0],e.maxValue]):(l.value=Number(B[0]),o.value=Number(B[1]),E()&&(c.value=B.slice())):!e.range&&typeof B=="number"&&!isNaN(B)&&(B<e.minValue?n("update:modelValue",e.minValue):B>e.maxValue?n("update:modelValue",e.maxValue):(l.value=B,E()&&(c.value=B)))},H=async()=>{await a.nextTick(),n("change",e.range?[I.value,N.value]:e.modelValue)},le=B=>e.vertical?{bottom:`${B}%`}:{left:`${B}%`},de=B=>{if(!e.range){m.value.setPosition(B);return}const V=e.minValue+B*(e.maxValue-e.minValue)/100;Math.abs(I.value-V)<Math.abs(N.value-V)?v.value=l.value<o.value?m.value:p.value:v.value=l.value>o.value?m.value:p.value,v.value.setPosition(B)},he=B=>{if(B==="")return;const V=parseFloat(B);V<e.minValue?(d.value=e.minValue,l.value=e.minValue):V>e.maxValue?(d.value=e.maxValue,l.value=e.maxValue):l.value=V},ye=B=>{if(B===""||typeof B=="number")return;const V=parseFloat(B);V<e.minValue?(h.value=e.minValue,o.value=e.minValue):V>e.maxValue?(h.value=e.maxValue,o.value=e.maxValue):o.value=V},re=B=>{let V=0;return B==="start"?V=e.vertical?e.maxValue:e.minValue:V=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[l.value,o.value].includes(V)?"0":"1"};return{renderDom:()=>{var B,V;return a.createVNode("div",{class:["bk-slider",e.extCls]},[(B=t.start)==null?void 0:B.call(t),a.createVNode("div",{class:"bk-slider-runway",ref:f,style:M.value,onClick:P},[a.createVNode("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:y.value},null),e.showInterval?b.value.map(($,X)=>a.createVNode("div",{key:X,class:["bk-slider-interval",{vertical:e.vertical}],style:le($)},null)):void 0,e.customContent?A.value.map(($,X)=>a.createVNode("div",{key:X,class:["bk-slider-interval",{vertical:e.vertical}],style:le($.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:re("start")}]},[e.formatterLabel(e.minValue)]),a.createVNode("div",{class:"label-end",style:[{opacity:re("end")}]},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return L.value.map(($,X)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:X,style:le($.stepWidth)},[$.stepLabel]));if(e.customContent)return A.value.map(($,X)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:X,style:le($.percent)},[$.label]))}()]):void 0,a.createVNode(th,{modelValue:l.value,"onUpdate:modelValue":$=>l.value=$,ref:m,params:O.value,onEmitChange:H,onResetSize:J},null),e.range?a.createVNode(th,{modelValue:o.value,"onUpdate:modelValue":$=>o.value=$,ref:p,params:O.value,onEmitChange:H,onResetSize:J},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:"bk-slider-input"},[a.createVNode("div",{class:"input-item"},[a.createVNode(Fi,{type:"number",modelValue:d.value,max:e.maxValue,min:e.minValue,onChange:he},null)]),k.value&&o.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("\uFF5E")]),a.createVNode("div",{class:"input-item"},[a.createVNode(Fi,{type:"number",modelValue:h.value,max:e.maxValue,min:e.minValue,onChange:ye},null)])]:void 0]):void 0,(V=t.end)==null?void 0:V.call(t)])}}},render(){return this.renderDom()}});const nh=Ge(eC);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:l,triggerWidth:o,max:c,min:d,immediate:h,autoMinimize:f}=a.toRefs(e),m=a.ref(!1),p=a.ref(!0),v=a.ref(!1),C=a.ref(null),I=a.ref({}),N=a.ref(null),x=a.ref(null),T=a.ref(null),y=a.ref(null),b=a.computed(()=>["left","right"].includes(n.value)),M=a.computed(()=>b.value?"width":"height"),L=a.computed(()=>{let re=i.value;return typeof re=="number"&&(re=`${re}px`),{[M.value]:re}}),k=a.computed(()=>({[`margin-${n.value}`]:`${l.value-o.value}px`,[M.value]:`${o.value}px`})),A=a.computed(()=>f.value?typeof f.value=="boolean"?50:f.value:0),O=()=>{const re=N.value.getBoundingClientRect();C.value=b.value?re.width:re.height},J=new ResizeObserver(O),P=()=>{switch(x.value.style.visibility="visible",n.value){case"left":x.value.style.inset=`0 auto auto ${I.value.aside.width}px`;break;case"right":x.value.style.inset=`0 ${I.value.aside.width}px auto auto`;break;case"top":x.value.style.inset=`${I.value.aside.height}px auto auto 0`;break;case"bottom":x.value.style.inset=`auto auto ${I.value.aside.height}px 0`;break}},E=()=>{T.value.style.display="block",T.value.style.cursor=b.value?"col-resize":"row-resize"},ee=re=>Math.min(c.value,Math.max(d.value,re),C.value-o.value),H=re=>{t("before-resize",re);const K=y.value.getBoundingClientRect();I.value=Object.freeze({mouse:{clientX:re.clientX,clientY:re.clientY},aside:{width:K.width,height:K.height}}),E(),h.value||P(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const B=X=>{t("resizing",X)},V=X=>{let fe;switch(n.value){case"top":fe=X.clientY-I.value.mouse.clientY;break;case"right":fe=I.value.mouse.clientX-X.clientX;break;case"bottom":fe=I.value.mouse.clientY-X.clientY;break;case"left":fe=X.clientX-I.value.mouse.clientX}const ce=I.value.aside[M.value]+fe,Ce=ee(ce)+l.value,Ee=`${Ce}px`;h.value?y.value.style[M.value]=Ee:x.value.style[n.value]=Ee,B(Ce)},$=()=>{if(x.value.style.visibility="hidden",T.value.style.display="none",document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",$),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{le(),t("after-resize",parseFloat(x.value.style[n.value]))}),h.value)return!1;y.value.style[M.value]=x.value.style[n.value]};document.addEventListener("mousemove",V),document.addEventListener("mouseup",$)},le=()=>{if(!f.value)return!1;const re=y.value.getBoundingClientRect();if(v.value=m.value=re[M.value]<=A.value,!v.value)return p.value=!0,!1;he(),a.nextTick(()=>{y.value.setAttribute(`data-${M.value}`,L.value[M.value])})},de=re=>{m.value=typeof re=="boolean"?re:!m.value,he(),t("collapse-change",m.value)},he=()=>{const re=y.value.getBoundingClientRect();ye(!m.value),m.value?(y.value.setAttribute(`data-${M.value}`,`${re[M.value]}px`),y.value.style[M.value]="5px"):(p.value=!0,y.value.style[M.value]=y.value.getAttribute(`data-${M.value}`))},ye=re=>{const K=()=>{p.value=re,y.value.style.transition="",y.value.removeEventListener("transitionend",K)};y.value.addEventListener("transitionend",K),y.value.style.transition=`${M.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};return a.onMounted(()=>{J.observe(N.value)}),a.onBeforeUnmount(()=>{J.unobserve(N.value)}),{collapsed:m,asideContentVisible:p,minimized:v,limitMax:C,state:I,vertical:b,cssPropKey:M,bkResizeLayoutRef:N,resizeProxyRef:x,resizeMaskRef:T,asideRef:y,triggerStyle:k,asideStyle:L,handleMousedown:H,setCollapse:de}},render(){var t,n,i,l,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&&(((l=(i=this.$slots)["collapse-trigger"])==null?void 0:l.call(i))||(this.collapsed?a.createVNode(Mn,{class:"bk-resize-collapse",onClick:this.setCollapse},null):a.createVNode(yi,{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 ih=Ge(tC),nC={list:g.array.def([]),titleAble:g.bool.def(!1),extCls:g.string};var iC=a.defineComponent({name:"Timeline",props:nC,emits:["select"],setup(e,{emit:t}){const n=a.ref([]),i=c=>{const d=[];c.forEach(h=>{var f;d.push({tag:h.tag,content:h.content,type:h.type,size:h.size,color:h.color,icon:h.icon,filled:h.filled,border:(f=h.border)!=null?f:!0})}),n.value.splice(0,n.value.length,...d)},l=()=>{var c;n.value.splice(0,n.value.length,{tag:"\u6B65\u9AA41",content:"\u5185\u5BB91"},{tag:"\u6B65\u9AA42",content:"\u5185\u5BB92"},{tag:"\u6B65\u9AA43",content:"\u5185\u5BB93"}),(c=e.list)!=null&&c.length&&i(e.list)},o=c=>{try{t("select",c)}catch(d){console.warn(d)}};return a.onMounted(l),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",l=["blue","red","green","yellow","gray"],o=n.type?`${i}-${n.type}`:`${i}-default`,c=n.size?`${i}-${n.size}`:"",d=n.filled?`${i}-filled`:"",h=n.color&&l.includes(n.color)?`${i}-${n.color}`:"";return Se({},`${i} ${o} ${c} ${h} ${d}`)};return a.createVNode("ul",{class:["bk-timeline",this.extCls]},[this.defaultTimelines.map(n=>{var i,l,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=(l=(i=this.$slots).default)==null?void 0:l.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 ah=Ge(iC),aC={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 rC=a.defineComponent({name:"BKProcess",props:aC,emits:["update:curProcess","click"],setup(e,{emit:t}){const n=a.ref([]),i=a.ref(0),l=()=>{var c;n.value.splice(0,n.value.length,{content:"\u6B65\u9AA41"},{content:"\u6B65\u9AA42"},{content:"\u6B65\u9AA43"},{content:"\u6B65\u9AA44"},{content:"\u6B65\u9AA45"}),(c=e.list)!=null&&c.length&&n.value.splice(0,n.value.length,...e.list)},o=async c=>{try{e.controllable&&c!==e.curProcess&&(t("update:curProcess",c),t("click",c))}catch(d){console.warn(d)}};return a.onMounted(l),{defaultProcessList:n,paddingBottom:i,jumpTo:o}},render(){const e="bk-process",t=Se({[`${this.extCls}`]:!!this.extCls},`${e}`),n=d=>d.status==="loading",i=d=>d.status==="error",l=d=>this.curProcess>=d+1||this.defaultProcessList[d].status==="done",o=d=>d.icon?d.icon:"",c=(d,h)=>d===this.curProcess-1&&n(h)?a.createVNode(Cs,{class:"bk-icon bk-process-icon icon-loading"},null):i(h)?a.createVNode(An,{class:"bk-process-icon"},null):l(d)?a.createVNode(ka,{class:"bk-process-icon-done"},null):a.createVNode("span",{class:"number"},[o(h)]);return a.createVNode("div",{class:t},[a.createVNode("ul",{style:{paddingBottom:`${this.paddingBottom}px`}},[this.defaultProcessList.map((d,h)=>a.createVNode("li",{onClick:()=>{this.jumpTo(h+1)},style:{cursor:this.controllable?"pointer":""},class:{success:this.curProcess>=h+1,current:n(d)&&h===this.curProcess-1}},[d[this.displayKey],c(h,d)]))])])}});const rh=Ge(rC),ia="bk-upload";var ri=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(ri||{}),Pa=(e=>(e.NEW="new",e.UPLOADING="uploading",e.SUCCESS="success",e.FAIL="fail",e))(Pa||{});const sh=[ri.BUTTON,ri.DRAGGABLE,ri.PICTURE];var si={theme:{type:String,default:"draggable",validator:e=>!e||sh.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of \u3010${sh.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,default:null},beforeRemove:{type:Function,default:null},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10}};function lh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var sC=a.defineComponent({name:"UploadList",props:{theme:si.theme,disabled:si.disabled,files:si.files,multiple:si.multiple},emits:["remove","retry"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:l,multiple:o}=a.toRefs(e),c=`${ia}-list`,d=a.computed(()=>i.value===ri.PICTURE),h=a.computed(()=>d.value&&!o.value),f=a.computed(()=>Se({[c]:!0,[`${c}--${i.value}`]:!0,[`${c}--disabled`]:l.value}));function m(y){const b=["Bytes","KB","MB","GB","TB"],M=Math.floor(Math.log(y)/Math.log(1024));return`${(y/1024**M).toFixed(2)}${b[M]}`}function p(y,b){n("remove",y,b)}function v(y,b){n("retry",y,b)}const C=()=>{let y;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},lh(y=e.files.map(b=>{const M=Se({[`${c}__item`]:!0,[`${c}__item-picture`]:!0,[`${c}__item--${b.status}`]:!0});return a.createVNode("li",{key:b.uid,class:M},[t!=null&&t.file?t.file(b):I(b)])}))?y:{default:()=>[y]})},I=y=>[a.withDirectives(a.createVNode("img",{src:y.url,class:`${c}__picture-item-thumbnail`,alt:""},null),[[a.vShow,y.status!=="uploading"]]),a.createVNode(a.Fragment,null,[y.status==="uploading"&&a.createVNode(wr,{class:`${c}__picture-item-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:y.percentage},null)]),a.createVNode(a.Fragment,null,[!l.value&&a.createVNode("div",{class:`${c}__picture-item-actions`},[a.createVNode(hr,{class:"action-icon",onClick:b=>p(y,b)},null)])])],N=()=>{let y;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},lh(y=e.files.map(b=>{const M=Se({[`${c}__item`]:!0,[`${c}__item--${b.status}`]:!0});return a.createVNode("li",{key:b.uid,class:M},[t!=null&&t.file?t.file(b):T(b)])}))?y:{default:()=>[y]})},x=y=>{var O;const b=(O=y==null?void 0:y.raw)==null?void 0:O.type,[M]=(b==null?void 0:b.split("/"))||"";let k={text:gr,image:Wo,application:gr,video:Fo,audio:zo}[M]||gr;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(b)&&(k=So),a.h(k,{class:`${c}__item-file-icon`})},T=y=>[a.createVNode("div",{class:`${c}__item-icon`},[y.isPic?a.createVNode("img",{src:y.url,class:`${c}__item-thumbnail`,alt:""},null):x(y)]),a.createVNode("div",{class:`${c}__item-summary`},[a.createVNode("div",{class:`${c}__item-name`,title:y.name},[y.name]),y.status!=="uploading"&&a.createVNode("div",{class:`${c}__item-message`,title:y.statusText},[y.status==="success"&&a.createVNode("span",null,[a.createVNode(ka,{class:`${c}__item-message-success-icon`},null),y.statusText||"\u4E0A\u4F20\u6210\u529F"]),y.status==="fail"&&a.createVNode("span",null,[y.statusText||"\u4E0A\u4F20\u5931\u8D25"])]),y.status==="uploading"&&a.createVNode(wr,{class:`${c}__item-progress`,showText:!1,percent:y.percentage,size:"small"},null),y.status!=="fail"&&a.createVNode("div",{class:`${c}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-size`},[m(y.size)]),[[a.vShow,y.size]]),a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-percentage`},[y.percentage,a.createTextVNode("%")]),[[a.vShow,y.status==="uploading"]])]),!l.value&&a.createVNode("div",{class:`${c}__item-actions`},[y.status==="fail"&&a.createVNode(Bo,{class:`${c}__item-retry-icon`,onClick:b=>v(y,b)},null),a.createVNode(hr,{class:`${c}__item-del-icon`,onClick:b=>p(y,b)},null)])])];return()=>{var y;return a.createVNode(a.Fragment,null,[h.value?(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger((y=e.files)==null?void 0:y[0])):a.createVNode("ul",{class:f.value},[d.value?C():N(),(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger())])])}}}),oh=a.defineComponent({name:"UploadTrigger",props:{theme:si.theme,disabled:si.disabled,multiple:si.multiple,accept:si.accept,file:{type:Object,default:null}},emits:["change","remove"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:l,file:o,multiple:c,accept:d}=a.toRefs(e),h=`${ia}-trigger`,f=a.computed(()=>i.value===ri.BUTTON),m=a.computed(()=>i.value===ri.DRAGGABLE),p=a.computed(()=>i.value===ri.PICTURE),v=a.computed(()=>p.value&&!c.value),C=a.computed(()=>p.value&&!d.value?"image/png,image/jpeg,image/jpg":d.value),I=a.ref(null),N=a.computed(()=>{var ee,H,le;return Se({[h]:!0,[`${h}--${i.value}`]:!0,[`${h}--single-picture`]:v.value,[`${h}--has-file`]:(ee=o.value)!=null?ee:!1,[`${h}--${(H=o.value)==null?void 0:H.status}`]:(le=o.value)!=null?le:!1,[`${h}--dragover`]:L.value,[`${h}--disabled`]:l.value})}),x=()=>{I.value.value=null,I.value.click()},T=ee=>{const{files:H}=ee.target;n("change",Array.from(H))},y=()=>{e.disabled||x()},b=ee=>{ee.defaultPrevented||ee.target!==ee.currentTarget||((ee.code==="Enter"||ee.code==="Space")&&x(),ee.preventDefault())};function M(ee,H){n("remove",ee,H),H.stopPropagation(),H.preventDefault()}const L=a.ref(!1),k=()=>{const ee=he=>{if(l.value)return;he.preventDefault(),L.value=!1;const ye=Array.from(he.dataTransfer.files);if(!C.value){n("change",ye);return}const re=ye.filter(K=>{const{type:B,name:V}=K,$=V.includes(".")?`.${V.split(".").pop()}`:"",X=B.replace(/\/.*$/,"");return C.value.split(",").map(fe=>fe.trim()).filter(fe=>fe).some(fe=>fe.startsWith(".")?$===fe:/\/\*$/.test(fe)?X===fe.replace(/\/\*$/,""):/^[^/]+\/[^/]+$/.test(fe)?B===fe:!1)});n("change",re)},H=he=>{he.preventDefault(),L.value=!0},le=()=>{L.value=!1},de=Se({[`${h}__draggable`]:!0});return a.createVNode("div",{class:de,onDrop:ee,onDragover:H,onDragleave:le},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Ds,{class:`${h}__draggable-icon`},null),a.createVNode("div",{class:`${h}__draggable-text`},[a.createTextVNode("\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904\u6216"),a.createVNode("span",{class:`${h}__draggable-upload-link`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])])])},A=()=>a.createVNode(a.Fragment,null,[v.value&&e.file?J(e.file):O()]),O=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${h}__picture-inner`},[a.createVNode(Ls,{class:`${h}__picture-icon`},null),a.createVNode("div",{class:`${h}__picture-text`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])]),J=ee=>[a.withDirectives(a.createVNode("img",{src:ee.url,class:`${h}__picture-thumbnail`,alt:""},null),[[a.vShow,ee.status!=="uploading"]]),a.createVNode(a.Fragment,null,[ee.status==="uploading"&&a.createVNode(wr,{class:`${h}__picture-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:ee.percentage},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${h}__picture-actions`},[a.createVNode(hr,{class:"action-icon",onClick:H=>M(ee,H)},null)])])],P=()=>a.createVNode(Wt,{disabled:l.value},{default:()=>[a.createVNode(Ds,{class:`${h}__button-icon`},null),a.createVNode("span",{class:`${h}__button-text`},[a.createTextVNode("\u4E0A\u4F20\u6587\u4EF6")])]}),E=()=>{if(f.value)return P();if(m.value)return k();if(p.value)return A()};return()=>{var ee;return a.createVNode("div",{class:N.value,tabindex:"0",onClick:y,onKeydown:b},[t.trigger?[t.trigger(),(ee=t==null?void 0:t.default)==null?void 0:ee.call(t)]:E(),a.createVNode("input",{ref:I,class:"bk-upload__input-file",tabindex:"-1",onChange:T,accept:C.value,multiple:c.value,disabled:l.value,type:"file"},null)])}}}),ch={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 l(T,y){var b=T[0],M=T[1],L=T[2],k=T[3];b+=(M&L|~M&k)+y[0]-680876936|0,b=(b<<7|b>>>25)+M|0,k+=(b&M|~b&L)+y[1]-389564586|0,k=(k<<12|k>>>20)+b|0,L+=(k&b|~k&M)+y[2]+606105819|0,L=(L<<17|L>>>15)+k|0,M+=(L&k|~L&b)+y[3]-1044525330|0,M=(M<<22|M>>>10)+L|0,b+=(M&L|~M&k)+y[4]-176418897|0,b=(b<<7|b>>>25)+M|0,k+=(b&M|~b&L)+y[5]+1200080426|0,k=(k<<12|k>>>20)+b|0,L+=(k&b|~k&M)+y[6]-1473231341|0,L=(L<<17|L>>>15)+k|0,M+=(L&k|~L&b)+y[7]-45705983|0,M=(M<<22|M>>>10)+L|0,b+=(M&L|~M&k)+y[8]+1770035416|0,b=(b<<7|b>>>25)+M|0,k+=(b&M|~b&L)+y[9]-1958414417|0,k=(k<<12|k>>>20)+b|0,L+=(k&b|~k&M)+y[10]-42063|0,L=(L<<17|L>>>15)+k|0,M+=(L&k|~L&b)+y[11]-1990404162|0,M=(M<<22|M>>>10)+L|0,b+=(M&L|~M&k)+y[12]+1804603682|0,b=(b<<7|b>>>25)+M|0,k+=(b&M|~b&L)+y[13]-40341101|0,k=(k<<12|k>>>20)+b|0,L+=(k&b|~k&M)+y[14]-1502002290|0,L=(L<<17|L>>>15)+k|0,M+=(L&k|~L&b)+y[15]+1236535329|0,M=(M<<22|M>>>10)+L|0,b+=(M&k|L&~k)+y[1]-165796510|0,b=(b<<5|b>>>27)+M|0,k+=(b&L|M&~L)+y[6]-1069501632|0,k=(k<<9|k>>>23)+b|0,L+=(k&M|b&~M)+y[11]+643717713|0,L=(L<<14|L>>>18)+k|0,M+=(L&b|k&~b)+y[0]-373897302|0,M=(M<<20|M>>>12)+L|0,b+=(M&k|L&~k)+y[5]-701558691|0,b=(b<<5|b>>>27)+M|0,k+=(b&L|M&~L)+y[10]+38016083|0,k=(k<<9|k>>>23)+b|0,L+=(k&M|b&~M)+y[15]-660478335|0,L=(L<<14|L>>>18)+k|0,M+=(L&b|k&~b)+y[4]-405537848|0,M=(M<<20|M>>>12)+L|0,b+=(M&k|L&~k)+y[9]+568446438|0,b=(b<<5|b>>>27)+M|0,k+=(b&L|M&~L)+y[14]-1019803690|0,k=(k<<9|k>>>23)+b|0,L+=(k&M|b&~M)+y[3]-187363961|0,L=(L<<14|L>>>18)+k|0,M+=(L&b|k&~b)+y[8]+1163531501|0,M=(M<<20|M>>>12)+L|0,b+=(M&k|L&~k)+y[13]-1444681467|0,b=(b<<5|b>>>27)+M|0,k+=(b&L|M&~L)+y[2]-51403784|0,k=(k<<9|k>>>23)+b|0,L+=(k&M|b&~M)+y[7]+1735328473|0,L=(L<<14|L>>>18)+k|0,M+=(L&b|k&~b)+y[12]-1926607734|0,M=(M<<20|M>>>12)+L|0,b+=(M^L^k)+y[5]-378558|0,b=(b<<4|b>>>28)+M|0,k+=(b^M^L)+y[8]-2022574463|0,k=(k<<11|k>>>21)+b|0,L+=(k^b^M)+y[11]+1839030562|0,L=(L<<16|L>>>16)+k|0,M+=(L^k^b)+y[14]-35309556|0,M=(M<<23|M>>>9)+L|0,b+=(M^L^k)+y[1]-1530992060|0,b=(b<<4|b>>>28)+M|0,k+=(b^M^L)+y[4]+1272893353|0,k=(k<<11|k>>>21)+b|0,L+=(k^b^M)+y[7]-155497632|0,L=(L<<16|L>>>16)+k|0,M+=(L^k^b)+y[10]-1094730640|0,M=(M<<23|M>>>9)+L|0,b+=(M^L^k)+y[13]+681279174|0,b=(b<<4|b>>>28)+M|0,k+=(b^M^L)+y[0]-358537222|0,k=(k<<11|k>>>21)+b|0,L+=(k^b^M)+y[3]-722521979|0,L=(L<<16|L>>>16)+k|0,M+=(L^k^b)+y[6]+76029189|0,M=(M<<23|M>>>9)+L|0,b+=(M^L^k)+y[9]-640364487|0,b=(b<<4|b>>>28)+M|0,k+=(b^M^L)+y[12]-421815835|0,k=(k<<11|k>>>21)+b|0,L+=(k^b^M)+y[15]+530742520|0,L=(L<<16|L>>>16)+k|0,M+=(L^k^b)+y[2]-995338651|0,M=(M<<23|M>>>9)+L|0,b+=(L^(M|~k))+y[0]-198630844|0,b=(b<<6|b>>>26)+M|0,k+=(M^(b|~L))+y[7]+1126891415|0,k=(k<<10|k>>>22)+b|0,L+=(b^(k|~M))+y[14]-1416354905|0,L=(L<<15|L>>>17)+k|0,M+=(k^(L|~b))+y[5]-57434055|0,M=(M<<21|M>>>11)+L|0,b+=(L^(M|~k))+y[12]+1700485571|0,b=(b<<6|b>>>26)+M|0,k+=(M^(b|~L))+y[3]-1894986606|0,k=(k<<10|k>>>22)+b|0,L+=(b^(k|~M))+y[10]-1051523|0,L=(L<<15|L>>>17)+k|0,M+=(k^(L|~b))+y[1]-2054922799|0,M=(M<<21|M>>>11)+L|0,b+=(L^(M|~k))+y[8]+1873313359|0,b=(b<<6|b>>>26)+M|0,k+=(M^(b|~L))+y[15]-30611744|0,k=(k<<10|k>>>22)+b|0,L+=(b^(k|~M))+y[6]-1560198380|0,L=(L<<15|L>>>17)+k|0,M+=(k^(L|~b))+y[13]+1309151649|0,M=(M<<21|M>>>11)+L|0,b+=(L^(M|~k))+y[4]-145523070|0,b=(b<<6|b>>>26)+M|0,k+=(M^(b|~L))+y[11]-1120210379|0,k=(k<<10|k>>>22)+b|0,L+=(b^(k|~M))+y[2]+718787259|0,L=(L<<15|L>>>17)+k|0,M+=(k^(L|~b))+y[9]-343485551|0,M=(M<<21|M>>>11)+L|0,T[0]=b+T[0]|0,T[1]=M+T[1]|0,T[2]=L+T[2]|0,T[3]=k+T[3]|0}function o(T){var y=[],b;for(b=0;b<64;b+=4)y[b>>2]=T.charCodeAt(b)+(T.charCodeAt(b+1)<<8)+(T.charCodeAt(b+2)<<16)+(T.charCodeAt(b+3)<<24);return y}function c(T){var y=[],b;for(b=0;b<64;b+=4)y[b>>2]=T[b]+(T[b+1]<<8)+(T[b+2]<<16)+(T[b+3]<<24);return y}function d(T){var y=T.length,b=[1732584193,-271733879,-1732584194,271733878],M,L,k,A,O,J;for(M=64;M<=y;M+=64)l(b,o(T.substring(M-64,M)));for(T=T.substring(M-64),L=T.length,k=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=0;M<L;M+=1)k[M>>2]|=T.charCodeAt(M)<<(M%4<<3);if(k[M>>2]|=128<<(M%4<<3),M>55)for(l(b,k),M=0;M<16;M+=1)k[M]=0;return A=y*8,A=A.toString(16).match(/(.*?)(.{0,8})$/),O=parseInt(A[2],16),J=parseInt(A[1],16)||0,k[14]=O,k[15]=J,l(b,k),b}function h(T){var y=T.length,b=[1732584193,-271733879,-1732584194,271733878],M,L,k,A,O,J;for(M=64;M<=y;M+=64)l(b,c(T.subarray(M-64,M)));for(T=M-64<y?T.subarray(M-64):new Uint8Array(0),L=T.length,k=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=0;M<L;M+=1)k[M>>2]|=T[M]<<(M%4<<3);if(k[M>>2]|=128<<(M%4<<3),M>55)for(l(b,k),M=0;M<16;M+=1)k[M]=0;return A=y*8,A=A.toString(16).match(/(.*?)(.{0,8})$/),O=parseInt(A[2],16),J=parseInt(A[1],16)||0,k[14]=O,k[15]=J,l(b,k),b}function f(T){var y="",b;for(b=0;b<4;b+=1)y+=i[T>>b*8+4&15]+i[T>>b*8&15];return y}function m(T){var y;for(y=0;y<T.length;y+=1)T[y]=f(T[y]);return T.join("")}m(d("hello")),typeof ArrayBuffer!="undefined"&&!ArrayBuffer.prototype.slice&&function(){function T(y,b){return y=y|0||0,y<0?Math.max(y+b,0):Math.min(y,b)}ArrayBuffer.prototype.slice=function(y,b){var M=this.byteLength,L=T(y,M),k=M,A,O,J,P;return b!==n&&(k=T(b,M)),L>k?new ArrayBuffer(0):(A=k-L,O=new ArrayBuffer(A),J=new Uint8Array(O),P=new Uint8Array(this,L,A),J.set(P),O)}}();function p(T){return/[\u0080-\uFFFF]/.test(T)&&(T=unescape(encodeURIComponent(T))),T}function v(T,y){var b=T.length,M=new ArrayBuffer(b),L=new Uint8Array(M),k;for(k=0;k<b;k+=1)L[k]=T.charCodeAt(k);return y?L:M}function C(T){return String.fromCharCode.apply(null,new Uint8Array(T))}function I(T,y,b){var M=new Uint8Array(T.byteLength+y.byteLength);return M.set(new Uint8Array(T)),M.set(new Uint8Array(y),T.byteLength),b?M:M.buffer}function N(T){var y=[],b=T.length,M;for(M=0;M<b-1;M+=2)y.push(parseInt(T.substr(M,2),16));return String.fromCharCode.apply(String,y)}function x(){this.reset()}return x.prototype.append=function(T){return this.appendBinary(p(T)),this},x.prototype.appendBinary=function(T){this._buff+=T,this._length+=T.length;var y=this._buff.length,b;for(b=64;b<=y;b+=64)l(this._hash,o(this._buff.substring(b-64,b)));return this._buff=this._buff.substring(b-64),this},x.prototype.end=function(T){var y=this._buff,b=y.length,M,L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],k;for(M=0;M<b;M+=1)L[M>>2]|=y.charCodeAt(M)<<(M%4<<3);return this._finish(L,b),k=m(this._hash),T&&(k=N(k)),this.reset(),k},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(T){return this._buff=T.buff,this._length=T.length,this._hash=T.hash,this},x.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},x.prototype._finish=function(T,y){var b=y,M,L,k;if(T[b>>2]|=128<<(b%4<<3),b>55)for(l(this._hash,T),b=0;b<16;b+=1)T[b]=0;M=this._length*8,M=M.toString(16).match(/(.*?)(.{0,8})$/),L=parseInt(M[2],16),k=parseInt(M[1],16)||0,T[14]=L,T[15]=k,l(this._hash,T)},x.hash=function(T,y){return x.hashBinary(p(T),y)},x.hashBinary=function(T,y){var b=d(T),M=m(b);return y?N(M):M},x.ArrayBuffer=function(){this.reset()},x.ArrayBuffer.prototype.append=function(T){var y=I(this._buff.buffer,T,!0),b=y.length,M;for(this._length+=T.byteLength,M=64;M<=b;M+=64)l(this._hash,c(y.subarray(M-64,M)));return this._buff=M-64<b?new Uint8Array(y.buffer.slice(M-64)):new Uint8Array(0),this},x.ArrayBuffer.prototype.end=function(T){var y=this._buff,b=y.length,M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],L,k;for(L=0;L<b;L+=1)M[L>>2]|=y[L]<<(L%4<<3);return this._finish(M,b),k=m(this._hash),T&&(k=N(k)),this.reset(),k},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 T=x.prototype.getState.call(this);return T.buff=C(T.buff),T},x.ArrayBuffer.prototype.setState=function(T){return T.buff=v(T.buff,!0),x.prototype.setState.call(this,T)},x.ArrayBuffer.prototype.destroy=x.prototype.destroy,x.ArrayBuffer.prototype._finish=x.prototype._finish,x.ArrayBuffer.hash=function(T,y){var b=h(new Uint8Array(T)),M=m(b);return y?N(M):M},x})})(ch);var uh=ch.exports;function Yc(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const lC=e=>{if(typeof XMLHttpRequest=="undefined")throw new Error("XMLHttpRequest is undefined");const t=new XMLHttpRequest,{action:n}=e;t.upload&&t.upload.addEventListener("progress",o=>{const c=o;c.percent=o.total>0?o.loaded/o.total*100:0,e.onProgress(c)});const i=new FormData;if(e.data){let o=e.data;Array.isArray(o)||(o=[o]),o.forEach(c=>{for(const[d,h]of Object.entries(c))Array.isArray(h)?i.append(d,...h):i.append(d,h)})}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(Yc(t))}),t.addEventListener("loadend",()=>{e.onComplete()}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0),e.header)if(Array.isArray(e.header))e.header.forEach(o=>{const c=o.name,d=o.value;t.setRequestHeader(c,d)});else{const o=e.header.name,c=e.header.value;t.setRequestHeader(o,c)}const l=e.headers||{};if(l instanceof Headers)l.forEach((o,c)=>t.setRequestHeader(c,o));else for(const[o,c]of Object.entries(l))Kd(c)||t.setRequestHeader(o,String(c));return t.send(i),t},dh=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,oC=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),l=await uC(n,t),o=[];cC(e,n,i,l,o,t),await Promise.all(o).then(()=>{const c={size:n.size,name:n.name,total:i,hash:l},d=new XMLHttpRequest;d.open(e.method,e.mergeUrl,!0),d.onreadystatechange=()=>{if(d.readyState===4){if(d.status<200||d.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(Yc(d))}},d.onloadend=()=>{e.onComplete()},d.setRequestHeader("Content-type","application/JSON"),d.send(JSON.stringify(c))})},cC=(e,t,n,i,l,o)=>{for(let c=0;c<n;c++){const d=new Promise((h,f)=>{const m=c*o,p=Math.min(t.size,m+o),v=new FormData;if(e.data){let N=e.data;Array.isArray(N)||(N=[N]),N.forEach(x=>{for(const[T,y]of Object.entries(x))Array.isArray(y)?v.append(T,...y):v.append(T,y)})}if(e.formDataAttributes){let N=e.formDataAttributes;Array.isArray(N)||(N=[N]),N.forEach(x=>{Array.isArray(x.value)?v.append(x.name,...x.value):v.append(x.name,x.value)})}v.append("file",dh.call(t,m,p)),v.append("name",t.name),v.append("total",n.toString()),v.append("index",c.toString()),v.append("size",t.size.toString()),v.append("hash",i.toString());const C=new XMLHttpRequest;if(C.onreadystatechange=()=>{if(C.readyState===4){const N=Yc(C);C.status<200||C.status>=300?(f(N),e.onError(new Error("An error occurred during upload"))):h("reponseText")}},C.upload.addEventListener("progress",N=>{const x=N;e.onProgress(x,c)},!1),e.withCredentials&&"withCredentials"in C&&(C.withCredentials=!0),C.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(N=>{const x=N.name,T=N.value;C.setRequestHeader(x,T)});else{const N=e.header.name,x=e.header.value;C.setRequestHeader(N,x)}const I=e.headers||{};if(I instanceof Headers)I.forEach((N,x)=>C.setRequestHeader(x,N));else for(const[N,x]of Object.entries(I))Kd(x)||C.setRequestHeader(N,String(x));C.send(v)});l.push(d)}},uC=(e,t)=>new Promise((n,i)=>{const l=Math.ceil(e.size/t);let o=0;const c=new uh.ArrayBuffer,d=new FileReader;function h(){const f=o*t,m=f+t>=e.size?e.size:f+t;d.readAsArrayBuffer(dh.call(e,f,m))}d.onload=f=>{if(c.append(f.target.result),o+=1,o<l)h();else{const m=c.end(),p=new uh;p.append(m),p.append(e.name);const v=p.end();n(v)}},d.onerror=()=>{i(new Error("File slcie failed"))},h()}).catch(n=>{console.log(n)});function fh(e){return Date.now()+e}var dC=(e,t)=>{const n=a.computed(()=>{var v;return typeof e.size=="number"?e.size:(v=e==null?void 0:e.size)==null?void 0:v.maxImgSize}),i=a.computed(()=>{var v;return typeof e.size=="number"?e.size:(v=e==null?void 0:e.size)==null?void 0:v.maxImgSize}),l=a.ref([]);function o(v){return l.value.find(C=>C.uid===v.uid)}let c=0;function d(v){var x;c+=1,v.uid=fh(c);const C={uid:v.uid,name:v.name,status:Pa.NEW,size:v.size,raw:v},I=v.type.startsWith("image/");let N=null;if(I){try{C.url=window.URL.createObjectURL(v)}catch(T){console.error(T)}C.isPic=!0}return e.validateName&&!((x=e.validateName)!=null&&x.test(C.name))&&(C.status=Pa.FAIL,C.statusText="invalid filename",N=new Error(C.statusText)),I&&v.size>n.value*1024**2&&(C.status=Pa.FAIL,C.statusText="invalid file size",N=new Error(C.statusText)),!I&&v.size>i.value*1024**2&&(C.status=Pa.FAIL,C.statusText="invalid file size",N=new Error(C.statusText)),l.value.push(C),N}async function h(v){var N;const C=v instanceof File?o(v):v,I=x=>{var T;t.onRemove(x,l.value),l.value.splice(l.value.indexOf(C),1),(T=x.url)!=null&&T.startsWith("blob:")&&URL.revokeObjectURL(x.url)};e.beforeRemove?await((N=e.beforeRemove)==null?void 0:N.call(e,C,l.value))!==!1&&I(C):I(C)}async function f(v,C){const I=o(C);!I||(I.status="fail",I.statusText=v.message)}async function m(v,C){const I=o(C);!I||(I.status="success",I.response=v)}async function p(v,C){const I=o(C);!I||(I.status="uploading",I.percentage=Math.round(v.percent))}return a.watch(()=>e.files,v=>{l.value=v.map(C=>{var I,N;return c+=1,Te(F({},C),{uid:(I=C.uid)!=null?I:fh(c),status:(N=C.status)!=null?N:Pa.SUCCESS})})},{immediate:!0,deep:!0}),{fileList:l,handlePreprocess:d,handleRemove:h,handleError:f,handleSuccess:m,handleProgress:p}},fC=a.defineComponent({name:"Upload",props:si,emits:["exceed","progress","success","error","delete","done"],setup(e,{slots:t,emit:n}){const i=a.shallowRef({}),l=a.computed(()=>e.theme===ri.PICTURE),o=a.computed(()=>l.value&&!e.multiple),c=a.computed(()=>{var M;return Se({[ia]:!0,[`${ia}--${e.theme}`]:!0,[`${ia}--disabled`]:e.disabled,[`${ia}--single-picture`]:o.value,[e.extCls]:(M=e.extCls)!=null?M:!1})}),d={theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept};function h(M,L){b(M),n("delete",M,L)}const{fileList:f,handlePreprocess:m,handleRemove:p,handleProgress:v,handleSuccess:C,handleError:I}=dC(e,{onRemove:h});function N(M){if(!M.length)return;if(e.limit&&f.value.length+M.length>e.limit){n("exceed",M,f.value);return}let L=M;(!e.multiple||e.limit===1)&&(L=M.slice(0,1));for(const k of L){const A=k,O=m(A);if(O){n("error",A,f.value,O);return}e.autoUpload&&T(A,L)}}function x(M){y(M.raw)}async function T(M,L){var A;if(!e.beforeUpload)return y(M,L);let k;try{k=await((A=e.beforeUpload)==null?void 0:A.call(e,M))}catch{k=!1}if(k===!1){p(M);return}y(M,L)}function y(M,L){const{headers:k,header:A,data:O,formDataAttributes:J,method:P,withCredentials:E,name:ee,url:H,sliceUrl:le,mergeUrl:de,chunkSize:he,customRequest:ye}=e,{uid:re}=M,K={headers:k,header:A,withCredentials:E,file:M,data:O,formDataAttributes:J,method:P,filename:ee,action:H,sliceUrl:le,mergeUrl:de,chunkSize:he,onProgress:$=>{v($,M),n("progress",$,M,f.value)},onSuccess:$=>{var fe;const X=$;if((fe=e==null?void 0:e.handleResCode)!=null&&fe.call(e,X))C($,M),n("success",$,M,f.value);else{const ce=new Error((X==null?void 0:X.message)||"unknow error");I(ce,M),n("error",M,f.value,ce)}delete i.value[re]},onError:$=>{I($,M),n("error",M,f.value,$),delete i.value[re]},onComplete:()=>{L&&L.indexOf(M)===L.length-1&&n("done",f.value)}};let B=e.sliceUpload?oC:lC;ye&&(B=ye);const V=B(K);i.value[re]=V,V instanceof Promise&&V.then(K.onSuccess,K.onError)}function b(M){let L=i.value;M&&(L={[M.uid]:i.value[M.uid]}),Object.keys(L).forEach(k=>{if(L[k]instanceof XMLHttpRequest){const A=L[k];A==null||A.abort()}delete i.value[k]})}return a.onBeforeUnmount(()=>{f.value.forEach(({url:M})=>{M!=null&&M.startsWith("blob:")&&URL.revokeObjectURL(M)})}),()=>a.createVNode("div",{class:c.value},[!l.value&&a.createVNode(oh,a.mergeProps(d,{onChange:N}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${ia}__tip`},[e.tip]),a.createVNode(sC,{files:f.value,theme:e.theme,disabled:e.disabled,multiple:e.multiple,onRemove:p,onRetry:x},{innerTrigger:M=>l.value&&a.createVNode(oh,a.mergeProps(d,{file:M,onChange:N,onRemove:p}),t)})])}});const hh=Ge(fC);function Di(){}Di.prototype={diff:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=i.callback;typeof i=="function"&&(l=i,i={}),this.options=i;var o=this;function c(N){return l?(setTimeout(function(){l(void 0,N)},0),!0):N}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var d=n.length,h=t.length,f=1,m=d+h,p=[{newPos:-1,components:[]}],v=this.extractCommon(p[0],n,t,0);if(p[0].newPos+1>=d&&v+1>=h)return c([{value:this.join(n),count:n.length}]);function C(){for(var N=-1*f;N<=f;N+=2){var x=void 0,T=p[N-1],y=p[N+1],b=(y?y.newPos:0)-N;T&&(p[N-1]=void 0);var M=T&&T.newPos+1<d,L=y&&0<=b&&b<h;if(!M&&!L){p[N]=void 0;continue}if(!M||L&&T.newPos<y.newPos?(x=gC(y),o.pushComponent(x.components,void 0,!0)):(x=T,x.newPos++,o.pushComponent(x.components,!0,void 0)),b=o.extractCommon(x,n,t,N),x.newPos+1>=d&&b+1>=h)return c(hC(o,x.components,n,t,o.useLongestToken));p[N]=x}f++}if(l)(function N(){setTimeout(function(){if(f>m)return l();C()||N()},0)})();else for(;f<=m;){var I=C();if(I)return I}},pushComponent:function(t,n,i){var l=t[t.length-1];l&&l.added===n&&l.removed===i?t[t.length-1]={count:l.count+1,added:n,removed:i}:t.push({count:1,added:n,removed:i})},extractCommon:function(t,n,i,l){for(var o=n.length,c=i.length,d=t.newPos,h=d-l,f=0;d+1<o&&h+1<c&&this.equals(n[d+1],i[h+1]);)d++,h++,f++;return f&&t.components.push({count:f}),t.newPos=d,h},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 hC(e,t,n,i,l){for(var o=0,c=t.length,d=0,h=0;o<c;o++){var f=t[o];if(f.removed){if(f.value=e.join(i.slice(h,h+f.count)),h+=f.count,o&&t[o-1].added){var p=t[o-1];t[o-1]=t[o],t[o]=p}}else{if(!f.added&&l){var m=n.slice(d,d+f.count);m=m.map(function(C,I){var N=i[h+I];return N.length>C.length?N:C}),f.value=e.join(m)}else f.value=e.join(n.slice(d,d+f.count));d+=f.count,f.added||(h+=f.count)}}var v=t[c-1];return c>1&&typeof v.value=="string"&&(v.added||v.removed)&&e.equals("",v.value)&&(t[c-2].value+=v.value,t.pop()),t}function gC(e){return{newPos:e.newPos,components:e.components.slice(0)}}var gh=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,mh=/\S/,ph=new Di;ph.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!mh.test(e)&&!mh.test(t)},ph.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]&&gh.test(t[n])&&gh.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var Fc=new Di;Fc.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 l=n[i];i%2&&!this.options.newlineIsToken?t[t.length-1]+=l:(this.options.ignoreWhitespace&&(l=l.trim()),t.push(l))}return t};function mC(e,t,n){return Fc.diff(e,t,n)}var pC=new Di;pC.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var bC=new Di;bC.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function sl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?sl=function(t){return typeof t}:sl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sl(e)}function Uc(e){return yC(e)||CC(e)||MC(e)||wC()}function yC(e){if(Array.isArray(e))return $c(e)}function CC(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function MC(e,t){if(!!e){if(typeof e=="string")return $c(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 $c(e,t)}}function $c(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 wC(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
57
+ `,O={d:A,stroke:m||"#f5f5f5","stroke-linecap":d,"stroke-width":v,"fill-opacity":"0",class:"process-circle-trail",style:L},J={d:A,stroke:c||"#13ce66","stroke-linecap":d,"stroke-width":l>0&&v||0,"fill-opacity":"0",class:`process-circle-path bk-${h}-circle-trail`,style:k};return a.createVNode("div",{class:"progress-outer-circle",style:I},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",O,null),a.createVNode("path",J,null)]),a.createVNode("span",{class:"progress-circle-text",style:p},[n==null?void 0:n.default()])])},Gm=(e,{attrs:t,slots:n})=>{const{percent:i,strokeWidth:l,size:o,color:c,titleStyle:d,showText:h,textInside:f,theme:m}=t,p={height:`${l}px`,lineHeight:`${l}px`},v={width:`${i}%`,background:c,animationDuration:"3s"},C=(I=!0)=>(h||n.default)&&(I&&f||!I&&!f)?n==null?void 0:n.default():null;return a.createVNode("div",{class:"progress-outer"},[a.createVNode("div",{class:`bk-progress-${o||"normal"} progress-bar`,style:p},[a.createVNode("div",{style:v,class:{"progress-inner":!0,[`bk-${m}`]:!0}},[a.createVNode("div",{class:"inner-text",style:d},[C()])])]),C(!1)])};function w0(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var _m=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 d;const{showText:e,format:t,percent:n,textInside:i,titleStyle:l,fixed:o}=this.$props,c=t((d=this.validPercent(n))==null?void 0:d.toFixed(o));return(e||this.$slots.default)&&i?this.$slots.default?this.$slots.default():a.createVNode("span",null,[c]):!e||i?null:a.createVNode("span",{class:"progress-text",style:typeof c=="string"?l:void 0},[this.$slots.default?this.$slots.default():c])}},render(){const e=this.renderProcessInfo(),t=Te(F({},this.$props),{percent:this.validPercent(this.percent)});let n=a.createVNode(Gm,t,w0(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(Zm,t,w0(e)?e:{default:()=>[e]}));const i={class:Se({extCls:!!this.extCls},`bk-progress bk-progress-${this.type}`)};return a.createVNode("div",i,[n])}});const wr=Ge(_m),v0=Symbol("RadioGroup");function I0(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const N0=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,i=a.inject(v0,To),l=!bf(i),o=a.ref(!1),c=a.computed(()=>l&&i.props.disabled?!0:t.disabled);l?a.watch(()=>i.props.modelValue,f=>{o.value=f===t.label},{immediate:!0}):a.watch(()=>t.modelValue,f=>{f!==""&&(o.value=f===t.label)},{immediate:!0});const d=(f=!0)=>{o.value=f},h=f=>{if(c.value)return;const m=f.target;o.value=m.checked;const p=o.value?t.label:"";n("change",p),n("update:modelValue",p),l&&i.handleChange(e.proxy),a.nextTick(()=>{m.checked!==o.value&&(m.checked=o.value)})};return a.onMounted(()=>{l&&i.register(e.proxy)}),a.onBeforeUnmount(()=>{l&&i.unregister(e.proxy)}),{isChecked:o,isDisabled:c,setChecked:d,handleChange:h}},Ym={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 Fm=a.defineComponent({name:"Radio",props:Ym,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=I0(),{isChecked:i,isDisabled:l,setChecked:o,handleChange:c}=N0();return{isFocused:e,isChecked:i,isDisabled:l,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=Se({"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 Um={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 $m=a.defineComponent({name:"RadioButton",props:Um,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=I0(),{isChecked:i,isDisabled:l,setChecked:o,handleChange:c}=N0();return{isFocused:e,isChecked:i,isDisabled:l,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=Se({"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 Xm={name:g.string.def(""),modelValue:g.oneOfType([String,Number,Boolean]),disabled:g.bool,withValidate:g.bool.def(!0)};var Km=a.defineComponent({name:"RadioGroup",props:Xm,emits:["change","update:modelValue"],setup(e,t){const n=On(),i=[],l=d=>{i.push(d)},o=d=>{const h=i.indexOf(d);h>-1&&i.splice(h,1)},c=d=>{const h=d.label;i.forEach(f=>{f!==d&&f.setChecked(!1)}),t.emit("update:modelValue",h),t.emit("change",h)};return a.provide(v0,{props:e,register:l,unregister:o,handleChange:c}),a.watch(()=>e.modelValue,()=>{var d;e.withValidate&&((d=n==null?void 0:n.validate)==null||d.call(n,"change"))}),a.onMounted(()=>{e.modelValue!==""&&i.forEach(d=>{d.setChecked(d.label===e.modelValue)})}),{}},render(){var e;return a.createVNode("div",{class:"bk-radio-group"},[(e=this.$slots)==null?void 0:e.default()])}});const L0=Rt(Fm,{Group:Km,Button:$m});var Gs=a.defineComponent({name:"Star",props:{rate:g.number.def(0),width:g.number.def(15),height:g.number.def(16),editable:g.bool.def(!0),hoverRate:g.number.def(0),max:g.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=d=>{if(!e.editable)return;const h=d+1;t("chooseRate",h)},i=d=>{if(!e.editable)return;const h=d+1;t("changeHover",h)},l=d=>Se({"bk-is-select":d<Math.floor(o.value),"bk-is-edit":e.editable,"bk-rate-star":!0}),o=a.computed(()=>e.hoverRate||e.rate),c={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:"bk-rate-stars"},[Array(e.max).fill(1).map((d,h)=>a.createVNode("svg",{class:l(h),style:c,x:"0px",y:"0px",viewBox:"0 0 64 64",onClick:()=>n(h),onMouseenter:()=>i(h)},[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)])])])])]))])}}),qm=a.defineComponent({name:"Rate",components:{star:Gs},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=On(),i=a.ref(0),l=p=>{!e.editable||(t("update:modelValue",p),t("change",p))},o=p=>{i.value=p},c=Se({"bk-rate":!0}),h={small:{width:12,height:12},large:{width:18,height:18}}[e.size]||{width:15,height:16},f=a.computed(()=>{const p=Math.floor(e.modelValue),v=(h.width+3)*p,C=h.width*(e.modelValue-p);return{width:`${v+C}px`}}),m={width:h.width,height:h.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(Gs,a.mergeProps({rate:e.modelValue,"hover-rate":i.value,onChooseRate:l,onChangeHover:o,onMouseleave:()=>o(0)},m),null):[a.createVNode(Gs,a.mergeProps({rate:5,style:f.value,class:"bk-score-real",editable:!1},m),null),a.createVNode(Gs,a.mergeProps({rate:0,editable:!1},m),null)]])}});const k0=Ge(qm);var ep=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:l,pics:o,list:c,height:d,width:h}=a.toRefs(e),f=a.ref(),m=a.ref(0),p=a.ref(0),v=a.ref(0),C=a.ref(0);let I;const N=a.computed(()=>{var H;return((H=c.value)==null?void 0:H.length)>0?c.value:o.value}),x=a.computed(()=>({width:`${p.value*N.value.length}px`,transform:`translateX(-${p.value*m.value}px)`})),T=a.computed(()=>({width:`${p.value}px`,height:`${v.value}px`})),y=H=>{let le=H;H>=N.value.length&&(le=0),H<0&&(le=N.value.length-1),m.value=le,t("index-change",le)},b=H=>{!H||window.open(H,"_blank")},M=H=>["bk-swiper-img",{"bk-swiper-link":H.link},H.class],L=H=>({"background-image":`url(${H.url})`,"background-color":H.color}),k=H=>({"bk-current-index":m.value===H}),A=()=>{i.value&&(C.value=window.setTimeout(()=>{y(m.value+1),A()},l.value))},O=()=>{window.clearTimeout(C.value)},J=()=>{var le;const H=(le=f.value)==null?void 0:le.parentElement;!H||!window.ResizeObserver||(I=new ResizeObserver(()=>{ee()}),I.observe(H))},P=()=>{var H;(H=I.disconnect)==null||H.call(I)},E=H=>{if(H===void 0)return{height:0,width:0};const le=getComputedStyle(H),de=H.clientWidth-parseFloat(le.paddingTop)-parseFloat(le.paddingBottom);return{height:H.clientHeight-parseFloat(le.paddingLeft)-parseFloat(le.paddingRight),width:de}},ee=()=>{var le;const H=E((le=f.value)==null?void 0:le.parentElement);p.value=+h.value>0?h.value:H.width,v.value=+d.value>0?d.value:H.height};return a.watch([d,h],ee),a.onMounted(()=>{ee(),A(),J()}),a.onBeforeUnmount(()=>{O(),P()}),()=>a.createVNode("section",{class:"bk-swiper-home",ref:f,style:T.value},[a.createVNode("hgroup",{style:x.value,class:"bk-transition bk-swiper-main"},[N.value.map(H=>{var le,de;return a.createVNode("h3",{class:"bk-swiper-card",style:T.value},[(de=(le=n.default)==null?void 0:le.call(n,H))!=null?de:a.createVNode("span",{class:M(H),style:L(H),onClick:()=>b(H.link)},null)])})]),a.createVNode("ul",{class:"bk-swiper-index"},[N.value.map((H,le)=>a.createVNode("li",{class:k(le),onMouseover:()=>y(le)},null))]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-prev",onClick:()=>y(m.value-1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-next",onClick:()=>y(m.value+1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)])])}});const T0=Ge(ep),wc=Symbol("BkSelect"),x0=Symbol("BkOptionGroup");function S0(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function vc(e){return{register:(i,l)=>{if(!!l){if(e.value.has(i)){console.warn(`repeat ${i}`,l);return}return e.value.set(i,l)}},unregister:i=>{e.value.delete(i)}}}function tp(e,t=200){let n,i=e;return a.customRef((l,o)=>({get(){return l(),i},set(c){clearTimeout(n),c===void 0||c===""?(i=c,o()):n=setTimeout(()=>{i=c,o()},t)}}))}function np(e,t){const{popoverMinWidth:n}=e;let i=null;const l=a.ref("auto"),o=a.ref(!1),c=()=>{o.value=!o.value},d=()=>{o.value=!1},h=()=>{o.value=!0},f=()=>{var m;l.value=Math.max((m=t.value)==null?void 0:m.offsetWidth,n)};return a.onMounted(()=>{!t.value||(i=z1(t.value,f,60,!0),i.start())}),a.onBeforeUnmount(()=>{i==null||i.stop(),i=null}),{isPopoverShow:o,popperWidth:l,togglePopover:c,hidePopover:d,showPopover:h}}function ip(e,t){const n=tp(""),i=a.ref(!1);return a.watch(n,async()=>{try{i.value=!0,await e(n.value),i.value=!1}catch(l){console.error(l)}finally{t==null||t()}}),{searchKey:n,searchLoading:i}}function vr(e=""){return e&&String(e).trim().toLowerCase()}var _s=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:l}=a.toRefs(e),o=a.inject(wc,null),c=a.inject(x0,null),d=a.computed(()=>{var C;return(C=o==null?void 0:o.selected)==null?void 0:C.some(I=>I.value===l.value)}),h=a.computed(()=>o==null?void 0:o.multiple),f=a.computed(()=>(o==null?void 0:o.activeOptionValue)===l.value),m=a.computed(()=>o==null?void 0:o.showSelectedIcon),p=()=>{i.value||o==null||o.handleOptionSelected(t)},v=()=>{o.activeOptionValue=l.value};return a.onBeforeMount(()=>{o==null||o.register(l.value,t),c==null||c.register(l.value,t)}),a.onBeforeUnmount(()=>{o==null||o.unregister(l.value),c==null||c.unregister(l.value)}),Te(F({},a.toRefs(n)),{selected:d,multiple:h,isHover:f,showSelectedIcon:m,handleOptionClick:p,handleMouseEnter:v})},render(){var t,n,i;const e=Se({"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(ka,{class:"bk-select-selected-icon",width:22,height:22},null)]),[[a.vShow,this.visible]])}}),ap=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,l=a.inject(wc,null),o=a.reactive({groupCollapse:e.collapse,visible:!0}),c=a.ref(new Map),{register:d,unregister:h}=vc(c),f=a.computed(()=>`${e.label} (${[...c.value.values()].filter(p=>p.visible).length})`),m=()=>{!e.collapsible||e.disabled||(o.groupCollapse=!o.groupCollapse,t("update:collapse",o.groupCollapse))};return a.provide(x0,a.reactive(Te(F({},a.toRefs(e)),{register:d,unregister:h,groupCollapse:a.toRef(o,"groupCollapse")}))),a.onBeforeMount(()=>{l==null||l.registerGroup(n.uid,i)}),a.onBeforeUnmount(()=>{l==null||l.unregisterGroup(n.uid)}),Te(F({},a.toRefs(o)),{groupLabel:f,handleToggleCollapse:m})},render(){var i,l;const e=Se({"bk-option-group":!0,collapsible:this.collapsible,disabled:this.disabled}),t=Se({"bk-option-group-label":!0,collapsible:this.collapsible}),n=Se({"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(ys,{class:n},null),a.createVNode("span",{class:"default-group-label-title"},[this.groupLabel])])]),a.withDirectives(a.createVNode("ul",{class:"bk-option-group-content"},[(l=(i=this.$slots).default)==null?void 0:l.call(i)]),[[a.vShow,!this.groupCollapse]])]),[[a.vShow,this.visible]])}});const rp={onContentScroll:Function},sp=F({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(Ze("F-scroll-x")),scrollYName:g.string.def(Ze("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)},rp);var lp=(e,t)=>{const{renderAs:n,contentAs:i}=e,l=(d,h,f,m,p,v,C)=>{t.emit("content-scroll",[d,{translateY:p,translateX:v,pos:C}])},o=a.resolveDirective("bkVirtualRender"),c={lineHeight:e.lineHeight,handleScrollCallback:l,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent};return{rendAsTag:()=>{var d,h,f,m,p,v,C,I,N,x,T,y;return a.h(n,{class:e.className},[(f=(h=(d=t.slots).beforeContent)==null?void 0:h.call(d))!=null?f:"",a.withDirectives(a.h(i,{class:e.contentClassName,style:e.contentStyle},[(v=(p=(m=t.slots).default)==null?void 0:p.call(m,{data:e.list}))!=null?v:""]),[[o,c]]),(N=(I=(C=t.slots).afterContent)==null?void 0:I.call(C))!=null?N:"",(y=(T=(x=t.slots).afterSection)==null?void 0:T.call(x))!=null?y:""])}}};function D0(e,t,n,i){let l=0,o=0,c=0,d=0;for(;l<e;l++){if(d=i(l,[l*n,(l+1)*n,"virtual"]),o+d>t){c=t-o;break}o+=d}return{startIndex:l,height:o,diffHeight:c}}function j0(e,t,n,i,l){if(!i)return;const o=i.scrollTop,c=i.scrollLeft,{scrollTop:d,count:h,groupItemCount:f,startIndex:m,endIndex:p}=n,{offsetHeight:v}=i;let C=0,I=0,N=0;if(typeof e=="number"&&(C=Math.floor(o/e),I=Math.ceil(v/e)+C,N=o%e),typeof e=="function"){const x=D0(h,o,f,e);C=x.startIndex>0?x.startIndex:0,N=x.diffHeight,I=D0(h,v,f,e).startIndex+C+1}if(o!==d||C!==m||I!==p){const x=i.scrollHeight-i.offsetHeight-i.scrollTop;typeof t=="function"&&t(l,C,I,o,N,c,{bottom:x>=0?x:0})}}function op(e,t,n){const{lineHeight:i=30,handleScrollCallback:l,pagination:o={},onlyScroll:c}=n.value;if(c){const v=t.scrollTop,C=t.scrollLeft,I=t.scrollHeight-t.offsetHeight-t.scrollTop;l(e,null,null,v,v,C,{bottom:I>=0?I:0});return}const{startIndex:d,endIndex:h,groupItemCount:f,count:m,scrollTop:p}=o;j0(i,l,{scrollTop:p,startIndex:d,endIndex:h,groupItemCount:f,count:m},t,e)}const z0=(e=60)=>jt.exports.throttle((t,n,i)=>op(t,n,i),e),cp=(e,t,n,i=60)=>{Reflect.apply(z0(i),globalThis,[e,t,n])};var up={mounted(e,t){const n=e.parentNode,{throttleDelay:i}=t.value;n.addEventListener("scroll",l=>{cp(l,n,t,i)})},unbind(e){if(e){const t=e.parentNode;if(!t)return;t.removeEventListener("scroll",z0)}}},dp=a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:up},props:sp,emits:["content-scroll"],setup(e,t){const{renderAs:n,contentAs:i}=e,l=A=>typeof A=="string"?[A]:typeof A=="object"&&!Array.isArray(A)?[A]:A;if(!e.enabled){const{rendAsTag:A}=lp(e,t);return A}const o=a.ref(null),c=a.reactive({startIndex:0,endIndex:0,scrollTop:1,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),d=(A,O,J,P,E,ee,H)=>{c.startIndex=O,c.endIndex=J,c.scrollTop=P,c.translateY=E,c.translateX=ee,c.pos=H,t.emit("content-scroll",[A,c])};a.onMounted(()=>{a.nextTick(()=>{p(e.list),v()})}),a.watch(()=>e.list,()=>{h(),v()},{deep:!0}),a.watch(()=>e.lineHeight,()=>{h(),v()});const h=()=>{p(e.list)},f=a.ref(0),m=a.ref(0),p=A=>{if(f.value=Math.ceil((A||[]).length/e.groupItemCount),c.count=f.value,c.startIndex=0,c.endIndex=0,c.translateY=0,c.scrollTop=0,typeof e.abosuteHeight=="string"&&e.abosuteHeight==="auto")if(typeof e.lineHeight=="function"){m.value=0;let J=0;for(let P=0;P<f.value;P++){const E=e.lineHeight.call(this,P,A.slice(P*e.groupItemCount,e.groupItemCount));J+=typeof E=="number"?E:0}m.value=J}else m.value=e.lineHeight*f.value;else m.value=e.abosuteHeight},v=(A=!0)=>{var J;const O=(J=o.value)==null?void 0:J.parentNode;j0(e.lineHeight,d,c,O,null),A&&o.value&&o.value.scrollTo(0,0)},C=a.computed(()=>(e.list||[]).map((A,O)=>Te(F({},A),{$index:O}))),I=a.computed(()=>C.value.slice(c.startIndex*e.groupItemCount,(c.endIndex+e.preloadItemCount)*e.groupItemCount)),N=a.computed(()=>e.scrollPosition==="content"?{top:`${c.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${c.translateY}px)`}:{}),x=a.computed(()=>F({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"?N.value:{})),T=a.computed(()=>{const A=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${m.value<e.minHeight?e.minHeight:m.value}px`,display:A?"none":"block"}}),y=a.computed(()=>[Ze("virtual-render"),e.scrollXName,e.scrollYName,...l(e.className),e.scrollPosition==="container"?Ze("virtual-content"):""]),b=a.computed(()=>[e.scrollPosition==="content"?Ze("virtual-content"):"",...l(e.contentClassName)]),M=a.resolveDirective("bkVirtualRender"),L={lineHeight:e.lineHeight,handleScrollCallback:d,pagination:c,throttleDelay:e.throttleDelay},k=()=>{h(),v()};return t.expose({reset:k}),()=>{var A,O,J,P,E,ee,H,le,de,he,ye,re;return a.h(n||"div",{ref:o,class:y.value,style:x.value},[(J=(O=(A=t.slots).beforeContent)==null?void 0:O.call(A))!=null?J:"",a.withDirectives(a.h(i||"div",{class:b.value,style:F(F({},N.value),e.contentStyle)},[(ee=(E=(P=t.slots).default)==null?void 0:E.call(P,{data:I.value}))!=null?ee:""]),[[M,L]]),(de=(le=(H=t.slots).afterContent)==null?void 0:le.call(H))!=null?de:"",a.h("div",{class:[Ze("virtual-section")],style:T.value}),(re=(ye=(he=t.slots).afterSection)==null?void 0:ye.call(he))!=null?re:""])}}});const Ir=Ge(dp);var fp=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(()=>Se({"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(An,{class:"bk-tag-close",onClick:this.handleClose},null):""])}});const Ys=Ge(fp);var hp=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(),{modelValue:i,collapseTags:l,selected:o}=a.toRefs(e),c=a.ref(i.value),d=a.ref(),h=a.ref(null);a.watch(i,()=>{c.value=i.value}),a.watch([o,l],()=>{I()},{flush:"post"});const f=N=>{t("remove",N)},m=()=>{var N;(N=d.value)==null||N.focus()},p=N=>{t("update:modelValue",N.target.value)},v=N=>{switch(N.code){case"Enter":{t("enter",N.target.value,N);break}}},C=N=>{const x=[...n.$el.querySelectorAll(".bk-tag")];return typeof N=="number"?x[N]:x},I=()=>{!l.value||(h.value=null,setTimeout(()=>{const N=C(),x=N.findIndex((T,y)=>y?N[y-1].offsetTop!==T.offsetTop:!1);x-1>-1?h.value=x-1:h.value=null}))};return{overflowTagIndex:h,value:c,inputRef:d,handleRemoveTag:f,focus:m,handleInput:p,handleKeydown:v}},render(){var i,l,o,c,d,h,f;const e=Se({"bk-select-tag":!0,"bk-select-tag--default":!0,"is-disabled":this.disabled,"collapse-tag":this.collapseTags}),t=Se({"bk-select-tag-wrapper":!0}),n={display:this.selected.length&&!this.filterable?"none":""};return a.createVNode("div",{class:e},[(l=(i=this.$slots)==null?void 0:i.prefix)==null?void 0:l.call(i),a.createVNode("span",{class:t},[(d=(c=(o=this.$slots).default)==null?void 0:c.call(o))!=null?d:this.selected.map((m,p)=>a.createVNode(Ys,{closable:!0,theme:this.tagTheme,style:{display:this.collapseTags&&this.overflowTagIndex&&p>=this.overflowTagIndex?"none":""},onClose:()=>this.handleRemoveTag(m.value)},{default:()=>[m.label]})),this.overflowTagIndex&&this.collapseTags&&a.createVNode(Ys,{class:"bk-select-overflow-tag"},{default:()=>[a.createTextVNode("+"),this.selected.length-this.overflowTagIndex]})]),a.createVNode("input",{class:"bk-select-tag-input",ref:"inputRef",type:"text",style:n,placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,disabled:this.disabled,value:this.filterable?this.value:"",onInput:this.handleInput,onKeydown:this.handleKeydown},null),(f=(h=this.$slots)==null?void 0:h.suffix)==null?void 0:f.call(h)])}}),gp=a.defineComponent({name:"Select",directives:{clickoutside:$n},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)},emits:["update:modelValue","change","toggle","clear","scroll-end","focus","blur"],setup(e,{emit:t}){const{modelValue:n,disabled:i,filterable:l,multiple:o,remoteMethod:c,loading:d,loadingText:h,noDataText:f,noMatchText:m,popoverMinWidth:p,showOnInit:v,multipleMode:C,allowCreate:I,customContent:N,showSelectedIcon:x,inputSearch:T,enableVirtualRender:y,showSelectAll:b,scrollHeight:M,list:L,displayKey:k,collapseTags:A,autoHeight:O,popoverOptions:J}=a.toRefs(e),P=On(),E=a.ref(),ee=a.ref(),H=a.ref(),le=a.ref(),de=a.ref(),he=a.ref(),ye=a.ref(),re=a.ref(new Map),K=a.computed(()=>[...re.value.values()]),B=a.ref(new Map),V=a.ref([]),$=a.computed(()=>V.value.reduce((ve,De)=>(ve[De.value]=De.label,ve),{})),X=a.ref();a.watch(n,()=>{var ve;Va(),e.withValidate&&((ve=P==null?void 0:P.validate)==null||ve.call(P,"change"))},{deep:!0}),a.watch(V,()=>{var ve;(ve=ye.value)==null||ve.updatePopover(null,te.value)});const fe=a.computed(()=>ae.value?L.value:L.value.filter(ve=>{var De;return(De=vr(String(ve[k.value])))==null?void 0:De.includes(Ln.value)})),ce=a.computed(()=>i.value||d.value),Ce=a.computed(()=>V.value.map(ve=>{var De,Oe;return((Oe=(De=re.value)==null?void 0:De.get(ve.value))==null?void 0:Oe.label)||ve.label})),Ee=a.computed(()=>{const ve=K.value.reduce((De,Oe)=>(Oe.disabled||De.push(Oe.value),De),[]);return ve.length<=V.value.length&&ve.every(De=>V.value.some(Oe=>Oe.value===De))}),ne=a.computed(()=>!!B.value.size),Y=a.computed(()=>!K.value.length),Z=a.computed(()=>K.value.length&&K.value.every(ve=>!ve.visible)),ae=a.computed(()=>l.value&&typeof c.value=="function"),pe=a.computed(()=>!(Hr.value||Y.value||Z.value)||N.value),D=a.computed(()=>o.value&&b.value&&(!Ln.value||!l.value)),W=a.computed(()=>M.value-12-(D.value?32:0)),Q=a.computed(()=>Hr.value?h.value:Y.value?f.value:Z.value?m.value:""),G=a.computed(()=>O.value?A.value&&!Re.value:A.value),te=a.computed(()=>jt.exports.merge({theme:"light bk-select-popover",trigger:"manual",width:Xe.value,arrow:!1,placement:"bottom-start",isShow:Re.value,reference:de.value,offset:6},J.value)),{register:ie,unregister:Me}=vc(re),{register:Ie,unregister:Le}=vc(B),{isHover:He,setHover:ot,cancelHover:Fe}=S0(),Ke=a.ref(!1),$t=()=>{Ke.value||(Ke.value=!0,t("focus"))},xt=()=>{!Ke.value||(Ke.value=!1,t("blur"))},{popperWidth:Xe,isPopoverShow:Re,hidePopover:qe,showPopover:ji,togglePopover:Jr}=np({popoverMinWidth:p.value},ee),Qr=a.computed(()=>(l.value&&T.value||I.value)&&Re.value);a.watch(Re,ve=>{ve?(Zr(),Ea()):Ln.value=""});const Rr=a.watch(Re,()=>{setTimeout(()=>{var ve,De;y.value&&((De=(ve=he.value)==null?void 0:ve.reset)==null||De.call(ve)),Rr()})}),Ea=()=>{var Oe;const ve=V.value[0],De=re.value.get(ve==null?void 0:ve.value);De&&!De.disabled&&De.visible?X.value=ve==null?void 0:ve.value:X.value=(Oe=K.value.find(Gn=>!Gn.disabled&&Gn.visible))==null?void 0:Oe.value},Wr=ve=>{!l.value||K.value.forEach(De=>{var Oe;De.visible=(Oe=vr(String(De.label)))==null?void 0:Oe.includes(vr(ve))})},{searchKey:Ln,searchLoading:Hr}=ip(ae.value?c.value:Wr,Ea),Zn=ve=>{ve!==n.value&&(t("change",ve,n.value),t("update:modelValue",ve,n.value))},du=()=>{ce.value||($t(),Jr(),t("toggle",Re.value))},fl=ve=>{!l.value||(Ln.value=ve)},hl=(ve,De)=>{const Oe=String(ve);!I.value||!Oe||l.value&&K.value.find(zi=>vr(String(zi.label))===vr(Oe))||re.value.get(Oe)||(De.stopPropagation(),o.value?(V.value.push({value:Oe,label:Oe}),Zn(V.value.map(zi=>zi.value))):(V.value=[{value:Oe,label:Oe}],Zn(Oe),qe()),Ln.value="")},Br=ve=>{if(!(ce.value||!ve)){if(o.value){const De=V.value.findIndex(Oe=>Oe.value===ve.value);De>-1?V.value.splice(De,1):V.value.push({value:ve.value,label:ve.label||ve.value}),Zn(V.value.map(Oe=>Oe.value))}else V.value=[{label:ve.label||ve.value,value:ve.value}],Zn(ve.value),qe();Zr()}},Zr=()=>{setTimeout(()=>{var ve,De,Oe;!T.value&&!I.value?(ve=le.value)==null||ve.focus():C.value==="tag"?(De=de.value)==null||De.focus():(Oe=E.value)==null||Oe.focus()},0)},fu=ve=>{ve.stopPropagation(),V.value=[],Zn(o.value?[]:""),t("clear",o.value?[]:""),qe()},hu=()=>{X.value=""},gl=()=>{Ee.value?V.value=[]:K.value.forEach(ve=>{ve.disabled||V.value.find(De=>De.value===ve.value)||V.value.push({value:ve.value,label:ve.label||ve.value})}),Zn(V.value.map(ve=>ve.value)),Zr()},gu=ve=>{const{scrollTop:De,clientHeight:Oe,scrollHeight:Gn}=ve.target;De+Oe===Gn&&t("scroll-end")},mu=ve=>{if(ce.value)return;const De=V.value.findIndex(Oe=>Oe.value===ve);De>-1&&(V.value.splice(De,1),Zn(V.value.map(Oe=>Oe.value)))},ml=ve=>{var De,Oe;return((Oe=(De=re.value)==null?void 0:De.get(ve))==null?void 0:Oe.label)||$.value[ve]||ve},Va=()=>{Array.isArray(n.value)?V.value=[...n.value.map(ve=>({value:ve,label:ml(ve)}))]:n.value!==void 0&&n.value!==""&&(V.value=[{value:n.value,label:ml(n.value)}])},Gr=ve=>{var Gn,zi,pl,bl;if(!((Gn=ee.value)!=null&&Gn.contains(ve.target))&&!((zi=H.value)!=null&&zi.contains(ve.target))&&!N.value)return;const De=K.value.filter(Gt=>!Gt.disabled&&Gt.visible),Oe=De.findIndex(Gt=>Gt.value===X.value);if(!(!De.length||Oe===-1))switch(ve.code){case"ArrowDown":{ve.preventDefault();const Gt=Oe>=De.length-1?0:Oe+1;X.value=(pl=De[Gt])==null?void 0:pl.value;break}case"ArrowUp":{ve.preventDefault();const Gt=Oe===0?De.length-1:Oe-1;X.value=(bl=De[Gt])==null?void 0:bl.value;break}case"Backspace":{if(!o.value||!V.value.length||Ln.value.length||ve.target===le.value)return;V.value.pop(),Zn(V.value.map(Gt=>Gt.value));break}case"Enter":{if(!Re.value)Re.value=!0;else{const Gt=re.value.get(X.value);Br(Gt)}break}}},_r=({event:ve})=>{var Oe;const{target:De}=ve;((Oe=ee.value)==null?void 0:Oe.contains(De))||ee.value===De||(qe(),xt())};return a.provide(wc,a.reactive({multiple:o,selected:V,activeOptionValue:X,showSelectedIcon:x,register:ie,unregister:Me,registerGroup:Ie,unregisterGroup:Le,handleOptionSelected:Br})),a.onMounted(()=>{Va(),setTimeout(()=>{v.value&&ji()}),n4(document,"keydown",Gr)}),a.onBeforeMount(()=>{i4(document,"keydown",Gr)}),{selected:V,isInput:Qr,options:K,isDisabled:ce,selectedLabel:Ce,isPopoverShow:Re,isHover:He,popperWidth:Xe,inputRef:E,triggerRef:ee,contentRef:H,searchRef:le,selectTagInputRef:de,virtualRenderRef:he,popoverRef:ye,searchLoading:Hr,isOptionsEmpty:Y,isSearchEmpty:Z,isFocus:Ke,isShowSelectContent:pe,curContentText:Q,isGroup:ne,searchKey:Ln,isShowSelectAll:D,virtualHeight:W,filterList:fe,isCollapseTags:G,popoverConfig:te,setHover:ot,cancelHover:Fe,handleFocus:$t,handleBlur:xt,handleTogglePopover:du,handleClear:fu,hidePopover:qe,showPopover:ji,handleToggleAll:gl,handleOptionSelected:Br,handleClickOutside:_r,handleScroll:gu,handleDeleteTag:mu,handleInputChange:fl,handleInputEnter:hl,handleKeydown:Gr,handleSelectedAllOptionMouseEnter:hu}},render(){const e=Se({"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(Ci,{loading:!0,theme:"primary",class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length&&!this.isDisabled?a.createVNode(wn,{class:"clear-icon",onClick:this.handleClear},null):a.createVNode(La,{class:"angle-up"},null),n=()=>{var o,c;return this.multipleMode==="tag"?a.createVNode(hp,{ref:"selectTagInputRef",modelValue:this.searchKey,"onUpdate:modelValue":d=>this.searchKey=d,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 d,h;return(h=(d=this.$slots).prefix)==null?void 0:h.call(d)},default:(c=(o=this.$slots).tag)==null?void 0:c.call(o,{selected:this.selected}),suffix:()=>t()}):a.createVNode(Fi,{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 d,h;return(h=(d=this.$slots).prefix)==null?void 0:h.call(d)},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()]),l=()=>{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(Ts,{class:"icon-search",width:16,height:16},null),a.withDirectives(a.createVNode("input",{ref:"searchRef",class:"bk-select-search-input",placeholder:this.searchPlaceholder,"onUpdate:modelValue":d=>this.searchKey=d},null),[[a.vModelText,this.searchKey]])]),!this.isShowSelectContent&&a.createVNode("div",{class:"bk-select-empty"},[this.searchLoading&&a.createVNode(Ci,{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(Ir,{list:this.filterList,height:this.virtualHeight,lineHeight:32,ref:"virtualRenderRef"},{default:({data:d})=>d.map(h=>a.createVNode(_s,{key:h[this.idKey],value:h[this.idKey],label:h[this.displayKey]},null))}):this.list.map(d=>a.createVNode(_s,{value:d[this.idKey],label:d[this.displayKey]},null)),(c=(o=this.$slots).default)==null?void 0:c.call(o),this.scrollLoading&&a.createVNode("li",{class:"bk-select-options-loading"},[a.createVNode(Ci,{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(ti,a.mergeProps(this.popoverConfig,{onClickoutside:this.handleClickOutside,ref:"popoverRef"}),{default:()=>i(),content:()=>l()})])}});const Ic=Rt(gp,{Option:_s,Group:ap});function mp(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const{propsMixin:pp}=$i,Nc=Object.assign({},pp);Nc.width.default="400",Nc.height.default="100%";var bp=a.defineComponent({name:"Sideslider",components:{BkModal:$i,BkButton:Wt},props:Te(F({},Nc),{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))},l=()=>{setTimeout(()=>{n("shown")},200)},o=()=>{setTimeout(()=>{n("hidden")},200)};return()=>{const c={header:()=>{var f,m;return a.createVNode(a.Fragment,null,[a.createVNode("div",{class:"bk-sideslider-header"},[a.createVNode("div",{class:`bk-sideslider-close ${e.direction}`,onClick:()=>{i()}},null),a.createVNode("div",{class:`bk-sideslider-title ${e.direction}`},[(m=(f=t.header)==null?void 0:f.call(t))!=null?m:e.title])])])},default:()=>{var f,m;return(m=(f=t.default)==null?void 0:f.call(t))!=null?m:"Content"},footer:()=>t.footer?a.createVNode("div",{class:"bk-sideslider-footer"},[t.footer()]):null},d=`bk-sideslider-wrapper ${e.scrollable?"scroll-able":""} ${e.extCls}`,h=t.footer?"calc(100vh - 106px)":"calc(100vh - 52px)";return a.createVNode($i,a.mergeProps(e,{maxHeight:h,class:d,style:`${e.direction}: 0;`,onHidden:o,onShown:l,onClose:i}),mp(c)?c:{default:()=>[c]})}}});const P0=Ge(bp),O0={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 yp=a.defineComponent({name:"Steps",props:O0,emits:["update:curStep","click"],setup(e,{emit:t}){const n=a.ref([]),i=d=>{const h=[];d.forEach(f=>{var m;typeof f=="string"?h.push(f):h.push({title:f.title,icon:f.icon,description:f.description,status:f.status,border:(m=f.border)!=null?m:!0})}),n.value.splice(0,n.value.length,...h)},l=d=>{O0.curStep=d},o=()=>{var d;n.value.splice(0,n.value.length,{title:"\u6B65\u9AA41",icon:1},{title:"\u6B65\u9AA42",icon:2},{title:"\u6B65\u9AA43",icon:3}),(d=e.steps)!=null&&d.length&&i(e.steps)},c=async d=>{try{e.controllable&&d!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(h,f)=>{const m=await e.beforeChange(d);m?h(m):f(m)}),t("update:curStep",d),t("click",d))}catch(h){console.warn(h)}};return a.onMounted(o),a.watch(()=>e.steps,()=>{i(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{l(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=Se({[`${this.extCls}`]:!!this.extCls,[`bk-steps-${this.direction}`]:this.direction,[`bk-steps-${this.lineType}`]:this.lineType},`${t} ${e} ${n}`),l=p=>this.curStep>p+1||this.defaultSteps[p].status==="done",o=p=>this.curStep===p+1,c=p=>{const{icon:v}=p;return v?Object.prototype.toString.call(v)==="[object Object]":typeof p=="string"},d=(p,v)=>(v.icon||(v.icon=p),!isNaN(v.icon)),h=p=>p.status==="loading",f=p=>p.status==="error",m=(p,v)=>o(p)&&this.status==="loading"||h(v)?a.createVNode(Cs,{class:"bk-icon bk-steps-icon icon-loading"},null):o(p)&&this.status==="error"||f(v)?a.createVNode(An,{class:"bk-steps-icon"},null):l(p)?a.createVNode(ka,{class:"bk-steps-icon"},null):a.createVNode("span",null,[d(p,v)?p+1:a.createVNode(v.icon,null,null)]);return a.createVNode("div",{class:i},[this.defaultSteps.map((p,v)=>{var C,I,N;return a.createVNode("div",{class:["bk-step",p.title?"":"bk-step-no-content",l(v)?"done":"",o(v)?"current":"",o(v)&&this.status==="error"?"isError":"",p.status&&o(v)?[`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(v+1)}},[(N=(I=(C=this.$slots)[v+1])==null?void 0:I.call(C))!=null?N:m(v,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(v+1)}},[p.title]),p.description&&a.createVNode("div",{class:"bk-step-description",title:p.description},[p.description])]):""])})])}});const A0=Ge(yp);var Cp=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=On(),i=a.ref(!1),l=a.computed(()=>e.trueValue===c.value),o=a.ref(e.modelValue!==!1),c=a.computed(()=>o.value?e.modelValue:e.value),d=a.computed(()=>{const m={[e.extCls]:!!e.extCls,"bk-switcher":!0,"bk-switcher-outline":e.isOutline,"bk-switcher-square":e.isSquare,"show-label":e.showText,"is-disabled":e.disabled,"is-checked":l.value,"is-unchecked":!l.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 h=m=>{if(m.stopPropagation(),m.preventDefault(),e.disabled||i.value)return;const p=l.value?e.falseValue:e.trueValue,v=!l.value,C=()=>{t("update:modelValue",p),t("change",v)};let I=!0;if(typeof e.beforeChange=="function"&&(I=e.beforeChange(p),typeof I.then=="function"))return i.value=!0,I.then(()=>{C()}).finally(()=>{i.value=!1});I&&C()},f=m=>{(m.code==="Enter"||m.key==="Enter"||m.keyCode===13)&&h(m)};return()=>a.createVNode("div",{class:d.value,onClick:h,tabindex:"0",onKeydown:f},[i.value?a.createVNode(Zo,{class:"bk-switcher-loading"},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[l.value?e.onText:e.offText]):""])}});const E0=Ge(Cp);var Fs=(e=>(e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e))(Fs||{});const V0=["none","row","col","outer"];var ni=(e=>(e.ON_SORT_BY_CLICK="onSortByClick",e.ON_FILTER_CLICK="onFilterClick",e.ON_SETTING_CHANGE="onSettingChange",e.ON_ROW_EXPAND_CLICK="onRowExpandClick",e))(ni||{}),ln=(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))(ln||{});const vn=(...e)=>!0,Mp={columnPick:vn,columnFilter:vn,columnSort:vn,rowClick:vn,rowDblclick:vn,rowExpand:vn,pageLimitChange:vn,pageValueChange:vn,settingChange:vn,scrollBottom:vn,colFilterSave:vn},Tt={ROW_INDEX:"__$table_row_index",ROW_UID:"__$uuid",ROW_EXPAND:"__row_expand"},Lc=4,ii=42,Us={large:78,medium:60,small:42},wp=[{value:"small",label:"\u5C0F",height:Us.small},{value:"medium",label:"\u4E2D",height:Us.medium},{value:"large",label:"\u5927",height:Us.large}];var $s=(e=>(e.CURRENT="current",e.ALL="all",e))($s||{});const vp={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(),showOverflowTooltip:g.oneOfType([g.bool,g.shape({content:g.string.def(""),disabled:g.bool.def(!1),watchCellResize:g.bool.def(!0)})]).def(!1),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($s)).def("current")}),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($s)).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)},Ip={data:g.arrayOf(g.any).def([]),columns:g.arrayOf(g.shape(vp)).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(ii*2),maxHeight:g.oneOfType([g.number,g.string]).def("auto"),rowHeight:g.oneOfType([g.number,g.func]).def(ii),headHeight:g.number.def(ii),showHead:g.bool.def(!0),thead:g.shape({height:g.number.def(ii),isShow:g.bool.def(!0),cellFn:g.func.def(void 0)}),virtualEnabled:g.bool.def(!1),border:g.arrayOf(g.commonType(V0,"border")).def([Fs.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([])}),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),rowKey:g.oneOfType([g.string,g.func]).def(Tt.ROW_INDEX)},J0=(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(F(F({},t),e),{current:n})}return t}return{}};var Np=(e,t)=>{const n=a.ref(0),i=a.ref(0);let l=a.reactive({count:0,limit:10,current:1});l=J0(e.pagination,l);const o=a.ref(null),c=()=>{if(!e.pagination||e.remotePagination){n.value=0,i.value=e.data.length;return}n.value=(l.current-1)*l.limit,i.value=l.current*l.limit},d=a.reactive([]),h=(C,I)=>{typeof I=="function"&&C.sort(I)},f=(C,I)=>{if(typeof I=="function"){const N=C.filter((x,T)=>I(x,T,e.data));C.splice(0,C.length,...N)}},m=(C,I,N)=>{var y;const x=t.slice(),{sortScope:T}=(y=N==null?void 0:N.sort)!=null?y:{};T===$s.ALL&&h(x,I),d.splice(0,d.length,...x.slice(n.value,i.value)),f(d,C),h(d,I)},p=(C,I,N)=>{l=J0(e.pagination,l),v(),c(),m(C,I,N)},v=()=>{!e.pagination||(o.value=e.remotePagination?l:Te(F({},l),{count:e.data.length}))};return{pageData:d,localPagination:o,resolvePageData:m,watchEffectFn:p}},Lp=(e,t)=>{const n=a.toRef(e,"scrollLoading"),i=()=>typeof n.value=="boolean"?{loading:!!n.value,inline:!0,title:"",size:En.Normal,mode:Yi.Default,indicator:null}:n.value,l=a.computed(()=>n.value!==null&&(typeof n.value=="boolean"&&n.value||typeof n.value=="object"));return{renderScrollLoading:()=>{var c,d,h;if(l.value){const{loading:f,size:m,mode:p,title:v,inline:C,indicator:I}=i();return(h=(d=(c=t.slots).fixedBottom)==null?void 0:d.call(c))!=null?h:a.createVNode(Ci,{loading:f,size:m,mode:p,title:v,inline:C,indicator:I},null)}}}};function kp(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var Tp=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(e.limit);a.watch(()=>e.limit,l=>{t.value=l}),a.watch(()=>e.limitList,l=>{a.nextTick(()=>{l.includes(t.value)||([t.value]=l)})},{immediate:!0});const n=l=>{t.value=l};return{limit:t,render:({isFirst:l,isLast:o})=>{let c;return e.showLimit?a.createVNode("div",a.mergeProps({class:{"bk-pagination-limit":!0,"is-first":l,"is-last":o}},{disabled:e.disabled}),[a.createVNode("div",null,[a.createTextVNode("\u6BCF\u9875")]),a.createVNode(Ic,{class:"bk-pagination-limit-select",clearable:!1,size:"small",modelValue:t.value,onChange:n,disabled:e.disabled},kp(c=e.limitList.map((d,h)=>a.createVNode(_s,{value:d,label:`${d}`,key:`${h}_${d}`},null)))?c:{default:()=>[c]}),a.createVNode("div",null,[a.createTextVNode("\u6761")])]):null}}};const qi=5;var xp=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(1),n=a.computed(()=>t.value===1),i=a.computed(()=>t.value===e.totalPageNum),l=a.ref(!1),o=a.ref(!1),c=a.computed(()=>{l.value=!1,o.value=!1;const C=[];if(e.totalPageNum<=qi+2){for(let x=2;x<=e.totalPageNum-1;x++)C.push(x);return C}const I=Math.floor(qi/2);e.totalPageNum>qi&&(l.value=t.value-I>2,o.value=t.value+I<e.totalPageNum-1);const N=Math.min(e.totalPageNum-qi,Math.max(2,t.value-I));for(let x=N;x<N+qi;x++)C.push(x);return C});a.watch(()=>e.modelValue,C=>{a.nextTick(()=>{C>=1&&C<=e.totalPageNum?t.value=C:C<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,C=>{t.value>C&&(t.value=C)})});const d=()=>{n.value||(t.value=t.value-1)},h=()=>{i.value||(t.value=t.value+1)},f=C=>{C!==t.value&&(t.value=C)},m=()=>{t.value=Math.max(1,t.value-qi)},p=()=>{t.value=Math.min(e.totalPageNum,t.value+qi)};return{current:t,render:({isFirst:C,isLast:I})=>a.createVNode("div",{class:{"bk-pagination-list":!0,"is-first":C,"is-last":I}},[a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":n.value},onClick:d},[e.prevText||a.createVNode(yi,null,null)]),a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===1},key:"1",onClick:()=>f(1)},[a.createTextVNode("1")]),l.value&&a.createVNode("div",{key:"pre-batch",class:"bk-pagination-list-pre-batch",onClick:m},[a.createVNode(Is,null,null)]),c.value.map(N=>a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===N},key:N,onClick:()=>f(N)},[N])),o.value&&a.createVNode("div",{key:"next-batch",class:"bk-pagination-list-next-batch",onClick:p},[a.createVNode(Is,null,null)]),e.totalPageNum>1&&a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>f(e.totalPageNum)},[e.totalPageNum]),a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":i.value},onClick:h},[e.nextText||a.createVNode(Mn,null,null)])])}},Sp=()=>{const{proxy:e}=a.getCurrentInstance(),t=a.ref(null),n=a.ref(!1),i=a.ref(1),l=a.computed(()=>i.value===1),o=a.computed(()=>i.value===e.totalPageNum);let c=0;const d=a.computed(()=>{const x=[];for(let T=1;T<=e.totalPageNum;T++)x.push(T);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 h=()=>{l.value||(i.value=i.value-1)},f=()=>{o.value||(i.value=i.value+1)},m=()=>{n.value=!0},p=()=>{n.value=!1,t.value.textContent=`${c}`,c!==i.value&&(i.value=c)},v=x=>{const T=x.target,y=Number(T.textContent);!y||y<1||y>e.totalPageNum||y===i.value||(c=y)},C=x=>{["Enter","NumpadEnter"].includes(x.code)&&(x.preventDefault(),p())},I=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":l.value},onClick:h},[a.createVNode(yi,null,null)]),a.createVNode(ti,{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:v,onKeydown:C},[i.value]),a.createVNode("span",null,[a.createTextVNode("/")]),a.createVNode("span",{class:"bk-pagination-small-list-total"},[e.totalPageNum])]),content:()=>a.createVNode("div",{class:"bk-pagination-picker-list"},[d.value.map(x=>a.createVNode("div",{class:{item:!0,"is-actived":x===i.value},key:x,onClick:()=>I(x)},[x]))])}),a.createVNode("div",{class:{"bk-pagination-btn-next":!0,"is-disabled":o.value},onClick:f},[a.createVNode(Mn,null,null)])])}},Dp=()=>({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 jp={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 zp=a.defineComponent({name:"Pagination",props:jp,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const n=a.ref(0),{count:i,limit:l}=a.toRefs(e),o=Dp(),{current:c,render:d}=xp(),{current:h,render:f}=Sp(),{limit:m,render:p}=Tp();return a.watch([i,m,l],([v,C])=>{const I=Math.ceil(v/C);n.value=I<1?1:I},{immediate:!0}),a.watch(c,v=>{t.emit("update:modelValue",v),t.emit("change",v)}),a.watch(h,v=>{!e.small||(t.emit("update:modelValue",v),t.emit("change",v))}),a.watch(m,v=>{t.emit("limitChange",v)}),{totalPageNum:n,renderTotal:o,renderList:d,renderLimit:p,renderSmallList:f}},render(){const e=Se({"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 kc=Ge(zp),It=(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=>It(e,i,n)).filter(i=>i!==void 0).at(0)},Tc=e=>/^\d+$/.test(`${e}`)?[parseInt(`${e}`,10)]:[],Pp=e=>Q0(e,"auto"),Q0=(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},Op=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>V0.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},Nr=(e,t=["resizeWidth","calcWidth","width"])=>{var n,i;return(i=(n=e[t[0]])!=null?n:e[t[1]])!=null?i:e[t[2]]},xc=(e,t,n=20,i=0)=>{const{width:l}=e.getBoundingClientRect()||{},o=l-i;let c=o;const d=[],h=(m,p)=>{const{minWidth:v=void 0}=m;if(v===void 0)return p;let C=p;return/^\d+\.?\d*$/.test(`${v}`)&&(C=Number(v)),/^\d+\.?\d*%$/.test(`${v}`)&&(C=Number(v)*o/100),/^\d+\.?\d*px$/i.test(`${v}`)&&(C=Number(`${v}`.replace(/px/i,""))),C},f=(m,p,v=!0)=>{const C=h(m,p),I=p<C?C:p;Object.assign(m,{calcWidth:I}),v&&(c=c-I,c<0&&(c=0))};if(t.forEach((m,p)=>{if(!m.isHidden){const C=String(Nr(m,["resizeWidth","width"]));let I=!0;if(/^\d+\.?\d*(px)?$/.test(C)){const N=Number(C.replace("px",""));f(m,N),I=!1}if(/^\d+\.?\d*%$/.test(C)){let N=n;if(c>0){const x=Number(C.replace("%",""));N=c*x/100}f(m,N),I=!1}I&&d.push(p)}}),d.length>0){let m=n;c>0&&(m=c/d.length,d.forEach(p=>f(t[p],m,!1)))}},R0=(e,t,n=60,i=!1)=>{const l=jt.exports.throttle(()=>{typeof t=="function"&&t()},n),o=new ResizeObserver(()=>{l()});return i&&typeof t=="function"&&t(),{start:()=>{o.observe(e)},stop:()=>{o.disconnect(),o.unobserve(e)}}},Sc=e=>{const{showHead:t,headHeight:n,thead:i={}}=e;return Object.assign({},{isShow:t,height:n},F({},i))},Dc=(e,t,n)=>n.type==="index"?e[Tt.ROW_INDEX]+1:jt.exports.get(e,t),Lr=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?Lr(Reflect.apply(e,globalThis,t),t):[],Ap=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===Tt.ROW_INDEX?`__ROW_INDEX_${n}`:t.rowKey.split(".").reduce((l,o)=>Object.prototype.hasOwnProperty.call(l,o)?l[o]:l,e):typeof t.rowKey=="function"?Reflect.apply(t.rowKey,globalThis,[e]):Hi.v4(),Ep=(e,t,n=0)=>{if(e){const i=e.querySelector(t);if(i)return i.offsetHeight>e.offsetHeight-n}return!1},Vp=(e,t)=>{function n(o,c){const h=(n.canvas||(n.canvas=document.createElement("canvas"))).getContext("2d");return h.font=c,h.measureText(o).width}function i(o,c){return window.getComputedStyle(o,null).getPropertyValue(c)}function l(o=document.body){const c=i(o,"font-weight")||"normal",d=i(o,"font-size")||"16px",h=i(o,"font-family")||"Times New Roman";return`${c} ${d} ${h}`}return n(t||(e==null?void 0:e.innerHTML),l(e))};var W0=a.defineComponent({name:"TableCell",props:{column:g.any.def({}),row:g.any.def({})},setup(e,{slots:t}){const n=a.ref(),i=a.ref(!1),{showOverflowTooltip:l=!1}=e.column||{};let o=null,c=null;const d=()=>{let f=!0,m=n.value.innerText;return typeof l=="boolean"&&(f=!l),typeof l=="object"&&(f=l.disabled,typeof l.content=="function"&&(m=l.content(e.column,e.row)),m=l.content||n.value.innerText),{disabled:f,content:m}},h=()=>{if(!n.value)return;const f=Vp(n.value),m=n.value.clientWidth;if(i.value=f>m,i.value){const p=a.ref(d());c===null&&(c=hc(n.value,p))}else c==null||c.destroyInstance(n.value),c=null};return a.onMounted(()=>{var m;const{disabled:f}=d();f||(h(),((m=e.column.showOverflowTooltip)==null?void 0:m.watchCellResize)!==!1&&(o=R0(n.value,()=>{h()},60,!0),o.start()))}),a.onBeforeUnmount(()=>{o==null||o.stop(),c==null||c.destroyInstance(n.value)}),()=>{var f;return a.createVNode("div",{class:"cell",ref:n},[(f=t.default)==null?void 0:f.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)])}}),Jp=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(Ps,{scene:"part",type:t.value,description:e.emptyText},null)}});function Qp(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var Rp=a.defineComponent({name:"HeadFilter",props:{column:g.any.def({}),height:g.number.def(ii)},emits:["change","filterSave"],setup(e,{emit:t}){const{column:n}=e,i=a.reactive({isOpen:!1,checked:[]}),l=a.computed(()=>Se({[Ze("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:i.checked.length,opened:i.isOpen})),o=Se({[Ze("table-head-filter")]:!0}),c=M=>{i.isOpen=M},d=`light ${Ze("table-head-filter")}`,h=a.computed(()=>{const{list:M=[]}=n.filter;return M.map(L=>Te(F({},L),{checked:i.checked.includes(L.value)}))}),f=(M,L="ig")=>new RegExp(`${M}`.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),L),m=(M,L)=>{const{match:k}=n.filter,A=Dc(L,It(n,"field",[n,L]),n);return k==="full"&&M.includes(A),M.some(O=>f(O,"img").test(A))},p=typeof n.filter.filterFn=="function"?(M,L,k,A)=>n.filter.filterFn(M,L,e.column,k,A):(M,L)=>M.length?m(M,L):!0,v=()=>{C(!0),t("filterSave",[...i.checked]),i.isOpen=!1},C=(M=!1)=>{const{disabled:L}=N(x,"\u786E\u5B9A");if(L||M){if(e.column.filter==="custom"){t("change",[...i.checked],null),i.isOpen=!1;return}t("change",[...i.checked],p)}},I=()=>{i.checked.length&&(i.checked.splice(0,i.checked.length),i.isOpen=!1,a.nextTick(()=>t("change",i.checked,p)))},N=(M,L)=>({disabled:M==="disabled"||M===!1,text:typeof M=="string"?M:L}),{btnSave:x,btnReset:T}=n.filter,y=()=>{const{disabled:M,text:L}=N(x,"\u786E\u5B9A");return M?a.createVNode("span",{class:"btn-filter-save disabled"},[L]):a.createVNode("span",{class:"btn-filter-save",onClick:v},[L])},b=()=>{const{disabled:M,text:L}=N(T,"\u91CD\u7F6E");return M?"":a.createVNode("span",{class:["btn-filter-reset",i.checked.length?"":"disable"],onClick:I},[L])};return()=>a.createVNode(ti,a.mergeProps({trigger:"click",isShow:i.isOpen,placement:"bottom-end",arrow:!1,offset:0},{theme:d},{onAfterShow:()=>c(!0),onAfterHidden:()=>c(!1)}),{default:()=>a.createVNode(Ro,{class:l.value},null),content:()=>{let M;return a.createVNode("div",{class:o},[a.createVNode(Ko,{class:"content-list",modelValue:i.checked,"onUpdate:modelValue":L=>i.checked=L,onChange:()=>C(!1)},Qp(M=h.value.map(L=>a.createVNode("div",{class:"list-item"},[a.createVNode(Ui,{label:L.value},{default:()=>[L.text]})])))?M:{default:()=>[M]}),a.createVNode("div",{class:"content-footer"},[y(),a.createVNode("span",{class:"btn-filter-split"},null),b()])])}})}}),Li=(e=>(e.ASC="asc",e.DESC="desc",e.NULL="null",e))(Li||{}),Wp=a.defineComponent({name:"HeadSort",props:{column:g.any.def({})},emits:["change"],setup(e,{emit:t}){const n=a.ref(""),i=(l,o)=>{var p,v;if(l.stopImmediatePropagation(),l.stopPropagation(),l.preventDefault(),n.value===o?n.value=Li.NULL:n.value=o,e.column.sort==="custom"){t("change",null,o);return}const c=e.column.field,d=C=>Dc(C,c,e.column),h=(C,I)=>{const N=d(C),x=d(I);return typeof N=="number"&&typeof x=="number"?N-x:String.prototype.localeCompare.call(N,x)},f=typeof((p=e.column.sort)==null?void 0:p.sortFn)=="function"?(v=e.column.sort)==null?void 0:v.sortFn:h,m=n.value===Li.NULL?()=>!0:(C,I)=>f(C,I)*(o===Li.DESC?-1:1);t("change",m,o)};return()=>a.createVNode("span",{class:Ze("head-cell-sort")},[a.createVNode(xo,{class:["sort-action","sort-asc",n.value===Li.ASC?"active":""],onClick:l=>i(l,Li.ASC)},null),a.createVNode(ys,{class:["sort-action","sort-desc",n.value===Li.DESC?"active":""],onClick:l=>i(l,Li.DESC)},null)])}});class Hp{constructor(t,n){Ka(this,"props",null);Ka(this,"ctx",null);this.props=t,this.ctx=n}}function H0(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var Bp=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([])}),g.bool]).def(!1),columns:g.array.def([]),rowHeight:g.number.def(ii)},emits:["change"],setup(e,{emit:t}){const n=wp,i=a.ref(!1),l=a.ref(!1),o=typeof e.settings=="boolean"?a.ref({fields:e.columns.map(P=>Te(F({},P),{field:P.field||P.type})),checked:[],limit:0,size:"small",sizeList:n}):a.ref(e.settings),c=a.ref(o.value.size||"small"),d=a.ref(e.rowHeight),h=a.ref(o.value.checked),m=`light ${Ze("table-settings")}`,p={checkAll:i.value,activeSize:c.value,activeHeight:d.value},v=()=>{t("change",{checked:h.value,size:c.value,height:d.value}),l.value=!1},C=()=>{i.value=p.checkAll,c.value=p.activeSize,d.value=p.activeHeight,h.value=o.value.checked||[],l.value=!1},I=()=>{Object.assign(p,{checkAll:i.value,activeSize:c.value,activeHeight:d.value}),l.value=!0},N=P=>{P.stopImmediatePropagation(),P.stopPropagation(),P.preventDefault(),i.value=!i.value;const E=o.value.fields||e.columns||[];if(i.value)h.value=E.map((ee,H)=>It(ee,"field",[ee,H]));else{const ee=E.filter(H=>H.disabled).map((H,le)=>It(H,"field",[H,le]));h.value.splice(0,h.value.length,...ee)}},x=a.computed(()=>{var P;return((P=o.value.limit)!=null?P:0)>0}),T=o.value.sizeList||n,y=a.computed(()=>x.value&&(o.value.limit?o.value.limit:0)<=h.value.length),b=(P,E)=>P.disabled||y.value&&!h.value.includes(It(P,"field",[P,E])),M=P=>{c.value=P.value,d.value=P.height},L=P=>({"line-size":!0,"is-medium":c.value==="medium",active:P.value===c.value}),k={marginRight:"12px"},A=()=>T.map(P=>a.createVNode("span",{class:L(P),onClick:()=>M(P)},[P.label])),O=a.computed(()=>o.value.fields||e.columns||[]),J=a.computed(()=>h.value.length>0&&!O.value.every((P,E)=>h.value.includes(It(P,"field",[P,E]))));return a.watch(()=>[h.value],()=>{h.value.length||(i.value=!1),h.value.length&&O.value.every((P,E)=>h.value.includes(It(P,"field",[P,E])))&&(i.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{h.value.splice(0,h.value.length,...o.value.checked)},{immediate:!0,deep:!0}),()=>e.settings?a.createVNode(ti,a.mergeProps({trigger:"manual",isShow:l.value,placement:"bottom-end",arrow:!1},{theme:m}),{default:()=>a.createVNode("span",{class:"table-head-settings"},[a.createVNode(Po,{style:"color: #c4c6cc;",onClick:I},null)]),content:()=>{let P;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(Ms,{class:"icon-close-action",onClick:C},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")]),x.value?a.createVNode("span",{class:"limit"},[a.createTextVNode("\uFF08\u6700\u591A"),o.value.limit,a.createTextVNode("\u9879\uFF09")]):""]),x.value?"":a.createVNode("span",{class:"check-all",onClick:N},[a.createVNode(Ui,{label:"\u5168\u9009",indeterminate:Boolean(J.value),modelValue:h.value.length>0},{default:()=>[a.createTextVNode("\u5168\u9009")]})])]),a.createVNode(Ko,{class:"setting-body-fields",modelValue:h.value,"onUpdate:modelValue":E=>h.value=E},H0(P=O.value.map((E,ee)=>{let H;return a.createVNode("div",{class:"field-item"},[a.createVNode(Ui,{label:It(E,"field",[E,ee]),checked:h.value.includes(It(E,"field",[E,ee])),disabled:b(E,ee)},H0(H=It(E,"label",[E,ee]))?H:{default:()=>[H]})])}))?P:{default:()=>[P]}),a.createVNode("div",{class:"setting-body-line-height"},[a.createTextVNode("\u8868\u683C\u884C\u9AD8\uFF1A"),A()])]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Wt,{theme:"primary",style:k,onClick:v},{default:()=>[a.createTextVNode("\u786E\u5B9A")]}),a.createVNode(Wt,{style:k,onClick:C},{default:()=>[a.createTextVNode("\u53D6\u6D88")]})])])}}):""}}),zc=(e,t,n)=>{const i=a.computed(()=>e.pagination&&e.data.length?ii:0),l=(p,v,C)=>({column_fixed:!!p.fixed,column_fixed_left:p.fixed!=="right",column_fixed_right:p.fixed==="right",shadow:p.fixed==="right"?v<C:v>0}),o=p=>p.fixed==="right"?"right":"left",c={left:(p=!0)=>t.filter(v=>v.fixed&&v.fixed!=="right").reduce((v,C,I)=>p&&I===0?v:v+Nr(C),0),right:(p=!0)=>t.filter(v=>v.fixed==="right").reduce((v,C,I)=>p&&I===0?v:v+Nr(C),n?Lc:0)},d=c.right,h=()=>{const p=(I,N)=>{if(!I.fixed)return{};const x=o(I),T=x==="right"?-1:1,y=`${N[x]}px`;return N[x]=N[x]+Nr(I)*T,{[x]:y}},v=d(!0);return{fixedOffset:{left:0,right:v},resolveFixedColumnStyle:p}},f=(p,v)=>{const C=N=>({width:`${c[N](!1)}px`,bottom:`${i.value}px`}),I={left:!1,right:!1};return t.filter(N=>!N.isHidden&&N.fixed).map(N=>{const x=o(N),T=I[x];return I[x]=!0,T?"":a.createVNode("div",{class:l(N,p,v),style:C(x)},null)})},m=Ze("table-fixed");return{renderFixedColumns:f,fixedWrapperClass:m,getFixedColumnStyleResolve:h}};function B0(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}class Zp{constructor(t,n,i,l){Ka(this,"getRowHeight",(t,n)=>{const{size:i,height:l}=this.setting;return l!=null?It(this.setting,"height",["tbody",t,n,i]):It(this.props,"rowHeight",["tbody",t,n])});Ka(this,"getColumnClass",(t,n)=>({[`${this.uuid}-column-${n}`]:!0,column_fixed:!!t.fixed,column_fixed_left:!!t.fixed,column_fixed_right:t.fixed==="right"}));Ka(this,"getHeadColumnClass",(t,n)=>Te(F({},this.getColumnClass(t,n)),{active:this.isColActive(n)}));this.props=t,this.context=n,this.reactiveProp=i,this.colgroups=l,this.plugins=new Hp(t,n),this.uuid=Hi.v4(),this.events=new Map}get propActiveCols(){return this.reactiveProp.activeColumns}renderTableHeadSchema(){const{isShow:t=!0}=Sc(this.props);if(!t)return null;const n=i=>{const{checked:l=[],size:o,height:c}=i;this.reactiveProp.setting.size=o,this.reactiveProp.setting.height=c,l.length&&this.colgroups.forEach(d=>{d.isHidden=!(l!=null?l:[]).includes(It(d,["field","type"],[d]))}),this.emitEvent(ni.ON_SETTING_CHANGE,[i])};return[this.props.settings?a.createVNode(Bp,{class:"table-head-settings",settings:this.reactiveProp.settings,columns:this.props.columns,rowHeight:this.props.rowHeight,onChange:n},null):"",a.createVNode("table",{cellpadding:0,cellspacing:0},[this.renderColGroup(),this.renderHeader()])]}renderTableBodySchema(t){var n,i,l;return t.length?a.createVNode("table",{cellpadding:0,cellspacing:0,"data-table-uuid":this.uuid},[this.renderColGroup(),this.renderTBody(t)]):(l=(i=(n=this.context.slots).empty)==null?void 0:i.call(n))!=null?l:a.createVNode(Jp,{filterList:t,list:this.props.data,emptyText:this.props.emptyText},null)}renderTableFooter(t){return a.createVNode(kc,a.mergeProps(t,{modelValue:t.current,onLimitChange:n=>this.handlePageLimitChange(n),onChange:n=>this.hanlePageChange(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(ln.PAGE_LIMIT_CHANGE,t)}hanlePageChange(t){Object.assign(this.props.pagination,{current:t,value:t}),this.context.emit(ln.PAGE_VALUE_CHANGE,t)}setColumnActive(t,n=!1){const i=this.propActiveCols.find(l=>l.index===t);Object.assign(i,{active:!i.active}),n&&this.propActiveCols.filter(l=>l.index!==t&&l.active).forEach(l=>{Object.assign(l,{active:!1})})}handleColumnHeadClick(t){this.props.columnPick!=="disabled"&&(this.setColumnActive(t,this.props.columnPick==="single"),this.context.emit(ln.COLUMN_PICK,this.propActiveCols))}getSortCell(t,n){const i=(l,o)=>{this.emitEvent(ni.ON_SORT_BY_CLICK,[{sortFn:l,column:t,index:n,type:o}])};return a.createVNode(Wp,{column:t,onChange:i},null)}getFilterCell(t,n){const i=(o,c)=>{const d=(h,f)=>c(o,h,f);this.emitEvent(ni.ON_FILTER_CLICK,[{filterFn:d,checked:o,column:t,index:n}])},l=o=>{this.context.emit(ln.COLUMN_FILTER_SAVE,{column:t,values:o})};return a.createVNode(Rp,{column:t,height:this.props.headHeight,onChange:i,onFilterSave:l},null)}renderHeader(){const t=Sc(this.props),{cellFn:n}=t,i={"--row-height":`${It(t,"height",["thead"])}px`},l=(f,m)=>{const p=[];return f.sort&&p.push(this.getSortCell(f,m)),f.filter&&p.push(this.getFilterCell(f,m)),typeof n=="function"?(p.unshift(n(f,m)),p):(p.unshift(It(f,"label",[f,m])),p)},o=f=>Array.from(f.listeners.keys()).reduce((m,p)=>{const v=p.split("_").slice(-1)[0];return Object.assign(m,{[v]:C=>{f.listeners.get(p).forEach(I=>Reflect.apply(I,this,[C,f,this]))}})},{}),{getFixedColumnStyleResolve:c}=zc(this.props,this.colgroups),{resolveFixedColumnStyle:d,fixedOffset:h}=c();return a.createVNode("thead",{style:i},[a.createVNode(jc,null,{default:()=>[a.createVNode("tr",null,[this.filterColgroups.map((f,m)=>{let p;return a.createVNode("th",a.mergeProps({colspan:1,rowspan:1,class:this.getHeadColumnClass(f,m),style:d(f,h),onClick:()=>this.handleColumnHeadClick(m)},o(f)),[a.createVNode(W0,null,B0(p=l(f,m))?p:{default:()=>[p]})])})])]})])}renderTBody(t){const{getFixedColumnStyleResolve:n}=zc(this.props,this.colgroups);return a.createVNode("tbody",null,[t.map((i,l)=>{const o=[...Lr(this.props.rowStyle,[i,l,this]),{"--row-height":`${this.getRowHeight(i,l)}px`}],c=[...Lr(this.props.rowClass,[i,l,this])],{resolveFixedColumnStyle:d,fixedOffset:h}=n(),f=`${this.uuid}-${i[Tt.ROW_UID]}`;return[a.createVNode(jc,{key:f},{default:()=>[a.createVNode("tr",{style:o,class:c,onClick:m=>this.handleRowClick(m,i,l,t),onDblclick:m=>this.handleRowDblClick(m,i,l,t)},[this.filterColgroups.map((m,p)=>{let v;const C=[d(m,h),...Lr(this.props.cellStyle,[m,p,i,l,this])],I=[this.getColumnClass(m,p),...Lr(this.props.cellClass,[m,p,i,l,this]),{"expand-row":i[Tt.ROW_EXPAND]}],N={cell:!0,"expand-cell":m.type==="expand"},x=`__CELL_${l}_${p}`;return a.createVNode("td",{class:I,style:C,key:x,colspan:1,rowspan:1},[a.createVNode(W0,{class:N,column:m,row:i},B0(v=this.renderCell(i,m,l,t))?v:{default:()=>[v]})])})])]}),this.renderExpandRow(i,c)]})])}renderExpandRow(t,n){if(!!t[Tt.ROW_EXPAND]){const l=[...n,{row_expend:!0}],o=`${this.uuid}-${t[Tt.ROW_UID]}_expand`;return a.createVNode(jc,{key:o},{default:()=>{var c,d,h;return[a.createVNode("tr",{class:l},[a.createVNode("td",{colspan:this.filterColgroups.length,rowspan:1},[(h=(d=(c=this.context.slots).expandRow)==null?void 0:d.call(c,t))!=null?h:a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}}handleRowClick(t,n,i,l){this.context.emit(ln.ROW_CLICK,t,n,i,l,this)}handleRowDblClick(t,n,i,l){this.context.emit(ln.ROW_DBL_CLICK,t,n,i,l,this)}getExpandCell(t){return!!t[Tt.ROW_EXPAND]?a.createVNode(ws,null,null):a.createVNode(ks,null,null)}handleRowExpandClick(t,n,i,l,o){this.emitEvent(ni.ON_ROW_EXPAND_CLICK,[{row:t,column:n,index:i,rows:l,e:o}])}renderCell(t,n,i,l){if(n.type==="expand"){const c=()=>{var d,h,f;return typeof n.render=="function"?n.render(null,t,i,l):(f=(h=(d=this.context.slots).expandCell)==null?void 0:h.call(d,{row:t,column:n,index:i,rows:l}))!=null?f:this.getExpandCell(t)};return a.createVNode("span",{class:"expand-btn-action",onClick:d=>this.handleRowExpandClick(t,n,i,l,d)},[c()])}const o=Dc(t,It(n,"field",[n,t]),n);if(typeof n.render=="function"){const c=this.props.data[t[Tt.ROW_INDEX]];return n.render({cell:o,data:c,row:t,column:n,index:i,rows:l})}return 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=Se({active:this.isColActive(n)}),l=`${Pp(Nr(t))}`.replace(/px$/i,"");return a.createVNode("col",{class:i,width:l},null)})])}get filterColgroups(){return this.colgroups.filter(t=>!t.isHidden)}get setting(){return this.reactiveProp.setting}}const Z0=e=>e.columnPick!=="disabled"?e.columnPick==="multi"?Array.isArray(e.activeColumn)?e.activeColumn:Tc(e.activeColumn):Array.isArray(e.activeColumn)?Tc(e.activeColumn[0]):Tc(e.activeColumn):[];var Gp=e=>{let t=a.reactive([]);if(e.columnPick==="disabled")return{activeColumns:t};const n=a.reactive(Z0(e)),i=()=>(e.columns||[]).map((l,o)=>({index:o,active:n.some(c=>c===o),_column:l}));return a.watchEffect(()=>{t=i();const l=Z0(e);t.forEach((o,c)=>{Object.assign(o,{active:l.some(d=>d===c)})})}),{activeColumns:t}},_p=(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 l=!1,o=!1,c=!1,d=0,h=null,f=0;const m=a.ref(-1e3),p=b=>{var A;o=!1,c=!1;const M=document.body.style;M.cursor="";const L=b.clientX-d;h.resizeWidth=((A=h.resizeWidth)!=null?A:h.calcWidth)+L,document.removeEventListener("mouseup",p),document.removeEventListener("mousemove",C),d=0,m.value=-1e3,h=null,b.target.closest("table").querySelectorAll("th").forEach(O=>O.style.setProperty("user-select","inherit"))},v=b=>jt.exports.throttle(()=>{m.value=b.clientX-d+f},60),C=b=>{document.body.style.setProperty("cursor",""),v(b)()},I={[i.MOUSE_DOWN]:(b,M)=>{if(!l)return;o=!0,document.body.style.setProperty("cursor","col-resize"),h=M,d=b.clientX;const k=b.target.closest("table");f=d-k.getBoundingClientRect().left,document.addEventListener("mouseup",p),document.addEventListener("mousemove",C)},[i.MOUSE_MOVE]:(b,M)=>{o&&!c&&(c=!0);const L=b.target.closest("th");if(c&&L.style.setProperty("user-select","none"),!c){if(!L)return;const k=L.getBoundingClientRect();k.width>12&&k.right-b.pageX<8?(l=!0,L.style.setProperty("cursor","col-resize")):(L.style.setProperty("cursor",""),l=!1)}},[i.MOUSE_OUT]:(b,M)=>{const L=b.target;c||L.style.setProperty("cursor","")}},N=b=>`${n}_${b}`,x=()=>{e.forEach(b=>{b.resizable!==!1&&Object.keys(I).forEach(M=>{const L=N(M);b.listeners.has(L)||b.listeners.set(L,[]),b.listeners.get(L).push(I[M])})})},T=()=>{e.forEach(b=>{Object.keys(I).forEach(M=>{const L=N(M);if(b.listeners.has(L)){const k=b.listeners.get(L);k.splice(0,k.length)}})})};t&&x();const y=a.computed(()=>({position:"absolute",top:0,bottom:0,left:0,width:"1px","background-color":"#ebeef5"}));return{registerResizeEvent:x,resetResizeEvents:T,dragOffsetX:m,dragOffsetXStyle:y}};const Yp=(e,t,n,i)=>{const l=a.ref(200),o=a.ref(void 0),c=a.computed(()=>e.pagination&&e.data.length),d=a.computed(()=>Se({[Ze("table")]:!0,"has-footer":c.value,"has-scroll-y":o.value||e.virtualEnabled},Op(e.border))),h=Se({[Ze("table-head")]:!0,"has-settings":!!e.settings}),f=Sc(e),m=a.computed(()=>({"--row-height":`${It(f,"height",["thead"])}px`,"--scroll-head-left":`-${n.scrollTranslateX}px`,"--scroll-left":`${n.scrollTranslateX}px`})),p={[Ze("table-body")]:!0},v=a.computed(()=>Se({[Ze("table-footer")]:!0,["is-hidden"]:!e.pagination||!e.data.length})),C=()=>{if(e.columns.every(k=>/^\d+\.?\d*(px)?$/ig.test(`${k.width}`))){const k=e.columns.reduce((O,J)=>O+Number(`${J.width}`.replace(/px/ig,"")),0),A=o.value?Lc:0;return`${k+A}px`}return"100%"},I=a.computed(()=>({minHeight:Q0(e.minHeight,"auto"),width:C(),maxWidth:"100%"})),N=(k,A)=>{const O=String(k);if(/^\d+\.?\d*$/.test(O))return Number(O);if(/^\d+\.?\d*px$/ig.test(O))return Number(O.replace("px",""));if(/^\d+\.?\d*%$/ig.test(O)&&typeof A=="number"){const J=Number(O.replace("%",""));return A*J/100}return A},x=a.reactive({}),T=()=>e.showHead?N(e.headHeight,ii):0,y=()=>{const k=N(e.height,l.value),A=T(),O=N(e.minHeight,l.value),J=e.pagination&&e.data.length?ii:0,P=k-A-J,E=e.height!=="auto"?`${P}px`:!1,ee=O-A-J,H=N(e.maxHeight,void 0),le=typeof H=="number"?`${H-A-J}px`:!1;Object.assign(x,{display:i!=null&&i.length?"block":!1,"min-height":`${ee}px`,height:E,maxHeight:le})};a.onMounted(()=>{b(t==null?void 0:t.value)});const b=k=>{if(k){const{height:A}=k.parentElement.getBoundingClientRect();l.value=A,y(),M(k)}},M=k=>{const A=e.virtualEnabled?`.${Ze("virtual-section")}`:`.${Ze("table-body-content")}`,O=k.querySelector(".bk-table-body");o.value=Ep(O,A,0)};return{tableClass:d,headClass:h,contentClass:p,footerClass:v,wrapperStyle:I,contentStyle:x,headStyle:m,resetTableHeight:b,updateBorderClass:M,getColumnsWidthOffsetWidth:()=>{let k=0;return o.value&&(k=k+Lc),e.border.includes(Fs.OUTER)&&!e.border.includes(Fs.NONE)&&(k=k+2),k},hasFooter:c,hasScrollY:o}},Fp=e=>{var x,T;const t=a.reactive([]),n=()=>{t.splice(0,t.length,...(e.columns||[]).map(y=>Te(F({},y),{calcWidth:null,resizeWidth:null,listeners:new Map})))},{dragOffsetXStyle:i,dragOffsetX:l,resetResizeEvents:o,registerResizeEvent:c}=_p(t,!0),{activeColumns:d}=Gp(e);a.watch(()=>e.columns,()=>{n(),o(),c()},{immediate:!0,deep:!0});const h=a.reactive({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:d,settings:e.settings,setting:{size:(x=e.settings)==null?void 0:x.size,height:Us[(T=e.settings)==null?void 0:T.size]}}),f=y=>{var b;return h.rowActions.has(y)?(b=h.rowActions.get(y))==null?void 0:b.isExpand:!1},m=(y,b=void 0)=>{var k;const M=y[Tt.ROW_UID],L=typeof b=="boolean"?b:!f(M);h.rowActions.set(M,Object.assign({},(k=h.rowActions.get(M))!=null?k:{},{isExpand:L})),C()},p=a.reactive([]),v=(y=!1)=>{p.splice(0,p.length,...e.data.map((b,M)=>{const L=Ap(b,e,M);return Te(F({},b),{[Tt.ROW_INDEX]:M,[Tt.ROW_UID]:L,[Tt.ROW_EXPAND]:y?f(L):!1})}))},C=()=>{p.forEach(y=>{Object.assign(y,{[Tt.ROW_EXPAND]:f(y[Tt.ROW_UID])})})},{renderFixedColumns:I,fixedWrapperClass:N}=zc(e,t,!1);return{colgroups:t,dragOffsetXStyle:i,dragOffsetX:l,reactiveSchema:h,indexData:p,fixedWrapperClass:N,initIndexData:v,updateIndexData:C,renderFixedColumns:I,setRowExpand:m,updateColGroups:n}};var Up=a.defineComponent({name:"Table",props:Ip,emits:Mp,setup(e,t){let n=null,i=null,l=null,o=null;const c=a.ref(),d=a.ref(),h=a.ref(0),{colgroups:f,dragOffsetXStyle:m,dragOffsetX:p,reactiveSchema:v,indexData:C,renderFixedColumns:I,setRowExpand:N,initIndexData:x,fixedWrapperClass:T}=Fp(e),{pageData:y,localPagination:b,resolvePageData:M,watchEffectFn:L}=Np(e,C),{tableClass:k,headClass:A,contentClass:O,footerClass:J,wrapperStyle:P,contentStyle:E,headStyle:ee,updateBorderClass:H,resetTableHeight:le,getColumnsWidthOffsetWidth:de,hasFooter:he}=Yp(e,c,v,y),ye=new Zp(e,t,v,f),re=()=>{const ne=c.value.querySelector(".bk-table-body-content"),Y=ne.querySelector("table");if(Y){const Z=Y.scrollWidth,ae=ne.clientWidth;h.value=Z-ae}};a.watch(()=>[e.data,e.pagination],()=>{x(e.reserveExpand),L(l,n,i),a.nextTick(()=>{le(c.value),H(c.value)})},{immediate:!0,deep:!0}),a.watchEffect(()=>{if((c==null?void 0:c.value)instanceof HTMLElement){const ne=de();xc(c.value,f,20,ne),re()}}),ye.on(ni.ON_SORT_BY_CLICK,ne=>{var D,W;const{sortFn:Y,column:Z,index:ae,type:pe}=ne;typeof Y=="function"&&(n=Y,i=Z,M(l,n,i),(W=(D=d.value)==null?void 0:D.reset)==null||W.call(D)),t.emit(ln.COLUMN_SORT,{column:Z,index:ae,type:pe})}).on(ni.ON_FILTER_CLICK,ne=>{var D,W;const{filterFn:Y,checked:Z,column:ae,index:pe}=ne;typeof Y=="function"&&(l=Y,M(l,n,i),(W=(D=d.value)==null?void 0:D.reset)==null||W.call(D)),t.emit(ln.COLUMN_FILTER,{checked:Z,column:ae,index:pe})}).on(ni.ON_SETTING_CHANGE,ne=>{const{checked:Y=[],size:Z,height:ae}=ne;a.nextTick(()=>{var D,W;H(c.value);const pe=de();Y.length&&xc(c.value,f,20,pe),(W=(D=d.value)==null?void 0:D.reset)==null||W.call(D),t.emit(ln.SETTING_CHANGE,{checked:Y,size:Z,height:ae})})}).on(ni.ON_ROW_EXPAND_CLICK,ne=>{const{row:Y,column:Z,index:ae,rows:pe,e:D}=ne;t.emit(ln.ROW_EXPAND_CLICK,{row:Y,column:Z,index:ae,rows:pe,e:D}),N(Y,!Y[Tt.ROW_EXPAND])});const K=ne=>{var Q;const Y=(Q=v.pos.bottom)!=null?Q:0,Z=ne[1],{translateX:ae,translateY:pe,pos:D={}}=Z;v.scrollTranslateY=pe,v.scrollTranslateX=ae,v.pos=D;const{bottom:W}=D;W<=2&&Y>W&&yf(60,()=>{t.emit(ln.SCROLL_BOTTOM,Te(F({},D),{translateX:ae,translateY:pe}))},!0)(),re()};a.onMounted(()=>{o=R0(c.value,()=>{(e.height==="100%"||e.height==="auto")&&le(c.value),H(c.value);const ne=de();xc(c.value,f,20,ne)},60,!0),o.start()}),a.onBeforeUnmount(()=>{o.stop(),o=null,ye.destroy()}),t.expose({setRowExpand:N});const B=a.computed(()=>Te(F({},O),{"__is-empty":!y.length})),V={[Ze("table-body-content")]:!0,"with-virtual-render":e.virtualEnabled},$={column_drag_line:!0,"offset-x":!0},X=a.computed(()=>Te(F({},m.value),{left:`${p.value-v.scrollTranslateX}px`})),fe={"scroll-loading":!0,_bottom:!0},ce={[Ze("fixed-bottom-border")]:!0,"_is-empty":!e.data.length},{renderScrollLoading:Ce}=Lp(e,t),Ee=e.virtualEnabled?{}:{scrollXName:"",scrollYName:""};return()=>a.createVNode("div",{class:k.value,style:P.value,ref:c},[a.createVNode("div",{class:A,style:ee.value},[ye.renderTableHeadSchema()]),a.createVNode(Ir,a.mergeProps({ref:d,lineHeight:ye.getRowHeight,class:B.value,style:E,list:y},Ee,{contentClassName:V,onContentScroll:K,throttleDelay:0,scrollEvent:!0,enabled:e.virtualEnabled}),{default:ne=>ye.renderTableBodySchema(ne.data||e.data),afterSection:()=>a.createVNode("div",{class:ce},null)}),a.createVNode("div",{class:T},[I(v.scrollTranslateX,h.value),a.createVNode("div",{class:$,style:X.value},null),a.createVNode("div",{class:fe},[Ce()])]),a.createVNode("div",{class:J.value},[he.value&&ye.renderTableFooter(b.value)])])}});const G0=Ge(Up),Da=12;function $p(e){const t=a.reactive({curPage:1,totalSize:0,totalPage:0,pageSize:e,isPageLoading:!1,curPageList:[],renderListPaged:[]});return{pageState:t,initPage:(l=[])=>{t.curPage=1,t.totalSize=l.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(l.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:l=>{t.curPage=l,t.curPageList.splice(t.curPageList.length,0,...t.renderListPaged[t.curPage-1]||[]),t.isPageLoading=!1}}}function Xp(e){const{useGroup:t,saveKey:n,displayKey:i,list:l}=a.toRefs(e),o=a.reactive([]);a.watch([t,n,i,l],()=>{o.splice(0,o.length);let d=l.value;t.value&&(d=l.value.reduce((h,f)=>{let m=[];return f.children&&(m=f.children.map(p=>F({group:{groupId:f[n.value],groupName:f[i.value]}},p))),h.concat(m)},[])),c(d)},{immediate:!0,deep:!0});function c(d){const f=d.length;for(let m=0;m<f;m+=3e4){const p=d.slice(m,Math.min(m+3e4,f));o.push(...p)}}return o}const _0=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 Y0=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,default:null}},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 Kp=()=>({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,default:null},filterCallback:{type:Function,default:null},tagTpl:{type:Function,default:null},tpl:{type:Function,default:null},pasteFn:{type:Function,default:null},withValidate:{type:Boolean,default:!0}});var qp=a.defineComponent({name:"TagRender",props:{node:g.object,displayKey:g.string,tpl:{type:Function,default:null}},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]])])}}),e5=a.defineComponent({name:"TagInput",directives:{bkTooltips:cc},props:Kp(),emits:["update:modelValue","change","select","blur","remove","removeAll"],setup(e,{emit:t}){const n=On(),i=a.reactive({isEdit:!1,isHover:!1,focusItemIndex:e.allowCreate?-1:0}),l=a.reactive({isShow:!1,width:190,modifiers:[{name:"offset",options:{offset:[0,4]}}]}),{maxResult:o}=a.toRefs(e),{pageState:c,initPage:d,pageChange:h}=$p(o),f=a.ref(""),m=a.ref(null),p=a.ref(null),v=a.ref(null),C=a.ref(null),I=a.ref(null),N=a.ref(null),x=a.ref(null),T=a.computed(()=>!e.disabled&&e.hasDeleteIcon),y=a.computed(()=>e.maxData===1),b=a.computed(()=>P.selectedTagList.length===0&&f.value===""&&!i.isEdit),M=a.computed(()=>e.clearable&&!e.disabled&&P.selectedTagList.length!==0&&(e.showClearOnlyHover?i.isHover:!0)),L=a.computed(()=>({"bk-tag-input-trigger":!0,active:i.isEdit,disabled:e.disabled}));a.watch([()=>[...e.modelValue],()=>[...e.list]],()=>{var G;a.nextTick(()=>{le()}),e.withValidate&&((G=n==null?void 0:n.validate)==null||G.call(n,"change"))}),a.watch(f,jt.exports.debounce(()=>{const G=c.curPageList.length!==0,{value:te}=f;te!==""&&G||te===""&&e.trigger==="focus"&&G?l.isShow=!0:(e.trigger!=="focus"||!G)&&(l.isShow=!1)},150)),a.watch(()=>l.isShow,G=>{k(),G&&I.value&&(a.nextTick(()=>{I.value.scrollTop=0}),I.value.removeEventListener("scroll",A),I.value.addEventListener("scroll",A))});const k=()=>{var te,ie;const G=y.value?0:(te=C.value)==null?void 0:te.offsetLeft;l.modifiers=[{name:"offset",options:{offset:[G,4]}}],(ie=N.value)==null||ie.update()},A=()=>{if(c.isPageLoading||I.value.scrollTop===0)return;const{scrollTop:G,offsetHeight:te,scrollHeight:ie}=I.value;if(G+te>=ie){const Me=c.curPage+1;Me<=c.totalPage&&(c.isPageLoading=!0,setTimeout(()=>{h(Me)},500))}},O=()=>{var te;return Array.from(((te=v.value)==null?void 0:te.childNodes)||[]).filter(ie=>ie.nodeType!==Node.TEXT_NODE)},J=G=>{if(!e.disabled){if(G!=null&&G.target){const{className:te}=G.target;(te.indexOf("bk-tag-input-trigger")>-1||te.indexOf("tag-list")>-1)&&v.value.appendChild(C.value)}clearTimeout(x.value),y.value&&E.value.length&&(P.tagListCache=[...E.value],P.selectedTagListCache=[...P.selectedTagList],f.value=P.selectedTagListCache[0][e.saveKey],Q(P.selectedTagList[0],0),V()),i.isEdit=!0,a.nextTick(()=>{var te;(te=m.value)==null||te.focus(),e.trigger==="focus"&&P.localList.length!==0&&(de(),l.isShow?k():l.isShow=!0)})}},P=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),E=a.computed(()=>P.selectedTagList.map(G=>G[e.saveKey])),ee=Xp(e),H=a.computed(()=>{if(e.useGroup){const G={};return c.curPageList.forEach((te,ie)=>{te.__index__=ie,G[te.group.groupId]||(G[te.group.groupId]={id:te.group.groupId,name:te.group.groupName,children:[]}),G[te.group.groupId].children.push(te)}),Object.keys(G).map(te=>G[te])}return c.curPageList}),le=()=>{const{saveKey:G,modelValue:te,displayKey:ie,allowCreate:Me,trigger:Ie}=e;P.selectedTagList=[],P.localList=[...ee],te.length&&(te.forEach(Le=>{const He=P.localList.find(ot=>Le===ot[G]);He!==void 0?P.selectedTagList.push(He):Me&&!E.value.includes(Le)&&P.selectedTagList.push({[G]:Le,[ie]:Le})}),y.value||(P.localList=P.localList.filter(Le=>!te.includes(Le[G])))),Ie==="focus"&&de()},de=(G="")=>{const{searchKey:te,filterCallback:ie}=e,Me=G.toLowerCase();let Ie=[];if(typeof ie=="function")Ie=ie(Me,te,P.localList)||[];else if(Array.isArray(te)){const Le=te.map(He=>P.localList.filter(ot=>ot[He].toLowerCase().indexOf(Me)!==-1));Ie=Array.from(new Set(Le.flat()))}else Ie=P.localList.filter(Le=>Le[te].toLowerCase().indexOf(Me)!==-1);d(Ie)},he=(G,te)=>{const ie={"bk-selector-actived":!1,"bk-selector-selected":E.value.includes(G[e.saveKey])};return e.useGroup?ie["bk-selector-actived"]=G.__index__===i.focusItemIndex:ie["bk-selector-actived"]=te===i.focusItemIndex,ie};a.onMounted(()=>{le()});const ye=()=>{P.tagListCache=[],P.selectedTagListCache=[],P.selectedTagList=[]},re=()=>{f.value=""},K=()=>{if(y.value)return 0;const te=O().findIndex(({id:ie})=>ie==="tagInputItem");return te>=0?te:0},B=(G,te,ie=!1)=>{if(!te||!G)return;let Me=te;ie&&(Me=te.nextElementSibling||null),te.parentNode.insertBefore(G,Me)},V=G=>{const{maxData:te,trigger:ie,allowCreate:Me}=e;if(te===-1||te>E.value.length){const{value:Ie}=G!=null&&G.target?G.target:f,Le=_0(Ie);Le?(de(Ie),m.value.style.width=`${Le*Da}px`):ie==="focus"&&de()}else X(),f.value="",l.isShow=!1;i.isEdit=!0,i.focusItemIndex=Me?-1:0},$=()=>{var G;l.width=y.value?(G=p.value)==null?void 0:G.clientWidth:e.contentWidth},X=()=>{x.value=setTimeout(()=>{var te;const G=f.value;if(re(),i.isEdit=!1,y.value){const[ie]=P.tagListCache;G&&G===ie&&P.selectedTagListCache.length?W(P.selectedTagListCache[0],"select"):Ce("remove")}else if(e.allowAutoMatch&&G){const ie=c.curPageList.find(Me=>Array.isArray(e.searchKey)?e.searchKey.map(Le=>Me[Le]).includes(G):Me[e.searchKey]===G);ie?fe(ie,"select"):e.allowCreate&&fe(G,"custom")}l.isShow=!1,t("blur",G,E.value),(te=n==null?void 0:n.validate)==null||te.call(n,"blur")},200)},fe=(G,te,ie)=>{ie==null||ie.stopPropagation(),!(!G||G.disabled)&&(y.value&&ye(),W(G,te),Ce("select"),re(),l.isShow=!1)},ce=(G,te,ie)=>{ie==null||ie.stopPropagation(),Q(G,te),re(),Ce("remove",G),m.value.style.width=`${Da}px`},Ce=(G,te)=>{t("change",E.value),t(G,te),t("update:modelValue",E.value)},Ee=G=>{G.stopPropagation();const te=P.selectedTagList;P.selectedTagList=[];const ie=ee.filter(Me=>te.some(Ie=>Ie[e.saveKey]===Me[e.saveKey]));(e.allowCreate&&ie.length!==0||!e.allowCreate)&&!y.value&&P.localList.push(...ie),Ce("removeAll")},ne=()=>{const G={height:I.value.clientHeight,yAxis:I.value.getBoundingClientRect().y};a.nextTick(()=>{const te=I.value.querySelector(".bk-selector-actived");if(!te)return;const ie={height:te.clientHeight,yAxis:te.getBoundingClientRect().y};ie.yAxis<G.yAxis&&(I.value.scrollTop=I.value.scrollTop-(G.yAxis-ie.yAxis));const Me=ie.yAxis+ie.height-G.yAxis;Me>G.height&&(I.value.scrollTop=I.value.scrollTop+Me-G.height)})},Y=(G,te)=>{const ie=O();B(C.value,ie[G-1]),P.selectedTagList.splice(G-1,1),J();const Me=ee.some(Ie=>Ie===te[e.saveKey]);(e.allowCreate&&Me||!e.allowCreate)&&!y.value&&P.localList.push(te),m.value=`${Da}px`,Ce("remove")},Z=G=>{if(c.isPageLoading)return;let te;const ie=G.target.value,Me=_0(ie),Ie=K(),Le=O();switch(G.code){case"ArrowUp":if(G.preventDefault(),!l.isShow)return;i.focusItemIndex=i.focusItemIndex-1,i.focusItemIndex=i.focusItemIndex<0?-1:i.focusItemIndex,i.focusItemIndex===-1&&(i.focusItemIndex=c.curPageList.length-1),ne();break;case"ArrowDown":if(G.preventDefault(),!l.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),ne();break;case"ArrowLeft":if(i.isEdit=!0,!Me){if(Ie<1)return;B(C.value,Le[Ie-1]),J()}break;case"ArrowRight":if(i.isEdit=!0,!Me){if(Ie===Le.length-1)return;B(Le[Ie+1],C.value),J()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&l.isShow||e.allowCreate&&i.focusItemIndex>=0&&l.isShow?fe(c.curPageList[i.focusItemIndex],"select",G):e.allowCreate&&fe(f.value,"custom",G),G.preventDefault();break;case"Backspace":Ie!==0&&!f.value&&(te=P.selectedTagList[Ie-1],Y(Ie,te));break}},ae=G=>{const te=[],ie=G.split(";"),Me=/^[a-zA-Z][a-zA-Z_]*/g;return ie.forEach(Ie=>{const Le=Ie.match(Me);if(Le){const He=Le.join("");te.push({[e.saveKey]:He,[e.displayKey]:He})}}),te},pe=G=>{if(G.preventDefault(),y.value)return!1;const{maxData:te,saveKey:ie,displayKey:Me,pasteFn:Ie,allowCreate:Le}=e,He=G.clipboardData.getData("text");let Fe=(Ie?Ie(He):ae(He)).map(Ke=>Ke[ie]);if(Fe.length){const Ke=O(),$t=K(),xt=P.localList.map(Re=>Re[ie]);if(Fe=Fe.filter(Re=>{const qe=(Re==null?void 0:Re.trim())&&!E.value.includes(Re);return Le?qe:qe&&xt.includes(Re)}),te!==-1){const Re=P.selectedTagList.length;if(Re<te){const qe=te-Re;Fe.length>qe&&(Fe=[...Fe.slice(0,qe)])}else Fe=[]}const Xe=Le?Fe.map(Re=>{const qe=P.localList.find(ji=>ji[ie]===Re);return qe!=null?qe:{[ie]:Re,[Me]:Re}}):P.localList.filter(Re=>Fe.includes(Re[ie]));Fe.length&&(P.selectedTagList.splice($t,0,...Xe),B(C.value,Ke[$t]),m.value.style.width=`${Da}px`,P.localList=P.localList.filter(Re=>!Fe.includes(Re[ie])),Ce("select"),J())}},D=G=>{e.disabled||(B(C.value,G.currentTarget,!0),m.value.style.width=`${Da}px`,l.isShow&&k())},W=(G,te)=>{if(P.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:ie,saveKey:Me,displayKey:Ie,createTagValidator:Le}=e,He=K();let ot=1,Fe=!1,Ke;const $t=Xe=>typeof Le=="function"?Le(Xe):!0,xt=Xe=>P.localList.find(Re=>Re[Me]===Xe);if(te==="custom")if(ie){let Xe=G.split(ie);Xe=Xe.filter(qe=>(qe==null?void 0:qe.trim())&&!E.value.includes(qe)&&$t(qe));const Re=Xe.map(qe=>xt(qe)||{[Me]:qe,[Ie]:qe});Xe.length&&(P.selectedTagList.splice(He,0,...Re),ot=Re.length,Fe=!0)}else{const Xe=typeof G=="object";if(Ke=Xe?G[Me]:G.trim(),Ke=Ke.replace(/\s+/g,""),Ke!==void 0&&!E.value.includes(Ke)&&$t(Ke)){const Re=xt(Ke)||(Xe?G:{[Me]:Ke,[Ie]:Ke});P.selectedTagList.splice(He,0,Re),Fe=!0}}else G&&(Ke=G[Me],Ke!==void 0&&!E.value.includes(Ke)&&(P.selectedTagList.splice(He,0,G),Fe=!0));Fe&&a.nextTick(()=>{for(let Xe=1;Xe<=ot;Xe++){const qe=O()[He+Xe];B(qe,C.value)}m.value.style.width=`${Da}px`,y.value||(e.allowNextFocus&&J(),P.localList=P.localList.filter(Xe=>!E.value.includes(Xe[Me])))})},Q=(G,te)=>{P.selectedTagList.splice(te,1);const ie=ee.some(Me=>Me===G[e.saveKey]);(e.allowCreate&&ie||!e.allowCreate)&&!y.value&&P.localList.push(G)};return Te(F(F(F({popoverProps:l},a.toRefs(i)),a.toRefs(P)),a.toRefs(c)),{isShowPlaceholder:b,isShowClear:M,curInputValue:f,formatList:ee,renderList:H,showTagClose:T,tagInputRef:m,bkTagSelectorRef:p,tagListRef:v,tagInputItemRef:C,selectorListRef:I,popoverRef:N,triggerClass:L,focusInputTrigger:J,activeClass:he,handleInput:V,handleFocus:$,handleBlur:X,handleTagSelected:fe,handleTagRemove:ce,handleClear:Ee,tagFocus:D,handleKeydown:Z,handlePaste:pe})},render(){const e=()=>this.useGroup?this.renderList.map(t=>a.createVNode("li",{class:"bk-selector-group-item"},[a.createVNode("span",{class:"group-name"},[t.name,a.createTextVNode(" ("),t.children.length,a.createTextVNode(")")]),a.createVNode("ul",{class:"bk-selector-group-list-item"},[t.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(Y0,{node:n,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]))])])):this.renderList.map((t,n)=>a.createVNode("li",{class:["bk-selector-list-item",{disabled:t.disabled},this.activeClass(t,n)],onClick:this.handleTagSelected.bind(this,t,"select")},[a.createVNode(Y0,{node:t,displayKey:this.displayKey,tpl:this.tpl,searchKey:this.searchKey,searchKeyword:this.curInputValue},null)]));return a.createVNode("div",{class:"bk-tag-input",ref:"bkTagSelectorRef",onClick:this.focusInputTrigger,onMouseenter:()=>this.isHover=!0,onMouseleave:()=>this.isHover=!1},[a.createVNode(Os,{ref:"popoverRef",theme:"light",trigger:"manual",placement:"bottom-start",arrow:!1,width:this.popoverProps.width,isShow:this.popoverProps.isShow,modifiers:this.popoverProps.modifiers},{default:()=>{var t,n,i;return a.createVNode("div",{class:this.triggerClass},[a.createVNode("ul",{class:"tag-list",ref:"tagListRef",style:{marginLeft:`${this.leftSpace}px`}},[this.selectedTagList.map((l,o)=>{const c={boundary:"window",theme:"light",distance:12,content:l[this.tooltipKey],disabled:!this.tooltipKey};return a.withDirectives(a.createVNode("li",{class:"tag-item",onClick:this.tagFocus},[a.createVNode(qp,{node:l,tpl:this.tagTpl,displayKey:this.displayKey},null),this.showTagClose?a.createVNode(An,{class:"remove-tag",onClick:this.handleTagRemove.bind(this,l,o)},null):null]),[[a.resolveDirective("bk-tooltips"),c]])}),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":l=>this.curInputValue=l,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]]),(i=(n=(t=this.$slots)==null?void 0:t.suffix)==null?void 0:n.call(t))!=null?i:this.isShowClear&&a.createVNode(wn,{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"},[e(),this.isPageLoading?a.createVNode("li",{class:"bk-selector-list-item loading"},[a.createVNode(Ci,{theme:"primary",size:En.Small},null)]):null])])})])}});const F0=Ge(e5),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 n5=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 U0=Ge(n5),i5={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},a5={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)},r5=F({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)},i5),s5={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 $0=a.defineComponent({name:"TabNav",props:r5,setup(e){const t=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const d=[];let h=!1;return e.panels.filter((f,m)=>{if(!f.props)return null;const{name:p,label:v,closable:C,visible:I,disabled:N,sortable:x}=f.props;if(!I)return!1;e.active===p&&(h=!0);const T=y=>f.slots.label?a.h(f.slots.label):[void 0,""].includes(y)?`\u9009\u9879\u5361${m+1}`:typeof y=="string"?y:typeof y=="function"?a.h(y):y;return d.push({name:p,closable:C,visible:I,disabled:N,sortable:x,tabLabel:T(v)}),!0}),!h&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),d}),n=a.ref(-1),i=a.ref(-1),l=a.ref(""),o=(d,h)=>d===h;return Te(F({},{handleTabAdd(d){e.tabAdd(d)},dragstart(d,h){i.value=d,l.value=e.guid,Object.assign(h.dataTransfer,{effectAllowed:"move"}),e.tabDrag(d,h)},dragenter(d){o(l.value,e.guid)&&(n.value=d)},dragend(){n.value=-1,i.value=-1,l.value=null},drop(d,h){if(!o(l.value,e.guid))return!1;e.tabSort(i.value,d,h)},handleTabChange(d){e.tabChange(d)},handleTabRemove(d,h){e.tabRemove(d,h)}}),{navs:t,dragenterIndex:n,dragStartIndex:i,draggingEle:l,guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4)})},render(){const{active:e,closable:t,addable:n,sortable:i,sortType:l,labelHeight:o,dragstart:c,dragenter:d,dragend:h,drop:f}=this,m=()=>this.navs.map((v,C)=>{if(!v)return null;const{name:I,disabled:N,tabLabel:x}=v,T=()=>{const b=["bk-tab-header-item"];return N&&b.push("bk-tab-header--disabled"),e===I&&b.push("bk-tab-header--active"),b.join(" ")},y=(b,M)=>b||M;return a.createVNode("div",{key:I,onClick:()=>this.handleTabChange(I),draggable:y(v.sortable,i),onDragstart:b=>c(C,b),onDragenter:b=>{b.preventDefault(),d(C)},onDragleave:b=>{b.preventDefault()},onDragover:b=>{b.preventDefault()},onDragend:b=>{b.preventDefault(),h()},onDrop:b=>{b.preventDefault(),f(C,l)},class:T()},[a.createVNode("div",null,[x]),y(v.closable,t)&&a.createVNode(wn,{class:"bk-tab-header-item-close",onClick:()=>this.handleTabRemove(C,v)},null)])}),p=()=>{var C,I;const v=[];return typeof this.$slots.add=="function"?v.push((I=(C=this.$slots).add)==null?void 0:I.call(C,a.h)):n&&v.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(Ls,{width:26,height:26},null)])),v.length?a.createVNode("div",{class:"bk-tab-header-operation"},[v.map((N,x)=>a.createVNode("div",{class:"bk-tab-header-item",key:x},[N]))]):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()])])}}),l5=a.defineComponent({name:"Tab",components:{TabNav:$0},props:a5,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),l=a.ref([]),o=a.getCurrentInstance(),c=(f,m=[])=>{const{children:p}=f;return(p||[]).forEach(v=>{let{type:C}=v;C=C.name||C,C==="TabPanel"&&v.component?m.push(v.component):(C===a.Fragment||C==="template")&&c(v,m)}),m},d=()=>{if(t.default){const{children:f}=o.subTree.children[1];if(!f)return;const m=f[0],p=c(m);p.length!==l.value.length&&(l.value=p)}};return a.onMounted(()=>{d(),i.value=!0}),a.onUpdated(()=>{d()}),Te(F({},{tabAdd(f){n("add",{e:f}),n("add-panel",{e:f})},tabChange(f){n("change",f),n("tab-change",f),n("update:active",f)},tabRemove(f,m){n("remove",f,m),n("remove-panel",f,m)},tabSort(f,m,p){const v=l.value;if(p==="insert")if(f<m)v.splice(m+1,0,l[f]),v.splice(f,1);else if(f>m)v.splice(m,0,l[f]),v.splice(f+1,1);else return!1;else{const C=v[m];v[m]=v[f],v[f]=C}l.value=[...v],n("sort",f,m,p),n("sort-change",f,m,p)},tabDrag(f,m){n("drag",f,m),n("on-drag-tab",f,m)}}),{isMounted:i,panels:l})},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:l,active:o,type:c,closable:d,addable:h,sortable:f,sortType:m,labelHeight:p,scrollStep:v,validateActive:C,changeOnHover:I,changeOnHoverDelay:N,tabPosition:x,tabAdd:T,tabChange:y,tabRemove:b,tabSort:M,tabDrag:L}=this,k={panels:l,active:o,type:c,closable:d,addable:h,sortable:f,sortType:m,labelHeight:p,scrollStep:v,validateActive:C,changeOnHover:I,changeOnHoverDelay:N,tabPosition:x,tabAdd:T,tabChange:y,tabRemove:b,tabSort:M,tabDrag:L};return!l||!Array.isArray(l)?null:a.createVNode($0,k,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)])])}}),o5=a.defineComponent({name:"TabPanel",props:s5,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 X0=Rt(l5,{TabPanel:o5}),ki={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let K0=1;const q0=(e,t)=>{let n=t;const i=n.position||"top-right";typeof t=="string"&&(n={message:t});const l=t.onClose,o=n.offsetX||10;let c=n.offsetY||30;const{spacing:d=10}=n;ki[i].forEach(v=>{c+=(v.el.offsetHeight||0)+d}),K0+=1;const h=`message_${K0}`;n=Te(F({},n),{offsetX:o,offsetY:c,id:h});const f=document.createElement("div"),m=a.createVNode(e,n);m.props.onDestroy=v=>{c5(v,i,d,l),a.render(null,f)},a.render(m,f),ki[i].push(m);let p;m.props.getContainer&&or(m.props.getContainer)?p=m.props.getContainer:p=document.body,p.appendChild(f.firstElementChild)};function c5(e,t,n,i){i==null||i();const l=t.startsWith("top")?"top":"bottom";let o=-1;ki[t].forEach((f,m)=>{f.props.id===e&&(o=m)});const d=ki[t][o].el.offsetHeight,h=ki[t].length;for(let f=o;f<h;f++){const m=parseInt(ki[t][f].el.style[l],10)-d-n;ki[t][f].component.props.offsetY=m}ki[t].splice(o,1)}const u5={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 d5=a.defineComponent({name:"Message",props:u5,emits:["destroy"],setup(e,{emit:t}){const n=a.computed(()=>["bk-message",`bk-message-${e.theme}`,`${e.extCls}`]),i=yn.getMessageNextIndex(),l=a.computed(()=>e.getContainer&&or(e.getContainer)),o=a.computed(()=>({top:`${e.offsetY}px`,zIndex:i,position:l.value?"absolute":"fixed"})),c=a.ref(!1);let d=null;const h=()=>{d=setTimeout(()=>{c.value=!1},e.delay)},f=m=>{m.preventDefault(),m.stopPropagation(),c.value=!1};return a.onMounted(()=>{e.delay&&h(),c.value=!0}),a.onUnmounted(()=>{clearTimeout(d)}),a.watch(c,()=>{c.value||t("destroy",e.id)}),{classNames:n,styles:o,visible:c,close:f}},render(){const e=()=>({primary:a.createVNode(Ns,null,null),warning:a.createVNode(js,null,null),success:a.createVNode(Ss,null,null),error:a.createVNode(wn,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(An,{class:"bk-message-close",onClick:this.close},null)]),[[a.vShow,this.visible]])]})}});const e9=e=>{q0(d5,e)},t9=e=>{const t=document.createElement("div"),n=a.ref(!1),i=a.shallowRef(e),l=a.defineComponent({name:"DialogConfirm",setup(d,{expose:h}){a.onMounted(()=>{(document.activeElement||document.body).blur(),i.value.isShow!==!1&&(n.value=!0)});const f=async()=>{var C,I;typeof((C=i.value)==null?void 0:C.onClosed)=="function"&&await((I=i.value)==null?void 0:I.onClosed()),n.value=!1},m=async()=>{var C,I;typeof((C=i.value)==null?void 0:C.onConfirm)=="function"&&await((I=i.value)==null?void 0:I.onConfirm()),n.value=!1};function p(C){i.value=C}h({update:p});const v=()=>{const C=[];if(i.value.subTitle)switch(typeof i.value.subTitle){case"string":C.push(a.h("div",i.value.subTitle));break;case"function":C.push(a.h("div",i.value.subTitle()));break;default:C.push(a.h(i.value.subTitle));break}return C};return()=>a.createVNode(Pf,Te(F({},i.value),{isShow:n.value,onClosed:f,onConfirm:m}),v())}}),o=a.createApp(l).mount(t);return{show:()=>{n.value=!0},hide:()=>{n.value=!1},update:d=>{o.update(d)}}},f5={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 h5=a.defineComponent({name:"Notify",props:f5,emits:["destroy"],setup(e,{emit:t}){const n=yn.getMessageNextIndex(),i=a.computed(()=>e.position.indexOf("right")>1?"right":"left"),l=a.computed(()=>e.position.startsWith("top")?"top":"bottom"),o=a.computed(()=>({[i.value]:`${e.offsetX}px`,[l.value]:`${e.offsetY}px`,zIndex:n})),c=a.computed(()=>["bk-notify",`bk-notify-${e.theme}`,i.value]),d=a.ref(!1);let h=null;const f=()=>{h=setTimeout(()=>{d.value=!1},e.delay)},m=()=>{d.value=!1};return a.onMounted(()=>{e.delay&&f(),d.value=!0}),a.onUnmounted(()=>{clearTimeout(h)}),a.watch(d,()=>{d.value||t("destroy",e.id)}),{classNames:c,styles:o,visible:d,handleClose:m}},render(){const e=()=>({primary:a.createVNode(Ns,null,null),warning:a.createVNode(js,null,null),success:a.createVNode(Ss,null,null),error:a.createVNode(wn,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(An,{class:"bk-notify-icon bk-notify-close",onClick:this.handleClose},null)]),[[a.vShow,this.visible]])]})}});const n9=e=>{q0(h5,e)},i9=Symbol("MENU_PROVIDER_KEY"),Pc=Symbol("MENU_PROVIDER_KEY_PATH"),g5=e=>{a.provide(i9,e)},m5=e=>{const{parentKeys:t,parentInfo:n}=Oc(),i=a.computed(()=>[...t.value,e]);a.provide(Pc,{parentInfo:{key:e,parentKey:n==null?void 0:n.key},parentKeys:i})},a9=()=>a.inject(i9),Oc=()=>{var n;const e=a.getCurrentInstance(),t=e.parent?e.parent.provides:(n=e.vnode.appContext)==null?void 0:n.provides;return t&&Pc in t?a.inject(Pc):{parentInfo:void 0,parentKeys:a.ref([])}},Ac=function(e){return(e||"").split(" ").filter(t=>!!t.trim())};function r9(e,t){if(!e||!t)return;const n=Ac(t);let i=e.getAttribute("class")||"";if(e.classList){e.classList.remove(...n);return}n.forEach(o=>{i=i.replace(` ${o} `," ")});const l=Ac(i).join(" ");e.setAttribute("class",l)}function s9(e,t){if(!e)return;let n=e.getAttribute("class")||"";const i=Ac(n),l=(t||"").split(" ").filter(o=>!i.includes(o)&&!!o.trim());e.classList?e.classList.add(...l):(n+=` ${l.join(" ")}`,e.setAttribute("class",n))}const p5=()=>({css:!0,onBeforeEnter:e=>{s9(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,r9(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&&(s9(e,"collapse-transition"),e.style.transitionProperty="height",e.style.height="0px",e.style.maxHeight="0px")},onAfterLeave:e=>{r9(e,"collapse-transition"),e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow}}),b5={activeKey:String,collapse:Boolean,openedKeys:{type:Array},mode:{type:String,default:"vertical"},uniqueOpen:{type:Boolean,default:!0}};var y5=a.defineComponent({name:"Menu",props:b5,emits:["update:activeKey","update:openKeys","click","openChange"],setup(e,{slots:t,emit:n,expose:i}){const l=a.ref(""),o=a.ref([]),c=a.ref({}),d=a.computed(()=>e.mode),h=a.ref(e.collapse),f=a.ref([]);a.watchEffect(()=>{e.activeKey!==void 0&&(l.value=e.activeKey)}),a.watch(()=>e.collapse,()=>{h.value=e.collapse,console.info(e.collapse);const I=[...f.value],N=[...o.value];o.value=h.value?[]:I,f.value=h.value?N:[]},{immediate:!0}),a.watch(()=>e.openedKeys,(I=o.value)=>{o.value=I},{immediate:!0});const m=(I,N)=>{c.value=Te(F({},c.value),{[I]:N})},p=I=>{delete c.value[I],c.value=F({},c.value)},v=(I,N)=>{N?e.uniqueOpen?o.value=[I]:o.value.push(I):o.value=o.value.filter(x=>x!==I),n("openChange",N,c.value[I]),n("update:openKeys",[...o.value])},C=I=>{l.value=I,n("click",c.value[I]),n("update:activeKey",I,c.value[I])};return g5({activeKey:l,menuStore:c,registerMenuInfo:m,unregisterMenuInfo:p,mode:d.value,openedKeys:o,collapse:h,handleOpenChange:v,handleActiveChange:C}),i({activeKey:l,openedKeys:o,menuStore:c}),()=>{var I;return a.createVNode("div",{class:{"bk-menu":!0,"is-collapse":h.value}},[(I=t.default)==null?void 0:I.call(t)])}}}),C5=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)])])}}}),M5=a.defineComponent({name:"MenuItem",props:{needIcon:{type:Boolean,default:!0}},emits:["click"],slots:["icon"],setup(e,{slots:t,emit:n}){var C,I;const{registerMenuInfo:i,unregisterMenuInfo:l,activeKey:o,handleActiveChange:c}=a9(),d=a.getCurrentInstance(),{parentInfo:h}=Oc(),f=((I=(C=d.vnode.key)==null?void 0:C.toString)==null?void 0:I.call(C))||String(d.uid),m=a.computed(()=>o.value===f),p=a.computed(()=>e.needIcon);i(f,{key:f,parentKey:h==null?void 0:h.key});const v=N=>{c(f),n("click",N)};return a.onBeforeUnmount(()=>l(f)),()=>{var N,x;return a.createVNode("li",{class:{"bk-menu-item":!0,"is-active":m.value},onClick:v},[p.value&&a.createVNode("span",{class:"item-icon"},[((N=t==null?void 0:t.icon)==null?void 0:N.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 w5={title:{type:String,default:"title"}};var v5=a.defineComponent({name:"Submenu",props:w5,emits:["collapse"],slots:["icon"],setup(e,{slots:t,emit:n}){var T,y;const{registerMenuInfo:i,unregisterMenuInfo:l,openedKeys:o,handleOpenChange:c,collapse:d,activeKey:h,menuStore:f}=a9(),{parentInfo:m}=Oc(),p=a.getCurrentInstance(),v=((y=(T=p.vnode.key)==null?void 0:T.toString)==null?void 0:y.call(T))||String(p.uid),C=a.ref(p5()),I=a.computed(()=>o.value.includes(v)),N=a.computed(()=>{var M,L;const b=(L=(M=f.value)==null?void 0:M[h.value])==null?void 0:L.parentKey;return d.value&&b===v&&I});m5(v),i(v,{key:v,parentKey:m==null?void 0:m.key}),a.onBeforeUnmount(()=>l(v));const x=()=>{c(v,!I.value),n("collapse",!I.value,p)};return()=>{var b;return a.createVNode("li",{class:{"bk-menu-submenu":!0,"is-opened":I.value}},[a.createVNode("div",{class:{"submenu-header":!0,"is-collapse":N.value},onClick:x},[a.createVNode("span",{class:"submenu-header-icon"},[((b=t.icon)==null?void 0:b.call(t))||a.createVNode(_o,{class:"menu-icon"},null)]),a.createVNode("span",{class:"submenu-header-content"},[e.title]),a.createVNode(bs,{class:{"submenu-header-collapse":!0,"is-collapse":o.value.includes(v)}},null)]),a.createVNode(a.Transition,C.value,{default:()=>{var M;return[a.withDirectives(a.createVNode("ul",{class:"submenu-list"},[(M=t.default)==null?void 0:M.call(t)]),[[a.vShow,I.value]])]}})])}}});const l9=Rt(y5,{Item:M5,Submenu:v5,Group:C5}),I5={sideTitle:{type:String,default:""},navigationType:{type:String,default:"left-right"}};var o9=a.defineComponent({props:I5,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 N5={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 L5=a.defineComponent({name:"Navigation",props:N5,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 l=()=>{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:l,handleMouseLeave:o,handleClick:c}},render(){var e,t,n,i,l,o,c,d,h,f,m,p;return a.createVNode("div",{class:"bk-navigation"},[this.navigationType==="top-bottom"&&a.createVNode("div",{class:"bk-navigation-header",style:{flexBasis:`${this.headHeight}px`}},[a.createVNode(o9,{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(o9,{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(Oo,{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=(l=this.$slots).header)==null?void 0:o.call(l))||[a.createVNode("div",{class:"container-header-title"},[this.headerTitle]),a.createVNode("div",{class:"container-header-sets"},[(d=(c=this.$slots)["header-set"])==null?void 0:d.call(c)])]]),a.createVNode("div",{class:"container-content",style:{maxHeight:`calc(100vh - ${this.headHeight}px)`}},[(f=(h=this.$slots).default)==null?void 0:f.call(h),a.createVNode("div",{class:"container-footer"},[(p=(m=this.$slots).footer)==null?void 0:p.call(m)])])])])])}});const c9=Ge(L5),k5={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 Ec=a.defineComponent({props:k5,emits:["changeVisible"],setup(e,{emit:t}){let n=Object.create(null);const i=a.ref(null);a.onMounted(()=>{o()}),a.onBeforeUnmount(()=>{l()});const l=()=>{if(n&&Object.keys(n).length!==0){const h=n;h.isShow&&h.hide(),h.destroy(),n=null,t("changeVisible",!1)}},o=()=>{n&&Object.keys(n).length!==0?a.nextTick(()=>{n.update()}):a.nextTick(()=>{n=new tf(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 h={};return e.appendToBody&&(h["z-index"]=1060+yn.getModalNextIndex()),h}),d=a.reactive({styles:c});return Te(F({},a.toRefs(d)),{refContentRef:i,updateDropdown:o,destoryDropdown:l})},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 T5={showTime:{type:Boolean,required:!0},isTime:{type:Boolean,default:!1},timeDisabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}};var x5=a.defineComponent({props:T5,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")},l=()=>{t("pick-success")},o=()=>{e.timeDisabled||t("pick-toggle-time")},c=a.ref(null);return{labels:n,handleClear:i,handleSuccess:l,handleToggleTime:o,handleTab:h=>{const m=[...c.value.children][h.shiftKey?"shift":"pop"]();document.activeElement===m&&(h.preventDefault(),h.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])])}}),u9=1e3*60*60*24;function d9(e,t){return new Date(e,t+1,0).getDate()}function f9(e,t,n){return t===0&&n>50?e-1:t===11&&n<10?e+1:e}function h9(e,t,n,i){t>11&&(t=0,e++);var l=new Date(e,t,n);i&&l.setDate(l.getDate()+4-(l.getDay()||7));var o=i?l.getFullYear():e,c=new Date(o,0,1),d=1+Math.round((l-c)/u9);i||(d+=c.getDay());var h=Math.ceil(d/7);if(!i){var f=new Date(e,t,n),m=new Date(e+1,0,1),p=m.getDay();f.getTime()>=m.getTime()-u9*p&&(h=1)}return h}function S5(e,t,n){for(var i=this.lang||"en",l=this.onlyDays,o=typeof this.weekStart=="undefined"?1:this.weekStart,c=o===1,d=[],h=new Date(e,t,1),f=h.getDay()||(c?7:0),m=o-f,p=h9(e,t,1,c),v=d9(e,t),C=d9(e,t-1),I,N,x,T=f9(e,t,p),y={month:t,year:e,daysInMonth:v},b=0;b<7;b++){x=m;for(var M=0;M<8;M++){b>0&&M>0&&m++,m>v||m<1?(N=m>v?m-v:C+m,I=m>v?t+1:t-1):(N=m,I=t);var L=function(){return M===0?"weekLabel":b===0?"dayLabel":m<1?"prevMonth":m>v?"nextMonth":"monthDay"}(),k=x!==m&&b>0,A={desc:k?N:p,week:p,type:L,format:c?"ISO 8601":"US",date:k?new Date(Date.UTC(e,I,N)):!1,year:T,index:d.length};n&&(typeof n=="function"?A=n.call(y,A,i):n.forEach(function(O){A=O.call(y,A,i)})),l&&k?d.push(A):l||d.push(A)}b>0&&(p=h9(e,I,N+1,c)),T=f9(e,t,p)}return y.cells=d,y}var D5=function(e){return S5.bind(e)},j5={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"}},Jn=j5;function z5(e){return e==null?!1:e.constructor===Array||e.constructor===Object}function g9(e,t){for(var n in e)t[n]?z5(e[n])&&g9(e[n],t[n]):t[n]=e[n]}function m9(e,t){var n=[Jn.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&&Jn.weekPlaceholder?e.desc=Jn.weekPlaceholder:e.index<8?e.desc=Jn.columnNames[t][e.index]:e.index%8==0&&(e.desc=e.week)),e.date&&(e.monthName=Jn.monthNames[t][e.date.getMonth()]),this.monthName||(this.monthName=Jn.monthNames[t][this.month]),this.labels||(this.labels={monthNames:Jn.monthNames[t],columnNames:Jn.columnNames[t],classes:Jn.classes}),e}m9.setLabels=function(e){g9(e,Jn)};var P5=m9,O5={Generator:D5,addLabels:P5};function on(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 zt(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function In(e){zt(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 A5(e,t){zt(2,arguments);var n=In(e).getTime(),i=on(t);return new Date(n+i)}function E5(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 V5(e){return zt(1,arguments),e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function J5(e){if(zt(1,arguments),!V5(e)&&typeof e!="number")return!1;var t=In(e);return!isNaN(Number(t))}var Q5={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"}},R5=function(e,t,n){var i,l=Q5[e];return typeof l=="string"?i=l:t===1?i=l.one:i=l.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},W5=R5;function Vc(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 H5={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},B5={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Z5={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},G5={date:Vc({formats:H5,defaultWidth:"full"}),time:Vc({formats:B5,defaultWidth:"full"}),dateTime:Vc({formats:Z5,defaultWidth:"full"})},_5=G5,Y5={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},F5=function(e,t,n,i){return Y5[e]},U5=F5;function kr(e){return function(t,n){var i=n||{},l=i.context?String(i.context):"standalone",o;if(l==="formatting"&&e.formattingValues){var c=e.defaultFormattingWidth||e.defaultWidth,d=i.width?String(i.width):c;o=e.formattingValues[d]||e.formattingValues[c]}else{var h=e.defaultWidth,f=i.width?String(i.width):e.defaultWidth;o=e.values[f]||e.values[h]}var m=e.argumentCallback?e.argumentCallback(t):t;return o[m]}}var $5={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},X5={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},K5={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"]},q5={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"]},eb={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"}},tb={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"}},nb=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"},ib={ordinalNumber:nb,era:kr({values:$5,defaultWidth:"wide"}),quarter:kr({values:X5,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:kr({values:K5,defaultWidth:"wide"}),day:kr({values:q5,defaultWidth:"wide"}),dayPeriod:kr({values:eb,defaultWidth:"wide",formattingValues:tb,defaultFormattingWidth:"wide"})},ab=ib;function Tr(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.width,l=i&&e.matchPatterns[i]||e.matchPatterns[e.defaultMatchWidth],o=t.match(l);if(!o)return null;var c=o[0],d=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],h=Array.isArray(d)?sb(d,function(p){return p.test(c)}):rb(d,function(p){return p.test(c)}),f;f=e.valueCallback?e.valueCallback(h):h,f=n.valueCallback?n.valueCallback(f):f;var m=t.slice(c.length);return{value:f,rest:m}}}function rb(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function sb(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function lb(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 l=i[0],o=t.match(e.parsePattern);if(!o)return null;var c=e.valueCallback?e.valueCallback(o[0]):o[0];c=n.valueCallback?n.valueCallback(c):c;var d=t.slice(l.length);return{value:c,rest:d}}}var ob=/^(\d+)(th|st|nd|rd)?/i,cb=/\d+/i,ub={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},db={any:[/^b/i,/^(a|c)/i]},fb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},hb={any:[/1/i,/2/i,/3/i,/4/i]},gb={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},mb={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]},pb={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},bb={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]},yb={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},Cb={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}},Mb={ordinalNumber:lb({matchPattern:ob,parsePattern:cb,valueCallback:function(e){return parseInt(e,10)}}),era:Tr({matchPatterns:ub,defaultMatchWidth:"wide",parsePatterns:db,defaultParseWidth:"any"}),quarter:Tr({matchPatterns:fb,defaultMatchWidth:"wide",parsePatterns:hb,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:Tr({matchPatterns:gb,defaultMatchWidth:"wide",parsePatterns:mb,defaultParseWidth:"any"}),day:Tr({matchPatterns:pb,defaultMatchWidth:"wide",parsePatterns:bb,defaultParseWidth:"any"}),dayPeriod:Tr({matchPatterns:yb,defaultMatchWidth:"any",parsePatterns:Cb,defaultParseWidth:"any"})},wb=Mb,vb={code:"en-US",formatDistance:W5,formatLong:_5,formatRelative:U5,localize:ab,match:wb,options:{weekStartsOn:0,firstWeekContainsDate:1}},Ib=vb;function Nb(e,t){zt(2,arguments);var n=on(t);return A5(e,-n)}var Lb=864e5;function kb(e){zt(1,arguments);var t=In(e),n=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var i=t.getTime(),l=n-i;return Math.floor(l/Lb)+1}function Xs(e){zt(1,arguments);var t=1,n=In(e),i=n.getUTCDay(),l=(i<t?7:0)+i-t;return n.setUTCDate(n.getUTCDate()-l),n.setUTCHours(0,0,0,0),n}function p9(e){zt(1,arguments);var t=In(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var l=Xs(i),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var c=Xs(o);return t.getTime()>=l.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}function Tb(e){zt(1,arguments);var t=p9(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=Xs(n);return i}var xb=6048e5;function Sb(e){zt(1,arguments);var t=In(e),n=Xs(t).getTime()-Tb(t).getTime();return Math.round(n/xb)+1}function Ks(e,t){zt(1,arguments);var n=t||{},i=n.locale,l=i&&i.options&&i.options.weekStartsOn,o=l==null?0:on(l),c=n.weekStartsOn==null?o:on(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=In(e),h=d.getUTCDay(),f=(h<c?7:0)+h-c;return d.setUTCDate(d.getUTCDate()-f),d.setUTCHours(0,0,0,0),d}function b9(e,t){zt(1,arguments);var n=In(e),i=n.getUTCFullYear(),l=t||{},o=l.locale,c=o&&o.options&&o.options.firstWeekContainsDate,d=c==null?1:on(c),h=l.firstWeekContainsDate==null?d:on(l.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=new Date(0);f.setUTCFullYear(i+1,0,h),f.setUTCHours(0,0,0,0);var m=Ks(f,t),p=new Date(0);p.setUTCFullYear(i,0,h),p.setUTCHours(0,0,0,0);var v=Ks(p,t);return n.getTime()>=m.getTime()?i+1:n.getTime()>=v.getTime()?i:i-1}function Db(e,t){zt(1,arguments);var n=t||{},i=n.locale,l=i&&i.options&&i.options.firstWeekContainsDate,o=l==null?1:on(l),c=n.firstWeekContainsDate==null?o:on(n.firstWeekContainsDate),d=b9(e,t),h=new Date(0);h.setUTCFullYear(d,0,c),h.setUTCHours(0,0,0,0);var f=Ks(h,t);return f}var jb=6048e5;function zb(e,t){zt(1,arguments);var n=In(e),i=Ks(n,t).getTime()-Db(n,t).getTime();return Math.round(i/jb)+1}function nt(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var Pb={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return nt(t==="yy"?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):nt(n+1,2)},d:function(e,t){return nt(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 nt(e.getUTCHours()%12||12,t.length)},H:function(e,t){return nt(e.getUTCHours(),t.length)},m:function(e,t){return nt(e.getUTCMinutes(),t.length)},s:function(e,t){return nt(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,i=e.getUTCMilliseconds(),l=Math.floor(i*Math.pow(10,n-3));return nt(l,t.length)}},Ti=Pb,ja={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ob={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(),l=i>0?i:1-i;return n.ordinalNumber(l,{unit:"year"})}return Ti.y(e,t)},Y:function(e,t,n,i){var l=b9(e,i),o=l>0?l:1-l;if(t==="YY"){var c=o%100;return nt(c,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):nt(o,t.length)},R:function(e,t){var n=p9(e);return nt(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return nt(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 nt(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 nt(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 Ti.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 nt(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 l=zb(e,i);return t==="wo"?n.ordinalNumber(l,{unit:"week"}):nt(l,t.length)},I:function(e,t,n){var i=Sb(e);return t==="Io"?n.ordinalNumber(i,{unit:"week"}):nt(i,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Ti.d(e,t)},D:function(e,t,n){var i=kb(e);return t==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):nt(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 l=e.getUTCDay(),o=(l-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return nt(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(l,{width:"short",context:"formatting"});case"eeee":default:return n.day(l,{width:"wide",context:"formatting"})}},c:function(e,t,n,i){var l=e.getUTCDay(),o=(l-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return nt(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(l,{width:"narrow",context:"standalone"});case"cccccc":return n.day(l,{width:"short",context:"standalone"});case"cccc":default:return n.day(l,{width:"wide",context:"standalone"})}},i:function(e,t,n){var i=e.getUTCDay(),l=i===0?7:i;switch(t){case"i":return String(l);case"ii":return nt(l,t.length);case"io":return n.ordinalNumber(l,{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(),l=i/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(e,t,n){var i=e.getUTCHours(),l;switch(i===12?l=ja.noon:i===0?l=ja.midnight:l=i/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(e,t,n){var i=e.getUTCHours(),l;switch(i>=17?l=ja.evening:i>=12?l=ja.afternoon:i>=4?l=ja.morning:l=ja.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(l,{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 Ti.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Ti.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(i,{unit:"hour"}):nt(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return i===0&&(i=24),t==="ko"?n.ordinalNumber(i,{unit:"hour"}):nt(i,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Ti.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Ti.s(e,t)},S:function(e,t){return Ti.S(e,t)},X:function(e,t,n,i){var l=i._originalDate||e,o=l.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return C9(o);case"XXXX":case"XX":return ea(o);case"XXXXX":case"XXX":default:return ea(o,":")}},x:function(e,t,n,i){var l=i._originalDate||e,o=l.getTimezoneOffset();switch(t){case"x":return C9(o);case"xxxx":case"xx":return ea(o);case"xxxxx":case"xxx":default:return ea(o,":")}},O:function(e,t,n,i){var l=i._originalDate||e,o=l.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+y9(o,":");case"OOOO":default:return"GMT"+ea(o,":")}},z:function(e,t,n,i){var l=i._originalDate||e,o=l.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+y9(o,":");case"zzzz":default:return"GMT"+ea(o,":")}},t:function(e,t,n,i){var l=i._originalDate||e,o=Math.floor(l.getTime()/1e3);return nt(o,t.length)},T:function(e,t,n,i){var l=i._originalDate||e,o=l.getTime();return nt(o,t.length)}};function y9(e,t){var n=e>0?"-":"+",i=Math.abs(e),l=Math.floor(i/60),o=i%60;if(o===0)return n+String(l);var c=t||"";return n+String(l)+c+nt(o,2)}function C9(e,t){if(e%60===0){var n=e>0?"-":"+";return n+nt(Math.abs(e)/60,2)}return ea(e,t)}function ea(e,t){var n=t||"",i=e>0?"-":"+",l=Math.abs(e),o=nt(Math.floor(l/60),2),c=nt(l%60,2);return i+o+n+c}var Ab=Ob;function M9(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 w9(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 Eb(e,t){var n=e.match(/(P+)(p+)?/)||[],i=n[1],l=n[2];if(!l)return M9(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}}",M9(i,t)).replace("{{time}}",w9(l,t))}var Vb={p:w9,P:Eb},Jb=Vb,Qb=["D","DD"],Rb=["YY","YYYY"];function Wb(e){return Qb.indexOf(e)!==-1}function Hb(e){return Rb.indexOf(e)!==-1}function v9(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 Bb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Zb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Gb=/^'([^]*?)'?$/,_b=/''/g,Yb=/[a-zA-Z]/;function Fb(e,t,n){zt(2,arguments);var i=String(t),l=n||{},o=l.locale||Ib,c=o.options&&o.options.firstWeekContainsDate,d=c==null?1:on(c),h=l.firstWeekContainsDate==null?d:on(l.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var f=o.options&&o.options.weekStartsOn,m=f==null?0:on(f),p=l.weekStartsOn==null?m:on(l.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 v=In(e);if(!J5(v))throw new RangeError("Invalid time value");var C=E5(v),I=Nb(v,C),N={firstWeekContainsDate:h,weekStartsOn:p,locale:o,_originalDate:v},x=i.match(Zb).map(function(T){var y=T[0];if(y==="p"||y==="P"){var b=Jb[y];return b(T,o.formatLong,N)}return T}).join("").match(Bb).map(function(T){if(T==="''")return"'";var y=T[0];if(y==="'")return Ub(T);var b=Ab[y];if(b)return!l.useAdditionalWeekYearTokens&&Hb(T)&&v9(T,t,e),!l.useAdditionalDayOfYearTokens&&Wb(T)&&v9(T,t,e),b(I,T,o.localize,N);if(y.match(Yb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return T}).join("");return x}function Ub(e){return e.match(Gb)[1].replace(_b,"'")}const wt={},I9=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,ta=/\d\d?/,$b=/\d{3}/,Xb=/\d{4}/,qs=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,N9=function(){};function L9(e,t){const n=[];for(let i=0,l=e.length;i<l;i++)n.push(e[i].substr(0,t));return n}function k9(e){return(t,n,i)=>{const l=i[e].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~l&&(t.month=l)}}function Qn(e,t=2){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}const T9=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],x9=["January","February","March","April","May","June","July","August","September","October","November","December"],Kb=L9(x9,3),qb=L9(T9,3);wt.i18n={dayNamesShort:qb,dayNames:T9,monthNamesShort:Kb,monthNames:x9,amPm:["am","pm"],DoFn(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10)*e%10]}};const S9={D(e){return e.getDay()},DD(e){return Qn(e.getDay())},Do(e,t){return t.DoFn(e.getDate())},d(e){return e.getDate()},dd(e){return Qn(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 Qn(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 Qn(e.getHours()%12||12)},H(e){return e.getHours()},HH(e){return Qn(e.getHours())},m(e){return e.getMinutes()},mm(e){return Qn(e.getMinutes())},s(e){return e.getSeconds()},ss(e){return Qn(e.getSeconds())},S(e){return Math.round(e.getMilliseconds()/100)},SS(e){return Qn(Math.round(e.getMilliseconds()/10),2)},SSS(e){return Qn(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?"-":"+")+Qn(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)}},ut={d:[ta,(e,t)=>{e.day=t}],M:[ta,(e,t)=>{e.month=t-1}],yy:[ta,(e,t)=>{const i=+`${new Date().getFullYear()}`.substr(0,2);e.year=`${t>68?i-1:i}${t}`}],h:[ta,(e,t)=>{e.hour=t}],m:[ta,(e,t)=>{e.minute=t}],s:[ta,(e,t)=>{e.second=t}],yyyy:[Xb,(e,t)=>{e.year=t}],S:[/\d/,(e,t)=>{e.millisecond=t*100}],SS:[/\d{2}/,(e,t)=>{e.millisecond=t*10}],SSS:[$b,(e,t)=>{e.millisecond=t}],D:[ta,N9],ddd:[qs,N9],MMM:[qs,k9("monthNamesShort")],MMMM:[qs,k9("monthNames")],a:[qs,(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)}]};ut.DD=ut.D,ut.dddd=ut.ddd,ut.Do=ut.dd=ut.d,ut.mm=ut.m,ut.hh=ut.H=ut.HH=ut.h,ut.MM=ut.M,ut.ss=ut.s,ut.A=ut.a,wt.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"},wt.format=(e,t,n)=>{const i=n||wt.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=wt.masks[t]||t||wt.masks.default,t.replace(I9,l=>l in S9?S9[l](e,i):l.slice(1,l.length-1))},wt.parse=(e,t,n)=>{const i=n||wt.i18n;if(typeof t!="string")throw new Error("Invalid format in fecha.parse");if(t=wt.masks[t]||t,e.length>1e3)return!1;let l=!0;const o={};if(t.replace(I9,h=>{if(ut[h]){const f=ut[h],m=e.search(f[0]);~m?e.replace(f[0],p=>(f[1](o,p,i),e=e.substr(m+p.length),p)):l=!1}return ut[h]?"":h.slice(1,h.length-1)}),!l)return!1;const c=new Date;o.isPm===!0&&o.hour!==null&&+o.hour!=12?o.hour=+o.hour+12:o.isPm===!1&&+o.hour==12&&(o.hour=0);let d;return o.timezoneOffset!==null&&o.timezoneOffset!==void 0?(o.minute=+(o.minute||0)-+o.timezoneOffset,d=new Date(Date.UTC(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0))):d=new Date(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0),d};const Jc=" - ",ai=(e,t)=>{const n=In(new Date(e));return!n||isNaN(n.getTime())?"":Fb(n,t||"yyyy-MM-dd")},Qc=(e,t)=>{if(Array.isArray(e)&&e.length===2){const n=e[0],i=e[1];if(n&&i)return ai(n,t)+Jc+ai(i,t)}else if(!Array.isArray(e)&&e instanceof Date)return ai(e,t);return""},Rc=(e,t)=>{const n=Array.isArray(e)?e:e.split(Jc);if(n.length===2){const i=n[0],l=n[1];return[i instanceof Date?i:wt.parse(i,t||"yyyy-MM-dd"),l instanceof Date?l:wt.parse(l,t||"yyyy-MM-dd")]}return[]},za={default:{formatter(e){return e?`${e}`:""},parser(e){return e===void 0||e===""?null:e}},date:{formatter:(e,t)=>ai(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},datetime:{formatter:(e,t)=>ai(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},daterange:{formatter:Qc,parser:Rc},datetimerange:{formatter:Qc,parser:Rc},timerange:{formatter:Qc,parser:Rc},time:{formatter:(e,t)=>ai(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},month:{formatter:(e,t)=>ai(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},year:{formatter:(e,t)=>ai(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},multiple:{formatter(e,t){return e.filter(Boolean).map(n=>ai(n,t)).join(",")},parser(e,t){return(typeof e=="string"?e.split(","):e).map(i=>{if(i instanceof Date)return i;let l=i;return typeof i=="string"?l=i.trim():typeof i!="number"&&!i&&(l=""),wt.parse(l,t||"yyyy-MM-dd")})}},number:{formatter(e){return e?`${e}`:""},parser(e){const t=Number(e);return isNaN(e)?null:t}}},Wc=()=>{const e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e},D9=e=>e.every(t=>!t||typeof t=="string"&&t.trim()===""),el=e=>e?[e.getHours(),e.getMinutes(),e.getSeconds()]:[0,0,0],j9={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"},xi=(e,t,n,i)=>{const l=t.includes("range"),{parser:o}=za[t]||za.default,c=i||j9[t],d=za.multiple.parser;let h=e;if(e&&t==="time"&&!(e instanceof Date))h=o(e,c);else if(n&&e)h=d(e,c);else if(l)if(!e)h=[null,null];else if(typeof e=="string")h=o(e,c);else if(t==="timerange")h=o(e,c).map(f=>f||"");else{const[f,m]=e;f instanceof Date&&m instanceof Date?h=e.map(p=>new Date(p)):typeof f=="string"&&typeof m=="string"?h=o(e.join(Jc),c):(!f||!m)&&(h=[null,null])}else typeof e=="string"&&t.indexOf("time")!==0&&(h=o(e,c)||null);return l||n?h||[]:[h]},Rn=(e,t,n,i)=>{const l=j9[t];if(n){const{formatter:c}=za.multiple;return c(e,i||l)}const{formatter:o}=za[t]||za.default;return o(e,i||l)},z9=Symbol("date-picker"),P9=Symbol("time-picker");function O9(e,t){return e.$children.reduce((n,i)=>{i.$options.name===t&&n.push(i);const l=O9(i,t);return n.concat(l)},[])}function cn(e,t=""){return["bk-picker-panel-icon-btn",`bk-date-picker-${e}-btn`,`bk-date-picker-${e}-btn-arrow${t}`]}const ey=(e,t)=>new Date(e,t+1,0).getDate(),A9=(e,t)=>{const n=new Date(e),i=n.getMonth()+t,l=ey(n.getFullYear(),i);return l<n.getDate()&&n.setDate(l),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 l=n.toLocaleDateString(i,{month:"long"});return(l[0].toUpperCase()+l.slice(1).toLowerCase()).slice(0,3)},mmmm:(n,i)=>n.toLocaleDateString(i,{month:"long"}),Mmmm:(n,i)=>{const l=n.toLocaleDateString(i,{month:"long"});return l[0].toUpperCase()+l.slice(1).toLowerCase()}},t=new RegExp(["yyyy","Mmmm","mmmm","Mmm","mmm","mm","m"].join("|"),"g");return(n,i,l)=>{const o=/(\[[^\]]+\])([^\\[\]]+)(\[[^\]]+\])/,c=i.match(o).slice(1),d=c[1],h=[c[0],c[2]].map(f=>({label:f.replace(/\[[^\]]+\]/,p=>p.slice(1,-1).replace(t,v=>e[v](l,n))),type:f.indexOf("yy")!==-1?"year":"month"}));return{separator:d,labels:h}}})(),na=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()},ty=(e,t,n)=>{if(!t||!n)return!1;const[i,l]=[t,n].sort();return e>=i&&e<=l};function ny(e){return e.toString()[0].toUpperCase()+e.toString().slice(1)}const iy=(e,...t)=>{const n=new Date(e.getTime());return n.setHours(t[0]),n.setMinutes(t[1]),n.setSeconds(t[2]),n},ay={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 Hc=a.defineComponent({name:"DateTable",props:ay,emits:["pick","pick-click","changeRange"],setup(e,{emit:t}){const n=a.computed(()=>new O5.Generator({onlyDays:!0,weekStart:0})),i=a.computed(()=>{const f=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"];return f.splice(0,7-0).concat(f.splice(0,0))}),l=a.computed(()=>e.selectionMode==="range"&&e.rangeState.selecting?[e.rangeState.from]:e.modelValue),o=a.computed(()=>{const f=e.tableDate.getFullYear(),m=e.tableDate.getMonth(),p=na(new Date),v=l.value.filter(Boolean).map(na),[C,I]=l.value.map(na),N=e.rangeState.from&&na(e.rangeState.from),x=e.rangeState.to&&na(e.rangeState.to),T=e.selectionMode==="range",y=typeof e.disableDate=="function"&&e.disableDate;return n.value(f,m,b=>{b.date instanceof Date&&b.date.setTime(b.date.getTime()+b.date.getTimezoneOffset()*6e4);const M=b.date&&na(b.date),L=b.date&&m===b.date.getMonth();return Te(F({},b),{type:M===p?"today":b.type,selected:L&&v.includes(M),disabled:b.date&&y&&y(new Date(M)),range:L&&T&&ty(M,N,x),start:L&&T&&M===C,end:L&&T&&M===I})}).cells.slice(0)});return{headerDays:i,cells:o,getCellCls:f=>["bk-date-picker-cells-cell",{["bk-date-picker-cells-cell-selected"]:f.selected||f.start||f.end,["bk-date-picker-cells-cell-disabled"]:f.disabled,["bk-date-picker-cells-cell-today"]:f.type==="today",["bk-date-picker-cells-cell-prev-month"]:f.type==="prevMonth",["bk-date-picker-cells-cell-next-month"]:f.type==="nextMonth",["bk-date-picker-cells-cell-week-label"]:f.type==="weekLabel",["bk-date-picker-cells-cell-range"]:f.range&&!f.start&&!f.end}],handleClick:f=>{if(f.disabled||f.type==="weekLabel")return;const m=new Date(na(f.date));t("pick",m),t("pick-click")},handleMouseMove:f=>{if(!e.rangeState.selecting||f.disabled)return;const m=f.date;t("changeRange",m)}}},render(){return a.createVNode("div",{class:"bk-date-picker-cells"},[a.createVNode("div",{class:"bk-date-picker-cells-header"},[this.headerDays.map(e=>a.createVNode("span",null,[e]))]),this.cells.map(e=>a.createVNode("span",{class:this.getCellCls(e),onClick:()=>this.handleClick(e),onMouseenter:()=>this.handleMouseMove(e)},[a.createVNode("em",null,[e.desc])]))])}});const Bc={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}},Zc={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}},ry={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}},sy={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:()=>[]}},V9=["hours","minutes","seconds"];var ly=a.defineComponent({name:"TimeSpinner",props:F(F({},sy),Zc),emits:["change","pick-click"],setup(e,{emit:t}){const n=a.reactive({spinerSteps:[1,1,1].map((k,A)=>Math.abs(e.steps[A])||k),compiled:!1,focusedColumn:-1,focusedTime:[0,0,0]}),i=a.computed(()=>{const k=[],A=n.spinerSteps[0],O=n.focusedColumn===0&&n.focusedTime[0],J={text:0,selected:!1,disabled:!1,hide:!1};for(let P=0;P<24;P+=A){const E=JSON.parse(JSON.stringify(J));E.text=P,E.focused=P===O,e.disabledHours.length&&e.disabledHours.indexOf(P)>-1&&(E.disabled=!0,e.hideDisabledOptions&&(E.hide=!0)),e.hours===P&&(E.selected=!0),k.push(E)}return k}),l=a.computed(()=>{const k=[],A=n.spinerSteps[1],O=n.focusedColumn===1&&n.focusedTime[1],J={text:0,selected:!1,disabled:!1,hide:!1};for(let P=0;P<60;P+=A){const E=JSON.parse(JSON.stringify(J));E.text=P,E.focused=P===O,e.disabledMinutes.length&&e.disabledMinutes.indexOf(P)>-1&&(E.disabled=!0,e.hideDisabledOptions&&(E.hide=!0)),e.minutes===P&&(E.selected=!0),k.push(E)}return k}),o=a.computed(()=>{const k=[],A=n.spinerSteps[2],O=n.focusedColumn===2&&n.focusedTime[2],J={text:0,selected:!1,disabled:!1,hide:!1};for(let P=0;P<60;P+=A){const E=JSON.parse(JSON.stringify(J));E.text=P,E.focused=P===O,e.disabledSeconds.length&&e.disabledSeconds.indexOf(P)>-1&&(E.disabled=!0,e.hideDisabledOptions&&(E.hide=!0)),e.seconds===P&&(E.selected=!0),k.push(E)}return k}),c=a.computed(()=>({width:e.showSeconds?"33.33%":"50%"}));a.watch(()=>e.hours,k=>{!n.compiled||N("hours",i.value.findIndex(A=>A.text===k))}),a.watch(()=>e.minutes,k=>{!n.compiled||N("minutes",l.value.findIndex(A=>A.text===k))}),a.watch(()=>e.seconds,k=>{!n.compiled||N("seconds",l.value.findIndex(A=>A.text===k))}),a.watch(()=>n.focusedTime,(k,A)=>{V9.forEach((O,J)=>{if(k[J]===A[J]||typeof k[J]=="undefined")return;const P=this[`${O}List`].findIndex(E=>E.text===k[J]);N(O,P)})}),a.onMounted(()=>{a.nextTick(()=>{n.compiled=!0,f()})});function d(k){let A;return k==="hours"?A=b:k==="minutes"?A=M:A=L,A.value}function h(k){return["bk-time-picker-cells-cell",{["bk-time-picker-cells-cell-selected"]:k.selected,["bk-time-picker-cells-cell-focused"]:k.focused,["bk-time-picker-cells-cell-disabled"]:k.disabled}]}function f(){const k=A=>{d(A).addEventListener("wheel",jt.exports.debounce(()=>{v(A)},32),{passive:!0})};k("hours"),k("minutes"),k("seconds")}function m(k){return d(k).querySelector("li").offsetHeight}function p(k){return d(k).offsetHeight}function v(k){const A=d(k),O=Math.min(Math.round((A.scrollTop-(p(k)*.5-10)/m(k)+3)/m(k)),k==="hours"?23:59);let J;if(k==="hours"?J=i:k==="minutes"?J=l:J=o,J.value.find(E=>E.text===O).disabled)return!1;a.nextTick(()=>{I({[k]:O})})}function C(k,A){if(A.disabled)return;const O={[k]:A.text};I(O)}function I(k){t("change",k),t("pick-click")}function N(k,A){const O=d(k),J=O.scrollTop,P=32*x(k,A);a4(O,J,P,500)}function x(k,A){const O=ny(k),J=e[`disabled${O}`];let P=A;if(J.length&&e.hideDisabledOptions){let E=0;J.forEach(ee=>ee<=A?E+=1:""),P-=E}return P}function T(){a.nextTick(()=>{V9.forEach(k=>{const A=d(k);let O;k==="hours"?O=i:k==="minutes"?O=l:O=o,A.scrollTop=32*O.value.findIndex(J=>J.text===e[k])})})}function y(k){return k<10?`0${k}`:k}const b=a.ref(null),M=a.ref(null),L=a.ref(null);return Te(F({},a.toRefs(n)),{hoursList:i,minutesList:l,secondsList:o,styles:c,hoursRef:b,minutesRef:M,secondsRef:L,getCellCls:h,handleClick:C,updateScroll:T,padTime:y})},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 oy={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 J9=a.defineComponent({name:"TimePickerPanel",props:F(F(F({},Bc),Zc),oy),emits:["pick","pick-click"],setup(e,{emit:t}){const n=a.reactive({date:e.value[0]||Wc(),showDate:!1}),i=a.inject(P9),l=a.ref(null),o=a.computed(()=>!(e.format||"").match(/mm$/)),c=a.computed(()=>wt.format(i.panelDate,e.format)),d=a.computed(()=>e.value[0]?["getHours","getMinutes","getSeconds"].map(p=>n.date[p]()):[]),h=a.computed(()=>{const p=["disabledHours","disabledMinutes","disabledSeconds"];if(e.disabledDate===(()=>!e.value[0]))return p.reduce((x,T)=>(x[T]=this[T],x),{});const v=[24,60,60],I=["Hours","Minutes","Seconds"].map(N=>e[`disabled${N}`]).map((N,x)=>{const T=v[x],y=N;for(let b=0;b<T;b+=e.steps[x]||1){const M=d.value.map((k,A)=>A===x?b:k),L=iy(n.date,...M);e.disabledDate(L,!0)&&y.push(b)}return y.filter((b,M,L)=>L.indexOf(b)===M)});return p.reduce((N,x,T)=>(N[x]=I[T],N),{})});a.watch(()=>e.value,p=>{let v=p[0]||Wc();v=new Date(v),n.date=v}),a.onMounted(()=>{i&&i.parentName==="DatePanel"&&(n.showDate=!0)});function f(p,v=!0){const C=new Date(n.date);Object.keys(p).forEach(I=>C[`set${Io(I)}`](p[I])),v&&t("pick",C,!0,"time")}function m(){t("pick-click")}return Te(F({},a.toRefs(n)),{visibleDate:c,showSeconds:o,timeSlots:d,disabledHMS:h,timeSpinnerRef:l,handlePickClick:m,handleChange:f})},render(){return a.createVNode("div",{class:"bk-picker-panel-body-wrapper",onMousedown:e=>{e.preventDefault()}},[a.createVNode("div",{class:"bk-picker-panel-body",style:{width:`${this.width}px`}},[this.showDate?a.createVNode("div",{class:"bk-time-picker-header"},[this.visibleDate]):"",a.createVNode("div",{class:"bk-picker-panel-content"},[a.createVNode(ly,{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 cy={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 uy=a.defineComponent({name:"DatePanel",props:cy,emits:["pick","pick-success","pick-clear","pick-click","selection-mode-change"],setup(e,{slots:t,emit:n}){const i=H=>H.match(/^time/)?"time-picker":`${H}-table`,l=e.modelValue.slice().sort(),o=a.reactive({currentView:e.selectionMode||"date",pickerTable:i(e.selectionMode),dates:l,panelDate:e.startDate||l[0]||new Date}),{proxy:c}=a.getCurrentInstance();a.provide(P9,{panelDate:o.panelDate,parentName:c.$options.name});const d=a.ref(null),h=a.ref(null),f=a.ref(null);a.watch(()=>o.currentView,H=>{console.error(11111,H),n("selection-mode-change",H),o.currentView==="time"&&a.nextTick(()=>{d.value.timeSpinnerRef.updateScroll()})}),a.watch(()=>e.selectionMode,H=>{o.currentView=H,o.pickerTable=i(H)});const m=()=>{setTimeout(()=>{o.currentView=e.selectionMode},500)},p=H=>{o.panelDate=H,o.pickerTable==="year-table"?o.pickerTable="month-table":o.pickerTable=i(o.currentView)},v=(H,le)=>{let de=H;e.selectionMode==="year"?de=new Date(H.getFullYear(),0,1):e.selectionMode==="month"?de=new Date(o.panelDate.getFullYear(),H.getMonth(),1):de=new Date(H),o.dates=[de],n("pick",de,!1,le||e.selectionMode)},C=()=>{m(),n("pick-success")},I=()=>{m(),n("pick-clear")},N=H=>{H.value&&n("pick",H.value(),!1,void 0,H),H.onClick&&H.onClick(this),e.shortcutClose&&C()},x=()=>{o.currentView=e.selectionMode,o.pickerTable=i(o.currentView)},T=H=>{e.selectionMode==="year"||o.pickerTable==="year-table"?o.panelDate=new Date(o.panelDate.getFullYear()+H*10,0,1):o.panelDate=A9(o.panelDate,H*12)},y=H=>{o.panelDate=A9(o.panelDate,H)},b=H=>{var le,de;H&&((le=h==null?void 0:h.value)==null||le.updateScroll(),(de=f==null?void 0:f.value)==null||de.updateScroll())},M=a.computed(()=>o.pickerTable===`${o.currentView}-table`?v:p),L=a.computed(()=>{const H="zh-CN",le="[yyyy]-[mm]",de=o.panelDate,{labels:he,separator:ye}=E9(H,le,de),re=K=>()=>{o.pickerTable=i(K)};return{separator:ye,labels:he.map(K=>{const B=K;return B.handler=re(K.type),B})}}),k=a.computed(()=>L.value.labels[0].type==="year"||o.currentView==="date"),A=a.computed(()=>L.value.labels[1].type==="year"||o.currentView==="date"),O=a.computed(()=>o.currentView==="time"),J=()=>{o.currentView=o.currentView==="time"?"date":"time"},P=a.computed(()=>!!t.shortcuts),E=a.computed(()=>!o.dates[0]);function ee(){n("pick-click")}return Te(F({},a.toRefs(o)),{panelPickerHandlers:M,datePanelLabel:L,showLabelFirst:k,showLabelSecond:A,handleShortcutClick:N,changeYear:T,changeMonth:y,reset:x,isTime:O,hasShortcuts:P,timeDisabled:E,onToggleVisibility:b,handleToggleTime:J,handlePickSuccess:C,handlePickClear:I,handlePick:v,handlePickClick:ee,timePickerRef:d})},render(){var e,t,n;return a.createVNode("div",{class:["bk-picker-panel-body-wrapper",this.shortcuts.length||this.hasShortcuts?"bk-picker-panel-with-sidebar":""],onMousedown:i=>{i.preventDefault()}},[this.shortcuts.length?a.createVNode("div",{class:"bk-picker-panel-sidebar"},[this.shortcuts.map(i=>a.createVNode("div",{class:"bk-picker-panel-shortcut",onClick:()=>this.handleShortcutClick(i)},[i.text]))]):"",a.createVNode("div",{class:"bk-picker-panel-body",style:"width: 261px;"},[a.withDirectives(a.createVNode("div",{class:"bk-date-picker-header"},[a.createVNode("span",{class:cn("prev","-double"),onClick:()=>this.changeYear(-1)},[a.createVNode(dr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:cn("prev"),onClick:()=>this.changeMonth(-1)},[a.createVNode(yi,{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:cn("next","-double"),onClick:()=>this.changeYear(1)},[a.createVNode(fr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:cn("next"),onClick:()=>this.changeMonth(1)},[a.createVNode(Mn,{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(Hc,{tableDate:this.panelDate,disableDate:this.disableDate,selectionMode:this.selectionMode,modelValue:this.dates,focusedDate:this.focusedDate,onPick:this.panelPickerHandlers},null);default:return null}})():a.createVNode(J9,{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(x5,{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 dy={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 fy=a.defineComponent({name:"DateRangePanel",props:dy,emits:["pick","pick-success"],setup(e,{slots:t,emit:n}){const[i,l]=e.modelValue.map(V=>V||Wc()),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&&!l},upToNowEnable:!1,dates:e.modelValue}),d=(V,$)=>!V||!$?0:V.getTime()-$.getTime(),h=()=>{c.currentView=e.selectionMode,c.leftPickerTable=`${c.currentView}-table`,c.rightPickerTable=`${c.currentView}-table`},f=a.ref(null),m=a.ref(null),p=V=>{var $,X;V&&(($=f==null?void 0:f.value)==null||$.updateScroll(),(X=m==null?void 0:m.value)==null||X.updateScroll())},v=(V,$,X,fe=!0)=>{const ce=new Date(c[`${V}PanelDate`]);if(ce[`set${$}`](ce[`get${$}`]()+X),c[`${V}PanelDate`]=ce,!!fe)if(e.splitPanels){const Ce=V==="left"?"right":"left";V==="left"&&c.leftPanelDate>=c.rightPanelDate&&v(Ce,$,1),V==="right"&&c.rightPanelDate<=c.leftPanelDate&&v(Ce,$,-1)}else{const Ce=V==="left"?"right":"left",Ee=c[`${Ce}PanelDate`],ne=new Date(Ee);if($==="Month"){const Y=new Date(ne.getFullYear(),ne.getMonth()+X+1,0).getDate();ne.setDate(Math.min(Y,ne.getDate()))}ne[`set${$}`](ne[`get${$}`]()+X),c[`${Ce}PanelDate`]=ne}},C=V=>{const $=c.currentView==="year"?-10:-1;v(V,"FullYear",$)},I=V=>{const $=c.currentView==="year"?10:1;v(V,"FullYear",$)},N=V=>{v(V,"Month",-1)},x=V=>{v(V,"Month",1)},T=V=>{c[`${V}PickerTable`]="year-table"},y=V=>{c[`${V}PickerTable`]="month-table"},b=V=>{const $="zh-CN",X="[yyyy]-[mm]",fe=c[`${V}PanelDate`],{labels:ce,separator:Ce}=E9($,X,fe),Ee=ne=>{const Y=ne==="month"?y:T;return()=>Y(V)};return{separator:Ce,labels:ce.map(ne=>{const Y=ne;return Y.handler=Ee(ne.type),Y})}},M=(V,$)=>{n("pick",c.dates,V,$||e.type)},L=(V,$)=>{if(console.warn("handleRangePick"),c.rangeState.selecting||c.currentView==="time"){if(c.currentView==="time")c.dates=V;else{const[X,fe]=[c.rangeState.from,V].sort(d),ce=$==="upToNow"?new Date:new Date(new Date(new Date(fe.setHours(23)).setMinutes(59)).setSeconds(59));c.dates=[X,ce],c.rangeState={from:X,to:ce,selecting:!1}}M(!1,$||"date")}else c.upToNowEnable=new Date(V).getTime()<new Date().getTime(),c.rangeState={from:V,to:null,selecting:!0}},k=(V,$)=>{if(c[`${V}PanelDate`]=$,c[`${V}PickerTable`]==="year-table"?c[`${V}PickerTable`]="month-table":c[`${V}PickerTable`]=`${c.currentView}-table`,!e.splitPanels){const fe=V==="left"?"right":"left";c[`${fe}PanelDate`]=$,v(fe,"Month",fe==="left"?-1:1,!1)}},A=(V,$)=>{if(!(V!=null&&V.value))return!1;V.onClick&&V.onClick(V,$);const X=typeof V.value=="function"?V.value():V.value,[fe,ce]=X;c.rangeState.from=fe,c.rangeState.to=ce,c.dates=[fe,ce],n("pick",X,!1,"shortcut",V),e.shortcutClose&&n("pick-success")},O=V=>{c.rangeState.to=V};a.watch(()=>e.selectionMode,V=>{c.currentView=V||"range"});const J=a.computed(()=>c.currentView==="time"),P=a.computed(()=>b("left")),E=a.computed(()=>b("right")),ee=a.computed(()=>c.leftPickerTable.split("-").shift()),H=a.computed(()=>c.rightPickerTable.split("-").shift()),le=a.computed(()=>P.value.labels[0].type==="year"||c.currentView==="date"),de=a.computed(()=>P.value.labels[1].type==="year"||c.currentView==="date"),he=a.computed(()=>E.value.labels[0].type==="year"||c.currentView==="date"),ye=a.computed(()=>E.value.labels[1].type==="year"||c.currentView==="date"),re=a.computed(()=>{const V=`${c.currentView}-table`;return{left:c.leftPickerTable!==V,right:c.rightPickerTable!==V}}),K=a.computed(()=>({left:re.value.left?k.bind("left"):L,right:re.value.right?k.bind("right"):L})),B=a.computed(()=>{var V;return t.shortcuts||((V=e.shortcuts)==null?void 0:V.length)});return Te(F({},a.toRefs(c)),{isTime:J,hasShortcuts:B,prevYear:C,nextYear:I,prevMonth:N,nextMonth:x,leftDatePanelLabel:P,rightDatePanelLabel:E,leftDatePanelView:ee,rightDatePanelView:H,leftShowLabelFirst:le,leftShowLabelSecond:de,rightShowLabelFirst:he,rightShowLabelSecond:ye,preSelecting:re,panelPickerHandlers:K,handleShortcutClick:A,reset:h,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:cn("prev","-double"),onClick:()=>this.prevYear("left")},[a.createVNode(dr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:cn("prev"),onClick:()=>this.prevMonth("left")},[a.createVNode(yi,{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:cn("next","-double"),onClick:()=>this.nextYear("left")},[a.createVNode(fr,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels||this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:cn("next"),onClick:()=>this.nextMonth("left")},[a.createVNode(Mn,{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(Hc,{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:cn("prev","-double"),onClick:()=>this.prevYear("right")},[a.createVNode(dr,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels&&this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:cn("prev","-double"),onClick:()=>this.prevMonth("right")},[a.createVNode(yi,{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:cn("next","-double"),onClick:()=>this.nextYear("right")},[a.createVNode(fr,{style:{fontSize:"20px",lineHeight:1}},null)]),this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:cn("next"),onClick:()=>this.nextMonth("right")},[a.createVNode(Mn,{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(Hc,{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])}}),hy=a.defineComponent({name:"DatePicker",directives:{clickoutside:$n},props:Bc,emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=On(),l=e.type.includes("range"),o=l?[null,null]:[null],c=l?e.value||e.modelValue:[e.value||e.modelValue];let d=D9(c)?o:xi(e.value||e.modelValue,e.type,e.multiple,e.format),h=null;e.shortcutSelectedIndex!==-1&&(h=e.shortcuts[e.shortcutSelectedIndex]||null,h&&(d=h.value()));const f=a.reactive({showClose:!1,visible:!1,internalValue:d,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:d[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:d.map(el),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:h,onSelectionModeChange:m});function m(ne){let Y=ne;return ne.match(/^date/)&&(Y="date"),f.selectionMode=["year","month","date","time"].indexOf(Y)>-1&&Y,f.selectionMode}const p=a.computed(()=>{if(e.multiple)return f.internalValue.slice();const ne=e.type.includes("range");let Y=f.internalValue.map(Z=>Z instanceof Date?new Date(Z):Z||"");return e.type.match(/^time/)&&(Y=Y.map(Z=>Rn(Z,e.type,e.multiple,e.format))),ne||e.multiple?Y:Y[0]}),v=a.computed(()=>e.type.match(/^time/)?p.value:e.multiple?Rn(p.value,e.type,e.multiple,e.format):Array.isArray(p.value)?p.value.map(ne=>Rn(ne,e.type,e.multiple,e.format)):Rn(p.value,e.type,e.multiple,e.format)),C=a.computed(()=>e.type==="daterange"||e.type==="datetimerange"?"DateRangePanel":"DatePanel"),I=a.computed(()=>e.open===null?f.visible:e.open),N=a.computed(()=>Rn(f.internalValue,e.type,e.multiple,e.format)),x=a.computed(()=>{var ne;return((ne=f.shortcut)==null?void 0:ne.text)&&e.useShortcutText?f.shortcut.text:N.value}),T=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),y=a.computed(()=>!!t.header),b=a.computed(()=>!!t.footer),M=a.computed(()=>!!t.shortcuts),L=a.computed(()=>{let ne="";return e.fontSize==="medium"?ne="medium-font":e.fontSize==="large"&&(ne="large-font"),ne}),k=a.computed(()=>{let ne="";return e.fontSize==="medium"?ne="medium-width":e.fontSize==="large"&&(ne="large-width"),ne}),A=a.computed(()=>{var ne;return((ne=f.shortcut)==null?void 0:ne.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),O=a.computed(()=>e.options),J=a.computed(()=>C.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),P=a.ref(null),E=()=>{var ne;(ne=P==null?void 0:P.value)==null||ne.focus()};a.watch(()=>f.visible,ne=>{var Y,Z;ne===!1&&((Y=ee.value)==null||Y.destoryDropdown()),(Z=ee.value)==null||Z.updateDropdown(),n("open-change",ne)});const ee=a.ref(null);a.watch(()=>e.modelValue,ne=>{var Y;f.internalValue=xi(ne,e.type,e.multiple,e.format),e.withValidate&&((Y=i==null?void 0:i.validate)==null||Y.call(i,"change"))}),a.watch(()=>e.open,ne=>{f.visible=ne===!0}),a.watch(()=>e.type,ne=>{m(ne)}),a.watch(()=>p,(ne,Y)=>{const Z=JSON.stringify(ne),ae=JSON.stringify(Y);(Z!==ae||typeof ne!=typeof Y)&&n("input",ne)}),a.onMounted(()=>{e.type.indexOf("date")>-1,f.timeEnterMode=!0;const ne=e.modelValue,Y=p.value;(typeof ne!=typeof Y||JSON.stringify(ne)!==JSON.stringify(Y))&&n("input",p.value),e.open!==null&&(f.visible=e.open),a.provide(z9,{props:e,focus:()=>E()})});const H=a.ref(null),le=ne=>{var Y;if(f.disableCloseUnderTransfer)return f.disableCloseUnderTransfer=!1,!1;if(ne&&ne.type==="mousedown"&&f.visible){ne.preventDefault(),ne.stopPropagation();return}if(f.visible){const Z=(Y=H==null?void 0:H.value)==null?void 0:Y.$el;if(ne&&Z&&Z.contains(ne.target))return;f.visible=!1,ne==null||ne.preventDefault(),ne==null||ne.stopPropagation();return}f.isFocused=!1,f.disableClickOutSide=!1},de=()=>{var ne,Y;(ne=P==null?void 0:P.value)==null||ne.focus(),(Y=P==null?void 0:P.value)==null||Y.click()},he=()=>{e.readonly||e.disabled||N!=null&&N.value&&(f.showClose=!0)},ye=ne=>{f.showClose=!1},re=ne=>{a.nextTick(()=>{var Y;n("change",v.value,ne),n("update:modelValue",p.value),e.type.indexOf("time")<0&&((Y=P==null?void 0:P.value)==null||Y.blur())})},K=ne=>{var G;const Y=e.type.includes("range")||e.multiple,Z=N.value,ae=ne.target.value,pe=xi(ae,e.type,e.multiple,e.format),D=Y?pe:pe[0],W=(G=e.disableDate)==null?void 0:G.call(e,D),Q=pe.reduce((te,ie)=>te&&ie instanceof Date,!0);ae!==Z&&!W&&Q?(re(e.type),f.internalValue=pe):f.forceInputRerender=f.forceInputRerender+1},B=ne=>{e.readonly||(f.isFocused=!0,!(ne&&ne.type==="focus")&&(e.disabled||(f.visible=!0)))},V=()=>{var ne;(ne=H==null?void 0:H.value)==null||ne.reset()},$=ne=>{var Y,Z;if(f.internalFocus){f.internalFocus=!1;return}if(f.visible){ne.preventDefault();return}f.isFocused=!1,m(e.type),f.internalValue=f.internalValue.slice(),V(),(Y=H==null?void 0:H.value)==null||Y.onToggleVisibility(!1),(Z=i==null?void 0:i.validate)==null||Z.call(i,"blur")},X=ne=>{const{keyCode:Y}=ne;if(Y===9&&f.visible)if(ne.stopPropagation(),ne.preventDefault(),T.value){const ae=".bk-picker-confirm > *",pe=ee.value.$el.querySelectorAll(ae);f.internalFocus=!0,[...pe][ne.shiftKey?"pop":"shift"]().focus()}else le();const Z=[37,38,39,40];if(!f.visible&&Z.includes(Y)){f.visible=!0;return}Y===27&&f.visible&&(ne.stopPropagation(),le()),!!Z.includes(Y)&&f.focusedTime.active&&ne.preventDefault()},fe=()=>{f.visible=!1,f.internalValue=f.internalValue.map(()=>null),n("clear"),re(e.type),V(),f.showClose=!1,f.shortcut=null,setTimeout(()=>m(e.type),500)},ce=()=>{var ne;f.visible=!1,a.nextTick(()=>{n("pick-success")}),(ne=P==null?void 0:P.value)==null||ne.blur(),V()},Ce=(ne,Y=!1,Z,ae)=>{let pe=ne;if(e.multiple){const W=pe.getTime(),Q=f.internalValue.findIndex(ie=>ie&&ie.getTime()===W),te=[...f.internalValue,pe].filter(Boolean).map(ie=>ie.getTime()).filter((ie,Me,Ie)=>Ie.indexOf(ie)===Me&&Me!==Q);f.internalValue=te.map(ie=>new Date(ie))}else pe=xi(ne,e.type,e.multiple,e.format),f.internalValue=Array.isArray(pe)?pe:[pe];if(f.internalValue[0]){const[W]=f.internalValue;f.focusedDate=W}f.focusedTime=Te(F({},f.focusedTime),{time:f.internalValue.map(el)}),T.value||(m(e.type),f.visible=Y),Z==="upToNow"&&e.type==="daterange"&&ce(),f.shortcut=ae,re(Z);const D=e.shortcuts.findIndex(W=>W===f.shortcut);n("shortcut-change",f.shortcut,D)},Ee=a.ref(null);return Te(F({},a.toRefs(f)),{panel:C,publicStringValue:v,opened:I,visualValue:N,displayValue:x,isConfirm:T,hasHeader:y,hasFooter:b,hasShortcuts:M,fontSizeCls:L,longWidthCls:k,localReadonly:A,allowCrossDayProp:J,ownPickerProps:O,pickerDropdownRef:ee,inputRef:P,triggerRef:Ee,pickerPanelRef:H,handleClose:le,handleIconClick:de,handleInputMouseenter:he,handleInputMouseleave:ye,handleFocus:B,handleBlur:$,handleKeydown:X,handleInputChange:K,handleClear:fe,onPick:Ce,onPickSuccess:ce})},render(){var n,i,l;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(wn,{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},[(l=(i=(n=this.$slots).trigger)==null?void 0:i.call(n))!=null?l: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(Ec,{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,d,h,f,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(d=(c=(o=this.$slots).header)==null?void 0:c.call(o))!=null?d:null]):null,this.panel==="DateRangePanel"?a.createVNode(fy,{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(uy,{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=(f=(h=this.$slots).footer)==null?void 0:f.call(h))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}}),gy=a.defineComponent({name:"TimePicker",directives:{clickoutside:$n},props:F(F(F({},Bc),ry),Zc),emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=On(),l=e.type.includes("range"),o=l?[null,null]:[null];let c=D9((l?e.modelValue:[e.modelValue])||[])?o:xi(e.modelValue,e.type,e.multiple,e.format),d=null;e.shortcutSelectedIndex!==-1&&(d=e.shortcuts[e.shortcutSelectedIndex]||null,d&&(c=d.value()));const h=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(el),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:d,onSelectionModeChange:f});function f(Y){let Z=Y;return Y.match(/^date/)&&(Z="date"),h.selectionMode=["year","month","date","time"].indexOf(Z)>-1&&Z,h.selectionMode}const m=a.computed(()=>{if(e.multiple)return h.internalValue.slice();const Y=e.type.includes("range");let Z=h.internalValue.map(ae=>ae instanceof Date?new Date(ae):ae||"");return e.type.match(/^time/)&&(Z=Z.map(ae=>Rn(ae,e.type,e.multiple,e.format))),Y||e.multiple?Z:Z[0]}),p=a.computed(()=>e.type.match(/^time/)?m.value:e.multiple?Rn(m.value,e.type,e.multiple,e.format):Array.isArray(m.value)?m.value.map(Y=>Rn(Y,e.type,e.multiple,e.format)):Rn(m.value,e.type,e.multiple,e.format)),v=a.computed(()=>e.type==="timerange"?"RangeTimePickerPanel":"TimePickerPanel"),C=a.computed(()=>e.open===null?h.visible:e.open),I=a.computed(()=>Rn(h.internalValue,e.type,e.multiple,e.format)),N=a.computed(()=>{var Y;return((Y=h.shortcut)==null?void 0:Y.text)&&e.useShortcutText?h.shortcut.text:I.value}),x=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),T=a.computed(()=>!!t.header),y=a.computed(()=>!!t.footer),b=a.computed(()=>!!t.shortcuts),M=a.computed(()=>{let Y="";return e.fontSize==="medium"?Y="medium-font":e.fontSize==="large"&&(Y="large-font"),Y}),L=a.computed(()=>{let Y="";return e.fontSize==="medium"?Y="medium-width":e.fontSize==="large"&&(Y="large-width"),Y}),k=a.computed(()=>{var Y;return((Y=h.shortcut)==null?void 0:Y.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),A=a.computed(()=>({disabledHours:e.disabledHours,disabledMinutes:e.disabledMinutes,disabledSeconds:e.disabledSeconds,hideDisabledOptions:e.hideDisabledOptions})),O=a.computed(()=>v.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),J=a.ref(null),P=()=>{var Y;(Y=J==null?void 0:J.value)==null||Y.focus()},{proxy:E}=a.getCurrentInstance();a.watch(()=>h.visible,Y=>{Y&&a.nextTick(()=>{O9(E,"TimeSpinner").forEach(ae=>ae.updateScroll())})});const ee=a.ref(null);a.watch(()=>e.modelValue,Y=>{var Z;h.internalValue=xi(Y,e.type,e.multiple,e.format),e.withValidate&&((Z=i==null?void 0:i.validate)==null||Z.call(i,"change"))}),a.watch(()=>e.open,Y=>{h.visible=Y===!0}),a.watch(()=>e.type,Y=>{f(Y)}),a.watch(()=>m,(Y,Z)=>{const ae=JSON.stringify(Y),pe=JSON.stringify(Z);(ae!==pe||typeof Y!=typeof Z)&&n("input",Y)}),a.onMounted(()=>{e.type.indexOf("date")>-1,h.timeEnterMode=!0;const Y=e.modelValue,Z=m.value;(typeof Y!=typeof Z||JSON.stringify(Y)!==JSON.stringify(Z))&&n("input",m.value),e.open!==null&&(h.visible=e.open),a.provide(z9,{props:e,focus:()=>P()})});const H=a.ref(null),le=Y=>{var Z;if(h.disableCloseUnderTransfer)return h.disableCloseUnderTransfer=!1,!1;if(Y&&Y.type==="mousedown"&&h.visible){Y.preventDefault(),Y.stopPropagation();return}if(h.visible){const ae=(Z=H==null?void 0:H.value)==null?void 0:Z.$el;if(Y&&ae&&ae.contains(Y.target))return;h.visible=!1,Y==null||Y.preventDefault(),Y==null||Y.stopPropagation();return}h.isFocused=!1,h.disableClickOutSide=!1},de=()=>{var Y,Z;(Y=J==null?void 0:J.value)==null||Y.focus(),(Z=J==null?void 0:J.value)==null||Z.click()},he=()=>{e.readonly||e.disabled||I!=null&&I.value&&(h.showClose=!0)},ye=Y=>{h.showClose=!1},re=Y=>{a.nextTick(()=>{var Z;n("change",p.value,Y),n("update:modelValue",m.value),e.type.indexOf("time")<0&&((Z=J==null?void 0:J.value)==null||Z.blur())})},K=Y=>{var te;const Z=e.type.includes("range")||e.multiple,ae=I.value,pe=Y.target.value,D=xi(pe,e.type,e.multiple,e.format),W=Z?D:D[0],Q=(te=e.disableDate)==null?void 0:te.call(e,W),G=D.reduce((ie,Me)=>ie&&Me instanceof Date,!0);pe!==ae&&!Q&&G?(re(e.type),h.internalValue=D):h.forceInputRerender=h.forceInputRerender+1},B=Y=>{e.readonly||(h.isFocused=!0,!(Y&&Y.type==="focus")&&(e.disabled||(h.visible=!0)))},V=()=>{var Y;(Y=H==null?void 0:H.value)==null||Y.reset()},$=Y=>{var Z,ae;if(h.internalFocus){h.internalFocus=!1;return}if(h.visible){Y.preventDefault();return}h.isFocused=!1,f(e.type),h.internalValue=h.internalValue.slice(),V(),(Z=H==null?void 0:H.value)==null||Z.onToggleVisibility(!1),(ae=i==null?void 0:i.validate)==null||ae.call(i,"blur")},X=Y=>{const{keyCode:Z}=Y;if(Z===9&&h.visible)if(Y.stopPropagation(),Y.preventDefault(),x.value){const pe=".bk-picker-confirm > *",D=ee.value.$el.querySelectorAll(pe);h.internalFocus=!0,[...D][Y.shiftKey?"pop":"shift"]().focus()}else le();const ae=[37,38,39,40];if(!h.visible&&ae.includes(Z)){h.visible=!0;return}Z===27&&h.visible&&(Y.stopPropagation(),le()),!!ae.includes(Z)&&h.focusedTime.active&&Y.preventDefault()},fe=()=>{h.visible=!1,h.internalValue=h.internalValue.map(()=>null),n("clear"),re(e.type),V(),h.showClose=!1,h.shortcut=null,setTimeout(()=>f(e.type),500)},ce=()=>{e.appendToBody&&(h.disableCloseUnderTransfer=!0)},Ce=()=>{var Y;h.visible=!1,a.nextTick(()=>{n("pick-success")}),(Y=J==null?void 0:J.value)==null||Y.blur(),V()},Ee=(Y,Z=!1,ae,pe)=>{let D=Y;if(e.multiple){const Q=D.getTime(),G=h.internalValue.findIndex(Me=>Me&&Me.getTime()===Q),ie=[...h.internalValue,D].filter(Boolean).map(Me=>Me.getTime()).filter((Me,Ie,Le)=>Le.indexOf(Me)===Ie&&Ie!==G);h.internalValue=ie.map(Me=>new Date(Me))}else D=xi(Y,e.type,e.multiple,e.format),h.internalValue=Array.isArray(D)?D:[D];if(h.internalValue[0]){const[Q]=h.internalValue;h.focusedDate=Q}h.focusedTime=Te(F({},h.focusedTime),{time:h.internalValue.map(el)}),x.value||(f(e.type),h.visible=Z),ae==="upToNow"&&e.type==="daterange"&&Ce(),h.shortcut=pe,re(ae);const W=e.shortcuts.findIndex(Q=>Q===h.shortcut);n("shortcut-change",h.shortcut,W)},ne=a.ref(null);return console.error(v),console.error(v.value),Te(F({},a.toRefs(h)),{panel:v,publicStringValue:p,opened:C,visualValue:I,displayValue:N,isConfirm:x,hasHeader:T,hasFooter:y,hasShortcuts:b,fontSizeCls:M,longWidthCls:L,localReadonly:k,allowCrossDayProp:O,ownPickerProps:A,pickerDropdownRef:ee,inputRef:J,triggerRef:ne,pickerPanelRef:H,handleClose:le,handleIconClick:de,handleInputMouseenter:he,handleInputMouseleave:ye,handleFocus:B,handleBlur:$,handleKeydown:X,handleInputChange:K,handleClear:fe,handleTransferClick:ce,onPick:Ee,onPickSuccess:Ce})},render(){var n,i,l;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(wn,{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},[(l=(i=(n=this.$slots).trigger)==null?void 0:i.call(n))!=null?l: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(Ec,{class:[this.appendToBody?"bk-date-picker-transfer":""],ref:"pickerDropdownRef",triggerRef:this.triggerRef,placement:this.placement,extPopoverCls:this.extPopoverCls,appendToBody:this.appendToBody,onClick:this.handleTransferClick},{default:()=>{var o,c,d,h,f,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(d=(c=(o=this.$slots).header)==null?void 0:c.call(o))!=null?d:null]):null,a.createVNode(J9,{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=(f=(h=this.$slots).footer)==null?void 0:f.call(h))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}});const Q9=Ge(hy);var Wn=(e=>(e.OBJECT_ARRAY="objectArray",e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e))(Wn||{});const my={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 py(e,t,n){const i=a.ref([]),l=a.ref([]),o=()=>{e.value.forEach(c=>{const d=c[n.value];t.value.includes(d)?l.value.push(c):i.value.push(c)})};return o(),a.watch(()=>[e,t,n],o),{selectList:i,selectedList:l}}function by(e,t){const n=a.ref(""),i=a.computed(()=>e.value.filter(l=>{const o=l[t.value];return o instanceof Object?!1:o.toString().includes(n.value)}));return{selectSearchQuery:n,selectListSearch:i}}var yy=a.defineComponent({name:"Transfer",props:my,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]"))?Wn.OBJECT_ARRAY:Wn.BASE_ARRAY:Wn.NOT_ARRAY),i=a.computed(()=>n.value===Wn.BASE_ARRAY?"value":e.settingKey),l=a.computed(()=>n.value===Wn.BASE_ARRAY?"value":e.displayKey),o=a.computed(()=>e.sortKey||l.value),c=a.computed(()=>{switch(n.value){case Wn.BASE_ARRAY:return[...new Set(e.sourceList)].map(y=>({value:y}));case Wn.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:d}=a.toRefs(e),{selectList:h,selectedList:f}=py(c,d,i),{selectSearchQuery:m,selectListSearch:p}=by(h,l),v=a.computed(()=>[...p.value].sort((y,b)=>{const M=y[o.value],L=b[o.value];return M>L?1:-1})),C=a.computed(()=>[...f.value].sort((y,b)=>{const M=y[o.value],L=b[o.value];return M>L?1:-1})),I=()=>{h.value=[],f.value=[...c.value],T()},N=()=>{h.value=[...c.value],f.value=[],T()},x=(y,b)=>{const M=b?h:f,L=b?f:h,k=M.value.findIndex(A=>A[i.value]===y);L.value.push(...M.value.splice(k,1)),T()},T=()=>{const y=h.value.map(M=>M[i.value]),b=f.value.map(M=>M[i.value]);t("update:targetList",b),t("change",n.value===Wn.BASE_ARRAY?y:h.value.map(M=>a.toRaw(M)),n.value===Wn.BASE_ARRAY?b:f.value.map(M=>a.toRaw(M)),b)};return{selectSearchQuery:m,selectListSearch:p,selectedList:f,selectListSort:v,selectedListSort:C,settingCode:i,displayCode:l,allToRight:I,allToLeft:N,handleItemClick:x}},render(){const e=this.sortable?this.selectListSort:this.selectListSearch,t=this.sortable?this.selectedListSort:this.selectedList,n=c=>{var p,v;const d=c==="left-header",h=d?`${(p=this.title[0])!=null?p:"\u5DE6\u4FA7\u5217\u8868"}`:`${(v=this.title[1])!=null?v:"\u53F3\u4FA7\u5217\u8868"}`,f=d?!e.length:!t.length,m=()=>{f||(d?this.allToRight():this.allToLeft())};return this.$slots[c]?a.createVNode("div",{class:"slot-header"},[this.$slots[c]()]):a.createVNode("div",{class:"header"},[`${h}\uFF08\u5171${d?e.length:t.length}\u6761\uFF09`,a.createVNode("span",{class:{disabled:f},onClick:()=>m()},[d?"\u5168\u90E8\u6DFB\u52A0":"\u6E05\u7A7A"])])},i=c=>{var f;const d=c==="left-empty-content",h=(f=d?this.emptyContent[0]:this.emptyContent[1])!=null?f:d?"\u65E0\u6570\u636E":"\u672A\u9009\u62E9\u4EFB\u4F55\u9879";return this.$slots[c]?a.createVNode("div",null,[this.$slots[c]()]):a.createVNode("div",{class:"empty"},[h])},l=(c,d=!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"},[d?a.createVNode(jo,{class:"bk-icon"},null):a.createVNode(An,{class:"bk-icon"},null)])]),o=c=>{const d=c==="left",h=d?e:t,f=d?"source-option":"target-option",m=d?"left-empty-content":"right-empty-content";return h.length?a.createVNode("ul",{class:["content",this.searchable&&d?"is-search":""]},[h.map(p=>{var v,C,I;return a.createVNode("li",{key:p[this.settingCode],class:[this.$slots[f]?"custom-item":""],onClick:()=>this.handleItemClick(p[this.settingCode],d)},[(I=(C=(v=this.$slots)[f])==null?void 0:C.call(v,p))!=null?I:l(p,d)])})]):i(m)};return a.createVNode("div",{class:["bk-transfer",this.extCls]},[a.createVNode("div",{class:"source-list"},[n("left-header"),this.searchable&&a.createVNode(Fi,{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 R9=Ge(yy);var xr=(e=>(e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_EXPAND="nodeExpand",e.NODE_CHECKED="nodeChecked",e))(xr||{});const tl=(...e)=>!0,Cy={nodeClick:tl,nodeCollapse:tl,nodeExpand:tl,nodeChecked:tl};var oe=(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))(oe||{});const Si={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"},My={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 wy=(e,{slots:t})=>({renderEmpty:n=>a.createVNode(Ps,{scene:"part",type:n},{default:()=>{var i,l;return[(l=(i=t.default)==null?void 0:i.call(t))!=null?l:e.emptyText]}})}),nl=(e,t)=>{const n=E=>e.schema.get(E),i=(E,ee)=>{var H;return(H=n(E[oe.UUID]))==null?void 0:H[ee]},l=(E,ee,H)=>{e.schema.set(E[oe.UUID],Te(F({},n(E[oe.UUID])),{[ee]:H}))},o=E=>i(E,oe.PATH),c=E=>i(E,oe.UUID),d=E=>i(E,oe.IS_ROOT),h=E=>i(E,oe.IS_OPEN),f=E=>i(E,oe.HAS_CHILD),m=E=>i(E,oe.IS_MATCH),p=E=>i(E,oe.IS_CHECKED),v=E=>i(E,oe.PARENT_ID),C=E=>i({[oe.UUID]:E},oe.PARENT_ID),I=E=>i(E,oe.IS_LOADING),N=(E,ee)=>{l(E,oe.IS_LOADING,ee)},x=E=>e.schema.delete(E),T=E=>n(v(E)),y=E=>{var ee;return typeof E=="object"?h(E):typeof E=="string"?(ee=n(E))==null?void 0:ee[oe.IS_OPEN]:!1},b=E=>y(i(E,oe.PARENT_ID)),M=E=>d(E)||b(E),L=E=>E.split("-").reduce((H,le)=>{const de=Number(le);return Array.isArray(H)?H[de]:H[t.children][de]},t.data),k=E=>{const ee=e.schema;return Array.prototype.filter.call(Array.from(ee.keys()),H=>ee.get(H)[oe.PARENT_ID]===E[oe.UUID])},A=E=>L(o({[oe.UUID]:E})),O=E=>d({[oe.UUID]:E})?{[t.children]:t.data}:A(C(E)),J=E=>({[Si[oe.IS_LOADING]]:i(E,oe.IS_LOADING),[Si[oe.HAS_CHILD]]:f(E),[Si[oe.IS_MATCH]]:m(E),[Si[oe.IS_CHECKED]]:p(E),[Si[oe.IS_OPEN]]:h(E),[Si[oe.IS_ROOT]]:d(E),fullPath:i(E,oe.PATH),uuid:c(E),parentId:i(E,oe.PARENT_ID)});return{getSchemaVal:n,getNodeAttr:i,getNodeId:c,getNodeParentId:v,getNodeParentIdById:C,getParentNodeData:O,getParentNode:T,setNodeAttr:l,getNodePath:o,isRootNode:d,isNodeOpened:h,hasChildNode:f,isItemOpen:y,isNodeChecked:p,isNodeMatched:m,isNodeLoading:I,checkNodeIsOpen:M,getSourceNodeByPath:L,getSourceNodeByUID:A,deleteNodeSchema:x,resolveScopedSlotParam:J,setTreeNodeLoading:N,extendNodeAttr:E=>Te(F({},E),{[oe.TREE_NODE_ATTR]:J(E)}),getChildNodes:k}};const W9="1px dashed #c3cdd7",H9=(e,t,n=null,i=null,l=null,o=[])=>{const c=e[t];return typeof c=="boolean"?c?i:l:B9(n,e,t,o)},B9=(e,t,n,i=[])=>{const l=t[n];if(typeof l=="string")return typeof e=="object"&&e!==null?(Object.prototype.hasOwnProperty.call(e,l)||console.error(`cannot find node label with key ${l}`),e[l]):l;if(typeof l=="function"){const o=l.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}},Z9=(e,t)=>B9(e,t,"label"),Gc=(e,t)=>e.get(t)||{},vy=(e,t,n)=>{var i;return(i=Gc(e,t))==null?void 0:i[n]},Iy=(e,t)=>({"--level-line":H9(t,"levelLine",e,W9,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),Ny=(e,t,n={})=>{const{schema:i}=n,l=vy(i,e[oe.UUID],oe.DEPTH);return F({"--depth":l},typeof t.levelLine=="function"?{"--level-line":H9(t,"levelLine",e,W9,null,["node"])}:{})},Ly=(e,t,n)=>{const{__is_root:i,__is_open:l}=Gc(t,e[oe.UUID])||{};return{"is-root":i,"bk-tree-node":!0,"is-open":l,"is-virtual-render":n.virtualRender,"level-line":n.levelLine}},ky=(e,t)=>{const{__is_checked:n,__is_selected:i}=Gc(t,e[oe.UUID])||{};return{"is-checked":n,"is-selected":i,[Ze("node-row")]:!0}},Ty=(e,t,n,i,l)=>{xy(e,t,n,{[i]:l})},xy=(e,t,n,i)=>{const o=e.split("-").reduce((c,d)=>{const h=Number(d);return Array.isArray(c)?c[h]:c[n][h]},t);Object.assign(o,i||{})},Sr=e=>e==null?{__IS_NULL:!0}:typeof e=="string"||typeof e=="number"||typeof e=="symbol"?{[oe.UUID]:e}:(Object.prototype.hasOwnProperty.call(e,oe.UUID)||console.error("setNodeAction Error: node id cannot found"),e);var G9=(e,t)=>{const{setNodeAttr:n,getNodePath:i,getNodeAttr:l,resolveScopedSlotParam:o,setTreeNodeLoading:c}=nl(t,e),d=(m,p)=>{if(typeof m=="object"&&m!==null){n(p,oe.IS_OPEN,!0);const v=Array.isArray(m)?m:[m];return Ty(i(p),e.data,e.children,e.children,v),Promise.resolve(m)}return Promise.resolve(m)},h=m=>{const{callback:p=null,cache:v=!0}=e.async||{};if(typeof p=="function"&&l(m,oe.IS_ASYNC)){if(n(m,oe.IS_ASYNC_INIT,!0),!l(m,oe.IS_CACHED)){n(m,oe.IS_CACHED,v);const C=o(m),I=p(m,N=>d(N,m),C);if(typeof I=="object"&&I!==null)return c(m,!0),I instanceof Promise?Promise.resolve(I.then(N=>d(N,m)).catch(N=>console.error("load remote data error:",N)).finally(()=>{c(m,!1),n(m,oe.IS_CACHED,!0)})):(d(I,m),c(m,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},f=()=>{const m=t.data.filter(p=>l(p,oe.IS_ASYNC)&&p[Si[oe.IS_OPEN]]&&!l(p,oe.IS_ASYNC_INIT));m.length&&Promise.all(m.map(p=>h(p))).then(()=>{f()}).catch(p=>{console.warn(p)})};return{asyncNodeClick:h,deepAutoOpen:f}},Sy=(e,t,n,i,l,o)=>{let c=e.selected;const{setNodeAttr:d,getNodePath:h,getSchemaVal:f,getNodeAttr:m,getNodeId:p,getChildNodes:v,isRootNode:C,hasChildNode:I,isItemOpen:N,isNodeOpened:x,isNodeLoading:T,isNodeChecked:y,getParentNode:b,resolveScopedSlotParam:M,extendNodeAttr:L}=nl(n,e),{registerNextLoop:k}=o,{asyncNodeClick:A,deepAutoOpen:O}=G9(e,n),J=Z=>N(Z)?a.createVNode(Jo,{class:[Ze("tree-icon"),Ze("node-prefix")]},null):a.createVNode(Qo,{class:[Ze("tree-icon"),Ze("node-prefix")]},null),P=Z=>{if(typeof Z=="string")return Z;if(typeof Z=="object"&&Z!==null){if(Z.__v_isVNode)return Z;const{node:ae,className:pe,text:D,style:W}=Z;return a.h(ae,{class:pe,style:W},D)}return null},E=Z=>{var ae,pe,D;return((D=(pe=(ae=t.slots).nodeLoading)==null?void 0:pe.call(ae,L(Z)))!=null?D:T(Z))?a.createVNode(xs,null,null):""},ee=Z=>{if(t.slots.nodeAction)return t.slots.nodeAction(L(Z));let ae=null;return T(Z)?E(Z):typeof e.prefixIcon=="function"&&(ae=e.prefixIcon(L(Z),"node_action"),ae!=="default")?P(ae):(ae==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon)&&(I(Z)||Z.async||!e.autoCheckChildren)?N(Z)?a.createVNode(ws,{class:Ze("node-prefix")},null):a.createVNode(ks,{class:Ze("node-prefix")},null):null},H=Z=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(L(Z));let ae=null;return typeof e.prefixIcon=="function"&&(ae=e.prefixIcon(L(Z),"node_type"),ae!=="default")?P(ae):ae==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?C(Z)||I(Z)?J(Z):a.createVNode(Go,{class:[Ze("tree-icon"),Ze("node-prefix")]},null):null},le=(Z,ae)=>{const pe=b(Z);pe&&(d(pe,oe.IS_CHECKED,ae),C(pe)||le(pe,ae))},de=(Z,ae,pe)=>{v(Z).forEach(D=>{d({[oe.UUID]:D},ae,pe),de({[oe.UUID]:D},ae,pe)})},he=(Z,ae)=>{d(Z,oe.IS_CHECKED,!!ae),de(Z,oe.IS_CHECKED,!!ae),le(Z,ae),t.emit(xr.NODE_CHECKED,l.value.filter(pe=>y(pe)).map(pe=>pe[oe.UUID]))},ye=Z=>y(Z)&&!l.value.filter(ae=>{var pe;return(pe=h(ae))==null?void 0:pe.startsWith(h(Z))}).every(ae=>y(ae)),re=Z=>y(Z)||l.value.filter(ae=>{var pe;return(pe=h(ae))==null?void 0:pe.startsWith(h(Z))}).some(ae=>y(ae)),K=Z=>e.showCheckbox?a.createVNode(Ui,{size:"small",modelValue:re(Z),indeterminate:ye(Z),onChange:ae=>he(Z,ae)},null):null,B=(Z,ae=null,pe=null,D=!0)=>{const W=ae===null?!N(Z):!!ae;if(W||de(Z,oe.IS_OPEN,W),d(Z,oe.IS_OPEN,W),D){const Q=N(Z)?xr.NODE_EXPAND:xr.NODE_COLLAPSE;t.emit(Q,Z,M(Z),f(Z[oe.UUID]),pe)}},V=(Z,ae,pe)=>{if(Array.isArray(Z)){Z.forEach(D=>d(Sr(D),ae,pe));return}d(Sr(Z),ae,pe)},$=(Z,ae=!0,pe=!1)=>{const D=Sr(Z);if(!D[oe.IS_NULL])if(pe)if(ae){if(V(D,oe.IS_OPEN,!0),!C(D)){const W=m(D,oe.PARENT_ID);$(W,!0,!0)}}else B(D,!1,null,!1);else V(D,oe.IS_OPEN,ae)},X=(Z,ae)=>{if(x(Z)){B(Z,!1,ae);return}A(Z).finally(()=>{m(Z,oe.IS_LOADING)?k("setNodeOpenedAfterLoading",{type:"once",fn:()=>B(Z,!0,ae)}):B(Z,!0,ae)})},fe=(Z,ae)=>{Z.stopImmediatePropagation(),Z.stopPropagation(),Z.preventDefault(),X(ae,Z)},ce=(Z,ae=!0,pe=!0)=>{const D=Array.isArray(Z)?Z:[Z];if(!D.length)return;const W=Sr(D[0]);W[oe.IS_NULL]||(e.selectable?(c!=null&&d({[oe.UUID]:c},oe.IS_SELECTED,!ae),e.selected&&e.selected!==c&&d({[oe.UUID]:e.selected},oe.IS_SELECTED,!ae),d(W,oe.IS_SELECTED,ae),c=p(W),pe&&D.length===1&&$(W,!0,!0),m(W,oe.IS_ASYNC)&&A(W).then(()=>{a.nextTick(()=>{D.shift(),ce(D,ae,pe)})})):console.warn("props.selectable is false or undefined, please set selectable with true"))},Ce=(Z,ae)=>{ce(Z,!0,!1),x(Z)||X(Z,ae);const pe=xr.NODE_CLICK;t.emit(pe,Z,M(Z),f(Z[oe.UUID]),ae)},Ee=(Z,ae)=>{if(C(ae))return!1;const pe=h(ae),D=`${pe}`.split("-").slice(0,Z+1);if(D.join("-")===pe)return!0;const Q=D.pop(),G=parseInt(Q,10);D.push(`${G+1}`);const te=D.join("-");return l.value.some(ie=>ie[oe.PATH]===te)},ne=Z=>{if(!e.levelLine)return null;const ae=D=>({"--depth":D}),pe=m(Z,oe.DEPTH)+1;return new Array(pe).fill("").map((D,W)=>W).filter(D=>Ee(D,Z)).filter(D=>D>0).map(D=>a.createVNode("span",{class:"node-virtual-line",style:ae(pe-D)},null))};return{renderTreeNode:Z=>{var ae,pe,D,W,Q;return a.createVNode("div",{"data-tree-node":p(Z),key:p(Z),class:ky(Z,n.schema)},[a.createVNode("div",{class:Ly(Z,n.schema,e),style:Ny(Z,e,n),onClick:G=>Ce(Z,G)},[a.createVNode("span",{class:[Ze("node-action")],onClick:G=>fe(G,Z)},[ee(Z)]),a.createVNode("span",{class:Ze("node-content")},[[K(Z),H(Z)],a.createVNode("span",{class:Ze("node-text")},[(D=(pe=(ae=t.slots).node)==null?void 0:pe.call(ae,L(Z)))!=null?D:[Z9(Z,e)]]),(Q=(W=t.slots).nodeAppend)==null?void 0:Q.call(W,L(Z))]),ne(Z)])])},hanldeTreeNodeClick:X,deepAutoOpen:O,asyncNodeClick:A,setNodeAction:V,setNodeOpened:B,setSelect:ce,setOpen:$}},Dy=(e,t,n)=>{const{getSourceNodeByUID:i,getNodeParentIdById:l,getParentNodeData:o,getNodeAttr:c,getNodePath:d,isRootNode:h}=nl(n,e),f=y=>y.target.closest("[data-tree-node]"),m=y=>{f(y).removeEventListener("mouseup",m)},p=y=>{const b=f(y);b.setAttribute("draggable","true"),b.addEventListener("mouseup",m)},v=y=>{y.preventDefault();const b=f(y),M=y.dataTransfer.getData("node-id"),L=b.getAttribute("data-tree-node"),k=N(M,L)?"move":"none";y.dataTransfer.effectAllowed=k,y.dataTransfer.dropEffect=k},C=y=>{y.dataTransfer.effectAllowed="move",y.dataTransfer.dropEffect="move";const b=f(y);y.dataTransfer.setData("text/plain",""),y.dataTransfer.setData("node-id",b.getAttribute("data-tree-node"))},I=y=>{y.preventDefault(),y.stopPropagation();const b=f(y),M=y.dataTransfer.getData("node-id"),L=b.getAttribute("data-tree-node");Reflect.apply(e.dragSort?x:T,globalThis,[M,L])},N=(y,b)=>{const M=d({[oe.UUID]:y}),L=d({[oe.UUID]:b}),k=l(y),A=l(b);return k===A?!0:M.indexOf(L)===-1&&L.indexOf(M)===-1},x=(y,b)=>{if(!N(y,b))return;const M=JSON.parse(JSON.stringify(i(y))),L=JSON.parse(JSON.stringify(i(b))),k=o(y),A=o(b),O=c({[oe.UUID]:y},oe.INDEX),J=c({[oe.UUID]:b},oe.INDEX);k==null||k[e.children].splice(O,1,L),A==null||A[e.children].splice(J,1,M)},T=(y,b)=>{const M=i(y),L=i(b);let k=null;if(h({[oe.UUID]:y}))k=e.data;else{const A=l(y);if(A!=null){k=i(A);const O=c({[oe.UUID]:y},oe.INDEX);k==null||k[e.children].splice(O,1)}}L[e.children]||(L[e.children]=[]),L[e.children].unshift(M)};a.onMounted(()=>{if(e.draggable&&t.value){const y=t.value.$el;y.addEventListener("mousedown",p),y.addEventListener("dragstart",C),y.addEventListener("dragover",v),y.addEventListener("drop",I)}}),a.onUnmounted(()=>{if(e.draggable&&t.value){const y=t.value.$el;y.removeEventListener("mousedown",p),y.removeEventListener("dragstart",C),y.removeEventListener("dragover",v),y.removeEventListener("drop",I)}})},jy=e=>{var v;const t=a.toRef(e,"search"),{openResultNode:n=!1,resultType:i="tree"}=(v=e.search)!=null?v:{},l=C=>["string","number","boolean"].includes(typeof C),o=(C,I)=>C===I,c=(C,I)=>new RegExp(`${C}`,"i").test(`${I}`),d=(C,I)=>Reflect.apply(C,globalThis,I),h=t.value===void 0||t.value===!1,f=(C,I)=>{if(h)return!0;if(l(t.value))return d(c,[t.value,C,I]);const{value:N="",match:x="fuzzy"}=t.value,y=typeof x=="function"?x:x==="fuzzy"?c:o;return`${N}`.length===0?!0:d(y,[N,C,I])},m=a.computed(()=>t.value!==!1&&(l(t.value)?`${t.value}`.length>0:typeof t.value=="object"));return{searchFn:f,refSearch:t,isSearchActive:m,isSearchDisabled:h,openResultNode:n,resultType:i,isTreeUI:i==="tree"}},zy=e=>{var x;const t=(T,y=void 0,b=[])=>{const{data:M,children:L}=T,k=[],A=[];let O=0;const J=new Map;function P(re,K,B,V){if(re!=null&&J.has(re)&&![oe.UUID,oe.PARENT_ID].includes(K)){const $=J.get(re);Object.prototype.hasOwnProperty.call($,K)&&typeof V=="function"&&Reflect.apply(V,self,[$,K,B])&&(Object.assign($,{[K]:B}),P($[oe.PARENT_ID],K,B,V))}}function E(re){let K=null;return typeof T.nodeKey=="string"&&(K=re[T.nodeKey]||Hi.v4()),K||re[oe.UUID]||Hi.v4()}const ee={[oe.IS_OPEN]:()=>!1,[oe.IS_CHECKED]:()=>!1,[oe.IS_MATCH]:()=>!0,[oe.IS_SELECTED]:re=>T.selected===re,[oe.IS_CACHED]:()=>!1,[oe.IS_ASYNC]:()=>null,[oe.IS_LOADING]:()=>!1};function H(re,K,B,V=void 0){let $=V;V===void 0&&typeof ee[B]=="function"&&($=ee[B](re,K));const X=Si[B];if(Object.prototype.hasOwnProperty.call(K,X))return K[X];const fe=(b||[]).find(Ce=>Ce[oe.UUID]===re);let ce;return fe&&(ce=fe[B]),ce==null&&(ce=$),ce}function le(re,K){return T.selectable?H(re,K,oe.IS_SELECTED,T.selected===re):!1}function de(re,K,B){var X;const V=H(re,K,oe.IS_OPEN),$=J.has(B)?(X=J.get(B))==null?void 0:X[oe.IS_OPEN]:!0;return V&&$}function he(re){return!re[oe.IS_OPEN]}function ye(re,K=0,B=null,V=null){const $=re.length;for(let X=0;X<$;X++){const fe=re[X];if(Array.isArray(fe))ye(fe,K,B,V);else if(typeof fe=="object"&&fe!==null){const ce=V!==null?`${V}-${X}`:`${X}`,Ce=`${E(fe)}`,Ee=!!(fe[L]||[]).length;let ne=H(Ce,fe,oe.IS_OPEN);T.autoOpenParentNode?ne&&P(B,oe.IS_OPEN,!0,he):ne=de(Ce,fe,B),Object.assign(fe,{[oe.UUID]:Ce});const Y=T.showCheckbox&&H(Ce,fe,oe.IS_CHECKED);Y&&k.push(Ce),J.set(Ce,{[oe.DEPTH]:K,[oe.INDEX]:X,[oe.UUID]:Ce,[oe.PARENT_ID]:B,[oe.HAS_CHILD]:Ee,[oe.PATH]:ce,[oe.IS_ROOT]:B===null,[oe.ORDER]:O,[oe.IS_SELECTED]:le(Ce,fe),[oe.IS_MATCH]:H(Ce,fe,oe.IS_MATCH),[oe.IS_OPEN]:ne,[oe.IS_CHECKED]:Y,[oe.IS_CACHED]:H(Ce,fe,oe.IS_CACHED),[oe.IS_ASYNC]:H(Ce,fe,oe.IS_ASYNC),[oe.IS_LOADING]:H(Ce,fe,oe.IS_LOADING),[L]:null}),O+=1,A.push(Te(F({},JSON.parse(JSON.stringify(fe,(Z,ae)=>Z===T.children?null:ae))),{[oe.IS_OPEN]:ne,[L]:null})),Object.prototype.hasOwnProperty.call(fe,L)&&ye(fe[L]||[],K+1,Ce,ce)}}}return ye(y||M),T.showCheckbox&&(k==null||k.forEach(re=>{Array.from(J.values()).filter(K=>{var B;return(B=K[oe.PATH])==null?void 0:B.startsWith(J.get(re)[oe.PATH])}).forEach(K=>Object.assign(K,{[oe.IS_CHECKED]:!0})),P(re,oe.IS_CHECKED,!0,()=>!0)})),[A,J]},n=t(e),i=new Map,l=[],o=[],c=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),d=a.computed(()=>Array.from(c.schema.values())),{asyncNodeClick:h,deepAutoOpen:f}=G9(e,c),m=T=>{l.push(T)},p=(T,y,b=!0)=>{b&&i.has(T)&&i.delete(T),i.set(T,y)},v=T=>typeof T=="function"?{type:"loop",fn:T}:typeof T=="object"&&typeof T.type=="string"&&typeof T.fn=="function"?T:(console.error("loop event error",T),null),C=T=>{var b;const y=v(T);return y!==null&&Reflect.apply(y.fn,globalThis,[]),(b=y==null?void 0:y.type)!=null?b:"once"},I=()=>{Array.from(i.keys()).forEach(T=>{const y=i.get(T);if(Array.isArray(y)){const b=[];y.forEach((M,L)=>{C(M)==="once"&&b.unshift(L)}),b.length&&b.forEach(M=>y.splice(M,1)),y.length===0&&i.delete(T)}else C(y)==="once"&&i.delete(T)})};a.watch(()=>[e.data],T=>{var b,M;const y=t(e,T,d.value);c.data=y[0],c.schema=y[1],((b=e.async)==null?void 0:b.callback)&&((M=e.async)==null?void 0:M.deepAutoOpen)==="every"&&f(),I()},{deep:!0}),e.selectable&&a.watch(()=>e.selected,T=>{o.length=0,l.forEach(y=>{Reflect.apply(y,globalThis,[T]),o.push(()=>Reflect.apply(y,globalThis,[T]))}),p("afterSelectWatch",o)},{immediate:!0});const N=T=>{p("afterDataUpdate",T)};return(x=e.async)!=null&&x.callback&&f(),{flatData:c,schemaValues:d,asyncNodeClick:h,deepAutoOpen:f,afterDataUpdate:N,registerNextLoop:p,onSelected:m}},Py=a.defineComponent({name:"Tree",props:My,emits:Cy,setup(e,t){const{flatData:n,schemaValues:i,onSelected:l,registerNextLoop:o}=zy(e),{setNodeAttr:c,checkNodeIsOpen:d,getNodeAttr:h,getNodePath:f,isRootNode:m,isNodeOpened:p,isNodeChecked:v,isNodeMatched:C,hasChildNode:I}=nl(n,e),{searchFn:N,isSearchActive:x,refSearch:T,openResultNode:y,isTreeUI:b,isSearchDisabled:M}=jy(e);M||a.watch([T],()=>{n.data.forEach(K=>{const B=N(Z9(K,e),K);c(K,oe.IS_MATCH,B),y&&P(K,!0,!0)})});const L=K=>{if(x.value){const B=()=>b?i.value.some(V=>{var $;return(($=V[oe.PATH])==null?void 0:$.startsWith(f(K)))&&V[oe.IS_MATCH]}):!1;return h(K,oe.IS_MATCH)||B()}return!0},k=a.computed(()=>n.data.filter(K=>d(K)&&L(K))),{renderTreeNode:A,hanldeTreeNodeClick:O,setNodeOpened:J,setOpen:P,setNodeAction:E,setSelect:ee,asyncNodeClick:H}=Sy(e,t,n,k,i,{registerNextLoop:o}),le=(K,B=!0)=>{E(Sr(K),oe.IS_CHECKED,B)};l(K=>{ee(K,!0,e.autoOpenParentNode)});const de=()=>n;t.expose({hanldeTreeNodeClick:O,isNodeChecked:v,isRootNode:m,isNodeOpened:p,isNodeMatched:C,hasChildNode:I,setOpen:P,setChecked:le,setNodeAction:E,setNodeOpened:J,setSelect:ee,asyncNodeClick:H,getData:de});const he=a.ref(),{renderEmpty:ye}=wy(e,t);Dy(e,he,n);const re=K=>{if(K.length)return K.map(A);const B=x.value?"search-empty":"empty";return ye(B)};return()=>a.createVNode(Ir,{class:Ze("tree"),style:Iy(null,e),list:k.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:Ze("container"),throttleDelay:0,ref:he},{default:K=>re(K.data||[])})}});const _9=Ge(Py),Y9=e=>e.__v_isVNode;var Oy=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(Y9(e[n])){i=e[n];break}n=n+1}let l=t-1,o=null;for(;l>=0&&l>n;){if(Y9(e[l])){o=e[l];break}l=l-1}if(i&&o){i.props||(i.props={});let c="bk-compose-form-item-head";i.props.class&&(c+=` ${i.props.class}`),this.headBackgroundColor&&(i.props.style=Object.assign(i.props.style||{},{"background-color":this.headBackgroundColor})),i.props.class=c,o.props||(o.props={});let d="bk-compose-form-item-tail";o.props.class&&(d+=` ${o.props.class}`),this.tailBackgroundColor&&(o.props.style=Object.assign(o.props.style||{},{"background-color":this.tailBackgroundColor})),o.props.class=d}}return a.h("div",{class:"bk-compose-form-item"},e)}});const Ay={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 Ey=a.defineComponent({name:"Form",props:Ay,emits:["submit"],setup(e,t){let n=[];const i=h=>{n.push(h)},l=h=>{n=n.reduce((f,m)=>(m!==h&&f.push(m),f),[])};return a.provide(mf,{props:e,register:i,unregister:l}),{handleSubmit:h=>{h.preventDefault(),t.emit("submit")},validate:h=>{let f={};return h?f=(typeof h=="string"?[h]:h).reduce((p,v)=>Te(F({},p),{[v]:!0}),{}):f=n.reduce((m,p)=>p.property?Te(F({},m),{[p.property]:!0}):m,{}),Promise.all(n.reduce((m,p)=>(f[p.property]&&m.push(p.validate()),m),[])).then(()=>Promise.resolve(e.model))},clearValidate:h=>{let f={};h?f=(typeof h=="string"?[h]:h).reduce((p,v)=>Te(F({},p),{[v]:!0}),{}):f=n.reduce((m,p)=>Te(F({},m),{[p.property]:!0}),{}),n.forEach(m=>f[m.property]&&m.clearValidate())}}},render(){var t,n;const e=Se({"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)])}}),Nn={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 Vy={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")},Jy=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Qy=e=>{const t=[];return e.required&&t.push({validator:Nn.required,message:`${e.label}\u4E0D\u80FD\u4E3A\u7A7A`,trigger:"blur"}),e.email&&t.push({validator:Nn.email,message:`${e.label}\u683C\u5F0F\u4E0D\u6B63\u786E`,trigger:"blur"}),Number(e.max)>-1&&t.push({validator:n=>Nn.max(n,e.max),message:`${e.label}\u6700\u5927\u503C${e.max}`,trigger:"blur"}),Number(e.min)>-1&&t.push({validator:n=>Nn.min(n,e.min),message:`${e.label}\u6700\u5C0F\u503C${e.min}`,trigger:"blur"}),Number(e.maxlength)>-1&&t.push({validator:n=>Nn.maxlength(n,e.maxlength),message:`${e.label}\u6700\u5927\u957F\u5EA6${e.maxlength}`,trigger:"blur"}),t},Ry=(e,t)=>{const n=e.reduce((i,l)=>{let o;if(l.required)o=Nn.required;else if(l.email)o=Nn.email;else if(Number(l.max)>-1)o=c=>Nn.max(c,l.max);else if(Number(l.min)>-1)o=c=>Nn.min(c,l.max);else if(Number(l.maxlength)>-1)o=c=>Nn.min(c,l.max);else if(Object.prototype.toString.call(l.pattern)==="[object RegExp]")o=c=>Nn.pattern(c,l.pattern);else if(Object.prototype.toString.call(l.validator)==="[object Function]")o=l.validator;else return i;return i.push({validator:o,message:l.message,trigger:l.trigger}),i},[]);return[...t,...n]},Wy=(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 Hy=a.defineComponent({name:"FormItem",directives:{bkTooltips:cc},props:Vy,setup(e){const t=a.getCurrentInstance(),n=a.reactive({isError:!1,errorMessage:""}),i=t4(),l=Boolean(i),o=a.computed(()=>l?i.props.formType==="vertical":!1),c=a.computed(()=>{const f={width:"",paddingRight:"",textAlign:""},m=F9(e.labelWidth)?e.labelWidth:l&&i.props.labelWidth;F9(m)&&(f.width=`${m}px`,f.paddingRight=m?"":"0px");const p=e.labelPosition||l&&i.props.labelPosition;return p&&(f["text-align"]=p),f}),d=f=>{if(!e.property||l&&!i.props.model)return Promise.resolve(!0);let m=[];l&&i.props.rules&&Jy(i.props.rules,e.property)&&(m=i.props.rules[e.property]),e.rules&&(m=e.rules),m=Wy(f,Ry(m,Qy(e))),m.length>0&&(n.isError=!1,n.errorMessage="");const p=jt.exports.get(i.props.model,e.property),v=(()=>{let C=-1;return()=>{if(C=C+1,C>=m.length)return Promise.resolve(!0);const I=m[C];return Promise.resolve().then(()=>{const N=I.validator(p);return typeof N!="boolean"&&typeof N.then=="function"?N.then(x=>{if(x===!1)return Promise.reject(I.message)}).then(()=>v(),()=>(n.isError=!0,n.errorMessage=I.message,Promise.reject(I.message))):N?v():(n.isError=!0,n.errorMessage=I.message,Promise.reject(I.message))})}})();return v()},h=()=>{n.isError=!1,n.errorMessage=""};return a.provide(pf,Te(F({},e),{validate:d,clearValidate:h})),a.onMounted(()=>{l&&i.register(t.proxy)}),a.onBeforeUnmount(()=>{l&&i.unregister(t.proxy)}),Te(F({},a.toRefs(n)),{labelStyles:c,isFormTypeVertical:o,validate:d,clearValidate:h})},render(){var i,l,o,c;const e=Se({"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(Eo,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&&((l=(i=this.$slots).labelAppend)==null?void 0:l.call(i))]),a.createVNode("div",{class:"bk-form-content"},[(c=(o=this.$slots).default)==null?void 0:c.call(o),n()])])}});const U9=Rt(Ey,{FormItem:Hy,ComposeFormItem:Oy}),By={span:g.number.def(1),offset:g.number.def(0),pull:g.number.def(0),push:g.number.def(0)};var Zy=a.defineComponent({name:"Col",props:By,emits:[],setup(e,t){const{col:n,gutter:i,flex:l}=a.inject("containerProps"),{span:o,offset:c,pull:d,push:h}=e,f=a.computed(()=>o||n);a.provide("containerProps",{col:f.value,gutter:i,flex:l});const m=function(v){return`${Number((v*100).toFixed(3))}%`},p=a.computed(()=>({width:m(f.value/n),"padding-right":`${i/2}px`,"padding-left":`${i/2}px`,"margin-left":c?m(c/n):null,right:d?m(d/n):null,left:h?m(h/n):null}));return()=>{var v,C;return a.createVNode("div",{class:"bk-grid-col",style:p.value},[(C=(v=t.slots).default)==null?void 0:C.call(v)])}}});const Gy={col:g.number.def(24),gutter:g.number.def(20),margin:g.number.def(20),flex:g.bool.def(!1),extCls:g.string};var _y=a.defineComponent({name:"Container",props:Gy,emits:[],setup(e,t){const{col:n,gutter:i,flex:l,extCls:o}=e;a.provide("containerProps",{col:n,gutter:i,flex:l});const c=a.computed(()=>o?`bk-grid-container ${o}`:"bk-grid-container"),d=a.computed(()=>{const{margin:h}=e;return{"padding-right":`${h}px`,"padding-left":`${h}px`}});return()=>{var h,f;return a.createVNode("div",{class:c.value,style:d.value},[(f=(h=t.slots).default)==null?void 0:f.call(h)])}}}),Yy=a.defineComponent({name:"Row",emits:[],setup(e,t){const{col:n,gutter:i,flex:l}=a.inject("containerProps");a.provide("containerProps",{col:n,gutter:i,flex:l});const o=a.computed(()=>Te(F({},l?{display:["-webkit-box","-ms-flexbox","flex"]}:{}),{"margin-right":`-${i/2}px`,"margin-left":`-${i/2}px`}));return()=>{var c,d;return a.createVNode("div",{class:"bk-grid-row",style:o.value},[(d=(c=t.slots).default)==null?void 0:d.call(c)])}}});const il=Rt(_y,{Row:Yy,Col:Zy}),Fy=["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"],Uy=["hover","click","manual"];var $y=a.defineComponent({name:"Dropdown",props:{isShow:g.bool.def(!1),placement:g.commonType(Fy,"placement").def("bottom"),trigger:g.commonType(Uy,"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=Se({"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=jt.exports.merge(t,this.popoverOptions);return a.createVNode("div",{class:e},[a.createVNode(ti,a.mergeProps(n,{onAfterShow:this.afterShow,onAfterHidden:this.afterHidden}),{default:()=>{var i,l;return a.createVNode("div",{class:"bk-dropdown-reference"},[a.createTextVNode(" "),(l=(i=this.$slots).default)==null?void 0:l.call(i),a.createTextVNode(" ")])},content:()=>{var i,l;return a.createVNode("div",{class:"bk-dropdown-content"},[a.createTextVNode(" "),(l=(i=this.$slots).content)==null?void 0:l.call(i),a.createTextVNode(" ")])}})])}}),Xy=a.defineComponent({name:"DropdownItem",props:{extCls:g.string},emits:["click"],setup(e,{emit:t}){const n=l=>{l.stopPropagation(),t("click",l)};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)])}}),Ky=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 $9=Rt($y,{DropdownMenu:Ky,DropdownItem:Xy});var _c=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(ff()),isFiltering:g.bool.def(!1),searchKey:g.oneOfType([g.string,g.number]).def(""),modelValue:g.arrayOf(g.oneOfType([ko(),String,Number]))},emits:["update:modelValue"],setup(e,{emit:t}){const{store:n}=e,i=a.reactive({list:[e.store.getNodes()]}),l=a.ref([]),o=a.ref([]),c=y=>typeof y=="number"?`${y}px`:y,d=c(e.height),h=c(e.width),f=y=>{y.length===0&&(i.list=i.list.slice(0,1),l.value=[]),y.forEach(b=>{const M=n.getNodeById(b);p(M)}),o.value=y},m=y=>{y.isDisabled||(y.config.multiple?o.value=n.getCheckedNodes().map(b=>b.path):o.value=y.path,t("update:modelValue",o.value))},p=y=>{var b;if(!(!y||(y==null?void 0:y.isDisabled))){if(i.list=i.list.slice(0,y.level),l.value=l.value.slice(0,y.level-1),(b=y.children)!=null&&b.length){i.list.push(y.children),l.value.push(y);return}if(n.config.isRemote&&!y.isLeaf){y.loading=!0;const M=L=>{n.appendNodes(L,y||null),i.list.push(y.children),l.value.push(y),y.loading=!1};n.config.remoteMethod(y,M)}}},v=y=>{const{trigger:b,checkAnyLevel:M,multiple:L}=y.config;return{onClick:A=>{(!y.isLeaf||L)&&A.stopPropagation(),b==="click"&&p(y),M&&!L&&m(y),y.isLeaf&&!L&&m(y)},onMouseenter:()=>{b==="hover"&&p(y)}}},C=y=>{const{multiple:b}=y.config;return{onClick:L=>{if(b){L.stopPropagation(),x(y,!y.checked);return}p(y),y.isLeaf&&!b&&m(y)}}},I=y=>(l.value[y.level-1]||{}).id===y.id,N=(y,b)=>{const{multiple:M}=y.config;return M?b.some(L=>ur(L,y.path)):ur(b,y.path)},x=(y,b)=>{y.setNodeCheck(b||!1),m(y)},T=y=>y.loading?a.createVNode(xs,{class:"icon-spinner"},null):a.createVNode(Mn,{class:"icon-angle-right"},null);return a.watch(()=>e.modelValue,y=>{f(y)},{immediate:!0}),a.watch(()=>e.store,y=>{i.list=[y.getNodes()]}),{menus:i,activePath:l,nodeExpandHandler:p,isNodeInPath:I,nodeEvent:v,isCheckedNode:N,checkValue:o,checkNode:x,iconRender:T,panelWidth:h,panelHeight:d,searchPanelEvents:C}},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 l,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(Ui,{disabled:i.isDisabled,modelValue:i.checked,"onUpdate:modelValue":c=>i.checked=c,indeterminate:i.isIndeterminate,onChange:c=>this.checkNode(i,c)},null),(o=(l=this.$slots).default)==null?void 0:o.call(l,{node:i,data:i.data}),i.isLeaf?"":this.iconRender(i)])})]))])}});function X9(e){return e.data.disabled?!0:e.level!==1?X9(e.parent):e.data.disabled}class al{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 l=this.data[i];this.children=(l||[]).map(o=>new al(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 X9(this)}broadcast(t,n){const i=`onParent${Io(t)}`;this.children.forEach(l=>{var o;l&&(l.broadcast(t,n),(o=l[i])==null||o.call(l,n))})}emit(t){var l;const{parent:n}=this,i=`onChild${Io(t)}`;n&&((l=n[i])==null||l.call(n),n.emit(t))}onParentCheck(t){this.isDisabled||this.setCheckState(t)}onChildCheck(){const{children:t}=this,n=t.filter(l=>!l.isDisabled),i=n.length?n.every(l=>l.checked):!1;this.setCheckState(i)}setCheckState(t){const n=this.children.length,i=this.children.reduce((l,o)=>{const c=o.isIndeterminate?.5:0,d=o.checked?1:c;return l+d},0);this.checked=t,this.isIndeterminate=i!==n&&i>0}setNodeCheck(t){if(this.checked!==t){if(this.config.checkAnyLevel){this.checked=t;return}this.broadcast("check",t),this.setCheckState(t),this.emit("check")}}calculateNodesPath(){const t=[this];let{parent:n}=this;for(;n;)t.unshift(n),n=n.parent;return t}}const K9=(e,t)=>e.reduce((n,i)=>(i.isLeaf?n.push(i):(!t&&n.push(i),n=n.concat(K9(i.children,t))),n),[]);class q9{constructor(t){const{list:n}=t;this.data=n,this.config=t,this.nodes=this.data.map(i=>new al(i,this.config))}getNodes(){return this.nodes}clearChecked(){this.getFlattedNodes().forEach(t=>{t.checked=!1,t.isIndeterminate=!1})}removeTag(t){this.getFlattedNodes().find(n=>ur(t,n.path)?(n.checked=!1,!0):!1)}getFlattedNodes(t=!1){return K9(this.nodes,t)}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getNodeByValue(t){var i;return(i=this.getFlattedNodes().filter(l=>ur(l.path,t))[0])!=null?i:null}getNodeById(t){return this.getFlattedNodes().find(n=>n.id===t)}appendNode(t,n){const i=new al(t,this.config,n);(n?n.children:this.nodes).push(i)}appendNodes(t,n){t.forEach(i=>this.appendNode(i,n))}}var qy=a.defineComponent({name:"Cascader",directives:{clickoutside:$n},components:{CascaderPanel:_c,BkPopover:ti},props:{modelValue:g.arrayOf(g.oneOfType([ko(),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:l,setHover:o,cancelHover:c}=S0(),d=a.ref(new q9(e)),h=a.ref(!1),f=a.ref(""),m=a.ref([]),{modelValue:p}=a.toRefs(e),v=a.ref(),C=a.ref(""),I=a.ref([]),N=a.ref(!1),x=a.computed({get:()=>p.value,set:E=>{t("update:modelValue",E)}}),T=a.ref(null),y=E=>e.showCompleteName?E.pathNames.join(n):E.pathNames[E.pathNames.length-1],b=()=>{C.value=f.value},M=E=>{var ee;if(i){m.value=d.value.getCheckedNodes().map(H=>({text:y(H),key:H.id}));return}if(!e.checkAnyLevel&&((ee=T==null?void 0:T.value)==null||ee.hide()),E.length===0)f.value="";else{const H=d.value.getNodeByValue(E);if(!H)return;f.value=y(H)}b()},L=E=>{E.stopPropagation(),d.value.clearChecked(),C.value="",M([]),t("update:modelValue",[]),t("clear",JSON.parse(JSON.stringify(e.modelValue)))},k=(E,ee,H)=>{H.stopPropagation();const le=JSON.parse(JSON.stringify(E)),de=le.splice(ee,1)[0];d.value.removeTag(de),M(le),t("update:modelValue",d.value.getCheckedNodes().map(he=>he.path))},A=(E,ee)=>{M(E),t("update:modelValue",E),ee!==void 0&&t("change",E)},O=()=>{d.value=new q9(e),M(e.modelValue)},J=E=>{t("toggle",E.isShow),E.isShow||(N.value=!1)},P=yf(200,E=>{const ee=E.target;if(C.value=ee.value,C.value===""){N.value=!1;return}N.value=!0;const H=d.value.getFlattedNodes().filter(le=>(e.checkAnyLevel||le.isLeaf)&&le.pathNames.join(e.separator).includes(C.value));I.value=H,!(T!=null&&T.value.isShow)&&(T==null||T.value.show())});return a.watch(()=>e.modelValue,A,{immediate:!0}),a.watch(()=>e.list,O,{deep:!0,immediate:!0}),{store:d,updateValue:M,panelShow:h,selectedText:f,checkedValue:x,handleClear:L,isHover:l,setHover:o,popover:T,cancelHover:c,selectedTags:m,removeTag:k,cascaderPanel:v,popoverChangeEmitter:J,searchKey:C,suggestions:I,isFiltering:N,searchInputHandler:P}},render(){const e=()=>this.clearable&&this.isHover?a.createVNode(wn,{class:"bk-icon-clear-icon",onClick:this.handleClear},null):a.createVNode(La,{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(An,{class:"bk-icon-clear-icon",onClick:l=>this.removeTag(this.modelValue,i,l)},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(ti,{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(_c,{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 eh=Rt(qy,{CascaderPanel:_c});var th=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),l=a.ref(0),o=a.ref(0),c=a.ref(0),d=a.ref(null),h=a.ref(e.modelValue),f=a.ref(0),m=a.ref(0),p=a.ref(!1),v=a.ref(null),C=a.computed(()=>{var J,P;let A="";if((J=e.params.customContent)!=null&&J[e.modelValue]){const E=e.params.customContent[e.modelValue];A=E.tip||E.label||""}const O=e.params.vertical?"right":"top";return(P=e.params)!=null&&P.showTip?{content:e.params.formatterTipLabel(`${A||(e==null?void 0:e.modelValue)||"0"}`),placement:O}:{content:"",placement:O}}),I=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),N=a.computed(()=>e.params.vertical?{bottom:I.value}:{left:I.value}),x=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),T=A=>{e.params.disable||(A.preventDefault(),y(A),Dr(window,"mousemove",b),Dr(window,"touchmove",b),Dr(window,"mouseup",M),Dr(window,"touchend",M))},y=A=>{n.value=!0,i.value=!0,e.params.vertical?l.value=A.clientY:o.value=A.clientX,c.value=parseFloat(I.value),d.value=c.value},b=A=>{if(n.value){i.value=!1,t("resetSize");let O=0;e.params.vertical?(f.value=A.clientY,O=(l.value-f.value)/e.params.sliderSize*100):(m.value=A.clientX,O=(m.value-o.value)/e.params.sliderSize*100),d.value=c.value+O,L(d.value)}},M=()=>{p.value=!1,n.value&&(setTimeout(()=>{n.value=!1,i.value||(L(d.value),t("emitChange"))},0),rl(window,"mousemove",b),rl(window,"touchmove",b),rl(window,"mouseup",M),rl(window,"touchend",M))},L=A=>{if(A===null||isNaN(A))return;A<0?d.value=0:A>100&&(d.value=100);const O=100/((e.params.maxValue-e.params.minValue)/e.params.step);let P=Math.round(A/O)*O*(e.params.maxValue-e.params.minValue)*.01+e.params.minValue;P=parseFloat(P.toFixed(e.params.precision)),t("update:modelValue",P),!n.value&&e.modelValue!==h.value&&(h.value=e.modelValue)};return{renderDom:()=>a.createVNode("div",{class:["bk-slider-button",e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],ref:v,tabindex:"0",style:N.value,onClick:A=>A.stopPropagation(),onMousedown:T},[Boolean(C.value.content)?a.createVNode(Os,{content:C.value.content,theme:"dark",placement:C.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:C}},render(){return this.renderDom()}});const Dr=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},rl=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)};var eC=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),l=a.ref(null),o=a.ref(null),c=a.ref(null),d=a.ref(0),h=a.ref(0),f=a.ref(null),m=a.ref(null),p=a.ref(null),v=a.ref(null),C=a.computed(()=>{const B=[e.minValue,e.maxValue,e.step].map(V=>{const $=`${V}`.split(".")[1];return $?$.length:0});return Math.max.apply(null,B)}),I=a.computed(()=>Math.min(l.value,o.value)),N=a.computed(()=>Math.max(l.value,o.value)),x=a.computed(()=>e.range?`${100*(N.value-I.value)/(e.maxValue-e.minValue)}%`:`${100*(l.value-e.minValue)/(e.maxValue-e.minValue)}%`),T=a.computed(()=>e.range?`${100*(I.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),y=a.computed(()=>e.vertical?{height:x.value,bottom:T.value}:{width:x.value,left:T.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 B=(e.maxValue-e.minValue)/e.step,V=100*e.step/(e.maxValue-e.minValue),$=[];for(let X=1;X<B;X++)$.push(X*V);return e.range?$.filter(X=>X<100*(I.value-e.minValue)/(e.maxValue-e.minValue)||X>100*(N.value-e.minValue)/(e.maxValue-e.minValue)):$.filter(X=>X>100*(l.value-e.minValue)/(e.maxValue-e.minValue))}),M=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 B=100*e.step/(e.maxValue-e.minValue),V=[];for(let $=e.minValue,X=0;$<=e.maxValue;$+=e.step,X++){const fe={stepWidth:X*B,stepLabel:e.formatterLabel($)};V.push(fe)}return V}),k=a.computed(()=>Array.isArray(e.modelValue)),A=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((B,V)=>Number(B)-Number(V)).filter(B=>Number(B)>=e.minValue&&Number(B)<=e.maxValue).map(B=>{const{tip:V}=e.customContent[B],{label:$}=e.customContent[B];return{tip:V||$||"",label:$||"",percent:(Number(B)-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:C.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{ee()}),a.watch(()=>l.value,B=>{e.range?n("update:modelValue",[I.value,N.value]):n("update:modelValue",B),d.value=B}),a.watch(()=>o.value,B=>{n("update:modelValue",[I.value,N.value]),h.value=B}),a.onMounted(()=>{e.range?(Array.isArray(e.modelValue)?(l.value=Math.max(e.minValue,Number(e.modelValue[0])),o.value=Math.min(e.maxValue,Number(e.modelValue[1]))):(l.value=e.minValue,o.value=e.maxValue),c.value=[l.value,o.value]):(typeof e.modelValue!="number"||isNaN(e.modelValue)?l.value=e.minValue:l.value=Math.min(e.maxValue,Math.max(e.minValue,e.modelValue)),c.value=l.value),J(),Dr(window,"resize",J())});const J=()=>{f.value&&(i.value=f.value[`client${e.vertical?"Height":"Width"}`])},P=B=>{var V,$;if(B.stopPropagation(),!e.disable){if(J(),e.vertical){const X=(V=f.value)==null?void 0:V.getBoundingClientRect().bottom;de((X-B.clientY)/i.value*100)}else{const X=($=f.value)==null?void 0:$.getBoundingClientRect().left;de((B.clientX-X)/i.value*100)}H()}},E=()=>e.range?![I.value,N.value].every((B,V)=>B===c.value[V]):e.modelValue!==c.value,ee=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const B=e.modelValue;e.range&&Array.isArray(B)?B[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):B[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):B[0]<e.minValue?n("update:modelValue",[e.minValue,B[1]]):B[1]>e.maxValue?n("update:modelValue",[B[0],e.maxValue]):(l.value=Number(B[0]),o.value=Number(B[1]),E()&&(c.value=B.slice())):!e.range&&typeof B=="number"&&!isNaN(B)&&(B<e.minValue?n("update:modelValue",e.minValue):B>e.maxValue?n("update:modelValue",e.maxValue):(l.value=B,E()&&(c.value=B)))},H=async()=>{await a.nextTick(),n("change",e.range?[I.value,N.value]:e.modelValue)},le=B=>e.vertical?{bottom:`${B}%`}:{left:`${B}%`},de=B=>{if(!e.range){m.value.setPosition(B);return}const V=e.minValue+B*(e.maxValue-e.minValue)/100;Math.abs(I.value-V)<Math.abs(N.value-V)?v.value=l.value<o.value?m.value:p.value:v.value=l.value>o.value?m.value:p.value,v.value.setPosition(B)},he=B=>{if(B==="")return;const V=parseFloat(B);V<e.minValue?(d.value=e.minValue,l.value=e.minValue):V>e.maxValue?(d.value=e.maxValue,l.value=e.maxValue):l.value=V},ye=B=>{if(B===""||typeof B=="number")return;const V=parseFloat(B);V<e.minValue?(h.value=e.minValue,o.value=e.minValue):V>e.maxValue?(h.value=e.maxValue,o.value=e.maxValue):o.value=V},re=B=>{let V=0;return B==="start"?V=e.vertical?e.maxValue:e.minValue:V=e.vertical?e.minValue:e.maxValue,e.showButtonLabel&&[l.value,o.value].includes(V)?"0":"1"};return{renderDom:()=>{var B,V;return a.createVNode("div",{class:["bk-slider",e.extCls]},[(B=t.start)==null?void 0:B.call(t),a.createVNode("div",{class:"bk-slider-runway",ref:f,style:M.value,onClick:P},[a.createVNode("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:y.value},null),e.showInterval?b.value.map(($,X)=>a.createVNode("div",{key:X,class:["bk-slider-interval",{vertical:e.vertical}],style:le($)},null)):void 0,e.customContent?A.value.map(($,X)=>a.createVNode("div",{key:X,class:["bk-slider-interval",{vertical:e.vertical}],style:le($.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:re("start")}]},[e.formatterLabel(e.minValue)]),a.createVNode("div",{class:"label-end",style:[{opacity:re("end")}]},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return L.value.map(($,X)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:X,style:le($.stepWidth)},[$.stepLabel]));if(e.customContent)return A.value.map(($,X)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:X,style:le($.percent)},[$.label]))}()]):void 0,a.createVNode(th,{modelValue:l.value,"onUpdate:modelValue":$=>l.value=$,ref:m,params:O.value,onEmitChange:H,onResetSize:J},null),e.range?a.createVNode(th,{modelValue:o.value,"onUpdate:modelValue":$=>o.value=$,ref:p,params:O.value,onEmitChange:H,onResetSize:J},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:"bk-slider-input"},[a.createVNode("div",{class:"input-item"},[a.createVNode(Fi,{type:"number",modelValue:d.value,max:e.maxValue,min:e.minValue,onChange:he},null)]),k.value&&o.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("\uFF5E")]),a.createVNode("div",{class:"input-item"},[a.createVNode(Fi,{type:"number",modelValue:h.value,max:e.maxValue,min:e.minValue,onChange:ye},null)])]:void 0]):void 0,(V=t.end)==null?void 0:V.call(t)])}}},render(){return this.renderDom()}});const nh=Ge(eC);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:l,triggerWidth:o,max:c,min:d,immediate:h,autoMinimize:f}=a.toRefs(e),m=a.ref(!1),p=a.ref(!0),v=a.ref(!1),C=a.ref(null),I=a.ref({}),N=a.ref(null),x=a.ref(null),T=a.ref(null),y=a.ref(null),b=a.computed(()=>["left","right"].includes(n.value)),M=a.computed(()=>b.value?"width":"height"),L=a.computed(()=>{let re=i.value;return typeof re=="number"&&(re=`${re}px`),{[M.value]:re}}),k=a.computed(()=>({[`margin-${n.value}`]:`${l.value-o.value}px`,[M.value]:`${o.value}px`})),A=a.computed(()=>f.value?typeof f.value=="boolean"?50:f.value:0),O=()=>{const re=N.value.getBoundingClientRect();C.value=b.value?re.width:re.height},J=new ResizeObserver(O),P=()=>{switch(x.value.style.visibility="visible",n.value){case"left":x.value.style.inset=`0 auto auto ${I.value.aside.width}px`;break;case"right":x.value.style.inset=`0 ${I.value.aside.width}px auto auto`;break;case"top":x.value.style.inset=`${I.value.aside.height}px auto auto 0`;break;case"bottom":x.value.style.inset=`auto auto ${I.value.aside.height}px 0`;break}},E=()=>{T.value.style.display="block",T.value.style.cursor=b.value?"col-resize":"row-resize"},ee=re=>Math.min(c.value,Math.max(d.value,re),C.value-o.value),H=re=>{t("before-resize",re);const K=y.value.getBoundingClientRect();I.value=Object.freeze({mouse:{clientX:re.clientX,clientY:re.clientY},aside:{width:K.width,height:K.height}}),E(),h.value||P(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const B=X=>{t("resizing",X)},V=X=>{let fe;switch(n.value){case"top":fe=X.clientY-I.value.mouse.clientY;break;case"right":fe=I.value.mouse.clientX-X.clientX;break;case"bottom":fe=I.value.mouse.clientY-X.clientY;break;case"left":fe=X.clientX-I.value.mouse.clientX}const ce=I.value.aside[M.value]+fe,Ce=ee(ce)+l.value,Ee=`${Ce}px`;h.value?y.value.style[M.value]=Ee:x.value.style[n.value]=Ee,B(Ce)},$=()=>{if(x.value.style.visibility="hidden",T.value.style.display="none",document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",$),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{le(),t("after-resize",parseFloat(x.value.style[n.value]))}),h.value)return!1;y.value.style[M.value]=x.value.style[n.value]};document.addEventListener("mousemove",V),document.addEventListener("mouseup",$)},le=()=>{if(!f.value)return!1;const re=y.value.getBoundingClientRect();if(v.value=m.value=re[M.value]<=A.value,!v.value)return p.value=!0,!1;he(),a.nextTick(()=>{y.value.setAttribute(`data-${M.value}`,L.value[M.value])})},de=re=>{m.value=typeof re=="boolean"?re:!m.value,he(),t("collapse-change",m.value)},he=()=>{const re=y.value.getBoundingClientRect();ye(!m.value),m.value?(y.value.setAttribute(`data-${M.value}`,`${re[M.value]}px`),y.value.style[M.value]="5px"):(p.value=!0,y.value.style[M.value]=y.value.getAttribute(`data-${M.value}`))},ye=re=>{const K=()=>{p.value=re,y.value.style.transition="",y.value.removeEventListener("transitionend",K)};y.value.addEventListener("transitionend",K),y.value.style.transition=`${M.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};return a.onMounted(()=>{J.observe(N.value)}),a.onBeforeUnmount(()=>{J.unobserve(N.value)}),{collapsed:m,asideContentVisible:p,minimized:v,limitMax:C,state:I,vertical:b,cssPropKey:M,bkResizeLayoutRef:N,resizeProxyRef:x,resizeMaskRef:T,asideRef:y,triggerStyle:k,asideStyle:L,handleMousedown:H,setCollapse:de}},render(){var t,n,i,l,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&&(((l=(i=this.$slots)["collapse-trigger"])==null?void 0:l.call(i))||(this.collapsed?a.createVNode(Mn,{class:"bk-resize-collapse",onClick:this.setCollapse},null):a.createVNode(yi,{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 ih=Ge(tC),nC={list:g.array.def([]),titleAble:g.bool.def(!1),extCls:g.string};var iC=a.defineComponent({name:"Timeline",props:nC,emits:["select"],setup(e,{emit:t}){const n=a.ref([]),i=c=>{const d=[];c.forEach(h=>{var f;d.push({tag:h.tag,content:h.content,type:h.type,size:h.size,color:h.color,icon:h.icon,filled:h.filled,border:(f=h.border)!=null?f:!0})}),n.value.splice(0,n.value.length,...d)},l=()=>{var c;n.value.splice(0,n.value.length,{tag:"\u6B65\u9AA41",content:"\u5185\u5BB91"},{tag:"\u6B65\u9AA42",content:"\u5185\u5BB92"},{tag:"\u6B65\u9AA43",content:"\u5185\u5BB93"}),(c=e.list)!=null&&c.length&&i(e.list)},o=c=>{try{t("select",c)}catch(d){console.warn(d)}};return a.onMounted(l),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",l=["blue","red","green","yellow","gray"],o=n.type?`${i}-${n.type}`:`${i}-default`,c=n.size?`${i}-${n.size}`:"",d=n.filled?`${i}-filled`:"",h=n.color&&l.includes(n.color)?`${i}-${n.color}`:"";return Se({},`${i} ${o} ${c} ${h} ${d}`)};return a.createVNode("ul",{class:["bk-timeline",this.extCls]},[this.defaultTimelines.map(n=>{var i,l,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=(l=(i=this.$slots).default)==null?void 0:l.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 ah=Ge(iC),aC={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 rC=a.defineComponent({name:"BKProcess",props:aC,emits:["update:curProcess","click"],setup(e,{emit:t}){const n=a.ref([]),i=a.ref(0),l=()=>{var c;n.value.splice(0,n.value.length,{content:"\u6B65\u9AA41"},{content:"\u6B65\u9AA42"},{content:"\u6B65\u9AA43"},{content:"\u6B65\u9AA44"},{content:"\u6B65\u9AA45"}),(c=e.list)!=null&&c.length&&n.value.splice(0,n.value.length,...e.list)},o=async c=>{try{e.controllable&&c!==e.curProcess&&(t("update:curProcess",c),t("click",c))}catch(d){console.warn(d)}};return a.onMounted(l),{defaultProcessList:n,paddingBottom:i,jumpTo:o}},render(){const e="bk-process",t=Se({[`${this.extCls}`]:!!this.extCls},`${e}`),n=d=>d.status==="loading",i=d=>d.status==="error",l=d=>this.curProcess>=d+1||this.defaultProcessList[d].status==="done",o=d=>d.icon?d.icon:"",c=(d,h)=>d===this.curProcess-1&&n(h)?a.createVNode(Cs,{class:"bk-icon bk-process-icon icon-loading"},null):i(h)?a.createVNode(An,{class:"bk-process-icon"},null):l(d)?a.createVNode(ka,{class:"bk-process-icon-done"},null):a.createVNode("span",{class:"number"},[o(h)]);return a.createVNode("div",{class:t},[a.createVNode("ul",{style:{paddingBottom:`${this.paddingBottom}px`}},[this.defaultProcessList.map((d,h)=>a.createVNode("li",{onClick:()=>{this.jumpTo(h+1)},style:{cursor:this.controllable?"pointer":""},class:{success:this.curProcess>=h+1,current:n(d)&&h===this.curProcess-1}},[d[this.displayKey],c(h,d)]))])])}});const rh=Ge(rC),ia="bk-upload";var ri=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(ri||{}),Pa=(e=>(e.NEW="new",e.UPLOADING="uploading",e.SUCCESS="success",e.FAIL="fail",e))(Pa||{});const sh=[ri.BUTTON,ri.DRAGGABLE,ri.PICTURE];var si={theme:{type:String,default:"draggable",validator:e=>!e||sh.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of \u3010${sh.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,default:null},beforeRemove:{type:Function,default:null},sliceUpload:{type:Boolean,default:!1},sliceUrl:{type:String,default:""},mergeUrl:{type:String,default:""},chunkSize:{type:Number,default:10}};function lh(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var sC=a.defineComponent({name:"UploadList",props:{theme:si.theme,disabled:si.disabled,files:si.files,multiple:si.multiple},emits:["remove","retry"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:l,multiple:o}=a.toRefs(e),c=`${ia}-list`,d=a.computed(()=>i.value===ri.PICTURE),h=a.computed(()=>d.value&&!o.value),f=a.computed(()=>Se({[c]:!0,[`${c}--${i.value}`]:!0,[`${c}--disabled`]:l.value}));function m(y){const b=["Bytes","KB","MB","GB","TB"],M=Math.floor(Math.log(y)/Math.log(1024));return`${(y/1024**M).toFixed(2)}${b[M]}`}function p(y,b){n("remove",y,b)}function v(y,b){n("retry",y,b)}const C=()=>{let y;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},lh(y=e.files.map(b=>{const M=Se({[`${c}__item`]:!0,[`${c}__item-picture`]:!0,[`${c}__item--${b.status}`]:!0});return a.createVNode("li",{key:b.uid,class:M},[t!=null&&t.file?t.file(b):I(b)])}))?y:{default:()=>[y]})},I=y=>[a.withDirectives(a.createVNode("img",{src:y.url,class:`${c}__picture-item-thumbnail`,alt:""},null),[[a.vShow,y.status!=="uploading"]]),a.createVNode(a.Fragment,null,[y.status==="uploading"&&a.createVNode(wr,{class:`${c}__picture-item-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:y.percentage},null)]),a.createVNode(a.Fragment,null,[!l.value&&a.createVNode("div",{class:`${c}__picture-item-actions`},[a.createVNode(hr,{class:"action-icon",onClick:b=>p(y,b)},null)])])],N=()=>{let y;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},lh(y=e.files.map(b=>{const M=Se({[`${c}__item`]:!0,[`${c}__item--${b.status}`]:!0});return a.createVNode("li",{key:b.uid,class:M},[t!=null&&t.file?t.file(b):T(b)])}))?y:{default:()=>[y]})},x=y=>{var O;const b=(O=y==null?void 0:y.raw)==null?void 0:O.type,[M]=(b==null?void 0:b.split("/"))||"";let k={text:gr,image:Wo,application:gr,video:Fo,audio:zo}[M]||gr;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(b)&&(k=So),a.h(k,{class:`${c}__item-file-icon`})},T=y=>[a.createVNode("div",{class:`${c}__item-icon`},[y.isPic?a.createVNode("img",{src:y.url,class:`${c}__item-thumbnail`,alt:""},null):x(y)]),a.createVNode("div",{class:`${c}__item-summary`},[a.createVNode("div",{class:`${c}__item-name`,title:y.name},[y.name]),y.status!=="uploading"&&a.createVNode("div",{class:`${c}__item-message`,title:y.statusText},[y.status==="success"&&a.createVNode("span",null,[a.createVNode(ka,{class:`${c}__item-message-success-icon`},null),y.statusText||"\u4E0A\u4F20\u6210\u529F"]),y.status==="fail"&&a.createVNode("span",null,[y.statusText||"\u4E0A\u4F20\u5931\u8D25"])]),y.status==="uploading"&&a.createVNode(wr,{class:`${c}__item-progress`,showText:!1,percent:y.percentage,size:"small"},null),y.status!=="fail"&&a.createVNode("div",{class:`${c}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-size`},[m(y.size)]),[[a.vShow,y.size]]),a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-percentage`},[y.percentage,a.createTextVNode("%")]),[[a.vShow,y.status==="uploading"]])]),!l.value&&a.createVNode("div",{class:`${c}__item-actions`},[y.status==="fail"&&a.createVNode(Bo,{class:`${c}__item-retry-icon`,onClick:b=>v(y,b)},null),a.createVNode(hr,{class:`${c}__item-del-icon`,onClick:b=>p(y,b)},null)])])];return()=>{var y;return a.createVNode(a.Fragment,null,[h.value?(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger((y=e.files)==null?void 0:y[0])):a.createVNode("ul",{class:f.value},[d.value?C():N(),(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger())])])}}}),oh=a.defineComponent({name:"UploadTrigger",props:{theme:si.theme,disabled:si.disabled,multiple:si.multiple,accept:si.accept,file:{type:Object,default:null}},emits:["change","remove"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:l,file:o,multiple:c,accept:d}=a.toRefs(e),h=`${ia}-trigger`,f=a.computed(()=>i.value===ri.BUTTON),m=a.computed(()=>i.value===ri.DRAGGABLE),p=a.computed(()=>i.value===ri.PICTURE),v=a.computed(()=>p.value&&!c.value),C=a.computed(()=>p.value&&!d.value?"image/png,image/jpeg,image/jpg":d.value),I=a.ref(null),N=a.computed(()=>{var ee,H,le;return Se({[h]:!0,[`${h}--${i.value}`]:!0,[`${h}--single-picture`]:v.value,[`${h}--has-file`]:(ee=o.value)!=null?ee:!1,[`${h}--${(H=o.value)==null?void 0:H.status}`]:(le=o.value)!=null?le:!1,[`${h}--dragover`]:L.value,[`${h}--disabled`]:l.value})}),x=()=>{I.value.value=null,I.value.click()},T=ee=>{const{files:H}=ee.target;n("change",Array.from(H))},y=()=>{e.disabled||x()},b=ee=>{ee.defaultPrevented||ee.target!==ee.currentTarget||((ee.code==="Enter"||ee.code==="Space")&&x(),ee.preventDefault())};function M(ee,H){n("remove",ee,H),H.stopPropagation(),H.preventDefault()}const L=a.ref(!1),k=()=>{const ee=he=>{if(l.value)return;he.preventDefault(),L.value=!1;const ye=Array.from(he.dataTransfer.files);if(!C.value){n("change",ye);return}const re=ye.filter(K=>{const{type:B,name:V}=K,$=V.includes(".")?`.${V.split(".").pop()}`:"",X=B.replace(/\/.*$/,"");return C.value.split(",").map(fe=>fe.trim()).filter(fe=>fe).some(fe=>fe.startsWith(".")?$===fe:/\/\*$/.test(fe)?X===fe.replace(/\/\*$/,""):/^[^/]+\/[^/]+$/.test(fe)?B===fe:!1)});n("change",re)},H=he=>{he.preventDefault(),L.value=!0},le=()=>{L.value=!1},de=Se({[`${h}__draggable`]:!0});return a.createVNode("div",{class:de,onDrop:ee,onDragover:H,onDragleave:le},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(Ds,{class:`${h}__draggable-icon`},null),a.createVNode("div",{class:`${h}__draggable-text`},[a.createTextVNode("\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904\u6216"),a.createVNode("span",{class:`${h}__draggable-upload-link`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])])])},A=()=>a.createVNode(a.Fragment,null,[v.value&&e.file?J(e.file):O()]),O=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${h}__picture-inner`},[a.createVNode(Ls,{class:`${h}__picture-icon`},null),a.createVNode("div",{class:`${h}__picture-text`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])]),J=ee=>[a.withDirectives(a.createVNode("img",{src:ee.url,class:`${h}__picture-thumbnail`,alt:""},null),[[a.vShow,ee.status!=="uploading"]]),a.createVNode(a.Fragment,null,[ee.status==="uploading"&&a.createVNode(wr,{class:`${h}__picture-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:ee.percentage},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${h}__picture-actions`},[a.createVNode(hr,{class:"action-icon",onClick:H=>M(ee,H)},null)])])],P=()=>a.createVNode(Wt,{disabled:l.value},{default:()=>[a.createVNode(Ds,{class:`${h}__button-icon`},null),a.createVNode("span",{class:`${h}__button-text`},[a.createTextVNode("\u4E0A\u4F20\u6587\u4EF6")])]}),E=()=>{if(f.value)return P();if(m.value)return k();if(p.value)return A()};return()=>{var ee;return a.createVNode("div",{class:N.value,tabindex:"0",onClick:y,onKeydown:b},[t.trigger?[t.trigger(),(ee=t==null?void 0:t.default)==null?void 0:ee.call(t)]:E(),a.createVNode("input",{ref:I,class:"bk-upload__input-file",tabindex:"-1",onChange:T,accept:C.value,multiple:c.value,disabled:l.value,type:"file"},null)])}}}),ch={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 l(T,y){var b=T[0],M=T[1],L=T[2],k=T[3];b+=(M&L|~M&k)+y[0]-680876936|0,b=(b<<7|b>>>25)+M|0,k+=(b&M|~b&L)+y[1]-389564586|0,k=(k<<12|k>>>20)+b|0,L+=(k&b|~k&M)+y[2]+606105819|0,L=(L<<17|L>>>15)+k|0,M+=(L&k|~L&b)+y[3]-1044525330|0,M=(M<<22|M>>>10)+L|0,b+=(M&L|~M&k)+y[4]-176418897|0,b=(b<<7|b>>>25)+M|0,k+=(b&M|~b&L)+y[5]+1200080426|0,k=(k<<12|k>>>20)+b|0,L+=(k&b|~k&M)+y[6]-1473231341|0,L=(L<<17|L>>>15)+k|0,M+=(L&k|~L&b)+y[7]-45705983|0,M=(M<<22|M>>>10)+L|0,b+=(M&L|~M&k)+y[8]+1770035416|0,b=(b<<7|b>>>25)+M|0,k+=(b&M|~b&L)+y[9]-1958414417|0,k=(k<<12|k>>>20)+b|0,L+=(k&b|~k&M)+y[10]-42063|0,L=(L<<17|L>>>15)+k|0,M+=(L&k|~L&b)+y[11]-1990404162|0,M=(M<<22|M>>>10)+L|0,b+=(M&L|~M&k)+y[12]+1804603682|0,b=(b<<7|b>>>25)+M|0,k+=(b&M|~b&L)+y[13]-40341101|0,k=(k<<12|k>>>20)+b|0,L+=(k&b|~k&M)+y[14]-1502002290|0,L=(L<<17|L>>>15)+k|0,M+=(L&k|~L&b)+y[15]+1236535329|0,M=(M<<22|M>>>10)+L|0,b+=(M&k|L&~k)+y[1]-165796510|0,b=(b<<5|b>>>27)+M|0,k+=(b&L|M&~L)+y[6]-1069501632|0,k=(k<<9|k>>>23)+b|0,L+=(k&M|b&~M)+y[11]+643717713|0,L=(L<<14|L>>>18)+k|0,M+=(L&b|k&~b)+y[0]-373897302|0,M=(M<<20|M>>>12)+L|0,b+=(M&k|L&~k)+y[5]-701558691|0,b=(b<<5|b>>>27)+M|0,k+=(b&L|M&~L)+y[10]+38016083|0,k=(k<<9|k>>>23)+b|0,L+=(k&M|b&~M)+y[15]-660478335|0,L=(L<<14|L>>>18)+k|0,M+=(L&b|k&~b)+y[4]-405537848|0,M=(M<<20|M>>>12)+L|0,b+=(M&k|L&~k)+y[9]+568446438|0,b=(b<<5|b>>>27)+M|0,k+=(b&L|M&~L)+y[14]-1019803690|0,k=(k<<9|k>>>23)+b|0,L+=(k&M|b&~M)+y[3]-187363961|0,L=(L<<14|L>>>18)+k|0,M+=(L&b|k&~b)+y[8]+1163531501|0,M=(M<<20|M>>>12)+L|0,b+=(M&k|L&~k)+y[13]-1444681467|0,b=(b<<5|b>>>27)+M|0,k+=(b&L|M&~L)+y[2]-51403784|0,k=(k<<9|k>>>23)+b|0,L+=(k&M|b&~M)+y[7]+1735328473|0,L=(L<<14|L>>>18)+k|0,M+=(L&b|k&~b)+y[12]-1926607734|0,M=(M<<20|M>>>12)+L|0,b+=(M^L^k)+y[5]-378558|0,b=(b<<4|b>>>28)+M|0,k+=(b^M^L)+y[8]-2022574463|0,k=(k<<11|k>>>21)+b|0,L+=(k^b^M)+y[11]+1839030562|0,L=(L<<16|L>>>16)+k|0,M+=(L^k^b)+y[14]-35309556|0,M=(M<<23|M>>>9)+L|0,b+=(M^L^k)+y[1]-1530992060|0,b=(b<<4|b>>>28)+M|0,k+=(b^M^L)+y[4]+1272893353|0,k=(k<<11|k>>>21)+b|0,L+=(k^b^M)+y[7]-155497632|0,L=(L<<16|L>>>16)+k|0,M+=(L^k^b)+y[10]-1094730640|0,M=(M<<23|M>>>9)+L|0,b+=(M^L^k)+y[13]+681279174|0,b=(b<<4|b>>>28)+M|0,k+=(b^M^L)+y[0]-358537222|0,k=(k<<11|k>>>21)+b|0,L+=(k^b^M)+y[3]-722521979|0,L=(L<<16|L>>>16)+k|0,M+=(L^k^b)+y[6]+76029189|0,M=(M<<23|M>>>9)+L|0,b+=(M^L^k)+y[9]-640364487|0,b=(b<<4|b>>>28)+M|0,k+=(b^M^L)+y[12]-421815835|0,k=(k<<11|k>>>21)+b|0,L+=(k^b^M)+y[15]+530742520|0,L=(L<<16|L>>>16)+k|0,M+=(L^k^b)+y[2]-995338651|0,M=(M<<23|M>>>9)+L|0,b+=(L^(M|~k))+y[0]-198630844|0,b=(b<<6|b>>>26)+M|0,k+=(M^(b|~L))+y[7]+1126891415|0,k=(k<<10|k>>>22)+b|0,L+=(b^(k|~M))+y[14]-1416354905|0,L=(L<<15|L>>>17)+k|0,M+=(k^(L|~b))+y[5]-57434055|0,M=(M<<21|M>>>11)+L|0,b+=(L^(M|~k))+y[12]+1700485571|0,b=(b<<6|b>>>26)+M|0,k+=(M^(b|~L))+y[3]-1894986606|0,k=(k<<10|k>>>22)+b|0,L+=(b^(k|~M))+y[10]-1051523|0,L=(L<<15|L>>>17)+k|0,M+=(k^(L|~b))+y[1]-2054922799|0,M=(M<<21|M>>>11)+L|0,b+=(L^(M|~k))+y[8]+1873313359|0,b=(b<<6|b>>>26)+M|0,k+=(M^(b|~L))+y[15]-30611744|0,k=(k<<10|k>>>22)+b|0,L+=(b^(k|~M))+y[6]-1560198380|0,L=(L<<15|L>>>17)+k|0,M+=(k^(L|~b))+y[13]+1309151649|0,M=(M<<21|M>>>11)+L|0,b+=(L^(M|~k))+y[4]-145523070|0,b=(b<<6|b>>>26)+M|0,k+=(M^(b|~L))+y[11]-1120210379|0,k=(k<<10|k>>>22)+b|0,L+=(b^(k|~M))+y[2]+718787259|0,L=(L<<15|L>>>17)+k|0,M+=(k^(L|~b))+y[9]-343485551|0,M=(M<<21|M>>>11)+L|0,T[0]=b+T[0]|0,T[1]=M+T[1]|0,T[2]=L+T[2]|0,T[3]=k+T[3]|0}function o(T){var y=[],b;for(b=0;b<64;b+=4)y[b>>2]=T.charCodeAt(b)+(T.charCodeAt(b+1)<<8)+(T.charCodeAt(b+2)<<16)+(T.charCodeAt(b+3)<<24);return y}function c(T){var y=[],b;for(b=0;b<64;b+=4)y[b>>2]=T[b]+(T[b+1]<<8)+(T[b+2]<<16)+(T[b+3]<<24);return y}function d(T){var y=T.length,b=[1732584193,-271733879,-1732584194,271733878],M,L,k,A,O,J;for(M=64;M<=y;M+=64)l(b,o(T.substring(M-64,M)));for(T=T.substring(M-64),L=T.length,k=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=0;M<L;M+=1)k[M>>2]|=T.charCodeAt(M)<<(M%4<<3);if(k[M>>2]|=128<<(M%4<<3),M>55)for(l(b,k),M=0;M<16;M+=1)k[M]=0;return A=y*8,A=A.toString(16).match(/(.*?)(.{0,8})$/),O=parseInt(A[2],16),J=parseInt(A[1],16)||0,k[14]=O,k[15]=J,l(b,k),b}function h(T){var y=T.length,b=[1732584193,-271733879,-1732584194,271733878],M,L,k,A,O,J;for(M=64;M<=y;M+=64)l(b,c(T.subarray(M-64,M)));for(T=M-64<y?T.subarray(M-64):new Uint8Array(0),L=T.length,k=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],M=0;M<L;M+=1)k[M>>2]|=T[M]<<(M%4<<3);if(k[M>>2]|=128<<(M%4<<3),M>55)for(l(b,k),M=0;M<16;M+=1)k[M]=0;return A=y*8,A=A.toString(16).match(/(.*?)(.{0,8})$/),O=parseInt(A[2],16),J=parseInt(A[1],16)||0,k[14]=O,k[15]=J,l(b,k),b}function f(T){var y="",b;for(b=0;b<4;b+=1)y+=i[T>>b*8+4&15]+i[T>>b*8&15];return y}function m(T){var y;for(y=0;y<T.length;y+=1)T[y]=f(T[y]);return T.join("")}m(d("hello")),typeof ArrayBuffer!="undefined"&&!ArrayBuffer.prototype.slice&&function(){function T(y,b){return y=y|0||0,y<0?Math.max(y+b,0):Math.min(y,b)}ArrayBuffer.prototype.slice=function(y,b){var M=this.byteLength,L=T(y,M),k=M,A,O,J,P;return b!==n&&(k=T(b,M)),L>k?new ArrayBuffer(0):(A=k-L,O=new ArrayBuffer(A),J=new Uint8Array(O),P=new Uint8Array(this,L,A),J.set(P),O)}}();function p(T){return/[\u0080-\uFFFF]/.test(T)&&(T=unescape(encodeURIComponent(T))),T}function v(T,y){var b=T.length,M=new ArrayBuffer(b),L=new Uint8Array(M),k;for(k=0;k<b;k+=1)L[k]=T.charCodeAt(k);return y?L:M}function C(T){return String.fromCharCode.apply(null,new Uint8Array(T))}function I(T,y,b){var M=new Uint8Array(T.byteLength+y.byteLength);return M.set(new Uint8Array(T)),M.set(new Uint8Array(y),T.byteLength),b?M:M.buffer}function N(T){var y=[],b=T.length,M;for(M=0;M<b-1;M+=2)y.push(parseInt(T.substr(M,2),16));return String.fromCharCode.apply(String,y)}function x(){this.reset()}return x.prototype.append=function(T){return this.appendBinary(p(T)),this},x.prototype.appendBinary=function(T){this._buff+=T,this._length+=T.length;var y=this._buff.length,b;for(b=64;b<=y;b+=64)l(this._hash,o(this._buff.substring(b-64,b)));return this._buff=this._buff.substring(b-64),this},x.prototype.end=function(T){var y=this._buff,b=y.length,M,L=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],k;for(M=0;M<b;M+=1)L[M>>2]|=y.charCodeAt(M)<<(M%4<<3);return this._finish(L,b),k=m(this._hash),T&&(k=N(k)),this.reset(),k},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(T){return this._buff=T.buff,this._length=T.length,this._hash=T.hash,this},x.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},x.prototype._finish=function(T,y){var b=y,M,L,k;if(T[b>>2]|=128<<(b%4<<3),b>55)for(l(this._hash,T),b=0;b<16;b+=1)T[b]=0;M=this._length*8,M=M.toString(16).match(/(.*?)(.{0,8})$/),L=parseInt(M[2],16),k=parseInt(M[1],16)||0,T[14]=L,T[15]=k,l(this._hash,T)},x.hash=function(T,y){return x.hashBinary(p(T),y)},x.hashBinary=function(T,y){var b=d(T),M=m(b);return y?N(M):M},x.ArrayBuffer=function(){this.reset()},x.ArrayBuffer.prototype.append=function(T){var y=I(this._buff.buffer,T,!0),b=y.length,M;for(this._length+=T.byteLength,M=64;M<=b;M+=64)l(this._hash,c(y.subarray(M-64,M)));return this._buff=M-64<b?new Uint8Array(y.buffer.slice(M-64)):new Uint8Array(0),this},x.ArrayBuffer.prototype.end=function(T){var y=this._buff,b=y.length,M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],L,k;for(L=0;L<b;L+=1)M[L>>2]|=y[L]<<(L%4<<3);return this._finish(M,b),k=m(this._hash),T&&(k=N(k)),this.reset(),k},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 T=x.prototype.getState.call(this);return T.buff=C(T.buff),T},x.ArrayBuffer.prototype.setState=function(T){return T.buff=v(T.buff,!0),x.prototype.setState.call(this,T)},x.ArrayBuffer.prototype.destroy=x.prototype.destroy,x.ArrayBuffer.prototype._finish=x.prototype._finish,x.ArrayBuffer.hash=function(T,y){var b=h(new Uint8Array(T)),M=m(b);return y?N(M):M},x})})(ch);var uh=ch.exports;function Yc(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const lC=e=>{if(typeof XMLHttpRequest=="undefined")throw new Error("XMLHttpRequest is undefined");const t=new XMLHttpRequest,{action:n}=e;t.upload&&t.upload.addEventListener("progress",o=>{const c=o;c.percent=o.total>0?o.loaded/o.total*100:0,e.onProgress(c)});const i=new FormData;if(e.data){let o=e.data;Array.isArray(o)||(o=[o]),o.forEach(c=>{for(const[d,h]of Object.entries(c))Array.isArray(h)?i.append(d,...h):i.append(d,h)})}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(Yc(t))}),t.addEventListener("loadend",()=>{e.onComplete()}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0),e.header)if(Array.isArray(e.header))e.header.forEach(o=>{const c=o.name,d=o.value;t.setRequestHeader(c,d)});else{const o=e.header.name,c=e.header.value;t.setRequestHeader(o,c)}const l=e.headers||{};if(l instanceof Headers)l.forEach((o,c)=>t.setRequestHeader(c,o));else for(const[o,c]of Object.entries(l))Kd(c)||t.setRequestHeader(o,String(c));return t.send(i),t},dh=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,oC=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),l=await uC(n,t),o=[];cC(e,n,i,l,o,t),await Promise.all(o).then(()=>{const c={size:n.size,name:n.name,total:i,hash:l},d=new XMLHttpRequest;d.open(e.method,e.mergeUrl,!0),d.onreadystatechange=()=>{if(d.readyState===4){if(d.status<200||d.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(Yc(d))}},d.onloadend=()=>{e.onComplete()},d.setRequestHeader("Content-type","application/JSON"),d.send(JSON.stringify(c))})},cC=(e,t,n,i,l,o)=>{for(let c=0;c<n;c++){const d=new Promise((h,f)=>{const m=c*o,p=Math.min(t.size,m+o),v=new FormData;if(e.data){let N=e.data;Array.isArray(N)||(N=[N]),N.forEach(x=>{for(const[T,y]of Object.entries(x))Array.isArray(y)?v.append(T,...y):v.append(T,y)})}if(e.formDataAttributes){let N=e.formDataAttributes;Array.isArray(N)||(N=[N]),N.forEach(x=>{Array.isArray(x.value)?v.append(x.name,...x.value):v.append(x.name,x.value)})}v.append("file",dh.call(t,m,p)),v.append("name",t.name),v.append("total",n.toString()),v.append("index",c.toString()),v.append("size",t.size.toString()),v.append("hash",i.toString());const C=new XMLHttpRequest;if(C.onreadystatechange=()=>{if(C.readyState===4){const N=Yc(C);C.status<200||C.status>=300?(f(N),e.onError(new Error("An error occurred during upload"))):h("reponseText")}},C.upload.addEventListener("progress",N=>{const x=N;e.onProgress(x,c)},!1),e.withCredentials&&"withCredentials"in C&&(C.withCredentials=!0),C.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(N=>{const x=N.name,T=N.value;C.setRequestHeader(x,T)});else{const N=e.header.name,x=e.header.value;C.setRequestHeader(N,x)}const I=e.headers||{};if(I instanceof Headers)I.forEach((N,x)=>C.setRequestHeader(x,N));else for(const[N,x]of Object.entries(I))Kd(x)||C.setRequestHeader(N,String(x));C.send(v)});l.push(d)}},uC=(e,t)=>new Promise((n,i)=>{const l=Math.ceil(e.size/t);let o=0;const c=new uh.ArrayBuffer,d=new FileReader;function h(){const f=o*t,m=f+t>=e.size?e.size:f+t;d.readAsArrayBuffer(dh.call(e,f,m))}d.onload=f=>{if(c.append(f.target.result),o+=1,o<l)h();else{const m=c.end(),p=new uh;p.append(m),p.append(e.name);const v=p.end();n(v)}},d.onerror=()=>{i(new Error("File slcie failed"))},h()}).catch(n=>{console.log(n)});function fh(e){return Date.now()+e}var dC=(e,t)=>{const n=a.computed(()=>{var v;return typeof e.size=="number"?e.size:(v=e==null?void 0:e.size)==null?void 0:v.maxImgSize}),i=a.computed(()=>{var v;return typeof e.size=="number"?e.size:(v=e==null?void 0:e.size)==null?void 0:v.maxImgSize}),l=a.ref([]);function o(v){return l.value.find(C=>C.uid===v.uid)}let c=0;function d(v){var x;c+=1,v.uid=fh(c);const C={uid:v.uid,name:v.name,status:Pa.NEW,size:v.size,raw:v},I=v.type.startsWith("image/");let N=null;if(I){try{C.url=window.URL.createObjectURL(v)}catch(T){console.error(T)}C.isPic=!0}return e.validateName&&!((x=e.validateName)!=null&&x.test(C.name))&&(C.status=Pa.FAIL,C.statusText="invalid filename",N=new Error(C.statusText)),I&&v.size>n.value*1024**2&&(C.status=Pa.FAIL,C.statusText="invalid file size",N=new Error(C.statusText)),!I&&v.size>i.value*1024**2&&(C.status=Pa.FAIL,C.statusText="invalid file size",N=new Error(C.statusText)),l.value.push(C),N}async function h(v){var N;const C=v instanceof File?o(v):v,I=x=>{var T;t.onRemove(x,l.value),l.value.splice(l.value.indexOf(C),1),(T=x.url)!=null&&T.startsWith("blob:")&&URL.revokeObjectURL(x.url)};e.beforeRemove?await((N=e.beforeRemove)==null?void 0:N.call(e,C,l.value))!==!1&&I(C):I(C)}async function f(v,C){const I=o(C);!I||(I.status="fail",I.statusText=v.message)}async function m(v,C){const I=o(C);!I||(I.status="success",I.response=v)}async function p(v,C){const I=o(C);!I||(I.status="uploading",I.percentage=Math.round(v.percent))}return a.watch(()=>e.files,v=>{l.value=v.map(C=>{var I,N;return c+=1,Te(F({},C),{uid:(I=C.uid)!=null?I:fh(c),status:(N=C.status)!=null?N:Pa.SUCCESS})})},{immediate:!0,deep:!0}),{fileList:l,handlePreprocess:d,handleRemove:h,handleError:f,handleSuccess:m,handleProgress:p}},fC=a.defineComponent({name:"Upload",props:si,emits:["exceed","progress","success","error","delete","done"],setup(e,{slots:t,emit:n}){const i=a.shallowRef({}),l=a.computed(()=>e.theme===ri.PICTURE),o=a.computed(()=>l.value&&!e.multiple),c=a.computed(()=>{var M;return Se({[ia]:!0,[`${ia}--${e.theme}`]:!0,[`${ia}--disabled`]:e.disabled,[`${ia}--single-picture`]:o.value,[e.extCls]:(M=e.extCls)!=null?M:!1})}),d={theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept};function h(M,L){b(M),n("delete",M,L)}const{fileList:f,handlePreprocess:m,handleRemove:p,handleProgress:v,handleSuccess:C,handleError:I}=dC(e,{onRemove:h});function N(M){if(!M.length)return;if(e.limit&&f.value.length+M.length>e.limit){n("exceed",M,f.value);return}let L=M;(!e.multiple||e.limit===1)&&(L=M.slice(0,1));for(const k of L){const A=k,O=m(A);if(O){n("error",A,f.value,O);return}e.autoUpload&&T(A,L)}}function x(M){y(M.raw)}async function T(M,L){var A;if(!e.beforeUpload)return y(M,L);let k;try{k=await((A=e.beforeUpload)==null?void 0:A.call(e,M))}catch{k=!1}if(k===!1){p(M);return}y(M,L)}function y(M,L){const{headers:k,header:A,data:O,formDataAttributes:J,method:P,withCredentials:E,name:ee,url:H,sliceUrl:le,mergeUrl:de,chunkSize:he,customRequest:ye}=e,{uid:re}=M,K={headers:k,header:A,withCredentials:E,file:M,data:O,formDataAttributes:J,method:P,filename:ee,action:H,sliceUrl:le,mergeUrl:de,chunkSize:he,onProgress:$=>{v($,M),n("progress",$,M,f.value)},onSuccess:$=>{var fe;const X=$;if((fe=e==null?void 0:e.handleResCode)!=null&&fe.call(e,X))C($,M),n("success",$,M,f.value);else{const ce=new Error((X==null?void 0:X.message)||"unknow error");I(ce,M),n("error",M,f.value,ce)}delete i.value[re]},onError:$=>{I($,M),n("error",M,f.value,$),delete i.value[re]},onComplete:()=>{L&&L.indexOf(M)===L.length-1&&n("done",f.value)}};let B=e.sliceUpload?oC:lC;ye&&(B=ye);const V=B(K);i.value[re]=V,V instanceof Promise&&V.then(K.onSuccess,K.onError)}function b(M){let L=i.value;M&&(L={[M.uid]:i.value[M.uid]}),Object.keys(L).forEach(k=>{if(L[k]instanceof XMLHttpRequest){const A=L[k];A==null||A.abort()}delete i.value[k]})}return a.onBeforeUnmount(()=>{f.value.forEach(({url:M})=>{M!=null&&M.startsWith("blob:")&&URL.revokeObjectURL(M)})}),()=>a.createVNode("div",{class:c.value},[!l.value&&a.createVNode(oh,a.mergeProps(d,{onChange:N}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${ia}__tip`},[e.tip]),a.createVNode(sC,{files:f.value,theme:e.theme,disabled:e.disabled,multiple:e.multiple,onRemove:p,onRetry:x},{innerTrigger:M=>l.value&&a.createVNode(oh,a.mergeProps(d,{file:M,onChange:N,onRemove:p}),t)})])}});const hh=Ge(fC);function Di(){}Di.prototype={diff:function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=i.callback;typeof i=="function"&&(l=i,i={}),this.options=i;var o=this;function c(N){return l?(setTimeout(function(){l(void 0,N)},0),!0):N}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var d=n.length,h=t.length,f=1,m=d+h,p=[{newPos:-1,components:[]}],v=this.extractCommon(p[0],n,t,0);if(p[0].newPos+1>=d&&v+1>=h)return c([{value:this.join(n),count:n.length}]);function C(){for(var N=-1*f;N<=f;N+=2){var x=void 0,T=p[N-1],y=p[N+1],b=(y?y.newPos:0)-N;T&&(p[N-1]=void 0);var M=T&&T.newPos+1<d,L=y&&0<=b&&b<h;if(!M&&!L){p[N]=void 0;continue}if(!M||L&&T.newPos<y.newPos?(x=gC(y),o.pushComponent(x.components,void 0,!0)):(x=T,x.newPos++,o.pushComponent(x.components,!0,void 0)),b=o.extractCommon(x,n,t,N),x.newPos+1>=d&&b+1>=h)return c(hC(o,x.components,n,t,o.useLongestToken));p[N]=x}f++}if(l)(function N(){setTimeout(function(){if(f>m)return l();C()||N()},0)})();else for(;f<=m;){var I=C();if(I)return I}},pushComponent:function(t,n,i){var l=t[t.length-1];l&&l.added===n&&l.removed===i?t[t.length-1]={count:l.count+1,added:n,removed:i}:t.push({count:1,added:n,removed:i})},extractCommon:function(t,n,i,l){for(var o=n.length,c=i.length,d=t.newPos,h=d-l,f=0;d+1<o&&h+1<c&&this.equals(n[d+1],i[h+1]);)d++,h++,f++;return f&&t.components.push({count:f}),t.newPos=d,h},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 hC(e,t,n,i,l){for(var o=0,c=t.length,d=0,h=0;o<c;o++){var f=t[o];if(f.removed){if(f.value=e.join(i.slice(h,h+f.count)),h+=f.count,o&&t[o-1].added){var p=t[o-1];t[o-1]=t[o],t[o]=p}}else{if(!f.added&&l){var m=n.slice(d,d+f.count);m=m.map(function(C,I){var N=i[h+I];return N.length>C.length?N:C}),f.value=e.join(m)}else f.value=e.join(n.slice(d,d+f.count));d+=f.count,f.added||(h+=f.count)}}var v=t[c-1];return c>1&&typeof v.value=="string"&&(v.added||v.removed)&&e.equals("",v.value)&&(t[c-2].value+=v.value,t.pop()),t}function gC(e){return{newPos:e.newPos,components:e.components.slice(0)}}var gh=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,mh=/\S/,ph=new Di;ph.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!mh.test(e)&&!mh.test(t)},ph.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]&&gh.test(t[n])&&gh.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var Fc=new Di;Fc.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 l=n[i];i%2&&!this.options.newlineIsToken?t[t.length-1]+=l:(this.options.ignoreWhitespace&&(l=l.trim()),t.push(l))}return t};function mC(e,t,n){return Fc.diff(e,t,n)}var pC=new Di;pC.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var bC=new Di;bC.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function sl(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?sl=function(t){return typeof t}:sl=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sl(e)}function Uc(e){return yC(e)||CC(e)||MC(e)||wC()}function yC(e){if(Array.isArray(e))return $c(e)}function CC(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function MC(e,t){if(!!e){if(typeof e=="string")return $c(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 $c(e,t)}}function $c(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 wC(){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 vC=Object.prototype.toString,jr=new Di;jr.useLongestToken=!0,jr.tokenize=Fc.tokenize,jr.castInput=function(e){var t=this.options,n=t.undefinedReplacement,i=t.stringifyReplacer,l=i===void 0?function(o,c){return typeof c=="undefined"?n:c}:i;return typeof e=="string"?e:JSON.stringify(Xc(e,null,null,l),l," ")},jr.equals=function(e,t){return Di.prototype.equals.call(jr,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Xc(e,t,n,i,l){t=t||[],n=n||[],i&&(e=i(l,e));var o;for(o=0;o<t.length;o+=1)if(t[o]===e)return n[o];var c;if(vC.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]=Xc(e[o],t,n,i,l);return t.pop(),n.pop(),c}if(e&&e.toJSON&&(e=e.toJSON()),sl(e)==="object"&&e!==null){t.push(e),c={},n.push(c);var d=[],h;for(h in e)e.hasOwnProperty(h)&&d.push(h);for(d.sort(),o=0;o<d.length;o+=1)h=d[o],c[h]=Xc(e[h],t,n,i,h);t.pop(),n.pop()}else c=e;return c}var Kc=new Di;Kc.tokenize=function(e){return e.slice()},Kc.join=Kc.removeEmpty=function(e){return e};function IC(e,t,n,i,l,o,c){c||(c={}),typeof c.context=="undefined"&&(c.context=4);var d=mC(n,i,c);d.push({value:"",lines:[]});function h(T){return T.map(function(y){return" "+y})}for(var f=[],m=0,p=0,v=[],C=1,I=1,N=function(y){var b=d[y],M=b.lines||b.value.replace(/\n$/,"").split(`
59
59
  `);if(b.lines=M,b.added||b.removed){var L;if(!m){var k=d[y-1];m=C,p=I,k&&(v=c.context>0?h(k.lines.slice(-c.context)):[],m-=v.length,p-=v.length)}(L=v).push.apply(L,Uc(M.map(function(le){return(b.added?"+":"-")+le}))),b.added?I+=M.length:C+=M.length}else{if(m)if(M.length<=c.context*2&&y<d.length-2){var A;(A=v).push.apply(A,Uc(h(M)))}else{var O,J=Math.min(M.length,c.context);(O=v).push.apply(O,Uc(h(M.slice(0,J))));var P={oldStart:m,oldLines:C-m+J,newStart:p,newLines:I-p+J,lines:v};if(y>=d.length-2&&M.length<=c.context){var E=/\n$/.test(n),ee=/\n$/.test(i),H=M.length==0&&v.length>P.oldLines;!E&&H&&n.length>0&&v.splice(P.oldLines,0,"\"),(!E&&!H||!ee)&&v.push("\")}f.push(P),m=0,p=0,v=[]}C+=M.length,I+=M.length}},x=0;x<d.length;x++)N(x);return{oldFileName:e,newFileName:t,oldHeader:l,newHeader:o,hunks:f}}function NC(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
  `)+`