@abi-software/flatmapvuer 0.6.1-auth.3 → 0.6.1-auth.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/flatmapvuer.js +5 -8
- package/dist/flatmapvuer.umd.cjs +2 -2
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/AnnotationTool.vue +1 -0
- package/src/main.js +1 -1
- package/src/store/index.js +0 -7
package/dist/flatmapvuer.umd.cjs
CHANGED
|
@@ -16,7 +16,7 @@ usage: app.provide(ID_INJECTION_KEY, {
|
|
|
16
16
|
z-index:-1000 !important;
|
|
17
17
|
top:0 !important;
|
|
18
18
|
right:0 !important;
|
|
19
|
-
`,ON=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function VN(e){const t=window.getComputedStyle(e),r=t.getPropertyValue("box-sizing"),n=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),i=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:ON.map(a=>`${a}:${t.getPropertyValue(a)}`).join(";"),paddingSize:n,borderSize:i,boxSizing:r}}function dx(e,t=1,r){var n;xo||(xo=document.createElement("textarea"),document.body.appendChild(xo));const{paddingSize:i,borderSize:o,boxSizing:a,contextStyle:s}=VN(e);xo.setAttribute("style",`${s};${HN}`),xo.value=e.value||e.placeholder||"";let h=xo.scrollHeight;const d={};a==="border-box"?h=h+o:a==="content-box"&&(h=h-i),xo.value="";const Q=xo.scrollHeight-i;if(X1(t)){let p=Q*t;a==="border-box"&&(p=p+i+o),h=Math.max(p,h),d.minHeight=`${p}px`}if(X1(r)){let p=Q*r;a==="border-box"&&(p=p+i+o),h=Math.min(p,h)}return d.height=`${h}px`,(n=xo.parentNode)==null||n.removeChild(xo),xo=void 0,d}const DN=Qn({id:{type:String,default:void 0},size:U3,disabled:Boolean,modelValue:{type:Er([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:Er([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},suffixIcon:{type:j3},prefixIcon:{type:j3},containerRole:{type:String,default:void 0},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:Er([Object,Array,String]),default:()=>E6({})},autofocus:{type:Boolean,default:!1}}),PN={[A1]:e=>W1(e),input:e=>W1(e),change:e=>W1(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},IN=["role"],kN=["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus"],RN=["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus"],BN=T.defineComponent({name:"ElInput",inheritAttrs:!1}),NN=T.defineComponent({...BN,props:DN,emits:PN,setup(e,{expose:t,emit:r}){const n=e,i=T.useAttrs(),o=T.useSlots(),a=T.computed(()=>{const pe={};return n.containerRole==="combobox"&&(pe["aria-haspopup"]=i["aria-haspopup"],pe["aria-owns"]=i["aria-owns"],pe["aria-expanded"]=i["aria-expanded"]),pe}),s=T.computed(()=>[n.type==="textarea"?A.b():b.b(),b.m(_.value),b.is("disabled",x.value),b.is("exceed",Fe.value),{[b.b("group")]:o.prepend||o.append,[b.bm("group","append")]:o.append,[b.bm("group","prepend")]:o.prepend,[b.m("prefix")]:o.prefix||n.prefixIcon,[b.m("suffix")]:o.suffix||n.suffixIcon||n.clearable||n.showPassword,[b.bm("suffix","password-clear")]:qt.value&&le.value},i.class]),h=T.computed(()=>[b.e("wrapper"),b.is("focus",rt.value)]),d=rB({excludeKeys:T.computed(()=>Object.keys(a.value))}),{form:Q,formItem:p}=G3(),{inputId:g}=D6(n,{formItemContext:p}),_=$3(),x=V6(),b=Cr("input"),A=Cr("textarea"),E=T.shallowRef(),O=T.shallowRef(),V=T.ref(!1),k=T.ref(!1),j=T.ref(!1),$=T.ref(),U=T.shallowRef(n.inputStyle),J=T.computed(()=>E.value||O.value),{wrapperRef:tt,isFocused:rt,handleFocus:st,handleBlur:pt}=dT(J,{afterBlur(){var pe;n.validateEvent&&((pe=p==null?void 0:p.validate)==null||pe.call(p,"blur").catch(ur=>K1(ur)))}}),St=T.computed(()=>{var pe;return(pe=Q==null?void 0:Q.statusIcon)!=null?pe:!1}),$t=T.computed(()=>(p==null?void 0:p.validateState)||""),ie=T.computed(()=>$t.value&&Ev[$t.value]),me=T.computed(()=>j.value?WR:UR),Ft=T.computed(()=>[i.style]),he=T.computed(()=>[n.inputStyle,U.value,{resize:n.resize}]),cr=T.computed(()=>B3(n.modelValue)?"":String(n.modelValue)),qt=T.computed(()=>n.clearable&&!x.value&&!n.readonly&&!!cr.value&&(rt.value||V.value)),le=T.computed(()=>n.showPassword&&!x.value&&!n.readonly&&!!cr.value&&(!!cr.value||rt.value)),Qe=T.computed(()=>n.showWordLimit&&!!n.maxlength&&(n.type==="text"||n.type==="textarea")&&!x.value&&!n.readonly&&!n.showPassword),xe=T.computed(()=>cr.value.length),Fe=T.computed(()=>!!Qe.value&&xe.value>Number(n.maxlength)),Ue=T.computed(()=>!!o.suffix||!!n.suffixIcon||qt.value||n.showPassword||Qe.value||!!$t.value&&St.value),[je,Bt]=xN(E);Fa(O,pe=>{if(zt(),!Qe.value||n.resize!=="both")return;const ur=pe[0],{width:Yr}=ur.contentRect;$.value={right:`calc(100% - ${Yr+15+6}px)`}});const Zt=()=>{const{type:pe,autosize:ur}=n;if(!(!q1||pe!=="textarea"||!O.value))if(ur){const Yr=gi(ur)?ur.minRows:void 0,wn=gi(ur)?ur.maxRows:void 0,fe=dx(O.value,Yr,wn);U.value={overflowY:"hidden",...fe},T.nextTick(()=>{O.value.offsetHeight,U.value=fe})}else U.value={minHeight:dx(O.value).minHeight}},zt=(pe=>{let ur=!1;return()=>{var Yr;if(ur||!n.autosize)return;((Yr=O.value)==null?void 0:Yr.offsetParent)===null||(pe(),ur=!0)}})(Zt),de=()=>{const pe=J.value,ur=n.formatter?n.formatter(cr.value):cr.value;!pe||pe.value===ur||(pe.value=ur)},Re=async pe=>{je();let{value:ur}=pe.target;if(n.formatter&&(ur=n.parser?n.parser(ur):ur),!k.value){if(ur===cr.value){de();return}r(A1,ur),r("input",ur),await T.nextTick(),de(),Bt()}},Ce=pe=>{r("change",pe.target.value)},He=pe=>{r("compositionstart",pe),k.value=!0},Pe=pe=>{var ur;r("compositionupdate",pe);const Yr=(ur=pe.target)==null?void 0:ur.value,wn=Yr[Yr.length-1]||"";k.value=!Av(wn)},ze=pe=>{r("compositionend",pe),k.value&&(k.value=!1,Re(pe))},Ut=()=>{j.value=!j.value,Vr()},Vr=async()=>{var pe;await T.nextTick(),(pe=J.value)==null||pe.focus()},pn=()=>{var pe;return(pe=J.value)==null?void 0:pe.blur()},Ke=pe=>{V.value=!1,r("mouseleave",pe)},_r=pe=>{V.value=!0,r("mouseenter",pe)},Nn=pe=>{r("keydown",pe)},H1=()=>{var pe;(pe=J.value)==null||pe.select()},Ln=()=>{r(A1,""),r("change",""),r("clear"),r("input","")};return T.watch(()=>n.modelValue,()=>{var pe;T.nextTick(()=>Zt()),n.validateEvent&&((pe=p==null?void 0:p.validate)==null||pe.call(p,"change").catch(ur=>K1(ur)))}),T.watch(cr,()=>de()),T.watch(()=>n.type,async()=>{await T.nextTick(),de(),Zt()}),T.onMounted(()=>{!n.formatter&&n.parser&&K1("ElInput","If you set the parser, you also need to set the formatter."),de(),T.nextTick(Zt)}),t({input:E,textarea:O,ref:J,textareaStyle:he,autosize:T.toRef(n,"autosize"),focus:Vr,blur:pn,select:H1,clear:Ln,resizeTextarea:Zt}),(pe,ur)=>T.withDirectives((T.openBlock(),T.createElementBlock("div",T.mergeProps(T.unref(a),{class:T.unref(s),style:T.unref(Ft),role:pe.containerRole,onMouseenter:_r,onMouseleave:Ke}),[T.createCommentVNode(" input "),pe.type!=="textarea"?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.createCommentVNode(" prepend slot "),pe.$slots.prepend?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(T.unref(b).be("group","prepend"))},[T.renderSlot(pe.$slots,"prepend")],2)):T.createCommentVNode("v-if",!0),T.createElementVNode("div",{ref_key:"wrapperRef",ref:tt,class:T.normalizeClass(T.unref(h))},[T.createCommentVNode(" prefix slot "),pe.$slots.prefix||pe.prefixIcon?(T.openBlock(),T.createElementBlock("span",{key:0,class:T.normalizeClass(T.unref(b).e("prefix"))},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(b).e("prefix-inner"))},[T.renderSlot(pe.$slots,"prefix"),pe.prefixIcon?(T.openBlock(),T.createBlock(T.unref(yi),{key:0,class:T.normalizeClass(T.unref(b).e("icon"))},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(pe.prefixIcon)))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0)],2)],2)):T.createCommentVNode("v-if",!0),T.createElementVNode("input",T.mergeProps({id:T.unref(g),ref_key:"input",ref:E,class:T.unref(b).e("inner")},T.unref(d),{minlength:pe.minlength,maxlength:pe.maxlength,type:pe.showPassword?j.value?"text":"password":pe.type,disabled:T.unref(x),readonly:pe.readonly,autocomplete:pe.autocomplete,tabindex:pe.tabindex,"aria-label":pe.label,placeholder:pe.placeholder,style:pe.inputStyle,form:pe.form,autofocus:pe.autofocus,onCompositionstart:He,onCompositionupdate:Pe,onCompositionend:ze,onInput:Re,onFocus:ur[0]||(ur[0]=(...Yr)=>T.unref(st)&&T.unref(st)(...Yr)),onBlur:ur[1]||(ur[1]=(...Yr)=>T.unref(pt)&&T.unref(pt)(...Yr)),onChange:Ce,onKeydown:Nn}),null,16,kN),T.createCommentVNode(" suffix slot "),T.unref(Ue)?(T.openBlock(),T.createElementBlock("span",{key:1,class:T.normalizeClass(T.unref(b).e("suffix"))},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(b).e("suffix-inner"))},[!T.unref(qt)||!T.unref(le)||!T.unref(Qe)?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.renderSlot(pe.$slots,"suffix"),pe.suffixIcon?(T.openBlock(),T.createBlock(T.unref(yi),{key:0,class:T.normalizeClass(T.unref(b).e("icon"))},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(pe.suffixIcon)))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0)],64)):T.createCommentVNode("v-if",!0),T.unref(qt)?(T.openBlock(),T.createBlock(T.unref(yi),{key:1,class:T.normalizeClass([T.unref(b).e("icon"),T.unref(b).e("clear")]),onMousedown:T.withModifiers(T.unref(M0),["prevent"]),onClick:Ln},{default:T.withCtx(()=>[T.createVNode(T.unref(Jf))]),_:1},8,["class","onMousedown"])):T.createCommentVNode("v-if",!0),T.unref(le)?(T.openBlock(),T.createBlock(T.unref(yi),{key:2,class:T.normalizeClass([T.unref(b).e("icon"),T.unref(b).e("password")]),onClick:Ut},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(T.unref(me))))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0),T.unref(Qe)?(T.openBlock(),T.createElementBlock("span",{key:3,class:T.normalizeClass(T.unref(b).e("count"))},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(b).e("count-inner"))},T.toDisplayString(T.unref(xe))+" / "+T.toDisplayString(pe.maxlength),3)],2)):T.createCommentVNode("v-if",!0),T.unref($t)&&T.unref(ie)&&T.unref(St)?(T.openBlock(),T.createBlock(T.unref(yi),{key:4,class:T.normalizeClass([T.unref(b).e("icon"),T.unref(b).e("validateIcon"),T.unref(b).is("loading",T.unref($t)==="validating")])},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(T.unref(ie))))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0)],2)],2)):T.createCommentVNode("v-if",!0)],2),T.createCommentVNode(" append slot "),pe.$slots.append?(T.openBlock(),T.createElementBlock("div",{key:1,class:T.normalizeClass(T.unref(b).be("group","append"))},[T.renderSlot(pe.$slots,"append")],2)):T.createCommentVNode("v-if",!0)],64)):(T.openBlock(),T.createElementBlock(T.Fragment,{key:1},[T.createCommentVNode(" textarea "),T.createElementVNode("textarea",T.mergeProps({id:T.unref(g),ref_key:"textarea",ref:O,class:T.unref(A).e("inner")},T.unref(d),{minlength:pe.minlength,maxlength:pe.maxlength,tabindex:pe.tabindex,disabled:T.unref(x),readonly:pe.readonly,autocomplete:pe.autocomplete,style:T.unref(he),"aria-label":pe.label,placeholder:pe.placeholder,form:pe.form,autofocus:pe.autofocus,onCompositionstart:He,onCompositionupdate:Pe,onCompositionend:ze,onInput:Re,onFocus:ur[2]||(ur[2]=(...Yr)=>T.unref(st)&&T.unref(st)(...Yr)),onBlur:ur[3]||(ur[3]=(...Yr)=>T.unref(pt)&&T.unref(pt)(...Yr)),onChange:Ce,onKeydown:Nn}),null,16,RN),T.unref(Qe)?(T.openBlock(),T.createElementBlock("span",{key:0,style:T.normalizeStyle($.value),class:T.normalizeClass(T.unref(b).e("count"))},T.toDisplayString(T.unref(xe))+" / "+T.toDisplayString(pe.maxlength),7)):T.createCommentVNode("v-if",!0)],64))],16,IN)),[[T.vShow,pe.type!=="hidden"]])}});var FN=Sr(NN,[["__file","input.vue"]]);const vc=Xi(FN),P6=4,jN={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"}},zN=({move:e,size:t,bar:r})=>({[r.size]:t,transform:`translate${r.axis}(${e}%)`}),fx=Symbol("scrollbarContextKey"),UN=Qn({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),$N="Thumb";var Tx=Sr(T.defineComponent({__name:"thumb",props:UN,setup(e){const t=e,r=T.inject(fx),n=Cr("scrollbar");r||SR($N,"can not inject scrollbar context");const i=T.ref(),o=T.ref(),a=T.ref({}),s=T.ref(!1);let h=!1,d=!1,Q=q1?document.onselectstart:null;const p=T.computed(()=>jN[t.vertical?"vertical":"horizontal"]),g=T.computed(()=>zN({size:t.size,move:t.move,bar:p.value})),_=T.computed(()=>i.value[p.value.offset]**2/r.wrapElement[p.value.scrollSize]/t.ratio/o.value[p.value.offset]),x=$=>{var U;if($.stopPropagation(),$.ctrlKey||[1,2].includes($.button))return;(U=window.getSelection())==null||U.removeAllRanges(),A($);const J=$.currentTarget;J&&(a.value[p.value.axis]=J[p.value.offset]-($[p.value.client]-J.getBoundingClientRect()[p.value.direction]))},b=$=>{if(!o.value||!i.value||!r.wrapElement)return;const U=Math.abs($.target.getBoundingClientRect()[p.value.direction]-$[p.value.client]),J=o.value[p.value.offset]/2,tt=(U-J)*100*_.value/i.value[p.value.offset];r.wrapElement[p.value.scroll]=tt*r.wrapElement[p.value.scrollSize]/100},A=$=>{$.stopImmediatePropagation(),h=!0,document.addEventListener("mousemove",E),document.addEventListener("mouseup",O),Q=document.onselectstart,document.onselectstart=()=>!1},E=$=>{if(!i.value||!o.value||h===!1)return;const U=a.value[p.value.axis];if(!U)return;const J=(i.value.getBoundingClientRect()[p.value.direction]-$[p.value.client])*-1,tt=o.value[p.value.offset]-U,rt=(J-tt)*100*_.value/i.value[p.value.offset];r.wrapElement[p.value.scroll]=rt*r.wrapElement[p.value.scrollSize]/100},O=()=>{h=!1,a.value[p.value.axis]=0,document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",O),j(),d&&(s.value=!1)},V=()=>{d=!1,s.value=!!t.size},k=()=>{d=!0,s.value=h};T.onBeforeUnmount(()=>{j(),document.removeEventListener("mouseup",O)});const j=()=>{document.onselectstart!==Q&&(document.onselectstart=Q)};return k3(T.toRef(r,"scrollbarElement"),"mousemove",V),k3(T.toRef(r,"scrollbarElement"),"mouseleave",k),($,U)=>(T.openBlock(),T.createBlock(T.Transition,{name:T.unref(n).b("fade"),persisted:""},{default:T.withCtx(()=>[T.withDirectives(T.createElementVNode("div",{ref_key:"instance",ref:i,class:T.normalizeClass([T.unref(n).e("bar"),T.unref(n).is(T.unref(p).key)]),onMousedown:b},[T.createElementVNode("div",{ref_key:"thumb",ref:o,class:T.normalizeClass(T.unref(n).e("thumb")),style:T.normalizeStyle(T.unref(g)),onMousedown:x},null,38)],34),[[T.vShow,$.always||s.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const GN=Qn({always:{type:Boolean,default:!0},width:String,height:String,ratioX:{type:Number,default:1},ratioY:{type:Number,default:1}});var ZN=Sr(T.defineComponent({__name:"bar",props:GN,setup(e,{expose:t}){const r=e,n=T.ref(0),i=T.ref(0);return t({handleScroll:a=>{if(a){const s=a.offsetHeight-P6,h=a.offsetWidth-P6;i.value=a.scrollTop*100/s*r.ratioY,n.value=a.scrollLeft*100/h*r.ratioX}}}),(a,s)=>(T.openBlock(),T.createElementBlock(T.Fragment,null,[T.createVNode(Tx,{move:n.value,ratio:a.ratioX,size:a.width,always:a.always},null,8,["move","ratio","size","always"]),T.createVNode(Tx,{move:i.value,ratio:a.ratioY,size:a.height,vertical:"",always:a.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const qN=Qn({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:Er([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},id:String,role:String,ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical"]}}),WN={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(X1)},QT="ElScrollbar",XN=T.defineComponent({name:QT}),KN=T.defineComponent({...XN,props:qN,emits:WN,setup(e,{expose:t,emit:r}){const n=e,i=Cr("scrollbar");let o,a;const s=T.ref(),h=T.ref(),d=T.ref(),Q=T.ref("0"),p=T.ref("0"),g=T.ref(),_=T.ref(1),x=T.ref(1),b=T.computed(()=>{const U={};return n.height&&(U.height=w6(n.height)),n.maxHeight&&(U.maxHeight=w6(n.maxHeight)),[n.wrapStyle,U]}),A=T.computed(()=>[n.wrapClass,i.e("wrap"),{[i.em("wrap","hidden-default")]:!n.native}]),E=T.computed(()=>[i.e("view"),n.viewClass]),O=()=>{var U;h.value&&((U=g.value)==null||U.handleScroll(h.value),r("scroll",{scrollTop:h.value.scrollTop,scrollLeft:h.value.scrollLeft}))};function V(U,J){gi(U)?h.value.scrollTo(U):X1(U)&&X1(J)&&h.value.scrollTo(U,J)}const k=U=>{if(!X1(U)){K1(QT,"value must be a number");return}h.value.scrollTop=U},j=U=>{if(!X1(U)){K1(QT,"value must be a number");return}h.value.scrollLeft=U},$=()=>{if(!h.value)return;const U=h.value.offsetHeight-P6,J=h.value.offsetWidth-P6,tt=U**2/h.value.scrollHeight,rt=J**2/h.value.scrollWidth,st=Math.max(tt,n.minSize),pt=Math.max(rt,n.minSize);_.value=tt/(U-tt)/(st/(U-st)),x.value=rt/(J-rt)/(pt/(J-pt)),p.value=st+P6<U?`${st}px`:"",Q.value=pt+P6<J?`${pt}px`:""};return T.watch(()=>n.noresize,U=>{U?(o==null||o(),a==null||a()):({stop:o}=Fa(d,$),a=k3("resize",$))},{immediate:!0}),T.watch(()=>[n.maxHeight,n.height],()=>{n.native||T.nextTick(()=>{var U;$(),h.value&&((U=g.value)==null||U.handleScroll(h.value))})}),T.provide(fx,T.reactive({scrollbarElement:s,wrapElement:h})),T.onMounted(()=>{n.native||T.nextTick(()=>{$()})}),T.onUpdated(()=>$()),t({wrapRef:h,update:$,scrollTo:V,setScrollTop:k,setScrollLeft:j,handleScroll:O}),(U,J)=>(T.openBlock(),T.createElementBlock("div",{ref_key:"scrollbarRef",ref:s,class:T.normalizeClass(T.unref(i).b())},[T.createElementVNode("div",{ref_key:"wrapRef",ref:h,class:T.normalizeClass(T.unref(A)),style:T.normalizeStyle(T.unref(b)),onScroll:O},[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(U.tag),{id:U.id,ref_key:"resizeRef",ref:d,class:T.normalizeClass(T.unref(E)),style:T.normalizeStyle(U.viewStyle),role:U.role,"aria-label":U.ariaLabel,"aria-orientation":U.ariaOrientation},{default:T.withCtx(()=>[T.renderSlot(U.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],38),U.native?T.createCommentVNode("v-if",!0):(T.openBlock(),T.createBlock(ZN,{key:0,ref_key:"barRef",ref:g,height:p.value,width:Q.value,always:U.always,"ratio-x":x.value,"ratio-y":_.value},null,8,["height","width","always","ratio-x","ratio-y"]))],2))}});var YN=Sr(KN,[["__file","scrollbar.vue"]]);const JN=Xi(YN),pT=Symbol("popper"),Qx=Symbol("popperContent"),px=Qn({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),tF=T.defineComponent({name:"ElPopper",inheritAttrs:!1}),eF=T.defineComponent({...tF,props:px,setup(e,{expose:t}){const r=e,n=T.ref(),i=T.ref(),o=T.ref(),a=T.ref(),s=T.computed(()=>r.role),h={triggerRef:n,popperInstanceRef:i,contentRef:o,referenceRef:a,role:s};return t(h),T.provide(pT,h),(d,Q)=>T.renderSlot(d.$slots,"default")}});var rF=Sr(eF,[["__file","popper.vue"]]);const mx=Qn({arrowOffset:{type:Number,default:5}}),nF=T.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),iF=T.defineComponent({...nF,props:mx,setup(e,{expose:t}){const r=e,n=Cr("popper"),{arrowOffset:i,arrowRef:o,arrowStyle:a}=T.inject(Qx,void 0);return T.watch(()=>r.arrowOffset,s=>{i.value=s}),T.onBeforeUnmount(()=>{o.value=void 0}),t({arrowRef:o}),(s,h)=>(T.openBlock(),T.createElementBlock("span",{ref_key:"arrowRef",ref:o,class:T.normalizeClass(T.unref(n).e("arrow")),style:T.normalizeStyle(T.unref(a)),"data-popper-arrow":""},null,6))}});var oF=Sr(iF,[["__file","arrow.vue"]]);const mT="ElOnlyChild",aF=T.defineComponent({name:mT,setup(e,{slots:t,attrs:r}){var n;const i=T.inject(ox),o=vN((n=i==null?void 0:i.setForwardRef)!=null?n:M0);return()=>{var a;const s=(a=t.default)==null?void 0:a.call(t,r);if(!s)return null;if(s.length>1)return K1(mT,"requires exact only one valid child."),null;const h=gx(s);return h?T.withDirectives(T.cloneVNode(h,r),[[o]]):(K1(mT,"no valid child node found"),null)}}});function gx(e){if(!e)return null;const t=e;for(const r of t){if(gi(r))switch(r.type){case T.Comment:continue;case T.Text:case"svg":return yx(r);case T.Fragment:return gx(r.children);default:return r}return yx(r)}return null}function yx(e){const t=Cr("only-child");return T.createVNode("span",{class:t.e("content")},[e])}const _x=Qn({virtualRef:{type:Er(Object)},virtualTriggering:Boolean,onMouseenter:{type:Er(Function)},onMouseleave:{type:Er(Function)},onClick:{type:Er(Function)},onKeydown:{type:Er(Function)},onFocus:{type:Er(Function)},onBlur:{type:Er(Function)},onContextmenu:{type:Er(Function)},id:String,open:Boolean}),sF=T.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),lF=T.defineComponent({...sF,props:_x,setup(e,{expose:t}){const r=e,{role:n,triggerRef:i}=T.inject(pT,void 0);_N(i);const o=T.computed(()=>s.value?r.id:void 0),a=T.computed(()=>{if(n&&n.value==="tooltip")return r.open&&r.id?r.id:void 0}),s=T.computed(()=>{if(n&&n.value!=="tooltip")return n.value}),h=T.computed(()=>s.value?`${r.open}`:void 0);let d;return T.onMounted(()=>{T.watch(()=>r.virtualRef,Q=>{Q&&(i.value=Na(Q))},{immediate:!0}),T.watch(i,(Q,p)=>{d==null||d(),d=void 0,P0(Q)&&(["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"].forEach(g=>{var _;const x=r[g];x&&(Q.addEventListener(g.slice(2).toLowerCase(),x),(_=p==null?void 0:p.removeEventListener)==null||_.call(p,g.slice(2).toLowerCase(),x))}),d=T.watch([o,a,s,h],g=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((_,x)=>{B3(g[x])?Q.removeAttribute(_):Q.setAttribute(_,g[x])})},{immediate:!0})),P0(p)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(g=>p.removeAttribute(g))},{immediate:!0})}),T.onBeforeUnmount(()=>{d==null||d(),d=void 0}),t({triggerRef:i}),(Q,p)=>Q.virtualTriggering?T.createCommentVNode("v-if",!0):(T.openBlock(),T.createBlock(T.unref(aF),T.mergeProps({key:0},Q.$attrs,{"aria-controls":T.unref(o),"aria-describedby":T.unref(a),"aria-expanded":T.unref(h),"aria-haspopup":T.unref(s)}),{default:T.withCtx(()=>[T.renderSlot(Q.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var cF=Sr(lF,[["__file","trigger.vue"]]);const gT="focus-trap.focus-after-trapped",yT="focus-trap.focus-after-released",uF="focus-trap.focusout-prevented",vx={cancelable:!0,bubbles:!1},hF={cancelable:!0,bubbles:!1},xx="focusAfterTrapped",bx="focusAfterReleased",dF=Symbol("elFocusTrap"),_T=T.ref(),xc=T.ref(0),vT=T.ref(0);let bc=0;const Lx=e=>{const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0||n===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t},wx=(e,t)=>{for(const r of e)if(!fF(r,t))return r},fF=(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},TF=e=>{const t=Lx(e),r=wx(t,e),n=wx(t.reverse(),e);return[r,n]},QF=e=>e instanceof HTMLInputElement&&"select"in e,Z3=(e,t)=>{if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),vT.value=window.performance.now(),e!==r&&QF(e)&&t&&e.select()}};function Ex(e,t){const r=[...e],n=e.indexOf(t);return n!==-1&&r.splice(n,1),r}const pF=()=>{let e=[];return{push:n=>{const i=e[0];i&&n!==i&&i.pause(),e=Ex(e,n),e.unshift(n)},remove:n=>{var i,o;e=Ex(e,n),(o=(i=e[0])==null?void 0:i.resume)==null||o.call(i)}}},mF=(e,t=!1)=>{const r=document.activeElement;for(const n of e)if(Z3(n,t),document.activeElement!==r)return},Mx=pF(),gF=()=>xc.value>vT.value,Lc=()=>{_T.value="pointer",xc.value=window.performance.now()},Ax=()=>{_T.value="keyboard",xc.value=window.performance.now()},yF=()=>(T.onMounted(()=>{bc===0&&(document.addEventListener("mousedown",Lc),document.addEventListener("touchstart",Lc),document.addEventListener("keydown",Ax)),bc++}),T.onBeforeUnmount(()=>{bc--,bc<=0&&(document.removeEventListener("mousedown",Lc),document.removeEventListener("touchstart",Lc),document.removeEventListener("keydown",Ax))}),{focusReason:_T,lastUserFocusTimestamp:xc,lastAutomatedFocusTimestamp:vT}),wc=e=>new CustomEvent(uF,{...hF,detail:e}),_F=T.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[xx,bx,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const r=T.ref();let n,i;const{focusReason:o}=yF();QN(x=>{e.trapped&&!a.paused&&t("release-requested",x)});const a={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},s=x=>{if(!e.loop&&!e.trapped||a.paused)return;const{key:b,altKey:A,ctrlKey:E,metaKey:O,currentTarget:V,shiftKey:k}=x,{loop:j}=e,$=b===Ki.tab&&!A&&!E&&!O,U=document.activeElement;if($&&U){const J=V,[tt,rt]=TF(J);if(tt&&rt){if(!k&&U===rt){const pt=wc({focusReason:o.value});t("focusout-prevented",pt),pt.defaultPrevented||(x.preventDefault(),j&&Z3(tt,!0))}else if(k&&[tt,J].includes(U)){const pt=wc({focusReason:o.value});t("focusout-prevented",pt),pt.defaultPrevented||(x.preventDefault(),j&&Z3(rt,!0))}}else if(U===J){const pt=wc({focusReason:o.value});t("focusout-prevented",pt),pt.defaultPrevented||x.preventDefault()}}};T.provide(dF,{focusTrapRef:r,onKeydown:s}),T.watch(()=>e.focusTrapEl,x=>{x&&(r.value=x)},{immediate:!0}),T.watch([r],([x],[b])=>{x&&(x.addEventListener("keydown",s),x.addEventListener("focusin",Q),x.addEventListener("focusout",p)),b&&(b.removeEventListener("keydown",s),b.removeEventListener("focusin",Q),b.removeEventListener("focusout",p))});const h=x=>{t(xx,x)},d=x=>t(bx,x),Q=x=>{const b=T.unref(r);if(!b)return;const A=x.target,E=x.relatedTarget,O=A&&b.contains(A);e.trapped||E&&b.contains(E)||(n=E),O&&t("focusin",x),!a.paused&&e.trapped&&(O?i=A:Z3(i,!0))},p=x=>{const b=T.unref(r);if(!(a.paused||!b))if(e.trapped){const A=x.relatedTarget;!B3(A)&&!b.contains(A)&&setTimeout(()=>{if(!a.paused&&e.trapped){const E=wc({focusReason:o.value});t("focusout-prevented",E),E.defaultPrevented||Z3(i,!0)}},0)}else{const A=x.target;A&&b.contains(A)||t("focusout",x)}};async function g(){await T.nextTick();const x=T.unref(r);if(x){Mx.push(a);const b=x.contains(document.activeElement)?n:document.activeElement;if(n=b,!x.contains(b)){const E=new Event(gT,vx);x.addEventListener(gT,h),x.dispatchEvent(E),E.defaultPrevented||T.nextTick(()=>{let O=e.focusStartEl;W1(O)||(Z3(O),document.activeElement!==O&&(O="first")),O==="first"&&mF(Lx(x),!0),(document.activeElement===b||O==="container")&&Z3(x)})}}}function _(){const x=T.unref(r);if(x){x.removeEventListener(gT,h);const b=new CustomEvent(yT,{...vx,detail:{focusReason:o.value}});x.addEventListener(yT,d),x.dispatchEvent(b),!b.defaultPrevented&&(o.value=="keyboard"||!gF()||x.contains(document.activeElement))&&Z3(n??document.body),x.removeEventListener(yT,d),Mx.remove(a)}}return T.onMounted(()=>{e.trapped&&g(),T.watch(()=>e.trapped,x=>{x?g():_()})}),T.onBeforeUnmount(()=>{e.trapped&&_()}),{onKeydown:s}}});function vF(e,t,r,n,i,o){return T.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var xF=Sr(_F,[["render",vF],["__file","focus-trap.vue"]]);const bF=["fixed","absolute"],LF=Qn({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:Er(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:Qc,default:"bottom"},popperOptions:{type:Er(Object),default:()=>({})},strategy:{type:String,values:bF,default:"absolute"}}),Cx=Qn({...LF,id:String,style:{type:Er([String,Array,Object])},className:{type:Er([String,Array,Object])},effect:{type:String,default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:Er([String,Array,Object])},popperStyle:{type:Er([String,Array,Object])},referenceEl:{type:Er(Object)},triggerTargetEl:{type:Er(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},ariaLabel:{type:String,default:void 0},virtualTriggering:Boolean,zIndex:Number}),wF={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},EF=(e,t=[])=>{const{placement:r,strategy:n,popperOptions:i}=e,o={placement:r,strategy:n,...i,modifiers:[...AF(e),...t]};return CF(o,i==null?void 0:i.modifiers),o},MF=e=>{if(q1)return Na(e)};function AF(e){const{offset:t,gpuAcceleration:r,fallbackPlacements:n}=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:n}},{name:"computeStyles",options:{gpuAcceleration:r}}]}function CF(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const SF=0,HF=e=>{const{popperInstanceRef:t,contentRef:r,triggerRef:n,role:i}=T.inject(pT,void 0),o=T.ref(),a=T.ref(),s=T.computed(()=>({name:"eventListeners",enabled:!!e.visible})),h=T.computed(()=>{var E;const O=T.unref(o),V=(E=T.unref(a))!=null?E:SF;return{name:"arrow",enabled:!bR(O),options:{element:O,padding:V}}}),d=T.computed(()=>({onFirstUpdate:()=>{x()},...EF(e,[T.unref(h),T.unref(s)])})),Q=T.computed(()=>MF(e.referenceEl)||T.unref(n)),{attributes:p,state:g,styles:_,update:x,forceUpdate:b,instanceRef:A}=dN(Q,r,d);return T.watch(A,E=>t.value=E),T.onMounted(()=>{T.watch(()=>{var E;return(E=T.unref(Q))==null?void 0:E.getBoundingClientRect()},()=>{x()})}),{attributes:p,arrowRef:o,contentRef:r,instanceRef:A,state:g,styles:_,role:i,forceUpdate:b,update:x}},OF=(e,{attributes:t,styles:r,role:n})=>{const{nextZIndex:i}=cx(),o=Cr("popper"),a=T.computed(()=>T.unref(t).popper),s=T.ref(X1(e.zIndex)?e.zIndex:i()),h=T.computed(()=>[o.b(),o.is("pure",e.pure),o.is(e.effect),e.popperClass]),d=T.computed(()=>[{zIndex:T.unref(s)},T.unref(r).popper,e.popperStyle||{}]),Q=T.computed(()=>n.value==="dialog"?"false":void 0),p=T.computed(()=>T.unref(r).arrow||{});return{ariaModal:Q,arrowStyle:p,contentAttrs:a,contentClass:h,contentStyle:d,contentZIndex:s,updateZIndex:()=>{s.value=X1(e.zIndex)?e.zIndex:i()}}},VF=(e,t)=>{const r=T.ref(!1),n=T.ref();return{focusStartRef:n,trapped:r,onFocusAfterReleased:d=>{var Q;((Q=d.detail)==null?void 0:Q.focusReason)!=="pointer"&&(n.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:d=>{e.visible&&!r.value&&(d.target&&(n.value=d.target),r.value=!0)},onFocusoutPrevented:d=>{e.trapping||(d.detail.focusReason==="pointer"&&d.preventDefault(),r.value=!1)},onReleaseRequested:()=>{r.value=!1,t("close")}}},DF=T.defineComponent({name:"ElPopperContent"}),PF=T.defineComponent({...DF,props:Cx,emits:wF,setup(e,{expose:t,emit:r}){const n=e,{focusStartRef:i,trapped:o,onFocusAfterReleased:a,onFocusAfterTrapped:s,onFocusInTrap:h,onFocusoutPrevented:d,onReleaseRequested:Q}=VF(n,r),{attributes:p,arrowRef:g,contentRef:_,styles:x,instanceRef:b,role:A,update:E}=HF(n),{ariaModal:O,arrowStyle:V,contentAttrs:k,contentClass:j,contentStyle:$,updateZIndex:U}=OF(n,{styles:x,attributes:p,role:A}),J=T.inject(G0,void 0),tt=T.ref();T.provide(Qx,{arrowStyle:V,arrowRef:g,arrowOffset:tt}),J&&(J.addInputId||J.removeInputId)&&T.provide(G0,{...J,addInputId:M0,removeInputId:M0});let rt;const st=(St=!0)=>{E(),St&&U()},pt=()=>{st(!1),n.visible&&n.focusOnShow?o.value=!0:n.visible===!1&&(o.value=!1)};return T.onMounted(()=>{T.watch(()=>n.triggerTargetEl,(St,$t)=>{rt==null||rt(),rt=void 0;const ie=T.unref(St||_.value),me=T.unref($t||_.value);P0(ie)&&(rt=T.watch([A,()=>n.ariaLabel,O,()=>n.id],Ft=>{["role","aria-label","aria-modal","id"].forEach((he,cr)=>{B3(Ft[cr])?ie.removeAttribute(he):ie.setAttribute(he,Ft[cr])})},{immediate:!0})),me!==ie&&P0(me)&&["role","aria-label","aria-modal","id"].forEach(Ft=>{me.removeAttribute(Ft)})},{immediate:!0}),T.watch(()=>n.visible,pt,{immediate:!0})}),T.onBeforeUnmount(()=>{rt==null||rt(),rt=void 0}),t({popperContentRef:_,popperInstanceRef:b,updatePopper:st,contentStyle:$}),(St,$t)=>(T.openBlock(),T.createElementBlock("div",T.mergeProps({ref_key:"contentRef",ref:_},T.unref(k),{style:T.unref($),class:T.unref(j),tabindex:"-1",onMouseenter:$t[0]||($t[0]=ie=>St.$emit("mouseenter",ie)),onMouseleave:$t[1]||($t[1]=ie=>St.$emit("mouseleave",ie))}),[T.createVNode(T.unref(xF),{trapped:T.unref(o),"trap-on-focus-in":!0,"focus-trap-el":T.unref(_),"focus-start-el":T.unref(i),onFocusAfterTrapped:T.unref(s),onFocusAfterReleased:T.unref(a),onFocusin:T.unref(h),onFocusoutPrevented:T.unref(d),onReleaseRequested:T.unref(Q)},{default:T.withCtx(()=>[T.renderSlot(St.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}});var IF=Sr(PF,[["__file","content.vue"]]);const kF=Xi(rF),xT=Symbol("elTooltip"),E2=Qn({...gN,...Cx,appendTo:{type:Er([String,Object])},content:{type:String,default:""},rawContent:{type:Boolean,default:!1},persistent:Boolean,ariaLabel:String,visible:{type:Er(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean}),Z0=Qn({..._x,disabled:Boolean,trigger:{type:Er([String,Array]),default:"hover"},triggerKeys:{type:Er(Array),default:()=>[Ki.enter,Ki.space]}}),{useModelToggleProps:RF,useModelToggleEmits:BF,useModelToggle:NF}=Ov("visible"),FF=Qn({...px,...RF,...E2,...Z0,...mx,showArrow:{type:Boolean,default:!0}}),jF=[...BF,"before-show","before-hide","show","hide","open","close"],zF=(e,t)=>Vi(e)?e.includes(t):e===t,I6=(e,t,r)=>n=>{zF(T.unref(e),t)&&r(n)},UF=T.defineComponent({name:"ElTooltipTrigger"}),$F=T.defineComponent({...UF,props:Z0,setup(e,{expose:t}){const r=e,n=Cr("tooltip"),{controlled:i,id:o,open:a,onOpen:s,onClose:h,onToggle:d}=T.inject(xT,void 0),Q=T.ref(null),p=()=>{if(T.unref(i)||r.disabled)return!0},g=T.toRef(r,"trigger"),_=Ba(p,I6(g,"hover",s)),x=Ba(p,I6(g,"hover",h)),b=Ba(p,I6(g,"click",k=>{k.button===0&&d(k)})),A=Ba(p,I6(g,"focus",s)),E=Ba(p,I6(g,"focus",h)),O=Ba(p,I6(g,"contextmenu",k=>{k.preventDefault(),d(k)})),V=Ba(p,k=>{const{code:j}=k;r.triggerKeys.includes(j)&&(k.preventDefault(),d(k))});return t({triggerRef:Q}),(k,j)=>(T.openBlock(),T.createBlock(T.unref(cF),{id:T.unref(o),"virtual-ref":k.virtualRef,open:T.unref(a),"virtual-triggering":k.virtualTriggering,class:T.normalizeClass(T.unref(n).e("trigger")),onBlur:T.unref(E),onClick:T.unref(b),onContextmenu:T.unref(O),onFocus:T.unref(A),onMouseenter:T.unref(_),onMouseleave:T.unref(x),onKeydown:T.unref(V)},{default:T.withCtx(()=>[T.renderSlot(k.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var GF=Sr($F,[["__file","trigger.vue"]]);const ZF=T.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),qF=T.defineComponent({...ZF,props:E2,setup(e,{expose:t}){const r=e,{selector:n}=ix(),i=Cr("tooltip"),o=T.ref(null),a=T.ref(!1),{controlled:s,id:h,open:d,trigger:Q,onClose:p,onOpen:g,onShow:_,onHide:x,onBeforeShow:b,onBeforeHide:A}=T.inject(xT,void 0),E=T.computed(()=>r.transition||`${i.namespace.value}-fade-in-linear`),O=T.computed(()=>process.env.NODE_ENV==="test"?!0:r.persistent);T.onBeforeUnmount(()=>{a.value=!0});const V=T.computed(()=>T.unref(O)?!0:T.unref(d)),k=T.computed(()=>r.disabled?!1:T.unref(d)),j=T.computed(()=>r.appendTo||n.value),$=T.computed(()=>{var Ft;return(Ft=r.style)!=null?Ft:{}}),U=T.computed(()=>!T.unref(d)),J=()=>{x()},tt=()=>{if(T.unref(s))return!0},rt=Ba(tt,()=>{r.enterable&&T.unref(Q)==="hover"&&g()}),st=Ba(tt,()=>{T.unref(Q)==="hover"&&p()}),pt=()=>{var Ft,he;(he=(Ft=o.value)==null?void 0:Ft.updatePopper)==null||he.call(Ft),b==null||b()},St=()=>{A==null||A()},$t=()=>{_(),me=hD(T.computed(()=>{var Ft;return(Ft=o.value)==null?void 0:Ft.popperContentRef}),()=>{if(T.unref(s))return;T.unref(Q)!=="hover"&&p()})},ie=()=>{r.virtualTriggering||p()};let me;return T.watch(()=>T.unref(d),Ft=>{Ft||me==null||me()},{flush:"post"}),T.watch(()=>r.content,()=>{var Ft,he;(he=(Ft=o.value)==null?void 0:Ft.updatePopper)==null||he.call(Ft)}),t({contentRef:o}),(Ft,he)=>(T.openBlock(),T.createBlock(T.Teleport,{disabled:!Ft.teleported,to:T.unref(j)},[T.createVNode(T.Transition,{name:T.unref(E),onAfterLeave:J,onBeforeEnter:pt,onAfterEnter:$t,onBeforeLeave:St},{default:T.withCtx(()=>[T.unref(V)?T.withDirectives((T.openBlock(),T.createBlock(T.unref(IF),T.mergeProps({key:0,id:T.unref(h),ref_key:"contentRef",ref:o},Ft.$attrs,{"aria-label":Ft.ariaLabel,"aria-hidden":T.unref(U),"boundaries-padding":Ft.boundariesPadding,"fallback-placements":Ft.fallbackPlacements,"gpu-acceleration":Ft.gpuAcceleration,offset:Ft.offset,placement:Ft.placement,"popper-options":Ft.popperOptions,strategy:Ft.strategy,effect:Ft.effect,enterable:Ft.enterable,pure:Ft.pure,"popper-class":Ft.popperClass,"popper-style":[Ft.popperStyle,T.unref($)],"reference-el":Ft.referenceEl,"trigger-target-el":Ft.triggerTargetEl,visible:T.unref(k),"z-index":Ft.zIndex,onMouseenter:T.unref(rt),onMouseleave:T.unref(st),onBlur:ie,onClose:T.unref(p)}),{default:T.withCtx(()=>[a.value?T.createCommentVNode("v-if",!0):T.renderSlot(Ft.$slots,"default",{key:0})]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[T.vShow,T.unref(k)]]):T.createCommentVNode("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"]))}});var WF=Sr(qF,[["__file","content.vue"]]);const XF=["innerHTML"],KF={key:1},YF=T.defineComponent({name:"ElTooltip"}),JF=T.defineComponent({...YF,props:FF,emits:jF,setup(e,{expose:t,emit:r}){const n=e;mN();const i=$0(),o=T.ref(),a=T.ref(),s=()=>{var E;const O=T.unref(o);O&&((E=O.popperInstanceRef)==null||E.update())},h=T.ref(!1),d=T.ref(),{show:Q,hide:p,hasUpdateHandler:g}=NF({indicator:h,toggleReason:d}),{onOpen:_,onClose:x}=yN({showAfter:T.toRef(n,"showAfter"),hideAfter:T.toRef(n,"hideAfter"),autoClose:T.toRef(n,"autoClose"),open:Q,close:p}),b=T.computed(()=>N3(n.visible)&&!g.value);T.provide(xT,{controlled:b,id:i,open:T.readonly(h),trigger:T.toRef(n,"trigger"),onOpen:E=>{_(E)},onClose:E=>{x(E)},onToggle:E=>{T.unref(h)?x(E):_(E)},onShow:()=>{r("show",d.value)},onHide:()=>{r("hide",d.value)},onBeforeShow:()=>{r("before-show",d.value)},onBeforeHide:()=>{r("before-hide",d.value)},updatePopper:s}),T.watch(()=>n.disabled,E=>{E&&h.value&&(h.value=!1)});const A=E=>{var O,V;const k=(V=(O=a.value)==null?void 0:O.contentRef)==null?void 0:V.popperContentRef,j=(E==null?void 0:E.relatedTarget)||document.activeElement;return k&&k.contains(j)};return T.onDeactivated(()=>h.value&&p()),t({popperRef:o,contentRef:a,isFocusInsideContent:A,updatePopper:s,onOpen:_,onClose:x,hide:p}),(E,O)=>(T.openBlock(),T.createBlock(T.unref(kF),{ref_key:"popperRef",ref:o,role:E.role},{default:T.withCtx(()=>[T.createVNode(GF,{disabled:E.disabled,trigger:E.trigger,"trigger-keys":E.triggerKeys,"virtual-ref":E.virtualRef,"virtual-triggering":E.virtualTriggering},{default:T.withCtx(()=>[E.$slots.default?T.renderSlot(E.$slots,"default",{key:0}):T.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),T.createVNode(WF,{ref_key:"contentRef",ref:a,"aria-label":E.ariaLabel,"boundaries-padding":E.boundariesPadding,content:E.content,disabled:E.disabled,effect:E.effect,enterable:E.enterable,"fallback-placements":E.fallbackPlacements,"hide-after":E.hideAfter,"gpu-acceleration":E.gpuAcceleration,offset:E.offset,persistent:E.persistent,"popper-class":E.popperClass,"popper-style":E.popperStyle,placement:E.placement,"popper-options":E.popperOptions,pure:E.pure,"raw-content":E.rawContent,"reference-el":E.referenceEl,"trigger-target-el":E.triggerTargetEl,"show-after":E.showAfter,strategy:E.strategy,teleported:E.teleported,transition:E.transition,"virtual-triggering":E.virtualTriggering,"z-index":E.zIndex,"append-to":E.appendTo},{default:T.withCtx(()=>[T.renderSlot(E.$slots,"content",{},()=>[E.rawContent?(T.openBlock(),T.createElementBlock("span",{key:0,innerHTML:E.content},null,8,XF)):(T.openBlock(),T.createElementBlock("span",KF,T.toDisplayString(E.content),1))]),E.showArrow?(T.openBlock(),T.createBlock(T.unref(oF),{key:0,"arrow-offset":E.arrowOffset},null,8,["arrow-offset"])):T.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","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var tj=Sr(JF,[["__file","tooltip.vue"]]);const bT=Xi(tj),Sx=Symbol("buttonGroupContextKey"),ej=(e,t)=>{Cv({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},T.computed(()=>e.type==="text"));const r=T.inject(Sx,void 0),n=fT("button"),{form:i}=G3(),o=$3(T.computed(()=>r==null?void 0:r.size)),a=V6(),s=T.ref(),h=T.useSlots(),d=T.computed(()=>e.type||(r==null?void 0:r.type)||""),Q=T.computed(()=>{var x,b,A;return(A=(b=e.autoInsertSpace)!=null?b:(x=n.value)==null?void 0:x.autoInsertSpace)!=null?A:!1}),p=T.computed(()=>e.tag==="button"?{ariaDisabled:a.value||e.loading,disabled:a.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),g=T.computed(()=>{var x;const b=(x=h.default)==null?void 0:x.call(h);if(Q.value&&(b==null?void 0:b.length)===1){const A=b[0];if((A==null?void 0:A.type)===T.Text){const E=A.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(E.trim())}}return!1});return{_disabled:a,_size:o,_type:d,_ref:s,_props:p,shouldAddSpace:g,handleClick:x=>{e.nativeType==="reset"&&(i==null||i.resetFields()),t("click",x)}}},LT=Qn({size:U3,disabled:Boolean,type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:j3},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:j3,default:()=>tT},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:Er([String,Object]),default:"button"}}),rj={click:e=>e instanceof MouseEvent};function _i(e,t){nj(e)&&(e="100%");var r=ij(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(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 Ec(e){return Math.min(1,Math.max(0,e))}function nj(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function ij(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Hx(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Mc(e){return e<=1?"".concat(Number(e)*100,"%"):e}function u4(e){return e.length===1?"0"+e:String(e)}function oj(e,t,r){return{r:_i(e,255)*255,g:_i(t,255)*255,b:_i(r,255)*255}}function Ox(e,t,r){e=_i(e,255),t=_i(t,255),r=_i(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o=0,a=0,s=(n+i)/2;if(n===i)a=0,o=0;else{var h=n-i;switch(a=s>.5?h/(2-n-i):h/(n+i),n){case e:o=(t-r)/h+(t<r?6:0);break;case t:o=(r-e)/h+2;break;case r:o=(e-t)/h+4;break}o/=6}return{h:o,s:a,l:s}}function wT(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function aj(e,t,r){var n,i,o;if(e=_i(e,360),t=_i(t,100),r=_i(r,100),t===0)i=r,o=r,n=r;else{var a=r<.5?r*(1+t):r+t-r*t,s=2*r-a;n=wT(s,a,e+1/3),i=wT(s,a,e),o=wT(s,a,e-1/3)}return{r:n*255,g:i*255,b:o*255}}function Vx(e,t,r){e=_i(e,255),t=_i(t,255),r=_i(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o=0,a=n,s=n-i,h=n===0?0:s/n;if(n===i)o=0;else{switch(n){case e:o=(t-r)/s+(t<r?6:0);break;case t:o=(r-e)/s+2;break;case r:o=(e-t)/s+4;break}o/=6}return{h:o,s:h,v:a}}function sj(e,t,r){e=_i(e,360)*6,t=_i(t,100),r=_i(r,100);var n=Math.floor(e),i=e-n,o=r*(1-t),a=r*(1-i*t),s=r*(1-(1-i)*t),h=n%6,d=[r,a,o,o,s,r][h],Q=[s,r,r,a,o,o][h],p=[o,o,s,r,r,a][h];return{r:d*255,g:Q*255,b:p*255}}function Dx(e,t,r,n){var i=[u4(Math.round(e).toString(16)),u4(Math.round(t).toString(16)),u4(Math.round(r).toString(16))];return n&&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 lj(e,t,r,n,i){var o=[u4(Math.round(e).toString(16)),u4(Math.round(t).toString(16)),u4(Math.round(r).toString(16)),u4(cj(n))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function cj(e){return Math.round(parseFloat(e)*255).toString(16)}function Px(e){return M2(e)/255}function M2(e){return parseInt(e,16)}function uj(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var ET={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 hj(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=Tj(e)),typeof e=="object"&&(Za(e.r)&&Za(e.g)&&Za(e.b)?(t=oj(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Za(e.h)&&Za(e.s)&&Za(e.v)?(n=Mc(e.s),i=Mc(e.v),t=sj(e.h,n,i),a=!0,s="hsv"):Za(e.h)&&Za(e.s)&&Za(e.l)&&(n=Mc(e.s),o=Mc(e.l),t=aj(e.h,n,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=Hx(r),{ok:a,format:e.format||s,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:r}}var dj="[-\\+]?\\d+%?",fj="[-\\+]?\\d*\\.\\d+%?",q3="(?:".concat(fj,")|(?:").concat(dj,")"),MT="[\\s|\\(]+(".concat(q3,")[,|\\s]+(").concat(q3,")[,|\\s]+(").concat(q3,")\\s*\\)?"),AT="[\\s|\\(]+(".concat(q3,")[,|\\s]+(").concat(q3,")[,|\\s]+(").concat(q3,")[,|\\s]+(").concat(q3,")\\s*\\)?"),bo={CSS_UNIT:new RegExp(q3),rgb:new RegExp("rgb"+MT),rgba:new RegExp("rgba"+AT),hsl:new RegExp("hsl"+MT),hsla:new RegExp("hsla"+AT),hsv:new RegExp("hsv"+MT),hsva:new RegExp("hsva"+AT),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 Tj(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(ET[e])e=ET[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=bo.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=bo.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=bo.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=bo.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=bo.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=bo.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=bo.hex8.exec(e),r?{r:M2(r[1]),g:M2(r[2]),b:M2(r[3]),a:Px(r[4]),format:t?"name":"hex8"}:(r=bo.hex6.exec(e),r?{r:M2(r[1]),g:M2(r[2]),b:M2(r[3]),format:t?"name":"hex"}:(r=bo.hex4.exec(e),r?{r:M2(r[1]+r[1]),g:M2(r[2]+r[2]),b:M2(r[3]+r[3]),a:Px(r[4]+r[4]),format:t?"name":"hex8"}:(r=bo.hex3.exec(e),r?{r:M2(r[1]+r[1]),g:M2(r[2]+r[2]),b:M2(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function Za(e){return!!bo.CSS_UNIT.exec(String(e))}var Qj=function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=uj(t)),this.originalInput=t;var i=hj(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=(n=r.format)!==null&&n!==void 0?n:i.format,this.gradientType=r.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(),r,n,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?r=o/12.92:r=Math.pow((o+.055)/1.055,2.4),a<=.03928?n=a/12.92:n=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*r+.7152*n+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=Hx(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=Vx(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=Vx(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=Ox(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=Ox(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),Dx(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),lj(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),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(r,", ").concat(n,")"):"rgba(".concat(t,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(r){return"".concat(Math.round(_i(r,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(r){return Math.round(_i(r,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="#"+Dx(this.r,this.g,this.b,!1),r=0,n=Object.entries(ET);r<n.length;r++){var i=n[r],o=i[0],a=i[1];if(t===a)return o}return!1},e.prototype.toString=function(t){var r=!!t;t=t??this.format;var n=!1,i=this.a<1&&this.a>=0,o=!r&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||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 r=this.toHsl();return r.l+=t/100,r.l=Ec(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=Ec(r.l),new e(r)},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 r=this.toHsl();return r.s-=t/100,r.s=Ec(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=Ec(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var n=this.toRgb(),i=new e(t).toRgb(),o=r/100,a={r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a};return new e(a)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var n=this.toHsl(),i=360/r,o=[this];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,o.push(new e(n));return o},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 r=this.toHsv(),n=r.h,i=r.s,o=r.v,a=[],s=1/t;t--;)a.push(new e({h:n,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb(),i=r.a+n.a*(1-r.a);return new e({r:(r.r*r.a+n.r*n.a*(1-r.a))/i,g:(r.g*r.a+n.g*n.a*(1-r.a))/i,b:(r.b*r.a+n.b*n.a*(1-r.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 r=this.toHsl(),n=r.h,i=[this],o=360/t,a=1;a<t;a++)i.push(new e({h:(n+a*o)%360,s:r.s,l:r.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function W3(e,t=20){return e.mix("#141414",t).toString()}function pj(e){const t=V6(),r=Cr("button");return T.computed(()=>{let n={};const i=e.color;if(i){const o=new Qj(i),a=e.dark?o.tint(20).toString():W3(o,20);if(e.plain)n=r.cssVarBlock({"bg-color":e.dark?W3(o,90):o.tint(90).toString(),"text-color":i,"border-color":e.dark?W3(o,50):o.tint(50).toString(),"hover-text-color":`var(${r.cssVarName("color-white")})`,"hover-bg-color":i,"hover-border-color":i,"active-bg-color":a,"active-text-color":`var(${r.cssVarName("color-white")})`,"active-border-color":a}),t.value&&(n[r.cssVarBlockName("disabled-bg-color")]=e.dark?W3(o,90):o.tint(90).toString(),n[r.cssVarBlockName("disabled-text-color")]=e.dark?W3(o,50):o.tint(50).toString(),n[r.cssVarBlockName("disabled-border-color")]=e.dark?W3(o,80):o.tint(80).toString());else{const s=e.dark?W3(o,30):o.tint(30).toString(),h=o.isDark()?`var(${r.cssVarName("color-white")})`:`var(${r.cssVarName("color-black")})`;if(n=r.cssVarBlock({"bg-color":i,"text-color":h,"border-color":i,"hover-bg-color":s,"hover-text-color":h,"hover-border-color":s,"active-bg-color":a,"active-border-color":a}),t.value){const d=e.dark?W3(o,50):o.tint(50).toString();n[r.cssVarBlockName("disabled-bg-color")]=d,n[r.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${r.cssVarName("color-white")})`,n[r.cssVarBlockName("disabled-border-color")]=d}}}return n})}const mj=T.defineComponent({name:"ElButton"}),gj=T.defineComponent({...mj,props:LT,emits:rj,setup(e,{expose:t,emit:r}){const n=e,i=pj(n),o=Cr("button"),{_ref:a,_size:s,_type:h,_disabled:d,_props:Q,shouldAddSpace:p,handleClick:g}=ej(n,r);return t({ref:a,size:s,type:h,disabled:d,shouldAddSpace:p}),(_,x)=>(T.openBlock(),T.createBlock(T.resolveDynamicComponent(_.tag),T.mergeProps({ref_key:"_ref",ref:a},T.unref(Q),{class:[T.unref(o).b(),T.unref(o).m(T.unref(h)),T.unref(o).m(T.unref(s)),T.unref(o).is("disabled",T.unref(d)),T.unref(o).is("loading",_.loading),T.unref(o).is("plain",_.plain),T.unref(o).is("round",_.round),T.unref(o).is("circle",_.circle),T.unref(o).is("text",_.text),T.unref(o).is("link",_.link),T.unref(o).is("has-bg",_.bg)],style:T.unref(i),onClick:T.unref(g)}),{default:T.withCtx(()=>[_.loading?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[_.$slots.loading?T.renderSlot(_.$slots,"loading",{key:0}):(T.openBlock(),T.createBlock(T.unref(yi),{key:1,class:T.normalizeClass(T.unref(o).is("loading"))},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(_.loadingIcon)))]),_:1},8,["class"]))],64)):_.icon||_.$slots.icon?(T.openBlock(),T.createBlock(T.unref(yi),{key:1},{default:T.withCtx(()=>[_.icon?(T.openBlock(),T.createBlock(T.resolveDynamicComponent(_.icon),{key:0})):T.renderSlot(_.$slots,"icon",{key:1})]),_:3})):T.createCommentVNode("v-if",!0),_.$slots.default?(T.openBlock(),T.createElementBlock("span",{key:2,class:T.normalizeClass({[T.unref(o).em("text","expand")]:T.unref(p)})},[T.renderSlot(_.$slots,"default")],2)):T.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var yj=Sr(gj,[["__file","button.vue"]]);const _j={size:LT.size,type:LT.type},vj=T.defineComponent({name:"ElButtonGroup"}),xj=T.defineComponent({...vj,props:_j,setup(e){const t=e;T.provide(Sx,T.reactive({size:T.toRef(t,"size"),type:T.toRef(t,"type")}));const r=Cr("button");return(n,i)=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(`${T.unref(r).b("group")}`)},[T.renderSlot(n.$slots,"default")],2))}});var Ix=Sr(xj,[["__file","button-group.vue"]]);const na=Xi(yj,{ButtonGroup:Ix});_o(Ix);var P=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function q0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function bj(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}const X3=new Map;let kx;q1&&(document.addEventListener("mousedown",e=>kx=e),document.addEventListener("mouseup",e=>{for(const t of X3.values())for(const{documentHandler:r}of t)r(e,kx)}));function Rx(e,t){let r=[];return Array.isArray(t.arg)?r=t.arg:P0(t.arg)&&r.push(t.arg),function(n,i){const o=t.instance.popperRef,a=n.target,s=i==null?void 0:i.target,h=!t||!t.instance,d=!a||!s,Q=e.contains(a)||e.contains(s),p=e===a,g=r.length&&r.some(x=>x==null?void 0:x.contains(a))||r.length&&r.includes(s),_=o&&(o.contains(a)||o.contains(s));h||d||Q||p||g||_||t.value(n,i)}}const Bx={beforeMount(e,t){X3.has(e)||X3.set(e,[]),X3.get(e).push({documentHandler:Rx(e,t),bindingFn:t.value})},updated(e,t){X3.has(e)||X3.set(e,[]);const r=X3.get(e),n=r.findIndex(o=>o.bindingFn===t.oldValue),i={documentHandler:Rx(e,t),bindingFn:t.value};n>=0?r.splice(n,1,i):r.push(i)},unmounted(e){X3.delete(e)}},Nx={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},controls:{type:String,default:void 0},border:Boolean,size:U3,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0}},Fx={[A1]:e=>W1(e)||X1(e)||N3(e),change:e=>W1(e)||X1(e)||N3(e)},k6=Symbol("checkboxGroupContextKey"),Lj=({model:e,isChecked:t})=>{const r=T.inject(k6,void 0),n=T.computed(()=>{var o,a;const s=(o=r==null?void 0:r.max)==null?void 0:o.value,h=(a=r==null?void 0:r.min)==null?void 0:a.value;return!D0(s)&&e.value.length>=s&&!t.value||!D0(h)&&e.value.length<=h&&t.value});return{isDisabled:V6(T.computed(()=>(r==null?void 0:r.disabled.value)||n.value)),isLimitDisabled:n}},wj=(e,{model:t,isLimitExceeded:r,hasOwnLabel:n,isDisabled:i,isLabeledByFormItem:o})=>{const a=T.inject(k6,void 0),{formItem:s}=G3(),{emit:h}=T.getCurrentInstance();function d(x){var b,A;return x===e.trueLabel||x===!0?(b=e.trueLabel)!=null?b:!0:(A=e.falseLabel)!=null?A:!1}function Q(x,b){h("change",d(x),b)}function p(x){if(r.value)return;const b=x.target;h("change",d(b.checked),x)}async function g(x){r.value||!n.value&&!i.value&&o.value&&(x.composedPath().some(E=>E.tagName==="LABEL")||(t.value=d([!1,e.falseLabel].includes(t.value)),await T.nextTick(),Q(t.value,x)))}const _=T.computed(()=>(a==null?void 0:a.validateEvent)||e.validateEvent);return T.watch(()=>e.modelValue,()=>{_.value&&(s==null||s.validate("change").catch(x=>K1(x)))}),{handleChange:p,onClickRoot:g}},Ej=e=>{const t=T.ref(!1),{emit:r}=T.getCurrentInstance(),n=T.inject(k6,void 0),i=T.computed(()=>D0(n)===!1),o=T.ref(!1),a=T.computed({get(){var s,h;return i.value?(s=n==null?void 0:n.modelValue)==null?void 0:s.value:(h=e.modelValue)!=null?h:t.value},set(s){var h,d;i.value&&Vi(s)?(o.value=((h=n==null?void 0:n.max)==null?void 0:h.value)!==void 0&&s.length>(n==null?void 0:n.max.value)&&s.length>a.value.length,o.value===!1&&((d=n==null?void 0:n.changeEvent)==null||d.call(n,s))):(r(A1,s),t.value=s)}});return{model:a,isGroup:i,isLimitExceeded:o}},Mj=(e,t,{model:r})=>{const n=T.inject(k6,void 0),i=T.ref(!1),o=T.computed(()=>{const d=r.value;return N3(d)?d:Vi(d)?gi(e.label)?d.map(T.toRaw).some(Q=>V0(Q,e.label)):d.map(T.toRaw).includes(e.label):d!=null?d===e.trueLabel:!!d}),a=$3(T.computed(()=>{var d;return(d=n==null?void 0:n.size)==null?void 0:d.value}),{prop:!0}),s=$3(T.computed(()=>{var d;return(d=n==null?void 0:n.size)==null?void 0:d.value})),h=T.computed(()=>!!t.default||!B3(e.label));return{checkboxButtonSize:a,isChecked:o,isFocused:i,checkboxSize:s,hasOwnLabel:h}},Aj=(e,{model:t})=>{function r(){Vi(t.value)&&!t.value.includes(e.label)?t.value.push(e.label):t.value=e.trueLabel||!0}e.checked&&r()},jx=(e,t)=>{const{formItem:r}=G3(),{model:n,isGroup:i,isLimitExceeded:o}=Ej(e),{isFocused:a,isChecked:s,checkboxButtonSize:h,checkboxSize:d,hasOwnLabel:Q}=Mj(e,t,{model:n}),{isDisabled:p}=Lj({model:n,isChecked:s}),{inputId:g,isLabeledByFormItem:_}=D6(e,{formItemContext:r,disableIdGeneration:Q,disableIdManagement:i}),{handleChange:x,onClickRoot:b}=wj(e,{model:n,isLimitExceeded:o,hasOwnLabel:Q,isDisabled:p,isLabeledByFormItem:_});return Aj(e,{model:n}),{inputId:g,isLabeledByFormItem:_,isChecked:s,isDisabled:p,isFocused:a,checkboxButtonSize:h,checkboxSize:d,hasOwnLabel:Q,model:n,handleChange:x,onClickRoot:b}},Cj=["id","indeterminate","name","tabindex","disabled","true-value","false-value"],Sj=["id","indeterminate","disabled","value","name","tabindex"],Hj=T.defineComponent({name:"ElCheckbox"}),Oj=T.defineComponent({...Hj,props:Nx,emits:Fx,setup(e){const t=e,r=T.useSlots(),{inputId:n,isLabeledByFormItem:i,isChecked:o,isDisabled:a,isFocused:s,checkboxSize:h,hasOwnLabel:d,model:Q,handleChange:p,onClickRoot:g}=jx(t,r),_=Cr("checkbox"),x=T.computed(()=>[_.b(),_.m(h.value),_.is("disabled",a.value),_.is("bordered",t.border),_.is("checked",o.value)]),b=T.computed(()=>[_.e("input"),_.is("disabled",a.value),_.is("checked",o.value),_.is("indeterminate",t.indeterminate),_.is("focus",s.value)]);return(A,E)=>(T.openBlock(),T.createBlock(T.resolveDynamicComponent(!T.unref(d)&&T.unref(i)?"span":"label"),{class:T.normalizeClass(T.unref(x)),"aria-controls":A.indeterminate?A.controls:null,onClick:T.unref(g)},{default:T.withCtx(()=>[T.createElementVNode("span",{class:T.normalizeClass(T.unref(b))},[A.trueLabel||A.falseLabel?T.withDirectives((T.openBlock(),T.createElementBlock("input",{key:0,id:T.unref(n),"onUpdate:modelValue":E[0]||(E[0]=O=>T.isRef(Q)?Q.value=O:null),class:T.normalizeClass(T.unref(_).e("original")),type:"checkbox",indeterminate:A.indeterminate,name:A.name,tabindex:A.tabindex,disabled:T.unref(a),"true-value":A.trueLabel,"false-value":A.falseLabel,onChange:E[1]||(E[1]=(...O)=>T.unref(p)&&T.unref(p)(...O)),onFocus:E[2]||(E[2]=O=>s.value=!0),onBlur:E[3]||(E[3]=O=>s.value=!1),onClick:E[4]||(E[4]=T.withModifiers(()=>{},["stop"]))},null,42,Cj)),[[T.vModelCheckbox,T.unref(Q)]]):T.withDirectives((T.openBlock(),T.createElementBlock("input",{key:1,id:T.unref(n),"onUpdate:modelValue":E[5]||(E[5]=O=>T.isRef(Q)?Q.value=O:null),class:T.normalizeClass(T.unref(_).e("original")),type:"checkbox",indeterminate:A.indeterminate,disabled:T.unref(a),value:A.label,name:A.name,tabindex:A.tabindex,onChange:E[6]||(E[6]=(...O)=>T.unref(p)&&T.unref(p)(...O)),onFocus:E[7]||(E[7]=O=>s.value=!0),onBlur:E[8]||(E[8]=O=>s.value=!1),onClick:E[9]||(E[9]=T.withModifiers(()=>{},["stop"]))},null,42,Sj)),[[T.vModelCheckbox,T.unref(Q)]]),T.createElementVNode("span",{class:T.normalizeClass(T.unref(_).e("inner"))},null,2)],2),T.unref(d)?(T.openBlock(),T.createElementBlock("span",{key:0,class:T.normalizeClass(T.unref(_).e("label"))},[T.renderSlot(A.$slots,"default"),A.$slots.default?T.createCommentVNode("v-if",!0):(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.createTextVNode(T.toDisplayString(A.label),1)],64))],2)):T.createCommentVNode("v-if",!0)]),_:3},8,["class","aria-controls","onClick"]))}});var Vj=Sr(Oj,[["__file","checkbox.vue"]]);const Dj=["name","tabindex","disabled","true-value","false-value"],Pj=["name","tabindex","disabled","value"],Ij=T.defineComponent({name:"ElCheckboxButton"}),kj=T.defineComponent({...Ij,props:Nx,emits:Fx,setup(e){const t=e,r=T.useSlots(),{isFocused:n,isChecked:i,isDisabled:o,checkboxButtonSize:a,model:s,handleChange:h}=jx(t,r),d=T.inject(k6,void 0),Q=Cr("checkbox"),p=T.computed(()=>{var _,x,b,A;const E=(x=(_=d==null?void 0:d.fill)==null?void 0:_.value)!=null?x:"";return{backgroundColor:E,borderColor:E,color:(A=(b=d==null?void 0:d.textColor)==null?void 0:b.value)!=null?A:"",boxShadow:E?`-1px 0 0 0 ${E}`:void 0}}),g=T.computed(()=>[Q.b("button"),Q.bm("button",a.value),Q.is("disabled",o.value),Q.is("checked",i.value),Q.is("focus",n.value)]);return(_,x)=>(T.openBlock(),T.createElementBlock("label",{class:T.normalizeClass(T.unref(g))},[_.trueLabel||_.falseLabel?T.withDirectives((T.openBlock(),T.createElementBlock("input",{key:0,"onUpdate:modelValue":x[0]||(x[0]=b=>T.isRef(s)?s.value=b:null),class:T.normalizeClass(T.unref(Q).be("button","original")),type:"checkbox",name:_.name,tabindex:_.tabindex,disabled:T.unref(o),"true-value":_.trueLabel,"false-value":_.falseLabel,onChange:x[1]||(x[1]=(...b)=>T.unref(h)&&T.unref(h)(...b)),onFocus:x[2]||(x[2]=b=>n.value=!0),onBlur:x[3]||(x[3]=b=>n.value=!1),onClick:x[4]||(x[4]=T.withModifiers(()=>{},["stop"]))},null,42,Dj)),[[T.vModelCheckbox,T.unref(s)]]):T.withDirectives((T.openBlock(),T.createElementBlock("input",{key:1,"onUpdate:modelValue":x[5]||(x[5]=b=>T.isRef(s)?s.value=b:null),class:T.normalizeClass(T.unref(Q).be("button","original")),type:"checkbox",name:_.name,tabindex:_.tabindex,disabled:T.unref(o),value:_.label,onChange:x[6]||(x[6]=(...b)=>T.unref(h)&&T.unref(h)(...b)),onFocus:x[7]||(x[7]=b=>n.value=!0),onBlur:x[8]||(x[8]=b=>n.value=!1),onClick:x[9]||(x[9]=T.withModifiers(()=>{},["stop"]))},null,42,Pj)),[[T.vModelCheckbox,T.unref(s)]]),_.$slots.default||_.label?(T.openBlock(),T.createElementBlock("span",{key:2,class:T.normalizeClass(T.unref(Q).be("button","inner")),style:T.normalizeStyle(T.unref(i)?T.unref(p):void 0)},[T.renderSlot(_.$slots,"default",{},()=>[T.createTextVNode(T.toDisplayString(_.label),1)])],6)):T.createCommentVNode("v-if",!0)],2))}});var zx=Sr(kj,[["__file","checkbox-button.vue"]]);const Rj=Qn({modelValue:{type:Er(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:U3,label:String,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0}}),Bj={[A1]:e=>Vi(e),change:e=>Vi(e)},Nj=T.defineComponent({name:"ElCheckboxGroup"}),Fj=T.defineComponent({...Nj,props:Rj,emits:Bj,setup(e,{emit:t}){const r=e,n=Cr("checkbox"),{formItem:i}=G3(),{inputId:o,isLabeledByFormItem:a}=D6(r,{formItemContext:i}),s=async d=>{t(A1,d),await T.nextTick(),t("change",d)},h=T.computed({get(){return r.modelValue},set(d){s(d)}});return T.provide(k6,{...MR(T.toRefs(r),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:h,changeEvent:s}),T.watch(()=>r.modelValue,()=>{r.validateEvent&&(i==null||i.validate("change").catch(d=>K1(d)))}),(d,Q)=>{var p;return T.openBlock(),T.createBlock(T.resolveDynamicComponent(d.tag),{id:T.unref(o),class:T.normalizeClass(T.unref(n).b("group")),role:"group","aria-label":T.unref(a)?void 0:d.label||"checkbox-group","aria-labelledby":T.unref(a)?(p=T.unref(i))==null?void 0:p.labelId:void 0},{default:T.withCtx(()=>[T.renderSlot(d.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var Ux=Sr(Fj,[["__file","checkbox-group.vue"]]);const Ac=Xi(Vj,{CheckboxButton:zx,CheckboxGroup:Ux});_o(zx);const CT=_o(Ux),$x=Qn({size:U3,disabled:Boolean,label:{type:[String,Number,Boolean],default:""}}),jj=Qn({...$x,modelValue:{type:[String,Number,Boolean],default:""},name:{type:String,default:""},border:Boolean}),Gx={[A1]:e=>W1(e)||X1(e)||N3(e),[dc]:e=>W1(e)||X1(e)||N3(e)},Zx=Symbol("radioGroupKey"),qx=(e,t)=>{const r=T.ref(),n=T.inject(Zx,void 0),i=T.computed(()=>!!n),o=T.computed({get(){return i.value?n.modelValue:e.modelValue},set(Q){i.value?n.changeEvent(Q):t&&t(A1,Q),r.value.checked=e.modelValue===e.label}}),a=$3(T.computed(()=>n==null?void 0:n.size)),s=V6(T.computed(()=>n==null?void 0:n.disabled)),h=T.ref(!1),d=T.computed(()=>s.value||i.value&&o.value!==e.label?-1:0);return{radioRef:r,isGroup:i,radioGroup:n,focus:h,size:a,disabled:s,tabIndex:d,modelValue:o}},zj=["value","name","disabled"],Uj=T.defineComponent({name:"ElRadio"}),$j=T.defineComponent({...Uj,props:jj,emits:Gx,setup(e,{emit:t}){const r=e,n=Cr("radio"),{radioRef:i,radioGroup:o,focus:a,size:s,disabled:h,modelValue:d}=qx(r,t);function Q(){T.nextTick(()=>t("change",d.value))}return(p,g)=>{var _;return T.openBlock(),T.createElementBlock("label",{class:T.normalizeClass([T.unref(n).b(),T.unref(n).is("disabled",T.unref(h)),T.unref(n).is("focus",T.unref(a)),T.unref(n).is("bordered",p.border),T.unref(n).is("checked",T.unref(d)===p.label),T.unref(n).m(T.unref(s))])},[T.createElementVNode("span",{class:T.normalizeClass([T.unref(n).e("input"),T.unref(n).is("disabled",T.unref(h)),T.unref(n).is("checked",T.unref(d)===p.label)])},[T.withDirectives(T.createElementVNode("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":g[0]||(g[0]=x=>T.isRef(d)?d.value=x:null),class:T.normalizeClass(T.unref(n).e("original")),value:p.label,name:p.name||((_=T.unref(o))==null?void 0:_.name),disabled:T.unref(h),type:"radio",onFocus:g[1]||(g[1]=x=>a.value=!0),onBlur:g[2]||(g[2]=x=>a.value=!1),onChange:Q,onClick:g[3]||(g[3]=T.withModifiers(()=>{},["stop"]))},null,42,zj),[[T.vModelRadio,T.unref(d)]]),T.createElementVNode("span",{class:T.normalizeClass(T.unref(n).e("inner"))},null,2)],2),T.createElementVNode("span",{class:T.normalizeClass(T.unref(n).e("label")),onKeydown:g[4]||(g[4]=T.withModifiers(()=>{},["stop"]))},[T.renderSlot(p.$slots,"default",{},()=>[T.createTextVNode(T.toDisplayString(p.label),1)])],34)],2)}}});var Gj=Sr($j,[["__file","radio.vue"]]);const Zj=Qn({...$x,name:{type:String,default:""}}),qj=["value","name","disabled"],Wj=T.defineComponent({name:"ElRadioButton"}),Xj=T.defineComponent({...Wj,props:Zj,setup(e){const t=e,r=Cr("radio"),{radioRef:n,focus:i,size:o,disabled:a,modelValue:s,radioGroup:h}=qx(t),d=T.computed(()=>({backgroundColor:(h==null?void 0:h.fill)||"",borderColor:(h==null?void 0:h.fill)||"",boxShadow:h!=null&&h.fill?`-1px 0 0 0 ${h.fill}`:"",color:(h==null?void 0:h.textColor)||""}));return(Q,p)=>{var g;return T.openBlock(),T.createElementBlock("label",{class:T.normalizeClass([T.unref(r).b("button"),T.unref(r).is("active",T.unref(s)===Q.label),T.unref(r).is("disabled",T.unref(a)),T.unref(r).is("focus",T.unref(i)),T.unref(r).bm("button",T.unref(o))])},[T.withDirectives(T.createElementVNode("input",{ref_key:"radioRef",ref:n,"onUpdate:modelValue":p[0]||(p[0]=_=>T.isRef(s)?s.value=_:null),class:T.normalizeClass(T.unref(r).be("button","original-radio")),value:Q.label,type:"radio",name:Q.name||((g=T.unref(h))==null?void 0:g.name),disabled:T.unref(a),onFocus:p[1]||(p[1]=_=>i.value=!0),onBlur:p[2]||(p[2]=_=>i.value=!1),onClick:p[3]||(p[3]=T.withModifiers(()=>{},["stop"]))},null,42,qj),[[T.vModelRadio,T.unref(s)]]),T.createElementVNode("span",{class:T.normalizeClass(T.unref(r).be("button","inner")),style:T.normalizeStyle(T.unref(s)===Q.label?T.unref(d):{}),onKeydown:p[4]||(p[4]=T.withModifiers(()=>{},["stop"]))},[T.renderSlot(Q.$slots,"default",{},()=>[T.createTextVNode(T.toDisplayString(Q.label),1)])],38)],2)}}});var Wx=Sr(Xj,[["__file","radio-button.vue"]]);const Kj=Qn({id:{type:String,default:void 0},size:U3,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:""},fill:{type:String,default:""},label:{type:String,default:void 0},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0}}),Yj=Gx,Jj=["id","aria-label","aria-labelledby"],tz=T.defineComponent({name:"ElRadioGroup"}),ez=T.defineComponent({...tz,props:Kj,emits:Yj,setup(e,{emit:t}){const r=e,n=Cr("radio"),i=$0(),o=T.ref(),{formItem:a}=G3(),{inputId:s,isLabeledByFormItem:h}=D6(r,{formItemContext:a}),d=p=>{t(A1,p),T.nextTick(()=>t("change",p))};T.onMounted(()=>{const p=o.value.querySelectorAll("[type=radio]"),g=p[0];!Array.from(p).some(_=>_.checked)&&g&&(g.tabIndex=0)});const Q=T.computed(()=>r.name||i.value);return T.provide(Zx,T.reactive({...T.toRefs(r),changeEvent:d,name:Q})),T.watch(()=>r.modelValue,()=>{r.validateEvent&&(a==null||a.validate("change").catch(p=>K1(p)))}),(p,g)=>(T.openBlock(),T.createElementBlock("div",{id:T.unref(s),ref_key:"radioGroupRef",ref:o,class:T.normalizeClass(T.unref(n).b("group")),role:"radiogroup","aria-label":T.unref(h)?void 0:p.label||"radio-group","aria-labelledby":T.unref(h)?T.unref(a).labelId:void 0},[T.renderSlot(p.$slots,"default")],10,Jj))}});var Xx=Sr(ez,[["__file","radio-group.vue"]]);const Kx=Xi(Gj,{RadioButton:Wx,RadioGroup:Xx}),Yx=_o(Xx);_o(Wx);const Jx=Qn({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Mv},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),rz={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},nz=T.defineComponent({name:"ElTag"}),iz=T.defineComponent({...nz,props:Jx,emits:rz,setup(e,{emit:t}){const r=e,n=$3(),i=Cr("tag"),o=T.computed(()=>{const{type:h,hit:d,effect:Q,closable:p,round:g}=r;return[i.b(),i.is("closable",p),i.m(h||"primary"),i.m(n.value),i.m(Q),i.is("hit",d),i.is("round",g)]}),a=h=>{t("close",h)},s=h=>{t("click",h)};return(h,d)=>h.disableTransitions?(T.openBlock(),T.createElementBlock("span",{key:0,class:T.normalizeClass(T.unref(o)),style:T.normalizeStyle({backgroundColor:h.color}),onClick:s},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(i).e("content"))},[T.renderSlot(h.$slots,"default")],2),h.closable?(T.openBlock(),T.createBlock(T.unref(yi),{key:0,class:T.normalizeClass(T.unref(i).e("close")),onClick:T.withModifiers(a,["stop"])},{default:T.withCtx(()=>[T.createVNode(T.unref(k0))]),_:1},8,["class","onClick"])):T.createCommentVNode("v-if",!0)],6)):(T.openBlock(),T.createBlock(T.Transition,{key:1,name:`${T.unref(i).namespace.value}-zoom-in-center`,appear:""},{default:T.withCtx(()=>[T.createElementVNode("span",{class:T.normalizeClass(T.unref(o)),style:T.normalizeStyle({backgroundColor:h.color}),onClick:s},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(i).e("content"))},[T.renderSlot(h.$slots,"default")],2),h.closable?(T.openBlock(),T.createBlock(T.unref(yi),{key:0,class:T.normalizeClass(T.unref(i).e("close")),onClick:T.withModifiers(a,["stop"])},{default:T.withCtx(()=>[T.createVNode(T.unref(k0))]),_:1},8,["class","onClick"])):T.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var oz=Sr(iz,[["__file","tag.vue"]]);const az=Xi(oz),tb=Symbol("rowContextKey"),sz=Qn({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:["start","center","end","space-around","space-between","space-evenly"],default:"start"},align:{type:String,values:["top","middle","bottom"]}}),lz=T.defineComponent({name:"ElRow"}),cz=T.defineComponent({...lz,props:sz,setup(e){const t=e,r=Cr("row"),n=T.computed(()=>t.gutter);T.provide(tb,{gutter:n});const i=T.computed(()=>{const a={};return t.gutter&&(a.marginRight=a.marginLeft=`-${t.gutter/2}px`),a}),o=T.computed(()=>[r.b(),r.is(`justify-${t.justify}`,t.justify!=="start"),r.is(`align-${t.align}`,!!t.align)]);return(a,s)=>(T.openBlock(),T.createBlock(T.resolveDynamicComponent(a.tag),{class:T.normalizeClass(T.unref(o)),style:T.normalizeStyle(T.unref(i))},{default:T.withCtx(()=>[T.renderSlot(a.$slots,"default")]),_:3},8,["class","style"]))}});var uz=Sr(cz,[["__file","row.vue"]]);const qa=Xi(uz),hz=Qn({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:Er([Number,Object]),default:()=>E6({})},sm:{type:Er([Number,Object]),default:()=>E6({})},md:{type:Er([Number,Object]),default:()=>E6({})},lg:{type:Er([Number,Object]),default:()=>E6({})},xl:{type:Er([Number,Object]),default:()=>E6({})}}),dz=T.defineComponent({name:"ElCol"}),fz=T.defineComponent({...dz,props:hz,setup(e){const t=e,{gutter:r}=T.inject(tb,{gutter:T.computed(()=>0)}),n=Cr("col"),i=T.computed(()=>{const a={};return r.value&&(a.paddingLeft=a.paddingRight=`${r.value/2}px`),a}),o=T.computed(()=>{const a=[];return["span","offset","pull","push"].forEach(d=>{const Q=t[d];X1(Q)&&(d==="span"?a.push(n.b(`${t[d]}`)):Q>0&&a.push(n.b(`${d}-${t[d]}`)))}),["xs","sm","md","lg","xl"].forEach(d=>{X1(t[d])?a.push(n.b(`${d}-${t[d]}`)):gi(t[d])&&Object.entries(t[d]).forEach(([Q,p])=>{a.push(Q!=="span"?n.b(`${d}-${Q}-${p}`):n.b(`${d}-${p}`))})}),r.value&&a.push(n.is("guttered")),[n.b(),a]});return(a,s)=>(T.openBlock(),T.createBlock(T.resolveDynamicComponent(a.tag),{class:T.normalizeClass(T.unref(o)),style:T.normalizeStyle(T.unref(i))},{default:T.withCtx(()=>[T.renderSlot(a.$slots,"default")]),_:3},8,["class","style"]))}});var Tz=Sr(fz,[["__file","col.vue"]]);const K3=Xi(Tz),Qz=T.defineComponent({name:"ElCollapseTransition"}),pz=T.defineComponent({...Qz,setup(e){const t=Cr("collapse-transition"),r=i=>{i.style.maxHeight="",i.style.overflow=i.dataset.oldOverflow,i.style.paddingTop=i.dataset.oldPaddingTop,i.style.paddingBottom=i.dataset.oldPaddingBottom},n={beforeEnter(i){i.dataset||(i.dataset={}),i.dataset.oldPaddingTop=i.style.paddingTop,i.dataset.oldPaddingBottom=i.style.paddingBottom,i.style.height&&(i.dataset.elExistsHeight=i.style.height),i.style.maxHeight=0,i.style.paddingTop=0,i.style.paddingBottom=0},enter(i){requestAnimationFrame(()=>{i.dataset.oldOverflow=i.style.overflow,i.dataset.elExistsHeight?i.style.maxHeight=i.dataset.elExistsHeight:i.scrollHeight!==0?i.style.maxHeight=`${i.scrollHeight}px`:i.style.maxHeight=0,i.style.paddingTop=i.dataset.oldPaddingTop,i.style.paddingBottom=i.dataset.oldPaddingBottom,i.style.overflow="hidden"})},afterEnter(i){i.style.maxHeight="",i.style.overflow=i.dataset.oldOverflow},enterCancelled(i){r(i)},beforeLeave(i){i.dataset||(i.dataset={}),i.dataset.oldPaddingTop=i.style.paddingTop,i.dataset.oldPaddingBottom=i.style.paddingBottom,i.dataset.oldOverflow=i.style.overflow,i.style.maxHeight=`${i.scrollHeight}px`,i.style.overflow="hidden"},leave(i){i.scrollHeight!==0&&(i.style.maxHeight=0,i.style.paddingTop=0,i.style.paddingBottom=0)},afterLeave(i){r(i)},leaveCancelled(i){r(i)}};return(i,o)=>(T.openBlock(),T.createBlock(T.Transition,T.mergeProps({name:T.unref(t).b()},T.toHandlers(n)),{default:T.withCtx(()=>[T.renderSlot(i.$slots,"default")]),_:3},16,["name"]))}});var Cc=Sr(pz,[["__file","collapse-transition.vue"]]);Cc.install=e=>{e.component(Cc.name,Cc)};const mz=Cc,gz=Qn({color:{type:Er(Object),required:!0},vertical:{type:Boolean,default:!1}});let ST=!1;function W0(e,t){if(!q1)return;const r=function(o){var a;(a=t.drag)==null||a.call(t,o)},n=function(o){var a;document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n),document.removeEventListener("touchmove",r),document.removeEventListener("touchend",n),document.onselectstart=null,document.ondragstart=null,ST=!1,(a=t.end)==null||a.call(t,o)},i=function(o){var a;ST||(o.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",r),document.addEventListener("mouseup",n),document.addEventListener("touchmove",r),document.addEventListener("touchend",n),ST=!0,(a=t.start)==null||a.call(t,o))};e.addEventListener("mousedown",i),e.addEventListener("touchstart",i)}const yz=e=>{const t=T.getCurrentInstance(),r=T.shallowRef(),n=T.shallowRef();function i(a){a.target!==r.value&&o(a)}function o(a){if(!n.value||!r.value)return;const h=t.vnode.el.getBoundingClientRect(),{clientX:d,clientY:Q}=Vf(a);if(e.vertical){let p=Q-h.top;p=Math.max(r.value.offsetHeight/2,p),p=Math.min(p,h.height-r.value.offsetHeight/2),e.color.set("alpha",Math.round((p-r.value.offsetHeight/2)/(h.height-r.value.offsetHeight)*100))}else{let p=d-h.left;p=Math.max(r.value.offsetWidth/2,p),p=Math.min(p,h.width-r.value.offsetWidth/2),e.color.set("alpha",Math.round((p-r.value.offsetWidth/2)/(h.width-r.value.offsetWidth)*100))}}return{thumb:r,bar:n,handleDrag:o,handleClick:i}},_z=(e,{bar:t,thumb:r,handleDrag:n})=>{const i=T.getCurrentInstance(),o=Cr("color-alpha-slider"),a=T.ref(0),s=T.ref(0),h=T.ref();function d(){if(!r.value||e.vertical)return 0;const O=i.vnode.el,V=e.color.get("alpha");return O?Math.round(V*(O.offsetWidth-r.value.offsetWidth/2)/100):0}function Q(){if(!r.value)return 0;const O=i.vnode.el;if(!e.vertical)return 0;const V=e.color.get("alpha");return O?Math.round(V*(O.offsetHeight-r.value.offsetHeight/2)/100):0}function p(){if(e.color&&e.color.value){const{r:O,g:V,b:k}=e.color.toRgb();return`linear-gradient(to right, rgba(${O}, ${V}, ${k}, 0) 0%, rgba(${O}, ${V}, ${k}, 1) 100%)`}return""}function g(){a.value=d(),s.value=Q(),h.value=p()}T.onMounted(()=>{if(!t.value||!r.value)return;const O={drag:V=>{n(V)},end:V=>{n(V)}};W0(t.value,O),W0(r.value,O),g()}),T.watch(()=>e.color.get("alpha"),()=>g()),T.watch(()=>e.color.value,()=>g());const _=T.computed(()=>[o.b(),o.is("vertical",e.vertical)]),x=T.computed(()=>o.e("bar")),b=T.computed(()=>o.e("thumb")),A=T.computed(()=>({background:h.value})),E=T.computed(()=>({left:w6(a.value),top:w6(s.value)}));return{rootKls:_,barKls:x,barStyle:A,thumbKls:b,thumbStyle:E,update:g}},vz=T.defineComponent({name:"ElColorAlphaSlider"}),xz=T.defineComponent({...vz,props:gz,setup(e,{expose:t}){const r=e,{bar:n,thumb:i,handleDrag:o,handleClick:a}=yz(r),{rootKls:s,barKls:h,barStyle:d,thumbKls:Q,thumbStyle:p,update:g}=_z(r,{bar:n,thumb:i,handleDrag:o});return t({update:g,bar:n,thumb:i}),(_,x)=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(T.unref(s))},[T.createElementVNode("div",{ref_key:"bar",ref:n,class:T.normalizeClass(T.unref(h)),style:T.normalizeStyle(T.unref(d)),onClick:x[0]||(x[0]=(...b)=>T.unref(a)&&T.unref(a)(...b))},null,6),T.createElementVNode("div",{ref_key:"thumb",ref:i,class:T.normalizeClass(T.unref(Q)),style:T.normalizeStyle(T.unref(p))},null,6)],2))}});var bz=Sr(xz,[["__file","alpha-slider.vue"]]);const Lz=T.defineComponent({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(e){const t=Cr("color-hue-slider"),r=T.getCurrentInstance(),n=T.ref(),i=T.ref(),o=T.ref(0),a=T.ref(0),s=T.computed(()=>e.color.get("hue"));T.watch(()=>s.value,()=>{g()});function h(_){_.target!==n.value&&d(_)}function d(_){if(!i.value||!n.value)return;const b=r.vnode.el.getBoundingClientRect(),{clientX:A,clientY:E}=Vf(_);let O;if(e.vertical){let V=E-b.top;V=Math.min(V,b.height-n.value.offsetHeight/2),V=Math.max(n.value.offsetHeight/2,V),O=Math.round((V-n.value.offsetHeight/2)/(b.height-n.value.offsetHeight)*360)}else{let V=A-b.left;V=Math.min(V,b.width-n.value.offsetWidth/2),V=Math.max(n.value.offsetWidth/2,V),O=Math.round((V-n.value.offsetWidth/2)/(b.width-n.value.offsetWidth)*360)}e.color.set("hue",O)}function Q(){if(!n.value)return 0;const _=r.vnode.el;if(e.vertical)return 0;const x=e.color.get("hue");return _?Math.round(x*(_.offsetWidth-n.value.offsetWidth/2)/360):0}function p(){if(!n.value)return 0;const _=r.vnode.el;if(!e.vertical)return 0;const x=e.color.get("hue");return _?Math.round(x*(_.offsetHeight-n.value.offsetHeight/2)/360):0}function g(){o.value=Q(),a.value=p()}return T.onMounted(()=>{if(!i.value||!n.value)return;const _={drag:x=>{d(x)},end:x=>{d(x)}};W0(i.value,_),W0(n.value,_),g()}),{bar:i,thumb:n,thumbLeft:o,thumbTop:a,hueValue:s,handleClick:h,update:g,ns:t}}});function wz(e,t,r,n,i,o){return T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass([e.ns.b(),e.ns.is("vertical",e.vertical)])},[T.createElementVNode("div",{ref:"bar",class:T.normalizeClass(e.ns.e("bar")),onClick:t[0]||(t[0]=(...a)=>e.handleClick&&e.handleClick(...a))},null,2),T.createElementVNode("div",{ref:"thumb",class:T.normalizeClass(e.ns.e("thumb")),style:T.normalizeStyle({left:e.thumbLeft+"px",top:e.thumbTop+"px"})},null,6)],2)}var Ez=Sr(Lz,[["render",wz],["__file","hue-slider.vue"]]);const Mz=Qn({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:U3,popperClass:{type:String,default:""},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},predefine:{type:Er(Array)},validateEvent:{type:Boolean,default:!0}}),Az={[A1]:e=>W1(e)||B3(e),[dc]:e=>W1(e)||B3(e),activeChange:e=>W1(e)||B3(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},eb=Symbol("colorPickerContextKey"),rb=function(e,t,r){return[e,t*r/((e=(2-t)*r)<1?e:2-e)||0,e/2]},Cz=function(e){return typeof e=="string"&&e.includes(".")&&Number.parseFloat(e)===1},Sz=function(e){return typeof e=="string"&&e.includes("%")},R6=function(e,t){Cz(e)&&(e="100%");const r=Sz(e);return e=Math.min(t,Math.max(0,Number.parseFloat(`${e}`))),r&&(e=Number.parseInt(`${e*t}`,10)/100),Math.abs(e-t)<1e-6?1:e%t/Number.parseFloat(t)},nb={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Sc=e=>{e=Math.min(Math.round(e),255);const t=Math.floor(e/16),r=e%16;return`${nb[t]||t}${nb[r]||r}`},ib=function({r:e,g:t,b:r}){return Number.isNaN(+e)||Number.isNaN(+t)||Number.isNaN(+r)?"":`#${Sc(e)}${Sc(t)}${Sc(r)}`},HT={A:10,B:11,C:12,D:13,E:14,F:15},h4=function(e){return e.length===2?(HT[e[0].toUpperCase()]||+e[0])*16+(HT[e[1].toUpperCase()]||+e[1]):HT[e[1].toUpperCase()]||+e[1]},Hz=function(e,t,r){t=t/100,r=r/100;let n=t;const i=Math.max(r,.01);r*=2,t*=r<=1?r:2-r,n*=i<=1?i:2-i;const o=(r+t)/2,a=r===0?2*n/(i+n):2*t/(r+t);return{h:e,s:a*100,v:o*100}},ob=(e,t,r)=>{e=R6(e,255),t=R6(t,255),r=R6(r,255);const n=Math.max(e,t,r),i=Math.min(e,t,r);let o;const a=n,s=n-i,h=n===0?0:s/n;if(n===i)o=0;else{switch(n){case e:{o=(t-r)/s+(t<r?6:0);break}case t:{o=(r-e)/s+2;break}case r:{o=(e-t)/s+4;break}}o/=6}return{h:o*360,s:h*100,v:a*100}},X0=function(e,t,r){e=R6(e,360)*6,t=R6(t,100),r=R6(r,100);const n=Math.floor(e),i=e-n,o=r*(1-t),a=r*(1-i*t),s=r*(1-(1-i)*t),h=n%6,d=[r,a,o,o,s,r][h],Q=[s,r,r,a,o,o][h],p=[o,o,s,r,r,a][h];return{r:Math.round(d*255),g:Math.round(Q*255),b:Math.round(p*255)}};class K0{constructor(t={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this.enableAlpha=!1,this.format="hex",this.value="";for(const r in t)r4(t,r)&&(this[r]=t[r]);t.value?this.fromString(t.value):this.doOnChange()}set(t,r){if(arguments.length===1&&typeof t=="object"){for(const n in t)r4(t,n)&&this.set(n,t[n]);return}this[`_${t}`]=r,this.doOnChange()}get(t){return t==="alpha"?Math.floor(this[`_${t}`]):this[`_${t}`]}toRgb(){return X0(this._hue,this._saturation,this._value)}fromString(t){if(!t){this._hue=0,this._saturation=100,this._value=100,this.doOnChange();return}const r=(n,i,o)=>{this._hue=Math.max(0,Math.min(360,n)),this._saturation=Math.max(0,Math.min(100,i)),this._value=Math.max(0,Math.min(100,o)),this.doOnChange()};if(t.includes("hsl")){const n=t.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));if(n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3){const{h:i,s:o,v:a}=Hz(n[0],n[1],n[2]);r(i,o,a)}}else if(t.includes("hsv")){const n=t.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3&&r(n[0],n[1],n[2])}else if(t.includes("rgb")){const n=t.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));if(n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3){const{h:i,s:o,v:a}=ob(n[0],n[1],n[2]);r(i,o,a)}}else if(t.includes("#")){const n=t.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(n))return;let i,o,a;n.length===3?(i=h4(n[0]+n[0]),o=h4(n[1]+n[1]),a=h4(n[2]+n[2])):(n.length===6||n.length===8)&&(i=h4(n.slice(0,2)),o=h4(n.slice(2,4)),a=h4(n.slice(4,6))),n.length===8?this._alpha=h4(n.slice(6))/255*100:(n.length===3||n.length===6)&&(this._alpha=100);const{h:s,s:h,v:d}=ob(i,o,a);r(s,h,d)}}compare(t){return Math.abs(t._hue-this._hue)<2&&Math.abs(t._saturation-this._saturation)<1&&Math.abs(t._value-this._value)<1&&Math.abs(t._alpha-this._alpha)<1}doOnChange(){const{_hue:t,_saturation:r,_value:n,_alpha:i,format:o}=this;if(this.enableAlpha)switch(o){case"hsl":{const a=rb(t,r/100,n/100);this.value=`hsla(${t}, ${Math.round(a[1]*100)}%, ${Math.round(a[2]*100)}%, ${this.get("alpha")/100})`;break}case"hsv":{this.value=`hsva(${t}, ${Math.round(r)}%, ${Math.round(n)}%, ${this.get("alpha")/100})`;break}case"hex":{this.value=`${ib(X0(t,r,n))}${Sc(i*255/100)}`;break}default:{const{r:a,g:s,b:h}=X0(t,r,n);this.value=`rgba(${a}, ${s}, ${h}, ${this.get("alpha")/100})`}}else switch(o){case"hsl":{const a=rb(t,r/100,n/100);this.value=`hsl(${t}, ${Math.round(a[1]*100)}%, ${Math.round(a[2]*100)}%)`;break}case"hsv":{this.value=`hsv(${t}, ${Math.round(r)}%, ${Math.round(n)}%)`;break}case"rgb":{const{r:a,g:s,b:h}=X0(t,r,n);this.value=`rgb(${a}, ${s}, ${h})`;break}default:this.value=ib(X0(t,r,n))}}}const Oz=T.defineComponent({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0}},setup(e){const t=Cr("color-predefine"),{currentColor:r}=T.inject(eb),n=T.ref(o(e.colors,e.color));T.watch(()=>r.value,a=>{const s=new K0;s.fromString(a),n.value.forEach(h=>{h.selected=s.compare(h)})}),T.watchEffect(()=>{n.value=o(e.colors,e.color)});function i(a){e.color.fromString(e.colors[a])}function o(a,s){return a.map(h=>{const d=new K0;return d.enableAlpha=!0,d.format="rgba",d.fromString(h),d.selected=d.value===s.value,d})}return{rgbaColors:n,handleSelect:i,ns:t}}}),Vz=["onClick"];function Dz(e,t,r,n,i,o){return T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(e.ns.b())},[T.createElementVNode("div",{class:T.normalizeClass(e.ns.e("colors"))},[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.rgbaColors,(a,s)=>(T.openBlock(),T.createElementBlock("div",{key:e.colors[s],class:T.normalizeClass([e.ns.e("color-selector"),e.ns.is("alpha",a._alpha<100),{selected:a.selected}]),onClick:h=>e.handleSelect(s)},[T.createElementVNode("div",{style:T.normalizeStyle({backgroundColor:a.value})},null,4)],10,Vz))),128))],2)],2)}var Pz=Sr(Oz,[["render",Dz],["__file","predefine.vue"]]);const Iz=T.defineComponent({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(e){const t=Cr("color-svpanel"),r=T.getCurrentInstance(),n=T.ref(0),i=T.ref(0),o=T.ref("hsl(0, 100%, 50%)"),a=T.computed(()=>{const d=e.color.get("hue"),Q=e.color.get("value");return{hue:d,value:Q}});function s(){const d=e.color.get("saturation"),Q=e.color.get("value"),p=r.vnode.el,{clientWidth:g,clientHeight:_}=p;i.value=d*g/100,n.value=(100-Q)*_/100,o.value=`hsl(${e.color.get("hue")}, 100%, 50%)`}function h(d){const p=r.vnode.el.getBoundingClientRect(),{clientX:g,clientY:_}=Vf(d);let x=g-p.left,b=_-p.top;x=Math.max(0,x),x=Math.min(x,p.width),b=Math.max(0,b),b=Math.min(b,p.height),i.value=x,n.value=b,e.color.set({saturation:x/p.width*100,value:100-b/p.height*100})}return T.watch(()=>a.value,()=>{s()}),T.onMounted(()=>{W0(r.vnode.el,{drag:d=>{h(d)},end:d=>{h(d)}}),s()}),{cursorTop:n,cursorLeft:i,background:o,colorValue:a,handleDrag:h,update:s,ns:t}}}),kz=[T.createElementVNode("div",null,null,-1)];function Rz(e,t,r,n,i,o){return T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(e.ns.b()),style:T.normalizeStyle({backgroundColor:e.background})},[T.createElementVNode("div",{class:T.normalizeClass(e.ns.e("white"))},null,2),T.createElementVNode("div",{class:T.normalizeClass(e.ns.e("black"))},null,2),T.createElementVNode("div",{class:T.normalizeClass(e.ns.e("cursor")),style:T.normalizeStyle({top:e.cursorTop+"px",left:e.cursorLeft+"px"})},kz,6)],6)}var Bz=Sr(Iz,[["render",Rz],["__file","sv-panel.vue"]]);const Nz=["onKeydown"],Fz=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"],jz=T.defineComponent({name:"ElColorPicker"}),zz=T.defineComponent({...jz,props:Mz,emits:Az,setup(e,{expose:t,emit:r}){const n=e,{t:i}=fc(),o=Cr("color"),{formItem:a}=G3(),s=$3(),h=V6(),{inputId:d,isLabeledByFormItem:Q}=D6(n,{formItemContext:a}),p=T.ref(),g=T.ref(),_=T.ref(),x=T.ref(),b=T.ref(),A=T.ref(),{isFocused:E,handleFocus:O,handleBlur:V}=dT(b,{beforeBlur(zt){var de;return(de=x.value)==null?void 0:de.isFocusInsideContent(zt)},afterBlur(){me(!1),qt()}}),k=zt=>{if(h.value)return ue();O(zt)};let j=!0;const $=T.reactive(new K0({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue})),U=T.ref(!1),J=T.ref(!1),tt=T.ref(""),rt=T.computed(()=>!n.modelValue&&!J.value?"transparent":ie($,n.showAlpha)),st=T.computed(()=>!n.modelValue&&!J.value?"":$.value),pt=T.computed(()=>Q.value?void 0:n.label||i("el.colorpicker.defaultLabel")),St=T.computed(()=>Q.value?a==null?void 0:a.labelId:void 0),$t=T.computed(()=>[o.b("picker"),o.is("disabled",h.value),o.bm("picker",s.value),o.is("focused",E.value)]);function ie(zt,de){if(!(zt instanceof K0))throw new TypeError("color should be instance of _color Class");const{r:Re,g:Ce,b:He}=zt.toRgb();return de?`rgba(${Re}, ${Ce}, ${He}, ${zt.get("alpha")/100})`:`rgb(${Re}, ${Ce}, ${He})`}function me(zt){U.value=zt}const Ft=mv(me,100,{leading:!0});function he(){h.value||me(!0)}function cr(){Ft(!1),qt()}function qt(){T.nextTick(()=>{n.modelValue?$.fromString(n.modelValue):($.value="",T.nextTick(()=>{J.value=!1}))})}function le(){h.value||Ft(!U.value)}function Qe(){$.fromString(tt.value)}function xe(){const zt=$.value;r(A1,zt),r("change",zt),n.validateEvent&&(a==null||a.validate("change").catch(de=>K1(de))),Ft(!1),T.nextTick(()=>{const de=new K0({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue});$.compare(de)||qt()})}function Fe(){Ft(!1),r(A1,null),r("change",null),n.modelValue!==null&&n.validateEvent&&(a==null||a.validate("change").catch(zt=>K1(zt))),qt()}function Ue(zt){if(U.value&&(cr(),E.value)){const de=new FocusEvent("focus",zt);V(de)}}function je(zt){zt.preventDefault(),zt.stopPropagation(),me(!1),qt()}function Bt(zt){switch(zt.code){case Ki.enter:case Ki.space:zt.preventDefault(),zt.stopPropagation(),he(),A.value.focus();break;case Ki.esc:je(zt);break}}function Zt(){b.value.focus()}function ue(){b.value.blur()}return T.onMounted(()=>{n.modelValue&&(tt.value=st.value)}),T.watch(()=>n.modelValue,zt=>{zt?zt&&zt!==$.value&&(j=!1,$.fromString(zt)):J.value=!1}),T.watch(()=>st.value,zt=>{tt.value=zt,j&&r("activeChange",zt),j=!0}),T.watch(()=>$.value,()=>{!n.modelValue&&!J.value&&(J.value=!0)}),T.watch(()=>U.value,()=>{T.nextTick(()=>{var zt,de,Re;(zt=p.value)==null||zt.update(),(de=g.value)==null||de.update(),(Re=_.value)==null||Re.update()})}),T.provide(eb,{currentColor:st}),t({color:$,show:he,hide:cr,focus:Zt,blur:ue}),(zt,de)=>(T.openBlock(),T.createBlock(T.unref(bT),{ref_key:"popper",ref:x,visible:U.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[T.unref(o).be("picker","panel"),T.unref(o).b("dropdown"),zt.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",transition:`${T.unref(o).namespace.value}-zoom-in-top`,persistent:"",onHide:de[2]||(de[2]=Re=>me(!1))},{content:T.withCtx(()=>[T.withDirectives((T.openBlock(),T.createElementBlock("div",{onKeydown:T.withKeys(je,["esc"])},[T.createElementVNode("div",{class:T.normalizeClass(T.unref(o).be("dropdown","main-wrapper"))},[T.createVNode(Ez,{ref_key:"hue",ref:p,class:"hue-slider",color:T.unref($),vertical:""},null,8,["color"]),T.createVNode(Bz,{ref_key:"sv",ref:g,color:T.unref($)},null,8,["color"])],2),zt.showAlpha?(T.openBlock(),T.createBlock(bz,{key:0,ref_key:"alpha",ref:_,color:T.unref($)},null,8,["color"])):T.createCommentVNode("v-if",!0),zt.predefine?(T.openBlock(),T.createBlock(Pz,{key:1,ref:"predefine",color:T.unref($),colors:zt.predefine},null,8,["color","colors"])):T.createCommentVNode("v-if",!0),T.createElementVNode("div",{class:T.normalizeClass(T.unref(o).be("dropdown","btns"))},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(o).be("dropdown","value"))},[T.createVNode(T.unref(vc),{ref_key:"inputRef",ref:A,modelValue:tt.value,"onUpdate:modelValue":de[0]||(de[0]=Re=>tt.value=Re),"validate-event":!1,size:"small",onKeyup:T.withKeys(Qe,["enter"]),onBlur:Qe},null,8,["modelValue","onKeyup"])],2),T.createVNode(T.unref(na),{class:T.normalizeClass(T.unref(o).be("dropdown","link-btn")),text:"",size:"small",onClick:Fe},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(T.unref(i)("el.colorpicker.clear")),1)]),_:1},8,["class"]),T.createVNode(T.unref(na),{plain:"",size:"small",class:T.normalizeClass(T.unref(o).be("dropdown","btn")),onClick:xe},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(T.unref(i)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,Nz)),[[T.unref(Bx),Ue]])]),default:T.withCtx(()=>[T.createElementVNode("div",{id:T.unref(d),ref_key:"triggerRef",ref:b,class:T.normalizeClass(T.unref($t)),role:"button","aria-label":T.unref(pt),"aria-labelledby":T.unref(St),"aria-description":T.unref(i)("el.colorpicker.description",{color:zt.modelValue||""}),"aria-disabled":T.unref(h),tabindex:T.unref(h)?-1:zt.tabindex,onKeydown:Bt,onFocus:k,onBlur:de[1]||(de[1]=(...Re)=>T.unref(V)&&T.unref(V)(...Re))},[T.unref(h)?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(T.unref(o).be("picker","mask"))},null,2)):T.createCommentVNode("v-if",!0),T.createElementVNode("div",{class:T.normalizeClass(T.unref(o).be("picker","trigger")),onClick:le},[T.createElementVNode("span",{class:T.normalizeClass([T.unref(o).be("picker","color"),T.unref(o).is("alpha",zt.showAlpha)])},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(o).be("picker","color-inner")),style:T.normalizeStyle({backgroundColor:T.unref(rt)})},[T.withDirectives(T.createVNode(T.unref(yi),{class:T.normalizeClass([T.unref(o).be("picker","icon"),T.unref(o).is("icon-arrow-down")])},{default:T.withCtx(()=>[T.createVNode(T.unref(F3))]),_:1},8,["class"]),[[T.vShow,zt.modelValue||J.value]]),T.withDirectives(T.createVNode(T.unref(yi),{class:T.normalizeClass([T.unref(o).be("picker","empty"),T.unref(o).is("icon-close")])},{default:T.withCtx(()=>[T.createVNode(T.unref(k0))]),_:1},8,["class"]),[[T.vShow,!zt.modelValue&&!J.value]])],6)],2)],2)],42,Fz)]),_:1},8,["visible","popper-class","transition"]))}});var Uz=Sr(zz,[["__file","color-picker.vue"]]);const $z=Xi(Uz),Gz=T.defineComponent({name:"ElContainer"}),Zz=T.defineComponent({...Gz,props:{direction:{type:String}},setup(e){const t=e,r=T.useSlots(),n=Cr("container"),i=T.computed(()=>t.direction==="vertical"?!0:t.direction==="horizontal"?!1:r&&r.default?r.default().some(a=>{const s=a.type.name;return s==="ElHeader"||s==="ElFooter"}):!1);return(o,a)=>(T.openBlock(),T.createElementBlock("section",{class:T.normalizeClass([T.unref(n).b(),T.unref(n).is("vertical",T.unref(i))])},[T.renderSlot(o.$slots,"default")],2))}});var qz=Sr(Zz,[["__file","container.vue"]]);const Wz=T.defineComponent({name:"ElAside"}),Xz=T.defineComponent({...Wz,props:{width:{type:String,default:null}},setup(e){const t=e,r=Cr("aside"),n=T.computed(()=>t.width?r.cssVarBlock({width:t.width}):{});return(i,o)=>(T.openBlock(),T.createElementBlock("aside",{class:T.normalizeClass(T.unref(r).b()),style:T.normalizeStyle(T.unref(n))},[T.renderSlot(i.$slots,"default")],6))}});var ab=Sr(Xz,[["__file","aside.vue"]]);const Kz=T.defineComponent({name:"ElFooter"}),Yz=T.defineComponent({...Kz,props:{height:{type:String,default:null}},setup(e){const t=e,r=Cr("footer"),n=T.computed(()=>t.height?r.cssVarBlock({height:t.height}):{});return(i,o)=>(T.openBlock(),T.createElementBlock("footer",{class:T.normalizeClass(T.unref(r).b()),style:T.normalizeStyle(T.unref(n))},[T.renderSlot(i.$slots,"default")],6))}});var sb=Sr(Yz,[["__file","footer.vue"]]);const Jz=T.defineComponent({name:"ElHeader"}),tU=T.defineComponent({...Jz,props:{height:{type:String,default:null}},setup(e){const t=e,r=Cr("header"),n=T.computed(()=>t.height?r.cssVarBlock({height:t.height}):{});return(i,o)=>(T.openBlock(),T.createElementBlock("header",{class:T.normalizeClass(T.unref(r).b()),style:T.normalizeStyle(T.unref(n))},[T.renderSlot(i.$slots,"default")],6))}});var lb=Sr(tU,[["__file","header.vue"]]);const eU=T.defineComponent({name:"ElMain"}),rU=T.defineComponent({...eU,setup(e){const t=Cr("main");return(r,n)=>(T.openBlock(),T.createElementBlock("main",{class:T.normalizeClass(T.unref(t).b())},[T.renderSlot(r.$slots,"default")],2))}});var cb=Sr(rU,[["__file","main.vue"]]);const nU=Xi(qz,{Aside:ab,Footer:sb,Header:lb,Main:cb});_o(ab),_o(sb),_o(lb);const ub=_o(cb),iU=T.defineComponent({inheritAttrs:!1});function oU(e,t,r,n,i,o){return T.renderSlot(e.$slots,"default")}var aU=Sr(iU,[["render",oU],["__file","collection.vue"]]);const sU=T.defineComponent({name:"ElCollectionItem",inheritAttrs:!1});function lU(e,t,r,n,i,o){return T.renderSlot(e.$slots,"default")}var cU=Sr(sU,[["render",lU],["__file","collection-item.vue"]]);const uU="data-el-collection-item",hU=e=>{const t=`El${e}Collection`,r=`${t}Item`,n=Symbol(t),i=Symbol(r),o={...aU,name:t,setup(){const s=T.ref(null),h=new Map,d=()=>{const Q=T.unref(s);if(!Q)return[];const p=Array.from(Q.querySelectorAll(`[${uU}]`));return[...h.values()].sort((_,x)=>p.indexOf(_.ref)-p.indexOf(x.ref))};T.provide(n,{itemMap:h,getItems:d,collectionRef:s})}},a={...cU,name:r,setup(s,{attrs:h}){const d=T.ref(null),Q=T.inject(n,void 0);T.provide(i,{collectionItemRef:d}),T.onMounted(()=>{const p=T.unref(d);p&&Q.itemMap.set(p,{ref:p,...h})}),T.onBeforeUnmount(()=>{const p=T.unref(d);Q.itemMap.delete(p)})}};return{COLLECTION_INJECTION_KEY:n,COLLECTION_ITEM_INJECTION_KEY:i,ElCollection:o,ElCollectionItem:a}},OT=Qn({trigger:Z0.trigger,effect:{...E2.effect,default:"light"},type:{type:Er(String)},placement:{type:Er(String),default:"bottom"},popperOptions:{type:Er(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:Er([Number,String]),default:0},maxHeight:{type:Er([Number,String]),default:""},popperClass:{type:String,default:""},disabled:{type:Boolean,default:!1},role:{type:String,default:"menu"},buttonProps:{type:Er(Object)},teleported:E2.teleported});Qn({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:j3}}),Qn({onKeydown:{type:Er(Function)}}),hU("Dropdown");const hb=Symbol("ElSelectGroup"),Hc=Symbol("ElSelect");function dU(e,t){const r=T.inject(Hc),n=T.inject(hb,{disabled:!1}),i=T.computed(()=>r.props.multiple?Q(r.props.modelValue,e.value):Q([r.props.modelValue],e.value)),o=T.computed(()=>{if(r.props.multiple){const _=r.props.modelValue||[];return!i.value&&_.length>=r.props.multipleLimit&&r.props.multipleLimit>0}else return!1}),a=T.computed(()=>e.label||(gi(e.value)?"":e.value)),s=T.computed(()=>e.value||e.label||""),h=T.computed(()=>e.disabled||t.groupDisabled||o.value),d=T.getCurrentInstance(),Q=(_=[],x)=>{if(gi(e.value)){const b=r.props.valueKey;return _&&_.some(A=>T.toRaw(Ua(A,b))===Ua(x,b))}else return _&&_.includes(x)},p=()=>{!e.disabled&&!n.disabled&&(r.states.hoveringIndex=r.optionsArray.indexOf(d.proxy))},g=_=>{const x=new RegExp(CR(_),"i");t.visible=x.test(a.value)||e.created};return T.watch(()=>a.value,()=>{!e.created&&!r.props.remote&&r.setSelected()}),T.watch(()=>e.value,(_,x)=>{const{remote:b,valueKey:A}=r.props;if(V0(_,x)||(r.onOptionDestroy(x,d.proxy),r.onOptionCreate(d.proxy)),!e.created&&!b){if(A&&gi(_)&&gi(x)&&_[A]===x[A])return;r.setSelected()}}),T.watch(()=>n.disabled,()=>{t.groupDisabled=n.disabled},{immediate:!0}),{select:r,currentLabel:a,currentValue:s,itemSelected:i,isDisabled:h,hoverItem:p,updateOption:g}}const fU=T.defineComponent({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=Cr("select"),r=$0(),n=T.computed(()=>[t.be("dropdown","item"),t.is("disabled",T.unref(s)),t.is("selected",T.unref(a)),t.is("hovering",T.unref(g))]),i=T.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:o,itemSelected:a,isDisabled:s,select:h,hoverItem:d,updateOption:Q}=dU(e,i),{visible:p,hover:g}=T.toRefs(i),_=T.getCurrentInstance().proxy;h.onOptionCreate(_),T.onBeforeUnmount(()=>{const b=_.value,{selected:A}=h.states,O=(h.props.multiple?A:[A]).some(V=>V.value===_.value);T.nextTick(()=>{h.states.cachedOptions.get(b)===_&&!O&&h.states.cachedOptions.delete(b)}),h.onOptionDestroy(b,_)});function x(){e.disabled!==!0&&i.groupDisabled!==!0&&h.handleOptionSelect(_)}return{ns:t,id:r,containerKls:n,currentLabel:o,itemSelected:a,isDisabled:s,select:h,hoverItem:d,updateOption:Q,visible:p,hover:g,selectOptionClick:x,states:i}}}),TU=["id","aria-disabled","aria-selected"];function QU(e,t,r,n,i,o){return T.withDirectives((T.openBlock(),T.createElementBlock("li",{id:e.id,class:T.normalizeClass(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMouseenter:t[0]||(t[0]=(...a)=>e.hoverItem&&e.hoverItem(...a)),onClick:t[1]||(t[1]=T.withModifiers((...a)=>e.selectOptionClick&&e.selectOptionClick(...a),["stop"]))},[T.renderSlot(e.$slots,"default",{},()=>[T.createElementVNode("span",null,T.toDisplayString(e.currentLabel),1)])],42,TU)),[[T.vShow,e.visible]])}var VT=Sr(fU,[["render",QU],["__file","option.vue"]]);const pU=T.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=T.inject(Hc),t=Cr("select"),r=T.computed(()=>e.props.popperClass),n=T.computed(()=>e.props.multiple),i=T.computed(()=>e.props.fitInputWidth),o=T.ref("");function a(){var s;o.value=`${(s=e.selectRef)==null?void 0:s.offsetWidth}px`}return T.onMounted(()=>{a(),Fa(e.selectRef,a)}),{ns:t,minWidth:o,popperClass:r,isMultiple:n,isFitInputWidth:i}}});function mU(e,t,r,n,i,o){return T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:T.normalizeStyle({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(e.ns.be("dropdown","header"))},[T.renderSlot(e.$slots,"header")],2)):T.createCommentVNode("v-if",!0),T.renderSlot(e.$slots,"default"),e.$slots.footer?(T.openBlock(),T.createElementBlock("div",{key:1,class:T.normalizeClass(e.ns.be("dropdown","footer"))},[T.renderSlot(e.$slots,"footer")],2)):T.createCommentVNode("v-if",!0)],6)}var gU=Sr(pU,[["render",mU],["__file","select-dropdown.vue"]]);function yU(e){const t=T.ref(!1);return{handleCompositionStart:()=>{t.value=!0},handleCompositionUpdate:o=>{const a=o.target.value,s=a[a.length-1]||"";t.value=!Av(s)},handleCompositionEnd:o=>{t.value&&(t.value=!1,Y2(e)&&e(o))}}}const _U=11,vU=(e,t)=>{const{t:r}=fc(),n=$0(),i=Cr("select"),o=Cr("input"),a=T.reactive({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:e.multiple?[]:{},selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1});Cv({from:"suffixTransition",replacement:"override style scheme",version:"2.3.0",scope:"props",ref:"https://element-plus.org/en-US/component/select.html#select-attributes"},T.computed(()=>e.suffixTransition===!1));const s=T.ref(null),h=T.ref(null),d=T.ref(null),Q=T.ref(null),p=T.ref(null),g=T.ref(null),_=T.ref(null),x=T.ref(null),b=T.ref(null),A=T.ref(null),E=T.ref(null),O=T.ref(null),{wrapperRef:V,isFocused:k,handleFocus:j,handleBlur:$}=dT(p,{afterFocus(){e.automaticDropdown&&!U.value&&(U.value=!0,a.menuVisibleOnFocus=!0)},beforeBlur(Ot){var Kt,Ve;return((Kt=d.value)==null?void 0:Kt.isFocusInsideContent(Ot))||((Ve=Q.value)==null?void 0:Ve.isFocusInsideContent(Ot))},afterBlur(){U.value=!1,a.menuVisibleOnFocus=!1}}),U=T.ref(!1),J=T.ref(),{form:tt,formItem:rt}=G3(),{inputId:st}=D6(e,{formItemContext:rt}),pt=T.computed(()=>e.disabled||(tt==null?void 0:tt.disabled)),St=T.computed(()=>e.multiple?Vi(e.modelValue)&&e.modelValue.length>0:e.modelValue!==void 0&&e.modelValue!==null&&e.modelValue!==""),$t=T.computed(()=>e.clearable&&!pt.value&&a.inputHovering&&St.value),ie=T.computed(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),me=T.computed(()=>i.is("reverse",ie.value&&U.value&&e.suffixTransition)),Ft=T.computed(()=>(rt==null?void 0:rt.validateState)||""),he=T.computed(()=>Ev[Ft.value]),cr=T.computed(()=>e.remote?300:0),qt=T.computed(()=>e.loading?e.loadingText||r("el.select.loading"):e.remote&&!a.inputValue&&a.options.size===0?!1:e.filterable&&a.inputValue&&a.options.size>0&&le.value===0?e.noMatchText||r("el.select.noMatch"):a.options.size===0?e.noDataText||r("el.select.noData"):null),le=T.computed(()=>Qe.value.filter(Ot=>Ot.visible).length),Qe=T.computed(()=>{const Ot=Array.from(a.options.values()),Kt=[];return a.optionValues.forEach(Ve=>{const $e=Ot.findIndex(Qr=>Qr.value===Ve);$e>-1&&Kt.push(Ot[$e])}),Kt.length>=Ot.length?Kt:Ot}),xe=T.computed(()=>Array.from(a.cachedOptions.values())),Fe=T.computed(()=>{const Ot=Qe.value.filter(Kt=>!Kt.created).some(Kt=>Kt.currentLabel===a.inputValue);return e.filterable&&e.allowCreate&&a.inputValue!==""&&!Ot}),Ue=()=>{e.filterable&&Y2(e.filterMethod)||e.filterable&&e.remote&&Y2(e.remoteMethod)||Qe.value.forEach(Ot=>{Ot.updateOption(a.inputValue)})},je=$3(),Bt=T.computed(()=>["small"].includes(je.value)?"small":"default"),Zt=T.computed({get(){return U.value&&qt.value!==!1},set(Ot){U.value=Ot}}),ue=T.computed(()=>Vi(e.modelValue)?e.modelValue.length===0&&!a.inputValue:e.filterable?!a.inputValue:!0),zt=T.computed(()=>{var Ot;const Kt=(Ot=e.placeholder)!=null?Ot:r("el.select.placeholder");return e.multiple||!St.value?Kt:a.selectedLabel});T.watch(()=>e.modelValue,(Ot,Kt)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(a.inputValue="",de("")),Ce(),!V0(Ot,Kt)&&e.validateEvent&&(rt==null||rt.validate("change").catch(Ve=>K1(Ve)))},{flush:"post",deep:!0}),T.watch(()=>U.value,Ot=>{Ot?de(a.inputValue):(a.inputValue="",a.previousQuery=null,a.isBeforeHide=!0),t("visible-change",Ot)}),T.watch(()=>a.options.entries(),()=>{var Ot;if(!q1)return;const Kt=((Ot=s.value)==null?void 0:Ot.querySelectorAll("input"))||[];(!e.filterable&&!e.defaultFirstOption&&!D0(e.modelValue)||!Array.from(Kt).includes(document.activeElement))&&Ce(),e.defaultFirstOption&&(e.filterable||e.remote)&&le.value&&Re()},{flush:"post"}),T.watch(()=>a.hoveringIndex,Ot=>{X1(Ot)&&Ot>-1?J.value=Qe.value[Ot]||{}:J.value={},Qe.value.forEach(Kt=>{Kt.hover=J.value===Kt})}),T.watchEffect(()=>{a.isBeforeHide||Ue()});const de=Ot=>{a.previousQuery!==Ot&&(a.previousQuery=Ot,e.filterable&&Y2(e.filterMethod)?e.filterMethod(Ot):e.filterable&&e.remote&&Y2(e.remoteMethod)&&e.remoteMethod(Ot),e.defaultFirstOption&&(e.filterable||e.remote)&&le.value?T.nextTick(Re):T.nextTick(Pe))},Re=()=>{const Ot=Qe.value.filter($e=>$e.visible&&!$e.disabled&&!$e.states.groupDisabled),Kt=Ot.find($e=>$e.created),Ve=Ot[0];a.hoveringIndex=l1(Qe.value,Kt||Ve)},Ce=()=>{if(e.multiple)a.selectedLabel="";else{const Kt=He(e.modelValue);a.selectedLabel=Kt.currentLabel,a.selected=Kt;return}const Ot=[];Vi(e.modelValue)&&e.modelValue.forEach(Kt=>{Ot.push(He(Kt))}),a.selected=Ot},He=Ot=>{let Kt;const Ve=Df(Ot).toLowerCase()==="object",$e=Df(Ot).toLowerCase()==="null",Qr=Df(Ot).toLowerCase()==="undefined";for(let tn=a.cachedOptions.size-1;tn>=0;tn--){const Ge=xe.value[tn];if(Ve?Ua(Ge.value,e.valueKey)===Ua(Ot,e.valueKey):Ge.value===Ot){Kt={value:Ot,currentLabel:Ge.currentLabel,isDisabled:Ge.isDisabled};break}}if(Kt)return Kt;const Ar=Ve?Ot.label:!$e&&!Qr?Ot:"";return{value:Ot,currentLabel:Ar}},Pe=()=>{e.multiple?a.selected.length>0?a.hoveringIndex=Math.min(...a.selected.map(Ot=>Qe.value.findIndex(Kt=>mt(Kt)===mt(Ot)))):a.hoveringIndex=-1:a.hoveringIndex=Qe.value.findIndex(Ot=>mt(Ot)===mt(a.selected))},ze=()=>{a.selectionWidth=h.value.getBoundingClientRect().width},Ut=()=>{a.calculatorWidth=g.value.getBoundingClientRect().width},Vr=()=>{a.collapseItemWidth=E.value.getBoundingClientRect().width},pn=()=>{var Ot,Kt;(Kt=(Ot=d.value)==null?void 0:Ot.updatePopper)==null||Kt.call(Ot)},Ke=()=>{var Ot,Kt;(Kt=(Ot=Q.value)==null?void 0:Ot.updatePopper)==null||Kt.call(Ot)},_r=()=>{a.inputValue.length>0&&!U.value&&(U.value=!0),de(a.inputValue)},Nn=Ot=>{if(a.inputValue=Ot.target.value,e.remote)H1();else return _r()},H1=mv(()=>{_r()},cr.value),Ln=Ot=>{V0(e.modelValue,Ot)||t(dc,Ot)},pe=Ot=>xR(Ot,Kt=>!a.disabledOptions.has(Kt)),ur=Ot=>{if(e.multiple&&Ot.code!==Ki.delete&&Ot.target.value.length<=0){const Kt=e.modelValue.slice(),Ve=pe(Kt);if(Ve<0)return;Kt.splice(Ve,1),t(A1,Kt),Ln(Kt)}},Yr=(Ot,Kt)=>{const Ve=a.selected.indexOf(Kt);if(Ve>-1&&!pt.value){const $e=e.modelValue.slice();$e.splice(Ve,1),t(A1,$e),Ln($e),t("remove-tag",Kt.value)}Ot.stopPropagation(),ar()},wn=Ot=>{Ot.stopPropagation();const Kt=e.multiple?[]:"";if(!W1(Kt))for(const Ve of a.selected)Ve.isDisabled&&Kt.push(Ve.value);t(A1,Kt),Ln(Kt),a.hoveringIndex=-1,U.value=!1,t("clear"),ar()},fe=Ot=>{if(e.multiple){const Kt=(e.modelValue||[]).slice(),Ve=l1(Kt,Ot.value);Ve>-1?Kt.splice(Ve,1):(e.multipleLimit<=0||Kt.length<e.multipleLimit)&&Kt.push(Ot.value),t(A1,Kt),Ln(Kt),Ot.created&&de(""),e.filterable&&!e.reserveKeyword&&(a.inputValue="")}else t(A1,Ot.value),Ln(Ot.value),U.value=!1;ar(),!U.value&&T.nextTick(()=>{mn(Ot)})},l1=(Ot=[],Kt)=>{if(!gi(Kt))return Ot.indexOf(Kt);const Ve=e.valueKey;let $e=-1;return Ot.some((Qr,Ar)=>T.toRaw(Ua(Qr,Ve))===Ua(Kt,Ve)?($e=Ar,!0):!1),$e},mn=Ot=>{var Kt,Ve,$e,Qr,Ar;const Gr=Vi(Ot)?Ot[0]:Ot;let tn=null;if(Gr!=null&&Gr.value){const Ge=Qe.value.filter(Ur=>Ur.value===Gr.value);Ge.length>0&&(tn=Ge[0].$el)}if(d.value&&tn){const Ge=(Qr=($e=(Ve=(Kt=d.value)==null?void 0:Kt.popperRef)==null?void 0:Ve.contentRef)==null?void 0:$e.querySelector)==null?void 0:Qr.call($e,`.${i.be("dropdown","wrap")}`);Ge&&OR(Ge,tn)}(Ar=O.value)==null||Ar.handleScroll()},ui=Ot=>{a.options.set(Ot.value,Ot),a.cachedOptions.set(Ot.value,Ot),Ot.disabled&&a.disabledOptions.set(Ot.value,Ot)},Fn=(Ot,Kt)=>{a.options.get(Ot)===Kt&&a.options.delete(Ot)},{handleCompositionStart:we,handleCompositionUpdate:yr,handleCompositionEnd:dr}=yU(Ot=>Nn(Ot)),En=T.computed(()=>{var Ot,Kt;return(Kt=(Ot=d.value)==null?void 0:Ot.popperRef)==null?void 0:Kt.contentRef}),T1=()=>{T.nextTick(()=>mn(a.selected))},ar=()=>{var Ot;(Ot=p.value)==null||Ot.focus()},Ri=()=>{yt()},hn=Ot=>{wn(Ot)},yt=Ot=>{if(U.value=!1,k.value){const Kt=new FocusEvent("focus",Ot);T.nextTick(()=>$(Kt))}},it=()=>{a.inputValue.length>0?a.inputValue="":U.value=!1},at=()=>{pt.value||(a.menuVisibleOnFocus?a.menuVisibleOnFocus=!1:U.value=!U.value)},dt=()=>{U.value?Qe.value[a.hoveringIndex]&&fe(Qe.value[a.hoveringIndex]):at()},mt=Ot=>gi(Ot.value)?Ua(Ot.value,e.valueKey):Ot.value,At=T.computed(()=>Qe.value.filter(Ot=>Ot.visible).every(Ot=>Ot.disabled)),Ht=T.computed(()=>e.multiple?e.collapseTags?a.selected.slice(0,e.maxCollapseTags):a.selected:[]),Dt=T.computed(()=>e.multiple?e.collapseTags?a.selected.slice(e.maxCollapseTags):[]:[]),Et=Ot=>{if(!U.value){U.value=!0;return}if(!(a.options.size===0||le.value===0)&&!At.value){Ot==="next"?(a.hoveringIndex++,a.hoveringIndex===a.options.size&&(a.hoveringIndex=0)):Ot==="prev"&&(a.hoveringIndex--,a.hoveringIndex<0&&(a.hoveringIndex=a.options.size-1));const Kt=Qe.value[a.hoveringIndex];(Kt.disabled===!0||Kt.states.groupDisabled===!0||!Kt.visible)&&Et(Ot),T.nextTick(()=>mn(J.value))}},kt=()=>{if(!h.value)return 0;const Ot=window.getComputedStyle(h.value);return Number.parseFloat(Ot.gap||"6px")},ne=T.computed(()=>{const Ot=kt();return{maxWidth:`${E.value&&e.maxCollapseTags===1?a.selectionWidth-a.collapseItemWidth-Ot:a.selectionWidth}px`}}),Xt=T.computed(()=>({maxWidth:`${a.selectionWidth}px`})),Jt=T.computed(()=>({width:`${Math.max(a.calculatorWidth,_U)}px`}));return e.multiple&&!Vi(e.modelValue)&&t(A1,[]),!e.multiple&&Vi(e.modelValue)&&t(A1,""),Fa(h,ze),Fa(g,Ut),Fa(b,pn),Fa(V,pn),Fa(A,Ke),Fa(E,Vr),T.onMounted(()=>{Ce()}),{inputId:st,contentId:n,nsSelect:i,nsInput:o,states:a,isFocused:k,expanded:U,optionsArray:Qe,hoverOption:J,selectSize:je,filteredOptionsCount:le,resetCalculatorWidth:Ut,updateTooltip:pn,updateTagTooltip:Ke,debouncedOnInputChange:H1,onInput:Nn,deletePrevTag:ur,deleteTag:Yr,deleteSelected:wn,handleOptionSelect:fe,scrollToOption:mn,hasModelValue:St,shouldShowPlaceholder:ue,currentPlaceholder:zt,showClose:$t,iconComponent:ie,iconReverse:me,validateState:Ft,validateIcon:he,showNewOption:Fe,updateOptions:Ue,collapseTagSize:Bt,setSelected:Ce,selectDisabled:pt,emptyText:qt,handleCompositionStart:we,handleCompositionUpdate:yr,handleCompositionEnd:dr,onOptionCreate:ui,onOptionDestroy:Fn,handleMenuEnter:T1,handleFocus:j,focus:ar,blur:Ri,handleBlur:$,handleClearClick:hn,handleClickOutside:yt,handleEsc:it,toggleMenu:at,selectOption:dt,getValueKey:mt,navigateOptions:Et,dropdownMenuVisible:Zt,showTagList:Ht,collapseTagList:Dt,tagStyle:ne,collapseTagStyle:Xt,inputStyle:Jt,popperRef:En,inputRef:p,tooltipRef:d,tagTooltipRef:Q,calculatorRef:g,prefixRef:_,suffixRef:x,selectRef:s,wrapperRef:V,selectionRef:h,scrollbarRef:O,menuRef:b,tagMenuRef:A,collapseItemRef:E}};var xU=T.defineComponent({name:"ElOptions",setup(e,{slots:t}){const r=T.inject(Hc);let n=[];return()=>{var i,o;const a=(i=t.default)==null?void 0:i.call(t),s=[];function h(d){Vi(d)&&d.forEach(Q=>{var p,g,_,x;const b=(p=(Q==null?void 0:Q.type)||{})==null?void 0:p.name;b==="ElOptionGroup"?h(!W1(Q.children)&&!Vi(Q.children)&&Y2((g=Q.children)==null?void 0:g.default)?(_=Q.children)==null?void 0:_.default():Q.children):b==="ElOption"?s.push((x=Q.props)==null?void 0:x.value):Vi(Q.children)&&h(Q.children)})}return a.length&&h((o=a[0])==null?void 0:o.children),V0(s,n)||(n=s,r&&(r.states.optionValues=s)),a}}});const bU=Qn({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:U3,effect:{type:Er(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:Er(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:E2.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:j3,default:Jf},fitInputWidth:Boolean,suffixIcon:{type:j3,default:F3},tagType:{...Jx.type,default:"info"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,suffixTransition:{type:Boolean,default:!0},placement:{type:Er(String),values:Qc,default:"bottom-start"},ariaLabel:{type:String,default:void 0}}),db="ElSelect",LU=T.defineComponent({name:db,componentName:db,components:{ElInput:vc,ElSelectMenu:gU,ElOption:VT,ElOptions:xU,ElTag:az,ElScrollbar:JN,ElTooltip:bT,ElIcon:yi},directives:{ClickOutside:Bx},props:bU,emits:[A1,dc,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const r=vU(e,t);return T.provide(Hc,T.reactive({props:e,states:r.states,optionsArray:r.optionsArray,handleOptionSelect:r.handleOptionSelect,onOptionCreate:r.onOptionCreate,onOptionDestroy:r.onOptionDestroy,selectRef:r.selectRef,setSelected:r.setSelected})),{...r}}}),wU=["id","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],EU=["textContent"];function MU(e,t,r,n,i,o){const a=T.resolveComponent("el-tag"),s=T.resolveComponent("el-tooltip"),h=T.resolveComponent("el-icon"),d=T.resolveComponent("el-option"),Q=T.resolveComponent("el-options"),p=T.resolveComponent("el-scrollbar"),g=T.resolveComponent("el-select-menu"),_=T.resolveDirective("click-outside");return T.withDirectives((T.openBlock(),T.createElementBlock("div",{ref:"selectRef",class:T.normalizeClass([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),onMouseenter:t[14]||(t[14]=x=>e.states.inputHovering=!0),onMouseleave:t[15]||(t[15]=x=>e.states.inputHovering=!1),onClick:t[16]||(t[16]=T.withModifiers((...x)=>e.toggleMenu&&e.toggleMenu(...x),["stop"]))},[T.createVNode(s,{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":["bottom-start","top-start","right","left"],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,onBeforeShow:e.handleMenuEnter,onHide:t[13]||(t[13]=x=>e.states.isBeforeHide=!1)},{default:T.withCtx(()=>{var x;return[T.createElementVNode("div",{ref:"wrapperRef",class:T.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)])},[e.$slots.prefix?(T.openBlock(),T.createElementBlock("div",{key:0,ref:"prefixRef",class:T.normalizeClass(e.nsSelect.e("prefix"))},[T.renderSlot(e.$slots,"prefix")],2)):T.createCommentVNode("v-if",!0),T.createElementVNode("div",{ref:"selectionRef",class:T.normalizeClass([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?T.renderSlot(e.$slots,"tag",{key:0},()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.showTagList,b=>(T.openBlock(),T.createElementBlock("div",{key:e.getValueKey(b),class:T.normalizeClass(e.nsSelect.e("selected-item"))},[T.createVNode(a,{closable:!e.selectDisabled&&!b.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:T.normalizeStyle(e.tagStyle),onClose:A=>e.deleteTag(A,b)},{default:T.withCtx(()=>[T.createElementVNode("span",{class:T.normalizeClass(e.nsSelect.e("tags-text"))},T.toDisplayString(b.currentLabel),3)]),_:2},1032,["closable","size","type","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(T.openBlock(),T.createBlock(s,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:T.withCtx(()=>[T.createElementVNode("div",{ref:"collapseItemRef",class:T.normalizeClass(e.nsSelect.e("selected-item"))},[T.createVNode(a,{closable:!1,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:T.normalizeStyle(e.collapseTagStyle)},{default:T.withCtx(()=>[T.createElementVNode("span",{class:T.normalizeClass(e.nsSelect.e("tags-text"))}," + "+T.toDisplayString(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","style"])],2)]),content:T.withCtx(()=>[T.createElementVNode("div",{ref:"tagMenuRef",class:T.normalizeClass(e.nsSelect.e("selection"))},[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.collapseTagList,b=>(T.openBlock(),T.createElementBlock("div",{key:e.getValueKey(b),class:T.normalizeClass(e.nsSelect.e("selected-item"))},[T.createVNode(a,{class:"in-tooltip",closable:!e.selectDisabled&&!b.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",onClose:A=>e.deleteTag(A,b)},{default:T.withCtx(()=>[T.createElementVNode("span",{class:T.normalizeClass(e.nsSelect.e("tags-text"))},T.toDisplayString(b.currentLabel),3)]),_:2},1032,["closable","size","type","onClose"])],2))),128))],2)]),_:1},8,["disabled","effect","teleported"])):T.createCommentVNode("v-if",!0)]):T.createCommentVNode("v-if",!0),e.selectDisabled?T.createCommentVNode("v-if",!0):(T.openBlock(),T.createElementBlock("div",{key:1,class:T.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[T.withDirectives(T.createElementVNode("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":t[0]||(t[0]=b=>e.states.inputValue=b),type:"text",class:T.normalizeClass([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:T.normalizeStyle(e.inputStyle),role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((x=e.hoverOption)==null?void 0:x.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onFocus:t[1]||(t[1]=(...b)=>e.handleFocus&&e.handleFocus(...b)),onBlur:t[2]||(t[2]=(...b)=>e.handleBlur&&e.handleBlur(...b)),onKeydown:[t[3]||(t[3]=T.withKeys(T.withModifiers(b=>e.navigateOptions("next"),["stop","prevent"]),["down"])),t[4]||(t[4]=T.withKeys(T.withModifiers(b=>e.navigateOptions("prev"),["stop","prevent"]),["up"])),t[5]||(t[5]=T.withKeys(T.withModifiers((...b)=>e.handleEsc&&e.handleEsc(...b),["stop","prevent"]),["esc"])),t[6]||(t[6]=T.withKeys(T.withModifiers((...b)=>e.selectOption&&e.selectOption(...b),["stop","prevent"]),["enter"])),t[7]||(t[7]=T.withKeys(T.withModifiers((...b)=>e.deletePrevTag&&e.deletePrevTag(...b),["stop"]),["delete"]))],onCompositionstart:t[8]||(t[8]=(...b)=>e.handleCompositionStart&&e.handleCompositionStart(...b)),onCompositionupdate:t[9]||(t[9]=(...b)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...b)),onCompositionend:t[10]||(t[10]=(...b)=>e.handleCompositionEnd&&e.handleCompositionEnd(...b)),onInput:t[11]||(t[11]=(...b)=>e.onInput&&e.onInput(...b)),onClick:t[12]||(t[12]=T.withModifiers((...b)=>e.toggleMenu&&e.toggleMenu(...b),["stop"]))},null,46,wU),[[T.vModelText,e.states.inputValue]]),e.filterable?(T.openBlock(),T.createElementBlock("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:T.normalizeClass(e.nsSelect.e("input-calculator")),textContent:T.toDisplayString(e.states.inputValue)},null,10,EU)):T.createCommentVNode("v-if",!0)],2)),e.shouldShowPlaceholder?(T.openBlock(),T.createElementBlock("div",{key:2,class:T.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[T.createElementVNode("span",null,T.toDisplayString(e.currentPlaceholder),1)],2)):T.createCommentVNode("v-if",!0)],2),T.createElementVNode("div",{ref:"suffixRef",class:T.normalizeClass(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(T.openBlock(),T.createBlock(h,{key:0,class:T.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0),e.showClose&&e.clearIcon?(T.openBlock(),T.createBlock(h,{key:1,class:T.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon")]),onClick:e.handleClearClick},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e.clearIcon)))]),_:1},8,["class","onClick"])):T.createCommentVNode("v-if",!0),e.validateState&&e.validateIcon?(T.openBlock(),T.createBlock(h,{key:2,class:T.normalizeClass([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e.validateIcon)))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0)],2)],2)]}),content:T.withCtx(()=>[T.createVNode(g,{ref:"menuRef"},{default:T.withCtx(()=>[e.$slots.header?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(e.nsSelect.be("dropdown","header"))},[T.renderSlot(e.$slots,"header")],2)):T.createCommentVNode("v-if",!0),T.withDirectives(T.createVNode(p,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:T.normalizeClass([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:T.withCtx(()=>[e.showNewOption?(T.openBlock(),T.createBlock(d,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):T.createCommentVNode("v-if",!0),T.createVNode(Q,null,{default:T.withCtx(()=>[T.renderSlot(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[T.vShow,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(T.openBlock(),T.createElementBlock("div",{key:1,class:T.normalizeClass(e.nsSelect.be("dropdown","loading"))},[T.renderSlot(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(T.openBlock(),T.createElementBlock("div",{key:2,class:T.normalizeClass(e.nsSelect.be("dropdown","empty"))},[T.renderSlot(e.$slots,"empty",{},()=>[T.createElementVNode("span",null,T.toDisplayString(e.emptyText),1)])],2)):T.createCommentVNode("v-if",!0),e.$slots.footer?(T.openBlock(),T.createElementBlock("div",{key:3,class:T.normalizeClass(e.nsSelect.be("dropdown","footer"))},[T.renderSlot(e.$slots,"footer")],2)):T.createCommentVNode("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","effect","transition","persistent","onBeforeShow"])],34)),[[_,e.handleClickOutside,e.popperRef]])}var AU=Sr(LU,[["render",MU],["__file","select.vue"]]);const CU=T.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=Cr("select"),r=T.ref(null),n=T.getCurrentInstance(),i=T.ref([]);T.provide(hb,T.reactive({...T.toRefs(e)}));const o=T.computed(()=>i.value.some(h=>h.visible===!0)),a=h=>{const d=[];return Vi(h.children)&&h.children.forEach(Q=>{var p,g;Q.type&&Q.type.name==="ElOption"&&Q.component&&Q.component.proxy?d.push(Q.component.proxy):(p=Q.children)!=null&&p.length?d.push(...a(Q)):(g=Q.component)!=null&&g.subTree&&d.push(...a(Q.component.subTree))}),d},s=()=>{i.value=a(n.subTree)};return T.onMounted(()=>{s()}),gD(r,s,{attributes:!0,subtree:!0,childList:!0}),{groupRef:r,visible:o,ns:t}}});function SU(e,t,r,n,i,o){return T.withDirectives((T.openBlock(),T.createElementBlock("ul",{ref:"groupRef",class:T.normalizeClass(e.ns.be("group","wrap"))},[T.createElementVNode("li",{class:T.normalizeClass(e.ns.be("group","title"))},T.toDisplayString(e.label),3),T.createElementVNode("li",null,[T.createElementVNode("ul",{class:T.normalizeClass(e.ns.b("group"))},[T.renderSlot(e.$slots,"default")],2)])],2)),[[T.vShow,e.visible]])}var fb=Sr(CU,[["render",SU],["__file","option-group.vue"]]);const B6=Xi(AU,{Option:VT,OptionGroup:fb}),Oc=_o(VT);_o(fb);const HU=Qn({trigger:Z0.trigger,placement:OT.placement,disabled:Z0.disabled,visible:E2.visible,transition:E2.transition,popperOptions:OT.popperOptions,tabindex:OT.tabindex,content:E2.content,popperStyle:E2.popperStyle,popperClass:E2.popperClass,enterable:{...E2.enterable,default:!0},effect:{...E2.effect,default:"light"},teleported:E2.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),OU={"update:visible":e=>N3(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},VU="onUpdate:visible",DU=T.defineComponent({name:"ElPopover"}),PU=T.defineComponent({...DU,props:HU,emits:OU,setup(e,{expose:t,emit:r}){const n=e,i=T.computed(()=>n[VU]),o=Cr("popover"),a=T.ref(),s=T.computed(()=>{var A;return(A=T.unref(a))==null?void 0:A.popperRef}),h=T.computed(()=>[{width:w6(n.width)},n.popperStyle]),d=T.computed(()=>[o.b(),n.popperClass,{[o.m("plain")]:!!n.content}]),Q=T.computed(()=>n.transition===`${o.namespace.value}-fade-in-linear`),p=()=>{var A;(A=a.value)==null||A.hide()},g=()=>{r("before-enter")},_=()=>{r("before-leave")},x=()=>{r("after-enter")},b=()=>{r("update:visible",!1),r("after-leave")};return t({popperRef:s,hide:p}),(A,E)=>(T.openBlock(),T.createBlock(T.unref(bT),T.mergeProps({ref_key:"tooltipRef",ref:a},A.$attrs,{trigger:A.trigger,placement:A.placement,disabled:A.disabled,visible:A.visible,transition:A.transition,"popper-options":A.popperOptions,tabindex:A.tabindex,content:A.content,offset:A.offset,"show-after":A.showAfter,"hide-after":A.hideAfter,"auto-close":A.autoClose,"show-arrow":A.showArrow,"aria-label":A.title,effect:A.effect,enterable:A.enterable,"popper-class":T.unref(d),"popper-style":T.unref(h),teleported:A.teleported,persistent:A.persistent,"gpu-acceleration":T.unref(Q),"onUpdate:visible":T.unref(i),onBeforeShow:g,onBeforeHide:_,onShow:x,onHide:b}),{content:T.withCtx(()=>[A.title?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(T.unref(o).e("title")),role:"title"},T.toDisplayString(A.title),3)):T.createCommentVNode("v-if",!0),T.renderSlot(A.$slots,"default",{},()=>[T.createTextVNode(T.toDisplayString(A.content),1)])]),default:T.withCtx(()=>[A.$slots.reference?T.renderSlot(A.$slots,"reference",{key:0}):T.createCommentVNode("v-if",!0)]),_:3},16,["trigger","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","persistent","gpu-acceleration","onUpdate:visible"]))}});var IU=Sr(PU,[["__file","popover.vue"]]);const Tb=(e,t)=>{const r=t.arg||t.value,n=r==null?void 0:r.popperRef;n&&(n.triggerRef=e)};var kU={mounted(e,t){Tb(e,t)},updated(e,t){Tb(e,t)}};const Qb=JR(kU,"popover"),Vc=Xi(IU,{directive:Qb}),N6="$treeNodeId",pb=function(e,t){!t||t[N6]||Object.defineProperty(t,N6,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},DT=function(e,t){return e?t[e]:t[N6]},PT=(e,t,r)=>{const n=e.value.currentNode;r();const i=e.value.currentNode;n!==i&&t("current-change",i?i.data:null,i)},IT=e=>{let t=!0,r=!0,n=!0;for(let i=0,o=e.length;i<o;i++){const a=e[i];(a.checked!==!0||a.indeterminate)&&(t=!1,a.disabled||(n=!1)),(a.checked!==!1||a.indeterminate)&&(r=!1)}return{all:t,none:r,allWithoutDisable:n,half:!t&&!r}},Dc=function(e){if(e.childNodes.length===0||e.loading)return;const{all:t,none:r,half:n}=IT(e.childNodes);t?(e.checked=!0,e.indeterminate=!1):n?(e.checked=!1,e.indeterminate=!0):r&&(e.checked=!1,e.indeterminate=!1);const i=e.parent;!i||i.level===0||e.store.checkStrictly||Dc(i)},Pc=function(e,t){const r=e.store.props,n=e.data||{},i=r[t];if(typeof i=="function")return i(n,e);if(typeof i=="string")return n[i];if(typeof i>"u"){const o=n[t];return o===void 0?"":o}};let RU=0,kT=class Sf{constructor(t){this.id=RU++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const r in t)r4(t,r)&&(this[r]=t[r]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){const t=this.store;if(!t)throw new Error("[Node]store is required!");t.registerNode(this);const r=t.props;if(r&&typeof r.isLeaf<"u"){const o=Pc(this,"isLeaf");typeof o=="boolean"&&(this.isLeafByUser=o)}if(t.lazy!==!0&&this.data?(this.setData(this.data),t.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&t.lazy&&t.defaultExpandAll&&this.expand(),Array.isArray(this.data)||pb(this,this.data),!this.data)return;const n=t.defaultExpandedKeys,i=t.key;i&&n&&n.includes(this.key)&&this.expand(null,t.autoExpandParent),i&&t.currentNodeKey!==void 0&&this.key===t.currentNodeKey&&(t.currentNode=this,t.currentNode.isCurrent=!0),t.lazy&&t._initDefaultCheckedNode(this),this.updateLeafState(),this.parent&&(this.level===1||this.parent.expanded===!0)&&(this.canFocus=!0)}setData(t){Array.isArray(t)||pb(this,t),this.data=t,this.childNodes=[];let r;this.level===0&&Array.isArray(this.data)?r=this.data:r=Pc(this,"children")||[];for(let n=0,i=r.length;n<i;n++)this.insertChild({data:r[n]})}get label(){return Pc(this,"label")}get key(){const t=this.store.key;return this.data?this.data[t]:null}get disabled(){return Pc(this,"disabled")}get nextSibling(){const t=this.parent;if(t){const r=t.childNodes.indexOf(this);if(r>-1)return t.childNodes[r+1]}return null}get previousSibling(){const t=this.parent;if(t){const r=t.childNodes.indexOf(this);if(r>-1)return r>0?t.childNodes[r-1]:null}return null}contains(t,r=!0){return(this.childNodes||[]).some(n=>n===t||r&&n.contains(t))}remove(){const t=this.parent;t&&t.removeChild(this)}insertChild(t,r,n){if(!t)throw new Error("InsertChild error: child is required.");if(!(t instanceof Sf)){if(!n){const i=this.getChildren(!0);i.includes(t.data)||(typeof r>"u"||r<0?i.push(t.data):i.splice(r,0,t.data))}Object.assign(t,{parent:this,store:this.store}),t=T.reactive(new Sf(t)),t instanceof Sf&&t.initialize()}t.level=this.level+1,typeof r>"u"||r<0?this.childNodes.push(t):this.childNodes.splice(r,0,t),this.updateLeafState()}insertBefore(t,r){let n;r&&(n=this.childNodes.indexOf(r)),this.insertChild(t,n)}insertAfter(t,r){let n;r&&(n=this.childNodes.indexOf(r),n!==-1&&(n+=1)),this.insertChild(t,n)}removeChild(t){const r=this.getChildren()||[],n=r.indexOf(t.data);n>-1&&r.splice(n,1);const i=this.childNodes.indexOf(t);i>-1&&(this.store&&this.store.deregisterNode(t),t.parent=null,this.childNodes.splice(i,1)),this.updateLeafState()}removeChildByData(t){let r=null;for(let n=0;n<this.childNodes.length;n++)if(this.childNodes[n].data===t){r=this.childNodes[n];break}r&&this.removeChild(r)}expand(t,r){const n=()=>{if(r){let i=this.parent;for(;i.level>0;)i.expanded=!0,i=i.parent}this.expanded=!0,t&&t(),this.childNodes.forEach(i=>{i.canFocus=!0})};this.shouldLoadData()?this.loadData(i=>{Array.isArray(i)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||Dc(this),n())}):n()}doCreateChildren(t,r={}){t.forEach(n=>{this.insertChild(Object.assign({data:n},r),void 0,!0)})}collapse(){this.expanded=!1,this.childNodes.forEach(t=>{t.canFocus=!1})}shouldLoadData(){return this.store.lazy===!0&&this.store.load&&!this.loaded}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser<"u"){this.isLeaf=this.isLeafByUser;return}const t=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!t||t.length===0;return}this.isLeaf=!1}setChecked(t,r,n,i){if(this.indeterminate=t==="half",this.checked=t===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:a,allWithoutDisable:s}=IT(this.childNodes);!this.isLeaf&&!a&&s&&(this.checked=!1,t=!1);const h=()=>{if(r){const d=this.childNodes;for(let g=0,_=d.length;g<_;g++){const x=d[g];i=i||t!==!1;const b=x.disabled?x.checked:i;x.setChecked(b,r,!0,i)}const{half:Q,all:p}=IT(d);p||(this.checked=p,this.indeterminate=Q)}};if(this.shouldLoadData()){this.loadData(()=>{h(),Dc(this)},{checked:t!==!1});return}else h()}const o=this.parent;!o||o.level===0||n||Dc(o)}getChildren(t=!1){if(this.level===0)return this.data;const r=this.data;if(!r)return null;const n=this.store.props;let i="children";return n&&(i=n.children||"children"),r[i]===void 0&&(r[i]=null),t&&!r[i]&&(r[i]=[]),r[i]}updateChildren(){const t=this.getChildren()||[],r=this.childNodes.map(o=>o.data),n={},i=[];t.forEach((o,a)=>{const s=o[N6];!!s&&r.findIndex(d=>d[N6]===s)>=0?n[s]={index:a,data:o}:i.push({index:a,data:o})}),this.store.lazy||r.forEach(o=>{n[o[N6]]||this.removeChildByData(o)}),i.forEach(({index:o,data:a})=>{this.insertChild({data:a},o)}),this.updateLeafState()}loadData(t,r={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(r).length)){this.loading=!0;const n=i=>{this.childNodes=[],this.doCreateChildren(i,r),this.loaded=!0,this.loading=!1,this.updateLeafState(),t&&t.call(this,i)};this.store.load(this,n)}else t&&t.call(this)}};class BU{constructor(t){this.currentNode=null,this.currentNodeKey=null;for(const r in t)r4(t,r)&&(this[r]=t[r]);this.nodesMap={}}initialize(){if(this.root=new kT({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const t=this.load;t(this.root,r=>{this.root.doCreateChildren(r),this._initDefaultCheckedNodes()})}else this._initDefaultCheckedNodes()}filter(t){const r=this.filterNodeMethod,n=this.lazy,i=function(o){const a=o.root?o.root.childNodes:o.childNodes;if(a.forEach(s=>{s.visible=r.call(s,t,s.data,s),i(s)}),!o.visible&&a.length){let s=!0;s=!a.some(h=>h.visible),o.root?o.root.visible=s===!1:o.visible=s===!1}t&&o.visible&&!o.isLeaf&&(!n||o.loaded)&&o.expand()};i(this)}setData(t){t!==this.root.data?(this.root.setData(t),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(t){if(t instanceof kT)return t;const r=gi(t)?DT(this.key,t):t;return this.nodesMap[r]||null}insertBefore(t,r){const n=this.getNode(r);n.parent.insertBefore({data:t},n)}insertAfter(t,r){const n=this.getNode(r);n.parent.insertAfter({data:t},n)}remove(t){const r=this.getNode(t);r&&r.parent&&(r===this.currentNode&&(this.currentNode=null),r.parent.removeChild(r))}append(t,r){const n=r?this.getNode(r):this.root;n&&n.insertChild({data:t})}_initDefaultCheckedNodes(){const t=this.defaultCheckedKeys||[],r=this.nodesMap;t.forEach(n=>{const i=r[n];i&&i.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(t){(this.defaultCheckedKeys||[]).includes(t.key)&&t.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(t){t!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=t,this._initDefaultCheckedNodes())}registerNode(t){const r=this.key;!t||!t.data||(r?t.key!==void 0&&(this.nodesMap[t.key]=t):this.nodesMap[t.id]=t)}deregisterNode(t){!this.key||!t||!t.data||(t.childNodes.forEach(n=>{this.deregisterNode(n)}),delete this.nodesMap[t.key])}getCheckedNodes(t=!1,r=!1){const n=[],i=function(o){(o.root?o.root.childNodes:o.childNodes).forEach(s=>{(s.checked||r&&s.indeterminate)&&(!t||t&&s.isLeaf)&&n.push(s.data),i(s)})};return i(this),n}getCheckedKeys(t=!1){return this.getCheckedNodes(t).map(r=>(r||{})[this.key])}getHalfCheckedNodes(){const t=[],r=function(n){(n.root?n.root.childNodes:n.childNodes).forEach(o=>{o.indeterminate&&t.push(o.data),r(o)})};return r(this),t}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(t=>(t||{})[this.key])}_getAllNodes(){const t=[],r=this.nodesMap;for(const n in r)r4(r,n)&&t.push(r[n]);return t}updateChildren(t,r){const n=this.nodesMap[t];if(!n)return;const i=n.childNodes;for(let o=i.length-1;o>=0;o--){const a=i[o];this.remove(a.data)}for(let o=0,a=r.length;o<a;o++){const s=r[o];this.append(s,n.data)}}_setCheckedKeys(t,r=!1,n){const i=this._getAllNodes().sort((h,d)=>h.level-d.level),o=Object.create(null),a=Object.keys(n);i.forEach(h=>h.setChecked(!1,!1));const s=h=>{h.childNodes.forEach(d=>{var Q;o[d.data[t]]=!0,(Q=d.childNodes)!=null&&Q.length&&s(d)})};for(let h=0,d=i.length;h<d;h++){const Q=i[h],p=Q.data[t].toString();if(!a.includes(p)){Q.checked&&!o[p]&&Q.setChecked(!1,!1);continue}if(Q.childNodes.length&&s(Q),Q.isLeaf||this.checkStrictly){Q.setChecked(!0,!1);continue}if(Q.setChecked(!0,!0),r){Q.setChecked(!1,!1);const _=function(x){x.childNodes.forEach(A=>{A.isLeaf||A.setChecked(!1,!1),_(A)})};_(Q)}}}setCheckedNodes(t,r=!1){const n=this.key,i={};t.forEach(o=>{i[(o||{})[n]]=!0}),this._setCheckedKeys(n,r,i)}setCheckedKeys(t,r=!1){this.defaultCheckedKeys=t;const n=this.key,i={};t.forEach(o=>{i[o]=!0}),this._setCheckedKeys(n,r,i)}setDefaultExpandedKeys(t){t=t||[],this.defaultExpandedKeys=t,t.forEach(r=>{const n=this.getNode(r);n&&n.expand(null,this.autoExpandParent)})}setChecked(t,r,n){const i=this.getNode(t);i&&i.setChecked(!!r,n)}getCurrentNode(){return this.currentNode}setCurrentNode(t){const r=this.currentNode;r&&(r.isCurrent=!1),this.currentNode=t,this.currentNode.isCurrent=!0}setUserCurrentNode(t,r=!0){const n=t[this.key],i=this.nodesMap[n];this.setCurrentNode(i),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(t,r=!0){if(t==null){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const n=this.getNode(t);n&&(this.setCurrentNode(n),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}const NU=T.defineComponent({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=Cr("tree"),r=T.inject("NodeInstance"),n=T.inject("RootTree");return()=>{const i=e.node,{data:o,store:a}=i;return e.renderContent?e.renderContent(T.h,{_self:r,node:i,data:o,store:a}):T.renderSlot(n.ctx.slots,"default",{node:i,data:o},()=>[T.h("span",{class:t.be("node","label")},[i.label])])}}});var FU=Sr(NU,[["__file","tree-node-content.vue"]]);function mb(e){const t=T.inject("TreeNodeMap",null),r={treeNodeExpand:n=>{e.node!==n&&e.node.collapse()},children:[]};return t&&t.children.push(r),T.provide("TreeNodeMap",r),{broadcastExpanded:n=>{if(e.accordion)for(const i of r.children)i.treeNodeExpand(n)}}}const gb=Symbol("dragEvents");function jU({props:e,ctx:t,el$:r,dropIndicator$:n,store:i}){const o=Cr("tree"),a=T.ref({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null}),s=({event:Q,treeNode:p})=>{if(typeof e.allowDrag=="function"&&!e.allowDrag(p.node))return Q.preventDefault(),!1;Q.dataTransfer.effectAllowed="move";try{Q.dataTransfer.setData("text/plain","")}catch{}a.value.draggingNode=p,t.emit("node-drag-start",p.node,Q)},h=({event:Q,treeNode:p})=>{const g=p,_=a.value.dropNode;_&&_.node.id!==g.node.id&&s4(_.$el,o.is("drop-inner"));const x=a.value.draggingNode;if(!x||!g)return;let b=!0,A=!0,E=!0,O=!0;typeof e.allowDrop=="function"&&(b=e.allowDrop(x.node,g.node,"prev"),O=A=e.allowDrop(x.node,g.node,"inner"),E=e.allowDrop(x.node,g.node,"next")),Q.dataTransfer.dropEffect=A||b||E?"move":"none",(b||A||E)&&(_==null?void 0:_.node.id)!==g.node.id&&(_&&t.emit("node-drag-leave",x.node,_.node,Q),t.emit("node-drag-enter",x.node,g.node,Q)),b||A||E?a.value.dropNode=g:a.value.dropNode=null,g.node.nextSibling===x.node&&(E=!1),g.node.previousSibling===x.node&&(b=!1),g.node.contains(x.node,!1)&&(A=!1),(x.node===g.node||x.node.contains(g.node))&&(b=!1,A=!1,E=!1);const V=g.$el.querySelector(`.${o.be("node","content")}`).getBoundingClientRect(),k=r.value.getBoundingClientRect();let j;const $=b?A?.25:E?.45:1:-1,U=E?A?.75:b?.55:0:1;let J=-9999;const tt=Q.clientY-V.top;tt<V.height*$?j="before":tt>V.height*U?j="after":A?j="inner":j="none";const rt=g.$el.querySelector(`.${o.be("node","expand-icon")}`).getBoundingClientRect(),st=n.value;j==="before"?J=rt.top-k.top:j==="after"&&(J=rt.bottom-k.top),st.style.top=`${J}px`,st.style.left=`${rt.right-k.left}px`,j==="inner"?Yf(g.$el,o.is("drop-inner")):s4(g.$el,o.is("drop-inner")),a.value.showDropIndicator=j==="before"||j==="after",a.value.allowDrop=a.value.showDropIndicator||O,a.value.dropType=j,t.emit("node-drag-over",x.node,g.node,Q)},d=Q=>{const{draggingNode:p,dropType:g,dropNode:_}=a.value;if(Q.preventDefault(),Q.dataTransfer.dropEffect="move",p&&_){const x={data:p.node.data};g!=="none"&&p.node.remove(),g==="before"?_.node.parent.insertBefore(x,_.node):g==="after"?_.node.parent.insertAfter(x,_.node):g==="inner"&&_.node.insertChild(x),g!=="none"&&i.value.registerNode(x),s4(_.$el,o.is("drop-inner")),t.emit("node-drag-end",p.node,_.node,g,Q),g!=="none"&&t.emit("node-drop",p.node,_.node,g,Q)}p&&!_&&t.emit("node-drag-end",p.node,null,g,Q),a.value.showDropIndicator=!1,a.value.draggingNode=null,a.value.dropNode=null,a.value.allowDrop=!0};return T.provide(gb,{treeNodeDragStart:s,treeNodeDragOver:h,treeNodeDragEnd:d}),{dragState:a}}const zU=T.defineComponent({name:"ElTreeNode",components:{ElCollapseTransition:mz,ElCheckbox:Ac,NodeContent:FU,ElIcon:yi,Loading:tT},props:{node:{type:kT,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(e,t){const r=Cr("tree"),{broadcastExpanded:n}=mb(e),i=T.inject("RootTree"),o=T.ref(!1),a=T.ref(!1),s=T.ref(null),h=T.ref(null),d=T.ref(null),Q=T.inject(gb),p=T.getCurrentInstance();T.provide("NodeInstance",p),i||K1("Tree","Can not find node's tree."),e.node.expanded&&(o.value=!0,a.value=!0);const g=i.props.props.children||"children";T.watch(()=>{const tt=e.node.data[g];return tt&&[...tt]},()=>{e.node.updateChildren()}),T.watch(()=>e.node.indeterminate,tt=>{b(e.node.checked,tt)}),T.watch(()=>e.node.checked,tt=>{b(tt,e.node.indeterminate)}),T.watch(()=>e.node.expanded,tt=>{T.nextTick(()=>o.value=tt),tt&&(a.value=!0)});const _=tt=>DT(i.props.nodeKey,tt.data),x=tt=>{const rt=e.props.class;if(!rt)return{};let st;if(Y2(rt)){const{data:pt}=tt;st=rt(pt,tt)}else st=rt;return W1(st)?{[st]:!0}:st},b=(tt,rt)=>{(s.value!==tt||h.value!==rt)&&i.ctx.emit("check-change",e.node.data,tt,rt),s.value=tt,h.value=rt},A=tt=>{PT(i.store,i.ctx.emit,()=>i.store.value.setCurrentNode(e.node)),i.currentNode.value=e.node,i.props.expandOnClickNode&&O(),i.props.checkOnClickNode&&!e.node.disabled&&V(null,{target:{checked:!e.node.checked}}),i.ctx.emit("node-click",e.node.data,e.node,p,tt)},E=tt=>{i.instance.vnode.props.onNodeContextmenu&&(tt.stopPropagation(),tt.preventDefault()),i.ctx.emit("node-contextmenu",tt,e.node.data,e.node,p)},O=()=>{e.node.isLeaf||(o.value?(i.ctx.emit("node-collapse",e.node.data,e.node,p),e.node.collapse()):(e.node.expand(),t.emit("node-expand",e.node.data,e.node,p)))},V=(tt,rt)=>{e.node.setChecked(rt.target.checked,!i.props.checkStrictly),T.nextTick(()=>{const st=i.store.value;i.ctx.emit("check",e.node.data,{checkedNodes:st.getCheckedNodes(),checkedKeys:st.getCheckedKeys(),halfCheckedNodes:st.getHalfCheckedNodes(),halfCheckedKeys:st.getHalfCheckedKeys()})})};return{ns:r,node$:d,tree:i,expanded:o,childNodeRendered:a,oldChecked:s,oldIndeterminate:h,getNodeKey:_,getNodeClass:x,handleSelectChange:b,handleClick:A,handleContextMenu:E,handleExpandIconClick:O,handleCheckChange:V,handleChildNodeExpand:(tt,rt,st)=>{n(rt),i.ctx.emit("node-expand",tt,rt,st)},handleDragStart:tt=>{i.props.draggable&&Q.treeNodeDragStart({event:tt,treeNode:e})},handleDragOver:tt=>{tt.preventDefault(),i.props.draggable&&Q.treeNodeDragOver({event:tt,treeNode:{$el:d.value,node:e.node}})},handleDrop:tt=>{tt.preventDefault()},handleDragEnd:tt=>{i.props.draggable&&Q.treeNodeDragEnd(tt)},CaretRight:kR}}}),UU=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],$U=["aria-expanded"];function GU(e,t,r,n,i,o){const a=T.resolveComponent("el-icon"),s=T.resolveComponent("el-checkbox"),h=T.resolveComponent("loading"),d=T.resolveComponent("node-content"),Q=T.resolveComponent("el-tree-node"),p=T.resolveComponent("el-collapse-transition");return T.withDirectives((T.openBlock(),T.createElementBlock("div",{ref:"node$",class:T.normalizeClass([e.ns.b("node"),e.ns.is("expanded",e.expanded),e.ns.is("current",e.node.isCurrent),e.ns.is("hidden",!e.node.visible),e.ns.is("focusable",!e.node.disabled),e.ns.is("checked",!e.node.disabled&&e.node.checked),e.getNodeClass(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.node.disabled,"aria-checked":e.node.checked,draggable:e.tree.props.draggable,"data-key":e.getNodeKey(e.node),onClick:t[1]||(t[1]=T.withModifiers((...g)=>e.handleClick&&e.handleClick(...g),["stop"])),onContextmenu:t[2]||(t[2]=(...g)=>e.handleContextMenu&&e.handleContextMenu(...g)),onDragstart:t[3]||(t[3]=T.withModifiers((...g)=>e.handleDragStart&&e.handleDragStart(...g),["stop"])),onDragover:t[4]||(t[4]=T.withModifiers((...g)=>e.handleDragOver&&e.handleDragOver(...g),["stop"])),onDragend:t[5]||(t[5]=T.withModifiers((...g)=>e.handleDragEnd&&e.handleDragEnd(...g),["stop"])),onDrop:t[6]||(t[6]=T.withModifiers((...g)=>e.handleDrop&&e.handleDrop(...g),["stop"]))},[T.createElementVNode("div",{class:T.normalizeClass(e.ns.be("node","content")),style:T.normalizeStyle({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(T.openBlock(),T.createBlock(a,{key:0,class:T.normalizeClass([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:T.withModifiers(e.handleExpandIconClick,["stop"])},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e.tree.props.icon||e.CaretRight)))]),_:1},8,["class","onClick"])):T.createCommentVNode("v-if",!0),e.showCheckbox?(T.openBlock(),T.createBlock(s,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:t[0]||(t[0]=T.withModifiers(()=>{},["stop"])),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):T.createCommentVNode("v-if",!0),e.node.loading?(T.openBlock(),T.createBlock(a,{key:2,class:T.normalizeClass([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:T.withCtx(()=>[T.createVNode(h)]),_:1},8,["class"])):T.createCommentVNode("v-if",!0),T.createVNode(d,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),T.createVNode(p,null,{default:T.withCtx(()=>[!e.renderAfterExpand||e.childNodeRendered?T.withDirectives((T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded},[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.node.childNodes,g=>(T.openBlock(),T.createBlock(Q,{key:e.getNodeKey(g),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:g,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,$U)),[[T.vShow,e.expanded]]):T.createCommentVNode("v-if",!0)]),_:1})],42,UU)),[[T.vShow,e.node.visible]])}var ZU=Sr(zU,[["render",GU],["__file","tree-node.vue"]]);function qU({el$:e},t){const r=Cr("tree"),n=T.shallowRef([]),i=T.shallowRef([]);T.onMounted(()=>{a()}),T.onUpdated(()=>{n.value=Array.from(e.value.querySelectorAll("[role=treeitem]")),i.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"))}),T.watch(i,s=>{s.forEach(h=>{h.setAttribute("tabindex","-1")})}),k3(e,"keydown",s=>{const h=s.target;if(!h.className.includes(r.b("node")))return;const d=s.code;n.value=Array.from(e.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`));const Q=n.value.indexOf(h);let p;if([Ki.up,Ki.down].includes(d)){if(s.preventDefault(),d===Ki.up){p=Q===-1?0:Q!==0?Q-1:n.value.length-1;const _=p;for(;!t.value.getNode(n.value[p].dataset.key).canFocus;){if(p--,p===_){p=-1;break}p<0&&(p=n.value.length-1)}}else{p=Q===-1?0:Q<n.value.length-1?Q+1:0;const _=p;for(;!t.value.getNode(n.value[p].dataset.key).canFocus;){if(p++,p===_){p=-1;break}p>=n.value.length&&(p=0)}}p!==-1&&n.value[p].focus()}[Ki.left,Ki.right].includes(d)&&(s.preventDefault(),h.click());const g=h.querySelector('[type="checkbox"]');[Ki.enter,Ki.space].includes(d)&&g&&(s.preventDefault(),g.click())});const a=()=>{var s;n.value=Array.from(e.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`)),i.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"));const h=e.value.querySelectorAll(`.${r.is("checked")}[role=treeitem]`);if(h.length){h[0].setAttribute("tabindex","0");return}(s=n.value[0])==null||s.setAttribute("tabindex","0")}}const WU=T.defineComponent({name:"ElTree",components:{ElTreeNode:ZU},props:{data:{type:Array,default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:Function,showCheckbox:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:Function,allowDrop:Function,props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:j3}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(e,t){const{t:r}=fc(),n=Cr("tree"),i=T.ref(new BU({key:e.nodeKey,data:e.data,lazy:e.lazy,props:e.props,load:e.load,currentNodeKey:e.currentNodeKey,checkStrictly:e.checkStrictly,checkDescendants:e.checkDescendants,defaultCheckedKeys:e.defaultCheckedKeys,defaultExpandedKeys:e.defaultExpandedKeys,autoExpandParent:e.autoExpandParent,defaultExpandAll:e.defaultExpandAll,filterNodeMethod:e.filterNodeMethod}));i.value.initialize();const o=T.ref(i.value.root),a=T.ref(null),s=T.ref(null),h=T.ref(null),{broadcastExpanded:d}=mb(e),{dragState:Q}=jU({props:e,ctx:t,el$:s,dropIndicator$:h,store:i});qU({el$:s},i);const p=T.computed(()=>{const{childNodes:Ft}=o.value;return!Ft||Ft.length===0||Ft.every(({visible:he})=>!he)});T.watch(()=>e.currentNodeKey,Ft=>{i.value.setCurrentNodeKey(Ft)}),T.watch(()=>e.defaultCheckedKeys,Ft=>{i.value.setDefaultCheckedKey(Ft)}),T.watch(()=>e.defaultExpandedKeys,Ft=>{i.value.setDefaultExpandedKeys(Ft)}),T.watch(()=>e.data,Ft=>{i.value.setData(Ft)},{deep:!0}),T.watch(()=>e.checkStrictly,Ft=>{i.value.checkStrictly=Ft});const g=Ft=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");i.value.filter(Ft)},_=Ft=>DT(e.nodeKey,Ft.data),x=Ft=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const he=i.value.getNode(Ft);if(!he)return[];const cr=[he.data];let qt=he.parent;for(;qt&&qt!==o.value;)cr.push(qt.data),qt=qt.parent;return cr.reverse()},b=(Ft,he)=>i.value.getCheckedNodes(Ft,he),A=Ft=>i.value.getCheckedKeys(Ft),E=()=>{const Ft=i.value.getCurrentNode();return Ft?Ft.data:null},O=()=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const Ft=E();return Ft?Ft[e.nodeKey]:null},V=(Ft,he)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");i.value.setCheckedNodes(Ft,he)},k=(Ft,he)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");i.value.setCheckedKeys(Ft,he)},j=(Ft,he,cr)=>{i.value.setChecked(Ft,he,cr)},$=()=>i.value.getHalfCheckedNodes(),U=()=>i.value.getHalfCheckedKeys(),J=(Ft,he=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");PT(i,t.emit,()=>i.value.setUserCurrentNode(Ft,he))},tt=(Ft,he=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");PT(i,t.emit,()=>i.value.setCurrentNodeKey(Ft,he))},rt=Ft=>i.value.getNode(Ft),st=Ft=>{i.value.remove(Ft)},pt=(Ft,he)=>{i.value.append(Ft,he)},St=(Ft,he)=>{i.value.insertBefore(Ft,he)},$t=(Ft,he)=>{i.value.insertAfter(Ft,he)},ie=(Ft,he,cr)=>{d(he),t.emit("node-expand",Ft,he,cr)},me=(Ft,he)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");i.value.updateChildren(Ft,he)};return T.provide("RootTree",{ctx:t,props:e,store:i,root:o,currentNode:a,instance:T.getCurrentInstance()}),T.provide(G0,void 0),{ns:n,store:i,root:o,currentNode:a,dragState:Q,el$:s,dropIndicator$:h,isEmpty:p,filter:g,getNodeKey:_,getNodePath:x,getCheckedNodes:b,getCheckedKeys:A,getCurrentNode:E,getCurrentKey:O,setCheckedNodes:V,setCheckedKeys:k,setChecked:j,getHalfCheckedNodes:$,getHalfCheckedKeys:U,setCurrentNode:J,setCurrentKey:tt,t:r,getNode:rt,remove:st,append:pt,insertBefore:St,insertAfter:$t,handleNodeExpand:ie,updateKeyChildren:me}}});function XU(e,t,r,n,i,o){const a=T.resolveComponent("el-tree-node");return T.openBlock(),T.createElementBlock("div",{ref:"el$",class:T.normalizeClass([e.ns.b(),e.ns.is("dragging",!!e.dragState.draggingNode),e.ns.is("drop-not-allow",!e.dragState.allowDrop),e.ns.is("drop-inner",e.dragState.dropType==="inner"),{[e.ns.m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.root.childNodes,s=>(T.openBlock(),T.createBlock(a,{key:e.getNodeKey(s),node:s,props:e.props,accordion:e.accordion,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,"render-content":e.renderContent,onNodeExpand:e.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),e.isEmpty?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(e.ns.e("empty-block"))},[T.renderSlot(e.$slots,"empty",{},()=>{var s;return[T.createElementVNode("span",{class:T.normalizeClass(e.ns.e("empty-text"))},T.toDisplayString((s=e.emptyText)!=null?s:e.t("el.tree.emptyText")),3)]})],2)):T.createCommentVNode("v-if",!0),T.withDirectives(T.createElementVNode("div",{ref:"dropIndicator$",class:T.normalizeClass(e.ns.e("drop-indicator"))},null,2),[[T.vShow,e.dragState.showDropIndicator]])],2)}var Ic=Sr(WU,[["render",XU],["__file","tree.vue"]]);Ic.install=e=>{e.component(Ic.name,Ic)};const yb=Ic;function KU(e){let t;const r=T.ref(!1),n=T.reactive({...e,originalPosition:"",originalOverflow:"",visible:!1});function i(g){n.text=g}function o(){const g=n.parent,_=p.ns;if(!g.vLoadingAddClassList){let x=g.getAttribute("loading-number");x=Number.parseInt(x)-1,x?g.setAttribute("loading-number",x.toString()):(s4(g,_.bm("parent","relative")),g.removeAttribute("loading-number")),s4(g,_.bm("parent","hidden"))}a(),Q.unmount()}function a(){var g,_;(_=(g=p.$el)==null?void 0:g.parentNode)==null||_.removeChild(p.$el)}function s(){var g;e.beforeClose&&!e.beforeClose()||(r.value=!0,clearTimeout(t),t=window.setTimeout(h,400),n.visible=!1,(g=e.closed)==null||g.call(e))}function h(){if(!r.value)return;const g=n.parent;r.value=!1,g.vLoadingAddClassList=void 0,o()}const d=T.defineComponent({name:"ElLoading",setup(g,{expose:_}){const{ns:x,zIndex:b}=LN("loading");return _({ns:x,zIndex:b}),()=>{const A=n.spinner||n.svg,E=T.h("svg",{class:"circular",viewBox:n.svgViewBox?n.svgViewBox:"0 0 50 50",...A?{innerHTML:A}:{}},[T.h("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),O=n.text?T.h("p",{class:x.b("text")},[n.text]):void 0;return T.h(T.Transition,{name:x.b("fade"),onAfterLeave:h},{default:T.withCtx(()=>[T.withDirectives(T.createVNode("div",{style:{backgroundColor:n.background||""},class:[x.b("mask"),n.customClass,n.fullscreen?"is-fullscreen":""]},[T.h("div",{class:x.b("spinner")},[E,O])]),[[T.vShow,n.visible]])])})}}}),Q=T.createApp(d),p=Q.mount(document.createElement("div"));return{...T.toRefs(n),setText:i,removeElLoadingChild:a,close:s,handleAfterLeave:h,vm:p,get $el(){return p.$el}}}let kc;const RT=function(e={}){if(!q1)return;const t=YU(e);if(t.fullscreen&&kc)return kc;const r=KU({...t,closed:()=>{var i;(i=t.closed)==null||i.call(t),t.fullscreen&&(kc=void 0)}});JU(t,t.parent,r),_b(t,t.parent,r),t.parent.vLoadingAddClassList=()=>_b(t,t.parent,r);let n=t.parent.getAttribute("loading-number");return n?n=`${Number.parseInt(n)+1}`:n="1",t.parent.setAttribute("loading-number",n),t.parent.appendChild(r.$el),T.nextTick(()=>r.visible.value=t.visible),t.fullscreen&&(kc=r),r},YU=e=>{var t,r,n,i;let o;return W1(e.target)?o=(t=document.querySelector(e.target))!=null?t:document.body:o=e.target||document.body,{parent:o===document.body||e.body?document.body:o,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:o===document.body&&((r=e.fullscreen)!=null?r:!0),lock:(n=e.lock)!=null?n:!1,customClass:e.customClass||"",visible:(i=e.visible)!=null?i:!0,target:o}},JU=async(e,t,r)=>{const{nextZIndex:n}=r.vm.zIndex||r.vm._.exposed.zIndex,i={};if(e.fullscreen)r.originalPosition.value=I0(document.body,"position"),r.originalOverflow.value=I0(document.body,"overflow"),i.zIndex=n();else if(e.parent===document.body){r.originalPosition.value=I0(document.body,"position"),await T.nextTick();for(const o of["top","left"]){const a=o==="top"?"scrollTop":"scrollLeft";i[o]=`${e.target.getBoundingClientRect()[o]+document.body[a]+document.documentElement[a]-Number.parseInt(I0(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])i[o]=`${e.target.getBoundingClientRect()[o]}px`}else r.originalPosition.value=I0(t,"position");for(const[o,a]of Object.entries(i))r.$el.style[o]=a},_b=(e,t,r)=>{const n=r.vm.ns||r.vm._.exposed.ns;["absolute","fixed","sticky"].includes(r.originalPosition.value)?s4(t,n.bm("parent","relative")):Yf(t,n.bm("parent","relative")),e.fullscreen&&e.lock?Yf(t,n.bm("parent","hidden")):s4(t,n.bm("parent","hidden"))},Rc=Symbol("ElLoading"),vb=(e,t)=>{var r,n,i,o;const a=t.instance,s=g=>gi(t.value)?t.value[g]:void 0,h=g=>{const _=W1(g)&&(a==null?void 0:a[g])||g;return _&&T.ref(_)},d=g=>h(s(g)||e.getAttribute(`element-loading-${SD(g)}`)),Q=(r=s("fullscreen"))!=null?r:t.modifiers.fullscreen,p={text:d("text"),svg:d("svg"),svgViewBox:d("svgViewBox"),spinner:d("spinner"),background:d("background"),customClass:d("customClass"),fullscreen:Q,target:(n=s("target"))!=null?n:Q?void 0:e,body:(i=s("body"))!=null?i:t.modifiers.body,lock:(o=s("lock"))!=null?o:t.modifiers.lock};e[Rc]={options:p,instance:RT(p)}},t$=(e,t)=>{for(const r of Object.keys(t))T.isRef(t[r])&&(t[r].value=e[r])},Bc={mounted(e,t){t.value&&vb(e,t)},updated(e,t){const r=e[Rc];t.oldValue!==t.value&&(t.value&&!t.oldValue?vb(e,t):t.value&&t.oldValue?gi(t.value)&&t$(t.value,r.options):r==null||r.instance.close())},unmounted(e){var t;(t=e[Rc])==null||t.instance.close(),e[Rc]=null}},e$={install(e){e.directive("loading",Bc),e.config.globalProperties.$loading=RT},directive:Bc,service:RT},Wa=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},r$={name:"ExternalResourceCard",components:{Button:na},props:{resources:{type:Array,default:()=>[]}},data:function(){return{pubmeds:[],pubmedIds:[],ElIconNotebook:T.shallowRef(ZR)}},methods:{capitalise:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},openUrl:function(e){window.open(e,"_blank")}}},n$={class:"resource-container"};function i$(e,t,r,n,i,o){const a=na;return T.openBlock(),T.createElementBlock("div",n$,[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.resources,s=>(T.openBlock(),T.createElementBlock("div",{key:s.id,class:"resource"},[s.id==="pubmed"?(T.openBlock(),T.createBlock(a,{key:0,class:"button",id:"open-pubmed-button",icon:e.ElIconNotebook,onClick:h=>o.openUrl(s.url)},{default:T.withCtx(()=>[T.createTextVNode(" Open publications in pubmed ")]),_:2},1032,["icon","onClick"])):T.createCommentVNode("",!0)]))),128))])}const xb=Wa(r$,[["render",i$],["__scopeId","data-v-5386b943"]]);function o$(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map(function(i){i(r)}),(n=e.get("*"))&&n.slice().map(function(i){i(t,r)})}}}const Nc=new o$,a$=e=>e.replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()),s$=function(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""},l$={name:"ProvenancePopup",components:{Button:na,Container:nU,Icon:yi,ExternalResourceCard:xb,ElIconArrowUp:uc,ElIconArrowDown:F3,ElIconWarning:Lv},props:{entry:{type:Object,default:()=>({destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0})}},data:function(){return{controller:void 0,activeSpecies:void 0,pubmedSearchUrl:"",loading:!1,showToolip:!1,showDetails:!1,originDescriptions:{motor:"is the location of the initial cell body of the circuit",sensory:"is the location of the initial cell body in the PNS circuit"},componentsWithDatasets:[],uberons:[{id:void 0,name:void 0}]}},computed:{resources:function(){let e=[];return this.entry&&this.entry.hyperlinks&&(e=this.entry.hyperlinks),e},originDescription:function(){return this.entry&&this.entry.title&&this.entry.title.toLowerCase().includes("motor")?this.originDescriptions.motor:this.originDescriptions.sensory},provSpeciesDescription:function(){let e="Observed in";return this.entry.provenanceTaxonomyLabel.forEach(t=>{e+=` ${t},`}),e=e.slice(0,-1),e+=" species",e}},methods:{titleCase:function(e){return a$(e)},capitalise:function(e){return s$(e)},openUrl:function(e){window.open(e,"_blank")},openAll:function(){Nc.emit("onActionClick",{type:"Facets",labels:this.entry.componentsWithDatasets.map(e=>e.name)})},openAxons:function(){Nc.emit("onActionClick",{type:"Facets",labels:this.entry.destinationsWithDatasets.map(e=>e.name)})},openDendrites:function(){Nc.emit("onActionClick",{type:"Facets",labels:this.entry.originsWithDatasets.map(e=>e.name)})},pubmedSearchUrlUpdate:function(e){this.pubmedSearchUrl=e}}},Y0=e=>(T.pushScopeId("data-v-a3d0eed3"),e=e(),T.popScopeId(),e),c$={key:0,class:"main"},u$={key:0,class:"block"},h$={class:"title"},d$={key:0,class:"subtitle"},f$={key:1,class:"block"},T$={class:"title"},Q$={class:"content-container scrollbar"},p$={key:0,class:"block"},m$=Y0(()=>T.createElementVNode("span",{class:"attribute-title"},"Origin",-1)),g$={style:{"word-break":"keep-all"}},y$=Y0(()=>T.createElementVNode("i",null,"Origin",-1)),_$=["origin-item-label"],v$={key:0,class:"seperator"},x$={key:1,class:"block"},b$=Y0(()=>T.createElementVNode("div",{class:"attribute-title"},"Components",-1)),L$=["component-item-label"],w$={key:0,class:"seperator"},E$={key:2,class:"block"},M$=Y0(()=>T.createElementVNode("span",{class:"attribute-title"},"Destination",-1)),A$=Y0(()=>T.createElementVNode("span",{style:{"word-break":"keep-all"}},[T.createElementVNode("i",null,"Destination"),T.createTextVNode(" is where the axons terminate ")],-1)),C$=["destination-item-label"],S$={key:0,class:"seperator"};function H$(e,t,r,n,i,o){const a=uc,s=yi,h=F3,d=Lv,Q=Vc,p=na,g=xb,_=Bc;return r.entry?T.withDirectives((T.openBlock(),T.createElementBlock("div",c$,[r.entry.title?(T.openBlock(),T.createElementBlock("div",u$,[T.createElementVNode("span",h$,T.toDisplayString(o.capitalise(r.entry.title)),1),r.entry.provenanceTaxonomyLabel&&r.entry.provenanceTaxonomyLabel.length>0?(T.openBlock(),T.createElementBlock("div",d$,T.toDisplayString(o.provSpeciesDescription),1)):T.createCommentVNode("",!0)])):(T.openBlock(),T.createElementBlock("div",f$,[T.createElementVNode("span",T$,T.toDisplayString(r.entry.featureId),1)])),T.withDirectives(T.createElementVNode("div",{class:"hide",id:"hide-path-info",onClick:t[0]||(t[0]=x=>e.showDetails=!1)},[T.createTextVNode(" Hide path information "),T.createVNode(s,null,{default:T.withCtx(()=>[T.createVNode(a)]),_:1})],512),[[T.vShow,e.showDetails]]),T.withDirectives(T.createElementVNode("div",{class:"hide",id:"show-path-info",onClick:t[1]||(t[1]=x=>e.showDetails=!0)},[T.createTextVNode(" Show path information "),T.createVNode(s,null,{default:T.withCtx(()=>[T.createVNode(h)]),_:1})],512),[[T.vShow,!e.showDetails]]),T.createVNode(T.Transition,{name:"slide-fade"},{default:T.withCtx(()=>[T.withDirectives(T.createElementVNode("div",Q$,[T.createTextVNode(T.toDisplayString(r.entry.paths)+" ",1),r.entry.origins&&r.entry.origins.length>0?(T.openBlock(),T.createElementBlock("div",p$,[T.createElementVNode("div",null,[m$,T.createVNode(Q,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:T.withCtx(()=>[T.createVNode(s,{class:"info"},{default:T.withCtx(()=>[T.createVNode(d)]),_:1})]),default:T.withCtx(()=>[T.createElementVNode("span",g$,[y$,T.createTextVNode(" "+T.toDisplayString(o.originDescription),1)])]),_:1})]),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.entry.origins,(x,b)=>(T.openBlock(),T.createElementBlock("div",{class:"attribute-content","origin-item-label":x,key:x},[T.createTextVNode(T.toDisplayString(o.capitalise(x))+" ",1),b!=r.entry.origins.length-1?(T.openBlock(),T.createElementBlock("div",v$)):T.createCommentVNode("",!0)],8,_$))),128)),T.withDirectives(T.createVNode(p,{class:"button",id:"open-dendrites-button",onClick:o.openDendrites},{default:T.withCtx(()=>[T.createTextVNode(" Explore origin data ")]),_:1},8,["onClick"]),[[T.vShow,r.entry.originsWithDatasets&&r.entry.originsWithDatasets.length>0]])])):T.createCommentVNode("",!0),r.entry.components&&r.entry.components.length>0?(T.openBlock(),T.createElementBlock("div",x$,[b$,(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.entry.components,(x,b)=>(T.openBlock(),T.createElementBlock("div",{class:"attribute-content","component-item-label":x,key:x},[T.createTextVNode(T.toDisplayString(o.capitalise(x))+" ",1),b!=r.entry.components.length-1?(T.openBlock(),T.createElementBlock("div",w$)):T.createCommentVNode("",!0)],8,L$))),128))])):T.createCommentVNode("",!0),r.entry.destinations&&r.entry.destinations.length>0?(T.openBlock(),T.createElementBlock("div",E$,[T.createElementVNode("div",null,[M$,T.createVNode(Q,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:T.withCtx(()=>[T.createVNode(s,{class:"info"},{default:T.withCtx(()=>[T.createVNode(d)]),_:1})]),default:T.withCtx(()=>[A$]),_:1})]),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.entry.destinations,(x,b)=>(T.openBlock(),T.createElementBlock("div",{class:"attribute-content","destination-item-label":x,key:x},[T.createTextVNode(T.toDisplayString(o.capitalise(x))+" ",1),b!=r.entry.destinations.length-1?(T.openBlock(),T.createElementBlock("div",S$)):T.createCommentVNode("",!0)],8,C$))),128)),T.withDirectives(T.createVNode(p,{class:"button",onClick:o.openAxons},{default:T.withCtx(()=>[T.createTextVNode(" Explore destination data ")]),_:1},8,["onClick"]),[[T.vShow,r.entry.destinationsWithDatasets&&r.entry.destinationsWithDatasets.length>0]])])):T.createCommentVNode("",!0),T.withDirectives(T.createVNode(p,{class:"button",onClick:o.openAll},{default:T.withCtx(()=>[T.createTextVNode(" Search for data on components ")]),_:1},8,["onClick"]),[[T.vShow,r.entry.componentsWithDatasets&&r.entry.componentsWithDatasets.length>0]]),T.createVNode(g,{resources:o.resources},null,8,["resources"])],512),[[T.vShow,e.showDetails]])]),_:1})])),[[_,e.loading]]):T.createCommentVNode("",!0)}const bb=Wa(l$,[["render",H$],["__scopeId","data-v-a3d0eed3"]]);/*! js-cookie v3.0.5 | MIT */function Fc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}var O$={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function BT(e,t){function r(i,o,a){if(!(typeof document>"u")){a=Fc({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var h in a)a[h]&&(s+="; "+h,a[h]!==!0&&(s+="="+a[h].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+s}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],a={},s=0;s<o.length;s++){var h=o[s].split("="),d=h.slice(1).join("=");try{var Q=decodeURIComponent(h[0]);if(a[Q]=e.read(d,Q),i===Q)break}catch{}}return i?a[i]:a}}return Object.create({set:r,get:n,remove:function(i,o){r(i,"",Fc({},o,{expires:-1}))},withAttributes:function(i){return BT(this.converter,Fc({},this.attributes,i))},withConverter:function(i){return BT(Fc({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var NT=BT(O$,{path:"/"}),ia=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},b1=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Xa,J0,Di,oa,Y3;const V$=1e4;class D${constructor(t){Xa.add(this),J0.set(this,void 0),Di.set(this,null),oa.set(this,null),t.slice(-1)==="/"?ia(this,J0,t.slice(0,-1),"f"):ia(this,J0,t,"f")}get currentUser(){return b1(this,oa,"f")}get currentError(){return b1(this,Di,"f")}async authenticate(t){ia(this,Di,null,"f"),ia(this,oa,null,"f");const r=await b1(this,Xa,"m",Y3).call(this,t,"authenticate");return"error"in r?(NT.remove("annotation-key"),Promise.resolve(b1(this,Di,"f"))):(NT.set("annotation-key",r.session,{secure:!0,expires:1}),ia(this,oa,r.data,"f"),Promise.resolve(b1(this,oa,"f")))}async unauthenticate(t){ia(this,Di,null,"f"),ia(this,oa,null,"f");const r=await b1(this,Xa,"m",Y3).call(this,t,"unauthenticate");return"success"in r?Promise.resolve(r):Promise.resolve(b1(this,Di,"f"))}async annotatedItemIds(t,r){const n=await b1(this,Xa,"m",Y3).call(this,t,"items/","GET",{resource:r});return"error"in n?Promise.resolve(b1(this,Di,"f")):Promise.resolve(n)}async drawnFeatures(t,r){const n=await b1(this,Xa,"m",Y3).call(this,t,"features/","GET",{resource:r});return"error"in n?Promise.resolve(b1(this,Di,"f")):Promise.resolve(n)}async itemAnnotations(t,r,n){const i=await b1(this,Xa,"m",Y3).call(this,t,"annotations/","GET",{resource:r,item:n});return"error"in i?Promise.resolve(b1(this,Di,"f")):Promise.resolve(i)}async annotation(t,r){const n=await b1(this,Xa,"m",Y3).call(this,t,"annotation/","GET",{annotation:r});return"error"in n?Promise.resolve(b1(this,Di,"f")):Promise.resolve(n)}async addAnnotation(t,r){if(b1(this,oa,"f")&&b1(this,oa,"f").canUpdate){const n=Object.assign({creator:b1(this,oa,"f"),created:new Date().toISOString()},r),i=await b1(this,Xa,"m",Y3).call(this,t,"annotation/","POST",{data:n});if(!("error"in i))return Promise.resolve(i);ia(this,Di,i,"f")}else ia(this,Di,{error:"user cannot add annotation"},"f");return Promise.resolve(b1(this,Di,"f"))}}J0=new WeakMap,Di=new WeakMap,oa=new WeakMap,Xa=new WeakSet,Y3=async function(t,r,n="GET",i={}){let o=!0;const a=new AbortController;setTimeout(()=>{o&&(console.log("Annotation server timeout..."),a.abort())},V$);const s={method:n,signal:a.signal};let h=`${b1(this,J0,"f")}/${r}`;const d=NT.get("annotation-key")||"";if(n==="GET"){const p=[];for(const[g,_]of Object.entries(i))p.push(`${g}=${encodeURIComponent(JSON.stringify(_))}`);p.push(`key=${encodeURIComponent(t)}`),p.push(`session=${encodeURIComponent(d)}`),h+="?"+p.join("&"),s.headers={Accept:"application/json; charset=utf-8","Cache-Control":"no-store"}}else if(n==="POST"){const p=Object.assign({key:t,session:d},i);s.body=JSON.stringify(p),s.headers={Accept:"application/json; charset=utf-8","Content-Type":"application/json; charset=utf-8","Cache-Control":"no-store"}}const Q=await fetch(h,s);return o=!1,Q.ok?Promise.resolve(await Q.json()):(ia(this,Di,{error:`${Q.status} ${Q.statusText}`},"f"),Promise.resolve(b1(this,Di,"f")))};const P$={name:"AnnotationTool",components:{Button:na,Col:K3,Input:vc,Main:ub,Row:qa,Select:B6,ElIconArrowUp:uc,ElIconArrowDown:F3,ElIconEdit:xv,ElIconClose:k0},props:{annotationEntry:{type:Object}},inject:["flatmapAPI","userApiKey"],data:function(){return{displayPair:{"Feature ID":"featureId",Tooltip:"label",Models:"models",Name:"name",Resource:"resourceId"},editing:!1,evidencePrefixes:["DOI:","PMID:"],evidencePrefix:"DOI:",evidence:[],authenticated:!1,newEvidence:"",comment:"",prevSubs:[],showSubmissions:!0,errorMessage:""}},computed:{isEditable:function(){return this.annotationEntry.resourceId&&this.annotationEntry.featureId}},methods:{evidenceEntered:function(e){e&&(this.evidence.push(this.evidencePrefix+e),this.newEvidence="")},formatTime:function(e){const t={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};return new Date(e).toLocaleDateString(void 0,t)},updatePrevSubmissions:function(){this.$annotator&&this.authenticated&&this.annotationEntry.resourceId&&this.annotationEntry.featureId&&this.$annotator.itemAnnotations(this.userApiKey,this.annotationEntry.resourceId,this.annotationEntry.featureId).then(e=>{this.prevSubs=e}).catch(e=>{console.log(e)})},submit:function(){if((this.evidence.length>0||this.comment)&&this.annotationEntry.resourceId&&this.annotationEntry.featureId){const e=[];this.evidence.forEach(r=>{if(r.includes("DOI:")){const n=r.replace("DOI:","https://doi.org/");e.push(new URL(n))}else if(r.includes("PMID:")){const n=r.replace("PMID:","https://pubmed.ncbi.nlm.nih.gov/");e.push(new URL(n))}});const t={resource:this.annotationEntry.resourceId,item:this.annotationEntry.featureId,evidence:e,comment:this.comment};this.$annotator.addAnnotation(this.userApiKey,t).then(()=>{this.errorMessage="",this.resetSubmission(),this.updatePrevSubmissions()}).catch(()=>{this.errorMessage="There is a problem with the submission, please try again later"})}},removeEvidence:function(e){this.evidence.splice(e,1)},resetSubmission:function(){this.editing=!1,this.evidence=[],this.newFeature="",this.comment=""}},watch:{annotationEntry:{handler:function(e,t){e!==t&&(this.resetSubmission(),this.updatePrevSubmissions())},immediate:!1,deep:!1}},mounted:function(){this.$annotator||(this.$annotator=new D$(`${this.flatmapAPI}annotator`)),this.$annotator.authenticate(this.userApiKey).then(e=>{e.name&&e.email?(this.authenticated=!0,this.updatePrevSubmissions()):this.errorMessage=""})}},d4=e=>(T.pushScopeId("data-v-928dfccf"),e=e(),T.popScopeId(),e),I$={class:"block"},k$=d4(()=>T.createElementVNode("span",{class:"title"},"Feature Annotations",-1)),R$=d4(()=>T.createElementVNode("strong",{class:"sub-title"},"Previous submissions:",-1)),B$=d4(()=>T.createElementVNode("strong",null,"Evidence: ",-1)),N$=["href"],F$=d4(()=>T.createElementVNode("strong",null,"Comment: ",-1)),j$=d4(()=>T.createElementVNode("strong",{class:"sub-title"},"Suggest changes:",-1)),z$=d4(()=>T.createElementVNode("strong",null,"Evidvence:",-1)),U$=d4(()=>T.createElementVNode("strong",null,"Comment:",-1)),$$={class:"sub-title"};function G$(e,t,r,n,i,o){const a=qa,s=uc,h=yi,d=F3,Q=xv,p=K3,g=k0,_=Oc,x=B6,b=vc,A=na,E=ub;return T.openBlock(),T.createBlock(E,{class:"main"},{default:T.withCtx(()=>[T.createElementVNode("div",I$,[T.createVNode(a,{class:"info-field"},{default:T.withCtx(()=>[k$]),_:1}),r.annotationEntry?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.displayPair,(O,V)=>T.withDirectives((T.openBlock(),T.createBlock(a,{class:"dialog-text",key:O},{default:T.withCtx(()=>[T.createElementVNode("strong",null,T.toDisplayString(V)+": ",1),T.createTextVNode(" "+T.toDisplayString(r.annotationEntry[O]),1)]),_:2},1024)),[[T.vShow,r.annotationEntry[O]]])),128)),e.prevSubs.length>0?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.withDirectives(T.createElementVNode("div",{class:"hide",onClick:t[0]||(t[0]=O=>e.showSubmissions=!1)},[T.createTextVNode(" Hide previous submissions "),T.createVNode(h,null,{default:T.withCtx(()=>[T.createVNode(s)]),_:1})],512),[[T.vShow,e.showSubmissions]]),T.withDirectives(T.createElementVNode("div",{class:"hide",onClick:t[1]||(t[1]=O=>e.showSubmissions=!0)},[T.createTextVNode(" Show previous "+T.toDisplayString(e.prevSubs.length)+" submission(s) ",1),T.createVNode(h,null,{default:T.withCtx(()=>[T.createVNode(d)]),_:1})],512),[[T.vShow,!e.showSubmissions]]),e.showSubmissions?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.createVNode(a,{class:"dialog-spacer"}),T.createVNode(a,{class:"dialog-text"},{default:T.withCtx(()=>[R$]),_:1}),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.prevSubs,(O,V)=>(T.openBlock(),T.createElementBlock("div",{class:"entry",key:V},[T.createVNode(a,{class:"dialog-text"},{default:T.withCtx(()=>[T.createElementVNode("strong",null,T.toDisplayString(o.formatTime(O.created)),1),T.createTextVNode(" "+T.toDisplayString(O.creator.name),1)]),_:2},1024),T.createVNode(a,{class:"dialog-text"},{default:T.withCtx(()=>[B$,(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(O.evidence,k=>(T.openBlock(),T.createBlock(a,{key:k,class:"dialog-text"},{default:T.withCtx(()=>[T.createElementVNode("a",{href:k,target:"_blank"},T.toDisplayString(k),9,N$)]),_:2},1024))),128))]),_:2},1024),T.createVNode(a,{class:"dialog-text"},{default:T.withCtx(()=>[F$,T.createTextVNode(" "+T.toDisplayString(O.comment),1)]),_:2},1024)]))),128))],64)):T.createCommentVNode("",!0)],64)):T.createCommentVNode("",!0),e.authenticated?(T.openBlock(),T.createElementBlock(T.Fragment,{key:1},[o.isEditable?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.createVNode(a,{class:"dialog-spacer"}),e.editing?(T.openBlock(),T.createElementBlock(T.Fragment,{key:1},[T.createVNode(a,{class:"dialog-text"},{default:T.withCtx(()=>[j$]),_:1}),T.createVNode(a,{class:"dialog-text"},{default:T.withCtx(()=>[z$]),_:1}),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.evidence,(O,V)=>(T.openBlock(),T.createBlock(a,{key:O},{default:T.withCtx(()=>[T.createVNode(p,{span:20},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(e.evidence[V]),1)]),_:2},1024),T.createVNode(p,{span:4},{default:T.withCtx(()=>[T.createVNode(h,{class:"standard-icon"},{default:T.withCtx(()=>[T.createVNode(g)]),_:1})]),_:1})]),_:2},1024))),128)),T.createVNode(a,null,{default:T.withCtx(()=>[T.createVNode(b,{size:"mini",placeholder:"Enter",modelValue:e.newEvidence,"onUpdate:modelValue":t[3]||(t[3]=O=>e.newEvidence=O),onChange:t[4]||(t[4]=O=>o.evidenceEntered(O))},{prepend:T.withCtx(()=>[T.createVNode(x,{teleported:!1,modelValue:e.evidencePrefix,"onUpdate:modelValue":t[2]||(t[2]=O=>e.evidencePrefix=O),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown"},{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.evidencePrefixes,O=>(T.openBlock(),T.createBlock(_,{key:O,label:O,value:O},{default:T.withCtx(()=>[T.createVNode(a,null,{default:T.withCtx(()=>[T.createVNode(p,{span:12},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(O),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),T.createVNode(a,null,{default:T.withCtx(()=>[U$]),_:1}),T.createVNode(a,{class:"dialog-text"},{default:T.withCtx(()=>[T.createVNode(b,{type:"textarea",autosize:{minRows:2,maxRows:4},placeholder:"Enter",modelValue:e.comment,"onUpdate:modelValue":t[5]||(t[5]=O=>e.comment=O)},null,8,["modelValue"])]),_:1}),T.createVNode(a,{class:"dialog-text"},{default:T.withCtx(()=>[T.createVNode(A,{class:"button",type:"primary",plain:"",onClick:o.submit},{default:T.withCtx(()=>[T.createTextVNode(" Submit ")]),_:1},8,["onClick"])]),_:1})],64)):(T.openBlock(),T.createBlock(a,{key:0},{default:T.withCtx(()=>[T.createVNode(h,{class:"standard-icon"},{default:T.withCtx(()=>[T.createVNode(Q)]),_:1})]),_:1})),e.errorMessage?(T.openBlock(),T.createBlock(a,{key:2,class:"dialog-text"},{default:T.withCtx(()=>[T.createElementVNode("strong",$$,T.toDisplayString(e.errorMessage),1)]),_:1})):T.createCommentVNode("",!0)],64)):T.createCommentVNode("",!0)],64)):T.createCommentVNode("",!0)],64)):T.createCommentVNode("",!0)])]),_:1})}const Lb=Wa(P$,[["render",G$],["__scopeId","data-v-928dfccf"]]),Z$={name:"Tooltip",components:{AnnotationTool:Lb,ProvenancePopup:bb},props:{entry:{type:Object},annotationDisplay:{type:Boolean,default:!1},annotationEntry:{type:Object}}},q$={class:"tooltip-container",id:"tooltip-container"};function W$(e,t,r,n,i,o){const a=Lb,s=bb;return T.openBlock(),T.createElementBlock("div",q$,[r.annotationDisplay?(T.openBlock(),T.createBlock(a,{key:0,annotationEntry:r.annotationEntry},null,8,["annotationEntry"])):(T.openBlock(),T.createBlock(s,{key:1,entry:r.entry},null,8,["entry"]))])}const FT=Wa(Z$,[["render",W$],["__scopeId","data-v-6190f48d"]]),X$={name:"SelectionsGroup",components:{Checkbox:Ac,CheckboxGroup:CT,Col:K3,Row:qa},methods:{reset:function(){this.checkAll=!0,this.checkedItems=[],this.selections.forEach(e=>{!("enabled"in e)||e.enabled===!0?this.checkedItems.push(e[this.identifierKey]):this.checkAll=!1})},visibilityToggle:function(e,t){this.$emit("changed",{key:e,value:t})},handleCheckedItemsChange:function(e){let t=e.length;this.checkAll=t===this.selections.length},handleCheckAllChange:function(e){this.checkedItems=e?this.selections.map(t=>t[this.identifierKey]):[],this.$emit("checkAll",{keys:this.selections.map(t=>t[this.identifierKey]),value:e})},getBackgroundStyles:function(e){return"colour"in e&&this.colourStyle==="background"?{background:e.colour}:{}},hasLineStyles:function(e){return"colour"in e&&this.colourStyle==="line"},getLineStyles:function(e){return"colour"in e&&this.colourStyle==="line"?"dashed"in e&&e.dashed===!0?{background:`repeating-linear-gradient(90deg,${e.colour},${e.colour} 6px,transparent 0,transparent 9px)`}:{background:e.colour}:{display:"None"}}},props:{colourStyle:{type:String,default:"line"},identifierKey:{type:String,default:"id"},labelKey:{type:String,default:"label"},title:{type:String,default:""},selections:{type:Array,default:function(){return[]}}},computed:{isIndeterminate:function(){return!(this.checkedItems.length===0||this.checkAll)}},data:function(){return{checkedItems:[],checkAll:!0}},mounted:function(){this.reset()}},K$={class:"selections-container"},Y$={class:"checkall-display-text"},J$={class:"checkbox-group-inner"},tG={class:"checkbox-container"};function eG(e,t,r,n,i,o){const a=K3,s=Ac,h=qa,d=CT;return T.openBlock(),T.createElementBlock("div",K$,[T.createVNode(h,null,{default:T.withCtx(()=>[T.createVNode(a,{span:12},{default:T.withCtx(()=>[T.createElementVNode("div",Y$,T.toDisplayString(r.title),1)]),_:1}),T.createVNode(a,{span:12},{default:T.withCtx(()=>[r.selections&&r.selections.length>1?(T.openBlock(),T.createBlock(s,{key:0,class:"all-checkbox",indeterminate:o.isIndeterminate,modelValue:e.checkAll,"onUpdate:modelValue":t[0]||(t[0]=Q=>e.checkAll=Q),onChange:o.handleCheckAllChange},{default:T.withCtx(()=>[T.createTextVNode("Display all")]),_:1},8,["indeterminate","modelValue","onChange"])):T.createCommentVNode("",!0)]),_:1})]),_:1}),T.createVNode(d,{modelValue:e.checkedItems,"onUpdate:modelValue":t[1]||(t[1]=Q=>e.checkedItems=Q),size:"small",class:"checkbox-group",onChange:o.handleCheckedItemsChange},{default:T.withCtx(()=>[T.createElementVNode("div",J$,[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.selections,Q=>(T.openBlock(),T.createBlock(h,{key:Q[r.identifierKey],label:Q[r.identifierKey]},{default:T.withCtx(()=>[T.createElementVNode("div",tG,[T.createVNode(s,{class:"my-checkbox",label:Q[r.identifierKey],onChange:p=>o.visibilityToggle(Q[r.identifierKey],p),checked:!("enabled"in Q)||Q.enabled===!0},{default:T.withCtx(()=>[T.createVNode(h,{class:"checkbox-row"},{default:T.withCtx(()=>[o.hasLineStyles(Q)?(T.openBlock(),T.createBlock(a,{key:0,span:4},{default:T.withCtx(()=>[T.createElementVNode("div",{class:"path-visual",style:T.normalizeStyle(o.getLineStyles(Q))},null,4)]),_:2},1024)):T.createCommentVNode("",!0),T.createVNode(a,{span:20},{default:T.withCtx(()=>[T.createElementVNode("div",{style:T.normalizeStyle(o.getBackgroundStyles(Q))},T.toDisplayString(Q[r.labelKey]),5)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","onChange","checked"])])]),_:2},1032,["label"]))),128))])]),_:1},8,["modelValue","onChange"])])}const wb=Wa(X$,[["render",eG],["__scopeId","data-v-4d3741da"]]),rG={name:"TreeControls",components:{Checkbox:Ac,CheckboxGroup:CT,ColorPicker:$z,Row:qa,Tree:yb},props:{treeData:{type:Array,default:function(){return[]}},active:{type:String,default:""},hover:{type:String,default:""}},data:function(){return{defaultExpandedKeys:["All"]}},unmounted:function(){this.sortedPrimitiveGroups=void 0},methods:{nodeIsActive:function(e){return this.active===e.models},nodeIsHover:function(e){return this.hover===e.models},changeActiveByNode:function(e){e.models&&this.$emit("change-active",e.models)},changeHoverByNode:function(){},checkChanged:function(e,t){const r=t.checkedKeys.includes(e.key);e.key==="All"?this.$emit("checkAll",r):this.$emit("changed",{key:e.key,value:r})},getBackgroundStyles:function(e){return"colour"in e?{background:e.colour}:{}}}},nG=e=>(T.pushScopeId("data-v-df242013"),e=e(),T.popScopeId(),e),iG={class:"container"},oG=nG(()=>T.createElementVNode("div",{class:"title-text"},"Systems",-1)),aG={class:"tree-container"},sG=["onClick","onMouseover"];function lG(e,t,r,n,i,o){const a=K3,s=qa,h=yb;return T.openBlock(),T.createElementBlock("div",iG,[T.createVNode(s,null,{default:T.withCtx(()=>[T.createVNode(a,{span:12},{default:T.withCtx(()=>[oG]),_:1})]),_:1}),T.createElementVNode("div",aG,[T.createVNode(h,{ref:"tree","node-key":"key","show-checkbox":"","check-strictly":!1,data:r.treeData,"render-after-expand":!1,"default-expanded-keys":e.defaultExpandedKeys,onCheck:o.checkChanged},{default:T.withCtx(({node:d,data:Q})=>[T.createElementVNode("span",{class:T.normalizeClass(["region-tree-node",{activeItem:o.nodeIsActive(Q),hoverItem:o.nodeIsHover(Q)}]),onClick:p=>o.changeActiveByNode(Q),onMouseover:p=>o.changeHoverByNode(Q)},[T.createElementVNode("div",{style:T.normalizeStyle(o.getBackgroundStyles(Q))},T.toDisplayString(d.label),5)],42,sG)]),_:1},8,["data","default-expanded-keys","onCheck"])])])}const Eb=Wa(rG,[["render",lG],["__scopeId","data-v-df242013"]]),cG={name:"SvgLegends"},uG=e=>(T.pushScopeId("data-v-88079d87"),e=e(),T.popScopeId(),e),hG={class:"legends-container"},dG={version:"1.1",id:"Layer_1",x:"0px",y:"0px",viewBox:"0 0 500 500",style:{"enable-background":"new 0 0 500 500"},xmlns:"http://www.w3.org/2000/svg","xmlns:bx":"https://boxy-svg.com"},fG=[T.createStaticVNode('<defs data-v-88079d87><bx:grid height="30.447" width="32.516" x="0" y="0" data-v-88079d87></bx:grid></defs><path class="st0 st0-translate" d="M61.3,103.8c-15.9,0-28.8-12.3-28.8-27.3c0-15,13-27.3,28.8-27.3s28.8,12.3,28.8,27.3 C90.1,91.5,77.2,103.8,61.3,103.8z" data-v-88079d87></path><path class="st1" d="M40.3,356.1C29.5,345,29.8,328,41.5,317.5c11.7-10.5,29.6-9.9,40.7,1.1c11.1,11,10.5,28.1-1.2,38.5 C69.3,367.4,51.1,366.9,40.3,356.1z" data-v-88079d87></path><path class="st2" d="M61.2,396.9c-5.3,9.3-15.3,15.1-26.1,15.1l-0.4,0.6c5.1,9,5.1,20,0,29l0.4,0.6c10.7,0,20.8,5.8,26.1,15.1 c5.3-9.3,15.3-15.1,26.1-15.1c-5.3-9.3-5.3-20.9,0-30.4C76.6,412.1,66.7,406.3,61.2,396.9z" data-v-88079d87></path><text transform="matrix(0.9908 0 0 1 118.0161 171.7975)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Tissue region </text><path class="st6" d="M40.9,231.1c11.3-10.6,29.5-10.6,40.8,0c11.3,10.6,11.3,27.9,0,38.5c-11.3,10.6-29.5,10.6-40.8,0 C29.7,259,29.7,241.7,40.9,231.1z" data-v-88079d87></path><text transform="matrix(0.9908 0 0 1 118.0161 257.675)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Brain nuclei </text><text transform="matrix(0.9908 0 0 1 118.0903 345.5266)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Ganglia </text><text transform="matrix(0.9908 0 0 1 118.0903 433.1613)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Ganglionated nerve plexus </text>',9)],TG=uG(()=>T.createElementVNode("svg",{width:"72px",height:"72px",viewBox:"0 0 24 24",fill:"yellow"},null,-1));function QG(e,t,r,n,i,o){return T.openBlock(),T.createElementBlock("div",hG,[(T.openBlock(),T.createElementBlock("svg",dG,fG)),TG])}const Mb=Wa(cG,[["render",QG],["__scopeId","data-v-88079d87"]]),pG='<div class="flatmap-marker"><svg display="block" height="41px" width="27px" viewBox="0 0 27 41"><g fill-rule="nonzero"><g transform="translate(3.0, 29.0)" fill="#000000"><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="9.5" ry="4.77275007"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="8.5" ry="4.29549936"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="7.5" ry="3.81822308"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="6.5" ry="3.34094679"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="5.5" ry="2.86367051"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="4.5" ry="2.38636864"></ellipse></g><g fill="#005974"><path d="M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"></path></g><g opacity="0.25" fill="#000000"><path d="M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"></path></g><g transform="translate(6.0, 7.0)" fill="#FFFFFF"></g><g transform="translate(8.0, 8.0)"><circle fill="#000000" opacity="0.25" cx="5.5" cy="5.5" r="5.4999962"></circle><circle fill="#FFFFFF" cx="5.5" cy="5.5" r="5.4999962"></circle></g></g></svg></div>',jc=function(e){return e?[...new Set(e.map(t=>JSON.stringify(t)))].map(t=>JSON.parse(t)):[]},tl={},Ab=async function(e,t){return tl&&tl.hasOwnProperty(t)?tl[t]:new Promise(r=>{fetch(`${e}knowledge/label/${t}`,{method:"GET"}).then(n=>n.json()).then(n=>{let i=n.label;i==="Mammalia"&&(i="Mammalia not otherwise specified"),tl[t]=i,r(i)}).catch(n=>{console.error("Error:",n),tl[t]=t,r(t)})})},zc=function(e,t){if(!e||!t)return!1;let r=JSON.stringify(e),n=JSON.stringify(t);return r.indexOf(n)!==-1};let mG=function(){this.initialise=function(e){this.flatmapApi=e,this.destinations=[],this.origins=[],this.components=[],this.urls=[],this.controller=void 0,this.uberons=[],this.lookUp=[]},this.createTooltipData=async function(e){let t=[];e.feature.hyperlinks&&e.feature.hyperlinks.length>0?t=e.feature.hyperlinks:t=this.urls.map(i=>({url:i,id:"pubmed"}));let r;if(e.provenanceTaxonomy){r=[];for(let i=0;e.provenanceTaxonomy.length>i;i++)r.push(await Ab(this.flatmapAPI,e.provenanceTaxonomy[i]))}return{destinations:this.destinations,origins:this.origins,components:this.components,destinationsWithDatasets:this.destinationsWithDatasets,originsWithDatasets:this.originsWithDatasets,componentsWithDatasets:this.componentsWithDatasets,title:e.label,featureId:e.resource,hyperlinks:t,provenanceTaxonomy:e.provenanceTaxonomy,provenanceTaxonomyLabel:r}},this.createComponentsLabelList=function(e,t){let r=[];return e.forEach(n=>{r.push(this.createLabelFromNeuralNode(n[0]),t),n.length===2&&r.push(this.createLabelFromNeuralNode(n[1]),t)}),r},this.createLabelLookup=function(e){return new Promise(t=>{let r={};this.uberons=[];const n={sql:this.buildLabelSqlStatement(e)};fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then(i=>i.json()).then(i=>{const o=i.keys.indexOf("entity"),a=i.keys.indexOf("label");o>-1&&a>-1&&i.values.forEach(s=>{r[s[o]]=s[a],this.uberons.push({id:s[o],name:s[a]})}),t(r)})})},this.buildConnectivitySqlStatement=function(e){let t="select knowledge from knowledge where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.buildLabelSqlStatement=function(e){let t="select entity, label from labels where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.findAllIdsFromConnectivity=function(e){let t=e.connectivity.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),[...new Set(n.flat())]},this.flattenConntectivity=function(e){let t=e.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),n.flat()},this.findComponents=function(e){let t=e.connectivity.flat(),r=jc(t),n=[],i=!1;return r.forEach(o=>{i=!1,zc(e.axons,o)&&(i=!0),zc(e.dendrites,o)&&(i=!0),i||n.push(o)}),n},this.retrieveFlatmapKnowledgeForEvent=async function(e){this.controller&&this.controller.abort(),this.controller=new AbortController;const t=this.controller.signal,r=e.resource;if(this.destinations=[],this.origins=[],this.components=[],!r||r.length==0)return;const n={sql:this.buildConnectivitySqlStatement(r)};let i=new Promise(s=>{fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),signal:t}).then(h=>h.json()).then(h=>{if(this.connectivityExists(h)){let d=JSON.parse(h.values[0][0]);this.processConnectivity(d).then(()=>{s(!0)})}else s(!1)}).catch(h=>{console.error("Error:",h),s(!1)})}),o=await this.pubmedQueryOnIds(e);return await Promise.all([i,o])},this.connectivityExists=function(e){return!!(e.values&&e.values.length>0&&JSON.parse(e.values[0][0]).connectivity&&JSON.parse(e.values[0][0]).connectivity.length>0)},this.createLabelFromNeuralNode=function(e,t){let r=t[e[0]];return e.length===2&&e[1].length>0&&e[1].forEach(n=>{t[n]==null?r+=`, ${n}`:r+=`, ${t[n]}`}),r},this.flattenAndFindDatasets=function(e,t,r){let n=this.flattenConntectivity(e),i=this.flattenConntectivity(t),o=this.flattenConntectivity(r);this.destinationsWithDatasets=this.uberons.filter(a=>i.indexOf(a.id)!==-1),this.originsWithDatasets=this.uberons.filter(a=>o.indexOf(a.id)!==-1),this.componentsWithDatasets=this.uberons.filter(a=>n.indexOf(a.id)!==-1)},this.processConnectivity=function(e){return new Promise(t=>{let r=this.findComponents(e),n=jc(e.axons),i=jc(e.dendrites),o=this.findAllIdsFromConnectivity(e);this.createLabelLookup(o).then(a=>{this.destinations=n.map(s=>this.createLabelFromNeuralNode(s,a)),this.origins=i.map(s=>this.createLabelFromNeuralNode(s,a)),this.components=r.map(s=>this.createLabelFromNeuralNode(s,a)),this.flattenAndFindDatasets(r,n,i),t(!0)})})},this.flattenConntectivity=function(e){let t=e.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),n.flat()},this.findComponents=function(e){let t=e.connectivity.flat(),r=jc(t),n=[],i=!1;return r.forEach(o=>{i=!1,zc(e.axons,o)&&(i=!0),zc(e.dendrites,o)&&(i=!0),i||n.push(o)}),n},this.stripPMIDPrefix=function(e){return e.split(":")[1]},this.buildPubmedSqlStatement=function(e){let t="select distinct publication from publications where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.buildPubmedSqlStatementForModels=function(e){return`select distinct publication from publications where entity = '${e}'`},this.flatmapQuery=function(e){const t={sql:e};return fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(r=>r.json()).catch(r=>{console.error("Error:",r)})},this.pubmedQueryOnIds=function(e){return new Promise(t=>{const r=e.resource,n=e.feature.source;if(!r||r.length===0)return;const i=this.buildPubmedSqlStatement(r);this.flatmapQuery(i).then(o=>{o.values.length>0?(this.urls=[this.pubmedSearchUrl(o.values.map(a=>this.stripPMIDPrefix(a[0])))],t(!0)):this.pubmedQueryOnModels(n).then(a=>{t(a)})})})},this.pubmedQueryOnModels=function(e){return this.flatmapQuery(this.buildPubmedSqlStatementForModels(e)).then(t=>Array.isArray(t.values)&&t.values.length>0?(this.urls=[this.pubmedSearchUrl(t.values.map(r=>this.stripPMIDPrefix(r[0])))],!0):(this.urls=[],!1))},this.pubmedSearchUrl=function(e){let t="https://pubmed.ncbi.nlm.nih.gov/?",r=new URLSearchParams;return r.append("term",e),t+r.toString()}};const gG='<svg width="195px" height="24px" viewBox="0 0 200 24" fill="yellow"><path d="M22.0748 3.25583C22.4141 2.42845 23.5859 2.42845 23.9252 3.25583L25.6493 7.45955C25.793 7.80979 26.1221 8.04889 26.4995 8.07727L31.0303 8.41798C31.922 8.48504 32.2841 9.59942 31.6021 10.1778L28.1369 13.1166C27.8482 13.3614 27.7225 13.7483 27.8122 14.1161L28.8882 18.5304C29.1 19.3992 28.152 20.0879 27.3912 19.618L23.5255 17.2305C23.2034 17.0316 22.7966 17.0316 22.4745 17.2305L18.60881 19.618C17.84796 20.0879 16.9 19.3992 17.1118 18.5304L18.18785 14.1161C18.2775 13.7483 18.1518 13.3614 17.86309 13.1166L14.3979 10.1778C13.71588 9.59942 14.07796 8.48504 14.96971 8.41798L19.50046 8.07727C19.87794 8.04889 20.20704 7.80979 20.35068 7.45955L22.0748 3.25583Z" stroke="#000000" stroke-width="2"/><text x="42" y="50%" dominant-baseline="middle" text-anchor="start" font-family="Asap, sans-serif" font-size="12" fill="#000000">Featured dataset marker</text></svg>';var Cb={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(typeof window<"u"?window:P,function(){if(typeof window>"u")return null;var r=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),n=r.requestAnimationFrame||r.mozRequestAnimationFrame||r.webkitRequestAnimationFrame||function(Q){return r.setTimeout(Q,20)},i=r.cancelAnimationFrame||r.mozCancelAnimationFrame||r.webkitCancelAnimationFrame||function(Q){r.clearTimeout(Q)};function o(Q,p){var g=Object.prototype.toString.call(Q),_=g==="[object Array]"||g==="[object NodeList]"||g==="[object HTMLCollection]"||g==="[object Object]"||typeof jQuery<"u"&&Q instanceof jQuery||typeof Elements<"u"&&Q instanceof Elements,x=0,b=Q.length;if(_)for(;x<b;x++)p(Q[x]);else p(Q)}function a(Q){if(!Q.getBoundingClientRect)return{width:Q.offsetWidth,height:Q.offsetHeight};var p=Q.getBoundingClientRect();return{width:Math.round(p.width),height:Math.round(p.height)}}function s(Q,p){Object.keys(p).forEach(function(g){Q.style[g]=p[g]})}var h=function(Q,p){var g=0;function _(){var b=[];this.add=function(O){b.push(O)};var A,E;this.call=function(O){for(A=0,E=b.length;A<E;A++)b[A].call(this,O)},this.remove=function(O){var V=[];for(A=0,E=b.length;A<E;A++)b[A]!==O&&V.push(b[A]);b=V},this.length=function(){return b.length}}function x(b,A){if(b){if(b.resizedAttached){b.resizedAttached.add(A);return}b.resizedAttached=new _,b.resizedAttached.add(A),b.resizeSensor=document.createElement("div"),b.resizeSensor.dir="ltr",b.resizeSensor.className="resize-sensor";var E={pointerEvents:"none",position:"absolute",left:"0px",top:"0px",right:"0px",bottom:"0px",overflow:"hidden",zIndex:"-1",visibility:"hidden",maxWidth:"100%"},O={position:"absolute",left:"0px",top:"0px",transition:"0s"};s(b.resizeSensor,E);var V=document.createElement("div");V.className="resize-sensor-expand",s(V,E);var k=document.createElement("div");s(k,O),V.appendChild(k);var j=document.createElement("div");j.className="resize-sensor-shrink",s(j,E);var $=document.createElement("div");s($,O),s($,{width:"200%",height:"200%"}),j.appendChild($),b.resizeSensor.appendChild(V),b.resizeSensor.appendChild(j),b.appendChild(b.resizeSensor);var U=window.getComputedStyle(b),J=U?U.getPropertyValue("position"):null;J!=="absolute"&&J!=="relative"&&J!=="fixed"&&J!=="sticky"&&(b.style.position="relative");var tt=!1,rt=0,st=a(b),pt=0,St=0,$t=!0;g=0;var ie=function(){var qt=b.offsetWidth,le=b.offsetHeight;k.style.width=qt+10+"px",k.style.height=le+10+"px",V.scrollLeft=qt+10,V.scrollTop=le+10,j.scrollLeft=qt+10,j.scrollTop=le+10},me=function(){if($t){var qt=b.offsetWidth===0&&b.offsetHeight===0;if(qt){g||(g=n(function(){g=0,me()}));return}else $t=!1}ie()};b.resizeSensor.resetSensor=me;var Ft=function(){rt=0,tt&&(pt=st.width,St=st.height,b.resizedAttached&&b.resizedAttached.call(st))},he=function(){st=a(b),tt=st.width!==pt||st.height!==St,tt&&!rt&&(rt=n(Ft)),me()},cr=function(qt,le,Qe){qt.attachEvent?qt.attachEvent("on"+le,Qe):qt.addEventListener(le,Qe)};cr(V,"scroll",he),cr(j,"scroll",he),g=n(function(){g=0,me()})}}o(Q,function(b){x(b,p)}),this.detach=function(b){g||(i(g),g=0),h.detach(Q,b)},this.reset=function(){Q.resizeSensor.resetSensor()}};if(h.reset=function(Q){o(Q,function(p){p.resizeSensor.resetSensor()})},h.detach=function(Q,p){o(Q,function(g){g&&(g.resizedAttached&&typeof p=="function"&&(g.resizedAttached.remove(p),g.resizedAttached.length())||g.resizeSensor&&(g.contains(g.resizeSensor)&&g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached))})},typeof MutationObserver<"u"){var d=new MutationObserver(function(Q){for(var p in Q)if(Q.hasOwnProperty(p))for(var g=Q[p].addedNodes,_=0;_<g.length;_++)g[_].resizeSensor&&h.reset(g[_])});document.addEventListener("DOMContentLoaded",function(Q){d.observe(document.body,{childList:!0,subtree:!0})})}return h})})(Cb);var yG=Cb.exports;const _G=q0(yG);var Sb={exports:{}};/**
|
|
19
|
+
`,ON=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function VN(e){const t=window.getComputedStyle(e),r=t.getPropertyValue("box-sizing"),n=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),i=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:ON.map(a=>`${a}:${t.getPropertyValue(a)}`).join(";"),paddingSize:n,borderSize:i,boxSizing:r}}function dx(e,t=1,r){var n;xo||(xo=document.createElement("textarea"),document.body.appendChild(xo));const{paddingSize:i,borderSize:o,boxSizing:a,contextStyle:s}=VN(e);xo.setAttribute("style",`${s};${HN}`),xo.value=e.value||e.placeholder||"";let h=xo.scrollHeight;const d={};a==="border-box"?h=h+o:a==="content-box"&&(h=h-i),xo.value="";const Q=xo.scrollHeight-i;if(X1(t)){let p=Q*t;a==="border-box"&&(p=p+i+o),h=Math.max(p,h),d.minHeight=`${p}px`}if(X1(r)){let p=Q*r;a==="border-box"&&(p=p+i+o),h=Math.min(p,h)}return d.height=`${h}px`,(n=xo.parentNode)==null||n.removeChild(xo),xo=void 0,d}const DN=Qn({id:{type:String,default:void 0},size:U3,disabled:Boolean,modelValue:{type:Er([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:Er([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},showWordLimit:{type:Boolean,default:!1},suffixIcon:{type:j3},prefixIcon:{type:j3},containerRole:{type:String,default:void 0},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:Er([Object,Array,String]),default:()=>E6({})},autofocus:{type:Boolean,default:!1}}),PN={[A1]:e=>W1(e),input:e=>W1(e),change:e=>W1(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},IN=["role"],kN=["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus"],RN=["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus"],BN=T.defineComponent({name:"ElInput",inheritAttrs:!1}),NN=T.defineComponent({...BN,props:DN,emits:PN,setup(e,{expose:t,emit:r}){const n=e,i=T.useAttrs(),o=T.useSlots(),a=T.computed(()=>{const pe={};return n.containerRole==="combobox"&&(pe["aria-haspopup"]=i["aria-haspopup"],pe["aria-owns"]=i["aria-owns"],pe["aria-expanded"]=i["aria-expanded"]),pe}),s=T.computed(()=>[n.type==="textarea"?A.b():b.b(),b.m(_.value),b.is("disabled",x.value),b.is("exceed",Fe.value),{[b.b("group")]:o.prepend||o.append,[b.bm("group","append")]:o.append,[b.bm("group","prepend")]:o.prepend,[b.m("prefix")]:o.prefix||n.prefixIcon,[b.m("suffix")]:o.suffix||n.suffixIcon||n.clearable||n.showPassword,[b.bm("suffix","password-clear")]:qt.value&&le.value},i.class]),h=T.computed(()=>[b.e("wrapper"),b.is("focus",rt.value)]),d=rB({excludeKeys:T.computed(()=>Object.keys(a.value))}),{form:Q,formItem:p}=G3(),{inputId:g}=D6(n,{formItemContext:p}),_=$3(),x=V6(),b=Cr("input"),A=Cr("textarea"),E=T.shallowRef(),O=T.shallowRef(),V=T.ref(!1),k=T.ref(!1),j=T.ref(!1),$=T.ref(),U=T.shallowRef(n.inputStyle),J=T.computed(()=>E.value||O.value),{wrapperRef:tt,isFocused:rt,handleFocus:st,handleBlur:pt}=dT(J,{afterBlur(){var pe;n.validateEvent&&((pe=p==null?void 0:p.validate)==null||pe.call(p,"blur").catch(ur=>K1(ur)))}}),St=T.computed(()=>{var pe;return(pe=Q==null?void 0:Q.statusIcon)!=null?pe:!1}),$t=T.computed(()=>(p==null?void 0:p.validateState)||""),ie=T.computed(()=>$t.value&&Ev[$t.value]),me=T.computed(()=>j.value?WR:UR),Ft=T.computed(()=>[i.style]),he=T.computed(()=>[n.inputStyle,U.value,{resize:n.resize}]),cr=T.computed(()=>B3(n.modelValue)?"":String(n.modelValue)),qt=T.computed(()=>n.clearable&&!x.value&&!n.readonly&&!!cr.value&&(rt.value||V.value)),le=T.computed(()=>n.showPassword&&!x.value&&!n.readonly&&!!cr.value&&(!!cr.value||rt.value)),Qe=T.computed(()=>n.showWordLimit&&!!n.maxlength&&(n.type==="text"||n.type==="textarea")&&!x.value&&!n.readonly&&!n.showPassword),xe=T.computed(()=>cr.value.length),Fe=T.computed(()=>!!Qe.value&&xe.value>Number(n.maxlength)),Ue=T.computed(()=>!!o.suffix||!!n.suffixIcon||qt.value||n.showPassword||Qe.value||!!$t.value&&St.value),[je,Bt]=xN(E);Fa(O,pe=>{if(zt(),!Qe.value||n.resize!=="both")return;const ur=pe[0],{width:Yr}=ur.contentRect;$.value={right:`calc(100% - ${Yr+15+6}px)`}});const Zt=()=>{const{type:pe,autosize:ur}=n;if(!(!q1||pe!=="textarea"||!O.value))if(ur){const Yr=gi(ur)?ur.minRows:void 0,wn=gi(ur)?ur.maxRows:void 0,fe=dx(O.value,Yr,wn);U.value={overflowY:"hidden",...fe},T.nextTick(()=>{O.value.offsetHeight,U.value=fe})}else U.value={minHeight:dx(O.value).minHeight}},zt=(pe=>{let ur=!1;return()=>{var Yr;if(ur||!n.autosize)return;((Yr=O.value)==null?void 0:Yr.offsetParent)===null||(pe(),ur=!0)}})(Zt),de=()=>{const pe=J.value,ur=n.formatter?n.formatter(cr.value):cr.value;!pe||pe.value===ur||(pe.value=ur)},Re=async pe=>{je();let{value:ur}=pe.target;if(n.formatter&&(ur=n.parser?n.parser(ur):ur),!k.value){if(ur===cr.value){de();return}r(A1,ur),r("input",ur),await T.nextTick(),de(),Bt()}},Ce=pe=>{r("change",pe.target.value)},He=pe=>{r("compositionstart",pe),k.value=!0},Pe=pe=>{var ur;r("compositionupdate",pe);const Yr=(ur=pe.target)==null?void 0:ur.value,wn=Yr[Yr.length-1]||"";k.value=!Av(wn)},ze=pe=>{r("compositionend",pe),k.value&&(k.value=!1,Re(pe))},Ut=()=>{j.value=!j.value,Vr()},Vr=async()=>{var pe;await T.nextTick(),(pe=J.value)==null||pe.focus()},pn=()=>{var pe;return(pe=J.value)==null?void 0:pe.blur()},Ke=pe=>{V.value=!1,r("mouseleave",pe)},_r=pe=>{V.value=!0,r("mouseenter",pe)},Nn=pe=>{r("keydown",pe)},H1=()=>{var pe;(pe=J.value)==null||pe.select()},Ln=()=>{r(A1,""),r("change",""),r("clear"),r("input","")};return T.watch(()=>n.modelValue,()=>{var pe;T.nextTick(()=>Zt()),n.validateEvent&&((pe=p==null?void 0:p.validate)==null||pe.call(p,"change").catch(ur=>K1(ur)))}),T.watch(cr,()=>de()),T.watch(()=>n.type,async()=>{await T.nextTick(),de(),Zt()}),T.onMounted(()=>{!n.formatter&&n.parser&&K1("ElInput","If you set the parser, you also need to set the formatter."),de(),T.nextTick(Zt)}),t({input:E,textarea:O,ref:J,textareaStyle:he,autosize:T.toRef(n,"autosize"),focus:Vr,blur:pn,select:H1,clear:Ln,resizeTextarea:Zt}),(pe,ur)=>T.withDirectives((T.openBlock(),T.createElementBlock("div",T.mergeProps(T.unref(a),{class:T.unref(s),style:T.unref(Ft),role:pe.containerRole,onMouseenter:_r,onMouseleave:Ke}),[T.createCommentVNode(" input "),pe.type!=="textarea"?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.createCommentVNode(" prepend slot "),pe.$slots.prepend?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(T.unref(b).be("group","prepend"))},[T.renderSlot(pe.$slots,"prepend")],2)):T.createCommentVNode("v-if",!0),T.createElementVNode("div",{ref_key:"wrapperRef",ref:tt,class:T.normalizeClass(T.unref(h))},[T.createCommentVNode(" prefix slot "),pe.$slots.prefix||pe.prefixIcon?(T.openBlock(),T.createElementBlock("span",{key:0,class:T.normalizeClass(T.unref(b).e("prefix"))},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(b).e("prefix-inner"))},[T.renderSlot(pe.$slots,"prefix"),pe.prefixIcon?(T.openBlock(),T.createBlock(T.unref(yi),{key:0,class:T.normalizeClass(T.unref(b).e("icon"))},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(pe.prefixIcon)))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0)],2)],2)):T.createCommentVNode("v-if",!0),T.createElementVNode("input",T.mergeProps({id:T.unref(g),ref_key:"input",ref:E,class:T.unref(b).e("inner")},T.unref(d),{minlength:pe.minlength,maxlength:pe.maxlength,type:pe.showPassword?j.value?"text":"password":pe.type,disabled:T.unref(x),readonly:pe.readonly,autocomplete:pe.autocomplete,tabindex:pe.tabindex,"aria-label":pe.label,placeholder:pe.placeholder,style:pe.inputStyle,form:pe.form,autofocus:pe.autofocus,onCompositionstart:He,onCompositionupdate:Pe,onCompositionend:ze,onInput:Re,onFocus:ur[0]||(ur[0]=(...Yr)=>T.unref(st)&&T.unref(st)(...Yr)),onBlur:ur[1]||(ur[1]=(...Yr)=>T.unref(pt)&&T.unref(pt)(...Yr)),onChange:Ce,onKeydown:Nn}),null,16,kN),T.createCommentVNode(" suffix slot "),T.unref(Ue)?(T.openBlock(),T.createElementBlock("span",{key:1,class:T.normalizeClass(T.unref(b).e("suffix"))},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(b).e("suffix-inner"))},[!T.unref(qt)||!T.unref(le)||!T.unref(Qe)?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.renderSlot(pe.$slots,"suffix"),pe.suffixIcon?(T.openBlock(),T.createBlock(T.unref(yi),{key:0,class:T.normalizeClass(T.unref(b).e("icon"))},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(pe.suffixIcon)))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0)],64)):T.createCommentVNode("v-if",!0),T.unref(qt)?(T.openBlock(),T.createBlock(T.unref(yi),{key:1,class:T.normalizeClass([T.unref(b).e("icon"),T.unref(b).e("clear")]),onMousedown:T.withModifiers(T.unref(M0),["prevent"]),onClick:Ln},{default:T.withCtx(()=>[T.createVNode(T.unref(Jf))]),_:1},8,["class","onMousedown"])):T.createCommentVNode("v-if",!0),T.unref(le)?(T.openBlock(),T.createBlock(T.unref(yi),{key:2,class:T.normalizeClass([T.unref(b).e("icon"),T.unref(b).e("password")]),onClick:Ut},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(T.unref(me))))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0),T.unref(Qe)?(T.openBlock(),T.createElementBlock("span",{key:3,class:T.normalizeClass(T.unref(b).e("count"))},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(b).e("count-inner"))},T.toDisplayString(T.unref(xe))+" / "+T.toDisplayString(pe.maxlength),3)],2)):T.createCommentVNode("v-if",!0),T.unref($t)&&T.unref(ie)&&T.unref(St)?(T.openBlock(),T.createBlock(T.unref(yi),{key:4,class:T.normalizeClass([T.unref(b).e("icon"),T.unref(b).e("validateIcon"),T.unref(b).is("loading",T.unref($t)==="validating")])},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(T.unref(ie))))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0)],2)],2)):T.createCommentVNode("v-if",!0)],2),T.createCommentVNode(" append slot "),pe.$slots.append?(T.openBlock(),T.createElementBlock("div",{key:1,class:T.normalizeClass(T.unref(b).be("group","append"))},[T.renderSlot(pe.$slots,"append")],2)):T.createCommentVNode("v-if",!0)],64)):(T.openBlock(),T.createElementBlock(T.Fragment,{key:1},[T.createCommentVNode(" textarea "),T.createElementVNode("textarea",T.mergeProps({id:T.unref(g),ref_key:"textarea",ref:O,class:T.unref(A).e("inner")},T.unref(d),{minlength:pe.minlength,maxlength:pe.maxlength,tabindex:pe.tabindex,disabled:T.unref(x),readonly:pe.readonly,autocomplete:pe.autocomplete,style:T.unref(he),"aria-label":pe.label,placeholder:pe.placeholder,form:pe.form,autofocus:pe.autofocus,onCompositionstart:He,onCompositionupdate:Pe,onCompositionend:ze,onInput:Re,onFocus:ur[2]||(ur[2]=(...Yr)=>T.unref(st)&&T.unref(st)(...Yr)),onBlur:ur[3]||(ur[3]=(...Yr)=>T.unref(pt)&&T.unref(pt)(...Yr)),onChange:Ce,onKeydown:Nn}),null,16,RN),T.unref(Qe)?(T.openBlock(),T.createElementBlock("span",{key:0,style:T.normalizeStyle($.value),class:T.normalizeClass(T.unref(b).e("count"))},T.toDisplayString(T.unref(xe))+" / "+T.toDisplayString(pe.maxlength),7)):T.createCommentVNode("v-if",!0)],64))],16,IN)),[[T.vShow,pe.type!=="hidden"]])}});var FN=Sr(NN,[["__file","input.vue"]]);const vc=Xi(FN),P6=4,jN={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"}},zN=({move:e,size:t,bar:r})=>({[r.size]:t,transform:`translate${r.axis}(${e}%)`}),fx=Symbol("scrollbarContextKey"),UN=Qn({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),$N="Thumb";var Tx=Sr(T.defineComponent({__name:"thumb",props:UN,setup(e){const t=e,r=T.inject(fx),n=Cr("scrollbar");r||SR($N,"can not inject scrollbar context");const i=T.ref(),o=T.ref(),a=T.ref({}),s=T.ref(!1);let h=!1,d=!1,Q=q1?document.onselectstart:null;const p=T.computed(()=>jN[t.vertical?"vertical":"horizontal"]),g=T.computed(()=>zN({size:t.size,move:t.move,bar:p.value})),_=T.computed(()=>i.value[p.value.offset]**2/r.wrapElement[p.value.scrollSize]/t.ratio/o.value[p.value.offset]),x=$=>{var U;if($.stopPropagation(),$.ctrlKey||[1,2].includes($.button))return;(U=window.getSelection())==null||U.removeAllRanges(),A($);const J=$.currentTarget;J&&(a.value[p.value.axis]=J[p.value.offset]-($[p.value.client]-J.getBoundingClientRect()[p.value.direction]))},b=$=>{if(!o.value||!i.value||!r.wrapElement)return;const U=Math.abs($.target.getBoundingClientRect()[p.value.direction]-$[p.value.client]),J=o.value[p.value.offset]/2,tt=(U-J)*100*_.value/i.value[p.value.offset];r.wrapElement[p.value.scroll]=tt*r.wrapElement[p.value.scrollSize]/100},A=$=>{$.stopImmediatePropagation(),h=!0,document.addEventListener("mousemove",E),document.addEventListener("mouseup",O),Q=document.onselectstart,document.onselectstart=()=>!1},E=$=>{if(!i.value||!o.value||h===!1)return;const U=a.value[p.value.axis];if(!U)return;const J=(i.value.getBoundingClientRect()[p.value.direction]-$[p.value.client])*-1,tt=o.value[p.value.offset]-U,rt=(J-tt)*100*_.value/i.value[p.value.offset];r.wrapElement[p.value.scroll]=rt*r.wrapElement[p.value.scrollSize]/100},O=()=>{h=!1,a.value[p.value.axis]=0,document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",O),j(),d&&(s.value=!1)},V=()=>{d=!1,s.value=!!t.size},k=()=>{d=!0,s.value=h};T.onBeforeUnmount(()=>{j(),document.removeEventListener("mouseup",O)});const j=()=>{document.onselectstart!==Q&&(document.onselectstart=Q)};return k3(T.toRef(r,"scrollbarElement"),"mousemove",V),k3(T.toRef(r,"scrollbarElement"),"mouseleave",k),($,U)=>(T.openBlock(),T.createBlock(T.Transition,{name:T.unref(n).b("fade"),persisted:""},{default:T.withCtx(()=>[T.withDirectives(T.createElementVNode("div",{ref_key:"instance",ref:i,class:T.normalizeClass([T.unref(n).e("bar"),T.unref(n).is(T.unref(p).key)]),onMousedown:b},[T.createElementVNode("div",{ref_key:"thumb",ref:o,class:T.normalizeClass(T.unref(n).e("thumb")),style:T.normalizeStyle(T.unref(g)),onMousedown:x},null,38)],34),[[T.vShow,$.always||s.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const GN=Qn({always:{type:Boolean,default:!0},width:String,height:String,ratioX:{type:Number,default:1},ratioY:{type:Number,default:1}});var ZN=Sr(T.defineComponent({__name:"bar",props:GN,setup(e,{expose:t}){const r=e,n=T.ref(0),i=T.ref(0);return t({handleScroll:a=>{if(a){const s=a.offsetHeight-P6,h=a.offsetWidth-P6;i.value=a.scrollTop*100/s*r.ratioY,n.value=a.scrollLeft*100/h*r.ratioX}}}),(a,s)=>(T.openBlock(),T.createElementBlock(T.Fragment,null,[T.createVNode(Tx,{move:n.value,ratio:a.ratioX,size:a.width,always:a.always},null,8,["move","ratio","size","always"]),T.createVNode(Tx,{move:i.value,ratio:a.ratioY,size:a.height,vertical:"",always:a.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const qN=Qn({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:Er([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},id:String,role:String,ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical"]}}),WN={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(X1)},QT="ElScrollbar",XN=T.defineComponent({name:QT}),KN=T.defineComponent({...XN,props:qN,emits:WN,setup(e,{expose:t,emit:r}){const n=e,i=Cr("scrollbar");let o,a;const s=T.ref(),h=T.ref(),d=T.ref(),Q=T.ref("0"),p=T.ref("0"),g=T.ref(),_=T.ref(1),x=T.ref(1),b=T.computed(()=>{const U={};return n.height&&(U.height=w6(n.height)),n.maxHeight&&(U.maxHeight=w6(n.maxHeight)),[n.wrapStyle,U]}),A=T.computed(()=>[n.wrapClass,i.e("wrap"),{[i.em("wrap","hidden-default")]:!n.native}]),E=T.computed(()=>[i.e("view"),n.viewClass]),O=()=>{var U;h.value&&((U=g.value)==null||U.handleScroll(h.value),r("scroll",{scrollTop:h.value.scrollTop,scrollLeft:h.value.scrollLeft}))};function V(U,J){gi(U)?h.value.scrollTo(U):X1(U)&&X1(J)&&h.value.scrollTo(U,J)}const k=U=>{if(!X1(U)){K1(QT,"value must be a number");return}h.value.scrollTop=U},j=U=>{if(!X1(U)){K1(QT,"value must be a number");return}h.value.scrollLeft=U},$=()=>{if(!h.value)return;const U=h.value.offsetHeight-P6,J=h.value.offsetWidth-P6,tt=U**2/h.value.scrollHeight,rt=J**2/h.value.scrollWidth,st=Math.max(tt,n.minSize),pt=Math.max(rt,n.minSize);_.value=tt/(U-tt)/(st/(U-st)),x.value=rt/(J-rt)/(pt/(J-pt)),p.value=st+P6<U?`${st}px`:"",Q.value=pt+P6<J?`${pt}px`:""};return T.watch(()=>n.noresize,U=>{U?(o==null||o(),a==null||a()):({stop:o}=Fa(d,$),a=k3("resize",$))},{immediate:!0}),T.watch(()=>[n.maxHeight,n.height],()=>{n.native||T.nextTick(()=>{var U;$(),h.value&&((U=g.value)==null||U.handleScroll(h.value))})}),T.provide(fx,T.reactive({scrollbarElement:s,wrapElement:h})),T.onMounted(()=>{n.native||T.nextTick(()=>{$()})}),T.onUpdated(()=>$()),t({wrapRef:h,update:$,scrollTo:V,setScrollTop:k,setScrollLeft:j,handleScroll:O}),(U,J)=>(T.openBlock(),T.createElementBlock("div",{ref_key:"scrollbarRef",ref:s,class:T.normalizeClass(T.unref(i).b())},[T.createElementVNode("div",{ref_key:"wrapRef",ref:h,class:T.normalizeClass(T.unref(A)),style:T.normalizeStyle(T.unref(b)),onScroll:O},[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(U.tag),{id:U.id,ref_key:"resizeRef",ref:d,class:T.normalizeClass(T.unref(E)),style:T.normalizeStyle(U.viewStyle),role:U.role,"aria-label":U.ariaLabel,"aria-orientation":U.ariaOrientation},{default:T.withCtx(()=>[T.renderSlot(U.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],38),U.native?T.createCommentVNode("v-if",!0):(T.openBlock(),T.createBlock(ZN,{key:0,ref_key:"barRef",ref:g,height:p.value,width:Q.value,always:U.always,"ratio-x":x.value,"ratio-y":_.value},null,8,["height","width","always","ratio-x","ratio-y"]))],2))}});var YN=Sr(KN,[["__file","scrollbar.vue"]]);const JN=Xi(YN),pT=Symbol("popper"),Qx=Symbol("popperContent"),px=Qn({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),tF=T.defineComponent({name:"ElPopper",inheritAttrs:!1}),eF=T.defineComponent({...tF,props:px,setup(e,{expose:t}){const r=e,n=T.ref(),i=T.ref(),o=T.ref(),a=T.ref(),s=T.computed(()=>r.role),h={triggerRef:n,popperInstanceRef:i,contentRef:o,referenceRef:a,role:s};return t(h),T.provide(pT,h),(d,Q)=>T.renderSlot(d.$slots,"default")}});var rF=Sr(eF,[["__file","popper.vue"]]);const mx=Qn({arrowOffset:{type:Number,default:5}}),nF=T.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),iF=T.defineComponent({...nF,props:mx,setup(e,{expose:t}){const r=e,n=Cr("popper"),{arrowOffset:i,arrowRef:o,arrowStyle:a}=T.inject(Qx,void 0);return T.watch(()=>r.arrowOffset,s=>{i.value=s}),T.onBeforeUnmount(()=>{o.value=void 0}),t({arrowRef:o}),(s,h)=>(T.openBlock(),T.createElementBlock("span",{ref_key:"arrowRef",ref:o,class:T.normalizeClass(T.unref(n).e("arrow")),style:T.normalizeStyle(T.unref(a)),"data-popper-arrow":""},null,6))}});var oF=Sr(iF,[["__file","arrow.vue"]]);const mT="ElOnlyChild",aF=T.defineComponent({name:mT,setup(e,{slots:t,attrs:r}){var n;const i=T.inject(ox),o=vN((n=i==null?void 0:i.setForwardRef)!=null?n:M0);return()=>{var a;const s=(a=t.default)==null?void 0:a.call(t,r);if(!s)return null;if(s.length>1)return K1(mT,"requires exact only one valid child."),null;const h=gx(s);return h?T.withDirectives(T.cloneVNode(h,r),[[o]]):(K1(mT,"no valid child node found"),null)}}});function gx(e){if(!e)return null;const t=e;for(const r of t){if(gi(r))switch(r.type){case T.Comment:continue;case T.Text:case"svg":return yx(r);case T.Fragment:return gx(r.children);default:return r}return yx(r)}return null}function yx(e){const t=Cr("only-child");return T.createVNode("span",{class:t.e("content")},[e])}const _x=Qn({virtualRef:{type:Er(Object)},virtualTriggering:Boolean,onMouseenter:{type:Er(Function)},onMouseleave:{type:Er(Function)},onClick:{type:Er(Function)},onKeydown:{type:Er(Function)},onFocus:{type:Er(Function)},onBlur:{type:Er(Function)},onContextmenu:{type:Er(Function)},id:String,open:Boolean}),sF=T.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),lF=T.defineComponent({...sF,props:_x,setup(e,{expose:t}){const r=e,{role:n,triggerRef:i}=T.inject(pT,void 0);_N(i);const o=T.computed(()=>s.value?r.id:void 0),a=T.computed(()=>{if(n&&n.value==="tooltip")return r.open&&r.id?r.id:void 0}),s=T.computed(()=>{if(n&&n.value!=="tooltip")return n.value}),h=T.computed(()=>s.value?`${r.open}`:void 0);let d;return T.onMounted(()=>{T.watch(()=>r.virtualRef,Q=>{Q&&(i.value=Na(Q))},{immediate:!0}),T.watch(i,(Q,p)=>{d==null||d(),d=void 0,P0(Q)&&(["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"].forEach(g=>{var _;const x=r[g];x&&(Q.addEventListener(g.slice(2).toLowerCase(),x),(_=p==null?void 0:p.removeEventListener)==null||_.call(p,g.slice(2).toLowerCase(),x))}),d=T.watch([o,a,s,h],g=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((_,x)=>{B3(g[x])?Q.removeAttribute(_):Q.setAttribute(_,g[x])})},{immediate:!0})),P0(p)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(g=>p.removeAttribute(g))},{immediate:!0})}),T.onBeforeUnmount(()=>{d==null||d(),d=void 0}),t({triggerRef:i}),(Q,p)=>Q.virtualTriggering?T.createCommentVNode("v-if",!0):(T.openBlock(),T.createBlock(T.unref(aF),T.mergeProps({key:0},Q.$attrs,{"aria-controls":T.unref(o),"aria-describedby":T.unref(a),"aria-expanded":T.unref(h),"aria-haspopup":T.unref(s)}),{default:T.withCtx(()=>[T.renderSlot(Q.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var cF=Sr(lF,[["__file","trigger.vue"]]);const gT="focus-trap.focus-after-trapped",yT="focus-trap.focus-after-released",uF="focus-trap.focusout-prevented",vx={cancelable:!0,bubbles:!1},hF={cancelable:!0,bubbles:!1},xx="focusAfterTrapped",bx="focusAfterReleased",dF=Symbol("elFocusTrap"),_T=T.ref(),xc=T.ref(0),vT=T.ref(0);let bc=0;const Lx=e=>{const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0||n===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t},wx=(e,t)=>{for(const r of e)if(!fF(r,t))return r},fF=(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},TF=e=>{const t=Lx(e),r=wx(t,e),n=wx(t.reverse(),e);return[r,n]},QF=e=>e instanceof HTMLInputElement&&"select"in e,Z3=(e,t)=>{if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),vT.value=window.performance.now(),e!==r&&QF(e)&&t&&e.select()}};function Ex(e,t){const r=[...e],n=e.indexOf(t);return n!==-1&&r.splice(n,1),r}const pF=()=>{let e=[];return{push:n=>{const i=e[0];i&&n!==i&&i.pause(),e=Ex(e,n),e.unshift(n)},remove:n=>{var i,o;e=Ex(e,n),(o=(i=e[0])==null?void 0:i.resume)==null||o.call(i)}}},mF=(e,t=!1)=>{const r=document.activeElement;for(const n of e)if(Z3(n,t),document.activeElement!==r)return},Mx=pF(),gF=()=>xc.value>vT.value,Lc=()=>{_T.value="pointer",xc.value=window.performance.now()},Ax=()=>{_T.value="keyboard",xc.value=window.performance.now()},yF=()=>(T.onMounted(()=>{bc===0&&(document.addEventListener("mousedown",Lc),document.addEventListener("touchstart",Lc),document.addEventListener("keydown",Ax)),bc++}),T.onBeforeUnmount(()=>{bc--,bc<=0&&(document.removeEventListener("mousedown",Lc),document.removeEventListener("touchstart",Lc),document.removeEventListener("keydown",Ax))}),{focusReason:_T,lastUserFocusTimestamp:xc,lastAutomatedFocusTimestamp:vT}),wc=e=>new CustomEvent(uF,{...hF,detail:e}),_F=T.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[xx,bx,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const r=T.ref();let n,i;const{focusReason:o}=yF();QN(x=>{e.trapped&&!a.paused&&t("release-requested",x)});const a={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},s=x=>{if(!e.loop&&!e.trapped||a.paused)return;const{key:b,altKey:A,ctrlKey:E,metaKey:O,currentTarget:V,shiftKey:k}=x,{loop:j}=e,$=b===Ki.tab&&!A&&!E&&!O,U=document.activeElement;if($&&U){const J=V,[tt,rt]=TF(J);if(tt&&rt){if(!k&&U===rt){const pt=wc({focusReason:o.value});t("focusout-prevented",pt),pt.defaultPrevented||(x.preventDefault(),j&&Z3(tt,!0))}else if(k&&[tt,J].includes(U)){const pt=wc({focusReason:o.value});t("focusout-prevented",pt),pt.defaultPrevented||(x.preventDefault(),j&&Z3(rt,!0))}}else if(U===J){const pt=wc({focusReason:o.value});t("focusout-prevented",pt),pt.defaultPrevented||x.preventDefault()}}};T.provide(dF,{focusTrapRef:r,onKeydown:s}),T.watch(()=>e.focusTrapEl,x=>{x&&(r.value=x)},{immediate:!0}),T.watch([r],([x],[b])=>{x&&(x.addEventListener("keydown",s),x.addEventListener("focusin",Q),x.addEventListener("focusout",p)),b&&(b.removeEventListener("keydown",s),b.removeEventListener("focusin",Q),b.removeEventListener("focusout",p))});const h=x=>{t(xx,x)},d=x=>t(bx,x),Q=x=>{const b=T.unref(r);if(!b)return;const A=x.target,E=x.relatedTarget,O=A&&b.contains(A);e.trapped||E&&b.contains(E)||(n=E),O&&t("focusin",x),!a.paused&&e.trapped&&(O?i=A:Z3(i,!0))},p=x=>{const b=T.unref(r);if(!(a.paused||!b))if(e.trapped){const A=x.relatedTarget;!B3(A)&&!b.contains(A)&&setTimeout(()=>{if(!a.paused&&e.trapped){const E=wc({focusReason:o.value});t("focusout-prevented",E),E.defaultPrevented||Z3(i,!0)}},0)}else{const A=x.target;A&&b.contains(A)||t("focusout",x)}};async function g(){await T.nextTick();const x=T.unref(r);if(x){Mx.push(a);const b=x.contains(document.activeElement)?n:document.activeElement;if(n=b,!x.contains(b)){const E=new Event(gT,vx);x.addEventListener(gT,h),x.dispatchEvent(E),E.defaultPrevented||T.nextTick(()=>{let O=e.focusStartEl;W1(O)||(Z3(O),document.activeElement!==O&&(O="first")),O==="first"&&mF(Lx(x),!0),(document.activeElement===b||O==="container")&&Z3(x)})}}}function _(){const x=T.unref(r);if(x){x.removeEventListener(gT,h);const b=new CustomEvent(yT,{...vx,detail:{focusReason:o.value}});x.addEventListener(yT,d),x.dispatchEvent(b),!b.defaultPrevented&&(o.value=="keyboard"||!gF()||x.contains(document.activeElement))&&Z3(n??document.body),x.removeEventListener(yT,d),Mx.remove(a)}}return T.onMounted(()=>{e.trapped&&g(),T.watch(()=>e.trapped,x=>{x?g():_()})}),T.onBeforeUnmount(()=>{e.trapped&&_()}),{onKeydown:s}}});function vF(e,t,r,n,i,o){return T.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var xF=Sr(_F,[["render",vF],["__file","focus-trap.vue"]]);const bF=["fixed","absolute"],LF=Qn({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:Er(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:Qc,default:"bottom"},popperOptions:{type:Er(Object),default:()=>({})},strategy:{type:String,values:bF,default:"absolute"}}),Cx=Qn({...LF,id:String,style:{type:Er([String,Array,Object])},className:{type:Er([String,Array,Object])},effect:{type:String,default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:Er([String,Array,Object])},popperStyle:{type:Er([String,Array,Object])},referenceEl:{type:Er(Object)},triggerTargetEl:{type:Er(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},ariaLabel:{type:String,default:void 0},virtualTriggering:Boolean,zIndex:Number}),wF={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},EF=(e,t=[])=>{const{placement:r,strategy:n,popperOptions:i}=e,o={placement:r,strategy:n,...i,modifiers:[...AF(e),...t]};return CF(o,i==null?void 0:i.modifiers),o},MF=e=>{if(q1)return Na(e)};function AF(e){const{offset:t,gpuAcceleration:r,fallbackPlacements:n}=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:n}},{name:"computeStyles",options:{gpuAcceleration:r}}]}function CF(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const SF=0,HF=e=>{const{popperInstanceRef:t,contentRef:r,triggerRef:n,role:i}=T.inject(pT,void 0),o=T.ref(),a=T.ref(),s=T.computed(()=>({name:"eventListeners",enabled:!!e.visible})),h=T.computed(()=>{var E;const O=T.unref(o),V=(E=T.unref(a))!=null?E:SF;return{name:"arrow",enabled:!bR(O),options:{element:O,padding:V}}}),d=T.computed(()=>({onFirstUpdate:()=>{x()},...EF(e,[T.unref(h),T.unref(s)])})),Q=T.computed(()=>MF(e.referenceEl)||T.unref(n)),{attributes:p,state:g,styles:_,update:x,forceUpdate:b,instanceRef:A}=dN(Q,r,d);return T.watch(A,E=>t.value=E),T.onMounted(()=>{T.watch(()=>{var E;return(E=T.unref(Q))==null?void 0:E.getBoundingClientRect()},()=>{x()})}),{attributes:p,arrowRef:o,contentRef:r,instanceRef:A,state:g,styles:_,role:i,forceUpdate:b,update:x}},OF=(e,{attributes:t,styles:r,role:n})=>{const{nextZIndex:i}=cx(),o=Cr("popper"),a=T.computed(()=>T.unref(t).popper),s=T.ref(X1(e.zIndex)?e.zIndex:i()),h=T.computed(()=>[o.b(),o.is("pure",e.pure),o.is(e.effect),e.popperClass]),d=T.computed(()=>[{zIndex:T.unref(s)},T.unref(r).popper,e.popperStyle||{}]),Q=T.computed(()=>n.value==="dialog"?"false":void 0),p=T.computed(()=>T.unref(r).arrow||{});return{ariaModal:Q,arrowStyle:p,contentAttrs:a,contentClass:h,contentStyle:d,contentZIndex:s,updateZIndex:()=>{s.value=X1(e.zIndex)?e.zIndex:i()}}},VF=(e,t)=>{const r=T.ref(!1),n=T.ref();return{focusStartRef:n,trapped:r,onFocusAfterReleased:d=>{var Q;((Q=d.detail)==null?void 0:Q.focusReason)!=="pointer"&&(n.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:d=>{e.visible&&!r.value&&(d.target&&(n.value=d.target),r.value=!0)},onFocusoutPrevented:d=>{e.trapping||(d.detail.focusReason==="pointer"&&d.preventDefault(),r.value=!1)},onReleaseRequested:()=>{r.value=!1,t("close")}}},DF=T.defineComponent({name:"ElPopperContent"}),PF=T.defineComponent({...DF,props:Cx,emits:wF,setup(e,{expose:t,emit:r}){const n=e,{focusStartRef:i,trapped:o,onFocusAfterReleased:a,onFocusAfterTrapped:s,onFocusInTrap:h,onFocusoutPrevented:d,onReleaseRequested:Q}=VF(n,r),{attributes:p,arrowRef:g,contentRef:_,styles:x,instanceRef:b,role:A,update:E}=HF(n),{ariaModal:O,arrowStyle:V,contentAttrs:k,contentClass:j,contentStyle:$,updateZIndex:U}=OF(n,{styles:x,attributes:p,role:A}),J=T.inject(G0,void 0),tt=T.ref();T.provide(Qx,{arrowStyle:V,arrowRef:g,arrowOffset:tt}),J&&(J.addInputId||J.removeInputId)&&T.provide(G0,{...J,addInputId:M0,removeInputId:M0});let rt;const st=(St=!0)=>{E(),St&&U()},pt=()=>{st(!1),n.visible&&n.focusOnShow?o.value=!0:n.visible===!1&&(o.value=!1)};return T.onMounted(()=>{T.watch(()=>n.triggerTargetEl,(St,$t)=>{rt==null||rt(),rt=void 0;const ie=T.unref(St||_.value),me=T.unref($t||_.value);P0(ie)&&(rt=T.watch([A,()=>n.ariaLabel,O,()=>n.id],Ft=>{["role","aria-label","aria-modal","id"].forEach((he,cr)=>{B3(Ft[cr])?ie.removeAttribute(he):ie.setAttribute(he,Ft[cr])})},{immediate:!0})),me!==ie&&P0(me)&&["role","aria-label","aria-modal","id"].forEach(Ft=>{me.removeAttribute(Ft)})},{immediate:!0}),T.watch(()=>n.visible,pt,{immediate:!0})}),T.onBeforeUnmount(()=>{rt==null||rt(),rt=void 0}),t({popperContentRef:_,popperInstanceRef:b,updatePopper:st,contentStyle:$}),(St,$t)=>(T.openBlock(),T.createElementBlock("div",T.mergeProps({ref_key:"contentRef",ref:_},T.unref(k),{style:T.unref($),class:T.unref(j),tabindex:"-1",onMouseenter:$t[0]||($t[0]=ie=>St.$emit("mouseenter",ie)),onMouseleave:$t[1]||($t[1]=ie=>St.$emit("mouseleave",ie))}),[T.createVNode(T.unref(xF),{trapped:T.unref(o),"trap-on-focus-in":!0,"focus-trap-el":T.unref(_),"focus-start-el":T.unref(i),onFocusAfterTrapped:T.unref(s),onFocusAfterReleased:T.unref(a),onFocusin:T.unref(h),onFocusoutPrevented:T.unref(d),onReleaseRequested:T.unref(Q)},{default:T.withCtx(()=>[T.renderSlot(St.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}});var IF=Sr(PF,[["__file","content.vue"]]);const kF=Xi(rF),xT=Symbol("elTooltip"),E2=Qn({...gN,...Cx,appendTo:{type:Er([String,Object])},content:{type:String,default:""},rawContent:{type:Boolean,default:!1},persistent:Boolean,ariaLabel:String,visible:{type:Er(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean}),Z0=Qn({..._x,disabled:Boolean,trigger:{type:Er([String,Array]),default:"hover"},triggerKeys:{type:Er(Array),default:()=>[Ki.enter,Ki.space]}}),{useModelToggleProps:RF,useModelToggleEmits:BF,useModelToggle:NF}=Ov("visible"),FF=Qn({...px,...RF,...E2,...Z0,...mx,showArrow:{type:Boolean,default:!0}}),jF=[...BF,"before-show","before-hide","show","hide","open","close"],zF=(e,t)=>Vi(e)?e.includes(t):e===t,I6=(e,t,r)=>n=>{zF(T.unref(e),t)&&r(n)},UF=T.defineComponent({name:"ElTooltipTrigger"}),$F=T.defineComponent({...UF,props:Z0,setup(e,{expose:t}){const r=e,n=Cr("tooltip"),{controlled:i,id:o,open:a,onOpen:s,onClose:h,onToggle:d}=T.inject(xT,void 0),Q=T.ref(null),p=()=>{if(T.unref(i)||r.disabled)return!0},g=T.toRef(r,"trigger"),_=Ba(p,I6(g,"hover",s)),x=Ba(p,I6(g,"hover",h)),b=Ba(p,I6(g,"click",k=>{k.button===0&&d(k)})),A=Ba(p,I6(g,"focus",s)),E=Ba(p,I6(g,"focus",h)),O=Ba(p,I6(g,"contextmenu",k=>{k.preventDefault(),d(k)})),V=Ba(p,k=>{const{code:j}=k;r.triggerKeys.includes(j)&&(k.preventDefault(),d(k))});return t({triggerRef:Q}),(k,j)=>(T.openBlock(),T.createBlock(T.unref(cF),{id:T.unref(o),"virtual-ref":k.virtualRef,open:T.unref(a),"virtual-triggering":k.virtualTriggering,class:T.normalizeClass(T.unref(n).e("trigger")),onBlur:T.unref(E),onClick:T.unref(b),onContextmenu:T.unref(O),onFocus:T.unref(A),onMouseenter:T.unref(_),onMouseleave:T.unref(x),onKeydown:T.unref(V)},{default:T.withCtx(()=>[T.renderSlot(k.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var GF=Sr($F,[["__file","trigger.vue"]]);const ZF=T.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),qF=T.defineComponent({...ZF,props:E2,setup(e,{expose:t}){const r=e,{selector:n}=ix(),i=Cr("tooltip"),o=T.ref(null),a=T.ref(!1),{controlled:s,id:h,open:d,trigger:Q,onClose:p,onOpen:g,onShow:_,onHide:x,onBeforeShow:b,onBeforeHide:A}=T.inject(xT,void 0),E=T.computed(()=>r.transition||`${i.namespace.value}-fade-in-linear`),O=T.computed(()=>process.env.NODE_ENV==="test"?!0:r.persistent);T.onBeforeUnmount(()=>{a.value=!0});const V=T.computed(()=>T.unref(O)?!0:T.unref(d)),k=T.computed(()=>r.disabled?!1:T.unref(d)),j=T.computed(()=>r.appendTo||n.value),$=T.computed(()=>{var Ft;return(Ft=r.style)!=null?Ft:{}}),U=T.computed(()=>!T.unref(d)),J=()=>{x()},tt=()=>{if(T.unref(s))return!0},rt=Ba(tt,()=>{r.enterable&&T.unref(Q)==="hover"&&g()}),st=Ba(tt,()=>{T.unref(Q)==="hover"&&p()}),pt=()=>{var Ft,he;(he=(Ft=o.value)==null?void 0:Ft.updatePopper)==null||he.call(Ft),b==null||b()},St=()=>{A==null||A()},$t=()=>{_(),me=hD(T.computed(()=>{var Ft;return(Ft=o.value)==null?void 0:Ft.popperContentRef}),()=>{if(T.unref(s))return;T.unref(Q)!=="hover"&&p()})},ie=()=>{r.virtualTriggering||p()};let me;return T.watch(()=>T.unref(d),Ft=>{Ft||me==null||me()},{flush:"post"}),T.watch(()=>r.content,()=>{var Ft,he;(he=(Ft=o.value)==null?void 0:Ft.updatePopper)==null||he.call(Ft)}),t({contentRef:o}),(Ft,he)=>(T.openBlock(),T.createBlock(T.Teleport,{disabled:!Ft.teleported,to:T.unref(j)},[T.createVNode(T.Transition,{name:T.unref(E),onAfterLeave:J,onBeforeEnter:pt,onAfterEnter:$t,onBeforeLeave:St},{default:T.withCtx(()=>[T.unref(V)?T.withDirectives((T.openBlock(),T.createBlock(T.unref(IF),T.mergeProps({key:0,id:T.unref(h),ref_key:"contentRef",ref:o},Ft.$attrs,{"aria-label":Ft.ariaLabel,"aria-hidden":T.unref(U),"boundaries-padding":Ft.boundariesPadding,"fallback-placements":Ft.fallbackPlacements,"gpu-acceleration":Ft.gpuAcceleration,offset:Ft.offset,placement:Ft.placement,"popper-options":Ft.popperOptions,strategy:Ft.strategy,effect:Ft.effect,enterable:Ft.enterable,pure:Ft.pure,"popper-class":Ft.popperClass,"popper-style":[Ft.popperStyle,T.unref($)],"reference-el":Ft.referenceEl,"trigger-target-el":Ft.triggerTargetEl,visible:T.unref(k),"z-index":Ft.zIndex,onMouseenter:T.unref(rt),onMouseleave:T.unref(st),onBlur:ie,onClose:T.unref(p)}),{default:T.withCtx(()=>[a.value?T.createCommentVNode("v-if",!0):T.renderSlot(Ft.$slots,"default",{key:0})]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[T.vShow,T.unref(k)]]):T.createCommentVNode("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"]))}});var WF=Sr(qF,[["__file","content.vue"]]);const XF=["innerHTML"],KF={key:1},YF=T.defineComponent({name:"ElTooltip"}),JF=T.defineComponent({...YF,props:FF,emits:jF,setup(e,{expose:t,emit:r}){const n=e;mN();const i=$0(),o=T.ref(),a=T.ref(),s=()=>{var E;const O=T.unref(o);O&&((E=O.popperInstanceRef)==null||E.update())},h=T.ref(!1),d=T.ref(),{show:Q,hide:p,hasUpdateHandler:g}=NF({indicator:h,toggleReason:d}),{onOpen:_,onClose:x}=yN({showAfter:T.toRef(n,"showAfter"),hideAfter:T.toRef(n,"hideAfter"),autoClose:T.toRef(n,"autoClose"),open:Q,close:p}),b=T.computed(()=>N3(n.visible)&&!g.value);T.provide(xT,{controlled:b,id:i,open:T.readonly(h),trigger:T.toRef(n,"trigger"),onOpen:E=>{_(E)},onClose:E=>{x(E)},onToggle:E=>{T.unref(h)?x(E):_(E)},onShow:()=>{r("show",d.value)},onHide:()=>{r("hide",d.value)},onBeforeShow:()=>{r("before-show",d.value)},onBeforeHide:()=>{r("before-hide",d.value)},updatePopper:s}),T.watch(()=>n.disabled,E=>{E&&h.value&&(h.value=!1)});const A=E=>{var O,V;const k=(V=(O=a.value)==null?void 0:O.contentRef)==null?void 0:V.popperContentRef,j=(E==null?void 0:E.relatedTarget)||document.activeElement;return k&&k.contains(j)};return T.onDeactivated(()=>h.value&&p()),t({popperRef:o,contentRef:a,isFocusInsideContent:A,updatePopper:s,onOpen:_,onClose:x,hide:p}),(E,O)=>(T.openBlock(),T.createBlock(T.unref(kF),{ref_key:"popperRef",ref:o,role:E.role},{default:T.withCtx(()=>[T.createVNode(GF,{disabled:E.disabled,trigger:E.trigger,"trigger-keys":E.triggerKeys,"virtual-ref":E.virtualRef,"virtual-triggering":E.virtualTriggering},{default:T.withCtx(()=>[E.$slots.default?T.renderSlot(E.$slots,"default",{key:0}):T.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),T.createVNode(WF,{ref_key:"contentRef",ref:a,"aria-label":E.ariaLabel,"boundaries-padding":E.boundariesPadding,content:E.content,disabled:E.disabled,effect:E.effect,enterable:E.enterable,"fallback-placements":E.fallbackPlacements,"hide-after":E.hideAfter,"gpu-acceleration":E.gpuAcceleration,offset:E.offset,persistent:E.persistent,"popper-class":E.popperClass,"popper-style":E.popperStyle,placement:E.placement,"popper-options":E.popperOptions,pure:E.pure,"raw-content":E.rawContent,"reference-el":E.referenceEl,"trigger-target-el":E.triggerTargetEl,"show-after":E.showAfter,strategy:E.strategy,teleported:E.teleported,transition:E.transition,"virtual-triggering":E.virtualTriggering,"z-index":E.zIndex,"append-to":E.appendTo},{default:T.withCtx(()=>[T.renderSlot(E.$slots,"content",{},()=>[E.rawContent?(T.openBlock(),T.createElementBlock("span",{key:0,innerHTML:E.content},null,8,XF)):(T.openBlock(),T.createElementBlock("span",KF,T.toDisplayString(E.content),1))]),E.showArrow?(T.openBlock(),T.createBlock(T.unref(oF),{key:0,"arrow-offset":E.arrowOffset},null,8,["arrow-offset"])):T.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","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var tj=Sr(JF,[["__file","tooltip.vue"]]);const bT=Xi(tj),Sx=Symbol("buttonGroupContextKey"),ej=(e,t)=>{Cv({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},T.computed(()=>e.type==="text"));const r=T.inject(Sx,void 0),n=fT("button"),{form:i}=G3(),o=$3(T.computed(()=>r==null?void 0:r.size)),a=V6(),s=T.ref(),h=T.useSlots(),d=T.computed(()=>e.type||(r==null?void 0:r.type)||""),Q=T.computed(()=>{var x,b,A;return(A=(b=e.autoInsertSpace)!=null?b:(x=n.value)==null?void 0:x.autoInsertSpace)!=null?A:!1}),p=T.computed(()=>e.tag==="button"?{ariaDisabled:a.value||e.loading,disabled:a.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),g=T.computed(()=>{var x;const b=(x=h.default)==null?void 0:x.call(h);if(Q.value&&(b==null?void 0:b.length)===1){const A=b[0];if((A==null?void 0:A.type)===T.Text){const E=A.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(E.trim())}}return!1});return{_disabled:a,_size:o,_type:d,_ref:s,_props:p,shouldAddSpace:g,handleClick:x=>{e.nativeType==="reset"&&(i==null||i.resetFields()),t("click",x)}}},LT=Qn({size:U3,disabled:Boolean,type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:j3},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:j3,default:()=>tT},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:Er([String,Object]),default:"button"}}),rj={click:e=>e instanceof MouseEvent};function _i(e,t){nj(e)&&(e="100%");var r=ij(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(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 Ec(e){return Math.min(1,Math.max(0,e))}function nj(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function ij(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Hx(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Mc(e){return e<=1?"".concat(Number(e)*100,"%"):e}function u4(e){return e.length===1?"0"+e:String(e)}function oj(e,t,r){return{r:_i(e,255)*255,g:_i(t,255)*255,b:_i(r,255)*255}}function Ox(e,t,r){e=_i(e,255),t=_i(t,255),r=_i(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o=0,a=0,s=(n+i)/2;if(n===i)a=0,o=0;else{var h=n-i;switch(a=s>.5?h/(2-n-i):h/(n+i),n){case e:o=(t-r)/h+(t<r?6:0);break;case t:o=(r-e)/h+2;break;case r:o=(e-t)/h+4;break}o/=6}return{h:o,s:a,l:s}}function wT(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function aj(e,t,r){var n,i,o;if(e=_i(e,360),t=_i(t,100),r=_i(r,100),t===0)i=r,o=r,n=r;else{var a=r<.5?r*(1+t):r+t-r*t,s=2*r-a;n=wT(s,a,e+1/3),i=wT(s,a,e),o=wT(s,a,e-1/3)}return{r:n*255,g:i*255,b:o*255}}function Vx(e,t,r){e=_i(e,255),t=_i(t,255),r=_i(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o=0,a=n,s=n-i,h=n===0?0:s/n;if(n===i)o=0;else{switch(n){case e:o=(t-r)/s+(t<r?6:0);break;case t:o=(r-e)/s+2;break;case r:o=(e-t)/s+4;break}o/=6}return{h:o,s:h,v:a}}function sj(e,t,r){e=_i(e,360)*6,t=_i(t,100),r=_i(r,100);var n=Math.floor(e),i=e-n,o=r*(1-t),a=r*(1-i*t),s=r*(1-(1-i)*t),h=n%6,d=[r,a,o,o,s,r][h],Q=[s,r,r,a,o,o][h],p=[o,o,s,r,r,a][h];return{r:d*255,g:Q*255,b:p*255}}function Dx(e,t,r,n){var i=[u4(Math.round(e).toString(16)),u4(Math.round(t).toString(16)),u4(Math.round(r).toString(16))];return n&&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 lj(e,t,r,n,i){var o=[u4(Math.round(e).toString(16)),u4(Math.round(t).toString(16)),u4(Math.round(r).toString(16)),u4(cj(n))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function cj(e){return Math.round(parseFloat(e)*255).toString(16)}function Px(e){return M2(e)/255}function M2(e){return parseInt(e,16)}function uj(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var ET={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 hj(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=Tj(e)),typeof e=="object"&&(Za(e.r)&&Za(e.g)&&Za(e.b)?(t=oj(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Za(e.h)&&Za(e.s)&&Za(e.v)?(n=Mc(e.s),i=Mc(e.v),t=sj(e.h,n,i),a=!0,s="hsv"):Za(e.h)&&Za(e.s)&&Za(e.l)&&(n=Mc(e.s),o=Mc(e.l),t=aj(e.h,n,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=Hx(r),{ok:a,format:e.format||s,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:r}}var dj="[-\\+]?\\d+%?",fj="[-\\+]?\\d*\\.\\d+%?",q3="(?:".concat(fj,")|(?:").concat(dj,")"),MT="[\\s|\\(]+(".concat(q3,")[,|\\s]+(").concat(q3,")[,|\\s]+(").concat(q3,")\\s*\\)?"),AT="[\\s|\\(]+(".concat(q3,")[,|\\s]+(").concat(q3,")[,|\\s]+(").concat(q3,")[,|\\s]+(").concat(q3,")\\s*\\)?"),bo={CSS_UNIT:new RegExp(q3),rgb:new RegExp("rgb"+MT),rgba:new RegExp("rgba"+AT),hsl:new RegExp("hsl"+MT),hsla:new RegExp("hsla"+AT),hsv:new RegExp("hsv"+MT),hsva:new RegExp("hsva"+AT),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 Tj(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(ET[e])e=ET[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=bo.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=bo.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=bo.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=bo.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=bo.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=bo.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=bo.hex8.exec(e),r?{r:M2(r[1]),g:M2(r[2]),b:M2(r[3]),a:Px(r[4]),format:t?"name":"hex8"}:(r=bo.hex6.exec(e),r?{r:M2(r[1]),g:M2(r[2]),b:M2(r[3]),format:t?"name":"hex"}:(r=bo.hex4.exec(e),r?{r:M2(r[1]+r[1]),g:M2(r[2]+r[2]),b:M2(r[3]+r[3]),a:Px(r[4]+r[4]),format:t?"name":"hex8"}:(r=bo.hex3.exec(e),r?{r:M2(r[1]+r[1]),g:M2(r[2]+r[2]),b:M2(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function Za(e){return!!bo.CSS_UNIT.exec(String(e))}var Qj=function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=uj(t)),this.originalInput=t;var i=hj(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=(n=r.format)!==null&&n!==void 0?n:i.format,this.gradientType=r.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(),r,n,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?r=o/12.92:r=Math.pow((o+.055)/1.055,2.4),a<=.03928?n=a/12.92:n=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*r+.7152*n+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=Hx(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=Vx(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=Vx(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=Ox(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=Ox(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),Dx(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),lj(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),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(r,", ").concat(n,")"):"rgba(".concat(t,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(r){return"".concat(Math.round(_i(r,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(r){return Math.round(_i(r,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="#"+Dx(this.r,this.g,this.b,!1),r=0,n=Object.entries(ET);r<n.length;r++){var i=n[r],o=i[0],a=i[1];if(t===a)return o}return!1},e.prototype.toString=function(t){var r=!!t;t=t??this.format;var n=!1,i=this.a<1&&this.a>=0,o=!r&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||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 r=this.toHsl();return r.l+=t/100,r.l=Ec(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=Ec(r.l),new e(r)},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 r=this.toHsl();return r.s-=t/100,r.s=Ec(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=Ec(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var n=this.toRgb(),i=new e(t).toRgb(),o=r/100,a={r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a};return new e(a)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var n=this.toHsl(),i=360/r,o=[this];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,o.push(new e(n));return o},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 r=this.toHsv(),n=r.h,i=r.s,o=r.v,a=[],s=1/t;t--;)a.push(new e({h:n,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb(),i=r.a+n.a*(1-r.a);return new e({r:(r.r*r.a+n.r*n.a*(1-r.a))/i,g:(r.g*r.a+n.g*n.a*(1-r.a))/i,b:(r.b*r.a+n.b*n.a*(1-r.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 r=this.toHsl(),n=r.h,i=[this],o=360/t,a=1;a<t;a++)i.push(new e({h:(n+a*o)%360,s:r.s,l:r.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function W3(e,t=20){return e.mix("#141414",t).toString()}function pj(e){const t=V6(),r=Cr("button");return T.computed(()=>{let n={};const i=e.color;if(i){const o=new Qj(i),a=e.dark?o.tint(20).toString():W3(o,20);if(e.plain)n=r.cssVarBlock({"bg-color":e.dark?W3(o,90):o.tint(90).toString(),"text-color":i,"border-color":e.dark?W3(o,50):o.tint(50).toString(),"hover-text-color":`var(${r.cssVarName("color-white")})`,"hover-bg-color":i,"hover-border-color":i,"active-bg-color":a,"active-text-color":`var(${r.cssVarName("color-white")})`,"active-border-color":a}),t.value&&(n[r.cssVarBlockName("disabled-bg-color")]=e.dark?W3(o,90):o.tint(90).toString(),n[r.cssVarBlockName("disabled-text-color")]=e.dark?W3(o,50):o.tint(50).toString(),n[r.cssVarBlockName("disabled-border-color")]=e.dark?W3(o,80):o.tint(80).toString());else{const s=e.dark?W3(o,30):o.tint(30).toString(),h=o.isDark()?`var(${r.cssVarName("color-white")})`:`var(${r.cssVarName("color-black")})`;if(n=r.cssVarBlock({"bg-color":i,"text-color":h,"border-color":i,"hover-bg-color":s,"hover-text-color":h,"hover-border-color":s,"active-bg-color":a,"active-border-color":a}),t.value){const d=e.dark?W3(o,50):o.tint(50).toString();n[r.cssVarBlockName("disabled-bg-color")]=d,n[r.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${r.cssVarName("color-white")})`,n[r.cssVarBlockName("disabled-border-color")]=d}}}return n})}const mj=T.defineComponent({name:"ElButton"}),gj=T.defineComponent({...mj,props:LT,emits:rj,setup(e,{expose:t,emit:r}){const n=e,i=pj(n),o=Cr("button"),{_ref:a,_size:s,_type:h,_disabled:d,_props:Q,shouldAddSpace:p,handleClick:g}=ej(n,r);return t({ref:a,size:s,type:h,disabled:d,shouldAddSpace:p}),(_,x)=>(T.openBlock(),T.createBlock(T.resolveDynamicComponent(_.tag),T.mergeProps({ref_key:"_ref",ref:a},T.unref(Q),{class:[T.unref(o).b(),T.unref(o).m(T.unref(h)),T.unref(o).m(T.unref(s)),T.unref(o).is("disabled",T.unref(d)),T.unref(o).is("loading",_.loading),T.unref(o).is("plain",_.plain),T.unref(o).is("round",_.round),T.unref(o).is("circle",_.circle),T.unref(o).is("text",_.text),T.unref(o).is("link",_.link),T.unref(o).is("has-bg",_.bg)],style:T.unref(i),onClick:T.unref(g)}),{default:T.withCtx(()=>[_.loading?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[_.$slots.loading?T.renderSlot(_.$slots,"loading",{key:0}):(T.openBlock(),T.createBlock(T.unref(yi),{key:1,class:T.normalizeClass(T.unref(o).is("loading"))},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(_.loadingIcon)))]),_:1},8,["class"]))],64)):_.icon||_.$slots.icon?(T.openBlock(),T.createBlock(T.unref(yi),{key:1},{default:T.withCtx(()=>[_.icon?(T.openBlock(),T.createBlock(T.resolveDynamicComponent(_.icon),{key:0})):T.renderSlot(_.$slots,"icon",{key:1})]),_:3})):T.createCommentVNode("v-if",!0),_.$slots.default?(T.openBlock(),T.createElementBlock("span",{key:2,class:T.normalizeClass({[T.unref(o).em("text","expand")]:T.unref(p)})},[T.renderSlot(_.$slots,"default")],2)):T.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var yj=Sr(gj,[["__file","button.vue"]]);const _j={size:LT.size,type:LT.type},vj=T.defineComponent({name:"ElButtonGroup"}),xj=T.defineComponent({...vj,props:_j,setup(e){const t=e;T.provide(Sx,T.reactive({size:T.toRef(t,"size"),type:T.toRef(t,"type")}));const r=Cr("button");return(n,i)=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(`${T.unref(r).b("group")}`)},[T.renderSlot(n.$slots,"default")],2))}});var Ix=Sr(xj,[["__file","button-group.vue"]]);const na=Xi(yj,{ButtonGroup:Ix});_o(Ix);var P=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function q0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function bj(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}const X3=new Map;let kx;q1&&(document.addEventListener("mousedown",e=>kx=e),document.addEventListener("mouseup",e=>{for(const t of X3.values())for(const{documentHandler:r}of t)r(e,kx)}));function Rx(e,t){let r=[];return Array.isArray(t.arg)?r=t.arg:P0(t.arg)&&r.push(t.arg),function(n,i){const o=t.instance.popperRef,a=n.target,s=i==null?void 0:i.target,h=!t||!t.instance,d=!a||!s,Q=e.contains(a)||e.contains(s),p=e===a,g=r.length&&r.some(x=>x==null?void 0:x.contains(a))||r.length&&r.includes(s),_=o&&(o.contains(a)||o.contains(s));h||d||Q||p||g||_||t.value(n,i)}}const Bx={beforeMount(e,t){X3.has(e)||X3.set(e,[]),X3.get(e).push({documentHandler:Rx(e,t),bindingFn:t.value})},updated(e,t){X3.has(e)||X3.set(e,[]);const r=X3.get(e),n=r.findIndex(o=>o.bindingFn===t.oldValue),i={documentHandler:Rx(e,t),bindingFn:t.value};n>=0?r.splice(n,1,i):r.push(i)},unmounted(e){X3.delete(e)}},Nx={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},controls:{type:String,default:void 0},border:Boolean,size:U3,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0}},Fx={[A1]:e=>W1(e)||X1(e)||N3(e),change:e=>W1(e)||X1(e)||N3(e)},k6=Symbol("checkboxGroupContextKey"),Lj=({model:e,isChecked:t})=>{const r=T.inject(k6,void 0),n=T.computed(()=>{var o,a;const s=(o=r==null?void 0:r.max)==null?void 0:o.value,h=(a=r==null?void 0:r.min)==null?void 0:a.value;return!D0(s)&&e.value.length>=s&&!t.value||!D0(h)&&e.value.length<=h&&t.value});return{isDisabled:V6(T.computed(()=>(r==null?void 0:r.disabled.value)||n.value)),isLimitDisabled:n}},wj=(e,{model:t,isLimitExceeded:r,hasOwnLabel:n,isDisabled:i,isLabeledByFormItem:o})=>{const a=T.inject(k6,void 0),{formItem:s}=G3(),{emit:h}=T.getCurrentInstance();function d(x){var b,A;return x===e.trueLabel||x===!0?(b=e.trueLabel)!=null?b:!0:(A=e.falseLabel)!=null?A:!1}function Q(x,b){h("change",d(x),b)}function p(x){if(r.value)return;const b=x.target;h("change",d(b.checked),x)}async function g(x){r.value||!n.value&&!i.value&&o.value&&(x.composedPath().some(E=>E.tagName==="LABEL")||(t.value=d([!1,e.falseLabel].includes(t.value)),await T.nextTick(),Q(t.value,x)))}const _=T.computed(()=>(a==null?void 0:a.validateEvent)||e.validateEvent);return T.watch(()=>e.modelValue,()=>{_.value&&(s==null||s.validate("change").catch(x=>K1(x)))}),{handleChange:p,onClickRoot:g}},Ej=e=>{const t=T.ref(!1),{emit:r}=T.getCurrentInstance(),n=T.inject(k6,void 0),i=T.computed(()=>D0(n)===!1),o=T.ref(!1),a=T.computed({get(){var s,h;return i.value?(s=n==null?void 0:n.modelValue)==null?void 0:s.value:(h=e.modelValue)!=null?h:t.value},set(s){var h,d;i.value&&Vi(s)?(o.value=((h=n==null?void 0:n.max)==null?void 0:h.value)!==void 0&&s.length>(n==null?void 0:n.max.value)&&s.length>a.value.length,o.value===!1&&((d=n==null?void 0:n.changeEvent)==null||d.call(n,s))):(r(A1,s),t.value=s)}});return{model:a,isGroup:i,isLimitExceeded:o}},Mj=(e,t,{model:r})=>{const n=T.inject(k6,void 0),i=T.ref(!1),o=T.computed(()=>{const d=r.value;return N3(d)?d:Vi(d)?gi(e.label)?d.map(T.toRaw).some(Q=>V0(Q,e.label)):d.map(T.toRaw).includes(e.label):d!=null?d===e.trueLabel:!!d}),a=$3(T.computed(()=>{var d;return(d=n==null?void 0:n.size)==null?void 0:d.value}),{prop:!0}),s=$3(T.computed(()=>{var d;return(d=n==null?void 0:n.size)==null?void 0:d.value})),h=T.computed(()=>!!t.default||!B3(e.label));return{checkboxButtonSize:a,isChecked:o,isFocused:i,checkboxSize:s,hasOwnLabel:h}},Aj=(e,{model:t})=>{function r(){Vi(t.value)&&!t.value.includes(e.label)?t.value.push(e.label):t.value=e.trueLabel||!0}e.checked&&r()},jx=(e,t)=>{const{formItem:r}=G3(),{model:n,isGroup:i,isLimitExceeded:o}=Ej(e),{isFocused:a,isChecked:s,checkboxButtonSize:h,checkboxSize:d,hasOwnLabel:Q}=Mj(e,t,{model:n}),{isDisabled:p}=Lj({model:n,isChecked:s}),{inputId:g,isLabeledByFormItem:_}=D6(e,{formItemContext:r,disableIdGeneration:Q,disableIdManagement:i}),{handleChange:x,onClickRoot:b}=wj(e,{model:n,isLimitExceeded:o,hasOwnLabel:Q,isDisabled:p,isLabeledByFormItem:_});return Aj(e,{model:n}),{inputId:g,isLabeledByFormItem:_,isChecked:s,isDisabled:p,isFocused:a,checkboxButtonSize:h,checkboxSize:d,hasOwnLabel:Q,model:n,handleChange:x,onClickRoot:b}},Cj=["id","indeterminate","name","tabindex","disabled","true-value","false-value"],Sj=["id","indeterminate","disabled","value","name","tabindex"],Hj=T.defineComponent({name:"ElCheckbox"}),Oj=T.defineComponent({...Hj,props:Nx,emits:Fx,setup(e){const t=e,r=T.useSlots(),{inputId:n,isLabeledByFormItem:i,isChecked:o,isDisabled:a,isFocused:s,checkboxSize:h,hasOwnLabel:d,model:Q,handleChange:p,onClickRoot:g}=jx(t,r),_=Cr("checkbox"),x=T.computed(()=>[_.b(),_.m(h.value),_.is("disabled",a.value),_.is("bordered",t.border),_.is("checked",o.value)]),b=T.computed(()=>[_.e("input"),_.is("disabled",a.value),_.is("checked",o.value),_.is("indeterminate",t.indeterminate),_.is("focus",s.value)]);return(A,E)=>(T.openBlock(),T.createBlock(T.resolveDynamicComponent(!T.unref(d)&&T.unref(i)?"span":"label"),{class:T.normalizeClass(T.unref(x)),"aria-controls":A.indeterminate?A.controls:null,onClick:T.unref(g)},{default:T.withCtx(()=>[T.createElementVNode("span",{class:T.normalizeClass(T.unref(b))},[A.trueLabel||A.falseLabel?T.withDirectives((T.openBlock(),T.createElementBlock("input",{key:0,id:T.unref(n),"onUpdate:modelValue":E[0]||(E[0]=O=>T.isRef(Q)?Q.value=O:null),class:T.normalizeClass(T.unref(_).e("original")),type:"checkbox",indeterminate:A.indeterminate,name:A.name,tabindex:A.tabindex,disabled:T.unref(a),"true-value":A.trueLabel,"false-value":A.falseLabel,onChange:E[1]||(E[1]=(...O)=>T.unref(p)&&T.unref(p)(...O)),onFocus:E[2]||(E[2]=O=>s.value=!0),onBlur:E[3]||(E[3]=O=>s.value=!1),onClick:E[4]||(E[4]=T.withModifiers(()=>{},["stop"]))},null,42,Cj)),[[T.vModelCheckbox,T.unref(Q)]]):T.withDirectives((T.openBlock(),T.createElementBlock("input",{key:1,id:T.unref(n),"onUpdate:modelValue":E[5]||(E[5]=O=>T.isRef(Q)?Q.value=O:null),class:T.normalizeClass(T.unref(_).e("original")),type:"checkbox",indeterminate:A.indeterminate,disabled:T.unref(a),value:A.label,name:A.name,tabindex:A.tabindex,onChange:E[6]||(E[6]=(...O)=>T.unref(p)&&T.unref(p)(...O)),onFocus:E[7]||(E[7]=O=>s.value=!0),onBlur:E[8]||(E[8]=O=>s.value=!1),onClick:E[9]||(E[9]=T.withModifiers(()=>{},["stop"]))},null,42,Sj)),[[T.vModelCheckbox,T.unref(Q)]]),T.createElementVNode("span",{class:T.normalizeClass(T.unref(_).e("inner"))},null,2)],2),T.unref(d)?(T.openBlock(),T.createElementBlock("span",{key:0,class:T.normalizeClass(T.unref(_).e("label"))},[T.renderSlot(A.$slots,"default"),A.$slots.default?T.createCommentVNode("v-if",!0):(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.createTextVNode(T.toDisplayString(A.label),1)],64))],2)):T.createCommentVNode("v-if",!0)]),_:3},8,["class","aria-controls","onClick"]))}});var Vj=Sr(Oj,[["__file","checkbox.vue"]]);const Dj=["name","tabindex","disabled","true-value","false-value"],Pj=["name","tabindex","disabled","value"],Ij=T.defineComponent({name:"ElCheckboxButton"}),kj=T.defineComponent({...Ij,props:Nx,emits:Fx,setup(e){const t=e,r=T.useSlots(),{isFocused:n,isChecked:i,isDisabled:o,checkboxButtonSize:a,model:s,handleChange:h}=jx(t,r),d=T.inject(k6,void 0),Q=Cr("checkbox"),p=T.computed(()=>{var _,x,b,A;const E=(x=(_=d==null?void 0:d.fill)==null?void 0:_.value)!=null?x:"";return{backgroundColor:E,borderColor:E,color:(A=(b=d==null?void 0:d.textColor)==null?void 0:b.value)!=null?A:"",boxShadow:E?`-1px 0 0 0 ${E}`:void 0}}),g=T.computed(()=>[Q.b("button"),Q.bm("button",a.value),Q.is("disabled",o.value),Q.is("checked",i.value),Q.is("focus",n.value)]);return(_,x)=>(T.openBlock(),T.createElementBlock("label",{class:T.normalizeClass(T.unref(g))},[_.trueLabel||_.falseLabel?T.withDirectives((T.openBlock(),T.createElementBlock("input",{key:0,"onUpdate:modelValue":x[0]||(x[0]=b=>T.isRef(s)?s.value=b:null),class:T.normalizeClass(T.unref(Q).be("button","original")),type:"checkbox",name:_.name,tabindex:_.tabindex,disabled:T.unref(o),"true-value":_.trueLabel,"false-value":_.falseLabel,onChange:x[1]||(x[1]=(...b)=>T.unref(h)&&T.unref(h)(...b)),onFocus:x[2]||(x[2]=b=>n.value=!0),onBlur:x[3]||(x[3]=b=>n.value=!1),onClick:x[4]||(x[4]=T.withModifiers(()=>{},["stop"]))},null,42,Dj)),[[T.vModelCheckbox,T.unref(s)]]):T.withDirectives((T.openBlock(),T.createElementBlock("input",{key:1,"onUpdate:modelValue":x[5]||(x[5]=b=>T.isRef(s)?s.value=b:null),class:T.normalizeClass(T.unref(Q).be("button","original")),type:"checkbox",name:_.name,tabindex:_.tabindex,disabled:T.unref(o),value:_.label,onChange:x[6]||(x[6]=(...b)=>T.unref(h)&&T.unref(h)(...b)),onFocus:x[7]||(x[7]=b=>n.value=!0),onBlur:x[8]||(x[8]=b=>n.value=!1),onClick:x[9]||(x[9]=T.withModifiers(()=>{},["stop"]))},null,42,Pj)),[[T.vModelCheckbox,T.unref(s)]]),_.$slots.default||_.label?(T.openBlock(),T.createElementBlock("span",{key:2,class:T.normalizeClass(T.unref(Q).be("button","inner")),style:T.normalizeStyle(T.unref(i)?T.unref(p):void 0)},[T.renderSlot(_.$slots,"default",{},()=>[T.createTextVNode(T.toDisplayString(_.label),1)])],6)):T.createCommentVNode("v-if",!0)],2))}});var zx=Sr(kj,[["__file","checkbox-button.vue"]]);const Rj=Qn({modelValue:{type:Er(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:U3,label:String,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0}}),Bj={[A1]:e=>Vi(e),change:e=>Vi(e)},Nj=T.defineComponent({name:"ElCheckboxGroup"}),Fj=T.defineComponent({...Nj,props:Rj,emits:Bj,setup(e,{emit:t}){const r=e,n=Cr("checkbox"),{formItem:i}=G3(),{inputId:o,isLabeledByFormItem:a}=D6(r,{formItemContext:i}),s=async d=>{t(A1,d),await T.nextTick(),t("change",d)},h=T.computed({get(){return r.modelValue},set(d){s(d)}});return T.provide(k6,{...MR(T.toRefs(r),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:h,changeEvent:s}),T.watch(()=>r.modelValue,()=>{r.validateEvent&&(i==null||i.validate("change").catch(d=>K1(d)))}),(d,Q)=>{var p;return T.openBlock(),T.createBlock(T.resolveDynamicComponent(d.tag),{id:T.unref(o),class:T.normalizeClass(T.unref(n).b("group")),role:"group","aria-label":T.unref(a)?void 0:d.label||"checkbox-group","aria-labelledby":T.unref(a)?(p=T.unref(i))==null?void 0:p.labelId:void 0},{default:T.withCtx(()=>[T.renderSlot(d.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var Ux=Sr(Fj,[["__file","checkbox-group.vue"]]);const Ac=Xi(Vj,{CheckboxButton:zx,CheckboxGroup:Ux});_o(zx);const CT=_o(Ux),$x=Qn({size:U3,disabled:Boolean,label:{type:[String,Number,Boolean],default:""}}),jj=Qn({...$x,modelValue:{type:[String,Number,Boolean],default:""},name:{type:String,default:""},border:Boolean}),Gx={[A1]:e=>W1(e)||X1(e)||N3(e),[dc]:e=>W1(e)||X1(e)||N3(e)},Zx=Symbol("radioGroupKey"),qx=(e,t)=>{const r=T.ref(),n=T.inject(Zx,void 0),i=T.computed(()=>!!n),o=T.computed({get(){return i.value?n.modelValue:e.modelValue},set(Q){i.value?n.changeEvent(Q):t&&t(A1,Q),r.value.checked=e.modelValue===e.label}}),a=$3(T.computed(()=>n==null?void 0:n.size)),s=V6(T.computed(()=>n==null?void 0:n.disabled)),h=T.ref(!1),d=T.computed(()=>s.value||i.value&&o.value!==e.label?-1:0);return{radioRef:r,isGroup:i,radioGroup:n,focus:h,size:a,disabled:s,tabIndex:d,modelValue:o}},zj=["value","name","disabled"],Uj=T.defineComponent({name:"ElRadio"}),$j=T.defineComponent({...Uj,props:jj,emits:Gx,setup(e,{emit:t}){const r=e,n=Cr("radio"),{radioRef:i,radioGroup:o,focus:a,size:s,disabled:h,modelValue:d}=qx(r,t);function Q(){T.nextTick(()=>t("change",d.value))}return(p,g)=>{var _;return T.openBlock(),T.createElementBlock("label",{class:T.normalizeClass([T.unref(n).b(),T.unref(n).is("disabled",T.unref(h)),T.unref(n).is("focus",T.unref(a)),T.unref(n).is("bordered",p.border),T.unref(n).is("checked",T.unref(d)===p.label),T.unref(n).m(T.unref(s))])},[T.createElementVNode("span",{class:T.normalizeClass([T.unref(n).e("input"),T.unref(n).is("disabled",T.unref(h)),T.unref(n).is("checked",T.unref(d)===p.label)])},[T.withDirectives(T.createElementVNode("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":g[0]||(g[0]=x=>T.isRef(d)?d.value=x:null),class:T.normalizeClass(T.unref(n).e("original")),value:p.label,name:p.name||((_=T.unref(o))==null?void 0:_.name),disabled:T.unref(h),type:"radio",onFocus:g[1]||(g[1]=x=>a.value=!0),onBlur:g[2]||(g[2]=x=>a.value=!1),onChange:Q,onClick:g[3]||(g[3]=T.withModifiers(()=>{},["stop"]))},null,42,zj),[[T.vModelRadio,T.unref(d)]]),T.createElementVNode("span",{class:T.normalizeClass(T.unref(n).e("inner"))},null,2)],2),T.createElementVNode("span",{class:T.normalizeClass(T.unref(n).e("label")),onKeydown:g[4]||(g[4]=T.withModifiers(()=>{},["stop"]))},[T.renderSlot(p.$slots,"default",{},()=>[T.createTextVNode(T.toDisplayString(p.label),1)])],34)],2)}}});var Gj=Sr($j,[["__file","radio.vue"]]);const Zj=Qn({...$x,name:{type:String,default:""}}),qj=["value","name","disabled"],Wj=T.defineComponent({name:"ElRadioButton"}),Xj=T.defineComponent({...Wj,props:Zj,setup(e){const t=e,r=Cr("radio"),{radioRef:n,focus:i,size:o,disabled:a,modelValue:s,radioGroup:h}=qx(t),d=T.computed(()=>({backgroundColor:(h==null?void 0:h.fill)||"",borderColor:(h==null?void 0:h.fill)||"",boxShadow:h!=null&&h.fill?`-1px 0 0 0 ${h.fill}`:"",color:(h==null?void 0:h.textColor)||""}));return(Q,p)=>{var g;return T.openBlock(),T.createElementBlock("label",{class:T.normalizeClass([T.unref(r).b("button"),T.unref(r).is("active",T.unref(s)===Q.label),T.unref(r).is("disabled",T.unref(a)),T.unref(r).is("focus",T.unref(i)),T.unref(r).bm("button",T.unref(o))])},[T.withDirectives(T.createElementVNode("input",{ref_key:"radioRef",ref:n,"onUpdate:modelValue":p[0]||(p[0]=_=>T.isRef(s)?s.value=_:null),class:T.normalizeClass(T.unref(r).be("button","original-radio")),value:Q.label,type:"radio",name:Q.name||((g=T.unref(h))==null?void 0:g.name),disabled:T.unref(a),onFocus:p[1]||(p[1]=_=>i.value=!0),onBlur:p[2]||(p[2]=_=>i.value=!1),onClick:p[3]||(p[3]=T.withModifiers(()=>{},["stop"]))},null,42,qj),[[T.vModelRadio,T.unref(s)]]),T.createElementVNode("span",{class:T.normalizeClass(T.unref(r).be("button","inner")),style:T.normalizeStyle(T.unref(s)===Q.label?T.unref(d):{}),onKeydown:p[4]||(p[4]=T.withModifiers(()=>{},["stop"]))},[T.renderSlot(Q.$slots,"default",{},()=>[T.createTextVNode(T.toDisplayString(Q.label),1)])],38)],2)}}});var Wx=Sr(Xj,[["__file","radio-button.vue"]]);const Kj=Qn({id:{type:String,default:void 0},size:U3,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:""},fill:{type:String,default:""},label:{type:String,default:void 0},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0}}),Yj=Gx,Jj=["id","aria-label","aria-labelledby"],tz=T.defineComponent({name:"ElRadioGroup"}),ez=T.defineComponent({...tz,props:Kj,emits:Yj,setup(e,{emit:t}){const r=e,n=Cr("radio"),i=$0(),o=T.ref(),{formItem:a}=G3(),{inputId:s,isLabeledByFormItem:h}=D6(r,{formItemContext:a}),d=p=>{t(A1,p),T.nextTick(()=>t("change",p))};T.onMounted(()=>{const p=o.value.querySelectorAll("[type=radio]"),g=p[0];!Array.from(p).some(_=>_.checked)&&g&&(g.tabIndex=0)});const Q=T.computed(()=>r.name||i.value);return T.provide(Zx,T.reactive({...T.toRefs(r),changeEvent:d,name:Q})),T.watch(()=>r.modelValue,()=>{r.validateEvent&&(a==null||a.validate("change").catch(p=>K1(p)))}),(p,g)=>(T.openBlock(),T.createElementBlock("div",{id:T.unref(s),ref_key:"radioGroupRef",ref:o,class:T.normalizeClass(T.unref(n).b("group")),role:"radiogroup","aria-label":T.unref(h)?void 0:p.label||"radio-group","aria-labelledby":T.unref(h)?T.unref(a).labelId:void 0},[T.renderSlot(p.$slots,"default")],10,Jj))}});var Xx=Sr(ez,[["__file","radio-group.vue"]]);const Kx=Xi(Gj,{RadioButton:Wx,RadioGroup:Xx}),Yx=_o(Xx);_o(Wx);const Jx=Qn({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Mv},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),rz={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},nz=T.defineComponent({name:"ElTag"}),iz=T.defineComponent({...nz,props:Jx,emits:rz,setup(e,{emit:t}){const r=e,n=$3(),i=Cr("tag"),o=T.computed(()=>{const{type:h,hit:d,effect:Q,closable:p,round:g}=r;return[i.b(),i.is("closable",p),i.m(h||"primary"),i.m(n.value),i.m(Q),i.is("hit",d),i.is("round",g)]}),a=h=>{t("close",h)},s=h=>{t("click",h)};return(h,d)=>h.disableTransitions?(T.openBlock(),T.createElementBlock("span",{key:0,class:T.normalizeClass(T.unref(o)),style:T.normalizeStyle({backgroundColor:h.color}),onClick:s},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(i).e("content"))},[T.renderSlot(h.$slots,"default")],2),h.closable?(T.openBlock(),T.createBlock(T.unref(yi),{key:0,class:T.normalizeClass(T.unref(i).e("close")),onClick:T.withModifiers(a,["stop"])},{default:T.withCtx(()=>[T.createVNode(T.unref(k0))]),_:1},8,["class","onClick"])):T.createCommentVNode("v-if",!0)],6)):(T.openBlock(),T.createBlock(T.Transition,{key:1,name:`${T.unref(i).namespace.value}-zoom-in-center`,appear:""},{default:T.withCtx(()=>[T.createElementVNode("span",{class:T.normalizeClass(T.unref(o)),style:T.normalizeStyle({backgroundColor:h.color}),onClick:s},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(i).e("content"))},[T.renderSlot(h.$slots,"default")],2),h.closable?(T.openBlock(),T.createBlock(T.unref(yi),{key:0,class:T.normalizeClass(T.unref(i).e("close")),onClick:T.withModifiers(a,["stop"])},{default:T.withCtx(()=>[T.createVNode(T.unref(k0))]),_:1},8,["class","onClick"])):T.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var oz=Sr(iz,[["__file","tag.vue"]]);const az=Xi(oz),tb=Symbol("rowContextKey"),sz=Qn({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:["start","center","end","space-around","space-between","space-evenly"],default:"start"},align:{type:String,values:["top","middle","bottom"]}}),lz=T.defineComponent({name:"ElRow"}),cz=T.defineComponent({...lz,props:sz,setup(e){const t=e,r=Cr("row"),n=T.computed(()=>t.gutter);T.provide(tb,{gutter:n});const i=T.computed(()=>{const a={};return t.gutter&&(a.marginRight=a.marginLeft=`-${t.gutter/2}px`),a}),o=T.computed(()=>[r.b(),r.is(`justify-${t.justify}`,t.justify!=="start"),r.is(`align-${t.align}`,!!t.align)]);return(a,s)=>(T.openBlock(),T.createBlock(T.resolveDynamicComponent(a.tag),{class:T.normalizeClass(T.unref(o)),style:T.normalizeStyle(T.unref(i))},{default:T.withCtx(()=>[T.renderSlot(a.$slots,"default")]),_:3},8,["class","style"]))}});var uz=Sr(cz,[["__file","row.vue"]]);const qa=Xi(uz),hz=Qn({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:Er([Number,Object]),default:()=>E6({})},sm:{type:Er([Number,Object]),default:()=>E6({})},md:{type:Er([Number,Object]),default:()=>E6({})},lg:{type:Er([Number,Object]),default:()=>E6({})},xl:{type:Er([Number,Object]),default:()=>E6({})}}),dz=T.defineComponent({name:"ElCol"}),fz=T.defineComponent({...dz,props:hz,setup(e){const t=e,{gutter:r}=T.inject(tb,{gutter:T.computed(()=>0)}),n=Cr("col"),i=T.computed(()=>{const a={};return r.value&&(a.paddingLeft=a.paddingRight=`${r.value/2}px`),a}),o=T.computed(()=>{const a=[];return["span","offset","pull","push"].forEach(d=>{const Q=t[d];X1(Q)&&(d==="span"?a.push(n.b(`${t[d]}`)):Q>0&&a.push(n.b(`${d}-${t[d]}`)))}),["xs","sm","md","lg","xl"].forEach(d=>{X1(t[d])?a.push(n.b(`${d}-${t[d]}`)):gi(t[d])&&Object.entries(t[d]).forEach(([Q,p])=>{a.push(Q!=="span"?n.b(`${d}-${Q}-${p}`):n.b(`${d}-${p}`))})}),r.value&&a.push(n.is("guttered")),[n.b(),a]});return(a,s)=>(T.openBlock(),T.createBlock(T.resolveDynamicComponent(a.tag),{class:T.normalizeClass(T.unref(o)),style:T.normalizeStyle(T.unref(i))},{default:T.withCtx(()=>[T.renderSlot(a.$slots,"default")]),_:3},8,["class","style"]))}});var Tz=Sr(fz,[["__file","col.vue"]]);const K3=Xi(Tz),Qz=T.defineComponent({name:"ElCollapseTransition"}),pz=T.defineComponent({...Qz,setup(e){const t=Cr("collapse-transition"),r=i=>{i.style.maxHeight="",i.style.overflow=i.dataset.oldOverflow,i.style.paddingTop=i.dataset.oldPaddingTop,i.style.paddingBottom=i.dataset.oldPaddingBottom},n={beforeEnter(i){i.dataset||(i.dataset={}),i.dataset.oldPaddingTop=i.style.paddingTop,i.dataset.oldPaddingBottom=i.style.paddingBottom,i.style.height&&(i.dataset.elExistsHeight=i.style.height),i.style.maxHeight=0,i.style.paddingTop=0,i.style.paddingBottom=0},enter(i){requestAnimationFrame(()=>{i.dataset.oldOverflow=i.style.overflow,i.dataset.elExistsHeight?i.style.maxHeight=i.dataset.elExistsHeight:i.scrollHeight!==0?i.style.maxHeight=`${i.scrollHeight}px`:i.style.maxHeight=0,i.style.paddingTop=i.dataset.oldPaddingTop,i.style.paddingBottom=i.dataset.oldPaddingBottom,i.style.overflow="hidden"})},afterEnter(i){i.style.maxHeight="",i.style.overflow=i.dataset.oldOverflow},enterCancelled(i){r(i)},beforeLeave(i){i.dataset||(i.dataset={}),i.dataset.oldPaddingTop=i.style.paddingTop,i.dataset.oldPaddingBottom=i.style.paddingBottom,i.dataset.oldOverflow=i.style.overflow,i.style.maxHeight=`${i.scrollHeight}px`,i.style.overflow="hidden"},leave(i){i.scrollHeight!==0&&(i.style.maxHeight=0,i.style.paddingTop=0,i.style.paddingBottom=0)},afterLeave(i){r(i)},leaveCancelled(i){r(i)}};return(i,o)=>(T.openBlock(),T.createBlock(T.Transition,T.mergeProps({name:T.unref(t).b()},T.toHandlers(n)),{default:T.withCtx(()=>[T.renderSlot(i.$slots,"default")]),_:3},16,["name"]))}});var Cc=Sr(pz,[["__file","collapse-transition.vue"]]);Cc.install=e=>{e.component(Cc.name,Cc)};const mz=Cc,gz=Qn({color:{type:Er(Object),required:!0},vertical:{type:Boolean,default:!1}});let ST=!1;function W0(e,t){if(!q1)return;const r=function(o){var a;(a=t.drag)==null||a.call(t,o)},n=function(o){var a;document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n),document.removeEventListener("touchmove",r),document.removeEventListener("touchend",n),document.onselectstart=null,document.ondragstart=null,ST=!1,(a=t.end)==null||a.call(t,o)},i=function(o){var a;ST||(o.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",r),document.addEventListener("mouseup",n),document.addEventListener("touchmove",r),document.addEventListener("touchend",n),ST=!0,(a=t.start)==null||a.call(t,o))};e.addEventListener("mousedown",i),e.addEventListener("touchstart",i)}const yz=e=>{const t=T.getCurrentInstance(),r=T.shallowRef(),n=T.shallowRef();function i(a){a.target!==r.value&&o(a)}function o(a){if(!n.value||!r.value)return;const h=t.vnode.el.getBoundingClientRect(),{clientX:d,clientY:Q}=Vf(a);if(e.vertical){let p=Q-h.top;p=Math.max(r.value.offsetHeight/2,p),p=Math.min(p,h.height-r.value.offsetHeight/2),e.color.set("alpha",Math.round((p-r.value.offsetHeight/2)/(h.height-r.value.offsetHeight)*100))}else{let p=d-h.left;p=Math.max(r.value.offsetWidth/2,p),p=Math.min(p,h.width-r.value.offsetWidth/2),e.color.set("alpha",Math.round((p-r.value.offsetWidth/2)/(h.width-r.value.offsetWidth)*100))}}return{thumb:r,bar:n,handleDrag:o,handleClick:i}},_z=(e,{bar:t,thumb:r,handleDrag:n})=>{const i=T.getCurrentInstance(),o=Cr("color-alpha-slider"),a=T.ref(0),s=T.ref(0),h=T.ref();function d(){if(!r.value||e.vertical)return 0;const O=i.vnode.el,V=e.color.get("alpha");return O?Math.round(V*(O.offsetWidth-r.value.offsetWidth/2)/100):0}function Q(){if(!r.value)return 0;const O=i.vnode.el;if(!e.vertical)return 0;const V=e.color.get("alpha");return O?Math.round(V*(O.offsetHeight-r.value.offsetHeight/2)/100):0}function p(){if(e.color&&e.color.value){const{r:O,g:V,b:k}=e.color.toRgb();return`linear-gradient(to right, rgba(${O}, ${V}, ${k}, 0) 0%, rgba(${O}, ${V}, ${k}, 1) 100%)`}return""}function g(){a.value=d(),s.value=Q(),h.value=p()}T.onMounted(()=>{if(!t.value||!r.value)return;const O={drag:V=>{n(V)},end:V=>{n(V)}};W0(t.value,O),W0(r.value,O),g()}),T.watch(()=>e.color.get("alpha"),()=>g()),T.watch(()=>e.color.value,()=>g());const _=T.computed(()=>[o.b(),o.is("vertical",e.vertical)]),x=T.computed(()=>o.e("bar")),b=T.computed(()=>o.e("thumb")),A=T.computed(()=>({background:h.value})),E=T.computed(()=>({left:w6(a.value),top:w6(s.value)}));return{rootKls:_,barKls:x,barStyle:A,thumbKls:b,thumbStyle:E,update:g}},vz=T.defineComponent({name:"ElColorAlphaSlider"}),xz=T.defineComponent({...vz,props:gz,setup(e,{expose:t}){const r=e,{bar:n,thumb:i,handleDrag:o,handleClick:a}=yz(r),{rootKls:s,barKls:h,barStyle:d,thumbKls:Q,thumbStyle:p,update:g}=_z(r,{bar:n,thumb:i,handleDrag:o});return t({update:g,bar:n,thumb:i}),(_,x)=>(T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(T.unref(s))},[T.createElementVNode("div",{ref_key:"bar",ref:n,class:T.normalizeClass(T.unref(h)),style:T.normalizeStyle(T.unref(d)),onClick:x[0]||(x[0]=(...b)=>T.unref(a)&&T.unref(a)(...b))},null,6),T.createElementVNode("div",{ref_key:"thumb",ref:i,class:T.normalizeClass(T.unref(Q)),style:T.normalizeStyle(T.unref(p))},null,6)],2))}});var bz=Sr(xz,[["__file","alpha-slider.vue"]]);const Lz=T.defineComponent({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(e){const t=Cr("color-hue-slider"),r=T.getCurrentInstance(),n=T.ref(),i=T.ref(),o=T.ref(0),a=T.ref(0),s=T.computed(()=>e.color.get("hue"));T.watch(()=>s.value,()=>{g()});function h(_){_.target!==n.value&&d(_)}function d(_){if(!i.value||!n.value)return;const b=r.vnode.el.getBoundingClientRect(),{clientX:A,clientY:E}=Vf(_);let O;if(e.vertical){let V=E-b.top;V=Math.min(V,b.height-n.value.offsetHeight/2),V=Math.max(n.value.offsetHeight/2,V),O=Math.round((V-n.value.offsetHeight/2)/(b.height-n.value.offsetHeight)*360)}else{let V=A-b.left;V=Math.min(V,b.width-n.value.offsetWidth/2),V=Math.max(n.value.offsetWidth/2,V),O=Math.round((V-n.value.offsetWidth/2)/(b.width-n.value.offsetWidth)*360)}e.color.set("hue",O)}function Q(){if(!n.value)return 0;const _=r.vnode.el;if(e.vertical)return 0;const x=e.color.get("hue");return _?Math.round(x*(_.offsetWidth-n.value.offsetWidth/2)/360):0}function p(){if(!n.value)return 0;const _=r.vnode.el;if(!e.vertical)return 0;const x=e.color.get("hue");return _?Math.round(x*(_.offsetHeight-n.value.offsetHeight/2)/360):0}function g(){o.value=Q(),a.value=p()}return T.onMounted(()=>{if(!i.value||!n.value)return;const _={drag:x=>{d(x)},end:x=>{d(x)}};W0(i.value,_),W0(n.value,_),g()}),{bar:i,thumb:n,thumbLeft:o,thumbTop:a,hueValue:s,handleClick:h,update:g,ns:t}}});function wz(e,t,r,n,i,o){return T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass([e.ns.b(),e.ns.is("vertical",e.vertical)])},[T.createElementVNode("div",{ref:"bar",class:T.normalizeClass(e.ns.e("bar")),onClick:t[0]||(t[0]=(...a)=>e.handleClick&&e.handleClick(...a))},null,2),T.createElementVNode("div",{ref:"thumb",class:T.normalizeClass(e.ns.e("thumb")),style:T.normalizeStyle({left:e.thumbLeft+"px",top:e.thumbTop+"px"})},null,6)],2)}var Ez=Sr(Lz,[["render",wz],["__file","hue-slider.vue"]]);const Mz=Qn({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:U3,popperClass:{type:String,default:""},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},predefine:{type:Er(Array)},validateEvent:{type:Boolean,default:!0}}),Az={[A1]:e=>W1(e)||B3(e),[dc]:e=>W1(e)||B3(e),activeChange:e=>W1(e)||B3(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},eb=Symbol("colorPickerContextKey"),rb=function(e,t,r){return[e,t*r/((e=(2-t)*r)<1?e:2-e)||0,e/2]},Cz=function(e){return typeof e=="string"&&e.includes(".")&&Number.parseFloat(e)===1},Sz=function(e){return typeof e=="string"&&e.includes("%")},R6=function(e,t){Cz(e)&&(e="100%");const r=Sz(e);return e=Math.min(t,Math.max(0,Number.parseFloat(`${e}`))),r&&(e=Number.parseInt(`${e*t}`,10)/100),Math.abs(e-t)<1e-6?1:e%t/Number.parseFloat(t)},nb={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},Sc=e=>{e=Math.min(Math.round(e),255);const t=Math.floor(e/16),r=e%16;return`${nb[t]||t}${nb[r]||r}`},ib=function({r:e,g:t,b:r}){return Number.isNaN(+e)||Number.isNaN(+t)||Number.isNaN(+r)?"":`#${Sc(e)}${Sc(t)}${Sc(r)}`},HT={A:10,B:11,C:12,D:13,E:14,F:15},h4=function(e){return e.length===2?(HT[e[0].toUpperCase()]||+e[0])*16+(HT[e[1].toUpperCase()]||+e[1]):HT[e[1].toUpperCase()]||+e[1]},Hz=function(e,t,r){t=t/100,r=r/100;let n=t;const i=Math.max(r,.01);r*=2,t*=r<=1?r:2-r,n*=i<=1?i:2-i;const o=(r+t)/2,a=r===0?2*n/(i+n):2*t/(r+t);return{h:e,s:a*100,v:o*100}},ob=(e,t,r)=>{e=R6(e,255),t=R6(t,255),r=R6(r,255);const n=Math.max(e,t,r),i=Math.min(e,t,r);let o;const a=n,s=n-i,h=n===0?0:s/n;if(n===i)o=0;else{switch(n){case e:{o=(t-r)/s+(t<r?6:0);break}case t:{o=(r-e)/s+2;break}case r:{o=(e-t)/s+4;break}}o/=6}return{h:o*360,s:h*100,v:a*100}},X0=function(e,t,r){e=R6(e,360)*6,t=R6(t,100),r=R6(r,100);const n=Math.floor(e),i=e-n,o=r*(1-t),a=r*(1-i*t),s=r*(1-(1-i)*t),h=n%6,d=[r,a,o,o,s,r][h],Q=[s,r,r,a,o,o][h],p=[o,o,s,r,r,a][h];return{r:Math.round(d*255),g:Math.round(Q*255),b:Math.round(p*255)}};class K0{constructor(t={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this.enableAlpha=!1,this.format="hex",this.value="";for(const r in t)r4(t,r)&&(this[r]=t[r]);t.value?this.fromString(t.value):this.doOnChange()}set(t,r){if(arguments.length===1&&typeof t=="object"){for(const n in t)r4(t,n)&&this.set(n,t[n]);return}this[`_${t}`]=r,this.doOnChange()}get(t){return t==="alpha"?Math.floor(this[`_${t}`]):this[`_${t}`]}toRgb(){return X0(this._hue,this._saturation,this._value)}fromString(t){if(!t){this._hue=0,this._saturation=100,this._value=100,this.doOnChange();return}const r=(n,i,o)=>{this._hue=Math.max(0,Math.min(360,n)),this._saturation=Math.max(0,Math.min(100,i)),this._value=Math.max(0,Math.min(100,o)),this.doOnChange()};if(t.includes("hsl")){const n=t.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));if(n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3){const{h:i,s:o,v:a}=Hz(n[0],n[1],n[2]);r(i,o,a)}}else if(t.includes("hsv")){const n=t.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3&&r(n[0],n[1],n[2])}else if(t.includes("rgb")){const n=t.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));if(n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3){const{h:i,s:o,v:a}=ob(n[0],n[1],n[2]);r(i,o,a)}}else if(t.includes("#")){const n=t.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(n))return;let i,o,a;n.length===3?(i=h4(n[0]+n[0]),o=h4(n[1]+n[1]),a=h4(n[2]+n[2])):(n.length===6||n.length===8)&&(i=h4(n.slice(0,2)),o=h4(n.slice(2,4)),a=h4(n.slice(4,6))),n.length===8?this._alpha=h4(n.slice(6))/255*100:(n.length===3||n.length===6)&&(this._alpha=100);const{h:s,s:h,v:d}=ob(i,o,a);r(s,h,d)}}compare(t){return Math.abs(t._hue-this._hue)<2&&Math.abs(t._saturation-this._saturation)<1&&Math.abs(t._value-this._value)<1&&Math.abs(t._alpha-this._alpha)<1}doOnChange(){const{_hue:t,_saturation:r,_value:n,_alpha:i,format:o}=this;if(this.enableAlpha)switch(o){case"hsl":{const a=rb(t,r/100,n/100);this.value=`hsla(${t}, ${Math.round(a[1]*100)}%, ${Math.round(a[2]*100)}%, ${this.get("alpha")/100})`;break}case"hsv":{this.value=`hsva(${t}, ${Math.round(r)}%, ${Math.round(n)}%, ${this.get("alpha")/100})`;break}case"hex":{this.value=`${ib(X0(t,r,n))}${Sc(i*255/100)}`;break}default:{const{r:a,g:s,b:h}=X0(t,r,n);this.value=`rgba(${a}, ${s}, ${h}, ${this.get("alpha")/100})`}}else switch(o){case"hsl":{const a=rb(t,r/100,n/100);this.value=`hsl(${t}, ${Math.round(a[1]*100)}%, ${Math.round(a[2]*100)}%)`;break}case"hsv":{this.value=`hsv(${t}, ${Math.round(r)}%, ${Math.round(n)}%)`;break}case"rgb":{const{r:a,g:s,b:h}=X0(t,r,n);this.value=`rgb(${a}, ${s}, ${h})`;break}default:this.value=ib(X0(t,r,n))}}}const Oz=T.defineComponent({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0}},setup(e){const t=Cr("color-predefine"),{currentColor:r}=T.inject(eb),n=T.ref(o(e.colors,e.color));T.watch(()=>r.value,a=>{const s=new K0;s.fromString(a),n.value.forEach(h=>{h.selected=s.compare(h)})}),T.watchEffect(()=>{n.value=o(e.colors,e.color)});function i(a){e.color.fromString(e.colors[a])}function o(a,s){return a.map(h=>{const d=new K0;return d.enableAlpha=!0,d.format="rgba",d.fromString(h),d.selected=d.value===s.value,d})}return{rgbaColors:n,handleSelect:i,ns:t}}}),Vz=["onClick"];function Dz(e,t,r,n,i,o){return T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(e.ns.b())},[T.createElementVNode("div",{class:T.normalizeClass(e.ns.e("colors"))},[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.rgbaColors,(a,s)=>(T.openBlock(),T.createElementBlock("div",{key:e.colors[s],class:T.normalizeClass([e.ns.e("color-selector"),e.ns.is("alpha",a._alpha<100),{selected:a.selected}]),onClick:h=>e.handleSelect(s)},[T.createElementVNode("div",{style:T.normalizeStyle({backgroundColor:a.value})},null,4)],10,Vz))),128))],2)],2)}var Pz=Sr(Oz,[["render",Dz],["__file","predefine.vue"]]);const Iz=T.defineComponent({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(e){const t=Cr("color-svpanel"),r=T.getCurrentInstance(),n=T.ref(0),i=T.ref(0),o=T.ref("hsl(0, 100%, 50%)"),a=T.computed(()=>{const d=e.color.get("hue"),Q=e.color.get("value");return{hue:d,value:Q}});function s(){const d=e.color.get("saturation"),Q=e.color.get("value"),p=r.vnode.el,{clientWidth:g,clientHeight:_}=p;i.value=d*g/100,n.value=(100-Q)*_/100,o.value=`hsl(${e.color.get("hue")}, 100%, 50%)`}function h(d){const p=r.vnode.el.getBoundingClientRect(),{clientX:g,clientY:_}=Vf(d);let x=g-p.left,b=_-p.top;x=Math.max(0,x),x=Math.min(x,p.width),b=Math.max(0,b),b=Math.min(b,p.height),i.value=x,n.value=b,e.color.set({saturation:x/p.width*100,value:100-b/p.height*100})}return T.watch(()=>a.value,()=>{s()}),T.onMounted(()=>{W0(r.vnode.el,{drag:d=>{h(d)},end:d=>{h(d)}}),s()}),{cursorTop:n,cursorLeft:i,background:o,colorValue:a,handleDrag:h,update:s,ns:t}}}),kz=[T.createElementVNode("div",null,null,-1)];function Rz(e,t,r,n,i,o){return T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(e.ns.b()),style:T.normalizeStyle({backgroundColor:e.background})},[T.createElementVNode("div",{class:T.normalizeClass(e.ns.e("white"))},null,2),T.createElementVNode("div",{class:T.normalizeClass(e.ns.e("black"))},null,2),T.createElementVNode("div",{class:T.normalizeClass(e.ns.e("cursor")),style:T.normalizeStyle({top:e.cursorTop+"px",left:e.cursorLeft+"px"})},kz,6)],6)}var Bz=Sr(Iz,[["render",Rz],["__file","sv-panel.vue"]]);const Nz=["onKeydown"],Fz=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"],jz=T.defineComponent({name:"ElColorPicker"}),zz=T.defineComponent({...jz,props:Mz,emits:Az,setup(e,{expose:t,emit:r}){const n=e,{t:i}=fc(),o=Cr("color"),{formItem:a}=G3(),s=$3(),h=V6(),{inputId:d,isLabeledByFormItem:Q}=D6(n,{formItemContext:a}),p=T.ref(),g=T.ref(),_=T.ref(),x=T.ref(),b=T.ref(),A=T.ref(),{isFocused:E,handleFocus:O,handleBlur:V}=dT(b,{beforeBlur(zt){var de;return(de=x.value)==null?void 0:de.isFocusInsideContent(zt)},afterBlur(){me(!1),qt()}}),k=zt=>{if(h.value)return ue();O(zt)};let j=!0;const $=T.reactive(new K0({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue})),U=T.ref(!1),J=T.ref(!1),tt=T.ref(""),rt=T.computed(()=>!n.modelValue&&!J.value?"transparent":ie($,n.showAlpha)),st=T.computed(()=>!n.modelValue&&!J.value?"":$.value),pt=T.computed(()=>Q.value?void 0:n.label||i("el.colorpicker.defaultLabel")),St=T.computed(()=>Q.value?a==null?void 0:a.labelId:void 0),$t=T.computed(()=>[o.b("picker"),o.is("disabled",h.value),o.bm("picker",s.value),o.is("focused",E.value)]);function ie(zt,de){if(!(zt instanceof K0))throw new TypeError("color should be instance of _color Class");const{r:Re,g:Ce,b:He}=zt.toRgb();return de?`rgba(${Re}, ${Ce}, ${He}, ${zt.get("alpha")/100})`:`rgb(${Re}, ${Ce}, ${He})`}function me(zt){U.value=zt}const Ft=mv(me,100,{leading:!0});function he(){h.value||me(!0)}function cr(){Ft(!1),qt()}function qt(){T.nextTick(()=>{n.modelValue?$.fromString(n.modelValue):($.value="",T.nextTick(()=>{J.value=!1}))})}function le(){h.value||Ft(!U.value)}function Qe(){$.fromString(tt.value)}function xe(){const zt=$.value;r(A1,zt),r("change",zt),n.validateEvent&&(a==null||a.validate("change").catch(de=>K1(de))),Ft(!1),T.nextTick(()=>{const de=new K0({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue});$.compare(de)||qt()})}function Fe(){Ft(!1),r(A1,null),r("change",null),n.modelValue!==null&&n.validateEvent&&(a==null||a.validate("change").catch(zt=>K1(zt))),qt()}function Ue(zt){if(U.value&&(cr(),E.value)){const de=new FocusEvent("focus",zt);V(de)}}function je(zt){zt.preventDefault(),zt.stopPropagation(),me(!1),qt()}function Bt(zt){switch(zt.code){case Ki.enter:case Ki.space:zt.preventDefault(),zt.stopPropagation(),he(),A.value.focus();break;case Ki.esc:je(zt);break}}function Zt(){b.value.focus()}function ue(){b.value.blur()}return T.onMounted(()=>{n.modelValue&&(tt.value=st.value)}),T.watch(()=>n.modelValue,zt=>{zt?zt&&zt!==$.value&&(j=!1,$.fromString(zt)):J.value=!1}),T.watch(()=>st.value,zt=>{tt.value=zt,j&&r("activeChange",zt),j=!0}),T.watch(()=>$.value,()=>{!n.modelValue&&!J.value&&(J.value=!0)}),T.watch(()=>U.value,()=>{T.nextTick(()=>{var zt,de,Re;(zt=p.value)==null||zt.update(),(de=g.value)==null||de.update(),(Re=_.value)==null||Re.update()})}),T.provide(eb,{currentColor:st}),t({color:$,show:he,hide:cr,focus:Zt,blur:ue}),(zt,de)=>(T.openBlock(),T.createBlock(T.unref(bT),{ref_key:"popper",ref:x,visible:U.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[T.unref(o).be("picker","panel"),T.unref(o).b("dropdown"),zt.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",transition:`${T.unref(o).namespace.value}-zoom-in-top`,persistent:"",onHide:de[2]||(de[2]=Re=>me(!1))},{content:T.withCtx(()=>[T.withDirectives((T.openBlock(),T.createElementBlock("div",{onKeydown:T.withKeys(je,["esc"])},[T.createElementVNode("div",{class:T.normalizeClass(T.unref(o).be("dropdown","main-wrapper"))},[T.createVNode(Ez,{ref_key:"hue",ref:p,class:"hue-slider",color:T.unref($),vertical:""},null,8,["color"]),T.createVNode(Bz,{ref_key:"sv",ref:g,color:T.unref($)},null,8,["color"])],2),zt.showAlpha?(T.openBlock(),T.createBlock(bz,{key:0,ref_key:"alpha",ref:_,color:T.unref($)},null,8,["color"])):T.createCommentVNode("v-if",!0),zt.predefine?(T.openBlock(),T.createBlock(Pz,{key:1,ref:"predefine",color:T.unref($),colors:zt.predefine},null,8,["color","colors"])):T.createCommentVNode("v-if",!0),T.createElementVNode("div",{class:T.normalizeClass(T.unref(o).be("dropdown","btns"))},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(o).be("dropdown","value"))},[T.createVNode(T.unref(vc),{ref_key:"inputRef",ref:A,modelValue:tt.value,"onUpdate:modelValue":de[0]||(de[0]=Re=>tt.value=Re),"validate-event":!1,size:"small",onKeyup:T.withKeys(Qe,["enter"]),onBlur:Qe},null,8,["modelValue","onKeyup"])],2),T.createVNode(T.unref(na),{class:T.normalizeClass(T.unref(o).be("dropdown","link-btn")),text:"",size:"small",onClick:Fe},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(T.unref(i)("el.colorpicker.clear")),1)]),_:1},8,["class"]),T.createVNode(T.unref(na),{plain:"",size:"small",class:T.normalizeClass(T.unref(o).be("dropdown","btn")),onClick:xe},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(T.unref(i)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,Nz)),[[T.unref(Bx),Ue]])]),default:T.withCtx(()=>[T.createElementVNode("div",{id:T.unref(d),ref_key:"triggerRef",ref:b,class:T.normalizeClass(T.unref($t)),role:"button","aria-label":T.unref(pt),"aria-labelledby":T.unref(St),"aria-description":T.unref(i)("el.colorpicker.description",{color:zt.modelValue||""}),"aria-disabled":T.unref(h),tabindex:T.unref(h)?-1:zt.tabindex,onKeydown:Bt,onFocus:k,onBlur:de[1]||(de[1]=(...Re)=>T.unref(V)&&T.unref(V)(...Re))},[T.unref(h)?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(T.unref(o).be("picker","mask"))},null,2)):T.createCommentVNode("v-if",!0),T.createElementVNode("div",{class:T.normalizeClass(T.unref(o).be("picker","trigger")),onClick:le},[T.createElementVNode("span",{class:T.normalizeClass([T.unref(o).be("picker","color"),T.unref(o).is("alpha",zt.showAlpha)])},[T.createElementVNode("span",{class:T.normalizeClass(T.unref(o).be("picker","color-inner")),style:T.normalizeStyle({backgroundColor:T.unref(rt)})},[T.withDirectives(T.createVNode(T.unref(yi),{class:T.normalizeClass([T.unref(o).be("picker","icon"),T.unref(o).is("icon-arrow-down")])},{default:T.withCtx(()=>[T.createVNode(T.unref(F3))]),_:1},8,["class"]),[[T.vShow,zt.modelValue||J.value]]),T.withDirectives(T.createVNode(T.unref(yi),{class:T.normalizeClass([T.unref(o).be("picker","empty"),T.unref(o).is("icon-close")])},{default:T.withCtx(()=>[T.createVNode(T.unref(k0))]),_:1},8,["class"]),[[T.vShow,!zt.modelValue&&!J.value]])],6)],2)],2)],42,Fz)]),_:1},8,["visible","popper-class","transition"]))}});var Uz=Sr(zz,[["__file","color-picker.vue"]]);const $z=Xi(Uz),Gz=T.defineComponent({name:"ElContainer"}),Zz=T.defineComponent({...Gz,props:{direction:{type:String}},setup(e){const t=e,r=T.useSlots(),n=Cr("container"),i=T.computed(()=>t.direction==="vertical"?!0:t.direction==="horizontal"?!1:r&&r.default?r.default().some(a=>{const s=a.type.name;return s==="ElHeader"||s==="ElFooter"}):!1);return(o,a)=>(T.openBlock(),T.createElementBlock("section",{class:T.normalizeClass([T.unref(n).b(),T.unref(n).is("vertical",T.unref(i))])},[T.renderSlot(o.$slots,"default")],2))}});var qz=Sr(Zz,[["__file","container.vue"]]);const Wz=T.defineComponent({name:"ElAside"}),Xz=T.defineComponent({...Wz,props:{width:{type:String,default:null}},setup(e){const t=e,r=Cr("aside"),n=T.computed(()=>t.width?r.cssVarBlock({width:t.width}):{});return(i,o)=>(T.openBlock(),T.createElementBlock("aside",{class:T.normalizeClass(T.unref(r).b()),style:T.normalizeStyle(T.unref(n))},[T.renderSlot(i.$slots,"default")],6))}});var ab=Sr(Xz,[["__file","aside.vue"]]);const Kz=T.defineComponent({name:"ElFooter"}),Yz=T.defineComponent({...Kz,props:{height:{type:String,default:null}},setup(e){const t=e,r=Cr("footer"),n=T.computed(()=>t.height?r.cssVarBlock({height:t.height}):{});return(i,o)=>(T.openBlock(),T.createElementBlock("footer",{class:T.normalizeClass(T.unref(r).b()),style:T.normalizeStyle(T.unref(n))},[T.renderSlot(i.$slots,"default")],6))}});var sb=Sr(Yz,[["__file","footer.vue"]]);const Jz=T.defineComponent({name:"ElHeader"}),tU=T.defineComponent({...Jz,props:{height:{type:String,default:null}},setup(e){const t=e,r=Cr("header"),n=T.computed(()=>t.height?r.cssVarBlock({height:t.height}):{});return(i,o)=>(T.openBlock(),T.createElementBlock("header",{class:T.normalizeClass(T.unref(r).b()),style:T.normalizeStyle(T.unref(n))},[T.renderSlot(i.$slots,"default")],6))}});var lb=Sr(tU,[["__file","header.vue"]]);const eU=T.defineComponent({name:"ElMain"}),rU=T.defineComponent({...eU,setup(e){const t=Cr("main");return(r,n)=>(T.openBlock(),T.createElementBlock("main",{class:T.normalizeClass(T.unref(t).b())},[T.renderSlot(r.$slots,"default")],2))}});var cb=Sr(rU,[["__file","main.vue"]]);const nU=Xi(qz,{Aside:ab,Footer:sb,Header:lb,Main:cb});_o(ab),_o(sb),_o(lb);const ub=_o(cb),iU=T.defineComponent({inheritAttrs:!1});function oU(e,t,r,n,i,o){return T.renderSlot(e.$slots,"default")}var aU=Sr(iU,[["render",oU],["__file","collection.vue"]]);const sU=T.defineComponent({name:"ElCollectionItem",inheritAttrs:!1});function lU(e,t,r,n,i,o){return T.renderSlot(e.$slots,"default")}var cU=Sr(sU,[["render",lU],["__file","collection-item.vue"]]);const uU="data-el-collection-item",hU=e=>{const t=`El${e}Collection`,r=`${t}Item`,n=Symbol(t),i=Symbol(r),o={...aU,name:t,setup(){const s=T.ref(null),h=new Map,d=()=>{const Q=T.unref(s);if(!Q)return[];const p=Array.from(Q.querySelectorAll(`[${uU}]`));return[...h.values()].sort((_,x)=>p.indexOf(_.ref)-p.indexOf(x.ref))};T.provide(n,{itemMap:h,getItems:d,collectionRef:s})}},a={...cU,name:r,setup(s,{attrs:h}){const d=T.ref(null),Q=T.inject(n,void 0);T.provide(i,{collectionItemRef:d}),T.onMounted(()=>{const p=T.unref(d);p&&Q.itemMap.set(p,{ref:p,...h})}),T.onBeforeUnmount(()=>{const p=T.unref(d);Q.itemMap.delete(p)})}};return{COLLECTION_INJECTION_KEY:n,COLLECTION_ITEM_INJECTION_KEY:i,ElCollection:o,ElCollectionItem:a}},OT=Qn({trigger:Z0.trigger,effect:{...E2.effect,default:"light"},type:{type:Er(String)},placement:{type:Er(String),default:"bottom"},popperOptions:{type:Er(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:Er([Number,String]),default:0},maxHeight:{type:Er([Number,String]),default:""},popperClass:{type:String,default:""},disabled:{type:Boolean,default:!1},role:{type:String,default:"menu"},buttonProps:{type:Er(Object)},teleported:E2.teleported});Qn({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:j3}}),Qn({onKeydown:{type:Er(Function)}}),hU("Dropdown");const hb=Symbol("ElSelectGroup"),Hc=Symbol("ElSelect");function dU(e,t){const r=T.inject(Hc),n=T.inject(hb,{disabled:!1}),i=T.computed(()=>r.props.multiple?Q(r.props.modelValue,e.value):Q([r.props.modelValue],e.value)),o=T.computed(()=>{if(r.props.multiple){const _=r.props.modelValue||[];return!i.value&&_.length>=r.props.multipleLimit&&r.props.multipleLimit>0}else return!1}),a=T.computed(()=>e.label||(gi(e.value)?"":e.value)),s=T.computed(()=>e.value||e.label||""),h=T.computed(()=>e.disabled||t.groupDisabled||o.value),d=T.getCurrentInstance(),Q=(_=[],x)=>{if(gi(e.value)){const b=r.props.valueKey;return _&&_.some(A=>T.toRaw(Ua(A,b))===Ua(x,b))}else return _&&_.includes(x)},p=()=>{!e.disabled&&!n.disabled&&(r.states.hoveringIndex=r.optionsArray.indexOf(d.proxy))},g=_=>{const x=new RegExp(CR(_),"i");t.visible=x.test(a.value)||e.created};return T.watch(()=>a.value,()=>{!e.created&&!r.props.remote&&r.setSelected()}),T.watch(()=>e.value,(_,x)=>{const{remote:b,valueKey:A}=r.props;if(V0(_,x)||(r.onOptionDestroy(x,d.proxy),r.onOptionCreate(d.proxy)),!e.created&&!b){if(A&&gi(_)&&gi(x)&&_[A]===x[A])return;r.setSelected()}}),T.watch(()=>n.disabled,()=>{t.groupDisabled=n.disabled},{immediate:!0}),{select:r,currentLabel:a,currentValue:s,itemSelected:i,isDisabled:h,hoverItem:p,updateOption:g}}const fU=T.defineComponent({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=Cr("select"),r=$0(),n=T.computed(()=>[t.be("dropdown","item"),t.is("disabled",T.unref(s)),t.is("selected",T.unref(a)),t.is("hovering",T.unref(g))]),i=T.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:o,itemSelected:a,isDisabled:s,select:h,hoverItem:d,updateOption:Q}=dU(e,i),{visible:p,hover:g}=T.toRefs(i),_=T.getCurrentInstance().proxy;h.onOptionCreate(_),T.onBeforeUnmount(()=>{const b=_.value,{selected:A}=h.states,O=(h.props.multiple?A:[A]).some(V=>V.value===_.value);T.nextTick(()=>{h.states.cachedOptions.get(b)===_&&!O&&h.states.cachedOptions.delete(b)}),h.onOptionDestroy(b,_)});function x(){e.disabled!==!0&&i.groupDisabled!==!0&&h.handleOptionSelect(_)}return{ns:t,id:r,containerKls:n,currentLabel:o,itemSelected:a,isDisabled:s,select:h,hoverItem:d,updateOption:Q,visible:p,hover:g,selectOptionClick:x,states:i}}}),TU=["id","aria-disabled","aria-selected"];function QU(e,t,r,n,i,o){return T.withDirectives((T.openBlock(),T.createElementBlock("li",{id:e.id,class:T.normalizeClass(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMouseenter:t[0]||(t[0]=(...a)=>e.hoverItem&&e.hoverItem(...a)),onClick:t[1]||(t[1]=T.withModifiers((...a)=>e.selectOptionClick&&e.selectOptionClick(...a),["stop"]))},[T.renderSlot(e.$slots,"default",{},()=>[T.createElementVNode("span",null,T.toDisplayString(e.currentLabel),1)])],42,TU)),[[T.vShow,e.visible]])}var VT=Sr(fU,[["render",QU],["__file","option.vue"]]);const pU=T.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=T.inject(Hc),t=Cr("select"),r=T.computed(()=>e.props.popperClass),n=T.computed(()=>e.props.multiple),i=T.computed(()=>e.props.fitInputWidth),o=T.ref("");function a(){var s;o.value=`${(s=e.selectRef)==null?void 0:s.offsetWidth}px`}return T.onMounted(()=>{a(),Fa(e.selectRef,a)}),{ns:t,minWidth:o,popperClass:r,isMultiple:n,isFitInputWidth:i}}});function mU(e,t,r,n,i,o){return T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:T.normalizeStyle({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(e.ns.be("dropdown","header"))},[T.renderSlot(e.$slots,"header")],2)):T.createCommentVNode("v-if",!0),T.renderSlot(e.$slots,"default"),e.$slots.footer?(T.openBlock(),T.createElementBlock("div",{key:1,class:T.normalizeClass(e.ns.be("dropdown","footer"))},[T.renderSlot(e.$slots,"footer")],2)):T.createCommentVNode("v-if",!0)],6)}var gU=Sr(pU,[["render",mU],["__file","select-dropdown.vue"]]);function yU(e){const t=T.ref(!1);return{handleCompositionStart:()=>{t.value=!0},handleCompositionUpdate:o=>{const a=o.target.value,s=a[a.length-1]||"";t.value=!Av(s)},handleCompositionEnd:o=>{t.value&&(t.value=!1,Y2(e)&&e(o))}}}const _U=11,vU=(e,t)=>{const{t:r}=fc(),n=$0(),i=Cr("select"),o=Cr("input"),a=T.reactive({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:e.multiple?[]:{},selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1});Cv({from:"suffixTransition",replacement:"override style scheme",version:"2.3.0",scope:"props",ref:"https://element-plus.org/en-US/component/select.html#select-attributes"},T.computed(()=>e.suffixTransition===!1));const s=T.ref(null),h=T.ref(null),d=T.ref(null),Q=T.ref(null),p=T.ref(null),g=T.ref(null),_=T.ref(null),x=T.ref(null),b=T.ref(null),A=T.ref(null),E=T.ref(null),O=T.ref(null),{wrapperRef:V,isFocused:k,handleFocus:j,handleBlur:$}=dT(p,{afterFocus(){e.automaticDropdown&&!U.value&&(U.value=!0,a.menuVisibleOnFocus=!0)},beforeBlur(Ot){var Kt,Ve;return((Kt=d.value)==null?void 0:Kt.isFocusInsideContent(Ot))||((Ve=Q.value)==null?void 0:Ve.isFocusInsideContent(Ot))},afterBlur(){U.value=!1,a.menuVisibleOnFocus=!1}}),U=T.ref(!1),J=T.ref(),{form:tt,formItem:rt}=G3(),{inputId:st}=D6(e,{formItemContext:rt}),pt=T.computed(()=>e.disabled||(tt==null?void 0:tt.disabled)),St=T.computed(()=>e.multiple?Vi(e.modelValue)&&e.modelValue.length>0:e.modelValue!==void 0&&e.modelValue!==null&&e.modelValue!==""),$t=T.computed(()=>e.clearable&&!pt.value&&a.inputHovering&&St.value),ie=T.computed(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),me=T.computed(()=>i.is("reverse",ie.value&&U.value&&e.suffixTransition)),Ft=T.computed(()=>(rt==null?void 0:rt.validateState)||""),he=T.computed(()=>Ev[Ft.value]),cr=T.computed(()=>e.remote?300:0),qt=T.computed(()=>e.loading?e.loadingText||r("el.select.loading"):e.remote&&!a.inputValue&&a.options.size===0?!1:e.filterable&&a.inputValue&&a.options.size>0&&le.value===0?e.noMatchText||r("el.select.noMatch"):a.options.size===0?e.noDataText||r("el.select.noData"):null),le=T.computed(()=>Qe.value.filter(Ot=>Ot.visible).length),Qe=T.computed(()=>{const Ot=Array.from(a.options.values()),Kt=[];return a.optionValues.forEach(Ve=>{const $e=Ot.findIndex(Qr=>Qr.value===Ve);$e>-1&&Kt.push(Ot[$e])}),Kt.length>=Ot.length?Kt:Ot}),xe=T.computed(()=>Array.from(a.cachedOptions.values())),Fe=T.computed(()=>{const Ot=Qe.value.filter(Kt=>!Kt.created).some(Kt=>Kt.currentLabel===a.inputValue);return e.filterable&&e.allowCreate&&a.inputValue!==""&&!Ot}),Ue=()=>{e.filterable&&Y2(e.filterMethod)||e.filterable&&e.remote&&Y2(e.remoteMethod)||Qe.value.forEach(Ot=>{Ot.updateOption(a.inputValue)})},je=$3(),Bt=T.computed(()=>["small"].includes(je.value)?"small":"default"),Zt=T.computed({get(){return U.value&&qt.value!==!1},set(Ot){U.value=Ot}}),ue=T.computed(()=>Vi(e.modelValue)?e.modelValue.length===0&&!a.inputValue:e.filterable?!a.inputValue:!0),zt=T.computed(()=>{var Ot;const Kt=(Ot=e.placeholder)!=null?Ot:r("el.select.placeholder");return e.multiple||!St.value?Kt:a.selectedLabel});T.watch(()=>e.modelValue,(Ot,Kt)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(a.inputValue="",de("")),Ce(),!V0(Ot,Kt)&&e.validateEvent&&(rt==null||rt.validate("change").catch(Ve=>K1(Ve)))},{flush:"post",deep:!0}),T.watch(()=>U.value,Ot=>{Ot?de(a.inputValue):(a.inputValue="",a.previousQuery=null,a.isBeforeHide=!0),t("visible-change",Ot)}),T.watch(()=>a.options.entries(),()=>{var Ot;if(!q1)return;const Kt=((Ot=s.value)==null?void 0:Ot.querySelectorAll("input"))||[];(!e.filterable&&!e.defaultFirstOption&&!D0(e.modelValue)||!Array.from(Kt).includes(document.activeElement))&&Ce(),e.defaultFirstOption&&(e.filterable||e.remote)&&le.value&&Re()},{flush:"post"}),T.watch(()=>a.hoveringIndex,Ot=>{X1(Ot)&&Ot>-1?J.value=Qe.value[Ot]||{}:J.value={},Qe.value.forEach(Kt=>{Kt.hover=J.value===Kt})}),T.watchEffect(()=>{a.isBeforeHide||Ue()});const de=Ot=>{a.previousQuery!==Ot&&(a.previousQuery=Ot,e.filterable&&Y2(e.filterMethod)?e.filterMethod(Ot):e.filterable&&e.remote&&Y2(e.remoteMethod)&&e.remoteMethod(Ot),e.defaultFirstOption&&(e.filterable||e.remote)&&le.value?T.nextTick(Re):T.nextTick(Pe))},Re=()=>{const Ot=Qe.value.filter($e=>$e.visible&&!$e.disabled&&!$e.states.groupDisabled),Kt=Ot.find($e=>$e.created),Ve=Ot[0];a.hoveringIndex=l1(Qe.value,Kt||Ve)},Ce=()=>{if(e.multiple)a.selectedLabel="";else{const Kt=He(e.modelValue);a.selectedLabel=Kt.currentLabel,a.selected=Kt;return}const Ot=[];Vi(e.modelValue)&&e.modelValue.forEach(Kt=>{Ot.push(He(Kt))}),a.selected=Ot},He=Ot=>{let Kt;const Ve=Df(Ot).toLowerCase()==="object",$e=Df(Ot).toLowerCase()==="null",Qr=Df(Ot).toLowerCase()==="undefined";for(let tn=a.cachedOptions.size-1;tn>=0;tn--){const Ge=xe.value[tn];if(Ve?Ua(Ge.value,e.valueKey)===Ua(Ot,e.valueKey):Ge.value===Ot){Kt={value:Ot,currentLabel:Ge.currentLabel,isDisabled:Ge.isDisabled};break}}if(Kt)return Kt;const Ar=Ve?Ot.label:!$e&&!Qr?Ot:"";return{value:Ot,currentLabel:Ar}},Pe=()=>{e.multiple?a.selected.length>0?a.hoveringIndex=Math.min(...a.selected.map(Ot=>Qe.value.findIndex(Kt=>mt(Kt)===mt(Ot)))):a.hoveringIndex=-1:a.hoveringIndex=Qe.value.findIndex(Ot=>mt(Ot)===mt(a.selected))},ze=()=>{a.selectionWidth=h.value.getBoundingClientRect().width},Ut=()=>{a.calculatorWidth=g.value.getBoundingClientRect().width},Vr=()=>{a.collapseItemWidth=E.value.getBoundingClientRect().width},pn=()=>{var Ot,Kt;(Kt=(Ot=d.value)==null?void 0:Ot.updatePopper)==null||Kt.call(Ot)},Ke=()=>{var Ot,Kt;(Kt=(Ot=Q.value)==null?void 0:Ot.updatePopper)==null||Kt.call(Ot)},_r=()=>{a.inputValue.length>0&&!U.value&&(U.value=!0),de(a.inputValue)},Nn=Ot=>{if(a.inputValue=Ot.target.value,e.remote)H1();else return _r()},H1=mv(()=>{_r()},cr.value),Ln=Ot=>{V0(e.modelValue,Ot)||t(dc,Ot)},pe=Ot=>xR(Ot,Kt=>!a.disabledOptions.has(Kt)),ur=Ot=>{if(e.multiple&&Ot.code!==Ki.delete&&Ot.target.value.length<=0){const Kt=e.modelValue.slice(),Ve=pe(Kt);if(Ve<0)return;Kt.splice(Ve,1),t(A1,Kt),Ln(Kt)}},Yr=(Ot,Kt)=>{const Ve=a.selected.indexOf(Kt);if(Ve>-1&&!pt.value){const $e=e.modelValue.slice();$e.splice(Ve,1),t(A1,$e),Ln($e),t("remove-tag",Kt.value)}Ot.stopPropagation(),ar()},wn=Ot=>{Ot.stopPropagation();const Kt=e.multiple?[]:"";if(!W1(Kt))for(const Ve of a.selected)Ve.isDisabled&&Kt.push(Ve.value);t(A1,Kt),Ln(Kt),a.hoveringIndex=-1,U.value=!1,t("clear"),ar()},fe=Ot=>{if(e.multiple){const Kt=(e.modelValue||[]).slice(),Ve=l1(Kt,Ot.value);Ve>-1?Kt.splice(Ve,1):(e.multipleLimit<=0||Kt.length<e.multipleLimit)&&Kt.push(Ot.value),t(A1,Kt),Ln(Kt),Ot.created&&de(""),e.filterable&&!e.reserveKeyword&&(a.inputValue="")}else t(A1,Ot.value),Ln(Ot.value),U.value=!1;ar(),!U.value&&T.nextTick(()=>{mn(Ot)})},l1=(Ot=[],Kt)=>{if(!gi(Kt))return Ot.indexOf(Kt);const Ve=e.valueKey;let $e=-1;return Ot.some((Qr,Ar)=>T.toRaw(Ua(Qr,Ve))===Ua(Kt,Ve)?($e=Ar,!0):!1),$e},mn=Ot=>{var Kt,Ve,$e,Qr,Ar;const Gr=Vi(Ot)?Ot[0]:Ot;let tn=null;if(Gr!=null&&Gr.value){const Ge=Qe.value.filter(Ur=>Ur.value===Gr.value);Ge.length>0&&(tn=Ge[0].$el)}if(d.value&&tn){const Ge=(Qr=($e=(Ve=(Kt=d.value)==null?void 0:Kt.popperRef)==null?void 0:Ve.contentRef)==null?void 0:$e.querySelector)==null?void 0:Qr.call($e,`.${i.be("dropdown","wrap")}`);Ge&&OR(Ge,tn)}(Ar=O.value)==null||Ar.handleScroll()},ui=Ot=>{a.options.set(Ot.value,Ot),a.cachedOptions.set(Ot.value,Ot),Ot.disabled&&a.disabledOptions.set(Ot.value,Ot)},Fn=(Ot,Kt)=>{a.options.get(Ot)===Kt&&a.options.delete(Ot)},{handleCompositionStart:we,handleCompositionUpdate:yr,handleCompositionEnd:dr}=yU(Ot=>Nn(Ot)),En=T.computed(()=>{var Ot,Kt;return(Kt=(Ot=d.value)==null?void 0:Ot.popperRef)==null?void 0:Kt.contentRef}),T1=()=>{T.nextTick(()=>mn(a.selected))},ar=()=>{var Ot;(Ot=p.value)==null||Ot.focus()},Ri=()=>{yt()},hn=Ot=>{wn(Ot)},yt=Ot=>{if(U.value=!1,k.value){const Kt=new FocusEvent("focus",Ot);T.nextTick(()=>$(Kt))}},it=()=>{a.inputValue.length>0?a.inputValue="":U.value=!1},at=()=>{pt.value||(a.menuVisibleOnFocus?a.menuVisibleOnFocus=!1:U.value=!U.value)},dt=()=>{U.value?Qe.value[a.hoveringIndex]&&fe(Qe.value[a.hoveringIndex]):at()},mt=Ot=>gi(Ot.value)?Ua(Ot.value,e.valueKey):Ot.value,At=T.computed(()=>Qe.value.filter(Ot=>Ot.visible).every(Ot=>Ot.disabled)),Ht=T.computed(()=>e.multiple?e.collapseTags?a.selected.slice(0,e.maxCollapseTags):a.selected:[]),Dt=T.computed(()=>e.multiple?e.collapseTags?a.selected.slice(e.maxCollapseTags):[]:[]),Et=Ot=>{if(!U.value){U.value=!0;return}if(!(a.options.size===0||le.value===0)&&!At.value){Ot==="next"?(a.hoveringIndex++,a.hoveringIndex===a.options.size&&(a.hoveringIndex=0)):Ot==="prev"&&(a.hoveringIndex--,a.hoveringIndex<0&&(a.hoveringIndex=a.options.size-1));const Kt=Qe.value[a.hoveringIndex];(Kt.disabled===!0||Kt.states.groupDisabled===!0||!Kt.visible)&&Et(Ot),T.nextTick(()=>mn(J.value))}},kt=()=>{if(!h.value)return 0;const Ot=window.getComputedStyle(h.value);return Number.parseFloat(Ot.gap||"6px")},ne=T.computed(()=>{const Ot=kt();return{maxWidth:`${E.value&&e.maxCollapseTags===1?a.selectionWidth-a.collapseItemWidth-Ot:a.selectionWidth}px`}}),Xt=T.computed(()=>({maxWidth:`${a.selectionWidth}px`})),Jt=T.computed(()=>({width:`${Math.max(a.calculatorWidth,_U)}px`}));return e.multiple&&!Vi(e.modelValue)&&t(A1,[]),!e.multiple&&Vi(e.modelValue)&&t(A1,""),Fa(h,ze),Fa(g,Ut),Fa(b,pn),Fa(V,pn),Fa(A,Ke),Fa(E,Vr),T.onMounted(()=>{Ce()}),{inputId:st,contentId:n,nsSelect:i,nsInput:o,states:a,isFocused:k,expanded:U,optionsArray:Qe,hoverOption:J,selectSize:je,filteredOptionsCount:le,resetCalculatorWidth:Ut,updateTooltip:pn,updateTagTooltip:Ke,debouncedOnInputChange:H1,onInput:Nn,deletePrevTag:ur,deleteTag:Yr,deleteSelected:wn,handleOptionSelect:fe,scrollToOption:mn,hasModelValue:St,shouldShowPlaceholder:ue,currentPlaceholder:zt,showClose:$t,iconComponent:ie,iconReverse:me,validateState:Ft,validateIcon:he,showNewOption:Fe,updateOptions:Ue,collapseTagSize:Bt,setSelected:Ce,selectDisabled:pt,emptyText:qt,handleCompositionStart:we,handleCompositionUpdate:yr,handleCompositionEnd:dr,onOptionCreate:ui,onOptionDestroy:Fn,handleMenuEnter:T1,handleFocus:j,focus:ar,blur:Ri,handleBlur:$,handleClearClick:hn,handleClickOutside:yt,handleEsc:it,toggleMenu:at,selectOption:dt,getValueKey:mt,navigateOptions:Et,dropdownMenuVisible:Zt,showTagList:Ht,collapseTagList:Dt,tagStyle:ne,collapseTagStyle:Xt,inputStyle:Jt,popperRef:En,inputRef:p,tooltipRef:d,tagTooltipRef:Q,calculatorRef:g,prefixRef:_,suffixRef:x,selectRef:s,wrapperRef:V,selectionRef:h,scrollbarRef:O,menuRef:b,tagMenuRef:A,collapseItemRef:E}};var xU=T.defineComponent({name:"ElOptions",setup(e,{slots:t}){const r=T.inject(Hc);let n=[];return()=>{var i,o;const a=(i=t.default)==null?void 0:i.call(t),s=[];function h(d){Vi(d)&&d.forEach(Q=>{var p,g,_,x;const b=(p=(Q==null?void 0:Q.type)||{})==null?void 0:p.name;b==="ElOptionGroup"?h(!W1(Q.children)&&!Vi(Q.children)&&Y2((g=Q.children)==null?void 0:g.default)?(_=Q.children)==null?void 0:_.default():Q.children):b==="ElOption"?s.push((x=Q.props)==null?void 0:x.value):Vi(Q.children)&&h(Q.children)})}return a.length&&h((o=a[0])==null?void 0:o.children),V0(s,n)||(n=s,r&&(r.states.optionValues=s)),a}}});const bU=Qn({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:U3,effect:{type:Er(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:Er(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:E2.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:j3,default:Jf},fitInputWidth:Boolean,suffixIcon:{type:j3,default:F3},tagType:{...Jx.type,default:"info"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,suffixTransition:{type:Boolean,default:!0},placement:{type:Er(String),values:Qc,default:"bottom-start"},ariaLabel:{type:String,default:void 0}}),db="ElSelect",LU=T.defineComponent({name:db,componentName:db,components:{ElInput:vc,ElSelectMenu:gU,ElOption:VT,ElOptions:xU,ElTag:az,ElScrollbar:JN,ElTooltip:bT,ElIcon:yi},directives:{ClickOutside:Bx},props:bU,emits:[A1,dc,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const r=vU(e,t);return T.provide(Hc,T.reactive({props:e,states:r.states,optionsArray:r.optionsArray,handleOptionSelect:r.handleOptionSelect,onOptionCreate:r.onOptionCreate,onOptionDestroy:r.onOptionDestroy,selectRef:r.selectRef,setSelected:r.setSelected})),{...r}}}),wU=["id","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],EU=["textContent"];function MU(e,t,r,n,i,o){const a=T.resolveComponent("el-tag"),s=T.resolveComponent("el-tooltip"),h=T.resolveComponent("el-icon"),d=T.resolveComponent("el-option"),Q=T.resolveComponent("el-options"),p=T.resolveComponent("el-scrollbar"),g=T.resolveComponent("el-select-menu"),_=T.resolveDirective("click-outside");return T.withDirectives((T.openBlock(),T.createElementBlock("div",{ref:"selectRef",class:T.normalizeClass([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),onMouseenter:t[14]||(t[14]=x=>e.states.inputHovering=!0),onMouseleave:t[15]||(t[15]=x=>e.states.inputHovering=!1),onClick:t[16]||(t[16]=T.withModifiers((...x)=>e.toggleMenu&&e.toggleMenu(...x),["stop"]))},[T.createVNode(s,{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":["bottom-start","top-start","right","left"],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,onBeforeShow:e.handleMenuEnter,onHide:t[13]||(t[13]=x=>e.states.isBeforeHide=!1)},{default:T.withCtx(()=>{var x;return[T.createElementVNode("div",{ref:"wrapperRef",class:T.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)])},[e.$slots.prefix?(T.openBlock(),T.createElementBlock("div",{key:0,ref:"prefixRef",class:T.normalizeClass(e.nsSelect.e("prefix"))},[T.renderSlot(e.$slots,"prefix")],2)):T.createCommentVNode("v-if",!0),T.createElementVNode("div",{ref:"selectionRef",class:T.normalizeClass([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?T.renderSlot(e.$slots,"tag",{key:0},()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.showTagList,b=>(T.openBlock(),T.createElementBlock("div",{key:e.getValueKey(b),class:T.normalizeClass(e.nsSelect.e("selected-item"))},[T.createVNode(a,{closable:!e.selectDisabled&&!b.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:T.normalizeStyle(e.tagStyle),onClose:A=>e.deleteTag(A,b)},{default:T.withCtx(()=>[T.createElementVNode("span",{class:T.normalizeClass(e.nsSelect.e("tags-text"))},T.toDisplayString(b.currentLabel),3)]),_:2},1032,["closable","size","type","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(T.openBlock(),T.createBlock(s,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:T.withCtx(()=>[T.createElementVNode("div",{ref:"collapseItemRef",class:T.normalizeClass(e.nsSelect.e("selected-item"))},[T.createVNode(a,{closable:!1,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:T.normalizeStyle(e.collapseTagStyle)},{default:T.withCtx(()=>[T.createElementVNode("span",{class:T.normalizeClass(e.nsSelect.e("tags-text"))}," + "+T.toDisplayString(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","style"])],2)]),content:T.withCtx(()=>[T.createElementVNode("div",{ref:"tagMenuRef",class:T.normalizeClass(e.nsSelect.e("selection"))},[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.collapseTagList,b=>(T.openBlock(),T.createElementBlock("div",{key:e.getValueKey(b),class:T.normalizeClass(e.nsSelect.e("selected-item"))},[T.createVNode(a,{class:"in-tooltip",closable:!e.selectDisabled&&!b.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",onClose:A=>e.deleteTag(A,b)},{default:T.withCtx(()=>[T.createElementVNode("span",{class:T.normalizeClass(e.nsSelect.e("tags-text"))},T.toDisplayString(b.currentLabel),3)]),_:2},1032,["closable","size","type","onClose"])],2))),128))],2)]),_:1},8,["disabled","effect","teleported"])):T.createCommentVNode("v-if",!0)]):T.createCommentVNode("v-if",!0),e.selectDisabled?T.createCommentVNode("v-if",!0):(T.openBlock(),T.createElementBlock("div",{key:1,class:T.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[T.withDirectives(T.createElementVNode("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":t[0]||(t[0]=b=>e.states.inputValue=b),type:"text",class:T.normalizeClass([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:T.normalizeStyle(e.inputStyle),role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((x=e.hoverOption)==null?void 0:x.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onFocus:t[1]||(t[1]=(...b)=>e.handleFocus&&e.handleFocus(...b)),onBlur:t[2]||(t[2]=(...b)=>e.handleBlur&&e.handleBlur(...b)),onKeydown:[t[3]||(t[3]=T.withKeys(T.withModifiers(b=>e.navigateOptions("next"),["stop","prevent"]),["down"])),t[4]||(t[4]=T.withKeys(T.withModifiers(b=>e.navigateOptions("prev"),["stop","prevent"]),["up"])),t[5]||(t[5]=T.withKeys(T.withModifiers((...b)=>e.handleEsc&&e.handleEsc(...b),["stop","prevent"]),["esc"])),t[6]||(t[6]=T.withKeys(T.withModifiers((...b)=>e.selectOption&&e.selectOption(...b),["stop","prevent"]),["enter"])),t[7]||(t[7]=T.withKeys(T.withModifiers((...b)=>e.deletePrevTag&&e.deletePrevTag(...b),["stop"]),["delete"]))],onCompositionstart:t[8]||(t[8]=(...b)=>e.handleCompositionStart&&e.handleCompositionStart(...b)),onCompositionupdate:t[9]||(t[9]=(...b)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...b)),onCompositionend:t[10]||(t[10]=(...b)=>e.handleCompositionEnd&&e.handleCompositionEnd(...b)),onInput:t[11]||(t[11]=(...b)=>e.onInput&&e.onInput(...b)),onClick:t[12]||(t[12]=T.withModifiers((...b)=>e.toggleMenu&&e.toggleMenu(...b),["stop"]))},null,46,wU),[[T.vModelText,e.states.inputValue]]),e.filterable?(T.openBlock(),T.createElementBlock("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:T.normalizeClass(e.nsSelect.e("input-calculator")),textContent:T.toDisplayString(e.states.inputValue)},null,10,EU)):T.createCommentVNode("v-if",!0)],2)),e.shouldShowPlaceholder?(T.openBlock(),T.createElementBlock("div",{key:2,class:T.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[T.createElementVNode("span",null,T.toDisplayString(e.currentPlaceholder),1)],2)):T.createCommentVNode("v-if",!0)],2),T.createElementVNode("div",{ref:"suffixRef",class:T.normalizeClass(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(T.openBlock(),T.createBlock(h,{key:0,class:T.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0),e.showClose&&e.clearIcon?(T.openBlock(),T.createBlock(h,{key:1,class:T.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon")]),onClick:e.handleClearClick},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e.clearIcon)))]),_:1},8,["class","onClick"])):T.createCommentVNode("v-if",!0),e.validateState&&e.validateIcon?(T.openBlock(),T.createBlock(h,{key:2,class:T.normalizeClass([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e.validateIcon)))]),_:1},8,["class"])):T.createCommentVNode("v-if",!0)],2)],2)]}),content:T.withCtx(()=>[T.createVNode(g,{ref:"menuRef"},{default:T.withCtx(()=>[e.$slots.header?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(e.nsSelect.be("dropdown","header"))},[T.renderSlot(e.$slots,"header")],2)):T.createCommentVNode("v-if",!0),T.withDirectives(T.createVNode(p,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:T.normalizeClass([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:T.withCtx(()=>[e.showNewOption?(T.openBlock(),T.createBlock(d,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):T.createCommentVNode("v-if",!0),T.createVNode(Q,null,{default:T.withCtx(()=>[T.renderSlot(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[T.vShow,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(T.openBlock(),T.createElementBlock("div",{key:1,class:T.normalizeClass(e.nsSelect.be("dropdown","loading"))},[T.renderSlot(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(T.openBlock(),T.createElementBlock("div",{key:2,class:T.normalizeClass(e.nsSelect.be("dropdown","empty"))},[T.renderSlot(e.$slots,"empty",{},()=>[T.createElementVNode("span",null,T.toDisplayString(e.emptyText),1)])],2)):T.createCommentVNode("v-if",!0),e.$slots.footer?(T.openBlock(),T.createElementBlock("div",{key:3,class:T.normalizeClass(e.nsSelect.be("dropdown","footer"))},[T.renderSlot(e.$slots,"footer")],2)):T.createCommentVNode("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","effect","transition","persistent","onBeforeShow"])],34)),[[_,e.handleClickOutside,e.popperRef]])}var AU=Sr(LU,[["render",MU],["__file","select.vue"]]);const CU=T.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=Cr("select"),r=T.ref(null),n=T.getCurrentInstance(),i=T.ref([]);T.provide(hb,T.reactive({...T.toRefs(e)}));const o=T.computed(()=>i.value.some(h=>h.visible===!0)),a=h=>{const d=[];return Vi(h.children)&&h.children.forEach(Q=>{var p,g;Q.type&&Q.type.name==="ElOption"&&Q.component&&Q.component.proxy?d.push(Q.component.proxy):(p=Q.children)!=null&&p.length?d.push(...a(Q)):(g=Q.component)!=null&&g.subTree&&d.push(...a(Q.component.subTree))}),d},s=()=>{i.value=a(n.subTree)};return T.onMounted(()=>{s()}),gD(r,s,{attributes:!0,subtree:!0,childList:!0}),{groupRef:r,visible:o,ns:t}}});function SU(e,t,r,n,i,o){return T.withDirectives((T.openBlock(),T.createElementBlock("ul",{ref:"groupRef",class:T.normalizeClass(e.ns.be("group","wrap"))},[T.createElementVNode("li",{class:T.normalizeClass(e.ns.be("group","title"))},T.toDisplayString(e.label),3),T.createElementVNode("li",null,[T.createElementVNode("ul",{class:T.normalizeClass(e.ns.b("group"))},[T.renderSlot(e.$slots,"default")],2)])],2)),[[T.vShow,e.visible]])}var fb=Sr(CU,[["render",SU],["__file","option-group.vue"]]);const B6=Xi(AU,{Option:VT,OptionGroup:fb}),Oc=_o(VT);_o(fb);const HU=Qn({trigger:Z0.trigger,placement:OT.placement,disabled:Z0.disabled,visible:E2.visible,transition:E2.transition,popperOptions:OT.popperOptions,tabindex:OT.tabindex,content:E2.content,popperStyle:E2.popperStyle,popperClass:E2.popperClass,enterable:{...E2.enterable,default:!0},effect:{...E2.effect,default:"light"},teleported:E2.teleported,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),OU={"update:visible":e=>N3(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},VU="onUpdate:visible",DU=T.defineComponent({name:"ElPopover"}),PU=T.defineComponent({...DU,props:HU,emits:OU,setup(e,{expose:t,emit:r}){const n=e,i=T.computed(()=>n[VU]),o=Cr("popover"),a=T.ref(),s=T.computed(()=>{var A;return(A=T.unref(a))==null?void 0:A.popperRef}),h=T.computed(()=>[{width:w6(n.width)},n.popperStyle]),d=T.computed(()=>[o.b(),n.popperClass,{[o.m("plain")]:!!n.content}]),Q=T.computed(()=>n.transition===`${o.namespace.value}-fade-in-linear`),p=()=>{var A;(A=a.value)==null||A.hide()},g=()=>{r("before-enter")},_=()=>{r("before-leave")},x=()=>{r("after-enter")},b=()=>{r("update:visible",!1),r("after-leave")};return t({popperRef:s,hide:p}),(A,E)=>(T.openBlock(),T.createBlock(T.unref(bT),T.mergeProps({ref_key:"tooltipRef",ref:a},A.$attrs,{trigger:A.trigger,placement:A.placement,disabled:A.disabled,visible:A.visible,transition:A.transition,"popper-options":A.popperOptions,tabindex:A.tabindex,content:A.content,offset:A.offset,"show-after":A.showAfter,"hide-after":A.hideAfter,"auto-close":A.autoClose,"show-arrow":A.showArrow,"aria-label":A.title,effect:A.effect,enterable:A.enterable,"popper-class":T.unref(d),"popper-style":T.unref(h),teleported:A.teleported,persistent:A.persistent,"gpu-acceleration":T.unref(Q),"onUpdate:visible":T.unref(i),onBeforeShow:g,onBeforeHide:_,onShow:x,onHide:b}),{content:T.withCtx(()=>[A.title?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(T.unref(o).e("title")),role:"title"},T.toDisplayString(A.title),3)):T.createCommentVNode("v-if",!0),T.renderSlot(A.$slots,"default",{},()=>[T.createTextVNode(T.toDisplayString(A.content),1)])]),default:T.withCtx(()=>[A.$slots.reference?T.renderSlot(A.$slots,"reference",{key:0}):T.createCommentVNode("v-if",!0)]),_:3},16,["trigger","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","persistent","gpu-acceleration","onUpdate:visible"]))}});var IU=Sr(PU,[["__file","popover.vue"]]);const Tb=(e,t)=>{const r=t.arg||t.value,n=r==null?void 0:r.popperRef;n&&(n.triggerRef=e)};var kU={mounted(e,t){Tb(e,t)},updated(e,t){Tb(e,t)}};const Qb=JR(kU,"popover"),Vc=Xi(IU,{directive:Qb}),N6="$treeNodeId",pb=function(e,t){!t||t[N6]||Object.defineProperty(t,N6,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},DT=function(e,t){return e?t[e]:t[N6]},PT=(e,t,r)=>{const n=e.value.currentNode;r();const i=e.value.currentNode;n!==i&&t("current-change",i?i.data:null,i)},IT=e=>{let t=!0,r=!0,n=!0;for(let i=0,o=e.length;i<o;i++){const a=e[i];(a.checked!==!0||a.indeterminate)&&(t=!1,a.disabled||(n=!1)),(a.checked!==!1||a.indeterminate)&&(r=!1)}return{all:t,none:r,allWithoutDisable:n,half:!t&&!r}},Dc=function(e){if(e.childNodes.length===0||e.loading)return;const{all:t,none:r,half:n}=IT(e.childNodes);t?(e.checked=!0,e.indeterminate=!1):n?(e.checked=!1,e.indeterminate=!0):r&&(e.checked=!1,e.indeterminate=!1);const i=e.parent;!i||i.level===0||e.store.checkStrictly||Dc(i)},Pc=function(e,t){const r=e.store.props,n=e.data||{},i=r[t];if(typeof i=="function")return i(n,e);if(typeof i=="string")return n[i];if(typeof i>"u"){const o=n[t];return o===void 0?"":o}};let RU=0,kT=class Sf{constructor(t){this.id=RU++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const r in t)r4(t,r)&&(this[r]=t[r]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){const t=this.store;if(!t)throw new Error("[Node]store is required!");t.registerNode(this);const r=t.props;if(r&&typeof r.isLeaf<"u"){const o=Pc(this,"isLeaf");typeof o=="boolean"&&(this.isLeafByUser=o)}if(t.lazy!==!0&&this.data?(this.setData(this.data),t.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&t.lazy&&t.defaultExpandAll&&this.expand(),Array.isArray(this.data)||pb(this,this.data),!this.data)return;const n=t.defaultExpandedKeys,i=t.key;i&&n&&n.includes(this.key)&&this.expand(null,t.autoExpandParent),i&&t.currentNodeKey!==void 0&&this.key===t.currentNodeKey&&(t.currentNode=this,t.currentNode.isCurrent=!0),t.lazy&&t._initDefaultCheckedNode(this),this.updateLeafState(),this.parent&&(this.level===1||this.parent.expanded===!0)&&(this.canFocus=!0)}setData(t){Array.isArray(t)||pb(this,t),this.data=t,this.childNodes=[];let r;this.level===0&&Array.isArray(this.data)?r=this.data:r=Pc(this,"children")||[];for(let n=0,i=r.length;n<i;n++)this.insertChild({data:r[n]})}get label(){return Pc(this,"label")}get key(){const t=this.store.key;return this.data?this.data[t]:null}get disabled(){return Pc(this,"disabled")}get nextSibling(){const t=this.parent;if(t){const r=t.childNodes.indexOf(this);if(r>-1)return t.childNodes[r+1]}return null}get previousSibling(){const t=this.parent;if(t){const r=t.childNodes.indexOf(this);if(r>-1)return r>0?t.childNodes[r-1]:null}return null}contains(t,r=!0){return(this.childNodes||[]).some(n=>n===t||r&&n.contains(t))}remove(){const t=this.parent;t&&t.removeChild(this)}insertChild(t,r,n){if(!t)throw new Error("InsertChild error: child is required.");if(!(t instanceof Sf)){if(!n){const i=this.getChildren(!0);i.includes(t.data)||(typeof r>"u"||r<0?i.push(t.data):i.splice(r,0,t.data))}Object.assign(t,{parent:this,store:this.store}),t=T.reactive(new Sf(t)),t instanceof Sf&&t.initialize()}t.level=this.level+1,typeof r>"u"||r<0?this.childNodes.push(t):this.childNodes.splice(r,0,t),this.updateLeafState()}insertBefore(t,r){let n;r&&(n=this.childNodes.indexOf(r)),this.insertChild(t,n)}insertAfter(t,r){let n;r&&(n=this.childNodes.indexOf(r),n!==-1&&(n+=1)),this.insertChild(t,n)}removeChild(t){const r=this.getChildren()||[],n=r.indexOf(t.data);n>-1&&r.splice(n,1);const i=this.childNodes.indexOf(t);i>-1&&(this.store&&this.store.deregisterNode(t),t.parent=null,this.childNodes.splice(i,1)),this.updateLeafState()}removeChildByData(t){let r=null;for(let n=0;n<this.childNodes.length;n++)if(this.childNodes[n].data===t){r=this.childNodes[n];break}r&&this.removeChild(r)}expand(t,r){const n=()=>{if(r){let i=this.parent;for(;i.level>0;)i.expanded=!0,i=i.parent}this.expanded=!0,t&&t(),this.childNodes.forEach(i=>{i.canFocus=!0})};this.shouldLoadData()?this.loadData(i=>{Array.isArray(i)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||Dc(this),n())}):n()}doCreateChildren(t,r={}){t.forEach(n=>{this.insertChild(Object.assign({data:n},r),void 0,!0)})}collapse(){this.expanded=!1,this.childNodes.forEach(t=>{t.canFocus=!1})}shouldLoadData(){return this.store.lazy===!0&&this.store.load&&!this.loaded}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser<"u"){this.isLeaf=this.isLeafByUser;return}const t=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!t||t.length===0;return}this.isLeaf=!1}setChecked(t,r,n,i){if(this.indeterminate=t==="half",this.checked=t===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:a,allWithoutDisable:s}=IT(this.childNodes);!this.isLeaf&&!a&&s&&(this.checked=!1,t=!1);const h=()=>{if(r){const d=this.childNodes;for(let g=0,_=d.length;g<_;g++){const x=d[g];i=i||t!==!1;const b=x.disabled?x.checked:i;x.setChecked(b,r,!0,i)}const{half:Q,all:p}=IT(d);p||(this.checked=p,this.indeterminate=Q)}};if(this.shouldLoadData()){this.loadData(()=>{h(),Dc(this)},{checked:t!==!1});return}else h()}const o=this.parent;!o||o.level===0||n||Dc(o)}getChildren(t=!1){if(this.level===0)return this.data;const r=this.data;if(!r)return null;const n=this.store.props;let i="children";return n&&(i=n.children||"children"),r[i]===void 0&&(r[i]=null),t&&!r[i]&&(r[i]=[]),r[i]}updateChildren(){const t=this.getChildren()||[],r=this.childNodes.map(o=>o.data),n={},i=[];t.forEach((o,a)=>{const s=o[N6];!!s&&r.findIndex(d=>d[N6]===s)>=0?n[s]={index:a,data:o}:i.push({index:a,data:o})}),this.store.lazy||r.forEach(o=>{n[o[N6]]||this.removeChildByData(o)}),i.forEach(({index:o,data:a})=>{this.insertChild({data:a},o)}),this.updateLeafState()}loadData(t,r={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(r).length)){this.loading=!0;const n=i=>{this.childNodes=[],this.doCreateChildren(i,r),this.loaded=!0,this.loading=!1,this.updateLeafState(),t&&t.call(this,i)};this.store.load(this,n)}else t&&t.call(this)}};class BU{constructor(t){this.currentNode=null,this.currentNodeKey=null;for(const r in t)r4(t,r)&&(this[r]=t[r]);this.nodesMap={}}initialize(){if(this.root=new kT({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const t=this.load;t(this.root,r=>{this.root.doCreateChildren(r),this._initDefaultCheckedNodes()})}else this._initDefaultCheckedNodes()}filter(t){const r=this.filterNodeMethod,n=this.lazy,i=function(o){const a=o.root?o.root.childNodes:o.childNodes;if(a.forEach(s=>{s.visible=r.call(s,t,s.data,s),i(s)}),!o.visible&&a.length){let s=!0;s=!a.some(h=>h.visible),o.root?o.root.visible=s===!1:o.visible=s===!1}t&&o.visible&&!o.isLeaf&&(!n||o.loaded)&&o.expand()};i(this)}setData(t){t!==this.root.data?(this.root.setData(t),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(t){if(t instanceof kT)return t;const r=gi(t)?DT(this.key,t):t;return this.nodesMap[r]||null}insertBefore(t,r){const n=this.getNode(r);n.parent.insertBefore({data:t},n)}insertAfter(t,r){const n=this.getNode(r);n.parent.insertAfter({data:t},n)}remove(t){const r=this.getNode(t);r&&r.parent&&(r===this.currentNode&&(this.currentNode=null),r.parent.removeChild(r))}append(t,r){const n=r?this.getNode(r):this.root;n&&n.insertChild({data:t})}_initDefaultCheckedNodes(){const t=this.defaultCheckedKeys||[],r=this.nodesMap;t.forEach(n=>{const i=r[n];i&&i.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(t){(this.defaultCheckedKeys||[]).includes(t.key)&&t.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(t){t!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=t,this._initDefaultCheckedNodes())}registerNode(t){const r=this.key;!t||!t.data||(r?t.key!==void 0&&(this.nodesMap[t.key]=t):this.nodesMap[t.id]=t)}deregisterNode(t){!this.key||!t||!t.data||(t.childNodes.forEach(n=>{this.deregisterNode(n)}),delete this.nodesMap[t.key])}getCheckedNodes(t=!1,r=!1){const n=[],i=function(o){(o.root?o.root.childNodes:o.childNodes).forEach(s=>{(s.checked||r&&s.indeterminate)&&(!t||t&&s.isLeaf)&&n.push(s.data),i(s)})};return i(this),n}getCheckedKeys(t=!1){return this.getCheckedNodes(t).map(r=>(r||{})[this.key])}getHalfCheckedNodes(){const t=[],r=function(n){(n.root?n.root.childNodes:n.childNodes).forEach(o=>{o.indeterminate&&t.push(o.data),r(o)})};return r(this),t}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(t=>(t||{})[this.key])}_getAllNodes(){const t=[],r=this.nodesMap;for(const n in r)r4(r,n)&&t.push(r[n]);return t}updateChildren(t,r){const n=this.nodesMap[t];if(!n)return;const i=n.childNodes;for(let o=i.length-1;o>=0;o--){const a=i[o];this.remove(a.data)}for(let o=0,a=r.length;o<a;o++){const s=r[o];this.append(s,n.data)}}_setCheckedKeys(t,r=!1,n){const i=this._getAllNodes().sort((h,d)=>h.level-d.level),o=Object.create(null),a=Object.keys(n);i.forEach(h=>h.setChecked(!1,!1));const s=h=>{h.childNodes.forEach(d=>{var Q;o[d.data[t]]=!0,(Q=d.childNodes)!=null&&Q.length&&s(d)})};for(let h=0,d=i.length;h<d;h++){const Q=i[h],p=Q.data[t].toString();if(!a.includes(p)){Q.checked&&!o[p]&&Q.setChecked(!1,!1);continue}if(Q.childNodes.length&&s(Q),Q.isLeaf||this.checkStrictly){Q.setChecked(!0,!1);continue}if(Q.setChecked(!0,!0),r){Q.setChecked(!1,!1);const _=function(x){x.childNodes.forEach(A=>{A.isLeaf||A.setChecked(!1,!1),_(A)})};_(Q)}}}setCheckedNodes(t,r=!1){const n=this.key,i={};t.forEach(o=>{i[(o||{})[n]]=!0}),this._setCheckedKeys(n,r,i)}setCheckedKeys(t,r=!1){this.defaultCheckedKeys=t;const n=this.key,i={};t.forEach(o=>{i[o]=!0}),this._setCheckedKeys(n,r,i)}setDefaultExpandedKeys(t){t=t||[],this.defaultExpandedKeys=t,t.forEach(r=>{const n=this.getNode(r);n&&n.expand(null,this.autoExpandParent)})}setChecked(t,r,n){const i=this.getNode(t);i&&i.setChecked(!!r,n)}getCurrentNode(){return this.currentNode}setCurrentNode(t){const r=this.currentNode;r&&(r.isCurrent=!1),this.currentNode=t,this.currentNode.isCurrent=!0}setUserCurrentNode(t,r=!0){const n=t[this.key],i=this.nodesMap[n];this.setCurrentNode(i),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(t,r=!0){if(t==null){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const n=this.getNode(t);n&&(this.setCurrentNode(n),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}const NU=T.defineComponent({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=Cr("tree"),r=T.inject("NodeInstance"),n=T.inject("RootTree");return()=>{const i=e.node,{data:o,store:a}=i;return e.renderContent?e.renderContent(T.h,{_self:r,node:i,data:o,store:a}):T.renderSlot(n.ctx.slots,"default",{node:i,data:o},()=>[T.h("span",{class:t.be("node","label")},[i.label])])}}});var FU=Sr(NU,[["__file","tree-node-content.vue"]]);function mb(e){const t=T.inject("TreeNodeMap",null),r={treeNodeExpand:n=>{e.node!==n&&e.node.collapse()},children:[]};return t&&t.children.push(r),T.provide("TreeNodeMap",r),{broadcastExpanded:n=>{if(e.accordion)for(const i of r.children)i.treeNodeExpand(n)}}}const gb=Symbol("dragEvents");function jU({props:e,ctx:t,el$:r,dropIndicator$:n,store:i}){const o=Cr("tree"),a=T.ref({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null}),s=({event:Q,treeNode:p})=>{if(typeof e.allowDrag=="function"&&!e.allowDrag(p.node))return Q.preventDefault(),!1;Q.dataTransfer.effectAllowed="move";try{Q.dataTransfer.setData("text/plain","")}catch{}a.value.draggingNode=p,t.emit("node-drag-start",p.node,Q)},h=({event:Q,treeNode:p})=>{const g=p,_=a.value.dropNode;_&&_.node.id!==g.node.id&&s4(_.$el,o.is("drop-inner"));const x=a.value.draggingNode;if(!x||!g)return;let b=!0,A=!0,E=!0,O=!0;typeof e.allowDrop=="function"&&(b=e.allowDrop(x.node,g.node,"prev"),O=A=e.allowDrop(x.node,g.node,"inner"),E=e.allowDrop(x.node,g.node,"next")),Q.dataTransfer.dropEffect=A||b||E?"move":"none",(b||A||E)&&(_==null?void 0:_.node.id)!==g.node.id&&(_&&t.emit("node-drag-leave",x.node,_.node,Q),t.emit("node-drag-enter",x.node,g.node,Q)),b||A||E?a.value.dropNode=g:a.value.dropNode=null,g.node.nextSibling===x.node&&(E=!1),g.node.previousSibling===x.node&&(b=!1),g.node.contains(x.node,!1)&&(A=!1),(x.node===g.node||x.node.contains(g.node))&&(b=!1,A=!1,E=!1);const V=g.$el.querySelector(`.${o.be("node","content")}`).getBoundingClientRect(),k=r.value.getBoundingClientRect();let j;const $=b?A?.25:E?.45:1:-1,U=E?A?.75:b?.55:0:1;let J=-9999;const tt=Q.clientY-V.top;tt<V.height*$?j="before":tt>V.height*U?j="after":A?j="inner":j="none";const rt=g.$el.querySelector(`.${o.be("node","expand-icon")}`).getBoundingClientRect(),st=n.value;j==="before"?J=rt.top-k.top:j==="after"&&(J=rt.bottom-k.top),st.style.top=`${J}px`,st.style.left=`${rt.right-k.left}px`,j==="inner"?Yf(g.$el,o.is("drop-inner")):s4(g.$el,o.is("drop-inner")),a.value.showDropIndicator=j==="before"||j==="after",a.value.allowDrop=a.value.showDropIndicator||O,a.value.dropType=j,t.emit("node-drag-over",x.node,g.node,Q)},d=Q=>{const{draggingNode:p,dropType:g,dropNode:_}=a.value;if(Q.preventDefault(),Q.dataTransfer.dropEffect="move",p&&_){const x={data:p.node.data};g!=="none"&&p.node.remove(),g==="before"?_.node.parent.insertBefore(x,_.node):g==="after"?_.node.parent.insertAfter(x,_.node):g==="inner"&&_.node.insertChild(x),g!=="none"&&i.value.registerNode(x),s4(_.$el,o.is("drop-inner")),t.emit("node-drag-end",p.node,_.node,g,Q),g!=="none"&&t.emit("node-drop",p.node,_.node,g,Q)}p&&!_&&t.emit("node-drag-end",p.node,null,g,Q),a.value.showDropIndicator=!1,a.value.draggingNode=null,a.value.dropNode=null,a.value.allowDrop=!0};return T.provide(gb,{treeNodeDragStart:s,treeNodeDragOver:h,treeNodeDragEnd:d}),{dragState:a}}const zU=T.defineComponent({name:"ElTreeNode",components:{ElCollapseTransition:mz,ElCheckbox:Ac,NodeContent:FU,ElIcon:yi,Loading:tT},props:{node:{type:kT,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(e,t){const r=Cr("tree"),{broadcastExpanded:n}=mb(e),i=T.inject("RootTree"),o=T.ref(!1),a=T.ref(!1),s=T.ref(null),h=T.ref(null),d=T.ref(null),Q=T.inject(gb),p=T.getCurrentInstance();T.provide("NodeInstance",p),i||K1("Tree","Can not find node's tree."),e.node.expanded&&(o.value=!0,a.value=!0);const g=i.props.props.children||"children";T.watch(()=>{const tt=e.node.data[g];return tt&&[...tt]},()=>{e.node.updateChildren()}),T.watch(()=>e.node.indeterminate,tt=>{b(e.node.checked,tt)}),T.watch(()=>e.node.checked,tt=>{b(tt,e.node.indeterminate)}),T.watch(()=>e.node.expanded,tt=>{T.nextTick(()=>o.value=tt),tt&&(a.value=!0)});const _=tt=>DT(i.props.nodeKey,tt.data),x=tt=>{const rt=e.props.class;if(!rt)return{};let st;if(Y2(rt)){const{data:pt}=tt;st=rt(pt,tt)}else st=rt;return W1(st)?{[st]:!0}:st},b=(tt,rt)=>{(s.value!==tt||h.value!==rt)&&i.ctx.emit("check-change",e.node.data,tt,rt),s.value=tt,h.value=rt},A=tt=>{PT(i.store,i.ctx.emit,()=>i.store.value.setCurrentNode(e.node)),i.currentNode.value=e.node,i.props.expandOnClickNode&&O(),i.props.checkOnClickNode&&!e.node.disabled&&V(null,{target:{checked:!e.node.checked}}),i.ctx.emit("node-click",e.node.data,e.node,p,tt)},E=tt=>{i.instance.vnode.props.onNodeContextmenu&&(tt.stopPropagation(),tt.preventDefault()),i.ctx.emit("node-contextmenu",tt,e.node.data,e.node,p)},O=()=>{e.node.isLeaf||(o.value?(i.ctx.emit("node-collapse",e.node.data,e.node,p),e.node.collapse()):(e.node.expand(),t.emit("node-expand",e.node.data,e.node,p)))},V=(tt,rt)=>{e.node.setChecked(rt.target.checked,!i.props.checkStrictly),T.nextTick(()=>{const st=i.store.value;i.ctx.emit("check",e.node.data,{checkedNodes:st.getCheckedNodes(),checkedKeys:st.getCheckedKeys(),halfCheckedNodes:st.getHalfCheckedNodes(),halfCheckedKeys:st.getHalfCheckedKeys()})})};return{ns:r,node$:d,tree:i,expanded:o,childNodeRendered:a,oldChecked:s,oldIndeterminate:h,getNodeKey:_,getNodeClass:x,handleSelectChange:b,handleClick:A,handleContextMenu:E,handleExpandIconClick:O,handleCheckChange:V,handleChildNodeExpand:(tt,rt,st)=>{n(rt),i.ctx.emit("node-expand",tt,rt,st)},handleDragStart:tt=>{i.props.draggable&&Q.treeNodeDragStart({event:tt,treeNode:e})},handleDragOver:tt=>{tt.preventDefault(),i.props.draggable&&Q.treeNodeDragOver({event:tt,treeNode:{$el:d.value,node:e.node}})},handleDrop:tt=>{tt.preventDefault()},handleDragEnd:tt=>{i.props.draggable&&Q.treeNodeDragEnd(tt)},CaretRight:kR}}}),UU=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],$U=["aria-expanded"];function GU(e,t,r,n,i,o){const a=T.resolveComponent("el-icon"),s=T.resolveComponent("el-checkbox"),h=T.resolveComponent("loading"),d=T.resolveComponent("node-content"),Q=T.resolveComponent("el-tree-node"),p=T.resolveComponent("el-collapse-transition");return T.withDirectives((T.openBlock(),T.createElementBlock("div",{ref:"node$",class:T.normalizeClass([e.ns.b("node"),e.ns.is("expanded",e.expanded),e.ns.is("current",e.node.isCurrent),e.ns.is("hidden",!e.node.visible),e.ns.is("focusable",!e.node.disabled),e.ns.is("checked",!e.node.disabled&&e.node.checked),e.getNodeClass(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.node.disabled,"aria-checked":e.node.checked,draggable:e.tree.props.draggable,"data-key":e.getNodeKey(e.node),onClick:t[1]||(t[1]=T.withModifiers((...g)=>e.handleClick&&e.handleClick(...g),["stop"])),onContextmenu:t[2]||(t[2]=(...g)=>e.handleContextMenu&&e.handleContextMenu(...g)),onDragstart:t[3]||(t[3]=T.withModifiers((...g)=>e.handleDragStart&&e.handleDragStart(...g),["stop"])),onDragover:t[4]||(t[4]=T.withModifiers((...g)=>e.handleDragOver&&e.handleDragOver(...g),["stop"])),onDragend:t[5]||(t[5]=T.withModifiers((...g)=>e.handleDragEnd&&e.handleDragEnd(...g),["stop"])),onDrop:t[6]||(t[6]=T.withModifiers((...g)=>e.handleDrop&&e.handleDrop(...g),["stop"]))},[T.createElementVNode("div",{class:T.normalizeClass(e.ns.be("node","content")),style:T.normalizeStyle({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(T.openBlock(),T.createBlock(a,{key:0,class:T.normalizeClass([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:T.withModifiers(e.handleExpandIconClick,["stop"])},{default:T.withCtx(()=>[(T.openBlock(),T.createBlock(T.resolveDynamicComponent(e.tree.props.icon||e.CaretRight)))]),_:1},8,["class","onClick"])):T.createCommentVNode("v-if",!0),e.showCheckbox?(T.openBlock(),T.createBlock(s,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:t[0]||(t[0]=T.withModifiers(()=>{},["stop"])),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):T.createCommentVNode("v-if",!0),e.node.loading?(T.openBlock(),T.createBlock(a,{key:2,class:T.normalizeClass([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:T.withCtx(()=>[T.createVNode(h)]),_:1},8,["class"])):T.createCommentVNode("v-if",!0),T.createVNode(d,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),T.createVNode(p,null,{default:T.withCtx(()=>[!e.renderAfterExpand||e.childNodeRendered?T.withDirectives((T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded},[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.node.childNodes,g=>(T.openBlock(),T.createBlock(Q,{key:e.getNodeKey(g),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:g,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,$U)),[[T.vShow,e.expanded]]):T.createCommentVNode("v-if",!0)]),_:1})],42,UU)),[[T.vShow,e.node.visible]])}var ZU=Sr(zU,[["render",GU],["__file","tree-node.vue"]]);function qU({el$:e},t){const r=Cr("tree"),n=T.shallowRef([]),i=T.shallowRef([]);T.onMounted(()=>{a()}),T.onUpdated(()=>{n.value=Array.from(e.value.querySelectorAll("[role=treeitem]")),i.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"))}),T.watch(i,s=>{s.forEach(h=>{h.setAttribute("tabindex","-1")})}),k3(e,"keydown",s=>{const h=s.target;if(!h.className.includes(r.b("node")))return;const d=s.code;n.value=Array.from(e.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`));const Q=n.value.indexOf(h);let p;if([Ki.up,Ki.down].includes(d)){if(s.preventDefault(),d===Ki.up){p=Q===-1?0:Q!==0?Q-1:n.value.length-1;const _=p;for(;!t.value.getNode(n.value[p].dataset.key).canFocus;){if(p--,p===_){p=-1;break}p<0&&(p=n.value.length-1)}}else{p=Q===-1?0:Q<n.value.length-1?Q+1:0;const _=p;for(;!t.value.getNode(n.value[p].dataset.key).canFocus;){if(p++,p===_){p=-1;break}p>=n.value.length&&(p=0)}}p!==-1&&n.value[p].focus()}[Ki.left,Ki.right].includes(d)&&(s.preventDefault(),h.click());const g=h.querySelector('[type="checkbox"]');[Ki.enter,Ki.space].includes(d)&&g&&(s.preventDefault(),g.click())});const a=()=>{var s;n.value=Array.from(e.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`)),i.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"));const h=e.value.querySelectorAll(`.${r.is("checked")}[role=treeitem]`);if(h.length){h[0].setAttribute("tabindex","0");return}(s=n.value[0])==null||s.setAttribute("tabindex","0")}}const WU=T.defineComponent({name:"ElTree",components:{ElTreeNode:ZU},props:{data:{type:Array,default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:Function,showCheckbox:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:Function,allowDrop:Function,props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:j3}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(e,t){const{t:r}=fc(),n=Cr("tree"),i=T.ref(new BU({key:e.nodeKey,data:e.data,lazy:e.lazy,props:e.props,load:e.load,currentNodeKey:e.currentNodeKey,checkStrictly:e.checkStrictly,checkDescendants:e.checkDescendants,defaultCheckedKeys:e.defaultCheckedKeys,defaultExpandedKeys:e.defaultExpandedKeys,autoExpandParent:e.autoExpandParent,defaultExpandAll:e.defaultExpandAll,filterNodeMethod:e.filterNodeMethod}));i.value.initialize();const o=T.ref(i.value.root),a=T.ref(null),s=T.ref(null),h=T.ref(null),{broadcastExpanded:d}=mb(e),{dragState:Q}=jU({props:e,ctx:t,el$:s,dropIndicator$:h,store:i});qU({el$:s},i);const p=T.computed(()=>{const{childNodes:Ft}=o.value;return!Ft||Ft.length===0||Ft.every(({visible:he})=>!he)});T.watch(()=>e.currentNodeKey,Ft=>{i.value.setCurrentNodeKey(Ft)}),T.watch(()=>e.defaultCheckedKeys,Ft=>{i.value.setDefaultCheckedKey(Ft)}),T.watch(()=>e.defaultExpandedKeys,Ft=>{i.value.setDefaultExpandedKeys(Ft)}),T.watch(()=>e.data,Ft=>{i.value.setData(Ft)},{deep:!0}),T.watch(()=>e.checkStrictly,Ft=>{i.value.checkStrictly=Ft});const g=Ft=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");i.value.filter(Ft)},_=Ft=>DT(e.nodeKey,Ft.data),x=Ft=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const he=i.value.getNode(Ft);if(!he)return[];const cr=[he.data];let qt=he.parent;for(;qt&&qt!==o.value;)cr.push(qt.data),qt=qt.parent;return cr.reverse()},b=(Ft,he)=>i.value.getCheckedNodes(Ft,he),A=Ft=>i.value.getCheckedKeys(Ft),E=()=>{const Ft=i.value.getCurrentNode();return Ft?Ft.data:null},O=()=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const Ft=E();return Ft?Ft[e.nodeKey]:null},V=(Ft,he)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");i.value.setCheckedNodes(Ft,he)},k=(Ft,he)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");i.value.setCheckedKeys(Ft,he)},j=(Ft,he,cr)=>{i.value.setChecked(Ft,he,cr)},$=()=>i.value.getHalfCheckedNodes(),U=()=>i.value.getHalfCheckedKeys(),J=(Ft,he=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");PT(i,t.emit,()=>i.value.setUserCurrentNode(Ft,he))},tt=(Ft,he=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");PT(i,t.emit,()=>i.value.setCurrentNodeKey(Ft,he))},rt=Ft=>i.value.getNode(Ft),st=Ft=>{i.value.remove(Ft)},pt=(Ft,he)=>{i.value.append(Ft,he)},St=(Ft,he)=>{i.value.insertBefore(Ft,he)},$t=(Ft,he)=>{i.value.insertAfter(Ft,he)},ie=(Ft,he,cr)=>{d(he),t.emit("node-expand",Ft,he,cr)},me=(Ft,he)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");i.value.updateChildren(Ft,he)};return T.provide("RootTree",{ctx:t,props:e,store:i,root:o,currentNode:a,instance:T.getCurrentInstance()}),T.provide(G0,void 0),{ns:n,store:i,root:o,currentNode:a,dragState:Q,el$:s,dropIndicator$:h,isEmpty:p,filter:g,getNodeKey:_,getNodePath:x,getCheckedNodes:b,getCheckedKeys:A,getCurrentNode:E,getCurrentKey:O,setCheckedNodes:V,setCheckedKeys:k,setChecked:j,getHalfCheckedNodes:$,getHalfCheckedKeys:U,setCurrentNode:J,setCurrentKey:tt,t:r,getNode:rt,remove:st,append:pt,insertBefore:St,insertAfter:$t,handleNodeExpand:ie,updateKeyChildren:me}}});function XU(e,t,r,n,i,o){const a=T.resolveComponent("el-tree-node");return T.openBlock(),T.createElementBlock("div",{ref:"el$",class:T.normalizeClass([e.ns.b(),e.ns.is("dragging",!!e.dragState.draggingNode),e.ns.is("drop-not-allow",!e.dragState.allowDrop),e.ns.is("drop-inner",e.dragState.dropType==="inner"),{[e.ns.m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.root.childNodes,s=>(T.openBlock(),T.createBlock(a,{key:e.getNodeKey(s),node:s,props:e.props,accordion:e.accordion,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,"render-content":e.renderContent,onNodeExpand:e.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),e.isEmpty?(T.openBlock(),T.createElementBlock("div",{key:0,class:T.normalizeClass(e.ns.e("empty-block"))},[T.renderSlot(e.$slots,"empty",{},()=>{var s;return[T.createElementVNode("span",{class:T.normalizeClass(e.ns.e("empty-text"))},T.toDisplayString((s=e.emptyText)!=null?s:e.t("el.tree.emptyText")),3)]})],2)):T.createCommentVNode("v-if",!0),T.withDirectives(T.createElementVNode("div",{ref:"dropIndicator$",class:T.normalizeClass(e.ns.e("drop-indicator"))},null,2),[[T.vShow,e.dragState.showDropIndicator]])],2)}var Ic=Sr(WU,[["render",XU],["__file","tree.vue"]]);Ic.install=e=>{e.component(Ic.name,Ic)};const yb=Ic;function KU(e){let t;const r=T.ref(!1),n=T.reactive({...e,originalPosition:"",originalOverflow:"",visible:!1});function i(g){n.text=g}function o(){const g=n.parent,_=p.ns;if(!g.vLoadingAddClassList){let x=g.getAttribute("loading-number");x=Number.parseInt(x)-1,x?g.setAttribute("loading-number",x.toString()):(s4(g,_.bm("parent","relative")),g.removeAttribute("loading-number")),s4(g,_.bm("parent","hidden"))}a(),Q.unmount()}function a(){var g,_;(_=(g=p.$el)==null?void 0:g.parentNode)==null||_.removeChild(p.$el)}function s(){var g;e.beforeClose&&!e.beforeClose()||(r.value=!0,clearTimeout(t),t=window.setTimeout(h,400),n.visible=!1,(g=e.closed)==null||g.call(e))}function h(){if(!r.value)return;const g=n.parent;r.value=!1,g.vLoadingAddClassList=void 0,o()}const d=T.defineComponent({name:"ElLoading",setup(g,{expose:_}){const{ns:x,zIndex:b}=LN("loading");return _({ns:x,zIndex:b}),()=>{const A=n.spinner||n.svg,E=T.h("svg",{class:"circular",viewBox:n.svgViewBox?n.svgViewBox:"0 0 50 50",...A?{innerHTML:A}:{}},[T.h("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),O=n.text?T.h("p",{class:x.b("text")},[n.text]):void 0;return T.h(T.Transition,{name:x.b("fade"),onAfterLeave:h},{default:T.withCtx(()=>[T.withDirectives(T.createVNode("div",{style:{backgroundColor:n.background||""},class:[x.b("mask"),n.customClass,n.fullscreen?"is-fullscreen":""]},[T.h("div",{class:x.b("spinner")},[E,O])]),[[T.vShow,n.visible]])])})}}}),Q=T.createApp(d),p=Q.mount(document.createElement("div"));return{...T.toRefs(n),setText:i,removeElLoadingChild:a,close:s,handleAfterLeave:h,vm:p,get $el(){return p.$el}}}let kc;const RT=function(e={}){if(!q1)return;const t=YU(e);if(t.fullscreen&&kc)return kc;const r=KU({...t,closed:()=>{var i;(i=t.closed)==null||i.call(t),t.fullscreen&&(kc=void 0)}});JU(t,t.parent,r),_b(t,t.parent,r),t.parent.vLoadingAddClassList=()=>_b(t,t.parent,r);let n=t.parent.getAttribute("loading-number");return n?n=`${Number.parseInt(n)+1}`:n="1",t.parent.setAttribute("loading-number",n),t.parent.appendChild(r.$el),T.nextTick(()=>r.visible.value=t.visible),t.fullscreen&&(kc=r),r},YU=e=>{var t,r,n,i;let o;return W1(e.target)?o=(t=document.querySelector(e.target))!=null?t:document.body:o=e.target||document.body,{parent:o===document.body||e.body?document.body:o,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:o===document.body&&((r=e.fullscreen)!=null?r:!0),lock:(n=e.lock)!=null?n:!1,customClass:e.customClass||"",visible:(i=e.visible)!=null?i:!0,target:o}},JU=async(e,t,r)=>{const{nextZIndex:n}=r.vm.zIndex||r.vm._.exposed.zIndex,i={};if(e.fullscreen)r.originalPosition.value=I0(document.body,"position"),r.originalOverflow.value=I0(document.body,"overflow"),i.zIndex=n();else if(e.parent===document.body){r.originalPosition.value=I0(document.body,"position"),await T.nextTick();for(const o of["top","left"]){const a=o==="top"?"scrollTop":"scrollLeft";i[o]=`${e.target.getBoundingClientRect()[o]+document.body[a]+document.documentElement[a]-Number.parseInt(I0(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])i[o]=`${e.target.getBoundingClientRect()[o]}px`}else r.originalPosition.value=I0(t,"position");for(const[o,a]of Object.entries(i))r.$el.style[o]=a},_b=(e,t,r)=>{const n=r.vm.ns||r.vm._.exposed.ns;["absolute","fixed","sticky"].includes(r.originalPosition.value)?s4(t,n.bm("parent","relative")):Yf(t,n.bm("parent","relative")),e.fullscreen&&e.lock?Yf(t,n.bm("parent","hidden")):s4(t,n.bm("parent","hidden"))},Rc=Symbol("ElLoading"),vb=(e,t)=>{var r,n,i,o;const a=t.instance,s=g=>gi(t.value)?t.value[g]:void 0,h=g=>{const _=W1(g)&&(a==null?void 0:a[g])||g;return _&&T.ref(_)},d=g=>h(s(g)||e.getAttribute(`element-loading-${SD(g)}`)),Q=(r=s("fullscreen"))!=null?r:t.modifiers.fullscreen,p={text:d("text"),svg:d("svg"),svgViewBox:d("svgViewBox"),spinner:d("spinner"),background:d("background"),customClass:d("customClass"),fullscreen:Q,target:(n=s("target"))!=null?n:Q?void 0:e,body:(i=s("body"))!=null?i:t.modifiers.body,lock:(o=s("lock"))!=null?o:t.modifiers.lock};e[Rc]={options:p,instance:RT(p)}},t$=(e,t)=>{for(const r of Object.keys(t))T.isRef(t[r])&&(t[r].value=e[r])},Bc={mounted(e,t){t.value&&vb(e,t)},updated(e,t){const r=e[Rc];t.oldValue!==t.value&&(t.value&&!t.oldValue?vb(e,t):t.value&&t.oldValue?gi(t.value)&&t$(t.value,r.options):r==null||r.instance.close())},unmounted(e){var t;(t=e[Rc])==null||t.instance.close(),e[Rc]=null}},e$={install(e){e.directive("loading",Bc),e.config.globalProperties.$loading=RT},directive:Bc,service:RT},Wa=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},r$={name:"ExternalResourceCard",components:{Button:na},props:{resources:{type:Array,default:()=>[]}},data:function(){return{pubmeds:[],pubmedIds:[],ElIconNotebook:T.shallowRef(ZR)}},methods:{capitalise:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},openUrl:function(e){window.open(e,"_blank")}}},n$={class:"resource-container"};function i$(e,t,r,n,i,o){const a=na;return T.openBlock(),T.createElementBlock("div",n$,[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.resources,s=>(T.openBlock(),T.createElementBlock("div",{key:s.id,class:"resource"},[s.id==="pubmed"?(T.openBlock(),T.createBlock(a,{key:0,class:"button",id:"open-pubmed-button",icon:e.ElIconNotebook,onClick:h=>o.openUrl(s.url)},{default:T.withCtx(()=>[T.createTextVNode(" Open publications in pubmed ")]),_:2},1032,["icon","onClick"])):T.createCommentVNode("",!0)]))),128))])}const xb=Wa(r$,[["render",i$],["__scopeId","data-v-5386b943"]]);function o$(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map(function(i){i(r)}),(n=e.get("*"))&&n.slice().map(function(i){i(t,r)})}}}const Nc=new o$,a$=e=>e.replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()),s$=function(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""},l$={name:"ProvenancePopup",components:{Button:na,Container:nU,Icon:yi,ExternalResourceCard:xb,ElIconArrowUp:uc,ElIconArrowDown:F3,ElIconWarning:Lv},props:{entry:{type:Object,default:()=>({destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0})}},data:function(){return{controller:void 0,activeSpecies:void 0,pubmedSearchUrl:"",loading:!1,showToolip:!1,showDetails:!1,originDescriptions:{motor:"is the location of the initial cell body of the circuit",sensory:"is the location of the initial cell body in the PNS circuit"},componentsWithDatasets:[],uberons:[{id:void 0,name:void 0}]}},computed:{resources:function(){let e=[];return this.entry&&this.entry.hyperlinks&&(e=this.entry.hyperlinks),e},originDescription:function(){return this.entry&&this.entry.title&&this.entry.title.toLowerCase().includes("motor")?this.originDescriptions.motor:this.originDescriptions.sensory},provSpeciesDescription:function(){let e="Observed in";return this.entry.provenanceTaxonomyLabel.forEach(t=>{e+=` ${t},`}),e=e.slice(0,-1),e+=" species",e}},methods:{titleCase:function(e){return a$(e)},capitalise:function(e){return s$(e)},openUrl:function(e){window.open(e,"_blank")},openAll:function(){Nc.emit("onActionClick",{type:"Facets",labels:this.entry.componentsWithDatasets.map(e=>e.name)})},openAxons:function(){Nc.emit("onActionClick",{type:"Facets",labels:this.entry.destinationsWithDatasets.map(e=>e.name)})},openDendrites:function(){Nc.emit("onActionClick",{type:"Facets",labels:this.entry.originsWithDatasets.map(e=>e.name)})},pubmedSearchUrlUpdate:function(e){this.pubmedSearchUrl=e}}},Y0=e=>(T.pushScopeId("data-v-a3d0eed3"),e=e(),T.popScopeId(),e),c$={key:0,class:"main"},u$={key:0,class:"block"},h$={class:"title"},d$={key:0,class:"subtitle"},f$={key:1,class:"block"},T$={class:"title"},Q$={class:"content-container scrollbar"},p$={key:0,class:"block"},m$=Y0(()=>T.createElementVNode("span",{class:"attribute-title"},"Origin",-1)),g$={style:{"word-break":"keep-all"}},y$=Y0(()=>T.createElementVNode("i",null,"Origin",-1)),_$=["origin-item-label"],v$={key:0,class:"seperator"},x$={key:1,class:"block"},b$=Y0(()=>T.createElementVNode("div",{class:"attribute-title"},"Components",-1)),L$=["component-item-label"],w$={key:0,class:"seperator"},E$={key:2,class:"block"},M$=Y0(()=>T.createElementVNode("span",{class:"attribute-title"},"Destination",-1)),A$=Y0(()=>T.createElementVNode("span",{style:{"word-break":"keep-all"}},[T.createElementVNode("i",null,"Destination"),T.createTextVNode(" is where the axons terminate ")],-1)),C$=["destination-item-label"],S$={key:0,class:"seperator"};function H$(e,t,r,n,i,o){const a=uc,s=yi,h=F3,d=Lv,Q=Vc,p=na,g=xb,_=Bc;return r.entry?T.withDirectives((T.openBlock(),T.createElementBlock("div",c$,[r.entry.title?(T.openBlock(),T.createElementBlock("div",u$,[T.createElementVNode("span",h$,T.toDisplayString(o.capitalise(r.entry.title)),1),r.entry.provenanceTaxonomyLabel&&r.entry.provenanceTaxonomyLabel.length>0?(T.openBlock(),T.createElementBlock("div",d$,T.toDisplayString(o.provSpeciesDescription),1)):T.createCommentVNode("",!0)])):(T.openBlock(),T.createElementBlock("div",f$,[T.createElementVNode("span",T$,T.toDisplayString(r.entry.featureId),1)])),T.withDirectives(T.createElementVNode("div",{class:"hide",id:"hide-path-info",onClick:t[0]||(t[0]=x=>e.showDetails=!1)},[T.createTextVNode(" Hide path information "),T.createVNode(s,null,{default:T.withCtx(()=>[T.createVNode(a)]),_:1})],512),[[T.vShow,e.showDetails]]),T.withDirectives(T.createElementVNode("div",{class:"hide",id:"show-path-info",onClick:t[1]||(t[1]=x=>e.showDetails=!0)},[T.createTextVNode(" Show path information "),T.createVNode(s,null,{default:T.withCtx(()=>[T.createVNode(h)]),_:1})],512),[[T.vShow,!e.showDetails]]),T.createVNode(T.Transition,{name:"slide-fade"},{default:T.withCtx(()=>[T.withDirectives(T.createElementVNode("div",Q$,[T.createTextVNode(T.toDisplayString(r.entry.paths)+" ",1),r.entry.origins&&r.entry.origins.length>0?(T.openBlock(),T.createElementBlock("div",p$,[T.createElementVNode("div",null,[m$,T.createVNode(Q,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:T.withCtx(()=>[T.createVNode(s,{class:"info"},{default:T.withCtx(()=>[T.createVNode(d)]),_:1})]),default:T.withCtx(()=>[T.createElementVNode("span",g$,[y$,T.createTextVNode(" "+T.toDisplayString(o.originDescription),1)])]),_:1})]),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.entry.origins,(x,b)=>(T.openBlock(),T.createElementBlock("div",{class:"attribute-content","origin-item-label":x,key:x},[T.createTextVNode(T.toDisplayString(o.capitalise(x))+" ",1),b!=r.entry.origins.length-1?(T.openBlock(),T.createElementBlock("div",v$)):T.createCommentVNode("",!0)],8,_$))),128)),T.withDirectives(T.createVNode(p,{class:"button",id:"open-dendrites-button",onClick:o.openDendrites},{default:T.withCtx(()=>[T.createTextVNode(" Explore origin data ")]),_:1},8,["onClick"]),[[T.vShow,r.entry.originsWithDatasets&&r.entry.originsWithDatasets.length>0]])])):T.createCommentVNode("",!0),r.entry.components&&r.entry.components.length>0?(T.openBlock(),T.createElementBlock("div",x$,[b$,(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.entry.components,(x,b)=>(T.openBlock(),T.createElementBlock("div",{class:"attribute-content","component-item-label":x,key:x},[T.createTextVNode(T.toDisplayString(o.capitalise(x))+" ",1),b!=r.entry.components.length-1?(T.openBlock(),T.createElementBlock("div",w$)):T.createCommentVNode("",!0)],8,L$))),128))])):T.createCommentVNode("",!0),r.entry.destinations&&r.entry.destinations.length>0?(T.openBlock(),T.createElementBlock("div",E$,[T.createElementVNode("div",null,[M$,T.createVNode(Q,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:T.withCtx(()=>[T.createVNode(s,{class:"info"},{default:T.withCtx(()=>[T.createVNode(d)]),_:1})]),default:T.withCtx(()=>[A$]),_:1})]),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.entry.destinations,(x,b)=>(T.openBlock(),T.createElementBlock("div",{class:"attribute-content","destination-item-label":x,key:x},[T.createTextVNode(T.toDisplayString(o.capitalise(x))+" ",1),b!=r.entry.destinations.length-1?(T.openBlock(),T.createElementBlock("div",S$)):T.createCommentVNode("",!0)],8,C$))),128)),T.withDirectives(T.createVNode(p,{class:"button",onClick:o.openAxons},{default:T.withCtx(()=>[T.createTextVNode(" Explore destination data ")]),_:1},8,["onClick"]),[[T.vShow,r.entry.destinationsWithDatasets&&r.entry.destinationsWithDatasets.length>0]])])):T.createCommentVNode("",!0),T.withDirectives(T.createVNode(p,{class:"button",onClick:o.openAll},{default:T.withCtx(()=>[T.createTextVNode(" Search for data on components ")]),_:1},8,["onClick"]),[[T.vShow,r.entry.componentsWithDatasets&&r.entry.componentsWithDatasets.length>0]]),T.createVNode(g,{resources:o.resources},null,8,["resources"])],512),[[T.vShow,e.showDetails]])]),_:1})])),[[_,e.loading]]):T.createCommentVNode("",!0)}const bb=Wa(l$,[["render",H$],["__scopeId","data-v-a3d0eed3"]]);/*! js-cookie v3.0.5 | MIT */function Fc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}var O$={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function BT(e,t){function r(i,o,a){if(!(typeof document>"u")){a=Fc({},t,a),typeof a.expires=="number"&&(a.expires=new Date(Date.now()+a.expires*864e5)),a.expires&&(a.expires=a.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var h in a)a[h]&&(s+="; "+h,a[h]!==!0&&(s+="="+a[h].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+s}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],a={},s=0;s<o.length;s++){var h=o[s].split("="),d=h.slice(1).join("=");try{var Q=decodeURIComponent(h[0]);if(a[Q]=e.read(d,Q),i===Q)break}catch{}}return i?a[i]:a}}return Object.create({set:r,get:n,remove:function(i,o){r(i,"",Fc({},o,{expires:-1}))},withAttributes:function(i){return BT(this.converter,Fc({},this.attributes,i))},withConverter:function(i){return BT(Fc({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var NT=BT(O$,{path:"/"}),ia=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},b1=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Xa,J0,Di,oa,Y3;const V$=1e4;class D${constructor(t){Xa.add(this),J0.set(this,void 0),Di.set(this,null),oa.set(this,null),t.slice(-1)==="/"?ia(this,J0,t.slice(0,-1),"f"):ia(this,J0,t,"f")}get currentUser(){return b1(this,oa,"f")}get currentError(){return b1(this,Di,"f")}async authenticate(t){ia(this,Di,null,"f"),ia(this,oa,null,"f");const r=await b1(this,Xa,"m",Y3).call(this,t,"authenticate");return"error"in r?(NT.remove("annotation-key"),Promise.resolve(b1(this,Di,"f"))):(NT.set("annotation-key",r.session,{secure:!0,expires:1}),ia(this,oa,r.data,"f"),Promise.resolve(b1(this,oa,"f")))}async unauthenticate(t){ia(this,Di,null,"f"),ia(this,oa,null,"f");const r=await b1(this,Xa,"m",Y3).call(this,t,"unauthenticate");return"success"in r?Promise.resolve(r):Promise.resolve(b1(this,Di,"f"))}async annotatedItemIds(t,r){const n=await b1(this,Xa,"m",Y3).call(this,t,"items/","GET",{resource:r});return"error"in n?Promise.resolve(b1(this,Di,"f")):Promise.resolve(n)}async drawnFeatures(t,r){const n=await b1(this,Xa,"m",Y3).call(this,t,"features/","GET",{resource:r});return"error"in n?Promise.resolve(b1(this,Di,"f")):Promise.resolve(n)}async itemAnnotations(t,r,n){const i=await b1(this,Xa,"m",Y3).call(this,t,"annotations/","GET",{resource:r,item:n});return"error"in i?Promise.resolve(b1(this,Di,"f")):Promise.resolve(i)}async annotation(t,r){const n=await b1(this,Xa,"m",Y3).call(this,t,"annotation/","GET",{annotation:r});return"error"in n?Promise.resolve(b1(this,Di,"f")):Promise.resolve(n)}async addAnnotation(t,r){if(b1(this,oa,"f")&&b1(this,oa,"f").canUpdate){const n=Object.assign({creator:b1(this,oa,"f"),created:new Date().toISOString()},r),i=await b1(this,Xa,"m",Y3).call(this,t,"annotation/","POST",{data:n});if(!("error"in i))return Promise.resolve(i);ia(this,Di,i,"f")}else ia(this,Di,{error:"user cannot add annotation"},"f");return Promise.resolve(b1(this,Di,"f"))}}J0=new WeakMap,Di=new WeakMap,oa=new WeakMap,Xa=new WeakSet,Y3=async function(t,r,n="GET",i={}){let o=!0;const a=new AbortController;setTimeout(()=>{o&&(console.log("Annotation server timeout..."),a.abort())},V$);const s={method:n,signal:a.signal};let h=`${b1(this,J0,"f")}/${r}`;const d=NT.get("annotation-key")||"";if(n==="GET"){const p=[];for(const[g,_]of Object.entries(i))p.push(`${g}=${encodeURIComponent(JSON.stringify(_))}`);p.push(`key=${encodeURIComponent(t)}`),p.push(`session=${encodeURIComponent(d)}`),h+="?"+p.join("&"),s.headers={Accept:"application/json; charset=utf-8","Cache-Control":"no-store"}}else if(n==="POST"){const p=Object.assign({key:t,session:d},i);s.body=JSON.stringify(p),s.headers={Accept:"application/json; charset=utf-8","Content-Type":"application/json; charset=utf-8","Cache-Control":"no-store"}}const Q=await fetch(h,s);return o=!1,Q.ok?Promise.resolve(await Q.json()):(ia(this,Di,{error:`${Q.status} ${Q.statusText}`},"f"),Promise.resolve(b1(this,Di,"f")))};const P$={name:"AnnotationTool",components:{Button:na,Col:K3,Input:vc,Main:ub,Row:qa,Select:B6,ElIconArrowUp:uc,ElIconArrowDown:F3,ElIconEdit:xv,ElIconClose:k0},props:{annotationEntry:{type:Object}},inject:["flatmapAPI","userApiKey"],data:function(){return{displayPair:{"Feature ID":"featureId",Tooltip:"label",Models:"models",Name:"name",Resource:"resourceId"},editing:!1,evidencePrefixes:["DOI:","PMID:"],evidencePrefix:"DOI:",evidence:[],authenticated:!1,newEvidence:"",comment:"",prevSubs:[],showSubmissions:!0,errorMessage:""}},computed:{isEditable:function(){return this.annotationEntry.resourceId&&this.annotationEntry.featureId}},methods:{evidenceEntered:function(e){e&&(this.evidence.push(this.evidencePrefix+e),this.newEvidence="")},formatTime:function(e){const t={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};return new Date(e).toLocaleDateString(void 0,t)},updatePrevSubmissions:function(){this.$annotator&&this.authenticated&&this.annotationEntry.resourceId&&this.annotationEntry.featureId&&this.$annotator.itemAnnotations(this.userApiKey,this.annotationEntry.resourceId,this.annotationEntry.featureId).then(e=>{this.prevSubs=e}).catch(e=>{console.log(e)})},submit:function(){if((this.evidence.length>0||this.comment)&&this.annotationEntry.resourceId&&this.annotationEntry.featureId){const e=[];this.evidence.forEach(r=>{if(r.includes("DOI:")){const n=r.replace("DOI:","https://doi.org/");e.push(new URL(n))}else if(r.includes("PMID:")){const n=r.replace("PMID:","https://pubmed.ncbi.nlm.nih.gov/");e.push(new URL(n))}});const t={resource:this.annotationEntry.resourceId,item:this.annotationEntry.featureId,evidence:e,comment:this.comment};this.$annotator.addAnnotation(this.userApiKey,t).then(()=>{this.errorMessage="",this.resetSubmission(),this.updatePrevSubmissions()}).catch(()=>{this.errorMessage="There is a problem with the submission, please try again later"})}},removeEvidence:function(e){this.evidence.splice(e,1)},resetSubmission:function(){this.editing=!1,this.evidence=[],this.newFeature="",this.comment=""}},watch:{annotationEntry:{handler:function(e,t){e!==t&&(this.resetSubmission(),this.updatePrevSubmissions())},immediate:!1,deep:!1}},mounted:function(){this.$annotator||(this.$annotator=new D$(`${this.flatmapAPI}annotator`)),console.log("🚀 ~ flatmapvuer userToken ~ state:",this.userApiKey),this.$annotator.authenticate(this.userApiKey).then(e=>{e.name&&e.email?(this.authenticated=!0,this.updatePrevSubmissions()):this.errorMessage=""})}},d4=e=>(T.pushScopeId("data-v-fba86ed3"),e=e(),T.popScopeId(),e),I$={class:"block"},k$=d4(()=>T.createElementVNode("span",{class:"title"},"Feature Annotations",-1)),R$=d4(()=>T.createElementVNode("strong",{class:"sub-title"},"Previous submissions:",-1)),B$=d4(()=>T.createElementVNode("strong",null,"Evidence: ",-1)),N$=["href"],F$=d4(()=>T.createElementVNode("strong",null,"Comment: ",-1)),j$=d4(()=>T.createElementVNode("strong",{class:"sub-title"},"Suggest changes:",-1)),z$=d4(()=>T.createElementVNode("strong",null,"Evidvence:",-1)),U$=d4(()=>T.createElementVNode("strong",null,"Comment:",-1)),$$={class:"sub-title"};function G$(e,t,r,n,i,o){const a=qa,s=uc,h=yi,d=F3,Q=xv,p=K3,g=k0,_=Oc,x=B6,b=vc,A=na,E=ub;return T.openBlock(),T.createBlock(E,{class:"main"},{default:T.withCtx(()=>[T.createElementVNode("div",I$,[T.createVNode(a,{class:"info-field"},{default:T.withCtx(()=>[k$]),_:1}),r.annotationEntry?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.displayPair,(O,V)=>T.withDirectives((T.openBlock(),T.createBlock(a,{class:"dialog-text",key:O},{default:T.withCtx(()=>[T.createElementVNode("strong",null,T.toDisplayString(V)+": ",1),T.createTextVNode(" "+T.toDisplayString(r.annotationEntry[O]),1)]),_:2},1024)),[[T.vShow,r.annotationEntry[O]]])),128)),e.prevSubs.length>0?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.withDirectives(T.createElementVNode("div",{class:"hide",onClick:t[0]||(t[0]=O=>e.showSubmissions=!1)},[T.createTextVNode(" Hide previous submissions "),T.createVNode(h,null,{default:T.withCtx(()=>[T.createVNode(s)]),_:1})],512),[[T.vShow,e.showSubmissions]]),T.withDirectives(T.createElementVNode("div",{class:"hide",onClick:t[1]||(t[1]=O=>e.showSubmissions=!0)},[T.createTextVNode(" Show previous "+T.toDisplayString(e.prevSubs.length)+" submission(s) ",1),T.createVNode(h,null,{default:T.withCtx(()=>[T.createVNode(d)]),_:1})],512),[[T.vShow,!e.showSubmissions]]),e.showSubmissions?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.createVNode(a,{class:"dialog-spacer"}),T.createVNode(a,{class:"dialog-text"},{default:T.withCtx(()=>[R$]),_:1}),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.prevSubs,(O,V)=>(T.openBlock(),T.createElementBlock("div",{class:"entry",key:V},[T.createVNode(a,{class:"dialog-text"},{default:T.withCtx(()=>[T.createElementVNode("strong",null,T.toDisplayString(o.formatTime(O.created)),1),T.createTextVNode(" "+T.toDisplayString(O.creator.name),1)]),_:2},1024),T.createVNode(a,{class:"dialog-text"},{default:T.withCtx(()=>[B$,(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(O.evidence,k=>(T.openBlock(),T.createBlock(a,{key:k,class:"dialog-text"},{default:T.withCtx(()=>[T.createElementVNode("a",{href:k,target:"_blank"},T.toDisplayString(k),9,N$)]),_:2},1024))),128))]),_:2},1024),T.createVNode(a,{class:"dialog-text"},{default:T.withCtx(()=>[F$,T.createTextVNode(" "+T.toDisplayString(O.comment),1)]),_:2},1024)]))),128))],64)):T.createCommentVNode("",!0)],64)):T.createCommentVNode("",!0),e.authenticated?(T.openBlock(),T.createElementBlock(T.Fragment,{key:1},[o.isEditable?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[T.createVNode(a,{class:"dialog-spacer"}),e.editing?(T.openBlock(),T.createElementBlock(T.Fragment,{key:1},[T.createVNode(a,{class:"dialog-text"},{default:T.withCtx(()=>[j$]),_:1}),T.createVNode(a,{class:"dialog-text"},{default:T.withCtx(()=>[z$]),_:1}),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.evidence,(O,V)=>(T.openBlock(),T.createBlock(a,{key:O},{default:T.withCtx(()=>[T.createVNode(p,{span:20},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(e.evidence[V]),1)]),_:2},1024),T.createVNode(p,{span:4},{default:T.withCtx(()=>[T.createVNode(h,{class:"standard-icon"},{default:T.withCtx(()=>[T.createVNode(g)]),_:1})]),_:1})]),_:2},1024))),128)),T.createVNode(a,null,{default:T.withCtx(()=>[T.createVNode(b,{size:"mini",placeholder:"Enter",modelValue:e.newEvidence,"onUpdate:modelValue":t[3]||(t[3]=O=>e.newEvidence=O),onChange:t[4]||(t[4]=O=>o.evidenceEntered(O))},{prepend:T.withCtx(()=>[T.createVNode(x,{teleported:!1,modelValue:e.evidencePrefix,"onUpdate:modelValue":t[2]||(t[2]=O=>e.evidencePrefix=O),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown"},{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.evidencePrefixes,O=>(T.openBlock(),T.createBlock(_,{key:O,label:O,value:O},{default:T.withCtx(()=>[T.createVNode(a,null,{default:T.withCtx(()=>[T.createVNode(p,{span:12},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(O),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1}),T.createVNode(a,null,{default:T.withCtx(()=>[U$]),_:1}),T.createVNode(a,{class:"dialog-text"},{default:T.withCtx(()=>[T.createVNode(b,{type:"textarea",autosize:{minRows:2,maxRows:4},placeholder:"Enter",modelValue:e.comment,"onUpdate:modelValue":t[5]||(t[5]=O=>e.comment=O)},null,8,["modelValue"])]),_:1}),T.createVNode(a,{class:"dialog-text"},{default:T.withCtx(()=>[T.createVNode(A,{class:"button",type:"primary",plain:"",onClick:o.submit},{default:T.withCtx(()=>[T.createTextVNode(" Submit ")]),_:1},8,["onClick"])]),_:1})],64)):(T.openBlock(),T.createBlock(a,{key:0},{default:T.withCtx(()=>[T.createVNode(h,{class:"standard-icon"},{default:T.withCtx(()=>[T.createVNode(Q)]),_:1})]),_:1})),e.errorMessage?(T.openBlock(),T.createBlock(a,{key:2,class:"dialog-text"},{default:T.withCtx(()=>[T.createElementVNode("strong",$$,T.toDisplayString(e.errorMessage),1)]),_:1})):T.createCommentVNode("",!0)],64)):T.createCommentVNode("",!0)],64)):T.createCommentVNode("",!0)],64)):T.createCommentVNode("",!0)])]),_:1})}const Lb=Wa(P$,[["render",G$],["__scopeId","data-v-fba86ed3"]]),Z$={name:"Tooltip",components:{AnnotationTool:Lb,ProvenancePopup:bb},props:{entry:{type:Object},annotationDisplay:{type:Boolean,default:!1},annotationEntry:{type:Object}}},q$={class:"tooltip-container",id:"tooltip-container"};function W$(e,t,r,n,i,o){const a=Lb,s=bb;return T.openBlock(),T.createElementBlock("div",q$,[r.annotationDisplay?(T.openBlock(),T.createBlock(a,{key:0,annotationEntry:r.annotationEntry},null,8,["annotationEntry"])):(T.openBlock(),T.createBlock(s,{key:1,entry:r.entry},null,8,["entry"]))])}const FT=Wa(Z$,[["render",W$],["__scopeId","data-v-6190f48d"]]),X$={name:"SelectionsGroup",components:{Checkbox:Ac,CheckboxGroup:CT,Col:K3,Row:qa},methods:{reset:function(){this.checkAll=!0,this.checkedItems=[],this.selections.forEach(e=>{!("enabled"in e)||e.enabled===!0?this.checkedItems.push(e[this.identifierKey]):this.checkAll=!1})},visibilityToggle:function(e,t){this.$emit("changed",{key:e,value:t})},handleCheckedItemsChange:function(e){let t=e.length;this.checkAll=t===this.selections.length},handleCheckAllChange:function(e){this.checkedItems=e?this.selections.map(t=>t[this.identifierKey]):[],this.$emit("checkAll",{keys:this.selections.map(t=>t[this.identifierKey]),value:e})},getBackgroundStyles:function(e){return"colour"in e&&this.colourStyle==="background"?{background:e.colour}:{}},hasLineStyles:function(e){return"colour"in e&&this.colourStyle==="line"},getLineStyles:function(e){return"colour"in e&&this.colourStyle==="line"?"dashed"in e&&e.dashed===!0?{background:`repeating-linear-gradient(90deg,${e.colour},${e.colour} 6px,transparent 0,transparent 9px)`}:{background:e.colour}:{display:"None"}}},props:{colourStyle:{type:String,default:"line"},identifierKey:{type:String,default:"id"},labelKey:{type:String,default:"label"},title:{type:String,default:""},selections:{type:Array,default:function(){return[]}}},computed:{isIndeterminate:function(){return!(this.checkedItems.length===0||this.checkAll)}},data:function(){return{checkedItems:[],checkAll:!0}},mounted:function(){this.reset()}},K$={class:"selections-container"},Y$={class:"checkall-display-text"},J$={class:"checkbox-group-inner"},tG={class:"checkbox-container"};function eG(e,t,r,n,i,o){const a=K3,s=Ac,h=qa,d=CT;return T.openBlock(),T.createElementBlock("div",K$,[T.createVNode(h,null,{default:T.withCtx(()=>[T.createVNode(a,{span:12},{default:T.withCtx(()=>[T.createElementVNode("div",Y$,T.toDisplayString(r.title),1)]),_:1}),T.createVNode(a,{span:12},{default:T.withCtx(()=>[r.selections&&r.selections.length>1?(T.openBlock(),T.createBlock(s,{key:0,class:"all-checkbox",indeterminate:o.isIndeterminate,modelValue:e.checkAll,"onUpdate:modelValue":t[0]||(t[0]=Q=>e.checkAll=Q),onChange:o.handleCheckAllChange},{default:T.withCtx(()=>[T.createTextVNode("Display all")]),_:1},8,["indeterminate","modelValue","onChange"])):T.createCommentVNode("",!0)]),_:1})]),_:1}),T.createVNode(d,{modelValue:e.checkedItems,"onUpdate:modelValue":t[1]||(t[1]=Q=>e.checkedItems=Q),size:"small",class:"checkbox-group",onChange:o.handleCheckedItemsChange},{default:T.withCtx(()=>[T.createElementVNode("div",J$,[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.selections,Q=>(T.openBlock(),T.createBlock(h,{key:Q[r.identifierKey],label:Q[r.identifierKey]},{default:T.withCtx(()=>[T.createElementVNode("div",tG,[T.createVNode(s,{class:"my-checkbox",label:Q[r.identifierKey],onChange:p=>o.visibilityToggle(Q[r.identifierKey],p),checked:!("enabled"in Q)||Q.enabled===!0},{default:T.withCtx(()=>[T.createVNode(h,{class:"checkbox-row"},{default:T.withCtx(()=>[o.hasLineStyles(Q)?(T.openBlock(),T.createBlock(a,{key:0,span:4},{default:T.withCtx(()=>[T.createElementVNode("div",{class:"path-visual",style:T.normalizeStyle(o.getLineStyles(Q))},null,4)]),_:2},1024)):T.createCommentVNode("",!0),T.createVNode(a,{span:20},{default:T.withCtx(()=>[T.createElementVNode("div",{style:T.normalizeStyle(o.getBackgroundStyles(Q))},T.toDisplayString(Q[r.labelKey]),5)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","onChange","checked"])])]),_:2},1032,["label"]))),128))])]),_:1},8,["modelValue","onChange"])])}const wb=Wa(X$,[["render",eG],["__scopeId","data-v-4d3741da"]]),rG={name:"TreeControls",components:{Checkbox:Ac,CheckboxGroup:CT,ColorPicker:$z,Row:qa,Tree:yb},props:{treeData:{type:Array,default:function(){return[]}},active:{type:String,default:""},hover:{type:String,default:""}},data:function(){return{defaultExpandedKeys:["All"]}},unmounted:function(){this.sortedPrimitiveGroups=void 0},methods:{nodeIsActive:function(e){return this.active===e.models},nodeIsHover:function(e){return this.hover===e.models},changeActiveByNode:function(e){e.models&&this.$emit("change-active",e.models)},changeHoverByNode:function(){},checkChanged:function(e,t){const r=t.checkedKeys.includes(e.key);e.key==="All"?this.$emit("checkAll",r):this.$emit("changed",{key:e.key,value:r})},getBackgroundStyles:function(e){return"colour"in e?{background:e.colour}:{}}}},nG=e=>(T.pushScopeId("data-v-df242013"),e=e(),T.popScopeId(),e),iG={class:"container"},oG=nG(()=>T.createElementVNode("div",{class:"title-text"},"Systems",-1)),aG={class:"tree-container"},sG=["onClick","onMouseover"];function lG(e,t,r,n,i,o){const a=K3,s=qa,h=yb;return T.openBlock(),T.createElementBlock("div",iG,[T.createVNode(s,null,{default:T.withCtx(()=>[T.createVNode(a,{span:12},{default:T.withCtx(()=>[oG]),_:1})]),_:1}),T.createElementVNode("div",aG,[T.createVNode(h,{ref:"tree","node-key":"key","show-checkbox":"","check-strictly":!1,data:r.treeData,"render-after-expand":!1,"default-expanded-keys":e.defaultExpandedKeys,onCheck:o.checkChanged},{default:T.withCtx(({node:d,data:Q})=>[T.createElementVNode("span",{class:T.normalizeClass(["region-tree-node",{activeItem:o.nodeIsActive(Q),hoverItem:o.nodeIsHover(Q)}]),onClick:p=>o.changeActiveByNode(Q),onMouseover:p=>o.changeHoverByNode(Q)},[T.createElementVNode("div",{style:T.normalizeStyle(o.getBackgroundStyles(Q))},T.toDisplayString(d.label),5)],42,sG)]),_:1},8,["data","default-expanded-keys","onCheck"])])])}const Eb=Wa(rG,[["render",lG],["__scopeId","data-v-df242013"]]),cG={name:"SvgLegends"},uG=e=>(T.pushScopeId("data-v-88079d87"),e=e(),T.popScopeId(),e),hG={class:"legends-container"},dG={version:"1.1",id:"Layer_1",x:"0px",y:"0px",viewBox:"0 0 500 500",style:{"enable-background":"new 0 0 500 500"},xmlns:"http://www.w3.org/2000/svg","xmlns:bx":"https://boxy-svg.com"},fG=[T.createStaticVNode('<defs data-v-88079d87><bx:grid height="30.447" width="32.516" x="0" y="0" data-v-88079d87></bx:grid></defs><path class="st0 st0-translate" d="M61.3,103.8c-15.9,0-28.8-12.3-28.8-27.3c0-15,13-27.3,28.8-27.3s28.8,12.3,28.8,27.3 C90.1,91.5,77.2,103.8,61.3,103.8z" data-v-88079d87></path><path class="st1" d="M40.3,356.1C29.5,345,29.8,328,41.5,317.5c11.7-10.5,29.6-9.9,40.7,1.1c11.1,11,10.5,28.1-1.2,38.5 C69.3,367.4,51.1,366.9,40.3,356.1z" data-v-88079d87></path><path class="st2" d="M61.2,396.9c-5.3,9.3-15.3,15.1-26.1,15.1l-0.4,0.6c5.1,9,5.1,20,0,29l0.4,0.6c10.7,0,20.8,5.8,26.1,15.1 c5.3-9.3,15.3-15.1,26.1-15.1c-5.3-9.3-5.3-20.9,0-30.4C76.6,412.1,66.7,406.3,61.2,396.9z" data-v-88079d87></path><text transform="matrix(0.9908 0 0 1 118.0161 171.7975)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Tissue region </text><path class="st6" d="M40.9,231.1c11.3-10.6,29.5-10.6,40.8,0c11.3,10.6,11.3,27.9,0,38.5c-11.3,10.6-29.5,10.6-40.8,0 C29.7,259,29.7,241.7,40.9,231.1z" data-v-88079d87></path><text transform="matrix(0.9908 0 0 1 118.0161 257.675)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Brain nuclei </text><text transform="matrix(0.9908 0 0 1 118.0903 345.5266)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Ganglia </text><text transform="matrix(0.9908 0 0 1 118.0903 433.1613)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Ganglionated nerve plexus </text>',9)],TG=uG(()=>T.createElementVNode("svg",{width:"72px",height:"72px",viewBox:"0 0 24 24",fill:"yellow"},null,-1));function QG(e,t,r,n,i,o){return T.openBlock(),T.createElementBlock("div",hG,[(T.openBlock(),T.createElementBlock("svg",dG,fG)),TG])}const Mb=Wa(cG,[["render",QG],["__scopeId","data-v-88079d87"]]),pG='<div class="flatmap-marker"><svg display="block" height="41px" width="27px" viewBox="0 0 27 41"><g fill-rule="nonzero"><g transform="translate(3.0, 29.0)" fill="#000000"><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="10.5" ry="5.25002273"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="9.5" ry="4.77275007"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="8.5" ry="4.29549936"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="7.5" ry="3.81822308"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="6.5" ry="3.34094679"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="5.5" ry="2.86367051"></ellipse><ellipse opacity="0.04" cx="10.5" cy="5.80029008" rx="4.5" ry="2.38636864"></ellipse></g><g fill="#005974"><path d="M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"></path></g><g opacity="0.25" fill="#000000"><path d="M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"></path></g><g transform="translate(6.0, 7.0)" fill="#FFFFFF"></g><g transform="translate(8.0, 8.0)"><circle fill="#000000" opacity="0.25" cx="5.5" cy="5.5" r="5.4999962"></circle><circle fill="#FFFFFF" cx="5.5" cy="5.5" r="5.4999962"></circle></g></g></svg></div>',jc=function(e){return e?[...new Set(e.map(t=>JSON.stringify(t)))].map(t=>JSON.parse(t)):[]},tl={},Ab=async function(e,t){return tl&&tl.hasOwnProperty(t)?tl[t]:new Promise(r=>{fetch(`${e}knowledge/label/${t}`,{method:"GET"}).then(n=>n.json()).then(n=>{let i=n.label;i==="Mammalia"&&(i="Mammalia not otherwise specified"),tl[t]=i,r(i)}).catch(n=>{console.error("Error:",n),tl[t]=t,r(t)})})},zc=function(e,t){if(!e||!t)return!1;let r=JSON.stringify(e),n=JSON.stringify(t);return r.indexOf(n)!==-1};let mG=function(){this.initialise=function(e){this.flatmapApi=e,this.destinations=[],this.origins=[],this.components=[],this.urls=[],this.controller=void 0,this.uberons=[],this.lookUp=[]},this.createTooltipData=async function(e){let t=[];e.feature.hyperlinks&&e.feature.hyperlinks.length>0?t=e.feature.hyperlinks:t=this.urls.map(i=>({url:i,id:"pubmed"}));let r;if(e.provenanceTaxonomy){r=[];for(let i=0;e.provenanceTaxonomy.length>i;i++)r.push(await Ab(this.flatmapAPI,e.provenanceTaxonomy[i]))}return{destinations:this.destinations,origins:this.origins,components:this.components,destinationsWithDatasets:this.destinationsWithDatasets,originsWithDatasets:this.originsWithDatasets,componentsWithDatasets:this.componentsWithDatasets,title:e.label,featureId:e.resource,hyperlinks:t,provenanceTaxonomy:e.provenanceTaxonomy,provenanceTaxonomyLabel:r}},this.createComponentsLabelList=function(e,t){let r=[];return e.forEach(n=>{r.push(this.createLabelFromNeuralNode(n[0]),t),n.length===2&&r.push(this.createLabelFromNeuralNode(n[1]),t)}),r},this.createLabelLookup=function(e){return new Promise(t=>{let r={};this.uberons=[];const n={sql:this.buildLabelSqlStatement(e)};fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then(i=>i.json()).then(i=>{const o=i.keys.indexOf("entity"),a=i.keys.indexOf("label");o>-1&&a>-1&&i.values.forEach(s=>{r[s[o]]=s[a],this.uberons.push({id:s[o],name:s[a]})}),t(r)})})},this.buildConnectivitySqlStatement=function(e){let t="select knowledge from knowledge where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.buildLabelSqlStatement=function(e){let t="select entity, label from labels where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.findAllIdsFromConnectivity=function(e){let t=e.connectivity.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),[...new Set(n.flat())]},this.flattenConntectivity=function(e){let t=e.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),n.flat()},this.findComponents=function(e){let t=e.connectivity.flat(),r=jc(t),n=[],i=!1;return r.forEach(o=>{i=!1,zc(e.axons,o)&&(i=!0),zc(e.dendrites,o)&&(i=!0),i||n.push(o)}),n},this.retrieveFlatmapKnowledgeForEvent=async function(e){this.controller&&this.controller.abort(),this.controller=new AbortController;const t=this.controller.signal,r=e.resource;if(this.destinations=[],this.origins=[],this.components=[],!r||r.length==0)return;const n={sql:this.buildConnectivitySqlStatement(r)};let i=new Promise(s=>{fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),signal:t}).then(h=>h.json()).then(h=>{if(this.connectivityExists(h)){let d=JSON.parse(h.values[0][0]);this.processConnectivity(d).then(()=>{s(!0)})}else s(!1)}).catch(h=>{console.error("Error:",h),s(!1)})}),o=await this.pubmedQueryOnIds(e);return await Promise.all([i,o])},this.connectivityExists=function(e){return!!(e.values&&e.values.length>0&&JSON.parse(e.values[0][0]).connectivity&&JSON.parse(e.values[0][0]).connectivity.length>0)},this.createLabelFromNeuralNode=function(e,t){let r=t[e[0]];return e.length===2&&e[1].length>0&&e[1].forEach(n=>{t[n]==null?r+=`, ${n}`:r+=`, ${t[n]}`}),r},this.flattenAndFindDatasets=function(e,t,r){let n=this.flattenConntectivity(e),i=this.flattenConntectivity(t),o=this.flattenConntectivity(r);this.destinationsWithDatasets=this.uberons.filter(a=>i.indexOf(a.id)!==-1),this.originsWithDatasets=this.uberons.filter(a=>o.indexOf(a.id)!==-1),this.componentsWithDatasets=this.uberons.filter(a=>n.indexOf(a.id)!==-1)},this.processConnectivity=function(e){return new Promise(t=>{let r=this.findComponents(e),n=jc(e.axons),i=jc(e.dendrites),o=this.findAllIdsFromConnectivity(e);this.createLabelLookup(o).then(a=>{this.destinations=n.map(s=>this.createLabelFromNeuralNode(s,a)),this.origins=i.map(s=>this.createLabelFromNeuralNode(s,a)),this.components=r.map(s=>this.createLabelFromNeuralNode(s,a)),this.flattenAndFindDatasets(r,n,i),t(!0)})})},this.flattenConntectivity=function(e){let t=e.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),n.flat()},this.findComponents=function(e){let t=e.connectivity.flat(),r=jc(t),n=[],i=!1;return r.forEach(o=>{i=!1,zc(e.axons,o)&&(i=!0),zc(e.dendrites,o)&&(i=!0),i||n.push(o)}),n},this.stripPMIDPrefix=function(e){return e.split(":")[1]},this.buildPubmedSqlStatement=function(e){let t="select distinct publication from publications where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.buildPubmedSqlStatementForModels=function(e){return`select distinct publication from publications where entity = '${e}'`},this.flatmapQuery=function(e){const t={sql:e};return fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(r=>r.json()).catch(r=>{console.error("Error:",r)})},this.pubmedQueryOnIds=function(e){return new Promise(t=>{const r=e.resource,n=e.feature.source;if(!r||r.length===0)return;const i=this.buildPubmedSqlStatement(r);this.flatmapQuery(i).then(o=>{o.values.length>0?(this.urls=[this.pubmedSearchUrl(o.values.map(a=>this.stripPMIDPrefix(a[0])))],t(!0)):this.pubmedQueryOnModels(n).then(a=>{t(a)})})})},this.pubmedQueryOnModels=function(e){return this.flatmapQuery(this.buildPubmedSqlStatementForModels(e)).then(t=>Array.isArray(t.values)&&t.values.length>0?(this.urls=[this.pubmedSearchUrl(t.values.map(r=>this.stripPMIDPrefix(r[0])))],!0):(this.urls=[],!1))},this.pubmedSearchUrl=function(e){let t="https://pubmed.ncbi.nlm.nih.gov/?",r=new URLSearchParams;return r.append("term",e),t+r.toString()}};const gG='<svg width="195px" height="24px" viewBox="0 0 200 24" fill="yellow"><path d="M22.0748 3.25583C22.4141 2.42845 23.5859 2.42845 23.9252 3.25583L25.6493 7.45955C25.793 7.80979 26.1221 8.04889 26.4995 8.07727L31.0303 8.41798C31.922 8.48504 32.2841 9.59942 31.6021 10.1778L28.1369 13.1166C27.8482 13.3614 27.7225 13.7483 27.8122 14.1161L28.8882 18.5304C29.1 19.3992 28.152 20.0879 27.3912 19.618L23.5255 17.2305C23.2034 17.0316 22.7966 17.0316 22.4745 17.2305L18.60881 19.618C17.84796 20.0879 16.9 19.3992 17.1118 18.5304L18.18785 14.1161C18.2775 13.7483 18.1518 13.3614 17.86309 13.1166L14.3979 10.1778C13.71588 9.59942 14.07796 8.48504 14.96971 8.41798L19.50046 8.07727C19.87794 8.04889 20.20704 7.80979 20.35068 7.45955L22.0748 3.25583Z" stroke="#000000" stroke-width="2"/><text x="42" y="50%" dominant-baseline="middle" text-anchor="start" font-family="Asap, sans-serif" font-size="12" fill="#000000">Featured dataset marker</text></svg>';var Cb={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(typeof window<"u"?window:P,function(){if(typeof window>"u")return null;var r=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),n=r.requestAnimationFrame||r.mozRequestAnimationFrame||r.webkitRequestAnimationFrame||function(Q){return r.setTimeout(Q,20)},i=r.cancelAnimationFrame||r.mozCancelAnimationFrame||r.webkitCancelAnimationFrame||function(Q){r.clearTimeout(Q)};function o(Q,p){var g=Object.prototype.toString.call(Q),_=g==="[object Array]"||g==="[object NodeList]"||g==="[object HTMLCollection]"||g==="[object Object]"||typeof jQuery<"u"&&Q instanceof jQuery||typeof Elements<"u"&&Q instanceof Elements,x=0,b=Q.length;if(_)for(;x<b;x++)p(Q[x]);else p(Q)}function a(Q){if(!Q.getBoundingClientRect)return{width:Q.offsetWidth,height:Q.offsetHeight};var p=Q.getBoundingClientRect();return{width:Math.round(p.width),height:Math.round(p.height)}}function s(Q,p){Object.keys(p).forEach(function(g){Q.style[g]=p[g]})}var h=function(Q,p){var g=0;function _(){var b=[];this.add=function(O){b.push(O)};var A,E;this.call=function(O){for(A=0,E=b.length;A<E;A++)b[A].call(this,O)},this.remove=function(O){var V=[];for(A=0,E=b.length;A<E;A++)b[A]!==O&&V.push(b[A]);b=V},this.length=function(){return b.length}}function x(b,A){if(b){if(b.resizedAttached){b.resizedAttached.add(A);return}b.resizedAttached=new _,b.resizedAttached.add(A),b.resizeSensor=document.createElement("div"),b.resizeSensor.dir="ltr",b.resizeSensor.className="resize-sensor";var E={pointerEvents:"none",position:"absolute",left:"0px",top:"0px",right:"0px",bottom:"0px",overflow:"hidden",zIndex:"-1",visibility:"hidden",maxWidth:"100%"},O={position:"absolute",left:"0px",top:"0px",transition:"0s"};s(b.resizeSensor,E);var V=document.createElement("div");V.className="resize-sensor-expand",s(V,E);var k=document.createElement("div");s(k,O),V.appendChild(k);var j=document.createElement("div");j.className="resize-sensor-shrink",s(j,E);var $=document.createElement("div");s($,O),s($,{width:"200%",height:"200%"}),j.appendChild($),b.resizeSensor.appendChild(V),b.resizeSensor.appendChild(j),b.appendChild(b.resizeSensor);var U=window.getComputedStyle(b),J=U?U.getPropertyValue("position"):null;J!=="absolute"&&J!=="relative"&&J!=="fixed"&&J!=="sticky"&&(b.style.position="relative");var tt=!1,rt=0,st=a(b),pt=0,St=0,$t=!0;g=0;var ie=function(){var qt=b.offsetWidth,le=b.offsetHeight;k.style.width=qt+10+"px",k.style.height=le+10+"px",V.scrollLeft=qt+10,V.scrollTop=le+10,j.scrollLeft=qt+10,j.scrollTop=le+10},me=function(){if($t){var qt=b.offsetWidth===0&&b.offsetHeight===0;if(qt){g||(g=n(function(){g=0,me()}));return}else $t=!1}ie()};b.resizeSensor.resetSensor=me;var Ft=function(){rt=0,tt&&(pt=st.width,St=st.height,b.resizedAttached&&b.resizedAttached.call(st))},he=function(){st=a(b),tt=st.width!==pt||st.height!==St,tt&&!rt&&(rt=n(Ft)),me()},cr=function(qt,le,Qe){qt.attachEvent?qt.attachEvent("on"+le,Qe):qt.addEventListener(le,Qe)};cr(V,"scroll",he),cr(j,"scroll",he),g=n(function(){g=0,me()})}}o(Q,function(b){x(b,p)}),this.detach=function(b){g||(i(g),g=0),h.detach(Q,b)},this.reset=function(){Q.resizeSensor.resetSensor()}};if(h.reset=function(Q){o(Q,function(p){p.resizeSensor.resetSensor()})},h.detach=function(Q,p){o(Q,function(g){g&&(g.resizedAttached&&typeof p=="function"&&(g.resizedAttached.remove(p),g.resizedAttached.length())||g.resizeSensor&&(g.contains(g.resizeSensor)&&g.removeChild(g.resizeSensor),delete g.resizeSensor,delete g.resizedAttached))})},typeof MutationObserver<"u"){var d=new MutationObserver(function(Q){for(var p in Q)if(Q.hasOwnProperty(p))for(var g=Q[p].addedNodes,_=0;_<g.length;_++)g[_].resizeSensor&&h.reset(g[_])});document.addEventListener("DOMContentLoaded",function(Q){d.observe(document.body,{childList:!0,subtree:!0})})}return h})})(Cb);var yG=Cb.exports;const _G=q0(yG);var Sb={exports:{}};/**
|
|
20
20
|
* MapLibre GL JS
|
|
21
21
|
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.1.0/LICENSE.txt
|
|
22
22
|
*/(function(e,t){(function(r,n){e.exports=n()})(P,function(){var r={},n={};function i(a,s,h){if(n[a]=h,a==="index"){var d="var sharedModule = {}; ("+n.shared+")(sharedModule); ("+n.worker+")(sharedModule);",Q={};return n.shared(Q),n.index(r,Q),typeof window<"u"&&r.setWorkerUrl(window.URL.createObjectURL(new Blob([d],{type:"text/javascript"}))),r}}i("shared",["exports"],function(a){function s(u,l,f,y){return new(f||(f=Promise))(function(L,S){function H(G){try{B(y.next(G))}catch(X){S(X)}}function I(G){try{B(y.throw(G))}catch(X){S(X)}}function B(G){var X;G.done?L(G.value):(X=G.value,X instanceof f?X:new f(function(Y){Y(X)})).then(H,I)}B((y=y.apply(u,l||[])).next())})}function h(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}typeof SuppressedError=="function"&&SuppressedError;var d=Q;function Q(u,l){this.x=u,this.y=l}Q.prototype={clone:function(){return new Q(this.x,this.y)},add:function(u){return this.clone()._add(u)},sub:function(u){return this.clone()._sub(u)},multByPoint:function(u){return this.clone()._multByPoint(u)},divByPoint:function(u){return this.clone()._divByPoint(u)},mult:function(u){return this.clone()._mult(u)},div:function(u){return this.clone()._div(u)},rotate:function(u){return this.clone()._rotate(u)},rotateAround:function(u,l){return this.clone()._rotateAround(u,l)},matMult:function(u){return this.clone()._matMult(u)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(u){return this.x===u.x&&this.y===u.y},dist:function(u){return Math.sqrt(this.distSqr(u))},distSqr:function(u){var l=u.x-this.x,f=u.y-this.y;return l*l+f*f},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(u){return Math.atan2(this.y-u.y,this.x-u.x)},angleWith:function(u){return this.angleWithSep(u.x,u.y)},angleWithSep:function(u,l){return Math.atan2(this.x*l-this.y*u,this.x*u+this.y*l)},_matMult:function(u){var l=u[2]*this.x+u[3]*this.y;return this.x=u[0]*this.x+u[1]*this.y,this.y=l,this},_add:function(u){return this.x+=u.x,this.y+=u.y,this},_sub:function(u){return this.x-=u.x,this.y-=u.y,this},_mult:function(u){return this.x*=u,this.y*=u,this},_div:function(u){return this.x/=u,this.y/=u,this},_multByPoint:function(u){return this.x*=u.x,this.y*=u.y,this},_divByPoint:function(u){return this.x/=u.x,this.y/=u.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var u=this.y;return this.y=this.x,this.x=-u,this},_rotate:function(u){var l=Math.cos(u),f=Math.sin(u),y=f*this.x+l*this.y;return this.x=l*this.x-f*this.y,this.y=y,this},_rotateAround:function(u,l){var f=Math.cos(u),y=Math.sin(u),L=l.y+y*(this.x-l.x)+f*(this.y-l.y);return this.x=l.x+f*(this.x-l.x)-y*(this.y-l.y),this.y=L,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},Q.convert=function(u){return u instanceof Q?u:Array.isArray(u)?new Q(u[0],u[1]):u};var p=h(d),g=_;function _(u,l,f,y){this.cx=3*u,this.bx=3*(f-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*l,this.by=3*(y-l)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=l,this.p2x=f,this.p2y=y}_.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,l){if(l===void 0&&(l=1e-6),u<0)return 0;if(u>1)return 1;for(var f=u,y=0;y<8;y++){var L=this.sampleCurveX(f)-u;if(Math.abs(L)<l)return f;var S=this.sampleCurveDerivativeX(f);if(Math.abs(S)<1e-6)break;f-=L/S}var H=0,I=1;for(f=u,y=0;y<20&&(L=this.sampleCurveX(f),!(Math.abs(L-u)<l));y++)u>L?H=f:I=f,f=.5*(I-H)+H;return f},solve:function(u,l){return this.sampleCurveY(this.solveCurveX(u,l))}};var x=h(g);let b,A;function E(){return b==null&&(b=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),b}function O(){if(A==null&&(A=!1,E())){const l=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(l){for(let y=0;y<5*5;y++){const L=4*y;l.fillStyle=`rgb(${L},${L+1},${L+2})`,l.fillRect(y%5,Math.floor(y/5),1,1)}const f=l.getImageData(0,0,5,5).data;for(let y=0;y<5*5*4;y++)if(y%4!=3&&f[y]!==y){A=!0;break}}}return A||!1}function V(u,l,f,y){const L=new x(u,l,f,y);return function(S){return L.solve(S)}}const k=V(.25,.1,.25,1);function j(u,l,f){return Math.min(f,Math.max(l,u))}function $(u,l,f){const y=f-l,L=((u-l)%y+y)%y+l;return L===l?f:L}function U(u,...l){for(const f of l)for(const y in f)u[y]=f[y];return u}let J=1;function tt(u,l,f){const y={};for(const L in u)y[L]=l.call(f||this,u[L],L,u);return y}function rt(u,l,f){const y={};for(const L in u)l.call(f||this,u[L],L,u)&&(y[L]=u[L]);return y}function st(u){return Array.isArray(u)?u.map(st):typeof u=="object"&&u?tt(u,st):u}const pt={};function St(u){pt[u]||(typeof console<"u"&&console.warn(u),pt[u]=!0)}function $t(u,l,f){return(f.y-u.y)*(l.x-u.x)>(l.y-u.y)*(f.x-u.x)}function ie(u){let l=0;for(let f,y,L=0,S=u.length,H=S-1;L<S;H=L++)f=u[L],y=u[H],l+=(y.x-f.x)*(f.y+y.y);return l}function me(u){return typeof WorkerGlobalScope<"u"&&u!==void 0&&u instanceof WorkerGlobalScope}let Ft=null;function he(u){return typeof ImageBitmap<"u"&&u instanceof ImageBitmap}const cr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function qt(u,l,f,y,L){return s(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const S=new VideoFrame(u,{timestamp:0});try{const H=S==null?void 0:S.format;if(!H||!H.startsWith("BGR")&&!H.startsWith("RGB"))throw new Error(`Unrecognized format ${H}`);const I=H.startsWith("BGR"),B=new Uint8ClampedArray(y*L*4);if(yield S.copyTo(B,function(G,X,Y,ot,lt){const ht=4*Math.max(-X,0),Tt=(Math.max(0,Y)-Y)*ot*4+ht,bt=4*ot,wt=Math.max(0,X),Rt=Math.max(0,Y);return{rect:{x:wt,y:Rt,width:Math.min(G.width,X+ot)-wt,height:Math.min(G.height,Y+lt)-Rt},layout:[{offset:Tt,stride:bt}]}}(u,l,f,y,L)),I)for(let G=0;G<B.length;G+=4){const X=B[G];B[G]=B[G+2],B[G+2]=X}return B}finally{S.close()}})}let le,Qe;const xe="AbortError";function Fe(){return new Error(xe)}const Ue={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function je(u){return Ue.REGISTERED_PROTOCOLS[u.substring(0,u.indexOf("://"))]}const Bt="global-dispatcher";class Zt extends Error{constructor(l,f,y,L){super(`AJAXError: ${f} (${l}): ${y}`),this.status=l,this.statusText=f,this.url=y,this.body=L}}const ue=()=>me(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,zt=function(u,l){if(/:\/\//.test(u.url)&&!/^https?:|^file:/.test(u.url)){const y=je(u.url);if(y)return y(u,l);if(me(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"getResource",data:u,targetMapId:Bt},l)}if(!(/^file:/.test(f=u.url)||/^file:/.test(ue())&&!/^\w+:/.test(f))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(y,L){return s(this,void 0,void 0,function*(){const S=new Request(y.url,{method:y.method||"GET",body:y.body,credentials:y.credentials,headers:y.headers,cache:y.cache,referrer:ue(),signal:L.signal});y.type==="json"&&S.headers.set("Accept","application/json");const H=yield fetch(S);if(!H.ok){const G=yield H.blob();throw new Zt(H.status,H.statusText,y.url,G)}const I=y.type==="arrayBuffer"||y.type==="image"?H.arrayBuffer():y.type==="json"?H.json():H.text(),B=yield I;if(L.signal.aborted)throw Fe();return{data:B,cacheControl:H.headers.get("Cache-Control"),expires:H.headers.get("Expires")}})}(u,l);if(me(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"getResource",data:u,mustQueue:!0,targetMapId:Bt},l)}var f;return function(y,L){return new Promise((S,H)=>{const I=new XMLHttpRequest;I.open(y.method||"GET",y.url,!0),y.type!=="arrayBuffer"&&y.type!=="image"||(I.responseType="arraybuffer");for(const B in y.headers)I.setRequestHeader(B,y.headers[B]);y.type==="json"&&(I.responseType="text",I.setRequestHeader("Accept","application/json")),I.withCredentials=y.credentials==="include",I.onerror=()=>{H(new Error(I.statusText))},I.onload=()=>{if(!L.signal.aborted)if((I.status>=200&&I.status<300||I.status===0)&&I.response!==null){let B=I.response;if(y.type==="json")try{B=JSON.parse(I.response)}catch(G){return void H(G)}S({data:B,cacheControl:I.getResponseHeader("Cache-Control"),expires:I.getResponseHeader("Expires")})}else{const B=new Blob([I.response],{type:I.getResponseHeader("Content-Type")});H(new Zt(I.status,I.statusText,y.url,B))}},L.signal.addEventListener("abort",()=>{I.abort(),H(Fe())}),I.send(y.body)})}(u,l)};function de(u){if(!u||u.indexOf("://")<=0||u.indexOf("data:image/")===0||u.indexOf("blob:")===0)return!0;const l=new URL(u),f=window.location;return l.protocol===f.protocol&&l.host===f.host}function Re(u,l,f){f[u]&&f[u].indexOf(l)!==-1||(f[u]=f[u]||[],f[u].push(l))}function Ce(u,l,f){if(f&&f[u]){const y=f[u].indexOf(l);y!==-1&&f[u].splice(y,1)}}class He{constructor(l,f={}){U(this,f),this.type=l}}class Pe extends He{constructor(l,f={}){super("error",U({error:l},f))}}class ze{on(l,f){return this._listeners=this._listeners||{},Re(l,f,this._listeners),this}off(l,f){return Ce(l,f,this._listeners),Ce(l,f,this._oneTimeListeners),this}once(l,f){return f?(this._oneTimeListeners=this._oneTimeListeners||{},Re(l,f,this._oneTimeListeners),this):new Promise(y=>this.once(l,y))}fire(l,f){typeof l=="string"&&(l=new He(l,f||{}));const y=l.type;if(this.listens(y)){l.target=this;const L=this._listeners&&this._listeners[y]?this._listeners[y].slice():[];for(const I of L)I.call(this,l);const S=this._oneTimeListeners&&this._oneTimeListeners[y]?this._oneTimeListeners[y].slice():[];for(const I of S)Ce(y,I,this._oneTimeListeners),I.call(this,l);const H=this._eventedParent;H&&(U(l,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),H.fire(l))}else l instanceof Pe&&console.error(l.error);return this}listens(l){return this._listeners&&this._listeners[l]&&this._listeners[l].length>0||this._oneTimeListeners&&this._oneTimeListeners[l]&&this._oneTimeListeners[l].length>0||this._eventedParent&&this._eventedParent.listens(l)}setEventedParent(l,f){return this._eventedParent=l,this._eventedParentData=f,this}}var Ut={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};const Vr=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function pn(u,l){const f={};for(const y in u)y!=="ref"&&(f[y]=u[y]);return Vr.forEach(y=>{y in l&&(f[y]=l[y])}),f}function Ke(u,l){if(Array.isArray(u)){if(!Array.isArray(l)||u.length!==l.length)return!1;for(let f=0;f<u.length;f++)if(!Ke(u[f],l[f]))return!1;return!0}if(typeof u=="object"&&u!==null&&l!==null){if(typeof l!="object"||Object.keys(u).length!==Object.keys(l).length)return!1;for(const f in u)if(!Ke(u[f],l[f]))return!1;return!0}return u===l}function _r(u,l){u.push(l)}function Nn(u,l,f){_r(f,{command:"addSource",args:[u,l[u]]})}function H1(u,l,f){_r(l,{command:"removeSource",args:[u]}),f[u]=!0}function Ln(u,l,f,y){H1(u,f,y),Nn(u,l,f)}function pe(u,l,f){let y;for(y in u[f])if(Object.prototype.hasOwnProperty.call(u[f],y)&&y!=="data"&&!Ke(u[f][y],l[f][y]))return!1;for(y in l[f])if(Object.prototype.hasOwnProperty.call(l[f],y)&&y!=="data"&&!Ke(u[f][y],l[f][y]))return!1;return!0}function ur(u,l,f,y,L,S){u=u||{},l=l||{};for(const H in u)Object.prototype.hasOwnProperty.call(u,H)&&(Ke(u[H],l[H])||f.push({command:S,args:[y,H,l[H],L]}));for(const H in l)Object.prototype.hasOwnProperty.call(l,H)&&!Object.prototype.hasOwnProperty.call(u,H)&&(Ke(u[H],l[H])||f.push({command:S,args:[y,H,l[H],L]}))}function Yr(u){return u.id}function wn(u,l){return u[l.id]=l,u}class fe{constructor(l,f,y,L){this.message=(l?`${l}: `:"")+y,L&&(this.identifier=L),f!=null&&f.__line__&&(this.line=f.__line__)}}function l1(u,...l){for(const f of l)for(const y in f)u[y]=f[y];return u}class mn extends Error{constructor(l,f){super(f),this.message=f,this.key=l}}class ui{constructor(l,f=[]){this.parent=l,this.bindings={};for(const[y,L]of f)this.bindings[y]=L}concat(l){return new ui(this,l)}get(l){if(this.bindings[l])return this.bindings[l];if(this.parent)return this.parent.get(l);throw new Error(`${l} not found in scope.`)}has(l){return!!this.bindings[l]||!!this.parent&&this.parent.has(l)}}const Fn={kind:"null"},we={kind:"number"},yr={kind:"string"},dr={kind:"boolean"},En={kind:"color"},T1={kind:"object"},ar={kind:"value"},Ri={kind:"collator"},hn={kind:"formatted"},yt={kind:"padding"},it={kind:"resolvedImage"},at={kind:"variableAnchorOffsetCollection"};function dt(u,l){return{kind:"array",itemType:u,N:l}}function mt(u){if(u.kind==="array"){const l=mt(u.itemType);return typeof u.N=="number"?`array<${l}, ${u.N}>`:u.itemType.kind==="value"?"array":`array<${l}>`}return u.kind}const At=[Fn,we,yr,dr,En,hn,T1,dt(ar),yt,it,at];function Ht(u,l){if(l.kind==="error")return null;if(u.kind==="array"){if(l.kind==="array"&&(l.N===0&&l.itemType.kind==="value"||!Ht(u.itemType,l.itemType))&&(typeof u.N!="number"||u.N===l.N))return null}else{if(u.kind===l.kind)return null;if(u.kind==="value"){for(const f of At)if(!Ht(f,l))return null}}return`Expected ${mt(u)} but found ${mt(l)} instead.`}function Dt(u,l){return l.some(f=>f.kind===u.kind)}function Et(u,l){return l.some(f=>f==="null"?u===null:f==="array"?Array.isArray(u):f==="object"?u&&!Array.isArray(u)&&typeof u=="object":f===typeof u)}function kt(u,l){return u.kind==="array"&&l.kind==="array"?u.itemType.kind===l.itemType.kind&&typeof u.N=="number":u.kind===l.kind}const ne=.96422,Xt=.82521,Jt=4/29,Ot=6/29,Kt=3*Ot*Ot,Ve=Ot*Ot*Ot,$e=Math.PI/180,Qr=180/Math.PI;function Ar(u){return(u%=360)<0&&(u+=360),u}function Gr([u,l,f,y]){let L,S;const H=Ge((.2225045*(u=tn(u))+.7168786*(l=tn(l))+.0606169*(f=tn(f)))/1);u===l&&l===f?L=S=H:(L=Ge((.4360747*u+.3850649*l+.1430804*f)/ne),S=Ge((.0139322*u+.0971045*l+.7141733*f)/Xt));const I=116*H-16;return[I<0?0:I,500*(L-H),200*(H-S),y]}function tn(u){return u<=.04045?u/12.92:Math.pow((u+.055)/1.055,2.4)}function Ge(u){return u>Ve?Math.pow(u,1/3):u/Kt+Jt}function Ur([u,l,f,y]){let L=(u+16)/116,S=isNaN(l)?L:L+l/500,H=isNaN(f)?L:L-f/200;return L=1*Jn(L),S=ne*Jn(S),H=Xt*Jn(H),[_n(3.1338561*S-1.6168667*L-.4906146*H),_n(-.9787684*S+1.9161415*L+.033454*H),_n(.0719453*S-.2289914*L+1.4052427*H),y]}function _n(u){return(u=u<=.00304?12.92*u:1.055*Math.pow(u,1/2.4)-.055)<0?0:u>1?1:u}function Jn(u){return u>Ot?u*u*u:Kt*(u-Jt)}function c1(u){return parseInt(u.padEnd(2,u),16)/255}function Zn(u,l){return hi(l?u/100:u,0,1)}function hi(u,l,f){return Math.min(Math.max(l,u),f)}function Es(u){return!u.some(Number.isNaN)}const R2={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class br{constructor(l,f,y,L=1,S=!0){this.r=l,this.g=f,this.b=y,this.a=L,S||(this.r*=L,this.g*=L,this.b*=L,L||this.overwriteGetter("rgb",[l,f,y,L]))}static parse(l){if(l instanceof br)return l;if(typeof l!="string")return;const f=function(y){if((y=y.toLowerCase().trim())==="transparent")return[0,0,0,0];const L=R2[y];if(L){const[H,I,B]=L;return[H/255,I/255,B/255,1]}if(y.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(y)){const H=y.length<6?1:2;let I=1;return[c1(y.slice(I,I+=H)),c1(y.slice(I,I+=H)),c1(y.slice(I,I+=H)),c1(y.slice(I,I+H)||"ff")]}if(y.startsWith("rgb")){const H=y.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(H){const[I,B,G,X,Y,ot,lt,ht,Tt,bt,wt,Rt]=H,Mt=[X||" ",lt||" ",bt].join("");if(Mt===" "||Mt===" /"||Mt===",,"||Mt===",,,"){const Vt=[G,ot,Tt].join(""),ee=Vt==="%%%"?100:Vt===""?255:0;if(ee){const ae=[hi(+B/ee,0,1),hi(+Y/ee,0,1),hi(+ht/ee,0,1),wt?Zn(+wt,Rt):1];if(Es(ae))return ae}}return}}const S=y.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(S){const[H,I,B,G,X,Y,ot,lt,ht]=S,Tt=[B||" ",X||" ",ot].join("");if(Tt===" "||Tt===" /"||Tt===",,"||Tt===",,,"){const bt=[+I,hi(+G,0,100),hi(+Y,0,100),lt?Zn(+lt,ht):1];if(Es(bt))return function([wt,Rt,Mt,Vt]){function ee(ae){const Be=(ae+wt/30)%12,Je=Rt*Math.min(Mt,1-Mt);return Mt-Je*Math.max(-1,Math.min(Be-3,9-Be,1))}return wt=Ar(wt),Rt/=100,Mt/=100,[ee(0),ee(8),ee(4),Vt]}(bt)}}}(l);return f?new br(...f,!1):void 0}get rgb(){const{r:l,g:f,b:y,a:L}=this,S=L||1/0;return this.overwriteGetter("rgb",[l/S,f/S,y/S,L])}get hcl(){return this.overwriteGetter("hcl",function(l){const[f,y,L,S]=Gr(l),H=Math.sqrt(y*y+L*L);return[Math.round(1e4*H)?Ar(Math.atan2(L,y)*Qr):NaN,H,f,S]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Gr(this.rgb))}overwriteGetter(l,f){return Object.defineProperty(this,l,{value:f}),f}toString(){const[l,f,y,L]=this.rgb;return`rgba(${[l,f,y].map(S=>Math.round(255*S)).join(",")},${L})`}}br.black=new br(0,0,0,1),br.white=new br(1,1,1,1),br.transparent=new br(0,0,0,0),br.red=new br(1,0,0,1);class Bi{constructor(l,f,y){this.sensitivity=l?f?"variant":"case":f?"accent":"base",this.locale=y,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(l,f){return this.collator.compare(l,f)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class nn{constructor(l,f,y,L,S){this.text=l,this.image=f,this.scale=y,this.fontStack=L,this.textColor=S}}class Mn{constructor(l){this.sections=l}static fromString(l){return new Mn([new nn(l,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(l=>l.text.length!==0||l.image&&l.image.name.length!==0)}static factory(l){return l instanceof Mn?l:Mn.fromString(l)}toString(){return this.sections.length===0?"":this.sections.map(l=>l.text).join("")}}class t1{constructor(l){this.values=l.slice()}static parse(l){if(l instanceof t1)return l;if(typeof l=="number")return new t1([l,l,l,l]);if(Array.isArray(l)&&!(l.length<1||l.length>4)){for(const f of l)if(typeof f!="number")return;switch(l.length){case 1:l=[l[0],l[0],l[0],l[0]];break;case 2:l=[l[0],l[1],l[0],l[1]];break;case 3:l=[l[0],l[1],l[2],l[1]]}return new t1(l)}}toString(){return JSON.stringify(this.values)}}const jn=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class en{constructor(l){this.values=l.slice()}static parse(l){if(l instanceof en)return l;if(Array.isArray(l)&&!(l.length<1)&&l.length%2==0){for(let f=0;f<l.length;f+=2){const y=l[f],L=l[f+1];if(typeof y!="string"||!jn.has(y)||!Array.isArray(L)||L.length!==2||typeof L[0]!="number"||typeof L[1]!="number")return}return new en(l)}}toString(){return JSON.stringify(this.values)}}class w1{constructor(l){this.name=l.name,this.available=l.available}toString(){return this.name}static fromString(l){return l?new w1({name:l,available:!1}):null}}function ei(u,l,f,y){return typeof u=="number"&&u>=0&&u<=255&&typeof l=="number"&&l>=0&&l<=255&&typeof f=="number"&&f>=0&&f<=255?y===void 0||typeof y=="number"&&y>=0&&y<=1?null:`Invalid rgba value [${[u,l,f,y].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof y=="number"?[u,l,f,y]:[u,l,f]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function ri(u){if(u===null||typeof u=="string"||typeof u=="boolean"||typeof u=="number"||u instanceof br||u instanceof Bi||u instanceof Mn||u instanceof t1||u instanceof en||u instanceof w1)return!0;if(Array.isArray(u)){for(const l of u)if(!ri(l))return!1;return!0}if(typeof u=="object"){for(const l in u)if(!ri(u[l]))return!1;return!0}return!1}function Zr(u){if(u===null)return Fn;if(typeof u=="string")return yr;if(typeof u=="boolean")return dr;if(typeof u=="number")return we;if(u instanceof br)return En;if(u instanceof Bi)return Ri;if(u instanceof Mn)return hn;if(u instanceof t1)return yt;if(u instanceof en)return at;if(u instanceof w1)return it;if(Array.isArray(u)){const l=u.length;let f;for(const y of u){const L=Zr(y);if(f){if(f===L)continue;f=ar;break}f=L}return dt(f||ar,l)}return T1}function y2(u){const l=typeof u;return u===null?"":l==="string"||l==="number"||l==="boolean"?String(u):u instanceof br||u instanceof Mn||u instanceof t1||u instanceof en||u instanceof w1?u.toString():JSON.stringify(u)}class Ni{constructor(l,f){this.type=l,this.value=f}static parse(l,f){if(l.length!==2)return f.error(`'literal' expression requires exactly one argument, but found ${l.length-1} instead.`);if(!ri(l[1]))return f.error("invalid value");const y=l[1];let L=Zr(y);const S=f.expectedType;return L.kind!=="array"||L.N!==0||!S||S.kind!=="array"||typeof S.N=="number"&&S.N!==0||(L=S),new Ni(L,y)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class ln{constructor(l){this.name="ExpressionEvaluationError",this.message=l}toJSON(){return this.message}}const B2={string:yr,number:we,boolean:dr,object:T1};class Q1{constructor(l,f){this.type=l,this.args=f}static parse(l,f){if(l.length<2)return f.error("Expected at least one argument.");let y,L=1;const S=l[0];if(S==="array"){let I,B;if(l.length>2){const G=l[1];if(typeof G!="string"||!(G in B2)||G==="object")return f.error('The item type argument of "array" must be one of string, number, boolean',1);I=B2[G],L++}else I=ar;if(l.length>3){if(l[2]!==null&&(typeof l[2]!="number"||l[2]<0||l[2]!==Math.floor(l[2])))return f.error('The length argument to "array" must be a positive integer literal',2);B=l[2],L++}y=dt(I,B)}else{if(!B2[S])throw new Error(`Types doesn't contain name = ${S}`);y=B2[S]}const H=[];for(;L<l.length;L++){const I=f.parse(l[L],L,ar);if(!I)return null;H.push(I)}return new Q1(y,H)}evaluate(l){for(let f=0;f<this.args.length;f++){const y=this.args[f].evaluate(l);if(!Ht(this.type,Zr(y)))return y;if(f===this.args.length-1)throw new ln(`Expected value to be of type ${mt(this.type)}, but found ${mt(Zr(y))} instead.`)}throw new Error}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}const _2={"to-boolean":dr,"to-color":En,"to-number":we,"to-string":yr};class e1{constructor(l,f){this.type=l,this.args=f}static parse(l,f){if(l.length<2)return f.error("Expected at least one argument.");const y=l[0];if(!_2[y])throw new Error(`Can't parse ${y} as it is not part of the known types`);if((y==="to-boolean"||y==="to-string")&&l.length!==2)return f.error("Expected one argument.");const L=_2[y],S=[];for(let H=1;H<l.length;H++){const I=f.parse(l[H],H,ar);if(!I)return null;S.push(I)}return new e1(L,S)}evaluate(l){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(l);case"color":{let f,y;for(const L of this.args){if(f=L.evaluate(l),y=null,f instanceof br)return f;if(typeof f=="string"){const S=l.parseColor(f);if(S)return S}else if(Array.isArray(f)&&(y=f.length<3||f.length>4?`Invalid rbga value ${JSON.stringify(f)}: expected an array containing either three or four numeric values.`:ei(f[0],f[1],f[2],f[3]),!y))return new br(f[0]/255,f[1]/255,f[2]/255,f[3])}throw new ln(y||`Could not parse color from value '${typeof f=="string"?f:JSON.stringify(f)}'`)}case"padding":{let f;for(const y of this.args){f=y.evaluate(l);const L=t1.parse(f);if(L)return L}throw new ln(`Could not parse padding from value '${typeof f=="string"?f:JSON.stringify(f)}'`)}case"variableAnchorOffsetCollection":{let f;for(const y of this.args){f=y.evaluate(l);const L=en.parse(f);if(L)return L}throw new ln(`Could not parse variableAnchorOffsetCollection from value '${typeof f=="string"?f:JSON.stringify(f)}'`)}case"number":{let f=null;for(const y of this.args){if(f=y.evaluate(l),f===null)return 0;const L=Number(f);if(!isNaN(L))return L}throw new ln(`Could not convert ${JSON.stringify(f)} to number.`)}case"formatted":return Mn.fromString(y2(this.args[0].evaluate(l)));case"resolvedImage":return w1.fromString(y2(this.args[0].evaluate(l)));default:return y2(this.args[0].evaluate(l))}}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}const ko=["Unknown","Point","LineString","Polygon"];class qr{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?ko[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(l){let f=this._parseColorCache[l];return f||(f=this._parseColorCache[l]=br.parse(l)),f}}class uo{constructor(l,f,y=[],L,S=new ui,H=[]){this.registry=l,this.path=y,this.key=y.map(I=>`[${I}]`).join(""),this.scope=S,this.errors=H,this.expectedType=L,this._isConstant=f}parse(l,f,y,L,S={}){return f?this.concat(f,y,L)._parse(l,S):this._parse(l,S)}_parse(l,f){function y(L,S,H){return H==="assert"?new Q1(S,[L]):H==="coerce"?new e1(S,[L]):L}if(l!==null&&typeof l!="string"&&typeof l!="boolean"&&typeof l!="number"||(l=["literal",l]),Array.isArray(l)){if(l.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const L=l[0];if(typeof L!="string")return this.error(`Expression name must be a string, but found ${typeof L} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const S=this.registry[L];if(S){let H=S.parse(l,this);if(!H)return null;if(this.expectedType){const I=this.expectedType,B=H.type;if(I.kind!=="string"&&I.kind!=="number"&&I.kind!=="boolean"&&I.kind!=="object"&&I.kind!=="array"||B.kind!=="value")if(I.kind!=="color"&&I.kind!=="formatted"&&I.kind!=="resolvedImage"||B.kind!=="value"&&B.kind!=="string")if(I.kind!=="padding"||B.kind!=="value"&&B.kind!=="number"&&B.kind!=="array")if(I.kind!=="variableAnchorOffsetCollection"||B.kind!=="value"&&B.kind!=="array"){if(this.checkSubtype(I,B))return null}else H=y(H,I,f.typeAnnotation||"coerce");else H=y(H,I,f.typeAnnotation||"coerce");else H=y(H,I,f.typeAnnotation||"coerce");else H=y(H,I,f.typeAnnotation||"assert")}if(!(H instanceof Ni)&&H.type.kind!=="resolvedImage"&&this._isConstant(H)){const I=new qr;try{H=new Ni(H.type,H.evaluate(I))}catch(B){return this.error(B.message),null}}return H}return this.error(`Unknown expression "${L}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(l===void 0?"'undefined' value invalid. Use null instead.":typeof l=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof l} instead.`)}concat(l,f,y){const L=typeof l=="number"?this.path.concat(l):this.path,S=y?this.scope.concat(y):this.scope;return new uo(this.registry,this._isConstant,L,f||null,S,this.errors)}error(l,...f){const y=`${this.key}${f.map(L=>`[${L}]`).join("")}`;this.errors.push(new mn(y,l))}checkSubtype(l,f){const y=Ht(l,f);return y&&this.error(y),y}}class Fi{constructor(l,f,y){this.type=Ri,this.locale=y,this.caseSensitive=l,this.diacriticSensitive=f}static parse(l,f){if(l.length!==2)return f.error("Expected one argument.");const y=l[1];if(typeof y!="object"||Array.isArray(y))return f.error("Collator options argument must be an object.");const L=f.parse(y["case-sensitive"]!==void 0&&y["case-sensitive"],1,dr);if(!L)return null;const S=f.parse(y["diacritic-sensitive"]!==void 0&&y["diacritic-sensitive"],1,dr);if(!S)return null;let H=null;return y.locale&&(H=f.parse(y.locale,1,yr),!H)?null:new Fi(L,S,H)}evaluate(l){return new Bi(this.caseSensitive.evaluate(l),this.diacriticSensitive.evaluate(l),this.locale?this.locale.evaluate(l):null)}eachChild(l){l(this.caseSensitive),l(this.diacriticSensitive),this.locale&&l(this.locale)}outputDefined(){return!1}}const D=8192;function Z(u,l){u[0]=Math.min(u[0],l[0]),u[1]=Math.min(u[1],l[1]),u[2]=Math.max(u[2],l[0]),u[3]=Math.max(u[3],l[1])}function F(u,l){return!(u[0]<=l[0]||u[2]>=l[2]||u[1]<=l[1]||u[3]>=l[3])}function W(u,l){const f=(180+u[0])/360,y=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u[1]*Math.PI/360)))/360,L=Math.pow(2,l.z);return[Math.round(f*L*D),Math.round(y*L*D)]}function nt(u,l,f){const y=u[0]-l[0],L=u[1]-l[1],S=u[0]-f[0],H=u[1]-f[1];return y*H-S*L==0&&y*S<=0&&L*H<=0}function ut(u,l){let f=!1;for(let H=0,I=l.length;H<I;H++){const B=l[H];for(let G=0,X=B.length;G<X-1;G++){if(nt(u,B[G],B[G+1]))return!1;(L=B[G])[1]>(y=u)[1]!=(S=B[G+1])[1]>y[1]&&y[0]<(S[0]-L[0])*(y[1]-L[1])/(S[1]-L[1])+L[0]&&(f=!f)}}var y,L,S;return f}function _t(u,l){for(let f=0;f<l.length;f++)if(ut(u,l[f]))return!0;return!1}function Nt(u,l,f,y){const L=y[0]-f[0],S=y[1]-f[1],H=(u[0]-f[0])*S-L*(u[1]-f[1]),I=(l[0]-f[0])*S-L*(l[1]-f[1]);return H>0&&I<0||H<0&&I>0}function te(u,l,f){for(const G of f)for(let X=0;X<G.length-1;++X)if((I=[(H=G[X+1])[0]-(S=G[X])[0],H[1]-S[1]])[0]*(B=[(L=l)[0]-(y=u)[0],L[1]-y[1]])[1]-I[1]*B[0]!=0&&Nt(y,L,S,H)&&Nt(S,H,y,L))return!0;var y,L,S,H,I,B;return!1}function ye(u,l){for(let f=0;f<u.length;++f)if(!ut(u[f],l))return!1;for(let f=0;f<u.length-1;++f)if(te(u[f],u[f+1],l))return!1;return!0}function _e(u,l){for(let f=0;f<l.length;f++)if(ye(u,l[f]))return!0;return!1}function Te(u,l,f){const y=[];for(let L=0;L<u.length;L++){const S=[];for(let H=0;H<u[L].length;H++){const I=W(u[L][H],f);Z(l,I),S.push(I)}y.push(S)}return y}function or(u,l,f){const y=[];for(let L=0;L<u.length;L++){const S=Te(u[L],l,f);y.push(S)}return y}function An(u,l,f,y){if(u[0]<f[0]||u[0]>f[2]){const L=.5*y;let S=u[0]-f[0]>L?-y:f[0]-u[0]>L?y:0;S===0&&(S=u[0]-f[2]>L?-y:f[2]-u[0]>L?y:0),u[0]+=S}Z(l,u)}function vr(u,l,f,y){const L=Math.pow(2,y.z)*D,S=[y.x*D,y.y*D],H=[];for(const I of u)for(const B of I){const G=[B.x+S[0],B.y+S[1]];An(G,l,f,L),H.push(G)}return H}function r1(u,l,f,y){const L=Math.pow(2,y.z)*D,S=[y.x*D,y.y*D],H=[];for(const B of u){const G=[];for(const X of B){const Y=[X.x+S[0],X.y+S[1]];Z(l,Y),G.push(Y)}H.push(G)}if(l[2]-l[0]<=L/2){(I=l)[0]=I[1]=1/0,I[2]=I[3]=-1/0;for(const B of H)for(const G of B)An(G,l,f,L)}var I;return H}class oe{constructor(l,f){this.type=dr,this.geojson=l,this.geometries=f}static parse(l,f){if(l.length!==2)return f.error(`'within' expression requires exactly one argument, but found ${l.length-1} instead.`);if(ri(l[1])){const y=l[1];if(y.type==="FeatureCollection"){const L=[];for(const S of y.features){const{type:H,coordinates:I}=S.geometry;H==="Polygon"&&L.push(I),H==="MultiPolygon"&&L.push(...I)}if(L.length)return new oe(y,{type:"MultiPolygon",coordinates:L})}else if(y.type==="Feature"){const L=y.geometry.type;if(L==="Polygon"||L==="MultiPolygon")return new oe(y,y.geometry)}else if(y.type==="Polygon"||y.type==="MultiPolygon")return new oe(y,y)}return f.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(l){if(l.geometry()!=null&&l.canonicalID()!=null){if(l.geometryType()==="Point")return function(f,y){const L=[1/0,1/0,-1/0,-1/0],S=[1/0,1/0,-1/0,-1/0],H=f.canonicalID();if(y.type==="Polygon"){const I=Te(y.coordinates,S,H),B=vr(f.geometry(),L,S,H);if(!F(L,S))return!1;for(const G of B)if(!ut(G,I))return!1}if(y.type==="MultiPolygon"){const I=or(y.coordinates,S,H),B=vr(f.geometry(),L,S,H);if(!F(L,S))return!1;for(const G of B)if(!_t(G,I))return!1}return!0}(l,this.geometries);if(l.geometryType()==="LineString")return function(f,y){const L=[1/0,1/0,-1/0,-1/0],S=[1/0,1/0,-1/0,-1/0],H=f.canonicalID();if(y.type==="Polygon"){const I=Te(y.coordinates,S,H),B=r1(f.geometry(),L,S,H);if(!F(L,S))return!1;for(const G of B)if(!ye(G,I))return!1}if(y.type==="MultiPolygon"){const I=or(y.coordinates,S,H),B=r1(f.geometry(),L,S,H);if(!F(L,S))return!1;for(const G of B)if(!_e(G,I))return!1}return!0}(l,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}class Ye{constructor(l,f){this.type=f.type,this.name=l,this.boundExpression=f}static parse(l,f){if(l.length!==2||typeof l[1]!="string")return f.error("'var' expression requires exactly one string literal argument.");const y=l[1];return f.scope.has(y)?new Ye(y,f.scope.get(y)):f.error(`Unknown variable "${y}". Make sure "${y}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(l){return this.boundExpression.evaluate(l)}eachChild(){}outputDefined(){return!1}}class Hr{constructor(l,f,y,L){this.name=l,this.type=f,this._evaluate=y,this.args=L}evaluate(l){return this._evaluate(l,this.args)}eachChild(l){this.args.forEach(l)}outputDefined(){return!1}static parse(l,f){const y=l[0],L=Hr.definitions[y];if(!L)return f.error(`Unknown expression "${y}". If you wanted a literal array, use ["literal", [...]].`,0);const S=Array.isArray(L)?L[0]:L.type,H=Array.isArray(L)?[[L[1],L[2]]]:L.overloads,I=H.filter(([G])=>!Array.isArray(G)||G.length===l.length-1);let B=null;for(const[G,X]of I){B=new uo(f.registry,qn,f.path,null,f.scope);const Y=[];let ot=!1;for(let lt=1;lt<l.length;lt++){const ht=l[lt],Tt=Array.isArray(G)?G[lt-1]:G.type,bt=B.parse(ht,1+Y.length,Tt);if(!bt){ot=!0;break}Y.push(bt)}if(!ot)if(Array.isArray(G)&&G.length!==Y.length)B.error(`Expected ${G.length} arguments, but found ${Y.length} instead.`);else{for(let lt=0;lt<Y.length;lt++){const ht=Array.isArray(G)?G[lt]:G.type,Tt=Y[lt];B.concat(lt+1).checkSubtype(ht,Tt.type)}if(B.errors.length===0)return new Hr(y,S,X,Y)}}if(I.length===1)f.errors.push(...B.errors);else{const G=(I.length?I:H).map(([Y])=>{return ot=Y,Array.isArray(ot)?`(${ot.map(mt).join(", ")})`:`(${mt(ot.type)}...)`;var ot}).join(" | "),X=[];for(let Y=1;Y<l.length;Y++){const ot=f.parse(l[Y],1+X.length);if(!ot)return null;X.push(mt(ot.type))}f.error(`Expected arguments of type ${G}, but found (${X.join(", ")}) instead.`)}return null}static register(l,f){Hr.definitions=f;for(const y in f)l[y]=Hr}}function qn(u){if(u instanceof Ye)return qn(u.boundExpression);if(u instanceof Hr&&u.name==="error"||u instanceof Fi||u instanceof oe)return!1;const l=u instanceof e1||u instanceof Q1;let f=!0;return u.eachChild(y=>{f=l?f&&qn(y):f&&y instanceof Ni}),!!f&&zn(u)&&_3(u,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function zn(u){if(u instanceof Hr&&(u.name==="get"&&u.args.length===1||u.name==="feature-state"||u.name==="has"&&u.args.length===1||u.name==="properties"||u.name==="geometry-type"||u.name==="id"||/^filter-/.test(u.name))||u instanceof oe)return!1;let l=!0;return u.eachChild(f=>{l&&!zn(f)&&(l=!1)}),l}function Ro(u){if(u instanceof Hr&&u.name==="feature-state")return!1;let l=!0;return u.eachChild(f=>{l&&!Ro(f)&&(l=!1)}),l}function _3(u,l){if(u instanceof Hr&&l.indexOf(u.name)>=0)return!1;let f=!0;return u.eachChild(y=>{f&&!_3(y,l)&&(f=!1)}),f}function on(u,l){const f=u.length-1;let y,L,S=0,H=f,I=0;for(;S<=H;)if(I=Math.floor((S+H)/2),y=u[I],L=u[I+1],y<=l){if(I===f||l<L)return I;S=I+1}else{if(!(y>l))throw new ln("Input is not a number.");H=I-1}return 0}class wa{constructor(l,f,y){this.type=l,this.input=f,this.labels=[],this.outputs=[];for(const[L,S]of y)this.labels.push(L),this.outputs.push(S)}static parse(l,f){if(l.length-1<4)return f.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if((l.length-1)%2!=0)return f.error("Expected an even number of arguments.");const y=f.parse(l[1],1,we);if(!y)return null;const L=[];let S=null;f.expectedType&&f.expectedType.kind!=="value"&&(S=f.expectedType);for(let H=1;H<l.length;H+=2){const I=H===1?-1/0:l[H],B=l[H+1],G=H,X=H+1;if(typeof I!="number")return f.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',G);if(L.length&&L[L.length-1][0]>=I)return f.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',G);const Y=f.parse(B,X,S);if(!Y)return null;S=S||Y.type,L.push([I,Y])}return new wa(S,y,L)}evaluate(l){const f=this.labels,y=this.outputs;if(f.length===1)return y[0].evaluate(l);const L=this.input.evaluate(l);if(L<=f[0])return y[0].evaluate(l);const S=f.length;return L>=f[S-1]?y[S-1].evaluate(l):y[on(f,L)].evaluate(l)}eachChild(l){l(this.input);for(const f of this.outputs)l(f)}outputDefined(){return this.outputs.every(l=>l.outputDefined())}}function f8(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var N2=J4;function J4(u,l,f,y){this.cx=3*u,this.bx=3*(f-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*l,this.by=3*(y-l)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=l,this.p2x=f,this.p2y=y}J4.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,l){if(l===void 0&&(l=1e-6),u<0)return 0;if(u>1)return 1;for(var f=u,y=0;y<8;y++){var L=this.sampleCurveX(f)-u;if(Math.abs(L)<l)return f;var S=this.sampleCurveDerivativeX(f);if(Math.abs(S)<1e-6)break;f-=L/S}var H=0,I=1;for(f=u,y=0;y<20&&(L=this.sampleCurveX(f),!(Math.abs(L-u)<l));y++)u>L?H=f:I=f,f=.5*(I-H)+H;return f},solve:function(u,l){return this.sampleCurveY(this.solveCurveX(u,l))}};var r0=f8(N2);function ho(u,l,f){return u+f*(l-u)}function Ea(u,l,f){return u.map((y,L)=>ho(y,l[L],f))}const U1={number:ho,color:function(u,l,f,y="rgb"){switch(y){case"rgb":{const[L,S,H,I]=Ea(u.rgb,l.rgb,f);return new br(L,S,H,I,!1)}case"hcl":{const[L,S,H,I]=u.hcl,[B,G,X,Y]=l.hcl;let ot,lt;if(isNaN(L)||isNaN(B))isNaN(L)?isNaN(B)?ot=NaN:(ot=B,H!==1&&H!==0||(lt=G)):(ot=L,X!==1&&X!==0||(lt=S));else{let Rt=B-L;B>L&&Rt>180?Rt-=360:B<L&&L-B>180&&(Rt+=360),ot=L+f*Rt}const[ht,Tt,bt,wt]=function([Rt,Mt,Vt,ee]){return Rt=isNaN(Rt)?0:Rt*$e,Ur([Vt,Math.cos(Rt)*Mt,Math.sin(Rt)*Mt,ee])}([ot,lt??ho(S,G,f),ho(H,X,f),ho(I,Y,f)]);return new br(ht,Tt,bt,wt,!1)}case"lab":{const[L,S,H,I]=Ur(Ea(u.lab,l.lab,f));return new br(L,S,H,I,!1)}}},array:Ea,padding:function(u,l,f){return new t1(Ea(u.values,l.values,f))},variableAnchorOffsetCollection:function(u,l,f){const y=u.values,L=l.values;if(y.length!==L.length)throw new ln(`Cannot interpolate values of different length. from: ${u.toString()}, to: ${l.toString()}`);const S=[];for(let H=0;H<y.length;H+=2){if(y[H]!==L[H])throw new ln(`Cannot interpolate values containing mismatched anchors. from[${H}]: ${y[H]}, to[${H}]: ${L[H]}`);S.push(y[H]);const[I,B]=y[H+1],[G,X]=L[H+1];S.push([ho(I,G,f),ho(B,X,f)])}return new en(S)}};class O1{constructor(l,f,y,L,S){this.type=l,this.operator=f,this.interpolation=y,this.input=L,this.labels=[],this.outputs=[];for(const[H,I]of S)this.labels.push(H),this.outputs.push(I)}static interpolationFactor(l,f,y,L){let S=0;if(l.name==="exponential")S=$r(f,l.base,y,L);else if(l.name==="linear")S=$r(f,1,y,L);else if(l.name==="cubic-bezier"){const H=l.controlPoints;S=new r0(H[0],H[1],H[2],H[3]).solve($r(f,1,y,L))}return S}static parse(l,f){let[y,L,S,...H]=l;if(!Array.isArray(L)||L.length===0)return f.error("Expected an interpolation type expression.",1);if(L[0]==="linear")L={name:"linear"};else if(L[0]==="exponential"){const G=L[1];if(typeof G!="number")return f.error("Exponential interpolation requires a numeric base.",1,1);L={name:"exponential",base:G}}else{if(L[0]!=="cubic-bezier")return f.error(`Unknown interpolation type ${String(L[0])}`,1,0);{const G=L.slice(1);if(G.length!==4||G.some(X=>typeof X!="number"||X<0||X>1))return f.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);L={name:"cubic-bezier",controlPoints:G}}}if(l.length-1<4)return f.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if((l.length-1)%2!=0)return f.error("Expected an even number of arguments.");if(S=f.parse(S,2,we),!S)return null;const I=[];let B=null;y==="interpolate-hcl"||y==="interpolate-lab"?B=En:f.expectedType&&f.expectedType.kind!=="value"&&(B=f.expectedType);for(let G=0;G<H.length;G+=2){const X=H[G],Y=H[G+1],ot=G+3,lt=G+4;if(typeof X!="number")return f.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',ot);if(I.length&&I[I.length-1][0]>=X)return f.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',ot);const ht=f.parse(Y,lt,B);if(!ht)return null;B=B||ht.type,I.push([X,ht])}return kt(B,we)||kt(B,En)||kt(B,yt)||kt(B,at)||kt(B,dt(we))?new O1(B,y,L,S,I):f.error(`Type ${mt(B)} is not interpolatable.`)}evaluate(l){const f=this.labels,y=this.outputs;if(f.length===1)return y[0].evaluate(l);const L=this.input.evaluate(l);if(L<=f[0])return y[0].evaluate(l);const S=f.length;if(L>=f[S-1])return y[S-1].evaluate(l);const H=on(f,L),I=O1.interpolationFactor(this.interpolation,L,f[H],f[H+1]),B=y[H].evaluate(l),G=y[H+1].evaluate(l);switch(this.operator){case"interpolate":return U1[this.type.kind](B,G,I);case"interpolate-hcl":return U1.color(B,G,I,"hcl");case"interpolate-lab":return U1.color(B,G,I,"lab")}}eachChild(l){l(this.input);for(const f of this.outputs)l(f)}outputDefined(){return this.outputs.every(l=>l.outputDefined())}}function $r(u,l,f,y){const L=y-f,S=u-f;return L===0?0:l===1?S/L:(Math.pow(l,S)-1)/(Math.pow(l,L)-1)}class Ms{constructor(l,f){this.type=l,this.args=f}static parse(l,f){if(l.length<2)return f.error("Expectected at least one argument.");let y=null;const L=f.expectedType;L&&L.kind!=="value"&&(y=L);const S=[];for(const I of l.slice(1)){const B=f.parse(I,1+S.length,y,void 0,{typeAnnotation:"omit"});if(!B)return null;y=y||B.type,S.push(B)}if(!y)throw new Error("No output type");const H=L&&S.some(I=>Ht(L,I.type));return new Ms(H?ar:y,S)}evaluate(l){let f,y=null,L=0;for(const S of this.args)if(L++,y=S.evaluate(l),y&&y instanceof w1&&!y.available&&(f||(f=y.name),y=null,L===this.args.length&&(y=f)),y!==null)break;return y}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}class As{constructor(l,f){this.type=f.type,this.bindings=[].concat(l),this.result=f}evaluate(l){return this.result.evaluate(l)}eachChild(l){for(const f of this.bindings)l(f[1]);l(this.result)}static parse(l,f){if(l.length<4)return f.error(`Expected at least 3 arguments, but found ${l.length-1} instead.`);const y=[];for(let S=1;S<l.length-1;S+=2){const H=l[S];if(typeof H!="string")return f.error(`Expected string, but found ${typeof H} instead.`,S);if(/[^a-zA-Z0-9_]/.test(H))return f.error("Variable names must contain only alphanumeric characters or '_'.",S);const I=f.parse(l[S+1],S+1);if(!I)return null;y.push([H,I])}const L=f.parse(l[l.length-1],l.length-1,f.expectedType,y);return L?new As(y,L):null}outputDefined(){return this.result.outputDefined()}}class Cs{constructor(l,f,y){this.type=l,this.index=f,this.input=y}static parse(l,f){if(l.length!==3)return f.error(`Expected 2 arguments, but found ${l.length-1} instead.`);const y=f.parse(l[1],1,we),L=f.parse(l[2],2,dt(f.expectedType||ar));return y&&L?new Cs(L.type.itemType,y,L):null}evaluate(l){const f=this.index.evaluate(l),y=this.input.evaluate(l);if(f<0)throw new ln(`Array index out of bounds: ${f} < 0.`);if(f>=y.length)throw new ln(`Array index out of bounds: ${f} > ${y.length-1}.`);if(f!==Math.floor(f))throw new ln(`Array index must be an integer, but found ${f} instead.`);return y[f]}eachChild(l){l(this.index),l(this.input)}outputDefined(){return!1}}class Ss{constructor(l,f){this.type=dr,this.needle=l,this.haystack=f}static parse(l,f){if(l.length!==3)return f.error(`Expected 2 arguments, but found ${l.length-1} instead.`);const y=f.parse(l[1],1,ar),L=f.parse(l[2],2,ar);return y&&L?Dt(y.type,[dr,yr,we,Fn,ar])?new Ss(y,L):f.error(`Expected first argument to be of type boolean, string, number or null, but found ${mt(y.type)} instead`):null}evaluate(l){const f=this.needle.evaluate(l),y=this.haystack.evaluate(l);if(!y)return!1;if(!Et(f,["boolean","string","number","null"]))throw new ln(`Expected first argument to be of type boolean, string, number or null, but found ${mt(Zr(f))} instead.`);if(!Et(y,["string","array"]))throw new ln(`Expected second argument to be of type array or string, but found ${mt(Zr(y))} instead.`);return y.indexOf(f)>=0}eachChild(l){l(this.needle),l(this.haystack)}outputDefined(){return!0}}class v3{constructor(l,f,y){this.type=we,this.needle=l,this.haystack=f,this.fromIndex=y}static parse(l,f){if(l.length<=2||l.length>=5)return f.error(`Expected 3 or 4 arguments, but found ${l.length-1} instead.`);const y=f.parse(l[1],1,ar),L=f.parse(l[2],2,ar);if(!y||!L)return null;if(!Dt(y.type,[dr,yr,we,Fn,ar]))return f.error(`Expected first argument to be of type boolean, string, number or null, but found ${mt(y.type)} instead`);if(l.length===4){const S=f.parse(l[3],3,we);return S?new v3(y,L,S):null}return new v3(y,L)}evaluate(l){const f=this.needle.evaluate(l),y=this.haystack.evaluate(l);if(!Et(f,["boolean","string","number","null"]))throw new ln(`Expected first argument to be of type boolean, string, number or null, but found ${mt(Zr(f))} instead.`);if(!Et(y,["string","array"]))throw new ln(`Expected second argument to be of type array or string, but found ${mt(Zr(y))} instead.`);if(this.fromIndex){const L=this.fromIndex.evaluate(l);return y.indexOf(f,L)}return y.indexOf(f)}eachChild(l){l(this.needle),l(this.haystack),this.fromIndex&&l(this.fromIndex)}outputDefined(){return!1}}class t6{constructor(l,f,y,L,S,H){this.inputType=l,this.type=f,this.input=y,this.cases=L,this.outputs=S,this.otherwise=H}static parse(l,f){if(l.length<5)return f.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if(l.length%2!=1)return f.error("Expected an even number of arguments.");let y,L;f.expectedType&&f.expectedType.kind!=="value"&&(L=f.expectedType);const S={},H=[];for(let G=2;G<l.length-1;G+=2){let X=l[G];const Y=l[G+1];Array.isArray(X)||(X=[X]);const ot=f.concat(G);if(X.length===0)return ot.error("Expected at least one branch label.");for(const ht of X){if(typeof ht!="number"&&typeof ht!="string")return ot.error("Branch labels must be numbers or strings.");if(typeof ht=="number"&&Math.abs(ht)>Number.MAX_SAFE_INTEGER)return ot.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof ht=="number"&&Math.floor(ht)!==ht)return ot.error("Numeric branch labels must be integer values.");if(y){if(ot.checkSubtype(y,Zr(ht)))return null}else y=Zr(ht);if(S[String(ht)]!==void 0)return ot.error("Branch labels must be unique.");S[String(ht)]=H.length}const lt=f.parse(Y,G,L);if(!lt)return null;L=L||lt.type,H.push(lt)}const I=f.parse(l[1],1,ar);if(!I)return null;const B=f.parse(l[l.length-1],l.length-1,L);return B?I.type.kind!=="value"&&f.concat(1).checkSubtype(y,I.type)?null:new t6(y,L,I,S,H,B):null}evaluate(l){const f=this.input.evaluate(l);return(Zr(f)===this.inputType&&this.outputs[this.cases[f]]||this.otherwise).evaluate(l)}eachChild(l){l(this.input),this.outputs.forEach(l),l(this.otherwise)}outputDefined(){return this.outputs.every(l=>l.outputDefined())&&this.otherwise.outputDefined()}}class e6{constructor(l,f,y){this.type=l,this.branches=f,this.otherwise=y}static parse(l,f){if(l.length<4)return f.error(`Expected at least 3 arguments, but found only ${l.length-1}.`);if(l.length%2!=0)return f.error("Expected an odd number of arguments.");let y;f.expectedType&&f.expectedType.kind!=="value"&&(y=f.expectedType);const L=[];for(let H=1;H<l.length-1;H+=2){const I=f.parse(l[H],H,dr);if(!I)return null;const B=f.parse(l[H+1],H+1,y);if(!B)return null;L.push([I,B]),y=y||B.type}const S=f.parse(l[l.length-1],l.length-1,y);if(!S)return null;if(!y)throw new Error("Can't infer output type");return new e6(y,L,S)}evaluate(l){for(const[f,y]of this.branches)if(f.evaluate(l))return y.evaluate(l);return this.otherwise.evaluate(l)}eachChild(l){for(const[f,y]of this.branches)l(f),l(y);l(this.otherwise)}outputDefined(){return this.branches.every(([l,f])=>f.outputDefined())&&this.otherwise.outputDefined()}}class Bo{constructor(l,f,y,L){this.type=l,this.input=f,this.beginIndex=y,this.endIndex=L}static parse(l,f){if(l.length<=2||l.length>=5)return f.error(`Expected 3 or 4 arguments, but found ${l.length-1} instead.`);const y=f.parse(l[1],1,ar),L=f.parse(l[2],2,we);if(!y||!L)return null;if(!Dt(y.type,[dt(ar),yr,ar]))return f.error(`Expected first argument to be of type array or string, but found ${mt(y.type)} instead`);if(l.length===4){const S=f.parse(l[3],3,we);return S?new Bo(y.type,y,L,S):null}return new Bo(y.type,y,L)}evaluate(l){const f=this.input.evaluate(l),y=this.beginIndex.evaluate(l);if(!Et(f,["string","array"]))throw new ln(`Expected first argument to be of type array or string, but found ${mt(Zr(f))} instead.`);if(this.endIndex){const L=this.endIndex.evaluate(l);return f.slice(y,L)}return f.slice(y)}eachChild(l){l(this.input),l(this.beginIndex),this.endIndex&&l(this.endIndex)}outputDefined(){return!1}}function Hs(u,l){return u==="=="||u==="!="?l.kind==="boolean"||l.kind==="string"||l.kind==="number"||l.kind==="null"||l.kind==="value":l.kind==="string"||l.kind==="number"||l.kind==="value"}function r6(u,l,f,y){return y.compare(l,f)===0}function ni(u,l,f){const y=u!=="=="&&u!=="!=";return class rD{constructor(S,H,I){this.type=dr,this.lhs=S,this.rhs=H,this.collator=I,this.hasUntypedArgument=S.type.kind==="value"||H.type.kind==="value"}static parse(S,H){if(S.length!==3&&S.length!==4)return H.error("Expected two or three arguments.");const I=S[0];let B=H.parse(S[1],1,ar);if(!B)return null;if(!Hs(I,B.type))return H.concat(1).error(`"${I}" comparisons are not supported for type '${mt(B.type)}'.`);let G=H.parse(S[2],2,ar);if(!G)return null;if(!Hs(I,G.type))return H.concat(2).error(`"${I}" comparisons are not supported for type '${mt(G.type)}'.`);if(B.type.kind!==G.type.kind&&B.type.kind!=="value"&&G.type.kind!=="value")return H.error(`Cannot compare types '${mt(B.type)}' and '${mt(G.type)}'.`);y&&(B.type.kind==="value"&&G.type.kind!=="value"?B=new Q1(G.type,[B]):B.type.kind!=="value"&&G.type.kind==="value"&&(G=new Q1(B.type,[G])));let X=null;if(S.length===4){if(B.type.kind!=="string"&&G.type.kind!=="string"&&B.type.kind!=="value"&&G.type.kind!=="value")return H.error("Cannot use collator to compare non-string types.");if(X=H.parse(S[3],3,Ri),!X)return null}return new rD(B,G,X)}evaluate(S){const H=this.lhs.evaluate(S),I=this.rhs.evaluate(S);if(y&&this.hasUntypedArgument){const B=Zr(H),G=Zr(I);if(B.kind!==G.kind||B.kind!=="string"&&B.kind!=="number")throw new ln(`Expected arguments for "${u}" to be (string, string) or (number, number), but found (${B.kind}, ${G.kind}) instead.`)}if(this.collator&&!y&&this.hasUntypedArgument){const B=Zr(H),G=Zr(I);if(B.kind!=="string"||G.kind!=="string")return l(S,H,I)}return this.collator?f(S,H,I,this.collator.evaluate(S)):l(S,H,I)}eachChild(S){S(this.lhs),S(this.rhs),this.collator&&S(this.collator)}outputDefined(){return!0}}}const n0=ni("==",function(u,l,f){return l===f},r6),i0=ni("!=",function(u,l,f){return l!==f},function(u,l,f,y){return!r6(0,l,f,y)}),T8=ni("<",function(u,l,f){return l<f},function(u,l,f,y){return y.compare(l,f)<0}),o0=ni(">",function(u,l,f){return l>f},function(u,l,f,y){return y.compare(l,f)>0}),Os=ni("<=",function(u,l,f){return l<=f},function(u,l,f,y){return y.compare(l,f)<=0}),a0=ni(">=",function(u,l,f){return l>=f},function(u,l,f,y){return y.compare(l,f)>=0});class Vs{constructor(l,f,y,L,S){this.type=yr,this.number=l,this.locale=f,this.currency=y,this.minFractionDigits=L,this.maxFractionDigits=S}static parse(l,f){if(l.length!==3)return f.error("Expected two arguments.");const y=f.parse(l[1],1,we);if(!y)return null;const L=l[2];if(typeof L!="object"||Array.isArray(L))return f.error("NumberFormat options argument must be an object.");let S=null;if(L.locale&&(S=f.parse(L.locale,1,yr),!S))return null;let H=null;if(L.currency&&(H=f.parse(L.currency,1,yr),!H))return null;let I=null;if(L["min-fraction-digits"]&&(I=f.parse(L["min-fraction-digits"],1,we),!I))return null;let B=null;return L["max-fraction-digits"]&&(B=f.parse(L["max-fraction-digits"],1,we),!B)?null:new Vs(y,S,H,I,B)}evaluate(l){return new Intl.NumberFormat(this.locale?this.locale.evaluate(l):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(l):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(l):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(l):void 0}).format(this.number.evaluate(l))}eachChild(l){l(this.number),this.locale&&l(this.locale),this.currency&&l(this.currency),this.minFractionDigits&&l(this.minFractionDigits),this.maxFractionDigits&&l(this.maxFractionDigits)}outputDefined(){return!1}}class Ds{constructor(l){this.type=hn,this.sections=l}static parse(l,f){if(l.length<2)return f.error("Expected at least one argument.");const y=l[1];if(!Array.isArray(y)&&typeof y=="object")return f.error("First argument must be an image or text section.");const L=[];let S=!1;for(let H=1;H<=l.length-1;++H){const I=l[H];if(S&&typeof I=="object"&&!Array.isArray(I)){S=!1;let B=null;if(I["font-scale"]&&(B=f.parse(I["font-scale"],1,we),!B))return null;let G=null;if(I["text-font"]&&(G=f.parse(I["text-font"],1,dt(yr)),!G))return null;let X=null;if(I["text-color"]&&(X=f.parse(I["text-color"],1,En),!X))return null;const Y=L[L.length-1];Y.scale=B,Y.font=G,Y.textColor=X}else{const B=f.parse(l[H],1,ar);if(!B)return null;const G=B.type.kind;if(G!=="string"&&G!=="value"&&G!=="null"&&G!=="resolvedImage")return f.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");S=!0,L.push({content:B,scale:null,font:null,textColor:null})}}return new Ds(L)}evaluate(l){return new Mn(this.sections.map(f=>{const y=f.content.evaluate(l);return Zr(y)===it?new nn("",y,null,null,null):new nn(y2(y),null,f.scale?f.scale.evaluate(l):null,f.font?f.font.evaluate(l).join(","):null,f.textColor?f.textColor.evaluate(l):null)}))}eachChild(l){for(const f of this.sections)l(f.content),f.scale&&l(f.scale),f.font&&l(f.font),f.textColor&&l(f.textColor)}outputDefined(){return!1}}class F2{constructor(l){this.type=it,this.input=l}static parse(l,f){if(l.length!==2)return f.error("Expected two arguments.");const y=f.parse(l[1],1,yr);return y?new F2(y):f.error("No image name provided.")}evaluate(l){const f=this.input.evaluate(l),y=w1.fromString(f);return y&&l.availableImages&&(y.available=l.availableImages.indexOf(f)>-1),y}eachChild(l){l(this.input)}outputDefined(){return!1}}class Ps{constructor(l){this.type=we,this.input=l}static parse(l,f){if(l.length!==2)return f.error(`Expected 1 argument, but found ${l.length-1} instead.`);const y=f.parse(l[1],1);return y?y.type.kind!=="array"&&y.type.kind!=="string"&&y.type.kind!=="value"?f.error(`Expected argument of type string or array, but found ${mt(y.type)} instead.`):new Ps(y):null}evaluate(l){const f=this.input.evaluate(l);if(typeof f=="string"||Array.isArray(f))return f.length;throw new ln(`Expected value to be of type string or array, but found ${mt(Zr(f))} instead.`)}eachChild(l){l(this.input)}outputDefined(){return!1}}const Ma={"==":n0,"!=":i0,">":o0,"<":T8,">=":a0,"<=":Os,array:Q1,at:Cs,boolean:Q1,case:e6,coalesce:Ms,collator:Fi,format:Ds,image:F2,in:Ss,"index-of":v3,interpolate:O1,"interpolate-hcl":O1,"interpolate-lab":O1,length:Ps,let:As,literal:Ni,match:t6,number:Q1,"number-format":Vs,object:Q1,slice:Bo,step:wa,string:Q1,"to-boolean":e1,"to-color":e1,"to-number":e1,"to-string":e1,var:Ye,within:oe};function s0(u,[l,f,y,L]){l=l.evaluate(u),f=f.evaluate(u),y=y.evaluate(u);const S=L?L.evaluate(u):1,H=ei(l,f,y,S);if(H)throw new ln(H);return new br(l/255,f/255,y/255,S,!1)}function Is(u,l){return u in l}function No(u,l){const f=l[u];return f===void 0?null:f}function j2(u){return{type:u}}function ks(u){return{result:"success",value:u}}function fo(u){return{result:"error",value:u}}function v2(u){return u["property-type"]==="data-driven"||u["property-type"]==="cross-faded-data-driven"}function l0(u){return!!u.expression&&u.expression.parameters.indexOf("zoom")>-1}function n6(u){return!!u.expression&&u.expression.interpolated}function jr(u){return u instanceof Number?"number":u instanceof String?"string":u instanceof Boolean?"boolean":Array.isArray(u)?"array":u===null?"null":typeof u}function Rs(u){return typeof u=="object"&&u!==null&&!Array.isArray(u)}function Q8(u){return u}function i6(u,l){const f=l.type==="color",y=u.stops&&typeof u.stops[0][0]=="object",L=y||!(y||u.property!==void 0),S=u.type||(n6(l)?"exponential":"interval");if(f||l.type==="padding"){const X=f?br.parse:t1.parse;(u=l1({},u)).stops&&(u.stops=u.stops.map(Y=>[Y[0],X(Y[1])])),u.default=X(u.default?u.default:l.default)}if(u.colorSpace&&(H=u.colorSpace)!=="rgb"&&H!=="hcl"&&H!=="lab")throw new Error(`Unknown color space: "${u.colorSpace}"`);var H;let I,B,G;if(S==="exponential")I=Lr;else if(S==="interval")I=z2;else if(S==="categorical"){I=dn,B=Object.create(null);for(const X of u.stops)B[X[0]]=X[1];G=typeof u.stops[0][0]}else{if(S!=="identity")throw new Error(`Unknown function type "${S}"`);I=Aa}if(y){const X={},Y=[];for(let ht=0;ht<u.stops.length;ht++){const Tt=u.stops[ht],bt=Tt[0].zoom;X[bt]===void 0&&(X[bt]={zoom:bt,type:u.type,property:u.property,default:u.default,stops:[]},Y.push(bt)),X[bt].stops.push([Tt[0].value,Tt[1]])}const ot=[];for(const ht of Y)ot.push([X[ht].zoom,i6(X[ht],l)]);const lt={name:"linear"};return{kind:"composite",interpolationType:lt,interpolationFactor:O1.interpolationFactor.bind(void 0,lt),zoomStops:ot.map(ht=>ht[0]),evaluate:({zoom:ht},Tt)=>Lr({stops:ot,base:u.base},l,ht).evaluate(ht,Tt)}}if(L){const X=S==="exponential"?{name:"exponential",base:u.base!==void 0?u.base:1}:null;return{kind:"camera",interpolationType:X,interpolationFactor:O1.interpolationFactor.bind(void 0,X),zoomStops:u.stops.map(Y=>Y[0]),evaluate:({zoom:Y})=>I(u,l,Y,B,G)}}return{kind:"source",evaluate(X,Y){const ot=Y&&Y.properties?Y.properties[u.property]:void 0;return ot===void 0?Fo(u.default,l.default):I(u,l,ot,B,G)}}}function Fo(u,l,f){return u!==void 0?u:l!==void 0?l:f!==void 0?f:void 0}function dn(u,l,f,y,L){return Fo(typeof f===L?y[f]:void 0,u.default,l.default)}function z2(u,l,f){if(jr(f)!=="number")return Fo(u.default,l.default);const y=u.stops.length;if(y===1||f<=u.stops[0][0])return u.stops[0][1];if(f>=u.stops[y-1][0])return u.stops[y-1][1];const L=on(u.stops.map(S=>S[0]),f);return u.stops[L][1]}function Lr(u,l,f){const y=u.base!==void 0?u.base:1;if(jr(f)!=="number")return Fo(u.default,l.default);const L=u.stops.length;if(L===1||f<=u.stops[0][0])return u.stops[0][1];if(f>=u.stops[L-1][0])return u.stops[L-1][1];const S=on(u.stops.map(X=>X[0]),f),H=function(X,Y,ot,lt){const ht=lt-ot,Tt=X-ot;return ht===0?0:Y===1?Tt/ht:(Math.pow(Y,Tt)-1)/(Math.pow(Y,ht)-1)}(f,y,u.stops[S][0],u.stops[S+1][0]),I=u.stops[S][1],B=u.stops[S+1][1],G=U1[l.type]||Q8;return typeof I.evaluate=="function"?{evaluate(...X){const Y=I.evaluate.apply(void 0,X),ot=B.evaluate.apply(void 0,X);if(Y!==void 0&&ot!==void 0)return G(Y,ot,H,u.colorSpace)}}:G(I,B,H,u.colorSpace)}function Aa(u,l,f){switch(l.type){case"color":f=br.parse(f);break;case"formatted":f=Mn.fromString(f.toString());break;case"resolvedImage":f=w1.fromString(f.toString());break;case"padding":f=t1.parse(f);break;default:jr(f)===l.type||l.type==="enum"&&l.values[f]||(f=void 0)}return Fo(f,u.default,l.default)}Hr.register(Ma,{error:[{kind:"error"},[yr],(u,[l])=>{throw new ln(l.evaluate(u))}],typeof:[yr,[ar],(u,[l])=>mt(Zr(l.evaluate(u)))],"to-rgba":[dt(we,4),[En],(u,[l])=>{const[f,y,L,S]=l.evaluate(u).rgb;return[255*f,255*y,255*L,S]}],rgb:[En,[we,we,we],s0],rgba:[En,[we,we,we,we],s0],has:{type:dr,overloads:[[[yr],(u,[l])=>Is(l.evaluate(u),u.properties())],[[yr,T1],(u,[l,f])=>Is(l.evaluate(u),f.evaluate(u))]]},get:{type:ar,overloads:[[[yr],(u,[l])=>No(l.evaluate(u),u.properties())],[[yr,T1],(u,[l,f])=>No(l.evaluate(u),f.evaluate(u))]]},"feature-state":[ar,[yr],(u,[l])=>No(l.evaluate(u),u.featureState||{})],properties:[T1,[],u=>u.properties()],"geometry-type":[yr,[],u=>u.geometryType()],id:[ar,[],u=>u.id()],zoom:[we,[],u=>u.globals.zoom],"heatmap-density":[we,[],u=>u.globals.heatmapDensity||0],"line-progress":[we,[],u=>u.globals.lineProgress||0],accumulated:[ar,[],u=>u.globals.accumulated===void 0?null:u.globals.accumulated],"+":[we,j2(we),(u,l)=>{let f=0;for(const y of l)f+=y.evaluate(u);return f}],"*":[we,j2(we),(u,l)=>{let f=1;for(const y of l)f*=y.evaluate(u);return f}],"-":{type:we,overloads:[[[we,we],(u,[l,f])=>l.evaluate(u)-f.evaluate(u)],[[we],(u,[l])=>-l.evaluate(u)]]},"/":[we,[we,we],(u,[l,f])=>l.evaluate(u)/f.evaluate(u)],"%":[we,[we,we],(u,[l,f])=>l.evaluate(u)%f.evaluate(u)],ln2:[we,[],()=>Math.LN2],pi:[we,[],()=>Math.PI],e:[we,[],()=>Math.E],"^":[we,[we,we],(u,[l,f])=>Math.pow(l.evaluate(u),f.evaluate(u))],sqrt:[we,[we],(u,[l])=>Math.sqrt(l.evaluate(u))],log10:[we,[we],(u,[l])=>Math.log(l.evaluate(u))/Math.LN10],ln:[we,[we],(u,[l])=>Math.log(l.evaluate(u))],log2:[we,[we],(u,[l])=>Math.log(l.evaluate(u))/Math.LN2],sin:[we,[we],(u,[l])=>Math.sin(l.evaluate(u))],cos:[we,[we],(u,[l])=>Math.cos(l.evaluate(u))],tan:[we,[we],(u,[l])=>Math.tan(l.evaluate(u))],asin:[we,[we],(u,[l])=>Math.asin(l.evaluate(u))],acos:[we,[we],(u,[l])=>Math.acos(l.evaluate(u))],atan:[we,[we],(u,[l])=>Math.atan(l.evaluate(u))],min:[we,j2(we),(u,l)=>Math.min(...l.map(f=>f.evaluate(u)))],max:[we,j2(we),(u,l)=>Math.max(...l.map(f=>f.evaluate(u)))],abs:[we,[we],(u,[l])=>Math.abs(l.evaluate(u))],round:[we,[we],(u,[l])=>{const f=l.evaluate(u);return f<0?-Math.round(-f):Math.round(f)}],floor:[we,[we],(u,[l])=>Math.floor(l.evaluate(u))],ceil:[we,[we],(u,[l])=>Math.ceil(l.evaluate(u))],"filter-==":[dr,[yr,ar],(u,[l,f])=>u.properties()[l.value]===f.value],"filter-id-==":[dr,[ar],(u,[l])=>u.id()===l.value],"filter-type-==":[dr,[yr],(u,[l])=>u.geometryType()===l.value],"filter-<":[dr,[yr,ar],(u,[l,f])=>{const y=u.properties()[l.value],L=f.value;return typeof y==typeof L&&y<L}],"filter-id-<":[dr,[ar],(u,[l])=>{const f=u.id(),y=l.value;return typeof f==typeof y&&f<y}],"filter->":[dr,[yr,ar],(u,[l,f])=>{const y=u.properties()[l.value],L=f.value;return typeof y==typeof L&&y>L}],"filter-id->":[dr,[ar],(u,[l])=>{const f=u.id(),y=l.value;return typeof f==typeof y&&f>y}],"filter-<=":[dr,[yr,ar],(u,[l,f])=>{const y=u.properties()[l.value],L=f.value;return typeof y==typeof L&&y<=L}],"filter-id-<=":[dr,[ar],(u,[l])=>{const f=u.id(),y=l.value;return typeof f==typeof y&&f<=y}],"filter->=":[dr,[yr,ar],(u,[l,f])=>{const y=u.properties()[l.value],L=f.value;return typeof y==typeof L&&y>=L}],"filter-id->=":[dr,[ar],(u,[l])=>{const f=u.id(),y=l.value;return typeof f==typeof y&&f>=y}],"filter-has":[dr,[ar],(u,[l])=>l.value in u.properties()],"filter-has-id":[dr,[],u=>u.id()!==null&&u.id()!==void 0],"filter-type-in":[dr,[dt(yr)],(u,[l])=>l.value.indexOf(u.geometryType())>=0],"filter-id-in":[dr,[dt(ar)],(u,[l])=>l.value.indexOf(u.id())>=0],"filter-in-small":[dr,[yr,dt(ar)],(u,[l,f])=>f.value.indexOf(u.properties()[l.value])>=0],"filter-in-large":[dr,[yr,dt(ar)],(u,[l,f])=>function(y,L,S,H){for(;S<=H;){const I=S+H>>1;if(L[I]===y)return!0;L[I]>y?H=I-1:S=I+1}return!1}(u.properties()[l.value],f.value,0,f.value.length-1)],all:{type:dr,overloads:[[[dr,dr],(u,[l,f])=>l.evaluate(u)&&f.evaluate(u)],[j2(dr),(u,l)=>{for(const f of l)if(!f.evaluate(u))return!1;return!0}]]},any:{type:dr,overloads:[[[dr,dr],(u,[l,f])=>l.evaluate(u)||f.evaluate(u)],[j2(dr),(u,l)=>{for(const f of l)if(f.evaluate(u))return!0;return!1}]]},"!":[dr,[dr],(u,[l])=>!l.evaluate(u)],"is-supported-script":[dr,[yr],(u,[l])=>{const f=u.globals&&u.globals.isSupportedScript;return!f||f(l.evaluate(u))}],upcase:[yr,[yr],(u,[l])=>l.evaluate(u).toUpperCase()],downcase:[yr,[yr],(u,[l])=>l.evaluate(u).toLowerCase()],concat:[yr,j2(ar),(u,l)=>l.map(f=>y2(f.evaluate(u))).join("")],"resolved-locale":[yr,[Ri],(u,[l])=>l.evaluate(u).resolvedLocale()]});class Wr{constructor(l,f){var y;this.expression=l,this._warningHistory={},this._evaluator=new qr,this._defaultValue=f?(y=f).type==="color"&&Rs(y.default)?new br(0,0,0,0):y.type==="color"?br.parse(y.default)||null:y.type==="padding"?t1.parse(y.default)||null:y.type==="variableAnchorOffsetCollection"?en.parse(y.default)||null:y.default===void 0?null:y.default:null,this._enumValues=f&&f.type==="enum"?f.values:null}evaluateWithoutErrorHandling(l,f,y,L,S,H){return this._evaluator.globals=l,this._evaluator.feature=f,this._evaluator.featureState=y,this._evaluator.canonical=L,this._evaluator.availableImages=S||null,this._evaluator.formattedSection=H,this.expression.evaluate(this._evaluator)}evaluate(l,f,y,L,S,H){this._evaluator.globals=l,this._evaluator.feature=f||null,this._evaluator.featureState=y||null,this._evaluator.canonical=L,this._evaluator.availableImages=S||null,this._evaluator.formattedSection=H||null;try{const I=this.expression.evaluate(this._evaluator);if(I==null||typeof I=="number"&&I!=I)return this._defaultValue;if(this._enumValues&&!(I in this._enumValues))throw new ln(`Expected value to be one of ${Object.keys(this._enumValues).map(B=>JSON.stringify(B)).join(", ")}, but found ${JSON.stringify(I)} instead.`);return I}catch(I){return this._warningHistory[I.message]||(this._warningHistory[I.message]=!0,typeof console<"u"&&console.warn(I.message)),this._defaultValue}}}function cn(u){return Array.isArray(u)&&u.length>0&&typeof u[0]=="string"&&u[0]in Ma}function x2(u,l){const f=new uo(Ma,qn,[],l?function(L){const S={color:En,string:yr,number:we,enum:yr,boolean:dr,formatted:hn,padding:yt,resolvedImage:it,variableAnchorOffsetCollection:at};return L.type==="array"?dt(S[L.value]||ar,L.length):S[L.type]}(l):void 0),y=f.parse(u,void 0,void 0,void 0,l&&l.type==="string"?{typeAnnotation:"coerce"}:void 0);return y?ks(new Wr(y,l)):fo(f.errors)}class To{constructor(l,f){this.kind=l,this._styleExpression=f,this.isStateDependent=l!=="constant"&&!Ro(f.expression)}evaluateWithoutErrorHandling(l,f,y,L,S,H){return this._styleExpression.evaluateWithoutErrorHandling(l,f,y,L,S,H)}evaluate(l,f,y,L,S,H){return this._styleExpression.evaluate(l,f,y,L,S,H)}}class Bs{constructor(l,f,y,L){this.kind=l,this.zoomStops=y,this._styleExpression=f,this.isStateDependent=l!=="camera"&&!Ro(f.expression),this.interpolationType=L}evaluateWithoutErrorHandling(l,f,y,L,S,H){return this._styleExpression.evaluateWithoutErrorHandling(l,f,y,L,S,H)}evaluate(l,f,y,L,S,H){return this._styleExpression.evaluate(l,f,y,L,S,H)}interpolationFactor(l,f,y){return this.interpolationType?O1.interpolationFactor(this.interpolationType,l,f,y):0}}function o6(u,l){const f=x2(u,l);if(f.result==="error")return f;const y=f.value.expression,L=zn(y);if(!L&&!v2(l))return fo([new mn("","data expressions not supported")]);const S=_3(y,["zoom"]);if(!S&&!l0(l))return fo([new mn("","zoom expressions not supported")]);const H=Fs(y);return H||S?H instanceof mn?fo([H]):H instanceof O1&&!n6(l)?fo([new mn("",'"interpolate" expressions cannot be used with this property')]):ks(H?new Bs(L?"camera":"composite",f.value,H.labels,H instanceof O1?H.interpolation:void 0):new To(L?"constant":"source",f.value)):fo([new mn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Ns{constructor(l,f){this._parameters=l,this._specification=f,l1(this,i6(this._parameters,this._specification))}static deserialize(l){return new Ns(l._parameters,l._specification)}static serialize(l){return{_parameters:l._parameters,_specification:l._specification}}}function Fs(u){let l=null;if(u instanceof As)l=Fs(u.result);else if(u instanceof Ms){for(const f of u.args)if(l=Fs(f),l)break}else(u instanceof wa||u instanceof O1)&&u.input instanceof Hr&&u.input.name==="zoom"&&(l=u);return l instanceof mn||u.eachChild(f=>{const y=Fs(f);y instanceof mn?l=y:!l&&y?l=new mn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):l&&y&&l!==y&&(l=new mn("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),l}function x3(u){if(u===!0||u===!1)return!0;if(!Array.isArray(u)||u.length===0)return!1;switch(u[0]){case"has":return u.length>=2&&u[1]!=="$id"&&u[1]!=="$type";case"in":return u.length>=3&&(typeof u[1]!="string"||Array.isArray(u[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return u.length!==3||Array.isArray(u[1])||Array.isArray(u[2]);case"any":case"all":for(const l of u.slice(1))if(!x3(l)&&typeof l!="boolean")return!1;return!0;default:return!0}}const a6={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function jo(u){if(u==null)return{filter:()=>!0,needGeometry:!1};x3(u)||(u=i2(u));const l=x2(u,a6);if(l.result==="error")throw new Error(l.value.map(f=>`${f.key}: ${f.message}`).join(", "));return{filter:(f,y,L)=>l.value.evaluate(f,y,{},L),needGeometry:js(u)}}function zo(u,l){return u<l?-1:u>l?1:0}function js(u){if(!Array.isArray(u))return!1;if(u[0]==="within")return!0;for(let l=1;l<u.length;l++)if(js(u[l]))return!0;return!1}function i2(u){if(!u)return!0;const l=u[0];return u.length<=1?l!=="any":l==="=="?s6(u[1],u[2],"=="):l==="!="?zs(s6(u[1],u[2],"==")):l==="<"||l===">"||l==="<="||l===">="?s6(u[1],u[2],l):l==="any"?(f=u.slice(1),["any"].concat(f.map(i2))):l==="all"?["all"].concat(u.slice(1).map(i2)):l==="none"?["all"].concat(u.slice(1).map(i2).map(zs)):l==="in"?Qo(u[1],u.slice(2)):l==="!in"?zs(Qo(u[1],u.slice(2))):l==="has"?l6(u[1]):l==="!has"?zs(l6(u[1])):l!=="within"||u;var f}function s6(u,l,f){switch(u){case"$type":return[`filter-type-${f}`,l];case"$id":return[`filter-id-${f}`,l];default:return[`filter-${f}`,u,l]}}function Qo(u,l){if(l.length===0)return!1;switch(u){case"$type":return["filter-type-in",["literal",l]];case"$id":return["filter-id-in",["literal",l]];default:return l.length>200&&!l.some(f=>typeof f!=typeof l[0])?["filter-in-large",u,["literal",l.sort(zo)]]:["filter-in-small",u,["literal",l]]}}function l6(u){switch(u){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",u]}}function zs(u){return["!",u]}function Ca(u){const l=typeof u;if(l==="number"||l==="boolean"||l==="string"||u==null)return JSON.stringify(u);if(Array.isArray(u)){let L="[";for(const S of u)L+=`${Ca(S)},`;return`${L}]`}const f=Object.keys(u).sort();let y="{";for(let L=0;L<f.length;L++)y+=`${JSON.stringify(f[L])}:${Ca(u[f[L]])},`;return`${y}}`}function c6(u){let l="";for(const f of Vr)l+=`/${Ca(u[f])}`;return l}function u6(u){const l=u.value;return l?[new fe(u.key,l,"constants have been deprecated as of v8")]:[]}function Cn(u){return u instanceof Number||u instanceof String||u instanceof Boolean?u.valueOf():u}function U2(u){if(Array.isArray(u))return u.map(U2);if(u instanceof Object&&!(u instanceof Number||u instanceof String||u instanceof Boolean)){const l={};for(const f in u)l[f]=U2(u[f]);return l}return Cn(u)}function p1(u){const l=u.key,f=u.value,y=u.valueSpec||{},L=u.objectElementValidators||{},S=u.style,H=u.styleSpec,I=u.validateSpec;let B=[];const G=jr(f);if(G!=="object")return[new fe(l,f,`object expected, ${G} found`)];for(const X in f){const Y=X.split(".")[0],ot=y[Y]||y["*"];let lt;if(L[Y])lt=L[Y];else if(y[Y])lt=I;else if(L["*"])lt=L["*"];else{if(!y["*"]){B.push(new fe(l,f[X],`unknown property "${X}"`));continue}lt=I}B=B.concat(lt({key:(l&&`${l}.`)+X,value:f[X],valueSpec:ot,style:S,styleSpec:H,object:f,objectKey:X,validateSpec:I},f))}for(const X in y)L[X]||y[X].required&&y[X].default===void 0&&f[X]===void 0&&B.push(new fe(l,f,`missing required property "${X}"`));return B}function Us(u){const l=u.value,f=u.valueSpec,y=u.style,L=u.styleSpec,S=u.key,H=u.arrayElementValidator||u.validateSpec;if(jr(l)!=="array")return[new fe(S,l,`array expected, ${jr(l)} found`)];if(f.length&&l.length!==f.length)return[new fe(S,l,`array length ${f.length} expected, length ${l.length} found`)];if(f["min-length"]&&l.length<f["min-length"])return[new fe(S,l,`array length at least ${f["min-length"]} expected, length ${l.length} found`)];let I={type:f.value,values:f.values};L.$version<7&&(I.function=f.function),jr(f.value)==="object"&&(I=f.value);let B=[];for(let G=0;G<l.length;G++)B=B.concat(H({array:l,arrayIndex:G,value:l[G],valueSpec:I,validateSpec:u.validateSpec,style:y,styleSpec:L,key:`${S}[${G}]`}));return B}function $s(u){const l=u.key,f=u.value,y=u.valueSpec;let L=jr(f);return L==="number"&&f!=f&&(L="NaN"),L!=="number"?[new fe(l,f,`number expected, ${L} found`)]:"minimum"in y&&f<y.minimum?[new fe(l,f,`${f} is less than the minimum value ${y.minimum}`)]:"maximum"in y&&f>y.maximum?[new fe(l,f,`${f} is greater than the maximum value ${y.maximum}`)]:[]}function It(u){const l=u.valueSpec,f=Cn(u.value.type);let y,L,S,H={};const I=f!=="categorical"&&u.value.property===void 0,B=!I,G=jr(u.value.stops)==="array"&&jr(u.value.stops[0])==="array"&&jr(u.value.stops[0][0])==="object",X=p1({key:u.key,value:u.value,valueSpec:u.styleSpec.function,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,objectElementValidators:{stops:function(lt){if(f==="identity")return[new fe(lt.key,lt.value,'identity function may not have a "stops" property')];let ht=[];const Tt=lt.value;return ht=ht.concat(Us({key:lt.key,value:Tt,valueSpec:lt.valueSpec,validateSpec:lt.validateSpec,style:lt.style,styleSpec:lt.styleSpec,arrayElementValidator:Y})),jr(Tt)==="array"&&Tt.length===0&&ht.push(new fe(lt.key,Tt,"array must have at least one stop")),ht},default:function(lt){return lt.validateSpec({key:lt.key,value:lt.value,valueSpec:l,validateSpec:lt.validateSpec,style:lt.style,styleSpec:lt.styleSpec})}}});return f==="identity"&&I&&X.push(new fe(u.key,u.value,'missing required property "property"')),f==="identity"||u.value.stops||X.push(new fe(u.key,u.value,'missing required property "stops"')),f==="exponential"&&u.valueSpec.expression&&!n6(u.valueSpec)&&X.push(new fe(u.key,u.value,"exponential functions not supported")),u.styleSpec.$version>=8&&(B&&!v2(u.valueSpec)?X.push(new fe(u.key,u.value,"property functions not supported")):I&&!l0(u.valueSpec)&&X.push(new fe(u.key,u.value,"zoom functions not supported"))),f!=="categorical"&&!G||u.value.property!==void 0||X.push(new fe(u.key,u.value,'"property" property is required')),X;function Y(lt){let ht=[];const Tt=lt.value,bt=lt.key;if(jr(Tt)!=="array")return[new fe(bt,Tt,`array expected, ${jr(Tt)} found`)];if(Tt.length!==2)return[new fe(bt,Tt,`array length 2 expected, length ${Tt.length} found`)];if(G){if(jr(Tt[0])!=="object")return[new fe(bt,Tt,`object expected, ${jr(Tt[0])} found`)];if(Tt[0].zoom===void 0)return[new fe(bt,Tt,"object stop key must have zoom")];if(Tt[0].value===void 0)return[new fe(bt,Tt,"object stop key must have value")];if(S&&S>Cn(Tt[0].zoom))return[new fe(bt,Tt[0].zoom,"stop zoom values must appear in ascending order")];Cn(Tt[0].zoom)!==S&&(S=Cn(Tt[0].zoom),L=void 0,H={}),ht=ht.concat(p1({key:`${bt}[0]`,value:Tt[0],valueSpec:{zoom:{}},validateSpec:lt.validateSpec,style:lt.style,styleSpec:lt.styleSpec,objectElementValidators:{zoom:$s,value:ot}}))}else ht=ht.concat(ot({key:`${bt}[0]`,value:Tt[0],valueSpec:{},validateSpec:lt.validateSpec,style:lt.style,styleSpec:lt.styleSpec},Tt));return cn(U2(Tt[1]))?ht.concat([new fe(`${bt}[1]`,Tt[1],"expressions are not allowed in function stops.")]):ht.concat(lt.validateSpec({key:`${bt}[1]`,value:Tt[1],valueSpec:l,validateSpec:lt.validateSpec,style:lt.style,styleSpec:lt.styleSpec}))}function ot(lt,ht){const Tt=jr(lt.value),bt=Cn(lt.value),wt=lt.value!==null?lt.value:ht;if(y){if(Tt!==y)return[new fe(lt.key,wt,`${Tt} stop domain type must match previous stop domain type ${y}`)]}else y=Tt;if(Tt!=="number"&&Tt!=="string"&&Tt!=="boolean")return[new fe(lt.key,wt,"stop domain value must be a number, string, or boolean")];if(Tt!=="number"&&f!=="categorical"){let Rt=`number expected, ${Tt} found`;return v2(l)&&f===void 0&&(Rt+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new fe(lt.key,wt,Rt)]}return f!=="categorical"||Tt!=="number"||isFinite(bt)&&Math.floor(bt)===bt?f!=="categorical"&&Tt==="number"&&L!==void 0&&bt<L?[new fe(lt.key,wt,"stop domain values must appear in ascending order")]:(L=bt,f==="categorical"&&bt in H?[new fe(lt.key,wt,"stop domain values must be unique")]:(H[bt]=!0,[])):[new fe(lt.key,wt,`integer expected, found ${bt}`)]}}function Yt(u){const l=(u.expressionContext==="property"?o6:x2)(U2(u.value),u.valueSpec);if(l.result==="error")return l.value.map(y=>new fe(`${u.key}${y.key}`,u.value,y.message));const f=l.value.expression||l.value._styleExpression.expression;if(u.expressionContext==="property"&&u.propertyKey==="text-font"&&!f.outputDefined())return[new fe(u.key,u.value,`Invalid data expression for "${u.propertyKey}". Output values must be contained as literals within the expression.`)];if(u.expressionContext==="property"&&u.propertyType==="layout"&&!Ro(f))return[new fe(u.key,u.value,'"feature-state" data expressions are not supported with layout properties.')];if(u.expressionContext==="filter"&&!Ro(f))return[new fe(u.key,u.value,'"feature-state" data expressions are not supported with filters.')];if(u.expressionContext&&u.expressionContext.indexOf("cluster")===0){if(!_3(f,["zoom","feature-state"]))return[new fe(u.key,u.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(u.expressionContext==="cluster-initial"&&!zn(f))return[new fe(u.key,u.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Me(u){const l=u.key,f=u.value,y=u.valueSpec,L=[];return Array.isArray(y.values)?y.values.indexOf(Cn(f))===-1&&L.push(new fe(l,f,`expected one of [${y.values.join(", ")}], ${JSON.stringify(f)} found`)):Object.keys(y.values).indexOf(Cn(f))===-1&&L.push(new fe(l,f,`expected one of [${Object.keys(y.values).join(", ")}], ${JSON.stringify(f)} found`)),L}function nr(u){return x3(U2(u.value))?Yt(l1({},u,{expressionContext:"filter",valueSpec:{value:"boolean"}})):un(u)}function un(u){const l=u.value,f=u.key;if(jr(l)!=="array")return[new fe(f,l,`array expected, ${jr(l)} found`)];const y=u.styleSpec;let L,S=[];if(l.length<1)return[new fe(f,l,"filter array must have at least 1 element")];switch(S=S.concat(Me({key:`${f}[0]`,value:l[0],valueSpec:y.filter_operator,style:u.style,styleSpec:u.styleSpec})),Cn(l[0])){case"<":case"<=":case">":case">=":l.length>=2&&Cn(l[1])==="$type"&&S.push(new fe(f,l,`"$type" cannot be use with operator "${l[0]}"`));case"==":case"!=":l.length!==3&&S.push(new fe(f,l,`filter array for operator "${l[0]}" must have 3 elements`));case"in":case"!in":l.length>=2&&(L=jr(l[1]),L!=="string"&&S.push(new fe(`${f}[1]`,l[1],`string expected, ${L} found`)));for(let H=2;H<l.length;H++)L=jr(l[H]),Cn(l[1])==="$type"?S=S.concat(Me({key:`${f}[${H}]`,value:l[H],valueSpec:y.geometry_type,style:u.style,styleSpec:u.styleSpec})):L!=="string"&&L!=="number"&&L!=="boolean"&&S.push(new fe(`${f}[${H}]`,l[H],`string, number, or boolean expected, ${L} found`));break;case"any":case"all":case"none":for(let H=1;H<l.length;H++)S=S.concat(un({key:`${f}[${H}]`,value:l[H],style:u.style,styleSpec:u.styleSpec}));break;case"has":case"!has":L=jr(l[1]),l.length!==2?S.push(new fe(f,l,`filter array for "${l[0]}" operator must have 2 elements`)):L!=="string"&&S.push(new fe(`${f}[1]`,l[1],`string expected, ${L} found`));break;case"within":L=jr(l[1]),l.length!==2?S.push(new fe(f,l,`filter array for "${l[0]}" operator must have 2 elements`)):L!=="object"&&S.push(new fe(`${f}[1]`,l[1],`object expected, ${L} found`))}return S}function kr(u,l){const f=u.key,y=u.validateSpec,L=u.style,S=u.styleSpec,H=u.value,I=u.objectKey,B=S[`${l}_${u.layerType}`];if(!B)return[];const G=I.match(/^(.*)-transition$/);if(l==="paint"&&G&&B[G[1]]&&B[G[1]].transition)return y({key:f,value:H,valueSpec:S.transition,style:L,styleSpec:S});const X=u.valueSpec||B[I];if(!X)return[new fe(f,H,`unknown property "${I}"`)];let Y;if(jr(H)==="string"&&v2(X)&&!X.tokens&&(Y=/^{([^}]+)}$/.exec(H)))return[new fe(f,H,`"${I}" does not support interpolation syntax
|
|
@@ -1697,4 +1697,4 @@ ${r.vs}`,r}setDataProperty(r,n,i){const o=be(this,Z4).get(+r);o&&(!(n in o)||o[n
|
|
|
1697
1697
|
state: () => new MyClass()
|
|
1698
1698
|
Found in store "${U.$id}".`),x&&o&&r.hydrate&&r.hydrate(U.$state,x),d=!0,Q=!0,U}function _8t(e,t,r){let n,i;const o=typeof t=="function";if(typeof e=="string")n=e,i=o?r:t;else if(i=e,n=e.id,process.env.NODE_ENV!=="production"&&typeof n!="string")throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');function a(s,h){const d=T.hasInjectionContext();if(s=(process.env.NODE_ENV==="test"&&o8&&o8._testing?null:s)||(d?T.inject(p8t,null):null),s&&qd(s),process.env.NODE_ENV!=="production"&&!o8)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
1699
1699
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
1700
|
-
This will fail in production.`);s=o8,s._s.has(n)||(o?_y(n,t,i,s):LO(n,i,s),process.env.NODE_ENV!=="production"&&(a._pinia=s));const Q=s._s.get(n);if(process.env.NODE_ENV!=="production"&&h){const p="__hot:"+n,g=o?_y(p,t,i,s,!0):LO(p,co({},i),s,!0);h._hotUpdate(g),delete s.state.value[p],s._s.delete(p)}if(process.env.NODE_ENV!=="production"&&my){const p=T.getCurrentInstance();if(p&&p.proxy&&!h){const g=p.proxy,_="_pStores"in g?g._pStores:g._pStores={};_[n]=Q}}return Q}return a.$id=n,a}function v8t(e,t){return Array.isArray(t)?t.reduce((r,n)=>(r[n]=function(){return e(this.$pinia)[n]},r),{}):Object.keys(t).reduce((r,n)=>(r[n]=function(){const i=e(this.$pinia),o=t[n];return typeof o=="function"?o.call(this,i):i[o]},r),{})}const x8t=_8t("main",{state:()=>({userProfile:{token:""},marker:"flatmapvuer marker"}),getters:{userToken(e){return e.userProfile.token}},actions:{},persist:{}}),wO=(e,t)=>{const r=[];let n=e.organs?e.organs:e.ftus;const i=n?n.filter((o,a)=>n.findIndex(s=>s.label===o.label)===a):void 0;return i&&i.forEach(o=>{const a={label:o.label,models:o.models,key:`${t}.${o.label}`},s=wO(o,a.key);s.length>0&&(a.children=s),r.push(a)}),r},b8t=function(){return{destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0}},L8t={name:"FlatmapVuer",components:{Button:na,Col:K3,Loading:e$,Radio:Kx,RadioGroup:Yx,Row:qa,Select:B6,MapSvgIcon:M1.MapSvgIcon,MapSvgSpriteColor:M1.MapSvgSpriteColor,Tooltip:FT,TreeControls:Eb,SelectionsGroup:wb,SvgLegends:Mb,ElIconWarningFilled:bv,ElIconArrowDown:F3,ElIconArrowLeft:vv},beforeCreate:function(){this.mapManager=void 0,this.mapImp=void 0,this.setStateRequired=!1},methods:{setFlightPath3D:function(e){this.flightPath3DRadio=e,this.mapImp&&this.mapImp.enable3dPaths(e)},viewLatestMap:function(){let e=this.biologicalSex?this.biologicalSex:void 0;this.entry==="NCBITaxon:9606"&&(e="PATO:0000384");const t={entry:this.entry,biologicalSex:e,viewport:this.mapImp.getState()};this.$emit("view-latest-map",t)},backgroundChangeCallback:function(e){this.currentBackground=e,this.mapImp&&this.mapImp.setBackgroundColour(this.currentBackground,1)},processSystems:function(e){if(this.systems.length=0,e&&e.length>0){const t={label:"All",key:"All",children:[]};e.forEach(r=>{const n={colour:r.colour,enabled:r.enabled,label:r.id,key:r.id},i=wO(r,n.key);i.length>0&&(n.children=i),t.children.push(n)}),this.systems.push(t)}},processTaxon:function(e,t){this.taxonConnectivity.length=0,t.forEach(r=>{Ab(e,r).then(n=>{const i={taxon:r,label:n};this.taxonConnectivity.push(i)})})},toggleDrawer:function(){this.drawerOpen=!this.drawerOpen},setColour:function(e){this.colourRadio=e,this.mapImp&&this.mapImp.setColour({colour:e,outline:this.outlinesRadio})},setOutlines:function(e){this.outlineRadio=e,this.mapImp&&this.mapImp.setColour({colour:this.colourRadio,outline:e})},resetView:function(){this.mapImp&&(this.mapImp.resetMap(),this.$refs.centrelinesSelection&&this.$refs.centrelinesSelection.reset(),this.$refs.skcanSelection&&this.$refs.skcanSelection.reset(),this.$refs.layersSelection&&this.$refs.layersSelection.reset(),this.$refs.systemsSelection&&this.$refs.pathwaysSelection.reset(),this.$refs.pathwaysSelection&&this.$refs.pathwaysSelection.reset())},zoomIn:function(){this.mapImp&&this.mapImp.zoomIn()},zoomOut:function(){this.mapImp&&this.mapImp.zoomOut()},centreLinesSelected:function(e){this.mapImp&&this.mapImp.enableCentrelines(e.value)},sckanSelected:function(e){this.mapImp&&this.mapImp.enableSckanPath(e.key,e.value)},checkAllSCKAN:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableSckanPath(t,e.value))},highlightConnectedPaths:function(e){if(this.mapImp){let r=[...this.mapImp.pathModelNodes(e)].map(i=>this.mapImp.featureProperties(i)),n=[];r.forEach(i=>{this.mapImp.nodePathModels(i.featureId).forEach(o=>{n.push(o)})}),this.mapImp.zoomToFeatures(n,{noZoomIn:!0})}},systemSelected:function(e){this.mapImp&&this.mapImp.enableSystem(e.key,e.value)},checkAllSystems:function(e){this.mapImp&&this.systems[0].children.forEach(t=>this.mapImp.enableSystem(t.label,e))},ftuSelected:function(e){this.searchAndShowResult(e,!0)},layersSelected:function(e){this.mapImp&&this.mapImp.enableLayer(e.key,e.value)},checkAllLayers:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableLayer(t,e.value))},taxonsSelected:function(e){this.mapImp&&this.mapImp.enableConnectivityByTaxonIds(e.key,e.value)},checkAllTaxons:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableConnectivityByTaxonIds(t,e.value))},pathwaysSelected:function(e){this.mapImp&&this.mapImp.enablePath(e.key,e.value)},checkAllPathways:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enablePath(t,e.value))},enablePanZoomEvents:function(e){this.mapImp.enablePanZoomEvents(e)},eventCallback:function(){return(e,t,...r)=>{if(e!=="pan-zoom"){const n=t.label,i=[t.models],o=this.entry,a=this.biologicalSex;let s;t.taxons&&(typeof t.taxons!="object"?s=JSON.parse(t.taxons):s=t.taxons);const h={dataset:t.dataset,biologicalSex:a,taxonomy:o,resource:i,label:n,feature:t,userData:r,eventType:e,provenanceTaxonomy:s};e==="click"?this.viewingMode==="Network Discovery"?this.highlightConnectedPaths([t.models]):this.currentActive=t.models?t.models:"":e==="mouseenter"&&this.viewingMode!=="Network Discovery"&&(this.currentHover=t.models?t.models:""),t&&t.type!=="marker"&&e==="click"&&this.viewingMode!=="Network Discovery"&&this.checkAndCreatePopups(h),this.$emit("resource-selected",h)}else this.$emit("pan-zoom-callback",t)}},checkAndCreatePopups:async function(e){if(this.viewingMode==="Annotation")e.feature&&e.feature.featureId&&e.feature.models?(this.annotationEntry={...e.feature,resourceId:this.serverUUID},this.displayTooltip(e.feature.models)):this.annotation={};else{let t=await this.flatmapQueries.retrieveFlatmapKnowledgeForEvent(e);(t[0]||t[1]||e.feature.hyperlinks&&e.feature.hyperlinks.length>0)&&(this.resourceForTooltip=e.resource[0],e.resourceForTooltip=this.resourceForTooltip,this.createTooltipFromNeuronCuration(e))}},popUpCssHacks:function(){let e=document.querySelector(".flatmap-tooltip-popup");e&&(e.style.display="none"),document.querySelector(".maplibregl-popup-close-button").style.display="block",this.$refs.tooltip.$el.style.display="flex",document.querySelector(".maplibregl-popup-close-button").onclick=()=>{document.querySelector(".flatmap-tooltip-popup").style.display="block"}},closeTooltip:function(){this.$refs.tooltip.$el.style.display="none",document.querySelectorAll(".maplibregl-popup").forEach(e=>{e.style.display="none"})},createTooltipFromNeuronCuration:async function(e){this.tooltipEntry=await this.flatmapQueries.createTooltipData(e),this.displayTooltip(e.resource[0])},showPopup:function(e,t,r){let n=r;this.mapImp&&(n?n.className||(n.className="custom-popup"):n={className:"custom-popup",positionAtLastClick:!0},this.mapImp.showPopup(e,t,n))},showMarkerPopup:function(e,t,r){this.mapImp&&this.mapImp.showMarkerPopup(e,t,r)},closeMinimap:function(){let e=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");this.minimapSmall?(e.classList.add("enlarge"),e.classList.remove("shrink")):(e.classList.add("shrink"),e.classList.remove("enlarge")),this.minimapSmall=!this.minimapSmall},addResizeButtonToMinimap:function(){let e=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");e&&(this.$refs.minimapResize&&this.$refs.minimapResize.$el.parentNode&&this.$refs.minimapResize.$el.parentNode.removeChild(this.$refs.minimapResize.$el),e.appendChild(this.$refs.minimapResize.$el),this.minimapResizeShow=!0)},setHelpMode:function(e){e?(this.inHelp=!0,this.hoverVisibilities.forEach(t=>{t.value=!0}),this.openFlatmapHelpPopup()):(this.inHelp=!1,this.hoverVisibilities.forEach(t=>{t.value=!1}),this.closeFlatmapHelpPopup())},showToolitip:function(e){this.inHelp||(clearTimeout(this.tooltipWait[e]),this.tooltipWait[e]=setTimeout(()=>{this.hoverVisibilities[e].value=!0},500))},hideToolitip:function(e){this.inHelp||(clearTimeout(this.tooltipWait[e]),this.tooltipWait[e]=setTimeout(()=>{this.hoverVisibilities[e].value=!1},500))},displayTooltip:function(e){this.tooltipDisplay=!0,this.disableUI||this.$nextTick(()=>{this.displayPopup(e)})},displayPopup:function(e){this.mapImp.showPopup(this.mapImp.modelFeatureIds(e)[0],this.$refs.tooltip.$el,{className:"flatmapvuer-popover",positionAtLastClick:!0}),this.popUpCssHacks()},openFlatmapHelpPopup:function(){if(this.mapImp){let e=this.mapImp.modelFeatureIds("UBERON:0000948");e&&e.length>0&&this.mapImp.showPopup(e[0],"Click for more information",{anchor:"top",className:"flatmap-popup-popper"})}},closeFlatmapHelpPopup:function(){this.$el.querySelectorAll(".maplibregl-popup-close-button").forEach(e=>{e.click()})},getLabels:function(){let e=[];if(this.mapImp){let t=this.mapImp.annotations;for(let r of t.values())r.label&&e.push(r.label);return Array.from(new Set(e))}},getState:function(){if(this.mapImp){let e={entry:this.entry,viewport:this.mapImp.getState()};const t=this.mapImp.getIdentifier();return this.biologicalSex?e.biologicalSex=this.biologicalSex:t&&t.biologicalSex&&(e.biologicalSex=t.biologicalSex),t&&t.uuid&&(e.uuid=t.uuid),e}},setState:function(e){e&&(this.mapImp&&e.entry&&this.entry==e.entry&&(!e.biologicalSex||e.biologicalSex===this.biologicalSex)?e.viewport&&this.mapImp.setState(e.viewport):this.createFlatmap(e),this.setStateRequired=!1)},restoreMapState:function(e){e&&(e.viewport&&this.mapImp.setState(e.viewport),e.searchTerm&&this.searchAndShowResult(e.searchTerm,!0))},setFlightPathInfo:function(e){(e===1.6||e>1.6)&&(this.displayFlightPathOption=!0,this.setFlightPath3D(!0))},createFlatmap:function(e){if(!this.mapImp&&!this.loading){this.loading=!0;let t=!1;this.displayMinimap&&(t={position:"top-right"});let r={taxon:this.entry};this.uuid&&(r.uuid=this.uuid),e?e.uuid?r={uuid:e.uuid}:e.entry&&(r.taxon=e.entry,e.biologicalSex?r.biologicalSex=e.biologicalSex:r.taxon==="NCBITaxon:9606"&&(r.biologicalSex="PATO:0000384")):this.biologicalSex&&(r.biologicalSex=this.biologicalSex),this.mapManager.loadMap(r,this.$refs.display,this.eventCallback(),{minZoom:this.minZoom,tooltips:this.tooltips,minimap:t}).then(i=>{this.mapImp=i,this.serverUUID=this.mapImp.getIdentifier().uuid;let o=this.mapImp.details.version;this.setFlightPathInfo(o),this.onFlatmapReady(),this._stateToBeSet?this.restoreMapState(this._stateToBeSet):this.restoreMapState(e)})}else e&&(this._stateToBeSet={viewport:e.viewport,searchTerm:e.searchTerm},this.mapImp&&!this.loading&&this.restoreMapState(this._stateToBeSet))},computePathControlsMaximumHeight(){const e=this.$refs.display;if(e){const t=getComputedStyle(e),r=parseInt(t.paddingTop)+parseInt(t.paddingBottom),n=e.clientHeight-r;this.pathwaysMaxHeight=n-170}},mapResize:function(){try{this.computePathControlsMaximumHeight(),this.mapImp&&(this.mapImp.resize(),this.showMinimap(this.displayMinimap),this.mapImp._minimap&&this.mapImp._minimap._miniMap.resize())}catch{console.error("Map resize error")}},onFlatmapReady:function(){this.sensor=new _G(this.$refs.display,this.mapResize),this.mapImp.options&&this.mapImp.options.style==="functional"&&(this.isFC=!0),this.mapImp.setBackgroundOpacity(1),this.backgroundChangeCallback(this.currentBackground),this.pathways=this.mapImp.pathTypes(),this.mapImp.enableCentrelines(!1),this.processSystems(this.mapImp.getSystems()),this.processTaxon(this.flatmapAPI,this.mapImp.taxonIdentifiers),this.addResizeButtonToMinimap(),this.loading=!1,this.computePathControlsMaximumHeight(),this.drawerOpen=!0,this.mapResize(),this.$emit("ready",this)},showMinimap:function(e){this.mapImp&&this.mapImp.showMinimap(e)},showPathwaysDrawer:function(e){this.drawerOpen=e},searchAndShowResult:function(e,t){if(this.mapImp){if(e===void 0||e==="")return this.mapImp.clearSearchResults(),!0;{const r=this.mapImp.search(e);if(r&&r.results&&r.results.length>0){if(this.mapImp.showSearchResults(r),t&&r.results[0].featureId&&r.results[0].text){const n=this.mapImp.annotation(r.results[0].featureId);this.mapImp.showPopup(r.results[0].featureId,n.label,{className:"custom-popup",positionAtLastClick:!1,preserveSelection:!0})}return!0}else this.mapImp.clearSearchResults()}}return!1},searchSuggestions:function(e){return this.mapImp?this.mapImp.search(e):[]}},props:{entry:{type:String,required:!0},uuid:String,biologicalSex:{type:String,default:""},minZoom:{type:Number,default:4},tooltips:{type:Boolean,default:!0},helpMode:{type:Boolean,default:!1},renderAtMounted:{type:Boolean,default:!0},displayMinimap:{type:Boolean,default:!1},displayWarning:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array,default:function(){return[{display:"Open AC Map",key:"AC"},{display:"Open FC Map",key:"FC"},{display:"Open 3D Human Map",key:"3D"}]}},showStarInLegend:{type:Boolean,default:!1},isLegacy:{type:Boolean,default:!1},displayLatestChanges:{type:Boolean,default:!1},state:{type:Object,default:void 0},flatmapAPI:{type:String,default:"https://mapcore-demo.org/current/flatmap/v3/"},sparcAPI:{type:String,default:"https://api.sparc.science/"},disableUI:{type:Boolean,default:!1}},provide(){return{flatmapAPI:this.flatmapAPI,sparcAPI:this.sparcAPI,userApiKey:this.userToken}},data:function(){return{annotationEntry:{},tooltipDisplay:!1,serverUUID:void 0,layers:[],pathways:[],sckanDisplay:[{label:"Display Path with SCKAN",key:"VALID"}],centreLines:[{label:"Display Nerves",key:"centrelines",enabled:!1}],systems:[],taxonConnectivity:[],pathwaysMaxHeight:1e3,hoverVisibilities:[{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1}],yellowstar:gG,isFC:!1,inHelp:!1,currentBackground:"white",availableBackground:["white","lightskyblue","black"],loading:!1,flatmapMarker:pG,tooltipEntry:b8t(),connectivityTooltipVisible:!1,drawerOpen:!1,annotationRadio:!1,flightPath3DRadio:!1,displayFlightPathOption:!1,colourRadio:!0,outlinesRadio:!0,minimapResizeShow:!1,minimapSmall:!1,currentActive:"",currentHover:"",viewingMode:"Exploration",viewingModes:["Annotation","Exploration","Network Discovery"],openMapRef:void 0,backgroundIconRef:void 0}},computed:{...v8t(x8t,["userToken"])},watch:{entry:function(){this.state||this.createFlatmap()},helpMode:function(e,t){e!==t&&this.setHelpMode(val)},state:{handler:function(e,t){e!==t&&(this.mapManager?this.setState(e):this.setStateRequired=!0)},immediate:!0,deep:!0},disableUI:function(e){e&&this.closeTooltip()}},mounted:function(){this.openMapRef=T.shallowRef(this.$refs.openMapRef),this.backgroundIconRef=T.shallowRef(this.$refs.backgroundIconRef),this.tooltipWait=[],this.tooltipWait.length=this.hoverVisibilities.length,this.mapManager=new yO(this.flatmapAPI),this.flatmapQueries=new mG,this.flatmapQueries.initialise(this.flatmapAPI),this.state?this.setStateRequired&&this.setState(this.state):this.renderAtMounted&&this.createFlatmap()}},Po=e=>(T.pushScopeId("data-v-4f5a6743"),e=e(),T.popScopeId(),e),w8t={class:"flatmap-container",ref:"flatmapContainer","element-loading-text":"Loading...","element-loading-background":"rgba(0, 0, 0, 0.3)"},E8t={style:{height:"100%",width:"100%",position:"relative","overflow-y":"none"}},M8t={style:{height:"100%",width:"100%"},ref:"display"},A8t={class:"beta-popovers"},C8t=Po(()=>T.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1)),S8t=Po(()=>T.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1)),H8t=Po(()=>T.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1)),O8t=Po(()=>T.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1)),V8t=Po(()=>T.createElementVNode("span",{class:"warning-text"},"Legacy Map",-1)),D8t={key:1,class:"warning-text"},P8t=Po(()=>T.createElementVNode("span",{class:"warning-text"},"What's new?",-1)),I8t=Po(()=>T.createElementVNode("b",null,"Network discovery mode",-1)),k8t=Po(()=>T.createElementVNode("p",null," You can now view the network of neurons connected to a selected neuron. This mode is located in the settings at the bottom right. Once discovery mode is on, click on a neuron to see its connections. ",-1)),R8t=Po(()=>T.createElementVNode("b",null,"Now can display up to 6 panes",-1)),B8t=Po(()=>T.createElementVNode("p",null," You can now display up to 6 panes in the flatmap. This allows you to compare between different datasets and/or different views of the same dataset. ",-1)),N8t={class:"bottom-right-control"},F8t=Po(()=>T.createElementVNode("div",null,[T.createTextVNode(" Fit to "),T.createElementVNode("br"),T.createTextVNode(" window ")],-1)),j8t=["innerHTML"],z8t=["innerHTML"],U8t=["onClick"];function $8t(e,t,r,n,i,o){const a=T.resolveComponent("map-svg-sprite-color"),s=bv,h=yi,d=Vc,Q=F3,p=T.resolveComponent("map-svg-icon"),g=Mb,_=Eb,x=wb,b=vv,A=na,E=qa,O=K3,V=Oc,k=B6,j=Kx,$=Yx,U=FT,J=Qb,tt=Bc;return T.withDirectives((T.openBlock(),T.createElementBlock("div",w8t,[T.createVNode(a),T.createElementVNode("div",E8t,[T.createElementVNode("div",M8t,null,512),T.withDirectives(T.createElementVNode("div",A8t,[T.createElementVNode("div",null,[T.createVNode(d,{placement:"right","popper-class":"warning-popper flatmap-popper",teleported:!1,visible:e.hoverVisibilities[6].value,ref:"warningPopover"},{reference:T.withCtx(()=>[r.displayWarning?(T.openBlock(),T.createElementBlock("div",{key:0,class:"warning-icon",onMouseover:t[7]||(t[7]=rt=>o.showToolitip(6)),onMouseout:t[8]||(t[8]=rt=>o.hideToolitip(6))},[T.createVNode(h,null,{default:T.withCtx(()=>[T.createVNode(s)]),_:1}),r.isLegacy?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[V8t,T.createElementVNode("div",{class:"latest-map-text",onClick:t[6]||(t[6]=(...rt)=>o.viewLatestMap&&o.viewLatestMap(...rt))}," Click here for the latest map ")],64)):(T.openBlock(),T.createElementBlock("span",D8t,"Beta"))],32)):T.createCommentVNode("",!0)]),default:T.withCtx(()=>[r.isLegacy?(T.openBlock(),T.createElementBlock("p",{key:0,onMouseover:t[0]||(t[0]=rt=>o.showToolitip(6)),onMouseout:t[1]||(t[1]=rt=>o.hideToolitip(6))}," This is a legacy map, you may view the latest map instead. ",32)):e.isFC?(T.openBlock(),T.createElementBlock("p",{key:1,onMouseover:t[2]||(t[2]=rt=>o.showToolitip(6)),onMouseout:t[3]||(t[3]=rt=>o.hideToolitip(6))},[T.createTextVNode(" This map displays the connectivity of individual neurons. Specifically, those which align with (parts of) the neuron populations from the "),C8t,T.createTextVNode(" models available in "),S8t,T.createTextVNode(". ")],32)):(T.openBlock(),T.createElementBlock("p",{key:2,onMouseover:t[4]||(t[4]=rt=>o.showToolitip(6)),onMouseout:t[5]||(t[5]=rt=>o.hideToolitip(6))},[T.createTextVNode(" This map displays the connectivity of neuron populations. Specifically, those from the primarily rat-based "),H8t,T.createTextVNode(" models available in "),O8t,T.createTextVNode(". New connectivity and species specificity will be added as the SPARC program progresses. ")],32))]),_:1},8,["visible"])]),r.displayLatestChanges?(T.openBlock(),T.createBlock(d,{key:0,placement:"right",teleported:!1,trigger:"manual","popper-class":"warning-popper flatmap-popper",visible:e.hoverVisibilities[7].value},{reference:T.withCtx(()=>[r.displayLatestChanges?(T.openBlock(),T.createElementBlock("div",{key:0,class:"latest-changesicon",onMouseover:t[9]||(t[9]=rt=>o.showToolitip(7)),onMouseout:t[10]||(t[10]=rt=>o.hideToolitip(7))},[T.createVNode(h,null,{default:T.withCtx(()=>[T.createVNode(s)]),_:1}),P8t],32)):T.createCommentVNode("",!0)]),default:T.withCtx(()=>[I8t,k8t,R8t,B8t]),_:1},8,["visible"])):T.createCommentVNode("",!0)],512),[[T.vShow,!r.disableUI]]),T.withDirectives(T.createVNode(h,{class:T.normalizeClass(["minimap-resize",{enlarge:e.minimapSmall,shrink:!e.minimapSmall}]),ref:"minimapResize",onClick:o.closeMinimap},{default:T.withCtx(()=>[T.createVNode(Q)]),_:1},8,["class","onClick"]),[[T.vShow,e.minimapResizeShow]]),T.withDirectives(T.createElementVNode("div",N8t,[T.createVNode(d,{content:"Zoom in",placement:"left",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[0].value},{reference:T.withCtx(()=>[T.createVNode(p,{icon:"zoomIn",class:"icon-button zoomIn",onClick:t[11]||(t[11]=rt=>o.zoomIn()),onMouseover:t[12]||(t[12]=rt=>o.showToolitip(0)),onMouseout:t[13]||(t[13]=rt=>o.hideToolitip(0))})]),_:1},8,["visible"]),T.createVNode(d,{content:"Zoom out",placement:"top-end",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper popper-zoomout",visible:e.hoverVisibilities[1].value},{reference:T.withCtx(()=>[T.createVNode(p,{icon:"zoomOut",class:"icon-button zoomOut",onClick:t[14]||(t[14]=rt=>o.zoomOut()),onMouseover:t[15]||(t[15]=rt=>o.showToolitip(1)),onMouseout:t[16]||(t[16]=rt=>o.hideToolitip(1))})]),_:1},8,["visible"]),T.createVNode(d,{content:"Reset",placement:"top",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[2].value},{reference:T.withCtx(()=>[T.createVNode(p,{icon:"fitWindow",class:"icon-button fitWindow",onClick:t[17]||(t[17]=rt=>o.resetView()),onMouseover:t[18]||(t[18]=rt=>o.showToolitip(2)),onMouseout:t[19]||(t[19]=rt=>o.hideToolitip(2))})]),default:T.withCtx(()=>[F8t]),_:1},8,["visible"])],512),[[T.vShow,!r.disableUI]]),T.createVNode(d,{content:"Change pathway visibility",placement:"right",teleported:!1,trigger:"manual","popper-class":"flatmap-popper",visible:e.hoverVisibilities[4].value,ref:"checkBoxPopover"},{reference:T.withCtx(()=>[T.withDirectives(T.createElementVNode("div",{class:T.normalizeClass(["pathway-location",{open:e.drawerOpen,close:!e.drawerOpen}])},[T.withDirectives((T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(["pathway-container",{open:e.drawerOpen,close:!e.drawerOpen}]),style:T.normalizeStyle({"max-height":e.pathwaysMaxHeight+"px"})},[e.isFC?T.createCommentVNode("",!0):(T.openBlock(),T.createBlock(g,{key:0,class:"svg-legends-container"})),T.createVNode(d,{content:"Location of the featured dataset",placement:"right",teleported:!1,trigger:"hover","popper-class":"flatmap-popper popper-bump-right",visible:e.hoverVisibilities[9].value,ref:"featuredMarkerPopover"},{reference:T.withCtx(()=>[T.withDirectives(T.createElementVNode("div",{class:"yellow-star-legend",innerHTML:e.yellowstar},null,8,j8t),[[T.vShow,r.showStarInLegend],[J,void 0,"featuredMarkerPopover"]])]),_:1},8,["visible"]),T.createVNode(d,{content:"Find these markers for data",placement:"right",teleported:!1,trigger:"manual","popper-class":"flatmap-popper popper-bump-right",visible:e.hoverVisibilities[5].value,ref:"markerPopover"},{reference:T.withCtx(()=>[T.withDirectives(T.createElementVNode("div",{class:"flatmap-marker-help",innerHTML:e.flatmapMarker},null,8,z8t),[[T.vShow,e.hoverVisibilities[5].value],[J,void 0,"markerPopover"]])]),_:1},8,["visible"]),e.isFC&&e.systems&&e.systems.length>0?(T.openBlock(),T.createBlock(_,{key:1,active:e.currentActive,hover:e.currentHover,"tree-data":e.systems,ref:"treeControls",onChanged:o.systemSelected,onCheckAll:o.checkAllSystems,onChangeActive:o.ftuSelected},null,8,["active","hover","tree-data","onChanged","onCheckAll","onChangeActive"])):T.createCommentVNode("",!0),!e.isFC&&e.centreLines&&e.centreLines.length>0?(T.openBlock(),T.createBlock(x,{title:"Nerves",labelKey:"label",identifierKey:"key",selections:e.centreLines,onChanged:o.centreLinesSelected,ref:"centrelinesSelection",key:"centrelinesSelection"},null,8,["selections","onChanged"])):T.createCommentVNode("",!0),!e.isFC&&e.taxonConnectivity&&e.taxonConnectivity.length>0?(T.openBlock(),T.createBlock(x,{title:"Observed in",labelKey:"label",identifierKey:"taxon",selections:e.taxonConnectivity,onChanged:o.taxonsSelected,onCheckAll:o.checkAllTaxons,ref:"taxonSelection",key:"taxonSelection"},null,8,["selections","onChanged","onCheckAll"])):T.createCommentVNode("",!0),e.pathways&&e.pathways.length>0?(T.openBlock(),T.createBlock(x,{title:"Pathways",labelKey:"label",identifierKey:"type",colourStyle:"line",selections:e.pathways,onChanged:o.pathwaysSelected,onCheckAll:o.checkAllPathways,ref:"pathwaysSelection",key:"pathwaysSelection"},null,8,["selections","onChanged","onCheckAll"])):T.createCommentVNode("",!0)],6)),[[J,void 0,"checkBoxPopover"]]),T.createElementVNode("div",{onClick:t[20]||(t[20]=(...rt)=>o.toggleDrawer&&o.toggleDrawer(...rt)),class:T.normalizeClass(["drawer-button",{open:e.drawerOpen,close:!e.drawerOpen}])},[T.createVNode(h,null,{default:T.withCtx(()=>[T.createVNode(b)]),_:1})],2)],2),[[T.vShow,!r.disableUI]])]),_:1},8,["visible"]),e.openMapRef?(T.openBlock(),T.createBlock(d,{key:0,ref:"open-map-popover","virtual-ref":e.openMapRef,placement:"top-start",width:"136",teleported:!1,trigger:"click","popper-class":"open-map-popper non-selectable","virtual-triggering":""},{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.openMapOptions,rt=>(T.openBlock(),T.createBlock(E,{key:rt.key},{default:T.withCtx(()=>[T.createVNode(A,{type:"primary",plain:"",onClick:st=>e.$emit("open-map",rt.key)},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(rt.display),1)]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1},8,["virtual-ref"])):T.createCommentVNode("",!0),T.createVNode(d,{ref:"backgroundPopover","virtual-ref":e.backgroundIconRef,placement:"top-start",width:"200",teleported:!1,trigger:"click","popper-class":"background-popper h-auto","virtual-triggering":""},{default:T.withCtx(()=>[T.createElementVNode("div",null,[T.createVNode(E,{class:"backgroundText"},{default:T.withCtx(()=>[T.createTextVNode("Viewing Mode")]),_:1}),T.createVNode(E,{class:"backgroundControl"},{default:T.withCtx(()=>[T.createVNode(k,{teleported:!1,modelValue:e.viewingMode,"onUpdate:modelValue":t[21]||(t[21]=rt=>e.viewingMode=rt),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown"},{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.viewingModes,(rt,st)=>(T.openBlock(),T.createBlock(V,{key:rt+st,label:rt,value:rt},{default:T.withCtx(()=>[T.createVNode(E,null,{default:T.withCtx(()=>[T.createVNode(O,{span:12},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(rt),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.displayFlightPathOption?(T.openBlock(),T.createBlock(E,{key:0,class:"backgroundSpacer"})):T.createCommentVNode("",!0),e.displayFlightPathOption?(T.openBlock(),T.createBlock(E,{key:1,class:"backgroundText"},{default:T.withCtx(()=>[T.createTextVNode("Flight path display")]),_:1})):T.createCommentVNode("",!0),e.displayFlightPathOption?(T.openBlock(),T.createBlock(E,{key:2,class:"backgroundControl"},{default:T.withCtx(()=>[T.createVNode($,{modelValue:e.flightPath3DRadio,"onUpdate:modelValue":t[22]||(t[22]=rt=>e.flightPath3DRadio=rt),class:"flatmap-radio",onChange:o.setFlightPath3D},{default:T.withCtx(()=>[T.createVNode(j,{label:!1},{default:T.withCtx(()=>[T.createTextVNode("2D")]),_:1}),T.createVNode(j,{label:!0},{default:T.withCtx(()=>[T.createTextVNode("3D")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1})):T.createCommentVNode("",!0),T.createVNode(E,{class:"backgroundSpacer"}),T.createVNode(E,{class:"backgroundText"},{default:T.withCtx(()=>[T.createTextVNode("Organs display")]),_:1}),T.createVNode(E,{class:"backgroundControl"},{default:T.withCtx(()=>[T.createVNode($,{modelValue:e.colourRadio,"onUpdate:modelValue":t[23]||(t[23]=rt=>e.colourRadio=rt),class:"flatmap-radio",onChange:o.setColour},{default:T.withCtx(()=>[T.createVNode(j,{label:!0},{default:T.withCtx(()=>[T.createTextVNode("Colour")]),_:1}),T.createVNode(j,{label:!1},{default:T.withCtx(()=>[T.createTextVNode("Greyscale")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),T.createVNode(E,{class:"backgroundSpacer"}),T.createVNode(E,{class:"backgroundText"},{default:T.withCtx(()=>[T.createTextVNode("Outlines display")]),_:1}),T.createVNode(E,{class:"backgroundControl"},{default:T.withCtx(()=>[T.createVNode($,{modelValue:e.outlinesRadio,"onUpdate:modelValue":t[24]||(t[24]=rt=>e.outlinesRadio=rt),class:"flatmap-radio",onChange:o.setOutlines},{default:T.withCtx(()=>[T.createVNode(j,{label:!0},{default:T.withCtx(()=>[T.createTextVNode("Show")]),_:1}),T.createVNode(j,{label:!1},{default:T.withCtx(()=>[T.createTextVNode("Hide")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),T.createVNode(E,{class:"backgroundSpacer"}),T.createVNode(E,{class:"backgroundText"},{default:T.withCtx(()=>[T.createTextVNode("Change background")]),_:1}),T.createVNode(E,{class:"backgroundControl"},{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.availableBackground,rt=>(T.openBlock(),T.createElementBlock("div",{key:rt,class:T.normalizeClass(["backgroundChoice",rt,rt==e.currentBackground?"active":""]),onClick:st=>o.backgroundChangeCallback(rt)},null,10,U8t))),128))]),_:1})])]),_:1},8,["virtual-ref"]),T.withDirectives(T.createElementVNode("div",{class:T.normalizeClass(["settings-group",{open:e.drawerOpen,close:!e.drawerOpen}])},[T.createVNode(E,null,{default:T.withCtx(()=>[T.createVNode(d,{visible:e.hoverVisibilities[8].value,content:"Open new map",placement:"right",teleported:!1,"popper-class":"flatmap-popper"},{reference:T.withCtx(()=>[r.enableOpenMapUI&&r.openMapOptions.length>0?(T.openBlock(),T.createBlock(p,{key:0,ref:"openMapRef",icon:"openMap",class:"icon-button open-map-button",onMouseover:t[25]||(t[25]=rt=>o.showToolitip(8)),onMouseout:t[26]||(t[26]=rt=>o.hideToolitip(8))},null,512)):T.createCommentVNode("",!0)]),_:1},8,["visible"])]),_:1}),T.createVNode(E,null,{default:T.withCtx(()=>[T.createVNode(d,{content:"Change settings",placement:"right",visible:e.hoverVisibilities[3].value,teleported:!1,trigger:"manual","popper-class":"flatmap-popper"},{reference:T.withCtx(()=>[T.createVNode(p,{ref:"backgroundIconRef",icon:"changeBckgd",class:"icon-button",onMouseover:t[27]||(t[27]=rt=>o.showToolitip(3)),onMouseout:t[28]||(t[28]=rt=>o.hideToolitip(3))},null,512)]),_:1},8,["visible"])]),_:1})],2),[[T.vShow,!r.disableUI]]),T.withDirectives(T.createVNode(U,{ref:"tooltip",class:"tooltip",annotationEntry:e.annotationEntry,entry:e.tooltipEntry,annotationDisplay:e.viewingMode==="Annotation"},null,8,["annotationEntry","entry","annotationDisplay"]),[[T.vShow,e.tooltipDisplay]])])])),[[tt,e.loading]])}const vy=Wa(L8t,[["render",$8t],["__scopeId","data-v-4f5a6743"]]),EO={"NCBITaxon:10114":"01fedbf9-d783-509c-a10c-827941ab13da","NCBITaxon:9823":"a336ac04-24db-561f-a25f-1c994fe17410","NCBITaxon:9606":"42ed6323-f645-5fbe-bada-9581819cf689","NCBITaxon:10090":"25285fab-48a0-5620-a6a0-f9a0374837d5","NCBITaxon:9685":"73060497-46a6-52bf-b975-cac511c127cb"},G8t={name:"MultiFlatmapVuer",components:{Col:K3,Row:qa,Option:Oc,Select:B6,Popover:Vc,FlatmapVuer:vy},beforeMount(){this._resolveList=[],this._initialised=!1},mounted:function(){this.initialise(),Nc.on("onActionClick",e=>{this.resourceSelected(e)})},methods:{initialise:function(){return new Promise(e=>{this.requireInitialisation?(this.requireInitialisation=!1,fetch(this.flatmapAPI).then(t=>t.json()).then(t=>{Object.keys(this.availableSpecies).forEach(n=>{const i=this.availableSpecies[n].uuid;if(i&&t.map(o=>o.uuid).indexOf(i)>0)this.speciesList[n]=T.reactive(this.availableSpecies[n]);else for(let o=0;o<t.length;o++)if(this.availableSpecies[n].taxo===t[o].taxon)if(this.availableSpecies[n].biologicalSex){if(t[o].biologicalSex&&t[o].biologicalSex===this.availableSpecies[n].biologicalSex){this.speciesList[n]=T.reactive(this.availableSpecies[n]);break}}else{this.speciesList[n]=T.reactive(this.availableSpecies[n]);break}});let r=this.initial;if(this.state){const n=this.state.state;(!n||!n.uuid&&!n.entry)&&this.state.species?r=this.state.species:r=void 0}r&&(r&&this.speciesList[r]!==void 0?this.activeSpecies=r:this.activeSpecies=Object.keys(this.speciesList)[0],this.setSpecies(this.activeSpecies,this.state?this.state.state:void 0,5)),this._initialised=!0,e(),this._resolveList.forEach(n=>{n()})})):this._initialised?e():this._resolveList.push(e)})},resourceSelected:function(e){this.$emit("resource-selected",e)},FlatmapReady:function(e){this.$emit("ready",e)},getCurrentFlatmap:function(){return this.$refs[this.activeSpecies][0]},panZoomCallback:function(e){this.$emit("pan-zoom-callback",e)},showPopup:function(e,t,r){this.getCurrentFlatmap().showPopup(e,t,r)},showMarkerPopup:function(e,t,r){this.getCurrentFlatmap().showMarkerPopup(e,t,r)},setSpecies:function(e,t,r){if(this.$refs&&e in this.$refs)this.activeSpecies=e,this.$refs[this.activeSpecies][0].createFlatmap(t),this.$emit("flatmapChanged",this.activeSpecies);else if(r){const n=r-1;n>=0&&this.$nextTick(()=>{this.setSpecies(e,t,n)})}},viewLatestMap:function(e){const t=Object.keys(this.speciesList);for(let r=0;r<t.length;r++){const n=this.speciesList[t[r]];if(!n.isLegacy&&n.taxo===e.entry&&n.biologicalSex===e.biologicalSex){this.setSpecies(t[r],e,0);return}}},createLegacyEntry:function(e,t,r){if(r&&t){let n="Legacy";return e.species&&(e.species.slice(0,6)==="Legacy"?n=e.species:n=n+` ${e.species}`),this.speciesList[n]=T.reactive({taxo:t,isLegacy:!0,displayWarning:!0}),{species:n,state:{entry:t,uuid:r,viewport:e.state.viewport,searchTerm:e.state.searchTerm}}}},updateState:function(e){return new Promise(t=>{if(e&&e.state){const r=e.state;if(r.uuid){if(r.entry)return new Promise(()=>{const n=new yO(this.flatmapAPI),i={taxon:r.entry};r.biologicalSex&&(i.biologicalSex=r.biologicalSex),n.findMap_(i).then(o=>{if(o.uuid!==r.uuid)return this.createLegacyEntry(e,r.entry,r.uuid)}).then(o=>{t(o||e)}).catch(()=>{t(e)})})}else if(r.entry){const n=r.entry in EO?EO[r.entry]:void 0,i=this.createLegacyEntry(e,r.entry,n);t(i||e)}}t(e)})},getState:function(){let e={species:this.activeSpecies,state:void 0},t=this.getCurrentFlatmap();return e.state=t.getState(),e},setState:function(e){e&&this.updateState(e).then(t=>{this.initialise().then(()=>{t.species&&t.species!==this.activeSpecies?this.setSpecies(t.species,t.state,5):t.state&&this.getCurrentFlatmap().setState(t.state)})})}},props:{initial:{type:String,default:""},minZoom:{type:Number,default:4},renderAtMounted:{type:Boolean,default:!1},helpMode:{type:Boolean,default:!1},displayMinimap:{type:Boolean,default:!1},showStarInLegend:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array},availableSpecies:{type:Object,default:function(){return{"Human Female":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000383",iconClass:"mapicon-icon_human",displayWarning:!0},"Human Male":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000384",iconClass:"mapicon-icon_human",displayWarning:!0},Rat:{taxo:"NCBITaxon:10114",iconClass:"mapicon-icon_rat",displayLatestChanges:!0},Mouse:{taxo:"NCBITaxon:10090",iconClass:"mapicon-icon_mouse",displayWarning:!0},Pig:{taxo:"NCBITaxon:9823",iconClass:"mapicon-icon_pig",displayWarning:!0},Cat:{taxo:"NCBITaxon:9685",iconClass:"mapicon-icon_cat",displayWarning:!0}}}},state:{type:Object,default:void 0},flatmapAPI:{type:String,default:"https://mapcore-demo.org/current/flatmap/v3/"},sparcAPI:{type:String,default:"https://api.sparc.science/"},disableUI:{type:Boolean,default:!1}},data:function(){return{activeSpecies:void 0,speciesList:{},requireInitialisation:!0}},watch:{state:{handler:function(e){this.setState(e)},immediate:!0,deep:!0}}},Z8t=e=>(T.pushScopeId("data-v-5550e1f2"),e=e(),T.popScopeId(),e),q8t={class:"multi-container",ref:"multiContainer"},W8t={key:0,style:{position:"absolute","z-index":"10"}},X8t=Z8t(()=>T.createElementVNode("div",{class:"species-display-text"},"Species",-1)),K8t={class:"select-box-icon"};function Y8t(e,t,r,n,i,o){const a=Oc,s=B6,h=Vc,d=vy;return T.openBlock(),T.createElementBlock("div",q8t,[r.disableUI?T.createCommentVNode("",!0):(T.openBlock(),T.createElementBlock("div",W8t,[X8t,T.createVNode(h,{content:"Select a species",placement:"right",trigger:"manual","popper-class":"flatmap-popper right-popper",visible:r.helpMode,teleported:!1,ref:"selectPopover"},{reference:T.withCtx(()=>[T.createVNode(s,{id:"flatmap-select",teleported:!1,modelValue:e.activeSpecies,"onUpdate:modelValue":t[0]||(t[0]=Q=>e.activeSpecies=Q),placeholder:"Select",class:"select-box","popper-class":"flatmap-dropdown",onChange:o.setSpecies},{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.speciesList,(Q,p)=>(T.openBlock(),T.createBlock(a,{key:p,label:p,value:p},{default:T.withCtx(()=>[T.createElementVNode("span",K8t,[T.createElementVNode("i",{class:T.normalizeClass(Q.iconClass)},null,2)]),T.createTextVNode(" "+T.toDisplayString(p),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible"])])),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.speciesList,(Q,p)=>T.withDirectives((T.openBlock(),T.createBlock(d,{key:p,entry:Q.taxo,uuid:Q.uuid,biologicalSex:Q.biologicalSex,displayWarning:Q.displayWarning,displayLatestChanges:Q.displayLatestChanges,isLegacy:Q.isLegacy,ref_for:!0,ref:p,enableOpenMapUI:r.enableOpenMapUI,openMapOptions:r.openMapOptions,disableUI:r.disableUI,onViewLatestMap:o.viewLatestMap,onResourceSelected:o.resourceSelected,onReady:o.FlatmapReady,onPanZoomCallback:o.panZoomCallback,onOpenMap:t[1]||(t[1]=g=>e.$emit("open-map",g)),minZoom:r.minZoom,helpMode:r.helpMode,renderAtMounted:r.renderAtMounted,displayMinimap:r.displayMinimap,showStarInLegend:r.showStarInLegend,style:{height:"100%"},flatmapAPI:r.flatmapAPI,sparcAPI:r.sparcAPI},null,8,["entry","uuid","biologicalSex","displayWarning","displayLatestChanges","isLegacy","enableOpenMapUI","openMapOptions","disableUI","onViewLatestMap","onResourceSelected","onReady","onPanZoomCallback","minZoom","helpMode","renderAtMounted","displayMinimap","showStarInLegend","flatmapAPI","sparcAPI"])),[[T.vShow,e.activeSpecies==p]])),128))],512)}const J8t=Wa(G8t,[["render",Y8t],["__scopeId","data-v-5550e1f2"]]);Fr.FlatmapVuer=vy,Fr.MultiFlatmapVuer=J8t,Fr.Tooltip=FT,Object.defineProperty(Fr,Symbol.toStringTag,{value:"Module"})});
|
|
1700
|
+
This will fail in production.`);s=o8,s._s.has(n)||(o?_y(n,t,i,s):LO(n,i,s),process.env.NODE_ENV!=="production"&&(a._pinia=s));const Q=s._s.get(n);if(process.env.NODE_ENV!=="production"&&h){const p="__hot:"+n,g=o?_y(p,t,i,s,!0):LO(p,co({},i),s,!0);h._hotUpdate(g),delete s.state.value[p],s._s.delete(p)}if(process.env.NODE_ENV!=="production"&&my){const p=T.getCurrentInstance();if(p&&p.proxy&&!h){const g=p.proxy,_="_pStores"in g?g._pStores:g._pStores={};_[n]=Q}}return Q}return a.$id=n,a}function v8t(e,t){return Array.isArray(t)?t.reduce((r,n)=>(r[n]=function(){return e(this.$pinia)[n]},r),{}):Object.keys(t).reduce((r,n)=>(r[n]=function(){const i=e(this.$pinia),o=t[n];return typeof o=="function"?o.call(this,i):i[o]},r),{})}const x8t=_8t("main",{state:()=>({userProfile:{token:""}}),getters:{userToken(e){return e.userProfile.token}}}),wO=(e,t)=>{const r=[];let n=e.organs?e.organs:e.ftus;const i=n?n.filter((o,a)=>n.findIndex(s=>s.label===o.label)===a):void 0;return i&&i.forEach(o=>{const a={label:o.label,models:o.models,key:`${t}.${o.label}`},s=wO(o,a.key);s.length>0&&(a.children=s),r.push(a)}),r},b8t=function(){return{destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0}},L8t={name:"FlatmapVuer",components:{Button:na,Col:K3,Loading:e$,Radio:Kx,RadioGroup:Yx,Row:qa,Select:B6,MapSvgIcon:M1.MapSvgIcon,MapSvgSpriteColor:M1.MapSvgSpriteColor,Tooltip:FT,TreeControls:Eb,SelectionsGroup:wb,SvgLegends:Mb,ElIconWarningFilled:bv,ElIconArrowDown:F3,ElIconArrowLeft:vv},beforeCreate:function(){this.mapManager=void 0,this.mapImp=void 0,this.setStateRequired=!1},methods:{setFlightPath3D:function(e){this.flightPath3DRadio=e,this.mapImp&&this.mapImp.enable3dPaths(e)},viewLatestMap:function(){let e=this.biologicalSex?this.biologicalSex:void 0;this.entry==="NCBITaxon:9606"&&(e="PATO:0000384");const t={entry:this.entry,biologicalSex:e,viewport:this.mapImp.getState()};this.$emit("view-latest-map",t)},backgroundChangeCallback:function(e){this.currentBackground=e,this.mapImp&&this.mapImp.setBackgroundColour(this.currentBackground,1)},processSystems:function(e){if(this.systems.length=0,e&&e.length>0){const t={label:"All",key:"All",children:[]};e.forEach(r=>{const n={colour:r.colour,enabled:r.enabled,label:r.id,key:r.id},i=wO(r,n.key);i.length>0&&(n.children=i),t.children.push(n)}),this.systems.push(t)}},processTaxon:function(e,t){this.taxonConnectivity.length=0,t.forEach(r=>{Ab(e,r).then(n=>{const i={taxon:r,label:n};this.taxonConnectivity.push(i)})})},toggleDrawer:function(){this.drawerOpen=!this.drawerOpen},setColour:function(e){this.colourRadio=e,this.mapImp&&this.mapImp.setColour({colour:e,outline:this.outlinesRadio})},setOutlines:function(e){this.outlineRadio=e,this.mapImp&&this.mapImp.setColour({colour:this.colourRadio,outline:e})},resetView:function(){this.mapImp&&(this.mapImp.resetMap(),this.$refs.centrelinesSelection&&this.$refs.centrelinesSelection.reset(),this.$refs.skcanSelection&&this.$refs.skcanSelection.reset(),this.$refs.layersSelection&&this.$refs.layersSelection.reset(),this.$refs.systemsSelection&&this.$refs.pathwaysSelection.reset(),this.$refs.pathwaysSelection&&this.$refs.pathwaysSelection.reset())},zoomIn:function(){this.mapImp&&this.mapImp.zoomIn()},zoomOut:function(){this.mapImp&&this.mapImp.zoomOut()},centreLinesSelected:function(e){this.mapImp&&this.mapImp.enableCentrelines(e.value)},sckanSelected:function(e){this.mapImp&&this.mapImp.enableSckanPath(e.key,e.value)},checkAllSCKAN:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableSckanPath(t,e.value))},highlightConnectedPaths:function(e){if(this.mapImp){let r=[...this.mapImp.pathModelNodes(e)].map(i=>this.mapImp.featureProperties(i)),n=[];r.forEach(i=>{this.mapImp.nodePathModels(i.featureId).forEach(o=>{n.push(o)})}),this.mapImp.zoomToFeatures(n,{noZoomIn:!0})}},systemSelected:function(e){this.mapImp&&this.mapImp.enableSystem(e.key,e.value)},checkAllSystems:function(e){this.mapImp&&this.systems[0].children.forEach(t=>this.mapImp.enableSystem(t.label,e))},ftuSelected:function(e){this.searchAndShowResult(e,!0)},layersSelected:function(e){this.mapImp&&this.mapImp.enableLayer(e.key,e.value)},checkAllLayers:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableLayer(t,e.value))},taxonsSelected:function(e){this.mapImp&&this.mapImp.enableConnectivityByTaxonIds(e.key,e.value)},checkAllTaxons:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableConnectivityByTaxonIds(t,e.value))},pathwaysSelected:function(e){this.mapImp&&this.mapImp.enablePath(e.key,e.value)},checkAllPathways:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enablePath(t,e.value))},enablePanZoomEvents:function(e){this.mapImp.enablePanZoomEvents(e)},eventCallback:function(){return(e,t,...r)=>{if(e!=="pan-zoom"){const n=t.label,i=[t.models],o=this.entry,a=this.biologicalSex;let s;t.taxons&&(typeof t.taxons!="object"?s=JSON.parse(t.taxons):s=t.taxons);const h={dataset:t.dataset,biologicalSex:a,taxonomy:o,resource:i,label:n,feature:t,userData:r,eventType:e,provenanceTaxonomy:s};e==="click"?this.viewingMode==="Network Discovery"?this.highlightConnectedPaths([t.models]):this.currentActive=t.models?t.models:"":e==="mouseenter"&&this.viewingMode!=="Network Discovery"&&(this.currentHover=t.models?t.models:""),t&&t.type!=="marker"&&e==="click"&&this.viewingMode!=="Network Discovery"&&this.checkAndCreatePopups(h),this.$emit("resource-selected",h)}else this.$emit("pan-zoom-callback",t)}},checkAndCreatePopups:async function(e){if(this.viewingMode==="Annotation")e.feature&&e.feature.featureId&&e.feature.models?(this.annotationEntry={...e.feature,resourceId:this.serverUUID},this.displayTooltip(e.feature.models)):this.annotation={};else{let t=await this.flatmapQueries.retrieveFlatmapKnowledgeForEvent(e);(t[0]||t[1]||e.feature.hyperlinks&&e.feature.hyperlinks.length>0)&&(this.resourceForTooltip=e.resource[0],e.resourceForTooltip=this.resourceForTooltip,this.createTooltipFromNeuronCuration(e))}},popUpCssHacks:function(){let e=document.querySelector(".flatmap-tooltip-popup");e&&(e.style.display="none"),document.querySelector(".maplibregl-popup-close-button").style.display="block",this.$refs.tooltip.$el.style.display="flex",document.querySelector(".maplibregl-popup-close-button").onclick=()=>{document.querySelector(".flatmap-tooltip-popup").style.display="block"}},closeTooltip:function(){this.$refs.tooltip.$el.style.display="none",document.querySelectorAll(".maplibregl-popup").forEach(e=>{e.style.display="none"})},createTooltipFromNeuronCuration:async function(e){this.tooltipEntry=await this.flatmapQueries.createTooltipData(e),this.displayTooltip(e.resource[0])},showPopup:function(e,t,r){let n=r;this.mapImp&&(n?n.className||(n.className="custom-popup"):n={className:"custom-popup",positionAtLastClick:!0},this.mapImp.showPopup(e,t,n))},showMarkerPopup:function(e,t,r){this.mapImp&&this.mapImp.showMarkerPopup(e,t,r)},closeMinimap:function(){let e=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");this.minimapSmall?(e.classList.add("enlarge"),e.classList.remove("shrink")):(e.classList.add("shrink"),e.classList.remove("enlarge")),this.minimapSmall=!this.minimapSmall},addResizeButtonToMinimap:function(){let e=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");e&&(this.$refs.minimapResize&&this.$refs.minimapResize.$el.parentNode&&this.$refs.minimapResize.$el.parentNode.removeChild(this.$refs.minimapResize.$el),e.appendChild(this.$refs.minimapResize.$el),this.minimapResizeShow=!0)},setHelpMode:function(e){e?(this.inHelp=!0,this.hoverVisibilities.forEach(t=>{t.value=!0}),this.openFlatmapHelpPopup()):(this.inHelp=!1,this.hoverVisibilities.forEach(t=>{t.value=!1}),this.closeFlatmapHelpPopup())},showToolitip:function(e){this.inHelp||(clearTimeout(this.tooltipWait[e]),this.tooltipWait[e]=setTimeout(()=>{this.hoverVisibilities[e].value=!0},500))},hideToolitip:function(e){this.inHelp||(clearTimeout(this.tooltipWait[e]),this.tooltipWait[e]=setTimeout(()=>{this.hoverVisibilities[e].value=!1},500))},displayTooltip:function(e){this.tooltipDisplay=!0,this.disableUI||this.$nextTick(()=>{this.displayPopup(e)})},displayPopup:function(e){this.mapImp.showPopup(this.mapImp.modelFeatureIds(e)[0],this.$refs.tooltip.$el,{className:"flatmapvuer-popover",positionAtLastClick:!0}),this.popUpCssHacks()},openFlatmapHelpPopup:function(){if(this.mapImp){let e=this.mapImp.modelFeatureIds("UBERON:0000948");e&&e.length>0&&this.mapImp.showPopup(e[0],"Click for more information",{anchor:"top",className:"flatmap-popup-popper"})}},closeFlatmapHelpPopup:function(){this.$el.querySelectorAll(".maplibregl-popup-close-button").forEach(e=>{e.click()})},getLabels:function(){let e=[];if(this.mapImp){let t=this.mapImp.annotations;for(let r of t.values())r.label&&e.push(r.label);return Array.from(new Set(e))}},getState:function(){if(this.mapImp){let e={entry:this.entry,viewport:this.mapImp.getState()};const t=this.mapImp.getIdentifier();return this.biologicalSex?e.biologicalSex=this.biologicalSex:t&&t.biologicalSex&&(e.biologicalSex=t.biologicalSex),t&&t.uuid&&(e.uuid=t.uuid),e}},setState:function(e){e&&(this.mapImp&&e.entry&&this.entry==e.entry&&(!e.biologicalSex||e.biologicalSex===this.biologicalSex)?e.viewport&&this.mapImp.setState(e.viewport):this.createFlatmap(e),this.setStateRequired=!1)},restoreMapState:function(e){e&&(e.viewport&&this.mapImp.setState(e.viewport),e.searchTerm&&this.searchAndShowResult(e.searchTerm,!0))},setFlightPathInfo:function(e){(e===1.6||e>1.6)&&(this.displayFlightPathOption=!0,this.setFlightPath3D(!0))},createFlatmap:function(e){if(!this.mapImp&&!this.loading){this.loading=!0;let t=!1;this.displayMinimap&&(t={position:"top-right"});let r={taxon:this.entry};this.uuid&&(r.uuid=this.uuid),e?e.uuid?r={uuid:e.uuid}:e.entry&&(r.taxon=e.entry,e.biologicalSex?r.biologicalSex=e.biologicalSex:r.taxon==="NCBITaxon:9606"&&(r.biologicalSex="PATO:0000384")):this.biologicalSex&&(r.biologicalSex=this.biologicalSex),this.mapManager.loadMap(r,this.$refs.display,this.eventCallback(),{minZoom:this.minZoom,tooltips:this.tooltips,minimap:t}).then(i=>{this.mapImp=i,this.serverUUID=this.mapImp.getIdentifier().uuid;let o=this.mapImp.details.version;this.setFlightPathInfo(o),this.onFlatmapReady(),this._stateToBeSet?this.restoreMapState(this._stateToBeSet):this.restoreMapState(e)})}else e&&(this._stateToBeSet={viewport:e.viewport,searchTerm:e.searchTerm},this.mapImp&&!this.loading&&this.restoreMapState(this._stateToBeSet))},computePathControlsMaximumHeight(){const e=this.$refs.display;if(e){const t=getComputedStyle(e),r=parseInt(t.paddingTop)+parseInt(t.paddingBottom),n=e.clientHeight-r;this.pathwaysMaxHeight=n-170}},mapResize:function(){try{this.computePathControlsMaximumHeight(),this.mapImp&&(this.mapImp.resize(),this.showMinimap(this.displayMinimap),this.mapImp._minimap&&this.mapImp._minimap._miniMap.resize())}catch{console.error("Map resize error")}},onFlatmapReady:function(){this.sensor=new _G(this.$refs.display,this.mapResize),this.mapImp.options&&this.mapImp.options.style==="functional"&&(this.isFC=!0),this.mapImp.setBackgroundOpacity(1),this.backgroundChangeCallback(this.currentBackground),this.pathways=this.mapImp.pathTypes(),this.mapImp.enableCentrelines(!1),this.processSystems(this.mapImp.getSystems()),this.processTaxon(this.flatmapAPI,this.mapImp.taxonIdentifiers),this.addResizeButtonToMinimap(),this.loading=!1,this.computePathControlsMaximumHeight(),this.drawerOpen=!0,this.mapResize(),this.$emit("ready",this)},showMinimap:function(e){this.mapImp&&this.mapImp.showMinimap(e)},showPathwaysDrawer:function(e){this.drawerOpen=e},searchAndShowResult:function(e,t){if(this.mapImp){if(e===void 0||e==="")return this.mapImp.clearSearchResults(),!0;{const r=this.mapImp.search(e);if(r&&r.results&&r.results.length>0){if(this.mapImp.showSearchResults(r),t&&r.results[0].featureId&&r.results[0].text){const n=this.mapImp.annotation(r.results[0].featureId);this.mapImp.showPopup(r.results[0].featureId,n.label,{className:"custom-popup",positionAtLastClick:!1,preserveSelection:!0})}return!0}else this.mapImp.clearSearchResults()}}return!1},searchSuggestions:function(e){return this.mapImp?this.mapImp.search(e):[]}},props:{entry:{type:String,required:!0},uuid:String,biologicalSex:{type:String,default:""},minZoom:{type:Number,default:4},tooltips:{type:Boolean,default:!0},helpMode:{type:Boolean,default:!1},renderAtMounted:{type:Boolean,default:!0},displayMinimap:{type:Boolean,default:!1},displayWarning:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array,default:function(){return[{display:"Open AC Map",key:"AC"},{display:"Open FC Map",key:"FC"},{display:"Open 3D Human Map",key:"3D"}]}},showStarInLegend:{type:Boolean,default:!1},isLegacy:{type:Boolean,default:!1},displayLatestChanges:{type:Boolean,default:!1},state:{type:Object,default:void 0},flatmapAPI:{type:String,default:"https://mapcore-demo.org/current/flatmap/v3/"},sparcAPI:{type:String,default:"https://api.sparc.science/"},disableUI:{type:Boolean,default:!1}},provide(){return{flatmapAPI:this.flatmapAPI,sparcAPI:this.sparcAPI,userApiKey:this.userToken}},data:function(){return{annotationEntry:{},tooltipDisplay:!1,serverUUID:void 0,layers:[],pathways:[],sckanDisplay:[{label:"Display Path with SCKAN",key:"VALID"}],centreLines:[{label:"Display Nerves",key:"centrelines",enabled:!1}],systems:[],taxonConnectivity:[],pathwaysMaxHeight:1e3,hoverVisibilities:[{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1}],yellowstar:gG,isFC:!1,inHelp:!1,currentBackground:"white",availableBackground:["white","lightskyblue","black"],loading:!1,flatmapMarker:pG,tooltipEntry:b8t(),connectivityTooltipVisible:!1,drawerOpen:!1,annotationRadio:!1,flightPath3DRadio:!1,displayFlightPathOption:!1,colourRadio:!0,outlinesRadio:!0,minimapResizeShow:!1,minimapSmall:!1,currentActive:"",currentHover:"",viewingMode:"Exploration",viewingModes:["Annotation","Exploration","Network Discovery"],openMapRef:void 0,backgroundIconRef:void 0}},computed:{...v8t(x8t,["userToken"])},watch:{entry:function(){this.state||this.createFlatmap()},helpMode:function(e,t){e!==t&&this.setHelpMode(val)},state:{handler:function(e,t){e!==t&&(this.mapManager?this.setState(e):this.setStateRequired=!0)},immediate:!0,deep:!0},disableUI:function(e){e&&this.closeTooltip()}},mounted:function(){this.openMapRef=T.shallowRef(this.$refs.openMapRef),this.backgroundIconRef=T.shallowRef(this.$refs.backgroundIconRef),this.tooltipWait=[],this.tooltipWait.length=this.hoverVisibilities.length,this.mapManager=new yO(this.flatmapAPI),this.flatmapQueries=new mG,this.flatmapQueries.initialise(this.flatmapAPI),this.state?this.setStateRequired&&this.setState(this.state):this.renderAtMounted&&this.createFlatmap()}},Po=e=>(T.pushScopeId("data-v-4f5a6743"),e=e(),T.popScopeId(),e),w8t={class:"flatmap-container",ref:"flatmapContainer","element-loading-text":"Loading...","element-loading-background":"rgba(0, 0, 0, 0.3)"},E8t={style:{height:"100%",width:"100%",position:"relative","overflow-y":"none"}},M8t={style:{height:"100%",width:"100%"},ref:"display"},A8t={class:"beta-popovers"},C8t=Po(()=>T.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1)),S8t=Po(()=>T.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1)),H8t=Po(()=>T.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1)),O8t=Po(()=>T.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1)),V8t=Po(()=>T.createElementVNode("span",{class:"warning-text"},"Legacy Map",-1)),D8t={key:1,class:"warning-text"},P8t=Po(()=>T.createElementVNode("span",{class:"warning-text"},"What's new?",-1)),I8t=Po(()=>T.createElementVNode("b",null,"Network discovery mode",-1)),k8t=Po(()=>T.createElementVNode("p",null," You can now view the network of neurons connected to a selected neuron. This mode is located in the settings at the bottom right. Once discovery mode is on, click on a neuron to see its connections. ",-1)),R8t=Po(()=>T.createElementVNode("b",null,"Now can display up to 6 panes",-1)),B8t=Po(()=>T.createElementVNode("p",null," You can now display up to 6 panes in the flatmap. This allows you to compare between different datasets and/or different views of the same dataset. ",-1)),N8t={class:"bottom-right-control"},F8t=Po(()=>T.createElementVNode("div",null,[T.createTextVNode(" Fit to "),T.createElementVNode("br"),T.createTextVNode(" window ")],-1)),j8t=["innerHTML"],z8t=["innerHTML"],U8t=["onClick"];function $8t(e,t,r,n,i,o){const a=T.resolveComponent("map-svg-sprite-color"),s=bv,h=yi,d=Vc,Q=F3,p=T.resolveComponent("map-svg-icon"),g=Mb,_=Eb,x=wb,b=vv,A=na,E=qa,O=K3,V=Oc,k=B6,j=Kx,$=Yx,U=FT,J=Qb,tt=Bc;return T.withDirectives((T.openBlock(),T.createElementBlock("div",w8t,[T.createVNode(a),T.createElementVNode("div",E8t,[T.createElementVNode("div",M8t,null,512),T.withDirectives(T.createElementVNode("div",A8t,[T.createElementVNode("div",null,[T.createVNode(d,{placement:"right","popper-class":"warning-popper flatmap-popper",teleported:!1,visible:e.hoverVisibilities[6].value,ref:"warningPopover"},{reference:T.withCtx(()=>[r.displayWarning?(T.openBlock(),T.createElementBlock("div",{key:0,class:"warning-icon",onMouseover:t[7]||(t[7]=rt=>o.showToolitip(6)),onMouseout:t[8]||(t[8]=rt=>o.hideToolitip(6))},[T.createVNode(h,null,{default:T.withCtx(()=>[T.createVNode(s)]),_:1}),r.isLegacy?(T.openBlock(),T.createElementBlock(T.Fragment,{key:0},[V8t,T.createElementVNode("div",{class:"latest-map-text",onClick:t[6]||(t[6]=(...rt)=>o.viewLatestMap&&o.viewLatestMap(...rt))}," Click here for the latest map ")],64)):(T.openBlock(),T.createElementBlock("span",D8t,"Beta"))],32)):T.createCommentVNode("",!0)]),default:T.withCtx(()=>[r.isLegacy?(T.openBlock(),T.createElementBlock("p",{key:0,onMouseover:t[0]||(t[0]=rt=>o.showToolitip(6)),onMouseout:t[1]||(t[1]=rt=>o.hideToolitip(6))}," This is a legacy map, you may view the latest map instead. ",32)):e.isFC?(T.openBlock(),T.createElementBlock("p",{key:1,onMouseover:t[2]||(t[2]=rt=>o.showToolitip(6)),onMouseout:t[3]||(t[3]=rt=>o.hideToolitip(6))},[T.createTextVNode(" This map displays the connectivity of individual neurons. Specifically, those which align with (parts of) the neuron populations from the "),C8t,T.createTextVNode(" models available in "),S8t,T.createTextVNode(". ")],32)):(T.openBlock(),T.createElementBlock("p",{key:2,onMouseover:t[4]||(t[4]=rt=>o.showToolitip(6)),onMouseout:t[5]||(t[5]=rt=>o.hideToolitip(6))},[T.createTextVNode(" This map displays the connectivity of neuron populations. Specifically, those from the primarily rat-based "),H8t,T.createTextVNode(" models available in "),O8t,T.createTextVNode(". New connectivity and species specificity will be added as the SPARC program progresses. ")],32))]),_:1},8,["visible"])]),r.displayLatestChanges?(T.openBlock(),T.createBlock(d,{key:0,placement:"right",teleported:!1,trigger:"manual","popper-class":"warning-popper flatmap-popper",visible:e.hoverVisibilities[7].value},{reference:T.withCtx(()=>[r.displayLatestChanges?(T.openBlock(),T.createElementBlock("div",{key:0,class:"latest-changesicon",onMouseover:t[9]||(t[9]=rt=>o.showToolitip(7)),onMouseout:t[10]||(t[10]=rt=>o.hideToolitip(7))},[T.createVNode(h,null,{default:T.withCtx(()=>[T.createVNode(s)]),_:1}),P8t],32)):T.createCommentVNode("",!0)]),default:T.withCtx(()=>[I8t,k8t,R8t,B8t]),_:1},8,["visible"])):T.createCommentVNode("",!0)],512),[[T.vShow,!r.disableUI]]),T.withDirectives(T.createVNode(h,{class:T.normalizeClass(["minimap-resize",{enlarge:e.minimapSmall,shrink:!e.minimapSmall}]),ref:"minimapResize",onClick:o.closeMinimap},{default:T.withCtx(()=>[T.createVNode(Q)]),_:1},8,["class","onClick"]),[[T.vShow,e.minimapResizeShow]]),T.withDirectives(T.createElementVNode("div",N8t,[T.createVNode(d,{content:"Zoom in",placement:"left",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[0].value},{reference:T.withCtx(()=>[T.createVNode(p,{icon:"zoomIn",class:"icon-button zoomIn",onClick:t[11]||(t[11]=rt=>o.zoomIn()),onMouseover:t[12]||(t[12]=rt=>o.showToolitip(0)),onMouseout:t[13]||(t[13]=rt=>o.hideToolitip(0))})]),_:1},8,["visible"]),T.createVNode(d,{content:"Zoom out",placement:"top-end",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper popper-zoomout",visible:e.hoverVisibilities[1].value},{reference:T.withCtx(()=>[T.createVNode(p,{icon:"zoomOut",class:"icon-button zoomOut",onClick:t[14]||(t[14]=rt=>o.zoomOut()),onMouseover:t[15]||(t[15]=rt=>o.showToolitip(1)),onMouseout:t[16]||(t[16]=rt=>o.hideToolitip(1))})]),_:1},8,["visible"]),T.createVNode(d,{content:"Reset",placement:"top",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[2].value},{reference:T.withCtx(()=>[T.createVNode(p,{icon:"fitWindow",class:"icon-button fitWindow",onClick:t[17]||(t[17]=rt=>o.resetView()),onMouseover:t[18]||(t[18]=rt=>o.showToolitip(2)),onMouseout:t[19]||(t[19]=rt=>o.hideToolitip(2))})]),default:T.withCtx(()=>[F8t]),_:1},8,["visible"])],512),[[T.vShow,!r.disableUI]]),T.createVNode(d,{content:"Change pathway visibility",placement:"right",teleported:!1,trigger:"manual","popper-class":"flatmap-popper",visible:e.hoverVisibilities[4].value,ref:"checkBoxPopover"},{reference:T.withCtx(()=>[T.withDirectives(T.createElementVNode("div",{class:T.normalizeClass(["pathway-location",{open:e.drawerOpen,close:!e.drawerOpen}])},[T.withDirectives((T.openBlock(),T.createElementBlock("div",{class:T.normalizeClass(["pathway-container",{open:e.drawerOpen,close:!e.drawerOpen}]),style:T.normalizeStyle({"max-height":e.pathwaysMaxHeight+"px"})},[e.isFC?T.createCommentVNode("",!0):(T.openBlock(),T.createBlock(g,{key:0,class:"svg-legends-container"})),T.createVNode(d,{content:"Location of the featured dataset",placement:"right",teleported:!1,trigger:"hover","popper-class":"flatmap-popper popper-bump-right",visible:e.hoverVisibilities[9].value,ref:"featuredMarkerPopover"},{reference:T.withCtx(()=>[T.withDirectives(T.createElementVNode("div",{class:"yellow-star-legend",innerHTML:e.yellowstar},null,8,j8t),[[T.vShow,r.showStarInLegend],[J,void 0,"featuredMarkerPopover"]])]),_:1},8,["visible"]),T.createVNode(d,{content:"Find these markers for data",placement:"right",teleported:!1,trigger:"manual","popper-class":"flatmap-popper popper-bump-right",visible:e.hoverVisibilities[5].value,ref:"markerPopover"},{reference:T.withCtx(()=>[T.withDirectives(T.createElementVNode("div",{class:"flatmap-marker-help",innerHTML:e.flatmapMarker},null,8,z8t),[[T.vShow,e.hoverVisibilities[5].value],[J,void 0,"markerPopover"]])]),_:1},8,["visible"]),e.isFC&&e.systems&&e.systems.length>0?(T.openBlock(),T.createBlock(_,{key:1,active:e.currentActive,hover:e.currentHover,"tree-data":e.systems,ref:"treeControls",onChanged:o.systemSelected,onCheckAll:o.checkAllSystems,onChangeActive:o.ftuSelected},null,8,["active","hover","tree-data","onChanged","onCheckAll","onChangeActive"])):T.createCommentVNode("",!0),!e.isFC&&e.centreLines&&e.centreLines.length>0?(T.openBlock(),T.createBlock(x,{title:"Nerves",labelKey:"label",identifierKey:"key",selections:e.centreLines,onChanged:o.centreLinesSelected,ref:"centrelinesSelection",key:"centrelinesSelection"},null,8,["selections","onChanged"])):T.createCommentVNode("",!0),!e.isFC&&e.taxonConnectivity&&e.taxonConnectivity.length>0?(T.openBlock(),T.createBlock(x,{title:"Observed in",labelKey:"label",identifierKey:"taxon",selections:e.taxonConnectivity,onChanged:o.taxonsSelected,onCheckAll:o.checkAllTaxons,ref:"taxonSelection",key:"taxonSelection"},null,8,["selections","onChanged","onCheckAll"])):T.createCommentVNode("",!0),e.pathways&&e.pathways.length>0?(T.openBlock(),T.createBlock(x,{title:"Pathways",labelKey:"label",identifierKey:"type",colourStyle:"line",selections:e.pathways,onChanged:o.pathwaysSelected,onCheckAll:o.checkAllPathways,ref:"pathwaysSelection",key:"pathwaysSelection"},null,8,["selections","onChanged","onCheckAll"])):T.createCommentVNode("",!0)],6)),[[J,void 0,"checkBoxPopover"]]),T.createElementVNode("div",{onClick:t[20]||(t[20]=(...rt)=>o.toggleDrawer&&o.toggleDrawer(...rt)),class:T.normalizeClass(["drawer-button",{open:e.drawerOpen,close:!e.drawerOpen}])},[T.createVNode(h,null,{default:T.withCtx(()=>[T.createVNode(b)]),_:1})],2)],2),[[T.vShow,!r.disableUI]])]),_:1},8,["visible"]),e.openMapRef?(T.openBlock(),T.createBlock(d,{key:0,ref:"open-map-popover","virtual-ref":e.openMapRef,placement:"top-start",width:"136",teleported:!1,trigger:"click","popper-class":"open-map-popper non-selectable","virtual-triggering":""},{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(r.openMapOptions,rt=>(T.openBlock(),T.createBlock(E,{key:rt.key},{default:T.withCtx(()=>[T.createVNode(A,{type:"primary",plain:"",onClick:st=>e.$emit("open-map",rt.key)},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(rt.display),1)]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1},8,["virtual-ref"])):T.createCommentVNode("",!0),T.createVNode(d,{ref:"backgroundPopover","virtual-ref":e.backgroundIconRef,placement:"top-start",width:"200",teleported:!1,trigger:"click","popper-class":"background-popper h-auto","virtual-triggering":""},{default:T.withCtx(()=>[T.createElementVNode("div",null,[T.createVNode(E,{class:"backgroundText"},{default:T.withCtx(()=>[T.createTextVNode("Viewing Mode")]),_:1}),T.createVNode(E,{class:"backgroundControl"},{default:T.withCtx(()=>[T.createVNode(k,{teleported:!1,modelValue:e.viewingMode,"onUpdate:modelValue":t[21]||(t[21]=rt=>e.viewingMode=rt),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown"},{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.viewingModes,(rt,st)=>(T.openBlock(),T.createBlock(V,{key:rt+st,label:rt,value:rt},{default:T.withCtx(()=>[T.createVNode(E,null,{default:T.withCtx(()=>[T.createVNode(O,{span:12},{default:T.withCtx(()=>[T.createTextVNode(T.toDisplayString(rt),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.displayFlightPathOption?(T.openBlock(),T.createBlock(E,{key:0,class:"backgroundSpacer"})):T.createCommentVNode("",!0),e.displayFlightPathOption?(T.openBlock(),T.createBlock(E,{key:1,class:"backgroundText"},{default:T.withCtx(()=>[T.createTextVNode("Flight path display")]),_:1})):T.createCommentVNode("",!0),e.displayFlightPathOption?(T.openBlock(),T.createBlock(E,{key:2,class:"backgroundControl"},{default:T.withCtx(()=>[T.createVNode($,{modelValue:e.flightPath3DRadio,"onUpdate:modelValue":t[22]||(t[22]=rt=>e.flightPath3DRadio=rt),class:"flatmap-radio",onChange:o.setFlightPath3D},{default:T.withCtx(()=>[T.createVNode(j,{label:!1},{default:T.withCtx(()=>[T.createTextVNode("2D")]),_:1}),T.createVNode(j,{label:!0},{default:T.withCtx(()=>[T.createTextVNode("3D")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1})):T.createCommentVNode("",!0),T.createVNode(E,{class:"backgroundSpacer"}),T.createVNode(E,{class:"backgroundText"},{default:T.withCtx(()=>[T.createTextVNode("Organs display")]),_:1}),T.createVNode(E,{class:"backgroundControl"},{default:T.withCtx(()=>[T.createVNode($,{modelValue:e.colourRadio,"onUpdate:modelValue":t[23]||(t[23]=rt=>e.colourRadio=rt),class:"flatmap-radio",onChange:o.setColour},{default:T.withCtx(()=>[T.createVNode(j,{label:!0},{default:T.withCtx(()=>[T.createTextVNode("Colour")]),_:1}),T.createVNode(j,{label:!1},{default:T.withCtx(()=>[T.createTextVNode("Greyscale")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),T.createVNode(E,{class:"backgroundSpacer"}),T.createVNode(E,{class:"backgroundText"},{default:T.withCtx(()=>[T.createTextVNode("Outlines display")]),_:1}),T.createVNode(E,{class:"backgroundControl"},{default:T.withCtx(()=>[T.createVNode($,{modelValue:e.outlinesRadio,"onUpdate:modelValue":t[24]||(t[24]=rt=>e.outlinesRadio=rt),class:"flatmap-radio",onChange:o.setOutlines},{default:T.withCtx(()=>[T.createVNode(j,{label:!0},{default:T.withCtx(()=>[T.createTextVNode("Show")]),_:1}),T.createVNode(j,{label:!1},{default:T.withCtx(()=>[T.createTextVNode("Hide")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),T.createVNode(E,{class:"backgroundSpacer"}),T.createVNode(E,{class:"backgroundText"},{default:T.withCtx(()=>[T.createTextVNode("Change background")]),_:1}),T.createVNode(E,{class:"backgroundControl"},{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.availableBackground,rt=>(T.openBlock(),T.createElementBlock("div",{key:rt,class:T.normalizeClass(["backgroundChoice",rt,rt==e.currentBackground?"active":""]),onClick:st=>o.backgroundChangeCallback(rt)},null,10,U8t))),128))]),_:1})])]),_:1},8,["virtual-ref"]),T.withDirectives(T.createElementVNode("div",{class:T.normalizeClass(["settings-group",{open:e.drawerOpen,close:!e.drawerOpen}])},[T.createVNode(E,null,{default:T.withCtx(()=>[T.createVNode(d,{visible:e.hoverVisibilities[8].value,content:"Open new map",placement:"right",teleported:!1,"popper-class":"flatmap-popper"},{reference:T.withCtx(()=>[r.enableOpenMapUI&&r.openMapOptions.length>0?(T.openBlock(),T.createBlock(p,{key:0,ref:"openMapRef",icon:"openMap",class:"icon-button open-map-button",onMouseover:t[25]||(t[25]=rt=>o.showToolitip(8)),onMouseout:t[26]||(t[26]=rt=>o.hideToolitip(8))},null,512)):T.createCommentVNode("",!0)]),_:1},8,["visible"])]),_:1}),T.createVNode(E,null,{default:T.withCtx(()=>[T.createVNode(d,{content:"Change settings",placement:"right",visible:e.hoverVisibilities[3].value,teleported:!1,trigger:"manual","popper-class":"flatmap-popper"},{reference:T.withCtx(()=>[T.createVNode(p,{ref:"backgroundIconRef",icon:"changeBckgd",class:"icon-button",onMouseover:t[27]||(t[27]=rt=>o.showToolitip(3)),onMouseout:t[28]||(t[28]=rt=>o.hideToolitip(3))},null,512)]),_:1},8,["visible"])]),_:1})],2),[[T.vShow,!r.disableUI]]),T.withDirectives(T.createVNode(U,{ref:"tooltip",class:"tooltip",annotationEntry:e.annotationEntry,entry:e.tooltipEntry,annotationDisplay:e.viewingMode==="Annotation"},null,8,["annotationEntry","entry","annotationDisplay"]),[[T.vShow,e.tooltipDisplay]])])])),[[tt,e.loading]])}const vy=Wa(L8t,[["render",$8t],["__scopeId","data-v-4f5a6743"]]),EO={"NCBITaxon:10114":"01fedbf9-d783-509c-a10c-827941ab13da","NCBITaxon:9823":"a336ac04-24db-561f-a25f-1c994fe17410","NCBITaxon:9606":"42ed6323-f645-5fbe-bada-9581819cf689","NCBITaxon:10090":"25285fab-48a0-5620-a6a0-f9a0374837d5","NCBITaxon:9685":"73060497-46a6-52bf-b975-cac511c127cb"},G8t={name:"MultiFlatmapVuer",components:{Col:K3,Row:qa,Option:Oc,Select:B6,Popover:Vc,FlatmapVuer:vy},beforeMount(){this._resolveList=[],this._initialised=!1},mounted:function(){this.initialise(),Nc.on("onActionClick",e=>{this.resourceSelected(e)})},methods:{initialise:function(){return new Promise(e=>{this.requireInitialisation?(this.requireInitialisation=!1,fetch(this.flatmapAPI).then(t=>t.json()).then(t=>{Object.keys(this.availableSpecies).forEach(n=>{const i=this.availableSpecies[n].uuid;if(i&&t.map(o=>o.uuid).indexOf(i)>0)this.speciesList[n]=T.reactive(this.availableSpecies[n]);else for(let o=0;o<t.length;o++)if(this.availableSpecies[n].taxo===t[o].taxon)if(this.availableSpecies[n].biologicalSex){if(t[o].biologicalSex&&t[o].biologicalSex===this.availableSpecies[n].biologicalSex){this.speciesList[n]=T.reactive(this.availableSpecies[n]);break}}else{this.speciesList[n]=T.reactive(this.availableSpecies[n]);break}});let r=this.initial;if(this.state){const n=this.state.state;(!n||!n.uuid&&!n.entry)&&this.state.species?r=this.state.species:r=void 0}r&&(r&&this.speciesList[r]!==void 0?this.activeSpecies=r:this.activeSpecies=Object.keys(this.speciesList)[0],this.setSpecies(this.activeSpecies,this.state?this.state.state:void 0,5)),this._initialised=!0,e(),this._resolveList.forEach(n=>{n()})})):this._initialised?e():this._resolveList.push(e)})},resourceSelected:function(e){this.$emit("resource-selected",e)},FlatmapReady:function(e){this.$emit("ready",e)},getCurrentFlatmap:function(){return this.$refs[this.activeSpecies][0]},panZoomCallback:function(e){this.$emit("pan-zoom-callback",e)},showPopup:function(e,t,r){this.getCurrentFlatmap().showPopup(e,t,r)},showMarkerPopup:function(e,t,r){this.getCurrentFlatmap().showMarkerPopup(e,t,r)},setSpecies:function(e,t,r){if(this.$refs&&e in this.$refs)this.activeSpecies=e,this.$refs[this.activeSpecies][0].createFlatmap(t),this.$emit("flatmapChanged",this.activeSpecies);else if(r){const n=r-1;n>=0&&this.$nextTick(()=>{this.setSpecies(e,t,n)})}},viewLatestMap:function(e){const t=Object.keys(this.speciesList);for(let r=0;r<t.length;r++){const n=this.speciesList[t[r]];if(!n.isLegacy&&n.taxo===e.entry&&n.biologicalSex===e.biologicalSex){this.setSpecies(t[r],e,0);return}}},createLegacyEntry:function(e,t,r){if(r&&t){let n="Legacy";return e.species&&(e.species.slice(0,6)==="Legacy"?n=e.species:n=n+` ${e.species}`),this.speciesList[n]=T.reactive({taxo:t,isLegacy:!0,displayWarning:!0}),{species:n,state:{entry:t,uuid:r,viewport:e.state.viewport,searchTerm:e.state.searchTerm}}}},updateState:function(e){return new Promise(t=>{if(e&&e.state){const r=e.state;if(r.uuid){if(r.entry)return new Promise(()=>{const n=new yO(this.flatmapAPI),i={taxon:r.entry};r.biologicalSex&&(i.biologicalSex=r.biologicalSex),n.findMap_(i).then(o=>{if(o.uuid!==r.uuid)return this.createLegacyEntry(e,r.entry,r.uuid)}).then(o=>{t(o||e)}).catch(()=>{t(e)})})}else if(r.entry){const n=r.entry in EO?EO[r.entry]:void 0,i=this.createLegacyEntry(e,r.entry,n);t(i||e)}}t(e)})},getState:function(){let e={species:this.activeSpecies,state:void 0},t=this.getCurrentFlatmap();return e.state=t.getState(),e},setState:function(e){e&&this.updateState(e).then(t=>{this.initialise().then(()=>{t.species&&t.species!==this.activeSpecies?this.setSpecies(t.species,t.state,5):t.state&&this.getCurrentFlatmap().setState(t.state)})})}},props:{initial:{type:String,default:""},minZoom:{type:Number,default:4},renderAtMounted:{type:Boolean,default:!1},helpMode:{type:Boolean,default:!1},displayMinimap:{type:Boolean,default:!1},showStarInLegend:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array},availableSpecies:{type:Object,default:function(){return{"Human Female":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000383",iconClass:"mapicon-icon_human",displayWarning:!0},"Human Male":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000384",iconClass:"mapicon-icon_human",displayWarning:!0},Rat:{taxo:"NCBITaxon:10114",iconClass:"mapicon-icon_rat",displayLatestChanges:!0},Mouse:{taxo:"NCBITaxon:10090",iconClass:"mapicon-icon_mouse",displayWarning:!0},Pig:{taxo:"NCBITaxon:9823",iconClass:"mapicon-icon_pig",displayWarning:!0},Cat:{taxo:"NCBITaxon:9685",iconClass:"mapicon-icon_cat",displayWarning:!0}}}},state:{type:Object,default:void 0},flatmapAPI:{type:String,default:"https://mapcore-demo.org/current/flatmap/v3/"},sparcAPI:{type:String,default:"https://api.sparc.science/"},disableUI:{type:Boolean,default:!1}},data:function(){return{activeSpecies:void 0,speciesList:{},requireInitialisation:!0}},watch:{state:{handler:function(e){this.setState(e)},immediate:!0,deep:!0}}},Z8t=e=>(T.pushScopeId("data-v-5550e1f2"),e=e(),T.popScopeId(),e),q8t={class:"multi-container",ref:"multiContainer"},W8t={key:0,style:{position:"absolute","z-index":"10"}},X8t=Z8t(()=>T.createElementVNode("div",{class:"species-display-text"},"Species",-1)),K8t={class:"select-box-icon"};function Y8t(e,t,r,n,i,o){const a=Oc,s=B6,h=Vc,d=vy;return T.openBlock(),T.createElementBlock("div",q8t,[r.disableUI?T.createCommentVNode("",!0):(T.openBlock(),T.createElementBlock("div",W8t,[X8t,T.createVNode(h,{content:"Select a species",placement:"right",trigger:"manual","popper-class":"flatmap-popper right-popper",visible:r.helpMode,teleported:!1,ref:"selectPopover"},{reference:T.withCtx(()=>[T.createVNode(s,{id:"flatmap-select",teleported:!1,modelValue:e.activeSpecies,"onUpdate:modelValue":t[0]||(t[0]=Q=>e.activeSpecies=Q),placeholder:"Select",class:"select-box","popper-class":"flatmap-dropdown",onChange:o.setSpecies},{default:T.withCtx(()=>[(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.speciesList,(Q,p)=>(T.openBlock(),T.createBlock(a,{key:p,label:p,value:p},{default:T.withCtx(()=>[T.createElementVNode("span",K8t,[T.createElementVNode("i",{class:T.normalizeClass(Q.iconClass)},null,2)]),T.createTextVNode(" "+T.toDisplayString(p),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible"])])),(T.openBlock(!0),T.createElementBlock(T.Fragment,null,T.renderList(e.speciesList,(Q,p)=>T.withDirectives((T.openBlock(),T.createBlock(d,{key:p,entry:Q.taxo,uuid:Q.uuid,biologicalSex:Q.biologicalSex,displayWarning:Q.displayWarning,displayLatestChanges:Q.displayLatestChanges,isLegacy:Q.isLegacy,ref_for:!0,ref:p,enableOpenMapUI:r.enableOpenMapUI,openMapOptions:r.openMapOptions,disableUI:r.disableUI,onViewLatestMap:o.viewLatestMap,onResourceSelected:o.resourceSelected,onReady:o.FlatmapReady,onPanZoomCallback:o.panZoomCallback,onOpenMap:t[1]||(t[1]=g=>e.$emit("open-map",g)),minZoom:r.minZoom,helpMode:r.helpMode,renderAtMounted:r.renderAtMounted,displayMinimap:r.displayMinimap,showStarInLegend:r.showStarInLegend,style:{height:"100%"},flatmapAPI:r.flatmapAPI,sparcAPI:r.sparcAPI},null,8,["entry","uuid","biologicalSex","displayWarning","displayLatestChanges","isLegacy","enableOpenMapUI","openMapOptions","disableUI","onViewLatestMap","onResourceSelected","onReady","onPanZoomCallback","minZoom","helpMode","renderAtMounted","displayMinimap","showStarInLegend","flatmapAPI","sparcAPI"])),[[T.vShow,e.activeSpecies==p]])),128))],512)}const J8t=Wa(G8t,[["render",Y8t],["__scopeId","data-v-5550e1f2"]]);Fr.FlatmapVuer=vy,Fr.MultiFlatmapVuer=J8t,Fr.Tooltip=FT,Object.defineProperty(Fr,Symbol.toStringTag,{value:"Module"})});
|