tsviewer 1.0.25 → 1.0.26

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.
@@ -9,7 +9,7 @@ usage: app.provide(ID_INJECTION_KEY, {
9
9
  current: number,
10
10
  })`);const n=useGetDerivedNamespace();return computedEager(()=>vue.unref(e)||`${n.value}-id-${t.prefix}-${t.current++}`)},formContextKey=Symbol("formContextKey"),formItemContextKey=Symbol("formItemContextKey"),useFormItem=()=>{const e=vue.inject(formContextKey,void 0),t=vue.inject(formItemContextKey,void 0);return{form:e,formItem:t}},useFormItemInputId=(e,{formItemContext:t,disableIdGeneration:n,disableIdManagement:r})=>{n||(n=vue.ref(!1)),r||(r=vue.ref(!1));const i=vue.ref();let a;const o=vue.computed(()=>{var u;return!!(!(e.label||e.ariaLabel)&&t&&t.inputIds&&((u=t.inputIds)==null?void 0:u.length)<=1)});return vue.onMounted(()=>{a=vue.watch([vue.toRef(e,"id"),n],([u,l])=>{const c=u??(l?void 0:useId().value);c!==i.value&&(t!=null&&t.removeInputId&&(i.value&&t.removeInputId(i.value),!(r!=null&&r.value)&&!l&&c&&t.addInputId(c)),i.value=c)},{immediate:!0})}),vue.onUnmounted(()=>{a&&a(),t!=null&&t.removeInputId&&i.value&&t.removeInputId(i.value)}),{isLabeledByFormItem:o,inputId:i}},useProp=e=>{const t=vue.getCurrentInstance();return vue.computed(()=>{var n,r;return(r=(n=t==null?void 0:t.proxy)==null?void 0:n.$props)==null?void 0:r[e]})},useFormSize=(e,t={})=>{const n=vue.ref(void 0),r=t.prop?n:useProp("size"),i=t.global?n:useGlobalSize(),a=t.form?{size:void 0}:vue.inject(formContextKey,void 0),o=t.formItem?{size:void 0}:vue.inject(formItemContextKey,void 0);return vue.computed(()=>r.value||vue.unref(e)||(o==null?void 0:o.size)||(a==null?void 0:a.size)||i.value||"")},useFormDisabled=e=>{const t=useProp("disabled"),n=vue.inject(formContextKey,void 0);return vue.computed(()=>t.value||vue.unref(e)||(n==null?void 0:n.disabled)||!1)},isFocusable=e=>{if(e.tabIndex>0||e.tabIndex===0&&e.getAttribute("tabIndex")!==null)return!0;if(e.tabIndex<0||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")return!1;switch(e.nodeName){case"A":return!!e.href&&e.rel!=="ignore";case"INPUT":return!(e.type==="hidden"||e.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}};function useFocusController(e,{beforeFocus:t,afterFocus:n,beforeBlur:r,afterBlur:i}={}){const a=vue.getCurrentInstance(),{emit:o}=a,u=vue.shallowRef(),l=useFormDisabled(),c=vue.ref(!1),p=v=>{isFunction$1(t)&&t(v)||c.value||(c.value=!0,o("focus",v),n==null||n())},d=v=>{var h;isFunction$1(r)&&r(v)||v.relatedTarget&&((h=u.value)!=null&&h.contains(v.relatedTarget))||(c.value=!1,o("blur",v),i==null||i())},f=v=>{var h,m;(h=u.value)!=null&&h.contains(document.activeElement)&&u.value!==document.activeElement||isFocusable(v.target)||l.value||(m=e.value)==null||m.focus()};return vue.watch([u,l],([v,h])=>{v&&(h?v.removeAttribute("tabindex"):v.setAttribute("tabindex","-1"))}),useEventListener(u,"focus",p,!0),useEventListener(u,"blur",d,!0),useEventListener(u,"click",f,!0),process.env.NODE_ENV==="test"&&vue.onMounted(()=>{const v=isElement(e.value)?e.value:document.querySelector("input,textarea");v&&(useEventListener(v,"focus",p,!0),useEventListener(v,"blur",d,!0))}),{isFocused:c,wrapperRef:u,handleFocus:p,handleBlur:d}}const isKorean=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e);function useComposition({afterComposition:e,emit:t}){const n=vue.ref(!1),r=u=>{t==null||t("compositionstart",u),n.value=!0},i=u=>{var l;t==null||t("compositionupdate",u);const c=(l=u.target)==null?void 0:l.value,p=c[c.length-1]||"";n.value=!isKorean(p)},a=u=>{t==null||t("compositionend",u),n.value&&(n.value=!1,vue.nextTick(()=>e(u)))};return{isComposing:n,handleComposition:u=>{u.type==="compositionend"?a(u):i(u)},handleCompositionStart:r,handleCompositionUpdate:i,handleCompositionEnd:a}}function useCursor(e){let t;function n(){if(e.value==null)return;const{selectionStart:i,selectionEnd:a,value:o}=e.value;if(i==null||a==null)return;const u=o.slice(0,Math.max(0,i)),l=o.slice(Math.max(0,a));t={selectionStart:i,selectionEnd:a,value:o,beforeTxt:u,afterTxt:l}}function r(){if(e.value==null||t==null)return;const{value:i}=e.value,{beforeTxt:a,afterTxt:o,selectionStart:u}=t;if(a==null||o==null||u==null)return;let l=i.length;if(i.endsWith(o))l=i.length-o.length;else if(i.startsWith(a))l=a.length;else{const c=a[u-1],p=i.indexOf(c,u-1);p!==-1&&(l=p+1)}e.value.setSelectionRange(l,l)}return[n,r]}const COMPONENT_NAME$5="ElInput",__default__$j=vue.defineComponent({name:COMPONENT_NAME$5,inheritAttrs:!1}),_sfc_main$U=vue.defineComponent({...__default__$j,props:inputProps,emits:inputEmits,setup(e,{expose:t,emit:n}){const r=e,i=vue.useAttrs(),a=useAttrs(),o=vue.useSlots(),u=vue.computed(()=>[r.type==="textarea"?m.b():h.b(),h.m(f.value),h.is("disabled",v.value),h.is("exceed",ae.value),{[h.b("group")]:o.prepend||o.append,[h.m("prefix")]:o.prefix||r.prefixIcon,[h.m("suffix")]:o.suffix||r.suffixIcon||r.clearable||r.showPassword,[h.bm("suffix","password-clear")]:$.value&&V.value,[h.b("hidden")]:r.type==="hidden"},i.class]),l=vue.computed(()=>[h.e("wrapper"),h.is("focus",L.value)]),{form:c,formItem:p}=useFormItem(),{inputId:d}=useFormItemInputId(r,{formItemContext:p}),f=useFormSize(),v=useFormDisabled(),h=useNamespace("input"),m=useNamespace("textarea"),y=vue.shallowRef(),g=vue.shallowRef(),b=vue.ref(!1),_=vue.ref(!1),S=vue.ref(),T=vue.shallowRef(r.inputStyle),w=vue.computed(()=>y.value||g.value),{wrapperRef:x,isFocused:L,handleFocus:M,handleBlur:z}=useFocusController(w,{beforeFocus(){return v.value},afterBlur(){var $e;r.validateEvent&&(($e=p==null?void 0:p.validate)==null||$e.call(p,"blur").catch(Et=>debugWarn(Et)))}}),A=vue.computed(()=>{var $e;return($e=c==null?void 0:c.statusIcon)!=null?$e:!1}),ue=vue.computed(()=>(p==null?void 0:p.validateState)||""),he=vue.computed(()=>ue.value&&ValidateComponentsMap[ue.value]),j=vue.computed(()=>_.value?view_default:hide_default),O=vue.computed(()=>[i.style]),F=vue.computed(()=>[r.inputStyle,T.value,{resize:r.resize}]),Y=vue.computed(()=>isNil(r.modelValue)?"":String(r.modelValue)),$=vue.computed(()=>r.clearable&&!v.value&&!r.readonly&&!!Y.value&&(L.value||b.value)),V=vue.computed(()=>r.showPassword&&!v.value&&!!Y.value),ie=vue.computed(()=>r.showWordLimit&&!!r.maxlength&&(r.type==="text"||r.type==="textarea")&&!v.value&&!r.readonly&&!r.showPassword),re=vue.computed(()=>Y.value.length),ae=vue.computed(()=>!!ie.value&&re.value>Number(r.maxlength)),le=vue.computed(()=>!!o.suffix||!!r.suffixIcon||$.value||r.showPassword||ie.value||!!ue.value&&A.value),[_e,Oe]=useCursor(y);useResizeObserver(g,$e=>{if(Fe(),!ie.value||r.resize!=="both")return;const Et=$e[0],{width:On}=Et.contentRect;S.value={right:`calc(100% - ${On+15+6}px)`}});const Ce=()=>{const{type:$e,autosize:Et}=r;if(!(!isClient||$e!=="textarea"||!g.value))if(Et){const On=isObject$1(Et)?Et.minRows:void 0,In=isObject$1(Et)?Et.maxRows:void 0,Vn=calcTextareaHeight(g.value,On,In);T.value={overflowY:"hidden",...Vn},vue.nextTick(()=>{g.value.offsetHeight,T.value=Vn})}else T.value={minHeight:calcTextareaHeight(g.value).minHeight}},Fe=($e=>{let Et=!1;return()=>{var On;if(Et||!r.autosize)return;((On=g.value)==null?void 0:On.offsetParent)===null||($e(),Et=!0)}})(Ce),At=()=>{const $e=w.value,Et=r.formatter?r.formatter(Y.value):Y.value;!$e||$e.value===Et||($e.value=Et)},Dt=async $e=>{_e();let{value:Et}=$e.target;if(r.formatter&&r.parser&&(Et=r.parser(Et)),!_n.value){if(Et===Y.value){At();return}n(UPDATE_MODEL_EVENT,Et),n(INPUT_EVENT,Et),await vue.nextTick(),At(),Oe()}},Lt=$e=>{let{value:Et}=$e.target;r.formatter&&r.parser&&(Et=r.parser(Et)),n(CHANGE_EVENT,Et)},{isComposing:_n,handleCompositionStart:Cn,handleCompositionUpdate:An,handleCompositionEnd:Tn}=useComposition({emit:n,afterComposition:Dt}),Sn=()=>{_e(),_.value=!_.value,setTimeout(Oe)},bn=()=>{var $e;return($e=w.value)==null?void 0:$e.focus()},wn=()=>{var $e;return($e=w.value)==null?void 0:$e.blur()},Ue=$e=>{b.value=!1,n("mouseleave",$e)},En=$e=>{b.value=!0,n("mouseenter",$e)},Pn=$e=>{n("keydown",$e)},Mn=()=>{var $e;($e=w.value)==null||$e.select()},$n=()=>{n(UPDATE_MODEL_EVENT,""),n(CHANGE_EVENT,""),n("clear"),n(INPUT_EVENT,"")};return vue.watch(()=>r.modelValue,()=>{var $e;vue.nextTick(()=>Ce()),r.validateEvent&&(($e=p==null?void 0:p.validate)==null||$e.call(p,"change").catch(Et=>debugWarn(Et)))}),vue.watch(Y,()=>At()),vue.watch(()=>r.type,async()=>{await vue.nextTick(),At(),Ce()}),vue.onMounted(()=>{!r.formatter&&r.parser&&debugWarn(COMPONENT_NAME$5,"If you set the parser, you also need to set the formatter."),At(),vue.nextTick(Ce)}),t({input:y,textarea:g,ref:w,textareaStyle:F,autosize:vue.toRef(r,"autosize"),isComposing:_n,focus:bn,blur:wn,select:Mn,clear:$n,resizeTextarea:Ce}),($e,Et)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([vue.unref(u),{[vue.unref(h).bm("group","append")]:$e.$slots.append,[vue.unref(h).bm("group","prepend")]:$e.$slots.prepend}]),style:vue.normalizeStyle(vue.unref(O)),onMouseenter:En,onMouseleave:Ue},[vue.createCommentVNode(" input "),$e.type!=="textarea"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createCommentVNode(" prepend slot "),$e.$slots.prepend?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(h).be("group","prepend"))},[vue.renderSlot($e.$slots,"prepend")],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{ref_key:"wrapperRef",ref:x,class:vue.normalizeClass(vue.unref(l))},[vue.createCommentVNode(" prefix slot "),$e.$slots.prefix||$e.prefixIcon?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:vue.normalizeClass(vue.unref(h).e("prefix"))},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(h).e("prefix-inner"))},[vue.renderSlot($e.$slots,"prefix"),$e.prefixIcon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(vue.unref(h).e("icon"))},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent($e.prefixIcon)))]),_:1},8,["class"])):vue.createCommentVNode("v-if",!0)],2)],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("input",vue.mergeProps({id:vue.unref(d),ref_key:"input",ref:y,class:vue.unref(h).e("inner")},vue.unref(a),{minlength:$e.minlength,maxlength:$e.maxlength,type:$e.showPassword?_.value?"text":"password":$e.type,disabled:vue.unref(v),readonly:$e.readonly,autocomplete:$e.autocomplete,tabindex:$e.tabindex,"aria-label":$e.ariaLabel,placeholder:$e.placeholder,style:$e.inputStyle,form:$e.form,autofocus:$e.autofocus,role:$e.containerRole,onCompositionstart:vue.unref(Cn),onCompositionupdate:vue.unref(An),onCompositionend:vue.unref(Tn),onInput:Dt,onChange:Lt,onKeydown:Pn}),null,16,["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","onCompositionstart","onCompositionupdate","onCompositionend"]),vue.createCommentVNode(" suffix slot "),vue.unref(le)?(vue.openBlock(),vue.createElementBlock("span",{key:1,class:vue.normalizeClass(vue.unref(h).e("suffix"))},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(h).e("suffix-inner"))},[!vue.unref($)||!vue.unref(V)||!vue.unref(ie)?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.renderSlot($e.$slots,"suffix"),$e.suffixIcon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(vue.unref(h).e("icon"))},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent($e.suffixIcon)))]),_:1},8,["class"])):vue.createCommentVNode("v-if",!0)],64)):vue.createCommentVNode("v-if",!0),vue.unref($)?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:1,class:vue.normalizeClass([vue.unref(h).e("icon"),vue.unref(h).e("clear")]),onMousedown:vue.withModifiers(vue.unref(NOOP),["prevent"]),onClick:$n},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(circle_close_default))]),_:1},8,["class","onMousedown"])):vue.createCommentVNode("v-if",!0),vue.unref(V)?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:2,class:vue.normalizeClass([vue.unref(h).e("icon"),vue.unref(h).e("password")]),onClick:Sn},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(vue.unref(j))))]),_:1},8,["class"])):vue.createCommentVNode("v-if",!0),vue.unref(ie)?(vue.openBlock(),vue.createElementBlock("span",{key:3,class:vue.normalizeClass(vue.unref(h).e("count"))},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(h).e("count-inner"))},vue.toDisplayString(vue.unref(re))+" / "+vue.toDisplayString($e.maxlength),3)],2)):vue.createCommentVNode("v-if",!0),vue.unref(ue)&&vue.unref(he)&&vue.unref(A)?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:4,class:vue.normalizeClass([vue.unref(h).e("icon"),vue.unref(h).e("validateIcon"),vue.unref(h).is("loading",vue.unref(ue)==="validating")])},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(vue.unref(he))))]),_:1},8,["class"])):vue.createCommentVNode("v-if",!0)],2)],2)):vue.createCommentVNode("v-if",!0)],2),vue.createCommentVNode(" append slot "),$e.$slots.append?(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass(vue.unref(h).be("group","append"))},[vue.renderSlot($e.$slots,"append")],2)):vue.createCommentVNode("v-if",!0)],64)):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createCommentVNode(" textarea "),vue.createElementVNode("textarea",vue.mergeProps({id:vue.unref(d),ref_key:"textarea",ref:g,class:[vue.unref(m).e("inner"),vue.unref(h).is("focus",vue.unref(L))]},vue.unref(a),{minlength:$e.minlength,maxlength:$e.maxlength,tabindex:$e.tabindex,disabled:vue.unref(v),readonly:$e.readonly,autocomplete:$e.autocomplete,style:vue.unref(F),"aria-label":$e.ariaLabel,placeholder:$e.placeholder,form:$e.form,autofocus:$e.autofocus,rows:$e.rows,role:$e.containerRole,onCompositionstart:vue.unref(Cn),onCompositionupdate:vue.unref(An),onCompositionend:vue.unref(Tn),onInput:Dt,onFocus:vue.unref(M),onBlur:vue.unref(z),onChange:Lt,onKeydown:Pn}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),vue.unref(ie)?(vue.openBlock(),vue.createElementBlock("span",{key:0,style:vue.normalizeStyle(S.value),class:vue.normalizeClass(vue.unref(h).e("count"))},vue.toDisplayString(vue.unref(re))+" / "+vue.toDisplayString($e.maxlength),7)):vue.createCommentVNode("v-if",!0)],64))],38))}});var Input=_export_sfc$1(_sfc_main$U,[["__file","input.vue"]]);const ElInput=withInstall(Input),GAP=4,BAR_MAP={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},renderThumbStyle=({move:e,size:t,bar:n})=>({[n.size]:t,transform:`translate${n.axis}(${e}%)`}),scrollbarContextKey=Symbol("scrollbarContextKey"),thumbProps=buildProps({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),COMPONENT_NAME$4="Thumb",_sfc_main$T=vue.defineComponent({__name:"thumb",props:thumbProps,setup(e){const t=e,n=vue.inject(scrollbarContextKey),r=useNamespace("scrollbar");n||throwError(COMPONENT_NAME$4,"can not inject scrollbar context");const i=vue.ref(),a=vue.ref(),o=vue.ref({}),u=vue.ref(!1);let l=!1,c=!1,p=0,d=0,f=isClient?document.onselectstart:null;const v=vue.computed(()=>BAR_MAP[t.vertical?"vertical":"horizontal"]),h=vue.computed(()=>renderThumbStyle({size:t.size,move:t.move,bar:v.value})),m=vue.computed(()=>i.value[v.value.offset]**2/n.wrapElement[v.value.scrollSize]/t.ratio/a.value[v.value.offset]),y=L=>{var M;if(L.stopPropagation(),L.ctrlKey||[1,2].includes(L.button))return;(M=window.getSelection())==null||M.removeAllRanges(),b(L);const z=L.currentTarget;z&&(o.value[v.value.axis]=z[v.value.offset]-(L[v.value.client]-z.getBoundingClientRect()[v.value.direction]))},g=L=>{if(!a.value||!i.value||!n.wrapElement)return;const M=Math.abs(L.target.getBoundingClientRect()[v.value.direction]-L[v.value.client]),z=a.value[v.value.offset]/2,A=(M-z)*100*m.value/i.value[v.value.offset];n.wrapElement[v.value.scroll]=A*n.wrapElement[v.value.scrollSize]/100},b=L=>{L.stopImmediatePropagation(),l=!0,p=n.wrapElement.scrollHeight,d=n.wrapElement.scrollWidth,document.addEventListener("mousemove",_),document.addEventListener("mouseup",S),f=document.onselectstart,document.onselectstart=()=>!1},_=L=>{if(!i.value||!a.value||l===!1)return;const M=o.value[v.value.axis];if(!M)return;const z=(i.value.getBoundingClientRect()[v.value.direction]-L[v.value.client])*-1,A=a.value[v.value.offset]-M,ue=(z-A)*100*m.value/i.value[v.value.offset];v.value.scroll==="scrollLeft"?n.wrapElement[v.value.scroll]=ue*d/100:n.wrapElement[v.value.scroll]=ue*p/100},S=()=>{l=!1,o.value[v.value.axis]=0,document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",S),x(),c&&(u.value=!1)},T=()=>{c=!1,u.value=!!t.size},w=()=>{c=!0,u.value=l};vue.onBeforeUnmount(()=>{x(),document.removeEventListener("mouseup",S)});const x=()=>{document.onselectstart!==f&&(document.onselectstart=f)};return useEventListener(vue.toRef(n,"scrollbarElement"),"mousemove",T),useEventListener(vue.toRef(n,"scrollbarElement"),"mouseleave",w),(L,M)=>(vue.openBlock(),vue.createBlock(vue.Transition,{name:vue.unref(r).b("fade"),persisted:""},{default:vue.withCtx(()=>[vue.withDirectives(vue.createElementVNode("div",{ref_key:"instance",ref:i,class:vue.normalizeClass([vue.unref(r).e("bar"),vue.unref(r).is(vue.unref(v).key)]),onMousedown:g,onClick:vue.withModifiers(()=>{},["stop"])},[vue.createElementVNode("div",{ref_key:"thumb",ref:a,class:vue.normalizeClass(vue.unref(r).e("thumb")),style:vue.normalizeStyle(vue.unref(h)),onMousedown:y},null,38)],42,["onClick"]),[[vue.vShow,L.always||u.value]])]),_:1},8,["name"]))}});var Thumb=_export_sfc$1(_sfc_main$T,[["__file","thumb.vue"]]);const barProps=buildProps({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),_sfc_main$S=vue.defineComponent({__name:"bar",props:barProps,setup(e,{expose:t}){const n=e,r=vue.inject(scrollbarContextKey),i=vue.ref(0),a=vue.ref(0),o=vue.ref(""),u=vue.ref(""),l=vue.ref(1),c=vue.ref(1);return t({handleScroll:f=>{if(f){const v=f.offsetHeight-GAP,h=f.offsetWidth-GAP;a.value=f.scrollTop*100/v*l.value,i.value=f.scrollLeft*100/h*c.value}},update:()=>{const f=r==null?void 0:r.wrapElement;if(!f)return;const v=f.offsetHeight-GAP,h=f.offsetWidth-GAP,m=v**2/f.scrollHeight,y=h**2/f.scrollWidth,g=Math.max(m,n.minSize),b=Math.max(y,n.minSize);l.value=m/(v-m)/(g/(v-g)),c.value=y/(h-y)/(b/(h-b)),u.value=g+GAP<v?`${g}px`:"",o.value=b+GAP<h?`${b}px`:""}}),(f,v)=>(vue.openBlock(),vue.createElementBlock(vue.Fragment,null,[vue.createVNode(Thumb,{move:i.value,ratio:c.value,size:o.value,always:f.always},null,8,["move","ratio","size","always"]),vue.createVNode(Thumb,{move:a.value,ratio:l.value,size:u.value,vertical:"",always:f.always},null,8,["move","ratio","size","always"])],64))}});var Bar=_export_sfc$1(_sfc_main$S,[["__file","bar.vue"]]);const scrollbarProps=buildProps({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:definePropType([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...useAriaProps(["ariaLabel","ariaOrientation"])}),scrollbarEmits={"end-reached":e=>["left","right","top","bottom"].includes(e),scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(isNumber)},COMPONENT_NAME$3="ElScrollbar",__default__$i=vue.defineComponent({name:COMPONENT_NAME$3}),_sfc_main$R=vue.defineComponent({...__default__$i,props:scrollbarProps,emits:scrollbarEmits,setup(e,{expose:t,emit:n}){const r=e,i=useNamespace("scrollbar");let a,o,u=0,l=0,c="";const p=vue.ref(),d=vue.ref(),f=vue.ref(),v=vue.ref(),h=vue.computed(()=>{const w={};return r.height&&(w.height=addUnit(r.height)),r.maxHeight&&(w.maxHeight=addUnit(r.maxHeight)),[r.wrapStyle,w]}),m=vue.computed(()=>[r.wrapClass,i.e("wrap"),{[i.em("wrap","hidden-default")]:!r.native}]),y=vue.computed(()=>[i.e("view"),r.viewClass]),g=()=>{var w;if(d.value){(w=v.value)==null||w.handleScroll(d.value);const x=u,L=l;u=d.value.scrollTop,l=d.value.scrollLeft;const M={bottom:u+d.value.clientHeight>=d.value.scrollHeight,top:u<=0&&x!==0,right:l+d.value.clientWidth>=d.value.scrollWidth&&L!==l,left:l<=0&&L!==0};x!==u&&(c=u>x?"bottom":"top"),L!==l&&(c=l>L?"right":"left"),n("scroll",{scrollTop:u,scrollLeft:l}),M[c]&&n("end-reached",c)}};function b(w,x){isObject$1(w)?d.value.scrollTo(w):isNumber(w)&&isNumber(x)&&d.value.scrollTo(w,x)}const _=w=>{if(!isNumber(w)){debugWarn(COMPONENT_NAME$3,"value must be a number");return}d.value.scrollTop=w},S=w=>{if(!isNumber(w)){debugWarn(COMPONENT_NAME$3,"value must be a number");return}d.value.scrollLeft=w},T=()=>{var w;(w=v.value)==null||w.update()};return vue.watch(()=>r.noresize,w=>{w?(a==null||a(),o==null||o()):({stop:a}=useResizeObserver(f,T),o=useEventListener("resize",T))},{immediate:!0}),vue.watch(()=>[r.maxHeight,r.height],()=>{r.native||vue.nextTick(()=>{var w;T(),d.value&&((w=v.value)==null||w.handleScroll(d.value))})}),vue.provide(scrollbarContextKey,vue.reactive({scrollbarElement:p,wrapElement:d})),vue.onActivated(()=>{d.value&&(d.value.scrollTop=u,d.value.scrollLeft=l)}),vue.onMounted(()=>{r.native||vue.nextTick(()=>{T()})}),vue.onUpdated(()=>T()),t({wrapRef:d,update:T,scrollTo:b,setScrollTop:_,setScrollLeft:S,handleScroll:g}),(w,x)=>(vue.openBlock(),vue.createElementBlock("div",{ref_key:"scrollbarRef",ref:p,class:vue.normalizeClass(vue.unref(i).b())},[vue.createElementVNode("div",{ref_key:"wrapRef",ref:d,class:vue.normalizeClass(vue.unref(m)),style:vue.normalizeStyle(vue.unref(h)),tabindex:w.tabindex,onScroll:g},[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(w.tag),{id:w.id,ref_key:"resizeRef",ref:f,class:vue.normalizeClass(vue.unref(y)),style:vue.normalizeStyle(w.viewStyle),role:w.role,"aria-label":w.ariaLabel,"aria-orientation":w.ariaOrientation},{default:vue.withCtx(()=>[vue.renderSlot(w.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),w.native?vue.createCommentVNode("v-if",!0):(vue.openBlock(),vue.createBlock(Bar,{key:0,ref_key:"barRef",ref:v,always:w.always,"min-size":w.minSize},null,8,["always","min-size"]))],2))}});var Scrollbar=_export_sfc$1(_sfc_main$R,[["__file","scrollbar.vue"]]);const ElScrollbar=withInstall(Scrollbar),POPPER_INJECTION_KEY=Symbol("popper"),POPPER_CONTENT_INJECTION_KEY=Symbol("popperContent"),roleTypes=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],popperProps=buildProps({role:{type:String,values:roleTypes,default:"tooltip"}}),__default__$h=vue.defineComponent({name:"ElPopper",inheritAttrs:!1}),_sfc_main$Q=vue.defineComponent({...__default__$h,props:popperProps,setup(e,{expose:t}){const n=e,r=vue.ref(),i=vue.ref(),a=vue.ref(),o=vue.ref(),u=vue.computed(()=>n.role),l={triggerRef:r,popperInstanceRef:i,contentRef:a,referenceRef:o,role:u};return t(l),vue.provide(POPPER_INJECTION_KEY,l),(c,p)=>vue.renderSlot(c.$slots,"default")}});var Popper=_export_sfc$1(_sfc_main$Q,[["__file","popper.vue"]]);const __default__$g=vue.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),_sfc_main$P=vue.defineComponent({...__default__$g,setup(e,{expose:t}){const n=useNamespace("popper"),{arrowRef:r,arrowStyle:i}=vue.inject(POPPER_CONTENT_INJECTION_KEY,void 0);return vue.onBeforeUnmount(()=>{r.value=void 0}),t({arrowRef:r}),(a,o)=>(vue.openBlock(),vue.createElementBlock("span",{ref_key:"arrowRef",ref:r,class:vue.normalizeClass(vue.unref(n).e("arrow")),style:vue.normalizeStyle(vue.unref(i)),"data-popper-arrow":""},null,6))}});var ElPopperArrow=_export_sfc$1(_sfc_main$P,[["__file","arrow.vue"]]);const popperTriggerProps=buildProps({virtualRef:{type:definePropType(Object)},virtualTriggering:Boolean,onMouseenter:{type:definePropType(Function)},onMouseleave:{type:definePropType(Function)},onClick:{type:definePropType(Function)},onKeydown:{type:definePropType(Function)},onFocus:{type:definePropType(Function)},onBlur:{type:definePropType(Function)},onContextmenu:{type:definePropType(Function)},id:String,open:Boolean}),FORWARD_REF_INJECTION_KEY=Symbol("elForwardRef"),useForwardRef=e=>{const t=n=>{e.value=n};vue.provide(FORWARD_REF_INJECTION_KEY,{setForwardRef:t})},useForwardRefDirective=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),NAME="ElOnlyChild",OnlyChild=vue.defineComponent({name:NAME,setup(e,{slots:t,attrs:n}){var r;const i=vue.inject(FORWARD_REF_INJECTION_KEY),a=useForwardRefDirective((r=i==null?void 0:i.setForwardRef)!=null?r:NOOP);return()=>{var o;const u=(o=t.default)==null?void 0:o.call(t,n);if(!u)return null;if(u.length>1)return debugWarn(NAME,"requires exact only one valid child."),null;const l=findFirstLegitChild(u);return l?vue.withDirectives(vue.cloneVNode(l,n),[[a]]):(debugWarn(NAME,"no valid child node found"),null)}}});function findFirstLegitChild(e){if(!e)return null;const t=e;for(const n of t){if(isObject$1(n))switch(n.type){case vue.Comment:continue;case vue.Text:case"svg":return wrapTextContent(n);case vue.Fragment:return findFirstLegitChild(n.children);default:return n}return wrapTextContent(n)}return null}function wrapTextContent(e){const t=useNamespace("only-child");return vue.createVNode("span",{class:t.e("content")},[e])}const __default__$f=vue.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),_sfc_main$O=vue.defineComponent({...__default__$f,props:popperTriggerProps,setup(e,{expose:t}){const n=e,{role:r,triggerRef:i}=vue.inject(POPPER_INJECTION_KEY,void 0);useForwardRef(i);const a=vue.computed(()=>u.value?n.id:void 0),o=vue.computed(()=>{if(r&&r.value==="tooltip")return n.open&&n.id?n.id:void 0}),u=vue.computed(()=>{if(r&&r.value!=="tooltip")return r.value}),l=vue.computed(()=>u.value?`${n.open}`:void 0);let c;const p=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return vue.onMounted(()=>{vue.watch(()=>n.virtualRef,d=>{d&&(i.value=unrefElement(d))},{immediate:!0}),vue.watch(i,(d,f)=>{c==null||c(),c=void 0,isElement(d)&&(p.forEach(v=>{var h;const m=n[v];m&&(d.addEventListener(v.slice(2).toLowerCase(),m),(h=f==null?void 0:f.removeEventListener)==null||h.call(f,v.slice(2).toLowerCase(),m))}),isFocusable(d)&&(c=vue.watch([a,o,u,l],v=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((h,m)=>{isNil(v[m])?d.removeAttribute(h):d.setAttribute(h,v[m])})},{immediate:!0}))),isElement(f)&&isFocusable(f)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(v=>f.removeAttribute(v))},{immediate:!0})}),vue.onBeforeUnmount(()=>{if(c==null||c(),c=void 0,i.value&&isElement(i.value)){const d=i.value;p.forEach(f=>{const v=n[f];v&&d.removeEventListener(f.slice(2).toLowerCase(),v)}),i.value=void 0}}),t({triggerRef:i}),(d,f)=>d.virtualTriggering?vue.createCommentVNode("v-if",!0):(vue.openBlock(),vue.createBlock(vue.unref(OnlyChild),vue.mergeProps({key:0},d.$attrs,{"aria-controls":vue.unref(a),"aria-describedby":vue.unref(o),"aria-expanded":vue.unref(l),"aria-haspopup":vue.unref(u)}),{default:vue.withCtx(()=>[vue.renderSlot(d.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var ElPopperTrigger=_export_sfc$1(_sfc_main$O,[["__file","trigger.vue"]]);const FOCUS_AFTER_TRAPPED="focus-trap.focus-after-trapped",FOCUS_AFTER_RELEASED="focus-trap.focus-after-released",FOCUSOUT_PREVENTED="focus-trap.focusout-prevented",FOCUS_AFTER_TRAPPED_OPTS={cancelable:!0,bubbles:!1},FOCUSOUT_PREVENTED_OPTS={cancelable:!0,bubbles:!1},ON_TRAP_FOCUS_EVT="focusAfterTrapped",ON_RELEASE_FOCUS_EVT="focusAfterReleased",FOCUS_TRAP_INJECTION_KEY=Symbol("elFocusTrap"),focusReason=vue.ref(),lastUserFocusTimestamp=vue.ref(0),lastAutomatedFocusTimestamp=vue.ref(0);let focusReasonUserCount=0;const obtainAllFocusableElements=e=>{const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0||r===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t},getVisibleElement=(e,t)=>{for(const n of e)if(!isHidden(n,t))return n},isHidden=(e,t)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},getEdges=e=>{const t=obtainAllFocusableElements(e),n=getVisibleElement(t,e),r=getVisibleElement(t.reverse(),e);return[n,r]},isSelectable=e=>e instanceof HTMLInputElement&&"select"in e,tryFocus=(e,t)=>{if(e&&e.focus){const n=document.activeElement;let r=!1;isElement(e)&&!isFocusable(e)&&!e.getAttribute("tabindex")&&(e.setAttribute("tabindex","-1"),r=!0),e.focus({preventScroll:!0}),lastAutomatedFocusTimestamp.value=window.performance.now(),e!==n&&isSelectable(e)&&t&&e.select(),isElement(e)&&r&&e.removeAttribute("tabindex")}};function removeFromStack(e,t){const n=[...e],r=e.indexOf(t);return r!==-1&&n.splice(r,1),n}const createFocusableStack=()=>{let e=[];return{push:r=>{const i=e[0];i&&r!==i&&i.pause(),e=removeFromStack(e,r),e.unshift(r)},remove:r=>{var i,a;e=removeFromStack(e,r),(a=(i=e[0])==null?void 0:i.resume)==null||a.call(i)}}},focusFirstDescendant=(e,t=!1)=>{const n=document.activeElement;for(const r of e)if(tryFocus(r,t),document.activeElement!==n)return},focusableStack=createFocusableStack(),isFocusCausedByUserEvent=()=>lastUserFocusTimestamp.value>lastAutomatedFocusTimestamp.value,notifyFocusReasonPointer=()=>{focusReason.value="pointer",lastUserFocusTimestamp.value=window.performance.now()},notifyFocusReasonKeydown=()=>{focusReason.value="keyboard",lastUserFocusTimestamp.value=window.performance.now()},useFocusReason=()=>(vue.onMounted(()=>{focusReasonUserCount===0&&(document.addEventListener("mousedown",notifyFocusReasonPointer),document.addEventListener("touchstart",notifyFocusReasonPointer),document.addEventListener("keydown",notifyFocusReasonKeydown)),focusReasonUserCount++}),vue.onBeforeUnmount(()=>{focusReasonUserCount--,focusReasonUserCount<=0&&(document.removeEventListener("mousedown",notifyFocusReasonPointer),document.removeEventListener("touchstart",notifyFocusReasonPointer),document.removeEventListener("keydown",notifyFocusReasonKeydown))}),{focusReason,lastUserFocusTimestamp,lastAutomatedFocusTimestamp}),createFocusOutPreventedEvent=e=>new CustomEvent(FOCUSOUT_PREVENTED,{...FOCUSOUT_PREVENTED_OPTS,detail:e}),EVENT_CODE={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"};let registeredEscapeHandlers=[];const cachedHandler=e=>{e.code===EVENT_CODE.esc&&registeredEscapeHandlers.forEach(t=>t(e))},useEscapeKeydown=e=>{vue.onMounted(()=>{registeredEscapeHandlers.length===0&&document.addEventListener("keydown",cachedHandler),isClient&&registeredEscapeHandlers.push(e)}),vue.onBeforeUnmount(()=>{registeredEscapeHandlers=registeredEscapeHandlers.filter(t=>t!==e),registeredEscapeHandlers.length===0&&isClient&&document.removeEventListener("keydown",cachedHandler)})},_sfc_main$N=vue.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[ON_TRAP_FOCUS_EVT,ON_RELEASE_FOCUS_EVT,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const n=vue.ref();let r,i;const{focusReason:a}=useFocusReason();useEscapeKeydown(h=>{e.trapped&&!o.paused&&t("release-requested",h)});const o={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},u=h=>{if(!e.loop&&!e.trapped||o.paused)return;const{code:m,altKey:y,ctrlKey:g,metaKey:b,currentTarget:_,shiftKey:S}=h,{loop:T}=e,w=m===EVENT_CODE.tab&&!y&&!g&&!b,x=document.activeElement;if(w&&x){const L=_,[M,z]=getEdges(L);if(M&&z){if(!S&&x===z){const ue=createFocusOutPreventedEvent({focusReason:a.value});t("focusout-prevented",ue),ue.defaultPrevented||(h.preventDefault(),T&&tryFocus(M,!0))}else if(S&&[M,L].includes(x)){const ue=createFocusOutPreventedEvent({focusReason:a.value});t("focusout-prevented",ue),ue.defaultPrevented||(h.preventDefault(),T&&tryFocus(z,!0))}}else if(x===L){const ue=createFocusOutPreventedEvent({focusReason:a.value});t("focusout-prevented",ue),ue.defaultPrevented||h.preventDefault()}}};vue.provide(FOCUS_TRAP_INJECTION_KEY,{focusTrapRef:n,onKeydown:u}),vue.watch(()=>e.focusTrapEl,h=>{h&&(n.value=h)},{immediate:!0}),vue.watch([n],([h],[m])=>{h&&(h.addEventListener("keydown",u),h.addEventListener("focusin",p),h.addEventListener("focusout",d)),m&&(m.removeEventListener("keydown",u),m.removeEventListener("focusin",p),m.removeEventListener("focusout",d))});const l=h=>{t(ON_TRAP_FOCUS_EVT,h)},c=h=>t(ON_RELEASE_FOCUS_EVT,h),p=h=>{const m=vue.unref(n);if(!m)return;const y=h.target,g=h.relatedTarget,b=y&&m.contains(y);e.trapped||g&&m.contains(g)||(r=g),b&&t("focusin",h),!o.paused&&e.trapped&&(b?i=y:tryFocus(i,!0))},d=h=>{const m=vue.unref(n);if(!(o.paused||!m))if(e.trapped){const y=h.relatedTarget;!isNil(y)&&!m.contains(y)&&setTimeout(()=>{if(!o.paused&&e.trapped){const g=createFocusOutPreventedEvent({focusReason:a.value});t("focusout-prevented",g),g.defaultPrevented||tryFocus(i,!0)}},0)}else{const y=h.target;y&&m.contains(y)||t("focusout",h)}};async function f(){await vue.nextTick();const h=vue.unref(n);if(h){focusableStack.push(o);const m=h.contains(document.activeElement)?r:document.activeElement;if(r=m,!h.contains(m)){const g=new Event(FOCUS_AFTER_TRAPPED,FOCUS_AFTER_TRAPPED_OPTS);h.addEventListener(FOCUS_AFTER_TRAPPED,l),h.dispatchEvent(g),g.defaultPrevented||vue.nextTick(()=>{let b=e.focusStartEl;isString$1(b)||(tryFocus(b),document.activeElement!==b&&(b="first")),b==="first"&&focusFirstDescendant(obtainAllFocusableElements(h),!0),(document.activeElement===m||b==="container")&&tryFocus(h)})}}}function v(){const h=vue.unref(n);if(h){h.removeEventListener(FOCUS_AFTER_TRAPPED,l);const m=new CustomEvent(FOCUS_AFTER_RELEASED,{...FOCUS_AFTER_TRAPPED_OPTS,detail:{focusReason:a.value}});h.addEventListener(FOCUS_AFTER_RELEASED,c),h.dispatchEvent(m),!m.defaultPrevented&&(a.value=="keyboard"||!isFocusCausedByUserEvent()||h.contains(document.activeElement))&&tryFocus(r??document.body),h.removeEventListener(FOCUS_AFTER_RELEASED,c),focusableStack.remove(o)}}return vue.onMounted(()=>{e.trapped&&f(),vue.watch(()=>e.trapped,h=>{h?f():v()})}),vue.onBeforeUnmount(()=>{e.trapped&&v(),n.value&&(n.value.removeEventListener("keydown",u),n.value.removeEventListener("focusin",p),n.value.removeEventListener("focusout",d),n.value=void 0)}),{onKeydown:u}}});function _sfc_render$q(e,t,n,r,i,a){return vue.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var ElFocusTrap=_export_sfc$1(_sfc_main$N,[["render",_sfc_render$q],["__file","focus-trap.vue"]]),E="top",R="bottom",W="right",P="left",me="auto",G=[E,R,W,P],U="start",J="end",Xe="clippingParents",je="viewport",K="popper",Ye="reference",De=G.reduce(function(e,t){return e.concat([t+"-"+U,t+"-"+J])},[]),Ee=[].concat(G,[me]).reduce(function(e,t){return e.concat([t,t+"-"+U,t+"-"+J])},[]),Ge="beforeRead",Je="read",Ke="afterRead",Qe="beforeMain",Ze="main",et="afterMain",tt="beforeWrite",nt="write",rt="afterWrite",ot=[Ge,Je,Ke,Qe,Ze,et,tt,nt,rt];function C(e){return e?(e.nodeName||"").toLowerCase():null}function H(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Q(e){var t=H(e).Element;return e instanceof t||e instanceof Element}function B(e){var t=H(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Pe(e){if(typeof ShadowRoot>"u")return!1;var t=H(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Mt(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},a=t.elements[n];!B(a)||!C(a)||(Object.assign(a.style,r),Object.keys(i).forEach(function(o){var u=i[o];u===!1?a.removeAttribute(o):a.setAttribute(o,u===!0?"":u)}))})}function Rt(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],a=t.attributes[r]||{},o=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),u=o.reduce(function(l,c){return l[c]="",l},{});!B(i)||!C(i)||(Object.assign(i.style,u),Object.keys(a).forEach(function(l){i.removeAttribute(l)}))})}}var Ae={name:"applyStyles",enabled:!0,phase:"write",fn:Mt,effect:Rt,requires:["computeStyles"]};function q(e){return e.split("-")[0]}var X=Math.max,ve=Math.min,Z=Math.round;function ee(e,t){t===void 0&&(t=!1);var n=e.getBoundingClientRect(),r=1,i=1;if(B(e)&&t){var a=e.offsetHeight,o=e.offsetWidth;o>0&&(r=Z(n.width)/o||1),a>0&&(i=Z(n.height)/a||1)}return{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function ke(e){var t=ee(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function it(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Pe(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function N(e){return H(e).getComputedStyle(e)}function Wt(e){return["table","td","th"].indexOf(C(e))>=0}function I(e){return((Q(e)?e.ownerDocument:e.document)||window.document).documentElement}function ge(e){return C(e)==="html"?e:e.assignedSlot||e.parentNode||(Pe(e)?e.host:null)||I(e)}function at(e){return!B(e)||N(e).position==="fixed"?null:e.offsetParent}function Bt(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&B(e)){var r=N(e);if(r.position==="fixed")return null}var i=ge(e);for(Pe(i)&&(i=i.host);B(i)&&["html","body"].indexOf(C(i))<0;){var a=N(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function se(e){for(var t=H(e),n=at(e);n&&Wt(n)&&N(n).position==="static";)n=at(n);return n&&(C(n)==="html"||C(n)==="body"&&N(n).position==="static")?t:n||Bt(e)||t}function Le(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function fe(e,t,n){return X(e,ve(t,n))}function St(e,t,n){var r=fe(e,t,n);return r>n?n:r}function st(){return{top:0,right:0,bottom:0,left:0}}function ft(e){return Object.assign({},st(),e)}function ct(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Tt=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,ft(typeof e!="number"?e:ct(e,G))};function Ht(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,u=q(n.placement),l=Le(u),c=[P,W].indexOf(u)>=0,p=c?"height":"width";if(!(!a||!o)){var d=Tt(i.padding,n),f=ke(a),v=l==="y"?E:P,h=l==="y"?R:W,m=n.rects.reference[p]+n.rects.reference[l]-o[l]-n.rects.popper[p],y=o[l]-n.rects.reference[l],g=se(a),b=g?l==="y"?g.clientHeight||0:g.clientWidth||0:0,_=m/2-y/2,S=d[v],T=b-f[p]-d[h],w=b/2-f[p]/2+_,x=fe(S,w,T),L=l;n.modifiersData[r]=(t={},t[L]=x,t.centerOffset=x-w,t)}}function Ct(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!it(t.elements.popper,i)||(t.elements.arrow=i))}var pt={name:"arrow",enabled:!0,phase:"main",fn:Ht,effect:Ct,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function te(e){return e.split("-")[1]}var qt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Vt(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:Z(t*i)/i||0,y:Z(n*i)/i||0}}function ut(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,u=e.position,l=e.gpuAcceleration,c=e.adaptive,p=e.roundOffsets,d=e.isFixed,f=o.x,v=f===void 0?0:f,h=o.y,m=h===void 0?0:h,y=typeof p=="function"?p({x:v,y:m}):{x:v,y:m};v=y.x,m=y.y;var g=o.hasOwnProperty("x"),b=o.hasOwnProperty("y"),_=P,S=E,T=window;if(c){var w=se(n),x="clientHeight",L="clientWidth";if(w===H(n)&&(w=I(n),N(w).position!=="static"&&u==="absolute"&&(x="scrollHeight",L="scrollWidth")),w=w,i===E||(i===P||i===W)&&a===J){S=R;var M=d&&w===T&&T.visualViewport?T.visualViewport.height:w[x];m-=M-r.height,m*=l?1:-1}if(i===P||(i===E||i===R)&&a===J){_=W;var z=d&&w===T&&T.visualViewport?T.visualViewport.width:w[L];v-=z-r.width,v*=l?1:-1}}var A=Object.assign({position:u},c&&qt),ue=p===!0?Vt({x:v,y:m}):{x:v,y:m};if(v=ue.x,m=ue.y,l){var he;return Object.assign({},A,(he={},he[S]=b?"0":"",he[_]=g?"0":"",he.transform=(T.devicePixelRatio||1)<=1?"translate("+v+"px, "+m+"px)":"translate3d("+v+"px, "+m+"px, 0)",he))}return Object.assign({},A,(t={},t[S]=b?m+"px":"",t[_]=g?v+"px":"",t.transform="",t))}function Nt(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,o=a===void 0?!0:a,u=n.roundOffsets,l=u===void 0?!0:u,c={placement:q(t.placement),variation:te(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,ut(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,ut(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Me={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Nt,data:{}},ye={passive:!0};function It(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,o=r.resize,u=o===void 0?!0:o,l=H(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(p){p.addEventListener("scroll",n.update,ye)}),u&&l.addEventListener("resize",n.update,ye),function(){a&&c.forEach(function(p){p.removeEventListener("scroll",n.update,ye)}),u&&l.removeEventListener("resize",n.update,ye)}}var Re={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:It,data:{}},_t={left:"right",right:"left",bottom:"top",top:"bottom"};function be(e){return e.replace(/left|right|bottom|top/g,function(t){return _t[t]})}var zt={start:"end",end:"start"};function lt(e){return e.replace(/start|end/g,function(t){return zt[t]})}function We(e){var t=H(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Be(e){return ee(I(e)).left+We(e).scrollLeft}function Ft(e){var t=H(e),n=I(e),r=t.visualViewport,i=n.clientWidth,a=n.clientHeight,o=0,u=0;return r&&(i=r.width,a=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=r.offsetLeft,u=r.offsetTop)),{width:i,height:a,x:o+Be(e),y:u}}function Ut(e){var t,n=I(e),r=We(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=X(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=X(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-r.scrollLeft+Be(e),l=-r.scrollTop;return N(i||n).direction==="rtl"&&(u+=X(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:u,y:l}}function Se(e){var t=N(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function dt(e){return["html","body","#document"].indexOf(C(e))>=0?e.ownerDocument.body:B(e)&&Se(e)?e:dt(ge(e))}function ce(e,t){var n;t===void 0&&(t=[]);var r=dt(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),a=H(r),o=i?[a].concat(a.visualViewport||[],Se(r)?r:[]):r,u=t.concat(o);return i?u:u.concat(ce(ge(o)))}function Te(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Xt(e){var t=ee(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function ht(e,t){return t===je?Te(Ft(e)):Q(t)?Xt(t):Te(Ut(I(e)))}function Yt(e){var t=ce(ge(e)),n=["absolute","fixed"].indexOf(N(e).position)>=0,r=n&&B(e)?se(e):e;return Q(r)?t.filter(function(i){return Q(i)&&it(i,r)&&C(i)!=="body"}):[]}function Gt(e,t,n){var r=t==="clippingParents"?Yt(e):[].concat(t),i=[].concat(r,[n]),a=i[0],o=i.reduce(function(u,l){var c=ht(e,l);return u.top=X(c.top,u.top),u.right=ve(c.right,u.right),u.bottom=ve(c.bottom,u.bottom),u.left=X(c.left,u.left),u},ht(e,a));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function mt(e){var t=e.reference,n=e.element,r=e.placement,i=r?q(r):null,a=r?te(r):null,o=t.x+t.width/2-n.width/2,u=t.y+t.height/2-n.height/2,l;switch(i){case E:l={x:o,y:t.y-n.height};break;case R:l={x:o,y:t.y+t.height};break;case W:l={x:t.x+t.width,y:u};break;case P:l={x:t.x-n.width,y:u};break;default:l={x:t.x,y:t.y}}var c=i?Le(i):null;if(c!=null){var p=c==="y"?"height":"width";switch(a){case U:l[c]=l[c]-(t[p]/2-n[p]/2);break;case J:l[c]=l[c]+(t[p]/2-n[p]/2);break}}return l}function ne(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.boundary,o=a===void 0?Xe:a,u=n.rootBoundary,l=u===void 0?je:u,c=n.elementContext,p=c===void 0?K:c,d=n.altBoundary,f=d===void 0?!1:d,v=n.padding,h=v===void 0?0:v,m=ft(typeof h!="number"?h:ct(h,G)),y=p===K?Ye:K,g=e.rects.popper,b=e.elements[f?y:p],_=Gt(Q(b)?b:b.contextElement||I(e.elements.popper),o,l),S=ee(e.elements.reference),T=mt({reference:S,element:g,placement:i}),w=Te(Object.assign({},g,T)),x=p===K?w:S,L={top:_.top-x.top+m.top,bottom:x.bottom-_.bottom+m.bottom,left:_.left-x.left+m.left,right:x.right-_.right+m.right},M=e.modifiersData.offset;if(p===K&&M){var z=M[i];Object.keys(L).forEach(function(A){var ue=[W,R].indexOf(A)>=0?1:-1,he=[E,R].indexOf(A)>=0?"y":"x";L[A]+=z[he]*ue})}return L}function Jt(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,u=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?Ee:l,p=te(r),d=p?u?De:De.filter(function(h){return te(h)===p}):G,f=d.filter(function(h){return c.indexOf(h)>=0});f.length===0&&(f=d);var v=f.reduce(function(h,m){return h[m]=ne(e,{placement:m,boundary:i,rootBoundary:a,padding:o})[q(m)],h},{});return Object.keys(v).sort(function(h,m){return v[h]-v[m]})}function Kt(e){if(q(e)===me)return[];var t=be(e);return[lt(e),t,lt(t)]}function Qt(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,u=o===void 0?!0:o,l=n.fallbackPlacements,c=n.padding,p=n.boundary,d=n.rootBoundary,f=n.altBoundary,v=n.flipVariations,h=v===void 0?!0:v,m=n.allowedAutoPlacements,y=t.options.placement,g=q(y),b=g===y,_=l||(b||!h?[be(y)]:Kt(y)),S=[y].concat(_).reduce(function(_e,Oe){return _e.concat(q(Oe)===me?Jt(t,{placement:Oe,boundary:p,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):Oe)},[]),T=t.rects.reference,w=t.rects.popper,x=new Map,L=!0,M=S[0],z=0;z<S.length;z++){var A=S[z],ue=q(A),he=te(A)===U,j=[E,R].indexOf(ue)>=0,O=j?"width":"height",F=ne(t,{placement:A,boundary:p,rootBoundary:d,altBoundary:f,padding:c}),Y=j?he?W:P:he?R:E;T[O]>w[O]&&(Y=be(Y));var $=be(Y),V=[];if(a&&V.push(F[ue]<=0),u&&V.push(F[Y]<=0,F[$]<=0),V.every(function(_e){return _e})){M=A,L=!1;break}x.set(A,V)}if(L)for(var ie=h?3:1,re=function(_e){var Oe=S.find(function(Ce){var xe=x.get(Ce);if(xe)return xe.slice(0,_e).every(function(Fe){return Fe})});if(Oe)return M=Oe,"break"},ae=ie;ae>0;ae--){var le=re(ae);if(le==="break")break}t.placement!==M&&(t.modifiersData[r]._skip=!0,t.placement=M,t.reset=!0)}}var vt={name:"flip",enabled:!0,phase:"main",fn:Qt,requiresIfExists:["offset"],data:{_skip:!1}};function gt(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function yt(e){return[E,W,R,P].some(function(t){return e[t]>=0})}function Zt(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=ne(t,{elementContext:"reference"}),u=ne(t,{altBoundary:!0}),l=gt(o,r),c=gt(u,i,a),p=yt(l),d=yt(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:p,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":d})}var bt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Zt};function en(e,t,n){var r=q(e),i=[P,E].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,o=a[0],u=a[1];return o=o||0,u=(u||0)*i,[P,W].indexOf(r)>=0?{x:u,y:o}:{x:o,y:u}}function tn(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=Ee.reduce(function(p,d){return p[d]=en(d,t.rects,a),p},{}),u=o[t.placement],l=u.x,c=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=o}var wt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:tn};function nn(e){var t=e.state,n=e.name;t.modifiersData[n]=mt({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}var He={name:"popperOffsets",enabled:!0,phase:"read",fn:nn,data:{}};function rn(e){return e==="x"?"y":"x"}function on(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,u=o===void 0?!1:o,l=n.boundary,c=n.rootBoundary,p=n.altBoundary,d=n.padding,f=n.tether,v=f===void 0?!0:f,h=n.tetherOffset,m=h===void 0?0:h,y=ne(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:p}),g=q(t.placement),b=te(t.placement),_=!b,S=Le(g),T=rn(S),w=t.modifiersData.popperOffsets,x=t.rects.reference,L=t.rects.popper,M=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,z=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ue={x:0,y:0};if(w){if(a){var he,j=S==="y"?E:P,O=S==="y"?R:W,F=S==="y"?"height":"width",Y=w[S],$=Y+y[j],V=Y-y[O],ie=v?-L[F]/2:0,re=b===U?x[F]:L[F],ae=b===U?-L[F]:-x[F],le=t.elements.arrow,_e=v&&le?ke(le):{width:0,height:0},Oe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:st(),Ce=Oe[j],xe=Oe[O],Fe=fe(0,x[F],_e[F]),At=_?x[F]/2-ie-Fe-Ce-z.mainAxis:re-Fe-Ce-z.mainAxis,Dt=_?-x[F]/2+ie+Fe+xe+z.mainAxis:ae+Fe+xe+z.mainAxis,Lt=t.elements.arrow&&se(t.elements.arrow),_n=Lt?S==="y"?Lt.clientTop||0:Lt.clientLeft||0:0,Cn=(he=A==null?void 0:A[S])!=null?he:0,An=Y+At-Cn-_n,Tn=Y+Dt-Cn,Sn=fe(v?ve($,An):$,Y,v?X(V,Tn):V);w[S]=Sn,ue[S]=Sn-Y}if(u){var bn,wn=S==="x"?E:P,Ue=S==="x"?R:W,En=w[T],Pn=T==="y"?"height":"width",Mn=En+y[wn],$n=En-y[Ue],$e=[E,P].indexOf(g)!==-1,Et=(bn=A==null?void 0:A[T])!=null?bn:0,On=$e?Mn:En-x[Pn]-L[Pn]-Et+z.altAxis,In=$e?En+x[Pn]+L[Pn]-Et-z.altAxis:$n,Vn=v&&$e?St(On,En,In):fe(v?On:Mn,En,v?In:$n);w[T]=Vn,ue[T]=Vn-En}t.modifiersData[r]=ue}}var xt={name:"preventOverflow",enabled:!0,phase:"main",fn:on,requiresIfExists:["offset"]};function an(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function sn(e){return e===H(e)||!B(e)?We(e):an(e)}function fn(e){var t=e.getBoundingClientRect(),n=Z(t.width)/e.offsetWidth||1,r=Z(t.height)/e.offsetHeight||1;return n!==1||r!==1}function cn(e,t,n){n===void 0&&(n=!1);var r=B(t),i=B(t)&&fn(t),a=I(t),o=ee(e,i),u={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((C(t)!=="body"||Se(a))&&(u=sn(t)),B(t)?(l=ee(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=Be(a))),{x:o.left+u.scrollLeft-l.x,y:o.top+u.scrollTop-l.y,width:o.width,height:o.height}}function pn(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function i(a){n.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(u){if(!n.has(u)){var l=t.get(u);l&&i(l)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||i(a)}),r}function un(e){var t=pn(e);return ot.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function ln(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function dn(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Ot={placement:"bottom",modifiers:[],strategy:"absolute"};function $t(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function we(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?Ot:i;return function(o,u,l){l===void 0&&(l=a);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ot,a),modifiersData:{},elements:{reference:o,popper:u},attributes:{},styles:{}},p=[],d=!1,f={state:c,setOptions:function(m){var y=typeof m=="function"?m(c.options):m;h(),c.options=Object.assign({},a,c.options,y),c.scrollParents={reference:Q(o)?ce(o):o.contextElement?ce(o.contextElement):[],popper:ce(u)};var g=un(dn([].concat(r,c.options.modifiers)));return c.orderedModifiers=g.filter(function(b){return b.enabled}),v(),f.update()},forceUpdate:function(){if(!d){var m=c.elements,y=m.reference,g=m.popper;if($t(y,g)){c.rects={reference:cn(y,se(g),c.options.strategy==="fixed"),popper:ke(g)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(L){return c.modifiersData[L.name]=Object.assign({},L.data)});for(var b=0;b<c.orderedModifiers.length;b++){if(c.reset===!0){c.reset=!1,b=-1;continue}var _=c.orderedModifiers[b],S=_.fn,T=_.options,w=T===void 0?{}:T,x=_.name;typeof S=="function"&&(c=S({state:c,options:w,name:x,instance:f})||c)}}}},update:ln(function(){return new Promise(function(m){f.forceUpdate(),m(c)})}),destroy:function(){h(),d=!0}};if(!$t(o,u))return f;f.setOptions(l).then(function(m){!d&&l.onFirstUpdate&&l.onFirstUpdate(m)});function v(){c.orderedModifiers.forEach(function(m){var y=m.name,g=m.options,b=g===void 0?{}:g,_=m.effect;if(typeof _=="function"){var S=_({state:c,name:y,instance:f,options:b}),T=function(){};p.push(S||T)}})}function h(){p.forEach(function(m){return m()}),p=[]}return f}}we();var mn=[Re,He,Me,Ae];we({defaultModifiers:mn});var gn=[Re,He,Me,Ae,wt,vt,xt,pt,bt],yn=we({defaultModifiers:gn});const popperArrowProps=buildProps({arrowOffset:{type:Number,default:5}}),POSITIONING_STRATEGIES=["fixed","absolute"],popperCoreConfigProps=buildProps({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:definePropType(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:Ee,default:"bottom"},popperOptions:{type:definePropType(Object),default:()=>({})},strategy:{type:String,values:POSITIONING_STRATEGIES,default:"absolute"}}),popperContentProps=buildProps({...popperCoreConfigProps,...popperArrowProps,id:String,style:{type:definePropType([String,Array,Object])},className:{type:definePropType([String,Array,Object])},effect:{type:definePropType(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:definePropType([String,Array,Object])},popperStyle:{type:definePropType([String,Array,Object])},referenceEl:{type:definePropType(Object)},triggerTargetEl:{type:definePropType(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...useAriaProps(["ariaLabel"])}),popperContentEmits={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},usePopperContentFocusTrap=(e,t)=>{const n=vue.ref(!1),r=vue.ref();return{focusStartRef:r,trapped:n,onFocusAfterReleased:c=>{var p;((p=c.detail)==null?void 0:p.focusReason)!=="pointer"&&(r.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:c=>{e.visible&&!n.value&&(c.target&&(r.value=c.target),n.value=!0)},onFocusoutPrevented:c=>{e.trapping||(c.detail.focusReason==="pointer"&&c.preventDefault(),n.value=!1)},onReleaseRequested:()=>{n.value=!1,t("close")}}},buildPopperOptions=(e,t=[])=>{const{placement:n,strategy:r,popperOptions:i}=e,a={placement:n,strategy:r,...i,modifiers:[...genModifiers(e),...t]};return deriveExtraModifiers(a,i==null?void 0:i.modifiers),a},unwrapMeasurableEl=e=>{if(isClient)return unrefElement(e)};function genModifiers(e){const{offset:t,gpuAcceleration:n,fallbackPlacements:r}=e;return[{name:"offset",options:{offset:[0,t??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:r}},{name:"computeStyles",options:{gpuAcceleration:n}}]}function deriveExtraModifiers(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const usePopper=(e,t,n={})=>{const r={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const c=deriveState(l);Object.assign(o.value,c)},requires:["computeStyles"]},i=vue.computed(()=>{const{onFirstUpdate:l,placement:c,strategy:p,modifiers:d}=vue.unref(n);return{onFirstUpdate:l,placement:c||"bottom",strategy:p||"absolute",modifiers:[...d||[],r,{name:"applyStyles",enabled:!1}]}}),a=vue.shallowRef(),o=vue.ref({styles:{popper:{position:vue.unref(i).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),u=()=>{a.value&&(a.value.destroy(),a.value=void 0)};return vue.watch(i,l=>{const c=vue.unref(a);c&&c.setOptions(l)},{deep:!0}),vue.watch([e,t],([l,c])=>{u(),!(!l||!c)&&(a.value=yn(l,c,vue.unref(i)))}),vue.onBeforeUnmount(()=>{u()}),{state:vue.computed(()=>{var l;return{...((l=vue.unref(a))==null?void 0:l.state)||{}}}),styles:vue.computed(()=>vue.unref(o).styles),attributes:vue.computed(()=>vue.unref(o).attributes),update:()=>{var l;return(l=vue.unref(a))==null?void 0:l.update()},forceUpdate:()=>{var l;return(l=vue.unref(a))==null?void 0:l.forceUpdate()},instanceRef:vue.computed(()=>vue.unref(a))}};function deriveState(e){const t=Object.keys(e.elements),n=fromPairs(t.map(i=>[i,e.styles[i]||{}])),r=fromPairs(t.map(i=>[i,e.attributes[i]]));return{styles:n,attributes:r}}const DEFAULT_ARROW_OFFSET=0,usePopperContent=e=>{const{popperInstanceRef:t,contentRef:n,triggerRef:r,role:i}=vue.inject(POPPER_INJECTION_KEY,void 0),a=vue.ref(),o=vue.computed(()=>e.arrowOffset),u=vue.computed(()=>({name:"eventListeners",enabled:!!e.visible})),l=vue.computed(()=>{var g;const b=vue.unref(a),_=(g=vue.unref(o))!=null?g:DEFAULT_ARROW_OFFSET;return{name:"arrow",enabled:!isUndefined$1(b),options:{element:b,padding:_}}}),c=vue.computed(()=>({onFirstUpdate:()=>{h()},...buildPopperOptions(e,[vue.unref(l),vue.unref(u)])})),p=vue.computed(()=>unwrapMeasurableEl(e.referenceEl)||vue.unref(r)),{attributes:d,state:f,styles:v,update:h,forceUpdate:m,instanceRef:y}=usePopper(p,n,c);return vue.watch(y,g=>t.value=g,{flush:"sync"}),vue.onMounted(()=>{vue.watch(()=>{var g;return(g=vue.unref(p))==null?void 0:g.getBoundingClientRect()},()=>{h()})}),{attributes:d,arrowRef:a,contentRef:n,instanceRef:y,state:f,styles:v,role:i,forceUpdate:m,update:h}},usePopperContentDOM=(e,{attributes:t,styles:n,role:r})=>{const{nextZIndex:i}=useZIndex(),a=useNamespace("popper"),o=vue.computed(()=>vue.unref(t).popper),u=vue.ref(isNumber(e.zIndex)?e.zIndex:i()),l=vue.computed(()=>[a.b(),a.is("pure",e.pure),a.is(e.effect),e.popperClass]),c=vue.computed(()=>[{zIndex:vue.unref(u)},vue.unref(n).popper,e.popperStyle||{}]),p=vue.computed(()=>r.value==="dialog"?"false":void 0),d=vue.computed(()=>vue.unref(n).arrow||{});return{ariaModal:p,arrowStyle:d,contentAttrs:o,contentClass:l,contentStyle:c,contentZIndex:u,updateZIndex:()=>{u.value=isNumber(e.zIndex)?e.zIndex:i()}}},__default__$e=vue.defineComponent({name:"ElPopperContent"}),_sfc_main$M=vue.defineComponent({...__default__$e,props:popperContentProps,emits:popperContentEmits,setup(e,{expose:t,emit:n}){const r=e,{focusStartRef:i,trapped:a,onFocusAfterReleased:o,onFocusAfterTrapped:u,onFocusInTrap:l,onFocusoutPrevented:c,onReleaseRequested:p}=usePopperContentFocusTrap(r,n),{attributes:d,arrowRef:f,contentRef:v,styles:h,instanceRef:m,role:y,update:g}=usePopperContent(r),{ariaModal:b,arrowStyle:_,contentAttrs:S,contentClass:T,contentStyle:w,updateZIndex:x}=usePopperContentDOM(r,{styles:h,attributes:d,role:y}),L=vue.inject(formItemContextKey,void 0);vue.provide(POPPER_CONTENT_INJECTION_KEY,{arrowStyle:_,arrowRef:f}),L&&vue.provide(formItemContextKey,{...L,addInputId:NOOP,removeInputId:NOOP});let M;const z=(ue=!0)=>{g(),ue&&x()},A=()=>{z(!1),r.visible&&r.focusOnShow?a.value=!0:r.visible===!1&&(a.value=!1)};return vue.onMounted(()=>{vue.watch(()=>r.triggerTargetEl,(ue,he)=>{M==null||M(),M=void 0;const j=vue.unref(ue||v.value),O=vue.unref(he||v.value);isElement(j)&&(M=vue.watch([y,()=>r.ariaLabel,b,()=>r.id],F=>{["role","aria-label","aria-modal","id"].forEach((Y,$)=>{isNil(F[$])?j.removeAttribute(Y):j.setAttribute(Y,F[$])})},{immediate:!0})),O!==j&&isElement(O)&&["role","aria-label","aria-modal","id"].forEach(F=>{O.removeAttribute(F)})},{immediate:!0}),vue.watch(()=>r.visible,A,{immediate:!0})}),vue.onBeforeUnmount(()=>{M==null||M(),M=void 0}),t({popperContentRef:v,popperInstanceRef:m,updatePopper:z,contentStyle:w}),(ue,he)=>(vue.openBlock(),vue.createElementBlock("div",vue.mergeProps({ref_key:"contentRef",ref:v},vue.unref(S),{style:vue.unref(w),class:vue.unref(T),tabindex:"-1",onMouseenter:j=>ue.$emit("mouseenter",j),onMouseleave:j=>ue.$emit("mouseleave",j)}),[vue.createVNode(vue.unref(ElFocusTrap),{trapped:vue.unref(a),"trap-on-focus-in":!0,"focus-trap-el":vue.unref(v),"focus-start-el":vue.unref(i),onFocusAfterTrapped:vue.unref(u),onFocusAfterReleased:vue.unref(o),onFocusin:vue.unref(l),onFocusoutPrevented:vue.unref(c),onReleaseRequested:vue.unref(p)},{default:vue.withCtx(()=>[vue.renderSlot(ue.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var ElPopperContent=_export_sfc$1(_sfc_main$M,[["__file","content.vue"]]);const ElPopper=withInstall(Popper),TOOLTIP_INJECTION_KEY=Symbol("elTooltip"),teleportProps=buildProps({to:{type:definePropType([String,Object]),required:!0},disabled:Boolean}),useTooltipContentProps=buildProps({...useDelayedToggleProps,...popperContentProps,appendTo:{type:teleportProps.to.type},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:definePropType(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...useAriaProps(["ariaLabel"])}),useTooltipTriggerProps=buildProps({...popperTriggerProps,disabled:Boolean,trigger:{type:definePropType([String,Array]),default:"hover"},triggerKeys:{type:definePropType(Array),default:()=>[EVENT_CODE.enter,EVENT_CODE.numpadEnter,EVENT_CODE.space]}}),_prop=buildProp({type:definePropType(Boolean),default:null}),_event=buildProp({type:definePropType(Function)}),createModelToggleComposable=e=>{const t=`update:${e}`,n=`onUpdate:${e}`,r=[t],i={[e]:_prop,[n]:_event};return{useModelToggle:({indicator:o,toggleReason:u,shouldHideWhenRouteChanges:l,shouldProceed:c,onShow:p,onHide:d})=>{const f=vue.getCurrentInstance(),{emit:v}=f,h=f.props,m=vue.computed(()=>isFunction$1(h[n])),y=vue.computed(()=>h[e]===null),g=x=>{o.value!==!0&&(o.value=!0,u&&(u.value=x),isFunction$1(p)&&p(x))},b=x=>{o.value!==!1&&(o.value=!1,u&&(u.value=x),isFunction$1(d)&&d(x))},_=x=>{if(h.disabled===!0||isFunction$1(c)&&!c())return;const L=m.value&&isClient;L&&v(t,!0),(y.value||!L)&&g(x)},S=x=>{if(h.disabled===!0||!isClient)return;const L=m.value&&isClient;L&&v(t,!1),(y.value||!L)&&b(x)},T=x=>{isBoolean(x)&&(h.disabled&&x?m.value&&v(t,!1):o.value!==x&&(x?g():b()))},w=()=>{o.value?S():_()};return vue.watch(()=>h[e],T),l&&f.appContext.config.globalProperties.$route!==void 0&&vue.watch(()=>({...f.proxy.$route}),()=>{l.value&&o.value&&S()}),vue.onMounted(()=>{T(h[e])}),{hide:S,show:_,toggle:w,hasUpdateHandler:m}},useModelToggleProps:i,useModelToggleEmits:r}},{useModelToggleProps:useTooltipModelToggleProps,useModelToggleEmits:useTooltipModelToggleEmits,useModelToggle:useTooltipModelToggle}=createModelToggleComposable("visible"),useTooltipProps=buildProps({...popperProps,...useTooltipModelToggleProps,...useTooltipContentProps,...useTooltipTriggerProps,...popperArrowProps,showArrow:{type:Boolean,default:!0}}),tooltipEmits=[...useTooltipModelToggleEmits,"before-show","before-hide","show","hide","open","close"],isTriggerType=(e,t)=>isArray$1(e)?e.includes(t):e===t,whenTrigger=(e,t,n)=>r=>{isTriggerType(vue.unref(e),t)&&n(r)},composeEventHandlers=(e,t,{checkForDefaultPrevented:n=!0}={})=>i=>{const a=e==null?void 0:e(i);if(n===!1||!a)return t==null?void 0:t(i)},__default__$d=vue.defineComponent({name:"ElTooltipTrigger"}),_sfc_main$L=vue.defineComponent({...__default__$d,props:useTooltipTriggerProps,setup(e,{expose:t}){const n=e,r=useNamespace("tooltip"),{controlled:i,id:a,open:o,onOpen:u,onClose:l,onToggle:c}=vue.inject(TOOLTIP_INJECTION_KEY,void 0),p=vue.ref(null),d=()=>{if(vue.unref(i)||n.disabled)return!0},f=vue.toRef(n,"trigger"),v=composeEventHandlers(d,whenTrigger(f,"hover",u)),h=composeEventHandlers(d,whenTrigger(f,"hover",l)),m=composeEventHandlers(d,whenTrigger(f,"click",S=>{S.button===0&&c(S)})),y=composeEventHandlers(d,whenTrigger(f,"focus",u)),g=composeEventHandlers(d,whenTrigger(f,"focus",l)),b=composeEventHandlers(d,whenTrigger(f,"contextmenu",S=>{S.preventDefault(),c(S)})),_=composeEventHandlers(d,S=>{const{code:T}=S;n.triggerKeys.includes(T)&&(S.preventDefault(),c(S))});return t({triggerRef:p}),(S,T)=>(vue.openBlock(),vue.createBlock(vue.unref(ElPopperTrigger),{id:vue.unref(a),"virtual-ref":S.virtualRef,open:vue.unref(o),"virtual-triggering":S.virtualTriggering,class:vue.normalizeClass(vue.unref(r).e("trigger")),onBlur:vue.unref(g),onClick:vue.unref(m),onContextmenu:vue.unref(b),onFocus:vue.unref(y),onMouseenter:vue.unref(v),onMouseleave:vue.unref(h),onKeydown:vue.unref(_)},{default:vue.withCtx(()=>[vue.renderSlot(S.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var ElTooltipTrigger=_export_sfc$1(_sfc_main$L,[["__file","trigger.vue"]]);const _sfc_main$K=vue.defineComponent({__name:"teleport",props:teleportProps,setup(e){return(t,n)=>t.disabled?vue.renderSlot(t.$slots,"default",{key:0}):(vue.openBlock(),vue.createBlock(vue.Teleport,{key:1,to:t.to},[vue.renderSlot(t.$slots,"default")],8,["to"]))}});var Teleport=_export_sfc$1(_sfc_main$K,[["__file","teleport.vue"]]);const ElTeleport=withInstall(Teleport),usePopperContainerId=()=>{const e=useGetDerivedNamespace(),t=useIdInjection(),n=vue.computed(()=>`${e.value}-popper-container-${t.prefix}`),r=vue.computed(()=>`#${n.value}`);return{id:n,selector:r}},createContainer=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},usePopperContainer=()=>{const{id:e,selector:t}=usePopperContainerId();return vue.onBeforeMount(()=>{isClient&&(process.env.NODE_ENV==="test"||!document.body.querySelector(t.value))&&createContainer(e.value)}),{id:e,selector:t}},__default__$c=vue.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),_sfc_main$J=vue.defineComponent({...__default__$c,props:useTooltipContentProps,setup(e,{expose:t}){const n=e,{selector:r}=usePopperContainerId(),i=useNamespace("tooltip"),a=vue.ref(),o=computedEager(()=>{var $;return($=a.value)==null?void 0:$.popperContentRef});let u;const{controlled:l,id:c,open:p,trigger:d,onClose:f,onOpen:v,onShow:h,onHide:m,onBeforeShow:y,onBeforeHide:g}=vue.inject(TOOLTIP_INJECTION_KEY,void 0),b=vue.computed(()=>n.transition||`${i.namespace.value}-fade-in-linear`),_=vue.computed(()=>process.env.NODE_ENV==="test"&&!process.env.RUN_TEST_WITH_PERSISTENT?!0:n.persistent);vue.onBeforeUnmount(()=>{u==null||u()});const S=vue.computed(()=>vue.unref(_)?!0:vue.unref(p)),T=vue.computed(()=>n.disabled?!1:vue.unref(p)),w=vue.computed(()=>n.appendTo||r.value),x=vue.computed(()=>{var $;return($=n.style)!=null?$:{}}),L=vue.ref(!0),M=()=>{m(),Y()&&tryFocus(document.body),L.value=!0},z=()=>{if(vue.unref(l))return!0},A=composeEventHandlers(z,()=>{n.enterable&&vue.unref(d)==="hover"&&v()}),ue=composeEventHandlers(z,()=>{vue.unref(d)==="hover"&&f()}),he=()=>{var $,V;(V=($=a.value)==null?void 0:$.updatePopper)==null||V.call($),y==null||y()},j=()=>{g==null||g()},O=()=>{h()},F=()=>{n.virtualTriggering||f()},Y=$=>{var V;const ie=(V=a.value)==null?void 0:V.popperContentRef,re=($==null?void 0:$.relatedTarget)||document.activeElement;return ie==null?void 0:ie.contains(re)};return vue.watch(()=>vue.unref(p),$=>{$?(L.value=!1,u=onClickOutside(o,()=>{if(vue.unref(l))return;vue.unref(d)!=="hover"&&f()})):u==null||u()},{flush:"post"}),vue.watch(()=>n.content,()=>{var $,V;(V=($=a.value)==null?void 0:$.updatePopper)==null||V.call($)}),t({contentRef:a,isFocusInsideContent:Y}),($,V)=>(vue.openBlock(),vue.createBlock(vue.unref(ElTeleport),{disabled:!$.teleported,to:vue.unref(w)},{default:vue.withCtx(()=>[vue.createVNode(vue.Transition,{name:vue.unref(b),onAfterLeave:M,onBeforeEnter:he,onAfterEnter:O,onBeforeLeave:j},{default:vue.withCtx(()=>[vue.unref(S)?vue.withDirectives((vue.openBlock(),vue.createBlock(vue.unref(ElPopperContent),vue.mergeProps({key:0,id:vue.unref(c),ref_key:"contentRef",ref:a},$.$attrs,{"aria-label":$.ariaLabel,"aria-hidden":L.value,"boundaries-padding":$.boundariesPadding,"fallback-placements":$.fallbackPlacements,"gpu-acceleration":$.gpuAcceleration,offset:$.offset,placement:$.placement,"popper-options":$.popperOptions,"arrow-offset":$.arrowOffset,strategy:$.strategy,effect:$.effect,enterable:$.enterable,pure:$.pure,"popper-class":$.popperClass,"popper-style":[$.popperStyle,vue.unref(x)],"reference-el":$.referenceEl,"trigger-target-el":$.triggerTargetEl,visible:vue.unref(T),"z-index":$.zIndex,onMouseenter:vue.unref(A),onMouseleave:vue.unref(ue),onBlur:F,onClose:vue.unref(f)}),{default:vue.withCtx(()=>[vue.renderSlot($.$slots,"default")]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","arrow-offset","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[vue.vShow,vue.unref(T)]]):vue.createCommentVNode("v-if",!0)]),_:3},8,["name"])]),_:3},8,["disabled","to"]))}});var ElTooltipContent=_export_sfc$1(_sfc_main$J,[["__file","content.vue"]]);const __default__$b=vue.defineComponent({name:"ElTooltip"}),_sfc_main$I=vue.defineComponent({...__default__$b,props:useTooltipProps,emits:tooltipEmits,setup(e,{expose:t,emit:n}){const r=e;usePopperContainer();const i=useNamespace("tooltip"),a=useId(),o=vue.ref(),u=vue.ref(),l=()=>{var _;const S=vue.unref(o);S&&((_=S.popperInstanceRef)==null||_.update())},c=vue.ref(!1),p=vue.ref(),{show:d,hide:f,hasUpdateHandler:v}=useTooltipModelToggle({indicator:c,toggleReason:p}),{onOpen:h,onClose:m}=useDelayedToggle({showAfter:vue.toRef(r,"showAfter"),hideAfter:vue.toRef(r,"hideAfter"),autoClose:vue.toRef(r,"autoClose"),open:d,close:f}),y=vue.computed(()=>isBoolean(r.visible)&&!v.value),g=vue.computed(()=>[i.b(),r.popperClass]);vue.provide(TOOLTIP_INJECTION_KEY,{controlled:y,id:a,open:vue.readonly(c),trigger:vue.toRef(r,"trigger"),onOpen:_=>{h(_)},onClose:_=>{m(_)},onToggle:_=>{vue.unref(c)?m(_):h(_)},onShow:()=>{n("show",p.value)},onHide:()=>{n("hide",p.value)},onBeforeShow:()=>{n("before-show",p.value)},onBeforeHide:()=>{n("before-hide",p.value)},updatePopper:l}),vue.watch(()=>r.disabled,_=>{_&&c.value&&(c.value=!1)});const b=_=>{var S;return(S=u.value)==null?void 0:S.isFocusInsideContent(_)};return vue.onDeactivated(()=>c.value&&f()),t({popperRef:o,contentRef:u,isFocusInsideContent:b,updatePopper:l,onOpen:h,onClose:m,hide:f}),(_,S)=>(vue.openBlock(),vue.createBlock(vue.unref(ElPopper),{ref_key:"popperRef",ref:o,role:_.role},{default:vue.withCtx(()=>[vue.createVNode(ElTooltipTrigger,{disabled:_.disabled,trigger:_.trigger,"trigger-keys":_.triggerKeys,"virtual-ref":_.virtualRef,"virtual-triggering":_.virtualTriggering},{default:vue.withCtx(()=>[_.$slots.default?vue.renderSlot(_.$slots,"default",{key:0}):vue.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),vue.createVNode(ElTooltipContent,{ref_key:"contentRef",ref:u,"aria-label":_.ariaLabel,"boundaries-padding":_.boundariesPadding,content:_.content,disabled:_.disabled,effect:_.effect,enterable:_.enterable,"fallback-placements":_.fallbackPlacements,"hide-after":_.hideAfter,"gpu-acceleration":_.gpuAcceleration,offset:_.offset,persistent:_.persistent,"popper-class":vue.unref(g),"popper-style":_.popperStyle,placement:_.placement,"popper-options":_.popperOptions,"arrow-offset":_.arrowOffset,pure:_.pure,"raw-content":_.rawContent,"reference-el":_.referenceEl,"trigger-target-el":_.triggerTargetEl,"show-after":_.showAfter,strategy:_.strategy,teleported:_.teleported,transition:_.transition,"virtual-triggering":_.virtualTriggering,"z-index":_.zIndex,"append-to":_.appendTo},{default:vue.withCtx(()=>[vue.renderSlot(_.$slots,"content",{},()=>[_.rawContent?(vue.openBlock(),vue.createElementBlock("span",{key:0,innerHTML:_.content},null,8,["innerHTML"])):(vue.openBlock(),vue.createElementBlock("span",{key:1},vue.toDisplayString(_.content),1))]),_.showArrow?(vue.openBlock(),vue.createBlock(vue.unref(ElPopperArrow),{key:0})):vue.createCommentVNode("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","arrow-offset","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var Tooltip=_export_sfc$1(_sfc_main$I,[["__file","tooltip.vue"]]);const ElTooltip=withInstall(Tooltip),buttonGroupContextKey=Symbol("buttonGroupContextKey"),useDeprecated=({from:e,replacement:t,scope:n,version:r,ref:i,type:a="API"},o)=>{vue.watch(()=>vue.unref(o),u=>{u&&debugWarn(n,`[${a}] ${e} is about to be deprecated in version ${r}, please use ${t} instead.
11
11
  For more detail, please visit: ${i}
12
- `)},{immediate:!0})},useButton=(e,t)=>{useDeprecated({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},vue.computed(()=>e.type==="text"));const n=vue.inject(buttonGroupContextKey,void 0),r=useGlobalConfig("button"),{form:i}=useFormItem(),a=useFormSize(vue.computed(()=>n==null?void 0:n.size)),o=useFormDisabled(),u=vue.ref(),l=vue.useSlots(),c=vue.computed(()=>{var y;return e.type||(n==null?void 0:n.type)||((y=r.value)==null?void 0:y.type)||""}),p=vue.computed(()=>{var y,g,b;return(b=(g=e.autoInsertSpace)!=null?g:(y=r.value)==null?void 0:y.autoInsertSpace)!=null?b:!1}),d=vue.computed(()=>{var y,g,b;return(b=(g=e.plain)!=null?g:(y=r.value)==null?void 0:y.plain)!=null?b:!1}),f=vue.computed(()=>{var y,g,b;return(b=(g=e.round)!=null?g:(y=r.value)==null?void 0:y.round)!=null?b:!1}),v=vue.computed(()=>e.tag==="button"?{ariaDisabled:o.value||e.loading,disabled:o.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),h=vue.computed(()=>{var y;const g=(y=l.default)==null?void 0:y.call(l);if(p.value&&(g==null?void 0:g.length)===1){const b=g[0];if((b==null?void 0:b.type)===vue.Text){const _=b.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(_.trim())}}return!1});return{_disabled:o,_size:a,_type:c,_ref:u,_props:v,_plain:d,_round:f,shouldAddSpace:h,handleClick:y=>{if(o.value||e.loading){y.stopPropagation();return}e.nativeType==="reset"&&(i==null||i.resetFields()),t("click",y)}}},buttonTypes=["default","primary","success","warning","info","danger","text",""],buttonNativeTypes=["button","submit","reset"],buttonProps=buildProps({size:useSizeProp,disabled:Boolean,type:{type:String,values:buttonTypes,default:""},icon:{type:iconPropType},nativeType:{type:String,values:buttonNativeTypes,default:"button"},loading:Boolean,loadingIcon:{type:iconPropType,default:()=>loading_default},plain:{type:Boolean,default:void 0},text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:definePropType([String,Object]),default:"button"}}),buttonEmits={click:e=>e instanceof MouseEvent};function bound01(e,t){isOnePointZero(e)&&(e="100%");var n=isPercentage(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function clamp01(e){return Math.min(1,Math.max(0,e))}function isOnePointZero(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function isPercentage(e){return typeof e=="string"&&e.indexOf("%")!==-1}function boundAlpha(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function convertToPercentage(e){return e<=1?"".concat(Number(e)*100,"%"):e}function pad2(e){return e.length===1?"0"+e:String(e)}function rgbToRgb(e,t,n){return{r:bound01(e,255)*255,g:bound01(t,255)*255,b:bound01(n,255)*255}}function rgbToHsl(e,t,n){e=bound01(e,255),t=bound01(t,255),n=bound01(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a=0,o=0,u=(r+i)/2;if(r===i)o=0,a=0;else{var l=r-i;switch(o=u>.5?l/(2-r-i):l/(r+i),r){case e:a=(t-n)/l+(t<n?6:0);break;case t:a=(n-e)/l+2;break;case n:a=(e-t)/l+4;break}a/=6}return{h:a,s:o,l:u}}function hue2rgb(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hslToRgb(e,t,n){var r,i,a;if(e=bound01(e,360),t=bound01(t,100),n=bound01(n,100),t===0)i=n,a=n,r=n;else{var o=n<.5?n*(1+t):n+t-n*t,u=2*n-o;r=hue2rgb(u,o,e+1/3),i=hue2rgb(u,o,e),a=hue2rgb(u,o,e-1/3)}return{r:r*255,g:i*255,b:a*255}}function rgbToHsv(e,t,n){e=bound01(e,255),t=bound01(t,255),n=bound01(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a=0,o=r,u=r-i,l=r===0?0:u/r;if(r===i)a=0;else{switch(r){case e:a=(t-n)/u+(t<n?6:0);break;case t:a=(n-e)/u+2;break;case n:a=(e-t)/u+4;break}a/=6}return{h:a,s:l,v:o}}function hsvToRgb(e,t,n){e=bound01(e,360)*6,t=bound01(t,100),n=bound01(n,100);var r=Math.floor(e),i=e-r,a=n*(1-t),o=n*(1-i*t),u=n*(1-(1-i)*t),l=r%6,c=[n,o,a,a,u,n][l],p=[u,n,n,o,a,a][l],d=[a,a,u,n,n,o][l];return{r:c*255,g:p*255,b:d*255}}function rgbToHex(e,t,n,r){var i=[pad2(Math.round(e).toString(16)),pad2(Math.round(t).toString(16)),pad2(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function rgbaToHex(e,t,n,r,i){var a=[pad2(Math.round(e).toString(16)),pad2(Math.round(t).toString(16)),pad2(Math.round(n).toString(16)),pad2(convertDecimalToHex(r))];return i&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function convertDecimalToHex(e){return Math.round(parseFloat(e)*255).toString(16)}function convertHexToDecimal(e){return parseIntFromHex(e)/255}function parseIntFromHex(e){return parseInt(e,16)}function numberInputToObject(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var names={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function inputToRGB(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,o=!1,u=!1;return typeof e=="string"&&(e=stringInputToObject(e)),typeof e=="object"&&(isValidCSSUnit(e.r)&&isValidCSSUnit(e.g)&&isValidCSSUnit(e.b)?(t=rgbToRgb(e.r,e.g,e.b),o=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):isValidCSSUnit(e.h)&&isValidCSSUnit(e.s)&&isValidCSSUnit(e.v)?(r=convertToPercentage(e.s),i=convertToPercentage(e.v),t=hsvToRgb(e.h,r,i),o=!0,u="hsv"):isValidCSSUnit(e.h)&&isValidCSSUnit(e.s)&&isValidCSSUnit(e.l)&&(r=convertToPercentage(e.s),a=convertToPercentage(e.l),t=hslToRgb(e.h,r,a),o=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=boundAlpha(n),{ok:o,format:e.format||u,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var CSS_INTEGER="[-\\+]?\\d+%?",CSS_NUMBER="[-\\+]?\\d*\\.\\d+%?",CSS_UNIT="(?:".concat(CSS_NUMBER,")|(?:").concat(CSS_INTEGER,")"),PERMISSIVE_MATCH3="[\\s|\\(]+(".concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")\\s*\\)?"),PERMISSIVE_MATCH4="[\\s|\\(]+(".concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")\\s*\\)?"),matchers={CSS_UNIT:new RegExp(CSS_UNIT),rgb:new RegExp("rgb"+PERMISSIVE_MATCH3),rgba:new RegExp("rgba"+PERMISSIVE_MATCH4),hsl:new RegExp("hsl"+PERMISSIVE_MATCH3),hsla:new RegExp("hsla"+PERMISSIVE_MATCH4),hsv:new RegExp("hsv"+PERMISSIVE_MATCH3),hsva:new RegExp("hsva"+PERMISSIVE_MATCH4),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function stringInputToObject(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(names[e])e=names[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=matchers.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=matchers.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=matchers.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=matchers.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=matchers.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=matchers.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=matchers.hex8.exec(e),n?{r:parseIntFromHex(n[1]),g:parseIntFromHex(n[2]),b:parseIntFromHex(n[3]),a:convertHexToDecimal(n[4]),format:t?"name":"hex8"}:(n=matchers.hex6.exec(e),n?{r:parseIntFromHex(n[1]),g:parseIntFromHex(n[2]),b:parseIntFromHex(n[3]),format:t?"name":"hex"}:(n=matchers.hex4.exec(e),n?{r:parseIntFromHex(n[1]+n[1]),g:parseIntFromHex(n[2]+n[2]),b:parseIntFromHex(n[3]+n[3]),a:convertHexToDecimal(n[4]+n[4]),format:t?"name":"hex8"}:(n=matchers.hex3.exec(e),n?{r:parseIntFromHex(n[1]+n[1]),g:parseIntFromHex(n[2]+n[2]),b:parseIntFromHex(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function isValidCSSUnit(e){return!!matchers.CSS_UNIT.exec(String(e))}var TinyColor=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=numberInputToObject(t)),this.originalInput=t;var i=inputToRGB(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,a=t.r/255,o=t.g/255,u=t.b/255;return a<=.03928?n=a/12.92:n=Math.pow((a+.055)/1.055,2.4),o<=.03928?r=o/12.92:r=Math.pow((o+.055)/1.055,2.4),u<=.03928?i=u/12.92:i=Math.pow((u+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=boundAlpha(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=rgbToHsv(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=rgbToHsv(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=rgbToHsl(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=rgbToHsl(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),rgbToHex(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),rgbaToHex(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(bound01(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(bound01(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+rgbToHex(this.r,this.g,this.b,!1),n=0,r=Object.entries(names);n<r.length;n++){var i=r[n],a=i[0],o=i[1];if(t===o)return a}return!1},e.prototype.toString=function(t){var n=!!t;t=t??this.format;var r=!1,i=this.a<1&&this.a>=0,a=!n&&i&&(t.startsWith("hex")||t==="name");return a?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=clamp01(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=clamp01(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=clamp01(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=clamp01(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),a=n/100,o={r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a};return new e(o)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,a=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(new e(r));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,a=n.v,o=[],u=1/t;t--;)o.push(new e({h:r,s:i,v:a})),a=(a+u)%1;return o},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),i=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],a=360/t,o=1;o<t;o++)i.push(new e({h:(r+o*a)%360,s:n.s,l:n.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function darken(e,t=20){return e.mix("#141414",t).toString()}function useButtonCustomStyle(e){const t=useFormDisabled(),n=useNamespace("button");return vue.computed(()=>{let r={},i=e.color;if(i){const a=i.match(/var\((.*?)\)/);a&&(i=window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));const o=new TinyColor(i),u=e.dark?o.tint(20).toString():darken(o,20);if(e.plain)r=n.cssVarBlock({"bg-color":e.dark?darken(o,90):o.tint(90).toString(),"text-color":i,"border-color":e.dark?darken(o,50):o.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":i,"hover-border-color":i,"active-bg-color":u,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":u}),t.value&&(r[n.cssVarBlockName("disabled-bg-color")]=e.dark?darken(o,90):o.tint(90).toString(),r[n.cssVarBlockName("disabled-text-color")]=e.dark?darken(o,50):o.tint(50).toString(),r[n.cssVarBlockName("disabled-border-color")]=e.dark?darken(o,80):o.tint(80).toString());else{const l=e.dark?darken(o,30):o.tint(30).toString(),c=o.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(r=n.cssVarBlock({"bg-color":i,"text-color":c,"border-color":i,"hover-bg-color":l,"hover-text-color":c,"hover-border-color":l,"active-bg-color":u,"active-border-color":u}),t.value){const p=e.dark?darken(o,50):o.tint(50).toString();r[n.cssVarBlockName("disabled-bg-color")]=p,r[n.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,r[n.cssVarBlockName("disabled-border-color")]=p}}}return r})}const __default__$a=vue.defineComponent({name:"ElButton"}),_sfc_main$H=vue.defineComponent({...__default__$a,props:buttonProps,emits:buttonEmits,setup(e,{expose:t,emit:n}){const r=e,i=useButtonCustomStyle(r),a=useNamespace("button"),{_ref:o,_size:u,_type:l,_disabled:c,_props:p,_plain:d,_round:f,shouldAddSpace:v,handleClick:h}=useButton(r,n),m=vue.computed(()=>[a.b(),a.m(l.value),a.m(u.value),a.is("disabled",c.value),a.is("loading",r.loading),a.is("plain",d.value),a.is("round",f.value),a.is("circle",r.circle),a.is("text",r.text),a.is("link",r.link),a.is("has-bg",r.bg)]);return t({ref:o,size:u,type:l,disabled:c,shouldAddSpace:v}),(y,g)=>(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(y.tag),vue.mergeProps({ref_key:"_ref",ref:o},vue.unref(p),{class:vue.unref(m),style:vue.unref(i),onClick:vue.unref(h)}),{default:vue.withCtx(()=>[y.loading?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[y.$slots.loading?vue.renderSlot(y.$slots,"loading",{key:0}):(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:1,class:vue.normalizeClass(vue.unref(a).is("loading"))},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(y.loadingIcon)))]),_:1},8,["class"]))],64)):y.icon||y.$slots.icon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:1},{default:vue.withCtx(()=>[y.icon?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(y.icon),{key:0})):vue.renderSlot(y.$slots,"icon",{key:1})]),_:3})):vue.createCommentVNode("v-if",!0),y.$slots.default?(vue.openBlock(),vue.createElementBlock("span",{key:2,class:vue.normalizeClass({[vue.unref(a).em("text","expand")]:vue.unref(v)})},[vue.renderSlot(y.$slots,"default")],2)):vue.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var Button=_export_sfc$1(_sfc_main$H,[["__file","button.vue"]]);const buttonGroupProps={size:buttonProps.size,type:buttonProps.type},__default__$9=vue.defineComponent({name:"ElButtonGroup"}),_sfc_main$G=vue.defineComponent({...__default__$9,props:buttonGroupProps,setup(e){const t=e;vue.provide(buttonGroupContextKey,vue.reactive({size:vue.toRef(t,"size"),type:vue.toRef(t,"type")}));const n=useNamespace("button");return(r,i)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(vue.unref(n).b("group"))},[vue.renderSlot(r.$slots,"default")],2))}});var ButtonGroup=_export_sfc$1(_sfc_main$G,[["__file","button-group.vue"]]);const ElButton=withInstall(Button,{ButtonGroup}),ElButtonGroup=withNoopInstall(ButtonGroup);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dayjs_min$1={exports:{}},dayjs_min=dayjs_min$1.exports,hasRequiredDayjs_min;function requireDayjs_min(){return hasRequiredDayjs_min||(hasRequiredDayjs_min=1,function(e,t){(function(n,r){e.exports=r()})(dayjs_min,function(){var n=1e3,r=6e4,i=36e5,a="millisecond",o="second",u="minute",l="hour",c="day",p="week",d="month",f="quarter",v="year",h="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(j){var O=["th","st","nd","rd"],F=j%100;return"["+j+(O[(F-20)%10]||O[F]||O[0])+"]"}},_=function(j,O,F){var Y=String(j);return!Y||Y.length>=O?j:""+Array(O+1-Y.length).join(F)+j},S={s:_,z:function(j){var O=-j.utcOffset(),F=Math.abs(O),Y=Math.floor(F/60),$=F%60;return(O<=0?"+":"-")+_(Y,2,"0")+":"+_($,2,"0")},m:function j(O,F){if(O.date()<F.date())return-j(F,O);var Y=12*(F.year()-O.year())+(F.month()-O.month()),$=O.clone().add(Y,d),V=F-$<0,ie=O.clone().add(Y+(V?-1:1),d);return+(-(Y+(F-$)/(V?$-ie:ie-$))||0)},a:function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},p:function(j){return{M:d,y:v,w:p,d:c,D:h,h:l,m:u,s:o,ms:a,Q:f}[j]||String(j||"").toLowerCase().replace(/s$/,"")},u:function(j){return j===void 0}},T="en",w={};w[T]=b;var x="$isDayjsObject",L=function(j){return j instanceof ue||!(!j||!j[x])},M=function j(O,F,Y){var $;if(!O)return T;if(typeof O=="string"){var V=O.toLowerCase();w[V]&&($=V),F&&(w[V]=F,$=V);var ie=O.split("-");if(!$&&ie.length>1)return j(ie[0])}else{var re=O.name;w[re]=O,$=re}return!Y&&$&&(T=$),$||!Y&&T},z=function(j,O){if(L(j))return j.clone();var F=typeof O=="object"?O:{};return F.date=j,F.args=arguments,new ue(F)},A=S;A.l=M,A.i=L,A.w=function(j,O){return z(j,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var ue=function(){function j(F){this.$L=M(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[x]=!0}var O=j.prototype;return O.parse=function(F){this.$d=function(Y){var $=Y.date,V=Y.utc;if($===null)return new Date(NaN);if(A.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var ie=$.match(y);if(ie){var re=ie[2]-1||0,ae=(ie[7]||"0").substring(0,3);return V?new Date(Date.UTC(ie[1],re,ie[3]||1,ie[4]||0,ie[5]||0,ie[6]||0,ae)):new Date(ie[1],re,ie[3]||1,ie[4]||0,ie[5]||0,ie[6]||0,ae)}}return new Date($)}(F),this.init()},O.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},O.$utils=function(){return A},O.isValid=function(){return this.$d.toString()!==m},O.isSame=function(F,Y){var $=z(F);return this.startOf(Y)<=$&&$<=this.endOf(Y)},O.isAfter=function(F,Y){return z(F)<this.startOf(Y)},O.isBefore=function(F,Y){return this.endOf(Y)<z(F)},O.$g=function(F,Y,$){return A.u(F)?this[Y]:this.set($,F)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(F,Y){var $=this,V=!!A.u(Y)||Y,ie=A.p(F),re=function(At,Dt){var Lt=A.w($.$u?Date.UTC($.$y,Dt,At):new Date($.$y,Dt,At),$);return V?Lt:Lt.endOf(c)},ae=function(At,Dt){return A.w($.toDate()[At].apply($.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(Dt)),$)},le=this.$W,_e=this.$M,Oe=this.$D,Ce="set"+(this.$u?"UTC":"");switch(ie){case v:return V?re(1,0):re(31,11);case d:return V?re(1,_e):re(0,_e+1);case p:var xe=this.$locale().weekStart||0,Fe=(le<xe?le+7:le)-xe;return re(V?Oe-Fe:Oe+(6-Fe),_e);case c:case h:return ae(Ce+"Hours",0);case l:return ae(Ce+"Minutes",1);case u:return ae(Ce+"Seconds",2);case o:return ae(Ce+"Milliseconds",3);default:return this.clone()}},O.endOf=function(F){return this.startOf(F,!1)},O.$set=function(F,Y){var $,V=A.p(F),ie="set"+(this.$u?"UTC":""),re=($={},$[c]=ie+"Date",$[h]=ie+"Date",$[d]=ie+"Month",$[v]=ie+"FullYear",$[l]=ie+"Hours",$[u]=ie+"Minutes",$[o]=ie+"Seconds",$[a]=ie+"Milliseconds",$)[V],ae=V===c?this.$D+(Y-this.$W):Y;if(V===d||V===v){var le=this.clone().set(h,1);le.$d[re](ae),le.init(),this.$d=le.set(h,Math.min(this.$D,le.daysInMonth())).$d}else re&&this.$d[re](ae);return this.init(),this},O.set=function(F,Y){return this.clone().$set(F,Y)},O.get=function(F){return this[A.p(F)]()},O.add=function(F,Y){var $,V=this;F=Number(F);var ie=A.p(Y),re=function(_e){var Oe=z(V);return A.w(Oe.date(Oe.date()+Math.round(_e*F)),V)};if(ie===d)return this.set(d,this.$M+F);if(ie===v)return this.set(v,this.$y+F);if(ie===c)return re(1);if(ie===p)return re(7);var ae=($={},$[u]=r,$[l]=i,$[o]=n,$)[ie]||1,le=this.$d.getTime()+F*ae;return A.w(le,this)},O.subtract=function(F,Y){return this.add(-1*F,Y)},O.format=function(F){var Y=this,$=this.$locale();if(!this.isValid())return $.invalidDate||m;var V=F||"YYYY-MM-DDTHH:mm:ssZ",ie=A.z(this),re=this.$H,ae=this.$m,le=this.$M,_e=$.weekdays,Oe=$.months,Ce=$.meridiem,xe=function(Dt,Lt,_n,Cn){return Dt&&(Dt[Lt]||Dt(Y,V))||_n[Lt].slice(0,Cn)},Fe=function(Dt){return A.s(re%12||12,Dt,"0")},At=Ce||function(Dt,Lt,_n){var Cn=Dt<12?"AM":"PM";return _n?Cn.toLowerCase():Cn};return V.replace(g,function(Dt,Lt){return Lt||function(_n){switch(_n){case"YY":return String(Y.$y).slice(-2);case"YYYY":return A.s(Y.$y,4,"0");case"M":return le+1;case"MM":return A.s(le+1,2,"0");case"MMM":return xe($.monthsShort,le,Oe,3);case"MMMM":return xe(Oe,le);case"D":return Y.$D;case"DD":return A.s(Y.$D,2,"0");case"d":return String(Y.$W);case"dd":return xe($.weekdaysMin,Y.$W,_e,2);case"ddd":return xe($.weekdaysShort,Y.$W,_e,3);case"dddd":return _e[Y.$W];case"H":return String(re);case"HH":return A.s(re,2,"0");case"h":return Fe(1);case"hh":return Fe(2);case"a":return At(re,ae,!0);case"A":return At(re,ae,!1);case"m":return String(ae);case"mm":return A.s(ae,2,"0");case"s":return String(Y.$s);case"ss":return A.s(Y.$s,2,"0");case"SSS":return A.s(Y.$ms,3,"0");case"Z":return ie}return null}(Dt)||ie.replace(":","")})},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(F,Y,$){var V,ie=this,re=A.p(Y),ae=z(F),le=(ae.utcOffset()-this.utcOffset())*r,_e=this-ae,Oe=function(){return A.m(ie,ae)};switch(re){case v:V=Oe()/12;break;case d:V=Oe();break;case f:V=Oe()/3;break;case p:V=(_e-le)/6048e5;break;case c:V=(_e-le)/864e5;break;case l:V=_e/i;break;case u:V=_e/r;break;case o:V=_e/n;break;default:V=_e}return $?V:A.a(V)},O.daysInMonth=function(){return this.endOf(d).$D},O.$locale=function(){return w[this.$L]},O.locale=function(F,Y){if(!F)return this.$L;var $=this.clone(),V=M(F,Y,!0);return V&&($.$L=V),$},O.clone=function(){return A.w(this.$d,this)},O.toDate=function(){return new Date(this.valueOf())},O.toJSON=function(){return this.isValid()?this.toISOString():null},O.toISOString=function(){return this.$d.toISOString()},O.toString=function(){return this.$d.toUTCString()},j}(),he=ue.prototype;return z.prototype=he,[["$ms",a],["$s",o],["$m",u],["$H",l],["$W",c],["$M",d],["$y",v],["$D",h]].forEach(function(j){he[j[1]]=function(O){return this.$g(O,j[0],j[1])}}),z.extend=function(j,O){return j.$i||(j(O,ue,z),j.$i=!0),z},z.locale=M,z.isDayjs=L,z.unix=function(j){return z(1e3*j)},z.en=w[T],z.Ls=w,z.p={},z})}(dayjs_min$1)),dayjs_min$1.exports}var dayjs_minExports=requireDayjs_min();const dayjs=getDefaultExportFromCjs(dayjs_minExports),buildTimeList=(e,t)=>[e>0?e-1:void 0,e,e<t?e+1:void 0],rangeArr=e=>Array.from(Array.from({length:e}).keys()),extractDateFormat=e=>e.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),extractTimeFormat=e=>e.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),dateEquals=function(e,t){const n=isDate(e),r=isDate(t);return n&&r?e.getTime()===t.getTime():!n&&!r?e===t:!1},valueEquals=function(e,t){const n=isArray$1(e),r=isArray$1(t);return n&&r?e.length!==t.length?!1:e.every((i,a)=>dateEquals(i,t[a])):!n&&!r?dateEquals(e,t):!1},parseDate=function(e,t,n){const r=isEmpty$1(t)||t==="x"?dayjs(e).locale(n):dayjs(e,t).locale(n);return r.isValid()?r:void 0},formatter=function(e,t,n){return isEmpty$1(t)?e:t==="x"?+e:dayjs(e).locale(n).format(t)},makeList=(e,t)=>{var n;const r=[],i=t==null?void 0:t();for(let a=0;a<e;a++)r.push((n=i==null?void 0:i.includes(a))!=null?n:!1);return r},dayOrDaysToDate=e=>isArray$1(e)?e.map(t=>t.toDate()):e.toDate();var localeData$2={exports:{}},localeData$1=localeData$2.exports,hasRequiredLocaleData;function requireLocaleData(){return hasRequiredLocaleData||(hasRequiredLocaleData=1,function(e,t){(function(n,r){e.exports=r()})(localeData$1,function(){return function(n,r,i){var a=r.prototype,o=function(d){return d&&(d.indexOf?d:d.s)},u=function(d,f,v,h,m){var y=d.name?d:d.$locale(),g=o(y[f]),b=o(y[v]),_=g||b.map(function(T){return T.slice(0,h)});if(!m)return _;var S=y.weekStart;return _.map(function(T,w){return _[(w+(S||0))%7]})},l=function(){return i.Ls[i.locale()]},c=function(d,f){return d.formats[f]||function(v){return v.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(h,m,y){return m||y.slice(1)})}(d.formats[f.toUpperCase()])},p=function(){var d=this;return{months:function(f){return f?f.format("MMMM"):u(d,"months")},monthsShort:function(f){return f?f.format("MMM"):u(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(f){return f?f.format("dddd"):u(d,"weekdays")},weekdaysMin:function(f){return f?f.format("dd"):u(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(f){return f?f.format("ddd"):u(d,"weekdaysShort","weekdays",3)},longDateFormat:function(f){return c(d.$locale(),f)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};a.localeData=function(){return p.bind(this)()},i.localeData=function(){var d=l();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(f){return c(d,f)},meridiem:d.meridiem,ordinal:d.ordinal}},i.months=function(){return u(l(),"months")},i.monthsShort=function(){return u(l(),"monthsShort","months",3)},i.weekdays=function(d){return u(l(),"weekdays",null,null,d)},i.weekdaysShort=function(d){return u(l(),"weekdaysShort","weekdays",3,d)},i.weekdaysMin=function(d){return u(l(),"weekdaysMin","weekdays",2,d)}}})}(localeData$2)),localeData$2.exports}var localeDataExports=requireLocaleData();const localeData=getDefaultExportFromCjs(localeDataExports),datePickTypes=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"];var PatchFlags=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(PatchFlags||{});const flattedChildren=e=>{const t=isArray$1(e)?e:[e],n=[];return t.forEach(r=>{var i;isArray$1(r)?n.push(...flattedChildren(r)):vue.isVNode(r)&&((i=r.component)!=null&&i.subTree)?n.push(r,...flattedChildren(r.component.subTree)):vue.isVNode(r)&&isArray$1(r.children)?n.push(...flattedChildren(r.children)):vue.isVNode(r)&&r.shapeFlag===2?n.push(...flattedChildren(r.type())):n.push(r)}),n},escapeStringRegexp=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),castArray=e=>!e&&e!==0?[]:isArray$1(e)?e:[e],tagProps=buildProps({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:componentSizes},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),tagEmits={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},__default__$8=vue.defineComponent({name:"ElTag"}),_sfc_main$F=vue.defineComponent({...__default__$8,props:tagProps,emits:tagEmits,setup(e,{emit:t}){const n=e,r=useFormSize(),i=useNamespace("tag"),a=vue.computed(()=>{const{type:c,hit:p,effect:d,closable:f,round:v}=n;return[i.b(),i.is("closable",f),i.m(c||"primary"),i.m(r.value),i.m(d),i.is("hit",p),i.is("round",v)]}),o=c=>{t("close",c)},u=c=>{t("click",c)},l=c=>{var p,d,f;(f=(d=(p=c==null?void 0:c.component)==null?void 0:p.subTree)==null?void 0:d.component)!=null&&f.bum&&(c.component.subTree.component.bum=null)};return(c,p)=>c.disableTransitions?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:vue.normalizeClass(vue.unref(a)),style:vue.normalizeStyle({backgroundColor:c.color}),onClick:u},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(i).e("content"))},[vue.renderSlot(c.$slots,"default")],2),c.closable?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(vue.unref(i).e("close")),onClick:vue.withModifiers(o,["stop"])},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(close_default))]),_:1},8,["class","onClick"])):vue.createCommentVNode("v-if",!0)],6)):(vue.openBlock(),vue.createBlock(vue.Transition,{key:1,name:`${vue.unref(i).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:l},{default:vue.withCtx(()=>[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(a)),style:vue.normalizeStyle({backgroundColor:c.color}),onClick:u},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(i).e("content"))},[vue.renderSlot(c.$slots,"default")],2),c.closable?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(vue.unref(i).e("close")),onClick:vue.withModifiers(o,["stop"])},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(close_default))]),_:1},8,["class","onClick"])):vue.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var Tag=_export_sfc$1(_sfc_main$F,[["__file","tag.vue"]]);const ElTag=withInstall(Tag),nodeList=new Map;if(isClient){let e;document.addEventListener("mousedown",t=>e=t),document.addEventListener("mouseup",t=>{if(e){for(const n of nodeList.values())for(const{documentHandler:r}of n)r(t,e);e=void 0}})}function createDocumentHandler(e,t){let n=[];return isArray$1(t.arg)?n=t.arg:isElement(t.arg)&&n.push(t.arg),function(r,i){const a=t.instance.popperRef,o=r.target,u=i==null?void 0:i.target,l=!t||!t.instance,c=!o||!u,p=e.contains(o)||e.contains(u),d=e===o,f=n.length&&n.some(h=>h==null?void 0:h.contains(o))||n.length&&n.includes(u),v=a&&(a.contains(o)||a.contains(u));l||c||p||d||f||v||t.value(r,i)}}const ClickOutside={beforeMount(e,t){nodeList.has(e)||nodeList.set(e,[]),nodeList.get(e).push({documentHandler:createDocumentHandler(e,t),bindingFn:t.value})},updated(e,t){nodeList.has(e)||nodeList.set(e,[]);const n=nodeList.get(e),r=n.findIndex(a=>a.bindingFn===t.oldValue),i={documentHandler:createDocumentHandler(e,t),bindingFn:t.value};r>=0?n.splice(r,1,i):n.push(i)},unmounted(e){nodeList.delete(e)}};var customParseFormat$2={exports:{}},customParseFormat$1=customParseFormat$2.exports,hasRequiredCustomParseFormat;function requireCustomParseFormat(){return hasRequiredCustomParseFormat||(hasRequiredCustomParseFormat=1,function(e,t){(function(n,r){e.exports=r()})(customParseFormat$1,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,a=/\d\d/,o=/\d\d?/,u=/\d*[^-_:/,()\s\d]+/,l={},c=function(y){return(y=+y)+(y>68?1900:2e3)},p=function(y){return function(g){this[y]=+g}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=function(g){if(!g||g==="Z")return 0;var b=g.match(/([+-]|\d\d)/g),_=60*b[1]+(+b[2]||0);return _===0?0:b[0]==="+"?-_:_}(y)}],f=function(y){var g=l[y];return g&&(g.indexOf?g:g.s.concat(g.f))},v=function(y,g){var b,_=l.meridiem;if(_){for(var S=1;S<=24;S+=1)if(y.indexOf(_(S,0,g))>-1){b=S>12;break}}else b=y===(g?"pm":"PM");return b},h={A:[u,function(y){this.afternoon=v(y,!1)}],a:[u,function(y){this.afternoon=v(y,!0)}],Q:[i,function(y){this.month=3*(y-1)+1}],S:[i,function(y){this.milliseconds=100*+y}],SS:[a,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[o,p("seconds")],ss:[o,p("seconds")],m:[o,p("minutes")],mm:[o,p("minutes")],H:[o,p("hours")],h:[o,p("hours")],HH:[o,p("hours")],hh:[o,p("hours")],D:[o,p("day")],DD:[a,p("day")],Do:[u,function(y){var g=l.ordinal,b=y.match(/\d+/);if(this.day=b[0],g)for(var _=1;_<=31;_+=1)g(_).replace(/\[|\]/g,"")===y&&(this.day=_)}],w:[o,p("week")],ww:[a,p("week")],M:[o,p("month")],MM:[a,p("month")],MMM:[u,function(y){var g=f("months"),b=(f("monthsShort")||g.map(function(_){return _.slice(0,3)})).indexOf(y)+1;if(b<1)throw new Error;this.month=b%12||b}],MMMM:[u,function(y){var g=f("months").indexOf(y)+1;if(g<1)throw new Error;this.month=g%12||g}],Y:[/[+-]?\d+/,p("year")],YY:[a,function(y){this.year=c(y)}],YYYY:[/\d{4}/,p("year")],Z:d,ZZ:d};function m(y){var g,b;g=y,b=l&&l.formats;for(var _=(y=g.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(z,A,ue){var he=ue&&ue.toUpperCase();return A||b[ue]||n[ue]||b[he].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(j,O,F){return O||F.slice(1)})})).match(r),S=_.length,T=0;T<S;T+=1){var w=_[T],x=h[w],L=x&&x[0],M=x&&x[1];_[T]=M?{regex:L,parser:M}:w.replace(/^\[|\]$/g,"")}return function(z){for(var A={},ue=0,he=0;ue<S;ue+=1){var j=_[ue];if(typeof j=="string")he+=j.length;else{var O=j.regex,F=j.parser,Y=z.slice(he),$=O.exec(Y)[0];F.call(A,$),z=z.replace($,"")}}return function(V){var ie=V.afternoon;if(ie!==void 0){var re=V.hours;ie?re<12&&(V.hours+=12):re===12&&(V.hours=0),delete V.afternoon}}(A),A}}return function(y,g,b){b.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(c=y.parseTwoDigitYear);var _=g.prototype,S=_.parse;_.parse=function(T){var w=T.date,x=T.utc,L=T.args;this.$u=x;var M=L[1];if(typeof M=="string"){var z=L[2]===!0,A=L[3]===!0,ue=z||A,he=L[2];A&&(he=L[2]),l=this.$locale(),!z&&he&&(l=b.Ls[he]),this.$d=function(Y,$,V,ie){try{if(["x","X"].indexOf($)>-1)return new Date(($==="X"?1e3:1)*Y);var re=m($)(Y),ae=re.year,le=re.month,_e=re.day,Oe=re.hours,Ce=re.minutes,xe=re.seconds,Fe=re.milliseconds,At=re.zone,Dt=re.week,Lt=new Date,_n=_e||(ae||le?1:Lt.getDate()),Cn=ae||Lt.getFullYear(),An=0;ae&&!le||(An=le>0?le-1:Lt.getMonth());var Tn,Sn=Oe||0,bn=Ce||0,wn=xe||0,Ue=Fe||0;return At?new Date(Date.UTC(Cn,An,_n,Sn,bn,wn,Ue+60*At.offset*1e3)):V?new Date(Date.UTC(Cn,An,_n,Sn,bn,wn,Ue)):(Tn=new Date(Cn,An,_n,Sn,bn,wn,Ue),Dt&&(Tn=ie(Tn).week(Dt).toDate()),Tn)}catch{return new Date("")}}(w,M,x,b),this.init(),he&&he!==!0&&(this.$L=this.locale(he).$L),ue&&w!=this.format(M)&&(this.$d=new Date("")),l={}}else if(M instanceof Array)for(var j=M.length,O=1;O<=j;O+=1){L[1]=M[O-1];var F=b.apply(this,L);if(F.isValid()){this.$d=F.$d,this.$L=F.$L,this.init();break}O===j&&(this.$d=new Date(""))}else S.call(this,T)}}})}(customParseFormat$2)),customParseFormat$2.exports}var customParseFormatExports=requireCustomParseFormat();const customParseFormat=getDefaultExportFromCjs(customParseFormatExports);var advancedFormat$2={exports:{}},advancedFormat$1=advancedFormat$2.exports,hasRequiredAdvancedFormat;function requireAdvancedFormat(){return hasRequiredAdvancedFormat||(hasRequiredAdvancedFormat=1,function(e,t){(function(n,r){e.exports=r()})(advancedFormat$1,function(){return function(n,r){var i=r.prototype,a=i.format;i.format=function(o){var u=this,l=this.$locale();if(!this.isValid())return a.bind(this)(o);var c=this.$utils(),p=(o||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(d){switch(d){case"Q":return Math.ceil((u.$M+1)/3);case"Do":return l.ordinal(u.$D);case"gggg":return u.weekYear();case"GGGG":return u.isoWeekYear();case"wo":return l.ordinal(u.week(),"W");case"w":case"ww":return c.s(u.week(),d==="w"?1:2,"0");case"W":case"WW":return c.s(u.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return c.s(String(u.$H===0?24:u.$H),d==="k"?1:2,"0");case"X":return Math.floor(u.$d.getTime()/1e3);case"x":return u.$d.getTime();case"z":return"["+u.offsetName()+"]";case"zzz":return"["+u.offsetName("long")+"]";default:return d}});return a.bind(this)(p)}}})}(advancedFormat$2)),advancedFormat$2.exports}var advancedFormatExports=requireAdvancedFormat();const advancedFormat=getDefaultExportFromCjs(advancedFormatExports);var weekOfYear$2={exports:{}},weekOfYear$1=weekOfYear$2.exports,hasRequiredWeekOfYear;function requireWeekOfYear(){return hasRequiredWeekOfYear||(hasRequiredWeekOfYear=1,function(e,t){(function(n,r){e.exports=r()})(weekOfYear$1,function(){var n="week",r="year";return function(i,a,o){var u=a.prototype;u.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var p=o(this).startOf(r).add(1,r).date(c),d=o(this).endOf(n);if(p.isBefore(d))return 1}var f=o(this).startOf(r).date(c).startOf(n).subtract(1,"millisecond"),v=this.diff(f,n,!0);return v<0?o(this).startOf("week").week():Math.ceil(v)},u.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})}(weekOfYear$2)),weekOfYear$2.exports}var weekOfYearExports=requireWeekOfYear();const weekOfYear=getDefaultExportFromCjs(weekOfYearExports);var weekYear$2={exports:{}},weekYear$1=weekYear$2.exports,hasRequiredWeekYear;function requireWeekYear(){return hasRequiredWeekYear||(hasRequiredWeekYear=1,function(e,t){(function(n,r){e.exports=r()})(weekYear$1,function(){return function(n,r){r.prototype.weekYear=function(){var i=this.month(),a=this.week(),o=this.year();return a===1&&i===11?o+1:i===0&&a>=52?o-1:o}}})}(weekYear$2)),weekYear$2.exports}var weekYearExports=requireWeekYear();const weekYear=getDefaultExportFromCjs(weekYearExports);var dayOfYear$2={exports:{}},dayOfYear$1=dayOfYear$2.exports,hasRequiredDayOfYear;function requireDayOfYear(){return hasRequiredDayOfYear||(hasRequiredDayOfYear=1,function(e,t){(function(n,r){e.exports=r()})(dayOfYear$1,function(){return function(n,r,i){r.prototype.dayOfYear=function(a){var o=Math.round((i(this).startOf("day")-i(this).startOf("year"))/864e5)+1;return a==null?o:this.add(a-o,"day")}}})}(dayOfYear$2)),dayOfYear$2.exports}var dayOfYearExports=requireDayOfYear();const dayOfYear=getDefaultExportFromCjs(dayOfYearExports);var isSameOrAfter$2={exports:{}},isSameOrAfter$1=isSameOrAfter$2.exports,hasRequiredIsSameOrAfter;function requireIsSameOrAfter(){return hasRequiredIsSameOrAfter||(hasRequiredIsSameOrAfter=1,function(e,t){(function(n,r){e.exports=r()})(isSameOrAfter$1,function(){return function(n,r){r.prototype.isSameOrAfter=function(i,a){return this.isSame(i,a)||this.isAfter(i,a)}}})}(isSameOrAfter$2)),isSameOrAfter$2.exports}var isSameOrAfterExports=requireIsSameOrAfter();const isSameOrAfter=getDefaultExportFromCjs(isSameOrAfterExports);var isSameOrBefore$2={exports:{}},isSameOrBefore$1=isSameOrBefore$2.exports,hasRequiredIsSameOrBefore;function requireIsSameOrBefore(){return hasRequiredIsSameOrBefore||(hasRequiredIsSameOrBefore=1,function(e,t){(function(n,r){e.exports=r()})(isSameOrBefore$1,function(){return function(n,r){r.prototype.isSameOrBefore=function(i,a){return this.isSame(i,a)||this.isBefore(i,a)}}})}(isSameOrBefore$2)),isSameOrBefore$2.exports}var isSameOrBeforeExports=requireIsSameOrBefore();const isSameOrBefore=getDefaultExportFromCjs(isSameOrBeforeExports),timeUnits=["hours","minutes","seconds"],PICKER_BASE_INJECTION_KEY="EP_PICKER_BASE",PICKER_POPPER_OPTIONS_INJECTION_KEY="ElPopperOptions",DEFAULT_FORMATS_TIME="HH:mm:ss",DEFAULT_FORMATS_DATE="YYYY-MM-DD",DEFAULT_FORMATS_DATEPICKER={date:DEFAULT_FORMATS_DATE,dates:DEFAULT_FORMATS_DATE,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:DEFAULT_FORMATS_DATE,datetimerange:`${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}`},disabledTimeListsProps=buildProps({disabledHours:{type:definePropType(Function)},disabledMinutes:{type:definePropType(Function)},disabledSeconds:{type:definePropType(Function)}}),timePanelSharedProps=buildProps({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),timePickerDefaultProps=buildProps({id:{type:definePropType([Array,String])},name:{type:definePropType([Array,String])},popperClass:{type:String,default:""},format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:definePropType([String,Object]),default:circle_close_default},editable:{type:Boolean,default:!0},prefixIcon:{type:definePropType([String,Object]),default:""},size:useSizeProp,readonly:Boolean,disabled:Boolean,placeholder:{type:String,default:""},popperOptions:{type:definePropType(Object),default:()=>({})},modelValue:{type:definePropType([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:definePropType([Date,Array])},defaultTime:{type:definePropType([Date,Array])},isRange:Boolean,...disabledTimeListsProps,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:definePropType([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,placement:{type:definePropType(String),values:Ee,default:"bottom"},fallbackPlacements:{type:definePropType(Array),default:["bottom","top","right","left"]},...useEmptyValuesProps,...useAriaProps(["ariaLabel"]),showNow:{type:Boolean,default:!0}}),timePickerRangeTriggerProps=buildProps({id:{type:definePropType(Array)},name:{type:definePropType(Array)},modelValue:{type:definePropType([Array,String])},startPlaceholder:String,endPlaceholder:String,disabled:Boolean}),__default__$7=vue.defineComponent({name:"PickerRangeTrigger",inheritAttrs:!1}),_sfc_main$E=vue.defineComponent({...__default__$7,props:timePickerRangeTriggerProps,emits:["mouseenter","mouseleave","click","touchstart","focus","blur","startInput","endInput","startChange","endChange"],setup(e,{expose:t,emit:n}){const r=useAttrs(),i=useNamespace("date"),a=useNamespace("range"),o=vue.ref(),u=vue.ref(),{wrapperRef:l,isFocused:c}=useFocusController(o),p=S=>{n("click",S)},d=S=>{n("mouseenter",S)},f=S=>{n("mouseleave",S)},v=S=>{n("mouseenter",S)},h=S=>{n("startInput",S)},m=S=>{n("endInput",S)},y=S=>{n("startChange",S)},g=S=>{n("endChange",S)};return t({focus:()=>{var S;(S=o.value)==null||S.focus()},blur:()=>{var S,T;(S=o.value)==null||S.blur(),(T=u.value)==null||T.blur()}}),(S,T)=>(vue.openBlock(),vue.createElementBlock("div",{ref_key:"wrapperRef",ref:l,class:vue.normalizeClass([vue.unref(i).is("active",vue.unref(c)),S.$attrs.class]),style:vue.normalizeStyle(S.$attrs.style),onClick:p,onMouseenter:d,onMouseleave:f,onTouchstartPassive:v},[vue.renderSlot(S.$slots,"prefix"),vue.createElementVNode("input",vue.mergeProps(vue.unref(r),{id:S.id&&S.id[0],ref_key:"inputRef",ref:o,name:S.name&&S.name[0],placeholder:S.startPlaceholder,value:S.modelValue&&S.modelValue[0],class:vue.unref(a).b("input"),disabled:S.disabled,onInput:h,onChange:y}),null,16,["id","name","placeholder","value","disabled"]),vue.renderSlot(S.$slots,"range-separator"),vue.createElementVNode("input",vue.mergeProps(vue.unref(r),{id:S.id&&S.id[1],ref_key:"endInputRef",ref:u,name:S.name&&S.name[1],placeholder:S.endPlaceholder,value:S.modelValue&&S.modelValue[1],class:vue.unref(a).b("input"),disabled:S.disabled,onInput:m,onChange:g}),null,16,["id","name","placeholder","value","disabled"]),vue.renderSlot(S.$slots,"suffix")],38))}});var PickerRangeTrigger=_export_sfc$1(_sfc_main$E,[["__file","picker-range-trigger.vue"]]);const __default__$6=vue.defineComponent({name:"Picker"}),_sfc_main$D=vue.defineComponent({...__default__$6,props:timePickerDefaultProps,emits:[UPDATE_MODEL_EVENT,CHANGE_EVENT,"focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(e,{expose:t,emit:n}){const r=e,i=vue.useAttrs(),{lang:a}=useLocale(),o=useNamespace("date"),u=useNamespace("input"),l=useNamespace("range"),{form:c,formItem:p}=useFormItem(),d=vue.inject(PICKER_POPPER_OPTIONS_INJECTION_KEY,{}),{valueOnClear:f}=useEmptyValues(r,null),v=vue.ref(),h=vue.ref(),m=vue.ref(!1),y=vue.ref(!1),g=vue.ref(null);let b=!1;const{isFocused:_,handleFocus:S,handleBlur:T}=useFocusController(h,{beforeFocus(){return r.readonly||V.value},afterFocus(){m.value=!0},beforeBlur(k){var pe;return!b&&((pe=v.value)==null?void 0:pe.isFocusInsideContent(k))},afterBlur(){En(),m.value=!1,b=!1,r.validateEvent&&(p==null||p.validate("blur").catch(k=>debugWarn(k)))}}),w=vue.computed(()=>[o.b("editor"),o.bm("editor",r.type),u.e("wrapper"),o.is("disabled",V.value),o.is("active",m.value),l.b("editor"),Sn?l.bm("editor",Sn.value):"",i.class]),x=vue.computed(()=>[u.e("icon"),l.e("close-icon"),Fe.value?"":l.e("close-icon--hidden")]);vue.watch(m,k=>{k?vue.nextTick(()=>{k&&(g.value=r.modelValue)}):(Ue.value=null,vue.nextTick(()=>{L(r.modelValue)}))});const L=(k,pe)=>{(pe||!valueEquals(k,g.value))&&(n(CHANGE_EVENT,k),pe&&(g.value=k),r.validateEvent&&(p==null||p.validate("change").catch(Ne=>debugWarn(Ne))))},M=k=>{if(!valueEquals(r.modelValue,k)){let pe;isArray$1(k)?pe=k.map(Ne=>formatter(Ne,r.valueFormat,a.value)):k&&(pe=formatter(k,r.valueFormat,a.value)),n(UPDATE_MODEL_EVENT,k&&pe,a.value)}},z=k=>{n("keydown",k)},A=vue.computed(()=>h.value?Array.from(h.value.$el.querySelectorAll("input")):[]),ue=(k,pe,Ne)=>{const ze=A.value;ze.length&&(!Ne||Ne==="min"?(ze[0].setSelectionRange(k,pe),ze[0].focus()):Ne==="max"&&(ze[1].setSelectionRange(k,pe),ze[1].focus()))},he=(k="",pe=!1)=>{m.value=pe;let Ne;isArray$1(k)?Ne=k.map(ze=>ze.toDate()):Ne=k&&k.toDate(),Ue.value=null,M(Ne)},j=()=>{y.value=!0},O=()=>{n("visible-change",!0)},F=()=>{y.value=!1,m.value=!1,n("visible-change",!1)},Y=()=>{m.value=!0},$=()=>{m.value=!1},V=vue.computed(()=>r.disabled||(c==null?void 0:c.disabled)),ie=vue.computed(()=>{let k;if(Dt.value?hn.value.getDefaultValue&&(k=hn.value.getDefaultValue()):isArray$1(r.modelValue)?k=r.modelValue.map(pe=>parseDate(pe,r.valueFormat,a.value)):k=parseDate(r.modelValue,r.valueFormat,a.value),hn.value.getRangeAvailableTime){const pe=hn.value.getRangeAvailableTime(k);isEqual(pe,k)||(k=pe,Dt.value||M(dayOrDaysToDate(k)))}return isArray$1(k)&&k.some(pe=>!pe)&&(k=[]),k}),re=vue.computed(()=>{if(!hn.value.panelReady)return"";const k=Mn(ie.value);return isArray$1(Ue.value)?[Ue.value[0]||k&&k[0]||"",Ue.value[1]||k&&k[1]||""]:Ue.value!==null?Ue.value:!le.value&&Dt.value||!m.value&&Dt.value?"":k?_e.value||Oe.value||Ce.value?k.join(", "):k:""}),ae=vue.computed(()=>r.type.includes("time")),le=vue.computed(()=>r.type.startsWith("time")),_e=vue.computed(()=>r.type==="dates"),Oe=vue.computed(()=>r.type==="months"),Ce=vue.computed(()=>r.type==="years"),xe=vue.computed(()=>r.prefixIcon||(ae.value?clock_default:calendar_default)),Fe=vue.ref(!1),At=k=>{r.readonly||V.value||(Fe.value&&(k.stopPropagation(),hn.value.handleClear?hn.value.handleClear():M(f.value),L(f.value,!0),Fe.value=!1,F()),n("clear"))},Dt=vue.computed(()=>{const{modelValue:k}=r;return!k||isArray$1(k)&&!k.filter(Boolean).length}),Lt=async k=>{var pe;r.readonly||V.value||(((pe=k.target)==null?void 0:pe.tagName)!=="INPUT"||_.value)&&(m.value=!0)},_n=()=>{r.readonly||V.value||!Dt.value&&r.clearable&&(Fe.value=!0)},Cn=()=>{Fe.value=!1},An=k=>{var pe;r.readonly||V.value||(((pe=k.touches[0].target)==null?void 0:pe.tagName)!=="INPUT"||_.value)&&(m.value=!0)},Tn=vue.computed(()=>r.type.includes("range")),Sn=useFormSize(),bn=vue.computed(()=>{var k,pe;return(pe=(k=vue.unref(v))==null?void 0:k.popperRef)==null?void 0:pe.contentRef}),wn=onClickOutside(h,k=>{const pe=vue.unref(bn),Ne=unrefElement(h);pe&&(k.target===pe||k.composedPath().includes(pe))||k.target===Ne||Ne&&k.composedPath().includes(Ne)||(m.value=!1)});vue.onBeforeUnmount(()=>{wn==null||wn()});const Ue=vue.ref(null),En=()=>{if(Ue.value){const k=Pn(re.value);k&&$n(k)&&(M(dayOrDaysToDate(k)),Ue.value=null)}Ue.value===""&&(M(f.value),L(f.value,!0),Ue.value=null)},Pn=k=>k?hn.value.parseUserInput(k):null,Mn=k=>k?hn.value.formatToString(k):null,$n=k=>hn.value.isValidValue(k),$e=async k=>{if(r.readonly||V.value)return;const{code:pe}=k;if(z(k),pe===EVENT_CODE.esc){m.value===!0&&(m.value=!1,k.preventDefault(),k.stopPropagation());return}if(pe===EVENT_CODE.down&&(hn.value.handleFocusPicker&&(k.preventDefault(),k.stopPropagation()),m.value===!1&&(m.value=!0,await vue.nextTick()),hn.value.handleFocusPicker)){hn.value.handleFocusPicker();return}if(pe===EVENT_CODE.tab){b=!0;return}if(pe===EVENT_CODE.enter||pe===EVENT_CODE.numpadEnter){(Ue.value===null||Ue.value===""||$n(Pn(re.value)))&&(En(),m.value=!1),k.stopPropagation();return}if(Ue.value){k.stopPropagation();return}hn.value.handleKeydownInput&&hn.value.handleKeydownInput(k)},Et=k=>{Ue.value=k,m.value||(m.value=!0)},On=k=>{const pe=k.target;Ue.value?Ue.value=[pe.value,Ue.value[1]]:Ue.value=[pe.value,null]},In=k=>{const pe=k.target;Ue.value?Ue.value=[Ue.value[0],pe.value]:Ue.value=[null,pe.value]},Vn=()=>{var k;const pe=Ue.value,Ne=Pn(pe&&pe[0]),ze=vue.unref(ie);if(Ne&&Ne.isValid()){Ue.value=[Mn(Ne),((k=re.value)==null?void 0:k[1])||null];const jt=[Ne,ze&&(ze[1]||null)];$n(jt)&&(M(dayOrDaysToDate(jt)),Ue.value=null)}},Rn=()=>{var k;const pe=vue.unref(Ue),Ne=Pn(pe&&pe[1]),ze=vue.unref(ie);if(Ne&&Ne.isValid()){Ue.value=[((k=vue.unref(re))==null?void 0:k[0])||null,Mn(Ne)];const jt=[ze&&ze[0],Ne];$n(jt)&&(M(dayOrDaysToDate(jt)),Ue.value=null)}},hn=vue.ref({}),zn=k=>{hn.value[k[0]]=k[1],hn.value.panelReady=!0},xn=k=>{n("calendar-change",k)},vn=(k,pe,Ne)=>{n("panel-change",k,pe,Ne)},D=()=>{var k;(k=h.value)==null||k.focus()},oe=()=>{var k;(k=h.value)==null||k.blur()};return vue.provide(PICKER_BASE_INJECTION_KEY,{props:r}),t({focus:D,blur:oe,handleOpen:Y,handleClose:$,onPick:he}),(k,pe)=>(vue.openBlock(),vue.createBlock(vue.unref(ElTooltip),vue.mergeProps({ref_key:"refPopper",ref:v,visible:m.value,effect:"light",pure:"",trigger:"click"},k.$attrs,{role:"dialog",teleported:"",transition:`${vue.unref(o).namespace.value}-zoom-in-top`,"popper-class":[`${vue.unref(o).namespace.value}-picker__popper`,k.popperClass],"popper-options":vue.unref(d),"fallback-placements":k.fallbackPlacements,"gpu-acceleration":!1,placement:k.placement,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:j,onShow:O,onHide:F}),{default:vue.withCtx(()=>[vue.unref(Tn)?(vue.openBlock(),vue.createBlock(PickerRangeTrigger,{key:1,id:k.id,ref_key:"inputRef",ref:h,"model-value":vue.unref(re),name:k.name,disabled:vue.unref(V),readonly:!k.editable||k.readonly,"start-placeholder":k.startPlaceholder,"end-placeholder":k.endPlaceholder,class:vue.normalizeClass(vue.unref(w)),style:vue.normalizeStyle(k.$attrs.style),"aria-label":k.ariaLabel,tabindex:k.tabindex,autocomplete:"off",role:"combobox",onClick:Lt,onFocus:vue.unref(S),onBlur:vue.unref(T),onStartInput:On,onStartChange:Vn,onEndInput:In,onEndChange:Rn,onMousedown:Lt,onMouseenter:_n,onMouseleave:Cn,onTouchstartPassive:An,onKeydown:$e},{prefix:vue.withCtx(()=>[vue.unref(xe)?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass([vue.unref(u).e("icon"),vue.unref(l).e("icon")])},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(vue.unref(xe))))]),_:1},8,["class"])):vue.createCommentVNode("v-if",!0)]),"range-separator":vue.withCtx(()=>[vue.renderSlot(k.$slots,"range-separator",{},()=>[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(l).b("separator"))},vue.toDisplayString(k.rangeSeparator),3)])]),suffix:vue.withCtx(()=>[k.clearIcon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(vue.unref(x)),onMousedown:vue.withModifiers(vue.unref(NOOP),["prevent"]),onClick:At},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(k.clearIcon)))]),_:1},8,["class","onMousedown"])):vue.createCommentVNode("v-if",!0)]),_:3},8,["id","model-value","name","disabled","readonly","start-placeholder","end-placeholder","class","style","aria-label","tabindex","onFocus","onBlur"])):(vue.openBlock(),vue.createBlock(vue.unref(ElInput),{key:0,id:k.id,ref_key:"inputRef",ref:h,"container-role":"combobox","model-value":vue.unref(re),name:k.name,size:vue.unref(Sn),disabled:vue.unref(V),placeholder:k.placeholder,class:vue.normalizeClass([vue.unref(o).b("editor"),vue.unref(o).bm("editor",k.type),k.$attrs.class]),style:vue.normalizeStyle(k.$attrs.style),readonly:!k.editable||k.readonly||vue.unref(_e)||vue.unref(Oe)||vue.unref(Ce)||k.type==="week","aria-label":k.ariaLabel,tabindex:k.tabindex,"validate-event":!1,onInput:Et,onFocus:vue.unref(S),onBlur:vue.unref(T),onKeydown:$e,onChange:En,onMousedown:Lt,onMouseenter:_n,onMouseleave:Cn,onTouchstartPassive:An,onClick:vue.withModifiers(()=>{},["stop"])},{prefix:vue.withCtx(()=>[vue.unref(xe)?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(vue.unref(u).e("icon")),onMousedown:vue.withModifiers(Lt,["prevent"]),onTouchstartPassive:An},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(vue.unref(xe))))]),_:1},8,["class","onMousedown"])):vue.createCommentVNode("v-if",!0)]),suffix:vue.withCtx(()=>[Fe.value&&k.clearIcon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(`${vue.unref(u).e("icon")} clear-icon`),onMousedown:vue.withModifiers(vue.unref(NOOP),["prevent"]),onClick:At},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(k.clearIcon)))]),_:1},8,["class","onMousedown"])):vue.createCommentVNode("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onFocus","onBlur","onClick"]))]),content:vue.withCtx(()=>[vue.renderSlot(k.$slots,"default",{visible:m.value,actualVisible:y.value,parsedValue:vue.unref(ie),format:k.format,dateFormat:k.dateFormat,timeFormat:k.timeFormat,unlinkPanels:k.unlinkPanels,type:k.type,defaultValue:k.defaultValue,showNow:k.showNow,onPick:he,onSelectRange:ue,onSetPickerOption:zn,onCalendarChange:xn,onPanelChange:vn,onMousedown:vue.withModifiers(()=>{},["stop"])})]),_:3},16,["visible","transition","popper-class","popper-options","fallback-placements","placement"]))}});var CommonPicker=_export_sfc$1(_sfc_main$D,[["__file","picker.vue"]]);const panelTimePickerProps=buildProps({...timePanelSharedProps,datetimeRole:String,parsedValue:{type:definePropType(Object)}}),useTimePanel=({getAvailableHours:e,getAvailableMinutes:t,getAvailableSeconds:n})=>{const r=(o,u,l,c)=>{const p={hour:e,minute:t,second:n};let d=o;return["hour","minute","second"].forEach(f=>{if(p[f]){let v;const h=p[f];switch(f){case"minute":{v=h(d.hour(),u,c);break}case"second":{v=h(d.hour(),d.minute(),u,c);break}default:{v=h(u,c);break}}if(v!=null&&v.length&&!v.includes(d[f]())){const m=l?0:v.length-1;d=d[f](v[m])}}}),d},i={};return{timePickerOptions:i,getAvailableTime:r,onSetOption:([o,u])=>{i[o]=u}}},makeAvailableArr=e=>{const t=(r,i)=>r||i,n=r=>r!==!0;return e.map(t).filter(n)},getTimeLists=(e,t,n)=>({getHoursList:(o,u)=>makeList(24,e&&(()=>e==null?void 0:e(o,u))),getMinutesList:(o,u,l)=>makeList(60,t&&(()=>t==null?void 0:t(o,u,l))),getSecondsList:(o,u,l,c)=>makeList(60,n&&(()=>n==null?void 0:n(o,u,l,c)))}),buildAvailableTimeSlotGetter=(e,t,n)=>{const{getHoursList:r,getMinutesList:i,getSecondsList:a}=getTimeLists(e,t,n);return{getAvailableHours:(c,p)=>makeAvailableArr(r(c,p)),getAvailableMinutes:(c,p,d)=>makeAvailableArr(i(c,p,d)),getAvailableSeconds:(c,p,d,f)=>makeAvailableArr(a(c,p,d,f))}},useOldValue=e=>{const t=vue.ref(e.parsedValue);return vue.watch(()=>e.visible,n=>{n||(t.value=e.parsedValue)}),t},basicTimeSpinnerProps=buildProps({role:{type:String,required:!0},spinnerDate:{type:definePropType(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:definePropType(String),default:""},...disabledTimeListsProps}),REPEAT_INTERVAL=100,REPEAT_DELAY=600,vRepeatClick={beforeMount(e,t){const n=t.value,{interval:r=REPEAT_INTERVAL,delay:i=REPEAT_DELAY}=isFunction$1(n)?{}:n;let a,o;const u=()=>isFunction$1(n)?n():n.handler(),l=()=>{o&&(clearTimeout(o),o=void 0),a&&(clearInterval(a),a=void 0)};e.addEventListener("mousedown",c=>{c.button===0&&(l(),u(),document.addEventListener("mouseup",()=>l(),{once:!0}),o=setTimeout(()=>{a=setInterval(()=>{u()},r)},i))})}},_sfc_main$C=vue.defineComponent({__name:"basic-time-spinner",props:basicTimeSpinnerProps,emits:[CHANGE_EVENT,"select-range","set-option"],setup(e,{emit:t}){const n=e,r=vue.inject(PICKER_BASE_INJECTION_KEY),{isRange:i,format:a}=r.props,o=useNamespace("time"),{getHoursList:u,getMinutesList:l,getSecondsList:c}=getTimeLists(n.disabledHours,n.disabledMinutes,n.disabledSeconds);let p=!1;const d=vue.ref(),f=vue.ref(),v=vue.ref(),h=vue.ref(),m={hours:f,minutes:v,seconds:h},y=vue.computed(()=>n.showSeconds?timeUnits:timeUnits.slice(0,2)),g=vue.computed(()=>{const{spinnerDate:ae}=n,le=ae.hour(),_e=ae.minute(),Oe=ae.second();return{hours:le,minutes:_e,seconds:Oe}}),b=vue.computed(()=>{const{hours:ae,minutes:le}=vue.unref(g),{role:_e,spinnerDate:Oe}=n,Ce=i?void 0:Oe;return{hours:u(_e,Ce),minutes:l(ae,_e,Ce),seconds:c(ae,le,_e,Ce)}}),_=vue.computed(()=>{const{hours:ae,minutes:le,seconds:_e}=vue.unref(g);return{hours:buildTimeList(ae,23),minutes:buildTimeList(le,59),seconds:buildTimeList(_e,59)}}),S=debounce(ae=>{p=!1,x(ae)},200),T=ae=>{if(!!!n.amPmMode)return"";const _e=n.amPmMode==="A";let Oe=ae<12?" am":" pm";return _e&&(Oe=Oe.toUpperCase()),Oe},w=ae=>{let le=[0,0];if(!a||a===DEFAULT_FORMATS_TIME)switch(ae){case"hours":le=[0,2];break;case"minutes":le=[3,5];break;case"seconds":le=[6,8];break}const[_e,Oe]=le;t("select-range",_e,Oe),d.value=ae},x=ae=>{z(ae,vue.unref(g)[ae])},L=()=>{x("hours"),x("minutes"),x("seconds")},M=ae=>ae.querySelector(`.${o.namespace.value}-scrollbar__wrap`),z=(ae,le)=>{if(n.arrowControl)return;const _e=vue.unref(m[ae]);_e&&_e.$el&&(M(_e.$el).scrollTop=Math.max(0,le*A(ae)))},A=ae=>{const le=vue.unref(m[ae]),_e=le==null?void 0:le.$el.querySelector("li");return _e&&Number.parseFloat(getStyle(_e,"height"))||0},ue=()=>{j(1)},he=()=>{j(-1)},j=ae=>{d.value||w("hours");const le=d.value,_e=vue.unref(g)[le],Oe=d.value==="hours"?24:60,Ce=O(le,_e,ae,Oe);F(le,Ce),z(le,Ce),vue.nextTick(()=>w(le))},O=(ae,le,_e,Oe)=>{let Ce=(le+_e+Oe)%Oe;const xe=vue.unref(b)[ae];for(;xe[Ce]&&Ce!==le;)Ce=(Ce+_e+Oe)%Oe;return Ce},F=(ae,le)=>{if(vue.unref(b)[ae][le])return;const{hours:Ce,minutes:xe,seconds:Fe}=vue.unref(g);let At;switch(ae){case"hours":At=n.spinnerDate.hour(le).minute(xe).second(Fe);break;case"minutes":At=n.spinnerDate.hour(Ce).minute(le).second(Fe);break;case"seconds":At=n.spinnerDate.hour(Ce).minute(xe).second(le);break}t(CHANGE_EVENT,At)},Y=(ae,{value:le,disabled:_e})=>{_e||(F(ae,le),w(ae),z(ae,le))},$=ae=>{const le=vue.unref(m[ae]);if(!le)return;p=!0,S(ae);const _e=Math.min(Math.round((M(le.$el).scrollTop-(V(ae)*.5-10)/A(ae)+3)/A(ae)),ae==="hours"?23:59);F(ae,_e)},V=ae=>vue.unref(m[ae]).$el.offsetHeight,ie=()=>{const ae=le=>{const _e=vue.unref(m[le]);_e&&_e.$el&&(M(_e.$el).onscroll=()=>{$(le)})};ae("hours"),ae("minutes"),ae("seconds")};vue.onMounted(()=>{vue.nextTick(()=>{!n.arrowControl&&ie(),L(),n.role==="start"&&w("hours")})});const re=(ae,le)=>{m[le].value=ae??void 0};return t("set-option",[`${n.role}_scrollDown`,j]),t("set-option",[`${n.role}_emitSelectRange`,w]),vue.watch(()=>n.spinnerDate,()=>{p||L()}),(ae,le)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([vue.unref(o).b("spinner"),{"has-seconds":ae.showSeconds}])},[ae.arrowControl?vue.createCommentVNode("v-if",!0):(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,{key:0},vue.renderList(vue.unref(y),_e=>(vue.openBlock(),vue.createBlock(vue.unref(ElScrollbar),{key:_e,ref_for:!0,ref:Oe=>re(Oe,_e),class:vue.normalizeClass(vue.unref(o).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":vue.unref(o).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:Oe=>w(_e),onMousemove:Oe=>x(_e)},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(b)[_e],(Oe,Ce)=>(vue.openBlock(),vue.createElementBlock("li",{key:Ce,class:vue.normalizeClass([vue.unref(o).be("spinner","item"),vue.unref(o).is("active",Ce===vue.unref(g)[_e]),vue.unref(o).is("disabled",Oe)]),onClick:xe=>Y(_e,{value:Ce,disabled:Oe})},[_e==="hours"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createTextVNode(vue.toDisplayString(("0"+(ae.amPmMode?Ce%12||12:Ce)).slice(-2))+vue.toDisplayString(T(Ce)),1)],64)):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createTextVNode(vue.toDisplayString(("0"+Ce).slice(-2)),1)],64))],10,["onClick"]))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),ae.arrowControl?(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,{key:1},vue.renderList(vue.unref(y),_e=>(vue.openBlock(),vue.createElementBlock("div",{key:_e,class:vue.normalizeClass([vue.unref(o).be("spinner","wrapper"),vue.unref(o).is("arrow")]),onMouseenter:Oe=>w(_e)},[vue.withDirectives((vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{class:vue.normalizeClass(["arrow-up",vue.unref(o).be("spinner","arrow")])},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_up_default))]),_:1},8,["class"])),[[vue.unref(vRepeatClick),he]]),vue.withDirectives((vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{class:vue.normalizeClass(["arrow-down",vue.unref(o).be("spinner","arrow")])},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_down_default))]),_:1},8,["class"])),[[vue.unref(vRepeatClick),ue]]),vue.createElementVNode("ul",{class:vue.normalizeClass(vue.unref(o).be("spinner","list"))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(_)[_e],(Oe,Ce)=>(vue.openBlock(),vue.createElementBlock("li",{key:Ce,class:vue.normalizeClass([vue.unref(o).be("spinner","item"),vue.unref(o).is("active",Oe===vue.unref(g)[_e]),vue.unref(o).is("disabled",vue.unref(b)[_e][Oe])])},[vue.unref(isNumber)(Oe)?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[_e==="hours"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createTextVNode(vue.toDisplayString(("0"+(ae.amPmMode?Oe%12||12:Oe)).slice(-2))+vue.toDisplayString(T(Oe)),1)],64)):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createTextVNode(vue.toDisplayString(("0"+Oe).slice(-2)),1)],64))],64)):vue.createCommentVNode("v-if",!0)],2))),128))],2)],42,["onMouseenter"]))),128)):vue.createCommentVNode("v-if",!0)],2))}});var TimeSpinner=_export_sfc$1(_sfc_main$C,[["__file","basic-time-spinner.vue"]]);const _sfc_main$B=vue.defineComponent({__name:"panel-time-pick",props:panelTimePickerProps,emits:["pick","select-range","set-picker-option"],setup(e,{emit:t}){const n=e,r=vue.inject(PICKER_BASE_INJECTION_KEY),{arrowControl:i,disabledHours:a,disabledMinutes:o,disabledSeconds:u,defaultValue:l}=r.props,{getAvailableHours:c,getAvailableMinutes:p,getAvailableSeconds:d}=buildAvailableTimeSlotGetter(a,o,u),f=useNamespace("time"),{t:v,lang:h}=useLocale(),m=vue.ref([0,2]),y=useOldValue(n),g=vue.computed(()=>isUndefined(n.actualVisible)?`${f.namespace.value}-zoom-in-top`:""),b=vue.computed(()=>n.format.includes("ss")),_=vue.computed(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),S=$=>{const V=dayjs($).locale(h.value),ie=j(V);return V.isSame(ie)},T=()=>{t("pick",y.value,!1)},w=($=!1,V=!1)=>{V||t("pick",n.parsedValue,$)},x=$=>{if(!n.visible)return;const V=j($).millisecond(0);t("pick",V,!0)},L=($,V)=>{t("select-range",$,V),m.value=[$,V]},M=$=>{const V=[0,3].concat(b.value?[6]:[]),ie=["hours","minutes"].concat(b.value?["seconds"]:[]),ae=(V.indexOf(m.value[0])+$+V.length)%V.length;A.start_emitSelectRange(ie[ae])},z=$=>{const V=$.code,{left:ie,right:re,up:ae,down:le}=EVENT_CODE;if([ie,re].includes(V)){M(V===ie?-1:1),$.preventDefault();return}if([ae,le].includes(V)){const _e=V===ae?-1:1;A.start_scrollDown(_e),$.preventDefault();return}},{timePickerOptions:A,onSetOption:ue,getAvailableTime:he}=useTimePanel({getAvailableHours:c,getAvailableMinutes:p,getAvailableSeconds:d}),j=$=>he($,n.datetimeRole||"",!0),O=$=>$?dayjs($,n.format).locale(h.value):null,F=$=>$?$.format(n.format):null,Y=()=>dayjs(l).locale(h.value);return t("set-picker-option",["isValidValue",S]),t("set-picker-option",["formatToString",F]),t("set-picker-option",["parseUserInput",O]),t("set-picker-option",["handleKeydownInput",z]),t("set-picker-option",["getRangeAvailableTime",j]),t("set-picker-option",["getDefaultValue",Y]),($,V)=>(vue.openBlock(),vue.createBlock(vue.Transition,{name:vue.unref(g)},{default:vue.withCtx(()=>[$.actualVisible||$.visible?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(f).b("panel"))},[vue.createElementVNode("div",{class:vue.normalizeClass([vue.unref(f).be("panel","content"),{"has-seconds":vue.unref(b)}])},[vue.createVNode(TimeSpinner,{ref:"spinner",role:$.datetimeRole||"start","arrow-control":vue.unref(i),"show-seconds":vue.unref(b),"am-pm-mode":vue.unref(_),"spinner-date":$.parsedValue,"disabled-hours":vue.unref(a),"disabled-minutes":vue.unref(o),"disabled-seconds":vue.unref(u),onChange:x,onSetOption:vue.unref(ue),onSelectRange:L},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(f).be("panel","footer"))},[vue.createElementVNode("button",{type:"button",class:vue.normalizeClass([vue.unref(f).be("panel","btn"),"cancel"]),onClick:T},vue.toDisplayString(vue.unref(v)("el.datepicker.cancel")),3),vue.createElementVNode("button",{type:"button",class:vue.normalizeClass([vue.unref(f).be("panel","btn"),"confirm"]),onClick:ie=>w()},vue.toDisplayString(vue.unref(v)("el.datepicker.confirm")),11,["onClick"])],2)],2)):vue.createCommentVNode("v-if",!0)]),_:1},8,["name"]))}});var TimePickPanel=_export_sfc$1(_sfc_main$B,[["__file","panel-time-pick.vue"]]);const ROOT_PICKER_INJECTION_KEY=Symbol(),ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY="ElIsDefaultFormat",datePickerProps=buildProps({...timePickerDefaultProps,type:{type:definePropType(String),default:"date"}}),selectionModes=["date","dates","year","years","month","months","week","range"],datePickerSharedProps=buildProps({disabledDate:{type:definePropType(Function)},date:{type:definePropType(Object),required:!0},minDate:{type:definePropType(Object)},maxDate:{type:definePropType(Object)},parsedValue:{type:definePropType([Object,Array])},rangeState:{type:definePropType(Object),default:()=>({endDate:null,selecting:!1})}}),panelSharedProps=buildProps({type:{type:definePropType(String),required:!0,values:datePickTypes},dateFormat:String,timeFormat:String,showNow:{type:Boolean,default:!0}}),panelRangeSharedProps=buildProps({unlinkPanels:Boolean,visible:Boolean,parsedValue:{type:definePropType(Array)}}),selectionModeWithDefault=e=>({type:String,values:selectionModes,default:e}),panelDatePickProps=buildProps({...panelSharedProps,parsedValue:{type:definePropType([Object,Array])},visible:{type:Boolean},format:{type:String,default:""}}),isValidRange=e=>{if(!isArray$1(e))return!1;const[t,n]=e;return dayjs.isDayjs(t)&&dayjs.isDayjs(n)&&dayjs(t).isValid()&&dayjs(n).isValid()&&t.isSameOrBefore(n)},getDefaultValue=(e,{lang:t,step:n=1,unit:r,unlinkPanels:i})=>{let a;if(isArray$1(e)){let[o,u]=e.map(l=>dayjs(l).locale(t));return i||(u=o.add(n,r)),[o,u]}else e?a=dayjs(e):a=dayjs();return a=a.locale(t),[a,a.add(n,r)]},buildPickerTable=(e,t,{columnIndexOffset:n,startDate:r,nextEndDate:i,now:a,unit:o,relativeDateGetter:u,setCellMetadata:l,setRowMetadata:c})=>{for(let p=0;p<e.row;p++){const d=t[p];for(let f=0;f<e.column;f++){let v=d[f+n];v||(v={row:p,column:f,type:"normal",inRange:!1,start:!1,end:!1});const h=p*e.column+f,m=u(h);v.dayjs=m,v.date=m.toDate(),v.timestamp=m.valueOf(),v.type="normal",v.inRange=!!(r&&m.isSameOrAfter(r,o)&&i&&m.isSameOrBefore(i,o))||!!(r&&m.isSameOrBefore(r,o)&&i&&m.isSameOrAfter(i,o)),r!=null&&r.isSameOrAfter(i)?(v.start=!!i&&m.isSame(i,o),v.end=r&&m.isSame(r,o)):(v.start=!!r&&m.isSame(r,o),v.end=!!i&&m.isSame(i,o)),m.isSame(a,o)&&(v.type="today"),l==null||l(v,{rowIndex:p,columnIndex:f}),d[f+n]=v}c==null||c(d)}},datesInMonth=(e,t,n,r)=>{const i=dayjs().locale(r).startOf("month").month(n).year(t).hour(e.hour()).minute(e.minute()).second(e.second()),a=i.daysInMonth();return rangeArr(a).map(o=>i.add(o,"day").toDate())},getValidDateOfMonth=(e,t,n,r,i)=>{const a=dayjs().year(t).month(n).startOf("month").hour(e.hour()).minute(e.minute()).second(e.second()),o=datesInMonth(e,t,n,r).find(u=>!(i!=null&&i(u)));return o?dayjs(o).locale(r):a.locale(r)},getValidDateOfYear=(e,t,n)=>{const r=e.year();if(!(n!=null&&n(e.toDate())))return e.locale(t);const i=e.month();if(!datesInMonth(e,r,i,t).every(n))return getValidDateOfMonth(e,r,i,t,n);for(let a=0;a<12;a++)if(!datesInMonth(e,r,a,t).every(n))return getValidDateOfMonth(e,r,a,t,n);return e},correctlyParseUserInput=(e,t,n,r)=>{if(isArray$1(e))return e.map(i=>correctlyParseUserInput(i,t,n,r));if(isString$1(e)){const i=r.value?dayjs(e):dayjs(e,t);if(!i.isValid())return i}return dayjs(e,t).locale(n)},basicDateTableProps=buildProps({...datePickerSharedProps,cellClassName:{type:definePropType(Function)},showWeekNumber:Boolean,selectionMode:selectionModeWithDefault("date")}),basicDateTableEmits=["changerange","pick","select"],isNormalDay=(e="")=>["normal","today"].includes(e),useBasicDateTable=(e,t)=>{const{lang:n}=useLocale(),r=vue.ref(),i=vue.ref(),a=vue.ref(),o=vue.ref(),u=vue.ref([[],[],[],[],[],[]]);let l=!1;const c=e.date.$locale().weekStart||7,p=e.date.locale("en").localeData().weekdaysShort().map(V=>V.toLowerCase()),d=vue.computed(()=>c>3?7-c:-c),f=vue.computed(()=>{const V=e.date.startOf("month");return V.subtract(V.day()||7,"day")}),v=vue.computed(()=>p.concat(p).slice(c,c+7)),h=vue.computed(()=>flatten$1(vue.unref(S)).some(V=>V.isCurrent)),m=vue.computed(()=>{const V=e.date.startOf("month"),ie=V.day()||7,re=V.daysInMonth(),ae=V.subtract(1,"month").daysInMonth();return{startOfMonthDay:ie,dateCountOfMonth:re,dateCountOfLastMonth:ae}}),y=vue.computed(()=>e.selectionMode==="dates"?castArray(e.parsedValue):[]),g=(V,{count:ie,rowIndex:re,columnIndex:ae})=>{const{startOfMonthDay:le,dateCountOfMonth:_e,dateCountOfLastMonth:Oe}=vue.unref(m),Ce=vue.unref(d);if(re>=0&&re<=1){const xe=le+Ce<0?7+le+Ce:le+Ce;if(ae+re*7>=xe)return V.text=ie,!0;V.text=Oe-(xe-ae%7)+1+re*7,V.type="prev-month"}else return ie<=_e?V.text=ie:(V.text=ie-_e,V.type="next-month"),!0;return!1},b=(V,{columnIndex:ie,rowIndex:re},ae)=>{const{disabledDate:le,cellClassName:_e}=e,Oe=vue.unref(y),Ce=g(V,{count:ae,rowIndex:re,columnIndex:ie}),xe=V.dayjs.toDate();return V.selected=Oe.find(Fe=>Fe.isSame(V.dayjs,"day")),V.isSelected=!!V.selected,V.isCurrent=w(V),V.disabled=le==null?void 0:le(xe),V.customClass=_e==null?void 0:_e(xe),Ce},_=V=>{if(e.selectionMode==="week"){const[ie,re]=e.showWeekNumber?[1,7]:[0,6],ae=$(V[ie+1]);V[ie].inRange=ae,V[ie].start=ae,V[re].inRange=ae,V[re].end=ae}},S=vue.computed(()=>{const{minDate:V,maxDate:ie,rangeState:re,showWeekNumber:ae}=e,le=vue.unref(d),_e=vue.unref(u),Oe="day";let Ce=1;if(ae)for(let xe=0;xe<6;xe++)_e[xe][0]||(_e[xe][0]={type:"week",text:vue.unref(f).add(xe*7+1,Oe).week()});return buildPickerTable({row:6,column:7},_e,{startDate:V,columnIndexOffset:ae?1:0,nextEndDate:re.endDate||ie||re.selecting&&V||null,now:dayjs().locale(vue.unref(n)).startOf(Oe),unit:Oe,relativeDateGetter:xe=>vue.unref(f).add(xe-le,Oe),setCellMetadata:(...xe)=>{b(...xe,Ce)&&(Ce+=1)},setRowMetadata:_}),_e});vue.watch(()=>e.date,async()=>{var V;(V=vue.unref(r))!=null&&V.contains(document.activeElement)&&(await vue.nextTick(),await T())});const T=async()=>{var V;return(V=vue.unref(i))==null?void 0:V.focus()},w=V=>e.selectionMode==="date"&&isNormalDay(V.type)&&x(V,e.parsedValue),x=(V,ie)=>ie?dayjs(ie).locale(vue.unref(n)).isSame(e.date.date(Number(V.text)),"day"):!1,L=(V,ie)=>{const re=V*7+(ie-(e.showWeekNumber?1:0))-vue.unref(d);return vue.unref(f).add(re,"day")},M=V=>{var ie;if(!e.rangeState.selecting)return;let re=V.target;if(re.tagName==="SPAN"&&(re=(ie=re.parentNode)==null?void 0:ie.parentNode),re.tagName==="DIV"&&(re=re.parentNode),re.tagName!=="TD")return;const ae=re.parentNode.rowIndex-1,le=re.cellIndex;vue.unref(S)[ae][le].disabled||(ae!==vue.unref(a)||le!==vue.unref(o))&&(a.value=ae,o.value=le,t("changerange",{selecting:!0,endDate:L(ae,le)}))},z=V=>!vue.unref(h)&&(V==null?void 0:V.text)===1&&V.type==="normal"||V.isCurrent,A=V=>{l||vue.unref(h)||e.selectionMode!=="date"||Y(V,!0)},ue=V=>{V.target.closest("td")&&(l=!0)},he=V=>{V.target.closest("td")&&(l=!1)},j=V=>{!e.rangeState.selecting||!e.minDate?(t("pick",{minDate:V,maxDate:null}),t("select",!0)):(V>=e.minDate?t("pick",{minDate:e.minDate,maxDate:V}):t("pick",{minDate:V,maxDate:e.minDate}),t("select",!1))},O=V=>{const ie=V.week(),re=`${V.year()}w${ie}`;t("pick",{year:V.year(),week:ie,value:re,date:V.startOf("week")})},F=(V,ie)=>{const re=ie?castArray(e.parsedValue).filter(ae=>(ae==null?void 0:ae.valueOf())!==V.valueOf()):castArray(e.parsedValue).concat([V]);t("pick",re)},Y=(V,ie=!1)=>{const re=V.target.closest("td");if(!re)return;const ae=re.parentNode.rowIndex-1,le=re.cellIndex,_e=vue.unref(S)[ae][le];if(_e.disabled||_e.type==="week")return;const Oe=L(ae,le);switch(e.selectionMode){case"range":{j(Oe);break}case"date":{t("pick",Oe,ie);break}case"week":{O(Oe);break}case"dates":{F(Oe,!!_e.selected);break}}},$=V=>{if(e.selectionMode!=="week")return!1;let ie=e.date.startOf("day");if(V.type==="prev-month"&&(ie=ie.subtract(1,"month")),V.type==="next-month"&&(ie=ie.add(1,"month")),ie=ie.date(Number.parseInt(V.text,10)),e.parsedValue&&!isArray$1(e.parsedValue)){const re=(e.parsedValue.day()-c+7)%7-1;return e.parsedValue.subtract(re,"day").isSame(ie,"day")}return!1};return{WEEKS:v,rows:S,tbodyRef:r,currentCellRef:i,focus:T,isCurrent:w,isWeekActive:$,isSelectedCell:z,handlePickDate:Y,handleMouseUp:he,handleMouseDown:ue,handleMouseMove:M,handleFocus:A}},useBasicDateTableDOM=(e,{isCurrent:t,isWeekActive:n})=>{const r=useNamespace("date-table"),{t:i}=useLocale(),a=vue.computed(()=>[r.b(),{"is-week-mode":e.selectionMode==="week"}]),o=vue.computed(()=>i("el.datepicker.dateTablePrompt")),u=vue.computed(()=>i("el.datepicker.week"));return{tableKls:a,tableLabel:o,weekLabel:u,getCellClasses:p=>{const d=[];return isNormalDay(p.type)&&!p.disabled?(d.push("available"),p.type==="today"&&d.push("today")):d.push(p.type),t(p)&&d.push("current"),p.inRange&&(isNormalDay(p.type)||e.selectionMode==="week")&&(d.push("in-range"),p.start&&d.push("start-date"),p.end&&d.push("end-date")),p.disabled&&d.push("disabled"),p.selected&&d.push("selected"),p.customClass&&d.push(p.customClass),d.join(" ")},getRowKls:p=>[r.e("row"),{current:n(p)}],t:i}},basicCellProps=buildProps({cell:{type:definePropType(Object)}});var ElDatePickerCell=vue.defineComponent({name:"ElDatePickerCell",props:basicCellProps,setup(e){const t=useNamespace("date-table-cell"),{slots:n}=vue.inject(ROOT_PICKER_INJECTION_KEY);return()=>{const{cell:r}=e;return vue.renderSlot(n,"default",{...r},()=>{var i;return[vue.createVNode("div",{class:t.b()},[vue.createVNode("span",{class:t.e("text")},[(i=r==null?void 0:r.renderText)!=null?i:r==null?void 0:r.text])])]})}}});const _sfc_main$A=vue.defineComponent({__name:"basic-date-table",props:basicDateTableProps,emits:basicDateTableEmits,setup(e,{expose:t,emit:n}){const r=e,{WEEKS:i,rows:a,tbodyRef:o,currentCellRef:u,focus:l,isCurrent:c,isWeekActive:p,isSelectedCell:d,handlePickDate:f,handleMouseUp:v,handleMouseDown:h,handleMouseMove:m,handleFocus:y}=useBasicDateTable(r,n),{tableLabel:g,tableKls:b,weekLabel:_,getCellClasses:S,getRowKls:T,t:w}=useBasicDateTableDOM(r,{isCurrent:c,isWeekActive:p});let x=!1;return vue.onBeforeUnmount(()=>{x=!0}),t({focus:l}),(L,M)=>(vue.openBlock(),vue.createElementBlock("table",{"aria-label":vue.unref(g),class:vue.normalizeClass(vue.unref(b)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:vue.unref(f),onMousemove:vue.unref(m),onMousedown:vue.withModifiers(vue.unref(h),["prevent"]),onMouseup:vue.unref(v)},[vue.createElementVNode("tbody",{ref_key:"tbodyRef",ref:o},[vue.createElementVNode("tr",null,[L.showWeekNumber?(vue.openBlock(),vue.createElementBlock("th",{key:0,scope:"col"},vue.toDisplayString(vue.unref(_)),1)):vue.createCommentVNode("v-if",!0),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(i),(z,A)=>(vue.openBlock(),vue.createElementBlock("th",{key:A,"aria-label":vue.unref(w)("el.datepicker.weeksFull."+z),scope:"col"},vue.toDisplayString(vue.unref(w)("el.datepicker.weeks."+z)),9,["aria-label"]))),128))]),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(a),(z,A)=>(vue.openBlock(),vue.createElementBlock("tr",{key:A,class:vue.normalizeClass(vue.unref(T)(z[1]))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(z,(ue,he)=>(vue.openBlock(),vue.createElementBlock("td",{key:`${A}.${he}`,ref_for:!0,ref:j=>!vue.unref(x)&&vue.unref(d)(ue)&&(u.value=j),class:vue.normalizeClass(vue.unref(S)(ue)),"aria-current":ue.isCurrent?"date":void 0,"aria-selected":ue.isCurrent,tabindex:vue.unref(d)(ue)?0:-1,onFocus:vue.unref(y)},[vue.createVNode(vue.unref(ElDatePickerCell),{cell:ue},null,8,["cell"])],42,["aria-current","aria-selected","tabindex","onFocus"]))),128))],2))),128))],512)],42,["aria-label","onClick","onMousemove","onMousedown","onMouseup"]))}});var DateTable=_export_sfc$1(_sfc_main$A,[["__file","basic-date-table.vue"]]);const basicMonthTableProps=buildProps({...datePickerSharedProps,selectionMode:selectionModeWithDefault("month")}),_sfc_main$z=vue.defineComponent({__name:"basic-month-table",props:basicMonthTableProps,emits:["changerange","pick","select"],setup(e,{expose:t,emit:n}){const r=e,i=useNamespace("month-table"),{t:a,lang:o}=useLocale(),u=vue.ref(),l=vue.ref(),c=vue.ref(r.date.locale("en").localeData().monthsShort().map(_=>_.toLowerCase())),p=vue.ref([[],[],[]]),d=vue.ref(),f=vue.ref(),v=vue.computed(()=>{var _,S;const T=p.value,w=dayjs().locale(o.value).startOf("month");for(let x=0;x<3;x++){const L=T[x];for(let M=0;M<4;M++){const z=L[M]||(L[M]={row:x,column:M,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1});z.type="normal";const A=x*4+M,ue=r.date.startOf("year").month(A),he=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;z.inRange=!!(r.minDate&&ue.isSameOrAfter(r.minDate,"month")&&he&&ue.isSameOrBefore(he,"month"))||!!(r.minDate&&ue.isSameOrBefore(r.minDate,"month")&&he&&ue.isSameOrAfter(he,"month")),(_=r.minDate)!=null&&_.isSameOrAfter(he)?(z.start=!!(he&&ue.isSame(he,"month")),z.end=r.minDate&&ue.isSame(r.minDate,"month")):(z.start=!!(r.minDate&&ue.isSame(r.minDate,"month")),z.end=!!(he&&ue.isSame(he,"month"))),w.isSame(ue)&&(z.type="today"),z.text=A,z.disabled=((S=r.disabledDate)==null?void 0:S.call(r,ue.toDate()))||!1}}return T}),h=()=>{var _;(_=l.value)==null||_.focus()},m=_=>{const S={},T=r.date.year(),w=new Date,x=_.text;return S.disabled=r.disabledDate?datesInMonth(r.date,T,x,o.value).every(r.disabledDate):!1,S.current=castArray(r.parsedValue).findIndex(L=>dayjs.isDayjs(L)&&L.year()===T&&L.month()===x)>=0,S.today=w.getFullYear()===T&&w.getMonth()===x,_.inRange&&(S["in-range"]=!0,_.start&&(S["start-date"]=!0),_.end&&(S["end-date"]=!0)),S},y=_=>{const S=r.date.year(),T=_.text;return castArray(r.date).findIndex(w=>w.year()===S&&w.month()===T)>=0},g=_=>{var S;if(!r.rangeState.selecting)return;let T=_.target;if(T.tagName==="SPAN"&&(T=(S=T.parentNode)==null?void 0:S.parentNode),T.tagName==="DIV"&&(T=T.parentNode),T.tagName!=="TD")return;const w=T.parentNode.rowIndex,x=T.cellIndex;v.value[w][x].disabled||(w!==d.value||x!==f.value)&&(d.value=w,f.value=x,n("changerange",{selecting:!0,endDate:r.date.startOf("year").month(w*4+x)}))},b=_=>{var S;const T=(S=_.target)==null?void 0:S.closest("td");if((T==null?void 0:T.tagName)!=="TD"||hasClass(T,"disabled"))return;const w=T.cellIndex,L=T.parentNode.rowIndex*4+w,M=r.date.startOf("year").month(L);if(r.selectionMode==="months"){if(_.type==="keydown"){n("pick",castArray(r.parsedValue),!1);return}const z=getValidDateOfMonth(r.date,r.date.year(),L,o.value,r.disabledDate),A=hasClass(T,"current")?castArray(r.parsedValue).filter(ue=>(ue==null?void 0:ue.year())!==z.year()||(ue==null?void 0:ue.month())!==z.month()):castArray(r.parsedValue).concat([dayjs(z)]);n("pick",A)}else r.selectionMode==="range"?r.rangeState.selecting?(r.minDate&&M>=r.minDate?n("pick",{minDate:r.minDate,maxDate:M}):n("pick",{minDate:M,maxDate:r.minDate}),n("select",!1)):(n("pick",{minDate:M,maxDate:null}),n("select",!0)):n("pick",L)};return vue.watch(()=>r.date,async()=>{var _,S;(_=u.value)!=null&&_.contains(document.activeElement)&&(await vue.nextTick(),(S=l.value)==null||S.focus())}),t({focus:h}),(_,S)=>(vue.openBlock(),vue.createElementBlock("table",{role:"grid","aria-label":vue.unref(a)("el.datepicker.monthTablePrompt"),class:vue.normalizeClass(vue.unref(i).b()),onClick:b,onMousemove:g},[vue.createElementVNode("tbody",{ref_key:"tbodyRef",ref:u},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(v),(T,w)=>(vue.openBlock(),vue.createElementBlock("tr",{key:w},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(T,(x,L)=>(vue.openBlock(),vue.createElementBlock("td",{key:L,ref_for:!0,ref:M=>y(x)&&(l.value=M),class:vue.normalizeClass(m(x)),"aria-selected":`${y(x)}`,"aria-label":vue.unref(a)(`el.datepicker.month${+x.text+1}`),tabindex:y(x)?0:-1,onKeydown:[vue.withKeys(vue.withModifiers(b,["prevent","stop"]),["space"]),vue.withKeys(vue.withModifiers(b,["prevent","stop"]),["enter"])]},[vue.createVNode(vue.unref(ElDatePickerCell),{cell:{...x,renderText:vue.unref(a)("el.datepicker.months."+c.value[x.text])}},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var MonthTable=_export_sfc$1(_sfc_main$z,[["__file","basic-month-table.vue"]]);const basicYearTableProps=buildProps({...datePickerSharedProps,selectionMode:selectionModeWithDefault("year")}),_sfc_main$y=vue.defineComponent({__name:"basic-year-table",props:basicYearTableProps,emits:["changerange","pick","select"],setup(e,{expose:t,emit:n}){const r=e,i=(S,T)=>{const w=dayjs(String(S)).locale(T).startOf("year"),L=w.endOf("year").dayOfYear();return rangeArr(L).map(M=>w.add(M,"day").toDate())},a=useNamespace("year-table"),{t:o,lang:u}=useLocale(),l=vue.ref(),c=vue.ref(),p=vue.computed(()=>Math.floor(r.date.year()/10)*10),d=vue.ref([[],[],[]]),f=vue.ref(),v=vue.ref(),h=vue.computed(()=>{var S;const T=d.value,w=dayjs().locale(u.value).startOf("year");for(let x=0;x<3;x++){const L=T[x];for(let M=0;M<4&&!(x*4+M>=10);M++){let z=L[M];z||(z={row:x,column:M,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1}),z.type="normal";const A=x*4+M+p.value,ue=dayjs().year(A),he=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;z.inRange=!!(r.minDate&&ue.isSameOrAfter(r.minDate,"year")&&he&&ue.isSameOrBefore(he,"year"))||!!(r.minDate&&ue.isSameOrBefore(r.minDate,"year")&&he&&ue.isSameOrAfter(he,"year")),(S=r.minDate)!=null&&S.isSameOrAfter(he)?(z.start=!!(he&&ue.isSame(he,"year")),z.end=!!(r.minDate&&ue.isSame(r.minDate,"year"))):(z.start=!!(r.minDate&&ue.isSame(r.minDate,"year")),z.end=!!(he&&ue.isSame(he,"year"))),w.isSame(ue)&&(z.type="today"),z.text=A;const O=ue.toDate();z.disabled=r.disabledDate&&r.disabledDate(O)||!1,L[M]=z}}return T}),m=()=>{var S;(S=c.value)==null||S.focus()},y=S=>{const T={},w=dayjs().locale(u.value),x=S.text;return T.disabled=r.disabledDate?i(x,u.value).every(r.disabledDate):!1,T.today=w.year()===x,T.current=castArray(r.parsedValue).findIndex(L=>L.year()===x)>=0,S.inRange&&(T["in-range"]=!0,S.start&&(T["start-date"]=!0),S.end&&(T["end-date"]=!0)),T},g=S=>{const T=S.text;return castArray(r.date).findIndex(w=>w.year()===T)>=0},b=S=>{var T;const w=(T=S.target)==null?void 0:T.closest("td");if(!w||!w.textContent||hasClass(w,"disabled"))return;const x=w.cellIndex,M=w.parentNode.rowIndex*4+x+p.value,z=dayjs().year(M);if(r.selectionMode==="range")r.rangeState.selecting?(r.minDate&&z>=r.minDate?n("pick",{minDate:r.minDate,maxDate:z}):n("pick",{minDate:z,maxDate:r.minDate}),n("select",!1)):(n("pick",{minDate:z,maxDate:null}),n("select",!0));else if(r.selectionMode==="years"){if(S.type==="keydown"){n("pick",castArray(r.parsedValue),!1);return}const A=getValidDateOfYear(z.startOf("year"),u.value,r.disabledDate),ue=hasClass(w,"current")?castArray(r.parsedValue).filter(he=>(he==null?void 0:he.year())!==M):castArray(r.parsedValue).concat([A]);n("pick",ue)}else n("pick",M)},_=S=>{var T;if(!r.rangeState.selecting)return;const w=(T=S.target)==null?void 0:T.closest("td");if(!w)return;const x=w.parentNode.rowIndex,L=w.cellIndex;h.value[x][L].disabled||(x!==f.value||L!==v.value)&&(f.value=x,v.value=L,n("changerange",{selecting:!0,endDate:dayjs().year(p.value).add(x*4+L,"year")}))};return vue.watch(()=>r.date,async()=>{var S,T;(S=l.value)!=null&&S.contains(document.activeElement)&&(await vue.nextTick(),(T=c.value)==null||T.focus())}),t({focus:m}),(S,T)=>(vue.openBlock(),vue.createElementBlock("table",{role:"grid","aria-label":vue.unref(o)("el.datepicker.yearTablePrompt"),class:vue.normalizeClass(vue.unref(a).b()),onClick:b,onMousemove:_},[vue.createElementVNode("tbody",{ref_key:"tbodyRef",ref:l},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(h),(w,x)=>(vue.openBlock(),vue.createElementBlock("tr",{key:x},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(w,(L,M)=>(vue.openBlock(),vue.createElementBlock("td",{key:`${x}_${M}`,ref_for:!0,ref:z=>g(L)&&(c.value=z),class:vue.normalizeClass(["available",y(L)]),"aria-selected":g(L),"aria-label":String(L.text),tabindex:g(L)?0:-1,onKeydown:[vue.withKeys(vue.withModifiers(b,["prevent","stop"]),["space"]),vue.withKeys(vue.withModifiers(b,["prevent","stop"]),["enter"])]},[vue.createVNode(vue.unref(ElDatePickerCell),{cell:L},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var YearTable=_export_sfc$1(_sfc_main$y,[["__file","basic-year-table.vue"]]);const _sfc_main$x=vue.defineComponent({__name:"panel-date-pick",props:panelDatePickProps,emits:["pick","set-picker-option","panel-change"],setup(e,{emit:t}){const n=e,r=(D,oe,k)=>!0,i=useNamespace("picker-panel"),a=useNamespace("date-picker"),o=vue.useAttrs(),u=vue.useSlots(),{t:l,lang:c}=useLocale(),p=vue.inject(PICKER_BASE_INJECTION_KEY),d=vue.inject(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY),f=vue.inject(TOOLTIP_INJECTION_KEY),{shortcuts:v,disabledDate:h,cellClassName:m,defaultTime:y}=p.props,g=vue.toRef(p.props,"defaultValue"),b=vue.ref(),_=vue.ref(dayjs().locale(c.value)),S=vue.ref(!1);let T=!1;const w=vue.computed(()=>dayjs(y).locale(c.value)),x=vue.computed(()=>_.value.month()),L=vue.computed(()=>_.value.year()),M=vue.ref([]),z=vue.ref(null),A=vue.ref(null),ue=D=>M.value.length>0?r(D,M.value,n.format||"HH:mm:ss"):!0,he=D=>y&&!Sn.value&&!S.value&&!T?w.value.year(D.year()).month(D.month()).date(D.date()):Fe.value?D.millisecond(0):D.startOf("day"),j=(D,...oe)=>{if(!D)t("pick",D,...oe);else if(isArray$1(D)){const k=D.map(he);t("pick",k,...oe)}else t("pick",he(D),...oe);z.value=null,A.value=null,S.value=!1,T=!1},O=async(D,oe)=>{if(re.value==="date"){D=D;let k=n.parsedValue?n.parsedValue.year(D.year()).month(D.month()).date(D.date()):D;ue(k)||(k=M.value[0][0].year(D.year()).month(D.month()).date(D.date())),_.value=k,j(k,Fe.value||oe),n.type==="datetime"&&(await vue.nextTick(),Rn())}else re.value==="week"?j(D.date):re.value==="dates"&&j(D,!0)},F=D=>{const oe=D?"add":"subtract";_.value=_.value[oe](1,"month"),vn("month")},Y=D=>{const oe=_.value,k=D?"add":"subtract";_.value=$.value==="year"?oe[k](10,"year"):oe[k](1,"year"),vn("year")},$=vue.ref("date"),V=vue.computed(()=>{const D=l("el.datepicker.year");if($.value==="year"){const oe=Math.floor(L.value/10)*10;return D?`${oe} ${D} - ${oe+9} ${D}`:`${oe} - ${oe+9}`}return`${L.value} ${D}`}),ie=D=>{const oe=isFunction$1(D.value)?D.value():D.value;if(oe){T=!0,j(dayjs(oe).locale(c.value));return}D.onClick&&D.onClick({attrs:o,slots:u,emit:t})},re=vue.computed(()=>{const{type:D}=n;return["week","month","months","year","years","dates"].includes(D)?D:"date"}),ae=vue.computed(()=>re.value==="dates"||re.value==="months"||re.value==="years"),le=vue.computed(()=>re.value==="date"?$.value:re.value),_e=vue.computed(()=>!!v.length),Oe=async(D,oe)=>{re.value==="month"?(_.value=getValidDateOfMonth(_.value,_.value.year(),D,c.value,h),j(_.value,!1)):re.value==="months"?j(D,oe??!0):(_.value=getValidDateOfMonth(_.value,_.value.year(),D,c.value,h),$.value="date",["month","year","date","week"].includes(re.value)&&(j(_.value,!0),await vue.nextTick(),Rn())),vn("month")},Ce=async(D,oe)=>{if(re.value==="year"){const k=_.value.startOf("year").year(D);_.value=getValidDateOfYear(k,c.value,h),j(_.value,!1)}else if(re.value==="years")j(D,oe??!0);else{const k=_.value.year(D);_.value=getValidDateOfYear(k,c.value,h),$.value="month",["month","year","date","week"].includes(re.value)&&(j(_.value,!0),await vue.nextTick(),Rn())}vn("year")},xe=async D=>{$.value=D,await vue.nextTick(),Rn()},Fe=vue.computed(()=>n.type==="datetime"||n.type==="datetimerange"),At=vue.computed(()=>{const D=Fe.value||re.value==="dates",oe=re.value==="years",k=re.value==="months",pe=$.value==="date",Ne=$.value==="year",ze=$.value==="month";return D&&pe||oe&&Ne||k&&ze}),Dt=vue.computed(()=>h?n.parsedValue?isArray$1(n.parsedValue)?h(n.parsedValue[0].toDate()):h(n.parsedValue.toDate()):!0:!1),Lt=()=>{if(ae.value)j(n.parsedValue);else{let D=n.parsedValue;if(!D){const oe=dayjs(y).locale(c.value),k=Vn();D=oe.year(k.year()).month(k.month()).date(k.date())}_.value=D,j(D)}},_n=vue.computed(()=>h?h(dayjs().locale(c.value).toDate()):!1),Cn=()=>{const oe=dayjs().locale(c.value).toDate();S.value=!0,(!h||!h(oe))&&ue(oe)&&(_.value=dayjs().locale(c.value),j(_.value))},An=vue.computed(()=>n.timeFormat||extractTimeFormat(n.format)),Tn=vue.computed(()=>n.dateFormat||extractDateFormat(n.format)),Sn=vue.computed(()=>{if(A.value)return A.value;if(!(!n.parsedValue&&!g.value))return(n.parsedValue||_.value).format(An.value)}),bn=vue.computed(()=>{if(z.value)return z.value;if(!(!n.parsedValue&&!g.value))return(n.parsedValue||_.value).format(Tn.value)}),wn=vue.ref(!1),Ue=()=>{wn.value=!0},En=()=>{wn.value=!1},Pn=D=>({hour:D.hour(),minute:D.minute(),second:D.second(),year:D.year(),month:D.month(),date:D.date()}),Mn=(D,oe,k)=>{const{hour:pe,minute:Ne,second:ze}=Pn(D),jt=n.parsedValue?n.parsedValue.hour(pe).minute(Ne).second(ze):D;_.value=jt,j(_.value,!0),k||(wn.value=oe)},$n=D=>{const oe=dayjs(D,An.value).locale(c.value);if(oe.isValid()&&ue(oe)){const{year:k,month:pe,date:Ne}=Pn(_.value);_.value=oe.year(k).month(pe).date(Ne),A.value=null,wn.value=!1,j(_.value,!0)}},$e=D=>{const oe=correctlyParseUserInput(D,Tn.value,c.value,d);if(oe.isValid()){if(h&&h(oe.toDate()))return;const{hour:k,minute:pe,second:Ne}=Pn(_.value);_.value=oe.hour(k).minute(pe).second(Ne),z.value=null,j(_.value,!0)}},Et=D=>dayjs.isDayjs(D)&&D.isValid()&&(h?!h(D.toDate()):!0),On=D=>isArray$1(D)?D.map(oe=>oe.format(n.format)):D.format(n.format),In=D=>correctlyParseUserInput(D,n.format,c.value,d),Vn=()=>{const D=dayjs(g.value).locale(c.value);if(!g.value){const oe=w.value;return dayjs().hour(oe.hour()).minute(oe.minute()).second(oe.second()).locale(c.value)}return D},Rn=()=>{var D;["week","month","year","date"].includes(re.value)&&((D=b.value)==null||D.focus())},hn=()=>{Rn(),re.value==="week"&&xn(EVENT_CODE.down)},zn=D=>{const{code:oe}=D;[EVENT_CODE.up,EVENT_CODE.down,EVENT_CODE.left,EVENT_CODE.right,EVENT_CODE.home,EVENT_CODE.end,EVENT_CODE.pageUp,EVENT_CODE.pageDown].includes(oe)&&(xn(oe),D.stopPropagation(),D.preventDefault()),[EVENT_CODE.enter,EVENT_CODE.space,EVENT_CODE.numpadEnter].includes(oe)&&z.value===null&&A.value===null&&(D.preventDefault(),j(_.value,!1))},xn=D=>{var oe;const{up:k,down:pe,left:Ne,right:ze,home:jt,end:Nn,pageUp:kn,pageDown:qn}=EVENT_CODE,Un={year:{[k]:-4,[pe]:4,[Ne]:-1,[ze]:1,offset:(Ie,kt)=>Ie.setFullYear(Ie.getFullYear()+kt)},month:{[k]:-4,[pe]:4,[Ne]:-1,[ze]:1,offset:(Ie,kt)=>Ie.setMonth(Ie.getMonth()+kt)},week:{[k]:-1,[pe]:1,[Ne]:-1,[ze]:1,offset:(Ie,kt)=>Ie.setDate(Ie.getDate()+kt*7)},date:{[k]:-7,[pe]:7,[Ne]:-1,[ze]:1,[jt]:Ie=>-Ie.getDay(),[Nn]:Ie=>-Ie.getDay()+6,[kn]:Ie=>-new Date(Ie.getFullYear(),Ie.getMonth(),0).getDate(),[qn]:Ie=>new Date(Ie.getFullYear(),Ie.getMonth()+1,0).getDate(),offset:(Ie,kt)=>Ie.setDate(Ie.getDate()+kt)}},Bn=_.value.toDate();for(;Math.abs(_.value.diff(Bn,"year",!0))<1;){const Ie=Un[le.value];if(!Ie)return;if(Ie.offset(Bn,isFunction$1(Ie[D])?Ie[D](Bn):(oe=Ie[D])!=null?oe:0),h&&h(Bn))break;const kt=dayjs(Bn).locale(c.value);_.value=kt,t("pick",kt,!0);break}},vn=D=>{t("panel-change",_.value.toDate(),D,$.value)};return vue.watch(()=>re.value,D=>{if(["month","year"].includes(D)){$.value=D;return}else if(D==="years"){$.value="year";return}else if(D==="months"){$.value="month";return}$.value="date"},{immediate:!0}),vue.watch(()=>$.value,()=>{f==null||f.updatePopper()}),vue.watch(()=>g.value,D=>{D&&(_.value=Vn())},{immediate:!0}),vue.watch(()=>n.parsedValue,D=>{if(D){if(ae.value||isArray$1(D))return;_.value=D}else _.value=Vn()},{immediate:!0}),t("set-picker-option",["isValidValue",Et]),t("set-picker-option",["formatToString",On]),t("set-picker-option",["parseUserInput",In]),t("set-picker-option",["handleFocusPicker",hn]),(D,oe)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([vue.unref(i).b(),vue.unref(a).b(),{"has-sidebar":D.$slots.sidebar||vue.unref(_e),"has-time":vue.unref(Fe)}])},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(i).e("body-wrapper"))},[vue.renderSlot(D.$slots,"sidebar",{class:vue.normalizeClass(vue.unref(i).e("sidebar"))}),vue.unref(_e)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(i).e("sidebar"))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(v),(k,pe)=>(vue.openBlock(),vue.createElementBlock("button",{key:pe,type:"button",class:vue.normalizeClass(vue.unref(i).e("shortcut")),onClick:Ne=>ie(k)},vue.toDisplayString(k.text),11,["onClick"]))),128))],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(i).e("body"))},[vue.unref(Fe)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(a).e("time-header"))},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(a).e("editor-wrap"))},[vue.createVNode(vue.unref(ElInput),{placeholder:vue.unref(l)("el.datepicker.selectDate"),"model-value":vue.unref(bn),size:"small","validate-event":!1,onInput:k=>z.value=k,onChange:$e},null,8,["placeholder","model-value","onInput"])],2),vue.withDirectives((vue.openBlock(),vue.createElementBlock("span",{class:vue.normalizeClass(vue.unref(a).e("editor-wrap"))},[vue.createVNode(vue.unref(ElInput),{placeholder:vue.unref(l)("el.datepicker.selectTime"),"model-value":vue.unref(Sn),size:"small","validate-event":!1,onFocus:Ue,onInput:k=>A.value=k,onChange:$n},null,8,["placeholder","model-value","onInput"]),vue.createVNode(vue.unref(TimePickPanel),{visible:wn.value,format:vue.unref(An),"parsed-value":_.value,onPick:Mn},null,8,["visible","format","parsed-value"])],2)),[[vue.unref(ClickOutside),En]])],2)):vue.createCommentVNode("v-if",!0),vue.withDirectives(vue.createElementVNode("div",{class:vue.normalizeClass([vue.unref(a).e("header"),($.value==="year"||$.value==="month")&&vue.unref(a).e("header--bordered")])},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(a).e("prev-btn"))},[vue.createElementVNode("button",{type:"button","aria-label":vue.unref(l)("el.datepicker.prevYear"),class:vue.normalizeClass(["d-arrow-left",vue.unref(i).e("icon-btn")]),onClick:k=>Y(!1)},[vue.renderSlot(D.$slots,"prev-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_left_default))]),_:1})])],10,["aria-label","onClick"]),vue.withDirectives(vue.createElementVNode("button",{type:"button","aria-label":vue.unref(l)("el.datepicker.prevMonth"),class:vue.normalizeClass([vue.unref(i).e("icon-btn"),"arrow-left"]),onClick:k=>F(!1)},[vue.renderSlot(D.$slots,"prev-month",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_left_default))]),_:1})])],10,["aria-label","onClick"]),[[vue.vShow,$.value==="date"]])],2),vue.createElementVNode("span",{role:"button",class:vue.normalizeClass(vue.unref(a).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:vue.withKeys(k=>xe("year"),["enter"]),onClick:k=>xe("year")},vue.toDisplayString(vue.unref(V)),43,["onKeydown","onClick"]),vue.withDirectives(vue.createElementVNode("span",{role:"button","aria-live":"polite",tabindex:"0",class:vue.normalizeClass([vue.unref(a).e("header-label"),{active:$.value==="month"}]),onKeydown:vue.withKeys(k=>xe("month"),["enter"]),onClick:k=>xe("month")},vue.toDisplayString(vue.unref(l)(`el.datepicker.month${vue.unref(x)+1}`)),43,["onKeydown","onClick"]),[[vue.vShow,$.value==="date"]]),vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(a).e("next-btn"))},[vue.withDirectives(vue.createElementVNode("button",{type:"button","aria-label":vue.unref(l)("el.datepicker.nextMonth"),class:vue.normalizeClass([vue.unref(i).e("icon-btn"),"arrow-right"]),onClick:k=>F(!0)},[vue.renderSlot(D.$slots,"next-month",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_right_default))]),_:1})])],10,["aria-label","onClick"]),[[vue.vShow,$.value==="date"]]),vue.createElementVNode("button",{type:"button","aria-label":vue.unref(l)("el.datepicker.nextYear"),class:vue.normalizeClass([vue.unref(i).e("icon-btn"),"d-arrow-right"]),onClick:k=>Y(!0)},[vue.renderSlot(D.$slots,"next-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_right_default))]),_:1})])],10,["aria-label","onClick"])],2)],2),[[vue.vShow,$.value!=="time"]]),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(i).e("content")),onKeydown:zn},[$.value==="date"?(vue.openBlock(),vue.createBlock(DateTable,{key:0,ref_key:"currentViewRef",ref:b,"selection-mode":vue.unref(re),date:_.value,"parsed-value":D.parsedValue,"disabled-date":vue.unref(h),"cell-class-name":vue.unref(m),onPick:O},null,8,["selection-mode","date","parsed-value","disabled-date","cell-class-name"])):vue.createCommentVNode("v-if",!0),$.value==="year"?(vue.openBlock(),vue.createBlock(YearTable,{key:1,ref_key:"currentViewRef",ref:b,"selection-mode":vue.unref(re),date:_.value,"disabled-date":vue.unref(h),"parsed-value":D.parsedValue,onPick:Ce},null,8,["selection-mode","date","disabled-date","parsed-value"])):vue.createCommentVNode("v-if",!0),$.value==="month"?(vue.openBlock(),vue.createBlock(MonthTable,{key:2,ref_key:"currentViewRef",ref:b,"selection-mode":vue.unref(re),date:_.value,"parsed-value":D.parsedValue,"disabled-date":vue.unref(h),onPick:Oe},null,8,["selection-mode","date","parsed-value","disabled-date"])):vue.createCommentVNode("v-if",!0)],34)],2)],2),vue.withDirectives(vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(i).e("footer"))},[vue.withDirectives(vue.createVNode(vue.unref(ElButton),{text:"",size:"small",class:vue.normalizeClass(vue.unref(i).e("link-btn")),disabled:vue.unref(_n),onClick:Cn},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(l)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[vue.vShow,!vue.unref(ae)&&D.showNow]]),vue.createVNode(vue.unref(ElButton),{plain:"",size:"small",class:vue.normalizeClass(vue.unref(i).e("link-btn")),disabled:vue.unref(Dt),onClick:Lt},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(l)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2),[[vue.vShow,vue.unref(At)]])],2))}});var DatePickPanel=_export_sfc$1(_sfc_main$x,[["__file","panel-date-pick.vue"]]);const panelDateRangeProps=buildProps({...panelSharedProps,...panelRangeSharedProps}),useShortcut=e=>{const{emit:t}=vue.getCurrentInstance(),n=vue.useAttrs(),r=vue.useSlots();return a=>{const o=isFunction$1(a.value)?a.value():a.value;if(o){t("pick",[dayjs(o[0]).locale(e.value),dayjs(o[1]).locale(e.value)]);return}a.onClick&&a.onClick({attrs:n,slots:r,emit:t})}},useRangePicker=(e,{defaultValue:t,defaultTime:n,leftDate:r,rightDate:i,step:a,unit:o,onParsedValueChanged:u})=>{const{emit:l}=vue.getCurrentInstance(),{pickerNs:c}=vue.inject(ROOT_PICKER_INJECTION_KEY),p=useNamespace("date-range-picker"),{t:d,lang:f}=useLocale(),v=useShortcut(f),h=vue.ref(),m=vue.ref(),y=vue.ref({endDate:null,selecting:!1}),g=w=>{y.value=w},b=(w=!1)=>{const x=vue.unref(h),L=vue.unref(m);isValidRange([x,L])&&l("pick",[x,L],w)},_=w=>{y.value.selecting=w,w||(y.value.endDate=null)},S=w=>{if(isArray$1(w)&&w.length===2){const[x,L]=w;h.value=x,r.value=x,m.value=L,u(vue.unref(h),vue.unref(m))}else T()},T=()=>{let[w,x]=getDefaultValue(vue.unref(t),{lang:vue.unref(f),step:a,unit:o,unlinkPanels:e.unlinkPanels});const L=z=>z.diff(z.startOf("d"),"ms"),M=vue.unref(n);if(M){let z=0,A=0;if(isArray$1(M)){const[ue,he]=M.map(dayjs);z=L(ue),A=L(he)}else{const ue=L(dayjs(M));z=ue,A=ue}w=w.startOf("d").add(z,"ms"),x=x.startOf("d").add(A,"ms")}h.value=void 0,m.value=void 0,r.value=w,i.value=x};return vue.watch(t,w=>{w&&T()},{immediate:!0}),vue.watch(()=>e.parsedValue,S,{immediate:!0}),{minDate:h,maxDate:m,rangeState:y,lang:f,ppNs:c,drpNs:p,handleChangeRange:g,handleRangeConfirm:b,handleShortcutClick:v,onSelect:_,onReset:S,t:d}},usePanelDateRange=(e,t,n,r)=>{const i=vue.ref("date"),a=vue.ref(),o=vue.ref("date"),u=vue.ref(),l=vue.inject(PICKER_BASE_INJECTION_KEY),{disabledDate:c}=l.props,{t:p,lang:d}=useLocale(),f=vue.computed(()=>n.value.year()),v=vue.computed(()=>n.value.month()),h=vue.computed(()=>r.value.year()),m=vue.computed(()=>r.value.month());function y(w,x){const L=p("el.datepicker.year");if(w.value==="year"){const M=Math.floor(x.value/10)*10;return L?`${M} ${L} - ${M+9} ${L}`:`${M} - ${M+9}`}return`${x.value} ${L}`}function g(w){w==null||w.focus()}async function b(w,x){const L=w==="left"?i:o,M=w==="left"?a:u;L.value=x,await vue.nextTick(),g(M.value)}async function _(w,x,L){const M=x==="left",z=M?n:r,A=M?r:n,ue=M?i:o,he=M?a:u;if(w==="year"){const j=z.value.year(L);z.value=getValidDateOfYear(j,d.value,c)}w==="month"&&(z.value=getValidDateOfMonth(z.value,z.value.year(),L,d.value,c)),e.unlinkPanels||(A.value=x==="left"?z.value.add(1,"month"):z.value.subtract(1,"month")),ue.value=w==="year"?"month":"date",await vue.nextTick(),g(he.value),S(w)}function S(w){t("panel-change",[n.value.toDate(),r.value.toDate()],w)}function T(w,x,L){const M=L?"add":"subtract";return w==="year"?x[M](10,"year"):x[M](1,"year")}return{leftCurrentView:i,rightCurrentView:o,leftCurrentViewRef:a,rightCurrentViewRef:u,leftYear:f,rightYear:h,leftMonth:v,rightMonth:m,leftYearLabel:vue.computed(()=>y(i,f)),rightYearLabel:vue.computed(()=>y(o,h)),showLeftPicker:w=>b("left",w),showRightPicker:w=>b("right",w),handleLeftYearPick:w=>_("year","left",w),handleRightYearPick:w=>_("year","right",w),handleLeftMonthPick:w=>_("month","left",w),handleRightMonthPick:w=>_("month","right",w),handlePanelChange:S,adjustDateByView:T}},unit$2="month",_sfc_main$w=vue.defineComponent({__name:"panel-date-range",props:panelDateRangeProps,emits:["pick","set-picker-option","calendar-change","panel-change"],setup(e,{emit:t}){const n=e,r=vue.inject(PICKER_BASE_INJECTION_KEY),i=vue.inject(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY),{disabledDate:a,cellClassName:o,defaultTime:u,clearable:l}=r.props,c=vue.toRef(r.props,"format"),p=vue.toRef(r.props,"shortcuts"),d=vue.toRef(r.props,"defaultValue"),{lang:f}=useLocale(),v=vue.ref(dayjs().locale(f.value)),h=vue.ref(dayjs().locale(f.value).add(1,unit$2)),{minDate:m,maxDate:y,rangeState:g,ppNs:b,drpNs:_,handleChangeRange:S,handleRangeConfirm:T,handleShortcutClick:w,onSelect:x,onReset:L,t:M}=useRangePicker(n,{defaultValue:d,defaultTime:u,leftDate:v,rightDate:h,unit:unit$2,onParsedValueChanged:Bn});vue.watch(()=>n.visible,Ie=>{!Ie&&g.value.selecting&&(L(n.parsedValue),x(!1))});const z=vue.ref({min:null,max:null}),A=vue.ref({min:null,max:null}),{leftCurrentView:ue,rightCurrentView:he,leftCurrentViewRef:j,rightCurrentViewRef:O,leftYear:F,rightYear:Y,leftMonth:$,rightMonth:V,leftYearLabel:ie,rightYearLabel:re,showLeftPicker:ae,showRightPicker:le,handleLeftYearPick:_e,handleRightYearPick:Oe,handleLeftMonthPick:Ce,handleRightMonthPick:xe,handlePanelChange:Fe,adjustDateByView:At}=usePanelDateRange(n,t,v,h),Dt=vue.computed(()=>!!p.value.length),Lt=vue.computed(()=>z.value.min!==null?z.value.min:m.value?m.value.format(Sn.value):""),_n=vue.computed(()=>z.value.max!==null?z.value.max:y.value||m.value?(y.value||m.value).format(Sn.value):""),Cn=vue.computed(()=>A.value.min!==null?A.value.min:m.value?m.value.format(Tn.value):""),An=vue.computed(()=>A.value.max!==null?A.value.max:y.value||m.value?(y.value||m.value).format(Tn.value):""),Tn=vue.computed(()=>n.timeFormat||extractTimeFormat(c.value)),Sn=vue.computed(()=>n.dateFormat||extractDateFormat(c.value)),bn=Ie=>isValidRange(Ie)&&(a?!a(Ie[0].toDate())&&!a(Ie[1].toDate()):!0),wn=()=>{v.value=At(ue.value,v.value,!1),n.unlinkPanels||(h.value=v.value.add(1,"month")),Fe("year")},Ue=()=>{v.value=v.value.subtract(1,"month"),n.unlinkPanels||(h.value=v.value.add(1,"month")),Fe("month")},En=()=>{n.unlinkPanels?h.value=At(he.value,h.value,!0):(v.value=At(he.value,v.value,!0),h.value=v.value.add(1,"month")),Fe("year")},Pn=()=>{n.unlinkPanels?h.value=h.value.add(1,"month"):(v.value=v.value.add(1,"month"),h.value=v.value.add(1,"month")),Fe("month")},Mn=()=>{v.value=At(ue.value,v.value,!0),Fe("year")},$n=()=>{v.value=v.value.add(1,"month"),Fe("month")},$e=()=>{h.value=At(he.value,h.value,!1),Fe("year")},Et=()=>{h.value=h.value.subtract(1,"month"),Fe("month")},On=vue.computed(()=>{const Ie=($.value+1)%12,kt=$.value+1>=12?1:0;return n.unlinkPanels&&new Date(F.value+kt,Ie)<new Date(Y.value,V.value)}),In=vue.computed(()=>n.unlinkPanels&&Y.value*12+V.value-(F.value*12+$.value+1)>=12),Vn=vue.computed(()=>!(m.value&&y.value&&!g.value.selecting&&isValidRange([m.value,y.value]))),Rn=vue.computed(()=>n.type==="datetime"||n.type==="datetimerange"),hn=(Ie,kt)=>{if(Ie)return u?dayjs(u[kt]||u).locale(f.value).year(Ie.year()).month(Ie.month()).date(Ie.date()):Ie},zn=(Ie,kt=!0)=>{const qe=Ie.minDate,Ln=Ie.maxDate,Hn=hn(qe,0),Wn=hn(Ln,1);y.value===Wn&&m.value===Hn||(t("calendar-change",[qe.toDate(),Ln&&Ln.toDate()]),y.value=Wn,m.value=Hn,!(!kt||Rn.value)&&T())},xn=vue.ref(!1),vn=vue.ref(!1),D=()=>{xn.value=!1},oe=()=>{vn.value=!1},k=(Ie,kt)=>{z.value[kt]=Ie;const qe=dayjs(Ie,Sn.value).locale(f.value);if(qe.isValid()){if(a&&a(qe.toDate()))return;kt==="min"?(v.value=qe,m.value=(m.value||v.value).year(qe.year()).month(qe.month()).date(qe.date()),!n.unlinkPanels&&(!y.value||y.value.isBefore(m.value))&&(h.value=qe.add(1,"month"),y.value=m.value.add(1,"month"))):(h.value=qe,y.value=(y.value||h.value).year(qe.year()).month(qe.month()).date(qe.date()),!n.unlinkPanels&&(!m.value||m.value.isAfter(y.value))&&(v.value=qe.subtract(1,"month"),m.value=y.value.subtract(1,"month")))}},pe=(Ie,kt)=>{z.value[kt]=null},Ne=(Ie,kt)=>{A.value[kt]=Ie;const qe=dayjs(Ie,Tn.value).locale(f.value);qe.isValid()&&(kt==="min"?(xn.value=!0,m.value=(m.value||v.value).hour(qe.hour()).minute(qe.minute()).second(qe.second())):(vn.value=!0,y.value=(y.value||h.value).hour(qe.hour()).minute(qe.minute()).second(qe.second()),h.value=y.value))},ze=(Ie,kt)=>{A.value[kt]=null,kt==="min"?(v.value=m.value,xn.value=!1,(!y.value||y.value.isBefore(m.value))&&(y.value=m.value)):(h.value=y.value,vn.value=!1,y.value&&y.value.isBefore(m.value)&&(m.value=y.value))},jt=(Ie,kt,qe)=>{A.value.min||(Ie&&(v.value=Ie,m.value=(m.value||v.value).hour(Ie.hour()).minute(Ie.minute()).second(Ie.second())),qe||(xn.value=kt),(!y.value||y.value.isBefore(m.value))&&(y.value=m.value,h.value=Ie))},Nn=(Ie,kt,qe)=>{A.value.max||(Ie&&(h.value=Ie,y.value=(y.value||h.value).hour(Ie.hour()).minute(Ie.minute()).second(Ie.second())),qe||(vn.value=kt),y.value&&y.value.isBefore(m.value)&&(m.value=y.value))},kn=()=>{v.value=getDefaultValue(vue.unref(d),{lang:vue.unref(f),unit:"month",unlinkPanels:n.unlinkPanels})[0],h.value=v.value.add(1,"month"),y.value=void 0,m.value=void 0,t("pick",null)},qn=Ie=>isArray$1(Ie)?Ie.map(kt=>kt.format(c.value)):Ie.format(c.value),Un=Ie=>correctlyParseUserInput(Ie,c.value,f.value,i);function Bn(Ie,kt){if(n.unlinkPanels&&kt){const qe=(Ie==null?void 0:Ie.year())||0,Ln=(Ie==null?void 0:Ie.month())||0,Hn=kt.year(),Wn=kt.month();h.value=qe===Hn&&Ln===Wn?kt.add(1,unit$2):kt}else h.value=v.value.add(1,unit$2),kt&&(h.value=h.value.hour(kt.hour()).minute(kt.minute()).second(kt.second()))}return t("set-picker-option",["isValidValue",bn]),t("set-picker-option",["parseUserInput",Un]),t("set-picker-option",["formatToString",qn]),t("set-picker-option",["handleClear",kn]),(Ie,kt)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([vue.unref(b).b(),vue.unref(_).b(),{"has-sidebar":Ie.$slots.sidebar||vue.unref(Dt),"has-time":vue.unref(Rn)}])},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(b).e("body-wrapper"))},[vue.renderSlot(Ie.$slots,"sidebar",{class:vue.normalizeClass(vue.unref(b).e("sidebar"))}),vue.unref(Dt)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(b).e("sidebar"))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(p),(qe,Ln)=>(vue.openBlock(),vue.createElementBlock("button",{key:Ln,type:"button",class:vue.normalizeClass(vue.unref(b).e("shortcut")),onClick:Hn=>vue.unref(w)(qe)},vue.toDisplayString(qe.text),11,["onClick"]))),128))],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(b).e("body"))},[vue.unref(Rn)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(_).e("time-header"))},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(_).e("editors-wrap"))},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(_).e("time-picker-wrap"))},[vue.createVNode(vue.unref(ElInput),{size:"small",disabled:vue.unref(g).selecting,placeholder:vue.unref(M)("el.datepicker.startDate"),class:vue.normalizeClass(vue.unref(_).e("editor")),"model-value":vue.unref(Lt),"validate-event":!1,onInput:qe=>k(qe,"min"),onChange:qe=>pe(qe,"min")},null,8,["disabled","placeholder","class","model-value","onInput","onChange"])],2),vue.withDirectives((vue.openBlock(),vue.createElementBlock("span",{class:vue.normalizeClass(vue.unref(_).e("time-picker-wrap"))},[vue.createVNode(vue.unref(ElInput),{size:"small",class:vue.normalizeClass(vue.unref(_).e("editor")),disabled:vue.unref(g).selecting,placeholder:vue.unref(M)("el.datepicker.startTime"),"model-value":vue.unref(Cn),"validate-event":!1,onFocus:qe=>xn.value=!0,onInput:qe=>Ne(qe,"min"),onChange:qe=>ze(qe,"min")},null,8,["class","disabled","placeholder","model-value","onFocus","onInput","onChange"]),vue.createVNode(vue.unref(TimePickPanel),{visible:xn.value,format:vue.unref(Tn),"datetime-role":"start","parsed-value":v.value,onPick:jt},null,8,["visible","format","parsed-value"])],2)),[[vue.unref(ClickOutside),D]])],2),vue.createElementVNode("span",null,[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_right_default))]),_:1})]),vue.createElementVNode("span",{class:vue.normalizeClass([vue.unref(_).e("editors-wrap"),"is-right"])},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(_).e("time-picker-wrap"))},[vue.createVNode(vue.unref(ElInput),{size:"small",class:vue.normalizeClass(vue.unref(_).e("editor")),disabled:vue.unref(g).selecting,placeholder:vue.unref(M)("el.datepicker.endDate"),"model-value":vue.unref(_n),readonly:!vue.unref(m),"validate-event":!1,onInput:qe=>k(qe,"max"),onChange:qe=>pe(qe,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onInput","onChange"])],2),vue.withDirectives((vue.openBlock(),vue.createElementBlock("span",{class:vue.normalizeClass(vue.unref(_).e("time-picker-wrap"))},[vue.createVNode(vue.unref(ElInput),{size:"small",class:vue.normalizeClass(vue.unref(_).e("editor")),disabled:vue.unref(g).selecting,placeholder:vue.unref(M)("el.datepicker.endTime"),"model-value":vue.unref(An),readonly:!vue.unref(m),"validate-event":!1,onFocus:qe=>vue.unref(m)&&(vn.value=!0),onInput:qe=>Ne(qe,"max"),onChange:qe=>ze(qe,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onFocus","onInput","onChange"]),vue.createVNode(vue.unref(TimePickPanel),{"datetime-role":"end",visible:vn.value,format:vue.unref(Tn),"parsed-value":h.value,onPick:Nn},null,8,["visible","format","parsed-value"])],2)),[[vue.unref(ClickOutside),oe]])],2)],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{class:vue.normalizeClass([[vue.unref(b).e("content"),vue.unref(_).e("content")],"is-left"])},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(_).e("header"))},[vue.createElementVNode("button",{type:"button",class:vue.normalizeClass([vue.unref(b).e("icon-btn"),"d-arrow-left"]),"aria-label":vue.unref(M)("el.datepicker.prevYear"),onClick:wn},[vue.renderSlot(Ie.$slots,"prev-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_left_default))]),_:1})])],10,["aria-label"]),vue.withDirectives(vue.createElementVNode("button",{type:"button",class:vue.normalizeClass([vue.unref(b).e("icon-btn"),"arrow-left"]),"aria-label":vue.unref(M)("el.datepicker.prevMonth"),onClick:Ue},[vue.renderSlot(Ie.$slots,"prev-month",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_left_default))]),_:1})])],10,["aria-label"]),[[vue.vShow,vue.unref(ue)==="date"]]),Ie.unlinkPanels?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",disabled:!vue.unref(In),class:vue.normalizeClass([[vue.unref(b).e("icon-btn"),{"is-disabled":!vue.unref(In)}],"d-arrow-right"]),"aria-label":vue.unref(M)("el.datepicker.nextYear"),onClick:Mn},[vue.renderSlot(Ie.$slots,"next-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_right_default))]),_:1})])],10,["disabled","aria-label"])):vue.createCommentVNode("v-if",!0),Ie.unlinkPanels&&vue.unref(ue)==="date"?(vue.openBlock(),vue.createElementBlock("button",{key:1,type:"button",disabled:!vue.unref(On),class:vue.normalizeClass([[vue.unref(b).e("icon-btn"),{"is-disabled":!vue.unref(On)}],"arrow-right"]),"aria-label":vue.unref(M)("el.datepicker.nextMonth"),onClick:$n},[vue.renderSlot(Ie.$slots,"next-month",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_right_default))]),_:1})])],10,["disabled","aria-label"])):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",null,[vue.createElementVNode("span",{role:"button",class:vue.normalizeClass(vue.unref(_).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:vue.withKeys(qe=>vue.unref(ae)("year"),["enter"]),onClick:qe=>vue.unref(ae)("year")},vue.toDisplayString(vue.unref(ie)),43,["onKeydown","onClick"]),vue.withDirectives(vue.createElementVNode("span",{role:"button","aria-live":"polite",tabindex:"0",class:vue.normalizeClass([vue.unref(_).e("header-label"),{active:vue.unref(ue)==="month"}]),onKeydown:vue.withKeys(qe=>vue.unref(ae)("month"),["enter"]),onClick:qe=>vue.unref(ae)("month")},vue.toDisplayString(vue.unref(M)(`el.datepicker.month${v.value.month()+1}`)),43,["onKeydown","onClick"]),[[vue.vShow,vue.unref(ue)==="date"]])])],2),vue.unref(ue)==="date"?(vue.openBlock(),vue.createBlock(DateTable,{key:0,ref_key:"leftCurrentViewRef",ref:j,"selection-mode":"range",date:v.value,"min-date":vue.unref(m),"max-date":vue.unref(y),"range-state":vue.unref(g),"disabled-date":vue.unref(a),"cell-class-name":vue.unref(o),onChangerange:vue.unref(S),onPick:zn,onSelect:vue.unref(x)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])):vue.createCommentVNode("v-if",!0),vue.unref(ue)==="year"?(vue.openBlock(),vue.createBlock(YearTable,{key:1,ref_key:"leftCurrentViewRef",ref:j,"selection-mode":"year",date:v.value,"disabled-date":vue.unref(a),"parsed-value":Ie.parsedValue,onPick:vue.unref(_e)},null,8,["date","disabled-date","parsed-value","onPick"])):vue.createCommentVNode("v-if",!0),vue.unref(ue)==="month"?(vue.openBlock(),vue.createBlock(MonthTable,{key:2,ref_key:"leftCurrentViewRef",ref:j,"selection-mode":"month",date:v.value,"parsed-value":Ie.parsedValue,"disabled-date":vue.unref(a),onPick:vue.unref(Ce)},null,8,["date","parsed-value","disabled-date","onPick"])):vue.createCommentVNode("v-if",!0)],2),vue.createElementVNode("div",{class:vue.normalizeClass([[vue.unref(b).e("content"),vue.unref(_).e("content")],"is-right"])},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(_).e("header"))},[Ie.unlinkPanels?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",disabled:!vue.unref(In),class:vue.normalizeClass([[vue.unref(b).e("icon-btn"),{"is-disabled":!vue.unref(In)}],"d-arrow-left"]),"aria-label":vue.unref(M)("el.datepicker.prevYear"),onClick:$e},[vue.renderSlot(Ie.$slots,"prev-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_left_default))]),_:1})])],10,["disabled","aria-label"])):vue.createCommentVNode("v-if",!0),Ie.unlinkPanels&&vue.unref(he)==="date"?(vue.openBlock(),vue.createElementBlock("button",{key:1,type:"button",disabled:!vue.unref(On),class:vue.normalizeClass([[vue.unref(b).e("icon-btn"),{"is-disabled":!vue.unref(On)}],"arrow-left"]),"aria-label":vue.unref(M)("el.datepicker.prevMonth"),onClick:Et},[vue.renderSlot(Ie.$slots,"prev-month",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_left_default))]),_:1})])],10,["disabled","aria-label"])):vue.createCommentVNode("v-if",!0),vue.createElementVNode("button",{type:"button","aria-label":vue.unref(M)("el.datepicker.nextYear"),class:vue.normalizeClass([vue.unref(b).e("icon-btn"),"d-arrow-right"]),onClick:En},[vue.renderSlot(Ie.$slots,"next-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_right_default))]),_:1})])],10,["aria-label"]),vue.withDirectives(vue.createElementVNode("button",{type:"button",class:vue.normalizeClass([vue.unref(b).e("icon-btn"),"arrow-right"]),"aria-label":vue.unref(M)("el.datepicker.nextMonth"),onClick:Pn},[vue.renderSlot(Ie.$slots,"next-month",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_right_default))]),_:1})])],10,["aria-label"]),[[vue.vShow,vue.unref(he)==="date"]]),vue.createElementVNode("div",null,[vue.createElementVNode("span",{role:"button",class:vue.normalizeClass(vue.unref(_).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:vue.withKeys(qe=>vue.unref(le)("year"),["enter"]),onClick:qe=>vue.unref(le)("year")},vue.toDisplayString(vue.unref(re)),43,["onKeydown","onClick"]),vue.withDirectives(vue.createElementVNode("span",{role:"button","aria-live":"polite",tabindex:"0",class:vue.normalizeClass([vue.unref(_).e("header-label"),{active:vue.unref(he)==="month"}]),onKeydown:vue.withKeys(qe=>vue.unref(le)("month"),["enter"]),onClick:qe=>vue.unref(le)("month")},vue.toDisplayString(vue.unref(M)(`el.datepicker.month${h.value.month()+1}`)),43,["onKeydown","onClick"]),[[vue.vShow,vue.unref(he)==="date"]])])],2),vue.unref(he)==="date"?(vue.openBlock(),vue.createBlock(DateTable,{key:0,ref_key:"rightCurrentViewRef",ref:O,"selection-mode":"range",date:h.value,"min-date":vue.unref(m),"max-date":vue.unref(y),"range-state":vue.unref(g),"disabled-date":vue.unref(a),"cell-class-name":vue.unref(o),onChangerange:vue.unref(S),onPick:zn,onSelect:vue.unref(x)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])):vue.createCommentVNode("v-if",!0),vue.unref(he)==="year"?(vue.openBlock(),vue.createBlock(YearTable,{key:1,ref_key:"rightCurrentViewRef",ref:O,"selection-mode":"year",date:h.value,"disabled-date":vue.unref(a),"parsed-value":Ie.parsedValue,onPick:vue.unref(Oe)},null,8,["date","disabled-date","parsed-value","onPick"])):vue.createCommentVNode("v-if",!0),vue.unref(he)==="month"?(vue.openBlock(),vue.createBlock(MonthTable,{key:2,ref_key:"rightCurrentViewRef",ref:O,"selection-mode":"month",date:h.value,"parsed-value":Ie.parsedValue,"disabled-date":vue.unref(a),onPick:vue.unref(xe)},null,8,["date","parsed-value","disabled-date","onPick"])):vue.createCommentVNode("v-if",!0)],2)],2)],2),vue.unref(Rn)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(b).e("footer"))},[vue.unref(l)?(vue.openBlock(),vue.createBlock(vue.unref(ElButton),{key:0,text:"",size:"small",class:vue.normalizeClass(vue.unref(b).e("link-btn")),onClick:kn},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(M)("el.datepicker.clear")),1)]),_:1},8,["class"])):vue.createCommentVNode("v-if",!0),vue.createVNode(vue.unref(ElButton),{plain:"",size:"small",class:vue.normalizeClass(vue.unref(b).e("link-btn")),disabled:vue.unref(Vn),onClick:qe=>vue.unref(T)(!1)},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(M)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled","onClick"])],2)):vue.createCommentVNode("v-if",!0)],2))}});var DateRangePickPanel=_export_sfc$1(_sfc_main$w,[["__file","panel-date-range.vue"]]);const panelMonthRangeProps=buildProps({...panelRangeSharedProps}),panelMonthRangeEmits=["pick","set-picker-option","calendar-change"],useMonthRangeHeader=({unlinkPanels:e,leftDate:t,rightDate:n})=>{const{t:r}=useLocale(),i=()=>{t.value=t.value.subtract(1,"year"),e.value||(n.value=n.value.subtract(1,"year"))},a=()=>{e.value||(t.value=t.value.add(1,"year")),n.value=n.value.add(1,"year")},o=()=>{t.value=t.value.add(1,"year")},u=()=>{n.value=n.value.subtract(1,"year")},l=vue.computed(()=>`${t.value.year()} ${r("el.datepicker.year")}`),c=vue.computed(()=>`${n.value.year()} ${r("el.datepicker.year")}`),p=vue.computed(()=>t.value.year()),d=vue.computed(()=>n.value.year()===t.value.year()?t.value.year()+1:n.value.year());return{leftPrevYear:i,rightNextYear:a,leftNextYear:o,rightPrevYear:u,leftLabel:l,rightLabel:c,leftYear:p,rightYear:d}},unit$1="year",__default__$5=vue.defineComponent({name:"DatePickerMonthRange"}),_sfc_main$v=vue.defineComponent({...__default__$5,props:panelMonthRangeProps,emits:panelMonthRangeEmits,setup(e,{emit:t}){const n=e,{lang:r}=useLocale(),i=vue.inject(PICKER_BASE_INJECTION_KEY),a=vue.inject(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY),{shortcuts:o,disabledDate:u}=i.props,l=vue.toRef(i.props,"format"),c=vue.toRef(i.props,"defaultValue"),p=vue.ref(dayjs().locale(r.value)),d=vue.ref(dayjs().locale(r.value).add(1,unit$1)),{minDate:f,maxDate:v,rangeState:h,ppNs:m,drpNs:y,handleChangeRange:g,handleRangeConfirm:b,handleShortcutClick:_,onSelect:S,onReset:T}=useRangePicker(n,{defaultValue:c,leftDate:p,rightDate:d,unit:unit$1,onParsedValueChanged:ie}),w=vue.computed(()=>!!o.length),{leftPrevYear:x,rightNextYear:L,leftNextYear:M,rightPrevYear:z,leftLabel:A,rightLabel:ue,leftYear:he,rightYear:j}=useMonthRangeHeader({unlinkPanels:vue.toRef(n,"unlinkPanels"),leftDate:p,rightDate:d}),O=vue.computed(()=>n.unlinkPanels&&j.value>he.value+1),F=(re,ae=!0)=>{const le=re.minDate,_e=re.maxDate;v.value===_e&&f.value===le||(t("calendar-change",[le.toDate(),_e&&_e.toDate()]),v.value=_e,f.value=le,ae&&b())},Y=()=>{p.value=getDefaultValue(vue.unref(c),{lang:vue.unref(r),unit:"year",unlinkPanels:n.unlinkPanels})[0],d.value=p.value.add(1,"year"),t("pick",null)},$=re=>isArray$1(re)?re.map(ae=>ae.format(l.value)):re.format(l.value),V=re=>correctlyParseUserInput(re,l.value,r.value,a);function ie(re,ae){if(n.unlinkPanels&&ae){const le=(re==null?void 0:re.year())||0,_e=ae.year();d.value=le===_e?ae.add(1,unit$1):ae}else d.value=p.value.add(1,unit$1)}return vue.watch(()=>n.visible,re=>{!re&&h.value.selecting&&(T(n.parsedValue),S(!1))}),t("set-picker-option",["isValidValue",isValidRange]),t("set-picker-option",["formatToString",$]),t("set-picker-option",["parseUserInput",V]),t("set-picker-option",["handleClear",Y]),(re,ae)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([vue.unref(m).b(),vue.unref(y).b(),{"has-sidebar":!!re.$slots.sidebar||vue.unref(w)}])},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(m).e("body-wrapper"))},[vue.renderSlot(re.$slots,"sidebar",{class:vue.normalizeClass(vue.unref(m).e("sidebar"))}),vue.unref(w)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(m).e("sidebar"))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(o),(le,_e)=>(vue.openBlock(),vue.createElementBlock("button",{key:_e,type:"button",class:vue.normalizeClass(vue.unref(m).e("shortcut")),onClick:Oe=>vue.unref(_)(le)},vue.toDisplayString(le.text),11,["onClick"]))),128))],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(m).e("body"))},[vue.createElementVNode("div",{class:vue.normalizeClass([[vue.unref(m).e("content"),vue.unref(y).e("content")],"is-left"])},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(y).e("header"))},[vue.createElementVNode("button",{type:"button",class:vue.normalizeClass([vue.unref(m).e("icon-btn"),"d-arrow-left"]),onClick:vue.unref(x)},[vue.renderSlot(re.$slots,"prev-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_left_default))]),_:1})])],10,["onClick"]),re.unlinkPanels?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",disabled:!vue.unref(O),class:vue.normalizeClass([[vue.unref(m).e("icon-btn"),{[vue.unref(m).is("disabled")]:!vue.unref(O)}],"d-arrow-right"]),onClick:vue.unref(M)},[vue.renderSlot(re.$slots,"next-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_right_default))]),_:1})])],10,["disabled","onClick"])):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",null,vue.toDisplayString(vue.unref(A)),1)],2),vue.createVNode(MonthTable,{"selection-mode":"range",date:p.value,"min-date":vue.unref(f),"max-date":vue.unref(v),"range-state":vue.unref(h),"disabled-date":vue.unref(u),onChangerange:vue.unref(g),onPick:F,onSelect:vue.unref(S)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2),vue.createElementVNode("div",{class:vue.normalizeClass([[vue.unref(m).e("content"),vue.unref(y).e("content")],"is-right"])},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(y).e("header"))},[re.unlinkPanels?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",disabled:!vue.unref(O),class:vue.normalizeClass([[vue.unref(m).e("icon-btn"),{"is-disabled":!vue.unref(O)}],"d-arrow-left"]),onClick:vue.unref(z)},[vue.renderSlot(re.$slots,"prev-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_left_default))]),_:1})])],10,["disabled","onClick"])):vue.createCommentVNode("v-if",!0),vue.createElementVNode("button",{type:"button",class:vue.normalizeClass([vue.unref(m).e("icon-btn"),"d-arrow-right"]),onClick:vue.unref(L)},[vue.renderSlot(re.$slots,"next-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_right_default))]),_:1})])],10,["onClick"]),vue.createElementVNode("div",null,vue.toDisplayString(vue.unref(ue)),1)],2),vue.createVNode(MonthTable,{"selection-mode":"range",date:d.value,"min-date":vue.unref(f),"max-date":vue.unref(v),"range-state":vue.unref(h),"disabled-date":vue.unref(u),onChangerange:vue.unref(g),onPick:F,onSelect:vue.unref(S)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2)],2)],2)],2))}});var MonthRangePickPanel=_export_sfc$1(_sfc_main$v,[["__file","panel-month-range.vue"]]);const panelYearRangeProps=buildProps({...panelRangeSharedProps}),panelYearRangeEmits=["pick","set-picker-option","calendar-change"],useYearRangeHeader=({unlinkPanels:e,leftDate:t,rightDate:n})=>{const r=()=>{t.value=t.value.subtract(10,"year"),e.value||(n.value=n.value.subtract(10,"year"))},i=()=>{e.value||(t.value=t.value.add(10,"year")),n.value=n.value.add(10,"year")},a=()=>{t.value=t.value.add(10,"year")},o=()=>{n.value=n.value.subtract(10,"year")},u=vue.computed(()=>{const d=Math.floor(t.value.year()/10)*10;return`${d}-${d+9}`}),l=vue.computed(()=>{const d=Math.floor(n.value.year()/10)*10;return`${d}-${d+9}`}),c=vue.computed(()=>Math.floor(t.value.year()/10)*10+9),p=vue.computed(()=>Math.floor(n.value.year()/10)*10);return{leftPrevYear:r,rightNextYear:i,leftNextYear:a,rightPrevYear:o,leftLabel:u,rightLabel:l,leftYear:c,rightYear:p}},step=10,unit="year",__default__$4=vue.defineComponent({name:"DatePickerYearRange"}),_sfc_main$u=vue.defineComponent({...__default__$4,props:panelYearRangeProps,emits:panelYearRangeEmits,setup(e,{emit:t}){const n=e,{lang:r}=useLocale(),i=vue.ref(dayjs().locale(r.value)),a=vue.ref(dayjs().locale(r.value).add(step,unit)),o=vue.inject(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY),u=vue.inject(PICKER_BASE_INJECTION_KEY),{shortcuts:l,disabledDate:c}=u.props,p=vue.toRef(u.props,"format"),d=vue.toRef(u.props,"defaultValue"),{minDate:f,maxDate:v,rangeState:h,ppNs:m,drpNs:y,handleChangeRange:g,handleRangeConfirm:b,handleShortcutClick:_,onSelect:S,onReset:T}=useRangePicker(n,{defaultValue:d,leftDate:i,rightDate:a,step,unit,onParsedValueChanged:_e}),{leftPrevYear:w,rightNextYear:x,leftNextYear:L,rightPrevYear:M,leftLabel:z,rightLabel:A,leftYear:ue,rightYear:he}=useYearRangeHeader({unlinkPanels:vue.toRef(n,"unlinkPanels"),leftDate:i,rightDate:a}),j=vue.computed(()=>!!l.length),O=vue.computed(()=>[m.b(),y.b(),{"has-sidebar":!!vue.useSlots().sidebar||j.value}]),F=vue.computed(()=>({content:[m.e("content"),y.e("content"),"is-left"],arrowLeftBtn:[m.e("icon-btn"),"d-arrow-left"],arrowRightBtn:[m.e("icon-btn"),{[m.is("disabled")]:!$.value},"d-arrow-right"]})),Y=vue.computed(()=>({content:[m.e("content"),y.e("content"),"is-right"],arrowLeftBtn:[m.e("icon-btn"),{"is-disabled":!$.value},"d-arrow-left"],arrowRightBtn:[m.e("icon-btn"),"d-arrow-right"]})),$=vue.computed(()=>n.unlinkPanels&&he.value>ue.value+1),V=(Oe,Ce=!0)=>{const xe=Oe.minDate,Fe=Oe.maxDate;v.value===Fe&&f.value===xe||(t("calendar-change",[xe.toDate(),Fe&&Fe.toDate()]),v.value=Fe,f.value=xe,Ce&&b())},ie=Oe=>correctlyParseUserInput(Oe,p.value,r.value,o),re=Oe=>isArray$1(Oe)?Oe.map(Ce=>Ce.format(p.value)):Oe.format(p.value),ae=Oe=>isValidRange(Oe)&&(c?!c(Oe[0].toDate())&&!c(Oe[1].toDate()):!0),le=()=>{const Oe=getDefaultValue(vue.unref(d),{lang:vue.unref(r),step,unit,unlinkPanels:n.unlinkPanels});i.value=Oe[0],a.value=Oe[1],t("pick",null)};function _e(Oe,Ce){if(n.unlinkPanels&&Ce){const xe=(Oe==null?void 0:Oe.year())||0,Fe=Ce.year();a.value=xe+step>Fe?Ce.add(step,unit):Ce}else a.value=i.value.add(step,unit)}return vue.watch(()=>n.visible,Oe=>{!Oe&&h.value.selecting&&(T(n.parsedValue),S(!1))}),t("set-picker-option",["isValidValue",ae]),t("set-picker-option",["parseUserInput",ie]),t("set-picker-option",["formatToString",re]),t("set-picker-option",["handleClear",le]),(Oe,Ce)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(vue.unref(O))},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(m).e("body-wrapper"))},[vue.renderSlot(Oe.$slots,"sidebar",{class:vue.normalizeClass(vue.unref(m).e("sidebar"))}),vue.unref(j)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(m).e("sidebar"))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(l),(xe,Fe)=>(vue.openBlock(),vue.createElementBlock("button",{key:Fe,type:"button",class:vue.normalizeClass(vue.unref(m).e("shortcut")),onClick:At=>vue.unref(_)(xe)},vue.toDisplayString(xe.text),11,["onClick"]))),128))],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(m).e("body"))},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(F).content)},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(y).e("header"))},[vue.createElementVNode("button",{type:"button",class:vue.normalizeClass(vue.unref(F).arrowLeftBtn),onClick:vue.unref(w)},[vue.renderSlot(Oe.$slots,"prev-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_left_default))]),_:1})])],10,["onClick"]),Oe.unlinkPanels?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",disabled:!vue.unref($),class:vue.normalizeClass(vue.unref(F).arrowRightBtn),onClick:vue.unref(L)},[vue.renderSlot(Oe.$slots,"next-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_right_default))]),_:1})])],10,["disabled","onClick"])):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",null,vue.toDisplayString(vue.unref(z)),1)],2),vue.createVNode(YearTable,{"selection-mode":"range",date:i.value,"min-date":vue.unref(f),"max-date":vue.unref(v),"range-state":vue.unref(h),"disabled-date":vue.unref(c),onChangerange:vue.unref(g),onPick:V,onSelect:vue.unref(S)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(Y).content)},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(y).e("header"))},[Oe.unlinkPanels?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",disabled:!vue.unref($),class:vue.normalizeClass(vue.unref(Y).arrowLeftBtn),onClick:vue.unref(M)},[vue.renderSlot(Oe.$slots,"prev-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_left_default))]),_:1})])],10,["disabled","onClick"])):vue.createCommentVNode("v-if",!0),vue.createElementVNode("button",{type:"button",class:vue.normalizeClass(vue.unref(Y).arrowRightBtn),onClick:vue.unref(x)},[vue.renderSlot(Oe.$slots,"next-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_right_default))]),_:1})])],10,["onClick"]),vue.createElementVNode("div",null,vue.toDisplayString(vue.unref(A)),1)],2),vue.createVNode(YearTable,{"selection-mode":"range",date:a.value,"min-date":vue.unref(f),"max-date":vue.unref(v),"range-state":vue.unref(h),"disabled-date":vue.unref(c),onChangerange:vue.unref(g),onPick:V,onSelect:vue.unref(S)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2)],2)],2)],2))}});var YearRangePickPanel=_export_sfc$1(_sfc_main$u,[["__file","panel-year-range.vue"]]);const getPanel=function(e){switch(e){case"daterange":case"datetimerange":return DateRangePickPanel;case"monthrange":return MonthRangePickPanel;case"yearrange":return YearRangePickPanel;default:return DatePickPanel}};dayjs.extend(localeData),dayjs.extend(advancedFormat),dayjs.extend(customParseFormat),dayjs.extend(weekOfYear),dayjs.extend(weekYear),dayjs.extend(dayOfYear),dayjs.extend(isSameOrAfter),dayjs.extend(isSameOrBefore);var DatePicker=vue.defineComponent({name:"ElDatePicker",install:null,props:datePickerProps,emits:[UPDATE_MODEL_EVENT],setup(e,{expose:t,emit:n,slots:r}){const i=useNamespace("picker-panel"),a=vue.computed(()=>!e.format);vue.provide(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY,a),vue.provide(PICKER_POPPER_OPTIONS_INJECTION_KEY,vue.reactive(vue.toRef(e,"popperOptions"))),vue.provide(ROOT_PICKER_INJECTION_KEY,{slots:r,pickerNs:i});const o=vue.ref();t({focus:()=>{var c;(c=o.value)==null||c.focus()},blur:()=>{var c;(c=o.value)==null||c.blur()},handleOpen:()=>{var c;(c=o.value)==null||c.handleOpen()},handleClose:()=>{var c;(c=o.value)==null||c.handleClose()}});const l=c=>{n(UPDATE_MODEL_EVENT,c)};return()=>{var c;const p=(c=e.format)!=null?c:DEFAULT_FORMATS_DATEPICKER[e.type]||DEFAULT_FORMATS_DATE,d=getPanel(e.type);return vue.createVNode(CommonPicker,vue.mergeProps(e,{format:p,type:e.type,ref:o,"onUpdate:modelValue":l}),{default:f=>vue.createVNode(d,f,{"prev-month":r["prev-month"],"next-month":r["next-month"],"prev-year":r["prev-year"],"next-year":r["next-year"]}),"range-separator":r["range-separator"]})}}});const ElDatePicker=withInstall(DatePicker),useSameTarget=e=>{if(!e)return{onClick:NOOP,onMousedown:NOOP,onMouseup:NOOP};let t=!1,n=!1;return{onClick:o=>{t&&n&&e(o),t=n=!1},onMousedown:o=>{t=o.target===o.currentTarget},onMouseup:o=>{n=o.target===o.currentTarget}}},overlayProps=buildProps({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:definePropType([String,Array,Object])},zIndex:{type:definePropType([String,Number])}}),overlayEmits={click:e=>e instanceof MouseEvent},BLOCK="overlay";var Overlay=vue.defineComponent({name:"ElOverlay",props:overlayProps,emits:overlayEmits,setup(e,{slots:t,emit:n}){const r=useNamespace(BLOCK),i=l=>{n("click",l)},{onClick:a,onMousedown:o,onMouseup:u}=useSameTarget(e.customMaskEvent?void 0:i);return()=>e.mask?vue.createVNode("div",{class:[r.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:a,onMousedown:o,onMouseup:u},[vue.renderSlot(t,"default")],PatchFlags.STYLE|PatchFlags.CLASS|PatchFlags.PROPS,["onClick","onMouseup","onMousedown"]):vue.h("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[vue.renderSlot(t,"default")])}});const ElOverlay=Overlay,dialogInjectionKey=Symbol("dialogInjectionKey"),dialogContentProps=buildProps({center:Boolean,alignCenter:Boolean,closeIcon:{type:iconPropType},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,headerClass:String,bodyClass:String,footerClass:String,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),dialogContentEmits={close:()=>!0},useDraggable=(e,t,n,r)=>{const i={offsetX:0,offsetY:0},a=(d,f)=>{if(e.value){const{offsetX:v,offsetY:h}=i,m=e.value.getBoundingClientRect(),y=m.left,g=m.top,b=m.width,_=m.height,S=document.documentElement.clientWidth,T=document.documentElement.clientHeight,w=-y+v,x=-g+h,L=S-y-b+v,M=T-g-(_<T?_:0)+h;r!=null&&r.value||(d=Math.min(Math.max(d,w),L),f=Math.min(Math.max(f,x),M)),i.offsetX=d,i.offsetY=f,e.value.style.transform=`translate(${addUnit(d)}, ${addUnit(f)})`}},o=d=>{const f=d.clientX,v=d.clientY,{offsetX:h,offsetY:m}=i,y=b=>{const _=h+b.clientX-f,S=m+b.clientY-v;a(_,S)},g=()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",g)};document.addEventListener("mousemove",y),document.addEventListener("mouseup",g)},u=()=>{t.value&&e.value&&(t.value.addEventListener("mousedown",o),window.addEventListener("resize",p))},l=()=>{t.value&&e.value&&(t.value.removeEventListener("mousedown",o),window.removeEventListener("resize",p))},c=()=>{i.offsetX=0,i.offsetY=0,e.value&&(e.value.style.transform="")},p=()=>{const{offsetX:d,offsetY:f}=i;a(d,f)};return vue.onMounted(()=>{vue.watchEffect(()=>{n.value?u():l()})}),vue.onBeforeUnmount(()=>{l()}),{resetPosition:c,updatePosition:p}},composeRefs=(...e)=>t=>{e.forEach(n=>{isFunction$1(n)?n(t):n.value=t})},__default__$3=vue.defineComponent({name:"ElDialogContent"}),_sfc_main$t=vue.defineComponent({...__default__$3,props:dialogContentProps,emits:dialogContentEmits,setup(e,{expose:t}){const n=e,{t:r}=useLocale(),{Close:i}=CloseComponents,{dialogRef:a,headerRef:o,bodyId:u,ns:l,style:c}=vue.inject(dialogInjectionKey),{focusTrapRef:p}=vue.inject(FOCUS_TRAP_INJECTION_KEY),d=vue.computed(()=>[l.b(),l.is("fullscreen",n.fullscreen),l.is("draggable",n.draggable),l.is("align-center",n.alignCenter),{[l.m("center")]:n.center}]),f=composeRefs(p,a),v=vue.computed(()=>n.draggable),h=vue.computed(()=>n.overflow),{resetPosition:m,updatePosition:y}=useDraggable(a,o,v,h);return t({resetPosition:m,updatePosition:y}),(g,b)=>(vue.openBlock(),vue.createElementBlock("div",{ref:vue.unref(f),class:vue.normalizeClass(vue.unref(d)),style:vue.normalizeStyle(vue.unref(c)),tabindex:"-1"},[vue.createElementVNode("header",{ref_key:"headerRef",ref:o,class:vue.normalizeClass([vue.unref(l).e("header"),g.headerClass,{"show-close":g.showClose}])},[vue.renderSlot(g.$slots,"header",{},()=>[vue.createElementVNode("span",{role:"heading","aria-level":g.ariaLevel,class:vue.normalizeClass(vue.unref(l).e("title"))},vue.toDisplayString(g.title),11,["aria-level"])]),g.showClose?(vue.openBlock(),vue.createElementBlock("button",{key:0,"aria-label":vue.unref(r)("el.dialog.close"),class:vue.normalizeClass(vue.unref(l).e("headerbtn")),type:"button",onClick:_=>g.$emit("close")},[vue.createVNode(vue.unref(ElIcon),{class:vue.normalizeClass(vue.unref(l).e("close"))},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(g.closeIcon||vue.unref(i))))]),_:1},8,["class"])],10,["aria-label","onClick"])):vue.createCommentVNode("v-if",!0)],2),vue.createElementVNode("div",{id:vue.unref(u),class:vue.normalizeClass([vue.unref(l).e("body"),g.bodyClass])},[vue.renderSlot(g.$slots,"default")],10,["id"]),g.$slots.footer?(vue.openBlock(),vue.createElementBlock("footer",{key:0,class:vue.normalizeClass([vue.unref(l).e("footer"),g.footerClass])},[vue.renderSlot(g.$slots,"footer")],2)):vue.createCommentVNode("v-if",!0)],6))}});var ElDialogContent=_export_sfc$1(_sfc_main$t,[["__file","dialog-content.vue"]]);const dialogProps=buildProps({...dialogContentProps,appendToBody:Boolean,appendTo:{type:teleportProps.to.type,default:"body"},beforeClose:{type:definePropType(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,headerClass:String,bodyClass:String,footerClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"}}),dialogEmits={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[UPDATE_MODEL_EVENT]:e=>isBoolean(e),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},useLockscreen=(e,t={})=>{vue.isRef(e)||throwError("[useLockscreen]","You need to pass a ref param to this function");const n=t.ns||useNamespace("popup"),r=vue.computed(()=>n.bm("parent","hidden"));if(!isClient||hasClass(document.body,r.value))return;let i=0,a=!1,o="0";const u=()=>{setTimeout(()=>{typeof document>"u"||a&&document&&(document.body.style.width=o,removeClass(document.body,r.value))},200)};vue.watch(e,l=>{if(!l){u();return}a=!hasClass(document.body,r.value),a&&(o=document.body.style.width,addClass(document.body,r.value)),i=getScrollBarWidth(n.namespace.value);const c=document.documentElement.clientHeight<document.body.scrollHeight,p=getStyle(document.body,"overflowY");i>0&&(c||p==="scroll")&&a&&(document.body.style.width=`calc(100% - ${i}px)`)}),vue.onScopeDispose(()=>u())},useDialog=(e,t)=>{var n;const i=vue.getCurrentInstance().emit,{nextZIndex:a}=useZIndex();let o="";const u=useId(),l=useId(),c=vue.ref(!1),p=vue.ref(!1),d=vue.ref(!1),f=vue.ref((n=e.zIndex)!=null?n:a());let v,h;const m=useGlobalConfig("namespace",defaultNamespace),y=vue.computed(()=>{const O={},F=`--${m.value}-dialog`;return e.fullscreen||(e.top&&(O[`${F}-margin-top`]=e.top),e.width&&(O[`${F}-width`]=addUnit(e.width))),O}),g=vue.computed(()=>e.alignCenter?{display:"flex"}:{});function b(){i("opened")}function _(){i("closed"),i(UPDATE_MODEL_EVENT,!1),e.destroyOnClose&&(d.value=!1)}function S(){i("close")}function T(){h==null||h(),v==null||v(),e.openDelay&&e.openDelay>0?{stop:v}=useTimeoutFn(()=>M(),e.openDelay):M()}function w(){v==null||v(),h==null||h(),e.closeDelay&&e.closeDelay>0?{stop:h}=useTimeoutFn(()=>z(),e.closeDelay):z()}function x(){function O(F){F||(p.value=!0,c.value=!1)}e.beforeClose?e.beforeClose(O):w()}function L(){e.closeOnClickModal&&x()}function M(){isClient&&(c.value=!0)}function z(){c.value=!1}function A(){i("openAutoFocus")}function ue(){i("closeAutoFocus")}function he(O){var F;((F=O.detail)==null?void 0:F.focusReason)==="pointer"&&O.preventDefault()}e.lockScroll&&useLockscreen(c);function j(){e.closeOnPressEscape&&x()}return vue.watch(()=>e.zIndex,()=>{var O;f.value=(O=e.zIndex)!=null?O:a()}),vue.watch(()=>e.modelValue,O=>{var F;O?(p.value=!1,T(),d.value=!0,f.value=(F=e.zIndex)!=null?F:a(),vue.nextTick(()=>{i("open"),t.value&&(t.value.parentElement.scrollTop=0,t.value.parentElement.scrollLeft=0,t.value.scrollTop=0)})):c.value&&w()}),vue.watch(()=>e.fullscreen,O=>{t.value&&(O?(o=t.value.style.transform,t.value.style.transform=""):t.value.style.transform=o)}),vue.onMounted(()=>{e.modelValue&&(c.value=!0,d.value=!0,T())}),{afterEnter:b,afterLeave:_,beforeLeave:S,handleClose:x,onModalClick:L,close:w,doClose:z,onOpenAutoFocus:A,onCloseAutoFocus:ue,onCloseRequested:j,onFocusoutPrevented:he,titleId:u,bodyId:l,closed:p,style:y,overlayDialogStyle:g,rendered:d,visible:c,zIndex:f}},__default__$2=vue.defineComponent({name:"ElDialog",inheritAttrs:!1}),_sfc_main$s=vue.defineComponent({...__default__$2,props:dialogProps,emits:dialogEmits,setup(e,{expose:t}){const n=e,r=vue.useSlots();useDeprecated({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},vue.computed(()=>!!r.title));const i=useNamespace("dialog"),a=vue.ref(),o=vue.ref(),u=vue.ref(),{visible:l,titleId:c,bodyId:p,style:d,overlayDialogStyle:f,rendered:v,zIndex:h,afterEnter:m,afterLeave:y,beforeLeave:g,handleClose:b,onModalClick:_,onOpenAutoFocus:S,onCloseAutoFocus:T,onCloseRequested:w,onFocusoutPrevented:x}=useDialog(n,a);vue.provide(dialogInjectionKey,{dialogRef:a,headerRef:o,bodyId:p,ns:i,rendered:v,style:d});const L=useSameTarget(_),M=vue.computed(()=>n.draggable&&!n.fullscreen);return t({visible:l,dialogContentRef:u,resetPosition:()=>{var A;(A=u.value)==null||A.resetPosition()},handleClose:b}),(A,ue)=>(vue.openBlock(),vue.createBlock(vue.unref(ElTeleport),{to:A.appendTo,disabled:A.appendTo!=="body"?!1:!A.appendToBody},{default:vue.withCtx(()=>[vue.createVNode(vue.Transition,{name:"dialog-fade",onAfterEnter:vue.unref(m),onAfterLeave:vue.unref(y),onBeforeLeave:vue.unref(g),persisted:""},{default:vue.withCtx(()=>[vue.withDirectives(vue.createVNode(vue.unref(ElOverlay),{"custom-mask-event":"",mask:A.modal,"overlay-class":A.modalClass,"z-index":vue.unref(h)},{default:vue.withCtx(()=>[vue.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":A.title||void 0,"aria-labelledby":A.title?void 0:vue.unref(c),"aria-describedby":vue.unref(p),class:vue.normalizeClass(`${vue.unref(i).namespace.value}-overlay-dialog`),style:vue.normalizeStyle(vue.unref(f)),onClick:vue.unref(L).onClick,onMousedown:vue.unref(L).onMousedown,onMouseup:vue.unref(L).onMouseup},[vue.createVNode(vue.unref(ElFocusTrap),{loop:"",trapped:vue.unref(l),"focus-start-el":"container",onFocusAfterTrapped:vue.unref(S),onFocusAfterReleased:vue.unref(T),onFocusoutPrevented:vue.unref(x),onReleaseRequested:vue.unref(w)},{default:vue.withCtx(()=>[vue.unref(v)?(vue.openBlock(),vue.createBlock(ElDialogContent,vue.mergeProps({key:0,ref_key:"dialogContentRef",ref:u},A.$attrs,{center:A.center,"align-center":A.alignCenter,"close-icon":A.closeIcon,draggable:vue.unref(M),overflow:A.overflow,fullscreen:A.fullscreen,"header-class":A.headerClass,"body-class":A.bodyClass,"footer-class":A.footerClass,"show-close":A.showClose,title:A.title,"aria-level":A.headerAriaLevel,onClose:vue.unref(b)}),vue.createSlots({header:vue.withCtx(()=>[A.$slots.title?vue.renderSlot(A.$slots,"title",{key:1}):vue.renderSlot(A.$slots,"header",{key:0,close:vue.unref(b),titleId:vue.unref(c),titleClass:vue.unref(i).e("title")})]),default:vue.withCtx(()=>[vue.renderSlot(A.$slots,"default")]),_:2},[A.$slots.footer?{name:"footer",fn:vue.withCtx(()=>[vue.renderSlot(A.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","header-class","body-class","footer-class","show-close","title","aria-level","onClose"])):vue.createCommentVNode("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[vue.vShow,vue.unref(l)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var Dialog=_export_sfc$1(_sfc_main$s,[["__file","dialog.vue"]]);const ElDialog=withInstall(Dialog),inputNumberProps=buildProps({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.POSITIVE_INFINITY},min:{type:Number,default:Number.NEGATIVE_INFINITY},modelValue:{type:[Number,null]},readonly:Boolean,disabled:Boolean,size:useSizeProp,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:e=>e===null||isNumber(e)||["min","max"].includes(e),default:null},name:String,placeholder:String,precision:{type:Number,validator:e=>e>=0&&e===Number.parseInt(`${e}`,10)},validateEvent:{type:Boolean,default:!0},...useAriaProps(["ariaLabel"])}),inputNumberEmits={[CHANGE_EVENT]:(e,t)=>t!==e,blur:e=>e instanceof FocusEvent,focus:e=>e instanceof FocusEvent,[INPUT_EVENT]:e=>isNumber(e)||isNil(e),[UPDATE_MODEL_EVENT]:e=>isNumber(e)||isNil(e)},__default__$1=vue.defineComponent({name:"ElInputNumber"}),_sfc_main$r=vue.defineComponent({...__default__$1,props:inputNumberProps,emits:inputNumberEmits,setup(e,{expose:t,emit:n}){const r=e,{t:i}=useLocale(),a=useNamespace("input-number"),o=vue.ref(),u=vue.reactive({currentValue:r.modelValue,userInput:null}),{formItem:l}=useFormItem(),c=vue.computed(()=>isNumber(r.modelValue)&&r.modelValue<=r.min),p=vue.computed(()=>isNumber(r.modelValue)&&r.modelValue>=r.max),d=vue.computed(()=>{const O=g(r.step);return isUndefined(r.precision)?Math.max(g(r.modelValue),O):(O>r.precision&&debugWarn("InputNumber","precision should not be less than the decimal places of step"),r.precision)}),f=vue.computed(()=>r.controls&&r.controlsPosition==="right"),v=useFormSize(),h=useFormDisabled(),m=vue.computed(()=>{if(u.userInput!==null)return u.userInput;let O=u.currentValue;if(isNil(O))return"";if(isNumber(O)){if(Number.isNaN(O))return"";isUndefined(r.precision)||(O=O.toFixed(r.precision))}return O}),y=(O,F)=>{if(isUndefined(F)&&(F=d.value),F===0)return Math.round(O);let Y=String(O);const $=Y.indexOf(".");if($===-1||!Y.replace(".","").split("")[$+F])return O;const re=Y.length;return Y.charAt(re-1)==="5"&&(Y=`${Y.slice(0,Math.max(0,re-1))}6`),Number.parseFloat(Number(Y).toFixed(F))},g=O=>{if(isNil(O))return 0;const F=O.toString(),Y=F.indexOf(".");let $=0;return Y!==-1&&($=F.length-Y-1),$},b=(O,F=1)=>isNumber(O)?y(O+r.step*F):u.currentValue,_=()=>{if(r.readonly||h.value||p.value)return;const O=Number(m.value)||0,F=b(O);w(F),n(INPUT_EVENT,u.currentValue),he()},S=()=>{if(r.readonly||h.value||c.value)return;const O=Number(m.value)||0,F=b(O,-1);w(F),n(INPUT_EVENT,u.currentValue),he()},T=(O,F)=>{const{max:Y,min:$,step:V,precision:ie,stepStrictly:re,valueOnClear:ae}=r;Y<$&&throwError("InputNumber","min should not be greater than max.");let le=Number(O);if(isNil(O)||Number.isNaN(le))return null;if(O===""){if(ae===null)return null;le=isString$1(ae)?{min:$,max:Y}[ae]:ae}return re&&(le=y(Math.round(le/V)*V,ie),le!==O&&F&&n(UPDATE_MODEL_EVENT,le)),isUndefined(ie)||(le=y(le,ie)),(le>Y||le<$)&&(le=le>Y?Y:$,F&&n(UPDATE_MODEL_EVENT,le)),le},w=(O,F=!0)=>{var Y;const $=u.currentValue,V=T(O);if(!F){n(UPDATE_MODEL_EVENT,V);return}$===V&&O||(u.userInput=null,n(UPDATE_MODEL_EVENT,V),$!==V&&n(CHANGE_EVENT,V,$),r.validateEvent&&((Y=l==null?void 0:l.validate)==null||Y.call(l,"change").catch(ie=>debugWarn(ie))),u.currentValue=V)},x=O=>{u.userInput=O;const F=O===""?null:Number(O);n(INPUT_EVENT,F),w(F,!1)},L=O=>{const F=O!==""?Number(O):"";(isNumber(F)&&!Number.isNaN(F)||O==="")&&w(F),he(),u.userInput=null},M=()=>{var O,F;(F=(O=o.value)==null?void 0:O.focus)==null||F.call(O)},z=()=>{var O,F;(F=(O=o.value)==null?void 0:O.blur)==null||F.call(O)},A=O=>{n("focus",O)},ue=O=>{var F,Y;u.userInput=null,u.currentValue===null&&((F=o.value)!=null&&F.input)&&(o.value.input.value=""),n("blur",O),r.validateEvent&&((Y=l==null?void 0:l.validate)==null||Y.call(l,"blur").catch($=>debugWarn($)))},he=()=>{u.currentValue!==r.modelValue&&(u.currentValue=r.modelValue)},j=O=>{document.activeElement===O.target&&O.preventDefault()};return vue.watch(()=>r.modelValue,(O,F)=>{const Y=T(O,!0);u.userInput===null&&Y!==F&&(u.currentValue=Y)},{immediate:!0}),vue.onMounted(()=>{var O;const{min:F,max:Y,modelValue:$}=r,V=(O=o.value)==null?void 0:O.input;if(V.setAttribute("role","spinbutton"),Number.isFinite(Y)?V.setAttribute("aria-valuemax",String(Y)):V.removeAttribute("aria-valuemax"),Number.isFinite(F)?V.setAttribute("aria-valuemin",String(F)):V.removeAttribute("aria-valuemin"),V.setAttribute("aria-valuenow",u.currentValue||u.currentValue===0?String(u.currentValue):""),V.setAttribute("aria-disabled",String(h.value)),!isNumber($)&&$!=null){let ie=Number($);Number.isNaN(ie)&&(ie=null),n(UPDATE_MODEL_EVENT,ie)}V.addEventListener("wheel",j,{passive:!1})}),vue.onUpdated(()=>{var O,F;const Y=(O=o.value)==null?void 0:O.input;Y==null||Y.setAttribute("aria-valuenow",`${(F=u.currentValue)!=null?F:""}`)}),t({focus:M,blur:z}),(O,F)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([vue.unref(a).b(),vue.unref(a).m(vue.unref(v)),vue.unref(a).is("disabled",vue.unref(h)),vue.unref(a).is("without-controls",!O.controls),vue.unref(a).is("controls-right",vue.unref(f))]),onDragstart:vue.withModifiers(()=>{},["prevent"])},[O.controls?vue.withDirectives((vue.openBlock(),vue.createElementBlock("span",{key:0,role:"button","aria-label":vue.unref(i)("el.inputNumber.decrease"),class:vue.normalizeClass([vue.unref(a).e("decrease"),vue.unref(a).is("disabled",vue.unref(c))]),onKeydown:vue.withKeys(S,["enter"])},[vue.renderSlot(O.$slots,"decrease-icon",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.unref(f)?(vue.openBlock(),vue.createBlock(vue.unref(arrow_down_default),{key:0})):(vue.openBlock(),vue.createBlock(vue.unref(minus_default),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[vue.unref(vRepeatClick),S]]):vue.createCommentVNode("v-if",!0),O.controls?vue.withDirectives((vue.openBlock(),vue.createElementBlock("span",{key:1,role:"button","aria-label":vue.unref(i)("el.inputNumber.increase"),class:vue.normalizeClass([vue.unref(a).e("increase"),vue.unref(a).is("disabled",vue.unref(p))]),onKeydown:vue.withKeys(_,["enter"])},[vue.renderSlot(O.$slots,"increase-icon",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.unref(f)?(vue.openBlock(),vue.createBlock(vue.unref(arrow_up_default),{key:0})):(vue.openBlock(),vue.createBlock(vue.unref(plus_default),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[vue.unref(vRepeatClick),_]]):vue.createCommentVNode("v-if",!0),vue.createVNode(vue.unref(ElInput),{id:O.id,ref_key:"input",ref:o,type:"number",step:O.step,"model-value":vue.unref(m),placeholder:O.placeholder,readonly:O.readonly,disabled:vue.unref(h),size:vue.unref(v),max:O.max,min:O.min,name:O.name,"aria-label":O.ariaLabel,"validate-event":!1,onKeydown:[vue.withKeys(vue.withModifiers(_,["prevent"]),["up"]),vue.withKeys(vue.withModifiers(S,["prevent"]),["down"])],onBlur:ue,onFocus:A,onInput:x,onChange:L},vue.createSlots({_:2},[O.$slots.prefix?{name:"prefix",fn:vue.withCtx(()=>[vue.renderSlot(O.$slots,"prefix")])}:void 0,O.$slots.suffix?{name:"suffix",fn:vue.withCtx(()=>[vue.renderSlot(O.$slots,"suffix")])}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","onKeydown"])],42,["onDragstart"]))}});var InputNumber=_export_sfc$1(_sfc_main$r,[["__file","input-number.vue"]]);const ElInputNumber=withInstall(InputNumber);function useCalcInputWidth(){const e=vue.shallowRef(),t=vue.ref(0),n=11,r=vue.computed(()=>({minWidth:`${Math.max(t.value,n)}px`}));return useResizeObserver(e,()=>{var a,o;t.value=(o=(a=e.value)==null?void 0:a.getBoundingClientRect().width)!=null?o:0}),{calculatorRef:e,calculatorWidth:t,inputStyle:r}}const selectGroupKey=Symbol("ElSelectGroup"),selectKey=Symbol("ElSelect"),COMPONENT_NAME$2="ElOption",optionProps=buildProps({value:{type:[String,Number,Boolean,Object],required:!0},label:{type:[String,Number]},created:Boolean,disabled:Boolean});function useOption(e,t){const n=vue.inject(selectKey);n||throwError(COMPONENT_NAME$2,"usage: <el-select><el-option /></el-select/>");const r=vue.inject(selectGroupKey,{disabled:!1}),i=vue.computed(()=>p(castArray$1(n.props.modelValue),e.value)),a=vue.computed(()=>{var v;if(n.props.multiple){const h=castArray$1((v=n.props.modelValue)!=null?v:[]);return!i.value&&h.length>=n.props.multipleLimit&&n.props.multipleLimit>0}else return!1}),o=vue.computed(()=>{var v;return(v=e.label)!=null?v:isObject$1(e.value)?"":e.value}),u=vue.computed(()=>e.value||e.label||""),l=vue.computed(()=>e.disabled||t.groupDisabled||a.value),c=vue.getCurrentInstance(),p=(v=[],h)=>{if(isObject$1(e.value)){const m=n.props.valueKey;return v&&v.some(y=>vue.toRaw(get(y,m))===get(h,m))}else return v&&v.includes(h)},d=()=>{!e.disabled&&!r.disabled&&(n.states.hoveringIndex=n.optionsArray.indexOf(c.proxy))},f=v=>{const h=new RegExp(escapeStringRegexp(v),"i");t.visible=h.test(String(o.value))||e.created};return vue.watch(()=>o.value,()=>{!e.created&&!n.props.remote&&n.setSelected()}),vue.watch(()=>e.value,(v,h)=>{const{remote:m,valueKey:y}=n.props;if((m?v!==h:!isEqual(v,h))&&(n.onOptionDestroy(h,c.proxy),n.onOptionCreate(c.proxy)),!e.created&&!m){if(y&&isObject$1(v)&&isObject$1(h)&&v[y]===h[y])return;n.setSelected()}}),vue.watch(()=>r.disabled,()=>{t.groupDisabled=r.disabled},{immediate:!0}),{select:n,currentLabel:o,currentValue:u,itemSelected:i,isDisabled:l,hoverItem:d,updateOption:f}}const _sfc_main$q=vue.defineComponent({name:COMPONENT_NAME$2,componentName:COMPONENT_NAME$2,props:optionProps,setup(e){const t=useNamespace("select"),n=useId(),r=vue.computed(()=>[t.be("dropdown","item"),t.is("disabled",vue.unref(u)),t.is("selected",vue.unref(o)),t.is("hovering",vue.unref(f))]),i=vue.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:a,itemSelected:o,isDisabled:u,select:l,hoverItem:c,updateOption:p}=useOption(e,i),{visible:d,hover:f}=vue.toRefs(i),v=vue.getCurrentInstance().proxy;l.onOptionCreate(v),vue.onBeforeUnmount(()=>{const m=v.value,{selected:y}=l.states,g=y.some(b=>b.value===v.value);vue.nextTick(()=>{l.states.cachedOptions.get(m)===v&&!g&&l.states.cachedOptions.delete(m)}),l.onOptionDestroy(m,v)});function h(){u.value||l.handleOptionSelect(v)}return{ns:t,id:n,containerKls:r,currentLabel:a,itemSelected:o,isDisabled:u,select:l,visible:d,hover:f,states:i,hoverItem:c,updateOption:p,selectOptionClick:h}}});function _sfc_render$p(e,t){return vue.withDirectives((vue.openBlock(),vue.createElementBlock("li",{id:e.id,class:vue.normalizeClass(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMousemove:e.hoverItem,onClick:vue.withModifiers(e.selectOptionClick,["stop"])},[vue.renderSlot(e.$slots,"default",{},()=>[vue.createElementVNode("span",null,vue.toDisplayString(e.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMousemove","onClick"])),[[vue.vShow,e.visible]])}var Option=_export_sfc$1(_sfc_main$q,[["render",_sfc_render$p],["__file","option.vue"]]);const _sfc_main$p=vue.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=vue.inject(selectKey),t=useNamespace("select"),n=vue.computed(()=>e.props.popperClass),r=vue.computed(()=>e.props.multiple),i=vue.computed(()=>e.props.fitInputWidth),a=vue.ref("");function o(){var u;a.value=`${(u=e.selectRef)==null?void 0:u.offsetWidth}px`}return vue.onMounted(()=>{o(),useResizeObserver(e.selectRef,o)}),{ns:t,minWidth:a,popperClass:n,isMultiple:r,isFitInputWidth:i}}});function _sfc_render$o(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:vue.normalizeStyle({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(e.ns.be("dropdown","header"))},[vue.renderSlot(e.$slots,"header")],2)):vue.createCommentVNode("v-if",!0),vue.renderSlot(e.$slots,"default"),e.$slots.footer?(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass(e.ns.be("dropdown","footer"))},[vue.renderSlot(e.$slots,"footer")],2)):vue.createCommentVNode("v-if",!0)],6)}var ElSelectMenu=_export_sfc$1(_sfc_main$p,[["render",_sfc_render$o],["__file","select-dropdown.vue"]]);const useSelect=(e,t)=>{const{t:n}=useLocale(),r=useId(),i=useNamespace("select"),a=useNamespace("input"),o=vue.reactive({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),u=vue.ref(),l=vue.ref(),c=vue.ref(),p=vue.ref(),d=vue.ref(),f=vue.ref(),v=vue.ref(),h=vue.ref(),m=vue.ref(),y=vue.ref(),g=vue.ref(),{isComposing:b,handleCompositionStart:_,handleCompositionUpdate:S,handleCompositionEnd:T}=useComposition({afterComposition:de=>Vn(de)}),{wrapperRef:w,isFocused:x,handleBlur:L}=useFocusController(d,{beforeFocus(){return F.value},afterFocus(){e.automaticDropdown&&!M.value&&(M.value=!0,o.menuVisibleOnFocus=!0)},beforeBlur(de){var Ve,Pt;return((Ve=c.value)==null?void 0:Ve.isFocusInsideContent(de))||((Pt=p.value)==null?void 0:Pt.isFocusInsideContent(de))},afterBlur(){var de;M.value=!1,o.menuVisibleOnFocus=!1,e.validateEvent&&((de=ue==null?void 0:ue.validate)==null||de.call(ue,"blur").catch(Ve=>debugWarn(Ve)))}}),M=vue.ref(!1),z=vue.ref(),{form:A,formItem:ue}=useFormItem(),{inputId:he}=useFormItemInputId(e,{formItemContext:ue}),{valueOnClear:j,isEmptyValue:O}=useEmptyValues(e),F=vue.computed(()=>e.disabled||(A==null?void 0:A.disabled)),Y=vue.computed(()=>isArray$1(e.modelValue)?e.modelValue.length>0:!O(e.modelValue)),$=vue.computed(()=>{var de;return(de=A==null?void 0:A.statusIcon)!=null?de:!1}),V=vue.computed(()=>e.clearable&&!F.value&&o.inputHovering&&Y.value),ie=vue.computed(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),re=vue.computed(()=>i.is("reverse",!!(ie.value&&M.value))),ae=vue.computed(()=>(ue==null?void 0:ue.validateState)||""),le=vue.computed(()=>ae.value&&ValidateComponentsMap[ae.value]),_e=vue.computed(()=>e.remote?300:0),Oe=vue.computed(()=>e.remote&&!o.inputValue&&o.options.size===0),Ce=vue.computed(()=>e.loading?e.loadingText||n("el.select.loading"):e.filterable&&o.inputValue&&o.options.size>0&&xe.value===0?e.noMatchText||n("el.select.noMatch"):o.options.size===0?e.noDataText||n("el.select.noData"):null),xe=vue.computed(()=>Fe.value.filter(de=>de.visible).length),Fe=vue.computed(()=>{const de=Array.from(o.options.values()),Ve=[];return o.optionValues.forEach(Pt=>{const Dn=de.findIndex(Fn=>Fn.value===Pt);Dn>-1&&Ve.push(de[Dn])}),Ve.length>=de.length?Ve:de}),At=vue.computed(()=>Array.from(o.cachedOptions.values())),Dt=vue.computed(()=>{const de=Fe.value.filter(Ve=>!Ve.created).some(Ve=>Ve.currentLabel===o.inputValue);return e.filterable&&e.allowCreate&&o.inputValue!==""&&!de}),Lt=()=>{e.filterable&&isFunction$1(e.filterMethod)||e.filterable&&e.remote&&isFunction$1(e.remoteMethod)||Fe.value.forEach(de=>{var Ve;(Ve=de.updateOption)==null||Ve.call(de,o.inputValue)})},_n=useFormSize(),Cn=vue.computed(()=>["small"].includes(_n.value)?"small":"default"),An=vue.computed({get(){return M.value&&!Oe.value},set(de){M.value=de}}),Tn=vue.computed(()=>{if(e.multiple&&!isUndefined(e.modelValue))return castArray$1(e.modelValue).length===0&&!o.inputValue;const de=isArray$1(e.modelValue)?e.modelValue[0]:e.modelValue;return e.filterable||isUndefined(de)?!o.inputValue:!0}),Sn=vue.computed(()=>{var de;const Ve=(de=e.placeholder)!=null?de:n("el.select.placeholder");return e.multiple||!Y.value?Ve:o.selectedLabel}),bn=vue.computed(()=>isIOS?null:"mouseenter");vue.watch(()=>e.modelValue,(de,Ve)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(o.inputValue="",wn("")),En(),!isEqual(de,Ve)&&e.validateEvent&&(ue==null||ue.validate("change").catch(Pt=>debugWarn(Pt)))},{flush:"post",deep:!0}),vue.watch(()=>M.value,de=>{de?wn(o.inputValue):(o.inputValue="",o.previousQuery=null,o.isBeforeHide=!0),t("visible-change",de)}),vue.watch(()=>o.options.entries(),()=>{isClient&&(En(),e.defaultFirstOption&&(e.filterable||e.remote)&&xe.value&&Ue())},{flush:"post"}),vue.watch([()=>o.hoveringIndex,Fe],([de])=>{isNumber(de)&&de>-1?z.value=Fe.value[de]||{}:z.value={},Fe.value.forEach(Ve=>{Ve.hover=z.value===Ve})}),vue.watchEffect(()=>{o.isBeforeHide||Lt()});const wn=de=>{o.previousQuery===de||b.value||(o.previousQuery=de,e.filterable&&isFunction$1(e.filterMethod)?e.filterMethod(de):e.filterable&&e.remote&&isFunction$1(e.remoteMethod)&&e.remoteMethod(de),e.defaultFirstOption&&(e.filterable||e.remote)&&xe.value?vue.nextTick(Ue):vue.nextTick(Mn))},Ue=()=>{const de=Fe.value.filter(Fn=>Fn.visible&&!Fn.disabled&&!Fn.states.groupDisabled),Ve=de.find(Fn=>Fn.created),Pt=de[0],Dn=Fe.value.map(Fn=>Fn.value);o.hoveringIndex=k(Dn,Ve||Pt)},En=()=>{if(e.multiple)o.selectedLabel="";else{const Ve=isArray$1(e.modelValue)?e.modelValue[0]:e.modelValue,Pt=Pn(Ve);o.selectedLabel=Pt.currentLabel,o.selected=[Pt];return}const de=[];isUndefined(e.modelValue)||castArray$1(e.modelValue).forEach(Ve=>{de.push(Pn(Ve))}),o.selected=de},Pn=de=>{let Ve;const Pt=isPlainObject(de);for(let Yn=o.cachedOptions.size-1;Yn>=0;Yn--){const jn=At.value[Yn];if(Pt?get(jn.value,e.valueKey)===get(de,e.valueKey):jn.value===de){Ve={value:de,currentLabel:jn.currentLabel,get isDisabled(){return jn.isDisabled}};break}}if(Ve)return Ve;const Dn=Pt?de.label:de??"";return{value:de,currentLabel:Dn}},Mn=()=>{o.hoveringIndex=Fe.value.findIndex(de=>o.selected.some(Ve=>Ln(Ve)===Ln(de)))},$n=()=>{o.selectionWidth=Number.parseFloat(window.getComputedStyle(l.value).width)},$e=()=>{o.collapseItemWidth=y.value.getBoundingClientRect().width},Et=()=>{var de,Ve;(Ve=(de=c.value)==null?void 0:de.updatePopper)==null||Ve.call(de)},On=()=>{var de,Ve;(Ve=(de=p.value)==null?void 0:de.updatePopper)==null||Ve.call(de)},In=()=>{o.inputValue.length>0&&!M.value&&(M.value=!0),wn(o.inputValue)},Vn=de=>{if(o.inputValue=de.target.value,e.remote)Rn();else return In()},Rn=debounce(()=>{In()},_e.value),hn=de=>{isEqual(e.modelValue,de)||t(CHANGE_EVENT,de)},zn=de=>findLastIndex(de,Ve=>{const Pt=o.cachedOptions.get(Ve);return Pt&&!Pt.disabled&&!Pt.states.groupDisabled}),xn=de=>{if(e.multiple&&de.code!==EVENT_CODE.delete&&de.target.value.length<=0){const Ve=castArray$1(e.modelValue).slice(),Pt=zn(Ve);if(Pt<0)return;const Dn=Ve[Pt];Ve.splice(Pt,1),t(UPDATE_MODEL_EVENT,Ve),hn(Ve),t("remove-tag",Dn)}},vn=(de,Ve)=>{const Pt=o.selected.indexOf(Ve);if(Pt>-1&&!F.value){const Dn=castArray$1(e.modelValue).slice();Dn.splice(Pt,1),t(UPDATE_MODEL_EVENT,Dn),hn(Dn),t("remove-tag",Ve.value)}de.stopPropagation(),kn()},D=de=>{de.stopPropagation();const Ve=e.multiple?[]:j.value;if(e.multiple)for(const Pt of o.selected)Pt.isDisabled&&Ve.push(Pt.value);t(UPDATE_MODEL_EVENT,Ve),hn(Ve),o.hoveringIndex=-1,M.value=!1,t("clear"),kn()},oe=de=>{var Ve;if(e.multiple){const Pt=castArray$1((Ve=e.modelValue)!=null?Ve:[]).slice(),Dn=k(Pt,de);Dn>-1?Pt.splice(Dn,1):(e.multipleLimit<=0||Pt.length<e.multipleLimit)&&Pt.push(de.value),t(UPDATE_MODEL_EVENT,Pt),hn(Pt),de.created&&wn(""),e.filterable&&!e.reserveKeyword&&(o.inputValue="")}else t(UPDATE_MODEL_EVENT,de.value),hn(de.value),M.value=!1;kn(),!M.value&&vue.nextTick(()=>{pe(de)})},k=(de,Ve)=>isUndefined(Ve)?-1:isObject$1(Ve.value)?de.findIndex(Pt=>isEqual(get(Pt,e.valueKey),Ln(Ve))):de.indexOf(Ve.value),pe=de=>{var Ve,Pt,Dn,Fn,Yn;const jn=isArray$1(de)?de[0]:de;let Gn=null;if(jn!=null&&jn.value){const Kn=Fe.value.filter(nr=>nr.value===jn.value);Kn.length>0&&(Gn=Kn[0].$el)}if(c.value&&Gn){const Kn=(Fn=(Dn=(Pt=(Ve=c.value)==null?void 0:Ve.popperRef)==null?void 0:Pt.contentRef)==null?void 0:Dn.querySelector)==null?void 0:Fn.call(Dn,`.${i.be("dropdown","wrap")}`);Kn&&scrollIntoView(Kn,Gn)}(Yn=g.value)==null||Yn.handleScroll()},Ne=de=>{o.options.set(de.value,de),o.cachedOptions.set(de.value,de)},ze=(de,Ve)=>{o.options.get(de)===Ve&&o.options.delete(de)},jt=vue.computed(()=>{var de,Ve;return(Ve=(de=c.value)==null?void 0:de.popperRef)==null?void 0:Ve.contentRef}),Nn=()=>{o.isBeforeHide=!1,vue.nextTick(()=>{var de;(de=g.value)==null||de.update(),pe(o.selected)})},kn=()=>{var de;(de=d.value)==null||de.focus()},qn=()=>{var de;if(M.value){M.value=!1,vue.nextTick(()=>{var Ve;return(Ve=d.value)==null?void 0:Ve.blur()});return}(de=d.value)==null||de.blur()},Un=de=>{D(de)},Bn=de=>{if(M.value=!1,x.value){const Ve=new FocusEvent("focus",de);vue.nextTick(()=>L(Ve))}},Ie=()=>{o.inputValue.length>0?o.inputValue="":M.value=!1},kt=()=>{F.value||(isIOS&&(o.inputHovering=!0),o.menuVisibleOnFocus?o.menuVisibleOnFocus=!1:M.value=!M.value)},qe=()=>{if(!M.value)kt();else{const de=Fe.value[o.hoveringIndex];de&&!de.isDisabled&&oe(de)}},Ln=de=>isObject$1(de.value)?get(de.value,e.valueKey):de.value,Hn=vue.computed(()=>Fe.value.filter(de=>de.visible).every(de=>de.isDisabled)),Wn=vue.computed(()=>e.multiple?e.collapseTags?o.selected.slice(0,e.maxCollapseTags):o.selected:[]),Zn=vue.computed(()=>e.multiple?e.collapseTags?o.selected.slice(e.maxCollapseTags):[]:[]),Jn=de=>{if(!M.value){M.value=!0;return}if(!(o.options.size===0||xe.value===0||b.value)&&!Hn.value){de==="next"?(o.hoveringIndex++,o.hoveringIndex===o.options.size&&(o.hoveringIndex=0)):de==="prev"&&(o.hoveringIndex--,o.hoveringIndex<0&&(o.hoveringIndex=o.options.size-1));const Ve=Fe.value[o.hoveringIndex];(Ve.isDisabled||!Ve.visible)&&Jn(de),vue.nextTick(()=>pe(z.value))}},Xn=()=>{if(!l.value)return 0;const de=window.getComputedStyle(l.value);return Number.parseFloat(de.gap||"6px")},Qn=vue.computed(()=>{const de=Xn();return{maxWidth:`${y.value&&e.maxCollapseTags===1?o.selectionWidth-o.collapseItemWidth-de:o.selectionWidth}px`}}),er=vue.computed(()=>({maxWidth:`${o.selectionWidth}px`})),tr=de=>{t("popup-scroll",de)};return useResizeObserver(l,$n),useResizeObserver(h,Et),useResizeObserver(w,Et),useResizeObserver(m,On),useResizeObserver(y,$e),vue.onMounted(()=>{En()}),{inputId:he,contentId:r,nsSelect:i,nsInput:a,states:o,isFocused:x,expanded:M,optionsArray:Fe,hoverOption:z,selectSize:_n,filteredOptionsCount:xe,updateTooltip:Et,updateTagTooltip:On,debouncedOnInputChange:Rn,onInput:Vn,deletePrevTag:xn,deleteTag:vn,deleteSelected:D,handleOptionSelect:oe,scrollToOption:pe,hasModelValue:Y,shouldShowPlaceholder:Tn,currentPlaceholder:Sn,mouseEnterEventName:bn,needStatusIcon:$,showClose:V,iconComponent:ie,iconReverse:re,validateState:ae,validateIcon:le,showNewOption:Dt,updateOptions:Lt,collapseTagSize:Cn,setSelected:En,selectDisabled:F,emptyText:Ce,handleCompositionStart:_,handleCompositionUpdate:S,handleCompositionEnd:T,onOptionCreate:Ne,onOptionDestroy:ze,handleMenuEnter:Nn,focus:kn,blur:qn,handleClearClick:Un,handleClickOutside:Bn,handleEsc:Ie,toggleMenu:kt,selectOption:qe,getValueKey:Ln,navigateOptions:Jn,dropdownMenuVisible:An,showTagList:Wn,collapseTagList:Zn,popupScroll:tr,tagStyle:Qn,collapseTagStyle:er,popperRef:jt,inputRef:d,tooltipRef:c,tagTooltipRef:p,prefixRef:f,suffixRef:v,selectRef:u,wrapperRef:w,selectionRef:l,scrollbarRef:g,menuRef:h,tagMenuRef:m,collapseItemRef:y}};var ElOptions=vue.defineComponent({name:"ElOptions",setup(e,{slots:t}){const n=vue.inject(selectKey);let r=[];return()=>{var i,a;const o=(i=t.default)==null?void 0:i.call(t),u=[];function l(c){isArray$1(c)&&c.forEach(p=>{var d,f,v,h;const m=(d=(p==null?void 0:p.type)||{})==null?void 0:d.name;m==="ElOptionGroup"?l(!isString$1(p.children)&&!isArray$1(p.children)&&isFunction$1((f=p.children)==null?void 0:f.default)?(v=p.children)==null?void 0:v.default():p.children):m==="ElOption"?u.push((h=p.props)==null?void 0:h.value):isArray$1(p.children)&&l(p.children)})}return o.length&&l((a=o[0])==null?void 0:a.children),isEqual(u,r)||(r=u,n&&(n.states.optionValues=u)),o}}});const selectProps=buildProps({name:String,id:String,modelValue:{type:definePropType([Array,String,Number,Boolean,Object]),default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:useSizeProp,effect:{type:definePropType(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:definePropType(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:useTooltipContentProps.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:iconPropType,default:circle_close_default},fitInputWidth:Boolean,suffixIcon:{type:iconPropType,default:arrow_down_default},tagType:{...tagProps.type,default:"info"},tagEffect:{...tagProps.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:definePropType(String),values:Ee,default:"bottom-start"},fallbackPlacements:{type:definePropType(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:useTooltipContentProps.appendTo,...useEmptyValuesProps,...useAriaProps(["ariaLabel"])});scrollbarEmits.scroll;const COMPONENT_NAME$1="ElSelect",_sfc_main$o=vue.defineComponent({name:COMPONENT_NAME$1,componentName:COMPONENT_NAME$1,components:{ElSelectMenu,ElOption:Option,ElOptions,ElTag,ElScrollbar,ElTooltip,ElIcon},directives:{ClickOutside},props:selectProps,emits:[UPDATE_MODEL_EVENT,CHANGE_EVENT,"remove-tag","clear","visible-change","focus","blur","popup-scroll"],setup(e,{emit:t,slots:n}){const r=vue.getCurrentInstance();r.appContext.config.warnHandler=(...f)=>{!f[0]||f[0].includes('Slot "default" invoked outside of the render function')||console.warn(...f)};const i=vue.computed(()=>{const{modelValue:f,multiple:v}=e,h=v?[]:void 0;return isArray$1(f)?v?f:h:v?h:f}),a=vue.reactive({...vue.toRefs(e),modelValue:i}),o=useSelect(a,t),{calculatorRef:u,inputStyle:l}=useCalcInputWidth(),c=f=>f.reduce((v,h)=>(v.push(h),h.children&&h.children.length>0&&v.push(...c(h.children)),v),[]),p=f=>{flattedChildren(f||[]).forEach(h=>{var m;if(isObject$1(h)&&(h.type.name==="ElOption"||h.type.name==="ElTree")){const y=h.type.name;if(y==="ElTree"){const g=((m=h.props)==null?void 0:m.data)||[];c(g).forEach(_=>{_.currentLabel=_.label||(isObject$1(_.value)?"":_.value),o.onOptionCreate(_)})}else if(y==="ElOption"){const g={...h.props};g.currentLabel=g.label||(isObject$1(g.value)?"":g.value),o.onOptionCreate(g)}}})};vue.watch(()=>{var f;return(f=n.default)==null?void 0:f.call(n)},f=>{e.persistent||p(f)},{immediate:!0}),vue.provide(selectKey,vue.reactive({props:a,states:o.states,selectRef:o.selectRef,optionsArray:o.optionsArray,setSelected:o.setSelected,handleOptionSelect:o.handleOptionSelect,onOptionCreate:o.onOptionCreate,onOptionDestroy:o.onOptionDestroy}));const d=vue.computed(()=>e.multiple?o.states.selected.map(f=>f.currentLabel):o.states.selectedLabel);return{...o,modelValue:i,selectedLabel:d,calculatorRef:u,inputStyle:l}}});function _sfc_render$n(e,t){const n=vue.resolveComponent("el-tag"),r=vue.resolveComponent("el-tooltip"),i=vue.resolveComponent("el-icon"),a=vue.resolveComponent("el-option"),o=vue.resolveComponent("el-options"),u=vue.resolveComponent("el-scrollbar"),l=vue.resolveComponent("el-select-menu"),c=vue.resolveDirective("click-outside");return vue.withDirectives((vue.openBlock(),vue.createElementBlock("div",{ref:"selectRef",class:vue.normalizeClass([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),[vue.toHandlerKey(e.mouseEnterEventName)]:p=>e.states.inputHovering=!0,onMouseleave:p=>e.states.inputHovering=!1},[vue.createVNode(r,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,"append-to":e.appendTo,"show-arrow":e.showArrow,offset:e.offset,onBeforeShow:e.handleMenuEnter,onHide:p=>e.states.isBeforeHide=!1},{default:vue.withCtx(()=>{var p;return[vue.createElementVNode("div",{ref:"wrapperRef",class:vue.normalizeClass([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:vue.withModifiers(e.toggleMenu,["prevent"])},[e.$slots.prefix?(vue.openBlock(),vue.createElementBlock("div",{key:0,ref:"prefixRef",class:vue.normalizeClass(e.nsSelect.e("prefix"))},[vue.renderSlot(e.$slots,"prefix")],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{ref:"selectionRef",class:vue.normalizeClass([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?vue.renderSlot(e.$slots,"tag",{key:0},()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.showTagList,d=>(vue.openBlock(),vue.createElementBlock("div",{key:e.getValueKey(d),class:vue.normalizeClass(e.nsSelect.e("selected-item"))},[vue.createVNode(n,{closable:!e.selectDisabled&&!d.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:vue.normalizeStyle(e.tagStyle),onClose:f=>e.deleteTag(f,d)},{default:vue.withCtx(()=>[vue.createElementVNode("span",{class:vue.normalizeClass(e.nsSelect.e("tags-text"))},[vue.renderSlot(e.$slots,"label",{label:d.currentLabel,value:d.value},()=>[vue.createTextVNode(vue.toDisplayString(d.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(vue.openBlock(),vue.createBlock(r,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:vue.withCtx(()=>[vue.createElementVNode("div",{ref:"collapseItemRef",class:vue.normalizeClass(e.nsSelect.e("selected-item"))},[vue.createVNode(n,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:vue.normalizeStyle(e.collapseTagStyle)},{default:vue.withCtx(()=>[vue.createElementVNode("span",{class:vue.normalizeClass(e.nsSelect.e("tags-text"))}," + "+vue.toDisplayString(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:vue.withCtx(()=>[vue.createElementVNode("div",{ref:"tagMenuRef",class:vue.normalizeClass(e.nsSelect.e("selection"))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.collapseTagList,d=>(vue.openBlock(),vue.createElementBlock("div",{key:e.getValueKey(d),class:vue.normalizeClass(e.nsSelect.e("selected-item"))},[vue.createVNode(n,{class:"in-tooltip",closable:!e.selectDisabled&&!d.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:f=>e.deleteTag(f,d)},{default:vue.withCtx(()=>[vue.createElementVNode("span",{class:vue.normalizeClass(e.nsSelect.e("tags-text"))},[vue.renderSlot(e.$slots,"label",{label:d.currentLabel,value:d.value},()=>[vue.createTextVNode(vue.toDisplayString(d.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):vue.createCommentVNode("v-if",!0)]):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{class:vue.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[vue.withDirectives(vue.createElementVNode("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":d=>e.states.inputValue=d,type:"text",name:e.name,class:vue.normalizeClass([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:vue.normalizeStyle(e.inputStyle),tabindex:e.tabindex,role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((p=e.hoverOption)==null?void 0:p.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[vue.withKeys(vue.withModifiers(d=>e.navigateOptions("next"),["stop","prevent"]),["down"]),vue.withKeys(vue.withModifiers(d=>e.navigateOptions("prev"),["stop","prevent"]),["up"]),vue.withKeys(vue.withModifiers(e.handleEsc,["stop","prevent"]),["esc"]),vue.withKeys(vue.withModifiers(e.selectOption,["stop","prevent"]),["enter"]),vue.withKeys(vue.withModifiers(e.deletePrevTag,["stop"]),["delete"])],onCompositionstart:e.handleCompositionStart,onCompositionupdate:e.handleCompositionUpdate,onCompositionend:e.handleCompositionEnd,onInput:e.onInput,onClick:vue.withModifiers(e.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[vue.vModelText,e.states.inputValue]]),e.filterable?(vue.openBlock(),vue.createElementBlock("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:vue.normalizeClass(e.nsSelect.e("input-calculator")),textContent:vue.toDisplayString(e.states.inputValue)},null,10,["textContent"])):vue.createCommentVNode("v-if",!0)],2),e.shouldShowPlaceholder?(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?vue.renderSlot(e.$slots,"label",{key:0,label:e.currentPlaceholder,value:e.modelValue},()=>[vue.createElementVNode("span",null,vue.toDisplayString(e.currentPlaceholder),1)]):(vue.openBlock(),vue.createElementBlock("span",{key:1},vue.toDisplayString(e.currentPlaceholder),1))],2)):vue.createCommentVNode("v-if",!0)],2),vue.createElementVNode("div",{ref:"suffixRef",class:vue.normalizeClass(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(vue.openBlock(),vue.createBlock(i,{key:0,class:vue.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):vue.createCommentVNode("v-if",!0),e.showClose&&e.clearIcon?(vue.openBlock(),vue.createBlock(i,{key:1,class:vue.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.nsSelect.e("clear")]),onClick:e.handleClearClick},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(e.clearIcon)))]),_:1},8,["class","onClick"])):vue.createCommentVNode("v-if",!0),e.validateState&&e.validateIcon&&e.needStatusIcon?(vue.openBlock(),vue.createBlock(i,{key:2,class:vue.normalizeClass([e.nsInput.e("icon"),e.nsInput.e("validateIcon"),e.nsInput.is("loading",e.validateState==="validating")])},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(e.validateIcon)))]),_:1},8,["class"])):vue.createCommentVNode("v-if",!0)],2)],10,["onClick"])]}),content:vue.withCtx(()=>[vue.createVNode(l,{ref:"menuRef"},{default:vue.withCtx(()=>[e.$slots.header?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(e.nsSelect.be("dropdown","header")),onClick:vue.withModifiers(()=>{},["stop"])},[vue.renderSlot(e.$slots,"header")],10,["onClick"])):vue.createCommentVNode("v-if",!0),vue.withDirectives(vue.createVNode(u,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:vue.normalizeClass([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical",onScroll:e.popupScroll},{default:vue.withCtx(()=>[e.showNewOption?(vue.openBlock(),vue.createBlock(a,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):vue.createCommentVNode("v-if",!0),vue.createVNode(o,null,{default:vue.withCtx(()=>[vue.renderSlot(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label","onScroll"]),[[vue.vShow,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass(e.nsSelect.be("dropdown","loading"))},[vue.renderSlot(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(vue.openBlock(),vue.createElementBlock("div",{key:2,class:vue.normalizeClass(e.nsSelect.be("dropdown","empty"))},[vue.renderSlot(e.$slots,"empty",{},()=>[vue.createElementVNode("span",null,vue.toDisplayString(e.emptyText),1)])],2)):vue.createCommentVNode("v-if",!0),e.$slots.footer?(vue.openBlock(),vue.createElementBlock("div",{key:3,class:vue.normalizeClass(e.nsSelect.be("dropdown","footer")),onClick:vue.withModifiers(()=>{},["stop"])},[vue.renderSlot(e.$slots,"footer")],10,["onClick"])):vue.createCommentVNode("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow","onHide"])],16,["onMouseleave"])),[[c,e.handleClickOutside,e.popperRef]])}var Select=_export_sfc$1(_sfc_main$o,[["render",_sfc_render$n],["__file","select.vue"]]);const _sfc_main$n=vue.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=useNamespace("select"),n=vue.ref(),r=vue.getCurrentInstance(),i=vue.ref([]);vue.provide(selectGroupKey,vue.reactive({...vue.toRefs(e)}));const a=vue.computed(()=>i.value.some(c=>c.visible===!0)),o=c=>{var p;return c.type.name==="ElOption"&&!!((p=c.component)!=null&&p.proxy)},u=c=>{const p=castArray$1(c),d=[];return p.forEach(f=>{var v;vue.isVNode(f)&&(o(f)?d.push(f.component.proxy):isArray$1(f.children)&&f.children.length?d.push(...u(f.children)):(v=f.component)!=null&&v.subTree&&d.push(...u(f.component.subTree)))}),d},l=()=>{i.value=u(r.subTree)};return vue.onMounted(()=>{l()}),useMutationObserver(n,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:a,ns:t}}});function _sfc_render$m(e,t,n,r,i,a){return vue.withDirectives((vue.openBlock(),vue.createElementBlock("ul",{ref:"groupRef",class:vue.normalizeClass(e.ns.be("group","wrap"))},[vue.createElementVNode("li",{class:vue.normalizeClass(e.ns.be("group","title"))},vue.toDisplayString(e.label),3),vue.createElementVNode("li",null,[vue.createElementVNode("ul",{class:vue.normalizeClass(e.ns.b("group"))},[vue.renderSlot(e.$slots,"default")],2)])],2)),[[vue.vShow,e.visible]])}var OptionGroup=_export_sfc$1(_sfc_main$n,[["render",_sfc_render$m],["__file","option-group.vue"]]);const ElSelect=withInstall(Select,{Option,OptionGroup}),ElOption=withNoopInstall(Option);withNoopInstall(OptionGroup);const isValidComponentSize=e=>["",...componentSizes].includes(e),switchProps=buildProps({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:isValidComponentSize},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:iconPropType},activeActionIcon:{type:iconPropType},activeIcon:{type:iconPropType},inactiveIcon:{type:iconPropType},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:definePropType(Function)},id:String,tabindex:{type:[String,Number]},...useAriaProps(["ariaLabel"])}),switchEmits={[UPDATE_MODEL_EVENT]:e=>isBoolean(e)||isString$1(e)||isNumber(e),[CHANGE_EVENT]:e=>isBoolean(e)||isString$1(e)||isNumber(e),[INPUT_EVENT]:e=>isBoolean(e)||isString$1(e)||isNumber(e)},COMPONENT_NAME="ElSwitch",__default__=vue.defineComponent({name:COMPONENT_NAME}),_sfc_main$m=vue.defineComponent({...__default__,props:switchProps,emits:switchEmits,setup(e,{expose:t,emit:n}){const r=e,{formItem:i}=useFormItem(),a=useFormSize(),o=useNamespace("switch"),{inputId:u}=useFormItemInputId(r,{formItemContext:i}),l=useFormDisabled(vue.computed(()=>r.loading)),c=vue.ref(r.modelValue!==!1),p=vue.ref(),d=vue.ref(),f=vue.computed(()=>[o.b(),o.m(a.value),o.is("disabled",l.value),o.is("checked",g.value)]),v=vue.computed(()=>[o.e("label"),o.em("label","left"),o.is("active",!g.value)]),h=vue.computed(()=>[o.e("label"),o.em("label","right"),o.is("active",g.value)]),m=vue.computed(()=>({width:addUnit(r.width)}));vue.watch(()=>r.modelValue,()=>{c.value=!0});const y=vue.computed(()=>c.value?r.modelValue:!1),g=vue.computed(()=>y.value===r.activeValue);[r.activeValue,r.inactiveValue].includes(y.value)||(n(UPDATE_MODEL_EVENT,r.inactiveValue),n(CHANGE_EVENT,r.inactiveValue),n(INPUT_EVENT,r.inactiveValue)),vue.watch(g,T=>{var w;p.value.checked=T,r.validateEvent&&((w=i==null?void 0:i.validate)==null||w.call(i,"change").catch(x=>debugWarn(x)))});const b=()=>{const T=g.value?r.inactiveValue:r.activeValue;n(UPDATE_MODEL_EVENT,T),n(CHANGE_EVENT,T),n(INPUT_EVENT,T),vue.nextTick(()=>{p.value.checked=g.value})},_=()=>{if(l.value)return;const{beforeChange:T}=r;if(!T){b();return}const w=T();[isPromise(w),isBoolean(w)].includes(!0)||throwError(COMPONENT_NAME,"beforeChange must return type `Promise<boolean>` or `boolean`"),isPromise(w)?w.then(L=>{L&&b()}).catch(L=>{debugWarn(COMPONENT_NAME,`some error occurred: ${L}`)}):w&&b()},S=()=>{var T,w;(w=(T=p.value)==null?void 0:T.focus)==null||w.call(T)};return vue.onMounted(()=>{p.value.checked=g.value}),t({focus:S,checked:g}),(T,w)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(vue.unref(f)),onClick:vue.withModifiers(_,["prevent"])},[vue.createElementVNode("input",{id:vue.unref(u),ref_key:"input",ref:p,class:vue.normalizeClass(vue.unref(o).e("input")),type:"checkbox",role:"switch","aria-checked":vue.unref(g),"aria-disabled":vue.unref(l),"aria-label":T.ariaLabel,name:T.name,"true-value":T.activeValue,"false-value":T.inactiveValue,disabled:vue.unref(l),tabindex:T.tabindex,onChange:b,onKeydown:vue.withKeys(_,["enter"])},null,42,["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"]),!T.inlinePrompt&&(T.inactiveIcon||T.inactiveText)?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:vue.normalizeClass(vue.unref(v))},[T.inactiveIcon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(T.inactiveIcon)))]),_:1})):vue.createCommentVNode("v-if",!0),!T.inactiveIcon&&T.inactiveText?(vue.openBlock(),vue.createElementBlock("span",{key:1,"aria-hidden":vue.unref(g)},vue.toDisplayString(T.inactiveText),9,["aria-hidden"])):vue.createCommentVNode("v-if",!0)],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("span",{ref_key:"core",ref:d,class:vue.normalizeClass(vue.unref(o).e("core")),style:vue.normalizeStyle(vue.unref(m))},[T.inlinePrompt?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(o).e("inner"))},[T.activeIcon||T.inactiveIcon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(vue.unref(o).is("icon"))},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(vue.unref(g)?T.activeIcon:T.inactiveIcon)))]),_:1},8,["class"])):T.activeText||T.inactiveText?(vue.openBlock(),vue.createElementBlock("span",{key:1,class:vue.normalizeClass(vue.unref(o).is("text")),"aria-hidden":!vue.unref(g)},vue.toDisplayString(vue.unref(g)?T.activeText:T.inactiveText),11,["aria-hidden"])):vue.createCommentVNode("v-if",!0)],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(o).e("action"))},[T.loading?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(vue.unref(o).is("loading"))},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(loading_default))]),_:1},8,["class"])):vue.unref(g)?vue.renderSlot(T.$slots,"active-action",{key:1},()=>[T.activeActionIcon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(T.activeActionIcon)))]),_:1})):vue.createCommentVNode("v-if",!0)]):vue.unref(g)?vue.createCommentVNode("v-if",!0):vue.renderSlot(T.$slots,"inactive-action",{key:2},()=>[T.inactiveActionIcon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(T.inactiveActionIcon)))]),_:1})):vue.createCommentVNode("v-if",!0)])],2)],6),!T.inlinePrompt&&(T.activeIcon||T.activeText)?(vue.openBlock(),vue.createElementBlock("span",{key:1,class:vue.normalizeClass(vue.unref(h))},[T.activeIcon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(T.activeIcon)))]),_:1})):vue.createCommentVNode("v-if",!0),!T.activeIcon&&T.activeText?(vue.openBlock(),vue.createElementBlock("span",{key:1,"aria-hidden":!vue.unref(g)},vue.toDisplayString(T.activeText),9,["aria-hidden"])):vue.createCommentVNode("v-if",!0)],2)):vue.createCommentVNode("v-if",!0)],10,["onClick"]))}});var Switch=_export_sfc$1(_sfc_main$m,[["__file","switch.vue"]]);const ElSwitch=withInstall(Switch),_export_sfc=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},_sfc_main$l={name:"DialogBody",setup(e,{slots:t}){return{hasSlot:r=>!!t[r]}},props:{fixedHeight:{type:Boolean,default:!1}},computed:{classNames:function(){const e=this.$slots.icon?"icon":"",t=this.fixedHeight?"fixed-height":"";return`dialog-body ${e} ${t}`}}},_hoisted_1$l={key:0,class:"dialog-body-icon"},_hoisted_2$9={key:1,class:"dialog-body-heading"},_hoisted_3$8={class:"dialog-body-content"};function _sfc_render$l(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(a.classNames)},[r.hasSlot("icon")?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$l,[vue.renderSlot(e.$slots,"icon",{},void 0,!0)])):vue.createCommentVNode("",!0),r.hasSlot("heading")?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$9,[vue.renderSlot(e.$slots,"heading",{},void 0,!0)])):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_3$8,[vue.renderSlot(e.$slots,"default",{},void 0,!0)])],2)}const __unplugin_components_2$1=_export_sfc(_sfc_main$l,[["render",_sfc_render$l],["__scopeId","data-v-8725c591"]]),_sfc_main$k={name:"IconWarningCircle",props:{width:{type:Number,default:16},height:{type:Number,default:16},color:{type:String,default:"currentColor"}}},_hoisted_1$k=["width","height","fill"];function _sfc_render$k(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:n.width,height:n.height,fill:n.color,viewBox:"0 0 24 24"},t[0]||(t[0]=[vue.createElementVNode("path",{pid:"0",d:"M22 11.4c-.1-2.7-1.3-5.1-3.3-6.9-.4-.4-1-.3-1.4.1-.4.4-.3 1 .1 1.4 1.6 1.4 2.5 3.4 2.7 5.5.1 2.1-.6 4.2-2 5.8s-3.4 2.5-5.5 2.7c-2.1.1-4.2-.6-5.8-2-1.6-1.4-2.5-3.4-2.7-5.5-.1-2.1.6-4.2 2-5.8 1.3-1.4 3.1-2.4 5-2.6V11c0 .6.4 1 1 1s1-.4 1-1V2h-1C9.2 2 6.4 3.2 4.5 5.3c-1.8 2-2.7 4.6-2.5 7.2.1 2.7 1.3 5.1 3.3 6.9C7.2 21.2 9.6 22 12 22c2.7 0 5.5-1.1 7.5-3.3 1.7-2 2.6-4.6 2.5-7.3z"},null,-1),vue.createElementVNode("circle",{pid:"1",cx:"12",cy:"15.5",r:"1.5"},null,-1)]),8,_hoisted_1$k)}const __unplugin_components_1$2=_export_sfc(_sfc_main$k,[["render",_sfc_render$k]]),_sfc_main$j={name:"BfDialogHeader",props:{title:{type:String,default:""}},methods:{onClose:function(){this.$parent.handleClose()}}},_hoisted_1$j={class:"bf-dialog-header"},_hoisted_2$8={class:"bf-dialog-header-title"};function _sfc_render$j(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$j,[vue.createElementVNode("span",_hoisted_2$8,vue.toDisplayString(n.title),1),this.$slots.tabs?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("button",{key:0,class:"icon-close",onClick:t[0]||(t[0]=(...o)=>a.onClose&&a.onClose(...o))})),vue.renderSlot(e.$slots,"tabs",{},void 0,!0)])}const __unplugin_components_0$2=_export_sfc(_sfc_main$j,[["render",_sfc_render$j],["__scopeId","data-v-1491a20c"]]);function _isPlaceholder(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function _curry1(e){return function t(n){return arguments.length===0||_isPlaceholder(n)?t:e.apply(this,arguments)}}function _curry2(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return _isPlaceholder(n)?t:_curry1(function(i){return e(n,i)});default:return _isPlaceholder(n)&&_isPlaceholder(r)?t:_isPlaceholder(n)?_curry1(function(i){return e(i,r)}):_isPlaceholder(r)?_curry1(function(i){return e(n,i)}):e(n,r)}}}var add=_curry2(function(t,n){return Number(t)+Number(n)});function _concat(e,t){e=e||[],t=t||[];var n,r=e.length,i=t.length,a=[];for(n=0;n<r;)a[a.length]=e[n],n+=1;for(n=0;n<i;)a[a.length]=t[n],n+=1;return a}function _arity(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(n){return t.apply(this,arguments)};case 2:return function(n,r){return t.apply(this,arguments)};case 3:return function(n,r,i){return t.apply(this,arguments)};case 4:return function(n,r,i,a){return t.apply(this,arguments)};case 5:return function(n,r,i,a,o){return t.apply(this,arguments)};case 6:return function(n,r,i,a,o,u){return t.apply(this,arguments)};case 7:return function(n,r,i,a,o,u,l){return t.apply(this,arguments)};case 8:return function(n,r,i,a,o,u,l,c){return t.apply(this,arguments)};case 9:return function(n,r,i,a,o,u,l,c,p){return t.apply(this,arguments)};case 10:return function(n,r,i,a,o,u,l,c,p,d){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function _curryN(e,t,n){return function(){for(var r=[],i=0,a=e,o=0;o<t.length||i<arguments.length;){var u;o<t.length&&(!_isPlaceholder(t[o])||i>=arguments.length)?u=t[o]:(u=arguments[i],i+=1),r[o]=u,_isPlaceholder(u)||(a-=1),o+=1}return a<=0?n.apply(this,r):_arity(a,_curryN(e,r,n))}}var curryN=_curry2(function(t,n){return t===1?_curry1(n):_arity(t,_curryN(t,[],n))});function _curry3(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return _isPlaceholder(n)?t:_curry2(function(a,o){return e(n,a,o)});case 2:return _isPlaceholder(n)&&_isPlaceholder(r)?t:_isPlaceholder(n)?_curry2(function(a,o){return e(a,r,o)}):_isPlaceholder(r)?_curry2(function(a,o){return e(n,a,o)}):_curry1(function(a){return e(n,r,a)});default:return _isPlaceholder(n)&&_isPlaceholder(r)&&_isPlaceholder(i)?t:_isPlaceholder(n)&&_isPlaceholder(r)?_curry2(function(a,o){return e(a,o,i)}):_isPlaceholder(n)&&_isPlaceholder(i)?_curry2(function(a,o){return e(a,r,o)}):_isPlaceholder(r)&&_isPlaceholder(i)?_curry2(function(a,o){return e(n,a,o)}):_isPlaceholder(n)?_curry1(function(a){return e(a,r,i)}):_isPlaceholder(r)?_curry1(function(a){return e(n,a,i)}):_isPlaceholder(i)?_curry1(function(a){return e(n,r,a)}):e(n,r,i)}}}const _isArray=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function _isTransformer(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function _dispatchable(e,t,n){return function(){if(arguments.length===0)return n();var r=arguments[arguments.length-1];if(!_isArray(r)){for(var i=0;i<e.length;){if(typeof r[e[i]]=="function")return r[e[i]].apply(r,Array.prototype.slice.call(arguments,0,-1));i+=1}if(_isTransformer(r)){var a=t.apply(null,Array.prototype.slice.call(arguments,0,-1));return a(r)}}return n.apply(this,arguments)}}function _reduced(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}const _xfBase={init:function(){return this.xf["@@transducer/init"]()},result:function(e){return this.xf["@@transducer/result"](e)}};function _map(e,t){for(var n=0,r=t.length,i=Array(r);n<r;)i[n]=e(t[n]),n+=1;return i}function _isString$2(e){return Object.prototype.toString.call(e)==="[object String]"}var _isArrayLike=_curry1(function(t){return _isArray(t)?!0:!t||typeof t!="object"||_isString$2(t)?!1:t.length===0?!0:t.length>0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1}),XWrap=function(){function e(t){this.f=t}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(t){return t},e.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},e}();function _xwrap(e){return new XWrap(e)}var bind=_curry2(function(t,n){return _arity(t.length,function(){return t.apply(n,arguments)})});function _arrayReduce(e,t,n){for(var r=0,i=n.length;r<i;){if(t=e["@@transducer/step"](t,n[r]),t&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}function _iterableReduce(e,t,n){for(var r=n.next();!r.done;){if(t=e["@@transducer/step"](t,r.value),t&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function _methodReduce(e,t,n,r){return e["@@transducer/result"](n[r](bind(e["@@transducer/step"],e),t))}var symIterator=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function _reduce(e,t,n){if(typeof e=="function"&&(e=_xwrap(e)),_isArrayLike(n))return _arrayReduce(e,t,n);if(typeof n["fantasy-land/reduce"]=="function")return _methodReduce(e,t,n,"fantasy-land/reduce");if(n[symIterator]!=null)return _iterableReduce(e,t,n[symIterator]());if(typeof n.next=="function")return _iterableReduce(e,t,n);if(typeof n.reduce=="function")return _methodReduce(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}var XMap=function(){function e(t,n){this.xf=n,this.f=t}return e.prototype["@@transducer/init"]=_xfBase.init,e.prototype["@@transducer/result"]=_xfBase.result,e.prototype["@@transducer/step"]=function(t,n){return this.xf["@@transducer/step"](t,this.f(n))},e}(),_xmap=_curry2(function(t,n){return new XMap(t,n)});function _has(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var toString=Object.prototype.toString,_isArguments=function(){return toString.call(arguments)==="[object Arguments]"?function(t){return toString.call(t)==="[object Arguments]"}:function(t){return _has("callee",t)}}(),hasEnumBug=!{toString:null}.propertyIsEnumerable("toString"),nonEnumerableProps=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],hasArgsEnumBug=function(){return arguments.propertyIsEnumerable("length")}(),contains=function(t,n){for(var r=0;r<t.length;){if(t[r]===n)return!0;r+=1}return!1},keys=_curry1(typeof Object.keys=="function"&&!hasArgsEnumBug?function(t){return Object(t)!==t?[]:Object.keys(t)}:function(t){if(Object(t)!==t)return[];var n,r,i=[],a=hasArgsEnumBug&&_isArguments(t);for(n in t)_has(n,t)&&(!a||n!=="length")&&(i[i.length]=n);if(hasEnumBug)for(r=nonEnumerableProps.length-1;r>=0;)n=nonEnumerableProps[r],_has(n,t)&&!contains(i,n)&&(i[i.length]=n),r-=1;return i}),map=_curry2(_dispatchable(["fantasy-land/map","map"],_xmap,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return curryN(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return _reduce(function(r,i){return r[i]=t(n[i]),r},{},keys(n));default:return _map(t,n)}}));const _isInteger=Number.isInteger||function(t){return t<<0===t};var nth=_curry2(function(t,n){var r=t<0?n.length+t:t;return _isString$2(n)?n.charAt(r):n[r]}),prop=_curry2(function(t,n){if(n!=null)return _isInteger(t)?nth(t,n):n[t]}),pluck=_curry2(function(t,n){return map(prop(t),n)}),reduce=_curry3(_reduce);function _makeFlat(e){return function t(n){for(var r,i,a,o=[],u=0,l=n.length;u<l;){if(_isArrayLike(n[u]))for(r=t(n[u]),a=0,i=r.length;a<i;)o[o.length]=r[a],a+=1;else o[o.length]=n[u];u+=1}return o}}var type$1=_curry1(function(t){return t===null?"Null":t===void 0?"Undefined":Object.prototype.toString.call(t).slice(8,-1)});function _pipe(e,t){return function(){return t.call(this,e.apply(this,arguments))}}function _checkForMethod(e,t){return function(){var n=arguments.length;if(n===0)return t();var r=arguments[n-1];return _isArray(r)||typeof r[e]!="function"?t.apply(this,arguments):r[e].apply(r,Array.prototype.slice.call(arguments,0,n-1))}}var slice=_curry3(_checkForMethod("slice",function(t,n,r){return Array.prototype.slice.call(r,t,n)})),tail=_curry1(_checkForMethod("tail",slice(1,1/0)));function pipe(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return _arity(arguments[0].length,reduce(_pipe,arguments[0],tail(arguments)))}var reverse=_curry1(function(t){return _isString$2(t)?t.split("").reverse().join(""):Array.prototype.slice.call(t,0).reverse()});function compose(){if(arguments.length===0)throw new Error("compose requires at least one argument");return pipe.apply(this,reverse(arguments))}var head=nth(0);function _arrayFromIterator(e){for(var t=[],n;!(n=e.next()).done;)t.push(n.value);return t}function _includesWith(e,t,n){for(var r=0,i=n.length;r<i;){if(e(t,n[r]))return!0;r+=1}return!1}function _functionName(e){var t=String(e).match(/^function (\w*)/);return t==null?"":t[1]}function _objectIs(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}const _objectIs$1=typeof Object.is=="function"?Object.is:_objectIs;function _uniqContentEquals(e,t,n,r){var i=_arrayFromIterator(e),a=_arrayFromIterator(t);function o(u,l){return _equals(u,l,n.slice(),r.slice())}return!_includesWith(function(u,l){return!_includesWith(o,l,u)},a,i)}function _equals(e,t,n,r){if(_objectIs$1(e,t))return!0;var i=type$1(e);if(i!==type$1(t))return!1;if(typeof e["fantasy-land/equals"]=="function"||typeof t["fantasy-land/equals"]=="function")return typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](t)&&typeof t["fantasy-land/equals"]=="function"&&t["fantasy-land/equals"](e);if(typeof e.equals=="function"||typeof t.equals=="function")return typeof e.equals=="function"&&e.equals(t)&&typeof t.equals=="function"&&t.equals(e);switch(i){case"Arguments":case"Array":case"Object":if(typeof e.constructor=="function"&&_functionName(e.constructor)==="Promise")return e===t;break;case"Boolean":case"Number":case"String":if(!(typeof e==typeof t&&_objectIs$1(e.valueOf(),t.valueOf())))return!1;break;case"Date":if(!_objectIs$1(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(!(e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.sticky===t.sticky&&e.unicode===t.unicode))return!1;break}for(var a=n.length-1;a>=0;){if(n[a]===e)return r[a]===t;a-=1}switch(i){case"Map":return e.size!==t.size?!1:_uniqContentEquals(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size!==t.size?!1:_uniqContentEquals(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var o=keys(e);if(o.length!==keys(t).length)return!1;var u=n.concat([e]),l=r.concat([t]);for(a=o.length-1;a>=0;){var c=o[a];if(!(_has(c,t)&&_equals(t[c],e[c],u,l)))return!1;a-=1}return!0}var equals=_curry2(function(t,n){return _equals(t,n,[],[])});function _indexOf(e,t,n){var r,i;if(typeof e.indexOf=="function")switch(typeof t){case"number":if(t===0){for(r=1/t;n<e.length;){if(i=e[n],i===0&&1/i===r)return n;n+=1}return-1}else if(t!==t){for(;n<e.length;){if(i=e[n],typeof i=="number"&&i!==i)return n;n+=1}return-1}return e.indexOf(t,n);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,n);case"object":if(t===null)return e.indexOf(t,n)}for(;n<e.length;){if(equals(e[n],t))return n;n+=1}return-1}function _includes(e,t){return _indexOf(t,e,0)>=0}function _isObject(e){return Object.prototype.toString.call(e)==="[object Object]"}var defaultTo=_curry2(function(t,n){return n==null||n!==n?t:n}),remove=_curry3(function(t,n,r){var i=Array.prototype.slice.call(r,0);return i.splice(t,n),i}),XTake=function(){function e(t,n){this.xf=n,this.n=t,this.i=0}return e.prototype["@@transducer/init"]=_xfBase.init,e.prototype["@@transducer/result"]=_xfBase.result,e.prototype["@@transducer/step"]=function(t,n){this.i+=1;var r=this.n===0?t:this.xf["@@transducer/step"](t,n);return this.n>=0&&this.i>=this.n?_reduced(r):r},e}(),_xtake=_curry2(function(t,n){return new XTake(t,n)}),take=_curry2(_dispatchable(["take"],_xtake,function(t,n){return slice(0,t<0?1/0:t,n)}));function _isTypedArray(e){var t=Object.prototype.toString.call(e);return t==="[object Uint8ClampedArray]"||t==="[object Int8Array]"||t==="[object Uint8Array]"||t==="[object Int16Array]"||t==="[object Uint16Array]"||t==="[object Int32Array]"||t==="[object Uint32Array]"||t==="[object Float32Array]"||t==="[object Float64Array]"||t==="[object BigInt64Array]"||t==="[object BigUint64Array]"}var empty=_curry1(function(t){return t!=null&&typeof t["fantasy-land/empty"]=="function"?t["fantasy-land/empty"]():t!=null&&t.constructor!=null&&typeof t.constructor["fantasy-land/empty"]=="function"?t.constructor["fantasy-land/empty"]():t!=null&&typeof t.empty=="function"?t.empty():t!=null&&t.constructor!=null&&typeof t.constructor.empty=="function"?t.constructor.empty():_isArray(t)?[]:_isString$2(t)?"":_isObject(t)?{}:_isArguments(t)?function(){return arguments}():_isTypedArray(t)?t.constructor.from(""):void 0}),XFind=function(){function e(t,n){this.xf=n,this.f=t,this.found=!1}return e.prototype["@@transducer/init"]=_xfBase.init,e.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.found=!0,t=_reduced(this.xf["@@transducer/step"](t,n))),t},e}(),_xfind=_curry2(function(t,n){return new XFind(t,n)}),find=_curry2(_dispatchable(["find"],_xfind,function(t,n){for(var r=0,i=n.length;r<i;){if(t(n[r]))return n[r];r+=1}})),XFindIndex=function(){function e(t,n){this.xf=n,this.f=t,this.idx=-1,this.found=!1}return e.prototype["@@transducer/init"]=_xfBase.init,e.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,-1)),this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.found=!0,t=_reduced(this.xf["@@transducer/step"](t,this.idx))),t},e}(),_xfindIndex=_curry2(function(t,n){return new XFindIndex(t,n)}),findIndex=_curry2(_dispatchable([],_xfindIndex,function(t,n){for(var r=0,i=n.length;r<i;){if(t(n[r]))return r;r+=1}return-1})),flatten=_curry1(_makeFlat()),includes=_curry2(_includes),isEmpty=_curry1(function(t){return t!=null&&equals(t,empty(t))}),paths=_curry2(function(t,n){return t.map(function(r){for(var i=n,a=0,o;a<r.length;){if(i==null)return;o=r[a],i=_isInteger(o)?nth(o,i):i[o],a+=1}return i})}),path$1=_curry2(function(t,n){return paths([t],n)[0]}),sum=reduce(add,0),pathOr=_curry3(function(t,n,r){return defaultTo(t,path$1(n,r))}),propEq=_curry3(function(t,n,r){return equals(n,prop(t,r))}),propOr=_curry3(function(t,n,r){return defaultTo(t,prop(n,r))}),sortBy=_curry2(function(t,n){return Array.prototype.slice.call(n,0).sort(function(r,i){var a=t(r),o=t(i);return a<o?-1:a>o?1:0})}),tryCatch=_curry2(function(t,n){return _arity(t.length,function(){try{return t.apply(this,arguments)}catch(r){return n.apply(this,_concat([r],arguments))}})});const _sfc_main$i={name:"BfButton",props:{type:{type:String,default:"button"},autofocus:Boolean,disabled:Boolean,processing:{type:Boolean,default:!1},processingText:{type:String,default:""}},computed:{hasPrefixSlot:function(){return!!this.$slots.prefix},hasSuffixSlot:function(){return!!this.$slots.suffix}},methods:{}},_hoisted_1$i=["disabled","autofocus","type"],_hoisted_2$7={key:0,class:"prefix"},_hoisted_3$7={key:3,class:"suffix"};function _sfc_render$i(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("button",{class:vue.normalizeClass(["bf-button",[n.type?"bf-button--"+n.type:"",a.hasPrefixSlot?"hasPrefix":""]]),disabled:n.disabled||n.processing,autofocus:n.autofocus,type:n.type},[a.hasPrefixSlot?(vue.openBlock(),vue.createElementBlock("span",_hoisted_2$7,[vue.renderSlot(e.$slots,"prefix",{},void 0,!0)])):vue.createCommentVNode("",!0),n.processing?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[n.processingText?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createTextVNode(vue.toDisplayString(n.processingText),1)],64)):vue.renderSlot(e.$slots,"default",{key:1},void 0,!0)],64)):vue.createCommentVNode("",!0),n.processing?vue.createCommentVNode("",!0):vue.renderSlot(e.$slots,"default",{key:2},void 0,!0),a.hasSuffixSlot?(vue.openBlock(),vue.createElementBlock("span",_hoisted_3$7,[vue.renderSlot(e.$slots,"suffix",{},void 0,!0)])):vue.createCommentVNode("",!0)],10,_hoisted_1$i)}const BfButton=_export_sfc(_sfc_main$i,[["render",_sfc_render$i],["__scopeId","data-v-366c5a68"]]),BFButton=Object.freeze(Object.defineProperty({__proto__:null,default:BfButton},Symbol.toStringTag,{value:"Module"})),_sfc_main$h={name:"TSAnnotationDeleteDialog",components:{BfDialogHeader:__unplugin_components_0$2,DialogBody:__unplugin_components_2$1,BfButton,IconWarningCircle:__unplugin_components_1$2},props:{visible:{type:Boolean,default:!1},deleteAnnotation:{type:Object,default:()=>({annotation:{},withDiscussions:!1})}},data:function(){return{isProcessing:!1}},computed:{annotationDescription:function(){return pathOr("",["annotation","label"],this.deleteAnnotation)},annotationDateTime:function(){const e=pathOr("",["annotation","start"],this.deleteAnnotation);return this.getUTCDateString(e)+" "+this.getUTCTimeString(e)},deleteDiscussions:function(){return propOr(!1,"withDiscussions",this.deleteAnnotation)},btnDeleteCopy:function(){return this.deleteDiscussions?"Yes, I'm sure":"Delete"}},methods:{removeAnnotation:function(){this.$emit("delete",this.deleteAnnotation.annotation)},close:function(){this.$emit("update:visible",!1)},onClosed:function(){this.isProcessing=!1,this.$emit("update:delete-annotation",{annotation:{},withDiscussions:!1})},getUTCDateString:function(e){return e>0?(e=new Date(e/1e3),e.toDateString()):"unknown"},getUTCTimeString:function(e){if(e>0)return e=e/1e3,e=new Date(e),("0"+e.getUTCHours()).slice(-2)+":"+("0"+e.getUTCMinutes()).slice(-2)+":"+("0"+e.getUTCSeconds()).slice(-2)}}},_hoisted_1$h={class:"dialog-simple-buttons"};function _sfc_render$h(e,t,n,r,i,a){const o=__unplugin_components_0$2,u=__unplugin_components_1$2,l=vue.resolveComponent("bf-button"),c=__unplugin_components_2$1,p=ElDialog;return vue.openBlock(),vue.createBlock(p,{class:"simple",modelValue:n.visible,"onUpdate:modelValue":t[0]||(t[0]=d=>n.visible=d),"show-close":!1,onClose:a.close,onClosed:a.onClosed},{default:vue.withCtx(()=>[vue.createVNode(o,{slot:"title"}),vue.createVNode(c,null,{default:vue.withCtx(()=>[vue.createVNode(u,{class:"mb-16",height:32,width:32,color:"#C14D49"}),t[5]||(t[5]=vue.createElementVNode("h2",null,"Delete annotation?",-1)),a.deleteDiscussions?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createElementVNode("p",null,vue.toDisplayString(a.annotationDescription)+" - "+vue.toDisplayString(a.annotationDateTime),1),t[1]||(t[1]=vue.createElementVNode("hr",null,null,-1)),t[2]||(t[2]=vue.createElementVNode("p",null," Deleting this annotation will also remove any associated discussions and cannot be undone. ",-1)),t[3]||(t[3]=vue.createElementVNode("p",null," Are you sure you would like to remove this annotation? ",-1))],64)):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_1$h,[vue.createVNode(l,{class:"secondary",onClick:a.close},{default:vue.withCtx(()=>t[4]||(t[4]=[vue.createTextVNode(" Cancel ")])),_:1,__:[4]},8,["onClick"]),vue.createVNode(l,{class:"red",processing:e.isProcessing,onClick:a.removeAnnotation},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(a.btnDeleteCopy),1)]),_:1},8,["processing","onClick"])])]),_:1,__:[5]})]),_:1},8,["modelValue","onClose","onClosed"])}const __unplugin_components_5$1=_export_sfc(_sfc_main$h,[["render",_sfc_render$h],["__scopeId","data-v-d98c7b2b"]]),_sfc_main$g={name:"IconSelection",props:{width:{type:Number,default:16},height:{type:Number,default:16},color:{type:String,default:"currentColor"}}},_hoisted_1$g=["width","height","fill"];function _sfc_render$g(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:n.width,height:n.height,fill:n.color,viewBox:"0 0 24 24"},t[0]||(t[0]=[vue.createElementVNode("path",{pid:"0",d:"M16 10V7h-4V4H4v10h4v3h4v3h8V10zM6 12V6h4v1H8v5zm4 3V9h4v1h-2v5zm8 3h-4v-6h4z"},null,-1)]),8,_hoisted_1$g)}const __unplugin_components_3$1=_export_sfc(_sfc_main$g,[["render",_sfc_render$g]]),viewerSidePanelTypes=Object.freeze({INFO_PANEL:"infoPanel",DISCUSSION:"discussion",FILE_BROWSER:"fileBrowser",ANNOTATIONS:"annotations",CHANNELS:"channels"}),viewerToolTypes=Object.freeze({PAN:"pan",ANNOTATION_SHAPE:"annotationShape",ANNOTATION_DRAW:"annotationDraw",MEASURE:"measure",ANNOTATE:"annotate",POINTER:"pointer"});var tinyEmitter={exports:{}},hasRequiredTinyEmitter;function requireTinyEmitter(){if(hasRequiredTinyEmitter)return tinyEmitter.exports;hasRequiredTinyEmitter=1;function e(){}return e.prototype={on:function(t,n,r){var i=this.e||(this.e={});return(i[t]||(i[t]=[])).push({fn:n,ctx:r}),this},once:function(t,n,r){var i=this;function a(){i.off(t,a),n.apply(r,arguments)}return a._=n,this.on(t,a,r)},emit:function(t){var n=[].slice.call(arguments,1),r=((this.e||(this.e={}))[t]||[]).slice(),i=0,a=r.length;for(i;i<a;i++)r[i].fn.apply(r[i].ctx,n);return this},off:function(t,n){var r=this.e||(this.e={}),i=r[t],a=[];if(i&&n)for(var o=0,u=i.length;o<u;o++)i[o].fn!==n&&i[o].fn._!==n&&a.push(i[o]);return a.length?r[t]=a:delete r[t],this}},tinyEmitter.exports=e,tinyEmitter.exports.TinyEmitter=e,tinyEmitter.exports}var instance,hasRequiredInstance;function requireInstance(){if(hasRequiredInstance)return instance;hasRequiredInstance=1;var e=requireTinyEmitter();return instance=new e,instance}var instanceExports=requireInstance();const emitter=getDefaultExportFromCjs(instanceExports),EventBus={$emit:(...e)=>emitter.emit(...e),$on:(...e)=>emitter.on(...e),$off:(...e)=>emitter.off(...e),$once:(...e)=>emitter.once(...e)};function useHandleLogout(e){if(useRoute().name==="docs-login")return;defaultTo(!1,prop("shouldShowToast",e));const n=defaultTo(!1,prop("shouldRedirect",e));this.clearState(),n&&this.$route.fullPath}const _isString$1=e=>Object.prototype.toString.call(e)==="[object String]",_trimValues$1=e=>{Object.keys(e).forEach(t=>{_isString$1(e[t])&&(e[t]=e[t].trim())})};function useSendXhr(e,t){if(!e)return Promise.reject({status:400,message:"Url is missing!"});const n=propOr("GET","method",t),r=propOr({},"header",t),i=Object.assign({},{"Content-type":"application/json"},r),a=prop("body",t);let o={headers:i,method:n};if(a){typeof a=="object"&&_trimValues$1(a);const u=JSON.stringify(a);o=Object.assign({},o,{body:u})}return fetch(e,o).then(u=>u.status>=400?Promise.reject(u):u.json().catch(()=>u))}function useHandleXhrError(e){const t=prop("status",e);let n;if(t===void 0){console.log(e);return}else n=e.status;if(n===400&&e.body)e.body.getReader().read().then(({done:r,value:i})=>{const a=i instanceof Uint8Array?String.fromCharCode.apply(null,i):i,o=compose(defaultTo(a),tryCatch(compose(prop("message"),JSON.parse),(u,l)=>l))(a);EventBus.$emit("ajaxError",{detail:{type:"error",msg:o}})});else{if(n===401)return useHandleLogout();EventBus.$emit("ajaxError",e)}}async function useToken(){try{return auth.fetchAuthSession().then(e=>{var t;return(t=e==null?void 0:e.tokens)==null?void 0:t.accessToken.toString()})}catch(e){console.error(e)}}const getLayerIndex=(e,t,n)=>{const r=propOr("",e,t);return findIndex(propEq("id",r),n)},initialState=()=>({selectedPackage:{},activeViewer:{},viewerSidePanelOpen:!1,viewerSlideInfo:{curRotation:0,curZoom:0,isMeasuring:!1,measureLength:0,zoomPerClick:0,minZoom:0,maxZoom:0},viewerChannels:[],viewerAnnotations:[],activeAnnotationLayer:{},activeAnnotation:{},viewerDiscussions:{discussions:[],comments:{}},viewerErrors:{},viewerSidePanelView:viewerSidePanelTypes.INFO_PANEL,viewerActiveTool:viewerToolTypes.PAN,viewerMontageScheme:"NOT_MONTAGED"}),useViewerStore=pinia.defineStore("viewer",{state:initialState,getters:{viewerSelectedChannels:e=>e.viewerChannels.filter(t=>t.selected),getViewerActiveLayer:e=>()=>find(propEq("selected",!0),e.viewerAnnotations),getAnnotationById:e=>t=>compose(find(propEq("id",t)),flatten,pluck("annotations"))(e.viewerAnnotations),viewerMpp:e=>compose(propOr("","value"),find(propEq("key","aperio.MPP")),propOr([{}],"properties"),find(propEq("category","Blackfynn")),propOr([{}],"properties"))(e.activeViewer)},actions:{clearState(){Object.assign(this,initialState())},setActiveViewer(e){this.activeViewer=e},async fetchAndSetActiveViewer(e){const t=e.packageId,n=await useToken(),r=`https://api.pennsieve.net/packages/${t}?api_key=${n}`,i=await useSendXhr(r);this.setActiveViewer(i)},closeViewer(){this.clearState()},setSidePanel({open:e,view:t}){this.viewerSidePanelOpen=e,this.viewerSidePanelView=t},updateViewerSlideInfo(e){this.viewerSlideInfo=e},setChannels(e){this.viewerChannels=e},updateViewChannel({channelId:e,data:t}){const n=findIndex(propEq("id",e),this.viewerChannels);n>=0&&Object.entries(t).forEach(([r,i])=>this.viewerChannels[n][r]=i)},updateChannel({data:e,channelIndex:t}){this.viewerChannels[t]=e},createLayer(e){this.viewerAnnotations.push(e)},setActiveAnnotationLayer(e){this.activeAnnotationLayer=e,this.viewerAnnotations.forEach(n=>n.selected=!1);const t=findIndex(propEq("id",e),this.viewerAnnotations);t>=0&&(this.viewerAnnotations[t].selected=!0)},setActiveAnnotation(e){if(this.viewerAnnotations.forEach(t=>t.annotations.forEach(n=>n.selected=!1)),e.id){const t=getLayerIndex("layer_id",e,this.viewerAnnotations),n=findIndex(propEq("id",e.id),this.viewerAnnotations[t].annotations);n>=0&&(this.viewerAnnotations[t].annotations[n].selected=!0)}this.activeAnnotation=e},updateLayer({layer:e,index:t}){this.viewerAnnotations[t]=e},deleteLayer({index:e}){this.viewerAnnotations.splice(e,1)},setAnnotations(e){this.viewerAnnotations=e},createAnnotation({annotation:e,index:t}){this.viewerAnnotations[t].annotations.push(e)},updateAnnotation({data:e}){const t=getLayerIndex("layer_id",e,this.viewerAnnotations),n=findIndex(propEq("id",e.id),this.viewerAnnotations[t].annotations);this.viewerAnnotations[t].annotations[n]=e},deleteAnnotation({data:e}){const t=getLayerIndex("layer_id",e,this.viewerAnnotations),n=findIndex(propEq("id",e.id),this.viewerAnnotations[t].annotations);this.viewerAnnotations[t].annotations.splice(n,1)},setDiscussions({discussions:e,comments:t}){this.viewerDiscussions={discussions:e,comments:t}},createDiscussion({discussion:e,comment:t}){const n=pathOr("",["discussion_id"],t),r=this.viewerDiscussions.comments[n]||[];r.push(t),includes(e,this.viewerDiscussions.discussions)||(this.viewerDiscussions.discussions.push(e),this.viewerDiscussions.comments[n]=r)},removeDiscussion(e){this.viewerDiscussions.discussions.splice(e,1)},createComment({comment:e,discussionId:t}){var n;((n=this.viewerDiscussions.comments)[t]||(n[t]=[])).push(e)},removeComment(e){const t=propOr(0,"discussion_id",e),n=propOr([],t,this.viewerDiscussions.comments),r=propOr(0,"id",e),i=findIndex(propEq("id",r),n),a=remove(i,1,n);if(this.viewerDiscussions.comments[t]=a,a.length===0){const o=findIndex(propEq("id",t),this.viewerDiscussions.discussions);o>=0&&this.viewerDiscussions.discussions.splice(o,1)}},setViewerErrors(e){this.viewerErrors=e},setViewerMontageScheme(e){this.viewerMontageScheme=e},selectPackage(e){this.selectedPackage=e}}}),viewerStoreMixin={computed:{viewerStore(){return useViewerStore()}}},_sfc_main$f={name:"TSAnnotationModal",components:{IconSelection:__unplugin_components_3$1,BfButton},props:{visible:{type:Boolean,default:!1}},mixins:[viewerStoreMixin],data:function(){return{isProcessing:!1,selectedRange:{},initialTimeRage:{start:0,end:0},hasRangeValue:!0,defaultEventTime:"",defaultEventDate:"",defaultLabels:[{value:"Event",label:"Event"},{value:"Artifact",label:"Artifact"},{value:"Seizure",label:"Seizure"},{value:"Mark",label:"Mark"},{value:"Stim On",label:"Stim On"},{value:"Stim Off",label:"Stim Off"},{value:"Start",label:"Start"},{value:"Stop",label:"Stop"}]}},mounted(){},computed:{activeAnnotation(){return this.viewerStore.activeAnnotation},activeViewer(){return this.viewerStore.activeViewer},viewerChannels(){return this.viewerStore.viewerChannels},viewerActiveTool(){return this.viewerStore.viewerActiveTool},viewerAnnotations(){return this.viewerStore.viewerAnnotations},dialogTitle:function(){return this.activeAnnotation.id?"Edit Annotation":"Create Annotation"},actionButtonText:function(){return this.activeAnnotation.id?"Update":"Create"},datePickerType:function(){return this.hasRangeValue?"datetimerange":"datetime"},channelSelectionStr:function(){let e="";return this.activeAnnotation.allChannels?e="Adding to all channels":propOr(!0,"channelIds",this.activeAnnotation).length==1?e="Adding to single channel":e=`Adding to ${propOr(1,"channelIds",this.activeAnnotation).length} channels`,e}},watch:{visible:function(){this.tzOffset=new Date(this.activeAnnotation.start/1e3).getTimezoneOffset()*6e7;const e=this.activeAnnotation.start+this.tzOffset,t=this.activeAnnotation.end+this.tzOffset;this.selectedLayer=this.activeAnnotation.layer_id,this.selectedType=this.activeAnnotation.label,this.initialTimeRage={start:this.activeAnnotation.start,end:this.activeAnnotation.end},this.defaultEventTime=e/1e3,this.defaultEventDate=t/1e3,this.activeAnnotation.duration==0?(this.hasRangeValue=!1,this.selectedRange=e/1e3):(this.hasRangeValue=!0,this.selectedRange=[e/1e3,t/1e3])},hasRangeValue:function(e){this.tzOffsett=new Date(this.activeAnnotation.start/1e3).getTimezoneOffset()*6e7;const t=this.activeAnnotation.start+this.tzOffset,n=this.activeAnnotation.end+this.tzOffset;e?this.selectedRange=[t/1e3,n/1e3]:(this.activeAnnotation.duration=0,this.selectedRange=t/1e3)}},methods:{submitForm:function(){this.activeAnnotation.label=this.activeAnnotation.label,this.hasRangeValue?(this.activeAnnotation.start=this.selectedRange[0]*1e3-this.tzOffset,this.activeAnnotation.end=this.selectedRange[1]*1e3-this.tzOffset,this.activeAnnotation.duration=this.activeAnnotation.end-this.activeAnnotation.start):(this.activeAnnotation.start=this.selectedRange*1e3-this.tzOffset,this.activeAnnotation.end=this.selectedRange*1e3-this.tzOffset,this.activeAnnotation.duration=0),this.viewerStore.setActiveAnnotation(this.activeAnnotation),this.$emit("createUpdateAnnotation",this.activeAnnotation)},close:function(){this.$emit("closeWindow")},onClosed:function(){this.isProcessing=!1},getUTCDateString:function(e){return e>0?(e=new Date(e/1e3),e.toDateString()):"unknown"},getUTCTimeString:function(e){if(e>0)return e=e/1e3,e=new Date(e),("0"+e.getUTCHours()).slice(-2)+":"+("0"+e.getUTCMinutes()).slice(-2)+":"+("0"+e.getUTCSeconds()).slice(-2)}}},_hoisted_1$f={slot:"body"},_hoisted_2$6={class:"select-wrapper"},_hoisted_3$6={class:"range-type-selector"},_hoisted_4$5={class:"select-wrapper"},_hoisted_5$4={class:"description-wrapper"},_hoisted_6$4={slot:"footer"},_hoisted_7$2={class:"button-wrapper"},_hoisted_8$2={class:"channels-selected"},_hoisted_9$1={class:"buttons"};function _sfc_render$f(e,t,n,r,i,a){const o=ElSwitch,u=ElDatePicker,l=ElOption,c=ElSelect,p=ElInput,d=__unplugin_components_3$1,f=vue.resolveComponent("BfButton"),v=ElDialog;return vue.openBlock(),vue.createBlock(v,{class:"timeseries-annotation-modal",ref:"annotation-modal",title:a.dialogTitle,modelValue:n.visible,"onUpdate:modelValue":t[5]||(t[5]=h=>n.visible=h),onClose:a.close,onClosed:a.onClosed},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$f,[vue.createElementVNode("div",_hoisted_2$6,[vue.createElementVNode("div",_hoisted_3$6,[t[6]||(t[6]=vue.createElementVNode("div",{class:"select-label"}," Range? ",-1)),vue.createVNode(o,{modelValue:e.hasRangeValue,"onUpdate:modelValue":t[0]||(t[0]=h=>e.hasRangeValue=h),"active-color":"#5039F7","inactive-color":"#CAC5BF"},null,8,["modelValue"])]),vue.createVNode(u,{modelValue:e.selectedRange,"onUpdate:modelValue":t[1]||(t[1]=h=>e.selectedRange=h),class:"date-time-picker",type:a.datePickerType,format:"yyyy-MM-DD hh:mm:ss","format-value":"timestamp","range-separator":"To","start-placeholder":"Start date/time","end-placeholder":"End date/time"},null,8,["modelValue","type"])]),vue.createElementVNode("div",_hoisted_4$5,[vue.createElementVNode("div",null,[t[7]||(t[7]=vue.createElementVNode("div",{class:"select-label"}," Annotation Layer ",-1)),vue.createVNode(c,{modelValue:a.activeAnnotation.layer_id,"onUpdate:modelValue":t[2]||(t[2]=h=>a.activeAnnotation.layer_id=h),placeholder:"Select"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(a.viewerAnnotations,h=>(vue.openBlock(),vue.createBlock(l,{key:h.id,label:h.name,value:h.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),vue.createElementVNode("div",null,[t[8]||(t[8]=vue.createElementVNode("div",{class:"select-label"}," Annotation Type ",-1)),vue.createVNode(c,{modelValue:a.activeAnnotation.label,"onUpdate:modelValue":t[3]||(t[3]=h=>a.activeAnnotation.label=h),placeholder:"Select"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.defaultLabels,h=>(vue.openBlock(),vue.createBlock(l,{key:h.value,label:h.label,value:h.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])]),vue.createElementVNode("div",_hoisted_5$4,[t[9]||(t[9]=vue.createElementVNode("div",{class:"select-label"}," Description ",-1)),vue.createVNode(p,{ref:"input",modelValue:a.activeAnnotation.description,"onUpdate:modelValue":t[4]||(t[4]=h=>a.activeAnnotation.description=h),placeholder:"Please provide additional information...",type:"textarea",rows:5},null,8,["modelValue"])])]),vue.createElementVNode("div",_hoisted_6$4,[vue.createElementVNode("div",_hoisted_7$2,[vue.createElementVNode("div",_hoisted_8$2,[vue.createVNode(d,{class:"inline-icon",height:16,width:16}),vue.createTextVNode(" "+vue.toDisplayString(a.channelSelectionStr),1)]),vue.createElementVNode("div",_hoisted_9$1,[vue.createVNode(f,{onClick:a.submitForm},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(a.actionButtonText),1)]),_:1},8,["onClick"])])])])]),_:1},8,["title","modelValue","onClose","onClosed"])}const __unplugin_components_4$1=_export_sfc(_sfc_main$f,[["render",_sfc_render$f],["__scopeId","data-v-209d55c2"]]),_sfc_main$e={name:"TSFilterModal",components:{"bf-button":()=>Promise.resolve().then(()=>BFButton),IconSelection:__unplugin_components_3$1},mixins:[],watch:{},computed:{activeViewer(){return this.viewerStore.activeViewer},computeVisible0:function(){switch(this.selectedFilter){case"lowpass":return!0;case"highpass":return!0;case"bandpass":return!0;default:return!1}},onSingleChannel:function(){return this.onChannels.length==1},selectedChannels:function(){return this.onChannels.length},computeVisible1:function(){switch(this.selectedFilter){case"lowpass":return!1;case"highpass":return!1;case"bandpass":return!0;default:return!1}},computeVisible2:function(){switch(this.selectedFilter){case"bandstop":return!0;default:return!1}},computePlaceholder1:function(e){switch(this.selectedFilter){case"lowpass":return"Low Pass Cutoff Frequency (Hz)";case"highpass":return"High Pass Cutoff Frequency (Hz)";case"bandpass":return"Low Pass Cutoff Frequency (Hz)";default:return""}},computePlaceholder2:function(e){switch(this.selectedFilter){case"bandpass":return"High Pass Cutoff Frequency (Hz)";default:return""}}},props:{visible:{type:Boolean,default:!1}},data:function(){return{selectedFilter:null,filterOptions:[{label:"No Filter",value:"clear"},{label:"Low Pass",value:"lowpass"},{label:"High Pass",value:"highpass"},{label:"Band Pass",value:"bandpass"},{label:"Notch",value:"bandstop"}],selectedNotch:null,notchOptions:[{label:"50Hz",value:50},{label:"60Hz",value:60}],input0:null,input1:null,onChannels:[]}},methods:{close:function(){this.$emit("closeWindow")},handleChange:function(){},onButtonClick:function(){},submitForm:function(e){EventBus.$emit("active-viewer-action",{method:"setTimeseriesFilters",payload:{selChannels:this.onChannels,filterType:this.selectedFilter,input0:this.input0,input1:this.input1,notchFreq:this.selectedNotch}}),this.$emit("closeWindow")}}},_hoisted_1$e={slot:"body"},_hoisted_2$5={class:"select-wrapper"},_hoisted_3$5={key:0,class:"filter-input-wrapper"},_hoisted_4$4={key:1,class:"filter-input-wrapper"},_hoisted_5$3={slot:"footer"},_hoisted_6$3={class:"button-wrapper"},_hoisted_7$1={class:"channels-selected"},_hoisted_8$1={key:0},_hoisted_9={key:1},_hoisted_10={class:"buttons"};function _sfc_render$e(e,t,n,r,i,a){const o=ElOption,u=ElSelect,l=ElInputNumber,c=__unplugin_components_3$1,p=vue.resolveComponent("bf-button"),d=ElDialog;return vue.openBlock(),vue.createBlock(d,{class:"timeseries-filter-modal",ref:"filter-modal",title:"Set Filter",modelValue:n.visible,"onUpdate:modelValue":t[4]||(t[4]=f=>n.visible=f),onClose:a.close},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$e,[vue.createElementVNode("div",_hoisted_2$5,[vue.createVNode(u,{modelValue:e.selectedFilter,"onUpdate:modelValue":t[0]||(t[0]=f=>e.selectedFilter=f),placeholder:"Select"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.filterOptions,f=>(vue.openBlock(),vue.createBlock(o,{key:f.value,label:f.label,value:f.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),a.computeVisible0?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$5,[vue.createTextVNode(vue.toDisplayString(a.computePlaceholder1)+" ",1),vue.createVNode(l,{class:"filterInput",modelValue:e.input0,"onUpdate:modelValue":t[1]||(t[1]=f=>e.input0=f),"controls-position":"right",precision:2,onChange:a.handleChange},null,8,["modelValue","onChange"])])):vue.createCommentVNode("",!0),a.computeVisible1?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$4,[vue.createTextVNode(vue.toDisplayString(a.computePlaceholder2)+" ",1),vue.createVNode(l,{class:"filterInput",modelValue:e.input1,"onUpdate:modelValue":t[2]||(t[2]=f=>e.input1=f),"controls-position":"right",precision:2,onChange:a.handleChange},null,8,["modelValue","onChange"])])):vue.createCommentVNode("",!0),a.computeVisible2?(vue.openBlock(),vue.createBlock(u,{key:2,modelValue:e.selectedNotch,"onUpdate:modelValue":t[3]||(t[3]=f=>e.selectedNotch=f),placeholder:"Select",class:"filter-input-wrapper"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.notchOptions,f=>(vue.openBlock(),vue.createBlock(o,{key:f.value,label:f.label,value:f.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):vue.createCommentVNode("",!0)])])]),footer:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_5$3,[vue.createElementVNode("div",_hoisted_6$3,[vue.createElementVNode("div",_hoisted_7$1,[vue.createVNode(c,{height:24,width:24}),a.onSingleChannel?(vue.openBlock(),vue.createElementBlock("div",_hoisted_8$1," Adding to single channel ")):(vue.openBlock(),vue.createElementBlock("div",_hoisted_9," Adding to "+vue.toDisplayString(a.selectedChannels)+" Selected Channels ",1))]),vue.createElementVNode("div",_hoisted_10,[vue.createVNode(p,{onClick:a.submitForm},{default:vue.withCtx(()=>t[5]||(t[5]=[vue.createTextVNode("Set Filter ")])),_:1,__:[5]},8,["onClick"])])])])]),_:1},8,["modelValue","onClose"])}const __unplugin_components_3=_export_sfc(_sfc_main$e,[["render",_sfc_render$e],["__scopeId","data-v-d606d1fe"]]),_sfc_main$d={name:"IconStopwatch",props:{width:{type:Number,default:15},height:{type:Number,default:16},color:{type:String,default:"currentColor"}}},_hoisted_1$d=["width","height","fill"];function _sfc_render$d(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:n.width,height:n.height,fill:n.color,viewBox:"0 0 15 16"},t[0]||(t[0]=[vue.createElementVNode("path",{d:"M5.1008,5.396 C4.7432,5.616 6.0584,8.7896 6.3792,9.3064 C6.6592,9.7616 7.2536,9.9 7.7056,9.6216 C8.16,9.34 8.3016,8.7464 8.0216,8.2936 C7.704,7.7752 5.4576,5.1752 5.1008,5.396 Z M4.8328,1.9216 C5.5752,1.6632 6.3704,1.52 7.2,1.52 C8.0296,1.52 8.8248,1.6632 9.5672,1.9216 C9.8304,2.0128 10.1792,1.8296 10.0248,1.4328 C9.912,1.1448 9.8032,0.8632 9.7592,0.7488 C9.6544,0.4776 9.2792,0.2536 9.116,0.2168 C8.4984,0.0776 7.8584,0 7.2,0 C6.5416,0 5.9016,0.0776 5.2832,0.2168 C5.12,0.2536 4.7456,0.4776 4.6408,0.7488 C4.5968,0.8632 4.4872,1.1448 4.3752,1.4328 C4.2208,1.8296 4.5696,2.0136 4.8328,1.9216 Z M14.4784,2.5488 C14.3248,2.3648 14.1616,2.1848 13.988,2.0112 C13.8152,1.8376 13.6352,1.6752 13.452,1.5208 C13.3296,1.4176 12.9696,1.3336 12.7416,1.5616 C12.5144,1.7896 11.4232,2.8792 11.4232,2.8792 C11.7448,3.1096 12.0576,3.3632 12.3472,3.652 C12.6368,3.9408 12.8888,4.2536 13.12,4.576 C13.12,4.576 14.2104,3.4864 14.4376,3.2584 C14.6664,3.0296 14.5824,2.6704 14.4784,2.5488 Z M7.2,2.32 C3.62,2.32 0.7192,5.2208 0.7192,8.8 C0.7192,12.38 3.62,15.2808 7.2,15.2808 C10.7784,15.2808 13.68,12.38 13.68,8.8 C13.68,5.2216 10.7784,2.32 7.2,2.32 Z M7.2,13.6808 C4.5056,13.6808 2.32,11.496 2.32,8.8008 C2.32,6.1056 4.5048,3.9208 7.2,3.9208 C9.8952,3.9208 12.0808,6.1056 12.0808,8.8008 C12.0808,11.4952 9.8952,13.6808 7.2,13.6808 Z"},null,-1)]),8,_hoisted_1$d)}const __unplugin_components_10=_export_sfc(_sfc_main$d,[["render",_sfc_render$d]]),_sfc_main$c={name:"IconNextPage",props:{width:{type:Number,default:16},height:{type:Number,default:16},color:{type:String,default:"currentColor"}}},_hoisted_1$c=["width","height","fill"];function _sfc_render$c(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:n.width,height:n.height,fill:n.color,viewBox:"0 0 12 12"},t[0]||(t[0]=[vue.createElementVNode("path",{d:"M8.244,5.52 L1.041,0.571 C0.469,0.188 0,0.469 0,1.196 L0,10.805 C0,11.53 0.469,11.811 1.041,11.43 L8.244,6.479 C8.244,6.479 8.523,6.28 8.523,6.001 C8.523,5.721 8.244,5.52 8.244,5.52 Z M10,0 L11,0 C11.553,0 12,0.048 12,0.6 L12,11.4 C12,11.952 11.553,12 11,12 L10,12 C9.447,12 9,11.952 9,11.4 L9,0.6 C9,0.048 9.447,0 10,0 Z"},null,-1)]),8,_hoisted_1$c)}const __unplugin_components_7=_export_sfc(_sfc_main$c,[["render",_sfc_render$c]]),_sfc_main$b={name:"IconNextAnnotationRightFacing",props:{width:{type:Number,default:24},height:{type:Number,default:14},color:{type:String,default:"currentColor"}}},_hoisted_1$b=["width","height","fill"];function _sfc_render$b(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:n.width,height:n.height,fill:n.color,viewBox:"0 0 24 14"},t[0]||(t[0]=[vue.createElementVNode("defs",null,[vue.createElementVNode("path",{pid:"0",d:"M4 5L.859 1.58a.695.695 0 0 1 0-.978.68.68 0 0 1 .969 0l3.83 3.908a.697.697 0 0 1 0 .979l-3.83 3.908a.68.68 0 0 1-.969 0 .695.695 0 0 1 0-.978L4 5z",id:"svgicon-next-annotation-right-facing-a"})],-1),vue.createElementVNode("g",{_fill:"none","fill-rule":"evenodd"},[vue.createElementVNode("g",{transform:"translate(18)"},[vue.createElementVNode("mask",{id:"svgicon-next-annotation-right-facing-b",_fill:"#fff"},[vue.createElementVNode("use",{"xlink:href":"#svgicon-next-annotation-right-facing-a"})]),vue.createElementVNode("use",{_fill:"#000","fill-rule":"nonzero","xlink:href":"#svgicon-next-annotation-right-facing-a"}),vue.createElementVNode("g",{mask:"url(#svgicon-next-annotation-right-facing-b)",_fill:"#000"},[vue.createElementVNode("path",{pid:"1",d:"M-2 0H8v10H-2z"})])]),vue.createElementVNode("g",{_fill:"#000"},[vue.createElementVNode("path",{pid:"2",d:"M13.986 10.906L8.386 8.4l2.303 5.6.63-2.611zM0 8.4h1.4v1.4H0zM2.8 8.4h1.4v1.4H2.8zM5.6 8.4H7v1.4H5.6zM0 5.6h1.4V7H0zM0 2.8h1.4v1.4H0zM8.4 5.6h1.4V7H8.4zM8.4 2.8h1.4v1.4H8.4zM0 0h1.4v1.4H0zM2.8 0h1.4v1.4H2.8zM5.6 0H7v1.4H5.6zM8.4 0h1.4v1.4H8.4z"})])],-1)]),8,_hoisted_1$b)}const __unplugin_components_6=_export_sfc(_sfc_main$b,[["render",_sfc_render$b]]),_sfc_main$a={name:"IconNextAnnotationLeftFacing",props:{width:{type:Number,default:24},height:{type:Number,default:14},color:{type:String,default:"currentColor"}}},_hoisted_1$a=["width","height","fill"];function _sfc_render$a(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:n.width,height:n.height,fill:n.color,viewBox:"0 0 24 14"},t[0]||(t[0]=[vue.createElementVNode("defs",null,[vue.createElementVNode("path",{pid:"0",d:"M4 5L.859 1.58a.695.695 0 0 1 0-.978.68.68 0 0 1 .969 0l3.83 3.908a.697.697 0 0 1 0 .979l-3.83 3.908a.68.68 0 0 1-.969 0 .695.695 0 0 1 0-.978L4 5z",id:"svgicon-next-annotation-left-facing-a"})],-1),vue.createElementVNode("g",{_fill:"none","fill-rule":"evenodd"},[vue.createElementVNode("g",{transform:"matrix(-1 0 0 1 6 0)"},[vue.createElementVNode("mask",{id:"svgicon-next-annotation-left-facing-b",_fill:"#fff"},[vue.createElementVNode("use",{"xlink:href":"#svgicon-next-annotation-left-facing-a"})]),vue.createElementVNode("use",{_fill:"#000","fill-rule":"nonzero","xlink:href":"#svgicon-next-annotation-left-facing-a"}),vue.createElementVNode("g",{mask:"url(#svgicon-next-annotation-left-facing-b)",_fill:"#000"},[vue.createElementVNode("path",{pid:"1",d:"M-2 0H8v10H-2z"})])]),vue.createElementVNode("g",{_fill:"#000"},[vue.createElementVNode("path",{pid:"2",d:"M23.986 10.906l-5.6-2.506 2.303 5.6.63-2.611zM10 8.4h1.4v1.4H10zM12.8 8.4h1.4v1.4h-1.4zM15.6 8.4H17v1.4h-1.4zM10 5.6h1.4V7H10zM10 2.8h1.4v1.4H10zM18.4 5.6h1.4V7h-1.4zM18.4 2.8h1.4v1.4h-1.4zM10 0h1.4v1.4H10zM12.8 0h1.4v1.4h-1.4zM15.6 0H17v1.4h-1.4zM18.4 0h1.4v1.4h-1.4z"})])],-1)]),8,_hoisted_1$a)}const __unplugin_components_5=_export_sfc(_sfc_main$a,[["render",_sfc_render$a]]),_sfc_main$9={name:"IconPreviousPage",props:{width:{type:Number,default:12},height:{type:Number,default:12},color:{type:String,default:"currentColor"}}},_hoisted_1$9=["width","height","fill"];function _sfc_render$9(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:n.width,height:n.height,fill:n.color,viewBox:"0 0 12 12"},t[0]||(t[0]=[vue.createElementVNode("path",{d:"M10.959,0.571 L3.756,5.52 C3.756,5.52 3.477,5.721 3.477,6.001 C3.477,6.281 3.756,6.48 3.756,6.48 L10.959,11.431 C11.531,11.811 12,11.53 12,10.805 L12,1.196 C12,0.469 11.531,0.188 10.959,0.571 Z M2,0 L1,0 C0.447,0 0,0.048 0,0.6 L0,11.4 C0,11.952 0.447,12 1,12 L2,12 C2.553,12 3,11.952 3,11.4 L3,0.6 C3,0.048 2.553,0 2,0 Z"},null,-1)]),8,_hoisted_1$9)}const __unplugin_components_4=_export_sfc(_sfc_main$9,[["render",_sfc_render$9]]),_sfc_main$8={name:"IconTimescale",props:{width:{type:Number,default:16},height:{type:Number,default:16},color:{type:String,default:"currentColor"}}},_hoisted_1$8=["width","height","fill"];function _sfc_render$8(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:n.width,height:n.height,fill:n.color,viewBox:"0 0 16 16"},t[0]||(t[0]=[vue.createElementVNode("path",{d:"M13.653125,14.3537502 L11.29125,11.9918752 C11.6475,11.4075002 11.8525,10.7200002 11.8525,9.98562517 C11.8525,7.85000017 10.001875,6.00000017 7.86625,6.00000017 C5.730625,5.99937517 4,7.73062517 4,9.86625017 C4,12.0012502 5.850625,13.8518752 7.985625,13.8518752 C8.69625,13.8518752 9.360625,13.6587502 9.9325,13.3243752 L12.306875,15.7000002 C12.539375,15.9318752 12.91625,15.9318752 13.148125,15.7000002 L13.7375,15.1106252 C13.969375,14.8787502 13.885,14.5856252 13.653125,14.3537502 Z M5.19,9.86625017 C5.19,8.38750017 6.388125,7.18937517 7.86625,7.18937517 C9.345,7.18937517 10.6625,8.50625017 10.6625,9.98562517 C10.6625,11.4637502 9.46375,12.6625002 7.985625,12.6625002 C6.506875,12.6618752 5.19,11.3443752 5.19,9.86625017 Z M16,3 L13,6 L13,4 L9,4 L9,2 L13,2 L13,6.2778623e-16 L16,3 Z M3,6 L2.66453526e-15,3 L3,-7.66951701e-17 L3,2 L9,2 L9,4 L3,4 L3,6 Z"},null,-1)]),8,_hoisted_1$8)}const IconTimescale=_export_sfc(_sfc_main$8,[["render",_sfc_render$8]]),_sfc_main$7={name:"IconControllerPlay",props:{width:{type:Number,default:10},height:{type:Number,default:12},color:{type:String,default:"currentColor"}}},_hoisted_1$7=["width","height","fill"];function _sfc_render$7(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:n.width,height:n.height,fill:n.color,viewBox:"0 0 20 12"},t[0]||(t[0]=[vue.createElementVNode("path",{d:"M10,6.001 C10,6.3 9.695,6.515 9.695,6.515 L1.134,11.818 C0.51,12.227 0,11.924 0,11.149 L0,0.852 C0,0.075 0.51,-0.226 1.135,0.182 L9.696,5.487 C9.695,5.487 10,5.702 10,6.001 Z"},null,-1)]),8,_hoisted_1$7)}const IconControllerPlay=_export_sfc(_sfc_main$7,[["render",_sfc_render$7]]),_sfc_main$6={name:"IconControllerPause",props:{width:{type:Number,default:10},height:{type:Number,default:12},color:{type:String,default:"currentColor"}}},_hoisted_1$6=["width","height","fill"];function _sfc_render$6(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:n.width,height:n.height,fill:n.color,viewBox:"0 0 20 12"},t[0]||(t[0]=[vue.createElementVNode("path",{d:"M2,0 C2.553,0 3,0.048 3,0.6 L3,11.4 C3,11.952 2.553,12 2,12 L1,12 C0.447,12 0,11.952 0,11.4 L0,0.6 C0,0.048 0.447,0 1,0 L2,0 Z M9,0 C9.553,0 10,0.048 10,0.6 L10,11.4 C10,11.952 9.553,12 9,12 L8,12 C7.447,12 7,11.952 7,11.4 L7,0.6 C7,0.048 7.447,0 8,0 L9,0 Z"},null,-1)]),8,_hoisted_1$6)}const IconControllerPause=_export_sfc(_sfc_main$6,[["render",_sfc_render$6]]),_sfc_main$5={name:"TSViewerToolbar",components:{IconNextAnnotationRightFacing:__unplugin_components_6,IconControllerPlay,IconControllerPause,IconStopwatch:__unplugin_components_10,IconNextPage:__unplugin_components_7,IconNextAnnotationLeftFacing:__unplugin_components_5,IconPreviousPage:__unplugin_components_4,IconTimescale},computed:{iconPlay:function(){return this.isPlaying===!0?"icon-controller-pause":"icon-controller-play"},durationInSeconds:{get:function(){return this.duration/1e6},set:function(e){this.$emit("updateDuration",e)}}},mixins:[viewerStoreMixin],props:{constants:Object,duration:Number,start:Number},data:function(){return{showVertZoom:!0,showTimeZoom:!0,showPlaybackSpeed:!0,selectedTimeRange:0,isPlaying:!1,montageOptions:[{value:"NOT_MONTAGED",label:"Continuous (Default)"},{value:"REFERENTIAL_VS_CZ",label:"Referential Montage"},{value:"BIPOLAR_ANT_POS",label:"Ant/Post Montage"},{value:"BIPOLAR_TRANSVERSE",label:"Transverse Montage"}],selectedMontage:"",playSpeedOptions:[{value:.5,label:"0.5x"},{value:1,label:"1x"},{value:2,label:"2x"},{value:5,label:"5x"},{value:10,label:"10x"}],selectedPlaySpeed:null,intervalTimer:null,intervalPeriod:150,intervalPage:1e6}},mounted:function(){this.selectedMontage="NOT_MONTAGED",this.selectedPlaySpeed=1},methods:{updateMontageScheme:function(e){this.viewerStore.setViewerMontageScheme(e)},updatePlaybackSpeed:function(e){},toggleTimeZoom:function(){this.showTimeZoom=!this.showTimeZoom},toggleVerticalZoom:function(){this.showVertZoom=!this.showVertZoom},togglePlaybackSpeed:function(){this.showPlaybackSpeed=!this.showPlaybackSpeed},togglePlayback:function(){this.isPlaying===!1?this.startPlay():this.stopPlay()},pageBack:function(){this.$emit("pageBack")},pageForward:function(){this.$emit("pageForward")},incrementZoom:function(){this.$emit("incrementZoom")},decrementZoom:function(){this.$emit("decrementZoom")},updateDuration:function(){this.$emit("updateDuration",this.selectedTimeRange)},nextAnnotation:function(){this.$emit("nextAnnotation")},previousAnnotation:function(){this.$emit("previousAnnotation")},startPlay:function(){this.isPlaying=!0;let e=this;this.intervalTimerFnc=function(){e.$emit("setStart",e.start+e.intervalPage*e.selectedPlaySpeed),e.intervalTimer=setTimeout(e.intervalTimerFnc,e.intervalPeriod)},this.intervalTimer=setTimeout(this.intervalTimerFnc,this.intervalPeriod)},stopPlay:function(){this.isPlaying=!1,this.intervalPeriod=150,clearInterval(this.intervalTimer)}}},_hoisted_1$5={class:"timeseries-viewer-toolbar"},_hoisted_2$4={id:"left-controls"},_hoisted_3$4={id:"center-controls"},_hoisted_4$3={id:"right-controls"};function _sfc_render$5(e,t,n,r,i,a){const o=vue.resolveComponent("IconTimescale"),u=ElTooltip,l=ElInputNumber,c=ElButton,p=ElButtonGroup,d=__unplugin_components_4,f=__unplugin_components_5,v=__unplugin_components_6,h=__unplugin_components_7,m=ElOption,y=ElSelect,g=__unplugin_components_10;return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$5,[vue.createElementVNode("div",_hoisted_2$4,[vue.createVNode(u,{placement:"top-end",content:"Toggle Time Zoom Controls"},{default:vue.withCtx(()=>[vue.createElementVNode("button",{class:"btn-icon",onClick:t[0]||(t[0]=b=>a.toggleTimeZoom())},[vue.createVNode(o,{height:20,width:20})])]),_:1}),e.showTimeZoom?(vue.openBlock(),vue.createBlock(l,{key:0,modelValue:a.durationInSeconds,"onUpdate:modelValue":t[1]||(t[1]=b=>a.durationInSeconds=b),precision:1,step:5,max:this.constants.MAXDURATION,size:"small","controls-position":"right"},null,8,["modelValue","max"])):vue.createCommentVNode("",!0),vue.createVNode(u,{placement:"top-end",content:"Toggle Vertical Zoom Controls"},{default:vue.withCtx(()=>[vue.createElementVNode("button",{class:"btn-icon",onClick:t[2]||(t[2]=b=>a.toggleVerticalZoom())})]),_:1}),e.showVertZoom?(vue.openBlock(),vue.createBlock(p,{key:1},{default:vue.withCtx(()=>[vue.createVNode(c,{icon:"el-icon-plus",size:"small",onClick:a.incrementZoom},null,8,["onClick"]),vue.createVNode(c,{icon:"el-icon-minus",size:"small",onClick:a.decrementZoom},null,8,["onClick"])]),_:1})):vue.createCommentVNode("",!0)]),vue.createElementVNode("div",_hoisted_3$4,[vue.createVNode(u,{placement:"top-end",content:"Page Back"},{default:vue.withCtx(()=>[vue.createElementVNode("button",{class:"btn-icon",onClick:t[3]||(t[3]=b=>a.pageBack())},[vue.createVNode(d,{height:12,width:12})])]),_:1}),vue.createVNode(u,{placement:"top-end",content:"Previous Annotation"},{default:vue.withCtx(()=>[vue.createElementVNode("button",{class:"btn-icon",onClick:t[4]||(t[4]=b=>a.previousAnnotation())},[vue.createVNode(f,{height:12,width:18})])]),_:1}),vue.createVNode(u,{placement:"top-end",content:"Automatic Forward"},{default:vue.withCtx(()=>[vue.createElementVNode("button",{class:"btn-icon",onClick:t[5]||(t[5]=b=>a.togglePlayback())},[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(a.iconPlay),{height:12,width:18}))])]),_:1}),vue.createVNode(u,{placement:"top-end",content:"Next Annotation"},{default:vue.withCtx(()=>[vue.createElementVNode("button",{class:"btn-icon",onClick:t[6]||(t[6]=b=>a.nextAnnotation())},[vue.createVNode(v,{name:"next-annotation-right-facing",height:12,width:18})])]),_:1}),vue.createVNode(u,{placement:"top-end",content:"Next Page"},{default:vue.withCtx(()=>[vue.createElementVNode("button",{class:"btn-icon",onClick:t[7]||(t[7]=b=>a.pageForward())},[vue.createVNode(h,{name:"icon-next-page",height:12,width:18})])]),_:1})]),vue.createElementVNode("div",_hoisted_4$3,[vue.createVNode(u,{placement:"top-end",content:"Montaging Controls"},{default:vue.withCtx(()=>[vue.createVNode(y,{modelValue:e.selectedMontage,"onUpdate:modelValue":t[8]||(t[8]=b=>e.selectedMontage=b),placeholder:"Select",size:"small",onChange:a.updateMontageScheme},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.montageOptions,b=>(vue.openBlock(),vue.createBlock(m,{key:b.value,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),vue.createVNode(u,{placement:"top-end",content:"Toggle Play Back Speed Controls"},{default:vue.withCtx(()=>[vue.createElementVNode("button",{class:"btn-icon",onClick:t[9]||(t[9]=b=>a.togglePlaybackSpeed())},[vue.createVNode(g,{height:20,width:22})])]),_:1}),e.showPlaybackSpeed?(vue.openBlock(),vue.createBlock(y,{key:0,modelValue:e.selectedPlaySpeed,"onUpdate:modelValue":t[10]||(t[10]=b=>e.selectedPlaySpeed=b),placeholder:"Select",size:"small",class:"playSelect"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.playSpeedOptions,b=>(vue.openBlock(),vue.createBlock(m,{key:b.value,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):vue.createCommentVNode("",!0)])])}const __unplugin_components_2=_export_sfc(_sfc_main$5,[["render",_sfc_render$5],["__scopeId","data-v-fff740e2"]]),ViewerActiveTool={mixins:[viewerStoreMixin],computed:{viewerActiveTool(){return this.viewerStore.viewerActiveTool}},watch:{viewerActiveTool:{handler:function(e){e&&this.setActiveTool(e)},immediate:!0}},methods:{setActiveTool:function(e){if(e){const t="set"+e.charAt(0).toUpperCase()+e.slice(1);typeof this[t]=="function"&&this[t]()}}}},Logger={methods:{logger:function(e,t="log",n=!1){if(n)return;const r=Array.isArray(e)?e:[e];!(location.href.indexOf("app.pennsieve.")>=0)&&typeof console[t]=="function"&&console[t].apply(console,r)}}},LogoutHandler={methods:{handleLogout:function(e){if(this.$route.name==="docs-login")return;const t=defaultTo(!1,prop("shouldShowToast",e)),n=defaultTo(!1,prop("shouldRedirect",e));this.viewerStore.clearState();let r={};n&&(r={redirectTo:this.$route.fullPath}),this.$router.replace({name:"home",query:r}),t&&EventBus.$emit("toast",{detail:{msg:"Logged Out"}})}}},_isString=e=>Object.prototype.toString.call(e)==="[object String]",_trimValues=e=>{Object.keys(e).forEach(t=>{_isString(e[t])&&(e[t]=e[t].trim())})},Request={mixins:[LogoutHandler,Logger],data(){return{method:"GET",body:null,isLoading:!0,sessionRefreshTime:290}},methods:{sendXhr:function(e,t){if(!e)return Promise.reject({status:400,message:"Url is missing!"});this.isLoading=!0,this.method=propOr("GET","method",t);const n=propOr({},"header",t),r=Object.assign({},{"Content-type":"application/json"},n),i=prop("body",t);let a={headers:r,method:this.method};return i&&(typeof i=="object"&&_trimValues(i),this.body=JSON.stringify(i),a=Object.assign({},a,{body:this.body})),fetch(e,a).then(o=>o.status>=400?Promise.reject(o):o.json().then(this.finishLoading.bind(this)).catch(()=>{this.finishLoading(o.body)}))},finishLoading:function(e){return this.$nextTick(()=>{this.isLoading=!1}),e},handleXhrError:function(e){this.isLoading=!1;const t=prop("status",e);if(t===400&&e.body)e.body.getReader().read().then(({done:n,value:r})=>{const i=r instanceof Uint8Array?String.fromCharCode.apply(null,r):r,a=compose(defaultTo(i),tryCatch(compose(prop("message"),JSON.parse),(o,u)=>u))(i);EventBus.$emit("ajaxError",{detail:{type:"error",msg:a}})});else if(t===401)console.log(e);else if(t===403){if(console.log(e),this.$router)return this.$router.replace({name:"datasets-list"})}else console.log(e),EventBus.$emit("ajaxError",e)}}},_sfc_main$4={name:"TimeseriesAnnotationCanvas",mixins:[Request,ViewerActiveTool,viewerStoreMixin],props:{cWidth:{type:Number,default:0},cHeight:Number,start:Number,duration:Number,tsEnd:Number,rsPeriod:Number,pixelRatio:Number,constants:Object,pointerMode:String,annotationsCanvas:null},data:function(){return{defaultColors:["#18BA62","#FFBC27","#E94B4B","#0D4EFF","#FF4FFF","#50FFFF","#FFFF4E","#512BAF","#8A6ECF","#389BAD","#187D46","#B12800","#0C2475","#FF5321","#FF99CC","#DCC180","#FF6C21","#000000","#9B9B9B","#00FF00","#FA8072","#808000","#A0522D","#2760FF"],annLayerInfo:[],hoverOffsets:[],cachedAnnRange:[],a11yList:["#FFFF4E"],focusedAnn:null,renderAnn:null,mouseDownPosition:null}},computed:{activeViewer(){return this.viewerStore.activeViewer},viewerChannels(){return this.viewerStore.viewerChannels},viewerActiveTool(){return this.viewerStore.viewerActiveTool},viewerAnnotations(){return this.viewerStore.viewerAnnotations},viewerMontageScheme(){return this.viewerStore.viewerMontageScheme},pHeight:function(){return this.cHeight-20},canvasStyle:function(){return{width:this.cWidth+"px",height:this.pHeight+"px"}}},mounted:function(){useToken().then(e=>{const t=`https://api.pennsieve.net/timeseries/${this.activeViewer.content.id}/layers?api_key=${e}`;return useSendXhr(t).then(n=>{this._getLayerResponse(n).then(()=>{this.checkAnnotationRange(this.start,this.start+this.duration)})})}).catch(useHandleXhrError)},methods:{_cpCanvasScaler:function(e,t,n){return t*(e+n)},_getLayerResponse(e){const t=[];if(e.results.length===0){const n={name:"Default",color:"#18BA62",description:"Default Annotation Layer"};this.createAnnotationLayer(n)}else{for(let n=0;n<e.results.length;n++){let r=e.results[n].color;r||(r=this.defaultColors[n%this.defaultColors.length]);const i={id:e.results[n].id,name:e.results[n].name,description:e.results[n].description,visible:!0,selected:!1,annotations:[],color:this.hexToRgbA(r,.7),hexColor:r,bkColor:this.hexToRgbA(r,.15),selColor:this.hexToRgbA(r,.9)};t.push(i)}t&&(t[0].selected=!0),this.viewerStore.setAnnotations(t).then(()=>{this.$emit("annLayersInitialized")})}return this.annLayerInfo=e.results,Promise.resolve()},hexToRgbA:function(e,t){let n;if(/^#([A-Fa-f0-9]{3}){1,2}$/.test(e))return n=e.substring(1).split(""),n.length===3&&(n=[n[0],n[0],n[1],n[1],n[2],n[2]]),n="0x"+n.join(""),"rgba("+[n>>16&255,n>>8&255,n&255].join(",")+","+t+")";throw new Error("Bad Hex")},sortAnns:function(e){e.sort(function(n,r){return n.start<r.start?-1:n.start>r.start?1:0})},_computeRenderOptions:function(e){const n=this.constants.ANNOTATIONLABELHEIGHT/2|0,r=this.constants.XOFFSET,i=[];for(let a=0;a<e.length;a++){const o=e[a];let u=o.start,l=o.duration;o.duration<0&&(u=o.start+o.duration,l=-o.duration);const c=r+(u-this.start)/this.rsPeriod;if(o.cStart=c|0,o.duration!==0){const p=r+(u+l-this.start)/this.rsPeriod;o.cEnd=p|0}else o.cEnd=o.cStart+this.cWidth/40|0;if(o.allChannels)o.allOffsets=[n],o.cY=n;else{o.allOffsets=[],o.minOffset=this.cHeight|0,o.maxOffset=0;const p=this.viewerChannels;for(let d in o.channelIds)if(o.channelIds.hasOwnProperty(d)){let f=null;for(let v in p)if(p.hasOwnProperty(v)){const h=p[v];if(h.id===o.channelIds[d]&&h.visible){f=h.rowBaseline|0,f<o.minOffset&&(o.minOffset=f),f>o.maxOffset&&(o.maxOffset=f),o.allOffsets.push(f);break}}}this.hoverOffsets.indexOf(o.minOffset)<0&&this.hoverOffsets.push(o.minOffset),o.cY=o.minOffset}}for(let a=i.length-1;a>=0;a--)e.splice(i[a],1)},getChannelId:function(e){const t=this.viewerMontageScheme!=="NOT_MONTAGED";let n=propOr("","id",e),r=[];return t&&(r=n.split("_"),n=r.length?head(r):n),n},findNextAnnotation:function(e){let t=this.viewerStore.getViewerActiveLayer();const n=this.annIndexOf(t.annotations,e,!1);return n<t.annotations.length?t.annotations[n+1]:t.annotations[n]},findPreviousAnnotation:function(e){let t=this.viewerStore.getViewerActiveLayer();const n=this.annIndexOf(t.annotations,e,!0);return n>0?t.annotations[n-1]:t.annotations[n]},checkAnnotationRange:function(e,t){const n=[];n.push({start:e,end:this.tsEnd});let r=0;for(let o=0;o<this.cachedAnnRange.length;o++){const u=this.cachedAnnRange[o];if(e>=u.start&&t<=u.end)return;if(n[0].start>t)break;if(u.start<=n[0].start&&u.end>=e)r=o+1,n[0].start=u.end;else if(u.start>n[0].start){r=o;break}}const i=this.viewerAnnotations.reduce((o,u)=>u.annotations.length);if(n[0].start>=n[0].end&&i>0)return;const a=0;for(let o=r;o<this.cachedAnnRange.length;o++)if(this.cachedAnnRange[o].start>=n[a].start)if(n[a].end=this.cachedAnnRange[o].start,this.cachedAnnRange[o].end<t)n.push({start:this.cachedAnnRange[o].end,end:this.summary.span.end});else break;if(!(n[0].start>=n[0].end&&i>0)&&n.length>0){for(let o=0;o<this.viewerChannels.length;o++){const u=this.viewerChannels[o];this.getChannelId(u)}for(let o in n)if(n.hasOwnProperty(o)){const u=n[o];for(let l=0;l<this.viewerAnnotations.length;l++){const c=this.viewerAnnotations[l],p=Math.floor(u.end),d={id:this.activeViewer.content.id,start:Math.floor(u.start),end:p,layerId:c.id,limit:this.constants.LIMITANNFETCH};useToken().then(f=>{const h=`https://api.pennsieve.net/timeseries/${this.activeViewer.content.id}/layers/${c.id}/annotations?api_key=${f}`,m=Object.keys(d).map(g=>`&${g}=${d[g]}`).join(""),y=`${h}${m}`;return fetch(y,{method:"GET",headers:{"Content-type":"application/json"}}).then(g=>{const{status:b}=g;if(b>=400)throw new Error(b);return g.json()}).then(this._getAnnResponse.bind(this))}).catch(f=>{this.handleXhrError(f)})}this.cachedAnnRange.push({start:Math.floor(u.start),end:Math.floor(u.end)})}this.cachedAnnRange.sort(function(u,l){return u.start<l.start?-1:u.start>l.start?1:0})}},_getAnnResponse(e){const t=propOr({},"linkedPackages",e);let n=pathOr([],["annotations","results"],e);if(n.length>=this.constants.LIMITANNFETCH){let i=0;for(let a=0;a<n.length;a++)n[a].start>i&&(i=n[a].start);for(let a=0;a<this.cachedAnnRange.length;a++)if(this.cachedAnnRange[a].end>i&&this.cachedAnnRange[a].start<i){this.cachedAnnRange[a].end=i;break}}const r=this.viewerMontageScheme!=="NOT_MONTAGED";if(n.length>0){const i=[];for(let a=0;a<n.length;a++){const o=n[a],u={name:"",id:o.id,label:o.label,description:o.description,start:o.start,duration:o.end-o.start,end:o.end,cStart:null,cEnd:null,selected:!1,channelIds:o.channelIds,allChannels:!1,layer_id:o.layerId,userId:o.userId};if(o.linkedPackage){const c=o.linkedPackage;u.linkedPackage=pathOr("",["content","id"],t[c]),u.linkedPackageDTO=t[c]}(!r&&u.channelIds.length===this.viewerChannels.length||r&&u.channelIds.length>this.viewerChannels.length)&&(u.allChannels=!0);let l=null;for(let c=0;c<this.viewerAnnotations.length;c++)if(this.viewerAnnotations[c].id===o.layerId){l=c;break}if(l===null){const c={id:this.viewerAnnotations.length,color:null,visible:!0,selected:!1,annotations:[],userId:o.userId};this.viewerStore.createLayer(c),l=this.viewerAnnotations.length-1}i.push(u)}this.viewerAnnotations.forEach(a=>{const o=a.annotations,u=i.filter(l=>a.id===l.layer_id);a.annotations=o.concat(u),this.viewerStore.updateLayer({layer:a,index})})}this.$emit("annotationsReceived")},annIndexOf:function(e,t,n,r,i){r||(r=0);let a;return i?a=this._indexOfEnd(e,t,r,e.length-1,n):a=this._indexOfStart(e,t,r,e.length-1,n),a===-1?a=0:a<0&&(a=-a-2),a},_indexOfStart:function(e,t,n,r,i){if(r<n){let o;if(r>=0?o=r:o=-r-2,o===-1)return o;const u=e[o].start;for(;o>=0&&e[o].start===u;)o--;return o++,-o-2}const a=parseInt((n+r)/2);if(e[a].start>t)return this._indexOfStart(e,t,n,a-1,i);if(e[a].start<t)return this._indexOfStart(e,t,a+1,r,i);{let o=a;if(i){for(;o>=0&&e[o].start===t;)o--;o++}else{for(;o<e.length&&e[o].start===t;)o++;o--}return o}},_indexOfEnd:function(e,t,n,r,i){if(r<n){let o;if(r>=0?o=r:o=-r-2,o===-1)return o;const u=e[o].start+e[o].duration;for(;o>=0&&e[o].start+e[o].duration===u;)o--;return o++,-o-2}const a=parseInt((n+r)/2);if(e[a].start+e[a].duration>t)return this._indexOfEnd(e,t,n,a-1,i);if(e[a].start+e[a].duration<t)return this._indexOfEnd(e,t,a+1,r,i);{let o=a;if(i){for(;o>=0&&e[o].start+e[o].duration===t;)o--;o++}else{for(;o<e.length&&e[o].start+e[o].duration===t;)o++;o--}return o}},getLayer:function(e){const t=propOr(0,"layer_id",e);return defaultTo({},find(propEq("id",t),this.viewerAnnotations))},createAnnotationLayer:function(e){useToken().then(t=>{const n=`https://api.pennsieve.net/timeseries/${this.activeViewer.content.id}/layers?api_key=${t}`;return useSendXhr(n,{method:"POST",body:{name:e.name,color:e.color,description:e.name}}).then(r=>{let i=r;i.annotations=[];const a=i.color;return i.hexColor=a,i.color=this.hexToRgbA(a,.7),i.bkColor=this.hexToRgbA(a,.15),i.selColor=this.hexToRgbA(a,.9),i.visible=!0,this.viewerStore.createLayer(i).then(()=>this.viewerStore.setActiveAnnotationLayer(i.id).then(()=>{EventBus.$emit("toast",{detail:{msg:`'${i.name}' Layer Created`}})}))})}).catch(useHandleXhrError).finally(()=>this.$emit("closeAnnotationLayerWindow"))},resetFocusedAnnotation:function(){prop("oldStart",this.focusedAnn)&&(this.focusedAnn.start=this.focusedAnn.oldStart,this.focusedAnn.duration=this.focusedAnn.oldDuration,this.focusedAnn.end=this.focusedAnn.start+this.focusedAnn.duration)},render:function(){if(this.annotationsCanvas===void 0)return;const e=this.annotationsCanvas.getContext("2d"),t=this.$refs.annLabelArea.getContext("2d");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),this.hoverOffsets=[this.constants.ANNOTATIONLABELHEIGHT/2],e.clearRect(0,0,this.cWidth,this.cHeight),t.clearRect(0,0,this.cWidth,this.cHeight),this.renderAnn=[];for(let n in this.viewerAnnotations)if(this.viewerAnnotations.hasOwnProperty(n)){const r=this.viewerAnnotations[n];if(r.visible&&r.annotations&&r.annotations.length>0){const i=this.annIndexOf(r.annotations,this.start+this.duration,!1,0,!1),a=[];for(let u=0;u<=i;u++)a.push(r.annotations[u]);a.sort(function(l,c){return l.start+l.duration<c.start+c.duration?-1:l.start+l.duration>c.start+c.duration?1:0});const o=this.annIndexOf(a,this.start,!0,0,!0);for(let u=o;u<=a.length-1;u++){const l=a[u];this.renderAnn.push(l)}}}this.sortAnns(this.renderAnn),this._computeRenderOptions(this.renderAnn),this._renderAnnotationAreas(e,this.renderAnn),this._renderAnnotationLabels(t,this.renderAnn,!0),this.focusedAnn!==null&&this._renderAnnotationLabels(t,[this.focusedAnn],!1)},_renderAnnotationAreas:function(e,t){const n=this.constants.ANNOTATIONLABELHEIGHT,r=n/2|0;e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),e.save(),e.lineWidth=1,e.setLineDash([8,5]),e.strokeStyle="rgba(0,0,0, 0.6)",e.fillStyle="rgba(0,0,0,0.05)";for(const i in t)if(t.hasOwnProperty(i)){const a=t[i],o=this.getLayer(a);a.selected&&(e.save(),e.strokeStyle=o.selColor,e.fillStyle=o.bkColor,e.lineWidth=1);let u=Math.round(a.cStart)+.5,l=Math.round(a.cEnd)+.5;a.allChannels?a.duration===0?(e.beginPath(),e.moveTo(u+1,n),e.lineTo(u,this.pHeight),e.stroke()):(e.fillRect(u,n,l-u,this.pHeight-n),e.beginPath(),e.moveTo(u,n),e.lineTo(u,this.pHeight),e.moveTo(l,n),e.lineTo(l,this.pHeight),e.stroke()):a&&a.channelIds&&a.channelIds.length===1?a.duration===0&&(e.beginPath(),e.moveTo(u,a.minOffset+r),e.lineTo(u,a.minOffset+r+8),e.stroke()):a.duration===0?(e.beginPath(),e.moveTo(u,a.minOffset+r),e.lineTo(u,a.maxOffset-r),e.stroke()):(e.fillRect(u-1,a.minOffset+r,l-u+1,a.maxOffset-a.minOffset-n),e.beginPath(),e.moveTo(u,a.minOffset+r),e.lineTo(u,a.maxOffset-r),e.moveTo(l,a.minOffset+r),e.lineTo(l,a.maxOffset-r),e.stroke()),a.selected&&e.restore()}e.restore()},_renderAnnotationLabels:function(e,t,n){const r=this.constants.ANNOTATIONLABELHEIGHT,i=r/2|0;e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),e.save(),e.lineWidth=2,e.font="14px sans-serif",e.textAlign="left";for(let a=0;a<t.length;a++){const o=t[a],u=this.getLayer(o);if(o===this.focusedAnn&&n)continue;o.selected?(e.fillStyle=u.selColor||"rgba(51,204,102, 0.8)",e.strokeStyle="white"):(e.fillStyle=u.color||"rgba(51,204,102,0.8)",o===this.focusedAnn?e.strokeStyle="white":e.strokeStyle="rgba(255,255,255,0.8)");let l=Math.round(o.cStart)+1,c=Math.round(o.cEnd),p=0;for(let v=0;v<o.allOffsets.length;v++)e.fillRect(l-1,o.allOffsets[v]-i,c-l+2,r),o.allOffsets[v]===o.minOffset&&(p=v);const d=o.allOffsets[p];["annSelect","annResize-left","annResize-right"].includes(this.pointerMode)&&this.viewerActiveTool=="annotate"&&(e.beginPath(),o.duration!==0&&(e.moveTo(c-3,d-i+3),e.lineTo(c-3,d+i-3)),e.moveTo(l+3,d-i+3),e.lineTo(l+3,d+i-3),e.stroke()),c-l>o.label.length*8+10&&(e.fillStyle=this.a11yList.indexOf(u.hexColor)>=0?"black":"white",o.linkedPackage?e.fillText(o.label,l+30,d+i-i/2):e.fillText(o.label,l+10,d+i-6));const f=o.linkedPackageDTO;if(f&&c-l>=30){const v=pathOr({},["objects","view",1,"content"],f),h=propOr("","fileType",v),m=new Image;if(h==="PNG"){const{id:y,packageId:g}=v,b="https://api.pennsieve.net";useToken().then(_=>{m.src=`${b}/packages/${g}/files/${y}/presign/?api_key=${_}`,m.complete||m.addEventListener("load",()=>this.render(),{once:!0}),e.drawImage(m,l,d-i,27,r)}).catch(console.log)}else m.src=this._computeIcon(f),e.drawImage(m,l+5,d-i,20,20)}}e.restore()},onMouseDown:function(e,t){if(this.focusedAnn)switch(this.pointerMode){case"annResize-left":case"annResize-right":this.focusedAnn.oldStart=this.focusedAnn.start,this.focusedAnn.oldDuration=this.focusedAnn.duration,this.mouseDownPosition=[e,t];break}},onMouseMove:function(e,t,n,r){let i=n;if(r){const a=(e-this.mouseDownPosition[0])*this.rsPeriod;switch(this.pointerMode){case"annResize-left":this.focusedAnn.oldDuration>0?(this.focusedAnn.start=this.focusedAnn.oldStart+a,this.focusedAnn.duration=this.focusedAnn.oldDuration-a,this.focusedAnn.end=this.focusedAnn.start+this.focusedAnn.duration):this.focusedAnn.start=this.focusedAnn.oldStart+a;break;case"annResize-right":this.focusedAnn.duration=this.focusedAnn.oldDuration+a,this.focusedAnn.end=this.focusedAnn.start+this.focusedAnn.duration;break}}else{const a=this.shouldCheckAnnotationHover(t);if(i=this.viewerActiveTool,a){const u=this.constants.ANNOTATIONLABELHEIGHT/2;let l=null;for(let c=0;c<this.renderAnn.length;c++)if(this.renderAnn[c].cStart<e&&this.renderAnn[c].cEnd>e)t>this.renderAnn[c].cY-u&&t<this.renderAnn[c].cY+u&&(l=c);else if(this.renderAnn[c].cStart>e)break;if(l!==null)switch((this.focusedAnn===null||this.focusedAnn&&(e<this.focusedAnn.cStart||e>this.focusedAnn.cEnd))&&(this.focusedAnn=this.renderAnn[l]),this.viewerActiveTool){case"annotate":e<=this.focusedAnn.cStart+10?i="annResize-left":e>=this.focusedAnn.cEnd-10&&this.focusedAnn.duration>0?i="annResize-right":i="annSelect";break;case"pointer":i="annSelect";break}else this.focusedAnn=null}else this.focusedAnn=null,i=this.viewerActiveTool}return i},onMouseUp:function(){if(this.focusedAnn)switch(this.pointerMode){case"annResize-left":case"annResize-right":if(this.focusedAnn.duration<0){const e=-this.focusedAnn.duration,t=this.focusedAnn.start-e;this.focusedAnn.start=t,this.focusedAnn.duration=e,this.focusedAnn.end=t+e}this.viewerStore.setActiveAnnotation(this.focusedAnn).then(()=>{this.$emit("updateAnnotation",this.focusedAnn)});break}},shouldCheckAnnotationHover:function(e){const n=this.constants.ANNOTATIONLABELHEIGHT/2;let r=!1;for(let i=0;i<this.hoverOffsets.length;i++)if(e>=this.hoverOffsets[i]-n&&e<=this.hoverOffsets[i]+n){r=!0;break}return r},selectFocusedAnn:async function(){await this.viewerStore.setActiveAnnotation(this.focusedAnn),this.$nextTick(()=>{this.render()})}}},_hoisted_1$4=["width","height"];function _sfc_render$4(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("canvas",{ref:"annLabelArea",class:"timeseries-annotation-canvas",width:a._cpCanvasScaler(n.cWidth,n.pixelRatio,0),height:a._cpCanvasScaler(a.pHeight,n.pixelRatio,0),style:vue.normalizeStyle(a.canvasStyle)},null,12,_hoisted_1$4)}const __unplugin_components_1$1=_export_sfc(_sfc_main$4,[["render",_sfc_render$4],["__scopeId","data-v-03bf4998"]]);var src={exports:{}},indexLight={exports:{}},indexMinimal={},minimal={},aspromise,hasRequiredAspromise;function requireAspromise(){if(hasRequiredAspromise)return aspromise;hasRequiredAspromise=1,aspromise=e;function e(t,n){for(var r=new Array(arguments.length-1),i=0,a=2,o=!0;a<arguments.length;)r[i++]=arguments[a++];return new Promise(function(l,c){r[i]=function(d){if(o)if(o=!1,d)c(d);else{for(var f=new Array(arguments.length-1),v=0;v<f.length;)f[v++]=arguments[v];l.apply(null,f)}};try{t.apply(n||null,r)}catch(p){o&&(o=!1,c(p))}})}return aspromise}var base64={},hasRequiredBase64;function requireBase64(){return hasRequiredBase64||(hasRequiredBase64=1,function(e){var t=e;t.length=function(u){var l=u.length;if(!l)return 0;for(var c=0;--l%4>1&&u.charAt(l)==="=";)++c;return Math.ceil(u.length*3)/4-c};for(var n=new Array(64),r=new Array(123),i=0;i<64;)r[n[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;t.encode=function(u,l,c){for(var p=null,d=[],f=0,v=0,h;l<c;){var m=u[l++];switch(v){case 0:d[f++]=n[m>>2],h=(m&3)<<4,v=1;break;case 1:d[f++]=n[h|m>>4],h=(m&15)<<2,v=2;break;case 2:d[f++]=n[h|m>>6],d[f++]=n[m&63],v=0;break}f>8191&&((p||(p=[])).push(String.fromCharCode.apply(String,d)),f=0)}return v&&(d[f++]=n[h],d[f++]=61,v===1&&(d[f++]=61)),p?(f&&p.push(String.fromCharCode.apply(String,d.slice(0,f))),p.join("")):String.fromCharCode.apply(String,d.slice(0,f))};var a="invalid encoding";t.decode=function(u,l,c){for(var p=c,d=0,f,v=0;v<u.length;){var h=u.charCodeAt(v++);if(h===61&&d>1)break;if((h=r[h])===void 0)throw Error(a);switch(d){case 0:f=h,d=1;break;case 1:l[c++]=f<<2|(h&48)>>4,f=h,d=2;break;case 2:l[c++]=(f&15)<<4|(h&60)>>2,f=h,d=3;break;case 3:l[c++]=(f&3)<<6|h,d=0;break}}if(d===1)throw Error(a);return c-p},t.test=function(u){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(u)}}(base64)),base64}var eventemitter,hasRequiredEventemitter;function requireEventemitter(){if(hasRequiredEventemitter)return eventemitter;hasRequiredEventemitter=1,eventemitter=e;function e(){this._listeners={}}return e.prototype.on=function(n,r,i){return(this._listeners[n]||(this._listeners[n]=[])).push({fn:r,ctx:i||this}),this},e.prototype.off=function(n,r){if(n===void 0)this._listeners={};else if(r===void 0)this._listeners[n]=[];else for(var i=this._listeners[n],a=0;a<i.length;)i[a].fn===r?i.splice(a,1):++a;return this},e.prototype.emit=function(n){var r=this._listeners[n];if(r){for(var i=[],a=1;a<arguments.length;)i.push(arguments[a++]);for(a=0;a<r.length;)r[a].fn.apply(r[a++].ctx,i)}return this},eventemitter}var float,hasRequiredFloat;function requireFloat(){if(hasRequiredFloat)return float;hasRequiredFloat=1,float=e(e);function e(a){return typeof Float32Array<"u"?function(){var o=new Float32Array([-0]),u=new Uint8Array(o.buffer),l=u[3]===128;function c(v,h,m){o[0]=v,h[m]=u[0],h[m+1]=u[1],h[m+2]=u[2],h[m+3]=u[3]}function p(v,h,m){o[0]=v,h[m]=u[3],h[m+1]=u[2],h[m+2]=u[1],h[m+3]=u[0]}a.writeFloatLE=l?c:p,a.writeFloatBE=l?p:c;function d(v,h){return u[0]=v[h],u[1]=v[h+1],u[2]=v[h+2],u[3]=v[h+3],o[0]}function f(v,h){return u[3]=v[h],u[2]=v[h+1],u[1]=v[h+2],u[0]=v[h+3],o[0]}a.readFloatLE=l?d:f,a.readFloatBE=l?f:d}():function(){function o(l,c,p,d){var f=c<0?1:0;if(f&&(c=-c),c===0)l(1/c>0?0:2147483648,p,d);else if(isNaN(c))l(2143289344,p,d);else if(c>34028234663852886e22)l((f<<31|2139095040)>>>0,p,d);else if(c<11754943508222875e-54)l((f<<31|Math.round(c/1401298464324817e-60))>>>0,p,d);else{var v=Math.floor(Math.log(c)/Math.LN2),h=Math.round(c*Math.pow(2,-v)*8388608)&8388607;l((f<<31|v+127<<23|h)>>>0,p,d)}}a.writeFloatLE=o.bind(null,t),a.writeFloatBE=o.bind(null,n);function u(l,c,p){var d=l(c,p),f=(d>>31)*2+1,v=d>>>23&255,h=d&8388607;return v===255?h?NaN:f*(1/0):v===0?f*1401298464324817e-60*h:f*Math.pow(2,v-150)*(h+8388608)}a.readFloatLE=u.bind(null,r),a.readFloatBE=u.bind(null,i)}(),typeof Float64Array<"u"?function(){var o=new Float64Array([-0]),u=new Uint8Array(o.buffer),l=u[7]===128;function c(v,h,m){o[0]=v,h[m]=u[0],h[m+1]=u[1],h[m+2]=u[2],h[m+3]=u[3],h[m+4]=u[4],h[m+5]=u[5],h[m+6]=u[6],h[m+7]=u[7]}function p(v,h,m){o[0]=v,h[m]=u[7],h[m+1]=u[6],h[m+2]=u[5],h[m+3]=u[4],h[m+4]=u[3],h[m+5]=u[2],h[m+6]=u[1],h[m+7]=u[0]}a.writeDoubleLE=l?c:p,a.writeDoubleBE=l?p:c;function d(v,h){return u[0]=v[h],u[1]=v[h+1],u[2]=v[h+2],u[3]=v[h+3],u[4]=v[h+4],u[5]=v[h+5],u[6]=v[h+6],u[7]=v[h+7],o[0]}function f(v,h){return u[7]=v[h],u[6]=v[h+1],u[5]=v[h+2],u[4]=v[h+3],u[3]=v[h+4],u[2]=v[h+5],u[1]=v[h+6],u[0]=v[h+7],o[0]}a.readDoubleLE=l?d:f,a.readDoubleBE=l?f:d}():function(){function o(l,c,p,d,f,v){var h=d<0?1:0;if(h&&(d=-d),d===0)l(0,f,v+c),l(1/d>0?0:2147483648,f,v+p);else if(isNaN(d))l(0,f,v+c),l(2146959360,f,v+p);else if(d>17976931348623157e292)l(0,f,v+c),l((h<<31|2146435072)>>>0,f,v+p);else{var m;if(d<22250738585072014e-324)m=d/5e-324,l(m>>>0,f,v+c),l((h<<31|m/4294967296)>>>0,f,v+p);else{var y=Math.floor(Math.log(d)/Math.LN2);y===1024&&(y=1023),m=d*Math.pow(2,-y),l(m*4503599627370496>>>0,f,v+c),l((h<<31|y+1023<<20|m*1048576&1048575)>>>0,f,v+p)}}}a.writeDoubleLE=o.bind(null,t,0,4),a.writeDoubleBE=o.bind(null,n,4,0);function u(l,c,p,d,f){var v=l(d,f+c),h=l(d,f+p),m=(h>>31)*2+1,y=h>>>20&2047,g=4294967296*(h&1048575)+v;return y===2047?g?NaN:m*(1/0):y===0?m*5e-324*g:m*Math.pow(2,y-1075)*(g+4503599627370496)}a.readDoubleLE=u.bind(null,r,0,4),a.readDoubleBE=u.bind(null,i,4,0)}(),a}function t(a,o,u){o[u]=a&255,o[u+1]=a>>>8&255,o[u+2]=a>>>16&255,o[u+3]=a>>>24}function n(a,o,u){o[u]=a>>>24,o[u+1]=a>>>16&255,o[u+2]=a>>>8&255,o[u+3]=a&255}function r(a,o){return(a[o]|a[o+1]<<8|a[o+2]<<16|a[o+3]<<24)>>>0}function i(a,o){return(a[o]<<24|a[o+1]<<16|a[o+2]<<8|a[o+3])>>>0}return float}var inquire_1,hasRequiredInquire;function requireInquire(){if(hasRequiredInquire)return inquire_1;hasRequiredInquire=1,inquire_1=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}return inquire_1}var utf8={},hasRequiredUtf8;function requireUtf8(){return hasRequiredUtf8||(hasRequiredUtf8=1,function(e){var t=e;t.length=function(r){for(var i=0,a=0,o=0;o<r.length;++o)a=r.charCodeAt(o),a<128?i+=1:a<2048?i+=2:(a&64512)===55296&&(r.charCodeAt(o+1)&64512)===56320?(++o,i+=4):i+=3;return i},t.read=function(r,i,a){var o=a-i;if(o<1)return"";for(var u=null,l=[],c=0,p;i<a;)p=r[i++],p<128?l[c++]=p:p>191&&p<224?l[c++]=(p&31)<<6|r[i++]&63:p>239&&p<365?(p=((p&7)<<18|(r[i++]&63)<<12|(r[i++]&63)<<6|r[i++]&63)-65536,l[c++]=55296+(p>>10),l[c++]=56320+(p&1023)):l[c++]=(p&15)<<12|(r[i++]&63)<<6|r[i++]&63,c>8191&&((u||(u=[])).push(String.fromCharCode.apply(String,l)),c=0);return u?(c&&u.push(String.fromCharCode.apply(String,l.slice(0,c))),u.join("")):String.fromCharCode.apply(String,l.slice(0,c))},t.write=function(r,i,a){for(var o=a,u,l,c=0;c<r.length;++c)u=r.charCodeAt(c),u<128?i[a++]=u:u<2048?(i[a++]=u>>6|192,i[a++]=u&63|128):(u&64512)===55296&&((l=r.charCodeAt(c+1))&64512)===56320?(u=65536+((u&1023)<<10)+(l&1023),++c,i[a++]=u>>18|240,i[a++]=u>>12&63|128,i[a++]=u>>6&63|128,i[a++]=u&63|128):(i[a++]=u>>12|224,i[a++]=u>>6&63|128,i[a++]=u&63|128);return a-o}}(utf8)),utf8}var pool_1,hasRequiredPool;function requirePool(){if(hasRequiredPool)return pool_1;hasRequiredPool=1,pool_1=e;function e(t,n,r){var i=r||8192,a=i>>>1,o=null,u=i;return function(c){if(c<1||c>a)return t(c);u+c>i&&(o=t(i),u=0);var p=n.call(o,u,u+=c);return u&7&&(u=(u|7)+1),p}}return pool_1}var longbits,hasRequiredLongbits;function requireLongbits(){if(hasRequiredLongbits)return longbits;hasRequiredLongbits=1,longbits=t;var e=requireMinimal();function t(a,o){this.lo=a>>>0,this.hi=o>>>0}var n=t.zero=new t(0,0);n.toNumber=function(){return 0},n.zzEncode=n.zzDecode=function(){return this},n.length=function(){return 1};var r=t.zeroHash="\0\0\0\0\0\0\0\0";t.fromNumber=function(o){if(o===0)return n;var u=o<0;u&&(o=-o);var l=o>>>0,c=(o-l)/4294967296>>>0;return u&&(c=~c>>>0,l=~l>>>0,++l>4294967295&&(l=0,++c>4294967295&&(c=0))),new t(l,c)},t.from=function(o){if(typeof o=="number")return t.fromNumber(o);if(e.isString(o))if(e.Long)o=e.Long.fromString(o);else return t.fromNumber(parseInt(o,10));return o.low||o.high?new t(o.low>>>0,o.high>>>0):n},t.prototype.toNumber=function(o){if(!o&&this.hi>>>31){var u=~this.lo+1>>>0,l=~this.hi>>>0;return u||(l=l+1>>>0),-(u+l*4294967296)}return this.lo+this.hi*4294967296},t.prototype.toLong=function(o){return e.Long?new e.Long(this.lo|0,this.hi|0,!!o):{low:this.lo|0,high:this.hi|0,unsigned:!!o}};var i=String.prototype.charCodeAt;return t.fromHash=function(o){return o===r?n:new t((i.call(o,0)|i.call(o,1)<<8|i.call(o,2)<<16|i.call(o,3)<<24)>>>0,(i.call(o,4)|i.call(o,5)<<8|i.call(o,6)<<16|i.call(o,7)<<24)>>>0)},t.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},t.prototype.zzEncode=function(){var o=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^o)>>>0,this.lo=(this.lo<<1^o)>>>0,this},t.prototype.zzDecode=function(){var o=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^o)>>>0,this.hi=(this.hi>>>1^o)>>>0,this},t.prototype.length=function(){var o=this.lo,u=(this.lo>>>28|this.hi<<4)>>>0,l=this.hi>>>24;return l===0?u===0?o<16384?o<128?1:2:o<2097152?3:4:u<16384?u<128?5:6:u<2097152?7:8:l<128?9:10},longbits}var hasRequiredMinimal;function requireMinimal(){return hasRequiredMinimal||(hasRequiredMinimal=1,function(e){var t=e;t.asPromise=requireAspromise(),t.base64=requireBase64(),t.EventEmitter=requireEventemitter(),t.float=requireFloat(),t.inquire=requireInquire(),t.utf8=requireUtf8(),t.pool=requirePool(),t.LongBits=requireLongbits(),t.isNode=!!(typeof commonjsGlobal<"u"&&commonjsGlobal&&commonjsGlobal.process&&commonjsGlobal.process.versions&&commonjsGlobal.process.versions.node),t.global=t.isNode&&commonjsGlobal||typeof window<"u"&&window||typeof self<"u"&&self||minimal,t.emptyArray=Object.freeze?Object.freeze([]):[],t.emptyObject=Object.freeze?Object.freeze({}):{},t.isInteger=Number.isInteger||function(a){return typeof a=="number"&&isFinite(a)&&Math.floor(a)===a},t.isString=function(a){return typeof a=="string"||a instanceof String},t.isObject=function(a){return a&&typeof a=="object"},t.isset=t.isSet=function(a,o){var u=a[o];return u!=null&&a.hasOwnProperty(o)?typeof u!="object"||(Array.isArray(u)?u.length:Object.keys(u).length)>0:!1},t.Buffer=function(){try{var i=t.inquire("buffer").Buffer;return i.prototype.utf8Write?i:null}catch{return null}}(),t._Buffer_from=null,t._Buffer_allocUnsafe=null,t.newBuffer=function(a){return typeof a=="number"?t.Buffer?t._Buffer_allocUnsafe(a):new t.Array(a):t.Buffer?t._Buffer_from(a):typeof Uint8Array>"u"?a:new Uint8Array(a)},t.Array=typeof Uint8Array<"u"?Uint8Array:Array,t.Long=t.global.dcodeIO&&t.global.dcodeIO.Long||t.global.Long||t.inquire("long"),t.key2Re=/^true|false|0|1$/,t.key32Re=/^-?(?:0|[1-9][0-9]*)$/,t.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,t.longToHash=function(a){return a?t.LongBits.from(a).toHash():t.LongBits.zeroHash},t.longFromHash=function(a,o){var u=t.LongBits.fromHash(a);return t.Long?t.Long.fromBits(u.lo,u.hi,o):u.toNumber(!!o)};function n(i,a,o){for(var u=Object.keys(a),l=0;l<u.length;++l)(i[u[l]]===void 0||!o)&&(i[u[l]]=a[u[l]]);return i}t.merge=n,t.lcFirst=function(a){return a.charAt(0).toLowerCase()+a.substring(1)};function r(i){function a(o,u){if(!(this instanceof a))return new a(o,u);Object.defineProperty(this,"message",{get:function(){return o}}),Error.captureStackTrace?Error.captureStackTrace(this,a):Object.defineProperty(this,"stack",{value:new Error().stack||""}),u&&n(this,u)}return a.prototype=Object.create(Error.prototype,{constructor:{value:a,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return i},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),a}t.newError=r,t.ProtocolError=r("ProtocolError"),t.oneOfGetter=function(a){for(var o={},u=0;u<a.length;++u)o[a[u]]=1;return function(){for(var l=Object.keys(this),c=l.length-1;c>-1;--c)if(o[l[c]]===1&&this[l[c]]!==void 0&&this[l[c]]!==null)return l[c]}},t.oneOfSetter=function(a){return function(o){for(var u=0;u<a.length;++u)a[u]!==o&&delete this[a[u]]}},t.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},t._configure=function(){var i=t.Buffer;if(!i){t._Buffer_from=t._Buffer_allocUnsafe=null;return}t._Buffer_from=i.from!==Uint8Array.from&&i.from||function(o,u){return new i(o,u)},t._Buffer_allocUnsafe=i.allocUnsafe||function(o){return new i(o)}}}(minimal)),minimal}var writer,hasRequiredWriter;function requireWriter(){if(hasRequiredWriter)return writer;hasRequiredWriter=1,writer=l;var e=requireMinimal(),t,n=e.LongBits,r=e.base64,i=e.utf8;function a(y,g,b){this.fn=y,this.len=g,this.next=void 0,this.val=b}function o(){}function u(y){this.head=y.head,this.tail=y.tail,this.len=y.len,this.next=y.states}function l(){this.len=0,this.head=new a(o,0,0),this.tail=this.head,this.states=null}var c=function(){return e.Buffer?function(){return(l.create=function(){return new t})()}:function(){return new l}};l.create=c(),l.alloc=function(g){return new e.Array(g)},e.Array!==Array&&(l.alloc=e.pool(l.alloc,e.Array.prototype.subarray)),l.prototype._push=function(g,b,_){return this.tail=this.tail.next=new a(g,b,_),this.len+=b,this};function p(y,g,b){g[b]=y&255}function d(y,g,b){for(;y>127;)g[b++]=y&127|128,y>>>=7;g[b]=y}function f(y,g){this.len=y,this.next=void 0,this.val=g}f.prototype=Object.create(a.prototype),f.prototype.fn=d,l.prototype.uint32=function(g){return this.len+=(this.tail=this.tail.next=new f((g=g>>>0)<128?1:g<16384?2:g<2097152?3:g<268435456?4:5,g)).len,this},l.prototype.int32=function(g){return g<0?this._push(v,10,n.fromNumber(g)):this.uint32(g)},l.prototype.sint32=function(g){return this.uint32((g<<1^g>>31)>>>0)};function v(y,g,b){for(;y.hi;)g[b++]=y.lo&127|128,y.lo=(y.lo>>>7|y.hi<<25)>>>0,y.hi>>>=7;for(;y.lo>127;)g[b++]=y.lo&127|128,y.lo=y.lo>>>7;g[b++]=y.lo}l.prototype.uint64=function(g){var b=n.from(g);return this._push(v,b.length(),b)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(g){var b=n.from(g).zzEncode();return this._push(v,b.length(),b)},l.prototype.bool=function(g){return this._push(p,1,g?1:0)};function h(y,g,b){g[b]=y&255,g[b+1]=y>>>8&255,g[b+2]=y>>>16&255,g[b+3]=y>>>24}l.prototype.fixed32=function(g){return this._push(h,4,g>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(g){var b=n.from(g);return this._push(h,4,b.lo)._push(h,4,b.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(g){return this._push(e.float.writeFloatLE,4,g)},l.prototype.double=function(g){return this._push(e.float.writeDoubleLE,8,g)};var m=e.Array.prototype.set?function(g,b,_){b.set(g,_)}:function(g,b,_){for(var S=0;S<g.length;++S)b[_+S]=g[S]};return l.prototype.bytes=function(g){var b=g.length>>>0;if(!b)return this._push(p,1,0);if(e.isString(g)){var _=l.alloc(b=r.length(g));r.decode(g,_,0),g=_}return this.uint32(b)._push(m,b,g)},l.prototype.string=function(g){var b=i.length(g);return b?this.uint32(b)._push(i.write,b,g):this._push(p,1,0)},l.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new a(o,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new a(o,0,0),this.len=0),this},l.prototype.ldelim=function(){var g=this.head,b=this.tail,_=this.len;return this.reset().uint32(_),_&&(this.tail.next=g.next,this.tail=b,this.len+=_),this},l.prototype.finish=function(){for(var g=this.head.next,b=this.constructor.alloc(this.len),_=0;g;)g.fn(g.val,b,_),_+=g.len,g=g.next;return b},l._configure=function(y){t=y,l.create=c(),t._configure()},writer}var writer_buffer,hasRequiredWriter_buffer;function requireWriter_buffer(){if(hasRequiredWriter_buffer)return writer_buffer;hasRequiredWriter_buffer=1,writer_buffer=n;var e=requireWriter();(n.prototype=Object.create(e.prototype)).constructor=n;var t=requireMinimal();function n(){e.call(this)}n._configure=function(){n.alloc=t._Buffer_allocUnsafe,n.writeBytesBuffer=t.Buffer&&t.Buffer.prototype instanceof Uint8Array&&t.Buffer.prototype.set.name==="set"?function(a,o,u){o.set(a,u)}:function(a,o,u){if(a.copy)a.copy(o,u,0,a.length);else for(var l=0;l<a.length;)o[u++]=a[l++]}},n.prototype.bytes=function(a){t.isString(a)&&(a=t._Buffer_from(a,"base64"));var o=a.length>>>0;return this.uint32(o),o&&this._push(n.writeBytesBuffer,o,a),this};function r(i,a,o){i.length<40?t.utf8.write(i,a,o):a.utf8Write?a.utf8Write(i,o):a.write(i,o)}return n.prototype.string=function(a){var o=t.Buffer.byteLength(a);return this.uint32(o),o&&this._push(r,o,a),this},n._configure(),writer_buffer}var reader,hasRequiredReader;function requireReader(){if(hasRequiredReader)return reader;hasRequiredReader=1,reader=a;var e=requireMinimal(),t,n=e.LongBits,r=e.utf8;function i(d,f){return RangeError("index out of range: "+d.pos+" + "+(f||1)+" > "+d.len)}function a(d){this.buf=d,this.pos=0,this.len=d.length}var o=typeof Uint8Array<"u"?function(f){if(f instanceof Uint8Array||Array.isArray(f))return new a(f);throw Error("illegal buffer")}:function(f){if(Array.isArray(f))return new a(f);throw Error("illegal buffer")},u=function(){return e.Buffer?function(v){return(a.create=function(m){return e.Buffer.isBuffer(m)?new t(m):o(m)})(v)}:o};a.create=u(),a.prototype._slice=e.Array.prototype.subarray||e.Array.prototype.slice,a.prototype.uint32=function(){var f=4294967295;return function(){if(f=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(f=(f|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(f=(f|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(f=(f|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(f=(f|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return f;if((this.pos+=5)>this.len)throw this.pos=this.len,i(this,10);return f}}(),a.prototype.int32=function(){return this.uint32()|0},a.prototype.sint32=function(){var f=this.uint32();return f>>>1^-(f&1)|0};function l(){var d=new n(0,0),f=0;if(this.len-this.pos>4){for(;f<4;++f)if(d.lo=(d.lo|(this.buf[this.pos]&127)<<f*7)>>>0,this.buf[this.pos++]<128)return d;if(d.lo=(d.lo|(this.buf[this.pos]&127)<<28)>>>0,d.hi=(d.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return d;f=0}else{for(;f<3;++f){if(this.pos>=this.len)throw i(this);if(d.lo=(d.lo|(this.buf[this.pos]&127)<<f*7)>>>0,this.buf[this.pos++]<128)return d}return d.lo=(d.lo|(this.buf[this.pos++]&127)<<f*7)>>>0,d}if(this.len-this.pos>4){for(;f<5;++f)if(d.hi=(d.hi|(this.buf[this.pos]&127)<<f*7+3)>>>0,this.buf[this.pos++]<128)return d}else for(;f<5;++f){if(this.pos>=this.len)throw i(this);if(d.hi=(d.hi|(this.buf[this.pos]&127)<<f*7+3)>>>0,this.buf[this.pos++]<128)return d}throw Error("invalid varint encoding")}a.prototype.bool=function(){return this.uint32()!==0};function c(d,f){return(d[f-4]|d[f-3]<<8|d[f-2]<<16|d[f-1]<<24)>>>0}a.prototype.fixed32=function(){if(this.pos+4>this.len)throw i(this,4);return c(this.buf,this.pos+=4)},a.prototype.sfixed32=function(){if(this.pos+4>this.len)throw i(this,4);return c(this.buf,this.pos+=4)|0};function p(){if(this.pos+8>this.len)throw i(this,8);return new n(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}return a.prototype.float=function(){if(this.pos+4>this.len)throw i(this,4);var f=e.float.readFloatLE(this.buf,this.pos);return this.pos+=4,f},a.prototype.double=function(){if(this.pos+8>this.len)throw i(this,4);var f=e.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,f},a.prototype.bytes=function(){var f=this.uint32(),v=this.pos,h=this.pos+f;if(h>this.len)throw i(this,f);if(this.pos+=f,Array.isArray(this.buf))return this.buf.slice(v,h);if(v===h){var m=e.Buffer;return m?m.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,v,h)},a.prototype.string=function(){var f=this.bytes();return r.read(f,0,f.length)},a.prototype.skip=function(f){if(typeof f=="number"){if(this.pos+f>this.len)throw i(this,f);this.pos+=f}else do if(this.pos>=this.len)throw i(this);while(this.buf[this.pos++]&128);return this},a.prototype.skipType=function(d){switch(d){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(d=this.uint32()&7)!==4;)this.skipType(d);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+d+" at offset "+this.pos)}return this},a._configure=function(d){t=d,a.create=u(),t._configure();var f=e.Long?"toLong":"toNumber";e.merge(a.prototype,{int64:function(){return l.call(this)[f](!1)},uint64:function(){return l.call(this)[f](!0)},sint64:function(){return l.call(this).zzDecode()[f](!1)},fixed64:function(){return p.call(this)[f](!0)},sfixed64:function(){return p.call(this)[f](!1)}})},reader}var reader_buffer,hasRequiredReader_buffer;function requireReader_buffer(){if(hasRequiredReader_buffer)return reader_buffer;hasRequiredReader_buffer=1,reader_buffer=n;var e=requireReader();(n.prototype=Object.create(e.prototype)).constructor=n;var t=requireMinimal();function n(r){e.call(this,r)}return n._configure=function(){t.Buffer&&(n.prototype._slice=t.Buffer.prototype.slice)},n.prototype.string=function(){var i=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+i,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+i,this.len))},n._configure(),reader_buffer}var rpc={},service$1,hasRequiredService$1;function requireService$1(){if(hasRequiredService$1)return service$1;hasRequiredService$1=1,service$1=t;var e=requireMinimal();(t.prototype=Object.create(e.EventEmitter.prototype)).constructor=t;function t(n,r,i){if(typeof n!="function")throw TypeError("rpcImpl must be a function");e.EventEmitter.call(this),this.rpcImpl=n,this.requestDelimited=!!r,this.responseDelimited=!!i}return t.prototype.rpcCall=function n(r,i,a,o,u){if(!o)throw TypeError("request must be specified");var l=this;if(!u)return e.asPromise(n,l,r,i,a,o);if(!l.rpcImpl){setTimeout(function(){u(Error("already ended"))},0);return}try{return l.rpcImpl(r,i[l.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(p,d){if(p)return l.emit("error",p,r),u(p);if(d===null){l.end(!0);return}if(!(d instanceof a))try{d=a[l.responseDelimited?"decodeDelimited":"decode"](d)}catch(f){return l.emit("error",f,r),u(f)}return l.emit("data",d,r),u(null,d)})}catch(c){l.emit("error",c,r),setTimeout(function(){u(c)},0);return}},t.prototype.end=function(r){return this.rpcImpl&&(r||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},service$1}var hasRequiredRpc;function requireRpc(){return hasRequiredRpc||(hasRequiredRpc=1,function(e){var t=e;t.Service=requireService$1()}(rpc)),rpc}var roots,hasRequiredRoots;function requireRoots(){return hasRequiredRoots||(hasRequiredRoots=1,roots={}),roots}var hasRequiredIndexMinimal;function requireIndexMinimal(){return hasRequiredIndexMinimal||(hasRequiredIndexMinimal=1,function(e){var t=e;t.build="minimal",t.Writer=requireWriter(),t.BufferWriter=requireWriter_buffer(),t.Reader=requireReader(),t.BufferReader=requireReader_buffer(),t.util=requireMinimal(),t.rpc=requireRpc(),t.roots=requireRoots(),t.configure=n;function n(){t.util._configure(),t.Writer._configure(t.BufferWriter),t.Reader._configure(t.BufferReader)}n()}(indexMinimal)),indexMinimal}var types={},util={exports:{}},codegen_1,hasRequiredCodegen;function requireCodegen(){if(hasRequiredCodegen)return codegen_1;hasRequiredCodegen=1,codegen_1=e;function e(t,n){typeof t=="string"&&(n=t,t=void 0);var r=[];function i(o){if(typeof o!="string"){var u=a();if(e.verbose&&console.log("codegen: "+u),u="return "+u,o){for(var l=Object.keys(o),c=new Array(l.length+1),p=new Array(l.length),d=0;d<l.length;)c[d]=l[d],p[d]=o[l[d++]];return c[d]=u,Function.apply(null,c).apply(null,p)}return Function(u)()}for(var f=new Array(arguments.length-1),v=0;v<f.length;)f[v]=arguments[++v];if(v=0,o=o.replace(/%([%dfijs])/g,function(m,y){var g=f[v++];switch(y){case"d":case"f":return String(Number(g));case"i":return String(Math.floor(g));case"j":return JSON.stringify(g);case"s":return String(g)}return"%"}),v!==f.length)throw Error("parameter count mismatch");return r.push(o),i}function a(o){return"function "+(o||n||"")+"("+(t&&t.join(",")||"")+`){
12
+ `)},{immediate:!0})},useButton=(e,t)=>{useDeprecated({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},vue.computed(()=>e.type==="text"));const n=vue.inject(buttonGroupContextKey,void 0),r=useGlobalConfig("button"),{form:i}=useFormItem(),a=useFormSize(vue.computed(()=>n==null?void 0:n.size)),o=useFormDisabled(),u=vue.ref(),l=vue.useSlots(),c=vue.computed(()=>{var y;return e.type||(n==null?void 0:n.type)||((y=r.value)==null?void 0:y.type)||""}),p=vue.computed(()=>{var y,g,b;return(b=(g=e.autoInsertSpace)!=null?g:(y=r.value)==null?void 0:y.autoInsertSpace)!=null?b:!1}),d=vue.computed(()=>{var y,g,b;return(b=(g=e.plain)!=null?g:(y=r.value)==null?void 0:y.plain)!=null?b:!1}),f=vue.computed(()=>{var y,g,b;return(b=(g=e.round)!=null?g:(y=r.value)==null?void 0:y.round)!=null?b:!1}),v=vue.computed(()=>e.tag==="button"?{ariaDisabled:o.value||e.loading,disabled:o.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),h=vue.computed(()=>{var y;const g=(y=l.default)==null?void 0:y.call(l);if(p.value&&(g==null?void 0:g.length)===1){const b=g[0];if((b==null?void 0:b.type)===vue.Text){const _=b.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(_.trim())}}return!1});return{_disabled:o,_size:a,_type:c,_ref:u,_props:v,_plain:d,_round:f,shouldAddSpace:h,handleClick:y=>{if(o.value||e.loading){y.stopPropagation();return}e.nativeType==="reset"&&(i==null||i.resetFields()),t("click",y)}}},buttonTypes=["default","primary","success","warning","info","danger","text",""],buttonNativeTypes=["button","submit","reset"],buttonProps=buildProps({size:useSizeProp,disabled:Boolean,type:{type:String,values:buttonTypes,default:""},icon:{type:iconPropType},nativeType:{type:String,values:buttonNativeTypes,default:"button"},loading:Boolean,loadingIcon:{type:iconPropType,default:()=>loading_default},plain:{type:Boolean,default:void 0},text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:definePropType([String,Object]),default:"button"}}),buttonEmits={click:e=>e instanceof MouseEvent};function bound01(e,t){isOnePointZero(e)&&(e="100%");var n=isPercentage(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function clamp01(e){return Math.min(1,Math.max(0,e))}function isOnePointZero(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function isPercentage(e){return typeof e=="string"&&e.indexOf("%")!==-1}function boundAlpha(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function convertToPercentage(e){return e<=1?"".concat(Number(e)*100,"%"):e}function pad2(e){return e.length===1?"0"+e:String(e)}function rgbToRgb(e,t,n){return{r:bound01(e,255)*255,g:bound01(t,255)*255,b:bound01(n,255)*255}}function rgbToHsl(e,t,n){e=bound01(e,255),t=bound01(t,255),n=bound01(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a=0,o=0,u=(r+i)/2;if(r===i)o=0,a=0;else{var l=r-i;switch(o=u>.5?l/(2-r-i):l/(r+i),r){case e:a=(t-n)/l+(t<n?6:0);break;case t:a=(n-e)/l+2;break;case n:a=(e-t)/l+4;break}a/=6}return{h:a,s:o,l:u}}function hue2rgb(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hslToRgb(e,t,n){var r,i,a;if(e=bound01(e,360),t=bound01(t,100),n=bound01(n,100),t===0)i=n,a=n,r=n;else{var o=n<.5?n*(1+t):n+t-n*t,u=2*n-o;r=hue2rgb(u,o,e+1/3),i=hue2rgb(u,o,e),a=hue2rgb(u,o,e-1/3)}return{r:r*255,g:i*255,b:a*255}}function rgbToHsv(e,t,n){e=bound01(e,255),t=bound01(t,255),n=bound01(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),a=0,o=r,u=r-i,l=r===0?0:u/r;if(r===i)a=0;else{switch(r){case e:a=(t-n)/u+(t<n?6:0);break;case t:a=(n-e)/u+2;break;case n:a=(e-t)/u+4;break}a/=6}return{h:a,s:l,v:o}}function hsvToRgb(e,t,n){e=bound01(e,360)*6,t=bound01(t,100),n=bound01(n,100);var r=Math.floor(e),i=e-r,a=n*(1-t),o=n*(1-i*t),u=n*(1-(1-i)*t),l=r%6,c=[n,o,a,a,u,n][l],p=[u,n,n,o,a,a][l],d=[a,a,u,n,n,o][l];return{r:c*255,g:p*255,b:d*255}}function rgbToHex(e,t,n,r){var i=[pad2(Math.round(e).toString(16)),pad2(Math.round(t).toString(16)),pad2(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function rgbaToHex(e,t,n,r,i){var a=[pad2(Math.round(e).toString(16)),pad2(Math.round(t).toString(16)),pad2(Math.round(n).toString(16)),pad2(convertDecimalToHex(r))];return i&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function convertDecimalToHex(e){return Math.round(parseFloat(e)*255).toString(16)}function convertHexToDecimal(e){return parseIntFromHex(e)/255}function parseIntFromHex(e){return parseInt(e,16)}function numberInputToObject(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var names={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function inputToRGB(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,o=!1,u=!1;return typeof e=="string"&&(e=stringInputToObject(e)),typeof e=="object"&&(isValidCSSUnit(e.r)&&isValidCSSUnit(e.g)&&isValidCSSUnit(e.b)?(t=rgbToRgb(e.r,e.g,e.b),o=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):isValidCSSUnit(e.h)&&isValidCSSUnit(e.s)&&isValidCSSUnit(e.v)?(r=convertToPercentage(e.s),i=convertToPercentage(e.v),t=hsvToRgb(e.h,r,i),o=!0,u="hsv"):isValidCSSUnit(e.h)&&isValidCSSUnit(e.s)&&isValidCSSUnit(e.l)&&(r=convertToPercentage(e.s),a=convertToPercentage(e.l),t=hslToRgb(e.h,r,a),o=!0,u="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=boundAlpha(n),{ok:o,format:e.format||u,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var CSS_INTEGER="[-\\+]?\\d+%?",CSS_NUMBER="[-\\+]?\\d*\\.\\d+%?",CSS_UNIT="(?:".concat(CSS_NUMBER,")|(?:").concat(CSS_INTEGER,")"),PERMISSIVE_MATCH3="[\\s|\\(]+(".concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")\\s*\\)?"),PERMISSIVE_MATCH4="[\\s|\\(]+(".concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")\\s*\\)?"),matchers={CSS_UNIT:new RegExp(CSS_UNIT),rgb:new RegExp("rgb"+PERMISSIVE_MATCH3),rgba:new RegExp("rgba"+PERMISSIVE_MATCH4),hsl:new RegExp("hsl"+PERMISSIVE_MATCH3),hsla:new RegExp("hsla"+PERMISSIVE_MATCH4),hsv:new RegExp("hsv"+PERMISSIVE_MATCH3),hsva:new RegExp("hsva"+PERMISSIVE_MATCH4),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function stringInputToObject(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(names[e])e=names[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=matchers.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=matchers.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=matchers.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=matchers.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=matchers.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=matchers.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=matchers.hex8.exec(e),n?{r:parseIntFromHex(n[1]),g:parseIntFromHex(n[2]),b:parseIntFromHex(n[3]),a:convertHexToDecimal(n[4]),format:t?"name":"hex8"}:(n=matchers.hex6.exec(e),n?{r:parseIntFromHex(n[1]),g:parseIntFromHex(n[2]),b:parseIntFromHex(n[3]),format:t?"name":"hex"}:(n=matchers.hex4.exec(e),n?{r:parseIntFromHex(n[1]+n[1]),g:parseIntFromHex(n[2]+n[2]),b:parseIntFromHex(n[3]+n[3]),a:convertHexToDecimal(n[4]+n[4]),format:t?"name":"hex8"}:(n=matchers.hex3.exec(e),n?{r:parseIntFromHex(n[1]+n[1]),g:parseIntFromHex(n[2]+n[2]),b:parseIntFromHex(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function isValidCSSUnit(e){return!!matchers.CSS_UNIT.exec(String(e))}var TinyColor=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=numberInputToObject(t)),this.originalInput=t;var i=inputToRGB(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,a=t.r/255,o=t.g/255,u=t.b/255;return a<=.03928?n=a/12.92:n=Math.pow((a+.055)/1.055,2.4),o<=.03928?r=o/12.92:r=Math.pow((o+.055)/1.055,2.4),u<=.03928?i=u/12.92:i=Math.pow((u+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=boundAlpha(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=rgbToHsv(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=rgbToHsv(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=rgbToHsl(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=rgbToHsl(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),rgbToHex(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),rgbaToHex(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(bound01(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(bound01(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+rgbToHex(this.r,this.g,this.b,!1),n=0,r=Object.entries(names);n<r.length;n++){var i=r[n],a=i[0],o=i[1];if(t===o)return a}return!1},e.prototype.toString=function(t){var n=!!t;t=t??this.format;var r=!1,i=this.a<1&&this.a>=0,a=!n&&i&&(t.startsWith("hex")||t==="name");return a?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=clamp01(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=clamp01(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=clamp01(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=clamp01(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),a=n/100,o={r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a};return new e(o)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,a=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(new e(r));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,a=n.v,o=[],u=1/t;t--;)o.push(new e({h:r,s:i,v:a})),a=(a+u)%1;return o},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),i=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],a=360/t,o=1;o<t;o++)i.push(new e({h:(r+o*a)%360,s:n.s,l:n.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function darken(e,t=20){return e.mix("#141414",t).toString()}function useButtonCustomStyle(e){const t=useFormDisabled(),n=useNamespace("button");return vue.computed(()=>{let r={},i=e.color;if(i){const a=i.match(/var\((.*?)\)/);a&&(i=window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));const o=new TinyColor(i),u=e.dark?o.tint(20).toString():darken(o,20);if(e.plain)r=n.cssVarBlock({"bg-color":e.dark?darken(o,90):o.tint(90).toString(),"text-color":i,"border-color":e.dark?darken(o,50):o.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":i,"hover-border-color":i,"active-bg-color":u,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":u}),t.value&&(r[n.cssVarBlockName("disabled-bg-color")]=e.dark?darken(o,90):o.tint(90).toString(),r[n.cssVarBlockName("disabled-text-color")]=e.dark?darken(o,50):o.tint(50).toString(),r[n.cssVarBlockName("disabled-border-color")]=e.dark?darken(o,80):o.tint(80).toString());else{const l=e.dark?darken(o,30):o.tint(30).toString(),c=o.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(r=n.cssVarBlock({"bg-color":i,"text-color":c,"border-color":i,"hover-bg-color":l,"hover-text-color":c,"hover-border-color":l,"active-bg-color":u,"active-border-color":u}),t.value){const p=e.dark?darken(o,50):o.tint(50).toString();r[n.cssVarBlockName("disabled-bg-color")]=p,r[n.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,r[n.cssVarBlockName("disabled-border-color")]=p}}}return r})}const __default__$a=vue.defineComponent({name:"ElButton"}),_sfc_main$H=vue.defineComponent({...__default__$a,props:buttonProps,emits:buttonEmits,setup(e,{expose:t,emit:n}){const r=e,i=useButtonCustomStyle(r),a=useNamespace("button"),{_ref:o,_size:u,_type:l,_disabled:c,_props:p,_plain:d,_round:f,shouldAddSpace:v,handleClick:h}=useButton(r,n),m=vue.computed(()=>[a.b(),a.m(l.value),a.m(u.value),a.is("disabled",c.value),a.is("loading",r.loading),a.is("plain",d.value),a.is("round",f.value),a.is("circle",r.circle),a.is("text",r.text),a.is("link",r.link),a.is("has-bg",r.bg)]);return t({ref:o,size:u,type:l,disabled:c,shouldAddSpace:v}),(y,g)=>(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(y.tag),vue.mergeProps({ref_key:"_ref",ref:o},vue.unref(p),{class:vue.unref(m),style:vue.unref(i),onClick:vue.unref(h)}),{default:vue.withCtx(()=>[y.loading?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[y.$slots.loading?vue.renderSlot(y.$slots,"loading",{key:0}):(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:1,class:vue.normalizeClass(vue.unref(a).is("loading"))},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(y.loadingIcon)))]),_:1},8,["class"]))],64)):y.icon||y.$slots.icon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:1},{default:vue.withCtx(()=>[y.icon?(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(y.icon),{key:0})):vue.renderSlot(y.$slots,"icon",{key:1})]),_:3})):vue.createCommentVNode("v-if",!0),y.$slots.default?(vue.openBlock(),vue.createElementBlock("span",{key:2,class:vue.normalizeClass({[vue.unref(a).em("text","expand")]:vue.unref(v)})},[vue.renderSlot(y.$slots,"default")],2)):vue.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var Button=_export_sfc$1(_sfc_main$H,[["__file","button.vue"]]);const buttonGroupProps={size:buttonProps.size,type:buttonProps.type},__default__$9=vue.defineComponent({name:"ElButtonGroup"}),_sfc_main$G=vue.defineComponent({...__default__$9,props:buttonGroupProps,setup(e){const t=e;vue.provide(buttonGroupContextKey,vue.reactive({size:vue.toRef(t,"size"),type:vue.toRef(t,"type")}));const n=useNamespace("button");return(r,i)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(vue.unref(n).b("group"))},[vue.renderSlot(r.$slots,"default")],2))}});var ButtonGroup=_export_sfc$1(_sfc_main$G,[["__file","button-group.vue"]]);const ElButton=withInstall(Button,{ButtonGroup}),ElButtonGroup=withNoopInstall(ButtonGroup);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dayjs_min$1={exports:{}},dayjs_min=dayjs_min$1.exports,hasRequiredDayjs_min;function requireDayjs_min(){return hasRequiredDayjs_min||(hasRequiredDayjs_min=1,function(e,t){(function(n,r){e.exports=r()})(dayjs_min,function(){var n=1e3,r=6e4,i=36e5,a="millisecond",o="second",u="minute",l="hour",c="day",p="week",d="month",f="quarter",v="year",h="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(j){var O=["th","st","nd","rd"],F=j%100;return"["+j+(O[(F-20)%10]||O[F]||O[0])+"]"}},_=function(j,O,F){var Y=String(j);return!Y||Y.length>=O?j:""+Array(O+1-Y.length).join(F)+j},S={s:_,z:function(j){var O=-j.utcOffset(),F=Math.abs(O),Y=Math.floor(F/60),$=F%60;return(O<=0?"+":"-")+_(Y,2,"0")+":"+_($,2,"0")},m:function j(O,F){if(O.date()<F.date())return-j(F,O);var Y=12*(F.year()-O.year())+(F.month()-O.month()),$=O.clone().add(Y,d),V=F-$<0,ie=O.clone().add(Y+(V?-1:1),d);return+(-(Y+(F-$)/(V?$-ie:ie-$))||0)},a:function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},p:function(j){return{M:d,y:v,w:p,d:c,D:h,h:l,m:u,s:o,ms:a,Q:f}[j]||String(j||"").toLowerCase().replace(/s$/,"")},u:function(j){return j===void 0}},T="en",w={};w[T]=b;var x="$isDayjsObject",L=function(j){return j instanceof ue||!(!j||!j[x])},M=function j(O,F,Y){var $;if(!O)return T;if(typeof O=="string"){var V=O.toLowerCase();w[V]&&($=V),F&&(w[V]=F,$=V);var ie=O.split("-");if(!$&&ie.length>1)return j(ie[0])}else{var re=O.name;w[re]=O,$=re}return!Y&&$&&(T=$),$||!Y&&T},z=function(j,O){if(L(j))return j.clone();var F=typeof O=="object"?O:{};return F.date=j,F.args=arguments,new ue(F)},A=S;A.l=M,A.i=L,A.w=function(j,O){return z(j,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var ue=function(){function j(F){this.$L=M(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[x]=!0}var O=j.prototype;return O.parse=function(F){this.$d=function(Y){var $=Y.date,V=Y.utc;if($===null)return new Date(NaN);if(A.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var ie=$.match(y);if(ie){var re=ie[2]-1||0,ae=(ie[7]||"0").substring(0,3);return V?new Date(Date.UTC(ie[1],re,ie[3]||1,ie[4]||0,ie[5]||0,ie[6]||0,ae)):new Date(ie[1],re,ie[3]||1,ie[4]||0,ie[5]||0,ie[6]||0,ae)}}return new Date($)}(F),this.init()},O.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},O.$utils=function(){return A},O.isValid=function(){return this.$d.toString()!==m},O.isSame=function(F,Y){var $=z(F);return this.startOf(Y)<=$&&$<=this.endOf(Y)},O.isAfter=function(F,Y){return z(F)<this.startOf(Y)},O.isBefore=function(F,Y){return this.endOf(Y)<z(F)},O.$g=function(F,Y,$){return A.u(F)?this[Y]:this.set($,F)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(F,Y){var $=this,V=!!A.u(Y)||Y,ie=A.p(F),re=function(At,Dt){var Lt=A.w($.$u?Date.UTC($.$y,Dt,At):new Date($.$y,Dt,At),$);return V?Lt:Lt.endOf(c)},ae=function(At,Dt){return A.w($.toDate()[At].apply($.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(Dt)),$)},le=this.$W,_e=this.$M,Oe=this.$D,Ce="set"+(this.$u?"UTC":"");switch(ie){case v:return V?re(1,0):re(31,11);case d:return V?re(1,_e):re(0,_e+1);case p:var xe=this.$locale().weekStart||0,Fe=(le<xe?le+7:le)-xe;return re(V?Oe-Fe:Oe+(6-Fe),_e);case c:case h:return ae(Ce+"Hours",0);case l:return ae(Ce+"Minutes",1);case u:return ae(Ce+"Seconds",2);case o:return ae(Ce+"Milliseconds",3);default:return this.clone()}},O.endOf=function(F){return this.startOf(F,!1)},O.$set=function(F,Y){var $,V=A.p(F),ie="set"+(this.$u?"UTC":""),re=($={},$[c]=ie+"Date",$[h]=ie+"Date",$[d]=ie+"Month",$[v]=ie+"FullYear",$[l]=ie+"Hours",$[u]=ie+"Minutes",$[o]=ie+"Seconds",$[a]=ie+"Milliseconds",$)[V],ae=V===c?this.$D+(Y-this.$W):Y;if(V===d||V===v){var le=this.clone().set(h,1);le.$d[re](ae),le.init(),this.$d=le.set(h,Math.min(this.$D,le.daysInMonth())).$d}else re&&this.$d[re](ae);return this.init(),this},O.set=function(F,Y){return this.clone().$set(F,Y)},O.get=function(F){return this[A.p(F)]()},O.add=function(F,Y){var $,V=this;F=Number(F);var ie=A.p(Y),re=function(_e){var Oe=z(V);return A.w(Oe.date(Oe.date()+Math.round(_e*F)),V)};if(ie===d)return this.set(d,this.$M+F);if(ie===v)return this.set(v,this.$y+F);if(ie===c)return re(1);if(ie===p)return re(7);var ae=($={},$[u]=r,$[l]=i,$[o]=n,$)[ie]||1,le=this.$d.getTime()+F*ae;return A.w(le,this)},O.subtract=function(F,Y){return this.add(-1*F,Y)},O.format=function(F){var Y=this,$=this.$locale();if(!this.isValid())return $.invalidDate||m;var V=F||"YYYY-MM-DDTHH:mm:ssZ",ie=A.z(this),re=this.$H,ae=this.$m,le=this.$M,_e=$.weekdays,Oe=$.months,Ce=$.meridiem,xe=function(Dt,Lt,_n,Cn){return Dt&&(Dt[Lt]||Dt(Y,V))||_n[Lt].slice(0,Cn)},Fe=function(Dt){return A.s(re%12||12,Dt,"0")},At=Ce||function(Dt,Lt,_n){var Cn=Dt<12?"AM":"PM";return _n?Cn.toLowerCase():Cn};return V.replace(g,function(Dt,Lt){return Lt||function(_n){switch(_n){case"YY":return String(Y.$y).slice(-2);case"YYYY":return A.s(Y.$y,4,"0");case"M":return le+1;case"MM":return A.s(le+1,2,"0");case"MMM":return xe($.monthsShort,le,Oe,3);case"MMMM":return xe(Oe,le);case"D":return Y.$D;case"DD":return A.s(Y.$D,2,"0");case"d":return String(Y.$W);case"dd":return xe($.weekdaysMin,Y.$W,_e,2);case"ddd":return xe($.weekdaysShort,Y.$W,_e,3);case"dddd":return _e[Y.$W];case"H":return String(re);case"HH":return A.s(re,2,"0");case"h":return Fe(1);case"hh":return Fe(2);case"a":return At(re,ae,!0);case"A":return At(re,ae,!1);case"m":return String(ae);case"mm":return A.s(ae,2,"0");case"s":return String(Y.$s);case"ss":return A.s(Y.$s,2,"0");case"SSS":return A.s(Y.$ms,3,"0");case"Z":return ie}return null}(Dt)||ie.replace(":","")})},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(F,Y,$){var V,ie=this,re=A.p(Y),ae=z(F),le=(ae.utcOffset()-this.utcOffset())*r,_e=this-ae,Oe=function(){return A.m(ie,ae)};switch(re){case v:V=Oe()/12;break;case d:V=Oe();break;case f:V=Oe()/3;break;case p:V=(_e-le)/6048e5;break;case c:V=(_e-le)/864e5;break;case l:V=_e/i;break;case u:V=_e/r;break;case o:V=_e/n;break;default:V=_e}return $?V:A.a(V)},O.daysInMonth=function(){return this.endOf(d).$D},O.$locale=function(){return w[this.$L]},O.locale=function(F,Y){if(!F)return this.$L;var $=this.clone(),V=M(F,Y,!0);return V&&($.$L=V),$},O.clone=function(){return A.w(this.$d,this)},O.toDate=function(){return new Date(this.valueOf())},O.toJSON=function(){return this.isValid()?this.toISOString():null},O.toISOString=function(){return this.$d.toISOString()},O.toString=function(){return this.$d.toUTCString()},j}(),he=ue.prototype;return z.prototype=he,[["$ms",a],["$s",o],["$m",u],["$H",l],["$W",c],["$M",d],["$y",v],["$D",h]].forEach(function(j){he[j[1]]=function(O){return this.$g(O,j[0],j[1])}}),z.extend=function(j,O){return j.$i||(j(O,ue,z),j.$i=!0),z},z.locale=M,z.isDayjs=L,z.unix=function(j){return z(1e3*j)},z.en=w[T],z.Ls=w,z.p={},z})}(dayjs_min$1)),dayjs_min$1.exports}var dayjs_minExports=requireDayjs_min();const dayjs=getDefaultExportFromCjs(dayjs_minExports),buildTimeList=(e,t)=>[e>0?e-1:void 0,e,e<t?e+1:void 0],rangeArr=e=>Array.from(Array.from({length:e}).keys()),extractDateFormat=e=>e.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),extractTimeFormat=e=>e.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),dateEquals=function(e,t){const n=isDate(e),r=isDate(t);return n&&r?e.getTime()===t.getTime():!n&&!r?e===t:!1},valueEquals=function(e,t){const n=isArray$1(e),r=isArray$1(t);return n&&r?e.length!==t.length?!1:e.every((i,a)=>dateEquals(i,t[a])):!n&&!r?dateEquals(e,t):!1},parseDate=function(e,t,n){const r=isEmpty$1(t)||t==="x"?dayjs(e).locale(n):dayjs(e,t).locale(n);return r.isValid()?r:void 0},formatter=function(e,t,n){return isEmpty$1(t)?e:t==="x"?+e:dayjs(e).locale(n).format(t)},makeList=(e,t)=>{var n;const r=[],i=t==null?void 0:t();for(let a=0;a<e;a++)r.push((n=i==null?void 0:i.includes(a))!=null?n:!1);return r},dayOrDaysToDate=e=>isArray$1(e)?e.map(t=>t.toDate()):e.toDate();var localeData$2={exports:{}},localeData$1=localeData$2.exports,hasRequiredLocaleData;function requireLocaleData(){return hasRequiredLocaleData||(hasRequiredLocaleData=1,function(e,t){(function(n,r){e.exports=r()})(localeData$1,function(){return function(n,r,i){var a=r.prototype,o=function(d){return d&&(d.indexOf?d:d.s)},u=function(d,f,v,h,m){var y=d.name?d:d.$locale(),g=o(y[f]),b=o(y[v]),_=g||b.map(function(T){return T.slice(0,h)});if(!m)return _;var S=y.weekStart;return _.map(function(T,w){return _[(w+(S||0))%7]})},l=function(){return i.Ls[i.locale()]},c=function(d,f){return d.formats[f]||function(v){return v.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(h,m,y){return m||y.slice(1)})}(d.formats[f.toUpperCase()])},p=function(){var d=this;return{months:function(f){return f?f.format("MMMM"):u(d,"months")},monthsShort:function(f){return f?f.format("MMM"):u(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(f){return f?f.format("dddd"):u(d,"weekdays")},weekdaysMin:function(f){return f?f.format("dd"):u(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(f){return f?f.format("ddd"):u(d,"weekdaysShort","weekdays",3)},longDateFormat:function(f){return c(d.$locale(),f)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};a.localeData=function(){return p.bind(this)()},i.localeData=function(){var d=l();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(f){return c(d,f)},meridiem:d.meridiem,ordinal:d.ordinal}},i.months=function(){return u(l(),"months")},i.monthsShort=function(){return u(l(),"monthsShort","months",3)},i.weekdays=function(d){return u(l(),"weekdays",null,null,d)},i.weekdaysShort=function(d){return u(l(),"weekdaysShort","weekdays",3,d)},i.weekdaysMin=function(d){return u(l(),"weekdaysMin","weekdays",2,d)}}})}(localeData$2)),localeData$2.exports}var localeDataExports=requireLocaleData();const localeData=getDefaultExportFromCjs(localeDataExports),datePickTypes=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"];var PatchFlags=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(PatchFlags||{});const flattedChildren=e=>{const t=isArray$1(e)?e:[e],n=[];return t.forEach(r=>{var i;isArray$1(r)?n.push(...flattedChildren(r)):vue.isVNode(r)&&((i=r.component)!=null&&i.subTree)?n.push(r,...flattedChildren(r.component.subTree)):vue.isVNode(r)&&isArray$1(r.children)?n.push(...flattedChildren(r.children)):vue.isVNode(r)&&r.shapeFlag===2?n.push(...flattedChildren(r.type())):n.push(r)}),n},escapeStringRegexp=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),castArray=e=>!e&&e!==0?[]:isArray$1(e)?e:[e],tagProps=buildProps({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:componentSizes},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),tagEmits={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},__default__$8=vue.defineComponent({name:"ElTag"}),_sfc_main$F=vue.defineComponent({...__default__$8,props:tagProps,emits:tagEmits,setup(e,{emit:t}){const n=e,r=useFormSize(),i=useNamespace("tag"),a=vue.computed(()=>{const{type:c,hit:p,effect:d,closable:f,round:v}=n;return[i.b(),i.is("closable",f),i.m(c||"primary"),i.m(r.value),i.m(d),i.is("hit",p),i.is("round",v)]}),o=c=>{t("close",c)},u=c=>{t("click",c)},l=c=>{var p,d,f;(f=(d=(p=c==null?void 0:c.component)==null?void 0:p.subTree)==null?void 0:d.component)!=null&&f.bum&&(c.component.subTree.component.bum=null)};return(c,p)=>c.disableTransitions?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:vue.normalizeClass(vue.unref(a)),style:vue.normalizeStyle({backgroundColor:c.color}),onClick:u},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(i).e("content"))},[vue.renderSlot(c.$slots,"default")],2),c.closable?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(vue.unref(i).e("close")),onClick:vue.withModifiers(o,["stop"])},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(close_default))]),_:1},8,["class","onClick"])):vue.createCommentVNode("v-if",!0)],6)):(vue.openBlock(),vue.createBlock(vue.Transition,{key:1,name:`${vue.unref(i).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:l},{default:vue.withCtx(()=>[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(a)),style:vue.normalizeStyle({backgroundColor:c.color}),onClick:u},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(i).e("content"))},[vue.renderSlot(c.$slots,"default")],2),c.closable?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(vue.unref(i).e("close")),onClick:vue.withModifiers(o,["stop"])},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(close_default))]),_:1},8,["class","onClick"])):vue.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var Tag=_export_sfc$1(_sfc_main$F,[["__file","tag.vue"]]);const ElTag=withInstall(Tag),nodeList=new Map;if(isClient){let e;document.addEventListener("mousedown",t=>e=t),document.addEventListener("mouseup",t=>{if(e){for(const n of nodeList.values())for(const{documentHandler:r}of n)r(t,e);e=void 0}})}function createDocumentHandler(e,t){let n=[];return isArray$1(t.arg)?n=t.arg:isElement(t.arg)&&n.push(t.arg),function(r,i){const a=t.instance.popperRef,o=r.target,u=i==null?void 0:i.target,l=!t||!t.instance,c=!o||!u,p=e.contains(o)||e.contains(u),d=e===o,f=n.length&&n.some(h=>h==null?void 0:h.contains(o))||n.length&&n.includes(u),v=a&&(a.contains(o)||a.contains(u));l||c||p||d||f||v||t.value(r,i)}}const ClickOutside={beforeMount(e,t){nodeList.has(e)||nodeList.set(e,[]),nodeList.get(e).push({documentHandler:createDocumentHandler(e,t),bindingFn:t.value})},updated(e,t){nodeList.has(e)||nodeList.set(e,[]);const n=nodeList.get(e),r=n.findIndex(a=>a.bindingFn===t.oldValue),i={documentHandler:createDocumentHandler(e,t),bindingFn:t.value};r>=0?n.splice(r,1,i):n.push(i)},unmounted(e){nodeList.delete(e)}};var customParseFormat$2={exports:{}},customParseFormat$1=customParseFormat$2.exports,hasRequiredCustomParseFormat;function requireCustomParseFormat(){return hasRequiredCustomParseFormat||(hasRequiredCustomParseFormat=1,function(e,t){(function(n,r){e.exports=r()})(customParseFormat$1,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,a=/\d\d/,o=/\d\d?/,u=/\d*[^-_:/,()\s\d]+/,l={},c=function(y){return(y=+y)+(y>68?1900:2e3)},p=function(y){return function(g){this[y]=+g}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=function(g){if(!g||g==="Z")return 0;var b=g.match(/([+-]|\d\d)/g),_=60*b[1]+(+b[2]||0);return _===0?0:b[0]==="+"?-_:_}(y)}],f=function(y){var g=l[y];return g&&(g.indexOf?g:g.s.concat(g.f))},v=function(y,g){var b,_=l.meridiem;if(_){for(var S=1;S<=24;S+=1)if(y.indexOf(_(S,0,g))>-1){b=S>12;break}}else b=y===(g?"pm":"PM");return b},h={A:[u,function(y){this.afternoon=v(y,!1)}],a:[u,function(y){this.afternoon=v(y,!0)}],Q:[i,function(y){this.month=3*(y-1)+1}],S:[i,function(y){this.milliseconds=100*+y}],SS:[a,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[o,p("seconds")],ss:[o,p("seconds")],m:[o,p("minutes")],mm:[o,p("minutes")],H:[o,p("hours")],h:[o,p("hours")],HH:[o,p("hours")],hh:[o,p("hours")],D:[o,p("day")],DD:[a,p("day")],Do:[u,function(y){var g=l.ordinal,b=y.match(/\d+/);if(this.day=b[0],g)for(var _=1;_<=31;_+=1)g(_).replace(/\[|\]/g,"")===y&&(this.day=_)}],w:[o,p("week")],ww:[a,p("week")],M:[o,p("month")],MM:[a,p("month")],MMM:[u,function(y){var g=f("months"),b=(f("monthsShort")||g.map(function(_){return _.slice(0,3)})).indexOf(y)+1;if(b<1)throw new Error;this.month=b%12||b}],MMMM:[u,function(y){var g=f("months").indexOf(y)+1;if(g<1)throw new Error;this.month=g%12||g}],Y:[/[+-]?\d+/,p("year")],YY:[a,function(y){this.year=c(y)}],YYYY:[/\d{4}/,p("year")],Z:d,ZZ:d};function m(y){var g,b;g=y,b=l&&l.formats;for(var _=(y=g.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(z,A,ue){var he=ue&&ue.toUpperCase();return A||b[ue]||n[ue]||b[he].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(j,O,F){return O||F.slice(1)})})).match(r),S=_.length,T=0;T<S;T+=1){var w=_[T],x=h[w],L=x&&x[0],M=x&&x[1];_[T]=M?{regex:L,parser:M}:w.replace(/^\[|\]$/g,"")}return function(z){for(var A={},ue=0,he=0;ue<S;ue+=1){var j=_[ue];if(typeof j=="string")he+=j.length;else{var O=j.regex,F=j.parser,Y=z.slice(he),$=O.exec(Y)[0];F.call(A,$),z=z.replace($,"")}}return function(V){var ie=V.afternoon;if(ie!==void 0){var re=V.hours;ie?re<12&&(V.hours+=12):re===12&&(V.hours=0),delete V.afternoon}}(A),A}}return function(y,g,b){b.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(c=y.parseTwoDigitYear);var _=g.prototype,S=_.parse;_.parse=function(T){var w=T.date,x=T.utc,L=T.args;this.$u=x;var M=L[1];if(typeof M=="string"){var z=L[2]===!0,A=L[3]===!0,ue=z||A,he=L[2];A&&(he=L[2]),l=this.$locale(),!z&&he&&(l=b.Ls[he]),this.$d=function(Y,$,V,ie){try{if(["x","X"].indexOf($)>-1)return new Date(($==="X"?1e3:1)*Y);var re=m($)(Y),ae=re.year,le=re.month,_e=re.day,Oe=re.hours,Ce=re.minutes,xe=re.seconds,Fe=re.milliseconds,At=re.zone,Dt=re.week,Lt=new Date,_n=_e||(ae||le?1:Lt.getDate()),Cn=ae||Lt.getFullYear(),An=0;ae&&!le||(An=le>0?le-1:Lt.getMonth());var Tn,Sn=Oe||0,bn=Ce||0,wn=xe||0,Ue=Fe||0;return At?new Date(Date.UTC(Cn,An,_n,Sn,bn,wn,Ue+60*At.offset*1e3)):V?new Date(Date.UTC(Cn,An,_n,Sn,bn,wn,Ue)):(Tn=new Date(Cn,An,_n,Sn,bn,wn,Ue),Dt&&(Tn=ie(Tn).week(Dt).toDate()),Tn)}catch{return new Date("")}}(w,M,x,b),this.init(),he&&he!==!0&&(this.$L=this.locale(he).$L),ue&&w!=this.format(M)&&(this.$d=new Date("")),l={}}else if(M instanceof Array)for(var j=M.length,O=1;O<=j;O+=1){L[1]=M[O-1];var F=b.apply(this,L);if(F.isValid()){this.$d=F.$d,this.$L=F.$L,this.init();break}O===j&&(this.$d=new Date(""))}else S.call(this,T)}}})}(customParseFormat$2)),customParseFormat$2.exports}var customParseFormatExports=requireCustomParseFormat();const customParseFormat=getDefaultExportFromCjs(customParseFormatExports);var advancedFormat$2={exports:{}},advancedFormat$1=advancedFormat$2.exports,hasRequiredAdvancedFormat;function requireAdvancedFormat(){return hasRequiredAdvancedFormat||(hasRequiredAdvancedFormat=1,function(e,t){(function(n,r){e.exports=r()})(advancedFormat$1,function(){return function(n,r){var i=r.prototype,a=i.format;i.format=function(o){var u=this,l=this.$locale();if(!this.isValid())return a.bind(this)(o);var c=this.$utils(),p=(o||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(d){switch(d){case"Q":return Math.ceil((u.$M+1)/3);case"Do":return l.ordinal(u.$D);case"gggg":return u.weekYear();case"GGGG":return u.isoWeekYear();case"wo":return l.ordinal(u.week(),"W");case"w":case"ww":return c.s(u.week(),d==="w"?1:2,"0");case"W":case"WW":return c.s(u.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return c.s(String(u.$H===0?24:u.$H),d==="k"?1:2,"0");case"X":return Math.floor(u.$d.getTime()/1e3);case"x":return u.$d.getTime();case"z":return"["+u.offsetName()+"]";case"zzz":return"["+u.offsetName("long")+"]";default:return d}});return a.bind(this)(p)}}})}(advancedFormat$2)),advancedFormat$2.exports}var advancedFormatExports=requireAdvancedFormat();const advancedFormat=getDefaultExportFromCjs(advancedFormatExports);var weekOfYear$2={exports:{}},weekOfYear$1=weekOfYear$2.exports,hasRequiredWeekOfYear;function requireWeekOfYear(){return hasRequiredWeekOfYear||(hasRequiredWeekOfYear=1,function(e,t){(function(n,r){e.exports=r()})(weekOfYear$1,function(){var n="week",r="year";return function(i,a,o){var u=a.prototype;u.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var p=o(this).startOf(r).add(1,r).date(c),d=o(this).endOf(n);if(p.isBefore(d))return 1}var f=o(this).startOf(r).date(c).startOf(n).subtract(1,"millisecond"),v=this.diff(f,n,!0);return v<0?o(this).startOf("week").week():Math.ceil(v)},u.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})}(weekOfYear$2)),weekOfYear$2.exports}var weekOfYearExports=requireWeekOfYear();const weekOfYear=getDefaultExportFromCjs(weekOfYearExports);var weekYear$2={exports:{}},weekYear$1=weekYear$2.exports,hasRequiredWeekYear;function requireWeekYear(){return hasRequiredWeekYear||(hasRequiredWeekYear=1,function(e,t){(function(n,r){e.exports=r()})(weekYear$1,function(){return function(n,r){r.prototype.weekYear=function(){var i=this.month(),a=this.week(),o=this.year();return a===1&&i===11?o+1:i===0&&a>=52?o-1:o}}})}(weekYear$2)),weekYear$2.exports}var weekYearExports=requireWeekYear();const weekYear=getDefaultExportFromCjs(weekYearExports);var dayOfYear$2={exports:{}},dayOfYear$1=dayOfYear$2.exports,hasRequiredDayOfYear;function requireDayOfYear(){return hasRequiredDayOfYear||(hasRequiredDayOfYear=1,function(e,t){(function(n,r){e.exports=r()})(dayOfYear$1,function(){return function(n,r,i){r.prototype.dayOfYear=function(a){var o=Math.round((i(this).startOf("day")-i(this).startOf("year"))/864e5)+1;return a==null?o:this.add(a-o,"day")}}})}(dayOfYear$2)),dayOfYear$2.exports}var dayOfYearExports=requireDayOfYear();const dayOfYear=getDefaultExportFromCjs(dayOfYearExports);var isSameOrAfter$2={exports:{}},isSameOrAfter$1=isSameOrAfter$2.exports,hasRequiredIsSameOrAfter;function requireIsSameOrAfter(){return hasRequiredIsSameOrAfter||(hasRequiredIsSameOrAfter=1,function(e,t){(function(n,r){e.exports=r()})(isSameOrAfter$1,function(){return function(n,r){r.prototype.isSameOrAfter=function(i,a){return this.isSame(i,a)||this.isAfter(i,a)}}})}(isSameOrAfter$2)),isSameOrAfter$2.exports}var isSameOrAfterExports=requireIsSameOrAfter();const isSameOrAfter=getDefaultExportFromCjs(isSameOrAfterExports);var isSameOrBefore$2={exports:{}},isSameOrBefore$1=isSameOrBefore$2.exports,hasRequiredIsSameOrBefore;function requireIsSameOrBefore(){return hasRequiredIsSameOrBefore||(hasRequiredIsSameOrBefore=1,function(e,t){(function(n,r){e.exports=r()})(isSameOrBefore$1,function(){return function(n,r){r.prototype.isSameOrBefore=function(i,a){return this.isSame(i,a)||this.isBefore(i,a)}}})}(isSameOrBefore$2)),isSameOrBefore$2.exports}var isSameOrBeforeExports=requireIsSameOrBefore();const isSameOrBefore=getDefaultExportFromCjs(isSameOrBeforeExports),timeUnits=["hours","minutes","seconds"],PICKER_BASE_INJECTION_KEY="EP_PICKER_BASE",PICKER_POPPER_OPTIONS_INJECTION_KEY="ElPopperOptions",DEFAULT_FORMATS_TIME="HH:mm:ss",DEFAULT_FORMATS_DATE="YYYY-MM-DD",DEFAULT_FORMATS_DATEPICKER={date:DEFAULT_FORMATS_DATE,dates:DEFAULT_FORMATS_DATE,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:DEFAULT_FORMATS_DATE,datetimerange:`${DEFAULT_FORMATS_DATE} ${DEFAULT_FORMATS_TIME}`},disabledTimeListsProps=buildProps({disabledHours:{type:definePropType(Function)},disabledMinutes:{type:definePropType(Function)},disabledSeconds:{type:definePropType(Function)}}),timePanelSharedProps=buildProps({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),timePickerDefaultProps=buildProps({id:{type:definePropType([Array,String])},name:{type:definePropType([Array,String])},popperClass:{type:String,default:""},format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:definePropType([String,Object]),default:circle_close_default},editable:{type:Boolean,default:!0},prefixIcon:{type:definePropType([String,Object]),default:""},size:useSizeProp,readonly:Boolean,disabled:Boolean,placeholder:{type:String,default:""},popperOptions:{type:definePropType(Object),default:()=>({})},modelValue:{type:definePropType([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:definePropType([Date,Array])},defaultTime:{type:definePropType([Date,Array])},isRange:Boolean,...disabledTimeListsProps,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:definePropType([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,placement:{type:definePropType(String),values:Ee,default:"bottom"},fallbackPlacements:{type:definePropType(Array),default:["bottom","top","right","left"]},...useEmptyValuesProps,...useAriaProps(["ariaLabel"]),showNow:{type:Boolean,default:!0}}),timePickerRangeTriggerProps=buildProps({id:{type:definePropType(Array)},name:{type:definePropType(Array)},modelValue:{type:definePropType([Array,String])},startPlaceholder:String,endPlaceholder:String,disabled:Boolean}),__default__$7=vue.defineComponent({name:"PickerRangeTrigger",inheritAttrs:!1}),_sfc_main$E=vue.defineComponent({...__default__$7,props:timePickerRangeTriggerProps,emits:["mouseenter","mouseleave","click","touchstart","focus","blur","startInput","endInput","startChange","endChange"],setup(e,{expose:t,emit:n}){const r=useAttrs(),i=useNamespace("date"),a=useNamespace("range"),o=vue.ref(),u=vue.ref(),{wrapperRef:l,isFocused:c}=useFocusController(o),p=S=>{n("click",S)},d=S=>{n("mouseenter",S)},f=S=>{n("mouseleave",S)},v=S=>{n("mouseenter",S)},h=S=>{n("startInput",S)},m=S=>{n("endInput",S)},y=S=>{n("startChange",S)},g=S=>{n("endChange",S)};return t({focus:()=>{var S;(S=o.value)==null||S.focus()},blur:()=>{var S,T;(S=o.value)==null||S.blur(),(T=u.value)==null||T.blur()}}),(S,T)=>(vue.openBlock(),vue.createElementBlock("div",{ref_key:"wrapperRef",ref:l,class:vue.normalizeClass([vue.unref(i).is("active",vue.unref(c)),S.$attrs.class]),style:vue.normalizeStyle(S.$attrs.style),onClick:p,onMouseenter:d,onMouseleave:f,onTouchstartPassive:v},[vue.renderSlot(S.$slots,"prefix"),vue.createElementVNode("input",vue.mergeProps(vue.unref(r),{id:S.id&&S.id[0],ref_key:"inputRef",ref:o,name:S.name&&S.name[0],placeholder:S.startPlaceholder,value:S.modelValue&&S.modelValue[0],class:vue.unref(a).b("input"),disabled:S.disabled,onInput:h,onChange:y}),null,16,["id","name","placeholder","value","disabled"]),vue.renderSlot(S.$slots,"range-separator"),vue.createElementVNode("input",vue.mergeProps(vue.unref(r),{id:S.id&&S.id[1],ref_key:"endInputRef",ref:u,name:S.name&&S.name[1],placeholder:S.endPlaceholder,value:S.modelValue&&S.modelValue[1],class:vue.unref(a).b("input"),disabled:S.disabled,onInput:m,onChange:g}),null,16,["id","name","placeholder","value","disabled"]),vue.renderSlot(S.$slots,"suffix")],38))}});var PickerRangeTrigger=_export_sfc$1(_sfc_main$E,[["__file","picker-range-trigger.vue"]]);const __default__$6=vue.defineComponent({name:"Picker"}),_sfc_main$D=vue.defineComponent({...__default__$6,props:timePickerDefaultProps,emits:[UPDATE_MODEL_EVENT,CHANGE_EVENT,"focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(e,{expose:t,emit:n}){const r=e,i=vue.useAttrs(),{lang:a}=useLocale(),o=useNamespace("date"),u=useNamespace("input"),l=useNamespace("range"),{form:c,formItem:p}=useFormItem(),d=vue.inject(PICKER_POPPER_OPTIONS_INJECTION_KEY,{}),{valueOnClear:f}=useEmptyValues(r,null),v=vue.ref(),h=vue.ref(),m=vue.ref(!1),y=vue.ref(!1),g=vue.ref(null);let b=!1;const{isFocused:_,handleFocus:S,handleBlur:T}=useFocusController(h,{beforeFocus(){return r.readonly||V.value},afterFocus(){m.value=!0},beforeBlur(k){var pe;return!b&&((pe=v.value)==null?void 0:pe.isFocusInsideContent(k))},afterBlur(){En(),m.value=!1,b=!1,r.validateEvent&&(p==null||p.validate("blur").catch(k=>debugWarn(k)))}}),w=vue.computed(()=>[o.b("editor"),o.bm("editor",r.type),u.e("wrapper"),o.is("disabled",V.value),o.is("active",m.value),l.b("editor"),Sn?l.bm("editor",Sn.value):"",i.class]),x=vue.computed(()=>[u.e("icon"),l.e("close-icon"),Fe.value?"":l.e("close-icon--hidden")]);vue.watch(m,k=>{k?vue.nextTick(()=>{k&&(g.value=r.modelValue)}):(Ue.value=null,vue.nextTick(()=>{L(r.modelValue)}))});const L=(k,pe)=>{(pe||!valueEquals(k,g.value))&&(n(CHANGE_EVENT,k),pe&&(g.value=k),r.validateEvent&&(p==null||p.validate("change").catch(Ne=>debugWarn(Ne))))},M=k=>{if(!valueEquals(r.modelValue,k)){let pe;isArray$1(k)?pe=k.map(Ne=>formatter(Ne,r.valueFormat,a.value)):k&&(pe=formatter(k,r.valueFormat,a.value)),n(UPDATE_MODEL_EVENT,k&&pe,a.value)}},z=k=>{n("keydown",k)},A=vue.computed(()=>h.value?Array.from(h.value.$el.querySelectorAll("input")):[]),ue=(k,pe,Ne)=>{const ze=A.value;ze.length&&(!Ne||Ne==="min"?(ze[0].setSelectionRange(k,pe),ze[0].focus()):Ne==="max"&&(ze[1].setSelectionRange(k,pe),ze[1].focus()))},he=(k="",pe=!1)=>{m.value=pe;let Ne;isArray$1(k)?Ne=k.map(ze=>ze.toDate()):Ne=k&&k.toDate(),Ue.value=null,M(Ne)},j=()=>{y.value=!0},O=()=>{n("visible-change",!0)},F=()=>{y.value=!1,m.value=!1,n("visible-change",!1)},Y=()=>{m.value=!0},$=()=>{m.value=!1},V=vue.computed(()=>r.disabled||(c==null?void 0:c.disabled)),ie=vue.computed(()=>{let k;if(Dt.value?hn.value.getDefaultValue&&(k=hn.value.getDefaultValue()):isArray$1(r.modelValue)?k=r.modelValue.map(pe=>parseDate(pe,r.valueFormat,a.value)):k=parseDate(r.modelValue,r.valueFormat,a.value),hn.value.getRangeAvailableTime){const pe=hn.value.getRangeAvailableTime(k);isEqual(pe,k)||(k=pe,Dt.value||M(dayOrDaysToDate(k)))}return isArray$1(k)&&k.some(pe=>!pe)&&(k=[]),k}),re=vue.computed(()=>{if(!hn.value.panelReady)return"";const k=Mn(ie.value);return isArray$1(Ue.value)?[Ue.value[0]||k&&k[0]||"",Ue.value[1]||k&&k[1]||""]:Ue.value!==null?Ue.value:!le.value&&Dt.value||!m.value&&Dt.value?"":k?_e.value||Oe.value||Ce.value?k.join(", "):k:""}),ae=vue.computed(()=>r.type.includes("time")),le=vue.computed(()=>r.type.startsWith("time")),_e=vue.computed(()=>r.type==="dates"),Oe=vue.computed(()=>r.type==="months"),Ce=vue.computed(()=>r.type==="years"),xe=vue.computed(()=>r.prefixIcon||(ae.value?clock_default:calendar_default)),Fe=vue.ref(!1),At=k=>{r.readonly||V.value||(Fe.value&&(k.stopPropagation(),hn.value.handleClear?hn.value.handleClear():M(f.value),L(f.value,!0),Fe.value=!1,F()),n("clear"))},Dt=vue.computed(()=>{const{modelValue:k}=r;return!k||isArray$1(k)&&!k.filter(Boolean).length}),Lt=async k=>{var pe;r.readonly||V.value||(((pe=k.target)==null?void 0:pe.tagName)!=="INPUT"||_.value)&&(m.value=!0)},_n=()=>{r.readonly||V.value||!Dt.value&&r.clearable&&(Fe.value=!0)},Cn=()=>{Fe.value=!1},An=k=>{var pe;r.readonly||V.value||(((pe=k.touches[0].target)==null?void 0:pe.tagName)!=="INPUT"||_.value)&&(m.value=!0)},Tn=vue.computed(()=>r.type.includes("range")),Sn=useFormSize(),bn=vue.computed(()=>{var k,pe;return(pe=(k=vue.unref(v))==null?void 0:k.popperRef)==null?void 0:pe.contentRef}),wn=onClickOutside(h,k=>{const pe=vue.unref(bn),Ne=unrefElement(h);pe&&(k.target===pe||k.composedPath().includes(pe))||k.target===Ne||Ne&&k.composedPath().includes(Ne)||(m.value=!1)});vue.onBeforeUnmount(()=>{wn==null||wn()});const Ue=vue.ref(null),En=()=>{if(Ue.value){const k=Pn(re.value);k&&$n(k)&&(M(dayOrDaysToDate(k)),Ue.value=null)}Ue.value===""&&(M(f.value),L(f.value,!0),Ue.value=null)},Pn=k=>k?hn.value.parseUserInput(k):null,Mn=k=>k?hn.value.formatToString(k):null,$n=k=>hn.value.isValidValue(k),$e=async k=>{if(r.readonly||V.value)return;const{code:pe}=k;if(z(k),pe===EVENT_CODE.esc){m.value===!0&&(m.value=!1,k.preventDefault(),k.stopPropagation());return}if(pe===EVENT_CODE.down&&(hn.value.handleFocusPicker&&(k.preventDefault(),k.stopPropagation()),m.value===!1&&(m.value=!0,await vue.nextTick()),hn.value.handleFocusPicker)){hn.value.handleFocusPicker();return}if(pe===EVENT_CODE.tab){b=!0;return}if(pe===EVENT_CODE.enter||pe===EVENT_CODE.numpadEnter){(Ue.value===null||Ue.value===""||$n(Pn(re.value)))&&(En(),m.value=!1),k.stopPropagation();return}if(Ue.value){k.stopPropagation();return}hn.value.handleKeydownInput&&hn.value.handleKeydownInput(k)},Et=k=>{Ue.value=k,m.value||(m.value=!0)},On=k=>{const pe=k.target;Ue.value?Ue.value=[pe.value,Ue.value[1]]:Ue.value=[pe.value,null]},In=k=>{const pe=k.target;Ue.value?Ue.value=[Ue.value[0],pe.value]:Ue.value=[null,pe.value]},Vn=()=>{var k;const pe=Ue.value,Ne=Pn(pe&&pe[0]),ze=vue.unref(ie);if(Ne&&Ne.isValid()){Ue.value=[Mn(Ne),((k=re.value)==null?void 0:k[1])||null];const jt=[Ne,ze&&(ze[1]||null)];$n(jt)&&(M(dayOrDaysToDate(jt)),Ue.value=null)}},Rn=()=>{var k;const pe=vue.unref(Ue),Ne=Pn(pe&&pe[1]),ze=vue.unref(ie);if(Ne&&Ne.isValid()){Ue.value=[((k=vue.unref(re))==null?void 0:k[0])||null,Mn(Ne)];const jt=[ze&&ze[0],Ne];$n(jt)&&(M(dayOrDaysToDate(jt)),Ue.value=null)}},hn=vue.ref({}),zn=k=>{hn.value[k[0]]=k[1],hn.value.panelReady=!0},xn=k=>{n("calendar-change",k)},vn=(k,pe,Ne)=>{n("panel-change",k,pe,Ne)},D=()=>{var k;(k=h.value)==null||k.focus()},oe=()=>{var k;(k=h.value)==null||k.blur()};return vue.provide(PICKER_BASE_INJECTION_KEY,{props:r}),t({focus:D,blur:oe,handleOpen:Y,handleClose:$,onPick:he}),(k,pe)=>(vue.openBlock(),vue.createBlock(vue.unref(ElTooltip),vue.mergeProps({ref_key:"refPopper",ref:v,visible:m.value,effect:"light",pure:"",trigger:"click"},k.$attrs,{role:"dialog",teleported:"",transition:`${vue.unref(o).namespace.value}-zoom-in-top`,"popper-class":[`${vue.unref(o).namespace.value}-picker__popper`,k.popperClass],"popper-options":vue.unref(d),"fallback-placements":k.fallbackPlacements,"gpu-acceleration":!1,placement:k.placement,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:j,onShow:O,onHide:F}),{default:vue.withCtx(()=>[vue.unref(Tn)?(vue.openBlock(),vue.createBlock(PickerRangeTrigger,{key:1,id:k.id,ref_key:"inputRef",ref:h,"model-value":vue.unref(re),name:k.name,disabled:vue.unref(V),readonly:!k.editable||k.readonly,"start-placeholder":k.startPlaceholder,"end-placeholder":k.endPlaceholder,class:vue.normalizeClass(vue.unref(w)),style:vue.normalizeStyle(k.$attrs.style),"aria-label":k.ariaLabel,tabindex:k.tabindex,autocomplete:"off",role:"combobox",onClick:Lt,onFocus:vue.unref(S),onBlur:vue.unref(T),onStartInput:On,onStartChange:Vn,onEndInput:In,onEndChange:Rn,onMousedown:Lt,onMouseenter:_n,onMouseleave:Cn,onTouchstartPassive:An,onKeydown:$e},{prefix:vue.withCtx(()=>[vue.unref(xe)?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass([vue.unref(u).e("icon"),vue.unref(l).e("icon")])},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(vue.unref(xe))))]),_:1},8,["class"])):vue.createCommentVNode("v-if",!0)]),"range-separator":vue.withCtx(()=>[vue.renderSlot(k.$slots,"range-separator",{},()=>[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(l).b("separator"))},vue.toDisplayString(k.rangeSeparator),3)])]),suffix:vue.withCtx(()=>[k.clearIcon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(vue.unref(x)),onMousedown:vue.withModifiers(vue.unref(NOOP),["prevent"]),onClick:At},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(k.clearIcon)))]),_:1},8,["class","onMousedown"])):vue.createCommentVNode("v-if",!0)]),_:3},8,["id","model-value","name","disabled","readonly","start-placeholder","end-placeholder","class","style","aria-label","tabindex","onFocus","onBlur"])):(vue.openBlock(),vue.createBlock(vue.unref(ElInput),{key:0,id:k.id,ref_key:"inputRef",ref:h,"container-role":"combobox","model-value":vue.unref(re),name:k.name,size:vue.unref(Sn),disabled:vue.unref(V),placeholder:k.placeholder,class:vue.normalizeClass([vue.unref(o).b("editor"),vue.unref(o).bm("editor",k.type),k.$attrs.class]),style:vue.normalizeStyle(k.$attrs.style),readonly:!k.editable||k.readonly||vue.unref(_e)||vue.unref(Oe)||vue.unref(Ce)||k.type==="week","aria-label":k.ariaLabel,tabindex:k.tabindex,"validate-event":!1,onInput:Et,onFocus:vue.unref(S),onBlur:vue.unref(T),onKeydown:$e,onChange:En,onMousedown:Lt,onMouseenter:_n,onMouseleave:Cn,onTouchstartPassive:An,onClick:vue.withModifiers(()=>{},["stop"])},{prefix:vue.withCtx(()=>[vue.unref(xe)?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(vue.unref(u).e("icon")),onMousedown:vue.withModifiers(Lt,["prevent"]),onTouchstartPassive:An},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(vue.unref(xe))))]),_:1},8,["class","onMousedown"])):vue.createCommentVNode("v-if",!0)]),suffix:vue.withCtx(()=>[Fe.value&&k.clearIcon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(`${vue.unref(u).e("icon")} clear-icon`),onMousedown:vue.withModifiers(vue.unref(NOOP),["prevent"]),onClick:At},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(k.clearIcon)))]),_:1},8,["class","onMousedown"])):vue.createCommentVNode("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onFocus","onBlur","onClick"]))]),content:vue.withCtx(()=>[vue.renderSlot(k.$slots,"default",{visible:m.value,actualVisible:y.value,parsedValue:vue.unref(ie),format:k.format,dateFormat:k.dateFormat,timeFormat:k.timeFormat,unlinkPanels:k.unlinkPanels,type:k.type,defaultValue:k.defaultValue,showNow:k.showNow,onPick:he,onSelectRange:ue,onSetPickerOption:zn,onCalendarChange:xn,onPanelChange:vn,onMousedown:vue.withModifiers(()=>{},["stop"])})]),_:3},16,["visible","transition","popper-class","popper-options","fallback-placements","placement"]))}});var CommonPicker=_export_sfc$1(_sfc_main$D,[["__file","picker.vue"]]);const panelTimePickerProps=buildProps({...timePanelSharedProps,datetimeRole:String,parsedValue:{type:definePropType(Object)}}),useTimePanel=({getAvailableHours:e,getAvailableMinutes:t,getAvailableSeconds:n})=>{const r=(o,u,l,c)=>{const p={hour:e,minute:t,second:n};let d=o;return["hour","minute","second"].forEach(f=>{if(p[f]){let v;const h=p[f];switch(f){case"minute":{v=h(d.hour(),u,c);break}case"second":{v=h(d.hour(),d.minute(),u,c);break}default:{v=h(u,c);break}}if(v!=null&&v.length&&!v.includes(d[f]())){const m=l?0:v.length-1;d=d[f](v[m])}}}),d},i={};return{timePickerOptions:i,getAvailableTime:r,onSetOption:([o,u])=>{i[o]=u}}},makeAvailableArr=e=>{const t=(r,i)=>r||i,n=r=>r!==!0;return e.map(t).filter(n)},getTimeLists=(e,t,n)=>({getHoursList:(o,u)=>makeList(24,e&&(()=>e==null?void 0:e(o,u))),getMinutesList:(o,u,l)=>makeList(60,t&&(()=>t==null?void 0:t(o,u,l))),getSecondsList:(o,u,l,c)=>makeList(60,n&&(()=>n==null?void 0:n(o,u,l,c)))}),buildAvailableTimeSlotGetter=(e,t,n)=>{const{getHoursList:r,getMinutesList:i,getSecondsList:a}=getTimeLists(e,t,n);return{getAvailableHours:(c,p)=>makeAvailableArr(r(c,p)),getAvailableMinutes:(c,p,d)=>makeAvailableArr(i(c,p,d)),getAvailableSeconds:(c,p,d,f)=>makeAvailableArr(a(c,p,d,f))}},useOldValue=e=>{const t=vue.ref(e.parsedValue);return vue.watch(()=>e.visible,n=>{n||(t.value=e.parsedValue)}),t},basicTimeSpinnerProps=buildProps({role:{type:String,required:!0},spinnerDate:{type:definePropType(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:definePropType(String),default:""},...disabledTimeListsProps}),REPEAT_INTERVAL=100,REPEAT_DELAY=600,vRepeatClick={beforeMount(e,t){const n=t.value,{interval:r=REPEAT_INTERVAL,delay:i=REPEAT_DELAY}=isFunction$1(n)?{}:n;let a,o;const u=()=>isFunction$1(n)?n():n.handler(),l=()=>{o&&(clearTimeout(o),o=void 0),a&&(clearInterval(a),a=void 0)};e.addEventListener("mousedown",c=>{c.button===0&&(l(),u(),document.addEventListener("mouseup",()=>l(),{once:!0}),o=setTimeout(()=>{a=setInterval(()=>{u()},r)},i))})}},_sfc_main$C=vue.defineComponent({__name:"basic-time-spinner",props:basicTimeSpinnerProps,emits:[CHANGE_EVENT,"select-range","set-option"],setup(e,{emit:t}){const n=e,r=vue.inject(PICKER_BASE_INJECTION_KEY),{isRange:i,format:a}=r.props,o=useNamespace("time"),{getHoursList:u,getMinutesList:l,getSecondsList:c}=getTimeLists(n.disabledHours,n.disabledMinutes,n.disabledSeconds);let p=!1;const d=vue.ref(),f=vue.ref(),v=vue.ref(),h=vue.ref(),m={hours:f,minutes:v,seconds:h},y=vue.computed(()=>n.showSeconds?timeUnits:timeUnits.slice(0,2)),g=vue.computed(()=>{const{spinnerDate:ae}=n,le=ae.hour(),_e=ae.minute(),Oe=ae.second();return{hours:le,minutes:_e,seconds:Oe}}),b=vue.computed(()=>{const{hours:ae,minutes:le}=vue.unref(g),{role:_e,spinnerDate:Oe}=n,Ce=i?void 0:Oe;return{hours:u(_e,Ce),minutes:l(ae,_e,Ce),seconds:c(ae,le,_e,Ce)}}),_=vue.computed(()=>{const{hours:ae,minutes:le,seconds:_e}=vue.unref(g);return{hours:buildTimeList(ae,23),minutes:buildTimeList(le,59),seconds:buildTimeList(_e,59)}}),S=debounce(ae=>{p=!1,x(ae)},200),T=ae=>{if(!!!n.amPmMode)return"";const _e=n.amPmMode==="A";let Oe=ae<12?" am":" pm";return _e&&(Oe=Oe.toUpperCase()),Oe},w=ae=>{let le=[0,0];if(!a||a===DEFAULT_FORMATS_TIME)switch(ae){case"hours":le=[0,2];break;case"minutes":le=[3,5];break;case"seconds":le=[6,8];break}const[_e,Oe]=le;t("select-range",_e,Oe),d.value=ae},x=ae=>{z(ae,vue.unref(g)[ae])},L=()=>{x("hours"),x("minutes"),x("seconds")},M=ae=>ae.querySelector(`.${o.namespace.value}-scrollbar__wrap`),z=(ae,le)=>{if(n.arrowControl)return;const _e=vue.unref(m[ae]);_e&&_e.$el&&(M(_e.$el).scrollTop=Math.max(0,le*A(ae)))},A=ae=>{const le=vue.unref(m[ae]),_e=le==null?void 0:le.$el.querySelector("li");return _e&&Number.parseFloat(getStyle(_e,"height"))||0},ue=()=>{j(1)},he=()=>{j(-1)},j=ae=>{d.value||w("hours");const le=d.value,_e=vue.unref(g)[le],Oe=d.value==="hours"?24:60,Ce=O(le,_e,ae,Oe);F(le,Ce),z(le,Ce),vue.nextTick(()=>w(le))},O=(ae,le,_e,Oe)=>{let Ce=(le+_e+Oe)%Oe;const xe=vue.unref(b)[ae];for(;xe[Ce]&&Ce!==le;)Ce=(Ce+_e+Oe)%Oe;return Ce},F=(ae,le)=>{if(vue.unref(b)[ae][le])return;const{hours:Ce,minutes:xe,seconds:Fe}=vue.unref(g);let At;switch(ae){case"hours":At=n.spinnerDate.hour(le).minute(xe).second(Fe);break;case"minutes":At=n.spinnerDate.hour(Ce).minute(le).second(Fe);break;case"seconds":At=n.spinnerDate.hour(Ce).minute(xe).second(le);break}t(CHANGE_EVENT,At)},Y=(ae,{value:le,disabled:_e})=>{_e||(F(ae,le),w(ae),z(ae,le))},$=ae=>{const le=vue.unref(m[ae]);if(!le)return;p=!0,S(ae);const _e=Math.min(Math.round((M(le.$el).scrollTop-(V(ae)*.5-10)/A(ae)+3)/A(ae)),ae==="hours"?23:59);F(ae,_e)},V=ae=>vue.unref(m[ae]).$el.offsetHeight,ie=()=>{const ae=le=>{const _e=vue.unref(m[le]);_e&&_e.$el&&(M(_e.$el).onscroll=()=>{$(le)})};ae("hours"),ae("minutes"),ae("seconds")};vue.onMounted(()=>{vue.nextTick(()=>{!n.arrowControl&&ie(),L(),n.role==="start"&&w("hours")})});const re=(ae,le)=>{m[le].value=ae??void 0};return t("set-option",[`${n.role}_scrollDown`,j]),t("set-option",[`${n.role}_emitSelectRange`,w]),vue.watch(()=>n.spinnerDate,()=>{p||L()}),(ae,le)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([vue.unref(o).b("spinner"),{"has-seconds":ae.showSeconds}])},[ae.arrowControl?vue.createCommentVNode("v-if",!0):(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,{key:0},vue.renderList(vue.unref(y),_e=>(vue.openBlock(),vue.createBlock(vue.unref(ElScrollbar),{key:_e,ref_for:!0,ref:Oe=>re(Oe,_e),class:vue.normalizeClass(vue.unref(o).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":vue.unref(o).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:Oe=>w(_e),onMousemove:Oe=>x(_e)},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(b)[_e],(Oe,Ce)=>(vue.openBlock(),vue.createElementBlock("li",{key:Ce,class:vue.normalizeClass([vue.unref(o).be("spinner","item"),vue.unref(o).is("active",Ce===vue.unref(g)[_e]),vue.unref(o).is("disabled",Oe)]),onClick:xe=>Y(_e,{value:Ce,disabled:Oe})},[_e==="hours"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createTextVNode(vue.toDisplayString(("0"+(ae.amPmMode?Ce%12||12:Ce)).slice(-2))+vue.toDisplayString(T(Ce)),1)],64)):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createTextVNode(vue.toDisplayString(("0"+Ce).slice(-2)),1)],64))],10,["onClick"]))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),ae.arrowControl?(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,{key:1},vue.renderList(vue.unref(y),_e=>(vue.openBlock(),vue.createElementBlock("div",{key:_e,class:vue.normalizeClass([vue.unref(o).be("spinner","wrapper"),vue.unref(o).is("arrow")]),onMouseenter:Oe=>w(_e)},[vue.withDirectives((vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{class:vue.normalizeClass(["arrow-up",vue.unref(o).be("spinner","arrow")])},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_up_default))]),_:1},8,["class"])),[[vue.unref(vRepeatClick),he]]),vue.withDirectives((vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{class:vue.normalizeClass(["arrow-down",vue.unref(o).be("spinner","arrow")])},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_down_default))]),_:1},8,["class"])),[[vue.unref(vRepeatClick),ue]]),vue.createElementVNode("ul",{class:vue.normalizeClass(vue.unref(o).be("spinner","list"))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(_)[_e],(Oe,Ce)=>(vue.openBlock(),vue.createElementBlock("li",{key:Ce,class:vue.normalizeClass([vue.unref(o).be("spinner","item"),vue.unref(o).is("active",Oe===vue.unref(g)[_e]),vue.unref(o).is("disabled",vue.unref(b)[_e][Oe])])},[vue.unref(isNumber)(Oe)?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[_e==="hours"?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createTextVNode(vue.toDisplayString(("0"+(ae.amPmMode?Oe%12||12:Oe)).slice(-2))+vue.toDisplayString(T(Oe)),1)],64)):(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[vue.createTextVNode(vue.toDisplayString(("0"+Oe).slice(-2)),1)],64))],64)):vue.createCommentVNode("v-if",!0)],2))),128))],2)],42,["onMouseenter"]))),128)):vue.createCommentVNode("v-if",!0)],2))}});var TimeSpinner=_export_sfc$1(_sfc_main$C,[["__file","basic-time-spinner.vue"]]);const _sfc_main$B=vue.defineComponent({__name:"panel-time-pick",props:panelTimePickerProps,emits:["pick","select-range","set-picker-option"],setup(e,{emit:t}){const n=e,r=vue.inject(PICKER_BASE_INJECTION_KEY),{arrowControl:i,disabledHours:a,disabledMinutes:o,disabledSeconds:u,defaultValue:l}=r.props,{getAvailableHours:c,getAvailableMinutes:p,getAvailableSeconds:d}=buildAvailableTimeSlotGetter(a,o,u),f=useNamespace("time"),{t:v,lang:h}=useLocale(),m=vue.ref([0,2]),y=useOldValue(n),g=vue.computed(()=>isUndefined(n.actualVisible)?`${f.namespace.value}-zoom-in-top`:""),b=vue.computed(()=>n.format.includes("ss")),_=vue.computed(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),S=$=>{const V=dayjs($).locale(h.value),ie=j(V);return V.isSame(ie)},T=()=>{t("pick",y.value,!1)},w=($=!1,V=!1)=>{V||t("pick",n.parsedValue,$)},x=$=>{if(!n.visible)return;const V=j($).millisecond(0);t("pick",V,!0)},L=($,V)=>{t("select-range",$,V),m.value=[$,V]},M=$=>{const V=[0,3].concat(b.value?[6]:[]),ie=["hours","minutes"].concat(b.value?["seconds"]:[]),ae=(V.indexOf(m.value[0])+$+V.length)%V.length;A.start_emitSelectRange(ie[ae])},z=$=>{const V=$.code,{left:ie,right:re,up:ae,down:le}=EVENT_CODE;if([ie,re].includes(V)){M(V===ie?-1:1),$.preventDefault();return}if([ae,le].includes(V)){const _e=V===ae?-1:1;A.start_scrollDown(_e),$.preventDefault();return}},{timePickerOptions:A,onSetOption:ue,getAvailableTime:he}=useTimePanel({getAvailableHours:c,getAvailableMinutes:p,getAvailableSeconds:d}),j=$=>he($,n.datetimeRole||"",!0),O=$=>$?dayjs($,n.format).locale(h.value):null,F=$=>$?$.format(n.format):null,Y=()=>dayjs(l).locale(h.value);return t("set-picker-option",["isValidValue",S]),t("set-picker-option",["formatToString",F]),t("set-picker-option",["parseUserInput",O]),t("set-picker-option",["handleKeydownInput",z]),t("set-picker-option",["getRangeAvailableTime",j]),t("set-picker-option",["getDefaultValue",Y]),($,V)=>(vue.openBlock(),vue.createBlock(vue.Transition,{name:vue.unref(g)},{default:vue.withCtx(()=>[$.actualVisible||$.visible?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(f).b("panel"))},[vue.createElementVNode("div",{class:vue.normalizeClass([vue.unref(f).be("panel","content"),{"has-seconds":vue.unref(b)}])},[vue.createVNode(TimeSpinner,{ref:"spinner",role:$.datetimeRole||"start","arrow-control":vue.unref(i),"show-seconds":vue.unref(b),"am-pm-mode":vue.unref(_),"spinner-date":$.parsedValue,"disabled-hours":vue.unref(a),"disabled-minutes":vue.unref(o),"disabled-seconds":vue.unref(u),onChange:x,onSetOption:vue.unref(ue),onSelectRange:L},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(f).be("panel","footer"))},[vue.createElementVNode("button",{type:"button",class:vue.normalizeClass([vue.unref(f).be("panel","btn"),"cancel"]),onClick:T},vue.toDisplayString(vue.unref(v)("el.datepicker.cancel")),3),vue.createElementVNode("button",{type:"button",class:vue.normalizeClass([vue.unref(f).be("panel","btn"),"confirm"]),onClick:ie=>w()},vue.toDisplayString(vue.unref(v)("el.datepicker.confirm")),11,["onClick"])],2)],2)):vue.createCommentVNode("v-if",!0)]),_:1},8,["name"]))}});var TimePickPanel=_export_sfc$1(_sfc_main$B,[["__file","panel-time-pick.vue"]]);const ROOT_PICKER_INJECTION_KEY=Symbol(),ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY="ElIsDefaultFormat",datePickerProps=buildProps({...timePickerDefaultProps,type:{type:definePropType(String),default:"date"}}),selectionModes=["date","dates","year","years","month","months","week","range"],datePickerSharedProps=buildProps({disabledDate:{type:definePropType(Function)},date:{type:definePropType(Object),required:!0},minDate:{type:definePropType(Object)},maxDate:{type:definePropType(Object)},parsedValue:{type:definePropType([Object,Array])},rangeState:{type:definePropType(Object),default:()=>({endDate:null,selecting:!1})}}),panelSharedProps=buildProps({type:{type:definePropType(String),required:!0,values:datePickTypes},dateFormat:String,timeFormat:String,showNow:{type:Boolean,default:!0}}),panelRangeSharedProps=buildProps({unlinkPanels:Boolean,visible:Boolean,parsedValue:{type:definePropType(Array)}}),selectionModeWithDefault=e=>({type:String,values:selectionModes,default:e}),panelDatePickProps=buildProps({...panelSharedProps,parsedValue:{type:definePropType([Object,Array])},visible:{type:Boolean},format:{type:String,default:""}}),isValidRange=e=>{if(!isArray$1(e))return!1;const[t,n]=e;return dayjs.isDayjs(t)&&dayjs.isDayjs(n)&&dayjs(t).isValid()&&dayjs(n).isValid()&&t.isSameOrBefore(n)},getDefaultValue=(e,{lang:t,step:n=1,unit:r,unlinkPanels:i})=>{let a;if(isArray$1(e)){let[o,u]=e.map(l=>dayjs(l).locale(t));return i||(u=o.add(n,r)),[o,u]}else e?a=dayjs(e):a=dayjs();return a=a.locale(t),[a,a.add(n,r)]},buildPickerTable=(e,t,{columnIndexOffset:n,startDate:r,nextEndDate:i,now:a,unit:o,relativeDateGetter:u,setCellMetadata:l,setRowMetadata:c})=>{for(let p=0;p<e.row;p++){const d=t[p];for(let f=0;f<e.column;f++){let v=d[f+n];v||(v={row:p,column:f,type:"normal",inRange:!1,start:!1,end:!1});const h=p*e.column+f,m=u(h);v.dayjs=m,v.date=m.toDate(),v.timestamp=m.valueOf(),v.type="normal",v.inRange=!!(r&&m.isSameOrAfter(r,o)&&i&&m.isSameOrBefore(i,o))||!!(r&&m.isSameOrBefore(r,o)&&i&&m.isSameOrAfter(i,o)),r!=null&&r.isSameOrAfter(i)?(v.start=!!i&&m.isSame(i,o),v.end=r&&m.isSame(r,o)):(v.start=!!r&&m.isSame(r,o),v.end=!!i&&m.isSame(i,o)),m.isSame(a,o)&&(v.type="today"),l==null||l(v,{rowIndex:p,columnIndex:f}),d[f+n]=v}c==null||c(d)}},datesInMonth=(e,t,n,r)=>{const i=dayjs().locale(r).startOf("month").month(n).year(t).hour(e.hour()).minute(e.minute()).second(e.second()),a=i.daysInMonth();return rangeArr(a).map(o=>i.add(o,"day").toDate())},getValidDateOfMonth=(e,t,n,r,i)=>{const a=dayjs().year(t).month(n).startOf("month").hour(e.hour()).minute(e.minute()).second(e.second()),o=datesInMonth(e,t,n,r).find(u=>!(i!=null&&i(u)));return o?dayjs(o).locale(r):a.locale(r)},getValidDateOfYear=(e,t,n)=>{const r=e.year();if(!(n!=null&&n(e.toDate())))return e.locale(t);const i=e.month();if(!datesInMonth(e,r,i,t).every(n))return getValidDateOfMonth(e,r,i,t,n);for(let a=0;a<12;a++)if(!datesInMonth(e,r,a,t).every(n))return getValidDateOfMonth(e,r,a,t,n);return e},correctlyParseUserInput=(e,t,n,r)=>{if(isArray$1(e))return e.map(i=>correctlyParseUserInput(i,t,n,r));if(isString$1(e)){const i=r.value?dayjs(e):dayjs(e,t);if(!i.isValid())return i}return dayjs(e,t).locale(n)},basicDateTableProps=buildProps({...datePickerSharedProps,cellClassName:{type:definePropType(Function)},showWeekNumber:Boolean,selectionMode:selectionModeWithDefault("date")}),basicDateTableEmits=["changerange","pick","select"],isNormalDay=(e="")=>["normal","today"].includes(e),useBasicDateTable=(e,t)=>{const{lang:n}=useLocale(),r=vue.ref(),i=vue.ref(),a=vue.ref(),o=vue.ref(),u=vue.ref([[],[],[],[],[],[]]);let l=!1;const c=e.date.$locale().weekStart||7,p=e.date.locale("en").localeData().weekdaysShort().map(V=>V.toLowerCase()),d=vue.computed(()=>c>3?7-c:-c),f=vue.computed(()=>{const V=e.date.startOf("month");return V.subtract(V.day()||7,"day")}),v=vue.computed(()=>p.concat(p).slice(c,c+7)),h=vue.computed(()=>flatten$1(vue.unref(S)).some(V=>V.isCurrent)),m=vue.computed(()=>{const V=e.date.startOf("month"),ie=V.day()||7,re=V.daysInMonth(),ae=V.subtract(1,"month").daysInMonth();return{startOfMonthDay:ie,dateCountOfMonth:re,dateCountOfLastMonth:ae}}),y=vue.computed(()=>e.selectionMode==="dates"?castArray(e.parsedValue):[]),g=(V,{count:ie,rowIndex:re,columnIndex:ae})=>{const{startOfMonthDay:le,dateCountOfMonth:_e,dateCountOfLastMonth:Oe}=vue.unref(m),Ce=vue.unref(d);if(re>=0&&re<=1){const xe=le+Ce<0?7+le+Ce:le+Ce;if(ae+re*7>=xe)return V.text=ie,!0;V.text=Oe-(xe-ae%7)+1+re*7,V.type="prev-month"}else return ie<=_e?V.text=ie:(V.text=ie-_e,V.type="next-month"),!0;return!1},b=(V,{columnIndex:ie,rowIndex:re},ae)=>{const{disabledDate:le,cellClassName:_e}=e,Oe=vue.unref(y),Ce=g(V,{count:ae,rowIndex:re,columnIndex:ie}),xe=V.dayjs.toDate();return V.selected=Oe.find(Fe=>Fe.isSame(V.dayjs,"day")),V.isSelected=!!V.selected,V.isCurrent=w(V),V.disabled=le==null?void 0:le(xe),V.customClass=_e==null?void 0:_e(xe),Ce},_=V=>{if(e.selectionMode==="week"){const[ie,re]=e.showWeekNumber?[1,7]:[0,6],ae=$(V[ie+1]);V[ie].inRange=ae,V[ie].start=ae,V[re].inRange=ae,V[re].end=ae}},S=vue.computed(()=>{const{minDate:V,maxDate:ie,rangeState:re,showWeekNumber:ae}=e,le=vue.unref(d),_e=vue.unref(u),Oe="day";let Ce=1;if(ae)for(let xe=0;xe<6;xe++)_e[xe][0]||(_e[xe][0]={type:"week",text:vue.unref(f).add(xe*7+1,Oe).week()});return buildPickerTable({row:6,column:7},_e,{startDate:V,columnIndexOffset:ae?1:0,nextEndDate:re.endDate||ie||re.selecting&&V||null,now:dayjs().locale(vue.unref(n)).startOf(Oe),unit:Oe,relativeDateGetter:xe=>vue.unref(f).add(xe-le,Oe),setCellMetadata:(...xe)=>{b(...xe,Ce)&&(Ce+=1)},setRowMetadata:_}),_e});vue.watch(()=>e.date,async()=>{var V;(V=vue.unref(r))!=null&&V.contains(document.activeElement)&&(await vue.nextTick(),await T())});const T=async()=>{var V;return(V=vue.unref(i))==null?void 0:V.focus()},w=V=>e.selectionMode==="date"&&isNormalDay(V.type)&&x(V,e.parsedValue),x=(V,ie)=>ie?dayjs(ie).locale(vue.unref(n)).isSame(e.date.date(Number(V.text)),"day"):!1,L=(V,ie)=>{const re=V*7+(ie-(e.showWeekNumber?1:0))-vue.unref(d);return vue.unref(f).add(re,"day")},M=V=>{var ie;if(!e.rangeState.selecting)return;let re=V.target;if(re.tagName==="SPAN"&&(re=(ie=re.parentNode)==null?void 0:ie.parentNode),re.tagName==="DIV"&&(re=re.parentNode),re.tagName!=="TD")return;const ae=re.parentNode.rowIndex-1,le=re.cellIndex;vue.unref(S)[ae][le].disabled||(ae!==vue.unref(a)||le!==vue.unref(o))&&(a.value=ae,o.value=le,t("changerange",{selecting:!0,endDate:L(ae,le)}))},z=V=>!vue.unref(h)&&(V==null?void 0:V.text)===1&&V.type==="normal"||V.isCurrent,A=V=>{l||vue.unref(h)||e.selectionMode!=="date"||Y(V,!0)},ue=V=>{V.target.closest("td")&&(l=!0)},he=V=>{V.target.closest("td")&&(l=!1)},j=V=>{!e.rangeState.selecting||!e.minDate?(t("pick",{minDate:V,maxDate:null}),t("select",!0)):(V>=e.minDate?t("pick",{minDate:e.minDate,maxDate:V}):t("pick",{minDate:V,maxDate:e.minDate}),t("select",!1))},O=V=>{const ie=V.week(),re=`${V.year()}w${ie}`;t("pick",{year:V.year(),week:ie,value:re,date:V.startOf("week")})},F=(V,ie)=>{const re=ie?castArray(e.parsedValue).filter(ae=>(ae==null?void 0:ae.valueOf())!==V.valueOf()):castArray(e.parsedValue).concat([V]);t("pick",re)},Y=(V,ie=!1)=>{const re=V.target.closest("td");if(!re)return;const ae=re.parentNode.rowIndex-1,le=re.cellIndex,_e=vue.unref(S)[ae][le];if(_e.disabled||_e.type==="week")return;const Oe=L(ae,le);switch(e.selectionMode){case"range":{j(Oe);break}case"date":{t("pick",Oe,ie);break}case"week":{O(Oe);break}case"dates":{F(Oe,!!_e.selected);break}}},$=V=>{if(e.selectionMode!=="week")return!1;let ie=e.date.startOf("day");if(V.type==="prev-month"&&(ie=ie.subtract(1,"month")),V.type==="next-month"&&(ie=ie.add(1,"month")),ie=ie.date(Number.parseInt(V.text,10)),e.parsedValue&&!isArray$1(e.parsedValue)){const re=(e.parsedValue.day()-c+7)%7-1;return e.parsedValue.subtract(re,"day").isSame(ie,"day")}return!1};return{WEEKS:v,rows:S,tbodyRef:r,currentCellRef:i,focus:T,isCurrent:w,isWeekActive:$,isSelectedCell:z,handlePickDate:Y,handleMouseUp:he,handleMouseDown:ue,handleMouseMove:M,handleFocus:A}},useBasicDateTableDOM=(e,{isCurrent:t,isWeekActive:n})=>{const r=useNamespace("date-table"),{t:i}=useLocale(),a=vue.computed(()=>[r.b(),{"is-week-mode":e.selectionMode==="week"}]),o=vue.computed(()=>i("el.datepicker.dateTablePrompt")),u=vue.computed(()=>i("el.datepicker.week"));return{tableKls:a,tableLabel:o,weekLabel:u,getCellClasses:p=>{const d=[];return isNormalDay(p.type)&&!p.disabled?(d.push("available"),p.type==="today"&&d.push("today")):d.push(p.type),t(p)&&d.push("current"),p.inRange&&(isNormalDay(p.type)||e.selectionMode==="week")&&(d.push("in-range"),p.start&&d.push("start-date"),p.end&&d.push("end-date")),p.disabled&&d.push("disabled"),p.selected&&d.push("selected"),p.customClass&&d.push(p.customClass),d.join(" ")},getRowKls:p=>[r.e("row"),{current:n(p)}],t:i}},basicCellProps=buildProps({cell:{type:definePropType(Object)}});var ElDatePickerCell=vue.defineComponent({name:"ElDatePickerCell",props:basicCellProps,setup(e){const t=useNamespace("date-table-cell"),{slots:n}=vue.inject(ROOT_PICKER_INJECTION_KEY);return()=>{const{cell:r}=e;return vue.renderSlot(n,"default",{...r},()=>{var i;return[vue.createVNode("div",{class:t.b()},[vue.createVNode("span",{class:t.e("text")},[(i=r==null?void 0:r.renderText)!=null?i:r==null?void 0:r.text])])]})}}});const _sfc_main$A=vue.defineComponent({__name:"basic-date-table",props:basicDateTableProps,emits:basicDateTableEmits,setup(e,{expose:t,emit:n}){const r=e,{WEEKS:i,rows:a,tbodyRef:o,currentCellRef:u,focus:l,isCurrent:c,isWeekActive:p,isSelectedCell:d,handlePickDate:f,handleMouseUp:v,handleMouseDown:h,handleMouseMove:m,handleFocus:y}=useBasicDateTable(r,n),{tableLabel:g,tableKls:b,weekLabel:_,getCellClasses:S,getRowKls:T,t:w}=useBasicDateTableDOM(r,{isCurrent:c,isWeekActive:p});let x=!1;return vue.onBeforeUnmount(()=>{x=!0}),t({focus:l}),(L,M)=>(vue.openBlock(),vue.createElementBlock("table",{"aria-label":vue.unref(g),class:vue.normalizeClass(vue.unref(b)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:vue.unref(f),onMousemove:vue.unref(m),onMousedown:vue.withModifiers(vue.unref(h),["prevent"]),onMouseup:vue.unref(v)},[vue.createElementVNode("tbody",{ref_key:"tbodyRef",ref:o},[vue.createElementVNode("tr",null,[L.showWeekNumber?(vue.openBlock(),vue.createElementBlock("th",{key:0,scope:"col"},vue.toDisplayString(vue.unref(_)),1)):vue.createCommentVNode("v-if",!0),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(i),(z,A)=>(vue.openBlock(),vue.createElementBlock("th",{key:A,"aria-label":vue.unref(w)("el.datepicker.weeksFull."+z),scope:"col"},vue.toDisplayString(vue.unref(w)("el.datepicker.weeks."+z)),9,["aria-label"]))),128))]),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(a),(z,A)=>(vue.openBlock(),vue.createElementBlock("tr",{key:A,class:vue.normalizeClass(vue.unref(T)(z[1]))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(z,(ue,he)=>(vue.openBlock(),vue.createElementBlock("td",{key:`${A}.${he}`,ref_for:!0,ref:j=>!vue.unref(x)&&vue.unref(d)(ue)&&(u.value=j),class:vue.normalizeClass(vue.unref(S)(ue)),"aria-current":ue.isCurrent?"date":void 0,"aria-selected":ue.isCurrent,tabindex:vue.unref(d)(ue)?0:-1,onFocus:vue.unref(y)},[vue.createVNode(vue.unref(ElDatePickerCell),{cell:ue},null,8,["cell"])],42,["aria-current","aria-selected","tabindex","onFocus"]))),128))],2))),128))],512)],42,["aria-label","onClick","onMousemove","onMousedown","onMouseup"]))}});var DateTable=_export_sfc$1(_sfc_main$A,[["__file","basic-date-table.vue"]]);const basicMonthTableProps=buildProps({...datePickerSharedProps,selectionMode:selectionModeWithDefault("month")}),_sfc_main$z=vue.defineComponent({__name:"basic-month-table",props:basicMonthTableProps,emits:["changerange","pick","select"],setup(e,{expose:t,emit:n}){const r=e,i=useNamespace("month-table"),{t:a,lang:o}=useLocale(),u=vue.ref(),l=vue.ref(),c=vue.ref(r.date.locale("en").localeData().monthsShort().map(_=>_.toLowerCase())),p=vue.ref([[],[],[]]),d=vue.ref(),f=vue.ref(),v=vue.computed(()=>{var _,S;const T=p.value,w=dayjs().locale(o.value).startOf("month");for(let x=0;x<3;x++){const L=T[x];for(let M=0;M<4;M++){const z=L[M]||(L[M]={row:x,column:M,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1});z.type="normal";const A=x*4+M,ue=r.date.startOf("year").month(A),he=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;z.inRange=!!(r.minDate&&ue.isSameOrAfter(r.minDate,"month")&&he&&ue.isSameOrBefore(he,"month"))||!!(r.minDate&&ue.isSameOrBefore(r.minDate,"month")&&he&&ue.isSameOrAfter(he,"month")),(_=r.minDate)!=null&&_.isSameOrAfter(he)?(z.start=!!(he&&ue.isSame(he,"month")),z.end=r.minDate&&ue.isSame(r.minDate,"month")):(z.start=!!(r.minDate&&ue.isSame(r.minDate,"month")),z.end=!!(he&&ue.isSame(he,"month"))),w.isSame(ue)&&(z.type="today"),z.text=A,z.disabled=((S=r.disabledDate)==null?void 0:S.call(r,ue.toDate()))||!1}}return T}),h=()=>{var _;(_=l.value)==null||_.focus()},m=_=>{const S={},T=r.date.year(),w=new Date,x=_.text;return S.disabled=r.disabledDate?datesInMonth(r.date,T,x,o.value).every(r.disabledDate):!1,S.current=castArray(r.parsedValue).findIndex(L=>dayjs.isDayjs(L)&&L.year()===T&&L.month()===x)>=0,S.today=w.getFullYear()===T&&w.getMonth()===x,_.inRange&&(S["in-range"]=!0,_.start&&(S["start-date"]=!0),_.end&&(S["end-date"]=!0)),S},y=_=>{const S=r.date.year(),T=_.text;return castArray(r.date).findIndex(w=>w.year()===S&&w.month()===T)>=0},g=_=>{var S;if(!r.rangeState.selecting)return;let T=_.target;if(T.tagName==="SPAN"&&(T=(S=T.parentNode)==null?void 0:S.parentNode),T.tagName==="DIV"&&(T=T.parentNode),T.tagName!=="TD")return;const w=T.parentNode.rowIndex,x=T.cellIndex;v.value[w][x].disabled||(w!==d.value||x!==f.value)&&(d.value=w,f.value=x,n("changerange",{selecting:!0,endDate:r.date.startOf("year").month(w*4+x)}))},b=_=>{var S;const T=(S=_.target)==null?void 0:S.closest("td");if((T==null?void 0:T.tagName)!=="TD"||hasClass(T,"disabled"))return;const w=T.cellIndex,L=T.parentNode.rowIndex*4+w,M=r.date.startOf("year").month(L);if(r.selectionMode==="months"){if(_.type==="keydown"){n("pick",castArray(r.parsedValue),!1);return}const z=getValidDateOfMonth(r.date,r.date.year(),L,o.value,r.disabledDate),A=hasClass(T,"current")?castArray(r.parsedValue).filter(ue=>(ue==null?void 0:ue.year())!==z.year()||(ue==null?void 0:ue.month())!==z.month()):castArray(r.parsedValue).concat([dayjs(z)]);n("pick",A)}else r.selectionMode==="range"?r.rangeState.selecting?(r.minDate&&M>=r.minDate?n("pick",{minDate:r.minDate,maxDate:M}):n("pick",{minDate:M,maxDate:r.minDate}),n("select",!1)):(n("pick",{minDate:M,maxDate:null}),n("select",!0)):n("pick",L)};return vue.watch(()=>r.date,async()=>{var _,S;(_=u.value)!=null&&_.contains(document.activeElement)&&(await vue.nextTick(),(S=l.value)==null||S.focus())}),t({focus:h}),(_,S)=>(vue.openBlock(),vue.createElementBlock("table",{role:"grid","aria-label":vue.unref(a)("el.datepicker.monthTablePrompt"),class:vue.normalizeClass(vue.unref(i).b()),onClick:b,onMousemove:g},[vue.createElementVNode("tbody",{ref_key:"tbodyRef",ref:u},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(v),(T,w)=>(vue.openBlock(),vue.createElementBlock("tr",{key:w},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(T,(x,L)=>(vue.openBlock(),vue.createElementBlock("td",{key:L,ref_for:!0,ref:M=>y(x)&&(l.value=M),class:vue.normalizeClass(m(x)),"aria-selected":`${y(x)}`,"aria-label":vue.unref(a)(`el.datepicker.month${+x.text+1}`),tabindex:y(x)?0:-1,onKeydown:[vue.withKeys(vue.withModifiers(b,["prevent","stop"]),["space"]),vue.withKeys(vue.withModifiers(b,["prevent","stop"]),["enter"])]},[vue.createVNode(vue.unref(ElDatePickerCell),{cell:{...x,renderText:vue.unref(a)("el.datepicker.months."+c.value[x.text])}},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var MonthTable=_export_sfc$1(_sfc_main$z,[["__file","basic-month-table.vue"]]);const basicYearTableProps=buildProps({...datePickerSharedProps,selectionMode:selectionModeWithDefault("year")}),_sfc_main$y=vue.defineComponent({__name:"basic-year-table",props:basicYearTableProps,emits:["changerange","pick","select"],setup(e,{expose:t,emit:n}){const r=e,i=(S,T)=>{const w=dayjs(String(S)).locale(T).startOf("year"),L=w.endOf("year").dayOfYear();return rangeArr(L).map(M=>w.add(M,"day").toDate())},a=useNamespace("year-table"),{t:o,lang:u}=useLocale(),l=vue.ref(),c=vue.ref(),p=vue.computed(()=>Math.floor(r.date.year()/10)*10),d=vue.ref([[],[],[]]),f=vue.ref(),v=vue.ref(),h=vue.computed(()=>{var S;const T=d.value,w=dayjs().locale(u.value).startOf("year");for(let x=0;x<3;x++){const L=T[x];for(let M=0;M<4&&!(x*4+M>=10);M++){let z=L[M];z||(z={row:x,column:M,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1}),z.type="normal";const A=x*4+M+p.value,ue=dayjs().year(A),he=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;z.inRange=!!(r.minDate&&ue.isSameOrAfter(r.minDate,"year")&&he&&ue.isSameOrBefore(he,"year"))||!!(r.minDate&&ue.isSameOrBefore(r.minDate,"year")&&he&&ue.isSameOrAfter(he,"year")),(S=r.minDate)!=null&&S.isSameOrAfter(he)?(z.start=!!(he&&ue.isSame(he,"year")),z.end=!!(r.minDate&&ue.isSame(r.minDate,"year"))):(z.start=!!(r.minDate&&ue.isSame(r.minDate,"year")),z.end=!!(he&&ue.isSame(he,"year"))),w.isSame(ue)&&(z.type="today"),z.text=A;const O=ue.toDate();z.disabled=r.disabledDate&&r.disabledDate(O)||!1,L[M]=z}}return T}),m=()=>{var S;(S=c.value)==null||S.focus()},y=S=>{const T={},w=dayjs().locale(u.value),x=S.text;return T.disabled=r.disabledDate?i(x,u.value).every(r.disabledDate):!1,T.today=w.year()===x,T.current=castArray(r.parsedValue).findIndex(L=>L.year()===x)>=0,S.inRange&&(T["in-range"]=!0,S.start&&(T["start-date"]=!0),S.end&&(T["end-date"]=!0)),T},g=S=>{const T=S.text;return castArray(r.date).findIndex(w=>w.year()===T)>=0},b=S=>{var T;const w=(T=S.target)==null?void 0:T.closest("td");if(!w||!w.textContent||hasClass(w,"disabled"))return;const x=w.cellIndex,M=w.parentNode.rowIndex*4+x+p.value,z=dayjs().year(M);if(r.selectionMode==="range")r.rangeState.selecting?(r.minDate&&z>=r.minDate?n("pick",{minDate:r.minDate,maxDate:z}):n("pick",{minDate:z,maxDate:r.minDate}),n("select",!1)):(n("pick",{minDate:z,maxDate:null}),n("select",!0));else if(r.selectionMode==="years"){if(S.type==="keydown"){n("pick",castArray(r.parsedValue),!1);return}const A=getValidDateOfYear(z.startOf("year"),u.value,r.disabledDate),ue=hasClass(w,"current")?castArray(r.parsedValue).filter(he=>(he==null?void 0:he.year())!==M):castArray(r.parsedValue).concat([A]);n("pick",ue)}else n("pick",M)},_=S=>{var T;if(!r.rangeState.selecting)return;const w=(T=S.target)==null?void 0:T.closest("td");if(!w)return;const x=w.parentNode.rowIndex,L=w.cellIndex;h.value[x][L].disabled||(x!==f.value||L!==v.value)&&(f.value=x,v.value=L,n("changerange",{selecting:!0,endDate:dayjs().year(p.value).add(x*4+L,"year")}))};return vue.watch(()=>r.date,async()=>{var S,T;(S=l.value)!=null&&S.contains(document.activeElement)&&(await vue.nextTick(),(T=c.value)==null||T.focus())}),t({focus:m}),(S,T)=>(vue.openBlock(),vue.createElementBlock("table",{role:"grid","aria-label":vue.unref(o)("el.datepicker.yearTablePrompt"),class:vue.normalizeClass(vue.unref(a).b()),onClick:b,onMousemove:_},[vue.createElementVNode("tbody",{ref_key:"tbodyRef",ref:l},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(h),(w,x)=>(vue.openBlock(),vue.createElementBlock("tr",{key:x},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(w,(L,M)=>(vue.openBlock(),vue.createElementBlock("td",{key:`${x}_${M}`,ref_for:!0,ref:z=>g(L)&&(c.value=z),class:vue.normalizeClass(["available",y(L)]),"aria-selected":g(L),"aria-label":String(L.text),tabindex:g(L)?0:-1,onKeydown:[vue.withKeys(vue.withModifiers(b,["prevent","stop"]),["space"]),vue.withKeys(vue.withModifiers(b,["prevent","stop"]),["enter"])]},[vue.createVNode(vue.unref(ElDatePickerCell),{cell:L},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var YearTable=_export_sfc$1(_sfc_main$y,[["__file","basic-year-table.vue"]]);const _sfc_main$x=vue.defineComponent({__name:"panel-date-pick",props:panelDatePickProps,emits:["pick","set-picker-option","panel-change"],setup(e,{emit:t}){const n=e,r=(D,oe,k)=>!0,i=useNamespace("picker-panel"),a=useNamespace("date-picker"),o=vue.useAttrs(),u=vue.useSlots(),{t:l,lang:c}=useLocale(),p=vue.inject(PICKER_BASE_INJECTION_KEY),d=vue.inject(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY),f=vue.inject(TOOLTIP_INJECTION_KEY),{shortcuts:v,disabledDate:h,cellClassName:m,defaultTime:y}=p.props,g=vue.toRef(p.props,"defaultValue"),b=vue.ref(),_=vue.ref(dayjs().locale(c.value)),S=vue.ref(!1);let T=!1;const w=vue.computed(()=>dayjs(y).locale(c.value)),x=vue.computed(()=>_.value.month()),L=vue.computed(()=>_.value.year()),M=vue.ref([]),z=vue.ref(null),A=vue.ref(null),ue=D=>M.value.length>0?r(D,M.value,n.format||"HH:mm:ss"):!0,he=D=>y&&!Sn.value&&!S.value&&!T?w.value.year(D.year()).month(D.month()).date(D.date()):Fe.value?D.millisecond(0):D.startOf("day"),j=(D,...oe)=>{if(!D)t("pick",D,...oe);else if(isArray$1(D)){const k=D.map(he);t("pick",k,...oe)}else t("pick",he(D),...oe);z.value=null,A.value=null,S.value=!1,T=!1},O=async(D,oe)=>{if(re.value==="date"){D=D;let k=n.parsedValue?n.parsedValue.year(D.year()).month(D.month()).date(D.date()):D;ue(k)||(k=M.value[0][0].year(D.year()).month(D.month()).date(D.date())),_.value=k,j(k,Fe.value||oe),n.type==="datetime"&&(await vue.nextTick(),Rn())}else re.value==="week"?j(D.date):re.value==="dates"&&j(D,!0)},F=D=>{const oe=D?"add":"subtract";_.value=_.value[oe](1,"month"),vn("month")},Y=D=>{const oe=_.value,k=D?"add":"subtract";_.value=$.value==="year"?oe[k](10,"year"):oe[k](1,"year"),vn("year")},$=vue.ref("date"),V=vue.computed(()=>{const D=l("el.datepicker.year");if($.value==="year"){const oe=Math.floor(L.value/10)*10;return D?`${oe} ${D} - ${oe+9} ${D}`:`${oe} - ${oe+9}`}return`${L.value} ${D}`}),ie=D=>{const oe=isFunction$1(D.value)?D.value():D.value;if(oe){T=!0,j(dayjs(oe).locale(c.value));return}D.onClick&&D.onClick({attrs:o,slots:u,emit:t})},re=vue.computed(()=>{const{type:D}=n;return["week","month","months","year","years","dates"].includes(D)?D:"date"}),ae=vue.computed(()=>re.value==="dates"||re.value==="months"||re.value==="years"),le=vue.computed(()=>re.value==="date"?$.value:re.value),_e=vue.computed(()=>!!v.length),Oe=async(D,oe)=>{re.value==="month"?(_.value=getValidDateOfMonth(_.value,_.value.year(),D,c.value,h),j(_.value,!1)):re.value==="months"?j(D,oe??!0):(_.value=getValidDateOfMonth(_.value,_.value.year(),D,c.value,h),$.value="date",["month","year","date","week"].includes(re.value)&&(j(_.value,!0),await vue.nextTick(),Rn())),vn("month")},Ce=async(D,oe)=>{if(re.value==="year"){const k=_.value.startOf("year").year(D);_.value=getValidDateOfYear(k,c.value,h),j(_.value,!1)}else if(re.value==="years")j(D,oe??!0);else{const k=_.value.year(D);_.value=getValidDateOfYear(k,c.value,h),$.value="month",["month","year","date","week"].includes(re.value)&&(j(_.value,!0),await vue.nextTick(),Rn())}vn("year")},xe=async D=>{$.value=D,await vue.nextTick(),Rn()},Fe=vue.computed(()=>n.type==="datetime"||n.type==="datetimerange"),At=vue.computed(()=>{const D=Fe.value||re.value==="dates",oe=re.value==="years",k=re.value==="months",pe=$.value==="date",Ne=$.value==="year",ze=$.value==="month";return D&&pe||oe&&Ne||k&&ze}),Dt=vue.computed(()=>h?n.parsedValue?isArray$1(n.parsedValue)?h(n.parsedValue[0].toDate()):h(n.parsedValue.toDate()):!0:!1),Lt=()=>{if(ae.value)j(n.parsedValue);else{let D=n.parsedValue;if(!D){const oe=dayjs(y).locale(c.value),k=Vn();D=oe.year(k.year()).month(k.month()).date(k.date())}_.value=D,j(D)}},_n=vue.computed(()=>h?h(dayjs().locale(c.value).toDate()):!1),Cn=()=>{const oe=dayjs().locale(c.value).toDate();S.value=!0,(!h||!h(oe))&&ue(oe)&&(_.value=dayjs().locale(c.value),j(_.value))},An=vue.computed(()=>n.timeFormat||extractTimeFormat(n.format)),Tn=vue.computed(()=>n.dateFormat||extractDateFormat(n.format)),Sn=vue.computed(()=>{if(A.value)return A.value;if(!(!n.parsedValue&&!g.value))return(n.parsedValue||_.value).format(An.value)}),bn=vue.computed(()=>{if(z.value)return z.value;if(!(!n.parsedValue&&!g.value))return(n.parsedValue||_.value).format(Tn.value)}),wn=vue.ref(!1),Ue=()=>{wn.value=!0},En=()=>{wn.value=!1},Pn=D=>({hour:D.hour(),minute:D.minute(),second:D.second(),year:D.year(),month:D.month(),date:D.date()}),Mn=(D,oe,k)=>{const{hour:pe,minute:Ne,second:ze}=Pn(D),jt=n.parsedValue?n.parsedValue.hour(pe).minute(Ne).second(ze):D;_.value=jt,j(_.value,!0),k||(wn.value=oe)},$n=D=>{const oe=dayjs(D,An.value).locale(c.value);if(oe.isValid()&&ue(oe)){const{year:k,month:pe,date:Ne}=Pn(_.value);_.value=oe.year(k).month(pe).date(Ne),A.value=null,wn.value=!1,j(_.value,!0)}},$e=D=>{const oe=correctlyParseUserInput(D,Tn.value,c.value,d);if(oe.isValid()){if(h&&h(oe.toDate()))return;const{hour:k,minute:pe,second:Ne}=Pn(_.value);_.value=oe.hour(k).minute(pe).second(Ne),z.value=null,j(_.value,!0)}},Et=D=>dayjs.isDayjs(D)&&D.isValid()&&(h?!h(D.toDate()):!0),On=D=>isArray$1(D)?D.map(oe=>oe.format(n.format)):D.format(n.format),In=D=>correctlyParseUserInput(D,n.format,c.value,d),Vn=()=>{const D=dayjs(g.value).locale(c.value);if(!g.value){const oe=w.value;return dayjs().hour(oe.hour()).minute(oe.minute()).second(oe.second()).locale(c.value)}return D},Rn=()=>{var D;["week","month","year","date"].includes(re.value)&&((D=b.value)==null||D.focus())},hn=()=>{Rn(),re.value==="week"&&xn(EVENT_CODE.down)},zn=D=>{const{code:oe}=D;[EVENT_CODE.up,EVENT_CODE.down,EVENT_CODE.left,EVENT_CODE.right,EVENT_CODE.home,EVENT_CODE.end,EVENT_CODE.pageUp,EVENT_CODE.pageDown].includes(oe)&&(xn(oe),D.stopPropagation(),D.preventDefault()),[EVENT_CODE.enter,EVENT_CODE.space,EVENT_CODE.numpadEnter].includes(oe)&&z.value===null&&A.value===null&&(D.preventDefault(),j(_.value,!1))},xn=D=>{var oe;const{up:k,down:pe,left:Ne,right:ze,home:jt,end:Nn,pageUp:kn,pageDown:qn}=EVENT_CODE,Un={year:{[k]:-4,[pe]:4,[Ne]:-1,[ze]:1,offset:(Ie,kt)=>Ie.setFullYear(Ie.getFullYear()+kt)},month:{[k]:-4,[pe]:4,[Ne]:-1,[ze]:1,offset:(Ie,kt)=>Ie.setMonth(Ie.getMonth()+kt)},week:{[k]:-1,[pe]:1,[Ne]:-1,[ze]:1,offset:(Ie,kt)=>Ie.setDate(Ie.getDate()+kt*7)},date:{[k]:-7,[pe]:7,[Ne]:-1,[ze]:1,[jt]:Ie=>-Ie.getDay(),[Nn]:Ie=>-Ie.getDay()+6,[kn]:Ie=>-new Date(Ie.getFullYear(),Ie.getMonth(),0).getDate(),[qn]:Ie=>new Date(Ie.getFullYear(),Ie.getMonth()+1,0).getDate(),offset:(Ie,kt)=>Ie.setDate(Ie.getDate()+kt)}},Bn=_.value.toDate();for(;Math.abs(_.value.diff(Bn,"year",!0))<1;){const Ie=Un[le.value];if(!Ie)return;if(Ie.offset(Bn,isFunction$1(Ie[D])?Ie[D](Bn):(oe=Ie[D])!=null?oe:0),h&&h(Bn))break;const kt=dayjs(Bn).locale(c.value);_.value=kt,t("pick",kt,!0);break}},vn=D=>{t("panel-change",_.value.toDate(),D,$.value)};return vue.watch(()=>re.value,D=>{if(["month","year"].includes(D)){$.value=D;return}else if(D==="years"){$.value="year";return}else if(D==="months"){$.value="month";return}$.value="date"},{immediate:!0}),vue.watch(()=>$.value,()=>{f==null||f.updatePopper()}),vue.watch(()=>g.value,D=>{D&&(_.value=Vn())},{immediate:!0}),vue.watch(()=>n.parsedValue,D=>{if(D){if(ae.value||isArray$1(D))return;_.value=D}else _.value=Vn()},{immediate:!0}),t("set-picker-option",["isValidValue",Et]),t("set-picker-option",["formatToString",On]),t("set-picker-option",["parseUserInput",In]),t("set-picker-option",["handleFocusPicker",hn]),(D,oe)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([vue.unref(i).b(),vue.unref(a).b(),{"has-sidebar":D.$slots.sidebar||vue.unref(_e),"has-time":vue.unref(Fe)}])},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(i).e("body-wrapper"))},[vue.renderSlot(D.$slots,"sidebar",{class:vue.normalizeClass(vue.unref(i).e("sidebar"))}),vue.unref(_e)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(i).e("sidebar"))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(v),(k,pe)=>(vue.openBlock(),vue.createElementBlock("button",{key:pe,type:"button",class:vue.normalizeClass(vue.unref(i).e("shortcut")),onClick:Ne=>ie(k)},vue.toDisplayString(k.text),11,["onClick"]))),128))],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(i).e("body"))},[vue.unref(Fe)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(a).e("time-header"))},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(a).e("editor-wrap"))},[vue.createVNode(vue.unref(ElInput),{placeholder:vue.unref(l)("el.datepicker.selectDate"),"model-value":vue.unref(bn),size:"small","validate-event":!1,onInput:k=>z.value=k,onChange:$e},null,8,["placeholder","model-value","onInput"])],2),vue.withDirectives((vue.openBlock(),vue.createElementBlock("span",{class:vue.normalizeClass(vue.unref(a).e("editor-wrap"))},[vue.createVNode(vue.unref(ElInput),{placeholder:vue.unref(l)("el.datepicker.selectTime"),"model-value":vue.unref(Sn),size:"small","validate-event":!1,onFocus:Ue,onInput:k=>A.value=k,onChange:$n},null,8,["placeholder","model-value","onInput"]),vue.createVNode(vue.unref(TimePickPanel),{visible:wn.value,format:vue.unref(An),"parsed-value":_.value,onPick:Mn},null,8,["visible","format","parsed-value"])],2)),[[vue.unref(ClickOutside),En]])],2)):vue.createCommentVNode("v-if",!0),vue.withDirectives(vue.createElementVNode("div",{class:vue.normalizeClass([vue.unref(a).e("header"),($.value==="year"||$.value==="month")&&vue.unref(a).e("header--bordered")])},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(a).e("prev-btn"))},[vue.createElementVNode("button",{type:"button","aria-label":vue.unref(l)("el.datepicker.prevYear"),class:vue.normalizeClass(["d-arrow-left",vue.unref(i).e("icon-btn")]),onClick:k=>Y(!1)},[vue.renderSlot(D.$slots,"prev-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_left_default))]),_:1})])],10,["aria-label","onClick"]),vue.withDirectives(vue.createElementVNode("button",{type:"button","aria-label":vue.unref(l)("el.datepicker.prevMonth"),class:vue.normalizeClass([vue.unref(i).e("icon-btn"),"arrow-left"]),onClick:k=>F(!1)},[vue.renderSlot(D.$slots,"prev-month",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_left_default))]),_:1})])],10,["aria-label","onClick"]),[[vue.vShow,$.value==="date"]])],2),vue.createElementVNode("span",{role:"button",class:vue.normalizeClass(vue.unref(a).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:vue.withKeys(k=>xe("year"),["enter"]),onClick:k=>xe("year")},vue.toDisplayString(vue.unref(V)),43,["onKeydown","onClick"]),vue.withDirectives(vue.createElementVNode("span",{role:"button","aria-live":"polite",tabindex:"0",class:vue.normalizeClass([vue.unref(a).e("header-label"),{active:$.value==="month"}]),onKeydown:vue.withKeys(k=>xe("month"),["enter"]),onClick:k=>xe("month")},vue.toDisplayString(vue.unref(l)(`el.datepicker.month${vue.unref(x)+1}`)),43,["onKeydown","onClick"]),[[vue.vShow,$.value==="date"]]),vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(a).e("next-btn"))},[vue.withDirectives(vue.createElementVNode("button",{type:"button","aria-label":vue.unref(l)("el.datepicker.nextMonth"),class:vue.normalizeClass([vue.unref(i).e("icon-btn"),"arrow-right"]),onClick:k=>F(!0)},[vue.renderSlot(D.$slots,"next-month",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_right_default))]),_:1})])],10,["aria-label","onClick"]),[[vue.vShow,$.value==="date"]]),vue.createElementVNode("button",{type:"button","aria-label":vue.unref(l)("el.datepicker.nextYear"),class:vue.normalizeClass([vue.unref(i).e("icon-btn"),"d-arrow-right"]),onClick:k=>Y(!0)},[vue.renderSlot(D.$slots,"next-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_right_default))]),_:1})])],10,["aria-label","onClick"])],2)],2),[[vue.vShow,$.value!=="time"]]),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(i).e("content")),onKeydown:zn},[$.value==="date"?(vue.openBlock(),vue.createBlock(DateTable,{key:0,ref_key:"currentViewRef",ref:b,"selection-mode":vue.unref(re),date:_.value,"parsed-value":D.parsedValue,"disabled-date":vue.unref(h),"cell-class-name":vue.unref(m),onPick:O},null,8,["selection-mode","date","parsed-value","disabled-date","cell-class-name"])):vue.createCommentVNode("v-if",!0),$.value==="year"?(vue.openBlock(),vue.createBlock(YearTable,{key:1,ref_key:"currentViewRef",ref:b,"selection-mode":vue.unref(re),date:_.value,"disabled-date":vue.unref(h),"parsed-value":D.parsedValue,onPick:Ce},null,8,["selection-mode","date","disabled-date","parsed-value"])):vue.createCommentVNode("v-if",!0),$.value==="month"?(vue.openBlock(),vue.createBlock(MonthTable,{key:2,ref_key:"currentViewRef",ref:b,"selection-mode":vue.unref(re),date:_.value,"parsed-value":D.parsedValue,"disabled-date":vue.unref(h),onPick:Oe},null,8,["selection-mode","date","parsed-value","disabled-date"])):vue.createCommentVNode("v-if",!0)],34)],2)],2),vue.withDirectives(vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(i).e("footer"))},[vue.withDirectives(vue.createVNode(vue.unref(ElButton),{text:"",size:"small",class:vue.normalizeClass(vue.unref(i).e("link-btn")),disabled:vue.unref(_n),onClick:Cn},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(l)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[vue.vShow,!vue.unref(ae)&&D.showNow]]),vue.createVNode(vue.unref(ElButton),{plain:"",size:"small",class:vue.normalizeClass(vue.unref(i).e("link-btn")),disabled:vue.unref(Dt),onClick:Lt},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(l)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2),[[vue.vShow,vue.unref(At)]])],2))}});var DatePickPanel=_export_sfc$1(_sfc_main$x,[["__file","panel-date-pick.vue"]]);const panelDateRangeProps=buildProps({...panelSharedProps,...panelRangeSharedProps}),useShortcut=e=>{const{emit:t}=vue.getCurrentInstance(),n=vue.useAttrs(),r=vue.useSlots();return a=>{const o=isFunction$1(a.value)?a.value():a.value;if(o){t("pick",[dayjs(o[0]).locale(e.value),dayjs(o[1]).locale(e.value)]);return}a.onClick&&a.onClick({attrs:n,slots:r,emit:t})}},useRangePicker=(e,{defaultValue:t,defaultTime:n,leftDate:r,rightDate:i,step:a,unit:o,onParsedValueChanged:u})=>{const{emit:l}=vue.getCurrentInstance(),{pickerNs:c}=vue.inject(ROOT_PICKER_INJECTION_KEY),p=useNamespace("date-range-picker"),{t:d,lang:f}=useLocale(),v=useShortcut(f),h=vue.ref(),m=vue.ref(),y=vue.ref({endDate:null,selecting:!1}),g=w=>{y.value=w},b=(w=!1)=>{const x=vue.unref(h),L=vue.unref(m);isValidRange([x,L])&&l("pick",[x,L],w)},_=w=>{y.value.selecting=w,w||(y.value.endDate=null)},S=w=>{if(isArray$1(w)&&w.length===2){const[x,L]=w;h.value=x,r.value=x,m.value=L,u(vue.unref(h),vue.unref(m))}else T()},T=()=>{let[w,x]=getDefaultValue(vue.unref(t),{lang:vue.unref(f),step:a,unit:o,unlinkPanels:e.unlinkPanels});const L=z=>z.diff(z.startOf("d"),"ms"),M=vue.unref(n);if(M){let z=0,A=0;if(isArray$1(M)){const[ue,he]=M.map(dayjs);z=L(ue),A=L(he)}else{const ue=L(dayjs(M));z=ue,A=ue}w=w.startOf("d").add(z,"ms"),x=x.startOf("d").add(A,"ms")}h.value=void 0,m.value=void 0,r.value=w,i.value=x};return vue.watch(t,w=>{w&&T()},{immediate:!0}),vue.watch(()=>e.parsedValue,S,{immediate:!0}),{minDate:h,maxDate:m,rangeState:y,lang:f,ppNs:c,drpNs:p,handleChangeRange:g,handleRangeConfirm:b,handleShortcutClick:v,onSelect:_,onReset:S,t:d}},usePanelDateRange=(e,t,n,r)=>{const i=vue.ref("date"),a=vue.ref(),o=vue.ref("date"),u=vue.ref(),l=vue.inject(PICKER_BASE_INJECTION_KEY),{disabledDate:c}=l.props,{t:p,lang:d}=useLocale(),f=vue.computed(()=>n.value.year()),v=vue.computed(()=>n.value.month()),h=vue.computed(()=>r.value.year()),m=vue.computed(()=>r.value.month());function y(w,x){const L=p("el.datepicker.year");if(w.value==="year"){const M=Math.floor(x.value/10)*10;return L?`${M} ${L} - ${M+9} ${L}`:`${M} - ${M+9}`}return`${x.value} ${L}`}function g(w){w==null||w.focus()}async function b(w,x){const L=w==="left"?i:o,M=w==="left"?a:u;L.value=x,await vue.nextTick(),g(M.value)}async function _(w,x,L){const M=x==="left",z=M?n:r,A=M?r:n,ue=M?i:o,he=M?a:u;if(w==="year"){const j=z.value.year(L);z.value=getValidDateOfYear(j,d.value,c)}w==="month"&&(z.value=getValidDateOfMonth(z.value,z.value.year(),L,d.value,c)),e.unlinkPanels||(A.value=x==="left"?z.value.add(1,"month"):z.value.subtract(1,"month")),ue.value=w==="year"?"month":"date",await vue.nextTick(),g(he.value),S(w)}function S(w){t("panel-change",[n.value.toDate(),r.value.toDate()],w)}function T(w,x,L){const M=L?"add":"subtract";return w==="year"?x[M](10,"year"):x[M](1,"year")}return{leftCurrentView:i,rightCurrentView:o,leftCurrentViewRef:a,rightCurrentViewRef:u,leftYear:f,rightYear:h,leftMonth:v,rightMonth:m,leftYearLabel:vue.computed(()=>y(i,f)),rightYearLabel:vue.computed(()=>y(o,h)),showLeftPicker:w=>b("left",w),showRightPicker:w=>b("right",w),handleLeftYearPick:w=>_("year","left",w),handleRightYearPick:w=>_("year","right",w),handleLeftMonthPick:w=>_("month","left",w),handleRightMonthPick:w=>_("month","right",w),handlePanelChange:S,adjustDateByView:T}},unit$2="month",_sfc_main$w=vue.defineComponent({__name:"panel-date-range",props:panelDateRangeProps,emits:["pick","set-picker-option","calendar-change","panel-change"],setup(e,{emit:t}){const n=e,r=vue.inject(PICKER_BASE_INJECTION_KEY),i=vue.inject(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY),{disabledDate:a,cellClassName:o,defaultTime:u,clearable:l}=r.props,c=vue.toRef(r.props,"format"),p=vue.toRef(r.props,"shortcuts"),d=vue.toRef(r.props,"defaultValue"),{lang:f}=useLocale(),v=vue.ref(dayjs().locale(f.value)),h=vue.ref(dayjs().locale(f.value).add(1,unit$2)),{minDate:m,maxDate:y,rangeState:g,ppNs:b,drpNs:_,handleChangeRange:S,handleRangeConfirm:T,handleShortcutClick:w,onSelect:x,onReset:L,t:M}=useRangePicker(n,{defaultValue:d,defaultTime:u,leftDate:v,rightDate:h,unit:unit$2,onParsedValueChanged:Bn});vue.watch(()=>n.visible,Ie=>{!Ie&&g.value.selecting&&(L(n.parsedValue),x(!1))});const z=vue.ref({min:null,max:null}),A=vue.ref({min:null,max:null}),{leftCurrentView:ue,rightCurrentView:he,leftCurrentViewRef:j,rightCurrentViewRef:O,leftYear:F,rightYear:Y,leftMonth:$,rightMonth:V,leftYearLabel:ie,rightYearLabel:re,showLeftPicker:ae,showRightPicker:le,handleLeftYearPick:_e,handleRightYearPick:Oe,handleLeftMonthPick:Ce,handleRightMonthPick:xe,handlePanelChange:Fe,adjustDateByView:At}=usePanelDateRange(n,t,v,h),Dt=vue.computed(()=>!!p.value.length),Lt=vue.computed(()=>z.value.min!==null?z.value.min:m.value?m.value.format(Sn.value):""),_n=vue.computed(()=>z.value.max!==null?z.value.max:y.value||m.value?(y.value||m.value).format(Sn.value):""),Cn=vue.computed(()=>A.value.min!==null?A.value.min:m.value?m.value.format(Tn.value):""),An=vue.computed(()=>A.value.max!==null?A.value.max:y.value||m.value?(y.value||m.value).format(Tn.value):""),Tn=vue.computed(()=>n.timeFormat||extractTimeFormat(c.value)),Sn=vue.computed(()=>n.dateFormat||extractDateFormat(c.value)),bn=Ie=>isValidRange(Ie)&&(a?!a(Ie[0].toDate())&&!a(Ie[1].toDate()):!0),wn=()=>{v.value=At(ue.value,v.value,!1),n.unlinkPanels||(h.value=v.value.add(1,"month")),Fe("year")},Ue=()=>{v.value=v.value.subtract(1,"month"),n.unlinkPanels||(h.value=v.value.add(1,"month")),Fe("month")},En=()=>{n.unlinkPanels?h.value=At(he.value,h.value,!0):(v.value=At(he.value,v.value,!0),h.value=v.value.add(1,"month")),Fe("year")},Pn=()=>{n.unlinkPanels?h.value=h.value.add(1,"month"):(v.value=v.value.add(1,"month"),h.value=v.value.add(1,"month")),Fe("month")},Mn=()=>{v.value=At(ue.value,v.value,!0),Fe("year")},$n=()=>{v.value=v.value.add(1,"month"),Fe("month")},$e=()=>{h.value=At(he.value,h.value,!1),Fe("year")},Et=()=>{h.value=h.value.subtract(1,"month"),Fe("month")},On=vue.computed(()=>{const Ie=($.value+1)%12,kt=$.value+1>=12?1:0;return n.unlinkPanels&&new Date(F.value+kt,Ie)<new Date(Y.value,V.value)}),In=vue.computed(()=>n.unlinkPanels&&Y.value*12+V.value-(F.value*12+$.value+1)>=12),Vn=vue.computed(()=>!(m.value&&y.value&&!g.value.selecting&&isValidRange([m.value,y.value]))),Rn=vue.computed(()=>n.type==="datetime"||n.type==="datetimerange"),hn=(Ie,kt)=>{if(Ie)return u?dayjs(u[kt]||u).locale(f.value).year(Ie.year()).month(Ie.month()).date(Ie.date()):Ie},zn=(Ie,kt=!0)=>{const qe=Ie.minDate,Ln=Ie.maxDate,Hn=hn(qe,0),Wn=hn(Ln,1);y.value===Wn&&m.value===Hn||(t("calendar-change",[qe.toDate(),Ln&&Ln.toDate()]),y.value=Wn,m.value=Hn,!(!kt||Rn.value)&&T())},xn=vue.ref(!1),vn=vue.ref(!1),D=()=>{xn.value=!1},oe=()=>{vn.value=!1},k=(Ie,kt)=>{z.value[kt]=Ie;const qe=dayjs(Ie,Sn.value).locale(f.value);if(qe.isValid()){if(a&&a(qe.toDate()))return;kt==="min"?(v.value=qe,m.value=(m.value||v.value).year(qe.year()).month(qe.month()).date(qe.date()),!n.unlinkPanels&&(!y.value||y.value.isBefore(m.value))&&(h.value=qe.add(1,"month"),y.value=m.value.add(1,"month"))):(h.value=qe,y.value=(y.value||h.value).year(qe.year()).month(qe.month()).date(qe.date()),!n.unlinkPanels&&(!m.value||m.value.isAfter(y.value))&&(v.value=qe.subtract(1,"month"),m.value=y.value.subtract(1,"month")))}},pe=(Ie,kt)=>{z.value[kt]=null},Ne=(Ie,kt)=>{A.value[kt]=Ie;const qe=dayjs(Ie,Tn.value).locale(f.value);qe.isValid()&&(kt==="min"?(xn.value=!0,m.value=(m.value||v.value).hour(qe.hour()).minute(qe.minute()).second(qe.second())):(vn.value=!0,y.value=(y.value||h.value).hour(qe.hour()).minute(qe.minute()).second(qe.second()),h.value=y.value))},ze=(Ie,kt)=>{A.value[kt]=null,kt==="min"?(v.value=m.value,xn.value=!1,(!y.value||y.value.isBefore(m.value))&&(y.value=m.value)):(h.value=y.value,vn.value=!1,y.value&&y.value.isBefore(m.value)&&(m.value=y.value))},jt=(Ie,kt,qe)=>{A.value.min||(Ie&&(v.value=Ie,m.value=(m.value||v.value).hour(Ie.hour()).minute(Ie.minute()).second(Ie.second())),qe||(xn.value=kt),(!y.value||y.value.isBefore(m.value))&&(y.value=m.value,h.value=Ie))},Nn=(Ie,kt,qe)=>{A.value.max||(Ie&&(h.value=Ie,y.value=(y.value||h.value).hour(Ie.hour()).minute(Ie.minute()).second(Ie.second())),qe||(vn.value=kt),y.value&&y.value.isBefore(m.value)&&(m.value=y.value))},kn=()=>{v.value=getDefaultValue(vue.unref(d),{lang:vue.unref(f),unit:"month",unlinkPanels:n.unlinkPanels})[0],h.value=v.value.add(1,"month"),y.value=void 0,m.value=void 0,t("pick",null)},qn=Ie=>isArray$1(Ie)?Ie.map(kt=>kt.format(c.value)):Ie.format(c.value),Un=Ie=>correctlyParseUserInput(Ie,c.value,f.value,i);function Bn(Ie,kt){if(n.unlinkPanels&&kt){const qe=(Ie==null?void 0:Ie.year())||0,Ln=(Ie==null?void 0:Ie.month())||0,Hn=kt.year(),Wn=kt.month();h.value=qe===Hn&&Ln===Wn?kt.add(1,unit$2):kt}else h.value=v.value.add(1,unit$2),kt&&(h.value=h.value.hour(kt.hour()).minute(kt.minute()).second(kt.second()))}return t("set-picker-option",["isValidValue",bn]),t("set-picker-option",["parseUserInput",Un]),t("set-picker-option",["formatToString",qn]),t("set-picker-option",["handleClear",kn]),(Ie,kt)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([vue.unref(b).b(),vue.unref(_).b(),{"has-sidebar":Ie.$slots.sidebar||vue.unref(Dt),"has-time":vue.unref(Rn)}])},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(b).e("body-wrapper"))},[vue.renderSlot(Ie.$slots,"sidebar",{class:vue.normalizeClass(vue.unref(b).e("sidebar"))}),vue.unref(Dt)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(b).e("sidebar"))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(p),(qe,Ln)=>(vue.openBlock(),vue.createElementBlock("button",{key:Ln,type:"button",class:vue.normalizeClass(vue.unref(b).e("shortcut")),onClick:Hn=>vue.unref(w)(qe)},vue.toDisplayString(qe.text),11,["onClick"]))),128))],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(b).e("body"))},[vue.unref(Rn)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(_).e("time-header"))},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(_).e("editors-wrap"))},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(_).e("time-picker-wrap"))},[vue.createVNode(vue.unref(ElInput),{size:"small",disabled:vue.unref(g).selecting,placeholder:vue.unref(M)("el.datepicker.startDate"),class:vue.normalizeClass(vue.unref(_).e("editor")),"model-value":vue.unref(Lt),"validate-event":!1,onInput:qe=>k(qe,"min"),onChange:qe=>pe(qe,"min")},null,8,["disabled","placeholder","class","model-value","onInput","onChange"])],2),vue.withDirectives((vue.openBlock(),vue.createElementBlock("span",{class:vue.normalizeClass(vue.unref(_).e("time-picker-wrap"))},[vue.createVNode(vue.unref(ElInput),{size:"small",class:vue.normalizeClass(vue.unref(_).e("editor")),disabled:vue.unref(g).selecting,placeholder:vue.unref(M)("el.datepicker.startTime"),"model-value":vue.unref(Cn),"validate-event":!1,onFocus:qe=>xn.value=!0,onInput:qe=>Ne(qe,"min"),onChange:qe=>ze(qe,"min")},null,8,["class","disabled","placeholder","model-value","onFocus","onInput","onChange"]),vue.createVNode(vue.unref(TimePickPanel),{visible:xn.value,format:vue.unref(Tn),"datetime-role":"start","parsed-value":v.value,onPick:jt},null,8,["visible","format","parsed-value"])],2)),[[vue.unref(ClickOutside),D]])],2),vue.createElementVNode("span",null,[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_right_default))]),_:1})]),vue.createElementVNode("span",{class:vue.normalizeClass([vue.unref(_).e("editors-wrap"),"is-right"])},[vue.createElementVNode("span",{class:vue.normalizeClass(vue.unref(_).e("time-picker-wrap"))},[vue.createVNode(vue.unref(ElInput),{size:"small",class:vue.normalizeClass(vue.unref(_).e("editor")),disabled:vue.unref(g).selecting,placeholder:vue.unref(M)("el.datepicker.endDate"),"model-value":vue.unref(_n),readonly:!vue.unref(m),"validate-event":!1,onInput:qe=>k(qe,"max"),onChange:qe=>pe(qe,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onInput","onChange"])],2),vue.withDirectives((vue.openBlock(),vue.createElementBlock("span",{class:vue.normalizeClass(vue.unref(_).e("time-picker-wrap"))},[vue.createVNode(vue.unref(ElInput),{size:"small",class:vue.normalizeClass(vue.unref(_).e("editor")),disabled:vue.unref(g).selecting,placeholder:vue.unref(M)("el.datepicker.endTime"),"model-value":vue.unref(An),readonly:!vue.unref(m),"validate-event":!1,onFocus:qe=>vue.unref(m)&&(vn.value=!0),onInput:qe=>Ne(qe,"max"),onChange:qe=>ze(qe,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onFocus","onInput","onChange"]),vue.createVNode(vue.unref(TimePickPanel),{"datetime-role":"end",visible:vn.value,format:vue.unref(Tn),"parsed-value":h.value,onPick:Nn},null,8,["visible","format","parsed-value"])],2)),[[vue.unref(ClickOutside),oe]])],2)],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{class:vue.normalizeClass([[vue.unref(b).e("content"),vue.unref(_).e("content")],"is-left"])},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(_).e("header"))},[vue.createElementVNode("button",{type:"button",class:vue.normalizeClass([vue.unref(b).e("icon-btn"),"d-arrow-left"]),"aria-label":vue.unref(M)("el.datepicker.prevYear"),onClick:wn},[vue.renderSlot(Ie.$slots,"prev-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_left_default))]),_:1})])],10,["aria-label"]),vue.withDirectives(vue.createElementVNode("button",{type:"button",class:vue.normalizeClass([vue.unref(b).e("icon-btn"),"arrow-left"]),"aria-label":vue.unref(M)("el.datepicker.prevMonth"),onClick:Ue},[vue.renderSlot(Ie.$slots,"prev-month",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_left_default))]),_:1})])],10,["aria-label"]),[[vue.vShow,vue.unref(ue)==="date"]]),Ie.unlinkPanels?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",disabled:!vue.unref(In),class:vue.normalizeClass([[vue.unref(b).e("icon-btn"),{"is-disabled":!vue.unref(In)}],"d-arrow-right"]),"aria-label":vue.unref(M)("el.datepicker.nextYear"),onClick:Mn},[vue.renderSlot(Ie.$slots,"next-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_right_default))]),_:1})])],10,["disabled","aria-label"])):vue.createCommentVNode("v-if",!0),Ie.unlinkPanels&&vue.unref(ue)==="date"?(vue.openBlock(),vue.createElementBlock("button",{key:1,type:"button",disabled:!vue.unref(On),class:vue.normalizeClass([[vue.unref(b).e("icon-btn"),{"is-disabled":!vue.unref(On)}],"arrow-right"]),"aria-label":vue.unref(M)("el.datepicker.nextMonth"),onClick:$n},[vue.renderSlot(Ie.$slots,"next-month",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_right_default))]),_:1})])],10,["disabled","aria-label"])):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",null,[vue.createElementVNode("span",{role:"button",class:vue.normalizeClass(vue.unref(_).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:vue.withKeys(qe=>vue.unref(ae)("year"),["enter"]),onClick:qe=>vue.unref(ae)("year")},vue.toDisplayString(vue.unref(ie)),43,["onKeydown","onClick"]),vue.withDirectives(vue.createElementVNode("span",{role:"button","aria-live":"polite",tabindex:"0",class:vue.normalizeClass([vue.unref(_).e("header-label"),{active:vue.unref(ue)==="month"}]),onKeydown:vue.withKeys(qe=>vue.unref(ae)("month"),["enter"]),onClick:qe=>vue.unref(ae)("month")},vue.toDisplayString(vue.unref(M)(`el.datepicker.month${v.value.month()+1}`)),43,["onKeydown","onClick"]),[[vue.vShow,vue.unref(ue)==="date"]])])],2),vue.unref(ue)==="date"?(vue.openBlock(),vue.createBlock(DateTable,{key:0,ref_key:"leftCurrentViewRef",ref:j,"selection-mode":"range",date:v.value,"min-date":vue.unref(m),"max-date":vue.unref(y),"range-state":vue.unref(g),"disabled-date":vue.unref(a),"cell-class-name":vue.unref(o),onChangerange:vue.unref(S),onPick:zn,onSelect:vue.unref(x)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])):vue.createCommentVNode("v-if",!0),vue.unref(ue)==="year"?(vue.openBlock(),vue.createBlock(YearTable,{key:1,ref_key:"leftCurrentViewRef",ref:j,"selection-mode":"year",date:v.value,"disabled-date":vue.unref(a),"parsed-value":Ie.parsedValue,onPick:vue.unref(_e)},null,8,["date","disabled-date","parsed-value","onPick"])):vue.createCommentVNode("v-if",!0),vue.unref(ue)==="month"?(vue.openBlock(),vue.createBlock(MonthTable,{key:2,ref_key:"leftCurrentViewRef",ref:j,"selection-mode":"month",date:v.value,"parsed-value":Ie.parsedValue,"disabled-date":vue.unref(a),onPick:vue.unref(Ce)},null,8,["date","parsed-value","disabled-date","onPick"])):vue.createCommentVNode("v-if",!0)],2),vue.createElementVNode("div",{class:vue.normalizeClass([[vue.unref(b).e("content"),vue.unref(_).e("content")],"is-right"])},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(_).e("header"))},[Ie.unlinkPanels?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",disabled:!vue.unref(In),class:vue.normalizeClass([[vue.unref(b).e("icon-btn"),{"is-disabled":!vue.unref(In)}],"d-arrow-left"]),"aria-label":vue.unref(M)("el.datepicker.prevYear"),onClick:$e},[vue.renderSlot(Ie.$slots,"prev-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_left_default))]),_:1})])],10,["disabled","aria-label"])):vue.createCommentVNode("v-if",!0),Ie.unlinkPanels&&vue.unref(he)==="date"?(vue.openBlock(),vue.createElementBlock("button",{key:1,type:"button",disabled:!vue.unref(On),class:vue.normalizeClass([[vue.unref(b).e("icon-btn"),{"is-disabled":!vue.unref(On)}],"arrow-left"]),"aria-label":vue.unref(M)("el.datepicker.prevMonth"),onClick:Et},[vue.renderSlot(Ie.$slots,"prev-month",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_left_default))]),_:1})])],10,["disabled","aria-label"])):vue.createCommentVNode("v-if",!0),vue.createElementVNode("button",{type:"button","aria-label":vue.unref(M)("el.datepicker.nextYear"),class:vue.normalizeClass([vue.unref(b).e("icon-btn"),"d-arrow-right"]),onClick:En},[vue.renderSlot(Ie.$slots,"next-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_right_default))]),_:1})])],10,["aria-label"]),vue.withDirectives(vue.createElementVNode("button",{type:"button",class:vue.normalizeClass([vue.unref(b).e("icon-btn"),"arrow-right"]),"aria-label":vue.unref(M)("el.datepicker.nextMonth"),onClick:Pn},[vue.renderSlot(Ie.$slots,"next-month",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(arrow_right_default))]),_:1})])],10,["aria-label"]),[[vue.vShow,vue.unref(he)==="date"]]),vue.createElementVNode("div",null,[vue.createElementVNode("span",{role:"button",class:vue.normalizeClass(vue.unref(_).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:vue.withKeys(qe=>vue.unref(le)("year"),["enter"]),onClick:qe=>vue.unref(le)("year")},vue.toDisplayString(vue.unref(re)),43,["onKeydown","onClick"]),vue.withDirectives(vue.createElementVNode("span",{role:"button","aria-live":"polite",tabindex:"0",class:vue.normalizeClass([vue.unref(_).e("header-label"),{active:vue.unref(he)==="month"}]),onKeydown:vue.withKeys(qe=>vue.unref(le)("month"),["enter"]),onClick:qe=>vue.unref(le)("month")},vue.toDisplayString(vue.unref(M)(`el.datepicker.month${h.value.month()+1}`)),43,["onKeydown","onClick"]),[[vue.vShow,vue.unref(he)==="date"]])])],2),vue.unref(he)==="date"?(vue.openBlock(),vue.createBlock(DateTable,{key:0,ref_key:"rightCurrentViewRef",ref:O,"selection-mode":"range",date:h.value,"min-date":vue.unref(m),"max-date":vue.unref(y),"range-state":vue.unref(g),"disabled-date":vue.unref(a),"cell-class-name":vue.unref(o),onChangerange:vue.unref(S),onPick:zn,onSelect:vue.unref(x)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])):vue.createCommentVNode("v-if",!0),vue.unref(he)==="year"?(vue.openBlock(),vue.createBlock(YearTable,{key:1,ref_key:"rightCurrentViewRef",ref:O,"selection-mode":"year",date:h.value,"disabled-date":vue.unref(a),"parsed-value":Ie.parsedValue,onPick:vue.unref(Oe)},null,8,["date","disabled-date","parsed-value","onPick"])):vue.createCommentVNode("v-if",!0),vue.unref(he)==="month"?(vue.openBlock(),vue.createBlock(MonthTable,{key:2,ref_key:"rightCurrentViewRef",ref:O,"selection-mode":"month",date:h.value,"parsed-value":Ie.parsedValue,"disabled-date":vue.unref(a),onPick:vue.unref(xe)},null,8,["date","parsed-value","disabled-date","onPick"])):vue.createCommentVNode("v-if",!0)],2)],2)],2),vue.unref(Rn)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(b).e("footer"))},[vue.unref(l)?(vue.openBlock(),vue.createBlock(vue.unref(ElButton),{key:0,text:"",size:"small",class:vue.normalizeClass(vue.unref(b).e("link-btn")),onClick:kn},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(M)("el.datepicker.clear")),1)]),_:1},8,["class"])):vue.createCommentVNode("v-if",!0),vue.createVNode(vue.unref(ElButton),{plain:"",size:"small",class:vue.normalizeClass(vue.unref(b).e("link-btn")),disabled:vue.unref(Vn),onClick:qe=>vue.unref(T)(!1)},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(vue.unref(M)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled","onClick"])],2)):vue.createCommentVNode("v-if",!0)],2))}});var DateRangePickPanel=_export_sfc$1(_sfc_main$w,[["__file","panel-date-range.vue"]]);const panelMonthRangeProps=buildProps({...panelRangeSharedProps}),panelMonthRangeEmits=["pick","set-picker-option","calendar-change"],useMonthRangeHeader=({unlinkPanels:e,leftDate:t,rightDate:n})=>{const{t:r}=useLocale(),i=()=>{t.value=t.value.subtract(1,"year"),e.value||(n.value=n.value.subtract(1,"year"))},a=()=>{e.value||(t.value=t.value.add(1,"year")),n.value=n.value.add(1,"year")},o=()=>{t.value=t.value.add(1,"year")},u=()=>{n.value=n.value.subtract(1,"year")},l=vue.computed(()=>`${t.value.year()} ${r("el.datepicker.year")}`),c=vue.computed(()=>`${n.value.year()} ${r("el.datepicker.year")}`),p=vue.computed(()=>t.value.year()),d=vue.computed(()=>n.value.year()===t.value.year()?t.value.year()+1:n.value.year());return{leftPrevYear:i,rightNextYear:a,leftNextYear:o,rightPrevYear:u,leftLabel:l,rightLabel:c,leftYear:p,rightYear:d}},unit$1="year",__default__$5=vue.defineComponent({name:"DatePickerMonthRange"}),_sfc_main$v=vue.defineComponent({...__default__$5,props:panelMonthRangeProps,emits:panelMonthRangeEmits,setup(e,{emit:t}){const n=e,{lang:r}=useLocale(),i=vue.inject(PICKER_BASE_INJECTION_KEY),a=vue.inject(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY),{shortcuts:o,disabledDate:u}=i.props,l=vue.toRef(i.props,"format"),c=vue.toRef(i.props,"defaultValue"),p=vue.ref(dayjs().locale(r.value)),d=vue.ref(dayjs().locale(r.value).add(1,unit$1)),{minDate:f,maxDate:v,rangeState:h,ppNs:m,drpNs:y,handleChangeRange:g,handleRangeConfirm:b,handleShortcutClick:_,onSelect:S,onReset:T}=useRangePicker(n,{defaultValue:c,leftDate:p,rightDate:d,unit:unit$1,onParsedValueChanged:ie}),w=vue.computed(()=>!!o.length),{leftPrevYear:x,rightNextYear:L,leftNextYear:M,rightPrevYear:z,leftLabel:A,rightLabel:ue,leftYear:he,rightYear:j}=useMonthRangeHeader({unlinkPanels:vue.toRef(n,"unlinkPanels"),leftDate:p,rightDate:d}),O=vue.computed(()=>n.unlinkPanels&&j.value>he.value+1),F=(re,ae=!0)=>{const le=re.minDate,_e=re.maxDate;v.value===_e&&f.value===le||(t("calendar-change",[le.toDate(),_e&&_e.toDate()]),v.value=_e,f.value=le,ae&&b())},Y=()=>{p.value=getDefaultValue(vue.unref(c),{lang:vue.unref(r),unit:"year",unlinkPanels:n.unlinkPanels})[0],d.value=p.value.add(1,"year"),t("pick",null)},$=re=>isArray$1(re)?re.map(ae=>ae.format(l.value)):re.format(l.value),V=re=>correctlyParseUserInput(re,l.value,r.value,a);function ie(re,ae){if(n.unlinkPanels&&ae){const le=(re==null?void 0:re.year())||0,_e=ae.year();d.value=le===_e?ae.add(1,unit$1):ae}else d.value=p.value.add(1,unit$1)}return vue.watch(()=>n.visible,re=>{!re&&h.value.selecting&&(T(n.parsedValue),S(!1))}),t("set-picker-option",["isValidValue",isValidRange]),t("set-picker-option",["formatToString",$]),t("set-picker-option",["parseUserInput",V]),t("set-picker-option",["handleClear",Y]),(re,ae)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([vue.unref(m).b(),vue.unref(y).b(),{"has-sidebar":!!re.$slots.sidebar||vue.unref(w)}])},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(m).e("body-wrapper"))},[vue.renderSlot(re.$slots,"sidebar",{class:vue.normalizeClass(vue.unref(m).e("sidebar"))}),vue.unref(w)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(m).e("sidebar"))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(o),(le,_e)=>(vue.openBlock(),vue.createElementBlock("button",{key:_e,type:"button",class:vue.normalizeClass(vue.unref(m).e("shortcut")),onClick:Oe=>vue.unref(_)(le)},vue.toDisplayString(le.text),11,["onClick"]))),128))],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(m).e("body"))},[vue.createElementVNode("div",{class:vue.normalizeClass([[vue.unref(m).e("content"),vue.unref(y).e("content")],"is-left"])},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(y).e("header"))},[vue.createElementVNode("button",{type:"button",class:vue.normalizeClass([vue.unref(m).e("icon-btn"),"d-arrow-left"]),onClick:vue.unref(x)},[vue.renderSlot(re.$slots,"prev-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_left_default))]),_:1})])],10,["onClick"]),re.unlinkPanels?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",disabled:!vue.unref(O),class:vue.normalizeClass([[vue.unref(m).e("icon-btn"),{[vue.unref(m).is("disabled")]:!vue.unref(O)}],"d-arrow-right"]),onClick:vue.unref(M)},[vue.renderSlot(re.$slots,"next-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_right_default))]),_:1})])],10,["disabled","onClick"])):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",null,vue.toDisplayString(vue.unref(A)),1)],2),vue.createVNode(MonthTable,{"selection-mode":"range",date:p.value,"min-date":vue.unref(f),"max-date":vue.unref(v),"range-state":vue.unref(h),"disabled-date":vue.unref(u),onChangerange:vue.unref(g),onPick:F,onSelect:vue.unref(S)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2),vue.createElementVNode("div",{class:vue.normalizeClass([[vue.unref(m).e("content"),vue.unref(y).e("content")],"is-right"])},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(y).e("header"))},[re.unlinkPanels?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",disabled:!vue.unref(O),class:vue.normalizeClass([[vue.unref(m).e("icon-btn"),{"is-disabled":!vue.unref(O)}],"d-arrow-left"]),onClick:vue.unref(z)},[vue.renderSlot(re.$slots,"prev-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_left_default))]),_:1})])],10,["disabled","onClick"])):vue.createCommentVNode("v-if",!0),vue.createElementVNode("button",{type:"button",class:vue.normalizeClass([vue.unref(m).e("icon-btn"),"d-arrow-right"]),onClick:vue.unref(L)},[vue.renderSlot(re.$slots,"next-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_right_default))]),_:1})])],10,["onClick"]),vue.createElementVNode("div",null,vue.toDisplayString(vue.unref(ue)),1)],2),vue.createVNode(MonthTable,{"selection-mode":"range",date:d.value,"min-date":vue.unref(f),"max-date":vue.unref(v),"range-state":vue.unref(h),"disabled-date":vue.unref(u),onChangerange:vue.unref(g),onPick:F,onSelect:vue.unref(S)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2)],2)],2)],2))}});var MonthRangePickPanel=_export_sfc$1(_sfc_main$v,[["__file","panel-month-range.vue"]]);const panelYearRangeProps=buildProps({...panelRangeSharedProps}),panelYearRangeEmits=["pick","set-picker-option","calendar-change"],useYearRangeHeader=({unlinkPanels:e,leftDate:t,rightDate:n})=>{const r=()=>{t.value=t.value.subtract(10,"year"),e.value||(n.value=n.value.subtract(10,"year"))},i=()=>{e.value||(t.value=t.value.add(10,"year")),n.value=n.value.add(10,"year")},a=()=>{t.value=t.value.add(10,"year")},o=()=>{n.value=n.value.subtract(10,"year")},u=vue.computed(()=>{const d=Math.floor(t.value.year()/10)*10;return`${d}-${d+9}`}),l=vue.computed(()=>{const d=Math.floor(n.value.year()/10)*10;return`${d}-${d+9}`}),c=vue.computed(()=>Math.floor(t.value.year()/10)*10+9),p=vue.computed(()=>Math.floor(n.value.year()/10)*10);return{leftPrevYear:r,rightNextYear:i,leftNextYear:a,rightPrevYear:o,leftLabel:u,rightLabel:l,leftYear:c,rightYear:p}},step=10,unit="year",__default__$4=vue.defineComponent({name:"DatePickerYearRange"}),_sfc_main$u=vue.defineComponent({...__default__$4,props:panelYearRangeProps,emits:panelYearRangeEmits,setup(e,{emit:t}){const n=e,{lang:r}=useLocale(),i=vue.ref(dayjs().locale(r.value)),a=vue.ref(dayjs().locale(r.value).add(step,unit)),o=vue.inject(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY),u=vue.inject(PICKER_BASE_INJECTION_KEY),{shortcuts:l,disabledDate:c}=u.props,p=vue.toRef(u.props,"format"),d=vue.toRef(u.props,"defaultValue"),{minDate:f,maxDate:v,rangeState:h,ppNs:m,drpNs:y,handleChangeRange:g,handleRangeConfirm:b,handleShortcutClick:_,onSelect:S,onReset:T}=useRangePicker(n,{defaultValue:d,leftDate:i,rightDate:a,step,unit,onParsedValueChanged:_e}),{leftPrevYear:w,rightNextYear:x,leftNextYear:L,rightPrevYear:M,leftLabel:z,rightLabel:A,leftYear:ue,rightYear:he}=useYearRangeHeader({unlinkPanels:vue.toRef(n,"unlinkPanels"),leftDate:i,rightDate:a}),j=vue.computed(()=>!!l.length),O=vue.computed(()=>[m.b(),y.b(),{"has-sidebar":!!vue.useSlots().sidebar||j.value}]),F=vue.computed(()=>({content:[m.e("content"),y.e("content"),"is-left"],arrowLeftBtn:[m.e("icon-btn"),"d-arrow-left"],arrowRightBtn:[m.e("icon-btn"),{[m.is("disabled")]:!$.value},"d-arrow-right"]})),Y=vue.computed(()=>({content:[m.e("content"),y.e("content"),"is-right"],arrowLeftBtn:[m.e("icon-btn"),{"is-disabled":!$.value},"d-arrow-left"],arrowRightBtn:[m.e("icon-btn"),"d-arrow-right"]})),$=vue.computed(()=>n.unlinkPanels&&he.value>ue.value+1),V=(Oe,Ce=!0)=>{const xe=Oe.minDate,Fe=Oe.maxDate;v.value===Fe&&f.value===xe||(t("calendar-change",[xe.toDate(),Fe&&Fe.toDate()]),v.value=Fe,f.value=xe,Ce&&b())},ie=Oe=>correctlyParseUserInput(Oe,p.value,r.value,o),re=Oe=>isArray$1(Oe)?Oe.map(Ce=>Ce.format(p.value)):Oe.format(p.value),ae=Oe=>isValidRange(Oe)&&(c?!c(Oe[0].toDate())&&!c(Oe[1].toDate()):!0),le=()=>{const Oe=getDefaultValue(vue.unref(d),{lang:vue.unref(r),step,unit,unlinkPanels:n.unlinkPanels});i.value=Oe[0],a.value=Oe[1],t("pick",null)};function _e(Oe,Ce){if(n.unlinkPanels&&Ce){const xe=(Oe==null?void 0:Oe.year())||0,Fe=Ce.year();a.value=xe+step>Fe?Ce.add(step,unit):Ce}else a.value=i.value.add(step,unit)}return vue.watch(()=>n.visible,Oe=>{!Oe&&h.value.selecting&&(T(n.parsedValue),S(!1))}),t("set-picker-option",["isValidValue",ae]),t("set-picker-option",["parseUserInput",ie]),t("set-picker-option",["formatToString",re]),t("set-picker-option",["handleClear",le]),(Oe,Ce)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(vue.unref(O))},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(m).e("body-wrapper"))},[vue.renderSlot(Oe.$slots,"sidebar",{class:vue.normalizeClass(vue.unref(m).e("sidebar"))}),vue.unref(j)?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(m).e("sidebar"))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(vue.unref(l),(xe,Fe)=>(vue.openBlock(),vue.createElementBlock("button",{key:Fe,type:"button",class:vue.normalizeClass(vue.unref(m).e("shortcut")),onClick:At=>vue.unref(_)(xe)},vue.toDisplayString(xe.text),11,["onClick"]))),128))],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(m).e("body"))},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(F).content)},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(y).e("header"))},[vue.createElementVNode("button",{type:"button",class:vue.normalizeClass(vue.unref(F).arrowLeftBtn),onClick:vue.unref(w)},[vue.renderSlot(Oe.$slots,"prev-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_left_default))]),_:1})])],10,["onClick"]),Oe.unlinkPanels?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",disabled:!vue.unref($),class:vue.normalizeClass(vue.unref(F).arrowRightBtn),onClick:vue.unref(L)},[vue.renderSlot(Oe.$slots,"next-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_right_default))]),_:1})])],10,["disabled","onClick"])):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",null,vue.toDisplayString(vue.unref(z)),1)],2),vue.createVNode(YearTable,{"selection-mode":"range",date:i.value,"min-date":vue.unref(f),"max-date":vue.unref(v),"range-state":vue.unref(h),"disabled-date":vue.unref(c),onChangerange:vue.unref(g),onPick:V,onSelect:vue.unref(S)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(Y).content)},[vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(y).e("header"))},[Oe.unlinkPanels?(vue.openBlock(),vue.createElementBlock("button",{key:0,type:"button",disabled:!vue.unref($),class:vue.normalizeClass(vue.unref(Y).arrowLeftBtn),onClick:vue.unref(M)},[vue.renderSlot(Oe.$slots,"prev-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_left_default))]),_:1})])],10,["disabled","onClick"])):vue.createCommentVNode("v-if",!0),vue.createElementVNode("button",{type:"button",class:vue.normalizeClass(vue.unref(Y).arrowRightBtn),onClick:vue.unref(x)},[vue.renderSlot(Oe.$slots,"next-year",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.createVNode(vue.unref(d_arrow_right_default))]),_:1})])],10,["onClick"]),vue.createElementVNode("div",null,vue.toDisplayString(vue.unref(A)),1)],2),vue.createVNode(YearTable,{"selection-mode":"range",date:a.value,"min-date":vue.unref(f),"max-date":vue.unref(v),"range-state":vue.unref(h),"disabled-date":vue.unref(c),onChangerange:vue.unref(g),onPick:V,onSelect:vue.unref(S)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2)],2)],2)],2))}});var YearRangePickPanel=_export_sfc$1(_sfc_main$u,[["__file","panel-year-range.vue"]]);const getPanel=function(e){switch(e){case"daterange":case"datetimerange":return DateRangePickPanel;case"monthrange":return MonthRangePickPanel;case"yearrange":return YearRangePickPanel;default:return DatePickPanel}};dayjs.extend(localeData),dayjs.extend(advancedFormat),dayjs.extend(customParseFormat),dayjs.extend(weekOfYear),dayjs.extend(weekYear),dayjs.extend(dayOfYear),dayjs.extend(isSameOrAfter),dayjs.extend(isSameOrBefore);var DatePicker=vue.defineComponent({name:"ElDatePicker",install:null,props:datePickerProps,emits:[UPDATE_MODEL_EVENT],setup(e,{expose:t,emit:n,slots:r}){const i=useNamespace("picker-panel"),a=vue.computed(()=>!e.format);vue.provide(ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY,a),vue.provide(PICKER_POPPER_OPTIONS_INJECTION_KEY,vue.reactive(vue.toRef(e,"popperOptions"))),vue.provide(ROOT_PICKER_INJECTION_KEY,{slots:r,pickerNs:i});const o=vue.ref();t({focus:()=>{var c;(c=o.value)==null||c.focus()},blur:()=>{var c;(c=o.value)==null||c.blur()},handleOpen:()=>{var c;(c=o.value)==null||c.handleOpen()},handleClose:()=>{var c;(c=o.value)==null||c.handleClose()}});const l=c=>{n(UPDATE_MODEL_EVENT,c)};return()=>{var c;const p=(c=e.format)!=null?c:DEFAULT_FORMATS_DATEPICKER[e.type]||DEFAULT_FORMATS_DATE,d=getPanel(e.type);return vue.createVNode(CommonPicker,vue.mergeProps(e,{format:p,type:e.type,ref:o,"onUpdate:modelValue":l}),{default:f=>vue.createVNode(d,f,{"prev-month":r["prev-month"],"next-month":r["next-month"],"prev-year":r["prev-year"],"next-year":r["next-year"]}),"range-separator":r["range-separator"]})}}});const ElDatePicker=withInstall(DatePicker),useSameTarget=e=>{if(!e)return{onClick:NOOP,onMousedown:NOOP,onMouseup:NOOP};let t=!1,n=!1;return{onClick:o=>{t&&n&&e(o),t=n=!1},onMousedown:o=>{t=o.target===o.currentTarget},onMouseup:o=>{n=o.target===o.currentTarget}}},overlayProps=buildProps({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:definePropType([String,Array,Object])},zIndex:{type:definePropType([String,Number])}}),overlayEmits={click:e=>e instanceof MouseEvent},BLOCK="overlay";var Overlay=vue.defineComponent({name:"ElOverlay",props:overlayProps,emits:overlayEmits,setup(e,{slots:t,emit:n}){const r=useNamespace(BLOCK),i=l=>{n("click",l)},{onClick:a,onMousedown:o,onMouseup:u}=useSameTarget(e.customMaskEvent?void 0:i);return()=>e.mask?vue.createVNode("div",{class:[r.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:a,onMousedown:o,onMouseup:u},[vue.renderSlot(t,"default")],PatchFlags.STYLE|PatchFlags.CLASS|PatchFlags.PROPS,["onClick","onMouseup","onMousedown"]):vue.h("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[vue.renderSlot(t,"default")])}});const ElOverlay=Overlay,dialogInjectionKey=Symbol("dialogInjectionKey"),dialogContentProps=buildProps({center:Boolean,alignCenter:Boolean,closeIcon:{type:iconPropType},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,headerClass:String,bodyClass:String,footerClass:String,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),dialogContentEmits={close:()=>!0},useDraggable=(e,t,n,r)=>{const i={offsetX:0,offsetY:0},a=(d,f)=>{if(e.value){const{offsetX:v,offsetY:h}=i,m=e.value.getBoundingClientRect(),y=m.left,g=m.top,b=m.width,_=m.height,S=document.documentElement.clientWidth,T=document.documentElement.clientHeight,w=-y+v,x=-g+h,L=S-y-b+v,M=T-g-(_<T?_:0)+h;r!=null&&r.value||(d=Math.min(Math.max(d,w),L),f=Math.min(Math.max(f,x),M)),i.offsetX=d,i.offsetY=f,e.value.style.transform=`translate(${addUnit(d)}, ${addUnit(f)})`}},o=d=>{const f=d.clientX,v=d.clientY,{offsetX:h,offsetY:m}=i,y=b=>{const _=h+b.clientX-f,S=m+b.clientY-v;a(_,S)},g=()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",g)};document.addEventListener("mousemove",y),document.addEventListener("mouseup",g)},u=()=>{t.value&&e.value&&(t.value.addEventListener("mousedown",o),window.addEventListener("resize",p))},l=()=>{t.value&&e.value&&(t.value.removeEventListener("mousedown",o),window.removeEventListener("resize",p))},c=()=>{i.offsetX=0,i.offsetY=0,e.value&&(e.value.style.transform="")},p=()=>{const{offsetX:d,offsetY:f}=i;a(d,f)};return vue.onMounted(()=>{vue.watchEffect(()=>{n.value?u():l()})}),vue.onBeforeUnmount(()=>{l()}),{resetPosition:c,updatePosition:p}},composeRefs=(...e)=>t=>{e.forEach(n=>{isFunction$1(n)?n(t):n.value=t})},__default__$3=vue.defineComponent({name:"ElDialogContent"}),_sfc_main$t=vue.defineComponent({...__default__$3,props:dialogContentProps,emits:dialogContentEmits,setup(e,{expose:t}){const n=e,{t:r}=useLocale(),{Close:i}=CloseComponents,{dialogRef:a,headerRef:o,bodyId:u,ns:l,style:c}=vue.inject(dialogInjectionKey),{focusTrapRef:p}=vue.inject(FOCUS_TRAP_INJECTION_KEY),d=vue.computed(()=>[l.b(),l.is("fullscreen",n.fullscreen),l.is("draggable",n.draggable),l.is("align-center",n.alignCenter),{[l.m("center")]:n.center}]),f=composeRefs(p,a),v=vue.computed(()=>n.draggable),h=vue.computed(()=>n.overflow),{resetPosition:m,updatePosition:y}=useDraggable(a,o,v,h);return t({resetPosition:m,updatePosition:y}),(g,b)=>(vue.openBlock(),vue.createElementBlock("div",{ref:vue.unref(f),class:vue.normalizeClass(vue.unref(d)),style:vue.normalizeStyle(vue.unref(c)),tabindex:"-1"},[vue.createElementVNode("header",{ref_key:"headerRef",ref:o,class:vue.normalizeClass([vue.unref(l).e("header"),g.headerClass,{"show-close":g.showClose}])},[vue.renderSlot(g.$slots,"header",{},()=>[vue.createElementVNode("span",{role:"heading","aria-level":g.ariaLevel,class:vue.normalizeClass(vue.unref(l).e("title"))},vue.toDisplayString(g.title),11,["aria-level"])]),g.showClose?(vue.openBlock(),vue.createElementBlock("button",{key:0,"aria-label":vue.unref(r)("el.dialog.close"),class:vue.normalizeClass(vue.unref(l).e("headerbtn")),type:"button",onClick:_=>g.$emit("close")},[vue.createVNode(vue.unref(ElIcon),{class:vue.normalizeClass(vue.unref(l).e("close"))},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(g.closeIcon||vue.unref(i))))]),_:1},8,["class"])],10,["aria-label","onClick"])):vue.createCommentVNode("v-if",!0)],2),vue.createElementVNode("div",{id:vue.unref(u),class:vue.normalizeClass([vue.unref(l).e("body"),g.bodyClass])},[vue.renderSlot(g.$slots,"default")],10,["id"]),g.$slots.footer?(vue.openBlock(),vue.createElementBlock("footer",{key:0,class:vue.normalizeClass([vue.unref(l).e("footer"),g.footerClass])},[vue.renderSlot(g.$slots,"footer")],2)):vue.createCommentVNode("v-if",!0)],6))}});var ElDialogContent=_export_sfc$1(_sfc_main$t,[["__file","dialog-content.vue"]]);const dialogProps=buildProps({...dialogContentProps,appendToBody:Boolean,appendTo:{type:teleportProps.to.type,default:"body"},beforeClose:{type:definePropType(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,headerClass:String,bodyClass:String,footerClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"}}),dialogEmits={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[UPDATE_MODEL_EVENT]:e=>isBoolean(e),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},useLockscreen=(e,t={})=>{vue.isRef(e)||throwError("[useLockscreen]","You need to pass a ref param to this function");const n=t.ns||useNamespace("popup"),r=vue.computed(()=>n.bm("parent","hidden"));if(!isClient||hasClass(document.body,r.value))return;let i=0,a=!1,o="0";const u=()=>{setTimeout(()=>{typeof document>"u"||a&&document&&(document.body.style.width=o,removeClass(document.body,r.value))},200)};vue.watch(e,l=>{if(!l){u();return}a=!hasClass(document.body,r.value),a&&(o=document.body.style.width,addClass(document.body,r.value)),i=getScrollBarWidth(n.namespace.value);const c=document.documentElement.clientHeight<document.body.scrollHeight,p=getStyle(document.body,"overflowY");i>0&&(c||p==="scroll")&&a&&(document.body.style.width=`calc(100% - ${i}px)`)}),vue.onScopeDispose(()=>u())},useDialog=(e,t)=>{var n;const i=vue.getCurrentInstance().emit,{nextZIndex:a}=useZIndex();let o="";const u=useId(),l=useId(),c=vue.ref(!1),p=vue.ref(!1),d=vue.ref(!1),f=vue.ref((n=e.zIndex)!=null?n:a());let v,h;const m=useGlobalConfig("namespace",defaultNamespace),y=vue.computed(()=>{const O={},F=`--${m.value}-dialog`;return e.fullscreen||(e.top&&(O[`${F}-margin-top`]=e.top),e.width&&(O[`${F}-width`]=addUnit(e.width))),O}),g=vue.computed(()=>e.alignCenter?{display:"flex"}:{});function b(){i("opened")}function _(){i("closed"),i(UPDATE_MODEL_EVENT,!1),e.destroyOnClose&&(d.value=!1)}function S(){i("close")}function T(){h==null||h(),v==null||v(),e.openDelay&&e.openDelay>0?{stop:v}=useTimeoutFn(()=>M(),e.openDelay):M()}function w(){v==null||v(),h==null||h(),e.closeDelay&&e.closeDelay>0?{stop:h}=useTimeoutFn(()=>z(),e.closeDelay):z()}function x(){function O(F){F||(p.value=!0,c.value=!1)}e.beforeClose?e.beforeClose(O):w()}function L(){e.closeOnClickModal&&x()}function M(){isClient&&(c.value=!0)}function z(){c.value=!1}function A(){i("openAutoFocus")}function ue(){i("closeAutoFocus")}function he(O){var F;((F=O.detail)==null?void 0:F.focusReason)==="pointer"&&O.preventDefault()}e.lockScroll&&useLockscreen(c);function j(){e.closeOnPressEscape&&x()}return vue.watch(()=>e.zIndex,()=>{var O;f.value=(O=e.zIndex)!=null?O:a()}),vue.watch(()=>e.modelValue,O=>{var F;O?(p.value=!1,T(),d.value=!0,f.value=(F=e.zIndex)!=null?F:a(),vue.nextTick(()=>{i("open"),t.value&&(t.value.parentElement.scrollTop=0,t.value.parentElement.scrollLeft=0,t.value.scrollTop=0)})):c.value&&w()}),vue.watch(()=>e.fullscreen,O=>{t.value&&(O?(o=t.value.style.transform,t.value.style.transform=""):t.value.style.transform=o)}),vue.onMounted(()=>{e.modelValue&&(c.value=!0,d.value=!0,T())}),{afterEnter:b,afterLeave:_,beforeLeave:S,handleClose:x,onModalClick:L,close:w,doClose:z,onOpenAutoFocus:A,onCloseAutoFocus:ue,onCloseRequested:j,onFocusoutPrevented:he,titleId:u,bodyId:l,closed:p,style:y,overlayDialogStyle:g,rendered:d,visible:c,zIndex:f}},__default__$2=vue.defineComponent({name:"ElDialog",inheritAttrs:!1}),_sfc_main$s=vue.defineComponent({...__default__$2,props:dialogProps,emits:dialogEmits,setup(e,{expose:t}){const n=e,r=vue.useSlots();useDeprecated({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},vue.computed(()=>!!r.title));const i=useNamespace("dialog"),a=vue.ref(),o=vue.ref(),u=vue.ref(),{visible:l,titleId:c,bodyId:p,style:d,overlayDialogStyle:f,rendered:v,zIndex:h,afterEnter:m,afterLeave:y,beforeLeave:g,handleClose:b,onModalClick:_,onOpenAutoFocus:S,onCloseAutoFocus:T,onCloseRequested:w,onFocusoutPrevented:x}=useDialog(n,a);vue.provide(dialogInjectionKey,{dialogRef:a,headerRef:o,bodyId:p,ns:i,rendered:v,style:d});const L=useSameTarget(_),M=vue.computed(()=>n.draggable&&!n.fullscreen);return t({visible:l,dialogContentRef:u,resetPosition:()=>{var A;(A=u.value)==null||A.resetPosition()},handleClose:b}),(A,ue)=>(vue.openBlock(),vue.createBlock(vue.unref(ElTeleport),{to:A.appendTo,disabled:A.appendTo!=="body"?!1:!A.appendToBody},{default:vue.withCtx(()=>[vue.createVNode(vue.Transition,{name:"dialog-fade",onAfterEnter:vue.unref(m),onAfterLeave:vue.unref(y),onBeforeLeave:vue.unref(g),persisted:""},{default:vue.withCtx(()=>[vue.withDirectives(vue.createVNode(vue.unref(ElOverlay),{"custom-mask-event":"",mask:A.modal,"overlay-class":A.modalClass,"z-index":vue.unref(h)},{default:vue.withCtx(()=>[vue.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":A.title||void 0,"aria-labelledby":A.title?void 0:vue.unref(c),"aria-describedby":vue.unref(p),class:vue.normalizeClass(`${vue.unref(i).namespace.value}-overlay-dialog`),style:vue.normalizeStyle(vue.unref(f)),onClick:vue.unref(L).onClick,onMousedown:vue.unref(L).onMousedown,onMouseup:vue.unref(L).onMouseup},[vue.createVNode(vue.unref(ElFocusTrap),{loop:"",trapped:vue.unref(l),"focus-start-el":"container",onFocusAfterTrapped:vue.unref(S),onFocusAfterReleased:vue.unref(T),onFocusoutPrevented:vue.unref(x),onReleaseRequested:vue.unref(w)},{default:vue.withCtx(()=>[vue.unref(v)?(vue.openBlock(),vue.createBlock(ElDialogContent,vue.mergeProps({key:0,ref_key:"dialogContentRef",ref:u},A.$attrs,{center:A.center,"align-center":A.alignCenter,"close-icon":A.closeIcon,draggable:vue.unref(M),overflow:A.overflow,fullscreen:A.fullscreen,"header-class":A.headerClass,"body-class":A.bodyClass,"footer-class":A.footerClass,"show-close":A.showClose,title:A.title,"aria-level":A.headerAriaLevel,onClose:vue.unref(b)}),vue.createSlots({header:vue.withCtx(()=>[A.$slots.title?vue.renderSlot(A.$slots,"title",{key:1}):vue.renderSlot(A.$slots,"header",{key:0,close:vue.unref(b),titleId:vue.unref(c),titleClass:vue.unref(i).e("title")})]),default:vue.withCtx(()=>[vue.renderSlot(A.$slots,"default")]),_:2},[A.$slots.footer?{name:"footer",fn:vue.withCtx(()=>[vue.renderSlot(A.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","header-class","body-class","footer-class","show-close","title","aria-level","onClose"])):vue.createCommentVNode("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[vue.vShow,vue.unref(l)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var Dialog=_export_sfc$1(_sfc_main$s,[["__file","dialog.vue"]]);const ElDialog=withInstall(Dialog),inputNumberProps=buildProps({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.POSITIVE_INFINITY},min:{type:Number,default:Number.NEGATIVE_INFINITY},modelValue:{type:[Number,null]},readonly:Boolean,disabled:Boolean,size:useSizeProp,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:e=>e===null||isNumber(e)||["min","max"].includes(e),default:null},name:String,placeholder:String,precision:{type:Number,validator:e=>e>=0&&e===Number.parseInt(`${e}`,10)},validateEvent:{type:Boolean,default:!0},...useAriaProps(["ariaLabel"])}),inputNumberEmits={[CHANGE_EVENT]:(e,t)=>t!==e,blur:e=>e instanceof FocusEvent,focus:e=>e instanceof FocusEvent,[INPUT_EVENT]:e=>isNumber(e)||isNil(e),[UPDATE_MODEL_EVENT]:e=>isNumber(e)||isNil(e)},__default__$1=vue.defineComponent({name:"ElInputNumber"}),_sfc_main$r=vue.defineComponent({...__default__$1,props:inputNumberProps,emits:inputNumberEmits,setup(e,{expose:t,emit:n}){const r=e,{t:i}=useLocale(),a=useNamespace("input-number"),o=vue.ref(),u=vue.reactive({currentValue:r.modelValue,userInput:null}),{formItem:l}=useFormItem(),c=vue.computed(()=>isNumber(r.modelValue)&&r.modelValue<=r.min),p=vue.computed(()=>isNumber(r.modelValue)&&r.modelValue>=r.max),d=vue.computed(()=>{const O=g(r.step);return isUndefined(r.precision)?Math.max(g(r.modelValue),O):(O>r.precision&&debugWarn("InputNumber","precision should not be less than the decimal places of step"),r.precision)}),f=vue.computed(()=>r.controls&&r.controlsPosition==="right"),v=useFormSize(),h=useFormDisabled(),m=vue.computed(()=>{if(u.userInput!==null)return u.userInput;let O=u.currentValue;if(isNil(O))return"";if(isNumber(O)){if(Number.isNaN(O))return"";isUndefined(r.precision)||(O=O.toFixed(r.precision))}return O}),y=(O,F)=>{if(isUndefined(F)&&(F=d.value),F===0)return Math.round(O);let Y=String(O);const $=Y.indexOf(".");if($===-1||!Y.replace(".","").split("")[$+F])return O;const re=Y.length;return Y.charAt(re-1)==="5"&&(Y=`${Y.slice(0,Math.max(0,re-1))}6`),Number.parseFloat(Number(Y).toFixed(F))},g=O=>{if(isNil(O))return 0;const F=O.toString(),Y=F.indexOf(".");let $=0;return Y!==-1&&($=F.length-Y-1),$},b=(O,F=1)=>isNumber(O)?y(O+r.step*F):u.currentValue,_=()=>{if(r.readonly||h.value||p.value)return;const O=Number(m.value)||0,F=b(O);w(F),n(INPUT_EVENT,u.currentValue),he()},S=()=>{if(r.readonly||h.value||c.value)return;const O=Number(m.value)||0,F=b(O,-1);w(F),n(INPUT_EVENT,u.currentValue),he()},T=(O,F)=>{const{max:Y,min:$,step:V,precision:ie,stepStrictly:re,valueOnClear:ae}=r;Y<$&&throwError("InputNumber","min should not be greater than max.");let le=Number(O);if(isNil(O)||Number.isNaN(le))return null;if(O===""){if(ae===null)return null;le=isString$1(ae)?{min:$,max:Y}[ae]:ae}return re&&(le=y(Math.round(le/V)*V,ie),le!==O&&F&&n(UPDATE_MODEL_EVENT,le)),isUndefined(ie)||(le=y(le,ie)),(le>Y||le<$)&&(le=le>Y?Y:$,F&&n(UPDATE_MODEL_EVENT,le)),le},w=(O,F=!0)=>{var Y;const $=u.currentValue,V=T(O);if(!F){n(UPDATE_MODEL_EVENT,V);return}$===V&&O||(u.userInput=null,n(UPDATE_MODEL_EVENT,V),$!==V&&n(CHANGE_EVENT,V,$),r.validateEvent&&((Y=l==null?void 0:l.validate)==null||Y.call(l,"change").catch(ie=>debugWarn(ie))),u.currentValue=V)},x=O=>{u.userInput=O;const F=O===""?null:Number(O);n(INPUT_EVENT,F),w(F,!1)},L=O=>{const F=O!==""?Number(O):"";(isNumber(F)&&!Number.isNaN(F)||O==="")&&w(F),he(),u.userInput=null},M=()=>{var O,F;(F=(O=o.value)==null?void 0:O.focus)==null||F.call(O)},z=()=>{var O,F;(F=(O=o.value)==null?void 0:O.blur)==null||F.call(O)},A=O=>{n("focus",O)},ue=O=>{var F,Y;u.userInput=null,u.currentValue===null&&((F=o.value)!=null&&F.input)&&(o.value.input.value=""),n("blur",O),r.validateEvent&&((Y=l==null?void 0:l.validate)==null||Y.call(l,"blur").catch($=>debugWarn($)))},he=()=>{u.currentValue!==r.modelValue&&(u.currentValue=r.modelValue)},j=O=>{document.activeElement===O.target&&O.preventDefault()};return vue.watch(()=>r.modelValue,(O,F)=>{const Y=T(O,!0);u.userInput===null&&Y!==F&&(u.currentValue=Y)},{immediate:!0}),vue.onMounted(()=>{var O;const{min:F,max:Y,modelValue:$}=r,V=(O=o.value)==null?void 0:O.input;if(V.setAttribute("role","spinbutton"),Number.isFinite(Y)?V.setAttribute("aria-valuemax",String(Y)):V.removeAttribute("aria-valuemax"),Number.isFinite(F)?V.setAttribute("aria-valuemin",String(F)):V.removeAttribute("aria-valuemin"),V.setAttribute("aria-valuenow",u.currentValue||u.currentValue===0?String(u.currentValue):""),V.setAttribute("aria-disabled",String(h.value)),!isNumber($)&&$!=null){let ie=Number($);Number.isNaN(ie)&&(ie=null),n(UPDATE_MODEL_EVENT,ie)}V.addEventListener("wheel",j,{passive:!1})}),vue.onUpdated(()=>{var O,F;const Y=(O=o.value)==null?void 0:O.input;Y==null||Y.setAttribute("aria-valuenow",`${(F=u.currentValue)!=null?F:""}`)}),t({focus:M,blur:z}),(O,F)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([vue.unref(a).b(),vue.unref(a).m(vue.unref(v)),vue.unref(a).is("disabled",vue.unref(h)),vue.unref(a).is("without-controls",!O.controls),vue.unref(a).is("controls-right",vue.unref(f))]),onDragstart:vue.withModifiers(()=>{},["prevent"])},[O.controls?vue.withDirectives((vue.openBlock(),vue.createElementBlock("span",{key:0,role:"button","aria-label":vue.unref(i)("el.inputNumber.decrease"),class:vue.normalizeClass([vue.unref(a).e("decrease"),vue.unref(a).is("disabled",vue.unref(c))]),onKeydown:vue.withKeys(S,["enter"])},[vue.renderSlot(O.$slots,"decrease-icon",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.unref(f)?(vue.openBlock(),vue.createBlock(vue.unref(arrow_down_default),{key:0})):(vue.openBlock(),vue.createBlock(vue.unref(minus_default),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[vue.unref(vRepeatClick),S]]):vue.createCommentVNode("v-if",!0),O.controls?vue.withDirectives((vue.openBlock(),vue.createElementBlock("span",{key:1,role:"button","aria-label":vue.unref(i)("el.inputNumber.increase"),class:vue.normalizeClass([vue.unref(a).e("increase"),vue.unref(a).is("disabled",vue.unref(p))]),onKeydown:vue.withKeys(_,["enter"])},[vue.renderSlot(O.$slots,"increase-icon",{},()=>[vue.createVNode(vue.unref(ElIcon),null,{default:vue.withCtx(()=>[vue.unref(f)?(vue.openBlock(),vue.createBlock(vue.unref(arrow_up_default),{key:0})):(vue.openBlock(),vue.createBlock(vue.unref(plus_default),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[vue.unref(vRepeatClick),_]]):vue.createCommentVNode("v-if",!0),vue.createVNode(vue.unref(ElInput),{id:O.id,ref_key:"input",ref:o,type:"number",step:O.step,"model-value":vue.unref(m),placeholder:O.placeholder,readonly:O.readonly,disabled:vue.unref(h),size:vue.unref(v),max:O.max,min:O.min,name:O.name,"aria-label":O.ariaLabel,"validate-event":!1,onKeydown:[vue.withKeys(vue.withModifiers(_,["prevent"]),["up"]),vue.withKeys(vue.withModifiers(S,["prevent"]),["down"])],onBlur:ue,onFocus:A,onInput:x,onChange:L},vue.createSlots({_:2},[O.$slots.prefix?{name:"prefix",fn:vue.withCtx(()=>[vue.renderSlot(O.$slots,"prefix")])}:void 0,O.$slots.suffix?{name:"suffix",fn:vue.withCtx(()=>[vue.renderSlot(O.$slots,"suffix")])}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","onKeydown"])],42,["onDragstart"]))}});var InputNumber=_export_sfc$1(_sfc_main$r,[["__file","input-number.vue"]]);const ElInputNumber=withInstall(InputNumber);function useCalcInputWidth(){const e=vue.shallowRef(),t=vue.ref(0),n=11,r=vue.computed(()=>({minWidth:`${Math.max(t.value,n)}px`}));return useResizeObserver(e,()=>{var a,o;t.value=(o=(a=e.value)==null?void 0:a.getBoundingClientRect().width)!=null?o:0}),{calculatorRef:e,calculatorWidth:t,inputStyle:r}}const selectGroupKey=Symbol("ElSelectGroup"),selectKey=Symbol("ElSelect"),COMPONENT_NAME$2="ElOption",optionProps=buildProps({value:{type:[String,Number,Boolean,Object],required:!0},label:{type:[String,Number]},created:Boolean,disabled:Boolean});function useOption(e,t){const n=vue.inject(selectKey);n||throwError(COMPONENT_NAME$2,"usage: <el-select><el-option /></el-select/>");const r=vue.inject(selectGroupKey,{disabled:!1}),i=vue.computed(()=>p(castArray$1(n.props.modelValue),e.value)),a=vue.computed(()=>{var v;if(n.props.multiple){const h=castArray$1((v=n.props.modelValue)!=null?v:[]);return!i.value&&h.length>=n.props.multipleLimit&&n.props.multipleLimit>0}else return!1}),o=vue.computed(()=>{var v;return(v=e.label)!=null?v:isObject$1(e.value)?"":e.value}),u=vue.computed(()=>e.value||e.label||""),l=vue.computed(()=>e.disabled||t.groupDisabled||a.value),c=vue.getCurrentInstance(),p=(v=[],h)=>{if(isObject$1(e.value)){const m=n.props.valueKey;return v&&v.some(y=>vue.toRaw(get(y,m))===get(h,m))}else return v&&v.includes(h)},d=()=>{!e.disabled&&!r.disabled&&(n.states.hoveringIndex=n.optionsArray.indexOf(c.proxy))},f=v=>{const h=new RegExp(escapeStringRegexp(v),"i");t.visible=h.test(String(o.value))||e.created};return vue.watch(()=>o.value,()=>{!e.created&&!n.props.remote&&n.setSelected()}),vue.watch(()=>e.value,(v,h)=>{const{remote:m,valueKey:y}=n.props;if((m?v!==h:!isEqual(v,h))&&(n.onOptionDestroy(h,c.proxy),n.onOptionCreate(c.proxy)),!e.created&&!m){if(y&&isObject$1(v)&&isObject$1(h)&&v[y]===h[y])return;n.setSelected()}}),vue.watch(()=>r.disabled,()=>{t.groupDisabled=r.disabled},{immediate:!0}),{select:n,currentLabel:o,currentValue:u,itemSelected:i,isDisabled:l,hoverItem:d,updateOption:f}}const _sfc_main$q=vue.defineComponent({name:COMPONENT_NAME$2,componentName:COMPONENT_NAME$2,props:optionProps,setup(e){const t=useNamespace("select"),n=useId(),r=vue.computed(()=>[t.be("dropdown","item"),t.is("disabled",vue.unref(u)),t.is("selected",vue.unref(o)),t.is("hovering",vue.unref(f))]),i=vue.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:a,itemSelected:o,isDisabled:u,select:l,hoverItem:c,updateOption:p}=useOption(e,i),{visible:d,hover:f}=vue.toRefs(i),v=vue.getCurrentInstance().proxy;l.onOptionCreate(v),vue.onBeforeUnmount(()=>{const m=v.value,{selected:y}=l.states,g=y.some(b=>b.value===v.value);vue.nextTick(()=>{l.states.cachedOptions.get(m)===v&&!g&&l.states.cachedOptions.delete(m)}),l.onOptionDestroy(m,v)});function h(){u.value||l.handleOptionSelect(v)}return{ns:t,id:n,containerKls:r,currentLabel:a,itemSelected:o,isDisabled:u,select:l,visible:d,hover:f,states:i,hoverItem:c,updateOption:p,selectOptionClick:h}}});function _sfc_render$p(e,t){return vue.withDirectives((vue.openBlock(),vue.createElementBlock("li",{id:e.id,class:vue.normalizeClass(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMousemove:e.hoverItem,onClick:vue.withModifiers(e.selectOptionClick,["stop"])},[vue.renderSlot(e.$slots,"default",{},()=>[vue.createElementVNode("span",null,vue.toDisplayString(e.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMousemove","onClick"])),[[vue.vShow,e.visible]])}var Option=_export_sfc$1(_sfc_main$q,[["render",_sfc_render$p],["__file","option.vue"]]);const _sfc_main$p=vue.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=vue.inject(selectKey),t=useNamespace("select"),n=vue.computed(()=>e.props.popperClass),r=vue.computed(()=>e.props.multiple),i=vue.computed(()=>e.props.fitInputWidth),a=vue.ref("");function o(){var u;a.value=`${(u=e.selectRef)==null?void 0:u.offsetWidth}px`}return vue.onMounted(()=>{o(),useResizeObserver(e.selectRef,o)}),{ns:t,minWidth:a,popperClass:n,isMultiple:r,isFitInputWidth:i}}});function _sfc_render$o(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:vue.normalizeStyle({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(e.ns.be("dropdown","header"))},[vue.renderSlot(e.$slots,"header")],2)):vue.createCommentVNode("v-if",!0),vue.renderSlot(e.$slots,"default"),e.$slots.footer?(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass(e.ns.be("dropdown","footer"))},[vue.renderSlot(e.$slots,"footer")],2)):vue.createCommentVNode("v-if",!0)],6)}var ElSelectMenu=_export_sfc$1(_sfc_main$p,[["render",_sfc_render$o],["__file","select-dropdown.vue"]]);const useSelect=(e,t)=>{const{t:n}=useLocale(),r=useId(),i=useNamespace("select"),a=useNamespace("input"),o=vue.reactive({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),u=vue.ref(),l=vue.ref(),c=vue.ref(),p=vue.ref(),d=vue.ref(),f=vue.ref(),v=vue.ref(),h=vue.ref(),m=vue.ref(),y=vue.ref(),g=vue.ref(),{isComposing:b,handleCompositionStart:_,handleCompositionUpdate:S,handleCompositionEnd:T}=useComposition({afterComposition:de=>Vn(de)}),{wrapperRef:w,isFocused:x,handleBlur:L}=useFocusController(d,{beforeFocus(){return F.value},afterFocus(){e.automaticDropdown&&!M.value&&(M.value=!0,o.menuVisibleOnFocus=!0)},beforeBlur(de){var Ve,Pt;return((Ve=c.value)==null?void 0:Ve.isFocusInsideContent(de))||((Pt=p.value)==null?void 0:Pt.isFocusInsideContent(de))},afterBlur(){var de;M.value=!1,o.menuVisibleOnFocus=!1,e.validateEvent&&((de=ue==null?void 0:ue.validate)==null||de.call(ue,"blur").catch(Ve=>debugWarn(Ve)))}}),M=vue.ref(!1),z=vue.ref(),{form:A,formItem:ue}=useFormItem(),{inputId:he}=useFormItemInputId(e,{formItemContext:ue}),{valueOnClear:j,isEmptyValue:O}=useEmptyValues(e),F=vue.computed(()=>e.disabled||(A==null?void 0:A.disabled)),Y=vue.computed(()=>isArray$1(e.modelValue)?e.modelValue.length>0:!O(e.modelValue)),$=vue.computed(()=>{var de;return(de=A==null?void 0:A.statusIcon)!=null?de:!1}),V=vue.computed(()=>e.clearable&&!F.value&&o.inputHovering&&Y.value),ie=vue.computed(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),re=vue.computed(()=>i.is("reverse",!!(ie.value&&M.value))),ae=vue.computed(()=>(ue==null?void 0:ue.validateState)||""),le=vue.computed(()=>ae.value&&ValidateComponentsMap[ae.value]),_e=vue.computed(()=>e.remote?300:0),Oe=vue.computed(()=>e.remote&&!o.inputValue&&o.options.size===0),Ce=vue.computed(()=>e.loading?e.loadingText||n("el.select.loading"):e.filterable&&o.inputValue&&o.options.size>0&&xe.value===0?e.noMatchText||n("el.select.noMatch"):o.options.size===0?e.noDataText||n("el.select.noData"):null),xe=vue.computed(()=>Fe.value.filter(de=>de.visible).length),Fe=vue.computed(()=>{const de=Array.from(o.options.values()),Ve=[];return o.optionValues.forEach(Pt=>{const Dn=de.findIndex(Fn=>Fn.value===Pt);Dn>-1&&Ve.push(de[Dn])}),Ve.length>=de.length?Ve:de}),At=vue.computed(()=>Array.from(o.cachedOptions.values())),Dt=vue.computed(()=>{const de=Fe.value.filter(Ve=>!Ve.created).some(Ve=>Ve.currentLabel===o.inputValue);return e.filterable&&e.allowCreate&&o.inputValue!==""&&!de}),Lt=()=>{e.filterable&&isFunction$1(e.filterMethod)||e.filterable&&e.remote&&isFunction$1(e.remoteMethod)||Fe.value.forEach(de=>{var Ve;(Ve=de.updateOption)==null||Ve.call(de,o.inputValue)})},_n=useFormSize(),Cn=vue.computed(()=>["small"].includes(_n.value)?"small":"default"),An=vue.computed({get(){return M.value&&!Oe.value},set(de){M.value=de}}),Tn=vue.computed(()=>{if(e.multiple&&!isUndefined(e.modelValue))return castArray$1(e.modelValue).length===0&&!o.inputValue;const de=isArray$1(e.modelValue)?e.modelValue[0]:e.modelValue;return e.filterable||isUndefined(de)?!o.inputValue:!0}),Sn=vue.computed(()=>{var de;const Ve=(de=e.placeholder)!=null?de:n("el.select.placeholder");return e.multiple||!Y.value?Ve:o.selectedLabel}),bn=vue.computed(()=>isIOS?null:"mouseenter");vue.watch(()=>e.modelValue,(de,Ve)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(o.inputValue="",wn("")),En(),!isEqual(de,Ve)&&e.validateEvent&&(ue==null||ue.validate("change").catch(Pt=>debugWarn(Pt)))},{flush:"post",deep:!0}),vue.watch(()=>M.value,de=>{de?wn(o.inputValue):(o.inputValue="",o.previousQuery=null,o.isBeforeHide=!0),t("visible-change",de)}),vue.watch(()=>o.options.entries(),()=>{isClient&&(En(),e.defaultFirstOption&&(e.filterable||e.remote)&&xe.value&&Ue())},{flush:"post"}),vue.watch([()=>o.hoveringIndex,Fe],([de])=>{isNumber(de)&&de>-1?z.value=Fe.value[de]||{}:z.value={},Fe.value.forEach(Ve=>{Ve.hover=z.value===Ve})}),vue.watchEffect(()=>{o.isBeforeHide||Lt()});const wn=de=>{o.previousQuery===de||b.value||(o.previousQuery=de,e.filterable&&isFunction$1(e.filterMethod)?e.filterMethod(de):e.filterable&&e.remote&&isFunction$1(e.remoteMethod)&&e.remoteMethod(de),e.defaultFirstOption&&(e.filterable||e.remote)&&xe.value?vue.nextTick(Ue):vue.nextTick(Mn))},Ue=()=>{const de=Fe.value.filter(Fn=>Fn.visible&&!Fn.disabled&&!Fn.states.groupDisabled),Ve=de.find(Fn=>Fn.created),Pt=de[0],Dn=Fe.value.map(Fn=>Fn.value);o.hoveringIndex=k(Dn,Ve||Pt)},En=()=>{if(e.multiple)o.selectedLabel="";else{const Ve=isArray$1(e.modelValue)?e.modelValue[0]:e.modelValue,Pt=Pn(Ve);o.selectedLabel=Pt.currentLabel,o.selected=[Pt];return}const de=[];isUndefined(e.modelValue)||castArray$1(e.modelValue).forEach(Ve=>{de.push(Pn(Ve))}),o.selected=de},Pn=de=>{let Ve;const Pt=isPlainObject(de);for(let Yn=o.cachedOptions.size-1;Yn>=0;Yn--){const jn=At.value[Yn];if(Pt?get(jn.value,e.valueKey)===get(de,e.valueKey):jn.value===de){Ve={value:de,currentLabel:jn.currentLabel,get isDisabled(){return jn.isDisabled}};break}}if(Ve)return Ve;const Dn=Pt?de.label:de??"";return{value:de,currentLabel:Dn}},Mn=()=>{o.hoveringIndex=Fe.value.findIndex(de=>o.selected.some(Ve=>Ln(Ve)===Ln(de)))},$n=()=>{o.selectionWidth=Number.parseFloat(window.getComputedStyle(l.value).width)},$e=()=>{o.collapseItemWidth=y.value.getBoundingClientRect().width},Et=()=>{var de,Ve;(Ve=(de=c.value)==null?void 0:de.updatePopper)==null||Ve.call(de)},On=()=>{var de,Ve;(Ve=(de=p.value)==null?void 0:de.updatePopper)==null||Ve.call(de)},In=()=>{o.inputValue.length>0&&!M.value&&(M.value=!0),wn(o.inputValue)},Vn=de=>{if(o.inputValue=de.target.value,e.remote)Rn();else return In()},Rn=debounce(()=>{In()},_e.value),hn=de=>{isEqual(e.modelValue,de)||t(CHANGE_EVENT,de)},zn=de=>findLastIndex(de,Ve=>{const Pt=o.cachedOptions.get(Ve);return Pt&&!Pt.disabled&&!Pt.states.groupDisabled}),xn=de=>{if(e.multiple&&de.code!==EVENT_CODE.delete&&de.target.value.length<=0){const Ve=castArray$1(e.modelValue).slice(),Pt=zn(Ve);if(Pt<0)return;const Dn=Ve[Pt];Ve.splice(Pt,1),t(UPDATE_MODEL_EVENT,Ve),hn(Ve),t("remove-tag",Dn)}},vn=(de,Ve)=>{const Pt=o.selected.indexOf(Ve);if(Pt>-1&&!F.value){const Dn=castArray$1(e.modelValue).slice();Dn.splice(Pt,1),t(UPDATE_MODEL_EVENT,Dn),hn(Dn),t("remove-tag",Ve.value)}de.stopPropagation(),kn()},D=de=>{de.stopPropagation();const Ve=e.multiple?[]:j.value;if(e.multiple)for(const Pt of o.selected)Pt.isDisabled&&Ve.push(Pt.value);t(UPDATE_MODEL_EVENT,Ve),hn(Ve),o.hoveringIndex=-1,M.value=!1,t("clear"),kn()},oe=de=>{var Ve;if(e.multiple){const Pt=castArray$1((Ve=e.modelValue)!=null?Ve:[]).slice(),Dn=k(Pt,de);Dn>-1?Pt.splice(Dn,1):(e.multipleLimit<=0||Pt.length<e.multipleLimit)&&Pt.push(de.value),t(UPDATE_MODEL_EVENT,Pt),hn(Pt),de.created&&wn(""),e.filterable&&!e.reserveKeyword&&(o.inputValue="")}else t(UPDATE_MODEL_EVENT,de.value),hn(de.value),M.value=!1;kn(),!M.value&&vue.nextTick(()=>{pe(de)})},k=(de,Ve)=>isUndefined(Ve)?-1:isObject$1(Ve.value)?de.findIndex(Pt=>isEqual(get(Pt,e.valueKey),Ln(Ve))):de.indexOf(Ve.value),pe=de=>{var Ve,Pt,Dn,Fn,Yn;const jn=isArray$1(de)?de[0]:de;let Gn=null;if(jn!=null&&jn.value){const Kn=Fe.value.filter(nr=>nr.value===jn.value);Kn.length>0&&(Gn=Kn[0].$el)}if(c.value&&Gn){const Kn=(Fn=(Dn=(Pt=(Ve=c.value)==null?void 0:Ve.popperRef)==null?void 0:Pt.contentRef)==null?void 0:Dn.querySelector)==null?void 0:Fn.call(Dn,`.${i.be("dropdown","wrap")}`);Kn&&scrollIntoView(Kn,Gn)}(Yn=g.value)==null||Yn.handleScroll()},Ne=de=>{o.options.set(de.value,de),o.cachedOptions.set(de.value,de)},ze=(de,Ve)=>{o.options.get(de)===Ve&&o.options.delete(de)},jt=vue.computed(()=>{var de,Ve;return(Ve=(de=c.value)==null?void 0:de.popperRef)==null?void 0:Ve.contentRef}),Nn=()=>{o.isBeforeHide=!1,vue.nextTick(()=>{var de;(de=g.value)==null||de.update(),pe(o.selected)})},kn=()=>{var de;(de=d.value)==null||de.focus()},qn=()=>{var de;if(M.value){M.value=!1,vue.nextTick(()=>{var Ve;return(Ve=d.value)==null?void 0:Ve.blur()});return}(de=d.value)==null||de.blur()},Un=de=>{D(de)},Bn=de=>{if(M.value=!1,x.value){const Ve=new FocusEvent("focus",de);vue.nextTick(()=>L(Ve))}},Ie=()=>{o.inputValue.length>0?o.inputValue="":M.value=!1},kt=()=>{F.value||(isIOS&&(o.inputHovering=!0),o.menuVisibleOnFocus?o.menuVisibleOnFocus=!1:M.value=!M.value)},qe=()=>{if(!M.value)kt();else{const de=Fe.value[o.hoveringIndex];de&&!de.isDisabled&&oe(de)}},Ln=de=>isObject$1(de.value)?get(de.value,e.valueKey):de.value,Hn=vue.computed(()=>Fe.value.filter(de=>de.visible).every(de=>de.isDisabled)),Wn=vue.computed(()=>e.multiple?e.collapseTags?o.selected.slice(0,e.maxCollapseTags):o.selected:[]),Zn=vue.computed(()=>e.multiple?e.collapseTags?o.selected.slice(e.maxCollapseTags):[]:[]),Jn=de=>{if(!M.value){M.value=!0;return}if(!(o.options.size===0||xe.value===0||b.value)&&!Hn.value){de==="next"?(o.hoveringIndex++,o.hoveringIndex===o.options.size&&(o.hoveringIndex=0)):de==="prev"&&(o.hoveringIndex--,o.hoveringIndex<0&&(o.hoveringIndex=o.options.size-1));const Ve=Fe.value[o.hoveringIndex];(Ve.isDisabled||!Ve.visible)&&Jn(de),vue.nextTick(()=>pe(z.value))}},Xn=()=>{if(!l.value)return 0;const de=window.getComputedStyle(l.value);return Number.parseFloat(de.gap||"6px")},Qn=vue.computed(()=>{const de=Xn();return{maxWidth:`${y.value&&e.maxCollapseTags===1?o.selectionWidth-o.collapseItemWidth-de:o.selectionWidth}px`}}),er=vue.computed(()=>({maxWidth:`${o.selectionWidth}px`})),tr=de=>{t("popup-scroll",de)};return useResizeObserver(l,$n),useResizeObserver(h,Et),useResizeObserver(w,Et),useResizeObserver(m,On),useResizeObserver(y,$e),vue.onMounted(()=>{En()}),{inputId:he,contentId:r,nsSelect:i,nsInput:a,states:o,isFocused:x,expanded:M,optionsArray:Fe,hoverOption:z,selectSize:_n,filteredOptionsCount:xe,updateTooltip:Et,updateTagTooltip:On,debouncedOnInputChange:Rn,onInput:Vn,deletePrevTag:xn,deleteTag:vn,deleteSelected:D,handleOptionSelect:oe,scrollToOption:pe,hasModelValue:Y,shouldShowPlaceholder:Tn,currentPlaceholder:Sn,mouseEnterEventName:bn,needStatusIcon:$,showClose:V,iconComponent:ie,iconReverse:re,validateState:ae,validateIcon:le,showNewOption:Dt,updateOptions:Lt,collapseTagSize:Cn,setSelected:En,selectDisabled:F,emptyText:Ce,handleCompositionStart:_,handleCompositionUpdate:S,handleCompositionEnd:T,onOptionCreate:Ne,onOptionDestroy:ze,handleMenuEnter:Nn,focus:kn,blur:qn,handleClearClick:Un,handleClickOutside:Bn,handleEsc:Ie,toggleMenu:kt,selectOption:qe,getValueKey:Ln,navigateOptions:Jn,dropdownMenuVisible:An,showTagList:Wn,collapseTagList:Zn,popupScroll:tr,tagStyle:Qn,collapseTagStyle:er,popperRef:jt,inputRef:d,tooltipRef:c,tagTooltipRef:p,prefixRef:f,suffixRef:v,selectRef:u,wrapperRef:w,selectionRef:l,scrollbarRef:g,menuRef:h,tagMenuRef:m,collapseItemRef:y}};var ElOptions=vue.defineComponent({name:"ElOptions",setup(e,{slots:t}){const n=vue.inject(selectKey);let r=[];return()=>{var i,a;const o=(i=t.default)==null?void 0:i.call(t),u=[];function l(c){isArray$1(c)&&c.forEach(p=>{var d,f,v,h;const m=(d=(p==null?void 0:p.type)||{})==null?void 0:d.name;m==="ElOptionGroup"?l(!isString$1(p.children)&&!isArray$1(p.children)&&isFunction$1((f=p.children)==null?void 0:f.default)?(v=p.children)==null?void 0:v.default():p.children):m==="ElOption"?u.push((h=p.props)==null?void 0:h.value):isArray$1(p.children)&&l(p.children)})}return o.length&&l((a=o[0])==null?void 0:a.children),isEqual(u,r)||(r=u,n&&(n.states.optionValues=u)),o}}});const selectProps=buildProps({name:String,id:String,modelValue:{type:definePropType([Array,String,Number,Boolean,Object]),default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:useSizeProp,effect:{type:definePropType(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:definePropType(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod:Function,multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},teleported:useTooltipContentProps.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:iconPropType,default:circle_close_default},fitInputWidth:Boolean,suffixIcon:{type:iconPropType,default:arrow_down_default},tagType:{...tagProps.type,default:"info"},tagEffect:{...tagProps.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:definePropType(String),values:Ee,default:"bottom-start"},fallbackPlacements:{type:definePropType(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:useTooltipContentProps.appendTo,...useEmptyValuesProps,...useAriaProps(["ariaLabel"])});scrollbarEmits.scroll;const COMPONENT_NAME$1="ElSelect",_sfc_main$o=vue.defineComponent({name:COMPONENT_NAME$1,componentName:COMPONENT_NAME$1,components:{ElSelectMenu,ElOption:Option,ElOptions,ElTag,ElScrollbar,ElTooltip,ElIcon},directives:{ClickOutside},props:selectProps,emits:[UPDATE_MODEL_EVENT,CHANGE_EVENT,"remove-tag","clear","visible-change","focus","blur","popup-scroll"],setup(e,{emit:t,slots:n}){const r=vue.getCurrentInstance();r.appContext.config.warnHandler=(...f)=>{!f[0]||f[0].includes('Slot "default" invoked outside of the render function')||console.warn(...f)};const i=vue.computed(()=>{const{modelValue:f,multiple:v}=e,h=v?[]:void 0;return isArray$1(f)?v?f:h:v?h:f}),a=vue.reactive({...vue.toRefs(e),modelValue:i}),o=useSelect(a,t),{calculatorRef:u,inputStyle:l}=useCalcInputWidth(),c=f=>f.reduce((v,h)=>(v.push(h),h.children&&h.children.length>0&&v.push(...c(h.children)),v),[]),p=f=>{flattedChildren(f||[]).forEach(h=>{var m;if(isObject$1(h)&&(h.type.name==="ElOption"||h.type.name==="ElTree")){const y=h.type.name;if(y==="ElTree"){const g=((m=h.props)==null?void 0:m.data)||[];c(g).forEach(_=>{_.currentLabel=_.label||(isObject$1(_.value)?"":_.value),o.onOptionCreate(_)})}else if(y==="ElOption"){const g={...h.props};g.currentLabel=g.label||(isObject$1(g.value)?"":g.value),o.onOptionCreate(g)}}})};vue.watch(()=>{var f;return(f=n.default)==null?void 0:f.call(n)},f=>{e.persistent||p(f)},{immediate:!0}),vue.provide(selectKey,vue.reactive({props:a,states:o.states,selectRef:o.selectRef,optionsArray:o.optionsArray,setSelected:o.setSelected,handleOptionSelect:o.handleOptionSelect,onOptionCreate:o.onOptionCreate,onOptionDestroy:o.onOptionDestroy}));const d=vue.computed(()=>e.multiple?o.states.selected.map(f=>f.currentLabel):o.states.selectedLabel);return{...o,modelValue:i,selectedLabel:d,calculatorRef:u,inputStyle:l}}});function _sfc_render$n(e,t){const n=vue.resolveComponent("el-tag"),r=vue.resolveComponent("el-tooltip"),i=vue.resolveComponent("el-icon"),a=vue.resolveComponent("el-option"),o=vue.resolveComponent("el-options"),u=vue.resolveComponent("el-scrollbar"),l=vue.resolveComponent("el-select-menu"),c=vue.resolveDirective("click-outside");return vue.withDirectives((vue.openBlock(),vue.createElementBlock("div",{ref:"selectRef",class:vue.normalizeClass([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),[vue.toHandlerKey(e.mouseEnterEventName)]:p=>e.states.inputHovering=!0,onMouseleave:p=>e.states.inputHovering=!1},[vue.createVNode(r,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":e.fallbackPlacements,effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,"append-to":e.appendTo,"show-arrow":e.showArrow,offset:e.offset,onBeforeShow:e.handleMenuEnter,onHide:p=>e.states.isBeforeHide=!1},{default:vue.withCtx(()=>{var p;return[vue.createElementVNode("div",{ref:"wrapperRef",class:vue.normalizeClass([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:vue.withModifiers(e.toggleMenu,["prevent"])},[e.$slots.prefix?(vue.openBlock(),vue.createElementBlock("div",{key:0,ref:"prefixRef",class:vue.normalizeClass(e.nsSelect.e("prefix"))},[vue.renderSlot(e.$slots,"prefix")],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{ref:"selectionRef",class:vue.normalizeClass([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?vue.renderSlot(e.$slots,"tag",{key:0},()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.showTagList,d=>(vue.openBlock(),vue.createElementBlock("div",{key:e.getValueKey(d),class:vue.normalizeClass(e.nsSelect.e("selected-item"))},[vue.createVNode(n,{closable:!e.selectDisabled&&!d.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:vue.normalizeStyle(e.tagStyle),onClose:f=>e.deleteTag(f,d)},{default:vue.withCtx(()=>[vue.createElementVNode("span",{class:vue.normalizeClass(e.nsSelect.e("tags-text"))},[vue.renderSlot(e.$slots,"label",{label:d.currentLabel,value:d.value},()=>[vue.createTextVNode(vue.toDisplayString(d.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(vue.openBlock(),vue.createBlock(r,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:vue.withCtx(()=>[vue.createElementVNode("div",{ref:"collapseItemRef",class:vue.normalizeClass(e.nsSelect.e("selected-item"))},[vue.createVNode(n,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:vue.normalizeStyle(e.collapseTagStyle)},{default:vue.withCtx(()=>[vue.createElementVNode("span",{class:vue.normalizeClass(e.nsSelect.e("tags-text"))}," + "+vue.toDisplayString(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:vue.withCtx(()=>[vue.createElementVNode("div",{ref:"tagMenuRef",class:vue.normalizeClass(e.nsSelect.e("selection"))},[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.collapseTagList,d=>(vue.openBlock(),vue.createElementBlock("div",{key:e.getValueKey(d),class:vue.normalizeClass(e.nsSelect.e("selected-item"))},[vue.createVNode(n,{class:"in-tooltip",closable:!e.selectDisabled&&!d.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:f=>e.deleteTag(f,d)},{default:vue.withCtx(()=>[vue.createElementVNode("span",{class:vue.normalizeClass(e.nsSelect.e("tags-text"))},[vue.renderSlot(e.$slots,"label",{label:d.currentLabel,value:d.value},()=>[vue.createTextVNode(vue.toDisplayString(d.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):vue.createCommentVNode("v-if",!0)]):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{class:vue.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[vue.withDirectives(vue.createElementVNode("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":d=>e.states.inputValue=d,type:"text",name:e.name,class:vue.normalizeClass([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:vue.normalizeStyle(e.inputStyle),tabindex:e.tabindex,role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((p=e.hoverOption)==null?void 0:p.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[vue.withKeys(vue.withModifiers(d=>e.navigateOptions("next"),["stop","prevent"]),["down"]),vue.withKeys(vue.withModifiers(d=>e.navigateOptions("prev"),["stop","prevent"]),["up"]),vue.withKeys(vue.withModifiers(e.handleEsc,["stop","prevent"]),["esc"]),vue.withKeys(vue.withModifiers(e.selectOption,["stop","prevent"]),["enter"]),vue.withKeys(vue.withModifiers(e.deletePrevTag,["stop"]),["delete"])],onCompositionstart:e.handleCompositionStart,onCompositionupdate:e.handleCompositionUpdate,onCompositionend:e.handleCompositionEnd,onInput:e.onInput,onClick:vue.withModifiers(e.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[vue.vModelText,e.states.inputValue]]),e.filterable?(vue.openBlock(),vue.createElementBlock("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:vue.normalizeClass(e.nsSelect.e("input-calculator")),textContent:vue.toDisplayString(e.states.inputValue)},null,10,["textContent"])):vue.createCommentVNode("v-if",!0)],2),e.shouldShowPlaceholder?(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?vue.renderSlot(e.$slots,"label",{key:0,label:e.currentPlaceholder,value:e.modelValue},()=>[vue.createElementVNode("span",null,vue.toDisplayString(e.currentPlaceholder),1)]):(vue.openBlock(),vue.createElementBlock("span",{key:1},vue.toDisplayString(e.currentPlaceholder),1))],2)):vue.createCommentVNode("v-if",!0)],2),vue.createElementVNode("div",{ref:"suffixRef",class:vue.normalizeClass(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(vue.openBlock(),vue.createBlock(i,{key:0,class:vue.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):vue.createCommentVNode("v-if",!0),e.showClose&&e.clearIcon?(vue.openBlock(),vue.createBlock(i,{key:1,class:vue.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.nsSelect.e("clear")]),onClick:e.handleClearClick},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(e.clearIcon)))]),_:1},8,["class","onClick"])):vue.createCommentVNode("v-if",!0),e.validateState&&e.validateIcon&&e.needStatusIcon?(vue.openBlock(),vue.createBlock(i,{key:2,class:vue.normalizeClass([e.nsInput.e("icon"),e.nsInput.e("validateIcon"),e.nsInput.is("loading",e.validateState==="validating")])},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(e.validateIcon)))]),_:1},8,["class"])):vue.createCommentVNode("v-if",!0)],2)],10,["onClick"])]}),content:vue.withCtx(()=>[vue.createVNode(l,{ref:"menuRef"},{default:vue.withCtx(()=>[e.$slots.header?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(e.nsSelect.be("dropdown","header")),onClick:vue.withModifiers(()=>{},["stop"])},[vue.renderSlot(e.$slots,"header")],10,["onClick"])):vue.createCommentVNode("v-if",!0),vue.withDirectives(vue.createVNode(u,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:vue.normalizeClass([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical",onScroll:e.popupScroll},{default:vue.withCtx(()=>[e.showNewOption?(vue.openBlock(),vue.createBlock(a,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):vue.createCommentVNode("v-if",!0),vue.createVNode(o,null,{default:vue.withCtx(()=>[vue.renderSlot(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label","onScroll"]),[[vue.vShow,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(vue.openBlock(),vue.createElementBlock("div",{key:1,class:vue.normalizeClass(e.nsSelect.be("dropdown","loading"))},[vue.renderSlot(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(vue.openBlock(),vue.createElementBlock("div",{key:2,class:vue.normalizeClass(e.nsSelect.be("dropdown","empty"))},[vue.renderSlot(e.$slots,"empty",{},()=>[vue.createElementVNode("span",null,vue.toDisplayString(e.emptyText),1)])],2)):vue.createCommentVNode("v-if",!0),e.$slots.footer?(vue.openBlock(),vue.createElementBlock("div",{key:3,class:vue.normalizeClass(e.nsSelect.be("dropdown","footer")),onClick:vue.withModifiers(()=>{},["stop"])},[vue.renderSlot(e.$slots,"footer")],10,["onClick"])):vue.createCommentVNode("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow","onHide"])],16,["onMouseleave"])),[[c,e.handleClickOutside,e.popperRef]])}var Select=_export_sfc$1(_sfc_main$o,[["render",_sfc_render$n],["__file","select.vue"]]);const _sfc_main$n=vue.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=useNamespace("select"),n=vue.ref(),r=vue.getCurrentInstance(),i=vue.ref([]);vue.provide(selectGroupKey,vue.reactive({...vue.toRefs(e)}));const a=vue.computed(()=>i.value.some(c=>c.visible===!0)),o=c=>{var p;return c.type.name==="ElOption"&&!!((p=c.component)!=null&&p.proxy)},u=c=>{const p=castArray$1(c),d=[];return p.forEach(f=>{var v;vue.isVNode(f)&&(o(f)?d.push(f.component.proxy):isArray$1(f.children)&&f.children.length?d.push(...u(f.children)):(v=f.component)!=null&&v.subTree&&d.push(...u(f.component.subTree)))}),d},l=()=>{i.value=u(r.subTree)};return vue.onMounted(()=>{l()}),useMutationObserver(n,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:a,ns:t}}});function _sfc_render$m(e,t,n,r,i,a){return vue.withDirectives((vue.openBlock(),vue.createElementBlock("ul",{ref:"groupRef",class:vue.normalizeClass(e.ns.be("group","wrap"))},[vue.createElementVNode("li",{class:vue.normalizeClass(e.ns.be("group","title"))},vue.toDisplayString(e.label),3),vue.createElementVNode("li",null,[vue.createElementVNode("ul",{class:vue.normalizeClass(e.ns.b("group"))},[vue.renderSlot(e.$slots,"default")],2)])],2)),[[vue.vShow,e.visible]])}var OptionGroup=_export_sfc$1(_sfc_main$n,[["render",_sfc_render$m],["__file","option-group.vue"]]);const ElSelect=withInstall(Select,{Option,OptionGroup}),ElOption=withNoopInstall(Option);withNoopInstall(OptionGroup);const isValidComponentSize=e=>["",...componentSizes].includes(e),switchProps=buildProps({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:isValidComponentSize},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:iconPropType},activeActionIcon:{type:iconPropType},activeIcon:{type:iconPropType},inactiveIcon:{type:iconPropType},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:definePropType(Function)},id:String,tabindex:{type:[String,Number]},...useAriaProps(["ariaLabel"])}),switchEmits={[UPDATE_MODEL_EVENT]:e=>isBoolean(e)||isString$1(e)||isNumber(e),[CHANGE_EVENT]:e=>isBoolean(e)||isString$1(e)||isNumber(e),[INPUT_EVENT]:e=>isBoolean(e)||isString$1(e)||isNumber(e)},COMPONENT_NAME="ElSwitch",__default__=vue.defineComponent({name:COMPONENT_NAME}),_sfc_main$m=vue.defineComponent({...__default__,props:switchProps,emits:switchEmits,setup(e,{expose:t,emit:n}){const r=e,{formItem:i}=useFormItem(),a=useFormSize(),o=useNamespace("switch"),{inputId:u}=useFormItemInputId(r,{formItemContext:i}),l=useFormDisabled(vue.computed(()=>r.loading)),c=vue.ref(r.modelValue!==!1),p=vue.ref(),d=vue.ref(),f=vue.computed(()=>[o.b(),o.m(a.value),o.is("disabled",l.value),o.is("checked",g.value)]),v=vue.computed(()=>[o.e("label"),o.em("label","left"),o.is("active",!g.value)]),h=vue.computed(()=>[o.e("label"),o.em("label","right"),o.is("active",g.value)]),m=vue.computed(()=>({width:addUnit(r.width)}));vue.watch(()=>r.modelValue,()=>{c.value=!0});const y=vue.computed(()=>c.value?r.modelValue:!1),g=vue.computed(()=>y.value===r.activeValue);[r.activeValue,r.inactiveValue].includes(y.value)||(n(UPDATE_MODEL_EVENT,r.inactiveValue),n(CHANGE_EVENT,r.inactiveValue),n(INPUT_EVENT,r.inactiveValue)),vue.watch(g,T=>{var w;p.value.checked=T,r.validateEvent&&((w=i==null?void 0:i.validate)==null||w.call(i,"change").catch(x=>debugWarn(x)))});const b=()=>{const T=g.value?r.inactiveValue:r.activeValue;n(UPDATE_MODEL_EVENT,T),n(CHANGE_EVENT,T),n(INPUT_EVENT,T),vue.nextTick(()=>{p.value.checked=g.value})},_=()=>{if(l.value)return;const{beforeChange:T}=r;if(!T){b();return}const w=T();[isPromise(w),isBoolean(w)].includes(!0)||throwError(COMPONENT_NAME,"beforeChange must return type `Promise<boolean>` or `boolean`"),isPromise(w)?w.then(L=>{L&&b()}).catch(L=>{debugWarn(COMPONENT_NAME,`some error occurred: ${L}`)}):w&&b()},S=()=>{var T,w;(w=(T=p.value)==null?void 0:T.focus)==null||w.call(T)};return vue.onMounted(()=>{p.value.checked=g.value}),t({focus:S,checked:g}),(T,w)=>(vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(vue.unref(f)),onClick:vue.withModifiers(_,["prevent"])},[vue.createElementVNode("input",{id:vue.unref(u),ref_key:"input",ref:p,class:vue.normalizeClass(vue.unref(o).e("input")),type:"checkbox",role:"switch","aria-checked":vue.unref(g),"aria-disabled":vue.unref(l),"aria-label":T.ariaLabel,name:T.name,"true-value":T.activeValue,"false-value":T.inactiveValue,disabled:vue.unref(l),tabindex:T.tabindex,onChange:b,onKeydown:vue.withKeys(_,["enter"])},null,42,["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"]),!T.inlinePrompt&&(T.inactiveIcon||T.inactiveText)?(vue.openBlock(),vue.createElementBlock("span",{key:0,class:vue.normalizeClass(vue.unref(v))},[T.inactiveIcon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(T.inactiveIcon)))]),_:1})):vue.createCommentVNode("v-if",!0),!T.inactiveIcon&&T.inactiveText?(vue.openBlock(),vue.createElementBlock("span",{key:1,"aria-hidden":vue.unref(g)},vue.toDisplayString(T.inactiveText),9,["aria-hidden"])):vue.createCommentVNode("v-if",!0)],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("span",{ref_key:"core",ref:d,class:vue.normalizeClass(vue.unref(o).e("core")),style:vue.normalizeStyle(vue.unref(m))},[T.inlinePrompt?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:vue.normalizeClass(vue.unref(o).e("inner"))},[T.activeIcon||T.inactiveIcon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(vue.unref(o).is("icon"))},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(vue.unref(g)?T.activeIcon:T.inactiveIcon)))]),_:1},8,["class"])):T.activeText||T.inactiveText?(vue.openBlock(),vue.createElementBlock("span",{key:1,class:vue.normalizeClass(vue.unref(o).is("text")),"aria-hidden":!vue.unref(g)},vue.toDisplayString(vue.unref(g)?T.activeText:T.inactiveText),11,["aria-hidden"])):vue.createCommentVNode("v-if",!0)],2)):vue.createCommentVNode("v-if",!0),vue.createElementVNode("div",{class:vue.normalizeClass(vue.unref(o).e("action"))},[T.loading?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0,class:vue.normalizeClass(vue.unref(o).is("loading"))},{default:vue.withCtx(()=>[vue.createVNode(vue.unref(loading_default))]),_:1},8,["class"])):vue.unref(g)?vue.renderSlot(T.$slots,"active-action",{key:1},()=>[T.activeActionIcon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(T.activeActionIcon)))]),_:1})):vue.createCommentVNode("v-if",!0)]):vue.unref(g)?vue.createCommentVNode("v-if",!0):vue.renderSlot(T.$slots,"inactive-action",{key:2},()=>[T.inactiveActionIcon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(T.inactiveActionIcon)))]),_:1})):vue.createCommentVNode("v-if",!0)])],2)],6),!T.inlinePrompt&&(T.activeIcon||T.activeText)?(vue.openBlock(),vue.createElementBlock("span",{key:1,class:vue.normalizeClass(vue.unref(h))},[T.activeIcon?(vue.openBlock(),vue.createBlock(vue.unref(ElIcon),{key:0},{default:vue.withCtx(()=>[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(T.activeIcon)))]),_:1})):vue.createCommentVNode("v-if",!0),!T.activeIcon&&T.activeText?(vue.openBlock(),vue.createElementBlock("span",{key:1,"aria-hidden":!vue.unref(g)},vue.toDisplayString(T.activeText),9,["aria-hidden"])):vue.createCommentVNode("v-if",!0)],2)):vue.createCommentVNode("v-if",!0)],10,["onClick"]))}});var Switch=_export_sfc$1(_sfc_main$m,[["__file","switch.vue"]]);const ElSwitch=withInstall(Switch),_export_sfc=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},_sfc_main$l={name:"DialogBody",setup(e,{slots:t}){return{hasSlot:r=>!!t[r]}},props:{fixedHeight:{type:Boolean,default:!1}},computed:{classNames:function(){const e=this.$slots.icon?"icon":"",t=this.fixedHeight?"fixed-height":"";return`dialog-body ${e} ${t}`}}},_hoisted_1$l={key:0,class:"dialog-body-icon"},_hoisted_2$9={key:1,class:"dialog-body-heading"},_hoisted_3$8={class:"dialog-body-content"};function _sfc_render$l(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(a.classNames)},[r.hasSlot("icon")?(vue.openBlock(),vue.createElementBlock("div",_hoisted_1$l,[vue.renderSlot(e.$slots,"icon",{},void 0,!0)])):vue.createCommentVNode("",!0),r.hasSlot("heading")?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2$9,[vue.renderSlot(e.$slots,"heading",{},void 0,!0)])):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_3$8,[vue.renderSlot(e.$slots,"default",{},void 0,!0)])],2)}const __unplugin_components_2$1=_export_sfc(_sfc_main$l,[["render",_sfc_render$l],["__scopeId","data-v-8725c591"]]),_sfc_main$k={name:"IconWarningCircle",props:{width:{type:Number,default:16},height:{type:Number,default:16},color:{type:String,default:"currentColor"}}},_hoisted_1$k=["width","height","fill"];function _sfc_render$k(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:n.width,height:n.height,fill:n.color,viewBox:"0 0 24 24"},t[0]||(t[0]=[vue.createElementVNode("path",{pid:"0",d:"M22 11.4c-.1-2.7-1.3-5.1-3.3-6.9-.4-.4-1-.3-1.4.1-.4.4-.3 1 .1 1.4 1.6 1.4 2.5 3.4 2.7 5.5.1 2.1-.6 4.2-2 5.8s-3.4 2.5-5.5 2.7c-2.1.1-4.2-.6-5.8-2-1.6-1.4-2.5-3.4-2.7-5.5-.1-2.1.6-4.2 2-5.8 1.3-1.4 3.1-2.4 5-2.6V11c0 .6.4 1 1 1s1-.4 1-1V2h-1C9.2 2 6.4 3.2 4.5 5.3c-1.8 2-2.7 4.6-2.5 7.2.1 2.7 1.3 5.1 3.3 6.9C7.2 21.2 9.6 22 12 22c2.7 0 5.5-1.1 7.5-3.3 1.7-2 2.6-4.6 2.5-7.3z"},null,-1),vue.createElementVNode("circle",{pid:"1",cx:"12",cy:"15.5",r:"1.5"},null,-1)]),8,_hoisted_1$k)}const __unplugin_components_1$2=_export_sfc(_sfc_main$k,[["render",_sfc_render$k]]),_sfc_main$j={name:"BfDialogHeader",props:{title:{type:String,default:""}},methods:{onClose:function(){this.$parent.handleClose()}}},_hoisted_1$j={class:"bf-dialog-header"},_hoisted_2$8={class:"bf-dialog-header-title"};function _sfc_render$j(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$j,[vue.createElementVNode("span",_hoisted_2$8,vue.toDisplayString(n.title),1),this.$slots.tabs?vue.createCommentVNode("",!0):(vue.openBlock(),vue.createElementBlock("button",{key:0,class:"icon-close",onClick:t[0]||(t[0]=(...o)=>a.onClose&&a.onClose(...o))})),vue.renderSlot(e.$slots,"tabs",{},void 0,!0)])}const __unplugin_components_0$2=_export_sfc(_sfc_main$j,[["render",_sfc_render$j],["__scopeId","data-v-1491a20c"]]);function _isPlaceholder(e){return e!=null&&typeof e=="object"&&e["@@functional/placeholder"]===!0}function _curry1(e){return function t(n){return arguments.length===0||_isPlaceholder(n)?t:e.apply(this,arguments)}}function _curry2(e){return function t(n,r){switch(arguments.length){case 0:return t;case 1:return _isPlaceholder(n)?t:_curry1(function(i){return e(n,i)});default:return _isPlaceholder(n)&&_isPlaceholder(r)?t:_isPlaceholder(n)?_curry1(function(i){return e(i,r)}):_isPlaceholder(r)?_curry1(function(i){return e(n,i)}):e(n,r)}}}var add=_curry2(function(t,n){return Number(t)+Number(n)});function _concat(e,t){e=e||[],t=t||[];var n,r=e.length,i=t.length,a=[];for(n=0;n<r;)a[a.length]=e[n],n+=1;for(n=0;n<i;)a[a.length]=t[n],n+=1;return a}function _arity(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(n){return t.apply(this,arguments)};case 2:return function(n,r){return t.apply(this,arguments)};case 3:return function(n,r,i){return t.apply(this,arguments)};case 4:return function(n,r,i,a){return t.apply(this,arguments)};case 5:return function(n,r,i,a,o){return t.apply(this,arguments)};case 6:return function(n,r,i,a,o,u){return t.apply(this,arguments)};case 7:return function(n,r,i,a,o,u,l){return t.apply(this,arguments)};case 8:return function(n,r,i,a,o,u,l,c){return t.apply(this,arguments)};case 9:return function(n,r,i,a,o,u,l,c,p){return t.apply(this,arguments)};case 10:return function(n,r,i,a,o,u,l,c,p,d){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function _curryN(e,t,n){return function(){for(var r=[],i=0,a=e,o=0;o<t.length||i<arguments.length;){var u;o<t.length&&(!_isPlaceholder(t[o])||i>=arguments.length)?u=t[o]:(u=arguments[i],i+=1),r[o]=u,_isPlaceholder(u)||(a-=1),o+=1}return a<=0?n.apply(this,r):_arity(a,_curryN(e,r,n))}}var curryN=_curry2(function(t,n){return t===1?_curry1(n):_arity(t,_curryN(t,[],n))});function _curry3(e){return function t(n,r,i){switch(arguments.length){case 0:return t;case 1:return _isPlaceholder(n)?t:_curry2(function(a,o){return e(n,a,o)});case 2:return _isPlaceholder(n)&&_isPlaceholder(r)?t:_isPlaceholder(n)?_curry2(function(a,o){return e(a,r,o)}):_isPlaceholder(r)?_curry2(function(a,o){return e(n,a,o)}):_curry1(function(a){return e(n,r,a)});default:return _isPlaceholder(n)&&_isPlaceholder(r)&&_isPlaceholder(i)?t:_isPlaceholder(n)&&_isPlaceholder(r)?_curry2(function(a,o){return e(a,o,i)}):_isPlaceholder(n)&&_isPlaceholder(i)?_curry2(function(a,o){return e(a,r,o)}):_isPlaceholder(r)&&_isPlaceholder(i)?_curry2(function(a,o){return e(n,a,o)}):_isPlaceholder(n)?_curry1(function(a){return e(a,r,i)}):_isPlaceholder(r)?_curry1(function(a){return e(n,a,i)}):_isPlaceholder(i)?_curry1(function(a){return e(n,r,a)}):e(n,r,i)}}}const _isArray=Array.isArray||function(t){return t!=null&&t.length>=0&&Object.prototype.toString.call(t)==="[object Array]"};function _isTransformer(e){return e!=null&&typeof e["@@transducer/step"]=="function"}function _dispatchable(e,t,n){return function(){if(arguments.length===0)return n();var r=arguments[arguments.length-1];if(!_isArray(r)){for(var i=0;i<e.length;){if(typeof r[e[i]]=="function")return r[e[i]].apply(r,Array.prototype.slice.call(arguments,0,-1));i+=1}if(_isTransformer(r)){var a=t.apply(null,Array.prototype.slice.call(arguments,0,-1));return a(r)}}return n.apply(this,arguments)}}function _reduced(e){return e&&e["@@transducer/reduced"]?e:{"@@transducer/value":e,"@@transducer/reduced":!0}}const _xfBase={init:function(){return this.xf["@@transducer/init"]()},result:function(e){return this.xf["@@transducer/result"](e)}};function _map(e,t){for(var n=0,r=t.length,i=Array(r);n<r;)i[n]=e(t[n]),n+=1;return i}function _isString$2(e){return Object.prototype.toString.call(e)==="[object String]"}var _isArrayLike=_curry1(function(t){return _isArray(t)?!0:!t||typeof t!="object"||_isString$2(t)?!1:t.length===0?!0:t.length>0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1}),XWrap=function(){function e(t){this.f=t}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(t){return t},e.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},e}();function _xwrap(e){return new XWrap(e)}var bind=_curry2(function(t,n){return _arity(t.length,function(){return t.apply(n,arguments)})});function _arrayReduce(e,t,n){for(var r=0,i=n.length;r<i;){if(t=e["@@transducer/step"](t,n[r]),t&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r+=1}return e["@@transducer/result"](t)}function _iterableReduce(e,t,n){for(var r=n.next();!r.done;){if(t=e["@@transducer/step"](t,r.value),t&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function _methodReduce(e,t,n,r){return e["@@transducer/result"](n[r](bind(e["@@transducer/step"],e),t))}var symIterator=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function _reduce(e,t,n){if(typeof e=="function"&&(e=_xwrap(e)),_isArrayLike(n))return _arrayReduce(e,t,n);if(typeof n["fantasy-land/reduce"]=="function")return _methodReduce(e,t,n,"fantasy-land/reduce");if(n[symIterator]!=null)return _iterableReduce(e,t,n[symIterator]());if(typeof n.next=="function")return _iterableReduce(e,t,n);if(typeof n.reduce=="function")return _methodReduce(e,t,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}var XMap=function(){function e(t,n){this.xf=n,this.f=t}return e.prototype["@@transducer/init"]=_xfBase.init,e.prototype["@@transducer/result"]=_xfBase.result,e.prototype["@@transducer/step"]=function(t,n){return this.xf["@@transducer/step"](t,this.f(n))},e}(),_xmap=_curry2(function(t,n){return new XMap(t,n)});function _has(e,t){return Object.prototype.hasOwnProperty.call(t,e)}var toString=Object.prototype.toString,_isArguments=function(){return toString.call(arguments)==="[object Arguments]"?function(t){return toString.call(t)==="[object Arguments]"}:function(t){return _has("callee",t)}}(),hasEnumBug=!{toString:null}.propertyIsEnumerable("toString"),nonEnumerableProps=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],hasArgsEnumBug=function(){return arguments.propertyIsEnumerable("length")}(),contains=function(t,n){for(var r=0;r<t.length;){if(t[r]===n)return!0;r+=1}return!1},keys=_curry1(typeof Object.keys=="function"&&!hasArgsEnumBug?function(t){return Object(t)!==t?[]:Object.keys(t)}:function(t){if(Object(t)!==t)return[];var n,r,i=[],a=hasArgsEnumBug&&_isArguments(t);for(n in t)_has(n,t)&&(!a||n!=="length")&&(i[i.length]=n);if(hasEnumBug)for(r=nonEnumerableProps.length-1;r>=0;)n=nonEnumerableProps[r],_has(n,t)&&!contains(i,n)&&(i[i.length]=n),r-=1;return i}),map=_curry2(_dispatchable(["fantasy-land/map","map"],_xmap,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return curryN(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return _reduce(function(r,i){return r[i]=t(n[i]),r},{},keys(n));default:return _map(t,n)}}));const _isInteger=Number.isInteger||function(t){return t<<0===t};var nth=_curry2(function(t,n){var r=t<0?n.length+t:t;return _isString$2(n)?n.charAt(r):n[r]}),prop=_curry2(function(t,n){if(n!=null)return _isInteger(t)?nth(t,n):n[t]}),pluck=_curry2(function(t,n){return map(prop(t),n)}),reduce=_curry3(_reduce);function _makeFlat(e){return function t(n){for(var r,i,a,o=[],u=0,l=n.length;u<l;){if(_isArrayLike(n[u]))for(r=t(n[u]),a=0,i=r.length;a<i;)o[o.length]=r[a],a+=1;else o[o.length]=n[u];u+=1}return o}}var type$1=_curry1(function(t){return t===null?"Null":t===void 0?"Undefined":Object.prototype.toString.call(t).slice(8,-1)});function _pipe(e,t){return function(){return t.call(this,e.apply(this,arguments))}}function _checkForMethod(e,t){return function(){var n=arguments.length;if(n===0)return t();var r=arguments[n-1];return _isArray(r)||typeof r[e]!="function"?t.apply(this,arguments):r[e].apply(r,Array.prototype.slice.call(arguments,0,n-1))}}var slice=_curry3(_checkForMethod("slice",function(t,n,r){return Array.prototype.slice.call(r,t,n)})),tail=_curry1(_checkForMethod("tail",slice(1,1/0)));function pipe(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return _arity(arguments[0].length,reduce(_pipe,arguments[0],tail(arguments)))}var reverse=_curry1(function(t){return _isString$2(t)?t.split("").reverse().join(""):Array.prototype.slice.call(t,0).reverse()});function compose(){if(arguments.length===0)throw new Error("compose requires at least one argument");return pipe.apply(this,reverse(arguments))}var head=nth(0);function _arrayFromIterator(e){for(var t=[],n;!(n=e.next()).done;)t.push(n.value);return t}function _includesWith(e,t,n){for(var r=0,i=n.length;r<i;){if(e(t,n[r]))return!0;r+=1}return!1}function _functionName(e){var t=String(e).match(/^function (\w*)/);return t==null?"":t[1]}function _objectIs(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}const _objectIs$1=typeof Object.is=="function"?Object.is:_objectIs;function _uniqContentEquals(e,t,n,r){var i=_arrayFromIterator(e),a=_arrayFromIterator(t);function o(u,l){return _equals(u,l,n.slice(),r.slice())}return!_includesWith(function(u,l){return!_includesWith(o,l,u)},a,i)}function _equals(e,t,n,r){if(_objectIs$1(e,t))return!0;var i=type$1(e);if(i!==type$1(t))return!1;if(typeof e["fantasy-land/equals"]=="function"||typeof t["fantasy-land/equals"]=="function")return typeof e["fantasy-land/equals"]=="function"&&e["fantasy-land/equals"](t)&&typeof t["fantasy-land/equals"]=="function"&&t["fantasy-land/equals"](e);if(typeof e.equals=="function"||typeof t.equals=="function")return typeof e.equals=="function"&&e.equals(t)&&typeof t.equals=="function"&&t.equals(e);switch(i){case"Arguments":case"Array":case"Object":if(typeof e.constructor=="function"&&_functionName(e.constructor)==="Promise")return e===t;break;case"Boolean":case"Number":case"String":if(!(typeof e==typeof t&&_objectIs$1(e.valueOf(),t.valueOf())))return!1;break;case"Date":if(!_objectIs$1(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(!(e.source===t.source&&e.global===t.global&&e.ignoreCase===t.ignoreCase&&e.multiline===t.multiline&&e.sticky===t.sticky&&e.unicode===t.unicode))return!1;break}for(var a=n.length-1;a>=0;){if(n[a]===e)return r[a]===t;a-=1}switch(i){case"Map":return e.size!==t.size?!1:_uniqContentEquals(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size!==t.size?!1:_uniqContentEquals(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var o=keys(e);if(o.length!==keys(t).length)return!1;var u=n.concat([e]),l=r.concat([t]);for(a=o.length-1;a>=0;){var c=o[a];if(!(_has(c,t)&&_equals(t[c],e[c],u,l)))return!1;a-=1}return!0}var equals=_curry2(function(t,n){return _equals(t,n,[],[])});function _indexOf(e,t,n){var r,i;if(typeof e.indexOf=="function")switch(typeof t){case"number":if(t===0){for(r=1/t;n<e.length;){if(i=e[n],i===0&&1/i===r)return n;n+=1}return-1}else if(t!==t){for(;n<e.length;){if(i=e[n],typeof i=="number"&&i!==i)return n;n+=1}return-1}return e.indexOf(t,n);case"string":case"boolean":case"function":case"undefined":return e.indexOf(t,n);case"object":if(t===null)return e.indexOf(t,n)}for(;n<e.length;){if(equals(e[n],t))return n;n+=1}return-1}function _includes(e,t){return _indexOf(t,e,0)>=0}function _isObject(e){return Object.prototype.toString.call(e)==="[object Object]"}var defaultTo=_curry2(function(t,n){return n==null||n!==n?t:n}),remove=_curry3(function(t,n,r){var i=Array.prototype.slice.call(r,0);return i.splice(t,n),i}),XTake=function(){function e(t,n){this.xf=n,this.n=t,this.i=0}return e.prototype["@@transducer/init"]=_xfBase.init,e.prototype["@@transducer/result"]=_xfBase.result,e.prototype["@@transducer/step"]=function(t,n){this.i+=1;var r=this.n===0?t:this.xf["@@transducer/step"](t,n);return this.n>=0&&this.i>=this.n?_reduced(r):r},e}(),_xtake=_curry2(function(t,n){return new XTake(t,n)}),take=_curry2(_dispatchable(["take"],_xtake,function(t,n){return slice(0,t<0?1/0:t,n)}));function _isTypedArray(e){var t=Object.prototype.toString.call(e);return t==="[object Uint8ClampedArray]"||t==="[object Int8Array]"||t==="[object Uint8Array]"||t==="[object Int16Array]"||t==="[object Uint16Array]"||t==="[object Int32Array]"||t==="[object Uint32Array]"||t==="[object Float32Array]"||t==="[object Float64Array]"||t==="[object BigInt64Array]"||t==="[object BigUint64Array]"}var empty=_curry1(function(t){return t!=null&&typeof t["fantasy-land/empty"]=="function"?t["fantasy-land/empty"]():t!=null&&t.constructor!=null&&typeof t.constructor["fantasy-land/empty"]=="function"?t.constructor["fantasy-land/empty"]():t!=null&&typeof t.empty=="function"?t.empty():t!=null&&t.constructor!=null&&typeof t.constructor.empty=="function"?t.constructor.empty():_isArray(t)?[]:_isString$2(t)?"":_isObject(t)?{}:_isArguments(t)?function(){return arguments}():_isTypedArray(t)?t.constructor.from(""):void 0}),XFind=function(){function e(t,n){this.xf=n,this.f=t,this.found=!1}return e.prototype["@@transducer/init"]=_xfBase.init,e.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.found=!0,t=_reduced(this.xf["@@transducer/step"](t,n))),t},e}(),_xfind=_curry2(function(t,n){return new XFind(t,n)}),find=_curry2(_dispatchable(["find"],_xfind,function(t,n){for(var r=0,i=n.length;r<i;){if(t(n[r]))return n[r];r+=1}})),XFindIndex=function(){function e(t,n){this.xf=n,this.f=t,this.idx=-1,this.found=!1}return e.prototype["@@transducer/init"]=_xfBase.init,e.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,-1)),this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.found=!0,t=_reduced(this.xf["@@transducer/step"](t,this.idx))),t},e}(),_xfindIndex=_curry2(function(t,n){return new XFindIndex(t,n)}),findIndex=_curry2(_dispatchable([],_xfindIndex,function(t,n){for(var r=0,i=n.length;r<i;){if(t(n[r]))return r;r+=1}return-1})),flatten=_curry1(_makeFlat()),includes=_curry2(_includes),isEmpty=_curry1(function(t){return t!=null&&equals(t,empty(t))}),paths=_curry2(function(t,n){return t.map(function(r){for(var i=n,a=0,o;a<r.length;){if(i==null)return;o=r[a],i=_isInteger(o)?nth(o,i):i[o],a+=1}return i})}),path$1=_curry2(function(t,n){return paths([t],n)[0]}),sum=reduce(add,0),pathOr=_curry3(function(t,n,r){return defaultTo(t,path$1(n,r))}),propEq=_curry3(function(t,n,r){return equals(n,prop(t,r))}),propOr=_curry3(function(t,n,r){return defaultTo(t,prop(n,r))}),sortBy=_curry2(function(t,n){return Array.prototype.slice.call(n,0).sort(function(r,i){var a=t(r),o=t(i);return a<o?-1:a>o?1:0})}),tryCatch=_curry2(function(t,n){return _arity(t.length,function(){try{return t.apply(this,arguments)}catch(r){return n.apply(this,_concat([r],arguments))}})});const _sfc_main$i={name:"BfButton",props:{type:{type:String,default:"button"},autofocus:Boolean,disabled:Boolean,processing:{type:Boolean,default:!1},processingText:{type:String,default:""}},computed:{hasPrefixSlot:function(){return!!this.$slots.prefix},hasSuffixSlot:function(){return!!this.$slots.suffix}},methods:{}},_hoisted_1$i=["disabled","autofocus","type"],_hoisted_2$7={key:0,class:"prefix"},_hoisted_3$7={key:3,class:"suffix"};function _sfc_render$i(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("button",{class:vue.normalizeClass(["bf-button",[n.type?"bf-button--"+n.type:"",a.hasPrefixSlot?"hasPrefix":""]]),disabled:n.disabled||n.processing,autofocus:n.autofocus,type:n.type},[a.hasPrefixSlot?(vue.openBlock(),vue.createElementBlock("span",_hoisted_2$7,[vue.renderSlot(e.$slots,"prefix",{},void 0,!0)])):vue.createCommentVNode("",!0),n.processing?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:1},[n.processingText?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createTextVNode(vue.toDisplayString(n.processingText),1)],64)):vue.renderSlot(e.$slots,"default",{key:1},void 0,!0)],64)):vue.createCommentVNode("",!0),n.processing?vue.createCommentVNode("",!0):vue.renderSlot(e.$slots,"default",{key:2},void 0,!0),a.hasSuffixSlot?(vue.openBlock(),vue.createElementBlock("span",_hoisted_3$7,[vue.renderSlot(e.$slots,"suffix",{},void 0,!0)])):vue.createCommentVNode("",!0)],10,_hoisted_1$i)}const BfButton=_export_sfc(_sfc_main$i,[["render",_sfc_render$i],["__scopeId","data-v-366c5a68"]]),BFButton=Object.freeze(Object.defineProperty({__proto__:null,default:BfButton},Symbol.toStringTag,{value:"Module"})),_sfc_main$h={name:"TSAnnotationDeleteDialog",components:{BfDialogHeader:__unplugin_components_0$2,DialogBody:__unplugin_components_2$1,BfButton,IconWarningCircle:__unplugin_components_1$2},props:{visible:{type:Boolean,default:!1},deleteAnnotation:{type:Object,default:()=>({annotation:{},withDiscussions:!1})}},data:function(){return{isProcessing:!1}},computed:{annotationDescription:function(){return pathOr("",["annotation","label"],this.deleteAnnotation)},annotationDateTime:function(){const e=pathOr("",["annotation","start"],this.deleteAnnotation);return this.getUTCDateString(e)+" "+this.getUTCTimeString(e)},deleteDiscussions:function(){return propOr(!1,"withDiscussions",this.deleteAnnotation)},btnDeleteCopy:function(){return this.deleteDiscussions?"Yes, I'm sure":"Delete"}},methods:{removeAnnotation:function(){this.$emit("delete",this.deleteAnnotation.annotation)},close:function(){this.$emit("update:visible",!1)},onClosed:function(){this.isProcessing=!1,this.$emit("update:delete-annotation",{annotation:{},withDiscussions:!1})},getUTCDateString:function(e){return e>0?(e=new Date(e/1e3),e.toDateString()):"unknown"},getUTCTimeString:function(e){if(e>0)return e=e/1e3,e=new Date(e),("0"+e.getUTCHours()).slice(-2)+":"+("0"+e.getUTCMinutes()).slice(-2)+":"+("0"+e.getUTCSeconds()).slice(-2)}}},_hoisted_1$h={class:"dialog-simple-buttons"};function _sfc_render$h(e,t,n,r,i,a){const o=__unplugin_components_0$2,u=__unplugin_components_1$2,l=vue.resolveComponent("bf-button"),c=__unplugin_components_2$1,p=ElDialog;return vue.openBlock(),vue.createBlock(p,{class:"simple",modelValue:n.visible,"onUpdate:modelValue":t[0]||(t[0]=d=>n.visible=d),"show-close":!1,onClose:a.close,onClosed:a.onClosed},{default:vue.withCtx(()=>[vue.createVNode(o,{slot:"title"}),vue.createVNode(c,null,{default:vue.withCtx(()=>[vue.createVNode(u,{class:"mb-16",height:32,width:32,color:"#C14D49"}),t[5]||(t[5]=vue.createElementVNode("h2",null,"Delete annotation?",-1)),a.deleteDiscussions?(vue.openBlock(),vue.createElementBlock(vue.Fragment,{key:0},[vue.createElementVNode("p",null,vue.toDisplayString(a.annotationDescription)+" - "+vue.toDisplayString(a.annotationDateTime),1),t[1]||(t[1]=vue.createElementVNode("hr",null,null,-1)),t[2]||(t[2]=vue.createElementVNode("p",null," Deleting this annotation will also remove any associated discussions and cannot be undone. ",-1)),t[3]||(t[3]=vue.createElementVNode("p",null," Are you sure you would like to remove this annotation? ",-1))],64)):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_1$h,[vue.createVNode(l,{class:"secondary",onClick:a.close},{default:vue.withCtx(()=>t[4]||(t[4]=[vue.createTextVNode(" Cancel ")])),_:1,__:[4]},8,["onClick"]),vue.createVNode(l,{class:"red",processing:e.isProcessing,onClick:a.removeAnnotation},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(a.btnDeleteCopy),1)]),_:1},8,["processing","onClick"])])]),_:1,__:[5]})]),_:1},8,["modelValue","onClose","onClosed"])}const __unplugin_components_5$1=_export_sfc(_sfc_main$h,[["render",_sfc_render$h],["__scopeId","data-v-d98c7b2b"]]),_sfc_main$g={name:"IconSelection",props:{width:{type:Number,default:16},height:{type:Number,default:16},color:{type:String,default:"currentColor"}}},_hoisted_1$g=["width","height","fill"];function _sfc_render$g(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:n.width,height:n.height,fill:n.color,viewBox:"0 0 24 24"},t[0]||(t[0]=[vue.createElementVNode("path",{pid:"0",d:"M16 10V7h-4V4H4v10h4v3h4v3h8V10zM6 12V6h4v1H8v5zm4 3V9h4v1h-2v5zm8 3h-4v-6h4z"},null,-1)]),8,_hoisted_1$g)}const __unplugin_components_3$1=_export_sfc(_sfc_main$g,[["render",_sfc_render$g]]),viewerSidePanelTypes=Object.freeze({INFO_PANEL:"infoPanel",DISCUSSION:"discussion",FILE_BROWSER:"fileBrowser",ANNOTATIONS:"annotations",CHANNELS:"channels"}),viewerToolTypes=Object.freeze({PAN:"pan",ANNOTATION_SHAPE:"annotationShape",ANNOTATION_DRAW:"annotationDraw",MEASURE:"measure",ANNOTATE:"annotate",POINTER:"pointer"});var tinyEmitter={exports:{}},hasRequiredTinyEmitter;function requireTinyEmitter(){if(hasRequiredTinyEmitter)return tinyEmitter.exports;hasRequiredTinyEmitter=1;function e(){}return e.prototype={on:function(t,n,r){var i=this.e||(this.e={});return(i[t]||(i[t]=[])).push({fn:n,ctx:r}),this},once:function(t,n,r){var i=this;function a(){i.off(t,a),n.apply(r,arguments)}return a._=n,this.on(t,a,r)},emit:function(t){var n=[].slice.call(arguments,1),r=((this.e||(this.e={}))[t]||[]).slice(),i=0,a=r.length;for(i;i<a;i++)r[i].fn.apply(r[i].ctx,n);return this},off:function(t,n){var r=this.e||(this.e={}),i=r[t],a=[];if(i&&n)for(var o=0,u=i.length;o<u;o++)i[o].fn!==n&&i[o].fn._!==n&&a.push(i[o]);return a.length?r[t]=a:delete r[t],this}},tinyEmitter.exports=e,tinyEmitter.exports.TinyEmitter=e,tinyEmitter.exports}var instance,hasRequiredInstance;function requireInstance(){if(hasRequiredInstance)return instance;hasRequiredInstance=1;var e=requireTinyEmitter();return instance=new e,instance}var instanceExports=requireInstance();const emitter=getDefaultExportFromCjs(instanceExports),EventBus={$emit:(...e)=>emitter.emit(...e),$on:(...e)=>emitter.on(...e),$off:(...e)=>emitter.off(...e),$once:(...e)=>emitter.once(...e)};function useHandleLogout(e){if(useRoute().name==="docs-login")return;defaultTo(!1,prop("shouldShowToast",e));const n=defaultTo(!1,prop("shouldRedirect",e));this.clearState(),n&&this.$route.fullPath}const _isString$1=e=>Object.prototype.toString.call(e)==="[object String]",_trimValues$1=e=>{Object.keys(e).forEach(t=>{_isString$1(e[t])&&(e[t]=e[t].trim())})};function useSendXhr(e,t){if(!e)return Promise.reject({status:400,message:"Url is missing!"});const n=propOr("GET","method",t),r=propOr({},"header",t),i=Object.assign({},{"Content-type":"application/json"},r),a=prop("body",t);let o={headers:i,method:n};if(a){typeof a=="object"&&_trimValues$1(a);const u=JSON.stringify(a);o=Object.assign({},o,{body:u})}return fetch(e,o).then(u=>u.status>=400?Promise.reject(u):u.json().catch(()=>u))}function useHandleXhrError(e){const t=prop("status",e);let n;if(t===void 0){console.log(e);return}else n=e.status;if(n===400&&e.body)e.body.getReader().read().then(({done:r,value:i})=>{const a=i instanceof Uint8Array?String.fromCharCode.apply(null,i):i,o=compose(defaultTo(a),tryCatch(compose(prop("message"),JSON.parse),(u,l)=>l))(a);EventBus.$emit("ajaxError",{detail:{type:"error",msg:o}})});else{if(n===401)return useHandleLogout();EventBus.$emit("ajaxError",e)}}async function useToken(){try{return auth.fetchAuthSession().then(e=>{var t;return(t=e==null?void 0:e.tokens)==null?void 0:t.accessToken.toString()})}catch(e){console.error(e)}}const getLayerIndex=(e,t,n)=>{const r=propOr("",e,t);return findIndex(propEq("id",r),n)},initialState=()=>({selectedPackage:{},activeViewer:{},viewerSidePanelOpen:!1,viewerSlideInfo:{curRotation:0,curZoom:0,isMeasuring:!1,measureLength:0,zoomPerClick:0,minZoom:0,maxZoom:0},viewerChannels:[],viewerAnnotations:[],activeAnnotationLayer:{},activeAnnotation:{},viewerDiscussions:{discussions:[],comments:{}},viewerErrors:{},viewerSidePanelView:viewerSidePanelTypes.INFO_PANEL,viewerActiveTool:viewerToolTypes.PAN,viewerMontageScheme:"NOT_MONTAGED"}),useViewerStore=pinia.defineStore("viewer",{state:initialState,getters:{viewerSelectedChannels:e=>e.viewerChannels.filter(t=>t.selected),getViewerActiveLayer:e=>()=>find(propEq("selected",!0),e.viewerAnnotations),getAnnotationById:e=>t=>compose(find(propEq("id",t)),flatten,pluck("annotations"))(e.viewerAnnotations),viewerMpp:e=>compose(propOr("","value"),find(propEq("key","aperio.MPP")),propOr([{}],"properties"),find(propEq("category","Blackfynn")),propOr([{}],"properties"))(e.activeViewer),isTSFileProcessed:e=>t=>{var r;return((r=t==null?void 0:t.content)==null?void 0:r.state)==="READY"}},actions:{clearState(){Object.assign(this,initialState())},setActiveViewer(e){this.activeViewer=e},async fetchAndSetActiveViewer(e){const t=e.packageId,n=await useToken(),r=`https://api.pennsieve.net/packages/${t}?api_key=${n}`,i=await useSendXhr(r);if(this.isFileProcessed(i))return this.setActiveViewer(i),Promise.resolve(i);throw new Error("Timeseries viewer is not available, since the file is not processed")},closeViewer(){this.clearState()},setSidePanel({open:e,view:t}){this.viewerSidePanelOpen=e,this.viewerSidePanelView=t},updateViewerSlideInfo(e){this.viewerSlideInfo=e},setChannels(e){this.viewerChannels=e},updateViewChannel({channelId:e,data:t}){const n=findIndex(propEq("id",e),this.viewerChannels);n>=0&&Object.entries(t).forEach(([r,i])=>this.viewerChannels[n][r]=i)},updateChannel({data:e,channelIndex:t}){this.viewerChannels[t]=e},createLayer(e){this.viewerAnnotations.push(e)},setActiveAnnotationLayer(e){this.activeAnnotationLayer=e,this.viewerAnnotations.forEach(n=>n.selected=!1);const t=findIndex(propEq("id",e),this.viewerAnnotations);t>=0&&(this.viewerAnnotations[t].selected=!0)},setActiveAnnotation(e){if(this.viewerAnnotations.forEach(t=>t.annotations.forEach(n=>n.selected=!1)),e.id){const t=getLayerIndex("layer_id",e,this.viewerAnnotations),n=findIndex(propEq("id",e.id),this.viewerAnnotations[t].annotations);n>=0&&(this.viewerAnnotations[t].annotations[n].selected=!0)}this.activeAnnotation=e},updateLayer({layer:e,index:t}){this.viewerAnnotations[t]=e},deleteLayer({index:e}){this.viewerAnnotations.splice(e,1)},setAnnotations(e){this.viewerAnnotations=e},createAnnotation({annotation:e,index:t}){this.viewerAnnotations[t].annotations.push(e)},updateAnnotation({data:e}){const t=getLayerIndex("layer_id",e,this.viewerAnnotations),n=findIndex(propEq("id",e.id),this.viewerAnnotations[t].annotations);this.viewerAnnotations[t].annotations[n]=e},deleteAnnotation({data:e}){const t=getLayerIndex("layer_id",e,this.viewerAnnotations),n=findIndex(propEq("id",e.id),this.viewerAnnotations[t].annotations);this.viewerAnnotations[t].annotations.splice(n,1)},setDiscussions({discussions:e,comments:t}){this.viewerDiscussions={discussions:e,comments:t}},createDiscussion({discussion:e,comment:t}){const n=pathOr("",["discussion_id"],t),r=this.viewerDiscussions.comments[n]||[];r.push(t),includes(e,this.viewerDiscussions.discussions)||(this.viewerDiscussions.discussions.push(e),this.viewerDiscussions.comments[n]=r)},removeDiscussion(e){this.viewerDiscussions.discussions.splice(e,1)},createComment({comment:e,discussionId:t}){var n;((n=this.viewerDiscussions.comments)[t]||(n[t]=[])).push(e)},removeComment(e){const t=propOr(0,"discussion_id",e),n=propOr([],t,this.viewerDiscussions.comments),r=propOr(0,"id",e),i=findIndex(propEq("id",r),n),a=remove(i,1,n);if(this.viewerDiscussions.comments[t]=a,a.length===0){const o=findIndex(propEq("id",t),this.viewerDiscussions.discussions);o>=0&&this.viewerDiscussions.discussions.splice(o,1)}},setViewerErrors(e){this.viewerErrors=e},setViewerMontageScheme(e){this.viewerMontageScheme=e},selectPackage(e){this.selectedPackage=e}}}),viewerStoreMixin={computed:{viewerStore(){return useViewerStore()}}},_sfc_main$f={name:"TSAnnotationModal",components:{IconSelection:__unplugin_components_3$1,BfButton},props:{visible:{type:Boolean,default:!1}},mixins:[viewerStoreMixin],data:function(){return{isProcessing:!1,selectedRange:{},initialTimeRage:{start:0,end:0},hasRangeValue:!0,defaultEventTime:"",defaultEventDate:"",defaultLabels:[{value:"Event",label:"Event"},{value:"Artifact",label:"Artifact"},{value:"Seizure",label:"Seizure"},{value:"Mark",label:"Mark"},{value:"Stim On",label:"Stim On"},{value:"Stim Off",label:"Stim Off"},{value:"Start",label:"Start"},{value:"Stop",label:"Stop"}]}},mounted(){},computed:{activeAnnotation(){return this.viewerStore.activeAnnotation},activeViewer(){return this.viewerStore.activeViewer},viewerChannels(){return this.viewerStore.viewerChannels},viewerActiveTool(){return this.viewerStore.viewerActiveTool},viewerAnnotations(){return this.viewerStore.viewerAnnotations},dialogTitle:function(){return this.activeAnnotation.id?"Edit Annotation":"Create Annotation"},actionButtonText:function(){return this.activeAnnotation.id?"Update":"Create"},datePickerType:function(){return this.hasRangeValue?"datetimerange":"datetime"},channelSelectionStr:function(){let e="";return this.activeAnnotation.allChannels?e="Adding to all channels":propOr(!0,"channelIds",this.activeAnnotation).length==1?e="Adding to single channel":e=`Adding to ${propOr(1,"channelIds",this.activeAnnotation).length} channels`,e}},watch:{visible:function(){this.tzOffset=new Date(this.activeAnnotation.start/1e3).getTimezoneOffset()*6e7;const e=this.activeAnnotation.start+this.tzOffset,t=this.activeAnnotation.end+this.tzOffset;this.selectedLayer=this.activeAnnotation.layer_id,this.selectedType=this.activeAnnotation.label,this.initialTimeRage={start:this.activeAnnotation.start,end:this.activeAnnotation.end},this.defaultEventTime=e/1e3,this.defaultEventDate=t/1e3,this.activeAnnotation.duration==0?(this.hasRangeValue=!1,this.selectedRange=e/1e3):(this.hasRangeValue=!0,this.selectedRange=[e/1e3,t/1e3])},hasRangeValue:function(e){this.tzOffsett=new Date(this.activeAnnotation.start/1e3).getTimezoneOffset()*6e7;const t=this.activeAnnotation.start+this.tzOffset,n=this.activeAnnotation.end+this.tzOffset;e?this.selectedRange=[t/1e3,n/1e3]:(this.activeAnnotation.duration=0,this.selectedRange=t/1e3)}},methods:{submitForm:function(){this.activeAnnotation.label=this.activeAnnotation.label,this.hasRangeValue?(this.activeAnnotation.start=this.selectedRange[0]*1e3-this.tzOffset,this.activeAnnotation.end=this.selectedRange[1]*1e3-this.tzOffset,this.activeAnnotation.duration=this.activeAnnotation.end-this.activeAnnotation.start):(this.activeAnnotation.start=this.selectedRange*1e3-this.tzOffset,this.activeAnnotation.end=this.selectedRange*1e3-this.tzOffset,this.activeAnnotation.duration=0),this.viewerStore.setActiveAnnotation(this.activeAnnotation),this.$emit("createUpdateAnnotation",this.activeAnnotation)},close:function(){this.$emit("closeWindow")},onClosed:function(){this.isProcessing=!1},getUTCDateString:function(e){return e>0?(e=new Date(e/1e3),e.toDateString()):"unknown"},getUTCTimeString:function(e){if(e>0)return e=e/1e3,e=new Date(e),("0"+e.getUTCHours()).slice(-2)+":"+("0"+e.getUTCMinutes()).slice(-2)+":"+("0"+e.getUTCSeconds()).slice(-2)}}},_hoisted_1$f={slot:"body"},_hoisted_2$6={class:"select-wrapper"},_hoisted_3$6={class:"range-type-selector"},_hoisted_4$5={class:"select-wrapper"},_hoisted_5$4={class:"description-wrapper"},_hoisted_6$4={slot:"footer"},_hoisted_7$2={class:"button-wrapper"},_hoisted_8$2={class:"channels-selected"},_hoisted_9$1={class:"buttons"};function _sfc_render$f(e,t,n,r,i,a){const o=ElSwitch,u=ElDatePicker,l=ElOption,c=ElSelect,p=ElInput,d=__unplugin_components_3$1,f=vue.resolveComponent("BfButton"),v=ElDialog;return vue.openBlock(),vue.createBlock(v,{class:"timeseries-annotation-modal",ref:"annotation-modal",title:a.dialogTitle,modelValue:n.visible,"onUpdate:modelValue":t[5]||(t[5]=h=>n.visible=h),onClose:a.close,onClosed:a.onClosed},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$f,[vue.createElementVNode("div",_hoisted_2$6,[vue.createElementVNode("div",_hoisted_3$6,[t[6]||(t[6]=vue.createElementVNode("div",{class:"select-label"}," Range? ",-1)),vue.createVNode(o,{modelValue:e.hasRangeValue,"onUpdate:modelValue":t[0]||(t[0]=h=>e.hasRangeValue=h),"active-color":"#5039F7","inactive-color":"#CAC5BF"},null,8,["modelValue"])]),vue.createVNode(u,{modelValue:e.selectedRange,"onUpdate:modelValue":t[1]||(t[1]=h=>e.selectedRange=h),class:"date-time-picker",type:a.datePickerType,format:"yyyy-MM-DD hh:mm:ss","format-value":"timestamp","range-separator":"To","start-placeholder":"Start date/time","end-placeholder":"End date/time"},null,8,["modelValue","type"])]),vue.createElementVNode("div",_hoisted_4$5,[vue.createElementVNode("div",null,[t[7]||(t[7]=vue.createElementVNode("div",{class:"select-label"}," Annotation Layer ",-1)),vue.createVNode(c,{modelValue:a.activeAnnotation.layer_id,"onUpdate:modelValue":t[2]||(t[2]=h=>a.activeAnnotation.layer_id=h),placeholder:"Select"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(a.viewerAnnotations,h=>(vue.openBlock(),vue.createBlock(l,{key:h.id,label:h.name,value:h.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),vue.createElementVNode("div",null,[t[8]||(t[8]=vue.createElementVNode("div",{class:"select-label"}," Annotation Type ",-1)),vue.createVNode(c,{modelValue:a.activeAnnotation.label,"onUpdate:modelValue":t[3]||(t[3]=h=>a.activeAnnotation.label=h),placeholder:"Select"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.defaultLabels,h=>(vue.openBlock(),vue.createBlock(l,{key:h.value,label:h.label,value:h.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])]),vue.createElementVNode("div",_hoisted_5$4,[t[9]||(t[9]=vue.createElementVNode("div",{class:"select-label"}," Description ",-1)),vue.createVNode(p,{ref:"input",modelValue:a.activeAnnotation.description,"onUpdate:modelValue":t[4]||(t[4]=h=>a.activeAnnotation.description=h),placeholder:"Please provide additional information...",type:"textarea",rows:5},null,8,["modelValue"])])]),vue.createElementVNode("div",_hoisted_6$4,[vue.createElementVNode("div",_hoisted_7$2,[vue.createElementVNode("div",_hoisted_8$2,[vue.createVNode(d,{class:"inline-icon",height:16,width:16}),vue.createTextVNode(" "+vue.toDisplayString(a.channelSelectionStr),1)]),vue.createElementVNode("div",_hoisted_9$1,[vue.createVNode(f,{onClick:a.submitForm},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(a.actionButtonText),1)]),_:1},8,["onClick"])])])])]),_:1},8,["title","modelValue","onClose","onClosed"])}const __unplugin_components_4$1=_export_sfc(_sfc_main$f,[["render",_sfc_render$f],["__scopeId","data-v-209d55c2"]]),_sfc_main$e={name:"TSFilterModal",components:{"bf-button":()=>Promise.resolve().then(()=>BFButton),IconSelection:__unplugin_components_3$1},mixins:[],watch:{},computed:{activeViewer(){return this.viewerStore.activeViewer},computeVisible0:function(){switch(this.selectedFilter){case"lowpass":return!0;case"highpass":return!0;case"bandpass":return!0;default:return!1}},onSingleChannel:function(){return this.onChannels.length==1},selectedChannels:function(){return this.onChannels.length},computeVisible1:function(){switch(this.selectedFilter){case"lowpass":return!1;case"highpass":return!1;case"bandpass":return!0;default:return!1}},computeVisible2:function(){switch(this.selectedFilter){case"bandstop":return!0;default:return!1}},computePlaceholder1:function(e){switch(this.selectedFilter){case"lowpass":return"Low Pass Cutoff Frequency (Hz)";case"highpass":return"High Pass Cutoff Frequency (Hz)";case"bandpass":return"Low Pass Cutoff Frequency (Hz)";default:return""}},computePlaceholder2:function(e){switch(this.selectedFilter){case"bandpass":return"High Pass Cutoff Frequency (Hz)";default:return""}}},props:{visible:{type:Boolean,default:!1}},data:function(){return{selectedFilter:null,filterOptions:[{label:"No Filter",value:"clear"},{label:"Low Pass",value:"lowpass"},{label:"High Pass",value:"highpass"},{label:"Band Pass",value:"bandpass"},{label:"Notch",value:"bandstop"}],selectedNotch:null,notchOptions:[{label:"50Hz",value:50},{label:"60Hz",value:60}],input0:null,input1:null,onChannels:[]}},methods:{close:function(){this.$emit("closeWindow")},handleChange:function(){},onButtonClick:function(){},submitForm:function(e){EventBus.$emit("active-viewer-action",{method:"setTimeseriesFilters",payload:{selChannels:this.onChannels,filterType:this.selectedFilter,input0:this.input0,input1:this.input1,notchFreq:this.selectedNotch}}),this.$emit("closeWindow")}}},_hoisted_1$e={slot:"body"},_hoisted_2$5={class:"select-wrapper"},_hoisted_3$5={key:0,class:"filter-input-wrapper"},_hoisted_4$4={key:1,class:"filter-input-wrapper"},_hoisted_5$3={slot:"footer"},_hoisted_6$3={class:"button-wrapper"},_hoisted_7$1={class:"channels-selected"},_hoisted_8$1={key:0},_hoisted_9={key:1},_hoisted_10={class:"buttons"};function _sfc_render$e(e,t,n,r,i,a){const o=ElOption,u=ElSelect,l=ElInputNumber,c=__unplugin_components_3$1,p=vue.resolveComponent("bf-button"),d=ElDialog;return vue.openBlock(),vue.createBlock(d,{class:"timeseries-filter-modal",ref:"filter-modal",title:"Set Filter",modelValue:n.visible,"onUpdate:modelValue":t[4]||(t[4]=f=>n.visible=f),onClose:a.close},{default:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_1$e,[vue.createElementVNode("div",_hoisted_2$5,[vue.createVNode(u,{modelValue:e.selectedFilter,"onUpdate:modelValue":t[0]||(t[0]=f=>e.selectedFilter=f),placeholder:"Select"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.filterOptions,f=>(vue.openBlock(),vue.createBlock(o,{key:f.value,label:f.label,value:f.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),a.computeVisible0?(vue.openBlock(),vue.createElementBlock("div",_hoisted_3$5,[vue.createTextVNode(vue.toDisplayString(a.computePlaceholder1)+" ",1),vue.createVNode(l,{class:"filterInput",modelValue:e.input0,"onUpdate:modelValue":t[1]||(t[1]=f=>e.input0=f),"controls-position":"right",precision:2,onChange:a.handleChange},null,8,["modelValue","onChange"])])):vue.createCommentVNode("",!0),a.computeVisible1?(vue.openBlock(),vue.createElementBlock("div",_hoisted_4$4,[vue.createTextVNode(vue.toDisplayString(a.computePlaceholder2)+" ",1),vue.createVNode(l,{class:"filterInput",modelValue:e.input1,"onUpdate:modelValue":t[2]||(t[2]=f=>e.input1=f),"controls-position":"right",precision:2,onChange:a.handleChange},null,8,["modelValue","onChange"])])):vue.createCommentVNode("",!0),a.computeVisible2?(vue.openBlock(),vue.createBlock(u,{key:2,modelValue:e.selectedNotch,"onUpdate:modelValue":t[3]||(t[3]=f=>e.selectedNotch=f),placeholder:"Select",class:"filter-input-wrapper"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.notchOptions,f=>(vue.openBlock(),vue.createBlock(o,{key:f.value,label:f.label,value:f.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):vue.createCommentVNode("",!0)])])]),footer:vue.withCtx(()=>[vue.createElementVNode("div",_hoisted_5$3,[vue.createElementVNode("div",_hoisted_6$3,[vue.createElementVNode("div",_hoisted_7$1,[vue.createVNode(c,{height:24,width:24}),a.onSingleChannel?(vue.openBlock(),vue.createElementBlock("div",_hoisted_8$1," Adding to single channel ")):(vue.openBlock(),vue.createElementBlock("div",_hoisted_9," Adding to "+vue.toDisplayString(a.selectedChannels)+" Selected Channels ",1))]),vue.createElementVNode("div",_hoisted_10,[vue.createVNode(p,{onClick:a.submitForm},{default:vue.withCtx(()=>t[5]||(t[5]=[vue.createTextVNode("Set Filter ")])),_:1,__:[5]},8,["onClick"])])])])]),_:1},8,["modelValue","onClose"])}const __unplugin_components_3=_export_sfc(_sfc_main$e,[["render",_sfc_render$e],["__scopeId","data-v-d606d1fe"]]),_sfc_main$d={name:"IconStopwatch",props:{width:{type:Number,default:15},height:{type:Number,default:16},color:{type:String,default:"currentColor"}}},_hoisted_1$d=["width","height","fill"];function _sfc_render$d(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:n.width,height:n.height,fill:n.color,viewBox:"0 0 15 16"},t[0]||(t[0]=[vue.createElementVNode("path",{d:"M5.1008,5.396 C4.7432,5.616 6.0584,8.7896 6.3792,9.3064 C6.6592,9.7616 7.2536,9.9 7.7056,9.6216 C8.16,9.34 8.3016,8.7464 8.0216,8.2936 C7.704,7.7752 5.4576,5.1752 5.1008,5.396 Z M4.8328,1.9216 C5.5752,1.6632 6.3704,1.52 7.2,1.52 C8.0296,1.52 8.8248,1.6632 9.5672,1.9216 C9.8304,2.0128 10.1792,1.8296 10.0248,1.4328 C9.912,1.1448 9.8032,0.8632 9.7592,0.7488 C9.6544,0.4776 9.2792,0.2536 9.116,0.2168 C8.4984,0.0776 7.8584,0 7.2,0 C6.5416,0 5.9016,0.0776 5.2832,0.2168 C5.12,0.2536 4.7456,0.4776 4.6408,0.7488 C4.5968,0.8632 4.4872,1.1448 4.3752,1.4328 C4.2208,1.8296 4.5696,2.0136 4.8328,1.9216 Z M14.4784,2.5488 C14.3248,2.3648 14.1616,2.1848 13.988,2.0112 C13.8152,1.8376 13.6352,1.6752 13.452,1.5208 C13.3296,1.4176 12.9696,1.3336 12.7416,1.5616 C12.5144,1.7896 11.4232,2.8792 11.4232,2.8792 C11.7448,3.1096 12.0576,3.3632 12.3472,3.652 C12.6368,3.9408 12.8888,4.2536 13.12,4.576 C13.12,4.576 14.2104,3.4864 14.4376,3.2584 C14.6664,3.0296 14.5824,2.6704 14.4784,2.5488 Z M7.2,2.32 C3.62,2.32 0.7192,5.2208 0.7192,8.8 C0.7192,12.38 3.62,15.2808 7.2,15.2808 C10.7784,15.2808 13.68,12.38 13.68,8.8 C13.68,5.2216 10.7784,2.32 7.2,2.32 Z M7.2,13.6808 C4.5056,13.6808 2.32,11.496 2.32,8.8008 C2.32,6.1056 4.5048,3.9208 7.2,3.9208 C9.8952,3.9208 12.0808,6.1056 12.0808,8.8008 C12.0808,11.4952 9.8952,13.6808 7.2,13.6808 Z"},null,-1)]),8,_hoisted_1$d)}const __unplugin_components_10=_export_sfc(_sfc_main$d,[["render",_sfc_render$d]]),_sfc_main$c={name:"IconNextPage",props:{width:{type:Number,default:16},height:{type:Number,default:16},color:{type:String,default:"currentColor"}}},_hoisted_1$c=["width","height","fill"];function _sfc_render$c(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:n.width,height:n.height,fill:n.color,viewBox:"0 0 12 12"},t[0]||(t[0]=[vue.createElementVNode("path",{d:"M8.244,5.52 L1.041,0.571 C0.469,0.188 0,0.469 0,1.196 L0,10.805 C0,11.53 0.469,11.811 1.041,11.43 L8.244,6.479 C8.244,6.479 8.523,6.28 8.523,6.001 C8.523,5.721 8.244,5.52 8.244,5.52 Z M10,0 L11,0 C11.553,0 12,0.048 12,0.6 L12,11.4 C12,11.952 11.553,12 11,12 L10,12 C9.447,12 9,11.952 9,11.4 L9,0.6 C9,0.048 9.447,0 10,0 Z"},null,-1)]),8,_hoisted_1$c)}const __unplugin_components_7=_export_sfc(_sfc_main$c,[["render",_sfc_render$c]]),_sfc_main$b={name:"IconNextAnnotationRightFacing",props:{width:{type:Number,default:24},height:{type:Number,default:14},color:{type:String,default:"currentColor"}}},_hoisted_1$b=["width","height","fill"];function _sfc_render$b(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:n.width,height:n.height,fill:n.color,viewBox:"0 0 24 14"},t[0]||(t[0]=[vue.createElementVNode("defs",null,[vue.createElementVNode("path",{pid:"0",d:"M4 5L.859 1.58a.695.695 0 0 1 0-.978.68.68 0 0 1 .969 0l3.83 3.908a.697.697 0 0 1 0 .979l-3.83 3.908a.68.68 0 0 1-.969 0 .695.695 0 0 1 0-.978L4 5z",id:"svgicon-next-annotation-right-facing-a"})],-1),vue.createElementVNode("g",{_fill:"none","fill-rule":"evenodd"},[vue.createElementVNode("g",{transform:"translate(18)"},[vue.createElementVNode("mask",{id:"svgicon-next-annotation-right-facing-b",_fill:"#fff"},[vue.createElementVNode("use",{"xlink:href":"#svgicon-next-annotation-right-facing-a"})]),vue.createElementVNode("use",{_fill:"#000","fill-rule":"nonzero","xlink:href":"#svgicon-next-annotation-right-facing-a"}),vue.createElementVNode("g",{mask:"url(#svgicon-next-annotation-right-facing-b)",_fill:"#000"},[vue.createElementVNode("path",{pid:"1",d:"M-2 0H8v10H-2z"})])]),vue.createElementVNode("g",{_fill:"#000"},[vue.createElementVNode("path",{pid:"2",d:"M13.986 10.906L8.386 8.4l2.303 5.6.63-2.611zM0 8.4h1.4v1.4H0zM2.8 8.4h1.4v1.4H2.8zM5.6 8.4H7v1.4H5.6zM0 5.6h1.4V7H0zM0 2.8h1.4v1.4H0zM8.4 5.6h1.4V7H8.4zM8.4 2.8h1.4v1.4H8.4zM0 0h1.4v1.4H0zM2.8 0h1.4v1.4H2.8zM5.6 0H7v1.4H5.6zM8.4 0h1.4v1.4H8.4z"})])],-1)]),8,_hoisted_1$b)}const __unplugin_components_6=_export_sfc(_sfc_main$b,[["render",_sfc_render$b]]),_sfc_main$a={name:"IconNextAnnotationLeftFacing",props:{width:{type:Number,default:24},height:{type:Number,default:14},color:{type:String,default:"currentColor"}}},_hoisted_1$a=["width","height","fill"];function _sfc_render$a(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:n.width,height:n.height,fill:n.color,viewBox:"0 0 24 14"},t[0]||(t[0]=[vue.createElementVNode("defs",null,[vue.createElementVNode("path",{pid:"0",d:"M4 5L.859 1.58a.695.695 0 0 1 0-.978.68.68 0 0 1 .969 0l3.83 3.908a.697.697 0 0 1 0 .979l-3.83 3.908a.68.68 0 0 1-.969 0 .695.695 0 0 1 0-.978L4 5z",id:"svgicon-next-annotation-left-facing-a"})],-1),vue.createElementVNode("g",{_fill:"none","fill-rule":"evenodd"},[vue.createElementVNode("g",{transform:"matrix(-1 0 0 1 6 0)"},[vue.createElementVNode("mask",{id:"svgicon-next-annotation-left-facing-b",_fill:"#fff"},[vue.createElementVNode("use",{"xlink:href":"#svgicon-next-annotation-left-facing-a"})]),vue.createElementVNode("use",{_fill:"#000","fill-rule":"nonzero","xlink:href":"#svgicon-next-annotation-left-facing-a"}),vue.createElementVNode("g",{mask:"url(#svgicon-next-annotation-left-facing-b)",_fill:"#000"},[vue.createElementVNode("path",{pid:"1",d:"M-2 0H8v10H-2z"})])]),vue.createElementVNode("g",{_fill:"#000"},[vue.createElementVNode("path",{pid:"2",d:"M23.986 10.906l-5.6-2.506 2.303 5.6.63-2.611zM10 8.4h1.4v1.4H10zM12.8 8.4h1.4v1.4h-1.4zM15.6 8.4H17v1.4h-1.4zM10 5.6h1.4V7H10zM10 2.8h1.4v1.4H10zM18.4 5.6h1.4V7h-1.4zM18.4 2.8h1.4v1.4h-1.4zM10 0h1.4v1.4H10zM12.8 0h1.4v1.4h-1.4zM15.6 0H17v1.4h-1.4zM18.4 0h1.4v1.4h-1.4z"})])],-1)]),8,_hoisted_1$a)}const __unplugin_components_5=_export_sfc(_sfc_main$a,[["render",_sfc_render$a]]),_sfc_main$9={name:"IconPreviousPage",props:{width:{type:Number,default:12},height:{type:Number,default:12},color:{type:String,default:"currentColor"}}},_hoisted_1$9=["width","height","fill"];function _sfc_render$9(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:n.width,height:n.height,fill:n.color,viewBox:"0 0 12 12"},t[0]||(t[0]=[vue.createElementVNode("path",{d:"M10.959,0.571 L3.756,5.52 C3.756,5.52 3.477,5.721 3.477,6.001 C3.477,6.281 3.756,6.48 3.756,6.48 L10.959,11.431 C11.531,11.811 12,11.53 12,10.805 L12,1.196 C12,0.469 11.531,0.188 10.959,0.571 Z M2,0 L1,0 C0.447,0 0,0.048 0,0.6 L0,11.4 C0,11.952 0.447,12 1,12 L2,12 C2.553,12 3,11.952 3,11.4 L3,0.6 C3,0.048 2.553,0 2,0 Z"},null,-1)]),8,_hoisted_1$9)}const __unplugin_components_4=_export_sfc(_sfc_main$9,[["render",_sfc_render$9]]),_sfc_main$8={name:"IconTimescale",props:{width:{type:Number,default:16},height:{type:Number,default:16},color:{type:String,default:"currentColor"}}},_hoisted_1$8=["width","height","fill"];function _sfc_render$8(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:n.width,height:n.height,fill:n.color,viewBox:"0 0 16 16"},t[0]||(t[0]=[vue.createElementVNode("path",{d:"M13.653125,14.3537502 L11.29125,11.9918752 C11.6475,11.4075002 11.8525,10.7200002 11.8525,9.98562517 C11.8525,7.85000017 10.001875,6.00000017 7.86625,6.00000017 C5.730625,5.99937517 4,7.73062517 4,9.86625017 C4,12.0012502 5.850625,13.8518752 7.985625,13.8518752 C8.69625,13.8518752 9.360625,13.6587502 9.9325,13.3243752 L12.306875,15.7000002 C12.539375,15.9318752 12.91625,15.9318752 13.148125,15.7000002 L13.7375,15.1106252 C13.969375,14.8787502 13.885,14.5856252 13.653125,14.3537502 Z M5.19,9.86625017 C5.19,8.38750017 6.388125,7.18937517 7.86625,7.18937517 C9.345,7.18937517 10.6625,8.50625017 10.6625,9.98562517 C10.6625,11.4637502 9.46375,12.6625002 7.985625,12.6625002 C6.506875,12.6618752 5.19,11.3443752 5.19,9.86625017 Z M16,3 L13,6 L13,4 L9,4 L9,2 L13,2 L13,6.2778623e-16 L16,3 Z M3,6 L2.66453526e-15,3 L3,-7.66951701e-17 L3,2 L9,2 L9,4 L3,4 L3,6 Z"},null,-1)]),8,_hoisted_1$8)}const IconTimescale=_export_sfc(_sfc_main$8,[["render",_sfc_render$8]]),_sfc_main$7={name:"IconControllerPlay",props:{width:{type:Number,default:10},height:{type:Number,default:12},color:{type:String,default:"currentColor"}}},_hoisted_1$7=["width","height","fill"];function _sfc_render$7(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:n.width,height:n.height,fill:n.color,viewBox:"0 0 20 12"},t[0]||(t[0]=[vue.createElementVNode("path",{d:"M10,6.001 C10,6.3 9.695,6.515 9.695,6.515 L1.134,11.818 C0.51,12.227 0,11.924 0,11.149 L0,0.852 C0,0.075 0.51,-0.226 1.135,0.182 L9.696,5.487 C9.695,5.487 10,5.702 10,6.001 Z"},null,-1)]),8,_hoisted_1$7)}const IconControllerPlay=_export_sfc(_sfc_main$7,[["render",_sfc_render$7]]),_sfc_main$6={name:"IconControllerPause",props:{width:{type:Number,default:10},height:{type:Number,default:12},color:{type:String,default:"currentColor"}}},_hoisted_1$6=["width","height","fill"];function _sfc_render$6(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:n.width,height:n.height,fill:n.color,viewBox:"0 0 20 12"},t[0]||(t[0]=[vue.createElementVNode("path",{d:"M2,0 C2.553,0 3,0.048 3,0.6 L3,11.4 C3,11.952 2.553,12 2,12 L1,12 C0.447,12 0,11.952 0,11.4 L0,0.6 C0,0.048 0.447,0 1,0 L2,0 Z M9,0 C9.553,0 10,0.048 10,0.6 L10,11.4 C10,11.952 9.553,12 9,12 L8,12 C7.447,12 7,11.952 7,11.4 L7,0.6 C7,0.048 7.447,0 8,0 L9,0 Z"},null,-1)]),8,_hoisted_1$6)}const IconControllerPause=_export_sfc(_sfc_main$6,[["render",_sfc_render$6]]),_sfc_main$5={name:"TSViewerToolbar",components:{IconNextAnnotationRightFacing:__unplugin_components_6,IconControllerPlay,IconControllerPause,IconStopwatch:__unplugin_components_10,IconNextPage:__unplugin_components_7,IconNextAnnotationLeftFacing:__unplugin_components_5,IconPreviousPage:__unplugin_components_4,IconTimescale},computed:{iconPlay:function(){return this.isPlaying===!0?"icon-controller-pause":"icon-controller-play"},durationInSeconds:{get:function(){return this.duration/1e6},set:function(e){this.$emit("updateDuration",e)}}},mixins:[viewerStoreMixin],props:{constants:Object,duration:Number,start:Number},data:function(){return{showVertZoom:!0,showTimeZoom:!0,showPlaybackSpeed:!0,selectedTimeRange:0,isPlaying:!1,montageOptions:[{value:"NOT_MONTAGED",label:"Continuous (Default)"},{value:"REFERENTIAL_VS_CZ",label:"Referential Montage"},{value:"BIPOLAR_ANT_POS",label:"Ant/Post Montage"},{value:"BIPOLAR_TRANSVERSE",label:"Transverse Montage"}],selectedMontage:"",playSpeedOptions:[{value:.5,label:"0.5x"},{value:1,label:"1x"},{value:2,label:"2x"},{value:5,label:"5x"},{value:10,label:"10x"}],selectedPlaySpeed:null,intervalTimer:null,intervalPeriod:150,intervalPage:1e6}},mounted:function(){this.selectedMontage="NOT_MONTAGED",this.selectedPlaySpeed=1},methods:{updateMontageScheme:function(e){this.viewerStore.setViewerMontageScheme(e)},updatePlaybackSpeed:function(e){},toggleTimeZoom:function(){this.showTimeZoom=!this.showTimeZoom},toggleVerticalZoom:function(){this.showVertZoom=!this.showVertZoom},togglePlaybackSpeed:function(){this.showPlaybackSpeed=!this.showPlaybackSpeed},togglePlayback:function(){this.isPlaying===!1?this.startPlay():this.stopPlay()},pageBack:function(){this.$emit("pageBack")},pageForward:function(){this.$emit("pageForward")},incrementZoom:function(){this.$emit("incrementZoom")},decrementZoom:function(){this.$emit("decrementZoom")},updateDuration:function(){this.$emit("updateDuration",this.selectedTimeRange)},nextAnnotation:function(){this.$emit("nextAnnotation")},previousAnnotation:function(){this.$emit("previousAnnotation")},startPlay:function(){this.isPlaying=!0;let e=this;this.intervalTimerFnc=function(){e.$emit("setStart",e.start+e.intervalPage*e.selectedPlaySpeed),e.intervalTimer=setTimeout(e.intervalTimerFnc,e.intervalPeriod)},this.intervalTimer=setTimeout(this.intervalTimerFnc,this.intervalPeriod)},stopPlay:function(){this.isPlaying=!1,this.intervalPeriod=150,clearInterval(this.intervalTimer)}}},_hoisted_1$5={class:"timeseries-viewer-toolbar"},_hoisted_2$4={id:"left-controls"},_hoisted_3$4={id:"center-controls"},_hoisted_4$3={id:"right-controls"};function _sfc_render$5(e,t,n,r,i,a){const o=vue.resolveComponent("IconTimescale"),u=ElTooltip,l=ElInputNumber,c=ElButton,p=ElButtonGroup,d=__unplugin_components_4,f=__unplugin_components_5,v=__unplugin_components_6,h=__unplugin_components_7,m=ElOption,y=ElSelect,g=__unplugin_components_10;return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$5,[vue.createElementVNode("div",_hoisted_2$4,[vue.createVNode(u,{placement:"top-end",content:"Toggle Time Zoom Controls"},{default:vue.withCtx(()=>[vue.createElementVNode("button",{class:"btn-icon",onClick:t[0]||(t[0]=b=>a.toggleTimeZoom())},[vue.createVNode(o,{height:20,width:20})])]),_:1}),e.showTimeZoom?(vue.openBlock(),vue.createBlock(l,{key:0,modelValue:a.durationInSeconds,"onUpdate:modelValue":t[1]||(t[1]=b=>a.durationInSeconds=b),precision:1,step:5,max:this.constants.MAXDURATION,size:"small","controls-position":"right"},null,8,["modelValue","max"])):vue.createCommentVNode("",!0),vue.createVNode(u,{placement:"top-end",content:"Toggle Vertical Zoom Controls"},{default:vue.withCtx(()=>[vue.createElementVNode("button",{class:"btn-icon",onClick:t[2]||(t[2]=b=>a.toggleVerticalZoom())})]),_:1}),e.showVertZoom?(vue.openBlock(),vue.createBlock(p,{key:1},{default:vue.withCtx(()=>[vue.createVNode(c,{icon:"el-icon-plus",size:"small",onClick:a.incrementZoom},null,8,["onClick"]),vue.createVNode(c,{icon:"el-icon-minus",size:"small",onClick:a.decrementZoom},null,8,["onClick"])]),_:1})):vue.createCommentVNode("",!0)]),vue.createElementVNode("div",_hoisted_3$4,[vue.createVNode(u,{placement:"top-end",content:"Page Back"},{default:vue.withCtx(()=>[vue.createElementVNode("button",{class:"btn-icon",onClick:t[3]||(t[3]=b=>a.pageBack())},[vue.createVNode(d,{height:12,width:12})])]),_:1}),vue.createVNode(u,{placement:"top-end",content:"Previous Annotation"},{default:vue.withCtx(()=>[vue.createElementVNode("button",{class:"btn-icon",onClick:t[4]||(t[4]=b=>a.previousAnnotation())},[vue.createVNode(f,{height:12,width:18})])]),_:1}),vue.createVNode(u,{placement:"top-end",content:"Automatic Forward"},{default:vue.withCtx(()=>[vue.createElementVNode("button",{class:"btn-icon",onClick:t[5]||(t[5]=b=>a.togglePlayback())},[(vue.openBlock(),vue.createBlock(vue.resolveDynamicComponent(a.iconPlay),{height:12,width:18}))])]),_:1}),vue.createVNode(u,{placement:"top-end",content:"Next Annotation"},{default:vue.withCtx(()=>[vue.createElementVNode("button",{class:"btn-icon",onClick:t[6]||(t[6]=b=>a.nextAnnotation())},[vue.createVNode(v,{name:"next-annotation-right-facing",height:12,width:18})])]),_:1}),vue.createVNode(u,{placement:"top-end",content:"Next Page"},{default:vue.withCtx(()=>[vue.createElementVNode("button",{class:"btn-icon",onClick:t[7]||(t[7]=b=>a.pageForward())},[vue.createVNode(h,{name:"icon-next-page",height:12,width:18})])]),_:1})]),vue.createElementVNode("div",_hoisted_4$3,[vue.createVNode(u,{placement:"top-end",content:"Montaging Controls"},{default:vue.withCtx(()=>[vue.createVNode(y,{modelValue:e.selectedMontage,"onUpdate:modelValue":t[8]||(t[8]=b=>e.selectedMontage=b),placeholder:"Select",size:"small",onChange:a.updateMontageScheme},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.montageOptions,b=>(vue.openBlock(),vue.createBlock(m,{key:b.value,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),vue.createVNode(u,{placement:"top-end",content:"Toggle Play Back Speed Controls"},{default:vue.withCtx(()=>[vue.createElementVNode("button",{class:"btn-icon",onClick:t[9]||(t[9]=b=>a.togglePlaybackSpeed())},[vue.createVNode(g,{height:20,width:22})])]),_:1}),e.showPlaybackSpeed?(vue.openBlock(),vue.createBlock(y,{key:0,modelValue:e.selectedPlaySpeed,"onUpdate:modelValue":t[10]||(t[10]=b=>e.selectedPlaySpeed=b),placeholder:"Select",size:"small",class:"playSelect"},{default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(e.playSpeedOptions,b=>(vue.openBlock(),vue.createBlock(m,{key:b.value,label:b.label,value:b.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):vue.createCommentVNode("",!0)])])}const __unplugin_components_2=_export_sfc(_sfc_main$5,[["render",_sfc_render$5],["__scopeId","data-v-fff740e2"]]),ViewerActiveTool={mixins:[viewerStoreMixin],computed:{viewerActiveTool(){return this.viewerStore.viewerActiveTool}},watch:{viewerActiveTool:{handler:function(e){e&&this.setActiveTool(e)},immediate:!0}},methods:{setActiveTool:function(e){if(e){const t="set"+e.charAt(0).toUpperCase()+e.slice(1);typeof this[t]=="function"&&this[t]()}}}},Logger={methods:{logger:function(e,t="log",n=!1){if(n)return;const r=Array.isArray(e)?e:[e];!(location.href.indexOf("app.pennsieve.")>=0)&&typeof console[t]=="function"&&console[t].apply(console,r)}}},LogoutHandler={methods:{handleLogout:function(e){if(this.$route.name==="docs-login")return;const t=defaultTo(!1,prop("shouldShowToast",e)),n=defaultTo(!1,prop("shouldRedirect",e));this.viewerStore.clearState();let r={};n&&(r={redirectTo:this.$route.fullPath}),this.$router.replace({name:"home",query:r}),t&&EventBus.$emit("toast",{detail:{msg:"Logged Out"}})}}},_isString=e=>Object.prototype.toString.call(e)==="[object String]",_trimValues=e=>{Object.keys(e).forEach(t=>{_isString(e[t])&&(e[t]=e[t].trim())})},Request={mixins:[LogoutHandler,Logger],data(){return{method:"GET",body:null,isLoading:!0,sessionRefreshTime:290}},methods:{sendXhr:function(e,t){if(!e)return Promise.reject({status:400,message:"Url is missing!"});this.isLoading=!0,this.method=propOr("GET","method",t);const n=propOr({},"header",t),r=Object.assign({},{"Content-type":"application/json"},n),i=prop("body",t);let a={headers:r,method:this.method};return i&&(typeof i=="object"&&_trimValues(i),this.body=JSON.stringify(i),a=Object.assign({},a,{body:this.body})),fetch(e,a).then(o=>o.status>=400?Promise.reject(o):o.json().then(this.finishLoading.bind(this)).catch(()=>{this.finishLoading(o.body)}))},finishLoading:function(e){return this.$nextTick(()=>{this.isLoading=!1}),e},handleXhrError:function(e){this.isLoading=!1;const t=prop("status",e);if(t===400&&e.body)e.body.getReader().read().then(({done:n,value:r})=>{const i=r instanceof Uint8Array?String.fromCharCode.apply(null,r):r,a=compose(defaultTo(i),tryCatch(compose(prop("message"),JSON.parse),(o,u)=>u))(i);EventBus.$emit("ajaxError",{detail:{type:"error",msg:a}})});else if(t===401)console.log(e);else if(t===403){if(console.log(e),this.$router)return this.$router.replace({name:"datasets-list"})}else console.log(e),EventBus.$emit("ajaxError",e)}}},_sfc_main$4={name:"TimeseriesAnnotationCanvas",mixins:[Request,ViewerActiveTool,viewerStoreMixin],props:{cWidth:{type:Number,default:0},cHeight:Number,start:Number,duration:Number,tsEnd:Number,rsPeriod:Number,pixelRatio:Number,constants:Object,pointerMode:String,annotationsCanvas:null},data:function(){return{defaultColors:["#18BA62","#FFBC27","#E94B4B","#0D4EFF","#FF4FFF","#50FFFF","#FFFF4E","#512BAF","#8A6ECF","#389BAD","#187D46","#B12800","#0C2475","#FF5321","#FF99CC","#DCC180","#FF6C21","#000000","#9B9B9B","#00FF00","#FA8072","#808000","#A0522D","#2760FF"],annLayerInfo:[],hoverOffsets:[],cachedAnnRange:[],a11yList:["#FFFF4E"],focusedAnn:null,renderAnn:null,mouseDownPosition:null}},computed:{activeViewer(){return this.viewerStore.activeViewer},viewerChannels(){return this.viewerStore.viewerChannels},viewerActiveTool(){return this.viewerStore.viewerActiveTool},viewerAnnotations(){return this.viewerStore.viewerAnnotations},viewerMontageScheme(){return this.viewerStore.viewerMontageScheme},pHeight:function(){return this.cHeight-20},canvasStyle:function(){return{width:this.cWidth+"px",height:this.pHeight+"px"}}},mounted:function(){useToken().then(e=>{const t=`https://api.pennsieve.net/timeseries/${this.activeViewer.content.id}/layers?api_key=${e}`;return useSendXhr(t).then(n=>{this._getLayerResponse(n).then(()=>{this.checkAnnotationRange(this.start,this.start+this.duration)})})}).catch(useHandleXhrError)},methods:{_cpCanvasScaler:function(e,t,n){return t*(e+n)},_getLayerResponse(e){const t=[];if(e.results.length===0){const n={name:"Default",color:"#18BA62",description:"Default Annotation Layer"};this.createAnnotationLayer(n)}else{for(let n=0;n<e.results.length;n++){let r=e.results[n].color;r||(r=this.defaultColors[n%this.defaultColors.length]);const i={id:e.results[n].id,name:e.results[n].name,description:e.results[n].description,visible:!0,selected:!1,annotations:[],color:this.hexToRgbA(r,.7),hexColor:r,bkColor:this.hexToRgbA(r,.15),selColor:this.hexToRgbA(r,.9)};t.push(i)}t&&(t[0].selected=!0),this.viewerStore.setAnnotations(t).then(()=>{this.$emit("annLayersInitialized")})}return this.annLayerInfo=e.results,Promise.resolve()},hexToRgbA:function(e,t){let n;if(/^#([A-Fa-f0-9]{3}){1,2}$/.test(e))return n=e.substring(1).split(""),n.length===3&&(n=[n[0],n[0],n[1],n[1],n[2],n[2]]),n="0x"+n.join(""),"rgba("+[n>>16&255,n>>8&255,n&255].join(",")+","+t+")";throw new Error("Bad Hex")},sortAnns:function(e){e.sort(function(n,r){return n.start<r.start?-1:n.start>r.start?1:0})},_computeRenderOptions:function(e){const n=this.constants.ANNOTATIONLABELHEIGHT/2|0,r=this.constants.XOFFSET,i=[];for(let a=0;a<e.length;a++){const o=e[a];let u=o.start,l=o.duration;o.duration<0&&(u=o.start+o.duration,l=-o.duration);const c=r+(u-this.start)/this.rsPeriod;if(o.cStart=c|0,o.duration!==0){const p=r+(u+l-this.start)/this.rsPeriod;o.cEnd=p|0}else o.cEnd=o.cStart+this.cWidth/40|0;if(o.allChannels)o.allOffsets=[n],o.cY=n;else{o.allOffsets=[],o.minOffset=this.cHeight|0,o.maxOffset=0;const p=this.viewerChannels;for(let d in o.channelIds)if(o.channelIds.hasOwnProperty(d)){let f=null;for(let v in p)if(p.hasOwnProperty(v)){const h=p[v];if(h.id===o.channelIds[d]&&h.visible){f=h.rowBaseline|0,f<o.minOffset&&(o.minOffset=f),f>o.maxOffset&&(o.maxOffset=f),o.allOffsets.push(f);break}}}this.hoverOffsets.indexOf(o.minOffset)<0&&this.hoverOffsets.push(o.minOffset),o.cY=o.minOffset}}for(let a=i.length-1;a>=0;a--)e.splice(i[a],1)},getChannelId:function(e){const t=this.viewerMontageScheme!=="NOT_MONTAGED";let n=propOr("","id",e),r=[];return t&&(r=n.split("_"),n=r.length?head(r):n),n},findNextAnnotation:function(e){let t=this.viewerStore.getViewerActiveLayer();const n=this.annIndexOf(t.annotations,e,!1);return n<t.annotations.length?t.annotations[n+1]:t.annotations[n]},findPreviousAnnotation:function(e){let t=this.viewerStore.getViewerActiveLayer();const n=this.annIndexOf(t.annotations,e,!0);return n>0?t.annotations[n-1]:t.annotations[n]},checkAnnotationRange:function(e,t){const n=[];n.push({start:e,end:this.tsEnd});let r=0;for(let o=0;o<this.cachedAnnRange.length;o++){const u=this.cachedAnnRange[o];if(e>=u.start&&t<=u.end)return;if(n[0].start>t)break;if(u.start<=n[0].start&&u.end>=e)r=o+1,n[0].start=u.end;else if(u.start>n[0].start){r=o;break}}const i=this.viewerAnnotations.reduce((o,u)=>u.annotations.length);if(n[0].start>=n[0].end&&i>0)return;const a=0;for(let o=r;o<this.cachedAnnRange.length;o++)if(this.cachedAnnRange[o].start>=n[a].start)if(n[a].end=this.cachedAnnRange[o].start,this.cachedAnnRange[o].end<t)n.push({start:this.cachedAnnRange[o].end,end:this.summary.span.end});else break;if(!(n[0].start>=n[0].end&&i>0)&&n.length>0){for(let o=0;o<this.viewerChannels.length;o++){const u=this.viewerChannels[o];this.getChannelId(u)}for(let o in n)if(n.hasOwnProperty(o)){const u=n[o];for(let l=0;l<this.viewerAnnotations.length;l++){const c=this.viewerAnnotations[l],p=Math.floor(u.end),d={id:this.activeViewer.content.id,start:Math.floor(u.start),end:p,layerId:c.id,limit:this.constants.LIMITANNFETCH};useToken().then(f=>{const h=`https://api.pennsieve.net/timeseries/${this.activeViewer.content.id}/layers/${c.id}/annotations?api_key=${f}`,m=Object.keys(d).map(g=>`&${g}=${d[g]}`).join(""),y=`${h}${m}`;return fetch(y,{method:"GET",headers:{"Content-type":"application/json"}}).then(g=>{const{status:b}=g;if(b>=400)throw new Error(b);return g.json()}).then(this._getAnnResponse.bind(this))}).catch(f=>{this.handleXhrError(f)})}this.cachedAnnRange.push({start:Math.floor(u.start),end:Math.floor(u.end)})}this.cachedAnnRange.sort(function(u,l){return u.start<l.start?-1:u.start>l.start?1:0})}},_getAnnResponse(e){const t=propOr({},"linkedPackages",e);let n=pathOr([],["annotations","results"],e);if(n.length>=this.constants.LIMITANNFETCH){let i=0;for(let a=0;a<n.length;a++)n[a].start>i&&(i=n[a].start);for(let a=0;a<this.cachedAnnRange.length;a++)if(this.cachedAnnRange[a].end>i&&this.cachedAnnRange[a].start<i){this.cachedAnnRange[a].end=i;break}}const r=this.viewerMontageScheme!=="NOT_MONTAGED";if(n.length>0){const i=[];for(let a=0;a<n.length;a++){const o=n[a],u={name:"",id:o.id,label:o.label,description:o.description,start:o.start,duration:o.end-o.start,end:o.end,cStart:null,cEnd:null,selected:!1,channelIds:o.channelIds,allChannels:!1,layer_id:o.layerId,userId:o.userId};if(o.linkedPackage){const c=o.linkedPackage;u.linkedPackage=pathOr("",["content","id"],t[c]),u.linkedPackageDTO=t[c]}(!r&&u.channelIds.length===this.viewerChannels.length||r&&u.channelIds.length>this.viewerChannels.length)&&(u.allChannels=!0);let l=null;for(let c=0;c<this.viewerAnnotations.length;c++)if(this.viewerAnnotations[c].id===o.layerId){l=c;break}if(l===null){const c={id:this.viewerAnnotations.length,color:null,visible:!0,selected:!1,annotations:[],userId:o.userId};this.viewerStore.createLayer(c),l=this.viewerAnnotations.length-1}i.push(u)}this.viewerAnnotations.forEach(a=>{const o=a.annotations,u=i.filter(l=>a.id===l.layer_id);a.annotations=o.concat(u),this.viewerStore.updateLayer({layer:a,index})})}this.$emit("annotationsReceived")},annIndexOf:function(e,t,n,r,i){r||(r=0);let a;return i?a=this._indexOfEnd(e,t,r,e.length-1,n):a=this._indexOfStart(e,t,r,e.length-1,n),a===-1?a=0:a<0&&(a=-a-2),a},_indexOfStart:function(e,t,n,r,i){if(r<n){let o;if(r>=0?o=r:o=-r-2,o===-1)return o;const u=e[o].start;for(;o>=0&&e[o].start===u;)o--;return o++,-o-2}const a=parseInt((n+r)/2);if(e[a].start>t)return this._indexOfStart(e,t,n,a-1,i);if(e[a].start<t)return this._indexOfStart(e,t,a+1,r,i);{let o=a;if(i){for(;o>=0&&e[o].start===t;)o--;o++}else{for(;o<e.length&&e[o].start===t;)o++;o--}return o}},_indexOfEnd:function(e,t,n,r,i){if(r<n){let o;if(r>=0?o=r:o=-r-2,o===-1)return o;const u=e[o].start+e[o].duration;for(;o>=0&&e[o].start+e[o].duration===u;)o--;return o++,-o-2}const a=parseInt((n+r)/2);if(e[a].start+e[a].duration>t)return this._indexOfEnd(e,t,n,a-1,i);if(e[a].start+e[a].duration<t)return this._indexOfEnd(e,t,a+1,r,i);{let o=a;if(i){for(;o>=0&&e[o].start+e[o].duration===t;)o--;o++}else{for(;o<e.length&&e[o].start+e[o].duration===t;)o++;o--}return o}},getLayer:function(e){const t=propOr(0,"layer_id",e);return defaultTo({},find(propEq("id",t),this.viewerAnnotations))},createAnnotationLayer:function(e){useToken().then(t=>{const n=`https://api.pennsieve.net/timeseries/${this.activeViewer.content.id}/layers?api_key=${t}`;return useSendXhr(n,{method:"POST",body:{name:e.name,color:e.color,description:e.name}}).then(r=>{let i=r;i.annotations=[];const a=i.color;return i.hexColor=a,i.color=this.hexToRgbA(a,.7),i.bkColor=this.hexToRgbA(a,.15),i.selColor=this.hexToRgbA(a,.9),i.visible=!0,this.viewerStore.createLayer(i).then(()=>this.viewerStore.setActiveAnnotationLayer(i.id).then(()=>{EventBus.$emit("toast",{detail:{msg:`'${i.name}' Layer Created`}})}))})}).catch(useHandleXhrError).finally(()=>this.$emit("closeAnnotationLayerWindow"))},resetFocusedAnnotation:function(){prop("oldStart",this.focusedAnn)&&(this.focusedAnn.start=this.focusedAnn.oldStart,this.focusedAnn.duration=this.focusedAnn.oldDuration,this.focusedAnn.end=this.focusedAnn.start+this.focusedAnn.duration)},render:function(){if(this.annotationsCanvas===void 0)return;const e=this.annotationsCanvas.getContext("2d"),t=this.$refs.annLabelArea.getContext("2d");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),t.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),this.hoverOffsets=[this.constants.ANNOTATIONLABELHEIGHT/2],e.clearRect(0,0,this.cWidth,this.cHeight),t.clearRect(0,0,this.cWidth,this.cHeight),this.renderAnn=[];for(let n in this.viewerAnnotations)if(this.viewerAnnotations.hasOwnProperty(n)){const r=this.viewerAnnotations[n];if(r.visible&&r.annotations&&r.annotations.length>0){const i=this.annIndexOf(r.annotations,this.start+this.duration,!1,0,!1),a=[];for(let u=0;u<=i;u++)a.push(r.annotations[u]);a.sort(function(l,c){return l.start+l.duration<c.start+c.duration?-1:l.start+l.duration>c.start+c.duration?1:0});const o=this.annIndexOf(a,this.start,!0,0,!0);for(let u=o;u<=a.length-1;u++){const l=a[u];this.renderAnn.push(l)}}}this.sortAnns(this.renderAnn),this._computeRenderOptions(this.renderAnn),this._renderAnnotationAreas(e,this.renderAnn),this._renderAnnotationLabels(t,this.renderAnn,!0),this.focusedAnn!==null&&this._renderAnnotationLabels(t,[this.focusedAnn],!1)},_renderAnnotationAreas:function(e,t){const n=this.constants.ANNOTATIONLABELHEIGHT,r=n/2|0;e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),e.save(),e.lineWidth=1,e.setLineDash([8,5]),e.strokeStyle="rgba(0,0,0, 0.6)",e.fillStyle="rgba(0,0,0,0.05)";for(const i in t)if(t.hasOwnProperty(i)){const a=t[i],o=this.getLayer(a);a.selected&&(e.save(),e.strokeStyle=o.selColor,e.fillStyle=o.bkColor,e.lineWidth=1);let u=Math.round(a.cStart)+.5,l=Math.round(a.cEnd)+.5;a.allChannels?a.duration===0?(e.beginPath(),e.moveTo(u+1,n),e.lineTo(u,this.pHeight),e.stroke()):(e.fillRect(u,n,l-u,this.pHeight-n),e.beginPath(),e.moveTo(u,n),e.lineTo(u,this.pHeight),e.moveTo(l,n),e.lineTo(l,this.pHeight),e.stroke()):a&&a.channelIds&&a.channelIds.length===1?a.duration===0&&(e.beginPath(),e.moveTo(u,a.minOffset+r),e.lineTo(u,a.minOffset+r+8),e.stroke()):a.duration===0?(e.beginPath(),e.moveTo(u,a.minOffset+r),e.lineTo(u,a.maxOffset-r),e.stroke()):(e.fillRect(u-1,a.minOffset+r,l-u+1,a.maxOffset-a.minOffset-n),e.beginPath(),e.moveTo(u,a.minOffset+r),e.lineTo(u,a.maxOffset-r),e.moveTo(l,a.minOffset+r),e.lineTo(l,a.maxOffset-r),e.stroke()),a.selected&&e.restore()}e.restore()},_renderAnnotationLabels:function(e,t,n){const r=this.constants.ANNOTATIONLABELHEIGHT,i=r/2|0;e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),e.save(),e.lineWidth=2,e.font="14px sans-serif",e.textAlign="left";for(let a=0;a<t.length;a++){const o=t[a],u=this.getLayer(o);if(o===this.focusedAnn&&n)continue;o.selected?(e.fillStyle=u.selColor||"rgba(51,204,102, 0.8)",e.strokeStyle="white"):(e.fillStyle=u.color||"rgba(51,204,102,0.8)",o===this.focusedAnn?e.strokeStyle="white":e.strokeStyle="rgba(255,255,255,0.8)");let l=Math.round(o.cStart)+1,c=Math.round(o.cEnd),p=0;for(let v=0;v<o.allOffsets.length;v++)e.fillRect(l-1,o.allOffsets[v]-i,c-l+2,r),o.allOffsets[v]===o.minOffset&&(p=v);const d=o.allOffsets[p];["annSelect","annResize-left","annResize-right"].includes(this.pointerMode)&&this.viewerActiveTool=="annotate"&&(e.beginPath(),o.duration!==0&&(e.moveTo(c-3,d-i+3),e.lineTo(c-3,d+i-3)),e.moveTo(l+3,d-i+3),e.lineTo(l+3,d+i-3),e.stroke()),c-l>o.label.length*8+10&&(e.fillStyle=this.a11yList.indexOf(u.hexColor)>=0?"black":"white",o.linkedPackage?e.fillText(o.label,l+30,d+i-i/2):e.fillText(o.label,l+10,d+i-6));const f=o.linkedPackageDTO;if(f&&c-l>=30){const v=pathOr({},["objects","view",1,"content"],f),h=propOr("","fileType",v),m=new Image;if(h==="PNG"){const{id:y,packageId:g}=v,b="https://api.pennsieve.net";useToken().then(_=>{m.src=`${b}/packages/${g}/files/${y}/presign/?api_key=${_}`,m.complete||m.addEventListener("load",()=>this.render(),{once:!0}),e.drawImage(m,l,d-i,27,r)}).catch(console.log)}else m.src=this._computeIcon(f),e.drawImage(m,l+5,d-i,20,20)}}e.restore()},onMouseDown:function(e,t){if(this.focusedAnn)switch(this.pointerMode){case"annResize-left":case"annResize-right":this.focusedAnn.oldStart=this.focusedAnn.start,this.focusedAnn.oldDuration=this.focusedAnn.duration,this.mouseDownPosition=[e,t];break}},onMouseMove:function(e,t,n,r){let i=n;if(r){const a=(e-this.mouseDownPosition[0])*this.rsPeriod;switch(this.pointerMode){case"annResize-left":this.focusedAnn.oldDuration>0?(this.focusedAnn.start=this.focusedAnn.oldStart+a,this.focusedAnn.duration=this.focusedAnn.oldDuration-a,this.focusedAnn.end=this.focusedAnn.start+this.focusedAnn.duration):this.focusedAnn.start=this.focusedAnn.oldStart+a;break;case"annResize-right":this.focusedAnn.duration=this.focusedAnn.oldDuration+a,this.focusedAnn.end=this.focusedAnn.start+this.focusedAnn.duration;break}}else{const a=this.shouldCheckAnnotationHover(t);if(i=this.viewerActiveTool,a){const u=this.constants.ANNOTATIONLABELHEIGHT/2;let l=null;for(let c=0;c<this.renderAnn.length;c++)if(this.renderAnn[c].cStart<e&&this.renderAnn[c].cEnd>e)t>this.renderAnn[c].cY-u&&t<this.renderAnn[c].cY+u&&(l=c);else if(this.renderAnn[c].cStart>e)break;if(l!==null)switch((this.focusedAnn===null||this.focusedAnn&&(e<this.focusedAnn.cStart||e>this.focusedAnn.cEnd))&&(this.focusedAnn=this.renderAnn[l]),this.viewerActiveTool){case"annotate":e<=this.focusedAnn.cStart+10?i="annResize-left":e>=this.focusedAnn.cEnd-10&&this.focusedAnn.duration>0?i="annResize-right":i="annSelect";break;case"pointer":i="annSelect";break}else this.focusedAnn=null}else this.focusedAnn=null,i=this.viewerActiveTool}return i},onMouseUp:function(){if(this.focusedAnn)switch(this.pointerMode){case"annResize-left":case"annResize-right":if(this.focusedAnn.duration<0){const e=-this.focusedAnn.duration,t=this.focusedAnn.start-e;this.focusedAnn.start=t,this.focusedAnn.duration=e,this.focusedAnn.end=t+e}this.viewerStore.setActiveAnnotation(this.focusedAnn).then(()=>{this.$emit("updateAnnotation",this.focusedAnn)});break}},shouldCheckAnnotationHover:function(e){const n=this.constants.ANNOTATIONLABELHEIGHT/2;let r=!1;for(let i=0;i<this.hoverOffsets.length;i++)if(e>=this.hoverOffsets[i]-n&&e<=this.hoverOffsets[i]+n){r=!0;break}return r},selectFocusedAnn:async function(){await this.viewerStore.setActiveAnnotation(this.focusedAnn),this.$nextTick(()=>{this.render()})}}},_hoisted_1$4=["width","height"];function _sfc_render$4(e,t,n,r,i,a){return vue.openBlock(),vue.createElementBlock("canvas",{ref:"annLabelArea",class:"timeseries-annotation-canvas",width:a._cpCanvasScaler(n.cWidth,n.pixelRatio,0),height:a._cpCanvasScaler(a.pHeight,n.pixelRatio,0),style:vue.normalizeStyle(a.canvasStyle)},null,12,_hoisted_1$4)}const __unplugin_components_1$1=_export_sfc(_sfc_main$4,[["render",_sfc_render$4],["__scopeId","data-v-03bf4998"]]);var src={exports:{}},indexLight={exports:{}},indexMinimal={},minimal={},aspromise,hasRequiredAspromise;function requireAspromise(){if(hasRequiredAspromise)return aspromise;hasRequiredAspromise=1,aspromise=e;function e(t,n){for(var r=new Array(arguments.length-1),i=0,a=2,o=!0;a<arguments.length;)r[i++]=arguments[a++];return new Promise(function(l,c){r[i]=function(d){if(o)if(o=!1,d)c(d);else{for(var f=new Array(arguments.length-1),v=0;v<f.length;)f[v++]=arguments[v];l.apply(null,f)}};try{t.apply(n||null,r)}catch(p){o&&(o=!1,c(p))}})}return aspromise}var base64={},hasRequiredBase64;function requireBase64(){return hasRequiredBase64||(hasRequiredBase64=1,function(e){var t=e;t.length=function(u){var l=u.length;if(!l)return 0;for(var c=0;--l%4>1&&u.charAt(l)==="=";)++c;return Math.ceil(u.length*3)/4-c};for(var n=new Array(64),r=new Array(123),i=0;i<64;)r[n[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;t.encode=function(u,l,c){for(var p=null,d=[],f=0,v=0,h;l<c;){var m=u[l++];switch(v){case 0:d[f++]=n[m>>2],h=(m&3)<<4,v=1;break;case 1:d[f++]=n[h|m>>4],h=(m&15)<<2,v=2;break;case 2:d[f++]=n[h|m>>6],d[f++]=n[m&63],v=0;break}f>8191&&((p||(p=[])).push(String.fromCharCode.apply(String,d)),f=0)}return v&&(d[f++]=n[h],d[f++]=61,v===1&&(d[f++]=61)),p?(f&&p.push(String.fromCharCode.apply(String,d.slice(0,f))),p.join("")):String.fromCharCode.apply(String,d.slice(0,f))};var a="invalid encoding";t.decode=function(u,l,c){for(var p=c,d=0,f,v=0;v<u.length;){var h=u.charCodeAt(v++);if(h===61&&d>1)break;if((h=r[h])===void 0)throw Error(a);switch(d){case 0:f=h,d=1;break;case 1:l[c++]=f<<2|(h&48)>>4,f=h,d=2;break;case 2:l[c++]=(f&15)<<4|(h&60)>>2,f=h,d=3;break;case 3:l[c++]=(f&3)<<6|h,d=0;break}}if(d===1)throw Error(a);return c-p},t.test=function(u){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(u)}}(base64)),base64}var eventemitter,hasRequiredEventemitter;function requireEventemitter(){if(hasRequiredEventemitter)return eventemitter;hasRequiredEventemitter=1,eventemitter=e;function e(){this._listeners={}}return e.prototype.on=function(n,r,i){return(this._listeners[n]||(this._listeners[n]=[])).push({fn:r,ctx:i||this}),this},e.prototype.off=function(n,r){if(n===void 0)this._listeners={};else if(r===void 0)this._listeners[n]=[];else for(var i=this._listeners[n],a=0;a<i.length;)i[a].fn===r?i.splice(a,1):++a;return this},e.prototype.emit=function(n){var r=this._listeners[n];if(r){for(var i=[],a=1;a<arguments.length;)i.push(arguments[a++]);for(a=0;a<r.length;)r[a].fn.apply(r[a++].ctx,i)}return this},eventemitter}var float,hasRequiredFloat;function requireFloat(){if(hasRequiredFloat)return float;hasRequiredFloat=1,float=e(e);function e(a){return typeof Float32Array<"u"?function(){var o=new Float32Array([-0]),u=new Uint8Array(o.buffer),l=u[3]===128;function c(v,h,m){o[0]=v,h[m]=u[0],h[m+1]=u[1],h[m+2]=u[2],h[m+3]=u[3]}function p(v,h,m){o[0]=v,h[m]=u[3],h[m+1]=u[2],h[m+2]=u[1],h[m+3]=u[0]}a.writeFloatLE=l?c:p,a.writeFloatBE=l?p:c;function d(v,h){return u[0]=v[h],u[1]=v[h+1],u[2]=v[h+2],u[3]=v[h+3],o[0]}function f(v,h){return u[3]=v[h],u[2]=v[h+1],u[1]=v[h+2],u[0]=v[h+3],o[0]}a.readFloatLE=l?d:f,a.readFloatBE=l?f:d}():function(){function o(l,c,p,d){var f=c<0?1:0;if(f&&(c=-c),c===0)l(1/c>0?0:2147483648,p,d);else if(isNaN(c))l(2143289344,p,d);else if(c>34028234663852886e22)l((f<<31|2139095040)>>>0,p,d);else if(c<11754943508222875e-54)l((f<<31|Math.round(c/1401298464324817e-60))>>>0,p,d);else{var v=Math.floor(Math.log(c)/Math.LN2),h=Math.round(c*Math.pow(2,-v)*8388608)&8388607;l((f<<31|v+127<<23|h)>>>0,p,d)}}a.writeFloatLE=o.bind(null,t),a.writeFloatBE=o.bind(null,n);function u(l,c,p){var d=l(c,p),f=(d>>31)*2+1,v=d>>>23&255,h=d&8388607;return v===255?h?NaN:f*(1/0):v===0?f*1401298464324817e-60*h:f*Math.pow(2,v-150)*(h+8388608)}a.readFloatLE=u.bind(null,r),a.readFloatBE=u.bind(null,i)}(),typeof Float64Array<"u"?function(){var o=new Float64Array([-0]),u=new Uint8Array(o.buffer),l=u[7]===128;function c(v,h,m){o[0]=v,h[m]=u[0],h[m+1]=u[1],h[m+2]=u[2],h[m+3]=u[3],h[m+4]=u[4],h[m+5]=u[5],h[m+6]=u[6],h[m+7]=u[7]}function p(v,h,m){o[0]=v,h[m]=u[7],h[m+1]=u[6],h[m+2]=u[5],h[m+3]=u[4],h[m+4]=u[3],h[m+5]=u[2],h[m+6]=u[1],h[m+7]=u[0]}a.writeDoubleLE=l?c:p,a.writeDoubleBE=l?p:c;function d(v,h){return u[0]=v[h],u[1]=v[h+1],u[2]=v[h+2],u[3]=v[h+3],u[4]=v[h+4],u[5]=v[h+5],u[6]=v[h+6],u[7]=v[h+7],o[0]}function f(v,h){return u[7]=v[h],u[6]=v[h+1],u[5]=v[h+2],u[4]=v[h+3],u[3]=v[h+4],u[2]=v[h+5],u[1]=v[h+6],u[0]=v[h+7],o[0]}a.readDoubleLE=l?d:f,a.readDoubleBE=l?f:d}():function(){function o(l,c,p,d,f,v){var h=d<0?1:0;if(h&&(d=-d),d===0)l(0,f,v+c),l(1/d>0?0:2147483648,f,v+p);else if(isNaN(d))l(0,f,v+c),l(2146959360,f,v+p);else if(d>17976931348623157e292)l(0,f,v+c),l((h<<31|2146435072)>>>0,f,v+p);else{var m;if(d<22250738585072014e-324)m=d/5e-324,l(m>>>0,f,v+c),l((h<<31|m/4294967296)>>>0,f,v+p);else{var y=Math.floor(Math.log(d)/Math.LN2);y===1024&&(y=1023),m=d*Math.pow(2,-y),l(m*4503599627370496>>>0,f,v+c),l((h<<31|y+1023<<20|m*1048576&1048575)>>>0,f,v+p)}}}a.writeDoubleLE=o.bind(null,t,0,4),a.writeDoubleBE=o.bind(null,n,4,0);function u(l,c,p,d,f){var v=l(d,f+c),h=l(d,f+p),m=(h>>31)*2+1,y=h>>>20&2047,g=4294967296*(h&1048575)+v;return y===2047?g?NaN:m*(1/0):y===0?m*5e-324*g:m*Math.pow(2,y-1075)*(g+4503599627370496)}a.readDoubleLE=u.bind(null,r,0,4),a.readDoubleBE=u.bind(null,i,4,0)}(),a}function t(a,o,u){o[u]=a&255,o[u+1]=a>>>8&255,o[u+2]=a>>>16&255,o[u+3]=a>>>24}function n(a,o,u){o[u]=a>>>24,o[u+1]=a>>>16&255,o[u+2]=a>>>8&255,o[u+3]=a&255}function r(a,o){return(a[o]|a[o+1]<<8|a[o+2]<<16|a[o+3]<<24)>>>0}function i(a,o){return(a[o]<<24|a[o+1]<<16|a[o+2]<<8|a[o+3])>>>0}return float}var inquire_1,hasRequiredInquire;function requireInquire(){if(hasRequiredInquire)return inquire_1;hasRequiredInquire=1,inquire_1=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}return inquire_1}var utf8={},hasRequiredUtf8;function requireUtf8(){return hasRequiredUtf8||(hasRequiredUtf8=1,function(e){var t=e;t.length=function(r){for(var i=0,a=0,o=0;o<r.length;++o)a=r.charCodeAt(o),a<128?i+=1:a<2048?i+=2:(a&64512)===55296&&(r.charCodeAt(o+1)&64512)===56320?(++o,i+=4):i+=3;return i},t.read=function(r,i,a){var o=a-i;if(o<1)return"";for(var u=null,l=[],c=0,p;i<a;)p=r[i++],p<128?l[c++]=p:p>191&&p<224?l[c++]=(p&31)<<6|r[i++]&63:p>239&&p<365?(p=((p&7)<<18|(r[i++]&63)<<12|(r[i++]&63)<<6|r[i++]&63)-65536,l[c++]=55296+(p>>10),l[c++]=56320+(p&1023)):l[c++]=(p&15)<<12|(r[i++]&63)<<6|r[i++]&63,c>8191&&((u||(u=[])).push(String.fromCharCode.apply(String,l)),c=0);return u?(c&&u.push(String.fromCharCode.apply(String,l.slice(0,c))),u.join("")):String.fromCharCode.apply(String,l.slice(0,c))},t.write=function(r,i,a){for(var o=a,u,l,c=0;c<r.length;++c)u=r.charCodeAt(c),u<128?i[a++]=u:u<2048?(i[a++]=u>>6|192,i[a++]=u&63|128):(u&64512)===55296&&((l=r.charCodeAt(c+1))&64512)===56320?(u=65536+((u&1023)<<10)+(l&1023),++c,i[a++]=u>>18|240,i[a++]=u>>12&63|128,i[a++]=u>>6&63|128,i[a++]=u&63|128):(i[a++]=u>>12|224,i[a++]=u>>6&63|128,i[a++]=u&63|128);return a-o}}(utf8)),utf8}var pool_1,hasRequiredPool;function requirePool(){if(hasRequiredPool)return pool_1;hasRequiredPool=1,pool_1=e;function e(t,n,r){var i=r||8192,a=i>>>1,o=null,u=i;return function(c){if(c<1||c>a)return t(c);u+c>i&&(o=t(i),u=0);var p=n.call(o,u,u+=c);return u&7&&(u=(u|7)+1),p}}return pool_1}var longbits,hasRequiredLongbits;function requireLongbits(){if(hasRequiredLongbits)return longbits;hasRequiredLongbits=1,longbits=t;var e=requireMinimal();function t(a,o){this.lo=a>>>0,this.hi=o>>>0}var n=t.zero=new t(0,0);n.toNumber=function(){return 0},n.zzEncode=n.zzDecode=function(){return this},n.length=function(){return 1};var r=t.zeroHash="\0\0\0\0\0\0\0\0";t.fromNumber=function(o){if(o===0)return n;var u=o<0;u&&(o=-o);var l=o>>>0,c=(o-l)/4294967296>>>0;return u&&(c=~c>>>0,l=~l>>>0,++l>4294967295&&(l=0,++c>4294967295&&(c=0))),new t(l,c)},t.from=function(o){if(typeof o=="number")return t.fromNumber(o);if(e.isString(o))if(e.Long)o=e.Long.fromString(o);else return t.fromNumber(parseInt(o,10));return o.low||o.high?new t(o.low>>>0,o.high>>>0):n},t.prototype.toNumber=function(o){if(!o&&this.hi>>>31){var u=~this.lo+1>>>0,l=~this.hi>>>0;return u||(l=l+1>>>0),-(u+l*4294967296)}return this.lo+this.hi*4294967296},t.prototype.toLong=function(o){return e.Long?new e.Long(this.lo|0,this.hi|0,!!o):{low:this.lo|0,high:this.hi|0,unsigned:!!o}};var i=String.prototype.charCodeAt;return t.fromHash=function(o){return o===r?n:new t((i.call(o,0)|i.call(o,1)<<8|i.call(o,2)<<16|i.call(o,3)<<24)>>>0,(i.call(o,4)|i.call(o,5)<<8|i.call(o,6)<<16|i.call(o,7)<<24)>>>0)},t.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},t.prototype.zzEncode=function(){var o=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^o)>>>0,this.lo=(this.lo<<1^o)>>>0,this},t.prototype.zzDecode=function(){var o=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^o)>>>0,this.hi=(this.hi>>>1^o)>>>0,this},t.prototype.length=function(){var o=this.lo,u=(this.lo>>>28|this.hi<<4)>>>0,l=this.hi>>>24;return l===0?u===0?o<16384?o<128?1:2:o<2097152?3:4:u<16384?u<128?5:6:u<2097152?7:8:l<128?9:10},longbits}var hasRequiredMinimal;function requireMinimal(){return hasRequiredMinimal||(hasRequiredMinimal=1,function(e){var t=e;t.asPromise=requireAspromise(),t.base64=requireBase64(),t.EventEmitter=requireEventemitter(),t.float=requireFloat(),t.inquire=requireInquire(),t.utf8=requireUtf8(),t.pool=requirePool(),t.LongBits=requireLongbits(),t.isNode=!!(typeof commonjsGlobal<"u"&&commonjsGlobal&&commonjsGlobal.process&&commonjsGlobal.process.versions&&commonjsGlobal.process.versions.node),t.global=t.isNode&&commonjsGlobal||typeof window<"u"&&window||typeof self<"u"&&self||minimal,t.emptyArray=Object.freeze?Object.freeze([]):[],t.emptyObject=Object.freeze?Object.freeze({}):{},t.isInteger=Number.isInteger||function(a){return typeof a=="number"&&isFinite(a)&&Math.floor(a)===a},t.isString=function(a){return typeof a=="string"||a instanceof String},t.isObject=function(a){return a&&typeof a=="object"},t.isset=t.isSet=function(a,o){var u=a[o];return u!=null&&a.hasOwnProperty(o)?typeof u!="object"||(Array.isArray(u)?u.length:Object.keys(u).length)>0:!1},t.Buffer=function(){try{var i=t.inquire("buffer").Buffer;return i.prototype.utf8Write?i:null}catch{return null}}(),t._Buffer_from=null,t._Buffer_allocUnsafe=null,t.newBuffer=function(a){return typeof a=="number"?t.Buffer?t._Buffer_allocUnsafe(a):new t.Array(a):t.Buffer?t._Buffer_from(a):typeof Uint8Array>"u"?a:new Uint8Array(a)},t.Array=typeof Uint8Array<"u"?Uint8Array:Array,t.Long=t.global.dcodeIO&&t.global.dcodeIO.Long||t.global.Long||t.inquire("long"),t.key2Re=/^true|false|0|1$/,t.key32Re=/^-?(?:0|[1-9][0-9]*)$/,t.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,t.longToHash=function(a){return a?t.LongBits.from(a).toHash():t.LongBits.zeroHash},t.longFromHash=function(a,o){var u=t.LongBits.fromHash(a);return t.Long?t.Long.fromBits(u.lo,u.hi,o):u.toNumber(!!o)};function n(i,a,o){for(var u=Object.keys(a),l=0;l<u.length;++l)(i[u[l]]===void 0||!o)&&(i[u[l]]=a[u[l]]);return i}t.merge=n,t.lcFirst=function(a){return a.charAt(0).toLowerCase()+a.substring(1)};function r(i){function a(o,u){if(!(this instanceof a))return new a(o,u);Object.defineProperty(this,"message",{get:function(){return o}}),Error.captureStackTrace?Error.captureStackTrace(this,a):Object.defineProperty(this,"stack",{value:new Error().stack||""}),u&&n(this,u)}return a.prototype=Object.create(Error.prototype,{constructor:{value:a,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return i},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),a}t.newError=r,t.ProtocolError=r("ProtocolError"),t.oneOfGetter=function(a){for(var o={},u=0;u<a.length;++u)o[a[u]]=1;return function(){for(var l=Object.keys(this),c=l.length-1;c>-1;--c)if(o[l[c]]===1&&this[l[c]]!==void 0&&this[l[c]]!==null)return l[c]}},t.oneOfSetter=function(a){return function(o){for(var u=0;u<a.length;++u)a[u]!==o&&delete this[a[u]]}},t.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},t._configure=function(){var i=t.Buffer;if(!i){t._Buffer_from=t._Buffer_allocUnsafe=null;return}t._Buffer_from=i.from!==Uint8Array.from&&i.from||function(o,u){return new i(o,u)},t._Buffer_allocUnsafe=i.allocUnsafe||function(o){return new i(o)}}}(minimal)),minimal}var writer,hasRequiredWriter;function requireWriter(){if(hasRequiredWriter)return writer;hasRequiredWriter=1,writer=l;var e=requireMinimal(),t,n=e.LongBits,r=e.base64,i=e.utf8;function a(y,g,b){this.fn=y,this.len=g,this.next=void 0,this.val=b}function o(){}function u(y){this.head=y.head,this.tail=y.tail,this.len=y.len,this.next=y.states}function l(){this.len=0,this.head=new a(o,0,0),this.tail=this.head,this.states=null}var c=function(){return e.Buffer?function(){return(l.create=function(){return new t})()}:function(){return new l}};l.create=c(),l.alloc=function(g){return new e.Array(g)},e.Array!==Array&&(l.alloc=e.pool(l.alloc,e.Array.prototype.subarray)),l.prototype._push=function(g,b,_){return this.tail=this.tail.next=new a(g,b,_),this.len+=b,this};function p(y,g,b){g[b]=y&255}function d(y,g,b){for(;y>127;)g[b++]=y&127|128,y>>>=7;g[b]=y}function f(y,g){this.len=y,this.next=void 0,this.val=g}f.prototype=Object.create(a.prototype),f.prototype.fn=d,l.prototype.uint32=function(g){return this.len+=(this.tail=this.tail.next=new f((g=g>>>0)<128?1:g<16384?2:g<2097152?3:g<268435456?4:5,g)).len,this},l.prototype.int32=function(g){return g<0?this._push(v,10,n.fromNumber(g)):this.uint32(g)},l.prototype.sint32=function(g){return this.uint32((g<<1^g>>31)>>>0)};function v(y,g,b){for(;y.hi;)g[b++]=y.lo&127|128,y.lo=(y.lo>>>7|y.hi<<25)>>>0,y.hi>>>=7;for(;y.lo>127;)g[b++]=y.lo&127|128,y.lo=y.lo>>>7;g[b++]=y.lo}l.prototype.uint64=function(g){var b=n.from(g);return this._push(v,b.length(),b)},l.prototype.int64=l.prototype.uint64,l.prototype.sint64=function(g){var b=n.from(g).zzEncode();return this._push(v,b.length(),b)},l.prototype.bool=function(g){return this._push(p,1,g?1:0)};function h(y,g,b){g[b]=y&255,g[b+1]=y>>>8&255,g[b+2]=y>>>16&255,g[b+3]=y>>>24}l.prototype.fixed32=function(g){return this._push(h,4,g>>>0)},l.prototype.sfixed32=l.prototype.fixed32,l.prototype.fixed64=function(g){var b=n.from(g);return this._push(h,4,b.lo)._push(h,4,b.hi)},l.prototype.sfixed64=l.prototype.fixed64,l.prototype.float=function(g){return this._push(e.float.writeFloatLE,4,g)},l.prototype.double=function(g){return this._push(e.float.writeDoubleLE,8,g)};var m=e.Array.prototype.set?function(g,b,_){b.set(g,_)}:function(g,b,_){for(var S=0;S<g.length;++S)b[_+S]=g[S]};return l.prototype.bytes=function(g){var b=g.length>>>0;if(!b)return this._push(p,1,0);if(e.isString(g)){var _=l.alloc(b=r.length(g));r.decode(g,_,0),g=_}return this.uint32(b)._push(m,b,g)},l.prototype.string=function(g){var b=i.length(g);return b?this.uint32(b)._push(i.write,b,g):this._push(p,1,0)},l.prototype.fork=function(){return this.states=new u(this),this.head=this.tail=new a(o,0,0),this.len=0,this},l.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new a(o,0,0),this.len=0),this},l.prototype.ldelim=function(){var g=this.head,b=this.tail,_=this.len;return this.reset().uint32(_),_&&(this.tail.next=g.next,this.tail=b,this.len+=_),this},l.prototype.finish=function(){for(var g=this.head.next,b=this.constructor.alloc(this.len),_=0;g;)g.fn(g.val,b,_),_+=g.len,g=g.next;return b},l._configure=function(y){t=y,l.create=c(),t._configure()},writer}var writer_buffer,hasRequiredWriter_buffer;function requireWriter_buffer(){if(hasRequiredWriter_buffer)return writer_buffer;hasRequiredWriter_buffer=1,writer_buffer=n;var e=requireWriter();(n.prototype=Object.create(e.prototype)).constructor=n;var t=requireMinimal();function n(){e.call(this)}n._configure=function(){n.alloc=t._Buffer_allocUnsafe,n.writeBytesBuffer=t.Buffer&&t.Buffer.prototype instanceof Uint8Array&&t.Buffer.prototype.set.name==="set"?function(a,o,u){o.set(a,u)}:function(a,o,u){if(a.copy)a.copy(o,u,0,a.length);else for(var l=0;l<a.length;)o[u++]=a[l++]}},n.prototype.bytes=function(a){t.isString(a)&&(a=t._Buffer_from(a,"base64"));var o=a.length>>>0;return this.uint32(o),o&&this._push(n.writeBytesBuffer,o,a),this};function r(i,a,o){i.length<40?t.utf8.write(i,a,o):a.utf8Write?a.utf8Write(i,o):a.write(i,o)}return n.prototype.string=function(a){var o=t.Buffer.byteLength(a);return this.uint32(o),o&&this._push(r,o,a),this},n._configure(),writer_buffer}var reader,hasRequiredReader;function requireReader(){if(hasRequiredReader)return reader;hasRequiredReader=1,reader=a;var e=requireMinimal(),t,n=e.LongBits,r=e.utf8;function i(d,f){return RangeError("index out of range: "+d.pos+" + "+(f||1)+" > "+d.len)}function a(d){this.buf=d,this.pos=0,this.len=d.length}var o=typeof Uint8Array<"u"?function(f){if(f instanceof Uint8Array||Array.isArray(f))return new a(f);throw Error("illegal buffer")}:function(f){if(Array.isArray(f))return new a(f);throw Error("illegal buffer")},u=function(){return e.Buffer?function(v){return(a.create=function(m){return e.Buffer.isBuffer(m)?new t(m):o(m)})(v)}:o};a.create=u(),a.prototype._slice=e.Array.prototype.subarray||e.Array.prototype.slice,a.prototype.uint32=function(){var f=4294967295;return function(){if(f=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(f=(f|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(f=(f|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(f=(f|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(f=(f|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return f;if((this.pos+=5)>this.len)throw this.pos=this.len,i(this,10);return f}}(),a.prototype.int32=function(){return this.uint32()|0},a.prototype.sint32=function(){var f=this.uint32();return f>>>1^-(f&1)|0};function l(){var d=new n(0,0),f=0;if(this.len-this.pos>4){for(;f<4;++f)if(d.lo=(d.lo|(this.buf[this.pos]&127)<<f*7)>>>0,this.buf[this.pos++]<128)return d;if(d.lo=(d.lo|(this.buf[this.pos]&127)<<28)>>>0,d.hi=(d.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return d;f=0}else{for(;f<3;++f){if(this.pos>=this.len)throw i(this);if(d.lo=(d.lo|(this.buf[this.pos]&127)<<f*7)>>>0,this.buf[this.pos++]<128)return d}return d.lo=(d.lo|(this.buf[this.pos++]&127)<<f*7)>>>0,d}if(this.len-this.pos>4){for(;f<5;++f)if(d.hi=(d.hi|(this.buf[this.pos]&127)<<f*7+3)>>>0,this.buf[this.pos++]<128)return d}else for(;f<5;++f){if(this.pos>=this.len)throw i(this);if(d.hi=(d.hi|(this.buf[this.pos]&127)<<f*7+3)>>>0,this.buf[this.pos++]<128)return d}throw Error("invalid varint encoding")}a.prototype.bool=function(){return this.uint32()!==0};function c(d,f){return(d[f-4]|d[f-3]<<8|d[f-2]<<16|d[f-1]<<24)>>>0}a.prototype.fixed32=function(){if(this.pos+4>this.len)throw i(this,4);return c(this.buf,this.pos+=4)},a.prototype.sfixed32=function(){if(this.pos+4>this.len)throw i(this,4);return c(this.buf,this.pos+=4)|0};function p(){if(this.pos+8>this.len)throw i(this,8);return new n(c(this.buf,this.pos+=4),c(this.buf,this.pos+=4))}return a.prototype.float=function(){if(this.pos+4>this.len)throw i(this,4);var f=e.float.readFloatLE(this.buf,this.pos);return this.pos+=4,f},a.prototype.double=function(){if(this.pos+8>this.len)throw i(this,4);var f=e.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,f},a.prototype.bytes=function(){var f=this.uint32(),v=this.pos,h=this.pos+f;if(h>this.len)throw i(this,f);if(this.pos+=f,Array.isArray(this.buf))return this.buf.slice(v,h);if(v===h){var m=e.Buffer;return m?m.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,v,h)},a.prototype.string=function(){var f=this.bytes();return r.read(f,0,f.length)},a.prototype.skip=function(f){if(typeof f=="number"){if(this.pos+f>this.len)throw i(this,f);this.pos+=f}else do if(this.pos>=this.len)throw i(this);while(this.buf[this.pos++]&128);return this},a.prototype.skipType=function(d){switch(d){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(d=this.uint32()&7)!==4;)this.skipType(d);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+d+" at offset "+this.pos)}return this},a._configure=function(d){t=d,a.create=u(),t._configure();var f=e.Long?"toLong":"toNumber";e.merge(a.prototype,{int64:function(){return l.call(this)[f](!1)},uint64:function(){return l.call(this)[f](!0)},sint64:function(){return l.call(this).zzDecode()[f](!1)},fixed64:function(){return p.call(this)[f](!0)},sfixed64:function(){return p.call(this)[f](!1)}})},reader}var reader_buffer,hasRequiredReader_buffer;function requireReader_buffer(){if(hasRequiredReader_buffer)return reader_buffer;hasRequiredReader_buffer=1,reader_buffer=n;var e=requireReader();(n.prototype=Object.create(e.prototype)).constructor=n;var t=requireMinimal();function n(r){e.call(this,r)}return n._configure=function(){t.Buffer&&(n.prototype._slice=t.Buffer.prototype.slice)},n.prototype.string=function(){var i=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+i,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+i,this.len))},n._configure(),reader_buffer}var rpc={},service$1,hasRequiredService$1;function requireService$1(){if(hasRequiredService$1)return service$1;hasRequiredService$1=1,service$1=t;var e=requireMinimal();(t.prototype=Object.create(e.EventEmitter.prototype)).constructor=t;function t(n,r,i){if(typeof n!="function")throw TypeError("rpcImpl must be a function");e.EventEmitter.call(this),this.rpcImpl=n,this.requestDelimited=!!r,this.responseDelimited=!!i}return t.prototype.rpcCall=function n(r,i,a,o,u){if(!o)throw TypeError("request must be specified");var l=this;if(!u)return e.asPromise(n,l,r,i,a,o);if(!l.rpcImpl){setTimeout(function(){u(Error("already ended"))},0);return}try{return l.rpcImpl(r,i[l.requestDelimited?"encodeDelimited":"encode"](o).finish(),function(p,d){if(p)return l.emit("error",p,r),u(p);if(d===null){l.end(!0);return}if(!(d instanceof a))try{d=a[l.responseDelimited?"decodeDelimited":"decode"](d)}catch(f){return l.emit("error",f,r),u(f)}return l.emit("data",d,r),u(null,d)})}catch(c){l.emit("error",c,r),setTimeout(function(){u(c)},0);return}},t.prototype.end=function(r){return this.rpcImpl&&(r||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},service$1}var hasRequiredRpc;function requireRpc(){return hasRequiredRpc||(hasRequiredRpc=1,function(e){var t=e;t.Service=requireService$1()}(rpc)),rpc}var roots,hasRequiredRoots;function requireRoots(){return hasRequiredRoots||(hasRequiredRoots=1,roots={}),roots}var hasRequiredIndexMinimal;function requireIndexMinimal(){return hasRequiredIndexMinimal||(hasRequiredIndexMinimal=1,function(e){var t=e;t.build="minimal",t.Writer=requireWriter(),t.BufferWriter=requireWriter_buffer(),t.Reader=requireReader(),t.BufferReader=requireReader_buffer(),t.util=requireMinimal(),t.rpc=requireRpc(),t.roots=requireRoots(),t.configure=n;function n(){t.util._configure(),t.Writer._configure(t.BufferWriter),t.Reader._configure(t.BufferReader)}n()}(indexMinimal)),indexMinimal}var types={},util={exports:{}},codegen_1,hasRequiredCodegen;function requireCodegen(){if(hasRequiredCodegen)return codegen_1;hasRequiredCodegen=1,codegen_1=e;function e(t,n){typeof t=="string"&&(n=t,t=void 0);var r=[];function i(o){if(typeof o!="string"){var u=a();if(e.verbose&&console.log("codegen: "+u),u="return "+u,o){for(var l=Object.keys(o),c=new Array(l.length+1),p=new Array(l.length),d=0;d<l.length;)c[d]=l[d],p[d]=o[l[d++]];return c[d]=u,Function.apply(null,c).apply(null,p)}return Function(u)()}for(var f=new Array(arguments.length-1),v=0;v<f.length;)f[v]=arguments[++v];if(v=0,o=o.replace(/%([%dfijs])/g,function(m,y){var g=f[v++];switch(y){case"d":case"f":return String(Number(g));case"i":return String(Math.floor(g));case"j":return JSON.stringify(g);case"s":return String(g)}return"%"}),v!==f.length)throw Error("parameter count mismatch");return r.push(o),i}function a(o){return"function "+(o||n||"")+"("+(t&&t.join(",")||"")+`){
13
13
  `+r.join(`
14
14
  `)+`
15
15
  }`}return i.toString=a,i}return e.verbose=!1,codegen_1}var fetch_1,hasRequiredFetch;function requireFetch(){if(hasRequiredFetch)return fetch_1;hasRequiredFetch=1,fetch_1=r;var e=requireAspromise(),t=requireInquire(),n=t("fs");function r(i,a,o){return typeof a=="function"?(o=a,a={}):a||(a={}),o?!a.xhr&&n&&n.readFile?n.readFile(i,function(l,c){return l&&typeof XMLHttpRequest<"u"?r.xhr(i,a,o):l?o(l):o(null,a.binary?c:c.toString("utf8"))}):r.xhr(i,a,o):e(r,this,i,a)}return r.xhr=function(a,o,u){var l=new XMLHttpRequest;l.onreadystatechange=function(){if(l.readyState===4){if(l.status!==0&&l.status!==200)return u(Error("status "+l.status));if(o.binary){var p=l.response;if(!p){p=[];for(var d=0;d<l.responseText.length;++d)p.push(l.responseText.charCodeAt(d)&255)}return u(null,typeof Uint8Array<"u"?new Uint8Array(p):p)}return u(null,l.responseText)}},o.binary&&("overrideMimeType"in l&&l.overrideMimeType("text/plain; charset=x-user-defined"),l.responseType="arraybuffer"),l.open("GET",a),l.send()},fetch_1}var path={},hasRequiredPath;function requirePath(){return hasRequiredPath||(hasRequiredPath=1,function(e){var t=e,n=t.isAbsolute=function(a){return/^(?:\/|\w+:)/.test(a)},r=t.normalize=function(a){a=a.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var o=a.split("/"),u=n(a),l="";u&&(l=o.shift()+"/");for(var c=0;c<o.length;)o[c]===".."?c>0&&o[c-1]!==".."?o.splice(--c,2):u?o.splice(c,1):++c:o[c]==="."?o.splice(c,1):++c;return l+o.join("/")};t.resolve=function(a,o,u){return u||(o=r(o)),n(o)?o:(u||(a=r(a)),(a=a.replace(/(?:\/|^)[^/]+$/,"")).length?r(a+"/"+o):o)}}(path)),path}var namespace,hasRequiredNamespace;function requireNamespace(){if(hasRequiredNamespace)return namespace;hasRequiredNamespace=1,namespace=l;var e=requireObject();((l.prototype=Object.create(e.prototype)).constructor=l).className="Namespace";var t=requireField(),n=requireUtil(),r=requireOneof(),i,a,o;l.fromJSON=function(d,f){return new l(d,f.options).addJSON(f.nested)};function u(p,d){if(p&&p.length){for(var f={},v=0;v<p.length;++v)f[p[v].name]=p[v].toJSON(d);return f}}l.arrayToJSON=u,l.isReservedId=function(d,f){if(d){for(var v=0;v<d.length;++v)if(typeof d[v]!="string"&&d[v][0]<=f&&d[v][1]>f)return!0}return!1},l.isReservedName=function(d,f){if(d){for(var v=0;v<d.length;++v)if(d[v]===f)return!0}return!1};function l(p,d){e.call(this,p,d),this.nested=void 0,this._nestedArray=null,this._lookupCache={},this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0}function c(p){p._nestedArray=null,p._lookupCache={};for(var d=p;d=d.parent;)d._lookupCache={};return p}return Object.defineProperty(l.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=n.toArray(this.nested))}}),l.prototype.toJSON=function(d){return n.toObject(["options",this.options,"nested",u(this.nestedArray,d)])},l.prototype.addJSON=function(d){var f=this;if(d)for(var v=Object.keys(d),h=0,m;h<v.length;++h)m=d[v[h]],f.add((m.fields!==void 0?i.fromJSON:m.values!==void 0?o.fromJSON:m.methods!==void 0?a.fromJSON:m.id!==void 0?t.fromJSON:l.fromJSON)(v[h],m));return this},l.prototype.get=function(d){return this.nested&&this.nested[d]||null},l.prototype.getEnum=function(d){if(this.nested&&this.nested[d]instanceof o)return this.nested[d].values;throw Error("no such enum: "+d)},l.prototype.add=function(d){if(!(d instanceof t&&d.extend!==void 0||d instanceof i||d instanceof r||d instanceof o||d instanceof a||d instanceof l))throw TypeError("object must be a valid nested object");if(!this.nested)this.nested={};else{var f=this.get(d.name);if(f)if(f instanceof l&&d instanceof l&&!(f instanceof i||f instanceof a)){for(var v=f.nestedArray,h=0;h<v.length;++h)d.add(v[h]);this.remove(f),this.nested||(this.nested={}),d.setOptions(f.options,!0)}else throw Error("duplicate name '"+d.name+"' in "+this)}this.nested[d.name]=d,this instanceof i||this instanceof a||this instanceof o||this instanceof t||d._edition||(d._edition=d._defaultEdition),this._needsRecursiveFeatureResolution=!0,this._needsRecursiveResolve=!0;for(var m=this;m=m.parent;)m._needsRecursiveFeatureResolution=!0,m._needsRecursiveResolve=!0;return d.onAdd(this),c(this)},l.prototype.remove=function(d){if(!(d instanceof e))throw TypeError("object must be a ReflectionObject");if(d.parent!==this)throw Error(d+" is not a member of "+this);return delete this.nested[d.name],Object.keys(this.nested).length||(this.nested=void 0),d.onRemove(this),c(this)},l.prototype.define=function(d,f){if(n.isString(d))d=d.split(".");else if(!Array.isArray(d))throw TypeError("illegal path");if(d&&d.length&&d[0]==="")throw Error("path must be relative");for(var v=this;d.length>0;){var h=d.shift();if(v.nested&&v.nested[h]){if(v=v.nested[h],!(v instanceof l))throw Error("path conflicts with non-namespace objects")}else v.add(v=new l(h))}return f&&v.addJSON(f),v},l.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;this._resolveFeaturesRecursive(this._edition);var d=this.nestedArray,f=0;for(this.resolve();f<d.length;)d[f]instanceof l?d[f++].resolveAll():d[f++].resolve();return this._needsRecursiveResolve=!1,this},l.prototype._resolveFeaturesRecursive=function(d){return this._needsRecursiveFeatureResolution?(this._needsRecursiveFeatureResolution=!1,d=this._edition||d,e.prototype._resolveFeaturesRecursive.call(this,d),this.nestedArray.forEach(f=>{f._resolveFeaturesRecursive(d)}),this):this},l.prototype.lookup=function(d,f,v){if(typeof f=="boolean"?(v=f,f=void 0):f&&!Array.isArray(f)&&(f=[f]),n.isString(d)&&d.length){if(d===".")return this.root;d=d.split(".")}else if(!d.length)return this;var h=d.join(".");if(d[0]==="")return this.root.lookup(d.slice(1),f);var m=this.root._fullyQualifiedObjects&&this.root._fullyQualifiedObjects["."+h];if(m&&(!f||f.indexOf(m.constructor)>-1)||(m=this._lookupImpl(d,h),m&&(!f||f.indexOf(m.constructor)>-1)))return m;if(v)return null;for(var y=this;y.parent;){if(m=y.parent._lookupImpl(d,h),m&&(!f||f.indexOf(m.constructor)>-1))return m;y=y.parent}return null},l.prototype._lookupImpl=function(d,f){if(Object.prototype.hasOwnProperty.call(this._lookupCache,f))return this._lookupCache[f];var v=this.get(d[0]),h=null;if(v)d.length===1?h=v:v instanceof l&&(d=d.slice(1),h=v._lookupImpl(d,d.join(".")));else for(var m=0;m<this.nestedArray.length;++m)this._nestedArray[m]instanceof l&&(v=this._nestedArray[m]._lookupImpl(d,f))&&(h=v);return this._lookupCache[f]=h,h},l.prototype.lookupType=function(d){var f=this.lookup(d,[i]);if(!f)throw Error("no such type: "+d);return f},l.prototype.lookupEnum=function(d){var f=this.lookup(d,[o]);if(!f)throw Error("no such Enum '"+d+"' in "+this);return f},l.prototype.lookupTypeOrEnum=function(d){var f=this.lookup(d,[i,o]);if(!f)throw Error("no such Type or Enum '"+d+"' in "+this);return f},l.prototype.lookupService=function(d){var f=this.lookup(d,[a]);if(!f)throw Error("no such Service '"+d+"' in "+this);return f},l._configure=function(p,d,f){i=p,a=d,o=f},namespace}var mapfield,hasRequiredMapfield;function requireMapfield(){if(hasRequiredMapfield)return mapfield;hasRequiredMapfield=1,mapfield=r;var e=requireField();((r.prototype=Object.create(e.prototype)).constructor=r).className="MapField";var t=requireTypes(),n=requireUtil();function r(i,a,o,u,l,c){if(e.call(this,i,a,u,void 0,void 0,l,c),!n.isString(o))throw TypeError("keyType must be a string");this.keyType=o,this.resolvedKeyType=null,this.map=!0}return r.fromJSON=function(a,o){return new r(a,o.id,o.keyType,o.type,o.options,o.comment)},r.prototype.toJSON=function(a){var o=a?!!a.keepComments:!1;return n.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",o?this.comment:void 0])},r.prototype.resolve=function(){if(this.resolved)return this;if(t.mapKey[this.keyType]===void 0)throw Error("invalid key type: "+this.keyType);return e.prototype.resolve.call(this)},r.d=function(a,o,u){return typeof u=="function"?u=n.decorateType(u).name:u&&typeof u=="object"&&(u=n.decorateEnum(u).name),function(c,p){n.decorateType(c.constructor).add(new r(p,a,o,u))}},mapfield}var method,hasRequiredMethod;function requireMethod(){if(hasRequiredMethod)return method;hasRequiredMethod=1,method=n;var e=requireObject();((n.prototype=Object.create(e.prototype)).constructor=n).className="Method";var t=requireUtil();function n(r,i,a,o,u,l,c,p,d){if(t.isObject(u)?(c=u,u=l=void 0):t.isObject(l)&&(c=l,l=void 0),!(i===void 0||t.isString(i)))throw TypeError("type must be a string");if(!t.isString(a))throw TypeError("requestType must be a string");if(!t.isString(o))throw TypeError("responseType must be a string");e.call(this,r,c),this.type=i||"rpc",this.requestType=a,this.requestStream=u?!0:void 0,this.responseType=o,this.responseStream=l?!0:void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=p,this.parsedOptions=d}return n.fromJSON=function(i,a){return new n(i,a.type,a.requestType,a.responseType,a.requestStream,a.responseStream,a.options,a.comment,a.parsedOptions)},n.prototype.toJSON=function(i){var a=i?!!i.keepComments:!1;return t.toObject(["type",this.type!=="rpc"&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",a?this.comment:void 0,"parsedOptions",this.parsedOptions])},n.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),e.prototype.resolve.call(this))},method}var service,hasRequiredService;function requireService(){if(hasRequiredService)return service;hasRequiredService=1,service=i;var e=requireNamespace();((i.prototype=Object.create(e.prototype)).constructor=i).className="Service";var t=requireMethod(),n=requireUtil(),r=requireRpc();function i(o,u){e.call(this,o,u),this.methods={},this._methodsArray=null}i.fromJSON=function(u,l){var c=new i(u,l.options);if(l.methods)for(var p=Object.keys(l.methods),d=0;d<p.length;++d)c.add(t.fromJSON(p[d],l.methods[p[d]]));return l.nested&&c.addJSON(l.nested),l.edition&&(c._edition=l.edition),c.comment=l.comment,c._defaultEdition="proto3",c},i.prototype.toJSON=function(u){var l=e.prototype.toJSON.call(this,u),c=u?!!u.keepComments:!1;return n.toObject(["edition",this._editionToJSON(),"options",l&&l.options||void 0,"methods",e.arrayToJSON(this.methodsArray,u)||{},"nested",l&&l.nested||void 0,"comment",c?this.comment:void 0])},Object.defineProperty(i.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=n.toArray(this.methods))}});function a(o){return o._methodsArray=null,o}return i.prototype.get=function(u){return this.methods[u]||e.prototype.get.call(this,u)},i.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;e.prototype.resolve.call(this);for(var u=this.methodsArray,l=0;l<u.length;++l)u[l].resolve();return this},i.prototype._resolveFeaturesRecursive=function(u){return this._needsRecursiveFeatureResolution?(u=this._edition||u,e.prototype._resolveFeaturesRecursive.call(this,u),this.methodsArray.forEach(l=>{l._resolveFeaturesRecursive(u)}),this):this},i.prototype.add=function(u){if(this.get(u.name))throw Error("duplicate name '"+u.name+"' in "+this);return u instanceof t?(this.methods[u.name]=u,u.parent=this,a(this)):e.prototype.add.call(this,u)},i.prototype.remove=function(u){if(u instanceof t){if(this.methods[u.name]!==u)throw Error(u+" is not a member of "+this);return delete this.methods[u.name],u.parent=null,a(this)}return e.prototype.remove.call(this,u)},i.prototype.create=function(u,l,c){for(var p=new r.Service(u,l,c),d=0,f;d<this.methodsArray.length;++d){var v=n.lcFirst((f=this._methodsArray[d]).resolve().name).replace(/[^$\w_]/g,"");p[v]=n.codegen(["r","c"],n.isReserved(v)?v+"_":v)("return this.rpcCall(m,q,s,r,c)")({m:f,q:f.resolvedRequestType.ctor,s:f.resolvedResponseType.ctor})}return p},service}var message,hasRequiredMessage;function requireMessage(){if(hasRequiredMessage)return message;hasRequiredMessage=1,message=t;var e=requireMinimal();function t(n){if(n)for(var r=Object.keys(n),i=0;i<r.length;++i)this[r[i]]=n[r[i]]}return t.create=function(r){return this.$type.create(r)},t.encode=function(r,i){return this.$type.encode(r,i)},t.encodeDelimited=function(r,i){return this.$type.encodeDelimited(r,i)},t.decode=function(r){return this.$type.decode(r)},t.decodeDelimited=function(r){return this.$type.decodeDelimited(r)},t.verify=function(r){return this.$type.verify(r)},t.fromObject=function(r){return this.$type.fromObject(r)},t.toObject=function(r,i){return this.$type.toObject(r,i)},t.prototype.toJSON=function(){return this.$type.toObject(this,e.toJSONOptions)},message}var decoder_1,hasRequiredDecoder;function requireDecoder(){if(hasRequiredDecoder)return decoder_1;hasRequiredDecoder=1,decoder_1=i;var e=require_enum(),t=requireTypes(),n=requireUtil();function r(a){return"missing required '"+a.name+"'"}function i(a){for(var o=n.codegen(["r","l","e"],a.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(a.fieldsArray.filter(function(f){return f.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()")("if(t===e)")("break")("switch(t>>>3){"),u=0;u<a.fieldsArray.length;++u){var l=a._fieldsArray[u].resolve(),c=l.resolvedType instanceof e?"int32":l.type,p="m"+n.safeProp(l.name);o("case %i: {",l.id),l.map?(o("if(%s===util.emptyObject)",p)("%s={}",p)("var c2 = r.uint32()+r.pos"),t.defaults[l.keyType]!==void 0?o("k=%j",t.defaults[l.keyType]):o("k=null"),t.defaults[c]!==void 0?o("value=%j",t.defaults[c]):o("value=null"),o("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",l.keyType)("case 2:"),t.basic[c]===void 0?o("value=types[%i].decode(r,r.uint32())",u):o("value=r.%s()",c),o("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),t.long[l.keyType]!==void 0?o('%s[typeof k==="object"?util.longToHash(k):k]=value',p):o("%s[k]=value",p)):l.repeated?(o("if(!(%s&&%s.length))",p,p)("%s=[]",p),t.packed[c]!==void 0&&o("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",p,c)("}else"),t.basic[c]===void 0?o(l.delimited?"%s.push(types[%i].decode(r,undefined,((t&~7)|4)))":"%s.push(types[%i].decode(r,r.uint32()))",p,u):o("%s.push(r.%s())",p,c)):t.basic[c]===void 0?o(l.delimited?"%s=types[%i].decode(r,undefined,((t&~7)|4))":"%s=types[%i].decode(r,r.uint32())",p,u):o("%s=r.%s()",p,c),o("break")("}")}for(o("default:")("r.skipType(t&7)")("break")("}")("}"),u=0;u<a._fieldsArray.length;++u){var d=a._fieldsArray[u];d.required&&o("if(!m.hasOwnProperty(%j))",d.name)("throw util.ProtocolError(%j,{instance:m})",r(d))}return o("return m")}return decoder_1}var verifier_1,hasRequiredVerifier;function requireVerifier(){if(hasRequiredVerifier)return verifier_1;hasRequiredVerifier=1,verifier_1=a;var e=require_enum(),t=requireUtil();function n(o,u){return o.name+": "+u+(o.repeated&&u!=="array"?"[]":o.map&&u!=="object"?"{k:"+o.keyType+"}":"")+" expected"}function r(o,u,l,c){if(u.resolvedType)if(u.resolvedType instanceof e){o("switch(%s){",c)("default:")("return%j",n(u,"enum value"));for(var p=Object.keys(u.resolvedType.values),d=0;d<p.length;++d)o("case %i:",u.resolvedType.values[p[d]]);o("break")("}")}else o("{")("var e=types[%i].verify(%s);",l,c)("if(e)")("return%j+e",u.name+".")("}");else switch(u.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":o("if(!util.isInteger(%s))",c)("return%j",n(u,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":o("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",c,c,c,c)("return%j",n(u,"integer|Long"));break;case"float":case"double":o('if(typeof %s!=="number")',c)("return%j",n(u,"number"));break;case"bool":o('if(typeof %s!=="boolean")',c)("return%j",n(u,"boolean"));break;case"string":o("if(!util.isString(%s))",c)("return%j",n(u,"string"));break;case"bytes":o('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',c,c,c)("return%j",n(u,"buffer"));break}return o}function i(o,u,l){switch(u.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":o("if(!util.key32Re.test(%s))",l)("return%j",n(u,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":o("if(!util.key64Re.test(%s))",l)("return%j",n(u,"integer|Long key"));break;case"bool":o("if(!util.key2Re.test(%s))",l)("return%j",n(u,"boolean key"));break}return o}function a(o){var u=t.codegen(["m"],o.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),l=o.oneofsArray,c={};l.length&&u("var p={}");for(var p=0;p<o.fieldsArray.length;++p){var d=o._fieldsArray[p].resolve(),f="m"+t.safeProp(d.name);if(d.optional&&u("if(%s!=null&&m.hasOwnProperty(%j)){",f,d.name),d.map)u("if(!util.isObject(%s))",f)("return%j",n(d,"object"))("var k=Object.keys(%s)",f)("for(var i=0;i<k.length;++i){"),i(u,d,"k[i]"),r(u,d,p,f+"[k[i]]")("}");else if(d.repeated)u("if(!Array.isArray(%s))",f)("return%j",n(d,"array"))("for(var i=0;i<%s.length;++i){",f),r(u,d,p,f+"[i]")("}");else{if(d.partOf){var v=t.safeProp(d.partOf.name);c[d.partOf.name]===1&&u("if(p%s===1)",v)("return%j",d.partOf.name+": multiple values"),c[d.partOf.name]=1,u("p%s=1",v)}r(u,d,p,f)}d.optional&&u("}")}return u("return null")}return verifier_1}var converter={},hasRequiredConverter;function requireConverter(){return hasRequiredConverter||(hasRequiredConverter=1,function(e){var t=e,n=require_enum(),r=requireUtil();function i(o,u,l,c){var p=!1;if(u.resolvedType)if(u.resolvedType instanceof n){o("switch(d%s){",c);for(var d=u.resolvedType.values,f=Object.keys(d),v=0;v<f.length;++v)d[f[v]]===u.typeDefault&&!p&&(o("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',c,c,c),u.repeated||o("break"),p=!0),o("case%j:",f[v])("case %i:",d[f[v]])("m%s=%j",c,d[f[v]])("break");o("}")}else o('if(typeof d%s!=="object")',c)("throw TypeError(%j)",u.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",c,l,c);else{var h=!1;switch(u.type){case"double":case"float":o("m%s=Number(d%s)",c,c);break;case"uint32":case"fixed32":o("m%s=d%s>>>0",c,c);break;case"int32":case"sint32":case"sfixed32":o("m%s=d%s|0",c,c);break;case"uint64":h=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":o("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",c,c,h)('else if(typeof d%s==="string")',c)("m%s=parseInt(d%s,10)",c,c)('else if(typeof d%s==="number")',c)("m%s=d%s",c,c)('else if(typeof d%s==="object")',c)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",c,c,c,h?"true":"");break;case"bytes":o('if(typeof d%s==="string")',c)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",c,c,c)("else if(d%s.length >= 0)",c)("m%s=d%s",c,c);break;case"string":o("m%s=String(d%s)",c,c);break;case"bool":o("m%s=Boolean(d%s)",c,c);break}}return o}t.fromObject=function(u){var l=u.fieldsArray,c=r.codegen(["d"],u.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!l.length)return c("return new this.ctor");c("var m=new this.ctor");for(var p=0;p<l.length;++p){var d=l[p].resolve(),f=r.safeProp(d.name);d.map?(c("if(d%s){",f)('if(typeof d%s!=="object")',f)("throw TypeError(%j)",d.fullName+": object expected")("m%s={}",f)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",f),i(c,d,p,f+"[ks[i]]")("}")("}")):d.repeated?(c("if(d%s){",f)("if(!Array.isArray(d%s))",f)("throw TypeError(%j)",d.fullName+": array expected")("m%s=[]",f)("for(var i=0;i<d%s.length;++i){",f),i(c,d,p,f+"[i]")("}")("}")):(d.resolvedType instanceof n||c("if(d%s!=null){",f),i(c,d,p,f),d.resolvedType instanceof n||c("}"))}return c("return m")};function a(o,u,l,c){if(u.resolvedType)u.resolvedType instanceof n?o("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",c,l,c,c,l,c,c):o("d%s=types[%i].toObject(m%s,o)",c,l,c);else{var p=!1;switch(u.type){case"double":case"float":o("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",c,c,c,c);break;case"uint64":p=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":o('if(typeof m%s==="number")',c)("d%s=o.longs===String?String(m%s):m%s",c,c,c)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",c,c,c,c,p?"true":"",c);break;case"bytes":o("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",c,c,c,c,c);break;default:o("d%s=m%s",c,c);break}}return o}t.toObject=function(u){var l=u.fieldsArray.slice().sort(r.compareFieldsById);if(!l.length)return r.codegen()("return {}");for(var c=r.codegen(["m","o"],u.name+"$toObject")("if(!o)")("o={}")("var d={}"),p=[],d=[],f=[],v=0;v<l.length;++v)l[v].partOf||(l[v].resolve().repeated?p:l[v].map?d:f).push(l[v]);if(p.length){for(c("if(o.arrays||o.defaults){"),v=0;v<p.length;++v)c("d%s=[]",r.safeProp(p[v].name));c("}")}if(d.length){for(c("if(o.objects||o.defaults){"),v=0;v<d.length;++v)c("d%s={}",r.safeProp(d[v].name));c("}")}if(f.length){for(c("if(o.defaults){"),v=0;v<f.length;++v){var h=f[v],m=r.safeProp(h.name);if(h.resolvedType instanceof n)c("d%s=o.enums===String?%j:%j",m,h.resolvedType.valuesById[h.typeDefault],h.typeDefault);else if(h.long)c("if(util.Long){")("var n=new util.Long(%i,%i,%j)",h.typeDefault.low,h.typeDefault.high,h.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",m)("}else")("d%s=o.longs===String?%j:%i",m,h.typeDefault.toString(),h.typeDefault.toNumber());else if(h.bytes){var y="["+Array.prototype.slice.call(h.typeDefault).join(",")+"]";c("if(o.bytes===String)d%s=%j",m,String.fromCharCode.apply(String,h.typeDefault))("else{")("d%s=%s",m,y)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",m,m)("}")}else c("d%s=%j",m,h.typeDefault)}c("}")}var g=!1;for(v=0;v<l.length;++v){var h=l[v],b=u._fieldsArray.indexOf(h),m=r.safeProp(h.name);h.map?(g||(g=!0,c("var ks2")),c("if(m%s&&(ks2=Object.keys(m%s)).length){",m,m)("d%s={}",m)("for(var j=0;j<ks2.length;++j){"),a(c,h,b,m+"[ks2[j]]")("}")):h.repeated?(c("if(m%s&&m%s.length){",m,m)("d%s=[]",m)("for(var j=0;j<m%s.length;++j){",m),a(c,h,b,m+"[j]")("}")):(c("if(m%s!=null&&m.hasOwnProperty(%j)){",m,h.name),a(c,h,b,m),h.partOf&&c("if(o.oneofs)")("d%s=%j",r.safeProp(h.partOf.name),h.name)),c("}")}return c("return d")}}(converter)),converter}var wrappers={},hasRequiredWrappers;function requireWrappers(){return hasRequiredWrappers||(hasRequiredWrappers=1,function(e){var t=e,n=requireMessage();t[".google.protobuf.Any"]={fromObject:function(r){if(r&&r["@type"]){var i=r["@type"].substring(r["@type"].lastIndexOf("/")+1),a=this.lookup(i);if(a){var o=r["@type"].charAt(0)==="."?r["@type"].slice(1):r["@type"];return o.indexOf("/")===-1&&(o="/"+o),this.create({type_url:o,value:a.encode(a.fromObject(r)).finish()})}}return this.fromObject(r)},toObject:function(r,i){var a="type.googleapis.com/",o="",u="";if(i&&i.json&&r.type_url&&r.value){u=r.type_url.substring(r.type_url.lastIndexOf("/")+1),o=r.type_url.substring(0,r.type_url.lastIndexOf("/")+1);var l=this.lookup(u);l&&(r=l.decode(r.value))}if(!(r instanceof this.ctor)&&r instanceof n){var c=r.$type.toObject(r,i),p=r.$type.fullName[0]==="."?r.$type.fullName.slice(1):r.$type.fullName;return o===""&&(o=a),u=o+p,c["@type"]=u,c}return this.toObject(r,i)}}}(wrappers)),wrappers}var type,hasRequiredType;function requireType(){if(hasRequiredType)return type;hasRequiredType=1,type=m;var e=requireNamespace();((m.prototype=Object.create(e.prototype)).constructor=m).className="Type";var t=require_enum(),n=requireOneof(),r=requireField(),i=requireMapfield(),a=requireService(),o=requireMessage(),u=requireReader(),l=requireWriter(),c=requireUtil(),p=requireEncoder(),d=requireDecoder(),f=requireVerifier(),v=requireConverter(),h=requireWrappers();function m(g,b){e.call(this,g,b),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}Object.defineProperties(m.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var g=Object.keys(this.fields),b=0;b<g.length;++b){var _=this.fields[g[b]],S=_.id;if(this._fieldsById[S])throw Error("duplicate id "+S+" in "+this);this._fieldsById[S]=_}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=c.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=c.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=m.generateConstructor(this)())},set:function(g){var b=g.prototype;b instanceof o||((g.prototype=new o).constructor=g,c.merge(g.prototype,b)),g.$type=g.prototype.$type=this,c.merge(g,o,!0),this._ctor=g;for(var _=0;_<this.fieldsArray.length;++_)this._fieldsArray[_].resolve();var S={};for(_=0;_<this.oneofsArray.length;++_)S[this._oneofsArray[_].resolve().name]={get:c.oneOfGetter(this._oneofsArray[_].oneof),set:c.oneOfSetter(this._oneofsArray[_].oneof)};_&&Object.defineProperties(g.prototype,S)}}}),m.generateConstructor=function(b){for(var _=c.codegen(["p"],b.name),S=0,T;S<b.fieldsArray.length;++S)(T=b._fieldsArray[S]).map?_("this%s={}",c.safeProp(T.name)):T.repeated&&_("this%s=[]",c.safeProp(T.name));return _("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")};function y(g){return g._fieldsById=g._fieldsArray=g._oneofsArray=null,delete g.encode,delete g.decode,delete g.verify,g}return m.fromJSON=function(b,_){var S=new m(b,_.options);S.extensions=_.extensions,S.reserved=_.reserved;for(var T=Object.keys(_.fields),w=0;w<T.length;++w)S.add((typeof _.fields[T[w]].keyType<"u"?i.fromJSON:r.fromJSON)(T[w],_.fields[T[w]]));if(_.oneofs)for(T=Object.keys(_.oneofs),w=0;w<T.length;++w)S.add(n.fromJSON(T[w],_.oneofs[T[w]]));if(_.nested)for(T=Object.keys(_.nested),w=0;w<T.length;++w){var x=_.nested[T[w]];S.add((x.id!==void 0?r.fromJSON:x.fields!==void 0?m.fromJSON:x.values!==void 0?t.fromJSON:x.methods!==void 0?a.fromJSON:e.fromJSON)(T[w],x))}return _.extensions&&_.extensions.length&&(S.extensions=_.extensions),_.reserved&&_.reserved.length&&(S.reserved=_.reserved),_.group&&(S.group=!0),_.comment&&(S.comment=_.comment),_.edition&&(S._edition=_.edition),S._defaultEdition="proto3",S},m.prototype.toJSON=function(b){var _=e.prototype.toJSON.call(this,b),S=b?!!b.keepComments:!1;return c.toObject(["edition",this._editionToJSON(),"options",_&&_.options||void 0,"oneofs",e.arrayToJSON(this.oneofsArray,b),"fields",e.arrayToJSON(this.fieldsArray.filter(function(T){return!T.declaringField}),b)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",_&&_.nested||void 0,"comment",S?this.comment:void 0])},m.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;e.prototype.resolveAll.call(this);var b=this.oneofsArray;for(S=0;S<b.length;)b[S++].resolve();for(var _=this.fieldsArray,S=0;S<_.length;)_[S++].resolve();return this},m.prototype._resolveFeaturesRecursive=function(b){return this._needsRecursiveFeatureResolution?(b=this._edition||b,e.prototype._resolveFeaturesRecursive.call(this,b),this.oneofsArray.forEach(_=>{_._resolveFeatures(b)}),this.fieldsArray.forEach(_=>{_._resolveFeatures(b)}),this):this},m.prototype.get=function(b){return this.fields[b]||this.oneofs&&this.oneofs[b]||this.nested&&this.nested[b]||null},m.prototype.add=function(b){if(this.get(b.name))throw Error("duplicate name '"+b.name+"' in "+this);if(b instanceof r&&b.extend===void 0){if(this._fieldsById?this._fieldsById[b.id]:this.fieldsById[b.id])throw Error("duplicate id "+b.id+" in "+this);if(this.isReservedId(b.id))throw Error("id "+b.id+" is reserved in "+this);if(this.isReservedName(b.name))throw Error("name '"+b.name+"' is reserved in "+this);return b.parent&&b.parent.remove(b),this.fields[b.name]=b,b.message=this,b.onAdd(this),y(this)}return b instanceof n?(this.oneofs||(this.oneofs={}),this.oneofs[b.name]=b,b.onAdd(this),y(this)):e.prototype.add.call(this,b)},m.prototype.remove=function(b){if(b instanceof r&&b.extend===void 0){if(!this.fields||this.fields[b.name]!==b)throw Error(b+" is not a member of "+this);return delete this.fields[b.name],b.parent=null,b.onRemove(this),y(this)}if(b instanceof n){if(!this.oneofs||this.oneofs[b.name]!==b)throw Error(b+" is not a member of "+this);return delete this.oneofs[b.name],b.parent=null,b.onRemove(this),y(this)}return e.prototype.remove.call(this,b)},m.prototype.isReservedId=function(b){return e.isReservedId(this.reserved,b)},m.prototype.isReservedName=function(b){return e.isReservedName(this.reserved,b)},m.prototype.create=function(b){return new this.ctor(b)},m.prototype.setup=function(){for(var b=this.fullName,_=[],S=0;S<this.fieldsArray.length;++S)_.push(this._fieldsArray[S].resolve().resolvedType);this.encode=p(this)({Writer:l,types:_,util:c}),this.decode=d(this)({Reader:u,types:_,util:c}),this.verify=f(this)({types:_,util:c}),this.fromObject=v.fromObject(this)({types:_,util:c}),this.toObject=v.toObject(this)({types:_,util:c});var T=h[b];if(T){var w=Object.create(this);w.fromObject=this.fromObject,this.fromObject=T.fromObject.bind(w),w.toObject=this.toObject,this.toObject=T.toObject.bind(w)}return this},m.prototype.encode=function(b,_){return this.setup().encode(b,_)},m.prototype.encodeDelimited=function(b,_){return this.encode(b,_&&_.len?_.fork():_).ldelim()},m.prototype.decode=function(b,_){return this.setup().decode(b,_)},m.prototype.decodeDelimited=function(b){return b instanceof u||(b=u.create(b)),this.decode(b,b.uint32())},m.prototype.verify=function(b){return this.setup().verify(b)},m.prototype.fromObject=function(b){return this.setup().fromObject(b)},m.prototype.toObject=function(b,_){return this.setup().toObject(b,_)},m.d=function(b){return function(S){c.decorateType(S,b)}},type}var root,hasRequiredRoot;function requireRoot(){if(hasRequiredRoot)return root;hasRequiredRoot=1,root=l;var e=requireNamespace();((l.prototype=Object.create(e.prototype)).constructor=l).className="Root";var t=requireField(),n=require_enum(),r=requireOneof(),i=requireUtil(),a,o,u;function l(f){e.call(this,"",f),this.deferred=[],this.files=[],this._edition="proto2",this._fullyQualifiedObjects={}}l.fromJSON=function(v,h){return h||(h=new l),v.options&&h.setOptions(v.options),h.addJSON(v.nested).resolveAll()},l.prototype.resolvePath=i.path.resolve,l.prototype.fetch=i.fetch;function c(){}l.prototype.load=function f(v,h,m){typeof h=="function"&&(m=h,h=void 0);var y=this;if(!m)return i.asPromise(f,y,v,h);var g=m===c;function b(M,z){if(m){if(g)throw M;z&&z.resolveAll();var A=m;m=null,A(M,z)}}function _(M){var z=M.lastIndexOf("google/protobuf/");if(z>-1){var A=M.substring(z);if(A in u)return A}return null}function S(M,z){try{if(i.isString(z)&&z.charAt(0)==="{"&&(z=JSON.parse(z)),!i.isString(z))y.setOptions(z.options).addJSON(z.nested);else{o.filename=M;var A=o(z,y,h),ue,he=0;if(A.imports)for(;he<A.imports.length;++he)(ue=_(A.imports[he])||y.resolvePath(M,A.imports[he]))&&T(ue);if(A.weakImports)for(he=0;he<A.weakImports.length;++he)(ue=_(A.weakImports[he])||y.resolvePath(M,A.weakImports[he]))&&T(ue,!0)}}catch(j){b(j)}!g&&!w&&b(null,y)}function T(M,z){if(M=_(M)||M,!(y.files.indexOf(M)>-1)){if(y.files.push(M),M in u){g?S(M,u[M]):(++w,setTimeout(function(){--w,S(M,u[M])}));return}if(g){var A;try{A=i.fs.readFileSync(M).toString("utf8")}catch(ue){z||b(ue);return}S(M,A)}else++w,y.fetch(M,function(ue,he){if(--w,!!m){if(ue){z?w||b(null,y):b(ue);return}S(M,he)}})}}var w=0;i.isString(v)&&(v=[v]);for(var x=0,L;x<v.length;++x)(L=y.resolvePath("",v[x]))&&T(L);return g?(y.resolveAll(),y):(w||b(null,y),y)},l.prototype.loadSync=function(v,h){if(!i.isNode)throw Error("not supported");return this.load(v,h,c)},l.prototype.resolveAll=function(){if(!this._needsRecursiveResolve)return this;if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(v){return"'extend "+v.extend+"' in "+v.parent.fullName}).join(", "));return e.prototype.resolveAll.call(this)};var p=/^[A-Z]/;function d(f,v){var h=v.parent.lookup(v.extend);if(h){var m=new t(v.fullName,v.id,v.type,v.rule,void 0,v.options);return h.get(m.name)||(m.declaringField=v,v.extensionField=m,h.add(m)),!0}return!1}return l.prototype._handleAdd=function(v){if(v instanceof t)v.extend!==void 0&&!v.extensionField&&(d(this,v)||this.deferred.push(v));else if(v instanceof n)p.test(v.name)&&(v.parent[v.name]=v.values);else if(!(v instanceof r)){if(v instanceof a)for(var h=0;h<this.deferred.length;)d(this,this.deferred[h])?this.deferred.splice(h,1):++h;for(var m=0;m<v.nestedArray.length;++m)this._handleAdd(v._nestedArray[m]);p.test(v.name)&&(v.parent[v.name]=v)}(v instanceof a||v instanceof n||v instanceof t)&&(this._fullyQualifiedObjects[v.fullName]=v)},l.prototype._handleRemove=function(v){if(v instanceof t){if(v.extend!==void 0)if(v.extensionField)v.extensionField.parent.remove(v.extensionField),v.extensionField=null;else{var h=this.deferred.indexOf(v);h>-1&&this.deferred.splice(h,1)}}else if(v instanceof n)p.test(v.name)&&delete v.parent[v.name];else if(v instanceof e){for(var m=0;m<v.nestedArray.length;++m)this._handleRemove(v._nestedArray[m]);p.test(v.name)&&delete v.parent[v.name]}delete this._fullyQualifiedObjects[v.fullName]},l._configure=function(f,v,h){a=f,o=v,u=h},root}var hasRequiredUtil;function requireUtil(){if(hasRequiredUtil)return util.exports;hasRequiredUtil=1;var e=util.exports=requireMinimal(),t=requireRoots(),n,r;e.codegen=requireCodegen(),e.fetch=requireFetch(),e.path=requirePath(),e.fs=e.inquire("fs"),e.toArray=function(c){if(c){for(var p=Object.keys(c),d=new Array(p.length),f=0;f<p.length;)d[f]=c[p[f++]];return d}return[]},e.toObject=function(c){for(var p={},d=0;d<c.length;){var f=c[d++],v=c[d++];v!==void 0&&(p[f]=v)}return p};var i=/\\/g,a=/"/g;e.isReserved=function(c){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(c)},e.safeProp=function(c){return!/^[$\w_]+$/.test(c)||e.isReserved(c)?'["'+c.replace(i,"\\\\").replace(a,'\\"')+'"]':"."+c},e.ucFirst=function(c){return c.charAt(0).toUpperCase()+c.substring(1)};var o=/_([a-z])/g;e.camelCase=function(c){return c.substring(0,1)+c.substring(1).replace(o,function(p,d){return d.toUpperCase()})},e.compareFieldsById=function(c,p){return c.id-p.id},e.decorateType=function(c,p){if(c.$type)return p&&c.$type.name!==p&&(e.decorateRoot.remove(c.$type),c.$type.name=p,e.decorateRoot.add(c.$type)),c.$type;n||(n=requireType());var d=new n(p||c.name);return e.decorateRoot.add(d),d.ctor=c,Object.defineProperty(c,"$type",{value:d,enumerable:!1}),Object.defineProperty(c.prototype,"$type",{value:d,enumerable:!1}),d};var u=0;return e.decorateEnum=function(c){if(c.$type)return c.$type;r||(r=require_enum());var p=new r("Enum"+u++,c);return e.decorateRoot.add(p),Object.defineProperty(c,"$type",{value:p,enumerable:!1}),p},e.setProperty=function(c,p,d,f){function v(h,m,y){var g=m.shift();if(g==="__proto__"||g==="prototype")return h;if(m.length>0)h[g]=v(h[g]||{},m,y);else{var b=h[g];if(b&&f)return h;b&&(y=[].concat(b).concat(y)),h[g]=y}return h}if(typeof c!="object")throw TypeError("dst must be an object");if(!p)throw TypeError("path must be specified");return p=p.split("."),v(c,p,d)},Object.defineProperty(e,"decorateRoot",{get:function(){return t.decorated||(t.decorated=new(requireRoot()))}}),util.exports}var hasRequiredTypes;function requireTypes(){return hasRequiredTypes||(hasRequiredTypes=1,function(e){var t=e,n=requireUtil(),r=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function i(a,o){var u=0,l={};for(o|=0;u<a.length;)l[r[u+o]]=a[u++];return l}t.basic=i([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),t.defaults=i([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",n.emptyArray,null]),t.long=i([0,0,0,1,1],7),t.mapKey=i([0,0,0,5,5,0,0,0,1,1,0,2],2),t.packed=i([1,5,0,0,0,5,5,0,0,0,1,1,0])}(types)),types}var field,hasRequiredField;function requireField(){if(hasRequiredField)return field;hasRequiredField=1,field=o;var e=requireObject();((o.prototype=Object.create(e.prototype)).constructor=o).className="Field";var t=require_enum(),n=requireTypes(),r=requireUtil(),i,a=/^required|optional|repeated$/;o.fromJSON=function(l,c){var p=new o(l,c.id,c.type,c.rule,c.extend,c.options,c.comment);return c.edition&&(p._edition=c.edition),p._defaultEdition="proto3",p};function o(u,l,c,p,d,f,v){if(r.isObject(p)?(v=d,f=p,p=d=void 0):r.isObject(d)&&(v=f,f=d,d=void 0),e.call(this,u,f),!r.isInteger(l)||l<0)throw TypeError("id must be a non-negative integer");if(!r.isString(c))throw TypeError("type must be a string");if(p!==void 0&&!a.test(p=p.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(d!==void 0&&!r.isString(d))throw TypeError("extend must be a string");p==="proto3_optional"&&(p="optional"),this.rule=p&&p!=="optional"?p:void 0,this.type=c,this.id=l,this.extend=d||void 0,this.repeated=p==="repeated",this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=r.Long?n.long[c]!==void 0:!1,this.bytes=c==="bytes",this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.comment=v}return Object.defineProperty(o.prototype,"required",{get:function(){return this._features.field_presence==="LEGACY_REQUIRED"}}),Object.defineProperty(o.prototype,"optional",{get:function(){return!this.required}}),Object.defineProperty(o.prototype,"delimited",{get:function(){return this.resolvedType instanceof i&&this._features.message_encoding==="DELIMITED"}}),Object.defineProperty(o.prototype,"packed",{get:function(){return this._features.repeated_field_encoding==="PACKED"}}),Object.defineProperty(o.prototype,"hasPresence",{get:function(){return this.repeated||this.map?!1:this.partOf||this.declaringField||this.extensionField||this._features.field_presence!=="IMPLICIT"}}),o.prototype.setOption=function(l,c,p){return e.prototype.setOption.call(this,l,c,p)},o.prototype.toJSON=function(l){var c=l?!!l.keepComments:!1;return r.toObject(["edition",this._editionToJSON(),"rule",this.rule!=="optional"&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",c?this.comment:void 0])},o.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=n.defaults[this.type])===void 0?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof i?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&this.options.default!=null&&(this.typeDefault=this.options.default,this.resolvedType instanceof t&&typeof this.typeDefault=="string"&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(this.options.packed!==void 0&&this.resolvedType&&!(this.resolvedType instanceof t)&&delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=r.Long.fromNumber(this.typeDefault,this.type.charAt(0)==="u"),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&typeof this.typeDefault=="string"){var l;r.base64.test(this.typeDefault)?r.base64.decode(this.typeDefault,l=r.newBuffer(r.base64.length(this.typeDefault)),0):r.utf8.write(this.typeDefault,l=r.newBuffer(r.utf8.length(this.typeDefault)),0),this.typeDefault=l}return this.map?this.defaultValue=r.emptyObject:this.repeated?this.defaultValue=r.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof i&&(this.parent.ctor.prototype[this.name]=this.defaultValue),e.prototype.resolve.call(this)},o.prototype._inferLegacyProtoFeatures=function(l){if(l!=="proto2"&&l!=="proto3")return{};var c={};if(this.rule==="required"&&(c.field_presence="LEGACY_REQUIRED"),this.parent&&n.defaults[this.type]===void 0){var p=this.parent.get(this.type.split(".").pop());p&&p instanceof i&&p.group&&(c.message_encoding="DELIMITED")}return this.getOption("packed")===!0?c.repeated_field_encoding="PACKED":this.getOption("packed")===!1&&(c.repeated_field_encoding="EXPANDED"),c},o.prototype._resolveFeatures=function(l){return e.prototype._resolveFeatures.call(this,this._edition||l)},o.d=function(l,c,p,d){return typeof c=="function"?c=r.decorateType(c).name:c&&typeof c=="object"&&(c=r.decorateEnum(c).name),function(v,h){r.decorateType(v.constructor).add(new o(h,l,c,p,{default:d}))}},o._configure=function(l){i=l},field}var oneof,hasRequiredOneof;function requireOneof(){if(hasRequiredOneof)return oneof;hasRequiredOneof=1,oneof=r;var e=requireObject();((r.prototype=Object.create(e.prototype)).constructor=r).className="OneOf";var t=requireField(),n=requireUtil();function r(a,o,u,l){if(Array.isArray(o)||(u=o,o=void 0),e.call(this,a,u),!(o===void 0||Array.isArray(o)))throw TypeError("fieldNames must be an Array");this.oneof=o||[],this.fieldsArray=[],this.comment=l}r.fromJSON=function(o,u){return new r(o,u.oneof,u.options,u.comment)},r.prototype.toJSON=function(o){var u=o?!!o.keepComments:!1;return n.toObject(["options",this.options,"oneof",this.oneof,"comment",u?this.comment:void 0])};function i(a){if(a.parent)for(var o=0;o<a.fieldsArray.length;++o)a.fieldsArray[o].parent||a.parent.add(a.fieldsArray[o])}return r.prototype.add=function(o){if(!(o instanceof t))throw TypeError("field must be a Field");return o.parent&&o.parent!==this.parent&&o.parent.remove(o),this.oneof.push(o.name),this.fieldsArray.push(o),o.partOf=this,i(this),this},r.prototype.remove=function(o){if(!(o instanceof t))throw TypeError("field must be a Field");var u=this.fieldsArray.indexOf(o);if(u<0)throw Error(o+" is not a member of "+this);return this.fieldsArray.splice(u,1),u=this.oneof.indexOf(o.name),u>-1&&this.oneof.splice(u,1),o.partOf=null,this},r.prototype.onAdd=function(o){e.prototype.onAdd.call(this,o);for(var u=this,l=0;l<this.oneof.length;++l){var c=o.get(this.oneof[l]);c&&!c.partOf&&(c.partOf=u,u.fieldsArray.push(c))}i(this)},r.prototype.onRemove=function(o){for(var u=0,l;u<this.fieldsArray.length;++u)(l=this.fieldsArray[u]).parent&&l.parent.remove(l);e.prototype.onRemove.call(this,o)},Object.defineProperty(r.prototype,"isProto3Optional",{get:function(){if(this.fieldsArray==null||this.fieldsArray.length!==1)return!1;var a=this.fieldsArray[0];return a.options!=null&&a.options.proto3_optional===!0}}),r.d=function(){for(var o=new Array(arguments.length),u=0;u<arguments.length;)o[u]=arguments[u++];return function(c,p){n.decorateType(c.constructor).add(new r(p,o)),Object.defineProperty(c,p,{get:n.oneOfGetter(o),set:n.oneOfSetter(o)})}},oneof}var object,hasRequiredObject;function requireObject(){if(hasRequiredObject)return object;hasRequiredObject=1,object=o,o.className="ReflectionObject";const e=requireOneof();var t=requireUtil(),n,r={enum_type:"OPEN",field_presence:"EXPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"},i={enum_type:"CLOSED",field_presence:"EXPLICIT",json_format:"LEGACY_BEST_EFFORT",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"EXPANDED",utf8_validation:"NONE"},a={enum_type:"OPEN",field_presence:"IMPLICIT",json_format:"ALLOW",message_encoding:"LENGTH_PREFIXED",repeated_field_encoding:"PACKED",utf8_validation:"VERIFY"};function o(u,l){if(!t.isString(u))throw TypeError("name must be a string");if(l&&!t.isObject(l))throw TypeError("options must be an object");this.options=l,this.parsedOptions=null,this.name=u,this._edition=null,this._defaultEdition="proto2",this._features={},this._featuresResolved=!1,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}return Object.defineProperties(o.prototype,{root:{get:function(){for(var u=this;u.parent!==null;)u=u.parent;return u}},fullName:{get:function(){for(var u=[this.name],l=this.parent;l;)u.unshift(l.name),l=l.parent;return u.join(".")}}}),o.prototype.toJSON=function(){throw Error()},o.prototype.onAdd=function(l){this.parent&&this.parent!==l&&this.parent.remove(this),this.parent=l,this.resolved=!1;var c=l.root;c instanceof n&&c._handleAdd(this)},o.prototype.onRemove=function(l){var c=l.root;c instanceof n&&c._handleRemove(this),this.parent=null,this.resolved=!1},o.prototype.resolve=function(){return this.resolved?this:(this.root instanceof n&&(this.resolved=!0),this)},o.prototype._resolveFeaturesRecursive=function(l){return this._resolveFeatures(this._edition||l)},o.prototype._resolveFeatures=function(l){if(!this._featuresResolved){var c={};if(!l)throw new Error("Unknown edition for "+this.fullName);var p=Object.assign(this.options?Object.assign({},this.options.features):{},this._inferLegacyProtoFeatures(l));if(this._edition){if(l==="proto2")c=Object.assign({},i);else if(l==="proto3")c=Object.assign({},a);else if(l==="2023")c=Object.assign({},r);else throw new Error("Unknown edition: "+l);this._features=Object.assign(c,p||{}),this._featuresResolved=!0;return}if(this.partOf instanceof e){var d=Object.assign({},this.partOf._features);this._features=Object.assign(d,p||{})}else if(!this.declaringField)if(this.parent){var f=Object.assign({},this.parent._features);this._features=Object.assign(f,p||{})}else throw new Error("Unable to find a parent for "+this.fullName);this.extensionField&&(this.extensionField._features=this._features),this._featuresResolved=!0}},o.prototype._inferLegacyProtoFeatures=function(){return{}},o.prototype.getOption=function(l){if(this.options)return this.options[l]},o.prototype.setOption=function(l,c,p){return this.options||(this.options={}),/^features\./.test(l)?t.setProperty(this.options,l,c,p):(!p||this.options[l]===void 0)&&(this.getOption(l)!==c&&(this.resolved=!1),this.options[l]=c),this},o.prototype.setParsedOption=function(l,c,p){this.parsedOptions||(this.parsedOptions=[]);var d=this.parsedOptions;if(p){var f=d.find(function(m){return Object.prototype.hasOwnProperty.call(m,l)});if(f){var v=f[l];t.setProperty(v,p,c)}else f={},f[l]=t.setProperty({},p,c),d.push(f)}else{var h={};h[l]=c,d.push(h)}return this},o.prototype.setOptions=function(l,c){if(l)for(var p=Object.keys(l),d=0;d<p.length;++d)this.setOption(p[d],l[p[d]],c);return this},o.prototype.toString=function(){var l=this.constructor.className,c=this.fullName;return c.length?l+" "+c:l},o.prototype._editionToJSON=function(){if(!(!this._edition||this._edition==="proto3"))return this._edition},o._configure=function(u){n=u},object}var _enum,hasRequired_enum;function require_enum(){if(hasRequired_enum)return _enum;hasRequired_enum=1,_enum=r;var e=requireObject();((r.prototype=Object.create(e.prototype)).constructor=r).className="Enum";var t=requireNamespace(),n=requireUtil();function r(i,a,o,u,l,c){if(e.call(this,i,o),a&&typeof a!="object")throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=u,this.comments=l||{},this.valuesOptions=c,this._valuesFeatures={},this.reserved=void 0,a)for(var p=Object.keys(a),d=0;d<p.length;++d)typeof a[p[d]]=="number"&&(this.valuesById[this.values[p[d]]=a[p[d]]]=p[d])}return r.prototype._resolveFeatures=function(a){return a=this._edition||a,e.prototype._resolveFeatures.call(this,a),Object.keys(this.values).forEach(o=>{var u=Object.assign({},this._features);this._valuesFeatures[o]=Object.assign(u,this.valuesOptions&&this.valuesOptions[o]&&this.valuesOptions[o].features)}),this},r.fromJSON=function(a,o){var u=new r(a,o.values,o.options,o.comment,o.comments);return u.reserved=o.reserved,o.edition&&(u._edition=o.edition),u._defaultEdition="proto3",u},r.prototype.toJSON=function(a){var o=a?!!a.keepComments:!1;return n.toObject(["edition",this._editionToJSON(),"options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",o?this.comment:void 0,"comments",o?this.comments:void 0])},r.prototype.add=function(a,o,u,l){if(!n.isString(a))throw TypeError("name must be a string");if(!n.isInteger(o))throw TypeError("id must be an integer");if(this.values[a]!==void 0)throw Error("duplicate name '"+a+"' in "+this);if(this.isReservedId(o))throw Error("id "+o+" is reserved in "+this);if(this.isReservedName(a))throw Error("name '"+a+"' is reserved in "+this);if(this.valuesById[o]!==void 0){if(!(this.options&&this.options.allow_alias))throw Error("duplicate id "+o+" in "+this);this.values[a]=o}else this.valuesById[this.values[a]=o]=a;return l&&(this.valuesOptions===void 0&&(this.valuesOptions={}),this.valuesOptions[a]=l||null),this.comments[a]=u||null,this},r.prototype.remove=function(a){if(!n.isString(a))throw TypeError("name must be a string");var o=this.values[a];if(o==null)throw Error("name '"+a+"' does not exist in "+this);return delete this.valuesById[o],delete this.values[a],delete this.comments[a],this.valuesOptions&&delete this.valuesOptions[a],this},r.prototype.isReservedId=function(a){return t.isReservedId(this.reserved,a)},r.prototype.isReservedName=function(a){return t.isReservedName(this.reserved,a)},_enum}var encoder_1,hasRequiredEncoder;function requireEncoder(){if(hasRequiredEncoder)return encoder_1;hasRequiredEncoder=1,encoder_1=i;var e=require_enum(),t=requireTypes(),n=requireUtil();function r(a,o,u,l){return o.delimited?a("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",u,l,(o.id<<3|3)>>>0,(o.id<<3|4)>>>0):a("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",u,l,(o.id<<3|2)>>>0)}function i(a){for(var o=n.codegen(["m","w"],a.name+"$encode")("if(!w)")("w=Writer.create()"),u,l,c=a.fieldsArray.slice().sort(n.compareFieldsById),u=0;u<c.length;++u){var p=c[u].resolve(),d=a._fieldsArray.indexOf(p),f=p.resolvedType instanceof e?"int32":p.type,v=t.basic[f];l="m"+n.safeProp(p.name),p.map?(o("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",l,p.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",l)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(p.id<<3|2)>>>0,8|t.mapKey[p.keyType],p.keyType),v===void 0?o("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",d,l):o(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|v,f,l),o("}")("}")):p.repeated?(o("if(%s!=null&&%s.length){",l,l),p.packed&&t.packed[f]!==void 0?o("w.uint32(%i).fork()",(p.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",l)("w.%s(%s[i])",f,l)("w.ldelim()"):(o("for(var i=0;i<%s.length;++i)",l),v===void 0?r(o,p,d,l+"[i]"):o("w.uint32(%i).%s(%s[i])",(p.id<<3|v)>>>0,f,l)),o("}")):(p.optional&&o("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",l,p.name),v===void 0?r(o,p,d,l):o("w.uint32(%i).%s(%s)",(p.id<<3|v)>>>0,f,l))}return o("return w")}return encoder_1}var hasRequiredIndexLight;function requireIndexLight(){if(hasRequiredIndexLight)return indexLight.exports;hasRequiredIndexLight=1;var e=indexLight.exports=requireIndexMinimal();e.build="light";function t(r,i,a){return typeof i=="function"?(a=i,i=new e.Root):i||(i=new e.Root),i.load(r,a)}e.load=t;function n(r,i){return i||(i=new e.Root),i.loadSync(r)}return e.loadSync=n,e.encoder=requireEncoder(),e.decoder=requireDecoder(),e.verifier=requireVerifier(),e.converter=requireConverter(),e.ReflectionObject=requireObject(),e.Namespace=requireNamespace(),e.Root=requireRoot(),e.Enum=require_enum(),e.Type=requireType(),e.Field=requireField(),e.OneOf=requireOneof(),e.MapField=requireMapfield(),e.Service=requireService(),e.Method=requireMethod(),e.Message=requireMessage(),e.wrappers=requireWrappers(),e.types=requireTypes(),e.util=requireUtil(),e.ReflectionObject._configure(e.Root),e.Namespace._configure(e.Type,e.Service,e.Enum),e.Root._configure(e.Type),e.Field._configure(e.Type),indexLight.exports}var tokenize_1,hasRequiredTokenize;function requireTokenize(){if(hasRequiredTokenize)return tokenize_1;hasRequiredTokenize=1,tokenize_1=p;var e=/[\s{}=;:[\],'"()<>]/g,t=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,n=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,r=/^ *[*/]+ */,i=/^\s*\*?\/*/,a=/\n/g,o=/\s/,u=/\\(.?)/g,l={0:"\0",r:"\r",n:`