@abi-software/flatmapvuer 1.1.3 → 1.1.4
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.umd.cjs
CHANGED
|
@@ -22,7 +22,15 @@ usage: app.provide(ID_INJECTION_KEY, {
|
|
|
22
22
|
z-index:-1000 !important;
|
|
23
23
|
top:0 !important;
|
|
24
24
|
right:0 !important;
|
|
25
|
-
`,kZ=["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 PZ(t){const e=window.getComputedStyle(t),r=e.getPropertyValue("box-sizing"),n=Number.parseFloat(e.getPropertyValue("padding-bottom"))+Number.parseFloat(e.getPropertyValue("padding-top")),i=Number.parseFloat(e.getPropertyValue("border-bottom-width"))+Number.parseFloat(e.getPropertyValue("border-top-width"));return{contextStyle:kZ.map(a=>`${a}:${e.getPropertyValue(a)}`).join(";"),paddingSize:n,borderSize:i,boxSizing:r}}function mw(t,e=1,r){var n;O2||(O2=document.createElement("textarea"),document.body.appendChild(O2));const{paddingSize:i,borderSize:o,boxSizing:a,contextStyle:s}=PZ(t);O2.setAttribute("style",`${s};${OZ}`),O2.value=t.value||t.placeholder||"";let d=O2.scrollHeight;const p={};a==="border-box"?d=d+o:a==="content-box"&&(d=d-i),O2.value="";const f=O2.scrollHeight-i;if(X1(e)){let Q=f*e;a==="border-box"&&(Q=Q+i+o),d=Math.max(Q,d),p.minHeight=`${Q}px`}if(X1(r)){let Q=f*r;a==="border-box"&&(Q=Q+i+o),d=Math.min(Q,d)}return p.height=`${d}px`,(n=O2.parentNode)==null||n.removeChild(O2),O2=void 0,p}const IZ=on({id:{type:String,default:void 0},size:T3,disabled:Boolean,modelValue:{type:_r([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:_r([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:ps},prefixIcon:{type:ps},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:_r([Object,Array,String]),default:()=>J6({})},autofocus:{type:Boolean,default:!1}}),RZ={[f1]:t=>W1(t),input:t=>W1(t),change:t=>W1(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,mouseleave:t=>t instanceof MouseEvent,mouseenter:t=>t instanceof MouseEvent,keydown:t=>t instanceof Event,compositionstart:t=>t instanceof CompositionEvent,compositionupdate:t=>t instanceof CompositionEvent,compositionend:t=>t instanceof CompositionEvent},NZ=["role"],BZ=["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus"],DZ=["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus"],FZ=h.defineComponent({name:"ElInput",inheritAttrs:!1}),jZ=h.defineComponent({...FZ,props:IZ,emits:RZ,setup(t,{expose:e,emit:r}){const n=t,i=h.useAttrs(),o=h.useSlots(),a=h.computed(()=>{const ye={};return n.containerRole==="combobox"&&(ye["aria-haspopup"]=i["aria-haspopup"],ye["aria-owns"]=i["aria-owns"],ye["aria-expanded"]=i["aria-expanded"]),ye}),s=h.computed(()=>[n.type==="textarea"?M.b():b.b(),b.m(_.value),b.is("disabled",v.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")]:Xt.value&&le.value},i.class]),d=h.computed(()=>[b.e("wrapper"),b.is("focus",ot.value)]),p=jU({excludeKeys:h.computed(()=>Object.keys(a.value))}),{form:f,formItem:Q}=Q3(),{inputId:m}=s5(n,{formItemContext:Q}),_=f3(),v=a5(),b=xr("input"),M=xr("textarea"),E=h.shallowRef(),V=h.shallowRef(),O=h.ref(!1),R=h.ref(!1),j=h.ref(!1),G=h.ref(),z=h.shallowRef(n.inputStyle),J=h.computed(()=>E.value||V.value),{wrapperRef:tt,isFocused:ot,handleFocus:et,handleBlur:Tt}=$f(J,{afterBlur(){var ye;n.validateEvent&&((ye=Q==null?void 0:Q.validate)==null||ye.call(Q,"blur").catch(cr=>K1(cr)))}}),At=h.computed(()=>{var ye;return(ye=f==null?void 0:f.statusIcon)!=null?ye:!1}),Ut=h.computed(()=>(Q==null?void 0:Q.validateState)||""),ee=h.computed(()=>Ut.value&&Ex[Ut.value]),ue=h.computed(()=>j.value?OU:HU),Ft=h.computed(()=>[i.style]),pe=h.computed(()=>[n.inputStyle,z.value,{resize:n.resize}]),lr=h.computed(()=>u3(n.modelValue)?"":String(n.modelValue)),Xt=h.computed(()=>n.clearable&&!v.value&&!n.readonly&&!!lr.value&&(ot.value||O.value)),le=h.computed(()=>n.showPassword&&!v.value&&!n.readonly&&!!lr.value&&(!!lr.value||ot.value)),ge=h.computed(()=>n.showWordLimit&&!!n.maxlength&&(n.type==="text"||n.type==="textarea")&&!v.value&&!n.readonly&&!n.showPassword),Le=h.computed(()=>lr.value.length),Fe=h.computed(()=>!!ge.value&&Le.value>Number(n.maxlength)),Ge=h.computed(()=>!!o.suffix||!!n.suffixIcon||Xt.value||n.showPassword||ge.value||!!Ut.value&&At.value),[je,Dt]=xZ(E);os(V,ye=>{if(jt(),!ge.value||n.resize!=="both")return;const cr=ye[0],{width:Wr}=cr.contentRect;G.value={right:`calc(100% - ${Wr+15+6}px)`}});const qt=()=>{const{type:ye,autosize:cr}=n;if(!(!T1||ye!=="textarea"||!V.value))if(cr){const Wr=Qi(cr)?cr.minRows:void 0,$n=Qi(cr)?cr.maxRows:void 0,Qe=mw(V.value,Wr,$n);z.value={overflowY:"hidden",...Qe},h.nextTick(()=>{V.value.offsetHeight,z.value=Qe})}else z.value={minHeight:mw(V.value).minHeight}},jt=(ye=>{let cr=!1;return()=>{var Wr;if(cr||!n.autosize)return;((Wr=V.value)==null?void 0:Wr.offsetParent)===null||(ye(),cr=!0)}})(qt),fe=()=>{const ye=J.value,cr=n.formatter?n.formatter(lr.value):lr.value;!ye||ye.value===cr||(ye.value=cr)},Ne=async ye=>{je();let{value:cr}=ye.target;if(n.formatter&&(cr=n.parser?n.parser(cr):cr),!R.value){if(cr===lr.value){fe();return}r(f1,cr),r("input",cr),await h.nextTick(),fe(),Dt()}},Ae=ye=>{r("change",ye.target.value)},Ve=ye=>{r("compositionstart",ye),R.value=!0},ke=ye=>{var cr;r("compositionupdate",ye);const Wr=(cr=ye.target)==null?void 0:cr.value,$n=Wr[Wr.length-1]||"";R.value=!Hx($n)},ze=ye=>{r("compositionend",ye),R.value&&(R.value=!1,Ne(ye))},zt=()=>{j.value=!j.value,Pr()},Pr=async()=>{var ye;await h.nextTick(),(ye=J.value)==null||ye.focus()},mn=()=>{var ye;return(ye=J.value)==null?void 0:ye.blur()},We=ye=>{O.value=!1,r("mouseleave",ye)},br=ye=>{O.value=!0,r("mouseenter",ye)},Nn=ye=>{r("keydown",ye)},S1=()=>{var ye;(ye=J.value)==null||ye.select()},wn=()=>{r(f1,""),r("change",""),r("clear"),r("input","")};return h.watch(()=>n.modelValue,()=>{var ye;h.nextTick(()=>qt()),n.validateEvent&&((ye=Q==null?void 0:Q.validate)==null||ye.call(Q,"change").catch(cr=>K1(cr)))}),h.watch(lr,()=>fe()),h.watch(()=>n.type,async()=>{await h.nextTick(),fe(),qt()}),h.onMounted(()=>{!n.formatter&&n.parser&&K1("ElInput","If you set the parser, you also need to set the formatter."),fe(),h.nextTick(qt)}),e({input:E,textarea:V,ref:J,textareaStyle:pe,autosize:h.toRef(n,"autosize"),focus:Pr,blur:mn,select:S1,clear:wn,resizeTextarea:qt}),(ye,cr)=>h.withDirectives((h.openBlock(),h.createElementBlock("div",h.mergeProps(h.unref(a),{class:h.unref(s),style:h.unref(Ft),role:ye.containerRole,onMouseenter:br,onMouseleave:We}),[h.createCommentVNode(" input "),ye.type!=="textarea"?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createCommentVNode(" prepend slot "),ye.$slots.prepend?(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(h.unref(b).be("group","prepend"))},[h.renderSlot(ye.$slots,"prepend")],2)):h.createCommentVNode("v-if",!0),h.createElementVNode("div",{ref_key:"wrapperRef",ref:tt,class:h.normalizeClass(h.unref(d))},[h.createCommentVNode(" prefix slot "),ye.$slots.prefix||ye.prefixIcon?(h.openBlock(),h.createElementBlock("span",{key:0,class:h.normalizeClass(h.unref(b).e("prefix"))},[h.createElementVNode("span",{class:h.normalizeClass(h.unref(b).e("prefix-inner"))},[h.renderSlot(ye.$slots,"prefix"),ye.prefixIcon?(h.openBlock(),h.createBlock(h.unref(F1),{key:0,class:h.normalizeClass(h.unref(b).e("icon"))},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(ye.prefixIcon)))]),_:1},8,["class"])):h.createCommentVNode("v-if",!0)],2)],2)):h.createCommentVNode("v-if",!0),h.createElementVNode("input",h.mergeProps({id:h.unref(m),ref_key:"input",ref:E,class:h.unref(b).e("inner")},h.unref(p),{minlength:ye.minlength,maxlength:ye.maxlength,type:ye.showPassword?j.value?"text":"password":ye.type,disabled:h.unref(v),readonly:ye.readonly,autocomplete:ye.autocomplete,tabindex:ye.tabindex,"aria-label":ye.label,placeholder:ye.placeholder,style:ye.inputStyle,form:ye.form,autofocus:ye.autofocus,onCompositionstart:Ve,onCompositionupdate:ke,onCompositionend:ze,onInput:Ne,onFocus:cr[0]||(cr[0]=(...Wr)=>h.unref(et)&&h.unref(et)(...Wr)),onBlur:cr[1]||(cr[1]=(...Wr)=>h.unref(Tt)&&h.unref(Tt)(...Wr)),onChange:Ae,onKeydown:Nn}),null,16,BZ),h.createCommentVNode(" suffix slot "),h.unref(Ge)?(h.openBlock(),h.createElementBlock("span",{key:1,class:h.normalizeClass(h.unref(b).e("suffix"))},[h.createElementVNode("span",{class:h.normalizeClass(h.unref(b).e("suffix-inner"))},[!h.unref(Xt)||!h.unref(le)||!h.unref(ge)?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.renderSlot(ye.$slots,"suffix"),ye.suffixIcon?(h.openBlock(),h.createBlock(h.unref(F1),{key:0,class:h.normalizeClass(h.unref(b).e("icon"))},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(ye.suffixIcon)))]),_:1},8,["class"])):h.createCommentVNode("v-if",!0)],64)):h.createCommentVNode("v-if",!0),h.unref(Xt)?(h.openBlock(),h.createBlock(h.unref(F1),{key:1,class:h.normalizeClass([h.unref(b).e("icon"),h.unref(b).e("clear")]),onMousedown:h.withModifiers(h.unref(as),["prevent"]),onClick:wn},{default:h.withCtx(()=>[h.createVNode(h.unref(Sf))]),_:1},8,["class","onMousedown"])):h.createCommentVNode("v-if",!0),h.unref(le)?(h.openBlock(),h.createBlock(h.unref(F1),{key:2,class:h.normalizeClass([h.unref(b).e("icon"),h.unref(b).e("password")]),onClick:zt},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(h.unref(ue))))]),_:1},8,["class"])):h.createCommentVNode("v-if",!0),h.unref(ge)?(h.openBlock(),h.createElementBlock("span",{key:3,class:h.normalizeClass(h.unref(b).e("count"))},[h.createElementVNode("span",{class:h.normalizeClass(h.unref(b).e("count-inner"))},h.toDisplayString(h.unref(Le))+" / "+h.toDisplayString(ye.maxlength),3)],2)):h.createCommentVNode("v-if",!0),h.unref(Ut)&&h.unref(ee)&&h.unref(At)?(h.openBlock(),h.createBlock(h.unref(F1),{key:4,class:h.normalizeClass([h.unref(b).e("icon"),h.unref(b).e("validateIcon"),h.unref(b).is("loading",h.unref(Ut)==="validating")])},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(h.unref(ee))))]),_:1},8,["class"])):h.createCommentVNode("v-if",!0)],2)],2)):h.createCommentVNode("v-if",!0)],2),h.createCommentVNode(" append slot "),ye.$slots.append?(h.openBlock(),h.createElementBlock("div",{key:1,class:h.normalizeClass(h.unref(b).be("group","append"))},[h.renderSlot(ye.$slots,"append")],2)):h.createCommentVNode("v-if",!0)],64)):(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[h.createCommentVNode(" textarea "),h.createElementVNode("textarea",h.mergeProps({id:h.unref(m),ref_key:"textarea",ref:V,class:h.unref(M).e("inner")},h.unref(p),{minlength:ye.minlength,maxlength:ye.maxlength,tabindex:ye.tabindex,disabled:h.unref(v),readonly:ye.readonly,autocomplete:ye.autocomplete,style:h.unref(pe),"aria-label":ye.label,placeholder:ye.placeholder,form:ye.form,autofocus:ye.autofocus,onCompositionstart:Ve,onCompositionupdate:ke,onCompositionend:ze,onInput:Ne,onFocus:cr[2]||(cr[2]=(...Wr)=>h.unref(et)&&h.unref(et)(...Wr)),onBlur:cr[3]||(cr[3]=(...Wr)=>h.unref(Tt)&&h.unref(Tt)(...Wr)),onChange:Ae,onKeydown:Nn}),null,16,DZ),h.unref(ge)?(h.openBlock(),h.createElementBlock("span",{key:0,style:h.normalizeStyle(G.value),class:h.normalizeClass(h.unref(b).e("count"))},h.toDisplayString(h.unref(Le))+" / "+h.toDisplayString(ye.maxlength),7)):h.createCommentVNode("v-if",!0)],64))],16,NZ)),[[h.vShow,ye.type!=="hidden"]])}});var zZ=Hr(jZ,[["__file","input.vue"]]);const L9=mi(zZ),l5=4,UZ={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"}},GZ=({move:t,size:e,bar:r})=>({[r.size]:e,transform:`translate${r.axis}(${t}%)`}),gw=Symbol("scrollbarContextKey"),ZZ=on({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),$Z="Thumb";var yw=Hr(h.defineComponent({__name:"thumb",props:ZZ,setup(t){const e=t,r=h.inject(gw),n=xr("scrollbar");r||yx($Z,"can not inject scrollbar context");const i=h.ref(),o=h.ref(),a=h.ref({}),s=h.ref(!1);let d=!1,p=!1,f=T1?document.onselectstart:null;const Q=h.computed(()=>UZ[e.vertical?"vertical":"horizontal"]),m=h.computed(()=>GZ({size:e.size,move:e.move,bar:Q.value})),_=h.computed(()=>i.value[Q.value.offset]**2/r.wrapElement[Q.value.scrollSize]/e.ratio/o.value[Q.value.offset]),v=G=>{var z;if(G.stopPropagation(),G.ctrlKey||[1,2].includes(G.button))return;(z=window.getSelection())==null||z.removeAllRanges(),M(G);const J=G.currentTarget;J&&(a.value[Q.value.axis]=J[Q.value.offset]-(G[Q.value.client]-J.getBoundingClientRect()[Q.value.direction]))},b=G=>{if(!o.value||!i.value||!r.wrapElement)return;const z=Math.abs(G.target.getBoundingClientRect()[Q.value.direction]-G[Q.value.client]),J=o.value[Q.value.offset]/2,tt=(z-J)*100*_.value/i.value[Q.value.offset];r.wrapElement[Q.value.scroll]=tt*r.wrapElement[Q.value.scrollSize]/100},M=G=>{G.stopImmediatePropagation(),d=!0,document.addEventListener("mousemove",E),document.addEventListener("mouseup",V),f=document.onselectstart,document.onselectstart=()=>!1},E=G=>{if(!i.value||!o.value||d===!1)return;const z=a.value[Q.value.axis];if(!z)return;const J=(i.value.getBoundingClientRect()[Q.value.direction]-G[Q.value.client])*-1,tt=o.value[Q.value.offset]-z,ot=(J-tt)*100*_.value/i.value[Q.value.offset];r.wrapElement[Q.value.scroll]=ot*r.wrapElement[Q.value.scrollSize]/100},V=()=>{d=!1,a.value[Q.value.axis]=0,document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",V),j(),p&&(s.value=!1)},O=()=>{p=!1,s.value=!!e.size},R=()=>{p=!0,s.value=d};h.onBeforeUnmount(()=>{j(),document.removeEventListener("mouseup",V)});const j=()=>{document.onselectstart!==f&&(document.onselectstart=f)};return s3(h.toRef(r,"scrollbarElement"),"mousemove",O),s3(h.toRef(r,"scrollbarElement"),"mouseleave",R),(G,z)=>(h.openBlock(),h.createBlock(h.Transition,{name:h.unref(n).b("fade"),persisted:""},{default:h.withCtx(()=>[h.withDirectives(h.createElementVNode("div",{ref_key:"instance",ref:i,class:h.normalizeClass([h.unref(n).e("bar"),h.unref(n).is(h.unref(Q).key)]),onMousedown:b},[h.createElementVNode("div",{ref_key:"thumb",ref:o,class:h.normalizeClass(h.unref(n).e("thumb")),style:h.normalizeStyle(h.unref(m)),onMousedown:v},null,38)],34),[[h.vShow,G.always||s.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const qZ=on({always:{type:Boolean,default:!0},width:String,height:String,ratioX:{type:Number,default:1},ratioY:{type:Number,default:1}});var WZ=Hr(h.defineComponent({__name:"bar",props:qZ,setup(t,{expose:e}){const r=t,n=h.ref(0),i=h.ref(0);return e({handleScroll:a=>{if(a){const s=a.offsetHeight-l5,d=a.offsetWidth-l5;i.value=a.scrollTop*100/s*r.ratioY,n.value=a.scrollLeft*100/d*r.ratioX}}}),(a,s)=>(h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createVNode(yw,{move:n.value,ratio:a.ratioX,size:a.width,always:a.always},null,8,["move","ratio","size","always"]),h.createVNode(yw,{move:i.value,ratio:a.ratioY,size:a.height,vertical:"",always:a.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const XZ=on({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:_r([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"]}}),KZ={scroll:({scrollTop:t,scrollLeft:e})=>[t,e].every(X1)},Wf="ElScrollbar",YZ=h.defineComponent({name:Wf}),JZ=h.defineComponent({...YZ,props:XZ,emits:KZ,setup(t,{expose:e,emit:r}){const n=t,i=xr("scrollbar");let o,a;const s=h.ref(),d=h.ref(),p=h.ref(),f=h.ref("0"),Q=h.ref("0"),m=h.ref(),_=h.ref(1),v=h.ref(1),b=h.computed(()=>{const z={};return n.height&&(z.height=ds(n.height)),n.maxHeight&&(z.maxHeight=ds(n.maxHeight)),[n.wrapStyle,z]}),M=h.computed(()=>[n.wrapClass,i.e("wrap"),{[i.em("wrap","hidden-default")]:!n.native}]),E=h.computed(()=>[i.e("view"),n.viewClass]),V=()=>{var z;d.value&&((z=m.value)==null||z.handleScroll(d.value),r("scroll",{scrollTop:d.value.scrollTop,scrollLeft:d.value.scrollLeft}))};function O(z,J){Qi(z)?d.value.scrollTo(z):X1(z)&&X1(J)&&d.value.scrollTo(z,J)}const R=z=>{if(!X1(z)){K1(Wf,"value must be a number");return}d.value.scrollTop=z},j=z=>{if(!X1(z)){K1(Wf,"value must be a number");return}d.value.scrollLeft=z},G=()=>{if(!d.value)return;const z=d.value.offsetHeight-l5,J=d.value.offsetWidth-l5,tt=z**2/d.value.scrollHeight,ot=J**2/d.value.scrollWidth,et=Math.max(tt,n.minSize),Tt=Math.max(ot,n.minSize);_.value=tt/(z-tt)/(et/(z-et)),v.value=ot/(J-ot)/(Tt/(J-Tt)),Q.value=et+l5<z?`${et}px`:"",f.value=Tt+l5<J?`${Tt}px`:""};return h.watch(()=>n.noresize,z=>{z?(o==null||o(),a==null||a()):({stop:o}=os(p,G),a=s3("resize",G))},{immediate:!0}),h.watch(()=>[n.maxHeight,n.height],()=>{n.native||h.nextTick(()=>{var z;G(),d.value&&((z=m.value)==null||z.handleScroll(d.value))})}),h.provide(gw,h.reactive({scrollbarElement:s,wrapElement:d})),h.onMounted(()=>{n.native||h.nextTick(()=>{G()})}),h.onUpdated(()=>G()),e({wrapRef:d,update:G,scrollTo:O,setScrollTop:R,setScrollLeft:j,handleScroll:V}),(z,J)=>(h.openBlock(),h.createElementBlock("div",{ref_key:"scrollbarRef",ref:s,class:h.normalizeClass(h.unref(i).b())},[h.createElementVNode("div",{ref_key:"wrapRef",ref:d,class:h.normalizeClass(h.unref(M)),style:h.normalizeStyle(h.unref(b)),onScroll:V},[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(z.tag),{id:z.id,ref_key:"resizeRef",ref:p,class:h.normalizeClass(h.unref(E)),style:h.normalizeStyle(z.viewStyle),role:z.role,"aria-label":z.ariaLabel,"aria-orientation":z.ariaOrientation},{default:h.withCtx(()=>[h.renderSlot(z.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],38),z.native?h.createCommentVNode("v-if",!0):(h.openBlock(),h.createBlock(WZ,{key:0,ref_key:"barRef",ref:m,height:Q.value,width:f.value,always:z.always,"ratio-x":v.value,"ratio-y":_.value},null,8,["height","width","always","ratio-x","ratio-y"]))],2))}});var t$=Hr(JZ,[["__file","scrollbar.vue"]]);const e$=mi(t$),Xf=Symbol("popper"),_w=Symbol("popperContent"),vw=on({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),r$=h.defineComponent({name:"ElPopper",inheritAttrs:!1}),n$=h.defineComponent({...r$,props:vw,setup(t,{expose:e}){const r=t,n=h.ref(),i=h.ref(),o=h.ref(),a=h.ref(),s=h.computed(()=>r.role),d={triggerRef:n,popperInstanceRef:i,contentRef:o,referenceRef:a,role:s};return e(d),h.provide(Xf,d),(p,f)=>h.renderSlot(p.$slots,"default")}});var i$=Hr(n$,[["__file","popper.vue"]]);const bw=on({arrowOffset:{type:Number,default:5}}),o$=h.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),a$=h.defineComponent({...o$,props:bw,setup(t,{expose:e}){const r=t,n=xr("popper"),{arrowOffset:i,arrowRef:o,arrowStyle:a}=h.inject(_w,void 0);return h.watch(()=>r.arrowOffset,s=>{i.value=s}),h.onBeforeUnmount(()=>{o.value=void 0}),e({arrowRef:o}),(s,d)=>(h.openBlock(),h.createElementBlock("span",{ref_key:"arrowRef",ref:o,class:h.normalizeClass(h.unref(n).e("arrow")),style:h.normalizeStyle(h.unref(a)),"data-popper-arrow":""},null,6))}});var s$=Hr(a$,[["__file","arrow.vue"]]);const Kf="ElOnlyChild",l$=h.defineComponent({name:Kf,setup(t,{slots:e,attrs:r}){var n;const i=h.inject(hw),o=LZ((n=i==null?void 0:i.setForwardRef)!=null?n:as);return()=>{var a;const s=(a=e.default)==null?void 0:a.call(e,r);if(!s)return null;if(s.length>1)return K1(Kf,"requires exact only one valid child."),null;const d=Lw(s);return d?h.withDirectives(h.cloneVNode(d,r),[[o]]):(K1(Kf,"no valid child node found"),null)}}});function Lw(t){if(!t)return null;const e=t;for(const r of e){if(Qi(r))switch(r.type){case h.Comment:continue;case h.Text:case"svg":return xw(r);case h.Fragment:return Lw(r.children);default:return r}return xw(r)}return null}function xw(t){const e=xr("only-child");return h.createVNode("span",{class:e.e("content")},[t])}const ww=on({virtualRef:{type:_r(Object)},virtualTriggering:Boolean,onMouseenter:{type:_r(Function)},onMouseleave:{type:_r(Function)},onClick:{type:_r(Function)},onKeydown:{type:_r(Function)},onFocus:{type:_r(Function)},onBlur:{type:_r(Function)},onContextmenu:{type:_r(Function)},id:String,open:Boolean}),c$=h.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),u$=h.defineComponent({...c$,props:ww,setup(t,{expose:e}){const r=t,{role:n,triggerRef:i}=h.inject(Xf,void 0);bZ(i);const o=h.computed(()=>s.value?r.id:void 0),a=h.computed(()=>{if(n&&n.value==="tooltip")return r.open&&r.id?r.id:void 0}),s=h.computed(()=>{if(n&&n.value!=="tooltip")return n.value}),d=h.computed(()=>s.value?`${r.open}`:void 0);let p;return h.onMounted(()=>{h.watch(()=>r.virtualRef,f=>{f&&(i.value=is(f))},{immediate:!0}),h.watch(i,(f,Q)=>{p==null||p(),p=void 0,pl(f)&&(["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"].forEach(m=>{var _;const v=r[m];v&&(f.addEventListener(m.slice(2).toLowerCase(),v),(_=Q==null?void 0:Q.removeEventListener)==null||_.call(Q,m.slice(2).toLowerCase(),v))}),p=h.watch([o,a,s,d],m=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((_,v)=>{u3(m[v])?f.removeAttribute(_):f.setAttribute(_,m[v])})},{immediate:!0})),pl(Q)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(m=>Q.removeAttribute(m))},{immediate:!0})}),h.onBeforeUnmount(()=>{p==null||p(),p=void 0}),e({triggerRef:i}),(f,Q)=>f.virtualTriggering?h.createCommentVNode("v-if",!0):(h.openBlock(),h.createBlock(h.unref(l$),h.mergeProps({key:0},f.$attrs,{"aria-controls":h.unref(o),"aria-describedby":h.unref(a),"aria-expanded":h.unref(d),"aria-haspopup":h.unref(s)}),{default:h.withCtx(()=>[h.renderSlot(f.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var h$=Hr(u$,[["__file","trigger.vue"]]);const Yf="focus-trap.focus-after-trapped",Jf="focus-trap.focus-after-released",d$="focus-trap.focusout-prevented",Ew={cancelable:!0,bubbles:!1},p$={cancelable:!0,bubbles:!1},Mw="focusAfterTrapped",Hw="focusAfterReleased",Sw=Symbol("elFocusTrap"),tQ=h.ref(),x9=h.ref(0),eQ=h.ref(0);let w9=0;const Cw=t=>{const e=[],r=document.createTreeWalker(t,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();)e.push(r.currentNode);return e},Aw=(t,e)=>{for(const r of t)if(!T$(r,e))return r},T$=(t,e)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1},f$=t=>{const e=Cw(t),r=Aw(e,t),n=Aw(e.reverse(),t);return[r,n]},Q$=t=>t instanceof HTMLInputElement&&"select"in t,m3=(t,e)=>{if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),eQ.value=window.performance.now(),t!==r&&Q$(t)&&e&&t.select()}};function Vw(t,e){const r=[...t],n=t.indexOf(e);return n!==-1&&r.splice(n,1),r}const m$=()=>{let t=[];return{push:n=>{const i=t[0];i&&n!==i&&i.pause(),t=Vw(t,n),t.unshift(n)},remove:n=>{var i,o;t=Vw(t,n),(o=(i=t[0])==null?void 0:i.resume)==null||o.call(i)}}},g$=(t,e=!1)=>{const r=document.activeElement;for(const n of t)if(m3(n,e),document.activeElement!==r)return},Ow=m$(),y$=()=>x9.value>eQ.value,E9=()=>{tQ.value="pointer",x9.value=window.performance.now()},kw=()=>{tQ.value="keyboard",x9.value=window.performance.now()},_$=()=>(h.onMounted(()=>{w9===0&&(document.addEventListener("mousedown",E9),document.addEventListener("touchstart",E9),document.addEventListener("keydown",kw)),w9++}),h.onBeforeUnmount(()=>{w9--,w9<=0&&(document.removeEventListener("mousedown",E9),document.removeEventListener("touchstart",E9),document.removeEventListener("keydown",kw))}),{focusReason:tQ,lastUserFocusTimestamp:x9,lastAutomatedFocusTimestamp:eQ}),M9=t=>new CustomEvent(d$,{...p$,detail:t}),v$=h.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Mw,Hw,"focusin","focusout","focusout-prevented","release-requested"],setup(t,{emit:e}){const r=h.ref();let n,i;const{focusReason:o}=_$();mZ(v=>{t.trapped&&!a.paused&&e("release-requested",v)});const a={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},s=v=>{if(!t.loop&&!t.trapped||a.paused)return;const{key:b,altKey:M,ctrlKey:E,metaKey:V,currentTarget:O,shiftKey:R}=v,{loop:j}=t,G=b===Xi.tab&&!M&&!E&&!V,z=document.activeElement;if(G&&z){const J=O,[tt,ot]=f$(J);if(tt&&ot){if(!R&&z===ot){const Tt=M9({focusReason:o.value});e("focusout-prevented",Tt),Tt.defaultPrevented||(v.preventDefault(),j&&m3(tt,!0))}else if(R&&[tt,J].includes(z)){const Tt=M9({focusReason:o.value});e("focusout-prevented",Tt),Tt.defaultPrevented||(v.preventDefault(),j&&m3(ot,!0))}}else if(z===J){const Tt=M9({focusReason:o.value});e("focusout-prevented",Tt),Tt.defaultPrevented||v.preventDefault()}}};h.provide(Sw,{focusTrapRef:r,onKeydown:s}),h.watch(()=>t.focusTrapEl,v=>{v&&(r.value=v)},{immediate:!0}),h.watch([r],([v],[b])=>{v&&(v.addEventListener("keydown",s),v.addEventListener("focusin",f),v.addEventListener("focusout",Q)),b&&(b.removeEventListener("keydown",s),b.removeEventListener("focusin",f),b.removeEventListener("focusout",Q))});const d=v=>{e(Mw,v)},p=v=>e(Hw,v),f=v=>{const b=h.unref(r);if(!b)return;const M=v.target,E=v.relatedTarget,V=M&&b.contains(M);t.trapped||E&&b.contains(E)||(n=E),V&&e("focusin",v),!a.paused&&t.trapped&&(V?i=M:m3(i,!0))},Q=v=>{const b=h.unref(r);if(!(a.paused||!b))if(t.trapped){const M=v.relatedTarget;!u3(M)&&!b.contains(M)&&setTimeout(()=>{if(!a.paused&&t.trapped){const E=M9({focusReason:o.value});e("focusout-prevented",E),E.defaultPrevented||m3(i,!0)}},0)}else{const M=v.target;M&&b.contains(M)||e("focusout",v)}};async function m(){await h.nextTick();const v=h.unref(r);if(v){Ow.push(a);const b=v.contains(document.activeElement)?n:document.activeElement;if(n=b,!v.contains(b)){const E=new Event(Yf,Ew);v.addEventListener(Yf,d),v.dispatchEvent(E),E.defaultPrevented||h.nextTick(()=>{let V=t.focusStartEl;W1(V)||(m3(V),document.activeElement!==V&&(V="first")),V==="first"&&g$(Cw(v),!0),(document.activeElement===b||V==="container")&&m3(v)})}}}function _(){const v=h.unref(r);if(v){v.removeEventListener(Yf,d);const b=new CustomEvent(Jf,{...Ew,detail:{focusReason:o.value}});v.addEventListener(Jf,p),v.dispatchEvent(b),!b.defaultPrevented&&(o.value=="keyboard"||!y$()||v.contains(document.activeElement))&&m3(n??document.body),v.removeEventListener(Jf,p),Ow.remove(a)}}return h.onMounted(()=>{t.trapped&&m(),h.watch(()=>t.trapped,v=>{v?m():_()})}),h.onBeforeUnmount(()=>{t.trapped&&_()}),{onKeydown:s}}});function b$(t,e,r,n,i,o){return h.renderSlot(t.$slots,"default",{handleKeydown:t.onKeydown})}var Pw=Hr(v$,[["render",b$],["__file","focus-trap.vue"]]);const L$=["fixed","absolute"],x$=on({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:_r(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:Q9,default:"bottom"},popperOptions:{type:_r(Object),default:()=>({})},strategy:{type:String,values:L$,default:"absolute"}}),Iw=on({...x$,id:String,style:{type:_r([String,Array,Object])},className:{type:_r([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:_r([String,Array,Object])},popperStyle:{type:_r([String,Array,Object])},referenceEl:{type:_r(Object)},triggerTargetEl:{type:_r(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},ariaLabel:{type:String,default:void 0},virtualTriggering:Boolean,zIndex:Number}),w$={mouseenter:t=>t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},E$=(t,e=[])=>{const{placement:r,strategy:n,popperOptions:i}=t,o={placement:r,strategy:n,...i,modifiers:[...H$(t),...e]};return S$(o,i==null?void 0:i.modifiers),o},M$=t=>{if(T1)return is(t)};function H$(t){const{offset:e,gpuAcceleration:r,fallbackPlacements:n}=t;return[{name:"offset",options:{offset:[0,e??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 S$(t,e){e&&(t.modifiers=[...t.modifiers,...e??[]])}const C$=0,A$=t=>{const{popperInstanceRef:e,contentRef:r,triggerRef:n,role:i}=h.inject(Xf,void 0),o=h.ref(),a=h.ref(),s=h.computed(()=>({name:"eventListeners",enabled:!!t.visible})),d=h.computed(()=>{var E;const V=h.unref(o),O=(E=h.unref(a))!=null?E:C$;return{name:"arrow",enabled:!Qx(V),options:{element:V,padding:O}}}),p=h.computed(()=>({onFirstUpdate:()=>{v()},...E$(t,[h.unref(d),h.unref(s)])})),f=h.computed(()=>M$(t.referenceEl)||h.unref(n)),{attributes:Q,state:m,styles:_,update:v,forceUpdate:b,instanceRef:M}=TZ(f,r,p);return h.watch(M,E=>e.value=E),h.onMounted(()=>{h.watch(()=>{var E;return(E=h.unref(f))==null?void 0:E.getBoundingClientRect()},()=>{v()})}),{attributes:Q,arrowRef:o,contentRef:r,instanceRef:M,state:m,styles:_,role:i,forceUpdate:b,update:v}},V$=(t,{attributes:e,styles:r,role:n})=>{const{nextZIndex:i}=Zf(),o=xr("popper"),a=h.computed(()=>h.unref(e).popper),s=h.ref(X1(t.zIndex)?t.zIndex:i()),d=h.computed(()=>[o.b(),o.is("pure",t.pure),o.is(t.effect),t.popperClass]),p=h.computed(()=>[{zIndex:h.unref(s)},h.unref(r).popper,t.popperStyle||{}]),f=h.computed(()=>n.value==="dialog"?"false":void 0),Q=h.computed(()=>h.unref(r).arrow||{});return{ariaModal:f,arrowStyle:Q,contentAttrs:a,contentClass:d,contentStyle:p,contentZIndex:s,updateZIndex:()=>{s.value=X1(t.zIndex)?t.zIndex:i()}}},O$=(t,e)=>{const r=h.ref(!1),n=h.ref();return{focusStartRef:n,trapped:r,onFocusAfterReleased:p=>{var f;((f=p.detail)==null?void 0:f.focusReason)!=="pointer"&&(n.value="first",e("blur"))},onFocusAfterTrapped:()=>{e("focus")},onFocusInTrap:p=>{t.visible&&!r.value&&(p.target&&(n.value=p.target),r.value=!0)},onFocusoutPrevented:p=>{t.trapping||(p.detail.focusReason==="pointer"&&p.preventDefault(),r.value=!1)},onReleaseRequested:()=>{r.value=!1,e("close")}}},k$=h.defineComponent({name:"ElPopperContent"}),P$=h.defineComponent({...k$,props:Iw,emits:w$,setup(t,{expose:e,emit:r}){const n=t,{focusStartRef:i,trapped:o,onFocusAfterReleased:a,onFocusAfterTrapped:s,onFocusInTrap:d,onFocusoutPrevented:p,onReleaseRequested:f}=O$(n,r),{attributes:Q,arrowRef:m,contentRef:_,styles:v,instanceRef:b,role:M,update:E}=A$(n),{ariaModal:V,arrowStyle:O,contentAttrs:R,contentClass:j,contentStyle:G,updateZIndex:z}=V$(n,{styles:v,attributes:Q,role:M}),J=h.inject(xl,void 0),tt=h.ref();h.provide(_w,{arrowStyle:O,arrowRef:m,arrowOffset:tt}),J&&(J.addInputId||J.removeInputId)&&h.provide(xl,{...J,addInputId:as,removeInputId:as});let ot;const et=(At=!0)=>{E(),At&&z()},Tt=()=>{et(!1),n.visible&&n.focusOnShow?o.value=!0:n.visible===!1&&(o.value=!1)};return h.onMounted(()=>{h.watch(()=>n.triggerTargetEl,(At,Ut)=>{ot==null||ot(),ot=void 0;const ee=h.unref(At||_.value),ue=h.unref(Ut||_.value);pl(ee)&&(ot=h.watch([M,()=>n.ariaLabel,V,()=>n.id],Ft=>{["role","aria-label","aria-modal","id"].forEach((pe,lr)=>{u3(Ft[lr])?ee.removeAttribute(pe):ee.setAttribute(pe,Ft[lr])})},{immediate:!0})),ue!==ee&&pl(ue)&&["role","aria-label","aria-modal","id"].forEach(Ft=>{ue.removeAttribute(Ft)})},{immediate:!0}),h.watch(()=>n.visible,Tt,{immediate:!0})}),h.onBeforeUnmount(()=>{ot==null||ot(),ot=void 0}),e({popperContentRef:_,popperInstanceRef:b,updatePopper:et,contentStyle:G}),(At,Ut)=>(h.openBlock(),h.createElementBlock("div",h.mergeProps({ref_key:"contentRef",ref:_},h.unref(R),{style:h.unref(G),class:h.unref(j),tabindex:"-1",onMouseenter:Ut[0]||(Ut[0]=ee=>At.$emit("mouseenter",ee)),onMouseleave:Ut[1]||(Ut[1]=ee=>At.$emit("mouseleave",ee))}),[h.createVNode(h.unref(Pw),{trapped:h.unref(o),"trap-on-focus-in":!0,"focus-trap-el":h.unref(_),"focus-start-el":h.unref(i),onFocusAfterTrapped:h.unref(s),onFocusAfterReleased:h.unref(a),onFocusin:h.unref(d),onFocusoutPrevented:h.unref(p),onReleaseRequested:h.unref(f)},{default:h.withCtx(()=>[h.renderSlot(At.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}});var I$=Hr(P$,[["__file","content.vue"]]);const R$=mi(i$),rQ=Symbol("elTooltip"),Oo=on({..._Z,...Iw,appendTo:{type:_r([String,Object])},content:{type:String,default:""},rawContent:{type:Boolean,default:!1},persistent:Boolean,ariaLabel:String,visible:{type:_r(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean}),wl=on({...ww,disabled:Boolean,trigger:{type:_r([String,Array]),default:"hover"},triggerKeys:{type:_r(Array),default:()=>[Xi.enter,Xi.space]}}),{useModelToggleProps:N$,useModelToggleEmits:B$,useModelToggle:D$}=Rx("visible"),F$=on({...vw,...N$,...Oo,...wl,...bw,showArrow:{type:Boolean,default:!0}}),j$=[...B$,"before-show","before-hide","show","hide","open","close"],z$=(t,e)=>Vi(t)?t.includes(e):t===e,c5=(t,e,r)=>n=>{z$(h.unref(t),e)&&r(n)},U$=h.defineComponent({name:"ElTooltipTrigger"}),G$=h.defineComponent({...U$,props:wl,setup(t,{expose:e}){const r=t,n=xr("tooltip"),{controlled:i,id:o,open:a,onOpen:s,onClose:d,onToggle:p}=h.inject(rQ,void 0),f=h.ref(null),Q=()=>{if(h.unref(i)||r.disabled)return!0},m=h.toRef(r,"trigger"),_=ns(Q,c5(m,"hover",s)),v=ns(Q,c5(m,"hover",d)),b=ns(Q,c5(m,"click",R=>{R.button===0&&p(R)})),M=ns(Q,c5(m,"focus",s)),E=ns(Q,c5(m,"focus",d)),V=ns(Q,c5(m,"contextmenu",R=>{R.preventDefault(),p(R)})),O=ns(Q,R=>{const{code:j}=R;r.triggerKeys.includes(j)&&(R.preventDefault(),p(R))});return e({triggerRef:f}),(R,j)=>(h.openBlock(),h.createBlock(h.unref(h$),{id:h.unref(o),"virtual-ref":R.virtualRef,open:h.unref(a),"virtual-triggering":R.virtualTriggering,class:h.normalizeClass(h.unref(n).e("trigger")),onBlur:h.unref(E),onClick:h.unref(b),onContextmenu:h.unref(V),onFocus:h.unref(M),onMouseenter:h.unref(_),onMouseleave:h.unref(v),onKeydown:h.unref(O)},{default:h.withCtx(()=>[h.renderSlot(R.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var Z$=Hr(G$,[["__file","trigger.vue"]]);const $$=h.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),q$=h.defineComponent({...$$,props:Oo,setup(t,{expose:e}){const r=t,{selector:n}=uw(),i=xr("tooltip"),o=h.ref(null),a=h.ref(!1),{controlled:s,id:d,open:p,trigger:f,onClose:Q,onOpen:m,onShow:_,onHide:v,onBeforeShow:b,onBeforeHide:M}=h.inject(rQ,void 0),E=h.computed(()=>r.transition||`${i.namespace.value}-fade-in-linear`),V=h.computed(()=>process.env.NODE_ENV==="test"?!0:r.persistent);h.onBeforeUnmount(()=>{a.value=!0});const O=h.computed(()=>h.unref(V)?!0:h.unref(p)),R=h.computed(()=>r.disabled?!1:h.unref(p)),j=h.computed(()=>r.appendTo||n.value),G=h.computed(()=>{var Ft;return(Ft=r.style)!=null?Ft:{}}),z=h.computed(()=>!h.unref(p)),J=()=>{v()},tt=()=>{if(h.unref(s))return!0},ot=ns(tt,()=>{r.enterable&&h.unref(f)==="hover"&&m()}),et=ns(tt,()=>{h.unref(f)==="hover"&&Q()}),Tt=()=>{var Ft,pe;(pe=(Ft=o.value)==null?void 0:Ft.updatePopper)==null||pe.call(Ft),b==null||b()},At=()=>{M==null||M()},Ut=()=>{_(),ue=XB(h.computed(()=>{var Ft;return(Ft=o.value)==null?void 0:Ft.popperContentRef}),()=>{if(h.unref(s))return;h.unref(f)!=="hover"&&Q()})},ee=()=>{r.virtualTriggering||Q()};let ue;return h.watch(()=>h.unref(p),Ft=>{Ft||ue==null||ue()},{flush:"post"}),h.watch(()=>r.content,()=>{var Ft,pe;(pe=(Ft=o.value)==null?void 0:Ft.updatePopper)==null||pe.call(Ft)}),e({contentRef:o}),(Ft,pe)=>(h.openBlock(),h.createBlock(h.Teleport,{disabled:!Ft.teleported,to:h.unref(j)},[h.createVNode(h.Transition,{name:h.unref(E),onAfterLeave:J,onBeforeEnter:Tt,onAfterEnter:Ut,onBeforeLeave:At},{default:h.withCtx(()=>[h.unref(O)?h.withDirectives((h.openBlock(),h.createBlock(h.unref(I$),h.mergeProps({key:0,id:h.unref(d),ref_key:"contentRef",ref:o},Ft.$attrs,{"aria-label":Ft.ariaLabel,"aria-hidden":h.unref(z),"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,h.unref(G)],"reference-el":Ft.referenceEl,"trigger-target-el":Ft.triggerTargetEl,visible:h.unref(R),"z-index":Ft.zIndex,onMouseenter:h.unref(ot),onMouseleave:h.unref(et),onBlur:ee,onClose:h.unref(Q)}),{default:h.withCtx(()=>[a.value?h.createCommentVNode("v-if",!0):h.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"])),[[h.vShow,h.unref(R)]]):h.createCommentVNode("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"]))}});var W$=Hr(q$,[["__file","content.vue"]]);const X$=["innerHTML"],K$={key:1},Y$=h.defineComponent({name:"ElTooltip"}),J$=h.defineComponent({...Y$,props:F$,emits:j$,setup(t,{expose:e,emit:r}){const n=t;yZ();const i=C4(),o=h.ref(),a=h.ref(),s=()=>{var E;const V=h.unref(o);V&&((E=V.popperInstanceRef)==null||E.update())},d=h.ref(!1),p=h.ref(),{show:f,hide:Q,hasUpdateHandler:m}=D$({indicator:d,toggleReason:p}),{onOpen:_,onClose:v}=vZ({showAfter:h.toRef(n,"showAfter"),hideAfter:h.toRef(n,"hideAfter"),autoClose:h.toRef(n,"autoClose"),open:f,close:Q}),b=h.computed(()=>hs(n.visible)&&!m.value);h.provide(rQ,{controlled:b,id:i,open:h.readonly(d),trigger:h.toRef(n,"trigger"),onOpen:E=>{_(E)},onClose:E=>{v(E)},onToggle:E=>{h.unref(d)?v(E):_(E)},onShow:()=>{r("show",p.value)},onHide:()=>{r("hide",p.value)},onBeforeShow:()=>{r("before-show",p.value)},onBeforeHide:()=>{r("before-hide",p.value)},updatePopper:s}),h.watch(()=>n.disabled,E=>{E&&d.value&&(d.value=!1)});const M=E=>{var V,O;const R=(O=(V=a.value)==null?void 0:V.contentRef)==null?void 0:O.popperContentRef,j=(E==null?void 0:E.relatedTarget)||document.activeElement;return R&&R.contains(j)};return h.onDeactivated(()=>d.value&&Q()),e({popperRef:o,contentRef:a,isFocusInsideContent:M,updatePopper:s,onOpen:_,onClose:v,hide:Q}),(E,V)=>(h.openBlock(),h.createBlock(h.unref(R$),{ref_key:"popperRef",ref:o,role:E.role},{default:h.withCtx(()=>[h.createVNode(Z$,{disabled:E.disabled,trigger:E.trigger,"trigger-keys":E.triggerKeys,"virtual-ref":E.virtualRef,"virtual-triggering":E.virtualTriggering},{default:h.withCtx(()=>[E.$slots.default?h.renderSlot(E.$slots,"default",{key:0}):h.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),h.createVNode(W$,{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:h.withCtx(()=>[h.renderSlot(E.$slots,"content",{},()=>[E.rawContent?(h.openBlock(),h.createElementBlock("span",{key:0,innerHTML:E.content},null,8,X$)):(h.openBlock(),h.createElementBlock("span",K$,h.toDisplayString(E.content),1))]),E.showArrow?(h.openBlock(),h.createBlock(h.unref(s$),{key:0,"arrow-offset":E.arrowOffset},null,8,["arrow-offset"])):h.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 tq=Hr(J$,[["__file","tooltip.vue"]]);const nQ=mi(tq),Rw=Symbol("buttonGroupContextKey"),eq=(t,e)=>{Af({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},h.computed(()=>t.type==="text"));const r=h.inject(Rw,void 0),n=b9("button"),{form:i}=Q3(),o=f3(h.computed(()=>r==null?void 0:r.size)),a=a5(),s=h.ref(),d=h.useSlots(),p=h.computed(()=>t.type||(r==null?void 0:r.type)||""),f=h.computed(()=>{var v,b,M;return(M=(b=t.autoInsertSpace)!=null?b:(v=n.value)==null?void 0:v.autoInsertSpace)!=null?M:!1}),Q=h.computed(()=>t.tag==="button"?{ariaDisabled:a.value||t.loading,disabled:a.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),m=h.computed(()=>{var v;const b=(v=d.default)==null?void 0:v.call(d);if(f.value&&(b==null?void 0:b.length)===1){const M=b[0];if((M==null?void 0:M.type)===h.Text){const E=M.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(E.trim())}}return!1});return{_disabled:a,_size:o,_type:p,_ref:s,_props:Q,shouldAddSpace:m,handleClick:v=>{t.nativeType==="reset"&&(i==null||i.resetFields()),e("click",v)}}},iQ=on({size:T3,disabled:Boolean,type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:ps},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:ps,default:()=>Cf},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:_r([String,Object]),default:"button"}}),rq={click:t=>t instanceof MouseEvent};function gi(t,e){nq(t)&&(t="100%");var r=iq(t);return t=e===360?t:Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:(e===360?t=(t<0?t%e+e:t%e)/parseFloat(String(e)):t=t%e/parseFloat(String(e)),t)}function H9(t){return Math.min(1,Math.max(0,t))}function nq(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function iq(t){return typeof t=="string"&&t.indexOf("%")!==-1}function Nw(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function S9(t){return t<=1?"".concat(Number(t)*100,"%"):t}function A4(t){return t.length===1?"0"+t:String(t)}function oq(t,e,r){return{r:gi(t,255)*255,g:gi(e,255)*255,b:gi(r,255)*255}}function Bw(t,e,r){t=gi(t,255),e=gi(e,255),r=gi(r,255);var n=Math.max(t,e,r),i=Math.min(t,e,r),o=0,a=0,s=(n+i)/2;if(n===i)a=0,o=0;else{var d=n-i;switch(a=s>.5?d/(2-n-i):d/(n+i),n){case t:o=(e-r)/d+(e<r?6:0);break;case e:o=(r-t)/d+2;break;case r:o=(t-e)/d+4;break}o/=6}return{h:o,s:a,l:s}}function oQ(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*(6*r):r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function aq(t,e,r){var n,i,o;if(t=gi(t,360),e=gi(e,100),r=gi(r,100),e===0)i=r,o=r,n=r;else{var a=r<.5?r*(1+e):r+e-r*e,s=2*r-a;n=oQ(s,a,t+1/3),i=oQ(s,a,t),o=oQ(s,a,t-1/3)}return{r:n*255,g:i*255,b:o*255}}function Dw(t,e,r){t=gi(t,255),e=gi(e,255),r=gi(r,255);var n=Math.max(t,e,r),i=Math.min(t,e,r),o=0,a=n,s=n-i,d=n===0?0:s/n;if(n===i)o=0;else{switch(n){case t:o=(e-r)/s+(e<r?6:0);break;case e:o=(r-t)/s+2;break;case r:o=(t-e)/s+4;break}o/=6}return{h:o,s:d,v:a}}function sq(t,e,r){t=gi(t,360)*6,e=gi(e,100),r=gi(r,100);var n=Math.floor(t),i=t-n,o=r*(1-e),a=r*(1-i*e),s=r*(1-(1-i)*e),d=n%6,p=[r,a,o,o,s,r][d],f=[s,r,r,a,o,o][d],Q=[o,o,s,r,r,a][d];return{r:p*255,g:f*255,b:Q*255}}function Fw(t,e,r,n){var i=[A4(Math.round(t).toString(16)),A4(Math.round(e).toString(16)),A4(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 lq(t,e,r,n,i){var o=[A4(Math.round(t).toString(16)),A4(Math.round(e).toString(16)),A4(Math.round(r).toString(16)),A4(cq(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 cq(t){return Math.round(parseFloat(t)*255).toString(16)}function jw(t){return ko(t)/255}function ko(t){return parseInt(t,16)}function uq(t){return{r:t>>16,g:(t&65280)>>8,b:t&255}}var aQ={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 hq(t){var e={r:0,g:0,b:0},r=1,n=null,i=null,o=null,a=!1,s=!1;return typeof t=="string"&&(t=Tq(t)),typeof t=="object"&&(fs(t.r)&&fs(t.g)&&fs(t.b)?(e=oq(t.r,t.g,t.b),a=!0,s=String(t.r).substr(-1)==="%"?"prgb":"rgb"):fs(t.h)&&fs(t.s)&&fs(t.v)?(n=S9(t.s),i=S9(t.v),e=sq(t.h,n,i),a=!0,s="hsv"):fs(t.h)&&fs(t.s)&&fs(t.l)&&(n=S9(t.s),o=S9(t.l),e=aq(t.h,n,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(r=t.a)),r=Nw(r),{ok:a,format:t.format||s,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:r}}var dq="[-\\+]?\\d+%?",pq="[-\\+]?\\d*\\.\\d+%?",g3="(?:".concat(pq,")|(?:").concat(dq,")"),sQ="[\\s|\\(]+(".concat(g3,")[,|\\s]+(").concat(g3,")[,|\\s]+(").concat(g3,")\\s*\\)?"),lQ="[\\s|\\(]+(".concat(g3,")[,|\\s]+(").concat(g3,")[,|\\s]+(").concat(g3,")[,|\\s]+(").concat(g3,")\\s*\\)?"),k2={CSS_UNIT:new RegExp(g3),rgb:new RegExp("rgb"+sQ),rgba:new RegExp("rgba"+lQ),hsl:new RegExp("hsl"+sQ),hsla:new RegExp("hsla"+lQ),hsv:new RegExp("hsv"+sQ),hsva:new RegExp("hsva"+lQ),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 Tq(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if(aQ[t])t=aQ[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=k2.rgb.exec(t);return r?{r:r[1],g:r[2],b:r[3]}:(r=k2.rgba.exec(t),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=k2.hsl.exec(t),r?{h:r[1],s:r[2],l:r[3]}:(r=k2.hsla.exec(t),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=k2.hsv.exec(t),r?{h:r[1],s:r[2],v:r[3]}:(r=k2.hsva.exec(t),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=k2.hex8.exec(t),r?{r:ko(r[1]),g:ko(r[2]),b:ko(r[3]),a:jw(r[4]),format:e?"name":"hex8"}:(r=k2.hex6.exec(t),r?{r:ko(r[1]),g:ko(r[2]),b:ko(r[3]),format:e?"name":"hex"}:(r=k2.hex4.exec(t),r?{r:ko(r[1]+r[1]),g:ko(r[2]+r[2]),b:ko(r[3]+r[3]),a:jw(r[4]+r[4]),format:e?"name":"hex8"}:(r=k2.hex3.exec(t),r?{r:ko(r[1]+r[1]),g:ko(r[2]+r[2]),b:ko(r[3]+r[3]),format:e?"name":"hex"}:!1)))))))))}function fs(t){return!!k2.CSS_UNIT.exec(String(t))}var fq=function(){function t(e,r){e===void 0&&(e=""),r===void 0&&(r={});var n;if(e instanceof t)return e;typeof e=="number"&&(e=uq(e)),this.originalInput=e;var i=hq(e);this.originalInput=e,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 t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},t.prototype.getLuminance=function(){var e=this.toRgb(),r,n,i,o=e.r/255,a=e.g/255,s=e.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},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(e){return this.a=Nw(e),this.roundA=Math.round(100*this.a)/100,this},t.prototype.isMonochrome=function(){var e=this.toHsl().s;return e===0},t.prototype.toHsv=function(){var e=Dw(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},t.prototype.toHsvString=function(){var e=Dw(this.r,this.g,this.b),r=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var e=Bw(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},t.prototype.toHslString=function(){var e=Bw(this.r,this.g,this.b),r=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(e){return e===void 0&&(e=!1),Fw(this.r,this.g,this.b,e)},t.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},t.prototype.toHex8=function(e){return e===void 0&&(e=!1),lq(this.r,this.g,this.b,this.a,e)},t.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},t.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var e=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(r,", ").concat(n,")"):"rgba(".concat(e,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var e=function(r){return"".concat(Math.round(gi(r,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var e=function(r){return Math.round(gi(r,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+Fw(this.r,this.g,this.b,!1),r=0,n=Object.entries(aQ);r<n.length;r++){var i=n[r],o=i[0],a=i[1];if(e===a)return o}return!1},t.prototype.toString=function(e){var r=!!e;e=e??this.format;var n=!1,i=this.a<1&&this.a>=0,o=!r&&i&&(e.startsWith("hex")||e==="name");return o?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.l+=e/100,r.l=H9(r.l),new t(r)},t.prototype.brighten=function(e){e===void 0&&(e=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(e/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(e/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(e/100)))),new t(r)},t.prototype.darken=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.l-=e/100,r.l=H9(r.l),new t(r)},t.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},t.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},t.prototype.desaturate=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.s-=e/100,r.s=H9(r.s),new t(r)},t.prototype.saturate=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.s+=e/100,r.s=H9(r.s),new t(r)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var r=this.toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,new t(r)},t.prototype.mix=function(e,r){r===void 0&&(r=50);var n=this.toRgb(),i=new t(e).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 t(a)},t.prototype.analogous=function(e,r){e===void 0&&(e=6),r===void 0&&(r=30);var n=this.toHsl(),i=360/r,o=[this];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,o.push(new t(n));return o},t.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new t(e)},t.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var r=this.toHsv(),n=r.h,i=r.s,o=r.v,a=[],s=1/e;e--;)a.push(new t({h:n,s:i,v:o})),o=(o+s)%1;return a},t.prototype.splitcomplement=function(){var e=this.toHsl(),r=e.h;return[this,new t({h:(r+72)%360,s:e.s,l:e.l}),new t({h:(r+216)%360,s:e.s,l:e.l})]},t.prototype.onBackground=function(e){var r=this.toRgb(),n=new t(e).toRgb(),i=r.a+n.a*(1-r.a);return new t({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})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(e){for(var r=this.toHsl(),n=r.h,i=[this],o=360/e,a=1;a<e;a++)i.push(new t({h:(n+a*o)%360,s:r.s,l:r.l}));return i},t.prototype.equals=function(e){return this.toRgbString()===new t(e).toRgbString()},t}();function y3(t,e=20){return t.mix("#141414",e).toString()}function Qq(t){const e=a5(),r=xr("button");return h.computed(()=>{let n={};const i=t.color;if(i){const o=new fq(i),a=t.dark?o.tint(20).toString():y3(o,20);if(t.plain)n=r.cssVarBlock({"bg-color":t.dark?y3(o,90):o.tint(90).toString(),"text-color":i,"border-color":t.dark?y3(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}),e.value&&(n[r.cssVarBlockName("disabled-bg-color")]=t.dark?y3(o,90):o.tint(90).toString(),n[r.cssVarBlockName("disabled-text-color")]=t.dark?y3(o,50):o.tint(50).toString(),n[r.cssVarBlockName("disabled-border-color")]=t.dark?y3(o,80):o.tint(80).toString());else{const s=t.dark?y3(o,30):o.tint(30).toString(),d=o.isDark()?`var(${r.cssVarName("color-white")})`:`var(${r.cssVarName("color-black")})`;if(n=r.cssVarBlock({"bg-color":i,"text-color":d,"border-color":i,"hover-bg-color":s,"hover-text-color":d,"hover-border-color":s,"active-bg-color":a,"active-border-color":a}),e.value){const p=t.dark?y3(o,50):o.tint(50).toString();n[r.cssVarBlockName("disabled-bg-color")]=p,n[r.cssVarBlockName("disabled-text-color")]=t.dark?"rgba(255, 255, 255, 0.5)":`var(${r.cssVarName("color-white")})`,n[r.cssVarBlockName("disabled-border-color")]=p}}}return n})}const mq=h.defineComponent({name:"ElButton"}),gq=h.defineComponent({...mq,props:iQ,emits:rq,setup(t,{expose:e,emit:r}){const n=t,i=Qq(n),o=xr("button"),{_ref:a,_size:s,_type:d,_disabled:p,_props:f,shouldAddSpace:Q,handleClick:m}=eq(n,r);return e({ref:a,size:s,type:d,disabled:p,shouldAddSpace:Q}),(_,v)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(_.tag),h.mergeProps({ref_key:"_ref",ref:a},h.unref(f),{class:[h.unref(o).b(),h.unref(o).m(h.unref(d)),h.unref(o).m(h.unref(s)),h.unref(o).is("disabled",h.unref(p)),h.unref(o).is("loading",_.loading),h.unref(o).is("plain",_.plain),h.unref(o).is("round",_.round),h.unref(o).is("circle",_.circle),h.unref(o).is("text",_.text),h.unref(o).is("link",_.link),h.unref(o).is("has-bg",_.bg)],style:h.unref(i),onClick:h.unref(m)}),{default:h.withCtx(()=>[_.loading?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[_.$slots.loading?h.renderSlot(_.$slots,"loading",{key:0}):(h.openBlock(),h.createBlock(h.unref(F1),{key:1,class:h.normalizeClass(h.unref(o).is("loading"))},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(_.loadingIcon)))]),_:1},8,["class"]))],64)):_.icon||_.$slots.icon?(h.openBlock(),h.createBlock(h.unref(F1),{key:1},{default:h.withCtx(()=>[_.icon?(h.openBlock(),h.createBlock(h.resolveDynamicComponent(_.icon),{key:0})):h.renderSlot(_.$slots,"icon",{key:1})]),_:3})):h.createCommentVNode("v-if",!0),_.$slots.default?(h.openBlock(),h.createElementBlock("span",{key:2,class:h.normalizeClass({[h.unref(o).em("text","expand")]:h.unref(Q)})},[h.renderSlot(_.$slots,"default")],2)):h.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var yq=Hr(gq,[["__file","button.vue"]]);const _q={size:iQ.size,type:iQ.type},vq=h.defineComponent({name:"ElButtonGroup"}),bq=h.defineComponent({...vq,props:_q,setup(t){const e=t;h.provide(Rw,h.reactive({size:h.toRef(e,"size"),type:h.toRef(e,"type")}));const r=xr("button");return(n,i)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(`${h.unref(r).b("group")}`)},[h.renderSlot(n.$slots,"default")],2))}});var zw=Hr(bq,[["__file","button-group.vue"]]);const Qo=mi(yq,{ButtonGroup:zw}),Uw=A2(zw);var Lq=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xq(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}const _3=new Map;let Gw;T1&&(document.addEventListener("mousedown",t=>Gw=t),document.addEventListener("mouseup",t=>{for(const e of _3.values())for(const{documentHandler:r}of e)r(t,Gw)}));function Zw(t,e){let r=[];return Array.isArray(e.arg)?r=e.arg:pl(e.arg)&&r.push(e.arg),function(n,i){const o=e.instance.popperRef,a=n.target,s=i==null?void 0:i.target,d=!e||!e.instance,p=!a||!s,f=t.contains(a)||t.contains(s),Q=t===a,m=r.length&&r.some(v=>v==null?void 0:v.contains(a))||r.length&&r.includes(s),_=o&&(o.contains(a)||o.contains(s));d||p||f||Q||m||_||e.value(n,i)}}const $w={beforeMount(t,e){_3.has(t)||_3.set(t,[]),_3.get(t).push({documentHandler:Zw(t,e),bindingFn:e.value})},updated(t,e){_3.has(t)||_3.set(t,[]);const r=_3.get(t),n=r.findIndex(o=>o.bindingFn===e.oldValue),i={documentHandler:Zw(t,e),bindingFn:e.value};n>=0?r.splice(n,1,i):r.push(i)},unmounted(t){_3.delete(t)}},wq=on({header:{type:String,default:""},footer:{type:String,default:""},bodyStyle:{type:_r([String,Object,Array]),default:""},bodyClass:String,shadow:{type:String,values:["always","hover","never"],default:"always"}}),Eq=h.defineComponent({name:"ElCard"}),Mq=h.defineComponent({...Eq,props:wq,setup(t){const e=xr("card");return(r,n)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass([h.unref(e).b(),h.unref(e).is(`${r.shadow}-shadow`)])},[r.$slots.header||r.header?(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(h.unref(e).e("header"))},[h.renderSlot(r.$slots,"header",{},()=>[h.createTextVNode(h.toDisplayString(r.header),1)])],2)):h.createCommentVNode("v-if",!0),h.createElementVNode("div",{class:h.normalizeClass([h.unref(e).e("body"),r.bodyClass]),style:h.normalizeStyle(r.bodyStyle)},[h.renderSlot(r.$slots,"default")],6),r.$slots.footer||r.footer?(h.openBlock(),h.createElementBlock("div",{key:1,class:h.normalizeClass(h.unref(e).e("footer"))},[h.renderSlot(r.$slots,"footer",{},()=>[h.createTextVNode(h.toDisplayString(r.footer),1)])],2)):h.createCommentVNode("v-if",!0)],2))}});var Hq=Hr(Mq,[["__file","card.vue"]]);const qw=mi(Hq),Ww={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:T3,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0}},Xw={[f1]:t=>W1(t)||X1(t)||hs(t),change:t=>W1(t)||X1(t)||hs(t)},u5=Symbol("checkboxGroupContextKey"),Sq=({model:t,isChecked:e})=>{const r=h.inject(u5,void 0),n=h.computed(()=>{var o,a;const s=(o=r==null?void 0:r.max)==null?void 0:o.value,d=(a=r==null?void 0:r.min)==null?void 0:a.value;return!dl(s)&&t.value.length>=s&&!e.value||!dl(d)&&t.value.length<=d&&e.value});return{isDisabled:a5(h.computed(()=>(r==null?void 0:r.disabled.value)||n.value)),isLimitDisabled:n}},Cq=(t,{model:e,isLimitExceeded:r,hasOwnLabel:n,isDisabled:i,isLabeledByFormItem:o})=>{const a=h.inject(u5,void 0),{formItem:s}=Q3(),{emit:d}=h.getCurrentInstance();function p(v){var b,M;return v===t.trueLabel||v===!0?(b=t.trueLabel)!=null?b:!0:(M=t.falseLabel)!=null?M:!1}function f(v,b){d("change",p(v),b)}function Q(v){if(r.value)return;const b=v.target;d("change",p(b.checked),v)}async function m(v){r.value||!n.value&&!i.value&&o.value&&(v.composedPath().some(E=>E.tagName==="LABEL")||(e.value=p([!1,t.falseLabel].includes(e.value)),await h.nextTick(),f(e.value,v)))}const _=h.computed(()=>(a==null?void 0:a.validateEvent)||t.validateEvent);return h.watch(()=>t.modelValue,()=>{_.value&&(s==null||s.validate("change").catch(v=>K1(v)))}),{handleChange:Q,onClickRoot:m}},Aq=t=>{const e=h.ref(!1),{emit:r}=h.getCurrentInstance(),n=h.inject(u5,void 0),i=h.computed(()=>dl(n)===!1),o=h.ref(!1),a=h.computed({get(){var s,d;return i.value?(s=n==null?void 0:n.modelValue)==null?void 0:s.value:(d=t.modelValue)!=null?d:e.value},set(s){var d,p;i.value&&Vi(s)?(o.value=((d=n==null?void 0:n.max)==null?void 0:d.value)!==void 0&&s.length>(n==null?void 0:n.max.value)&&s.length>a.value.length,o.value===!1&&((p=n==null?void 0:n.changeEvent)==null||p.call(n,s))):(r(f1,s),e.value=s)}});return{model:a,isGroup:i,isLimitExceeded:o}},Vq=(t,e,{model:r})=>{const n=h.inject(u5,void 0),i=h.ref(!1),o=h.computed(()=>{const p=r.value;return hs(p)?p:Vi(p)?Qi(t.label)?p.map(h.toRaw).some(f=>hl(f,t.label)):p.map(h.toRaw).includes(t.label):p!=null?p===t.trueLabel:!!p}),a=f3(h.computed(()=>{var p;return(p=n==null?void 0:n.size)==null?void 0:p.value}),{prop:!0}),s=f3(h.computed(()=>{var p;return(p=n==null?void 0:n.size)==null?void 0:p.value})),d=h.computed(()=>!!e.default||!u3(t.label));return{checkboxButtonSize:a,isChecked:o,isFocused:i,checkboxSize:s,hasOwnLabel:d}},Oq=(t,{model:e})=>{function r(){Vi(e.value)&&!e.value.includes(t.label)?e.value.push(t.label):e.value=t.trueLabel||!0}t.checked&&r()},Kw=(t,e)=>{const{formItem:r}=Q3(),{model:n,isGroup:i,isLimitExceeded:o}=Aq(t),{isFocused:a,isChecked:s,checkboxButtonSize:d,checkboxSize:p,hasOwnLabel:f}=Vq(t,e,{model:n}),{isDisabled:Q}=Sq({model:n,isChecked:s}),{inputId:m,isLabeledByFormItem:_}=s5(t,{formItemContext:r,disableIdGeneration:f,disableIdManagement:i}),{handleChange:v,onClickRoot:b}=Cq(t,{model:n,isLimitExceeded:o,hasOwnLabel:f,isDisabled:Q,isLabeledByFormItem:_});return Oq(t,{model:n}),{inputId:m,isLabeledByFormItem:_,isChecked:s,isDisabled:Q,isFocused:a,checkboxButtonSize:d,checkboxSize:p,hasOwnLabel:f,model:n,handleChange:v,onClickRoot:b}},kq=["id","indeterminate","name","tabindex","disabled","true-value","false-value"],Pq=["id","indeterminate","disabled","value","name","tabindex"],Iq=h.defineComponent({name:"ElCheckbox"}),Rq=h.defineComponent({...Iq,props:Ww,emits:Xw,setup(t){const e=t,r=h.useSlots(),{inputId:n,isLabeledByFormItem:i,isChecked:o,isDisabled:a,isFocused:s,checkboxSize:d,hasOwnLabel:p,model:f,handleChange:Q,onClickRoot:m}=Kw(e,r),_=xr("checkbox"),v=h.computed(()=>[_.b(),_.m(d.value),_.is("disabled",a.value),_.is("bordered",e.border),_.is("checked",o.value)]),b=h.computed(()=>[_.e("input"),_.is("disabled",a.value),_.is("checked",o.value),_.is("indeterminate",e.indeterminate),_.is("focus",s.value)]);return(M,E)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(!h.unref(p)&&h.unref(i)?"span":"label"),{class:h.normalizeClass(h.unref(v)),"aria-controls":M.indeterminate?M.controls:null,onClick:h.unref(m)},{default:h.withCtx(()=>[h.createElementVNode("span",{class:h.normalizeClass(h.unref(b))},[M.trueLabel||M.falseLabel?h.withDirectives((h.openBlock(),h.createElementBlock("input",{key:0,id:h.unref(n),"onUpdate:modelValue":E[0]||(E[0]=V=>h.isRef(f)?f.value=V:null),class:h.normalizeClass(h.unref(_).e("original")),type:"checkbox",indeterminate:M.indeterminate,name:M.name,tabindex:M.tabindex,disabled:h.unref(a),"true-value":M.trueLabel,"false-value":M.falseLabel,onChange:E[1]||(E[1]=(...V)=>h.unref(Q)&&h.unref(Q)(...V)),onFocus:E[2]||(E[2]=V=>s.value=!0),onBlur:E[3]||(E[3]=V=>s.value=!1),onClick:E[4]||(E[4]=h.withModifiers(()=>{},["stop"]))},null,42,kq)),[[h.vModelCheckbox,h.unref(f)]]):h.withDirectives((h.openBlock(),h.createElementBlock("input",{key:1,id:h.unref(n),"onUpdate:modelValue":E[5]||(E[5]=V=>h.isRef(f)?f.value=V:null),class:h.normalizeClass(h.unref(_).e("original")),type:"checkbox",indeterminate:M.indeterminate,disabled:h.unref(a),value:M.label,name:M.name,tabindex:M.tabindex,onChange:E[6]||(E[6]=(...V)=>h.unref(Q)&&h.unref(Q)(...V)),onFocus:E[7]||(E[7]=V=>s.value=!0),onBlur:E[8]||(E[8]=V=>s.value=!1),onClick:E[9]||(E[9]=h.withModifiers(()=>{},["stop"]))},null,42,Pq)),[[h.vModelCheckbox,h.unref(f)]]),h.createElementVNode("span",{class:h.normalizeClass(h.unref(_).e("inner"))},null,2)],2),h.unref(p)?(h.openBlock(),h.createElementBlock("span",{key:0,class:h.normalizeClass(h.unref(_).e("label"))},[h.renderSlot(M.$slots,"default"),M.$slots.default?h.createCommentVNode("v-if",!0):(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createTextVNode(h.toDisplayString(M.label),1)],64))],2)):h.createCommentVNode("v-if",!0)]),_:3},8,["class","aria-controls","onClick"]))}});var Nq=Hr(Rq,[["__file","checkbox.vue"]]);const Bq=["name","tabindex","disabled","true-value","false-value"],Dq=["name","tabindex","disabled","value"],Fq=h.defineComponent({name:"ElCheckboxButton"}),jq=h.defineComponent({...Fq,props:Ww,emits:Xw,setup(t){const e=t,r=h.useSlots(),{isFocused:n,isChecked:i,isDisabled:o,checkboxButtonSize:a,model:s,handleChange:d}=Kw(e,r),p=h.inject(u5,void 0),f=xr("checkbox"),Q=h.computed(()=>{var _,v,b,M;const E=(v=(_=p==null?void 0:p.fill)==null?void 0:_.value)!=null?v:"";return{backgroundColor:E,borderColor:E,color:(M=(b=p==null?void 0:p.textColor)==null?void 0:b.value)!=null?M:"",boxShadow:E?`-1px 0 0 0 ${E}`:void 0}}),m=h.computed(()=>[f.b("button"),f.bm("button",a.value),f.is("disabled",o.value),f.is("checked",i.value),f.is("focus",n.value)]);return(_,v)=>(h.openBlock(),h.createElementBlock("label",{class:h.normalizeClass(h.unref(m))},[_.trueLabel||_.falseLabel?h.withDirectives((h.openBlock(),h.createElementBlock("input",{key:0,"onUpdate:modelValue":v[0]||(v[0]=b=>h.isRef(s)?s.value=b:null),class:h.normalizeClass(h.unref(f).be("button","original")),type:"checkbox",name:_.name,tabindex:_.tabindex,disabled:h.unref(o),"true-value":_.trueLabel,"false-value":_.falseLabel,onChange:v[1]||(v[1]=(...b)=>h.unref(d)&&h.unref(d)(...b)),onFocus:v[2]||(v[2]=b=>n.value=!0),onBlur:v[3]||(v[3]=b=>n.value=!1),onClick:v[4]||(v[4]=h.withModifiers(()=>{},["stop"]))},null,42,Bq)),[[h.vModelCheckbox,h.unref(s)]]):h.withDirectives((h.openBlock(),h.createElementBlock("input",{key:1,"onUpdate:modelValue":v[5]||(v[5]=b=>h.isRef(s)?s.value=b:null),class:h.normalizeClass(h.unref(f).be("button","original")),type:"checkbox",name:_.name,tabindex:_.tabindex,disabled:h.unref(o),value:_.label,onChange:v[6]||(v[6]=(...b)=>h.unref(d)&&h.unref(d)(...b)),onFocus:v[7]||(v[7]=b=>n.value=!0),onBlur:v[8]||(v[8]=b=>n.value=!1),onClick:v[9]||(v[9]=h.withModifiers(()=>{},["stop"]))},null,42,Dq)),[[h.vModelCheckbox,h.unref(s)]]),_.$slots.default||_.label?(h.openBlock(),h.createElementBlock("span",{key:2,class:h.normalizeClass(h.unref(f).be("button","inner")),style:h.normalizeStyle(h.unref(i)?h.unref(Q):void 0)},[h.renderSlot(_.$slots,"default",{},()=>[h.createTextVNode(h.toDisplayString(_.label),1)])],6)):h.createCommentVNode("v-if",!0)],2))}});var Yw=Hr(jq,[["__file","checkbox-button.vue"]]);const zq=on({modelValue:{type:_r(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:T3,label:String,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0}}),Uq={[f1]:t=>Vi(t),change:t=>Vi(t)},Gq=h.defineComponent({name:"ElCheckboxGroup"}),Zq=h.defineComponent({...Gq,props:zq,emits:Uq,setup(t,{emit:e}){const r=t,n=xr("checkbox"),{formItem:i}=Q3(),{inputId:o,isLabeledByFormItem:a}=s5(r,{formItemContext:i}),s=async p=>{e(f1,p),await h.nextTick(),e("change",p)},d=h.computed({get(){return r.modelValue},set(p){s(p)}});return h.provide(u5,{...sU(h.toRefs(r),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:d,changeEvent:s}),h.watch(()=>r.modelValue,()=>{r.validateEvent&&(i==null||i.validate("change").catch(p=>K1(p)))}),(p,f)=>{var Q;return h.openBlock(),h.createBlock(h.resolveDynamicComponent(p.tag),{id:h.unref(o),class:h.normalizeClass(h.unref(n).b("group")),role:"group","aria-label":h.unref(a)?void 0:p.label||"checkbox-group","aria-labelledby":h.unref(a)?(Q=h.unref(i))==null?void 0:Q.labelId:void 0},{default:h.withCtx(()=>[h.renderSlot(p.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var Jw=Hr(Zq,[["__file","checkbox-group.vue"]]);const C9=mi(Nq,{CheckboxButton:Yw,CheckboxGroup:Jw});A2(Yw);const cQ=A2(Jw),tE=on({size:T3,disabled:Boolean,label:{type:[String,Number,Boolean],default:""}}),$q=on({...tE,modelValue:{type:[String,Number,Boolean],default:""},name:{type:String,default:""},border:Boolean}),eE={[f1]:t=>W1(t)||X1(t)||hs(t),[p9]:t=>W1(t)||X1(t)||hs(t)},rE=Symbol("radioGroupKey"),nE=(t,e)=>{const r=h.ref(),n=h.inject(rE,void 0),i=h.computed(()=>!!n),o=h.computed({get(){return i.value?n.modelValue:t.modelValue},set(f){i.value?n.changeEvent(f):e&&e(f1,f),r.value.checked=t.modelValue===t.label}}),a=f3(h.computed(()=>n==null?void 0:n.size)),s=a5(h.computed(()=>n==null?void 0:n.disabled)),d=h.ref(!1),p=h.computed(()=>s.value||i.value&&o.value!==t.label?-1:0);return{radioRef:r,isGroup:i,radioGroup:n,focus:d,size:a,disabled:s,tabIndex:p,modelValue:o}},qq=["value","name","disabled"],Wq=h.defineComponent({name:"ElRadio"}),Xq=h.defineComponent({...Wq,props:$q,emits:eE,setup(t,{emit:e}){const r=t,n=xr("radio"),{radioRef:i,radioGroup:o,focus:a,size:s,disabled:d,modelValue:p}=nE(r,e);function f(){h.nextTick(()=>e("change",p.value))}return(Q,m)=>{var _;return h.openBlock(),h.createElementBlock("label",{class:h.normalizeClass([h.unref(n).b(),h.unref(n).is("disabled",h.unref(d)),h.unref(n).is("focus",h.unref(a)),h.unref(n).is("bordered",Q.border),h.unref(n).is("checked",h.unref(p)===Q.label),h.unref(n).m(h.unref(s))])},[h.createElementVNode("span",{class:h.normalizeClass([h.unref(n).e("input"),h.unref(n).is("disabled",h.unref(d)),h.unref(n).is("checked",h.unref(p)===Q.label)])},[h.withDirectives(h.createElementVNode("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":m[0]||(m[0]=v=>h.isRef(p)?p.value=v:null),class:h.normalizeClass(h.unref(n).e("original")),value:Q.label,name:Q.name||((_=h.unref(o))==null?void 0:_.name),disabled:h.unref(d),type:"radio",onFocus:m[1]||(m[1]=v=>a.value=!0),onBlur:m[2]||(m[2]=v=>a.value=!1),onChange:f,onClick:m[3]||(m[3]=h.withModifiers(()=>{},["stop"]))},null,42,qq),[[h.vModelRadio,h.unref(p)]]),h.createElementVNode("span",{class:h.normalizeClass(h.unref(n).e("inner"))},null,2)],2),h.createElementVNode("span",{class:h.normalizeClass(h.unref(n).e("label")),onKeydown:m[4]||(m[4]=h.withModifiers(()=>{},["stop"]))},[h.renderSlot(Q.$slots,"default",{},()=>[h.createTextVNode(h.toDisplayString(Q.label),1)])],34)],2)}}});var Kq=Hr(Xq,[["__file","radio.vue"]]);const Yq=on({...tE,name:{type:String,default:""}}),Jq=["value","name","disabled"],tW=h.defineComponent({name:"ElRadioButton"}),eW=h.defineComponent({...tW,props:Yq,setup(t){const e=t,r=xr("radio"),{radioRef:n,focus:i,size:o,disabled:a,modelValue:s,radioGroup:d}=nE(e),p=h.computed(()=>({backgroundColor:(d==null?void 0:d.fill)||"",borderColor:(d==null?void 0:d.fill)||"",boxShadow:d!=null&&d.fill?`-1px 0 0 0 ${d.fill}`:"",color:(d==null?void 0:d.textColor)||""}));return(f,Q)=>{var m;return h.openBlock(),h.createElementBlock("label",{class:h.normalizeClass([h.unref(r).b("button"),h.unref(r).is("active",h.unref(s)===f.label),h.unref(r).is("disabled",h.unref(a)),h.unref(r).is("focus",h.unref(i)),h.unref(r).bm("button",h.unref(o))])},[h.withDirectives(h.createElementVNode("input",{ref_key:"radioRef",ref:n,"onUpdate:modelValue":Q[0]||(Q[0]=_=>h.isRef(s)?s.value=_:null),class:h.normalizeClass(h.unref(r).be("button","original-radio")),value:f.label,type:"radio",name:f.name||((m=h.unref(d))==null?void 0:m.name),disabled:h.unref(a),onFocus:Q[1]||(Q[1]=_=>i.value=!0),onBlur:Q[2]||(Q[2]=_=>i.value=!1),onClick:Q[3]||(Q[3]=h.withModifiers(()=>{},["stop"]))},null,42,Jq),[[h.vModelRadio,h.unref(s)]]),h.createElementVNode("span",{class:h.normalizeClass(h.unref(r).be("button","inner")),style:h.normalizeStyle(h.unref(s)===f.label?h.unref(p):{}),onKeydown:Q[4]||(Q[4]=h.withModifiers(()=>{},["stop"]))},[h.renderSlot(f.$slots,"default",{},()=>[h.createTextVNode(h.toDisplayString(f.label),1)])],38)],2)}}});var iE=Hr(eW,[["__file","radio-button.vue"]]);const rW=on({id:{type:String,default:void 0},size:T3,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}}),nW=eE,iW=["id","aria-label","aria-labelledby"],oW=h.defineComponent({name:"ElRadioGroup"}),aW=h.defineComponent({...oW,props:rW,emits:nW,setup(t,{emit:e}){const r=t,n=xr("radio"),i=C4(),o=h.ref(),{formItem:a}=Q3(),{inputId:s,isLabeledByFormItem:d}=s5(r,{formItemContext:a}),p=Q=>{e(f1,Q),h.nextTick(()=>e("change",Q))};h.onMounted(()=>{const Q=o.value.querySelectorAll("[type=radio]"),m=Q[0];!Array.from(Q).some(_=>_.checked)&&m&&(m.tabIndex=0)});const f=h.computed(()=>r.name||i.value);return h.provide(rE,h.reactive({...h.toRefs(r),changeEvent:p,name:f})),h.watch(()=>r.modelValue,()=>{r.validateEvent&&(a==null||a.validate("change").catch(Q=>K1(Q)))}),(Q,m)=>(h.openBlock(),h.createElementBlock("div",{id:h.unref(s),ref_key:"radioGroupRef",ref:o,class:h.normalizeClass(h.unref(n).b("group")),role:"radiogroup","aria-label":h.unref(d)?void 0:Q.label||"radio-group","aria-labelledby":h.unref(d)?h.unref(a).labelId:void 0},[h.renderSlot(Q.$slots,"default")],10,iW))}});var oE=Hr(aW,[["__file","radio-group.vue"]]);const aE=mi(Kq,{RadioButton:iE,RadioGroup:oE}),sE=A2(oE);A2(iE);const lE=on({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Mx},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),sW={close:t=>t instanceof MouseEvent,click:t=>t instanceof MouseEvent},lW=h.defineComponent({name:"ElTag"}),cW=h.defineComponent({...lW,props:lE,emits:sW,setup(t,{emit:e}){const r=t,n=f3(),i=xr("tag"),o=h.computed(()=>{const{type:d,hit:p,effect:f,closable:Q,round:m}=r;return[i.b(),i.is("closable",Q),i.m(d||"primary"),i.m(n.value),i.m(f),i.is("hit",p),i.is("round",m)]}),a=d=>{e("close",d)},s=d=>{e("click",d)};return(d,p)=>d.disableTransitions?(h.openBlock(),h.createElementBlock("span",{key:0,class:h.normalizeClass(h.unref(o)),style:h.normalizeStyle({backgroundColor:d.color}),onClick:s},[h.createElementVNode("span",{class:h.normalizeClass(h.unref(i).e("content"))},[h.renderSlot(d.$slots,"default")],2),d.closable?(h.openBlock(),h.createBlock(h.unref(F1),{key:0,class:h.normalizeClass(h.unref(i).e("close")),onClick:h.withModifiers(a,["stop"])},{default:h.withCtx(()=>[h.createVNode(h.unref(Y6))]),_:1},8,["class","onClick"])):h.createCommentVNode("v-if",!0)],6)):(h.openBlock(),h.createBlock(h.Transition,{key:1,name:`${h.unref(i).namespace.value}-zoom-in-center`,appear:""},{default:h.withCtx(()=>[h.createElementVNode("span",{class:h.normalizeClass(h.unref(o)),style:h.normalizeStyle({backgroundColor:d.color}),onClick:s},[h.createElementVNode("span",{class:h.normalizeClass(h.unref(i).e("content"))},[h.renderSlot(d.$slots,"default")],2),d.closable?(h.openBlock(),h.createBlock(h.unref(F1),{key:0,class:h.normalizeClass(h.unref(i).e("close")),onClick:h.withModifiers(a,["stop"])},{default:h.withCtx(()=>[h.createVNode(h.unref(Y6))]),_:1},8,["class","onClick"])):h.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var uW=Hr(cW,[["__file","tag.vue"]]);const hW=mi(uW),cE=Symbol("rowContextKey"),dW=on({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"]}}),pW=h.defineComponent({name:"ElRow"}),TW=h.defineComponent({...pW,props:dW,setup(t){const e=t,r=xr("row"),n=h.computed(()=>e.gutter);h.provide(cE,{gutter:n});const i=h.computed(()=>{const a={};return e.gutter&&(a.marginRight=a.marginLeft=`-${e.gutter/2}px`),a}),o=h.computed(()=>[r.b(),r.is(`justify-${e.justify}`,e.justify!=="start"),r.is(`align-${e.align}`,!!e.align)]);return(a,s)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(a.tag),{class:h.normalizeClass(h.unref(o)),style:h.normalizeStyle(h.unref(i))},{default:h.withCtx(()=>[h.renderSlot(a.$slots,"default")]),_:3},8,["class","style"]))}});var fW=Hr(TW,[["__file","row.vue"]]);const P2=mi(fW),QW=on({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:_r([Number,Object]),default:()=>J6({})},sm:{type:_r([Number,Object]),default:()=>J6({})},md:{type:_r([Number,Object]),default:()=>J6({})},lg:{type:_r([Number,Object]),default:()=>J6({})},xl:{type:_r([Number,Object]),default:()=>J6({})}}),mW=h.defineComponent({name:"ElCol"}),gW=h.defineComponent({...mW,props:QW,setup(t){const e=t,{gutter:r}=h.inject(cE,{gutter:h.computed(()=>0)}),n=xr("col"),i=h.computed(()=>{const a={};return r.value&&(a.paddingLeft=a.paddingRight=`${r.value/2}px`),a}),o=h.computed(()=>{const a=[];return["span","offset","pull","push"].forEach(p=>{const f=e[p];X1(f)&&(p==="span"?a.push(n.b(`${e[p]}`)):f>0&&a.push(n.b(`${p}-${e[p]}`)))}),["xs","sm","md","lg","xl"].forEach(p=>{X1(e[p])?a.push(n.b(`${p}-${e[p]}`)):Qi(e[p])&&Object.entries(e[p]).forEach(([f,Q])=>{a.push(f!=="span"?n.b(`${p}-${f}-${Q}`):n.b(`${p}-${Q}`))})}),r.value&&a.push(n.is("guttered")),[n.b(),a]});return(a,s)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(a.tag),{class:h.normalizeClass(h.unref(o)),style:h.normalizeStyle(h.unref(i))},{default:h.withCtx(()=>[h.renderSlot(a.$slots,"default")]),_:3},8,["class","style"]))}});var yW=Hr(gW,[["__file","col.vue"]]);const ga=mi(yW),_W=h.defineComponent({name:"ElCollapseTransition"}),vW=h.defineComponent({..._W,setup(t){const e=xr("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)=>(h.openBlock(),h.createBlock(h.Transition,h.mergeProps({name:h.unref(e).b()},h.toHandlers(n)),{default:h.withCtx(()=>[h.renderSlot(i.$slots,"default")]),_:3},16,["name"]))}});var A9=Hr(vW,[["__file","collapse-transition.vue"]]);A9.install=t=>{t.component(A9.name,A9)};const bW=A9,LW=on({color:{type:_r(Object),required:!0},vertical:{type:Boolean,default:!1}});let uQ=!1;function El(t,e){if(!T1)return;const r=function(o){var a;(a=e.drag)==null||a.call(e,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,uQ=!1,(a=e.end)==null||a.call(e,o)},i=function(o){var a;uQ||(o.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",r),document.addEventListener("mouseup",n),document.addEventListener("touchmove",r),document.addEventListener("touchend",n),uQ=!0,(a=e.start)==null||a.call(e,o))};t.addEventListener("mousedown",i),t.addEventListener("touchstart",i)}const xW=t=>{const e=h.getCurrentInstance(),r=h.shallowRef(),n=h.shallowRef();function i(a){a.target!==r.value&&o(a)}function o(a){if(!n.value||!r.value)return;const d=e.vnode.el.getBoundingClientRect(),{clientX:p,clientY:f}=hf(a);if(t.vertical){let Q=f-d.top;Q=Math.max(r.value.offsetHeight/2,Q),Q=Math.min(Q,d.height-r.value.offsetHeight/2),t.color.set("alpha",Math.round((Q-r.value.offsetHeight/2)/(d.height-r.value.offsetHeight)*100))}else{let Q=p-d.left;Q=Math.max(r.value.offsetWidth/2,Q),Q=Math.min(Q,d.width-r.value.offsetWidth/2),t.color.set("alpha",Math.round((Q-r.value.offsetWidth/2)/(d.width-r.value.offsetWidth)*100))}}return{thumb:r,bar:n,handleDrag:o,handleClick:i}},wW=(t,{bar:e,thumb:r,handleDrag:n})=>{const i=h.getCurrentInstance(),o=xr("color-alpha-slider"),a=h.ref(0),s=h.ref(0),d=h.ref();function p(){if(!r.value||t.vertical)return 0;const V=i.vnode.el,O=t.color.get("alpha");return V?Math.round(O*(V.offsetWidth-r.value.offsetWidth/2)/100):0}function f(){if(!r.value)return 0;const V=i.vnode.el;if(!t.vertical)return 0;const O=t.color.get("alpha");return V?Math.round(O*(V.offsetHeight-r.value.offsetHeight/2)/100):0}function Q(){if(t.color&&t.color.value){const{r:V,g:O,b:R}=t.color.toRgb();return`linear-gradient(to right, rgba(${V}, ${O}, ${R}, 0) 0%, rgba(${V}, ${O}, ${R}, 1) 100%)`}return""}function m(){a.value=p(),s.value=f(),d.value=Q()}h.onMounted(()=>{if(!e.value||!r.value)return;const V={drag:O=>{n(O)},end:O=>{n(O)}};El(e.value,V),El(r.value,V),m()}),h.watch(()=>t.color.get("alpha"),()=>m()),h.watch(()=>t.color.value,()=>m());const _=h.computed(()=>[o.b(),o.is("vertical",t.vertical)]),v=h.computed(()=>o.e("bar")),b=h.computed(()=>o.e("thumb")),M=h.computed(()=>({background:d.value})),E=h.computed(()=>({left:ds(a.value),top:ds(s.value)}));return{rootKls:_,barKls:v,barStyle:M,thumbKls:b,thumbStyle:E,update:m}},EW=h.defineComponent({name:"ElColorAlphaSlider"}),MW=h.defineComponent({...EW,props:LW,setup(t,{expose:e}){const r=t,{bar:n,thumb:i,handleDrag:o,handleClick:a}=xW(r),{rootKls:s,barKls:d,barStyle:p,thumbKls:f,thumbStyle:Q,update:m}=wW(r,{bar:n,thumb:i,handleDrag:o});return e({update:m,bar:n,thumb:i}),(_,v)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(h.unref(s))},[h.createElementVNode("div",{ref_key:"bar",ref:n,class:h.normalizeClass(h.unref(d)),style:h.normalizeStyle(h.unref(p)),onClick:v[0]||(v[0]=(...b)=>h.unref(a)&&h.unref(a)(...b))},null,6),h.createElementVNode("div",{ref_key:"thumb",ref:i,class:h.normalizeClass(h.unref(f)),style:h.normalizeStyle(h.unref(Q))},null,6)],2))}});var HW=Hr(MW,[["__file","alpha-slider.vue"]]);const SW=h.defineComponent({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(t){const e=xr("color-hue-slider"),r=h.getCurrentInstance(),n=h.ref(),i=h.ref(),o=h.ref(0),a=h.ref(0),s=h.computed(()=>t.color.get("hue"));h.watch(()=>s.value,()=>{m()});function d(_){_.target!==n.value&&p(_)}function p(_){if(!i.value||!n.value)return;const b=r.vnode.el.getBoundingClientRect(),{clientX:M,clientY:E}=hf(_);let V;if(t.vertical){let O=E-b.top;O=Math.min(O,b.height-n.value.offsetHeight/2),O=Math.max(n.value.offsetHeight/2,O),V=Math.round((O-n.value.offsetHeight/2)/(b.height-n.value.offsetHeight)*360)}else{let O=M-b.left;O=Math.min(O,b.width-n.value.offsetWidth/2),O=Math.max(n.value.offsetWidth/2,O),V=Math.round((O-n.value.offsetWidth/2)/(b.width-n.value.offsetWidth)*360)}t.color.set("hue",V)}function f(){if(!n.value)return 0;const _=r.vnode.el;if(t.vertical)return 0;const v=t.color.get("hue");return _?Math.round(v*(_.offsetWidth-n.value.offsetWidth/2)/360):0}function Q(){if(!n.value)return 0;const _=r.vnode.el;if(!t.vertical)return 0;const v=t.color.get("hue");return _?Math.round(v*(_.offsetHeight-n.value.offsetHeight/2)/360):0}function m(){o.value=f(),a.value=Q()}return h.onMounted(()=>{if(!i.value||!n.value)return;const _={drag:v=>{p(v)},end:v=>{p(v)}};El(i.value,_),El(n.value,_),m()}),{bar:i,thumb:n,thumbLeft:o,thumbTop:a,hueValue:s,handleClick:d,update:m,ns:e}}});function CW(t,e,r,n,i,o){return h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass([t.ns.b(),t.ns.is("vertical",t.vertical)])},[h.createElementVNode("div",{ref:"bar",class:h.normalizeClass(t.ns.e("bar")),onClick:e[0]||(e[0]=(...a)=>t.handleClick&&t.handleClick(...a))},null,2),h.createElementVNode("div",{ref:"thumb",class:h.normalizeClass(t.ns.e("thumb")),style:h.normalizeStyle({left:t.thumbLeft+"px",top:t.thumbTop+"px"})},null,6)],2)}var AW=Hr(SW,[["render",CW],["__file","hue-slider.vue"]]);const VW=on({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:T3,popperClass:{type:String,default:""},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},predefine:{type:_r(Array)},validateEvent:{type:Boolean,default:!0}}),OW={[f1]:t=>W1(t)||u3(t),[p9]:t=>W1(t)||u3(t),activeChange:t=>W1(t)||u3(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent},uE=Symbol("colorPickerContextKey"),hE=function(t,e,r){return[t,e*r/((t=(2-e)*r)<1?t:2-t)||0,t/2]},kW=function(t){return typeof t=="string"&&t.includes(".")&&Number.parseFloat(t)===1},PW=function(t){return typeof t=="string"&&t.includes("%")},h5=function(t,e){kW(t)&&(t="100%");const r=PW(t);return t=Math.min(e,Math.max(0,Number.parseFloat(`${t}`))),r&&(t=Number.parseInt(`${t*e}`,10)/100),Math.abs(t-e)<1e-6?1:t%e/Number.parseFloat(e)},dE={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},V9=t=>{t=Math.min(Math.round(t),255);const e=Math.floor(t/16),r=t%16;return`${dE[e]||e}${dE[r]||r}`},pE=function({r:t,g:e,b:r}){return Number.isNaN(+t)||Number.isNaN(+e)||Number.isNaN(+r)?"":`#${V9(t)}${V9(e)}${V9(r)}`},hQ={A:10,B:11,C:12,D:13,E:14,F:15},V4=function(t){return t.length===2?(hQ[t[0].toUpperCase()]||+t[0])*16+(hQ[t[1].toUpperCase()]||+t[1]):hQ[t[1].toUpperCase()]||+t[1]},IW=function(t,e,r){e=e/100,r=r/100;let n=e;const i=Math.max(r,.01);r*=2,e*=r<=1?r:2-r,n*=i<=1?i:2-i;const o=(r+e)/2,a=r===0?2*n/(i+n):2*e/(r+e);return{h:t,s:a*100,v:o*100}},TE=(t,e,r)=>{t=h5(t,255),e=h5(e,255),r=h5(r,255);const n=Math.max(t,e,r),i=Math.min(t,e,r);let o;const a=n,s=n-i,d=n===0?0:s/n;if(n===i)o=0;else{switch(n){case t:{o=(e-r)/s+(e<r?6:0);break}case e:{o=(r-t)/s+2;break}case r:{o=(t-e)/s+4;break}}o/=6}return{h:o*360,s:d*100,v:a*100}},Ml=function(t,e,r){t=h5(t,360)*6,e=h5(e,100),r=h5(r,100);const n=Math.floor(t),i=t-n,o=r*(1-e),a=r*(1-i*e),s=r*(1-(1-i)*e),d=n%6,p=[r,a,o,o,s,r][d],f=[s,r,r,a,o,o][d],Q=[o,o,s,r,r,a][d];return{r:Math.round(p*255),g:Math.round(f*255),b:Math.round(Q*255)}};class Hl{constructor(e={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this.enableAlpha=!1,this.format="hex",this.value="";for(const r in e)L4(e,r)&&(this[r]=e[r]);e.value?this.fromString(e.value):this.doOnChange()}set(e,r){if(arguments.length===1&&typeof e=="object"){for(const n in e)L4(e,n)&&this.set(n,e[n]);return}this[`_${e}`]=r,this.doOnChange()}get(e){return e==="alpha"?Math.floor(this[`_${e}`]):this[`_${e}`]}toRgb(){return Ml(this._hue,this._saturation,this._value)}fromString(e){if(!e){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(e.includes("hsl")){const n=e.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}=IW(n[0],n[1],n[2]);r(i,o,a)}}else if(e.includes("hsv")){const n=e.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(e.includes("rgb")){const n=e.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}=TE(n[0],n[1],n[2]);r(i,o,a)}}else if(e.includes("#")){const n=e.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=V4(n[0]+n[0]),o=V4(n[1]+n[1]),a=V4(n[2]+n[2])):(n.length===6||n.length===8)&&(i=V4(n.slice(0,2)),o=V4(n.slice(2,4)),a=V4(n.slice(4,6))),n.length===8?this._alpha=V4(n.slice(6))/255*100:(n.length===3||n.length===6)&&(this._alpha=100);const{h:s,s:d,v:p}=TE(i,o,a);r(s,d,p)}}compare(e){return Math.abs(e._hue-this._hue)<2&&Math.abs(e._saturation-this._saturation)<1&&Math.abs(e._value-this._value)<1&&Math.abs(e._alpha-this._alpha)<1}doOnChange(){const{_hue:e,_saturation:r,_value:n,_alpha:i,format:o}=this;if(this.enableAlpha)switch(o){case"hsl":{const a=hE(e,r/100,n/100);this.value=`hsla(${e}, ${Math.round(a[1]*100)}%, ${Math.round(a[2]*100)}%, ${this.get("alpha")/100})`;break}case"hsv":{this.value=`hsva(${e}, ${Math.round(r)}%, ${Math.round(n)}%, ${this.get("alpha")/100})`;break}case"hex":{this.value=`${pE(Ml(e,r,n))}${V9(i*255/100)}`;break}default:{const{r:a,g:s,b:d}=Ml(e,r,n);this.value=`rgba(${a}, ${s}, ${d}, ${this.get("alpha")/100})`}}else switch(o){case"hsl":{const a=hE(e,r/100,n/100);this.value=`hsl(${e}, ${Math.round(a[1]*100)}%, ${Math.round(a[2]*100)}%)`;break}case"hsv":{this.value=`hsv(${e}, ${Math.round(r)}%, ${Math.round(n)}%)`;break}case"rgb":{const{r:a,g:s,b:d}=Ml(e,r,n);this.value=`rgb(${a}, ${s}, ${d})`;break}default:this.value=pE(Ml(e,r,n))}}}const RW=h.defineComponent({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0}},setup(t){const e=xr("color-predefine"),{currentColor:r}=h.inject(uE),n=h.ref(o(t.colors,t.color));h.watch(()=>r.value,a=>{const s=new Hl;s.fromString(a),n.value.forEach(d=>{d.selected=s.compare(d)})}),h.watchEffect(()=>{n.value=o(t.colors,t.color)});function i(a){t.color.fromString(t.colors[a])}function o(a,s){return a.map(d=>{const p=new Hl;return p.enableAlpha=!0,p.format="rgba",p.fromString(d),p.selected=p.value===s.value,p})}return{rgbaColors:n,handleSelect:i,ns:e}}}),NW=["onClick"];function BW(t,e,r,n,i,o){return h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(t.ns.b())},[h.createElementVNode("div",{class:h.normalizeClass(t.ns.e("colors"))},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.rgbaColors,(a,s)=>(h.openBlock(),h.createElementBlock("div",{key:t.colors[s],class:h.normalizeClass([t.ns.e("color-selector"),t.ns.is("alpha",a._alpha<100),{selected:a.selected}]),onClick:d=>t.handleSelect(s)},[h.createElementVNode("div",{style:h.normalizeStyle({backgroundColor:a.value})},null,4)],10,NW))),128))],2)],2)}var DW=Hr(RW,[["render",BW],["__file","predefine.vue"]]);const FW=h.defineComponent({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(t){const e=xr("color-svpanel"),r=h.getCurrentInstance(),n=h.ref(0),i=h.ref(0),o=h.ref("hsl(0, 100%, 50%)"),a=h.computed(()=>{const p=t.color.get("hue"),f=t.color.get("value");return{hue:p,value:f}});function s(){const p=t.color.get("saturation"),f=t.color.get("value"),Q=r.vnode.el,{clientWidth:m,clientHeight:_}=Q;i.value=p*m/100,n.value=(100-f)*_/100,o.value=`hsl(${t.color.get("hue")}, 100%, 50%)`}function d(p){const Q=r.vnode.el.getBoundingClientRect(),{clientX:m,clientY:_}=hf(p);let v=m-Q.left,b=_-Q.top;v=Math.max(0,v),v=Math.min(v,Q.width),b=Math.max(0,b),b=Math.min(b,Q.height),i.value=v,n.value=b,t.color.set({saturation:v/Q.width*100,value:100-b/Q.height*100})}return h.watch(()=>a.value,()=>{s()}),h.onMounted(()=>{El(r.vnode.el,{drag:p=>{d(p)},end:p=>{d(p)}}),s()}),{cursorTop:n,cursorLeft:i,background:o,colorValue:a,handleDrag:d,update:s,ns:e}}}),jW=[h.createElementVNode("div",null,null,-1)];function zW(t,e,r,n,i,o){return h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(t.ns.b()),style:h.normalizeStyle({backgroundColor:t.background})},[h.createElementVNode("div",{class:h.normalizeClass(t.ns.e("white"))},null,2),h.createElementVNode("div",{class:h.normalizeClass(t.ns.e("black"))},null,2),h.createElementVNode("div",{class:h.normalizeClass(t.ns.e("cursor")),style:h.normalizeStyle({top:t.cursorTop+"px",left:t.cursorLeft+"px"})},jW,6)],6)}var UW=Hr(FW,[["render",zW],["__file","sv-panel.vue"]]);const GW=["onKeydown"],ZW=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"],$W=h.defineComponent({name:"ElColorPicker"}),qW=h.defineComponent({...$W,props:VW,emits:OW,setup(t,{expose:e,emit:r}){const n=t,{t:i}=Tl(),o=xr("color"),{formItem:a}=Q3(),s=f3(),d=a5(),{inputId:p,isLabeledByFormItem:f}=s5(n,{formItemContext:a}),Q=h.ref(),m=h.ref(),_=h.ref(),v=h.ref(),b=h.ref(),M=h.ref(),{isFocused:E,handleFocus:V,handleBlur:O}=$f(b,{beforeBlur(jt){var fe;return(fe=v.value)==null?void 0:fe.isFocusInsideContent(jt)},afterBlur(){ue(!1),Xt()}}),R=jt=>{if(d.value)return he();V(jt)};let j=!0;const G=h.reactive(new Hl({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue})),z=h.ref(!1),J=h.ref(!1),tt=h.ref(""),ot=h.computed(()=>!n.modelValue&&!J.value?"transparent":ee(G,n.showAlpha)),et=h.computed(()=>!n.modelValue&&!J.value?"":G.value),Tt=h.computed(()=>f.value?void 0:n.label||i("el.colorpicker.defaultLabel")),At=h.computed(()=>f.value?a==null?void 0:a.labelId:void 0),Ut=h.computed(()=>[o.b("picker"),o.is("disabled",d.value),o.bm("picker",s.value),o.is("focused",E.value)]);function ee(jt,fe){if(!(jt instanceof Hl))throw new TypeError("color should be instance of _color Class");const{r:Ne,g:Ae,b:Ve}=jt.toRgb();return fe?`rgba(${Ne}, ${Ae}, ${Ve}, ${jt.get("alpha")/100})`:`rgb(${Ne}, ${Ae}, ${Ve})`}function ue(jt){z.value=jt}const Ft=fx(ue,100,{leading:!0});function pe(){d.value||ue(!0)}function lr(){Ft(!1),Xt()}function Xt(){h.nextTick(()=>{n.modelValue?G.fromString(n.modelValue):(G.value="",h.nextTick(()=>{J.value=!1}))})}function le(){d.value||Ft(!z.value)}function ge(){G.fromString(tt.value)}function Le(){const jt=G.value;r(f1,jt),r("change",jt),n.validateEvent&&(a==null||a.validate("change").catch(fe=>K1(fe))),Ft(!1),h.nextTick(()=>{const fe=new Hl({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue});G.compare(fe)||Xt()})}function Fe(){Ft(!1),r(f1,null),r("change",null),n.modelValue!==null&&n.validateEvent&&(a==null||a.validate("change").catch(jt=>K1(jt))),Xt()}function Ge(jt){if(z.value&&(lr(),E.value)){const fe=new FocusEvent("focus",jt);O(fe)}}function je(jt){jt.preventDefault(),jt.stopPropagation(),ue(!1),Xt()}function Dt(jt){switch(jt.code){case Xi.enter:case Xi.space:jt.preventDefault(),jt.stopPropagation(),pe(),M.value.focus();break;case Xi.esc:je(jt);break}}function qt(){b.value.focus()}function he(){b.value.blur()}return h.onMounted(()=>{n.modelValue&&(tt.value=et.value)}),h.watch(()=>n.modelValue,jt=>{jt?jt&&jt!==G.value&&(j=!1,G.fromString(jt)):J.value=!1}),h.watch(()=>et.value,jt=>{tt.value=jt,j&&r("activeChange",jt),j=!0}),h.watch(()=>G.value,()=>{!n.modelValue&&!J.value&&(J.value=!0)}),h.watch(()=>z.value,()=>{h.nextTick(()=>{var jt,fe,Ne;(jt=Q.value)==null||jt.update(),(fe=m.value)==null||fe.update(),(Ne=_.value)==null||Ne.update()})}),h.provide(uE,{currentColor:et}),e({color:G,show:pe,hide:lr,focus:qt,blur:he}),(jt,fe)=>(h.openBlock(),h.createBlock(h.unref(nQ),{ref_key:"popper",ref:v,visible:z.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[h.unref(o).be("picker","panel"),h.unref(o).b("dropdown"),jt.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",transition:`${h.unref(o).namespace.value}-zoom-in-top`,persistent:"",onHide:fe[2]||(fe[2]=Ne=>ue(!1))},{content:h.withCtx(()=>[h.withDirectives((h.openBlock(),h.createElementBlock("div",{onKeydown:h.withKeys(je,["esc"])},[h.createElementVNode("div",{class:h.normalizeClass(h.unref(o).be("dropdown","main-wrapper"))},[h.createVNode(AW,{ref_key:"hue",ref:Q,class:"hue-slider",color:h.unref(G),vertical:""},null,8,["color"]),h.createVNode(UW,{ref_key:"sv",ref:m,color:h.unref(G)},null,8,["color"])],2),jt.showAlpha?(h.openBlock(),h.createBlock(HW,{key:0,ref_key:"alpha",ref:_,color:h.unref(G)},null,8,["color"])):h.createCommentVNode("v-if",!0),jt.predefine?(h.openBlock(),h.createBlock(DW,{key:1,ref:"predefine",color:h.unref(G),colors:jt.predefine},null,8,["color","colors"])):h.createCommentVNode("v-if",!0),h.createElementVNode("div",{class:h.normalizeClass(h.unref(o).be("dropdown","btns"))},[h.createElementVNode("span",{class:h.normalizeClass(h.unref(o).be("dropdown","value"))},[h.createVNode(h.unref(L9),{ref_key:"inputRef",ref:M,modelValue:tt.value,"onUpdate:modelValue":fe[0]||(fe[0]=Ne=>tt.value=Ne),"validate-event":!1,size:"small",onKeyup:h.withKeys(ge,["enter"]),onBlur:ge},null,8,["modelValue","onKeyup"])],2),h.createVNode(h.unref(Qo),{class:h.normalizeClass(h.unref(o).be("dropdown","link-btn")),text:"",size:"small",onClick:Fe},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(i)("el.colorpicker.clear")),1)]),_:1},8,["class"]),h.createVNode(h.unref(Qo),{plain:"",size:"small",class:h.normalizeClass(h.unref(o).be("dropdown","btn")),onClick:Le},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(i)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,GW)),[[h.unref($w),Ge]])]),default:h.withCtx(()=>[h.createElementVNode("div",{id:h.unref(p),ref_key:"triggerRef",ref:b,class:h.normalizeClass(h.unref(Ut)),role:"button","aria-label":h.unref(Tt),"aria-labelledby":h.unref(At),"aria-description":h.unref(i)("el.colorpicker.description",{color:jt.modelValue||""}),"aria-disabled":h.unref(d),tabindex:h.unref(d)?-1:jt.tabindex,onKeydown:Dt,onFocus:R,onBlur:fe[1]||(fe[1]=(...Ne)=>h.unref(O)&&h.unref(O)(...Ne))},[h.unref(d)?(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(h.unref(o).be("picker","mask"))},null,2)):h.createCommentVNode("v-if",!0),h.createElementVNode("div",{class:h.normalizeClass(h.unref(o).be("picker","trigger")),onClick:le},[h.createElementVNode("span",{class:h.normalizeClass([h.unref(o).be("picker","color"),h.unref(o).is("alpha",jt.showAlpha)])},[h.createElementVNode("span",{class:h.normalizeClass(h.unref(o).be("picker","color-inner")),style:h.normalizeStyle({backgroundColor:h.unref(ot)})},[h.withDirectives(h.createVNode(h.unref(F1),{class:h.normalizeClass([h.unref(o).be("picker","icon"),h.unref(o).is("icon-arrow-down")])},{default:h.withCtx(()=>[h.createVNode(h.unref(d3))]),_:1},8,["class"]),[[h.vShow,jt.modelValue||J.value]]),h.withDirectives(h.createVNode(h.unref(F1),{class:h.normalizeClass([h.unref(o).be("picker","empty"),h.unref(o).is("icon-close")])},{default:h.withCtx(()=>[h.createVNode(h.unref(Y6))]),_:1},8,["class"]),[[h.vShow,!jt.modelValue&&!J.value]])],6)],2)],2)],42,ZW)]),_:1},8,["visible","popper-class","transition"]))}});var WW=Hr(qW,[["__file","color-picker.vue"]]);const XW=mi(WW),KW=h.defineComponent({name:"ElContainer"}),YW=h.defineComponent({...KW,props:{direction:{type:String}},setup(t){const e=t,r=h.useSlots(),n=xr("container"),i=h.computed(()=>e.direction==="vertical"?!0:e.direction==="horizontal"?!1:r&&r.default?r.default().some(a=>{const s=a.type.name;return s==="ElHeader"||s==="ElFooter"}):!1);return(o,a)=>(h.openBlock(),h.createElementBlock("section",{class:h.normalizeClass([h.unref(n).b(),h.unref(n).is("vertical",h.unref(i))])},[h.renderSlot(o.$slots,"default")],2))}});var JW=Hr(YW,[["__file","container.vue"]]);const tX=h.defineComponent({name:"ElAside"}),eX=h.defineComponent({...tX,props:{width:{type:String,default:null}},setup(t){const e=t,r=xr("aside"),n=h.computed(()=>e.width?r.cssVarBlock({width:e.width}):{});return(i,o)=>(h.openBlock(),h.createElementBlock("aside",{class:h.normalizeClass(h.unref(r).b()),style:h.normalizeStyle(h.unref(n))},[h.renderSlot(i.$slots,"default")],6))}});var fE=Hr(eX,[["__file","aside.vue"]]);const rX=h.defineComponent({name:"ElFooter"}),nX=h.defineComponent({...rX,props:{height:{type:String,default:null}},setup(t){const e=t,r=xr("footer"),n=h.computed(()=>e.height?r.cssVarBlock({height:e.height}):{});return(i,o)=>(h.openBlock(),h.createElementBlock("footer",{class:h.normalizeClass(h.unref(r).b()),style:h.normalizeStyle(h.unref(n))},[h.renderSlot(i.$slots,"default")],6))}});var QE=Hr(nX,[["__file","footer.vue"]]);const iX=h.defineComponent({name:"ElHeader"}),oX=h.defineComponent({...iX,props:{height:{type:String,default:null}},setup(t){const e=t,r=xr("header"),n=h.computed(()=>e.height?r.cssVarBlock({height:e.height}):{});return(i,o)=>(h.openBlock(),h.createElementBlock("header",{class:h.normalizeClass(h.unref(r).b()),style:h.normalizeStyle(h.unref(n))},[h.renderSlot(i.$slots,"default")],6))}});var mE=Hr(oX,[["__file","header.vue"]]);const aX=h.defineComponent({name:"ElMain"}),sX=h.defineComponent({...aX,setup(t){const e=xr("main");return(r,n)=>(h.openBlock(),h.createElementBlock("main",{class:h.normalizeClass(h.unref(e).b())},[h.renderSlot(r.$slots,"default")],2))}});var gE=Hr(sX,[["__file","main.vue"]]);const lX=mi(JW,{Aside:fE,Footer:QE,Header:mE,Main:gE});A2(fE),A2(QE),A2(mE);const yE=A2(gE),cX=on({mask:{type:Boolean,default:!0},customMaskEvent:{type:Boolean,default:!1},overlayClass:{type:_r([String,Array,Object])},zIndex:{type:_r([String,Number])}}),uX={click:t=>t instanceof MouseEvent},hX="overlay";var dX=h.defineComponent({name:"ElOverlay",props:cX,emits:uX,setup(t,{slots:e,emit:r}){const n=xr(hX),i=d=>{r("click",d)},{onClick:o,onMousedown:a,onMouseup:s}=ow(t.customMaskEvent?void 0:i);return()=>t.mask?h.createVNode("div",{class:[n.b(),t.overlayClass],style:{zIndex:t.zIndex},onClick:o,onMousedown:a,onMouseup:s},[h.renderSlot(e,"default")],T9.STYLE|T9.CLASS|T9.PROPS,["onClick","onMouseup","onMousedown"]):h.h("div",{class:t.overlayClass,style:{zIndex:t.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[h.renderSlot(e,"default")])}});const pX=dX,_E=Symbol("dialogInjectionKey"),vE=on({center:Boolean,alignCenter:Boolean,closeIcon:{type:ps},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),TX={close:()=>!0},fX=["aria-level"],QX=["aria-label"],mX=["id"],gX=h.defineComponent({name:"ElDialogContent"}),yX=h.defineComponent({...gX,props:vE,emits:TX,setup(t){const e=t,{t:r}=Tl(),{Close:n}=RU,{dialogRef:i,headerRef:o,bodyId:a,ns:s,style:d}=h.inject(_E),{focusTrapRef:p}=h.inject(Sw),f=h.computed(()=>[s.b(),s.is("fullscreen",e.fullscreen),s.is("draggable",e.draggable),s.is("align-center",e.alignCenter),{[s.m("center")]:e.center}]),Q=BU(p,i),m=h.computed(()=>e.draggable),_=h.computed(()=>e.overflow);return zU(i,o,m,_),(v,b)=>(h.openBlock(),h.createElementBlock("div",{ref:h.unref(Q),class:h.normalizeClass(h.unref(f)),style:h.normalizeStyle(h.unref(d)),tabindex:"-1"},[h.createElementVNode("header",{ref_key:"headerRef",ref:o,class:h.normalizeClass([h.unref(s).e("header"),{"show-close":v.showClose}])},[h.renderSlot(v.$slots,"header",{},()=>[h.createElementVNode("span",{role:"heading","aria-level":v.ariaLevel,class:h.normalizeClass(h.unref(s).e("title"))},h.toDisplayString(v.title),11,fX)]),v.showClose?(h.openBlock(),h.createElementBlock("button",{key:0,"aria-label":h.unref(r)("el.dialog.close"),class:h.normalizeClass(h.unref(s).e("headerbtn")),type:"button",onClick:b[0]||(b[0]=M=>v.$emit("close"))},[h.createVNode(h.unref(F1),{class:h.normalizeClass(h.unref(s).e("close"))},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(v.closeIcon||h.unref(n))))]),_:1},8,["class"])],10,QX)):h.createCommentVNode("v-if",!0)],2),h.createElementVNode("div",{id:h.unref(a),class:h.normalizeClass(h.unref(s).e("body"))},[h.renderSlot(v.$slots,"default")],10,mX),v.$slots.footer?(h.openBlock(),h.createElementBlock("footer",{key:0,class:h.normalizeClass(h.unref(s).e("footer"))},[h.renderSlot(v.$slots,"footer")],2)):h.createCommentVNode("v-if",!0)],6))}});var _X=Hr(yX,[["__file","dialog-content.vue"]]);const vX=on({...vE,appendToBody:Boolean,appendTo:{type:_r(String),default:"body"},beforeClose:{type:_r(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:{type:Boolean,default:!1},headerAriaLevel:{type:String,default:"2"}}),bX={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[f1]:t=>hs(t),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},LX=(t,e)=>{var r;const i=h.getCurrentInstance().emit,{nextZIndex:o}=Zf();let a="";const s=C4(),d=C4(),p=h.ref(!1),f=h.ref(!1),Q=h.ref(!1),m=h.ref((r=t.zIndex)!=null?r:o());let _,v;const b=b9("namespace",Ql),M=h.computed(()=>{const ee={},ue=`--${b.value}-dialog`;return t.fullscreen||(t.top&&(ee[`${ue}-margin-top`]=t.top),t.width&&(ee[`${ue}-width`]=ds(t.width))),ee}),E=h.computed(()=>t.alignCenter?{display:"flex"}:{});function V(){i("opened")}function O(){i("closed"),i(f1,!1),t.destroyOnClose&&(Q.value=!1)}function R(){i("close")}function j(){v==null||v(),_==null||_(),t.openDelay&&t.openDelay>0?{stop:_}=mL(()=>tt(),t.openDelay):tt()}function G(){_==null||_(),v==null||v(),t.closeDelay&&t.closeDelay>0?{stop:v}=mL(()=>ot(),t.closeDelay):ot()}function z(){function ee(ue){ue||(f.value=!0,p.value=!1)}t.beforeClose?t.beforeClose(ee):G()}function J(){t.closeOnClickModal&&z()}function tt(){T1&&(p.value=!0)}function ot(){p.value=!1}function et(){i("openAutoFocus")}function Tt(){i("closeAutoFocus")}function At(ee){var ue;((ue=ee.detail)==null?void 0:ue.focusReason)==="pointer"&&ee.preventDefault()}t.lockScroll&&cG(p);function Ut(){t.closeOnPressEscape&&z()}return h.watch(()=>t.modelValue,ee=>{ee?(f.value=!1,j(),Q.value=!0,m.value=Qx(t.zIndex)?o():m.value++,h.nextTick(()=>{i("open"),e.value&&(e.value.scrollTop=0)})):p.value&&G()}),h.watch(()=>t.fullscreen,ee=>{e.value&&(ee?(a=e.value.style.transform,e.value.style.transform=""):e.value.style.transform=a)}),h.onMounted(()=>{t.modelValue&&(p.value=!0,Q.value=!0,j())}),{afterEnter:V,afterLeave:O,beforeLeave:R,handleClose:z,onModalClick:J,close:G,doClose:ot,onOpenAutoFocus:et,onCloseAutoFocus:Tt,onCloseRequested:Ut,onFocusoutPrevented:At,titleId:s,bodyId:d,closed:f,style:M,overlayDialogStyle:E,rendered:Q,visible:p,zIndex:m}},xX=["aria-label","aria-labelledby","aria-describedby"],wX=h.defineComponent({name:"ElDialog",inheritAttrs:!1}),EX=h.defineComponent({...wX,props:vX,emits:bX,setup(t,{expose:e}){const r=t,n=h.useSlots();Af({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},h.computed(()=>!!n.title));const i=xr("dialog"),o=h.ref(),a=h.ref(),s=h.ref(),{visible:d,titleId:p,bodyId:f,style:Q,overlayDialogStyle:m,rendered:_,zIndex:v,afterEnter:b,afterLeave:M,beforeLeave:E,handleClose:V,onModalClick:O,onOpenAutoFocus:R,onCloseAutoFocus:j,onCloseRequested:G,onFocusoutPrevented:z}=LX(r,o);h.provide(_E,{dialogRef:o,headerRef:a,bodyId:f,ns:i,rendered:_,style:Q});const J=ow(O),tt=h.computed(()=>r.draggable&&!r.fullscreen);return e({visible:d,dialogContentRef:s}),(ot,et)=>(h.openBlock(),h.createBlock(h.Teleport,{to:ot.appendTo,disabled:ot.appendTo!=="body"?!1:!ot.appendToBody},[h.createVNode(h.Transition,{name:"dialog-fade",onAfterEnter:h.unref(b),onAfterLeave:h.unref(M),onBeforeLeave:h.unref(E),persisted:""},{default:h.withCtx(()=>[h.withDirectives(h.createVNode(h.unref(pX),{"custom-mask-event":"",mask:ot.modal,"overlay-class":ot.modalClass,"z-index":h.unref(v)},{default:h.withCtx(()=>[h.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":ot.title||void 0,"aria-labelledby":ot.title?void 0:h.unref(p),"aria-describedby":h.unref(f),class:h.normalizeClass(`${h.unref(i).namespace.value}-overlay-dialog`),style:h.normalizeStyle(h.unref(m)),onClick:et[0]||(et[0]=(...Tt)=>h.unref(J).onClick&&h.unref(J).onClick(...Tt)),onMousedown:et[1]||(et[1]=(...Tt)=>h.unref(J).onMousedown&&h.unref(J).onMousedown(...Tt)),onMouseup:et[2]||(et[2]=(...Tt)=>h.unref(J).onMouseup&&h.unref(J).onMouseup(...Tt))},[h.createVNode(h.unref(Pw),{loop:"",trapped:h.unref(d),"focus-start-el":"container",onFocusAfterTrapped:h.unref(R),onFocusAfterReleased:h.unref(j),onFocusoutPrevented:h.unref(z),onReleaseRequested:h.unref(G)},{default:h.withCtx(()=>[h.unref(_)?(h.openBlock(),h.createBlock(_X,h.mergeProps({key:0,ref_key:"dialogContentRef",ref:s},ot.$attrs,{center:ot.center,"align-center":ot.alignCenter,"close-icon":ot.closeIcon,draggable:h.unref(tt),overflow:ot.overflow,fullscreen:ot.fullscreen,"show-close":ot.showClose,title:ot.title,"aria-level":ot.headerAriaLevel,onClose:h.unref(V)}),h.createSlots({header:h.withCtx(()=>[ot.$slots.title?h.renderSlot(ot.$slots,"title",{key:1}):h.renderSlot(ot.$slots,"header",{key:0,close:h.unref(V),titleId:h.unref(p),titleClass:h.unref(i).e("title")})]),default:h.withCtx(()=>[h.renderSlot(ot.$slots,"default")]),_:2},[ot.$slots.footer?{name:"footer",fn:h.withCtx(()=>[h.renderSlot(ot.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):h.createCommentVNode("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,xX)]),_:3},8,["mask","overlay-class","z-index"]),[[h.vShow,h.unref(d)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])],8,["to","disabled"]))}});var MX=Hr(EX,[["__file","dialog.vue"]]);const HX=mi(MX),SX=h.defineComponent({inheritAttrs:!1});function CX(t,e,r,n,i,o){return h.renderSlot(t.$slots,"default")}var AX=Hr(SX,[["render",CX],["__file","collection.vue"]]);const VX=h.defineComponent({name:"ElCollectionItem",inheritAttrs:!1});function OX(t,e,r,n,i,o){return h.renderSlot(t.$slots,"default")}var kX=Hr(VX,[["render",OX],["__file","collection-item.vue"]]);const PX="data-el-collection-item",IX=t=>{const e=`El${t}Collection`,r=`${e}Item`,n=Symbol(e),i=Symbol(r),o={...AX,name:e,setup(){const s=h.ref(null),d=new Map,p=()=>{const f=h.unref(s);if(!f)return[];const Q=Array.from(f.querySelectorAll(`[${PX}]`));return[...d.values()].sort((_,v)=>Q.indexOf(_.ref)-Q.indexOf(v.ref))};h.provide(n,{itemMap:d,getItems:p,collectionRef:s})}},a={...kX,name:r,setup(s,{attrs:d}){const p=h.ref(null),f=h.inject(n,void 0);h.provide(i,{collectionItemRef:p}),h.onMounted(()=>{const Q=h.unref(p);Q&&f.itemMap.set(Q,{ref:Q,...d})}),h.onBeforeUnmount(()=>{const Q=h.unref(p);f.itemMap.delete(Q)})}};return{COLLECTION_INJECTION_KEY:n,COLLECTION_ITEM_INJECTION_KEY:i,ElCollection:o,ElCollectionItem:a}},dQ=on({trigger:wl.trigger,effect:{...Oo.effect,default:"light"},type:{type:_r(String)},placement:{type:_r(String),default:"bottom"},popperOptions:{type:_r(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:_r([Number,String]),default:0},maxHeight:{type:_r([Number,String]),default:""},popperClass:{type:String,default:""},disabled:{type:Boolean,default:!1},role:{type:String,default:"menu"},buttonProps:{type:_r(Object)},teleported:Oo.teleported});on({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:ps}}),on({onKeydown:{type:_r(Function)}}),IX("Dropdown");const bE=Symbol("ElSelectGroup"),O9=Symbol("ElSelect");function RX(t,e){const r=h.inject(O9),n=h.inject(bE,{disabled:!1}),i=h.computed(()=>r.props.multiple?f(r.props.modelValue,t.value):f([r.props.modelValue],t.value)),o=h.computed(()=>{if(r.props.multiple){const _=r.props.modelValue||[];return!i.value&&_.length>=r.props.multipleLimit&&r.props.multipleLimit>0}else return!1}),a=h.computed(()=>t.label||(Qi(t.value)?"":t.value)),s=h.computed(()=>t.value||t.label||""),d=h.computed(()=>t.disabled||e.groupDisabled||o.value),p=h.getCurrentInstance(),f=(_=[],v)=>{if(Qi(t.value)){const b=r.props.valueKey;return _&&_.some(M=>h.toRaw(cs(M,b))===cs(v,b))}else return _&&_.includes(v)},Q=()=>{!t.disabled&&!n.disabled&&(r.states.hoveringIndex=r.optionsArray.indexOf(p.proxy))},m=_=>{const v=new RegExp(cU(_),"i");e.visible=v.test(a.value)||t.created};return h.watch(()=>a.value,()=>{!t.created&&!r.props.remote&&r.setSelected()}),h.watch(()=>t.value,(_,v)=>{const{remote:b,valueKey:M}=r.props;if(hl(_,v)||(r.onOptionDestroy(v,p.proxy),r.onOptionCreate(p.proxy)),!t.created&&!b){if(M&&Qi(_)&&Qi(v)&&_[M]===v[M])return;r.setSelected()}}),h.watch(()=>n.disabled,()=>{e.groupDisabled=n.disabled},{immediate:!0}),{select:r,currentLabel:a,currentValue:s,itemSelected:i,isDisabled:d,hoverItem:Q,updateOption:m}}const NX=h.defineComponent({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(t){const e=xr("select"),r=C4(),n=h.computed(()=>[e.be("dropdown","item"),e.is("disabled",h.unref(s)),e.is("selected",h.unref(a)),e.is("hovering",h.unref(m))]),i=h.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:o,itemSelected:a,isDisabled:s,select:d,hoverItem:p,updateOption:f}=RX(t,i),{visible:Q,hover:m}=h.toRefs(i),_=h.getCurrentInstance().proxy;d.onOptionCreate(_),h.onBeforeUnmount(()=>{const b=_.value,{selected:M}=d.states,V=(d.props.multiple?M:[M]).some(O=>O.value===_.value);h.nextTick(()=>{d.states.cachedOptions.get(b)===_&&!V&&d.states.cachedOptions.delete(b)}),d.onOptionDestroy(b,_)});function v(){t.disabled!==!0&&i.groupDisabled!==!0&&d.handleOptionSelect(_)}return{ns:e,id:r,containerKls:n,currentLabel:o,itemSelected:a,isDisabled:s,select:d,hoverItem:p,updateOption:f,visible:Q,hover:m,selectOptionClick:v,states:i}}}),BX=["id","aria-disabled","aria-selected"];function DX(t,e,r,n,i,o){return h.withDirectives((h.openBlock(),h.createElementBlock("li",{id:t.id,class:h.normalizeClass(t.containerKls),role:"option","aria-disabled":t.isDisabled||void 0,"aria-selected":t.itemSelected,onMouseenter:e[0]||(e[0]=(...a)=>t.hoverItem&&t.hoverItem(...a)),onClick:e[1]||(e[1]=h.withModifiers((...a)=>t.selectOptionClick&&t.selectOptionClick(...a),["stop"]))},[h.renderSlot(t.$slots,"default",{},()=>[h.createElementVNode("span",null,h.toDisplayString(t.currentLabel),1)])],42,BX)),[[h.vShow,t.visible]])}var pQ=Hr(NX,[["render",DX],["__file","option.vue"]]);const FX=h.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const t=h.inject(O9),e=xr("select"),r=h.computed(()=>t.props.popperClass),n=h.computed(()=>t.props.multiple),i=h.computed(()=>t.props.fitInputWidth),o=h.ref("");function a(){var s;o.value=`${(s=t.selectRef)==null?void 0:s.offsetWidth}px`}return h.onMounted(()=>{a(),os(t.selectRef,a)}),{ns:e,minWidth:o,popperClass:r,isMultiple:n,isFitInputWidth:i}}});function jX(t,e,r,n,i,o){return h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass([t.ns.b("dropdown"),t.ns.is("multiple",t.isMultiple),t.popperClass]),style:h.normalizeStyle({[t.isFitInputWidth?"width":"minWidth"]:t.minWidth})},[t.$slots.header?(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(t.ns.be("dropdown","header"))},[h.renderSlot(t.$slots,"header")],2)):h.createCommentVNode("v-if",!0),h.renderSlot(t.$slots,"default"),t.$slots.footer?(h.openBlock(),h.createElementBlock("div",{key:1,class:h.normalizeClass(t.ns.be("dropdown","footer"))},[h.renderSlot(t.$slots,"footer")],2)):h.createCommentVNode("v-if",!0)],6)}var zX=Hr(FX,[["render",jX],["__file","select-dropdown.vue"]]);function UX(t){const e=h.ref(!1);return{handleCompositionStart:()=>{e.value=!0},handleCompositionUpdate:o=>{const a=o.target.value,s=a[a.length-1]||"";e.value=!Hx(s)},handleCompositionEnd:o=>{e.value&&(e.value=!1,po(t)&&t(o))}}}const GX=11,ZX=(t,e)=>{const{t:r}=Tl(),n=C4(),i=xr("select"),o=xr("input"),a=h.reactive({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:t.multiple?[]:{},selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1});Af({from:"suffixTransition",replacement:"override style scheme",version:"2.3.0",scope:"props",ref:"https://element-plus.org/en-US/component/select.html#select-attributes"},h.computed(()=>t.suffixTransition===!1));const s=h.ref(null),d=h.ref(null),p=h.ref(null),f=h.ref(null),Q=h.ref(null),m=h.ref(null),_=h.ref(null),v=h.ref(null),b=h.ref(null),M=h.ref(null),E=h.ref(null),V=h.ref(null),{wrapperRef:O,isFocused:R,handleFocus:j,handleBlur:G}=$f(Q,{afterFocus(){t.automaticDropdown&&!z.value&&(z.value=!0,a.menuVisibleOnFocus=!0)},beforeBlur(Vt){var Jt,we;return((Jt=p.value)==null?void 0:Jt.isFocusInsideContent(Vt))||((we=f.value)==null?void 0:we.isFocusInsideContent(Vt))},afterBlur(){z.value=!1,a.menuVisibleOnFocus=!1}}),z=h.ref(!1),J=h.ref(),{form:tt,formItem:ot}=Q3(),{inputId:et}=s5(t,{formItemContext:ot}),Tt=h.computed(()=>t.disabled||(tt==null?void 0:tt.disabled)),At=h.computed(()=>t.multiple?Vi(t.modelValue)&&t.modelValue.length>0:t.modelValue!==void 0&&t.modelValue!==null&&t.modelValue!==""),Ut=h.computed(()=>t.clearable&&!Tt.value&&a.inputHovering&&At.value),ee=h.computed(()=>t.remote&&t.filterable&&!t.remoteShowSuffix?"":t.suffixIcon),ue=h.computed(()=>i.is("reverse",ee.value&&z.value&&t.suffixTransition)),Ft=h.computed(()=>(ot==null?void 0:ot.validateState)||""),pe=h.computed(()=>Ex[Ft.value]),lr=h.computed(()=>t.remote?300:0),Xt=h.computed(()=>t.loading?t.loadingText||r("el.select.loading"):t.remote&&!a.inputValue&&a.options.size===0?!1:t.filterable&&a.inputValue&&a.options.size>0&&le.value===0?t.noMatchText||r("el.select.noMatch"):a.options.size===0?t.noDataText||r("el.select.noData"):null),le=h.computed(()=>ge.value.filter(Vt=>Vt.visible).length),ge=h.computed(()=>{const Vt=Array.from(a.options.values()),Jt=[];return a.optionValues.forEach(we=>{const rr=Vt.findIndex(tr=>tr.value===we);rr>-1&&Jt.push(Vt[rr])}),Jt.length>=Vt.length?Jt:Vt}),Le=h.computed(()=>Array.from(a.cachedOptions.values())),Fe=h.computed(()=>{const Vt=ge.value.filter(Jt=>!Jt.created).some(Jt=>Jt.currentLabel===a.inputValue);return t.filterable&&t.allowCreate&&a.inputValue!==""&&!Vt}),Ge=()=>{t.filterable&&po(t.filterMethod)||t.filterable&&t.remote&&po(t.remoteMethod)||ge.value.forEach(Vt=>{Vt.updateOption(a.inputValue)})},je=f3(),Dt=h.computed(()=>["small"].includes(je.value)?"small":"default"),qt=h.computed({get(){return z.value&&Xt.value!==!1},set(Vt){z.value=Vt}}),he=h.computed(()=>Vi(t.modelValue)?t.modelValue.length===0&&!a.inputValue:t.filterable?!a.inputValue:!0),jt=h.computed(()=>{var Vt;const Jt=(Vt=t.placeholder)!=null?Vt:r("el.select.placeholder");return t.multiple||!At.value?Jt:a.selectedLabel});h.watch(()=>t.modelValue,(Vt,Jt)=>{t.multiple&&t.filterable&&!t.reserveKeyword&&(a.inputValue="",fe("")),Ae(),!hl(Vt,Jt)&&t.validateEvent&&(ot==null||ot.validate("change").catch(we=>K1(we)))},{flush:"post",deep:!0}),h.watch(()=>z.value,Vt=>{Vt?fe(a.inputValue):(a.inputValue="",a.previousQuery=null,a.isBeforeHide=!0),e("visible-change",Vt)}),h.watch(()=>a.options.entries(),()=>{var Vt;if(!T1)return;const Jt=((Vt=s.value)==null?void 0:Vt.querySelectorAll("input"))||[];(!t.filterable&&!t.defaultFirstOption&&!dl(t.modelValue)||!Array.from(Jt).includes(document.activeElement))&&Ae(),t.defaultFirstOption&&(t.filterable||t.remote)&&le.value&&Ne()},{flush:"post"}),h.watch(()=>a.hoveringIndex,Vt=>{X1(Vt)&&Vt>-1?J.value=ge.value[Vt]||{}:J.value={},ge.value.forEach(Jt=>{Jt.hover=J.value===Jt})}),h.watchEffect(()=>{a.isBeforeHide||Ge()});const fe=Vt=>{a.previousQuery!==Vt&&(a.previousQuery=Vt,t.filterable&&po(t.filterMethod)?t.filterMethod(Vt):t.filterable&&t.remote&&po(t.remoteMethod)&&t.remoteMethod(Vt),t.defaultFirstOption&&(t.filterable||t.remote)&&le.value?h.nextTick(Ne):h.nextTick(ke))},Ne=()=>{const Vt=ge.value.filter(rr=>rr.visible&&!rr.disabled&&!rr.states.groupDisabled),Jt=Vt.find(rr=>rr.created),we=Vt[0];a.hoveringIndex=Bn(ge.value,Jt||we)},Ae=()=>{if(t.multiple)a.selectedLabel="";else{const Jt=Ve(t.modelValue);a.selectedLabel=Jt.currentLabel,a.selected=Jt;return}const Vt=[];Vi(t.modelValue)&&t.modelValue.forEach(Jt=>{Vt.push(Ve(Jt))}),a.selected=Vt},Ve=Vt=>{let Jt;const we=df(Vt).toLowerCase()==="object",rr=df(Vt).toLowerCase()==="null",tr=df(Vt).toLowerCase()==="undefined";for(let en=a.cachedOptions.size-1;en>=0;en--){const Ze=Le.value[en];if(we?cs(Ze.value,t.valueKey)===cs(Vt,t.valueKey):Ze.value===Vt){Jt={value:Vt,currentLabel:Ze.currentLabel,isDisabled:Ze.isDisabled};break}}if(Jt)return Jt;const Dr=we?Vt.label:!rr&&!tr?Vt:"";return{value:Vt,currentLabel:Dr}},ke=()=>{t.multiple?a.selected.length>0?a.hoveringIndex=Math.min(...a.selected.map(Vt=>ge.value.findIndex(Jt=>gt(Jt)===gt(Vt)))):a.hoveringIndex=-1:a.hoveringIndex=ge.value.findIndex(Vt=>gt(Vt)===gt(a.selected))},ze=()=>{a.selectionWidth=d.value.getBoundingClientRect().width},zt=()=>{a.calculatorWidth=m.value.getBoundingClientRect().width},Pr=()=>{a.collapseItemWidth=E.value.getBoundingClientRect().width},mn=()=>{var Vt,Jt;(Jt=(Vt=p.value)==null?void 0:Vt.updatePopper)==null||Jt.call(Vt)},We=()=>{var Vt,Jt;(Jt=(Vt=f.value)==null?void 0:Vt.updatePopper)==null||Jt.call(Vt)},br=()=>{a.inputValue.length>0&&!z.value&&(z.value=!0),fe(a.inputValue)},Nn=Vt=>{if(a.inputValue=Vt.target.value,t.remote)S1();else return br()},S1=fx(()=>{br()},lr.value),wn=Vt=>{hl(t.modelValue,Vt)||e(p9,Vt)},ye=Vt=>nU(Vt,Jt=>!a.disabledOptions.has(Jt)),cr=Vt=>{if(t.multiple&&Vt.code!==Xi.delete&&Vt.target.value.length<=0){const Jt=t.modelValue.slice(),we=ye(Jt);if(we<0)return;Jt.splice(we,1),e(f1,Jt),wn(Jt)}},Wr=(Vt,Jt)=>{const we=a.selected.indexOf(Jt);if(we>-1&&!Tt.value){const rr=t.modelValue.slice();rr.splice(we,1),e(f1,rr),wn(rr),e("remove-tag",Jt.value)}Vt.stopPropagation(),sr()},$n=Vt=>{Vt.stopPropagation();const Jt=t.multiple?[]:"";if(!W1(Jt))for(const we of a.selected)we.isDisabled&&Jt.push(we.value);e(f1,Jt),wn(Jt),a.hoveringIndex=-1,z.value=!1,e("clear"),sr()},Qe=Vt=>{if(t.multiple){const Jt=(t.modelValue||[]).slice(),we=Bn(Jt,Vt.value);we>-1?Jt.splice(we,1):(t.multipleLimit<=0||Jt.length<t.multipleLimit)&&Jt.push(Vt.value),e(f1,Jt),wn(Jt),Vt.created&&fe(""),t.filterable&&!t.reserveKeyword&&(a.inputValue="")}else e(f1,Vt.value),wn(Vt.value),z.value=!1;sr(),!z.value&&h.nextTick(()=>{Tn(Vt)})},Bn=(Vt=[],Jt)=>{if(!Qi(Jt))return Vt.indexOf(Jt);const we=t.valueKey;let rr=-1;return Vt.some((tr,Dr)=>h.toRaw(cs(tr,we))===cs(Jt,we)?(rr=Dr,!0):!1),rr},Tn=Vt=>{var Jt,we,rr,tr,Dr;const Gr=Vi(Vt)?Vt[0]:Vt;let en=null;if(Gr!=null&&Gr.value){const Ze=ge.value.filter(Xr=>Xr.value===Gr.value);Ze.length>0&&(en=Ze[0].$el)}if(p.value&&en){const Ze=(tr=(rr=(we=(Jt=p.value)==null?void 0:Jt.popperRef)==null?void 0:we.contentRef)==null?void 0:rr.querySelector)==null?void 0:tr.call(rr,`.${i.be("dropdown","wrap")}`);Ze&&dU(Ze,en)}(Dr=V.value)==null||Dr.handleScroll()},ci=Vt=>{a.options.set(Vt.value,Vt),a.cachedOptions.set(Vt.value,Vt),Vt.disabled&&a.disabledOptions.set(Vt.value,Vt)},ui=(Vt,Jt)=>{a.options.get(Vt)===Jt&&a.options.delete(Vt)},{handleCompositionStart:be,handleCompositionUpdate:yr,handleCompositionEnd:ur}=UX(Vt=>Nn(Vt)),r1=h.computed(()=>{var Vt,Jt;return(Jt=(Vt=p.value)==null?void 0:Vt.popperRef)==null?void 0:Jt.contentRef}),n1=()=>{h.nextTick(()=>Tn(a.selected))},sr=()=>{var Vt;(Vt=Q.value)==null||Vt.focus()},Li=()=>{mt()},C1=Vt=>{$n(Vt)},mt=Vt=>{if(z.value=!1,R.value){const Jt=new FocusEvent("focus",Vt);h.nextTick(()=>G(Jt))}},nt=()=>{a.inputValue.length>0?a.inputValue="":z.value=!1},st=()=>{Tt.value||(a.menuVisibleOnFocus?a.menuVisibleOnFocus=!1:z.value=!z.value)},ht=()=>{z.value?ge.value[a.hoveringIndex]&&Qe(ge.value[a.hoveringIndex]):st()},gt=Vt=>Qi(Vt.value)?cs(Vt.value,t.valueKey):Vt.value,St=h.computed(()=>ge.value.filter(Vt=>Vt.visible).every(Vt=>Vt.disabled)),Ct=h.computed(()=>t.multiple?t.collapseTags?a.selected.slice(0,t.maxCollapseTags):a.selected:[]),Ot=h.computed(()=>t.multiple?t.collapseTags?a.selected.slice(t.maxCollapseTags):[]:[]),Et=Vt=>{if(!z.value){z.value=!0;return}if(!(a.options.size===0||le.value===0)&&!St.value){Vt==="next"?(a.hoveringIndex++,a.hoveringIndex===a.options.size&&(a.hoveringIndex=0)):Vt==="prev"&&(a.hoveringIndex--,a.hoveringIndex<0&&(a.hoveringIndex=a.options.size-1));const Jt=ge.value[a.hoveringIndex];(Jt.disabled===!0||Jt.states.groupDisabled===!0||!Jt.visible)&&Et(Vt),h.nextTick(()=>Tn(J.value))}},Rt=()=>{if(!d.value)return 0;const Vt=window.getComputedStyle(d.value);return Number.parseFloat(Vt.gap||"6px")},oe=h.computed(()=>{const Vt=Rt();return{maxWidth:`${E.value&&t.maxCollapseTags===1?a.selectionWidth-a.collapseItemWidth-Vt:a.selectionWidth}px`}}),Kt=h.computed(()=>({maxWidth:`${a.selectionWidth}px`})),re=h.computed(()=>({width:`${Math.max(a.calculatorWidth,GX)}px`}));return t.multiple&&!Vi(t.modelValue)&&e(f1,[]),!t.multiple&&Vi(t.modelValue)&&e(f1,""),os(d,ze),os(m,zt),os(b,mn),os(O,mn),os(M,We),os(E,Pr),h.onMounted(()=>{Ae()}),{inputId:et,contentId:n,nsSelect:i,nsInput:o,states:a,isFocused:R,expanded:z,optionsArray:ge,hoverOption:J,selectSize:je,filteredOptionsCount:le,resetCalculatorWidth:zt,updateTooltip:mn,updateTagTooltip:We,debouncedOnInputChange:S1,onInput:Nn,deletePrevTag:cr,deleteTag:Wr,deleteSelected:$n,handleOptionSelect:Qe,scrollToOption:Tn,hasModelValue:At,shouldShowPlaceholder:he,currentPlaceholder:jt,showClose:Ut,iconComponent:ee,iconReverse:ue,validateState:Ft,validateIcon:pe,showNewOption:Fe,updateOptions:Ge,collapseTagSize:Dt,setSelected:Ae,selectDisabled:Tt,emptyText:Xt,handleCompositionStart:be,handleCompositionUpdate:yr,handleCompositionEnd:ur,onOptionCreate:ci,onOptionDestroy:ui,handleMenuEnter:n1,handleFocus:j,focus:sr,blur:Li,handleBlur:G,handleClearClick:C1,handleClickOutside:mt,handleEsc:nt,toggleMenu:st,selectOption:ht,getValueKey:gt,navigateOptions:Et,dropdownMenuVisible:qt,showTagList:Ct,collapseTagList:Ot,tagStyle:oe,collapseTagStyle:Kt,inputStyle:re,popperRef:r1,inputRef:Q,tooltipRef:p,tagTooltipRef:f,calculatorRef:m,prefixRef:_,suffixRef:v,selectRef:s,wrapperRef:O,selectionRef:d,scrollbarRef:V,menuRef:b,tagMenuRef:M,collapseItemRef:E}};var $X=h.defineComponent({name:"ElOptions",setup(t,{slots:e}){const r=h.inject(O9);let n=[];return()=>{var i,o;const a=(i=e.default)==null?void 0:i.call(e),s=[];function d(p){Vi(p)&&p.forEach(f=>{var Q,m,_,v;const b=(Q=(f==null?void 0:f.type)||{})==null?void 0:Q.name;b==="ElOptionGroup"?d(!W1(f.children)&&!Vi(f.children)&&po((m=f.children)==null?void 0:m.default)?(_=f.children)==null?void 0:_.default():f.children):b==="ElOption"?s.push((v=f.props)==null?void 0:v.value):Vi(f.children)&&d(f.children)})}return a.length&&d((o=a[0])==null?void 0:o.children),hl(s,n)||(n=s,r&&(r.states.optionValues=s)),a}}});const qX=on({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:T3,effect:{type:_r(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:_r(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:Oo.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:ps,default:Sf},fitInputWidth:Boolean,suffixIcon:{type:ps,default:d3},tagType:{...lE.type,default:"info"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,suffixTransition:{type:Boolean,default:!0},placement:{type:_r(String),values:Q9,default:"bottom-start"},ariaLabel:{type:String,default:void 0}}),LE="ElSelect",WX=h.defineComponent({name:LE,componentName:LE,components:{ElInput:L9,ElSelectMenu:zX,ElOption:pQ,ElOptions:$X,ElTag:hW,ElScrollbar:e$,ElTooltip:nQ,ElIcon:F1},directives:{ClickOutside:$w},props:qX,emits:[f1,p9,"remove-tag","clear","visible-change","focus","blur"],setup(t,{emit:e}){const r=ZX(t,e);return h.provide(O9,h.reactive({props:t,states:r.states,optionsArray:r.optionsArray,handleOptionSelect:r.handleOptionSelect,onOptionCreate:r.onOptionCreate,onOptionDestroy:r.onOptionDestroy,selectRef:r.selectRef,setSelected:r.setSelected})),{...r}}}),XX=["id","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],KX=["textContent"];function YX(t,e,r,n,i,o){const a=h.resolveComponent("el-tag"),s=h.resolveComponent("el-tooltip"),d=h.resolveComponent("el-icon"),p=h.resolveComponent("el-option"),f=h.resolveComponent("el-options"),Q=h.resolveComponent("el-scrollbar"),m=h.resolveComponent("el-select-menu"),_=h.resolveDirective("click-outside");return h.withDirectives((h.openBlock(),h.createElementBlock("div",{ref:"selectRef",class:h.normalizeClass([t.nsSelect.b(),t.nsSelect.m(t.selectSize)]),onMouseenter:e[14]||(e[14]=v=>t.states.inputHovering=!0),onMouseleave:e[15]||(e[15]=v=>t.states.inputHovering=!1),onClick:e[16]||(e[16]=h.withModifiers((...v)=>t.toggleMenu&&t.toggleMenu(...v),["stop"]))},[h.createVNode(s,{ref:"tooltipRef",visible:t.dropdownMenuVisible,placement:t.placement,teleported:t.teleported,"popper-class":[t.nsSelect.e("popper"),t.popperClass],"popper-options":t.popperOptions,"fallback-placements":["bottom-start","top-start","right","left"],effect:t.effect,pure:"",trigger:"click",transition:`${t.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:t.persistent,onBeforeShow:t.handleMenuEnter,onHide:e[13]||(e[13]=v=>t.states.isBeforeHide=!1)},{default:h.withCtx(()=>{var v;return[h.createElementVNode("div",{ref:"wrapperRef",class:h.normalizeClass([t.nsSelect.e("wrapper"),t.nsSelect.is("focused",t.isFocused),t.nsSelect.is("hovering",t.states.inputHovering),t.nsSelect.is("filterable",t.filterable),t.nsSelect.is("disabled",t.selectDisabled)])},[t.$slots.prefix?(h.openBlock(),h.createElementBlock("div",{key:0,ref:"prefixRef",class:h.normalizeClass(t.nsSelect.e("prefix"))},[h.renderSlot(t.$slots,"prefix")],2)):h.createCommentVNode("v-if",!0),h.createElementVNode("div",{ref:"selectionRef",class:h.normalizeClass([t.nsSelect.e("selection"),t.nsSelect.is("near",t.multiple&&!t.$slots.prefix&&!!t.states.selected.length)])},[t.multiple?h.renderSlot(t.$slots,"tag",{key:0},()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.showTagList,b=>(h.openBlock(),h.createElementBlock("div",{key:t.getValueKey(b),class:h.normalizeClass(t.nsSelect.e("selected-item"))},[h.createVNode(a,{closable:!t.selectDisabled&&!b.isDisabled,size:t.collapseTagSize,type:t.tagType,"disable-transitions":"",style:h.normalizeStyle(t.tagStyle),onClose:M=>t.deleteTag(M,b)},{default:h.withCtx(()=>[h.createElementVNode("span",{class:h.normalizeClass(t.nsSelect.e("tags-text"))},h.toDisplayString(b.currentLabel),3)]),_:2},1032,["closable","size","type","style","onClose"])],2))),128)),t.collapseTags&&t.states.selected.length>t.maxCollapseTags?(h.openBlock(),h.createBlock(s,{key:0,ref:"tagTooltipRef",disabled:t.dropdownMenuVisible||!t.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:t.effect,placement:"bottom",teleported:t.teleported},{default:h.withCtx(()=>[h.createElementVNode("div",{ref:"collapseItemRef",class:h.normalizeClass(t.nsSelect.e("selected-item"))},[h.createVNode(a,{closable:!1,size:t.collapseTagSize,type:t.tagType,"disable-transitions":"",style:h.normalizeStyle(t.collapseTagStyle)},{default:h.withCtx(()=>[h.createElementVNode("span",{class:h.normalizeClass(t.nsSelect.e("tags-text"))}," + "+h.toDisplayString(t.states.selected.length-t.maxCollapseTags),3)]),_:1},8,["size","type","style"])],2)]),content:h.withCtx(()=>[h.createElementVNode("div",{ref:"tagMenuRef",class:h.normalizeClass(t.nsSelect.e("selection"))},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.collapseTagList,b=>(h.openBlock(),h.createElementBlock("div",{key:t.getValueKey(b),class:h.normalizeClass(t.nsSelect.e("selected-item"))},[h.createVNode(a,{class:"in-tooltip",closable:!t.selectDisabled&&!b.isDisabled,size:t.collapseTagSize,type:t.tagType,"disable-transitions":"",onClose:M=>t.deleteTag(M,b)},{default:h.withCtx(()=>[h.createElementVNode("span",{class:h.normalizeClass(t.nsSelect.e("tags-text"))},h.toDisplayString(b.currentLabel),3)]),_:2},1032,["closable","size","type","onClose"])],2))),128))],2)]),_:1},8,["disabled","effect","teleported"])):h.createCommentVNode("v-if",!0)]):h.createCommentVNode("v-if",!0),t.selectDisabled?h.createCommentVNode("v-if",!0):(h.openBlock(),h.createElementBlock("div",{key:1,class:h.normalizeClass([t.nsSelect.e("selected-item"),t.nsSelect.e("input-wrapper"),t.nsSelect.is("hidden",!t.filterable)])},[h.withDirectives(h.createElementVNode("input",{id:t.inputId,ref:"inputRef","onUpdate:modelValue":e[0]||(e[0]=b=>t.states.inputValue=b),type:"text",class:h.normalizeClass([t.nsSelect.e("input"),t.nsSelect.is(t.selectSize)]),disabled:t.selectDisabled,autocomplete:t.autocomplete,style:h.normalizeStyle(t.inputStyle),role:"combobox",readonly:!t.filterable,spellcheck:"false","aria-activedescendant":((v=t.hoverOption)==null?void 0:v.id)||"","aria-controls":t.contentId,"aria-expanded":t.dropdownMenuVisible,"aria-label":t.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onFocus:e[1]||(e[1]=(...b)=>t.handleFocus&&t.handleFocus(...b)),onBlur:e[2]||(e[2]=(...b)=>t.handleBlur&&t.handleBlur(...b)),onKeydown:[e[3]||(e[3]=h.withKeys(h.withModifiers(b=>t.navigateOptions("next"),["stop","prevent"]),["down"])),e[4]||(e[4]=h.withKeys(h.withModifiers(b=>t.navigateOptions("prev"),["stop","prevent"]),["up"])),e[5]||(e[5]=h.withKeys(h.withModifiers((...b)=>t.handleEsc&&t.handleEsc(...b),["stop","prevent"]),["esc"])),e[6]||(e[6]=h.withKeys(h.withModifiers((...b)=>t.selectOption&&t.selectOption(...b),["stop","prevent"]),["enter"])),e[7]||(e[7]=h.withKeys(h.withModifiers((...b)=>t.deletePrevTag&&t.deletePrevTag(...b),["stop"]),["delete"]))],onCompositionstart:e[8]||(e[8]=(...b)=>t.handleCompositionStart&&t.handleCompositionStart(...b)),onCompositionupdate:e[9]||(e[9]=(...b)=>t.handleCompositionUpdate&&t.handleCompositionUpdate(...b)),onCompositionend:e[10]||(e[10]=(...b)=>t.handleCompositionEnd&&t.handleCompositionEnd(...b)),onInput:e[11]||(e[11]=(...b)=>t.onInput&&t.onInput(...b)),onClick:e[12]||(e[12]=h.withModifiers((...b)=>t.toggleMenu&&t.toggleMenu(...b),["stop"]))},null,46,XX),[[h.vModelText,t.states.inputValue]]),t.filterable?(h.openBlock(),h.createElementBlock("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:h.normalizeClass(t.nsSelect.e("input-calculator")),textContent:h.toDisplayString(t.states.inputValue)},null,10,KX)):h.createCommentVNode("v-if",!0)],2)),t.shouldShowPlaceholder?(h.openBlock(),h.createElementBlock("div",{key:2,class:h.normalizeClass([t.nsSelect.e("selected-item"),t.nsSelect.e("placeholder"),t.nsSelect.is("transparent",!t.hasModelValue||t.expanded&&!t.states.inputValue)])},[h.createElementVNode("span",null,h.toDisplayString(t.currentPlaceholder),1)],2)):h.createCommentVNode("v-if",!0)],2),h.createElementVNode("div",{ref:"suffixRef",class:h.normalizeClass(t.nsSelect.e("suffix"))},[t.iconComponent&&!t.showClose?(h.openBlock(),h.createBlock(d,{key:0,class:h.normalizeClass([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.iconReverse])},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(t.iconComponent)))]),_:1},8,["class"])):h.createCommentVNode("v-if",!0),t.showClose&&t.clearIcon?(h.openBlock(),h.createBlock(d,{key:1,class:h.normalizeClass([t.nsSelect.e("caret"),t.nsSelect.e("icon")]),onClick:t.handleClearClick},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(t.clearIcon)))]),_:1},8,["class","onClick"])):h.createCommentVNode("v-if",!0),t.validateState&&t.validateIcon?(h.openBlock(),h.createBlock(d,{key:2,class:h.normalizeClass([t.nsInput.e("icon"),t.nsInput.e("validateIcon")])},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(t.validateIcon)))]),_:1},8,["class"])):h.createCommentVNode("v-if",!0)],2)],2)]}),content:h.withCtx(()=>[h.createVNode(m,{ref:"menuRef"},{default:h.withCtx(()=>[t.$slots.header?(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(t.nsSelect.be("dropdown","header"))},[h.renderSlot(t.$slots,"header")],2)):h.createCommentVNode("v-if",!0),h.withDirectives(h.createVNode(Q,{id:t.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":t.nsSelect.be("dropdown","wrap"),"view-class":t.nsSelect.be("dropdown","list"),class:h.normalizeClass([t.nsSelect.is("empty",t.filteredOptionsCount===0)]),role:"listbox","aria-label":t.ariaLabel,"aria-orientation":"vertical"},{default:h.withCtx(()=>[t.showNewOption?(h.openBlock(),h.createBlock(p,{key:0,value:t.states.inputValue,created:!0},null,8,["value"])):h.createCommentVNode("v-if",!0),h.createVNode(f,null,{default:h.withCtx(()=>[h.renderSlot(t.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[h.vShow,t.states.options.size>0&&!t.loading]]),t.$slots.loading&&t.loading?(h.openBlock(),h.createElementBlock("div",{key:1,class:h.normalizeClass(t.nsSelect.be("dropdown","loading"))},[h.renderSlot(t.$slots,"loading")],2)):t.loading||t.filteredOptionsCount===0?(h.openBlock(),h.createElementBlock("div",{key:2,class:h.normalizeClass(t.nsSelect.be("dropdown","empty"))},[h.renderSlot(t.$slots,"empty",{},()=>[h.createElementVNode("span",null,h.toDisplayString(t.emptyText),1)])],2)):h.createCommentVNode("v-if",!0),t.$slots.footer?(h.openBlock(),h.createElementBlock("div",{key:3,class:h.normalizeClass(t.nsSelect.be("dropdown","footer"))},[h.renderSlot(t.$slots,"footer")],2)):h.createCommentVNode("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","effect","transition","persistent","onBeforeShow"])],34)),[[_,t.handleClickOutside,t.popperRef]])}var JX=Hr(WX,[["render",YX],["__file","select.vue"]]);const tK=h.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(t){const e=xr("select"),r=h.ref(null),n=h.getCurrentInstance(),i=h.ref([]);h.provide(bE,h.reactive({...h.toRefs(t)}));const o=h.computed(()=>i.value.some(d=>d.visible===!0)),a=d=>{const p=[];return Vi(d.children)&&d.children.forEach(f=>{var Q,m;f.type&&f.type.name==="ElOption"&&f.component&&f.component.proxy?p.push(f.component.proxy):(Q=f.children)!=null&&Q.length?p.push(...a(f)):(m=f.component)!=null&&m.subTree&&p.push(...a(f.component.subTree))}),p},s=()=>{i.value=a(n.subTree)};return h.onMounted(()=>{s()}),nD(r,s,{attributes:!0,subtree:!0,childList:!0}),{groupRef:r,visible:o,ns:e}}});function eK(t,e,r,n,i,o){return h.withDirectives((h.openBlock(),h.createElementBlock("ul",{ref:"groupRef",class:h.normalizeClass(t.ns.be("group","wrap"))},[h.createElementVNode("li",{class:h.normalizeClass(t.ns.be("group","title"))},h.toDisplayString(t.label),3),h.createElementVNode("li",null,[h.createElementVNode("ul",{class:h.normalizeClass(t.ns.b("group"))},[h.renderSlot(t.$slots,"default")],2)])],2)),[[h.vShow,t.visible]])}var xE=Hr(tK,[["render",eK],["__file","option-group.vue"]]);const d5=mi(JX,{Option:pQ,OptionGroup:xE}),k9=A2(pQ);A2(xE);const rK=on({trigger:wl.trigger,placement:dQ.placement,disabled:wl.disabled,visible:Oo.visible,transition:Oo.transition,popperOptions:dQ.popperOptions,tabindex:dQ.tabindex,content:Oo.content,popperStyle:Oo.popperStyle,popperClass:Oo.popperClass,enterable:{...Oo.enterable,default:!0},effect:{...Oo.effect,default:"light"},teleported:Oo.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}}),nK={"update:visible":t=>hs(t),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},iK="onUpdate:visible",oK=h.defineComponent({name:"ElPopover"}),aK=h.defineComponent({...oK,props:rK,emits:nK,setup(t,{expose:e,emit:r}){const n=t,i=h.computed(()=>n[iK]),o=xr("popover"),a=h.ref(),s=h.computed(()=>{var M;return(M=h.unref(a))==null?void 0:M.popperRef}),d=h.computed(()=>[{width:ds(n.width)},n.popperStyle]),p=h.computed(()=>[o.b(),n.popperClass,{[o.m("plain")]:!!n.content}]),f=h.computed(()=>n.transition===`${o.namespace.value}-fade-in-linear`),Q=()=>{var M;(M=a.value)==null||M.hide()},m=()=>{r("before-enter")},_=()=>{r("before-leave")},v=()=>{r("after-enter")},b=()=>{r("update:visible",!1),r("after-leave")};return e({popperRef:s,hide:Q}),(M,E)=>(h.openBlock(),h.createBlock(h.unref(nQ),h.mergeProps({ref_key:"tooltipRef",ref:a},M.$attrs,{trigger:M.trigger,placement:M.placement,disabled:M.disabled,visible:M.visible,transition:M.transition,"popper-options":M.popperOptions,tabindex:M.tabindex,content:M.content,offset:M.offset,"show-after":M.showAfter,"hide-after":M.hideAfter,"auto-close":M.autoClose,"show-arrow":M.showArrow,"aria-label":M.title,effect:M.effect,enterable:M.enterable,"popper-class":h.unref(p),"popper-style":h.unref(d),teleported:M.teleported,persistent:M.persistent,"gpu-acceleration":h.unref(f),"onUpdate:visible":h.unref(i),onBeforeShow:m,onBeforeHide:_,onShow:v,onHide:b}),{content:h.withCtx(()=>[M.title?(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(h.unref(o).e("title")),role:"title"},h.toDisplayString(M.title),3)):h.createCommentVNode("v-if",!0),h.renderSlot(M.$slots,"default",{},()=>[h.createTextVNode(h.toDisplayString(M.content),1)])]),default:h.withCtx(()=>[M.$slots.reference?h.renderSlot(M.$slots,"reference",{key:0}):h.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 sK=Hr(aK,[["__file","popover.vue"]]);const wE=(t,e)=>{const r=e.arg||e.value,n=r==null?void 0:r.popperRef;n&&(n.triggerRef=t)};var lK={mounted(t,e){wE(t,e)},updated(t,e){wE(t,e)}};const EE=NU(lK,"popover"),p5=mi(sK,{directive:EE}),T5="$treeNodeId",ME=function(t,e){!e||e[T5]||Object.defineProperty(e,T5,{value:t.id,enumerable:!1,configurable:!1,writable:!1})},TQ=function(t,e){return t?e[t]:e[T5]},fQ=(t,e,r)=>{const n=t.value.currentNode;r();const i=t.value.currentNode;n!==i&&e("current-change",i?i.data:null,i)},QQ=t=>{let e=!0,r=!0,n=!0;for(let i=0,o=t.length;i<o;i++){const a=t[i];(a.checked!==!0||a.indeterminate)&&(e=!1,a.disabled||(n=!1)),(a.checked!==!1||a.indeterminate)&&(r=!1)}return{all:e,none:r,allWithoutDisable:n,half:!e&&!r}},P9=function(t){if(t.childNodes.length===0||t.loading)return;const{all:e,none:r,half:n}=QQ(t.childNodes);e?(t.checked=!0,t.indeterminate=!1):n?(t.checked=!1,t.indeterminate=!0):r&&(t.checked=!1,t.indeterminate=!1);const i=t.parent;!i||i.level===0||t.store.checkStrictly||P9(i)},I9=function(t,e){const r=t.store.props,n=t.data||{},i=r[e];if(typeof i=="function")return i(n,t);if(typeof i=="string")return n[i];if(typeof i>"u"){const o=n[e];return o===void 0?"":o}};let cK=0;class O4{constructor(e){this.id=cK++,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 e)L4(e,r)&&(this[r]=e[r]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){const e=this.store;if(!e)throw new Error("[Node]store is required!");e.registerNode(this);const r=e.props;if(r&&typeof r.isLeaf<"u"){const o=I9(this,"isLeaf");typeof o=="boolean"&&(this.isLeafByUser=o)}if(e.lazy!==!0&&this.data?(this.setData(this.data),e.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&e.lazy&&e.defaultExpandAll&&this.expand(),Array.isArray(this.data)||ME(this,this.data),!this.data)return;const n=e.defaultExpandedKeys,i=e.key;i&&n&&n.includes(this.key)&&this.expand(null,e.autoExpandParent),i&&e.currentNodeKey!==void 0&&this.key===e.currentNodeKey&&(e.currentNode=this,e.currentNode.isCurrent=!0),e.lazy&&e._initDefaultCheckedNode(this),this.updateLeafState(),this.parent&&(this.level===1||this.parent.expanded===!0)&&(this.canFocus=!0)}setData(e){Array.isArray(e)||ME(this,e),this.data=e,this.childNodes=[];let r;this.level===0&&Array.isArray(this.data)?r=this.data:r=I9(this,"children")||[];for(let n=0,i=r.length;n<i;n++)this.insertChild({data:r[n]})}get label(){return I9(this,"label")}get key(){const e=this.store.key;return this.data?this.data[e]:null}get disabled(){return I9(this,"disabled")}get nextSibling(){const e=this.parent;if(e){const r=e.childNodes.indexOf(this);if(r>-1)return e.childNodes[r+1]}return null}get previousSibling(){const e=this.parent;if(e){const r=e.childNodes.indexOf(this);if(r>-1)return r>0?e.childNodes[r-1]:null}return null}contains(e,r=!0){return(this.childNodes||[]).some(n=>n===e||r&&n.contains(e))}remove(){const e=this.parent;e&&e.removeChild(this)}insertChild(e,r,n){if(!e)throw new Error("InsertChild error: child is required.");if(!(e instanceof O4)){if(!n){const i=this.getChildren(!0);i.includes(e.data)||(typeof r>"u"||r<0?i.push(e.data):i.splice(r,0,e.data))}Object.assign(e,{parent:this,store:this.store}),e=h.reactive(new O4(e)),e instanceof O4&&e.initialize()}e.level=this.level+1,typeof r>"u"||r<0?this.childNodes.push(e):this.childNodes.splice(r,0,e),this.updateLeafState()}insertBefore(e,r){let n;r&&(n=this.childNodes.indexOf(r)),this.insertChild(e,n)}insertAfter(e,r){let n;r&&(n=this.childNodes.indexOf(r),n!==-1&&(n+=1)),this.insertChild(e,n)}removeChild(e){const r=this.getChildren()||[],n=r.indexOf(e.data);n>-1&&r.splice(n,1);const i=this.childNodes.indexOf(e);i>-1&&(this.store&&this.store.deregisterNode(e),e.parent=null,this.childNodes.splice(i,1)),this.updateLeafState()}removeChildByData(e){let r=null;for(let n=0;n<this.childNodes.length;n++)if(this.childNodes[n].data===e){r=this.childNodes[n];break}r&&this.removeChild(r)}expand(e,r){const n=()=>{if(r){let i=this.parent;for(;i.level>0;)i.expanded=!0,i=i.parent}this.expanded=!0,e&&e(),this.childNodes.forEach(i=>{i.canFocus=!0})};this.shouldLoadData()?this.loadData(i=>{Array.isArray(i)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||P9(this),n())}):n()}doCreateChildren(e,r={}){e.forEach(n=>{this.insertChild(Object.assign({data:n},r),void 0,!0)})}collapse(){this.expanded=!1,this.childNodes.forEach(e=>{e.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 e=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!e||e.length===0;return}this.isLeaf=!1}setChecked(e,r,n,i){if(this.indeterminate=e==="half",this.checked=e===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:a,allWithoutDisable:s}=QQ(this.childNodes);!this.isLeaf&&!a&&s&&(this.checked=!1,e=!1);const d=()=>{if(r){const p=this.childNodes;for(let m=0,_=p.length;m<_;m++){const v=p[m];i=i||e!==!1;const b=v.disabled?v.checked:i;v.setChecked(b,r,!0,i)}const{half:f,all:Q}=QQ(p);Q||(this.checked=Q,this.indeterminate=f)}};if(this.shouldLoadData()){this.loadData(()=>{d(),P9(this)},{checked:e!==!1});return}else d()}const o=this.parent;!o||o.level===0||n||P9(o)}getChildren(e=!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),e&&!r[i]&&(r[i]=[]),r[i]}updateChildren(){const e=this.getChildren()||[],r=this.childNodes.map(o=>o.data),n={},i=[];e.forEach((o,a)=>{const s=o[T5];!!s&&r.findIndex(p=>p[T5]===s)>=0?n[s]={index:a,data:o}:i.push({index:a,data:o})}),this.store.lazy||r.forEach(o=>{n[o[T5]]||this.removeChildByData(o)}),i.forEach(({index:o,data:a})=>{this.insertChild({data:a},o)}),this.updateLeafState()}loadData(e,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(),e&&e.call(this,i)};this.store.load(this,n)}else e&&e.call(this)}}class uK{constructor(e){this.currentNode=null,this.currentNodeKey=null;for(const r in e)L4(e,r)&&(this[r]=e[r]);this.nodesMap={}}initialize(){if(this.root=new O4({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const e=this.load;e(this.root,r=>{this.root.doCreateChildren(r),this._initDefaultCheckedNodes()})}else this._initDefaultCheckedNodes()}filter(e){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,e,s.data,s),i(s)}),!o.visible&&a.length){let s=!0;s=!a.some(d=>d.visible),o.root?o.root.visible=s===!1:o.visible=s===!1}e&&o.visible&&!o.isLeaf&&(!n||o.loaded)&&o.expand()};i(this)}setData(e){e!==this.root.data?(this.root.setData(e),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(e){if(e instanceof O4)return e;const r=Qi(e)?TQ(this.key,e):e;return this.nodesMap[r]||null}insertBefore(e,r){const n=this.getNode(r);n.parent.insertBefore({data:e},n)}insertAfter(e,r){const n=this.getNode(r);n.parent.insertAfter({data:e},n)}remove(e){const r=this.getNode(e);r&&r.parent&&(r===this.currentNode&&(this.currentNode=null),r.parent.removeChild(r))}append(e,r){const n=r?this.getNode(r):this.root;n&&n.insertChild({data:e})}_initDefaultCheckedNodes(){const e=this.defaultCheckedKeys||[],r=this.nodesMap;e.forEach(n=>{const i=r[n];i&&i.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(e){(this.defaultCheckedKeys||[]).includes(e.key)&&e.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(e){e!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=e,this._initDefaultCheckedNodes())}registerNode(e){const r=this.key;!e||!e.data||(r?e.key!==void 0&&(this.nodesMap[e.key]=e):this.nodesMap[e.id]=e)}deregisterNode(e){!this.key||!e||!e.data||(e.childNodes.forEach(n=>{this.deregisterNode(n)}),delete this.nodesMap[e.key])}getCheckedNodes(e=!1,r=!1){const n=[],i=function(o){(o.root?o.root.childNodes:o.childNodes).forEach(s=>{(s.checked||r&&s.indeterminate)&&(!e||e&&s.isLeaf)&&n.push(s.data),i(s)})};return i(this),n}getCheckedKeys(e=!1){return this.getCheckedNodes(e).map(r=>(r||{})[this.key])}getHalfCheckedNodes(){const e=[],r=function(n){(n.root?n.root.childNodes:n.childNodes).forEach(o=>{o.indeterminate&&e.push(o.data),r(o)})};return r(this),e}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(e=>(e||{})[this.key])}_getAllNodes(){const e=[],r=this.nodesMap;for(const n in r)L4(r,n)&&e.push(r[n]);return e}updateChildren(e,r){const n=this.nodesMap[e];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(e,r=!1,n){const i=this._getAllNodes().sort((d,p)=>d.level-p.level),o=Object.create(null),a=Object.keys(n);i.forEach(d=>d.setChecked(!1,!1));const s=d=>{d.childNodes.forEach(p=>{var f;o[p.data[e]]=!0,(f=p.childNodes)!=null&&f.length&&s(p)})};for(let d=0,p=i.length;d<p;d++){const f=i[d],Q=f.data[e].toString();if(!a.includes(Q)){f.checked&&!o[Q]&&f.setChecked(!1,!1);continue}if(f.childNodes.length&&s(f),f.isLeaf||this.checkStrictly){f.setChecked(!0,!1);continue}if(f.setChecked(!0,!0),r){f.setChecked(!1,!1);const _=function(v){v.childNodes.forEach(M=>{M.isLeaf||M.setChecked(!1,!1),_(M)})};_(f)}}}setCheckedNodes(e,r=!1){const n=this.key,i={};e.forEach(o=>{i[(o||{})[n]]=!0}),this._setCheckedKeys(n,r,i)}setCheckedKeys(e,r=!1){this.defaultCheckedKeys=e;const n=this.key,i={};e.forEach(o=>{i[o]=!0}),this._setCheckedKeys(n,r,i)}setDefaultExpandedKeys(e){e=e||[],this.defaultExpandedKeys=e,e.forEach(r=>{const n=this.getNode(r);n&&n.expand(null,this.autoExpandParent)})}setChecked(e,r,n){const i=this.getNode(e);i&&i.setChecked(!!r,n)}getCurrentNode(){return this.currentNode}setCurrentNode(e){const r=this.currentNode;r&&(r.isCurrent=!1),this.currentNode=e,this.currentNode.isCurrent=!0}setUserCurrentNode(e,r=!0){const n=e[this.key],i=this.nodesMap[n];this.setCurrentNode(i),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(e,r=!0){if(e==null){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const n=this.getNode(e);n&&(this.setCurrentNode(n),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}const hK=h.defineComponent({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(t){const e=xr("tree"),r=h.inject("NodeInstance"),n=h.inject("RootTree");return()=>{const i=t.node,{data:o,store:a}=i;return t.renderContent?t.renderContent(h.h,{_self:r,node:i,data:o,store:a}):h.renderSlot(n.ctx.slots,"default",{node:i,data:o},()=>[h.h("span",{class:e.be("node","label")},[i.label])])}}});var dK=Hr(hK,[["__file","tree-node-content.vue"]]);function HE(t){const e=h.inject("TreeNodeMap",null),r={treeNodeExpand:n=>{t.node!==n&&t.node.collapse()},children:[]};return e&&e.children.push(r),h.provide("TreeNodeMap",r),{broadcastExpanded:n=>{if(t.accordion)for(const i of r.children)i.treeNodeExpand(n)}}}const SE=Symbol("dragEvents");function pK({props:t,ctx:e,el$:r,dropIndicator$:n,store:i}){const o=xr("tree"),a=h.ref({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null}),s=({event:f,treeNode:Q})=>{if(typeof t.allowDrag=="function"&&!t.allowDrag(Q.node))return f.preventDefault(),!1;f.dataTransfer.effectAllowed="move";try{f.dataTransfer.setData("text/plain","")}catch{}a.value.draggingNode=Q,e.emit("node-drag-start",Q.node,f)},d=({event:f,treeNode:Q})=>{const m=Q,_=a.value.dropNode;_&&_.node.id!==m.node.id&&h3(_.$el,o.is("drop-inner"));const v=a.value.draggingNode;if(!v||!m)return;let b=!0,M=!0,E=!0,V=!0;typeof t.allowDrop=="function"&&(b=t.allowDrop(v.node,m.node,"prev"),V=M=t.allowDrop(v.node,m.node,"inner"),E=t.allowDrop(v.node,m.node,"next")),f.dataTransfer.dropEffect=M||b||E?"move":"none",(b||M||E)&&(_==null?void 0:_.node.id)!==m.node.id&&(_&&e.emit("node-drag-leave",v.node,_.node,f),e.emit("node-drag-enter",v.node,m.node,f)),b||M||E?a.value.dropNode=m:a.value.dropNode=null,m.node.nextSibling===v.node&&(E=!1),m.node.previousSibling===v.node&&(b=!1),m.node.contains(v.node,!1)&&(M=!1),(v.node===m.node||v.node.contains(m.node))&&(b=!1,M=!1,E=!1);const O=m.$el.querySelector(`.${o.be("node","content")}`).getBoundingClientRect(),R=r.value.getBoundingClientRect();let j;const G=b?M?.25:E?.45:1:-1,z=E?M?.75:b?.55:0:1;let J=-9999;const tt=f.clientY-O.top;tt<O.height*G?j="before":tt>O.height*z?j="after":M?j="inner":j="none";const ot=m.$el.querySelector(`.${o.be("node","expand-icon")}`).getBoundingClientRect(),et=n.value;j==="before"?J=ot.top-R.top:j==="after"&&(J=ot.bottom-R.top),et.style.top=`${J}px`,et.style.left=`${ot.right-R.left}px`,j==="inner"?l9(m.$el,o.is("drop-inner")):h3(m.$el,o.is("drop-inner")),a.value.showDropIndicator=j==="before"||j==="after",a.value.allowDrop=a.value.showDropIndicator||V,a.value.dropType=j,e.emit("node-drag-over",v.node,m.node,f)},p=f=>{const{draggingNode:Q,dropType:m,dropNode:_}=a.value;if(f.preventDefault(),f.dataTransfer.dropEffect="move",Q&&_){const v={data:Q.node.data};m!=="none"&&Q.node.remove(),m==="before"?_.node.parent.insertBefore(v,_.node):m==="after"?_.node.parent.insertAfter(v,_.node):m==="inner"&&_.node.insertChild(v),m!=="none"&&i.value.registerNode(v),h3(_.$el,o.is("drop-inner")),e.emit("node-drag-end",Q.node,_.node,m,f),m!=="none"&&e.emit("node-drop",Q.node,_.node,m,f)}Q&&!_&&e.emit("node-drag-end",Q.node,null,m,f),a.value.showDropIndicator=!1,a.value.draggingNode=null,a.value.dropNode=null,a.value.allowDrop=!0};return h.provide(SE,{treeNodeDragStart:s,treeNodeDragOver:d,treeNodeDragEnd:p}),{dragState:a}}const TK=h.defineComponent({name:"ElTreeNode",components:{ElCollapseTransition:bW,ElCheckbox:C9,NodeContent:dK,ElIcon:F1,Loading:Cf},props:{node:{type:O4,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(t,e){const r=xr("tree"),{broadcastExpanded:n}=HE(t),i=h.inject("RootTree"),o=h.ref(!1),a=h.ref(!1),s=h.ref(null),d=h.ref(null),p=h.ref(null),f=h.inject(SE),Q=h.getCurrentInstance();h.provide("NodeInstance",Q),i||K1("Tree","Can not find node's tree."),t.node.expanded&&(o.value=!0,a.value=!0);const m=i.props.props.children||"children";h.watch(()=>{const tt=t.node.data[m];return tt&&[...tt]},()=>{t.node.updateChildren()}),h.watch(()=>t.node.indeterminate,tt=>{b(t.node.checked,tt)}),h.watch(()=>t.node.checked,tt=>{b(tt,t.node.indeterminate)}),h.watch(()=>t.node.expanded,tt=>{h.nextTick(()=>o.value=tt),tt&&(a.value=!0)});const _=tt=>TQ(i.props.nodeKey,tt.data),v=tt=>{const ot=t.props.class;if(!ot)return{};let et;if(po(ot)){const{data:Tt}=tt;et=ot(Tt,tt)}else et=ot;return W1(et)?{[et]:!0}:et},b=(tt,ot)=>{(s.value!==tt||d.value!==ot)&&i.ctx.emit("check-change",t.node.data,tt,ot),s.value=tt,d.value=ot},M=tt=>{fQ(i.store,i.ctx.emit,()=>i.store.value.setCurrentNode(t.node)),i.currentNode.value=t.node,i.props.expandOnClickNode&&V(),i.props.checkOnClickNode&&!t.node.disabled&&O(null,{target:{checked:!t.node.checked}}),i.ctx.emit("node-click",t.node.data,t.node,Q,tt)},E=tt=>{i.instance.vnode.props.onNodeContextmenu&&(tt.stopPropagation(),tt.preventDefault()),i.ctx.emit("node-contextmenu",tt,t.node.data,t.node,Q)},V=()=>{t.node.isLeaf||(o.value?(i.ctx.emit("node-collapse",t.node.data,t.node,Q),t.node.collapse()):(t.node.expand(),e.emit("node-expand",t.node.data,t.node,Q)))},O=(tt,ot)=>{t.node.setChecked(ot.target.checked,!i.props.checkStrictly),h.nextTick(()=>{const et=i.store.value;i.ctx.emit("check",t.node.data,{checkedNodes:et.getCheckedNodes(),checkedKeys:et.getCheckedKeys(),halfCheckedNodes:et.getHalfCheckedNodes(),halfCheckedKeys:et.getHalfCheckedKeys()})})};return{ns:r,node$:p,tree:i,expanded:o,childNodeRendered:a,oldChecked:s,oldIndeterminate:d,getNodeKey:_,getNodeClass:v,handleSelectChange:b,handleClick:M,handleContextMenu:E,handleExpandIconClick:V,handleCheckChange:O,handleChildNodeExpand:(tt,ot,et)=>{n(ot),i.ctx.emit("node-expand",tt,ot,et)},handleDragStart:tt=>{i.props.draggable&&f.treeNodeDragStart({event:tt,treeNode:t})},handleDragOver:tt=>{tt.preventDefault(),i.props.draggable&&f.treeNodeDragOver({event:tt,treeNode:{$el:p.value,node:t.node}})},handleDrop:tt=>{tt.preventDefault()},handleDragEnd:tt=>{i.props.draggable&&f.treeNodeDragEnd(tt)},CaretRight:mU}}}),fK=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],QK=["aria-expanded"];function mK(t,e,r,n,i,o){const a=h.resolveComponent("el-icon"),s=h.resolveComponent("el-checkbox"),d=h.resolveComponent("loading"),p=h.resolveComponent("node-content"),f=h.resolveComponent("el-tree-node"),Q=h.resolveComponent("el-collapse-transition");return h.withDirectives((h.openBlock(),h.createElementBlock("div",{ref:"node$",class:h.normalizeClass([t.ns.b("node"),t.ns.is("expanded",t.expanded),t.ns.is("current",t.node.isCurrent),t.ns.is("hidden",!t.node.visible),t.ns.is("focusable",!t.node.disabled),t.ns.is("checked",!t.node.disabled&&t.node.checked),t.getNodeClass(t.node)]),role:"treeitem",tabindex:"-1","aria-expanded":t.expanded,"aria-disabled":t.node.disabled,"aria-checked":t.node.checked,draggable:t.tree.props.draggable,"data-key":t.getNodeKey(t.node),onClick:e[1]||(e[1]=h.withModifiers((...m)=>t.handleClick&&t.handleClick(...m),["stop"])),onContextmenu:e[2]||(e[2]=(...m)=>t.handleContextMenu&&t.handleContextMenu(...m)),onDragstart:e[3]||(e[3]=h.withModifiers((...m)=>t.handleDragStart&&t.handleDragStart(...m),["stop"])),onDragover:e[4]||(e[4]=h.withModifiers((...m)=>t.handleDragOver&&t.handleDragOver(...m),["stop"])),onDragend:e[5]||(e[5]=h.withModifiers((...m)=>t.handleDragEnd&&t.handleDragEnd(...m),["stop"])),onDrop:e[6]||(e[6]=h.withModifiers((...m)=>t.handleDrop&&t.handleDrop(...m),["stop"]))},[h.createElementVNode("div",{class:h.normalizeClass(t.ns.be("node","content")),style:h.normalizeStyle({paddingLeft:(t.node.level-1)*t.tree.props.indent+"px"})},[t.tree.props.icon||t.CaretRight?(h.openBlock(),h.createBlock(a,{key:0,class:h.normalizeClass([t.ns.be("node","expand-icon"),t.ns.is("leaf",t.node.isLeaf),{expanded:!t.node.isLeaf&&t.expanded}]),onClick:h.withModifiers(t.handleExpandIconClick,["stop"])},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(t.tree.props.icon||t.CaretRight)))]),_:1},8,["class","onClick"])):h.createCommentVNode("v-if",!0),t.showCheckbox?(h.openBlock(),h.createBlock(s,{key:1,"model-value":t.node.checked,indeterminate:t.node.indeterminate,disabled:!!t.node.disabled,onClick:e[0]||(e[0]=h.withModifiers(()=>{},["stop"])),onChange:t.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):h.createCommentVNode("v-if",!0),t.node.loading?(h.openBlock(),h.createBlock(a,{key:2,class:h.normalizeClass([t.ns.be("node","loading-icon"),t.ns.is("loading")])},{default:h.withCtx(()=>[h.createVNode(d)]),_:1},8,["class"])):h.createCommentVNode("v-if",!0),h.createVNode(p,{node:t.node,"render-content":t.renderContent},null,8,["node","render-content"])],6),h.createVNode(Q,null,{default:h.withCtx(()=>[!t.renderAfterExpand||t.childNodeRendered?h.withDirectives((h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(t.ns.be("node","children")),role:"group","aria-expanded":t.expanded},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.node.childNodes,m=>(h.openBlock(),h.createBlock(f,{key:t.getNodeKey(m),"render-content":t.renderContent,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,node:m,accordion:t.accordion,props:t.props,onNodeExpand:t.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,QK)),[[h.vShow,t.expanded]]):h.createCommentVNode("v-if",!0)]),_:1})],42,fK)),[[h.vShow,t.node.visible]])}var gK=Hr(TK,[["render",mK],["__file","tree-node.vue"]]);function yK({el$:t},e){const r=xr("tree"),n=h.shallowRef([]),i=h.shallowRef([]);h.onMounted(()=>{a()}),h.onUpdated(()=>{n.value=Array.from(t.value.querySelectorAll("[role=treeitem]")),i.value=Array.from(t.value.querySelectorAll("input[type=checkbox]"))}),h.watch(i,s=>{s.forEach(d=>{d.setAttribute("tabindex","-1")})}),s3(t,"keydown",s=>{const d=s.target;if(!d.className.includes(r.b("node")))return;const p=s.code;n.value=Array.from(t.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`));const f=n.value.indexOf(d);let Q;if([Xi.up,Xi.down].includes(p)){if(s.preventDefault(),p===Xi.up){Q=f===-1?0:f!==0?f-1:n.value.length-1;const _=Q;for(;!e.value.getNode(n.value[Q].dataset.key).canFocus;){if(Q--,Q===_){Q=-1;break}Q<0&&(Q=n.value.length-1)}}else{Q=f===-1?0:f<n.value.length-1?f+1:0;const _=Q;for(;!e.value.getNode(n.value[Q].dataset.key).canFocus;){if(Q++,Q===_){Q=-1;break}Q>=n.value.length&&(Q=0)}}Q!==-1&&n.value[Q].focus()}[Xi.left,Xi.right].includes(p)&&(s.preventDefault(),d.click());const m=d.querySelector('[type="checkbox"]');[Xi.enter,Xi.space].includes(p)&&m&&(s.preventDefault(),m.click())});const a=()=>{var s;n.value=Array.from(t.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`)),i.value=Array.from(t.value.querySelectorAll("input[type=checkbox]"));const d=t.value.querySelectorAll(`.${r.is("checked")}[role=treeitem]`);if(d.length){d[0].setAttribute("tabindex","0");return}(s=n.value[0])==null||s.setAttribute("tabindex","0")}}const _K=h.defineComponent({name:"ElTree",components:{ElTreeNode:gK},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:ps}},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(t,e){const{t:r}=Tl(),n=xr("tree"),i=h.ref(new uK({key:t.nodeKey,data:t.data,lazy:t.lazy,props:t.props,load:t.load,currentNodeKey:t.currentNodeKey,checkStrictly:t.checkStrictly,checkDescendants:t.checkDescendants,defaultCheckedKeys:t.defaultCheckedKeys,defaultExpandedKeys:t.defaultExpandedKeys,autoExpandParent:t.autoExpandParent,defaultExpandAll:t.defaultExpandAll,filterNodeMethod:t.filterNodeMethod}));i.value.initialize();const o=h.ref(i.value.root),a=h.ref(null),s=h.ref(null),d=h.ref(null),{broadcastExpanded:p}=HE(t),{dragState:f}=pK({props:t,ctx:e,el$:s,dropIndicator$:d,store:i});yK({el$:s},i);const Q=h.computed(()=>{const{childNodes:Ft}=o.value;return!Ft||Ft.length===0||Ft.every(({visible:pe})=>!pe)});h.watch(()=>t.currentNodeKey,Ft=>{i.value.setCurrentNodeKey(Ft)}),h.watch(()=>t.defaultCheckedKeys,Ft=>{i.value.setDefaultCheckedKey(Ft)}),h.watch(()=>t.defaultExpandedKeys,Ft=>{i.value.setDefaultExpandedKeys(Ft)}),h.watch(()=>t.data,Ft=>{i.value.setData(Ft)},{deep:!0}),h.watch(()=>t.checkStrictly,Ft=>{i.value.checkStrictly=Ft});const m=Ft=>{if(!t.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");i.value.filter(Ft)},_=Ft=>TQ(t.nodeKey,Ft.data),v=Ft=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const pe=i.value.getNode(Ft);if(!pe)return[];const lr=[pe.data];let Xt=pe.parent;for(;Xt&&Xt!==o.value;)lr.push(Xt.data),Xt=Xt.parent;return lr.reverse()},b=(Ft,pe)=>i.value.getCheckedNodes(Ft,pe),M=Ft=>i.value.getCheckedKeys(Ft),E=()=>{const Ft=i.value.getCurrentNode();return Ft?Ft.data:null},V=()=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const Ft=E();return Ft?Ft[t.nodeKey]:null},O=(Ft,pe)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");i.value.setCheckedNodes(Ft,pe)},R=(Ft,pe)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");i.value.setCheckedKeys(Ft,pe)},j=(Ft,pe,lr)=>{i.value.setChecked(Ft,pe,lr)},G=()=>i.value.getHalfCheckedNodes(),z=()=>i.value.getHalfCheckedKeys(),J=(Ft,pe=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");fQ(i,e.emit,()=>i.value.setUserCurrentNode(Ft,pe))},tt=(Ft,pe=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");fQ(i,e.emit,()=>i.value.setCurrentNodeKey(Ft,pe))},ot=Ft=>i.value.getNode(Ft),et=Ft=>{i.value.remove(Ft)},Tt=(Ft,pe)=>{i.value.append(Ft,pe)},At=(Ft,pe)=>{i.value.insertBefore(Ft,pe)},Ut=(Ft,pe)=>{i.value.insertAfter(Ft,pe)},ee=(Ft,pe,lr)=>{p(pe),e.emit("node-expand",Ft,pe,lr)},ue=(Ft,pe)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");i.value.updateChildren(Ft,pe)};return h.provide("RootTree",{ctx:e,props:t,store:i,root:o,currentNode:a,instance:h.getCurrentInstance()}),h.provide(xl,void 0),{ns:n,store:i,root:o,currentNode:a,dragState:f,el$:s,dropIndicator$:d,isEmpty:Q,filter:m,getNodeKey:_,getNodePath:v,getCheckedNodes:b,getCheckedKeys:M,getCurrentNode:E,getCurrentKey:V,setCheckedNodes:O,setCheckedKeys:R,setChecked:j,getHalfCheckedNodes:G,getHalfCheckedKeys:z,setCurrentNode:J,setCurrentKey:tt,t:r,getNode:ot,remove:et,append:Tt,insertBefore:At,insertAfter:Ut,handleNodeExpand:ee,updateKeyChildren:ue}}});function vK(t,e,r,n,i,o){const a=h.resolveComponent("el-tree-node");return h.openBlock(),h.createElementBlock("div",{ref:"el$",class:h.normalizeClass([t.ns.b(),t.ns.is("dragging",!!t.dragState.draggingNode),t.ns.is("drop-not-allow",!t.dragState.allowDrop),t.ns.is("drop-inner",t.dragState.dropType==="inner"),{[t.ns.m("highlight-current")]:t.highlightCurrent}]),role:"tree"},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.root.childNodes,s=>(h.openBlock(),h.createBlock(a,{key:t.getNodeKey(s),node:s,props:t.props,accordion:t.accordion,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,"render-content":t.renderContent,onNodeExpand:t.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),t.isEmpty?(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(t.ns.e("empty-block"))},[h.renderSlot(t.$slots,"empty",{},()=>{var s;return[h.createElementVNode("span",{class:h.normalizeClass(t.ns.e("empty-text"))},h.toDisplayString((s=t.emptyText)!=null?s:t.t("el.tree.emptyText")),3)]})],2)):h.createCommentVNode("v-if",!0),h.withDirectives(h.createElementVNode("div",{ref:"dropIndicator$",class:h.normalizeClass(t.ns.e("drop-indicator"))},null,2),[[h.vShow,t.dragState.showDropIndicator]])],2)}var R9=Hr(_K,[["render",vK],["__file","tree.vue"]]);R9.install=t=>{t.component(R9.name,R9)};const CE=R9;function bK(t){let e;const r=h.ref(!1),n=h.reactive({...t,originalPosition:"",originalOverflow:"",visible:!1});function i(m){n.text=m}function o(){const m=n.parent,_=Q.ns;if(!m.vLoadingAddClassList){let v=m.getAttribute("loading-number");v=Number.parseInt(v)-1,v?m.setAttribute("loading-number",v.toString()):(h3(m,_.bm("parent","relative")),m.removeAttribute("loading-number")),h3(m,_.bm("parent","hidden"))}a(),f.unmount()}function a(){var m,_;(_=(m=Q.$el)==null?void 0:m.parentNode)==null||_.removeChild(Q.$el)}function s(){var m;t.beforeClose&&!t.beforeClose()||(r.value=!0,clearTimeout(e),e=window.setTimeout(d,400),n.visible=!1,(m=t.closed)==null||m.call(t))}function d(){if(!r.value)return;const m=n.parent;r.value=!1,m.vLoadingAddClassList=void 0,o()}const p=h.defineComponent({name:"ElLoading",setup(m,{expose:_}){const{ns:v,zIndex:b}=EZ("loading");return _({ns:v,zIndex:b}),()=>{const M=n.spinner||n.svg,E=h.h("svg",{class:"circular",viewBox:n.svgViewBox?n.svgViewBox:"0 0 50 50",...M?{innerHTML:M}:{}},[h.h("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),V=n.text?h.h("p",{class:v.b("text")},[n.text]):void 0;return h.h(h.Transition,{name:v.b("fade"),onAfterLeave:d},{default:h.withCtx(()=>[h.withDirectives(h.createVNode("div",{style:{backgroundColor:n.background||""},class:[v.b("mask"),n.customClass,n.fullscreen?"is-fullscreen":""]},[h.h("div",{class:v.b("spinner")},[E,V])]),[[h.vShow,n.visible]])])})}}}),f=h.createApp(p),Q=f.mount(document.createElement("div"));return{...h.toRefs(n),setText:i,removeElLoadingChild:a,close:s,handleAfterLeave:d,vm:Q,get $el(){return Q.$el}}}let N9;const mQ=function(t={}){if(!T1)return;const e=LK(t);if(e.fullscreen&&N9)return N9;const r=bK({...e,closed:()=>{var i;(i=e.closed)==null||i.call(e),e.fullscreen&&(N9=void 0)}});xK(e,e.parent,r),AE(e,e.parent,r),e.parent.vLoadingAddClassList=()=>AE(e,e.parent,r);let n=e.parent.getAttribute("loading-number");return n?n=`${Number.parseInt(n)+1}`:n="1",e.parent.setAttribute("loading-number",n),e.parent.appendChild(r.$el),h.nextTick(()=>r.visible.value=e.visible),e.fullscreen&&(N9=r),r},LK=t=>{var e,r,n,i;let o;return W1(t.target)?o=(e=document.querySelector(t.target))!=null?e:document.body:o=t.target||document.body,{parent:o===document.body||t.body?document.body:o,background:t.background||"",svg:t.svg||"",svgViewBox:t.svgViewBox||"",spinner:t.spinner||!1,text:t.text||"",fullscreen:o===document.body&&((r=t.fullscreen)!=null?r:!0),lock:(n=t.lock)!=null?n:!1,customClass:t.customClass||"",visible:(i=t.visible)!=null?i:!0,target:o}},xK=async(t,e,r)=>{const{nextZIndex:n}=r.vm.zIndex||r.vm._.exposed.zIndex,i={};if(t.fullscreen)r.originalPosition.value=K6(document.body,"position"),r.originalOverflow.value=K6(document.body,"overflow"),i.zIndex=n();else if(t.parent===document.body){r.originalPosition.value=K6(document.body,"position"),await h.nextTick();for(const o of["top","left"]){const a=o==="top"?"scrollTop":"scrollLeft";i[o]=`${t.target.getBoundingClientRect()[o]+document.body[a]+document.documentElement[a]-Number.parseInt(K6(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])i[o]=`${t.target.getBoundingClientRect()[o]}px`}else r.originalPosition.value=K6(e,"position");for(const[o,a]of Object.entries(i))r.$el.style[o]=a},AE=(t,e,r)=>{const n=r.vm.ns||r.vm._.exposed.ns;["absolute","fixed","sticky"].includes(r.originalPosition.value)?h3(e,n.bm("parent","relative")):l9(e,n.bm("parent","relative")),t.fullscreen&&t.lock?l9(e,n.bm("parent","hidden")):h3(e,n.bm("parent","hidden"))},B9=Symbol("ElLoading"),VE=(t,e)=>{var r,n,i,o;const a=e.instance,s=m=>Qi(e.value)?e.value[m]:void 0,d=m=>{const _=W1(m)&&(a==null?void 0:a[m])||m;return _&&h.ref(_)},p=m=>d(s(m)||t.getAttribute(`element-loading-${QD(m)}`)),f=(r=s("fullscreen"))!=null?r:e.modifiers.fullscreen,Q={text:p("text"),svg:p("svg"),svgViewBox:p("svgViewBox"),spinner:p("spinner"),background:p("background"),customClass:p("customClass"),fullscreen:f,target:(n=s("target"))!=null?n:f?void 0:t,body:(i=s("body"))!=null?i:e.modifiers.body,lock:(o=s("lock"))!=null?o:e.modifiers.lock};t[B9]={options:Q,instance:mQ(Q)}},wK=(t,e)=>{for(const r of Object.keys(e))h.isRef(e[r])&&(e[r].value=t[r])},D9={mounted(t,e){e.value&&VE(t,e)},updated(t,e){const r=t[B9];e.oldValue!==e.value&&(e.value&&!e.oldValue?VE(t,e):e.value&&e.oldValue?Qi(e.value)&&wK(e.value,r.options):r==null||r.instance.close())},unmounted(t){var e;(e=t[B9])==null||e.instance.close(),t[B9]=null}},EK={install(t){t.directive("loading",D9),t.config.globalProperties.$loading=mQ},directive:D9,service:mQ};function MK(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(i){i(r)}),(n=t.get("*"))&&n.slice().map(function(i){i(e,r)})}}}const f5=new MK,l2=(t,e)=>{const r=t.__vccOpts||t;for(const[n,i]of e)r[n]=i;return r},HK={name:"ExternalResourceCard",components:{Button:Qo},props:{resources:{type:Array,default:()=>[]}},data:function(){return{pubmeds:[],pubmedIds:[],ElIconNotebook:h.shallowRef(AU)}},methods:{capitalise:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},openUrl:function(t){f5.emit("open-pubmed-url",t),window.open(t,"_blank")}}},SK={class:"resource-container"};function CK(t,e,r,n,i,o){const a=Qo;return h.openBlock(),h.createElementBlock("div",SK,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.resources,s=>(h.openBlock(),h.createElementBlock("div",{key:s.id,class:"resource"},[s.id==="pubmed"?(h.openBlock(),h.createBlock(a,{key:0,class:"button",id:"open-pubmed-button",icon:t.ElIconNotebook,onClick:d=>o.openUrl(s.url)},{default:h.withCtx(()=>[h.createTextVNode(" Open publications in pubmed ")]),_:2},1032,["icon","onClick"])):h.createCommentVNode("",!0)]))),128))])}const OE=l2(HK,[["render",CK],["__scopeId","data-v-cf5af2f8"]]),AK=t=>t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),VK=function(t){return t?t.charAt(0).toUpperCase()+t.slice(1):""},OK={name:"ProvenancePopup",components:{Button:Qo,Container:lX,Icon:F1,ExternalResourceCard:OE,ElIconArrowUp:u9,ElIconArrowDown:d3,ElIconWarning:h9},props:{entry:{type:Object,default:()=>({destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0})}},inject:["getFeaturesAlert"],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:{featuresAlert(){return this.getFeaturesAlert()},resources:function(){let t=[];return this.entry&&this.entry.hyperlinks&&(t=this.entry.hyperlinks),t},originDescription:function(){return this.entry&&this.entry.title&&this.entry.title.toLowerCase().includes("motor")?this.originDescriptions.motor:this.originDescriptions.sensory},provSpeciesDescription:function(){let t="Studied in";return this.entry.provenanceTaxonomyLabel.forEach(e=>{t+=` ${e},`}),t=t.slice(0,-1),t+=" species",t}},methods:{titleCase:function(t){return AK(t)},capitalise:function(t){return VK(t)},openUrl:function(t){window.open(t,"_blank")},openAll:function(){f5.emit("onActionClick",{type:"Facets",labels:this.entry.componentsWithDatasets.map(t=>t.name)})},openAxons:function(){f5.emit("onActionClick",{type:"Facets",labels:this.entry.destinationsWithDatasets.map(t=>t.name)})},openDendrites:function(){f5.emit("onActionClick",{type:"Facets",labels:this.entry.originsWithDatasets.map(t=>t.name)})},pubmedSearchUrlUpdate:function(t){this.pubmedSearchUrl=t}}},Q5=t=>(h.pushScopeId("data-v-814119e4"),t=t(),h.popScopeId(),t),kK={key:0,class:"main"},PK={key:0,class:"block"},IK={class:"title"},RK={key:0,class:"subtitle"},NK={key:1,class:"block"},BK={class:"title"},DK={key:2},FK=Q5(()=>h.createElementVNode("span",{class:"attribute-title"},"Alert",-1)),jK={style:{"word-break":"keep-all"}},zK={class:"content-container scrollbar"},UK={key:0,class:"block"},GK=Q5(()=>h.createElementVNode("span",{class:"attribute-title"},"Origin",-1)),ZK={style:{"word-break":"keep-all"}},$K=Q5(()=>h.createElementVNode("i",null,"Origin",-1)),qK=["origin-item-label"],WK={key:0,class:"seperator"},XK={key:1,class:"block"},KK=Q5(()=>h.createElementVNode("div",{class:"attribute-title"},"Components",-1)),YK=["component-item-label"],JK={key:0,class:"seperator"},tY={key:2,class:"block"},eY=Q5(()=>h.createElementVNode("span",{class:"attribute-title"},"Destination",-1)),rY=Q5(()=>h.createElementVNode("span",{style:{"word-break":"keep-all"}},[h.createElementVNode("i",null,"Destination"),h.createTextVNode(" is where the axons terminate ")],-1)),nY=["destination-item-label"],iY={key:0,class:"seperator"};function oY(t,e,r,n,i,o){const a=h9,s=F1,d=p5,p=u9,f=d3,Q=Qo,m=OE,_=D9;return r.entry?h.withDirectives((h.openBlock(),h.createElementBlock("div",kK,[r.entry.title?(h.openBlock(),h.createElementBlock("div",PK,[h.createElementVNode("div",IK,h.toDisplayString(o.capitalise(r.entry.title)),1),r.entry.provenanceTaxonomyLabel&&r.entry.provenanceTaxonomyLabel.length>0?(h.openBlock(),h.createElementBlock("div",RK,h.toDisplayString(o.provSpeciesDescription),1)):h.createCommentVNode("",!0)])):(h.openBlock(),h.createElementBlock("div",NK,[h.createElementVNode("div",BK,h.toDisplayString(r.entry.featureId),1)])),o.featuresAlert?(h.openBlock(),h.createElementBlock("div",DK,[FK,h.createVNode(d,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:h.withCtx(()=>[h.createVNode(s,{class:"info"},{default:h.withCtx(()=>[h.createVNode(a)]),_:1})]),default:h.withCtx(()=>[h.createElementVNode("span",jK,h.toDisplayString(o.featuresAlert),1)]),_:1})])):h.createCommentVNode("",!0),h.withDirectives(h.createElementVNode("div",{class:"hide",id:"hide-path-info",onClick:e[0]||(e[0]=v=>t.showDetails=!1)},[h.createTextVNode(" Hide path information "),h.createVNode(s,null,{default:h.withCtx(()=>[h.createVNode(p)]),_:1})],512),[[h.vShow,t.showDetails]]),h.withDirectives(h.createElementVNode("div",{class:"hide",id:"show-path-info",onClick:e[1]||(e[1]=v=>t.showDetails=!0)},[h.createTextVNode(" Show path information "),h.createVNode(s,null,{default:h.withCtx(()=>[h.createVNode(f)]),_:1})],512),[[h.vShow,!t.showDetails]]),h.createVNode(h.Transition,{name:"slide-fade"},{default:h.withCtx(()=>[h.withDirectives(h.createElementVNode("div",zK,[h.createTextVNode(h.toDisplayString(r.entry.paths)+" ",1),r.entry.origins&&r.entry.origins.length>0?(h.openBlock(),h.createElementBlock("div",UK,[h.createElementVNode("div",null,[GK,h.createVNode(d,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:h.withCtx(()=>[h.createVNode(s,{class:"info"},{default:h.withCtx(()=>[h.createVNode(a)]),_:1})]),default:h.withCtx(()=>[h.createElementVNode("span",ZK,[$K,h.createTextVNode(" "+h.toDisplayString(o.originDescription),1)])]),_:1})]),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.entry.origins,(v,b)=>(h.openBlock(),h.createElementBlock("div",{class:"attribute-content","origin-item-label":v,key:v},[h.createTextVNode(h.toDisplayString(o.capitalise(v))+" ",1),b!=r.entry.origins.length-1?(h.openBlock(),h.createElementBlock("div",WK)):h.createCommentVNode("",!0)],8,qK))),128)),h.withDirectives(h.createVNode(Q,{class:"button",id:"open-dendrites-button",onClick:o.openDendrites},{default:h.withCtx(()=>[h.createTextVNode(" Explore origin data ")]),_:1},8,["onClick"]),[[h.vShow,r.entry.originsWithDatasets&&r.entry.originsWithDatasets.length>0]])])):h.createCommentVNode("",!0),r.entry.components&&r.entry.components.length>0?(h.openBlock(),h.createElementBlock("div",XK,[KK,(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.entry.components,(v,b)=>(h.openBlock(),h.createElementBlock("div",{class:"attribute-content","component-item-label":v,key:v},[h.createTextVNode(h.toDisplayString(o.capitalise(v))+" ",1),b!=r.entry.components.length-1?(h.openBlock(),h.createElementBlock("div",JK)):h.createCommentVNode("",!0)],8,YK))),128))])):h.createCommentVNode("",!0),r.entry.destinations&&r.entry.destinations.length>0?(h.openBlock(),h.createElementBlock("div",tY,[h.createElementVNode("div",null,[eY,h.createVNode(d,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:h.withCtx(()=>[h.createVNode(s,{class:"info"},{default:h.withCtx(()=>[h.createVNode(a)]),_:1})]),default:h.withCtx(()=>[rY]),_:1})]),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.entry.destinations,(v,b)=>(h.openBlock(),h.createElementBlock("div",{class:"attribute-content","destination-item-label":v,key:v},[h.createTextVNode(h.toDisplayString(o.capitalise(v))+" ",1),b!=r.entry.destinations.length-1?(h.openBlock(),h.createElementBlock("div",iY)):h.createCommentVNode("",!0)],8,nY))),128)),h.withDirectives(h.createVNode(Q,{class:"button",onClick:o.openAxons},{default:h.withCtx(()=>[h.createTextVNode(" Explore destination data ")]),_:1},8,["onClick"]),[[h.vShow,r.entry.destinationsWithDatasets&&r.entry.destinationsWithDatasets.length>0]])])):h.createCommentVNode("",!0),h.withDirectives(h.createVNode(Q,{class:"button",onClick:o.openAll},{default:h.withCtx(()=>[h.createTextVNode(" Search for data on components ")]),_:1},8,["onClick"]),[[h.vShow,r.entry.componentsWithDatasets&&r.entry.componentsWithDatasets.length>0]]),h.createVNode(m,{resources:o.resources},null,8,["resources"])],512),[[h.vShow,t.showDetails]])]),_:1})])),[[_,t.loading]]):h.createCommentVNode("",!0)}const kE=l2(OK,[["render",oY],["__scopeId","data-v-814119e4"]]),aY={name:"AnnotationTool",components:{Button:Qo,Col:ga,Input:L9,Main:yE,Row:P2,Select:d5,ElIconArrowUp:u9,ElIconArrowDown:d3,ElIconEdit:Lx,ElIconClose:Y6},props:{annotationEntry:{type:Object}},inject:["flatmapAPI","$annotator","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:"",creator:void 0}},computed:{isEditable:function(){return this.annotationEntry.resourceId&&this.annotationEntry.featureId},isPositionUpdated:function(){return this.annotationEntry.resourceId&&this.annotationEntry.type==="updated"&&this.annotationEntry.positionUpdated},isDeleted:function(){return this.annotationEntry.resourceId&&this.annotationEntry.type==="deleted"}},methods:{evidenceEntered:function(t){t&&(this.evidence.push(this.evidencePrefix+t),this.newEvidence="")},formatTime:function(t){const e={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};return new Date(t).toLocaleDateString(void 0,e)},updatePrevSubmissions:function(){this.$annotator&&this.authenticated&&this.annotationEntry.resourceId&&this.annotationEntry.featureId&&this.$annotator.itemAnnotations(this.userApiKey,this.annotationEntry.resourceId,this.annotationEntry.featureId).then(t=>{this.prevSubs=t}).catch(t=>{console.log(t)})},submit:function(){if(this.annotationEntry.type==="updated"&&this.annotationEntry.positionUpdated?this.comment=this.comment?`Position Updated: ${this.comment}`:"Position Updated":this.annotationEntry.type==="deleted"&&(this.comment=this.comment?`Feature Deleted: ${this.comment}`:"Feature Deleted"),(this.evidence.length>0||this.comment)&&this.annotationEntry.resourceId&&this.annotationEntry.featureId){const t=[];this.evidence.forEach(r=>{if(r.includes("DOI:")){const n=r.replace("DOI:","https://doi.org/");t.push(new URL(n))}else if(r.includes("PMID:")){const n=r.replace("PMID:","https://pubmed.ncbi.nlm.nih.gov/");t.push(new URL(n))}});const e={resource:this.annotationEntry.resourceId,item:Object.assign({id:this.annotationEntry.featureId},Object.fromEntries(Object.entries(this.annotationEntry).filter(([r])=>["label","models"].includes(r)))),body:{evidence:t,comment:this.comment},feature:this.annotationEntry.feature};Object.assign(e.body,this.annotationEntry.body),this.annotationEntry.type==="deleted"&&(e.feature=void 0),this.creator&&(e.creator=this.creator),this.$annotator.addAnnotation(this.userApiKey,e).then(()=>{this.$emit("annotation",e),this.errorMessage="",this.resetSubmission(),this.updatePrevSubmissions()}).catch(()=>{this.errorMessage="There is a problem with the submission, please try again later"})}},removeEvidence:function(t){this.evidence.splice(t,1)},resetSubmission:function(){this.editing=!1,this.evidence=[],this.newFeature="",this.comment=""}},watch:{annotationEntry:{handler:function(t,e){t!==e&&(this.resetSubmission(),this.updatePrevSubmissions())},immediate:!1,deep:!1}},mounted:function(){this.$annotator.authenticate(this.userApiKey).then(t=>{t.name&&t.email?(this.creator=t,t.orcid||(this.creator.orcid="0000-0000-0000-0000"),this.authenticated=!0,this.updatePrevSubmissions()):this.errorMessage=""})}},k4=t=>(h.pushScopeId("data-v-fb5333e3"),t=t(),h.popScopeId(),t),sY={class:"block"},lY=k4(()=>h.createElementVNode("div",{class:"title"},"Feature Annotations",-1)),cY=k4(()=>h.createElementVNode("strong",{class:"sub-title"},"Previous submissions:",-1)),uY=k4(()=>h.createElementVNode("strong",null,"Evidence: ",-1)),hY=["href"],dY=k4(()=>h.createElementVNode("strong",null,"Comment: ",-1)),pY=k4(()=>h.createElementVNode("strong",{class:"sub-title"},"Suggest changes:",-1)),TY=k4(()=>h.createElementVNode("strong",null,"Evidence:",-1)),fY=k4(()=>h.createElementVNode("strong",null,"Comment:",-1)),QY={class:"sub-title"};function mY(t,e,r,n,i,o){const a=P2,s=u9,d=F1,p=d3,f=Lx,Q=LU,m=EU,_=ga,v=Y6,b=k9,M=d5,E=L9,V=Qo,O=yE;return h.openBlock(),h.createBlock(O,{class:"main"},{default:h.withCtx(()=>[h.createElementVNode("div",sY,[h.createVNode(a,{class:"info-field"},{default:h.withCtx(()=>[lY]),_:1}),r.annotationEntry?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.displayPair,(R,j)=>h.withDirectives((h.openBlock(),h.createBlock(a,{class:"dialog-text",key:R},{default:h.withCtx(()=>[h.createElementVNode("strong",null,h.toDisplayString(j)+": ",1),h.createTextVNode(" "+h.toDisplayString(r.annotationEntry[R]),1)]),_:2},1024)),[[h.vShow,r.annotationEntry[R]]])),128)),t.prevSubs.length>0?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.withDirectives(h.createElementVNode("div",{class:"hide",onClick:e[0]||(e[0]=R=>t.showSubmissions=!1)},[h.createTextVNode(" Hide previous submissions "),h.createVNode(d,null,{default:h.withCtx(()=>[h.createVNode(s)]),_:1})],512),[[h.vShow,t.showSubmissions]]),h.withDirectives(h.createElementVNode("div",{class:"hide",onClick:e[1]||(e[1]=R=>t.showSubmissions=!0)},[h.createTextVNode(" Show previous "+h.toDisplayString(t.prevSubs.length)+" submission(s) ",1),h.createVNode(d,null,{default:h.withCtx(()=>[h.createVNode(p)]),_:1})],512),[[h.vShow,!t.showSubmissions]]),t.showSubmissions?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createVNode(a,{class:"dialog-spacer"}),h.createVNode(a,{class:"dialog-text"},{default:h.withCtx(()=>[cY]),_:1}),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.prevSubs,(R,j)=>(h.openBlock(),h.createElementBlock("div",{class:"entry",key:j},[h.createVNode(a,{class:"dialog-text"},{default:h.withCtx(()=>[h.createElementVNode("strong",null,h.toDisplayString(o.formatTime(R.created)),1),h.createTextVNode(" "+h.toDisplayString(R.creator.name),1)]),_:2},1024),h.createVNode(a,{class:"dialog-text"},{default:h.withCtx(()=>[uY,(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(R.body.evidence,G=>(h.openBlock(),h.createBlock(a,{key:G,class:"dialog-text"},{default:h.withCtx(()=>[h.createElementVNode("a",{href:G,target:"_blank"},h.toDisplayString(G),9,hY)]),_:2},1024))),128))]),_:2},1024),h.createVNode(a,{class:"dialog-text"},{default:h.withCtx(()=>[dY,h.createTextVNode(" "+h.toDisplayString(R.body.comment),1)]),_:2},1024)]))),128))],64)):h.createCommentVNode("",!0)],64)):h.createCommentVNode("",!0),t.authenticated?(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[o.isEditable?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createVNode(a,{class:"dialog-spacer"}),t.editing?(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[h.createVNode(a,{class:"dialog-text"},{default:h.withCtx(()=>[pY]),_:1}),o.isDeleted?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createVNode(a,{class:"dialog-text"},{default:h.withCtx(()=>[TY]),_:1}),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.evidence,(R,j)=>(h.openBlock(),h.createBlock(a,{key:R},{default:h.withCtx(()=>[h.createVNode(_,{span:20},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(t.evidence[j]),1)]),_:2},1024),h.createVNode(_,{span:4},{default:h.withCtx(()=>[h.createVNode(d,{class:"standard-icon"},{default:h.withCtx(()=>[h.createVNode(v,{onClick:G=>o.removeEvidence(j)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128)),h.createVNode(a,null,{default:h.withCtx(()=>[h.createVNode(E,{size:"small",placeholder:"Enter",modelValue:t.newEvidence,"onUpdate:modelValue":e[4]||(e[4]=R=>t.newEvidence=R),onChange:e[5]||(e[5]=R=>o.evidenceEntered(R))},{prepend:h.withCtx(()=>[h.createVNode(M,{teleported:!1,modelValue:t.evidencePrefix,"onUpdate:modelValue":e[3]||(e[3]=R=>t.evidencePrefix=R),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.evidencePrefixes,R=>(h.openBlock(),h.createBlock(b,{key:R,label:R,value:R},{default:h.withCtx(()=>[h.createVNode(a,null,{default:h.withCtx(()=>[h.createVNode(_,{span:12},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(R),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})],64)),h.createVNode(a,null,{default:h.withCtx(()=>[fY]),_:1}),h.createVNode(a,{class:"dialog-text"},{default:h.withCtx(()=>[h.createVNode(E,{type:"textarea",autosize:{minRows:2,maxRows:4},placeholder:"Enter",modelValue:t.comment,"onUpdate:modelValue":e[6]||(e[6]=R=>t.comment=R)},null,8,["modelValue"])]),_:1}),h.createVNode(a,{class:"dialog-text"},{default:h.withCtx(()=>[h.createVNode(V,{class:"button",type:"primary",plain:"",onClick:o.submit},{default:h.withCtx(()=>[h.createTextVNode(" Submit ")]),_:1},8,["onClick"])]),_:1})],64)):(h.openBlock(),h.createBlock(a,{key:0},{default:h.withCtx(()=>[h.createVNode(d,{class:"standard-icon"},{default:h.withCtx(()=>[h.createVNode(f,{onClick:e[2]||(e[2]=R=>t.editing=!0)})]),_:1}),o.isDeleted?(h.openBlock(),h.createBlock(d,{key:0,class:"standard-icon"},{default:h.withCtx(()=>[h.createVNode(Q,{onClick:o.submit},null,8,["onClick"])]),_:1})):o.isPositionUpdated?(h.openBlock(),h.createBlock(d,{key:1,class:"standard-icon"},{default:h.withCtx(()=>[h.createVNode(m,{onClick:o.submit},null,8,["onClick"])]),_:1})):h.createCommentVNode("",!0)]),_:1})),t.errorMessage?(h.openBlock(),h.createBlock(a,{key:2,class:"dialog-text"},{default:h.withCtx(()=>[h.createElementVNode("strong",QY,h.toDisplayString(t.errorMessage),1)]),_:1})):h.createCommentVNode("",!0)],64)):h.createCommentVNode("",!0)],64)):h.createCommentVNode("",!0)],64)):h.createCommentVNode("",!0)])]),_:1})}const PE=l2(aY,[["render",mY],["__scopeId","data-v-fb5333e3"]]),gY={name:"Tooltip",components:{AnnotationTool:PE,ProvenancePopup:kE},props:{entry:{type:Object},annotationDisplay:{type:Boolean,default:!1},annotationEntry:{type:Object}}},yY={class:"tooltip-container",id:"tooltip-container"};function _Y(t,e,r,n,i,o){const a=PE,s=kE;return h.openBlock(),h.createElementBlock("div",yY,[r.annotationDisplay?(h.openBlock(),h.createBlock(a,{key:0,annotationEntry:r.annotationEntry,onAnnotation:e[0]||(e[0]=d=>t.$emit("annotation",d))},null,8,["annotationEntry"])):(h.openBlock(),h.createBlock(s,{key:1,entry:r.entry},null,8,["entry"]))])}const gQ=l2(gY,[["render",_Y],["__scopeId","data-v-4d2eaccd"]]),vY={name:"SelectionsGroup",components:{Checkbox:C9,CheckboxGroup:cQ,Col:ga,Icon:F1,Row:P2,ElIconWarning:h9},methods:{reset:function(){this.checkAll=!0,this.checkedItems=[],this.selections.forEach(t=>{!("enabled"in t)||t.enabled===!0?this.checkedItems.push(t[this.identifierKey]):this.checkAll=!1})},setCheckboxActionData:function(t,e){if(t){const r=t.querySelector('input[type="checkbox"]'),n=t.querySelector(".el-checkbox__label"),o=t.closest(".selections-container").querySelector(".checkall-display-text");let a="";r&&(a=r.checked?"checked":"unchecked"),this.checkboxActionData={selectionsTitle:o?o.innerText:"",property:r&&e!=="all"?r.value:"",label:n?n.innerText:"",checked:a}}else this.checkboxActionData={selectionsTitle:"",property:"",label:"",checked:""}},onCheckboxNativeChange:function(t){const e=t.target.closest(".checkbox-container");this.setCheckboxActionData(e,"individual")},onAllCheckboxNativeChange:function(t){const e=t.target.closest(".all-checkbox");this.setCheckboxActionData(e,"all")},visibilityToggle:function(t,e){this.$emit("changed",{key:t,value:e}),t===this.checkboxActionData.property&&(this.checkboxActionData.checked=e?"checked":"unchecked"),this.$emit("selections-data-changed",this.checkboxActionData)},checkboxMouseEnterEmit:function(t,e){this.$emit("checkboxMouseEnter",{key:t,value:e,selections:this.selections,checked:this.checkedItems})},handleCheckedItemsChange:function(t){let e=t.length;this.checkAll=e===this.selections.length},handleCheckAllChange:function(t){this.checkedItems=t?this.selections.map(e=>e[this.identifierKey]):[],this.$emit("checkAll",{keys:this.selections.map(e=>e[this.identifierKey]),value:t}),this.checkboxActionData.property=this.identifierKey,this.checkboxActionData.checked=t?"checked":"unchecked",this.$emit("selections-data-changed",this.checkboxActionData)},getBackgroundStyles:function(t){return"colour"in t&&this.colourStyle==="background"?{background:t.colour}:{}},hasLineStyles:function(t){return"colour"in t&&this.colourStyle==="line"},getLineStyles:function(t){return"colour"in t&&this.colourStyle==="line"?"dashed"in t&&t.dashed===!0?{background:`repeating-linear-gradient(90deg,${t.colour},${t.colour} 6px,transparent 0,transparent 9px)`}:{background:t.colour}:{display:"None"}}},props:{colourStyle:{type:String,default:"line"},helpMessage:{type:String,default:""},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,checkboxActionData:{selectionsTitle:"",property:"",label:"",checked:""}}},mounted:function(){this.reset()}},bY={class:"selections-container"},LY={class:"checkall-display-text"},xY={style:{"word-break":"keep-all"}},wY={class:"checkbox-group-inner"},EY=["onMouseenter","onMouseleave"];function MY(t,e,r,n,i,o){const a=h9,s=F1,d=p5,p=ga,f=C9,Q=P2,m=cQ;return h.openBlock(),h.createElementBlock("div",bY,[h.createVNode(Q,null,{default:h.withCtx(()=>[h.createVNode(p,{span:12},{default:h.withCtx(()=>[h.createElementVNode("span",LY,h.toDisplayString(r.title),1),r.helpMessage?(h.openBlock(),h.createBlock(d,{key:0,width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},h.createSlots({default:h.withCtx(()=>[h.createElementVNode("span",xY,h.toDisplayString(r.helpMessage),1)]),_:2},[r.helpMessage?{name:"reference",fn:h.withCtx(()=>[h.createVNode(s,{class:"info"},{default:h.withCtx(()=>[h.createVNode(a)]),_:1})]),key:"0"}:void 0]),1024)):h.createCommentVNode("",!0)]),_:1}),h.createVNode(p,{span:12},{default:h.withCtx(()=>[r.selections&&r.selections.length>1?(h.openBlock(),h.createBlock(f,{key:0,class:"all-checkbox",indeterminate:o.isIndeterminate,modelValue:t.checkAll,"onUpdate:modelValue":e[0]||(e[0]=_=>t.checkAll=_),onChange:o.handleCheckAllChange,onClick:o.onAllCheckboxNativeChange},{default:h.withCtx(()=>[h.createTextVNode("Display all")]),_:1},8,["indeterminate","modelValue","onChange","onClick"])):h.createCommentVNode("",!0)]),_:1})]),_:1}),h.createVNode(m,{modelValue:t.checkedItems,"onUpdate:modelValue":e[1]||(e[1]=_=>t.checkedItems=_),size:"small",class:"checkbox-group",onChange:o.handleCheckedItemsChange},{default:h.withCtx(()=>[h.createElementVNode("div",wY,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.selections,_=>(h.openBlock(),h.createBlock(Q,{key:_[r.identifierKey],label:_[r.identifierKey]},{default:h.withCtx(()=>[h.createElementVNode("div",{class:"checkbox-container",onMouseenter:v=>o.checkboxMouseEnterEmit(_[r.identifierKey],!0),onMouseleave:v=>o.checkboxMouseEnterEmit(_[r.identifierKey],!1)},[h.createVNode(f,{class:"my-checkbox",label:_[r.identifierKey],onChange:v=>o.visibilityToggle(_[r.identifierKey],v),onClick:o.onCheckboxNativeChange,checked:!("enabled"in _)||_.enabled===!0},{default:h.withCtx(()=>[h.createVNode(Q,{class:"checkbox-row"},{default:h.withCtx(()=>[o.hasLineStyles(_)?(h.openBlock(),h.createBlock(p,{key:0,span:4},{default:h.withCtx(()=>[h.createElementVNode("div",{class:"path-visual",style:h.normalizeStyle(o.getLineStyles(_))},null,4)]),_:2},1024)):h.createCommentVNode("",!0),h.createVNode(p,{span:20},{default:h.withCtx(()=>[h.createElementVNode("div",{style:h.normalizeStyle(o.getBackgroundStyles(_))},h.toDisplayString(_[r.labelKey]),5)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","onChange","onClick","checked"])],40,EY)]),_:2},1032,["label"]))),128))])]),_:1},8,["modelValue","onChange"])])}const IE=l2(vY,[["render",MY],["__scopeId","data-v-d8924667"]]),HY={name:"TreeControls",components:{Checkbox:C9,CheckboxGroup:cQ,ColorPicker:XW,Row:P2,Tree:CE},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(t){return this.active===t.models},nodeIsHover:function(t){return this.hover===t.models},changeActiveByNode:function(t){t.models&&this.$emit("change-active",t.models)},changeHoverByNode:function(){},checkChanged:function(t,e){const r=e.checkedKeys.includes(t.key);t.key==="All"?this.$emit("checkAll",r):this.$emit("changed",{key:t.key,value:r})},getBackgroundStyles:function(t){return"colour"in t?{background:t.colour}:{}}}},SY=t=>(h.pushScopeId("data-v-4ed66e2c"),t=t(),h.popScopeId(),t),CY={class:"selections-container"},AY=SY(()=>h.createElementVNode("div",{class:"title-text"},"Systems",-1)),VY={class:"tree-container"},OY=["onClick","onMouseover"];function kY(t,e,r,n,i,o){const a=ga,s=P2,d=CE;return h.openBlock(),h.createElementBlock("div",CY,[h.createVNode(s,null,{default:h.withCtx(()=>[h.createVNode(a,{span:12},{default:h.withCtx(()=>[AY]),_:1})]),_:1}),h.createElementVNode("div",VY,[h.createVNode(d,{ref:"tree","node-key":"key","show-checkbox":"","check-strictly":!1,data:r.treeData,"render-after-expand":!1,"default-expanded-keys":t.defaultExpandedKeys,onCheck:o.checkChanged},{default:h.withCtx(({node:p,data:f})=>[h.createElementVNode("span",{class:h.normalizeClass(["region-tree-node",{activeItem:o.nodeIsActive(f),hoverItem:o.nodeIsHover(f)}]),onClick:Q=>o.changeActiveByNode(f),onMouseover:Q=>o.changeHoverByNode(f)},[h.createElementVNode("div",{style:h.normalizeStyle(o.getBackgroundStyles(f))},h.toDisplayString(p.label),5)],42,OY)]),_:1},8,["data","default-expanded-keys","onCheck"])])])}const RE=l2(HY,[["render",kY],["__scopeId","data-v-4ed66e2c"]]),PY={name:"SvgLegends"},IY=t=>(h.pushScopeId("data-v-7a368b29"),t=t(),h.popScopeId(),t),RY={class:"legends-container"},NY={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"},BY=[h.createStaticVNode('<defs data-v-7a368b29><bx:grid height="30.447" width="32.516" x="0" y="0" data-v-7a368b29></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-7a368b29></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-7a368b29></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-7a368b29></path><text transform="matrix(0.9908 0 0 1 118.0161 171.7975)" class="st3 st4 st5" style="white-space:pre;" data-v-7a368b29> 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-7a368b29></path><text transform="matrix(0.9908 0 0 1 118.0161 257.675)" class="st3 st4 st5" style="white-space:pre;" data-v-7a368b29> 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-7a368b29> Ganglia </text><text transform="matrix(0.9908 0 0 1 118.0903 433.1613)" class="st3 st4 st5" style="white-space:pre;" data-v-7a368b29> Ganglionated nerve plexus </text>',9)],DY=IY(()=>h.createElementVNode("svg",{width:"72px",height:"72px",viewBox:"0 0 24 24",fill:"yellow"},null,-1));function FY(t,e,r,n,i,o){return h.openBlock(),h.createElementBlock("div",RY,[(h.openBlock(),h.createElementBlock("svg",NY,BY)),DY])}const NE=l2(PY,[["render",FY],["__scopeId","data-v-7a368b29"]]),jY={name:"ConnectionDialog",components:{Row:P2,Col:ga,ButtonGroup:Uw,Button:Qo,Card:qw},props:{connectionEntry:{type:Object},inDrawing:{type:Boolean,default:!1},hasConnection:{type:Boolean,default:!1}},data:function(){return{tooltipId:void 0}},methods:{shadowDisplay:function(t){return this.tooltipId===t?"always":"hover"},capitalise:function(t){return t[0].toUpperCase()+t.slice(1)},handleTooltip:function(t){this.tooltipId=this.tooltipId===t?void 0:t,this.$emit("featureTooltip",this.tooltipId)}}},yQ=t=>(h.pushScopeId("data-v-661fcf88"),t=t(),h.popScopeId(),t),zY={class:"dialog-container"},UY=yQ(()=>h.createElementVNode("span",{class:"dialog-title"},"Visualise connection",-1)),GY=yQ(()=>h.createElementVNode("span",{class:"dialog-subtitle"},"Finalise drawing",-1)),ZY=yQ(()=>h.createElementVNode("b",null,[h.createElementVNode("span",null,"Related Features")],-1));function $Y(t,e,r,n,i,o){const a=Qo,s=Uw,d=P2,p=ga,f=qw;return h.openBlock(),h.createElementBlock("div",zY,[h.createVNode(d,null,{default:h.withCtx(()=>[h.createVNode(p,null,{default:h.withCtx(()=>[UY,r.inDrawing?(h.openBlock(),h.createBlock(d,{key:0},{default:h.withCtx(()=>[GY,h.createVNode(s,null,{default:h.withCtx(()=>[h.createVNode(a,{type:"primary",plain:"",onClick:e[0]||(e[0]=Q=>t.$emit("confirmDrawn",!0))},{default:h.withCtx(()=>[h.createTextVNode(" Confirm ")]),_:1}),h.createVNode(a,{type:"primary",plain:"",onClick:e[1]||(e[1]=Q=>t.$emit("cancelDrawn",!0))},{default:h.withCtx(()=>[h.createTextVNode(" Cancel ")]),_:1})]),_:1})]),_:1})):(h.openBlock(),h.createBlock(d,{key:1},{default:h.withCtx(()=>[h.createVNode(a,{type:"primary",plain:"",onClick:e[2]||(e[2]=Q=>t.$emit("dialogDisplay",!1))},{default:h.withCtx(()=>[h.createTextVNode(" Close ")]),_:1})]),_:1}))]),_:1})]),_:1}),r.hasConnection?(h.openBlock(),h.createBlock(d,{key:0},{default:h.withCtx(()=>[h.createVNode(p,null,{default:h.withCtx(()=>[ZY,(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.connectionEntry,(Q,m)=>(h.openBlock(),h.createBlock(d,{key:m},{default:h.withCtx(()=>[h.createVNode(f,{shadow:o.shadowDisplay(m),onClick:_=>o.handleTooltip(m)},{default:h.withCtx(()=>[h.createElementVNode("span",null,h.toDisplayString(o.capitalise(Q.label)),1)]),_:2},1032,["shadow","onClick"])]),_:2},1024))),128))]),_:1})]),_:1})):h.createCommentVNode("",!0)])}const qY=l2(jY,[["render",$Y],["__scopeId","data-v-661fcf88"]]),WY=(t,e)=>{let r,n,i,o,a,s;e.style.left="",e.style.top="",e.addEventListener("mousedown",p=>{p.preventDefault(),r=e.offsetLeft,n=e.offsetTop,i=p.clientX,o=p.clientY,e.addEventListener("mousemove",d,!1),document.addEventListener("mouseup",()=>{e.removeEventListener("mousemove",d,!1)},!1)},!1);function d(p){p.preventDefault(),a=r-(i-p.clientX),s=n-(o-p.clientY),e.style.left=`${a}px`,e.style.top=`${s}px`}},XY={name:"DrawTool",components:{MapSvgIcon:cf.MapSvgIcon},props:{flatmapCanvas:{type:Object,default:null},drawnType:{type:String},activeDrawTool:{type:String},activeDrawMode:{type:String},drawnCreatedEvent:{type:Object},connectionEntry:{type:Object},hoverVisibilities:{type:Array}},data:function(){return{activeTool:void 0,activeMode:void 0,connectionDisplay:!1,dialogPosition:{offsetX:0,offsetY:0,x:void 0,y:void 0},toolbarIcons:[{name:"Connection",active:!1,disabled:!0},{name:"Point",active:!1,disabled:!1},{name:"LineString",active:!1,disabled:!1},{name:"Polygon",active:!1,disabled:!1},{name:"Edit",active:!1,disabled:!1},{name:"Delete",active:!1,disabled:!1}]}},computed:{inDrawing:function(){return this.activeDrawTool!==void 0},isFeatureDrawn:function(){return this.drawnCreatedEvent!==void 0},hasConnection:function(){return Object.keys(this.connectionEntry).length>0}},watch:{activeDrawTool:function(t){this.updateToolbarIcons(t),t||(this.connectionDisplay=!1)},activeDrawMode:function(t){this.updateToolbarIcons(t),t==="Delete"&&(this.connectionDisplay=!1)},hasConnection:function(t){this.updateToolbarConnectionIcon(t,"disabled"),t||(this.connectionDisplay=!1)},isFeatureDrawn:function(t){t&&(this.connectionDisplay=!0)},connectionDisplay:function(t){this.updateToolbarConnectionIcon(t,"active"),t?this.dialogCssHacks():this.$emit("featureTooltip",void 0)},dialogPosition:{handler:function(){const t=this.$el.getBoundingClientRect();this.dialogPosition.offsetX=t.x,this.dialogPosition.offsetY=t.y},deep:!0,once:!0}},methods:{drawConnectionEvent:function(){this.hasConnection&&!this.activeDrawTool&&this.activeDrawMode!=="Delete"&&(this.connectionDisplay=!this.connectionDisplay)},updateToolbarConnectionIcon:function(t,e){this.toolbarIcons.filter(r=>r.name==="Connection").map(r=>{this.activeDrawMode==="Delete"?r.disabled=!0:(e==="active"&&(t?r.active=!0:r.active=!1),e==="disabled"&&(t?r.disabled=!1:r.disabled=!0))}),this.toolbarCssHacks()},updateToolbarIcons:function(t){this.toolbarIcons.map(e=>{e.name===t?e.active=!0:e.active=!1}),this.toolbarIcons.filter(e=>e.name!=="Connection"&&e.name!==t).map(e=>{t?e.disabled=!0:e.disabled=!1}),this.toolbarCssHacks()},drawToolEvent:function(t){if((!this.activeDrawTool||this.activeDrawTool===t)&&!this.activeDrawMode&&!this.connectionDisplay){if(t==="Point"){const e=this.flatmapCanvas.querySelector(".mapbox-gl-draw_point");e.click(),this.activeTool=e.classList.contains("active")?"Point":void 0}else if(t==="LineString"){const e=this.flatmapCanvas.querySelector(".mapbox-gl-draw_line");e.click(),this.activeTool=e.classList.contains("active")?"LineString":void 0}else if(t==="Polygon"){const e=this.flatmapCanvas.querySelector(".mapbox-gl-draw_polygon");e.click(),this.activeTool=e.classList.contains("active")?"Polygon":void 0}this.$emit("drawToolbarEvent",this.activeTool)}},drawModeEvent:function(t){(!this.activeDrawMode||this.activeDrawMode===t)&&!this.activeDrawTool&&(this.activeMode=t,this.$emit("drawToolbarEvent",this.activeMode))},toolbarCssHacks:function(){this.toolbarIcons.map(t=>{const e=this.$el.querySelector(`.draw${t.name}`);e&&(t.active?e.classList.add("active"):e.classList.remove("active"),t.disabled?e.classList.add("disabled"):e.classList.remove("disabled"))})},dialogCssHacks:function(){this.$nextTick(()=>{const t=this.$el.querySelector(".connection-dialog");WY(this.flatmapCanvas,t);let e,r;const n=this.flatmapCanvas.getBoundingClientRect(),i=t.getBoundingClientRect();this.dialogPosition.x>n.width/2?e=this.dialogPosition.x-i.width:e=this.dialogPosition.x,this.dialogPosition.y>n.height/2?r=this.dialogPosition.y-i.height:r=this.dialogPosition.y,t.style.transform=`translate(${e-this.dialogPosition.offsetX}px, ${r-this.dialogPosition.offsetY}px)`})},showTooltip:function(t){this.$emit("showTooltip",t)},hideTooltip:function(t){this.$emit("hideTooltip",t)},clickHandler:function(t){t.preventDefault(),this.dialogPosition.x=t.clientX,this.dialogPosition.y=t.clientY,this.activeDrawTool==="Point"&&this.dialogCssHacks()}},mounted:function(){this.toolbarCssHacks(),this.flatmapCanvas&&this.flatmapCanvas.querySelector(".maplibregl-canvas").addEventListener("click",this.clickHandler,!1)},destroyed:function(){this.flatmapCanvas&&this.flatmapCanvas.querySelector(".maplibregl-canvas").removeEventListener("click",this.clickHandler,!1)}},KY={class:"drawtool-container"};function YY(t,e,r,n,i,o){const a=h.resolveComponent("map-svg-icon"),s=p5,d=qY;return h.openBlock(),h.createElementBlock("div",null,[h.createElementVNode("div",KY,[h.createVNode(s,{content:"Connection",placement:"left",teleported:!1,trigger:"manual",width:"100","popper-class":"flatmap-popper",visible:r.hoverVisibilities[10].value,ref:"connectionPopover"},{reference:h.withCtx(()=>[h.createVNode(a,{icon:"connection",class:"icon-button drawConnection",onClick:e[0]||(e[0]=p=>o.drawConnectionEvent()),onMouseover:e[1]||(e[1]=p=>o.showTooltip(10)),onMouseout:e[2]||(e[2]=p=>o.hideTooltip(10))})]),_:1},8,["visible"]),r.drawnType!=="LineString"&&r.drawnType!=="Polygon"?(h.openBlock(),h.createBlock(s,{key:0,content:"Draw Point",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:r.hoverVisibilities[11].value,ref:"drawPointPopover"},{reference:h.withCtx(()=>[h.createVNode(a,{icon:"drawPoint",class:"icon-button drawPoint",onClick:e[3]||(e[3]=p=>o.drawToolEvent("Point")),onMouseover:e[4]||(e[4]=p=>o.showTooltip(11)),onMouseout:e[5]||(e[5]=p=>o.hideTooltip(11))})]),_:1},8,["visible"])):h.createCommentVNode("",!0),r.drawnType!=="Point"&&r.drawnType!=="Polygon"?(h.openBlock(),h.createBlock(s,{key:1,content:"Draw Line",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:r.hoverVisibilities[12].value,ref:"drawLinePopover"},{reference:h.withCtx(()=>[h.createVNode(a,{icon:"drawLine",class:"icon-button drawLineString",onClick:e[6]||(e[6]=p=>o.drawToolEvent("LineString")),onMouseover:e[7]||(e[7]=p=>o.showTooltip(12)),onMouseout:e[8]||(e[8]=p=>o.hideTooltip(12))})]),_:1},8,["visible"])):h.createCommentVNode("",!0),r.drawnType!=="Point"&&r.drawnType!=="LineString"?(h.openBlock(),h.createBlock(s,{key:2,content:"Draw Polygon",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:r.hoverVisibilities[13].value,ref:"drawPolygonPopover"},{reference:h.withCtx(()=>[h.createVNode(a,{icon:"drawPolygon",class:"icon-button drawPolygon",onClick:e[9]||(e[9]=p=>o.drawToolEvent("Polygon")),onMouseover:e[10]||(e[10]=p=>o.showTooltip(13)),onMouseout:e[11]||(e[11]=p=>o.hideTooltip(13))})]),_:1},8,["visible"])):h.createCommentVNode("",!0),h.createVNode(s,{content:"Delete",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:r.hoverVisibilities[14].value,ref:"deletePopover"},{reference:h.withCtx(()=>[h.createVNode(a,{icon:"drawTrash",class:"icon-button drawDelete",onClick:e[12]||(e[12]=p=>o.drawModeEvent("Delete")),onMouseover:e[13]||(e[13]=p=>o.showTooltip(14)),onMouseout:e[14]||(e[14]=p=>o.hideTooltip(14))})]),_:1},8,["visible"]),h.createVNode(s,{content:"Edit",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:r.hoverVisibilities[15].value,ref:"editPopover"},{reference:h.withCtx(()=>[h.createVNode(a,{icon:"comment",class:"icon-button drawEdit",onClick:e[15]||(e[15]=p=>o.drawModeEvent("Edit")),onMouseover:e[16]||(e[16]=p=>o.showTooltip(15)),onMouseout:e[17]||(e[17]=p=>o.hideTooltip(15))})]),_:1},8,["visible"])]),h.withDirectives(h.createVNode(d,{class:"connection-dialog",connectionEntry:r.connectionEntry,inDrawing:o.inDrawing,hasConnection:o.hasConnection,onDialogDisplay:e[18]||(e[18]=p=>o.drawConnectionEvent()),onConfirmDrawn:e[19]||(e[19]=p=>t.$emit("confirmDrawn",p)),onCancelDrawn:e[20]||(e[20]=p=>t.$emit("cancelDrawn",p)),onFeatureTooltip:e[21]||(e[21]=p=>t.$emit("featureTooltip",p))},null,8,["connectionEntry","inDrawing","hasConnection"]),[[h.vShow,t.connectionDisplay]])])}const BE=l2(XY,[["render",YY],["__scopeId","data-v-f494b4fc"]]),JY='<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>',_Q=function(t){return t?[...new Set(t.map(e=>JSON.stringify(e)))].map(e=>JSON.parse(e)):[]},Sl={},DE=async function(t,e){return Sl&&Sl.hasOwnProperty(e)?Sl[e]:new Promise(r=>{fetch(`${t}knowledge/label/${e}`,{method:"GET"}).then(n=>n.json()).then(n=>{let i=n.label;i==="Mammalia"&&(i="Mammalia not otherwise specified"),Sl[e]=i,r(i)}).catch(n=>{console.error("Error:",n),Sl[e]=e,r(e)})})},FE=function(t,e){if(!t||!e)return!1;let r=JSON.stringify(t),n=JSON.stringify(e);return r.indexOf(n)!==-1};let tJ=function(){this.initialise=function(t){this.flatmapApi=t,this.destinations=[],this.origins=[],this.components=[],this.urls=[],this.controller=void 0,this.uberons=[],this.lookUp=[]},this.createTooltipData=async function(t){let e=[];t.feature.hyperlinks&&t.feature.hyperlinks.length>0?e=t.feature.hyperlinks:e=this.urls.map(i=>({url:i,id:"pubmed"}));let r;if(t.provenanceTaxonomy){r=[];for(let i=0;t.provenanceTaxonomy.length>i;i++)r.push(await DE(this.flatmapAPI,t.provenanceTaxonomy[i]))}return{destinations:this.destinations,origins:this.origins,components:this.components,destinationsWithDatasets:this.destinationsWithDatasets,originsWithDatasets:this.originsWithDatasets,componentsWithDatasets:this.componentsWithDatasets,title:t.label,featureId:t.resource,hyperlinks:e,provenanceTaxonomy:t.provenanceTaxonomy,provenanceTaxonomyLabel:r}},this.createComponentsLabelList=function(t,e){let r=[];return t.forEach(n=>{r.push(this.createLabelFromNeuralNode(n[0]),e),n.length===2&&r.push(this.createLabelFromNeuralNode(n[1]),e)}),r},this.createLabelLookup=function(t){return new Promise(e=>{let r={};this.uberons=[];const n={sql:this.buildLabelSqlStatement(t)};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]})}),e(r)})})},this.buildConnectivitySqlStatement=function(t){let e="select knowledge from knowledge where entity in (";if(t.length===1)e+=`'${t[0]}')`;else if(t.length>1)for(let r in t)e+=`'${t[r]}'${r>=t.length-1?")":","} `;return e},this.buildLabelSqlStatement=function(t){let e="select entity, label from labels where entity in (";if(t.length===1)e+=`'${t[0]}')`;else if(t.length>1)for(let r in t)e+=`'${t[r]}'${r>=t.length-1?")":","} `;return e},this.findAllIdsFromConnectivity=function(t){let e=t.connectivity.flat(),r=[...new Set(e)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),[...new Set(n.flat())]},this.flattenConntectivity=function(t){let e=t.flat(),r=[...new Set(e)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),n.flat()},this.findComponents=function(t){let e=t.connectivity.flat(),r=_Q(e),n=[],i=!1;return r.forEach(o=>{i=!1,FE(t.axons,o)&&(i=!0),FE(t.dendrites,o)&&(i=!0),i||n.push(o)}),n},this.retrieveFlatmapKnowledgeForEvent=async function(t){this.controller&&this.controller.abort(),this.controller=new AbortController;const e=this.controller.signal,r=t.resource;if(this.destinations=[],this.origins=[],this.components=[],!r||r.length==0)return;let n=this.queryForConnectivity(r,e),i=await this.pubmedQueryOnIds(t);return await Promise.all([n,i])},this.queryForConnectivity=function(t,e,r=!0){const n={sql:this.buildConnectivitySqlStatement(t)},i={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),...e?{signal:e}:{}};return new Promise(o=>{fetch(`${this.flatmapApi}knowledge/query/`,i).then(a=>a.json()).then(a=>{if(this.connectivityExists(a)){let s=JSON.parse(a.values[0][0]);r?this.processConnectivity(s).then(d=>{o(d)}):o(s)}else o(!1)}).catch(a=>{console.error("Error:",a),o(!1)})})},this.connectivityExists=function(t){return!!(t.values&&t.values.length>0&&JSON.parse(t.values[0][0]).connectivity&&JSON.parse(t.values[0][0]).connectivity.length>0)},this.findIfNodeIsSingle=function(t){return t.length===1?(console.error("Server returns a single node",t),t[0]):t.length===2&&t[1].length===0?t[0]:!1},this.createLabelFromNeuralNode=function(t,e){let r=this.findIfNodeIsSingle(t);if(r)return e[r];let n=e[t[0]];return t.length===2&&t[1].length>0&&t[1].forEach(i=>{e[i]==null?n+=`, ${i}`:n+=`, ${e[i]}`}),n},this.flattenAndFindDatasets=function(t,e,r){let n=this.flattenConntectivity(t),i=this.flattenConntectivity(e),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(t){return new Promise(e=>{let r=this.findComponents(t),n=_Q(t.axons),i=_Q(t.dendrites),o=this.findAllIdsFromConnectivity(t);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),e({ids:{axons:n,dendrites:i,components:r},labels:{destinations:this.destinations,origins:this.origins,components:this.components}})})})},this.flattenConntectivity=function(t){let e=t.flat(),r=[...new Set(e)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),n.flat()},this.stripPMIDPrefix=function(t){return t.split(":")[1]},this.buildPubmedSqlStatement=function(t){let e="select distinct publication from publications where entity in (";if(t.length===1)e+=`'${t[0]}')`;else if(t.length>1)for(let r in t)e+=`'${t[r]}'${r>=t.length-1?")":","} `;return e},this.buildPubmedSqlStatementForModels=function(t){return`select distinct publication from publications where entity = '${t}'`},this.flatmapQuery=function(t){const e={sql:t};return fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(r=>r.json()).catch(r=>{console.error("Error:",r)})},this.pubmedQueryOnIds=function(t){return new Promise(e=>{const r=t.resource,n=t.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])))],e(!0)):this.pubmedQueryOnModels(n).then(a=>{e(a)})})})},this.pubmedQueryOnModels=function(t){return this.flatmapQuery(this.buildPubmedSqlStatementForModels(t)).then(e=>Array.isArray(e.values)&&e.values.length>0?(this.urls=[this.pubmedSearchUrl(e.values.map(r=>this.stripPMIDPrefix(r[0])))],!0):(this.urls=[],!1))},this.pubmedSearchUrl=function(t){let e="https://pubmed.ncbi.nlm.nih.gov/?",r=new URLSearchParams;return r.append("term",t),e+r.toString()}};const eJ='<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="47" y="52%" style="white-space: pre" dominant-baseline="middle" text-anchor="start" font-family="Asap, sans-serif" font-size="12" fill="#333333">Featured dataset marker</text></svg>';var jE={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(typeof window<"u"?window:Lq,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(f){return r.setTimeout(f,20)},i=r.cancelAnimationFrame||r.mozCancelAnimationFrame||r.webkitCancelAnimationFrame||function(f){r.clearTimeout(f)};function o(f,Q){var m=Object.prototype.toString.call(f),_=m==="[object Array]"||m==="[object NodeList]"||m==="[object HTMLCollection]"||m==="[object Object]"||typeof jQuery<"u"&&f instanceof jQuery||typeof Elements<"u"&&f instanceof Elements,v=0,b=f.length;if(_)for(;v<b;v++)Q(f[v]);else Q(f)}function a(f){if(!f.getBoundingClientRect)return{width:f.offsetWidth,height:f.offsetHeight};var Q=f.getBoundingClientRect();return{width:Math.round(Q.width),height:Math.round(Q.height)}}function s(f,Q){Object.keys(Q).forEach(function(m){f.style[m]=Q[m]})}var d=function(f,Q){var m=0;function _(){var b=[];this.add=function(V){b.push(V)};var M,E;this.call=function(V){for(M=0,E=b.length;M<E;M++)b[M].call(this,V)},this.remove=function(V){var O=[];for(M=0,E=b.length;M<E;M++)b[M]!==V&&O.push(b[M]);b=O},this.length=function(){return b.length}}function v(b,M){if(b){if(b.resizedAttached){b.resizedAttached.add(M);return}b.resizedAttached=new _,b.resizedAttached.add(M),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%"},V={position:"absolute",left:"0px",top:"0px",transition:"0s"};s(b.resizeSensor,E);var O=document.createElement("div");O.className="resize-sensor-expand",s(O,E);var R=document.createElement("div");s(R,V),O.appendChild(R);var j=document.createElement("div");j.className="resize-sensor-shrink",s(j,E);var G=document.createElement("div");s(G,V),s(G,{width:"200%",height:"200%"}),j.appendChild(G),b.resizeSensor.appendChild(O),b.resizeSensor.appendChild(j),b.appendChild(b.resizeSensor);var z=window.getComputedStyle(b),J=z?z.getPropertyValue("position"):null;J!=="absolute"&&J!=="relative"&&J!=="fixed"&&J!=="sticky"&&(b.style.position="relative");var tt=!1,ot=0,et=a(b),Tt=0,At=0,Ut=!0;m=0;var ee=function(){var Xt=b.offsetWidth,le=b.offsetHeight;R.style.width=Xt+10+"px",R.style.height=le+10+"px",O.scrollLeft=Xt+10,O.scrollTop=le+10,j.scrollLeft=Xt+10,j.scrollTop=le+10},ue=function(){if(Ut){var Xt=b.offsetWidth===0&&b.offsetHeight===0;if(Xt){m||(m=n(function(){m=0,ue()}));return}else Ut=!1}ee()};b.resizeSensor.resetSensor=ue;var Ft=function(){ot=0,tt&&(Tt=et.width,At=et.height,b.resizedAttached&&b.resizedAttached.call(et))},pe=function(){et=a(b),tt=et.width!==Tt||et.height!==At,tt&&!ot&&(ot=n(Ft)),ue()},lr=function(Xt,le,ge){Xt.attachEvent?Xt.attachEvent("on"+le,ge):Xt.addEventListener(le,ge)};lr(O,"scroll",pe),lr(j,"scroll",pe),m=n(function(){m=0,ue()})}}o(f,function(b){v(b,Q)}),this.detach=function(b){m||(i(m),m=0),d.detach(f,b)},this.reset=function(){f.resizeSensor.resetSensor()}};if(d.reset=function(f){o(f,function(Q){Q.resizeSensor.resetSensor()})},d.detach=function(f,Q){o(f,function(m){m&&(m.resizedAttached&&typeof Q=="function"&&(m.resizedAttached.remove(Q),m.resizedAttached.length())||m.resizeSensor&&(m.contains(m.resizeSensor)&&m.removeChild(m.resizeSensor),delete m.resizeSensor,delete m.resizedAttached))})},typeof MutationObserver<"u"){var p=new MutationObserver(function(f){for(var Q in f)if(f.hasOwnProperty(Q))for(var m=f[Q].addedNodes,_=0;_<m.length;_++)m[_].resizeSensor&&d.reset(m[_])});document.addEventListener("DOMContentLoaded",function(f){p.observe(document.body,{childList:!0,subtree:!0})})}return d})})(jE);var rJ=jE.exports;const nJ=xq(rJ);var iJ=Object.defineProperty,oJ=(t,e,r)=>e in t?iJ(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,vQ=(t,e,r)=>(oJ(t,typeof e!="symbol"?e+"":e,r),r),bQ=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},Bt=(t,e,r)=>(bQ(t,e,"read from private field"),r?r.call(t):e.get(t)),Tr=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Sr=(t,e,r,n)=>(bQ(t,e,"write to private field"),e.set(t,r),r),vr=(t,e,r)=>(bQ(t,e,"access private method"),r);function aJ(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in t)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var P=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function sJ(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var Ki=function(t){try{return!!t()}catch{return!0}},lJ=Ki,LQ=!lJ(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),zE=LQ,UE=Function.prototype,xQ=UE.call,cJ=zE&&UE.bind.bind(xQ,xQ),yi=zE?cJ:function(t){return function(){return xQ.apply(t,arguments)}},GE=yi,uJ=GE({}.toString),hJ=GE("".slice),Al=function(t){return hJ(uJ(t),8,-1)},dJ=yi,pJ=Ki,TJ=Al,wQ=Object,fJ=dJ("".split),QJ=pJ(function(){return!wQ("z").propertyIsEnumerable(0)})?function(t){return TJ(t)==="String"?fJ(t,""):wQ(t)}:wQ,Vl=function(t){return t==null},mJ=Vl,gJ=TypeError,F9=function(t){if(mJ(t))throw new gJ("Can't call method on "+t);return t},yJ=QJ,_J=F9,m5=function(t){return yJ(_J(t))},Ol=function(t){return t&&t.Math===Math&&t},Po=Ol(typeof globalThis=="object"&&globalThis)||Ol(typeof window=="object"&&window)||Ol(typeof self=="object"&&self)||Ol(typeof P=="object"&&P)||Ol(typeof P=="object"&&P)||function(){return this}()||Function("return this")(),ZE={exports:{}},$E=Po,vJ=Object.defineProperty,EQ=function(t,e){try{vJ($E,t,{value:e,configurable:!0,writable:!0})}catch{$E[t]=e}return e},bJ=Po,LJ=EQ,qE="__core-js_shared__",WE=ZE.exports=bJ[qE]||LJ(qE,{});(WE.versions||(WE.versions=[])).push({version:"3.37.0",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.0/LICENSE",source:"https://github.com/zloirock/core-js"});var MQ=ZE.exports,XE=MQ,KE=function(t,e){return XE[t]||(XE[t]=e||{})},xJ=F9,wJ=Object,YE=function(t){return wJ(xJ(t))},EJ=yi,MJ=YE,HJ=EJ({}.hasOwnProperty),ya=Object.hasOwn||function(t,e){return HJ(MJ(t),e)},SJ=yi,CJ=0,AJ=Math.random(),VJ=SJ(1 .toString),HQ=function(t){return"Symbol("+(t===void 0?"":t)+")_"+VJ(++CJ+AJ,36)},OJ=typeof navigator<"u"&&String(navigator.userAgent)||"",JE=Po,SQ=OJ,tM=JE.process,eM=JE.Deno,rM=tM&&tM.versions||eM&&eM.version,nM=rM&&rM.v8,I2,j9;nM&&(I2=nM.split("."),j9=I2[0]>0&&I2[0]<4?1:+(I2[0]+I2[1])),!j9&&SQ&&(I2=SQ.match(/Edge\/(\d+)/),(!I2||I2[1]>=74)&&(I2=SQ.match(/Chrome\/(\d+)/),I2&&(j9=+I2[1])));var kJ=j9,iM=kJ,PJ=Ki,IJ=Po,RJ=IJ.String,oM=!!Object.getOwnPropertySymbols&&!PJ(function(){var t=Symbol("symbol detection");return!RJ(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&iM&&iM<41}),NJ=oM,aM=NJ&&!Symbol.sham&&typeof Symbol.iterator=="symbol",BJ=Po,DJ=KE,sM=ya,FJ=HQ,jJ=oM,zJ=aM,g5=BJ.Symbol,CQ=DJ("wks"),UJ=zJ?g5.for||g5:g5&&g5.withoutSetter||FJ,c2=function(t){return sM(CQ,t)||(CQ[t]=jJ&&sM(g5,t)?g5[t]:UJ("Symbol."+t)),CQ[t]},AQ=typeof document=="object"&&document.all,Oi=typeof AQ>"u"&&AQ!==void 0?function(t){return typeof t=="function"||t===AQ}:function(t){return typeof t=="function"},GJ=Oi,u2=function(t){return typeof t=="object"?t!==null:GJ(t)},ZJ=u2,$J=String,qJ=TypeError,v3=function(t){if(ZJ(t))return t;throw new qJ($J(t)+" is not an object")},lM={},WJ=Ki,R2=!WJ(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),XJ=R2,KJ=Ki,cM=XJ&&KJ(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),_a={},YJ=Po,uM=u2,VQ=YJ.document,JJ=uM(VQ)&&uM(VQ.createElement),OQ=function(t){return JJ?VQ.createElement(t):{}},ttt=R2,ett=Ki,rtt=OQ,hM=!ttt&&!ett(function(){return Object.defineProperty(rtt("div"),"a",{get:function(){return 7}}).a!==7}),ntt=LQ,z9=Function.prototype.call,Qs=ntt?z9.bind(z9):function(){return z9.apply(z9,arguments)},kQ=Po,itt=Oi,ott=function(t){return itt(t)?t:void 0},kl=function(t,e){return arguments.length<2?ott(kQ[t]):kQ[t]&&kQ[t][e]},att=yi,PQ=att({}.isPrototypeOf),stt=kl,ltt=Oi,ctt=PQ,utt=aM,htt=Object,dM=utt?function(t){return typeof t=="symbol"}:function(t){var e=stt("Symbol");return ltt(e)&&ctt(e.prototype,htt(t))},dtt=String,IQ=function(t){try{return dtt(t)}catch{return"Object"}},ptt=Oi,Ttt=IQ,ftt=TypeError,Pl=function(t){if(ptt(t))return t;throw new ftt(Ttt(t)+" is not a function")},Qtt=Pl,mtt=Vl,RQ=function(t,e){var r=t[e];return mtt(r)?void 0:Qtt(r)},NQ=Qs,BQ=Oi,DQ=u2,gtt=TypeError,ytt=function(t,e){var r,n;if(e==="string"&&BQ(r=t.toString)&&!DQ(n=NQ(r,t))||BQ(r=t.valueOf)&&!DQ(n=NQ(r,t))||e!=="string"&&BQ(r=t.toString)&&!DQ(n=NQ(r,t)))return n;throw new gtt("Can't convert object to primitive value")},_tt=Qs,pM=u2,TM=dM,vtt=RQ,btt=ytt,Ltt=c2,xtt=TypeError,wtt=Ltt("toPrimitive"),Ett=function(t,e){if(!pM(t)||TM(t))return t;var r=vtt(t,wtt),n;if(r){if(e===void 0&&(e="default"),n=_tt(r,t,e),!pM(n)||TM(n))return n;throw new xtt("Can't convert object to primitive value")}return e===void 0&&(e="number"),btt(t,e)},Mtt=Ett,Htt=dM,fM=function(t){var e=Mtt(t,"string");return Htt(e)?e:e+""},Stt=R2,Ctt=hM,Att=cM,U9=v3,QM=fM,Vtt=TypeError,FQ=Object.defineProperty,Ott=Object.getOwnPropertyDescriptor,jQ="enumerable",zQ="configurable",UQ="writable";_a.f=Stt?Att?function(t,e,r){if(U9(t),e=QM(e),U9(r),typeof t=="function"&&e==="prototype"&&"value"in r&&UQ in r&&!r[UQ]){var n=Ott(t,e);n&&n[UQ]&&(t[e]=r.value,r={configurable:zQ in r?r[zQ]:n[zQ],enumerable:jQ in r?r[jQ]:n[jQ],writable:!1})}return FQ(t,e,r)}:FQ:function(t,e,r){if(U9(t),e=QM(e),U9(r),Ctt)try{return FQ(t,e,r)}catch{}if("get"in r||"set"in r)throw new Vtt("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var ktt=Math.ceil,Ptt=Math.floor,Itt=Math.trunc||function(t){var e=+t;return(e>0?Ptt:ktt)(e)},Rtt=Itt,G9=function(t){var e=+t;return e!==e||e===0?0:Rtt(e)},Ntt=G9,Btt=Math.max,Dtt=Math.min,Ftt=function(t,e){var r=Ntt(t);return r<0?Btt(r+e,0):Dtt(r,e)},jtt=G9,ztt=Math.min,Utt=function(t){var e=jtt(t);return e>0?ztt(e,9007199254740991):0},Gtt=Utt,mM=function(t){return Gtt(t.length)},Ztt=m5,$tt=Ftt,qtt=mM,gM=function(t){return function(e,r,n){var i=Ztt(e),o=qtt(i);if(o===0)return!t&&-1;var a=$tt(n,o),s;if(t&&r!==r){for(;o>a;)if(s=i[a++],s!==s)return!0}else for(;o>a;a++)if((t||a in i)&&i[a]===r)return t||a||0;return!t&&-1}},Wtt={includes:gM(!0),indexOf:gM(!1)},Z9={},Xtt=yi,GQ=ya,Ktt=m5,Ytt=Wtt.indexOf,Jtt=Z9,yM=Xtt([].push),_M=function(t,e){var r=Ktt(t),n=0,i=[],o;for(o in r)!GQ(Jtt,o)&&GQ(r,o)&&yM(i,o);for(;e.length>n;)GQ(r,o=e[n++])&&(~Ytt(i,o)||yM(i,o));return i},ZQ=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],tet=_M,eet=ZQ,ret=Object.keys||function(t){return tet(t,eet)},net=R2,iet=cM,oet=_a,aet=v3,set=m5,cet=ret;lM.f=net&&!iet?Object.defineProperties:function(t,e){aet(t);for(var r=set(e),n=cet(e),i=n.length,o=0,a;i>o;)oet.f(t,a=n[o++],r[a]);return t};var uet=kl,het=uet("document","documentElement"),det=KE,pet=HQ,vM=det("keys"),$Q=function(t){return vM[t]||(vM[t]=pet(t))},Tet=v3,fet=lM,bM=ZQ,Qet=Z9,met=het,get=OQ,yet=$Q,LM=">",xM="<",qQ="prototype",WQ="script",wM=yet("IE_PROTO"),XQ=function(){},EM=function(t){return xM+WQ+LM+t+xM+"/"+WQ+LM},MM=function(t){t.write(EM("")),t.close();var e=t.parentWindow.Object;return t=null,e},_et=function(){var t=get("iframe"),e="java"+WQ+":",r;return t.style.display="none",met.appendChild(t),t.src=String(e),r=t.contentWindow.document,r.open(),r.write(EM("document.F=Object")),r.close(),r.F},$9,q9=function(){try{$9=new ActiveXObject("htmlfile")}catch{}q9=typeof document<"u"?document.domain&&$9?MM($9):_et():MM($9);for(var t=bM.length;t--;)delete q9[qQ][bM[t]];return q9()};Qet[wM]=!0;var KQ=Object.create||function(t,e){var r;return t!==null?(XQ[qQ]=Tet(t),r=new XQ,XQ[qQ]=null,r[wM]=t):r=q9(),e===void 0?r:fet.f(r,e)},vet=c2,bet=KQ,Let=_a.f,YQ=vet("unscopables"),JQ=Array.prototype;JQ[YQ]===void 0&&Let(JQ,YQ,{configurable:!0,value:bet(null)});var xet=function(t){JQ[YQ][t]=!0},Il={},wet=Po,Eet=Oi,HM=wet.WeakMap,Met=Eet(HM)&&/native code/.test(String(HM)),tm=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}},Het=R2,Cet=_a,Aet=tm,W9=Het?function(t,e,r){return Cet.f(t,e,Aet(1,r))}:function(t,e,r){return t[e]=r,t},Vet=Met,SM=Po,Oet=u2,ket=W9,em=ya,rm=MQ,Pet=$Q,Iet=Z9,CM="Object already initialized",nm=SM.TypeError,Ret=SM.WeakMap,X9,Rl,K9,Net=function(t){return K9(t)?Rl(t):X9(t,{})},Bet=function(t){return function(e){var r;if(!Oet(e)||(r=Rl(e)).type!==t)throw new nm("Incompatible receiver, "+t+" required");return r}};if(Vet||rm.state){var va=rm.state||(rm.state=new Ret);va.get=va.get,va.has=va.has,va.set=va.set,X9=function(t,e){if(va.has(t))throw new nm(CM);return e.facade=t,va.set(t,e),e},Rl=function(t){return va.get(t)||{}},K9=function(t){return va.has(t)}}else{var y5=Pet("state");Iet[y5]=!0,X9=function(t,e){if(em(t,y5))throw new nm(CM);return e.facade=t,ket(t,y5,e),e},Rl=function(t){return em(t,y5)?t[y5]:{}},K9=function(t){return em(t,y5)}}var Y9={set:X9,get:Rl,has:K9,enforce:Net,getterFor:Bet},im={},AM={},VM={}.propertyIsEnumerable,OM=Object.getOwnPropertyDescriptor,Det=OM&&!VM.call({1:2},1);AM.f=Det?function(t){var e=OM(this,t);return!!e&&e.enumerable}:VM;var Fet=R2,jet=Qs,zet=AM,Uet=tm,Get=m5,Zet=fM,$et=ya,qet=hM,kM=Object.getOwnPropertyDescriptor;im.f=Fet?kM:function(t,e){if(t=Get(t),e=Zet(e),qet)try{return kM(t,e)}catch{}if($et(t,e))return Uet(!jet(zet.f,t,e),t[e])};var PM={exports:{}},om=R2,Wet=ya,IM=Function.prototype,Xet=om&&Object.getOwnPropertyDescriptor,am=Wet(IM,"name"),Ket=am&&(function(){}).name==="something",Yet=am&&(!om||om&&Xet(IM,"name").configurable),RM={EXISTS:am,PROPER:Ket,CONFIGURABLE:Yet},Jet=yi,trt=Oi,sm=MQ,ert=Jet(Function.toString);trt(sm.inspectSource)||(sm.inspectSource=function(t){return ert(t)});var rrt=sm.inspectSource,lm=yi,nrt=Ki,irt=Oi,J9=ya,cm=R2,ort=RM.CONFIGURABLE,art=rrt,NM=Y9,srt=NM.enforce,lrt=NM.get,BM=String,tu=Object.defineProperty,crt=lm("".slice),urt=lm("".replace),hrt=lm([].join),drt=cm&&!nrt(function(){return tu(function(){},"length",{value:8}).length!==8}),prt=String(String).split("String"),Trt=PM.exports=function(t,e,r){crt(BM(e),0,7)==="Symbol("&&(e="["+urt(BM(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!J9(t,"name")||ort&&t.name!==e)&&(cm?tu(t,"name",{value:e,configurable:!0}):t.name=e),drt&&r&&J9(r,"arity")&&t.length!==r.arity&&tu(t,"length",{value:r.arity});try{r&&J9(r,"constructor")&&r.constructor?cm&&tu(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch{}var n=srt(t);return J9(n,"source")||(n.source=hrt(prt,typeof e=="string"?e:"")),t};Function.prototype.toString=Trt(function(){return irt(this)&&lrt(this).source||art(this)},"toString");var DM=PM.exports,frt=Oi,Qrt=_a,mrt=DM,grt=EQ,_5=function(t,e,r,n){n||(n={});var i=n.enumerable,o=n.name!==void 0?n.name:e;if(frt(r)&&mrt(r,o,n),n.global)i?t[e]=r:grt(e,r);else{try{n.unsafe?t[e]&&(i=!0):delete t[e]}catch{}i?t[e]=r:Qrt.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},eu={},yrt=_M,_rt=ZQ,vrt=_rt.concat("length","prototype");eu.f=Object.getOwnPropertyNames||function(t){return yrt(t,vrt)};var FM={};FM.f=Object.getOwnPropertySymbols;var brt=kl,Lrt=yi,xrt=eu,wrt=FM,Ert=v3,Mrt=Lrt([].concat),Hrt=brt("Reflect","ownKeys")||function(t){var e=xrt.f(Ert(t)),r=wrt.f;return r?Mrt(e,r(t)):e},jM=ya,Srt=Hrt,Crt=im,Art=_a,Vrt=function(t,e,r){for(var n=Srt(e),i=Art.f,o=Crt.f,a=0;a<n.length;a++){var s=n[a];!jM(t,s)&&!(r&&jM(r,s))&&i(t,s,o(e,s))}},Ort=Ki,krt=Oi,Prt=/#|\.prototype\./,Nl=function(t,e){var r=Rrt[Irt(t)];return r===Brt?!0:r===Nrt?!1:krt(e)?Ort(e):!!e},Irt=Nl.normalize=function(t){return String(t).replace(Prt,".").toLowerCase()},Rrt=Nl.data={},Nrt=Nl.NATIVE="N",Brt=Nl.POLYFILL="P",zM=Nl,ru=Po,Drt=im.f,Frt=W9,jrt=_5,zrt=EQ,Urt=Vrt,Grt=zM,ba=function(t,e){var r=t.target,n=t.global,i=t.stat,o,a,s,d,p,f;if(n?a=ru:i?a=ru[r]||zrt(r,{}):a=ru[r]&&ru[r].prototype,a)for(s in e){if(p=e[s],t.dontCallGetSet?(f=Drt(a,s),d=f&&f.value):d=a[s],o=Grt(n?s:r+(i?".":"#")+s,t.forced),!o&&d!==void 0){if(typeof p==typeof d)continue;Urt(p,d)}(t.sham||d&&d.sham)&&Frt(p,"sham",!0),jrt(a,s,p,t)}},Zrt=Ki,$rt=!Zrt(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),qrt=ya,Wrt=Oi,Xrt=YE,Krt=$Q,Yrt=$rt,UM=Krt("IE_PROTO"),um=Object,Jrt=um.prototype,GM=Yrt?um.getPrototypeOf:function(t){var e=Xrt(t);if(qrt(e,UM))return e[UM];var r=e.constructor;return Wrt(r)&&e instanceof r?r.prototype:e instanceof um?Jrt:null},tnt=Ki,ent=Oi,rnt=u2,ZM=GM,nnt=_5,int=c2,hm=int("iterator"),$M=!1,P4,dm,pm;[].keys&&(pm=[].keys(),"next"in pm?(dm=ZM(ZM(pm)),dm!==Object.prototype&&(P4=dm)):$M=!0);var ont=!rnt(P4)||tnt(function(){var t={};return P4[hm].call(t)!==t});ont&&(P4={}),ent(P4[hm])||nnt(P4,hm,function(){return this});var qM={IteratorPrototype:P4,BUGGY_SAFARI_ITERATORS:$M},ant=_a.f,snt=ya,lnt=c2,WM=lnt("toStringTag"),nu=function(t,e,r){t&&!r&&(t=t.prototype),t&&!snt(t,WM)&&ant(t,WM,{configurable:!0,value:e})},cnt=qM.IteratorPrototype,unt=KQ,hnt=tm,dnt=nu,pnt=Il,Tnt=function(){return this},fnt=function(t,e,r,n){var i=e+" Iterator";return t.prototype=unt(cnt,{next:hnt(+!n,r)}),dnt(t,i,!1),pnt[i]=Tnt,t},Qnt=yi,mnt=Pl,XM=function(t,e,r){try{return Qnt(mnt(Object.getOwnPropertyDescriptor(t,e)[r]))}catch{}},gnt=u2,ynt=function(t){return gnt(t)||t===null},_nt=ynt,vnt=String,bnt=TypeError,Lnt=function(t){if(_nt(t))return t;throw new bnt("Can't set "+vnt(t)+" as a prototype")},xnt=XM,wnt=u2,Ent=F9,Mnt=Lnt,KM=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,e={},r;try{r=xnt(Object.prototype,"__proto__","set"),r(e,[]),t=e instanceof Array}catch{}return function(n,i){return Ent(n),Mnt(i),wnt(n)&&(t?r(n,i):n.__proto__=i),n}}():void 0),Hnt=ba,Snt=Qs,YM=RM,Cnt=Oi,Ant=fnt,JM=GM,tH=KM,Vnt=nu,Ont=W9,Tm=_5,knt=c2,Pnt=Il,eH=qM,Int=YM.PROPER,Rnt=YM.CONFIGURABLE,rH=eH.IteratorPrototype,iu=eH.BUGGY_SAFARI_ITERATORS,Bl=knt("iterator"),nH="keys",Dl="values",iH="entries",Nnt=function(){return this},fm=function(t,e,r,n,i,o,a){Ant(r,e,n);var s=function(E){if(E===i&&m)return m;if(!iu&&E&&E in f)return f[E];switch(E){case nH:return function(){return new r(this,E)};case Dl:return function(){return new r(this,E)};case iH:return function(){return new r(this,E)}}return function(){return new r(this)}},d=e+" Iterator",p=!1,f=t.prototype,Q=f[Bl]||f["@@iterator"]||i&&f[i],m=!iu&&Q||s(i),_=e==="Array"&&f.entries||Q,v,b,M;if(_&&(v=JM(_.call(new t)),v!==Object.prototype&&v.next&&(JM(v)!==rH&&(tH?tH(v,rH):Cnt(v[Bl])||Tm(v,Bl,Nnt)),Vnt(v,d,!0))),Int&&i===Dl&&Q&&Q.name!==Dl&&(Rnt?Ont(f,"name",Dl):(p=!0,m=function(){return Snt(Q,this)})),i)if(b={values:s(Dl),keys:o?m:s(nH),entries:s(iH)},a)for(M in b)(iu||p||!(M in f))&&Tm(f,M,b[M]);else Hnt({target:e,proto:!0,forced:iu||p},b);return f[Bl]!==m&&Tm(f,Bl,m,{name:i}),Pnt[e]=m,b},Qm=function(t,e){return{value:t,done:e}},Bnt=m5,mm=xet,oH=Il,aH=Y9,Dnt=_a.f,Fnt=fm,ou=Qm,jnt=R2,sH="Array Iterator",znt=aH.set,Unt=aH.getterFor(sH),Gnt=Fnt(Array,"Array",function(t,e){znt(this,{type:sH,target:Bnt(t),index:0,kind:e})},function(){var t=Unt(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=void 0,ou(void 0,!0);switch(t.kind){case"keys":return ou(r,!1);case"values":return ou(e[r],!1)}return ou([r,e[r]],!1)},"values"),lH=oH.Arguments=oH.Array;if(mm("keys"),mm("values"),mm("entries"),jnt&&lH.name!=="values")try{Dnt(lH,"name",{value:"values"})}catch{}var Znt=c2,$nt=Znt("toStringTag"),cH={};cH[$nt]="z";var gm=String(cH)==="[object z]",qnt=gm,Wnt=Oi,au=Al,Xnt=c2,Knt=Xnt("toStringTag"),Ynt=Object,Jnt=au(function(){return arguments}())==="Arguments",t1t=function(t,e){try{return t[e]}catch{}},ym=qnt?au:function(t){var e,r,n;return t===void 0?"Undefined":t===null?"Null":typeof(r=t1t(e=Ynt(t),Knt))=="string"?r:Jnt?au(e):(n=au(e))==="Object"&&Wnt(e.callee)?"Arguments":n},e1t=gm,r1t=ym,n1t=e1t?{}.toString:function(){return"[object "+r1t(this)+"]"},i1t=gm,o1t=_5,a1t=n1t;i1t||o1t(Object.prototype,"toString",a1t,{unsafe:!0});var uH={exports:{}},hH={},s1t=yi,l1t=s1t([].slice),c1t=Al,u1t=m5,dH=eu.f,h1t=l1t,pH=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],d1t=function(t){try{return dH(t)}catch{return h1t(pH)}};hH.f=function(t){return pH&&c1t(t)==="Window"?d1t(t):dH(u1t(t))};var p1t=Ki,T1t=p1t(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),f1t=Ki,Q1t=u2,m1t=Al,TH=T1t,su=Object.isExtensible,g1t=f1t(function(){su(1)}),y1t=g1t||TH?function(t){return!Q1t(t)||TH&&m1t(t)==="ArrayBuffer"?!1:su?su(t):!0}:su,_1t=Ki,v1t=!_1t(function(){return Object.isExtensible(Object.preventExtensions({}))}),b1t=ba,L1t=yi,x1t=Z9,w1t=u2,_m=ya,E1t=_a.f,fH=eu,M1t=hH,vm=y1t,H1t=HQ,S1t=v1t,QH=!1,ms=H1t("meta"),C1t=0,bm=function(t){E1t(t,ms,{value:{objectID:"O"+C1t++,weakData:{}}})},A1t=function(t,e){if(!w1t(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!_m(t,ms)){if(!vm(t))return"F";if(!e)return"E";bm(t)}return t[ms].objectID},V1t=function(t,e){if(!_m(t,ms)){if(!vm(t))return!0;if(!e)return!1;bm(t)}return t[ms].weakData},O1t=function(t){return S1t&&QH&&vm(t)&&!_m(t,ms)&&bm(t),t},k1t=function(){P1t.enable=function(){},QH=!0;var t=fH.f,e=L1t([].splice),r={};r[ms]=1,t(r).length&&(fH.f=function(n){for(var i=t(n),o=0,a=i.length;o<a;o++)if(i[o]===ms){e(i,o,1);break}return i},b1t({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:M1t.f}))},P1t=uH.exports={enable:k1t,fastKey:A1t,getWeakData:V1t,onFreeze:O1t};x1t[ms]=!0;var mH=uH.exports,I1t=Al,R1t=yi,N1t=function(t){if(I1t(t)==="Function")return R1t(t)},gH=N1t,B1t=Pl,D1t=LQ,F1t=gH(gH.bind),yH=function(t,e){return B1t(t),e===void 0?t:D1t?F1t(t,e):function(){return t.apply(e,arguments)}},j1t=c2,z1t=Il,U1t=j1t("iterator"),G1t=Array.prototype,Z1t=function(t){return t!==void 0&&(z1t.Array===t||G1t[U1t]===t)},$1t=ym,_H=RQ,q1t=Vl,W1t=Il,X1t=c2,K1t=X1t("iterator"),vH=function(t){if(!q1t(t))return _H(t,K1t)||_H(t,"@@iterator")||W1t[$1t(t)]},Y1t=Qs,J1t=Pl,tit=v3,eit=IQ,rit=vH,nit=TypeError,iit=function(t,e){var r=arguments.length<2?rit(t):e;if(J1t(r))return tit(Y1t(r,t));throw new nit(eit(t)+" is not iterable")},oit=Qs,bH=v3,ait=RQ,Lm=function(t,e,r){var n,i;bH(t);try{if(n=ait(t,"return"),!n){if(e==="throw")throw r;return r}n=oit(n,t)}catch(o){i=!0,n=o}if(e==="throw")throw r;if(i)throw n;return bH(n),r},sit=yH,lit=Qs,cit=v3,uit=IQ,hit=Z1t,dit=mM,LH=PQ,pit=iit,Tit=vH,xH=Lm,fit=TypeError,lu=function(t,e){this.stopped=t,this.result=e},wH=lu.prototype,EH=function(t,e,r){var n=r&&r.that,i=!!(r&&r.AS_ENTRIES),o=!!(r&&r.IS_RECORD),a=!!(r&&r.IS_ITERATOR),s=!!(r&&r.INTERRUPTED),d=sit(e,n),p,f,Q,m,_,v,b,M=function(V){return p&&xH(p,"normal",V),new lu(!0,V)},E=function(V){return i?(cit(V),s?d(V[0],V[1],M):d(V[0],V[1])):s?d(V,M):d(V)};if(o)p=t.iterator;else if(a)p=t;else{if(f=Tit(t),!f)throw new fit(uit(t)+" is not iterable");if(hit(f)){for(Q=0,m=dit(t);m>Q;Q++)if(_=E(t[Q]),_&&LH(wH,_))return _;return new lu(!1)}p=pit(t,f)}for(v=o?t.next:p.next;!(b=lit(v,p)).done;){try{_=E(b.value)}catch(V){xH(p,"throw",V)}if(typeof _=="object"&&_&&LH(wH,_))return _}return new lu(!1)},Qit=PQ,mit=TypeError,MH=function(t,e){if(Qit(e,t))return t;throw new mit("Incorrect invocation")},git=c2,HH=git("iterator"),SH=!1;try{var yit=0,CH={next:function(){return{done:!!yit++}},return:function(){SH=!0}};CH[HH]=function(){return this},Array.from(CH,function(){throw 2})}catch{}var _it=function(t,e){try{if(!e&&!SH)return!1}catch{return!1}var r=!1;try{var n={};n[HH]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch{}return r},vit=Oi,bit=u2,AH=KM,Lit=function(t,e,r){var n,i;return AH&&vit(n=e.constructor)&&n!==r&&bit(i=n.prototype)&&i!==r.prototype&&AH(t,i),t},xit=ba,wit=Po,Eit=yi,VH=zM,Mit=_5,Hit=mH,Sit=EH,Cit=MH,Ait=Oi,Vit=Vl,xm=u2,wm=Ki,Oit=_it,kit=nu,Pit=Lit,Iit=function(t,e,r){var n=t.indexOf("Map")!==-1,i=t.indexOf("Weak")!==-1,o=n?"set":"add",a=wit[t],s=a&&a.prototype,d=a,p={},f=function(E){var V=Eit(s[E]);Mit(s,E,E==="add"?function(O){return V(this,O===0?0:O),this}:E==="delete"?function(O){return i&&!xm(O)?!1:V(this,O===0?0:O)}:E==="get"?function(O){return i&&!xm(O)?void 0:V(this,O===0?0:O)}:E==="has"?function(O){return i&&!xm(O)?!1:V(this,O===0?0:O)}:function(O,R){return V(this,O===0?0:O,R),this})},Q=VH(t,!Ait(a)||!(i||s.forEach&&!wm(function(){new a().entries().next()})));if(Q)d=r.getConstructor(e,t,n,o),Hit.enable();else if(VH(t,!0)){var m=new d,_=m[o](i?{}:-0,1)!==m,v=wm(function(){m.has(1)}),b=Oit(function(E){new a(E)}),M=!i&&wm(function(){for(var E=new a,V=5;V--;)E[o](V,V);return!E.has(-0)});b||(d=e(function(E,V){Cit(E,s);var O=Pit(new a,E,d);return Vit(V)||Sit(V,O[o],{that:O,AS_ENTRIES:n}),O}),d.prototype=s,s.constructor=d),(v||M)&&(f("delete"),f("has"),n&&f("get")),(M||_)&&f(o),i&&s.clear&&delete s.clear}return p[t]=d,xit({global:!0,constructor:!0,forced:d!==a},p),kit(d,t),i||r.setStrong(d,t,n),d},OH=DM,Rit=_a,kH=function(t,e,r){return r.get&&OH(r.get,e,{getter:!0}),r.set&&OH(r.set,e,{setter:!0}),Rit.f(t,e,r)},Nit=_5,Bit=function(t,e,r){for(var n in e)Nit(t,n,e[n],r);return t},Dit=kl,Fit=kH,jit=c2,zit=R2,PH=jit("species"),Uit=function(t){var e=Dit(t);zit&&e&&!e[PH]&&Fit(e,PH,{configurable:!0,get:function(){return this}})},IH=KQ,Git=kH,RH=Bit,Zit=yH,$it=MH,qit=Vl,Wit=EH,Xit=fm,NH=Qm,Kit=Uit,Fl=R2,BH=mH.fastKey,DH=Y9,FH=DH.set,Em=DH.getterFor,Yit={getConstructor:function(t,e,r,n){var i=t(function(p,f){$it(p,o),FH(p,{type:e,index:IH(null),first:void 0,last:void 0,size:0}),Fl||(p.size=0),qit(f)||Wit(f,p[n],{that:p,AS_ENTRIES:r})}),o=i.prototype,a=Em(e),s=function(p,f,Q){var m=a(p),_=d(p,f),v,b;return _?_.value=Q:(m.last=_={index:b=BH(f,!0),key:f,value:Q,previous:v=m.last,next:void 0,removed:!1},m.first||(m.first=_),v&&(v.next=_),Fl?m.size++:p.size++,b!=="F"&&(m.index[b]=_)),p},d=function(p,f){var Q=a(p),m=BH(f),_;if(m!=="F")return Q.index[m];for(_=Q.first;_;_=_.next)if(_.key===f)return _};return RH(o,{clear:function(){for(var p=this,f=a(p),Q=f.first;Q;)Q.removed=!0,Q.previous&&(Q.previous=Q.previous.next=void 0),Q=Q.next;f.first=f.last=void 0,f.index=IH(null),Fl?f.size=0:p.size=0},delete:function(p){var f=this,Q=a(f),m=d(f,p);if(m){var _=m.next,v=m.previous;delete Q.index[m.index],m.removed=!0,v&&(v.next=_),_&&(_.previous=v),Q.first===m&&(Q.first=_),Q.last===m&&(Q.last=v),Fl?Q.size--:f.size--}return!!m},forEach:function(p){for(var f=a(this),Q=Zit(p,arguments.length>1?arguments[1]:void 0),m;m=m?m.next:f.first;)for(Q(m.value,m.key,this);m&&m.removed;)m=m.previous},has:function(p){return!!d(this,p)}}),RH(o,r?{get:function(p){var f=d(this,p);return f&&f.value},set:function(p,f){return s(this,p===0?0:p,f)}}:{add:function(p){return s(this,p=p===0?0:p,p)}}),Fl&&Git(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(t,e,r){var n=e+" Iterator",i=Em(e),o=Em(n);Xit(t,e,function(a,s){FH(this,{type:n,target:a,state:i(a),kind:s,last:void 0})},function(){for(var a=o(this),s=a.kind,d=a.last;d&&d.removed;)d=d.previous;return!a.target||!(a.last=d=d?d.next:a.state.first)?(a.target=void 0,NH(void 0,!0)):NH(s==="keys"?d.key:s==="values"?d.value:[d.key,d.value],!1)},r?"entries":"values",!r,!0),Kit(e)}},Jit=Iit,tot=Yit;Jit("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},tot);var Mm=yi,cu=Set.prototype,La={Set,add:Mm(cu.add),has:Mm(cu.has),remove:Mm(cu.delete),proto:cu},eot=La.has,I4=function(t){return eot(t),t},rot=Qs,R4=function(t,e,r){for(var n=r?t:t.iterator,i=t.next,o,a;!(o=rot(i,n)).done;)if(a=e(o.value),a!==void 0)return a},jH=yi,not=R4,zH=La,iot=zH.Set,UH=zH.proto,oot=jH(UH.forEach),GH=jH(UH.keys),aot=GH(new iot).next,jl=function(t,e,r){return r?not({iterator:GH(t),next:aot},e):oot(t,e)},ZH=La,sot=jl,lot=ZH.Set,cot=ZH.add,Hm=function(t){var e=new lot;return sot(t,function(r){cot(e,r)}),e},uot=XM,hot=La,zl=uot(hot.proto,"size","get")||function(t){return t.size},dot=function(t){return{iterator:t,next:t.next,done:!1}},$H=Pl,qH=v3,WH=Qs,pot=G9,Tot=dot,XH="Invalid size",fot=RangeError,Qot=TypeError,mot=Math.max,KH=function(t,e){this.set=t,this.size=mot(e,0),this.has=$H(t.has),this.keys=$H(t.keys)};KH.prototype={getIterator:function(){return Tot(qH(WH(this.keys,this.set)))},includes:function(t){return WH(this.has,this.set,t)}};var N4=function(t){qH(t);var e=+t.size;if(e!==e)throw new Qot(XH);var r=pot(e);if(r<0)throw new fot(XH);return new KH(t,r)},got=I4,YH=La,yot=Hm,_ot=zl,vot=N4,bot=jl,Lot=R4,xot=YH.has,JH=YH.remove,wot=function(t){var e=got(this),r=vot(t),n=yot(e);return _ot(e)<=r.size?bot(e,function(i){r.includes(i)&&JH(n,i)}):Lot(r.getIterator(),function(i){xot(e,i)&&JH(n,i)}),n},Eot=kl,tS=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},B4=function(t){var e=Eot("Set");try{new e()[t](tS(0));try{return new e()[t](tS(-1)),!1}catch{return!0}}catch{return!1}},Mot=ba,Hot=wot,Sot=B4;Mot({target:"Set",proto:!0,real:!0,forced:!Sot("difference")},{difference:Hot});var Cot=I4,Sm=La,Aot=zl,Vot=N4,Oot=jl,kot=R4,Pot=Sm.Set,eS=Sm.add,Iot=Sm.has,Rot=function(t){var e=Cot(this),r=Vot(t),n=new Pot;return Aot(e)>r.size?kot(r.getIterator(),function(i){Iot(e,i)&&eS(n,i)}):Oot(e,function(i){r.includes(i)&&eS(n,i)}),n},Not=ba,Bot=Ki,Dot=Rot,Fot=B4,jot=!Fot("intersection")||Bot(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});Not({target:"Set",proto:!0,real:!0,forced:jot},{intersection:Dot});var zot=I4,Uot=La.has,Got=zl,Zot=N4,$ot=jl,qot=R4,Wot=Lm,Xot=function(t){var e=zot(this),r=Zot(t);if(Got(e)<=r.size)return $ot(e,function(i){if(r.includes(i))return!1},!0)!==!1;var n=r.getIterator();return qot(n,function(i){if(Uot(e,i))return Wot(n,"normal",!1)})!==!1},Kot=ba,Yot=Xot,Jot=B4;Kot({target:"Set",proto:!0,real:!0,forced:!Jot("isDisjointFrom")},{isDisjointFrom:Yot});var t2t=I4,e2t=zl,r2t=jl,n2t=N4,i2t=function(t){var e=t2t(this),r=n2t(t);return e2t(e)>r.size?!1:r2t(e,function(n){if(!r.includes(n))return!1},!0)!==!1},o2t=ba,a2t=i2t,s2t=B4;o2t({target:"Set",proto:!0,real:!0,forced:!s2t("isSubsetOf")},{isSubsetOf:a2t});var l2t=I4,c2t=La.has,u2t=zl,h2t=N4,d2t=R4,p2t=Lm,T2t=function(t){var e=l2t(this),r=h2t(t);if(u2t(e)<r.size)return!1;var n=r.getIterator();return d2t(n,function(i){if(!c2t(e,i))return p2t(n,"normal",!1)})!==!1},f2t=ba,Q2t=T2t,m2t=B4;f2t({target:"Set",proto:!0,real:!0,forced:!m2t("isSupersetOf")},{isSupersetOf:Q2t});var g2t=I4,Cm=La,y2t=Hm,_2t=N4,v2t=R4,b2t=Cm.add,L2t=Cm.has,x2t=Cm.remove,w2t=function(t){var e=g2t(this),r=_2t(t).getIterator(),n=y2t(e);return v2t(r,function(i){L2t(e,i)?x2t(n,i):b2t(n,i)}),n},E2t=ba,M2t=w2t,H2t=B4;E2t({target:"Set",proto:!0,real:!0,forced:!H2t("symmetricDifference")},{symmetricDifference:M2t});var S2t=I4,C2t=La.add,A2t=Hm,V2t=N4,O2t=R4,k2t=function(t){var e=S2t(this),r=V2t(t).getIterator(),n=A2t(e);return O2t(r,function(i){C2t(n,i)}),n},P2t=ba,I2t=k2t,R2t=B4;P2t({target:"Set",proto:!0,real:!0,forced:!R2t("union")},{union:I2t});var N2t=ym,B2t=String,rS=function(t){if(N2t(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return B2t(t)},Am=yi,D2t=G9,F2t=rS,j2t=F9,z2t=Am("".charAt),nS=Am("".charCodeAt),U2t=Am("".slice),iS=function(t){return function(e,r){var n=F2t(j2t(e)),i=D2t(r),o=n.length,a,s;return i<0||i>=o?t?"":void 0:(a=nS(n,i),a<55296||a>56319||i+1===o||(s=nS(n,i+1))<56320||s>57343?t?z2t(n,i):a:t?U2t(n,i,i+2):(a-55296<<10)+(s-56320)+65536)}},G2t={codeAt:iS(!1),charAt:iS(!0)},Z2t=G2t.charAt,$2t=rS,oS=Y9,q2t=fm,aS=Qm,sS="String Iterator",W2t=oS.set,X2t=oS.getterFor(sS);q2t(String,"String",function(t){W2t(this,{type:sS,string:$2t(t),index:0})},function(){var t=X2t(this),e=t.string,r=t.index,n;return r>=e.length?aS(void 0,!0):(n=Z2t(e,r),t.index+=n.length,aS(n,!1))});var K2t=Po,Y2t=K2t,J2t=Y2t,tat=J2t.Set,eat={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},rat=OQ,Vm=rat("span").classList,lS=Vm&&Vm.constructor&&Vm.constructor.prototype,nat=lS===Object.prototype?void 0:lS,cS=Po,uS=eat,iat=nat,Ul=Gnt,hS=W9,oat=nu,aat=c2,Om=aat("iterator"),km=Ul.values,dS=function(t,e){if(t){if(t[Om]!==km)try{hS(t,Om,km)}catch{t[Om]=km}if(oat(t,e,!0),uS[e]){for(var r in Ul)if(t[r]!==Ul[r])try{hS(t,r,Ul[r])}catch{t[r]=Ul[r]}}}};for(var Pm in uS)dS(cS[Pm]&&cS[Pm].prototype,Pm);dS(iat,"DOMTokenList");var sat=tat,lat=sat,cat=lat,uat=cat;const Gl=Cl(uat);var pS={exports:{}};/**
|
|
25
|
+
`,kZ=["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 PZ(t){const e=window.getComputedStyle(t),r=e.getPropertyValue("box-sizing"),n=Number.parseFloat(e.getPropertyValue("padding-bottom"))+Number.parseFloat(e.getPropertyValue("padding-top")),i=Number.parseFloat(e.getPropertyValue("border-bottom-width"))+Number.parseFloat(e.getPropertyValue("border-top-width"));return{contextStyle:kZ.map(a=>`${a}:${e.getPropertyValue(a)}`).join(";"),paddingSize:n,borderSize:i,boxSizing:r}}function mw(t,e=1,r){var n;O2||(O2=document.createElement("textarea"),document.body.appendChild(O2));const{paddingSize:i,borderSize:o,boxSizing:a,contextStyle:s}=PZ(t);O2.setAttribute("style",`${s};${OZ}`),O2.value=t.value||t.placeholder||"";let d=O2.scrollHeight;const p={};a==="border-box"?d=d+o:a==="content-box"&&(d=d-i),O2.value="";const f=O2.scrollHeight-i;if(X1(e)){let Q=f*e;a==="border-box"&&(Q=Q+i+o),d=Math.max(Q,d),p.minHeight=`${Q}px`}if(X1(r)){let Q=f*r;a==="border-box"&&(Q=Q+i+o),d=Math.min(Q,d)}return p.height=`${d}px`,(n=O2.parentNode)==null||n.removeChild(O2),O2=void 0,p}const IZ=on({id:{type:String,default:void 0},size:T3,disabled:Boolean,modelValue:{type:_r([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:_r([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:ps},prefixIcon:{type:ps},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:_r([Object,Array,String]),default:()=>J6({})},autofocus:{type:Boolean,default:!1}}),RZ={[f1]:t=>W1(t),input:t=>W1(t),change:t=>W1(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,mouseleave:t=>t instanceof MouseEvent,mouseenter:t=>t instanceof MouseEvent,keydown:t=>t instanceof Event,compositionstart:t=>t instanceof CompositionEvent,compositionupdate:t=>t instanceof CompositionEvent,compositionend:t=>t instanceof CompositionEvent},NZ=["role"],BZ=["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus"],DZ=["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus"],FZ=h.defineComponent({name:"ElInput",inheritAttrs:!1}),jZ=h.defineComponent({...FZ,props:IZ,emits:RZ,setup(t,{expose:e,emit:r}){const n=t,i=h.useAttrs(),o=h.useSlots(),a=h.computed(()=>{const ye={};return n.containerRole==="combobox"&&(ye["aria-haspopup"]=i["aria-haspopup"],ye["aria-owns"]=i["aria-owns"],ye["aria-expanded"]=i["aria-expanded"]),ye}),s=h.computed(()=>[n.type==="textarea"?M.b():b.b(),b.m(_.value),b.is("disabled",v.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")]:Xt.value&&le.value},i.class]),d=h.computed(()=>[b.e("wrapper"),b.is("focus",ot.value)]),p=jU({excludeKeys:h.computed(()=>Object.keys(a.value))}),{form:f,formItem:Q}=Q3(),{inputId:m}=s5(n,{formItemContext:Q}),_=f3(),v=a5(),b=xr("input"),M=xr("textarea"),E=h.shallowRef(),V=h.shallowRef(),O=h.ref(!1),R=h.ref(!1),j=h.ref(!1),G=h.ref(),z=h.shallowRef(n.inputStyle),J=h.computed(()=>E.value||V.value),{wrapperRef:tt,isFocused:ot,handleFocus:et,handleBlur:Tt}=$f(J,{afterBlur(){var ye;n.validateEvent&&((ye=Q==null?void 0:Q.validate)==null||ye.call(Q,"blur").catch(cr=>K1(cr)))}}),At=h.computed(()=>{var ye;return(ye=f==null?void 0:f.statusIcon)!=null?ye:!1}),Ut=h.computed(()=>(Q==null?void 0:Q.validateState)||""),ee=h.computed(()=>Ut.value&&Ex[Ut.value]),ue=h.computed(()=>j.value?OU:HU),Ft=h.computed(()=>[i.style]),pe=h.computed(()=>[n.inputStyle,z.value,{resize:n.resize}]),lr=h.computed(()=>u3(n.modelValue)?"":String(n.modelValue)),Xt=h.computed(()=>n.clearable&&!v.value&&!n.readonly&&!!lr.value&&(ot.value||O.value)),le=h.computed(()=>n.showPassword&&!v.value&&!n.readonly&&!!lr.value&&(!!lr.value||ot.value)),ge=h.computed(()=>n.showWordLimit&&!!n.maxlength&&(n.type==="text"||n.type==="textarea")&&!v.value&&!n.readonly&&!n.showPassword),Le=h.computed(()=>lr.value.length),Fe=h.computed(()=>!!ge.value&&Le.value>Number(n.maxlength)),Ge=h.computed(()=>!!o.suffix||!!n.suffixIcon||Xt.value||n.showPassword||ge.value||!!Ut.value&&At.value),[je,Dt]=xZ(E);os(V,ye=>{if(jt(),!ge.value||n.resize!=="both")return;const cr=ye[0],{width:Wr}=cr.contentRect;G.value={right:`calc(100% - ${Wr+15+6}px)`}});const qt=()=>{const{type:ye,autosize:cr}=n;if(!(!T1||ye!=="textarea"||!V.value))if(cr){const Wr=Qi(cr)?cr.minRows:void 0,$n=Qi(cr)?cr.maxRows:void 0,Qe=mw(V.value,Wr,$n);z.value={overflowY:"hidden",...Qe},h.nextTick(()=>{V.value.offsetHeight,z.value=Qe})}else z.value={minHeight:mw(V.value).minHeight}},jt=(ye=>{let cr=!1;return()=>{var Wr;if(cr||!n.autosize)return;((Wr=V.value)==null?void 0:Wr.offsetParent)===null||(ye(),cr=!0)}})(qt),fe=()=>{const ye=J.value,cr=n.formatter?n.formatter(lr.value):lr.value;!ye||ye.value===cr||(ye.value=cr)},Ne=async ye=>{je();let{value:cr}=ye.target;if(n.formatter&&(cr=n.parser?n.parser(cr):cr),!R.value){if(cr===lr.value){fe();return}r(f1,cr),r("input",cr),await h.nextTick(),fe(),Dt()}},Ae=ye=>{r("change",ye.target.value)},Ve=ye=>{r("compositionstart",ye),R.value=!0},ke=ye=>{var cr;r("compositionupdate",ye);const Wr=(cr=ye.target)==null?void 0:cr.value,$n=Wr[Wr.length-1]||"";R.value=!Hx($n)},ze=ye=>{r("compositionend",ye),R.value&&(R.value=!1,Ne(ye))},zt=()=>{j.value=!j.value,Pr()},Pr=async()=>{var ye;await h.nextTick(),(ye=J.value)==null||ye.focus()},mn=()=>{var ye;return(ye=J.value)==null?void 0:ye.blur()},We=ye=>{O.value=!1,r("mouseleave",ye)},br=ye=>{O.value=!0,r("mouseenter",ye)},Nn=ye=>{r("keydown",ye)},S1=()=>{var ye;(ye=J.value)==null||ye.select()},wn=()=>{r(f1,""),r("change",""),r("clear"),r("input","")};return h.watch(()=>n.modelValue,()=>{var ye;h.nextTick(()=>qt()),n.validateEvent&&((ye=Q==null?void 0:Q.validate)==null||ye.call(Q,"change").catch(cr=>K1(cr)))}),h.watch(lr,()=>fe()),h.watch(()=>n.type,async()=>{await h.nextTick(),fe(),qt()}),h.onMounted(()=>{!n.formatter&&n.parser&&K1("ElInput","If you set the parser, you also need to set the formatter."),fe(),h.nextTick(qt)}),e({input:E,textarea:V,ref:J,textareaStyle:pe,autosize:h.toRef(n,"autosize"),focus:Pr,blur:mn,select:S1,clear:wn,resizeTextarea:qt}),(ye,cr)=>h.withDirectives((h.openBlock(),h.createElementBlock("div",h.mergeProps(h.unref(a),{class:h.unref(s),style:h.unref(Ft),role:ye.containerRole,onMouseenter:br,onMouseleave:We}),[h.createCommentVNode(" input "),ye.type!=="textarea"?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createCommentVNode(" prepend slot "),ye.$slots.prepend?(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(h.unref(b).be("group","prepend"))},[h.renderSlot(ye.$slots,"prepend")],2)):h.createCommentVNode("v-if",!0),h.createElementVNode("div",{ref_key:"wrapperRef",ref:tt,class:h.normalizeClass(h.unref(d))},[h.createCommentVNode(" prefix slot "),ye.$slots.prefix||ye.prefixIcon?(h.openBlock(),h.createElementBlock("span",{key:0,class:h.normalizeClass(h.unref(b).e("prefix"))},[h.createElementVNode("span",{class:h.normalizeClass(h.unref(b).e("prefix-inner"))},[h.renderSlot(ye.$slots,"prefix"),ye.prefixIcon?(h.openBlock(),h.createBlock(h.unref(F1),{key:0,class:h.normalizeClass(h.unref(b).e("icon"))},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(ye.prefixIcon)))]),_:1},8,["class"])):h.createCommentVNode("v-if",!0)],2)],2)):h.createCommentVNode("v-if",!0),h.createElementVNode("input",h.mergeProps({id:h.unref(m),ref_key:"input",ref:E,class:h.unref(b).e("inner")},h.unref(p),{minlength:ye.minlength,maxlength:ye.maxlength,type:ye.showPassword?j.value?"text":"password":ye.type,disabled:h.unref(v),readonly:ye.readonly,autocomplete:ye.autocomplete,tabindex:ye.tabindex,"aria-label":ye.label,placeholder:ye.placeholder,style:ye.inputStyle,form:ye.form,autofocus:ye.autofocus,onCompositionstart:Ve,onCompositionupdate:ke,onCompositionend:ze,onInput:Ne,onFocus:cr[0]||(cr[0]=(...Wr)=>h.unref(et)&&h.unref(et)(...Wr)),onBlur:cr[1]||(cr[1]=(...Wr)=>h.unref(Tt)&&h.unref(Tt)(...Wr)),onChange:Ae,onKeydown:Nn}),null,16,BZ),h.createCommentVNode(" suffix slot "),h.unref(Ge)?(h.openBlock(),h.createElementBlock("span",{key:1,class:h.normalizeClass(h.unref(b).e("suffix"))},[h.createElementVNode("span",{class:h.normalizeClass(h.unref(b).e("suffix-inner"))},[!h.unref(Xt)||!h.unref(le)||!h.unref(ge)?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.renderSlot(ye.$slots,"suffix"),ye.suffixIcon?(h.openBlock(),h.createBlock(h.unref(F1),{key:0,class:h.normalizeClass(h.unref(b).e("icon"))},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(ye.suffixIcon)))]),_:1},8,["class"])):h.createCommentVNode("v-if",!0)],64)):h.createCommentVNode("v-if",!0),h.unref(Xt)?(h.openBlock(),h.createBlock(h.unref(F1),{key:1,class:h.normalizeClass([h.unref(b).e("icon"),h.unref(b).e("clear")]),onMousedown:h.withModifiers(h.unref(as),["prevent"]),onClick:wn},{default:h.withCtx(()=>[h.createVNode(h.unref(Sf))]),_:1},8,["class","onMousedown"])):h.createCommentVNode("v-if",!0),h.unref(le)?(h.openBlock(),h.createBlock(h.unref(F1),{key:2,class:h.normalizeClass([h.unref(b).e("icon"),h.unref(b).e("password")]),onClick:zt},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(h.unref(ue))))]),_:1},8,["class"])):h.createCommentVNode("v-if",!0),h.unref(ge)?(h.openBlock(),h.createElementBlock("span",{key:3,class:h.normalizeClass(h.unref(b).e("count"))},[h.createElementVNode("span",{class:h.normalizeClass(h.unref(b).e("count-inner"))},h.toDisplayString(h.unref(Le))+" / "+h.toDisplayString(ye.maxlength),3)],2)):h.createCommentVNode("v-if",!0),h.unref(Ut)&&h.unref(ee)&&h.unref(At)?(h.openBlock(),h.createBlock(h.unref(F1),{key:4,class:h.normalizeClass([h.unref(b).e("icon"),h.unref(b).e("validateIcon"),h.unref(b).is("loading",h.unref(Ut)==="validating")])},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(h.unref(ee))))]),_:1},8,["class"])):h.createCommentVNode("v-if",!0)],2)],2)):h.createCommentVNode("v-if",!0)],2),h.createCommentVNode(" append slot "),ye.$slots.append?(h.openBlock(),h.createElementBlock("div",{key:1,class:h.normalizeClass(h.unref(b).be("group","append"))},[h.renderSlot(ye.$slots,"append")],2)):h.createCommentVNode("v-if",!0)],64)):(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[h.createCommentVNode(" textarea "),h.createElementVNode("textarea",h.mergeProps({id:h.unref(m),ref_key:"textarea",ref:V,class:h.unref(M).e("inner")},h.unref(p),{minlength:ye.minlength,maxlength:ye.maxlength,tabindex:ye.tabindex,disabled:h.unref(v),readonly:ye.readonly,autocomplete:ye.autocomplete,style:h.unref(pe),"aria-label":ye.label,placeholder:ye.placeholder,form:ye.form,autofocus:ye.autofocus,onCompositionstart:Ve,onCompositionupdate:ke,onCompositionend:ze,onInput:Ne,onFocus:cr[2]||(cr[2]=(...Wr)=>h.unref(et)&&h.unref(et)(...Wr)),onBlur:cr[3]||(cr[3]=(...Wr)=>h.unref(Tt)&&h.unref(Tt)(...Wr)),onChange:Ae,onKeydown:Nn}),null,16,DZ),h.unref(ge)?(h.openBlock(),h.createElementBlock("span",{key:0,style:h.normalizeStyle(G.value),class:h.normalizeClass(h.unref(b).e("count"))},h.toDisplayString(h.unref(Le))+" / "+h.toDisplayString(ye.maxlength),7)):h.createCommentVNode("v-if",!0)],64))],16,NZ)),[[h.vShow,ye.type!=="hidden"]])}});var zZ=Hr(jZ,[["__file","input.vue"]]);const L9=mi(zZ),l5=4,UZ={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"}},GZ=({move:t,size:e,bar:r})=>({[r.size]:e,transform:`translate${r.axis}(${t}%)`}),gw=Symbol("scrollbarContextKey"),ZZ=on({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),$Z="Thumb";var yw=Hr(h.defineComponent({__name:"thumb",props:ZZ,setup(t){const e=t,r=h.inject(gw),n=xr("scrollbar");r||yx($Z,"can not inject scrollbar context");const i=h.ref(),o=h.ref(),a=h.ref({}),s=h.ref(!1);let d=!1,p=!1,f=T1?document.onselectstart:null;const Q=h.computed(()=>UZ[e.vertical?"vertical":"horizontal"]),m=h.computed(()=>GZ({size:e.size,move:e.move,bar:Q.value})),_=h.computed(()=>i.value[Q.value.offset]**2/r.wrapElement[Q.value.scrollSize]/e.ratio/o.value[Q.value.offset]),v=G=>{var z;if(G.stopPropagation(),G.ctrlKey||[1,2].includes(G.button))return;(z=window.getSelection())==null||z.removeAllRanges(),M(G);const J=G.currentTarget;J&&(a.value[Q.value.axis]=J[Q.value.offset]-(G[Q.value.client]-J.getBoundingClientRect()[Q.value.direction]))},b=G=>{if(!o.value||!i.value||!r.wrapElement)return;const z=Math.abs(G.target.getBoundingClientRect()[Q.value.direction]-G[Q.value.client]),J=o.value[Q.value.offset]/2,tt=(z-J)*100*_.value/i.value[Q.value.offset];r.wrapElement[Q.value.scroll]=tt*r.wrapElement[Q.value.scrollSize]/100},M=G=>{G.stopImmediatePropagation(),d=!0,document.addEventListener("mousemove",E),document.addEventListener("mouseup",V),f=document.onselectstart,document.onselectstart=()=>!1},E=G=>{if(!i.value||!o.value||d===!1)return;const z=a.value[Q.value.axis];if(!z)return;const J=(i.value.getBoundingClientRect()[Q.value.direction]-G[Q.value.client])*-1,tt=o.value[Q.value.offset]-z,ot=(J-tt)*100*_.value/i.value[Q.value.offset];r.wrapElement[Q.value.scroll]=ot*r.wrapElement[Q.value.scrollSize]/100},V=()=>{d=!1,a.value[Q.value.axis]=0,document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",V),j(),p&&(s.value=!1)},O=()=>{p=!1,s.value=!!e.size},R=()=>{p=!0,s.value=d};h.onBeforeUnmount(()=>{j(),document.removeEventListener("mouseup",V)});const j=()=>{document.onselectstart!==f&&(document.onselectstart=f)};return s3(h.toRef(r,"scrollbarElement"),"mousemove",O),s3(h.toRef(r,"scrollbarElement"),"mouseleave",R),(G,z)=>(h.openBlock(),h.createBlock(h.Transition,{name:h.unref(n).b("fade"),persisted:""},{default:h.withCtx(()=>[h.withDirectives(h.createElementVNode("div",{ref_key:"instance",ref:i,class:h.normalizeClass([h.unref(n).e("bar"),h.unref(n).is(h.unref(Q).key)]),onMousedown:b},[h.createElementVNode("div",{ref_key:"thumb",ref:o,class:h.normalizeClass(h.unref(n).e("thumb")),style:h.normalizeStyle(h.unref(m)),onMousedown:v},null,38)],34),[[h.vShow,G.always||s.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const qZ=on({always:{type:Boolean,default:!0},width:String,height:String,ratioX:{type:Number,default:1},ratioY:{type:Number,default:1}});var WZ=Hr(h.defineComponent({__name:"bar",props:qZ,setup(t,{expose:e}){const r=t,n=h.ref(0),i=h.ref(0);return e({handleScroll:a=>{if(a){const s=a.offsetHeight-l5,d=a.offsetWidth-l5;i.value=a.scrollTop*100/s*r.ratioY,n.value=a.scrollLeft*100/d*r.ratioX}}}),(a,s)=>(h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createVNode(yw,{move:n.value,ratio:a.ratioX,size:a.width,always:a.always},null,8,["move","ratio","size","always"]),h.createVNode(yw,{move:i.value,ratio:a.ratioY,size:a.height,vertical:"",always:a.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const XZ=on({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:_r([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"]}}),KZ={scroll:({scrollTop:t,scrollLeft:e})=>[t,e].every(X1)},Wf="ElScrollbar",YZ=h.defineComponent({name:Wf}),JZ=h.defineComponent({...YZ,props:XZ,emits:KZ,setup(t,{expose:e,emit:r}){const n=t,i=xr("scrollbar");let o,a;const s=h.ref(),d=h.ref(),p=h.ref(),f=h.ref("0"),Q=h.ref("0"),m=h.ref(),_=h.ref(1),v=h.ref(1),b=h.computed(()=>{const z={};return n.height&&(z.height=ds(n.height)),n.maxHeight&&(z.maxHeight=ds(n.maxHeight)),[n.wrapStyle,z]}),M=h.computed(()=>[n.wrapClass,i.e("wrap"),{[i.em("wrap","hidden-default")]:!n.native}]),E=h.computed(()=>[i.e("view"),n.viewClass]),V=()=>{var z;d.value&&((z=m.value)==null||z.handleScroll(d.value),r("scroll",{scrollTop:d.value.scrollTop,scrollLeft:d.value.scrollLeft}))};function O(z,J){Qi(z)?d.value.scrollTo(z):X1(z)&&X1(J)&&d.value.scrollTo(z,J)}const R=z=>{if(!X1(z)){K1(Wf,"value must be a number");return}d.value.scrollTop=z},j=z=>{if(!X1(z)){K1(Wf,"value must be a number");return}d.value.scrollLeft=z},G=()=>{if(!d.value)return;const z=d.value.offsetHeight-l5,J=d.value.offsetWidth-l5,tt=z**2/d.value.scrollHeight,ot=J**2/d.value.scrollWidth,et=Math.max(tt,n.minSize),Tt=Math.max(ot,n.minSize);_.value=tt/(z-tt)/(et/(z-et)),v.value=ot/(J-ot)/(Tt/(J-Tt)),Q.value=et+l5<z?`${et}px`:"",f.value=Tt+l5<J?`${Tt}px`:""};return h.watch(()=>n.noresize,z=>{z?(o==null||o(),a==null||a()):({stop:o}=os(p,G),a=s3("resize",G))},{immediate:!0}),h.watch(()=>[n.maxHeight,n.height],()=>{n.native||h.nextTick(()=>{var z;G(),d.value&&((z=m.value)==null||z.handleScroll(d.value))})}),h.provide(gw,h.reactive({scrollbarElement:s,wrapElement:d})),h.onMounted(()=>{n.native||h.nextTick(()=>{G()})}),h.onUpdated(()=>G()),e({wrapRef:d,update:G,scrollTo:O,setScrollTop:R,setScrollLeft:j,handleScroll:V}),(z,J)=>(h.openBlock(),h.createElementBlock("div",{ref_key:"scrollbarRef",ref:s,class:h.normalizeClass(h.unref(i).b())},[h.createElementVNode("div",{ref_key:"wrapRef",ref:d,class:h.normalizeClass(h.unref(M)),style:h.normalizeStyle(h.unref(b)),onScroll:V},[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(z.tag),{id:z.id,ref_key:"resizeRef",ref:p,class:h.normalizeClass(h.unref(E)),style:h.normalizeStyle(z.viewStyle),role:z.role,"aria-label":z.ariaLabel,"aria-orientation":z.ariaOrientation},{default:h.withCtx(()=>[h.renderSlot(z.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],38),z.native?h.createCommentVNode("v-if",!0):(h.openBlock(),h.createBlock(WZ,{key:0,ref_key:"barRef",ref:m,height:Q.value,width:f.value,always:z.always,"ratio-x":v.value,"ratio-y":_.value},null,8,["height","width","always","ratio-x","ratio-y"]))],2))}});var t$=Hr(JZ,[["__file","scrollbar.vue"]]);const e$=mi(t$),Xf=Symbol("popper"),_w=Symbol("popperContent"),vw=on({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),r$=h.defineComponent({name:"ElPopper",inheritAttrs:!1}),n$=h.defineComponent({...r$,props:vw,setup(t,{expose:e}){const r=t,n=h.ref(),i=h.ref(),o=h.ref(),a=h.ref(),s=h.computed(()=>r.role),d={triggerRef:n,popperInstanceRef:i,contentRef:o,referenceRef:a,role:s};return e(d),h.provide(Xf,d),(p,f)=>h.renderSlot(p.$slots,"default")}});var i$=Hr(n$,[["__file","popper.vue"]]);const bw=on({arrowOffset:{type:Number,default:5}}),o$=h.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),a$=h.defineComponent({...o$,props:bw,setup(t,{expose:e}){const r=t,n=xr("popper"),{arrowOffset:i,arrowRef:o,arrowStyle:a}=h.inject(_w,void 0);return h.watch(()=>r.arrowOffset,s=>{i.value=s}),h.onBeforeUnmount(()=>{o.value=void 0}),e({arrowRef:o}),(s,d)=>(h.openBlock(),h.createElementBlock("span",{ref_key:"arrowRef",ref:o,class:h.normalizeClass(h.unref(n).e("arrow")),style:h.normalizeStyle(h.unref(a)),"data-popper-arrow":""},null,6))}});var s$=Hr(a$,[["__file","arrow.vue"]]);const Kf="ElOnlyChild",l$=h.defineComponent({name:Kf,setup(t,{slots:e,attrs:r}){var n;const i=h.inject(hw),o=LZ((n=i==null?void 0:i.setForwardRef)!=null?n:as);return()=>{var a;const s=(a=e.default)==null?void 0:a.call(e,r);if(!s)return null;if(s.length>1)return K1(Kf,"requires exact only one valid child."),null;const d=Lw(s);return d?h.withDirectives(h.cloneVNode(d,r),[[o]]):(K1(Kf,"no valid child node found"),null)}}});function Lw(t){if(!t)return null;const e=t;for(const r of e){if(Qi(r))switch(r.type){case h.Comment:continue;case h.Text:case"svg":return xw(r);case h.Fragment:return Lw(r.children);default:return r}return xw(r)}return null}function xw(t){const e=xr("only-child");return h.createVNode("span",{class:e.e("content")},[t])}const ww=on({virtualRef:{type:_r(Object)},virtualTriggering:Boolean,onMouseenter:{type:_r(Function)},onMouseleave:{type:_r(Function)},onClick:{type:_r(Function)},onKeydown:{type:_r(Function)},onFocus:{type:_r(Function)},onBlur:{type:_r(Function)},onContextmenu:{type:_r(Function)},id:String,open:Boolean}),c$=h.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),u$=h.defineComponent({...c$,props:ww,setup(t,{expose:e}){const r=t,{role:n,triggerRef:i}=h.inject(Xf,void 0);bZ(i);const o=h.computed(()=>s.value?r.id:void 0),a=h.computed(()=>{if(n&&n.value==="tooltip")return r.open&&r.id?r.id:void 0}),s=h.computed(()=>{if(n&&n.value!=="tooltip")return n.value}),d=h.computed(()=>s.value?`${r.open}`:void 0);let p;return h.onMounted(()=>{h.watch(()=>r.virtualRef,f=>{f&&(i.value=is(f))},{immediate:!0}),h.watch(i,(f,Q)=>{p==null||p(),p=void 0,pl(f)&&(["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"].forEach(m=>{var _;const v=r[m];v&&(f.addEventListener(m.slice(2).toLowerCase(),v),(_=Q==null?void 0:Q.removeEventListener)==null||_.call(Q,m.slice(2).toLowerCase(),v))}),p=h.watch([o,a,s,d],m=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((_,v)=>{u3(m[v])?f.removeAttribute(_):f.setAttribute(_,m[v])})},{immediate:!0})),pl(Q)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(m=>Q.removeAttribute(m))},{immediate:!0})}),h.onBeforeUnmount(()=>{p==null||p(),p=void 0}),e({triggerRef:i}),(f,Q)=>f.virtualTriggering?h.createCommentVNode("v-if",!0):(h.openBlock(),h.createBlock(h.unref(l$),h.mergeProps({key:0},f.$attrs,{"aria-controls":h.unref(o),"aria-describedby":h.unref(a),"aria-expanded":h.unref(d),"aria-haspopup":h.unref(s)}),{default:h.withCtx(()=>[h.renderSlot(f.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var h$=Hr(u$,[["__file","trigger.vue"]]);const Yf="focus-trap.focus-after-trapped",Jf="focus-trap.focus-after-released",d$="focus-trap.focusout-prevented",Ew={cancelable:!0,bubbles:!1},p$={cancelable:!0,bubbles:!1},Mw="focusAfterTrapped",Hw="focusAfterReleased",Sw=Symbol("elFocusTrap"),tQ=h.ref(),x9=h.ref(0),eQ=h.ref(0);let w9=0;const Cw=t=>{const e=[],r=document.createTreeWalker(t,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();)e.push(r.currentNode);return e},Aw=(t,e)=>{for(const r of t)if(!T$(r,e))return r},T$=(t,e)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1},f$=t=>{const e=Cw(t),r=Aw(e,t),n=Aw(e.reverse(),t);return[r,n]},Q$=t=>t instanceof HTMLInputElement&&"select"in t,m3=(t,e)=>{if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),eQ.value=window.performance.now(),t!==r&&Q$(t)&&e&&t.select()}};function Vw(t,e){const r=[...t],n=t.indexOf(e);return n!==-1&&r.splice(n,1),r}const m$=()=>{let t=[];return{push:n=>{const i=t[0];i&&n!==i&&i.pause(),t=Vw(t,n),t.unshift(n)},remove:n=>{var i,o;t=Vw(t,n),(o=(i=t[0])==null?void 0:i.resume)==null||o.call(i)}}},g$=(t,e=!1)=>{const r=document.activeElement;for(const n of t)if(m3(n,e),document.activeElement!==r)return},Ow=m$(),y$=()=>x9.value>eQ.value,E9=()=>{tQ.value="pointer",x9.value=window.performance.now()},kw=()=>{tQ.value="keyboard",x9.value=window.performance.now()},_$=()=>(h.onMounted(()=>{w9===0&&(document.addEventListener("mousedown",E9),document.addEventListener("touchstart",E9),document.addEventListener("keydown",kw)),w9++}),h.onBeforeUnmount(()=>{w9--,w9<=0&&(document.removeEventListener("mousedown",E9),document.removeEventListener("touchstart",E9),document.removeEventListener("keydown",kw))}),{focusReason:tQ,lastUserFocusTimestamp:x9,lastAutomatedFocusTimestamp:eQ}),M9=t=>new CustomEvent(d$,{...p$,detail:t}),v$=h.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Mw,Hw,"focusin","focusout","focusout-prevented","release-requested"],setup(t,{emit:e}){const r=h.ref();let n,i;const{focusReason:o}=_$();mZ(v=>{t.trapped&&!a.paused&&e("release-requested",v)});const a={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},s=v=>{if(!t.loop&&!t.trapped||a.paused)return;const{key:b,altKey:M,ctrlKey:E,metaKey:V,currentTarget:O,shiftKey:R}=v,{loop:j}=t,G=b===Xi.tab&&!M&&!E&&!V,z=document.activeElement;if(G&&z){const J=O,[tt,ot]=f$(J);if(tt&&ot){if(!R&&z===ot){const Tt=M9({focusReason:o.value});e("focusout-prevented",Tt),Tt.defaultPrevented||(v.preventDefault(),j&&m3(tt,!0))}else if(R&&[tt,J].includes(z)){const Tt=M9({focusReason:o.value});e("focusout-prevented",Tt),Tt.defaultPrevented||(v.preventDefault(),j&&m3(ot,!0))}}else if(z===J){const Tt=M9({focusReason:o.value});e("focusout-prevented",Tt),Tt.defaultPrevented||v.preventDefault()}}};h.provide(Sw,{focusTrapRef:r,onKeydown:s}),h.watch(()=>t.focusTrapEl,v=>{v&&(r.value=v)},{immediate:!0}),h.watch([r],([v],[b])=>{v&&(v.addEventListener("keydown",s),v.addEventListener("focusin",f),v.addEventListener("focusout",Q)),b&&(b.removeEventListener("keydown",s),b.removeEventListener("focusin",f),b.removeEventListener("focusout",Q))});const d=v=>{e(Mw,v)},p=v=>e(Hw,v),f=v=>{const b=h.unref(r);if(!b)return;const M=v.target,E=v.relatedTarget,V=M&&b.contains(M);t.trapped||E&&b.contains(E)||(n=E),V&&e("focusin",v),!a.paused&&t.trapped&&(V?i=M:m3(i,!0))},Q=v=>{const b=h.unref(r);if(!(a.paused||!b))if(t.trapped){const M=v.relatedTarget;!u3(M)&&!b.contains(M)&&setTimeout(()=>{if(!a.paused&&t.trapped){const E=M9({focusReason:o.value});e("focusout-prevented",E),E.defaultPrevented||m3(i,!0)}},0)}else{const M=v.target;M&&b.contains(M)||e("focusout",v)}};async function m(){await h.nextTick();const v=h.unref(r);if(v){Ow.push(a);const b=v.contains(document.activeElement)?n:document.activeElement;if(n=b,!v.contains(b)){const E=new Event(Yf,Ew);v.addEventListener(Yf,d),v.dispatchEvent(E),E.defaultPrevented||h.nextTick(()=>{let V=t.focusStartEl;W1(V)||(m3(V),document.activeElement!==V&&(V="first")),V==="first"&&g$(Cw(v),!0),(document.activeElement===b||V==="container")&&m3(v)})}}}function _(){const v=h.unref(r);if(v){v.removeEventListener(Yf,d);const b=new CustomEvent(Jf,{...Ew,detail:{focusReason:o.value}});v.addEventListener(Jf,p),v.dispatchEvent(b),!b.defaultPrevented&&(o.value=="keyboard"||!y$()||v.contains(document.activeElement))&&m3(n??document.body),v.removeEventListener(Jf,p),Ow.remove(a)}}return h.onMounted(()=>{t.trapped&&m(),h.watch(()=>t.trapped,v=>{v?m():_()})}),h.onBeforeUnmount(()=>{t.trapped&&_()}),{onKeydown:s}}});function b$(t,e,r,n,i,o){return h.renderSlot(t.$slots,"default",{handleKeydown:t.onKeydown})}var Pw=Hr(v$,[["render",b$],["__file","focus-trap.vue"]]);const L$=["fixed","absolute"],x$=on({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:_r(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:Q9,default:"bottom"},popperOptions:{type:_r(Object),default:()=>({})},strategy:{type:String,values:L$,default:"absolute"}}),Iw=on({...x$,id:String,style:{type:_r([String,Array,Object])},className:{type:_r([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:_r([String,Array,Object])},popperStyle:{type:_r([String,Array,Object])},referenceEl:{type:_r(Object)},triggerTargetEl:{type:_r(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},ariaLabel:{type:String,default:void 0},virtualTriggering:Boolean,zIndex:Number}),w$={mouseenter:t=>t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},E$=(t,e=[])=>{const{placement:r,strategy:n,popperOptions:i}=t,o={placement:r,strategy:n,...i,modifiers:[...H$(t),...e]};return S$(o,i==null?void 0:i.modifiers),o},M$=t=>{if(T1)return is(t)};function H$(t){const{offset:e,gpuAcceleration:r,fallbackPlacements:n}=t;return[{name:"offset",options:{offset:[0,e??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 S$(t,e){e&&(t.modifiers=[...t.modifiers,...e??[]])}const C$=0,A$=t=>{const{popperInstanceRef:e,contentRef:r,triggerRef:n,role:i}=h.inject(Xf,void 0),o=h.ref(),a=h.ref(),s=h.computed(()=>({name:"eventListeners",enabled:!!t.visible})),d=h.computed(()=>{var E;const V=h.unref(o),O=(E=h.unref(a))!=null?E:C$;return{name:"arrow",enabled:!Qx(V),options:{element:V,padding:O}}}),p=h.computed(()=>({onFirstUpdate:()=>{v()},...E$(t,[h.unref(d),h.unref(s)])})),f=h.computed(()=>M$(t.referenceEl)||h.unref(n)),{attributes:Q,state:m,styles:_,update:v,forceUpdate:b,instanceRef:M}=TZ(f,r,p);return h.watch(M,E=>e.value=E),h.onMounted(()=>{h.watch(()=>{var E;return(E=h.unref(f))==null?void 0:E.getBoundingClientRect()},()=>{v()})}),{attributes:Q,arrowRef:o,contentRef:r,instanceRef:M,state:m,styles:_,role:i,forceUpdate:b,update:v}},V$=(t,{attributes:e,styles:r,role:n})=>{const{nextZIndex:i}=Zf(),o=xr("popper"),a=h.computed(()=>h.unref(e).popper),s=h.ref(X1(t.zIndex)?t.zIndex:i()),d=h.computed(()=>[o.b(),o.is("pure",t.pure),o.is(t.effect),t.popperClass]),p=h.computed(()=>[{zIndex:h.unref(s)},h.unref(r).popper,t.popperStyle||{}]),f=h.computed(()=>n.value==="dialog"?"false":void 0),Q=h.computed(()=>h.unref(r).arrow||{});return{ariaModal:f,arrowStyle:Q,contentAttrs:a,contentClass:d,contentStyle:p,contentZIndex:s,updateZIndex:()=>{s.value=X1(t.zIndex)?t.zIndex:i()}}},O$=(t,e)=>{const r=h.ref(!1),n=h.ref();return{focusStartRef:n,trapped:r,onFocusAfterReleased:p=>{var f;((f=p.detail)==null?void 0:f.focusReason)!=="pointer"&&(n.value="first",e("blur"))},onFocusAfterTrapped:()=>{e("focus")},onFocusInTrap:p=>{t.visible&&!r.value&&(p.target&&(n.value=p.target),r.value=!0)},onFocusoutPrevented:p=>{t.trapping||(p.detail.focusReason==="pointer"&&p.preventDefault(),r.value=!1)},onReleaseRequested:()=>{r.value=!1,e("close")}}},k$=h.defineComponent({name:"ElPopperContent"}),P$=h.defineComponent({...k$,props:Iw,emits:w$,setup(t,{expose:e,emit:r}){const n=t,{focusStartRef:i,trapped:o,onFocusAfterReleased:a,onFocusAfterTrapped:s,onFocusInTrap:d,onFocusoutPrevented:p,onReleaseRequested:f}=O$(n,r),{attributes:Q,arrowRef:m,contentRef:_,styles:v,instanceRef:b,role:M,update:E}=A$(n),{ariaModal:V,arrowStyle:O,contentAttrs:R,contentClass:j,contentStyle:G,updateZIndex:z}=V$(n,{styles:v,attributes:Q,role:M}),J=h.inject(xl,void 0),tt=h.ref();h.provide(_w,{arrowStyle:O,arrowRef:m,arrowOffset:tt}),J&&(J.addInputId||J.removeInputId)&&h.provide(xl,{...J,addInputId:as,removeInputId:as});let ot;const et=(At=!0)=>{E(),At&&z()},Tt=()=>{et(!1),n.visible&&n.focusOnShow?o.value=!0:n.visible===!1&&(o.value=!1)};return h.onMounted(()=>{h.watch(()=>n.triggerTargetEl,(At,Ut)=>{ot==null||ot(),ot=void 0;const ee=h.unref(At||_.value),ue=h.unref(Ut||_.value);pl(ee)&&(ot=h.watch([M,()=>n.ariaLabel,V,()=>n.id],Ft=>{["role","aria-label","aria-modal","id"].forEach((pe,lr)=>{u3(Ft[lr])?ee.removeAttribute(pe):ee.setAttribute(pe,Ft[lr])})},{immediate:!0})),ue!==ee&&pl(ue)&&["role","aria-label","aria-modal","id"].forEach(Ft=>{ue.removeAttribute(Ft)})},{immediate:!0}),h.watch(()=>n.visible,Tt,{immediate:!0})}),h.onBeforeUnmount(()=>{ot==null||ot(),ot=void 0}),e({popperContentRef:_,popperInstanceRef:b,updatePopper:et,contentStyle:G}),(At,Ut)=>(h.openBlock(),h.createElementBlock("div",h.mergeProps({ref_key:"contentRef",ref:_},h.unref(R),{style:h.unref(G),class:h.unref(j),tabindex:"-1",onMouseenter:Ut[0]||(Ut[0]=ee=>At.$emit("mouseenter",ee)),onMouseleave:Ut[1]||(Ut[1]=ee=>At.$emit("mouseleave",ee))}),[h.createVNode(h.unref(Pw),{trapped:h.unref(o),"trap-on-focus-in":!0,"focus-trap-el":h.unref(_),"focus-start-el":h.unref(i),onFocusAfterTrapped:h.unref(s),onFocusAfterReleased:h.unref(a),onFocusin:h.unref(d),onFocusoutPrevented:h.unref(p),onReleaseRequested:h.unref(f)},{default:h.withCtx(()=>[h.renderSlot(At.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}});var I$=Hr(P$,[["__file","content.vue"]]);const R$=mi(i$),rQ=Symbol("elTooltip"),Oo=on({..._Z,...Iw,appendTo:{type:_r([String,Object])},content:{type:String,default:""},rawContent:{type:Boolean,default:!1},persistent:Boolean,ariaLabel:String,visible:{type:_r(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean}),wl=on({...ww,disabled:Boolean,trigger:{type:_r([String,Array]),default:"hover"},triggerKeys:{type:_r(Array),default:()=>[Xi.enter,Xi.space]}}),{useModelToggleProps:N$,useModelToggleEmits:B$,useModelToggle:D$}=Rx("visible"),F$=on({...vw,...N$,...Oo,...wl,...bw,showArrow:{type:Boolean,default:!0}}),j$=[...B$,"before-show","before-hide","show","hide","open","close"],z$=(t,e)=>Vi(t)?t.includes(e):t===e,c5=(t,e,r)=>n=>{z$(h.unref(t),e)&&r(n)},U$=h.defineComponent({name:"ElTooltipTrigger"}),G$=h.defineComponent({...U$,props:wl,setup(t,{expose:e}){const r=t,n=xr("tooltip"),{controlled:i,id:o,open:a,onOpen:s,onClose:d,onToggle:p}=h.inject(rQ,void 0),f=h.ref(null),Q=()=>{if(h.unref(i)||r.disabled)return!0},m=h.toRef(r,"trigger"),_=ns(Q,c5(m,"hover",s)),v=ns(Q,c5(m,"hover",d)),b=ns(Q,c5(m,"click",R=>{R.button===0&&p(R)})),M=ns(Q,c5(m,"focus",s)),E=ns(Q,c5(m,"focus",d)),V=ns(Q,c5(m,"contextmenu",R=>{R.preventDefault(),p(R)})),O=ns(Q,R=>{const{code:j}=R;r.triggerKeys.includes(j)&&(R.preventDefault(),p(R))});return e({triggerRef:f}),(R,j)=>(h.openBlock(),h.createBlock(h.unref(h$),{id:h.unref(o),"virtual-ref":R.virtualRef,open:h.unref(a),"virtual-triggering":R.virtualTriggering,class:h.normalizeClass(h.unref(n).e("trigger")),onBlur:h.unref(E),onClick:h.unref(b),onContextmenu:h.unref(V),onFocus:h.unref(M),onMouseenter:h.unref(_),onMouseleave:h.unref(v),onKeydown:h.unref(O)},{default:h.withCtx(()=>[h.renderSlot(R.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var Z$=Hr(G$,[["__file","trigger.vue"]]);const $$=h.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),q$=h.defineComponent({...$$,props:Oo,setup(t,{expose:e}){const r=t,{selector:n}=uw(),i=xr("tooltip"),o=h.ref(null),a=h.ref(!1),{controlled:s,id:d,open:p,trigger:f,onClose:Q,onOpen:m,onShow:_,onHide:v,onBeforeShow:b,onBeforeHide:M}=h.inject(rQ,void 0),E=h.computed(()=>r.transition||`${i.namespace.value}-fade-in-linear`),V=h.computed(()=>process.env.NODE_ENV==="test"?!0:r.persistent);h.onBeforeUnmount(()=>{a.value=!0});const O=h.computed(()=>h.unref(V)?!0:h.unref(p)),R=h.computed(()=>r.disabled?!1:h.unref(p)),j=h.computed(()=>r.appendTo||n.value),G=h.computed(()=>{var Ft;return(Ft=r.style)!=null?Ft:{}}),z=h.computed(()=>!h.unref(p)),J=()=>{v()},tt=()=>{if(h.unref(s))return!0},ot=ns(tt,()=>{r.enterable&&h.unref(f)==="hover"&&m()}),et=ns(tt,()=>{h.unref(f)==="hover"&&Q()}),Tt=()=>{var Ft,pe;(pe=(Ft=o.value)==null?void 0:Ft.updatePopper)==null||pe.call(Ft),b==null||b()},At=()=>{M==null||M()},Ut=()=>{_(),ue=XB(h.computed(()=>{var Ft;return(Ft=o.value)==null?void 0:Ft.popperContentRef}),()=>{if(h.unref(s))return;h.unref(f)!=="hover"&&Q()})},ee=()=>{r.virtualTriggering||Q()};let ue;return h.watch(()=>h.unref(p),Ft=>{Ft||ue==null||ue()},{flush:"post"}),h.watch(()=>r.content,()=>{var Ft,pe;(pe=(Ft=o.value)==null?void 0:Ft.updatePopper)==null||pe.call(Ft)}),e({contentRef:o}),(Ft,pe)=>(h.openBlock(),h.createBlock(h.Teleport,{disabled:!Ft.teleported,to:h.unref(j)},[h.createVNode(h.Transition,{name:h.unref(E),onAfterLeave:J,onBeforeEnter:Tt,onAfterEnter:Ut,onBeforeLeave:At},{default:h.withCtx(()=>[h.unref(O)?h.withDirectives((h.openBlock(),h.createBlock(h.unref(I$),h.mergeProps({key:0,id:h.unref(d),ref_key:"contentRef",ref:o},Ft.$attrs,{"aria-label":Ft.ariaLabel,"aria-hidden":h.unref(z),"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,h.unref(G)],"reference-el":Ft.referenceEl,"trigger-target-el":Ft.triggerTargetEl,visible:h.unref(R),"z-index":Ft.zIndex,onMouseenter:h.unref(ot),onMouseleave:h.unref(et),onBlur:ee,onClose:h.unref(Q)}),{default:h.withCtx(()=>[a.value?h.createCommentVNode("v-if",!0):h.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"])),[[h.vShow,h.unref(R)]]):h.createCommentVNode("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"]))}});var W$=Hr(q$,[["__file","content.vue"]]);const X$=["innerHTML"],K$={key:1},Y$=h.defineComponent({name:"ElTooltip"}),J$=h.defineComponent({...Y$,props:F$,emits:j$,setup(t,{expose:e,emit:r}){const n=t;yZ();const i=C4(),o=h.ref(),a=h.ref(),s=()=>{var E;const V=h.unref(o);V&&((E=V.popperInstanceRef)==null||E.update())},d=h.ref(!1),p=h.ref(),{show:f,hide:Q,hasUpdateHandler:m}=D$({indicator:d,toggleReason:p}),{onOpen:_,onClose:v}=vZ({showAfter:h.toRef(n,"showAfter"),hideAfter:h.toRef(n,"hideAfter"),autoClose:h.toRef(n,"autoClose"),open:f,close:Q}),b=h.computed(()=>hs(n.visible)&&!m.value);h.provide(rQ,{controlled:b,id:i,open:h.readonly(d),trigger:h.toRef(n,"trigger"),onOpen:E=>{_(E)},onClose:E=>{v(E)},onToggle:E=>{h.unref(d)?v(E):_(E)},onShow:()=>{r("show",p.value)},onHide:()=>{r("hide",p.value)},onBeforeShow:()=>{r("before-show",p.value)},onBeforeHide:()=>{r("before-hide",p.value)},updatePopper:s}),h.watch(()=>n.disabled,E=>{E&&d.value&&(d.value=!1)});const M=E=>{var V,O;const R=(O=(V=a.value)==null?void 0:V.contentRef)==null?void 0:O.popperContentRef,j=(E==null?void 0:E.relatedTarget)||document.activeElement;return R&&R.contains(j)};return h.onDeactivated(()=>d.value&&Q()),e({popperRef:o,contentRef:a,isFocusInsideContent:M,updatePopper:s,onOpen:_,onClose:v,hide:Q}),(E,V)=>(h.openBlock(),h.createBlock(h.unref(R$),{ref_key:"popperRef",ref:o,role:E.role},{default:h.withCtx(()=>[h.createVNode(Z$,{disabled:E.disabled,trigger:E.trigger,"trigger-keys":E.triggerKeys,"virtual-ref":E.virtualRef,"virtual-triggering":E.virtualTriggering},{default:h.withCtx(()=>[E.$slots.default?h.renderSlot(E.$slots,"default",{key:0}):h.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),h.createVNode(W$,{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:h.withCtx(()=>[h.renderSlot(E.$slots,"content",{},()=>[E.rawContent?(h.openBlock(),h.createElementBlock("span",{key:0,innerHTML:E.content},null,8,X$)):(h.openBlock(),h.createElementBlock("span",K$,h.toDisplayString(E.content),1))]),E.showArrow?(h.openBlock(),h.createBlock(h.unref(s$),{key:0,"arrow-offset":E.arrowOffset},null,8,["arrow-offset"])):h.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 tq=Hr(J$,[["__file","tooltip.vue"]]);const nQ=mi(tq),Rw=Symbol("buttonGroupContextKey"),eq=(t,e)=>{Af({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},h.computed(()=>t.type==="text"));const r=h.inject(Rw,void 0),n=b9("button"),{form:i}=Q3(),o=f3(h.computed(()=>r==null?void 0:r.size)),a=a5(),s=h.ref(),d=h.useSlots(),p=h.computed(()=>t.type||(r==null?void 0:r.type)||""),f=h.computed(()=>{var v,b,M;return(M=(b=t.autoInsertSpace)!=null?b:(v=n.value)==null?void 0:v.autoInsertSpace)!=null?M:!1}),Q=h.computed(()=>t.tag==="button"?{ariaDisabled:a.value||t.loading,disabled:a.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),m=h.computed(()=>{var v;const b=(v=d.default)==null?void 0:v.call(d);if(f.value&&(b==null?void 0:b.length)===1){const M=b[0];if((M==null?void 0:M.type)===h.Text){const E=M.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(E.trim())}}return!1});return{_disabled:a,_size:o,_type:p,_ref:s,_props:Q,shouldAddSpace:m,handleClick:v=>{t.nativeType==="reset"&&(i==null||i.resetFields()),e("click",v)}}},iQ=on({size:T3,disabled:Boolean,type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:ps},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:ps,default:()=>Cf},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:_r([String,Object]),default:"button"}}),rq={click:t=>t instanceof MouseEvent};function gi(t,e){nq(t)&&(t="100%");var r=iq(t);return t=e===360?t:Math.min(e,Math.max(0,parseFloat(t))),r&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:(e===360?t=(t<0?t%e+e:t%e)/parseFloat(String(e)):t=t%e/parseFloat(String(e)),t)}function H9(t){return Math.min(1,Math.max(0,t))}function nq(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function iq(t){return typeof t=="string"&&t.indexOf("%")!==-1}function Nw(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function S9(t){return t<=1?"".concat(Number(t)*100,"%"):t}function A4(t){return t.length===1?"0"+t:String(t)}function oq(t,e,r){return{r:gi(t,255)*255,g:gi(e,255)*255,b:gi(r,255)*255}}function Bw(t,e,r){t=gi(t,255),e=gi(e,255),r=gi(r,255);var n=Math.max(t,e,r),i=Math.min(t,e,r),o=0,a=0,s=(n+i)/2;if(n===i)a=0,o=0;else{var d=n-i;switch(a=s>.5?d/(2-n-i):d/(n+i),n){case t:o=(e-r)/d+(e<r?6:0);break;case e:o=(r-t)/d+2;break;case r:o=(t-e)/d+4;break}o/=6}return{h:o,s:a,l:s}}function oQ(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*(6*r):r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function aq(t,e,r){var n,i,o;if(t=gi(t,360),e=gi(e,100),r=gi(r,100),e===0)i=r,o=r,n=r;else{var a=r<.5?r*(1+e):r+e-r*e,s=2*r-a;n=oQ(s,a,t+1/3),i=oQ(s,a,t),o=oQ(s,a,t-1/3)}return{r:n*255,g:i*255,b:o*255}}function Dw(t,e,r){t=gi(t,255),e=gi(e,255),r=gi(r,255);var n=Math.max(t,e,r),i=Math.min(t,e,r),o=0,a=n,s=n-i,d=n===0?0:s/n;if(n===i)o=0;else{switch(n){case t:o=(e-r)/s+(e<r?6:0);break;case e:o=(r-t)/s+2;break;case r:o=(t-e)/s+4;break}o/=6}return{h:o,s:d,v:a}}function sq(t,e,r){t=gi(t,360)*6,e=gi(e,100),r=gi(r,100);var n=Math.floor(t),i=t-n,o=r*(1-e),a=r*(1-i*e),s=r*(1-(1-i)*e),d=n%6,p=[r,a,o,o,s,r][d],f=[s,r,r,a,o,o][d],Q=[o,o,s,r,r,a][d];return{r:p*255,g:f*255,b:Q*255}}function Fw(t,e,r,n){var i=[A4(Math.round(t).toString(16)),A4(Math.round(e).toString(16)),A4(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 lq(t,e,r,n,i){var o=[A4(Math.round(t).toString(16)),A4(Math.round(e).toString(16)),A4(Math.round(r).toString(16)),A4(cq(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 cq(t){return Math.round(parseFloat(t)*255).toString(16)}function jw(t){return ko(t)/255}function ko(t){return parseInt(t,16)}function uq(t){return{r:t>>16,g:(t&65280)>>8,b:t&255}}var aQ={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 hq(t){var e={r:0,g:0,b:0},r=1,n=null,i=null,o=null,a=!1,s=!1;return typeof t=="string"&&(t=Tq(t)),typeof t=="object"&&(fs(t.r)&&fs(t.g)&&fs(t.b)?(e=oq(t.r,t.g,t.b),a=!0,s=String(t.r).substr(-1)==="%"?"prgb":"rgb"):fs(t.h)&&fs(t.s)&&fs(t.v)?(n=S9(t.s),i=S9(t.v),e=sq(t.h,n,i),a=!0,s="hsv"):fs(t.h)&&fs(t.s)&&fs(t.l)&&(n=S9(t.s),o=S9(t.l),e=aq(t.h,n,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(r=t.a)),r=Nw(r),{ok:a,format:t.format||s,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:r}}var dq="[-\\+]?\\d+%?",pq="[-\\+]?\\d*\\.\\d+%?",g3="(?:".concat(pq,")|(?:").concat(dq,")"),sQ="[\\s|\\(]+(".concat(g3,")[,|\\s]+(").concat(g3,")[,|\\s]+(").concat(g3,")\\s*\\)?"),lQ="[\\s|\\(]+(".concat(g3,")[,|\\s]+(").concat(g3,")[,|\\s]+(").concat(g3,")[,|\\s]+(").concat(g3,")\\s*\\)?"),k2={CSS_UNIT:new RegExp(g3),rgb:new RegExp("rgb"+sQ),rgba:new RegExp("rgba"+lQ),hsl:new RegExp("hsl"+sQ),hsla:new RegExp("hsla"+lQ),hsv:new RegExp("hsv"+sQ),hsva:new RegExp("hsva"+lQ),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 Tq(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if(aQ[t])t=aQ[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=k2.rgb.exec(t);return r?{r:r[1],g:r[2],b:r[3]}:(r=k2.rgba.exec(t),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=k2.hsl.exec(t),r?{h:r[1],s:r[2],l:r[3]}:(r=k2.hsla.exec(t),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=k2.hsv.exec(t),r?{h:r[1],s:r[2],v:r[3]}:(r=k2.hsva.exec(t),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=k2.hex8.exec(t),r?{r:ko(r[1]),g:ko(r[2]),b:ko(r[3]),a:jw(r[4]),format:e?"name":"hex8"}:(r=k2.hex6.exec(t),r?{r:ko(r[1]),g:ko(r[2]),b:ko(r[3]),format:e?"name":"hex"}:(r=k2.hex4.exec(t),r?{r:ko(r[1]+r[1]),g:ko(r[2]+r[2]),b:ko(r[3]+r[3]),a:jw(r[4]+r[4]),format:e?"name":"hex8"}:(r=k2.hex3.exec(t),r?{r:ko(r[1]+r[1]),g:ko(r[2]+r[2]),b:ko(r[3]+r[3]),format:e?"name":"hex"}:!1)))))))))}function fs(t){return!!k2.CSS_UNIT.exec(String(t))}var fq=function(){function t(e,r){e===void 0&&(e=""),r===void 0&&(r={});var n;if(e instanceof t)return e;typeof e=="number"&&(e=uq(e)),this.originalInput=e;var i=hq(e);this.originalInput=e,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 t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},t.prototype.getLuminance=function(){var e=this.toRgb(),r,n,i,o=e.r/255,a=e.g/255,s=e.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},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(e){return this.a=Nw(e),this.roundA=Math.round(100*this.a)/100,this},t.prototype.isMonochrome=function(){var e=this.toHsl().s;return e===0},t.prototype.toHsv=function(){var e=Dw(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},t.prototype.toHsvString=function(){var e=Dw(this.r,this.g,this.b),r=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var e=Bw(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},t.prototype.toHslString=function(){var e=Bw(this.r,this.g,this.b),r=Math.round(e.h*360),n=Math.round(e.s*100),i=Math.round(e.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(e){return e===void 0&&(e=!1),Fw(this.r,this.g,this.b,e)},t.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},t.prototype.toHex8=function(e){return e===void 0&&(e=!1),lq(this.r,this.g,this.b,this.a,e)},t.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},t.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var e=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(r,", ").concat(n,")"):"rgba(".concat(e,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var e=function(r){return"".concat(Math.round(gi(r,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var e=function(r){return Math.round(gi(r,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+Fw(this.r,this.g,this.b,!1),r=0,n=Object.entries(aQ);r<n.length;r++){var i=n[r],o=i[0],a=i[1];if(e===a)return o}return!1},t.prototype.toString=function(e){var r=!!e;e=e??this.format;var n=!1,i=this.a<1&&this.a>=0,o=!r&&i&&(e.startsWith("hex")||e==="name");return o?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(n=this.toRgbString()),e==="prgb"&&(n=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(n=this.toHexString()),e==="hex3"&&(n=this.toHexString(!0)),e==="hex4"&&(n=this.toHex8String(!0)),e==="hex8"&&(n=this.toHex8String()),e==="name"&&(n=this.toName()),e==="hsl"&&(n=this.toHslString()),e==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.l+=e/100,r.l=H9(r.l),new t(r)},t.prototype.brighten=function(e){e===void 0&&(e=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(e/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(e/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(e/100)))),new t(r)},t.prototype.darken=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.l-=e/100,r.l=H9(r.l),new t(r)},t.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},t.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},t.prototype.desaturate=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.s-=e/100,r.s=H9(r.s),new t(r)},t.prototype.saturate=function(e){e===void 0&&(e=10);var r=this.toHsl();return r.s+=e/100,r.s=H9(r.s),new t(r)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var r=this.toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,new t(r)},t.prototype.mix=function(e,r){r===void 0&&(r=50);var n=this.toRgb(),i=new t(e).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 t(a)},t.prototype.analogous=function(e,r){e===void 0&&(e=6),r===void 0&&(r=30);var n=this.toHsl(),i=360/r,o=[this];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,o.push(new t(n));return o},t.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new t(e)},t.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var r=this.toHsv(),n=r.h,i=r.s,o=r.v,a=[],s=1/e;e--;)a.push(new t({h:n,s:i,v:o})),o=(o+s)%1;return a},t.prototype.splitcomplement=function(){var e=this.toHsl(),r=e.h;return[this,new t({h:(r+72)%360,s:e.s,l:e.l}),new t({h:(r+216)%360,s:e.s,l:e.l})]},t.prototype.onBackground=function(e){var r=this.toRgb(),n=new t(e).toRgb(),i=r.a+n.a*(1-r.a);return new t({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})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(e){for(var r=this.toHsl(),n=r.h,i=[this],o=360/e,a=1;a<e;a++)i.push(new t({h:(n+a*o)%360,s:r.s,l:r.l}));return i},t.prototype.equals=function(e){return this.toRgbString()===new t(e).toRgbString()},t}();function y3(t,e=20){return t.mix("#141414",e).toString()}function Qq(t){const e=a5(),r=xr("button");return h.computed(()=>{let n={};const i=t.color;if(i){const o=new fq(i),a=t.dark?o.tint(20).toString():y3(o,20);if(t.plain)n=r.cssVarBlock({"bg-color":t.dark?y3(o,90):o.tint(90).toString(),"text-color":i,"border-color":t.dark?y3(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}),e.value&&(n[r.cssVarBlockName("disabled-bg-color")]=t.dark?y3(o,90):o.tint(90).toString(),n[r.cssVarBlockName("disabled-text-color")]=t.dark?y3(o,50):o.tint(50).toString(),n[r.cssVarBlockName("disabled-border-color")]=t.dark?y3(o,80):o.tint(80).toString());else{const s=t.dark?y3(o,30):o.tint(30).toString(),d=o.isDark()?`var(${r.cssVarName("color-white")})`:`var(${r.cssVarName("color-black")})`;if(n=r.cssVarBlock({"bg-color":i,"text-color":d,"border-color":i,"hover-bg-color":s,"hover-text-color":d,"hover-border-color":s,"active-bg-color":a,"active-border-color":a}),e.value){const p=t.dark?y3(o,50):o.tint(50).toString();n[r.cssVarBlockName("disabled-bg-color")]=p,n[r.cssVarBlockName("disabled-text-color")]=t.dark?"rgba(255, 255, 255, 0.5)":`var(${r.cssVarName("color-white")})`,n[r.cssVarBlockName("disabled-border-color")]=p}}}return n})}const mq=h.defineComponent({name:"ElButton"}),gq=h.defineComponent({...mq,props:iQ,emits:rq,setup(t,{expose:e,emit:r}){const n=t,i=Qq(n),o=xr("button"),{_ref:a,_size:s,_type:d,_disabled:p,_props:f,shouldAddSpace:Q,handleClick:m}=eq(n,r);return e({ref:a,size:s,type:d,disabled:p,shouldAddSpace:Q}),(_,v)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(_.tag),h.mergeProps({ref_key:"_ref",ref:a},h.unref(f),{class:[h.unref(o).b(),h.unref(o).m(h.unref(d)),h.unref(o).m(h.unref(s)),h.unref(o).is("disabled",h.unref(p)),h.unref(o).is("loading",_.loading),h.unref(o).is("plain",_.plain),h.unref(o).is("round",_.round),h.unref(o).is("circle",_.circle),h.unref(o).is("text",_.text),h.unref(o).is("link",_.link),h.unref(o).is("has-bg",_.bg)],style:h.unref(i),onClick:h.unref(m)}),{default:h.withCtx(()=>[_.loading?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[_.$slots.loading?h.renderSlot(_.$slots,"loading",{key:0}):(h.openBlock(),h.createBlock(h.unref(F1),{key:1,class:h.normalizeClass(h.unref(o).is("loading"))},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(_.loadingIcon)))]),_:1},8,["class"]))],64)):_.icon||_.$slots.icon?(h.openBlock(),h.createBlock(h.unref(F1),{key:1},{default:h.withCtx(()=>[_.icon?(h.openBlock(),h.createBlock(h.resolveDynamicComponent(_.icon),{key:0})):h.renderSlot(_.$slots,"icon",{key:1})]),_:3})):h.createCommentVNode("v-if",!0),_.$slots.default?(h.openBlock(),h.createElementBlock("span",{key:2,class:h.normalizeClass({[h.unref(o).em("text","expand")]:h.unref(Q)})},[h.renderSlot(_.$slots,"default")],2)):h.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var yq=Hr(gq,[["__file","button.vue"]]);const _q={size:iQ.size,type:iQ.type},vq=h.defineComponent({name:"ElButtonGroup"}),bq=h.defineComponent({...vq,props:_q,setup(t){const e=t;h.provide(Rw,h.reactive({size:h.toRef(e,"size"),type:h.toRef(e,"type")}));const r=xr("button");return(n,i)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(`${h.unref(r).b("group")}`)},[h.renderSlot(n.$slots,"default")],2))}});var zw=Hr(bq,[["__file","button-group.vue"]]);const Qo=mi(yq,{ButtonGroup:zw}),Uw=A2(zw);var Lq=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xq(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}const _3=new Map;let Gw;T1&&(document.addEventListener("mousedown",t=>Gw=t),document.addEventListener("mouseup",t=>{for(const e of _3.values())for(const{documentHandler:r}of e)r(t,Gw)}));function Zw(t,e){let r=[];return Array.isArray(e.arg)?r=e.arg:pl(e.arg)&&r.push(e.arg),function(n,i){const o=e.instance.popperRef,a=n.target,s=i==null?void 0:i.target,d=!e||!e.instance,p=!a||!s,f=t.contains(a)||t.contains(s),Q=t===a,m=r.length&&r.some(v=>v==null?void 0:v.contains(a))||r.length&&r.includes(s),_=o&&(o.contains(a)||o.contains(s));d||p||f||Q||m||_||e.value(n,i)}}const $w={beforeMount(t,e){_3.has(t)||_3.set(t,[]),_3.get(t).push({documentHandler:Zw(t,e),bindingFn:e.value})},updated(t,e){_3.has(t)||_3.set(t,[]);const r=_3.get(t),n=r.findIndex(o=>o.bindingFn===e.oldValue),i={documentHandler:Zw(t,e),bindingFn:e.value};n>=0?r.splice(n,1,i):r.push(i)},unmounted(t){_3.delete(t)}},wq=on({header:{type:String,default:""},footer:{type:String,default:""},bodyStyle:{type:_r([String,Object,Array]),default:""},bodyClass:String,shadow:{type:String,values:["always","hover","never"],default:"always"}}),Eq=h.defineComponent({name:"ElCard"}),Mq=h.defineComponent({...Eq,props:wq,setup(t){const e=xr("card");return(r,n)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass([h.unref(e).b(),h.unref(e).is(`${r.shadow}-shadow`)])},[r.$slots.header||r.header?(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(h.unref(e).e("header"))},[h.renderSlot(r.$slots,"header",{},()=>[h.createTextVNode(h.toDisplayString(r.header),1)])],2)):h.createCommentVNode("v-if",!0),h.createElementVNode("div",{class:h.normalizeClass([h.unref(e).e("body"),r.bodyClass]),style:h.normalizeStyle(r.bodyStyle)},[h.renderSlot(r.$slots,"default")],6),r.$slots.footer||r.footer?(h.openBlock(),h.createElementBlock("div",{key:1,class:h.normalizeClass(h.unref(e).e("footer"))},[h.renderSlot(r.$slots,"footer",{},()=>[h.createTextVNode(h.toDisplayString(r.footer),1)])],2)):h.createCommentVNode("v-if",!0)],2))}});var Hq=Hr(Mq,[["__file","card.vue"]]);const qw=mi(Hq),Ww={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:T3,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0}},Xw={[f1]:t=>W1(t)||X1(t)||hs(t),change:t=>W1(t)||X1(t)||hs(t)},u5=Symbol("checkboxGroupContextKey"),Sq=({model:t,isChecked:e})=>{const r=h.inject(u5,void 0),n=h.computed(()=>{var o,a;const s=(o=r==null?void 0:r.max)==null?void 0:o.value,d=(a=r==null?void 0:r.min)==null?void 0:a.value;return!dl(s)&&t.value.length>=s&&!e.value||!dl(d)&&t.value.length<=d&&e.value});return{isDisabled:a5(h.computed(()=>(r==null?void 0:r.disabled.value)||n.value)),isLimitDisabled:n}},Cq=(t,{model:e,isLimitExceeded:r,hasOwnLabel:n,isDisabled:i,isLabeledByFormItem:o})=>{const a=h.inject(u5,void 0),{formItem:s}=Q3(),{emit:d}=h.getCurrentInstance();function p(v){var b,M;return v===t.trueLabel||v===!0?(b=t.trueLabel)!=null?b:!0:(M=t.falseLabel)!=null?M:!1}function f(v,b){d("change",p(v),b)}function Q(v){if(r.value)return;const b=v.target;d("change",p(b.checked),v)}async function m(v){r.value||!n.value&&!i.value&&o.value&&(v.composedPath().some(E=>E.tagName==="LABEL")||(e.value=p([!1,t.falseLabel].includes(e.value)),await h.nextTick(),f(e.value,v)))}const _=h.computed(()=>(a==null?void 0:a.validateEvent)||t.validateEvent);return h.watch(()=>t.modelValue,()=>{_.value&&(s==null||s.validate("change").catch(v=>K1(v)))}),{handleChange:Q,onClickRoot:m}},Aq=t=>{const e=h.ref(!1),{emit:r}=h.getCurrentInstance(),n=h.inject(u5,void 0),i=h.computed(()=>dl(n)===!1),o=h.ref(!1),a=h.computed({get(){var s,d;return i.value?(s=n==null?void 0:n.modelValue)==null?void 0:s.value:(d=t.modelValue)!=null?d:e.value},set(s){var d,p;i.value&&Vi(s)?(o.value=((d=n==null?void 0:n.max)==null?void 0:d.value)!==void 0&&s.length>(n==null?void 0:n.max.value)&&s.length>a.value.length,o.value===!1&&((p=n==null?void 0:n.changeEvent)==null||p.call(n,s))):(r(f1,s),e.value=s)}});return{model:a,isGroup:i,isLimitExceeded:o}},Vq=(t,e,{model:r})=>{const n=h.inject(u5,void 0),i=h.ref(!1),o=h.computed(()=>{const p=r.value;return hs(p)?p:Vi(p)?Qi(t.label)?p.map(h.toRaw).some(f=>hl(f,t.label)):p.map(h.toRaw).includes(t.label):p!=null?p===t.trueLabel:!!p}),a=f3(h.computed(()=>{var p;return(p=n==null?void 0:n.size)==null?void 0:p.value}),{prop:!0}),s=f3(h.computed(()=>{var p;return(p=n==null?void 0:n.size)==null?void 0:p.value})),d=h.computed(()=>!!e.default||!u3(t.label));return{checkboxButtonSize:a,isChecked:o,isFocused:i,checkboxSize:s,hasOwnLabel:d}},Oq=(t,{model:e})=>{function r(){Vi(e.value)&&!e.value.includes(t.label)?e.value.push(t.label):e.value=t.trueLabel||!0}t.checked&&r()},Kw=(t,e)=>{const{formItem:r}=Q3(),{model:n,isGroup:i,isLimitExceeded:o}=Aq(t),{isFocused:a,isChecked:s,checkboxButtonSize:d,checkboxSize:p,hasOwnLabel:f}=Vq(t,e,{model:n}),{isDisabled:Q}=Sq({model:n,isChecked:s}),{inputId:m,isLabeledByFormItem:_}=s5(t,{formItemContext:r,disableIdGeneration:f,disableIdManagement:i}),{handleChange:v,onClickRoot:b}=Cq(t,{model:n,isLimitExceeded:o,hasOwnLabel:f,isDisabled:Q,isLabeledByFormItem:_});return Oq(t,{model:n}),{inputId:m,isLabeledByFormItem:_,isChecked:s,isDisabled:Q,isFocused:a,checkboxButtonSize:d,checkboxSize:p,hasOwnLabel:f,model:n,handleChange:v,onClickRoot:b}},kq=["id","indeterminate","name","tabindex","disabled","true-value","false-value"],Pq=["id","indeterminate","disabled","value","name","tabindex"],Iq=h.defineComponent({name:"ElCheckbox"}),Rq=h.defineComponent({...Iq,props:Ww,emits:Xw,setup(t){const e=t,r=h.useSlots(),{inputId:n,isLabeledByFormItem:i,isChecked:o,isDisabled:a,isFocused:s,checkboxSize:d,hasOwnLabel:p,model:f,handleChange:Q,onClickRoot:m}=Kw(e,r),_=xr("checkbox"),v=h.computed(()=>[_.b(),_.m(d.value),_.is("disabled",a.value),_.is("bordered",e.border),_.is("checked",o.value)]),b=h.computed(()=>[_.e("input"),_.is("disabled",a.value),_.is("checked",o.value),_.is("indeterminate",e.indeterminate),_.is("focus",s.value)]);return(M,E)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(!h.unref(p)&&h.unref(i)?"span":"label"),{class:h.normalizeClass(h.unref(v)),"aria-controls":M.indeterminate?M.controls:null,onClick:h.unref(m)},{default:h.withCtx(()=>[h.createElementVNode("span",{class:h.normalizeClass(h.unref(b))},[M.trueLabel||M.falseLabel?h.withDirectives((h.openBlock(),h.createElementBlock("input",{key:0,id:h.unref(n),"onUpdate:modelValue":E[0]||(E[0]=V=>h.isRef(f)?f.value=V:null),class:h.normalizeClass(h.unref(_).e("original")),type:"checkbox",indeterminate:M.indeterminate,name:M.name,tabindex:M.tabindex,disabled:h.unref(a),"true-value":M.trueLabel,"false-value":M.falseLabel,onChange:E[1]||(E[1]=(...V)=>h.unref(Q)&&h.unref(Q)(...V)),onFocus:E[2]||(E[2]=V=>s.value=!0),onBlur:E[3]||(E[3]=V=>s.value=!1),onClick:E[4]||(E[4]=h.withModifiers(()=>{},["stop"]))},null,42,kq)),[[h.vModelCheckbox,h.unref(f)]]):h.withDirectives((h.openBlock(),h.createElementBlock("input",{key:1,id:h.unref(n),"onUpdate:modelValue":E[5]||(E[5]=V=>h.isRef(f)?f.value=V:null),class:h.normalizeClass(h.unref(_).e("original")),type:"checkbox",indeterminate:M.indeterminate,disabled:h.unref(a),value:M.label,name:M.name,tabindex:M.tabindex,onChange:E[6]||(E[6]=(...V)=>h.unref(Q)&&h.unref(Q)(...V)),onFocus:E[7]||(E[7]=V=>s.value=!0),onBlur:E[8]||(E[8]=V=>s.value=!1),onClick:E[9]||(E[9]=h.withModifiers(()=>{},["stop"]))},null,42,Pq)),[[h.vModelCheckbox,h.unref(f)]]),h.createElementVNode("span",{class:h.normalizeClass(h.unref(_).e("inner"))},null,2)],2),h.unref(p)?(h.openBlock(),h.createElementBlock("span",{key:0,class:h.normalizeClass(h.unref(_).e("label"))},[h.renderSlot(M.$slots,"default"),M.$slots.default?h.createCommentVNode("v-if",!0):(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createTextVNode(h.toDisplayString(M.label),1)],64))],2)):h.createCommentVNode("v-if",!0)]),_:3},8,["class","aria-controls","onClick"]))}});var Nq=Hr(Rq,[["__file","checkbox.vue"]]);const Bq=["name","tabindex","disabled","true-value","false-value"],Dq=["name","tabindex","disabled","value"],Fq=h.defineComponent({name:"ElCheckboxButton"}),jq=h.defineComponent({...Fq,props:Ww,emits:Xw,setup(t){const e=t,r=h.useSlots(),{isFocused:n,isChecked:i,isDisabled:o,checkboxButtonSize:a,model:s,handleChange:d}=Kw(e,r),p=h.inject(u5,void 0),f=xr("checkbox"),Q=h.computed(()=>{var _,v,b,M;const E=(v=(_=p==null?void 0:p.fill)==null?void 0:_.value)!=null?v:"";return{backgroundColor:E,borderColor:E,color:(M=(b=p==null?void 0:p.textColor)==null?void 0:b.value)!=null?M:"",boxShadow:E?`-1px 0 0 0 ${E}`:void 0}}),m=h.computed(()=>[f.b("button"),f.bm("button",a.value),f.is("disabled",o.value),f.is("checked",i.value),f.is("focus",n.value)]);return(_,v)=>(h.openBlock(),h.createElementBlock("label",{class:h.normalizeClass(h.unref(m))},[_.trueLabel||_.falseLabel?h.withDirectives((h.openBlock(),h.createElementBlock("input",{key:0,"onUpdate:modelValue":v[0]||(v[0]=b=>h.isRef(s)?s.value=b:null),class:h.normalizeClass(h.unref(f).be("button","original")),type:"checkbox",name:_.name,tabindex:_.tabindex,disabled:h.unref(o),"true-value":_.trueLabel,"false-value":_.falseLabel,onChange:v[1]||(v[1]=(...b)=>h.unref(d)&&h.unref(d)(...b)),onFocus:v[2]||(v[2]=b=>n.value=!0),onBlur:v[3]||(v[3]=b=>n.value=!1),onClick:v[4]||(v[4]=h.withModifiers(()=>{},["stop"]))},null,42,Bq)),[[h.vModelCheckbox,h.unref(s)]]):h.withDirectives((h.openBlock(),h.createElementBlock("input",{key:1,"onUpdate:modelValue":v[5]||(v[5]=b=>h.isRef(s)?s.value=b:null),class:h.normalizeClass(h.unref(f).be("button","original")),type:"checkbox",name:_.name,tabindex:_.tabindex,disabled:h.unref(o),value:_.label,onChange:v[6]||(v[6]=(...b)=>h.unref(d)&&h.unref(d)(...b)),onFocus:v[7]||(v[7]=b=>n.value=!0),onBlur:v[8]||(v[8]=b=>n.value=!1),onClick:v[9]||(v[9]=h.withModifiers(()=>{},["stop"]))},null,42,Dq)),[[h.vModelCheckbox,h.unref(s)]]),_.$slots.default||_.label?(h.openBlock(),h.createElementBlock("span",{key:2,class:h.normalizeClass(h.unref(f).be("button","inner")),style:h.normalizeStyle(h.unref(i)?h.unref(Q):void 0)},[h.renderSlot(_.$slots,"default",{},()=>[h.createTextVNode(h.toDisplayString(_.label),1)])],6)):h.createCommentVNode("v-if",!0)],2))}});var Yw=Hr(jq,[["__file","checkbox-button.vue"]]);const zq=on({modelValue:{type:_r(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:T3,label:String,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0}}),Uq={[f1]:t=>Vi(t),change:t=>Vi(t)},Gq=h.defineComponent({name:"ElCheckboxGroup"}),Zq=h.defineComponent({...Gq,props:zq,emits:Uq,setup(t,{emit:e}){const r=t,n=xr("checkbox"),{formItem:i}=Q3(),{inputId:o,isLabeledByFormItem:a}=s5(r,{formItemContext:i}),s=async p=>{e(f1,p),await h.nextTick(),e("change",p)},d=h.computed({get(){return r.modelValue},set(p){s(p)}});return h.provide(u5,{...sU(h.toRefs(r),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:d,changeEvent:s}),h.watch(()=>r.modelValue,()=>{r.validateEvent&&(i==null||i.validate("change").catch(p=>K1(p)))}),(p,f)=>{var Q;return h.openBlock(),h.createBlock(h.resolveDynamicComponent(p.tag),{id:h.unref(o),class:h.normalizeClass(h.unref(n).b("group")),role:"group","aria-label":h.unref(a)?void 0:p.label||"checkbox-group","aria-labelledby":h.unref(a)?(Q=h.unref(i))==null?void 0:Q.labelId:void 0},{default:h.withCtx(()=>[h.renderSlot(p.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var Jw=Hr(Zq,[["__file","checkbox-group.vue"]]);const C9=mi(Nq,{CheckboxButton:Yw,CheckboxGroup:Jw});A2(Yw);const cQ=A2(Jw),tE=on({size:T3,disabled:Boolean,label:{type:[String,Number,Boolean],default:""}}),$q=on({...tE,modelValue:{type:[String,Number,Boolean],default:""},name:{type:String,default:""},border:Boolean}),eE={[f1]:t=>W1(t)||X1(t)||hs(t),[p9]:t=>W1(t)||X1(t)||hs(t)},rE=Symbol("radioGroupKey"),nE=(t,e)=>{const r=h.ref(),n=h.inject(rE,void 0),i=h.computed(()=>!!n),o=h.computed({get(){return i.value?n.modelValue:t.modelValue},set(f){i.value?n.changeEvent(f):e&&e(f1,f),r.value.checked=t.modelValue===t.label}}),a=f3(h.computed(()=>n==null?void 0:n.size)),s=a5(h.computed(()=>n==null?void 0:n.disabled)),d=h.ref(!1),p=h.computed(()=>s.value||i.value&&o.value!==t.label?-1:0);return{radioRef:r,isGroup:i,radioGroup:n,focus:d,size:a,disabled:s,tabIndex:p,modelValue:o}},qq=["value","name","disabled"],Wq=h.defineComponent({name:"ElRadio"}),Xq=h.defineComponent({...Wq,props:$q,emits:eE,setup(t,{emit:e}){const r=t,n=xr("radio"),{radioRef:i,radioGroup:o,focus:a,size:s,disabled:d,modelValue:p}=nE(r,e);function f(){h.nextTick(()=>e("change",p.value))}return(Q,m)=>{var _;return h.openBlock(),h.createElementBlock("label",{class:h.normalizeClass([h.unref(n).b(),h.unref(n).is("disabled",h.unref(d)),h.unref(n).is("focus",h.unref(a)),h.unref(n).is("bordered",Q.border),h.unref(n).is("checked",h.unref(p)===Q.label),h.unref(n).m(h.unref(s))])},[h.createElementVNode("span",{class:h.normalizeClass([h.unref(n).e("input"),h.unref(n).is("disabled",h.unref(d)),h.unref(n).is("checked",h.unref(p)===Q.label)])},[h.withDirectives(h.createElementVNode("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":m[0]||(m[0]=v=>h.isRef(p)?p.value=v:null),class:h.normalizeClass(h.unref(n).e("original")),value:Q.label,name:Q.name||((_=h.unref(o))==null?void 0:_.name),disabled:h.unref(d),type:"radio",onFocus:m[1]||(m[1]=v=>a.value=!0),onBlur:m[2]||(m[2]=v=>a.value=!1),onChange:f,onClick:m[3]||(m[3]=h.withModifiers(()=>{},["stop"]))},null,42,qq),[[h.vModelRadio,h.unref(p)]]),h.createElementVNode("span",{class:h.normalizeClass(h.unref(n).e("inner"))},null,2)],2),h.createElementVNode("span",{class:h.normalizeClass(h.unref(n).e("label")),onKeydown:m[4]||(m[4]=h.withModifiers(()=>{},["stop"]))},[h.renderSlot(Q.$slots,"default",{},()=>[h.createTextVNode(h.toDisplayString(Q.label),1)])],34)],2)}}});var Kq=Hr(Xq,[["__file","radio.vue"]]);const Yq=on({...tE,name:{type:String,default:""}}),Jq=["value","name","disabled"],tW=h.defineComponent({name:"ElRadioButton"}),eW=h.defineComponent({...tW,props:Yq,setup(t){const e=t,r=xr("radio"),{radioRef:n,focus:i,size:o,disabled:a,modelValue:s,radioGroup:d}=nE(e),p=h.computed(()=>({backgroundColor:(d==null?void 0:d.fill)||"",borderColor:(d==null?void 0:d.fill)||"",boxShadow:d!=null&&d.fill?`-1px 0 0 0 ${d.fill}`:"",color:(d==null?void 0:d.textColor)||""}));return(f,Q)=>{var m;return h.openBlock(),h.createElementBlock("label",{class:h.normalizeClass([h.unref(r).b("button"),h.unref(r).is("active",h.unref(s)===f.label),h.unref(r).is("disabled",h.unref(a)),h.unref(r).is("focus",h.unref(i)),h.unref(r).bm("button",h.unref(o))])},[h.withDirectives(h.createElementVNode("input",{ref_key:"radioRef",ref:n,"onUpdate:modelValue":Q[0]||(Q[0]=_=>h.isRef(s)?s.value=_:null),class:h.normalizeClass(h.unref(r).be("button","original-radio")),value:f.label,type:"radio",name:f.name||((m=h.unref(d))==null?void 0:m.name),disabled:h.unref(a),onFocus:Q[1]||(Q[1]=_=>i.value=!0),onBlur:Q[2]||(Q[2]=_=>i.value=!1),onClick:Q[3]||(Q[3]=h.withModifiers(()=>{},["stop"]))},null,42,Jq),[[h.vModelRadio,h.unref(s)]]),h.createElementVNode("span",{class:h.normalizeClass(h.unref(r).be("button","inner")),style:h.normalizeStyle(h.unref(s)===f.label?h.unref(p):{}),onKeydown:Q[4]||(Q[4]=h.withModifiers(()=>{},["stop"]))},[h.renderSlot(f.$slots,"default",{},()=>[h.createTextVNode(h.toDisplayString(f.label),1)])],38)],2)}}});var iE=Hr(eW,[["__file","radio-button.vue"]]);const rW=on({id:{type:String,default:void 0},size:T3,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}}),nW=eE,iW=["id","aria-label","aria-labelledby"],oW=h.defineComponent({name:"ElRadioGroup"}),aW=h.defineComponent({...oW,props:rW,emits:nW,setup(t,{emit:e}){const r=t,n=xr("radio"),i=C4(),o=h.ref(),{formItem:a}=Q3(),{inputId:s,isLabeledByFormItem:d}=s5(r,{formItemContext:a}),p=Q=>{e(f1,Q),h.nextTick(()=>e("change",Q))};h.onMounted(()=>{const Q=o.value.querySelectorAll("[type=radio]"),m=Q[0];!Array.from(Q).some(_=>_.checked)&&m&&(m.tabIndex=0)});const f=h.computed(()=>r.name||i.value);return h.provide(rE,h.reactive({...h.toRefs(r),changeEvent:p,name:f})),h.watch(()=>r.modelValue,()=>{r.validateEvent&&(a==null||a.validate("change").catch(Q=>K1(Q)))}),(Q,m)=>(h.openBlock(),h.createElementBlock("div",{id:h.unref(s),ref_key:"radioGroupRef",ref:o,class:h.normalizeClass(h.unref(n).b("group")),role:"radiogroup","aria-label":h.unref(d)?void 0:Q.label||"radio-group","aria-labelledby":h.unref(d)?h.unref(a).labelId:void 0},[h.renderSlot(Q.$slots,"default")],10,iW))}});var oE=Hr(aW,[["__file","radio-group.vue"]]);const aE=mi(Kq,{RadioButton:iE,RadioGroup:oE}),sE=A2(oE);A2(iE);const lE=on({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Mx},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),sW={close:t=>t instanceof MouseEvent,click:t=>t instanceof MouseEvent},lW=h.defineComponent({name:"ElTag"}),cW=h.defineComponent({...lW,props:lE,emits:sW,setup(t,{emit:e}){const r=t,n=f3(),i=xr("tag"),o=h.computed(()=>{const{type:d,hit:p,effect:f,closable:Q,round:m}=r;return[i.b(),i.is("closable",Q),i.m(d||"primary"),i.m(n.value),i.m(f),i.is("hit",p),i.is("round",m)]}),a=d=>{e("close",d)},s=d=>{e("click",d)};return(d,p)=>d.disableTransitions?(h.openBlock(),h.createElementBlock("span",{key:0,class:h.normalizeClass(h.unref(o)),style:h.normalizeStyle({backgroundColor:d.color}),onClick:s},[h.createElementVNode("span",{class:h.normalizeClass(h.unref(i).e("content"))},[h.renderSlot(d.$slots,"default")],2),d.closable?(h.openBlock(),h.createBlock(h.unref(F1),{key:0,class:h.normalizeClass(h.unref(i).e("close")),onClick:h.withModifiers(a,["stop"])},{default:h.withCtx(()=>[h.createVNode(h.unref(Y6))]),_:1},8,["class","onClick"])):h.createCommentVNode("v-if",!0)],6)):(h.openBlock(),h.createBlock(h.Transition,{key:1,name:`${h.unref(i).namespace.value}-zoom-in-center`,appear:""},{default:h.withCtx(()=>[h.createElementVNode("span",{class:h.normalizeClass(h.unref(o)),style:h.normalizeStyle({backgroundColor:d.color}),onClick:s},[h.createElementVNode("span",{class:h.normalizeClass(h.unref(i).e("content"))},[h.renderSlot(d.$slots,"default")],2),d.closable?(h.openBlock(),h.createBlock(h.unref(F1),{key:0,class:h.normalizeClass(h.unref(i).e("close")),onClick:h.withModifiers(a,["stop"])},{default:h.withCtx(()=>[h.createVNode(h.unref(Y6))]),_:1},8,["class","onClick"])):h.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var uW=Hr(cW,[["__file","tag.vue"]]);const hW=mi(uW),cE=Symbol("rowContextKey"),dW=on({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"]}}),pW=h.defineComponent({name:"ElRow"}),TW=h.defineComponent({...pW,props:dW,setup(t){const e=t,r=xr("row"),n=h.computed(()=>e.gutter);h.provide(cE,{gutter:n});const i=h.computed(()=>{const a={};return e.gutter&&(a.marginRight=a.marginLeft=`-${e.gutter/2}px`),a}),o=h.computed(()=>[r.b(),r.is(`justify-${e.justify}`,e.justify!=="start"),r.is(`align-${e.align}`,!!e.align)]);return(a,s)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(a.tag),{class:h.normalizeClass(h.unref(o)),style:h.normalizeStyle(h.unref(i))},{default:h.withCtx(()=>[h.renderSlot(a.$slots,"default")]),_:3},8,["class","style"]))}});var fW=Hr(TW,[["__file","row.vue"]]);const P2=mi(fW),QW=on({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:_r([Number,Object]),default:()=>J6({})},sm:{type:_r([Number,Object]),default:()=>J6({})},md:{type:_r([Number,Object]),default:()=>J6({})},lg:{type:_r([Number,Object]),default:()=>J6({})},xl:{type:_r([Number,Object]),default:()=>J6({})}}),mW=h.defineComponent({name:"ElCol"}),gW=h.defineComponent({...mW,props:QW,setup(t){const e=t,{gutter:r}=h.inject(cE,{gutter:h.computed(()=>0)}),n=xr("col"),i=h.computed(()=>{const a={};return r.value&&(a.paddingLeft=a.paddingRight=`${r.value/2}px`),a}),o=h.computed(()=>{const a=[];return["span","offset","pull","push"].forEach(p=>{const f=e[p];X1(f)&&(p==="span"?a.push(n.b(`${e[p]}`)):f>0&&a.push(n.b(`${p}-${e[p]}`)))}),["xs","sm","md","lg","xl"].forEach(p=>{X1(e[p])?a.push(n.b(`${p}-${e[p]}`)):Qi(e[p])&&Object.entries(e[p]).forEach(([f,Q])=>{a.push(f!=="span"?n.b(`${p}-${f}-${Q}`):n.b(`${p}-${Q}`))})}),r.value&&a.push(n.is("guttered")),[n.b(),a]});return(a,s)=>(h.openBlock(),h.createBlock(h.resolveDynamicComponent(a.tag),{class:h.normalizeClass(h.unref(o)),style:h.normalizeStyle(h.unref(i))},{default:h.withCtx(()=>[h.renderSlot(a.$slots,"default")]),_:3},8,["class","style"]))}});var yW=Hr(gW,[["__file","col.vue"]]);const ga=mi(yW),_W=h.defineComponent({name:"ElCollapseTransition"}),vW=h.defineComponent({..._W,setup(t){const e=xr("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)=>(h.openBlock(),h.createBlock(h.Transition,h.mergeProps({name:h.unref(e).b()},h.toHandlers(n)),{default:h.withCtx(()=>[h.renderSlot(i.$slots,"default")]),_:3},16,["name"]))}});var A9=Hr(vW,[["__file","collapse-transition.vue"]]);A9.install=t=>{t.component(A9.name,A9)};const bW=A9,LW=on({color:{type:_r(Object),required:!0},vertical:{type:Boolean,default:!1}});let uQ=!1;function El(t,e){if(!T1)return;const r=function(o){var a;(a=e.drag)==null||a.call(e,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,uQ=!1,(a=e.end)==null||a.call(e,o)},i=function(o){var a;uQ||(o.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",r),document.addEventListener("mouseup",n),document.addEventListener("touchmove",r),document.addEventListener("touchend",n),uQ=!0,(a=e.start)==null||a.call(e,o))};t.addEventListener("mousedown",i),t.addEventListener("touchstart",i)}const xW=t=>{const e=h.getCurrentInstance(),r=h.shallowRef(),n=h.shallowRef();function i(a){a.target!==r.value&&o(a)}function o(a){if(!n.value||!r.value)return;const d=e.vnode.el.getBoundingClientRect(),{clientX:p,clientY:f}=hf(a);if(t.vertical){let Q=f-d.top;Q=Math.max(r.value.offsetHeight/2,Q),Q=Math.min(Q,d.height-r.value.offsetHeight/2),t.color.set("alpha",Math.round((Q-r.value.offsetHeight/2)/(d.height-r.value.offsetHeight)*100))}else{let Q=p-d.left;Q=Math.max(r.value.offsetWidth/2,Q),Q=Math.min(Q,d.width-r.value.offsetWidth/2),t.color.set("alpha",Math.round((Q-r.value.offsetWidth/2)/(d.width-r.value.offsetWidth)*100))}}return{thumb:r,bar:n,handleDrag:o,handleClick:i}},wW=(t,{bar:e,thumb:r,handleDrag:n})=>{const i=h.getCurrentInstance(),o=xr("color-alpha-slider"),a=h.ref(0),s=h.ref(0),d=h.ref();function p(){if(!r.value||t.vertical)return 0;const V=i.vnode.el,O=t.color.get("alpha");return V?Math.round(O*(V.offsetWidth-r.value.offsetWidth/2)/100):0}function f(){if(!r.value)return 0;const V=i.vnode.el;if(!t.vertical)return 0;const O=t.color.get("alpha");return V?Math.round(O*(V.offsetHeight-r.value.offsetHeight/2)/100):0}function Q(){if(t.color&&t.color.value){const{r:V,g:O,b:R}=t.color.toRgb();return`linear-gradient(to right, rgba(${V}, ${O}, ${R}, 0) 0%, rgba(${V}, ${O}, ${R}, 1) 100%)`}return""}function m(){a.value=p(),s.value=f(),d.value=Q()}h.onMounted(()=>{if(!e.value||!r.value)return;const V={drag:O=>{n(O)},end:O=>{n(O)}};El(e.value,V),El(r.value,V),m()}),h.watch(()=>t.color.get("alpha"),()=>m()),h.watch(()=>t.color.value,()=>m());const _=h.computed(()=>[o.b(),o.is("vertical",t.vertical)]),v=h.computed(()=>o.e("bar")),b=h.computed(()=>o.e("thumb")),M=h.computed(()=>({background:d.value})),E=h.computed(()=>({left:ds(a.value),top:ds(s.value)}));return{rootKls:_,barKls:v,barStyle:M,thumbKls:b,thumbStyle:E,update:m}},EW=h.defineComponent({name:"ElColorAlphaSlider"}),MW=h.defineComponent({...EW,props:LW,setup(t,{expose:e}){const r=t,{bar:n,thumb:i,handleDrag:o,handleClick:a}=xW(r),{rootKls:s,barKls:d,barStyle:p,thumbKls:f,thumbStyle:Q,update:m}=wW(r,{bar:n,thumb:i,handleDrag:o});return e({update:m,bar:n,thumb:i}),(_,v)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(h.unref(s))},[h.createElementVNode("div",{ref_key:"bar",ref:n,class:h.normalizeClass(h.unref(d)),style:h.normalizeStyle(h.unref(p)),onClick:v[0]||(v[0]=(...b)=>h.unref(a)&&h.unref(a)(...b))},null,6),h.createElementVNode("div",{ref_key:"thumb",ref:i,class:h.normalizeClass(h.unref(f)),style:h.normalizeStyle(h.unref(Q))},null,6)],2))}});var HW=Hr(MW,[["__file","alpha-slider.vue"]]);const SW=h.defineComponent({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(t){const e=xr("color-hue-slider"),r=h.getCurrentInstance(),n=h.ref(),i=h.ref(),o=h.ref(0),a=h.ref(0),s=h.computed(()=>t.color.get("hue"));h.watch(()=>s.value,()=>{m()});function d(_){_.target!==n.value&&p(_)}function p(_){if(!i.value||!n.value)return;const b=r.vnode.el.getBoundingClientRect(),{clientX:M,clientY:E}=hf(_);let V;if(t.vertical){let O=E-b.top;O=Math.min(O,b.height-n.value.offsetHeight/2),O=Math.max(n.value.offsetHeight/2,O),V=Math.round((O-n.value.offsetHeight/2)/(b.height-n.value.offsetHeight)*360)}else{let O=M-b.left;O=Math.min(O,b.width-n.value.offsetWidth/2),O=Math.max(n.value.offsetWidth/2,O),V=Math.round((O-n.value.offsetWidth/2)/(b.width-n.value.offsetWidth)*360)}t.color.set("hue",V)}function f(){if(!n.value)return 0;const _=r.vnode.el;if(t.vertical)return 0;const v=t.color.get("hue");return _?Math.round(v*(_.offsetWidth-n.value.offsetWidth/2)/360):0}function Q(){if(!n.value)return 0;const _=r.vnode.el;if(!t.vertical)return 0;const v=t.color.get("hue");return _?Math.round(v*(_.offsetHeight-n.value.offsetHeight/2)/360):0}function m(){o.value=f(),a.value=Q()}return h.onMounted(()=>{if(!i.value||!n.value)return;const _={drag:v=>{p(v)},end:v=>{p(v)}};El(i.value,_),El(n.value,_),m()}),{bar:i,thumb:n,thumbLeft:o,thumbTop:a,hueValue:s,handleClick:d,update:m,ns:e}}});function CW(t,e,r,n,i,o){return h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass([t.ns.b(),t.ns.is("vertical",t.vertical)])},[h.createElementVNode("div",{ref:"bar",class:h.normalizeClass(t.ns.e("bar")),onClick:e[0]||(e[0]=(...a)=>t.handleClick&&t.handleClick(...a))},null,2),h.createElementVNode("div",{ref:"thumb",class:h.normalizeClass(t.ns.e("thumb")),style:h.normalizeStyle({left:t.thumbLeft+"px",top:t.thumbTop+"px"})},null,6)],2)}var AW=Hr(SW,[["render",CW],["__file","hue-slider.vue"]]);const VW=on({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:T3,popperClass:{type:String,default:""},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},predefine:{type:_r(Array)},validateEvent:{type:Boolean,default:!0}}),OW={[f1]:t=>W1(t)||u3(t),[p9]:t=>W1(t)||u3(t),activeChange:t=>W1(t)||u3(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent},uE=Symbol("colorPickerContextKey"),hE=function(t,e,r){return[t,e*r/((t=(2-e)*r)<1?t:2-t)||0,t/2]},kW=function(t){return typeof t=="string"&&t.includes(".")&&Number.parseFloat(t)===1},PW=function(t){return typeof t=="string"&&t.includes("%")},h5=function(t,e){kW(t)&&(t="100%");const r=PW(t);return t=Math.min(e,Math.max(0,Number.parseFloat(`${t}`))),r&&(t=Number.parseInt(`${t*e}`,10)/100),Math.abs(t-e)<1e-6?1:t%e/Number.parseFloat(e)},dE={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},V9=t=>{t=Math.min(Math.round(t),255);const e=Math.floor(t/16),r=t%16;return`${dE[e]||e}${dE[r]||r}`},pE=function({r:t,g:e,b:r}){return Number.isNaN(+t)||Number.isNaN(+e)||Number.isNaN(+r)?"":`#${V9(t)}${V9(e)}${V9(r)}`},hQ={A:10,B:11,C:12,D:13,E:14,F:15},V4=function(t){return t.length===2?(hQ[t[0].toUpperCase()]||+t[0])*16+(hQ[t[1].toUpperCase()]||+t[1]):hQ[t[1].toUpperCase()]||+t[1]},IW=function(t,e,r){e=e/100,r=r/100;let n=e;const i=Math.max(r,.01);r*=2,e*=r<=1?r:2-r,n*=i<=1?i:2-i;const o=(r+e)/2,a=r===0?2*n/(i+n):2*e/(r+e);return{h:t,s:a*100,v:o*100}},TE=(t,e,r)=>{t=h5(t,255),e=h5(e,255),r=h5(r,255);const n=Math.max(t,e,r),i=Math.min(t,e,r);let o;const a=n,s=n-i,d=n===0?0:s/n;if(n===i)o=0;else{switch(n){case t:{o=(e-r)/s+(e<r?6:0);break}case e:{o=(r-t)/s+2;break}case r:{o=(t-e)/s+4;break}}o/=6}return{h:o*360,s:d*100,v:a*100}},Ml=function(t,e,r){t=h5(t,360)*6,e=h5(e,100),r=h5(r,100);const n=Math.floor(t),i=t-n,o=r*(1-e),a=r*(1-i*e),s=r*(1-(1-i)*e),d=n%6,p=[r,a,o,o,s,r][d],f=[s,r,r,a,o,o][d],Q=[o,o,s,r,r,a][d];return{r:Math.round(p*255),g:Math.round(f*255),b:Math.round(Q*255)}};class Hl{constructor(e={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this.enableAlpha=!1,this.format="hex",this.value="";for(const r in e)L4(e,r)&&(this[r]=e[r]);e.value?this.fromString(e.value):this.doOnChange()}set(e,r){if(arguments.length===1&&typeof e=="object"){for(const n in e)L4(e,n)&&this.set(n,e[n]);return}this[`_${e}`]=r,this.doOnChange()}get(e){return e==="alpha"?Math.floor(this[`_${e}`]):this[`_${e}`]}toRgb(){return Ml(this._hue,this._saturation,this._value)}fromString(e){if(!e){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(e.includes("hsl")){const n=e.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}=IW(n[0],n[1],n[2]);r(i,o,a)}}else if(e.includes("hsv")){const n=e.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(e.includes("rgb")){const n=e.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}=TE(n[0],n[1],n[2]);r(i,o,a)}}else if(e.includes("#")){const n=e.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=V4(n[0]+n[0]),o=V4(n[1]+n[1]),a=V4(n[2]+n[2])):(n.length===6||n.length===8)&&(i=V4(n.slice(0,2)),o=V4(n.slice(2,4)),a=V4(n.slice(4,6))),n.length===8?this._alpha=V4(n.slice(6))/255*100:(n.length===3||n.length===6)&&(this._alpha=100);const{h:s,s:d,v:p}=TE(i,o,a);r(s,d,p)}}compare(e){return Math.abs(e._hue-this._hue)<2&&Math.abs(e._saturation-this._saturation)<1&&Math.abs(e._value-this._value)<1&&Math.abs(e._alpha-this._alpha)<1}doOnChange(){const{_hue:e,_saturation:r,_value:n,_alpha:i,format:o}=this;if(this.enableAlpha)switch(o){case"hsl":{const a=hE(e,r/100,n/100);this.value=`hsla(${e}, ${Math.round(a[1]*100)}%, ${Math.round(a[2]*100)}%, ${this.get("alpha")/100})`;break}case"hsv":{this.value=`hsva(${e}, ${Math.round(r)}%, ${Math.round(n)}%, ${this.get("alpha")/100})`;break}case"hex":{this.value=`${pE(Ml(e,r,n))}${V9(i*255/100)}`;break}default:{const{r:a,g:s,b:d}=Ml(e,r,n);this.value=`rgba(${a}, ${s}, ${d}, ${this.get("alpha")/100})`}}else switch(o){case"hsl":{const a=hE(e,r/100,n/100);this.value=`hsl(${e}, ${Math.round(a[1]*100)}%, ${Math.round(a[2]*100)}%)`;break}case"hsv":{this.value=`hsv(${e}, ${Math.round(r)}%, ${Math.round(n)}%)`;break}case"rgb":{const{r:a,g:s,b:d}=Ml(e,r,n);this.value=`rgb(${a}, ${s}, ${d})`;break}default:this.value=pE(Ml(e,r,n))}}}const RW=h.defineComponent({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0}},setup(t){const e=xr("color-predefine"),{currentColor:r}=h.inject(uE),n=h.ref(o(t.colors,t.color));h.watch(()=>r.value,a=>{const s=new Hl;s.fromString(a),n.value.forEach(d=>{d.selected=s.compare(d)})}),h.watchEffect(()=>{n.value=o(t.colors,t.color)});function i(a){t.color.fromString(t.colors[a])}function o(a,s){return a.map(d=>{const p=new Hl;return p.enableAlpha=!0,p.format="rgba",p.fromString(d),p.selected=p.value===s.value,p})}return{rgbaColors:n,handleSelect:i,ns:e}}}),NW=["onClick"];function BW(t,e,r,n,i,o){return h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(t.ns.b())},[h.createElementVNode("div",{class:h.normalizeClass(t.ns.e("colors"))},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.rgbaColors,(a,s)=>(h.openBlock(),h.createElementBlock("div",{key:t.colors[s],class:h.normalizeClass([t.ns.e("color-selector"),t.ns.is("alpha",a._alpha<100),{selected:a.selected}]),onClick:d=>t.handleSelect(s)},[h.createElementVNode("div",{style:h.normalizeStyle({backgroundColor:a.value})},null,4)],10,NW))),128))],2)],2)}var DW=Hr(RW,[["render",BW],["__file","predefine.vue"]]);const FW=h.defineComponent({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(t){const e=xr("color-svpanel"),r=h.getCurrentInstance(),n=h.ref(0),i=h.ref(0),o=h.ref("hsl(0, 100%, 50%)"),a=h.computed(()=>{const p=t.color.get("hue"),f=t.color.get("value");return{hue:p,value:f}});function s(){const p=t.color.get("saturation"),f=t.color.get("value"),Q=r.vnode.el,{clientWidth:m,clientHeight:_}=Q;i.value=p*m/100,n.value=(100-f)*_/100,o.value=`hsl(${t.color.get("hue")}, 100%, 50%)`}function d(p){const Q=r.vnode.el.getBoundingClientRect(),{clientX:m,clientY:_}=hf(p);let v=m-Q.left,b=_-Q.top;v=Math.max(0,v),v=Math.min(v,Q.width),b=Math.max(0,b),b=Math.min(b,Q.height),i.value=v,n.value=b,t.color.set({saturation:v/Q.width*100,value:100-b/Q.height*100})}return h.watch(()=>a.value,()=>{s()}),h.onMounted(()=>{El(r.vnode.el,{drag:p=>{d(p)},end:p=>{d(p)}}),s()}),{cursorTop:n,cursorLeft:i,background:o,colorValue:a,handleDrag:d,update:s,ns:e}}}),jW=[h.createElementVNode("div",null,null,-1)];function zW(t,e,r,n,i,o){return h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(t.ns.b()),style:h.normalizeStyle({backgroundColor:t.background})},[h.createElementVNode("div",{class:h.normalizeClass(t.ns.e("white"))},null,2),h.createElementVNode("div",{class:h.normalizeClass(t.ns.e("black"))},null,2),h.createElementVNode("div",{class:h.normalizeClass(t.ns.e("cursor")),style:h.normalizeStyle({top:t.cursorTop+"px",left:t.cursorLeft+"px"})},jW,6)],6)}var UW=Hr(FW,[["render",zW],["__file","sv-panel.vue"]]);const GW=["onKeydown"],ZW=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"],$W=h.defineComponent({name:"ElColorPicker"}),qW=h.defineComponent({...$W,props:VW,emits:OW,setup(t,{expose:e,emit:r}){const n=t,{t:i}=Tl(),o=xr("color"),{formItem:a}=Q3(),s=f3(),d=a5(),{inputId:p,isLabeledByFormItem:f}=s5(n,{formItemContext:a}),Q=h.ref(),m=h.ref(),_=h.ref(),v=h.ref(),b=h.ref(),M=h.ref(),{isFocused:E,handleFocus:V,handleBlur:O}=$f(b,{beforeBlur(jt){var fe;return(fe=v.value)==null?void 0:fe.isFocusInsideContent(jt)},afterBlur(){ue(!1),Xt()}}),R=jt=>{if(d.value)return he();V(jt)};let j=!0;const G=h.reactive(new Hl({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue})),z=h.ref(!1),J=h.ref(!1),tt=h.ref(""),ot=h.computed(()=>!n.modelValue&&!J.value?"transparent":ee(G,n.showAlpha)),et=h.computed(()=>!n.modelValue&&!J.value?"":G.value),Tt=h.computed(()=>f.value?void 0:n.label||i("el.colorpicker.defaultLabel")),At=h.computed(()=>f.value?a==null?void 0:a.labelId:void 0),Ut=h.computed(()=>[o.b("picker"),o.is("disabled",d.value),o.bm("picker",s.value),o.is("focused",E.value)]);function ee(jt,fe){if(!(jt instanceof Hl))throw new TypeError("color should be instance of _color Class");const{r:Ne,g:Ae,b:Ve}=jt.toRgb();return fe?`rgba(${Ne}, ${Ae}, ${Ve}, ${jt.get("alpha")/100})`:`rgb(${Ne}, ${Ae}, ${Ve})`}function ue(jt){z.value=jt}const Ft=fx(ue,100,{leading:!0});function pe(){d.value||ue(!0)}function lr(){Ft(!1),Xt()}function Xt(){h.nextTick(()=>{n.modelValue?G.fromString(n.modelValue):(G.value="",h.nextTick(()=>{J.value=!1}))})}function le(){d.value||Ft(!z.value)}function ge(){G.fromString(tt.value)}function Le(){const jt=G.value;r(f1,jt),r("change",jt),n.validateEvent&&(a==null||a.validate("change").catch(fe=>K1(fe))),Ft(!1),h.nextTick(()=>{const fe=new Hl({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue});G.compare(fe)||Xt()})}function Fe(){Ft(!1),r(f1,null),r("change",null),n.modelValue!==null&&n.validateEvent&&(a==null||a.validate("change").catch(jt=>K1(jt))),Xt()}function Ge(jt){if(z.value&&(lr(),E.value)){const fe=new FocusEvent("focus",jt);O(fe)}}function je(jt){jt.preventDefault(),jt.stopPropagation(),ue(!1),Xt()}function Dt(jt){switch(jt.code){case Xi.enter:case Xi.space:jt.preventDefault(),jt.stopPropagation(),pe(),M.value.focus();break;case Xi.esc:je(jt);break}}function qt(){b.value.focus()}function he(){b.value.blur()}return h.onMounted(()=>{n.modelValue&&(tt.value=et.value)}),h.watch(()=>n.modelValue,jt=>{jt?jt&&jt!==G.value&&(j=!1,G.fromString(jt)):J.value=!1}),h.watch(()=>et.value,jt=>{tt.value=jt,j&&r("activeChange",jt),j=!0}),h.watch(()=>G.value,()=>{!n.modelValue&&!J.value&&(J.value=!0)}),h.watch(()=>z.value,()=>{h.nextTick(()=>{var jt,fe,Ne;(jt=Q.value)==null||jt.update(),(fe=m.value)==null||fe.update(),(Ne=_.value)==null||Ne.update()})}),h.provide(uE,{currentColor:et}),e({color:G,show:pe,hide:lr,focus:qt,blur:he}),(jt,fe)=>(h.openBlock(),h.createBlock(h.unref(nQ),{ref_key:"popper",ref:v,visible:z.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[h.unref(o).be("picker","panel"),h.unref(o).b("dropdown"),jt.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",transition:`${h.unref(o).namespace.value}-zoom-in-top`,persistent:"",onHide:fe[2]||(fe[2]=Ne=>ue(!1))},{content:h.withCtx(()=>[h.withDirectives((h.openBlock(),h.createElementBlock("div",{onKeydown:h.withKeys(je,["esc"])},[h.createElementVNode("div",{class:h.normalizeClass(h.unref(o).be("dropdown","main-wrapper"))},[h.createVNode(AW,{ref_key:"hue",ref:Q,class:"hue-slider",color:h.unref(G),vertical:""},null,8,["color"]),h.createVNode(UW,{ref_key:"sv",ref:m,color:h.unref(G)},null,8,["color"])],2),jt.showAlpha?(h.openBlock(),h.createBlock(HW,{key:0,ref_key:"alpha",ref:_,color:h.unref(G)},null,8,["color"])):h.createCommentVNode("v-if",!0),jt.predefine?(h.openBlock(),h.createBlock(DW,{key:1,ref:"predefine",color:h.unref(G),colors:jt.predefine},null,8,["color","colors"])):h.createCommentVNode("v-if",!0),h.createElementVNode("div",{class:h.normalizeClass(h.unref(o).be("dropdown","btns"))},[h.createElementVNode("span",{class:h.normalizeClass(h.unref(o).be("dropdown","value"))},[h.createVNode(h.unref(L9),{ref_key:"inputRef",ref:M,modelValue:tt.value,"onUpdate:modelValue":fe[0]||(fe[0]=Ne=>tt.value=Ne),"validate-event":!1,size:"small",onKeyup:h.withKeys(ge,["enter"]),onBlur:ge},null,8,["modelValue","onKeyup"])],2),h.createVNode(h.unref(Qo),{class:h.normalizeClass(h.unref(o).be("dropdown","link-btn")),text:"",size:"small",onClick:Fe},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(i)("el.colorpicker.clear")),1)]),_:1},8,["class"]),h.createVNode(h.unref(Qo),{plain:"",size:"small",class:h.normalizeClass(h.unref(o).be("dropdown","btn")),onClick:Le},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(h.unref(i)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,GW)),[[h.unref($w),Ge]])]),default:h.withCtx(()=>[h.createElementVNode("div",{id:h.unref(p),ref_key:"triggerRef",ref:b,class:h.normalizeClass(h.unref(Ut)),role:"button","aria-label":h.unref(Tt),"aria-labelledby":h.unref(At),"aria-description":h.unref(i)("el.colorpicker.description",{color:jt.modelValue||""}),"aria-disabled":h.unref(d),tabindex:h.unref(d)?-1:jt.tabindex,onKeydown:Dt,onFocus:R,onBlur:fe[1]||(fe[1]=(...Ne)=>h.unref(O)&&h.unref(O)(...Ne))},[h.unref(d)?(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(h.unref(o).be("picker","mask"))},null,2)):h.createCommentVNode("v-if",!0),h.createElementVNode("div",{class:h.normalizeClass(h.unref(o).be("picker","trigger")),onClick:le},[h.createElementVNode("span",{class:h.normalizeClass([h.unref(o).be("picker","color"),h.unref(o).is("alpha",jt.showAlpha)])},[h.createElementVNode("span",{class:h.normalizeClass(h.unref(o).be("picker","color-inner")),style:h.normalizeStyle({backgroundColor:h.unref(ot)})},[h.withDirectives(h.createVNode(h.unref(F1),{class:h.normalizeClass([h.unref(o).be("picker","icon"),h.unref(o).is("icon-arrow-down")])},{default:h.withCtx(()=>[h.createVNode(h.unref(d3))]),_:1},8,["class"]),[[h.vShow,jt.modelValue||J.value]]),h.withDirectives(h.createVNode(h.unref(F1),{class:h.normalizeClass([h.unref(o).be("picker","empty"),h.unref(o).is("icon-close")])},{default:h.withCtx(()=>[h.createVNode(h.unref(Y6))]),_:1},8,["class"]),[[h.vShow,!jt.modelValue&&!J.value]])],6)],2)],2)],42,ZW)]),_:1},8,["visible","popper-class","transition"]))}});var WW=Hr(qW,[["__file","color-picker.vue"]]);const XW=mi(WW),KW=h.defineComponent({name:"ElContainer"}),YW=h.defineComponent({...KW,props:{direction:{type:String}},setup(t){const e=t,r=h.useSlots(),n=xr("container"),i=h.computed(()=>e.direction==="vertical"?!0:e.direction==="horizontal"?!1:r&&r.default?r.default().some(a=>{const s=a.type.name;return s==="ElHeader"||s==="ElFooter"}):!1);return(o,a)=>(h.openBlock(),h.createElementBlock("section",{class:h.normalizeClass([h.unref(n).b(),h.unref(n).is("vertical",h.unref(i))])},[h.renderSlot(o.$slots,"default")],2))}});var JW=Hr(YW,[["__file","container.vue"]]);const tX=h.defineComponent({name:"ElAside"}),eX=h.defineComponent({...tX,props:{width:{type:String,default:null}},setup(t){const e=t,r=xr("aside"),n=h.computed(()=>e.width?r.cssVarBlock({width:e.width}):{});return(i,o)=>(h.openBlock(),h.createElementBlock("aside",{class:h.normalizeClass(h.unref(r).b()),style:h.normalizeStyle(h.unref(n))},[h.renderSlot(i.$slots,"default")],6))}});var fE=Hr(eX,[["__file","aside.vue"]]);const rX=h.defineComponent({name:"ElFooter"}),nX=h.defineComponent({...rX,props:{height:{type:String,default:null}},setup(t){const e=t,r=xr("footer"),n=h.computed(()=>e.height?r.cssVarBlock({height:e.height}):{});return(i,o)=>(h.openBlock(),h.createElementBlock("footer",{class:h.normalizeClass(h.unref(r).b()),style:h.normalizeStyle(h.unref(n))},[h.renderSlot(i.$slots,"default")],6))}});var QE=Hr(nX,[["__file","footer.vue"]]);const iX=h.defineComponent({name:"ElHeader"}),oX=h.defineComponent({...iX,props:{height:{type:String,default:null}},setup(t){const e=t,r=xr("header"),n=h.computed(()=>e.height?r.cssVarBlock({height:e.height}):{});return(i,o)=>(h.openBlock(),h.createElementBlock("header",{class:h.normalizeClass(h.unref(r).b()),style:h.normalizeStyle(h.unref(n))},[h.renderSlot(i.$slots,"default")],6))}});var mE=Hr(oX,[["__file","header.vue"]]);const aX=h.defineComponent({name:"ElMain"}),sX=h.defineComponent({...aX,setup(t){const e=xr("main");return(r,n)=>(h.openBlock(),h.createElementBlock("main",{class:h.normalizeClass(h.unref(e).b())},[h.renderSlot(r.$slots,"default")],2))}});var gE=Hr(sX,[["__file","main.vue"]]);const lX=mi(JW,{Aside:fE,Footer:QE,Header:mE,Main:gE});A2(fE),A2(QE),A2(mE);const yE=A2(gE),cX=on({mask:{type:Boolean,default:!0},customMaskEvent:{type:Boolean,default:!1},overlayClass:{type:_r([String,Array,Object])},zIndex:{type:_r([String,Number])}}),uX={click:t=>t instanceof MouseEvent},hX="overlay";var dX=h.defineComponent({name:"ElOverlay",props:cX,emits:uX,setup(t,{slots:e,emit:r}){const n=xr(hX),i=d=>{r("click",d)},{onClick:o,onMousedown:a,onMouseup:s}=ow(t.customMaskEvent?void 0:i);return()=>t.mask?h.createVNode("div",{class:[n.b(),t.overlayClass],style:{zIndex:t.zIndex},onClick:o,onMousedown:a,onMouseup:s},[h.renderSlot(e,"default")],T9.STYLE|T9.CLASS|T9.PROPS,["onClick","onMouseup","onMousedown"]):h.h("div",{class:t.overlayClass,style:{zIndex:t.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[h.renderSlot(e,"default")])}});const pX=dX,_E=Symbol("dialogInjectionKey"),vE=on({center:Boolean,alignCenter:Boolean,closeIcon:{type:ps},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),TX={close:()=>!0},fX=["aria-level"],QX=["aria-label"],mX=["id"],gX=h.defineComponent({name:"ElDialogContent"}),yX=h.defineComponent({...gX,props:vE,emits:TX,setup(t){const e=t,{t:r}=Tl(),{Close:n}=RU,{dialogRef:i,headerRef:o,bodyId:a,ns:s,style:d}=h.inject(_E),{focusTrapRef:p}=h.inject(Sw),f=h.computed(()=>[s.b(),s.is("fullscreen",e.fullscreen),s.is("draggable",e.draggable),s.is("align-center",e.alignCenter),{[s.m("center")]:e.center}]),Q=BU(p,i),m=h.computed(()=>e.draggable),_=h.computed(()=>e.overflow);return zU(i,o,m,_),(v,b)=>(h.openBlock(),h.createElementBlock("div",{ref:h.unref(Q),class:h.normalizeClass(h.unref(f)),style:h.normalizeStyle(h.unref(d)),tabindex:"-1"},[h.createElementVNode("header",{ref_key:"headerRef",ref:o,class:h.normalizeClass([h.unref(s).e("header"),{"show-close":v.showClose}])},[h.renderSlot(v.$slots,"header",{},()=>[h.createElementVNode("span",{role:"heading","aria-level":v.ariaLevel,class:h.normalizeClass(h.unref(s).e("title"))},h.toDisplayString(v.title),11,fX)]),v.showClose?(h.openBlock(),h.createElementBlock("button",{key:0,"aria-label":h.unref(r)("el.dialog.close"),class:h.normalizeClass(h.unref(s).e("headerbtn")),type:"button",onClick:b[0]||(b[0]=M=>v.$emit("close"))},[h.createVNode(h.unref(F1),{class:h.normalizeClass(h.unref(s).e("close"))},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(v.closeIcon||h.unref(n))))]),_:1},8,["class"])],10,QX)):h.createCommentVNode("v-if",!0)],2),h.createElementVNode("div",{id:h.unref(a),class:h.normalizeClass(h.unref(s).e("body"))},[h.renderSlot(v.$slots,"default")],10,mX),v.$slots.footer?(h.openBlock(),h.createElementBlock("footer",{key:0,class:h.normalizeClass(h.unref(s).e("footer"))},[h.renderSlot(v.$slots,"footer")],2)):h.createCommentVNode("v-if",!0)],6))}});var _X=Hr(yX,[["__file","dialog-content.vue"]]);const vX=on({...vE,appendToBody:Boolean,appendTo:{type:_r(String),default:"body"},beforeClose:{type:_r(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:{type:Boolean,default:!1},headerAriaLevel:{type:String,default:"2"}}),bX={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[f1]:t=>hs(t),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},LX=(t,e)=>{var r;const i=h.getCurrentInstance().emit,{nextZIndex:o}=Zf();let a="";const s=C4(),d=C4(),p=h.ref(!1),f=h.ref(!1),Q=h.ref(!1),m=h.ref((r=t.zIndex)!=null?r:o());let _,v;const b=b9("namespace",Ql),M=h.computed(()=>{const ee={},ue=`--${b.value}-dialog`;return t.fullscreen||(t.top&&(ee[`${ue}-margin-top`]=t.top),t.width&&(ee[`${ue}-width`]=ds(t.width))),ee}),E=h.computed(()=>t.alignCenter?{display:"flex"}:{});function V(){i("opened")}function O(){i("closed"),i(f1,!1),t.destroyOnClose&&(Q.value=!1)}function R(){i("close")}function j(){v==null||v(),_==null||_(),t.openDelay&&t.openDelay>0?{stop:_}=mL(()=>tt(),t.openDelay):tt()}function G(){_==null||_(),v==null||v(),t.closeDelay&&t.closeDelay>0?{stop:v}=mL(()=>ot(),t.closeDelay):ot()}function z(){function ee(ue){ue||(f.value=!0,p.value=!1)}t.beforeClose?t.beforeClose(ee):G()}function J(){t.closeOnClickModal&&z()}function tt(){T1&&(p.value=!0)}function ot(){p.value=!1}function et(){i("openAutoFocus")}function Tt(){i("closeAutoFocus")}function At(ee){var ue;((ue=ee.detail)==null?void 0:ue.focusReason)==="pointer"&&ee.preventDefault()}t.lockScroll&&cG(p);function Ut(){t.closeOnPressEscape&&z()}return h.watch(()=>t.modelValue,ee=>{ee?(f.value=!1,j(),Q.value=!0,m.value=Qx(t.zIndex)?o():m.value++,h.nextTick(()=>{i("open"),e.value&&(e.value.scrollTop=0)})):p.value&&G()}),h.watch(()=>t.fullscreen,ee=>{e.value&&(ee?(a=e.value.style.transform,e.value.style.transform=""):e.value.style.transform=a)}),h.onMounted(()=>{t.modelValue&&(p.value=!0,Q.value=!0,j())}),{afterEnter:V,afterLeave:O,beforeLeave:R,handleClose:z,onModalClick:J,close:G,doClose:ot,onOpenAutoFocus:et,onCloseAutoFocus:Tt,onCloseRequested:Ut,onFocusoutPrevented:At,titleId:s,bodyId:d,closed:f,style:M,overlayDialogStyle:E,rendered:Q,visible:p,zIndex:m}},xX=["aria-label","aria-labelledby","aria-describedby"],wX=h.defineComponent({name:"ElDialog",inheritAttrs:!1}),EX=h.defineComponent({...wX,props:vX,emits:bX,setup(t,{expose:e}){const r=t,n=h.useSlots();Af({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},h.computed(()=>!!n.title));const i=xr("dialog"),o=h.ref(),a=h.ref(),s=h.ref(),{visible:d,titleId:p,bodyId:f,style:Q,overlayDialogStyle:m,rendered:_,zIndex:v,afterEnter:b,afterLeave:M,beforeLeave:E,handleClose:V,onModalClick:O,onOpenAutoFocus:R,onCloseAutoFocus:j,onCloseRequested:G,onFocusoutPrevented:z}=LX(r,o);h.provide(_E,{dialogRef:o,headerRef:a,bodyId:f,ns:i,rendered:_,style:Q});const J=ow(O),tt=h.computed(()=>r.draggable&&!r.fullscreen);return e({visible:d,dialogContentRef:s}),(ot,et)=>(h.openBlock(),h.createBlock(h.Teleport,{to:ot.appendTo,disabled:ot.appendTo!=="body"?!1:!ot.appendToBody},[h.createVNode(h.Transition,{name:"dialog-fade",onAfterEnter:h.unref(b),onAfterLeave:h.unref(M),onBeforeLeave:h.unref(E),persisted:""},{default:h.withCtx(()=>[h.withDirectives(h.createVNode(h.unref(pX),{"custom-mask-event":"",mask:ot.modal,"overlay-class":ot.modalClass,"z-index":h.unref(v)},{default:h.withCtx(()=>[h.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":ot.title||void 0,"aria-labelledby":ot.title?void 0:h.unref(p),"aria-describedby":h.unref(f),class:h.normalizeClass(`${h.unref(i).namespace.value}-overlay-dialog`),style:h.normalizeStyle(h.unref(m)),onClick:et[0]||(et[0]=(...Tt)=>h.unref(J).onClick&&h.unref(J).onClick(...Tt)),onMousedown:et[1]||(et[1]=(...Tt)=>h.unref(J).onMousedown&&h.unref(J).onMousedown(...Tt)),onMouseup:et[2]||(et[2]=(...Tt)=>h.unref(J).onMouseup&&h.unref(J).onMouseup(...Tt))},[h.createVNode(h.unref(Pw),{loop:"",trapped:h.unref(d),"focus-start-el":"container",onFocusAfterTrapped:h.unref(R),onFocusAfterReleased:h.unref(j),onFocusoutPrevented:h.unref(z),onReleaseRequested:h.unref(G)},{default:h.withCtx(()=>[h.unref(_)?(h.openBlock(),h.createBlock(_X,h.mergeProps({key:0,ref_key:"dialogContentRef",ref:s},ot.$attrs,{center:ot.center,"align-center":ot.alignCenter,"close-icon":ot.closeIcon,draggable:h.unref(tt),overflow:ot.overflow,fullscreen:ot.fullscreen,"show-close":ot.showClose,title:ot.title,"aria-level":ot.headerAriaLevel,onClose:h.unref(V)}),h.createSlots({header:h.withCtx(()=>[ot.$slots.title?h.renderSlot(ot.$slots,"title",{key:1}):h.renderSlot(ot.$slots,"header",{key:0,close:h.unref(V),titleId:h.unref(p),titleClass:h.unref(i).e("title")})]),default:h.withCtx(()=>[h.renderSlot(ot.$slots,"default")]),_:2},[ot.$slots.footer?{name:"footer",fn:h.withCtx(()=>[h.renderSlot(ot.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):h.createCommentVNode("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,xX)]),_:3},8,["mask","overlay-class","z-index"]),[[h.vShow,h.unref(d)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])],8,["to","disabled"]))}});var MX=Hr(EX,[["__file","dialog.vue"]]);const HX=mi(MX),SX=h.defineComponent({inheritAttrs:!1});function CX(t,e,r,n,i,o){return h.renderSlot(t.$slots,"default")}var AX=Hr(SX,[["render",CX],["__file","collection.vue"]]);const VX=h.defineComponent({name:"ElCollectionItem",inheritAttrs:!1});function OX(t,e,r,n,i,o){return h.renderSlot(t.$slots,"default")}var kX=Hr(VX,[["render",OX],["__file","collection-item.vue"]]);const PX="data-el-collection-item",IX=t=>{const e=`El${t}Collection`,r=`${e}Item`,n=Symbol(e),i=Symbol(r),o={...AX,name:e,setup(){const s=h.ref(null),d=new Map,p=()=>{const f=h.unref(s);if(!f)return[];const Q=Array.from(f.querySelectorAll(`[${PX}]`));return[...d.values()].sort((_,v)=>Q.indexOf(_.ref)-Q.indexOf(v.ref))};h.provide(n,{itemMap:d,getItems:p,collectionRef:s})}},a={...kX,name:r,setup(s,{attrs:d}){const p=h.ref(null),f=h.inject(n,void 0);h.provide(i,{collectionItemRef:p}),h.onMounted(()=>{const Q=h.unref(p);Q&&f.itemMap.set(Q,{ref:Q,...d})}),h.onBeforeUnmount(()=>{const Q=h.unref(p);f.itemMap.delete(Q)})}};return{COLLECTION_INJECTION_KEY:n,COLLECTION_ITEM_INJECTION_KEY:i,ElCollection:o,ElCollectionItem:a}},dQ=on({trigger:wl.trigger,effect:{...Oo.effect,default:"light"},type:{type:_r(String)},placement:{type:_r(String),default:"bottom"},popperOptions:{type:_r(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:_r([Number,String]),default:0},maxHeight:{type:_r([Number,String]),default:""},popperClass:{type:String,default:""},disabled:{type:Boolean,default:!1},role:{type:String,default:"menu"},buttonProps:{type:_r(Object)},teleported:Oo.teleported});on({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:ps}}),on({onKeydown:{type:_r(Function)}}),IX("Dropdown");const bE=Symbol("ElSelectGroup"),O9=Symbol("ElSelect");function RX(t,e){const r=h.inject(O9),n=h.inject(bE,{disabled:!1}),i=h.computed(()=>r.props.multiple?f(r.props.modelValue,t.value):f([r.props.modelValue],t.value)),o=h.computed(()=>{if(r.props.multiple){const _=r.props.modelValue||[];return!i.value&&_.length>=r.props.multipleLimit&&r.props.multipleLimit>0}else return!1}),a=h.computed(()=>t.label||(Qi(t.value)?"":t.value)),s=h.computed(()=>t.value||t.label||""),d=h.computed(()=>t.disabled||e.groupDisabled||o.value),p=h.getCurrentInstance(),f=(_=[],v)=>{if(Qi(t.value)){const b=r.props.valueKey;return _&&_.some(M=>h.toRaw(cs(M,b))===cs(v,b))}else return _&&_.includes(v)},Q=()=>{!t.disabled&&!n.disabled&&(r.states.hoveringIndex=r.optionsArray.indexOf(p.proxy))},m=_=>{const v=new RegExp(cU(_),"i");e.visible=v.test(a.value)||t.created};return h.watch(()=>a.value,()=>{!t.created&&!r.props.remote&&r.setSelected()}),h.watch(()=>t.value,(_,v)=>{const{remote:b,valueKey:M}=r.props;if(hl(_,v)||(r.onOptionDestroy(v,p.proxy),r.onOptionCreate(p.proxy)),!t.created&&!b){if(M&&Qi(_)&&Qi(v)&&_[M]===v[M])return;r.setSelected()}}),h.watch(()=>n.disabled,()=>{e.groupDisabled=n.disabled},{immediate:!0}),{select:r,currentLabel:a,currentValue:s,itemSelected:i,isDisabled:d,hoverItem:Q,updateOption:m}}const NX=h.defineComponent({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(t){const e=xr("select"),r=C4(),n=h.computed(()=>[e.be("dropdown","item"),e.is("disabled",h.unref(s)),e.is("selected",h.unref(a)),e.is("hovering",h.unref(m))]),i=h.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:o,itemSelected:a,isDisabled:s,select:d,hoverItem:p,updateOption:f}=RX(t,i),{visible:Q,hover:m}=h.toRefs(i),_=h.getCurrentInstance().proxy;d.onOptionCreate(_),h.onBeforeUnmount(()=>{const b=_.value,{selected:M}=d.states,V=(d.props.multiple?M:[M]).some(O=>O.value===_.value);h.nextTick(()=>{d.states.cachedOptions.get(b)===_&&!V&&d.states.cachedOptions.delete(b)}),d.onOptionDestroy(b,_)});function v(){t.disabled!==!0&&i.groupDisabled!==!0&&d.handleOptionSelect(_)}return{ns:e,id:r,containerKls:n,currentLabel:o,itemSelected:a,isDisabled:s,select:d,hoverItem:p,updateOption:f,visible:Q,hover:m,selectOptionClick:v,states:i}}}),BX=["id","aria-disabled","aria-selected"];function DX(t,e,r,n,i,o){return h.withDirectives((h.openBlock(),h.createElementBlock("li",{id:t.id,class:h.normalizeClass(t.containerKls),role:"option","aria-disabled":t.isDisabled||void 0,"aria-selected":t.itemSelected,onMouseenter:e[0]||(e[0]=(...a)=>t.hoverItem&&t.hoverItem(...a)),onClick:e[1]||(e[1]=h.withModifiers((...a)=>t.selectOptionClick&&t.selectOptionClick(...a),["stop"]))},[h.renderSlot(t.$slots,"default",{},()=>[h.createElementVNode("span",null,h.toDisplayString(t.currentLabel),1)])],42,BX)),[[h.vShow,t.visible]])}var pQ=Hr(NX,[["render",DX],["__file","option.vue"]]);const FX=h.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const t=h.inject(O9),e=xr("select"),r=h.computed(()=>t.props.popperClass),n=h.computed(()=>t.props.multiple),i=h.computed(()=>t.props.fitInputWidth),o=h.ref("");function a(){var s;o.value=`${(s=t.selectRef)==null?void 0:s.offsetWidth}px`}return h.onMounted(()=>{a(),os(t.selectRef,a)}),{ns:e,minWidth:o,popperClass:r,isMultiple:n,isFitInputWidth:i}}});function jX(t,e,r,n,i,o){return h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass([t.ns.b("dropdown"),t.ns.is("multiple",t.isMultiple),t.popperClass]),style:h.normalizeStyle({[t.isFitInputWidth?"width":"minWidth"]:t.minWidth})},[t.$slots.header?(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(t.ns.be("dropdown","header"))},[h.renderSlot(t.$slots,"header")],2)):h.createCommentVNode("v-if",!0),h.renderSlot(t.$slots,"default"),t.$slots.footer?(h.openBlock(),h.createElementBlock("div",{key:1,class:h.normalizeClass(t.ns.be("dropdown","footer"))},[h.renderSlot(t.$slots,"footer")],2)):h.createCommentVNode("v-if",!0)],6)}var zX=Hr(FX,[["render",jX],["__file","select-dropdown.vue"]]);function UX(t){const e=h.ref(!1);return{handleCompositionStart:()=>{e.value=!0},handleCompositionUpdate:o=>{const a=o.target.value,s=a[a.length-1]||"";e.value=!Hx(s)},handleCompositionEnd:o=>{e.value&&(e.value=!1,po(t)&&t(o))}}}const GX=11,ZX=(t,e)=>{const{t:r}=Tl(),n=C4(),i=xr("select"),o=xr("input"),a=h.reactive({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:t.multiple?[]:{},selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1});Af({from:"suffixTransition",replacement:"override style scheme",version:"2.3.0",scope:"props",ref:"https://element-plus.org/en-US/component/select.html#select-attributes"},h.computed(()=>t.suffixTransition===!1));const s=h.ref(null),d=h.ref(null),p=h.ref(null),f=h.ref(null),Q=h.ref(null),m=h.ref(null),_=h.ref(null),v=h.ref(null),b=h.ref(null),M=h.ref(null),E=h.ref(null),V=h.ref(null),{wrapperRef:O,isFocused:R,handleFocus:j,handleBlur:G}=$f(Q,{afterFocus(){t.automaticDropdown&&!z.value&&(z.value=!0,a.menuVisibleOnFocus=!0)},beforeBlur(Vt){var Jt,we;return((Jt=p.value)==null?void 0:Jt.isFocusInsideContent(Vt))||((we=f.value)==null?void 0:we.isFocusInsideContent(Vt))},afterBlur(){z.value=!1,a.menuVisibleOnFocus=!1}}),z=h.ref(!1),J=h.ref(),{form:tt,formItem:ot}=Q3(),{inputId:et}=s5(t,{formItemContext:ot}),Tt=h.computed(()=>t.disabled||(tt==null?void 0:tt.disabled)),At=h.computed(()=>t.multiple?Vi(t.modelValue)&&t.modelValue.length>0:t.modelValue!==void 0&&t.modelValue!==null&&t.modelValue!==""),Ut=h.computed(()=>t.clearable&&!Tt.value&&a.inputHovering&&At.value),ee=h.computed(()=>t.remote&&t.filterable&&!t.remoteShowSuffix?"":t.suffixIcon),ue=h.computed(()=>i.is("reverse",ee.value&&z.value&&t.suffixTransition)),Ft=h.computed(()=>(ot==null?void 0:ot.validateState)||""),pe=h.computed(()=>Ex[Ft.value]),lr=h.computed(()=>t.remote?300:0),Xt=h.computed(()=>t.loading?t.loadingText||r("el.select.loading"):t.remote&&!a.inputValue&&a.options.size===0?!1:t.filterable&&a.inputValue&&a.options.size>0&&le.value===0?t.noMatchText||r("el.select.noMatch"):a.options.size===0?t.noDataText||r("el.select.noData"):null),le=h.computed(()=>ge.value.filter(Vt=>Vt.visible).length),ge=h.computed(()=>{const Vt=Array.from(a.options.values()),Jt=[];return a.optionValues.forEach(we=>{const rr=Vt.findIndex(tr=>tr.value===we);rr>-1&&Jt.push(Vt[rr])}),Jt.length>=Vt.length?Jt:Vt}),Le=h.computed(()=>Array.from(a.cachedOptions.values())),Fe=h.computed(()=>{const Vt=ge.value.filter(Jt=>!Jt.created).some(Jt=>Jt.currentLabel===a.inputValue);return t.filterable&&t.allowCreate&&a.inputValue!==""&&!Vt}),Ge=()=>{t.filterable&&po(t.filterMethod)||t.filterable&&t.remote&&po(t.remoteMethod)||ge.value.forEach(Vt=>{Vt.updateOption(a.inputValue)})},je=f3(),Dt=h.computed(()=>["small"].includes(je.value)?"small":"default"),qt=h.computed({get(){return z.value&&Xt.value!==!1},set(Vt){z.value=Vt}}),he=h.computed(()=>Vi(t.modelValue)?t.modelValue.length===0&&!a.inputValue:t.filterable?!a.inputValue:!0),jt=h.computed(()=>{var Vt;const Jt=(Vt=t.placeholder)!=null?Vt:r("el.select.placeholder");return t.multiple||!At.value?Jt:a.selectedLabel});h.watch(()=>t.modelValue,(Vt,Jt)=>{t.multiple&&t.filterable&&!t.reserveKeyword&&(a.inputValue="",fe("")),Ae(),!hl(Vt,Jt)&&t.validateEvent&&(ot==null||ot.validate("change").catch(we=>K1(we)))},{flush:"post",deep:!0}),h.watch(()=>z.value,Vt=>{Vt?fe(a.inputValue):(a.inputValue="",a.previousQuery=null,a.isBeforeHide=!0),e("visible-change",Vt)}),h.watch(()=>a.options.entries(),()=>{var Vt;if(!T1)return;const Jt=((Vt=s.value)==null?void 0:Vt.querySelectorAll("input"))||[];(!t.filterable&&!t.defaultFirstOption&&!dl(t.modelValue)||!Array.from(Jt).includes(document.activeElement))&&Ae(),t.defaultFirstOption&&(t.filterable||t.remote)&&le.value&&Ne()},{flush:"post"}),h.watch(()=>a.hoveringIndex,Vt=>{X1(Vt)&&Vt>-1?J.value=ge.value[Vt]||{}:J.value={},ge.value.forEach(Jt=>{Jt.hover=J.value===Jt})}),h.watchEffect(()=>{a.isBeforeHide||Ge()});const fe=Vt=>{a.previousQuery!==Vt&&(a.previousQuery=Vt,t.filterable&&po(t.filterMethod)?t.filterMethod(Vt):t.filterable&&t.remote&&po(t.remoteMethod)&&t.remoteMethod(Vt),t.defaultFirstOption&&(t.filterable||t.remote)&&le.value?h.nextTick(Ne):h.nextTick(ke))},Ne=()=>{const Vt=ge.value.filter(rr=>rr.visible&&!rr.disabled&&!rr.states.groupDisabled),Jt=Vt.find(rr=>rr.created),we=Vt[0];a.hoveringIndex=Bn(ge.value,Jt||we)},Ae=()=>{if(t.multiple)a.selectedLabel="";else{const Jt=Ve(t.modelValue);a.selectedLabel=Jt.currentLabel,a.selected=Jt;return}const Vt=[];Vi(t.modelValue)&&t.modelValue.forEach(Jt=>{Vt.push(Ve(Jt))}),a.selected=Vt},Ve=Vt=>{let Jt;const we=df(Vt).toLowerCase()==="object",rr=df(Vt).toLowerCase()==="null",tr=df(Vt).toLowerCase()==="undefined";for(let en=a.cachedOptions.size-1;en>=0;en--){const Ze=Le.value[en];if(we?cs(Ze.value,t.valueKey)===cs(Vt,t.valueKey):Ze.value===Vt){Jt={value:Vt,currentLabel:Ze.currentLabel,isDisabled:Ze.isDisabled};break}}if(Jt)return Jt;const Dr=we?Vt.label:!rr&&!tr?Vt:"";return{value:Vt,currentLabel:Dr}},ke=()=>{t.multiple?a.selected.length>0?a.hoveringIndex=Math.min(...a.selected.map(Vt=>ge.value.findIndex(Jt=>gt(Jt)===gt(Vt)))):a.hoveringIndex=-1:a.hoveringIndex=ge.value.findIndex(Vt=>gt(Vt)===gt(a.selected))},ze=()=>{a.selectionWidth=d.value.getBoundingClientRect().width},zt=()=>{a.calculatorWidth=m.value.getBoundingClientRect().width},Pr=()=>{a.collapseItemWidth=E.value.getBoundingClientRect().width},mn=()=>{var Vt,Jt;(Jt=(Vt=p.value)==null?void 0:Vt.updatePopper)==null||Jt.call(Vt)},We=()=>{var Vt,Jt;(Jt=(Vt=f.value)==null?void 0:Vt.updatePopper)==null||Jt.call(Vt)},br=()=>{a.inputValue.length>0&&!z.value&&(z.value=!0),fe(a.inputValue)},Nn=Vt=>{if(a.inputValue=Vt.target.value,t.remote)S1();else return br()},S1=fx(()=>{br()},lr.value),wn=Vt=>{hl(t.modelValue,Vt)||e(p9,Vt)},ye=Vt=>nU(Vt,Jt=>!a.disabledOptions.has(Jt)),cr=Vt=>{if(t.multiple&&Vt.code!==Xi.delete&&Vt.target.value.length<=0){const Jt=t.modelValue.slice(),we=ye(Jt);if(we<0)return;Jt.splice(we,1),e(f1,Jt),wn(Jt)}},Wr=(Vt,Jt)=>{const we=a.selected.indexOf(Jt);if(we>-1&&!Tt.value){const rr=t.modelValue.slice();rr.splice(we,1),e(f1,rr),wn(rr),e("remove-tag",Jt.value)}Vt.stopPropagation(),sr()},$n=Vt=>{Vt.stopPropagation();const Jt=t.multiple?[]:"";if(!W1(Jt))for(const we of a.selected)we.isDisabled&&Jt.push(we.value);e(f1,Jt),wn(Jt),a.hoveringIndex=-1,z.value=!1,e("clear"),sr()},Qe=Vt=>{if(t.multiple){const Jt=(t.modelValue||[]).slice(),we=Bn(Jt,Vt.value);we>-1?Jt.splice(we,1):(t.multipleLimit<=0||Jt.length<t.multipleLimit)&&Jt.push(Vt.value),e(f1,Jt),wn(Jt),Vt.created&&fe(""),t.filterable&&!t.reserveKeyword&&(a.inputValue="")}else e(f1,Vt.value),wn(Vt.value),z.value=!1;sr(),!z.value&&h.nextTick(()=>{Tn(Vt)})},Bn=(Vt=[],Jt)=>{if(!Qi(Jt))return Vt.indexOf(Jt);const we=t.valueKey;let rr=-1;return Vt.some((tr,Dr)=>h.toRaw(cs(tr,we))===cs(Jt,we)?(rr=Dr,!0):!1),rr},Tn=Vt=>{var Jt,we,rr,tr,Dr;const Gr=Vi(Vt)?Vt[0]:Vt;let en=null;if(Gr!=null&&Gr.value){const Ze=ge.value.filter(Xr=>Xr.value===Gr.value);Ze.length>0&&(en=Ze[0].$el)}if(p.value&&en){const Ze=(tr=(rr=(we=(Jt=p.value)==null?void 0:Jt.popperRef)==null?void 0:we.contentRef)==null?void 0:rr.querySelector)==null?void 0:tr.call(rr,`.${i.be("dropdown","wrap")}`);Ze&&dU(Ze,en)}(Dr=V.value)==null||Dr.handleScroll()},ci=Vt=>{a.options.set(Vt.value,Vt),a.cachedOptions.set(Vt.value,Vt),Vt.disabled&&a.disabledOptions.set(Vt.value,Vt)},ui=(Vt,Jt)=>{a.options.get(Vt)===Jt&&a.options.delete(Vt)},{handleCompositionStart:be,handleCompositionUpdate:yr,handleCompositionEnd:ur}=UX(Vt=>Nn(Vt)),r1=h.computed(()=>{var Vt,Jt;return(Jt=(Vt=p.value)==null?void 0:Vt.popperRef)==null?void 0:Jt.contentRef}),n1=()=>{h.nextTick(()=>Tn(a.selected))},sr=()=>{var Vt;(Vt=Q.value)==null||Vt.focus()},Li=()=>{mt()},C1=Vt=>{$n(Vt)},mt=Vt=>{if(z.value=!1,R.value){const Jt=new FocusEvent("focus",Vt);h.nextTick(()=>G(Jt))}},nt=()=>{a.inputValue.length>0?a.inputValue="":z.value=!1},st=()=>{Tt.value||(a.menuVisibleOnFocus?a.menuVisibleOnFocus=!1:z.value=!z.value)},ht=()=>{z.value?ge.value[a.hoveringIndex]&&Qe(ge.value[a.hoveringIndex]):st()},gt=Vt=>Qi(Vt.value)?cs(Vt.value,t.valueKey):Vt.value,St=h.computed(()=>ge.value.filter(Vt=>Vt.visible).every(Vt=>Vt.disabled)),Ct=h.computed(()=>t.multiple?t.collapseTags?a.selected.slice(0,t.maxCollapseTags):a.selected:[]),Ot=h.computed(()=>t.multiple?t.collapseTags?a.selected.slice(t.maxCollapseTags):[]:[]),Et=Vt=>{if(!z.value){z.value=!0;return}if(!(a.options.size===0||le.value===0)&&!St.value){Vt==="next"?(a.hoveringIndex++,a.hoveringIndex===a.options.size&&(a.hoveringIndex=0)):Vt==="prev"&&(a.hoveringIndex--,a.hoveringIndex<0&&(a.hoveringIndex=a.options.size-1));const Jt=ge.value[a.hoveringIndex];(Jt.disabled===!0||Jt.states.groupDisabled===!0||!Jt.visible)&&Et(Vt),h.nextTick(()=>Tn(J.value))}},Rt=()=>{if(!d.value)return 0;const Vt=window.getComputedStyle(d.value);return Number.parseFloat(Vt.gap||"6px")},oe=h.computed(()=>{const Vt=Rt();return{maxWidth:`${E.value&&t.maxCollapseTags===1?a.selectionWidth-a.collapseItemWidth-Vt:a.selectionWidth}px`}}),Kt=h.computed(()=>({maxWidth:`${a.selectionWidth}px`})),re=h.computed(()=>({width:`${Math.max(a.calculatorWidth,GX)}px`}));return t.multiple&&!Vi(t.modelValue)&&e(f1,[]),!t.multiple&&Vi(t.modelValue)&&e(f1,""),os(d,ze),os(m,zt),os(b,mn),os(O,mn),os(M,We),os(E,Pr),h.onMounted(()=>{Ae()}),{inputId:et,contentId:n,nsSelect:i,nsInput:o,states:a,isFocused:R,expanded:z,optionsArray:ge,hoverOption:J,selectSize:je,filteredOptionsCount:le,resetCalculatorWidth:zt,updateTooltip:mn,updateTagTooltip:We,debouncedOnInputChange:S1,onInput:Nn,deletePrevTag:cr,deleteTag:Wr,deleteSelected:$n,handleOptionSelect:Qe,scrollToOption:Tn,hasModelValue:At,shouldShowPlaceholder:he,currentPlaceholder:jt,showClose:Ut,iconComponent:ee,iconReverse:ue,validateState:Ft,validateIcon:pe,showNewOption:Fe,updateOptions:Ge,collapseTagSize:Dt,setSelected:Ae,selectDisabled:Tt,emptyText:Xt,handleCompositionStart:be,handleCompositionUpdate:yr,handleCompositionEnd:ur,onOptionCreate:ci,onOptionDestroy:ui,handleMenuEnter:n1,handleFocus:j,focus:sr,blur:Li,handleBlur:G,handleClearClick:C1,handleClickOutside:mt,handleEsc:nt,toggleMenu:st,selectOption:ht,getValueKey:gt,navigateOptions:Et,dropdownMenuVisible:qt,showTagList:Ct,collapseTagList:Ot,tagStyle:oe,collapseTagStyle:Kt,inputStyle:re,popperRef:r1,inputRef:Q,tooltipRef:p,tagTooltipRef:f,calculatorRef:m,prefixRef:_,suffixRef:v,selectRef:s,wrapperRef:O,selectionRef:d,scrollbarRef:V,menuRef:b,tagMenuRef:M,collapseItemRef:E}};var $X=h.defineComponent({name:"ElOptions",setup(t,{slots:e}){const r=h.inject(O9);let n=[];return()=>{var i,o;const a=(i=e.default)==null?void 0:i.call(e),s=[];function d(p){Vi(p)&&p.forEach(f=>{var Q,m,_,v;const b=(Q=(f==null?void 0:f.type)||{})==null?void 0:Q.name;b==="ElOptionGroup"?d(!W1(f.children)&&!Vi(f.children)&&po((m=f.children)==null?void 0:m.default)?(_=f.children)==null?void 0:_.default():f.children):b==="ElOption"?s.push((v=f.props)==null?void 0:v.value):Vi(f.children)&&d(f.children)})}return a.length&&d((o=a[0])==null?void 0:o.children),hl(s,n)||(n=s,r&&(r.states.optionValues=s)),a}}});const qX=on({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:T3,effect:{type:_r(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:_r(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:Oo.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:ps,default:Sf},fitInputWidth:Boolean,suffixIcon:{type:ps,default:d3},tagType:{...lE.type,default:"info"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,suffixTransition:{type:Boolean,default:!0},placement:{type:_r(String),values:Q9,default:"bottom-start"},ariaLabel:{type:String,default:void 0}}),LE="ElSelect",WX=h.defineComponent({name:LE,componentName:LE,components:{ElInput:L9,ElSelectMenu:zX,ElOption:pQ,ElOptions:$X,ElTag:hW,ElScrollbar:e$,ElTooltip:nQ,ElIcon:F1},directives:{ClickOutside:$w},props:qX,emits:[f1,p9,"remove-tag","clear","visible-change","focus","blur"],setup(t,{emit:e}){const r=ZX(t,e);return h.provide(O9,h.reactive({props:t,states:r.states,optionsArray:r.optionsArray,handleOptionSelect:r.handleOptionSelect,onOptionCreate:r.onOptionCreate,onOptionDestroy:r.onOptionDestroy,selectRef:r.selectRef,setSelected:r.setSelected})),{...r}}}),XX=["id","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],KX=["textContent"];function YX(t,e,r,n,i,o){const a=h.resolveComponent("el-tag"),s=h.resolveComponent("el-tooltip"),d=h.resolveComponent("el-icon"),p=h.resolveComponent("el-option"),f=h.resolveComponent("el-options"),Q=h.resolveComponent("el-scrollbar"),m=h.resolveComponent("el-select-menu"),_=h.resolveDirective("click-outside");return h.withDirectives((h.openBlock(),h.createElementBlock("div",{ref:"selectRef",class:h.normalizeClass([t.nsSelect.b(),t.nsSelect.m(t.selectSize)]),onMouseenter:e[14]||(e[14]=v=>t.states.inputHovering=!0),onMouseleave:e[15]||(e[15]=v=>t.states.inputHovering=!1),onClick:e[16]||(e[16]=h.withModifiers((...v)=>t.toggleMenu&&t.toggleMenu(...v),["stop"]))},[h.createVNode(s,{ref:"tooltipRef",visible:t.dropdownMenuVisible,placement:t.placement,teleported:t.teleported,"popper-class":[t.nsSelect.e("popper"),t.popperClass],"popper-options":t.popperOptions,"fallback-placements":["bottom-start","top-start","right","left"],effect:t.effect,pure:"",trigger:"click",transition:`${t.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:t.persistent,onBeforeShow:t.handleMenuEnter,onHide:e[13]||(e[13]=v=>t.states.isBeforeHide=!1)},{default:h.withCtx(()=>{var v;return[h.createElementVNode("div",{ref:"wrapperRef",class:h.normalizeClass([t.nsSelect.e("wrapper"),t.nsSelect.is("focused",t.isFocused),t.nsSelect.is("hovering",t.states.inputHovering),t.nsSelect.is("filterable",t.filterable),t.nsSelect.is("disabled",t.selectDisabled)])},[t.$slots.prefix?(h.openBlock(),h.createElementBlock("div",{key:0,ref:"prefixRef",class:h.normalizeClass(t.nsSelect.e("prefix"))},[h.renderSlot(t.$slots,"prefix")],2)):h.createCommentVNode("v-if",!0),h.createElementVNode("div",{ref:"selectionRef",class:h.normalizeClass([t.nsSelect.e("selection"),t.nsSelect.is("near",t.multiple&&!t.$slots.prefix&&!!t.states.selected.length)])},[t.multiple?h.renderSlot(t.$slots,"tag",{key:0},()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.showTagList,b=>(h.openBlock(),h.createElementBlock("div",{key:t.getValueKey(b),class:h.normalizeClass(t.nsSelect.e("selected-item"))},[h.createVNode(a,{closable:!t.selectDisabled&&!b.isDisabled,size:t.collapseTagSize,type:t.tagType,"disable-transitions":"",style:h.normalizeStyle(t.tagStyle),onClose:M=>t.deleteTag(M,b)},{default:h.withCtx(()=>[h.createElementVNode("span",{class:h.normalizeClass(t.nsSelect.e("tags-text"))},h.toDisplayString(b.currentLabel),3)]),_:2},1032,["closable","size","type","style","onClose"])],2))),128)),t.collapseTags&&t.states.selected.length>t.maxCollapseTags?(h.openBlock(),h.createBlock(s,{key:0,ref:"tagTooltipRef",disabled:t.dropdownMenuVisible||!t.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:t.effect,placement:"bottom",teleported:t.teleported},{default:h.withCtx(()=>[h.createElementVNode("div",{ref:"collapseItemRef",class:h.normalizeClass(t.nsSelect.e("selected-item"))},[h.createVNode(a,{closable:!1,size:t.collapseTagSize,type:t.tagType,"disable-transitions":"",style:h.normalizeStyle(t.collapseTagStyle)},{default:h.withCtx(()=>[h.createElementVNode("span",{class:h.normalizeClass(t.nsSelect.e("tags-text"))}," + "+h.toDisplayString(t.states.selected.length-t.maxCollapseTags),3)]),_:1},8,["size","type","style"])],2)]),content:h.withCtx(()=>[h.createElementVNode("div",{ref:"tagMenuRef",class:h.normalizeClass(t.nsSelect.e("selection"))},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.collapseTagList,b=>(h.openBlock(),h.createElementBlock("div",{key:t.getValueKey(b),class:h.normalizeClass(t.nsSelect.e("selected-item"))},[h.createVNode(a,{class:"in-tooltip",closable:!t.selectDisabled&&!b.isDisabled,size:t.collapseTagSize,type:t.tagType,"disable-transitions":"",onClose:M=>t.deleteTag(M,b)},{default:h.withCtx(()=>[h.createElementVNode("span",{class:h.normalizeClass(t.nsSelect.e("tags-text"))},h.toDisplayString(b.currentLabel),3)]),_:2},1032,["closable","size","type","onClose"])],2))),128))],2)]),_:1},8,["disabled","effect","teleported"])):h.createCommentVNode("v-if",!0)]):h.createCommentVNode("v-if",!0),t.selectDisabled?h.createCommentVNode("v-if",!0):(h.openBlock(),h.createElementBlock("div",{key:1,class:h.normalizeClass([t.nsSelect.e("selected-item"),t.nsSelect.e("input-wrapper"),t.nsSelect.is("hidden",!t.filterable)])},[h.withDirectives(h.createElementVNode("input",{id:t.inputId,ref:"inputRef","onUpdate:modelValue":e[0]||(e[0]=b=>t.states.inputValue=b),type:"text",class:h.normalizeClass([t.nsSelect.e("input"),t.nsSelect.is(t.selectSize)]),disabled:t.selectDisabled,autocomplete:t.autocomplete,style:h.normalizeStyle(t.inputStyle),role:"combobox",readonly:!t.filterable,spellcheck:"false","aria-activedescendant":((v=t.hoverOption)==null?void 0:v.id)||"","aria-controls":t.contentId,"aria-expanded":t.dropdownMenuVisible,"aria-label":t.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onFocus:e[1]||(e[1]=(...b)=>t.handleFocus&&t.handleFocus(...b)),onBlur:e[2]||(e[2]=(...b)=>t.handleBlur&&t.handleBlur(...b)),onKeydown:[e[3]||(e[3]=h.withKeys(h.withModifiers(b=>t.navigateOptions("next"),["stop","prevent"]),["down"])),e[4]||(e[4]=h.withKeys(h.withModifiers(b=>t.navigateOptions("prev"),["stop","prevent"]),["up"])),e[5]||(e[5]=h.withKeys(h.withModifiers((...b)=>t.handleEsc&&t.handleEsc(...b),["stop","prevent"]),["esc"])),e[6]||(e[6]=h.withKeys(h.withModifiers((...b)=>t.selectOption&&t.selectOption(...b),["stop","prevent"]),["enter"])),e[7]||(e[7]=h.withKeys(h.withModifiers((...b)=>t.deletePrevTag&&t.deletePrevTag(...b),["stop"]),["delete"]))],onCompositionstart:e[8]||(e[8]=(...b)=>t.handleCompositionStart&&t.handleCompositionStart(...b)),onCompositionupdate:e[9]||(e[9]=(...b)=>t.handleCompositionUpdate&&t.handleCompositionUpdate(...b)),onCompositionend:e[10]||(e[10]=(...b)=>t.handleCompositionEnd&&t.handleCompositionEnd(...b)),onInput:e[11]||(e[11]=(...b)=>t.onInput&&t.onInput(...b)),onClick:e[12]||(e[12]=h.withModifiers((...b)=>t.toggleMenu&&t.toggleMenu(...b),["stop"]))},null,46,XX),[[h.vModelText,t.states.inputValue]]),t.filterable?(h.openBlock(),h.createElementBlock("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:h.normalizeClass(t.nsSelect.e("input-calculator")),textContent:h.toDisplayString(t.states.inputValue)},null,10,KX)):h.createCommentVNode("v-if",!0)],2)),t.shouldShowPlaceholder?(h.openBlock(),h.createElementBlock("div",{key:2,class:h.normalizeClass([t.nsSelect.e("selected-item"),t.nsSelect.e("placeholder"),t.nsSelect.is("transparent",!t.hasModelValue||t.expanded&&!t.states.inputValue)])},[h.createElementVNode("span",null,h.toDisplayString(t.currentPlaceholder),1)],2)):h.createCommentVNode("v-if",!0)],2),h.createElementVNode("div",{ref:"suffixRef",class:h.normalizeClass(t.nsSelect.e("suffix"))},[t.iconComponent&&!t.showClose?(h.openBlock(),h.createBlock(d,{key:0,class:h.normalizeClass([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.iconReverse])},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(t.iconComponent)))]),_:1},8,["class"])):h.createCommentVNode("v-if",!0),t.showClose&&t.clearIcon?(h.openBlock(),h.createBlock(d,{key:1,class:h.normalizeClass([t.nsSelect.e("caret"),t.nsSelect.e("icon")]),onClick:t.handleClearClick},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(t.clearIcon)))]),_:1},8,["class","onClick"])):h.createCommentVNode("v-if",!0),t.validateState&&t.validateIcon?(h.openBlock(),h.createBlock(d,{key:2,class:h.normalizeClass([t.nsInput.e("icon"),t.nsInput.e("validateIcon")])},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(t.validateIcon)))]),_:1},8,["class"])):h.createCommentVNode("v-if",!0)],2)],2)]}),content:h.withCtx(()=>[h.createVNode(m,{ref:"menuRef"},{default:h.withCtx(()=>[t.$slots.header?(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(t.nsSelect.be("dropdown","header"))},[h.renderSlot(t.$slots,"header")],2)):h.createCommentVNode("v-if",!0),h.withDirectives(h.createVNode(Q,{id:t.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":t.nsSelect.be("dropdown","wrap"),"view-class":t.nsSelect.be("dropdown","list"),class:h.normalizeClass([t.nsSelect.is("empty",t.filteredOptionsCount===0)]),role:"listbox","aria-label":t.ariaLabel,"aria-orientation":"vertical"},{default:h.withCtx(()=>[t.showNewOption?(h.openBlock(),h.createBlock(p,{key:0,value:t.states.inputValue,created:!0},null,8,["value"])):h.createCommentVNode("v-if",!0),h.createVNode(f,null,{default:h.withCtx(()=>[h.renderSlot(t.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[h.vShow,t.states.options.size>0&&!t.loading]]),t.$slots.loading&&t.loading?(h.openBlock(),h.createElementBlock("div",{key:1,class:h.normalizeClass(t.nsSelect.be("dropdown","loading"))},[h.renderSlot(t.$slots,"loading")],2)):t.loading||t.filteredOptionsCount===0?(h.openBlock(),h.createElementBlock("div",{key:2,class:h.normalizeClass(t.nsSelect.be("dropdown","empty"))},[h.renderSlot(t.$slots,"empty",{},()=>[h.createElementVNode("span",null,h.toDisplayString(t.emptyText),1)])],2)):h.createCommentVNode("v-if",!0),t.$slots.footer?(h.openBlock(),h.createElementBlock("div",{key:3,class:h.normalizeClass(t.nsSelect.be("dropdown","footer"))},[h.renderSlot(t.$slots,"footer")],2)):h.createCommentVNode("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","effect","transition","persistent","onBeforeShow"])],34)),[[_,t.handleClickOutside,t.popperRef]])}var JX=Hr(WX,[["render",YX],["__file","select.vue"]]);const tK=h.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(t){const e=xr("select"),r=h.ref(null),n=h.getCurrentInstance(),i=h.ref([]);h.provide(bE,h.reactive({...h.toRefs(t)}));const o=h.computed(()=>i.value.some(d=>d.visible===!0)),a=d=>{const p=[];return Vi(d.children)&&d.children.forEach(f=>{var Q,m;f.type&&f.type.name==="ElOption"&&f.component&&f.component.proxy?p.push(f.component.proxy):(Q=f.children)!=null&&Q.length?p.push(...a(f)):(m=f.component)!=null&&m.subTree&&p.push(...a(f.component.subTree))}),p},s=()=>{i.value=a(n.subTree)};return h.onMounted(()=>{s()}),nD(r,s,{attributes:!0,subtree:!0,childList:!0}),{groupRef:r,visible:o,ns:e}}});function eK(t,e,r,n,i,o){return h.withDirectives((h.openBlock(),h.createElementBlock("ul",{ref:"groupRef",class:h.normalizeClass(t.ns.be("group","wrap"))},[h.createElementVNode("li",{class:h.normalizeClass(t.ns.be("group","title"))},h.toDisplayString(t.label),3),h.createElementVNode("li",null,[h.createElementVNode("ul",{class:h.normalizeClass(t.ns.b("group"))},[h.renderSlot(t.$slots,"default")],2)])],2)),[[h.vShow,t.visible]])}var xE=Hr(tK,[["render",eK],["__file","option-group.vue"]]);const d5=mi(JX,{Option:pQ,OptionGroup:xE}),k9=A2(pQ);A2(xE);const rK=on({trigger:wl.trigger,placement:dQ.placement,disabled:wl.disabled,visible:Oo.visible,transition:Oo.transition,popperOptions:dQ.popperOptions,tabindex:dQ.tabindex,content:Oo.content,popperStyle:Oo.popperStyle,popperClass:Oo.popperClass,enterable:{...Oo.enterable,default:!0},effect:{...Oo.effect,default:"light"},teleported:Oo.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}}),nK={"update:visible":t=>hs(t),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},iK="onUpdate:visible",oK=h.defineComponent({name:"ElPopover"}),aK=h.defineComponent({...oK,props:rK,emits:nK,setup(t,{expose:e,emit:r}){const n=t,i=h.computed(()=>n[iK]),o=xr("popover"),a=h.ref(),s=h.computed(()=>{var M;return(M=h.unref(a))==null?void 0:M.popperRef}),d=h.computed(()=>[{width:ds(n.width)},n.popperStyle]),p=h.computed(()=>[o.b(),n.popperClass,{[o.m("plain")]:!!n.content}]),f=h.computed(()=>n.transition===`${o.namespace.value}-fade-in-linear`),Q=()=>{var M;(M=a.value)==null||M.hide()},m=()=>{r("before-enter")},_=()=>{r("before-leave")},v=()=>{r("after-enter")},b=()=>{r("update:visible",!1),r("after-leave")};return e({popperRef:s,hide:Q}),(M,E)=>(h.openBlock(),h.createBlock(h.unref(nQ),h.mergeProps({ref_key:"tooltipRef",ref:a},M.$attrs,{trigger:M.trigger,placement:M.placement,disabled:M.disabled,visible:M.visible,transition:M.transition,"popper-options":M.popperOptions,tabindex:M.tabindex,content:M.content,offset:M.offset,"show-after":M.showAfter,"hide-after":M.hideAfter,"auto-close":M.autoClose,"show-arrow":M.showArrow,"aria-label":M.title,effect:M.effect,enterable:M.enterable,"popper-class":h.unref(p),"popper-style":h.unref(d),teleported:M.teleported,persistent:M.persistent,"gpu-acceleration":h.unref(f),"onUpdate:visible":h.unref(i),onBeforeShow:m,onBeforeHide:_,onShow:v,onHide:b}),{content:h.withCtx(()=>[M.title?(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(h.unref(o).e("title")),role:"title"},h.toDisplayString(M.title),3)):h.createCommentVNode("v-if",!0),h.renderSlot(M.$slots,"default",{},()=>[h.createTextVNode(h.toDisplayString(M.content),1)])]),default:h.withCtx(()=>[M.$slots.reference?h.renderSlot(M.$slots,"reference",{key:0}):h.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 sK=Hr(aK,[["__file","popover.vue"]]);const wE=(t,e)=>{const r=e.arg||e.value,n=r==null?void 0:r.popperRef;n&&(n.triggerRef=t)};var lK={mounted(t,e){wE(t,e)},updated(t,e){wE(t,e)}};const EE=NU(lK,"popover"),p5=mi(sK,{directive:EE}),T5="$treeNodeId",ME=function(t,e){!e||e[T5]||Object.defineProperty(e,T5,{value:t.id,enumerable:!1,configurable:!1,writable:!1})},TQ=function(t,e){return t?e[t]:e[T5]},fQ=(t,e,r)=>{const n=t.value.currentNode;r();const i=t.value.currentNode;n!==i&&e("current-change",i?i.data:null,i)},QQ=t=>{let e=!0,r=!0,n=!0;for(let i=0,o=t.length;i<o;i++){const a=t[i];(a.checked!==!0||a.indeterminate)&&(e=!1,a.disabled||(n=!1)),(a.checked!==!1||a.indeterminate)&&(r=!1)}return{all:e,none:r,allWithoutDisable:n,half:!e&&!r}},P9=function(t){if(t.childNodes.length===0||t.loading)return;const{all:e,none:r,half:n}=QQ(t.childNodes);e?(t.checked=!0,t.indeterminate=!1):n?(t.checked=!1,t.indeterminate=!0):r&&(t.checked=!1,t.indeterminate=!1);const i=t.parent;!i||i.level===0||t.store.checkStrictly||P9(i)},I9=function(t,e){const r=t.store.props,n=t.data||{},i=r[e];if(typeof i=="function")return i(n,t);if(typeof i=="string")return n[i];if(typeof i>"u"){const o=n[e];return o===void 0?"":o}};let cK=0;class O4{constructor(e){this.id=cK++,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 e)L4(e,r)&&(this[r]=e[r]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){const e=this.store;if(!e)throw new Error("[Node]store is required!");e.registerNode(this);const r=e.props;if(r&&typeof r.isLeaf<"u"){const o=I9(this,"isLeaf");typeof o=="boolean"&&(this.isLeafByUser=o)}if(e.lazy!==!0&&this.data?(this.setData(this.data),e.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&e.lazy&&e.defaultExpandAll&&this.expand(),Array.isArray(this.data)||ME(this,this.data),!this.data)return;const n=e.defaultExpandedKeys,i=e.key;i&&n&&n.includes(this.key)&&this.expand(null,e.autoExpandParent),i&&e.currentNodeKey!==void 0&&this.key===e.currentNodeKey&&(e.currentNode=this,e.currentNode.isCurrent=!0),e.lazy&&e._initDefaultCheckedNode(this),this.updateLeafState(),this.parent&&(this.level===1||this.parent.expanded===!0)&&(this.canFocus=!0)}setData(e){Array.isArray(e)||ME(this,e),this.data=e,this.childNodes=[];let r;this.level===0&&Array.isArray(this.data)?r=this.data:r=I9(this,"children")||[];for(let n=0,i=r.length;n<i;n++)this.insertChild({data:r[n]})}get label(){return I9(this,"label")}get key(){const e=this.store.key;return this.data?this.data[e]:null}get disabled(){return I9(this,"disabled")}get nextSibling(){const e=this.parent;if(e){const r=e.childNodes.indexOf(this);if(r>-1)return e.childNodes[r+1]}return null}get previousSibling(){const e=this.parent;if(e){const r=e.childNodes.indexOf(this);if(r>-1)return r>0?e.childNodes[r-1]:null}return null}contains(e,r=!0){return(this.childNodes||[]).some(n=>n===e||r&&n.contains(e))}remove(){const e=this.parent;e&&e.removeChild(this)}insertChild(e,r,n){if(!e)throw new Error("InsertChild error: child is required.");if(!(e instanceof O4)){if(!n){const i=this.getChildren(!0);i.includes(e.data)||(typeof r>"u"||r<0?i.push(e.data):i.splice(r,0,e.data))}Object.assign(e,{parent:this,store:this.store}),e=h.reactive(new O4(e)),e instanceof O4&&e.initialize()}e.level=this.level+1,typeof r>"u"||r<0?this.childNodes.push(e):this.childNodes.splice(r,0,e),this.updateLeafState()}insertBefore(e,r){let n;r&&(n=this.childNodes.indexOf(r)),this.insertChild(e,n)}insertAfter(e,r){let n;r&&(n=this.childNodes.indexOf(r),n!==-1&&(n+=1)),this.insertChild(e,n)}removeChild(e){const r=this.getChildren()||[],n=r.indexOf(e.data);n>-1&&r.splice(n,1);const i=this.childNodes.indexOf(e);i>-1&&(this.store&&this.store.deregisterNode(e),e.parent=null,this.childNodes.splice(i,1)),this.updateLeafState()}removeChildByData(e){let r=null;for(let n=0;n<this.childNodes.length;n++)if(this.childNodes[n].data===e){r=this.childNodes[n];break}r&&this.removeChild(r)}expand(e,r){const n=()=>{if(r){let i=this.parent;for(;i.level>0;)i.expanded=!0,i=i.parent}this.expanded=!0,e&&e(),this.childNodes.forEach(i=>{i.canFocus=!0})};this.shouldLoadData()?this.loadData(i=>{Array.isArray(i)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||P9(this),n())}):n()}doCreateChildren(e,r={}){e.forEach(n=>{this.insertChild(Object.assign({data:n},r),void 0,!0)})}collapse(){this.expanded=!1,this.childNodes.forEach(e=>{e.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 e=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!e||e.length===0;return}this.isLeaf=!1}setChecked(e,r,n,i){if(this.indeterminate=e==="half",this.checked=e===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:a,allWithoutDisable:s}=QQ(this.childNodes);!this.isLeaf&&!a&&s&&(this.checked=!1,e=!1);const d=()=>{if(r){const p=this.childNodes;for(let m=0,_=p.length;m<_;m++){const v=p[m];i=i||e!==!1;const b=v.disabled?v.checked:i;v.setChecked(b,r,!0,i)}const{half:f,all:Q}=QQ(p);Q||(this.checked=Q,this.indeterminate=f)}};if(this.shouldLoadData()){this.loadData(()=>{d(),P9(this)},{checked:e!==!1});return}else d()}const o=this.parent;!o||o.level===0||n||P9(o)}getChildren(e=!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),e&&!r[i]&&(r[i]=[]),r[i]}updateChildren(){const e=this.getChildren()||[],r=this.childNodes.map(o=>o.data),n={},i=[];e.forEach((o,a)=>{const s=o[T5];!!s&&r.findIndex(p=>p[T5]===s)>=0?n[s]={index:a,data:o}:i.push({index:a,data:o})}),this.store.lazy||r.forEach(o=>{n[o[T5]]||this.removeChildByData(o)}),i.forEach(({index:o,data:a})=>{this.insertChild({data:a},o)}),this.updateLeafState()}loadData(e,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(),e&&e.call(this,i)};this.store.load(this,n)}else e&&e.call(this)}}class uK{constructor(e){this.currentNode=null,this.currentNodeKey=null;for(const r in e)L4(e,r)&&(this[r]=e[r]);this.nodesMap={}}initialize(){if(this.root=new O4({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const e=this.load;e(this.root,r=>{this.root.doCreateChildren(r),this._initDefaultCheckedNodes()})}else this._initDefaultCheckedNodes()}filter(e){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,e,s.data,s),i(s)}),!o.visible&&a.length){let s=!0;s=!a.some(d=>d.visible),o.root?o.root.visible=s===!1:o.visible=s===!1}e&&o.visible&&!o.isLeaf&&(!n||o.loaded)&&o.expand()};i(this)}setData(e){e!==this.root.data?(this.root.setData(e),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(e){if(e instanceof O4)return e;const r=Qi(e)?TQ(this.key,e):e;return this.nodesMap[r]||null}insertBefore(e,r){const n=this.getNode(r);n.parent.insertBefore({data:e},n)}insertAfter(e,r){const n=this.getNode(r);n.parent.insertAfter({data:e},n)}remove(e){const r=this.getNode(e);r&&r.parent&&(r===this.currentNode&&(this.currentNode=null),r.parent.removeChild(r))}append(e,r){const n=r?this.getNode(r):this.root;n&&n.insertChild({data:e})}_initDefaultCheckedNodes(){const e=this.defaultCheckedKeys||[],r=this.nodesMap;e.forEach(n=>{const i=r[n];i&&i.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(e){(this.defaultCheckedKeys||[]).includes(e.key)&&e.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(e){e!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=e,this._initDefaultCheckedNodes())}registerNode(e){const r=this.key;!e||!e.data||(r?e.key!==void 0&&(this.nodesMap[e.key]=e):this.nodesMap[e.id]=e)}deregisterNode(e){!this.key||!e||!e.data||(e.childNodes.forEach(n=>{this.deregisterNode(n)}),delete this.nodesMap[e.key])}getCheckedNodes(e=!1,r=!1){const n=[],i=function(o){(o.root?o.root.childNodes:o.childNodes).forEach(s=>{(s.checked||r&&s.indeterminate)&&(!e||e&&s.isLeaf)&&n.push(s.data),i(s)})};return i(this),n}getCheckedKeys(e=!1){return this.getCheckedNodes(e).map(r=>(r||{})[this.key])}getHalfCheckedNodes(){const e=[],r=function(n){(n.root?n.root.childNodes:n.childNodes).forEach(o=>{o.indeterminate&&e.push(o.data),r(o)})};return r(this),e}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(e=>(e||{})[this.key])}_getAllNodes(){const e=[],r=this.nodesMap;for(const n in r)L4(r,n)&&e.push(r[n]);return e}updateChildren(e,r){const n=this.nodesMap[e];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(e,r=!1,n){const i=this._getAllNodes().sort((d,p)=>d.level-p.level),o=Object.create(null),a=Object.keys(n);i.forEach(d=>d.setChecked(!1,!1));const s=d=>{d.childNodes.forEach(p=>{var f;o[p.data[e]]=!0,(f=p.childNodes)!=null&&f.length&&s(p)})};for(let d=0,p=i.length;d<p;d++){const f=i[d],Q=f.data[e].toString();if(!a.includes(Q)){f.checked&&!o[Q]&&f.setChecked(!1,!1);continue}if(f.childNodes.length&&s(f),f.isLeaf||this.checkStrictly){f.setChecked(!0,!1);continue}if(f.setChecked(!0,!0),r){f.setChecked(!1,!1);const _=function(v){v.childNodes.forEach(M=>{M.isLeaf||M.setChecked(!1,!1),_(M)})};_(f)}}}setCheckedNodes(e,r=!1){const n=this.key,i={};e.forEach(o=>{i[(o||{})[n]]=!0}),this._setCheckedKeys(n,r,i)}setCheckedKeys(e,r=!1){this.defaultCheckedKeys=e;const n=this.key,i={};e.forEach(o=>{i[o]=!0}),this._setCheckedKeys(n,r,i)}setDefaultExpandedKeys(e){e=e||[],this.defaultExpandedKeys=e,e.forEach(r=>{const n=this.getNode(r);n&&n.expand(null,this.autoExpandParent)})}setChecked(e,r,n){const i=this.getNode(e);i&&i.setChecked(!!r,n)}getCurrentNode(){return this.currentNode}setCurrentNode(e){const r=this.currentNode;r&&(r.isCurrent=!1),this.currentNode=e,this.currentNode.isCurrent=!0}setUserCurrentNode(e,r=!0){const n=e[this.key],i=this.nodesMap[n];this.setCurrentNode(i),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(e,r=!0){if(e==null){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const n=this.getNode(e);n&&(this.setCurrentNode(n),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}const hK=h.defineComponent({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(t){const e=xr("tree"),r=h.inject("NodeInstance"),n=h.inject("RootTree");return()=>{const i=t.node,{data:o,store:a}=i;return t.renderContent?t.renderContent(h.h,{_self:r,node:i,data:o,store:a}):h.renderSlot(n.ctx.slots,"default",{node:i,data:o},()=>[h.h("span",{class:e.be("node","label")},[i.label])])}}});var dK=Hr(hK,[["__file","tree-node-content.vue"]]);function HE(t){const e=h.inject("TreeNodeMap",null),r={treeNodeExpand:n=>{t.node!==n&&t.node.collapse()},children:[]};return e&&e.children.push(r),h.provide("TreeNodeMap",r),{broadcastExpanded:n=>{if(t.accordion)for(const i of r.children)i.treeNodeExpand(n)}}}const SE=Symbol("dragEvents");function pK({props:t,ctx:e,el$:r,dropIndicator$:n,store:i}){const o=xr("tree"),a=h.ref({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null}),s=({event:f,treeNode:Q})=>{if(typeof t.allowDrag=="function"&&!t.allowDrag(Q.node))return f.preventDefault(),!1;f.dataTransfer.effectAllowed="move";try{f.dataTransfer.setData("text/plain","")}catch{}a.value.draggingNode=Q,e.emit("node-drag-start",Q.node,f)},d=({event:f,treeNode:Q})=>{const m=Q,_=a.value.dropNode;_&&_.node.id!==m.node.id&&h3(_.$el,o.is("drop-inner"));const v=a.value.draggingNode;if(!v||!m)return;let b=!0,M=!0,E=!0,V=!0;typeof t.allowDrop=="function"&&(b=t.allowDrop(v.node,m.node,"prev"),V=M=t.allowDrop(v.node,m.node,"inner"),E=t.allowDrop(v.node,m.node,"next")),f.dataTransfer.dropEffect=M||b||E?"move":"none",(b||M||E)&&(_==null?void 0:_.node.id)!==m.node.id&&(_&&e.emit("node-drag-leave",v.node,_.node,f),e.emit("node-drag-enter",v.node,m.node,f)),b||M||E?a.value.dropNode=m:a.value.dropNode=null,m.node.nextSibling===v.node&&(E=!1),m.node.previousSibling===v.node&&(b=!1),m.node.contains(v.node,!1)&&(M=!1),(v.node===m.node||v.node.contains(m.node))&&(b=!1,M=!1,E=!1);const O=m.$el.querySelector(`.${o.be("node","content")}`).getBoundingClientRect(),R=r.value.getBoundingClientRect();let j;const G=b?M?.25:E?.45:1:-1,z=E?M?.75:b?.55:0:1;let J=-9999;const tt=f.clientY-O.top;tt<O.height*G?j="before":tt>O.height*z?j="after":M?j="inner":j="none";const ot=m.$el.querySelector(`.${o.be("node","expand-icon")}`).getBoundingClientRect(),et=n.value;j==="before"?J=ot.top-R.top:j==="after"&&(J=ot.bottom-R.top),et.style.top=`${J}px`,et.style.left=`${ot.right-R.left}px`,j==="inner"?l9(m.$el,o.is("drop-inner")):h3(m.$el,o.is("drop-inner")),a.value.showDropIndicator=j==="before"||j==="after",a.value.allowDrop=a.value.showDropIndicator||V,a.value.dropType=j,e.emit("node-drag-over",v.node,m.node,f)},p=f=>{const{draggingNode:Q,dropType:m,dropNode:_}=a.value;if(f.preventDefault(),f.dataTransfer.dropEffect="move",Q&&_){const v={data:Q.node.data};m!=="none"&&Q.node.remove(),m==="before"?_.node.parent.insertBefore(v,_.node):m==="after"?_.node.parent.insertAfter(v,_.node):m==="inner"&&_.node.insertChild(v),m!=="none"&&i.value.registerNode(v),h3(_.$el,o.is("drop-inner")),e.emit("node-drag-end",Q.node,_.node,m,f),m!=="none"&&e.emit("node-drop",Q.node,_.node,m,f)}Q&&!_&&e.emit("node-drag-end",Q.node,null,m,f),a.value.showDropIndicator=!1,a.value.draggingNode=null,a.value.dropNode=null,a.value.allowDrop=!0};return h.provide(SE,{treeNodeDragStart:s,treeNodeDragOver:d,treeNodeDragEnd:p}),{dragState:a}}const TK=h.defineComponent({name:"ElTreeNode",components:{ElCollapseTransition:bW,ElCheckbox:C9,NodeContent:dK,ElIcon:F1,Loading:Cf},props:{node:{type:O4,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(t,e){const r=xr("tree"),{broadcastExpanded:n}=HE(t),i=h.inject("RootTree"),o=h.ref(!1),a=h.ref(!1),s=h.ref(null),d=h.ref(null),p=h.ref(null),f=h.inject(SE),Q=h.getCurrentInstance();h.provide("NodeInstance",Q),i||K1("Tree","Can not find node's tree."),t.node.expanded&&(o.value=!0,a.value=!0);const m=i.props.props.children||"children";h.watch(()=>{const tt=t.node.data[m];return tt&&[...tt]},()=>{t.node.updateChildren()}),h.watch(()=>t.node.indeterminate,tt=>{b(t.node.checked,tt)}),h.watch(()=>t.node.checked,tt=>{b(tt,t.node.indeterminate)}),h.watch(()=>t.node.expanded,tt=>{h.nextTick(()=>o.value=tt),tt&&(a.value=!0)});const _=tt=>TQ(i.props.nodeKey,tt.data),v=tt=>{const ot=t.props.class;if(!ot)return{};let et;if(po(ot)){const{data:Tt}=tt;et=ot(Tt,tt)}else et=ot;return W1(et)?{[et]:!0}:et},b=(tt,ot)=>{(s.value!==tt||d.value!==ot)&&i.ctx.emit("check-change",t.node.data,tt,ot),s.value=tt,d.value=ot},M=tt=>{fQ(i.store,i.ctx.emit,()=>i.store.value.setCurrentNode(t.node)),i.currentNode.value=t.node,i.props.expandOnClickNode&&V(),i.props.checkOnClickNode&&!t.node.disabled&&O(null,{target:{checked:!t.node.checked}}),i.ctx.emit("node-click",t.node.data,t.node,Q,tt)},E=tt=>{i.instance.vnode.props.onNodeContextmenu&&(tt.stopPropagation(),tt.preventDefault()),i.ctx.emit("node-contextmenu",tt,t.node.data,t.node,Q)},V=()=>{t.node.isLeaf||(o.value?(i.ctx.emit("node-collapse",t.node.data,t.node,Q),t.node.collapse()):(t.node.expand(),e.emit("node-expand",t.node.data,t.node,Q)))},O=(tt,ot)=>{t.node.setChecked(ot.target.checked,!i.props.checkStrictly),h.nextTick(()=>{const et=i.store.value;i.ctx.emit("check",t.node.data,{checkedNodes:et.getCheckedNodes(),checkedKeys:et.getCheckedKeys(),halfCheckedNodes:et.getHalfCheckedNodes(),halfCheckedKeys:et.getHalfCheckedKeys()})})};return{ns:r,node$:p,tree:i,expanded:o,childNodeRendered:a,oldChecked:s,oldIndeterminate:d,getNodeKey:_,getNodeClass:v,handleSelectChange:b,handleClick:M,handleContextMenu:E,handleExpandIconClick:V,handleCheckChange:O,handleChildNodeExpand:(tt,ot,et)=>{n(ot),i.ctx.emit("node-expand",tt,ot,et)},handleDragStart:tt=>{i.props.draggable&&f.treeNodeDragStart({event:tt,treeNode:t})},handleDragOver:tt=>{tt.preventDefault(),i.props.draggable&&f.treeNodeDragOver({event:tt,treeNode:{$el:p.value,node:t.node}})},handleDrop:tt=>{tt.preventDefault()},handleDragEnd:tt=>{i.props.draggable&&f.treeNodeDragEnd(tt)},CaretRight:mU}}}),fK=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],QK=["aria-expanded"];function mK(t,e,r,n,i,o){const a=h.resolveComponent("el-icon"),s=h.resolveComponent("el-checkbox"),d=h.resolveComponent("loading"),p=h.resolveComponent("node-content"),f=h.resolveComponent("el-tree-node"),Q=h.resolveComponent("el-collapse-transition");return h.withDirectives((h.openBlock(),h.createElementBlock("div",{ref:"node$",class:h.normalizeClass([t.ns.b("node"),t.ns.is("expanded",t.expanded),t.ns.is("current",t.node.isCurrent),t.ns.is("hidden",!t.node.visible),t.ns.is("focusable",!t.node.disabled),t.ns.is("checked",!t.node.disabled&&t.node.checked),t.getNodeClass(t.node)]),role:"treeitem",tabindex:"-1","aria-expanded":t.expanded,"aria-disabled":t.node.disabled,"aria-checked":t.node.checked,draggable:t.tree.props.draggable,"data-key":t.getNodeKey(t.node),onClick:e[1]||(e[1]=h.withModifiers((...m)=>t.handleClick&&t.handleClick(...m),["stop"])),onContextmenu:e[2]||(e[2]=(...m)=>t.handleContextMenu&&t.handleContextMenu(...m)),onDragstart:e[3]||(e[3]=h.withModifiers((...m)=>t.handleDragStart&&t.handleDragStart(...m),["stop"])),onDragover:e[4]||(e[4]=h.withModifiers((...m)=>t.handleDragOver&&t.handleDragOver(...m),["stop"])),onDragend:e[5]||(e[5]=h.withModifiers((...m)=>t.handleDragEnd&&t.handleDragEnd(...m),["stop"])),onDrop:e[6]||(e[6]=h.withModifiers((...m)=>t.handleDrop&&t.handleDrop(...m),["stop"]))},[h.createElementVNode("div",{class:h.normalizeClass(t.ns.be("node","content")),style:h.normalizeStyle({paddingLeft:(t.node.level-1)*t.tree.props.indent+"px"})},[t.tree.props.icon||t.CaretRight?(h.openBlock(),h.createBlock(a,{key:0,class:h.normalizeClass([t.ns.be("node","expand-icon"),t.ns.is("leaf",t.node.isLeaf),{expanded:!t.node.isLeaf&&t.expanded}]),onClick:h.withModifiers(t.handleExpandIconClick,["stop"])},{default:h.withCtx(()=>[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(t.tree.props.icon||t.CaretRight)))]),_:1},8,["class","onClick"])):h.createCommentVNode("v-if",!0),t.showCheckbox?(h.openBlock(),h.createBlock(s,{key:1,"model-value":t.node.checked,indeterminate:t.node.indeterminate,disabled:!!t.node.disabled,onClick:e[0]||(e[0]=h.withModifiers(()=>{},["stop"])),onChange:t.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):h.createCommentVNode("v-if",!0),t.node.loading?(h.openBlock(),h.createBlock(a,{key:2,class:h.normalizeClass([t.ns.be("node","loading-icon"),t.ns.is("loading")])},{default:h.withCtx(()=>[h.createVNode(d)]),_:1},8,["class"])):h.createCommentVNode("v-if",!0),h.createVNode(p,{node:t.node,"render-content":t.renderContent},null,8,["node","render-content"])],6),h.createVNode(Q,null,{default:h.withCtx(()=>[!t.renderAfterExpand||t.childNodeRendered?h.withDirectives((h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(t.ns.be("node","children")),role:"group","aria-expanded":t.expanded},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.node.childNodes,m=>(h.openBlock(),h.createBlock(f,{key:t.getNodeKey(m),"render-content":t.renderContent,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,node:m,accordion:t.accordion,props:t.props,onNodeExpand:t.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,QK)),[[h.vShow,t.expanded]]):h.createCommentVNode("v-if",!0)]),_:1})],42,fK)),[[h.vShow,t.node.visible]])}var gK=Hr(TK,[["render",mK],["__file","tree-node.vue"]]);function yK({el$:t},e){const r=xr("tree"),n=h.shallowRef([]),i=h.shallowRef([]);h.onMounted(()=>{a()}),h.onUpdated(()=>{n.value=Array.from(t.value.querySelectorAll("[role=treeitem]")),i.value=Array.from(t.value.querySelectorAll("input[type=checkbox]"))}),h.watch(i,s=>{s.forEach(d=>{d.setAttribute("tabindex","-1")})}),s3(t,"keydown",s=>{const d=s.target;if(!d.className.includes(r.b("node")))return;const p=s.code;n.value=Array.from(t.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`));const f=n.value.indexOf(d);let Q;if([Xi.up,Xi.down].includes(p)){if(s.preventDefault(),p===Xi.up){Q=f===-1?0:f!==0?f-1:n.value.length-1;const _=Q;for(;!e.value.getNode(n.value[Q].dataset.key).canFocus;){if(Q--,Q===_){Q=-1;break}Q<0&&(Q=n.value.length-1)}}else{Q=f===-1?0:f<n.value.length-1?f+1:0;const _=Q;for(;!e.value.getNode(n.value[Q].dataset.key).canFocus;){if(Q++,Q===_){Q=-1;break}Q>=n.value.length&&(Q=0)}}Q!==-1&&n.value[Q].focus()}[Xi.left,Xi.right].includes(p)&&(s.preventDefault(),d.click());const m=d.querySelector('[type="checkbox"]');[Xi.enter,Xi.space].includes(p)&&m&&(s.preventDefault(),m.click())});const a=()=>{var s;n.value=Array.from(t.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`)),i.value=Array.from(t.value.querySelectorAll("input[type=checkbox]"));const d=t.value.querySelectorAll(`.${r.is("checked")}[role=treeitem]`);if(d.length){d[0].setAttribute("tabindex","0");return}(s=n.value[0])==null||s.setAttribute("tabindex","0")}}const _K=h.defineComponent({name:"ElTree",components:{ElTreeNode:gK},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:ps}},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(t,e){const{t:r}=Tl(),n=xr("tree"),i=h.ref(new uK({key:t.nodeKey,data:t.data,lazy:t.lazy,props:t.props,load:t.load,currentNodeKey:t.currentNodeKey,checkStrictly:t.checkStrictly,checkDescendants:t.checkDescendants,defaultCheckedKeys:t.defaultCheckedKeys,defaultExpandedKeys:t.defaultExpandedKeys,autoExpandParent:t.autoExpandParent,defaultExpandAll:t.defaultExpandAll,filterNodeMethod:t.filterNodeMethod}));i.value.initialize();const o=h.ref(i.value.root),a=h.ref(null),s=h.ref(null),d=h.ref(null),{broadcastExpanded:p}=HE(t),{dragState:f}=pK({props:t,ctx:e,el$:s,dropIndicator$:d,store:i});yK({el$:s},i);const Q=h.computed(()=>{const{childNodes:Ft}=o.value;return!Ft||Ft.length===0||Ft.every(({visible:pe})=>!pe)});h.watch(()=>t.currentNodeKey,Ft=>{i.value.setCurrentNodeKey(Ft)}),h.watch(()=>t.defaultCheckedKeys,Ft=>{i.value.setDefaultCheckedKey(Ft)}),h.watch(()=>t.defaultExpandedKeys,Ft=>{i.value.setDefaultExpandedKeys(Ft)}),h.watch(()=>t.data,Ft=>{i.value.setData(Ft)},{deep:!0}),h.watch(()=>t.checkStrictly,Ft=>{i.value.checkStrictly=Ft});const m=Ft=>{if(!t.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");i.value.filter(Ft)},_=Ft=>TQ(t.nodeKey,Ft.data),v=Ft=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const pe=i.value.getNode(Ft);if(!pe)return[];const lr=[pe.data];let Xt=pe.parent;for(;Xt&&Xt!==o.value;)lr.push(Xt.data),Xt=Xt.parent;return lr.reverse()},b=(Ft,pe)=>i.value.getCheckedNodes(Ft,pe),M=Ft=>i.value.getCheckedKeys(Ft),E=()=>{const Ft=i.value.getCurrentNode();return Ft?Ft.data:null},V=()=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const Ft=E();return Ft?Ft[t.nodeKey]:null},O=(Ft,pe)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");i.value.setCheckedNodes(Ft,pe)},R=(Ft,pe)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");i.value.setCheckedKeys(Ft,pe)},j=(Ft,pe,lr)=>{i.value.setChecked(Ft,pe,lr)},G=()=>i.value.getHalfCheckedNodes(),z=()=>i.value.getHalfCheckedKeys(),J=(Ft,pe=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");fQ(i,e.emit,()=>i.value.setUserCurrentNode(Ft,pe))},tt=(Ft,pe=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");fQ(i,e.emit,()=>i.value.setCurrentNodeKey(Ft,pe))},ot=Ft=>i.value.getNode(Ft),et=Ft=>{i.value.remove(Ft)},Tt=(Ft,pe)=>{i.value.append(Ft,pe)},At=(Ft,pe)=>{i.value.insertBefore(Ft,pe)},Ut=(Ft,pe)=>{i.value.insertAfter(Ft,pe)},ee=(Ft,pe,lr)=>{p(pe),e.emit("node-expand",Ft,pe,lr)},ue=(Ft,pe)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");i.value.updateChildren(Ft,pe)};return h.provide("RootTree",{ctx:e,props:t,store:i,root:o,currentNode:a,instance:h.getCurrentInstance()}),h.provide(xl,void 0),{ns:n,store:i,root:o,currentNode:a,dragState:f,el$:s,dropIndicator$:d,isEmpty:Q,filter:m,getNodeKey:_,getNodePath:v,getCheckedNodes:b,getCheckedKeys:M,getCurrentNode:E,getCurrentKey:V,setCheckedNodes:O,setCheckedKeys:R,setChecked:j,getHalfCheckedNodes:G,getHalfCheckedKeys:z,setCurrentNode:J,setCurrentKey:tt,t:r,getNode:ot,remove:et,append:Tt,insertBefore:At,insertAfter:Ut,handleNodeExpand:ee,updateKeyChildren:ue}}});function vK(t,e,r,n,i,o){const a=h.resolveComponent("el-tree-node");return h.openBlock(),h.createElementBlock("div",{ref:"el$",class:h.normalizeClass([t.ns.b(),t.ns.is("dragging",!!t.dragState.draggingNode),t.ns.is("drop-not-allow",!t.dragState.allowDrop),t.ns.is("drop-inner",t.dragState.dropType==="inner"),{[t.ns.m("highlight-current")]:t.highlightCurrent}]),role:"tree"},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.root.childNodes,s=>(h.openBlock(),h.createBlock(a,{key:t.getNodeKey(s),node:s,props:t.props,accordion:t.accordion,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,"render-content":t.renderContent,onNodeExpand:t.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),t.isEmpty?(h.openBlock(),h.createElementBlock("div",{key:0,class:h.normalizeClass(t.ns.e("empty-block"))},[h.renderSlot(t.$slots,"empty",{},()=>{var s;return[h.createElementVNode("span",{class:h.normalizeClass(t.ns.e("empty-text"))},h.toDisplayString((s=t.emptyText)!=null?s:t.t("el.tree.emptyText")),3)]})],2)):h.createCommentVNode("v-if",!0),h.withDirectives(h.createElementVNode("div",{ref:"dropIndicator$",class:h.normalizeClass(t.ns.e("drop-indicator"))},null,2),[[h.vShow,t.dragState.showDropIndicator]])],2)}var R9=Hr(_K,[["render",vK],["__file","tree.vue"]]);R9.install=t=>{t.component(R9.name,R9)};const CE=R9;function bK(t){let e;const r=h.ref(!1),n=h.reactive({...t,originalPosition:"",originalOverflow:"",visible:!1});function i(m){n.text=m}function o(){const m=n.parent,_=Q.ns;if(!m.vLoadingAddClassList){let v=m.getAttribute("loading-number");v=Number.parseInt(v)-1,v?m.setAttribute("loading-number",v.toString()):(h3(m,_.bm("parent","relative")),m.removeAttribute("loading-number")),h3(m,_.bm("parent","hidden"))}a(),f.unmount()}function a(){var m,_;(_=(m=Q.$el)==null?void 0:m.parentNode)==null||_.removeChild(Q.$el)}function s(){var m;t.beforeClose&&!t.beforeClose()||(r.value=!0,clearTimeout(e),e=window.setTimeout(d,400),n.visible=!1,(m=t.closed)==null||m.call(t))}function d(){if(!r.value)return;const m=n.parent;r.value=!1,m.vLoadingAddClassList=void 0,o()}const p=h.defineComponent({name:"ElLoading",setup(m,{expose:_}){const{ns:v,zIndex:b}=EZ("loading");return _({ns:v,zIndex:b}),()=>{const M=n.spinner||n.svg,E=h.h("svg",{class:"circular",viewBox:n.svgViewBox?n.svgViewBox:"0 0 50 50",...M?{innerHTML:M}:{}},[h.h("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),V=n.text?h.h("p",{class:v.b("text")},[n.text]):void 0;return h.h(h.Transition,{name:v.b("fade"),onAfterLeave:d},{default:h.withCtx(()=>[h.withDirectives(h.createVNode("div",{style:{backgroundColor:n.background||""},class:[v.b("mask"),n.customClass,n.fullscreen?"is-fullscreen":""]},[h.h("div",{class:v.b("spinner")},[E,V])]),[[h.vShow,n.visible]])])})}}}),f=h.createApp(p),Q=f.mount(document.createElement("div"));return{...h.toRefs(n),setText:i,removeElLoadingChild:a,close:s,handleAfterLeave:d,vm:Q,get $el(){return Q.$el}}}let N9;const mQ=function(t={}){if(!T1)return;const e=LK(t);if(e.fullscreen&&N9)return N9;const r=bK({...e,closed:()=>{var i;(i=e.closed)==null||i.call(e),e.fullscreen&&(N9=void 0)}});xK(e,e.parent,r),AE(e,e.parent,r),e.parent.vLoadingAddClassList=()=>AE(e,e.parent,r);let n=e.parent.getAttribute("loading-number");return n?n=`${Number.parseInt(n)+1}`:n="1",e.parent.setAttribute("loading-number",n),e.parent.appendChild(r.$el),h.nextTick(()=>r.visible.value=e.visible),e.fullscreen&&(N9=r),r},LK=t=>{var e,r,n,i;let o;return W1(t.target)?o=(e=document.querySelector(t.target))!=null?e:document.body:o=t.target||document.body,{parent:o===document.body||t.body?document.body:o,background:t.background||"",svg:t.svg||"",svgViewBox:t.svgViewBox||"",spinner:t.spinner||!1,text:t.text||"",fullscreen:o===document.body&&((r=t.fullscreen)!=null?r:!0),lock:(n=t.lock)!=null?n:!1,customClass:t.customClass||"",visible:(i=t.visible)!=null?i:!0,target:o}},xK=async(t,e,r)=>{const{nextZIndex:n}=r.vm.zIndex||r.vm._.exposed.zIndex,i={};if(t.fullscreen)r.originalPosition.value=K6(document.body,"position"),r.originalOverflow.value=K6(document.body,"overflow"),i.zIndex=n();else if(t.parent===document.body){r.originalPosition.value=K6(document.body,"position"),await h.nextTick();for(const o of["top","left"]){const a=o==="top"?"scrollTop":"scrollLeft";i[o]=`${t.target.getBoundingClientRect()[o]+document.body[a]+document.documentElement[a]-Number.parseInt(K6(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])i[o]=`${t.target.getBoundingClientRect()[o]}px`}else r.originalPosition.value=K6(e,"position");for(const[o,a]of Object.entries(i))r.$el.style[o]=a},AE=(t,e,r)=>{const n=r.vm.ns||r.vm._.exposed.ns;["absolute","fixed","sticky"].includes(r.originalPosition.value)?h3(e,n.bm("parent","relative")):l9(e,n.bm("parent","relative")),t.fullscreen&&t.lock?l9(e,n.bm("parent","hidden")):h3(e,n.bm("parent","hidden"))},B9=Symbol("ElLoading"),VE=(t,e)=>{var r,n,i,o;const a=e.instance,s=m=>Qi(e.value)?e.value[m]:void 0,d=m=>{const _=W1(m)&&(a==null?void 0:a[m])||m;return _&&h.ref(_)},p=m=>d(s(m)||t.getAttribute(`element-loading-${QD(m)}`)),f=(r=s("fullscreen"))!=null?r:e.modifiers.fullscreen,Q={text:p("text"),svg:p("svg"),svgViewBox:p("svgViewBox"),spinner:p("spinner"),background:p("background"),customClass:p("customClass"),fullscreen:f,target:(n=s("target"))!=null?n:f?void 0:t,body:(i=s("body"))!=null?i:e.modifiers.body,lock:(o=s("lock"))!=null?o:e.modifiers.lock};t[B9]={options:Q,instance:mQ(Q)}},wK=(t,e)=>{for(const r of Object.keys(e))h.isRef(e[r])&&(e[r].value=t[r])},D9={mounted(t,e){e.value&&VE(t,e)},updated(t,e){const r=t[B9];e.oldValue!==e.value&&(e.value&&!e.oldValue?VE(t,e):e.value&&e.oldValue?Qi(e.value)&&wK(e.value,r.options):r==null||r.instance.close())},unmounted(t){var e;(e=t[B9])==null||e.instance.close(),t[B9]=null}},EK={install(t){t.directive("loading",D9),t.config.globalProperties.$loading=mQ},directive:D9,service:mQ};function MK(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(i){i(r)}),(n=t.get("*"))&&n.slice().map(function(i){i(e,r)})}}}const f5=new MK,l2=(t,e)=>{const r=t.__vccOpts||t;for(const[n,i]of e)r[n]=i;return r},HK={name:"ExternalResourceCard",components:{Button:Qo},props:{resources:{type:Array,default:()=>[]}},data:function(){return{pubmeds:[],pubmedIds:[],ElIconNotebook:h.shallowRef(AU)}},methods:{capitalise:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},openUrl:function(t){f5.emit("open-pubmed-url",t),window.open(t,"_blank")}}},SK={class:"resource-container"};function CK(t,e,r,n,i,o){const a=Qo;return h.openBlock(),h.createElementBlock("div",SK,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.resources,s=>(h.openBlock(),h.createElementBlock("div",{key:s.id,class:"resource"},[s.id==="pubmed"?(h.openBlock(),h.createBlock(a,{key:0,class:"button",id:"open-pubmed-button",icon:t.ElIconNotebook,onClick:d=>o.openUrl(s.url)},{default:h.withCtx(()=>[h.createTextVNode(" Open publications in pubmed ")]),_:2},1032,["icon","onClick"])):h.createCommentVNode("",!0)]))),128))])}const OE=l2(HK,[["render",CK],["__scopeId","data-v-cf5af2f8"]]),AK=t=>t.replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()),VK=function(t){return t?t.charAt(0).toUpperCase()+t.slice(1):""},OK={name:"ProvenancePopup",components:{Button:Qo,Container:lX,Icon:F1,ExternalResourceCard:OE,ElIconArrowUp:u9,ElIconArrowDown:d3,ElIconWarning:h9},props:{entry:{type:Object,default:()=>({destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0})}},inject:["getFeaturesAlert"],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:{featuresAlert(){return this.getFeaturesAlert()},resources:function(){let t=[];return this.entry&&this.entry.hyperlinks&&(t=this.entry.hyperlinks),t},originDescription:function(){return this.entry&&this.entry.title&&this.entry.title.toLowerCase().includes("motor")?this.originDescriptions.motor:this.originDescriptions.sensory},provSpeciesDescription:function(){let t="Studied in";return this.entry.provenanceTaxonomyLabel.forEach(e=>{t+=` ${e},`}),t=t.slice(0,-1),t+=" species",t}},methods:{titleCase:function(t){return AK(t)},capitalise:function(t){return VK(t)},openUrl:function(t){window.open(t,"_blank")},openAll:function(){f5.emit("onActionClick",{type:"Facets",labels:this.entry.componentsWithDatasets.map(t=>t.name)})},openAxons:function(){f5.emit("onActionClick",{type:"Facets",labels:this.entry.destinationsWithDatasets.map(t=>t.name)})},openDendrites:function(){f5.emit("onActionClick",{type:"Facets",labels:this.entry.originsWithDatasets.map(t=>t.name)})},pubmedSearchUrlUpdate:function(t){this.pubmedSearchUrl=t}}},Q5=t=>(h.pushScopeId("data-v-814119e4"),t=t(),h.popScopeId(),t),kK={key:0,class:"main"},PK={key:0,class:"block"},IK={class:"title"},RK={key:0,class:"subtitle"},NK={key:1,class:"block"},BK={class:"title"},DK={key:2},FK=Q5(()=>h.createElementVNode("span",{class:"attribute-title"},"Alert",-1)),jK={style:{"word-break":"keep-all"}},zK={class:"content-container scrollbar"},UK={key:0,class:"block"},GK=Q5(()=>h.createElementVNode("span",{class:"attribute-title"},"Origin",-1)),ZK={style:{"word-break":"keep-all"}},$K=Q5(()=>h.createElementVNode("i",null,"Origin",-1)),qK=["origin-item-label"],WK={key:0,class:"seperator"},XK={key:1,class:"block"},KK=Q5(()=>h.createElementVNode("div",{class:"attribute-title"},"Components",-1)),YK=["component-item-label"],JK={key:0,class:"seperator"},tY={key:2,class:"block"},eY=Q5(()=>h.createElementVNode("span",{class:"attribute-title"},"Destination",-1)),rY=Q5(()=>h.createElementVNode("span",{style:{"word-break":"keep-all"}},[h.createElementVNode("i",null,"Destination"),h.createTextVNode(" is where the axons terminate ")],-1)),nY=["destination-item-label"],iY={key:0,class:"seperator"};function oY(t,e,r,n,i,o){const a=h9,s=F1,d=p5,p=u9,f=d3,Q=Qo,m=OE,_=D9;return r.entry?h.withDirectives((h.openBlock(),h.createElementBlock("div",kK,[r.entry.title?(h.openBlock(),h.createElementBlock("div",PK,[h.createElementVNode("div",IK,h.toDisplayString(o.capitalise(r.entry.title)),1),r.entry.provenanceTaxonomyLabel&&r.entry.provenanceTaxonomyLabel.length>0?(h.openBlock(),h.createElementBlock("div",RK,h.toDisplayString(o.provSpeciesDescription),1)):h.createCommentVNode("",!0)])):(h.openBlock(),h.createElementBlock("div",NK,[h.createElementVNode("div",BK,h.toDisplayString(r.entry.featureId),1)])),o.featuresAlert?(h.openBlock(),h.createElementBlock("div",DK,[FK,h.createVNode(d,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:h.withCtx(()=>[h.createVNode(s,{class:"info"},{default:h.withCtx(()=>[h.createVNode(a)]),_:1})]),default:h.withCtx(()=>[h.createElementVNode("span",jK,h.toDisplayString(o.featuresAlert),1)]),_:1})])):h.createCommentVNode("",!0),h.withDirectives(h.createElementVNode("div",{class:"hide",id:"hide-path-info",onClick:e[0]||(e[0]=v=>t.showDetails=!1)},[h.createTextVNode(" Hide path information "),h.createVNode(s,null,{default:h.withCtx(()=>[h.createVNode(p)]),_:1})],512),[[h.vShow,t.showDetails]]),h.withDirectives(h.createElementVNode("div",{class:"hide",id:"show-path-info",onClick:e[1]||(e[1]=v=>t.showDetails=!0)},[h.createTextVNode(" Show path information "),h.createVNode(s,null,{default:h.withCtx(()=>[h.createVNode(f)]),_:1})],512),[[h.vShow,!t.showDetails]]),h.createVNode(h.Transition,{name:"slide-fade"},{default:h.withCtx(()=>[h.withDirectives(h.createElementVNode("div",zK,[h.createTextVNode(h.toDisplayString(r.entry.paths)+" ",1),r.entry.origins&&r.entry.origins.length>0?(h.openBlock(),h.createElementBlock("div",UK,[h.createElementVNode("div",null,[GK,h.createVNode(d,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:h.withCtx(()=>[h.createVNode(s,{class:"info"},{default:h.withCtx(()=>[h.createVNode(a)]),_:1})]),default:h.withCtx(()=>[h.createElementVNode("span",ZK,[$K,h.createTextVNode(" "+h.toDisplayString(o.originDescription),1)])]),_:1})]),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.entry.origins,(v,b)=>(h.openBlock(),h.createElementBlock("div",{class:"attribute-content","origin-item-label":v,key:v},[h.createTextVNode(h.toDisplayString(o.capitalise(v))+" ",1),b!=r.entry.origins.length-1?(h.openBlock(),h.createElementBlock("div",WK)):h.createCommentVNode("",!0)],8,qK))),128)),h.withDirectives(h.createVNode(Q,{class:"button",id:"open-dendrites-button",onClick:o.openDendrites},{default:h.withCtx(()=>[h.createTextVNode(" Explore origin data ")]),_:1},8,["onClick"]),[[h.vShow,r.entry.originsWithDatasets&&r.entry.originsWithDatasets.length>0]])])):h.createCommentVNode("",!0),r.entry.components&&r.entry.components.length>0?(h.openBlock(),h.createElementBlock("div",XK,[KK,(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.entry.components,(v,b)=>(h.openBlock(),h.createElementBlock("div",{class:"attribute-content","component-item-label":v,key:v},[h.createTextVNode(h.toDisplayString(o.capitalise(v))+" ",1),b!=r.entry.components.length-1?(h.openBlock(),h.createElementBlock("div",JK)):h.createCommentVNode("",!0)],8,YK))),128))])):h.createCommentVNode("",!0),r.entry.destinations&&r.entry.destinations.length>0?(h.openBlock(),h.createElementBlock("div",tY,[h.createElementVNode("div",null,[eY,h.createVNode(d,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:h.withCtx(()=>[h.createVNode(s,{class:"info"},{default:h.withCtx(()=>[h.createVNode(a)]),_:1})]),default:h.withCtx(()=>[rY]),_:1})]),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.entry.destinations,(v,b)=>(h.openBlock(),h.createElementBlock("div",{class:"attribute-content","destination-item-label":v,key:v},[h.createTextVNode(h.toDisplayString(o.capitalise(v))+" ",1),b!=r.entry.destinations.length-1?(h.openBlock(),h.createElementBlock("div",iY)):h.createCommentVNode("",!0)],8,nY))),128)),h.withDirectives(h.createVNode(Q,{class:"button",onClick:o.openAxons},{default:h.withCtx(()=>[h.createTextVNode(" Explore destination data ")]),_:1},8,["onClick"]),[[h.vShow,r.entry.destinationsWithDatasets&&r.entry.destinationsWithDatasets.length>0]])])):h.createCommentVNode("",!0),h.withDirectives(h.createVNode(Q,{class:"button",onClick:o.openAll},{default:h.withCtx(()=>[h.createTextVNode(" Search for data on components ")]),_:1},8,["onClick"]),[[h.vShow,r.entry.componentsWithDatasets&&r.entry.componentsWithDatasets.length>0]]),h.createVNode(m,{resources:o.resources},null,8,["resources"])],512),[[h.vShow,t.showDetails]])]),_:1})])),[[_,t.loading]]):h.createCommentVNode("",!0)}const kE=l2(OK,[["render",oY],["__scopeId","data-v-814119e4"]]),aY={name:"AnnotationTool",components:{Button:Qo,Col:ga,Input:L9,Main:yE,Row:P2,Select:d5,ElIconArrowUp:u9,ElIconArrowDown:d3,ElIconEdit:Lx,ElIconClose:Y6},props:{annotationEntry:{type:Object}},inject:["flatmapAPI","$annotator","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:"",creator:void 0}},computed:{isEditable:function(){return this.annotationEntry.resourceId&&this.annotationEntry.featureId},isPositionUpdated:function(){return this.annotationEntry.resourceId&&this.annotationEntry.type==="updated"&&this.annotationEntry.positionUpdated},isDeleted:function(){return this.annotationEntry.resourceId&&this.annotationEntry.type==="deleted"}},methods:{evidenceEntered:function(t){t&&(this.evidence.push(this.evidencePrefix+t),this.newEvidence="")},formatTime:function(t){const e={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};return new Date(t).toLocaleDateString(void 0,e)},updatePrevSubmissions:function(){this.$annotator&&this.authenticated&&this.annotationEntry.resourceId&&this.annotationEntry.featureId&&this.$annotator.itemAnnotations(this.userApiKey,this.annotationEntry.resourceId,this.annotationEntry.featureId).then(t=>{this.prevSubs=t}).catch(t=>{console.log(t)})},submit:function(){if(this.annotationEntry.type==="updated"&&this.annotationEntry.positionUpdated?this.comment=this.comment?`Position Updated: ${this.comment}`:"Position Updated":this.annotationEntry.type==="deleted"&&(this.comment=this.comment?`Feature Deleted: ${this.comment}`:"Feature Deleted"),(this.evidence.length>0||this.comment)&&this.annotationEntry.resourceId&&this.annotationEntry.featureId){const t=[];this.evidence.forEach(r=>{if(r.includes("DOI:")){const n=r.replace("DOI:","https://doi.org/");t.push(new URL(n))}else if(r.includes("PMID:")){const n=r.replace("PMID:","https://pubmed.ncbi.nlm.nih.gov/");t.push(new URL(n))}});const e={resource:this.annotationEntry.resourceId,item:Object.assign({id:this.annotationEntry.featureId},Object.fromEntries(Object.entries(this.annotationEntry).filter(([r])=>["label","models"].includes(r)))),body:{evidence:t,comment:this.comment},feature:this.annotationEntry.feature};Object.assign(e.body,this.annotationEntry.body),this.annotationEntry.type==="deleted"&&(e.feature=void 0),this.creator&&(e.creator=this.creator),this.$annotator.addAnnotation(this.userApiKey,e).then(()=>{this.$emit("annotation",e),this.errorMessage="",this.resetSubmission(),this.updatePrevSubmissions()}).catch(()=>{this.errorMessage="There is a problem with the submission, please try again later"})}},removeEvidence:function(t){this.evidence.splice(t,1)},resetSubmission:function(){this.editing=!1,this.evidence=[],this.newFeature="",this.comment=""}},watch:{annotationEntry:{handler:function(t,e){t!==e&&(this.resetSubmission(),this.updatePrevSubmissions())},immediate:!1,deep:!1}},mounted:function(){this.$annotator.authenticate(this.userApiKey).then(t=>{t.name&&t.email?(this.creator=t,t.orcid||(this.creator.orcid="0000-0000-0000-0000"),this.authenticated=!0,this.updatePrevSubmissions()):this.errorMessage=""})}},k4=t=>(h.pushScopeId("data-v-fb5333e3"),t=t(),h.popScopeId(),t),sY={class:"block"},lY=k4(()=>h.createElementVNode("div",{class:"title"},"Feature Annotations",-1)),cY=k4(()=>h.createElementVNode("strong",{class:"sub-title"},"Previous submissions:",-1)),uY=k4(()=>h.createElementVNode("strong",null,"Evidence: ",-1)),hY=["href"],dY=k4(()=>h.createElementVNode("strong",null,"Comment: ",-1)),pY=k4(()=>h.createElementVNode("strong",{class:"sub-title"},"Suggest changes:",-1)),TY=k4(()=>h.createElementVNode("strong",null,"Evidence:",-1)),fY=k4(()=>h.createElementVNode("strong",null,"Comment:",-1)),QY={class:"sub-title"};function mY(t,e,r,n,i,o){const a=P2,s=u9,d=F1,p=d3,f=Lx,Q=LU,m=EU,_=ga,v=Y6,b=k9,M=d5,E=L9,V=Qo,O=yE;return h.openBlock(),h.createBlock(O,{class:"main"},{default:h.withCtx(()=>[h.createElementVNode("div",sY,[h.createVNode(a,{class:"info-field"},{default:h.withCtx(()=>[lY]),_:1}),r.annotationEntry?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.displayPair,(R,j)=>h.withDirectives((h.openBlock(),h.createBlock(a,{class:"dialog-text",key:R},{default:h.withCtx(()=>[h.createElementVNode("strong",null,h.toDisplayString(j)+": ",1),h.createTextVNode(" "+h.toDisplayString(r.annotationEntry[R]),1)]),_:2},1024)),[[h.vShow,r.annotationEntry[R]]])),128)),t.prevSubs.length>0?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.withDirectives(h.createElementVNode("div",{class:"hide",onClick:e[0]||(e[0]=R=>t.showSubmissions=!1)},[h.createTextVNode(" Hide previous submissions "),h.createVNode(d,null,{default:h.withCtx(()=>[h.createVNode(s)]),_:1})],512),[[h.vShow,t.showSubmissions]]),h.withDirectives(h.createElementVNode("div",{class:"hide",onClick:e[1]||(e[1]=R=>t.showSubmissions=!0)},[h.createTextVNode(" Show previous "+h.toDisplayString(t.prevSubs.length)+" submission(s) ",1),h.createVNode(d,null,{default:h.withCtx(()=>[h.createVNode(p)]),_:1})],512),[[h.vShow,!t.showSubmissions]]),t.showSubmissions?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createVNode(a,{class:"dialog-spacer"}),h.createVNode(a,{class:"dialog-text"},{default:h.withCtx(()=>[cY]),_:1}),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.prevSubs,(R,j)=>(h.openBlock(),h.createElementBlock("div",{class:"entry",key:j},[h.createVNode(a,{class:"dialog-text"},{default:h.withCtx(()=>[h.createElementVNode("strong",null,h.toDisplayString(o.formatTime(R.created)),1),h.createTextVNode(" "+h.toDisplayString(R.creator.name),1)]),_:2},1024),h.createVNode(a,{class:"dialog-text"},{default:h.withCtx(()=>[uY,(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(R.body.evidence,G=>(h.openBlock(),h.createBlock(a,{key:G,class:"dialog-text"},{default:h.withCtx(()=>[h.createElementVNode("a",{href:G,target:"_blank"},h.toDisplayString(G),9,hY)]),_:2},1024))),128))]),_:2},1024),h.createVNode(a,{class:"dialog-text"},{default:h.withCtx(()=>[dY,h.createTextVNode(" "+h.toDisplayString(R.body.comment),1)]),_:2},1024)]))),128))],64)):h.createCommentVNode("",!0)],64)):h.createCommentVNode("",!0),t.authenticated?(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[o.isEditable?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createVNode(a,{class:"dialog-spacer"}),t.editing?(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[h.createVNode(a,{class:"dialog-text"},{default:h.withCtx(()=>[pY]),_:1}),o.isDeleted?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createVNode(a,{class:"dialog-text"},{default:h.withCtx(()=>[TY]),_:1}),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.evidence,(R,j)=>(h.openBlock(),h.createBlock(a,{key:R},{default:h.withCtx(()=>[h.createVNode(_,{span:20},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(t.evidence[j]),1)]),_:2},1024),h.createVNode(_,{span:4},{default:h.withCtx(()=>[h.createVNode(d,{class:"standard-icon"},{default:h.withCtx(()=>[h.createVNode(v,{onClick:G=>o.removeEvidence(j)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128)),h.createVNode(a,null,{default:h.withCtx(()=>[h.createVNode(E,{size:"small",placeholder:"Enter",modelValue:t.newEvidence,"onUpdate:modelValue":e[4]||(e[4]=R=>t.newEvidence=R),onChange:e[5]||(e[5]=R=>o.evidenceEntered(R))},{prepend:h.withCtx(()=>[h.createVNode(M,{teleported:!1,modelValue:t.evidencePrefix,"onUpdate:modelValue":e[3]||(e[3]=R=>t.evidencePrefix=R),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.evidencePrefixes,R=>(h.openBlock(),h.createBlock(b,{key:R,label:R,value:R},{default:h.withCtx(()=>[h.createVNode(a,null,{default:h.withCtx(()=>[h.createVNode(_,{span:12},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(R),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})],64)),h.createVNode(a,null,{default:h.withCtx(()=>[fY]),_:1}),h.createVNode(a,{class:"dialog-text"},{default:h.withCtx(()=>[h.createVNode(E,{type:"textarea",autosize:{minRows:2,maxRows:4},placeholder:"Enter",modelValue:t.comment,"onUpdate:modelValue":e[6]||(e[6]=R=>t.comment=R)},null,8,["modelValue"])]),_:1}),h.createVNode(a,{class:"dialog-text"},{default:h.withCtx(()=>[h.createVNode(V,{class:"button",type:"primary",plain:"",onClick:o.submit},{default:h.withCtx(()=>[h.createTextVNode(" Submit ")]),_:1},8,["onClick"])]),_:1})],64)):(h.openBlock(),h.createBlock(a,{key:0},{default:h.withCtx(()=>[h.createVNode(d,{class:"standard-icon"},{default:h.withCtx(()=>[h.createVNode(f,{onClick:e[2]||(e[2]=R=>t.editing=!0)})]),_:1}),o.isDeleted?(h.openBlock(),h.createBlock(d,{key:0,class:"standard-icon"},{default:h.withCtx(()=>[h.createVNode(Q,{onClick:o.submit},null,8,["onClick"])]),_:1})):o.isPositionUpdated?(h.openBlock(),h.createBlock(d,{key:1,class:"standard-icon"},{default:h.withCtx(()=>[h.createVNode(m,{onClick:o.submit},null,8,["onClick"])]),_:1})):h.createCommentVNode("",!0)]),_:1})),t.errorMessage?(h.openBlock(),h.createBlock(a,{key:2,class:"dialog-text"},{default:h.withCtx(()=>[h.createElementVNode("strong",QY,h.toDisplayString(t.errorMessage),1)]),_:1})):h.createCommentVNode("",!0)],64)):h.createCommentVNode("",!0)],64)):h.createCommentVNode("",!0)],64)):h.createCommentVNode("",!0)])]),_:1})}const PE=l2(aY,[["render",mY],["__scopeId","data-v-fb5333e3"]]),gY={name:"Tooltip",components:{AnnotationTool:PE,ProvenancePopup:kE},props:{entry:{type:Object},annotationDisplay:{type:Boolean,default:!1},annotationEntry:{type:Object}}},yY={class:"tooltip-container",id:"tooltip-container"};function _Y(t,e,r,n,i,o){const a=PE,s=kE;return h.openBlock(),h.createElementBlock("div",yY,[r.annotationDisplay?(h.openBlock(),h.createBlock(a,{key:0,annotationEntry:r.annotationEntry,onAnnotation:e[0]||(e[0]=d=>t.$emit("annotation",d))},null,8,["annotationEntry"])):(h.openBlock(),h.createBlock(s,{key:1,entry:r.entry},null,8,["entry"]))])}const gQ=l2(gY,[["render",_Y],["__scopeId","data-v-4d2eaccd"]]),vY={name:"SelectionsGroup",components:{Checkbox:C9,CheckboxGroup:cQ,Col:ga,Icon:F1,Row:P2,ElIconWarning:h9},methods:{reset:function(){this.checkAll=!0,this.checkedItems=[],this.selections.forEach(t=>{!("enabled"in t)||t.enabled===!0?this.checkedItems.push(t[this.identifierKey]):this.checkAll=!1})},setCheckboxActionData:function(t,e){if(t){const r=t.querySelector('input[type="checkbox"]'),n=t.querySelector(".el-checkbox__label"),o=t.closest(".selections-container").querySelector(".checkall-display-text");let a="";r&&(a=r.checked?"checked":"unchecked"),this.checkboxActionData={selectionsTitle:o?o.innerText:"",property:r&&e!=="all"?r.value:"",label:n?n.innerText:"",checked:a}}else this.checkboxActionData={selectionsTitle:"",property:"",label:"",checked:""}},onCheckboxNativeChange:function(t){const e=t.target.closest(".checkbox-container");this.setCheckboxActionData(e,"individual")},onAllCheckboxNativeChange:function(t){const e=t.target.closest(".all-checkbox");this.setCheckboxActionData(e,"all")},visibilityToggle:function(t,e){this.$emit("changed",{key:t,value:e}),t===this.checkboxActionData.property&&(this.checkboxActionData.checked=e?"checked":"unchecked"),this.$emit("selections-data-changed",this.checkboxActionData)},checkboxMouseEnterEmit:function(t,e){this.$emit("checkboxMouseEnter",{key:t,value:e,selections:this.selections,checked:this.checkedItems})},handleCheckedItemsChange:function(t){let e=t.length;this.checkAll=e===this.selections.length},handleCheckAllChange:function(t){this.checkedItems=t?this.selections.map(e=>e[this.identifierKey]):[],this.$emit("checkAll",{keys:this.selections.map(e=>e[this.identifierKey]),value:t}),this.checkboxActionData.property=this.identifierKey,this.checkboxActionData.checked=t?"checked":"unchecked",this.$emit("selections-data-changed",this.checkboxActionData)},getBackgroundStyles:function(t){return"colour"in t&&this.colourStyle==="background"?{background:t.colour}:{}},hasLineStyles:function(t){return"colour"in t&&this.colourStyle==="line"},getLineStyles:function(t){return"colour"in t&&this.colourStyle==="line"?"dashed"in t&&t.dashed===!0?{background:`repeating-linear-gradient(90deg,${t.colour},${t.colour} 6px,transparent 0,transparent 9px)`}:{background:t.colour}:{display:"None"}}},props:{colourStyle:{type:String,default:"line"},helpMessage:{type:String,default:""},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,checkboxActionData:{selectionsTitle:"",property:"",label:"",checked:""}}},mounted:function(){this.reset()}},bY={class:"selections-container"},LY={class:"checkall-display-text"},xY={style:{"word-break":"keep-all"}},wY={class:"checkbox-group-inner"},EY=["onMouseenter","onMouseleave"];function MY(t,e,r,n,i,o){const a=h9,s=F1,d=p5,p=ga,f=C9,Q=P2,m=cQ;return h.openBlock(),h.createElementBlock("div",bY,[h.createVNode(Q,null,{default:h.withCtx(()=>[h.createVNode(p,{span:12},{default:h.withCtx(()=>[h.createElementVNode("span",LY,h.toDisplayString(r.title),1),r.helpMessage?(h.openBlock(),h.createBlock(d,{key:0,width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},h.createSlots({default:h.withCtx(()=>[h.createElementVNode("span",xY,h.toDisplayString(r.helpMessage),1)]),_:2},[r.helpMessage?{name:"reference",fn:h.withCtx(()=>[h.createVNode(s,{class:"info"},{default:h.withCtx(()=>[h.createVNode(a)]),_:1})]),key:"0"}:void 0]),1024)):h.createCommentVNode("",!0)]),_:1}),h.createVNode(p,{span:12},{default:h.withCtx(()=>[r.selections&&r.selections.length>1?(h.openBlock(),h.createBlock(f,{key:0,class:"all-checkbox",indeterminate:o.isIndeterminate,modelValue:t.checkAll,"onUpdate:modelValue":e[0]||(e[0]=_=>t.checkAll=_),onChange:o.handleCheckAllChange,onClick:o.onAllCheckboxNativeChange},{default:h.withCtx(()=>[h.createTextVNode("Display all")]),_:1},8,["indeterminate","modelValue","onChange","onClick"])):h.createCommentVNode("",!0)]),_:1})]),_:1}),h.createVNode(m,{modelValue:t.checkedItems,"onUpdate:modelValue":e[1]||(e[1]=_=>t.checkedItems=_),size:"small",class:"checkbox-group",onChange:o.handleCheckedItemsChange},{default:h.withCtx(()=>[h.createElementVNode("div",wY,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.selections,_=>(h.openBlock(),h.createBlock(Q,{key:_[r.identifierKey],label:_[r.identifierKey]},{default:h.withCtx(()=>[h.createElementVNode("div",{class:"checkbox-container",onMouseenter:v=>o.checkboxMouseEnterEmit(_[r.identifierKey],!0),onMouseleave:v=>o.checkboxMouseEnterEmit(_[r.identifierKey],!1)},[h.createVNode(f,{class:"my-checkbox",label:_[r.identifierKey],onChange:v=>o.visibilityToggle(_[r.identifierKey],v),onClick:o.onCheckboxNativeChange,checked:!("enabled"in _)||_.enabled===!0},{default:h.withCtx(()=>[h.createVNode(Q,{class:"checkbox-row"},{default:h.withCtx(()=>[o.hasLineStyles(_)?(h.openBlock(),h.createBlock(p,{key:0,span:4},{default:h.withCtx(()=>[h.createElementVNode("div",{class:"path-visual",style:h.normalizeStyle(o.getLineStyles(_))},null,4)]),_:2},1024)):h.createCommentVNode("",!0),h.createVNode(p,{span:20},{default:h.withCtx(()=>[h.createElementVNode("div",{style:h.normalizeStyle(o.getBackgroundStyles(_))},h.toDisplayString(_[r.labelKey]),5)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","onChange","onClick","checked"])],40,EY)]),_:2},1032,["label"]))),128))])]),_:1},8,["modelValue","onChange"])])}const IE=l2(vY,[["render",MY],["__scopeId","data-v-d8924667"]]),HY={name:"TreeControls",components:{Checkbox:C9,CheckboxGroup:cQ,ColorPicker:XW,Row:P2,Tree:CE},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(t){return this.active===t.models},nodeIsHover:function(t){return this.hover===t.models},changeActiveByNode:function(t){t.models&&this.$emit("change-active",t.models)},changeHoverByNode:function(){},checkChanged:function(t,e){const r=e.checkedKeys.includes(t.key);t.key==="All"?this.$emit("checkAll",r):this.$emit("changed",{key:t.key,value:r})},getBackgroundStyles:function(t){return"colour"in t?{background:t.colour}:{}}}},SY=t=>(h.pushScopeId("data-v-4ed66e2c"),t=t(),h.popScopeId(),t),CY={class:"selections-container"},AY=SY(()=>h.createElementVNode("div",{class:"title-text"},"Systems",-1)),VY={class:"tree-container"},OY=["onClick","onMouseover"];function kY(t,e,r,n,i,o){const a=ga,s=P2,d=CE;return h.openBlock(),h.createElementBlock("div",CY,[h.createVNode(s,null,{default:h.withCtx(()=>[h.createVNode(a,{span:12},{default:h.withCtx(()=>[AY]),_:1})]),_:1}),h.createElementVNode("div",VY,[h.createVNode(d,{ref:"tree","node-key":"key","show-checkbox":"","check-strictly":!1,data:r.treeData,"render-after-expand":!1,"default-expanded-keys":t.defaultExpandedKeys,onCheck:o.checkChanged},{default:h.withCtx(({node:p,data:f})=>[h.createElementVNode("span",{class:h.normalizeClass(["region-tree-node",{activeItem:o.nodeIsActive(f),hoverItem:o.nodeIsHover(f)}]),onClick:Q=>o.changeActiveByNode(f),onMouseover:Q=>o.changeHoverByNode(f)},[h.createElementVNode("div",{style:h.normalizeStyle(o.getBackgroundStyles(f))},h.toDisplayString(p.label),5)],42,OY)]),_:1},8,["data","default-expanded-keys","onCheck"])])])}const RE=l2(HY,[["render",kY],["__scopeId","data-v-4ed66e2c"]]),PY={name:"SvgLegends"},IY=t=>(h.pushScopeId("data-v-7a368b29"),t=t(),h.popScopeId(),t),RY={class:"legends-container"},NY={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"},BY=[h.createStaticVNode('<defs data-v-7a368b29><bx:grid height="30.447" width="32.516" x="0" y="0" data-v-7a368b29></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-7a368b29></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-7a368b29></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-7a368b29></path><text transform="matrix(0.9908 0 0 1 118.0161 171.7975)" class="st3 st4 st5" style="white-space:pre;" data-v-7a368b29> 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-7a368b29></path><text transform="matrix(0.9908 0 0 1 118.0161 257.675)" class="st3 st4 st5" style="white-space:pre;" data-v-7a368b29> 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-7a368b29> Ganglia </text><text transform="matrix(0.9908 0 0 1 118.0903 433.1613)" class="st3 st4 st5" style="white-space:pre;" data-v-7a368b29> Ganglionated nerve plexus </text>',9)],DY=IY(()=>h.createElementVNode("svg",{width:"72px",height:"72px",viewBox:"0 0 24 24",fill:"yellow"},null,-1));function FY(t,e,r,n,i,o){return h.openBlock(),h.createElementBlock("div",RY,[(h.openBlock(),h.createElementBlock("svg",NY,BY)),DY])}const NE=l2(PY,[["render",FY],["__scopeId","data-v-7a368b29"]]),jY={name:"ConnectionDialog",components:{Row:P2,Col:ga,ButtonGroup:Uw,Button:Qo,Card:qw},props:{connectionEntry:{type:Object},inDrawing:{type:Boolean,default:!1},hasConnection:{type:Boolean,default:!1}},data:function(){return{tooltipId:void 0}},methods:{shadowDisplay:function(t){return this.tooltipId===t?"always":"hover"},capitalise:function(t){return t[0].toUpperCase()+t.slice(1)},handleTooltip:function(t){this.tooltipId=this.tooltipId===t?void 0:t,this.$emit("featureTooltip",this.tooltipId)}}},yQ=t=>(h.pushScopeId("data-v-661fcf88"),t=t(),h.popScopeId(),t),zY={class:"dialog-container"},UY=yQ(()=>h.createElementVNode("span",{class:"dialog-title"},"Visualise connection",-1)),GY=yQ(()=>h.createElementVNode("span",{class:"dialog-subtitle"},"Finalise drawing",-1)),ZY=yQ(()=>h.createElementVNode("b",null,[h.createElementVNode("span",null,"Related Features")],-1));function $Y(t,e,r,n,i,o){const a=Qo,s=Uw,d=P2,p=ga,f=qw;return h.openBlock(),h.createElementBlock("div",zY,[h.createVNode(d,null,{default:h.withCtx(()=>[h.createVNode(p,null,{default:h.withCtx(()=>[UY,r.inDrawing?(h.openBlock(),h.createBlock(d,{key:0},{default:h.withCtx(()=>[GY,h.createVNode(s,null,{default:h.withCtx(()=>[h.createVNode(a,{type:"primary",plain:"",onClick:e[0]||(e[0]=Q=>t.$emit("confirmDrawn",!0))},{default:h.withCtx(()=>[h.createTextVNode(" Confirm ")]),_:1}),h.createVNode(a,{type:"primary",plain:"",onClick:e[1]||(e[1]=Q=>t.$emit("cancelDrawn",!0))},{default:h.withCtx(()=>[h.createTextVNode(" Cancel ")]),_:1})]),_:1})]),_:1})):(h.openBlock(),h.createBlock(d,{key:1},{default:h.withCtx(()=>[h.createVNode(a,{type:"primary",plain:"",onClick:e[2]||(e[2]=Q=>t.$emit("dialogDisplay",!1))},{default:h.withCtx(()=>[h.createTextVNode(" Close ")]),_:1})]),_:1}))]),_:1})]),_:1}),r.hasConnection?(h.openBlock(),h.createBlock(d,{key:0},{default:h.withCtx(()=>[h.createVNode(p,null,{default:h.withCtx(()=>[ZY,(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.connectionEntry,(Q,m)=>(h.openBlock(),h.createBlock(d,{key:m},{default:h.withCtx(()=>[h.createVNode(f,{shadow:o.shadowDisplay(m),onClick:_=>o.handleTooltip(m)},{default:h.withCtx(()=>[h.createElementVNode("span",null,h.toDisplayString(o.capitalise(Q.label)),1)]),_:2},1032,["shadow","onClick"])]),_:2},1024))),128))]),_:1})]),_:1})):h.createCommentVNode("",!0)])}const qY=l2(jY,[["render",$Y],["__scopeId","data-v-661fcf88"]]),WY=(t,e)=>{let r,n,i,o,a,s;e.style.left="",e.style.top="",e.addEventListener("mousedown",p=>{p.preventDefault(),r=e.offsetLeft,n=e.offsetTop,i=p.clientX,o=p.clientY,e.addEventListener("mousemove",d,!1),document.addEventListener("mouseup",()=>{e.removeEventListener("mousemove",d,!1)},!1)},!1);function d(p){p.preventDefault(),a=r-(i-p.clientX),s=n-(o-p.clientY),e.style.left=`${a}px`,e.style.top=`${s}px`}},XY={name:"DrawTool",components:{MapSvgIcon:cf.MapSvgIcon},props:{flatmapCanvas:{type:Object,default:null},drawnType:{type:String},activeDrawTool:{type:String},activeDrawMode:{type:String},drawnCreatedEvent:{type:Object},connectionEntry:{type:Object},hoverVisibilities:{type:Array}},data:function(){return{activeTool:void 0,activeMode:void 0,connectionDisplay:!1,dialogPosition:{offsetX:0,offsetY:0,x:void 0,y:void 0},toolbarIcons:[{name:"Connection",active:!1,disabled:!0},{name:"Point",active:!1,disabled:!1},{name:"LineString",active:!1,disabled:!1},{name:"Polygon",active:!1,disabled:!1},{name:"Edit",active:!1,disabled:!1},{name:"Delete",active:!1,disabled:!1}]}},computed:{inDrawing:function(){return this.activeDrawTool!==void 0},isFeatureDrawn:function(){return this.drawnCreatedEvent!==void 0},hasConnection:function(){return Object.keys(this.connectionEntry).length>0}},watch:{activeDrawTool:function(t){this.updateToolbarIcons(t),t||(this.connectionDisplay=!1)},activeDrawMode:function(t){this.updateToolbarIcons(t),t==="Delete"&&(this.connectionDisplay=!1)},hasConnection:function(t){this.updateToolbarConnectionIcon(t,"disabled"),t||(this.connectionDisplay=!1)},isFeatureDrawn:function(t){t&&(this.connectionDisplay=!0)},connectionDisplay:function(t){this.updateToolbarConnectionIcon(t,"active"),t?this.dialogCssHacks():this.$emit("featureTooltip",void 0)},dialogPosition:{handler:function(){const t=this.$el.getBoundingClientRect();this.dialogPosition.offsetX=t.x,this.dialogPosition.offsetY=t.y},deep:!0,once:!0}},methods:{drawConnectionEvent:function(){this.hasConnection&&!this.activeDrawTool&&this.activeDrawMode!=="Delete"&&(this.connectionDisplay=!this.connectionDisplay)},updateToolbarConnectionIcon:function(t,e){this.toolbarIcons.filter(r=>r.name==="Connection").map(r=>{this.activeDrawMode==="Delete"?r.disabled=!0:(e==="active"&&(t?r.active=!0:r.active=!1),e==="disabled"&&(t?r.disabled=!1:r.disabled=!0))}),this.toolbarCssHacks()},updateToolbarIcons:function(t){this.toolbarIcons.map(e=>{e.name===t?e.active=!0:e.active=!1}),this.toolbarIcons.filter(e=>e.name!=="Connection"&&e.name!==t).map(e=>{t?e.disabled=!0:e.disabled=!1}),this.toolbarCssHacks()},drawToolEvent:function(t){if((!this.activeDrawTool||this.activeDrawTool===t)&&!this.activeDrawMode&&!this.connectionDisplay){if(t==="Point"){const e=this.flatmapCanvas.querySelector(".mapbox-gl-draw_point");e.click(),this.activeTool=e.classList.contains("active")?"Point":void 0}else if(t==="LineString"){const e=this.flatmapCanvas.querySelector(".mapbox-gl-draw_line");e.click(),this.activeTool=e.classList.contains("active")?"LineString":void 0}else if(t==="Polygon"){const e=this.flatmapCanvas.querySelector(".mapbox-gl-draw_polygon");e.click(),this.activeTool=e.classList.contains("active")?"Polygon":void 0}this.$emit("drawToolbarEvent",this.activeTool)}},drawModeEvent:function(t){(!this.activeDrawMode||this.activeDrawMode===t)&&!this.activeDrawTool&&(this.activeMode=t,this.$emit("drawToolbarEvent",this.activeMode))},toolbarCssHacks:function(){this.toolbarIcons.map(t=>{const e=this.$el.querySelector(`.draw${t.name}`);e&&(t.active?e.classList.add("active"):e.classList.remove("active"),t.disabled?e.classList.add("disabled"):e.classList.remove("disabled"))})},dialogCssHacks:function(){this.$nextTick(()=>{const t=this.$el.querySelector(".connection-dialog");WY(this.flatmapCanvas,t);let e,r;const n=this.flatmapCanvas.getBoundingClientRect(),i=t.getBoundingClientRect();this.dialogPosition.x>n.width/2?e=this.dialogPosition.x-i.width:e=this.dialogPosition.x,this.dialogPosition.y>n.height/2?r=this.dialogPosition.y-i.height:r=this.dialogPosition.y,t.style.transform=`translate(${e-this.dialogPosition.offsetX}px, ${r-this.dialogPosition.offsetY}px)`})},showTooltip:function(t){this.$emit("showTooltip",t)},hideTooltip:function(t){this.$emit("hideTooltip",t)},clickHandler:function(t){t.preventDefault(),this.dialogPosition.x=t.clientX,this.dialogPosition.y=t.clientY,this.activeDrawTool==="Point"&&this.dialogCssHacks()}},mounted:function(){this.toolbarCssHacks(),this.flatmapCanvas&&this.flatmapCanvas.querySelector(".maplibregl-canvas").addEventListener("click",this.clickHandler,!1)},destroyed:function(){this.flatmapCanvas&&this.flatmapCanvas.querySelector(".maplibregl-canvas").removeEventListener("click",this.clickHandler,!1)}},KY={class:"drawtool-container"};function YY(t,e,r,n,i,o){const a=h.resolveComponent("map-svg-icon"),s=p5,d=qY;return h.openBlock(),h.createElementBlock("div",null,[h.createElementVNode("div",KY,[h.createVNode(s,{content:"Connection",placement:"left",teleported:!1,trigger:"manual",width:"100","popper-class":"flatmap-popper",visible:r.hoverVisibilities[10].value,ref:"connectionPopover"},{reference:h.withCtx(()=>[h.createVNode(a,{icon:"connection",class:"icon-button drawConnection",onClick:e[0]||(e[0]=p=>o.drawConnectionEvent()),onMouseover:e[1]||(e[1]=p=>o.showTooltip(10)),onMouseout:e[2]||(e[2]=p=>o.hideTooltip(10))})]),_:1},8,["visible"]),r.drawnType!=="LineString"&&r.drawnType!=="Polygon"?(h.openBlock(),h.createBlock(s,{key:0,content:"Draw Point",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:r.hoverVisibilities[11].value,ref:"drawPointPopover"},{reference:h.withCtx(()=>[h.createVNode(a,{icon:"drawPoint",class:"icon-button drawPoint",onClick:e[3]||(e[3]=p=>o.drawToolEvent("Point")),onMouseover:e[4]||(e[4]=p=>o.showTooltip(11)),onMouseout:e[5]||(e[5]=p=>o.hideTooltip(11))})]),_:1},8,["visible"])):h.createCommentVNode("",!0),r.drawnType!=="Point"&&r.drawnType!=="Polygon"?(h.openBlock(),h.createBlock(s,{key:1,content:"Draw Line",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:r.hoverVisibilities[12].value,ref:"drawLinePopover"},{reference:h.withCtx(()=>[h.createVNode(a,{icon:"drawLine",class:"icon-button drawLineString",onClick:e[6]||(e[6]=p=>o.drawToolEvent("LineString")),onMouseover:e[7]||(e[7]=p=>o.showTooltip(12)),onMouseout:e[8]||(e[8]=p=>o.hideTooltip(12))})]),_:1},8,["visible"])):h.createCommentVNode("",!0),r.drawnType!=="Point"&&r.drawnType!=="LineString"?(h.openBlock(),h.createBlock(s,{key:2,content:"Draw Polygon",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:r.hoverVisibilities[13].value,ref:"drawPolygonPopover"},{reference:h.withCtx(()=>[h.createVNode(a,{icon:"drawPolygon",class:"icon-button drawPolygon",onClick:e[9]||(e[9]=p=>o.drawToolEvent("Polygon")),onMouseover:e[10]||(e[10]=p=>o.showTooltip(13)),onMouseout:e[11]||(e[11]=p=>o.hideTooltip(13))})]),_:1},8,["visible"])):h.createCommentVNode("",!0),h.createVNode(s,{content:"Delete",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:r.hoverVisibilities[14].value,ref:"deletePopover"},{reference:h.withCtx(()=>[h.createVNode(a,{icon:"drawTrash",class:"icon-button drawDelete",onClick:e[12]||(e[12]=p=>o.drawModeEvent("Delete")),onMouseover:e[13]||(e[13]=p=>o.showTooltip(14)),onMouseout:e[14]||(e[14]=p=>o.hideTooltip(14))})]),_:1},8,["visible"]),h.createVNode(s,{content:"Edit",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:r.hoverVisibilities[15].value,ref:"editPopover"},{reference:h.withCtx(()=>[h.createVNode(a,{icon:"comment",class:"icon-button drawEdit",onClick:e[15]||(e[15]=p=>o.drawModeEvent("Edit")),onMouseover:e[16]||(e[16]=p=>o.showTooltip(15)),onMouseout:e[17]||(e[17]=p=>o.hideTooltip(15))})]),_:1},8,["visible"])]),h.withDirectives(h.createVNode(d,{class:"connection-dialog",connectionEntry:r.connectionEntry,inDrawing:o.inDrawing,hasConnection:o.hasConnection,onDialogDisplay:e[18]||(e[18]=p=>o.drawConnectionEvent()),onConfirmDrawn:e[19]||(e[19]=p=>t.$emit("confirmDrawn",p)),onCancelDrawn:e[20]||(e[20]=p=>t.$emit("cancelDrawn",p)),onFeatureTooltip:e[21]||(e[21]=p=>t.$emit("featureTooltip",p))},null,8,["connectionEntry","inDrawing","hasConnection"]),[[h.vShow,t.connectionDisplay]])])}const BE=l2(XY,[["render",YY],["__scopeId","data-v-f494b4fc"]]),JY=`<div class="flatmap-marker">
|
|
26
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="28" height="39" viewBox="-1 -1 27 42">
|
|
27
|
+
<ellipse style="fill: rgb(0, 0, 0); fill-opacity: 0.2;" cx="12" cy="36" rx="8" ry="4"></ellipse>
|
|
28
|
+
<path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0
|
|
29
|
+
C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:#EE5900;stroke:#fff;stroke-width:1"></path>
|
|
30
|
+
<circle cx="12.5" cy="12.5" r="9" fill="#fff"></circle>
|
|
31
|
+
<text x="12" y="17.5" style="font-size:14px;fill:#000;text-anchor:middle">2</text>
|
|
32
|
+
</svg>
|
|
33
|
+
</div>`,_Q=function(t){return t?[...new Set(t.map(e=>JSON.stringify(e)))].map(e=>JSON.parse(e)):[]},Sl={},DE=async function(t,e){return Sl&&Sl.hasOwnProperty(e)?Sl[e]:new Promise(r=>{fetch(`${t}knowledge/label/${e}`,{method:"GET"}).then(n=>n.json()).then(n=>{let i=n.label;i==="Mammalia"&&(i="Mammalia not otherwise specified"),Sl[e]=i,r(i)}).catch(n=>{console.error("Error:",n),Sl[e]=e,r(e)})})},FE=function(t,e){if(!t||!e)return!1;let r=JSON.stringify(t),n=JSON.stringify(e);return r.indexOf(n)!==-1};let tJ=function(){this.initialise=function(t){this.flatmapApi=t,this.destinations=[],this.origins=[],this.components=[],this.urls=[],this.controller=void 0,this.uberons=[],this.lookUp=[]},this.createTooltipData=async function(t){let e=[];t.feature.hyperlinks&&t.feature.hyperlinks.length>0?e=t.feature.hyperlinks:e=this.urls.map(i=>({url:i,id:"pubmed"}));let r;if(t.provenanceTaxonomy){r=[];for(let i=0;t.provenanceTaxonomy.length>i;i++)r.push(await DE(this.flatmapAPI,t.provenanceTaxonomy[i]))}return{destinations:this.destinations,origins:this.origins,components:this.components,destinationsWithDatasets:this.destinationsWithDatasets,originsWithDatasets:this.originsWithDatasets,componentsWithDatasets:this.componentsWithDatasets,title:t.label,featureId:t.resource,hyperlinks:e,provenanceTaxonomy:t.provenanceTaxonomy,provenanceTaxonomyLabel:r}},this.createComponentsLabelList=function(t,e){let r=[];return t.forEach(n=>{r.push(this.createLabelFromNeuralNode(n[0]),e),n.length===2&&r.push(this.createLabelFromNeuralNode(n[1]),e)}),r},this.createLabelLookup=function(t){return new Promise(e=>{let r={};this.uberons=[];const n={sql:this.buildLabelSqlStatement(t)};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]})}),e(r)})})},this.buildConnectivitySqlStatement=function(t){let e="select knowledge from knowledge where entity in (";if(t.length===1)e+=`'${t[0]}')`;else if(t.length>1)for(let r in t)e+=`'${t[r]}'${r>=t.length-1?")":","} `;return e},this.buildLabelSqlStatement=function(t){let e="select entity, label from labels where entity in (";if(t.length===1)e+=`'${t[0]}')`;else if(t.length>1)for(let r in t)e+=`'${t[r]}'${r>=t.length-1?")":","} `;return e},this.findAllIdsFromConnectivity=function(t){let e=t.connectivity.flat(),r=[...new Set(e)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),[...new Set(n.flat())]},this.flattenConntectivity=function(t){let e=t.flat(),r=[...new Set(e)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),n.flat()},this.findComponents=function(t){let e=t.connectivity.flat(),r=_Q(e),n=[],i=!1;return r.forEach(o=>{i=!1,FE(t.axons,o)&&(i=!0),FE(t.dendrites,o)&&(i=!0),i||n.push(o)}),n},this.retrieveFlatmapKnowledgeForEvent=async function(t){this.controller&&this.controller.abort(),this.controller=new AbortController;const e=this.controller.signal,r=t.resource;if(this.destinations=[],this.origins=[],this.components=[],!r||r.length==0)return;let n=this.queryForConnectivity(r,e),i=await this.pubmedQueryOnIds(t);return await Promise.all([n,i])},this.queryForConnectivity=function(t,e,r=!0){const n={sql:this.buildConnectivitySqlStatement(t)},i={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),...e?{signal:e}:{}};return new Promise(o=>{fetch(`${this.flatmapApi}knowledge/query/`,i).then(a=>a.json()).then(a=>{if(this.connectivityExists(a)){let s=JSON.parse(a.values[0][0]);r?this.processConnectivity(s).then(d=>{o(d)}):o(s)}else o(!1)}).catch(a=>{console.error("Error:",a),o(!1)})})},this.connectivityExists=function(t){return!!(t.values&&t.values.length>0&&JSON.parse(t.values[0][0]).connectivity&&JSON.parse(t.values[0][0]).connectivity.length>0)},this.findIfNodeIsSingle=function(t){return t.length===1?(console.error("Server returns a single node",t),t[0]):t.length===2&&t[1].length===0?t[0]:!1},this.createLabelFromNeuralNode=function(t,e){let r=this.findIfNodeIsSingle(t);if(r)return e[r];let n=e[t[0]];return t.length===2&&t[1].length>0&&t[1].forEach(i=>{e[i]==null?n+=`, ${i}`:n+=`, ${e[i]}`}),n},this.flattenAndFindDatasets=function(t,e,r){let n=this.flattenConntectivity(t),i=this.flattenConntectivity(e),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(t){return new Promise(e=>{let r=this.findComponents(t),n=_Q(t.axons),i=_Q(t.dendrites),o=this.findAllIdsFromConnectivity(t);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),e({ids:{axons:n,dendrites:i,components:r},labels:{destinations:this.destinations,origins:this.origins,components:this.components}})})})},this.flattenConntectivity=function(t){let e=t.flat(),r=[...new Set(e)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),n.flat()},this.stripPMIDPrefix=function(t){return t.split(":")[1]},this.buildPubmedSqlStatement=function(t){let e="select distinct publication from publications where entity in (";if(t.length===1)e+=`'${t[0]}')`;else if(t.length>1)for(let r in t)e+=`'${t[r]}'${r>=t.length-1?")":","} `;return e},this.buildPubmedSqlStatementForModels=function(t){return`select distinct publication from publications where entity = '${t}'`},this.flatmapQuery=function(t){const e={sql:t};return fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(r=>r.json()).catch(r=>{console.error("Error:",r)})},this.pubmedQueryOnIds=function(t){return new Promise(e=>{const r=t.resource,n=t.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])))],e(!0)):this.pubmedQueryOnModels(n).then(a=>{e(a)})})})},this.pubmedQueryOnModels=function(t){return this.flatmapQuery(this.buildPubmedSqlStatementForModels(t)).then(e=>Array.isArray(e.values)&&e.values.length>0?(this.urls=[this.pubmedSearchUrl(e.values.map(r=>this.stripPMIDPrefix(r[0])))],!0):(this.urls=[],!1))},this.pubmedSearchUrl=function(t){let e="https://pubmed.ncbi.nlm.nih.gov/?",r=new URLSearchParams;return r.append("term",t),e+r.toString()}};const eJ='<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="47" y="52%" style="white-space: pre" dominant-baseline="middle" text-anchor="start" font-family="Asap, sans-serif" font-size="12" fill="#333333">Featured dataset marker</text></svg>';var jE={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(typeof window<"u"?window:Lq,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(f){return r.setTimeout(f,20)},i=r.cancelAnimationFrame||r.mozCancelAnimationFrame||r.webkitCancelAnimationFrame||function(f){r.clearTimeout(f)};function o(f,Q){var m=Object.prototype.toString.call(f),_=m==="[object Array]"||m==="[object NodeList]"||m==="[object HTMLCollection]"||m==="[object Object]"||typeof jQuery<"u"&&f instanceof jQuery||typeof Elements<"u"&&f instanceof Elements,v=0,b=f.length;if(_)for(;v<b;v++)Q(f[v]);else Q(f)}function a(f){if(!f.getBoundingClientRect)return{width:f.offsetWidth,height:f.offsetHeight};var Q=f.getBoundingClientRect();return{width:Math.round(Q.width),height:Math.round(Q.height)}}function s(f,Q){Object.keys(Q).forEach(function(m){f.style[m]=Q[m]})}var d=function(f,Q){var m=0;function _(){var b=[];this.add=function(V){b.push(V)};var M,E;this.call=function(V){for(M=0,E=b.length;M<E;M++)b[M].call(this,V)},this.remove=function(V){var O=[];for(M=0,E=b.length;M<E;M++)b[M]!==V&&O.push(b[M]);b=O},this.length=function(){return b.length}}function v(b,M){if(b){if(b.resizedAttached){b.resizedAttached.add(M);return}b.resizedAttached=new _,b.resizedAttached.add(M),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%"},V={position:"absolute",left:"0px",top:"0px",transition:"0s"};s(b.resizeSensor,E);var O=document.createElement("div");O.className="resize-sensor-expand",s(O,E);var R=document.createElement("div");s(R,V),O.appendChild(R);var j=document.createElement("div");j.className="resize-sensor-shrink",s(j,E);var G=document.createElement("div");s(G,V),s(G,{width:"200%",height:"200%"}),j.appendChild(G),b.resizeSensor.appendChild(O),b.resizeSensor.appendChild(j),b.appendChild(b.resizeSensor);var z=window.getComputedStyle(b),J=z?z.getPropertyValue("position"):null;J!=="absolute"&&J!=="relative"&&J!=="fixed"&&J!=="sticky"&&(b.style.position="relative");var tt=!1,ot=0,et=a(b),Tt=0,At=0,Ut=!0;m=0;var ee=function(){var Xt=b.offsetWidth,le=b.offsetHeight;R.style.width=Xt+10+"px",R.style.height=le+10+"px",O.scrollLeft=Xt+10,O.scrollTop=le+10,j.scrollLeft=Xt+10,j.scrollTop=le+10},ue=function(){if(Ut){var Xt=b.offsetWidth===0&&b.offsetHeight===0;if(Xt){m||(m=n(function(){m=0,ue()}));return}else Ut=!1}ee()};b.resizeSensor.resetSensor=ue;var Ft=function(){ot=0,tt&&(Tt=et.width,At=et.height,b.resizedAttached&&b.resizedAttached.call(et))},pe=function(){et=a(b),tt=et.width!==Tt||et.height!==At,tt&&!ot&&(ot=n(Ft)),ue()},lr=function(Xt,le,ge){Xt.attachEvent?Xt.attachEvent("on"+le,ge):Xt.addEventListener(le,ge)};lr(O,"scroll",pe),lr(j,"scroll",pe),m=n(function(){m=0,ue()})}}o(f,function(b){v(b,Q)}),this.detach=function(b){m||(i(m),m=0),d.detach(f,b)},this.reset=function(){f.resizeSensor.resetSensor()}};if(d.reset=function(f){o(f,function(Q){Q.resizeSensor.resetSensor()})},d.detach=function(f,Q){o(f,function(m){m&&(m.resizedAttached&&typeof Q=="function"&&(m.resizedAttached.remove(Q),m.resizedAttached.length())||m.resizeSensor&&(m.contains(m.resizeSensor)&&m.removeChild(m.resizeSensor),delete m.resizeSensor,delete m.resizedAttached))})},typeof MutationObserver<"u"){var p=new MutationObserver(function(f){for(var Q in f)if(f.hasOwnProperty(Q))for(var m=f[Q].addedNodes,_=0;_<m.length;_++)m[_].resizeSensor&&d.reset(m[_])});document.addEventListener("DOMContentLoaded",function(f){p.observe(document.body,{childList:!0,subtree:!0})})}return d})})(jE);var rJ=jE.exports;const nJ=xq(rJ);var iJ=Object.defineProperty,oJ=(t,e,r)=>e in t?iJ(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,vQ=(t,e,r)=>(oJ(t,typeof e!="symbol"?e+"":e,r),r),bQ=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},Bt=(t,e,r)=>(bQ(t,e,"read from private field"),r?r.call(t):e.get(t)),Tr=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Sr=(t,e,r,n)=>(bQ(t,e,"write to private field"),e.set(t,r),r),vr=(t,e,r)=>(bQ(t,e,"access private method"),r);function aJ(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in t)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(t,i,o.get?o:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var P=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Cl(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function sJ(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var Ki=function(t){try{return!!t()}catch{return!0}},lJ=Ki,LQ=!lJ(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),zE=LQ,UE=Function.prototype,xQ=UE.call,cJ=zE&&UE.bind.bind(xQ,xQ),yi=zE?cJ:function(t){return function(){return xQ.apply(t,arguments)}},GE=yi,uJ=GE({}.toString),hJ=GE("".slice),Al=function(t){return hJ(uJ(t),8,-1)},dJ=yi,pJ=Ki,TJ=Al,wQ=Object,fJ=dJ("".split),QJ=pJ(function(){return!wQ("z").propertyIsEnumerable(0)})?function(t){return TJ(t)==="String"?fJ(t,""):wQ(t)}:wQ,Vl=function(t){return t==null},mJ=Vl,gJ=TypeError,F9=function(t){if(mJ(t))throw new gJ("Can't call method on "+t);return t},yJ=QJ,_J=F9,m5=function(t){return yJ(_J(t))},Ol=function(t){return t&&t.Math===Math&&t},Po=Ol(typeof globalThis=="object"&&globalThis)||Ol(typeof window=="object"&&window)||Ol(typeof self=="object"&&self)||Ol(typeof P=="object"&&P)||Ol(typeof P=="object"&&P)||function(){return this}()||Function("return this")(),ZE={exports:{}},$E=Po,vJ=Object.defineProperty,EQ=function(t,e){try{vJ($E,t,{value:e,configurable:!0,writable:!0})}catch{$E[t]=e}return e},bJ=Po,LJ=EQ,qE="__core-js_shared__",WE=ZE.exports=bJ[qE]||LJ(qE,{});(WE.versions||(WE.versions=[])).push({version:"3.37.0",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.0/LICENSE",source:"https://github.com/zloirock/core-js"});var MQ=ZE.exports,XE=MQ,KE=function(t,e){return XE[t]||(XE[t]=e||{})},xJ=F9,wJ=Object,YE=function(t){return wJ(xJ(t))},EJ=yi,MJ=YE,HJ=EJ({}.hasOwnProperty),ya=Object.hasOwn||function(t,e){return HJ(MJ(t),e)},SJ=yi,CJ=0,AJ=Math.random(),VJ=SJ(1 .toString),HQ=function(t){return"Symbol("+(t===void 0?"":t)+")_"+VJ(++CJ+AJ,36)},OJ=typeof navigator<"u"&&String(navigator.userAgent)||"",JE=Po,SQ=OJ,tM=JE.process,eM=JE.Deno,rM=tM&&tM.versions||eM&&eM.version,nM=rM&&rM.v8,I2,j9;nM&&(I2=nM.split("."),j9=I2[0]>0&&I2[0]<4?1:+(I2[0]+I2[1])),!j9&&SQ&&(I2=SQ.match(/Edge\/(\d+)/),(!I2||I2[1]>=74)&&(I2=SQ.match(/Chrome\/(\d+)/),I2&&(j9=+I2[1])));var kJ=j9,iM=kJ,PJ=Ki,IJ=Po,RJ=IJ.String,oM=!!Object.getOwnPropertySymbols&&!PJ(function(){var t=Symbol("symbol detection");return!RJ(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&iM&&iM<41}),NJ=oM,aM=NJ&&!Symbol.sham&&typeof Symbol.iterator=="symbol",BJ=Po,DJ=KE,sM=ya,FJ=HQ,jJ=oM,zJ=aM,g5=BJ.Symbol,CQ=DJ("wks"),UJ=zJ?g5.for||g5:g5&&g5.withoutSetter||FJ,c2=function(t){return sM(CQ,t)||(CQ[t]=jJ&&sM(g5,t)?g5[t]:UJ("Symbol."+t)),CQ[t]},AQ=typeof document=="object"&&document.all,Oi=typeof AQ>"u"&&AQ!==void 0?function(t){return typeof t=="function"||t===AQ}:function(t){return typeof t=="function"},GJ=Oi,u2=function(t){return typeof t=="object"?t!==null:GJ(t)},ZJ=u2,$J=String,qJ=TypeError,v3=function(t){if(ZJ(t))return t;throw new qJ($J(t)+" is not an object")},lM={},WJ=Ki,R2=!WJ(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),XJ=R2,KJ=Ki,cM=XJ&&KJ(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),_a={},YJ=Po,uM=u2,VQ=YJ.document,JJ=uM(VQ)&&uM(VQ.createElement),OQ=function(t){return JJ?VQ.createElement(t):{}},ttt=R2,ett=Ki,rtt=OQ,hM=!ttt&&!ett(function(){return Object.defineProperty(rtt("div"),"a",{get:function(){return 7}}).a!==7}),ntt=LQ,z9=Function.prototype.call,Qs=ntt?z9.bind(z9):function(){return z9.apply(z9,arguments)},kQ=Po,itt=Oi,ott=function(t){return itt(t)?t:void 0},kl=function(t,e){return arguments.length<2?ott(kQ[t]):kQ[t]&&kQ[t][e]},att=yi,PQ=att({}.isPrototypeOf),stt=kl,ltt=Oi,ctt=PQ,utt=aM,htt=Object,dM=utt?function(t){return typeof t=="symbol"}:function(t){var e=stt("Symbol");return ltt(e)&&ctt(e.prototype,htt(t))},dtt=String,IQ=function(t){try{return dtt(t)}catch{return"Object"}},ptt=Oi,Ttt=IQ,ftt=TypeError,Pl=function(t){if(ptt(t))return t;throw new ftt(Ttt(t)+" is not a function")},Qtt=Pl,mtt=Vl,RQ=function(t,e){var r=t[e];return mtt(r)?void 0:Qtt(r)},NQ=Qs,BQ=Oi,DQ=u2,gtt=TypeError,ytt=function(t,e){var r,n;if(e==="string"&&BQ(r=t.toString)&&!DQ(n=NQ(r,t))||BQ(r=t.valueOf)&&!DQ(n=NQ(r,t))||e!=="string"&&BQ(r=t.toString)&&!DQ(n=NQ(r,t)))return n;throw new gtt("Can't convert object to primitive value")},_tt=Qs,pM=u2,TM=dM,vtt=RQ,btt=ytt,Ltt=c2,xtt=TypeError,wtt=Ltt("toPrimitive"),Ett=function(t,e){if(!pM(t)||TM(t))return t;var r=vtt(t,wtt),n;if(r){if(e===void 0&&(e="default"),n=_tt(r,t,e),!pM(n)||TM(n))return n;throw new xtt("Can't convert object to primitive value")}return e===void 0&&(e="number"),btt(t,e)},Mtt=Ett,Htt=dM,fM=function(t){var e=Mtt(t,"string");return Htt(e)?e:e+""},Stt=R2,Ctt=hM,Att=cM,U9=v3,QM=fM,Vtt=TypeError,FQ=Object.defineProperty,Ott=Object.getOwnPropertyDescriptor,jQ="enumerable",zQ="configurable",UQ="writable";_a.f=Stt?Att?function(t,e,r){if(U9(t),e=QM(e),U9(r),typeof t=="function"&&e==="prototype"&&"value"in r&&UQ in r&&!r[UQ]){var n=Ott(t,e);n&&n[UQ]&&(t[e]=r.value,r={configurable:zQ in r?r[zQ]:n[zQ],enumerable:jQ in r?r[jQ]:n[jQ],writable:!1})}return FQ(t,e,r)}:FQ:function(t,e,r){if(U9(t),e=QM(e),U9(r),Ctt)try{return FQ(t,e,r)}catch{}if("get"in r||"set"in r)throw new Vtt("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var ktt=Math.ceil,Ptt=Math.floor,Itt=Math.trunc||function(t){var e=+t;return(e>0?Ptt:ktt)(e)},Rtt=Itt,G9=function(t){var e=+t;return e!==e||e===0?0:Rtt(e)},Ntt=G9,Btt=Math.max,Dtt=Math.min,Ftt=function(t,e){var r=Ntt(t);return r<0?Btt(r+e,0):Dtt(r,e)},jtt=G9,ztt=Math.min,Utt=function(t){var e=jtt(t);return e>0?ztt(e,9007199254740991):0},Gtt=Utt,mM=function(t){return Gtt(t.length)},Ztt=m5,$tt=Ftt,qtt=mM,gM=function(t){return function(e,r,n){var i=Ztt(e),o=qtt(i);if(o===0)return!t&&-1;var a=$tt(n,o),s;if(t&&r!==r){for(;o>a;)if(s=i[a++],s!==s)return!0}else for(;o>a;a++)if((t||a in i)&&i[a]===r)return t||a||0;return!t&&-1}},Wtt={includes:gM(!0),indexOf:gM(!1)},Z9={},Xtt=yi,GQ=ya,Ktt=m5,Ytt=Wtt.indexOf,Jtt=Z9,yM=Xtt([].push),_M=function(t,e){var r=Ktt(t),n=0,i=[],o;for(o in r)!GQ(Jtt,o)&&GQ(r,o)&&yM(i,o);for(;e.length>n;)GQ(r,o=e[n++])&&(~Ytt(i,o)||yM(i,o));return i},ZQ=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],tet=_M,eet=ZQ,ret=Object.keys||function(t){return tet(t,eet)},net=R2,iet=cM,oet=_a,aet=v3,set=m5,cet=ret;lM.f=net&&!iet?Object.defineProperties:function(t,e){aet(t);for(var r=set(e),n=cet(e),i=n.length,o=0,a;i>o;)oet.f(t,a=n[o++],r[a]);return t};var uet=kl,het=uet("document","documentElement"),det=KE,pet=HQ,vM=det("keys"),$Q=function(t){return vM[t]||(vM[t]=pet(t))},Tet=v3,fet=lM,bM=ZQ,Qet=Z9,met=het,get=OQ,yet=$Q,LM=">",xM="<",qQ="prototype",WQ="script",wM=yet("IE_PROTO"),XQ=function(){},EM=function(t){return xM+WQ+LM+t+xM+"/"+WQ+LM},MM=function(t){t.write(EM("")),t.close();var e=t.parentWindow.Object;return t=null,e},_et=function(){var t=get("iframe"),e="java"+WQ+":",r;return t.style.display="none",met.appendChild(t),t.src=String(e),r=t.contentWindow.document,r.open(),r.write(EM("document.F=Object")),r.close(),r.F},$9,q9=function(){try{$9=new ActiveXObject("htmlfile")}catch{}q9=typeof document<"u"?document.domain&&$9?MM($9):_et():MM($9);for(var t=bM.length;t--;)delete q9[qQ][bM[t]];return q9()};Qet[wM]=!0;var KQ=Object.create||function(t,e){var r;return t!==null?(XQ[qQ]=Tet(t),r=new XQ,XQ[qQ]=null,r[wM]=t):r=q9(),e===void 0?r:fet.f(r,e)},vet=c2,bet=KQ,Let=_a.f,YQ=vet("unscopables"),JQ=Array.prototype;JQ[YQ]===void 0&&Let(JQ,YQ,{configurable:!0,value:bet(null)});var xet=function(t){JQ[YQ][t]=!0},Il={},wet=Po,Eet=Oi,HM=wet.WeakMap,Met=Eet(HM)&&/native code/.test(String(HM)),tm=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}},Het=R2,Cet=_a,Aet=tm,W9=Het?function(t,e,r){return Cet.f(t,e,Aet(1,r))}:function(t,e,r){return t[e]=r,t},Vet=Met,SM=Po,Oet=u2,ket=W9,em=ya,rm=MQ,Pet=$Q,Iet=Z9,CM="Object already initialized",nm=SM.TypeError,Ret=SM.WeakMap,X9,Rl,K9,Net=function(t){return K9(t)?Rl(t):X9(t,{})},Bet=function(t){return function(e){var r;if(!Oet(e)||(r=Rl(e)).type!==t)throw new nm("Incompatible receiver, "+t+" required");return r}};if(Vet||rm.state){var va=rm.state||(rm.state=new Ret);va.get=va.get,va.has=va.has,va.set=va.set,X9=function(t,e){if(va.has(t))throw new nm(CM);return e.facade=t,va.set(t,e),e},Rl=function(t){return va.get(t)||{}},K9=function(t){return va.has(t)}}else{var y5=Pet("state");Iet[y5]=!0,X9=function(t,e){if(em(t,y5))throw new nm(CM);return e.facade=t,ket(t,y5,e),e},Rl=function(t){return em(t,y5)?t[y5]:{}},K9=function(t){return em(t,y5)}}var Y9={set:X9,get:Rl,has:K9,enforce:Net,getterFor:Bet},im={},AM={},VM={}.propertyIsEnumerable,OM=Object.getOwnPropertyDescriptor,Det=OM&&!VM.call({1:2},1);AM.f=Det?function(t){var e=OM(this,t);return!!e&&e.enumerable}:VM;var Fet=R2,jet=Qs,zet=AM,Uet=tm,Get=m5,Zet=fM,$et=ya,qet=hM,kM=Object.getOwnPropertyDescriptor;im.f=Fet?kM:function(t,e){if(t=Get(t),e=Zet(e),qet)try{return kM(t,e)}catch{}if($et(t,e))return Uet(!jet(zet.f,t,e),t[e])};var PM={exports:{}},om=R2,Wet=ya,IM=Function.prototype,Xet=om&&Object.getOwnPropertyDescriptor,am=Wet(IM,"name"),Ket=am&&(function(){}).name==="something",Yet=am&&(!om||om&&Xet(IM,"name").configurable),RM={EXISTS:am,PROPER:Ket,CONFIGURABLE:Yet},Jet=yi,trt=Oi,sm=MQ,ert=Jet(Function.toString);trt(sm.inspectSource)||(sm.inspectSource=function(t){return ert(t)});var rrt=sm.inspectSource,lm=yi,nrt=Ki,irt=Oi,J9=ya,cm=R2,ort=RM.CONFIGURABLE,art=rrt,NM=Y9,srt=NM.enforce,lrt=NM.get,BM=String,tu=Object.defineProperty,crt=lm("".slice),urt=lm("".replace),hrt=lm([].join),drt=cm&&!nrt(function(){return tu(function(){},"length",{value:8}).length!==8}),prt=String(String).split("String"),Trt=PM.exports=function(t,e,r){crt(BM(e),0,7)==="Symbol("&&(e="["+urt(BM(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(e="get "+e),r&&r.setter&&(e="set "+e),(!J9(t,"name")||ort&&t.name!==e)&&(cm?tu(t,"name",{value:e,configurable:!0}):t.name=e),drt&&r&&J9(r,"arity")&&t.length!==r.arity&&tu(t,"length",{value:r.arity});try{r&&J9(r,"constructor")&&r.constructor?cm&&tu(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch{}var n=srt(t);return J9(n,"source")||(n.source=hrt(prt,typeof e=="string"?e:"")),t};Function.prototype.toString=Trt(function(){return irt(this)&&lrt(this).source||art(this)},"toString");var DM=PM.exports,frt=Oi,Qrt=_a,mrt=DM,grt=EQ,_5=function(t,e,r,n){n||(n={});var i=n.enumerable,o=n.name!==void 0?n.name:e;if(frt(r)&&mrt(r,o,n),n.global)i?t[e]=r:grt(e,r);else{try{n.unsafe?t[e]&&(i=!0):delete t[e]}catch{}i?t[e]=r:Qrt.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},eu={},yrt=_M,_rt=ZQ,vrt=_rt.concat("length","prototype");eu.f=Object.getOwnPropertyNames||function(t){return yrt(t,vrt)};var FM={};FM.f=Object.getOwnPropertySymbols;var brt=kl,Lrt=yi,xrt=eu,wrt=FM,Ert=v3,Mrt=Lrt([].concat),Hrt=brt("Reflect","ownKeys")||function(t){var e=xrt.f(Ert(t)),r=wrt.f;return r?Mrt(e,r(t)):e},jM=ya,Srt=Hrt,Crt=im,Art=_a,Vrt=function(t,e,r){for(var n=Srt(e),i=Art.f,o=Crt.f,a=0;a<n.length;a++){var s=n[a];!jM(t,s)&&!(r&&jM(r,s))&&i(t,s,o(e,s))}},Ort=Ki,krt=Oi,Prt=/#|\.prototype\./,Nl=function(t,e){var r=Rrt[Irt(t)];return r===Brt?!0:r===Nrt?!1:krt(e)?Ort(e):!!e},Irt=Nl.normalize=function(t){return String(t).replace(Prt,".").toLowerCase()},Rrt=Nl.data={},Nrt=Nl.NATIVE="N",Brt=Nl.POLYFILL="P",zM=Nl,ru=Po,Drt=im.f,Frt=W9,jrt=_5,zrt=EQ,Urt=Vrt,Grt=zM,ba=function(t,e){var r=t.target,n=t.global,i=t.stat,o,a,s,d,p,f;if(n?a=ru:i?a=ru[r]||zrt(r,{}):a=ru[r]&&ru[r].prototype,a)for(s in e){if(p=e[s],t.dontCallGetSet?(f=Drt(a,s),d=f&&f.value):d=a[s],o=Grt(n?s:r+(i?".":"#")+s,t.forced),!o&&d!==void 0){if(typeof p==typeof d)continue;Urt(p,d)}(t.sham||d&&d.sham)&&Frt(p,"sham",!0),jrt(a,s,p,t)}},Zrt=Ki,$rt=!Zrt(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),qrt=ya,Wrt=Oi,Xrt=YE,Krt=$Q,Yrt=$rt,UM=Krt("IE_PROTO"),um=Object,Jrt=um.prototype,GM=Yrt?um.getPrototypeOf:function(t){var e=Xrt(t);if(qrt(e,UM))return e[UM];var r=e.constructor;return Wrt(r)&&e instanceof r?r.prototype:e instanceof um?Jrt:null},tnt=Ki,ent=Oi,rnt=u2,ZM=GM,nnt=_5,int=c2,hm=int("iterator"),$M=!1,P4,dm,pm;[].keys&&(pm=[].keys(),"next"in pm?(dm=ZM(ZM(pm)),dm!==Object.prototype&&(P4=dm)):$M=!0);var ont=!rnt(P4)||tnt(function(){var t={};return P4[hm].call(t)!==t});ont&&(P4={}),ent(P4[hm])||nnt(P4,hm,function(){return this});var qM={IteratorPrototype:P4,BUGGY_SAFARI_ITERATORS:$M},ant=_a.f,snt=ya,lnt=c2,WM=lnt("toStringTag"),nu=function(t,e,r){t&&!r&&(t=t.prototype),t&&!snt(t,WM)&&ant(t,WM,{configurable:!0,value:e})},cnt=qM.IteratorPrototype,unt=KQ,hnt=tm,dnt=nu,pnt=Il,Tnt=function(){return this},fnt=function(t,e,r,n){var i=e+" Iterator";return t.prototype=unt(cnt,{next:hnt(+!n,r)}),dnt(t,i,!1),pnt[i]=Tnt,t},Qnt=yi,mnt=Pl,XM=function(t,e,r){try{return Qnt(mnt(Object.getOwnPropertyDescriptor(t,e)[r]))}catch{}},gnt=u2,ynt=function(t){return gnt(t)||t===null},_nt=ynt,vnt=String,bnt=TypeError,Lnt=function(t){if(_nt(t))return t;throw new bnt("Can't set "+vnt(t)+" as a prototype")},xnt=XM,wnt=u2,Ent=F9,Mnt=Lnt,KM=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,e={},r;try{r=xnt(Object.prototype,"__proto__","set"),r(e,[]),t=e instanceof Array}catch{}return function(n,i){return Ent(n),Mnt(i),wnt(n)&&(t?r(n,i):n.__proto__=i),n}}():void 0),Hnt=ba,Snt=Qs,YM=RM,Cnt=Oi,Ant=fnt,JM=GM,tH=KM,Vnt=nu,Ont=W9,Tm=_5,knt=c2,Pnt=Il,eH=qM,Int=YM.PROPER,Rnt=YM.CONFIGURABLE,rH=eH.IteratorPrototype,iu=eH.BUGGY_SAFARI_ITERATORS,Bl=knt("iterator"),nH="keys",Dl="values",iH="entries",Nnt=function(){return this},fm=function(t,e,r,n,i,o,a){Ant(r,e,n);var s=function(E){if(E===i&&m)return m;if(!iu&&E&&E in f)return f[E];switch(E){case nH:return function(){return new r(this,E)};case Dl:return function(){return new r(this,E)};case iH:return function(){return new r(this,E)}}return function(){return new r(this)}},d=e+" Iterator",p=!1,f=t.prototype,Q=f[Bl]||f["@@iterator"]||i&&f[i],m=!iu&&Q||s(i),_=e==="Array"&&f.entries||Q,v,b,M;if(_&&(v=JM(_.call(new t)),v!==Object.prototype&&v.next&&(JM(v)!==rH&&(tH?tH(v,rH):Cnt(v[Bl])||Tm(v,Bl,Nnt)),Vnt(v,d,!0))),Int&&i===Dl&&Q&&Q.name!==Dl&&(Rnt?Ont(f,"name",Dl):(p=!0,m=function(){return Snt(Q,this)})),i)if(b={values:s(Dl),keys:o?m:s(nH),entries:s(iH)},a)for(M in b)(iu||p||!(M in f))&&Tm(f,M,b[M]);else Hnt({target:e,proto:!0,forced:iu||p},b);return f[Bl]!==m&&Tm(f,Bl,m,{name:i}),Pnt[e]=m,b},Qm=function(t,e){return{value:t,done:e}},Bnt=m5,mm=xet,oH=Il,aH=Y9,Dnt=_a.f,Fnt=fm,ou=Qm,jnt=R2,sH="Array Iterator",znt=aH.set,Unt=aH.getterFor(sH),Gnt=Fnt(Array,"Array",function(t,e){znt(this,{type:sH,target:Bnt(t),index:0,kind:e})},function(){var t=Unt(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=void 0,ou(void 0,!0);switch(t.kind){case"keys":return ou(r,!1);case"values":return ou(e[r],!1)}return ou([r,e[r]],!1)},"values"),lH=oH.Arguments=oH.Array;if(mm("keys"),mm("values"),mm("entries"),jnt&&lH.name!=="values")try{Dnt(lH,"name",{value:"values"})}catch{}var Znt=c2,$nt=Znt("toStringTag"),cH={};cH[$nt]="z";var gm=String(cH)==="[object z]",qnt=gm,Wnt=Oi,au=Al,Xnt=c2,Knt=Xnt("toStringTag"),Ynt=Object,Jnt=au(function(){return arguments}())==="Arguments",t1t=function(t,e){try{return t[e]}catch{}},ym=qnt?au:function(t){var e,r,n;return t===void 0?"Undefined":t===null?"Null":typeof(r=t1t(e=Ynt(t),Knt))=="string"?r:Jnt?au(e):(n=au(e))==="Object"&&Wnt(e.callee)?"Arguments":n},e1t=gm,r1t=ym,n1t=e1t?{}.toString:function(){return"[object "+r1t(this)+"]"},i1t=gm,o1t=_5,a1t=n1t;i1t||o1t(Object.prototype,"toString",a1t,{unsafe:!0});var uH={exports:{}},hH={},s1t=yi,l1t=s1t([].slice),c1t=Al,u1t=m5,dH=eu.f,h1t=l1t,pH=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],d1t=function(t){try{return dH(t)}catch{return h1t(pH)}};hH.f=function(t){return pH&&c1t(t)==="Window"?d1t(t):dH(u1t(t))};var p1t=Ki,T1t=p1t(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),f1t=Ki,Q1t=u2,m1t=Al,TH=T1t,su=Object.isExtensible,g1t=f1t(function(){su(1)}),y1t=g1t||TH?function(t){return!Q1t(t)||TH&&m1t(t)==="ArrayBuffer"?!1:su?su(t):!0}:su,_1t=Ki,v1t=!_1t(function(){return Object.isExtensible(Object.preventExtensions({}))}),b1t=ba,L1t=yi,x1t=Z9,w1t=u2,_m=ya,E1t=_a.f,fH=eu,M1t=hH,vm=y1t,H1t=HQ,S1t=v1t,QH=!1,ms=H1t("meta"),C1t=0,bm=function(t){E1t(t,ms,{value:{objectID:"O"+C1t++,weakData:{}}})},A1t=function(t,e){if(!w1t(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!_m(t,ms)){if(!vm(t))return"F";if(!e)return"E";bm(t)}return t[ms].objectID},V1t=function(t,e){if(!_m(t,ms)){if(!vm(t))return!0;if(!e)return!1;bm(t)}return t[ms].weakData},O1t=function(t){return S1t&&QH&&vm(t)&&!_m(t,ms)&&bm(t),t},k1t=function(){P1t.enable=function(){},QH=!0;var t=fH.f,e=L1t([].splice),r={};r[ms]=1,t(r).length&&(fH.f=function(n){for(var i=t(n),o=0,a=i.length;o<a;o++)if(i[o]===ms){e(i,o,1);break}return i},b1t({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:M1t.f}))},P1t=uH.exports={enable:k1t,fastKey:A1t,getWeakData:V1t,onFreeze:O1t};x1t[ms]=!0;var mH=uH.exports,I1t=Al,R1t=yi,N1t=function(t){if(I1t(t)==="Function")return R1t(t)},gH=N1t,B1t=Pl,D1t=LQ,F1t=gH(gH.bind),yH=function(t,e){return B1t(t),e===void 0?t:D1t?F1t(t,e):function(){return t.apply(e,arguments)}},j1t=c2,z1t=Il,U1t=j1t("iterator"),G1t=Array.prototype,Z1t=function(t){return t!==void 0&&(z1t.Array===t||G1t[U1t]===t)},$1t=ym,_H=RQ,q1t=Vl,W1t=Il,X1t=c2,K1t=X1t("iterator"),vH=function(t){if(!q1t(t))return _H(t,K1t)||_H(t,"@@iterator")||W1t[$1t(t)]},Y1t=Qs,J1t=Pl,tit=v3,eit=IQ,rit=vH,nit=TypeError,iit=function(t,e){var r=arguments.length<2?rit(t):e;if(J1t(r))return tit(Y1t(r,t));throw new nit(eit(t)+" is not iterable")},oit=Qs,bH=v3,ait=RQ,Lm=function(t,e,r){var n,i;bH(t);try{if(n=ait(t,"return"),!n){if(e==="throw")throw r;return r}n=oit(n,t)}catch(o){i=!0,n=o}if(e==="throw")throw r;if(i)throw n;return bH(n),r},sit=yH,lit=Qs,cit=v3,uit=IQ,hit=Z1t,dit=mM,LH=PQ,pit=iit,Tit=vH,xH=Lm,fit=TypeError,lu=function(t,e){this.stopped=t,this.result=e},wH=lu.prototype,EH=function(t,e,r){var n=r&&r.that,i=!!(r&&r.AS_ENTRIES),o=!!(r&&r.IS_RECORD),a=!!(r&&r.IS_ITERATOR),s=!!(r&&r.INTERRUPTED),d=sit(e,n),p,f,Q,m,_,v,b,M=function(V){return p&&xH(p,"normal",V),new lu(!0,V)},E=function(V){return i?(cit(V),s?d(V[0],V[1],M):d(V[0],V[1])):s?d(V,M):d(V)};if(o)p=t.iterator;else if(a)p=t;else{if(f=Tit(t),!f)throw new fit(uit(t)+" is not iterable");if(hit(f)){for(Q=0,m=dit(t);m>Q;Q++)if(_=E(t[Q]),_&&LH(wH,_))return _;return new lu(!1)}p=pit(t,f)}for(v=o?t.next:p.next;!(b=lit(v,p)).done;){try{_=E(b.value)}catch(V){xH(p,"throw",V)}if(typeof _=="object"&&_&&LH(wH,_))return _}return new lu(!1)},Qit=PQ,mit=TypeError,MH=function(t,e){if(Qit(e,t))return t;throw new mit("Incorrect invocation")},git=c2,HH=git("iterator"),SH=!1;try{var yit=0,CH={next:function(){return{done:!!yit++}},return:function(){SH=!0}};CH[HH]=function(){return this},Array.from(CH,function(){throw 2})}catch{}var _it=function(t,e){try{if(!e&&!SH)return!1}catch{return!1}var r=!1;try{var n={};n[HH]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch{}return r},vit=Oi,bit=u2,AH=KM,Lit=function(t,e,r){var n,i;return AH&&vit(n=e.constructor)&&n!==r&&bit(i=n.prototype)&&i!==r.prototype&&AH(t,i),t},xit=ba,wit=Po,Eit=yi,VH=zM,Mit=_5,Hit=mH,Sit=EH,Cit=MH,Ait=Oi,Vit=Vl,xm=u2,wm=Ki,Oit=_it,kit=nu,Pit=Lit,Iit=function(t,e,r){var n=t.indexOf("Map")!==-1,i=t.indexOf("Weak")!==-1,o=n?"set":"add",a=wit[t],s=a&&a.prototype,d=a,p={},f=function(E){var V=Eit(s[E]);Mit(s,E,E==="add"?function(O){return V(this,O===0?0:O),this}:E==="delete"?function(O){return i&&!xm(O)?!1:V(this,O===0?0:O)}:E==="get"?function(O){return i&&!xm(O)?void 0:V(this,O===0?0:O)}:E==="has"?function(O){return i&&!xm(O)?!1:V(this,O===0?0:O)}:function(O,R){return V(this,O===0?0:O,R),this})},Q=VH(t,!Ait(a)||!(i||s.forEach&&!wm(function(){new a().entries().next()})));if(Q)d=r.getConstructor(e,t,n,o),Hit.enable();else if(VH(t,!0)){var m=new d,_=m[o](i?{}:-0,1)!==m,v=wm(function(){m.has(1)}),b=Oit(function(E){new a(E)}),M=!i&&wm(function(){for(var E=new a,V=5;V--;)E[o](V,V);return!E.has(-0)});b||(d=e(function(E,V){Cit(E,s);var O=Pit(new a,E,d);return Vit(V)||Sit(V,O[o],{that:O,AS_ENTRIES:n}),O}),d.prototype=s,s.constructor=d),(v||M)&&(f("delete"),f("has"),n&&f("get")),(M||_)&&f(o),i&&s.clear&&delete s.clear}return p[t]=d,xit({global:!0,constructor:!0,forced:d!==a},p),kit(d,t),i||r.setStrong(d,t,n),d},OH=DM,Rit=_a,kH=function(t,e,r){return r.get&&OH(r.get,e,{getter:!0}),r.set&&OH(r.set,e,{setter:!0}),Rit.f(t,e,r)},Nit=_5,Bit=function(t,e,r){for(var n in e)Nit(t,n,e[n],r);return t},Dit=kl,Fit=kH,jit=c2,zit=R2,PH=jit("species"),Uit=function(t){var e=Dit(t);zit&&e&&!e[PH]&&Fit(e,PH,{configurable:!0,get:function(){return this}})},IH=KQ,Git=kH,RH=Bit,Zit=yH,$it=MH,qit=Vl,Wit=EH,Xit=fm,NH=Qm,Kit=Uit,Fl=R2,BH=mH.fastKey,DH=Y9,FH=DH.set,Em=DH.getterFor,Yit={getConstructor:function(t,e,r,n){var i=t(function(p,f){$it(p,o),FH(p,{type:e,index:IH(null),first:void 0,last:void 0,size:0}),Fl||(p.size=0),qit(f)||Wit(f,p[n],{that:p,AS_ENTRIES:r})}),o=i.prototype,a=Em(e),s=function(p,f,Q){var m=a(p),_=d(p,f),v,b;return _?_.value=Q:(m.last=_={index:b=BH(f,!0),key:f,value:Q,previous:v=m.last,next:void 0,removed:!1},m.first||(m.first=_),v&&(v.next=_),Fl?m.size++:p.size++,b!=="F"&&(m.index[b]=_)),p},d=function(p,f){var Q=a(p),m=BH(f),_;if(m!=="F")return Q.index[m];for(_=Q.first;_;_=_.next)if(_.key===f)return _};return RH(o,{clear:function(){for(var p=this,f=a(p),Q=f.first;Q;)Q.removed=!0,Q.previous&&(Q.previous=Q.previous.next=void 0),Q=Q.next;f.first=f.last=void 0,f.index=IH(null),Fl?f.size=0:p.size=0},delete:function(p){var f=this,Q=a(f),m=d(f,p);if(m){var _=m.next,v=m.previous;delete Q.index[m.index],m.removed=!0,v&&(v.next=_),_&&(_.previous=v),Q.first===m&&(Q.first=_),Q.last===m&&(Q.last=v),Fl?Q.size--:f.size--}return!!m},forEach:function(p){for(var f=a(this),Q=Zit(p,arguments.length>1?arguments[1]:void 0),m;m=m?m.next:f.first;)for(Q(m.value,m.key,this);m&&m.removed;)m=m.previous},has:function(p){return!!d(this,p)}}),RH(o,r?{get:function(p){var f=d(this,p);return f&&f.value},set:function(p,f){return s(this,p===0?0:p,f)}}:{add:function(p){return s(this,p=p===0?0:p,p)}}),Fl&&Git(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(t,e,r){var n=e+" Iterator",i=Em(e),o=Em(n);Xit(t,e,function(a,s){FH(this,{type:n,target:a,state:i(a),kind:s,last:void 0})},function(){for(var a=o(this),s=a.kind,d=a.last;d&&d.removed;)d=d.previous;return!a.target||!(a.last=d=d?d.next:a.state.first)?(a.target=void 0,NH(void 0,!0)):NH(s==="keys"?d.key:s==="values"?d.value:[d.key,d.value],!1)},r?"entries":"values",!r,!0),Kit(e)}},Jit=Iit,tot=Yit;Jit("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},tot);var Mm=yi,cu=Set.prototype,La={Set,add:Mm(cu.add),has:Mm(cu.has),remove:Mm(cu.delete),proto:cu},eot=La.has,I4=function(t){return eot(t),t},rot=Qs,R4=function(t,e,r){for(var n=r?t:t.iterator,i=t.next,o,a;!(o=rot(i,n)).done;)if(a=e(o.value),a!==void 0)return a},jH=yi,not=R4,zH=La,iot=zH.Set,UH=zH.proto,oot=jH(UH.forEach),GH=jH(UH.keys),aot=GH(new iot).next,jl=function(t,e,r){return r?not({iterator:GH(t),next:aot},e):oot(t,e)},ZH=La,sot=jl,lot=ZH.Set,cot=ZH.add,Hm=function(t){var e=new lot;return sot(t,function(r){cot(e,r)}),e},uot=XM,hot=La,zl=uot(hot.proto,"size","get")||function(t){return t.size},dot=function(t){return{iterator:t,next:t.next,done:!1}},$H=Pl,qH=v3,WH=Qs,pot=G9,Tot=dot,XH="Invalid size",fot=RangeError,Qot=TypeError,mot=Math.max,KH=function(t,e){this.set=t,this.size=mot(e,0),this.has=$H(t.has),this.keys=$H(t.keys)};KH.prototype={getIterator:function(){return Tot(qH(WH(this.keys,this.set)))},includes:function(t){return WH(this.has,this.set,t)}};var N4=function(t){qH(t);var e=+t.size;if(e!==e)throw new Qot(XH);var r=pot(e);if(r<0)throw new fot(XH);return new KH(t,r)},got=I4,YH=La,yot=Hm,_ot=zl,vot=N4,bot=jl,Lot=R4,xot=YH.has,JH=YH.remove,wot=function(t){var e=got(this),r=vot(t),n=yot(e);return _ot(e)<=r.size?bot(e,function(i){r.includes(i)&&JH(n,i)}):Lot(r.getIterator(),function(i){xot(e,i)&&JH(n,i)}),n},Eot=kl,tS=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},B4=function(t){var e=Eot("Set");try{new e()[t](tS(0));try{return new e()[t](tS(-1)),!1}catch{return!0}}catch{return!1}},Mot=ba,Hot=wot,Sot=B4;Mot({target:"Set",proto:!0,real:!0,forced:!Sot("difference")},{difference:Hot});var Cot=I4,Sm=La,Aot=zl,Vot=N4,Oot=jl,kot=R4,Pot=Sm.Set,eS=Sm.add,Iot=Sm.has,Rot=function(t){var e=Cot(this),r=Vot(t),n=new Pot;return Aot(e)>r.size?kot(r.getIterator(),function(i){Iot(e,i)&&eS(n,i)}):Oot(e,function(i){r.includes(i)&&eS(n,i)}),n},Not=ba,Bot=Ki,Dot=Rot,Fot=B4,jot=!Fot("intersection")||Bot(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});Not({target:"Set",proto:!0,real:!0,forced:jot},{intersection:Dot});var zot=I4,Uot=La.has,Got=zl,Zot=N4,$ot=jl,qot=R4,Wot=Lm,Xot=function(t){var e=zot(this),r=Zot(t);if(Got(e)<=r.size)return $ot(e,function(i){if(r.includes(i))return!1},!0)!==!1;var n=r.getIterator();return qot(n,function(i){if(Uot(e,i))return Wot(n,"normal",!1)})!==!1},Kot=ba,Yot=Xot,Jot=B4;Kot({target:"Set",proto:!0,real:!0,forced:!Jot("isDisjointFrom")},{isDisjointFrom:Yot});var t2t=I4,e2t=zl,r2t=jl,n2t=N4,i2t=function(t){var e=t2t(this),r=n2t(t);return e2t(e)>r.size?!1:r2t(e,function(n){if(!r.includes(n))return!1},!0)!==!1},o2t=ba,a2t=i2t,s2t=B4;o2t({target:"Set",proto:!0,real:!0,forced:!s2t("isSubsetOf")},{isSubsetOf:a2t});var l2t=I4,c2t=La.has,u2t=zl,h2t=N4,d2t=R4,p2t=Lm,T2t=function(t){var e=l2t(this),r=h2t(t);if(u2t(e)<r.size)return!1;var n=r.getIterator();return d2t(n,function(i){if(!c2t(e,i))return p2t(n,"normal",!1)})!==!1},f2t=ba,Q2t=T2t,m2t=B4;f2t({target:"Set",proto:!0,real:!0,forced:!m2t("isSupersetOf")},{isSupersetOf:Q2t});var g2t=I4,Cm=La,y2t=Hm,_2t=N4,v2t=R4,b2t=Cm.add,L2t=Cm.has,x2t=Cm.remove,w2t=function(t){var e=g2t(this),r=_2t(t).getIterator(),n=y2t(e);return v2t(r,function(i){L2t(e,i)?x2t(n,i):b2t(n,i)}),n},E2t=ba,M2t=w2t,H2t=B4;E2t({target:"Set",proto:!0,real:!0,forced:!H2t("symmetricDifference")},{symmetricDifference:M2t});var S2t=I4,C2t=La.add,A2t=Hm,V2t=N4,O2t=R4,k2t=function(t){var e=S2t(this),r=V2t(t).getIterator(),n=A2t(e);return O2t(r,function(i){C2t(n,i)}),n},P2t=ba,I2t=k2t,R2t=B4;P2t({target:"Set",proto:!0,real:!0,forced:!R2t("union")},{union:I2t});var N2t=ym,B2t=String,rS=function(t){if(N2t(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return B2t(t)},Am=yi,D2t=G9,F2t=rS,j2t=F9,z2t=Am("".charAt),nS=Am("".charCodeAt),U2t=Am("".slice),iS=function(t){return function(e,r){var n=F2t(j2t(e)),i=D2t(r),o=n.length,a,s;return i<0||i>=o?t?"":void 0:(a=nS(n,i),a<55296||a>56319||i+1===o||(s=nS(n,i+1))<56320||s>57343?t?z2t(n,i):a:t?U2t(n,i,i+2):(a-55296<<10)+(s-56320)+65536)}},G2t={codeAt:iS(!1),charAt:iS(!0)},Z2t=G2t.charAt,$2t=rS,oS=Y9,q2t=fm,aS=Qm,sS="String Iterator",W2t=oS.set,X2t=oS.getterFor(sS);q2t(String,"String",function(t){W2t(this,{type:sS,string:$2t(t),index:0})},function(){var t=X2t(this),e=t.string,r=t.index,n;return r>=e.length?aS(void 0,!0):(n=Z2t(e,r),t.index+=n.length,aS(n,!1))});var K2t=Po,Y2t=K2t,J2t=Y2t,tat=J2t.Set,eat={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},rat=OQ,Vm=rat("span").classList,lS=Vm&&Vm.constructor&&Vm.constructor.prototype,nat=lS===Object.prototype?void 0:lS,cS=Po,uS=eat,iat=nat,Ul=Gnt,hS=W9,oat=nu,aat=c2,Om=aat("iterator"),km=Ul.values,dS=function(t,e){if(t){if(t[Om]!==km)try{hS(t,Om,km)}catch{t[Om]=km}if(oat(t,e,!0),uS[e]){for(var r in Ul)if(t[r]!==Ul[r])try{hS(t,r,Ul[r])}catch{t[r]=Ul[r]}}}};for(var Pm in uS)dS(cS[Pm]&&cS[Pm].prototype,Pm);dS(iat,"DOMTokenList");var sat=tat,lat=sat,cat=lat,uat=cat;const Gl=Cl(uat);var pS={exports:{}};/**
|
|
26
34
|
* MapLibre GL JS
|
|
27
35
|
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.1.2/LICENSE.txt
|
|
28
36
|
*/(function(t,e){(function(r,n){t.exports=n()})(P,function(){var r={},n={};function i(a,s,d){if(n[a]=d,a==="index"){var p="var sharedModule = {}; ("+n.shared+")(sharedModule); ("+n.worker+")(sharedModule);",f={};return n.shared(f),n.index(r,f),typeof window<"u"&&r.setWorkerUrl(window.URL.createObjectURL(new Blob([p],{type:"text/javascript"}))),r}}i("shared",["exports"],function(a){function s(u,l,T,y){return new(T||(T=Promise))(function(w,C){function A(Z){try{D(y.next(Z))}catch(X){C(X)}}function I(Z){try{D(y.throw(Z))}catch(X){C(X)}}function D(Z){var X;Z.done?w(Z.value):(X=Z.value,X instanceof T?X:new T(function(K){K(X)})).then(A,I)}D((y=y.apply(u,l||[])).next())})}function d(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}typeof SuppressedError=="function"&&SuppressedError;var p=f;function f(u,l){this.x=u,this.y=l}f.prototype={clone:function(){return new f(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,T=u.y-this.y;return l*l+T*T},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),T=Math.sin(u),y=T*this.x+l*this.y;return this.x=l*this.x-T*this.y,this.y=y,this},_rotateAround:function(u,l){var T=Math.cos(u),y=Math.sin(u),w=l.y+y*(this.x-l.x)+T*(this.y-l.y);return this.x=l.x+T*(this.x-l.x)-y*(this.y-l.y),this.y=w,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},f.convert=function(u){return u instanceof f?u:Array.isArray(u)?new f(u[0],u[1]):u};var Q=d(p),m=_;function _(u,l,T,y){this.cx=3*u,this.bx=3*(T-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=T,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 T=u,y=0;y<8;y++){var w=this.sampleCurveX(T)-u;if(Math.abs(w)<l)return T;var C=this.sampleCurveDerivativeX(T);if(Math.abs(C)<1e-6)break;T-=w/C}var A=0,I=1;for(T=u,y=0;y<20&&(w=this.sampleCurveX(T),!(Math.abs(w-u)<l));y++)u>w?A=T:I=T,T=.5*(I-A)+A;return T},solve:function(u,l){return this.sampleCurveY(this.solveCurveX(u,l))}};var v=d(m);let b,M;function E(){return b==null&&(b=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),b}function V(){if(M==null&&(M=!1,E())){const u=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(u){for(let T=0;T<5*5;T++){const y=4*T;u.fillStyle=`rgb(${y},${y+1},${y+2})`,u.fillRect(T%5,Math.floor(T/5),1,1)}const l=u.getImageData(0,0,5,5).data;for(let T=0;T<5*5*4;T++)if(T%4!=3&&l[T]!==T){M=!0;break}}}return M||!1}function O(u,l,T,y){const w=new v(u,l,T,y);return function(C){return w.solve(C)}}const R=O(.25,.1,.25,1);function j(u,l,T){return Math.min(T,Math.max(l,u))}function G(u,l,T){const y=T-l,w=((u-l)%y+y)%y+l;return w===l?T:w}function z(u,...l){for(const T of l)for(const y in T)u[y]=T[y];return u}let J=1;function tt(u,l,T){const y={};for(const w in u)y[w]=l.call(T||this,u[w],w,u);return y}function ot(u,l,T){const y={};for(const w in u)l.call(T||this,u[w],w,u)&&(y[w]=u[w]);return y}function et(u){return Array.isArray(u)?u.map(et):typeof u=="object"&&u?tt(u,et):u}const Tt={};function At(u){Tt[u]||(typeof console<"u"&&console.warn(u),Tt[u]=!0)}function Ut(u,l,T){return(T.y-u.y)*(l.x-u.x)>(l.y-u.y)*(T.x-u.x)}function ee(u){let l=0;for(let T,y,w=0,C=u.length,A=C-1;w<C;A=w++)T=u[w],y=u[A],l+=(y.x-T.x)*(T.y+y.y);return l}function ue(u){return typeof WorkerGlobalScope<"u"&&u!==void 0&&u instanceof WorkerGlobalScope}let Ft=null;function pe(u){return typeof ImageBitmap<"u"&&u instanceof ImageBitmap}const lr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Xt(u,l,T,y,w){return s(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const C=new VideoFrame(u,{timestamp:0});try{const A=C==null?void 0:C.format;if(!A||!A.startsWith("BGR")&&!A.startsWith("RGB"))throw new Error(`Unrecognized format ${A}`);const I=A.startsWith("BGR"),D=new Uint8ClampedArray(y*w*4);if(yield C.copyTo(D,function(Z,X,K,at,lt){const ut=4*Math.max(-X,0),Qt=(Math.max(0,K)-K)*at*4+ut,bt=4*at,wt=Math.max(0,X),Nt=Math.max(0,K);return{rect:{x:wt,y:Nt,width:Math.min(Z.width,X+at)-wt,height:Math.min(Z.height,K+lt)-Nt},layout:[{offset:Qt,stride:bt}]}}(u,l,T,y,w)),I)for(let Z=0;Z<D.length;Z+=4){const X=D[Z];D[Z]=D[Z+2],D[Z+2]=X}return D}finally{C.close()}})}let le,ge;const Le="AbortError";function Fe(){return new Error(Le)}const Ge={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 Ge.REGISTERED_PROTOCOLS[u.substring(0,u.indexOf("://"))]}const Dt="global-dispatcher";class qt extends Error{constructor(l,T,y,w){super(`AJAXError: ${T} (${l}): ${y}`),this.status=l,this.statusText=T,this.url=y,this.body=w}}const he=()=>ue(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,jt=function(u,l){if(/:\/\//.test(u.url)&&!/^https?:|^file:/.test(u.url)){const y=je(u.url);if(y)return y(u,l);if(ue(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"getResource",data:u,targetMapId:Dt},l)}if(!(/^file:/.test(T=u.url)||/^file:/.test(he())&&!/^\w+:/.test(T))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(y,w){return s(this,void 0,void 0,function*(){const C=new Request(y.url,{method:y.method||"GET",body:y.body,credentials:y.credentials,headers:y.headers,cache:y.cache,referrer:he(),signal:w.signal});y.type==="json"&&C.headers.set("Accept","application/json");const A=yield fetch(C);if(!A.ok){const Z=yield A.blob();throw new qt(A.status,A.statusText,y.url,Z)}let I;I=y.type==="arrayBuffer"||y.type==="image"?A.arrayBuffer():y.type==="json"?A.json():A.text();const D=yield I;if(w.signal.aborted)throw Fe();return{data:D,cacheControl:A.headers.get("Cache-Control"),expires:A.headers.get("Expires")}})}(u,l);if(ue(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"getResource",data:u,mustQueue:!0,targetMapId:Dt},l)}var T;return function(y,w){return new Promise((C,A)=>{const I=new XMLHttpRequest;I.open(y.method||"GET",y.url,!0),y.type!=="arrayBuffer"&&y.type!=="image"||(I.responseType="arraybuffer");for(const D in y.headers)I.setRequestHeader(D,y.headers[D]);y.type==="json"&&(I.responseType="text",I.setRequestHeader("Accept","application/json")),I.withCredentials=y.credentials==="include",I.onerror=()=>{A(new Error(I.statusText))},I.onload=()=>{if(!w.signal.aborted)if((I.status>=200&&I.status<300||I.status===0)&&I.response!==null){let D=I.response;if(y.type==="json")try{D=JSON.parse(I.response)}catch(Z){return void A(Z)}C({data:D,cacheControl:I.getResponseHeader("Cache-Control"),expires:I.getResponseHeader("Expires")})}else{const D=new Blob([I.response],{type:I.getResponseHeader("Content-Type")});A(new qt(I.status,I.statusText,y.url,D))}},w.signal.addEventListener("abort",()=>{I.abort(),A(Fe())}),I.send(y.body)})}(u,l)};function fe(u){if(!u||u.indexOf("://")<=0||u.indexOf("data:image/")===0||u.indexOf("blob:")===0)return!0;const l=new URL(u),T=window.location;return l.protocol===T.protocol&&l.host===T.host}function Ne(u,l,T){T[u]&&T[u].indexOf(l)!==-1||(T[u]=T[u]||[],T[u].push(l))}function Ae(u,l,T){if(T&&T[u]){const y=T[u].indexOf(l);y!==-1&&T[u].splice(y,1)}}class Ve{constructor(l,T={}){z(this,T),this.type=l}}class ke extends Ve{constructor(l,T={}){super("error",z({error:l},T))}}class ze{on(l,T){return this._listeners=this._listeners||{},Ne(l,T,this._listeners),this}off(l,T){return Ae(l,T,this._listeners),Ae(l,T,this._oneTimeListeners),this}once(l,T){return T?(this._oneTimeListeners=this._oneTimeListeners||{},Ne(l,T,this._oneTimeListeners),this):new Promise(y=>this.once(l,y))}fire(l,T){typeof l=="string"&&(l=new Ve(l,T||{}));const y=l.type;if(this.listens(y)){l.target=this;const w=this._listeners&&this._listeners[y]?this._listeners[y].slice():[];for(const I of w)I.call(this,l);const C=this._oneTimeListeners&&this._oneTimeListeners[y]?this._oneTimeListeners[y].slice():[];for(const I of C)Ae(y,I,this._oneTimeListeners),I.call(this,l);const A=this._eventedParent;A&&(z(l,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),A.fire(l))}else l instanceof ke&&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,T){return this._eventedParent=l,this._eventedParentData=T,this}}var zt={$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 Pr=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function mn(u,l){const T={};for(const y in u)y!=="ref"&&(T[y]=u[y]);return Pr.forEach(y=>{y in l&&(T[y]=l[y])}),T}function We(u,l){if(Array.isArray(u)){if(!Array.isArray(l)||u.length!==l.length)return!1;for(let T=0;T<u.length;T++)if(!We(u[T],l[T]))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 T in u)if(!We(u[T],l[T]))return!1;return!0}return u===l}function br(u,l){u.push(l)}function Nn(u,l,T){br(T,{command:"addSource",args:[u,l[u]]})}function S1(u,l,T){br(l,{command:"removeSource",args:[u]}),T[u]=!0}function wn(u,l,T,y){S1(u,T,y),Nn(u,l,T)}function ye(u,l,T){let y;for(y in u[T])if(Object.prototype.hasOwnProperty.call(u[T],y)&&y!=="data"&&!We(u[T][y],l[T][y]))return!1;for(y in l[T])if(Object.prototype.hasOwnProperty.call(l[T],y)&&y!=="data"&&!We(u[T][y],l[T][y]))return!1;return!0}function cr(u,l,T,y,w,C){u=u||{},l=l||{};for(const A in u)Object.prototype.hasOwnProperty.call(u,A)&&(We(u[A],l[A])||T.push({command:C,args:[y,A,l[A],w]}));for(const A in l)Object.prototype.hasOwnProperty.call(l,A)&&!Object.prototype.hasOwnProperty.call(u,A)&&(We(u[A],l[A])||T.push({command:C,args:[y,A,l[A],w]}))}function Wr(u){return u.id}function $n(u,l){return u[l.id]=l,u}class Qe{constructor(l,T,y,w){this.message=(l?`${l}: `:"")+y,w&&(this.identifier=w),T!=null&&T.__line__&&(this.line=T.__line__)}}function Bn(u,...l){for(const T of l)for(const y in T)u[y]=T[y];return u}class Tn extends Error{constructor(l,T){super(T),this.message=T,this.key=l}}class ci{constructor(l,T=[]){this.parent=l,this.bindings={};for(const[y,w]of T)this.bindings[y]=w}concat(l){return new ci(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 ui={kind:"null"},be={kind:"number"},yr={kind:"string"},ur={kind:"boolean"},r1={kind:"color"},n1={kind:"object"},sr={kind:"value"},Li={kind:"collator"},C1={kind:"formatted"},mt={kind:"padding"},nt={kind:"resolvedImage"},st={kind:"variableAnchorOffsetCollection"};function ht(u,l){return{kind:"array",itemType:u,N:l}}function gt(u){if(u.kind==="array"){const l=gt(u.itemType);return typeof u.N=="number"?`array<${l}, ${u.N}>`:u.itemType.kind==="value"?"array":`array<${l}>`}return u.kind}const St=[ui,be,yr,ur,r1,C1,n1,ht(sr),mt,nt,st];function Ct(u,l){if(l.kind==="error")return null;if(u.kind==="array"){if(l.kind==="array"&&(l.N===0&&l.itemType.kind==="value"||!Ct(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 T of St)if(!Ct(T,l))return null}}return`Expected ${gt(u)} but found ${gt(l)} instead.`}function Ot(u,l){return l.some(T=>T.kind===u.kind)}function Et(u,l){return l.some(T=>T==="null"?u===null:T==="array"?Array.isArray(u):T==="object"?u&&!Array.isArray(u)&&typeof u=="object":T===typeof u)}function Rt(u,l){return u.kind==="array"&&l.kind==="array"?u.itemType.kind===l.itemType.kind&&typeof u.N=="number":u.kind===l.kind}const oe=.96422,Kt=.82521,re=4/29,Vt=6/29,Jt=3*Vt*Vt,we=Vt*Vt*Vt,rr=Math.PI/180,tr=180/Math.PI;function Dr(u){return(u%=360)<0&&(u+=360),u}function Gr([u,l,T,y]){let w,C;const A=Ze((.2225045*(u=en(u))+.7168786*(l=en(l))+.0606169*(T=en(T)))/1);u===l&&l===T?w=C=A:(w=Ze((.4360747*u+.3850649*l+.1430804*T)/oe),C=Ze((.0139322*u+.0971045*l+.7141733*T)/Kt));const I=116*A-16;return[I<0?0:I,500*(w-A),200*(A-C),y]}function en(u){return u<=.04045?u/12.92:Math.pow((u+.055)/1.055,2.4)}function Ze(u){return u>we?Math.pow(u,1/3):u/Jt+re}function Xr([u,l,T,y]){let w=(u+16)/116,C=isNaN(l)?w:w+l/500,A=isNaN(T)?w:w-T/200;return w=1*l1(w),C=oe*l1(C),A=Kt*l1(A),[En(3.1338561*C-1.6168667*w-.4906146*A),En(-.9787684*C+1.9161415*w+.033454*A),En(.0719453*C-.2289914*w+1.4052427*A),y]}function En(u){return(u=u<=.00304?12.92*u:1.055*Math.pow(u,1/2.4)-.055)<0?0:u>1?1:u}function l1(u){return u>Vt?u*u*u:Jt*(u-re)}function qn(u){return parseInt(u.padEnd(2,u),16)/255}function g1(u,l){return A1(l?u/100:u,0,1)}function A1(u,l,T){return Math.min(Math.max(l,u),T)}function X3(u){return!u.some(Number.isNaN)}const Go={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 Er{constructor(l,T,y,w=1,C=!0){this.r=l,this.g=T,this.b=y,this.a=w,C||(this.r*=w,this.g*=w,this.b*=w,w||this.overwriteGetter("rgb",[l,T,y,w]))}static parse(l){if(l instanceof Er)return l;if(typeof l!="string")return;const T=function(y){if((y=y.toLowerCase().trim())==="transparent")return[0,0,0,0];const w=Go[y];if(w){const[A,I,D]=w;return[A/255,I/255,D/255,1]}if(y.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(y)){const A=y.length<6?1:2;let I=1;return[qn(y.slice(I,I+=A)),qn(y.slice(I,I+=A)),qn(y.slice(I,I+=A)),qn(y.slice(I,I+A)||"ff")]}if(y.startsWith("rgb")){const A=y.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(A){const[I,D,Z,X,K,at,lt,ut,Qt,bt,wt,Nt]=A,Mt=[X||" ",lt||" ",bt].join("");if(Mt===" "||Mt===" /"||Mt===",,"||Mt===",,,"){const kt=[Z,at,Qt].join(""),ie=kt==="%%%"?100:kt===""?255:0;if(ie){const se=[A1(+D/ie,0,1),A1(+K/ie,0,1),A1(+ut/ie,0,1),wt?g1(+wt,Nt):1];if(X3(se))return se}}return}}const C=y.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(C){const[A,I,D,Z,X,K,at,lt,ut]=C,Qt=[D||" ",X||" ",at].join("");if(Qt===" "||Qt===" /"||Qt===",,"||Qt===",,,"){const bt=[+I,A1(+Z,0,100),A1(+K,0,100),lt?g1(+lt,ut):1];if(X3(bt))return function([wt,Nt,Mt,kt]){function ie(se){const Be=(se+wt/30)%12,Xe=Nt*Math.min(Mt,1-Mt);return Mt-Xe*Math.max(-1,Math.min(Be-3,9-Be,1))}return wt=Dr(wt),Nt/=100,Mt/=100,[ie(0),ie(8),ie(4),kt]}(bt)}}}(l);return T?new Er(...T,!1):void 0}get rgb(){const{r:l,g:T,b:y,a:w}=this,C=w||1/0;return this.overwriteGetter("rgb",[l/C,T/C,y/C,w])}get hcl(){return this.overwriteGetter("hcl",function(l){const[T,y,w,C]=Gr(l),A=Math.sqrt(y*y+w*w);return[Math.round(1e4*A)?Dr(Math.atan2(w,y)*tr):NaN,A,T,C]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Gr(this.rgb))}overwriteGetter(l,T){return Object.defineProperty(this,l,{value:T}),T}toString(){const[l,T,y,w]=this.rgb;return`rgba(${[l,T,y].map(C=>Math.round(255*C)).join(",")},${w})`}}Er.black=new Er(0,0,0,1),Er.white=new Er(1,1,1,1),Er.transparent=new Er(0,0,0,0),Er.red=new Er(1,0,0,1);class Ni{constructor(l,T,y){this.sensitivity=l?T?"variant":"case":T?"accent":"base",this.locale=y,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(l,T){return this.collator.compare(l,T)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class sn{constructor(l,T,y,w,C){this.text=l,this.image=T,this.scale=y,this.fontStack=w,this.textColor=C}}class Mn{constructor(l){this.sections=l}static fromString(l){return new Mn([new sn(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 c1{constructor(l){this.values=l.slice()}static parse(l){if(l instanceof c1)return l;if(typeof l=="number")return new c1([l,l,l,l]);if(Array.isArray(l)&&!(l.length<1||l.length>4)){for(const T of l)if(typeof T!="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 c1(l)}}toString(){return JSON.stringify(this.values)}}const u1=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class $r{constructor(l){this.values=l.slice()}static parse(l){if(l instanceof $r)return l;if(Array.isArray(l)&&!(l.length<1)&&l.length%2==0){for(let T=0;T<l.length;T+=2){const y=l[T],w=l[T+1];if(typeof y!="string"||!u1.has(y)||!Array.isArray(w)||w.length!==2||typeof w[0]!="number"||typeof w[1]!="number")return}return new $r(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 io(u,l,T,y){return typeof u=="number"&&u>=0&&u<=255&&typeof l=="number"&&l>=0&&l<=255&&typeof T=="number"&&T>=0&&T<=255?y===void 0||typeof y=="number"&&y>=0&&y<=1?null:`Invalid rgba value [${[u,l,T,y].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof y=="number"?[u,l,T,y]:[u,l,T]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function y1(u){if(u===null||typeof u=="string"||typeof u=="boolean"||typeof u=="number"||u instanceof Er||u instanceof Ni||u instanceof Mn||u instanceof c1||u instanceof $r||u instanceof w1)return!0;if(Array.isArray(u)){for(const l of u)if(!y1(l))return!1;return!0}if(typeof u=="object"){for(const l in u)if(!y1(u[l]))return!1;return!0}return!1}function Jr(u){if(u===null)return ui;if(typeof u=="string")return yr;if(typeof u=="boolean")return ur;if(typeof u=="number")return be;if(u instanceof Er)return r1;if(u instanceof Ni)return Li;if(u instanceof Mn)return C1;if(u instanceof c1)return mt;if(u instanceof $r)return st;if(u instanceof w1)return nt;if(Array.isArray(u)){const l=u.length;let T;for(const y of u){const w=Jr(y);if(T){if(T===w)continue;T=sr;break}T=w}return ht(T||sr,l)}return n1}function bo(u){const l=typeof u;return u===null?"":l==="string"||l==="number"||l==="boolean"?String(u):u instanceof Er||u instanceof Mn||u instanceof c1||u instanceof $r||u instanceof w1?u.toString():JSON.stringify(u)}class oo{constructor(l,T){this.type=l,this.value=T}static parse(l,T){if(l.length!==2)return T.error(`'literal' expression requires exactly one argument, but found ${l.length-1} instead.`);if(!y1(l[1]))return T.error("invalid value");const y=l[1];let w=Jr(y);const C=T.expectedType;return w.kind!=="array"||w.N!==0||!C||C.kind!=="array"||typeof C.N=="number"&&C.N!==0||(w=C),new oo(w,y)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class gn{constructor(l){this.name="ExpressionEvaluationError",this.message=l}toJSON(){return this.message}}const Bi={string:yr,number:be,boolean:ur,object:n1};class V1{constructor(l,T){this.type=l,this.args=T}static parse(l,T){if(l.length<2)return T.error("Expected at least one argument.");let y,w=1;const C=l[0];if(C==="array"){let I,D;if(l.length>2){const Z=l[1];if(typeof Z!="string"||!(Z in Bi)||Z==="object")return T.error('The item type argument of "array" must be one of string, number, boolean',1);I=Bi[Z],w++}else I=sr;if(l.length>3){if(l[2]!==null&&(typeof l[2]!="number"||l[2]<0||l[2]!==Math.floor(l[2])))return T.error('The length argument to "array" must be a positive integer literal',2);D=l[2],w++}y=ht(I,D)}else{if(!Bi[C])throw new Error(`Types doesn't contain name = ${C}`);y=Bi[C]}const A=[];for(;w<l.length;w++){const I=T.parse(l[w],w,sr);if(!I)return null;A.push(I)}return new V1(y,A)}evaluate(l){for(let T=0;T<this.args.length;T++){const y=this.args[T].evaluate(l);if(!Ct(this.type,Jr(y)))return y;if(T===this.args.length-1)throw new gn(`Expected value to be of type ${gt(this.type)}, but found ${gt(Jr(y))} instead.`)}throw new Error}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}const Lo={"to-boolean":ur,"to-color":r1,"to-number":be,"to-string":yr};class h1{constructor(l,T){this.type=l,this.args=T}static parse(l,T){if(l.length<2)return T.error("Expected at least one argument.");const y=l[0];if(!Lo[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 T.error("Expected one argument.");const w=Lo[y],C=[];for(let A=1;A<l.length;A++){const I=T.parse(l[A],A,sr);if(!I)return null;C.push(I)}return new h1(w,C)}evaluate(l){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(l);case"color":{let T,y;for(const w of this.args){if(T=w.evaluate(l),y=null,T instanceof Er)return T;if(typeof T=="string"){const C=l.parseColor(T);if(C)return C}else if(Array.isArray(T)&&(y=T.length<3||T.length>4?`Invalid rbga value ${JSON.stringify(T)}: expected an array containing either three or four numeric values.`:io(T[0],T[1],T[2],T[3]),!y))return new Er(T[0]/255,T[1]/255,T[2]/255,T[3])}throw new gn(y||`Could not parse color from value '${typeof T=="string"?T:JSON.stringify(T)}'`)}case"padding":{let T;for(const y of this.args){T=y.evaluate(l);const w=c1.parse(T);if(w)return w}throw new gn(`Could not parse padding from value '${typeof T=="string"?T:JSON.stringify(T)}'`)}case"variableAnchorOffsetCollection":{let T;for(const y of this.args){T=y.evaluate(l);const w=$r.parse(T);if(w)return w}throw new gn(`Could not parse variableAnchorOffsetCollection from value '${typeof T=="string"?T:JSON.stringify(T)}'`)}case"number":{let T=null;for(const y of this.args){if(T=y.evaluate(l),T===null)return 0;const w=Number(T);if(!isNaN(w))return w}throw new gn(`Could not convert ${JSON.stringify(T)} to number.`)}case"formatted":return Mn.fromString(bo(this.args[0].evaluate(l)));case"resolvedImage":return w1.fromString(bo(this.args[0].evaluate(l)));default:return bo(this.args[0].evaluate(l))}}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}const zs=["Unknown","Point","LineString","Polygon"];class Zo{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"?zs[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 T=this._parseColorCache[l];return T||(T=this._parseColorCache[l]=Er.parse(l)),T}}class Zr{constructor(l,T,y=[],w,C=new ci,A=[]){this.registry=l,this.path=y,this.key=y.map(I=>`[${I}]`).join(""),this.scope=C,this.errors=A,this.expectedType=w,this._isConstant=T}parse(l,T,y,w,C={}){return T?this.concat(T,y,w)._parse(l,C):this._parse(l,C)}_parse(l,T){function y(w,C,A){return A==="assert"?new V1(C,[w]):A==="coerce"?new h1(C,[w]):w}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 w=l[0];if(typeof w!="string")return this.error(`Expression name must be a string, but found ${typeof w} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const C=this.registry[w];if(C){let A=C.parse(l,this);if(!A)return null;if(this.expectedType){const I=this.expectedType,D=A.type;if(I.kind!=="string"&&I.kind!=="number"&&I.kind!=="boolean"&&I.kind!=="object"&&I.kind!=="array"||D.kind!=="value")if(I.kind!=="color"&&I.kind!=="formatted"&&I.kind!=="resolvedImage"||D.kind!=="value"&&D.kind!=="string")if(I.kind!=="padding"||D.kind!=="value"&&D.kind!=="number"&&D.kind!=="array")if(I.kind!=="variableAnchorOffsetCollection"||D.kind!=="value"&&D.kind!=="array"){if(this.checkSubtype(I,D))return null}else A=y(A,I,T.typeAnnotation||"coerce");else A=y(A,I,T.typeAnnotation||"coerce");else A=y(A,I,T.typeAnnotation||"coerce");else A=y(A,I,T.typeAnnotation||"assert")}if(!(A instanceof oo)&&A.type.kind!=="resolvedImage"&&this._isConstant(A)){const I=new Zo;try{A=new oo(A.type,A.evaluate(I))}catch(D){return this.error(D.message),null}}return A}return this.error(`Unknown expression "${w}". 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,T,y){const w=typeof l=="number"?this.path.concat(l):this.path,C=y?this.scope.concat(y):this.scope;return new Zr(this.registry,this._isConstant,w,T||null,C,this.errors)}error(l,...T){const y=`${this.key}${T.map(w=>`[${w}]`).join("")}`;this.errors.push(new Tn(y,l))}checkSubtype(l,T){const y=Ct(l,T);return y&&this.error(y),y}}class xo{constructor(l,T,y){this.type=Li,this.locale=y,this.caseSensitive=l,this.diacriticSensitive=T}static parse(l,T){if(l.length!==2)return T.error("Expected one argument.");const y=l[1];if(typeof y!="object"||Array.isArray(y))return T.error("Collator options argument must be an object.");const w=T.parse(y["case-sensitive"]!==void 0&&y["case-sensitive"],1,ur);if(!w)return null;const C=T.parse(y["diacritic-sensitive"]!==void 0&&y["diacritic-sensitive"],1,ur);if(!C)return null;let A=null;return y.locale&&(A=T.parse(y.locale,1,yr),!A)?null:new xo(w,C,A)}evaluate(l){return new Ni(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 k=8192;function $(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 q(u,l){const T=(180+u[0])/360,y=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u[1]*Math.PI/360)))/360,w=Math.pow(2,l.z);return[Math.round(T*w*k),Math.round(y*w*k)]}function it(u,l,T){const y=u[0]-l[0],w=u[1]-l[1],C=u[0]-T[0],A=u[1]-T[1];return y*A-C*w==0&&y*C<=0&&w*A<=0}function pt(u,l){let T=!1;for(let A=0,I=l.length;A<I;A++){const D=l[A];for(let Z=0,X=D.length;Z<X-1;Z++){if(it(u,D[Z],D[Z+1]))return!1;(w=D[Z])[1]>(y=u)[1]!=(C=D[Z+1])[1]>y[1]&&y[0]<(C[0]-w[0])*(y[1]-w[1])/(C[1]-w[1])+w[0]&&(T=!T)}}var y,w,C;return T}function yt(u,l){for(let T=0;T<l.length;T++)if(pt(u,l[T]))return!0;return!1}function Zt(u,l,T,y){const w=y[0]-T[0],C=y[1]-T[1],A=(u[0]-T[0])*C-w*(u[1]-T[1]),I=(l[0]-T[0])*C-w*(l[1]-T[1]);return A>0&&I<0||A<0&&I>0}function ne(u,l,T){for(const Z of T)for(let X=0;X<Z.length-1;++X)if((I=[(A=Z[X+1])[0]-(C=Z[X])[0],A[1]-C[1]])[0]*(D=[(w=l)[0]-(y=u)[0],w[1]-y[1]])[1]-I[1]*D[0]!=0&&Zt(y,w,C,A)&&Zt(C,A,y,w))return!0;var y,w,C,A,I,D;return!1}function me(u,l){for(let T=0;T<u.length;++T)if(!pt(u[T],l))return!1;for(let T=0;T<u.length-1;++T)if(ne(u[T],u[T+1],l))return!1;return!0}function Me(u,l){for(let T=0;T<l.length;T++)if(me(u,l[T]))return!0;return!1}function _e(u,l,T){const y=[];for(let w=0;w<u.length;w++){const C=[];for(let A=0;A<u[w].length;A++){const I=q(u[w][A],T);$(l,I),C.push(I)}y.push(C)}return y}function or(u,l,T){const y=[];for(let w=0;w<u.length;w++){const C=_e(u[w],l,T);y.push(C)}return y}function Hn(u,l,T,y){if(u[0]<T[0]||u[0]>T[2]){const w=.5*y;let C=u[0]-T[0]>w?-y:T[0]-u[0]>w?y:0;C===0&&(C=u[0]-T[2]>w?-y:T[2]-u[0]>w?y:0),u[0]+=C}$(l,u)}function Mr(u,l,T,y){const w=Math.pow(2,y.z)*k,C=[y.x*k,y.y*k],A=[];for(const I of u)for(const D of I){const Z=[D.x+C[0],D.y+C[1]];Hn(Z,l,T,w),A.push(Z)}return A}function Dn(u,l,T,y){const w=Math.pow(2,y.z)*k,C=[y.x*k,y.y*k],A=[];for(const D of u){const Z=[];for(const X of D){const K=[X.x+C[0],X.y+C[1]];$(l,K),Z.push(K)}A.push(Z)}if(l[2]-l[0]<=w/2){(I=l)[0]=I[1]=1/0,I[2]=I[3]=-1/0;for(const D of A)for(const Z of D)Hn(Z,l,T,w)}var I;return A}class ae{constructor(l,T){this.type=ur,this.geojson=l,this.geometries=T}static parse(l,T){if(l.length!==2)return T.error(`'within' expression requires exactly one argument, but found ${l.length-1} instead.`);if(y1(l[1])){const y=l[1];if(y.type==="FeatureCollection"){const w=[];for(const C of y.features){const{type:A,coordinates:I}=C.geometry;A==="Polygon"&&w.push(I),A==="MultiPolygon"&&w.push(...I)}if(w.length)return new ae(y,{type:"MultiPolygon",coordinates:w})}else if(y.type==="Feature"){const w=y.geometry.type;if(w==="Polygon"||w==="MultiPolygon")return new ae(y,y.geometry)}else if(y.type==="Polygon"||y.type==="MultiPolygon")return new ae(y,y)}return T.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(T,y){const w=[1/0,1/0,-1/0,-1/0],C=[1/0,1/0,-1/0,-1/0],A=T.canonicalID();if(y.type==="Polygon"){const I=_e(y.coordinates,C,A),D=Mr(T.geometry(),w,C,A);if(!F(w,C))return!1;for(const Z of D)if(!pt(Z,I))return!1}if(y.type==="MultiPolygon"){const I=or(y.coordinates,C,A),D=Mr(T.geometry(),w,C,A);if(!F(w,C))return!1;for(const Z of D)if(!yt(Z,I))return!1}return!0}(l,this.geometries);if(l.geometryType()==="LineString")return function(T,y){const w=[1/0,1/0,-1/0,-1/0],C=[1/0,1/0,-1/0,-1/0],A=T.canonicalID();if(y.type==="Polygon"){const I=_e(y.coordinates,C,A),D=Dn(T.geometry(),w,C,A);if(!F(w,C))return!1;for(const Z of D)if(!me(Z,I))return!1}if(y.type==="MultiPolygon"){const I=or(y.coordinates,C,A),D=Dn(T.geometry(),w,C,A);if(!F(w,C))return!1;for(const Z of D)if(!Me(Z,I))return!1}return!0}(l,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}class Ye{constructor(l,T){this.type=T.type,this.name=l,this.boundExpression=T}static parse(l,T){if(l.length!==2||typeof l[1]!="string")return T.error("'var' expression requires exactly one string literal argument.");const y=l[1];return T.scope.has(y)?new Ye(y,T.scope.get(y)):T.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 Ir{constructor(l,T,y,w){this.name=l,this.type=T,this._evaluate=y,this.args=w}evaluate(l){return this._evaluate(l,this.args)}eachChild(l){this.args.forEach(l)}outputDefined(){return!1}static parse(l,T){const y=l[0],w=Ir.definitions[y];if(!w)return T.error(`Unknown expression "${y}". If you wanted a literal array, use ["literal", [...]].`,0);const C=Array.isArray(w)?w[0]:w.type,A=Array.isArray(w)?[[w[1],w[2]]]:w.overloads,I=A.filter(([Z])=>!Array.isArray(Z)||Z.length===l.length-1);let D=null;for(const[Z,X]of I){D=new Zr(T.registry,Wn,T.path,null,T.scope);const K=[];let at=!1;for(let lt=1;lt<l.length;lt++){const ut=l[lt],Qt=Array.isArray(Z)?Z[lt-1]:Z.type,bt=D.parse(ut,1+K.length,Qt);if(!bt){at=!0;break}K.push(bt)}if(!at)if(Array.isArray(Z)&&Z.length!==K.length)D.error(`Expected ${Z.length} arguments, but found ${K.length} instead.`);else{for(let lt=0;lt<K.length;lt++){const ut=Array.isArray(Z)?Z[lt]:Z.type,Qt=K[lt];D.concat(lt+1).checkSubtype(ut,Qt.type)}if(D.errors.length===0)return new Ir(y,C,X,K)}}if(I.length===1)T.errors.push(...D.errors);else{const Z=(I.length?I:A).map(([K])=>{return at=K,Array.isArray(at)?`(${at.map(gt).join(", ")})`:`(${gt(at.type)}...)`;var at}).join(" | "),X=[];for(let K=1;K<l.length;K++){const at=T.parse(l[K],1+X.length);if(!at)return null;X.push(gt(at.type))}T.error(`Expected arguments of type ${Z}, but found (${X.join(", ")}) instead.`)}return null}static register(l,T){Ir.definitions=T;for(const y in T)l[y]=Ir}}function Wn(u){if(u instanceof Ye)return Wn(u.boundExpression);if(u instanceof Ir&&u.name==="error"||u instanceof xo||u instanceof ae)return!1;const l=u instanceof h1||u instanceof V1;let T=!0;return u.eachChild(y=>{T=l?T&&Wn(y):T&&y instanceof oo}),!!T&&Sn(u)&&K3(u,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Sn(u){if(u instanceof Ir&&(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 ae)return!1;let l=!0;return u.eachChild(T=>{l&&!Sn(T)&&(l=!1)}),l}function K2(u){if(u instanceof Ir&&u.name==="feature-state")return!1;let l=!0;return u.eachChild(T=>{l&&!K2(T)&&(l=!1)}),l}function K3(u,l){if(u instanceof Ir&&l.indexOf(u.name)>=0)return!1;let T=!0;return u.eachChild(y=>{T&&!K3(y,l)&&(T=!1)}),T}function ln(u,l){const T=u.length-1;let y,w,C=0,A=T,I=0;for(;C<=A;)if(I=Math.floor((C+A)/2),y=u[I],w=u[I+1],y<=l){if(I===T||l<w)return I;C=I+1}else{if(!(y>l))throw new gn("Input is not a number.");A=I-1}return 0}class Y2{constructor(l,T,y){this.type=l,this.input=T,this.labels=[],this.outputs=[];for(const[w,C]of y)this.labels.push(w),this.outputs.push(C)}static parse(l,T){if(l.length-1<4)return T.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if((l.length-1)%2!=0)return T.error("Expected an even number of arguments.");const y=T.parse(l[1],1,be);if(!y)return null;const w=[];let C=null;T.expectedType&&T.expectedType.kind!=="value"&&(C=T.expectedType);for(let A=1;A<l.length;A+=2){const I=A===1?-1/0:l[A],D=l[A+1],Z=A,X=A+1;if(typeof I!="number")return T.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Z);if(w.length&&w[w.length-1][0]>=I)return T.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Z);const K=T.parse(D,X,C);if(!K)return null;C=C||K.type,w.push([I,K])}return new Y2(C,y,w)}evaluate(l){const T=this.labels,y=this.outputs;if(T.length===1)return y[0].evaluate(l);const w=this.input.evaluate(l);if(w<=T[0])return y[0].evaluate(l);const C=T.length;return w>=T[C-1]?y[C-1].evaluate(l):y[ln(T,w)].evaluate(l)}eachChild(l){l(this.input);for(const T of this.outputs)l(T)}outputDefined(){return this.outputs.every(l=>l.outputDefined())}}function fc(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var $o=w6;function w6(u,l,T,y){this.cx=3*u,this.bx=3*(T-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=T,this.p2y=y}w6.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 T=u,y=0;y<8;y++){var w=this.sampleCurveX(T)-u;if(Math.abs(w)<l)return T;var C=this.sampleCurveDerivativeX(T);if(Math.abs(C)<1e-6)break;T-=w/C}var A=0,I=1;for(T=u,y=0;y<20&&(w=this.sampleCurveX(T),!(Math.abs(w-u)<l));y++)u>w?A=T:I=T,T=.5*(I-A)+A;return T},solve:function(u,l){return this.sampleCurveY(this.solveCurveX(u,l))}};var O0=fc($o);function v2(u,l,T){return u+T*(l-u)}function Ua(u,l,T){return u.map((y,w)=>v2(y,l[w],T))}const hi={number:v2,color:function(u,l,T,y="rgb"){switch(y){case"rgb":{const[w,C,A,I]=Ua(u.rgb,l.rgb,T);return new Er(w,C,A,I,!1)}case"hcl":{const[w,C,A,I]=u.hcl,[D,Z,X,K]=l.hcl;let at,lt;if(isNaN(w)||isNaN(D))isNaN(w)?isNaN(D)?at=NaN:(at=D,A!==1&&A!==0||(lt=Z)):(at=w,X!==1&&X!==0||(lt=C));else{let Nt=D-w;D>w&&Nt>180?Nt-=360:D<w&&w-D>180&&(Nt+=360),at=w+T*Nt}const[ut,Qt,bt,wt]=function([Nt,Mt,kt,ie]){return Nt=isNaN(Nt)?0:Nt*rr,Xr([kt,Math.cos(Nt)*Mt,Math.sin(Nt)*Mt,ie])}([at,lt??v2(C,Z,T),v2(A,X,T),v2(I,K,T)]);return new Er(ut,Qt,bt,wt,!1)}case"lab":{const[w,C,A,I]=Xr(Ua(u.lab,l.lab,T));return new Er(w,C,A,I,!1)}}},array:Ua,padding:function(u,l,T){return new c1(Ua(u.values,l.values,T))},variableAnchorOffsetCollection:function(u,l,T){const y=u.values,w=l.values;if(y.length!==w.length)throw new gn(`Cannot interpolate values of different length. from: ${u.toString()}, to: ${l.toString()}`);const C=[];for(let A=0;A<y.length;A+=2){if(y[A]!==w[A])throw new gn(`Cannot interpolate values containing mismatched anchors. from[${A}]: ${y[A]}, to[${A}]: ${w[A]}`);C.push(y[A]);const[I,D]=y[A+1],[Z,X]=w[A+1];C.push([v2(I,Z,T),v2(D,X,T)])}return new $r(C)}};class G1{constructor(l,T,y,w,C){this.type=l,this.operator=T,this.interpolation=y,this.input=w,this.labels=[],this.outputs=[];for(const[A,I]of C)this.labels.push(A),this.outputs.push(I)}static interpolationFactor(l,T,y,w){let C=0;if(l.name==="exponential")C=Ga(T,l.base,y,w);else if(l.name==="linear")C=Ga(T,1,y,w);else if(l.name==="cubic-bezier"){const A=l.controlPoints;C=new O0(A[0],A[1],A[2],A[3]).solve(Ga(T,1,y,w))}return C}static parse(l,T){let[y,w,C,...A]=l;if(!Array.isArray(w)||w.length===0)return T.error("Expected an interpolation type expression.",1);if(w[0]==="linear")w={name:"linear"};else if(w[0]==="exponential"){const Z=w[1];if(typeof Z!="number")return T.error("Exponential interpolation requires a numeric base.",1,1);w={name:"exponential",base:Z}}else{if(w[0]!=="cubic-bezier")return T.error(`Unknown interpolation type ${String(w[0])}`,1,0);{const Z=w.slice(1);if(Z.length!==4||Z.some(X=>typeof X!="number"||X<0||X>1))return T.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);w={name:"cubic-bezier",controlPoints:Z}}}if(l.length-1<4)return T.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if((l.length-1)%2!=0)return T.error("Expected an even number of arguments.");if(C=T.parse(C,2,be),!C)return null;const I=[];let D=null;y==="interpolate-hcl"||y==="interpolate-lab"?D=r1:T.expectedType&&T.expectedType.kind!=="value"&&(D=T.expectedType);for(let Z=0;Z<A.length;Z+=2){const X=A[Z],K=A[Z+1],at=Z+3,lt=Z+4;if(typeof X!="number")return T.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',at);if(I.length&&I[I.length-1][0]>=X)return T.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',at);const ut=T.parse(K,lt,D);if(!ut)return null;D=D||ut.type,I.push([X,ut])}return Rt(D,be)||Rt(D,r1)||Rt(D,mt)||Rt(D,st)||Rt(D,ht(be))?new G1(D,y,w,C,I):T.error(`Type ${gt(D)} is not interpolatable.`)}evaluate(l){const T=this.labels,y=this.outputs;if(T.length===1)return y[0].evaluate(l);const w=this.input.evaluate(l);if(w<=T[0])return y[0].evaluate(l);const C=T.length;if(w>=T[C-1])return y[C-1].evaluate(l);const A=ln(T,w),I=G1.interpolationFactor(this.interpolation,w,T[A],T[A+1]),D=y[A].evaluate(l),Z=y[A+1].evaluate(l);switch(this.operator){case"interpolate":return hi[this.type.kind](D,Z,I);case"interpolate-hcl":return hi.color(D,Z,I,"hcl");case"interpolate-lab":return hi.color(D,Z,I,"lab")}}eachChild(l){l(this.input);for(const T of this.outputs)l(T)}outputDefined(){return this.outputs.every(l=>l.outputDefined())}}function Ga(u,l,T,y){const w=y-T,C=u-T;return w===0?0:l===1?C/w:(Math.pow(l,C)-1)/(Math.pow(l,w)-1)}class qr{constructor(l,T){this.type=l,this.args=T}static parse(l,T){if(l.length<2)return T.error("Expectected at least one argument.");let y=null;const w=T.expectedType;w&&w.kind!=="value"&&(y=w);const C=[];for(const I of l.slice(1)){const D=T.parse(I,1+C.length,y,void 0,{typeAnnotation:"omit"});if(!D)return null;y=y||D.type,C.push(D)}if(!y)throw new Error("No output type");const A=w&&C.some(I=>Ct(w,I.type));return new qr(A?sr:y,C)}evaluate(l){let T,y=null,w=0;for(const C of this.args)if(w++,y=C.evaluate(l),y&&y instanceof w1&&!y.available&&(T||(T=y.name),y=null,w===this.args.length&&(y=T)),y!==null)break;return y}eachChild(l){this.args.forEach(l)}outputDefined(){return this.args.every(l=>l.outputDefined())}}class Y3{constructor(l,T){this.type=T.type,this.bindings=[].concat(l),this.result=T}evaluate(l){return this.result.evaluate(l)}eachChild(l){for(const T of this.bindings)l(T[1]);l(this.result)}static parse(l,T){if(l.length<4)return T.error(`Expected at least 3 arguments, but found ${l.length-1} instead.`);const y=[];for(let C=1;C<l.length-1;C+=2){const A=l[C];if(typeof A!="string")return T.error(`Expected string, but found ${typeof A} instead.`,C);if(/[^a-zA-Z0-9_]/.test(A))return T.error("Variable names must contain only alphanumeric characters or '_'.",C);const I=T.parse(l[C+1],C+1);if(!I)return null;y.push([A,I])}const w=T.parse(l[l.length-1],l.length-1,T.expectedType,y);return w?new Y3(y,w):null}outputDefined(){return this.result.outputDefined()}}class J3{constructor(l,T,y){this.type=l,this.index=T,this.input=y}static parse(l,T){if(l.length!==3)return T.error(`Expected 2 arguments, but found ${l.length-1} instead.`);const y=T.parse(l[1],1,be),w=T.parse(l[2],2,ht(T.expectedType||sr));return y&&w?new J3(w.type.itemType,y,w):null}evaluate(l){const T=this.index.evaluate(l),y=this.input.evaluate(l);if(T<0)throw new gn(`Array index out of bounds: ${T} < 0.`);if(T>=y.length)throw new gn(`Array index out of bounds: ${T} > ${y.length-1}.`);if(T!==Math.floor(T))throw new gn(`Array index must be an integer, but found ${T} instead.`);return y[T]}eachChild(l){l(this.index),l(this.input)}outputDefined(){return!1}}class t4{constructor(l,T){this.type=ur,this.needle=l,this.haystack=T}static parse(l,T){if(l.length!==3)return T.error(`Expected 2 arguments, but found ${l.length-1} instead.`);const y=T.parse(l[1],1,sr),w=T.parse(l[2],2,sr);return y&&w?Ot(y.type,[ur,yr,be,ui,sr])?new t4(y,w):T.error(`Expected first argument to be of type boolean, string, number or null, but found ${gt(y.type)} instead`):null}evaluate(l){const T=this.needle.evaluate(l),y=this.haystack.evaluate(l);if(!y)return!1;if(!Et(T,["boolean","string","number","null"]))throw new gn(`Expected first argument to be of type boolean, string, number or null, but found ${gt(Jr(T))} instead.`);if(!Et(y,["string","array"]))throw new gn(`Expected second argument to be of type array or string, but found ${gt(Jr(y))} instead.`);return y.indexOf(T)>=0}eachChild(l){l(this.needle),l(this.haystack)}outputDefined(){return!0}}class Us{constructor(l,T,y){this.type=be,this.needle=l,this.haystack=T,this.fromIndex=y}static parse(l,T){if(l.length<=2||l.length>=5)return T.error(`Expected 3 or 4 arguments, but found ${l.length-1} instead.`);const y=T.parse(l[1],1,sr),w=T.parse(l[2],2,sr);if(!y||!w)return null;if(!Ot(y.type,[ur,yr,be,ui,sr]))return T.error(`Expected first argument to be of type boolean, string, number or null, but found ${gt(y.type)} instead`);if(l.length===4){const C=T.parse(l[3],3,be);return C?new Us(y,w,C):null}return new Us(y,w)}evaluate(l){const T=this.needle.evaluate(l),y=this.haystack.evaluate(l);if(!Et(T,["boolean","string","number","null"]))throw new gn(`Expected first argument to be of type boolean, string, number or null, but found ${gt(Jr(T))} instead.`);if(!Et(y,["string","array"]))throw new gn(`Expected second argument to be of type array or string, but found ${gt(Jr(y))} instead.`);if(this.fromIndex){const w=this.fromIndex.evaluate(l);return y.indexOf(T,w)}return y.indexOf(T)}eachChild(l){l(this.needle),l(this.haystack),this.fromIndex&&l(this.fromIndex)}outputDefined(){return!1}}class E6{constructor(l,T,y,w,C,A){this.inputType=l,this.type=T,this.input=y,this.cases=w,this.outputs=C,this.otherwise=A}static parse(l,T){if(l.length<5)return T.error(`Expected at least 4 arguments, but found only ${l.length-1}.`);if(l.length%2!=1)return T.error("Expected an even number of arguments.");let y,w;T.expectedType&&T.expectedType.kind!=="value"&&(w=T.expectedType);const C={},A=[];for(let Z=2;Z<l.length-1;Z+=2){let X=l[Z];const K=l[Z+1];Array.isArray(X)||(X=[X]);const at=T.concat(Z);if(X.length===0)return at.error("Expected at least one branch label.");for(const ut of X){if(typeof ut!="number"&&typeof ut!="string")return at.error("Branch labels must be numbers or strings.");if(typeof ut=="number"&&Math.abs(ut)>Number.MAX_SAFE_INTEGER)return at.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof ut=="number"&&Math.floor(ut)!==ut)return at.error("Numeric branch labels must be integer values.");if(y){if(at.checkSubtype(y,Jr(ut)))return null}else y=Jr(ut);if(C[String(ut)]!==void 0)return at.error("Branch labels must be unique.");C[String(ut)]=A.length}const lt=T.parse(K,Z,w);if(!lt)return null;w=w||lt.type,A.push(lt)}const I=T.parse(l[1],1,sr);if(!I)return null;const D=T.parse(l[l.length-1],l.length-1,w);return D?I.type.kind!=="value"&&T.concat(1).checkSubtype(y,I.type)?null:new E6(y,w,I,C,A,D):null}evaluate(l){const T=this.input.evaluate(l);return(Jr(T)===this.inputType&&this.outputs[this.cases[T]]||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 M6{constructor(l,T,y){this.type=l,this.branches=T,this.otherwise=y}static parse(l,T){if(l.length<4)return T.error(`Expected at least 3 arguments, but found only ${l.length-1}.`);if(l.length%2!=0)return T.error("Expected an odd number of arguments.");let y;T.expectedType&&T.expectedType.kind!=="value"&&(y=T.expectedType);const w=[];for(let A=1;A<l.length-1;A+=2){const I=T.parse(l[A],A,ur);if(!I)return null;const D=T.parse(l[A+1],A+1,y);if(!D)return null;w.push([I,D]),y=y||D.type}const C=T.parse(l[l.length-1],l.length-1,y);if(!C)return null;if(!y)throw new Error("Can't infer output type");return new M6(y,w,C)}evaluate(l){for(const[T,y]of this.branches)if(T.evaluate(l))return y.evaluate(l);return this.otherwise.evaluate(l)}eachChild(l){for(const[T,y]of this.branches)l(T),l(y);l(this.otherwise)}outputDefined(){return this.branches.every(([l,T])=>T.outputDefined())&&this.otherwise.outputDefined()}}class J2{constructor(l,T,y,w){this.type=l,this.input=T,this.beginIndex=y,this.endIndex=w}static parse(l,T){if(l.length<=2||l.length>=5)return T.error(`Expected 3 or 4 arguments, but found ${l.length-1} instead.`);const y=T.parse(l[1],1,sr),w=T.parse(l[2],2,be);if(!y||!w)return null;if(!Ot(y.type,[ht(sr),yr,sr]))return T.error(`Expected first argument to be of type array or string, but found ${gt(y.type)} instead`);if(l.length===4){const C=T.parse(l[3],3,be);return C?new J2(y.type,y,w,C):null}return new J2(y.type,y,w)}evaluate(l){const T=this.input.evaluate(l),y=this.beginIndex.evaluate(l);if(!Et(T,["string","array"]))throw new gn(`Expected first argument to be of type array or string, but found ${gt(Jr(T))} instead.`);if(this.endIndex){const w=this.endIndex.evaluate(l);return T.slice(y,w)}return T.slice(y)}eachChild(l){l(this.input),l(this.beginIndex),this.endIndex&&l(this.endIndex)}outputDefined(){return!1}}function e4(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 H6(u,l,T,y){return y.compare(l,T)===0}function ri(u,l,T){const y=u!=="=="&&u!=="!=";return class GB{constructor(C,A,I){this.type=ur,this.lhs=C,this.rhs=A,this.collator=I,this.hasUntypedArgument=C.type.kind==="value"||A.type.kind==="value"}static parse(C,A){if(C.length!==3&&C.length!==4)return A.error("Expected two or three arguments.");const I=C[0];let D=A.parse(C[1],1,sr);if(!D)return null;if(!e4(I,D.type))return A.concat(1).error(`"${I}" comparisons are not supported for type '${gt(D.type)}'.`);let Z=A.parse(C[2],2,sr);if(!Z)return null;if(!e4(I,Z.type))return A.concat(2).error(`"${I}" comparisons are not supported for type '${gt(Z.type)}'.`);if(D.type.kind!==Z.type.kind&&D.type.kind!=="value"&&Z.type.kind!=="value")return A.error(`Cannot compare types '${gt(D.type)}' and '${gt(Z.type)}'.`);y&&(D.type.kind==="value"&&Z.type.kind!=="value"?D=new V1(Z.type,[D]):D.type.kind!=="value"&&Z.type.kind==="value"&&(Z=new V1(D.type,[Z])));let X=null;if(C.length===4){if(D.type.kind!=="string"&&Z.type.kind!=="string"&&D.type.kind!=="value"&&Z.type.kind!=="value")return A.error("Cannot use collator to compare non-string types.");if(X=A.parse(C[3],3,Li),!X)return null}return new GB(D,Z,X)}evaluate(C){const A=this.lhs.evaluate(C),I=this.rhs.evaluate(C);if(y&&this.hasUntypedArgument){const D=Jr(A),Z=Jr(I);if(D.kind!==Z.kind||D.kind!=="string"&&D.kind!=="number")throw new gn(`Expected arguments for "${u}" to be (string, string) or (number, number), but found (${D.kind}, ${Z.kind}) instead.`)}if(this.collator&&!y&&this.hasUntypedArgument){const D=Jr(A),Z=Jr(I);if(D.kind!=="string"||Z.kind!=="string")return l(C,A,I)}return this.collator?T(C,A,I,this.collator.evaluate(C)):l(C,A,I)}eachChild(C){C(this.lhs),C(this.rhs),this.collator&&C(this.collator)}outputDefined(){return!0}}}const k0=ri("==",function(u,l,T){return l===T},H6),P0=ri("!=",function(u,l,T){return l!==T},function(u,l,T,y){return!H6(0,l,T,y)}),Qc=ri("<",function(u,l,T){return l<T},function(u,l,T,y){return y.compare(l,T)<0}),I0=ri(">",function(u,l,T){return l>T},function(u,l,T,y){return y.compare(l,T)>0}),r4=ri("<=",function(u,l,T){return l<=T},function(u,l,T,y){return y.compare(l,T)<=0}),R0=ri(">=",function(u,l,T){return l>=T},function(u,l,T,y){return y.compare(l,T)>=0});class n4{constructor(l,T,y,w,C){this.type=yr,this.number=l,this.locale=T,this.currency=y,this.minFractionDigits=w,this.maxFractionDigits=C}static parse(l,T){if(l.length!==3)return T.error("Expected two arguments.");const y=T.parse(l[1],1,be);if(!y)return null;const w=l[2];if(typeof w!="object"||Array.isArray(w))return T.error("NumberFormat options argument must be an object.");let C=null;if(w.locale&&(C=T.parse(w.locale,1,yr),!C))return null;let A=null;if(w.currency&&(A=T.parse(w.currency,1,yr),!A))return null;let I=null;if(w["min-fraction-digits"]&&(I=T.parse(w["min-fraction-digits"],1,be),!I))return null;let D=null;return w["max-fraction-digits"]&&(D=T.parse(w["max-fraction-digits"],1,be),!D)?null:new n4(y,C,A,I,D)}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 i4{constructor(l){this.type=C1,this.sections=l}static parse(l,T){if(l.length<2)return T.error("Expected at least one argument.");const y=l[1];if(!Array.isArray(y)&&typeof y=="object")return T.error("First argument must be an image or text section.");const w=[];let C=!1;for(let A=1;A<=l.length-1;++A){const I=l[A];if(C&&typeof I=="object"&&!Array.isArray(I)){C=!1;let D=null;if(I["font-scale"]&&(D=T.parse(I["font-scale"],1,be),!D))return null;let Z=null;if(I["text-font"]&&(Z=T.parse(I["text-font"],1,ht(yr)),!Z))return null;let X=null;if(I["text-color"]&&(X=T.parse(I["text-color"],1,r1),!X))return null;const K=w[w.length-1];K.scale=D,K.font=Z,K.textColor=X}else{const D=T.parse(l[A],1,sr);if(!D)return null;const Z=D.type.kind;if(Z!=="string"&&Z!=="value"&&Z!=="null"&&Z!=="resolvedImage")return T.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");C=!0,w.push({content:D,scale:null,font:null,textColor:null})}}return new i4(w)}evaluate(l){return new Mn(this.sections.map(T=>{const y=T.content.evaluate(l);return Jr(y)===nt?new sn("",y,null,null,null):new sn(bo(y),null,T.scale?T.scale.evaluate(l):null,T.font?T.font.evaluate(l).join(","):null,T.textColor?T.textColor.evaluate(l):null)}))}eachChild(l){for(const T of this.sections)l(T.content),T.scale&&l(T.scale),T.font&&l(T.font),T.textColor&&l(T.textColor)}outputDefined(){return!1}}class qo{constructor(l){this.type=nt,this.input=l}static parse(l,T){if(l.length!==2)return T.error("Expected two arguments.");const y=T.parse(l[1],1,yr);return y?new qo(y):T.error("No image name provided.")}evaluate(l){const T=this.input.evaluate(l),y=w1.fromString(T);return y&&l.availableImages&&(y.available=l.availableImages.indexOf(T)>-1),y}eachChild(l){l(this.input)}outputDefined(){return!1}}class o4{constructor(l){this.type=be,this.input=l}static parse(l,T){if(l.length!==2)return T.error(`Expected 1 argument, but found ${l.length-1} instead.`);const y=T.parse(l[1],1);return y?y.type.kind!=="array"&&y.type.kind!=="string"&&y.type.kind!=="value"?T.error(`Expected argument of type string or array, but found ${gt(y.type)} instead.`):new o4(y):null}evaluate(l){const T=this.input.evaluate(l);if(typeof T=="string"||Array.isArray(T))return T.length;throw new gn(`Expected value to be of type string or array, but found ${gt(Jr(T))} instead.`)}eachChild(l){l(this.input)}outputDefined(){return!1}}const Za={"==":k0,"!=":P0,">":I0,"<":Qc,">=":R0,"<=":r4,array:V1,at:J3,boolean:V1,case:M6,coalesce:qr,collator:xo,format:i4,image:qo,in:t4,"index-of":Us,interpolate:G1,"interpolate-hcl":G1,"interpolate-lab":G1,length:o4,let:Y3,literal:oo,match:E6,number:V1,"number-format":n4,object:V1,slice:J2,step:Y2,string:V1,"to-boolean":h1,"to-color":h1,"to-number":h1,"to-string":h1,var:Ye,within:ae};function N0(u,[l,T,y,w]){l=l.evaluate(u),T=T.evaluate(u),y=y.evaluate(u);const C=w?w.evaluate(u):1,A=io(l,T,y,C);if(A)throw new gn(A);return new Er(l/255,T/255,y/255,C,!1)}function a4(u,l){return u in l}function ta(u,l){const T=l[u];return T===void 0?null:T}function Wo(u){return{type:u}}function s4(u){return{result:"success",value:u}}function b2(u){return{result:"error",value:u}}function wo(u){return u["property-type"]==="data-driven"||u["property-type"]==="cross-faded-data-driven"}function B0(u){return!!u.expression&&u.expression.parameters.indexOf("zoom")>-1}function S6(u){return!!u.expression&&u.expression.interpolated}function Kr(u){return u instanceof Number?"number":u instanceof String?"string":u instanceof Boolean?"boolean":Array.isArray(u)?"array":u===null?"null":typeof u}function $a(u){return typeof u=="object"&&u!==null&&!Array.isArray(u)}function mc(u){return u}function C6(u,l){const T=l.type==="color",y=u.stops&&typeof u.stops[0][0]=="object",w=y||!(y||u.property!==void 0),C=u.type||(S6(l)?"exponential":"interval");if(T||l.type==="padding"){const X=T?Er.parse:c1.parse;(u=Bn({},u)).stops&&(u.stops=u.stops.map(K=>[K[0],X(K[1])])),u.default=X(u.default?u.default:l.default)}if(u.colorSpace&&(A=u.colorSpace)!=="rgb"&&A!=="hcl"&&A!=="lab")throw new Error(`Unknown color space: "${u.colorSpace}"`);var A;let I,D,Z;if(C==="exponential")I=L2;else if(C==="interval")I=cn;else if(C==="categorical"){I=ra,D=Object.create(null);for(const X of u.stops)D[X[0]]=X[1];Z=typeof u.stops[0][0]}else{if(C!=="identity")throw new Error(`Unknown function type "${C}"`);I=Rr}if(y){const X={},K=[];for(let ut=0;ut<u.stops.length;ut++){const Qt=u.stops[ut],bt=Qt[0].zoom;X[bt]===void 0&&(X[bt]={zoom:bt,type:u.type,property:u.property,default:u.default,stops:[]},K.push(bt)),X[bt].stops.push([Qt[0].value,Qt[1]])}const at=[];for(const ut of K)at.push([X[ut].zoom,C6(X[ut],l)]);const lt={name:"linear"};return{kind:"composite",interpolationType:lt,interpolationFactor:G1.interpolationFactor.bind(void 0,lt),zoomStops:at.map(ut=>ut[0]),evaluate:({zoom:ut},Qt)=>L2({stops:at,base:u.base},l,ut).evaluate(ut,Qt)}}if(w){const X=C==="exponential"?{name:"exponential",base:u.base!==void 0?u.base:1}:null;return{kind:"camera",interpolationType:X,interpolationFactor:G1.interpolationFactor.bind(void 0,X),zoomStops:u.stops.map(K=>K[0]),evaluate:({zoom:K})=>I(u,l,K,D,Z)}}return{kind:"source",evaluate(X,K){const at=K&&K.properties?K.properties[u.property]:void 0;return at===void 0?ea(u.default,l.default):I(u,l,at,D,Z)}}}function ea(u,l,T){return u!==void 0?u:l!==void 0?l:T!==void 0?T:void 0}function ra(u,l,T,y,w){return ea(typeof T===w?y[T]:void 0,u.default,l.default)}function cn(u,l,T){if(Kr(T)!=="number")return ea(u.default,l.default);const y=u.stops.length;if(y===1||T<=u.stops[0][0])return u.stops[0][1];if(T>=u.stops[y-1][0])return u.stops[y-1][1];const w=ln(u.stops.map(C=>C[0]),T);return u.stops[w][1]}function L2(u,l,T){const y=u.base!==void 0?u.base:1;if(Kr(T)!=="number")return ea(u.default,l.default);const w=u.stops.length;if(w===1||T<=u.stops[0][0])return u.stops[0][1];if(T>=u.stops[w-1][0])return u.stops[w-1][1];const C=ln(u.stops.map(X=>X[0]),T),A=function(X,K,at,lt){const ut=lt-at,Qt=X-at;return ut===0?0:K===1?Qt/ut:(Math.pow(K,Qt)-1)/(Math.pow(K,ut)-1)}(T,y,u.stops[C][0],u.stops[C+1][0]),I=u.stops[C][1],D=u.stops[C+1][1],Z=hi[l.type]||mc;return typeof I.evaluate=="function"?{evaluate(...X){const K=I.evaluate.apply(void 0,X),at=D.evaluate.apply(void 0,X);if(K!==void 0&&at!==void 0)return Z(K,at,A,u.colorSpace)}}:Z(I,D,A,u.colorSpace)}function Rr(u,l,T){switch(l.type){case"color":T=Er.parse(T);break;case"formatted":T=Mn.fromString(T.toString());break;case"resolvedImage":T=w1.fromString(T.toString());break;case"padding":T=c1.parse(T);break;default:Kr(T)===l.type||l.type==="enum"&&l.values[T]||(T=void 0)}return ea(T,u.default,l.default)}Ir.register(Za,{error:[{kind:"error"},[yr],(u,[l])=>{throw new gn(l.evaluate(u))}],typeof:[yr,[sr],(u,[l])=>gt(Jr(l.evaluate(u)))],"to-rgba":[ht(be,4),[r1],(u,[l])=>{const[T,y,w,C]=l.evaluate(u).rgb;return[255*T,255*y,255*w,C]}],rgb:[r1,[be,be,be],N0],rgba:[r1,[be,be,be,be],N0],has:{type:ur,overloads:[[[yr],(u,[l])=>a4(l.evaluate(u),u.properties())],[[yr,n1],(u,[l,T])=>a4(l.evaluate(u),T.evaluate(u))]]},get:{type:sr,overloads:[[[yr],(u,[l])=>ta(l.evaluate(u),u.properties())],[[yr,n1],(u,[l,T])=>ta(l.evaluate(u),T.evaluate(u))]]},"feature-state":[sr,[yr],(u,[l])=>ta(l.evaluate(u),u.featureState||{})],properties:[n1,[],u=>u.properties()],"geometry-type":[yr,[],u=>u.geometryType()],id:[sr,[],u=>u.id()],zoom:[be,[],u=>u.globals.zoom],"heatmap-density":[be,[],u=>u.globals.heatmapDensity||0],"line-progress":[be,[],u=>u.globals.lineProgress||0],accumulated:[sr,[],u=>u.globals.accumulated===void 0?null:u.globals.accumulated],"+":[be,Wo(be),(u,l)=>{let T=0;for(const y of l)T+=y.evaluate(u);return T}],"*":[be,Wo(be),(u,l)=>{let T=1;for(const y of l)T*=y.evaluate(u);return T}],"-":{type:be,overloads:[[[be,be],(u,[l,T])=>l.evaluate(u)-T.evaluate(u)],[[be],(u,[l])=>-l.evaluate(u)]]},"/":[be,[be,be],(u,[l,T])=>l.evaluate(u)/T.evaluate(u)],"%":[be,[be,be],(u,[l,T])=>l.evaluate(u)%T.evaluate(u)],ln2:[be,[],()=>Math.LN2],pi:[be,[],()=>Math.PI],e:[be,[],()=>Math.E],"^":[be,[be,be],(u,[l,T])=>Math.pow(l.evaluate(u),T.evaluate(u))],sqrt:[be,[be],(u,[l])=>Math.sqrt(l.evaluate(u))],log10:[be,[be],(u,[l])=>Math.log(l.evaluate(u))/Math.LN10],ln:[be,[be],(u,[l])=>Math.log(l.evaluate(u))],log2:[be,[be],(u,[l])=>Math.log(l.evaluate(u))/Math.LN2],sin:[be,[be],(u,[l])=>Math.sin(l.evaluate(u))],cos:[be,[be],(u,[l])=>Math.cos(l.evaluate(u))],tan:[be,[be],(u,[l])=>Math.tan(l.evaluate(u))],asin:[be,[be],(u,[l])=>Math.asin(l.evaluate(u))],acos:[be,[be],(u,[l])=>Math.acos(l.evaluate(u))],atan:[be,[be],(u,[l])=>Math.atan(l.evaluate(u))],min:[be,Wo(be),(u,l)=>Math.min(...l.map(T=>T.evaluate(u)))],max:[be,Wo(be),(u,l)=>Math.max(...l.map(T=>T.evaluate(u)))],abs:[be,[be],(u,[l])=>Math.abs(l.evaluate(u))],round:[be,[be],(u,[l])=>{const T=l.evaluate(u);return T<0?-Math.round(-T):Math.round(T)}],floor:[be,[be],(u,[l])=>Math.floor(l.evaluate(u))],ceil:[be,[be],(u,[l])=>Math.ceil(l.evaluate(u))],"filter-==":[ur,[yr,sr],(u,[l,T])=>u.properties()[l.value]===T.value],"filter-id-==":[ur,[sr],(u,[l])=>u.id()===l.value],"filter-type-==":[ur,[yr],(u,[l])=>u.geometryType()===l.value],"filter-<":[ur,[yr,sr],(u,[l,T])=>{const y=u.properties()[l.value],w=T.value;return typeof y==typeof w&&y<w}],"filter-id-<":[ur,[sr],(u,[l])=>{const T=u.id(),y=l.value;return typeof T==typeof y&&T<y}],"filter->":[ur,[yr,sr],(u,[l,T])=>{const y=u.properties()[l.value],w=T.value;return typeof y==typeof w&&y>w}],"filter-id->":[ur,[sr],(u,[l])=>{const T=u.id(),y=l.value;return typeof T==typeof y&&T>y}],"filter-<=":[ur,[yr,sr],(u,[l,T])=>{const y=u.properties()[l.value],w=T.value;return typeof y==typeof w&&y<=w}],"filter-id-<=":[ur,[sr],(u,[l])=>{const T=u.id(),y=l.value;return typeof T==typeof y&&T<=y}],"filter->=":[ur,[yr,sr],(u,[l,T])=>{const y=u.properties()[l.value],w=T.value;return typeof y==typeof w&&y>=w}],"filter-id->=":[ur,[sr],(u,[l])=>{const T=u.id(),y=l.value;return typeof T==typeof y&&T>=y}],"filter-has":[ur,[sr],(u,[l])=>l.value in u.properties()],"filter-has-id":[ur,[],u=>u.id()!==null&&u.id()!==void 0],"filter-type-in":[ur,[ht(yr)],(u,[l])=>l.value.indexOf(u.geometryType())>=0],"filter-id-in":[ur,[ht(sr)],(u,[l])=>l.value.indexOf(u.id())>=0],"filter-in-small":[ur,[yr,ht(sr)],(u,[l,T])=>T.value.indexOf(u.properties()[l.value])>=0],"filter-in-large":[ur,[yr,ht(sr)],(u,[l,T])=>function(y,w,C,A){for(;C<=A;){const I=C+A>>1;if(w[I]===y)return!0;w[I]>y?A=I-1:C=I+1}return!1}(u.properties()[l.value],T.value,0,T.value.length-1)],all:{type:ur,overloads:[[[ur,ur],(u,[l,T])=>l.evaluate(u)&&T.evaluate(u)],[Wo(ur),(u,l)=>{for(const T of l)if(!T.evaluate(u))return!1;return!0}]]},any:{type:ur,overloads:[[[ur,ur],(u,[l,T])=>l.evaluate(u)||T.evaluate(u)],[Wo(ur),(u,l)=>{for(const T of l)if(T.evaluate(u))return!0;return!1}]]},"!":[ur,[ur],(u,[l])=>!l.evaluate(u)],"is-supported-script":[ur,[yr],(u,[l])=>{const T=u.globals&&u.globals.isSupportedScript;return!T||T(l.evaluate(u))}],upcase:[yr,[yr],(u,[l])=>l.evaluate(u).toUpperCase()],downcase:[yr,[yr],(u,[l])=>l.evaluate(u).toLowerCase()],concat:[yr,Wo(sr),(u,l)=>l.map(T=>bo(T.evaluate(u))).join("")],"resolved-locale":[yr,[Li],(u,[l])=>l.evaluate(u).resolvedLocale()]});class Di{constructor(l,T){var y;this.expression=l,this._warningHistory={},this._evaluator=new Zo,this._defaultValue=T?(y=T).type==="color"&&$a(y.default)?new Er(0,0,0,0):y.type==="color"?Er.parse(y.default)||null:y.type==="padding"?c1.parse(y.default)||null:y.type==="variableAnchorOffsetCollection"?$r.parse(y.default)||null:y.default===void 0?null:y.default:null,this._enumValues=T&&T.type==="enum"?T.values:null}evaluateWithoutErrorHandling(l,T,y,w,C,A){return this._evaluator.globals=l,this._evaluator.feature=T,this._evaluator.featureState=y,this._evaluator.canonical=w,this._evaluator.availableImages=C||null,this._evaluator.formattedSection=A,this.expression.evaluate(this._evaluator)}evaluate(l,T,y,w,C,A){this._evaluator.globals=l,this._evaluator.feature=T||null,this._evaluator.featureState=y||null,this._evaluator.canonical=w,this._evaluator.availableImages=C||null,this._evaluator.formattedSection=A||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 gn(`Expected value to be one of ${Object.keys(this._enumValues).map(D=>JSON.stringify(D)).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 fn(u){return Array.isArray(u)&&u.length>0&&typeof u[0]=="string"&&u[0]in Za}function nn(u,l){const T=new Zr(Za,Wn,[],l?function(w){const C={color:r1,string:yr,number:be,enum:yr,boolean:ur,formatted:C1,padding:mt,resolvedImage:nt,variableAnchorOffsetCollection:st};return w.type==="array"?ht(C[w.value]||sr,w.length):C[w.type]}(l):void 0),y=T.parse(u,void 0,void 0,void 0,l&&l.type==="string"?{typeAnnotation:"coerce"}:void 0);return y?s4(new Di(y,l)):b2(T.errors)}class Eo{constructor(l,T){this.kind=l,this._styleExpression=T,this.isStateDependent=l!=="constant"&&!K2(T.expression)}evaluateWithoutErrorHandling(l,T,y,w,C,A){return this._styleExpression.evaluateWithoutErrorHandling(l,T,y,w,C,A)}evaluate(l,T,y,w,C,A){return this._styleExpression.evaluate(l,T,y,w,C,A)}}class Gs{constructor(l,T,y,w){this.kind=l,this.zoomStops=y,this._styleExpression=T,this.isStateDependent=l!=="camera"&&!K2(T.expression),this.interpolationType=w}evaluateWithoutErrorHandling(l,T,y,w,C,A){return this._styleExpression.evaluateWithoutErrorHandling(l,T,y,w,C,A)}evaluate(l,T,y,w,C,A){return this._styleExpression.evaluate(l,T,y,w,C,A)}interpolationFactor(l,T,y){return this.interpolationType?G1.interpolationFactor(this.interpolationType,l,T,y):0}}function A6(u,l){const T=nn(u,l);if(T.result==="error")return T;const y=T.value.expression,w=Sn(y);if(!w&&!wo(l))return b2([new Tn("","data expressions not supported")]);const C=K3(y,["zoom"]);if(!C&&!B0(l))return b2([new Tn("","zoom expressions not supported")]);const A=c4(y);return A||C?A instanceof Tn?b2([A]):A instanceof G1&&!S6(l)?b2([new Tn("",'"interpolate" expressions cannot be used with this property')]):s4(A?new Gs(w?"camera":"composite",T.value,A.labels,A instanceof G1?A.interpolation:void 0):new Eo(w?"constant":"source",T.value)):b2([new Tn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class l4{constructor(l,T){this._parameters=l,this._specification=T,Bn(this,C6(this._parameters,this._specification))}static deserialize(l){return new l4(l._parameters,l._specification)}static serialize(l){return{_parameters:l._parameters,_specification:l._specification}}}function c4(u){let l=null;if(u instanceof Y3)l=c4(u.result);else if(u instanceof qr){for(const T of u.args)if(l=c4(T),l)break}else(u instanceof Y2||u instanceof G1)&&u.input instanceof Ir&&u.input.name==="zoom"&&(l=u);return l instanceof Tn||u.eachChild(T=>{const y=c4(T);y instanceof Tn?l=y:!l&&y?l=new Tn("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):l&&y&&l!==y&&(l=new Tn("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),l}function u4(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(!u4(l)&&typeof l!="boolean")return!1;return!0;default:return!0}}const V6={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function na(u){if(u==null)return{filter:()=>!0,needGeometry:!1};u4(u)||(u=xi(u));const l=nn(u,V6);if(l.result==="error")throw new Error(l.value.map(T=>`${T.key}: ${T.message}`).join(", "));return{filter:(T,y,w)=>l.value.evaluate(T,y,{},w),needGeometry:O6(u)}}function ia(u,l){return u<l?-1:u>l?1:0}function O6(u){if(!Array.isArray(u))return!1;if(u[0]==="within")return!0;for(let l=1;l<u.length;l++)if(O6(u[l]))return!0;return!1}function xi(u){if(!u)return!0;const l=u[0];return u.length<=1?l!=="any":l==="=="?k6(u[1],u[2],"=="):l==="!="?h4(k6(u[1],u[2],"==")):l==="<"||l===">"||l==="<="||l===">="?k6(u[1],u[2],l):l==="any"?(T=u.slice(1),["any"].concat(T.map(xi))):l==="all"?["all"].concat(u.slice(1).map(xi)):l==="none"?["all"].concat(u.slice(1).map(xi).map(h4)):l==="in"?x2(u[1],u.slice(2)):l==="!in"?h4(x2(u[1],u.slice(2))):l==="has"?P6(u[1]):l==="!has"?h4(P6(u[1])):l!=="within"||u;var T}function k6(u,l,T){switch(u){case"$type":return[`filter-type-${T}`,l];case"$id":return[`filter-id-${T}`,l];default:return[`filter-${T}`,u,l]}}function x2(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(T=>typeof T!=typeof l[0])?["filter-in-large",u,["literal",l.sort(ia)]]:["filter-in-small",u,["literal",l]]}}function P6(u){switch(u){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",u]}}function h4(u){return["!",u]}function qa(u){const l=typeof u;if(l==="number"||l==="boolean"||l==="string"||u==null)return JSON.stringify(u);if(Array.isArray(u)){let w="[";for(const C of u)w+=`${qa(C)},`;return`${w}]`}const T=Object.keys(u).sort();let y="{";for(let w=0;w<T.length;w++)y+=`${JSON.stringify(T[w])}:${qa(u[T[w]])},`;return`${y}}`}function I6(u){let l="";for(const T of Pr)l+=`/${qa(u[T])}`;return l}function R6(u){const l=u.value;return l?[new Qe(u.key,l,"constants have been deprecated as of v8")]:[]}function Fn(u){return u instanceof Number||u instanceof String||u instanceof Boolean?u.valueOf():u}function Xo(u){if(Array.isArray(u))return u.map(Xo);if(u instanceof Object&&!(u instanceof Number||u instanceof String||u instanceof Boolean)){const l={};for(const T in u)l[T]=Xo(u[T]);return l}return Fn(u)}function O1(u){const l=u.key,T=u.value,y=u.valueSpec||{},w=u.objectElementValidators||{},C=u.style,A=u.styleSpec,I=u.validateSpec;let D=[];const Z=Kr(T);if(Z!=="object")return[new Qe(l,T,`object expected, ${Z} found`)];for(const X in T){const K=X.split(".")[0],at=y[K]||y["*"];let lt;if(w[K])lt=w[K];else if(y[K])lt=I;else if(w["*"])lt=w["*"];else{if(!y["*"]){D.push(new Qe(l,T[X],`unknown property "${X}"`));continue}lt=I}D=D.concat(lt({key:(l&&`${l}.`)+X,value:T[X],valueSpec:at,style:C,styleSpec:A,object:T,objectKey:X,validateSpec:I},T))}for(const X in y)w[X]||y[X].required&&y[X].default===void 0&&T[X]===void 0&&D.push(new Qe(l,T,`missing required property "${X}"`));return D}function oa(u){const l=u.value,T=u.valueSpec,y=u.style,w=u.styleSpec,C=u.key,A=u.arrayElementValidator||u.validateSpec;if(Kr(l)!=="array")return[new Qe(C,l,`array expected, ${Kr(l)} found`)];if(T.length&&l.length!==T.length)return[new Qe(C,l,`array length ${T.length} expected, length ${l.length} found`)];if(T["min-length"]&&l.length<T["min-length"])return[new Qe(C,l,`array length at least ${T["min-length"]} expected, length ${l.length} found`)];let I={type:T.value,values:T.values};w.$version<7&&(I.function=T.function),Kr(T.value)==="object"&&(I=T.value);let D=[];for(let Z=0;Z<l.length;Z++)D=D.concat(A({array:l,arrayIndex:Z,value:l[Z],valueSpec:I,validateSpec:u.validateSpec,style:y,styleSpec:w,key:`${C}[${Z}]`}));return D}function N6(u){const l=u.key,T=u.value,y=u.valueSpec;let w=Kr(T);return w==="number"&&T!=T&&(w="NaN"),w!=="number"?[new Qe(l,T,`number expected, ${w} found`)]:"minimum"in y&&T<y.minimum?[new Qe(l,T,`${T} is less than the minimum value ${y.minimum}`)]:"maximum"in y&&T>y.maximum?[new Qe(l,T,`${T} is greater than the maximum value ${y.maximum}`)]:[]}function It(u){const l=u.valueSpec,T=Fn(u.value.type);let y,w,C,A={};const I=T!=="categorical"&&u.value.property===void 0,D=!I,Z=Kr(u.value.stops)==="array"&&Kr(u.value.stops[0])==="array"&&Kr(u.value.stops[0][0])==="object",X=O1({key:u.key,value:u.value,valueSpec:u.styleSpec.function,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,objectElementValidators:{stops:function(lt){if(T==="identity")return[new Qe(lt.key,lt.value,'identity function may not have a "stops" property')];let ut=[];const Qt=lt.value;return ut=ut.concat(oa({key:lt.key,value:Qt,valueSpec:lt.valueSpec,validateSpec:lt.validateSpec,style:lt.style,styleSpec:lt.styleSpec,arrayElementValidator:K})),Kr(Qt)==="array"&&Qt.length===0&&ut.push(new Qe(lt.key,Qt,"array must have at least one stop")),ut},default:function(lt){return lt.validateSpec({key:lt.key,value:lt.value,valueSpec:l,validateSpec:lt.validateSpec,style:lt.style,styleSpec:lt.styleSpec})}}});return T==="identity"&&I&&X.push(new Qe(u.key,u.value,'missing required property "property"')),T==="identity"||u.value.stops||X.push(new Qe(u.key,u.value,'missing required property "stops"')),T==="exponential"&&u.valueSpec.expression&&!S6(u.valueSpec)&&X.push(new Qe(u.key,u.value,"exponential functions not supported")),u.styleSpec.$version>=8&&(D&&!wo(u.valueSpec)?X.push(new Qe(u.key,u.value,"property functions not supported")):I&&!B0(u.valueSpec)&&X.push(new Qe(u.key,u.value,"zoom functions not supported"))),T!=="categorical"&&!Z||u.value.property!==void 0||X.push(new Qe(u.key,u.value,'"property" property is required')),X;function K(lt){let ut=[];const Qt=lt.value,bt=lt.key;if(Kr(Qt)!=="array")return[new Qe(bt,Qt,`array expected, ${Kr(Qt)} found`)];if(Qt.length!==2)return[new Qe(bt,Qt,`array length 2 expected, length ${Qt.length} found`)];if(Z){if(Kr(Qt[0])!=="object")return[new Qe(bt,Qt,`object expected, ${Kr(Qt[0])} found`)];if(Qt[0].zoom===void 0)return[new Qe(bt,Qt,"object stop key must have zoom")];if(Qt[0].value===void 0)return[new Qe(bt,Qt,"object stop key must have value")];if(C&&C>Fn(Qt[0].zoom))return[new Qe(bt,Qt[0].zoom,"stop zoom values must appear in ascending order")];Fn(Qt[0].zoom)!==C&&(C=Fn(Qt[0].zoom),w=void 0,A={}),ut=ut.concat(O1({key:`${bt}[0]`,value:Qt[0],valueSpec:{zoom:{}},validateSpec:lt.validateSpec,style:lt.style,styleSpec:lt.styleSpec,objectElementValidators:{zoom:N6,value:at}}))}else ut=ut.concat(at({key:`${bt}[0]`,value:Qt[0],valueSpec:{},validateSpec:lt.validateSpec,style:lt.style,styleSpec:lt.styleSpec},Qt));return fn(Xo(Qt[1]))?ut.concat([new Qe(`${bt}[1]`,Qt[1],"expressions are not allowed in function stops.")]):ut.concat(lt.validateSpec({key:`${bt}[1]`,value:Qt[1],valueSpec:l,validateSpec:lt.validateSpec,style:lt.style,styleSpec:lt.styleSpec}))}function at(lt,ut){const Qt=Kr(lt.value),bt=Fn(lt.value),wt=lt.value!==null?lt.value:ut;if(y){if(Qt!==y)return[new Qe(lt.key,wt,`${Qt} stop domain type must match previous stop domain type ${y}`)]}else y=Qt;if(Qt!=="number"&&Qt!=="string"&&Qt!=="boolean")return[new Qe(lt.key,wt,"stop domain value must be a number, string, or boolean")];if(Qt!=="number"&&T!=="categorical"){let Nt=`number expected, ${Qt} found`;return wo(l)&&T===void 0&&(Nt+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Qe(lt.key,wt,Nt)]}return T!=="categorical"||Qt!=="number"||isFinite(bt)&&Math.floor(bt)===bt?T!=="categorical"&&Qt==="number"&&w!==void 0&&bt<w?[new Qe(lt.key,wt,"stop domain values must appear in ascending order")]:(w=bt,T==="categorical"&&bt in A?[new Qe(lt.key,wt,"stop domain values must be unique")]:(A[bt]=!0,[])):[new Qe(lt.key,wt,`integer expected, found ${bt}`)]}}function te(u){const l=(u.expressionContext==="property"?A6:nn)(Xo(u.value),u.valueSpec);if(l.result==="error")return l.value.map(y=>new Qe(`${u.key}${y.key}`,u.value,y.message));const T=l.value.expression||l.value._styleExpression.expression;if(u.expressionContext==="property"&&u.propertyKey==="text-font"&&!T.outputDefined())return[new Qe(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"&&!K2(T))return[new Qe(u.key,u.value,'"feature-state" data expressions are not supported with layout properties.')];if(u.expressionContext==="filter"&&!K2(T))return[new Qe(u.key,u.value,'"feature-state" data expressions are not supported with filters.')];if(u.expressionContext&&u.expressionContext.indexOf("cluster")===0){if(!K3(T,["zoom","feature-state"]))return[new Qe(u.key,u.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(u.expressionContext==="cluster-initial"&&!Sn(T))return[new Qe(u.key,u.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function He(u){const l=u.key,T=u.value,y=u.valueSpec,w=[];return Array.isArray(y.values)?y.values.indexOf(Fn(T))===-1&&w.push(new Qe(l,T,`expected one of [${y.values.join(", ")}], ${JSON.stringify(T)} found`)):Object.keys(y.values).indexOf(Fn(T))===-1&&w.push(new Qe(l,T,`expected one of [${Object.keys(y.values).join(", ")}], ${JSON.stringify(T)} found`)),w}function nr(u){return u4(Xo(u.value))?te(Bn({},u,{expressionContext:"filter",valueSpec:{value:"boolean"}})):un(u)}function un(u){const l=u.value,T=u.key;if(Kr(l)!=="array")return[new Qe(T,l,`array expected, ${Kr(l)} found`)];const y=u.styleSpec;let w,C=[];if(l.length<1)return[new Qe(T,l,"filter array must have at least 1 element")];switch(C=C.concat(He({key:`${T}[0]`,value:l[0],valueSpec:y.filter_operator,style:u.style,styleSpec:u.styleSpec})),Fn(l[0])){case"<":case"<=":case">":case">=":l.length>=2&&Fn(l[1])==="$type"&&C.push(new Qe(T,l,`"$type" cannot be use with operator "${l[0]}"`));case"==":case"!=":l.length!==3&&C.push(new Qe(T,l,`filter array for operator "${l[0]}" must have 3 elements`));case"in":case"!in":l.length>=2&&(w=Kr(l[1]),w!=="string"&&C.push(new Qe(`${T}[1]`,l[1],`string expected, ${w} found`)));for(let A=2;A<l.length;A++)w=Kr(l[A]),Fn(l[1])==="$type"?C=C.concat(He({key:`${T}[${A}]`,value:l[A],valueSpec:y.geometry_type,style:u.style,styleSpec:u.styleSpec})):w!=="string"&&w!=="number"&&w!=="boolean"&&C.push(new Qe(`${T}[${A}]`,l[A],`string, number, or boolean expected, ${w} found`));break;case"any":case"all":case"none":for(let A=1;A<l.length;A++)C=C.concat(un({key:`${T}[${A}]`,value:l[A],style:u.style,styleSpec:u.styleSpec}));break;case"has":case"!has":w=Kr(l[1]),l.length!==2?C.push(new Qe(T,l,`filter array for "${l[0]}" operator must have 2 elements`)):w!=="string"&&C.push(new Qe(`${T}[1]`,l[1],`string expected, ${w} found`));break;case"within":w=Kr(l[1]),l.length!==2?C.push(new Qe(T,l,`filter array for "${l[0]}" operator must have 2 elements`)):w!=="object"&&C.push(new Qe(`${T}[1]`,l[1],`object expected, ${w} found`))}return C}function Fr(u,l){const T=u.key,y=u.validateSpec,w=u.style,C=u.styleSpec,A=u.value,I=u.objectKey,D=C[`${l}_${u.layerType}`];if(!D)return[];const Z=I.match(/^(.*)-transition$/);if(l==="paint"&&Z&&D[Z[1]]&&D[Z[1]].transition)return y({key:T,value:A,valueSpec:C.transition,style:w,styleSpec:C});const X=u.valueSpec||D[I];if(!X)return[new Qe(T,A,`unknown property "${I}"`)];let K;if(Kr(A)==="string"&&wo(X)&&!X.tokens&&(K=/^{([^}]+)}$/.exec(A)))return[new Qe(T,A,`"${I}" does not support interpolation syntax
|
|
@@ -1716,4 +1724,4 @@ ${e.vs}`,e}setDataProperty(e,r,n){const i=Bt(this,z5).get(+e);i&&(!(r in i)||i[r
|
|
|
1716
1724
|
state: () => new MyClass()
|
|
1717
1725
|
Found in store "${z.$id}".`),v&&o&&r.hydrate&&r.hydrate(z.$state,v),p=!0,f=!0,z}function VLt(t,e,r){let n,i;const o=typeof e=="function";n=t,i=o?r:e;function a(s,d){const p=h.hasInjectionContext();if(s=(process.env.NODE_ENV==="test"&&pc&&pc._testing?null:s)||(p?h.inject(HLt,null):null),s&&AT(s),process.env.NODE_ENV!=="production"&&!pc)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
1718
1726
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
1719
|
-
This will fail in production.`);s=pc,s._s.has(n)||(o?Eb(n,e,i,s):pN(n,i,s),process.env.NODE_ENV!=="production"&&(a._pinia=s));const f=s._s.get(n);if(process.env.NODE_ENV!=="production"&&d){const Q="__hot:"+n,m=o?Eb(Q,e,i,s,!0):pN(Q,_2({},i),s,!0);d._hotUpdate(m),delete s.state.value[Q],s._s.delete(Q)}if(process.env.NODE_ENV!=="production"&&Lb){const Q=h.getCurrentInstance();if(Q&&Q.proxy&&!d){const m=Q.proxy,_="_pStores"in m?m._pStores:m._pStores={};_[n]=f}}return f}return a.$id=n,a}function OLt(t,e){return Array.isArray(e)?e.reduce((r,n)=>(r[n]=function(){return t(this.$pinia)[n]},r),{}):Object.keys(e).reduce((r,n)=>(r[n]=function(){const i=t(this.$pinia),o=e[n];return typeof o=="function"?o.call(this,i):i[o]},r),{})}const kLt=VLt("main",{state:()=>({userProfile:{token:""}}),getters:{userToken(t){return t.userProfile.token}},actions:{setUserToken(t){this.userProfile.token=t}}}),PLt=t=>{let e={lng:0,lat:0},r;return t.type==="Polygon"?r=t.coordinates[0]:r=t.coordinates,t.type!=="Point"?(r.map(n=>{e.lng+=parseFloat(n[0]),e.lat+=parseFloat(n[1])}),e.lng=e.lng/r.length,e.lat=e.lat/r.length):(e.lng+=parseFloat(r[0]),e.lat+=parseFloat(r[1])),e},TN=(t,e)=>{const r=[];let n=t.organs?t.organs:t.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:`${e}.${o.label}`},s=TN(o,a.key);s.length>0&&(a.children=s),r.push(a)}),r},ILt=function(){return{destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0}},RLt={name:"FlatmapVuer",components:{Button:Qo,Col:ga,Loading:EK,Radio:aE,RadioGroup:sE,Row:P2,Select:d5,Dialog:HX,MapSvgIcon:cf.MapSvgIcon,MapSvgSpriteColor:cf.MapSvgSpriteColor,Tooltip:gQ,TreeControls:RE,SelectionsGroup:IE,SvgLegends:NE,ElIconWarningFilled:xx,ElIconArrowDown:d3,ElIconArrowLeft:bx,DrawTool:BE},beforeCreate:function(){this.mapManager=void 0,this.mapImp=void 0,this.setStateRequired=!1},setup(t){return{annotator:h.markRaw(new ELt(`${t.flatmapAPI}annotator`))}},methods:{initialiseDrawing:function(){this.connectionEntry={},this.activeDrawTool=void 0,this.activeDrawMode=void 0,this.drawnCreatedEvent=void 0},cancelDrawnFeature:function(){this.drawnCreatedEvent&&(this.closeTooltip(),this.annotationEntry={...this.drawnCreatedEvent.feature,resourceId:this.serverURL},this.rollbackAnnotationEvent(),this.initialiseDrawing())},connectedFeatureTooltip:function(t){if(this.mapImp)if(t){const e=Number(t);let r={feature:{}};if(e){const n=this.mapImp.featureProperties(e);r.feature=n}else{const n=this.existDrawnFeatures.find(i=>i.id===t.replace(" ",""));r.feature.feature=n}this.checkAndCreatePopups(r)}else this.closeTooltip()},confirmDrawnFeature:function(){this.drawnCreatedEvent&&(this.checkAndCreatePopups(this.drawnCreatedEvent),Object.keys(this.connectionEntry).length>0&&(this.annotationEntry.feature.connection=this.connectionEntry),this.initialiseDrawing())},drawToolbarEvent:function(t){this.closeTooltip(),this.doubleClickedFeature=!1,t==="Delete"?this.activeDrawMode=this.activeDrawMode==="Delete"?void 0:"Delete":t==="Edit"?this.activeDrawMode=this.activeDrawMode==="Edit"?void 0:"Edit":this.activeDrawTool=t,Object.keys(this.annotationEntry).length>0&&!this.featureAnnotationSubmitted&&this.rollbackAnnotationEvent()},drawModeEvent:function(t){this.activeDrawMode==="Edit"&&this.doubleClickedFeature&&(t.feature.feature.geometry.type!=="Point"&&(this.changeAnnotationDrawMode({mode:"direct_select",options:{featureId:t.feature.feature.id}}),this.modifyAnnotationFeature()),this.doubleClickedFeature=!1),this.activeDrawMode==="Delete"&&(this.changeAnnotationDrawMode({mode:"simple_select",options:{featureIds:[t.feature.feature.id]}}),this.modifyAnnotationFeature())},createConnectivityBody:function(){if(Object.keys(this.connectionEntry).length>0){const t=Object.values(this.connectionEntry),e={type:"connectivity",source:t[0],target:t[t.length-1],intermediates:t.filter((r,n)=>n!==0&&n!==t.length-1)};this.annotationEntry.body=e}},changeAnnotationDrawMode:function(t){this.mapImp&&this.mapImp.changeAnnotationDrawMode(t)},clearAnnotationFeature:function(){this.mapImp&&this.existDrawnFeatures.length>0&&this.mapImp.clearAnnotationFeature()},modifyAnnotationFeature:function(){this.mapImp&&this.mapImp.removeAnnotationFeature()},rollbackAnnotationEvent:function(){this.mapImp&&["created","updated","deleted"].includes(this.annotationEntry.type)&&(this.mapImp.rollbackAnnotationEvent(this.annotationEntry),this.annotationEntry={})},commitAnnotationEvent:function(t){this.mapImp&&["created","updated","deleted"].includes(this.annotationEntry.type)&&t&&(this.featureAnnotationSubmitted=!0,this.mapImp.commitAnnotationEvent(this.annotationEntry),this.annotationEntry.type==="deleted"?this.closeTooltip():this.addAnnotationFeature())},fetchAnnotatedItemIds:async function(t=void 0,e=void 0){let r=await this.annotator.annotatedItemIds(this.userToken,this.serverURL,t,e);return"resource"in r&&(r=r.itemIds),r},setFeatureAnnotated:async function(){if(this.mapImp){const t=await this.fetchAnnotatedItemIds();for(const e of t)this.mapImp.setFeatureAnnotated(e)}},fetchDrawnFeatures:async function(t,e){const r=await this.fetchAnnotatedItemIds(t,e);let n=await this.annotator.drawnFeatures(this.userToken,this.serverURL,r);return"resource"in n&&(n=n.features),this.drawnType!=="All tools"&&(n=n.filter(i=>i.geometry.type===this.drawnType)),n},addAnnotationFeature:async function(){if(this.mapImp&&(this.featureAnnotationSubmitted||this.clearAnnotationFeature(),this.drawnType!=="None")){this.featureAnnotationSubmitted||(this.loading=!0);const t=this.annotatedType==="Anyone"?void 0:this.userInformation.orcid?this.userInformation.orcid:"0000-0000-0000-0000",e=this.annotatedType==="Anyone"?void 0:this.annotatedType==="Me",r=await this.fetchDrawnFeatures(t,e);if(this.existDrawnFeatures=r,this.loading=!1,!this.featureAnnotationSubmitted)for(const n of r)this.mapImp.addAnnotationFeature(n)}},showAnnotator:function(t){this.mapImp&&(this.mapImp.showAnnotator(t),this.$el.querySelector(".maplibregl-ctrl-group").style.display="none")},setDrawnType:function(t){this.drawnType=t,this.mapImp&&(this.addAnnotationFeature(),this.initialiseDrawing())},setAnnotatedType:function(t){this.annotatedType=t,this.mapImp&&this.addAnnotationFeature()},setFlightPath3D:function(t){this.flightPath3DRadio=t,this.mapImp&&this.mapImp.enableFlightPaths(t)},viewLatestMap:function(){let t=this.biologicalSex?this.biologicalSex:void 0;this.entry==="NCBITaxon:9606"&&(t="PATO:0000384");const e={entry:this.entry,biologicalSex:t,viewport:this.mapImp.getState()};this.$emit("view-latest-map",e)},backgroundChangeCallback:function(t){this.currentBackground=t,this.mapImp&&this.mapImp.setBackgroundColour(this.currentBackground,1)},processSystems:function(t){if(this.systems.length=0,t&&t.length>0){const e={label:"All",key:"All",children:[]};t.forEach(r=>{const n={colour:r.colour,enabled:r.enabled,label:r.id,key:r.id},i=TN(r,n.key);i.length>0&&(n.children=i),e.children.push(n)}),this.systems.push(e)}},processTaxon:function(t,e){this.taxonConnectivity.length=0,e.forEach(r=>{DE(t,r).then(n=>{const i={taxon:r,label:n};this.taxonConnectivity.push(i)})})},toggleDrawer:function(){this.drawerOpen=!this.drawerOpen},setColour:function(t){this.colourRadio=t,this.mapImp&&this.mapImp.setColour({colour:t,outline:this.outlinesRadio})},setOutlines:function(t){this.outlineRadio=t,this.mapImp&&this.mapImp.setColour({colour:this.colourRadio,outline:t})},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(t){this.mapImp&&this.mapImp.enableCentrelines(t.value)},onSelectionsDataChanged:function(t){this.$emit("pathway-selection-changed",t)},sckanSelected:function(t){this.mapImp&&this.mapImp.enableSckanPath(t.key,t.value)},checkAllSCKAN:function(t){this.mapImp&&t.keys.forEach(e=>this.mapImp.enableSckanPath(e,t.value))},highlightConnectedPaths:async function(t){var e,r;if(this.mapImp){let i=[...this.mapImp.pathModelNodes(t)].map(p=>this.mapImp.featureProperties(p)),o=await this.flatmapQueries.queryForConnectivity(t),a=(r=(e=o==null?void 0:o.ids)==null?void 0:e.dendrites)==null?void 0:r.flat().flat(),s=[],d=!1;i.forEach(p=>{this.mapImp.nodePathModels(p.featureId).forEach(f=>{d=!0,this.mapImp.pathModelNodes(f).forEach(m=>{let _=this.mapImp.featureProperties([m]);if(a.includes(_.models)){d=!1;return}}),d&&s.push(f)})}),this.mapImp.zoomToFeatures(s,{noZoomIn:!0})}},resetMapFilter:function(){const t=this.mapFilters.alert;let e;t.with?t.without||(e={HAS:"alert"}):t.without?e={NOT:{HAS:"alert"}}:e={AND:[{NOT:{HAS:"alert"}},{HAS:"alert"}]},e?this.mapImp.setVisibilityFilter(e):this.mapImp.clearVisibilityFilter()},alertMouseEnterEmitted:function(t){if(this.mapImp)if(t.value){let e;t.key==="alert"?e={HAS:"alert"}:t.key==="withoutAlert"&&(e={NOT:{HAS:"alert"}}),this.mapImp.setVisibilityFilter(e)}else this.resetMapFilter()},alertSelected:function(t){this.mapImp&&(t.key==="alert"?t.value?this.mapFilters.alert.with=!0:this.mapFilters.alert.with=!1:t.key==="withoutAlert"&&(t.value?this.mapFilters.alert.without=!0:this.mapFilters.alert.without=!1),this.resetMapFilter())},checkAllAlerts:function(t){this.mapImp&&(t.value?(this.mapFilters.alert.without=!0,this.mapFilters.alert.with=!0):(this.mapFilters.alert.without=!1,this.mapFilters.alert.with=!1),this.resetMapFilter())},systemSelected:function(t){this.mapImp&&this.mapImp.enableSystem(t.key,t.value)},checkAllSystems:function(t){this.mapImp&&this.systems[0].children.forEach(e=>this.mapImp.enableSystem(e.label,t))},ftuSelected:function(t){this.searchAndShowResult(t,!0)},layersSelected:function(t){this.mapImp&&this.mapImp.enableLayer(t.key,t.value)},checkAllLayers:function(t){this.mapImp&&t.keys.forEach(e=>this.mapImp.enableLayer(e,t.value))},taxonsSelected:function(t){this.mapImp&&this.mapImp.enableConnectivityByTaxonIds(t.key,t.value)},taxonMouseEnterEmitted:function(t){if(this.mapImp)if(t.value){let e=this.mapImp.taxonFeatureIds(t.key);this.mapImp.enableConnectivityByTaxonIds(t.key,t.value),this.mapImp.zoomToGeoJSONFeatures(e,{noZoomIn:!0})}else this.mapImp.selectGeoJSONFeatures("-1"),t.selections.forEach(e=>{let r=t.checked.includes(e.taxon);this.mapImp.enableConnectivityByTaxonIds(e.taxon,r)})},checkAllTaxons:function(t){this.mapImp&&t.keys.forEach(e=>this.mapImp.enableConnectivityByTaxonIds(e,t.value))},pathwaysSelected:function(t){this.mapImp&&this.mapImp.enablePath(t.key,t.value)},checkAllPathways:function(t){this.mapImp&&t.keys.forEach(e=>this.mapImp.enablePath(e,t.value))},enablePanZoomEvents:function(t){this.mapImp.enablePanZoomEvents(t)},annotationEventCallback:function(t,e){if(e.type==="aborted")this.featureAnnotationSubmitted?this.featureAnnotationSubmitted=!1:this.rollbackAnnotationEvent();else if(e.type==="modeChanged")e.feature.mode==="simple_select"&&this.activeDrawTool?this.drawnCreatedEvent||this.initialiseDrawing():e.feature.mode==="direct_select"&&(this.doubleClickedFeature=!0);else if(e.type==="selectionChanged"){if(this.selectedDrawnFeature=e.feature.features.length===0?void 0:e.feature.features[0],t.feature.feature=this.selectedDrawnFeature,!this.activeDrawTool&&(this.connectionEntry={},this.selectedDrawnFeature)){const r=this.existDrawnFeatures.find(n=>n.id===this.selectedDrawnFeature.id);r&&r.connection&&(this.connectionEntry=r.connection),this.drawModeEvent(t)}}else{if(e.type==="created"||e.type==="updated"){e.type==="updated"&&e.feature.action&&(e.positionUpdated=e.feature.action==="move");const r=this.mapImp.refreshAnnotationFeatureGeometry(e.feature);t.feature.feature=r}e.type==="created"?this.drawnCreatedEvent=t:this.checkAndCreatePopups(t)}},eventCallback:function(){return(t,e,...r)=>{if(t==="annotation"){const n={feature:e,userData:r,eventType:t};this.annotationEventCallback(n,e)}else if(t!=="pan-zoom"){const n=e.label,i=[e.models],o=this.entry,a=this.biologicalSex;let s;e.taxons&&(typeof e.taxons!="object"?s=JSON.parse(e.taxons):s=e.taxons);const d={dataset:e.dataset,biologicalSex:a,taxonomy:o,resource:i,label:n,feature:e,userData:r,eventType:t,provenanceTaxonomy:s};if(t==="click"){if(this.featuresAlert=e.alert,this.viewingMode==="Network Discovery")this.highlightConnectedPaths([e.models]);else if(this.currentActive=e.models?e.models:"",this.activeDrawTool&&!this.drawnCreatedEvent){const p=e.featureId||this.existDrawnFeatures.find(f=>f.id===e.id);if(this.activeDrawTool==="LineString"&&p){const f=e.featureId?e.featureId:e.id,Q=e.label?e.label:`Feature ${e.id}`;this.connectionEntry[` ${f}`]=Object.assign({label:Q},Object.fromEntries(Object.entries(e).filter(([m])=>["featureId","models"].includes(m)).map(([m,_])=>[m==="featureId"?"id":m,_])))}}}else t==="mouseenter"&&this.viewingMode!=="Network Discovery"&&(this.currentHover=e.models?e.models:"");e&&e.type!=="marker"&&t==="click"&&this.viewingMode!=="Network Discovery"&&!this.activeDrawTool&&this.checkAndCreatePopups(d),this.$emit("resource-selected",d)}else this.$emit("pan-zoom-callback",e)}},changeViewingMode:function(){this.closeTooltip()},checkAndCreatePopups:async function(t){if(this.viewingMode==="Annotation")t.feature?(this.annotationEntry={...t.feature,resourceId:this.serverURL},t.feature.featureId&&t.feature.models?this.displayTooltip(t.feature.models):t.feature.feature&&(this.activeDrawTool||this.activeDrawMode||Object.keys(this.connectionEntry).length>0?(this.featureAnnotationSubmitted=!1,this.annotationEntry.featureId=t.feature.feature.id,this.activeDrawTool&&this.createConnectivityBody(),this.displayTooltip(t.feature.feature.id,PLt(t.feature.feature.geometry))):this.rollbackAnnotationEvent())):this.annotation={};else{let e=await this.flatmapQueries.retrieveFlatmapKnowledgeForEvent(t);(e[0]||e[1]||t.feature.hyperlinks&&t.feature.hyperlinks.length>0)&&(this.resourceForTooltip=t.resource[0],t.resourceForTooltip=this.resourceForTooltip,this.createTooltipFromNeuronCuration(t))}},popUpCssHacks:function(){const t=document.querySelector(".flatmap-tooltip-popup"),e=document.querySelector(".maplibregl-popup-close-button");t&&(t.style.display="none"),e.style.display="block",this.$refs.tooltip.$el.style.display="flex",e.onclick=()=>{t&&(t.style.display="block")}},closeTooltip:function(){this.$refs.tooltip.$el.style.display="none",document.querySelectorAll(".maplibregl-popup").forEach(t=>{t.style.display="none"})},createTooltipFromNeuronCuration:async function(t){this.tooltipEntry=await this.flatmapQueries.createTooltipData(t),this.displayTooltip(t.resource[0])},showPopup:function(t,e,r){let n=r;this.mapImp&&(n?n.className||(n.className="custom-popup"):n={className:"custom-popup",positionAtLastClick:!0},this.mapImp.showPopup(t,e,n))},showMarkerPopup:function(t,e,r){this.mapImp&&this.mapImp.showMarkerPopup(t,e,r)},closeMinimap:function(){let t=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");this.minimapSmall?(t.classList.add("enlarge"),t.classList.remove("shrink")):(t.classList.add("shrink"),t.classList.remove("enlarge")),this.minimapSmall=!this.minimapSmall},addResizeButtonToMinimap:function(){let t=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");t&&(this.$refs.minimapResize&&this.$refs.minimapResize.$el.parentNode&&this.$refs.minimapResize.$el.parentNode.removeChild(this.$refs.minimapResize.$el),t.appendChild(this.$refs.minimapResize.$el),this.minimapResizeShow=!0)},setHelpMode:function(t){const e=this.hoverVisibilities.length,r=e-1,n=this.hoverVisibilities[this.helpModeActiveIndex];if(n){const i=n==null?void 0:n.refs,o=n==null?void 0:n.ref,a=this.$refs[i||o];if(a){const{parentElement:s,nextElementSibling:d}=a.$el,p=f=>f&&(f.classList.contains("pathway-container")||f.classList.contains("pathway-location"));(p(s)||p(d))&&(this.drawerOpen=!0)}else this.helpModeActiveIndex+=1}t||(this.helpModeActiveIndex=this.helpModeInitialIndex),this.viewingMode!=="Annotation"&&this.helpModeActiveIndex>9&&(this.helpModeActiveIndex=r),t&&this.helpModeActiveIndex>=r&&this.$emit("help-mode-last-item",!0),t&&!this.helpModeDialog?(this.inHelp=!0,this.hoverVisibilities.forEach(i=>{i.value=!0})):t&&this.helpModeDialog&&e>this.helpModeActiveIndex?this.helpModeActiveIndex>-1?(this.closeFlatmapHelpPopup(),setTimeout(()=>{this.inHelp=!1,this.hoverVisibilities.forEach(i=>{i.value=!1}),this.showTooltip(this.helpModeActiveIndex,200)},300)):this.helpModeActiveIndex===-1&&this.openFlatmapHelpPopup():(this.inHelp=!1,this.hoverVisibilities.forEach(i=>{i.value=!1}),this.closeFlatmapHelpPopup())},showTooltip:function(t,e=500){this.inHelp||(clearTimeout(this.tooltipWait[t]),this.tooltipWait[t]=setTimeout(()=>{this.hoverVisibilities[t].value=!0,this.$emit("shown-tooltip")},e))},hideTooltip:function(t,e=500){this.inHelp||(clearTimeout(this.tooltipWait[t]),this.tooltipWait[t]=setTimeout(()=>{this.hoverVisibilities[t].value=!1},e))},displayTooltip:function(t,e=void 0){this.tooltipDisplay=!0;let r,n={className:"flatmapvuer-popover"};e?(r=t,n.annotationFeatureGeometry=e):(r=this.mapImp.modelFeatureIds(t)[0],this.activeDrawTool||(n.positionAtLastClick=!0)),this.disableUI||this.$nextTick(()=>{this.mapImp.showPopup(r,this.$refs.tooltip.$el,n),this.popUpCssHacks()})},openFlatmapHelpPopup:function(){if(this.mapImp){let t=this.mapImp.modelFeatureIds("UBERON:0000948");t&&t.length>0&&(this.mapImp.showPopup(t[0],"Click for more information",{anchor:"top",className:"flatmap-popup-popper"}),this.$emit("shown-map-tooltip"))}},closeFlatmapHelpPopup:function(){this.$el.querySelectorAll(".maplibregl-popup-close-button").forEach(t=>{t.click()})},getLabels:function(){let t=[];if(this.mapImp){let e=this.mapImp.annotations;for(let r of e.values())r.label&&t.push(r.label);return Array.from(new Set(t))}},getState:function(){if(this.mapImp){let t={entry:this.entry,viewport:this.mapImp.getState()};const e=this.mapImp.getIdentifier();return this.biologicalSex?t.biologicalSex=this.biologicalSex:e&&e.biologicalSex&&(t.biologicalSex=e.biologicalSex),e&&e.uuid&&(t.uuid=e.uuid),t}},setState:function(t){t&&(this.mapImp&&t.entry&&this.entry==t.entry&&(!t.biologicalSex||t.biologicalSex===this.biologicalSex)?t.viewport&&this.mapImp.setState(t.viewport):this.createFlatmap(t),this.setStateRequired=!1)},restoreMapState:function(t){t&&(t.viewport&&this.mapImp.setState(t.viewport),t.searchTerm&&this.searchAndShowResult(t.searchTerm,!0))},setFlightPathInfo:function(t){(t===1.6||t>1.6)&&(this.displayFlightPathOption=!0,this.setFlightPath3D(!1))},createFlatmap:function(t){if(!this.mapImp&&!this.loading){this.loading=!0;let e=!1;this.displayMinimap&&(e={position:"top-right"});let r={taxon:this.entry};this.uuid&&(r.uuid=this.uuid),t?t.uuid?r={uuid:t.uuid}:t.entry&&(r.taxon=t.entry,t.biologicalSex?r.biologicalSex=t.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:e}).then(i=>{this.mapImp=i,this.serverURL=this.mapImp.makeServerUrl("").slice(0,-1);let o=this.mapImp.details.version;this.setFlightPathInfo(o),this.onFlatmapReady(),this._stateToBeSet?this.restoreMapState(this._stateToBeSet):this.restoreMapState(t)})}else t&&(this._stateToBeSet={viewport:t.viewport,searchTerm:t.searchTerm},this.mapImp&&!this.loading&&this.restoreMapState(this._stateToBeSet))},computePathControlsMaximumHeight(){const t=this.$refs.display;if(t){const e=getComputedStyle(t),r=parseInt(e.paddingTop)+parseInt(e.paddingBottom),n=t.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 nJ(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.containsAlert="alert"in this.mapImp.featureFilterRanges(),this.addResizeButtonToMinimap(),this.loading=!1,this.computePathControlsMaximumHeight(),this.drawerOpen=!0,this.mapResize(),this.$emit("ready",this)},showMinimap:function(t){this.mapImp&&this.mapImp.showMinimap(t)},showPathwaysDrawer:function(t){this.drawerOpen=t},searchAndShowResult:function(t,e){if(this.mapImp){if(t===void 0||t==="")return this.mapImp.clearSearchResults(),!0;{const r=this.mapImp.search(t);if(r&&r.results&&r.results.length>0){if(this.mapImp.showSearchResults(r),e&&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(t){return this.mapImp?this.mapImp.search(t):[]}},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},helpModeActiveItem:{type:Number,default:0},helpModeDialog:{type:Boolean,default:!1},helpModeLastItem:{type:Boolean,default:!1},helpModeInitialIndex:{type:Number,default:0},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,$annotator:this.annotator,getFeaturesAlert:()=>this.featuresAlert,userApiKey:this.userToken}},data:function(){return{annotationEntry:{},tooltipDisplay:!1,serverURL: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,ref:"zoomInPopover"},{value:!1,ref:"zoomOutPopover"},{value:!1,ref:"zoomFitPopover"},{value:!1,ref:"settingsPopover"},{value:!1,ref:"checkBoxPopover"},{value:!1,ref:"markerPopover"},{value:!1,ref:"warningPopover"},{value:!1,ref:"whatsNewPopover"},{value:!1,ref:"openMapPopover"},{value:!1,ref:"featuredMarkerPopover"},{value:!1,refs:"drawToolPopover",ref:"connectionPopover"},{value:!1,refs:"drawToolPopover",ref:"drawPointPopover"},{value:!1,refs:"drawToolPopover",ref:"drawLinePopover"},{value:!1,refs:"drawToolPopover",ref:"drawPolygonPopover"},{value:!1,refs:"drawToolPopover",ref:"deletePopover"},{value:!1,refs:"drawToolPopover",ref:"editPopover"}],helpModeActiveIndex:this.helpModeInitialIndex,yellowstar:eJ,isFC:!1,inHelp:!1,currentBackground:"white",availableBackground:["white","lightskyblue","black"],loading:!1,flatmapMarker:JY,tooltipEntry:ILt(),connectivityTooltipVisible:!1,drawerOpen:!1,featuresAlert:void 0,flightPath3DRadio:!1,displayFlightPathOption:!1,colourRadio:!0,outlinesRadio:!0,minimapResizeShow:!1,minimapSmall:!1,currentActive:"",selectedDrawnFeature:void 0,currentHover:"",viewingMode:"Exploration",viewingModes:["Annotation","Exploration","Network Discovery"],drawnType:"All tools",drawnTypes:["All tools","Point","LineString","Polygon","None"],annotatedType:"Anyone",annotatedTypes:["Anyone","Me","Others"],openMapRef:void 0,backgroundIconRef:void 0,annotator:void 0,userInformation:void 0,activeDrawTool:void 0,drawnCreatedEvent:void 0,featureAnnotationSubmitted:!1,connectionEntry:{},existDrawnFeatures:[],doubleClickedFeature:!1,activeDrawMode:void 0,drawModes:["Delete","Edit"],containsAlert:!1,alertOptions:[{label:"Display Path With Alerts",key:"alert",enabled:!0},{label:"Display Path Without Alerts",key:"withoutAlert",enabled:!0}],mapFilters:h.markRaw({alert:{with:!0,without:!0}})}},computed:{...OLt(kLt,["userToken"])},watch:{entry:function(){this.state||this.createFlatmap()},helpMode:function(t,e){t!==e&&this.setHelpMode(t)},helpModeActiveItem:function(){this.helpMode&&(this.helpModeActiveIndex+=1,this.setHelpMode(this.helpMode))},state:{handler:function(t,e){t!==e&&(this.mapManager?this.setState(t):this.setStateRequired=!0)},immediate:!0,deep:!0},viewingMode:function(t){t==="Annotation"?(this.loading=!0,this.annotator.authenticate(this.userToken).then(e=>{e.name&&e.email&&(this.showAnnotator(!0),this.userInformation=e,this.setFeatureAnnotated(),this.existDrawnFeatures.length===0&&this.addAnnotationFeature()),this.loading=!1})):this.showAnnotator(!1)},activeDrawMode:function(){this.changeAnnotationDrawMode({mode:"simple_select"}),this.connectionEntry={}},disableUI:function(t){t&&this.closeTooltip()}},mounted:function(){this.openMapRef=h.shallowRef(this.$refs.openMapRef),this.backgroundIconRef=h.shallowRef(this.$refs.backgroundIconRef),this.tooltipWait=[],this.tooltipWait.length=this.hoverVisibilities.length,this.mapManager=new yb(this.flatmapAPI),this.flatmapQueries=new tJ,this.flatmapQueries.initialise(this.flatmapAPI),this.state?this.setStateRequired&&this.setState(this.state):this.renderAtMounted&&this.createFlatmap()}},X2=t=>(h.pushScopeId("data-v-e033db81"),t=t(),h.popScopeId(),t),NLt={class:"flatmap-container",ref:"flatmapContainer","element-loading-text":"Loading...","element-loading-background":"rgba(0, 0, 0, 0.3)"},BLt={style:{height:"100%",width:"100%",position:"relative","overflow-y":"none"}},DLt={style:{height:"100%",width:"100%"},ref:"display"},FLt={class:"beta-popovers"},jLt=X2(()=>h.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1)),zLt=X2(()=>h.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1)),ULt=X2(()=>h.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1)),GLt=X2(()=>h.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1)),ZLt=X2(()=>h.createElementVNode("span",{class:"warning-text"},"Legacy Map",-1)),$Lt={key:1,class:"warning-text"},qLt=X2(()=>h.createElementVNode("span",{class:"warning-text"},"What's new?",-1)),WLt=X2(()=>h.createElementVNode("b",null,"Network discovery mode",-1)),XLt=X2(()=>h.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)),KLt=X2(()=>h.createElementVNode("b",null,"Now can display up to 6 panes",-1)),YLt=X2(()=>h.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)),JLt={class:"bottom-right-control"},txt=X2(()=>h.createElementVNode("div",null,[h.createTextVNode(" Fit to "),h.createElementVNode("br"),h.createTextVNode(" window ")],-1)),ext=["innerHTML"],rxt=["innerHTML"],nxt=["onClick"];function ixt(t,e,r,n,i,o){const a=h.resolveComponent("map-svg-sprite-color"),s=xx,d=F1,p=p5,f=d3,Q=BE,m=h.resolveComponent("map-svg-icon"),_=NE,v=RE,b=IE,M=bx,E=Qo,V=P2,O=ga,R=k9,j=d5,G=aE,z=sE,J=gQ,tt=EE,ot=D9;return h.withDirectives((h.openBlock(),h.createElementBlock("div",NLt,[h.createVNode(a),h.createElementVNode("div",BLt,[h.createElementVNode("div",DLt,null,512),h.withDirectives(h.createElementVNode("div",FLt,[h.createElementVNode("div",null,[h.createVNode(p,{placement:"right","popper-class":"warning-popper flatmap-popper",teleported:!1,visible:t.hoverVisibilities[6].value,ref:"warningPopover"},{reference:h.withCtx(()=>[r.displayWarning?(h.openBlock(),h.createElementBlock("div",{key:0,class:"warning-icon",onMouseover:e[7]||(e[7]=et=>o.showTooltip(6)),onMouseout:e[8]||(e[8]=et=>o.hideTooltip(6))},[h.createVNode(d,null,{default:h.withCtx(()=>[h.createVNode(s)]),_:1}),r.isLegacy?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[ZLt,h.createElementVNode("div",{class:"latest-map-text",onClick:e[6]||(e[6]=(...et)=>o.viewLatestMap&&o.viewLatestMap(...et))}," Click here for the latest map ")],64)):(h.openBlock(),h.createElementBlock("span",$Lt,"Beta"))],32)):h.createCommentVNode("",!0)]),default:h.withCtx(()=>[r.isLegacy?(h.openBlock(),h.createElementBlock("p",{key:0,onMouseover:e[0]||(e[0]=et=>o.showTooltip(6)),onMouseout:e[1]||(e[1]=et=>o.hideTooltip(6))}," This is a legacy map, you may view the latest map instead. ",32)):t.isFC?(h.openBlock(),h.createElementBlock("p",{key:1,onMouseover:e[2]||(e[2]=et=>o.showTooltip(6)),onMouseout:e[3]||(e[3]=et=>o.hideTooltip(6))},[h.createTextVNode(" This map displays the connectivity of individual neurons. Specifically, those which align with (parts of) the neuron populations from the "),jLt,h.createTextVNode(" models available in "),zLt,h.createTextVNode(". ")],32)):(h.openBlock(),h.createElementBlock("p",{key:2,onMouseover:e[4]||(e[4]=et=>o.showTooltip(6)),onMouseout:e[5]||(e[5]=et=>o.hideTooltip(6))},[h.createTextVNode(" This map displays the connectivity of neuron populations. Specifically, those from the primarily rat-based "),ULt,h.createTextVNode(" models available in "),GLt,h.createTextVNode(". New connectivity and species specificity will be added as the SPARC program progresses. ")],32))]),_:1},8,["visible"])]),r.displayLatestChanges?(h.openBlock(),h.createBlock(p,{key:0,placement:"right",teleported:!1,trigger:"manual","popper-class":"warning-popper flatmap-popper",visible:t.hoverVisibilities[7].value,ref:"whatsNewPopover"},{reference:h.withCtx(()=>[r.displayLatestChanges?(h.openBlock(),h.createElementBlock("div",{key:0,class:"latest-changesicon",onMouseover:e[9]||(e[9]=et=>o.showTooltip(7)),onMouseout:e[10]||(e[10]=et=>o.hideTooltip(7))},[h.createVNode(d,null,{default:h.withCtx(()=>[h.createVNode(s)]),_:1}),qLt],32)):h.createCommentVNode("",!0)]),default:h.withCtx(()=>[WLt,XLt,KLt,YLt]),_:1},8,["visible"])):h.createCommentVNode("",!0)],512),[[h.vShow,!r.disableUI]]),h.withDirectives(h.createVNode(d,{class:h.normalizeClass(["minimap-resize",{enlarge:t.minimapSmall,shrink:!t.minimapSmall}]),ref:"minimapResize",onClick:o.closeMinimap},{default:h.withCtx(()=>[h.createVNode(f)]),_:1},8,["class","onClick"]),[[h.vShow,t.minimapResizeShow]]),t.viewingMode==="Annotation"&&t.userInformation&&!r.disableUI?(h.openBlock(),h.createBlock(Q,{key:0,helpMode:r.helpMode,hoverVisibilities:t.hoverVisibilities,flatmapCanvas:this.$el,drawnType:t.drawnType,activeDrawTool:t.activeDrawTool,activeDrawMode:t.activeDrawMode,drawnCreatedEvent:t.drawnCreatedEvent,connectionEntry:t.connectionEntry,onDrawToolbarEvent:o.drawToolbarEvent,onConfirmDrawn:o.confirmDrawnFeature,onCancelDrawn:o.cancelDrawnFeature,onFeatureTooltip:o.connectedFeatureTooltip,onShowTooltip:o.showTooltip,onHideTooltip:o.hideTooltip,ref:"drawToolPopover"},null,8,["helpMode","hoverVisibilities","flatmapCanvas","drawnType","activeDrawTool","activeDrawMode","drawnCreatedEvent","connectionEntry","onDrawToolbarEvent","onConfirmDrawn","onCancelDrawn","onFeatureTooltip","onShowTooltip","onHideTooltip"])):h.createCommentVNode("",!0),h.withDirectives(h.createElementVNode("div",JLt,[h.createVNode(p,{content:"Zoom in",placement:"left",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:t.hoverVisibilities[0].value,ref:"zoomInPopover"},{reference:h.withCtx(()=>[h.createVNode(m,{icon:"zoomIn",class:"icon-button zoomIn",onClick:e[11]||(e[11]=et=>o.zoomIn()),onMouseover:e[12]||(e[12]=et=>o.showTooltip(0)),onMouseout:e[13]||(e[13]=et=>o.hideTooltip(0))})]),_:1},8,["visible"]),h.createVNode(p,{content:"Zoom out",placement:"top-end",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:t.hoverVisibilities[1].value,ref:"zoomOutPopover"},{reference:h.withCtx(()=>[h.createVNode(m,{icon:"zoomOut",class:"icon-button zoomOut",onClick:e[14]||(e[14]=et=>o.zoomOut()),onMouseover:e[15]||(e[15]=et=>o.showTooltip(1)),onMouseout:e[16]||(e[16]=et=>o.hideTooltip(1))})]),_:1},8,["visible"]),h.createVNode(p,{content:"Reset",placement:"top",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:t.hoverVisibilities[2].value,ref:"zoomFitPopover"},{reference:h.withCtx(()=>[h.createVNode(m,{icon:"fitWindow",class:"icon-button fitWindow",onClick:e[17]||(e[17]=et=>o.resetView()),onMouseover:e[18]||(e[18]=et=>o.showTooltip(2)),onMouseout:e[19]||(e[19]=et=>o.hideTooltip(2))})]),default:h.withCtx(()=>[txt]),_:1},8,["visible"])],512),[[h.vShow,!r.disableUI]]),h.createVNode(p,{content:"Change pathway visibility",placement:"right",teleported:!1,trigger:"manual",offset:-18,"popper-class":"flatmap-popper",visible:t.hoverVisibilities[4].value,ref:"checkBoxPopover"},{reference:h.withCtx(()=>[h.withDirectives(h.createElementVNode("div",{class:h.normalizeClass(["pathway-location",{open:t.drawerOpen,close:!t.drawerOpen}])},[h.withDirectives((h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["pathway-container",{open:t.drawerOpen,close:!t.drawerOpen}]),style:h.normalizeStyle({"max-height":t.pathwaysMaxHeight+"px"})},[t.isFC?h.createCommentVNode("",!0):(h.openBlock(),h.createBlock(_,{key:0,class:"svg-legends-container"})),r.showStarInLegend?(h.openBlock(),h.createBlock(p,{key:1,content:"Location of the featured dataset",placement:"right",teleported:!0,trigger:"manual",width:"max-content",offset:-10,"popper-class":"flatmap-popper flatmap-teleport-popper",visible:t.hoverVisibilities[9].value,ref:"featuredMarkerPopover"},{reference:h.withCtx(()=>[h.withDirectives(h.createElementVNode("div",{class:"yellow-star-legend",innerHTML:t.yellowstar,onMouseover:e[20]||(e[20]=et=>o.showTooltip(9)),onMouseout:e[21]||(e[21]=et=>o.hideTooltip(9))},null,40,ext),[[tt,void 0,"featuredMarkerPopover"]])]),_:1},8,["visible"])):h.createCommentVNode("",!0),h.createVNode(p,{content:"Find these markers for data",placement:"right",teleported:!1,width:"max-content",trigger:"manual","popper-class":"flatmap-popper",visible:t.hoverVisibilities[5].value,ref:"markerPopover"},{reference:h.withCtx(()=>[h.withDirectives(h.createElementVNode("div",{class:"flatmap-marker-help",innerHTML:t.flatmapMarker},null,8,rxt),[[h.vShow,t.hoverVisibilities[5].value],[tt,void 0,"markerPopover"]])]),_:1},8,["visible"]),t.isFC&&t.systems&&t.systems.length>0?(h.openBlock(),h.createBlock(v,{key:2,active:t.currentActive,hover:t.currentHover,"tree-data":t.systems,ref:"treeControls",onChanged:o.systemSelected,onCheckAll:o.checkAllSystems,onChangeActive:o.ftuSelected},null,8,["active","hover","tree-data","onChanged","onCheckAll","onChangeActive"])):h.createCommentVNode("",!0),t.containsAlert&&t.alertOptions?(h.openBlock(),h.createBlock(b,{title:"Alert",labelKey:"label",identifierKey:"key",selections:t.alertOptions,onChanged:o.alertSelected,onCheckboxMouseEnter:o.alertMouseEnterEmitted,onSelectionsDataChanged:o.onSelectionsDataChanged,onCheckAll:o.checkAllAlerts,ref:"alertSelection",key:"alertSelection"},null,8,["selections","onChanged","onCheckboxMouseEnter","onSelectionsDataChanged","onCheckAll"])):h.createCommentVNode("",!0),t.pathways&&t.pathways.length>0?(h.openBlock(),h.createBlock(b,{title:"Pathways",labelKey:"label",identifierKey:"type",colourStyle:"line",selections:t.pathways,onChanged:o.pathwaysSelected,onSelectionsDataChanged:o.onSelectionsDataChanged,onCheckAll:o.checkAllPathways,ref:"pathwaysSelection",key:"pathwaysSelection"},null,8,["selections","onChanged","onSelectionsDataChanged","onCheckAll"])):h.createCommentVNode("",!0),!t.isFC&&t.taxonConnectivity&&t.taxonConnectivity.length>0?(h.openBlock(),h.createBlock(b,{title:"Studied in",labelKey:"label",identifierKey:"taxon",helpMessage:"Evidence exists that this set of neuron populations have been studied in the given species.",selections:t.taxonConnectivity,onChanged:o.taxonsSelected,onCheckboxMouseEnter:o.taxonMouseEnterEmitted,onSelectionsDataChanged:o.onSelectionsDataChanged,onCheckAll:o.checkAllTaxons,ref:"taxonSelection",key:"taxonSelection"},null,8,["selections","onChanged","onCheckboxMouseEnter","onSelectionsDataChanged","onCheckAll"])):h.createCommentVNode("",!0),!t.isFC&&t.centreLines&&t.centreLines.length>0?(h.openBlock(),h.createBlock(b,{title:"Nerves",labelKey:"label",identifierKey:"key",selections:t.centreLines,onChanged:o.centreLinesSelected,onSelectionsDataChanged:o.onSelectionsDataChanged,ref:"centrelinesSelection",key:"centrelinesSelection"},null,8,["selections","onChanged","onSelectionsDataChanged"])):h.createCommentVNode("",!0)],6)),[[tt,void 0,"checkBoxPopover"]]),h.createElementVNode("div",{onClick:e[22]||(e[22]=(...et)=>o.toggleDrawer&&o.toggleDrawer(...et)),class:h.normalizeClass(["drawer-button",{open:t.drawerOpen,close:!t.drawerOpen}])},[h.createVNode(d,null,{default:h.withCtx(()=>[h.createVNode(M)]),_:1})],2)],2),[[h.vShow,!r.disableUI]])]),_:1},8,["visible"]),t.openMapRef?(h.openBlock(),h.createBlock(p,{key:1,ref:"open-map-popover","virtual-ref":t.openMapRef,placement:"top-start",width:"136",teleported:!1,trigger:"click","popper-class":"open-map-popper non-selectable","virtual-triggering":""},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.openMapOptions,et=>(h.openBlock(),h.createBlock(V,{key:et.key},{default:h.withCtx(()=>[h.createVNode(E,{type:"primary",plain:"",onClick:Tt=>t.$emit("open-map",et.key)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(et.display),1)]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1},8,["virtual-ref"])):h.createCommentVNode("",!0),h.createVNode(p,{ref:"backgroundPopover","virtual-ref":t.backgroundIconRef,placement:"top-start",width:"200",teleported:!1,trigger:"click","popper-class":"background-popper h-auto","virtual-triggering":""},{default:h.withCtx(()=>[h.createElementVNode("div",null,[h.createVNode(V,{class:"backgroundText"},{default:h.withCtx(()=>[h.createTextVNode("Viewing Mode")]),_:1}),h.createVNode(V,{class:"backgroundControl"},{default:h.withCtx(()=>[h.createVNode(j,{teleported:!1,modelValue:t.viewingMode,"onUpdate:modelValue":e[23]||(e[23]=et=>t.viewingMode=et),onChange:o.changeViewingMode,placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.viewingModes,(et,Tt)=>(h.openBlock(),h.createBlock(R,{key:et+Tt,label:et,value:et},{default:h.withCtx(()=>[h.createVNode(V,null,{default:h.withCtx(()=>[h.createVNode(O,{span:12},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(et),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),t.viewingMode==="Annotation"&&t.userInformation?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createVNode(V,{class:"backgroundText"},{default:h.withCtx(()=>[h.createTextVNode("Drawn By*")]),_:1}),h.createVNode(V,{class:"backgroundControl"},{default:h.withCtx(()=>[h.createVNode(j,{teleported:!1,modelValue:t.drawnType,"onUpdate:modelValue":e[24]||(e[24]=et=>t.drawnType=et),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown",onChange:o.setDrawnType},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.drawnTypes,et=>(h.openBlock(),h.createBlock(R,{key:et,label:et,value:et},{default:h.withCtx(()=>[h.createVNode(V,null,{default:h.withCtx(()=>[h.createVNode(O,{span:12},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(et),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),h.createVNode(V,{class:"backgroundText"},{default:h.withCtx(()=>[h.createTextVNode("Annotated By*")]),_:1}),h.createVNode(V,{class:"backgroundControl"},{default:h.withCtx(()=>[h.createVNode(j,{teleported:!1,modelValue:t.annotatedType,"onUpdate:modelValue":e[25]||(e[25]=et=>t.annotatedType=et),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown",onChange:o.setAnnotatedType},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.annotatedTypes,et=>(h.openBlock(),h.createBlock(R,{key:et,label:et,value:et},{default:h.withCtx(()=>[h.createVNode(V,null,{default:h.withCtx(()=>[h.createVNode(O,{span:12},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(et),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1})],64)):h.createCommentVNode("",!0),t.displayFlightPathOption?(h.openBlock(),h.createBlock(V,{key:1,class:"backgroundSpacer"})):h.createCommentVNode("",!0),t.displayFlightPathOption?(h.openBlock(),h.createBlock(V,{key:2,class:"backgroundText"},{default:h.withCtx(()=>[h.createTextVNode("Flight path display")]),_:1})):h.createCommentVNode("",!0),t.displayFlightPathOption?(h.openBlock(),h.createBlock(V,{key:3,class:"backgroundControl"},{default:h.withCtx(()=>[h.createVNode(z,{modelValue:t.flightPath3DRadio,"onUpdate:modelValue":e[26]||(e[26]=et=>t.flightPath3DRadio=et),class:"flatmap-radio",onChange:o.setFlightPath3D},{default:h.withCtx(()=>[h.createVNode(G,{label:!1},{default:h.withCtx(()=>[h.createTextVNode("2D")]),_:1}),h.createVNode(G,{label:!0},{default:h.withCtx(()=>[h.createTextVNode("3D")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1})):h.createCommentVNode("",!0),h.createVNode(V,{class:"backgroundSpacer"}),h.createVNode(V,{class:"backgroundText"},{default:h.withCtx(()=>[h.createTextVNode("Organs display")]),_:1}),h.createVNode(V,{class:"backgroundControl"},{default:h.withCtx(()=>[h.createVNode(z,{modelValue:t.colourRadio,"onUpdate:modelValue":e[27]||(e[27]=et=>t.colourRadio=et),class:"flatmap-radio",onChange:o.setColour},{default:h.withCtx(()=>[h.createVNode(G,{label:!0},{default:h.withCtx(()=>[h.createTextVNode("Colour")]),_:1}),h.createVNode(G,{label:!1},{default:h.withCtx(()=>[h.createTextVNode("Greyscale")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),h.createVNode(V,{class:"backgroundSpacer"}),h.createVNode(V,{class:"backgroundText"},{default:h.withCtx(()=>[h.createTextVNode("Outlines display")]),_:1}),h.createVNode(V,{class:"backgroundControl"},{default:h.withCtx(()=>[h.createVNode(z,{modelValue:t.outlinesRadio,"onUpdate:modelValue":e[28]||(e[28]=et=>t.outlinesRadio=et),class:"flatmap-radio",onChange:o.setOutlines},{default:h.withCtx(()=>[h.createVNode(G,{label:!0},{default:h.withCtx(()=>[h.createTextVNode("Show")]),_:1}),h.createVNode(G,{label:!1},{default:h.withCtx(()=>[h.createTextVNode("Hide")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),h.createVNode(V,{class:"backgroundSpacer"}),h.createVNode(V,{class:"backgroundText"},{default:h.withCtx(()=>[h.createTextVNode("Change background")]),_:1}),h.createVNode(V,{class:"backgroundControl"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.availableBackground,et=>(h.openBlock(),h.createElementBlock("div",{key:et,class:h.normalizeClass(["backgroundChoice",et,et==t.currentBackground?"active":""]),onClick:Tt=>o.backgroundChangeCallback(et)},null,10,nxt))),128))]),_:1})])]),_:1},8,["virtual-ref"]),h.withDirectives(h.createElementVNode("div",{class:h.normalizeClass(["settings-group",{open:t.drawerOpen,close:!t.drawerOpen}])},[h.createVNode(V,null,{default:h.withCtx(()=>[h.createVNode(p,{visible:t.hoverVisibilities[8].value,content:"Open new map",placement:"right",teleported:!1,"popper-class":"flatmap-popper",ref:"openMapPopover"},{reference:h.withCtx(()=>[r.enableOpenMapUI&&r.openMapOptions.length>0?(h.openBlock(),h.createBlock(m,{key:0,ref:"openMapRef",icon:"openMap",class:"icon-button open-map-button",onMouseover:e[29]||(e[29]=et=>o.showTooltip(8)),onMouseout:e[30]||(e[30]=et=>o.hideTooltip(8))},null,512)):h.createCommentVNode("",!0)]),_:1},8,["visible"])]),_:1}),h.createVNode(V,null,{default:h.withCtx(()=>[h.createVNode(p,{content:"Change settings",placement:"right",visible:t.hoverVisibilities[3].value,teleported:!1,trigger:"manual","popper-class":"flatmap-popper",ref:"settingsPopover"},{reference:h.withCtx(()=>[h.createVNode(m,{ref:"backgroundIconRef",icon:"changeBckgd",class:"icon-button",onMouseover:e[31]||(e[31]=et=>o.showTooltip(3)),onMouseout:e[32]||(e[32]=et=>o.hideTooltip(3))},null,512)]),_:1},8,["visible"])]),_:1})],2),[[h.vShow,!r.disableUI]]),h.withDirectives(h.createVNode(J,{ref:"tooltip",class:"tooltip",annotationEntry:t.annotationEntry,entry:t.tooltipEntry,annotationDisplay:t.viewingMode==="Annotation",onAnnotation:o.commitAnnotationEvent},null,8,["annotationEntry","entry","annotationDisplay","onAnnotation"]),[[h.vShow,t.tooltipDisplay]])])])),[[ot,t.loading]])}const Mb=l2(RLt,[["render",ixt],["__scopeId","data-v-e033db81"]]),fN={"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"},oxt={name:"MultiFlatmapVuer",components:{Col:ga,Row:P2,Option:k9,Select:d5,Popover:p5,FlatmapVuer:Mb},beforeMount(){this._resolveList=[],this._initialised=!1},mounted:function(){this.initialise(),f5.on("onActionClick",t=>{this.resourceSelected(t)}),f5.on("open-pubmed-url",t=>{this.$emit("open-pubmed-url",t)})},methods:{initialise:function(){return new Promise(t=>{this.requireInitialisation?(this.requireInitialisation=!1,fetch(this.flatmapAPI).then(e=>e.json()).then(e=>{Object.keys(this.availableSpecies).forEach(n=>{const i=this.availableSpecies[n].uuid;if(i&&e.map(o=>o.uuid).indexOf(i)>0)this.speciesList[n]=h.reactive(this.availableSpecies[n]);else for(let o=0;o<e.length;o++)if(this.availableSpecies[n].taxo===e[o].taxon)if(this.availableSpecies[n].biologicalSex){if(e[o].biologicalSex&&e[o].biologicalSex===this.availableSpecies[n].biologicalSex){this.speciesList[n]=h.reactive(this.availableSpecies[n]);break}}else{this.speciesList[n]=h.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,t(),this._resolveList.forEach(n=>{n()})})):this._initialised?t():this._resolveList.push(t)})},resourceSelected:function(t){this.$emit("resource-selected",t)},FlatmapReady:function(t){this.$emit("ready",t)},getCurrentFlatmap:function(){return this.$refs[this.activeSpecies][0]},panZoomCallback:function(t){this.$emit("pan-zoom-callback",t)},onSelectionsDataChanged:function(t){this.$emit("pathway-selection-changed",t)},showPopup:function(t,e,r){this.getCurrentFlatmap().showPopup(t,e,r)},showMarkerPopup:function(t,e,r){this.getCurrentFlatmap().showMarkerPopup(t,e,r)},setSpecies:function(t,e,r){if(this.$refs&&t in this.$refs)this.activeSpecies=t,this.$refs[this.activeSpecies][0].createFlatmap(e),this.$emit("flatmapChanged",this.activeSpecies);else if(r){const n=r-1;n>=0&&this.$nextTick(()=>{this.setSpecies(t,e,n)})}},viewLatestMap:function(t){const e=Object.keys(this.speciesList);for(let r=0;r<e.length;r++){const n=this.speciesList[e[r]];if(!n.isLegacy&&n.taxo===t.entry&&n.biologicalSex===t.biologicalSex){this.setSpecies(e[r],t,0);return}}},createLegacyEntry:function(t,e,r){if(r&&e){let n="Legacy";return t.species&&(t.species.slice(0,6)==="Legacy"?n=t.species:n=n+` ${t.species}`),this.speciesList[n]=h.reactive({taxo:e,isLegacy:!0,displayWarning:!0}),{species:n,state:{entry:e,uuid:r,viewport:t.state.viewport,searchTerm:t.state.searchTerm}}}},updateState:function(t){return new Promise(e=>{if(t&&t.state){const r=t.state;if(r.uuid){if(r.entry)return new Promise(()=>{const n=new yb(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(t,r.entry,r.uuid)}).then(o=>{e(o||t)}).catch(()=>{e(t)})})}else if(r.entry){const n=r.entry in fN?fN[r.entry]:void 0,i=this.createLegacyEntry(t,r.entry,n);e(i||t)}}e(t)})},getState:function(){let t={species:this.activeSpecies,state:void 0},e=this.getCurrentFlatmap();return t.state=e.getState(),t},setState:function(t){t&&this.updateState(t).then(e=>{this.initialise().then(()=>{e.species&&e.species!==this.activeSpecies?this.setSpecies(e.species,e.state,5):e.state&&this.getCurrentFlatmap().setState(e.state)})})},activateTooltipByIndex:function(t){return t===this.helpModeActiveItem&&this.helpMode},onHelpModeLastItem:function(t){t&&this.$emit("help-mode-last-item",!0)},onTooltipShown:function(){this.$emit("shown-tooltip")},onMapTooltipShown:function(){this.$emit("shown-map-tooltip")}},props:{initial:{type:String,default:""},minZoom:{type:Number,default:4},renderAtMounted:{type:Boolean,default:!1},helpMode:{type:Boolean,default:!1},helpModeActiveItem:{type:Number,default:0},helpModeDialog:{type:Boolean,default:!1},helpModeLastItem:{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(t){this.setState(t)},immediate:!0,deep:!0}}},axt=t=>(h.pushScopeId("data-v-1075905f"),t=t(),h.popScopeId(),t),sxt={class:"multi-container",ref:"multiContainer"},lxt={key:0,style:{position:"absolute","z-index":"10"}},cxt=axt(()=>h.createElementVNode("div",{class:"species-display-text"},"Species",-1)),uxt={class:"select-box-icon"};function hxt(t,e,r,n,i,o){const a=k9,s=d5,d=p5,p=Mb;return h.openBlock(),h.createElementBlock("div",sxt,[r.disableUI?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("div",lxt,[cxt,h.createVNode(d,{content:"Select a species",placement:"right",trigger:"manual","popper-class":"flatmap-popper flatmap-teleport-popper right-popper",width:"max-content",visible:o.activateTooltipByIndex(0),teleported:!1,ref:"selectPopover"},{reference:h.withCtx(()=>[h.createVNode(s,{id:"flatmap-select",teleported:!1,modelValue:t.activeSpecies,"onUpdate:modelValue":e[0]||(e[0]=f=>t.activeSpecies=f),placeholder:"Select",class:"select-box","popper-class":"flatmap-dropdown",onChange:o.setSpecies},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.speciesList,(f,Q)=>(h.openBlock(),h.createBlock(a,{key:Q,label:Q,value:Q},{default:h.withCtx(()=>[h.createElementVNode("span",uxt,[h.createElementVNode("i",{class:h.normalizeClass(f.iconClass)},null,2)]),h.createTextVNode(" "+h.toDisplayString(Q),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible"])])),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.speciesList,(f,Q)=>h.withDirectives((h.openBlock(),h.createBlock(p,{key:Q,entry:f.taxo,uuid:f.uuid,biologicalSex:f.biologicalSex,displayWarning:f.displayWarning,displayLatestChanges:f.displayLatestChanges,isLegacy:f.isLegacy,ref_for:!0,ref:Q,enableOpenMapUI:r.enableOpenMapUI,openMapOptions:r.openMapOptions,disableUI:r.disableUI,onViewLatestMap:o.viewLatestMap,onResourceSelected:o.resourceSelected,onReady:o.FlatmapReady,onPanZoomCallback:o.panZoomCallback,onOpenMap:e[1]||(e[1]=m=>t.$emit("open-map",m)),onPathwaySelectionChanged:o.onSelectionsDataChanged,minZoom:r.minZoom,helpMode:t.activeSpecies==Q&&r.helpMode,helpModeActiveItem:r.helpModeActiveItem,helpModeDialog:r.helpModeDialog,helpModeInitialIndex:-2,onHelpModeLastItem:o.onHelpModeLastItem,onShownTooltip:o.onTooltipShown,onShownMapTooltip:o.onMapTooltipShown,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","onPathwaySelectionChanged","minZoom","helpMode","helpModeActiveItem","helpModeDialog","onHelpModeLastItem","onShownTooltip","onShownMapTooltip","renderAtMounted","displayMinimap","showStarInLegend","flatmapAPI","sparcAPI"])),[[h.vShow,t.activeSpecies==Q]])),128))],512)}const dxt=l2(oxt,[["render",hxt],["__scopeId","data-v-1075905f"]]),pxt={name:"HelpModeDialog",components:{Button:Qo},props:{multiflatmapRef:{type:Object,default:null},flatmapRef:{type:Object,default:null},scaffoldRef:{type:Object,default:null},lastItem:{type:Boolean,default:!1,required:!1}},mounted:function(){this.toggleHelpModeHighlight(!0),this.toggleTooltipHighlight()},unmounted:function(){this.toggleHelpModeHighlight(!1)},watch:{lastItem:function(t){t&&this.toggleTooltipHighlight()}},methods:{showNext:function(){this.$emit("show-next")},finishHelpMode:function(){this.$emit("finish-help-mode")},toggleTooltipPinHighlight:function(){const t=this.getCurrentFlatmap();this.resetHighlightedItems(),this.$nextTick(()=>{var o;const e=t.querySelectorAll(".maplibregl-marker"),r=t.querySelector(".flatmap-popup-popper"),n=((o=r==null?void 0:r.style)==null?void 0:o.transform)||"",i=this.extractMarkerPosition(n);e.forEach(a=>{const s=a.style.transform;this.extractMarkerPosition(s)===i&&a.classList.add("in-help-highlight")})})},toggleTooltipHighlight:function(){this.resetHighlightedItems(),this.$nextTick(()=>{document.querySelectorAll('.el-popper:not([style*="none"])').forEach(e=>{const r=e.classList.contains("flatmap-popper"),n=e.classList.contains("el-fade-in-linear-enter-active");(r||n)&&this.toggleHighlight(e)})})},toggleHighlight:function(t){const e=(t==null?void 0:t.id)||"",r=document.querySelector(`[aria-describedby="${e}"]`);r&&r.classList.add("in-help-highlight")},resetHighlightedItems:function(){document.querySelectorAll(".in-help-highlight").forEach(e=>{e.classList.remove("in-help-highlight")})},getCurrentScaffold:function(){var e;return((e=this.scaffoldRef)==null?void 0:e.$el)||null},getCurrentMultiflatmap:function(){var e;return((e=this.multiflatmapRef)==null?void 0:e.$el)||null},getCurrentFlatmap:function(){var r;const t=this.flatmapRef||((r=this.multiflatmapRef)==null?void 0:r.getCurrentFlatmap());return(t==null?void 0:t.$el)||null},toggleHelpModeHighlight:function(t){const e=this.getCurrentMultiflatmap(),r=this.getCurrentFlatmap(),n=this.getCurrentScaffold(),i=document.querySelectorAll(".in-help-highlight");e&&(t?e.classList.add("in-help"):e.classList.remove("in-help")),r&&(t?r.classList.add("in-help"):r.classList.remove("in-help")),n&&(t?n.classList.add("in-help"):n.classList.remove("in-help")),t||i.forEach(o=>{o.classList.remove("in-help-highlight")})},extractMarkerPosition:function(t){const e=/translate\((.*?)\)/g,r=t.match(e);return r?r[r.length-1].slice(10,-1):""}}},Hb=t=>(h.pushScopeId("data-v-36354d88"),t=t(),h.popScopeId(),t),Txt=Hb(()=>h.createElementVNode("h4",null,"Help Mode",-1)),fxt=Hb(()=>h.createElementVNode("p",null,[h.createTextVNode(" All caught up! "),h.createElementVNode("br"),h.createTextVNode(" Click 'Help' to restart. ")],-1)),Qxt=Hb(()=>h.createElementVNode("p",null,'Click "Next" to see the next item.',-1));function mxt(t,e,r,n,i,o){const a=Qo;return h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["help-mode-dialog",{finish:r.lastItem}])},[Txt,r.lastItem?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[fxt,h.createElementVNode("div",null,[h.createVNode(a,{class:"button",onClick:o.finishHelpMode},{default:h.withCtx(()=>[h.createTextVNode(" Finish ")]),_:1},8,["onClick"])])],64)):(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[Qxt,h.createElementVNode("div",null,[h.createVNode(a,{class:"button",onClick:o.showNext},{default:h.withCtx(()=>[h.createTextVNode(" Next ")]),_:1},8,["onClick"]),h.createVNode(a,{class:"button secondary",onClick:o.finishHelpMode},{default:h.withCtx(()=>[h.createTextVNode(" Exit Help Mode ")]),_:1},8,["onClick"])])],64))],2)}const gxt=l2(pxt,[["render",mxt],["__scopeId","data-v-36354d88"]]);q1.FlatmapVuer=Mb,q1.HelpModeDialog=gxt,q1.MultiFlatmapVuer=dxt,q1.Tooltip=gQ,Object.defineProperty(q1,Symbol.toStringTag,{value:"Module"})});
|
|
1727
|
+
This will fail in production.`);s=pc,s._s.has(n)||(o?Eb(n,e,i,s):pN(n,i,s),process.env.NODE_ENV!=="production"&&(a._pinia=s));const f=s._s.get(n);if(process.env.NODE_ENV!=="production"&&d){const Q="__hot:"+n,m=o?Eb(Q,e,i,s,!0):pN(Q,_2({},i),s,!0);d._hotUpdate(m),delete s.state.value[Q],s._s.delete(Q)}if(process.env.NODE_ENV!=="production"&&Lb){const Q=h.getCurrentInstance();if(Q&&Q.proxy&&!d){const m=Q.proxy,_="_pStores"in m?m._pStores:m._pStores={};_[n]=f}}return f}return a.$id=n,a}function OLt(t,e){return Array.isArray(e)?e.reduce((r,n)=>(r[n]=function(){return t(this.$pinia)[n]},r),{}):Object.keys(e).reduce((r,n)=>(r[n]=function(){const i=t(this.$pinia),o=e[n];return typeof o=="function"?o.call(this,i):i[o]},r),{})}const kLt=VLt("main",{state:()=>({userProfile:{token:""}}),getters:{userToken(t){return t.userProfile.token}},actions:{setUserToken(t){this.userProfile.token=t}}}),PLt=t=>{let e={lng:0,lat:0},r;return t.type==="Polygon"?r=t.coordinates[0]:r=t.coordinates,t.type!=="Point"?(r.map(n=>{e.lng+=parseFloat(n[0]),e.lat+=parseFloat(n[1])}),e.lng=e.lng/r.length,e.lat=e.lat/r.length):(e.lng+=parseFloat(r[0]),e.lat+=parseFloat(r[1])),e},TN=(t,e)=>{const r=[];let n=t.organs?t.organs:t.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:`${e}.${o.label}`},s=TN(o,a.key);s.length>0&&(a.children=s),r.push(a)}),r},ILt=function(){return{destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0}},RLt={name:"FlatmapVuer",components:{Button:Qo,Col:ga,Loading:EK,Radio:aE,RadioGroup:sE,Row:P2,Select:d5,Dialog:HX,MapSvgIcon:cf.MapSvgIcon,MapSvgSpriteColor:cf.MapSvgSpriteColor,Tooltip:gQ,TreeControls:RE,SelectionsGroup:IE,SvgLegends:NE,ElIconWarningFilled:xx,ElIconArrowDown:d3,ElIconArrowLeft:bx,DrawTool:BE},beforeCreate:function(){this.mapManager=void 0,this.mapImp=void 0,this.setStateRequired=!1},setup(t){return{annotator:h.markRaw(new ELt(`${t.flatmapAPI}annotator`))}},methods:{initialiseDrawing:function(){this.connectionEntry={},this.activeDrawTool=void 0,this.activeDrawMode=void 0,this.drawnCreatedEvent=void 0},cancelDrawnFeature:function(){this.drawnCreatedEvent&&(this.closeTooltip(),this.annotationEntry={...this.drawnCreatedEvent.feature,resourceId:this.serverURL},this.rollbackAnnotationEvent(),this.initialiseDrawing())},connectedFeatureTooltip:function(t){if(this.mapImp)if(t){const e=Number(t);let r={feature:{}};if(e){const n=this.mapImp.featureProperties(e);r.feature=n}else{const n=this.existDrawnFeatures.find(i=>i.id===t.replace(" ",""));r.feature.feature=n}this.checkAndCreatePopups(r)}else this.closeTooltip()},confirmDrawnFeature:function(){this.drawnCreatedEvent&&(this.checkAndCreatePopups(this.drawnCreatedEvent),Object.keys(this.connectionEntry).length>0&&(this.annotationEntry.feature.connection=this.connectionEntry),this.initialiseDrawing())},drawToolbarEvent:function(t){this.closeTooltip(),this.doubleClickedFeature=!1,t==="Delete"?this.activeDrawMode=this.activeDrawMode==="Delete"?void 0:"Delete":t==="Edit"?this.activeDrawMode=this.activeDrawMode==="Edit"?void 0:"Edit":this.activeDrawTool=t,Object.keys(this.annotationEntry).length>0&&!this.featureAnnotationSubmitted&&this.rollbackAnnotationEvent()},drawModeEvent:function(t){this.activeDrawMode==="Edit"&&this.doubleClickedFeature&&(t.feature.feature.geometry.type!=="Point"&&(this.changeAnnotationDrawMode({mode:"direct_select",options:{featureId:t.feature.feature.id}}),this.modifyAnnotationFeature()),this.doubleClickedFeature=!1),this.activeDrawMode==="Delete"&&(this.changeAnnotationDrawMode({mode:"simple_select",options:{featureIds:[t.feature.feature.id]}}),this.modifyAnnotationFeature())},createConnectivityBody:function(){if(Object.keys(this.connectionEntry).length>0){const t=Object.values(this.connectionEntry),e={type:"connectivity",source:t[0],target:t[t.length-1],intermediates:t.filter((r,n)=>n!==0&&n!==t.length-1)};this.annotationEntry.body=e}},changeAnnotationDrawMode:function(t){this.mapImp&&this.mapImp.changeAnnotationDrawMode(t)},clearAnnotationFeature:function(){this.mapImp&&this.existDrawnFeatures.length>0&&this.mapImp.clearAnnotationFeature()},modifyAnnotationFeature:function(){this.mapImp&&this.mapImp.removeAnnotationFeature()},rollbackAnnotationEvent:function(){this.mapImp&&["created","updated","deleted"].includes(this.annotationEntry.type)&&(this.mapImp.rollbackAnnotationEvent(this.annotationEntry),this.annotationEntry={})},commitAnnotationEvent:function(t){this.mapImp&&["created","updated","deleted"].includes(this.annotationEntry.type)&&t&&(this.featureAnnotationSubmitted=!0,this.mapImp.commitAnnotationEvent(this.annotationEntry),this.annotationEntry.type==="deleted"?this.closeTooltip():this.addAnnotationFeature())},fetchAnnotatedItemIds:async function(t=void 0,e=void 0){let r=await this.annotator.annotatedItemIds(this.userToken,this.serverURL,t,e);return"resource"in r&&(r=r.itemIds),r},setFeatureAnnotated:async function(){if(this.mapImp){const t=await this.fetchAnnotatedItemIds();for(const e of t)this.mapImp.setFeatureAnnotated(e)}},fetchDrawnFeatures:async function(t,e){const r=await this.fetchAnnotatedItemIds(t,e);let n=await this.annotator.drawnFeatures(this.userToken,this.serverURL,r);return"resource"in n&&(n=n.features),this.drawnType!=="All tools"&&(n=n.filter(i=>i.geometry.type===this.drawnType)),n},addAnnotationFeature:async function(){if(this.mapImp&&(this.featureAnnotationSubmitted||this.clearAnnotationFeature(),this.drawnType!=="None")){this.featureAnnotationSubmitted||(this.loading=!0);const t=this.annotatedType==="Anyone"?void 0:this.userInformation.orcid?this.userInformation.orcid:"0000-0000-0000-0000",e=this.annotatedType==="Anyone"?void 0:this.annotatedType==="Me",r=await this.fetchDrawnFeatures(t,e);if(this.existDrawnFeatures=r,this.loading=!1,!this.featureAnnotationSubmitted)for(const n of r)this.mapImp.addAnnotationFeature(n)}},showAnnotator:function(t){this.mapImp&&(this.mapImp.showAnnotator(t),this.$el.querySelector(".maplibregl-ctrl-group").style.display="none")},setDrawnType:function(t){this.drawnType=t,this.mapImp&&(this.addAnnotationFeature(),this.initialiseDrawing())},setAnnotatedType:function(t){this.annotatedType=t,this.mapImp&&this.addAnnotationFeature()},setFlightPath3D:function(t){this.flightPath3DRadio=t,this.mapImp&&this.mapImp.enableFlightPaths(t)},viewLatestMap:function(){let t=this.biologicalSex?this.biologicalSex:void 0;this.entry==="NCBITaxon:9606"&&(t="PATO:0000384");const e={entry:this.entry,biologicalSex:t,viewport:this.mapImp.getState()};this.$emit("view-latest-map",e)},backgroundChangeCallback:function(t){this.currentBackground=t,this.mapImp&&this.mapImp.setBackgroundColour(this.currentBackground,1)},processSystems:function(t){if(this.systems.length=0,t&&t.length>0){const e={label:"All",key:"All",children:[]};t.forEach(r=>{const n={colour:r.colour,enabled:r.enabled,label:r.id,key:r.id},i=TN(r,n.key);i.length>0&&(n.children=i),e.children.push(n)}),this.systems.push(e)}},processTaxon:function(t,e){this.taxonConnectivity.length=0,e.forEach(r=>{DE(t,r).then(n=>{const i={taxon:r,label:n};this.taxonConnectivity.push(i)})})},toggleDrawer:function(){this.drawerOpen=!this.drawerOpen},setColour:function(t){this.colourRadio=t,this.mapImp&&this.mapImp.setColour({colour:t,outline:this.outlinesRadio})},setOutlines:function(t){this.outlineRadio=t,this.mapImp&&this.mapImp.setColour({colour:this.colourRadio,outline:t})},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(t){this.mapImp&&this.mapImp.enableCentrelines(t.value)},onSelectionsDataChanged:function(t){this.$emit("pathway-selection-changed",t)},sckanSelected:function(t){this.mapImp&&this.mapImp.enableSckanPath(t.key,t.value)},checkAllSCKAN:function(t){this.mapImp&&t.keys.forEach(e=>this.mapImp.enableSckanPath(e,t.value))},highlightConnectedPaths:async function(t){var e,r;if(this.mapImp){let i=[...this.mapImp.pathModelNodes(t)].map(p=>this.mapImp.featureProperties(p)),o=await this.flatmapQueries.queryForConnectivity(t),a=(r=(e=o==null?void 0:o.ids)==null?void 0:e.dendrites)==null?void 0:r.flat().flat(),s=[],d=!1;i.forEach(p=>{this.mapImp.nodePathModels(p.featureId).forEach(f=>{d=!0,this.mapImp.pathModelNodes(f).forEach(m=>{let _=this.mapImp.featureProperties([m]);if(a.includes(_.models)){d=!1;return}}),d&&s.push(f)})}),this.mapImp.zoomToFeatures(s,{noZoomIn:!0})}},resetMapFilter:function(){const t=this.mapFilters.alert;let e;t.with?t.without||(e={HAS:"alert"}):t.without?e={NOT:{HAS:"alert"}}:e={AND:[{NOT:{HAS:"alert"}},{HAS:"alert"}]},e?this.mapImp.setVisibilityFilter(e):this.mapImp.clearVisibilityFilter()},alertMouseEnterEmitted:function(t){if(this.mapImp)if(t.value){let e;t.key==="alert"?e={HAS:"alert"}:t.key==="withoutAlert"&&(e={NOT:{HAS:"alert"}}),this.mapImp.setVisibilityFilter(e)}else this.resetMapFilter()},alertSelected:function(t){this.mapImp&&(t.key==="alert"?t.value?this.mapFilters.alert.with=!0:this.mapFilters.alert.with=!1:t.key==="withoutAlert"&&(t.value?this.mapFilters.alert.without=!0:this.mapFilters.alert.without=!1),this.resetMapFilter())},checkAllAlerts:function(t){this.mapImp&&(t.value?(this.mapFilters.alert.without=!0,this.mapFilters.alert.with=!0):(this.mapFilters.alert.without=!1,this.mapFilters.alert.with=!1),this.resetMapFilter())},systemSelected:function(t){this.mapImp&&this.mapImp.enableSystem(t.key,t.value)},checkAllSystems:function(t){this.mapImp&&this.systems[0].children.forEach(e=>this.mapImp.enableSystem(e.label,t))},ftuSelected:function(t){this.searchAndShowResult(t,!0)},layersSelected:function(t){this.mapImp&&this.mapImp.enableLayer(t.key,t.value)},checkAllLayers:function(t){this.mapImp&&t.keys.forEach(e=>this.mapImp.enableLayer(e,t.value))},taxonsSelected:function(t){this.mapImp&&this.mapImp.enableConnectivityByTaxonIds(t.key,t.value)},taxonMouseEnterEmitted:function(t){if(this.mapImp)if(t.value){let e=this.mapImp.taxonFeatureIds(t.key);this.mapImp.enableConnectivityByTaxonIds(t.key,t.value),this.mapImp.zoomToGeoJSONFeatures(e,{noZoomIn:!0})}else this.mapImp.selectGeoJSONFeatures("-1"),t.selections.forEach(e=>{let r=t.checked.includes(e.taxon);this.mapImp.enableConnectivityByTaxonIds(e.taxon,r)})},checkAllTaxons:function(t){this.mapImp&&t.keys.forEach(e=>this.mapImp.enableConnectivityByTaxonIds(e,t.value))},pathwaysSelected:function(t){this.mapImp&&this.mapImp.enablePath(t.key,t.value)},checkAllPathways:function(t){this.mapImp&&t.keys.forEach(e=>this.mapImp.enablePath(e,t.value))},enablePanZoomEvents:function(t){this.mapImp.enablePanZoomEvents(t)},annotationEventCallback:function(t,e){if(e.type==="aborted")this.featureAnnotationSubmitted?this.featureAnnotationSubmitted=!1:this.rollbackAnnotationEvent();else if(e.type==="modeChanged")e.feature.mode==="simple_select"&&this.activeDrawTool?this.drawnCreatedEvent||this.initialiseDrawing():e.feature.mode==="direct_select"&&(this.doubleClickedFeature=!0);else if(e.type==="selectionChanged"){if(this.selectedDrawnFeature=e.feature.features.length===0?void 0:e.feature.features[0],t.feature.feature=this.selectedDrawnFeature,!this.activeDrawTool&&(this.connectionEntry={},this.selectedDrawnFeature)){const r=this.existDrawnFeatures.find(n=>n.id===this.selectedDrawnFeature.id);r&&r.connection&&(this.connectionEntry=r.connection),this.drawModeEvent(t)}}else{if(e.type==="created"||e.type==="updated"){e.type==="updated"&&e.feature.action&&(e.positionUpdated=e.feature.action==="move");const r=this.mapImp.refreshAnnotationFeatureGeometry(e.feature);t.feature.feature=r}e.type==="created"?this.drawnCreatedEvent=t:this.checkAndCreatePopups(t)}},eventCallback:function(){return(t,e,...r)=>{if(t==="annotation"){const n={feature:e,userData:r,eventType:t};this.annotationEventCallback(n,e)}else if(t!=="pan-zoom"){const n=e.label,i=[e.models],o=this.entry,a=this.biologicalSex;let s;e.taxons&&(typeof e.taxons!="object"?s=JSON.parse(e.taxons):s=e.taxons);const d={dataset:e.dataset,biologicalSex:a,taxonomy:o,resource:i,label:n,feature:e,userData:r,eventType:t,provenanceTaxonomy:s};if(t==="click"){if(this.featuresAlert=e.alert,this.viewingMode==="Network Discovery")this.highlightConnectedPaths([e.models]);else if(this.currentActive=e.models?e.models:"",this.activeDrawTool&&!this.drawnCreatedEvent){const p=e.featureId||this.existDrawnFeatures.find(f=>f.id===e.id);if(this.activeDrawTool==="LineString"&&p){const f=e.featureId?e.featureId:e.id,Q=e.label?e.label:`Feature ${e.id}`;this.connectionEntry[` ${f}`]=Object.assign({label:Q},Object.fromEntries(Object.entries(e).filter(([m])=>["featureId","models"].includes(m)).map(([m,_])=>[m==="featureId"?"id":m,_])))}}}else t==="mouseenter"&&this.viewingMode!=="Network Discovery"&&(this.currentHover=e.models?e.models:"");e&&e.type!=="marker"&&t==="click"&&this.viewingMode!=="Network Discovery"&&!this.activeDrawTool&&this.checkAndCreatePopups(d),this.$emit("resource-selected",d)}else this.$emit("pan-zoom-callback",e)}},changeViewingMode:function(){this.closeTooltip()},checkAndCreatePopups:async function(t){if(this.viewingMode==="Annotation")t.feature?(this.annotationEntry={...t.feature,resourceId:this.serverURL},t.feature.featureId&&t.feature.models?this.displayTooltip(t.feature.models):t.feature.feature&&(this.activeDrawTool||this.activeDrawMode||Object.keys(this.connectionEntry).length>0?(this.featureAnnotationSubmitted=!1,this.annotationEntry.featureId=t.feature.feature.id,this.activeDrawTool&&this.createConnectivityBody(),this.displayTooltip(t.feature.feature.id,PLt(t.feature.feature.geometry))):this.rollbackAnnotationEvent())):this.annotation={};else{let e=await this.flatmapQueries.retrieveFlatmapKnowledgeForEvent(t);(e[0]||e[1]||t.feature.hyperlinks&&t.feature.hyperlinks.length>0)&&(this.resourceForTooltip=t.resource[0],t.resourceForTooltip=this.resourceForTooltip,this.createTooltipFromNeuronCuration(t))}},popUpCssHacks:function(){const t=document.querySelector(".flatmap-tooltip-popup"),e=document.querySelector(".maplibregl-popup-close-button");t&&(t.style.display="none"),e.style.display="block",this.$refs.tooltip.$el.style.display="flex",e.onclick=()=>{t&&(t.style.display="block")}},closeTooltip:function(){this.$refs.tooltip.$el.style.display="none",document.querySelectorAll(".maplibregl-popup").forEach(t=>{t.style.display="none"})},createTooltipFromNeuronCuration:async function(t){this.tooltipEntry=await this.flatmapQueries.createTooltipData(t),this.displayTooltip(t.resource[0])},showPopup:function(t,e,r){let n=r;this.mapImp&&(n?n.className||(n.className="custom-popup"):n={className:"custom-popup",positionAtLastClick:!0},this.mapImp.showPopup(t,e,n))},showMarkerPopup:function(t,e,r){this.mapImp&&this.mapImp.showMarkerPopup(t,e,r)},closeMinimap:function(){let t=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");this.minimapSmall?(t.classList.add("enlarge"),t.classList.remove("shrink")):(t.classList.add("shrink"),t.classList.remove("enlarge")),this.minimapSmall=!this.minimapSmall},addResizeButtonToMinimap:function(){let t=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");t&&(this.$refs.minimapResize&&this.$refs.minimapResize.$el.parentNode&&this.$refs.minimapResize.$el.parentNode.removeChild(this.$refs.minimapResize.$el),t.appendChild(this.$refs.minimapResize.$el),this.minimapResizeShow=!0)},setHelpMode:function(t){const e=this.hoverVisibilities.length,r=e-1,n=this.hoverVisibilities[this.helpModeActiveIndex];if(n){const i=n==null?void 0:n.refs,o=n==null?void 0:n.ref,a=this.$refs[i||o];if(a){const{parentElement:s,nextElementSibling:d}=a.$el,p=f=>f&&(f.classList.contains("pathway-container")||f.classList.contains("pathway-location"));(p(s)||p(d))&&(this.drawerOpen=!0)}else this.helpModeActiveIndex+=1}t||(this.helpModeActiveIndex=this.helpModeInitialIndex),this.viewingMode!=="Annotation"&&this.helpModeActiveIndex>9&&(this.helpModeActiveIndex=r),t&&this.helpModeActiveIndex>=r&&this.$emit("help-mode-last-item",!0),t&&!this.helpModeDialog?(this.inHelp=!0,this.hoverVisibilities.forEach(i=>{i.value=!0})):t&&this.helpModeDialog&&e>this.helpModeActiveIndex?this.helpModeActiveIndex>-1?(this.closeFlatmapHelpPopup(),setTimeout(()=>{this.inHelp=!1,this.hoverVisibilities.forEach(i=>{i.value=!1}),this.showTooltip(this.helpModeActiveIndex,200)},300)):this.helpModeActiveIndex===-1&&this.openFlatmapHelpPopup():(this.inHelp=!1,this.hoverVisibilities.forEach(i=>{i.value=!1}),this.closeFlatmapHelpPopup())},showTooltip:function(t,e=500){this.inHelp||(clearTimeout(this.tooltipWait[t]),this.tooltipWait[t]=setTimeout(()=>{this.hoverVisibilities[t].value=!0,this.$emit("shown-tooltip")},e))},hideTooltip:function(t,e=500){this.inHelp||(clearTimeout(this.tooltipWait[t]),this.tooltipWait[t]=setTimeout(()=>{this.hoverVisibilities[t].value=!1},e))},displayTooltip:function(t,e=void 0){this.tooltipDisplay=!0;let r,n={className:"flatmapvuer-popover"};e?(r=t,n.annotationFeatureGeometry=e):(r=this.mapImp.modelFeatureIds(t)[0],this.activeDrawTool||(n.positionAtLastClick=!0)),this.disableUI||this.$nextTick(()=>{this.mapImp.showPopup(r,this.$refs.tooltip.$el,n),this.popUpCssHacks()})},openFlatmapHelpPopup:function(){if(this.mapImp){let t=this.mapImp.modelFeatureIds("UBERON:0000948");t&&t.length>0&&(this.mapImp.showPopup(t[0],"Click for more information",{anchor:"top",className:"flatmap-popup-popper"}),this.$emit("shown-map-tooltip"))}},closeFlatmapHelpPopup:function(){this.$el.querySelectorAll(".maplibregl-popup-close-button").forEach(t=>{t.click()})},getLabels:function(){let t=[];if(this.mapImp){let e=this.mapImp.annotations;for(let r of e.values())r.label&&t.push(r.label);return Array.from(new Set(t))}},getState:function(){if(this.mapImp){let t={entry:this.entry,viewport:this.mapImp.getState()};const e=this.mapImp.getIdentifier();return this.biologicalSex?t.biologicalSex=this.biologicalSex:e&&e.biologicalSex&&(t.biologicalSex=e.biologicalSex),e&&e.uuid&&(t.uuid=e.uuid),t}},setState:function(t){t&&(this.mapImp&&t.entry&&this.entry==t.entry&&(!t.biologicalSex||t.biologicalSex===this.biologicalSex)?t.viewport&&this.mapImp.setState(t.viewport):this.createFlatmap(t),this.setStateRequired=!1)},restoreMapState:function(t){t&&(t.viewport&&this.mapImp.setState(t.viewport),t.searchTerm&&this.searchAndShowResult(t.searchTerm,!0))},setFlightPathInfo:function(t){(t===1.6||t>1.6)&&(this.displayFlightPathOption=!0,this.setFlightPath3D(!1))},createFlatmap:function(t){if(!this.mapImp&&!this.loading){this.loading=!0;let e=!1;this.displayMinimap&&(e={position:"top-right"});let r={taxon:this.entry};this.uuid&&(r.uuid=this.uuid),t?t.uuid?r={uuid:t.uuid}:t.entry&&(r.taxon=t.entry,t.biologicalSex?r.biologicalSex=t.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:e}).then(i=>{this.mapImp=i,this.serverURL=this.mapImp.makeServerUrl("").slice(0,-1);let o=this.mapImp.details.version;this.setFlightPathInfo(o),this.onFlatmapReady(),this._stateToBeSet?this.restoreMapState(this._stateToBeSet):this.restoreMapState(t)})}else t&&(this._stateToBeSet={viewport:t.viewport,searchTerm:t.searchTerm},this.mapImp&&!this.loading&&this.restoreMapState(this._stateToBeSet))},computePathControlsMaximumHeight(){const t=this.$refs.display;if(t){const e=getComputedStyle(t),r=parseInt(e.paddingTop)+parseInt(e.paddingBottom),n=t.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 nJ(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.containsAlert="alert"in this.mapImp.featureFilterRanges(),this.addResizeButtonToMinimap(),this.loading=!1,this.computePathControlsMaximumHeight(),this.drawerOpen=!0,this.mapResize(),this.$emit("ready",this)},showMinimap:function(t){this.mapImp&&this.mapImp.showMinimap(t)},showPathwaysDrawer:function(t){this.drawerOpen=t},searchAndShowResult:function(t,e){if(this.mapImp){if(t===void 0||t==="")return this.mapImp.clearSearchResults(),!0;{const r=this.mapImp.search(t);if(r&&r.results&&r.results.length>0){if(this.mapImp.showSearchResults(r),e&&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(t){return this.mapImp?this.mapImp.search(t):[]}},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},helpModeActiveItem:{type:Number,default:0},helpModeDialog:{type:Boolean,default:!1},helpModeLastItem:{type:Boolean,default:!1},helpModeInitialIndex:{type:Number,default:0},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,$annotator:this.annotator,getFeaturesAlert:()=>this.featuresAlert,userApiKey:this.userToken}},data:function(){return{annotationEntry:{},tooltipDisplay:!1,serverURL: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,ref:"zoomInPopover"},{value:!1,ref:"zoomOutPopover"},{value:!1,ref:"zoomFitPopover"},{value:!1,ref:"settingsPopover"},{value:!1,ref:"checkBoxPopover"},{value:!1,ref:"markerPopover"},{value:!1,ref:"warningPopover"},{value:!1,ref:"whatsNewPopover"},{value:!1,ref:"openMapPopover"},{value:!1,ref:"featuredMarkerPopover"},{value:!1,refs:"drawToolPopover",ref:"connectionPopover"},{value:!1,refs:"drawToolPopover",ref:"drawPointPopover"},{value:!1,refs:"drawToolPopover",ref:"drawLinePopover"},{value:!1,refs:"drawToolPopover",ref:"drawPolygonPopover"},{value:!1,refs:"drawToolPopover",ref:"deletePopover"},{value:!1,refs:"drawToolPopover",ref:"editPopover"}],helpModeActiveIndex:this.helpModeInitialIndex,yellowstar:eJ,isFC:!1,inHelp:!1,currentBackground:"white",availableBackground:["white","lightskyblue","black"],loading:!1,flatmapMarker:JY,tooltipEntry:ILt(),connectivityTooltipVisible:!1,drawerOpen:!1,featuresAlert:void 0,flightPath3DRadio:!1,displayFlightPathOption:!1,colourRadio:!0,outlinesRadio:!0,minimapResizeShow:!1,minimapSmall:!1,currentActive:"",selectedDrawnFeature:void 0,currentHover:"",viewingMode:"Exploration",viewingModes:["Annotation","Exploration","Network Discovery"],drawnType:"All tools",drawnTypes:["All tools","Point","LineString","Polygon","None"],annotatedType:"Anyone",annotatedTypes:["Anyone","Me","Others"],openMapRef:void 0,backgroundIconRef:void 0,annotator:void 0,userInformation:void 0,activeDrawTool:void 0,drawnCreatedEvent:void 0,featureAnnotationSubmitted:!1,connectionEntry:{},existDrawnFeatures:[],doubleClickedFeature:!1,activeDrawMode:void 0,drawModes:["Delete","Edit"],containsAlert:!1,alertOptions:[{label:"Display Path With Alerts",key:"alert",enabled:!0},{label:"Display Path Without Alerts",key:"withoutAlert",enabled:!0}],mapFilters:h.markRaw({alert:{with:!0,without:!0}})}},computed:{...OLt(kLt,["userToken"])},watch:{entry:function(){this.state||this.createFlatmap()},helpMode:function(t,e){t!==e&&this.setHelpMode(t)},helpModeActiveItem:function(){this.helpMode&&(this.helpModeActiveIndex+=1,this.setHelpMode(this.helpMode))},state:{handler:function(t,e){t!==e&&(this.mapManager?this.setState(t):this.setStateRequired=!0)},immediate:!0,deep:!0},viewingMode:function(t){t==="Annotation"?(this.loading=!0,this.annotator.authenticate(this.userToken).then(e=>{e.name&&e.email&&(this.showAnnotator(!0),this.userInformation=e,this.setFeatureAnnotated(),this.existDrawnFeatures.length===0&&this.addAnnotationFeature()),this.loading=!1})):this.showAnnotator(!1)},activeDrawMode:function(){this.changeAnnotationDrawMode({mode:"simple_select"}),this.connectionEntry={}},disableUI:function(t){t&&this.closeTooltip()}},mounted:function(){this.openMapRef=h.shallowRef(this.$refs.openMapRef),this.backgroundIconRef=h.shallowRef(this.$refs.backgroundIconRef),this.tooltipWait=[],this.tooltipWait.length=this.hoverVisibilities.length,this.mapManager=new yb(this.flatmapAPI),this.flatmapQueries=new tJ,this.flatmapQueries.initialise(this.flatmapAPI),this.state?this.setStateRequired&&this.setState(this.state):this.renderAtMounted&&this.createFlatmap()}},X2=t=>(h.pushScopeId("data-v-5e4a0727"),t=t(),h.popScopeId(),t),NLt={class:"flatmap-container",ref:"flatmapContainer","element-loading-text":"Loading...","element-loading-background":"rgba(0, 0, 0, 0.3)"},BLt={style:{height:"100%",width:"100%",position:"relative","overflow-y":"none"}},DLt={style:{height:"100%",width:"100%"},ref:"display"},FLt={class:"beta-popovers"},jLt=X2(()=>h.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1)),zLt=X2(()=>h.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1)),ULt=X2(()=>h.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1)),GLt=X2(()=>h.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1)),ZLt=X2(()=>h.createElementVNode("span",{class:"warning-text"},"Legacy Map",-1)),$Lt={key:1,class:"warning-text"},qLt=X2(()=>h.createElementVNode("span",{class:"warning-text"},"What's new?",-1)),WLt=X2(()=>h.createElementVNode("b",null,"Network discovery mode",-1)),XLt=X2(()=>h.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)),KLt=X2(()=>h.createElementVNode("b",null,"Now can display up to 6 panes",-1)),YLt=X2(()=>h.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)),JLt={class:"bottom-right-control"},txt=X2(()=>h.createElementVNode("div",null,[h.createTextVNode(" Fit to "),h.createElementVNode("br"),h.createTextVNode(" window ")],-1)),ext=["innerHTML"],rxt=["innerHTML"],nxt=["onClick"];function ixt(t,e,r,n,i,o){const a=h.resolveComponent("map-svg-sprite-color"),s=xx,d=F1,p=p5,f=d3,Q=BE,m=h.resolveComponent("map-svg-icon"),_=NE,v=RE,b=IE,M=bx,E=Qo,V=P2,O=ga,R=k9,j=d5,G=aE,z=sE,J=gQ,tt=EE,ot=D9;return h.withDirectives((h.openBlock(),h.createElementBlock("div",NLt,[h.createVNode(a),h.createElementVNode("div",BLt,[h.createElementVNode("div",DLt,null,512),h.withDirectives(h.createElementVNode("div",FLt,[h.createElementVNode("div",null,[h.createVNode(p,{placement:"right","popper-class":"warning-popper flatmap-popper",teleported:!1,visible:t.hoverVisibilities[6].value,ref:"warningPopover"},{reference:h.withCtx(()=>[r.displayWarning?(h.openBlock(),h.createElementBlock("div",{key:0,class:"warning-icon",onMouseover:e[7]||(e[7]=et=>o.showTooltip(6)),onMouseout:e[8]||(e[8]=et=>o.hideTooltip(6))},[h.createVNode(d,null,{default:h.withCtx(()=>[h.createVNode(s)]),_:1}),r.isLegacy?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[ZLt,h.createElementVNode("div",{class:"latest-map-text",onClick:e[6]||(e[6]=(...et)=>o.viewLatestMap&&o.viewLatestMap(...et))}," Click here for the latest map ")],64)):(h.openBlock(),h.createElementBlock("span",$Lt,"Beta"))],32)):h.createCommentVNode("",!0)]),default:h.withCtx(()=>[r.isLegacy?(h.openBlock(),h.createElementBlock("p",{key:0,onMouseover:e[0]||(e[0]=et=>o.showTooltip(6)),onMouseout:e[1]||(e[1]=et=>o.hideTooltip(6))}," This is a legacy map, you may view the latest map instead. ",32)):t.isFC?(h.openBlock(),h.createElementBlock("p",{key:1,onMouseover:e[2]||(e[2]=et=>o.showTooltip(6)),onMouseout:e[3]||(e[3]=et=>o.hideTooltip(6))},[h.createTextVNode(" This map displays the connectivity of individual neurons. Specifically, those which align with (parts of) the neuron populations from the "),jLt,h.createTextVNode(" models available in "),zLt,h.createTextVNode(". ")],32)):(h.openBlock(),h.createElementBlock("p",{key:2,onMouseover:e[4]||(e[4]=et=>o.showTooltip(6)),onMouseout:e[5]||(e[5]=et=>o.hideTooltip(6))},[h.createTextVNode(" This map displays the connectivity of neuron populations. Specifically, those from the primarily rat-based "),ULt,h.createTextVNode(" models available in "),GLt,h.createTextVNode(". New connectivity and species specificity will be added as the SPARC program progresses. ")],32))]),_:1},8,["visible"])]),r.displayLatestChanges?(h.openBlock(),h.createBlock(p,{key:0,placement:"right",teleported:!1,trigger:"manual","popper-class":"warning-popper flatmap-popper",visible:t.hoverVisibilities[7].value,ref:"whatsNewPopover"},{reference:h.withCtx(()=>[r.displayLatestChanges?(h.openBlock(),h.createElementBlock("div",{key:0,class:"latest-changesicon",onMouseover:e[9]||(e[9]=et=>o.showTooltip(7)),onMouseout:e[10]||(e[10]=et=>o.hideTooltip(7))},[h.createVNode(d,null,{default:h.withCtx(()=>[h.createVNode(s)]),_:1}),qLt],32)):h.createCommentVNode("",!0)]),default:h.withCtx(()=>[WLt,XLt,KLt,YLt]),_:1},8,["visible"])):h.createCommentVNode("",!0)],512),[[h.vShow,!r.disableUI]]),h.withDirectives(h.createVNode(d,{class:h.normalizeClass(["minimap-resize",{enlarge:t.minimapSmall,shrink:!t.minimapSmall}]),ref:"minimapResize",onClick:o.closeMinimap},{default:h.withCtx(()=>[h.createVNode(f)]),_:1},8,["class","onClick"]),[[h.vShow,t.minimapResizeShow]]),t.viewingMode==="Annotation"&&t.userInformation&&!r.disableUI?(h.openBlock(),h.createBlock(Q,{key:0,helpMode:r.helpMode,hoverVisibilities:t.hoverVisibilities,flatmapCanvas:this.$el,drawnType:t.drawnType,activeDrawTool:t.activeDrawTool,activeDrawMode:t.activeDrawMode,drawnCreatedEvent:t.drawnCreatedEvent,connectionEntry:t.connectionEntry,onDrawToolbarEvent:o.drawToolbarEvent,onConfirmDrawn:o.confirmDrawnFeature,onCancelDrawn:o.cancelDrawnFeature,onFeatureTooltip:o.connectedFeatureTooltip,onShowTooltip:o.showTooltip,onHideTooltip:o.hideTooltip,ref:"drawToolPopover"},null,8,["helpMode","hoverVisibilities","flatmapCanvas","drawnType","activeDrawTool","activeDrawMode","drawnCreatedEvent","connectionEntry","onDrawToolbarEvent","onConfirmDrawn","onCancelDrawn","onFeatureTooltip","onShowTooltip","onHideTooltip"])):h.createCommentVNode("",!0),h.withDirectives(h.createElementVNode("div",JLt,[h.createVNode(p,{content:"Zoom in",placement:"left",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:t.hoverVisibilities[0].value,ref:"zoomInPopover"},{reference:h.withCtx(()=>[h.createVNode(m,{icon:"zoomIn",class:"icon-button zoomIn",onClick:e[11]||(e[11]=et=>o.zoomIn()),onMouseover:e[12]||(e[12]=et=>o.showTooltip(0)),onMouseout:e[13]||(e[13]=et=>o.hideTooltip(0))})]),_:1},8,["visible"]),h.createVNode(p,{content:"Zoom out",placement:"top-end",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:t.hoverVisibilities[1].value,ref:"zoomOutPopover"},{reference:h.withCtx(()=>[h.createVNode(m,{icon:"zoomOut",class:"icon-button zoomOut",onClick:e[14]||(e[14]=et=>o.zoomOut()),onMouseover:e[15]||(e[15]=et=>o.showTooltip(1)),onMouseout:e[16]||(e[16]=et=>o.hideTooltip(1))})]),_:1},8,["visible"]),h.createVNode(p,{content:"Reset",placement:"top",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:t.hoverVisibilities[2].value,ref:"zoomFitPopover"},{reference:h.withCtx(()=>[h.createVNode(m,{icon:"fitWindow",class:"icon-button fitWindow",onClick:e[17]||(e[17]=et=>o.resetView()),onMouseover:e[18]||(e[18]=et=>o.showTooltip(2)),onMouseout:e[19]||(e[19]=et=>o.hideTooltip(2))})]),default:h.withCtx(()=>[txt]),_:1},8,["visible"])],512),[[h.vShow,!r.disableUI]]),h.createVNode(p,{content:"Change pathway visibility",placement:"right",teleported:!1,trigger:"manual",offset:-18,"popper-class":"flatmap-popper",visible:t.hoverVisibilities[4].value,ref:"checkBoxPopover"},{reference:h.withCtx(()=>[h.withDirectives(h.createElementVNode("div",{class:h.normalizeClass(["pathway-location",{open:t.drawerOpen,close:!t.drawerOpen}])},[h.withDirectives((h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["pathway-container",{open:t.drawerOpen,close:!t.drawerOpen}]),style:h.normalizeStyle({"max-height":t.pathwaysMaxHeight+"px"})},[t.isFC?h.createCommentVNode("",!0):(h.openBlock(),h.createBlock(_,{key:0,class:"svg-legends-container"})),r.showStarInLegend?(h.openBlock(),h.createBlock(p,{key:1,content:"Location of the featured dataset",placement:"right",teleported:!0,trigger:"manual",width:"max-content",offset:-10,"popper-class":"flatmap-popper flatmap-teleport-popper",visible:t.hoverVisibilities[9].value,ref:"featuredMarkerPopover"},{reference:h.withCtx(()=>[h.withDirectives(h.createElementVNode("div",{class:"yellow-star-legend",innerHTML:t.yellowstar,onMouseover:e[20]||(e[20]=et=>o.showTooltip(9)),onMouseout:e[21]||(e[21]=et=>o.hideTooltip(9))},null,40,ext),[[tt,void 0,"featuredMarkerPopover"]])]),_:1},8,["visible"])):h.createCommentVNode("",!0),h.createVNode(p,{content:"Find these markers for data. The number inside the markers is the number of datasets available for each marker.",placement:"right",teleported:!1,width:"200",trigger:"manual","popper-class":"flatmap-popper flatmap-marker-popper",visible:t.hoverVisibilities[5].value,ref:"markerPopover"},{reference:h.withCtx(()=>[h.withDirectives(h.createElementVNode("div",{class:"flatmap-marker-help",innerHTML:t.flatmapMarker},null,8,rxt),[[h.vShow,t.hoverVisibilities[5].value],[tt,void 0,"markerPopover"]])]),_:1},8,["visible"]),t.isFC&&t.systems&&t.systems.length>0?(h.openBlock(),h.createBlock(v,{key:2,active:t.currentActive,hover:t.currentHover,"tree-data":t.systems,ref:"treeControls",onChanged:o.systemSelected,onCheckAll:o.checkAllSystems,onChangeActive:o.ftuSelected},null,8,["active","hover","tree-data","onChanged","onCheckAll","onChangeActive"])):h.createCommentVNode("",!0),t.containsAlert&&t.alertOptions?(h.openBlock(),h.createBlock(b,{title:"Alert",labelKey:"label",identifierKey:"key",selections:t.alertOptions,onChanged:o.alertSelected,onCheckboxMouseEnter:o.alertMouseEnterEmitted,onSelectionsDataChanged:o.onSelectionsDataChanged,onCheckAll:o.checkAllAlerts,ref:"alertSelection",key:"alertSelection"},null,8,["selections","onChanged","onCheckboxMouseEnter","onSelectionsDataChanged","onCheckAll"])):h.createCommentVNode("",!0),t.pathways&&t.pathways.length>0?(h.openBlock(),h.createBlock(b,{title:"Pathways",labelKey:"label",identifierKey:"type",colourStyle:"line",selections:t.pathways,onChanged:o.pathwaysSelected,onSelectionsDataChanged:o.onSelectionsDataChanged,onCheckAll:o.checkAllPathways,ref:"pathwaysSelection",key:"pathwaysSelection"},null,8,["selections","onChanged","onSelectionsDataChanged","onCheckAll"])):h.createCommentVNode("",!0),!t.isFC&&t.taxonConnectivity&&t.taxonConnectivity.length>0?(h.openBlock(),h.createBlock(b,{title:"Studied in",labelKey:"label",identifierKey:"taxon",helpMessage:"Evidence exists that this set of neuron populations have been studied in the given species.",selections:t.taxonConnectivity,onChanged:o.taxonsSelected,onCheckboxMouseEnter:o.taxonMouseEnterEmitted,onSelectionsDataChanged:o.onSelectionsDataChanged,onCheckAll:o.checkAllTaxons,ref:"taxonSelection",key:"taxonSelection"},null,8,["selections","onChanged","onCheckboxMouseEnter","onSelectionsDataChanged","onCheckAll"])):h.createCommentVNode("",!0),!t.isFC&&t.centreLines&&t.centreLines.length>0?(h.openBlock(),h.createBlock(b,{title:"Nerves",labelKey:"label",identifierKey:"key",selections:t.centreLines,onChanged:o.centreLinesSelected,onSelectionsDataChanged:o.onSelectionsDataChanged,ref:"centrelinesSelection",key:"centrelinesSelection"},null,8,["selections","onChanged","onSelectionsDataChanged"])):h.createCommentVNode("",!0)],6)),[[tt,void 0,"checkBoxPopover"]]),h.createElementVNode("div",{onClick:e[22]||(e[22]=(...et)=>o.toggleDrawer&&o.toggleDrawer(...et)),class:h.normalizeClass(["drawer-button",{open:t.drawerOpen,close:!t.drawerOpen}])},[h.createVNode(d,null,{default:h.withCtx(()=>[h.createVNode(M)]),_:1})],2)],2),[[h.vShow,!r.disableUI]])]),_:1},8,["visible"]),t.openMapRef?(h.openBlock(),h.createBlock(p,{key:1,ref:"open-map-popover","virtual-ref":t.openMapRef,placement:"top-start",width:"136",teleported:!1,trigger:"click","popper-class":"open-map-popper non-selectable","virtual-triggering":""},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(r.openMapOptions,et=>(h.openBlock(),h.createBlock(V,{key:et.key},{default:h.withCtx(()=>[h.createVNode(E,{type:"primary",plain:"",onClick:Tt=>t.$emit("open-map",et.key)},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(et.display),1)]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1},8,["virtual-ref"])):h.createCommentVNode("",!0),h.createVNode(p,{ref:"backgroundPopover","virtual-ref":t.backgroundIconRef,placement:"top-start",width:"200",teleported:!1,trigger:"click","popper-class":"background-popper h-auto","virtual-triggering":""},{default:h.withCtx(()=>[h.createElementVNode("div",null,[h.createVNode(V,{class:"backgroundText"},{default:h.withCtx(()=>[h.createTextVNode("Viewing Mode")]),_:1}),h.createVNode(V,{class:"backgroundControl"},{default:h.withCtx(()=>[h.createVNode(j,{teleported:!1,modelValue:t.viewingMode,"onUpdate:modelValue":e[23]||(e[23]=et=>t.viewingMode=et),onChange:o.changeViewingMode,placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.viewingModes,(et,Tt)=>(h.openBlock(),h.createBlock(R,{key:et+Tt,label:et,value:et},{default:h.withCtx(()=>[h.createVNode(V,null,{default:h.withCtx(()=>[h.createVNode(O,{span:12},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(et),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),t.viewingMode==="Annotation"&&t.userInformation?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createVNode(V,{class:"backgroundText"},{default:h.withCtx(()=>[h.createTextVNode("Drawn By*")]),_:1}),h.createVNode(V,{class:"backgroundControl"},{default:h.withCtx(()=>[h.createVNode(j,{teleported:!1,modelValue:t.drawnType,"onUpdate:modelValue":e[24]||(e[24]=et=>t.drawnType=et),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown",onChange:o.setDrawnType},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.drawnTypes,et=>(h.openBlock(),h.createBlock(R,{key:et,label:et,value:et},{default:h.withCtx(()=>[h.createVNode(V,null,{default:h.withCtx(()=>[h.createVNode(O,{span:12},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(et),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),h.createVNode(V,{class:"backgroundText"},{default:h.withCtx(()=>[h.createTextVNode("Annotated By*")]),_:1}),h.createVNode(V,{class:"backgroundControl"},{default:h.withCtx(()=>[h.createVNode(j,{teleported:!1,modelValue:t.annotatedType,"onUpdate:modelValue":e[25]||(e[25]=et=>t.annotatedType=et),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown",onChange:o.setAnnotatedType},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.annotatedTypes,et=>(h.openBlock(),h.createBlock(R,{key:et,label:et,value:et},{default:h.withCtx(()=>[h.createVNode(V,null,{default:h.withCtx(()=>[h.createVNode(O,{span:12},{default:h.withCtx(()=>[h.createTextVNode(h.toDisplayString(et),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1})],64)):h.createCommentVNode("",!0),t.displayFlightPathOption?(h.openBlock(),h.createBlock(V,{key:1,class:"backgroundSpacer"})):h.createCommentVNode("",!0),t.displayFlightPathOption?(h.openBlock(),h.createBlock(V,{key:2,class:"backgroundText"},{default:h.withCtx(()=>[h.createTextVNode("Flight path display")]),_:1})):h.createCommentVNode("",!0),t.displayFlightPathOption?(h.openBlock(),h.createBlock(V,{key:3,class:"backgroundControl"},{default:h.withCtx(()=>[h.createVNode(z,{modelValue:t.flightPath3DRadio,"onUpdate:modelValue":e[26]||(e[26]=et=>t.flightPath3DRadio=et),class:"flatmap-radio",onChange:o.setFlightPath3D},{default:h.withCtx(()=>[h.createVNode(G,{label:!1},{default:h.withCtx(()=>[h.createTextVNode("2D")]),_:1}),h.createVNode(G,{label:!0},{default:h.withCtx(()=>[h.createTextVNode("3D")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1})):h.createCommentVNode("",!0),h.createVNode(V,{class:"backgroundSpacer"}),h.createVNode(V,{class:"backgroundText"},{default:h.withCtx(()=>[h.createTextVNode("Organs display")]),_:1}),h.createVNode(V,{class:"backgroundControl"},{default:h.withCtx(()=>[h.createVNode(z,{modelValue:t.colourRadio,"onUpdate:modelValue":e[27]||(e[27]=et=>t.colourRadio=et),class:"flatmap-radio",onChange:o.setColour},{default:h.withCtx(()=>[h.createVNode(G,{label:!0},{default:h.withCtx(()=>[h.createTextVNode("Colour")]),_:1}),h.createVNode(G,{label:!1},{default:h.withCtx(()=>[h.createTextVNode("Greyscale")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),h.createVNode(V,{class:"backgroundSpacer"}),h.createVNode(V,{class:"backgroundText"},{default:h.withCtx(()=>[h.createTextVNode("Outlines display")]),_:1}),h.createVNode(V,{class:"backgroundControl"},{default:h.withCtx(()=>[h.createVNode(z,{modelValue:t.outlinesRadio,"onUpdate:modelValue":e[28]||(e[28]=et=>t.outlinesRadio=et),class:"flatmap-radio",onChange:o.setOutlines},{default:h.withCtx(()=>[h.createVNode(G,{label:!0},{default:h.withCtx(()=>[h.createTextVNode("Show")]),_:1}),h.createVNode(G,{label:!1},{default:h.withCtx(()=>[h.createTextVNode("Hide")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),h.createVNode(V,{class:"backgroundSpacer"}),h.createVNode(V,{class:"backgroundText"},{default:h.withCtx(()=>[h.createTextVNode("Change background")]),_:1}),h.createVNode(V,{class:"backgroundControl"},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.availableBackground,et=>(h.openBlock(),h.createElementBlock("div",{key:et,class:h.normalizeClass(["backgroundChoice",et,et==t.currentBackground?"active":""]),onClick:Tt=>o.backgroundChangeCallback(et)},null,10,nxt))),128))]),_:1})])]),_:1},8,["virtual-ref"]),h.withDirectives(h.createElementVNode("div",{class:h.normalizeClass(["settings-group",{open:t.drawerOpen,close:!t.drawerOpen}])},[h.createVNode(V,null,{default:h.withCtx(()=>[h.createVNode(p,{visible:t.hoverVisibilities[8].value,content:"Open new map",placement:"right",teleported:!1,"popper-class":"flatmap-popper",ref:"openMapPopover"},{reference:h.withCtx(()=>[r.enableOpenMapUI&&r.openMapOptions.length>0?(h.openBlock(),h.createBlock(m,{key:0,ref:"openMapRef",icon:"openMap",class:"icon-button open-map-button",onMouseover:e[29]||(e[29]=et=>o.showTooltip(8)),onMouseout:e[30]||(e[30]=et=>o.hideTooltip(8))},null,512)):h.createCommentVNode("",!0)]),_:1},8,["visible"])]),_:1}),h.createVNode(V,null,{default:h.withCtx(()=>[h.createVNode(p,{content:"Change settings",placement:"right",visible:t.hoverVisibilities[3].value,teleported:!1,trigger:"manual","popper-class":"flatmap-popper",ref:"settingsPopover"},{reference:h.withCtx(()=>[h.createVNode(m,{ref:"backgroundIconRef",icon:"changeBckgd",class:"icon-button",onMouseover:e[31]||(e[31]=et=>o.showTooltip(3)),onMouseout:e[32]||(e[32]=et=>o.hideTooltip(3))},null,512)]),_:1},8,["visible"])]),_:1})],2),[[h.vShow,!r.disableUI]]),h.withDirectives(h.createVNode(J,{ref:"tooltip",class:"tooltip",annotationEntry:t.annotationEntry,entry:t.tooltipEntry,annotationDisplay:t.viewingMode==="Annotation",onAnnotation:o.commitAnnotationEvent},null,8,["annotationEntry","entry","annotationDisplay","onAnnotation"]),[[h.vShow,t.tooltipDisplay]])])])),[[ot,t.loading]])}const Mb=l2(RLt,[["render",ixt],["__scopeId","data-v-5e4a0727"]]),fN={"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"},oxt={name:"MultiFlatmapVuer",components:{Col:ga,Row:P2,Option:k9,Select:d5,Popover:p5,FlatmapVuer:Mb},beforeMount(){this._resolveList=[],this._initialised=!1},mounted:function(){this.initialise(),f5.on("onActionClick",t=>{this.resourceSelected(t)}),f5.on("open-pubmed-url",t=>{this.$emit("open-pubmed-url",t)})},methods:{initialise:function(){return new Promise(t=>{this.requireInitialisation?(this.requireInitialisation=!1,fetch(this.flatmapAPI).then(e=>e.json()).then(e=>{Object.keys(this.availableSpecies).forEach(n=>{const i=this.availableSpecies[n].uuid;if(i&&e.map(o=>o.uuid).indexOf(i)>0)this.speciesList[n]=h.reactive(this.availableSpecies[n]);else for(let o=0;o<e.length;o++)if(this.availableSpecies[n].taxo===e[o].taxon)if(this.availableSpecies[n].biologicalSex){if(e[o].biologicalSex&&e[o].biologicalSex===this.availableSpecies[n].biologicalSex){this.speciesList[n]=h.reactive(this.availableSpecies[n]);break}}else{this.speciesList[n]=h.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,t(),this._resolveList.forEach(n=>{n()})})):this._initialised?t():this._resolveList.push(t)})},resourceSelected:function(t){this.$emit("resource-selected",t)},FlatmapReady:function(t){this.$emit("ready",t)},getCurrentFlatmap:function(){return this.$refs[this.activeSpecies][0]},panZoomCallback:function(t){this.$emit("pan-zoom-callback",t)},onSelectionsDataChanged:function(t){this.$emit("pathway-selection-changed",t)},showPopup:function(t,e,r){this.getCurrentFlatmap().showPopup(t,e,r)},showMarkerPopup:function(t,e,r){this.getCurrentFlatmap().showMarkerPopup(t,e,r)},setSpecies:function(t,e,r){if(this.$refs&&t in this.$refs)this.activeSpecies=t,this.$refs[this.activeSpecies][0].createFlatmap(e),this.$emit("flatmapChanged",this.activeSpecies);else if(r){const n=r-1;n>=0&&this.$nextTick(()=>{this.setSpecies(t,e,n)})}},viewLatestMap:function(t){const e=Object.keys(this.speciesList);for(let r=0;r<e.length;r++){const n=this.speciesList[e[r]];if(!n.isLegacy&&n.taxo===t.entry&&n.biologicalSex===t.biologicalSex){this.setSpecies(e[r],t,0);return}}},createLegacyEntry:function(t,e,r){if(r&&e){let n="Legacy";return t.species&&(t.species.slice(0,6)==="Legacy"?n=t.species:n=n+` ${t.species}`),this.speciesList[n]=h.reactive({taxo:e,isLegacy:!0,displayWarning:!0}),{species:n,state:{entry:e,uuid:r,viewport:t.state.viewport,searchTerm:t.state.searchTerm}}}},updateState:function(t){return new Promise(e=>{if(t&&t.state){const r=t.state;if(r.uuid){if(r.entry)return new Promise(()=>{const n=new yb(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(t,r.entry,r.uuid)}).then(o=>{e(o||t)}).catch(()=>{e(t)})})}else if(r.entry){const n=r.entry in fN?fN[r.entry]:void 0,i=this.createLegacyEntry(t,r.entry,n);e(i||t)}}e(t)})},getState:function(){let t={species:this.activeSpecies,state:void 0},e=this.getCurrentFlatmap();return t.state=e.getState(),t},setState:function(t){t&&this.updateState(t).then(e=>{this.initialise().then(()=>{e.species&&e.species!==this.activeSpecies?this.setSpecies(e.species,e.state,5):e.state&&this.getCurrentFlatmap().setState(e.state)})})},activateTooltipByIndex:function(t){return t===this.helpModeActiveItem&&this.helpMode},onHelpModeLastItem:function(t){t&&this.$emit("help-mode-last-item",!0)},onTooltipShown:function(){this.$emit("shown-tooltip")},onMapTooltipShown:function(){this.$emit("shown-map-tooltip")}},props:{initial:{type:String,default:""},minZoom:{type:Number,default:4},renderAtMounted:{type:Boolean,default:!1},helpMode:{type:Boolean,default:!1},helpModeActiveItem:{type:Number,default:0},helpModeDialog:{type:Boolean,default:!1},helpModeLastItem:{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(t){this.setState(t)},immediate:!0,deep:!0}}},axt=t=>(h.pushScopeId("data-v-1075905f"),t=t(),h.popScopeId(),t),sxt={class:"multi-container",ref:"multiContainer"},lxt={key:0,style:{position:"absolute","z-index":"10"}},cxt=axt(()=>h.createElementVNode("div",{class:"species-display-text"},"Species",-1)),uxt={class:"select-box-icon"};function hxt(t,e,r,n,i,o){const a=k9,s=d5,d=p5,p=Mb;return h.openBlock(),h.createElementBlock("div",sxt,[r.disableUI?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("div",lxt,[cxt,h.createVNode(d,{content:"Select a species",placement:"right",trigger:"manual","popper-class":"flatmap-popper flatmap-teleport-popper right-popper",width:"max-content",visible:o.activateTooltipByIndex(0),teleported:!1,ref:"selectPopover"},{reference:h.withCtx(()=>[h.createVNode(s,{id:"flatmap-select",teleported:!1,modelValue:t.activeSpecies,"onUpdate:modelValue":e[0]||(e[0]=f=>t.activeSpecies=f),placeholder:"Select",class:"select-box","popper-class":"flatmap-dropdown",onChange:o.setSpecies},{default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.speciesList,(f,Q)=>(h.openBlock(),h.createBlock(a,{key:Q,label:Q,value:Q},{default:h.withCtx(()=>[h.createElementVNode("span",uxt,[h.createElementVNode("i",{class:h.normalizeClass(f.iconClass)},null,2)]),h.createTextVNode(" "+h.toDisplayString(Q),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible"])])),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(t.speciesList,(f,Q)=>h.withDirectives((h.openBlock(),h.createBlock(p,{key:Q,entry:f.taxo,uuid:f.uuid,biologicalSex:f.biologicalSex,displayWarning:f.displayWarning,displayLatestChanges:f.displayLatestChanges,isLegacy:f.isLegacy,ref_for:!0,ref:Q,enableOpenMapUI:r.enableOpenMapUI,openMapOptions:r.openMapOptions,disableUI:r.disableUI,onViewLatestMap:o.viewLatestMap,onResourceSelected:o.resourceSelected,onReady:o.FlatmapReady,onPanZoomCallback:o.panZoomCallback,onOpenMap:e[1]||(e[1]=m=>t.$emit("open-map",m)),onPathwaySelectionChanged:o.onSelectionsDataChanged,minZoom:r.minZoom,helpMode:t.activeSpecies==Q&&r.helpMode,helpModeActiveItem:r.helpModeActiveItem,helpModeDialog:r.helpModeDialog,helpModeInitialIndex:-2,onHelpModeLastItem:o.onHelpModeLastItem,onShownTooltip:o.onTooltipShown,onShownMapTooltip:o.onMapTooltipShown,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","onPathwaySelectionChanged","minZoom","helpMode","helpModeActiveItem","helpModeDialog","onHelpModeLastItem","onShownTooltip","onShownMapTooltip","renderAtMounted","displayMinimap","showStarInLegend","flatmapAPI","sparcAPI"])),[[h.vShow,t.activeSpecies==Q]])),128))],512)}const dxt=l2(oxt,[["render",hxt],["__scopeId","data-v-1075905f"]]),pxt={name:"HelpModeDialog",components:{Button:Qo},props:{multiflatmapRef:{type:Object,default:null},flatmapRef:{type:Object,default:null},scaffoldRef:{type:Object,default:null},lastItem:{type:Boolean,default:!1,required:!1}},mounted:function(){this.toggleHelpModeHighlight(!0),this.toggleTooltipHighlight()},unmounted:function(){this.toggleHelpModeHighlight(!1)},watch:{lastItem:function(t){t&&this.toggleTooltipHighlight()}},methods:{showNext:function(){this.$emit("show-next")},finishHelpMode:function(){this.$emit("finish-help-mode")},toggleTooltipPinHighlight:function(){const t=this.getCurrentFlatmap();this.resetHighlightedItems(),this.$nextTick(()=>{var o;const e=t.querySelectorAll(".maplibregl-marker"),r=t.querySelector(".flatmap-popup-popper"),n=((o=r==null?void 0:r.style)==null?void 0:o.transform)||"",i=this.extractMarkerPosition(n);e.forEach(a=>{const s=a.style.transform;this.extractMarkerPosition(s)===i&&a.classList.add("in-help-highlight")})})},toggleTooltipHighlight:function(){this.resetHighlightedItems(),this.$nextTick(()=>{document.querySelectorAll('.el-popper:not([style*="none"])').forEach(e=>{const r=e.classList.contains("flatmap-popper"),n=e.classList.contains("el-fade-in-linear-enter-active");(r||n)&&this.toggleHighlight(e)})})},toggleHighlight:function(t){const e=(t==null?void 0:t.id)||"",r=document.querySelector(`[aria-describedby="${e}"]`);r&&r.classList.add("in-help-highlight")},resetHighlightedItems:function(){document.querySelectorAll(".in-help-highlight").forEach(e=>{e.classList.remove("in-help-highlight")})},getCurrentScaffold:function(){var e;return((e=this.scaffoldRef)==null?void 0:e.$el)||null},getCurrentMultiflatmap:function(){var e;return((e=this.multiflatmapRef)==null?void 0:e.$el)||null},getCurrentFlatmap:function(){var r;const t=this.flatmapRef||((r=this.multiflatmapRef)==null?void 0:r.getCurrentFlatmap());return(t==null?void 0:t.$el)||null},toggleHelpModeHighlight:function(t){const e=this.getCurrentMultiflatmap(),r=this.getCurrentFlatmap(),n=this.getCurrentScaffold(),i=document.querySelectorAll(".in-help-highlight");e&&(t?e.classList.add("in-help"):e.classList.remove("in-help")),r&&(t?r.classList.add("in-help"):r.classList.remove("in-help")),n&&(t?n.classList.add("in-help"):n.classList.remove("in-help")),t||i.forEach(o=>{o.classList.remove("in-help-highlight")})},extractMarkerPosition:function(t){const e=/translate\((.*?)\)/g,r=t.match(e);return r?r[r.length-1].slice(10,-1):""}}},Hb=t=>(h.pushScopeId("data-v-36354d88"),t=t(),h.popScopeId(),t),Txt=Hb(()=>h.createElementVNode("h4",null,"Help Mode",-1)),fxt=Hb(()=>h.createElementVNode("p",null,[h.createTextVNode(" All caught up! "),h.createElementVNode("br"),h.createTextVNode(" Click 'Help' to restart. ")],-1)),Qxt=Hb(()=>h.createElementVNode("p",null,'Click "Next" to see the next item.',-1));function mxt(t,e,r,n,i,o){const a=Qo;return h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["help-mode-dialog",{finish:r.lastItem}])},[Txt,r.lastItem?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[fxt,h.createElementVNode("div",null,[h.createVNode(a,{class:"button",onClick:o.finishHelpMode},{default:h.withCtx(()=>[h.createTextVNode(" Finish ")]),_:1},8,["onClick"])])],64)):(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[Qxt,h.createElementVNode("div",null,[h.createVNode(a,{class:"button",onClick:o.showNext},{default:h.withCtx(()=>[h.createTextVNode(" Next ")]),_:1},8,["onClick"]),h.createVNode(a,{class:"button secondary",onClick:o.finishHelpMode},{default:h.withCtx(()=>[h.createTextVNode(" Exit Help Mode ")]),_:1},8,["onClick"])])],64))],2)}const gxt=l2(pxt,[["render",mxt],["__scopeId","data-v-36354d88"]]);q1.FlatmapVuer=Mb,q1.HelpModeDialog=gxt,q1.MultiFlatmapVuer=dxt,q1.Tooltip=gQ,Object.defineProperty(q1,Symbol.toStringTag,{value:"Module"})});
|