bkui-vue 0.0.1-beta.146 → 0.0.1-beta.147

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 @@ ${Ka(n)}`),i}})}function K1(e){const t=Object.keys(e),n=t.filter(l=>{var o;retur
54
54
  m 0 ${k?"":"-"}${L}
55
55
  a ${L} ${L} 0 1 1 0 ${k?"-":""}${L*2}
56
56
  a ${L} ${L} 0 1 1 0 ${k?"":"-"}${L*2}
57
- `,z={d:Q,stroke:m||"#f5f5f5","stroke-linecap":f,"stroke-width":I,"fill-opacity":"0",class:"process-circle-trail",style:x},O={d:Q,stroke:c||"#13ce66","stroke-linecap":f,"stroke-width":l>0&&I||0,"fill-opacity":"0",class:`process-circle-path bk-${d}-circle-trail`,style:S};return a.createVNode("div",{class:"progress-outer-circle",style:M},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",z,null),a.createVNode("path",O,null)]),a.createVNode("span",{class:"progress-circle-text",style:C},[n==null?void 0:n.default()])])},Z2=(e,{attrs:t,slots:n})=>{const{percent:i,strokeWidth:l,size:o,color:c,titleStyle:f,showText:d,textInside:g,theme:m}=t,C={height:`${l}px`,lineHeight:`${l}px`},I={width:`${i}%`,background:c,animationDuration:"3s"},b=(M=!0)=>(d||n.default)&&(M&&g||!M&&!g)?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:C},[a.createVNode("div",{style:I,class:{"progress-inner":!0,[`bk-${m}`]:!0}},[a.createVNode("div",{class:"inner-text",style:f},[b()])])]),b(!1)])};function x0(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var Y2=a.defineComponent({name:"Progress",props:{extCls:h.string,type:h.string.validate(e=>["line","circle","dashboard"].includes(e)).def("line"),percent:h.number.def(0),theme:h.theme().def("primary"),size:h.size(),width:h.number.def(126),strokeWidth:h.number,strokeLinecap:h.string.def("round"),textInside:h.bool.def(!1),showText:h.bool.def(!0),color:h.string,bgColor:h.string,fixed:h.number.validate(e=>e>=0&&e<=20).def(0),format:h.func.def(e=>`${e}%`),titleStyle:h.object.def({fontSize:"16px",verticalAlign:"middle"})},setup(){return{}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var f;const{showText:e,format:t,percent:n,textInside:i,titleStyle:l,fixed:o}=this.$props,c=t((f=this.validPercent(n))==null?void 0:f.toFixed(o));return(e||this.$slots.default)&&i?this.$slots.default?this.$slots.default():a.createVNode("span",null,[c]):!e||i?null:a.createVNode("span",{class:"progress-text",style:typeof c=="string"?l:void 0},[this.$slots.default?this.$slots.default():c])}},render(){const e=this.renderProcessInfo(),t=Ne(H({},this.$props),{percent:this.validPercent(this.percent)});let n=a.createVNode(Z2,t,x0(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(G2,t,x0(e)?e:{default:()=>[e]}));const i={class:ke({extCls:!!this.extCls},`bk-progress bk-progress-${this.type}`)};return a.createVNode("div",i,[n])}});const ga=Ze(Y2),S0=Symbol("RadioGroup");function D0(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const j0=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,i=di(),l=a.inject(S0,Xl),o=!xd(l),c=a.ref(!1),f=a.computed(()=>o&&l.props.disabled?!0:t.disabled);o?a.watch(()=>l.props.modelValue,m=>{c.value=m===t.label},{immediate:!0}):a.watch(()=>t.modelValue,m=>{m!==""&&(c.value=m===t.label)},{immediate:!0});const d=(m=!0)=>{c.value=m},g=m=>{var b;if(f.value)return;const C=m.target;c.value=C.checked;const I=c.value?t.label:"";n("change",I),n("update:modelValue",I),o&&l.handleChange(e.proxy),(b=i==null?void 0:i.validate)==null||b.call(i,"change"),a.nextTick(()=>{C.checked!==c.value&&(C.checked=c.value)})};return a.onMounted(()=>{o&&l.register(e.proxy)}),a.onBeforeUnmount(()=>{o&&l.unregister(e.proxy)}),{isChecked:c,isDisabled:f,setChecked:d,handleChange:g}},F2={name:h.string.def(""),label:h.oneOfType([String,Number,Boolean]).isRequired,modelValue:h.oneOfType([String,Number,Boolean]).def(""),checked:h.bool.def(!1),disabled:h.bool.def(!1)};var _2=a.defineComponent({name:"Radio",props:F2,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=D0(),{isChecked:i,isDisabled:l,setChecked:o,handleChange:c}=j0();return{isFocused:e,isChecked:i,isDisabled:l,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=ke({"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 U2={name:h.string.def(""),label:h.oneOfType([String,Number,Boolean]).isRequired,modelValue:h.oneOfType([String,Number,Boolean]).def(""),checked:h.bool.def(!1),disabled:h.bool.def(!1),size:h.size()};var $2=a.defineComponent({name:"RadioButton",props:U2,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=D0(),{isChecked:i,isDisabled:l,setChecked:o,handleChange:c}=j0();return{isFocused:e,isChecked:i,isDisabled:l,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=ke({"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 X2={name:h.string.def(""),modelValue:h.oneOfType([String,Number,Boolean]),disabled:h.bool};var K2=a.defineComponent({name:"RadioGroup",props:X2,emits:["change","update:modelValue"],setup(e,t){const n=[],i=c=>{n.push(c)},l=c=>{const f=n.indexOf(c);f>-1&&n.splice(f,1)},o=c=>{const f=c.label;n.forEach(d=>{d!==c&&d.setChecked(!1)}),t.emit("update:modelValue",f),t.emit("change",f)};return a.provide(S0,{props:e,register:i,unregister:l,handleChange:o}),a.onMounted(()=>{e.modelValue!==""&&n.forEach(c=>{c.setChecked(c.label===e.modelValue)})}),{}},render(){var e;return a.createVNode("div",{class:"bk-radio-group"},[(e=this.$slots)==null?void 0:e.default()])}});const z0=At(_2,{Group:K2,Button:$2});var Ns=a.defineComponent({name:"Star",props:{rate:h.number.def(0),width:h.number.def(15),height:h.number.def(16),editable:h.bool.def(!0),hoverRate:h.number.def(0),max:h.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=f=>{if(!e.editable)return;const d=f+1;t("chooseRate",d)},i=f=>{if(!e.editable)return;const d=f+1;t("changeHover",d)},l=f=>ke({"bk-is-select":f<Math.floor(o.value),"bk-is-edit":e.editable,"bk-rate-star":!0}),o=a.computed(()=>e.hoverRate||e.rate),c={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:"bk-rate-stars"},[Array(e.max).fill(1).map((f,d)=>a.createVNode("svg",{class:l(d),style:c,x:"0px",y:"0px",viewBox:"0 0 64 64",onClick:()=>n(d),onMouseenter:()=>i(d)},[a.createVNode("g",{transform:"translate(-143.000000, -635.000000)"},[a.createVNode("g",{transform:"translate(83.000000, 114.000000)"},[a.createVNode("g",{transform:"translate(15.000000, 384.000000)"},[a.createVNode("g",{transform:"translate(29.000000, 137.000000)"},[a.createVNode("polygon",{class:"st1",points:"48,53 28.2,63.9 32,40.8 16,24.4 38.1,21 48,-0.1 57.8,21 79.9,24.4 63.9,40.8 67.7,63.9"},null)])])])])]))])}}),q2=a.defineComponent({name:"Rate",components:{star:Ns},props:{modelValue:h.number.def(0),size:h.size(),editable:h.bool.def(!0)},emits:["change","update:modelValue"],setup(e,{emit:t}){const n=di(),i=a.ref(0),l=C=>{var I;!e.editable||(t("update:modelValue",C),t("change",C),(I=n==null?void 0:n.validate)==null||I.call(n,"change"))},o=C=>{i.value=C},c=ke({"bk-rate":!0}),d={small:{width:12,height:12},large:{width:18,height:18}}[e.size]||{width:15,height:16},g=a.computed(()=>{const C=Math.floor(e.modelValue),I=(d.width+3)*C,b=d.width*(e.modelValue-C);return{width:`${I+b}px`}}),m={width:d.width,height:d.height};return()=>a.createVNode("p",{class:c},[e.editable?a.createVNode(Ns,a.mergeProps({rate:e.modelValue,"hover-rate":i.value,onChooseRate:l,onChangeHover:o,onMouseleave:()=>o(0)},m),null):[a.createVNode(Ns,a.mergeProps({rate:5,style:g.value,class:"bk-score-real",editable:!1},m),null),a.createVNode(Ns,a.mergeProps({rate:0,editable:!1},m),null)]])}});const P0=Ze(q2);var em=a.defineComponent({name:"Swiper",props:{isLoop:h.bool.def(!0),loopTime:h.number.def(8e3),pics:h.array.def([]),list:h.array.def([]),height:h.number,width:h.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:i,loopTime:l,pics:o,list:c,height:f,width:d}=a.toRefs(e),g=a.ref(),m=a.ref(0),C=a.ref(0),I=a.ref(0),b=a.ref(0);let M;const L=a.computed(()=>{var G;return((G=c.value)==null?void 0:G.length)>0?c.value:o.value}),k=a.computed(()=>({width:`${C.value*L.value.length}px`,transform:`translateX(-${C.value*m.value}px)`})),N=a.computed(()=>({width:`${C.value}px`,height:`${I.value}px`})),v=G=>{let se=G;G>=L.value.length&&(se=0),G<0&&(se=L.value.length-1),m.value=se,t("index-change",se)},p=G=>{!G||window.open(G,"_blank")},w=G=>["bk-swiper-img",{"bk-swiper-link":G.link},G.class],x=G=>({"background-image":`url(${G.url})`,"background-color":G.color}),S=G=>({"bk-current-index":m.value===G}),Q=()=>{i.value&&(b.value=window.setTimeout(()=>{v(m.value+1),Q()},l.value))},z=()=>{window.clearTimeout(b.value)},O=()=>{var se;const G=(se=g.value)==null?void 0:se.parentElement;!G||!window.ResizeObserver||(M=new ResizeObserver(()=>{_()}),M.observe(G))},P=()=>{var G;(G=M.disconnect)==null||G.call(M)},E=G=>{if(G===void 0)return{height:0,width:0};const se=getComputedStyle(G),ce=G.clientWidth-parseFloat(se.paddingTop)-parseFloat(se.paddingBottom);return{height:G.clientHeight-parseFloat(se.paddingLeft)-parseFloat(se.paddingRight),width:ce}},_=()=>{var se;const G=E((se=g.value)==null?void 0:se.parentElement);C.value=+d.value>0?d.value:G.width,I.value=+f.value>0?f.value:G.height};return a.watch([f,d],_),a.onMounted(()=>{_(),Q(),O()}),a.onBeforeUnmount(()=>{z(),P()}),()=>a.createVNode("section",{class:"bk-swiper-home",ref:g,style:N.value},[a.createVNode("hgroup",{style:k.value,class:"bk-transition bk-swiper-main"},[L.value.map(G=>{var se,ce;return a.createVNode("h3",{class:"bk-swiper-card",style:N.value},[(ce=(se=n.default)==null?void 0:se.call(n,G))!=null?ce:a.createVNode("span",{class:w(G),style:x(G),onClick:()=>p(G.link)},null)])})]),a.createVNode("ul",{class:"bk-swiper-index"},[L.value.map((G,se)=>a.createVNode("li",{class:S(se),onMouseover:()=>v(se)},null))]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-prev",onClick:()=>v(m.value-1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-next",onClick:()=>v(m.value+1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)])])}});const E0=Ze(em),Ls=Symbol("BkSelect"),O0=Symbol("BkOptionGroup");function J0(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function Go(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 tm(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 nm(e,t){const{popoverMinWidth:n}=e;let i=null;const l=a.ref("auto"),o=a.ref(!1),c=()=>{o.value=!o.value},f=()=>{o.value=!1},d=()=>{o.value=!0},g=()=>{var m;l.value=Math.max((m=t.value)==null?void 0:m.offsetWidth,n)};return a.onMounted(()=>{!t.value||(i=j1(t.value,g,60,!0),i.start())}),a.onBeforeUnmount(()=>{i==null||i.stop(),i=null}),{isPopoverShow:o,popperWidth:l,togglePopover:c,hidePopover:f,showPopover:d}}function im(e,t){const n=tm(""),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 ks(e=""){return e&&String(e).trim().toLowerCase()}var A0=a.defineComponent({name:"Option",props:{value:h.any,label:h.string.def(""),disabled:h.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(Ls,null),c=a.inject(O0,null),f=a.computed(()=>{var I;return(I=o==null?void 0:o.selected)==null?void 0:I.some(b=>b.value===l.value)}),d=a.computed(()=>o==null?void 0:o.multiple),g=a.computed(()=>(o==null?void 0:o.activeOptionValue)===l.value),m=()=>{i.value||o==null||o.handleOptionSelected(t)},C=()=>{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)}),Ne(H({},a.toRefs(n)),{selected:f,multiple:d,isHover:g,handleOptionClick:m,handleMouseEnter:C})},render(){var t,n,i;const e=ke({"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"},[this.label,this.multiple&&this.selected&&a.createVNode(yr,{width:22,height:22},null)])]),[[a.vShow,this.visible]])}}),rm=a.defineComponent({name:"Group",props:{label:h.string.def(""),disabled:h.bool.def(!1),collapsible:h.bool.def(!1),collapse:h.bool.def(!1)},setup(e,{emit:t}){const n=a.getCurrentInstance(),{proxy:i}=n,l=a.inject(Ls,null),o=a.reactive({groupCollapse:e.collapse,visible:!0}),c=a.ref(new Map),{register:f,unregister:d}=Go(c),g=a.computed(()=>`${e.label} (${[...c.value.values()].filter(C=>C.visible).length})`),m=()=>{!e.collapsible||e.disabled||(o.groupCollapse=!o.groupCollapse,t("update:collapse",o.groupCollapse))};return a.provide(O0,a.reactive(Ne(H({},a.toRefs(e)),{register:f,unregister:d,groupCollapse:a.toRef(o,"groupCollapse")}))),a.onBeforeMount(()=>{l==null||l.registerGroup(n.uid,i)}),a.onBeforeUnmount(()=>{l==null||l.unregisterGroup(n.uid)}),Ne(H({},a.toRefs(o)),{groupLabel:g,handleToggleCollapse:m})},render(){var i,l;const e=ke({"bk-option-group":!0,collapsible:this.collapsible,disabled:this.disabled}),t=ke({"bk-option-group-label":!0,collapsible:this.collapsible}),n=ke({"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(es,{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]])}}),am=a.defineComponent({name:"Tag",props:{theme:h.theme(["success","info","warning","danger"]).def(""),closable:h.bool.def(!1),type:h.commonType(["","filled","stroke"]).def(""),checkable:h.bool.def(!1),checked:h.bool.def(!1),radius:h.string.def("2px"),extCls:h.string.def("")},emits:["change","close"],slots:["icon"],setup(e,{emit:t}){const n=a.computed(()=>ke({"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(jn,{class:"bk-tag-close",onClick:this.handleClose},null):""])}});const Zo=Ze(am);function sm(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var lm=a.defineComponent({name:"SelectTagInput",props:{selected:{type:Array,default:()=>[]},tagTheme:h.theme(["success","info","warning","danger"]).def(""),placeholder:h.string.def(""),filterable:h.bool.def(!1),allowCreate:h.bool.def(!1),modelValue:h.any},emits:["update:modelValue","remove","focus","enter"],setup(e,{emit:t}){const n=a.inject(Ls,null),{modelValue:i}=a.toRefs(e),l=a.ref(i.value),o=a.ref();a.watch(i,()=>{l.value=i.value});const c=I=>{t("remove",I)},f=()=>{t("focus")},d=()=>{var I;(I=o.value)==null||I.focus()},g=I=>{t("update:modelValue",I.target.value)},m=I=>{switch(I.code){case"Enter":{t("enter",I.target.value,I);break}}},C=n==null?void 0:n.handleGetLabelByValue;return{value:l,inputRef:o,handleRemoveTag:c,handleFocus:f,focus:d,handleInput:g,handleKeydown:m,handleGetLabelByValue:C}},render(){var e,t,n,i;return a.createVNode("div",{class:"bk-select-tag"},[(t=(e=this.$slots)==null?void 0:e.prefix)==null?void 0:t.call(e),this.selected.map(l=>{let o;return a.createVNode(Zo,{closable:!0,theme:this.tagTheme,onClose:()=>this.handleRemoveTag(l.value)},sm(o=this.handleGetLabelByValue(l))?o:{default:()=>[o]})}),a.withDirectives(a.createVNode("input",{class:"bk-select-tag-input",ref:"inputRef",type:"text",placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,"onUpdate:modelValue":l=>this.value=l,onFocus:this.handleFocus,onInput:this.handleInput,onKeydown:this.handleKeydown},null),[[a.vModelText,this.value]]),(i=(n=this.$slots)==null?void 0:n.suffix)==null?void 0:i.call(n)])}}),om=a.defineComponent({name:"Select",directives:{clickoutside:sa},props:{modelValue:h.any,multiple:h.bool.def(!1),disabled:h.bool.def(!1),size:h.size().def("default"),clearable:h.bool.def(!0),loading:h.bool.def(!1),filterable:h.bool.def(!1),remoteMethod:h.func,scrollHeight:h.number.def(216),showSelectAll:h.bool.def(!1),popoverMinWidth:h.number.def(0),showOnInit:h.bool.def(!1),multipleMode:h.oneOf(["default","tag"]).def("default"),tagTheme:h.theme(["success","info","warning","danger"]).def(""),behavior:h.oneOf(["normal","simplicity"]).def("normal"),collapseTags:h.bool.def(!1),noDataText:h.string.def("\u65E0\u6570\u636E"),noMatchText:h.string.def("\u65E0\u5339\u914D\u6570\u636E"),loadingText:h.string.def("\u52A0\u8F7D\u4E2D..."),placeholder:h.string.def("\u8BF7\u9009\u62E9"),selectAllText:h.string.def("\u5168\u90E8"),scrollLoading:h.bool.def(!1),allowCreate:h.bool.def(!1),popoverOptions:h.object.def({}),customContent:h.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:f,loadingText:d,noDataText:g,noMatchText:m,popoverMinWidth:C,showOnInit:I,multipleMode:b,allowCreate:M,customContent:L}=a.toRefs(e),k=di(),N=a.ref(),v=a.ref(),p=a.ref(),w=a.ref(new Map),x=a.computed(()=>[...w.value.values()]),S=a.ref(new Map),Q=a.ref([]),z=a.ref();a.watch(n,()=>{Ct()},{deep:!0});const O=a.computed(()=>i.value||f.value),P=a.computed(()=>Q.value.map(Ce=>Bt(Ce))),E=a.computed(()=>{const Ce=x.value.reduce((ze,Pe)=>(Pe.disabled||ze.push(Pe.value),ze),[]);return Ce.length<=Q.value.length&&Ce.every(ze=>Q.value.some(Pe=>Pe.value===ze))}),_=a.computed(()=>!!S.value.size),G=a.computed(()=>!x.value.length),se=a.computed(()=>x.value.length&&x.value.every(Ce=>!Ce.visible)),ce=a.computed(()=>l.value&&typeof c.value=="function"),de=a.computed(()=>!(oe.value||G.value||se.value)||L.value),pe=a.computed(()=>oe.value?d.value:G.value?g.value:se.value?m.value:""),{register:K,unregister:Z}=Go(w),{register:J,unregister:V}=Go(S),{isHover:X,setHover:Y,cancelHover:ne}=J0(),le=a.ref(!1),ge=Ce=>{le.value=!0,t("focus",Ce)},U=()=>{le.value&&t("blur"),le.value=!1},{popperWidth:fe,isPopoverShow:he,hidePopover:F,showPopover:ie,togglePopover:Me}=nm({popoverMinWidth:C.value},v),we=a.computed(()=>(l.value||M.value)&&he.value);a.watch(he,Ce=>{Ce?(ot(),Ee()):te.value=""});const Ee=()=>{var Pe;const Ce=Q.value[0],ze=w.value.get(Ce==null?void 0:Ce.value);ze&&!ze.disabled&&ze.visible?z.value=Ce==null?void 0:Ce.value:z.value=(Pe=x.value.find(ln=>!ln.disabled&&ln.visible))==null?void 0:Pe.value},at=Ce=>{!l.value||x.value.forEach(ze=>{var Pe;ze.visible=(Pe=ks(String(ze.label)))==null?void 0:Pe.includes(ks(Ce))})},{searchKey:te,searchLoading:oe}=im(ce.value?c.value:at,Ee),ye=Ce=>{var ze;Ce!==n.value&&(t("change",Ce),t("update:modelValue",Ce),(ze=k==null?void 0:k.validate)==null||ze.call(k,"change"))},Se=()=>{O.value||(Me(),t("toggle",he.value))},je=Ce=>{!l.value||(te.value=Ce)},Ae=(Ce,ze)=>{const Pe=String(Ce);!M.value||!Pe||l.value&&x.value.find(Rn=>ks(String(Rn.label))===ks(Pe))||w.value.get(Pe)||(ze.stopPropagation(),o.value?(Q.value.push({value:Pe,label:Pe}),ye(Q.value.map(Rn=>Rn.value))):(Q.value=[{value:Pe,label:Pe}],ye(Pe),F()),te.value="")},Fe=Ce=>{if(!(O.value||!Ce)){if(o.value){const ze=Q.value.findIndex(Pe=>Pe.value===Ce.value);ze>-1?Q.value.splice(ze,1):Q.value.push({value:Ce.value,label:Ce.label||Ce.value}),ye(Q.value.map(Pe=>Pe.value))}else Q.value=[{label:Ce.label||Ce.value,value:Ce.value}],ye(Ce.value),F();ot()}},ot=()=>{var Ce,ze;b.value==="tag"?(Ce=p.value)==null||Ce.focus():(ze=N.value)==null||ze.focus()},jt=Ce=>{Ce.stopPropagation(),Q.value=[],ye(o.value?[]:""),t("clear",o.value?[]:""),F()},nt=()=>{z.value=""},Mn=()=>{E.value?Q.value=[]:x.value.forEach(Ce=>{Ce.disabled||Q.value.find(ze=>ze.value===Ce.value)||Q.value.push({value:Ce.value,label:Ce.label||Ce.value})}),ye(Q.value.map(Ce=>Ce.value)),ot()},qe=Ce=>{const{scrollTop:ze,clientHeight:Pe,scrollHeight:ln}=Ce.target;ze+Pe===ln&&t("scroll-end")},_e=Ce=>{const ze=Q.value.findIndex(Pe=>Pe.value===Ce);ze>-1&&(Q.value.splice(ze,1),ye(Q.value.map(Pe=>Pe.value)))},Bt=Ce=>{var ze,Pe;return((Pe=(ze=w.value)==null?void 0:ze.get(Ce.value))==null?void 0:Pe.label)||Ce.label||Ce.value},Ct=()=>{Array.isArray(n.value)?Q.value=[...n.value.map(Ce=>({value:Ce,label:Ce}))]:n.value!==void 0&&(Q.value=[{value:n.value,label:n.value}])},Ta=Ce=>{var ln,Rn;const ze=x.value.filter(Ht=>!Ht.disabled&&Ht.visible),Pe=ze.findIndex(Ht=>Ht.value===z.value);if(!(!ze.length||Pe===-1))switch(Ce.code){case"ArrowDown":{Ce.preventDefault();const Ht=Pe>=ze.length-1?0:Pe+1;z.value=(ln=ze[Ht])==null?void 0:ln.value;break}case"ArrowUp":{Ce.preventDefault();const Ht=Pe===0?ze.length-1:Pe-1;z.value=(Rn=ze[Ht])==null?void 0:Rn.value;break}case"Backspace":{if(!o.value||!Q.value.length||te.value.length)return;Q.value.pop(),ye(Q.value.map(Ht=>Ht.value));break}case"Enter":{if(!he.value)he.value=!0;else{const Ht=w.value.get(z.value);Fe(Ht)}break}}},xa=({event:Ce})=>{var Pe;const{target:ze}=Ce;((Pe=v.value)==null?void 0:Pe.contains(ze))||v.value===ze||(F(),U())};return a.provide(Ls,a.reactive({multiple:o,selected:Q,activeOptionValue:z,register:K,unregister:Z,registerGroup:J,unregisterGroup:V,handleOptionSelected:Fe,handleGetLabelByValue:Bt})),a.onMounted(()=>{Ct(),setTimeout(()=>{I.value&&ie()})}),{selected:Q,isInput:we,options:x,isDisabled:O,selectedLabel:P,isPopoverShow:he,isHover:X,popperWidth:fe,inputRef:N,triggerRef:v,selectTagInputRef:p,searchLoading:oe,isOptionsEmpty:G,isSearchEmpty:se,isFocus:le,isShowSelectContent:de,curContentText:pe,isGroup:_,searchKey:te,setHover:Y,cancelHover:ne,handleFocus:ge,handleTogglePopover:Se,handleClear:jt,hidePopover:F,showPopover:ie,handleToggleAll:Mn,handleOptionSelected:Fe,handleClickOutside:xa,handleScroll:qe,handleDeleteTag:_e,handleInputChange:je,handleInputEnter:Ae,handleKeydown:Ta,handleSelectedAllOptionMouseEnter:nt}},render(){const e=ke({"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={theme:"light bk-select-popover",trigger:"manual",width:this.popperWidth,arrow:!1,placement:"bottom",isShow:this.isPopoverShow},n=rn.exports.merge(t,this.popoverOptions),i=()=>this.loading?a.createVNode(fi,{loading:!0,theme:"primary",class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length?a.createVNode(Dn,{class:"clear-icon",onClick:this.handleClear},null):a.createVNode(na,{class:"angle-up"},null),l=()=>this.multipleMode==="tag"?a.createVNode(lm,{ref:"selectTagInputRef",modelValue:this.searchKey,"onUpdate:modelValue":f=>this.searchKey=f,selected:this.selected,tagTheme:this.tagTheme,placeholder:this.placeholder,filterable:this.isInput,onFocus:this.handleFocus,onRemove:this.handleDeleteTag,onEnter:this.handleInputEnter},{prefix:()=>{var f,d;return(d=(f=this.$slots).prefix)==null?void 0:d.call(f)},suffix:()=>i()}):a.createVNode(Vi,{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,disabled:this.isDisabled,behavior:this.behavior,size:this.size,onFocus:this.handleFocus,onInput:this.handleInputChange,onEnter:this.handleInputEnter},{prefix:()=>{var f,d;return(d=(f=this.$slots).prefix)==null?void 0:d.call(f)},suffix:()=>i()}),o=()=>a.createVNode("div",{class:"bk-select-trigger",ref:"triggerRef",onClick:this.handleTogglePopover,onMouseenter:this.setHover,onMouseleave:this.cancelHover,onKeydown:this.handleKeydown},[l()]),c=()=>{var f,d;return a.createVNode("div",{class:"bk-select-content"},[!this.isShowSelectContent&&a.createVNode("div",{class:"bk-select-empty"},[this.searchLoading&&a.createVNode(fi,{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.multiple&&this.showSelectAll&&(!this.searchKey||!this.filterable)&&a.createVNode("li",{class:"bk-select-option",onMouseenter:this.handleSelectedAllOptionMouseEnter,onClick:this.handleToggleAll},[this.selectAllText]),(d=(f=this.$slots).default)==null?void 0:d.call(f),this.scrollLoading&&a.createVNode("li",{class:"bk-select-options-loading"},[a.createVNode(fi,{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(ha,a.mergeProps(n,{onClickoutside:this.handleClickOutside}),{default:()=>o(),content:()=>c()})])}});const Yo=At(om,{Option:A0,Group:rm});function cm(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const{propsMixin:um}=Wi,Fo=Object.assign({},um);Fo.width.default="400",Fo.height.default="100%";var dm=a.defineComponent({name:"Sideslider",components:{BkModal:Wi,BkButton:Qt},props:Ne(H({},Fo),{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 g,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=(g=t.header)==null?void 0:g.call(t))!=null?m:e.title])])])},default:()=>{var g,m;return(m=(g=t.default)==null?void 0:g.call(t))!=null?m:"Content"},footer:()=>{var g,m;return a.createVNode("div",{class:"bk-sideslider-footer"},[(m=(g=t.footer)==null?void 0:g.call(t))!=null?m:""])}},f=`bk-sideslider-wrapper ${e.scrollable?"scroll-able":""} ${e.extCls}`,d=t.footer?"calc(100vh - 106px)":"calc(100vh - 52px)";return a.createVNode(Wi,a.mergeProps(e,{maxHeight:d,class:f,style:`${e.direction}: 0;`,onHidden:o,onShown:l,onClose:i}),cm(c)?c:{default:()=>[c]})}}});const Q0=Ze(dm),V0={theme:h.theme().def("primary"),size:h.size(),curStep:h.number.def(1),controllable:h.bool.def(!1),direction:h.commonType(["horizontal","vertical"],"direction").def("horizontal"),status:h.commonType(["","error","loading"],"status").def(""),lineType:h.commonType(["dashed","solid"],"lineType").def("dashed"),text:h.bool,extCls:h.string,steps:h.array.def([]),beforeChange:h.func};var fm=a.defineComponent({name:"Steps",props:V0,emits:["update:curStep","click"],setup(e,{emit:t}){const n=a.ref([]),i=f=>{const d=[];f.forEach(g=>{var m;typeof g=="string"?d.push(g):d.push({title:g.title,icon:g.icon,description:g.description,status:g.status,border:(m=g.border)!=null?m:!0})}),n.value.splice(0,n.value.length,...d)},l=f=>{V0.curStep=f},o=()=>{var f;n.value.splice(0,n.value.length,{title:"\u6B65\u9AA41",icon:1},{title:"\u6B65\u9AA42",icon:2},{title:"\u6B65\u9AA43",icon:3}),(f=e.steps)!=null&&f.length&&i(e.steps)},c=async f=>{try{e.controllable&&f!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(d,g)=>{const m=await e.beforeChange(f);m?d(m):g(m)}),t("update:curStep",f),t("click",f))}catch(d){console.warn(d)}};return a.onMounted(o),a.watch(()=>e.steps,()=>{i(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{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=ke({[`${this.extCls}`]:!!this.extCls,[`bk-steps-${this.direction}`]:this.direction,[`bk-steps-${this.lineType}`]:this.lineType},`${t} ${e} ${n}`),l=C=>this.curStep>C+1||this.defaultSteps[C].status==="done",o=C=>this.curStep===C+1,c=C=>{const{icon:I}=C;return I?Object.prototype.toString.call(I)==="[object Object]":typeof C=="string"},f=(C,I)=>(I.icon||(I.icon=C),!isNaN(I.icon)),d=C=>C.status==="loading",g=C=>C.status==="error",m=(C,I)=>o(C)&&this.status==="loading"||d(I)?a.createVNode(ts,{class:"bk-icon bk-steps-icon icon-loading"},null):o(C)&&this.status==="error"||g(I)?a.createVNode(jn,{class:"bk-steps-icon"},null):l(C)?a.createVNode(yr,{class:"bk-steps-icon"},null):a.createVNode("span",null,[f(C,I)?C+1:a.createVNode(I.icon,null,null)]);return a.createVNode("div",{class:i},[this.defaultSteps.map((C,I)=>{var b,M,L;return a.createVNode("div",{class:["bk-step",C.title?"":"bk-step-no-content",l(I)?"done":"",o(I)?"current":"",o(I)&&this.status==="error"?"isError":"",C.status&&o(I)?[`bk-step-${C.status}`]:""]},[a.createVNode("span",{class:["bk-step-indicator",`bk-step-${c(C)?"icon":"number"}`,`bk-step-icon${C.status}`],style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(I+1)}},[(L=(M=(b=this.$slots)[I+1])==null?void 0:M.call(b))!=null?L:m(I,C)]),C.title?a.createVNode("div",{class:"bk-step-content"},[a.createVNode("div",{class:"bk-step-title",style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(I+1)}},[C.title]),C.description&&a.createVNode("div",{class:"bk-step-description",title:C.description},[C.description])]):""])})])}});const R0=Ze(fm);var hm=a.defineComponent({name:"Switcher",props:{theme:h.theme().def(""),size:h.size(),disabled:h.bool,showText:h.bool,isOutline:h.bool,onText:h.string.def("ON"),offText:h.string.def("OFF"),isSquare:h.bool,extCls:h.string,beforeChange:h.func.def(void 0),trueValue:h.oneOfType([h.string,h.number,h.bool]).def(!0),falseValue:h.oneOfType([h.string,h.number,h.bool]).def(!1),value:h.oneOfType([h.string,h.number,h.bool]).def(!1),modelValue:h.oneOfType([h.string,h.number,h.bool]).def(!1)},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=di(),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),f=a.computed(()=>{const g={[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 m=`bk-switcher-${e.size}`;g[m]=!0}return g});a.watch(()=>e.modelValue,()=>{o.value=!0}),a.watch(()=>e.value,()=>{o.value=!1});const d=g=>{if(g.stopPropagation(),g.preventDefault(),e.disabled||i.value)return;const m=l.value?e.falseValue:e.trueValue,C=!l.value,I=()=>{var M;t("update:modelValue",m),t("change",C),(M=n==null?void 0:n.validate)==null||M.call(n,"change")};let b=!0;if(typeof e.beforeChange=="function"&&(b=e.beforeChange(m),typeof b.then=="function"))return i.value=!0,b.then(()=>{I()}).finally(()=>{i.value=!1});b&&I()};return()=>a.createVNode("div",{class:f.value,onClick:d,tabindex:"0",onKeydown:d},[i.value?a.createVNode(po,{class:"bk-switcher-loading"},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[l.value?e.onText:e.offText]):""])}});const W0=Ze(hm),gm={onContentScroll:Function},mm=H({list:h.array.def([]),enabled:h.bool.def(!0),scrollEvent:h.bool.def(!1),lineHeight:h.oneOfType([h.number,h.func]).def(30),minHeight:h.number.def(30),height:h.oneOfType([h.string.def("100%"),h.number]).def("100%"),width:h.oneOfType([h.string.def("100%"),h.number]).def("100%"),className:h.oneOfType([h.arrayOf(h.string),h.object,h.arrayOf(h.object),h.string]).def(""),contentClassName:h.oneOfType([h.arrayOf(h.string),h.object,h.arrayOf(h.object),h.string]).def(""),contentStyle:h.object.def({}),scrollXName:h.string.def(Be("F-scroll-x")),scrollYName:h.string.def(Be("F-scroll-y")),groupItemCount:h.number.def(1),preloadItemCount:h.number.def(1),renderAs:h.string.def("div"),contentAs:h.string.def("div"),scrollOffsetTop:h.number.def(0),scrollPosition:h.string.def("content"),abosuteHeight:h.oneOfType([h.string.def("auto"),h.number]).def("auto"),throttleDelay:h.number.def(60)},gm);var pm=(e,t)=>{const{renderAs:n,contentAs:i}=e,l=(f,d,g,m,C,I,b)=>{t.emit("content-scroll",[f,{translateY:C,translateX:I,pos:b}])},o=a.resolveDirective("bkVirtualRender"),c={lineHeight:e.lineHeight,handleScrollCallback:l,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent};return{rendAsTag:()=>{var f,d,g,m,C,I,b,M,L;return a.h(n,{class:e.className},[(g=(d=(f=t.slots).beforeContent)==null?void 0:d.call(f))!=null?g:"",a.withDirectives(a.h(i,{class:e.contentClassName,style:e.contentStyle},[(I=(C=(m=t.slots).default)==null?void 0:C.call(m,{data:e.list}))!=null?I:""]),[[o,c]]),(L=(M=(b=t.slots).afterContent)==null?void 0:M.call(b))!=null?L:""])}}};function B0(e,t,n,i){let l=0,o=0,c=0,f=0;for(;l<e;l++){if(f=i(l,[l*n,(l+1)*n,"virtual"]),o+f>t){c=t-o;break}o+=f}return{startIndex:l,height:o,diffHeight:c}}function H0(e,t,n,i,l){if(!i)return;const o=i.scrollTop,c=i.scrollLeft,{scrollTop:f,count:d,groupItemCount:g,startIndex:m,endIndex:C}=n,{offsetHeight:I}=i;let b=0,M=0,L=0;if(typeof e=="number"&&(b=Math.floor(o/e),M=Math.ceil(I/e)+b,L=o%e),typeof e=="function"){const k=B0(d,o,g,e);b=k.startIndex>0?k.startIndex:0,L=k.diffHeight,M=B0(d,I,g,e).startIndex+b+1}if(o!==f||b!==m||M!==C){const k=i.scrollHeight-i.offsetHeight-i.scrollTop;typeof t=="function"&&t(l,b,M,o,L,c,{bottom:k>=0?k:0})}}function ym(e,t,n){const{lineHeight:i=30,handleScrollCallback:l,pagination:o={},onlyScroll:c}=n.value;if(c){const I=t.scrollTop,b=t.scrollLeft,M=t.scrollHeight-t.offsetHeight-t.scrollTop;l(e,null,null,I,I,b,{bottom:M>=0?M:0});return}const{startIndex:f,endIndex:d,groupItemCount:g,count:m,scrollTop:C}=o;H0(i,l,{scrollTop:C,startIndex:f,endIndex:d,groupItemCount:g,count:m},t,e)}const G0=(e=60)=>rn.exports.throttle((t,n,i)=>ym(t,n,i),e),bm=(e,t,n,i=60)=>{Reflect.apply(G0(i),globalThis,[e,t,n])};var Cm={mounted(e,t){const n=e.parentNode,{throttleDelay:i}=t.value;n.addEventListener("scroll",l=>{bm(l,n,t,i)})},unbind(e){if(e){const t=e.parentNode;if(!t)return;t.removeEventListener("scroll",G0)}}},Mm=a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:Cm},props:mm,emits:["content-scroll"],setup(e,t){const{renderAs:n,contentAs:i}=e,l=Q=>typeof Q=="string"?[Q]:typeof Q=="object"&&!Array.isArray(Q)?[Q]:Q;if(!e.enabled){const{rendAsTag:Q}=pm(e,t);return Q}const o=a.ref(null),c=a.reactive({startIndex:0,endIndex:0,scrollTop:1,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),f=(Q,z,O,P,E,_,G)=>{c.startIndex=z,c.endIndex=O,c.scrollTop=P,c.translateY=E,c.translateX=_,c.pos=G,t.emit("content-scroll",[Q,c])};a.onMounted(()=>{a.nextTick(()=>{C(e.list),I()})}),a.watch(()=>e.list,()=>{d(),I()},{deep:!0}),a.watch(()=>e.lineHeight,()=>{d(),I()});const d=()=>{C(e.list)},g=a.ref(0),m=a.ref(0),C=Q=>{if(g.value=Math.ceil((Q||[]).length/e.groupItemCount),c.count=g.value,c.startIndex=0,c.endIndex=0,c.translateY=0,c.scrollTop=0,typeof e.abosuteHeight=="string"&&e.abosuteHeight==="auto")if(typeof e.lineHeight=="function"){m.value=0;let O=0;for(let P=0;P<g.value;P++){const E=e.lineHeight.call(this,P,Q.slice(P*e.groupItemCount,e.groupItemCount));O+=typeof E=="number"?E:0}m.value=O}else m.value=e.lineHeight*g.value;else m.value=e.abosuteHeight},I=(Q=!0)=>{var O;const z=(O=o.value)==null?void 0:O.parentNode;H0(e.lineHeight,f,c,z,null),Q&&o.value&&o.value.scrollTo(0,0)},b=a.computed(()=>(e.list||[]).map((Q,z)=>Ne(H({},Q),{$index:z}))),M=a.computed(()=>b.value.slice(c.startIndex*e.groupItemCount,(c.endIndex+e.preloadItemCount)*e.groupItemCount)),L=a.computed(()=>e.scrollPosition==="content"?{top:`${c.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${c.translateY}px)`}:{}),k=a.computed(()=>H({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"?L.value:{})),N=a.computed(()=>{const Q=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${m.value<e.minHeight?e.minHeight:m.value}px`,display:Q?"none":"block"}}),v=a.computed(()=>[Be("virtual-render"),e.scrollXName,e.scrollYName,...l(e.className),e.scrollPosition==="container"?Be("virtual-content"):""]),p=a.computed(()=>[e.scrollPosition==="content"?Be("virtual-content"):"",...l(e.contentClassName)]),w=a.resolveDirective("bkVirtualRender"),x={lineHeight:e.lineHeight,handleScrollCallback:f,pagination:c,throttleDelay:e.throttleDelay},S=()=>{d(),I()};return t.expose({reset:S}),()=>{var Q,z,O,P,E,_,G,se,ce;return a.h(n||"div",{ref:o,class:v.value,style:k.value},[(O=(z=(Q=t.slots).beforeContent)==null?void 0:z.call(Q))!=null?O:"",a.withDirectives(a.h(i||"div",{class:p.value,style:H(H({},L.value),e.contentStyle)},[(_=(E=(P=t.slots).default)==null?void 0:E.call(P,{data:M.value}))!=null?_:""]),[[w,x]]),(ce=(se=(G=t.slots).afterContent)==null?void 0:se.call(G))!=null?ce:"",a.h("div",{class:[Be("virtual-section")],style:N.value})])}}});const Ts=Ze(Mm);var xs=(e=>(e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e))(xs||{});const Z0=["none","row","col","outer"];var Un=(e=>(e.ON_SORT_BY_CLICK="onSortByClick",e.ON_FILTER_CLICK="onFilterClick",e.ON_SETTING_CHANGE="onSettingChange",e.ON_ROW_EXPAND_CLICK="onRowExpandClick",e))(Un||{}),Ir=(e=>(e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.COLUMN_FILTER="columnFilter",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))(Ir||{});const En=(...e)=>!0,Im={columnPick:En,columnFilter:En,columnSort:En,rowClick:En,rowDblClick:En,rowExpand:En,pageLimitChange:En,pageValueChange:En,settingChange:En,scrollBottom:En},kt={ROW_INDEX:"__$table_row_index",ROW_UID:"__$uuid",ROW_EXPAND:"__row_expand"},_o=4,$n=42,Ss={large:78,medium:60,small:42},wm=[{value:"small",label:"\u5C0F",height:Ss.small},{value:"medium",label:"\u4E2D",height:Ss.medium},{value:"large",label:"\u5927",height:Ss.large}],Y0=(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),Ne(H(H({},t),e),{current:n})}return t}return{}};var vm=(e,t)=>{const n=a.ref(0),i=a.ref(0);let l=a.reactive({count:0,limit:10,current:1});l=Y0(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},f=a.reactive([]),d=b=>{typeof b=="function"&&f.sort(b)},g=b=>{if(typeof b=="function"){const M=f.filter((L,k)=>b(L,k,e.data));f.splice(0,f.length,...M)}},m=(b,M)=>{f.splice(0,f.length,...t.slice(n.value,i.value)),g(b),d(M)},C=(b,M)=>{l=Y0(e.pagination,l),I(),c(),m(b,M)},I=()=>{!e.pagination||(o.value=e.remotePagination?l:Ne(H({},l),{count:e.data.length}))};return{pageData:f,localPagination:o,resolvePageData:m,watchEffectFn:C}},Nm=(e,t)=>{const n=a.toRef(e,"scrollLoading"),i=()=>typeof n.value=="boolean"?{loading:!!n.value,inline:!0,title:"",size:zn.Normal,mode:Qi.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,f,d;if(l.value){const{loading:g,size:m,mode:C,title:I,inline:b,indicator:M}=i();return(d=(f=(c=t.slots).fixedBottom)==null?void 0:f.call(c))!=null?d:a.createVNode(fi,{loading:g,size:m,mode:C,title:I,inline:b,indicator:M},null)}}}},F0=(e=>(e.CURRENT="current",e.ALL="all",e))(F0||{});const Lm={data:h.arrayOf(h.any).def([]),columns:h.arrayOf(h.shape({label:h.oneOfType([h.func.def(()=>""),h.string.def("")]),field:h.oneOfType([h.func.def(()=>""),h.string.def("")]),render:h.oneOfType([h.func.def(()=>""),h.string.def("")]),width:h.oneOfType([h.number.def(void 0),h.string.def("auto")]),minWidth:h.oneOfType([h.number.def(void 0),h.string.def("auto")]).def(),type:h.commonType(["selection","index","expand","none"],"columnType").def("none"),resizable:h.bool.def(!0),fixed:h.oneOfType([h.bool,h.commonType(["left","right"],"fixed")]).def(!1),sort:h.oneOfType([h.shape({sortFn:h.func.def(void 0),sortScope:h.commonType(Object.values(F0)).def("current")}),h.bool,h.string]).def(!1),filter:h.oneOfType([h.shape({list:h.arrayOf(h.any).def([]),filterFn:h.func.def(void 0)}),h.bool,h.string]).def(!1)})).def([]),activeColumn:h.oneOfType([h.number.def(-1),h.arrayOf(h.number.def(-1))]),columnPick:h.commonType(["multi","single","disabled"],"columnPick").def("disabled"),height:h.oneOfType([h.number,h.string]).def("auto"),minHeight:h.oneOfType([h.number,h.string]).def($n*2),maxHeight:h.oneOfType([h.number,h.string]).def("auto"),rowHeight:h.oneOfType([h.number,h.func]).def($n),headHeight:h.number.def($n),showHead:h.bool.def(!0),thead:h.shape({height:h.number.def($n),isShow:h.bool.def(!0),cellFn:h.func.def(void 0)}),virtualEnabled:h.bool.def(!1),border:h.arrayOf(h.commonType(Z0,"border")).def([xs.ROW]),pagination:h.oneOfType([h.bool.def(!1),h.object.def({})]).def(!1),remotePagination:h.bool.def(!1),emptyText:h.string.def("\u6682\u65E0\u6570\u636E"),settings:h.oneOfType([h.shape({fields:h.arrayOf(h.shape({label:h.string,field:h.string,disabled:h.bool})),checked:h.arrayOf(h.string),limit:h.number.def(0),size:h.size(["small","medium","large"]).def("small"),sizeList:h.shape([])}),h.bool]).def(!1),rowClass:h.oneOfType([h.string,h.object,h.func]).def({}),rowStyle:h.oneOfType([h.string,h.object,h.func]).def({}),cellStyle:h.oneOfType([h.string,h.object,h.func]).def({}),cellClass:h.oneOfType([h.string,h.object,h.func]).def({}),scrollLoading:h.oneOfType([h.object,h.bool]).def(void 0),reserveExpand:h.bool.def(!1),rowKey:h.oneOfType([h.string,h.func]).def(kt.ROW_INDEX)};function km(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var Tm=()=>{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(Yo,{class:"bk-pagination-limit-select",clearable:!1,modelValue:t.value,onChange:n,disabled:e.disabled},km(c=e.limitList.map((f,d)=>a.createVNode(A0,{value:f,label:`${f}`,key:`${d}_${f}`},null)))?c:{default:()=>[c]}),a.createVNode("div",null,[a.createTextVNode("\u6761")])]):null}}};const Zi=5;var xm=()=>{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 b=[];if(e.totalPageNum<=Zi+2){for(let k=2;k<=e.totalPageNum-1;k++)b.push(k);return b}const M=Math.floor(Zi/2);e.totalPageNum>Zi&&(l.value=t.value-M>2,o.value=t.value+M<e.totalPageNum-1);const L=Math.min(e.totalPageNum-Zi,Math.max(2,t.value-M));for(let k=L;k<L+Zi;k++)b.push(k);return b});a.watch(()=>e.modelValue,b=>{a.nextTick(()=>{b>=1&&b<=e.totalPageNum?t.value=b:b<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,b=>{t.value>b&&(t.value=b)})});const f=()=>{n.value||(t.value=t.value-1)},d=()=>{i.value||(t.value=t.value+1)},g=b=>{b!==t.value&&(t.value=b)},m=()=>{t.value=Math.max(1,t.value-Zi)},C=()=>{t.value=Math.min(e.totalPageNum,t.value+Zi)};return{current:t,render:({isFirst:b,isLast:M})=>a.createVNode("div",{class:{"bk-pagination-list":!0,"is-first":b,"is-last":M}},[a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":n.value},onClick:f},[e.prevText||a.createVNode(Ai,null,null)]),a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===1},key:"1",onClick:()=>g(1)},[a.createTextVNode("1")]),l.value&&a.createVNode("div",{key:"pre-batch",class:"bk-pagination-list-pre-batch",onClick:m},[a.createVNode(as,null,null)]),c.value.map(L=>a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===L},key:L,onClick:()=>g(L)},[L])),o.value&&a.createVNode("div",{key:"next-batch",class:"bk-pagination-list-next-batch",onClick:C},[a.createVNode(as,null,null)]),e.totalPageNum>1&&a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>g(e.totalPageNum)},[e.totalPageNum]),a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":i.value},onClick:d},[e.nextText||a.createVNode(Sn,null,null)])])}},Sm=()=>{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 f=a.computed(()=>{const k=[];for(let N=1;N<=e.totalPageNum;N++)k.push(N);return k});a.watch(()=>e.modelValue,k=>{a.nextTick(()=>{k>=1&&k<=e.totalPageNum?i.value=k:k<1?i.value=1:i.value=e.totalPageNum,c=i.value})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,k=>{i.value>k&&(i.value=k)})});const d=()=>{l.value||(i.value=i.value-1)},g=()=>{o.value||(i.value=i.value+1)},m=()=>{n.value=!0},C=()=>{n.value=!1,t.value.textContent=`${c}`,c!==i.value&&(i.value=c)},I=k=>{const N=k.target,v=Number(N.textContent);!v||v<1||v>e.totalPageNum||v===i.value||(c=v)},b=k=>{["Enter","NumpadEnter"].includes(k.code)&&(k.preventDefault(),C())},M=k=>{c=k,C()};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:d},[a.createVNode(go,null,null)]),a.createVNode(Bi,{theme:"light",trigger:"click",arrow:!1,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:C,onInput:I,onKeydown:b},[i.value]),a.createVNode("span",null,[a.createTextVNode("/")]),a.createVNode("span",{class:"bk-pagination-small-list-total"},[e.totalPageNum])]),content:()=>a.createVNode("div",{class:"bk-pagination-picker-list"},[f.value.map(k=>a.createVNode("div",{class:{item:!0,"is-actived":k===i.value},key:k,onClick:()=>M(k)},[k]))])}),a.createVNode("div",{class:{"bk-pagination-btn-next":!0,"is-disabled":o.value},onClick:g},[a.createVNode(ra,null,null)])])}},Dm=()=>({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 jm={modelValue:h.number.def(1),count:h.number.def(0).isRequired,limit:h.number.def(10),limitList:h.arrayOf(Number).def([10,20,50,100]),showLimit:h.bool.def(!0),type:h.oneOf(["default","compact"]).def("default"),location:h.oneOf(["left","right"]).def("right"),align:h.oneOf(["left","center","right"]).def("left"),size:h.size(),small:h.bool.def(!1),showTotalCount:h.bool.def(!0),prevText:h.string,nextText:h.string,disabled:h.bool.def(!1),layout:h.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 zm=a.defineComponent({name:"Pagination",props:jm,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const n=a.ref(0),{count:i,limit:l}=a.toRefs(e),o=Dm(),{current:c,render:f}=xm(),{current:d,render:g}=Sm(),{limit:m,render:C}=Tm();return a.watch([i,m,l],([I,b])=>{const M=Math.ceil(I/b);n.value=M<1?1:M},{immediate:!0}),a.watch(c,I=>{t.emit("update:modelValue",I),t.emit("change",I)}),a.watch(d,I=>{t.emit("update:modelValue",I),t.emit("change",I)}),a.watch(m,I=>{t.emit("limitChange",I)}),{totalPageNum:n,renderTotal:o,renderList:f,renderLimit:C,renderSmallList:g}},render(){const e=ke({"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 Uo=Ze(zm);var $o=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)])}}),Pm=a.defineComponent({name:"BodyEmpty",props:{list:h.array.def([]),filterList:h.array.def([]),emptyText:h.string.def("\u6682\u65E0\u6570\u636E")},emits:["change"],setup(e,{slots:t}){const n=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode(hs,{scene:"part",type:n.value},{default:()=>{var i,l;return[(l=(i=t.default)==null?void 0:i.call(t))!=null?l:e.emptyText]}})}});const 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)},Xo=e=>/^\d+$/.test(`${e}`)?[parseInt(`${e}`,10)]:[],Em=e=>_0(e,"auto"),_0=(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},Om=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>Z0.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},ma=(e,t=["resizeWidth","calcWidth","width"])=>{var n,i;return(i=(n=e[t[0]])!=null?n:e[t[1]])!=null?i:e[t[2]]},Ko=(e,t,n=20,i=0)=>{const{width:l}=e.getBoundingClientRect()||{},o=l-i;let c=o;const f=[],d=(m,C)=>{const{minWidth:I=void 0}=m;if(I===void 0)return C;let b=C;return/^\d+\.?\d*$/.test(`${I}`)&&(b=Number(I)),/^\d+\.?\d*%$/.test(`${I}`)&&(b=Number(I)*o/100),/^\d+\.?\d*px$/i.test(`${I}`)&&(b=Number(`${I}`.replace(/px/i,""))),b},g=(m,C,I=!0)=>{const b=d(m,C),M=C<b?b:C;Object.assign(m,{calcWidth:M}),I&&(c=c-M,c<0&&(c=0))};if(t.forEach((m,C)=>{if(!m.isHidden){const b=String(ma(m,["resizeWidth","width"]));let M=!0;if(/^\d+\.?\d*(px)?$/.test(b)){const L=Number(b.replace("px",""));g(m,L),M=!1}if(/^\d+\.?\d*%$/.test(b)){let L=n;if(c>0){const k=Number(b.replace("%",""));L=c*k/100}g(m,L),M=!1}M&&f.push(C)}}),f.length>0){let m=n;c>0&&(m=c/f.length,f.forEach(C=>g(t[C],m,!1)))}},Jm=(e,t,n=60,i=!1)=>{const l=rn.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)}}},qo=e=>{const{showHead:t,headHeight:n,thead:i={}}=e;return Object.assign({},{isShow:t,height:n},H({},i))},ec=(e,t,n)=>n.type==="index"?e[kt.ROW_INDEX]+1:rn.exports.get(e,t),pa=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?pa(Reflect.apply(e,globalThis,t),t):[],Am=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===kt.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]):zi.v4(),Qm=(e,t,n=0)=>{if(e){const i=e.querySelector(t);if(i)return i.offsetHeight>e.offsetHeight-n}return!1};function Vm(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var Rm=a.defineComponent({name:"HeadFilter",props:{column:h.any.def({}),height:h.number.def($n)},emits:["change"],setup(e,{emit:t}){const{column:n}=e,i=a.reactive({isOpen:!1,checked:[]}),l=a.computed(()=>ke({[Be("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:i.checked.length,opened:i.isOpen})),o=ke({[Be("table-head-filter")]:!0}),c=I=>{i.isOpen=I},f=`light ${Be("table-head-filter")}`,d=a.computed(()=>{const{list:I=[]}=n.filter;return I.map(b=>Ne(H({},b),{checked:i.checked.includes(b.value)}))}),g=typeof n.filter.filterFn=="function"?(I,b,M,L)=>n.filter.filterFn(I,b,e.column,M,L):(I,b)=>I.length?I.includes(ec(b,It(n,"field",[n,b]),n)):!0,m=()=>{if(e.column.filter==="custom"){t("change",[...i.checked],null),i.isOpen=!1;return}t("change",[...i.checked],g),i.isOpen=!1},C=()=>{i.checked.length&&(i.checked.splice(0,i.checked.length),i.isOpen=!1,a.nextTick(()=>t("change",i.checked,g)))};return()=>a.createVNode(ha,a.mergeProps({trigger:"click",isShow:i.isOpen,placement:"bottom-end",arrow:!1,offset:0},{theme:f},{onAfterShow:()=>c(!0),onAfterHidden:()=>c(!1)}),{default:()=>a.createVNode(ql,{class:l.value},null),content:()=>{let I;return a.createVNode("div",{class:o},[a.createVNode(No,{class:"content-list",modelValue:i.checked,"onUpdate:modelValue":b=>i.checked=b},Vm(I=d.value.map(b=>a.createVNode("div",{class:"list-item"},[a.createVNode(Ri,{label:b.value},{default:()=>[b.text]})])))?I:{default:()=>[I]}),a.createVNode("div",{class:"content-footer"},[a.createVNode("span",{class:"btn-filter-save",onClick:m},[a.createTextVNode("\u786E\u5B9A")]),a.createVNode("span",{class:"btn-filter-split"},null),a.createVNode("span",{class:["btn-filter-reset",i.checked.length?"":"disable"],onClick:C},[a.createTextVNode("\u91CD\u7F6E")])])])}})}}),bi=(e=>(e.ASC="asc",e.DESC="desc",e.NULL="null",e))(bi||{}),Wm=a.defineComponent({name:"HeadSort",props:{column:h.any.def({})},emits:["change"],setup(e,{emit:t}){const n=a.ref(""),i=(l,o)=>{var C,I;if(l.stopImmediatePropagation(),l.stopPropagation(),l.preventDefault(),n.value===o?n.value=bi.NULL:n.value=o,e.column.sort==="custom"){t("change",null,o);return}const c=e.column.field,f=b=>ec(b,c,e.column),d=(b,M)=>{const L=f(b),k=f(M);return typeof L=="number"&&typeof k=="number"?L-k:String.prototype.localeCompare.call(L,k)},g=typeof((C=e.column.sort)==null?void 0:C.sortFn)=="function"?(I=e.column.sort)==null?void 0:I.sortFn:d,m=n.value===bi.NULL?()=>!0:(b,M)=>g(b,M)*(o===bi.DESC?-1:1);t("change",m,o)};return()=>a.createVNode("span",{class:Be("head-cell-sort")},[a.createVNode(Kl,{class:["sort-action","sort-asc",n.value===bi.ASC?"active":""],onClick:l=>i(l,bi.ASC)},null),a.createVNode(es,{class:["sort-action","sort-desc",n.value===bi.DESC?"active":""],onClick:l=>i(l,bi.DESC)},null)])}});class Bm{constructor(t,n){Br(this,"props",null);Br(this,"ctx",null);this.props=t,this.ctx=n}}function U0(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var Hm=a.defineComponent({name:"Settings",props:{settings:h.oneOfType([h.shape({fields:h.arrayOf(h.shape({label:h.string,field:h.string,disabled:h.bool})),checked:h.arrayOf(h.string),limit:h.number.def(0),size:h.size(["small","medium","large"]).def("small"),sizeList:h.shape([])}),h.bool]).def(!1),columns:h.array.def([]),rowHeight:h.number.def($n)},emits:["change"],setup(e,{emit:t}){const n=wm,i=a.ref(!1),l=a.ref(!1),o=typeof e.settings=="boolean"?a.ref({fields:e.columns.map(P=>Ne(H({},P),{field:P.field||P.type})),checked:[],limit:0,size:"small",sizeList:n}):a.ref(e.settings),c=a.ref(o.value.size||"small"),f=a.ref(e.rowHeight),d=a.ref(o.value.checked),m=`light ${Be("table-settings")}`,C={checkAll:i.value,activeSize:c.value,activeHeight:f.value},I=()=>{t("change",{checked:d.value,size:c.value,height:f.value}),l.value=!1},b=()=>{i.value=C.checkAll,c.value=C.activeSize,f.value=C.activeHeight,d.value=o.value.checked||[],l.value=!1},M=()=>{Object.assign(C,{checkAll:i.value,activeSize:c.value,activeHeight:f.value}),l.value=!0},L=P=>{P.stopImmediatePropagation(),P.stopPropagation(),P.preventDefault(),i.value=!i.value;const E=o.value.fields||e.columns||[];if(i.value)d.value=E.map((_,G)=>It(_,"field",[_,G]));else{const _=E.filter(G=>G.disabled).map((G,se)=>It(G,"field",[G,se]));d.value.splice(0,d.value.length,..._)}},k=a.computed(()=>{var P;return((P=o.value.limit)!=null?P:0)>0}),N=o.value.sizeList||n,v=a.computed(()=>k.value&&(o.value.limit?o.value.limit:0)<=d.value.length),p=(P,E)=>P.disabled||v.value&&!d.value.includes(It(P,"field",[P,E])),w=P=>{c.value=P.value,f.value=P.height},x=P=>({"line-size":!0,"is-medium":c.value==="medium",active:P.value===c.value}),S={marginRight:"12px"},Q=()=>N.map(P=>a.createVNode("span",{class:x(P),onClick:()=>w(P)},[P.label])),z=a.computed(()=>o.value.fields||e.columns||[]),O=a.computed(()=>d.value.length>0&&!z.value.every((P,E)=>d.value.includes(It(P,"field",[P,E]))));return a.watch(()=>[d.value],()=>{d.value.length||(i.value=!1),d.value.length&&z.value.every((P,E)=>d.value.includes(It(P,"field",[P,E])))&&(i.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{d.value.splice(0,d.value.length,...o.value.checked)},{immediate:!0,deep:!0}),()=>e.settings?a.createVNode(ha,a.mergeProps({trigger:"manual",isShow:l.value,placement:"bottom-end",arrow:!1},{theme:m}),{default:()=>a.createVNode("span",{class:"table-head-settings"},[a.createVNode(ro,{style:"color: #c4c6cc;",onClick:M},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(ns,{class:"icon-close-action",onClick:b},null)]),a.createVNode("div",{class:"setting-body"},[a.createVNode("div",{class:"setting-body-title"},[a.createVNode("div",null,[a.createVNode("span",{class:"field-setting-label"},[a.createTextVNode("\u5B57\u6BB5\u663E\u793A\u8BBE\u7F6E")]),k.value?a.createVNode("span",{class:"limit"},[a.createTextVNode("\uFF08\u6700\u591A"),o.value.limit,a.createTextVNode("\u9879\uFF09")]):""]),k.value?"":a.createVNode("span",{class:"check-all",onClick:L},[a.createVNode(Ri,{label:"\u5168\u9009",indeterminate:Boolean(O.value),modelValue:d.value.length>0},{default:()=>[a.createTextVNode("\u5168\u9009")]})])]),a.createVNode(No,{class:"setting-body-fields",modelValue:d.value,"onUpdate:modelValue":E=>d.value=E},U0(P=z.value.map((E,_)=>{let G;return a.createVNode("div",{class:"field-item"},[a.createVNode(Ri,{label:It(E,"field",[E,_]),checked:d.value.includes(It(E,"field",[E,_])),disabled:p(E,_)},U0(G=It(E,"label",[E,_]))?G:{default:()=>[G]})])}))?P:{default:()=>[P]}),a.createVNode("div",{class:"setting-body-line-height"},[a.createTextVNode("\u8868\u683C\u884C\u9AD8\uFF1A"),Q()])]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Qt,{theme:"primary",style:S,onClick:I},{default:()=>[a.createTextVNode("\u786E\u5B9A")]}),a.createVNode(Qt,{style:S,onClick:b},{default:()=>[a.createTextVNode("\u53D6\u6D88")]})])])}}):""}}),tc=(e,t,n)=>{const i=a.computed(()=>e.pagination&&e.data.length?$n:0),l=C=>({column_fixed:!!C.fixed,column_fixed_left:C.fixed!=="right",column_fixed_right:C.fixed==="right"}),o=C=>C.fixed==="right"?"right":"left",c={left:(C=!0)=>t.filter(I=>I.fixed&&I.fixed!=="right").reduce((I,b,M)=>C&&M===0?I:I+ma(b),0),right:(C=!0)=>t.filter(I=>I.fixed==="right").reduce((I,b,M)=>C&&M===0?I:I+ma(b),n?_o:0)},f=c.right,d=()=>{const C=(M,L)=>{if(!M.fixed)return{};const k=o(M),N=k==="right"?-1:1,v=`${L[k]}px`;return L[k]=L[k]+ma(M)*N,{[k]:v}},I=f(!0);return{fixedoffset:{left:0,right:I},resolveFixedColumnStyle:C}},g=()=>{const C=b=>({width:`${c[b](!1)}px`,bottom:`${i.value}px`}),I={left:!1,right:!1};return t.filter(b=>!b.isHidden&&b.fixed).map(b=>{const M=o(b),L=I[M];return I[M]=!0,L?"":a.createVNode("div",{class:l(b),style:C(M)},null)})},m=Be("table-fixed");return{renderFixedColumns:g,fixedWrapperClass:m,getFixedColumnStyleResolve:d}};class Gm{constructor(t,n,i,l){Br(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])});Br(this,"getColumnClass",(t,n)=>({[`${this.uuid}-column-${n}`]:!0,column_fixed:!!t.fixed,column_fixed_left:!!t.fixed,column_fixed_right:t.fixed==="right"}));Br(this,"getHeadColumnClass",(t,n)=>Ne(H({},this.getColumnClass(t,n)),{active:this.isColActive(n)}));this.props=t,this.context=n,this.reactiveProp=i,this.colgroups=l,this.plugins=new Bm(t,n),this.uuid=zi.v4(),this.events=new Map}get propActiveCols(){return this.reactiveProp.activeColumns}renderTableHeadSchema(){const{isShow:t=!0}=qo(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(f=>{f.isHidden=!(l!=null?l:[]).includes(It(f,["field","type"],[f]))}),this.emitEvent(Un.ON_SETTING_CHANGE,[i])};return[this.props.settings?a.createVNode(Hm,{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(Pm,{filterList:t,list:this.props.data,emptyText:this.props.emptyText},null)}renderTableFooter(t){return a.createVNode(Uo,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("pageLimitChange",t)}hanlePageChange(t){Object.assign(this.props.pagination,{current:t,value:t}),this.context.emit("pageValueChange",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("column-pick",this.propActiveCols))}getSortCell(t,n){const i=(l,o)=>{this.emitEvent(Un.ON_SORT_BY_CLICK,[{sortFn:l,column:t,index:n,type:o}])};return a.createVNode(Wm,{column:t,onChange:i},null)}getFilterCell(t,n){const i=(l,o)=>{const c=(f,d)=>o(l,f,d);this.emitEvent(Un.ON_FILTER_CLICK,[{filterFn:c,checked:l,column:t,index:n}])};return a.createVNode(Rm,{column:t,height:this.props.headHeight,onChange:i},null)}renderHeader(){const t=qo(this.props),{cellFn:n}=t,i={"--row-height":`${It(t,"height",["thead"])}px`},l=(g,m)=>{const C=[];return g.sort&&C.push(this.getSortCell(g,m)),g.filter&&C.push(this.getFilterCell(g,m)),typeof n=="function"?(C.unshift(n(g,m)),C):(C.unshift(It(g,"label",[g,m])),C)},o=g=>Array.from(g.listeners.keys()).reduce((m,C)=>{const I=C.split("_").slice(-1)[0];return Object.assign(m,{[I]:b=>{g.listeners.get(C).forEach(M=>Reflect.apply(M,this,[b,g,this]))}})},{}),{getFixedColumnStyleResolve:c}=tc(this.props,this.colgroups),{resolveFixedColumnStyle:f,fixedoffset:d}=c();return a.createVNode("thead",{style:i},[a.createVNode($o,null,{default:()=>[a.createVNode("tr",null,[this.filterColgroups.map((g,m)=>a.createVNode("th",a.mergeProps({colspan:1,rowspan:1,class:this.getHeadColumnClass(g,m),style:f(g,d),onClick:()=>this.handleColumnHeadClick(m)},o(g)),[a.createVNode("div",{class:"cell"},[l(g,m)])]))])]})])}renderTBody(t){const{getFixedColumnStyleResolve:n}=tc(this.props,this.colgroups);return a.createVNode("tbody",null,[t.map((i,l)=>{const o=[...pa(this.props.rowStyle,[i,l,this]),{"--row-height":`${this.getRowHeight(i,l)}px`}],c=[...pa(this.props.rowClass,[i,l,this])],{resolveFixedColumnStyle:f,fixedoffset:d}=n(),g=`${this.uuid}-${i[kt.ROW_UID]}`;return[a.createVNode($o,{key:g},{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,C)=>{const I=[f(m,d),...pa(this.props.cellStyle,[m,C,i,l,this])],b=[this.getColumnClass(m,C),...pa(this.props.cellClass,[m,C,i,l,this]),{"expand-row":i[kt.ROW_EXPAND]}],M={cell:!0,"expand-cell":m.type==="expand"},L=`__CELL_${l}_${C}`;return a.createVNode("td",{class:b,style:I,key:L,colspan:1,rowspan:1},[a.createVNode("div",{class:M},[this.renderCell(i,m,l,t)])])})])]}),this.renderExpandRow(i,c)]})])}renderExpandRow(t,n){if(!!t[kt.ROW_EXPAND]){const l=[...n,{row_expend:!0}],o=`${this.uuid}-${t[kt.ROW_UID]}_expand`;return a.createVNode($o,{key:o},{default:()=>{var c,f,d;return[a.createVNode("tr",{class:l},[a.createVNode("td",{colspan:this.filterColgroups.length,rowspan:1},[(d=(f=(c=this.context.slots).expandRow)==null?void 0:f.call(c,t))!=null?d:a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}}handleRowClick(t,n,i,l){this.context.emit("rowClick",t,n,i,l,this)}handleRowDblClick(t,n,i,l){this.context.emit("rowDblClick",t,n,i,l,this)}getExpandCell(t){return!!t[kt.ROW_EXPAND]?a.createVNode(is,null,null):a.createVNode(ra,null,null)}handleRowExpandClick(t,n,i,l,o){this.emitEvent(Un.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 f,d,g;return typeof n.render=="function"?n.render(null,t,i,l):(g=(d=(f=this.context.slots).expandCell)==null?void 0:d.call(f,{row:t,column:n,index:i,rows:l}))!=null?g:this.getExpandCell(t)};return a.createVNode("span",{class:"expand-btn-action",onClick:f=>this.handleRowExpandClick(t,n,i,l,f)},[c()])}const o=ec(t,It(n,"field",[n,t]),n);if(typeof n.render=="function"){const c=this.props.data[t[kt.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=ke({active:this.isColActive(n)}),l=`${Em(ma(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 $0=e=>e.columnPick!=="disabled"?e.columnPick==="multi"?Array.isArray(e.activeColumn)?e.activeColumn:Xo(e.activeColumn):Array.isArray(e.activeColumn)?Xo(e.activeColumn[0]):Xo(e.activeColumn):[];var Zm=e=>{let t=a.reactive([]);if(e.columnPick==="disabled")return{activeColumns:t};const n=a.reactive($0(e)),i=()=>(e.columns||[]).map((l,o)=>({index:o,active:n.some(c=>c===o),_column:l}));return a.watchEffect(()=>{t=i();const l=$0(e);t.forEach((o,c)=>{Object.assign(o,{active:l.some(f=>f===c)})})}),{activeColumns:t}},Ym=(e,t=!0)=>{const n="HeadColumnResize";let i;(function(p){p.MOUSE_MOVE="onMousemove",p.MOUSE_OUT="onMouseout",p.MOUSE_DOWN="onMousedown"})(i||(i={}));let l=!1,o=!1,c=!1,f=0,d=null,g=0;const m=a.ref(-1e3),C=p=>{var Q;o=!1,c=!1;const w=document.body.style;w.cursor="";const x=p.clientX-f;d.resizeWidth=((Q=d.resizeWidth)!=null?Q:d.calcWidth)+x,document.removeEventListener("mouseup",C),document.removeEventListener("mousemove",b),f=0,m.value=-1e3,d=null,p.target.closest("table").querySelectorAll("th").forEach(z=>z.style.setProperty("user-select","inherit"))},I=p=>rn.exports.throttle(()=>{m.value=p.clientX-f+g},60),b=p=>{document.body.style.setProperty("cursor",""),I(p)()},M={[i.MOUSE_DOWN]:(p,w)=>{if(!l)return;o=!0,document.body.style.setProperty("cursor","col-resize"),d=w,f=p.clientX;const S=p.target.closest("table");g=f-S.getBoundingClientRect().left,document.addEventListener("mouseup",C),document.addEventListener("mousemove",b)},[i.MOUSE_MOVE]:(p,w)=>{o&&!c&&(c=!0);const x=p.target.closest("th");if(c&&x.style.setProperty("user-select","none"),!c){if(!x)return;const S=x.getBoundingClientRect();S.width>12&&S.right-p.pageX<8?(l=!0,x.style.setProperty("cursor","col-resize")):(x.style.setProperty("cursor",""),l=!1)}},[i.MOUSE_OUT]:(p,w)=>{const x=p.target;c||x.style.setProperty("cursor","")}},L=p=>`${n}_${p}`,k=()=>{e.forEach(p=>{p.resizable!==!1&&Object.keys(M).forEach(w=>{const x=L(w);p.listeners.has(x)||p.listeners.set(x,[]),p.listeners.get(x).push(M[w])})})},N=()=>{e.forEach(p=>{Object.keys(M).forEach(w=>{const x=L(w);if(p.listeners.has(x)){const S=p.listeners.get(x);S.splice(0,S.length)}})})};t&&k();const v=a.computed(()=>({position:"absolute",top:0,bottom:0,left:0,width:"1px","background-color":"#ebeef5"}));return{registerResizeEvent:k,resetResizeEvents:N,dragOffsetX:m,dragOffsetXStyle:v}};const Fm=(e,t,n,i)=>{const l=a.ref(200),o=a.ref(void 0),c=a.computed(()=>e.pagination&&e.data.length),f=a.computed(()=>ke({[Be("table")]:!0,"has-footer":c.value,"has-scroll-y":o.value||e.virtualEnabled},Om(e.border))),d=ke({[Be("table-head")]:!0,"has-settings":!!e.settings}),g=qo(e),m=a.computed(()=>({"--row-height":`${It(g,"height",["thead"])}px`,"--scroll-head-left":`-${n.scrollTranslateX}px`,"--scroll-left":`${n.scrollTranslateX}px`})),C={[Be("table-body")]:!0},I=a.computed(()=>ke({[Be("table-footer")]:!0,["is-hidden"]:!e.pagination||!e.data.length})),b=()=>{if(e.columns.every(S=>/^\d+\.?\d*(px)?$/ig.test(`${S.width}`))){const S=e.columns.reduce((z,O)=>z+Number(`${O.width}`.replace(/px/ig,"")),0),Q=o.value?_o:0;return`${S+Q}px`}return"100%"},M=a.computed(()=>({minHeight:_0(e.minHeight,"auto"),width:b(),maxWidth:"100%"})),L=(S,Q)=>{const z=String(S);if(/^\d+\.?\d*$/.test(z))return Number(z);if(/^\d+\.?\d*px$/ig.test(z))return Number(z.replace("px",""));if(/^\d+\.?\d*%$/ig.test(z)){const O=Number(z.replace("%",""));return Q*O/100}return Q},k=a.reactive({}),N=()=>e.showHead?L(e.headHeight,$n):0,v=()=>{const S=L(e.height,l.value),Q=N(),z=L(e.minHeight,l.value),O=e.pagination&&e.data.length?$n:0,P=S-Q-O,E=e.height!=="auto"?`${P}px`:!1,_=z-Q-O;Object.assign(k,{display:i!=null&&i.length?"block":!1,"min-height":`${_}px`,height:E})};a.onMounted(()=>{p(t==null?void 0:t.value)});const p=S=>{if(S){const{height:Q}=S.parentElement.getBoundingClientRect();l.value=Q,v(),w(S)}},w=S=>{const Q=e.virtualEnabled?`.${Be("virtual-section")}`:`.${Be("table-body-content")}`,z=S.querySelector(".bk-table-body");o.value=Qm(z,Q,0)};return{tableClass:f,headClass:d,contentClass:C,footerClass:I,wrapperStyle:M,contentStyle:k,headStyle:m,resetTableHeight:p,updateBorderClass:w,getColumnsWidthOffsetWidth:()=>{let S=0;return o.value&&(S=S+_o),e.border.includes(xs.OUTER)&&!e.border.includes(xs.NONE)&&(S=S+2),S},hasFooter:c,hasScrollY:o}},_m=e=>{var k,N;const t=a.reactive([]),n=()=>{t.splice(0,t.length,...(e.columns||[]).map(v=>Ne(H({},v),{calcWidth:null,resizeWidth:null,listeners:new Map})))},{dragOffsetXStyle:i,dragOffsetX:l,resetResizeEvents:o,registerResizeEvent:c}=Ym(t,!0),{activeColumns:f}=Zm(e);a.watch(()=>e.columns,()=>{n(),o(),c()},{immediate:!0,deep:!0});const d=a.reactive({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:f,settings:e.settings,setting:{size:(k=e.settings)==null?void 0:k.size,height:Ss[(N=e.settings)==null?void 0:N.size]}}),g=v=>{var p;return d.rowActions.has(v)?(p=d.rowActions.get(v))==null?void 0:p.isExpand:!1},m=(v,p=void 0)=>{var S;const w=v[kt.ROW_UID],x=typeof p=="boolean"?p:!g(w);d.rowActions.set(w,Object.assign({},(S=d.rowActions.get(w))!=null?S:{},{isExpand:x})),b()},C=a.reactive([]),I=(v=!1)=>{C.splice(0,C.length,...e.data.map((p,w)=>{const x=Am(p,e,w);return Ne(H({},p),{[kt.ROW_INDEX]:w,[kt.ROW_UID]:x,[kt.ROW_EXPAND]:v?g(x):!1})}))},b=()=>{C.forEach(v=>{Object.assign(v,{[kt.ROW_EXPAND]:g(v[kt.ROW_UID])})})},{renderFixedColumns:M,fixedWrapperClass:L}=tc(e,t);return{colgroups:t,dragOffsetXStyle:i,dragOffsetX:l,reactiveSchema:d,indexData:C,fixedWrapperClass:L,initIndexData:I,updateIndexData:b,renderFixedColumns:M,setRowExpand:m,updateColGroups:n}};var Um=a.defineComponent({name:"Table",props:Lm,emits:Im,setup(e,t){let n=null,i=null,l=null;const o=a.ref(),c=a.ref(),{colgroups:f,dragOffsetXStyle:d,dragOffsetX:g,reactiveSchema:m,indexData:C,renderFixedColumns:I,setRowExpand:b,initIndexData:M,fixedWrapperClass:L}=_m(e),{pageData:k,localPagination:N,resolvePageData:v,watchEffectFn:p}=vm(e,C),{tableClass:w,headClass:x,contentClass:S,footerClass:Q,wrapperStyle:z,contentStyle:O,headStyle:P,updateBorderClass:E,resetTableHeight:_,getColumnsWidthOffsetWidth:G,hasFooter:se}=Fm(e,o,m,k),ce=new Gm(e,t,m,f);a.watch(()=>[e.data,e.pagination],()=>{M(e.reserveExpand),p(i,n),a.nextTick(()=>{_(o.value),E(o.value)})},{immediate:!0,deep:!0}),a.watchEffect(()=>{if((o==null?void 0:o.value)instanceof HTMLElement){const ne=G();Ko(o.value,f,20,ne)}}),ce.on(Un.ON_SORT_BY_CLICK,ne=>{var he,F;const{sortFn:le,column:ge,index:U,type:fe}=ne;typeof le=="function"&&(n=le,v(i,n),(F=(he=c.value)==null?void 0:he.reset)==null||F.call(he)),t.emit(Ir.COLUMN_SORT,{column:ge,index:U,type:fe})}).on(Un.ON_FILTER_CLICK,ne=>{var he,F;const{filterFn:le,checked:ge,column:U,index:fe}=ne;typeof le=="function"&&(i=le,v(i,n),(F=(he=c.value)==null?void 0:he.reset)==null||F.call(he)),t.emit(Ir.COLUMN_FILTER,{checked:ge,column:U,index:fe})}).on(Un.ON_SETTING_CHANGE,ne=>{const{checked:le=[],size:ge,height:U}=ne;a.nextTick(()=>{var he,F;E(o.value);const fe=G();le.length&&Ko(o.value,f,20,fe),(F=(he=c.value)==null?void 0:he.reset)==null||F.call(he),t.emit(Ir.SETTING_CHANGE,{checked:le,size:ge,height:U})})}).on(Un.ON_ROW_EXPAND_CLICK,ne=>{const{row:le,column:ge,index:U,rows:fe,e:he}=ne;t.emit(Ir.ROW_EXPAND_CLICK,{row:le,column:ge,index:U,rows:fe,e:he}),b(le,!le[kt.ROW_EXPAND])});const de=ne=>{var ie;const le=(ie=m.pos.bottom)!=null?ie:0,ge=ne[1],{translateX:U,translateY:fe,pos:he={}}=ge;m.scrollTranslateY=fe,m.scrollTranslateX=U,m.pos=he;const{bottom:F}=he;F<=2&&le>F&&i4(60,()=>{t.emit(Ir.SCROLL_BOTTOM,Ne(H({},he),{translateX:U,translateY:fe}))},!0)()};a.onMounted(()=>{l=Jm(o.value,()=>{(e.height==="100%"||e.height==="auto")&&_(o.value),E(o.value);const ne=G();Ko(o.value,f,20,ne)},60,!0),l.start()}),a.onBeforeUnmount(()=>{l.stop(),l=null,ce.destroy()}),t.expose({setRowExpand:b});const pe=a.computed(()=>Ne(H({},S),{"__is-empty":!k.length})),K={[Be("table-body-content")]:!0,"with-virtual-render":e.virtualEnabled},Z={column_drag_line:!0,"offset-x":!0},J=a.computed(()=>Ne(H({},d.value),{left:`${g.value-m.scrollTranslateX}px`})),V={"scroll-loading":!0,_bottom:!0},{renderScrollLoading:X}=Nm(e,t),Y=e.virtualEnabled?{}:{scrollXName:"",scrollYName:""};return()=>a.createVNode("div",{class:w.value,style:z.value,ref:o},[a.createVNode("div",{class:x,style:P.value},[ce.renderTableHeadSchema()]),a.createVNode(Ts,a.mergeProps({ref:c,lineHeight:ce.getRowHeight,class:pe.value,style:O,list:k},Y,{contentClassName:K,onContentScroll:de,throttleDelay:0,scrollEvent:!0,enabled:e.virtualEnabled}),{default:ne=>ce.renderTableBodySchema(ne.data||e.data)}),a.createVNode("div",{class:L},[I(),a.createVNode("div",{class:Z,style:J.value},null),a.createVNode("div",{class:V},[X()])]),a.createVNode("div",{class:Q.value},[se.value&&ce.renderTableFooter(N.value)])])}});const X0=Ze(Um),wr=12;function $m(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 Xm(e){const{useGroup:t,saveKey:n,displayKey:i,list:l}=a.toRefs(e),o=a.reactive({flatList:[]});return a.watch([t,n,i,l],()=>{o.flatList=[];let c=l.value;t.value&&(c=l.value.reduce((f,d)=>{let g=[];return d.children&&(g=d.children.map(m=>H({group:{groupId:d[n.value],groupName:d[i.value]}},m))),f.concat(g)},[])),o.flatList=[...c]},{immediate:!0,deep:!0}),o.flatList}const K0=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 q0=a.defineComponent({name:"ListTagRender",props:{node:h.object,searchKey:h.oneOfType([h.string,h.arrayOf(h.string)]),displayKey:h.string,searchKeyword:h.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 Km=()=>({modelValue:h.arrayOf(h.string).def([]),placeholder:h.string.def("\u8BF7\u8F93\u5165\u5E76\u6309 Enter \u7ED3\u675F"),list:h.arrayOf(h.object).def([]),disabled:h.bool.def(!1),tooltipKey:h.string.def(""),saveKey:h.string.def("id"),displayKey:h.string.def("name"),hasDeleteIcon:h.bool.def(!1),clearable:h.bool.def(!0),trigger:h.commonType(["focus","search"]).def("search"),searchKey:h.oneOfType([h.string,h.arrayOf(h.string)]).def("name"),useGroup:h.bool.def(!1),allowCreate:h.bool.def(!1),maxData:h.number.def(-1),maxResult:h.number.def(10),contentMaxHeight:h.number.def(300),contentWidth:h.number.def(190),separator:h.string.def(""),allowNextFocus:h.bool.def(!0),allowAutoMatch:h.bool.def(!1),showClearOnlyHover:h.bool.def(!1),leftSpace:h.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}});var qm=a.defineComponent({name:"TagRender",props:{node:h.object,displayKey:h.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]])])}}),ep=a.defineComponent({name:"TagInput",directives:{bkTooltips:Oo},props:Km(),emits:["update:modelValue","change","select","blur","remove","removeAll"],setup(e,{emit:t}){const n=di(),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:f,pageChange:d}=$m(o),g=a.ref(""),m=a.ref(null),C=a.ref(null),I=a.ref(null),b=a.ref(null),M=a.ref(null),L=a.ref(null),k=a.ref(null),N=a.computed(()=>!e.disabled&&e.hasDeleteIcon),v=a.computed(()=>e.maxData===1),p=a.computed(()=>P.selectedTagList.length===0&&g.value===""&&!i.isEdit),w=a.computed(()=>e.clearable&&!e.disabled&&P.selectedTagList.length!==0&&(e.showClearOnlyHover?i.isHover:!0)),x=a.computed(()=>({"bk-tag-input-trigger":!0,active:i.isEdit,disabled:e.disabled}));a.watch([()=>[...e.modelValue],()=>[...e.list]],()=>{se()}),a.watch(g,rn.exports.debounce(()=>{const te=c.curPageList.length!==0,{value:oe}=g;oe!==""&&te||oe===""&&e.trigger==="focus"&&te?l.isShow=!0:(e.trigger!=="focus"||!te)&&(l.isShow=!1)},150)),a.watch(()=>l.isShow,te=>{S(),te&&M.value&&(a.nextTick(()=>{M.value.scrollTop=0}),M.value.removeEventListener("scroll",Q),M.value.addEventListener("scroll",Q))});const S=()=>{var oe,ye;const te=v.value?0:(oe=b.value)==null?void 0:oe.offsetLeft;l.modifiers=[{name:"offset",options:{offset:[te,4]}}],(ye=L.value)==null||ye.update()},Q=()=>{if(c.isPageLoading||M.value.scrollTop===0)return;const{scrollTop:te,offsetHeight:oe,scrollHeight:ye}=M.value;if(te+oe>=ye){const Se=c.curPage+1;Se<=c.totalPage&&(c.isPageLoading=!0,setTimeout(()=>{d(Se)},500))}},z=()=>{var oe;return Array.from(((oe=I.value)==null?void 0:oe.childNodes)||[]).filter(ye=>ye.nodeType!==Node.TEXT_NODE)},O=te=>{if(!e.disabled){if(te!=null&&te.target){const{className:oe}=te.target;(oe.indexOf("bk-tag-input-trigger")>-1||oe.indexOf("tag-list")>-1)&&I.value.appendChild(b.value)}clearTimeout(k.value),v.value&&E.value.length&&(P.tagListCache=[...E.value],P.selectedTagListCache=[...P.selectedTagList],g.value=P.selectedTagListCache[0][e.saveKey],at(P.selectedTagList[0],0),V()),i.isEdit=!0,a.nextTick(()=>{var oe;(oe=m.value)==null||oe.focus(),e.trigger==="focus"&&P.localList.length!==0&&(ce(),l.isShow?S():l.isShow=!0)})}},P=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),E=a.computed(()=>P.selectedTagList.map(te=>te[e.saveKey])),_=Xm(e),G=a.computed(()=>{if(e.useGroup){const te={};return c.curPageList.forEach((oe,ye)=>{oe.__index__=ye,te[oe.group.groupId]||(te[oe.group.groupId]={id:oe.group.groupId,name:oe.group.groupName,children:[]}),te[oe.group.groupId].children.push(oe)}),Object.keys(te).map(oe=>te[oe])}return c.curPageList}),se=()=>{const{saveKey:te,modelValue:oe,displayKey:ye,allowCreate:Se,trigger:je}=e;P.selectedTagList=[],P.localList=[..._],oe.length&&(oe.forEach(Ae=>{const Fe=P.localList.find(ot=>Ae===ot[te]);Fe!==void 0?P.selectedTagList.push(Fe):Se&&!E.value.includes(Ae)&&P.selectedTagList.push({[te]:Ae,[ye]:Ae})}),v.value||(P.localList=P.localList.filter(Ae=>!oe.includes(Ae[te])))),je==="focus"&&ce()},ce=(te="")=>{const{searchKey:oe,filterCallback:ye}=e,Se=te.toLowerCase();let je=[];if(typeof ye=="function")je=ye(Se,oe,P.localList)||[];else if(Array.isArray(oe)){const Ae=oe.map(Fe=>P.localList.filter(ot=>ot[Fe].toLowerCase().indexOf(Se)!==-1));je=Array.from(new Set(Ae.flat()))}else je=P.localList.filter(Ae=>Ae[oe].toLowerCase().indexOf(Se)!==-1);f(je)},de=(te,oe)=>{const ye={"bk-selector-actived":!1,"bk-selector-selected":E.value.includes(te[e.saveKey])};return e.useGroup?ye["bk-selector-actived"]=te.__index__===i.focusItemIndex:ye["bk-selector-actived"]=oe===i.focusItemIndex,ye};a.onMounted(()=>{se()});const pe=()=>{P.tagListCache=[],P.selectedTagListCache=[],P.selectedTagList=[]},K=()=>{g.value=""},Z=()=>{if(v.value)return 0;const oe=z().findIndex(({id:ye})=>ye==="tagInputItem");return oe>=0?oe:0},J=(te,oe,ye=!1)=>{if(!oe||!te)return;let Se=oe;ye&&(Se=oe.nextElementSibling||null),oe.parentNode.insertBefore(te,Se)},V=te=>{const{maxData:oe,trigger:ye,allowCreate:Se}=e;if(oe===-1||oe>E.value.length){const{value:je}=te!=null&&te.target?te.target:g,Ae=K0(je);Ae?(ce(je),m.value.style.width=`${Ae*wr}px`):ye==="focus"&&ce()}else Y(),g.value="",l.isShow=!1;i.isEdit=!0,i.focusItemIndex=Se?-1:0},X=()=>{var te;l.width=v.value?(te=C.value)==null?void 0:te.clientWidth:e.contentWidth},Y=()=>{k.value=setTimeout(()=>{var oe;const te=g.value;if(K(),i.isEdit=!1,v.value){const[ye]=P.tagListCache;te&&te===ye&&P.selectedTagListCache.length?Ee(P.selectedTagListCache[0],"select"):ge("remove")}else if(e.allowAutoMatch&&te){const ye=c.curPageList.find(Se=>Array.isArray(e.searchKey)?e.searchKey.map(Ae=>Se[Ae]).includes(te):Se[e.searchKey]===te);ye?ne(ye,"select"):e.allowCreate&&ne(te,"custom")}l.isShow=!1,t("blur",te,E.value),(oe=n==null?void 0:n.validate)==null||oe.call(n,"blur")},200)},ne=(te,oe,ye)=>{ye==null||ye.stopPropagation(),!(!te||te.disabled)&&(v.value&&pe(),Ee(te,oe),ge("select"),K(),l.isShow=!1)},le=(te,oe,ye)=>{ye==null||ye.stopPropagation(),at(te,oe),K(),ge("remove",te),m.value.style.width=`${wr}px`},ge=(te,oe)=>{var ye;t("change",E.value),t(te,oe),t("update:modelValue",E.value),(ye=n==null?void 0:n.validate)==null||ye.call(n,"change")},U=te=>{te.stopPropagation();const oe=P.selectedTagList;P.selectedTagList=[];const ye=_.filter(Se=>oe.some(je=>je[e.saveKey]===Se[e.saveKey]));(e.allowCreate&&ye.length!==0||!e.allowCreate)&&!v.value&&P.localList.push(...ye),ge("removeAll")},fe=()=>{const te={height:M.value.clientHeight,yAxis:M.value.getBoundingClientRect().y};a.nextTick(()=>{const oe=M.value.querySelector(".bk-selector-actived");if(!oe)return;const ye={height:oe.clientHeight,yAxis:oe.getBoundingClientRect().y};ye.yAxis<te.yAxis&&(M.value.scrollTop=M.value.scrollTop-(te.yAxis-ye.yAxis));const Se=ye.yAxis+ye.height-te.yAxis;Se>te.height&&(M.value.scrollTop=M.value.scrollTop+Se-te.height)})},he=(te,oe)=>{const ye=z();J(b.value,ye[te-1]),P.selectedTagList.splice(te-1,1),O();const Se=_.some(je=>je===oe[e.saveKey]);(e.allowCreate&&Se||!e.allowCreate)&&!v.value&&P.localList.push(oe),m.value=`${wr}px`,ge("remove")},F=te=>{if(c.isPageLoading)return;let oe;const ye=te.target.value,Se=K0(ye),je=Z(),Ae=z();switch(te.code){case"ArrowUp":if(te.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),fe();break;case"ArrowDown":if(te.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),fe();break;case"ArrowLeft":if(i.isEdit=!0,!Se){if(je<1)return;J(b.value,Ae[je-1]),O()}break;case"ArrowRight":if(i.isEdit=!0,!Se){if(je===Ae.length-1)return;J(Ae[je+1],b.value),O()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&l.isShow||e.allowCreate&&i.focusItemIndex>=0&&l.isShow?ne(c.curPageList[i.focusItemIndex],"select",te):e.allowCreate&&ne(g.value,"custom",te),te.preventDefault();break;case"Backspace":je!==0&&!g.value&&(oe=P.selectedTagList[je-1],he(je,oe));break}},ie=te=>{const oe=[];return te.split(";").forEach(Se=>{if(Se.match(/^[a-zA-Z][a-zA-Z_]+/g)){const je=Se.match(/^[a-zA-Z][a-zA-Z_]+/g).join("");oe.push({[e.saveKey]:je,[e.displayKey]:je})}}),oe},Me=te=>{if(te.preventDefault(),v.value)return!1;const{maxData:oe,saveKey:ye,pasteFn:Se}=e,je=te.clipboardData.getData("text");let Fe=(Se?Se(je):ie(je)).map(ot=>ot[ye]);if(Fe.length){const ot=z(),jt=Z(),nt=P.localList.map(qe=>qe[ye]);if(Fe=Fe.filter(qe=>(qe==null?void 0:qe.trim())&&!E.value.includes(qe)&&nt.includes(qe)),oe!==-1){const qe=P.selectedTagList.length;if(qe<oe){const _e=oe-qe;Fe.length>_e&&(Fe=[...Fe.slice(0,_e)])}else Fe=[]}const Mn=P.localList.filter(qe=>Fe.includes(qe[ye]));Fe.length&&(P.selectedTagList.splice(jt,0,...Mn),J(b.value,ot[jt]),m.value.style.width=`${wr}px`,P.localList=P.localList.filter(qe=>!Fe.includes(qe[ye])),ge("select"),O())}},we=te=>{e.disabled||(J(b.value,te.currentTarget,!0),m.value.style.width=`${wr}px`,l.isShow&&S())},Ee=(te,oe)=>{if(P.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:ye,saveKey:Se,displayKey:je,createTagValidator:Ae}=e,Fe=Z();let ot=1,jt=!1,nt;const Mn=_e=>typeof Ae=="function"?Ae(_e):!0,qe=_e=>P.localList.find(Bt=>Bt[Se]===_e);if(oe==="custom")if(ye){let _e=te.split(ye);_e=_e.filter(Ct=>(Ct==null?void 0:Ct.trim())&&!E.value.includes(Ct)&&Mn(Ct));const Bt=_e.map(Ct=>qe(Ct)||{[Se]:Ct,[je]:Ct});_e.length&&(P.selectedTagList.splice(Fe,0,...Bt),ot=Bt.length,jt=!0)}else{const _e=typeof te=="object";if(nt=_e?te[Se]:te.trim(),nt=nt.replace(/\s+/g,""),nt!==void 0&&!E.value.includes(nt)&&Mn(nt)){const Bt=qe(nt)||(_e?te:{[Se]:nt,[je]:nt});P.selectedTagList.splice(Fe,0,Bt),jt=!0}}else te&&(nt=te[Se],nt!==void 0&&!E.value.includes(nt)&&(P.selectedTagList.splice(Fe,0,te),jt=!0));jt&&a.nextTick(()=>{for(let _e=1;_e<=ot;_e++){const Ct=z()[Fe+_e];J(Ct,b.value)}m.value.style.width=`${wr}px`,v.value||(e.allowNextFocus&&O(),P.localList=P.localList.filter(_e=>!E.value.includes(_e[Se])))})},at=(te,oe)=>{P.selectedTagList.splice(oe,1);const ye=_.some(Se=>Se===te[e.saveKey]);(e.allowCreate&&ye||!e.allowCreate)&&!v.value&&P.localList.push(te)};return Ne(H(H(H({popoverProps:l},a.toRefs(i)),a.toRefs(P)),a.toRefs(c)),{isShowPlaceholder:p,isShowClear:w,curInputValue:g,formatList:_,renderList:G,showTagClose:N,tagInputRef:m,bkTagSelectorRef:C,tagListRef:I,tagInputItemRef:b,selectorListRef:M,popoverRef:L,triggerClass:x,focusInputTrigger:O,activeClass:de,handleInput:V,handleFocus:X,handleBlur:Y,handleTagSelected:ne,handleTagRemove:le,handleClear:U,tagFocus:we,handleKeydown:F,handlePaste:Me})},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(q0,{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(q0,{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(Bi,{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(qm,{node:l,tpl:this.tagTpl,displayKey:this.displayKey},null),this.showTagClose?a.createVNode(jn,{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(Dn,{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(fi,{theme:"primary",size:zn.Small},null)]):null])])})])}});const ef=Ze(ep),tp={direction:h.commonType(["horizontal","vertical"],"direction").def("horizontal"),align:h.commonType(["left","center","right"],"align").def("center"),color:h.string.def("#dde4eb"),width:h.number.def(1),type:h.commonType(["dashed","solid"],"lineType").def("dashed")};var np=a.defineComponent({name:"Divider",props:tp,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 tf=Ze(np),ip={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},rp={active:h.oneOfType([h.number,h.string]).def(""),type:h.commonType(["card","border-card","unborder-card"],"type").def("border-card"),tabPosition:h.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:h.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:h.number.def(50),scrollStep:h.number.def(200),extCls:h.string.def(""),validateActive:h.bool.def(!0),showHeader:h.bool.def(!0),changeOnHover:h.bool.def(!1),changeOnHoverDelay:h.number.def(1e3)},ap=H({active:h.oneOfType([h.number,h.string]).def(""),panels:{type:Array,default:()=>[]},tabPosition:h.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:h.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:h.number.def(50),scrollStep:h.number.def(200),validateActive:h.bool.def(!0),changeOnHover:h.bool.def(!1),changeOnHoverDelay:h.number.def(1e3)},ip),sp={name:h.oneOfType([h.number,h.string]).def(""),label:h.string||h.func,closable:h.bool,visible:h.bool.def(!0),disabled:h.bool,sortable:h.bool,renderDirective:h.commonType(["if","show"],"render").def("show"),panel:h.string||h.func};var nf=a.defineComponent({name:"TabNav",props:ap,setup(e){const t=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const f=[];let d=!1;return e.panels.filter((g,m)=>{if(!g.props)return null;const{name:C,label:I,closable:b,visible:M,disabled:L,sortable:k}=g.props;if(!M)return!1;e.active===C&&(d=!0);const N=v=>g.slots.label?a.h(g.slots.label):[void 0,""].includes(v)?`\u9009\u9879\u5361${m+1}`:typeof v=="string"?v:typeof v=="function"?a.h(v):v;return f.push({name:C,closable:b,visible:M,disabled:L,sortable:k,tabLabel:N(I)}),!0}),!d&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),f}),n=a.ref(-1),i=a.ref(-1),l=a.ref(""),o=(f,d)=>f===d;return Ne(H({},{handleTabAdd(f){e.tabAdd(f)},dragstart(f,d){i.value=f,l.value=e.guid,Object.assign(d.dataTransfer,{effectAllowed:"move"}),e.tabDrag(f,d)},dragenter(f){o(l.value,e.guid)&&(n.value=f)},dragend(){n.value=-1,i.value=-1,l.value=null},drop(f,d){if(!o(l.value,e.guid))return!1;e.tabSort(i.value,f,d)},handleTabChange(f){e.tabChange(f)},handleTabRemove(f,d){e.tabRemove(f,d)}}),{navs:t,dragenterIndex:n,dragStartIndex:i,draggingEle: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:f,dragend:d,drop:g}=this,m=()=>this.navs.map((I,b)=>{if(!I)return null;const{name:M,disabled:L,tabLabel:k}=I,N=()=>{const p=["bk-tab-header-item"];return L&&p.push("bk-tab-header--disabled"),e===M&&p.push("bk-tab-header--active"),p.join(" ")},v=(p,w)=>p||w;return a.createVNode("div",{key:M,onClick:()=>this.handleTabChange(M),draggable:v(I.sortable,i),onDragstart:p=>c(b,p),onDragenter:p=>{p.preventDefault(),f(b)},onDragleave:p=>{p.preventDefault()},onDragover:p=>{p.preventDefault()},onDragend:p=>{p.preventDefault(),d()},onDrop:p=>{p.preventDefault(),g(b,l)},class:N()},[a.createVNode("div",null,[k]),v(I.closable,t)&&a.createVNode(Dn,{class:"bk-tab-header-item-close",onClick:()=>this.handleTabRemove(b,I)},null)])}),C=()=>{var b,M;const I=[];return typeof this.$slots.add=="function"?I.push((M=(b=this.$slots).add)==null?void 0:M.call(b,a.h)):n&&I.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(ls,{width:26,height:26},null)])),I.length?a.createVNode("div",{class:"bk-tab-header-operation"},[I.map((L,k)=>a.createVNode("div",{class:"bk-tab-header-item",key:k},[L]))]):null};return a.createVNode("div",{style:{lineHeight:`${o}px`},class:"bk-tab-header"},[a.createVNode("div",{class:"bk-tab-header-nav"},[m()]),C(),typeof this.$slots.setting=="function"&&a.createVNode("div",{class:"bk-tab-header-setting"},[this.$slots.setting()])])}}),lp=a.defineComponent({name:"Tab",components:{TabNav:nf},props:rp,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=(g,m=[])=>{const{children:C}=g;return(C||[]).forEach(I=>{let{type:b}=I;b=b.name||b,b==="TabPanel"&&I.component?m.push(I.component):(b===a.Fragment||b==="template")&&c(I,m)}),m},f=()=>{if(t.default){const{children:g}=o.subTree.children[1];if(!g)return;const m=g[0],C=c(m);C.length!==l.value.length&&(l.value=C)}};return a.onMounted(()=>{f(),i.value=!0}),a.onUpdated(()=>{f()}),Ne(H({},{tabAdd(g){n("add",{e:g}),n("add-panel",{e:g})},tabChange(g){n("change",g),n("tab-change",g),n("update:active",g)},tabRemove(g,m){n("remove",g,m),n("remove-panel",g,m)},tabSort(g,m,C){const I=l.value;if(C==="insert")if(g<m)I.splice(m+1,0,l[g]),I.splice(g,1);else if(g>m)I.splice(m,0,l[g]),I.splice(g+1,1);else return!1;else{const b=I[m];I[m]=I[g],I[g]=b}l.value=[...I],n("sort",g,m,C),n("sort-change",g,m,C)},tabDrag(g,m){n("drag",g,m),n("on-drag-tab",g,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:f,addable:d,sortable:g,sortType:m,labelHeight:C,scrollStep:I,validateActive:b,changeOnHover:M,changeOnHoverDelay:L,tabPosition:k,tabAdd:N,tabChange:v,tabRemove:p,tabSort:w,tabDrag:x}=this,S={panels:l,active:o,type:c,closable:f,addable:d,sortable:g,sortType:m,labelHeight:C,scrollStep:I,validateActive:b,changeOnHover:M,changeOnHoverDelay:L,tabPosition:k,tabAdd:N,tabChange:v,tabRemove:p,tabSort:w,tabDrag:x};return!l||!Array.isArray(l)?null:a.createVNode(nf,S,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)])])}}),op=a.defineComponent({name:"TabPanel",props:sp,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 rf=At(lp,{TabPanel:op}),Ci={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let af=1;const sf=(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:f=10}=n;Ci[i].forEach(I=>{c+=(I.el.offsetHeight||0)+f}),af+=1;const d=`message_${af}`;n=Ne(H({},n),{offsetX:o,offsetY:c,id:d});const g=document.createElement("div"),m=a.createVNode(e,n);m.props.onDestroy=I=>{cp(I,i,f,l),a.render(null,g)},a.render(m,g),Ci[i].push(m);let C;m.props.getContainer&&Kr(m.props.getContainer)?C=m.props.getContainer:C=document.body,C.appendChild(g.firstElementChild)};function cp(e,t,n,i){i==null||i();const l=t.startsWith("top")?"top":"bottom";let o=-1;Ci[t].forEach((g,m)=>{g.props.id===e&&(o=m)});const f=Ci[t][o].el.offsetHeight,d=Ci[t].length;for(let g=o;g<d;g++){const m=parseInt(Ci[t][g].el.style[l],10)-f-n;Ci[t][g].component.props.offsetY=m}Ci[t].splice(o,1)}const up={id:h.string.def(""),message:h.string.def(""),theme:h.theme(["primary","warning","success","error"]).def("primary"),delay:h.number.def(3e3),dismissable:h.bool.def(!0),offsetY:h.number.def(30),spacing:h.number.def(10),extCls:h.string.def(""),onClose:h.func,getContainer:h.instanceOf(HTMLElement)};var dp=a.defineComponent({name:"Message",props:up,emits:["destroy"],setup(e,{emit:t}){const n=a.computed(()=>["bk-message",`bk-message-${e.theme}`,`${e.extCls}`]),i=pn.getMessageNextIndex(),l=a.computed(()=>e.getContainer&&Kr(e.getContainer)),o=a.computed(()=>({top:`${e.offsetY}px`,zIndex:i,position:l.value?"absolute":"fixed"})),c=a.ref(!1);let f=null;const d=()=>{f=setTimeout(()=>{c.value=!1},e.delay)},g=m=>{m.preventDefault(),m.stopPropagation(),c.value=!1};return a.onMounted(()=>{e.delay&&d(),c.value=!0}),a.onUnmounted(()=>{clearTimeout(f)}),a.watch(c,()=>{c.value||t("destroy",e.id)}),{classNames:n,styles:o,visible:c,close:g}},render(){const e=()=>({primary:a.createVNode(ss,null,null),warning:a.createVNode(ds,null,null),success:a.createVNode(cs,null,null),error:a.createVNode(Dn,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(jn,{class:"bk-message-close",onClick:this.close},null)]),[[a.vShow,this.visible]])]})}});const lf=e=>{sf(dp,e)},of=e=>{const t=document.createElement("div"),n=a.ref(!1),i=a.shallowRef(e),l=a.defineComponent({name:"DialogConfirm",setup(f,{expose:d}){a.onMounted(()=>{(document.activeElement||document.body).blur(),i.value.isShow!==!1&&(n.value=!0)});const g=async()=>{var b,M;typeof((b=i.value)==null?void 0:b.onClosed)=="function"&&await((M=i.value)==null?void 0:M.onClosed()),n.value=!1},m=async()=>{var b,M;typeof((b=i.value)==null?void 0:b.onConfirm)=="function"&&await((M=i.value)==null?void 0:M.onConfirm()),n.value=!1};function C(b){i.value=b}d({update:C});const I=()=>{const b=[];if(i.value.subTitle)switch(typeof i.value.subTitle){case"string":b.push(a.h("div",i.value.subTitle));break;case"function":b.push(a.h("div",i.value.subTitle()));break;default:b.push(a.h(i.value.subTitle));break}return b};return()=>a.createVNode(Gd,Ne(H({},i.value),{isShow:n.value,onClosed:g,onConfirm:m}),I())}}),o=a.createApp(l).mount(t);return{show:()=>{n.value=!0},hide:()=>{n.value=!1},update:f=>{o.update(f)}}},fp={id:h.string.def(""),title:h.string.def(""),message:h.string.def(""),theme:h.theme(["primary","warning","success","error"]).def("primary"),position:h.position().def("top-right"),delay:h.number.def(5e3),dismissable:h.bool.def(!0),offsetX:h.number.def(100),offsetY:h.number.def(30),spacing:h.number.def(10),extCls:h.string.def(""),onClose:h.func};var hp=a.defineComponent({name:"Notify",props:fp,emits:["destroy"],setup(e,{emit:t}){const n=pn.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]),f=a.ref(!1);let d=null;const g=()=>{d=setTimeout(()=>{f.value=!1},e.delay)},m=()=>{f.value=!1};return a.onMounted(()=>{e.delay&&g(),f.value=!0}),a.onUnmounted(()=>{clearTimeout(d)}),a.watch(f,()=>{f.value||t("destroy",e.id)}),{classNames:c,styles:o,visible:f,handleClose:m}},render(){const e=()=>({primary:a.createVNode(ss,null,null),warning:a.createVNode(ds,null,null),success:a.createVNode(cs,null,null),error:a.createVNode(Dn,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(jn,{class:"bk-notify-icon bk-notify-close",onClick:this.handleClose},null)]),[[a.vShow,this.visible]])]})}});const cf=e=>{sf(hp,e)},uf=Symbol("MENU_PROVIDER_KEY"),nc=Symbol("MENU_PROVIDER_KEY_PATH"),gp=e=>{a.provide(uf,e)},mp=e=>{const{parentKeys:t,parentInfo:n}=ic(),i=a.computed(()=>[...t.value,e]);a.provide(nc,{parentInfo:{key:e,parentKey:n==null?void 0:n.key},parentKeys:i})},df=()=>a.inject(uf),ic=()=>{var n;const e=a.getCurrentInstance(),t=e.parent?e.parent.provides:(n=e.vnode.appContext)==null?void 0:n.provides;return t&&nc in t?a.inject(nc):{parentInfo:void 0,parentKeys:a.ref([])}},rc=function(e){return(e||"").split(" ").filter(t=>!!t.trim())};function ff(e,t){if(!e||!t)return;const n=rc(t);let i=e.getAttribute("class")||"";if(e.classList){e.classList.remove(...n);return}n.forEach(o=>{i=i.replace(` ${o} `," ")});const l=rc(i).join(" ");e.setAttribute("class",l)}function hf(e,t){if(!e)return;let n=e.getAttribute("class")||"";const i=rc(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 pp=()=>({css:!0,onBeforeEnter:e=>{hf(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,ff(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&&(hf(e,"collapse-transition"),e.style.transitionProperty="height",e.style.height="0px",e.style.maxHeight="0px")},onAfterLeave:e=>{ff(e,"collapse-transition"),e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow}}),yp={activeKey:String,collapse:Boolean,openedKeys:{type:Array},mode:{type:String,default:"vertical"},uniqueOpen:{type:Boolean,default:!0}};var bp=a.defineComponent({name:"Menu",props:yp,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({}),f=a.computed(()=>e.mode),d=a.ref(e.collapse),g=a.ref([]);a.watchEffect(()=>{e.activeKey!==void 0&&(l.value=e.activeKey)}),a.watch(()=>e.collapse,()=>{d.value=e.collapse,console.info(e.collapse);const M=[...g.value],L=[...o.value];o.value=d.value?[]:M,g.value=d.value?L:[]},{immediate:!0}),a.watch(()=>e.openedKeys,(M=o.value)=>{o.value=M},{immediate:!0});const m=(M,L)=>{c.value=Ne(H({},c.value),{[M]:L})},C=M=>{delete c.value[M],c.value=H({},c.value)},I=(M,L)=>{L?e.uniqueOpen?o.value=[M]:o.value.push(M):o.value=o.value.filter(k=>k!==M),n("openChange",L,c.value[M]),n("update:openKeys",[...o.value])},b=M=>{l.value=M,n("click",c.value[M]),n("update:activeKey",M,c.value[M])};return gp({activeKey:l,menuStore:c,registerMenuInfo:m,unregisterMenuInfo:C,mode:f.value,openedKeys:o,collapse:d,handleOpenChange:I,handleActiveChange:b}),i({activeKey:l,openedKeys:o,menuStore:c}),()=>{var M;return a.createVNode("div",{class:{"bk-menu":!0,"is-collapse":d.value}},[(M=t.default)==null?void 0:M.call(t)])}}}),Cp=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)])])}}}),Mp=a.defineComponent({name:"MenuItem",props:{needIcon:{type:Boolean,default:!0}},emits:["click"],slots:["icon"],setup(e,{slots:t,emit:n}){var b,M;const{registerMenuInfo:i,unregisterMenuInfo:l,activeKey:o,handleActiveChange:c}=df(),f=a.getCurrentInstance(),{parentInfo:d}=ic(),g=((M=(b=f.vnode.key)==null?void 0:b.toString)==null?void 0:M.call(b))||String(f.uid),m=a.computed(()=>o.value===g),C=a.computed(()=>e.needIcon);i(g,{key:g,parentKey:d==null?void 0:d.key});const I=L=>{c(g),n("click",L)};return a.onBeforeUnmount(()=>l(g)),()=>{var L,k;return a.createVNode("li",{class:{"bk-menu-item":!0,"is-active":m.value},onClick:I},[C.value&&a.createVNode("span",{class:"item-icon"},[((L=t==null?void 0:t.icon)==null?void 0:L.call(t))||a.createVNode("i",{class:"default-icon"},null)]),a.createVNode("span",{class:"item-content"},[(k=t.default)==null?void 0:k.call(t)])])}}});const Ip={title:{type:String,default:"title"}};var wp=a.defineComponent({name:"Submenu",props:Ip,emits:["collapse"],slots:["icon"],setup(e,{slots:t,emit:n}){var N,v;const{registerMenuInfo:i,unregisterMenuInfo:l,openedKeys:o,handleOpenChange:c,collapse:f,activeKey:d,menuStore:g}=df(),{parentInfo:m}=ic(),C=a.getCurrentInstance(),I=((v=(N=C.vnode.key)==null?void 0:N.toString)==null?void 0:v.call(N))||String(C.uid),b=a.ref(pp()),M=a.computed(()=>o.value.includes(I)),L=a.computed(()=>{var w,x;const p=(x=(w=g.value)==null?void 0:w[d.value])==null?void 0:x.parentKey;return f.value&&p===I&&M});mp(I),i(I,{key:I,parentKey:m==null?void 0:m.key}),a.onBeforeUnmount(()=>l(I));const k=()=>{c(I,!M.value),n("collapse",!M.value,C)};return()=>{var p;return a.createVNode("li",{class:{"bk-menu-submenu":!0,"is-opened":M.value}},[a.createVNode("div",{class:{"submenu-header":!0,"is-collapse":L.value},onClick:k},[a.createVNode("span",{class:"submenu-header-icon"},[((p=t.icon)==null?void 0:p.call(t))||a.createVNode(bo,{class:"menu-icon"},null)]),a.createVNode("span",{class:"submenu-header-content"},[e.title]),a.createVNode(qa,{class:{"submenu-header-collapse":!0,"is-collapse":o.value.includes(I)}},null)]),a.createVNode(a.Transition,b.value,{default:()=>{var w;return[a.withDirectives(a.createVNode("ul",{class:"submenu-list"},[(w=t.default)==null?void 0:w.call(t)]),[[a.vShow,M.value]])]}})])}}});const gf=At(bp,{Item:Mp,Submenu:wp,Group:Cp}),vp={sideTitle:{type:String,default:""},navigationType:{type:String,default:"left-right"}};var mf=a.defineComponent({props:vp,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 Np={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 Lp=a.defineComponent({name:"Navigation",props:Np,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,f,d,g,m,C;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(mf,{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(mf,{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(ao,{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"},[(f=(c=this.$slots)["header-set"])==null?void 0:f.call(c)])]]),a.createVNode("div",{class:"container-content",style:{maxHeight:`calc(100vh - ${this.headHeight}px)`}},[(g=(d=this.$slots).default)==null?void 0:g.call(d),a.createVNode("div",{class:"container-footer"},[(C=(m=this.$slots).footer)==null?void 0:C.call(m)])])])])])}});const pf=Ze(Lp),kp={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 Tp=a.defineComponent({props:kp,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 d=n;d.isShow&&d.hide(),d.destroy(),n=null,t("changeVisible",!1)}},o=()=>{n&&Object.keys(n).length!==0?a.nextTick(()=>{n.update()}):a.nextTick(()=>{n=new Fl(e.triggerRef,i.value,{placement:e.placement,trigger:"manual",modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},{name:"offset",options:{offset:[0,4]}}]})})},c=a.computed(()=>{const d={};return e.appendToBody&&(d["z-index"]=1060+pn.getModalNextIndex()),d}),f=a.reactive({styles:c});return Ne(H({},a.toRefs(f)),{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 xp={showTime:{type:Boolean,required:!0},isTime:{type:Boolean,default:!1},timeDisabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}};var Sp=a.defineComponent({props:xp,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:d=>{const m=[...c.value.children][d.shiftKey?"shift":"pop"]();document.activeElement===m&&(d.preventDefault(),d.stopPropagation())}}},render(){return a.createVNode("div",{class:"bk-picker-confirm",ref:"elRef",onKeydown:this.handleTab},[this.showTime?a.createVNode("a",{href:"javascript: void(0);",class:"bk-picker-confirm-time",disabled:this.timeDisabled,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])])}}),yf=1e3*60*60*24;function bf(e,t){return new Date(e,t+1,0).getDate()}function Cf(e,t,n){return t===0&&n>50?e-1:t===11&&n<10?e+1:e}function Mf(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),f=1+Math.round((l-c)/yf);i||(f+=c.getDay());var d=Math.ceil(f/7);if(!i){var g=new Date(e,t,n),m=new Date(e+1,0,1),C=m.getDay();g.getTime()>=m.getTime()-yf*C&&(d=1)}return d}function Dp(e,t,n){for(var i=this.lang||"en",l=this.onlyDays,o=typeof this.weekStart=="undefined"?1:this.weekStart,c=o===1,f=[],d=new Date(e,t,1),g=d.getDay()||(c?7:0),m=o-g,C=Mf(e,t,1,c),I=bf(e,t),b=bf(e,t-1),M,L,k,N=Cf(e,t,C),v={month:t,year:e,daysInMonth:I},p=0;p<7;p++){k=m;for(var w=0;w<8;w++){p>0&&w>0&&m++,m>I||m<1?(L=m>I?m-I:b+m,M=m>I?t+1:t-1):(L=m,M=t);var x=function(){return w===0?"weekLabel":p===0?"dayLabel":m<1?"prevMonth":m>I?"nextMonth":"monthDay"}(),S=k!==m&&p>0,Q={desc:S?L:C,week:C,type:x,format:c?"ISO 8601":"US",date:S?new Date(Date.UTC(e,M,L)):!1,year:N,index:f.length};n&&(typeof n=="function"?Q=n.call(v,Q,i):n.forEach(function(z){Q=z.call(v,Q,i)})),l&&S?f.push(Q):l||f.push(Q)}p>0&&(C=Mf(e,M,L+1,c)),N=Cf(e,t,C)}return v.cells=f,v}var jp=function(e){return Dp.bind(e)},zp={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"}},On=zp;function Pp(e){return e==null?!1:e.constructor===Array||e.constructor===Object}function If(e,t){for(var n in e)t[n]?Pp(e[n])&&If(e[n],t[n]):t[n]=e[n]}function wf(e,t){var n=[On.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&&On.weekPlaceholder?e.desc=On.weekPlaceholder:e.index<8?e.desc=On.columnNames[t][e.index]:e.index%8==0&&(e.desc=e.week)),e.date&&(e.monthName=On.monthNames[t][e.date.getMonth()]),this.monthName||(this.monthName=On.monthNames[t][this.month]),this.labels||(this.labels={monthNames:On.monthNames[t],columnNames:On.columnNames[t],classes:On.classes}),e}wf.setLabels=function(e){If(e,On)};var Ep=wf,Op={Generator:jp,addLabels:Ep};function an(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 St(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function bn(e){St(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 Jp(e,t){St(2,arguments);var n=bn(e).getTime(),i=an(t);return new Date(n+i)}function Ap(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 Qp(e){return St(1,arguments),e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Vp(e){if(St(1,arguments),!Qp(e)&&typeof e!="number")return!1;var t=bn(e);return!isNaN(Number(t))}var Rp={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"}},Wp=function(e,t,n){var i,l=Rp[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},Bp=Wp;function ac(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 Hp={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Gp={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Zp={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Yp={date:ac({formats:Hp,defaultWidth:"full"}),time:ac({formats:Gp,defaultWidth:"full"}),dateTime:ac({formats:Zp,defaultWidth:"full"})},Fp=Yp,_p={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Up=function(e,t,n,i){return _p[e]},$p=Up;function ya(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,f=i.width?String(i.width):c;o=e.formattingValues[f]||e.formattingValues[c]}else{var d=e.defaultWidth,g=i.width?String(i.width):e.defaultWidth;o=e.values[g]||e.values[d]}var m=e.argumentCallback?e.argumentCallback(t):t;return o[m]}}var Xp={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Kp={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},qp={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"]},e5={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"]},t5={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"}},n5={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"}},i5=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"},r5={ordinalNumber:i5,era:ya({values:Xp,defaultWidth:"wide"}),quarter:ya({values:Kp,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:ya({values:qp,defaultWidth:"wide"}),day:ya({values:e5,defaultWidth:"wide"}),dayPeriod:ya({values:t5,defaultWidth:"wide",formattingValues:n5,defaultFormattingWidth:"wide"})},a5=r5;function ba(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],f=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(f)?l5(f,function(C){return C.test(c)}):s5(f,function(C){return C.test(c)}),g;g=e.valueCallback?e.valueCallback(d):d,g=n.valueCallback?n.valueCallback(g):g;var m=t.slice(c.length);return{value:g,rest:m}}}function s5(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function l5(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function o5(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 f=t.slice(l.length);return{value:c,rest:f}}}var c5=/^(\d+)(th|st|nd|rd)?/i,u5=/\d+/i,d5={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},f5={any:[/^b/i,/^(a|c)/i]},h5={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},g5={any:[/1/i,/2/i,/3/i,/4/i]},m5={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},p5={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]},y5={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},b5={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]},C5={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},M5={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}},I5={ordinalNumber:o5({matchPattern:c5,parsePattern:u5,valueCallback:function(e){return parseInt(e,10)}}),era:ba({matchPatterns:d5,defaultMatchWidth:"wide",parsePatterns:f5,defaultParseWidth:"any"}),quarter:ba({matchPatterns:h5,defaultMatchWidth:"wide",parsePatterns:g5,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:ba({matchPatterns:m5,defaultMatchWidth:"wide",parsePatterns:p5,defaultParseWidth:"any"}),day:ba({matchPatterns:y5,defaultMatchWidth:"wide",parsePatterns:b5,defaultParseWidth:"any"}),dayPeriod:ba({matchPatterns:C5,defaultMatchWidth:"any",parsePatterns:M5,defaultParseWidth:"any"})},w5=I5,v5={code:"en-US",formatDistance:Bp,formatLong:Fp,formatRelative:$p,localize:a5,match:w5,options:{weekStartsOn:0,firstWeekContainsDate:1}},N5=v5;function L5(e,t){St(2,arguments);var n=an(t);return Jp(e,-n)}var k5=864e5;function T5(e){St(1,arguments);var t=bn(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/k5)+1}function Ds(e){St(1,arguments);var t=1,n=bn(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 vf(e){St(1,arguments);var t=bn(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var l=Ds(i),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var c=Ds(o);return t.getTime()>=l.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}function x5(e){St(1,arguments);var t=vf(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=Ds(n);return i}var S5=6048e5;function D5(e){St(1,arguments);var t=bn(e),n=Ds(t).getTime()-x5(t).getTime();return Math.round(n/S5)+1}function js(e,t){St(1,arguments);var n=t||{},i=n.locale,l=i&&i.options&&i.options.weekStartsOn,o=l==null?0:an(l),c=n.weekStartsOn==null?o:an(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=bn(e),d=f.getUTCDay(),g=(d<c?7:0)+d-c;return f.setUTCDate(f.getUTCDate()-g),f.setUTCHours(0,0,0,0),f}function Nf(e,t){St(1,arguments);var n=bn(e),i=n.getUTCFullYear(),l=t||{},o=l.locale,c=o&&o.options&&o.options.firstWeekContainsDate,f=c==null?1:an(c),d=l.firstWeekContainsDate==null?f:an(l.firstWeekContainsDate);if(!(d>=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(i+1,0,d),g.setUTCHours(0,0,0,0);var m=js(g,t),C=new Date(0);C.setUTCFullYear(i,0,d),C.setUTCHours(0,0,0,0);var I=js(C,t);return n.getTime()>=m.getTime()?i+1:n.getTime()>=I.getTime()?i:i-1}function j5(e,t){St(1,arguments);var n=t||{},i=n.locale,l=i&&i.options&&i.options.firstWeekContainsDate,o=l==null?1:an(l),c=n.firstWeekContainsDate==null?o:an(n.firstWeekContainsDate),f=Nf(e,t),d=new Date(0);d.setUTCFullYear(f,0,c),d.setUTCHours(0,0,0,0);var g=js(d,t);return g}var z5=6048e5;function P5(e,t){St(1,arguments);var n=bn(e),i=js(n,t).getTime()-j5(n,t).getTime();return Math.round(i/z5)+1}function Xe(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var E5={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return Xe(t==="yy"?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):Xe(n+1,2)},d:function(e,t){return Xe(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 Xe(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Xe(e.getUTCHours(),t.length)},m:function(e,t){return Xe(e.getUTCMinutes(),t.length)},s:function(e,t){return Xe(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 Xe(l,t.length)}},Mi=E5,vr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},O5={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 Mi.y(e,t)},Y:function(e,t,n,i){var l=Nf(e,i),o=l>0?l:1-l;if(t==="YY"){var c=o%100;return Xe(c,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Xe(o,t.length)},R:function(e,t){var n=vf(e);return Xe(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return Xe(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 Xe(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 Xe(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 Mi.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 Xe(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=P5(e,i);return t==="wo"?n.ordinalNumber(l,{unit:"week"}):Xe(l,t.length)},I:function(e,t,n){var i=D5(e);return t==="Io"?n.ordinalNumber(i,{unit:"week"}):Xe(i,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Mi.d(e,t)},D:function(e,t,n){var i=T5(e);return t==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):Xe(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 Xe(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 Xe(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 Xe(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=vr.noon:i===0?l=vr.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=vr.evening:i>=12?l=vr.afternoon:i>=4?l=vr.morning:l=vr.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 Mi.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Mi.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(i,{unit:"hour"}):Xe(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return i===0&&(i=24),t==="ko"?n.ordinalNumber(i,{unit:"hour"}):Xe(i,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Mi.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Mi.s(e,t)},S:function(e,t){return Mi.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 kf(o);case"XXXX":case"XX":return Yi(o);case"XXXXX":case"XXX":default:return Yi(o,":")}},x:function(e,t,n,i){var l=i._originalDate||e,o=l.getTimezoneOffset();switch(t){case"x":return kf(o);case"xxxx":case"xx":return Yi(o);case"xxxxx":case"xxx":default:return Yi(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"+Lf(o,":");case"OOOO":default:return"GMT"+Yi(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"+Lf(o,":");case"zzzz":default:return"GMT"+Yi(o,":")}},t:function(e,t,n,i){var l=i._originalDate||e,o=Math.floor(l.getTime()/1e3);return Xe(o,t.length)},T:function(e,t,n,i){var l=i._originalDate||e,o=l.getTime();return Xe(o,t.length)}};function Lf(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+Xe(o,2)}function kf(e,t){if(e%60===0){var n=e>0?"-":"+";return n+Xe(Math.abs(e)/60,2)}return Yi(e,t)}function Yi(e,t){var n=t||"",i=e>0?"-":"+",l=Math.abs(e),o=Xe(Math.floor(l/60),2),c=Xe(l%60,2);return i+o+n+c}var J5=O5;function Tf(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 xf(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 A5(e,t){var n=e.match(/(P+)(p+)?/)||[],i=n[1],l=n[2];if(!l)return Tf(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}}",Tf(i,t)).replace("{{time}}",xf(l,t))}var Q5={p:xf,P:A5},V5=Q5,R5=["D","DD"],W5=["YY","YYYY"];function B5(e){return R5.indexOf(e)!==-1}function H5(e){return W5.indexOf(e)!==-1}function Sf(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 G5=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Z5=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Y5=/^'([^]*?)'?$/,F5=/''/g,_5=/[a-zA-Z]/;function U5(e,t,n){St(2,arguments);var i=String(t),l=n||{},o=l.locale||N5,c=o.options&&o.options.firstWeekContainsDate,f=c==null?1:an(c),d=l.firstWeekContainsDate==null?f:an(l.firstWeekContainsDate);if(!(d>=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=o.options&&o.options.weekStartsOn,m=g==null?0:an(g),C=l.weekStartsOn==null?m:an(l.weekStartsOn);if(!(C>=0&&C<=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 I=bn(e);if(!Vp(I))throw new RangeError("Invalid time value");var b=Ap(I),M=L5(I,b),L={firstWeekContainsDate:d,weekStartsOn:C,locale:o,_originalDate:I},k=i.match(Z5).map(function(N){var v=N[0];if(v==="p"||v==="P"){var p=V5[v];return p(N,o.formatLong,L)}return N}).join("").match(G5).map(function(N){if(N==="''")return"'";var v=N[0];if(v==="'")return $5(N);var p=J5[v];if(p)return!l.useAdditionalWeekYearTokens&&H5(N)&&Sf(N,t,e),!l.useAdditionalDayOfYearTokens&&B5(N)&&Sf(N,t,e),p(M,N,o.localize,L);if(v.match(_5))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return N}).join("");return k}function $5(e){return e.match(Y5)[1].replace(F5,"'")}const wt={},Df=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Fi=/\d\d?/,X5=/\d{3}/,K5=/\d{4}/,zs=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,jf=function(){};function zf(e,t){const n=[];for(let i=0,l=e.length;i<l;i++)n.push(e[i].substr(0,t));return n}function Pf(e){return(t,n,i)=>{const l=i[e].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~l&&(t.month=l)}}function Jn(e,t=2){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}const Ef=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Of=["January","February","March","April","May","June","July","August","September","October","November","December"],q5=zf(Of,3),ey=zf(Ef,3);wt.i18n={dayNamesShort:ey,dayNames:Ef,monthNamesShort:q5,monthNames:Of,amPm:["am","pm"],DoFn(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10)*e%10]}};const Jf={D(e){return e.getDay()},DD(e){return Jn(e.getDay())},Do(e,t){return t.DoFn(e.getDate())},d(e){return e.getDate()},dd(e){return Jn(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 Jn(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 Jn(e.getHours()%12||12)},H(e){return e.getHours()},HH(e){return Jn(e.getHours())},m(e){return e.getMinutes()},mm(e){return Jn(e.getMinutes())},s(e){return e.getSeconds()},ss(e){return Jn(e.getSeconds())},S(e){return Math.round(e.getMilliseconds()/100)},SS(e){return Jn(Math.round(e.getMilliseconds()/10),2)},SSS(e){return Jn(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?"-":"+")+Jn(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)}},lt={d:[Fi,(e,t)=>{e.day=t}],M:[Fi,(e,t)=>{e.month=t-1}],yy:[Fi,(e,t)=>{const i=+`${new Date().getFullYear()}`.substr(0,2);e.year=`${t>68?i-1:i}${t}`}],h:[Fi,(e,t)=>{e.hour=t}],m:[Fi,(e,t)=>{e.minute=t}],s:[Fi,(e,t)=>{e.second=t}],yyyy:[K5,(e,t)=>{e.year=t}],S:[/\d/,(e,t)=>{e.millisecond=t*100}],SS:[/\d{2}/,(e,t)=>{e.millisecond=t*10}],SSS:[X5,(e,t)=>{e.millisecond=t}],D:[Fi,jf],ddd:[zs,jf],MMM:[zs,Pf("monthNamesShort")],MMMM:[zs,Pf("monthNames")],a:[zs,(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)}]};lt.DD=lt.D,lt.dddd=lt.ddd,lt.Do=lt.dd=lt.d,lt.mm=lt.m,lt.hh=lt.H=lt.HH=lt.h,lt.MM=lt.M,lt.ss=lt.s,lt.A=lt.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(Df,l=>l in Jf?Jf[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(Df,d=>{if(lt[d]){const g=lt[d],m=e.search(g[0]);~m?e.replace(g[0],C=>(g[1](o,C,i),e=e.substr(m+C.length),C)):l=!1}return lt[d]?"":d.slice(1,d.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 f;return o.timezoneOffset!==null&&o.timezoneOffset!==void 0?(o.minute=+(o.minute||0)-+o.timezoneOffset,f=new Date(Date.UTC(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0))):f=new Date(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0),f};const sc=" - ",Xn=(e,t)=>{const n=bn(new Date(e));return!n||isNaN(n.getTime())?"":U5(n,t||"yyyy-MM-dd")},lc=(e,t)=>{if(Array.isArray(e)&&e.length===2){const n=e[0],i=e[1];if(n&&i)return Xn(n,t)+sc+Xn(i,t)}else if(!Array.isArray(e)&&e instanceof Date)return Xn(e,t);return""},oc=(e,t)=>{const n=Array.isArray(e)?e:e.split(sc);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[]},Nr={default:{formatter(e){return e?`${e}`:""},parser(e){return e===void 0||e===""?null:e}},date:{formatter:(e,t)=>Xn(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},datetime:{formatter:(e,t)=>Xn(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},daterange:{formatter:lc,parser:oc},datetimerange:{formatter:lc,parser:oc},timerange:{formatter:lc,parser:oc},time:{formatter:(e,t)=>Xn(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},month:{formatter:(e,t)=>Xn(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},year:{formatter:(e,t)=>Xn(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},multiple:{formatter(e,t){return e.filter(Boolean).map(n=>Xn(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}}},ty=()=>{const e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e},ny=e=>e.every(t=>!t||typeof t=="string"&&t.trim()===""),Af=e=>e?[e.getHours(),e.getMinutes(),e.getSeconds()]:[0,0,0],Qf={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"},Ps=(e,t,n,i)=>{const l=t.includes("range"),{parser:o}=Nr[t]||Nr.default,c=i||Qf[t],f=Nr.multiple.parser;let d=e;if(e&&t==="time"&&!(e instanceof Date))d=o(e,c);else if(n&&e)d=f(e,c);else if(l)if(!e)d=[null,null];else if(typeof e=="string")d=o(e,c);else if(t==="timerange")d=o(e,c).map(g=>g||"");else{const[g,m]=e;g instanceof Date&&m instanceof Date?d=e.map(C=>new Date(C)):typeof g=="string"&&typeof m=="string"?d=o(e.join(sc),c):(!g||!m)&&(d=[null,null])}else typeof e=="string"&&t.indexOf("time")!==0&&(d=o(e,c)||null);return l||n?d||[]:[d]},Ca=(e,t,n,i)=>{const l=Qf[t];if(n){const{formatter:c}=Nr.multiple;return c(e,i||l)}const{formatter:o}=Nr[t]||Nr.default;return o(e,i||l)},iy=Symbol("date-picker");function sn(e,t=""){return["bk-picker-panel-icon-btn",`bk-date-picker-${e}-btn`,`bk-date-picker-${e}-btn-arrow${t}`]}const ry=(e,t)=>new Date(e,t+1,0).getDate(),Vf=(e,t)=>{const n=new Date(e),i=n.getMonth()+t,l=ry(n.getFullYear(),i);return l<n.getDate()&&n.setDate(l),n.setMonth(i),n},Rf=(()=>{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),f=c[1],d=[c[0],c[2]].map(g=>({label:g.replace(/\[[^\]]+\]/,C=>C.slice(1,-1).replace(t,I=>e[I](l,n))),type:g.indexOf("yy")!==-1?"year":"month"}));return{separator:f,labels:d}}})(),_i=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()},ay=(e,t,n)=>{if(!t||!n)return!1;const[i,l]=[t,n].sort();return e>=i&&e<=l},sy={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 cc=a.defineComponent({props:sy,emits:["pick","pick-click","changeRange"],setup(e,{emit:t}){const n=a.computed(()=>new Op.Generator({onlyDays:!0,weekStart:0})),i=a.computed(()=>{const g=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"];return g.splice(0,7-0).concat(g.splice(0,0))}),l=a.computed(()=>e.selectionMode==="range"&&e.rangeState.selecting?[e.rangeState.from]:e.modelValue),o=a.computed(()=>{const g=e.tableDate.getFullYear(),m=e.tableDate.getMonth(),C=_i(new Date),I=l.value.filter(Boolean).map(_i),[b,M]=l.value.map(_i),L=e.rangeState.from&&_i(e.rangeState.from),k=e.rangeState.to&&_i(e.rangeState.to),N=e.selectionMode==="range",v=typeof e.disableDate=="function"&&e.disableDate;return n.value(g,m,p=>{p.date instanceof Date&&p.date.setTime(p.date.getTime()+p.date.getTimezoneOffset()*6e4);const w=p.date&&_i(p.date),x=p.date&&m===p.date.getMonth();return Ne(H({},p),{type:w===C?"today":p.type,selected:x&&I.includes(w),disabled:p.date&&v&&v(new Date(w)),range:x&&N&&ay(w,L,k),start:x&&N&&w===b,end:x&&N&&w===M})}).cells.slice(0)});return{headerDays:i,cells:o,getCellCls:g=>["bk-date-picker-cells-cell",{["bk-date-picker-cells-cell-selected"]:g.selected||g.start||g.end,["bk-date-picker-cells-cell-disabled"]:g.disabled,["bk-date-picker-cells-cell-today"]:g.type==="today",["bk-date-picker-cells-cell-prev-month"]:g.type==="prevMonth",["bk-date-picker-cells-cell-next-month"]:g.type==="nextMonth",["bk-date-picker-cells-cell-week-label"]:g.type==="weekLabel",["bk-date-picker-cells-cell-range"]:g.range&&!g.start&&!g.end}],handleClick:g=>{if(g.disabled||g.type==="weekLabel")return;const m=new Date(_i(g.date));t("pick",m),t("pick-click")},handleMouseMove:g=>{if(!e.rangeState.selecting||g.disabled)return;const m=g.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 ly={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}};var oy=a.defineComponent({props:ly,emits:["pick","pick-success","pick-clear"],setup(e,{slots:t,emit:n}){const i=O=>O.match(/^time/)?"time-picker":`${O}-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}),c=()=>{setTimeout(()=>{o.currentView=e.selectionMode},500)},f=O=>{o.panelDate=O,o.pickerTable==="year-table"?o.pickerTable="month-table":o.pickerTable=i(o.currentView)},d=(O,P)=>{let E=O;e.selectionMode==="year"?E=new Date(O.getFullYear(),0,1):e.selectionMode==="month"?E=new Date(o.panelDate.getFullYear(),O.getMonth(),1):E=new Date(O),o.dates=[E],n("pick",E,!1,P||e.selectionMode)},g=()=>{c(),n("pick-success")},m=()=>{c(),n("pick-clear")},C=O=>{O.value&&n("pick",O.value(),!1,void 0,O),O.onClick&&O.onClick(this),e.shortcutClose&&g()},I=()=>{o.currentView=e.selectionMode,o.pickerTable=i(o.currentView)},b=O=>{e.selectionMode==="year"||o.pickerTable==="year-table"?o.panelDate=new Date(o.panelDate.getFullYear()+O*10,0,1):o.panelDate=Vf(o.panelDate,O*12)},M=O=>{o.panelDate=Vf(o.panelDate,O)},L=a.ref(null),k=a.ref(null),N=O=>{var P,E;O&&((P=L==null?void 0:L.value)==null||P.updateScroll(),(E=k==null?void 0:k.value)==null||E.updateScroll())},v=a.computed(()=>o.pickerTable===`${o.currentView}-table`?d:f),p=a.computed(()=>{const O="zh-CN",P="[yyyy]-[mm]",E=o.panelDate,{labels:_,separator:G}=Rf(O,P,E),se=ce=>()=>{o.pickerTable=i(ce)};return{separator:G,labels:_.map(ce=>{const de=ce;return de.handler=se(ce.type),de})}}),w=a.computed(()=>p.value.labels[0].type==="year"||o.currentView==="date"),x=a.computed(()=>p.value.labels[1].type==="year"||o.currentView==="date"),S=a.computed(()=>o.currentView==="time"),Q=()=>{o.currentView=o.currentView==="time"?"date":"time"},z=a.computed(()=>!!t.shortcuts);return Ne(H({},a.toRefs(o)),{panelPickerHandlers:v,datePanelLabel:p,showLabelFirst:w,showLabelSecond:x,handleShortcutClick:C,changeYear:b,changeMonth:M,reset:I,isTime:S,hasShortcuts:z,onToggleVisibility:N,handleToggleTime:Q,handlePickSuccess:g,handlePickClear:m})},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:sn("prev","-double"),onClick:()=>this.changeYear(-1)},[a.createVNode(ea,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:sn("prev"),onClick:()=>this.changeMonth(-1)},[a.createVNode(Ai,{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:sn("next","-double"),onClick:()=>this.changeYear(1)},[a.createVNode(ta,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:sn("next"),onClick:()=>this.changeMonth(1)},[a.createVNode(Sn,{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(cc,{tableDate:this.panelDate,disableDate:this.disableDate,selectionMode:this.selectionMode,modelValue:this.dates,focusedDate:this.focusedDate,onPick:this.panelPickerHandlers},null);default:return null}})():""]),this.confirm?a.createVNode(Sp,{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 cy={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:()=>[]},clearable:{type:Boolean,default:!0},splitPanels:{type:Boolean,default:!0},shortcutClose:{type:Boolean,default:!1},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 uy=a.defineComponent({props:cy,emits:["pick"],setup(e,{slots:t,emit:n}){const[i,l]=e.modelValue.map(J=>J||ty()),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}),f=(J,V)=>!J||!V?0:J.getTime()-V.getTime(),d=()=>{c.currentView=e.selectionMode,c.leftPickerTable=`${c.currentView}-table`,c.rightPickerTable=`${c.currentView}-table`},g=a.ref(null),m=a.ref(null),C=J=>{var V,X;J&&((V=g==null?void 0:g.value)==null||V.updateScroll(),(X=m==null?void 0:m.value)==null||X.updateScroll())},I=(J,V,X,Y=!0)=>{const ne=new Date(c[`${J}PanelDate`]);if(ne[`set${V}`](ne[`get${V}`]()+X),c[`${J}PanelDate`]=ne,!!Y)if(e.splitPanels){const le=J==="left"?"right":"left";J==="left"&&c.leftPanelDate>=c.rightPanelDate&&I(le,V,1),J==="right"&&c.rightPanelDate<=c.leftPanelDate&&I(le,V,-1)}else{const le=J==="left"?"right":"left",ge=c[`${le}PanelDate`],U=new Date(ge);if(V==="Month"){const fe=new Date(U.getFullYear(),U.getMonth()+X+1,0).getDate();U.setDate(Math.min(fe,U.getDate()))}U[`set${V}`](U[`get${V}`]()+X),c[`${le}PanelDate`]=U}},b=J=>{const V=c.currentView==="year"?-10:-1;I(J,"FullYear",V)},M=J=>{const V=c.currentView==="year"?10:1;I(J,"FullYear",V)},L=J=>{I(J,"Month",-1)},k=J=>{I(J,"Month",1)},N=J=>{c[`${J}PickerTable`]="year-table"},v=J=>{c[`${J}PickerTable`]="month-table"},p=J=>{const V="zh-CN",X="[yyyy]-[mm]",Y=c[`${J}PanelDate`],{labels:ne,separator:le}=Rf(V,X,Y),ge=U=>{const fe=U==="month"?v:N;return()=>fe(J)};return{separator:le,labels:ne.map(U=>{const fe=U;return fe.handler=ge(U.type),fe})}},w=(J,V)=>{n("pick",c.dates,J,V||e.type)},x=(J,V)=>{if(console.warn("handleRangePick"),c.rangeState.selecting||c.currentView==="time"){if(c.currentView==="time")c.dates=J;else{const[X,Y]=[c.rangeState.from,J].sort(f),ne=V==="upToNow"?new Date:new Date(new Date(new Date(Y.setHours(23)).setMinutes(59)).setSeconds(59));c.dates=[X,ne],c.rangeState={from:X,to:ne,selecting:!1}}w(!1,V||"date")}else c.upToNowEnable=new Date(J).getTime()<new Date().getTime(),c.rangeState={from:J,to:null,selecting:!0}},S=(J,V)=>{if(c[`${J}PanelDate`]=V,c[`${J}PickerTable`]==="year-table"?c[`${J}PickerTable`]="month-table":c[`${J}PickerTable`]=`${c.currentView}-table`,!e.splitPanels){const Y=J==="left"?"right":"left";c[`${Y}PanelDate`]=V,I(Y,"Month",Y==="left"?-1:1,!1)}},Q=J=>{c.rangeState.to=J};a.watch(()=>e.selectionMode,J=>{c.currentView=J||"range"});const z=a.computed(()=>c.currentView==="time"),O=a.computed(()=>p("left")),P=a.computed(()=>p("right")),E=a.computed(()=>c.leftPickerTable.split("-").shift()),_=a.computed(()=>c.rightPickerTable.split("-").shift()),G=a.computed(()=>O.value.labels[0].type==="year"||c.currentView==="date"),se=a.computed(()=>O.value.labels[1].type==="year"||c.currentView==="date"),ce=a.computed(()=>P.value.labels[0].type==="year"||c.currentView==="date"),de=a.computed(()=>P.value.labels[1].type==="year"||c.currentView==="date"),pe=a.computed(()=>{const J=`${c.currentView}-table`;return{left:c.leftPickerTable!==J,right:c.rightPickerTable!==J}}),K=a.computed(()=>({left:pe.value.left?S.bind("left"):x,right:pe.value.right?S.bind("right"):x})),Z=a.computed(()=>!!t.shortcuts);return Ne(H({},a.toRefs(c)),{isTime:z,hasShortcuts:Z,prevYear:b,nextYear:M,prevMonth:L,nextMonth:k,leftDatePanelLabel:O,rightDatePanelLabel:P,leftDatePanelView:E,rightDatePanelView:_,leftShowLabelFirst:G,leftShowLabelSecond:se,rightShowLabelFirst:ce,rightShowLabelSecond:de,preSelecting:pe,panelPickerHandlers:K,reset:d,onToggleVisibility:C,handleRangePick:x,handleChangeRange:Q})},render(){var e,t,n;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:i=>{i.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:sn("prev","-double"),onClick:()=>this.prevYear("left")},[a.createVNode(ea,{style:{fontSize:"20px",lineHeight:1}},null)]),this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:sn("prev"),onClick:()=>this.prevMonth("left")},[a.createVNode(Ai,{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:sn("next","-double"),onClick:()=>this.nextYear("left")},[a.createVNode(ta,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels||this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:sn("next"),onClick:()=>this.nextMonth("left")},[a.createVNode(Sn,{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(cc,{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:sn("prev","-double"),onClick:()=>this.prevYear("right")},[a.createVNode(ea,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels&&this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:sn("prev","-double"),onClick:()=>this.prevMonth("right")},[a.createVNode(Ai,{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:sn("next","-double"),onClick:()=>this.nextYear("right")},[a.createVNode(ta,{style:{fontSize:"20px",lineHeight:1}},null)]),this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:sn("next"),onClick:()=>this.nextMonth("right")},[a.createVNode(Sn,{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(cc,{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"},[(n=(t=(e=this.$slots).shortcuts)==null?void 0:t.call(e))!=null?n:null]):null])}});const dy={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};var fy=a.defineComponent({name:"DatePicker",directives:{clickoutside:sa},props:dy,emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=di(),l=e.type.includes("range"),o=l?[null,null]:[null];let c=ny((l?e.modelValue:[e.modelValue])||[])?o:Ps(e.modelValue,e.type,e.multiple,e.format),f=null;e.shortcutSelectedIndex!==-1&&(f=e.shortcuts[e.shortcutSelectedIndex]||null,f&&(c=f.value()));const d=a.reactive({showClose:!1,visible:!1,internalValue:c,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:c[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:c.map(Af),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:f,onSelectionModeChange:g});function g(U){let fe=U;return U.match(/^date/)&&(fe="date"),d.selectionMode=["year","month","date","time"].indexOf(fe)>-1&&fe,d.selectionMode}const m=a.computed(()=>{if(e.multiple)return d.internalValue.slice();const U=e.type.includes("range");let fe=d.internalValue.map(he=>he instanceof Date?new Date(he):he||"");return e.type.match(/^time/)&&(fe=fe.map(he=>Ca(he,e.type,e.multiple,e.format))),U||e.multiple?fe:fe[0]}),C=a.computed(()=>e.type.match(/^time/)?m.value:e.multiple?Ca(m.value,e.type,e.multiple,e.format):Array.isArray(m.value)?m.value.map(U=>Ca(U,e.type,e.multiple,e.format)):Ca(m.value,e.type,e.multiple,e.format)),I=a.computed(()=>e.type==="daterange"||e.type==="datetimerange"?"DateRangePanel":"DatePanel"),b=a.computed(()=>e.open===null?d.visible:e.open),M=a.computed(()=>Ca(d.internalValue,e.type,e.multiple,e.format)),L=a.computed(()=>{var U;return((U=d.shortcut)==null?void 0:U.text)&&e.useShortcutText?d.shortcut.text:M.value}),k=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),N=a.computed(()=>!!t.header),v=a.computed(()=>!!t.footer),p=a.computed(()=>!!t.shortcuts),w=a.computed(()=>{let U="";return e.fontSize==="medium"?U="medium-font":e.fontSize==="large"&&(U="large-font"),U}),x=a.computed(()=>{let U="";return e.fontSize==="medium"?U="medium-width":e.fontSize==="large"&&(U="large-width"),U}),S=a.computed(()=>{var U;return((U=d.shortcut)==null?void 0:U.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),Q=a.computed(()=>I.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),z=a.ref(null),O=()=>{var U;(U=z==null?void 0:z.value)==null||U.focus()};a.watch(()=>d.visible,U=>{var fe,he;U===!1&&((fe=P.value)==null||fe.destoryDropdown()),(he=P.value)==null||he.updateDropdown(),n("open-change",U)});const P=a.ref(null);a.watch(()=>e.modelValue,U=>{d.internalValue=Ps(U,e.type,e.multiple,e.format)}),a.watch(()=>e.open,U=>{d.visible=U===!0}),a.watch(()=>e.type,U=>{g(U)}),a.watch(()=>m,(U,fe)=>{const he=JSON.stringify(U),F=JSON.stringify(fe);(he!==F||typeof U!=typeof fe)&&n("input",U)}),a.onMounted(()=>{e.type.indexOf("date")>-1,d.timeEnterMode=!0;const U=e.modelValue,fe=m.value;(typeof U!=typeof fe||JSON.stringify(U)!==JSON.stringify(fe))&&n("input",m.value),e.open!==null&&(d.visible=e.open),a.provide(iy,{props:e,focus:()=>O()})});const E=a.ref(null),_=U=>{var fe;if(d.disableCloseUnderTransfer)return d.disableCloseUnderTransfer=!1,!1;if(U&&U.type==="mousedown"&&d.visible){U.preventDefault(),U.stopPropagation();return}if(d.visible){const he=(fe=E==null?void 0:E.value)==null?void 0:fe.$el;if(U&&he&&he.contains(U.target))return;d.visible=!1,U==null||U.preventDefault(),U==null||U.stopPropagation();return}d.isFocused=!1,d.disableClickOutSide=!1},G=()=>{var U,fe;(U=z==null?void 0:z.value)==null||U.focus(),(fe=z==null?void 0:z.value)==null||fe.click()},se=()=>{e.readonly||e.disabled||M!=null&&M.value&&(d.showClose=!0)},ce=U=>{console.log("handleInputMouseleave"),d.showClose=!1},de=U=>{a.nextTick(()=>{var fe,he;n("change",C.value,U),n("update:modelValue",m.value),(fe=i==null?void 0:i.validate)==null||fe.call(i,"change"),e.type.indexOf("time")<0&&((he=z==null?void 0:z.value)==null||he.blur())})},pe=U=>{var at;const fe=e.type.includes("range")||e.multiple,he=M.value,F=U.target.value,ie=Ps(F,e.type,e.multiple,e.format),Me=fe?ie:ie[0],we=(at=e.disableDate)==null?void 0:at.call(e,Me),Ee=ie.reduce((te,oe)=>te&&oe instanceof Date,!0);F!==he&&!we&&Ee?(de(e.type),d.internalValue=ie):d.forceInputRerender=d.forceInputRerender+1},K=U=>{e.readonly||(d.isFocused=!0,!(U&&U.type==="focus")&&(e.disabled||(d.visible=!0)))},Z=()=>{var U;(U=E==null?void 0:E.value)==null||U.reset()},J=U=>{var fe,he;if(d.internalFocus){d.internalFocus=!1;return}if(d.visible){U.preventDefault();return}d.isFocused=!1,g(e.type),d.internalValue=d.internalValue.slice(),Z(),(fe=E==null?void 0:E.value)==null||fe.onToggleVisibility(!1),(he=i==null?void 0:i.validate)==null||he.call(i,"blur")},V=U=>{const{keyCode:fe}=U;if(fe===9&&d.visible)if(U.stopPropagation(),U.preventDefault(),k.value){const F=".bk-picker-confirm > *",ie=P.value.$el.querySelectorAll(F);d.internalFocus=!0,[...ie][U.shiftKey?"pop":"shift"]().focus()}else _();const he=[37,38,39,40];if(!d.visible&&he.includes(fe)){d.visible=!0;return}fe===27&&d.visible&&(U.stopPropagation(),_()),!!he.includes(fe)&&d.focusedTime.active&&U.preventDefault()},X=()=>{d.visible=!1,d.internalValue=d.internalValue.map(()=>null),n("clear"),de(e.type),Z(),d.showClose=!1,d.shortcut=null,setTimeout(()=>g(e.type),500)},Y=()=>{e.appendToBody&&(d.disableCloseUnderTransfer=!0)},ne=()=>{var U;d.visible=!1,a.nextTick(()=>{n("pick-success")}),(U=z==null?void 0:z.value)==null||U.blur(),Z()},le=(U,fe=!1,he,F)=>{let ie=U;if(e.multiple){const we=ie.getTime(),Ee=d.internalValue.findIndex(oe=>oe&&oe.getTime()===we),te=[...d.internalValue,ie].filter(Boolean).map(oe=>oe.getTime()).filter((oe,ye,Se)=>Se.indexOf(oe)===ye&&ye!==Ee);d.internalValue=te.map(oe=>new Date(oe))}else ie=Ps(U,e.type,e.multiple,e.format),d.internalValue=Array.isArray(ie)?ie:[ie];if(d.internalValue[0]){const[we]=d.internalValue;d.focusedDate=we}d.focusedTime=Ne(H({},d.focusedTime),{time:d.internalValue.map(Af)}),k.value||(g(e.type),d.visible=fe),he==="upToNow"&&e.type==="daterange"&&ne(),d.shortcut=F,de(he);const Me=e.shortcuts.findIndex(we=>we===d.shortcut);n("shortcut-change",d.shortcut,Me)},ge=a.ref(null);return Ne(H({},a.toRefs(d)),{panel:I,publicStringValue:C,opened:b,visualValue:M,displayValue:L,isConfirm:k,hasHeader:N,hasFooter:v,hasShortcuts:p,fontSizeCls:w,longWidthCls:x,localReadonly:S,allowCrossDayProp:Q,pickerDropdownRef:P,inputRef:z,triggerRef:ge,pickerPanelRef:E,handleClose:_,handleIconClick:G,handleInputMouseenter:se,handleInputMouseleave:ce,handleFocus:K,handleBlur:J,handleKeydown:V,handleInputChange:pe,handleClear:X,handleTransferClick:Y,onPick:le,onPickSuccess:ne})},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(Dn,{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(Tp,{class:[this.appendToBody?"bk-date-picker-transfer":""],ref:"pickerDropdownRef",triggerRef:this.triggerRef,placement:this.placement,extPopoverCls:this.extPopoverCls,appendToBody:this.appendToBody,onClick:this.handleTransferClick},{default:()=>{var o,c,f,d,g,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(f=(c=(o=this.$slots).header)==null?void 0:c.call(o))!=null?f:null]):null,this.panel==="DateRangePanel"?a.createVNode(uy,{ref:"pickerPanelRef",type:this.type,confirm:this.isConfirm,shortcuts:this.shortcuts,modelValue:this.internalValue,selectionMode:this.selectionMode,startDate:this.startDate,disableDate:this.disableDate,focusedDate:this.focusedDate,onPick:this.onPick,"onPick-success":this.onPickSuccess},t):a.createVNode(oy,{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},t),this.hasFooter?a.createVNode("div",{class:["bk-date-picker-footer-wrapper",this.footerSlotCls]},[(m=(g=(d=this.$slots).footer)==null?void 0:g.call(d))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}});const Wf=Ze(fy);var An=(e=>(e.OBJECT_ARRAY="objectArray",e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e))(An||{});const hy={title:h.arrayOf(h.string).def([]),extCls:h.string.def(""),searchPlaceholder:h.string.def(""),settingKey:h.string.def("id"),displayKey:h.string.def("value"),sortKey:h.string.def("value"),showOverflowTips:h.bool.def(!1),searchable:h.bool.def(!1),sortable:h.bool.def(!1),sourceList:h.arrayOf(h.any).def([]),targetList:h.arrayOf(h.any).def([]),emptyContent:h.arrayOf(h.string).def([])};function gy(e,t,n){const i=a.ref([]),l=a.ref([]),o=()=>{e.value.forEach(c=>{const f=c[n.value];t.value.includes(f)?l.value.push(c):i.value.push(c)})};return o(),a.watch(()=>[e,t,n],o),{selectList:i,selectedList:l}}function my(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 py=a.defineComponent({name:"Transfer",props:hy,emits:["change","update:targetList"],setup(e,{emit:t}){const n=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(p=>p.toString().includes("[object Object]"))?An.OBJECT_ARRAY:An.BASE_ARRAY:An.NOT_ARRAY),i=a.computed(()=>n.value===An.BASE_ARRAY?"value":e.settingKey),l=a.computed(()=>n.value===An.BASE_ARRAY?"value":e.displayKey),o=a.computed(()=>e.sortKey||l.value),c=a.computed(()=>{switch(n.value){case An.BASE_ARRAY:return[...new Set(e.sourceList)].map(v=>({value:v}));case An.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:f}=a.toRefs(e),{selectList:d,selectedList:g}=gy(c,f,i),{selectSearchQuery:m,selectListSearch:C}=my(d,l),I=a.computed(()=>[...C.value].sort((v,p)=>{const w=v[o.value],x=p[o.value];return w>x?1:-1})),b=a.computed(()=>[...g.value].sort((v,p)=>{const w=v[o.value],x=p[o.value];return w>x?1:-1})),M=()=>{d.value=[],g.value=[...c.value],N()},L=()=>{d.value=[...c.value],g.value=[],N()},k=(v,p)=>{const w=p?d:g,x=p?g:d,S=w.value.findIndex(Q=>Q[i.value]===v);x.value.push(...w.value.splice(S,1)),N()},N=()=>{const v=d.value.map(w=>w[i.value]),p=g.value.map(w=>w[i.value]);t("update:targetList",p),t("change",n.value===An.BASE_ARRAY?v:d.value.map(w=>a.toRaw(w)),n.value===An.BASE_ARRAY?p:g.value.map(w=>a.toRaw(w)),p)};return{selectSearchQuery:m,selectListSearch:C,selectedList:g,selectListSort:I,selectedListSort:b,settingCode:i,displayCode:l,allToRight:M,allToLeft:L,handleItemClick:k}},render(){const e=this.sortable?this.selectListSort:this.selectListSearch,t=this.sortable?this.selectedListSort:this.selectedList,n=c=>{var C,I;const f=c==="left-header",d=f?`${(C=this.title[0])!=null?C:"\u5DE6\u4FA7\u5217\u8868"}`:`${(I=this.title[1])!=null?I:"\u53F3\u4FA7\u5217\u8868"}`,g=f?!e.length:!t.length,m=()=>{g||(f?this.allToRight():this.allToLeft())};return this.$slots[c]?a.createVNode("div",{class:"slot-header"},[this.$slots[c]()]):a.createVNode("div",{class:"header"},[`${d}\uFF08\u5171${f?e.length:t.length}\u6761\uFF09`,a.createVNode("span",{class:{disabled:g},onClick:()=>m()},[f?"\u5168\u90E8\u6DFB\u52A0":"\u6E05\u7A7A"])])},i=c=>{var g;const f=c==="left-empty-content",d=(g=f?this.emptyContent[0]:this.emptyContent[1])!=null?g:f?"\u65E0\u6570\u636E":"\u672A\u9009\u62E9\u4EFB\u4F55\u9879";return this.$slots[c]?a.createVNode("div",null,[this.$slots[c]()]):a.createVNode("div",{class:"empty"},[d])},l=(c,f=!0)=>a.createVNode("div",{class:"item-content"},[a.createVNode("span",{class:"content-text",title:c[this.displayCode]},[c[this.displayCode]]),a.createVNode("span",{class:"icon-wrapper"},[f?a.createVNode(no,{class:"bk-icon"},null):a.createVNode(jn,{class:"bk-icon"},null)])]),o=c=>{const f=c==="left",d=f?e:t,g=f?"source-option":"target-option",m=f?"left-empty-content":"right-empty-content";return d.length?a.createVNode("ul",{class:["content",this.searchable&&f?"is-search":""]},[d.map(C=>{var I,b,M;return a.createVNode("li",{key:C[this.settingCode],class:[this.$slots[g]?"custom-item":""],onClick:()=>this.handleItemClick(C[this.settingCode],f)},[(M=(b=(I=this.$slots)[g])==null?void 0:b.call(I,C))!=null?M:l(C,f)])})]):i(m)};return a.createVNode("div",{class:["bk-transfer",this.extCls]},[a.createVNode("div",{class:"source-list"},[n("left-header"),this.searchable&&a.createVNode(Vi,{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 Bf=Ze(py);var Ma=(e=>(e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_EXPAND="nodeExpand",e.NODE_CHECKED="nodeChecked",e))(Ma||{});const Es=(...e)=>!0,yy={nodeClick:Es,nodeCollapse:Es,nodeExpand:Es,nodeChecked:Es};var q=(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))(q||{});const Ii={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"},by={data:h.arrayOf(h.any).def([]),label:h.oneOfType([h.func.def(void 0),h.string.def("label")]),nodeKey:h.string.def(void 0),children:h.string.def("children"),indent:h.number.def(18),lineHeight:h.number.def(32),levelLine:h.oneOfType([h.bool.def(!1),h.func.def(void 0),h.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:h.bool.def(!1),prefixIcon:h.oneOfType([h.func.def(()=>{}),h.bool.def(!1)]).def(!0),async:h.shape({callback:h.func.def(void 0),cache:h.bool.def(!0),deepAutoOpen:h.commonType(["once","every"],"columnType").def("once")}),offsetLeft:h.number.def(5),search:h.oneOfType([h.shape({value:h.oneOfType([h.number,h.string,h.bool]).def(""),match:h.oneOfType([h.commonType(["fuzzy","full"],"TreeSearchMatchType"),h.func]),resultType:h.commonType(["tree","list"],"TreeSearchResultType").def("tree"),openResultNode:h.bool}),h.string,h.number,h.bool]).def(void 0),emptyText:h.string.def("\u6CA1\u6709\u6570\u636E"),draggable:h.bool.def(!1),dragSort:h.bool.def(!1),selectable:h.bool.def(!0),showCheckbox:h.bool.def(!1),showNodeTypeIcon:h.bool.def(!0),selected:h.oneOfType([h.string,null,h.number,h.object]).def(null),autoCheckChildren:h.bool.def(!0),autoOpenParentNode:h.bool.def(!0)};var Cy=(e,{slots:t})=>({renderEmpty:n=>a.createVNode(hs,{scene:"part",type:n},{default:()=>{var i,l;return[(l=(i=t.default)==null?void 0:i.call(t))!=null?l:e.emptyText]}})}),Os=(e,t)=>{const n=E=>e.schema.get(E),i=(E,_)=>{var G;return(G=n(E[q.UUID]))==null?void 0:G[_]},l=(E,_,G)=>{e.schema.set(E[q.UUID],Ne(H({},n(E[q.UUID])),{[_]:G}))},o=E=>i(E,q.PATH),c=E=>i(E,q.UUID),f=E=>i(E,q.IS_ROOT),d=E=>i(E,q.IS_OPEN),g=E=>i(E,q.HAS_CHILD),m=E=>i(E,q.IS_MATCH),C=E=>i(E,q.IS_CHECKED),I=E=>i(E,q.PARENT_ID),b=E=>i({[q.UUID]:E},q.PARENT_ID),M=E=>i(E,q.IS_LOADING),L=(E,_)=>{l(E,q.IS_LOADING,_)},k=E=>e.schema.delete(E),N=E=>n(I(E)),v=E=>{var _;return typeof E=="object"?d(E):typeof E=="string"?(_=n(E))==null?void 0:_[q.IS_OPEN]:!1},p=E=>v(i(E,q.PARENT_ID)),w=E=>f(E)||p(E),x=E=>E.split("-").reduce((G,se)=>{const ce=Number(se);return Array.isArray(G)?G[ce]:G[t.children][ce]},t.data),S=E=>{const _=e.schema;return Array.prototype.filter.call(Array.from(_.keys()),G=>_.get(G)[q.PARENT_ID]===E[q.UUID])},Q=E=>x(o({[q.UUID]:E})),z=E=>f({[q.UUID]:E})?{[t.children]:t.data}:Q(b(E)),O=E=>({[Ii[q.IS_LOADING]]:i(E,q.IS_LOADING),[Ii[q.HAS_CHILD]]:g(E),[Ii[q.IS_MATCH]]:m(E),[Ii[q.IS_CHECKED]]:C(E),[Ii[q.IS_OPEN]]:d(E),[Ii[q.IS_ROOT]]:f(E),fullPath:i(E,q.PATH),uuid:c(E),parentId:i(E,q.PARENT_ID)});return{getSchemaVal:n,getNodeAttr:i,getNodeId:c,getNodeParentId:I,getNodeParentIdById:b,getParentNodeData:z,getParentNode:N,setNodeAttr:l,getNodePath:o,isRootNode:f,isNodeOpened:d,hasChildNode:g,isItemOpen:v,isNodeChecked:C,isNodeMatched:m,isNodeLoading:M,checkNodeIsOpen:w,getSourceNodeByPath:x,getSourceNodeByUID:Q,deleteNodeSchema:k,resolveScopedSlotParam:O,setTreeNodeLoading:L,extendNodeAttr:E=>Ne(H({},E),{[q.TREE_NODE_ATTR]:O(E)}),getChildNodes:S}};const Hf="1px dashed #c3cdd7",Gf=(e,t,n=null,i=null,l=null,o=[])=>{const c=e[t];return typeof c=="boolean"?c?i:l:Zf(n,e,t,o)},Zf=(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}},Yf=(e,t)=>Zf(e,t,"label"),uc=(e,t)=>e.get(t)||{},My=(e,t,n)=>{var i;return(i=uc(e,t))==null?void 0:i[n]},Iy=(e,t)=>({"--level-line":Gf(t,"levelLine",e,Hf,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),wy=(e,t,n={})=>{const{schema:i}=n,l=My(i,e[q.UUID],q.DEPTH);return H({"--depth":l},typeof t.levelLine=="function"?{"--level-line":Gf(t,"levelLine",e,Hf,null,["node"])}:{})},vy=(e,t,n)=>{const{__is_root:i,__is_open:l}=uc(t,e[q.UUID])||{};return{"is-root":i,"bk-tree-node":!0,"is-open":l,"is-virtual-render":n.virtualRender,"level-line":n.levelLine}},Ny=(e,t)=>{const{__is_checked:n,__is_selected:i}=uc(t,e[q.UUID])||{};return{"is-checked":n,"is-selected":i,[Be("node-row")]:!0}},Ly=(e,t,n,i,l)=>{ky(e,t,n,{[i]:l})},ky=(e,t,n,i)=>{const o=e.split("-").reduce((c,f)=>{const d=Number(f);return Array.isArray(c)?c[d]:c[n][d]},t);Object.assign(o,i||{})},Ia=e=>e==null?{__IS_NULL:!0}:typeof e=="string"||typeof e=="number"||typeof e=="symbol"?{[q.UUID]:e}:(Object.prototype.hasOwnProperty.call(e,q.UUID)||console.error("setNodeAction Error: node id cannot found"),e);var Ff=(e,t)=>{const{setNodeAttr:n,getNodePath:i,getNodeAttr:l,resolveScopedSlotParam:o,setTreeNodeLoading:c}=Os(t,e),f=(m,C)=>{if(typeof m=="object"&&m!==null){n(C,q.IS_OPEN,!0);const I=Array.isArray(m)?m:[m];return Ly(i(C),e.data,e.children,e.children,I),Promise.resolve(m)}return Promise.resolve(m)},d=m=>{const{callback:C=null,cache:I=!0}=e.async||{};if(typeof C=="function"&&l(m,q.IS_ASYNC)){if(n(m,q.IS_ASYNC_INIT,!0),!l(m,q.IS_CACHED)){n(m,q.IS_CACHED,I);const b=o(m),M=C(m,L=>f(L,m),b);if(typeof M=="object"&&M!==null)return c(m,!0),M instanceof Promise?Promise.resolve(M.then(L=>f(L,m)).catch(L=>console.error("load remote data error:",L)).finally(()=>{c(m,!1),n(m,q.IS_CACHED,!0)})):(f(M,m),c(m,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},g=()=>{const m=t.data.filter(C=>l(C,q.IS_ASYNC)&&C[Ii[q.IS_OPEN]]&&!l(C,q.IS_ASYNC_INIT));m.length&&Promise.all(m.map(C=>d(C))).then(()=>{g()}).catch(C=>{console.warn(C)})};return{asyncNodeClick:d,deepAutoOpen:g}},Ty=(e,t,n,i,l,o)=>{let c=e.selected;const{setNodeAttr:f,getNodePath:d,getSchemaVal:g,getNodeAttr:m,getNodeId:C,getChildNodes:I,isRootNode:b,hasChildNode:M,isItemOpen:L,isNodeOpened:k,isNodeLoading:N,isNodeChecked:v,getParentNode:p,resolveScopedSlotParam:w,extendNodeAttr:x}=Os(n,e),{registerNextLoop:S}=o,{asyncNodeClick:Q,deepAutoOpen:z}=Ff(e,n),O=F=>L(F)?a.createVNode(co,{class:[Be("tree-icon"),Be("node-prefix")]},null):a.createVNode(uo,{class:[Be("tree-icon"),Be("node-prefix")]},null),P=F=>{if(typeof F=="string")return F;if(typeof F=="object"&&F!==null){if(F.__v_isVNode)return F;const{node:ie,className:Me,text:we,style:Ee}=F;return a.h(ie,{class:Me,style:Ee},we)}return null},E=F=>{var ie,Me,we;return((we=(Me=(ie=t.slots).nodeLoading)==null?void 0:Me.call(ie,x(F)))!=null?we:N(F))?a.createVNode(os,null,null):""},_=F=>{if(t.slots.nodeAction)return t.slots.nodeAction(x(F));let ie=null;return N(F)?E(F):typeof e.prefixIcon=="function"&&(ie=e.prefixIcon(x(F),"node_action"),ie!=="default")?P(ie):(ie==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon)&&(M(F)||F.async||!e.autoCheckChildren)?L(F)?a.createVNode(is,{class:Be("node-prefix")},null):a.createVNode(ra,{class:Be("node-prefix")},null):null},G=F=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(x(F));let ie=null;return typeof e.prefixIcon=="function"&&(ie=e.prefixIcon(x(F),"node_type"),ie!=="default")?P(ie):ie==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?b(F)||M(F)?O(F):a.createVNode(yo,{class:[Be("tree-icon"),Be("node-prefix")]},null):null},se=(F,ie)=>{const Me=p(F);Me&&(f(Me,q.IS_CHECKED,ie),b(Me)||se(Me,ie))},ce=(F,ie,Me)=>{I(F).forEach(we=>{f({[q.UUID]:we},ie,Me),ce({[q.UUID]:we},ie,Me)})},de=(F,ie)=>{f(F,q.IS_CHECKED,!!ie),ce(F,q.IS_CHECKED,!!ie),se(F,ie),t.emit(Ma.NODE_CHECKED,l.value.filter(Me=>v(Me)).map(Me=>Me[q.UUID]))},pe=F=>v(F)&&!l.value.filter(ie=>{var Me;return(Me=d(ie))==null?void 0:Me.startsWith(d(F))}).every(ie=>v(ie)),K=F=>v(F)||l.value.filter(ie=>{var Me;return(Me=d(ie))==null?void 0:Me.startsWith(d(F))}).some(ie=>v(ie)),Z=F=>e.showCheckbox?a.createVNode(Ri,{size:"small",modelValue:K(F),indeterminate:pe(F),onChange:ie=>de(F,ie)},null):null,J=(F,ie=null,Me=null,we=!0)=>{const Ee=ie===null?!L(F):!!ie;if(Ee||ce(F,q.IS_OPEN,Ee),f(F,q.IS_OPEN,Ee),we){const at=L(F)?Ma.NODE_EXPAND:Ma.NODE_COLLAPSE;t.emit(at,F,w(F),g(F[q.UUID]),Me)}},V=(F,ie,Me)=>{if(Array.isArray(F)){F.forEach(we=>f(Ia(we),ie,Me));return}f(Ia(F),ie,Me)},X=(F,ie=!0,Me=!1)=>{const we=Ia(F);if(!we[q.IS_NULL])if(Me)if(ie){if(V(we,q.IS_OPEN,!0),!b(we)){const Ee=m(we,q.PARENT_ID);X(Ee,!0,!0)}}else J(we,!1,null,!1);else V(we,q.IS_OPEN,ie)},Y=(F,ie)=>{if(k(F)){J(F,!1,ie);return}Q(F).finally(()=>{m(F,q.IS_LOADING)?S("setNodeOpenedAfterLoading",{type:"once",fn:()=>J(F,!0,ie)}):J(F,!0,ie)})},ne=(F,ie)=>{F.stopImmediatePropagation(),F.stopPropagation(),F.preventDefault(),Y(ie,F)},le=(F,ie=!0,Me=!0)=>{const we=Array.isArray(F)?F:[F];if(!we.length)return;const Ee=Ia(we[0]);Ee[q.IS_NULL]||(e.selectable?(c!=null&&f({[q.UUID]:c},q.IS_SELECTED,!ie),e.selected&&e.selected!==c&&f({[q.UUID]:e.selected},q.IS_SELECTED,!ie),f(Ee,q.IS_SELECTED,ie),c=C(Ee),Me&&we.length===1&&X(Ee,!0,!0),m(Ee,q.IS_ASYNC)&&Q(Ee).then(()=>{a.nextTick(()=>{we.shift(),le(we,ie,Me)})})):console.warn("props.selectable is false or undefined, please set selectable with true"))},ge=(F,ie)=>{le(F,!0,!1),k(F)||Y(F,ie);const Me=Ma.NODE_CLICK;t.emit(Me,F,w(F),g(F[q.UUID]),ie)},U=(F,ie)=>{if(b(ie))return!1;const Me=d(ie),we=`${Me}`.split("-").slice(0,F+1);if(we.join("-")===Me)return!0;const at=we.pop(),te=parseInt(at,10);we.push(`${te+1}`);const oe=we.join("-");return l.value.some(ye=>ye[q.PATH]===oe)},fe=F=>{if(!e.levelLine)return null;const ie=we=>({"--depth":we}),Me=m(F,q.DEPTH)+1;return new Array(Me).fill("").map((we,Ee)=>Ee).filter(we=>U(we,F)).filter(we=>we>0).map(we=>a.createVNode("span",{class:"node-virtual-line",style:ie(Me-we)},null))};return{renderTreeNode:F=>{var ie,Me,we,Ee,at;return a.createVNode("div",{"data-tree-node":C(F),key:C(F),class:Ny(F,n.schema)},[a.createVNode("div",{class:vy(F,n.schema,e),style:wy(F,e,n),onClick:te=>ge(F,te)},[a.createVNode("span",{class:[Be("node-action")],onClick:te=>ne(te,F)},[_(F)]),a.createVNode("span",{class:Be("node-content")},[[Z(F),G(F)],a.createVNode("span",{class:Be("node-text")},[(we=(Me=(ie=t.slots).node)==null?void 0:Me.call(ie,x(F)))!=null?we:[Yf(F,e)]]),(at=(Ee=t.slots).nodeAppend)==null?void 0:at.call(Ee,x(F))]),fe(F)])])},hanldeTreeNodeClick:Y,deepAutoOpen:z,asyncNodeClick:Q,setNodeAction:V,setNodeOpened:J,setSelect:le,setOpen:X}},xy=(e,t,n)=>{const{getSourceNodeByUID:i,getNodeParentIdById:l,getParentNodeData:o,getNodeAttr:c,getNodePath:f,isRootNode:d}=Os(n,e),g=v=>v.target.closest("[data-tree-node]"),m=v=>{g(v).removeEventListener("mouseup",m)},C=v=>{const p=g(v);p.setAttribute("draggable","true"),p.addEventListener("mouseup",m)},I=v=>{v.preventDefault();const p=g(v),w=v.dataTransfer.getData("node-id"),x=p.getAttribute("data-tree-node"),S=L(w,x)?"move":"none";v.dataTransfer.effectAllowed=S,v.dataTransfer.dropEffect=S},b=v=>{v.dataTransfer.effectAllowed="move",v.dataTransfer.dropEffect="move";const p=g(v);v.dataTransfer.setData("text/plain",""),v.dataTransfer.setData("node-id",p.getAttribute("data-tree-node"))},M=v=>{v.preventDefault(),v.stopPropagation();const p=g(v),w=v.dataTransfer.getData("node-id"),x=p.getAttribute("data-tree-node");Reflect.apply(e.dragSort?k:N,globalThis,[w,x])},L=(v,p)=>{const w=f({[q.UUID]:v}),x=f({[q.UUID]:p}),S=l(v),Q=l(p);return S===Q?!0:w.indexOf(x)===-1&&x.indexOf(w)===-1},k=(v,p)=>{if(!L(v,p))return;const w=JSON.parse(JSON.stringify(i(v))),x=JSON.parse(JSON.stringify(i(p))),S=o(v),Q=o(p),z=c({[q.UUID]:v},q.INDEX),O=c({[q.UUID]:p},q.INDEX);S==null||S[e.children].splice(z,1,x),Q==null||Q[e.children].splice(O,1,w)},N=(v,p)=>{const w=i(v),x=i(p);let S=null;if(d({[q.UUID]:v}))S=e.data;else{const Q=l(v);if(Q!=null){S=i(Q);const z=c({[q.UUID]:v},q.INDEX);S==null||S[e.children].splice(z,1)}}x[e.children]||(x[e.children]=[]),x[e.children].unshift(w)};a.onMounted(()=>{if(e.draggable&&t.value){const v=t.value.$el;v.addEventListener("mousedown",C),v.addEventListener("dragstart",b),v.addEventListener("dragover",I),v.addEventListener("drop",M)}}),a.onUnmounted(()=>{if(e.draggable&&t.value){const v=t.value.$el;v.removeEventListener("mousedown",C),v.removeEventListener("dragstart",b),v.removeEventListener("dragover",I),v.removeEventListener("drop",M)}})},Sy=e=>{var I;const t=a.toRef(e,"search"),{openResultNode:n=!1,resultType:i="tree"}=(I=e.search)!=null?I:{},l=b=>["string","number","boolean"].includes(typeof b),o=(b,M)=>b===M,c=(b,M)=>new RegExp(`${b}`,"i").test(`${M}`),f=(b,M)=>Reflect.apply(b,globalThis,M),d=t.value===void 0||t.value===!1,g=(b,M)=>{if(d)return!0;if(l(t.value))return f(c,[t.value,b,M]);const{value:L="",match:k="fuzzy"}=t.value,v=typeof k=="function"?k:k==="fuzzy"?c:o;return`${L}`.length===0?!0:f(v,[L,b,M])},m=a.computed(()=>t.value!==!1&&(l(t.value)?`${t.value}`.length>0:typeof t.value=="object"));return{searchFn:g,refSearch:t,isSearchActive:m,isSearchDisabled:d,openResultNode:n,resultType:i,isTreeUI:i==="tree"}},Dy=e=>{var k;const t=(N,v=void 0,p=[])=>{const{data:w,children:x}=N,S=[],Q=[];let z=0;const O=new Map;function P(K,Z,J,V){if(K!=null&&O.has(K)&&![q.UUID,q.PARENT_ID].includes(Z)){const X=O.get(K);Object.prototype.hasOwnProperty.call(X,Z)&&typeof V=="function"&&Reflect.apply(V,self,[X,Z,J])&&(Object.assign(X,{[Z]:J}),P(X[q.PARENT_ID],Z,J,V))}}function E(K){let Z=null;return typeof N.nodeKey=="string"&&(Z=K[N.nodeKey]||zi.v4()),Z||K[q.UUID]||zi.v4()}const _={[q.IS_OPEN]:()=>!1,[q.IS_CHECKED]:()=>!1,[q.IS_MATCH]:()=>!0,[q.IS_SELECTED]:K=>N.selected===K,[q.IS_CACHED]:()=>!1,[q.IS_ASYNC]:()=>null,[q.IS_LOADING]:()=>!1};function G(K,Z,J,V=void 0){let X=V;V===void 0&&typeof _[J]=="function"&&(X=_[J](K,Z));const Y=Ii[J];if(Object.prototype.hasOwnProperty.call(Z,Y))return Z[Y];const ne=(p||[]).find(ge=>ge[q.UUID]===K);let le;return ne&&(le=ne[J]),le==null&&(le=X),le}function se(K,Z){return N.selectable?G(K,Z,q.IS_SELECTED,N.selected===K):!1}function ce(K,Z,J){var Y;const V=G(K,Z,q.IS_OPEN),X=O.has(J)?(Y=O.get(J))==null?void 0:Y[q.IS_OPEN]:!0;return V&&X}function de(K){return!K[q.IS_OPEN]}function pe(K,Z=0,J=null,V=null){const X=K.length;for(let Y=0;Y<X;Y++){const ne=K[Y];if(Array.isArray(ne))pe(ne,Z,J,V);else if(typeof ne=="object"&&ne!==null){const le=V!==null?`${V}-${Y}`:`${Y}`,ge=`${E(ne)}`,U=!!(ne[x]||[]).length;let fe=G(ge,ne,q.IS_OPEN);N.autoOpenParentNode?fe&&P(J,q.IS_OPEN,!0,de):fe=ce(ge,ne,J),Object.assign(ne,{[q.UUID]:ge});const he=N.showCheckbox&&G(ge,ne,q.IS_CHECKED);he&&S.push(ge),O.set(ge,{[q.DEPTH]:Z,[q.INDEX]:Y,[q.UUID]:ge,[q.PARENT_ID]:J,[q.HAS_CHILD]:U,[q.PATH]:le,[q.IS_ROOT]:J===null,[q.ORDER]:z,[q.IS_SELECTED]:se(ge,ne),[q.IS_MATCH]:G(ge,ne,q.IS_MATCH),[q.IS_OPEN]:fe,[q.IS_CHECKED]:he,[q.IS_CACHED]:G(ge,ne,q.IS_CACHED),[q.IS_ASYNC]:G(ge,ne,q.IS_ASYNC),[q.IS_LOADING]:G(ge,ne,q.IS_LOADING),[x]:null}),z+=1,Q.push(Ne(H({},JSON.parse(JSON.stringify(ne,(F,ie)=>F===N.children?null:ie))),{[q.IS_OPEN]:fe,[x]:null})),Object.prototype.hasOwnProperty.call(ne,x)&&pe(ne[x]||[],Z+1,ge,le)}}}return pe(v||w),N.showCheckbox&&(S==null||S.forEach(K=>{Array.from(O.values()).filter(Z=>{var J;return(J=Z[q.PATH])==null?void 0:J.startsWith(O.get(K)[q.PATH])}).forEach(Z=>Object.assign(Z,{[q.IS_CHECKED]:!0})),P(K,q.IS_CHECKED,!0,()=>!0)})),[Q,O]},n=t(e),i=new Map,l=[],o=[],c=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),f=a.computed(()=>Array.from(c.schema.values())),{asyncNodeClick:d,deepAutoOpen:g}=Ff(e,c),m=N=>{l.push(N)},C=(N,v,p=!0)=>{p&&i.has(N)&&i.delete(N),i.set(N,v)},I=N=>typeof N=="function"?{type:"loop",fn:N}:typeof N=="object"&&typeof N.type=="string"&&typeof N.fn=="function"?N:(console.error("loop event error",N),null),b=N=>{var p;const v=I(N);return v!==null&&Reflect.apply(v.fn,globalThis,[]),(p=v==null?void 0:v.type)!=null?p:"once"},M=()=>{Array.from(i.keys()).forEach(N=>{const v=i.get(N);if(Array.isArray(v)){const p=[];v.forEach((w,x)=>{b(w)==="once"&&p.unshift(x)}),p.length&&p.forEach(w=>v.splice(w,1)),v.length===0&&i.delete(N)}else b(v)==="once"&&i.delete(N)})};a.watch(()=>[e.data],N=>{var p,w;const v=t(e,N,f.value);c.data=v[0],c.schema=v[1],((p=e.async)==null?void 0:p.callback)&&((w=e.async)==null?void 0:w.deepAutoOpen)==="every"&&g(),M()},{deep:!0}),e.selectable&&a.watch(()=>e.selected,N=>{o.length=0,l.forEach(v=>{Reflect.apply(v,globalThis,[N]),o.push(()=>Reflect.apply(v,globalThis,[N]))}),C("afterSelectWatch",o)},{immediate:!0});const L=N=>{C("afterDataUpdate",N)};return(k=e.async)!=null&&k.callback&&g(),{flatData:c,schemaValues:f,asyncNodeClick:d,deepAutoOpen:g,afterDataUpdate:L,registerNextLoop:C,onSelected:m}},jy=a.defineComponent({name:"Tree",props:by,emits:yy,setup(e,t){const{flatData:n,schemaValues:i,onSelected:l,registerNextLoop:o}=Dy(e),{setNodeAttr:c,checkNodeIsOpen:f,getNodeAttr:d,getNodePath:g,isRootNode:m,isNodeOpened:C,isNodeChecked:I,isNodeMatched:b,hasChildNode:M}=Os(n,e),{searchFn:L,isSearchActive:k,refSearch:N,openResultNode:v,isTreeUI:p,isSearchDisabled:w}=Sy(e);w||a.watch([N],()=>{n.data.forEach(Z=>{const J=L(Yf(Z,e),Z);c(Z,q.IS_MATCH,J),v&&P(Z,!0,!0)})});const x=Z=>{if(k.value){const J=()=>p?i.value.some(V=>{var X;return((X=V[q.PATH])==null?void 0:X.startsWith(g(Z)))&&V[q.IS_MATCH]}):!1;return d(Z,q.IS_MATCH)||J()}return!0},S=a.computed(()=>n.data.filter(Z=>f(Z)&&x(Z))),{renderTreeNode:Q,hanldeTreeNodeClick:z,setNodeOpened:O,setOpen:P,setNodeAction:E,setSelect:_,asyncNodeClick:G}=Ty(e,t,n,S,i,{registerNextLoop:o}),se=(Z,J=!0)=>{E(Ia(Z),q.IS_CHECKED,J)};l(Z=>{_(Z,!0,e.autoOpenParentNode)});const ce=()=>n;t.expose({hanldeTreeNodeClick:z,isNodeChecked:I,isRootNode:m,isNodeOpened:C,isNodeMatched:b,hasChildNode:M,setOpen:P,setChecked:se,setNodeAction:E,setNodeOpened:O,setSelect:_,asyncNodeClick:G,getData:ce});const de=a.ref(),{renderEmpty:pe}=Cy(e,t);xy(e,de,n);const K=Z=>{if(Z.length)return Z.map(Q);const J=k.value?"search-empty":"empty";return pe(J)};return()=>a.createVNode(Ts,{class:Be("tree"),style:Iy(null,e),list:S.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:Be("container"),throttleDelay:0,ref:de},{default:Z=>K(Z.data||[])})}});const _f=Ze(jy),Uf=e=>e.__v_isVNode;var zy=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(Uf(e[n])){i=e[n];break}n=n+1}let l=t-1,o=null;for(;l>=0&&l>n;){if(Uf(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 f="bk-compose-form-item-tail";o.props.class&&(f+=` ${o.props.class}`),this.tailBackgroundColor&&(o.props.style=Object.assign(o.props.style||{},{"background-color":this.tailBackgroundColor})),o.props.class=f}}return a.h("div",{class:"bk-compose-form-item"},e)}});const Py={formType:h.oneOf(["default","vertical"]).def("default"),labelWidth:h.oneOfType([Number,String]),labelPosition:h.oneOf(["left","center","right"]),model:h.object,rules:h.object};var Ey=a.defineComponent({name:"Form",props:Py,emits:["submit"],setup(e,t){let n=[];const i=d=>{n.push(d)},l=d=>{n=n.reduce((g,m)=>(m!==d&&g.push(m),g),[])};return a.provide(kd,{props:e,register:i,unregister:l}),{handleSubmit:d=>{d.preventDefault(),t.emit("submit")},validate:d=>{let g={};return d?g=(typeof d=="string"?[d]:d).reduce((C,I)=>Ne(H({},C),{[I]:!0}),{}):g=n.reduce((m,C)=>C.property?Ne(H({},m),{[C.property]:!0}):m,{}),Promise.all(n.reduce((m,C)=>(g[C.property]&&m.push(C.validate()),m),[])).then(()=>Promise.resolve(e.model))},clearValidate:d=>{let g={};d?g=(typeof d=="string"?[d]:d).reduce((C,I)=>Ne(H({},C),{[I]:!0}),{}):g=n.reduce((m,C)=>Ne(H({},m),{[C.property]:!0}),{}),n.forEach(m=>g[m.property]&&m.clearValidate())}}},render(){var t,n;const e=ke({"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)])}}),Cn={required:e=>(console.log("required",e,e!==""&&e!==void 0&&e!==null),e!==""&&e!==void 0&&e!==null),min:(e,t)=>(console.log("min"),e>=t),max:(e,t)=>(console.log("max"),t>=e),email:e=>(console.log("email"),/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(e)),maxlength:(e,t)=>(console.log("maxlength"),e.length<=t),pattern:(e,t)=>(console.log("pattern"),t.test(e))};const Oy={label:h.string,labelWidth:h.oneOfType([Number,String]),labelPosition:h.oneOf(["left","center","right"]),property:h.string.def(""),required:h.bool.def(!1),email:h.bool.def(!1),max:h.number,min:h.number,maxlength:h.number,rules:h.array,autoCheck:h.bool.def(!1),description:h.string,errorDisplayType:h.oneOf(["tooltips","normal"]).def("normal")},Jy=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Ay=e=>{const t=[];return e.required&&t.push({validator:Cn.required,message:`${e.label}\u4E0D\u80FD\u4E3A\u7A7A`,trigger:"blur"}),e.email&&t.push({validator:Cn.email,message:`${e.label}\u683C\u5F0F\u4E0D\u6B63\u786E`,trigger:"blur"}),Number(e.max)>-1&&t.push({validator:n=>Cn.max(n,e.max),message:`${e.label}\u6700\u5927\u503C${e.max}`,trigger:"blur"}),Number(e.min)>-1&&t.push({validator:n=>Cn.min(n,e.min),message:`${e.label}\u6700\u5C0F\u503C${e.min}`,trigger:"blur"}),Number(e.maxlength)>-1&&t.push({validator:n=>Cn.maxlength(n,e.maxlength),message:`${e.label}\u6700\u5927\u957F\u5EA6${e.maxlength}`,trigger:"blur"}),t},Qy=(e,t)=>{const n=e.reduce((i,l)=>{let o;if(l.required)o=Cn.required;else if(l.email)o=Cn.email;else if(Number(l.max)>-1)o=c=>Cn.max(c,l.max);else if(Number(l.min)>-1)o=c=>Cn.min(c,l.max);else if(Number(l.maxlength)>-1)o=c=>Cn.min(c,l.max);else if(Object.prototype.toString.call(l.pattern)==="[object RegExp]")o=c=>Cn.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]},Vy=(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),[]),$f=e=>e!==void 0;var Ry=a.defineComponent({name:"FormItem",directives:{bkTooltips:Oo},props:Oy,setup(e){const t=a.getCurrentInstance(),n=a.reactive({isError:!1,errorMessage:""}),i=n4(),l=Boolean(i),o=a.computed(()=>l?i.props.formType==="vertical":!1),c=a.computed(()=>{const g={width:"",paddingRight:"",textAlign:""},m=$f(e.labelWidth)?e.labelWidth:l&&i.props.labelWidth;$f(m)&&(g.width=`${m}px`,g.paddingRight=m?"":"0px");const C=e.labelPosition||l&&i.props.labelPosition;return C&&(g["text-align"]=C),g}),f=g=>{if(n.isError=!1,n.errorMessage="",!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=Vy(g,Qy(m,Ay(e)));const C=rn.exports.get(i.props.model,e.property),I=(()=>{let b=-1;return()=>{if(b=b+1,b>=m.length)return Promise.resolve(!0);const M=m[b];return Promise.resolve().then(()=>{const L=M.validator(C);return typeof L!="boolean"&&typeof L.then=="function"?L.then(k=>{if(k===!1)return Promise.reject(M.message)}).then(()=>I(),()=>(n.isError=!0,n.errorMessage=M.message,Promise.reject(M.message))):L?I():(n.isError=!0,n.errorMessage=M.message,Promise.reject(M.message))})}})();return I()},d=()=>{n.isError=!1,n.errorMessage=""};return a.provide(Td,Ne(H({},e),{validate:f,clearValidate:d})),a.onMounted(()=>{l&&i.register(t.proxy)}),a.onBeforeUnmount(()=>{l&&i.unregister(t.proxy)}),Ne(H({},a.toRefs(n)),{labelStyles:c,isFormTypeVertical:o,validate:f,clearValidate:d})},render(){var i,l,o,c;const e=ke({"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(lo,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 Xf=At(Ey,{FormItem:Ry,ComposeFormItem:zy}),Wy={span:h.number.def(1),offset:h.number.def(0),pull:h.number.def(0),push:h.number.def(0)};var By=a.defineComponent({name:"Col",props:Wy,emits:[],setup(e,t){const{col:n,gutter:i,flex:l}=a.inject("containerProps"),{span:o,offset:c,pull:f,push:d}=e,g=a.computed(()=>o||n);a.provide("containerProps",{col:g.value,gutter:i,flex:l});const m=function(I){return`${Number((I*100).toFixed(3))}%`},C=a.computed(()=>({width:m(g.value/n),"padding-right":`${i/2}px`,"padding-left":`${i/2}px`,"margin-left":c?m(c/n):null,right:f?m(f/n):null,left:d?m(d/n):null}));return()=>{var I,b;return a.createVNode("div",{class:"bk-grid-col",style:C.value},[(b=(I=t.slots).default)==null?void 0:b.call(I)])}}});const Hy={col:h.number.def(24),gutter:h.number.def(20),margin:h.number.def(20),flex:h.bool.def(!1),extCls:h.string};var Gy=a.defineComponent({name:"Container",props:Hy,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"),f=a.computed(()=>{const{margin:d}=e;return{"padding-right":`${d}px`,"padding-left":`${d}px`}});return()=>{var d,g;return a.createVNode("div",{class:c.value,style:f.value},[(g=(d=t.slots).default)==null?void 0:g.call(d)])}}}),Zy=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(()=>Ne(H({},l?{display:["-webkit-box","-ms-flexbox","flex"]}:{}),{"margin-right":`-${i/2}px`,"margin-left":`-${i/2}px`}));return()=>{var c,f;return a.createVNode("div",{class:"bk-grid-row",style:o.value},[(f=(c=t.slots).default)==null?void 0:f.call(c)])}}});const Js=At(Gy,{Row:Zy,Col:By});var Yy=a.defineComponent({name:"Dropdown",props:{isShow:h.bool.def(!1),placement:h.commonType(["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"],"placement").def("bottom"),trigger:h.commonType(["hover","click","manual"],"trigger").def("hover"),disabled:h.bool.def(!1),extCls:h.string},emits:["showChange","show","hide"],setup(e,{emit:t}){let n=Object.create(null);const i=a.ref(null),l=a.ref(null);a.onMounted(()=>{f()}),a.onBeforeUnmount(()=>{d()}),a.watch(()=>e.isShow,m=>{a.nextTick(()=>{e.trigger==="manual"&&n&&!e.disabled&&(m?n.show():n.hide())})}),a.watch(()=>e.disabled,m=>g(m));const o=()=>{t("show")},c=()=>{t("hide")},f=()=>{e.disabled||(n=new Fl(i.value,l.value,{placement:e.placement,trigger:e.trigger,afterShow:o,afterHidden:c}),e.trigger==="manual"&&e.isShow&&n.show())},d=()=>{if(n){const m=n;m.isShow&&m.hide(),m.destroy(),n=null,e.trigger==="manual"&&t("showChange",!1)}},g=m=>{const C=n;e.trigger==="manual"&&!m&&t("showChange",!1),C.updateDisabled(m)};return{reference:i,refContent:l}},render(){var t,n,i,l;const e=ke({"bk-dropdown":!0},this.$props.extCls);return a.createVNode("div",{class:e},[a.createVNode("div",{ref:"reference",class:"bk-dropdown-reference"},[(n=(t=this.$slots).default)==null?void 0:n.call(t)]),a.createVNode("div",{ref:"refContent",class:"bk-dropdown-content"},[(l=(i=this.$slots).content)==null?void 0:l.call(i)])])}}),Fy=a.defineComponent({name:"DropdownItem",props:{extCls:h.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)])}}),_y=a.defineComponent({name:"DropdownMenu",props:{extCls:h.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 Kf=At(Yy,{DropdownMenu:_y,DropdownItem:Fy});var dc=a.defineComponent({name:"CascaderPanel",props:{store:h.object.def({})},emits:["input"],setup(e,{emit:t}){const{store:n}=e,i=a.reactive({list:[e.store.getNodes()]}),l=a.ref([]),o=a.ref([]),c=M=>{M.config.multiple?o.value=n.getCheckedNodes().map(L=>L.path):o.value=M.path,t("input",o.value)},f=()=>{t("input",[])},d=M=>{var L;if(!M.isDisabled){if(i.list=i.list.slice(0,M.level),l.value=l.value.slice(0,M.level-1),(L=M.children)!=null&&L.length){i.list.push(M.children),l.value.push(M);return}if(n.config.isRemote&&!M.isLeaf){M.loading=!0;const k=N=>{n.appendNodes(N,M||null),i.list.push(M.children),l.value.push(M),M.loading=!1};n.config.remoteMethod(M,k),console.log("remote fuck here")}}};return{menus:i,activePath:l,nodeExpandHandler:d,isNodeInPath:M=>(l.value[M.level-1]||{}).id===M.id,nodeEvent:M=>{const{trigger:L,checkAnyLevel:k,multiple:N}=M.config;return{onClick:p=>{(!M.isLeaf||N)&&p.stopPropagation(),L==="click"&&d(M),k&&!N&&c(M),M.isLeaf&&!N&&c(M)},onMouseenter:()=>{L==="hover"&&d(M)}}},isCheckedNode:(M,L)=>{const{multiple:k}=M.config;return k?!1:Sd(L,M.path)},checkValue:o,nodeClear:f,checkNode:(M,L)=>{M.setNodeCheck(L),c(M)},iconRender:M=>M.loading?a.createVNode(os,{class:"icon-spinner"},null):a.createVNode(Sn,{class:"icon-angle-right"},null)}},render(){return a.createVNode("div",{class:"bk-cascader-panel-wrapper"},[this.menus.list.map(e=>a.createVNode("ul",{class:"bk-cascader-panel"},[e.map(t=>a.createVNode("li",a.mergeProps({class:["bk-cascader-node",{"is-selected":this.isNodeInPath(t)},{"is-disabled":t.isDisabled},{"is-checked":this.isCheckedNode(t,this.checkValue)}]},this.nodeEvent(t)),[t.config.multiple&&a.createVNode(Ri,{disabled:t.isDisabled,modelValue:t.checked,"onUpdate:modelValue":n=>t.checked=n,onChange:n=>this.checkNode(t,n)},null),a.createVNode("span",{class:"bk-cascader-node-name"},[t.name]),t.isLeaf?"":this.iconRender(t)]))]))])}});class As{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 As(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 this.data.disabled}setNodeCheck(t){this.checked=t}calculateNodesPath(){const t=[this];let{parent:n}=this;for(;n;)t.unshift(n),n=n.parent;return t}}const qf=(e,t)=>e.reduce((n,i)=>(i.isLeaf?n.push(i):(!t&&n.push(i),n=n.concat(qf(i.children,t))),n),[]);class Uy{constructor(t){const{list:n}=t;this.data=n,this.nodes=this.data.map(i=>new As(i,this.config)),this.config=t}getNodes(){return this.nodes}getFlattedNodes(t=!1){return qf(this.nodes,t)}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getNodeByValue(t){var i;return(i=this.getFlattedNodes().filter(l=>Sd(l.path,t))[0])!=null?i:null}appendNode(t,n){const i=new As(t,this.config,n);(n?n.children:this.nodes).push(i)}appendNodes(t,n){t.forEach(i=>this.appendNode(i,n))}}var $y=a.defineComponent({name:"Cascader",directives:{clickoutside:sa},components:{CascaderPanel:dc,BkPopover:Bi},props:{modelValue:h.array.def([]),list:h.array.def([]),placeholder:h.string.def("\u8BF7\u9009\u62E9"),filterable:h.bool.def(!1),multiple:h.bool.def(!1),disabled:h.bool.def(!1),clearable:h.bool.def(!0),trigger:h.string.def("click"),checkAnyLevel:h.bool.def(!1),isRemote:h.bool.def(!1),remoteMethod:h.func,showCompleteName:h.bool.def(!1),idKey:h.string.def("id"),nameKey:h.string.def("name"),childrenKey:h.string.def("children"),separator:h.string.def("/"),limitOneLine:h.bool.def(!1),extCls:h.string.def("")},emits:["update:modelValue","change","clear","toggle"],setup(e,{emit:t}){const{separator:n,multiple:i}=e,{isHover:l,setHover:o,cancelHover:c}=J0(),f=a.reactive(new Uy(e)),d=a.ref(!1),g=a.ref(""),m=a.ref([]),C=k=>{if(i){m.value=f.getCheckedNodes().map(N=>({text:N.pathNames.join(n),key:N.id}));return}if(k.length===0)g.value="";else{const N=f.getNodeByValue(k);g.value=N.pathNames.join(n)}t("update:modelValue",k),t("change",k)};return{store:f,updateValue:C,hidePopover:()=>{d.value=!1},inputClickHandler:k=>{k.stopPropagation(),d.value=!d.value,t("toggle",d.value)},selectedText:g,panelShow:d,handleClear:k=>{k.stopPropagation(),C([]),t("clear",JSON.parse(JSON.stringify(e.modelValue)))},isHover:l,setHover:o,cancelHover:c,selectedTags:m,removeTag:(k,N,v)=>{v.stopPropagation();const p=JSON.parse(JSON.stringify(k));p.splice(N,1),C(p)}}},render(){const e=()=>this.clearable&&this.isHover?a.createVNode(Dn,{class:"bk-icon-clear-icon",onClick:this.handleClear},null):a.createVNode(na,{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(jn,{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}],tabindex:"0","data-placeholder":this.placeholder,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[e(),a.createVNode(Bi,{placement:"bottom-start",theme:"light bk-cascader-popover",trigger:"click",arrow:!1,class:"bk-cascader-popover-wrapper",isShow:this.panelShow,"onUpdate:isShow":n=>this.panelShow=n,boundary:"body"},{default:()=>a.createVNode("div",{class:"bk-cascader-name",onClick:this.inputClickHandler},[this.multiple&&t(),this.filterable?a.createVNode("input",{class:"bk-cascader-search-input",type:"text",placeholder:this.placeholder},null):a.createVNode("span",null,[this.selectedText])]),content:()=>a.createVNode("div",{class:"bk-cascader-popover"},[a.createVNode(dc,{store:this.store,onInput:n=>this.updateValue(n)},null)])})])}});const e9=At($y,{CascaderPanel:dc});var t9=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),f=a.ref(null),d=a.ref(e.modelValue),g=a.ref(0),m=a.ref(0),C=a.ref(!1),I=a.ref(null),b=a.computed(()=>{var O,P;let Q="";if((O=e.params.customContent)!=null&&O[e.modelValue]){const E=e.params.customContent[e.modelValue];Q=E.tip||E.label||""}const z=e.params.vertical?"right":"top";return(P=e.params)!=null&&P.showTip?{content:e.params.formatterTipLabel(`${Q||(e==null?void 0:e.modelValue)||"0"}`),placement:z}:{content:"",placement:z}}),M=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),L=a.computed(()=>e.params.vertical?{bottom:M.value}:{left:M.value}),k=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),N=Q=>{e.params.disable||(Q.preventDefault(),v(Q),wa(window,"mousemove",p),wa(window,"touchmove",p),wa(window,"mouseup",w),wa(window,"touchend",w))},v=Q=>{n.value=!0,i.value=!0,e.params.vertical?l.value=Q.clientY:o.value=Q.clientX,c.value=parseFloat(M.value),f.value=c.value},p=Q=>{if(n.value){i.value=!1,t("resetSize");let z=0;e.params.vertical?(g.value=Q.clientY,z=(l.value-g.value)/e.params.sliderSize*100):(m.value=Q.clientX,z=(m.value-o.value)/e.params.sliderSize*100),f.value=c.value+z,x(f.value)}},w=()=>{C.value=!1,n.value&&(setTimeout(()=>{n.value=!1,i.value||(x(f.value),t("emitChange"))},0),Qs(window,"mousemove",p),Qs(window,"touchmove",p),Qs(window,"mouseup",w),Qs(window,"touchend",w))},x=Q=>{if(Q===null||isNaN(Q))return;Q<0?f.value=0:Q>100&&(f.value=100);const z=100/((e.params.maxValue-e.params.minValue)/e.params.step);let P=Math.round(Q/z)*z*(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!==d.value&&(d.value=e.modelValue)};return{renderDom:()=>a.createVNode("div",{class:["bk-slider-button",e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],ref:I,tabindex:"0",style:L.value,onClick:Q=>Q.stopPropagation(),onMousedown:N},[Boolean(b.value.content)?a.createVNode(Bi,{content:b.value.content,theme:"dark",placement:b.value.placement,boundary:document.body},{default:()=>[a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]}):a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null),e.params.showButtonLabel&&!e.params.showIntervalLabel?a.createVNode("div",{class:["slider-button-label",e.params.vertical?"vertical":"horizontal"]},[k.value]):void 0]),setPosition:x,tip:b}},render(){return this.renderDom()}});const wa=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},Qs=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)};var Xy=a.defineComponent({name:"Slider",props:{modelValue:h.oneOfType([h.array,h.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),f=a.ref(0),d=a.ref(0),g=a.ref(null),m=a.ref(null),C=a.ref(null),I=a.ref(null),b=a.computed(()=>{const J=[e.minValue,e.maxValue,e.step].map(V=>{const X=`${V}`.split(".")[1];return X?X.length:0});return Math.max.apply(null,J)}),M=a.computed(()=>Math.min(l.value,o.value)),L=a.computed(()=>Math.max(l.value,o.value)),k=a.computed(()=>e.range?`${100*(L.value-M.value)/(e.maxValue-e.minValue)}%`:`${100*(l.value-e.minValue)/(e.maxValue-e.minValue)}%`),N=a.computed(()=>e.range?`${100*(M.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),v=a.computed(()=>e.vertical?{height:k.value,bottom:N.value}:{width:k.value,left:N.value}),p=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const J=(e.maxValue-e.minValue)/e.step,V=100*e.step/(e.maxValue-e.minValue),X=[];for(let Y=1;Y<J;Y++)X.push(Y*V);return e.range?X.filter(Y=>Y<100*(M.value-e.minValue)/(e.maxValue-e.minValue)||Y>100*(L.value-e.minValue)/(e.maxValue-e.minValue)):X.filter(Y=>Y>100*(l.value-e.minValue)/(e.maxValue-e.minValue))}),w=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),x=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const J=100*e.step/(e.maxValue-e.minValue),V=[];for(let X=e.minValue,Y=0;X<=e.maxValue;X+=e.step,Y++){const ne={stepWidth:Y*J,stepLabel:e.formatterLabel(X)};V.push(ne)}return V}),S=a.computed(()=>Array.isArray(e.modelValue)),Q=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((J,V)=>Number(J)-Number(V)).filter(J=>Number(J)>=e.minValue&&Number(J)<=e.maxValue).map(J=>{const{tip:V}=e.customContent[J],{label:X}=e.customContent[J];return{tip:V||X||"",label:X||"",percent:(Number(J)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),z=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:b.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{_()}),a.watch(()=>l.value,J=>{e.range?n("update:modelValue",[M.value,L.value]):n("update:modelValue",J),f.value=J}),a.watch(()=>o.value,J=>{n("update:modelValue",[M.value,L.value]),d.value=J}),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),O(),wa(window,"resize",O())});const O=()=>{g.value&&(i.value=g.value[`client${e.vertical?"Height":"Width"}`])},P=J=>{var V,X;if(J.stopPropagation(),!e.disable){if(O(),e.vertical){const Y=(V=g.value)==null?void 0:V.getBoundingClientRect().bottom;ce((Y-J.clientY)/i.value*100)}else{const Y=(X=g.value)==null?void 0:X.getBoundingClientRect().left;ce((J.clientX-Y)/i.value*100)}G()}},E=()=>e.range?![M.value,L.value].every((J,V)=>J===c.value[V]):e.modelValue!==c.value,_=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const J=e.modelValue;e.range&&Array.isArray(J)?J[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):J[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):J[0]<e.minValue?n("update:modelValue",[e.minValue,J[1]]):J[1]>e.maxValue?n("update:modelValue",[J[0],e.maxValue]):(l.value=Number(J[0]),o.value=Number(J[1]),E()&&(c.value=J.slice())):!e.range&&typeof J=="number"&&!isNaN(J)&&(J<e.minValue?n("update:modelValue",e.minValue):J>e.maxValue?n("update:modelValue",e.maxValue):(l.value=J,E()&&(c.value=J)))},G=async()=>{await a.nextTick(),n("change",e.range?[M.value,L.value]:e.modelValue)},se=J=>e.vertical?{bottom:`${J}%`}:{left:`${J}%`},ce=J=>{if(!e.range){m.value.setPosition(J);return}const V=e.minValue+J*(e.maxValue-e.minValue)/100;Math.abs(M.value-V)<Math.abs(L.value-V)?I.value=l.value<o.value?m.value:C.value:I.value=l.value>o.value?m.value:C.value,I.value.setPosition(J)},de=J=>{if(J==="")return;const V=parseFloat(J);V<e.minValue?(f.value=e.minValue,l.value=e.minValue):V>e.maxValue?(f.value=e.maxValue,l.value=e.maxValue):l.value=V},pe=J=>{if(J===""||typeof J=="number")return;const V=parseFloat(J);V<e.minValue?(d.value=e.minValue,o.value=e.minValue):V>e.maxValue?(d.value=e.maxValue,o.value=e.maxValue):o.value=V},K=J=>{let V=0;return J==="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 J,V;return a.createVNode("div",{class:["bk-slider",e.extCls]},[(J=t.start)==null?void 0:J.call(t),a.createVNode("div",{class:"bk-slider-runway",ref:g,style:w.value,onClick:P},[a.createVNode("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:v.value},null),e.showInterval?p.value.map((X,Y)=>a.createVNode("div",{key:Y,class:["bk-slider-interval",{vertical:e.vertical}],style:se(X)},null)):void 0,e.customContent?Q.value.map((X,Y)=>a.createVNode("div",{key:Y,class:["bk-slider-interval",{vertical:e.vertical}],style:se(X.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:K("start")}]},[e.formatterLabel(e.minValue)]),a.createVNode("div",{class:"label-end",style:[{opacity:K("end")}]},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return x.value.map((X,Y)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:Y,style:se(X.stepWidth)},[X.stepLabel]));if(e.customContent)return Q.value.map((X,Y)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:Y,style:se(X.percent)},[X.label]))}()]):void 0,a.createVNode(t9,{modelValue:l.value,"onUpdate:modelValue":X=>l.value=X,ref:m,params:z.value,onEmitChange:G,onResetSize:O},null),e.range?a.createVNode(t9,{modelValue:o.value,"onUpdate:modelValue":X=>o.value=X,ref:C,params:z.value,onEmitChange:G,onResetSize:O},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:"bk-slider-input"},[a.createVNode("div",{class:"input-item"},[a.createVNode(Vi,{type:"number",modelValue:f.value,max:e.maxValue,min:e.minValue,onChange:de},null)]),S.value&&o.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("\uFF5E")]),a.createVNode("div",{class:"input-item"},[a.createVNode(Vi,{type:"number",modelValue:d.value,max:e.maxValue,min:e.minValue,onChange:pe},null)])]:void 0]):void 0,(V=t.end)==null?void 0:V.call(t)])}}},render(){return this.renderDom()}});const n9=Ze(Xy);var Ky=a.defineComponent({name:"ResizeLayout",props:{placement:h.placement().def("left"),min:h.number.def(3),max:h.number.def(1/0),triggerWidth:h.number.def(5),triggerOffset:h.number.def(3),initialDivide:h.oneOfType([String,Number]).def("20%"),immediate:h.bool,disabled:h.bool,collapsible:h.bool,autoMinimize:h.oneOfType([Boolean,Number]).def(!1),border:h.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:f,immediate:d,autoMinimize:g}=a.toRefs(e),m=a.ref(!1),C=a.ref(!0),I=a.ref(!1),b=a.ref(null),M=a.ref({}),L=a.ref(null),k=a.ref(null),N=a.ref(null),v=a.ref(null),p=a.computed(()=>["left","right"].includes(n.value)),w=a.computed(()=>p.value?"width":"height"),x=a.computed(()=>{let K=i.value;return typeof K=="number"&&(K=`${K}px`),{[w.value]:K}}),S=a.computed(()=>({[`margin-${n.value}`]:`${l.value-o.value}px`,[w.value]:`${o.value}px`})),Q=a.computed(()=>g.value?typeof g.value=="boolean"?50:g.value:0),z=()=>{const K=L.value.getBoundingClientRect();b.value=p.value?K.width:K.height},O=new ResizeObserver(z),P=()=>{switch(k.value.style.visibility="visible",n.value){case"left":k.value.style.inset=`0 auto auto ${M.value.aside.width}px`;break;case"right":k.value.style.inset=`0 ${M.value.aside.width}px auto auto`;break;case"top":k.value.style.inset=`${M.value.aside.height}px auto auto 0`;break;case"bottom":k.value.style.inset=`auto auto ${M.value.aside.height}px 0`;break}},E=()=>{N.value.style.display="block",N.value.style.cursor=p.value?"col-resize":"row-resize"},_=K=>Math.min(c.value,Math.max(f.value,K),b.value-o.value),G=K=>{t("before-resize",K);const Z=v.value.getBoundingClientRect();M.value=Object.freeze({mouse:{clientX:K.clientX,clientY:K.clientY},aside:{width:Z.width,height:Z.height}}),E(),d.value||P(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const J=Y=>{t("resizing",Y)},V=Y=>{let ne;switch(n.value){case"top":ne=Y.clientY-M.value.mouse.clientY;break;case"right":ne=M.value.mouse.clientX-Y.clientX;break;case"bottom":ne=M.value.mouse.clientY-Y.clientY;break;case"left":ne=Y.clientX-M.value.mouse.clientX}const le=M.value.aside[w.value]+ne,ge=_(le)+l.value,U=`${ge}px`;d.value?v.value.style[w.value]=U:k.value.style[n.value]=U,J(ge)},X=()=>{if(k.value.style.visibility="hidden",N.value.style.display="none",document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",X),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{se(),t("after-resize",parseFloat(k.value.style[n.value]))}),d.value)return!1;v.value.style[w.value]=k.value.style[n.value]};document.addEventListener("mousemove",V),document.addEventListener("mouseup",X)},se=()=>{if(!g.value)return!1;const K=v.value.getBoundingClientRect();if(I.value=m.value=K[w.value]<=Q.value,!I.value)return C.value=!0,!1;de(),a.nextTick(()=>{v.value.setAttribute(`data-${w.value}`,x.value[w.value])})},ce=K=>{m.value=typeof K=="boolean"?K:!m.value,de(),t("collapse-change",m.value)},de=()=>{const K=v.value.getBoundingClientRect();pe(!m.value),m.value?(v.value.setAttribute(`data-${w.value}`,`${K[w.value]}px`),v.value.style[w.value]="5px"):(C.value=!0,v.value.style[w.value]=v.value.getAttribute(`data-${w.value}`))},pe=K=>{const Z=()=>{C.value=K,v.value.style.transition="",v.value.removeEventListener("transitionend",Z)};v.value.addEventListener("transitionend",Z),v.value.style.transition=`${w.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};return a.onMounted(()=>{O.observe(L.value)}),a.onBeforeUnmount(()=>{O.unobserve(L.value)}),{collapsed:m,asideContentVisible:C,minimized:I,limitMax:b,state:M,vertical:p,cssPropKey:w,bkResizeLayoutRef:L,resizeProxyRef:k,resizeMaskRef:N,asideRef:v,triggerStyle:S,asideStyle:x,handleMousedown:G,setCollapse:ce}},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(Sn,{class:"bk-resize-collapse",onClick:this.setCollapse},null):a.createVNode(Ai,{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 i9=Ze(Ky),qy={list:h.array.def([]),titleAble:h.bool.def(!1),extCls:h.string};var eb=a.defineComponent({name:"Timeline",props:qy,emits:["select"],setup(e,{emit:t}){const n=a.ref([]),i=c=>{const f=[];c.forEach(d=>{var g;f.push({tag:d.tag,content:d.content,type:d.type,size:d.size,color:d.color,icon:d.icon,filled:d.filled,border:(g=d.border)!=null?g:!0})}),n.value.splice(0,n.value.length,...f)},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(f){console.warn(f)}};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}`:"",f=n.filled?`${i}-filled`:"",d=n.color&&l.includes(n.color)?`${i}-${n.color}`:"";return ke({},`${i} ${o} ${c} ${d} ${f}`)};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 r9=Ze(eb),tb={list:h.array.def([]),controllable:h.bool.def(!1),showSteps:h.bool.def(!1),curProcess:h.number.def(0),displayKey:h.string.def("content"),extCls:h.string};var nb=a.defineComponent({name:"BKProcess",props:tb,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"}),console.log("props.list",e.list),(c=e.list)!=null&&c.length&&n.value.splice(0,n.value.length,...e.list)},o=async c=>{console.log(c);try{e.controllable&&c!==e.curProcess&&(console.log(e.curProcess),t("update:curProcess",c),console.log(e.curProcess),t("click",c))}catch(f){console.warn(f)}};return a.onMounted(l),{defaultProcessList:n,paddingBottom:i,jumpTo:o}},render(){const e="bk-process",t=ke({[`${this.extCls}`]:!!this.extCls},`${e}`),n=f=>f.status==="loading",i=f=>f.status==="error",l=f=>this.curProcess>=f+1||this.defaultProcessList[f].status==="done",o=f=>f.icon?f.icon:"",c=(f,d)=>f===this.curProcess-1&&n(d)?a.createVNode(ts,{class:"bk-icon bk-process-icon icon-loading"},null):i(d)?a.createVNode(jn,{class:"bk-process-icon"},null):l(f)?a.createVNode(yr,{class:"bk-process-icon-done"},null):a.createVNode("span",{class:"number"},[o(d)]);return a.createVNode("div",{class:t},[a.createVNode("ul",{style:{paddingBottom:`${this.paddingBottom}px`}},[this.defaultProcessList.map((f,d)=>a.createVNode("li",{onClick:()=>{this.jumpTo(d+1)},style:{cursor:this.controllable?"pointer":""},class:{success:this.curProcess>=d+1,current:n(f)&&d===this.curProcess-1}},[f[this.displayKey],c(d,f)]))])])}});const a9=Ze(nb),Ui="bk-upload";var Kn=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(Kn||{}),Lr=(e=>(e.NEW="new",e.UPLOADING="uploading",e.SUCCESS="success",e.FAIL="fail",e))(Lr||{});const s9=[Kn.BUTTON,Kn.DRAGGABLE,Kn.PICTURE];var qn={theme:{type:String,default:"draggable",validator:e=>!e||s9.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of \u3010${s9.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 l9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var ib=a.defineComponent({name:"UploadList",props:{theme:qn.theme,disabled:qn.disabled,files:qn.files,multiple:qn.multiple},emits:["remove"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:l,multiple:o}=a.toRefs(e),c=`${Ui}-list`,f=a.computed(()=>i.value===Kn.PICTURE),d=a.computed(()=>f.value&&!o.value),g=a.computed(()=>ke({[c]:!0,[`${c}--${i.value}`]:!0,[`${c}--disabled`]:l.value}));function m(N){const v=["Bytes","KB","MB","GB","TB"],p=Math.floor(Math.log(N)/Math.log(1024));return`${(N/1024**p).toFixed(2)}${v[p]}`}function C(N,v){n("remove",N,v)}const I=()=>{let N;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},l9(N=e.files.map(v=>{const p=ke({[`${c}__item`]:!0,[`${c}__item-picture`]:!0,[`${c}__item--${v.status}`]:!0});return a.createVNode("li",{key:v.uid,class:p},[t!=null&&t.file?t.file(v):b(v)])}))?N:{default:()=>[N]})},b=N=>[a.withDirectives(a.createVNode("img",{src:N.url,class:`${c}__picture-item-thumbnail`,alt:""},null),[[a.vShow,N.status!=="uploading"]]),a.createVNode(a.Fragment,null,[N.status==="uploading"&&a.createVNode(ga,{class:`${c}__picture-item-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:N.percentage},null)]),a.createVNode(a.Fragment,null,[!l.value&&a.createVNode("div",{class:`${c}__picture-item-actions`},[a.createVNode(ia,{class:"action-icon",onClick:v=>C(N,v)},null)])])],M=()=>{let N;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},l9(N=e.files.map(v=>{const p=ke({[`${c}__item`]:!0,[`${c}__item--${v.status}`]:!0});return a.createVNode("li",{key:v.uid,class:p},[t!=null&&t.file?t.file(v):k(v)])}))?N:{default:()=>[N]})},L=N=>{var Q;const v=(Q=N==null?void 0:N.raw)==null?void 0:Q.type,[p]=(v==null?void 0:v.split("/"))||"";let x={text:aa,image:fo,application:aa,video:Mo,audio:io}[p]||aa;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(v)&&(x=eo),a.h(x,{class:`${c}__item-file-icon`})},k=N=>[a.createVNode("div",{class:`${c}__item-icon`},[N.isPic?a.createVNode("img",{src:N.url,class:`${c}__item-thumbnail`,alt:""},null):L(N)]),a.createVNode("div",{class:`${c}__item-summary`},[a.createVNode("div",{class:`${c}__item-name`,title:N.name},[N.name]),N.status!=="uploading"&&a.createVNode("div",{class:`${c}__item-message`,title:N.statusText},[N.status==="success"&&a.createVNode("span",null,[a.createVNode(yr,{class:`${c}__item-message-success-icon`},null),N.statusText||"\u4E0A\u4F20\u6210\u529F"]),N.status==="fail"&&a.createVNode("span",null,[N.statusText||"\u4E0A\u4F20\u5931\u8D25"])]),N.status==="uploading"&&a.createVNode(ga,{class:`${c}__item-progress`,showText:!1,percent:N.percentage,size:"small"},null),N.status!=="fail"&&a.createVNode("div",{class:`${c}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-size`},[m(N.size)]),[[a.vShow,N.size]]),a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-percentage`},[N.percentage,a.createTextVNode("%")]),[[a.vShow,N.status==="uploading"]])]),!l.value&&a.createVNode("div",{class:`${c}__item-actions`},[a.createVNode(ia,{class:`${c}__item-del-icon`,onClick:v=>C(N,v)},null)])])];return()=>{var N;return a.createVNode(a.Fragment,null,[d.value?(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger((N=e.files)==null?void 0:N[0])):a.createVNode("ul",{class:g.value},[f.value?I():M(),(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger())])])}}}),o9=a.defineComponent({name:"UploadTrigger",props:{theme:qn.theme,disabled:qn.disabled,multiple:qn.multiple,accept:qn.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:f}=a.toRefs(e),d=`${Ui}-trigger`,g=a.computed(()=>i.value===Kn.BUTTON),m=a.computed(()=>i.value===Kn.DRAGGABLE),C=a.computed(()=>i.value===Kn.PICTURE),I=a.computed(()=>C.value&&!c.value),b=a.computed(()=>C.value&&!f.value?"image/png,image/jpeg,image/jpg":f.value),M=a.ref(null),L=a.computed(()=>{var _,G,se;return ke({[d]:!0,[`${d}--${i.value}`]:!0,[`${d}--single-picture`]:I.value,[`${d}--has-file`]:(_=o.value)!=null?_:!1,[`${d}--${(G=o.value)==null?void 0:G.status}`]:(se=o.value)!=null?se:!1,[`${d}--dragover`]:x.value,[`${d}--disabled`]:l.value})}),k=()=>{M.value.value=null,M.value.click()},N=_=>{const{files:G}=_.target;n("change",Array.from(G))},v=()=>{e.disabled||k()},p=_=>{_.defaultPrevented||_.target!==_.currentTarget||((_.code==="Enter"||_.code==="Space")&&k(),_.preventDefault())};function w(_,G){n("remove",_,G),G.stopPropagation(),G.preventDefault()}const x=a.ref(!1),S=()=>{const _=de=>{if(l.value)return;de.preventDefault(),x.value=!1;const pe=Array.from(de.dataTransfer.files);if(!b.value){n("change",pe);return}const K=pe.filter(Z=>{const{type:J,name:V}=Z,X=V.includes(".")?`.${V.split(".").pop()}`:"",Y=J.replace(/\/.*$/,"");return b.value.split(",").map(ne=>ne.trim()).filter(ne=>ne).some(ne=>ne.startsWith(".")?X===ne:/\/\*$/.test(ne)?Y===ne.replace(/\/\*$/,""):/^[^/]+\/[^/]+$/.test(ne)?J===ne:!1)});n("change",K)},G=de=>{de.preventDefault(),x.value=!0},se=()=>{x.value=!1},ce=ke({[`${d}__draggable`]:!0});return a.createVNode("div",{class:ce,onDrop:_,onDragover:G,onDragleave:se},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(us,{class:`${d}__draggable-icon`},null),a.createVNode("div",{class:`${d}__draggable-text`},[a.createTextVNode("\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904\u6216"),a.createVNode("span",{class:`${d}__draggable-upload-link`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])])])},Q=()=>a.createVNode(a.Fragment,null,[I.value&&e.file?O(e.file):z()]),z=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${d}__picture-inner`},[a.createVNode(ls,{class:`${d}__picture-icon`},null),a.createVNode("div",{class:`${d}__picture-text`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])]),O=_=>[a.withDirectives(a.createVNode("img",{src:_.url,class:`${d}__picture-thumbnail`,alt:""},null),[[a.vShow,_.status!=="uploading"]]),a.createVNode(a.Fragment,null,[_.status==="uploading"&&a.createVNode(ga,{class:`${d}__picture-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:_.percentage},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${d}__picture-actions`},[a.createVNode(ia,{class:"action-icon",onClick:G=>w(_,G)},null)])])],P=()=>a.createVNode(Qt,{disabled:l.value},{default:()=>[a.createVNode(us,{class:`${d}__button-icon`},null),a.createVNode("span",{class:`${d}__button-text`},[a.createTextVNode("\u4E0A\u4F20\u6587\u4EF6")])]}),E=()=>{if(g.value)return P();if(m.value)return S();if(C.value)return Q()};return()=>{var _;return a.createVNode("div",{class:L.value,tabindex:"0",onClick:v,onKeydown:p},[t.trigger?[t.trigger(),(_=t==null?void 0:t.default)==null?void 0:_.call(t)]:E(),a.createVNode("input",{ref:M,class:"bk-upload__input-file",tabindex:"-1",onChange:N,accept:b.value,multiple:c.value,disabled:l.value,type:"file"},null)])}}}),c9={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(N,v){var p=N[0],w=N[1],x=N[2],S=N[3];p+=(w&x|~w&S)+v[0]-680876936|0,p=(p<<7|p>>>25)+w|0,S+=(p&w|~p&x)+v[1]-389564586|0,S=(S<<12|S>>>20)+p|0,x+=(S&p|~S&w)+v[2]+606105819|0,x=(x<<17|x>>>15)+S|0,w+=(x&S|~x&p)+v[3]-1044525330|0,w=(w<<22|w>>>10)+x|0,p+=(w&x|~w&S)+v[4]-176418897|0,p=(p<<7|p>>>25)+w|0,S+=(p&w|~p&x)+v[5]+1200080426|0,S=(S<<12|S>>>20)+p|0,x+=(S&p|~S&w)+v[6]-1473231341|0,x=(x<<17|x>>>15)+S|0,w+=(x&S|~x&p)+v[7]-45705983|0,w=(w<<22|w>>>10)+x|0,p+=(w&x|~w&S)+v[8]+1770035416|0,p=(p<<7|p>>>25)+w|0,S+=(p&w|~p&x)+v[9]-1958414417|0,S=(S<<12|S>>>20)+p|0,x+=(S&p|~S&w)+v[10]-42063|0,x=(x<<17|x>>>15)+S|0,w+=(x&S|~x&p)+v[11]-1990404162|0,w=(w<<22|w>>>10)+x|0,p+=(w&x|~w&S)+v[12]+1804603682|0,p=(p<<7|p>>>25)+w|0,S+=(p&w|~p&x)+v[13]-40341101|0,S=(S<<12|S>>>20)+p|0,x+=(S&p|~S&w)+v[14]-1502002290|0,x=(x<<17|x>>>15)+S|0,w+=(x&S|~x&p)+v[15]+1236535329|0,w=(w<<22|w>>>10)+x|0,p+=(w&S|x&~S)+v[1]-165796510|0,p=(p<<5|p>>>27)+w|0,S+=(p&x|w&~x)+v[6]-1069501632|0,S=(S<<9|S>>>23)+p|0,x+=(S&w|p&~w)+v[11]+643717713|0,x=(x<<14|x>>>18)+S|0,w+=(x&p|S&~p)+v[0]-373897302|0,w=(w<<20|w>>>12)+x|0,p+=(w&S|x&~S)+v[5]-701558691|0,p=(p<<5|p>>>27)+w|0,S+=(p&x|w&~x)+v[10]+38016083|0,S=(S<<9|S>>>23)+p|0,x+=(S&w|p&~w)+v[15]-660478335|0,x=(x<<14|x>>>18)+S|0,w+=(x&p|S&~p)+v[4]-405537848|0,w=(w<<20|w>>>12)+x|0,p+=(w&S|x&~S)+v[9]+568446438|0,p=(p<<5|p>>>27)+w|0,S+=(p&x|w&~x)+v[14]-1019803690|0,S=(S<<9|S>>>23)+p|0,x+=(S&w|p&~w)+v[3]-187363961|0,x=(x<<14|x>>>18)+S|0,w+=(x&p|S&~p)+v[8]+1163531501|0,w=(w<<20|w>>>12)+x|0,p+=(w&S|x&~S)+v[13]-1444681467|0,p=(p<<5|p>>>27)+w|0,S+=(p&x|w&~x)+v[2]-51403784|0,S=(S<<9|S>>>23)+p|0,x+=(S&w|p&~w)+v[7]+1735328473|0,x=(x<<14|x>>>18)+S|0,w+=(x&p|S&~p)+v[12]-1926607734|0,w=(w<<20|w>>>12)+x|0,p+=(w^x^S)+v[5]-378558|0,p=(p<<4|p>>>28)+w|0,S+=(p^w^x)+v[8]-2022574463|0,S=(S<<11|S>>>21)+p|0,x+=(S^p^w)+v[11]+1839030562|0,x=(x<<16|x>>>16)+S|0,w+=(x^S^p)+v[14]-35309556|0,w=(w<<23|w>>>9)+x|0,p+=(w^x^S)+v[1]-1530992060|0,p=(p<<4|p>>>28)+w|0,S+=(p^w^x)+v[4]+1272893353|0,S=(S<<11|S>>>21)+p|0,x+=(S^p^w)+v[7]-155497632|0,x=(x<<16|x>>>16)+S|0,w+=(x^S^p)+v[10]-1094730640|0,w=(w<<23|w>>>9)+x|0,p+=(w^x^S)+v[13]+681279174|0,p=(p<<4|p>>>28)+w|0,S+=(p^w^x)+v[0]-358537222|0,S=(S<<11|S>>>21)+p|0,x+=(S^p^w)+v[3]-722521979|0,x=(x<<16|x>>>16)+S|0,w+=(x^S^p)+v[6]+76029189|0,w=(w<<23|w>>>9)+x|0,p+=(w^x^S)+v[9]-640364487|0,p=(p<<4|p>>>28)+w|0,S+=(p^w^x)+v[12]-421815835|0,S=(S<<11|S>>>21)+p|0,x+=(S^p^w)+v[15]+530742520|0,x=(x<<16|x>>>16)+S|0,w+=(x^S^p)+v[2]-995338651|0,w=(w<<23|w>>>9)+x|0,p+=(x^(w|~S))+v[0]-198630844|0,p=(p<<6|p>>>26)+w|0,S+=(w^(p|~x))+v[7]+1126891415|0,S=(S<<10|S>>>22)+p|0,x+=(p^(S|~w))+v[14]-1416354905|0,x=(x<<15|x>>>17)+S|0,w+=(S^(x|~p))+v[5]-57434055|0,w=(w<<21|w>>>11)+x|0,p+=(x^(w|~S))+v[12]+1700485571|0,p=(p<<6|p>>>26)+w|0,S+=(w^(p|~x))+v[3]-1894986606|0,S=(S<<10|S>>>22)+p|0,x+=(p^(S|~w))+v[10]-1051523|0,x=(x<<15|x>>>17)+S|0,w+=(S^(x|~p))+v[1]-2054922799|0,w=(w<<21|w>>>11)+x|0,p+=(x^(w|~S))+v[8]+1873313359|0,p=(p<<6|p>>>26)+w|0,S+=(w^(p|~x))+v[15]-30611744|0,S=(S<<10|S>>>22)+p|0,x+=(p^(S|~w))+v[6]-1560198380|0,x=(x<<15|x>>>17)+S|0,w+=(S^(x|~p))+v[13]+1309151649|0,w=(w<<21|w>>>11)+x|0,p+=(x^(w|~S))+v[4]-145523070|0,p=(p<<6|p>>>26)+w|0,S+=(w^(p|~x))+v[11]-1120210379|0,S=(S<<10|S>>>22)+p|0,x+=(p^(S|~w))+v[2]+718787259|0,x=(x<<15|x>>>17)+S|0,w+=(S^(x|~p))+v[9]-343485551|0,w=(w<<21|w>>>11)+x|0,N[0]=p+N[0]|0,N[1]=w+N[1]|0,N[2]=x+N[2]|0,N[3]=S+N[3]|0}function o(N){var v=[],p;for(p=0;p<64;p+=4)v[p>>2]=N.charCodeAt(p)+(N.charCodeAt(p+1)<<8)+(N.charCodeAt(p+2)<<16)+(N.charCodeAt(p+3)<<24);return v}function c(N){var v=[],p;for(p=0;p<64;p+=4)v[p>>2]=N[p]+(N[p+1]<<8)+(N[p+2]<<16)+(N[p+3]<<24);return v}function f(N){var v=N.length,p=[1732584193,-271733879,-1732584194,271733878],w,x,S,Q,z,O;for(w=64;w<=v;w+=64)l(p,o(N.substring(w-64,w)));for(N=N.substring(w-64),x=N.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<x;w+=1)S[w>>2]|=N.charCodeAt(w)<<(w%4<<3);if(S[w>>2]|=128<<(w%4<<3),w>55)for(l(p,S),w=0;w<16;w+=1)S[w]=0;return Q=v*8,Q=Q.toString(16).match(/(.*?)(.{0,8})$/),z=parseInt(Q[2],16),O=parseInt(Q[1],16)||0,S[14]=z,S[15]=O,l(p,S),p}function d(N){var v=N.length,p=[1732584193,-271733879,-1732584194,271733878],w,x,S,Q,z,O;for(w=64;w<=v;w+=64)l(p,c(N.subarray(w-64,w)));for(N=w-64<v?N.subarray(w-64):new Uint8Array(0),x=N.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<x;w+=1)S[w>>2]|=N[w]<<(w%4<<3);if(S[w>>2]|=128<<(w%4<<3),w>55)for(l(p,S),w=0;w<16;w+=1)S[w]=0;return Q=v*8,Q=Q.toString(16).match(/(.*?)(.{0,8})$/),z=parseInt(Q[2],16),O=parseInt(Q[1],16)||0,S[14]=z,S[15]=O,l(p,S),p}function g(N){var v="",p;for(p=0;p<4;p+=1)v+=i[N>>p*8+4&15]+i[N>>p*8&15];return v}function m(N){var v;for(v=0;v<N.length;v+=1)N[v]=g(N[v]);return N.join("")}m(f("hello")),typeof ArrayBuffer!="undefined"&&!ArrayBuffer.prototype.slice&&function(){function N(v,p){return v=v|0||0,v<0?Math.max(v+p,0):Math.min(v,p)}ArrayBuffer.prototype.slice=function(v,p){var w=this.byteLength,x=N(v,w),S=w,Q,z,O,P;return p!==n&&(S=N(p,w)),x>S?new ArrayBuffer(0):(Q=S-x,z=new ArrayBuffer(Q),O=new Uint8Array(z),P=new Uint8Array(this,x,Q),O.set(P),z)}}();function C(N){return/[\u0080-\uFFFF]/.test(N)&&(N=unescape(encodeURIComponent(N))),N}function I(N,v){var p=N.length,w=new ArrayBuffer(p),x=new Uint8Array(w),S;for(S=0;S<p;S+=1)x[S]=N.charCodeAt(S);return v?x:w}function b(N){return String.fromCharCode.apply(null,new Uint8Array(N))}function M(N,v,p){var w=new Uint8Array(N.byteLength+v.byteLength);return w.set(new Uint8Array(N)),w.set(new Uint8Array(v),N.byteLength),p?w:w.buffer}function L(N){var v=[],p=N.length,w;for(w=0;w<p-1;w+=2)v.push(parseInt(N.substr(w,2),16));return String.fromCharCode.apply(String,v)}function k(){this.reset()}return k.prototype.append=function(N){return this.appendBinary(C(N)),this},k.prototype.appendBinary=function(N){this._buff+=N,this._length+=N.length;var v=this._buff.length,p;for(p=64;p<=v;p+=64)l(this._hash,o(this._buff.substring(p-64,p)));return this._buff=this._buff.substring(p-64),this},k.prototype.end=function(N){var v=this._buff,p=v.length,w,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S;for(w=0;w<p;w+=1)x[w>>2]|=v.charCodeAt(w)<<(w%4<<3);return this._finish(x,p),S=m(this._hash),N&&(S=L(S)),this.reset(),S},k.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},k.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},k.prototype.setState=function(N){return this._buff=N.buff,this._length=N.length,this._hash=N.hash,this},k.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},k.prototype._finish=function(N,v){var p=v,w,x,S;if(N[p>>2]|=128<<(p%4<<3),p>55)for(l(this._hash,N),p=0;p<16;p+=1)N[p]=0;w=this._length*8,w=w.toString(16).match(/(.*?)(.{0,8})$/),x=parseInt(w[2],16),S=parseInt(w[1],16)||0,N[14]=x,N[15]=S,l(this._hash,N)},k.hash=function(N,v){return k.hashBinary(C(N),v)},k.hashBinary=function(N,v){var p=f(N),w=m(p);return v?L(w):w},k.ArrayBuffer=function(){this.reset()},k.ArrayBuffer.prototype.append=function(N){var v=M(this._buff.buffer,N,!0),p=v.length,w;for(this._length+=N.byteLength,w=64;w<=p;w+=64)l(this._hash,c(v.subarray(w-64,w)));return this._buff=w-64<p?new Uint8Array(v.buffer.slice(w-64)):new Uint8Array(0),this},k.ArrayBuffer.prototype.end=function(N){var v=this._buff,p=v.length,w=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x,S;for(x=0;x<p;x+=1)w[x>>2]|=v[x]<<(x%4<<3);return this._finish(w,p),S=m(this._hash),N&&(S=L(S)),this.reset(),S},k.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},k.ArrayBuffer.prototype.getState=function(){var N=k.prototype.getState.call(this);return N.buff=b(N.buff),N},k.ArrayBuffer.prototype.setState=function(N){return N.buff=I(N.buff,!0),k.prototype.setState.call(this,N)},k.ArrayBuffer.prototype.destroy=k.prototype.destroy,k.ArrayBuffer.prototype._finish=k.prototype._finish,k.ArrayBuffer.hash=function(N,v){var p=d(new Uint8Array(N)),w=m(p);return v?L(w):w},k})})(c9);var u9=c9.exports;function fc(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const rb=e=>{if(typeof XMLHttpRequest=="undefined")throw new Error("XMLHttpRequest is undefined");const t=new XMLHttpRequest,{action:n}=e;t.upload&&t.upload.addEventListener("progress",o=>{const c=o;c.percent=o.total>0?o.loaded/o.total*100:0,e.onProgress(c)});const i=new FormData;if(e.data){let o=e.data;Array.isArray(o)||(o=[o]),o.forEach(c=>{for(const[f,d]of Object.entries(c))Array.isArray(d)?i.append(f,...d):i.append(f,d)})}if(e.formDataAttributes){let o=e.formDataAttributes;Array.isArray(o)||(o=[o]),o.forEach(c=>{Array.isArray(c.value)?i.append(c.name,...c.value):i.append(c.name,c.value)})}if(i.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(new Error("An error occurred during upload"))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(fc(t))}),t.addEventListener("loadend",()=>{e.onComplete()}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0),e.header)if(Array.isArray(e.header))e.header.forEach(o=>{const c=o.name,f=o.value;t.setRequestHeader(c,f)});else{const o=e.header.name,c=e.header.value;t.setRequestHeader(o,c)}const l=e.headers||{};if(l instanceof Headers)l.forEach((o,c)=>t.setRequestHeader(c,o));else for(const[o,c]of Object.entries(l))fd(c)||t.setRequestHeader(o,String(c));return t.send(i),t},d9=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,ab=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 lb(n,t),o=[];sb(e,n,i,l,o,t),await Promise.all(o).then(()=>{const c={size:n.size,name:n.name,total:i,hash:l},f=new XMLHttpRequest;f.open(e.method,e.mergeUrl,!0),f.onreadystatechange=()=>{if(f.readyState===4){if(f.status<200||f.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(fc(f))}},f.onloadend=()=>{e.onComplete()},f.setRequestHeader("Content-type","application/JSON"),f.send(JSON.stringify(c))})},sb=(e,t,n,i,l,o)=>{for(let c=0;c<n;c++){const f=new Promise((d,g)=>{const m=c*o,C=Math.min(t.size,m+o),I=new FormData;if(e.data){let L=e.data;Array.isArray(L)||(L=[L]),L.forEach(k=>{for(const[N,v]of Object.entries(k))Array.isArray(v)?I.append(N,...v):I.append(N,v)})}if(e.formDataAttributes){let L=e.formDataAttributes;Array.isArray(L)||(L=[L]),L.forEach(k=>{Array.isArray(k.value)?I.append(k.name,...k.value):I.append(k.name,k.value)})}I.append("file",d9.call(t,m,C)),I.append("name",t.name),I.append("total",n.toString()),I.append("index",c.toString()),I.append("size",t.size.toString()),I.append("hash",i.toString());const b=new XMLHttpRequest;if(b.onreadystatechange=()=>{if(b.readyState===4){const L=fc(b);b.status<200||b.status>=300?(g(L),e.onError(new Error("An error occurred during upload"))):d("reponseText")}},b.upload.addEventListener("progress",L=>{const k=L;e.onProgress(k,c)},!1),e.withCredentials&&"withCredentials"in b&&(b.withCredentials=!0),b.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(L=>{const k=L.name,N=L.value;b.setRequestHeader(k,N)});else{const L=e.header.name,k=e.header.value;b.setRequestHeader(L,k)}const M=e.headers||{};if(M instanceof Headers)M.forEach((L,k)=>b.setRequestHeader(k,L));else for(const[L,k]of Object.entries(M))fd(k)||b.setRequestHeader(L,String(k));b.send(I)});l.push(f)}},lb=(e,t)=>new Promise((n,i)=>{const l=Math.ceil(e.size/t);let o=0;const c=new u9.ArrayBuffer,f=new FileReader;function d(){const g=o*t,m=g+t>=e.size?e.size:g+t;f.readAsArrayBuffer(d9.call(e,g,m))}f.onload=g=>{if(c.append(g.target.result),o+=1,o<l)d();else{const m=c.end(),C=new u9;C.append(m),C.append(e.name);const I=C.end();n(I)}},f.onerror=()=>{i(new Error("File slcie failed"))},d()}).catch(n=>{console.log(n)});function f9(e){return Date.now()+e}var ob=(e,t)=>{const n=a.computed(()=>{var I;return typeof e.size=="number"?e.size:(I=e==null?void 0:e.size)==null?void 0:I.maxImgSize}),i=a.computed(()=>{var I;return typeof e.size=="number"?e.size:(I=e==null?void 0:e.size)==null?void 0:I.maxImgSize}),l=a.ref([]);function o(I){return l.value.find(b=>b.uid===I.uid)}let c=0;function f(I){var k;c+=1,I.uid=f9(c);const b={uid:I.uid,name:I.name,status:Lr.NEW,size:I.size,raw:I},M=I.type.startsWith("image/");let L=null;if(M){try{b.url=window.URL.createObjectURL(I)}catch(N){console.error(N)}b.isPic=!0}return e.validateName&&!((k=e.validateName)!=null&&k.test(b.name))&&(b.status=Lr.FAIL,b.statusText="invalid filename",L=new Error(b.statusText)),M&&I.size>n.value*1024**2&&(b.status=Lr.FAIL,b.statusText="invalid file size",L=new Error(b.statusText)),!M&&I.size>i.value*1024**2&&(b.status=Lr.FAIL,b.statusText="invalid file size",L=new Error(b.statusText)),l.value.push(b),L}async function d(I){var L;const b=I instanceof File?o(I):I,M=k=>{var N;t.onRemove(k,l.value),l.value.splice(l.value.indexOf(b),1),(N=k.url)!=null&&N.startsWith("blob:")&&URL.revokeObjectURL(k.url)};e.beforeRemove?await((L=e.beforeRemove)==null?void 0:L.call(e,b,l.value))!==!1&&M(b):M(b)}async function g(I,b){const M=o(b);!M||(M.status="fail",M.statusText=I.message)}async function m(I,b){const M=o(b);!M||(M.status="success",M.response=I)}async function C(I,b){const M=o(b);!M||(M.status="uploading",M.percentage=Math.round(I.percent))}return a.watch(()=>e.files,I=>{l.value=I.map(b=>{var M,L;return c+=1,Ne(H({},b),{uid:(M=b.uid)!=null?M:f9(c),status:(L=b.status)!=null?L:Lr.SUCCESS})})},{immediate:!0,deep:!0}),{fileList:l,handlePreprocess:f,handleRemove:d,handleError:g,handleSuccess:m,handleProgress:C}},cb=a.defineComponent({name:"BkUpload",props:qn,emits:["on-exceed","on-progress","on-success","on-error","on-delete","on-done"],setup(e,{slots:t,emit:n}){const i=a.shallowRef({}),l=a.computed(()=>e.theme===Kn.PICTURE),o=a.computed(()=>l.value&&!e.multiple),c=a.computed(()=>{var p;return ke({[Ui]:!0,[`${Ui}--${e.theme}`]:!0,[`${Ui}--disabled`]:e.disabled,[`${Ui}--single-picture`]:o.value,[e.extCls]:(p=e.extCls)!=null?p:!1})}),f={theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept};function d(p,w){v(p),n("on-delete",p,w)}const{fileList:g,handlePreprocess:m,handleRemove:C,handleProgress:I,handleSuccess:b,handleError:M}=ob(e,{onRemove:d});function L(p){if(!p.length)return;if(e.limit&&g.value.length+p.length>e.limit){n("on-exceed",p,g.value);return}let w=p;(!e.multiple||e.limit===1)&&(w=p.slice(0,1));for(const x of w){const S=x,Q=m(S);if(Q){n("on-error",S,g.value,Q);return}e.autoUpload&&k(S,w)}}async function k(p,w){var S;if(!e.beforeUpload)return N(p,w);let x;try{x=await((S=e.beforeUpload)==null?void 0:S.call(e,p))}catch{x=!1}if(x===!1){C(p);return}N(p,w)}function N(p,w){const{headers:x,header:S,data:Q,formDataAttributes:z,method:O,withCredentials:P,name:E,url:_,sliceUrl:G,mergeUrl:se,chunkSize:ce,customRequest:de}=e,{uid:pe}=p,K={headers:x,header:S,withCredentials:P,file:p,data:Q,formDataAttributes:z,method:O,filename:E,action:_,sliceUrl:G,mergeUrl:se,chunkSize:ce,onProgress:V=>{I(V,p),n("on-progress",V,p,g.value)},onSuccess:V=>{var Y;const X=V;if((Y=e==null?void 0:e.handleResCode)!=null&&Y.call(e,X))b(V,p),n("on-success",V,p,g.value);else{const ne=new Error((X==null?void 0:X.message)||"unknow error");M(ne,p),n("on-error",p,g.value,ne)}delete i.value[pe]},onError:V=>{M(V,p),n("on-error",p,g.value,V),delete i.value[pe]},onComplete:()=>{w.indexOf(p)===w.length-1&&n("on-done",g.value)}};let Z=e.sliceUpload?ab:rb;de&&(Z=de);const J=Z(K);i.value[pe]=J,J instanceof Promise&&J.then(K.onSuccess,K.onError)}function v(p){let w=i.value;p&&(w={[p.uid]:i.value[p.uid]}),Object.keys(w).forEach(x=>{if(w[x]instanceof XMLHttpRequest){const S=w[x];S==null||S.abort()}delete i.value[x]})}return a.onBeforeUnmount(()=>{g.value.forEach(({url:p})=>{p!=null&&p.startsWith("blob:")&&URL.revokeObjectURL(p)})}),()=>a.createVNode("div",{class:c.value},[!l.value&&a.createVNode(o9,a.mergeProps(f,{onChange:L}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${Ui}__tip`},[e.tip]),a.createVNode(ib,{files:g.value,theme:e.theme,disabled:e.disabled,multiple:e.multiple,onRemove:C},{innerTrigger:p=>l.value&&a.createVNode(o9,a.mergeProps(f,{file:p,onChange:L,onRemove:C}),t)})])}});const h9=Ze(cb);function wi(){}wi.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(L){return l?(setTimeout(function(){l(void 0,L)},0),!0):L}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var f=n.length,d=t.length,g=1,m=f+d,C=[{newPos:-1,components:[]}],I=this.extractCommon(C[0],n,t,0);if(C[0].newPos+1>=f&&I+1>=d)return c([{value:this.join(n),count:n.length}]);function b(){for(var L=-1*g;L<=g;L+=2){var k=void 0,N=C[L-1],v=C[L+1],p=(v?v.newPos:0)-L;N&&(C[L-1]=void 0);var w=N&&N.newPos+1<f,x=v&&0<=p&&p<d;if(!w&&!x){C[L]=void 0;continue}if(!w||x&&N.newPos<v.newPos?(k=db(v),o.pushComponent(k.components,void 0,!0)):(k=N,k.newPos++,o.pushComponent(k.components,!0,void 0)),p=o.extractCommon(k,n,t,L),k.newPos+1>=f&&p+1>=d)return c(ub(o,k.components,n,t,o.useLongestToken));C[L]=k}g++}if(l)(function L(){setTimeout(function(){if(g>m)return l();b()||L()},0)})();else for(;g<=m;){var M=b();if(M)return M}},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,f=t.newPos,d=f-l,g=0;f+1<o&&d+1<c&&this.equals(n[f+1],i[d+1]);)f++,d++,g++;return g&&t.components.push({count:g}),t.newPos=f,d},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],i=0;i<t.length;i++)t[i]&&n.push(t[i]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function ub(e,t,n,i,l){for(var o=0,c=t.length,f=0,d=0;o<c;o++){var g=t[o];if(g.removed){if(g.value=e.join(i.slice(d,d+g.count)),d+=g.count,o&&t[o-1].added){var C=t[o-1];t[o-1]=t[o],t[o]=C}}else{if(!g.added&&l){var m=n.slice(f,f+g.count);m=m.map(function(b,M){var L=i[d+M];return L.length>b.length?L:b}),g.value=e.join(m)}else g.value=e.join(n.slice(f,f+g.count));f+=g.count,g.added||(d+=g.count)}}var I=t[c-1];return c>1&&typeof I.value=="string"&&(I.added||I.removed)&&e.equals("",I.value)&&(t[c-2].value+=I.value,t.pop()),t}function db(e){return{newPos:e.newPos,components:e.components.slice(0)}}var g9=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,m9=/\S/,p9=new wi;p9.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!m9.test(e)&&!m9.test(t)},p9.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]&&g9.test(t[n])&&g9.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var hc=new wi;hc.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 fb(e,t,n){return hc.diff(e,t,n)}var hb=new wi;hb.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var gb=new wi;gb.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Vs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vs=function(t){return typeof t}:Vs=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vs(e)}function gc(e){return mb(e)||pb(e)||yb(e)||bb()}function mb(e){if(Array.isArray(e))return mc(e)}function pb(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function yb(e,t){if(!!e){if(typeof e=="string")return mc(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 mc(e,t)}}function mc(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 bb(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
57
+ `,z={d:Q,stroke:m||"#f5f5f5","stroke-linecap":f,"stroke-width":I,"fill-opacity":"0",class:"process-circle-trail",style:x},O={d:Q,stroke:c||"#13ce66","stroke-linecap":f,"stroke-width":l>0&&I||0,"fill-opacity":"0",class:`process-circle-path bk-${d}-circle-trail`,style:S};return a.createVNode("div",{class:"progress-outer-circle",style:M},[a.createVNode("svg",{viewBox:"0 0 100 100"},[a.createVNode("path",z,null),a.createVNode("path",O,null)]),a.createVNode("span",{class:"progress-circle-text",style:C},[n==null?void 0:n.default()])])},Z2=(e,{attrs:t,slots:n})=>{const{percent:i,strokeWidth:l,size:o,color:c,titleStyle:f,showText:d,textInside:g,theme:m}=t,C={height:`${l}px`,lineHeight:`${l}px`},I={width:`${i}%`,background:c,animationDuration:"3s"},b=(M=!0)=>(d||n.default)&&(M&&g||!M&&!g)?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:C},[a.createVNode("div",{style:I,class:{"progress-inner":!0,[`bk-${m}`]:!0}},[a.createVNode("div",{class:"inner-text",style:f},[b()])])]),b(!1)])};function x0(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var Y2=a.defineComponent({name:"Progress",props:{extCls:h.string,type:h.string.validate(e=>["line","circle","dashboard"].includes(e)).def("line"),percent:h.number.def(0),theme:h.theme().def("primary"),size:h.size(),width:h.number.def(126),strokeWidth:h.number,strokeLinecap:h.string.def("round"),textInside:h.bool.def(!1),showText:h.bool.def(!0),color:h.string,bgColor:h.string,fixed:h.number.validate(e=>e>=0&&e<=20).def(0),format:h.func.def(e=>`${e}%`),titleStyle:h.object.def({fontSize:"16px",verticalAlign:"middle"})},setup(){return{}},methods:{validPercent(e){return!e||e<0?0:e>100?100:e},renderProcessInfo(){var f;const{showText:e,format:t,percent:n,textInside:i,titleStyle:l,fixed:o}=this.$props,c=t((f=this.validPercent(n))==null?void 0:f.toFixed(o));return(e||this.$slots.default)&&i?this.$slots.default?this.$slots.default():a.createVNode("span",null,[c]):!e||i?null:a.createVNode("span",{class:"progress-text",style:typeof c=="string"?l:void 0},[this.$slots.default?this.$slots.default():c])}},render(){const e=this.renderProcessInfo(),t=Ne(H({},this.$props),{percent:this.validPercent(this.percent)});let n=a.createVNode(Z2,t,x0(e)?e:{default:()=>[e]});(this.type==="circle"||this.type==="dashboard")&&(n=a.createVNode(G2,t,x0(e)?e:{default:()=>[e]}));const i={class:ke({extCls:!!this.extCls},`bk-progress bk-progress-${this.type}`)};return a.createVNode("div",i,[n])}});const ga=Ze(Y2),S0=Symbol("RadioGroup");function D0(){const e=a.ref(!1);return[e,{blur:()=>{e.value=!1},focus:()=>{e.value=!0}}]}const j0=()=>{const e=a.getCurrentInstance(),{props:t,emit:n}=e,i=di(),l=a.inject(S0,Xl),o=!xd(l),c=a.ref(!1),f=a.computed(()=>o&&l.props.disabled?!0:t.disabled);o?a.watch(()=>l.props.modelValue,m=>{c.value=m===t.label},{immediate:!0}):a.watch(()=>t.modelValue,m=>{m!==""&&(c.value=m===t.label)},{immediate:!0});const d=(m=!0)=>{c.value=m},g=m=>{var b;if(f.value)return;const C=m.target;c.value=C.checked;const I=c.value?t.label:"";n("change",I),n("update:modelValue",I),o&&l.handleChange(e.proxy),(b=i==null?void 0:i.validate)==null||b.call(i,"change"),a.nextTick(()=>{C.checked!==c.value&&(C.checked=c.value)})};return a.onMounted(()=>{o&&l.register(e.proxy)}),a.onBeforeUnmount(()=>{o&&l.unregister(e.proxy)}),{isChecked:c,isDisabled:f,setChecked:d,handleChange:g}},F2={name:h.string.def(""),label:h.oneOfType([String,Number,Boolean]).isRequired,modelValue:h.oneOfType([String,Number,Boolean]).def(""),checked:h.bool.def(!1),disabled:h.bool.def(!1)};var _2=a.defineComponent({name:"Radio",props:F2,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=D0(),{isChecked:i,isDisabled:l,setChecked:o,handleChange:c}=j0();return{isFocused:e,isChecked:i,isDisabled:l,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=ke({"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 U2={name:h.string.def(""),label:h.oneOfType([String,Number,Boolean]).isRequired,modelValue:h.oneOfType([String,Number,Boolean]).def(""),checked:h.bool.def(!1),disabled:h.bool.def(!1),size:h.size()};var $2=a.defineComponent({name:"RadioButton",props:U2,emits:["change","update:modelValue"],setup(){const[e,{blur:t,focus:n}]=D0(),{isChecked:i,isDisabled:l,setChecked:o,handleChange:c}=j0();return{isFocused:e,isChecked:i,isDisabled:l,setChecked:o,handleBlur:t,handleFocus:n,handleChange:c}},render(){const e=ke({"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 X2={name:h.string.def(""),modelValue:h.oneOfType([String,Number,Boolean]),disabled:h.bool};var K2=a.defineComponent({name:"RadioGroup",props:X2,emits:["change","update:modelValue"],setup(e,t){const n=[],i=c=>{n.push(c)},l=c=>{const f=n.indexOf(c);f>-1&&n.splice(f,1)},o=c=>{const f=c.label;n.forEach(d=>{d!==c&&d.setChecked(!1)}),t.emit("update:modelValue",f),t.emit("change",f)};return a.provide(S0,{props:e,register:i,unregister:l,handleChange:o}),a.onMounted(()=>{e.modelValue!==""&&n.forEach(c=>{c.setChecked(c.label===e.modelValue)})}),{}},render(){var e;return a.createVNode("div",{class:"bk-radio-group"},[(e=this.$slots)==null?void 0:e.default()])}});const z0=At(_2,{Group:K2,Button:$2});var Ns=a.defineComponent({name:"Star",props:{rate:h.number.def(0),width:h.number.def(15),height:h.number.def(16),editable:h.bool.def(!0),hoverRate:h.number.def(0),max:h.number.def(5)},emits:["chooseRate","changeHover"],setup(e,{emit:t}){const n=f=>{if(!e.editable)return;const d=f+1;t("chooseRate",d)},i=f=>{if(!e.editable)return;const d=f+1;t("changeHover",d)},l=f=>ke({"bk-is-select":f<Math.floor(o.value),"bk-is-edit":e.editable,"bk-rate-star":!0}),o=a.computed(()=>e.hoverRate||e.rate),c={width:`${e.width}px`,height:`${e.height}px`,minWidth:`${e.width}px`};return()=>a.createVNode("p",{class:"bk-rate-stars"},[Array(e.max).fill(1).map((f,d)=>a.createVNode("svg",{class:l(d),style:c,x:"0px",y:"0px",viewBox:"0 0 64 64",onClick:()=>n(d),onMouseenter:()=>i(d)},[a.createVNode("g",{transform:"translate(-143.000000, -635.000000)"},[a.createVNode("g",{transform:"translate(83.000000, 114.000000)"},[a.createVNode("g",{transform:"translate(15.000000, 384.000000)"},[a.createVNode("g",{transform:"translate(29.000000, 137.000000)"},[a.createVNode("polygon",{class:"st1",points:"48,53 28.2,63.9 32,40.8 16,24.4 38.1,21 48,-0.1 57.8,21 79.9,24.4 63.9,40.8 67.7,63.9"},null)])])])])]))])}}),q2=a.defineComponent({name:"Rate",components:{star:Ns},props:{modelValue:h.number.def(0),size:h.size(),editable:h.bool.def(!0)},emits:["change","update:modelValue"],setup(e,{emit:t}){const n=di(),i=a.ref(0),l=C=>{var I;!e.editable||(t("update:modelValue",C),t("change",C),(I=n==null?void 0:n.validate)==null||I.call(n,"change"))},o=C=>{i.value=C},c=ke({"bk-rate":!0}),d={small:{width:12,height:12},large:{width:18,height:18}}[e.size]||{width:15,height:16},g=a.computed(()=>{const C=Math.floor(e.modelValue),I=(d.width+3)*C,b=d.width*(e.modelValue-C);return{width:`${I+b}px`}}),m={width:d.width,height:d.height};return()=>a.createVNode("p",{class:c},[e.editable?a.createVNode(Ns,a.mergeProps({rate:e.modelValue,"hover-rate":i.value,onChooseRate:l,onChangeHover:o,onMouseleave:()=>o(0)},m),null):[a.createVNode(Ns,a.mergeProps({rate:5,style:g.value,class:"bk-score-real",editable:!1},m),null),a.createVNode(Ns,a.mergeProps({rate:0,editable:!1},m),null)]])}});const P0=Ze(q2);var em=a.defineComponent({name:"Swiper",props:{isLoop:h.bool.def(!0),loopTime:h.number.def(8e3),pics:h.array.def([]),list:h.array.def([]),height:h.number,width:h.number},emits:["index-change"],setup(e,{emit:t,slots:n}){const{isLoop:i,loopTime:l,pics:o,list:c,height:f,width:d}=a.toRefs(e),g=a.ref(),m=a.ref(0),C=a.ref(0),I=a.ref(0),b=a.ref(0);let M;const L=a.computed(()=>{var G;return((G=c.value)==null?void 0:G.length)>0?c.value:o.value}),k=a.computed(()=>({width:`${C.value*L.value.length}px`,transform:`translateX(-${C.value*m.value}px)`})),N=a.computed(()=>({width:`${C.value}px`,height:`${I.value}px`})),v=G=>{let se=G;G>=L.value.length&&(se=0),G<0&&(se=L.value.length-1),m.value=se,t("index-change",se)},p=G=>{!G||window.open(G,"_blank")},w=G=>["bk-swiper-img",{"bk-swiper-link":G.link},G.class],x=G=>({"background-image":`url(${G.url})`,"background-color":G.color}),S=G=>({"bk-current-index":m.value===G}),Q=()=>{i.value&&(b.value=window.setTimeout(()=>{v(m.value+1),Q()},l.value))},z=()=>{window.clearTimeout(b.value)},O=()=>{var se;const G=(se=g.value)==null?void 0:se.parentElement;!G||!window.ResizeObserver||(M=new ResizeObserver(()=>{_()}),M.observe(G))},P=()=>{var G;(G=M.disconnect)==null||G.call(M)},E=G=>{if(G===void 0)return{height:0,width:0};const se=getComputedStyle(G),ce=G.clientWidth-parseFloat(se.paddingTop)-parseFloat(se.paddingBottom);return{height:G.clientHeight-parseFloat(se.paddingLeft)-parseFloat(se.paddingRight),width:ce}},_=()=>{var se;const G=E((se=g.value)==null?void 0:se.parentElement);C.value=+d.value>0?d.value:G.width,I.value=+f.value>0?f.value:G.height};return a.watch([f,d],_),a.onMounted(()=>{_(),Q(),O()}),a.onBeforeUnmount(()=>{z(),P()}),()=>a.createVNode("section",{class:"bk-swiper-home",ref:g,style:N.value},[a.createVNode("hgroup",{style:k.value,class:"bk-transition bk-swiper-main"},[L.value.map(G=>{var se,ce;return a.createVNode("h3",{class:"bk-swiper-card",style:N.value},[(ce=(se=n.default)==null?void 0:se.call(n,G))!=null?ce:a.createVNode("span",{class:w(G),style:x(G),onClick:()=>p(G.link)},null)])})]),a.createVNode("ul",{class:"bk-swiper-index"},[L.value.map((G,se)=>a.createVNode("li",{class:S(se),onMouseover:()=>v(se)},null))]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-prev",onClick:()=>v(m.value-1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)]),a.createVNode("span",{class:"bk-swiper-nav bk-nav-next",onClick:()=>v(m.value+1)},[a.createVNode("i",{class:"bk-swiper-nav-icon"},null)])])}});const E0=Ze(em),Ls=Symbol("BkSelect"),O0=Symbol("BkOptionGroup");function J0(){const e=a.ref(!1);return{isHover:e,setHover:()=>{e.value=!0},cancelHover:()=>{e.value=!1}}}function Go(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 tm(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 nm(e,t){const{popoverMinWidth:n}=e;let i=null;const l=a.ref("auto"),o=a.ref(!1),c=()=>{o.value=!o.value},f=()=>{o.value=!1},d=()=>{o.value=!0},g=()=>{var m;l.value=Math.max((m=t.value)==null?void 0:m.offsetWidth,n)};return a.onMounted(()=>{!t.value||(i=j1(t.value,g,60,!0),i.start())}),a.onBeforeUnmount(()=>{i==null||i.stop(),i=null}),{isPopoverShow:o,popperWidth:l,togglePopover:c,hidePopover:f,showPopover:d}}function im(e,t){const n=tm(""),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 ks(e=""){return e&&String(e).trim().toLowerCase()}var A0=a.defineComponent({name:"Option",props:{value:h.any,label:h.string.def(""),disabled:h.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(Ls,null),c=a.inject(O0,null),f=a.computed(()=>{var I;return(I=o==null?void 0:o.selected)==null?void 0:I.some(b=>b.value===l.value)}),d=a.computed(()=>o==null?void 0:o.multiple),g=a.computed(()=>(o==null?void 0:o.activeOptionValue)===l.value),m=()=>{i.value||o==null||o.handleOptionSelected(t)},C=()=>{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)}),Ne(H({},a.toRefs(n)),{selected:f,multiple:d,isHover:g,handleOptionClick:m,handleMouseEnter:C})},render(){var t,n,i;const e=ke({"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"},[this.label,this.multiple&&this.selected&&a.createVNode(yr,{width:22,height:22},null)])]),[[a.vShow,this.visible]])}}),rm=a.defineComponent({name:"Group",props:{label:h.string.def(""),disabled:h.bool.def(!1),collapsible:h.bool.def(!1),collapse:h.bool.def(!1)},setup(e,{emit:t}){const n=a.getCurrentInstance(),{proxy:i}=n,l=a.inject(Ls,null),o=a.reactive({groupCollapse:e.collapse,visible:!0}),c=a.ref(new Map),{register:f,unregister:d}=Go(c),g=a.computed(()=>`${e.label} (${[...c.value.values()].filter(C=>C.visible).length})`),m=()=>{!e.collapsible||e.disabled||(o.groupCollapse=!o.groupCollapse,t("update:collapse",o.groupCollapse))};return a.provide(O0,a.reactive(Ne(H({},a.toRefs(e)),{register:f,unregister:d,groupCollapse:a.toRef(o,"groupCollapse")}))),a.onBeforeMount(()=>{l==null||l.registerGroup(n.uid,i)}),a.onBeforeUnmount(()=>{l==null||l.unregisterGroup(n.uid)}),Ne(H({},a.toRefs(o)),{groupLabel:g,handleToggleCollapse:m})},render(){var i,l;const e=ke({"bk-option-group":!0,collapsible:this.collapsible,disabled:this.disabled}),t=ke({"bk-option-group-label":!0,collapsible:this.collapsible}),n=ke({"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(es,{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]])}}),am=a.defineComponent({name:"Tag",props:{theme:h.theme(["success","info","warning","danger"]).def(""),closable:h.bool.def(!1),type:h.commonType(["","filled","stroke"]).def(""),checkable:h.bool.def(!1),checked:h.bool.def(!1),radius:h.string.def("2px"),extCls:h.string.def("")},emits:["change","close"],slots:["icon"],setup(e,{emit:t}){const n=a.computed(()=>ke({"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(jn,{class:"bk-tag-close",onClick:this.handleClose},null):""])}});const Zo=Ze(am);function sm(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var lm=a.defineComponent({name:"SelectTagInput",props:{selected:{type:Array,default:()=>[]},tagTheme:h.theme(["success","info","warning","danger"]).def(""),placeholder:h.string.def(""),filterable:h.bool.def(!1),allowCreate:h.bool.def(!1),modelValue:h.any},emits:["update:modelValue","remove","focus","enter"],setup(e,{emit:t}){const n=a.inject(Ls,null),{modelValue:i}=a.toRefs(e),l=a.ref(i.value),o=a.ref();a.watch(i,()=>{l.value=i.value});const c=I=>{t("remove",I)},f=()=>{t("focus")},d=()=>{var I;(I=o.value)==null||I.focus()},g=I=>{t("update:modelValue",I.target.value)},m=I=>{switch(I.code){case"Enter":{t("enter",I.target.value,I);break}}},C=n==null?void 0:n.handleGetLabelByValue;return{value:l,inputRef:o,handleRemoveTag:c,handleFocus:f,focus:d,handleInput:g,handleKeydown:m,handleGetLabelByValue:C}},render(){var e,t,n,i;return a.createVNode("div",{class:"bk-select-tag"},[(t=(e=this.$slots)==null?void 0:e.prefix)==null?void 0:t.call(e),this.selected.map(l=>{let o;return a.createVNode(Zo,{closable:!0,theme:this.tagTheme,onClose:()=>this.handleRemoveTag(l.value)},sm(o=this.handleGetLabelByValue(l))?o:{default:()=>[o]})}),a.withDirectives(a.createVNode("input",{class:"bk-select-tag-input",ref:"inputRef",type:"text",placeholder:this.selected.length?"":this.placeholder,readonly:!this.filterable,"onUpdate:modelValue":l=>this.value=l,onFocus:this.handleFocus,onInput:this.handleInput,onKeydown:this.handleKeydown},null),[[a.vModelText,this.value]]),(i=(n=this.$slots)==null?void 0:n.suffix)==null?void 0:i.call(n)])}}),om=a.defineComponent({name:"Select",directives:{clickoutside:sa},props:{modelValue:h.any,multiple:h.bool.def(!1),disabled:h.bool.def(!1),size:h.size().def("default"),clearable:h.bool.def(!0),loading:h.bool.def(!1),filterable:h.bool.def(!1),remoteMethod:h.func,scrollHeight:h.number.def(216),showSelectAll:h.bool.def(!1),popoverMinWidth:h.number.def(0),showOnInit:h.bool.def(!1),multipleMode:h.oneOf(["default","tag"]).def("default"),tagTheme:h.theme(["success","info","warning","danger"]).def(""),behavior:h.oneOf(["normal","simplicity"]).def("normal"),collapseTags:h.bool.def(!1),noDataText:h.string.def("\u65E0\u6570\u636E"),noMatchText:h.string.def("\u65E0\u5339\u914D\u6570\u636E"),loadingText:h.string.def("\u52A0\u8F7D\u4E2D..."),placeholder:h.string.def("\u8BF7\u9009\u62E9"),selectAllText:h.string.def("\u5168\u90E8"),scrollLoading:h.bool.def(!1),allowCreate:h.bool.def(!1),popoverOptions:h.object.def({}),customContent:h.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:f,loadingText:d,noDataText:g,noMatchText:m,popoverMinWidth:C,showOnInit:I,multipleMode:b,allowCreate:M,customContent:L}=a.toRefs(e),k=di(),N=a.ref(),v=a.ref(),p=a.ref(),w=a.ref(new Map),x=a.computed(()=>[...w.value.values()]),S=a.ref(new Map),Q=a.ref([]),z=a.ref();a.watch(n,()=>{Ct()},{deep:!0});const O=a.computed(()=>i.value||f.value),P=a.computed(()=>Q.value.map(Ce=>Bt(Ce))),E=a.computed(()=>{const Ce=x.value.reduce((ze,Pe)=>(Pe.disabled||ze.push(Pe.value),ze),[]);return Ce.length<=Q.value.length&&Ce.every(ze=>Q.value.some(Pe=>Pe.value===ze))}),_=a.computed(()=>!!S.value.size),G=a.computed(()=>!x.value.length),se=a.computed(()=>x.value.length&&x.value.every(Ce=>!Ce.visible)),ce=a.computed(()=>l.value&&typeof c.value=="function"),de=a.computed(()=>!(oe.value||G.value||se.value)||L.value),pe=a.computed(()=>oe.value?d.value:G.value?g.value:se.value?m.value:""),{register:K,unregister:Z}=Go(w),{register:J,unregister:V}=Go(S),{isHover:X,setHover:Y,cancelHover:ne}=J0(),le=a.ref(!1),ge=Ce=>{le.value=!0,t("focus",Ce)},U=()=>{le.value&&t("blur"),le.value=!1},{popperWidth:fe,isPopoverShow:he,hidePopover:F,showPopover:ie,togglePopover:Me}=nm({popoverMinWidth:C.value},v),we=a.computed(()=>(l.value||M.value)&&he.value);a.watch(he,Ce=>{Ce?(ot(),Ee()):te.value=""});const Ee=()=>{var Pe;const Ce=Q.value[0],ze=w.value.get(Ce==null?void 0:Ce.value);ze&&!ze.disabled&&ze.visible?z.value=Ce==null?void 0:Ce.value:z.value=(Pe=x.value.find(ln=>!ln.disabled&&ln.visible))==null?void 0:Pe.value},at=Ce=>{!l.value||x.value.forEach(ze=>{var Pe;ze.visible=(Pe=ks(String(ze.label)))==null?void 0:Pe.includes(ks(Ce))})},{searchKey:te,searchLoading:oe}=im(ce.value?c.value:at,Ee),ye=Ce=>{var ze;Ce!==n.value&&(t("change",Ce),t("update:modelValue",Ce),(ze=k==null?void 0:k.validate)==null||ze.call(k,"change"))},Se=()=>{O.value||(Me(),t("toggle",he.value))},je=Ce=>{!l.value||(te.value=Ce)},Ae=(Ce,ze)=>{const Pe=String(Ce);!M.value||!Pe||l.value&&x.value.find(Rn=>ks(String(Rn.label))===ks(Pe))||w.value.get(Pe)||(ze.stopPropagation(),o.value?(Q.value.push({value:Pe,label:Pe}),ye(Q.value.map(Rn=>Rn.value))):(Q.value=[{value:Pe,label:Pe}],ye(Pe),F()),te.value="")},Fe=Ce=>{if(!(O.value||!Ce)){if(o.value){const ze=Q.value.findIndex(Pe=>Pe.value===Ce.value);ze>-1?Q.value.splice(ze,1):Q.value.push({value:Ce.value,label:Ce.label||Ce.value}),ye(Q.value.map(Pe=>Pe.value))}else Q.value=[{label:Ce.label||Ce.value,value:Ce.value}],ye(Ce.value),F();ot()}},ot=()=>{var Ce,ze;b.value==="tag"?(Ce=p.value)==null||Ce.focus():(ze=N.value)==null||ze.focus()},jt=Ce=>{Ce.stopPropagation(),Q.value=[],ye(o.value?[]:""),t("clear",o.value?[]:""),F()},nt=()=>{z.value=""},Mn=()=>{E.value?Q.value=[]:x.value.forEach(Ce=>{Ce.disabled||Q.value.find(ze=>ze.value===Ce.value)||Q.value.push({value:Ce.value,label:Ce.label||Ce.value})}),ye(Q.value.map(Ce=>Ce.value)),ot()},qe=Ce=>{const{scrollTop:ze,clientHeight:Pe,scrollHeight:ln}=Ce.target;ze+Pe===ln&&t("scroll-end")},_e=Ce=>{const ze=Q.value.findIndex(Pe=>Pe.value===Ce);ze>-1&&(Q.value.splice(ze,1),ye(Q.value.map(Pe=>Pe.value)))},Bt=Ce=>{var ze,Pe;return((Pe=(ze=w.value)==null?void 0:ze.get(Ce.value))==null?void 0:Pe.label)||Ce.label||Ce.value},Ct=()=>{Array.isArray(n.value)?Q.value=[...n.value.map(Ce=>({value:Ce,label:Ce}))]:n.value!==void 0&&(Q.value=[{value:n.value,label:n.value}])},Ta=Ce=>{var ln,Rn;const ze=x.value.filter(Ht=>!Ht.disabled&&Ht.visible),Pe=ze.findIndex(Ht=>Ht.value===z.value);if(!(!ze.length||Pe===-1))switch(Ce.code){case"ArrowDown":{Ce.preventDefault();const Ht=Pe>=ze.length-1?0:Pe+1;z.value=(ln=ze[Ht])==null?void 0:ln.value;break}case"ArrowUp":{Ce.preventDefault();const Ht=Pe===0?ze.length-1:Pe-1;z.value=(Rn=ze[Ht])==null?void 0:Rn.value;break}case"Backspace":{if(!o.value||!Q.value.length||te.value.length)return;Q.value.pop(),ye(Q.value.map(Ht=>Ht.value));break}case"Enter":{if(!he.value)he.value=!0;else{const Ht=w.value.get(z.value);Fe(Ht)}break}}},xa=({event:Ce})=>{var Pe;const{target:ze}=Ce;((Pe=v.value)==null?void 0:Pe.contains(ze))||v.value===ze||(F(),U())};return a.provide(Ls,a.reactive({multiple:o,selected:Q,activeOptionValue:z,register:K,unregister:Z,registerGroup:J,unregisterGroup:V,handleOptionSelected:Fe,handleGetLabelByValue:Bt})),a.onMounted(()=>{Ct(),setTimeout(()=>{I.value&&ie()})}),{selected:Q,isInput:we,options:x,isDisabled:O,selectedLabel:P,isPopoverShow:he,isHover:X,popperWidth:fe,inputRef:N,triggerRef:v,selectTagInputRef:p,searchLoading:oe,isOptionsEmpty:G,isSearchEmpty:se,isFocus:le,isShowSelectContent:de,curContentText:pe,isGroup:_,searchKey:te,setHover:Y,cancelHover:ne,handleFocus:ge,handleTogglePopover:Se,handleClear:jt,hidePopover:F,showPopover:ie,handleToggleAll:Mn,handleOptionSelected:Fe,handleClickOutside:xa,handleScroll:qe,handleDeleteTag:_e,handleInputChange:je,handleInputEnter:Ae,handleKeydown:Ta,handleSelectedAllOptionMouseEnter:nt}},render(){const e=ke({"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={theme:"light bk-select-popover",trigger:"manual",width:this.popperWidth,arrow:!1,placement:"bottom",isShow:this.isPopoverShow},n=rn.exports.merge(t,this.popoverOptions),i=()=>this.loading?a.createVNode(fi,{loading:!0,theme:"primary",class:"spinner",mode:"spin",size:"mini"},null):this.clearable&&this.isHover&&this.selected.length?a.createVNode(Dn,{class:"clear-icon",onClick:this.handleClear},null):a.createVNode(na,{class:"angle-up"},null),l=()=>this.multipleMode==="tag"?a.createVNode(lm,{ref:"selectTagInputRef",modelValue:this.searchKey,"onUpdate:modelValue":f=>this.searchKey=f,selected:this.selected,tagTheme:this.tagTheme,placeholder:this.placeholder,filterable:this.isInput,onFocus:this.handleFocus,onRemove:this.handleDeleteTag,onEnter:this.handleInputEnter},{prefix:()=>{var f,d;return(d=(f=this.$slots).prefix)==null?void 0:d.call(f)},suffix:()=>i()}):a.createVNode(Vi,{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,disabled:this.isDisabled,behavior:this.behavior,size:this.size,onFocus:this.handleFocus,onInput:this.handleInputChange,onEnter:this.handleInputEnter},{prefix:()=>{var f,d;return(d=(f=this.$slots).prefix)==null?void 0:d.call(f)},suffix:()=>i()}),o=()=>a.createVNode("div",{class:"bk-select-trigger",ref:"triggerRef",onClick:this.handleTogglePopover,onMouseenter:this.setHover,onMouseleave:this.cancelHover,onKeydown:this.handleKeydown},[l()]),c=()=>{var f,d;return a.createVNode("div",{class:"bk-select-content"},[!this.isShowSelectContent&&a.createVNode("div",{class:"bk-select-empty"},[this.searchLoading&&a.createVNode(fi,{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.multiple&&this.showSelectAll&&(!this.searchKey||!this.filterable)&&a.createVNode("li",{class:"bk-select-option",onMouseenter:this.handleSelectedAllOptionMouseEnter,onClick:this.handleToggleAll},[this.selectAllText]),(d=(f=this.$slots).default)==null?void 0:d.call(f),this.scrollLoading&&a.createVNode("li",{class:"bk-select-options-loading"},[a.createVNode(fi,{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(ha,a.mergeProps(n,{onClickoutside:this.handleClickOutside}),{default:()=>o(),content:()=>c()})])}});const Yo=At(om,{Option:A0,Group:rm});function cm(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}const{propsMixin:um}=Wi,Fo=Object.assign({},um);Fo.width.default="400",Fo.height.default="100%";var dm=a.defineComponent({name:"Sideslider",components:{BkModal:Wi,BkButton:Qt},props:Ne(H({},Fo),{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 g,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=(g=t.header)==null?void 0:g.call(t))!=null?m:e.title])])])},default:()=>{var g,m;return(m=(g=t.default)==null?void 0:g.call(t))!=null?m:"Content"},footer:()=>{var g,m;return a.createVNode("div",{class:"bk-sideslider-footer"},[(m=(g=t.footer)==null?void 0:g.call(t))!=null?m:""])}},f=`bk-sideslider-wrapper ${e.scrollable?"scroll-able":""} ${e.extCls}`,d=t.footer?"calc(100vh - 106px)":"calc(100vh - 52px)";return a.createVNode(Wi,a.mergeProps(e,{maxHeight:d,class:f,style:`${e.direction}: 0;`,onHidden:o,onShown:l,onClose:i}),cm(c)?c:{default:()=>[c]})}}});const Q0=Ze(dm),V0={theme:h.theme().def("primary"),size:h.size(),curStep:h.number.def(1),controllable:h.bool.def(!1),direction:h.commonType(["horizontal","vertical"],"direction").def("horizontal"),status:h.commonType(["","error","loading"],"status").def(""),lineType:h.commonType(["dashed","solid"],"lineType").def("dashed"),text:h.bool,extCls:h.string,steps:h.array.def([]),beforeChange:h.func};var fm=a.defineComponent({name:"Steps",props:V0,emits:["update:curStep","click"],setup(e,{emit:t}){const n=a.ref([]),i=f=>{const d=[];f.forEach(g=>{var m;typeof g=="string"?d.push(g):d.push({title:g.title,icon:g.icon,description:g.description,status:g.status,border:(m=g.border)!=null?m:!0})}),n.value.splice(0,n.value.length,...d)},l=f=>{V0.curStep=f},o=()=>{var f;n.value.splice(0,n.value.length,{title:"\u6B65\u9AA41",icon:1},{title:"\u6B65\u9AA42",icon:2},{title:"\u6B65\u9AA43",icon:3}),(f=e.steps)!=null&&f.length&&i(e.steps)},c=async f=>{try{e.controllable&&f!==e.curStep&&(typeof e.beforeChange=="function"&&await new Promise(async(d,g)=>{const m=await e.beforeChange(f);m?d(m):g(m)}),t("update:curStep",f),t("click",f))}catch(d){console.warn(d)}};return a.onMounted(o),a.watch(()=>e.steps,()=>{i(e.steps)},{deep:!0}),a.watch(()=>e.curStep,()=>{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=ke({[`${this.extCls}`]:!!this.extCls,[`bk-steps-${this.direction}`]:this.direction,[`bk-steps-${this.lineType}`]:this.lineType},`${t} ${e} ${n}`),l=C=>this.curStep>C+1||this.defaultSteps[C].status==="done",o=C=>this.curStep===C+1,c=C=>{const{icon:I}=C;return I?Object.prototype.toString.call(I)==="[object Object]":typeof C=="string"},f=(C,I)=>(I.icon||(I.icon=C),!isNaN(I.icon)),d=C=>C.status==="loading",g=C=>C.status==="error",m=(C,I)=>o(C)&&this.status==="loading"||d(I)?a.createVNode(ts,{class:"bk-icon bk-steps-icon icon-loading"},null):o(C)&&this.status==="error"||g(I)?a.createVNode(jn,{class:"bk-steps-icon"},null):l(C)?a.createVNode(yr,{class:"bk-steps-icon"},null):a.createVNode("span",null,[f(C,I)?C+1:a.createVNode(I.icon,null,null)]);return a.createVNode("div",{class:i},[this.defaultSteps.map((C,I)=>{var b,M,L;return a.createVNode("div",{class:["bk-step",C.title?"":"bk-step-no-content",l(I)?"done":"",o(I)?"current":"",o(I)&&this.status==="error"?"isError":"",C.status&&o(I)?[`bk-step-${C.status}`]:""]},[a.createVNode("span",{class:["bk-step-indicator",`bk-step-${c(C)?"icon":"number"}`,`bk-step-icon${C.status}`],style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(I+1)}},[(L=(M=(b=this.$slots)[I+1])==null?void 0:M.call(b))!=null?L:m(I,C)]),C.title?a.createVNode("div",{class:"bk-step-content"},[a.createVNode("div",{class:"bk-step-title",style:{cursor:this.controllable?"pointer":""},onClick:()=>{this.jumpTo(I+1)}},[C.title]),C.description&&a.createVNode("div",{class:"bk-step-description",title:C.description},[C.description])]):""])})])}});const R0=Ze(fm);var hm=a.defineComponent({name:"Switcher",props:{theme:h.theme().def(""),size:h.size(),disabled:h.bool,showText:h.bool,isOutline:h.bool,onText:h.string.def("ON"),offText:h.string.def("OFF"),isSquare:h.bool,extCls:h.string,beforeChange:h.func.def(void 0),trueValue:h.oneOfType([h.string,h.number,h.bool]).def(!0),falseValue:h.oneOfType([h.string,h.number,h.bool]).def(!1),value:h.oneOfType([h.string,h.number,h.bool]).def(!1),modelValue:h.oneOfType([h.string,h.number,h.bool]).def(!1)},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=di(),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),f=a.computed(()=>{const g={[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 m=`bk-switcher-${e.size}`;g[m]=!0}return g});a.watch(()=>e.modelValue,()=>{o.value=!0}),a.watch(()=>e.value,()=>{o.value=!1});const d=g=>{if(g.stopPropagation(),g.preventDefault(),e.disabled||i.value)return;const m=l.value?e.falseValue:e.trueValue,C=!l.value,I=()=>{var M;t("update:modelValue",m),t("change",C),(M=n==null?void 0:n.validate)==null||M.call(n,"change")};let b=!0;if(typeof e.beforeChange=="function"&&(b=e.beforeChange(m),typeof b.then=="function"))return i.value=!0,b.then(()=>{I()}).finally(()=>{i.value=!1});b&&I()};return()=>a.createVNode("div",{class:f.value,onClick:d,tabindex:"0",onKeydown:d},[i.value?a.createVNode(po,{class:"bk-switcher-loading"},null):"",e.showText?a.createVNode("span",{class:"switcher-text"},[l.value?e.onText:e.offText]):""])}});const W0=Ze(hm),gm={onContentScroll:Function},mm=H({list:h.array.def([]),enabled:h.bool.def(!0),scrollEvent:h.bool.def(!1),lineHeight:h.oneOfType([h.number,h.func]).def(30),minHeight:h.number.def(30),height:h.oneOfType([h.string.def("100%"),h.number]).def("100%"),width:h.oneOfType([h.string.def("100%"),h.number]).def("100%"),className:h.oneOfType([h.arrayOf(h.string),h.object,h.arrayOf(h.object),h.string]).def(""),contentClassName:h.oneOfType([h.arrayOf(h.string),h.object,h.arrayOf(h.object),h.string]).def(""),contentStyle:h.object.def({}),scrollXName:h.string.def(Be("F-scroll-x")),scrollYName:h.string.def(Be("F-scroll-y")),groupItemCount:h.number.def(1),preloadItemCount:h.number.def(1),renderAs:h.string.def("div"),contentAs:h.string.def("div"),scrollOffsetTop:h.number.def(0),scrollPosition:h.string.def("content"),abosuteHeight:h.oneOfType([h.string.def("auto"),h.number]).def("auto"),throttleDelay:h.number.def(60)},gm);var pm=(e,t)=>{const{renderAs:n,contentAs:i}=e,l=(f,d,g,m,C,I,b)=>{t.emit("content-scroll",[f,{translateY:C,translateX:I,pos:b}])},o=a.resolveDirective("bkVirtualRender"),c={lineHeight:e.lineHeight,handleScrollCallback:l,pagination:{},throttleDelay:e.throttleDelay,onlyScroll:e.scrollEvent};return{rendAsTag:()=>{var f,d,g,m,C,I,b,M,L;return a.h(n,{class:e.className},[(g=(d=(f=t.slots).beforeContent)==null?void 0:d.call(f))!=null?g:"",a.withDirectives(a.h(i,{class:e.contentClassName,style:e.contentStyle},[(I=(C=(m=t.slots).default)==null?void 0:C.call(m,{data:e.list}))!=null?I:""]),[[o,c]]),(L=(M=(b=t.slots).afterContent)==null?void 0:M.call(b))!=null?L:""])}}};function B0(e,t,n,i){let l=0,o=0,c=0,f=0;for(;l<e;l++){if(f=i(l,[l*n,(l+1)*n,"virtual"]),o+f>t){c=t-o;break}o+=f}return{startIndex:l,height:o,diffHeight:c}}function H0(e,t,n,i,l){if(!i)return;const o=i.scrollTop,c=i.scrollLeft,{scrollTop:f,count:d,groupItemCount:g,startIndex:m,endIndex:C}=n,{offsetHeight:I}=i;let b=0,M=0,L=0;if(typeof e=="number"&&(b=Math.floor(o/e),M=Math.ceil(I/e)+b,L=o%e),typeof e=="function"){const k=B0(d,o,g,e);b=k.startIndex>0?k.startIndex:0,L=k.diffHeight,M=B0(d,I,g,e).startIndex+b+1}if(o!==f||b!==m||M!==C){const k=i.scrollHeight-i.offsetHeight-i.scrollTop;typeof t=="function"&&t(l,b,M,o,L,c,{bottom:k>=0?k:0})}}function ym(e,t,n){const{lineHeight:i=30,handleScrollCallback:l,pagination:o={},onlyScroll:c}=n.value;if(c){const I=t.scrollTop,b=t.scrollLeft,M=t.scrollHeight-t.offsetHeight-t.scrollTop;l(e,null,null,I,I,b,{bottom:M>=0?M:0});return}const{startIndex:f,endIndex:d,groupItemCount:g,count:m,scrollTop:C}=o;H0(i,l,{scrollTop:C,startIndex:f,endIndex:d,groupItemCount:g,count:m},t,e)}const G0=(e=60)=>rn.exports.throttle((t,n,i)=>ym(t,n,i),e),bm=(e,t,n,i=60)=>{Reflect.apply(G0(i),globalThis,[e,t,n])};var Cm={mounted(e,t){const n=e.parentNode,{throttleDelay:i}=t.value;n.addEventListener("scroll",l=>{bm(l,n,t,i)})},unbind(e){if(e){const t=e.parentNode;if(!t)return;t.removeEventListener("scroll",G0)}}},Mm=a.defineComponent({name:"VirtualRender",directives:{bkVirtualRender:Cm},props:mm,emits:["content-scroll"],setup(e,t){const{renderAs:n,contentAs:i}=e,l=Q=>typeof Q=="string"?[Q]:typeof Q=="object"&&!Array.isArray(Q)?[Q]:Q;if(!e.enabled){const{rendAsTag:Q}=pm(e,t);return Q}const o=a.ref(null),c=a.reactive({startIndex:0,endIndex:0,scrollTop:1,translateY:0,translateX:0,count:0,pos:{},groupItemCount:e.groupItemCount}),f=(Q,z,O,P,E,_,G)=>{c.startIndex=z,c.endIndex=O,c.scrollTop=P,c.translateY=E,c.translateX=_,c.pos=G,t.emit("content-scroll",[Q,c])};a.onMounted(()=>{a.nextTick(()=>{C(e.list),I()})}),a.watch(()=>e.list,()=>{d(),I()},{deep:!0}),a.watch(()=>e.lineHeight,()=>{d(),I()});const d=()=>{C(e.list)},g=a.ref(0),m=a.ref(0),C=Q=>{if(g.value=Math.ceil((Q||[]).length/e.groupItemCount),c.count=g.value,c.startIndex=0,c.endIndex=0,c.translateY=0,c.scrollTop=0,typeof e.abosuteHeight=="string"&&e.abosuteHeight==="auto")if(typeof e.lineHeight=="function"){m.value=0;let O=0;for(let P=0;P<g.value;P++){const E=e.lineHeight.call(this,P,Q.slice(P*e.groupItemCount,e.groupItemCount));O+=typeof E=="number"?E:0}m.value=O}else m.value=e.lineHeight*g.value;else m.value=e.abosuteHeight},I=(Q=!0)=>{var O;const z=(O=o.value)==null?void 0:O.parentNode;H0(e.lineHeight,f,c,z,null),Q&&o.value&&o.value.scrollTo(0,0)},b=a.computed(()=>(e.list||[]).map((Q,z)=>Ne(H({},Q),{$index:z}))),M=a.computed(()=>b.value.slice(c.startIndex*e.groupItemCount,(c.endIndex+e.preloadItemCount)*e.groupItemCount)),L=a.computed(()=>e.scrollPosition==="content"?{top:`${c.scrollTop+e.scrollOffsetTop}px`,transform:`translateY(-${c.translateY}px)`}:{}),k=a.computed(()=>H({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"?L.value:{})),N=a.computed(()=>{const Q=typeof e.abosuteHeight=="number"&&e.abosuteHeight===0;return{height:`${m.value<e.minHeight?e.minHeight:m.value}px`,display:Q?"none":"block"}}),v=a.computed(()=>[Be("virtual-render"),e.scrollXName,e.scrollYName,...l(e.className),e.scrollPosition==="container"?Be("virtual-content"):""]),p=a.computed(()=>[e.scrollPosition==="content"?Be("virtual-content"):"",...l(e.contentClassName)]),w=a.resolveDirective("bkVirtualRender"),x={lineHeight:e.lineHeight,handleScrollCallback:f,pagination:c,throttleDelay:e.throttleDelay},S=()=>{d(),I()};return t.expose({reset:S}),()=>{var Q,z,O,P,E,_,G,se,ce;return a.h(n||"div",{ref:o,class:v.value,style:k.value},[(O=(z=(Q=t.slots).beforeContent)==null?void 0:z.call(Q))!=null?O:"",a.withDirectives(a.h(i||"div",{class:p.value,style:H(H({},L.value),e.contentStyle)},[(_=(E=(P=t.slots).default)==null?void 0:E.call(P,{data:M.value}))!=null?_:""]),[[w,x]]),(ce=(se=(G=t.slots).afterContent)==null?void 0:se.call(G))!=null?ce:"",a.h("div",{class:[Be("virtual-section")],style:N.value})])}}});const Ts=Ze(Mm);var xs=(e=>(e.NONE="none",e.ROW="row",e.COL="col",e.OUTER="outer",e))(xs||{});const Z0=["none","row","col","outer"];var Un=(e=>(e.ON_SORT_BY_CLICK="onSortByClick",e.ON_FILTER_CLICK="onFilterClick",e.ON_SETTING_CHANGE="onSettingChange",e.ON_ROW_EXPAND_CLICK="onRowExpandClick",e))(Un||{}),Ir=(e=>(e.COLUMN_PICK="columnPick",e.COLUMN_SORT="columnSort",e.COLUMN_FILTER="columnFilter",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))(Ir||{});const En=(...e)=>!0,Im={columnPick:En,columnFilter:En,columnSort:En,rowClick:En,rowDblClick:En,rowExpand:En,pageLimitChange:En,pageValueChange:En,settingChange:En,scrollBottom:En},kt={ROW_INDEX:"__$table_row_index",ROW_UID:"__$uuid",ROW_EXPAND:"__row_expand"},_o=4,$n=42,Ss={large:78,medium:60,small:42},wm=[{value:"small",label:"\u5C0F",height:Ss.small},{value:"medium",label:"\u4E2D",height:Ss.medium},{value:"large",label:"\u5927",height:Ss.large}],Y0=(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),Ne(H(H({},t),e),{current:n})}return t}return{}};var vm=(e,t)=>{const n=a.ref(0),i=a.ref(0);let l=a.reactive({count:0,limit:10,current:1});l=Y0(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},f=a.reactive([]),d=b=>{typeof b=="function"&&f.sort(b)},g=b=>{if(typeof b=="function"){const M=f.filter((L,k)=>b(L,k,e.data));f.splice(0,f.length,...M)}},m=(b,M)=>{f.splice(0,f.length,...t.slice(n.value,i.value)),g(b),d(M)},C=(b,M)=>{l=Y0(e.pagination,l),I(),c(),m(b,M)},I=()=>{!e.pagination||(o.value=e.remotePagination?l:Ne(H({},l),{count:e.data.length}))};return{pageData:f,localPagination:o,resolvePageData:m,watchEffectFn:C}},Nm=(e,t)=>{const n=a.toRef(e,"scrollLoading"),i=()=>typeof n.value=="boolean"?{loading:!!n.value,inline:!0,title:"",size:zn.Normal,mode:Qi.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,f,d;if(l.value){const{loading:g,size:m,mode:C,title:I,inline:b,indicator:M}=i();return(d=(f=(c=t.slots).fixedBottom)==null?void 0:f.call(c))!=null?d:a.createVNode(fi,{loading:g,size:m,mode:C,title:I,inline:b,indicator:M},null)}}}},F0=(e=>(e.CURRENT="current",e.ALL="all",e))(F0||{});const Lm={data:h.arrayOf(h.any).def([]),columns:h.arrayOf(h.shape({label:h.oneOfType([h.func.def(()=>""),h.string.def("")]),field:h.oneOfType([h.func.def(()=>""),h.string.def("")]),render:h.oneOfType([h.func.def(()=>""),h.string.def("")]),width:h.oneOfType([h.number.def(void 0),h.string.def("auto")]),minWidth:h.oneOfType([h.number.def(void 0),h.string.def("auto")]).def(),type:h.commonType(["selection","index","expand","none"],"columnType").def("none"),resizable:h.bool.def(!0),fixed:h.oneOfType([h.bool,h.commonType(["left","right"],"fixed")]).def(!1),sort:h.oneOfType([h.shape({sortFn:h.func.def(void 0),sortScope:h.commonType(Object.values(F0)).def("current")}),h.bool,h.string]).def(!1),filter:h.oneOfType([h.shape({list:h.arrayOf(h.any).def([]),filterFn:h.func.def(void 0)}),h.bool,h.string]).def(!1)})).def([]),activeColumn:h.oneOfType([h.number.def(-1),h.arrayOf(h.number.def(-1))]),columnPick:h.commonType(["multi","single","disabled"],"columnPick").def("disabled"),height:h.oneOfType([h.number,h.string]).def("auto"),minHeight:h.oneOfType([h.number,h.string]).def($n*2),maxHeight:h.oneOfType([h.number,h.string]).def("auto"),rowHeight:h.oneOfType([h.number,h.func]).def($n),headHeight:h.number.def($n),showHead:h.bool.def(!0),thead:h.shape({height:h.number.def($n),isShow:h.bool.def(!0),cellFn:h.func.def(void 0)}),virtualEnabled:h.bool.def(!1),border:h.arrayOf(h.commonType(Z0,"border")).def([xs.ROW]),pagination:h.oneOfType([h.bool.def(!1),h.object.def({})]).def(!1),remotePagination:h.bool.def(!1),emptyText:h.string.def("\u6682\u65E0\u6570\u636E"),settings:h.oneOfType([h.shape({fields:h.arrayOf(h.shape({label:h.string,field:h.string,disabled:h.bool})),checked:h.arrayOf(h.string),limit:h.number.def(0),size:h.size(["small","medium","large"]).def("small"),sizeList:h.shape([])}),h.bool]).def(!1),rowClass:h.oneOfType([h.string,h.object,h.func]).def({}),rowStyle:h.oneOfType([h.string,h.object,h.func]).def({}),cellStyle:h.oneOfType([h.string,h.object,h.func]).def({}),cellClass:h.oneOfType([h.string,h.object,h.func]).def({}),scrollLoading:h.oneOfType([h.object,h.bool]).def(void 0),reserveExpand:h.bool.def(!1),rowKey:h.oneOfType([h.string,h.func]).def(kt.ROW_INDEX)};function km(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var Tm=()=>{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(Yo,{class:"bk-pagination-limit-select",clearable:!1,modelValue:t.value,onChange:n,disabled:e.disabled},km(c=e.limitList.map((f,d)=>a.createVNode(A0,{value:f,label:`${f}`,key:`${d}_${f}`},null)))?c:{default:()=>[c]}),a.createVNode("div",null,[a.createTextVNode("\u6761")])]):null}}};const Zi=5;var xm=()=>{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 b=[];if(e.totalPageNum<=Zi+2){for(let k=2;k<=e.totalPageNum-1;k++)b.push(k);return b}const M=Math.floor(Zi/2);e.totalPageNum>Zi&&(l.value=t.value-M>2,o.value=t.value+M<e.totalPageNum-1);const L=Math.min(e.totalPageNum-Zi,Math.max(2,t.value-M));for(let k=L;k<L+Zi;k++)b.push(k);return b});a.watch(()=>e.modelValue,b=>{a.nextTick(()=>{b>=1&&b<=e.totalPageNum?t.value=b:b<1?t.value=1:t.value=e.totalPageNum})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,b=>{t.value>b&&(t.value=b)})});const f=()=>{n.value||(t.value=t.value-1)},d=()=>{i.value||(t.value=t.value+1)},g=b=>{b!==t.value&&(t.value=b)},m=()=>{t.value=Math.max(1,t.value-Zi)},C=()=>{t.value=Math.min(e.totalPageNum,t.value+Zi)};return{current:t,render:({isFirst:b,isLast:M})=>a.createVNode("div",{class:{"bk-pagination-list":!0,"is-first":b,"is-last":M}},[a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":n.value},onClick:f},[e.prevText||a.createVNode(Ai,null,null)]),a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===1},key:"1",onClick:()=>g(1)},[a.createTextVNode("1")]),l.value&&a.createVNode("div",{key:"pre-batch",class:"bk-pagination-list-pre-batch",onClick:m},[a.createVNode(as,null,null)]),c.value.map(L=>a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===L},key:L,onClick:()=>g(L)},[L])),o.value&&a.createVNode("div",{key:"next-batch",class:"bk-pagination-list-next-batch",onClick:C},[a.createVNode(as,null,null)]),e.totalPageNum>1&&a.createVNode("div",{class:{"bk-pagination-list-item":!0,"is-active":t.value===e.totalPageNum},key:"last",onClick:()=>g(e.totalPageNum)},[e.totalPageNum]),a.createVNode("div",{class:{"bk-pagination-list-pre":!0,"is-disabled":i.value},onClick:d},[e.nextText||a.createVNode(Sn,null,null)])])}},Sm=()=>{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 f=a.computed(()=>{const k=[];for(let N=1;N<=e.totalPageNum;N++)k.push(N);return k});a.watch(()=>e.modelValue,k=>{a.nextTick(()=>{k>=1&&k<=e.totalPageNum?i.value=k:k<1?i.value=1:i.value=e.totalPageNum,c=i.value})},{immediate:!0}),a.nextTick(()=>{a.watch(()=>e.totalPageNum,k=>{i.value>k&&(i.value=k)})});const d=()=>{l.value||(i.value=i.value-1)},g=()=>{o.value||(i.value=i.value+1)},m=()=>{n.value=!0},C=()=>{n.value=!1,t.value.textContent=`${c}`,c!==i.value&&(i.value=c)},I=k=>{const N=k.target,v=Number(N.textContent);!v||v<1||v>e.totalPageNum||v===i.value||(c=v)},b=k=>{["Enter","NumpadEnter"].includes(k.code)&&(k.preventDefault(),C())},M=k=>{c=k,C()};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:d},[a.createVNode(go,null,null)]),a.createVNode(Bi,{theme:"light",trigger:"click",arrow:!1,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:C,onInput:I,onKeydown:b},[i.value]),a.createVNode("span",null,[a.createTextVNode("/")]),a.createVNode("span",{class:"bk-pagination-small-list-total"},[e.totalPageNum])]),content:()=>a.createVNode("div",{class:"bk-pagination-picker-list"},[f.value.map(k=>a.createVNode("div",{class:{item:!0,"is-actived":k===i.value},key:k,onClick:()=>M(k)},[k]))])}),a.createVNode("div",{class:{"bk-pagination-btn-next":!0,"is-disabled":o.value},onClick:g},[a.createVNode(ra,null,null)])])}},Dm=()=>({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 jm={modelValue:h.number.def(1),count:h.number.def(0).isRequired,limit:h.number.def(10),limitList:h.arrayOf(Number).def([10,20,50,100]),showLimit:h.bool.def(!0),type:h.oneOf(["default","compact"]).def("default"),location:h.oneOf(["left","right"]).def("right"),align:h.oneOf(["left","center","right"]).def("left"),size:h.size(),small:h.bool.def(!1),showTotalCount:h.bool.def(!0),prevText:h.string,nextText:h.string,disabled:h.bool.def(!1),layout:h.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 zm=a.defineComponent({name:"Pagination",props:jm,emits:["update:modelValue","change","update:limit","limitChange"],setup(e,t){const n=a.ref(0),{count:i,limit:l}=a.toRefs(e),o=Dm(),{current:c,render:f}=xm(),{current:d,render:g}=Sm(),{limit:m,render:C}=Tm();return a.watch([i,m,l],([I,b])=>{const M=Math.ceil(I/b);n.value=M<1?1:M},{immediate:!0}),a.watch(c,I=>{t.emit("update:modelValue",I),t.emit("change",I)}),a.watch(d,I=>{t.emit("update:modelValue",I),t.emit("change",I)}),a.watch(m,I=>{t.emit("limitChange",I)}),{totalPageNum:n,renderTotal:o,renderList:f,renderLimit:C,renderSmallList:g}},render(){const e=ke({"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 Uo=Ze(zm);var $o=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)])}}),Pm=a.defineComponent({name:"BodyEmpty",props:{list:h.array.def([]),filterList:h.array.def([]),emptyText:h.string.def("\u6682\u65E0\u6570\u636E")},emits:["change"],setup(e,{slots:t}){const n=a.computed(()=>e.list.length===0?"empty":"search-empty");return()=>a.createVNode(hs,{scene:"part",type:n.value},{default:()=>{var i,l;return[(l=(i=t.default)==null?void 0:i.call(t))!=null?l:e.emptyText]}})}});const 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)},Xo=e=>/^\d+$/.test(`${e}`)?[parseInt(`${e}`,10)]:[],Em=e=>_0(e,"auto"),_0=(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},Om=e=>{const t=["row"];return typeof e=="string"&&t.push(e),Array.isArray(e)&&t.push(...e.filter(n=>Z0.includes(n))),[...new Set(t)].map(n=>`bordered-${n}`).join(" ")},ma=(e,t=["resizeWidth","calcWidth","width"])=>{var n,i;return(i=(n=e[t[0]])!=null?n:e[t[1]])!=null?i:e[t[2]]},Ko=(e,t,n=20,i=0)=>{const{width:l}=e.getBoundingClientRect()||{},o=l-i;let c=o;const f=[],d=(m,C)=>{const{minWidth:I=void 0}=m;if(I===void 0)return C;let b=C;return/^\d+\.?\d*$/.test(`${I}`)&&(b=Number(I)),/^\d+\.?\d*%$/.test(`${I}`)&&(b=Number(I)*o/100),/^\d+\.?\d*px$/i.test(`${I}`)&&(b=Number(`${I}`.replace(/px/i,""))),b},g=(m,C,I=!0)=>{const b=d(m,C),M=C<b?b:C;Object.assign(m,{calcWidth:M}),I&&(c=c-M,c<0&&(c=0))};if(t.forEach((m,C)=>{if(!m.isHidden){const b=String(ma(m,["resizeWidth","width"]));let M=!0;if(/^\d+\.?\d*(px)?$/.test(b)){const L=Number(b.replace("px",""));g(m,L),M=!1}if(/^\d+\.?\d*%$/.test(b)){let L=n;if(c>0){const k=Number(b.replace("%",""));L=c*k/100}g(m,L),M=!1}M&&f.push(C)}}),f.length>0){let m=n;c>0&&(m=c/f.length,f.forEach(C=>g(t[C],m,!1)))}},Jm=(e,t,n=60,i=!1)=>{const l=rn.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)}}},qo=e=>{const{showHead:t,headHeight:n,thead:i={}}=e;return Object.assign({},{isShow:t,height:n},H({},i))},ec=(e,t,n)=>n.type==="index"?e[kt.ROW_INDEX]+1:rn.exports.get(e,t),pa=(e,t)=>Array.isArray(e)?e:typeof e=="string"||typeof e=="object"?[e]:typeof e=="function"?pa(Reflect.apply(e,globalThis,t),t):[],Am=(e,t,n)=>typeof t.rowKey=="string"?t.rowKey===kt.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]):zi.v4(),Qm=(e,t,n=0)=>{if(e){const i=e.querySelector(t);if(i)return i.offsetHeight>e.offsetHeight-n}return!1};function Vm(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var Rm=a.defineComponent({name:"HeadFilter",props:{column:h.any.def({}),height:h.number.def($n)},emits:["change"],setup(e,{emit:t}){const{column:n}=e,i=a.reactive({isOpen:!1,checked:[]}),l=a.computed(()=>ke({[Be("table-head-action")]:!0,"column-filter":!0,"--row-height":`${e.height}px`,active:i.checked.length,opened:i.isOpen})),o=ke({[Be("table-head-filter")]:!0}),c=I=>{i.isOpen=I},f=`light ${Be("table-head-filter")}`,d=a.computed(()=>{const{list:I=[]}=n.filter;return I.map(b=>Ne(H({},b),{checked:i.checked.includes(b.value)}))}),g=typeof n.filter.filterFn=="function"?(I,b,M,L)=>n.filter.filterFn(I,b,e.column,M,L):(I,b)=>I.length?I.includes(ec(b,It(n,"field",[n,b]),n)):!0,m=()=>{if(e.column.filter==="custom"){t("change",[...i.checked],null),i.isOpen=!1;return}t("change",[...i.checked],g),i.isOpen=!1},C=()=>{i.checked.length&&(i.checked.splice(0,i.checked.length),i.isOpen=!1,a.nextTick(()=>t("change",i.checked,g)))};return()=>a.createVNode(ha,a.mergeProps({trigger:"click",isShow:i.isOpen,placement:"bottom-end",arrow:!1,offset:0},{theme:f},{onAfterShow:()=>c(!0),onAfterHidden:()=>c(!1)}),{default:()=>a.createVNode(ql,{class:l.value},null),content:()=>{let I;return a.createVNode("div",{class:o},[a.createVNode(No,{class:"content-list",modelValue:i.checked,"onUpdate:modelValue":b=>i.checked=b},Vm(I=d.value.map(b=>a.createVNode("div",{class:"list-item"},[a.createVNode(Ri,{label:b.value},{default:()=>[b.text]})])))?I:{default:()=>[I]}),a.createVNode("div",{class:"content-footer"},[a.createVNode("span",{class:"btn-filter-save",onClick:m},[a.createTextVNode("\u786E\u5B9A")]),a.createVNode("span",{class:"btn-filter-split"},null),a.createVNode("span",{class:["btn-filter-reset",i.checked.length?"":"disable"],onClick:C},[a.createTextVNode("\u91CD\u7F6E")])])])}})}}),bi=(e=>(e.ASC="asc",e.DESC="desc",e.NULL="null",e))(bi||{}),Wm=a.defineComponent({name:"HeadSort",props:{column:h.any.def({})},emits:["change"],setup(e,{emit:t}){const n=a.ref(""),i=(l,o)=>{var C,I;if(l.stopImmediatePropagation(),l.stopPropagation(),l.preventDefault(),n.value===o?n.value=bi.NULL:n.value=o,e.column.sort==="custom"){t("change",null,o);return}const c=e.column.field,f=b=>ec(b,c,e.column),d=(b,M)=>{const L=f(b),k=f(M);return typeof L=="number"&&typeof k=="number"?L-k:String.prototype.localeCompare.call(L,k)},g=typeof((C=e.column.sort)==null?void 0:C.sortFn)=="function"?(I=e.column.sort)==null?void 0:I.sortFn:d,m=n.value===bi.NULL?()=>!0:(b,M)=>g(b,M)*(o===bi.DESC?-1:1);t("change",m,o)};return()=>a.createVNode("span",{class:Be("head-cell-sort")},[a.createVNode(Kl,{class:["sort-action","sort-asc",n.value===bi.ASC?"active":""],onClick:l=>i(l,bi.ASC)},null),a.createVNode(es,{class:["sort-action","sort-desc",n.value===bi.DESC?"active":""],onClick:l=>i(l,bi.DESC)},null)])}});class Bm{constructor(t,n){Br(this,"props",null);Br(this,"ctx",null);this.props=t,this.ctx=n}}function U0(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var Hm=a.defineComponent({name:"Settings",props:{settings:h.oneOfType([h.shape({fields:h.arrayOf(h.shape({label:h.string,field:h.string,disabled:h.bool})),checked:h.arrayOf(h.string),limit:h.number.def(0),size:h.size(["small","medium","large"]).def("small"),sizeList:h.shape([])}),h.bool]).def(!1),columns:h.array.def([]),rowHeight:h.number.def($n)},emits:["change"],setup(e,{emit:t}){const n=wm,i=a.ref(!1),l=a.ref(!1),o=typeof e.settings=="boolean"?a.ref({fields:e.columns.map(P=>Ne(H({},P),{field:P.field||P.type})),checked:[],limit:0,size:"small",sizeList:n}):a.ref(e.settings),c=a.ref(o.value.size||"small"),f=a.ref(e.rowHeight),d=a.ref(o.value.checked),m=`light ${Be("table-settings")}`,C={checkAll:i.value,activeSize:c.value,activeHeight:f.value},I=()=>{t("change",{checked:d.value,size:c.value,height:f.value}),l.value=!1},b=()=>{i.value=C.checkAll,c.value=C.activeSize,f.value=C.activeHeight,d.value=o.value.checked||[],l.value=!1},M=()=>{Object.assign(C,{checkAll:i.value,activeSize:c.value,activeHeight:f.value}),l.value=!0},L=P=>{P.stopImmediatePropagation(),P.stopPropagation(),P.preventDefault(),i.value=!i.value;const E=o.value.fields||e.columns||[];if(i.value)d.value=E.map((_,G)=>It(_,"field",[_,G]));else{const _=E.filter(G=>G.disabled).map((G,se)=>It(G,"field",[G,se]));d.value.splice(0,d.value.length,..._)}},k=a.computed(()=>{var P;return((P=o.value.limit)!=null?P:0)>0}),N=o.value.sizeList||n,v=a.computed(()=>k.value&&(o.value.limit?o.value.limit:0)<=d.value.length),p=(P,E)=>P.disabled||v.value&&!d.value.includes(It(P,"field",[P,E])),w=P=>{c.value=P.value,f.value=P.height},x=P=>({"line-size":!0,"is-medium":c.value==="medium",active:P.value===c.value}),S={marginRight:"12px"},Q=()=>N.map(P=>a.createVNode("span",{class:x(P),onClick:()=>w(P)},[P.label])),z=a.computed(()=>o.value.fields||e.columns||[]),O=a.computed(()=>d.value.length>0&&!z.value.every((P,E)=>d.value.includes(It(P,"field",[P,E]))));return a.watch(()=>[d.value],()=>{d.value.length||(i.value=!1),d.value.length&&z.value.every((P,E)=>d.value.includes(It(P,"field",[P,E])))&&(i.value=!0)},{immediate:!0,deep:!0}),a.watch(()=>[e.settings.checked],()=>{d.value.splice(0,d.value.length,...o.value.checked)},{immediate:!0,deep:!0}),()=>e.settings?a.createVNode(ha,a.mergeProps({trigger:"manual",isShow:l.value,placement:"bottom-end",arrow:!1},{theme:m}),{default:()=>a.createVNode("span",{class:"table-head-settings"},[a.createVNode(ro,{style:"color: #c4c6cc;",onClick:M},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(ns,{class:"icon-close-action",onClick:b},null)]),a.createVNode("div",{class:"setting-body"},[a.createVNode("div",{class:"setting-body-title"},[a.createVNode("div",null,[a.createVNode("span",{class:"field-setting-label"},[a.createTextVNode("\u5B57\u6BB5\u663E\u793A\u8BBE\u7F6E")]),k.value?a.createVNode("span",{class:"limit"},[a.createTextVNode("\uFF08\u6700\u591A"),o.value.limit,a.createTextVNode("\u9879\uFF09")]):""]),k.value?"":a.createVNode("span",{class:"check-all",onClick:L},[a.createVNode(Ri,{label:"\u5168\u9009",indeterminate:Boolean(O.value),modelValue:d.value.length>0},{default:()=>[a.createTextVNode("\u5168\u9009")]})])]),a.createVNode(No,{class:"setting-body-fields",modelValue:d.value,"onUpdate:modelValue":E=>d.value=E},U0(P=z.value.map((E,_)=>{let G;return a.createVNode("div",{class:"field-item"},[a.createVNode(Ri,{label:It(E,"field",[E,_]),checked:d.value.includes(It(E,"field",[E,_])),disabled:p(E,_)},U0(G=It(E,"label",[E,_]))?G:{default:()=>[G]})])}))?P:{default:()=>[P]}),a.createVNode("div",{class:"setting-body-line-height"},[a.createTextVNode("\u8868\u683C\u884C\u9AD8\uFF1A"),Q()])]),a.createVNode("div",{class:"setting-footer"},[a.createVNode(Qt,{theme:"primary",style:S,onClick:I},{default:()=>[a.createTextVNode("\u786E\u5B9A")]}),a.createVNode(Qt,{style:S,onClick:b},{default:()=>[a.createTextVNode("\u53D6\u6D88")]})])])}}):""}}),tc=(e,t,n)=>{const i=a.computed(()=>e.pagination&&e.data.length?$n:0),l=C=>({column_fixed:!!C.fixed,column_fixed_left:C.fixed!=="right",column_fixed_right:C.fixed==="right"}),o=C=>C.fixed==="right"?"right":"left",c={left:(C=!0)=>t.filter(I=>I.fixed&&I.fixed!=="right").reduce((I,b,M)=>C&&M===0?I:I+ma(b),0),right:(C=!0)=>t.filter(I=>I.fixed==="right").reduce((I,b,M)=>C&&M===0?I:I+ma(b),n?_o:0)},f=c.right,d=()=>{const C=(M,L)=>{if(!M.fixed)return{};const k=o(M),N=k==="right"?-1:1,v=`${L[k]}px`;return L[k]=L[k]+ma(M)*N,{[k]:v}},I=f(!0);return{fixedoffset:{left:0,right:I},resolveFixedColumnStyle:C}},g=()=>{const C=b=>({width:`${c[b](!1)}px`,bottom:`${i.value}px`}),I={left:!1,right:!1};return t.filter(b=>!b.isHidden&&b.fixed).map(b=>{const M=o(b),L=I[M];return I[M]=!0,L?"":a.createVNode("div",{class:l(b),style:C(M)},null)})},m=Be("table-fixed");return{renderFixedColumns:g,fixedWrapperClass:m,getFixedColumnStyleResolve:d}};class Gm{constructor(t,n,i,l){Br(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])});Br(this,"getColumnClass",(t,n)=>({[`${this.uuid}-column-${n}`]:!0,column_fixed:!!t.fixed,column_fixed_left:!!t.fixed,column_fixed_right:t.fixed==="right"}));Br(this,"getHeadColumnClass",(t,n)=>Ne(H({},this.getColumnClass(t,n)),{active:this.isColActive(n)}));this.props=t,this.context=n,this.reactiveProp=i,this.colgroups=l,this.plugins=new Bm(t,n),this.uuid=zi.v4(),this.events=new Map}get propActiveCols(){return this.reactiveProp.activeColumns}renderTableHeadSchema(){const{isShow:t=!0}=qo(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(f=>{f.isHidden=!(l!=null?l:[]).includes(It(f,["field","type"],[f]))}),this.emitEvent(Un.ON_SETTING_CHANGE,[i])};return[this.props.settings?a.createVNode(Hm,{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(Pm,{filterList:t,list:this.props.data,emptyText:this.props.emptyText},null)}renderTableFooter(t){return a.createVNode(Uo,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("pageLimitChange",t)}hanlePageChange(t){Object.assign(this.props.pagination,{current:t,value:t}),this.context.emit("pageValueChange",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("column-pick",this.propActiveCols))}getSortCell(t,n){const i=(l,o)=>{this.emitEvent(Un.ON_SORT_BY_CLICK,[{sortFn:l,column:t,index:n,type:o}])};return a.createVNode(Wm,{column:t,onChange:i},null)}getFilterCell(t,n){const i=(l,o)=>{const c=(f,d)=>o(l,f,d);this.emitEvent(Un.ON_FILTER_CLICK,[{filterFn:c,checked:l,column:t,index:n}])};return a.createVNode(Rm,{column:t,height:this.props.headHeight,onChange:i},null)}renderHeader(){const t=qo(this.props),{cellFn:n}=t,i={"--row-height":`${It(t,"height",["thead"])}px`},l=(g,m)=>{const C=[];return g.sort&&C.push(this.getSortCell(g,m)),g.filter&&C.push(this.getFilterCell(g,m)),typeof n=="function"?(C.unshift(n(g,m)),C):(C.unshift(It(g,"label",[g,m])),C)},o=g=>Array.from(g.listeners.keys()).reduce((m,C)=>{const I=C.split("_").slice(-1)[0];return Object.assign(m,{[I]:b=>{g.listeners.get(C).forEach(M=>Reflect.apply(M,this,[b,g,this]))}})},{}),{getFixedColumnStyleResolve:c}=tc(this.props,this.colgroups),{resolveFixedColumnStyle:f,fixedoffset:d}=c();return a.createVNode("thead",{style:i},[a.createVNode($o,null,{default:()=>[a.createVNode("tr",null,[this.filterColgroups.map((g,m)=>a.createVNode("th",a.mergeProps({colspan:1,rowspan:1,class:this.getHeadColumnClass(g,m),style:f(g,d),onClick:()=>this.handleColumnHeadClick(m)},o(g)),[a.createVNode("div",{class:"cell"},[l(g,m)])]))])]})])}renderTBody(t){const{getFixedColumnStyleResolve:n}=tc(this.props,this.colgroups);return a.createVNode("tbody",null,[t.map((i,l)=>{const o=[...pa(this.props.rowStyle,[i,l,this]),{"--row-height":`${this.getRowHeight(i,l)}px`}],c=[...pa(this.props.rowClass,[i,l,this])],{resolveFixedColumnStyle:f,fixedoffset:d}=n(),g=`${this.uuid}-${i[kt.ROW_UID]}`;return[a.createVNode($o,{key:g},{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,C)=>{const I=[f(m,d),...pa(this.props.cellStyle,[m,C,i,l,this])],b=[this.getColumnClass(m,C),...pa(this.props.cellClass,[m,C,i,l,this]),{"expand-row":i[kt.ROW_EXPAND]}],M={cell:!0,"expand-cell":m.type==="expand"},L=`__CELL_${l}_${C}`;return a.createVNode("td",{class:b,style:I,key:L,colspan:1,rowspan:1},[a.createVNode("div",{class:M},[this.renderCell(i,m,l,t)])])})])]}),this.renderExpandRow(i,c)]})])}renderExpandRow(t,n){if(!!t[kt.ROW_EXPAND]){const l=[...n,{row_expend:!0}],o=`${this.uuid}-${t[kt.ROW_UID]}_expand`;return a.createVNode($o,{key:o},{default:()=>{var c,f,d;return[a.createVNode("tr",{class:l},[a.createVNode("td",{colspan:this.filterColgroups.length,rowspan:1},[(d=(f=(c=this.context.slots).expandRow)==null?void 0:f.call(c,t))!=null?d:a.createVNode("div",{class:"expand-cell-ctx"},[a.createTextVNode("Expand Row")])])])]}})}}handleRowClick(t,n,i,l){this.context.emit("rowClick",t,n,i,l,this)}handleRowDblClick(t,n,i,l){this.context.emit("rowDblClick",t,n,i,l,this)}getExpandCell(t){return!!t[kt.ROW_EXPAND]?a.createVNode(is,null,null):a.createVNode(ra,null,null)}handleRowExpandClick(t,n,i,l,o){this.emitEvent(Un.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 f,d,g;return typeof n.render=="function"?n.render(null,t,i,l):(g=(d=(f=this.context.slots).expandCell)==null?void 0:d.call(f,{row:t,column:n,index:i,rows:l}))!=null?g:this.getExpandCell(t)};return a.createVNode("span",{class:"expand-btn-action",onClick:f=>this.handleRowExpandClick(t,n,i,l,f)},[c()])}const o=ec(t,It(n,"field",[n,t]),n);if(typeof n.render=="function"){const c=this.props.data[t[kt.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=ke({active:this.isColActive(n)}),l=`${Em(ma(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 $0=e=>e.columnPick!=="disabled"?e.columnPick==="multi"?Array.isArray(e.activeColumn)?e.activeColumn:Xo(e.activeColumn):Array.isArray(e.activeColumn)?Xo(e.activeColumn[0]):Xo(e.activeColumn):[];var Zm=e=>{let t=a.reactive([]);if(e.columnPick==="disabled")return{activeColumns:t};const n=a.reactive($0(e)),i=()=>(e.columns||[]).map((l,o)=>({index:o,active:n.some(c=>c===o),_column:l}));return a.watchEffect(()=>{t=i();const l=$0(e);t.forEach((o,c)=>{Object.assign(o,{active:l.some(f=>f===c)})})}),{activeColumns:t}},Ym=(e,t=!0)=>{const n="HeadColumnResize";let i;(function(p){p.MOUSE_MOVE="onMousemove",p.MOUSE_OUT="onMouseout",p.MOUSE_DOWN="onMousedown"})(i||(i={}));let l=!1,o=!1,c=!1,f=0,d=null,g=0;const m=a.ref(-1e3),C=p=>{var Q;o=!1,c=!1;const w=document.body.style;w.cursor="";const x=p.clientX-f;d.resizeWidth=((Q=d.resizeWidth)!=null?Q:d.calcWidth)+x,document.removeEventListener("mouseup",C),document.removeEventListener("mousemove",b),f=0,m.value=-1e3,d=null,p.target.closest("table").querySelectorAll("th").forEach(z=>z.style.setProperty("user-select","inherit"))},I=p=>rn.exports.throttle(()=>{m.value=p.clientX-f+g},60),b=p=>{document.body.style.setProperty("cursor",""),I(p)()},M={[i.MOUSE_DOWN]:(p,w)=>{if(!l)return;o=!0,document.body.style.setProperty("cursor","col-resize"),d=w,f=p.clientX;const S=p.target.closest("table");g=f-S.getBoundingClientRect().left,document.addEventListener("mouseup",C),document.addEventListener("mousemove",b)},[i.MOUSE_MOVE]:(p,w)=>{o&&!c&&(c=!0);const x=p.target.closest("th");if(c&&x.style.setProperty("user-select","none"),!c){if(!x)return;const S=x.getBoundingClientRect();S.width>12&&S.right-p.pageX<8?(l=!0,x.style.setProperty("cursor","col-resize")):(x.style.setProperty("cursor",""),l=!1)}},[i.MOUSE_OUT]:(p,w)=>{const x=p.target;c||x.style.setProperty("cursor","")}},L=p=>`${n}_${p}`,k=()=>{e.forEach(p=>{p.resizable!==!1&&Object.keys(M).forEach(w=>{const x=L(w);p.listeners.has(x)||p.listeners.set(x,[]),p.listeners.get(x).push(M[w])})})},N=()=>{e.forEach(p=>{Object.keys(M).forEach(w=>{const x=L(w);if(p.listeners.has(x)){const S=p.listeners.get(x);S.splice(0,S.length)}})})};t&&k();const v=a.computed(()=>({position:"absolute",top:0,bottom:0,left:0,width:"1px","background-color":"#ebeef5"}));return{registerResizeEvent:k,resetResizeEvents:N,dragOffsetX:m,dragOffsetXStyle:v}};const Fm=(e,t,n,i)=>{const l=a.ref(200),o=a.ref(void 0),c=a.computed(()=>e.pagination&&e.data.length),f=a.computed(()=>ke({[Be("table")]:!0,"has-footer":c.value,"has-scroll-y":o.value||e.virtualEnabled},Om(e.border))),d=ke({[Be("table-head")]:!0,"has-settings":!!e.settings}),g=qo(e),m=a.computed(()=>({"--row-height":`${It(g,"height",["thead"])}px`,"--scroll-head-left":`-${n.scrollTranslateX}px`,"--scroll-left":`${n.scrollTranslateX}px`})),C={[Be("table-body")]:!0},I=a.computed(()=>ke({[Be("table-footer")]:!0,["is-hidden"]:!e.pagination||!e.data.length})),b=()=>{if(e.columns.every(S=>/^\d+\.?\d*(px)?$/ig.test(`${S.width}`))){const S=e.columns.reduce((z,O)=>z+Number(`${O.width}`.replace(/px/ig,"")),0),Q=o.value?_o:0;return`${S+Q}px`}return"100%"},M=a.computed(()=>({minHeight:_0(e.minHeight,"auto"),width:b(),maxWidth:"100%"})),L=(S,Q)=>{const z=String(S);if(/^\d+\.?\d*$/.test(z))return Number(z);if(/^\d+\.?\d*px$/ig.test(z))return Number(z.replace("px",""));if(/^\d+\.?\d*%$/ig.test(z)){const O=Number(z.replace("%",""));return Q*O/100}return Q},k=a.reactive({}),N=()=>e.showHead?L(e.headHeight,$n):0,v=()=>{const S=L(e.height,l.value),Q=N(),z=L(e.minHeight,l.value),O=e.pagination&&e.data.length?$n:0,P=S-Q-O,E=e.height!=="auto"?`${P}px`:!1,_=z-Q-O;Object.assign(k,{display:i!=null&&i.length?"block":!1,"min-height":`${_}px`,height:E})};a.onMounted(()=>{p(t==null?void 0:t.value)});const p=S=>{if(S){const{height:Q}=S.parentElement.getBoundingClientRect();l.value=Q,v(),w(S)}},w=S=>{const Q=e.virtualEnabled?`.${Be("virtual-section")}`:`.${Be("table-body-content")}`,z=S.querySelector(".bk-table-body");o.value=Qm(z,Q,0)};return{tableClass:f,headClass:d,contentClass:C,footerClass:I,wrapperStyle:M,contentStyle:k,headStyle:m,resetTableHeight:p,updateBorderClass:w,getColumnsWidthOffsetWidth:()=>{let S=0;return o.value&&(S=S+_o),e.border.includes(xs.OUTER)&&!e.border.includes(xs.NONE)&&(S=S+2),S},hasFooter:c,hasScrollY:o}},_m=e=>{var k,N;const t=a.reactive([]),n=()=>{t.splice(0,t.length,...(e.columns||[]).map(v=>Ne(H({},v),{calcWidth:null,resizeWidth:null,listeners:new Map})))},{dragOffsetXStyle:i,dragOffsetX:l,resetResizeEvents:o,registerResizeEvent:c}=Ym(t,!0),{activeColumns:f}=Zm(e);a.watch(()=>e.columns,()=>{n(),o(),c()},{immediate:!0,deep:!0});const d=a.reactive({rowActions:new Map,scrollTranslateY:0,scrollTranslateX:0,pos:{bottom:1},activeColumns:f,settings:e.settings,setting:{size:(k=e.settings)==null?void 0:k.size,height:Ss[(N=e.settings)==null?void 0:N.size]}}),g=v=>{var p;return d.rowActions.has(v)?(p=d.rowActions.get(v))==null?void 0:p.isExpand:!1},m=(v,p=void 0)=>{var S;const w=v[kt.ROW_UID],x=typeof p=="boolean"?p:!g(w);d.rowActions.set(w,Object.assign({},(S=d.rowActions.get(w))!=null?S:{},{isExpand:x})),b()},C=a.reactive([]),I=(v=!1)=>{C.splice(0,C.length,...e.data.map((p,w)=>{const x=Am(p,e,w);return Ne(H({},p),{[kt.ROW_INDEX]:w,[kt.ROW_UID]:x,[kt.ROW_EXPAND]:v?g(x):!1})}))},b=()=>{C.forEach(v=>{Object.assign(v,{[kt.ROW_EXPAND]:g(v[kt.ROW_UID])})})},{renderFixedColumns:M,fixedWrapperClass:L}=tc(e,t);return{colgroups:t,dragOffsetXStyle:i,dragOffsetX:l,reactiveSchema:d,indexData:C,fixedWrapperClass:L,initIndexData:I,updateIndexData:b,renderFixedColumns:M,setRowExpand:m,updateColGroups:n}};var Um=a.defineComponent({name:"Table",props:Lm,emits:Im,setup(e,t){let n=null,i=null,l=null;const o=a.ref(),c=a.ref(),{colgroups:f,dragOffsetXStyle:d,dragOffsetX:g,reactiveSchema:m,indexData:C,renderFixedColumns:I,setRowExpand:b,initIndexData:M,fixedWrapperClass:L}=_m(e),{pageData:k,localPagination:N,resolvePageData:v,watchEffectFn:p}=vm(e,C),{tableClass:w,headClass:x,contentClass:S,footerClass:Q,wrapperStyle:z,contentStyle:O,headStyle:P,updateBorderClass:E,resetTableHeight:_,getColumnsWidthOffsetWidth:G,hasFooter:se}=Fm(e,o,m,k),ce=new Gm(e,t,m,f);a.watch(()=>[e.data,e.pagination],()=>{M(e.reserveExpand),p(i,n),a.nextTick(()=>{_(o.value),E(o.value)})},{immediate:!0,deep:!0}),a.watchEffect(()=>{if((o==null?void 0:o.value)instanceof HTMLElement){const ne=G();Ko(o.value,f,20,ne)}}),ce.on(Un.ON_SORT_BY_CLICK,ne=>{var he,F;const{sortFn:le,column:ge,index:U,type:fe}=ne;typeof le=="function"&&(n=le,v(i,n),(F=(he=c.value)==null?void 0:he.reset)==null||F.call(he)),t.emit(Ir.COLUMN_SORT,{column:ge,index:U,type:fe})}).on(Un.ON_FILTER_CLICK,ne=>{var he,F;const{filterFn:le,checked:ge,column:U,index:fe}=ne;typeof le=="function"&&(i=le,v(i,n),(F=(he=c.value)==null?void 0:he.reset)==null||F.call(he)),t.emit(Ir.COLUMN_FILTER,{checked:ge,column:U,index:fe})}).on(Un.ON_SETTING_CHANGE,ne=>{const{checked:le=[],size:ge,height:U}=ne;a.nextTick(()=>{var he,F;E(o.value);const fe=G();le.length&&Ko(o.value,f,20,fe),(F=(he=c.value)==null?void 0:he.reset)==null||F.call(he),t.emit(Ir.SETTING_CHANGE,{checked:le,size:ge,height:U})})}).on(Un.ON_ROW_EXPAND_CLICK,ne=>{const{row:le,column:ge,index:U,rows:fe,e:he}=ne;t.emit(Ir.ROW_EXPAND_CLICK,{row:le,column:ge,index:U,rows:fe,e:he}),b(le,!le[kt.ROW_EXPAND])});const de=ne=>{var ie;const le=(ie=m.pos.bottom)!=null?ie:0,ge=ne[1],{translateX:U,translateY:fe,pos:he={}}=ge;m.scrollTranslateY=fe,m.scrollTranslateX=U,m.pos=he;const{bottom:F}=he;F<=2&&le>F&&i4(60,()=>{t.emit(Ir.SCROLL_BOTTOM,Ne(H({},he),{translateX:U,translateY:fe}))},!0)()};a.onMounted(()=>{l=Jm(o.value,()=>{(e.height==="100%"||e.height==="auto")&&_(o.value),E(o.value);const ne=G();Ko(o.value,f,20,ne)},60,!0),l.start()}),a.onBeforeUnmount(()=>{l.stop(),l=null,ce.destroy()}),t.expose({setRowExpand:b});const pe=a.computed(()=>Ne(H({},S),{"__is-empty":!k.length})),K={[Be("table-body-content")]:!0,"with-virtual-render":e.virtualEnabled},Z={column_drag_line:!0,"offset-x":!0},J=a.computed(()=>Ne(H({},d.value),{left:`${g.value-m.scrollTranslateX}px`})),V={"scroll-loading":!0,_bottom:!0},{renderScrollLoading:X}=Nm(e,t),Y=e.virtualEnabled?{}:{scrollXName:"",scrollYName:""};return()=>a.createVNode("div",{class:w.value,style:z.value,ref:o},[a.createVNode("div",{class:x,style:P.value},[ce.renderTableHeadSchema()]),a.createVNode(Ts,a.mergeProps({ref:c,lineHeight:ce.getRowHeight,class:pe.value,style:O,list:k},Y,{contentClassName:K,onContentScroll:de,throttleDelay:0,scrollEvent:!0,enabled:e.virtualEnabled}),{default:ne=>ce.renderTableBodySchema(ne.data||e.data)}),a.createVNode("div",{class:L},[I(),a.createVNode("div",{class:Z,style:J.value},null),a.createVNode("div",{class:V},[X()])]),a.createVNode("div",{class:Q.value},[se.value&&ce.renderTableFooter(N.value)])])}});const X0=Ze(Um),wr=12;function $m(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 Xm(e){const{useGroup:t,saveKey:n,displayKey:i,list:l}=a.toRefs(e),o=a.reactive({flatList:[]});return a.watch([t,n,i,l],()=>{o.flatList=[];let c=l.value;t.value&&(c=l.value.reduce((f,d)=>{let g=[];return d.children&&(g=d.children.map(m=>H({group:{groupId:d[n.value],groupName:d[i.value]}},m))),f.concat(g)},[])),o.flatList=[...c]},{immediate:!0,deep:!0}),o.flatList}const K0=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 q0=a.defineComponent({name:"ListTagRender",props:{node:h.object,searchKey:h.oneOfType([h.string,h.arrayOf(h.string)]),displayKey:h.string,searchKeyword:h.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 Km=()=>({modelValue:h.arrayOf(h.string).def([]),placeholder:h.string.def("\u8BF7\u8F93\u5165\u5E76\u6309 Enter \u7ED3\u675F"),list:h.arrayOf(h.object).def([]),disabled:h.bool.def(!1),tooltipKey:h.string.def(""),saveKey:h.string.def("id"),displayKey:h.string.def("name"),hasDeleteIcon:h.bool.def(!1),clearable:h.bool.def(!0),trigger:h.commonType(["focus","search"]).def("search"),searchKey:h.oneOfType([h.string,h.arrayOf(h.string)]).def("name"),useGroup:h.bool.def(!1),allowCreate:h.bool.def(!1),maxData:h.number.def(-1),maxResult:h.number.def(10),contentMaxHeight:h.number.def(300),contentWidth:h.number.def(190),separator:h.string.def(""),allowNextFocus:h.bool.def(!0),allowAutoMatch:h.bool.def(!1),showClearOnlyHover:h.bool.def(!1),leftSpace:h.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}});var qm=a.defineComponent({name:"TagRender",props:{node:h.object,displayKey:h.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]])])}}),ep=a.defineComponent({name:"TagInput",directives:{bkTooltips:Oo},props:Km(),emits:["update:modelValue","change","select","blur","remove","removeAll"],setup(e,{emit:t}){const n=di(),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:f,pageChange:d}=$m(o),g=a.ref(""),m=a.ref(null),C=a.ref(null),I=a.ref(null),b=a.ref(null),M=a.ref(null),L=a.ref(null),k=a.ref(null),N=a.computed(()=>!e.disabled&&e.hasDeleteIcon),v=a.computed(()=>e.maxData===1),p=a.computed(()=>P.selectedTagList.length===0&&g.value===""&&!i.isEdit),w=a.computed(()=>e.clearable&&!e.disabled&&P.selectedTagList.length!==0&&(e.showClearOnlyHover?i.isHover:!0)),x=a.computed(()=>({"bk-tag-input-trigger":!0,active:i.isEdit,disabled:e.disabled}));a.watch([()=>[...e.modelValue],()=>[...e.list]],()=>{se()}),a.watch(g,rn.exports.debounce(()=>{const te=c.curPageList.length!==0,{value:oe}=g;oe!==""&&te||oe===""&&e.trigger==="focus"&&te?l.isShow=!0:(e.trigger!=="focus"||!te)&&(l.isShow=!1)},150)),a.watch(()=>l.isShow,te=>{S(),te&&M.value&&(a.nextTick(()=>{M.value.scrollTop=0}),M.value.removeEventListener("scroll",Q),M.value.addEventListener("scroll",Q))});const S=()=>{var oe,ye;const te=v.value?0:(oe=b.value)==null?void 0:oe.offsetLeft;l.modifiers=[{name:"offset",options:{offset:[te,4]}}],(ye=L.value)==null||ye.update()},Q=()=>{if(c.isPageLoading||M.value.scrollTop===0)return;const{scrollTop:te,offsetHeight:oe,scrollHeight:ye}=M.value;if(te+oe>=ye){const Se=c.curPage+1;Se<=c.totalPage&&(c.isPageLoading=!0,setTimeout(()=>{d(Se)},500))}},z=()=>{var oe;return Array.from(((oe=I.value)==null?void 0:oe.childNodes)||[]).filter(ye=>ye.nodeType!==Node.TEXT_NODE)},O=te=>{if(!e.disabled){if(te!=null&&te.target){const{className:oe}=te.target;(oe.indexOf("bk-tag-input-trigger")>-1||oe.indexOf("tag-list")>-1)&&I.value.appendChild(b.value)}clearTimeout(k.value),v.value&&E.value.length&&(P.tagListCache=[...E.value],P.selectedTagListCache=[...P.selectedTagList],g.value=P.selectedTagListCache[0][e.saveKey],at(P.selectedTagList[0],0),V()),i.isEdit=!0,a.nextTick(()=>{var oe;(oe=m.value)==null||oe.focus(),e.trigger==="focus"&&P.localList.length!==0&&(ce(),l.isShow?S():l.isShow=!0)})}},P=a.reactive({localList:[],tagListCache:[],selectedTagList:[],selectedTagListCache:[]}),E=a.computed(()=>P.selectedTagList.map(te=>te[e.saveKey])),_=Xm(e),G=a.computed(()=>{if(e.useGroup){const te={};return c.curPageList.forEach((oe,ye)=>{oe.__index__=ye,te[oe.group.groupId]||(te[oe.group.groupId]={id:oe.group.groupId,name:oe.group.groupName,children:[]}),te[oe.group.groupId].children.push(oe)}),Object.keys(te).map(oe=>te[oe])}return c.curPageList}),se=()=>{const{saveKey:te,modelValue:oe,displayKey:ye,allowCreate:Se,trigger:je}=e;P.selectedTagList=[],P.localList=[..._],oe.length&&(oe.forEach(Ae=>{const Fe=P.localList.find(ot=>Ae===ot[te]);Fe!==void 0?P.selectedTagList.push(Fe):Se&&!E.value.includes(Ae)&&P.selectedTagList.push({[te]:Ae,[ye]:Ae})}),v.value||(P.localList=P.localList.filter(Ae=>!oe.includes(Ae[te])))),je==="focus"&&ce()},ce=(te="")=>{const{searchKey:oe,filterCallback:ye}=e,Se=te.toLowerCase();let je=[];if(typeof ye=="function")je=ye(Se,oe,P.localList)||[];else if(Array.isArray(oe)){const Ae=oe.map(Fe=>P.localList.filter(ot=>ot[Fe].toLowerCase().indexOf(Se)!==-1));je=Array.from(new Set(Ae.flat()))}else je=P.localList.filter(Ae=>Ae[oe].toLowerCase().indexOf(Se)!==-1);f(je)},de=(te,oe)=>{const ye={"bk-selector-actived":!1,"bk-selector-selected":E.value.includes(te[e.saveKey])};return e.useGroup?ye["bk-selector-actived"]=te.__index__===i.focusItemIndex:ye["bk-selector-actived"]=oe===i.focusItemIndex,ye};a.onMounted(()=>{se()});const pe=()=>{P.tagListCache=[],P.selectedTagListCache=[],P.selectedTagList=[]},K=()=>{g.value=""},Z=()=>{if(v.value)return 0;const oe=z().findIndex(({id:ye})=>ye==="tagInputItem");return oe>=0?oe:0},J=(te,oe,ye=!1)=>{if(!oe||!te)return;let Se=oe;ye&&(Se=oe.nextElementSibling||null),oe.parentNode.insertBefore(te,Se)},V=te=>{const{maxData:oe,trigger:ye,allowCreate:Se}=e;if(oe===-1||oe>E.value.length){const{value:je}=te!=null&&te.target?te.target:g,Ae=K0(je);Ae?(ce(je),m.value.style.width=`${Ae*wr}px`):ye==="focus"&&ce()}else Y(),g.value="",l.isShow=!1;i.isEdit=!0,i.focusItemIndex=Se?-1:0},X=()=>{var te;l.width=v.value?(te=C.value)==null?void 0:te.clientWidth:e.contentWidth},Y=()=>{k.value=setTimeout(()=>{var oe;const te=g.value;if(K(),i.isEdit=!1,v.value){const[ye]=P.tagListCache;te&&te===ye&&P.selectedTagListCache.length?Ee(P.selectedTagListCache[0],"select"):ge("remove")}else if(e.allowAutoMatch&&te){const ye=c.curPageList.find(Se=>Array.isArray(e.searchKey)?e.searchKey.map(Ae=>Se[Ae]).includes(te):Se[e.searchKey]===te);ye?ne(ye,"select"):e.allowCreate&&ne(te,"custom")}l.isShow=!1,t("blur",te,E.value),(oe=n==null?void 0:n.validate)==null||oe.call(n,"blur")},200)},ne=(te,oe,ye)=>{ye==null||ye.stopPropagation(),!(!te||te.disabled)&&(v.value&&pe(),Ee(te,oe),ge("select"),K(),l.isShow=!1)},le=(te,oe,ye)=>{ye==null||ye.stopPropagation(),at(te,oe),K(),ge("remove",te),m.value.style.width=`${wr}px`},ge=(te,oe)=>{var ye;t("change",E.value),t(te,oe),t("update:modelValue",E.value),(ye=n==null?void 0:n.validate)==null||ye.call(n,"change")},U=te=>{te.stopPropagation();const oe=P.selectedTagList;P.selectedTagList=[];const ye=_.filter(Se=>oe.some(je=>je[e.saveKey]===Se[e.saveKey]));(e.allowCreate&&ye.length!==0||!e.allowCreate)&&!v.value&&P.localList.push(...ye),ge("removeAll")},fe=()=>{const te={height:M.value.clientHeight,yAxis:M.value.getBoundingClientRect().y};a.nextTick(()=>{const oe=M.value.querySelector(".bk-selector-actived");if(!oe)return;const ye={height:oe.clientHeight,yAxis:oe.getBoundingClientRect().y};ye.yAxis<te.yAxis&&(M.value.scrollTop=M.value.scrollTop-(te.yAxis-ye.yAxis));const Se=ye.yAxis+ye.height-te.yAxis;Se>te.height&&(M.value.scrollTop=M.value.scrollTop+Se-te.height)})},he=(te,oe)=>{const ye=z();J(b.value,ye[te-1]),P.selectedTagList.splice(te-1,1),O();const Se=_.some(je=>je===oe[e.saveKey]);(e.allowCreate&&Se||!e.allowCreate)&&!v.value&&P.localList.push(oe),m.value=`${wr}px`,ge("remove")},F=te=>{if(c.isPageLoading)return;let oe;const ye=te.target.value,Se=K0(ye),je=Z(),Ae=z();switch(te.code){case"ArrowUp":if(te.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),fe();break;case"ArrowDown":if(te.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),fe();break;case"ArrowLeft":if(i.isEdit=!0,!Se){if(je<1)return;J(b.value,Ae[je-1]),O()}break;case"ArrowRight":if(i.isEdit=!0,!Se){if(je===Ae.length-1)return;J(Ae[je+1],b.value),O()}break;case"Enter":case"NumpadEnter":!e.allowCreate&&l.isShow||e.allowCreate&&i.focusItemIndex>=0&&l.isShow?ne(c.curPageList[i.focusItemIndex],"select",te):e.allowCreate&&ne(g.value,"custom",te),te.preventDefault();break;case"Backspace":je!==0&&!g.value&&(oe=P.selectedTagList[je-1],he(je,oe));break}},ie=te=>{const oe=[];return te.split(";").forEach(Se=>{if(Se.match(/^[a-zA-Z][a-zA-Z_]+/g)){const je=Se.match(/^[a-zA-Z][a-zA-Z_]+/g).join("");oe.push({[e.saveKey]:je,[e.displayKey]:je})}}),oe},Me=te=>{if(te.preventDefault(),v.value)return!1;const{maxData:oe,saveKey:ye,pasteFn:Se}=e,je=te.clipboardData.getData("text");let Fe=(Se?Se(je):ie(je)).map(ot=>ot[ye]);if(Fe.length){const ot=z(),jt=Z(),nt=P.localList.map(qe=>qe[ye]);if(Fe=Fe.filter(qe=>(qe==null?void 0:qe.trim())&&!E.value.includes(qe)&&nt.includes(qe)),oe!==-1){const qe=P.selectedTagList.length;if(qe<oe){const _e=oe-qe;Fe.length>_e&&(Fe=[...Fe.slice(0,_e)])}else Fe=[]}const Mn=P.localList.filter(qe=>Fe.includes(qe[ye]));Fe.length&&(P.selectedTagList.splice(jt,0,...Mn),J(b.value,ot[jt]),m.value.style.width=`${wr}px`,P.localList=P.localList.filter(qe=>!Fe.includes(qe[ye])),ge("select"),O())}},we=te=>{e.disabled||(J(b.value,te.currentTarget,!0),m.value.style.width=`${wr}px`,l.isShow&&S())},Ee=(te,oe)=>{if(P.selectedTagList.length>=e.maxData&&e.maxData!==-1)return;const{separator:ye,saveKey:Se,displayKey:je,createTagValidator:Ae}=e,Fe=Z();let ot=1,jt=!1,nt;const Mn=_e=>typeof Ae=="function"?Ae(_e):!0,qe=_e=>P.localList.find(Bt=>Bt[Se]===_e);if(oe==="custom")if(ye){let _e=te.split(ye);_e=_e.filter(Ct=>(Ct==null?void 0:Ct.trim())&&!E.value.includes(Ct)&&Mn(Ct));const Bt=_e.map(Ct=>qe(Ct)||{[Se]:Ct,[je]:Ct});_e.length&&(P.selectedTagList.splice(Fe,0,...Bt),ot=Bt.length,jt=!0)}else{const _e=typeof te=="object";if(nt=_e?te[Se]:te.trim(),nt=nt.replace(/\s+/g,""),nt!==void 0&&!E.value.includes(nt)&&Mn(nt)){const Bt=qe(nt)||(_e?te:{[Se]:nt,[je]:nt});P.selectedTagList.splice(Fe,0,Bt),jt=!0}}else te&&(nt=te[Se],nt!==void 0&&!E.value.includes(nt)&&(P.selectedTagList.splice(Fe,0,te),jt=!0));jt&&a.nextTick(()=>{for(let _e=1;_e<=ot;_e++){const Ct=z()[Fe+_e];J(Ct,b.value)}m.value.style.width=`${wr}px`,v.value||(e.allowNextFocus&&O(),P.localList=P.localList.filter(_e=>!E.value.includes(_e[Se])))})},at=(te,oe)=>{P.selectedTagList.splice(oe,1);const ye=_.some(Se=>Se===te[e.saveKey]);(e.allowCreate&&ye||!e.allowCreate)&&!v.value&&P.localList.push(te)};return Ne(H(H(H({popoverProps:l},a.toRefs(i)),a.toRefs(P)),a.toRefs(c)),{isShowPlaceholder:p,isShowClear:w,curInputValue:g,formatList:_,renderList:G,showTagClose:N,tagInputRef:m,bkTagSelectorRef:C,tagListRef:I,tagInputItemRef:b,selectorListRef:M,popoverRef:L,triggerClass:x,focusInputTrigger:O,activeClass:de,handleInput:V,handleFocus:X,handleBlur:Y,handleTagSelected:ne,handleTagRemove:le,handleClear:U,tagFocus:we,handleKeydown:F,handlePaste:Me})},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(q0,{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(q0,{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(Bi,{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(qm,{node:l,tpl:this.tagTpl,displayKey:this.displayKey},null),this.showTagClose?a.createVNode(jn,{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(Dn,{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(fi,{theme:"primary",size:zn.Small},null)]):null])])})])}});const ef=Ze(ep),tp={direction:h.commonType(["horizontal","vertical"],"direction").def("horizontal"),align:h.commonType(["left","center","right"],"align").def("center"),color:h.string.def("#dde4eb"),width:h.number.def(1),type:h.commonType(["dashed","solid"],"lineType").def("dashed")};var np=a.defineComponent({name:"Divider",props:tp,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 tf=Ze(np),ip={tabAdd:{type:Function,default:()=>({})},tabChange:{type:Function,default:e=>e},tabRemove:{type:Function,default:e=>e},tabSort:{type:Function,default:()=>({})},tabDrag:{type:Function,default:()=>({})}},rp={active:h.oneOfType([h.number,h.string]).def(""),type:h.commonType(["card","border-card","unborder-card"],"type").def("border-card"),tabPosition:h.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:h.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:h.number.def(50),scrollStep:h.number.def(200),extCls:h.string.def(""),validateActive:h.bool.def(!0),showHeader:h.bool.def(!0),changeOnHover:h.bool.def(!1),changeOnHoverDelay:h.number.def(1e3)},ap=H({active:h.oneOfType([h.number,h.string]).def(""),panels:{type:Array,default:()=>[]},tabPosition:h.commonType(["left","right","top"],"position").def("top"),closable:Boolean,addable:Boolean,sortable:Boolean,sortType:h.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:h.number.def(50),scrollStep:h.number.def(200),validateActive:h.bool.def(!0),changeOnHover:h.bool.def(!1),changeOnHoverDelay:h.number.def(1e3)},ip),sp={name:h.oneOfType([h.number,h.string]).def(""),label:h.string||h.func,closable:h.bool,visible:h.bool.def(!0),disabled:h.bool,sortable:h.bool,renderDirective:h.commonType(["if","show"],"render").def("show"),panel:h.string||h.func};var nf=a.defineComponent({name:"TabNav",props:ap,setup(e){const t=a.computed(()=>{if(!Array.isArray(e.panels)||!e.panels.length)return[];const f=[];let d=!1;return e.panels.filter((g,m)=>{if(!g.props)return null;const{name:C,label:I,closable:b,visible:M,disabled:L,sortable:k}=g.props;if(!M)return!1;e.active===C&&(d=!0);const N=v=>g.slots.label?a.h(g.slots.label):[void 0,""].includes(v)?`\u9009\u9879\u5361${m+1}`:typeof v=="string"?v:typeof v=="function"?a.h(v):v;return f.push({name:C,closable:b,visible:M,disabled:L,sortable:k,tabLabel:N(I)}),!0}),!d&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),f}),n=a.ref(-1),i=a.ref(-1),l=a.ref(""),o=(f,d)=>f===d;return Ne(H({},{handleTabAdd(f){e.tabAdd(f)},dragstart(f,d){i.value=f,l.value=e.guid,Object.assign(d.dataTransfer,{effectAllowed:"move"}),e.tabDrag(f,d)},dragenter(f){o(l.value,e.guid)&&(n.value=f)},dragend(){n.value=-1,i.value=-1,l.value=null},drop(f,d){if(!o(l.value,e.guid))return!1;e.tabSort(i.value,f,d)},handleTabChange(f){e.tabChange(f)},handleTabRemove(f,d){e.tabRemove(f,d)}}),{navs:t,dragenterIndex:n,dragStartIndex:i,draggingEle: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:f,dragend:d,drop:g}=this,m=()=>this.navs.map((I,b)=>{if(!I)return null;const{name:M,disabled:L,tabLabel:k}=I,N=()=>{const p=["bk-tab-header-item"];return L&&p.push("bk-tab-header--disabled"),e===M&&p.push("bk-tab-header--active"),p.join(" ")},v=(p,w)=>p||w;return a.createVNode("div",{key:M,onClick:()=>this.handleTabChange(M),draggable:v(I.sortable,i),onDragstart:p=>c(b,p),onDragenter:p=>{p.preventDefault(),f(b)},onDragleave:p=>{p.preventDefault()},onDragover:p=>{p.preventDefault()},onDragend:p=>{p.preventDefault(),d()},onDrop:p=>{p.preventDefault(),g(b,l)},class:N()},[a.createVNode("div",null,[k]),v(I.closable,t)&&a.createVNode(Dn,{class:"bk-tab-header-item-close",onClick:()=>this.handleTabRemove(b,I)},null)])}),C=()=>{var b,M;const I=[];return typeof this.$slots.add=="function"?I.push((M=(b=this.$slots).add)==null?void 0:M.call(b,a.h)):n&&I.push(a.createVNode("div",{onClick:this.handleTabAdd},[a.createVNode(ls,{width:26,height:26},null)])),I.length?a.createVNode("div",{class:"bk-tab-header-operation"},[I.map((L,k)=>a.createVNode("div",{class:"bk-tab-header-item",key:k},[L]))]):null};return a.createVNode("div",{style:{lineHeight:`${o}px`},class:"bk-tab-header"},[a.createVNode("div",{class:"bk-tab-header-nav"},[m()]),C(),typeof this.$slots.setting=="function"&&a.createVNode("div",{class:"bk-tab-header-setting"},[this.$slots.setting()])])}}),lp=a.defineComponent({name:"Tab",components:{TabNav:nf},props:rp,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=(g,m=[])=>{const{children:C}=g;return(C||[]).forEach(I=>{let{type:b}=I;b=b.name||b,b==="TabPanel"&&I.component?m.push(I.component):(b===a.Fragment||b==="template")&&c(I,m)}),m},f=()=>{if(t.default){const{children:g}=o.subTree.children[1];if(!g)return;const m=g[0],C=c(m);C.length!==l.value.length&&(l.value=C)}};return a.onMounted(()=>{f(),i.value=!0}),a.onUpdated(()=>{f()}),Ne(H({},{tabAdd(g){n("add",{e:g}),n("add-panel",{e:g})},tabChange(g){n("change",g),n("tab-change",g),n("update:active",g)},tabRemove(g,m){n("remove",g,m),n("remove-panel",g,m)},tabSort(g,m,C){const I=l.value;if(C==="insert")if(g<m)I.splice(m+1,0,l[g]),I.splice(g,1);else if(g>m)I.splice(m,0,l[g]),I.splice(g+1,1);else return!1;else{const b=I[m];I[m]=I[g],I[g]=b}l.value=[...I],n("sort",g,m,C),n("sort-change",g,m,C)},tabDrag(g,m){n("drag",g,m),n("on-drag-tab",g,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:f,addable:d,sortable:g,sortType:m,labelHeight:C,scrollStep:I,validateActive:b,changeOnHover:M,changeOnHoverDelay:L,tabPosition:k,tabAdd:N,tabChange:v,tabRemove:p,tabSort:w,tabDrag:x}=this,S={panels:l,active:o,type:c,closable:f,addable:d,sortable:g,sortType:m,labelHeight:C,scrollStep:I,validateActive:b,changeOnHover:M,changeOnHoverDelay:L,tabPosition:k,tabAdd:N,tabChange:v,tabRemove:p,tabSort:w,tabDrag:x};return!l||!Array.isArray(l)?null:a.createVNode(nf,S,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)])])}}),op=a.defineComponent({name:"TabPanel",props:sp,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 rf=At(lp,{TabPanel:op}),Ci={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]};let af=1;const sf=(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:f=10}=n;Ci[i].forEach(I=>{c+=(I.el.offsetHeight||0)+f}),af+=1;const d=`message_${af}`;n=Ne(H({},n),{offsetX:o,offsetY:c,id:d});const g=document.createElement("div"),m=a.createVNode(e,n);m.props.onDestroy=I=>{cp(I,i,f,l),a.render(null,g)},a.render(m,g),Ci[i].push(m);let C;m.props.getContainer&&Kr(m.props.getContainer)?C=m.props.getContainer:C=document.body,C.appendChild(g.firstElementChild)};function cp(e,t,n,i){i==null||i();const l=t.startsWith("top")?"top":"bottom";let o=-1;Ci[t].forEach((g,m)=>{g.props.id===e&&(o=m)});const f=Ci[t][o].el.offsetHeight,d=Ci[t].length;for(let g=o;g<d;g++){const m=parseInt(Ci[t][g].el.style[l],10)-f-n;Ci[t][g].component.props.offsetY=m}Ci[t].splice(o,1)}const up={id:h.string.def(""),message:h.string.def(""),theme:h.theme(["primary","warning","success","error"]).def("primary"),delay:h.number.def(3e3),dismissable:h.bool.def(!0),offsetY:h.number.def(30),spacing:h.number.def(10),extCls:h.string.def(""),onClose:h.func,getContainer:h.instanceOf(HTMLElement)};var dp=a.defineComponent({name:"Message",props:up,emits:["destroy"],setup(e,{emit:t}){const n=a.computed(()=>["bk-message",`bk-message-${e.theme}`,`${e.extCls}`]),i=pn.getMessageNextIndex(),l=a.computed(()=>e.getContainer&&Kr(e.getContainer)),o=a.computed(()=>({top:`${e.offsetY}px`,zIndex:i,position:l.value?"absolute":"fixed"})),c=a.ref(!1);let f=null;const d=()=>{f=setTimeout(()=>{c.value=!1},e.delay)},g=m=>{m.preventDefault(),m.stopPropagation(),c.value=!1};return a.onMounted(()=>{e.delay&&d(),c.value=!0}),a.onUnmounted(()=>{clearTimeout(f)}),a.watch(c,()=>{c.value||t("destroy",e.id)}),{classNames:n,styles:o,visible:c,close:g}},render(){const e=()=>({primary:a.createVNode(ss,null,null),warning:a.createVNode(ds,null,null),success:a.createVNode(cs,null,null),error:a.createVNode(Dn,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(jn,{class:"bk-message-close",onClick:this.close},null)]),[[a.vShow,this.visible]])]})}});const lf=e=>{sf(dp,e)},of=e=>{const t=document.createElement("div"),n=a.ref(!1),i=a.shallowRef(e),l=a.defineComponent({name:"DialogConfirm",setup(f,{expose:d}){a.onMounted(()=>{(document.activeElement||document.body).blur(),i.value.isShow!==!1&&(n.value=!0)});const g=async()=>{var b,M;typeof((b=i.value)==null?void 0:b.onClosed)=="function"&&await((M=i.value)==null?void 0:M.onClosed()),n.value=!1},m=async()=>{var b,M;typeof((b=i.value)==null?void 0:b.onConfirm)=="function"&&await((M=i.value)==null?void 0:M.onConfirm()),n.value=!1};function C(b){i.value=b}d({update:C});const I=()=>{const b=[];if(i.value.subTitle)switch(typeof i.value.subTitle){case"string":b.push(a.h("div",i.value.subTitle));break;case"function":b.push(a.h("div",i.value.subTitle()));break;default:b.push(a.h(i.value.subTitle));break}return b};return()=>a.createVNode(Gd,Ne(H({},i.value),{isShow:n.value,onClosed:g,onConfirm:m}),I())}}),o=a.createApp(l).mount(t);return{show:()=>{n.value=!0},hide:()=>{n.value=!1},update:f=>{o.update(f)}}},fp={id:h.string.def(""),title:h.string.def(""),message:h.string.def(""),theme:h.theme(["primary","warning","success","error"]).def("primary"),position:h.position().def("top-right"),delay:h.number.def(5e3),dismissable:h.bool.def(!0),offsetX:h.number.def(100),offsetY:h.number.def(30),spacing:h.number.def(10),extCls:h.string.def(""),onClose:h.func};var hp=a.defineComponent({name:"Notify",props:fp,emits:["destroy"],setup(e,{emit:t}){const n=pn.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]),f=a.ref(!1);let d=null;const g=()=>{d=setTimeout(()=>{f.value=!1},e.delay)},m=()=>{f.value=!1};return a.onMounted(()=>{e.delay&&g(),f.value=!0}),a.onUnmounted(()=>{clearTimeout(d)}),a.watch(f,()=>{f.value||t("destroy",e.id)}),{classNames:c,styles:o,visible:f,handleClose:m}},render(){const e=()=>({primary:a.createVNode(ss,null,null),warning:a.createVNode(ds,null,null),success:a.createVNode(cs,null,null),error:a.createVNode(Dn,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(jn,{class:"bk-notify-icon bk-notify-close",onClick:this.handleClose},null)]),[[a.vShow,this.visible]])]})}});const cf=e=>{sf(hp,e)},uf=Symbol("MENU_PROVIDER_KEY"),nc=Symbol("MENU_PROVIDER_KEY_PATH"),gp=e=>{a.provide(uf,e)},mp=e=>{const{parentKeys:t,parentInfo:n}=ic(),i=a.computed(()=>[...t.value,e]);a.provide(nc,{parentInfo:{key:e,parentKey:n==null?void 0:n.key},parentKeys:i})},df=()=>a.inject(uf),ic=()=>{var n;const e=a.getCurrentInstance(),t=e.parent?e.parent.provides:(n=e.vnode.appContext)==null?void 0:n.provides;return t&&nc in t?a.inject(nc):{parentInfo:void 0,parentKeys:a.ref([])}},rc=function(e){return(e||"").split(" ").filter(t=>!!t.trim())};function ff(e,t){if(!e||!t)return;const n=rc(t);let i=e.getAttribute("class")||"";if(e.classList){e.classList.remove(...n);return}n.forEach(o=>{i=i.replace(` ${o} `," ")});const l=rc(i).join(" ");e.setAttribute("class",l)}function hf(e,t){if(!e)return;let n=e.getAttribute("class")||"";const i=rc(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 pp=()=>({css:!0,onBeforeEnter:e=>{hf(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,ff(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&&(hf(e,"collapse-transition"),e.style.transitionProperty="height",e.style.height="0px",e.style.maxHeight="0px")},onAfterLeave:e=>{ff(e,"collapse-transition"),e.style.height="",e.style.maxHeight="",e.style.overflow=e.dataset.oldOverflow}}),yp={activeKey:String,collapse:Boolean,openedKeys:{type:Array},mode:{type:String,default:"vertical"},uniqueOpen:{type:Boolean,default:!0}};var bp=a.defineComponent({name:"Menu",props:yp,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({}),f=a.computed(()=>e.mode),d=a.ref(e.collapse),g=a.ref([]);a.watchEffect(()=>{e.activeKey!==void 0&&(l.value=e.activeKey)}),a.watch(()=>e.collapse,()=>{d.value=e.collapse,console.info(e.collapse);const M=[...g.value],L=[...o.value];o.value=d.value?[]:M,g.value=d.value?L:[]},{immediate:!0}),a.watch(()=>e.openedKeys,(M=o.value)=>{o.value=M},{immediate:!0});const m=(M,L)=>{c.value=Ne(H({},c.value),{[M]:L})},C=M=>{delete c.value[M],c.value=H({},c.value)},I=(M,L)=>{L?e.uniqueOpen?o.value=[M]:o.value.push(M):o.value=o.value.filter(k=>k!==M),n("openChange",L,c.value[M]),n("update:openKeys",[...o.value])},b=M=>{l.value=M,n("click",c.value[M]),n("update:activeKey",M,c.value[M])};return gp({activeKey:l,menuStore:c,registerMenuInfo:m,unregisterMenuInfo:C,mode:f.value,openedKeys:o,collapse:d,handleOpenChange:I,handleActiveChange:b}),i({activeKey:l,openedKeys:o,menuStore:c}),()=>{var M;return a.createVNode("div",{class:{"bk-menu":!0,"is-collapse":d.value}},[(M=t.default)==null?void 0:M.call(t)])}}}),Cp=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)])])}}}),Mp=a.defineComponent({name:"MenuItem",props:{needIcon:{type:Boolean,default:!0}},emits:["click"],slots:["icon"],setup(e,{slots:t,emit:n}){var b,M;const{registerMenuInfo:i,unregisterMenuInfo:l,activeKey:o,handleActiveChange:c}=df(),f=a.getCurrentInstance(),{parentInfo:d}=ic(),g=((M=(b=f.vnode.key)==null?void 0:b.toString)==null?void 0:M.call(b))||String(f.uid),m=a.computed(()=>o.value===g),C=a.computed(()=>e.needIcon);i(g,{key:g,parentKey:d==null?void 0:d.key});const I=L=>{c(g),n("click",L)};return a.onBeforeUnmount(()=>l(g)),()=>{var L,k;return a.createVNode("li",{class:{"bk-menu-item":!0,"is-active":m.value},onClick:I},[C.value&&a.createVNode("span",{class:"item-icon"},[((L=t==null?void 0:t.icon)==null?void 0:L.call(t))||a.createVNode("i",{class:"default-icon"},null)]),a.createVNode("span",{class:"item-content"},[(k=t.default)==null?void 0:k.call(t)])])}}});const Ip={title:{type:String,default:"title"}};var wp=a.defineComponent({name:"Submenu",props:Ip,emits:["collapse"],slots:["icon"],setup(e,{slots:t,emit:n}){var N,v;const{registerMenuInfo:i,unregisterMenuInfo:l,openedKeys:o,handleOpenChange:c,collapse:f,activeKey:d,menuStore:g}=df(),{parentInfo:m}=ic(),C=a.getCurrentInstance(),I=((v=(N=C.vnode.key)==null?void 0:N.toString)==null?void 0:v.call(N))||String(C.uid),b=a.ref(pp()),M=a.computed(()=>o.value.includes(I)),L=a.computed(()=>{var w,x;const p=(x=(w=g.value)==null?void 0:w[d.value])==null?void 0:x.parentKey;return f.value&&p===I&&M});mp(I),i(I,{key:I,parentKey:m==null?void 0:m.key}),a.onBeforeUnmount(()=>l(I));const k=()=>{c(I,!M.value),n("collapse",!M.value,C)};return()=>{var p;return a.createVNode("li",{class:{"bk-menu-submenu":!0,"is-opened":M.value}},[a.createVNode("div",{class:{"submenu-header":!0,"is-collapse":L.value},onClick:k},[a.createVNode("span",{class:"submenu-header-icon"},[((p=t.icon)==null?void 0:p.call(t))||a.createVNode(bo,{class:"menu-icon"},null)]),a.createVNode("span",{class:"submenu-header-content"},[e.title]),a.createVNode(qa,{class:{"submenu-header-collapse":!0,"is-collapse":o.value.includes(I)}},null)]),a.createVNode(a.Transition,b.value,{default:()=>{var w;return[a.withDirectives(a.createVNode("ul",{class:"submenu-list"},[(w=t.default)==null?void 0:w.call(t)]),[[a.vShow,M.value]])]}})])}}});const gf=At(bp,{Item:Mp,Submenu:wp,Group:Cp}),vp={sideTitle:{type:String,default:""},navigationType:{type:String,default:"left-right"}};var mf=a.defineComponent({props:vp,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 Np={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 Lp=a.defineComponent({name:"Navigation",props:Np,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,f,d,g,m,C;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(mf,{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(mf,{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(ao,{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"},[(f=(c=this.$slots)["header-set"])==null?void 0:f.call(c)])]]),a.createVNode("div",{class:"container-content",style:{maxHeight:`calc(100vh - ${this.headHeight}px)`}},[(g=(d=this.$slots).default)==null?void 0:g.call(d),a.createVNode("div",{class:"container-footer"},[(C=(m=this.$slots).footer)==null?void 0:C.call(m)])])])])])}});const pf=Ze(Lp),kp={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 Tp=a.defineComponent({props:kp,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 d=n;d.isShow&&d.hide(),d.destroy(),n=null,t("changeVisible",!1)}},o=()=>{n&&Object.keys(n).length!==0?a.nextTick(()=>{n.update()}):a.nextTick(()=>{n=new Fl(e.triggerRef,i.value,{placement:e.placement,trigger:"manual",modifiers:[{name:"computeStyles",options:{adaptive:!1,gpuAcceleration:!1}},{name:"offset",options:{offset:[0,4]}}]})})},c=a.computed(()=>{const d={};return e.appendToBody&&(d["z-index"]=1060+pn.getModalNextIndex()),d}),f=a.reactive({styles:c});return Ne(H({},a.toRefs(f)),{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 xp={showTime:{type:Boolean,required:!0},isTime:{type:Boolean,default:!1},timeDisabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0}};var Sp=a.defineComponent({props:xp,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:d=>{const m=[...c.value.children][d.shiftKey?"shift":"pop"]();document.activeElement===m&&(d.preventDefault(),d.stopPropagation())}}},render(){return a.createVNode("div",{class:"bk-picker-confirm",ref:"elRef",onKeydown:this.handleTab},[this.showTime?a.createVNode("a",{href:"javascript: void(0);",class:"bk-picker-confirm-time",disabled:this.timeDisabled,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])])}}),yf=1e3*60*60*24;function bf(e,t){return new Date(e,t+1,0).getDate()}function Cf(e,t,n){return t===0&&n>50?e-1:t===11&&n<10?e+1:e}function Mf(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),f=1+Math.round((l-c)/yf);i||(f+=c.getDay());var d=Math.ceil(f/7);if(!i){var g=new Date(e,t,n),m=new Date(e+1,0,1),C=m.getDay();g.getTime()>=m.getTime()-yf*C&&(d=1)}return d}function Dp(e,t,n){for(var i=this.lang||"en",l=this.onlyDays,o=typeof this.weekStart=="undefined"?1:this.weekStart,c=o===1,f=[],d=new Date(e,t,1),g=d.getDay()||(c?7:0),m=o-g,C=Mf(e,t,1,c),I=bf(e,t),b=bf(e,t-1),M,L,k,N=Cf(e,t,C),v={month:t,year:e,daysInMonth:I},p=0;p<7;p++){k=m;for(var w=0;w<8;w++){p>0&&w>0&&m++,m>I||m<1?(L=m>I?m-I:b+m,M=m>I?t+1:t-1):(L=m,M=t);var x=function(){return w===0?"weekLabel":p===0?"dayLabel":m<1?"prevMonth":m>I?"nextMonth":"monthDay"}(),S=k!==m&&p>0,Q={desc:S?L:C,week:C,type:x,format:c?"ISO 8601":"US",date:S?new Date(Date.UTC(e,M,L)):!1,year:N,index:f.length};n&&(typeof n=="function"?Q=n.call(v,Q,i):n.forEach(function(z){Q=z.call(v,Q,i)})),l&&S?f.push(Q):l||f.push(Q)}p>0&&(C=Mf(e,M,L+1,c)),N=Cf(e,t,C)}return v.cells=f,v}var jp=function(e){return Dp.bind(e)},zp={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"}},On=zp;function Pp(e){return e==null?!1:e.constructor===Array||e.constructor===Object}function If(e,t){for(var n in e)t[n]?Pp(e[n])&&If(e[n],t[n]):t[n]=e[n]}function wf(e,t){var n=[On.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&&On.weekPlaceholder?e.desc=On.weekPlaceholder:e.index<8?e.desc=On.columnNames[t][e.index]:e.index%8==0&&(e.desc=e.week)),e.date&&(e.monthName=On.monthNames[t][e.date.getMonth()]),this.monthName||(this.monthName=On.monthNames[t][this.month]),this.labels||(this.labels={monthNames:On.monthNames[t],columnNames:On.columnNames[t],classes:On.classes}),e}wf.setLabels=function(e){If(e,On)};var Ep=wf,Op={Generator:jp,addLabels:Ep};function an(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 St(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function bn(e){St(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 Jp(e,t){St(2,arguments);var n=bn(e).getTime(),i=an(t);return new Date(n+i)}function Ap(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 Qp(e){return St(1,arguments),e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Vp(e){if(St(1,arguments),!Qp(e)&&typeof e!="number")return!1;var t=bn(e);return!isNaN(Number(t))}var Rp={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"}},Wp=function(e,t,n){var i,l=Rp[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},Bp=Wp;function ac(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 Hp={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Gp={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Zp={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Yp={date:ac({formats:Hp,defaultWidth:"full"}),time:ac({formats:Gp,defaultWidth:"full"}),dateTime:ac({formats:Zp,defaultWidth:"full"})},Fp=Yp,_p={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Up=function(e,t,n,i){return _p[e]},$p=Up;function ya(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,f=i.width?String(i.width):c;o=e.formattingValues[f]||e.formattingValues[c]}else{var d=e.defaultWidth,g=i.width?String(i.width):e.defaultWidth;o=e.values[g]||e.values[d]}var m=e.argumentCallback?e.argumentCallback(t):t;return o[m]}}var Xp={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Kp={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},qp={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"]},e5={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"]},t5={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"}},n5={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"}},i5=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"},r5={ordinalNumber:i5,era:ya({values:Xp,defaultWidth:"wide"}),quarter:ya({values:Kp,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:ya({values:qp,defaultWidth:"wide"}),day:ya({values:e5,defaultWidth:"wide"}),dayPeriod:ya({values:t5,defaultWidth:"wide",formattingValues:n5,defaultFormattingWidth:"wide"})},a5=r5;function ba(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],f=i&&e.parsePatterns[i]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(f)?l5(f,function(C){return C.test(c)}):s5(f,function(C){return C.test(c)}),g;g=e.valueCallback?e.valueCallback(d):d,g=n.valueCallback?n.valueCallback(g):g;var m=t.slice(c.length);return{value:g,rest:m}}}function s5(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function l5(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function o5(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 f=t.slice(l.length);return{value:c,rest:f}}}var c5=/^(\d+)(th|st|nd|rd)?/i,u5=/\d+/i,d5={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},f5={any:[/^b/i,/^(a|c)/i]},h5={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},g5={any:[/1/i,/2/i,/3/i,/4/i]},m5={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},p5={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]},y5={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},b5={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]},C5={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},M5={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}},I5={ordinalNumber:o5({matchPattern:c5,parsePattern:u5,valueCallback:function(e){return parseInt(e,10)}}),era:ba({matchPatterns:d5,defaultMatchWidth:"wide",parsePatterns:f5,defaultParseWidth:"any"}),quarter:ba({matchPatterns:h5,defaultMatchWidth:"wide",parsePatterns:g5,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:ba({matchPatterns:m5,defaultMatchWidth:"wide",parsePatterns:p5,defaultParseWidth:"any"}),day:ba({matchPatterns:y5,defaultMatchWidth:"wide",parsePatterns:b5,defaultParseWidth:"any"}),dayPeriod:ba({matchPatterns:C5,defaultMatchWidth:"any",parsePatterns:M5,defaultParseWidth:"any"})},w5=I5,v5={code:"en-US",formatDistance:Bp,formatLong:Fp,formatRelative:$p,localize:a5,match:w5,options:{weekStartsOn:0,firstWeekContainsDate:1}},N5=v5;function L5(e,t){St(2,arguments);var n=an(t);return Jp(e,-n)}var k5=864e5;function T5(e){St(1,arguments);var t=bn(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/k5)+1}function Ds(e){St(1,arguments);var t=1,n=bn(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 vf(e){St(1,arguments);var t=bn(e),n=t.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var l=Ds(i),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var c=Ds(o);return t.getTime()>=l.getTime()?n+1:t.getTime()>=c.getTime()?n:n-1}function x5(e){St(1,arguments);var t=vf(e),n=new Date(0);n.setUTCFullYear(t,0,4),n.setUTCHours(0,0,0,0);var i=Ds(n);return i}var S5=6048e5;function D5(e){St(1,arguments);var t=bn(e),n=Ds(t).getTime()-x5(t).getTime();return Math.round(n/S5)+1}function js(e,t){St(1,arguments);var n=t||{},i=n.locale,l=i&&i.options&&i.options.weekStartsOn,o=l==null?0:an(l),c=n.weekStartsOn==null?o:an(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=bn(e),d=f.getUTCDay(),g=(d<c?7:0)+d-c;return f.setUTCDate(f.getUTCDate()-g),f.setUTCHours(0,0,0,0),f}function Nf(e,t){St(1,arguments);var n=bn(e),i=n.getUTCFullYear(),l=t||{},o=l.locale,c=o&&o.options&&o.options.firstWeekContainsDate,f=c==null?1:an(c),d=l.firstWeekContainsDate==null?f:an(l.firstWeekContainsDate);if(!(d>=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(i+1,0,d),g.setUTCHours(0,0,0,0);var m=js(g,t),C=new Date(0);C.setUTCFullYear(i,0,d),C.setUTCHours(0,0,0,0);var I=js(C,t);return n.getTime()>=m.getTime()?i+1:n.getTime()>=I.getTime()?i:i-1}function j5(e,t){St(1,arguments);var n=t||{},i=n.locale,l=i&&i.options&&i.options.firstWeekContainsDate,o=l==null?1:an(l),c=n.firstWeekContainsDate==null?o:an(n.firstWeekContainsDate),f=Nf(e,t),d=new Date(0);d.setUTCFullYear(f,0,c),d.setUTCHours(0,0,0,0);var g=js(d,t);return g}var z5=6048e5;function P5(e,t){St(1,arguments);var n=bn(e),i=js(n,t).getTime()-j5(n,t).getTime();return Math.round(i/z5)+1}function Xe(e,t){for(var n=e<0?"-":"",i=Math.abs(e).toString();i.length<t;)i="0"+i;return n+i}var E5={y:function(e,t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return Xe(t==="yy"?i%100:i,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):Xe(n+1,2)},d:function(e,t){return Xe(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 Xe(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Xe(e.getUTCHours(),t.length)},m:function(e,t){return Xe(e.getUTCMinutes(),t.length)},s:function(e,t){return Xe(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 Xe(l,t.length)}},Mi=E5,vr={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},O5={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 Mi.y(e,t)},Y:function(e,t,n,i){var l=Nf(e,i),o=l>0?l:1-l;if(t==="YY"){var c=o%100;return Xe(c,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Xe(o,t.length)},R:function(e,t){var n=vf(e);return Xe(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return Xe(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 Xe(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 Xe(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 Mi.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 Xe(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=P5(e,i);return t==="wo"?n.ordinalNumber(l,{unit:"week"}):Xe(l,t.length)},I:function(e,t,n){var i=D5(e);return t==="Io"?n.ordinalNumber(i,{unit:"week"}):Xe(i,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):Mi.d(e,t)},D:function(e,t,n){var i=T5(e);return t==="Do"?n.ordinalNumber(i,{unit:"dayOfYear"}):Xe(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 Xe(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 Xe(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 Xe(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=vr.noon:i===0?l=vr.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=vr.evening:i>=12?l=vr.afternoon:i>=4?l=vr.morning:l=vr.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 Mi.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Mi.H(e,t)},K:function(e,t,n){var i=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(i,{unit:"hour"}):Xe(i,t.length)},k:function(e,t,n){var i=e.getUTCHours();return i===0&&(i=24),t==="ko"?n.ordinalNumber(i,{unit:"hour"}):Xe(i,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Mi.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Mi.s(e,t)},S:function(e,t){return Mi.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 kf(o);case"XXXX":case"XX":return Yi(o);case"XXXXX":case"XXX":default:return Yi(o,":")}},x:function(e,t,n,i){var l=i._originalDate||e,o=l.getTimezoneOffset();switch(t){case"x":return kf(o);case"xxxx":case"xx":return Yi(o);case"xxxxx":case"xxx":default:return Yi(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"+Lf(o,":");case"OOOO":default:return"GMT"+Yi(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"+Lf(o,":");case"zzzz":default:return"GMT"+Yi(o,":")}},t:function(e,t,n,i){var l=i._originalDate||e,o=Math.floor(l.getTime()/1e3);return Xe(o,t.length)},T:function(e,t,n,i){var l=i._originalDate||e,o=l.getTime();return Xe(o,t.length)}};function Lf(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+Xe(o,2)}function kf(e,t){if(e%60===0){var n=e>0?"-":"+";return n+Xe(Math.abs(e)/60,2)}return Yi(e,t)}function Yi(e,t){var n=t||"",i=e>0?"-":"+",l=Math.abs(e),o=Xe(Math.floor(l/60),2),c=Xe(l%60,2);return i+o+n+c}var J5=O5;function Tf(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 xf(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 A5(e,t){var n=e.match(/(P+)(p+)?/)||[],i=n[1],l=n[2];if(!l)return Tf(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}}",Tf(i,t)).replace("{{time}}",xf(l,t))}var Q5={p:xf,P:A5},V5=Q5,R5=["D","DD"],W5=["YY","YYYY"];function B5(e){return R5.indexOf(e)!==-1}function H5(e){return W5.indexOf(e)!==-1}function Sf(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 G5=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Z5=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Y5=/^'([^]*?)'?$/,F5=/''/g,_5=/[a-zA-Z]/;function U5(e,t,n){St(2,arguments);var i=String(t),l=n||{},o=l.locale||N5,c=o.options&&o.options.firstWeekContainsDate,f=c==null?1:an(c),d=l.firstWeekContainsDate==null?f:an(l.firstWeekContainsDate);if(!(d>=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=o.options&&o.options.weekStartsOn,m=g==null?0:an(g),C=l.weekStartsOn==null?m:an(l.weekStartsOn);if(!(C>=0&&C<=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 I=bn(e);if(!Vp(I))throw new RangeError("Invalid time value");var b=Ap(I),M=L5(I,b),L={firstWeekContainsDate:d,weekStartsOn:C,locale:o,_originalDate:I},k=i.match(Z5).map(function(N){var v=N[0];if(v==="p"||v==="P"){var p=V5[v];return p(N,o.formatLong,L)}return N}).join("").match(G5).map(function(N){if(N==="''")return"'";var v=N[0];if(v==="'")return $5(N);var p=J5[v];if(p)return!l.useAdditionalWeekYearTokens&&H5(N)&&Sf(N,t,e),!l.useAdditionalDayOfYearTokens&&B5(N)&&Sf(N,t,e),p(M,N,o.localize,L);if(v.match(_5))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return N}).join("");return k}function $5(e){return e.match(Y5)[1].replace(F5,"'")}const wt={},Df=/d{1,4}|M{1,4}|yy(?:yy)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Fi=/\d\d?/,X5=/\d{3}/,K5=/\d{4}/,zs=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,jf=function(){};function zf(e,t){const n=[];for(let i=0,l=e.length;i<l;i++)n.push(e[i].substr(0,t));return n}function Pf(e){return(t,n,i)=>{const l=i[e].indexOf(n.charAt(0).toUpperCase()+n.substr(1).toLowerCase());~l&&(t.month=l)}}function Jn(e,t=2){let n=String(e);for(;n.length<t;)n=`0${n}`;return n}const Ef=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Of=["January","February","March","April","May","June","July","August","September","October","November","December"],q5=zf(Of,3),ey=zf(Ef,3);wt.i18n={dayNamesShort:ey,dayNames:Ef,monthNamesShort:q5,monthNames:Of,amPm:["am","pm"],DoFn(e){return e+["th","st","nd","rd"][e%10>3?0:(e-e%10!==10)*e%10]}};const Jf={D(e){return e.getDay()},DD(e){return Jn(e.getDay())},Do(e,t){return t.DoFn(e.getDate())},d(e){return e.getDate()},dd(e){return Jn(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 Jn(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 Jn(e.getHours()%12||12)},H(e){return e.getHours()},HH(e){return Jn(e.getHours())},m(e){return e.getMinutes()},mm(e){return Jn(e.getMinutes())},s(e){return e.getSeconds()},ss(e){return Jn(e.getSeconds())},S(e){return Math.round(e.getMilliseconds()/100)},SS(e){return Jn(Math.round(e.getMilliseconds()/10),2)},SSS(e){return Jn(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?"-":"+")+Jn(Math.floor(Math.abs(t)/60)*100+Math.abs(t)%60,4)}},lt={d:[Fi,(e,t)=>{e.day=t}],M:[Fi,(e,t)=>{e.month=t-1}],yy:[Fi,(e,t)=>{const i=+`${new Date().getFullYear()}`.substr(0,2);e.year=`${t>68?i-1:i}${t}`}],h:[Fi,(e,t)=>{e.hour=t}],m:[Fi,(e,t)=>{e.minute=t}],s:[Fi,(e,t)=>{e.second=t}],yyyy:[K5,(e,t)=>{e.year=t}],S:[/\d/,(e,t)=>{e.millisecond=t*100}],SS:[/\d{2}/,(e,t)=>{e.millisecond=t*10}],SSS:[X5,(e,t)=>{e.millisecond=t}],D:[Fi,jf],ddd:[zs,jf],MMM:[zs,Pf("monthNamesShort")],MMMM:[zs,Pf("monthNames")],a:[zs,(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)}]};lt.DD=lt.D,lt.dddd=lt.ddd,lt.Do=lt.dd=lt.d,lt.mm=lt.m,lt.hh=lt.H=lt.HH=lt.h,lt.MM=lt.M,lt.ss=lt.s,lt.A=lt.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(Df,l=>l in Jf?Jf[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(Df,d=>{if(lt[d]){const g=lt[d],m=e.search(g[0]);~m?e.replace(g[0],C=>(g[1](o,C,i),e=e.substr(m+C.length),C)):l=!1}return lt[d]?"":d.slice(1,d.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 f;return o.timezoneOffset!==null&&o.timezoneOffset!==void 0?(o.minute=+(o.minute||0)-+o.timezoneOffset,f=new Date(Date.UTC(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0))):f=new Date(o.year||c.getFullYear(),o.month||0,o.day||1,o.hour||0,o.minute||0,o.second||0,o.millisecond||0),f};const sc=" - ",Xn=(e,t)=>{const n=bn(new Date(e));return!n||isNaN(n.getTime())?"":U5(n,t||"yyyy-MM-dd")},lc=(e,t)=>{if(Array.isArray(e)&&e.length===2){const n=e[0],i=e[1];if(n&&i)return Xn(n,t)+sc+Xn(i,t)}else if(!Array.isArray(e)&&e instanceof Date)return Xn(e,t);return""},oc=(e,t)=>{const n=Array.isArray(e)?e:e.split(sc);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[]},Nr={default:{formatter(e){return e?`${e}`:""},parser(e){return e===void 0||e===""?null:e}},date:{formatter:(e,t)=>Xn(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},datetime:{formatter:(e,t)=>Xn(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},daterange:{formatter:lc,parser:oc},datetimerange:{formatter:lc,parser:oc},timerange:{formatter:lc,parser:oc},time:{formatter:(e,t)=>Xn(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},month:{formatter:(e,t)=>Xn(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},year:{formatter:(e,t)=>Xn(e,t),parser:(e,t)=>wt.parse(e,t||"yyyy-MM-dd")},multiple:{formatter(e,t){return e.filter(Boolean).map(n=>Xn(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}}},ty=()=>{const e=new Date;return e.setHours(0),e.setMinutes(0),e.setSeconds(0),e},ny=e=>e.every(t=>!t||typeof t=="string"&&t.trim()===""),Af=e=>e?[e.getHours(),e.getMinutes(),e.getSeconds()]:[0,0,0],Qf={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"},Ps=(e,t,n,i)=>{const l=t.includes("range"),{parser:o}=Nr[t]||Nr.default,c=i||Qf[t],f=Nr.multiple.parser;let d=e;if(e&&t==="time"&&!(e instanceof Date))d=o(e,c);else if(n&&e)d=f(e,c);else if(l)if(!e)d=[null,null];else if(typeof e=="string")d=o(e,c);else if(t==="timerange")d=o(e,c).map(g=>g||"");else{const[g,m]=e;g instanceof Date&&m instanceof Date?d=e.map(C=>new Date(C)):typeof g=="string"&&typeof m=="string"?d=o(e.join(sc),c):(!g||!m)&&(d=[null,null])}else typeof e=="string"&&t.indexOf("time")!==0&&(d=o(e,c)||null);return l||n?d||[]:[d]},Ca=(e,t,n,i)=>{const l=Qf[t];if(n){const{formatter:c}=Nr.multiple;return c(e,i||l)}const{formatter:o}=Nr[t]||Nr.default;return o(e,i||l)},iy=Symbol("date-picker");function sn(e,t=""){return["bk-picker-panel-icon-btn",`bk-date-picker-${e}-btn`,`bk-date-picker-${e}-btn-arrow${t}`]}const ry=(e,t)=>new Date(e,t+1,0).getDate(),Vf=(e,t)=>{const n=new Date(e),i=n.getMonth()+t,l=ry(n.getFullYear(),i);return l<n.getDate()&&n.setDate(l),n.setMonth(i),n},Rf=(()=>{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),f=c[1],d=[c[0],c[2]].map(g=>({label:g.replace(/\[[^\]]+\]/,C=>C.slice(1,-1).replace(t,I=>e[I](l,n))),type:g.indexOf("yy")!==-1?"year":"month"}));return{separator:f,labels:d}}})(),_i=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t.getTime()},ay=(e,t,n)=>{if(!t||!n)return!1;const[i,l]=[t,n].sort();return e>=i&&e<=l},sy={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 cc=a.defineComponent({props:sy,emits:["pick","pick-click","changeRange"],setup(e,{emit:t}){const n=a.computed(()=>new Op.Generator({onlyDays:!0,weekStart:0})),i=a.computed(()=>{const g=["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"];return g.splice(0,7-0).concat(g.splice(0,0))}),l=a.computed(()=>e.selectionMode==="range"&&e.rangeState.selecting?[e.rangeState.from]:e.modelValue),o=a.computed(()=>{const g=e.tableDate.getFullYear(),m=e.tableDate.getMonth(),C=_i(new Date),I=l.value.filter(Boolean).map(_i),[b,M]=l.value.map(_i),L=e.rangeState.from&&_i(e.rangeState.from),k=e.rangeState.to&&_i(e.rangeState.to),N=e.selectionMode==="range",v=typeof e.disableDate=="function"&&e.disableDate;return n.value(g,m,p=>{p.date instanceof Date&&p.date.setTime(p.date.getTime()+p.date.getTimezoneOffset()*6e4);const w=p.date&&_i(p.date),x=p.date&&m===p.date.getMonth();return Ne(H({},p),{type:w===C?"today":p.type,selected:x&&I.includes(w),disabled:p.date&&v&&v(new Date(w)),range:x&&N&&ay(w,L,k),start:x&&N&&w===b,end:x&&N&&w===M})}).cells.slice(0)});return{headerDays:i,cells:o,getCellCls:g=>["bk-date-picker-cells-cell",{["bk-date-picker-cells-cell-selected"]:g.selected||g.start||g.end,["bk-date-picker-cells-cell-disabled"]:g.disabled,["bk-date-picker-cells-cell-today"]:g.type==="today",["bk-date-picker-cells-cell-prev-month"]:g.type==="prevMonth",["bk-date-picker-cells-cell-next-month"]:g.type==="nextMonth",["bk-date-picker-cells-cell-week-label"]:g.type==="weekLabel",["bk-date-picker-cells-cell-range"]:g.range&&!g.start&&!g.end}],handleClick:g=>{if(g.disabled||g.type==="weekLabel")return;const m=new Date(_i(g.date));t("pick",m),t("pick-click")},handleMouseMove:g=>{if(!e.rangeState.selecting||g.disabled)return;const m=g.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 ly={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}};var oy=a.defineComponent({props:ly,emits:["pick","pick-success","pick-clear"],setup(e,{slots:t,emit:n}){const i=O=>O.match(/^time/)?"time-picker":`${O}-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}),c=()=>{setTimeout(()=>{o.currentView=e.selectionMode},500)},f=O=>{o.panelDate=O,o.pickerTable==="year-table"?o.pickerTable="month-table":o.pickerTable=i(o.currentView)},d=(O,P)=>{let E=O;e.selectionMode==="year"?E=new Date(O.getFullYear(),0,1):e.selectionMode==="month"?E=new Date(o.panelDate.getFullYear(),O.getMonth(),1):E=new Date(O),o.dates=[E],n("pick",E,!1,P||e.selectionMode)},g=()=>{c(),n("pick-success")},m=()=>{c(),n("pick-clear")},C=O=>{O.value&&n("pick",O.value(),!1,void 0,O),O.onClick&&O.onClick(this),e.shortcutClose&&g()},I=()=>{o.currentView=e.selectionMode,o.pickerTable=i(o.currentView)},b=O=>{e.selectionMode==="year"||o.pickerTable==="year-table"?o.panelDate=new Date(o.panelDate.getFullYear()+O*10,0,1):o.panelDate=Vf(o.panelDate,O*12)},M=O=>{o.panelDate=Vf(o.panelDate,O)},L=a.ref(null),k=a.ref(null),N=O=>{var P,E;O&&((P=L==null?void 0:L.value)==null||P.updateScroll(),(E=k==null?void 0:k.value)==null||E.updateScroll())},v=a.computed(()=>o.pickerTable===`${o.currentView}-table`?d:f),p=a.computed(()=>{const O="zh-CN",P="[yyyy]-[mm]",E=o.panelDate,{labels:_,separator:G}=Rf(O,P,E),se=ce=>()=>{o.pickerTable=i(ce)};return{separator:G,labels:_.map(ce=>{const de=ce;return de.handler=se(ce.type),de})}}),w=a.computed(()=>p.value.labels[0].type==="year"||o.currentView==="date"),x=a.computed(()=>p.value.labels[1].type==="year"||o.currentView==="date"),S=a.computed(()=>o.currentView==="time"),Q=()=>{o.currentView=o.currentView==="time"?"date":"time"},z=a.computed(()=>!!t.shortcuts);return Ne(H({},a.toRefs(o)),{panelPickerHandlers:v,datePanelLabel:p,showLabelFirst:w,showLabelSecond:x,handleShortcutClick:C,changeYear:b,changeMonth:M,reset:I,isTime:S,hasShortcuts:z,onToggleVisibility:N,handleToggleTime:Q,handlePickSuccess:g,handlePickClear:m})},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:sn("prev","-double"),onClick:()=>this.changeYear(-1)},[a.createVNode(ea,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:sn("prev"),onClick:()=>this.changeMonth(-1)},[a.createVNode(Ai,{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:sn("next","-double"),onClick:()=>this.changeYear(1)},[a.createVNode(ta,{style:{fontSize:"20px",lineHeight:1}},null)]),this.pickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:sn("next"),onClick:()=>this.changeMonth(1)},[a.createVNode(Sn,{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(cc,{tableDate:this.panelDate,disableDate:this.disableDate,selectionMode:this.selectionMode,modelValue:this.dates,focusedDate:this.focusedDate,onPick:this.panelPickerHandlers},null);default:return null}})():""]),this.confirm?a.createVNode(Sp,{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 cy={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:()=>[]},clearable:{type:Boolean,default:!0},splitPanels:{type:Boolean,default:!0},shortcutClose:{type:Boolean,default:!1},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 uy=a.defineComponent({props:cy,emits:["pick"],setup(e,{slots:t,emit:n}){const[i,l]=e.modelValue.map(J=>J||ty()),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}),f=(J,V)=>!J||!V?0:J.getTime()-V.getTime(),d=()=>{c.currentView=e.selectionMode,c.leftPickerTable=`${c.currentView}-table`,c.rightPickerTable=`${c.currentView}-table`},g=a.ref(null),m=a.ref(null),C=J=>{var V,X;J&&((V=g==null?void 0:g.value)==null||V.updateScroll(),(X=m==null?void 0:m.value)==null||X.updateScroll())},I=(J,V,X,Y=!0)=>{const ne=new Date(c[`${J}PanelDate`]);if(ne[`set${V}`](ne[`get${V}`]()+X),c[`${J}PanelDate`]=ne,!!Y)if(e.splitPanels){const le=J==="left"?"right":"left";J==="left"&&c.leftPanelDate>=c.rightPanelDate&&I(le,V,1),J==="right"&&c.rightPanelDate<=c.leftPanelDate&&I(le,V,-1)}else{const le=J==="left"?"right":"left",ge=c[`${le}PanelDate`],U=new Date(ge);if(V==="Month"){const fe=new Date(U.getFullYear(),U.getMonth()+X+1,0).getDate();U.setDate(Math.min(fe,U.getDate()))}U[`set${V}`](U[`get${V}`]()+X),c[`${le}PanelDate`]=U}},b=J=>{const V=c.currentView==="year"?-10:-1;I(J,"FullYear",V)},M=J=>{const V=c.currentView==="year"?10:1;I(J,"FullYear",V)},L=J=>{I(J,"Month",-1)},k=J=>{I(J,"Month",1)},N=J=>{c[`${J}PickerTable`]="year-table"},v=J=>{c[`${J}PickerTable`]="month-table"},p=J=>{const V="zh-CN",X="[yyyy]-[mm]",Y=c[`${J}PanelDate`],{labels:ne,separator:le}=Rf(V,X,Y),ge=U=>{const fe=U==="month"?v:N;return()=>fe(J)};return{separator:le,labels:ne.map(U=>{const fe=U;return fe.handler=ge(U.type),fe})}},w=(J,V)=>{n("pick",c.dates,J,V||e.type)},x=(J,V)=>{if(console.warn("handleRangePick"),c.rangeState.selecting||c.currentView==="time"){if(c.currentView==="time")c.dates=J;else{const[X,Y]=[c.rangeState.from,J].sort(f),ne=V==="upToNow"?new Date:new Date(new Date(new Date(Y.setHours(23)).setMinutes(59)).setSeconds(59));c.dates=[X,ne],c.rangeState={from:X,to:ne,selecting:!1}}w(!1,V||"date")}else c.upToNowEnable=new Date(J).getTime()<new Date().getTime(),c.rangeState={from:J,to:null,selecting:!0}},S=(J,V)=>{if(c[`${J}PanelDate`]=V,c[`${J}PickerTable`]==="year-table"?c[`${J}PickerTable`]="month-table":c[`${J}PickerTable`]=`${c.currentView}-table`,!e.splitPanels){const Y=J==="left"?"right":"left";c[`${Y}PanelDate`]=V,I(Y,"Month",Y==="left"?-1:1,!1)}},Q=J=>{c.rangeState.to=J};a.watch(()=>e.selectionMode,J=>{c.currentView=J||"range"});const z=a.computed(()=>c.currentView==="time"),O=a.computed(()=>p("left")),P=a.computed(()=>p("right")),E=a.computed(()=>c.leftPickerTable.split("-").shift()),_=a.computed(()=>c.rightPickerTable.split("-").shift()),G=a.computed(()=>O.value.labels[0].type==="year"||c.currentView==="date"),se=a.computed(()=>O.value.labels[1].type==="year"||c.currentView==="date"),ce=a.computed(()=>P.value.labels[0].type==="year"||c.currentView==="date"),de=a.computed(()=>P.value.labels[1].type==="year"||c.currentView==="date"),pe=a.computed(()=>{const J=`${c.currentView}-table`;return{left:c.leftPickerTable!==J,right:c.rightPickerTable!==J}}),K=a.computed(()=>({left:pe.value.left?S.bind("left"):x,right:pe.value.right?S.bind("right"):x})),Z=a.computed(()=>!!t.shortcuts);return Ne(H({},a.toRefs(c)),{isTime:z,hasShortcuts:Z,prevYear:b,nextYear:M,prevMonth:L,nextMonth:k,leftDatePanelLabel:O,rightDatePanelLabel:P,leftDatePanelView:E,rightDatePanelView:_,leftShowLabelFirst:G,leftShowLabelSecond:se,rightShowLabelFirst:ce,rightShowLabelSecond:de,preSelecting:pe,panelPickerHandlers:K,reset:d,onToggleVisibility:C,handleRangePick:x,handleChangeRange:Q})},render(){var e,t,n;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:i=>{i.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:sn("prev","-double"),onClick:()=>this.prevYear("left")},[a.createVNode(ea,{style:{fontSize:"20px",lineHeight:1}},null)]),this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:sn("prev"),onClick:()=>this.prevMonth("left")},[a.createVNode(Ai,{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:sn("next","-double"),onClick:()=>this.nextYear("left")},[a.createVNode(ta,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels||this.leftPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:sn("next"),onClick:()=>this.nextMonth("left")},[a.createVNode(Sn,{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(cc,{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:sn("prev","-double"),onClick:()=>this.prevYear("right")},[a.createVNode(ea,{style:{fontSize:"20px",lineHeight:1}},null)]):"",this.splitPanels&&this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:sn("prev","-double"),onClick:()=>this.prevMonth("right")},[a.createVNode(Ai,{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:sn("next","-double"),onClick:()=>this.nextYear("right")},[a.createVNode(ta,{style:{fontSize:"20px",lineHeight:1}},null)]),this.rightPickerTable==="date-table"?a.withDirectives(a.createVNode("span",{class:sn("next"),onClick:()=>this.nextMonth("right")},[a.createVNode(Sn,{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(cc,{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"},[(n=(t=(e=this.$slots).shortcuts)==null?void 0:t.call(e))!=null?n:null]):null])}});const dy={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};var fy=a.defineComponent({name:"DatePicker",directives:{clickoutside:sa},props:dy,emits:["open-change","input","change","update:modelValue","clear","shortcut-change","pick-success"],slots:["header"],setup(e,{slots:t,emit:n}){const i=di(),l=e.type.includes("range"),o=l?[null,null]:[null];let c=ny((l?e.modelValue:[e.modelValue])||[])?o:Ps(e.modelValue,e.type,e.multiple,e.format),f=null;e.shortcutSelectedIndex!==-1&&(f=e.shortcuts[e.shortcutSelectedIndex]||null,f&&(c=f.value()));const d=a.reactive({showClose:!1,visible:!1,internalValue:c,disableClickOutSide:!1,disableCloseUnderTransfer:!1,selectionMode:"date",forceInputRerender:1,isFocused:!1,focusedDate:c[0]||e.startDate||new Date,focusedTime:{column:0,picker:0,time:c.map(Af),active:!1},internalFocus:!1,timeEnterMode:!0,shortcut:f,onSelectionModeChange:g});function g(U){let fe=U;return U.match(/^date/)&&(fe="date"),d.selectionMode=["year","month","date","time"].indexOf(fe)>-1&&fe,d.selectionMode}const m=a.computed(()=>{if(e.multiple)return d.internalValue.slice();const U=e.type.includes("range");let fe=d.internalValue.map(he=>he instanceof Date?new Date(he):he||"");return e.type.match(/^time/)&&(fe=fe.map(he=>Ca(he,e.type,e.multiple,e.format))),U||e.multiple?fe:fe[0]}),C=a.computed(()=>e.type.match(/^time/)?m.value:e.multiple?Ca(m.value,e.type,e.multiple,e.format):Array.isArray(m.value)?m.value.map(U=>Ca(U,e.type,e.multiple,e.format)):Ca(m.value,e.type,e.multiple,e.format)),I=a.computed(()=>e.type==="daterange"||e.type==="datetimerange"?"DateRangePanel":"DatePanel"),b=a.computed(()=>e.open===null?d.visible:e.open),M=a.computed(()=>Ca(d.internalValue,e.type,e.multiple,e.format)),L=a.computed(()=>{var U;return((U=d.shortcut)==null?void 0:U.text)&&e.useShortcutText?d.shortcut.text:M.value}),k=a.computed(()=>!!t.trigger||e.type==="datetime"||e.type==="datetimerange"||e.multiple),N=a.computed(()=>!!t.header),v=a.computed(()=>!!t.footer),p=a.computed(()=>!!t.shortcuts),w=a.computed(()=>{let U="";return e.fontSize==="medium"?U="medium-font":e.fontSize==="large"&&(U="large-font"),U}),x=a.computed(()=>{let U="";return e.fontSize==="medium"?U="medium-width":e.fontSize==="large"&&(U="large-width"),U}),S=a.computed(()=>{var U;return((U=d.shortcut)==null?void 0:U.text)&&e.useShortcutText?!0:!e.editable||e.readonly}),Q=a.computed(()=>I.value==="RangeTimePickerPanel"?e.allowCrossDay:!1),z=a.ref(null),O=()=>{var U;(U=z==null?void 0:z.value)==null||U.focus()};a.watch(()=>d.visible,U=>{var fe,he;U===!1&&((fe=P.value)==null||fe.destoryDropdown()),(he=P.value)==null||he.updateDropdown(),n("open-change",U)});const P=a.ref(null);a.watch(()=>e.modelValue,U=>{d.internalValue=Ps(U,e.type,e.multiple,e.format)}),a.watch(()=>e.open,U=>{d.visible=U===!0}),a.watch(()=>e.type,U=>{g(U)}),a.watch(()=>m,(U,fe)=>{const he=JSON.stringify(U),F=JSON.stringify(fe);(he!==F||typeof U!=typeof fe)&&n("input",U)}),a.onMounted(()=>{e.type.indexOf("date")>-1,d.timeEnterMode=!0;const U=e.modelValue,fe=m.value;(typeof U!=typeof fe||JSON.stringify(U)!==JSON.stringify(fe))&&n("input",m.value),e.open!==null&&(d.visible=e.open),a.provide(iy,{props:e,focus:()=>O()})});const E=a.ref(null),_=U=>{var fe;if(d.disableCloseUnderTransfer)return d.disableCloseUnderTransfer=!1,!1;if(U&&U.type==="mousedown"&&d.visible){U.preventDefault(),U.stopPropagation();return}if(d.visible){const he=(fe=E==null?void 0:E.value)==null?void 0:fe.$el;if(U&&he&&he.contains(U.target))return;d.visible=!1,U==null||U.preventDefault(),U==null||U.stopPropagation();return}d.isFocused=!1,d.disableClickOutSide=!1},G=()=>{var U,fe;(U=z==null?void 0:z.value)==null||U.focus(),(fe=z==null?void 0:z.value)==null||fe.click()},se=()=>{e.readonly||e.disabled||M!=null&&M.value&&(d.showClose=!0)},ce=U=>{console.log("handleInputMouseleave"),d.showClose=!1},de=U=>{a.nextTick(()=>{var fe,he;n("change",C.value,U),n("update:modelValue",m.value),(fe=i==null?void 0:i.validate)==null||fe.call(i,"change"),e.type.indexOf("time")<0&&((he=z==null?void 0:z.value)==null||he.blur())})},pe=U=>{var at;const fe=e.type.includes("range")||e.multiple,he=M.value,F=U.target.value,ie=Ps(F,e.type,e.multiple,e.format),Me=fe?ie:ie[0],we=(at=e.disableDate)==null?void 0:at.call(e,Me),Ee=ie.reduce((te,oe)=>te&&oe instanceof Date,!0);F!==he&&!we&&Ee?(de(e.type),d.internalValue=ie):d.forceInputRerender=d.forceInputRerender+1},K=U=>{e.readonly||(d.isFocused=!0,!(U&&U.type==="focus")&&(e.disabled||(d.visible=!0)))},Z=()=>{var U;(U=E==null?void 0:E.value)==null||U.reset()},J=U=>{var fe,he;if(d.internalFocus){d.internalFocus=!1;return}if(d.visible){U.preventDefault();return}d.isFocused=!1,g(e.type),d.internalValue=d.internalValue.slice(),Z(),(fe=E==null?void 0:E.value)==null||fe.onToggleVisibility(!1),(he=i==null?void 0:i.validate)==null||he.call(i,"blur")},V=U=>{const{keyCode:fe}=U;if(fe===9&&d.visible)if(U.stopPropagation(),U.preventDefault(),k.value){const F=".bk-picker-confirm > *",ie=P.value.$el.querySelectorAll(F);d.internalFocus=!0,[...ie][U.shiftKey?"pop":"shift"]().focus()}else _();const he=[37,38,39,40];if(!d.visible&&he.includes(fe)){d.visible=!0;return}fe===27&&d.visible&&(U.stopPropagation(),_()),!!he.includes(fe)&&d.focusedTime.active&&U.preventDefault()},X=()=>{d.visible=!1,d.internalValue=d.internalValue.map(()=>null),n("clear"),de(e.type),Z(),d.showClose=!1,d.shortcut=null,setTimeout(()=>g(e.type),500)},Y=()=>{e.appendToBody&&(d.disableCloseUnderTransfer=!0)},ne=()=>{var U;d.visible=!1,a.nextTick(()=>{n("pick-success")}),(U=z==null?void 0:z.value)==null||U.blur(),Z()},le=(U,fe=!1,he,F)=>{let ie=U;if(e.multiple){const we=ie.getTime(),Ee=d.internalValue.findIndex(oe=>oe&&oe.getTime()===we),te=[...d.internalValue,ie].filter(Boolean).map(oe=>oe.getTime()).filter((oe,ye,Se)=>Se.indexOf(oe)===ye&&ye!==Ee);d.internalValue=te.map(oe=>new Date(oe))}else ie=Ps(U,e.type,e.multiple,e.format),d.internalValue=Array.isArray(ie)?ie:[ie];if(d.internalValue[0]){const[we]=d.internalValue;d.focusedDate=we}d.focusedTime=Ne(H({},d.focusedTime),{time:d.internalValue.map(Af)}),k.value||(g(e.type),d.visible=fe),he==="upToNow"&&e.type==="daterange"&&ne(),d.shortcut=F,de(he);const Me=e.shortcuts.findIndex(we=>we===d.shortcut);n("shortcut-change",d.shortcut,Me)},ge=a.ref(null);return Ne(H({},a.toRefs(d)),{panel:I,publicStringValue:C,opened:b,visualValue:M,displayValue:L,isConfirm:k,hasHeader:N,hasFooter:v,hasShortcuts:p,fontSizeCls:w,longWidthCls:x,localReadonly:S,allowCrossDayProp:Q,pickerDropdownRef:P,inputRef:z,triggerRef:ge,pickerPanelRef:E,handleClose:_,handleIconClick:G,handleInputMouseenter:se,handleInputMouseleave:ce,handleFocus:K,handleBlur:J,handleKeydown:V,handleInputChange:pe,handleClear:X,handleTransferClick:Y,onPick:le,onPickSuccess:ne})},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(Dn,{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(Tp,{class:[this.appendToBody?"bk-date-picker-transfer":""],ref:"pickerDropdownRef",triggerRef:this.triggerRef,placement:this.placement,extPopoverCls:this.extPopoverCls,appendToBody:this.appendToBody,onClick:this.handleTransferClick},{default:()=>{var o,c,f,d,g,m;return[this.hasHeader?a.createVNode("div",{class:["bk-date-picker-top-wrapper",this.headerSlotCls]},[(f=(c=(o=this.$slots).header)==null?void 0:c.call(o))!=null?f:null]):null,this.panel==="DateRangePanel"?a.createVNode(uy,{ref:"pickerPanelRef",type:this.type,confirm:this.isConfirm,shortcuts:this.shortcuts,modelValue:this.internalValue,selectionMode:this.selectionMode,startDate:this.startDate,disableDate:this.disableDate,focusedDate:this.focusedDate,onPick:this.onPick,"onPick-success":this.onPickSuccess},t):a.createVNode(oy,{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},t),this.hasFooter?a.createVNode("div",{class:["bk-date-picker-footer-wrapper",this.footerSlotCls]},[(m=(g=(d=this.$slots).footer)==null?void 0:g.call(d))!=null?m:null]):null]}}),[[a.vShow,this.opened]])]})]})]),[[a.resolveDirective("clickoutside"),this.handleClose]])}});const Wf=Ze(fy);var An=(e=>(e.OBJECT_ARRAY="objectArray",e.BASE_ARRAY="baseArray",e.NOT_ARRAY="notArray",e))(An||{});const hy={title:h.arrayOf(h.string).def([]),extCls:h.string.def(""),searchPlaceholder:h.string.def(""),settingKey:h.string.def("id"),displayKey:h.string.def("value"),sortKey:h.string.def("value"),showOverflowTips:h.bool.def(!1),searchable:h.bool.def(!1),sortable:h.bool.def(!1),sourceList:h.arrayOf(h.any).def([]),targetList:h.arrayOf(h.any).def([]),emptyContent:h.arrayOf(h.string).def([])};function gy(e,t,n){const i=a.ref([]),l=a.ref([]),o=()=>{e.value.forEach(c=>{const f=c[n.value];t.value.includes(f)?l.value.push(c):i.value.push(c)})};return o(),a.watch(()=>[e,t,n],o),{selectList:i,selectedList:l}}function my(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 py=a.defineComponent({name:"Transfer",props:hy,emits:["change","update:targetList"],setup(e,{emit:t}){const n=a.computed(()=>Array.isArray(e.sourceList)?e.sourceList.every(p=>p.toString().includes("[object Object]"))?An.OBJECT_ARRAY:An.BASE_ARRAY:An.NOT_ARRAY),i=a.computed(()=>n.value===An.BASE_ARRAY?"value":e.settingKey),l=a.computed(()=>n.value===An.BASE_ARRAY?"value":e.displayKey),o=a.computed(()=>e.sortKey||l.value),c=a.computed(()=>{switch(n.value){case An.BASE_ARRAY:return[...new Set(e.sourceList)].map(v=>({value:v}));case An.OBJECT_ARRAY:return[...e.sourceList];default:return[]}}),{targetList:f}=a.toRefs(e),{selectList:d,selectedList:g}=gy(c,f,i),{selectSearchQuery:m,selectListSearch:C}=my(d,l),I=a.computed(()=>[...C.value].sort((v,p)=>{const w=v[o.value],x=p[o.value];return w>x?1:-1})),b=a.computed(()=>[...g.value].sort((v,p)=>{const w=v[o.value],x=p[o.value];return w>x?1:-1})),M=()=>{d.value=[],g.value=[...c.value],N()},L=()=>{d.value=[...c.value],g.value=[],N()},k=(v,p)=>{const w=p?d:g,x=p?g:d,S=w.value.findIndex(Q=>Q[i.value]===v);x.value.push(...w.value.splice(S,1)),N()},N=()=>{const v=d.value.map(w=>w[i.value]),p=g.value.map(w=>w[i.value]);t("update:targetList",p),t("change",n.value===An.BASE_ARRAY?v:d.value.map(w=>a.toRaw(w)),n.value===An.BASE_ARRAY?p:g.value.map(w=>a.toRaw(w)),p)};return{selectSearchQuery:m,selectListSearch:C,selectedList:g,selectListSort:I,selectedListSort:b,settingCode:i,displayCode:l,allToRight:M,allToLeft:L,handleItemClick:k}},render(){const e=this.sortable?this.selectListSort:this.selectListSearch,t=this.sortable?this.selectedListSort:this.selectedList,n=c=>{var C,I;const f=c==="left-header",d=f?`${(C=this.title[0])!=null?C:"\u5DE6\u4FA7\u5217\u8868"}`:`${(I=this.title[1])!=null?I:"\u53F3\u4FA7\u5217\u8868"}`,g=f?!e.length:!t.length,m=()=>{g||(f?this.allToRight():this.allToLeft())};return this.$slots[c]?a.createVNode("div",{class:"slot-header"},[this.$slots[c]()]):a.createVNode("div",{class:"header"},[`${d}\uFF08\u5171${f?e.length:t.length}\u6761\uFF09`,a.createVNode("span",{class:{disabled:g},onClick:()=>m()},[f?"\u5168\u90E8\u6DFB\u52A0":"\u6E05\u7A7A"])])},i=c=>{var g;const f=c==="left-empty-content",d=(g=f?this.emptyContent[0]:this.emptyContent[1])!=null?g:f?"\u65E0\u6570\u636E":"\u672A\u9009\u62E9\u4EFB\u4F55\u9879";return this.$slots[c]?a.createVNode("div",null,[this.$slots[c]()]):a.createVNode("div",{class:"empty"},[d])},l=(c,f=!0)=>a.createVNode("div",{class:"item-content"},[a.createVNode("span",{class:"content-text",title:c[this.displayCode]},[c[this.displayCode]]),a.createVNode("span",{class:"icon-wrapper"},[f?a.createVNode(no,{class:"bk-icon"},null):a.createVNode(jn,{class:"bk-icon"},null)])]),o=c=>{const f=c==="left",d=f?e:t,g=f?"source-option":"target-option",m=f?"left-empty-content":"right-empty-content";return d.length?a.createVNode("ul",{class:["content",this.searchable&&f?"is-search":""]},[d.map(C=>{var I,b,M;return a.createVNode("li",{key:C[this.settingCode],class:[this.$slots[g]?"custom-item":""],onClick:()=>this.handleItemClick(C[this.settingCode],f)},[(M=(b=(I=this.$slots)[g])==null?void 0:b.call(I,C))!=null?M:l(C,f)])})]):i(m)};return a.createVNode("div",{class:["bk-transfer",this.extCls]},[a.createVNode("div",{class:"source-list"},[n("left-header"),this.searchable&&a.createVNode(Vi,{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 Bf=Ze(py);var Ma=(e=>(e.NODE_CLICK="nodeClick",e.NODE_COLLAPSE="nodeCollapse",e.NODE_EXPAND="nodeExpand",e.NODE_CHECKED="nodeChecked",e))(Ma||{});const Es=(...e)=>!0,yy={nodeClick:Es,nodeCollapse:Es,nodeExpand:Es,nodeChecked:Es};var q=(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))(q||{});const Ii={__is_open:"isOpen",__is_selected:"selected",__is_match:"isMatch",__has_child:"hasChild",__is_checked:"checked",__is_async:"async",__is_loading:"loading",__is_root:"isRoot"},by={data:h.arrayOf(h.any).def([]),label:h.oneOfType([h.func.def(void 0),h.string.def("label")]),nodeKey:h.string.def(void 0),children:h.string.def("children"),indent:h.number.def(18),lineHeight:h.number.def(32),levelLine:h.oneOfType([h.bool.def(!1),h.func.def(void 0),h.string.def("1px dashed #c3cdd7")]).def(!1),virtualRender:h.bool.def(!1),prefixIcon:h.oneOfType([h.func.def(()=>{}),h.bool.def(!1)]).def(!0),async:h.shape({callback:h.func.def(void 0),cache:h.bool.def(!0),deepAutoOpen:h.commonType(["once","every"],"columnType").def("once")}),offsetLeft:h.number.def(5),search:h.oneOfType([h.shape({value:h.oneOfType([h.number,h.string,h.bool]).def(""),match:h.oneOfType([h.commonType(["fuzzy","full"],"TreeSearchMatchType"),h.func]),resultType:h.commonType(["tree","list"],"TreeSearchResultType").def("tree"),openResultNode:h.bool}),h.string,h.number,h.bool]).def(void 0),emptyText:h.string.def("\u6CA1\u6709\u6570\u636E"),draggable:h.bool.def(!1),dragSort:h.bool.def(!1),selectable:h.bool.def(!0),showCheckbox:h.bool.def(!1),showNodeTypeIcon:h.bool.def(!0),selected:h.oneOfType([h.string,null,h.number,h.object]).def(null),autoCheckChildren:h.bool.def(!0),autoOpenParentNode:h.bool.def(!0)};var Cy=(e,{slots:t})=>({renderEmpty:n=>a.createVNode(hs,{scene:"part",type:n},{default:()=>{var i,l;return[(l=(i=t.default)==null?void 0:i.call(t))!=null?l:e.emptyText]}})}),Os=(e,t)=>{const n=E=>e.schema.get(E),i=(E,_)=>{var G;return(G=n(E[q.UUID]))==null?void 0:G[_]},l=(E,_,G)=>{e.schema.set(E[q.UUID],Ne(H({},n(E[q.UUID])),{[_]:G}))},o=E=>i(E,q.PATH),c=E=>i(E,q.UUID),f=E=>i(E,q.IS_ROOT),d=E=>i(E,q.IS_OPEN),g=E=>i(E,q.HAS_CHILD),m=E=>i(E,q.IS_MATCH),C=E=>i(E,q.IS_CHECKED),I=E=>i(E,q.PARENT_ID),b=E=>i({[q.UUID]:E},q.PARENT_ID),M=E=>i(E,q.IS_LOADING),L=(E,_)=>{l(E,q.IS_LOADING,_)},k=E=>e.schema.delete(E),N=E=>n(I(E)),v=E=>{var _;return typeof E=="object"?d(E):typeof E=="string"?(_=n(E))==null?void 0:_[q.IS_OPEN]:!1},p=E=>v(i(E,q.PARENT_ID)),w=E=>f(E)||p(E),x=E=>E.split("-").reduce((G,se)=>{const ce=Number(se);return Array.isArray(G)?G[ce]:G[t.children][ce]},t.data),S=E=>{const _=e.schema;return Array.prototype.filter.call(Array.from(_.keys()),G=>_.get(G)[q.PARENT_ID]===E[q.UUID])},Q=E=>x(o({[q.UUID]:E})),z=E=>f({[q.UUID]:E})?{[t.children]:t.data}:Q(b(E)),O=E=>({[Ii[q.IS_LOADING]]:i(E,q.IS_LOADING),[Ii[q.HAS_CHILD]]:g(E),[Ii[q.IS_MATCH]]:m(E),[Ii[q.IS_CHECKED]]:C(E),[Ii[q.IS_OPEN]]:d(E),[Ii[q.IS_ROOT]]:f(E),fullPath:i(E,q.PATH),uuid:c(E),parentId:i(E,q.PARENT_ID)});return{getSchemaVal:n,getNodeAttr:i,getNodeId:c,getNodeParentId:I,getNodeParentIdById:b,getParentNodeData:z,getParentNode:N,setNodeAttr:l,getNodePath:o,isRootNode:f,isNodeOpened:d,hasChildNode:g,isItemOpen:v,isNodeChecked:C,isNodeMatched:m,isNodeLoading:M,checkNodeIsOpen:w,getSourceNodeByPath:x,getSourceNodeByUID:Q,deleteNodeSchema:k,resolveScopedSlotParam:O,setTreeNodeLoading:L,extendNodeAttr:E=>Ne(H({},E),{[q.TREE_NODE_ATTR]:O(E)}),getChildNodes:S}};const Hf="1px dashed #c3cdd7",Gf=(e,t,n=null,i=null,l=null,o=[])=>{const c=e[t];return typeof c=="boolean"?c?i:l:Zf(n,e,t,o)},Zf=(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}},Yf=(e,t)=>Zf(e,t,"label"),uc=(e,t)=>e.get(t)||{},My=(e,t,n)=>{var i;return(i=uc(e,t))==null?void 0:i[n]},Iy=(e,t)=>({"--level-line":Gf(t,"levelLine",e,Hf,null,["tree"]),"--lineHeight":`${t.lineHeight}px`,"--indent":`${t.indent}px`,"--offset-left":`${t.offsetLeft}px`}),wy=(e,t,n={})=>{const{schema:i}=n,l=My(i,e[q.UUID],q.DEPTH);return H({"--depth":l},typeof t.levelLine=="function"?{"--level-line":Gf(t,"levelLine",e,Hf,null,["node"])}:{})},vy=(e,t,n)=>{const{__is_root:i,__is_open:l}=uc(t,e[q.UUID])||{};return{"is-root":i,"bk-tree-node":!0,"is-open":l,"is-virtual-render":n.virtualRender,"level-line":n.levelLine}},Ny=(e,t)=>{const{__is_checked:n,__is_selected:i}=uc(t,e[q.UUID])||{};return{"is-checked":n,"is-selected":i,[Be("node-row")]:!0}},Ly=(e,t,n,i,l)=>{ky(e,t,n,{[i]:l})},ky=(e,t,n,i)=>{const o=e.split("-").reduce((c,f)=>{const d=Number(f);return Array.isArray(c)?c[d]:c[n][d]},t);Object.assign(o,i||{})},Ia=e=>e==null?{__IS_NULL:!0}:typeof e=="string"||typeof e=="number"||typeof e=="symbol"?{[q.UUID]:e}:(Object.prototype.hasOwnProperty.call(e,q.UUID)||console.error("setNodeAction Error: node id cannot found"),e);var Ff=(e,t)=>{const{setNodeAttr:n,getNodePath:i,getNodeAttr:l,resolveScopedSlotParam:o,setTreeNodeLoading:c}=Os(t,e),f=(m,C)=>{if(typeof m=="object"&&m!==null){n(C,q.IS_OPEN,!0);const I=Array.isArray(m)?m:[m];return Ly(i(C),e.data,e.children,e.children,I),Promise.resolve(m)}return Promise.resolve(m)},d=m=>{const{callback:C=null,cache:I=!0}=e.async||{};if(typeof C=="function"&&l(m,q.IS_ASYNC)){if(n(m,q.IS_ASYNC_INIT,!0),!l(m,q.IS_CACHED)){n(m,q.IS_CACHED,I);const b=o(m),M=C(m,L=>f(L,m),b);if(typeof M=="object"&&M!==null)return c(m,!0),M instanceof Promise?Promise.resolve(M.then(L=>f(L,m)).catch(L=>console.error("load remote data error:",L)).finally(()=>{c(m,!1),n(m,q.IS_CACHED,!0)})):(f(M,m),c(m,!1),Promise.resolve(!0))}return Promise.resolve(!0)}return Promise.resolve(!0)},g=()=>{const m=t.data.filter(C=>l(C,q.IS_ASYNC)&&C[Ii[q.IS_OPEN]]&&!l(C,q.IS_ASYNC_INIT));m.length&&Promise.all(m.map(C=>d(C))).then(()=>{g()}).catch(C=>{console.warn(C)})};return{asyncNodeClick:d,deepAutoOpen:g}},Ty=(e,t,n,i,l,o)=>{let c=e.selected;const{setNodeAttr:f,getNodePath:d,getSchemaVal:g,getNodeAttr:m,getNodeId:C,getChildNodes:I,isRootNode:b,hasChildNode:M,isItemOpen:L,isNodeOpened:k,isNodeLoading:N,isNodeChecked:v,getParentNode:p,resolveScopedSlotParam:w,extendNodeAttr:x}=Os(n,e),{registerNextLoop:S}=o,{asyncNodeClick:Q,deepAutoOpen:z}=Ff(e,n),O=F=>L(F)?a.createVNode(co,{class:[Be("tree-icon"),Be("node-prefix")]},null):a.createVNode(uo,{class:[Be("tree-icon"),Be("node-prefix")]},null),P=F=>{if(typeof F=="string")return F;if(typeof F=="object"&&F!==null){if(F.__v_isVNode)return F;const{node:ie,className:Me,text:we,style:Ee}=F;return a.h(ie,{class:Me,style:Ee},we)}return null},E=F=>{var ie,Me,we;return((we=(Me=(ie=t.slots).nodeLoading)==null?void 0:Me.call(ie,x(F)))!=null?we:N(F))?a.createVNode(os,null,null):""},_=F=>{if(t.slots.nodeAction)return t.slots.nodeAction(x(F));let ie=null;return N(F)?E(F):typeof e.prefixIcon=="function"&&(ie=e.prefixIcon(x(F),"node_action"),ie!=="default")?P(ie):(ie==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon)&&(M(F)||F.async||!e.autoCheckChildren)?L(F)?a.createVNode(is,{class:Be("node-prefix")},null):a.createVNode(ra,{class:Be("node-prefix")},null):null},G=F=>{if(!e.showNodeTypeIcon)return null;if(t.slots.nodeType)return t.slots.nodeType(x(F));let ie=null;return typeof e.prefixIcon=="function"&&(ie=e.prefixIcon(x(F),"node_type"),ie!=="default")?P(ie):ie==="default"||typeof e.prefixIcon=="boolean"&&e.prefixIcon?b(F)||M(F)?O(F):a.createVNode(yo,{class:[Be("tree-icon"),Be("node-prefix")]},null):null},se=(F,ie)=>{const Me=p(F);Me&&(f(Me,q.IS_CHECKED,ie),b(Me)||se(Me,ie))},ce=(F,ie,Me)=>{I(F).forEach(we=>{f({[q.UUID]:we},ie,Me),ce({[q.UUID]:we},ie,Me)})},de=(F,ie)=>{f(F,q.IS_CHECKED,!!ie),ce(F,q.IS_CHECKED,!!ie),se(F,ie),t.emit(Ma.NODE_CHECKED,l.value.filter(Me=>v(Me)).map(Me=>Me[q.UUID]))},pe=F=>v(F)&&!l.value.filter(ie=>{var Me;return(Me=d(ie))==null?void 0:Me.startsWith(d(F))}).every(ie=>v(ie)),K=F=>v(F)||l.value.filter(ie=>{var Me;return(Me=d(ie))==null?void 0:Me.startsWith(d(F))}).some(ie=>v(ie)),Z=F=>e.showCheckbox?a.createVNode(Ri,{size:"small",modelValue:K(F),indeterminate:pe(F),onChange:ie=>de(F,ie)},null):null,J=(F,ie=null,Me=null,we=!0)=>{const Ee=ie===null?!L(F):!!ie;if(Ee||ce(F,q.IS_OPEN,Ee),f(F,q.IS_OPEN,Ee),we){const at=L(F)?Ma.NODE_EXPAND:Ma.NODE_COLLAPSE;t.emit(at,F,w(F),g(F[q.UUID]),Me)}},V=(F,ie,Me)=>{if(Array.isArray(F)){F.forEach(we=>f(Ia(we),ie,Me));return}f(Ia(F),ie,Me)},X=(F,ie=!0,Me=!1)=>{const we=Ia(F);if(!we[q.IS_NULL])if(Me)if(ie){if(V(we,q.IS_OPEN,!0),!b(we)){const Ee=m(we,q.PARENT_ID);X(Ee,!0,!0)}}else J(we,!1,null,!1);else V(we,q.IS_OPEN,ie)},Y=(F,ie)=>{if(k(F)){J(F,!1,ie);return}Q(F).finally(()=>{m(F,q.IS_LOADING)?S("setNodeOpenedAfterLoading",{type:"once",fn:()=>J(F,!0,ie)}):J(F,!0,ie)})},ne=(F,ie)=>{F.stopImmediatePropagation(),F.stopPropagation(),F.preventDefault(),Y(ie,F)},le=(F,ie=!0,Me=!0)=>{const we=Array.isArray(F)?F:[F];if(!we.length)return;const Ee=Ia(we[0]);Ee[q.IS_NULL]||(e.selectable?(c!=null&&f({[q.UUID]:c},q.IS_SELECTED,!ie),e.selected&&e.selected!==c&&f({[q.UUID]:e.selected},q.IS_SELECTED,!ie),f(Ee,q.IS_SELECTED,ie),c=C(Ee),Me&&we.length===1&&X(Ee,!0,!0),m(Ee,q.IS_ASYNC)&&Q(Ee).then(()=>{a.nextTick(()=>{we.shift(),le(we,ie,Me)})})):console.warn("props.selectable is false or undefined, please set selectable with true"))},ge=(F,ie)=>{le(F,!0,!1),k(F)||Y(F,ie);const Me=Ma.NODE_CLICK;t.emit(Me,F,w(F),g(F[q.UUID]),ie)},U=(F,ie)=>{if(b(ie))return!1;const Me=d(ie),we=`${Me}`.split("-").slice(0,F+1);if(we.join("-")===Me)return!0;const at=we.pop(),te=parseInt(at,10);we.push(`${te+1}`);const oe=we.join("-");return l.value.some(ye=>ye[q.PATH]===oe)},fe=F=>{if(!e.levelLine)return null;const ie=we=>({"--depth":we}),Me=m(F,q.DEPTH)+1;return new Array(Me).fill("").map((we,Ee)=>Ee).filter(we=>U(we,F)).filter(we=>we>0).map(we=>a.createVNode("span",{class:"node-virtual-line",style:ie(Me-we)},null))};return{renderTreeNode:F=>{var ie,Me,we,Ee,at;return a.createVNode("div",{"data-tree-node":C(F),key:C(F),class:Ny(F,n.schema)},[a.createVNode("div",{class:vy(F,n.schema,e),style:wy(F,e,n),onClick:te=>ge(F,te)},[a.createVNode("span",{class:[Be("node-action")],onClick:te=>ne(te,F)},[_(F)]),a.createVNode("span",{class:Be("node-content")},[[Z(F),G(F)],a.createVNode("span",{class:Be("node-text")},[(we=(Me=(ie=t.slots).node)==null?void 0:Me.call(ie,x(F)))!=null?we:[Yf(F,e)]]),(at=(Ee=t.slots).nodeAppend)==null?void 0:at.call(Ee,x(F))]),fe(F)])])},hanldeTreeNodeClick:Y,deepAutoOpen:z,asyncNodeClick:Q,setNodeAction:V,setNodeOpened:J,setSelect:le,setOpen:X}},xy=(e,t,n)=>{const{getSourceNodeByUID:i,getNodeParentIdById:l,getParentNodeData:o,getNodeAttr:c,getNodePath:f,isRootNode:d}=Os(n,e),g=v=>v.target.closest("[data-tree-node]"),m=v=>{g(v).removeEventListener("mouseup",m)},C=v=>{const p=g(v);p.setAttribute("draggable","true"),p.addEventListener("mouseup",m)},I=v=>{v.preventDefault();const p=g(v),w=v.dataTransfer.getData("node-id"),x=p.getAttribute("data-tree-node"),S=L(w,x)?"move":"none";v.dataTransfer.effectAllowed=S,v.dataTransfer.dropEffect=S},b=v=>{v.dataTransfer.effectAllowed="move",v.dataTransfer.dropEffect="move";const p=g(v);v.dataTransfer.setData("text/plain",""),v.dataTransfer.setData("node-id",p.getAttribute("data-tree-node"))},M=v=>{v.preventDefault(),v.stopPropagation();const p=g(v),w=v.dataTransfer.getData("node-id"),x=p.getAttribute("data-tree-node");Reflect.apply(e.dragSort?k:N,globalThis,[w,x])},L=(v,p)=>{const w=f({[q.UUID]:v}),x=f({[q.UUID]:p}),S=l(v),Q=l(p);return S===Q?!0:w.indexOf(x)===-1&&x.indexOf(w)===-1},k=(v,p)=>{if(!L(v,p))return;const w=JSON.parse(JSON.stringify(i(v))),x=JSON.parse(JSON.stringify(i(p))),S=o(v),Q=o(p),z=c({[q.UUID]:v},q.INDEX),O=c({[q.UUID]:p},q.INDEX);S==null||S[e.children].splice(z,1,x),Q==null||Q[e.children].splice(O,1,w)},N=(v,p)=>{const w=i(v),x=i(p);let S=null;if(d({[q.UUID]:v}))S=e.data;else{const Q=l(v);if(Q!=null){S=i(Q);const z=c({[q.UUID]:v},q.INDEX);S==null||S[e.children].splice(z,1)}}x[e.children]||(x[e.children]=[]),x[e.children].unshift(w)};a.onMounted(()=>{if(e.draggable&&t.value){const v=t.value.$el;v.addEventListener("mousedown",C),v.addEventListener("dragstart",b),v.addEventListener("dragover",I),v.addEventListener("drop",M)}}),a.onUnmounted(()=>{if(e.draggable&&t.value){const v=t.value.$el;v.removeEventListener("mousedown",C),v.removeEventListener("dragstart",b),v.removeEventListener("dragover",I),v.removeEventListener("drop",M)}})},Sy=e=>{var I;const t=a.toRef(e,"search"),{openResultNode:n=!1,resultType:i="tree"}=(I=e.search)!=null?I:{},l=b=>["string","number","boolean"].includes(typeof b),o=(b,M)=>b===M,c=(b,M)=>new RegExp(`${b}`,"i").test(`${M}`),f=(b,M)=>Reflect.apply(b,globalThis,M),d=t.value===void 0||t.value===!1,g=(b,M)=>{if(d)return!0;if(l(t.value))return f(c,[t.value,b,M]);const{value:L="",match:k="fuzzy"}=t.value,v=typeof k=="function"?k:k==="fuzzy"?c:o;return`${L}`.length===0?!0:f(v,[L,b,M])},m=a.computed(()=>t.value!==!1&&(l(t.value)?`${t.value}`.length>0:typeof t.value=="object"));return{searchFn:g,refSearch:t,isSearchActive:m,isSearchDisabled:d,openResultNode:n,resultType:i,isTreeUI:i==="tree"}},Dy=e=>{var k;const t=(N,v=void 0,p=[])=>{const{data:w,children:x}=N,S=[],Q=[];let z=0;const O=new Map;function P(K,Z,J,V){if(K!=null&&O.has(K)&&![q.UUID,q.PARENT_ID].includes(Z)){const X=O.get(K);Object.prototype.hasOwnProperty.call(X,Z)&&typeof V=="function"&&Reflect.apply(V,self,[X,Z,J])&&(Object.assign(X,{[Z]:J}),P(X[q.PARENT_ID],Z,J,V))}}function E(K){let Z=null;return typeof N.nodeKey=="string"&&(Z=K[N.nodeKey]||zi.v4()),Z||K[q.UUID]||zi.v4()}const _={[q.IS_OPEN]:()=>!1,[q.IS_CHECKED]:()=>!1,[q.IS_MATCH]:()=>!0,[q.IS_SELECTED]:K=>N.selected===K,[q.IS_CACHED]:()=>!1,[q.IS_ASYNC]:()=>null,[q.IS_LOADING]:()=>!1};function G(K,Z,J,V=void 0){let X=V;V===void 0&&typeof _[J]=="function"&&(X=_[J](K,Z));const Y=Ii[J];if(Object.prototype.hasOwnProperty.call(Z,Y))return Z[Y];const ne=(p||[]).find(ge=>ge[q.UUID]===K);let le;return ne&&(le=ne[J]),le==null&&(le=X),le}function se(K,Z){return N.selectable?G(K,Z,q.IS_SELECTED,N.selected===K):!1}function ce(K,Z,J){var Y;const V=G(K,Z,q.IS_OPEN),X=O.has(J)?(Y=O.get(J))==null?void 0:Y[q.IS_OPEN]:!0;return V&&X}function de(K){return!K[q.IS_OPEN]}function pe(K,Z=0,J=null,V=null){const X=K.length;for(let Y=0;Y<X;Y++){const ne=K[Y];if(Array.isArray(ne))pe(ne,Z,J,V);else if(typeof ne=="object"&&ne!==null){const le=V!==null?`${V}-${Y}`:`${Y}`,ge=`${E(ne)}`,U=!!(ne[x]||[]).length;let fe=G(ge,ne,q.IS_OPEN);N.autoOpenParentNode?fe&&P(J,q.IS_OPEN,!0,de):fe=ce(ge,ne,J),Object.assign(ne,{[q.UUID]:ge});const he=N.showCheckbox&&G(ge,ne,q.IS_CHECKED);he&&S.push(ge),O.set(ge,{[q.DEPTH]:Z,[q.INDEX]:Y,[q.UUID]:ge,[q.PARENT_ID]:J,[q.HAS_CHILD]:U,[q.PATH]:le,[q.IS_ROOT]:J===null,[q.ORDER]:z,[q.IS_SELECTED]:se(ge,ne),[q.IS_MATCH]:G(ge,ne,q.IS_MATCH),[q.IS_OPEN]:fe,[q.IS_CHECKED]:he,[q.IS_CACHED]:G(ge,ne,q.IS_CACHED),[q.IS_ASYNC]:G(ge,ne,q.IS_ASYNC),[q.IS_LOADING]:G(ge,ne,q.IS_LOADING),[x]:null}),z+=1,Q.push(Ne(H({},JSON.parse(JSON.stringify(ne,(F,ie)=>F===N.children?null:ie))),{[q.IS_OPEN]:fe,[x]:null})),Object.prototype.hasOwnProperty.call(ne,x)&&pe(ne[x]||[],Z+1,ge,le)}}}return pe(v||w),N.showCheckbox&&(S==null||S.forEach(K=>{Array.from(O.values()).filter(Z=>{var J;return(J=Z[q.PATH])==null?void 0:J.startsWith(O.get(K)[q.PATH])}).forEach(Z=>Object.assign(Z,{[q.IS_CHECKED]:!0})),P(K,q.IS_CHECKED,!0,()=>!0)})),[Q,O]},n=t(e),i=new Map,l=[],o=[],c=a.reactive({data:n[0],schema:n[1],levelLineSchema:{}}),f=a.computed(()=>Array.from(c.schema.values())),{asyncNodeClick:d,deepAutoOpen:g}=Ff(e,c),m=N=>{l.push(N)},C=(N,v,p=!0)=>{p&&i.has(N)&&i.delete(N),i.set(N,v)},I=N=>typeof N=="function"?{type:"loop",fn:N}:typeof N=="object"&&typeof N.type=="string"&&typeof N.fn=="function"?N:(console.error("loop event error",N),null),b=N=>{var p;const v=I(N);return v!==null&&Reflect.apply(v.fn,globalThis,[]),(p=v==null?void 0:v.type)!=null?p:"once"},M=()=>{Array.from(i.keys()).forEach(N=>{const v=i.get(N);if(Array.isArray(v)){const p=[];v.forEach((w,x)=>{b(w)==="once"&&p.unshift(x)}),p.length&&p.forEach(w=>v.splice(w,1)),v.length===0&&i.delete(N)}else b(v)==="once"&&i.delete(N)})};a.watch(()=>[e.data],N=>{var p,w;const v=t(e,N,f.value);c.data=v[0],c.schema=v[1],((p=e.async)==null?void 0:p.callback)&&((w=e.async)==null?void 0:w.deepAutoOpen)==="every"&&g(),M()},{deep:!0}),e.selectable&&a.watch(()=>e.selected,N=>{o.length=0,l.forEach(v=>{Reflect.apply(v,globalThis,[N]),o.push(()=>Reflect.apply(v,globalThis,[N]))}),C("afterSelectWatch",o)},{immediate:!0});const L=N=>{C("afterDataUpdate",N)};return(k=e.async)!=null&&k.callback&&g(),{flatData:c,schemaValues:f,asyncNodeClick:d,deepAutoOpen:g,afterDataUpdate:L,registerNextLoop:C,onSelected:m}},jy=a.defineComponent({name:"Tree",props:by,emits:yy,setup(e,t){const{flatData:n,schemaValues:i,onSelected:l,registerNextLoop:o}=Dy(e),{setNodeAttr:c,checkNodeIsOpen:f,getNodeAttr:d,getNodePath:g,isRootNode:m,isNodeOpened:C,isNodeChecked:I,isNodeMatched:b,hasChildNode:M}=Os(n,e),{searchFn:L,isSearchActive:k,refSearch:N,openResultNode:v,isTreeUI:p,isSearchDisabled:w}=Sy(e);w||a.watch([N],()=>{n.data.forEach(Z=>{const J=L(Yf(Z,e),Z);c(Z,q.IS_MATCH,J),v&&P(Z,!0,!0)})});const x=Z=>{if(k.value){const J=()=>p?i.value.some(V=>{var X;return((X=V[q.PATH])==null?void 0:X.startsWith(g(Z)))&&V[q.IS_MATCH]}):!1;return d(Z,q.IS_MATCH)||J()}return!0},S=a.computed(()=>n.data.filter(Z=>f(Z)&&x(Z))),{renderTreeNode:Q,hanldeTreeNodeClick:z,setNodeOpened:O,setOpen:P,setNodeAction:E,setSelect:_,asyncNodeClick:G}=Ty(e,t,n,S,i,{registerNextLoop:o}),se=(Z,J=!0)=>{E(Ia(Z),q.IS_CHECKED,J)};l(Z=>{_(Z,!0,e.autoOpenParentNode)});const ce=()=>n;t.expose({hanldeTreeNodeClick:z,isNodeChecked:I,isRootNode:m,isNodeOpened:C,isNodeMatched:b,hasChildNode:M,setOpen:P,setChecked:se,setNodeAction:E,setNodeOpened:O,setSelect:_,asyncNodeClick:G,getData:ce});const de=a.ref(),{renderEmpty:pe}=Cy(e,t);xy(e,de,n);const K=Z=>{if(Z.length)return Z.map(Q);const J=k.value?"search-empty":"empty";return pe(J)};return()=>a.createVNode(Ts,{class:Be("tree"),style:Iy(null,e),list:S.value,lineHeight:e.lineHeight,enabled:e.virtualRender,contentClassName:Be("container"),throttleDelay:0,ref:de},{default:Z=>K(Z.data||[])})}});const _f=Ze(jy),Uf=e=>e.__v_isVNode;var zy=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(Uf(e[n])){i=e[n];break}n=n+1}let l=t-1,o=null;for(;l>=0&&l>n;){if(Uf(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 f="bk-compose-form-item-tail";o.props.class&&(f+=` ${o.props.class}`),this.tailBackgroundColor&&(o.props.style=Object.assign(o.props.style||{},{"background-color":this.tailBackgroundColor})),o.props.class=f}}return a.h("div",{class:"bk-compose-form-item"},e)}});const Py={formType:h.oneOf(["default","vertical"]).def("default"),labelWidth:h.oneOfType([Number,String]),labelPosition:h.oneOf(["left","center","right"]),model:h.object,rules:h.object};var Ey=a.defineComponent({name:"Form",props:Py,emits:["submit"],setup(e,t){let n=[];const i=d=>{n.push(d)},l=d=>{n=n.reduce((g,m)=>(m!==d&&g.push(m),g),[])};return a.provide(kd,{props:e,register:i,unregister:l}),{handleSubmit:d=>{d.preventDefault(),t.emit("submit")},validate:d=>{let g={};return d?g=(typeof d=="string"?[d]:d).reduce((C,I)=>Ne(H({},C),{[I]:!0}),{}):g=n.reduce((m,C)=>C.property?Ne(H({},m),{[C.property]:!0}):m,{}),Promise.all(n.reduce((m,C)=>(g[C.property]&&m.push(C.validate()),m),[])).then(()=>Promise.resolve(e.model))},clearValidate:d=>{let g={};d?g=(typeof d=="string"?[d]:d).reduce((C,I)=>Ne(H({},C),{[I]:!0}),{}):g=n.reduce((m,C)=>Ne(H({},m),{[C.property]:!0}),{}),n.forEach(m=>g[m.property]&&m.clearValidate())}}},render(){var t,n;const e=ke({"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)])}}),Cn={required:e=>(console.log("required",e,e!==""&&e!==void 0&&e!==null),e!==""&&e!==void 0&&e!==null),min:(e,t)=>(console.log("min"),e>=t),max:(e,t)=>(console.log("max"),t>=e),email:e=>(console.log("email"),/^[A-Za-z\d]+([-_.][A-Za-z\d]+)*@([A-Za-z\d]+[-.])+[A-Za-z\d]{2,4}$/.test(e)),maxlength:(e,t)=>(console.log("maxlength"),e.length<=t),pattern:(e,t)=>(console.log("pattern"),t.test(e))};const Oy={label:h.string,labelWidth:h.oneOfType([Number,String]),labelPosition:h.oneOf(["left","center","right"]),property:h.string.def(""),required:h.bool.def(!1),email:h.bool.def(!1),max:h.number,min:h.number,maxlength:h.number,rules:h.array,autoCheck:h.bool.def(!1),description:h.string,errorDisplayType:h.oneOf(["tooltips","normal"]).def("normal")},Jy=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Ay=e=>{const t=[];return e.required&&t.push({validator:Cn.required,message:`${e.label}\u4E0D\u80FD\u4E3A\u7A7A`,trigger:"blur"}),e.email&&t.push({validator:Cn.email,message:`${e.label}\u683C\u5F0F\u4E0D\u6B63\u786E`,trigger:"blur"}),Number(e.max)>-1&&t.push({validator:n=>Cn.max(n,e.max),message:`${e.label}\u6700\u5927\u503C${e.max}`,trigger:"blur"}),Number(e.min)>-1&&t.push({validator:n=>Cn.min(n,e.min),message:`${e.label}\u6700\u5C0F\u503C${e.min}`,trigger:"blur"}),Number(e.maxlength)>-1&&t.push({validator:n=>Cn.maxlength(n,e.maxlength),message:`${e.label}\u6700\u5927\u957F\u5EA6${e.maxlength}`,trigger:"blur"}),t},Qy=(e,t)=>{const n=e.reduce((i,l)=>{let o;if(l.required)o=Cn.required;else if(l.email)o=Cn.email;else if(Number(l.max)>-1)o=c=>Cn.max(c,l.max);else if(Number(l.min)>-1)o=c=>Cn.min(c,l.max);else if(Number(l.maxlength)>-1)o=c=>Cn.min(c,l.max);else if(Object.prototype.toString.call(l.pattern)==="[object RegExp]")o=c=>Cn.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]},Vy=(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),[]),$f=e=>e!==void 0;var Ry=a.defineComponent({name:"FormItem",directives:{bkTooltips:Oo},props:Oy,setup(e){const t=a.getCurrentInstance(),n=a.reactive({isError:!1,errorMessage:""}),i=n4(),l=Boolean(i),o=a.computed(()=>l?i.props.formType==="vertical":!1),c=a.computed(()=>{const g={width:"",paddingRight:"",textAlign:""},m=$f(e.labelWidth)?e.labelWidth:l&&i.props.labelWidth;$f(m)&&(g.width=`${m}px`,g.paddingRight=m?"":"0px");const C=e.labelPosition||l&&i.props.labelPosition;return C&&(g["text-align"]=C),g}),f=g=>{if(n.isError=!1,n.errorMessage="",!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=Vy(g,Qy(m,Ay(e)));const C=rn.exports.get(i.props.model,e.property),I=(()=>{let b=-1;return()=>{if(b=b+1,b>=m.length)return Promise.resolve(!0);const M=m[b];return Promise.resolve().then(()=>{const L=M.validator(C);return typeof L!="boolean"&&typeof L.then=="function"?L.then(k=>{if(k===!1)return Promise.reject(M.message)}).then(()=>I(),()=>(n.isError=!0,n.errorMessage=M.message,Promise.reject(M.message))):L?I():(n.isError=!0,n.errorMessage=M.message,Promise.reject(M.message))})}})();return I()},d=()=>{n.isError=!1,n.errorMessage=""};return a.provide(Td,Ne(H({},e),{validate:f,clearValidate:d})),a.onMounted(()=>{l&&i.register(t.proxy)}),a.onBeforeUnmount(()=>{l&&i.unregister(t.proxy)}),Ne(H({},a.toRefs(n)),{labelStyles:c,isFormTypeVertical:o,validate:f,clearValidate:d})},render(){var i,l,o,c;const e=ke({"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(lo,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 Xf=At(Ey,{FormItem:Ry,ComposeFormItem:zy}),Wy={span:h.number.def(1),offset:h.number.def(0),pull:h.number.def(0),push:h.number.def(0)};var By=a.defineComponent({name:"Col",props:Wy,emits:[],setup(e,t){const{col:n,gutter:i,flex:l}=a.inject("containerProps"),{span:o,offset:c,pull:f,push:d}=e,g=a.computed(()=>o||n);a.provide("containerProps",{col:g.value,gutter:i,flex:l});const m=function(I){return`${Number((I*100).toFixed(3))}%`},C=a.computed(()=>({width:m(g.value/n),"padding-right":`${i/2}px`,"padding-left":`${i/2}px`,"margin-left":c?m(c/n):null,right:f?m(f/n):null,left:d?m(d/n):null}));return()=>{var I,b;return a.createVNode("div",{class:"bk-grid-col",style:C.value},[(b=(I=t.slots).default)==null?void 0:b.call(I)])}}});const Hy={col:h.number.def(24),gutter:h.number.def(20),margin:h.number.def(20),flex:h.bool.def(!1),extCls:h.string};var Gy=a.defineComponent({name:"Container",props:Hy,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"),f=a.computed(()=>{const{margin:d}=e;return{"padding-right":`${d}px`,"padding-left":`${d}px`}});return()=>{var d,g;return a.createVNode("div",{class:c.value,style:f.value},[(g=(d=t.slots).default)==null?void 0:g.call(d)])}}}),Zy=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(()=>Ne(H({},l?{display:["-webkit-box","-ms-flexbox","flex"]}:{}),{"margin-right":`-${i/2}px`,"margin-left":`-${i/2}px`}));return()=>{var c,f;return a.createVNode("div",{class:"bk-grid-row",style:o.value},[(f=(c=t.slots).default)==null?void 0:f.call(c)])}}});const Js=At(Gy,{Row:Zy,Col:By});var Yy=a.defineComponent({name:"Dropdown",props:{isShow:h.bool.def(!1),placement:h.commonType(["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"],"placement").def("bottom"),trigger:h.commonType(["hover","click","manual"],"trigger").def("hover"),disabled:h.bool.def(!1),extCls:h.string},emits:["showChange","show","hide"],setup(e,{emit:t}){let n=Object.create(null);const i=a.ref(null),l=a.ref(null);a.onMounted(()=>{f()}),a.onBeforeUnmount(()=>{d()}),a.watch(()=>e.isShow,m=>{a.nextTick(()=>{e.trigger==="manual"&&n&&!e.disabled&&(m?n.show():n.hide())})}),a.watch(()=>e.disabled,m=>g(m));const o=()=>{t("show")},c=()=>{t("hide")},f=()=>{e.disabled||(n=new Fl(i.value,l.value,{placement:e.placement,trigger:e.trigger,afterShow:o,afterHidden:c}),e.trigger==="manual"&&e.isShow&&n.show())},d=()=>{if(n){const m=n;m.isShow&&m.hide(),m.destroy(),n=null,e.trigger==="manual"&&t("showChange",!1)}},g=m=>{const C=n;e.trigger==="manual"&&!m&&t("showChange",!1),C.updateDisabled(m)};return{reference:i,refContent:l}},render(){var t,n,i,l;const e=ke({"bk-dropdown":!0},this.$props.extCls);return a.createVNode("div",{class:e},[a.createVNode("div",{ref:"reference",class:"bk-dropdown-reference"},[(n=(t=this.$slots).default)==null?void 0:n.call(t)]),a.createVNode("div",{ref:"refContent",class:"bk-dropdown-content"},[(l=(i=this.$slots).content)==null?void 0:l.call(i)])])}}),Fy=a.defineComponent({name:"DropdownItem",props:{extCls:h.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)])}}),_y=a.defineComponent({name:"DropdownMenu",props:{extCls:h.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 Kf=At(Yy,{DropdownMenu:_y,DropdownItem:Fy});var dc=a.defineComponent({name:"CascaderPanel",props:{store:h.object.def({})},emits:["input"],setup(e,{emit:t}){const{store:n}=e,i=a.reactive({list:[e.store.getNodes()]}),l=a.ref([]),o=a.ref([]),c=M=>{M.config.multiple?o.value=n.getCheckedNodes().map(L=>L.path):o.value=M.path,t("input",o.value)},f=()=>{t("input",[])},d=M=>{var L;if(!M.isDisabled){if(i.list=i.list.slice(0,M.level),l.value=l.value.slice(0,M.level-1),(L=M.children)!=null&&L.length){i.list.push(M.children),l.value.push(M);return}if(n.config.isRemote&&!M.isLeaf){M.loading=!0;const k=N=>{n.appendNodes(N,M||null),i.list.push(M.children),l.value.push(M),M.loading=!1};n.config.remoteMethod(M,k),console.log("remote fuck here")}}};return{menus:i,activePath:l,nodeExpandHandler:d,isNodeInPath:M=>(l.value[M.level-1]||{}).id===M.id,nodeEvent:M=>{const{trigger:L,checkAnyLevel:k,multiple:N}=M.config;return{onClick:p=>{(!M.isLeaf||N)&&p.stopPropagation(),L==="click"&&d(M),k&&!N&&c(M),M.isLeaf&&!N&&c(M)},onMouseenter:()=>{L==="hover"&&d(M)}}},isCheckedNode:(M,L)=>{const{multiple:k}=M.config;return k?!1:Sd(L,M.path)},checkValue:o,nodeClear:f,checkNode:(M,L)=>{M.setNodeCheck(L),c(M)},iconRender:M=>M.loading?a.createVNode(os,{class:"icon-spinner"},null):a.createVNode(Sn,{class:"icon-angle-right"},null)}},render(){return a.createVNode("div",{class:"bk-cascader-panel-wrapper"},[this.menus.list.map(e=>a.createVNode("ul",{class:"bk-cascader-panel"},[e.map(t=>a.createVNode("li",a.mergeProps({class:["bk-cascader-node",{"is-selected":this.isNodeInPath(t)},{"is-disabled":t.isDisabled},{"is-checked":this.isCheckedNode(t,this.checkValue)}]},this.nodeEvent(t)),[t.config.multiple&&a.createVNode(Ri,{disabled:t.isDisabled,modelValue:t.checked,"onUpdate:modelValue":n=>t.checked=n,onChange:n=>this.checkNode(t,n)},null),a.createVNode("span",{class:"bk-cascader-node-name"},[t.name]),t.isLeaf?"":this.iconRender(t)]))]))])}});class As{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 As(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 this.data.disabled}setNodeCheck(t){this.checked=t}calculateNodesPath(){const t=[this];let{parent:n}=this;for(;n;)t.unshift(n),n=n.parent;return t}}const qf=(e,t)=>e.reduce((n,i)=>(i.isLeaf?n.push(i):(!t&&n.push(i),n=n.concat(qf(i.children,t))),n),[]);class Uy{constructor(t){const{list:n}=t;this.data=n,this.config=t,this.nodes=this.data.map(i=>new As(i,this.config))}getNodes(){return this.nodes}getFlattedNodes(t=!1){return qf(this.nodes,t)}getCheckedNodes(){return this.getFlattedNodes().filter(t=>t.checked)}getNodeByValue(t){var i;return(i=this.getFlattedNodes().filter(l=>Sd(l.path,t))[0])!=null?i:null}appendNode(t,n){const i=new As(t,this.config,n);(n?n.children:this.nodes).push(i)}appendNodes(t,n){t.forEach(i=>this.appendNode(i,n))}}var $y=a.defineComponent({name:"Cascader",directives:{clickoutside:sa},components:{CascaderPanel:dc,BkPopover:Bi},props:{modelValue:h.array.def([]),list:h.array.def([]),placeholder:h.string.def("\u8BF7\u9009\u62E9"),filterable:h.bool.def(!1),multiple:h.bool.def(!1),disabled:h.bool.def(!1),clearable:h.bool.def(!0),trigger:h.string.def("click"),checkAnyLevel:h.bool.def(!1),isRemote:h.bool.def(!1),remoteMethod:h.func,showCompleteName:h.bool.def(!1),idKey:h.string.def("id"),nameKey:h.string.def("name"),childrenKey:h.string.def("children"),separator:h.string.def("/"),limitOneLine:h.bool.def(!1),extCls:h.string.def("")},emits:["update:modelValue","change","clear","toggle"],setup(e,{emit:t}){const{separator:n,multiple:i}=e,{isHover:l,setHover:o,cancelHover:c}=J0(),f=a.reactive(new Uy(e)),d=a.ref(!1),g=a.ref(""),m=a.ref([]),C=k=>{if(i){m.value=f.getCheckedNodes().map(N=>({text:N.pathNames.join(n),key:N.id}));return}if(k.length===0)g.value="";else{const N=f.getNodeByValue(k);g.value=N.pathNames.join(n)}t("update:modelValue",k),t("change",k)};return{store:f,updateValue:C,hidePopover:()=>{d.value=!1},inputClickHandler:k=>{k.stopPropagation(),d.value=!d.value,t("toggle",d.value)},selectedText:g,panelShow:d,handleClear:k=>{k.stopPropagation(),C([]),t("clear",JSON.parse(JSON.stringify(e.modelValue)))},isHover:l,setHover:o,cancelHover:c,selectedTags:m,removeTag:(k,N,v)=>{v.stopPropagation();const p=JSON.parse(JSON.stringify(k));p.splice(N,1),C(p)}}},render(){const e=()=>this.clearable&&this.isHover?a.createVNode(Dn,{class:"bk-icon-clear-icon",onClick:this.handleClear},null):a.createVNode(na,{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(jn,{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}],tabindex:"0","data-placeholder":this.placeholder,onMouseenter:this.setHover,onMouseleave:this.cancelHover},[e(),a.createVNode(Bi,{placement:"bottom-start",theme:"light bk-cascader-popover",trigger:"click",arrow:!1,class:"bk-cascader-popover-wrapper",isShow:this.panelShow,"onUpdate:isShow":n=>this.panelShow=n,boundary:"body"},{default:()=>a.createVNode("div",{class:"bk-cascader-name",onClick:this.inputClickHandler},[this.multiple&&t(),this.filterable?a.createVNode("input",{class:"bk-cascader-search-input",type:"text",placeholder:this.placeholder},null):a.createVNode("span",null,[this.selectedText])]),content:()=>a.createVNode("div",{class:"bk-cascader-popover"},[a.createVNode(dc,{store:this.store,onInput:n=>this.updateValue(n)},null)])})])}});const e9=At($y,{CascaderPanel:dc});var t9=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),f=a.ref(null),d=a.ref(e.modelValue),g=a.ref(0),m=a.ref(0),C=a.ref(!1),I=a.ref(null),b=a.computed(()=>{var O,P;let Q="";if((O=e.params.customContent)!=null&&O[e.modelValue]){const E=e.params.customContent[e.modelValue];Q=E.tip||E.label||""}const z=e.params.vertical?"right":"top";return(P=e.params)!=null&&P.showTip?{content:e.params.formatterTipLabel(`${Q||(e==null?void 0:e.modelValue)||"0"}`),placement:z}:{content:"",placement:z}}),M=a.computed(()=>`${(e.modelValue-e.params.minValue)/(e.params.maxValue-e.params.minValue)*100}%`),L=a.computed(()=>e.params.vertical?{bottom:M.value}:{left:M.value}),k=a.computed(()=>e.params.formatterButtonLabel(e.modelValue)),N=Q=>{e.params.disable||(Q.preventDefault(),v(Q),wa(window,"mousemove",p),wa(window,"touchmove",p),wa(window,"mouseup",w),wa(window,"touchend",w))},v=Q=>{n.value=!0,i.value=!0,e.params.vertical?l.value=Q.clientY:o.value=Q.clientX,c.value=parseFloat(M.value),f.value=c.value},p=Q=>{if(n.value){i.value=!1,t("resetSize");let z=0;e.params.vertical?(g.value=Q.clientY,z=(l.value-g.value)/e.params.sliderSize*100):(m.value=Q.clientX,z=(m.value-o.value)/e.params.sliderSize*100),f.value=c.value+z,x(f.value)}},w=()=>{C.value=!1,n.value&&(setTimeout(()=>{n.value=!1,i.value||(x(f.value),t("emitChange"))},0),Qs(window,"mousemove",p),Qs(window,"touchmove",p),Qs(window,"mouseup",w),Qs(window,"touchend",w))},x=Q=>{if(Q===null||isNaN(Q))return;Q<0?f.value=0:Q>100&&(f.value=100);const z=100/((e.params.maxValue-e.params.minValue)/e.params.step);let P=Math.round(Q/z)*z*(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!==d.value&&(d.value=e.modelValue)};return{renderDom:()=>a.createVNode("div",{class:["bk-slider-button",e.params.vertical?"vertical":"horizontal",{grabbing:n.value}],ref:I,tabindex:"0",style:L.value,onClick:Q=>Q.stopPropagation(),onMousedown:N},[Boolean(b.value.content)?a.createVNode(Bi,{content:b.value.content,theme:"dark",placement:b.value.placement,boundary:document.body},{default:()=>[a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null)]}):a.createVNode("div",{class:["slider-button",{"slider-button-disable":e.params.disable}]},null),e.params.showButtonLabel&&!e.params.showIntervalLabel?a.createVNode("div",{class:["slider-button-label",e.params.vertical?"vertical":"horizontal"]},[k.value]):void 0]),setPosition:x,tip:b}},render(){return this.renderDom()}});const wa=(e,t,n)=>{e&&t&&n&&e.addEventListener(t,n,!1)},Qs=(e,t,n)=>{e&&t&&n&&e.removeEventListener(t,n,!1)};var Xy=a.defineComponent({name:"Slider",props:{modelValue:h.oneOfType([h.array,h.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),f=a.ref(0),d=a.ref(0),g=a.ref(null),m=a.ref(null),C=a.ref(null),I=a.ref(null),b=a.computed(()=>{const J=[e.minValue,e.maxValue,e.step].map(V=>{const X=`${V}`.split(".")[1];return X?X.length:0});return Math.max.apply(null,J)}),M=a.computed(()=>Math.min(l.value,o.value)),L=a.computed(()=>Math.max(l.value,o.value)),k=a.computed(()=>e.range?`${100*(L.value-M.value)/(e.maxValue-e.minValue)}%`:`${100*(l.value-e.minValue)/(e.maxValue-e.minValue)}%`),N=a.computed(()=>e.range?`${100*(M.value-e.minValue)/(e.maxValue-e.minValue)}%`:"0%"),v=a.computed(()=>e.vertical?{height:k.value,bottom:N.value}:{width:k.value,left:N.value}),p=a.computed(()=>{if(!e.showInterval||e.minValue>e.maxValue)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const J=(e.maxValue-e.minValue)/e.step,V=100*e.step/(e.maxValue-e.minValue),X=[];for(let Y=1;Y<J;Y++)X.push(Y*V);return e.range?X.filter(Y=>Y<100*(M.value-e.minValue)/(e.maxValue-e.minValue)||Y>100*(L.value-e.minValue)/(e.maxValue-e.minValue)):X.filter(Y=>Y>100*(l.value-e.minValue)/(e.maxValue-e.minValue))}),w=a.computed(()=>e.vertical?{height:e.height,width:"4px"}:{}),x=a.computed(()=>{if(!e.showIntervalLabel)return[];if(e.step===0)return console.warn("WARNNING:step should not be 0"),[];const J=100*e.step/(e.maxValue-e.minValue),V=[];for(let X=e.minValue,Y=0;X<=e.maxValue;X+=e.step,Y++){const ne={stepWidth:Y*J,stepLabel:e.formatterLabel(X)};V.push(ne)}return V}),S=a.computed(()=>Array.isArray(e.modelValue)),Q=a.computed(()=>e.customContent?Object.keys(e.customContent).sort((J,V)=>Number(J)-Number(V)).filter(J=>Number(J)>=e.minValue&&Number(J)<=e.maxValue).map(J=>{const{tip:V}=e.customContent[J],{label:X}=e.customContent[J];return{tip:V||X||"",label:X||"",percent:(Number(J)-e.minValue)/(e.maxValue-e.minValue)*100}}):[]),z=a.computed(()=>({vertical:e.vertical,showTip:e.showTip,disable:e.disable,maxValue:e.maxValue,minValue:e.minValue,step:e.step,precision:b.value,showButtonLabel:e.showButtonLabel,formatterButtonLabel:e.formatterButtonLabel,showIntervalLabel:e.showIntervalLabel,customContent:e.customContent,sliderSize:i.value,formatterTipLabel:e.formatterTipLabel}));a.watch(()=>e.modelValue,()=>{_()}),a.watch(()=>l.value,J=>{e.range?n("update:modelValue",[M.value,L.value]):n("update:modelValue",J),f.value=J}),a.watch(()=>o.value,J=>{n("update:modelValue",[M.value,L.value]),d.value=J}),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),O(),wa(window,"resize",O())});const O=()=>{g.value&&(i.value=g.value[`client${e.vertical?"Height":"Width"}`])},P=J=>{var V,X;if(J.stopPropagation(),!e.disable){if(O(),e.vertical){const Y=(V=g.value)==null?void 0:V.getBoundingClientRect().bottom;ce((Y-J.clientY)/i.value*100)}else{const Y=(X=g.value)==null?void 0:X.getBoundingClientRect().left;ce((J.clientX-Y)/i.value*100)}G()}},E=()=>e.range?![M.value,L.value].every((J,V)=>J===c.value[V]):e.modelValue!==c.value,_=()=>{if(e.minValue>e.maxValue){console.error("min should not be greater than max.");return}const J=e.modelValue;e.range&&Array.isArray(J)?J[1]<e.minValue?n("update:modelValue",[e.minValue,e.minValue]):J[0]>e.maxValue?n("update:modelValue",[e.maxValue,e.maxValue]):J[0]<e.minValue?n("update:modelValue",[e.minValue,J[1]]):J[1]>e.maxValue?n("update:modelValue",[J[0],e.maxValue]):(l.value=Number(J[0]),o.value=Number(J[1]),E()&&(c.value=J.slice())):!e.range&&typeof J=="number"&&!isNaN(J)&&(J<e.minValue?n("update:modelValue",e.minValue):J>e.maxValue?n("update:modelValue",e.maxValue):(l.value=J,E()&&(c.value=J)))},G=async()=>{await a.nextTick(),n("change",e.range?[M.value,L.value]:e.modelValue)},se=J=>e.vertical?{bottom:`${J}%`}:{left:`${J}%`},ce=J=>{if(!e.range){m.value.setPosition(J);return}const V=e.minValue+J*(e.maxValue-e.minValue)/100;Math.abs(M.value-V)<Math.abs(L.value-V)?I.value=l.value<o.value?m.value:C.value:I.value=l.value>o.value?m.value:C.value,I.value.setPosition(J)},de=J=>{if(J==="")return;const V=parseFloat(J);V<e.minValue?(f.value=e.minValue,l.value=e.minValue):V>e.maxValue?(f.value=e.maxValue,l.value=e.maxValue):l.value=V},pe=J=>{if(J===""||typeof J=="number")return;const V=parseFloat(J);V<e.minValue?(d.value=e.minValue,o.value=e.minValue):V>e.maxValue?(d.value=e.maxValue,o.value=e.maxValue):o.value=V},K=J=>{let V=0;return J==="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 J,V;return a.createVNode("div",{class:["bk-slider",e.extCls]},[(J=t.start)==null?void 0:J.call(t),a.createVNode("div",{class:"bk-slider-runway",ref:g,style:w.value,onClick:P},[a.createVNode("div",{class:["bk-slider-bar",e.vertical?"vertical":"horizontal",{disable:e.disable}],style:v.value},null),e.showInterval?p.value.map((X,Y)=>a.createVNode("div",{key:Y,class:["bk-slider-interval",{vertical:e.vertical}],style:se(X)},null)):void 0,e.customContent?Q.value.map((X,Y)=>a.createVNode("div",{key:Y,class:["bk-slider-interval",{vertical:e.vertical}],style:se(X.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:K("start")}]},[e.formatterLabel(e.minValue)]),a.createVNode("div",{class:"label-end",style:[{opacity:K("end")}]},[e.formatterLabel(e.maxValue)])];if(e.showIntervalLabel)return x.value.map((X,Y)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:Y,style:se(X.stepWidth)},[X.stepLabel]));if(e.customContent)return Q.value.map((X,Y)=>a.createVNode("div",{class:["bk-slider-label",e.vertical?"vertical":"horizontal"],key:Y,style:se(X.percent)},[X.label]))}()]):void 0,a.createVNode(t9,{modelValue:l.value,"onUpdate:modelValue":X=>l.value=X,ref:m,params:z.value,onEmitChange:G,onResetSize:O},null),e.range?a.createVNode(t9,{modelValue:o.value,"onUpdate:modelValue":X=>o.value=X,ref:C,params:z.value,onEmitChange:G,onResetSize:O},null):void 0]),e.showInput&&!e.vertical?a.createVNode("div",{class:"bk-slider-input"},[a.createVNode("div",{class:"input-item"},[a.createVNode(Vi,{type:"number",modelValue:f.value,max:e.maxValue,min:e.minValue,onChange:de},null)]),S.value&&o.value?[a.createVNode("div",{class:"input-center"},[a.createTextVNode("\uFF5E")]),a.createVNode("div",{class:"input-item"},[a.createVNode(Vi,{type:"number",modelValue:d.value,max:e.maxValue,min:e.minValue,onChange:pe},null)])]:void 0]):void 0,(V=t.end)==null?void 0:V.call(t)])}}},render(){return this.renderDom()}});const n9=Ze(Xy);var Ky=a.defineComponent({name:"ResizeLayout",props:{placement:h.placement().def("left"),min:h.number.def(3),max:h.number.def(1/0),triggerWidth:h.number.def(5),triggerOffset:h.number.def(3),initialDivide:h.oneOfType([String,Number]).def("20%"),immediate:h.bool,disabled:h.bool,collapsible:h.bool,autoMinimize:h.oneOfType([Boolean,Number]).def(!1),border:h.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:f,immediate:d,autoMinimize:g}=a.toRefs(e),m=a.ref(!1),C=a.ref(!0),I=a.ref(!1),b=a.ref(null),M=a.ref({}),L=a.ref(null),k=a.ref(null),N=a.ref(null),v=a.ref(null),p=a.computed(()=>["left","right"].includes(n.value)),w=a.computed(()=>p.value?"width":"height"),x=a.computed(()=>{let K=i.value;return typeof K=="number"&&(K=`${K}px`),{[w.value]:K}}),S=a.computed(()=>({[`margin-${n.value}`]:`${l.value-o.value}px`,[w.value]:`${o.value}px`})),Q=a.computed(()=>g.value?typeof g.value=="boolean"?50:g.value:0),z=()=>{const K=L.value.getBoundingClientRect();b.value=p.value?K.width:K.height},O=new ResizeObserver(z),P=()=>{switch(k.value.style.visibility="visible",n.value){case"left":k.value.style.inset=`0 auto auto ${M.value.aside.width}px`;break;case"right":k.value.style.inset=`0 ${M.value.aside.width}px auto auto`;break;case"top":k.value.style.inset=`${M.value.aside.height}px auto auto 0`;break;case"bottom":k.value.style.inset=`auto auto ${M.value.aside.height}px 0`;break}},E=()=>{N.value.style.display="block",N.value.style.cursor=p.value?"col-resize":"row-resize"},_=K=>Math.min(c.value,Math.max(f.value,K),b.value-o.value),G=K=>{t("before-resize",K);const Z=v.value.getBoundingClientRect();M.value=Object.freeze({mouse:{clientX:K.clientX,clientY:K.clientY},aside:{width:Z.width,height:Z.height}}),E(),d.value||P(),document.onselectstart=()=>!1,document.ondragstart=()=>!1;const J=Y=>{t("resizing",Y)},V=Y=>{let ne;switch(n.value){case"top":ne=Y.clientY-M.value.mouse.clientY;break;case"right":ne=M.value.mouse.clientX-Y.clientX;break;case"bottom":ne=M.value.mouse.clientY-Y.clientY;break;case"left":ne=Y.clientX-M.value.mouse.clientX}const le=M.value.aside[w.value]+ne,ge=_(le)+l.value,U=`${ge}px`;d.value?v.value.style[w.value]=U:k.value.style[n.value]=U,J(ge)},X=()=>{if(k.value.style.visibility="hidden",N.value.style.display="none",document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",X),document.onselectstart=null,document.ondragstart=null,a.nextTick(()=>{se(),t("after-resize",parseFloat(k.value.style[n.value]))}),d.value)return!1;v.value.style[w.value]=k.value.style[n.value]};document.addEventListener("mousemove",V),document.addEventListener("mouseup",X)},se=()=>{if(!g.value)return!1;const K=v.value.getBoundingClientRect();if(I.value=m.value=K[w.value]<=Q.value,!I.value)return C.value=!0,!1;de(),a.nextTick(()=>{v.value.setAttribute(`data-${w.value}`,x.value[w.value])})},ce=K=>{m.value=typeof K=="boolean"?K:!m.value,de(),t("collapse-change",m.value)},de=()=>{const K=v.value.getBoundingClientRect();pe(!m.value),m.value?(v.value.setAttribute(`data-${w.value}`,`${K[w.value]}px`),v.value.style[w.value]="5px"):(C.value=!0,v.value.style[w.value]=v.value.getAttribute(`data-${w.value}`))},pe=K=>{const Z=()=>{C.value=K,v.value.style.transition="",v.value.removeEventListener("transitionend",Z)};v.value.addEventListener("transitionend",Z),v.value.style.transition=`${w.value} cubic-bezier(0.4, 0, 0.2, 1) .3s`};return a.onMounted(()=>{O.observe(L.value)}),a.onBeforeUnmount(()=>{O.unobserve(L.value)}),{collapsed:m,asideContentVisible:C,minimized:I,limitMax:b,state:M,vertical:p,cssPropKey:w,bkResizeLayoutRef:L,resizeProxyRef:k,resizeMaskRef:N,asideRef:v,triggerStyle:S,asideStyle:x,handleMousedown:G,setCollapse:ce}},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(Sn,{class:"bk-resize-collapse",onClick:this.setCollapse},null):a.createVNode(Ai,{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 i9=Ze(Ky),qy={list:h.array.def([]),titleAble:h.bool.def(!1),extCls:h.string};var eb=a.defineComponent({name:"Timeline",props:qy,emits:["select"],setup(e,{emit:t}){const n=a.ref([]),i=c=>{const f=[];c.forEach(d=>{var g;f.push({tag:d.tag,content:d.content,type:d.type,size:d.size,color:d.color,icon:d.icon,filled:d.filled,border:(g=d.border)!=null?g:!0})}),n.value.splice(0,n.value.length,...f)},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(f){console.warn(f)}};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}`:"",f=n.filled?`${i}-filled`:"",d=n.color&&l.includes(n.color)?`${i}-${n.color}`:"";return ke({},`${i} ${o} ${c} ${d} ${f}`)};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 r9=Ze(eb),tb={list:h.array.def([]),controllable:h.bool.def(!1),showSteps:h.bool.def(!1),curProcess:h.number.def(0),displayKey:h.string.def("content"),extCls:h.string};var nb=a.defineComponent({name:"BKProcess",props:tb,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"}),console.log("props.list",e.list),(c=e.list)!=null&&c.length&&n.value.splice(0,n.value.length,...e.list)},o=async c=>{console.log(c);try{e.controllable&&c!==e.curProcess&&(console.log(e.curProcess),t("update:curProcess",c),console.log(e.curProcess),t("click",c))}catch(f){console.warn(f)}};return a.onMounted(l),{defaultProcessList:n,paddingBottom:i,jumpTo:o}},render(){const e="bk-process",t=ke({[`${this.extCls}`]:!!this.extCls},`${e}`),n=f=>f.status==="loading",i=f=>f.status==="error",l=f=>this.curProcess>=f+1||this.defaultProcessList[f].status==="done",o=f=>f.icon?f.icon:"",c=(f,d)=>f===this.curProcess-1&&n(d)?a.createVNode(ts,{class:"bk-icon bk-process-icon icon-loading"},null):i(d)?a.createVNode(jn,{class:"bk-process-icon"},null):l(f)?a.createVNode(yr,{class:"bk-process-icon-done"},null):a.createVNode("span",{class:"number"},[o(d)]);return a.createVNode("div",{class:t},[a.createVNode("ul",{style:{paddingBottom:`${this.paddingBottom}px`}},[this.defaultProcessList.map((f,d)=>a.createVNode("li",{onClick:()=>{this.jumpTo(d+1)},style:{cursor:this.controllable?"pointer":""},class:{success:this.curProcess>=d+1,current:n(f)&&d===this.curProcess-1}},[f[this.displayKey],c(d,f)]))])])}});const a9=Ze(nb),Ui="bk-upload";var Kn=(e=>(e.BUTTON="button",e.DRAGGABLE="draggable",e.PICTURE="picture",e))(Kn||{}),Lr=(e=>(e.NEW="new",e.UPLOADING="uploading",e.SUCCESS="success",e.FAIL="fail",e))(Lr||{});const s9=[Kn.BUTTON,Kn.DRAGGABLE,Kn.PICTURE];var qn={theme:{type:String,default:"draggable",validator:e=>!e||s9.includes(e)?!0:(console.error(`invalid theme, ${e}, the theme must be one of \u3010${s9.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 l9(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!a.isVNode(e)}var ib=a.defineComponent({name:"UploadList",props:{theme:qn.theme,disabled:qn.disabled,files:qn.files,multiple:qn.multiple},emits:["remove"],setup(e,{slots:t,emit:n}){const{theme:i,disabled:l,multiple:o}=a.toRefs(e),c=`${Ui}-list`,f=a.computed(()=>i.value===Kn.PICTURE),d=a.computed(()=>f.value&&!o.value),g=a.computed(()=>ke({[c]:!0,[`${c}--${i.value}`]:!0,[`${c}--disabled`]:l.value}));function m(N){const v=["Bytes","KB","MB","GB","TB"],p=Math.floor(Math.log(N)/Math.log(1024));return`${(N/1024**p).toFixed(2)}${v[p]}`}function C(N,v){n("remove",N,v)}const I=()=>{let N;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},l9(N=e.files.map(v=>{const p=ke({[`${c}__item`]:!0,[`${c}__item-picture`]:!0,[`${c}__item--${v.status}`]:!0});return a.createVNode("li",{key:v.uid,class:p},[t!=null&&t.file?t.file(v):b(v)])}))?N:{default:()=>[N]})},b=N=>[a.withDirectives(a.createVNode("img",{src:N.url,class:`${c}__picture-item-thumbnail`,alt:""},null),[[a.vShow,N.status!=="uploading"]]),a.createVNode(a.Fragment,null,[N.status==="uploading"&&a.createVNode(ga,{class:`${c}__picture-item-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:N.percentage},null)]),a.createVNode(a.Fragment,null,[!l.value&&a.createVNode("div",{class:`${c}__picture-item-actions`},[a.createVNode(ia,{class:"action-icon",onClick:v=>C(N,v)},null)])])],M=()=>{let N;return a.createVNode(a.TransitionGroup,{name:`${c}__item`},l9(N=e.files.map(v=>{const p=ke({[`${c}__item`]:!0,[`${c}__item--${v.status}`]:!0});return a.createVNode("li",{key:v.uid,class:p},[t!=null&&t.file?t.file(v):k(v)])}))?N:{default:()=>[N]})},L=N=>{var Q;const v=(Q=N==null?void 0:N.raw)==null?void 0:Q.type,[p]=(v==null?void 0:v.split("/"))||"";let x={text:aa,image:fo,application:aa,video:Mo,audio:io}[p]||aa;return["application/zip","application/rar","application/tar","application/gz","application/x-gzip"].includes(v)&&(x=eo),a.h(x,{class:`${c}__item-file-icon`})},k=N=>[a.createVNode("div",{class:`${c}__item-icon`},[N.isPic?a.createVNode("img",{src:N.url,class:`${c}__item-thumbnail`,alt:""},null):L(N)]),a.createVNode("div",{class:`${c}__item-summary`},[a.createVNode("div",{class:`${c}__item-name`,title:N.name},[N.name]),N.status!=="uploading"&&a.createVNode("div",{class:`${c}__item-message`,title:N.statusText},[N.status==="success"&&a.createVNode("span",null,[a.createVNode(yr,{class:`${c}__item-message-success-icon`},null),N.statusText||"\u4E0A\u4F20\u6210\u529F"]),N.status==="fail"&&a.createVNode("span",null,[N.statusText||"\u4E0A\u4F20\u5931\u8D25"])]),N.status==="uploading"&&a.createVNode(ga,{class:`${c}__item-progress`,showText:!1,percent:N.percentage,size:"small"},null),N.status!=="fail"&&a.createVNode("div",{class:`${c}__item-speed`},[a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-size`},[m(N.size)]),[[a.vShow,N.size]]),a.withDirectives(a.createVNode("span",{class:`${c}__item-speed-percentage`},[N.percentage,a.createTextVNode("%")]),[[a.vShow,N.status==="uploading"]])]),!l.value&&a.createVNode("div",{class:`${c}__item-actions`},[a.createVNode(ia,{class:`${c}__item-del-icon`,onClick:v=>C(N,v)},null)])])];return()=>{var N;return a.createVNode(a.Fragment,null,[d.value?(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger((N=e.files)==null?void 0:N[0])):a.createVNode("ul",{class:g.value},[f.value?I():M(),(t==null?void 0:t.innerTrigger)&&(t==null?void 0:t.innerTrigger())])])}}}),o9=a.defineComponent({name:"UploadTrigger",props:{theme:qn.theme,disabled:qn.disabled,multiple:qn.multiple,accept:qn.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:f}=a.toRefs(e),d=`${Ui}-trigger`,g=a.computed(()=>i.value===Kn.BUTTON),m=a.computed(()=>i.value===Kn.DRAGGABLE),C=a.computed(()=>i.value===Kn.PICTURE),I=a.computed(()=>C.value&&!c.value),b=a.computed(()=>C.value&&!f.value?"image/png,image/jpeg,image/jpg":f.value),M=a.ref(null),L=a.computed(()=>{var _,G,se;return ke({[d]:!0,[`${d}--${i.value}`]:!0,[`${d}--single-picture`]:I.value,[`${d}--has-file`]:(_=o.value)!=null?_:!1,[`${d}--${(G=o.value)==null?void 0:G.status}`]:(se=o.value)!=null?se:!1,[`${d}--dragover`]:x.value,[`${d}--disabled`]:l.value})}),k=()=>{M.value.value=null,M.value.click()},N=_=>{const{files:G}=_.target;n("change",Array.from(G))},v=()=>{e.disabled||k()},p=_=>{_.defaultPrevented||_.target!==_.currentTarget||((_.code==="Enter"||_.code==="Space")&&k(),_.preventDefault())};function w(_,G){n("remove",_,G),G.stopPropagation(),G.preventDefault()}const x=a.ref(!1),S=()=>{const _=de=>{if(l.value)return;de.preventDefault(),x.value=!1;const pe=Array.from(de.dataTransfer.files);if(!b.value){n("change",pe);return}const K=pe.filter(Z=>{const{type:J,name:V}=Z,X=V.includes(".")?`.${V.split(".").pop()}`:"",Y=J.replace(/\/.*$/,"");return b.value.split(",").map(ne=>ne.trim()).filter(ne=>ne).some(ne=>ne.startsWith(".")?X===ne:/\/\*$/.test(ne)?Y===ne.replace(/\/\*$/,""):/^[^/]+\/[^/]+$/.test(ne)?J===ne:!1)});n("change",K)},G=de=>{de.preventDefault(),x.value=!0},se=()=>{x.value=!1},ce=ke({[`${d}__draggable`]:!0});return a.createVNode("div",{class:ce,onDrop:_,onDragover:G,onDragleave:se},[t.default?t.default():a.createVNode(a.Fragment,null,[a.createVNode(us,{class:`${d}__draggable-icon`},null),a.createVNode("div",{class:`${d}__draggable-text`},[a.createTextVNode("\u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904\u6216"),a.createVNode("span",{class:`${d}__draggable-upload-link`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])])])},Q=()=>a.createVNode(a.Fragment,null,[I.value&&e.file?O(e.file):z()]),z=()=>a.createVNode(a.Fragment,null,[t.default?t.default():a.createVNode("div",{class:`${d}__picture-inner`},[a.createVNode(ls,{class:`${d}__picture-icon`},null),a.createVNode("div",{class:`${d}__picture-text`},[a.createTextVNode("\u70B9\u51FB\u4E0A\u4F20")])])]),O=_=>[a.withDirectives(a.createVNode("img",{src:_.url,class:`${d}__picture-thumbnail`,alt:""},null),[[a.vShow,_.status!=="uploading"]]),a.createVNode(a.Fragment,null,[_.status==="uploading"&&a.createVNode(ga,{class:`${d}__picture-progress`,type:"circle",color:"#3a84ff",bgColor:"#333",width:50,titleStyle:{color:"#fff"},percent:_.percentage},null)]),a.createVNode(a.Fragment,null,[!e.disabled&&a.createVNode("div",{class:`${d}__picture-actions`},[a.createVNode(ia,{class:"action-icon",onClick:G=>w(_,G)},null)])])],P=()=>a.createVNode(Qt,{disabled:l.value},{default:()=>[a.createVNode(us,{class:`${d}__button-icon`},null),a.createVNode("span",{class:`${d}__button-text`},[a.createTextVNode("\u4E0A\u4F20\u6587\u4EF6")])]}),E=()=>{if(g.value)return P();if(m.value)return S();if(C.value)return Q()};return()=>{var _;return a.createVNode("div",{class:L.value,tabindex:"0",onClick:v,onKeydown:p},[t.trigger?[t.trigger(),(_=t==null?void 0:t.default)==null?void 0:_.call(t)]:E(),a.createVNode("input",{ref:M,class:"bk-upload__input-file",tabindex:"-1",onChange:N,accept:b.value,multiple:c.value,disabled:l.value,type:"file"},null)])}}}),c9={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(N,v){var p=N[0],w=N[1],x=N[2],S=N[3];p+=(w&x|~w&S)+v[0]-680876936|0,p=(p<<7|p>>>25)+w|0,S+=(p&w|~p&x)+v[1]-389564586|0,S=(S<<12|S>>>20)+p|0,x+=(S&p|~S&w)+v[2]+606105819|0,x=(x<<17|x>>>15)+S|0,w+=(x&S|~x&p)+v[3]-1044525330|0,w=(w<<22|w>>>10)+x|0,p+=(w&x|~w&S)+v[4]-176418897|0,p=(p<<7|p>>>25)+w|0,S+=(p&w|~p&x)+v[5]+1200080426|0,S=(S<<12|S>>>20)+p|0,x+=(S&p|~S&w)+v[6]-1473231341|0,x=(x<<17|x>>>15)+S|0,w+=(x&S|~x&p)+v[7]-45705983|0,w=(w<<22|w>>>10)+x|0,p+=(w&x|~w&S)+v[8]+1770035416|0,p=(p<<7|p>>>25)+w|0,S+=(p&w|~p&x)+v[9]-1958414417|0,S=(S<<12|S>>>20)+p|0,x+=(S&p|~S&w)+v[10]-42063|0,x=(x<<17|x>>>15)+S|0,w+=(x&S|~x&p)+v[11]-1990404162|0,w=(w<<22|w>>>10)+x|0,p+=(w&x|~w&S)+v[12]+1804603682|0,p=(p<<7|p>>>25)+w|0,S+=(p&w|~p&x)+v[13]-40341101|0,S=(S<<12|S>>>20)+p|0,x+=(S&p|~S&w)+v[14]-1502002290|0,x=(x<<17|x>>>15)+S|0,w+=(x&S|~x&p)+v[15]+1236535329|0,w=(w<<22|w>>>10)+x|0,p+=(w&S|x&~S)+v[1]-165796510|0,p=(p<<5|p>>>27)+w|0,S+=(p&x|w&~x)+v[6]-1069501632|0,S=(S<<9|S>>>23)+p|0,x+=(S&w|p&~w)+v[11]+643717713|0,x=(x<<14|x>>>18)+S|0,w+=(x&p|S&~p)+v[0]-373897302|0,w=(w<<20|w>>>12)+x|0,p+=(w&S|x&~S)+v[5]-701558691|0,p=(p<<5|p>>>27)+w|0,S+=(p&x|w&~x)+v[10]+38016083|0,S=(S<<9|S>>>23)+p|0,x+=(S&w|p&~w)+v[15]-660478335|0,x=(x<<14|x>>>18)+S|0,w+=(x&p|S&~p)+v[4]-405537848|0,w=(w<<20|w>>>12)+x|0,p+=(w&S|x&~S)+v[9]+568446438|0,p=(p<<5|p>>>27)+w|0,S+=(p&x|w&~x)+v[14]-1019803690|0,S=(S<<9|S>>>23)+p|0,x+=(S&w|p&~w)+v[3]-187363961|0,x=(x<<14|x>>>18)+S|0,w+=(x&p|S&~p)+v[8]+1163531501|0,w=(w<<20|w>>>12)+x|0,p+=(w&S|x&~S)+v[13]-1444681467|0,p=(p<<5|p>>>27)+w|0,S+=(p&x|w&~x)+v[2]-51403784|0,S=(S<<9|S>>>23)+p|0,x+=(S&w|p&~w)+v[7]+1735328473|0,x=(x<<14|x>>>18)+S|0,w+=(x&p|S&~p)+v[12]-1926607734|0,w=(w<<20|w>>>12)+x|0,p+=(w^x^S)+v[5]-378558|0,p=(p<<4|p>>>28)+w|0,S+=(p^w^x)+v[8]-2022574463|0,S=(S<<11|S>>>21)+p|0,x+=(S^p^w)+v[11]+1839030562|0,x=(x<<16|x>>>16)+S|0,w+=(x^S^p)+v[14]-35309556|0,w=(w<<23|w>>>9)+x|0,p+=(w^x^S)+v[1]-1530992060|0,p=(p<<4|p>>>28)+w|0,S+=(p^w^x)+v[4]+1272893353|0,S=(S<<11|S>>>21)+p|0,x+=(S^p^w)+v[7]-155497632|0,x=(x<<16|x>>>16)+S|0,w+=(x^S^p)+v[10]-1094730640|0,w=(w<<23|w>>>9)+x|0,p+=(w^x^S)+v[13]+681279174|0,p=(p<<4|p>>>28)+w|0,S+=(p^w^x)+v[0]-358537222|0,S=(S<<11|S>>>21)+p|0,x+=(S^p^w)+v[3]-722521979|0,x=(x<<16|x>>>16)+S|0,w+=(x^S^p)+v[6]+76029189|0,w=(w<<23|w>>>9)+x|0,p+=(w^x^S)+v[9]-640364487|0,p=(p<<4|p>>>28)+w|0,S+=(p^w^x)+v[12]-421815835|0,S=(S<<11|S>>>21)+p|0,x+=(S^p^w)+v[15]+530742520|0,x=(x<<16|x>>>16)+S|0,w+=(x^S^p)+v[2]-995338651|0,w=(w<<23|w>>>9)+x|0,p+=(x^(w|~S))+v[0]-198630844|0,p=(p<<6|p>>>26)+w|0,S+=(w^(p|~x))+v[7]+1126891415|0,S=(S<<10|S>>>22)+p|0,x+=(p^(S|~w))+v[14]-1416354905|0,x=(x<<15|x>>>17)+S|0,w+=(S^(x|~p))+v[5]-57434055|0,w=(w<<21|w>>>11)+x|0,p+=(x^(w|~S))+v[12]+1700485571|0,p=(p<<6|p>>>26)+w|0,S+=(w^(p|~x))+v[3]-1894986606|0,S=(S<<10|S>>>22)+p|0,x+=(p^(S|~w))+v[10]-1051523|0,x=(x<<15|x>>>17)+S|0,w+=(S^(x|~p))+v[1]-2054922799|0,w=(w<<21|w>>>11)+x|0,p+=(x^(w|~S))+v[8]+1873313359|0,p=(p<<6|p>>>26)+w|0,S+=(w^(p|~x))+v[15]-30611744|0,S=(S<<10|S>>>22)+p|0,x+=(p^(S|~w))+v[6]-1560198380|0,x=(x<<15|x>>>17)+S|0,w+=(S^(x|~p))+v[13]+1309151649|0,w=(w<<21|w>>>11)+x|0,p+=(x^(w|~S))+v[4]-145523070|0,p=(p<<6|p>>>26)+w|0,S+=(w^(p|~x))+v[11]-1120210379|0,S=(S<<10|S>>>22)+p|0,x+=(p^(S|~w))+v[2]+718787259|0,x=(x<<15|x>>>17)+S|0,w+=(S^(x|~p))+v[9]-343485551|0,w=(w<<21|w>>>11)+x|0,N[0]=p+N[0]|0,N[1]=w+N[1]|0,N[2]=x+N[2]|0,N[3]=S+N[3]|0}function o(N){var v=[],p;for(p=0;p<64;p+=4)v[p>>2]=N.charCodeAt(p)+(N.charCodeAt(p+1)<<8)+(N.charCodeAt(p+2)<<16)+(N.charCodeAt(p+3)<<24);return v}function c(N){var v=[],p;for(p=0;p<64;p+=4)v[p>>2]=N[p]+(N[p+1]<<8)+(N[p+2]<<16)+(N[p+3]<<24);return v}function f(N){var v=N.length,p=[1732584193,-271733879,-1732584194,271733878],w,x,S,Q,z,O;for(w=64;w<=v;w+=64)l(p,o(N.substring(w-64,w)));for(N=N.substring(w-64),x=N.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<x;w+=1)S[w>>2]|=N.charCodeAt(w)<<(w%4<<3);if(S[w>>2]|=128<<(w%4<<3),w>55)for(l(p,S),w=0;w<16;w+=1)S[w]=0;return Q=v*8,Q=Q.toString(16).match(/(.*?)(.{0,8})$/),z=parseInt(Q[2],16),O=parseInt(Q[1],16)||0,S[14]=z,S[15]=O,l(p,S),p}function d(N){var v=N.length,p=[1732584193,-271733879,-1732584194,271733878],w,x,S,Q,z,O;for(w=64;w<=v;w+=64)l(p,c(N.subarray(w-64,w)));for(N=w-64<v?N.subarray(w-64):new Uint8Array(0),x=N.length,S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=0;w<x;w+=1)S[w>>2]|=N[w]<<(w%4<<3);if(S[w>>2]|=128<<(w%4<<3),w>55)for(l(p,S),w=0;w<16;w+=1)S[w]=0;return Q=v*8,Q=Q.toString(16).match(/(.*?)(.{0,8})$/),z=parseInt(Q[2],16),O=parseInt(Q[1],16)||0,S[14]=z,S[15]=O,l(p,S),p}function g(N){var v="",p;for(p=0;p<4;p+=1)v+=i[N>>p*8+4&15]+i[N>>p*8&15];return v}function m(N){var v;for(v=0;v<N.length;v+=1)N[v]=g(N[v]);return N.join("")}m(f("hello")),typeof ArrayBuffer!="undefined"&&!ArrayBuffer.prototype.slice&&function(){function N(v,p){return v=v|0||0,v<0?Math.max(v+p,0):Math.min(v,p)}ArrayBuffer.prototype.slice=function(v,p){var w=this.byteLength,x=N(v,w),S=w,Q,z,O,P;return p!==n&&(S=N(p,w)),x>S?new ArrayBuffer(0):(Q=S-x,z=new ArrayBuffer(Q),O=new Uint8Array(z),P=new Uint8Array(this,x,Q),O.set(P),z)}}();function C(N){return/[\u0080-\uFFFF]/.test(N)&&(N=unescape(encodeURIComponent(N))),N}function I(N,v){var p=N.length,w=new ArrayBuffer(p),x=new Uint8Array(w),S;for(S=0;S<p;S+=1)x[S]=N.charCodeAt(S);return v?x:w}function b(N){return String.fromCharCode.apply(null,new Uint8Array(N))}function M(N,v,p){var w=new Uint8Array(N.byteLength+v.byteLength);return w.set(new Uint8Array(N)),w.set(new Uint8Array(v),N.byteLength),p?w:w.buffer}function L(N){var v=[],p=N.length,w;for(w=0;w<p-1;w+=2)v.push(parseInt(N.substr(w,2),16));return String.fromCharCode.apply(String,v)}function k(){this.reset()}return k.prototype.append=function(N){return this.appendBinary(C(N)),this},k.prototype.appendBinary=function(N){this._buff+=N,this._length+=N.length;var v=this._buff.length,p;for(p=64;p<=v;p+=64)l(this._hash,o(this._buff.substring(p-64,p)));return this._buff=this._buff.substring(p-64),this},k.prototype.end=function(N){var v=this._buff,p=v.length,w,x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S;for(w=0;w<p;w+=1)x[w>>2]|=v.charCodeAt(w)<<(w%4<<3);return this._finish(x,p),S=m(this._hash),N&&(S=L(S)),this.reset(),S},k.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},k.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},k.prototype.setState=function(N){return this._buff=N.buff,this._length=N.length,this._hash=N.hash,this},k.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},k.prototype._finish=function(N,v){var p=v,w,x,S;if(N[p>>2]|=128<<(p%4<<3),p>55)for(l(this._hash,N),p=0;p<16;p+=1)N[p]=0;w=this._length*8,w=w.toString(16).match(/(.*?)(.{0,8})$/),x=parseInt(w[2],16),S=parseInt(w[1],16)||0,N[14]=x,N[15]=S,l(this._hash,N)},k.hash=function(N,v){return k.hashBinary(C(N),v)},k.hashBinary=function(N,v){var p=f(N),w=m(p);return v?L(w):w},k.ArrayBuffer=function(){this.reset()},k.ArrayBuffer.prototype.append=function(N){var v=M(this._buff.buffer,N,!0),p=v.length,w;for(this._length+=N.byteLength,w=64;w<=p;w+=64)l(this._hash,c(v.subarray(w-64,w)));return this._buff=w-64<p?new Uint8Array(v.buffer.slice(w-64)):new Uint8Array(0),this},k.ArrayBuffer.prototype.end=function(N){var v=this._buff,p=v.length,w=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x,S;for(x=0;x<p;x+=1)w[x>>2]|=v[x]<<(x%4<<3);return this._finish(w,p),S=m(this._hash),N&&(S=L(S)),this.reset(),S},k.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},k.ArrayBuffer.prototype.getState=function(){var N=k.prototype.getState.call(this);return N.buff=b(N.buff),N},k.ArrayBuffer.prototype.setState=function(N){return N.buff=I(N.buff,!0),k.prototype.setState.call(this,N)},k.ArrayBuffer.prototype.destroy=k.prototype.destroy,k.ArrayBuffer.prototype._finish=k.prototype._finish,k.ArrayBuffer.hash=function(N,v){var p=d(new Uint8Array(N)),w=m(p);return v?L(w):w},k})})(c9);var u9=c9.exports;function fc(e){const t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}const rb=e=>{if(typeof XMLHttpRequest=="undefined")throw new Error("XMLHttpRequest is undefined");const t=new XMLHttpRequest,{action:n}=e;t.upload&&t.upload.addEventListener("progress",o=>{const c=o;c.percent=o.total>0?o.loaded/o.total*100:0,e.onProgress(c)});const i=new FormData;if(e.data){let o=e.data;Array.isArray(o)||(o=[o]),o.forEach(c=>{for(const[f,d]of Object.entries(c))Array.isArray(d)?i.append(f,...d):i.append(f,d)})}if(e.formDataAttributes){let o=e.formDataAttributes;Array.isArray(o)||(o=[o]),o.forEach(c=>{Array.isArray(c.value)?i.append(c.name,...c.value):i.append(c.name,c.value)})}if(i.append(e.filename,e.file,e.file.name),t.addEventListener("error",()=>{e.onError(new Error("An error occurred during upload"))}),t.addEventListener("load",()=>{if(t.status<200||t.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(fc(t))}),t.addEventListener("loadend",()=>{e.onComplete()}),t.open(e.method,n,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0),e.header)if(Array.isArray(e.header))e.header.forEach(o=>{const c=o.name,f=o.value;t.setRequestHeader(c,f)});else{const o=e.header.name,c=e.header.value;t.setRequestHeader(o,c)}const l=e.headers||{};if(l instanceof Headers)l.forEach((o,c)=>t.setRequestHeader(c,o));else for(const[o,c]of Object.entries(l))fd(c)||t.setRequestHeader(o,String(c));return t.send(i),t},d9=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,ab=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 lb(n,t),o=[];sb(e,n,i,l,o,t),await Promise.all(o).then(()=>{const c={size:n.size,name:n.name,total:i,hash:l},f=new XMLHttpRequest;f.open(e.method,e.mergeUrl,!0),f.onreadystatechange=()=>{if(f.readyState===4){if(f.status<200||f.status>=300)return e.onError(new Error("An error occurred during upload"));e.onSuccess(fc(f))}},f.onloadend=()=>{e.onComplete()},f.setRequestHeader("Content-type","application/JSON"),f.send(JSON.stringify(c))})},sb=(e,t,n,i,l,o)=>{for(let c=0;c<n;c++){const f=new Promise((d,g)=>{const m=c*o,C=Math.min(t.size,m+o),I=new FormData;if(e.data){let L=e.data;Array.isArray(L)||(L=[L]),L.forEach(k=>{for(const[N,v]of Object.entries(k))Array.isArray(v)?I.append(N,...v):I.append(N,v)})}if(e.formDataAttributes){let L=e.formDataAttributes;Array.isArray(L)||(L=[L]),L.forEach(k=>{Array.isArray(k.value)?I.append(k.name,...k.value):I.append(k.name,k.value)})}I.append("file",d9.call(t,m,C)),I.append("name",t.name),I.append("total",n.toString()),I.append("index",c.toString()),I.append("size",t.size.toString()),I.append("hash",i.toString());const b=new XMLHttpRequest;if(b.onreadystatechange=()=>{if(b.readyState===4){const L=fc(b);b.status<200||b.status>=300?(g(L),e.onError(new Error("An error occurred during upload"))):d("reponseText")}},b.upload.addEventListener("progress",L=>{const k=L;e.onProgress(k,c)},!1),e.withCredentials&&"withCredentials"in b&&(b.withCredentials=!0),b.open(e.method,e.sliceUrl,!0),e.header)if(Array.isArray(e.header))e.header.forEach(L=>{const k=L.name,N=L.value;b.setRequestHeader(k,N)});else{const L=e.header.name,k=e.header.value;b.setRequestHeader(L,k)}const M=e.headers||{};if(M instanceof Headers)M.forEach((L,k)=>b.setRequestHeader(k,L));else for(const[L,k]of Object.entries(M))fd(k)||b.setRequestHeader(L,String(k));b.send(I)});l.push(f)}},lb=(e,t)=>new Promise((n,i)=>{const l=Math.ceil(e.size/t);let o=0;const c=new u9.ArrayBuffer,f=new FileReader;function d(){const g=o*t,m=g+t>=e.size?e.size:g+t;f.readAsArrayBuffer(d9.call(e,g,m))}f.onload=g=>{if(c.append(g.target.result),o+=1,o<l)d();else{const m=c.end(),C=new u9;C.append(m),C.append(e.name);const I=C.end();n(I)}},f.onerror=()=>{i(new Error("File slcie failed"))},d()}).catch(n=>{console.log(n)});function f9(e){return Date.now()+e}var ob=(e,t)=>{const n=a.computed(()=>{var I;return typeof e.size=="number"?e.size:(I=e==null?void 0:e.size)==null?void 0:I.maxImgSize}),i=a.computed(()=>{var I;return typeof e.size=="number"?e.size:(I=e==null?void 0:e.size)==null?void 0:I.maxImgSize}),l=a.ref([]);function o(I){return l.value.find(b=>b.uid===I.uid)}let c=0;function f(I){var k;c+=1,I.uid=f9(c);const b={uid:I.uid,name:I.name,status:Lr.NEW,size:I.size,raw:I},M=I.type.startsWith("image/");let L=null;if(M){try{b.url=window.URL.createObjectURL(I)}catch(N){console.error(N)}b.isPic=!0}return e.validateName&&!((k=e.validateName)!=null&&k.test(b.name))&&(b.status=Lr.FAIL,b.statusText="invalid filename",L=new Error(b.statusText)),M&&I.size>n.value*1024**2&&(b.status=Lr.FAIL,b.statusText="invalid file size",L=new Error(b.statusText)),!M&&I.size>i.value*1024**2&&(b.status=Lr.FAIL,b.statusText="invalid file size",L=new Error(b.statusText)),l.value.push(b),L}async function d(I){var L;const b=I instanceof File?o(I):I,M=k=>{var N;t.onRemove(k,l.value),l.value.splice(l.value.indexOf(b),1),(N=k.url)!=null&&N.startsWith("blob:")&&URL.revokeObjectURL(k.url)};e.beforeRemove?await((L=e.beforeRemove)==null?void 0:L.call(e,b,l.value))!==!1&&M(b):M(b)}async function g(I,b){const M=o(b);!M||(M.status="fail",M.statusText=I.message)}async function m(I,b){const M=o(b);!M||(M.status="success",M.response=I)}async function C(I,b){const M=o(b);!M||(M.status="uploading",M.percentage=Math.round(I.percent))}return a.watch(()=>e.files,I=>{l.value=I.map(b=>{var M,L;return c+=1,Ne(H({},b),{uid:(M=b.uid)!=null?M:f9(c),status:(L=b.status)!=null?L:Lr.SUCCESS})})},{immediate:!0,deep:!0}),{fileList:l,handlePreprocess:f,handleRemove:d,handleError:g,handleSuccess:m,handleProgress:C}},cb=a.defineComponent({name:"BkUpload",props:qn,emits:["on-exceed","on-progress","on-success","on-error","on-delete","on-done"],setup(e,{slots:t,emit:n}){const i=a.shallowRef({}),l=a.computed(()=>e.theme===Kn.PICTURE),o=a.computed(()=>l.value&&!e.multiple),c=a.computed(()=>{var p;return ke({[Ui]:!0,[`${Ui}--${e.theme}`]:!0,[`${Ui}--disabled`]:e.disabled,[`${Ui}--single-picture`]:o.value,[e.extCls]:(p=e.extCls)!=null?p:!1})}),f={theme:e.theme,multiple:e.multiple,disabled:e.disabled,accept:e.accept};function d(p,w){v(p),n("on-delete",p,w)}const{fileList:g,handlePreprocess:m,handleRemove:C,handleProgress:I,handleSuccess:b,handleError:M}=ob(e,{onRemove:d});function L(p){if(!p.length)return;if(e.limit&&g.value.length+p.length>e.limit){n("on-exceed",p,g.value);return}let w=p;(!e.multiple||e.limit===1)&&(w=p.slice(0,1));for(const x of w){const S=x,Q=m(S);if(Q){n("on-error",S,g.value,Q);return}e.autoUpload&&k(S,w)}}async function k(p,w){var S;if(!e.beforeUpload)return N(p,w);let x;try{x=await((S=e.beforeUpload)==null?void 0:S.call(e,p))}catch{x=!1}if(x===!1){C(p);return}N(p,w)}function N(p,w){const{headers:x,header:S,data:Q,formDataAttributes:z,method:O,withCredentials:P,name:E,url:_,sliceUrl:G,mergeUrl:se,chunkSize:ce,customRequest:de}=e,{uid:pe}=p,K={headers:x,header:S,withCredentials:P,file:p,data:Q,formDataAttributes:z,method:O,filename:E,action:_,sliceUrl:G,mergeUrl:se,chunkSize:ce,onProgress:V=>{I(V,p),n("on-progress",V,p,g.value)},onSuccess:V=>{var Y;const X=V;if((Y=e==null?void 0:e.handleResCode)!=null&&Y.call(e,X))b(V,p),n("on-success",V,p,g.value);else{const ne=new Error((X==null?void 0:X.message)||"unknow error");M(ne,p),n("on-error",p,g.value,ne)}delete i.value[pe]},onError:V=>{M(V,p),n("on-error",p,g.value,V),delete i.value[pe]},onComplete:()=>{w.indexOf(p)===w.length-1&&n("on-done",g.value)}};let Z=e.sliceUpload?ab:rb;de&&(Z=de);const J=Z(K);i.value[pe]=J,J instanceof Promise&&J.then(K.onSuccess,K.onError)}function v(p){let w=i.value;p&&(w={[p.uid]:i.value[p.uid]}),Object.keys(w).forEach(x=>{if(w[x]instanceof XMLHttpRequest){const S=w[x];S==null||S.abort()}delete i.value[x]})}return a.onBeforeUnmount(()=>{g.value.forEach(({url:p})=>{p!=null&&p.startsWith("blob:")&&URL.revokeObjectURL(p)})}),()=>a.createVNode("div",{class:c.value},[!l.value&&a.createVNode(o9,a.mergeProps(f,{onChange:L}),t),t.tip?t.tip():e.tip&&a.createVNode("div",{class:`${Ui}__tip`},[e.tip]),a.createVNode(ib,{files:g.value,theme:e.theme,disabled:e.disabled,multiple:e.multiple,onRemove:C},{innerTrigger:p=>l.value&&a.createVNode(o9,a.mergeProps(f,{file:p,onChange:L,onRemove:C}),t)})])}});const h9=Ze(cb);function wi(){}wi.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(L){return l?(setTimeout(function(){l(void 0,L)},0),!0):L}t=this.castInput(t),n=this.castInput(n),t=this.removeEmpty(this.tokenize(t)),n=this.removeEmpty(this.tokenize(n));var f=n.length,d=t.length,g=1,m=f+d,C=[{newPos:-1,components:[]}],I=this.extractCommon(C[0],n,t,0);if(C[0].newPos+1>=f&&I+1>=d)return c([{value:this.join(n),count:n.length}]);function b(){for(var L=-1*g;L<=g;L+=2){var k=void 0,N=C[L-1],v=C[L+1],p=(v?v.newPos:0)-L;N&&(C[L-1]=void 0);var w=N&&N.newPos+1<f,x=v&&0<=p&&p<d;if(!w&&!x){C[L]=void 0;continue}if(!w||x&&N.newPos<v.newPos?(k=db(v),o.pushComponent(k.components,void 0,!0)):(k=N,k.newPos++,o.pushComponent(k.components,!0,void 0)),p=o.extractCommon(k,n,t,L),k.newPos+1>=f&&p+1>=d)return c(ub(o,k.components,n,t,o.useLongestToken));C[L]=k}g++}if(l)(function L(){setTimeout(function(){if(g>m)return l();b()||L()},0)})();else for(;g<=m;){var M=b();if(M)return M}},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,f=t.newPos,d=f-l,g=0;f+1<o&&d+1<c&&this.equals(n[f+1],i[d+1]);)f++,d++,g++;return g&&t.components.push({count:g}),t.newPos=f,d},equals:function(t,n){return this.options.comparator?this.options.comparator(t,n):t===n||this.options.ignoreCase&&t.toLowerCase()===n.toLowerCase()},removeEmpty:function(t){for(var n=[],i=0;i<t.length;i++)t[i]&&n.push(t[i]);return n},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function ub(e,t,n,i,l){for(var o=0,c=t.length,f=0,d=0;o<c;o++){var g=t[o];if(g.removed){if(g.value=e.join(i.slice(d,d+g.count)),d+=g.count,o&&t[o-1].added){var C=t[o-1];t[o-1]=t[o],t[o]=C}}else{if(!g.added&&l){var m=n.slice(f,f+g.count);m=m.map(function(b,M){var L=i[d+M];return L.length>b.length?L:b}),g.value=e.join(m)}else g.value=e.join(n.slice(f,f+g.count));f+=g.count,g.added||(d+=g.count)}}var I=t[c-1];return c>1&&typeof I.value=="string"&&(I.added||I.removed)&&e.equals("",I.value)&&(t[c-2].value+=I.value,t.pop()),t}function db(e){return{newPos:e.newPos,components:e.components.slice(0)}}var g9=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,m9=/\S/,p9=new wi;p9.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!m9.test(e)&&!m9.test(t)},p9.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]&&g9.test(t[n])&&g9.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};var hc=new wi;hc.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 fb(e,t,n){return hc.diff(e,t,n)}var hb=new wi;hb.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var gb=new wi;gb.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function Vs(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vs=function(t){return typeof t}:Vs=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vs(e)}function gc(e){return mb(e)||pb(e)||yb(e)||bb()}function mb(e){if(Array.isArray(e))return mc(e)}function pb(e){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(e))return Array.from(e)}function yb(e,t){if(!!e){if(typeof e=="string")return mc(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 mc(e,t)}}function mc(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 bb(){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 Cb=Object.prototype.toString,va=new wi;va.useLongestToken=!0,va.tokenize=hc.tokenize,va.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(pc(e,null,null,l),l," ")},va.equals=function(e,t){return wi.prototype.equals.call(va,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function pc(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(Cb.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]=pc(e[o],t,n,i,l);return t.pop(),n.pop(),c}if(e&&e.toJSON&&(e=e.toJSON()),Vs(e)==="object"&&e!==null){t.push(e),c={},n.push(c);var f=[],d;for(d in e)e.hasOwnProperty(d)&&f.push(d);for(f.sort(),o=0;o<f.length;o+=1)d=f[o],c[d]=pc(e[d],t,n,i,d);t.pop(),n.pop()}else c=e;return c}var yc=new wi;yc.tokenize=function(e){return e.slice()},yc.join=yc.removeEmpty=function(e){return e};function Mb(e,t,n,i,l,o,c){c||(c={}),typeof c.context=="undefined"&&(c.context=4);var f=fb(n,i,c);f.push({value:"",lines:[]});function d(N){return N.map(function(v){return" "+v})}for(var g=[],m=0,C=0,I=[],b=1,M=1,L=function(v){var p=f[v],w=p.lines||p.value.replace(/\n$/,"").split(`
59
59
  `);if(p.lines=w,p.added||p.removed){var x;if(!m){var S=f[v-1];m=b,C=M,S&&(I=c.context>0?d(S.lines.slice(-c.context)):[],m-=I.length,C-=I.length)}(x=I).push.apply(x,gc(w.map(function(se){return(p.added?"+":"-")+se}))),p.added?M+=w.length:b+=w.length}else{if(m)if(w.length<=c.context*2&&v<f.length-2){var Q;(Q=I).push.apply(Q,gc(d(w)))}else{var z,O=Math.min(w.length,c.context);(z=I).push.apply(z,gc(d(w.slice(0,O))));var P={oldStart:m,oldLines:b-m+O,newStart:C,newLines:M-C+O,lines:I};if(v>=f.length-2&&w.length<=c.context){var E=/\n$/.test(n),_=/\n$/.test(i),G=w.length==0&&I.length>P.oldLines;!E&&G&&n.length>0&&I.splice(P.oldLines,0,"\"),(!E&&!G||!_)&&I.push("\")}g.push(P),m=0,C=0,I=[]}b+=w.length,M+=w.length}},k=0;k<f.length;k++)L(k);return{oldFileName:e,newFileName:t,oldHeader:l,newHeader:o,hunks:g}}function Ib(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
  `)+`