@abi-software/mapintegratedvuer 0.7.0-annotator.1 → 0.7.0-annotator.2
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/mapintegratedvuer.js +84 -74
- package/dist/mapintegratedvuer.umd.cjs +3 -3
- package/dist/style.css +1 -1
- package/package.json +2 -2
@@ -497,7 +497,7 @@ usage: app.provide(ID_INJECTION_KEY, {
|
|
497
497
|
z-index:-1000 !important;
|
498
498
|
top:0 !important;
|
499
499
|
right:0 !important;
|
500
|
-
`,GTt=["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 WTt(e){const t=window.getComputedStyle(e),r=t.getPropertyValue("box-sizing"),n=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),i=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:GTt.map(o=>`${o}:${t.getPropertyValue(o)}`).join(";"),paddingSize:n,borderSize:i,boxSizing:r}}function Q8e(e,t=1,r){var n;a3||(a3=document.createElement("textarea"),document.body.appendChild(a3));const{paddingSize:i,borderSize:o,boxSizing:s,contextStyle:l}=WTt(e);a3.setAttribute("style",`${l};${UTt}`),a3.value=e.value||e.placeholder||"";let c=a3.scrollHeight;const u={};s==="border-box"?c=c+o:s==="content-box"&&(c=c-i),a3.value="";const d=a3.scrollHeight-i;if(Nl(t)){let h=d*t;s==="border-box"&&(h=h+i+o),c=Math.max(h,c),u.minHeight=`${h}px`}if(Nl(r)){let h=d*r;s==="border-box"&&(h=h+i+o),c=Math.min(h,c)}return u.height=`${c}px`,(n=a3.parentNode)==null||n.removeChild(a3),a3=void 0,u}const qTt=Lo({id:{type:String,default:void 0},size:z5,disabled:Boolean,modelValue:{type:di([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:di([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:sf},prefixIcon:{type:sf},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:di([Object,Array,String]),default:()=>BT({})},autofocus:{type:Boolean,default:!1}}),ZTt={[vs]:e=>Rl(e),input:e=>Rl(e),change:e=>Rl(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},XTt=["role"],KTt=["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus"],YTt=["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus"],JTt=a.defineComponent({name:"ElInput",inheritAttrs:!1}),$Tt=a.defineComponent({...JTt,props:qTt,emits:ZTt,setup(e,{expose:t,emit:r}){const n=e,i=a.useAttrs(),o=a.useSlots(),s=a.computed(()=>{const _e={};return n.containerRole==="combobox"&&(_e["aria-haspopup"]=i["aria-haspopup"],_e["aria-owns"]=i["aria-owns"],_e["aria-expanded"]=i["aria-expanded"]),_e}),l=a.computed(()=>[n.type==="textarea"?T.b():g.b(),g.m(f.value),g.is("disabled",m.value),g.is("exceed",me.value),{[g.b("group")]:o.prepend||o.append,[g.bm("group","append")]:o.append,[g.bm("group","prepend")]:o.prepend,[g.m("prefix")]:o.prefix||n.prefixIcon,[g.m("suffix")]:o.suffix||n.suffixIcon||n.clearable||n.showPassword,[g.bm("suffix","password-clear")]:U.value&&K.value},i.class]),c=a.computed(()=>[g.e("wrapper"),g.is("focus",O.value)]),u=J9t({excludeKeys:a.computed(()=>Object.keys(s.value))}),{form:d,formItem:h}=U5(),{inputId:p}=qT(n,{formItemContext:h}),f=j5(),m=WT(),g=xi("input"),T=xi("textarea"),y=a.shallowRef(),v=a.shallowRef(),_=a.ref(!1),b=a.ref(!1),L=a.ref(!1),w=a.ref(),M=a.shallowRef(n.inputStyle),C=a.computed(()=>y.value||v.value),{wrapperRef:A,isFocused:O,handleFocus:V,handleBlur:H}=JX(C,{afterBlur(){var _e;n.validateEvent&&((_e=h==null?void 0:h.validate)==null||_e.call(h,"blur").catch(qe=>Bl(qe)))}}),N=a.computed(()=>{var _e;return(_e=d==null?void 0:d.statusIcon)!=null?_e:!1}),D=a.computed(()=>(h==null?void 0:h.validateState)||""),j=a.computed(()=>D.value&&Ame[D.value]),G=a.computed(()=>L.value?j9t:N9t),R=a.computed(()=>[i.style]),Z=a.computed(()=>[n.inputStyle,M.value,{resize:n.resize}]),X=a.computed(()=>N5(n.modelValue)?"":String(n.modelValue)),U=a.computed(()=>n.clearable&&!m.value&&!n.readonly&&!!X.value&&(O.value||_.value)),K=a.computed(()=>n.showPassword&&!m.value&&!n.readonly&&!!X.value&&(!!X.value||O.value)),$=a.computed(()=>n.showWordLimit&&!!n.maxlength&&(n.type==="text"||n.type==="textarea")&&!m.value&&!n.readonly&&!n.showPassword),le=a.computed(()=>X.value.length),me=a.computed(()=>!!$.value&&le.value>Number(n.maxlength)),ge=a.computed(()=>!!o.suffix||!!n.suffixIcon||U.value||n.showPassword||$.value||!!D.value&&N.value),[ae,Qe]=HTt(y);J4(v,_e=>{if(de(),!$.value||n.resize!=="both")return;const qe=_e[0],{width:at}=qe.contentRect;w.value={right:`calc(100% - ${at+15+6}px)`}});const ne=()=>{const{type:_e,autosize:qe}=n;if(!(!Ts||_e!=="textarea"||!v.value))if(qe){const at=B1(qe)?qe.minRows:void 0,ht=B1(qe)?qe.maxRows:void 0,zt=Q8e(v.value,at,ht);M.value={overflowY:"hidden",...zt},a.nextTick(()=>{v.value.offsetHeight,M.value=zt})}else M.value={minHeight:Q8e(v.value).minHeight}},de=(_e=>{let qe=!1;return()=>{var at;qe||!n.autosize||((at=v.value)==null?void 0:at.offsetParent)===null||(_e(),qe=!0)}})(ne),ie=()=>{const _e=C.value,qe=n.formatter?n.formatter(X.value):X.value;!_e||_e.value===qe||(_e.value=qe)},Te=async _e=>{ae();let{value:qe}=_e.target;if(n.formatter&&(qe=n.parser?n.parser(qe):qe),!b.value){if(qe===X.value){ie();return}r(vs,qe),r("input",qe),await a.nextTick(),ie(),Qe()}},Se=_e=>{r("change",_e.target.value)},Ie=_e=>{r("compositionstart",_e),b.value=!0},Ge=_e=>{var qe;r("compositionupdate",_e);const at=(qe=_e.target)==null?void 0:qe.value,ht=at[at.length-1]||"";b.value=!Pme(ht)},je=_e=>{r("compositionend",_e),b.value&&(b.value=!1,Te(_e))},rt=()=>{L.value=!L.value,Me()},Me=async()=>{var _e;await a.nextTick(),(_e=C.value)==null||_e.focus()},Be=()=>{var _e;return(_e=C.value)==null?void 0:_e.blur()},ut=_e=>{_.value=!1,r("mouseleave",_e)},et=_e=>{_.value=!0,r("mouseenter",_e)},yt=_e=>{r("keydown",_e)},At=()=>{var _e;(_e=C.value)==null||_e.select()},vt=()=>{r(vs,""),r("change",""),r("clear"),r("input","")};return a.watch(()=>n.modelValue,()=>{var _e;a.nextTick(()=>ne()),n.validateEvent&&((_e=h==null?void 0:h.validate)==null||_e.call(h,"change").catch(qe=>Bl(qe)))}),a.watch(X,()=>ie()),a.watch(()=>n.type,async()=>{await a.nextTick(),ie(),ne()}),a.onMounted(()=>{!n.formatter&&n.parser&&Bl("ElInput","If you set the parser, you also need to set the formatter."),ie(),a.nextTick(ne)}),t({input:y,textarea:v,ref:C,textareaStyle:Z,autosize:a.toRef(n,"autosize"),focus:Me,blur:Be,select:At,clear:vt,resizeTextarea:ne}),(_e,qe)=>a.withDirectives((a.openBlock(),a.createElementBlock("div",a.mergeProps(a.unref(s),{class:a.unref(l),style:a.unref(R),role:_e.containerRole,onMouseenter:et,onMouseleave:ut}),[a.createCommentVNode(" input "),_e.type!=="textarea"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createCommentVNode(" prepend slot "),_e.$slots.prepend?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(a.unref(g).be("group","prepend"))},[a.renderSlot(_e.$slots,"prepend")],2)):a.createCommentVNode("v-if",!0),a.createElementVNode("div",{ref_key:"wrapperRef",ref:A,class:a.normalizeClass(a.unref(c))},[a.createCommentVNode(" prefix slot "),_e.$slots.prefix||_e.prefixIcon?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(a.unref(g).e("prefix"))},[a.createElementVNode("span",{class:a.normalizeClass(a.unref(g).e("prefix-inner"))},[a.renderSlot(_e.$slots,"prefix"),_e.prefixIcon?(a.openBlock(),a.createBlock(a.unref(Fl),{key:0,class:a.normalizeClass(a.unref(g).e("icon"))},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(_e.prefixIcon)))]),_:1},8,["class"])):a.createCommentVNode("v-if",!0)],2)],2)):a.createCommentVNode("v-if",!0),a.createElementVNode("input",a.mergeProps({id:a.unref(p),ref_key:"input",ref:y,class:a.unref(g).e("inner")},a.unref(u),{minlength:_e.minlength,maxlength:_e.maxlength,type:_e.showPassword?L.value?"text":"password":_e.type,disabled:a.unref(m),readonly:_e.readonly,autocomplete:_e.autocomplete,tabindex:_e.tabindex,"aria-label":_e.label,placeholder:_e.placeholder,style:_e.inputStyle,form:_e.form,autofocus:_e.autofocus,onCompositionstart:Ie,onCompositionupdate:Ge,onCompositionend:je,onInput:Te,onFocus:qe[0]||(qe[0]=(...at)=>a.unref(V)&&a.unref(V)(...at)),onBlur:qe[1]||(qe[1]=(...at)=>a.unref(H)&&a.unref(H)(...at)),onChange:Se,onKeydown:yt}),null,16,KTt),a.createCommentVNode(" suffix slot "),a.unref(ge)?(a.openBlock(),a.createElementBlock("span",{key:1,class:a.normalizeClass(a.unref(g).e("suffix"))},[a.createElementVNode("span",{class:a.normalizeClass(a.unref(g).e("suffix-inner"))},[!a.unref(U)||!a.unref(K)||!a.unref($)?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.renderSlot(_e.$slots,"suffix"),_e.suffixIcon?(a.openBlock(),a.createBlock(a.unref(Fl),{key:0,class:a.normalizeClass(a.unref(g).e("icon"))},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(_e.suffixIcon)))]),_:1},8,["class"])):a.createCommentVNode("v-if",!0)],64)):a.createCommentVNode("v-if",!0),a.unref(U)?(a.openBlock(),a.createBlock(a.unref(Fl),{key:1,class:a.normalizeClass([a.unref(g).e("icon"),a.unref(g).e("clear")]),onMousedown:a.withModifiers(a.unref($4),["prevent"]),onClick:vt},{default:a.withCtx(()=>[a.createVNode(a.unref(YP))]),_:1},8,["class","onMousedown"])):a.createCommentVNode("v-if",!0),a.unref(K)?(a.openBlock(),a.createBlock(a.unref(Fl),{key:2,class:a.normalizeClass([a.unref(g).e("icon"),a.unref(g).e("password")]),onClick:rt},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(G))))]),_:1},8,["class"])):a.createCommentVNode("v-if",!0),a.unref($)?(a.openBlock(),a.createElementBlock("span",{key:3,class:a.normalizeClass(a.unref(g).e("count"))},[a.createElementVNode("span",{class:a.normalizeClass(a.unref(g).e("count-inner"))},a.toDisplayString(a.unref(le))+" / "+a.toDisplayString(_e.maxlength),3)],2)):a.createCommentVNode("v-if",!0),a.unref(D)&&a.unref(j)&&a.unref(N)?(a.openBlock(),a.createBlock(a.unref(Fl),{key:4,class:a.normalizeClass([a.unref(g).e("icon"),a.unref(g).e("validateIcon"),a.unref(g).is("loading",a.unref(D)==="validating")])},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(j))))]),_:1},8,["class"])):a.createCommentVNode("v-if",!0)],2)],2)):a.createCommentVNode("v-if",!0)],2),a.createCommentVNode(" append slot "),_e.$slots.append?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(a.unref(g).be("group","append"))},[a.renderSlot(_e.$slots,"append")],2)):a.createCommentVNode("v-if",!0)],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createCommentVNode(" textarea "),a.createElementVNode("textarea",a.mergeProps({id:a.unref(p),ref_key:"textarea",ref:v,class:a.unref(T).e("inner")},a.unref(u),{minlength:_e.minlength,maxlength:_e.maxlength,tabindex:_e.tabindex,disabled:a.unref(m),readonly:_e.readonly,autocomplete:_e.autocomplete,style:a.unref(Z),"aria-label":_e.label,placeholder:_e.placeholder,form:_e.form,autofocus:_e.autofocus,onCompositionstart:Ie,onCompositionupdate:Ge,onCompositionend:je,onInput:Te,onFocus:qe[2]||(qe[2]=(...at)=>a.unref(V)&&a.unref(V)(...at)),onBlur:qe[3]||(qe[3]=(...at)=>a.unref(H)&&a.unref(H)(...at)),onChange:Se,onKeydown:yt}),null,16,YTt),a.unref($)?(a.openBlock(),a.createElementBlock("span",{key:0,style:a.normalizeStyle(w.value),class:a.normalizeClass(a.unref(g).e("count"))},a.toDisplayString(a.unref(le))+" / "+a.toDisplayString(_e.maxlength),7)):a.createCommentVNode("v-if",!0)],64))],16,XTt)),[[a.vShow,_e.type!=="hidden"]])}});var evt=wi($Tt,[["__file","input.vue"]]);const cI=F1(evt),ZT=4,tvt={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"}},rvt=({move:e,size:t,bar:r})=>({[r.size]:t,transform:`translate${r.axis}(${e}%)`}),x8e=Symbol("scrollbarContextKey"),nvt=Lo({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),ivt="Thumb";var _8e=wi(a.defineComponent({__name:"thumb",props:nvt,setup(e){const t=e,r=a.inject(x8e),n=xi("scrollbar");r||_me(ivt,"can not inject scrollbar context");const i=a.ref(),o=a.ref(),s=a.ref({}),l=a.ref(!1);let c=!1,u=!1,d=Ts?document.onselectstart:null;const h=a.computed(()=>tvt[t.vertical?"vertical":"horizontal"]),p=a.computed(()=>rvt({size:t.size,move:t.move,bar:h.value})),f=a.computed(()=>i.value[h.value.offset]**2/r.wrapElement[h.value.scrollSize]/t.ratio/o.value[h.value.offset]),m=w=>{var M;if(w.stopPropagation(),w.ctrlKey||[1,2].includes(w.button))return;(M=window.getSelection())==null||M.removeAllRanges(),T(w);const C=w.currentTarget;C&&(s.value[h.value.axis]=C[h.value.offset]-(w[h.value.client]-C.getBoundingClientRect()[h.value.direction]))},g=w=>{if(!o.value||!i.value||!r.wrapElement)return;const M=Math.abs(w.target.getBoundingClientRect()[h.value.direction]-w[h.value.client]),C=o.value[h.value.offset]/2,A=(M-C)*100*f.value/i.value[h.value.offset];r.wrapElement[h.value.scroll]=A*r.wrapElement[h.value.scrollSize]/100},T=w=>{w.stopImmediatePropagation(),c=!0,document.addEventListener("mousemove",y),document.addEventListener("mouseup",v),d=document.onselectstart,document.onselectstart=()=>!1},y=w=>{if(!i.value||!o.value||c===!1)return;const M=s.value[h.value.axis];if(!M)return;const C=(i.value.getBoundingClientRect()[h.value.direction]-w[h.value.client])*-1,A=o.value[h.value.offset]-M,O=(C-A)*100*f.value/i.value[h.value.offset];r.wrapElement[h.value.scroll]=O*r.wrapElement[h.value.scrollSize]/100},v=()=>{c=!1,s.value[h.value.axis]=0,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",v),L(),u&&(l.value=!1)},_=()=>{u=!1,l.value=!!t.size},b=()=>{u=!0,l.value=c};a.onBeforeUnmount(()=>{L(),document.removeEventListener("mouseup",v)});const L=()=>{document.onselectstart!==d&&(document.onselectstart=d)};return V5(a.toRef(r,"scrollbarElement"),"mousemove",_),V5(a.toRef(r,"scrollbarElement"),"mouseleave",b),(w,M)=>(a.openBlock(),a.createBlock(a.Transition,{name:a.unref(n).b("fade"),persisted:""},{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{ref_key:"instance",ref:i,class:a.normalizeClass([a.unref(n).e("bar"),a.unref(n).is(a.unref(h).key)]),onMousedown:g},[a.createElementVNode("div",{ref_key:"thumb",ref:o,class:a.normalizeClass(a.unref(n).e("thumb")),style:a.normalizeStyle(a.unref(p)),onMousedown:m},null,38)],34),[[a.vShow,w.always||l.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const ovt=Lo({always:{type:Boolean,default:!0},width:String,height:String,ratioX:{type:Number,default:1},ratioY:{type:Number,default:1}});var avt=wi(a.defineComponent({__name:"bar",props:ovt,setup(e,{expose:t}){const r=e,n=a.ref(0),i=a.ref(0);return t({handleScroll:o=>{if(o){const s=o.offsetHeight-ZT,l=o.offsetWidth-ZT;i.value=o.scrollTop*100/s*r.ratioY,n.value=o.scrollLeft*100/l*r.ratioX}}}),(o,s)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createVNode(_8e,{move:n.value,ratio:o.ratioX,size:o.width,always:o.always},null,8,["move","ratio","size","always"]),a.createVNode(_8e,{move:i.value,ratio:o.ratioY,size:o.height,vertical:"",always:o.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const svt=Lo({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:di([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"]}}),lvt={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(Nl)},eK="ElScrollbar",cvt=a.defineComponent({name:eK}),uvt=a.defineComponent({...cvt,props:svt,emits:lvt,setup(e,{expose:t,emit:r}){const n=e,i=xi("scrollbar");let o,s;const l=a.ref(),c=a.ref(),u=a.ref(),d=a.ref("0"),h=a.ref("0"),p=a.ref(),f=a.ref(1),m=a.ref(1),g=a.computed(()=>{const M={};return n.height&&(M.height=af(n.height)),n.maxHeight&&(M.maxHeight=af(n.maxHeight)),[n.wrapStyle,M]}),T=a.computed(()=>[n.wrapClass,i.e("wrap"),{[i.em("wrap","hidden-default")]:!n.native}]),y=a.computed(()=>[i.e("view"),n.viewClass]),v=()=>{var M;c.value&&((M=p.value)==null||M.handleScroll(c.value),r("scroll",{scrollTop:c.value.scrollTop,scrollLeft:c.value.scrollLeft}))};function _(M,C){B1(M)?c.value.scrollTo(M):Nl(M)&&Nl(C)&&c.value.scrollTo(M,C)}const b=M=>{if(!Nl(M)){Bl(eK,"value must be a number");return}c.value.scrollTop=M},L=M=>{if(!Nl(M)){Bl(eK,"value must be a number");return}c.value.scrollLeft=M},w=()=>{if(!c.value)return;const M=c.value.offsetHeight-ZT,C=c.value.offsetWidth-ZT,A=M**2/c.value.scrollHeight,O=C**2/c.value.scrollWidth,V=Math.max(A,n.minSize),H=Math.max(O,n.minSize);f.value=A/(M-A)/(V/(M-V)),m.value=O/(C-O)/(H/(C-H)),h.value=V+ZT<M?`${V}px`:"",d.value=H+ZT<C?`${H}px`:""};return a.watch(()=>n.noresize,M=>{M?(o==null||o(),s==null||s()):({stop:o}=J4(u,w),s=V5("resize",w))},{immediate:!0}),a.watch(()=>[n.maxHeight,n.height],()=>{n.native||a.nextTick(()=>{var M;w(),c.value&&((M=p.value)==null||M.handleScroll(c.value))})}),a.provide(x8e,a.reactive({scrollbarElement:l,wrapElement:c})),a.onMounted(()=>{n.native||a.nextTick(()=>{w()})}),a.onUpdated(()=>w()),t({wrapRef:c,update:w,scrollTo:_,setScrollTop:b,setScrollLeft:L,handleScroll:v}),(M,C)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"scrollbarRef",ref:l,class:a.normalizeClass(a.unref(i).b())},[a.createElementVNode("div",{ref_key:"wrapRef",ref:c,class:a.normalizeClass(a.unref(T)),style:a.normalizeStyle(a.unref(g)),onScroll:v},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(M.tag),{id:M.id,ref_key:"resizeRef",ref:u,class:a.normalizeClass(a.unref(y)),style:a.normalizeStyle(M.viewStyle),role:M.role,"aria-label":M.ariaLabel,"aria-orientation":M.ariaOrientation},{default:a.withCtx(()=>[a.renderSlot(M.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],38),M.native?a.createCommentVNode("v-if",!0):(a.openBlock(),a.createBlock(avt,{key:0,ref_key:"barRef",ref:p,height:h.value,width:d.value,always:M.always,"ratio-x":m.value,"ratio-y":f.value},null,8,["height","width","always","ratio-x","ratio-y"]))],2))}});var dvt=wi(uvt,[["__file","scrollbar.vue"]]);const hvt=F1(dvt),tK=Symbol("popper"),w8e=Symbol("popperContent"),pvt=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],L8e=Lo({role:{type:String,values:pvt,default:"tooltip"}}),fvt=a.defineComponent({name:"ElPopper",inheritAttrs:!1}),mvt=a.defineComponent({...fvt,props:L8e,setup(e,{expose:t}){const r=e,n=a.ref(),i=a.ref(),o=a.ref(),s=a.ref(),l=a.computed(()=>r.role),c={triggerRef:n,popperInstanceRef:i,contentRef:o,referenceRef:s,role:l};return t(c),a.provide(tK,c),(u,d)=>a.renderSlot(u.$slots,"default")}});var gvt=wi(mvt,[["__file","popper.vue"]]);const S8e=Lo({arrowOffset:{type:Number,default:5}}),yvt=a.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),Tvt=a.defineComponent({...yvt,props:S8e,setup(e,{expose:t}){const r=e,n=xi("popper"),{arrowOffset:i,arrowRef:o,arrowStyle:s}=a.inject(w8e,void 0);return a.watch(()=>r.arrowOffset,l=>{i.value=l}),a.onBeforeUnmount(()=>{o.value=void 0}),t({arrowRef:o}),(l,c)=>(a.openBlock(),a.createElementBlock("span",{ref_key:"arrowRef",ref:o,class:a.normalizeClass(a.unref(n).e("arrow")),style:a.normalizeStyle(a.unref(s)),"data-popper-arrow":""},null,6))}});var vvt=wi(Tvt,[["__file","arrow.vue"]]);const rK="ElOnlyChild",bvt=a.defineComponent({name:rK,setup(e,{slots:t,attrs:r}){var n;const i=a.inject(m8e),o=ITt((n=i==null?void 0:i.setForwardRef)!=null?n:$4);return()=>{var s;const l=(s=t.default)==null?void 0:s.call(t,r);if(!l)return null;if(l.length>1)return Bl(rK,"requires exact only one valid child."),null;const c=M8e(l);return c?a.withDirectives(a.cloneVNode(c,r),[[o]]):(Bl(rK,"no valid child node found"),null)}}});function M8e(e){if(!e)return null;const t=e;for(const r of t){if(B1(r))switch(r.type){case a.Comment:continue;case a.Text:case"svg":return k8e(r);case a.Fragment:return M8e(r.children);default:return r}return k8e(r)}return null}function k8e(e){const t=xi("only-child");return a.createVNode("span",{class:t.e("content")},[e])}const C8e=Lo({virtualRef:{type:di(Object)},virtualTriggering:Boolean,onMouseenter:{type:di(Function)},onMouseleave:{type:di(Function)},onClick:{type:di(Function)},onKeydown:{type:di(Function)},onFocus:{type:di(Function)},onBlur:{type:di(Function)},onContextmenu:{type:di(Function)},id:String,open:Boolean}),Qvt=a.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),xvt=a.defineComponent({...Qvt,props:C8e,setup(e,{expose:t}){const r=e,{role:n,triggerRef:i}=a.inject(tK,void 0);PTt(i);const o=a.computed(()=>l.value?r.id:void 0),s=a.computed(()=>{if(n&&n.value==="tooltip")return r.open&&r.id?r.id:void 0}),l=a.computed(()=>{if(n&&n.value!=="tooltip")return n.value}),c=a.computed(()=>l.value?`${r.open}`:void 0);let u;return a.onMounted(()=>{a.watch(()=>r.virtualRef,d=>{d&&(i.value=Y4(d))},{immediate:!0}),a.watch(i,(d,h)=>{u==null||u(),u=void 0,eL(d)&&(["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"].forEach(p=>{var f;const m=r[p];m&&(d.addEventListener(p.slice(2).toLowerCase(),m),(f=h==null?void 0:h.removeEventListener)==null||f.call(h,p.slice(2).toLowerCase(),m))}),u=a.watch([o,s,l,c],p=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((f,m)=>{N5(p[m])?d.removeAttribute(f):d.setAttribute(f,p[m])})},{immediate:!0})),eL(h)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(p=>h.removeAttribute(p))},{immediate:!0})}),a.onBeforeUnmount(()=>{u==null||u(),u=void 0}),t({triggerRef:i}),(d,h)=>d.virtualTriggering?a.createCommentVNode("v-if",!0):(a.openBlock(),a.createBlock(a.unref(bvt),a.mergeProps({key:0},d.$attrs,{"aria-controls":a.unref(o),"aria-describedby":a.unref(s),"aria-expanded":a.unref(c),"aria-haspopup":a.unref(l)}),{default:a.withCtx(()=>[a.renderSlot(d.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var _vt=wi(xvt,[["__file","trigger.vue"]]);const nK="focus-trap.focus-after-trapped",iK="focus-trap.focus-after-released",wvt="focus-trap.focusout-prevented",E8e={cancelable:!0,bubbles:!1},Lvt={cancelable:!0,bubbles:!1},A8e="focusAfterTrapped",O8e="focusAfterReleased",P8e=Symbol("elFocusTrap"),oK=a.ref(),uI=a.ref(0),aK=a.ref(0);let dI=0;const I8e=e=>{const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0||n===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t},H8e=(e,t)=>{for(const r of e)if(!Svt(r,t))return r},Svt=(e,t)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},Mvt=e=>{const t=I8e(e),r=H8e(t,e),n=H8e(t.reverse(),e);return[r,n]},kvt=e=>e instanceof HTMLInputElement&&"select"in e,G5=(e,t)=>{if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),aK.value=window.performance.now(),e!==r&&kvt(e)&&t&&e.select()}};function V8e(e,t){const r=[...e],n=e.indexOf(t);return n!==-1&&r.splice(n,1),r}const Cvt=()=>{let e=[];return{push:t=>{const r=e[0];r&&t!==r&&r.pause(),e=V8e(e,t),e.unshift(t)},remove:t=>{var r,n;e=V8e(e,t),(n=(r=e[0])==null?void 0:r.resume)==null||n.call(r)}}},Evt=(e,t=!1)=>{const r=document.activeElement;for(const n of e)if(G5(n,t),document.activeElement!==r)return},R8e=Cvt(),Avt=()=>uI.value>aK.value,hI=()=>{oK.value="pointer",uI.value=window.performance.now()},N8e=()=>{oK.value="keyboard",uI.value=window.performance.now()},Ovt=()=>(a.onMounted(()=>{dI===0&&(document.addEventListener("mousedown",hI),document.addEventListener("touchstart",hI),document.addEventListener("keydown",N8e)),dI++}),a.onBeforeUnmount(()=>{dI--,dI<=0&&(document.removeEventListener("mousedown",hI),document.removeEventListener("touchstart",hI),document.removeEventListener("keydown",N8e))}),{focusReason:oK,lastUserFocusTimestamp:uI,lastAutomatedFocusTimestamp:aK}),pI=e=>new CustomEvent(wvt,{...Lvt,detail:e}),Pvt=a.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[A8e,O8e,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const r=a.ref();let n,i;const{focusReason:o}=Ovt();kTt(m=>{e.trapped&&!s.paused&&t("release-requested",m)});const s={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},l=m=>{if(!e.loop&&!e.trapped||s.paused)return;const{key:g,altKey:T,ctrlKey:y,metaKey:v,currentTarget:_,shiftKey:b}=m,{loop:L}=e,w=g===iu.tab&&!T&&!y&&!v,M=document.activeElement;if(w&&M){const C=_,[A,O]=Mvt(C);if(A&&O){if(!b&&M===O){const V=pI({focusReason:o.value});t("focusout-prevented",V),V.defaultPrevented||(m.preventDefault(),L&&G5(A,!0))}else if(b&&[A,C].includes(M)){const V=pI({focusReason:o.value});t("focusout-prevented",V),V.defaultPrevented||(m.preventDefault(),L&&G5(O,!0))}}else if(M===C){const V=pI({focusReason:o.value});t("focusout-prevented",V),V.defaultPrevented||m.preventDefault()}}};a.provide(P8e,{focusTrapRef:r,onKeydown:l}),a.watch(()=>e.focusTrapEl,m=>{m&&(r.value=m)},{immediate:!0}),a.watch([r],([m],[g])=>{m&&(m.addEventListener("keydown",l),m.addEventListener("focusin",d),m.addEventListener("focusout",h)),g&&(g.removeEventListener("keydown",l),g.removeEventListener("focusin",d),g.removeEventListener("focusout",h))});const c=m=>{t(A8e,m)},u=m=>t(O8e,m),d=m=>{const g=a.unref(r);if(!g)return;const T=m.target,y=m.relatedTarget,v=T&&g.contains(T);e.trapped||y&&g.contains(y)||(n=y),v&&t("focusin",m),!s.paused&&e.trapped&&(v?i=T:G5(i,!0))},h=m=>{const g=a.unref(r);if(!(s.paused||!g))if(e.trapped){const T=m.relatedTarget;!N5(T)&&!g.contains(T)&&setTimeout(()=>{if(!s.paused&&e.trapped){const y=pI({focusReason:o.value});t("focusout-prevented",y),y.defaultPrevented||G5(i,!0)}},0)}else{const T=m.target;T&&g.contains(T)||t("focusout",m)}};async function p(){await a.nextTick();const m=a.unref(r);if(m){R8e.push(s);const g=m.contains(document.activeElement)?n:document.activeElement;if(n=g,!m.contains(g)){const T=new Event(nK,E8e);m.addEventListener(nK,c),m.dispatchEvent(T),T.defaultPrevented||a.nextTick(()=>{let y=e.focusStartEl;Rl(y)||(G5(y),document.activeElement!==y&&(y="first")),y==="first"&&Evt(I8e(m),!0),(document.activeElement===g||y==="container")&&G5(m)})}}}function f(){const m=a.unref(r);if(m){m.removeEventListener(nK,c);const g=new CustomEvent(iK,{...E8e,detail:{focusReason:o.value}});m.addEventListener(iK,u),m.dispatchEvent(g),!g.defaultPrevented&&(o.value=="keyboard"||!Avt()||m.contains(document.activeElement))&&G5(n??document.body),m.removeEventListener(iK,u),R8e.remove(s)}}return a.onMounted(()=>{e.trapped&&p(),a.watch(()=>e.trapped,m=>{m?p():f()})}),a.onBeforeUnmount(()=>{e.trapped&&f()}),{onKeydown:l}}});function Ivt(e,t,r,n,i,o){return a.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var B8e=wi(Pvt,[["render",Ivt],["__file","focus-trap.vue"]]);const Hvt=["fixed","absolute"],Vvt=Lo({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:di(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:rI,default:"bottom"},popperOptions:{type:di(Object),default:()=>({})},strategy:{type:String,values:Hvt,default:"absolute"}}),F8e=Lo({...Vvt,id:String,style:{type:di([String,Array,Object])},className:{type:di([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:di([String,Array,Object])},popperStyle:{type:di([String,Array,Object])},referenceEl:{type:di(Object)},triggerTargetEl:{type:di(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},ariaLabel:{type:String,default:void 0},virtualTriggering:Boolean,zIndex:Number}),Rvt={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},Nvt=(e,t=[])=>{const{placement:r,strategy:n,popperOptions:i}=e,o={placement:r,strategy:n,...i,modifiers:[...Fvt(e),...t]};return Dvt(o,i==null?void 0:i.modifiers),o},Bvt=e=>{if(Ts)return Y4(e)};function Fvt(e){const{offset:t,gpuAcceleration:r,fallbackPlacements:n}=e;return[{name:"offset",options:{offset:[0,t??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:n}},{name:"computeStyles",options:{gpuAcceleration:r}}]}function Dvt(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const zvt=0,jvt=e=>{const{popperInstanceRef:t,contentRef:r,triggerRef:n,role:i}=a.inject(tK,void 0),o=a.ref(),s=a.ref(),l=a.computed(()=>({name:"eventListeners",enabled:!!e.visible})),c=a.computed(()=>{var y;const v=a.unref(o),_=(y=a.unref(s))!=null?y:zvt;return{name:"arrow",enabled:!bme(v),options:{element:v,padding:_}}}),u=a.computed(()=>({onFirstUpdate:()=>{m()},...Nvt(e,[a.unref(c),a.unref(l)])})),d=a.computed(()=>Bvt(e.referenceEl)||a.unref(n)),{attributes:h,state:p,styles:f,update:m,forceUpdate:g,instanceRef:T}=LTt(d,r,u);return a.watch(T,y=>t.value=y),a.onMounted(()=>{a.watch(()=>{var y;return(y=a.unref(d))==null?void 0:y.getBoundingClientRect()},()=>{m()})}),{attributes:h,arrowRef:o,contentRef:r,instanceRef:T,state:p,styles:f,role:i,forceUpdate:g,update:m}},Uvt=(e,{attributes:t,styles:r,role:n})=>{const{nextZIndex:i}=YX(),o=xi("popper"),s=a.computed(()=>a.unref(t).popper),l=a.ref(Nl(e.zIndex)?e.zIndex:i()),c=a.computed(()=>[o.b(),o.is("pure",e.pure),o.is(e.effect),e.popperClass]),u=a.computed(()=>[{zIndex:a.unref(l)},a.unref(r).popper,e.popperStyle||{}]),d=a.computed(()=>n.value==="dialog"?"false":void 0),h=a.computed(()=>a.unref(r).arrow||{});return{ariaModal:d,arrowStyle:h,contentAttrs:s,contentClass:c,contentStyle:u,contentZIndex:l,updateZIndex:()=>{l.value=Nl(e.zIndex)?e.zIndex:i()}}},Gvt=(e,t)=>{const r=a.ref(!1),n=a.ref();return{focusStartRef:n,trapped:r,onFocusAfterReleased:i=>{var o;((o=i.detail)==null?void 0:o.focusReason)!=="pointer"&&(n.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:i=>{e.visible&&!r.value&&(i.target&&(n.value=i.target),r.value=!0)},onFocusoutPrevented:i=>{e.trapping||(i.detail.focusReason==="pointer"&&i.preventDefault(),r.value=!1)},onReleaseRequested:()=>{r.value=!1,t("close")}}},Wvt=a.defineComponent({name:"ElPopperContent"}),qvt=a.defineComponent({...Wvt,props:F8e,emits:Rvt,setup(e,{expose:t,emit:r}){const n=e,{focusStartRef:i,trapped:o,onFocusAfterReleased:s,onFocusAfterTrapped:l,onFocusInTrap:c,onFocusoutPrevented:u,onReleaseRequested:d}=Gvt(n,r),{attributes:h,arrowRef:p,contentRef:f,styles:m,instanceRef:g,role:T,update:y}=jvt(n),{ariaModal:v,arrowStyle:_,contentAttrs:b,contentClass:L,contentStyle:w,updateZIndex:M}=Uvt(n,{styles:m,attributes:h,role:T}),C=a.inject(dL,void 0),A=a.ref();a.provide(w8e,{arrowStyle:_,arrowRef:p,arrowOffset:A}),C&&(C.addInputId||C.removeInputId)&&a.provide(dL,{...C,addInputId:$4,removeInputId:$4});let O;const V=(N=!0)=>{y(),N&&M()},H=()=>{V(!1),n.visible&&n.focusOnShow?o.value=!0:n.visible===!1&&(o.value=!1)};return a.onMounted(()=>{a.watch(()=>n.triggerTargetEl,(N,D)=>{O==null||O(),O=void 0;const j=a.unref(N||f.value),G=a.unref(D||f.value);eL(j)&&(O=a.watch([T,()=>n.ariaLabel,v,()=>n.id],R=>{["role","aria-label","aria-modal","id"].forEach((Z,X)=>{N5(R[X])?j.removeAttribute(Z):j.setAttribute(Z,R[X])})},{immediate:!0})),G!==j&&eL(G)&&["role","aria-label","aria-modal","id"].forEach(R=>{G.removeAttribute(R)})},{immediate:!0}),a.watch(()=>n.visible,H,{immediate:!0})}),a.onBeforeUnmount(()=>{O==null||O(),O=void 0}),t({popperContentRef:f,popperInstanceRef:g,updatePopper:V,contentStyle:w}),(N,D)=>(a.openBlock(),a.createElementBlock("div",a.mergeProps({ref_key:"contentRef",ref:f},a.unref(b),{style:a.unref(w),class:a.unref(L),tabindex:"-1",onMouseenter:D[0]||(D[0]=j=>N.$emit("mouseenter",j)),onMouseleave:D[1]||(D[1]=j=>N.$emit("mouseleave",j))}),[a.createVNode(a.unref(B8e),{trapped:a.unref(o),"trap-on-focus-in":!0,"focus-trap-el":a.unref(f),"focus-start-el":a.unref(i),onFocusAfterTrapped:a.unref(l),onFocusAfterReleased:a.unref(s),onFocusin:a.unref(c),onFocusoutPrevented:a.unref(u),onReleaseRequested:a.unref(d)},{default:a.withCtx(()=>[a.renderSlot(N.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}});var Zvt=wi(qvt,[["__file","content.vue"]]);const Xvt=F1(gvt),sK=Symbol("elTooltip"),R0=Lo({...ATt,...F8e,appendTo:{type:di([String,Object])},content:{type:String,default:""},rawContent:{type:Boolean,default:!1},persistent:Boolean,ariaLabel:String,visible:{type:di(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean}),hL=Lo({...C8e,disabled:Boolean,trigger:{type:di([String,Array]),default:"hover"},triggerKeys:{type:di(Array),default:()=>[iu.enter,iu.space]}}),{useModelToggleProps:Kvt,useModelToggleEmits:Yvt,useModelToggle:Jvt}=xyt("visible"),$vt=Lo({...L8e,...Kvt,...R0,...hL,...S8e,showArrow:{type:Boolean,default:!0}}),ebt=[...Yvt,"before-show","before-hide","show","hide","open","close"],tbt=(e,t)=>Qc(e)?e.includes(t):e===t,XT=(e,t,r)=>n=>{tbt(a.unref(e),t)&&r(n)},rbt=a.defineComponent({name:"ElTooltipTrigger"}),nbt=a.defineComponent({...rbt,props:hL,setup(e,{expose:t}){const r=e,n=xi("tooltip"),{controlled:i,id:o,open:s,onOpen:l,onClose:c,onToggle:u}=a.inject(sK,void 0),d=a.ref(null),h=()=>{if(a.unref(i)||r.disabled)return!0},p=a.toRef(r,"trigger"),f=K4(h,XT(p,"hover",l)),m=K4(h,XT(p,"hover",c)),g=K4(h,XT(p,"click",b=>{b.button===0&&u(b)})),T=K4(h,XT(p,"focus",l)),y=K4(h,XT(p,"focus",c)),v=K4(h,XT(p,"contextmenu",b=>{b.preventDefault(),u(b)})),_=K4(h,b=>{const{code:L}=b;r.triggerKeys.includes(L)&&(b.preventDefault(),u(b))});return t({triggerRef:d}),(b,L)=>(a.openBlock(),a.createBlock(a.unref(_vt),{id:a.unref(o),"virtual-ref":b.virtualRef,open:a.unref(s),"virtual-triggering":b.virtualTriggering,class:a.normalizeClass(a.unref(n).e("trigger")),onBlur:a.unref(y),onClick:a.unref(g),onContextmenu:a.unref(v),onFocus:a.unref(T),onMouseenter:a.unref(f),onMouseleave:a.unref(m),onKeydown:a.unref(_)},{default:a.withCtx(()=>[a.renderSlot(b.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var ibt=wi(nbt,[["__file","trigger.vue"]]);const obt=a.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),abt=a.defineComponent({...obt,props:R0,setup(e,{expose:t}){const r=e,{selector:n}=f8e(),i=xi("tooltip"),o=a.ref(null),s=a.ref(!1),{controlled:l,id:c,open:u,trigger:d,onClose:h,onOpen:p,onShow:f,onHide:m,onBeforeShow:g,onBeforeHide:T}=a.inject(sK,void 0),y=a.computed(()=>r.transition||`${i.namespace.value}-fade-in-linear`),v=a.computed(()=>process.env.NODE_ENV==="test"?!0:r.persistent);a.onBeforeUnmount(()=>{s.value=!0});const _=a.computed(()=>a.unref(v)?!0:a.unref(u)),b=a.computed(()=>r.disabled?!1:a.unref(u)),L=a.computed(()=>r.appendTo||n.value),w=a.computed(()=>{var R;return(R=r.style)!=null?R:{}}),M=a.computed(()=>!a.unref(u)),C=()=>{m()},A=()=>{if(a.unref(l))return!0},O=K4(A,()=>{r.enterable&&a.unref(d)==="hover"&&p()}),V=K4(A,()=>{a.unref(d)==="hover"&&h()}),H=()=>{var R,Z;(Z=(R=o.value)==null?void 0:R.updatePopper)==null||Z.call(R),g==null||g()},N=()=>{T==null||T()},D=()=>{f(),G=emt(a.computed(()=>{var R;return(R=o.value)==null?void 0:R.popperContentRef}),()=>{a.unref(l)||a.unref(d)!=="hover"&&h()})},j=()=>{r.virtualTriggering||h()};let G;return a.watch(()=>a.unref(u),R=>{R||G==null||G()},{flush:"post"}),a.watch(()=>r.content,()=>{var R,Z;(Z=(R=o.value)==null?void 0:R.updatePopper)==null||Z.call(R)}),t({contentRef:o}),(R,Z)=>(a.openBlock(),a.createBlock(a.Teleport,{disabled:!R.teleported,to:a.unref(L)},[a.createVNode(a.Transition,{name:a.unref(y),onAfterLeave:C,onBeforeEnter:H,onAfterEnter:D,onBeforeLeave:N},{default:a.withCtx(()=>[a.unref(_)?a.withDirectives((a.openBlock(),a.createBlock(a.unref(Zvt),a.mergeProps({key:0,id:a.unref(c),ref_key:"contentRef",ref:o},R.$attrs,{"aria-label":R.ariaLabel,"aria-hidden":a.unref(M),"boundaries-padding":R.boundariesPadding,"fallback-placements":R.fallbackPlacements,"gpu-acceleration":R.gpuAcceleration,offset:R.offset,placement:R.placement,"popper-options":R.popperOptions,strategy:R.strategy,effect:R.effect,enterable:R.enterable,pure:R.pure,"popper-class":R.popperClass,"popper-style":[R.popperStyle,a.unref(w)],"reference-el":R.referenceEl,"trigger-target-el":R.triggerTargetEl,visible:a.unref(b),"z-index":R.zIndex,onMouseenter:a.unref(O),onMouseleave:a.unref(V),onBlur:j,onClose:a.unref(h)}),{default:a.withCtx(()=>[s.value?a.createCommentVNode("v-if",!0):a.renderSlot(R.$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"])),[[a.vShow,a.unref(b)]]):a.createCommentVNode("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"]))}});var sbt=wi(abt,[["__file","content.vue"]]);const lbt=["innerHTML"],cbt={key:1},ubt=a.defineComponent({name:"ElTooltip"}),dbt=a.defineComponent({...ubt,props:$vt,emits:ebt,setup(e,{expose:t,emit:r}){const n=e;ETt();const i=ag(),o=a.ref(),s=a.ref(),l=()=>{var y;const v=a.unref(o);v&&((y=v.popperInstanceRef)==null||y.update())},c=a.ref(!1),u=a.ref(),{show:d,hide:h,hasUpdateHandler:p}=Jvt({indicator:c,toggleReason:u}),{onOpen:f,onClose:m}=OTt({showAfter:a.toRef(n,"showAfter"),hideAfter:a.toRef(n,"hideAfter"),autoClose:a.toRef(n,"autoClose"),open:d,close:h}),g=a.computed(()=>of(n.visible)&&!p.value);a.provide(sK,{controlled:g,id:i,open:a.readonly(c),trigger:a.toRef(n,"trigger"),onOpen:y=>{f(y)},onClose:y=>{m(y)},onToggle:y=>{a.unref(c)?m(y):f(y)},onShow:()=>{r("show",u.value)},onHide:()=>{r("hide",u.value)},onBeforeShow:()=>{r("before-show",u.value)},onBeforeHide:()=>{r("before-hide",u.value)},updatePopper:l}),a.watch(()=>n.disabled,y=>{y&&c.value&&(c.value=!1)});const T=y=>{var v,_;const b=(_=(v=s.value)==null?void 0:v.contentRef)==null?void 0:_.popperContentRef,L=(y==null?void 0:y.relatedTarget)||document.activeElement;return b&&b.contains(L)};return a.onDeactivated(()=>c.value&&h()),t({popperRef:o,contentRef:s,isFocusInsideContent:T,updatePopper:l,onOpen:f,onClose:m,hide:h}),(y,v)=>(a.openBlock(),a.createBlock(a.unref(Xvt),{ref_key:"popperRef",ref:o,role:y.role},{default:a.withCtx(()=>[a.createVNode(ibt,{disabled:y.disabled,trigger:y.trigger,"trigger-keys":y.triggerKeys,"virtual-ref":y.virtualRef,"virtual-triggering":y.virtualTriggering},{default:a.withCtx(()=>[y.$slots.default?a.renderSlot(y.$slots,"default",{key:0}):a.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),a.createVNode(sbt,{ref_key:"contentRef",ref:s,"aria-label":y.ariaLabel,"boundaries-padding":y.boundariesPadding,content:y.content,disabled:y.disabled,effect:y.effect,enterable:y.enterable,"fallback-placements":y.fallbackPlacements,"hide-after":y.hideAfter,"gpu-acceleration":y.gpuAcceleration,offset:y.offset,persistent:y.persistent,"popper-class":y.popperClass,"popper-style":y.popperStyle,placement:y.placement,"popper-options":y.popperOptions,pure:y.pure,"raw-content":y.rawContent,"reference-el":y.referenceEl,"trigger-target-el":y.triggerTargetEl,"show-after":y.showAfter,strategy:y.strategy,teleported:y.teleported,transition:y.transition,"virtual-triggering":y.virtualTriggering,"z-index":y.zIndex,"append-to":y.appendTo},{default:a.withCtx(()=>[a.renderSlot(y.$slots,"content",{},()=>[y.rawContent?(a.openBlock(),a.createElementBlock("span",{key:0,innerHTML:y.content},null,8,lbt)):(a.openBlock(),a.createElementBlock("span",cbt,a.toDisplayString(y.content),1))]),y.showArrow?(a.openBlock(),a.createBlock(a.unref(vvt),{key:0,"arrow-offset":y.arrowOffset},null,8,["arrow-offset"])):a.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 hbt=wi(dbt,[["__file","tooltip.vue"]]);const lK=F1(hbt),D8e=Symbol("buttonGroupContextKey"),pbt=(e,t)=>{VX({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},a.computed(()=>e.type==="text"));const r=a.inject(D8e,void 0),n=lI("button"),{form:i}=U5(),o=j5(a.computed(()=>r==null?void 0:r.size)),s=WT(),l=a.ref(),c=a.useSlots(),u=a.computed(()=>e.type||(r==null?void 0:r.type)||""),d=a.computed(()=>{var f,m,g;return(g=(m=e.autoInsertSpace)!=null?m:(f=n.value)==null?void 0:f.autoInsertSpace)!=null?g:!1}),h=a.computed(()=>e.tag==="button"?{ariaDisabled:s.value||e.loading,disabled:s.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),p=a.computed(()=>{var f;const m=(f=c.default)==null?void 0:f.call(c);if(d.value&&(m==null?void 0:m.length)===1){const g=m[0];if((g==null?void 0:g.type)===a.Text){const T=g.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(T.trim())}}return!1});return{_disabled:s,_size:o,_type:u,_ref:l,_props:h,shouldAddSpace:p,handleClick:f=>{e.nativeType==="reset"&&(i==null||i.resetFields()),t("click",f)}}},fbt=["default","primary","success","warning","info","danger","text",""],mbt=["button","submit","reset"],cK=Lo({size:z5,disabled:Boolean,type:{type:String,values:fbt,default:""},icon:{type:sf},nativeType:{type:String,values:mbt,default:"button"},loading:Boolean,loadingIcon:{type:sf,default:()=>HX},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:di([String,Object]),default:"button"}}),gbt={click:e=>e instanceof MouseEvent};function D1(e,t){ybt(e)&&(e="100%");var r=Tbt(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function fI(e){return Math.min(1,Math.max(0,e))}function ybt(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Tbt(e){return typeof e=="string"&&e.indexOf("%")!==-1}function z8e(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function mI(e){return e<=1?"".concat(Number(e)*100,"%"):e}function sg(e){return e.length===1?"0"+e:String(e)}function vbt(e,t,r){return{r:D1(e,255)*255,g:D1(t,255)*255,b:D1(r,255)*255}}function j8e(e,t,r){e=D1(e,255),t=D1(t,255),r=D1(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o=0,s=0,l=(n+i)/2;if(n===i)s=0,o=0;else{var c=n-i;switch(s=l>.5?c/(2-n-i):c/(n+i),n){case e:o=(t-r)/c+(t<r?6:0);break;case t:o=(r-e)/c+2;break;case r:o=(e-t)/c+4;break}o/=6}return{h:o,s,l}}function uK(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function bbt(e,t,r){var n,i,o;if(e=D1(e,360),t=D1(t,100),r=D1(r,100),t===0)i=r,o=r,n=r;else{var s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;n=uK(l,s,e+1/3),i=uK(l,s,e),o=uK(l,s,e-1/3)}return{r:n*255,g:i*255,b:o*255}}function U8e(e,t,r){e=D1(e,255),t=D1(t,255),r=D1(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o=0,s=n,l=n-i,c=n===0?0:l/n;if(n===i)o=0;else{switch(n){case e:o=(t-r)/l+(t<r?6:0);break;case t:o=(r-e)/l+2;break;case r:o=(e-t)/l+4;break}o/=6}return{h:o,s:c,v:s}}function Qbt(e,t,r){e=D1(e,360)*6,t=D1(t,100),r=D1(r,100);var n=Math.floor(e),i=e-n,o=r*(1-t),s=r*(1-i*t),l=r*(1-(1-i)*t),c=n%6,u=[r,s,o,o,l,r][c],d=[l,r,r,s,o,o][c],h=[o,o,l,r,r,s][c];return{r:u*255,g:d*255,b:h*255}}function G8e(e,t,r,n){var i=[sg(Math.round(e).toString(16)),sg(Math.round(t).toString(16)),sg(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 xbt(e,t,r,n,i){var o=[sg(Math.round(e).toString(16)),sg(Math.round(t).toString(16)),sg(Math.round(r).toString(16)),sg(_bt(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 _bt(e){return Math.round(parseFloat(e)*255).toString(16)}function W8e(e){return N0(e)/255}function N0(e){return parseInt(e,16)}function wbt(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var dK={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 Lbt(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,o=null,s=!1,l=!1;return typeof e=="string"&&(e=kbt(e)),typeof e=="object"&&(cf(e.r)&&cf(e.g)&&cf(e.b)?(t=vbt(e.r,e.g,e.b),s=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):cf(e.h)&&cf(e.s)&&cf(e.v)?(n=mI(e.s),i=mI(e.v),t=Qbt(e.h,n,i),s=!0,l="hsv"):cf(e.h)&&cf(e.s)&&cf(e.l)&&(n=mI(e.s),o=mI(e.l),t=bbt(e.h,n,o),s=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=z8e(r),{ok:s,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}var Sbt="[-\\+]?\\d+%?",Mbt="[-\\+]?\\d*\\.\\d+%?",W5="(?:".concat(Mbt,")|(?:").concat(Sbt,")"),hK="[\\s|\\(]+(".concat(W5,")[,|\\s]+(").concat(W5,")[,|\\s]+(").concat(W5,")\\s*\\)?"),pK="[\\s|\\(]+(".concat(W5,")[,|\\s]+(").concat(W5,")[,|\\s]+(").concat(W5,")[,|\\s]+(").concat(W5,")\\s*\\)?"),s3={CSS_UNIT:new RegExp(W5),rgb:new RegExp("rgb"+hK),rgba:new RegExp("rgba"+pK),hsl:new RegExp("hsl"+hK),hsla:new RegExp("hsla"+pK),hsv:new RegExp("hsv"+hK),hsva:new RegExp("hsva"+pK),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 kbt(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(dK[e])e=dK[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=s3.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=s3.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=s3.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=s3.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=s3.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=s3.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=s3.hex8.exec(e),r?{r:N0(r[1]),g:N0(r[2]),b:N0(r[3]),a:W8e(r[4]),format:t?"name":"hex8"}:(r=s3.hex6.exec(e),r?{r:N0(r[1]),g:N0(r[2]),b:N0(r[3]),format:t?"name":"hex"}:(r=s3.hex4.exec(e),r?{r:N0(r[1]+r[1]),g:N0(r[2]+r[2]),b:N0(r[3]+r[3]),a:W8e(r[4]+r[4]),format:t?"name":"hex8"}:(r=s3.hex3.exec(e),r?{r:N0(r[1]+r[1]),g:N0(r[2]+r[2]),b:N0(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function cf(e){return!!s3.CSS_UNIT.exec(String(e))}var Cbt=function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=wbt(t)),this.originalInput=t;var i=Lbt(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:i.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),r,n,i,o=t.r/255,s=t.g/255,l=t.b/255;return o<=.03928?r=o/12.92:r=Math.pow((o+.055)/1.055,2.4),s<=.03928?n=s/12.92:n=Math.pow((s+.055)/1.055,2.4),l<=.03928?i=l/12.92:i=Math.pow((l+.055)/1.055,2.4),.2126*r+.7152*n+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=z8e(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=U8e(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=U8e(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=j8e(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=j8e(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),G8e(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),xbt(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(r,", ").concat(n,")"):"rgba(".concat(t,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(r){return"".concat(Math.round(D1(r,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(r){return Math.round(D1(r,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+G8e(this.r,this.g,this.b,!1),r=0,n=Object.entries(dK);r<n.length;r++){var i=n[r],o=i[0],s=i[1];if(t===s)return o}return!1},e.prototype.toString=function(t){var r=!!t;t=t??this.format;var n=!1,i=this.a<1&&this.a>=0,o=!r&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=fI(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=fI(r.l),new e(r)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=fI(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=fI(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var n=this.toRgb(),i=new e(t).toRgb(),o=r/100,s={r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a};return new e(s)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var n=this.toHsl(),i=360/r,o=[this];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,o.push(new e(n));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var r=this.toHsv(),n=r.h,i=r.s,o=r.v,s=[],l=1/t;t--;)s.push(new e({h:n,s:i,v:o})),o=(o+l)%1;return s},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb(),i=r.a+n.a*(1-r.a);return new e({r:(r.r*r.a+n.r*n.a*(1-r.a))/i,g:(r.g*r.a+n.g*n.a*(1-r.a))/i,b:(r.b*r.a+n.b*n.a*(1-r.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),n=r.h,i=[this],o=360/t,s=1;s<t;s++)i.push(new e({h:(n+s*o)%360,s:r.s,l:r.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function q5(e,t=20){return e.mix("#141414",t).toString()}function Ebt(e){const t=WT(),r=xi("button");return a.computed(()=>{let n={};const i=e.color;if(i){const o=new Cbt(i),s=e.dark?o.tint(20).toString():q5(o,20);if(e.plain)n=r.cssVarBlock({"bg-color":e.dark?q5(o,90):o.tint(90).toString(),"text-color":i,"border-color":e.dark?q5(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":s,"active-text-color":`var(${r.cssVarName("color-white")})`,"active-border-color":s}),t.value&&(n[r.cssVarBlockName("disabled-bg-color")]=e.dark?q5(o,90):o.tint(90).toString(),n[r.cssVarBlockName("disabled-text-color")]=e.dark?q5(o,50):o.tint(50).toString(),n[r.cssVarBlockName("disabled-border-color")]=e.dark?q5(o,80):o.tint(80).toString());else{const l=e.dark?q5(o,30):o.tint(30).toString(),c=o.isDark()?`var(${r.cssVarName("color-white")})`:`var(${r.cssVarName("color-black")})`;if(n=r.cssVarBlock({"bg-color":i,"text-color":c,"border-color":i,"hover-bg-color":l,"hover-text-color":c,"hover-border-color":l,"active-bg-color":s,"active-border-color":s}),t.value){const u=e.dark?q5(o,50):o.tint(50).toString();n[r.cssVarBlockName("disabled-bg-color")]=u,n[r.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${r.cssVarName("color-white")})`,n[r.cssVarBlockName("disabled-border-color")]=u}}}return n})}const Abt=a.defineComponent({name:"ElButton"}),Obt=a.defineComponent({...Abt,props:cK,emits:gbt,setup(e,{expose:t,emit:r}){const n=e,i=Ebt(n),o=xi("button"),{_ref:s,_size:l,_type:c,_disabled:u,_props:d,shouldAddSpace:h,handleClick:p}=pbt(n,r);return t({ref:s,size:l,type:c,disabled:u,shouldAddSpace:h}),(f,m)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(f.tag),a.mergeProps({ref_key:"_ref",ref:s},a.unref(d),{class:[a.unref(o).b(),a.unref(o).m(a.unref(c)),a.unref(o).m(a.unref(l)),a.unref(o).is("disabled",a.unref(u)),a.unref(o).is("loading",f.loading),a.unref(o).is("plain",f.plain),a.unref(o).is("round",f.round),a.unref(o).is("circle",f.circle),a.unref(o).is("text",f.text),a.unref(o).is("link",f.link),a.unref(o).is("has-bg",f.bg)],style:a.unref(i),onClick:a.unref(p)}),{default:a.withCtx(()=>[f.loading?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[f.$slots.loading?a.renderSlot(f.$slots,"loading",{key:0}):(a.openBlock(),a.createBlock(a.unref(Fl),{key:1,class:a.normalizeClass(a.unref(o).is("loading"))},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(f.loadingIcon)))]),_:1},8,["class"]))],64)):f.icon||f.$slots.icon?(a.openBlock(),a.createBlock(a.unref(Fl),{key:1},{default:a.withCtx(()=>[f.icon?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(f.icon),{key:0})):a.renderSlot(f.$slots,"icon",{key:1})]),_:3})):a.createCommentVNode("v-if",!0),f.$slots.default?(a.openBlock(),a.createElementBlock("span",{key:2,class:a.normalizeClass({[a.unref(o).em("text","expand")]:a.unref(h)})},[a.renderSlot(f.$slots,"default")],2)):a.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var Pbt=wi(Obt,[["__file","button.vue"]]);const Ibt={size:cK.size,type:cK.type},Hbt=a.defineComponent({name:"ElButtonGroup"}),Vbt=a.defineComponent({...Hbt,props:Ibt,setup(e){const t=e;a.provide(D8e,a.reactive({size:a.toRef(t,"size"),type:a.toRef(t,"type")}));const r=xi("button");return(n,i)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(`${a.unref(r).b("group")}`)},[a.renderSlot(n.$slots,"default")],2))}});var q8e=wi(Vbt,[["__file","button-group.vue"]]);const l3=F1(Pbt,{ButtonGroup:q8e});i3(q8e);var ce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function KT(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Rbt(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}const Z5=new Map;let Z8e;Ts&&(document.addEventListener("mousedown",e=>Z8e=e),document.addEventListener("mouseup",e=>{for(const t of Z5.values())for(const{documentHandler:r}of t)r(e,Z8e)}));function X8e(e,t){let r=[];return Array.isArray(t.arg)?r=t.arg:eL(t.arg)&&r.push(t.arg),function(n,i){const o=t.instance.popperRef,s=n.target,l=i==null?void 0:i.target,c=!t||!t.instance,u=!s||!l,d=e.contains(s)||e.contains(l),h=e===s,p=r.length&&r.some(m=>m==null?void 0:m.contains(s))||r.length&&r.includes(l),f=o&&(o.contains(s)||o.contains(l));c||u||d||h||p||f||t.value(n,i)}}const K8e={beforeMount(e,t){Z5.has(e)||Z5.set(e,[]),Z5.get(e).push({documentHandler:X8e(e,t),bindingFn:t.value})},updated(e,t){Z5.has(e)||Z5.set(e,[]);const r=Z5.get(e),n=r.findIndex(o=>o.bindingFn===t.oldValue),i={documentHandler:X8e(e,t),bindingFn:t.value};n>=0?r.splice(n,1,i):r.push(i)},unmounted(e){Z5.delete(e)}},Nbt=Lo({header:{type:String,default:""},footer:{type:String,default:""},bodyStyle:{type:di([String,Object,Array]),default:""},bodyClass:String,shadow:{type:String,values:["always","hover","never"],default:"always"}}),Bbt=a.defineComponent({name:"ElCard"}),Fbt=a.defineComponent({...Bbt,props:Nbt,setup(e){const t=xi("card");return(r,n)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([a.unref(t).b(),a.unref(t).is(`${r.shadow}-shadow`)])},[r.$slots.header||r.header?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(a.unref(t).e("header"))},[a.renderSlot(r.$slots,"header",{},()=>[a.createTextVNode(a.toDisplayString(r.header),1)])],2)):a.createCommentVNode("v-if",!0),a.createElementVNode("div",{class:a.normalizeClass([a.unref(t).e("body"),r.bodyClass]),style:a.normalizeStyle(r.bodyStyle)},[a.renderSlot(r.$slots,"default")],6),r.$slots.footer||r.footer?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(a.unref(t).e("footer"))},[a.renderSlot(r.$slots,"footer",{},()=>[a.createTextVNode(a.toDisplayString(r.footer),1)])],2)):a.createCommentVNode("v-if",!0)],2))}});var Dbt=wi(Fbt,[["__file","card.vue"]]);const Y8e=F1(Dbt),J8e={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:z5,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0}},$8e={[vs]:e=>Rl(e)||Nl(e)||of(e),change:e=>Rl(e)||Nl(e)||of(e)},YT=Symbol("checkboxGroupContextKey"),zbt=({model:e,isChecked:t})=>{const r=a.inject(YT,void 0),n=a.computed(()=>{var i,o;const s=(i=r==null?void 0:r.max)==null?void 0:i.value,l=(o=r==null?void 0:r.min)==null?void 0:o.value;return!$w(s)&&e.value.length>=s&&!t.value||!$w(l)&&e.value.length<=l&&t.value});return{isDisabled:WT(a.computed(()=>(r==null?void 0:r.disabled.value)||n.value)),isLimitDisabled:n}},jbt=(e,{model:t,isLimitExceeded:r,hasOwnLabel:n,isDisabled:i,isLabeledByFormItem:o})=>{const s=a.inject(YT,void 0),{formItem:l}=U5(),{emit:c}=a.getCurrentInstance();function u(m){var g,T;return m===e.trueLabel||m===!0?(g=e.trueLabel)!=null?g:!0:(T=e.falseLabel)!=null?T:!1}function d(m,g){c("change",u(m),g)}function h(m){if(r.value)return;const g=m.target;c("change",u(g.checked),m)}async function p(m){r.value||!n.value&&!i.value&&o.value&&(m.composedPath().some(g=>g.tagName==="LABEL")||(t.value=u([!1,e.falseLabel].includes(t.value)),await a.nextTick(),d(t.value,m)))}const f=a.computed(()=>(s==null?void 0:s.validateEvent)||e.validateEvent);return a.watch(()=>e.modelValue,()=>{f.value&&(l==null||l.validate("change").catch(m=>Bl(m)))}),{handleChange:h,onClickRoot:p}},Ubt=e=>{const t=a.ref(!1),{emit:r}=a.getCurrentInstance(),n=a.inject(YT,void 0),i=a.computed(()=>$w(n)===!1),o=a.ref(!1),s=a.computed({get(){var l,c;return i.value?(l=n==null?void 0:n.modelValue)==null?void 0:l.value:(c=e.modelValue)!=null?c:t.value},set(l){var c,u;i.value&&Qc(l)?(o.value=((c=n==null?void 0:n.max)==null?void 0:c.value)!==void 0&&l.length>(n==null?void 0:n.max.value)&&l.length>s.value.length,o.value===!1&&((u=n==null?void 0:n.changeEvent)==null||u.call(n,l))):(r(vs,l),t.value=l)}});return{model:s,isGroup:i,isLimitExceeded:o}},Gbt=(e,t,{model:r})=>{const n=a.inject(YT,void 0),i=a.ref(!1),o=a.computed(()=>{const u=r.value;return of(u)?u:Qc(u)?B1(e.label)?u.map(a.toRaw).some(d=>Jw(d,e.label)):u.map(a.toRaw).includes(e.label):u!=null?u===e.trueLabel:!!u}),s=j5(a.computed(()=>{var u;return(u=n==null?void 0:n.size)==null?void 0:u.value}),{prop:!0}),l=j5(a.computed(()=>{var u;return(u=n==null?void 0:n.size)==null?void 0:u.value})),c=a.computed(()=>!!t.default||!N5(e.label));return{checkboxButtonSize:s,isChecked:o,isFocused:i,checkboxSize:l,hasOwnLabel:c}},Wbt=(e,{model:t})=>{function r(){Qc(t.value)&&!t.value.includes(e.label)?t.value.push(e.label):t.value=e.trueLabel||!0}e.checked&&r()},e7e=(e,t)=>{const{formItem:r}=U5(),{model:n,isGroup:i,isLimitExceeded:o}=Ubt(e),{isFocused:s,isChecked:l,checkboxButtonSize:c,checkboxSize:u,hasOwnLabel:d}=Gbt(e,t,{model:n}),{isDisabled:h}=zbt({model:n,isChecked:l}),{inputId:p,isLabeledByFormItem:f}=qT(e,{formItemContext:r,disableIdGeneration:d,disableIdManagement:i}),{handleChange:m,onClickRoot:g}=jbt(e,{model:n,isLimitExceeded:o,hasOwnLabel:d,isDisabled:h,isLabeledByFormItem:f});return Wbt(e,{model:n}),{inputId:p,isLabeledByFormItem:f,isChecked:l,isDisabled:h,isFocused:s,checkboxButtonSize:c,checkboxSize:u,hasOwnLabel:d,model:n,handleChange:m,onClickRoot:g}},qbt=["id","indeterminate","name","tabindex","disabled","true-value","false-value"],Zbt=["id","indeterminate","disabled","value","name","tabindex"],Xbt=a.defineComponent({name:"ElCheckbox"}),Kbt=a.defineComponent({...Xbt,props:J8e,emits:$8e,setup(e){const t=e,r=a.useSlots(),{inputId:n,isLabeledByFormItem:i,isChecked:o,isDisabled:s,isFocused:l,checkboxSize:c,hasOwnLabel:u,model:d,handleChange:h,onClickRoot:p}=e7e(t,r),f=xi("checkbox"),m=a.computed(()=>[f.b(),f.m(c.value),f.is("disabled",s.value),f.is("bordered",t.border),f.is("checked",o.value)]),g=a.computed(()=>[f.e("input"),f.is("disabled",s.value),f.is("checked",o.value),f.is("indeterminate",t.indeterminate),f.is("focus",l.value)]);return(T,y)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(!a.unref(u)&&a.unref(i)?"span":"label"),{class:a.normalizeClass(a.unref(m)),"aria-controls":T.indeterminate?T.controls:null,onClick:a.unref(p)},{default:a.withCtx(()=>[a.createElementVNode("span",{class:a.normalizeClass(a.unref(g))},[T.trueLabel||T.falseLabel?a.withDirectives((a.openBlock(),a.createElementBlock("input",{key:0,id:a.unref(n),"onUpdate:modelValue":y[0]||(y[0]=v=>a.isRef(d)?d.value=v:null),class:a.normalizeClass(a.unref(f).e("original")),type:"checkbox",indeterminate:T.indeterminate,name:T.name,tabindex:T.tabindex,disabled:a.unref(s),"true-value":T.trueLabel,"false-value":T.falseLabel,onChange:y[1]||(y[1]=(...v)=>a.unref(h)&&a.unref(h)(...v)),onFocus:y[2]||(y[2]=v=>l.value=!0),onBlur:y[3]||(y[3]=v=>l.value=!1),onClick:y[4]||(y[4]=a.withModifiers(()=>{},["stop"]))},null,42,qbt)),[[a.vModelCheckbox,a.unref(d)]]):a.withDirectives((a.openBlock(),a.createElementBlock("input",{key:1,id:a.unref(n),"onUpdate:modelValue":y[5]||(y[5]=v=>a.isRef(d)?d.value=v:null),class:a.normalizeClass(a.unref(f).e("original")),type:"checkbox",indeterminate:T.indeterminate,disabled:a.unref(s),value:T.label,name:T.name,tabindex:T.tabindex,onChange:y[6]||(y[6]=(...v)=>a.unref(h)&&a.unref(h)(...v)),onFocus:y[7]||(y[7]=v=>l.value=!0),onBlur:y[8]||(y[8]=v=>l.value=!1),onClick:y[9]||(y[9]=a.withModifiers(()=>{},["stop"]))},null,42,Zbt)),[[a.vModelCheckbox,a.unref(d)]]),a.createElementVNode("span",{class:a.normalizeClass(a.unref(f).e("inner"))},null,2)],2),a.unref(u)?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(a.unref(f).e("label"))},[a.renderSlot(T.$slots,"default"),T.$slots.default?a.createCommentVNode("v-if",!0):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode(a.toDisplayString(T.label),1)],64))],2)):a.createCommentVNode("v-if",!0)]),_:3},8,["class","aria-controls","onClick"]))}});var Ybt=wi(Kbt,[["__file","checkbox.vue"]]);const Jbt=["name","tabindex","disabled","true-value","false-value"],$bt=["name","tabindex","disabled","value"],eQt=a.defineComponent({name:"ElCheckboxButton"}),tQt=a.defineComponent({...eQt,props:J8e,emits:$8e,setup(e){const t=e,r=a.useSlots(),{isFocused:n,isChecked:i,isDisabled:o,checkboxButtonSize:s,model:l,handleChange:c}=e7e(t,r),u=a.inject(YT,void 0),d=xi("checkbox"),h=a.computed(()=>{var f,m,g,T;const y=(m=(f=u==null?void 0:u.fill)==null?void 0:f.value)!=null?m:"";return{backgroundColor:y,borderColor:y,color:(T=(g=u==null?void 0:u.textColor)==null?void 0:g.value)!=null?T:"",boxShadow:y?`-1px 0 0 0 ${y}`:void 0}}),p=a.computed(()=>[d.b("button"),d.bm("button",s.value),d.is("disabled",o.value),d.is("checked",i.value),d.is("focus",n.value)]);return(f,m)=>(a.openBlock(),a.createElementBlock("label",{class:a.normalizeClass(a.unref(p))},[f.trueLabel||f.falseLabel?a.withDirectives((a.openBlock(),a.createElementBlock("input",{key:0,"onUpdate:modelValue":m[0]||(m[0]=g=>a.isRef(l)?l.value=g:null),class:a.normalizeClass(a.unref(d).be("button","original")),type:"checkbox",name:f.name,tabindex:f.tabindex,disabled:a.unref(o),"true-value":f.trueLabel,"false-value":f.falseLabel,onChange:m[1]||(m[1]=(...g)=>a.unref(c)&&a.unref(c)(...g)),onFocus:m[2]||(m[2]=g=>n.value=!0),onBlur:m[3]||(m[3]=g=>n.value=!1),onClick:m[4]||(m[4]=a.withModifiers(()=>{},["stop"]))},null,42,Jbt)),[[a.vModelCheckbox,a.unref(l)]]):a.withDirectives((a.openBlock(),a.createElementBlock("input",{key:1,"onUpdate:modelValue":m[5]||(m[5]=g=>a.isRef(l)?l.value=g:null),class:a.normalizeClass(a.unref(d).be("button","original")),type:"checkbox",name:f.name,tabindex:f.tabindex,disabled:a.unref(o),value:f.label,onChange:m[6]||(m[6]=(...g)=>a.unref(c)&&a.unref(c)(...g)),onFocus:m[7]||(m[7]=g=>n.value=!0),onBlur:m[8]||(m[8]=g=>n.value=!1),onClick:m[9]||(m[9]=a.withModifiers(()=>{},["stop"]))},null,42,$bt)),[[a.vModelCheckbox,a.unref(l)]]),f.$slots.default||f.label?(a.openBlock(),a.createElementBlock("span",{key:2,class:a.normalizeClass(a.unref(d).be("button","inner")),style:a.normalizeStyle(a.unref(i)?a.unref(h):void 0)},[a.renderSlot(f.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(f.label),1)])],6)):a.createCommentVNode("v-if",!0)],2))}});var t7e=wi(tQt,[["__file","checkbox-button.vue"]]);const rQt=Lo({modelValue:{type:di(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:z5,label:String,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0}}),nQt={[vs]:e=>Qc(e),change:e=>Qc(e)},iQt=a.defineComponent({name:"ElCheckboxGroup"}),oQt=a.defineComponent({...iQt,props:rQt,emits:nQt,setup(e,{emit:t}){const r=e,n=xi("checkbox"),{formItem:i}=U5(),{inputId:o,isLabeledByFormItem:s}=qT(r,{formItemContext:i}),l=async u=>{t(vs,u),await a.nextTick(),t("change",u)},c=a.computed({get(){return r.modelValue},set(u){l(u)}});return a.provide(YT,{...y9t(a.toRefs(r),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:c,changeEvent:l}),a.watch(()=>r.modelValue,()=>{r.validateEvent&&(i==null||i.validate("change").catch(u=>Bl(u)))}),(u,d)=>{var h;return a.openBlock(),a.createBlock(a.resolveDynamicComponent(u.tag),{id:a.unref(o),class:a.normalizeClass(a.unref(n).b("group")),role:"group","aria-label":a.unref(s)?void 0:u.label||"checkbox-group","aria-labelledby":a.unref(s)?(h=a.unref(i))==null?void 0:h.labelId:void 0},{default:a.withCtx(()=>[a.renderSlot(u.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var r7e=wi(oQt,[["__file","checkbox-group.vue"]]);const gI=F1(Ybt,{CheckboxButton:t7e,CheckboxGroup:r7e});i3(t7e);const fK=i3(r7e),n7e=Lo({size:z5,disabled:Boolean,label:{type:[String,Number,Boolean],default:""}}),aQt=Lo({...n7e,modelValue:{type:[String,Number,Boolean],default:""},name:{type:String,default:""},border:Boolean}),i7e={[vs]:e=>Rl(e)||Nl(e)||of(e),[$P]:e=>Rl(e)||Nl(e)||of(e)},o7e=Symbol("radioGroupKey"),a7e=(e,t)=>{const r=a.ref(),n=a.inject(o7e,void 0),i=a.computed(()=>!!n),o=a.computed({get(){return i.value?n.modelValue:e.modelValue},set(d){i.value?n.changeEvent(d):t&&t(vs,d),r.value.checked=e.modelValue===e.label}}),s=j5(a.computed(()=>n==null?void 0:n.size)),l=WT(a.computed(()=>n==null?void 0:n.disabled)),c=a.ref(!1),u=a.computed(()=>l.value||i.value&&o.value!==e.label?-1:0);return{radioRef:r,isGroup:i,radioGroup:n,focus:c,size:s,disabled:l,tabIndex:u,modelValue:o}},sQt=["value","name","disabled"],lQt=a.defineComponent({name:"ElRadio"}),cQt=a.defineComponent({...lQt,props:aQt,emits:i7e,setup(e,{emit:t}){const r=e,n=xi("radio"),{radioRef:i,radioGroup:o,focus:s,size:l,disabled:c,modelValue:u}=a7e(r,t);function d(){a.nextTick(()=>t("change",u.value))}return(h,p)=>{var f;return a.openBlock(),a.createElementBlock("label",{class:a.normalizeClass([a.unref(n).b(),a.unref(n).is("disabled",a.unref(c)),a.unref(n).is("focus",a.unref(s)),a.unref(n).is("bordered",h.border),a.unref(n).is("checked",a.unref(u)===h.label),a.unref(n).m(a.unref(l))])},[a.createElementVNode("span",{class:a.normalizeClass([a.unref(n).e("input"),a.unref(n).is("disabled",a.unref(c)),a.unref(n).is("checked",a.unref(u)===h.label)])},[a.withDirectives(a.createElementVNode("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":p[0]||(p[0]=m=>a.isRef(u)?u.value=m:null),class:a.normalizeClass(a.unref(n).e("original")),value:h.label,name:h.name||((f=a.unref(o))==null?void 0:f.name),disabled:a.unref(c),type:"radio",onFocus:p[1]||(p[1]=m=>s.value=!0),onBlur:p[2]||(p[2]=m=>s.value=!1),onChange:d,onClick:p[3]||(p[3]=a.withModifiers(()=>{},["stop"]))},null,42,sQt),[[a.vModelRadio,a.unref(u)]]),a.createElementVNode("span",{class:a.normalizeClass(a.unref(n).e("inner"))},null,2)],2),a.createElementVNode("span",{class:a.normalizeClass(a.unref(n).e("label")),onKeydown:p[4]||(p[4]=a.withModifiers(()=>{},["stop"]))},[a.renderSlot(h.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(h.label),1)])],34)],2)}}});var uQt=wi(cQt,[["__file","radio.vue"]]);const dQt=Lo({...n7e,name:{type:String,default:""}}),hQt=["value","name","disabled"],pQt=a.defineComponent({name:"ElRadioButton"}),fQt=a.defineComponent({...pQt,props:dQt,setup(e){const t=e,r=xi("radio"),{radioRef:n,focus:i,size:o,disabled:s,modelValue:l,radioGroup:c}=a7e(t),u=a.computed(()=>({backgroundColor:(c==null?void 0:c.fill)||"",borderColor:(c==null?void 0:c.fill)||"",boxShadow:c!=null&&c.fill?`-1px 0 0 0 ${c.fill}`:"",color:(c==null?void 0:c.textColor)||""}));return(d,h)=>{var p;return a.openBlock(),a.createElementBlock("label",{class:a.normalizeClass([a.unref(r).b("button"),a.unref(r).is("active",a.unref(l)===d.label),a.unref(r).is("disabled",a.unref(s)),a.unref(r).is("focus",a.unref(i)),a.unref(r).bm("button",a.unref(o))])},[a.withDirectives(a.createElementVNode("input",{ref_key:"radioRef",ref:n,"onUpdate:modelValue":h[0]||(h[0]=f=>a.isRef(l)?l.value=f:null),class:a.normalizeClass(a.unref(r).be("button","original-radio")),value:d.label,type:"radio",name:d.name||((p=a.unref(c))==null?void 0:p.name),disabled:a.unref(s),onFocus:h[1]||(h[1]=f=>i.value=!0),onBlur:h[2]||(h[2]=f=>i.value=!1),onClick:h[3]||(h[3]=a.withModifiers(()=>{},["stop"]))},null,42,hQt),[[a.vModelRadio,a.unref(l)]]),a.createElementVNode("span",{class:a.normalizeClass(a.unref(r).be("button","inner")),style:a.normalizeStyle(a.unref(l)===d.label?a.unref(u):{}),onKeydown:h[4]||(h[4]=a.withModifiers(()=>{},["stop"]))},[a.renderSlot(d.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(d.label),1)])],38)],2)}}});var s7e=wi(fQt,[["__file","radio-button.vue"]]);const mQt=Lo({id:{type:String,default:void 0},size:z5,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}}),gQt=i7e,yQt=["id","aria-label","aria-labelledby"],TQt=a.defineComponent({name:"ElRadioGroup"}),vQt=a.defineComponent({...TQt,props:mQt,emits:gQt,setup(e,{emit:t}){const r=e,n=xi("radio"),i=ag(),o=a.ref(),{formItem:s}=U5(),{inputId:l,isLabeledByFormItem:c}=qT(r,{formItemContext:s}),u=h=>{t(vs,h),a.nextTick(()=>t("change",h))};a.onMounted(()=>{const h=o.value.querySelectorAll("[type=radio]"),p=h[0];!Array.from(h).some(f=>f.checked)&&p&&(p.tabIndex=0)});const d=a.computed(()=>r.name||i.value);return a.provide(o7e,a.reactive({...a.toRefs(r),changeEvent:u,name:d})),a.watch(()=>r.modelValue,()=>{r.validateEvent&&(s==null||s.validate("change").catch(h=>Bl(h)))}),(h,p)=>(a.openBlock(),a.createElementBlock("div",{id:a.unref(l),ref_key:"radioGroupRef",ref:o,class:a.normalizeClass(a.unref(n).b("group")),role:"radiogroup","aria-label":a.unref(c)?void 0:h.label||"radio-group","aria-labelledby":a.unref(c)?a.unref(s).labelId:void 0},[a.renderSlot(h.$slots,"default")],10,yQt))}});var l7e=wi(vQt,[["__file","radio-group.vue"]]);const c7e=F1(uQt,{RadioButton:s7e,RadioGroup:l7e}),u7e=i3(l7e);i3(s7e);const d7e=Lo({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Ome},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),bQt={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},QQt=a.defineComponent({name:"ElTag"}),xQt=a.defineComponent({...QQt,props:d7e,emits:bQt,setup(e,{emit:t}){const r=e,n=j5(),i=xi("tag"),o=a.computed(()=>{const{type:c,hit:u,effect:d,closable:h,round:p}=r;return[i.b(),i.is("closable",h),i.m(c||"primary"),i.m(n.value),i.m(d),i.is("hit",u),i.is("round",p)]}),s=c=>{t("close",c)},l=c=>{t("click",c)};return(c,u)=>c.disableTransitions?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(a.unref(o)),style:a.normalizeStyle({backgroundColor:c.color}),onClick:l},[a.createElementVNode("span",{class:a.normalizeClass(a.unref(i).e("content"))},[a.renderSlot(c.$slots,"default")],2),c.closable?(a.openBlock(),a.createBlock(a.unref(Fl),{key:0,class:a.normalizeClass(a.unref(i).e("close")),onClick:a.withModifiers(s,["stop"])},{default:a.withCtx(()=>[a.createVNode(a.unref(NT))]),_:1},8,["class","onClick"])):a.createCommentVNode("v-if",!0)],6)):(a.openBlock(),a.createBlock(a.Transition,{key:1,name:`${a.unref(i).namespace.value}-zoom-in-center`,appear:""},{default:a.withCtx(()=>[a.createElementVNode("span",{class:a.normalizeClass(a.unref(o)),style:a.normalizeStyle({backgroundColor:c.color}),onClick:l},[a.createElementVNode("span",{class:a.normalizeClass(a.unref(i).e("content"))},[a.renderSlot(c.$slots,"default")],2),c.closable?(a.openBlock(),a.createBlock(a.unref(Fl),{key:0,class:a.normalizeClass(a.unref(i).e("close")),onClick:a.withModifiers(s,["stop"])},{default:a.withCtx(()=>[a.createVNode(a.unref(NT))]),_:1},8,["class","onClick"])):a.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var _Qt=wi(xQt,[["__file","tag.vue"]]);const wQt=F1(_Qt),h7e=Symbol("rowContextKey"),LQt=["start","center","end","space-around","space-between","space-evenly"],SQt=["top","middle","bottom"],MQt=Lo({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:LQt,default:"start"},align:{type:String,values:SQt}}),kQt=a.defineComponent({name:"ElRow"}),CQt=a.defineComponent({...kQt,props:MQt,setup(e){const t=e,r=xi("row"),n=a.computed(()=>t.gutter);a.provide(h7e,{gutter:n});const i=a.computed(()=>{const s={};return t.gutter&&(s.marginRight=s.marginLeft=`-${t.gutter/2}px`),s}),o=a.computed(()=>[r.b(),r.is(`justify-${t.justify}`,t.justify!=="start"),r.is(`align-${t.align}`,!!t.align)]);return(s,l)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(s.tag),{class:a.normalizeClass(a.unref(o)),style:a.normalizeStyle(a.unref(i))},{default:a.withCtx(()=>[a.renderSlot(s.$slots,"default")]),_:3},8,["class","style"]))}});var EQt=wi(CQt,[["__file","row.vue"]]);const c3=F1(EQt),AQt=Lo({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:di([Number,Object]),default:()=>BT({})},sm:{type:di([Number,Object]),default:()=>BT({})},md:{type:di([Number,Object]),default:()=>BT({})},lg:{type:di([Number,Object]),default:()=>BT({})},xl:{type:di([Number,Object]),default:()=>BT({})}}),OQt=a.defineComponent({name:"ElCol"}),PQt=a.defineComponent({...OQt,props:AQt,setup(e){const t=e,{gutter:r}=a.inject(h7e,{gutter:a.computed(()=>0)}),n=xi("col"),i=a.computed(()=>{const s={};return r.value&&(s.paddingLeft=s.paddingRight=`${r.value/2}px`),s}),o=a.computed(()=>{const s=[];return["span","offset","pull","push"].forEach(l=>{const c=t[l];Nl(c)&&(l==="span"?s.push(n.b(`${t[l]}`)):c>0&&s.push(n.b(`${l}-${t[l]}`)))}),["xs","sm","md","lg","xl"].forEach(l=>{Nl(t[l])?s.push(n.b(`${l}-${t[l]}`)):B1(t[l])&&Object.entries(t[l]).forEach(([c,u])=>{s.push(c!=="span"?n.b(`${l}-${c}-${u}`):n.b(`${l}-${u}`))})}),r.value&&s.push(n.is("guttered")),[n.b(),s]});return(s,l)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(s.tag),{class:a.normalizeClass(a.unref(o)),style:a.normalizeStyle(a.unref(i))},{default:a.withCtx(()=>[a.renderSlot(s.$slots,"default")]),_:3},8,["class","style"]))}});var IQt=wi(PQt,[["__file","col.vue"]]);const Rh=F1(IQt),HQt=a.defineComponent({name:"ElCollapseTransition"}),VQt=a.defineComponent({...HQt,setup(e){const t=xi("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)=>(a.openBlock(),a.createBlock(a.Transition,a.mergeProps({name:a.unref(t).b()},a.toHandlers(n)),{default:a.withCtx(()=>[a.renderSlot(i.$slots,"default")]),_:3},16,["name"]))}});var yI=wi(VQt,[["__file","collapse-transition.vue"]]);yI.install=e=>{e.component(yI.name,yI)};const RQt=yI,NQt=Lo({color:{type:di(Object),required:!0},vertical:{type:Boolean,default:!1}});let mK=!1;function pL(e,t){if(!Ts)return;const r=function(o){var s;(s=t.drag)==null||s.call(t,o)},n=function(o){var s;document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n),document.removeEventListener("touchmove",r),document.removeEventListener("touchend",n),document.onselectstart=null,document.ondragstart=null,mK=!1,(s=t.end)==null||s.call(t,o)},i=function(o){var s;mK||(o.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",r),document.addEventListener("mouseup",n),document.addEventListener("touchmove",r),document.addEventListener("touchend",n),mK=!0,(s=t.start)==null||s.call(t,o))};e.addEventListener("mousedown",i),e.addEventListener("touchstart",i)}const BQt=e=>{const t=a.getCurrentInstance(),r=a.shallowRef(),n=a.shallowRef();function i(s){s.target!==r.value&&o(s)}function o(s){if(!n.value||!r.value)return;const l=t.vnode.el.getBoundingClientRect(),{clientX:c,clientY:u}=gX(s);if(e.vertical){let d=u-l.top;d=Math.max(r.value.offsetHeight/2,d),d=Math.min(d,l.height-r.value.offsetHeight/2),e.color.set("alpha",Math.round((d-r.value.offsetHeight/2)/(l.height-r.value.offsetHeight)*100))}else{let d=c-l.left;d=Math.max(r.value.offsetWidth/2,d),d=Math.min(d,l.width-r.value.offsetWidth/2),e.color.set("alpha",Math.round((d-r.value.offsetWidth/2)/(l.width-r.value.offsetWidth)*100))}}return{thumb:r,bar:n,handleDrag:o,handleClick:i}},FQt=(e,{bar:t,thumb:r,handleDrag:n})=>{const i=a.getCurrentInstance(),o=xi("color-alpha-slider"),s=a.ref(0),l=a.ref(0),c=a.ref();function u(){if(!r.value||e.vertical)return 0;const v=i.vnode.el,_=e.color.get("alpha");return v?Math.round(_*(v.offsetWidth-r.value.offsetWidth/2)/100):0}function d(){if(!r.value)return 0;const v=i.vnode.el;if(!e.vertical)return 0;const _=e.color.get("alpha");return v?Math.round(_*(v.offsetHeight-r.value.offsetHeight/2)/100):0}function h(){if(e.color&&e.color.value){const{r:v,g:_,b}=e.color.toRgb();return`linear-gradient(to right, rgba(${v}, ${_}, ${b}, 0) 0%, rgba(${v}, ${_}, ${b}, 1) 100%)`}return""}function p(){s.value=u(),l.value=d(),c.value=h()}a.onMounted(()=>{if(!t.value||!r.value)return;const v={drag:_=>{n(_)},end:_=>{n(_)}};pL(t.value,v),pL(r.value,v),p()}),a.watch(()=>e.color.get("alpha"),()=>p()),a.watch(()=>e.color.value,()=>p());const f=a.computed(()=>[o.b(),o.is("vertical",e.vertical)]),m=a.computed(()=>o.e("bar")),g=a.computed(()=>o.e("thumb")),T=a.computed(()=>({background:c.value})),y=a.computed(()=>({left:af(s.value),top:af(l.value)}));return{rootKls:f,barKls:m,barStyle:T,thumbKls:g,thumbStyle:y,update:p}},DQt="ElColorAlphaSlider",zQt=a.defineComponent({name:DQt}),jQt=a.defineComponent({...zQt,props:NQt,setup(e,{expose:t}){const r=e,{bar:n,thumb:i,handleDrag:o,handleClick:s}=BQt(r),{rootKls:l,barKls:c,barStyle:u,thumbKls:d,thumbStyle:h,update:p}=FQt(r,{bar:n,thumb:i,handleDrag:o});return t({update:p,bar:n,thumb:i}),(f,m)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(a.unref(l))},[a.createElementVNode("div",{ref_key:"bar",ref:n,class:a.normalizeClass(a.unref(c)),style:a.normalizeStyle(a.unref(u)),onClick:m[0]||(m[0]=(...g)=>a.unref(s)&&a.unref(s)(...g))},null,6),a.createElementVNode("div",{ref_key:"thumb",ref:i,class:a.normalizeClass(a.unref(d)),style:a.normalizeStyle(a.unref(h))},null,6)],2))}});var UQt=wi(jQt,[["__file","alpha-slider.vue"]]);const GQt=a.defineComponent({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(e){const t=xi("color-hue-slider"),r=a.getCurrentInstance(),n=a.ref(),i=a.ref(),o=a.ref(0),s=a.ref(0),l=a.computed(()=>e.color.get("hue"));a.watch(()=>l.value,()=>{p()});function c(f){f.target!==n.value&&u(f)}function u(f){if(!i.value||!n.value)return;const m=r.vnode.el.getBoundingClientRect(),{clientX:g,clientY:T}=gX(f);let y;if(e.vertical){let v=T-m.top;v=Math.min(v,m.height-n.value.offsetHeight/2),v=Math.max(n.value.offsetHeight/2,v),y=Math.round((v-n.value.offsetHeight/2)/(m.height-n.value.offsetHeight)*360)}else{let v=g-m.left;v=Math.min(v,m.width-n.value.offsetWidth/2),v=Math.max(n.value.offsetWidth/2,v),y=Math.round((v-n.value.offsetWidth/2)/(m.width-n.value.offsetWidth)*360)}e.color.set("hue",y)}function d(){if(!n.value)return 0;const f=r.vnode.el;if(e.vertical)return 0;const m=e.color.get("hue");return f?Math.round(m*(f.offsetWidth-n.value.offsetWidth/2)/360):0}function h(){if(!n.value)return 0;const f=r.vnode.el;if(!e.vertical)return 0;const m=e.color.get("hue");return f?Math.round(m*(f.offsetHeight-n.value.offsetHeight/2)/360):0}function p(){o.value=d(),s.value=h()}return a.onMounted(()=>{if(!i.value||!n.value)return;const f={drag:m=>{u(m)},end:m=>{u(m)}};pL(i.value,f),pL(n.value,f),p()}),{bar:i,thumb:n,thumbLeft:o,thumbTop:s,hueValue:l,handleClick:c,update:p,ns:t}}});function WQt(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([e.ns.b(),e.ns.is("vertical",e.vertical)])},[a.createElementVNode("div",{ref:"bar",class:a.normalizeClass(e.ns.e("bar")),onClick:t[0]||(t[0]=(...s)=>e.handleClick&&e.handleClick(...s))},null,2),a.createElementVNode("div",{ref:"thumb",class:a.normalizeClass(e.ns.e("thumb")),style:a.normalizeStyle({left:e.thumbLeft+"px",top:e.thumbTop+"px"})},null,6)],2)}var qQt=wi(GQt,[["render",WQt],["__file","hue-slider.vue"]]);const ZQt=Lo({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:z5,popperClass:{type:String,default:""},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},predefine:{type:di(Array)},validateEvent:{type:Boolean,default:!0}}),XQt={[vs]:e=>Rl(e)||N5(e),[$P]:e=>Rl(e)||N5(e),activeChange:e=>Rl(e)||N5(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},p7e=Symbol("colorPickerContextKey"),f7e=function(e,t,r){return[e,t*r/((e=(2-t)*r)<1?e:2-e)||0,e/2]},KQt=function(e){return typeof e=="string"&&e.includes(".")&&Number.parseFloat(e)===1},YQt=function(e){return typeof e=="string"&&e.includes("%")},JT=function(e,t){KQt(e)&&(e="100%");const r=YQt(e);return e=Math.min(t,Math.max(0,Number.parseFloat(`${e}`))),r&&(e=Number.parseInt(`${e*t}`,10)/100),Math.abs(e-t)<1e-6?1:e%t/Number.parseFloat(t)},m7e={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},TI=e=>{e=Math.min(Math.round(e),255);const t=Math.floor(e/16),r=e%16;return`${m7e[t]||t}${m7e[r]||r}`},g7e=function({r:e,g:t,b:r}){return Number.isNaN(+e)||Number.isNaN(+t)||Number.isNaN(+r)?"":`#${TI(e)}${TI(t)}${TI(r)}`},gK={A:10,B:11,C:12,D:13,E:14,F:15},lg=function(e){return e.length===2?(gK[e[0].toUpperCase()]||+e[0])*16+(gK[e[1].toUpperCase()]||+e[1]):gK[e[1].toUpperCase()]||+e[1]},JQt=function(e,t,r){t=t/100,r=r/100;let n=t;const i=Math.max(r,.01);r*=2,t*=r<=1?r:2-r,n*=i<=1?i:2-i;const o=(r+t)/2,s=r===0?2*n/(i+n):2*t/(r+t);return{h:e,s:s*100,v:o*100}},y7e=(e,t,r)=>{e=JT(e,255),t=JT(t,255),r=JT(r,255);const n=Math.max(e,t,r),i=Math.min(e,t,r);let o;const s=n,l=n-i,c=n===0?0:l/n;if(n===i)o=0;else{switch(n){case e:{o=(t-r)/l+(t<r?6:0);break}case t:{o=(r-e)/l+2;break}case r:{o=(e-t)/l+4;break}}o/=6}return{h:o*360,s:c*100,v:s*100}},fL=function(e,t,r){e=JT(e,360)*6,t=JT(t,100),r=JT(r,100);const n=Math.floor(e),i=e-n,o=r*(1-t),s=r*(1-i*t),l=r*(1-(1-i)*t),c=n%6,u=[r,s,o,o,l,r][c],d=[l,r,r,s,o,o][c],h=[o,o,l,r,r,s][c];return{r:Math.round(u*255),g:Math.round(d*255),b:Math.round(h*255)}};let mL=class{constructor(t={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this.enableAlpha=!1,this.format="hex",this.value="";for(const r in t)J7(t,r)&&(this[r]=t[r]);t.value?this.fromString(t.value):this.doOnChange()}set(t,r){if(arguments.length===1&&typeof t=="object"){for(const n in t)J7(t,n)&&this.set(n,t[n]);return}this[`_${t}`]=r,this.doOnChange()}get(t){return t==="alpha"?Math.floor(this[`_${t}`]):this[`_${t}`]}toRgb(){return fL(this._hue,this._saturation,this._value)}fromString(t){if(!t){this._hue=0,this._saturation=100,this._value=100,this.doOnChange();return}const r=(n,i,o)=>{this._hue=Math.max(0,Math.min(360,n)),this._saturation=Math.max(0,Math.min(100,i)),this._value=Math.max(0,Math.min(100,o)),this.doOnChange()};if(t.includes("hsl")){const n=t.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));if(n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3){const{h:i,s:o,v:s}=JQt(n[0],n[1],n[2]);r(i,o,s)}}else if(t.includes("hsv")){const n=t.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3&&r(n[0],n[1],n[2])}else if(t.includes("rgb")){const n=t.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));if(n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3){const{h:i,s:o,v:s}=y7e(n[0],n[1],n[2]);r(i,o,s)}}else if(t.includes("#")){const n=t.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(n))return;let i,o,s;n.length===3?(i=lg(n[0]+n[0]),o=lg(n[1]+n[1]),s=lg(n[2]+n[2])):(n.length===6||n.length===8)&&(i=lg(n.slice(0,2)),o=lg(n.slice(2,4)),s=lg(n.slice(4,6))),n.length===8?this._alpha=lg(n.slice(6))/255*100:(n.length===3||n.length===6)&&(this._alpha=100);const{h:l,s:c,v:u}=y7e(i,o,s);r(l,c,u)}}compare(t){return Math.abs(t._hue-this._hue)<2&&Math.abs(t._saturation-this._saturation)<1&&Math.abs(t._value-this._value)<1&&Math.abs(t._alpha-this._alpha)<1}doOnChange(){const{_hue:t,_saturation:r,_value:n,_alpha:i,format:o}=this;if(this.enableAlpha)switch(o){case"hsl":{const s=f7e(t,r/100,n/100);this.value=`hsla(${t}, ${Math.round(s[1]*100)}%, ${Math.round(s[2]*100)}%, ${this.get("alpha")/100})`;break}case"hsv":{this.value=`hsva(${t}, ${Math.round(r)}%, ${Math.round(n)}%, ${this.get("alpha")/100})`;break}case"hex":{this.value=`${g7e(fL(t,r,n))}${TI(i*255/100)}`;break}default:{const{r:s,g:l,b:c}=fL(t,r,n);this.value=`rgba(${s}, ${l}, ${c}, ${this.get("alpha")/100})`}}else switch(o){case"hsl":{const s=f7e(t,r/100,n/100);this.value=`hsl(${t}, ${Math.round(s[1]*100)}%, ${Math.round(s[2]*100)}%)`;break}case"hsv":{this.value=`hsv(${t}, ${Math.round(r)}%, ${Math.round(n)}%)`;break}case"rgb":{const{r:s,g:l,b:c}=fL(t,r,n);this.value=`rgb(${s}, ${l}, ${c})`;break}default:this.value=g7e(fL(t,r,n))}}};const $Qt=a.defineComponent({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0}},setup(e){const t=xi("color-predefine"),{currentColor:r}=a.inject(p7e),n=a.ref(o(e.colors,e.color));a.watch(()=>r.value,s=>{const l=new mL;l.fromString(s),n.value.forEach(c=>{c.selected=l.compare(c)})}),a.watchEffect(()=>{n.value=o(e.colors,e.color)});function i(s){e.color.fromString(e.colors[s])}function o(s,l){return s.map(c=>{const u=new mL;return u.enableAlpha=!0,u.format="rgba",u.fromString(c),u.selected=u.value===l.value,u})}return{rgbaColors:n,handleSelect:i,ns:t}}}),ext=["onClick"];function txt(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(e.ns.b())},[a.createElementVNode("div",{class:a.normalizeClass(e.ns.e("colors"))},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.rgbaColors,(s,l)=>(a.openBlock(),a.createElementBlock("div",{key:e.colors[l],class:a.normalizeClass([e.ns.e("color-selector"),e.ns.is("alpha",s._alpha<100),{selected:s.selected}]),onClick:c=>e.handleSelect(l)},[a.createElementVNode("div",{style:a.normalizeStyle({backgroundColor:s.value})},null,4)],10,ext))),128))],2)],2)}var rxt=wi($Qt,[["render",txt],["__file","predefine.vue"]]);const nxt=a.defineComponent({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(e){const t=xi("color-svpanel"),r=a.getCurrentInstance(),n=a.ref(0),i=a.ref(0),o=a.ref("hsl(0, 100%, 50%)"),s=a.computed(()=>{const u=e.color.get("hue"),d=e.color.get("value");return{hue:u,value:d}});function l(){const u=e.color.get("saturation"),d=e.color.get("value"),h=r.vnode.el,{clientWidth:p,clientHeight:f}=h;i.value=u*p/100,n.value=(100-d)*f/100,o.value=`hsl(${e.color.get("hue")}, 100%, 50%)`}function c(u){const d=r.vnode.el.getBoundingClientRect(),{clientX:h,clientY:p}=gX(u);let f=h-d.left,m=p-d.top;f=Math.max(0,f),f=Math.min(f,d.width),m=Math.max(0,m),m=Math.min(m,d.height),i.value=f,n.value=m,e.color.set({saturation:f/d.width*100,value:100-m/d.height*100})}return a.watch(()=>s.value,()=>{l()}),a.onMounted(()=>{pL(r.vnode.el,{drag:u=>{c(u)},end:u=>{c(u)}}),l()}),{cursorTop:n,cursorLeft:i,background:o,colorValue:s,handleDrag:c,update:l,ns:t}}}),ixt=a.createElementVNode("div",null,null,-1),oxt=[ixt];function axt(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(e.ns.b()),style:a.normalizeStyle({backgroundColor:e.background})},[a.createElementVNode("div",{class:a.normalizeClass(e.ns.e("white"))},null,2),a.createElementVNode("div",{class:a.normalizeClass(e.ns.e("black"))},null,2),a.createElementVNode("div",{class:a.normalizeClass(e.ns.e("cursor")),style:a.normalizeStyle({top:e.cursorTop+"px",left:e.cursorLeft+"px"})},oxt,6)],6)}var sxt=wi(nxt,[["render",axt],["__file","sv-panel.vue"]]);const lxt=["onKeydown"],cxt=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"],uxt=a.defineComponent({name:"ElColorPicker"}),dxt=a.defineComponent({...uxt,props:ZQt,emits:XQt,setup(e,{expose:t,emit:r}){const n=e,{t:i}=tL(),o=xi("color"),{formItem:s}=U5(),l=j5(),c=WT(),{inputId:u,isLabeledByFormItem:d}=qT(n,{formItemContext:s}),h=a.ref(),p=a.ref(),f=a.ref(),m=a.ref(),g=a.ref(),T=a.ref(),{isFocused:y,handleFocus:v,handleBlur:_}=JX(g,{beforeBlur(ie){var Te;return(Te=m.value)==null?void 0:Te.isFocusInsideContent(ie)},afterBlur(){G(!1),U()}}),b=ie=>{if(c.value)return de();v(ie)};let L=!0;const w=a.reactive(new mL({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue})),M=a.ref(!1),C=a.ref(!1),A=a.ref(""),O=a.computed(()=>!n.modelValue&&!C.value?"transparent":j(w,n.showAlpha)),V=a.computed(()=>!n.modelValue&&!C.value?"":w.value),H=a.computed(()=>d.value?void 0:n.label||i("el.colorpicker.defaultLabel")),N=a.computed(()=>d.value?s==null?void 0:s.labelId:void 0),D=a.computed(()=>[o.b("picker"),o.is("disabled",c.value),o.bm("picker",l.value),o.is("focused",y.value)]);function j(ie,Te){if(!(ie instanceof mL))throw new TypeError("color should be instance of _color Class");const{r:Se,g:Ie,b:Ge}=ie.toRgb();return Te?`rgba(${Se}, ${Ie}, ${Ge}, ${ie.get("alpha")/100})`:`rgb(${Se}, ${Ie}, ${Ge})`}function G(ie){M.value=ie}const R=vme(G,100,{leading:!0});function Z(){c.value||G(!0)}function X(){R(!1),U()}function U(){a.nextTick(()=>{n.modelValue?w.fromString(n.modelValue):(w.value="",a.nextTick(()=>{C.value=!1}))})}function K(){c.value||R(!M.value)}function $(){w.fromString(A.value)}function le(){const ie=w.value;r(vs,ie),r("change",ie),n.validateEvent&&(s==null||s.validate("change").catch(Te=>Bl(Te))),R(!1),a.nextTick(()=>{const Te=new mL({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue});w.compare(Te)||U()})}function me(){R(!1),r(vs,null),r("change",null),n.modelValue!==null&&n.validateEvent&&(s==null||s.validate("change").catch(ie=>Bl(ie))),U()}function ge(ie){if(M.value&&(X(),y.value)){const Te=new FocusEvent("focus",ie);_(Te)}}function ae(ie){ie.preventDefault(),ie.stopPropagation(),G(!1),U()}function Qe(ie){switch(ie.code){case iu.enter:case iu.space:ie.preventDefault(),ie.stopPropagation(),Z(),T.value.focus();break;case iu.esc:ae(ie);break}}function ne(){g.value.focus()}function de(){g.value.blur()}return a.onMounted(()=>{n.modelValue&&(A.value=V.value)}),a.watch(()=>n.modelValue,ie=>{ie?ie&&ie!==w.value&&(L=!1,w.fromString(ie)):C.value=!1}),a.watch(()=>V.value,ie=>{A.value=ie,L&&r("activeChange",ie),L=!0}),a.watch(()=>w.value,()=>{!n.modelValue&&!C.value&&(C.value=!0)}),a.watch(()=>M.value,()=>{a.nextTick(()=>{var ie,Te,Se;(ie=h.value)==null||ie.update(),(Te=p.value)==null||Te.update(),(Se=f.value)==null||Se.update()})}),a.provide(p7e,{currentColor:V}),t({color:w,show:Z,hide:X,focus:ne,blur:de}),(ie,Te)=>(a.openBlock(),a.createBlock(a.unref(lK),{ref_key:"popper",ref:m,visible:M.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[a.unref(o).be("picker","panel"),a.unref(o).b("dropdown"),ie.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",transition:`${a.unref(o).namespace.value}-zoom-in-top`,persistent:"",onHide:Te[2]||(Te[2]=Se=>G(!1))},{content:a.withCtx(()=>[a.withDirectives((a.openBlock(),a.createElementBlock("div",{onKeydown:a.withKeys(ae,["esc"])},[a.createElementVNode("div",{class:a.normalizeClass(a.unref(o).be("dropdown","main-wrapper"))},[a.createVNode(qQt,{ref_key:"hue",ref:h,class:"hue-slider",color:a.unref(w),vertical:""},null,8,["color"]),a.createVNode(sxt,{ref_key:"sv",ref:p,color:a.unref(w)},null,8,["color"])],2),ie.showAlpha?(a.openBlock(),a.createBlock(UQt,{key:0,ref_key:"alpha",ref:f,color:a.unref(w)},null,8,["color"])):a.createCommentVNode("v-if",!0),ie.predefine?(a.openBlock(),a.createBlock(rxt,{key:1,ref:"predefine",color:a.unref(w),colors:ie.predefine},null,8,["color","colors"])):a.createCommentVNode("v-if",!0),a.createElementVNode("div",{class:a.normalizeClass(a.unref(o).be("dropdown","btns"))},[a.createElementVNode("span",{class:a.normalizeClass(a.unref(o).be("dropdown","value"))},[a.createVNode(a.unref(cI),{ref_key:"inputRef",ref:T,modelValue:A.value,"onUpdate:modelValue":Te[0]||(Te[0]=Se=>A.value=Se),"validate-event":!1,size:"small",onKeyup:a.withKeys($,["enter"]),onBlur:$},null,8,["modelValue","onKeyup"])],2),a.createVNode(a.unref(l3),{class:a.normalizeClass(a.unref(o).be("dropdown","link-btn")),text:"",size:"small",onClick:me},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(a.unref(i)("el.colorpicker.clear")),1)]),_:1},8,["class"]),a.createVNode(a.unref(l3),{plain:"",size:"small",class:a.normalizeClass(a.unref(o).be("dropdown","btn")),onClick:le},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(a.unref(i)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,lxt)),[[a.unref(K8e),ge]])]),default:a.withCtx(()=>[a.createElementVNode("div",{id:a.unref(u),ref_key:"triggerRef",ref:g,class:a.normalizeClass(a.unref(D)),role:"button","aria-label":a.unref(H),"aria-labelledby":a.unref(N),"aria-description":a.unref(i)("el.colorpicker.description",{color:ie.modelValue||""}),"aria-disabled":a.unref(c),tabindex:a.unref(c)?-1:ie.tabindex,onKeydown:Qe,onFocus:b,onBlur:Te[1]||(Te[1]=(...Se)=>a.unref(_)&&a.unref(_)(...Se))},[a.unref(c)?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(a.unref(o).be("picker","mask"))},null,2)):a.createCommentVNode("v-if",!0),a.createElementVNode("div",{class:a.normalizeClass(a.unref(o).be("picker","trigger")),onClick:K},[a.createElementVNode("span",{class:a.normalizeClass([a.unref(o).be("picker","color"),a.unref(o).is("alpha",ie.showAlpha)])},[a.createElementVNode("span",{class:a.normalizeClass(a.unref(o).be("picker","color-inner")),style:a.normalizeStyle({backgroundColor:a.unref(O)})},[a.withDirectives(a.createVNode(a.unref(Fl),{class:a.normalizeClass([a.unref(o).be("picker","icon"),a.unref(o).is("icon-arrow-down")])},{default:a.withCtx(()=>[a.createVNode(a.unref(F5))]),_:1},8,["class"]),[[a.vShow,ie.modelValue||C.value]]),a.withDirectives(a.createVNode(a.unref(Fl),{class:a.normalizeClass([a.unref(o).be("picker","empty"),a.unref(o).is("icon-close")])},{default:a.withCtx(()=>[a.createVNode(a.unref(NT))]),_:1},8,["class"]),[[a.vShow,!ie.modelValue&&!C.value]])],6)],2)],2)],42,cxt)]),_:1},8,["visible","popper-class","transition"]))}});var hxt=wi(dxt,[["__file","color-picker.vue"]]);const pxt=F1(hxt),fxt=a.defineComponent({name:"ElContainer"}),mxt=a.defineComponent({...fxt,props:{direction:{type:String}},setup(e){const t=e,r=a.useSlots(),n=xi("container"),i=a.computed(()=>t.direction==="vertical"?!0:t.direction==="horizontal"?!1:r&&r.default?r.default().some(o=>{const s=o.type.name;return s==="ElHeader"||s==="ElFooter"}):!1);return(o,s)=>(a.openBlock(),a.createElementBlock("section",{class:a.normalizeClass([a.unref(n).b(),a.unref(n).is("vertical",a.unref(i))])},[a.renderSlot(o.$slots,"default")],2))}});var gxt=wi(mxt,[["__file","container.vue"]]);const yxt=a.defineComponent({name:"ElAside"}),Txt=a.defineComponent({...yxt,props:{width:{type:String,default:null}},setup(e){const t=e,r=xi("aside"),n=a.computed(()=>t.width?r.cssVarBlock({width:t.width}):{});return(i,o)=>(a.openBlock(),a.createElementBlock("aside",{class:a.normalizeClass(a.unref(r).b()),style:a.normalizeStyle(a.unref(n))},[a.renderSlot(i.$slots,"default")],6))}});var T7e=wi(Txt,[["__file","aside.vue"]]);const vxt=a.defineComponent({name:"ElFooter"}),bxt=a.defineComponent({...vxt,props:{height:{type:String,default:null}},setup(e){const t=e,r=xi("footer"),n=a.computed(()=>t.height?r.cssVarBlock({height:t.height}):{});return(i,o)=>(a.openBlock(),a.createElementBlock("footer",{class:a.normalizeClass(a.unref(r).b()),style:a.normalizeStyle(a.unref(n))},[a.renderSlot(i.$slots,"default")],6))}});var v7e=wi(bxt,[["__file","footer.vue"]]);const Qxt=a.defineComponent({name:"ElHeader"}),xxt=a.defineComponent({...Qxt,props:{height:{type:String,default:null}},setup(e){const t=e,r=xi("header"),n=a.computed(()=>t.height?r.cssVarBlock({height:t.height}):{});return(i,o)=>(a.openBlock(),a.createElementBlock("header",{class:a.normalizeClass(a.unref(r).b()),style:a.normalizeStyle(a.unref(n))},[a.renderSlot(i.$slots,"default")],6))}});var b7e=wi(xxt,[["__file","header.vue"]]);const _xt=a.defineComponent({name:"ElMain"}),wxt=a.defineComponent({..._xt,setup(e){const t=xi("main");return(r,n)=>(a.openBlock(),a.createElementBlock("main",{class:a.normalizeClass(a.unref(t).b())},[a.renderSlot(r.$slots,"default")],2))}});var Q7e=wi(wxt,[["__file","main.vue"]]);const Lxt=F1(gxt,{Aside:T7e,Footer:v7e,Header:b7e,Main:Q7e});i3(T7e),i3(v7e),i3(b7e);const x7e=i3(Q7e),Sxt=Lo({mask:{type:Boolean,default:!0},customMaskEvent:{type:Boolean,default:!1},overlayClass:{type:di([String,Array,Object])},zIndex:{type:di([String,Number])}}),Mxt={click:e=>e instanceof MouseEvent},kxt="overlay";var Cxt=a.defineComponent({name:"ElOverlay",props:Sxt,emits:Mxt,setup(e,{slots:t,emit:r}){const n=xi(kxt),i=c=>{r("click",c)},{onClick:o,onMousedown:s,onMouseup:l}=c8e(e.customMaskEvent?void 0:i);return()=>e.mask?a.createVNode("div",{class:[n.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:o,onMousedown:s,onMouseup:l},[a.renderSlot(t,"default")],eI.STYLE|eI.CLASS|eI.PROPS,["onClick","onMouseup","onMousedown"]):a.h("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[a.renderSlot(t,"default")])}});const Ext=Cxt,_7e=Symbol("dialogInjectionKey"),w7e=Lo({center:Boolean,alignCenter:Boolean,closeIcon:{type:sf},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),Axt={close:()=>!0},Oxt=["aria-level"],Pxt=["aria-label"],Ixt=["id"],Hxt=a.defineComponent({name:"ElDialogContent"}),Vxt=a.defineComponent({...Hxt,props:w7e,emits:Axt,setup(e){const t=e,{t:r}=tL(),{Close:n}=q9t,{dialogRef:i,headerRef:o,bodyId:s,ns:l,style:c}=a.inject(_7e),{focusTrapRef:u}=a.inject(P8e),d=a.computed(()=>[l.b(),l.is("fullscreen",t.fullscreen),l.is("draggable",t.draggable),l.is("align-center",t.alignCenter),{[l.m("center")]:t.center}]),h=X9t(u,i),p=a.computed(()=>t.draggable),f=a.computed(()=>t.overflow);return $9t(i,o,p,f),(m,g)=>(a.openBlock(),a.createElementBlock("div",{ref:a.unref(h),class:a.normalizeClass(a.unref(d)),style:a.normalizeStyle(a.unref(c)),tabindex:"-1"},[a.createElementVNode("header",{ref_key:"headerRef",ref:o,class:a.normalizeClass([a.unref(l).e("header"),{"show-close":m.showClose}])},[a.renderSlot(m.$slots,"header",{},()=>[a.createElementVNode("span",{role:"heading","aria-level":m.ariaLevel,class:a.normalizeClass(a.unref(l).e("title"))},a.toDisplayString(m.title),11,Oxt)]),m.showClose?(a.openBlock(),a.createElementBlock("button",{key:0,"aria-label":a.unref(r)("el.dialog.close"),class:a.normalizeClass(a.unref(l).e("headerbtn")),type:"button",onClick:g[0]||(g[0]=T=>m.$emit("close"))},[a.createVNode(a.unref(Fl),{class:a.normalizeClass(a.unref(l).e("close"))},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(m.closeIcon||a.unref(n))))]),_:1},8,["class"])],10,Pxt)):a.createCommentVNode("v-if",!0)],2),a.createElementVNode("div",{id:a.unref(s),class:a.normalizeClass(a.unref(l).e("body"))},[a.renderSlot(m.$slots,"default")],10,Ixt),m.$slots.footer?(a.openBlock(),a.createElementBlock("footer",{key:0,class:a.normalizeClass(a.unref(l).e("footer"))},[a.renderSlot(m.$slots,"footer")],2)):a.createCommentVNode("v-if",!0)],6))}});var Rxt=wi(Vxt,[["__file","dialog-content.vue"]]);const Nxt=Lo({...w7e,appendToBody:Boolean,appendTo:{type:di(String),default:"body"},beforeClose:{type:di(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"}}),Bxt={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[vs]:e=>of(e),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},Fxt=(e,t)=>{var r;const n=a.getCurrentInstance().emit,{nextZIndex:i}=YX();let o="";const s=ag(),l=ag(),c=a.ref(!1),u=a.ref(!1),d=a.ref(!1),h=a.ref((r=e.zIndex)!=null?r:i());let p,f;const m=lI("namespace",nL),g=a.computed(()=>{const D={},j=`--${m.value}-dialog`;return e.fullscreen||(e.top&&(D[`${j}-margin-top`]=e.top),e.width&&(D[`${j}-width`]=af(e.width))),D}),T=a.computed(()=>e.alignCenter?{display:"flex"}:{});function y(){n("opened")}function v(){n("closed"),n(vs,!1),e.destroyOnClose&&(d.value=!1)}function _(){n("close")}function b(){f==null||f(),p==null||p(),e.openDelay&&e.openDelay>0?{stop:p}=v5e(()=>C(),e.openDelay):C()}function L(){p==null||p(),f==null||f(),e.closeDelay&&e.closeDelay>0?{stop:f}=v5e(()=>A(),e.closeDelay):A()}function w(){function D(j){j||(u.value=!0,c.value=!1)}e.beforeClose?e.beforeClose(D):L()}function M(){e.closeOnClickModal&&w()}function C(){Ts&&(c.value=!0)}function A(){c.value=!1}function O(){n("openAutoFocus")}function V(){n("closeAutoFocus")}function H(D){var j;((j=D.detail)==null?void 0:j.focusReason)==="pointer"&&D.preventDefault()}e.lockScroll&&vyt(c);function N(){e.closeOnPressEscape&&w()}return a.watch(()=>e.modelValue,D=>{D?(u.value=!1,b(),d.value=!0,h.value=bme(e.zIndex)?i():h.value++,a.nextTick(()=>{n("open"),t.value&&(t.value.scrollTop=0)})):c.value&&L()}),a.watch(()=>e.fullscreen,D=>{t.value&&(D?(o=t.value.style.transform,t.value.style.transform=""):t.value.style.transform=o)}),a.onMounted(()=>{e.modelValue&&(c.value=!0,d.value=!0,b())}),{afterEnter:y,afterLeave:v,beforeLeave:_,handleClose:w,onModalClick:M,close:L,doClose:A,onOpenAutoFocus:O,onCloseAutoFocus:V,onCloseRequested:N,onFocusoutPrevented:H,titleId:s,bodyId:l,closed:u,style:g,overlayDialogStyle:T,rendered:d,visible:c,zIndex:h}},Dxt=["aria-label","aria-labelledby","aria-describedby"],zxt=a.defineComponent({name:"ElDialog",inheritAttrs:!1}),jxt=a.defineComponent({...zxt,props:Nxt,emits:Bxt,setup(e,{expose:t}){const r=e,n=a.useSlots();VX({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"},a.computed(()=>!!n.title));const i=xi("dialog"),o=a.ref(),s=a.ref(),l=a.ref(),{visible:c,titleId:u,bodyId:d,style:h,overlayDialogStyle:p,rendered:f,zIndex:m,afterEnter:g,afterLeave:T,beforeLeave:y,handleClose:v,onModalClick:_,onOpenAutoFocus:b,onCloseAutoFocus:L,onCloseRequested:w,onFocusoutPrevented:M}=Fxt(r,o);a.provide(_7e,{dialogRef:o,headerRef:s,bodyId:d,ns:i,rendered:f,style:h});const C=c8e(_),A=a.computed(()=>r.draggable&&!r.fullscreen);return t({visible:c,dialogContentRef:l}),(O,V)=>(a.openBlock(),a.createBlock(a.Teleport,{to:O.appendTo,disabled:O.appendTo!=="body"?!1:!O.appendToBody},[a.createVNode(a.Transition,{name:"dialog-fade",onAfterEnter:a.unref(g),onAfterLeave:a.unref(T),onBeforeLeave:a.unref(y),persisted:""},{default:a.withCtx(()=>[a.withDirectives(a.createVNode(a.unref(Ext),{"custom-mask-event":"",mask:O.modal,"overlay-class":O.modalClass,"z-index":a.unref(m)},{default:a.withCtx(()=>[a.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":O.title||void 0,"aria-labelledby":O.title?void 0:a.unref(u),"aria-describedby":a.unref(d),class:a.normalizeClass(`${a.unref(i).namespace.value}-overlay-dialog`),style:a.normalizeStyle(a.unref(p)),onClick:V[0]||(V[0]=(...H)=>a.unref(C).onClick&&a.unref(C).onClick(...H)),onMousedown:V[1]||(V[1]=(...H)=>a.unref(C).onMousedown&&a.unref(C).onMousedown(...H)),onMouseup:V[2]||(V[2]=(...H)=>a.unref(C).onMouseup&&a.unref(C).onMouseup(...H))},[a.createVNode(a.unref(B8e),{loop:"",trapped:a.unref(c),"focus-start-el":"container",onFocusAfterTrapped:a.unref(b),onFocusAfterReleased:a.unref(L),onFocusoutPrevented:a.unref(M),onReleaseRequested:a.unref(w)},{default:a.withCtx(()=>[a.unref(f)?(a.openBlock(),a.createBlock(Rxt,a.mergeProps({key:0,ref_key:"dialogContentRef",ref:l},O.$attrs,{center:O.center,"align-center":O.alignCenter,"close-icon":O.closeIcon,draggable:a.unref(A),overflow:O.overflow,fullscreen:O.fullscreen,"show-close":O.showClose,title:O.title,"aria-level":O.headerAriaLevel,onClose:a.unref(v)}),a.createSlots({header:a.withCtx(()=>[O.$slots.title?a.renderSlot(O.$slots,"title",{key:1}):a.renderSlot(O.$slots,"header",{key:0,close:a.unref(v),titleId:a.unref(u),titleClass:a.unref(i).e("title")})]),default:a.withCtx(()=>[a.renderSlot(O.$slots,"default")]),_:2},[O.$slots.footer?{name:"footer",fn:a.withCtx(()=>[a.renderSlot(O.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):a.createCommentVNode("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,Dxt)]),_:3},8,["mask","overlay-class","z-index"]),[[a.vShow,a.unref(c)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])],8,["to","disabled"]))}});var Uxt=wi(jxt,[["__file","dialog.vue"]]);const Gxt=F1(Uxt),Wxt=a.defineComponent({inheritAttrs:!1});function qxt(e,t,r,n,i,o){return a.renderSlot(e.$slots,"default")}var Zxt=wi(Wxt,[["render",qxt],["__file","collection.vue"]]);const Xxt=a.defineComponent({name:"ElCollectionItem",inheritAttrs:!1});function Kxt(e,t,r,n,i,o){return a.renderSlot(e.$slots,"default")}var Yxt=wi(Xxt,[["render",Kxt],["__file","collection-item.vue"]]);const Jxt="data-el-collection-item",$xt=e=>{const t=`El${e}Collection`,r=`${t}Item`,n=Symbol(t),i=Symbol(r),o={...Zxt,name:t,setup(){const l=a.ref(null),c=new Map;a.provide(n,{itemMap:c,getItems:()=>{const u=a.unref(l);if(!u)return[];const d=Array.from(u.querySelectorAll(`[${Jxt}]`));return[...c.values()].sort((h,p)=>d.indexOf(h.ref)-d.indexOf(p.ref))},collectionRef:l})}},s={...Yxt,name:r,setup(l,{attrs:c}){const u=a.ref(null),d=a.inject(n,void 0);a.provide(i,{collectionItemRef:u}),a.onMounted(()=>{const h=a.unref(u);h&&d.itemMap.set(h,{ref:h,...c})}),a.onBeforeUnmount(()=>{const h=a.unref(u);d.itemMap.delete(h)})}};return{COLLECTION_INJECTION_KEY:n,COLLECTION_ITEM_INJECTION_KEY:i,ElCollection:o,ElCollectionItem:s}},yK=Lo({trigger:hL.trigger,effect:{...R0.effect,default:"light"},type:{type:di(String)},placement:{type:di(String),default:"bottom"},popperOptions:{type:di(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:di([Number,String]),default:0},maxHeight:{type:di([Number,String]),default:""},popperClass:{type:String,default:""},disabled:{type:Boolean,default:!1},role:{type:String,default:"menu"},buttonProps:{type:di(Object)},teleported:R0.teleported});Lo({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:sf}}),Lo({onKeydown:{type:di(Function)}}),$xt("Dropdown");const L7e=Symbol("ElSelectGroup"),vI=Symbol("ElSelect");function e_t(e,t){const r=a.inject(vI),n=a.inject(L7e,{disabled:!1}),i=a.computed(()=>r.props.multiple?d(r.props.modelValue,e.value):d([r.props.modelValue],e.value)),o=a.computed(()=>{if(r.props.multiple){const f=r.props.modelValue||[];return!i.value&&f.length>=r.props.multipleLimit&&r.props.multipleLimit>0}else return!1}),s=a.computed(()=>e.label||(B1(e.value)?"":e.value)),l=a.computed(()=>e.value||e.label||""),c=a.computed(()=>e.disabled||t.groupDisabled||o.value),u=a.getCurrentInstance(),d=(f=[],m)=>{if(B1(e.value)){const g=r.props.valueKey;return f&&f.some(T=>a.toRaw(rf(T,g))===rf(m,g))}else return f&&f.includes(m)},h=()=>{!e.disabled&&!n.disabled&&(r.states.hoveringIndex=r.optionsArray.indexOf(u.proxy))},p=f=>{const m=new RegExp(v9t(f),"i");t.visible=m.test(s.value)||e.created};return a.watch(()=>s.value,()=>{!e.created&&!r.props.remote&&r.setSelected()}),a.watch(()=>e.value,(f,m)=>{const{remote:g,valueKey:T}=r.props;if(Jw(f,m)||(r.onOptionDestroy(m,u.proxy),r.onOptionCreate(u.proxy)),!e.created&&!g){if(T&&B1(f)&&B1(m)&&f[T]===m[T])return;r.setSelected()}}),a.watch(()=>n.disabled,()=>{t.groupDisabled=n.disabled},{immediate:!0}),{select:r,currentLabel:s,currentValue:l,itemSelected:i,isDisabled:c,hoverItem:h,updateOption:p}}const t_t=a.defineComponent({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=xi("select"),r=ag(),n=a.computed(()=>[t.be("dropdown","item"),t.is("disabled",a.unref(l)),t.is("selected",a.unref(s)),t.is("hovering",a.unref(p))]),i=a.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:o,itemSelected:s,isDisabled:l,select:c,hoverItem:u,updateOption:d}=e_t(e,i),{visible:h,hover:p}=a.toRefs(i),f=a.getCurrentInstance().proxy;c.onOptionCreate(f),a.onBeforeUnmount(()=>{const g=f.value,{selected:T}=c.states,y=(c.props.multiple?T:[T]).some(v=>v.value===f.value);a.nextTick(()=>{c.states.cachedOptions.get(g)===f&&!y&&c.states.cachedOptions.delete(g)}),c.onOptionDestroy(g,f)});function m(){e.disabled!==!0&&i.groupDisabled!==!0&&c.handleOptionSelect(f)}return{ns:t,id:r,containerKls:n,currentLabel:o,itemSelected:s,isDisabled:l,select:c,hoverItem:u,updateOption:d,visible:h,hover:p,selectOptionClick:m,states:i}}}),r_t=["id","aria-disabled","aria-selected"];function n_t(e,t,r,n,i,o){return a.withDirectives((a.openBlock(),a.createElementBlock("li",{id:e.id,class:a.normalizeClass(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMouseenter:t[0]||(t[0]=(...s)=>e.hoverItem&&e.hoverItem(...s)),onClick:t[1]||(t[1]=a.withModifiers((...s)=>e.selectOptionClick&&e.selectOptionClick(...s),["stop"]))},[a.renderSlot(e.$slots,"default",{},()=>[a.createElementVNode("span",null,a.toDisplayString(e.currentLabel),1)])],42,r_t)),[[a.vShow,e.visible]])}var TK=wi(t_t,[["render",n_t],["__file","option.vue"]]);const i_t=a.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=a.inject(vI),t=xi("select"),r=a.computed(()=>e.props.popperClass),n=a.computed(()=>e.props.multiple),i=a.computed(()=>e.props.fitInputWidth),o=a.ref("");function s(){var l;o.value=`${(l=e.selectRef)==null?void 0:l.offsetWidth}px`}return a.onMounted(()=>{s(),J4(e.selectRef,s)}),{ns:t,minWidth:o,popperClass:r,isMultiple:n,isFitInputWidth:i}}});function o_t(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:a.normalizeStyle({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(e.ns.be("dropdown","header"))},[a.renderSlot(e.$slots,"header")],2)):a.createCommentVNode("v-if",!0),a.renderSlot(e.$slots,"default"),e.$slots.footer?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(e.ns.be("dropdown","footer"))},[a.renderSlot(e.$slots,"footer")],2)):a.createCommentVNode("v-if",!0)],6)}var a_t=wi(i_t,[["render",o_t],["__file","select-dropdown.vue"]]);function s_t(e){const t=a.ref(!1);return{handleCompositionStart:()=>{t.value=!0},handleCompositionUpdate:r=>{const n=r.target.value,i=n[n.length-1]||"";t.value=!Pme(i)},handleCompositionEnd:r=>{t.value&&(t.value=!1,Bu(e)&&e(r))}}}const l_t=11,c_t=(e,t)=>{const{t:r}=tL(),n=ag(),i=xi("select"),o=xi("input"),s=a.reactive({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:e.multiple?[]:{},selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1});VX({from:"suffixTransition",replacement:"override style scheme",version:"2.3.0",scope:"props",ref:"https://element-plus.org/en-US/component/select.html#select-attributes"},a.computed(()=>e.suffixTransition===!1));const l=a.ref(null),c=a.ref(null),u=a.ref(null),d=a.ref(null),h=a.ref(null),p=a.ref(null),f=a.ref(null),m=a.ref(null),g=a.ref(null),T=a.ref(null),y=a.ref(null),v=a.ref(null),{wrapperRef:_,isFocused:b,handleFocus:L,handleBlur:w}=JX(h,{afterFocus(){e.automaticDropdown&&!M.value&&(M.value=!0,s.menuVisibleOnFocus=!0)},beforeBlur(oe){var Le,Xe;return((Le=u.value)==null?void 0:Le.isFocusInsideContent(oe))||((Xe=d.value)==null?void 0:Xe.isFocusInsideContent(oe))},afterBlur(){M.value=!1,s.menuVisibleOnFocus=!1}}),M=a.ref(!1),C=a.ref(),{form:A,formItem:O}=U5(),{inputId:V}=qT(e,{formItemContext:O}),H=a.computed(()=>e.disabled||(A==null?void 0:A.disabled)),N=a.computed(()=>e.multiple?Qc(e.modelValue)&&e.modelValue.length>0:e.modelValue!==void 0&&e.modelValue!==null&&e.modelValue!==""),D=a.computed(()=>e.clearable&&!H.value&&s.inputHovering&&N.value),j=a.computed(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),G=a.computed(()=>i.is("reverse",j.value&&M.value&&e.suffixTransition)),R=a.computed(()=>(O==null?void 0:O.validateState)||""),Z=a.computed(()=>Ame[R.value]),X=a.computed(()=>e.remote?300:0),U=a.computed(()=>e.loading?e.loadingText||r("el.select.loading"):e.remote&&!s.inputValue&&s.options.size===0?!1:e.filterable&&s.inputValue&&s.options.size>0&&K.value===0?e.noMatchText||r("el.select.noMatch"):s.options.size===0?e.noDataText||r("el.select.noData"):null),K=a.computed(()=>$.value.filter(oe=>oe.visible).length),$=a.computed(()=>{const oe=Array.from(s.options.values()),Le=[];return s.optionValues.forEach(Xe=>{const _t=oe.findIndex(jt=>jt.value===Xe);_t>-1&&Le.push(oe[_t])}),Le.length>=oe.length?Le:oe}),le=a.computed(()=>Array.from(s.cachedOptions.values())),me=a.computed(()=>{const oe=$.value.filter(Le=>!Le.created).some(Le=>Le.currentLabel===s.inputValue);return e.filterable&&e.allowCreate&&s.inputValue!==""&&!oe}),ge=()=>{e.filterable&&Bu(e.filterMethod)||e.filterable&&e.remote&&Bu(e.remoteMethod)||$.value.forEach(oe=>{oe.updateOption(s.inputValue)})},ae=j5(),Qe=a.computed(()=>["small"].includes(ae.value)?"small":"default"),ne=a.computed({get(){return M.value&&U.value!==!1},set(oe){M.value=oe}}),de=a.computed(()=>Qc(e.modelValue)?e.modelValue.length===0&&!s.inputValue:e.filterable?!s.inputValue:!0),ie=a.computed(()=>{var oe;const Le=(oe=e.placeholder)!=null?oe:r("el.select.placeholder");return e.multiple||!N.value?Le:s.selectedLabel});a.watch(()=>e.modelValue,(oe,Le)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(s.inputValue="",Te("")),Ie(),!Jw(oe,Le)&&e.validateEvent&&(O==null||O.validate("change").catch(Xe=>Bl(Xe)))},{flush:"post",deep:!0}),a.watch(()=>M.value,oe=>{oe?Te(s.inputValue):(s.inputValue="",s.previousQuery=null,s.isBeforeHide=!0),t("visible-change",oe)}),a.watch(()=>s.options.entries(),()=>{var oe;if(!Ts)return;const Le=((oe=l.value)==null?void 0:oe.querySelectorAll("input"))||[];(!e.filterable&&!e.defaultFirstOption&&!$w(e.modelValue)||!Array.from(Le).includes(document.activeElement))&&Ie(),e.defaultFirstOption&&(e.filterable||e.remote)&&K.value&&Se()},{flush:"post"}),a.watch(()=>s.hoveringIndex,oe=>{Nl(oe)&&oe>-1?C.value=$.value[oe]||{}:C.value={},$.value.forEach(Le=>{Le.hover=C.value===Le})}),a.watchEffect(()=>{s.isBeforeHide||ge()});const Te=oe=>{s.previousQuery!==oe&&(s.previousQuery=oe,e.filterable&&Bu(e.filterMethod)?e.filterMethod(oe):e.filterable&&e.remote&&Bu(e.remoteMethod)&&e.remoteMethod(oe),e.defaultFirstOption&&(e.filterable||e.remote)&&K.value?a.nextTick(Se):a.nextTick(je))},Se=()=>{const oe=$.value.filter(_t=>_t.visible&&!_t.disabled&&!_t.states.groupDisabled),Le=oe.find(_t=>_t.created),Xe=oe[0];s.hoveringIndex=Gt($.value,Le||Xe)},Ie=()=>{if(e.multiple)s.selectedLabel="";else{const Le=Ge(e.modelValue);s.selectedLabel=Le.currentLabel,s.selected=Le;return}const oe=[];Qc(e.modelValue)&&e.modelValue.forEach(Le=>{oe.push(Ge(Le))}),s.selected=oe},Ge=oe=>{let Le;const Xe=yX(oe).toLowerCase()==="object",_t=yX(oe).toLowerCase()==="null",jt=yX(oe).toLowerCase()==="undefined";for(let pr=s.cachedOptions.size-1;pr>=0;pr--){const yr=le.value[pr];if(Xe?rf(yr.value,e.valueKey)===rf(oe,e.valueKey):yr.value===oe){Le={value:oe,currentLabel:yr.currentLabel,isDisabled:yr.isDisabled};break}}if(Le)return Le;const or=Xe?oe.label:!_t&&!jt?oe:"";return{value:oe,currentLabel:or}},je=()=>{e.multiple?s.selected.length>0?s.hoveringIndex=Math.min(...s.selected.map(oe=>$.value.findIndex(Le=>$e(Le)===$e(oe)))):s.hoveringIndex=-1:s.hoveringIndex=$.value.findIndex(oe=>$e(oe)===$e(s.selected))},rt=()=>{s.selectionWidth=c.value.getBoundingClientRect().width},Me=()=>{s.calculatorWidth=p.value.getBoundingClientRect().width},Be=()=>{s.collapseItemWidth=y.value.getBoundingClientRect().width},ut=()=>{var oe,Le;(Le=(oe=u.value)==null?void 0:oe.updatePopper)==null||Le.call(oe)},et=()=>{var oe,Le;(Le=(oe=d.value)==null?void 0:oe.updatePopper)==null||Le.call(oe)},yt=()=>{s.inputValue.length>0&&!M.value&&(M.value=!0),Te(s.inputValue)},At=oe=>{if(s.inputValue=oe.target.value,e.remote)vt();else return yt()},vt=vme(()=>{yt()},X.value),_e=oe=>{Jw(e.modelValue,oe)||t($P,oe)},qe=oe=>p9t(oe,Le=>!s.disabledOptions.has(Le)),at=oe=>{if(e.multiple&&oe.code!==iu.delete&&oe.target.value.length<=0){const Le=e.modelValue.slice(),Xe=qe(Le);if(Xe<0)return;Le.splice(Xe,1),t(vs,Le),_e(Le)}},ht=(oe,Le)=>{const Xe=s.selected.indexOf(Le);if(Xe>-1&&!H.value){const _t=e.modelValue.slice();_t.splice(Xe,1),t(vs,_t),_e(_t),t("remove-tag",Le.value)}oe.stopPropagation(),Ft()},zt=oe=>{oe.stopPropagation();const Le=e.multiple?[]:"";if(!Rl(Le))for(const Xe of s.selected)Xe.isDisabled&&Le.push(Xe.value);t(vs,Le),_e(Le),s.hoveringIndex=-1,M.value=!1,t("clear"),Ft()},wt=oe=>{if(e.multiple){const Le=(e.modelValue||[]).slice(),Xe=Gt(Le,oe.value);Xe>-1?Le.splice(Xe,1):(e.multipleLimit<=0||Le.length<e.multipleLimit)&&Le.push(oe.value),t(vs,Le),_e(Le),oe.created&&Te(""),e.filterable&&!e.reserveKeyword&&(s.inputValue="")}else t(vs,oe.value),_e(oe.value),M.value=!1;Ft(),!M.value&&a.nextTick(()=>{Zt(oe)})},Gt=(oe=[],Le)=>{if(!B1(Le))return oe.indexOf(Le);const Xe=e.valueKey;let _t=-1;return oe.some((jt,or)=>a.toRaw(rf(jt,Xe))===rf(Le,Xe)?(_t=or,!0):!1),_t},Zt=oe=>{var Le,Xe,_t,jt,or;const pr=Qc(oe)?oe[0]:oe;let yr=null;if(pr!=null&&pr.value){const ir=$.value.filter(Qr=>Qr.value===pr.value);ir.length>0&&(yr=ir[0].$el)}if(u.value&&yr){const ir=(jt=(_t=(Xe=(Le=u.value)==null?void 0:Le.popperRef)==null?void 0:Xe.contentRef)==null?void 0:_t.querySelector)==null?void 0:jt.call(_t,`.${i.be("dropdown","wrap")}`);ir&&x9t(ir,yr)}(or=v.value)==null||or.handleScroll()},Tt=oe=>{s.options.set(oe.value,oe),s.cachedOptions.set(oe.value,oe),oe.disabled&&s.disabledOptions.set(oe.value,oe)},Lt=(oe,Le)=>{s.options.get(oe)===Le&&s.options.delete(oe)},{handleCompositionStart:Qt,handleCompositionUpdate:Ut,handleCompositionEnd:Wt}=s_t(oe=>At(oe)),mr=a.computed(()=>{var oe,Le;return(Le=(oe=u.value)==null?void 0:oe.popperRef)==null?void 0:Le.contentRef}),pt=()=>{a.nextTick(()=>Zt(s.selected))},Ft=()=>{var oe;(oe=h.value)==null||oe.focus()},Nt=()=>{ot()},dr=oe=>{zt(oe)},ot=oe=>{if(M.value=!1,b.value){const Le=new FocusEvent("focus",oe);a.nextTick(()=>w(Le))}},Fe=()=>{s.inputValue.length>0?s.inputValue="":M.value=!1},ze=()=>{H.value||(s.menuVisibleOnFocus?s.menuVisibleOnFocus=!1:M.value=!M.value)},Ke=()=>{M.value?$.value[s.hoveringIndex]&&wt($.value[s.hoveringIndex]):ze()},$e=oe=>B1(oe.value)?rf(oe.value,e.valueKey):oe.value,St=a.computed(()=>$.value.filter(oe=>oe.visible).every(oe=>oe.disabled)),we=a.computed(()=>e.multiple?e.collapseTags?s.selected.slice(0,e.maxCollapseTags):s.selected:[]),De=a.computed(()=>e.multiple?e.collapseTags?s.selected.slice(e.maxCollapseTags):[]:[]),Ve=oe=>{if(!M.value){M.value=!0;return}if(!(s.options.size===0||K.value===0)&&!St.value){oe==="next"?(s.hoveringIndex++,s.hoveringIndex===s.options.size&&(s.hoveringIndex=0)):oe==="prev"&&(s.hoveringIndex--,s.hoveringIndex<0&&(s.hoveringIndex=s.options.size-1));const Le=$.value[s.hoveringIndex];(Le.disabled===!0||Le.states.groupDisabled===!0||!Le.visible)&&Ve(oe),a.nextTick(()=>Zt(C.value))}},Ae=()=>{if(!c.value)return 0;const oe=window.getComputedStyle(c.value);return Number.parseFloat(oe.gap||"6px")},ke=a.computed(()=>{const oe=Ae();return{maxWidth:`${y.value&&e.maxCollapseTags===1?s.selectionWidth-s.collapseItemWidth-oe:s.selectionWidth}px`}}),Ne=a.computed(()=>({maxWidth:`${s.selectionWidth}px`})),nt=a.computed(()=>({width:`${Math.max(s.calculatorWidth,l_t)}px`}));return e.multiple&&!Qc(e.modelValue)&&t(vs,[]),!e.multiple&&Qc(e.modelValue)&&t(vs,""),J4(c,rt),J4(p,Me),J4(g,ut),J4(_,ut),J4(T,et),J4(y,Be),a.onMounted(()=>{Ie()}),{inputId:V,contentId:n,nsSelect:i,nsInput:o,states:s,isFocused:b,expanded:M,optionsArray:$,hoverOption:C,selectSize:ae,filteredOptionsCount:K,resetCalculatorWidth:Me,updateTooltip:ut,updateTagTooltip:et,debouncedOnInputChange:vt,onInput:At,deletePrevTag:at,deleteTag:ht,deleteSelected:zt,handleOptionSelect:wt,scrollToOption:Zt,hasModelValue:N,shouldShowPlaceholder:de,currentPlaceholder:ie,showClose:D,iconComponent:j,iconReverse:G,validateState:R,validateIcon:Z,showNewOption:me,updateOptions:ge,collapseTagSize:Qe,setSelected:Ie,selectDisabled:H,emptyText:U,handleCompositionStart:Qt,handleCompositionUpdate:Ut,handleCompositionEnd:Wt,onOptionCreate:Tt,onOptionDestroy:Lt,handleMenuEnter:pt,handleFocus:L,focus:Ft,blur:Nt,handleBlur:w,handleClearClick:dr,handleClickOutside:ot,handleEsc:Fe,toggleMenu:ze,selectOption:Ke,getValueKey:$e,navigateOptions:Ve,dropdownMenuVisible:ne,showTagList:we,collapseTagList:De,tagStyle:ke,collapseTagStyle:Ne,inputStyle:nt,popperRef:mr,inputRef:h,tooltipRef:u,tagTooltipRef:d,calculatorRef:p,prefixRef:f,suffixRef:m,selectRef:l,wrapperRef:_,selectionRef:c,scrollbarRef:v,menuRef:g,tagMenuRef:T,collapseItemRef:y}};var u_t=a.defineComponent({name:"ElOptions",setup(e,{slots:t}){const r=a.inject(vI);let n=[];return()=>{var i,o;const s=(i=t.default)==null?void 0:i.call(t),l=[];function c(u){Qc(u)&&u.forEach(d=>{var h,p,f,m;const g=(h=(d==null?void 0:d.type)||{})==null?void 0:h.name;g==="ElOptionGroup"?c(!Rl(d.children)&&!Qc(d.children)&&Bu((p=d.children)==null?void 0:p.default)?(f=d.children)==null?void 0:f.default():d.children):g==="ElOption"?l.push((m=d.props)==null?void 0:m.value):Qc(d.children)&&c(d.children)})}return s.length&&c((o=s[0])==null?void 0:o.children),Jw(l,n)||(n=l,r&&(r.states.optionValues=l)),s}}});const d_t=Lo({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:z5,effect:{type:di(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:di(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:R0.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:sf,default:YP},fitInputWidth:Boolean,suffixIcon:{type:sf,default:F5},tagType:{...d7e.type,default:"info"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,suffixTransition:{type:Boolean,default:!0},placement:{type:di(String),values:rI,default:"bottom-start"},ariaLabel:{type:String,default:void 0}}),S7e="ElSelect",h_t=a.defineComponent({name:S7e,componentName:S7e,components:{ElInput:cI,ElSelectMenu:a_t,ElOption:TK,ElOptions:u_t,ElTag:wQt,ElScrollbar:hvt,ElTooltip:lK,ElIcon:Fl},directives:{ClickOutside:K8e},props:d_t,emits:[vs,$P,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const r=c_t(e,t);return a.provide(vI,a.reactive({props:e,states:r.states,optionsArray:r.optionsArray,handleOptionSelect:r.handleOptionSelect,onOptionCreate:r.onOptionCreate,onOptionDestroy:r.onOptionDestroy,selectRef:r.selectRef,setSelected:r.setSelected})),{...r}}}),p_t=["id","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],f_t=["textContent"];function m_t(e,t,r,n,i,o){const s=a.resolveComponent("el-tag"),l=a.resolveComponent("el-tooltip"),c=a.resolveComponent("el-icon"),u=a.resolveComponent("el-option"),d=a.resolveComponent("el-options"),h=a.resolveComponent("el-scrollbar"),p=a.resolveComponent("el-select-menu"),f=a.resolveDirective("click-outside");return a.withDirectives((a.openBlock(),a.createElementBlock("div",{ref:"selectRef",class:a.normalizeClass([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),onMouseenter:t[14]||(t[14]=m=>e.states.inputHovering=!0),onMouseleave:t[15]||(t[15]=m=>e.states.inputHovering=!1),onClick:t[16]||(t[16]=a.withModifiers((...m)=>e.toggleMenu&&e.toggleMenu(...m),["stop"]))},[a.createVNode(l,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":["bottom-start","top-start","right","left"],effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,onBeforeShow:e.handleMenuEnter,onHide:t[13]||(t[13]=m=>e.states.isBeforeHide=!1)},{default:a.withCtx(()=>{var m;return[a.createElementVNode("div",{ref:"wrapperRef",class:a.normalizeClass([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)])},[e.$slots.prefix?(a.openBlock(),a.createElementBlock("div",{key:0,ref:"prefixRef",class:a.normalizeClass(e.nsSelect.e("prefix"))},[a.renderSlot(e.$slots,"prefix")],2)):a.createCommentVNode("v-if",!0),a.createElementVNode("div",{ref:"selectionRef",class:a.normalizeClass([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?a.renderSlot(e.$slots,"tag",{key:0},()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.showTagList,g=>(a.openBlock(),a.createElementBlock("div",{key:e.getValueKey(g),class:a.normalizeClass(e.nsSelect.e("selected-item"))},[a.createVNode(s,{closable:!e.selectDisabled&&!g.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:a.normalizeStyle(e.tagStyle),onClose:T=>e.deleteTag(T,g)},{default:a.withCtx(()=>[a.createElementVNode("span",{class:a.normalizeClass(e.nsSelect.e("tags-text"))},a.toDisplayString(g.currentLabel),3)]),_:2},1032,["closable","size","type","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(a.openBlock(),a.createBlock(l,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:a.withCtx(()=>[a.createElementVNode("div",{ref:"collapseItemRef",class:a.normalizeClass(e.nsSelect.e("selected-item"))},[a.createVNode(s,{closable:!1,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:a.normalizeStyle(e.collapseTagStyle)},{default:a.withCtx(()=>[a.createElementVNode("span",{class:a.normalizeClass(e.nsSelect.e("tags-text"))}," + "+a.toDisplayString(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","style"])],2)]),content:a.withCtx(()=>[a.createElementVNode("div",{ref:"tagMenuRef",class:a.normalizeClass(e.nsSelect.e("selection"))},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.collapseTagList,g=>(a.openBlock(),a.createElementBlock("div",{key:e.getValueKey(g),class:a.normalizeClass(e.nsSelect.e("selected-item"))},[a.createVNode(s,{class:"in-tooltip",closable:!e.selectDisabled&&!g.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",onClose:T=>e.deleteTag(T,g)},{default:a.withCtx(()=>[a.createElementVNode("span",{class:a.normalizeClass(e.nsSelect.e("tags-text"))},a.toDisplayString(g.currentLabel),3)]),_:2},1032,["closable","size","type","onClose"])],2))),128))],2)]),_:1},8,["disabled","effect","teleported"])):a.createCommentVNode("v-if",!0)]):a.createCommentVNode("v-if",!0),e.selectDisabled?a.createCommentVNode("v-if",!0):(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[a.withDirectives(a.createElementVNode("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":t[0]||(t[0]=g=>e.states.inputValue=g),type:"text",class:a.normalizeClass([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:a.normalizeStyle(e.inputStyle),role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((m=e.hoverOption)==null?void 0:m.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onFocus:t[1]||(t[1]=(...g)=>e.handleFocus&&e.handleFocus(...g)),onBlur:t[2]||(t[2]=(...g)=>e.handleBlur&&e.handleBlur(...g)),onKeydown:[t[3]||(t[3]=a.withKeys(a.withModifiers(g=>e.navigateOptions("next"),["stop","prevent"]),["down"])),t[4]||(t[4]=a.withKeys(a.withModifiers(g=>e.navigateOptions("prev"),["stop","prevent"]),["up"])),t[5]||(t[5]=a.withKeys(a.withModifiers((...g)=>e.handleEsc&&e.handleEsc(...g),["stop","prevent"]),["esc"])),t[6]||(t[6]=a.withKeys(a.withModifiers((...g)=>e.selectOption&&e.selectOption(...g),["stop","prevent"]),["enter"])),t[7]||(t[7]=a.withKeys(a.withModifiers((...g)=>e.deletePrevTag&&e.deletePrevTag(...g),["stop"]),["delete"]))],onCompositionstart:t[8]||(t[8]=(...g)=>e.handleCompositionStart&&e.handleCompositionStart(...g)),onCompositionupdate:t[9]||(t[9]=(...g)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...g)),onCompositionend:t[10]||(t[10]=(...g)=>e.handleCompositionEnd&&e.handleCompositionEnd(...g)),onInput:t[11]||(t[11]=(...g)=>e.onInput&&e.onInput(...g)),onClick:t[12]||(t[12]=a.withModifiers((...g)=>e.toggleMenu&&e.toggleMenu(...g),["stop"]))},null,46,p_t),[[a.vModelText,e.states.inputValue]]),e.filterable?(a.openBlock(),a.createElementBlock("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:a.normalizeClass(e.nsSelect.e("input-calculator")),textContent:a.toDisplayString(e.states.inputValue)},null,10,f_t)):a.createCommentVNode("v-if",!0)],2)),e.shouldShowPlaceholder?(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[a.createElementVNode("span",null,a.toDisplayString(e.currentPlaceholder),1)],2)):a.createCommentVNode("v-if",!0)],2),a.createElementVNode("div",{ref:"suffixRef",class:a.normalizeClass(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(a.openBlock(),a.createBlock(c,{key:0,class:a.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):a.createCommentVNode("v-if",!0),e.showClose&&e.clearIcon?(a.openBlock(),a.createBlock(c,{key:1,class:a.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon")]),onClick:e.handleClearClick},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.clearIcon)))]),_:1},8,["class","onClick"])):a.createCommentVNode("v-if",!0),e.validateState&&e.validateIcon?(a.openBlock(),a.createBlock(c,{key:2,class:a.normalizeClass([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.validateIcon)))]),_:1},8,["class"])):a.createCommentVNode("v-if",!0)],2)],2)]}),content:a.withCtx(()=>[a.createVNode(p,{ref:"menuRef"},{default:a.withCtx(()=>[e.$slots.header?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(e.nsSelect.be("dropdown","header"))},[a.renderSlot(e.$slots,"header")],2)):a.createCommentVNode("v-if",!0),a.withDirectives(a.createVNode(h,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:a.normalizeClass([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:a.withCtx(()=>[e.showNewOption?(a.openBlock(),a.createBlock(u,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):a.createCommentVNode("v-if",!0),a.createVNode(d,null,{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[a.vShow,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(e.nsSelect.be("dropdown","loading"))},[a.renderSlot(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass(e.nsSelect.be("dropdown","empty"))},[a.renderSlot(e.$slots,"empty",{},()=>[a.createElementVNode("span",null,a.toDisplayString(e.emptyText),1)])],2)):a.createCommentVNode("v-if",!0),e.$slots.footer?(a.openBlock(),a.createElementBlock("div",{key:3,class:a.normalizeClass(e.nsSelect.be("dropdown","footer"))},[a.renderSlot(e.$slots,"footer")],2)):a.createCommentVNode("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","effect","transition","persistent","onBeforeShow"])],34)),[[f,e.handleClickOutside,e.popperRef]])}var g_t=wi(h_t,[["render",m_t],["__file","select.vue"]]);const y_t=a.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=xi("select"),r=a.ref(null),n=a.getCurrentInstance(),i=a.ref([]);a.provide(L7e,a.reactive({...a.toRefs(e)}));const o=a.computed(()=>i.value.some(c=>c.visible===!0)),s=c=>{const u=[];return Qc(c.children)&&c.children.forEach(d=>{var h,p;d.type&&d.type.name==="ElOption"&&d.component&&d.component.proxy?u.push(d.component.proxy):(h=d.children)!=null&&h.length?u.push(...s(d)):(p=d.component)!=null&&p.subTree&&u.push(...s(d.component.subTree))}),u},l=()=>{i.value=s(n.subTree)};return a.onMounted(()=>{l()}),smt(r,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:r,visible:o,ns:t}}});function T_t(e,t,r,n,i,o){return a.withDirectives((a.openBlock(),a.createElementBlock("ul",{ref:"groupRef",class:a.normalizeClass(e.ns.be("group","wrap"))},[a.createElementVNode("li",{class:a.normalizeClass(e.ns.be("group","title"))},a.toDisplayString(e.label),3),a.createElementVNode("li",null,[a.createElementVNode("ul",{class:a.normalizeClass(e.ns.b("group"))},[a.renderSlot(e.$slots,"default")],2)])],2)),[[a.vShow,e.visible]])}var M7e=wi(y_t,[["render",T_t],["__file","option-group.vue"]]);const $T=F1(g_t,{Option:TK,OptionGroup:M7e}),bI=i3(TK);i3(M7e);const v_t=Lo({trigger:hL.trigger,placement:yK.placement,disabled:hL.disabled,visible:R0.visible,transition:R0.transition,popperOptions:yK.popperOptions,tabindex:yK.tabindex,content:R0.content,popperStyle:R0.popperStyle,popperClass:R0.popperClass,enterable:{...R0.enterable,default:!0},effect:{...R0.effect,default:"light"},teleported:R0.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}}),b_t={"update:visible":e=>of(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},Q_t="onUpdate:visible",x_t=a.defineComponent({name:"ElPopover"}),__t=a.defineComponent({...x_t,props:v_t,emits:b_t,setup(e,{expose:t,emit:r}){const n=e,i=a.computed(()=>n[Q_t]),o=xi("popover"),s=a.ref(),l=a.computed(()=>{var T;return(T=a.unref(s))==null?void 0:T.popperRef}),c=a.computed(()=>[{width:af(n.width)},n.popperStyle]),u=a.computed(()=>[o.b(),n.popperClass,{[o.m("plain")]:!!n.content}]),d=a.computed(()=>n.transition===`${o.namespace.value}-fade-in-linear`),h=()=>{var T;(T=s.value)==null||T.hide()},p=()=>{r("before-enter")},f=()=>{r("before-leave")},m=()=>{r("after-enter")},g=()=>{r("update:visible",!1),r("after-leave")};return t({popperRef:l,hide:h}),(T,y)=>(a.openBlock(),a.createBlock(a.unref(lK),a.mergeProps({ref_key:"tooltipRef",ref:s},T.$attrs,{trigger:T.trigger,placement:T.placement,disabled:T.disabled,visible:T.visible,transition:T.transition,"popper-options":T.popperOptions,tabindex:T.tabindex,content:T.content,offset:T.offset,"show-after":T.showAfter,"hide-after":T.hideAfter,"auto-close":T.autoClose,"show-arrow":T.showArrow,"aria-label":T.title,effect:T.effect,enterable:T.enterable,"popper-class":a.unref(u),"popper-style":a.unref(c),teleported:T.teleported,persistent:T.persistent,"gpu-acceleration":a.unref(d),"onUpdate:visible":a.unref(i),onBeforeShow:p,onBeforeHide:f,onShow:m,onHide:g}),{content:a.withCtx(()=>[T.title?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(a.unref(o).e("title")),role:"title"},a.toDisplayString(T.title),3)):a.createCommentVNode("v-if",!0),a.renderSlot(T.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(T.content),1)])]),default:a.withCtx(()=>[T.$slots.reference?a.renderSlot(T.$slots,"reference",{key:0}):a.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 w_t=wi(__t,[["__file","popover.vue"]]);const k7e=(e,t)=>{const r=t.arg||t.value,n=r==null?void 0:r.popperRef;n&&(n.triggerRef=e)};var L_t={mounted(e,t){k7e(e,t)},updated(e,t){k7e(e,t)}};const S_t="popover",C7e=Z9t(L_t,S_t),QI=F1(w_t,{directive:C7e}),ev="$treeNodeId",E7e=function(e,t){!t||t[ev]||Object.defineProperty(t,ev,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},vK=function(e,t){return e?t[e]:t[ev]},bK=(e,t,r)=>{const n=e.value.currentNode;r();const i=e.value.currentNode;n!==i&&t("current-change",i?i.data:null,i)},QK=e=>{let t=!0,r=!0,n=!0;for(let i=0,o=e.length;i<o;i++){const s=e[i];(s.checked!==!0||s.indeterminate)&&(t=!1,s.disabled||(n=!1)),(s.checked!==!1||s.indeterminate)&&(r=!1)}return{all:t,none:r,allWithoutDisable:n,half:!t&&!r}},xI=function(e){if(e.childNodes.length===0||e.loading)return;const{all:t,none:r,half:n}=QK(e.childNodes);t?(e.checked=!0,e.indeterminate=!1):n?(e.checked=!1,e.indeterminate=!0):r&&(e.checked=!1,e.indeterminate=!1);const i=e.parent;!i||i.level===0||e.store.checkStrictly||xI(i)},_I=function(e,t){const r=e.store.props,n=e.data||{},i=r[t];if(typeof i=="function")return i(n,e);if(typeof i=="string")return n[i];if(typeof i>"u"){const o=n[t];return o===void 0?"":o}};let M_t=0,xK=class rZ{constructor(t){this.id=M_t++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const r in t)J7(t,r)&&(this[r]=t[r]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){const t=this.store;if(!t)throw new Error("[Node]store is required!");t.registerNode(this);const r=t.props;if(r&&typeof r.isLeaf<"u"){const o=_I(this,"isLeaf");typeof o=="boolean"&&(this.isLeafByUser=o)}if(t.lazy!==!0&&this.data?(this.setData(this.data),t.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&t.lazy&&t.defaultExpandAll&&this.expand(),Array.isArray(this.data)||E7e(this,this.data),!this.data)return;const n=t.defaultExpandedKeys,i=t.key;i&&n&&n.includes(this.key)&&this.expand(null,t.autoExpandParent),i&&t.currentNodeKey!==void 0&&this.key===t.currentNodeKey&&(t.currentNode=this,t.currentNode.isCurrent=!0),t.lazy&&t._initDefaultCheckedNode(this),this.updateLeafState(),this.parent&&(this.level===1||this.parent.expanded===!0)&&(this.canFocus=!0)}setData(t){Array.isArray(t)||E7e(this,t),this.data=t,this.childNodes=[];let r;this.level===0&&Array.isArray(this.data)?r=this.data:r=_I(this,"children")||[];for(let n=0,i=r.length;n<i;n++)this.insertChild({data:r[n]})}get label(){return _I(this,"label")}get key(){const t=this.store.key;return this.data?this.data[t]:null}get disabled(){return _I(this,"disabled")}get nextSibling(){const t=this.parent;if(t){const r=t.childNodes.indexOf(this);if(r>-1)return t.childNodes[r+1]}return null}get previousSibling(){const t=this.parent;if(t){const r=t.childNodes.indexOf(this);if(r>-1)return r>0?t.childNodes[r-1]:null}return null}contains(t,r=!0){return(this.childNodes||[]).some(n=>n===t||r&&n.contains(t))}remove(){const t=this.parent;t&&t.removeChild(this)}insertChild(t,r,n){if(!t)throw new Error("InsertChild error: child is required.");if(!(t instanceof rZ)){if(!n){const i=this.getChildren(!0);i.includes(t.data)||(typeof r>"u"||r<0?i.push(t.data):i.splice(r,0,t.data))}Object.assign(t,{parent:this,store:this.store}),t=a.reactive(new rZ(t)),t instanceof rZ&&t.initialize()}t.level=this.level+1,typeof r>"u"||r<0?this.childNodes.push(t):this.childNodes.splice(r,0,t),this.updateLeafState()}insertBefore(t,r){let n;r&&(n=this.childNodes.indexOf(r)),this.insertChild(t,n)}insertAfter(t,r){let n;r&&(n=this.childNodes.indexOf(r),n!==-1&&(n+=1)),this.insertChild(t,n)}removeChild(t){const r=this.getChildren()||[],n=r.indexOf(t.data);n>-1&&r.splice(n,1);const i=this.childNodes.indexOf(t);i>-1&&(this.store&&this.store.deregisterNode(t),t.parent=null,this.childNodes.splice(i,1)),this.updateLeafState()}removeChildByData(t){let r=null;for(let n=0;n<this.childNodes.length;n++)if(this.childNodes[n].data===t){r=this.childNodes[n];break}r&&this.removeChild(r)}expand(t,r){const n=()=>{if(r){let i=this.parent;for(;i.level>0;)i.expanded=!0,i=i.parent}this.expanded=!0,t&&t(),this.childNodes.forEach(i=>{i.canFocus=!0})};this.shouldLoadData()?this.loadData(i=>{Array.isArray(i)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||xI(this),n())}):n()}doCreateChildren(t,r={}){t.forEach(n=>{this.insertChild(Object.assign({data:n},r),void 0,!0)})}collapse(){this.expanded=!1,this.childNodes.forEach(t=>{t.canFocus=!1})}shouldLoadData(){return this.store.lazy===!0&&this.store.load&&!this.loaded}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser<"u"){this.isLeaf=this.isLeafByUser;return}const t=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!t||t.length===0;return}this.isLeaf=!1}setChecked(t,r,n,i){if(this.indeterminate=t==="half",this.checked=t===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:s,allWithoutDisable:l}=QK(this.childNodes);!this.isLeaf&&!s&&l&&(this.checked=!1,t=!1);const c=()=>{if(r){const u=this.childNodes;for(let p=0,f=u.length;p<f;p++){const m=u[p];i=i||t!==!1;const g=m.disabled?m.checked:i;m.setChecked(g,r,!0,i)}const{half:d,all:h}=QK(u);h||(this.checked=h,this.indeterminate=d)}};if(this.shouldLoadData()){this.loadData(()=>{c(),xI(this)},{checked:t!==!1});return}else c()}const o=this.parent;!o||o.level===0||n||xI(o)}getChildren(t=!1){if(this.level===0)return this.data;const r=this.data;if(!r)return null;const n=this.store.props;let i="children";return n&&(i=n.children||"children"),r[i]===void 0&&(r[i]=null),t&&!r[i]&&(r[i]=[]),r[i]}updateChildren(){const t=this.getChildren()||[],r=this.childNodes.map(o=>o.data),n={},i=[];t.forEach((o,s)=>{const l=o[ev];l&&r.findIndex(c=>c[ev]===l)>=0?n[l]={index:s,data:o}:i.push({index:s,data:o})}),this.store.lazy||r.forEach(o=>{n[o[ev]]||this.removeChildByData(o)}),i.forEach(({index:o,data:s})=>{this.insertChild({data:s},o)}),this.updateLeafState()}loadData(t,r={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(r).length)){this.loading=!0;const n=i=>{this.childNodes=[],this.doCreateChildren(i,r),this.loaded=!0,this.loading=!1,this.updateLeafState(),t&&t.call(this,i)};this.store.load(this,n)}else t&&t.call(this)}},k_t=class{constructor(t){this.currentNode=null,this.currentNodeKey=null;for(const r in t)J7(t,r)&&(this[r]=t[r]);this.nodesMap={}}initialize(){if(this.root=new xK({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const t=this.load;t(this.root,r=>{this.root.doCreateChildren(r),this._initDefaultCheckedNodes()})}else this._initDefaultCheckedNodes()}filter(t){const r=this.filterNodeMethod,n=this.lazy,i=function(o){const s=o.root?o.root.childNodes:o.childNodes;if(s.forEach(l=>{l.visible=r.call(l,t,l.data,l),i(l)}),!o.visible&&s.length){let l=!0;l=!s.some(c=>c.visible),o.root?o.root.visible=l===!1:o.visible=l===!1}t&&o.visible&&!o.isLeaf&&(!n||o.loaded)&&o.expand()};i(this)}setData(t){t!==this.root.data?(this.root.setData(t),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(t){if(t instanceof xK)return t;const r=B1(t)?vK(this.key,t):t;return this.nodesMap[r]||null}insertBefore(t,r){const n=this.getNode(r);n.parent.insertBefore({data:t},n)}insertAfter(t,r){const n=this.getNode(r);n.parent.insertAfter({data:t},n)}remove(t){const r=this.getNode(t);r&&r.parent&&(r===this.currentNode&&(this.currentNode=null),r.parent.removeChild(r))}append(t,r){const n=r?this.getNode(r):this.root;n&&n.insertChild({data:t})}_initDefaultCheckedNodes(){const t=this.defaultCheckedKeys||[],r=this.nodesMap;t.forEach(n=>{const i=r[n];i&&i.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(t){(this.defaultCheckedKeys||[]).includes(t.key)&&t.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(t){t!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=t,this._initDefaultCheckedNodes())}registerNode(t){const r=this.key;!t||!t.data||(r?t.key!==void 0&&(this.nodesMap[t.key]=t):this.nodesMap[t.id]=t)}deregisterNode(t){!this.key||!t||!t.data||(t.childNodes.forEach(r=>{this.deregisterNode(r)}),delete this.nodesMap[t.key])}getCheckedNodes(t=!1,r=!1){const n=[],i=function(o){(o.root?o.root.childNodes:o.childNodes).forEach(s=>{(s.checked||r&&s.indeterminate)&&(!t||t&&s.isLeaf)&&n.push(s.data),i(s)})};return i(this),n}getCheckedKeys(t=!1){return this.getCheckedNodes(t).map(r=>(r||{})[this.key])}getHalfCheckedNodes(){const t=[],r=function(n){(n.root?n.root.childNodes:n.childNodes).forEach(i=>{i.indeterminate&&t.push(i.data),r(i)})};return r(this),t}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(t=>(t||{})[this.key])}_getAllNodes(){const t=[],r=this.nodesMap;for(const n in r)J7(r,n)&&t.push(r[n]);return t}updateChildren(t,r){const n=this.nodesMap[t];if(!n)return;const i=n.childNodes;for(let o=i.length-1;o>=0;o--){const s=i[o];this.remove(s.data)}for(let o=0,s=r.length;o<s;o++){const l=r[o];this.append(l,n.data)}}_setCheckedKeys(t,r=!1,n){const i=this._getAllNodes().sort((c,u)=>c.level-u.level),o=Object.create(null),s=Object.keys(n);i.forEach(c=>c.setChecked(!1,!1));const l=c=>{c.childNodes.forEach(u=>{var d;o[u.data[t]]=!0,(d=u.childNodes)!=null&&d.length&&l(u)})};for(let c=0,u=i.length;c<u;c++){const d=i[c],h=d.data[t].toString();if(!s.includes(h)){d.checked&&!o[h]&&d.setChecked(!1,!1);continue}if(d.childNodes.length&&l(d),d.isLeaf||this.checkStrictly){d.setChecked(!0,!1);continue}if(d.setChecked(!0,!0),r){d.setChecked(!1,!1);const p=function(f){f.childNodes.forEach(m=>{m.isLeaf||m.setChecked(!1,!1),p(m)})};p(d)}}}setCheckedNodes(t,r=!1){const n=this.key,i={};t.forEach(o=>{i[(o||{})[n]]=!0}),this._setCheckedKeys(n,r,i)}setCheckedKeys(t,r=!1){this.defaultCheckedKeys=t;const n=this.key,i={};t.forEach(o=>{i[o]=!0}),this._setCheckedKeys(n,r,i)}setDefaultExpandedKeys(t){t=t||[],this.defaultExpandedKeys=t,t.forEach(r=>{const n=this.getNode(r);n&&n.expand(null,this.autoExpandParent)})}setChecked(t,r,n){const i=this.getNode(t);i&&i.setChecked(!!r,n)}getCurrentNode(){return this.currentNode}setCurrentNode(t){const r=this.currentNode;r&&(r.isCurrent=!1),this.currentNode=t,this.currentNode.isCurrent=!0}setUserCurrentNode(t,r=!0){const n=t[this.key],i=this.nodesMap[n];this.setCurrentNode(i),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(t,r=!0){if(t==null){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const n=this.getNode(t);n&&(this.setCurrentNode(n),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}};const C_t=a.defineComponent({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=xi("tree"),r=a.inject("NodeInstance"),n=a.inject("RootTree");return()=>{const i=e.node,{data:o,store:s}=i;return e.renderContent?e.renderContent(a.h,{_self:r,node:i,data:o,store:s}):a.renderSlot(n.ctx.slots,"default",{node:i,data:o},()=>[a.h("span",{class:t.be("node","label")},[i.label])])}}});var E_t=wi(C_t,[["__file","tree-node-content.vue"]]);function A7e(e){const t=a.inject("TreeNodeMap",null),r={treeNodeExpand:n=>{e.node!==n&&e.node.collapse()},children:[]};return t&&t.children.push(r),a.provide("TreeNodeMap",r),{broadcastExpanded:n=>{if(e.accordion)for(const i of r.children)i.treeNodeExpand(n)}}}const O7e=Symbol("dragEvents");function A_t({props:e,ctx:t,el$:r,dropIndicator$:n,store:i}){const o=xi("tree"),s=a.ref({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return a.provide(O7e,{treeNodeDragStart:({event:l,treeNode:c})=>{if(typeof e.allowDrag=="function"&&!e.allowDrag(c.node))return l.preventDefault(),!1;l.dataTransfer.effectAllowed="move";try{l.dataTransfer.setData("text/plain","")}catch{}s.value.draggingNode=c,t.emit("node-drag-start",c.node,l)},treeNodeDragOver:({event:l,treeNode:c})=>{const u=c,d=s.value.dropNode;d&&d.node.id!==u.node.id&&B5(d.$el,o.is("drop-inner"));const h=s.value.draggingNode;if(!h||!u)return;let p=!0,f=!0,m=!0,g=!0;typeof e.allowDrop=="function"&&(p=e.allowDrop(h.node,u.node,"prev"),g=f=e.allowDrop(h.node,u.node,"inner"),m=e.allowDrop(h.node,u.node,"next")),l.dataTransfer.dropEffect=f||p||m?"move":"none",(p||f||m)&&(d==null?void 0:d.node.id)!==u.node.id&&(d&&t.emit("node-drag-leave",h.node,d.node,l),t.emit("node-drag-enter",h.node,u.node,l)),p||f||m?s.value.dropNode=u:s.value.dropNode=null,u.node.nextSibling===h.node&&(m=!1),u.node.previousSibling===h.node&&(p=!1),u.node.contains(h.node,!1)&&(f=!1),(h.node===u.node||h.node.contains(u.node))&&(p=!1,f=!1,m=!1);const T=u.$el.querySelector(`.${o.be("node","content")}`).getBoundingClientRect(),y=r.value.getBoundingClientRect();let v;const _=p?f?.25:m?.45:1:-1,b=m?f?.75:p?.55:0:1;let L=-9999;const w=l.clientY-T.top;w<T.height*_?v="before":w>T.height*b?v="after":f?v="inner":v="none";const M=u.$el.querySelector(`.${o.be("node","expand-icon")}`).getBoundingClientRect(),C=n.value;v==="before"?L=M.top-y.top:v==="after"&&(L=M.bottom-y.top),C.style.top=`${L}px`,C.style.left=`${M.right-y.left}px`,v==="inner"?ZP(u.$el,o.is("drop-inner")):B5(u.$el,o.is("drop-inner")),s.value.showDropIndicator=v==="before"||v==="after",s.value.allowDrop=s.value.showDropIndicator||g,s.value.dropType=v,t.emit("node-drag-over",h.node,u.node,l)},treeNodeDragEnd:l=>{const{draggingNode:c,dropType:u,dropNode:d}=s.value;if(l.preventDefault(),l.dataTransfer.dropEffect="move",c&&d){const h={data:c.node.data};u!=="none"&&c.node.remove(),u==="before"?d.node.parent.insertBefore(h,d.node):u==="after"?d.node.parent.insertAfter(h,d.node):u==="inner"&&d.node.insertChild(h),u!=="none"&&i.value.registerNode(h),B5(d.$el,o.is("drop-inner")),t.emit("node-drag-end",c.node,d.node,u,l),u!=="none"&&t.emit("node-drop",c.node,d.node,u,l)}c&&!d&&t.emit("node-drag-end",c.node,null,u,l),s.value.showDropIndicator=!1,s.value.draggingNode=null,s.value.dropNode=null,s.value.allowDrop=!0}}),{dragState:s}}const O_t=a.defineComponent({name:"ElTreeNode",components:{ElCollapseTransition:RQt,ElCheckbox:gI,NodeContent:E_t,ElIcon:Fl,Loading:HX},props:{node:{type:xK,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(e,t){const r=xi("tree"),{broadcastExpanded:n}=A7e(e),i=a.inject("RootTree"),o=a.ref(!1),s=a.ref(!1),l=a.ref(null),c=a.ref(null),u=a.ref(null),d=a.inject(O7e),h=a.getCurrentInstance();a.provide("NodeInstance",h),i||Bl("Tree","Can not find node's tree."),e.node.expanded&&(o.value=!0,s.value=!0);const p=i.props.props.children||"children";a.watch(()=>{const b=e.node.data[p];return b&&[...b]},()=>{e.node.updateChildren()}),a.watch(()=>e.node.indeterminate,b=>{g(e.node.checked,b)}),a.watch(()=>e.node.checked,b=>{g(b,e.node.indeterminate)}),a.watch(()=>e.node.expanded,b=>{a.nextTick(()=>o.value=b),b&&(s.value=!0)});const f=b=>vK(i.props.nodeKey,b.data),m=b=>{const L=e.props.class;if(!L)return{};let w;if(Bu(L)){const{data:M}=b;w=L(M,b)}else w=L;return Rl(w)?{[w]:!0}:w},g=(b,L)=>{(l.value!==b||c.value!==L)&&i.ctx.emit("check-change",e.node.data,b,L),l.value=b,c.value=L},T=b=>{bK(i.store,i.ctx.emit,()=>i.store.value.setCurrentNode(e.node)),i.currentNode.value=e.node,i.props.expandOnClickNode&&v(),i.props.checkOnClickNode&&!e.node.disabled&&_(null,{target:{checked:!e.node.checked}}),i.ctx.emit("node-click",e.node.data,e.node,h,b)},y=b=>{i.instance.vnode.props.onNodeContextmenu&&(b.stopPropagation(),b.preventDefault()),i.ctx.emit("node-contextmenu",b,e.node.data,e.node,h)},v=()=>{e.node.isLeaf||(o.value?(i.ctx.emit("node-collapse",e.node.data,e.node,h),e.node.collapse()):(e.node.expand(),t.emit("node-expand",e.node.data,e.node,h)))},_=(b,L)=>{e.node.setChecked(L.target.checked,!i.props.checkStrictly),a.nextTick(()=>{const w=i.store.value;i.ctx.emit("check",e.node.data,{checkedNodes:w.getCheckedNodes(),checkedKeys:w.getCheckedKeys(),halfCheckedNodes:w.getHalfCheckedNodes(),halfCheckedKeys:w.getHalfCheckedKeys()})})};return{ns:r,node$:u,tree:i,expanded:o,childNodeRendered:s,oldChecked:l,oldIndeterminate:c,getNodeKey:f,getNodeClass:m,handleSelectChange:g,handleClick:T,handleContextMenu:y,handleExpandIconClick:v,handleCheckChange:_,handleChildNodeExpand:(b,L,w)=>{n(L),i.ctx.emit("node-expand",b,L,w)},handleDragStart:b=>{i.props.draggable&&d.treeNodeDragStart({event:b,treeNode:e})},handleDragOver:b=>{b.preventDefault(),i.props.draggable&&d.treeNodeDragOver({event:b,treeNode:{$el:u.value,node:e.node}})},handleDrop:b=>{b.preventDefault()},handleDragEnd:b=>{i.props.draggable&&d.treeNodeDragEnd(b)},CaretRight:M9t}}}),P_t=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],I_t=["aria-expanded"];function H_t(e,t,r,n,i,o){const s=a.resolveComponent("el-icon"),l=a.resolveComponent("el-checkbox"),c=a.resolveComponent("loading"),u=a.resolveComponent("node-content"),d=a.resolveComponent("el-tree-node"),h=a.resolveComponent("el-collapse-transition");return a.withDirectives((a.openBlock(),a.createElementBlock("div",{ref:"node$",class:a.normalizeClass([e.ns.b("node"),e.ns.is("expanded",e.expanded),e.ns.is("current",e.node.isCurrent),e.ns.is("hidden",!e.node.visible),e.ns.is("focusable",!e.node.disabled),e.ns.is("checked",!e.node.disabled&&e.node.checked),e.getNodeClass(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.node.disabled,"aria-checked":e.node.checked,draggable:e.tree.props.draggable,"data-key":e.getNodeKey(e.node),onClick:t[1]||(t[1]=a.withModifiers((...p)=>e.handleClick&&e.handleClick(...p),["stop"])),onContextmenu:t[2]||(t[2]=(...p)=>e.handleContextMenu&&e.handleContextMenu(...p)),onDragstart:t[3]||(t[3]=a.withModifiers((...p)=>e.handleDragStart&&e.handleDragStart(...p),["stop"])),onDragover:t[4]||(t[4]=a.withModifiers((...p)=>e.handleDragOver&&e.handleDragOver(...p),["stop"])),onDragend:t[5]||(t[5]=a.withModifiers((...p)=>e.handleDragEnd&&e.handleDragEnd(...p),["stop"])),onDrop:t[6]||(t[6]=a.withModifiers((...p)=>e.handleDrop&&e.handleDrop(...p),["stop"]))},[a.createElementVNode("div",{class:a.normalizeClass(e.ns.be("node","content")),style:a.normalizeStyle({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(a.openBlock(),a.createBlock(s,{key:0,class:a.normalizeClass([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:a.withModifiers(e.handleExpandIconClick,["stop"])},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.tree.props.icon||e.CaretRight)))]),_:1},8,["class","onClick"])):a.createCommentVNode("v-if",!0),e.showCheckbox?(a.openBlock(),a.createBlock(l,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:t[0]||(t[0]=a.withModifiers(()=>{},["stop"])),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):a.createCommentVNode("v-if",!0),e.node.loading?(a.openBlock(),a.createBlock(s,{key:2,class:a.normalizeClass([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:a.withCtx(()=>[a.createVNode(c)]),_:1},8,["class"])):a.createCommentVNode("v-if",!0),a.createVNode(u,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),a.createVNode(h,null,{default:a.withCtx(()=>[!e.renderAfterExpand||e.childNodeRendered?a.withDirectives((a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.node.childNodes,p=>(a.openBlock(),a.createBlock(d,{key:e.getNodeKey(p),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:p,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,I_t)),[[a.vShow,e.expanded]]):a.createCommentVNode("v-if",!0)]),_:1})],42,P_t)),[[a.vShow,e.node.visible]])}var V_t=wi(O_t,[["render",H_t],["__file","tree-node.vue"]]);function R_t({el$:e},t){const r=xi("tree"),n=a.shallowRef([]),i=a.shallowRef([]);a.onMounted(()=>{o()}),a.onUpdated(()=>{n.value=Array.from(e.value.querySelectorAll("[role=treeitem]")),i.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"))}),a.watch(i,s=>{s.forEach(l=>{l.setAttribute("tabindex","-1")})}),V5(e,"keydown",s=>{const l=s.target;if(!l.className.includes(r.b("node")))return;const c=s.code;n.value=Array.from(e.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`));const u=n.value.indexOf(l);let d;if([iu.up,iu.down].includes(c)){if(s.preventDefault(),c===iu.up){d=u===-1?0:u!==0?u-1:n.value.length-1;const p=d;for(;!t.value.getNode(n.value[d].dataset.key).canFocus;){if(d--,d===p){d=-1;break}d<0&&(d=n.value.length-1)}}else{d=u===-1?0:u<n.value.length-1?u+1:0;const p=d;for(;!t.value.getNode(n.value[d].dataset.key).canFocus;){if(d++,d===p){d=-1;break}d>=n.value.length&&(d=0)}}d!==-1&&n.value[d].focus()}[iu.left,iu.right].includes(c)&&(s.preventDefault(),l.click());const h=l.querySelector('[type="checkbox"]');[iu.enter,iu.space].includes(c)&&h&&(s.preventDefault(),h.click())});const o=()=>{var s;n.value=Array.from(e.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`)),i.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"));const l=e.value.querySelectorAll(`.${r.is("checked")}[role=treeitem]`);if(l.length){l[0].setAttribute("tabindex","0");return}(s=n.value[0])==null||s.setAttribute("tabindex","0")}}const N_t=a.defineComponent({name:"ElTree",components:{ElTreeNode:V_t},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:sf}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(e,t){const{t:r}=tL(),n=xi("tree"),i=a.ref(new k_t({key:e.nodeKey,data:e.data,lazy:e.lazy,props:e.props,load:e.load,currentNodeKey:e.currentNodeKey,checkStrictly:e.checkStrictly,checkDescendants:e.checkDescendants,defaultCheckedKeys:e.defaultCheckedKeys,defaultExpandedKeys:e.defaultExpandedKeys,autoExpandParent:e.autoExpandParent,defaultExpandAll:e.defaultExpandAll,filterNodeMethod:e.filterNodeMethod}));i.value.initialize();const o=a.ref(i.value.root),s=a.ref(null),l=a.ref(null),c=a.ref(null),{broadcastExpanded:u}=A7e(e),{dragState:d}=A_t({props:e,ctx:t,el$:l,dropIndicator$:c,store:i});R_t({el$:l},i);const h=a.computed(()=>{const{childNodes:R}=o.value;return!R||R.length===0||R.every(({visible:Z})=>!Z)});a.watch(()=>e.currentNodeKey,R=>{i.value.setCurrentNodeKey(R)}),a.watch(()=>e.defaultCheckedKeys,R=>{i.value.setDefaultCheckedKey(R)}),a.watch(()=>e.defaultExpandedKeys,R=>{i.value.setDefaultExpandedKeys(R)}),a.watch(()=>e.data,R=>{i.value.setData(R)},{deep:!0}),a.watch(()=>e.checkStrictly,R=>{i.value.checkStrictly=R});const p=R=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");i.value.filter(R)},f=R=>vK(e.nodeKey,R.data),m=R=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const Z=i.value.getNode(R);if(!Z)return[];const X=[Z.data];let U=Z.parent;for(;U&&U!==o.value;)X.push(U.data),U=U.parent;return X.reverse()},g=(R,Z)=>i.value.getCheckedNodes(R,Z),T=R=>i.value.getCheckedKeys(R),y=()=>{const R=i.value.getCurrentNode();return R?R.data:null},v=()=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const R=y();return R?R[e.nodeKey]:null},_=(R,Z)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");i.value.setCheckedNodes(R,Z)},b=(R,Z)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");i.value.setCheckedKeys(R,Z)},L=(R,Z,X)=>{i.value.setChecked(R,Z,X)},w=()=>i.value.getHalfCheckedNodes(),M=()=>i.value.getHalfCheckedKeys(),C=(R,Z=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");bK(i,t.emit,()=>i.value.setUserCurrentNode(R,Z))},A=(R,Z=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");bK(i,t.emit,()=>i.value.setCurrentNodeKey(R,Z))},O=R=>i.value.getNode(R),V=R=>{i.value.remove(R)},H=(R,Z)=>{i.value.append(R,Z)},N=(R,Z)=>{i.value.insertBefore(R,Z)},D=(R,Z)=>{i.value.insertAfter(R,Z)},j=(R,Z,X)=>{u(Z),t.emit("node-expand",R,Z,X)},G=(R,Z)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");i.value.updateChildren(R,Z)};return a.provide("RootTree",{ctx:t,props:e,store:i,root:o,currentNode:s,instance:a.getCurrentInstance()}),a.provide(dL,void 0),{ns:n,store:i,root:o,currentNode:s,dragState:d,el$:l,dropIndicator$:c,isEmpty:h,filter:p,getNodeKey:f,getNodePath:m,getCheckedNodes:g,getCheckedKeys:T,getCurrentNode:y,getCurrentKey:v,setCheckedNodes:_,setCheckedKeys:b,setChecked:L,getHalfCheckedNodes:w,getHalfCheckedKeys:M,setCurrentNode:C,setCurrentKey:A,t:r,getNode:O,remove:V,append:H,insertBefore:N,insertAfter:D,handleNodeExpand:j,updateKeyChildren:G}}});function B_t(e,t,r,n,i,o){const s=a.resolveComponent("el-tree-node");return a.openBlock(),a.createElementBlock("div",{ref:"el$",class:a.normalizeClass([e.ns.b(),e.ns.is("dragging",!!e.dragState.draggingNode),e.ns.is("drop-not-allow",!e.dragState.allowDrop),e.ns.is("drop-inner",e.dragState.dropType==="inner"),{[e.ns.m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.root.childNodes,l=>(a.openBlock(),a.createBlock(s,{key:e.getNodeKey(l),node:l,props:e.props,accordion:e.accordion,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,"render-content":e.renderContent,onNodeExpand:e.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),e.isEmpty?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(e.ns.e("empty-block"))},[a.renderSlot(e.$slots,"empty",{},()=>{var l;return[a.createElementVNode("span",{class:a.normalizeClass(e.ns.e("empty-text"))},a.toDisplayString((l=e.emptyText)!=null?l:e.t("el.tree.emptyText")),3)]})],2)):a.createCommentVNode("v-if",!0),a.withDirectives(a.createElementVNode("div",{ref:"dropIndicator$",class:a.normalizeClass(e.ns.e("drop-indicator"))},null,2),[[a.vShow,e.dragState.showDropIndicator]])],2)}var wI=wi(N_t,[["render",B_t],["__file","tree.vue"]]);wI.install=e=>{e.component(wI.name,wI)};const F_t=wI,P7e=F_t;function D_t(e){let t;const r=a.ref(!1),n=a.reactive({...e,originalPosition:"",originalOverflow:"",visible:!1});function i(p){n.text=p}function o(){const p=n.parent,f=h.ns;if(!p.vLoadingAddClassList){let m=p.getAttribute("loading-number");m=Number.parseInt(m)-1,m?p.setAttribute("loading-number",m.toString()):(B5(p,f.bm("parent","relative")),p.removeAttribute("loading-number")),B5(p,f.bm("parent","hidden"))}s(),d.unmount()}function s(){var p,f;(f=(p=h.$el)==null?void 0:p.parentNode)==null||f.removeChild(h.$el)}function l(){var p;e.beforeClose&&!e.beforeClose()||(r.value=!0,clearTimeout(t),t=window.setTimeout(c,400),n.visible=!1,(p=e.closed)==null||p.call(e))}function c(){if(!r.value)return;const p=n.parent;r.value=!1,p.vLoadingAddClassList=void 0,o()}const u=a.defineComponent({name:"ElLoading",setup(p,{expose:f}){const{ns:m,zIndex:g}=RTt("loading");return f({ns:m,zIndex:g}),()=>{const T=n.spinner||n.svg,y=a.h("svg",{class:"circular",viewBox:n.svgViewBox?n.svgViewBox:"0 0 50 50",...T?{innerHTML:T}:{}},[a.h("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),v=n.text?a.h("p",{class:m.b("text")},[n.text]):void 0;return a.h(a.Transition,{name:m.b("fade"),onAfterLeave:c},{default:a.withCtx(()=>[a.withDirectives(a.createVNode("div",{style:{backgroundColor:n.background||""},class:[m.b("mask"),n.customClass,n.fullscreen?"is-fullscreen":""]},[a.h("div",{class:m.b("spinner")},[y,v])]),[[a.vShow,n.visible]])])})}}}),d=a.createApp(u),h=d.mount(document.createElement("div"));return{...a.toRefs(n),setText:i,removeElLoadingChild:s,close:l,handleAfterLeave:c,vm:h,get $el(){return h.$el}}}let LI;const _K=function(e={}){if(!Ts)return;const t=z_t(e);if(t.fullscreen&&LI)return LI;const r=D_t({...t,closed:()=>{var i;(i=t.closed)==null||i.call(t),t.fullscreen&&(LI=void 0)}});j_t(t,t.parent,r),I7e(t,t.parent,r),t.parent.vLoadingAddClassList=()=>I7e(t,t.parent,r);let n=t.parent.getAttribute("loading-number");return n?n=`${Number.parseInt(n)+1}`:n="1",t.parent.setAttribute("loading-number",n),t.parent.appendChild(r.$el),a.nextTick(()=>r.visible.value=t.visible),t.fullscreen&&(LI=r),r},z_t=e=>{var t,r,n,i;let o;return Rl(e.target)?o=(t=document.querySelector(e.target))!=null?t:document.body:o=e.target||document.body,{parent:o===document.body||e.body?document.body:o,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:o===document.body&&((r=e.fullscreen)!=null?r:!0),lock:(n=e.lock)!=null?n:!1,customClass:e.customClass||"",visible:(i=e.visible)!=null?i:!0,target:o}},j_t=async(e,t,r)=>{const{nextZIndex:n}=r.vm.zIndex||r.vm._.exposed.zIndex,i={};if(e.fullscreen)r.originalPosition.value=RT(document.body,"position"),r.originalOverflow.value=RT(document.body,"overflow"),i.zIndex=n();else if(e.parent===document.body){r.originalPosition.value=RT(document.body,"position"),await a.nextTick();for(const o of["top","left"]){const s=o==="top"?"scrollTop":"scrollLeft";i[o]=`${e.target.getBoundingClientRect()[o]+document.body[s]+document.documentElement[s]-Number.parseInt(RT(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])i[o]=`${e.target.getBoundingClientRect()[o]}px`}else r.originalPosition.value=RT(t,"position");for(const[o,s]of Object.entries(i))r.$el.style[o]=s},I7e=(e,t,r)=>{const n=r.vm.ns||r.vm._.exposed.ns;["absolute","fixed","sticky"].includes(r.originalPosition.value)?B5(t,n.bm("parent","relative")):ZP(t,n.bm("parent","relative")),e.fullscreen&&e.lock?ZP(t,n.bm("parent","hidden")):B5(t,n.bm("parent","hidden"))},SI=Symbol("ElLoading"),H7e=(e,t)=>{var r,n,i,o;const s=t.instance,l=p=>B1(t.value)?t.value[p]:void 0,c=p=>{const f=Rl(p)&&(s==null?void 0:s[p])||p;return f&&a.ref(f)},u=p=>c(l(p)||e.getAttribute(`element-loading-${bmt(p)}`)),d=(r=l("fullscreen"))!=null?r:t.modifiers.fullscreen,h={text:u("text"),svg:u("svg"),svgViewBox:u("svgViewBox"),spinner:u("spinner"),background:u("background"),customClass:u("customClass"),fullscreen:d,target:(n=l("target"))!=null?n:d?void 0:e,body:(i=l("body"))!=null?i:t.modifiers.body,lock:(o=l("lock"))!=null?o:t.modifiers.lock};e[SI]={options:h,instance:_K(h)}},U_t=(e,t)=>{for(const r of Object.keys(t))a.isRef(t[r])&&(t[r].value=e[r])},MI={mounted(e,t){t.value&&H7e(e,t)},updated(e,t){const r=e[SI];t.oldValue!==t.value&&(t.value&&!t.oldValue?H7e(e,t):t.value&&t.oldValue?B1(t.value)&&U_t(t.value,r.options):r==null||r.instance.close())},unmounted(e){var t;(t=e[SI])==null||t.instance.close(),e[SI]=null}},G_t={install(e){e.directive("loading",MI),e.config.globalProperties.$loading=_K},directive:MI,service:_K},Nh=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},W_t={name:"RelevanceDialog",components:{Row:c3,Col:Rh,Card:Y8e},props:{entry:{type:Object},drawing:{type:Boolean,default:!1},relevance:{type:Boolean,default:!1}},data:function(){return{tooltipId:void 0}},watch:{relevance:function(){this.tooltipId=void 0}},methods:{capitalise:function(e){return e[0].toUpperCase()+e.slice(1)},handleTooltipOpen:function(e){this.tooltipId=e,this.$emit("tooltip",e)},handleTooltipClose:function(){this.tooltipId=void 0,this.$emit("popup",!0)}}},q_t=e=>(a.pushScopeId("data-v-acd4f6d6"),e=e(),a.popScopeId(),e),Z_t={class:"dialog-container"},X_t={key:0,class:"dialog-title"},K_t={key:1,class:"dialog-title"},Y_t=q_t(()=>a.createElementVNode("b",null,[a.createElementVNode("span",null,"Related Features")],-1));function J_t(e,t,r,n,i,o){const s=l3,l=Rh,c=c3,u=Y8e,d=YP,h=Fl;return a.openBlock(),a.createElementBlock("div",Z_t,[a.createVNode(c,null,{default:a.withCtx(()=>[r.drawing?(a.openBlock(),a.createElementBlock("span",X_t,"Finalise drawing")):(a.openBlock(),a.createElementBlock("span",K_t,"Visualise relevance")),r.drawing?(a.openBlock(),a.createBlock(c,{key:2},{default:a.withCtx(()=>[a.createVNode(l,{span:13},{default:a.withCtx(()=>[a.createVNode(s,{type:"primary",plain:"",onClick:t[0]||(t[0]=p=>e.$emit("confirm",!0))},{default:a.withCtx(()=>[a.createTextVNode(" Confirm ")]),_:1})]),_:1}),a.createVNode(l,{span:11},{default:a.withCtx(()=>[a.createVNode(s,{type:"primary",plain:"",onClick:t[1]||(t[1]=p=>e.$emit("cancel",!0))},{default:a.withCtx(()=>[a.createTextVNode(" Cancel ")]),_:1})]),_:1})]),_:1})):(a.openBlock(),a.createBlock(c,{key:3},{default:a.withCtx(()=>[a.createVNode(s,{type:"primary",plain:"",onClick:t[2]||(t[2]=p=>e.$emit("display",!1))},{default:a.withCtx(()=>[a.createTextVNode(" Close ")]),_:1})]),_:1}))]),_:1}),r.relevance?(a.openBlock(),a.createBlock(c,{key:0},{default:a.withCtx(()=>[a.createVNode(l,null,{default:a.withCtx(()=>[Y_t,(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.entry,(p,f)=>(a.openBlock(),a.createBlock(c,{key:f},{default:a.withCtx(()=>[a.createVNode(l,{span:20},{default:a.withCtx(()=>[a.createVNode(u,{shadow:"hover",onClick:m=>o.handleTooltipOpen(p)},{default:a.withCtx(()=>[a.createElementVNode("span",null,a.toDisplayString(o.capitalise(f)),1)]),_:2},1032,["onClick"])]),_:2},1024),p===e.tooltipId?(a.openBlock(),a.createBlock(l,{key:0,span:4},{default:a.withCtx(()=>[a.createVNode(h,null,{default:a.withCtx(()=>[a.createVNode(d,{onClick:o.handleTooltipClose},null,8,["onClick"])]),_:1})]),_:1})):a.createCommentVNode("",!0)]),_:2},1024))),128))]),_:1})]),_:1})):a.createCommentVNode("",!0)])}const $_t=Nh(W_t,[["render",J_t],["__scopeId","data-v-acd4f6d6"]]),ewt={name:"ExternalResourceCard",components:{Button:l3},props:{resources:{type:Array,default:()=>[]}},data:function(){return{pubmeds:[],pubmedIds:[],ElIconNotebook:a.shallowRef(D9t)}},methods:{capitalise:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},openUrl:function(e){window.open(e,"_blank")}}},twt={class:"resource-container"};function rwt(e,t,r,n,i,o){const s=l3;return a.openBlock(),a.createElementBlock("div",twt,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.resources,l=>(a.openBlock(),a.createElementBlock("div",{key:l.id,class:"resource"},[l.id==="pubmed"?(a.openBlock(),a.createBlock(s,{key:0,class:"button",id:"open-pubmed-button",icon:e.ElIconNotebook,onClick:c=>o.openUrl(l.url)},{default:a.withCtx(()=>[a.createTextVNode(" Open publications in pubmed ")]),_:2},1032,["icon","onClick"])):a.createCommentVNode("",!0)]))),128))])}const V7e=Nh(ewt,[["render",rwt],["__scopeId","data-v-5386b943"]]);function nwt(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map(function(i){i(r)}),(n=e.get("*"))&&n.slice().map(function(i){i(t,r)})}}}const kI=new nwt,iwt=e=>e.replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()),owt=function(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""},awt={name:"ProvenancePopup",components:{Button:l3,Container:Lxt,Icon:Fl,ExternalResourceCard:V7e,ElIconArrowUp:KP,ElIconArrowDown:F5,ElIconWarning:Cme},props:{entry:{type:Object,default:()=>({destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0})}},data:function(){return{controller:void 0,activeSpecies:void 0,pubmedSearchUrl:"",loading:!1,showToolip:!1,showDetails:!1,originDescriptions:{motor:"is the location of the initial cell body of the circuit",sensory:"is the location of the initial cell body in the PNS circuit"},componentsWithDatasets:[],uberons:[{id:void 0,name:void 0}]}},computed:{resources:function(){let e=[];return this.entry&&this.entry.hyperlinks&&(e=this.entry.hyperlinks),e},originDescription:function(){return this.entry&&this.entry.title&&this.entry.title.toLowerCase().includes("motor")?this.originDescriptions.motor:this.originDescriptions.sensory},provSpeciesDescription:function(){let e="Observed in";return this.entry.provenanceTaxonomyLabel.forEach(t=>{e+=` ${t},`}),e=e.slice(0,-1),e+=" species",e}},methods:{titleCase:function(e){return iwt(e)},capitalise:function(e){return owt(e)},openUrl:function(e){window.open(e,"_blank")},openAll:function(){kI.emit("onActionClick",{type:"Facets",labels:this.entry.componentsWithDatasets.map(e=>e.name)})},openAxons:function(){kI.emit("onActionClick",{type:"Facets",labels:this.entry.destinationsWithDatasets.map(e=>e.name)})},openDendrites:function(){kI.emit("onActionClick",{type:"Facets",labels:this.entry.originsWithDatasets.map(e=>e.name)})},pubmedSearchUrlUpdate:function(e){this.pubmedSearchUrl=e}}},gL=e=>(a.pushScopeId("data-v-a3d0eed3"),e=e(),a.popScopeId(),e),swt={key:0,class:"main"},lwt={key:0,class:"block"},cwt={class:"title"},uwt={key:0,class:"subtitle"},dwt={key:1,class:"block"},hwt={class:"title"},pwt={class:"content-container scrollbar"},fwt={key:0,class:"block"},mwt=gL(()=>a.createElementVNode("span",{class:"attribute-title"},"Origin",-1)),gwt={style:{"word-break":"keep-all"}},ywt=gL(()=>a.createElementVNode("i",null,"Origin",-1)),Twt=["origin-item-label"],vwt={key:0,class:"seperator"},bwt={key:1,class:"block"},Qwt=gL(()=>a.createElementVNode("div",{class:"attribute-title"},"Components",-1)),xwt=["component-item-label"],_wt={key:0,class:"seperator"},wwt={key:2,class:"block"},Lwt=gL(()=>a.createElementVNode("span",{class:"attribute-title"},"Destination",-1)),Swt=gL(()=>a.createElementVNode("span",{style:{"word-break":"keep-all"}},[a.createElementVNode("i",null,"Destination"),a.createTextVNode(" is where the axons terminate ")],-1)),Mwt=["destination-item-label"],kwt={key:0,class:"seperator"};function Cwt(e,t,r,n,i,o){const s=KP,l=Fl,c=F5,u=Cme,d=QI,h=l3,p=V7e,f=MI;return r.entry?a.withDirectives((a.openBlock(),a.createElementBlock("div",swt,[r.entry.title?(a.openBlock(),a.createElementBlock("div",lwt,[a.createElementVNode("span",cwt,a.toDisplayString(o.capitalise(r.entry.title)),1),r.entry.provenanceTaxonomyLabel&&r.entry.provenanceTaxonomyLabel.length>0?(a.openBlock(),a.createElementBlock("div",uwt,a.toDisplayString(o.provSpeciesDescription),1)):a.createCommentVNode("",!0)])):(a.openBlock(),a.createElementBlock("div",dwt,[a.createElementVNode("span",hwt,a.toDisplayString(r.entry.featureId),1)])),a.withDirectives(a.createElementVNode("div",{class:"hide",id:"hide-path-info",onClick:t[0]||(t[0]=m=>e.showDetails=!1)},[a.createTextVNode(" Hide path information "),a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(s)]),_:1})],512),[[a.vShow,e.showDetails]]),a.withDirectives(a.createElementVNode("div",{class:"hide",id:"show-path-info",onClick:t[1]||(t[1]=m=>e.showDetails=!0)},[a.createTextVNode(" Show path information "),a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(c)]),_:1})],512),[[a.vShow,!e.showDetails]]),a.createVNode(a.Transition,{name:"slide-fade"},{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",pwt,[a.createTextVNode(a.toDisplayString(r.entry.paths)+" ",1),r.entry.origins&&r.entry.origins.length>0?(a.openBlock(),a.createElementBlock("div",fwt,[a.createElementVNode("div",null,[mwt,a.createVNode(d,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:a.withCtx(()=>[a.createVNode(l,{class:"info"},{default:a.withCtx(()=>[a.createVNode(u)]),_:1})]),default:a.withCtx(()=>[a.createElementVNode("span",gwt,[ywt,a.createTextVNode(" "+a.toDisplayString(o.originDescription),1)])]),_:1})]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.entry.origins,(m,g)=>(a.openBlock(),a.createElementBlock("div",{class:"attribute-content","origin-item-label":m,key:m},[a.createTextVNode(a.toDisplayString(o.capitalise(m))+" ",1),g!=r.entry.origins.length-1?(a.openBlock(),a.createElementBlock("div",vwt)):a.createCommentVNode("",!0)],8,Twt))),128)),a.withDirectives(a.createVNode(h,{class:"button",id:"open-dendrites-button",onClick:o.openDendrites},{default:a.withCtx(()=>[a.createTextVNode(" Explore origin data ")]),_:1},8,["onClick"]),[[a.vShow,r.entry.originsWithDatasets&&r.entry.originsWithDatasets.length>0]])])):a.createCommentVNode("",!0),r.entry.components&&r.entry.components.length>0?(a.openBlock(),a.createElementBlock("div",bwt,[Qwt,(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.entry.components,(m,g)=>(a.openBlock(),a.createElementBlock("div",{class:"attribute-content","component-item-label":m,key:m},[a.createTextVNode(a.toDisplayString(o.capitalise(m))+" ",1),g!=r.entry.components.length-1?(a.openBlock(),a.createElementBlock("div",_wt)):a.createCommentVNode("",!0)],8,xwt))),128))])):a.createCommentVNode("",!0),r.entry.destinations&&r.entry.destinations.length>0?(a.openBlock(),a.createElementBlock("div",wwt,[a.createElementVNode("div",null,[Lwt,a.createVNode(d,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:a.withCtx(()=>[a.createVNode(l,{class:"info"},{default:a.withCtx(()=>[a.createVNode(u)]),_:1})]),default:a.withCtx(()=>[Swt]),_:1})]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.entry.destinations,(m,g)=>(a.openBlock(),a.createElementBlock("div",{class:"attribute-content","destination-item-label":m,key:m},[a.createTextVNode(a.toDisplayString(o.capitalise(m))+" ",1),g!=r.entry.destinations.length-1?(a.openBlock(),a.createElementBlock("div",kwt)):a.createCommentVNode("",!0)],8,Mwt))),128)),a.withDirectives(a.createVNode(h,{class:"button",onClick:o.openAxons},{default:a.withCtx(()=>[a.createTextVNode(" Explore destination data ")]),_:1},8,["onClick"]),[[a.vShow,r.entry.destinationsWithDatasets&&r.entry.destinationsWithDatasets.length>0]])])):a.createCommentVNode("",!0),a.withDirectives(a.createVNode(h,{class:"button",onClick:o.openAll},{default:a.withCtx(()=>[a.createTextVNode(" Search for data on components ")]),_:1},8,["onClick"]),[[a.vShow,r.entry.componentsWithDatasets&&r.entry.componentsWithDatasets.length>0]]),a.createVNode(p,{resources:o.resources},null,8,["resources"])],512),[[a.vShow,e.showDetails]])]),_:1})])),[[f,e.loading]]):a.createCommentVNode("",!0)}const R7e=Nh(awt,[["render",Cwt],["__scopeId","data-v-a3d0eed3"]]),Ewt={name:"AnnotationTool",components:{Button:l3,Col:Rh,Input:cI,Main:x7e,Row:c3,Select:$T,ElIconArrowUp:KP,ElIconArrowDown:F5,ElIconEdit:Mme,ElIconClose:NT},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(e){e&&(this.evidence.push(this.evidencePrefix+e),this.newEvidence="")},formatTime:function(e){const t={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};return new Date(e).toLocaleDateString(void 0,t)},updatePrevSubmissions:function(){this.$annotator&&this.authenticated&&this.annotationEntry.resourceId&&this.annotationEntry.featureId&&this.$annotator.itemAnnotations(this.userApiKey,this.annotationEntry.resourceId,this.annotationEntry.featureId).then(e=>{this.prevSubs=e}).catch(e=>{console.log(e)})},submit:function(){if(this.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 e=[];this.evidence.forEach(r=>{if(r.includes("DOI:")){const n=r.replace("DOI:","https://doi.org/");e.push(new URL(n))}else if(r.includes("PMID:")){const n=r.replace("PMID:","https://pubmed.ncbi.nlm.nih.gov/");e.push(new URL(n))}});const t={resource:this.annotationEntry.resourceId,item:this.annotationEntry.featureId,body:{evidence:e,comment:this.comment},feature:this.annotationEntry.feature};Object.assign(t.body,this.annotationEntry.body),this.annotationEntry.type==="deleted"&&(t.feature=void 0),this.creator&&(t.creator=this.creator),this.$annotator.addAnnotation(this.userApiKey,t).then(()=>{this.$emit("annotation",t),this.errorMessage="",this.resetSubmission(),this.updatePrevSubmissions()}).catch(()=>{this.errorMessage="There is a problem with the submission, please try again later"})}},removeEvidence:function(e){this.evidence.splice(e,1)},resetSubmission:function(){this.editing=!1,this.evidence=[],this.newFeature="",this.comment=""}},watch:{annotationEntry:{handler:function(e,t){e!==t&&(this.resetSubmission(),this.updatePrevSubmissions())},immediate:!1,deep:!1}},mounted:function(){this.$annotator.authenticate(this.userApiKey).then(e=>{e.name&&e.email?(this.creator=e,e.orcid||(this.creator.orcid="0000-0000-0000-0000"),this.authenticated=!0,this.updatePrevSubmissions()):this.errorMessage=""})}},cg=e=>(a.pushScopeId("data-v-bb5defc8"),e=e(),a.popScopeId(),e),Awt={class:"block"},Owt=cg(()=>a.createElementVNode("span",{class:"title"},"Feature Annotations",-1)),Pwt=cg(()=>a.createElementVNode("strong",{class:"sub-title"},"Previous submissions:",-1)),Iwt=cg(()=>a.createElementVNode("strong",null,"Evidence: ",-1)),Hwt=["href"],Vwt=cg(()=>a.createElementVNode("strong",null,"Comment: ",-1)),Rwt=cg(()=>a.createElementVNode("strong",{class:"sub-title"},"Suggest changes:",-1)),Nwt=cg(()=>a.createElementVNode("strong",null,"Evidvence:",-1)),Bwt=cg(()=>a.createElementVNode("strong",null,"Comment:",-1)),Fwt={class:"sub-title"};function Dwt(e,t,r,n,i,o){const s=c3,l=KP,c=Fl,u=F5,d=Mme,h=P9t,p=V9t,f=Rh,m=NT,g=bI,T=$T,y=cI,v=l3,_=x7e;return a.openBlock(),a.createBlock(_,{class:"main"},{default:a.withCtx(()=>[a.createElementVNode("div",Awt,[a.createVNode(s,{class:"info-field"},{default:a.withCtx(()=>[Owt]),_:1}),r.annotationEntry?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.displayPair,(b,L)=>a.withDirectives((a.openBlock(),a.createBlock(s,{class:"dialog-text",key:b},{default:a.withCtx(()=>[a.createElementVNode("strong",null,a.toDisplayString(L)+": ",1),a.createTextVNode(" "+a.toDisplayString(r.annotationEntry[b]),1)]),_:2},1024)),[[a.vShow,r.annotationEntry[b]]])),128)),e.prevSubs.length>0?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.withDirectives(a.createElementVNode("div",{class:"hide",onClick:t[0]||(t[0]=b=>e.showSubmissions=!1)},[a.createTextVNode(" Hide previous submissions "),a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(l)]),_:1})],512),[[a.vShow,e.showSubmissions]]),a.withDirectives(a.createElementVNode("div",{class:"hide",onClick:t[1]||(t[1]=b=>e.showSubmissions=!0)},[a.createTextVNode(" Show previous "+a.toDisplayString(e.prevSubs.length)+" submission(s) ",1),a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(u)]),_:1})],512),[[a.vShow,!e.showSubmissions]]),e.showSubmissions?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createVNode(s,{class:"dialog-spacer"}),a.createVNode(s,{class:"dialog-text"},{default:a.withCtx(()=>[Pwt]),_:1}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.prevSubs,(b,L)=>(a.openBlock(),a.createElementBlock("div",{class:"entry",key:L},[a.createVNode(s,{class:"dialog-text"},{default:a.withCtx(()=>[a.createElementVNode("strong",null,a.toDisplayString(o.formatTime(b.created)),1),a.createTextVNode(" "+a.toDisplayString(b.creator.name),1)]),_:2},1024),a.createVNode(s,{class:"dialog-text"},{default:a.withCtx(()=>[Iwt,(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(b.body.evidence,w=>(a.openBlock(),a.createBlock(s,{key:w,class:"dialog-text"},{default:a.withCtx(()=>[a.createElementVNode("a",{href:w,target:"_blank"},a.toDisplayString(w),9,Hwt)]),_:2},1024))),128))]),_:2},1024),a.createVNode(s,{class:"dialog-text"},{default:a.withCtx(()=>[Vwt,a.createTextVNode(" "+a.toDisplayString(b.body.comment),1)]),_:2},1024)]))),128))],64)):a.createCommentVNode("",!0)],64)):a.createCommentVNode("",!0),e.authenticated?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[o.isEditable?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createVNode(s,{class:"dialog-spacer"}),e.editing?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createVNode(s,{class:"dialog-text"},{default:a.withCtx(()=>[Rwt]),_:1}),o.isDeleted?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createVNode(s,{class:"dialog-text"},{default:a.withCtx(()=>[Nwt]),_:1}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.evidence,(b,L)=>(a.openBlock(),a.createBlock(s,{key:b},{default:a.withCtx(()=>[a.createVNode(f,{span:20},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(e.evidence[L]),1)]),_:2},1024),a.createVNode(f,{span:4},{default:a.withCtx(()=>[a.createVNode(c,{class:"standard-icon"},{default:a.withCtx(()=>[a.createVNode(m,{onClick:w=>o.removeEvidence(L)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128)),a.createVNode(s,null,{default:a.withCtx(()=>[a.createVNode(y,{size:"small",placeholder:"Enter",modelValue:e.newEvidence,"onUpdate:modelValue":t[4]||(t[4]=b=>e.newEvidence=b),onChange:t[5]||(t[5]=b=>o.evidenceEntered(b))},{prepend:a.withCtx(()=>[a.createVNode(T,{teleported:!1,modelValue:e.evidencePrefix,"onUpdate:modelValue":t[3]||(t[3]=b=>e.evidencePrefix=b),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.evidencePrefixes,b=>(a.openBlock(),a.createBlock(g,{key:b,label:b,value:b},{default:a.withCtx(()=>[a.createVNode(s,null,{default:a.withCtx(()=>[a.createVNode(f,{span:12},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(b),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})],64)),a.createVNode(s,null,{default:a.withCtx(()=>[Bwt]),_:1}),a.createVNode(s,{class:"dialog-text"},{default:a.withCtx(()=>[a.createVNode(y,{type:"textarea",autosize:{minRows:2,maxRows:4},placeholder:"Enter",modelValue:e.comment,"onUpdate:modelValue":t[6]||(t[6]=b=>e.comment=b)},null,8,["modelValue"])]),_:1}),a.createVNode(s,{class:"dialog-text"},{default:a.withCtx(()=>[a.createVNode(v,{class:"button",type:"primary",plain:"",onClick:o.submit},{default:a.withCtx(()=>[a.createTextVNode(" Submit ")]),_:1},8,["onClick"])]),_:1})],64)):(a.openBlock(),a.createBlock(s,{key:0},{default:a.withCtx(()=>[a.createVNode(c,{class:"standard-icon"},{default:a.withCtx(()=>[a.createVNode(d,{onClick:t[2]||(t[2]=b=>e.editing=!0)})]),_:1}),o.isDeleted?(a.openBlock(),a.createBlock(c,{key:0,class:"standard-icon"},{default:a.withCtx(()=>[a.createVNode(h,{onClick:o.submit},null,8,["onClick"])]),_:1})):o.isPositionUpdated?(a.openBlock(),a.createBlock(c,{key:1,class:"standard-icon"},{default:a.withCtx(()=>[a.createVNode(p,{onClick:o.submit},null,8,["onClick"])]),_:1})):a.createCommentVNode("",!0)]),_:1})),e.errorMessage?(a.openBlock(),a.createBlock(s,{key:2,class:"dialog-text"},{default:a.withCtx(()=>[a.createElementVNode("strong",Fwt,a.toDisplayString(e.errorMessage),1)]),_:1})):a.createCommentVNode("",!0)],64)):a.createCommentVNode("",!0)],64)):a.createCommentVNode("",!0)],64)):a.createCommentVNode("",!0)])]),_:1})}const N7e=Nh(Ewt,[["render",Dwt],["__scopeId","data-v-bb5defc8"]]),zwt={name:"Tooltip",components:{AnnotationTool:N7e,ProvenancePopup:R7e},props:{entry:{type:Object},annotationDisplay:{type:Boolean,default:!1},annotationEntry:{type:Object}}},jwt={class:"tooltip-container",id:"tooltip-container"};function Uwt(e,t,r,n,i,o){const s=N7e,l=R7e;return a.openBlock(),a.createElementBlock("div",jwt,[r.annotationDisplay?(a.openBlock(),a.createBlock(s,{key:0,annotationEntry:r.annotationEntry,onAnnotation:t[0]||(t[0]=c=>e.$emit("annotation",c))},null,8,["annotationEntry"])):(a.openBlock(),a.createBlock(l,{key:1,entry:r.entry},null,8,["entry"]))])}const wK=Nh(zwt,[["render",Uwt],["__scopeId","data-v-8969055b"]]),Gwt={name:"SelectionsGroup",components:{Checkbox:gI,CheckboxGroup:fK,Col:Rh,Row:c3},methods:{reset:function(){this.checkAll=!0,this.checkedItems=[],this.selections.forEach(e=>{!("enabled"in e)||e.enabled===!0?this.checkedItems.push(e[this.identifierKey]):this.checkAll=!1})},visibilityToggle:function(e,t){this.$emit("changed",{key:e,value:t})},handleCheckedItemsChange:function(e){let t=e.length;this.checkAll=t===this.selections.length},handleCheckAllChange:function(e){this.checkedItems=e?this.selections.map(t=>t[this.identifierKey]):[],this.$emit("checkAll",{keys:this.selections.map(t=>t[this.identifierKey]),value:e})},getBackgroundStyles:function(e){return"colour"in e&&this.colourStyle==="background"?{background:e.colour}:{}},hasLineStyles:function(e){return"colour"in e&&this.colourStyle==="line"},getLineStyles:function(e){return"colour"in e&&this.colourStyle==="line"?"dashed"in e&&e.dashed===!0?{background:`repeating-linear-gradient(90deg,${e.colour},${e.colour} 6px,transparent 0,transparent 9px)`}:{background:e.colour}:{display:"None"}}},props:{colourStyle:{type:String,default:"line"},identifierKey:{type:String,default:"id"},labelKey:{type:String,default:"label"},title:{type:String,default:""},selections:{type:Array,default:function(){return[]}}},computed:{isIndeterminate:function(){return!(this.checkedItems.length===0||this.checkAll)}},data:function(){return{checkedItems:[],checkAll:!0}},mounted:function(){this.reset()}},Wwt={class:"selections-container"},qwt={class:"checkall-display-text"},Zwt={class:"checkbox-group-inner"},Xwt={class:"checkbox-container"};function Kwt(e,t,r,n,i,o){const s=Rh,l=gI,c=c3,u=fK;return a.openBlock(),a.createElementBlock("div",Wwt,[a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(s,{span:12},{default:a.withCtx(()=>[a.createElementVNode("div",qwt,a.toDisplayString(r.title),1)]),_:1}),a.createVNode(s,{span:12},{default:a.withCtx(()=>[r.selections&&r.selections.length>1?(a.openBlock(),a.createBlock(l,{key:0,class:"all-checkbox",indeterminate:o.isIndeterminate,modelValue:e.checkAll,"onUpdate:modelValue":t[0]||(t[0]=d=>e.checkAll=d),onChange:o.handleCheckAllChange},{default:a.withCtx(()=>[a.createTextVNode("Display all")]),_:1},8,["indeterminate","modelValue","onChange"])):a.createCommentVNode("",!0)]),_:1})]),_:1}),a.createVNode(u,{modelValue:e.checkedItems,"onUpdate:modelValue":t[1]||(t[1]=d=>e.checkedItems=d),size:"small",class:"checkbox-group",onChange:o.handleCheckedItemsChange},{default:a.withCtx(()=>[a.createElementVNode("div",Zwt,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.selections,d=>(a.openBlock(),a.createBlock(c,{key:d[r.identifierKey],label:d[r.identifierKey]},{default:a.withCtx(()=>[a.createElementVNode("div",Xwt,[a.createVNode(l,{class:"my-checkbox",label:d[r.identifierKey],onChange:h=>o.visibilityToggle(d[r.identifierKey],h),checked:!("enabled"in d)||d.enabled===!0},{default:a.withCtx(()=>[a.createVNode(c,{class:"checkbox-row"},{default:a.withCtx(()=>[o.hasLineStyles(d)?(a.openBlock(),a.createBlock(s,{key:0,span:4},{default:a.withCtx(()=>[a.createElementVNode("div",{class:"path-visual",style:a.normalizeStyle(o.getLineStyles(d))},null,4)]),_:2},1024)):a.createCommentVNode("",!0),a.createVNode(s,{span:20},{default:a.withCtx(()=>[a.createElementVNode("div",{style:a.normalizeStyle(o.getBackgroundStyles(d))},a.toDisplayString(d[r.labelKey]),5)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","onChange","checked"])])]),_:2},1032,["label"]))),128))])]),_:1},8,["modelValue","onChange"])])}const B7e=Nh(Gwt,[["render",Kwt],["__scopeId","data-v-4d3741da"]]),Ywt={name:"TreeControls",components:{Checkbox:gI,CheckboxGroup:fK,ColorPicker:pxt,Row:c3,Tree:P7e},props:{treeData:{type:Array,default:function(){return[]}},active:{type:String,default:""},hover:{type:String,default:""}},data:function(){return{defaultExpandedKeys:["All"]}},unmounted:function(){this.sortedPrimitiveGroups=void 0},methods:{nodeIsActive:function(e){return this.active===e.models},nodeIsHover:function(e){return this.hover===e.models},changeActiveByNode:function(e){e.models&&this.$emit("change-active",e.models)},changeHoverByNode:function(){},checkChanged:function(e,t){const r=t.checkedKeys.includes(e.key);e.key==="All"?this.$emit("checkAll",r):this.$emit("changed",{key:e.key,value:r})},getBackgroundStyles:function(e){return"colour"in e?{background:e.colour}:{}}}},Jwt=e=>(a.pushScopeId("data-v-df242013"),e=e(),a.popScopeId(),e),$wt={class:"container"},eLt=Jwt(()=>a.createElementVNode("div",{class:"title-text"},"Systems",-1)),tLt={class:"tree-container"},rLt=["onClick","onMouseover"];function nLt(e,t,r,n,i,o){const s=Rh,l=c3,c=P7e;return a.openBlock(),a.createElementBlock("div",$wt,[a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(s,{span:12},{default:a.withCtx(()=>[eLt]),_:1})]),_:1}),a.createElementVNode("div",tLt,[a.createVNode(c,{ref:"tree","node-key":"key","show-checkbox":"","check-strictly":!1,data:r.treeData,"render-after-expand":!1,"default-expanded-keys":e.defaultExpandedKeys,onCheck:o.checkChanged},{default:a.withCtx(({node:u,data:d})=>[a.createElementVNode("span",{class:a.normalizeClass(["region-tree-node",{activeItem:o.nodeIsActive(d),hoverItem:o.nodeIsHover(d)}]),onClick:h=>o.changeActiveByNode(d),onMouseover:h=>o.changeHoverByNode(d)},[a.createElementVNode("div",{style:a.normalizeStyle(o.getBackgroundStyles(d))},a.toDisplayString(u.label),5)],42,rLt)]),_:1},8,["data","default-expanded-keys","onCheck"])])])}const F7e=Nh(Ywt,[["render",nLt],["__scopeId","data-v-df242013"]]),iLt={name:"SvgLegends"},oLt=e=>(a.pushScopeId("data-v-88079d87"),e=e(),a.popScopeId(),e),aLt={class:"legends-container"},sLt={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"},lLt=a.createStaticVNode('<defs data-v-88079d87><bx:grid height="30.447" width="32.516" x="0" y="0" data-v-88079d87></bx:grid></defs><path class="st0 st0-translate" d="M61.3,103.8c-15.9,0-28.8-12.3-28.8-27.3c0-15,13-27.3,28.8-27.3s28.8,12.3,28.8,27.3 C90.1,91.5,77.2,103.8,61.3,103.8z" data-v-88079d87></path><path class="st1" d="M40.3,356.1C29.5,345,29.8,328,41.5,317.5c11.7-10.5,29.6-9.9,40.7,1.1c11.1,11,10.5,28.1-1.2,38.5 C69.3,367.4,51.1,366.9,40.3,356.1z" data-v-88079d87></path><path class="st2" d="M61.2,396.9c-5.3,9.3-15.3,15.1-26.1,15.1l-0.4,0.6c5.1,9,5.1,20,0,29l0.4,0.6c10.7,0,20.8,5.8,26.1,15.1 c5.3-9.3,15.3-15.1,26.1-15.1c-5.3-9.3-5.3-20.9,0-30.4C76.6,412.1,66.7,406.3,61.2,396.9z" data-v-88079d87></path><text transform="matrix(0.9908 0 0 1 118.0161 171.7975)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Tissue region </text><path class="st6" d="M40.9,231.1c11.3-10.6,29.5-10.6,40.8,0c11.3,10.6,11.3,27.9,0,38.5c-11.3,10.6-29.5,10.6-40.8,0 C29.7,259,29.7,241.7,40.9,231.1z" data-v-88079d87></path><text transform="matrix(0.9908 0 0 1 118.0161 257.675)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Brain nuclei </text><text transform="matrix(0.9908 0 0 1 118.0903 345.5266)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Ganglia </text><text transform="matrix(0.9908 0 0 1 118.0903 433.1613)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Ganglionated nerve plexus </text>',9),cLt=[lLt],uLt=oLt(()=>a.createElementVNode("svg",{width:"72px",height:"72px",viewBox:"0 0 24 24",fill:"yellow"},null,-1));function dLt(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",aLt,[(a.openBlock(),a.createElementBlock("svg",sLt,cLt)),uLt])}const D7e=Nh(iLt,[["render",dLt],["__scopeId","data-v-88079d87"]]),hLt='<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>',CI=function(e){return e?[...new Set(e.map(t=>JSON.stringify(t)))].map(t=>JSON.parse(t)):[]},yL={},z7e=async function(e,t){return yL&&yL.hasOwnProperty(t)?yL[t]:new Promise(r=>{fetch(`${e}knowledge/label/${t}`,{method:"GET"}).then(n=>n.json()).then(n=>{let i=n.label;i==="Mammalia"&&(i="Mammalia not otherwise specified"),yL[t]=i,r(i)}).catch(n=>{console.error("Error:",n),yL[t]=t,r(t)})})},EI=function(e,t){if(!e||!t)return!1;let r=JSON.stringify(e),n=JSON.stringify(t);return r.indexOf(n)!==-1};let pLt=function(){this.initialise=function(e){this.flatmapApi=e,this.destinations=[],this.origins=[],this.components=[],this.urls=[],this.controller=void 0,this.uberons=[],this.lookUp=[]},this.createTooltipData=async function(e){let t=[];e.feature.hyperlinks&&e.feature.hyperlinks.length>0?t=e.feature.hyperlinks:t=this.urls.map(n=>({url:n,id:"pubmed"}));let r;if(e.provenanceTaxonomy){r=[];for(let n=0;e.provenanceTaxonomy.length>n;n++)r.push(await z7e(this.flatmapAPI,e.provenanceTaxonomy[n]))}return{destinations:this.destinations,origins:this.origins,components:this.components,destinationsWithDatasets:this.destinationsWithDatasets,originsWithDatasets:this.originsWithDatasets,componentsWithDatasets:this.componentsWithDatasets,title:e.label,featureId:e.resource,hyperlinks:t,provenanceTaxonomy:e.provenanceTaxonomy,provenanceTaxonomyLabel:r}},this.createComponentsLabelList=function(e,t){let r=[];return e.forEach(n=>{r.push(this.createLabelFromNeuralNode(n[0]),t),n.length===2&&r.push(this.createLabelFromNeuralNode(n[1]),t)}),r},this.createLabelLookup=function(e){return new Promise(t=>{let r={};this.uberons=[];const n={sql:this.buildLabelSqlStatement(e)};fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then(i=>i.json()).then(i=>{const o=i.keys.indexOf("entity"),s=i.keys.indexOf("label");o>-1&&s>-1&&i.values.forEach(l=>{r[l[o]]=l[s],this.uberons.push({id:l[o],name:l[s]})}),t(r)})})},this.buildConnectivitySqlStatement=function(e){let t="select knowledge from knowledge where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.buildLabelSqlStatement=function(e){let t="select entity, label from labels where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.findAllIdsFromConnectivity=function(e){let t=e.connectivity.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),[...new Set(n.flat())]},this.flattenConntectivity=function(e){let t=e.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),n.flat()},this.findComponents=function(e){let t=e.connectivity.flat(),r=CI(t),n=[],i=!1;return r.forEach(o=>{i=!1,EI(e.axons,o)&&(i=!0),EI(e.dendrites,o)&&(i=!0),i||n.push(o)}),n},this.retrieveFlatmapKnowledgeForEvent=async function(e){this.controller&&this.controller.abort(),this.controller=new AbortController;const t=this.controller.signal,r=e.resource;if(this.destinations=[],this.origins=[],this.components=[],!r||r.length==0)return;const n={sql:this.buildConnectivitySqlStatement(r)};let i=new Promise(s=>{fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),signal:t}).then(l=>l.json()).then(l=>{if(this.connectivityExists(l)){let c=JSON.parse(l.values[0][0]);this.processConnectivity(c).then(()=>{s(!0)})}else s(!1)}).catch(l=>{console.error("Error:",l),s(!1)})}),o=await this.pubmedQueryOnIds(e);return await Promise.all([i,o])},this.connectivityExists=function(e){return!!(e.values&&e.values.length>0&&JSON.parse(e.values[0][0]).connectivity&&JSON.parse(e.values[0][0]).connectivity.length>0)},this.createLabelFromNeuralNode=function(e,t){let r=t[e[0]];return e.length===2&&e[1].length>0&&e[1].forEach(n=>{t[n]==null?r+=`, ${n}`:r+=`, ${t[n]}`}),r},this.flattenAndFindDatasets=function(e,t,r){let n=this.flattenConntectivity(e),i=this.flattenConntectivity(t),o=this.flattenConntectivity(r);this.destinationsWithDatasets=this.uberons.filter(s=>i.indexOf(s.id)!==-1),this.originsWithDatasets=this.uberons.filter(s=>o.indexOf(s.id)!==-1),this.componentsWithDatasets=this.uberons.filter(s=>n.indexOf(s.id)!==-1)},this.processConnectivity=function(e){return new Promise(t=>{let r=this.findComponents(e),n=CI(e.axons),i=CI(e.dendrites),o=this.findAllIdsFromConnectivity(e);this.createLabelLookup(o).then(s=>{this.destinations=n.map(l=>this.createLabelFromNeuralNode(l,s)),this.origins=i.map(l=>this.createLabelFromNeuralNode(l,s)),this.components=r.map(l=>this.createLabelFromNeuralNode(l,s)),this.flattenAndFindDatasets(r,n,i),t(!0)})})},this.flattenConntectivity=function(e){let t=e.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),n.flat()},this.findComponents=function(e){let t=e.connectivity.flat(),r=CI(t),n=[],i=!1;return r.forEach(o=>{i=!1,EI(e.axons,o)&&(i=!0),EI(e.dendrites,o)&&(i=!0),i||n.push(o)}),n},this.stripPMIDPrefix=function(e){return e.split(":")[1]},this.buildPubmedSqlStatement=function(e){let t="select distinct publication from publications where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.buildPubmedSqlStatementForModels=function(e){return`select distinct publication from publications where entity = '${e}'`},this.flatmapQuery=function(e){const t={sql:e};return fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(r=>r.json()).catch(r=>{console.error("Error:",r)})},this.pubmedQueryOnIds=function(e){return new Promise(t=>{const r=e.resource,n=e.feature.source;if(!r||r.length===0)return;const i=this.buildPubmedSqlStatement(r);this.flatmapQuery(i).then(o=>{o.values.length>0?(this.urls=[this.pubmedSearchUrl(o.values.map(s=>this.stripPMIDPrefix(s[0])))],t(!0)):this.pubmedQueryOnModels(n).then(s=>{t(s)})})})},this.pubmedQueryOnModels=function(e){return this.flatmapQuery(this.buildPubmedSqlStatementForModels(e)).then(t=>Array.isArray(t.values)&&t.values.length>0?(this.urls=[this.pubmedSearchUrl(t.values.map(r=>this.stripPMIDPrefix(r[0])))],!0):(this.urls=[],!1))},this.pubmedSearchUrl=function(e){let t="https://pubmed.ncbi.nlm.nih.gov/?",r=new URLSearchParams;return r.append("term",e),t+r.toString()}};const fLt='<svg width="195px" height="24px" viewBox="0 0 200 24" fill="yellow"><path d="M22.0748 3.25583C22.4141 2.42845 23.5859 2.42845 23.9252 3.25583L25.6493 7.45955C25.793 7.80979 26.1221 8.04889 26.4995 8.07727L31.0303 8.41798C31.922 8.48504 32.2841 9.59942 31.6021 10.1778L28.1369 13.1166C27.8482 13.3614 27.7225 13.7483 27.8122 14.1161L28.8882 18.5304C29.1 19.3992 28.152 20.0879 27.3912 19.618L23.5255 17.2305C23.2034 17.0316 22.7966 17.0316 22.4745 17.2305L18.60881 19.618C17.84796 20.0879 16.9 19.3992 17.1118 18.5304L18.18785 14.1161C18.2775 13.7483 18.1518 13.3614 17.86309 13.1166L14.3979 10.1778C13.71588 9.59942 14.07796 8.48504 14.96971 8.41798L19.50046 8.07727C19.87794 8.04889 20.20704 7.80979 20.35068 7.45955L22.0748 3.25583Z" stroke="#000000" stroke-width="2"/><text x="42" y="50%" dominant-baseline="middle" text-anchor="start" font-family="Asap, sans-serif" font-size="12" fill="#000000">Featured dataset marker</text></svg>';var j7e={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(typeof window<"u"?window:ce,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(d){return r.setTimeout(d,20)},i=r.cancelAnimationFrame||r.mozCancelAnimationFrame||r.webkitCancelAnimationFrame||function(d){r.clearTimeout(d)};function o(d,h){var p=Object.prototype.toString.call(d),f=p==="[object Array]"||p==="[object NodeList]"||p==="[object HTMLCollection]"||p==="[object Object]"||typeof jQuery<"u"&&d instanceof jQuery||typeof Elements<"u"&&d instanceof Elements,m=0,g=d.length;if(f)for(;m<g;m++)h(d[m]);else h(d)}function s(d){if(!d.getBoundingClientRect)return{width:d.offsetWidth,height:d.offsetHeight};var h=d.getBoundingClientRect();return{width:Math.round(h.width),height:Math.round(h.height)}}function l(d,h){Object.keys(h).forEach(function(p){d.style[p]=h[p]})}var c=function(d,h){var p=0;function f(){var g=[];this.add=function(v){g.push(v)};var T,y;this.call=function(v){for(T=0,y=g.length;T<y;T++)g[T].call(this,v)},this.remove=function(v){var _=[];for(T=0,y=g.length;T<y;T++)g[T]!==v&&_.push(g[T]);g=_},this.length=function(){return g.length}}function m(g,T){if(g){if(g.resizedAttached){g.resizedAttached.add(T);return}g.resizedAttached=new f,g.resizedAttached.add(T),g.resizeSensor=document.createElement("div"),g.resizeSensor.dir="ltr",g.resizeSensor.className="resize-sensor";var y={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"};l(g.resizeSensor,y);var _=document.createElement("div");_.className="resize-sensor-expand",l(_,y);var b=document.createElement("div");l(b,v),_.appendChild(b);var L=document.createElement("div");L.className="resize-sensor-shrink",l(L,y);var w=document.createElement("div");l(w,v),l(w,{width:"200%",height:"200%"}),L.appendChild(w),g.resizeSensor.appendChild(_),g.resizeSensor.appendChild(L),g.appendChild(g.resizeSensor);var M=window.getComputedStyle(g),C=M?M.getPropertyValue("position"):null;C!=="absolute"&&C!=="relative"&&C!=="fixed"&&C!=="sticky"&&(g.style.position="relative");var A=!1,O=0,V=s(g),H=0,N=0,D=!0;p=0;var j=function(){var U=g.offsetWidth,K=g.offsetHeight;b.style.width=U+10+"px",b.style.height=K+10+"px",_.scrollLeft=U+10,_.scrollTop=K+10,L.scrollLeft=U+10,L.scrollTop=K+10},G=function(){if(D){var U=g.offsetWidth===0&&g.offsetHeight===0;if(U){p||(p=n(function(){p=0,G()}));return}else D=!1}j()};g.resizeSensor.resetSensor=G;var R=function(){O=0,A&&(H=V.width,N=V.height,g.resizedAttached&&g.resizedAttached.call(V))},Z=function(){V=s(g),A=V.width!==H||V.height!==N,A&&!O&&(O=n(R)),G()},X=function(U,K,$){U.attachEvent?U.attachEvent("on"+K,$):U.addEventListener(K,$)};X(_,"scroll",Z),X(L,"scroll",Z),p=n(function(){p=0,G()})}}o(d,function(g){m(g,h)}),this.detach=function(g){p||(i(p),p=0),c.detach(d,g)},this.reset=function(){d.resizeSensor.resetSensor()}};if(c.reset=function(d){o(d,function(h){h.resizeSensor.resetSensor()})},c.detach=function(d,h){o(d,function(p){p&&(p.resizedAttached&&typeof h=="function"&&(p.resizedAttached.remove(h),p.resizedAttached.length())||p.resizeSensor&&(p.contains(p.resizeSensor)&&p.removeChild(p.resizeSensor),delete p.resizeSensor,delete p.resizedAttached))})},typeof MutationObserver<"u"){var u=new MutationObserver(function(d){for(var h in d)if(d.hasOwnProperty(h))for(var p=d[h].addedNodes,f=0;f<p.length;f++)p[f].resizeSensor&&c.reset(p[f])});document.addEventListener("DOMContentLoaded",function(d){u.observe(document.body,{childList:!0,subtree:!0})})}return c})})(j7e);var mLt=j7e.exports;const gLt=KT(mLt);var U7e={exports:{}};/**
|
500
|
+
`,GTt=["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 WTt(e){const t=window.getComputedStyle(e),r=t.getPropertyValue("box-sizing"),n=Number.parseFloat(t.getPropertyValue("padding-bottom"))+Number.parseFloat(t.getPropertyValue("padding-top")),i=Number.parseFloat(t.getPropertyValue("border-bottom-width"))+Number.parseFloat(t.getPropertyValue("border-top-width"));return{contextStyle:GTt.map(o=>`${o}:${t.getPropertyValue(o)}`).join(";"),paddingSize:n,borderSize:i,boxSizing:r}}function Q8e(e,t=1,r){var n;a3||(a3=document.createElement("textarea"),document.body.appendChild(a3));const{paddingSize:i,borderSize:o,boxSizing:s,contextStyle:l}=WTt(e);a3.setAttribute("style",`${l};${UTt}`),a3.value=e.value||e.placeholder||"";let c=a3.scrollHeight;const u={};s==="border-box"?c=c+o:s==="content-box"&&(c=c-i),a3.value="";const d=a3.scrollHeight-i;if(Nl(t)){let h=d*t;s==="border-box"&&(h=h+i+o),c=Math.max(h,c),u.minHeight=`${h}px`}if(Nl(r)){let h=d*r;s==="border-box"&&(h=h+i+o),c=Math.min(h,c)}return u.height=`${c}px`,(n=a3.parentNode)==null||n.removeChild(a3),a3=void 0,u}const qTt=Lo({id:{type:String,default:void 0},size:z5,disabled:Boolean,modelValue:{type:di([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:di([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:sf},prefixIcon:{type:sf},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:di([Object,Array,String]),default:()=>BT({})},autofocus:{type:Boolean,default:!1}}),ZTt={[vs]:e=>Rl(e),input:e=>Rl(e),change:e=>Rl(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent,clear:()=>!0,mouseleave:e=>e instanceof MouseEvent,mouseenter:e=>e instanceof MouseEvent,keydown:e=>e instanceof Event,compositionstart:e=>e instanceof CompositionEvent,compositionupdate:e=>e instanceof CompositionEvent,compositionend:e=>e instanceof CompositionEvent},XTt=["role"],KTt=["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus"],YTt=["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus"],JTt=a.defineComponent({name:"ElInput",inheritAttrs:!1}),$Tt=a.defineComponent({...JTt,props:qTt,emits:ZTt,setup(e,{expose:t,emit:r}){const n=e,i=a.useAttrs(),o=a.useSlots(),s=a.computed(()=>{const _e={};return n.containerRole==="combobox"&&(_e["aria-haspopup"]=i["aria-haspopup"],_e["aria-owns"]=i["aria-owns"],_e["aria-expanded"]=i["aria-expanded"]),_e}),l=a.computed(()=>[n.type==="textarea"?T.b():g.b(),g.m(f.value),g.is("disabled",m.value),g.is("exceed",me.value),{[g.b("group")]:o.prepend||o.append,[g.bm("group","append")]:o.append,[g.bm("group","prepend")]:o.prepend,[g.m("prefix")]:o.prefix||n.prefixIcon,[g.m("suffix")]:o.suffix||n.suffixIcon||n.clearable||n.showPassword,[g.bm("suffix","password-clear")]:U.value&&K.value},i.class]),c=a.computed(()=>[g.e("wrapper"),g.is("focus",O.value)]),u=J9t({excludeKeys:a.computed(()=>Object.keys(s.value))}),{form:d,formItem:h}=U5(),{inputId:p}=qT(n,{formItemContext:h}),f=j5(),m=WT(),g=xi("input"),T=xi("textarea"),y=a.shallowRef(),v=a.shallowRef(),_=a.ref(!1),b=a.ref(!1),L=a.ref(!1),w=a.ref(),M=a.shallowRef(n.inputStyle),C=a.computed(()=>y.value||v.value),{wrapperRef:A,isFocused:O,handleFocus:V,handleBlur:H}=JX(C,{afterBlur(){var _e;n.validateEvent&&((_e=h==null?void 0:h.validate)==null||_e.call(h,"blur").catch(qe=>Bl(qe)))}}),N=a.computed(()=>{var _e;return(_e=d==null?void 0:d.statusIcon)!=null?_e:!1}),D=a.computed(()=>(h==null?void 0:h.validateState)||""),j=a.computed(()=>D.value&&Ame[D.value]),G=a.computed(()=>L.value?j9t:N9t),R=a.computed(()=>[i.style]),Z=a.computed(()=>[n.inputStyle,M.value,{resize:n.resize}]),X=a.computed(()=>N5(n.modelValue)?"":String(n.modelValue)),U=a.computed(()=>n.clearable&&!m.value&&!n.readonly&&!!X.value&&(O.value||_.value)),K=a.computed(()=>n.showPassword&&!m.value&&!n.readonly&&!!X.value&&(!!X.value||O.value)),$=a.computed(()=>n.showWordLimit&&!!n.maxlength&&(n.type==="text"||n.type==="textarea")&&!m.value&&!n.readonly&&!n.showPassword),le=a.computed(()=>X.value.length),me=a.computed(()=>!!$.value&&le.value>Number(n.maxlength)),ge=a.computed(()=>!!o.suffix||!!n.suffixIcon||U.value||n.showPassword||$.value||!!D.value&&N.value),[ae,Qe]=HTt(y);J4(v,_e=>{if(de(),!$.value||n.resize!=="both")return;const qe=_e[0],{width:at}=qe.contentRect;w.value={right:`calc(100% - ${at+15+6}px)`}});const ne=()=>{const{type:_e,autosize:qe}=n;if(!(!Ts||_e!=="textarea"||!v.value))if(qe){const at=B1(qe)?qe.minRows:void 0,ht=B1(qe)?qe.maxRows:void 0,zt=Q8e(v.value,at,ht);M.value={overflowY:"hidden",...zt},a.nextTick(()=>{v.value.offsetHeight,M.value=zt})}else M.value={minHeight:Q8e(v.value).minHeight}},de=(_e=>{let qe=!1;return()=>{var at;qe||!n.autosize||((at=v.value)==null?void 0:at.offsetParent)===null||(_e(),qe=!0)}})(ne),ie=()=>{const _e=C.value,qe=n.formatter?n.formatter(X.value):X.value;!_e||_e.value===qe||(_e.value=qe)},Te=async _e=>{ae();let{value:qe}=_e.target;if(n.formatter&&(qe=n.parser?n.parser(qe):qe),!b.value){if(qe===X.value){ie();return}r(vs,qe),r("input",qe),await a.nextTick(),ie(),Qe()}},Se=_e=>{r("change",_e.target.value)},Ie=_e=>{r("compositionstart",_e),b.value=!0},Ge=_e=>{var qe;r("compositionupdate",_e);const at=(qe=_e.target)==null?void 0:qe.value,ht=at[at.length-1]||"";b.value=!Pme(ht)},je=_e=>{r("compositionend",_e),b.value&&(b.value=!1,Te(_e))},rt=()=>{L.value=!L.value,Me()},Me=async()=>{var _e;await a.nextTick(),(_e=C.value)==null||_e.focus()},Be=()=>{var _e;return(_e=C.value)==null?void 0:_e.blur()},ut=_e=>{_.value=!1,r("mouseleave",_e)},et=_e=>{_.value=!0,r("mouseenter",_e)},yt=_e=>{r("keydown",_e)},At=()=>{var _e;(_e=C.value)==null||_e.select()},vt=()=>{r(vs,""),r("change",""),r("clear"),r("input","")};return a.watch(()=>n.modelValue,()=>{var _e;a.nextTick(()=>ne()),n.validateEvent&&((_e=h==null?void 0:h.validate)==null||_e.call(h,"change").catch(qe=>Bl(qe)))}),a.watch(X,()=>ie()),a.watch(()=>n.type,async()=>{await a.nextTick(),ie(),ne()}),a.onMounted(()=>{!n.formatter&&n.parser&&Bl("ElInput","If you set the parser, you also need to set the formatter."),ie(),a.nextTick(ne)}),t({input:y,textarea:v,ref:C,textareaStyle:Z,autosize:a.toRef(n,"autosize"),focus:Me,blur:Be,select:At,clear:vt,resizeTextarea:ne}),(_e,qe)=>a.withDirectives((a.openBlock(),a.createElementBlock("div",a.mergeProps(a.unref(s),{class:a.unref(l),style:a.unref(R),role:_e.containerRole,onMouseenter:et,onMouseleave:ut}),[a.createCommentVNode(" input "),_e.type!=="textarea"?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createCommentVNode(" prepend slot "),_e.$slots.prepend?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(a.unref(g).be("group","prepend"))},[a.renderSlot(_e.$slots,"prepend")],2)):a.createCommentVNode("v-if",!0),a.createElementVNode("div",{ref_key:"wrapperRef",ref:A,class:a.normalizeClass(a.unref(c))},[a.createCommentVNode(" prefix slot "),_e.$slots.prefix||_e.prefixIcon?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(a.unref(g).e("prefix"))},[a.createElementVNode("span",{class:a.normalizeClass(a.unref(g).e("prefix-inner"))},[a.renderSlot(_e.$slots,"prefix"),_e.prefixIcon?(a.openBlock(),a.createBlock(a.unref(Fl),{key:0,class:a.normalizeClass(a.unref(g).e("icon"))},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(_e.prefixIcon)))]),_:1},8,["class"])):a.createCommentVNode("v-if",!0)],2)],2)):a.createCommentVNode("v-if",!0),a.createElementVNode("input",a.mergeProps({id:a.unref(p),ref_key:"input",ref:y,class:a.unref(g).e("inner")},a.unref(u),{minlength:_e.minlength,maxlength:_e.maxlength,type:_e.showPassword?L.value?"text":"password":_e.type,disabled:a.unref(m),readonly:_e.readonly,autocomplete:_e.autocomplete,tabindex:_e.tabindex,"aria-label":_e.label,placeholder:_e.placeholder,style:_e.inputStyle,form:_e.form,autofocus:_e.autofocus,onCompositionstart:Ie,onCompositionupdate:Ge,onCompositionend:je,onInput:Te,onFocus:qe[0]||(qe[0]=(...at)=>a.unref(V)&&a.unref(V)(...at)),onBlur:qe[1]||(qe[1]=(...at)=>a.unref(H)&&a.unref(H)(...at)),onChange:Se,onKeydown:yt}),null,16,KTt),a.createCommentVNode(" suffix slot "),a.unref(ge)?(a.openBlock(),a.createElementBlock("span",{key:1,class:a.normalizeClass(a.unref(g).e("suffix"))},[a.createElementVNode("span",{class:a.normalizeClass(a.unref(g).e("suffix-inner"))},[!a.unref(U)||!a.unref(K)||!a.unref($)?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.renderSlot(_e.$slots,"suffix"),_e.suffixIcon?(a.openBlock(),a.createBlock(a.unref(Fl),{key:0,class:a.normalizeClass(a.unref(g).e("icon"))},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(_e.suffixIcon)))]),_:1},8,["class"])):a.createCommentVNode("v-if",!0)],64)):a.createCommentVNode("v-if",!0),a.unref(U)?(a.openBlock(),a.createBlock(a.unref(Fl),{key:1,class:a.normalizeClass([a.unref(g).e("icon"),a.unref(g).e("clear")]),onMousedown:a.withModifiers(a.unref($4),["prevent"]),onClick:vt},{default:a.withCtx(()=>[a.createVNode(a.unref(YP))]),_:1},8,["class","onMousedown"])):a.createCommentVNode("v-if",!0),a.unref(K)?(a.openBlock(),a.createBlock(a.unref(Fl),{key:2,class:a.normalizeClass([a.unref(g).e("icon"),a.unref(g).e("password")]),onClick:rt},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(G))))]),_:1},8,["class"])):a.createCommentVNode("v-if",!0),a.unref($)?(a.openBlock(),a.createElementBlock("span",{key:3,class:a.normalizeClass(a.unref(g).e("count"))},[a.createElementVNode("span",{class:a.normalizeClass(a.unref(g).e("count-inner"))},a.toDisplayString(a.unref(le))+" / "+a.toDisplayString(_e.maxlength),3)],2)):a.createCommentVNode("v-if",!0),a.unref(D)&&a.unref(j)&&a.unref(N)?(a.openBlock(),a.createBlock(a.unref(Fl),{key:4,class:a.normalizeClass([a.unref(g).e("icon"),a.unref(g).e("validateIcon"),a.unref(g).is("loading",a.unref(D)==="validating")])},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(j))))]),_:1},8,["class"])):a.createCommentVNode("v-if",!0)],2)],2)):a.createCommentVNode("v-if",!0)],2),a.createCommentVNode(" append slot "),_e.$slots.append?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(a.unref(g).be("group","append"))},[a.renderSlot(_e.$slots,"append")],2)):a.createCommentVNode("v-if",!0)],64)):(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createCommentVNode(" textarea "),a.createElementVNode("textarea",a.mergeProps({id:a.unref(p),ref_key:"textarea",ref:v,class:a.unref(T).e("inner")},a.unref(u),{minlength:_e.minlength,maxlength:_e.maxlength,tabindex:_e.tabindex,disabled:a.unref(m),readonly:_e.readonly,autocomplete:_e.autocomplete,style:a.unref(Z),"aria-label":_e.label,placeholder:_e.placeholder,form:_e.form,autofocus:_e.autofocus,onCompositionstart:Ie,onCompositionupdate:Ge,onCompositionend:je,onInput:Te,onFocus:qe[2]||(qe[2]=(...at)=>a.unref(V)&&a.unref(V)(...at)),onBlur:qe[3]||(qe[3]=(...at)=>a.unref(H)&&a.unref(H)(...at)),onChange:Se,onKeydown:yt}),null,16,YTt),a.unref($)?(a.openBlock(),a.createElementBlock("span",{key:0,style:a.normalizeStyle(w.value),class:a.normalizeClass(a.unref(g).e("count"))},a.toDisplayString(a.unref(le))+" / "+a.toDisplayString(_e.maxlength),7)):a.createCommentVNode("v-if",!0)],64))],16,XTt)),[[a.vShow,_e.type!=="hidden"]])}});var evt=wi($Tt,[["__file","input.vue"]]);const cI=F1(evt),ZT=4,tvt={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"}},rvt=({move:e,size:t,bar:r})=>({[r.size]:t,transform:`translate${r.axis}(${e}%)`}),x8e=Symbol("scrollbarContextKey"),nvt=Lo({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),ivt="Thumb";var _8e=wi(a.defineComponent({__name:"thumb",props:nvt,setup(e){const t=e,r=a.inject(x8e),n=xi("scrollbar");r||_me(ivt,"can not inject scrollbar context");const i=a.ref(),o=a.ref(),s=a.ref({}),l=a.ref(!1);let c=!1,u=!1,d=Ts?document.onselectstart:null;const h=a.computed(()=>tvt[t.vertical?"vertical":"horizontal"]),p=a.computed(()=>rvt({size:t.size,move:t.move,bar:h.value})),f=a.computed(()=>i.value[h.value.offset]**2/r.wrapElement[h.value.scrollSize]/t.ratio/o.value[h.value.offset]),m=w=>{var M;if(w.stopPropagation(),w.ctrlKey||[1,2].includes(w.button))return;(M=window.getSelection())==null||M.removeAllRanges(),T(w);const C=w.currentTarget;C&&(s.value[h.value.axis]=C[h.value.offset]-(w[h.value.client]-C.getBoundingClientRect()[h.value.direction]))},g=w=>{if(!o.value||!i.value||!r.wrapElement)return;const M=Math.abs(w.target.getBoundingClientRect()[h.value.direction]-w[h.value.client]),C=o.value[h.value.offset]/2,A=(M-C)*100*f.value/i.value[h.value.offset];r.wrapElement[h.value.scroll]=A*r.wrapElement[h.value.scrollSize]/100},T=w=>{w.stopImmediatePropagation(),c=!0,document.addEventListener("mousemove",y),document.addEventListener("mouseup",v),d=document.onselectstart,document.onselectstart=()=>!1},y=w=>{if(!i.value||!o.value||c===!1)return;const M=s.value[h.value.axis];if(!M)return;const C=(i.value.getBoundingClientRect()[h.value.direction]-w[h.value.client])*-1,A=o.value[h.value.offset]-M,O=(C-A)*100*f.value/i.value[h.value.offset];r.wrapElement[h.value.scroll]=O*r.wrapElement[h.value.scrollSize]/100},v=()=>{c=!1,s.value[h.value.axis]=0,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",v),L(),u&&(l.value=!1)},_=()=>{u=!1,l.value=!!t.size},b=()=>{u=!0,l.value=c};a.onBeforeUnmount(()=>{L(),document.removeEventListener("mouseup",v)});const L=()=>{document.onselectstart!==d&&(document.onselectstart=d)};return V5(a.toRef(r,"scrollbarElement"),"mousemove",_),V5(a.toRef(r,"scrollbarElement"),"mouseleave",b),(w,M)=>(a.openBlock(),a.createBlock(a.Transition,{name:a.unref(n).b("fade"),persisted:""},{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{ref_key:"instance",ref:i,class:a.normalizeClass([a.unref(n).e("bar"),a.unref(n).is(a.unref(h).key)]),onMousedown:g},[a.createElementVNode("div",{ref_key:"thumb",ref:o,class:a.normalizeClass(a.unref(n).e("thumb")),style:a.normalizeStyle(a.unref(p)),onMousedown:m},null,38)],34),[[a.vShow,w.always||l.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const ovt=Lo({always:{type:Boolean,default:!0},width:String,height:String,ratioX:{type:Number,default:1},ratioY:{type:Number,default:1}});var avt=wi(a.defineComponent({__name:"bar",props:ovt,setup(e,{expose:t}){const r=e,n=a.ref(0),i=a.ref(0);return t({handleScroll:o=>{if(o){const s=o.offsetHeight-ZT,l=o.offsetWidth-ZT;i.value=o.scrollTop*100/s*r.ratioY,n.value=o.scrollLeft*100/l*r.ratioX}}}),(o,s)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createVNode(_8e,{move:n.value,ratio:o.ratioX,size:o.width,always:o.always},null,8,["move","ratio","size","always"]),a.createVNode(_8e,{move:i.value,ratio:o.ratioY,size:o.height,vertical:"",always:o.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const svt=Lo({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:di([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"]}}),lvt={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(Nl)},eK="ElScrollbar",cvt=a.defineComponent({name:eK}),uvt=a.defineComponent({...cvt,props:svt,emits:lvt,setup(e,{expose:t,emit:r}){const n=e,i=xi("scrollbar");let o,s;const l=a.ref(),c=a.ref(),u=a.ref(),d=a.ref("0"),h=a.ref("0"),p=a.ref(),f=a.ref(1),m=a.ref(1),g=a.computed(()=>{const M={};return n.height&&(M.height=af(n.height)),n.maxHeight&&(M.maxHeight=af(n.maxHeight)),[n.wrapStyle,M]}),T=a.computed(()=>[n.wrapClass,i.e("wrap"),{[i.em("wrap","hidden-default")]:!n.native}]),y=a.computed(()=>[i.e("view"),n.viewClass]),v=()=>{var M;c.value&&((M=p.value)==null||M.handleScroll(c.value),r("scroll",{scrollTop:c.value.scrollTop,scrollLeft:c.value.scrollLeft}))};function _(M,C){B1(M)?c.value.scrollTo(M):Nl(M)&&Nl(C)&&c.value.scrollTo(M,C)}const b=M=>{if(!Nl(M)){Bl(eK,"value must be a number");return}c.value.scrollTop=M},L=M=>{if(!Nl(M)){Bl(eK,"value must be a number");return}c.value.scrollLeft=M},w=()=>{if(!c.value)return;const M=c.value.offsetHeight-ZT,C=c.value.offsetWidth-ZT,A=M**2/c.value.scrollHeight,O=C**2/c.value.scrollWidth,V=Math.max(A,n.minSize),H=Math.max(O,n.minSize);f.value=A/(M-A)/(V/(M-V)),m.value=O/(C-O)/(H/(C-H)),h.value=V+ZT<M?`${V}px`:"",d.value=H+ZT<C?`${H}px`:""};return a.watch(()=>n.noresize,M=>{M?(o==null||o(),s==null||s()):({stop:o}=J4(u,w),s=V5("resize",w))},{immediate:!0}),a.watch(()=>[n.maxHeight,n.height],()=>{n.native||a.nextTick(()=>{var M;w(),c.value&&((M=p.value)==null||M.handleScroll(c.value))})}),a.provide(x8e,a.reactive({scrollbarElement:l,wrapElement:c})),a.onMounted(()=>{n.native||a.nextTick(()=>{w()})}),a.onUpdated(()=>w()),t({wrapRef:c,update:w,scrollTo:_,setScrollTop:b,setScrollLeft:L,handleScroll:v}),(M,C)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"scrollbarRef",ref:l,class:a.normalizeClass(a.unref(i).b())},[a.createElementVNode("div",{ref_key:"wrapRef",ref:c,class:a.normalizeClass(a.unref(T)),style:a.normalizeStyle(a.unref(g)),onScroll:v},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(M.tag),{id:M.id,ref_key:"resizeRef",ref:u,class:a.normalizeClass(a.unref(y)),style:a.normalizeStyle(M.viewStyle),role:M.role,"aria-label":M.ariaLabel,"aria-orientation":M.ariaOrientation},{default:a.withCtx(()=>[a.renderSlot(M.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],38),M.native?a.createCommentVNode("v-if",!0):(a.openBlock(),a.createBlock(avt,{key:0,ref_key:"barRef",ref:p,height:h.value,width:d.value,always:M.always,"ratio-x":m.value,"ratio-y":f.value},null,8,["height","width","always","ratio-x","ratio-y"]))],2))}});var dvt=wi(uvt,[["__file","scrollbar.vue"]]);const hvt=F1(dvt),tK=Symbol("popper"),w8e=Symbol("popperContent"),pvt=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],L8e=Lo({role:{type:String,values:pvt,default:"tooltip"}}),fvt=a.defineComponent({name:"ElPopper",inheritAttrs:!1}),mvt=a.defineComponent({...fvt,props:L8e,setup(e,{expose:t}){const r=e,n=a.ref(),i=a.ref(),o=a.ref(),s=a.ref(),l=a.computed(()=>r.role),c={triggerRef:n,popperInstanceRef:i,contentRef:o,referenceRef:s,role:l};return t(c),a.provide(tK,c),(u,d)=>a.renderSlot(u.$slots,"default")}});var gvt=wi(mvt,[["__file","popper.vue"]]);const S8e=Lo({arrowOffset:{type:Number,default:5}}),yvt=a.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),Tvt=a.defineComponent({...yvt,props:S8e,setup(e,{expose:t}){const r=e,n=xi("popper"),{arrowOffset:i,arrowRef:o,arrowStyle:s}=a.inject(w8e,void 0);return a.watch(()=>r.arrowOffset,l=>{i.value=l}),a.onBeforeUnmount(()=>{o.value=void 0}),t({arrowRef:o}),(l,c)=>(a.openBlock(),a.createElementBlock("span",{ref_key:"arrowRef",ref:o,class:a.normalizeClass(a.unref(n).e("arrow")),style:a.normalizeStyle(a.unref(s)),"data-popper-arrow":""},null,6))}});var vvt=wi(Tvt,[["__file","arrow.vue"]]);const rK="ElOnlyChild",bvt=a.defineComponent({name:rK,setup(e,{slots:t,attrs:r}){var n;const i=a.inject(m8e),o=ITt((n=i==null?void 0:i.setForwardRef)!=null?n:$4);return()=>{var s;const l=(s=t.default)==null?void 0:s.call(t,r);if(!l)return null;if(l.length>1)return Bl(rK,"requires exact only one valid child."),null;const c=M8e(l);return c?a.withDirectives(a.cloneVNode(c,r),[[o]]):(Bl(rK,"no valid child node found"),null)}}});function M8e(e){if(!e)return null;const t=e;for(const r of t){if(B1(r))switch(r.type){case a.Comment:continue;case a.Text:case"svg":return k8e(r);case a.Fragment:return M8e(r.children);default:return r}return k8e(r)}return null}function k8e(e){const t=xi("only-child");return a.createVNode("span",{class:t.e("content")},[e])}const C8e=Lo({virtualRef:{type:di(Object)},virtualTriggering:Boolean,onMouseenter:{type:di(Function)},onMouseleave:{type:di(Function)},onClick:{type:di(Function)},onKeydown:{type:di(Function)},onFocus:{type:di(Function)},onBlur:{type:di(Function)},onContextmenu:{type:di(Function)},id:String,open:Boolean}),Qvt=a.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),xvt=a.defineComponent({...Qvt,props:C8e,setup(e,{expose:t}){const r=e,{role:n,triggerRef:i}=a.inject(tK,void 0);PTt(i);const o=a.computed(()=>l.value?r.id:void 0),s=a.computed(()=>{if(n&&n.value==="tooltip")return r.open&&r.id?r.id:void 0}),l=a.computed(()=>{if(n&&n.value!=="tooltip")return n.value}),c=a.computed(()=>l.value?`${r.open}`:void 0);let u;return a.onMounted(()=>{a.watch(()=>r.virtualRef,d=>{d&&(i.value=Y4(d))},{immediate:!0}),a.watch(i,(d,h)=>{u==null||u(),u=void 0,eL(d)&&(["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"].forEach(p=>{var f;const m=r[p];m&&(d.addEventListener(p.slice(2).toLowerCase(),m),(f=h==null?void 0:h.removeEventListener)==null||f.call(h,p.slice(2).toLowerCase(),m))}),u=a.watch([o,s,l,c],p=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((f,m)=>{N5(p[m])?d.removeAttribute(f):d.setAttribute(f,p[m])})},{immediate:!0})),eL(h)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(p=>h.removeAttribute(p))},{immediate:!0})}),a.onBeforeUnmount(()=>{u==null||u(),u=void 0}),t({triggerRef:i}),(d,h)=>d.virtualTriggering?a.createCommentVNode("v-if",!0):(a.openBlock(),a.createBlock(a.unref(bvt),a.mergeProps({key:0},d.$attrs,{"aria-controls":a.unref(o),"aria-describedby":a.unref(s),"aria-expanded":a.unref(c),"aria-haspopup":a.unref(l)}),{default:a.withCtx(()=>[a.renderSlot(d.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var _vt=wi(xvt,[["__file","trigger.vue"]]);const nK="focus-trap.focus-after-trapped",iK="focus-trap.focus-after-released",wvt="focus-trap.focusout-prevented",E8e={cancelable:!0,bubbles:!1},Lvt={cancelable:!0,bubbles:!1},A8e="focusAfterTrapped",O8e="focusAfterReleased",P8e=Symbol("elFocusTrap"),oK=a.ref(),uI=a.ref(0),aK=a.ref(0);let dI=0;const I8e=e=>{const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0||n===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t},H8e=(e,t)=>{for(const r of e)if(!Svt(r,t))return r},Svt=(e,t)=>{if(process.env.NODE_ENV==="test")return!1;if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},Mvt=e=>{const t=I8e(e),r=H8e(t,e),n=H8e(t.reverse(),e);return[r,n]},kvt=e=>e instanceof HTMLInputElement&&"select"in e,G5=(e,t)=>{if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),aK.value=window.performance.now(),e!==r&&kvt(e)&&t&&e.select()}};function V8e(e,t){const r=[...e],n=e.indexOf(t);return n!==-1&&r.splice(n,1),r}const Cvt=()=>{let e=[];return{push:t=>{const r=e[0];r&&t!==r&&r.pause(),e=V8e(e,t),e.unshift(t)},remove:t=>{var r,n;e=V8e(e,t),(n=(r=e[0])==null?void 0:r.resume)==null||n.call(r)}}},Evt=(e,t=!1)=>{const r=document.activeElement;for(const n of e)if(G5(n,t),document.activeElement!==r)return},R8e=Cvt(),Avt=()=>uI.value>aK.value,hI=()=>{oK.value="pointer",uI.value=window.performance.now()},N8e=()=>{oK.value="keyboard",uI.value=window.performance.now()},Ovt=()=>(a.onMounted(()=>{dI===0&&(document.addEventListener("mousedown",hI),document.addEventListener("touchstart",hI),document.addEventListener("keydown",N8e)),dI++}),a.onBeforeUnmount(()=>{dI--,dI<=0&&(document.removeEventListener("mousedown",hI),document.removeEventListener("touchstart",hI),document.removeEventListener("keydown",N8e))}),{focusReason:oK,lastUserFocusTimestamp:uI,lastAutomatedFocusTimestamp:aK}),pI=e=>new CustomEvent(wvt,{...Lvt,detail:e}),Pvt=a.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[A8e,O8e,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const r=a.ref();let n,i;const{focusReason:o}=Ovt();kTt(m=>{e.trapped&&!s.paused&&t("release-requested",m)});const s={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},l=m=>{if(!e.loop&&!e.trapped||s.paused)return;const{key:g,altKey:T,ctrlKey:y,metaKey:v,currentTarget:_,shiftKey:b}=m,{loop:L}=e,w=g===iu.tab&&!T&&!y&&!v,M=document.activeElement;if(w&&M){const C=_,[A,O]=Mvt(C);if(A&&O){if(!b&&M===O){const V=pI({focusReason:o.value});t("focusout-prevented",V),V.defaultPrevented||(m.preventDefault(),L&&G5(A,!0))}else if(b&&[A,C].includes(M)){const V=pI({focusReason:o.value});t("focusout-prevented",V),V.defaultPrevented||(m.preventDefault(),L&&G5(O,!0))}}else if(M===C){const V=pI({focusReason:o.value});t("focusout-prevented",V),V.defaultPrevented||m.preventDefault()}}};a.provide(P8e,{focusTrapRef:r,onKeydown:l}),a.watch(()=>e.focusTrapEl,m=>{m&&(r.value=m)},{immediate:!0}),a.watch([r],([m],[g])=>{m&&(m.addEventListener("keydown",l),m.addEventListener("focusin",d),m.addEventListener("focusout",h)),g&&(g.removeEventListener("keydown",l),g.removeEventListener("focusin",d),g.removeEventListener("focusout",h))});const c=m=>{t(A8e,m)},u=m=>t(O8e,m),d=m=>{const g=a.unref(r);if(!g)return;const T=m.target,y=m.relatedTarget,v=T&&g.contains(T);e.trapped||y&&g.contains(y)||(n=y),v&&t("focusin",m),!s.paused&&e.trapped&&(v?i=T:G5(i,!0))},h=m=>{const g=a.unref(r);if(!(s.paused||!g))if(e.trapped){const T=m.relatedTarget;!N5(T)&&!g.contains(T)&&setTimeout(()=>{if(!s.paused&&e.trapped){const y=pI({focusReason:o.value});t("focusout-prevented",y),y.defaultPrevented||G5(i,!0)}},0)}else{const T=m.target;T&&g.contains(T)||t("focusout",m)}};async function p(){await a.nextTick();const m=a.unref(r);if(m){R8e.push(s);const g=m.contains(document.activeElement)?n:document.activeElement;if(n=g,!m.contains(g)){const T=new Event(nK,E8e);m.addEventListener(nK,c),m.dispatchEvent(T),T.defaultPrevented||a.nextTick(()=>{let y=e.focusStartEl;Rl(y)||(G5(y),document.activeElement!==y&&(y="first")),y==="first"&&Evt(I8e(m),!0),(document.activeElement===g||y==="container")&&G5(m)})}}}function f(){const m=a.unref(r);if(m){m.removeEventListener(nK,c);const g=new CustomEvent(iK,{...E8e,detail:{focusReason:o.value}});m.addEventListener(iK,u),m.dispatchEvent(g),!g.defaultPrevented&&(o.value=="keyboard"||!Avt()||m.contains(document.activeElement))&&G5(n??document.body),m.removeEventListener(iK,u),R8e.remove(s)}}return a.onMounted(()=>{e.trapped&&p(),a.watch(()=>e.trapped,m=>{m?p():f()})}),a.onBeforeUnmount(()=>{e.trapped&&f()}),{onKeydown:l}}});function Ivt(e,t,r,n,i,o){return a.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var B8e=wi(Pvt,[["render",Ivt],["__file","focus-trap.vue"]]);const Hvt=["fixed","absolute"],Vvt=Lo({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:di(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:rI,default:"bottom"},popperOptions:{type:di(Object),default:()=>({})},strategy:{type:String,values:Hvt,default:"absolute"}}),F8e=Lo({...Vvt,id:String,style:{type:di([String,Array,Object])},className:{type:di([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:di([String,Array,Object])},popperStyle:{type:di([String,Array,Object])},referenceEl:{type:di(Object)},triggerTargetEl:{type:di(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},ariaLabel:{type:String,default:void 0},virtualTriggering:Boolean,zIndex:Number}),Rvt={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},Nvt=(e,t=[])=>{const{placement:r,strategy:n,popperOptions:i}=e,o={placement:r,strategy:n,...i,modifiers:[...Fvt(e),...t]};return Dvt(o,i==null?void 0:i.modifiers),o},Bvt=e=>{if(Ts)return Y4(e)};function Fvt(e){const{offset:t,gpuAcceleration:r,fallbackPlacements:n}=e;return[{name:"offset",options:{offset:[0,t??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:n}},{name:"computeStyles",options:{gpuAcceleration:r}}]}function Dvt(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const zvt=0,jvt=e=>{const{popperInstanceRef:t,contentRef:r,triggerRef:n,role:i}=a.inject(tK,void 0),o=a.ref(),s=a.ref(),l=a.computed(()=>({name:"eventListeners",enabled:!!e.visible})),c=a.computed(()=>{var y;const v=a.unref(o),_=(y=a.unref(s))!=null?y:zvt;return{name:"arrow",enabled:!bme(v),options:{element:v,padding:_}}}),u=a.computed(()=>({onFirstUpdate:()=>{m()},...Nvt(e,[a.unref(c),a.unref(l)])})),d=a.computed(()=>Bvt(e.referenceEl)||a.unref(n)),{attributes:h,state:p,styles:f,update:m,forceUpdate:g,instanceRef:T}=LTt(d,r,u);return a.watch(T,y=>t.value=y),a.onMounted(()=>{a.watch(()=>{var y;return(y=a.unref(d))==null?void 0:y.getBoundingClientRect()},()=>{m()})}),{attributes:h,arrowRef:o,contentRef:r,instanceRef:T,state:p,styles:f,role:i,forceUpdate:g,update:m}},Uvt=(e,{attributes:t,styles:r,role:n})=>{const{nextZIndex:i}=YX(),o=xi("popper"),s=a.computed(()=>a.unref(t).popper),l=a.ref(Nl(e.zIndex)?e.zIndex:i()),c=a.computed(()=>[o.b(),o.is("pure",e.pure),o.is(e.effect),e.popperClass]),u=a.computed(()=>[{zIndex:a.unref(l)},a.unref(r).popper,e.popperStyle||{}]),d=a.computed(()=>n.value==="dialog"?"false":void 0),h=a.computed(()=>a.unref(r).arrow||{});return{ariaModal:d,arrowStyle:h,contentAttrs:s,contentClass:c,contentStyle:u,contentZIndex:l,updateZIndex:()=>{l.value=Nl(e.zIndex)?e.zIndex:i()}}},Gvt=(e,t)=>{const r=a.ref(!1),n=a.ref();return{focusStartRef:n,trapped:r,onFocusAfterReleased:i=>{var o;((o=i.detail)==null?void 0:o.focusReason)!=="pointer"&&(n.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:i=>{e.visible&&!r.value&&(i.target&&(n.value=i.target),r.value=!0)},onFocusoutPrevented:i=>{e.trapping||(i.detail.focusReason==="pointer"&&i.preventDefault(),r.value=!1)},onReleaseRequested:()=>{r.value=!1,t("close")}}},Wvt=a.defineComponent({name:"ElPopperContent"}),qvt=a.defineComponent({...Wvt,props:F8e,emits:Rvt,setup(e,{expose:t,emit:r}){const n=e,{focusStartRef:i,trapped:o,onFocusAfterReleased:s,onFocusAfterTrapped:l,onFocusInTrap:c,onFocusoutPrevented:u,onReleaseRequested:d}=Gvt(n,r),{attributes:h,arrowRef:p,contentRef:f,styles:m,instanceRef:g,role:T,update:y}=jvt(n),{ariaModal:v,arrowStyle:_,contentAttrs:b,contentClass:L,contentStyle:w,updateZIndex:M}=Uvt(n,{styles:m,attributes:h,role:T}),C=a.inject(dL,void 0),A=a.ref();a.provide(w8e,{arrowStyle:_,arrowRef:p,arrowOffset:A}),C&&(C.addInputId||C.removeInputId)&&a.provide(dL,{...C,addInputId:$4,removeInputId:$4});let O;const V=(N=!0)=>{y(),N&&M()},H=()=>{V(!1),n.visible&&n.focusOnShow?o.value=!0:n.visible===!1&&(o.value=!1)};return a.onMounted(()=>{a.watch(()=>n.triggerTargetEl,(N,D)=>{O==null||O(),O=void 0;const j=a.unref(N||f.value),G=a.unref(D||f.value);eL(j)&&(O=a.watch([T,()=>n.ariaLabel,v,()=>n.id],R=>{["role","aria-label","aria-modal","id"].forEach((Z,X)=>{N5(R[X])?j.removeAttribute(Z):j.setAttribute(Z,R[X])})},{immediate:!0})),G!==j&&eL(G)&&["role","aria-label","aria-modal","id"].forEach(R=>{G.removeAttribute(R)})},{immediate:!0}),a.watch(()=>n.visible,H,{immediate:!0})}),a.onBeforeUnmount(()=>{O==null||O(),O=void 0}),t({popperContentRef:f,popperInstanceRef:g,updatePopper:V,contentStyle:w}),(N,D)=>(a.openBlock(),a.createElementBlock("div",a.mergeProps({ref_key:"contentRef",ref:f},a.unref(b),{style:a.unref(w),class:a.unref(L),tabindex:"-1",onMouseenter:D[0]||(D[0]=j=>N.$emit("mouseenter",j)),onMouseleave:D[1]||(D[1]=j=>N.$emit("mouseleave",j))}),[a.createVNode(a.unref(B8e),{trapped:a.unref(o),"trap-on-focus-in":!0,"focus-trap-el":a.unref(f),"focus-start-el":a.unref(i),onFocusAfterTrapped:a.unref(l),onFocusAfterReleased:a.unref(s),onFocusin:a.unref(c),onFocusoutPrevented:a.unref(u),onReleaseRequested:a.unref(d)},{default:a.withCtx(()=>[a.renderSlot(N.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}});var Zvt=wi(qvt,[["__file","content.vue"]]);const Xvt=F1(gvt),sK=Symbol("elTooltip"),R0=Lo({...ATt,...F8e,appendTo:{type:di([String,Object])},content:{type:String,default:""},rawContent:{type:Boolean,default:!1},persistent:Boolean,ariaLabel:String,visible:{type:di(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean}),hL=Lo({...C8e,disabled:Boolean,trigger:{type:di([String,Array]),default:"hover"},triggerKeys:{type:di(Array),default:()=>[iu.enter,iu.space]}}),{useModelToggleProps:Kvt,useModelToggleEmits:Yvt,useModelToggle:Jvt}=xyt("visible"),$vt=Lo({...L8e,...Kvt,...R0,...hL,...S8e,showArrow:{type:Boolean,default:!0}}),ebt=[...Yvt,"before-show","before-hide","show","hide","open","close"],tbt=(e,t)=>Qc(e)?e.includes(t):e===t,XT=(e,t,r)=>n=>{tbt(a.unref(e),t)&&r(n)},rbt=a.defineComponent({name:"ElTooltipTrigger"}),nbt=a.defineComponent({...rbt,props:hL,setup(e,{expose:t}){const r=e,n=xi("tooltip"),{controlled:i,id:o,open:s,onOpen:l,onClose:c,onToggle:u}=a.inject(sK,void 0),d=a.ref(null),h=()=>{if(a.unref(i)||r.disabled)return!0},p=a.toRef(r,"trigger"),f=K4(h,XT(p,"hover",l)),m=K4(h,XT(p,"hover",c)),g=K4(h,XT(p,"click",b=>{b.button===0&&u(b)})),T=K4(h,XT(p,"focus",l)),y=K4(h,XT(p,"focus",c)),v=K4(h,XT(p,"contextmenu",b=>{b.preventDefault(),u(b)})),_=K4(h,b=>{const{code:L}=b;r.triggerKeys.includes(L)&&(b.preventDefault(),u(b))});return t({triggerRef:d}),(b,L)=>(a.openBlock(),a.createBlock(a.unref(_vt),{id:a.unref(o),"virtual-ref":b.virtualRef,open:a.unref(s),"virtual-triggering":b.virtualTriggering,class:a.normalizeClass(a.unref(n).e("trigger")),onBlur:a.unref(y),onClick:a.unref(g),onContextmenu:a.unref(v),onFocus:a.unref(T),onMouseenter:a.unref(f),onMouseleave:a.unref(m),onKeydown:a.unref(_)},{default:a.withCtx(()=>[a.renderSlot(b.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var ibt=wi(nbt,[["__file","trigger.vue"]]);const obt=a.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),abt=a.defineComponent({...obt,props:R0,setup(e,{expose:t}){const r=e,{selector:n}=f8e(),i=xi("tooltip"),o=a.ref(null),s=a.ref(!1),{controlled:l,id:c,open:u,trigger:d,onClose:h,onOpen:p,onShow:f,onHide:m,onBeforeShow:g,onBeforeHide:T}=a.inject(sK,void 0),y=a.computed(()=>r.transition||`${i.namespace.value}-fade-in-linear`),v=a.computed(()=>process.env.NODE_ENV==="test"?!0:r.persistent);a.onBeforeUnmount(()=>{s.value=!0});const _=a.computed(()=>a.unref(v)?!0:a.unref(u)),b=a.computed(()=>r.disabled?!1:a.unref(u)),L=a.computed(()=>r.appendTo||n.value),w=a.computed(()=>{var R;return(R=r.style)!=null?R:{}}),M=a.computed(()=>!a.unref(u)),C=()=>{m()},A=()=>{if(a.unref(l))return!0},O=K4(A,()=>{r.enterable&&a.unref(d)==="hover"&&p()}),V=K4(A,()=>{a.unref(d)==="hover"&&h()}),H=()=>{var R,Z;(Z=(R=o.value)==null?void 0:R.updatePopper)==null||Z.call(R),g==null||g()},N=()=>{T==null||T()},D=()=>{f(),G=emt(a.computed(()=>{var R;return(R=o.value)==null?void 0:R.popperContentRef}),()=>{a.unref(l)||a.unref(d)!=="hover"&&h()})},j=()=>{r.virtualTriggering||h()};let G;return a.watch(()=>a.unref(u),R=>{R||G==null||G()},{flush:"post"}),a.watch(()=>r.content,()=>{var R,Z;(Z=(R=o.value)==null?void 0:R.updatePopper)==null||Z.call(R)}),t({contentRef:o}),(R,Z)=>(a.openBlock(),a.createBlock(a.Teleport,{disabled:!R.teleported,to:a.unref(L)},[a.createVNode(a.Transition,{name:a.unref(y),onAfterLeave:C,onBeforeEnter:H,onAfterEnter:D,onBeforeLeave:N},{default:a.withCtx(()=>[a.unref(_)?a.withDirectives((a.openBlock(),a.createBlock(a.unref(Zvt),a.mergeProps({key:0,id:a.unref(c),ref_key:"contentRef",ref:o},R.$attrs,{"aria-label":R.ariaLabel,"aria-hidden":a.unref(M),"boundaries-padding":R.boundariesPadding,"fallback-placements":R.fallbackPlacements,"gpu-acceleration":R.gpuAcceleration,offset:R.offset,placement:R.placement,"popper-options":R.popperOptions,strategy:R.strategy,effect:R.effect,enterable:R.enterable,pure:R.pure,"popper-class":R.popperClass,"popper-style":[R.popperStyle,a.unref(w)],"reference-el":R.referenceEl,"trigger-target-el":R.triggerTargetEl,visible:a.unref(b),"z-index":R.zIndex,onMouseenter:a.unref(O),onMouseleave:a.unref(V),onBlur:j,onClose:a.unref(h)}),{default:a.withCtx(()=>[s.value?a.createCommentVNode("v-if",!0):a.renderSlot(R.$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"])),[[a.vShow,a.unref(b)]]):a.createCommentVNode("v-if",!0)]),_:3},8,["name"])],8,["disabled","to"]))}});var sbt=wi(abt,[["__file","content.vue"]]);const lbt=["innerHTML"],cbt={key:1},ubt=a.defineComponent({name:"ElTooltip"}),dbt=a.defineComponent({...ubt,props:$vt,emits:ebt,setup(e,{expose:t,emit:r}){const n=e;ETt();const i=ag(),o=a.ref(),s=a.ref(),l=()=>{var y;const v=a.unref(o);v&&((y=v.popperInstanceRef)==null||y.update())},c=a.ref(!1),u=a.ref(),{show:d,hide:h,hasUpdateHandler:p}=Jvt({indicator:c,toggleReason:u}),{onOpen:f,onClose:m}=OTt({showAfter:a.toRef(n,"showAfter"),hideAfter:a.toRef(n,"hideAfter"),autoClose:a.toRef(n,"autoClose"),open:d,close:h}),g=a.computed(()=>of(n.visible)&&!p.value);a.provide(sK,{controlled:g,id:i,open:a.readonly(c),trigger:a.toRef(n,"trigger"),onOpen:y=>{f(y)},onClose:y=>{m(y)},onToggle:y=>{a.unref(c)?m(y):f(y)},onShow:()=>{r("show",u.value)},onHide:()=>{r("hide",u.value)},onBeforeShow:()=>{r("before-show",u.value)},onBeforeHide:()=>{r("before-hide",u.value)},updatePopper:l}),a.watch(()=>n.disabled,y=>{y&&c.value&&(c.value=!1)});const T=y=>{var v,_;const b=(_=(v=s.value)==null?void 0:v.contentRef)==null?void 0:_.popperContentRef,L=(y==null?void 0:y.relatedTarget)||document.activeElement;return b&&b.contains(L)};return a.onDeactivated(()=>c.value&&h()),t({popperRef:o,contentRef:s,isFocusInsideContent:T,updatePopper:l,onOpen:f,onClose:m,hide:h}),(y,v)=>(a.openBlock(),a.createBlock(a.unref(Xvt),{ref_key:"popperRef",ref:o,role:y.role},{default:a.withCtx(()=>[a.createVNode(ibt,{disabled:y.disabled,trigger:y.trigger,"trigger-keys":y.triggerKeys,"virtual-ref":y.virtualRef,"virtual-triggering":y.virtualTriggering},{default:a.withCtx(()=>[y.$slots.default?a.renderSlot(y.$slots,"default",{key:0}):a.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),a.createVNode(sbt,{ref_key:"contentRef",ref:s,"aria-label":y.ariaLabel,"boundaries-padding":y.boundariesPadding,content:y.content,disabled:y.disabled,effect:y.effect,enterable:y.enterable,"fallback-placements":y.fallbackPlacements,"hide-after":y.hideAfter,"gpu-acceleration":y.gpuAcceleration,offset:y.offset,persistent:y.persistent,"popper-class":y.popperClass,"popper-style":y.popperStyle,placement:y.placement,"popper-options":y.popperOptions,pure:y.pure,"raw-content":y.rawContent,"reference-el":y.referenceEl,"trigger-target-el":y.triggerTargetEl,"show-after":y.showAfter,strategy:y.strategy,teleported:y.teleported,transition:y.transition,"virtual-triggering":y.virtualTriggering,"z-index":y.zIndex,"append-to":y.appendTo},{default:a.withCtx(()=>[a.renderSlot(y.$slots,"content",{},()=>[y.rawContent?(a.openBlock(),a.createElementBlock("span",{key:0,innerHTML:y.content},null,8,lbt)):(a.openBlock(),a.createElementBlock("span",cbt,a.toDisplayString(y.content),1))]),y.showArrow?(a.openBlock(),a.createBlock(a.unref(vvt),{key:0,"arrow-offset":y.arrowOffset},null,8,["arrow-offset"])):a.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 hbt=wi(dbt,[["__file","tooltip.vue"]]);const lK=F1(hbt),D8e=Symbol("buttonGroupContextKey"),pbt=(e,t)=>{VX({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},a.computed(()=>e.type==="text"));const r=a.inject(D8e,void 0),n=lI("button"),{form:i}=U5(),o=j5(a.computed(()=>r==null?void 0:r.size)),s=WT(),l=a.ref(),c=a.useSlots(),u=a.computed(()=>e.type||(r==null?void 0:r.type)||""),d=a.computed(()=>{var f,m,g;return(g=(m=e.autoInsertSpace)!=null?m:(f=n.value)==null?void 0:f.autoInsertSpace)!=null?g:!1}),h=a.computed(()=>e.tag==="button"?{ariaDisabled:s.value||e.loading,disabled:s.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),p=a.computed(()=>{var f;const m=(f=c.default)==null?void 0:f.call(c);if(d.value&&(m==null?void 0:m.length)===1){const g=m[0];if((g==null?void 0:g.type)===a.Text){const T=g.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(T.trim())}}return!1});return{_disabled:s,_size:o,_type:u,_ref:l,_props:h,shouldAddSpace:p,handleClick:f=>{e.nativeType==="reset"&&(i==null||i.resetFields()),t("click",f)}}},fbt=["default","primary","success","warning","info","danger","text",""],mbt=["button","submit","reset"],cK=Lo({size:z5,disabled:Boolean,type:{type:String,values:fbt,default:""},icon:{type:sf},nativeType:{type:String,values:mbt,default:"button"},loading:Boolean,loadingIcon:{type:sf,default:()=>HX},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:di([String,Object]),default:"button"}}),gbt={click:e=>e instanceof MouseEvent};function D1(e,t){ybt(e)&&(e="100%");var r=Tbt(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function fI(e){return Math.min(1,Math.max(0,e))}function ybt(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Tbt(e){return typeof e=="string"&&e.indexOf("%")!==-1}function z8e(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function mI(e){return e<=1?"".concat(Number(e)*100,"%"):e}function sg(e){return e.length===1?"0"+e:String(e)}function vbt(e,t,r){return{r:D1(e,255)*255,g:D1(t,255)*255,b:D1(r,255)*255}}function j8e(e,t,r){e=D1(e,255),t=D1(t,255),r=D1(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o=0,s=0,l=(n+i)/2;if(n===i)s=0,o=0;else{var c=n-i;switch(s=l>.5?c/(2-n-i):c/(n+i),n){case e:o=(t-r)/c+(t<r?6:0);break;case t:o=(r-e)/c+2;break;case r:o=(e-t)/c+4;break}o/=6}return{h:o,s,l}}function uK(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function bbt(e,t,r){var n,i,o;if(e=D1(e,360),t=D1(t,100),r=D1(r,100),t===0)i=r,o=r,n=r;else{var s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;n=uK(l,s,e+1/3),i=uK(l,s,e),o=uK(l,s,e-1/3)}return{r:n*255,g:i*255,b:o*255}}function U8e(e,t,r){e=D1(e,255),t=D1(t,255),r=D1(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o=0,s=n,l=n-i,c=n===0?0:l/n;if(n===i)o=0;else{switch(n){case e:o=(t-r)/l+(t<r?6:0);break;case t:o=(r-e)/l+2;break;case r:o=(e-t)/l+4;break}o/=6}return{h:o,s:c,v:s}}function Qbt(e,t,r){e=D1(e,360)*6,t=D1(t,100),r=D1(r,100);var n=Math.floor(e),i=e-n,o=r*(1-t),s=r*(1-i*t),l=r*(1-(1-i)*t),c=n%6,u=[r,s,o,o,l,r][c],d=[l,r,r,s,o,o][c],h=[o,o,l,r,r,s][c];return{r:u*255,g:d*255,b:h*255}}function G8e(e,t,r,n){var i=[sg(Math.round(e).toString(16)),sg(Math.round(t).toString(16)),sg(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 xbt(e,t,r,n,i){var o=[sg(Math.round(e).toString(16)),sg(Math.round(t).toString(16)),sg(Math.round(r).toString(16)),sg(_bt(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 _bt(e){return Math.round(parseFloat(e)*255).toString(16)}function W8e(e){return N0(e)/255}function N0(e){return parseInt(e,16)}function wbt(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var dK={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 Lbt(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,o=null,s=!1,l=!1;return typeof e=="string"&&(e=kbt(e)),typeof e=="object"&&(cf(e.r)&&cf(e.g)&&cf(e.b)?(t=vbt(e.r,e.g,e.b),s=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):cf(e.h)&&cf(e.s)&&cf(e.v)?(n=mI(e.s),i=mI(e.v),t=Qbt(e.h,n,i),s=!0,l="hsv"):cf(e.h)&&cf(e.s)&&cf(e.l)&&(n=mI(e.s),o=mI(e.l),t=bbt(e.h,n,o),s=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=z8e(r),{ok:s,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}var Sbt="[-\\+]?\\d+%?",Mbt="[-\\+]?\\d*\\.\\d+%?",W5="(?:".concat(Mbt,")|(?:").concat(Sbt,")"),hK="[\\s|\\(]+(".concat(W5,")[,|\\s]+(").concat(W5,")[,|\\s]+(").concat(W5,")\\s*\\)?"),pK="[\\s|\\(]+(".concat(W5,")[,|\\s]+(").concat(W5,")[,|\\s]+(").concat(W5,")[,|\\s]+(").concat(W5,")\\s*\\)?"),s3={CSS_UNIT:new RegExp(W5),rgb:new RegExp("rgb"+hK),rgba:new RegExp("rgba"+pK),hsl:new RegExp("hsl"+hK),hsla:new RegExp("hsla"+pK),hsv:new RegExp("hsv"+hK),hsva:new RegExp("hsva"+pK),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 kbt(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(dK[e])e=dK[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=s3.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=s3.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=s3.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=s3.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=s3.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=s3.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=s3.hex8.exec(e),r?{r:N0(r[1]),g:N0(r[2]),b:N0(r[3]),a:W8e(r[4]),format:t?"name":"hex8"}:(r=s3.hex6.exec(e),r?{r:N0(r[1]),g:N0(r[2]),b:N0(r[3]),format:t?"name":"hex"}:(r=s3.hex4.exec(e),r?{r:N0(r[1]+r[1]),g:N0(r[2]+r[2]),b:N0(r[3]+r[3]),a:W8e(r[4]+r[4]),format:t?"name":"hex8"}:(r=s3.hex3.exec(e),r?{r:N0(r[1]+r[1]),g:N0(r[2]+r[2]),b:N0(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function cf(e){return!!s3.CSS_UNIT.exec(String(e))}var Cbt=function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=wbt(t)),this.originalInput=t;var i=Lbt(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:i.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),r,n,i,o=t.r/255,s=t.g/255,l=t.b/255;return o<=.03928?r=o/12.92:r=Math.pow((o+.055)/1.055,2.4),s<=.03928?n=s/12.92:n=Math.pow((s+.055)/1.055,2.4),l<=.03928?i=l/12.92:i=Math.pow((l+.055)/1.055,2.4),.2126*r+.7152*n+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=z8e(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=U8e(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=U8e(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=j8e(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=j8e(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(i,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),G8e(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),xbt(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(r,", ").concat(n,")"):"rgba(".concat(t,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(r){return"".concat(Math.round(D1(r,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(r){return Math.round(D1(r,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+G8e(this.r,this.g,this.b,!1),r=0,n=Object.entries(dK);r<n.length;r++){var i=n[r],o=i[0],s=i[1];if(t===s)return o}return!1},e.prototype.toString=function(t){var r=!!t;t=t??this.format;var n=!1,i=this.a<1&&this.a>=0,o=!r&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=fI(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=fI(r.l),new e(r)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=fI(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=fI(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var n=this.toRgb(),i=new e(t).toRgb(),o=r/100,s={r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a};return new e(s)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var n=this.toHsl(),i=360/r,o=[this];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,o.push(new e(n));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var r=this.toHsv(),n=r.h,i=r.s,o=r.v,s=[],l=1/t;t--;)s.push(new e({h:n,s:i,v:o})),o=(o+l)%1;return s},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb(),i=r.a+n.a*(1-r.a);return new e({r:(r.r*r.a+n.r*n.a*(1-r.a))/i,g:(r.g*r.a+n.g*n.a*(1-r.a))/i,b:(r.b*r.a+n.b*n.a*(1-r.a))/i,a:i})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),n=r.h,i=[this],o=360/t,s=1;s<t;s++)i.push(new e({h:(n+s*o)%360,s:r.s,l:r.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function q5(e,t=20){return e.mix("#141414",t).toString()}function Ebt(e){const t=WT(),r=xi("button");return a.computed(()=>{let n={};const i=e.color;if(i){const o=new Cbt(i),s=e.dark?o.tint(20).toString():q5(o,20);if(e.plain)n=r.cssVarBlock({"bg-color":e.dark?q5(o,90):o.tint(90).toString(),"text-color":i,"border-color":e.dark?q5(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":s,"active-text-color":`var(${r.cssVarName("color-white")})`,"active-border-color":s}),t.value&&(n[r.cssVarBlockName("disabled-bg-color")]=e.dark?q5(o,90):o.tint(90).toString(),n[r.cssVarBlockName("disabled-text-color")]=e.dark?q5(o,50):o.tint(50).toString(),n[r.cssVarBlockName("disabled-border-color")]=e.dark?q5(o,80):o.tint(80).toString());else{const l=e.dark?q5(o,30):o.tint(30).toString(),c=o.isDark()?`var(${r.cssVarName("color-white")})`:`var(${r.cssVarName("color-black")})`;if(n=r.cssVarBlock({"bg-color":i,"text-color":c,"border-color":i,"hover-bg-color":l,"hover-text-color":c,"hover-border-color":l,"active-bg-color":s,"active-border-color":s}),t.value){const u=e.dark?q5(o,50):o.tint(50).toString();n[r.cssVarBlockName("disabled-bg-color")]=u,n[r.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${r.cssVarName("color-white")})`,n[r.cssVarBlockName("disabled-border-color")]=u}}}return n})}const Abt=a.defineComponent({name:"ElButton"}),Obt=a.defineComponent({...Abt,props:cK,emits:gbt,setup(e,{expose:t,emit:r}){const n=e,i=Ebt(n),o=xi("button"),{_ref:s,_size:l,_type:c,_disabled:u,_props:d,shouldAddSpace:h,handleClick:p}=pbt(n,r);return t({ref:s,size:l,type:c,disabled:u,shouldAddSpace:h}),(f,m)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(f.tag),a.mergeProps({ref_key:"_ref",ref:s},a.unref(d),{class:[a.unref(o).b(),a.unref(o).m(a.unref(c)),a.unref(o).m(a.unref(l)),a.unref(o).is("disabled",a.unref(u)),a.unref(o).is("loading",f.loading),a.unref(o).is("plain",f.plain),a.unref(o).is("round",f.round),a.unref(o).is("circle",f.circle),a.unref(o).is("text",f.text),a.unref(o).is("link",f.link),a.unref(o).is("has-bg",f.bg)],style:a.unref(i),onClick:a.unref(p)}),{default:a.withCtx(()=>[f.loading?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[f.$slots.loading?a.renderSlot(f.$slots,"loading",{key:0}):(a.openBlock(),a.createBlock(a.unref(Fl),{key:1,class:a.normalizeClass(a.unref(o).is("loading"))},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(f.loadingIcon)))]),_:1},8,["class"]))],64)):f.icon||f.$slots.icon?(a.openBlock(),a.createBlock(a.unref(Fl),{key:1},{default:a.withCtx(()=>[f.icon?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(f.icon),{key:0})):a.renderSlot(f.$slots,"icon",{key:1})]),_:3})):a.createCommentVNode("v-if",!0),f.$slots.default?(a.openBlock(),a.createElementBlock("span",{key:2,class:a.normalizeClass({[a.unref(o).em("text","expand")]:a.unref(h)})},[a.renderSlot(f.$slots,"default")],2)):a.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var Pbt=wi(Obt,[["__file","button.vue"]]);const Ibt={size:cK.size,type:cK.type},Hbt=a.defineComponent({name:"ElButtonGroup"}),Vbt=a.defineComponent({...Hbt,props:Ibt,setup(e){const t=e;a.provide(D8e,a.reactive({size:a.toRef(t,"size"),type:a.toRef(t,"type")}));const r=xi("button");return(n,i)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(`${a.unref(r).b("group")}`)},[a.renderSlot(n.$slots,"default")],2))}});var q8e=wi(Vbt,[["__file","button-group.vue"]]);const l3=F1(Pbt,{ButtonGroup:q8e});i3(q8e);var ce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function KT(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Rbt(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}const Z5=new Map;let Z8e;Ts&&(document.addEventListener("mousedown",e=>Z8e=e),document.addEventListener("mouseup",e=>{for(const t of Z5.values())for(const{documentHandler:r}of t)r(e,Z8e)}));function X8e(e,t){let r=[];return Array.isArray(t.arg)?r=t.arg:eL(t.arg)&&r.push(t.arg),function(n,i){const o=t.instance.popperRef,s=n.target,l=i==null?void 0:i.target,c=!t||!t.instance,u=!s||!l,d=e.contains(s)||e.contains(l),h=e===s,p=r.length&&r.some(m=>m==null?void 0:m.contains(s))||r.length&&r.includes(l),f=o&&(o.contains(s)||o.contains(l));c||u||d||h||p||f||t.value(n,i)}}const K8e={beforeMount(e,t){Z5.has(e)||Z5.set(e,[]),Z5.get(e).push({documentHandler:X8e(e,t),bindingFn:t.value})},updated(e,t){Z5.has(e)||Z5.set(e,[]);const r=Z5.get(e),n=r.findIndex(o=>o.bindingFn===t.oldValue),i={documentHandler:X8e(e,t),bindingFn:t.value};n>=0?r.splice(n,1,i):r.push(i)},unmounted(e){Z5.delete(e)}},Nbt=Lo({header:{type:String,default:""},footer:{type:String,default:""},bodyStyle:{type:di([String,Object,Array]),default:""},bodyClass:String,shadow:{type:String,values:["always","hover","never"],default:"always"}}),Bbt=a.defineComponent({name:"ElCard"}),Fbt=a.defineComponent({...Bbt,props:Nbt,setup(e){const t=xi("card");return(r,n)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([a.unref(t).b(),a.unref(t).is(`${r.shadow}-shadow`)])},[r.$slots.header||r.header?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(a.unref(t).e("header"))},[a.renderSlot(r.$slots,"header",{},()=>[a.createTextVNode(a.toDisplayString(r.header),1)])],2)):a.createCommentVNode("v-if",!0),a.createElementVNode("div",{class:a.normalizeClass([a.unref(t).e("body"),r.bodyClass]),style:a.normalizeStyle(r.bodyStyle)},[a.renderSlot(r.$slots,"default")],6),r.$slots.footer||r.footer?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(a.unref(t).e("footer"))},[a.renderSlot(r.$slots,"footer",{},()=>[a.createTextVNode(a.toDisplayString(r.footer),1)])],2)):a.createCommentVNode("v-if",!0)],2))}});var Dbt=wi(Fbt,[["__file","card.vue"]]);const Y8e=F1(Dbt),J8e={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:z5,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0}},$8e={[vs]:e=>Rl(e)||Nl(e)||of(e),change:e=>Rl(e)||Nl(e)||of(e)},YT=Symbol("checkboxGroupContextKey"),zbt=({model:e,isChecked:t})=>{const r=a.inject(YT,void 0),n=a.computed(()=>{var i,o;const s=(i=r==null?void 0:r.max)==null?void 0:i.value,l=(o=r==null?void 0:r.min)==null?void 0:o.value;return!$w(s)&&e.value.length>=s&&!t.value||!$w(l)&&e.value.length<=l&&t.value});return{isDisabled:WT(a.computed(()=>(r==null?void 0:r.disabled.value)||n.value)),isLimitDisabled:n}},jbt=(e,{model:t,isLimitExceeded:r,hasOwnLabel:n,isDisabled:i,isLabeledByFormItem:o})=>{const s=a.inject(YT,void 0),{formItem:l}=U5(),{emit:c}=a.getCurrentInstance();function u(m){var g,T;return m===e.trueLabel||m===!0?(g=e.trueLabel)!=null?g:!0:(T=e.falseLabel)!=null?T:!1}function d(m,g){c("change",u(m),g)}function h(m){if(r.value)return;const g=m.target;c("change",u(g.checked),m)}async function p(m){r.value||!n.value&&!i.value&&o.value&&(m.composedPath().some(g=>g.tagName==="LABEL")||(t.value=u([!1,e.falseLabel].includes(t.value)),await a.nextTick(),d(t.value,m)))}const f=a.computed(()=>(s==null?void 0:s.validateEvent)||e.validateEvent);return a.watch(()=>e.modelValue,()=>{f.value&&(l==null||l.validate("change").catch(m=>Bl(m)))}),{handleChange:h,onClickRoot:p}},Ubt=e=>{const t=a.ref(!1),{emit:r}=a.getCurrentInstance(),n=a.inject(YT,void 0),i=a.computed(()=>$w(n)===!1),o=a.ref(!1),s=a.computed({get(){var l,c;return i.value?(l=n==null?void 0:n.modelValue)==null?void 0:l.value:(c=e.modelValue)!=null?c:t.value},set(l){var c,u;i.value&&Qc(l)?(o.value=((c=n==null?void 0:n.max)==null?void 0:c.value)!==void 0&&l.length>(n==null?void 0:n.max.value)&&l.length>s.value.length,o.value===!1&&((u=n==null?void 0:n.changeEvent)==null||u.call(n,l))):(r(vs,l),t.value=l)}});return{model:s,isGroup:i,isLimitExceeded:o}},Gbt=(e,t,{model:r})=>{const n=a.inject(YT,void 0),i=a.ref(!1),o=a.computed(()=>{const u=r.value;return of(u)?u:Qc(u)?B1(e.label)?u.map(a.toRaw).some(d=>Jw(d,e.label)):u.map(a.toRaw).includes(e.label):u!=null?u===e.trueLabel:!!u}),s=j5(a.computed(()=>{var u;return(u=n==null?void 0:n.size)==null?void 0:u.value}),{prop:!0}),l=j5(a.computed(()=>{var u;return(u=n==null?void 0:n.size)==null?void 0:u.value})),c=a.computed(()=>!!t.default||!N5(e.label));return{checkboxButtonSize:s,isChecked:o,isFocused:i,checkboxSize:l,hasOwnLabel:c}},Wbt=(e,{model:t})=>{function r(){Qc(t.value)&&!t.value.includes(e.label)?t.value.push(e.label):t.value=e.trueLabel||!0}e.checked&&r()},e7e=(e,t)=>{const{formItem:r}=U5(),{model:n,isGroup:i,isLimitExceeded:o}=Ubt(e),{isFocused:s,isChecked:l,checkboxButtonSize:c,checkboxSize:u,hasOwnLabel:d}=Gbt(e,t,{model:n}),{isDisabled:h}=zbt({model:n,isChecked:l}),{inputId:p,isLabeledByFormItem:f}=qT(e,{formItemContext:r,disableIdGeneration:d,disableIdManagement:i}),{handleChange:m,onClickRoot:g}=jbt(e,{model:n,isLimitExceeded:o,hasOwnLabel:d,isDisabled:h,isLabeledByFormItem:f});return Wbt(e,{model:n}),{inputId:p,isLabeledByFormItem:f,isChecked:l,isDisabled:h,isFocused:s,checkboxButtonSize:c,checkboxSize:u,hasOwnLabel:d,model:n,handleChange:m,onClickRoot:g}},qbt=["id","indeterminate","name","tabindex","disabled","true-value","false-value"],Zbt=["id","indeterminate","disabled","value","name","tabindex"],Xbt=a.defineComponent({name:"ElCheckbox"}),Kbt=a.defineComponent({...Xbt,props:J8e,emits:$8e,setup(e){const t=e,r=a.useSlots(),{inputId:n,isLabeledByFormItem:i,isChecked:o,isDisabled:s,isFocused:l,checkboxSize:c,hasOwnLabel:u,model:d,handleChange:h,onClickRoot:p}=e7e(t,r),f=xi("checkbox"),m=a.computed(()=>[f.b(),f.m(c.value),f.is("disabled",s.value),f.is("bordered",t.border),f.is("checked",o.value)]),g=a.computed(()=>[f.e("input"),f.is("disabled",s.value),f.is("checked",o.value),f.is("indeterminate",t.indeterminate),f.is("focus",l.value)]);return(T,y)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(!a.unref(u)&&a.unref(i)?"span":"label"),{class:a.normalizeClass(a.unref(m)),"aria-controls":T.indeterminate?T.controls:null,onClick:a.unref(p)},{default:a.withCtx(()=>[a.createElementVNode("span",{class:a.normalizeClass(a.unref(g))},[T.trueLabel||T.falseLabel?a.withDirectives((a.openBlock(),a.createElementBlock("input",{key:0,id:a.unref(n),"onUpdate:modelValue":y[0]||(y[0]=v=>a.isRef(d)?d.value=v:null),class:a.normalizeClass(a.unref(f).e("original")),type:"checkbox",indeterminate:T.indeterminate,name:T.name,tabindex:T.tabindex,disabled:a.unref(s),"true-value":T.trueLabel,"false-value":T.falseLabel,onChange:y[1]||(y[1]=(...v)=>a.unref(h)&&a.unref(h)(...v)),onFocus:y[2]||(y[2]=v=>l.value=!0),onBlur:y[3]||(y[3]=v=>l.value=!1),onClick:y[4]||(y[4]=a.withModifiers(()=>{},["stop"]))},null,42,qbt)),[[a.vModelCheckbox,a.unref(d)]]):a.withDirectives((a.openBlock(),a.createElementBlock("input",{key:1,id:a.unref(n),"onUpdate:modelValue":y[5]||(y[5]=v=>a.isRef(d)?d.value=v:null),class:a.normalizeClass(a.unref(f).e("original")),type:"checkbox",indeterminate:T.indeterminate,disabled:a.unref(s),value:T.label,name:T.name,tabindex:T.tabindex,onChange:y[6]||(y[6]=(...v)=>a.unref(h)&&a.unref(h)(...v)),onFocus:y[7]||(y[7]=v=>l.value=!0),onBlur:y[8]||(y[8]=v=>l.value=!1),onClick:y[9]||(y[9]=a.withModifiers(()=>{},["stop"]))},null,42,Zbt)),[[a.vModelCheckbox,a.unref(d)]]),a.createElementVNode("span",{class:a.normalizeClass(a.unref(f).e("inner"))},null,2)],2),a.unref(u)?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(a.unref(f).e("label"))},[a.renderSlot(T.$slots,"default"),T.$slots.default?a.createCommentVNode("v-if",!0):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode(a.toDisplayString(T.label),1)],64))],2)):a.createCommentVNode("v-if",!0)]),_:3},8,["class","aria-controls","onClick"]))}});var Ybt=wi(Kbt,[["__file","checkbox.vue"]]);const Jbt=["name","tabindex","disabled","true-value","false-value"],$bt=["name","tabindex","disabled","value"],eQt=a.defineComponent({name:"ElCheckboxButton"}),tQt=a.defineComponent({...eQt,props:J8e,emits:$8e,setup(e){const t=e,r=a.useSlots(),{isFocused:n,isChecked:i,isDisabled:o,checkboxButtonSize:s,model:l,handleChange:c}=e7e(t,r),u=a.inject(YT,void 0),d=xi("checkbox"),h=a.computed(()=>{var f,m,g,T;const y=(m=(f=u==null?void 0:u.fill)==null?void 0:f.value)!=null?m:"";return{backgroundColor:y,borderColor:y,color:(T=(g=u==null?void 0:u.textColor)==null?void 0:g.value)!=null?T:"",boxShadow:y?`-1px 0 0 0 ${y}`:void 0}}),p=a.computed(()=>[d.b("button"),d.bm("button",s.value),d.is("disabled",o.value),d.is("checked",i.value),d.is("focus",n.value)]);return(f,m)=>(a.openBlock(),a.createElementBlock("label",{class:a.normalizeClass(a.unref(p))},[f.trueLabel||f.falseLabel?a.withDirectives((a.openBlock(),a.createElementBlock("input",{key:0,"onUpdate:modelValue":m[0]||(m[0]=g=>a.isRef(l)?l.value=g:null),class:a.normalizeClass(a.unref(d).be("button","original")),type:"checkbox",name:f.name,tabindex:f.tabindex,disabled:a.unref(o),"true-value":f.trueLabel,"false-value":f.falseLabel,onChange:m[1]||(m[1]=(...g)=>a.unref(c)&&a.unref(c)(...g)),onFocus:m[2]||(m[2]=g=>n.value=!0),onBlur:m[3]||(m[3]=g=>n.value=!1),onClick:m[4]||(m[4]=a.withModifiers(()=>{},["stop"]))},null,42,Jbt)),[[a.vModelCheckbox,a.unref(l)]]):a.withDirectives((a.openBlock(),a.createElementBlock("input",{key:1,"onUpdate:modelValue":m[5]||(m[5]=g=>a.isRef(l)?l.value=g:null),class:a.normalizeClass(a.unref(d).be("button","original")),type:"checkbox",name:f.name,tabindex:f.tabindex,disabled:a.unref(o),value:f.label,onChange:m[6]||(m[6]=(...g)=>a.unref(c)&&a.unref(c)(...g)),onFocus:m[7]||(m[7]=g=>n.value=!0),onBlur:m[8]||(m[8]=g=>n.value=!1),onClick:m[9]||(m[9]=a.withModifiers(()=>{},["stop"]))},null,42,$bt)),[[a.vModelCheckbox,a.unref(l)]]),f.$slots.default||f.label?(a.openBlock(),a.createElementBlock("span",{key:2,class:a.normalizeClass(a.unref(d).be("button","inner")),style:a.normalizeStyle(a.unref(i)?a.unref(h):void 0)},[a.renderSlot(f.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(f.label),1)])],6)):a.createCommentVNode("v-if",!0)],2))}});var t7e=wi(tQt,[["__file","checkbox-button.vue"]]);const rQt=Lo({modelValue:{type:di(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:z5,label:String,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0}}),nQt={[vs]:e=>Qc(e),change:e=>Qc(e)},iQt=a.defineComponent({name:"ElCheckboxGroup"}),oQt=a.defineComponent({...iQt,props:rQt,emits:nQt,setup(e,{emit:t}){const r=e,n=xi("checkbox"),{formItem:i}=U5(),{inputId:o,isLabeledByFormItem:s}=qT(r,{formItemContext:i}),l=async u=>{t(vs,u),await a.nextTick(),t("change",u)},c=a.computed({get(){return r.modelValue},set(u){l(u)}});return a.provide(YT,{...y9t(a.toRefs(r),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:c,changeEvent:l}),a.watch(()=>r.modelValue,()=>{r.validateEvent&&(i==null||i.validate("change").catch(u=>Bl(u)))}),(u,d)=>{var h;return a.openBlock(),a.createBlock(a.resolveDynamicComponent(u.tag),{id:a.unref(o),class:a.normalizeClass(a.unref(n).b("group")),role:"group","aria-label":a.unref(s)?void 0:u.label||"checkbox-group","aria-labelledby":a.unref(s)?(h=a.unref(i))==null?void 0:h.labelId:void 0},{default:a.withCtx(()=>[a.renderSlot(u.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var r7e=wi(oQt,[["__file","checkbox-group.vue"]]);const gI=F1(Ybt,{CheckboxButton:t7e,CheckboxGroup:r7e});i3(t7e);const fK=i3(r7e),n7e=Lo({size:z5,disabled:Boolean,label:{type:[String,Number,Boolean],default:""}}),aQt=Lo({...n7e,modelValue:{type:[String,Number,Boolean],default:""},name:{type:String,default:""},border:Boolean}),i7e={[vs]:e=>Rl(e)||Nl(e)||of(e),[$P]:e=>Rl(e)||Nl(e)||of(e)},o7e=Symbol("radioGroupKey"),a7e=(e,t)=>{const r=a.ref(),n=a.inject(o7e,void 0),i=a.computed(()=>!!n),o=a.computed({get(){return i.value?n.modelValue:e.modelValue},set(d){i.value?n.changeEvent(d):t&&t(vs,d),r.value.checked=e.modelValue===e.label}}),s=j5(a.computed(()=>n==null?void 0:n.size)),l=WT(a.computed(()=>n==null?void 0:n.disabled)),c=a.ref(!1),u=a.computed(()=>l.value||i.value&&o.value!==e.label?-1:0);return{radioRef:r,isGroup:i,radioGroup:n,focus:c,size:s,disabled:l,tabIndex:u,modelValue:o}},sQt=["value","name","disabled"],lQt=a.defineComponent({name:"ElRadio"}),cQt=a.defineComponent({...lQt,props:aQt,emits:i7e,setup(e,{emit:t}){const r=e,n=xi("radio"),{radioRef:i,radioGroup:o,focus:s,size:l,disabled:c,modelValue:u}=a7e(r,t);function d(){a.nextTick(()=>t("change",u.value))}return(h,p)=>{var f;return a.openBlock(),a.createElementBlock("label",{class:a.normalizeClass([a.unref(n).b(),a.unref(n).is("disabled",a.unref(c)),a.unref(n).is("focus",a.unref(s)),a.unref(n).is("bordered",h.border),a.unref(n).is("checked",a.unref(u)===h.label),a.unref(n).m(a.unref(l))])},[a.createElementVNode("span",{class:a.normalizeClass([a.unref(n).e("input"),a.unref(n).is("disabled",a.unref(c)),a.unref(n).is("checked",a.unref(u)===h.label)])},[a.withDirectives(a.createElementVNode("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":p[0]||(p[0]=m=>a.isRef(u)?u.value=m:null),class:a.normalizeClass(a.unref(n).e("original")),value:h.label,name:h.name||((f=a.unref(o))==null?void 0:f.name),disabled:a.unref(c),type:"radio",onFocus:p[1]||(p[1]=m=>s.value=!0),onBlur:p[2]||(p[2]=m=>s.value=!1),onChange:d,onClick:p[3]||(p[3]=a.withModifiers(()=>{},["stop"]))},null,42,sQt),[[a.vModelRadio,a.unref(u)]]),a.createElementVNode("span",{class:a.normalizeClass(a.unref(n).e("inner"))},null,2)],2),a.createElementVNode("span",{class:a.normalizeClass(a.unref(n).e("label")),onKeydown:p[4]||(p[4]=a.withModifiers(()=>{},["stop"]))},[a.renderSlot(h.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(h.label),1)])],34)],2)}}});var uQt=wi(cQt,[["__file","radio.vue"]]);const dQt=Lo({...n7e,name:{type:String,default:""}}),hQt=["value","name","disabled"],pQt=a.defineComponent({name:"ElRadioButton"}),fQt=a.defineComponent({...pQt,props:dQt,setup(e){const t=e,r=xi("radio"),{radioRef:n,focus:i,size:o,disabled:s,modelValue:l,radioGroup:c}=a7e(t),u=a.computed(()=>({backgroundColor:(c==null?void 0:c.fill)||"",borderColor:(c==null?void 0:c.fill)||"",boxShadow:c!=null&&c.fill?`-1px 0 0 0 ${c.fill}`:"",color:(c==null?void 0:c.textColor)||""}));return(d,h)=>{var p;return a.openBlock(),a.createElementBlock("label",{class:a.normalizeClass([a.unref(r).b("button"),a.unref(r).is("active",a.unref(l)===d.label),a.unref(r).is("disabled",a.unref(s)),a.unref(r).is("focus",a.unref(i)),a.unref(r).bm("button",a.unref(o))])},[a.withDirectives(a.createElementVNode("input",{ref_key:"radioRef",ref:n,"onUpdate:modelValue":h[0]||(h[0]=f=>a.isRef(l)?l.value=f:null),class:a.normalizeClass(a.unref(r).be("button","original-radio")),value:d.label,type:"radio",name:d.name||((p=a.unref(c))==null?void 0:p.name),disabled:a.unref(s),onFocus:h[1]||(h[1]=f=>i.value=!0),onBlur:h[2]||(h[2]=f=>i.value=!1),onClick:h[3]||(h[3]=a.withModifiers(()=>{},["stop"]))},null,42,hQt),[[a.vModelRadio,a.unref(l)]]),a.createElementVNode("span",{class:a.normalizeClass(a.unref(r).be("button","inner")),style:a.normalizeStyle(a.unref(l)===d.label?a.unref(u):{}),onKeydown:h[4]||(h[4]=a.withModifiers(()=>{},["stop"]))},[a.renderSlot(d.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(d.label),1)])],38)],2)}}});var s7e=wi(fQt,[["__file","radio-button.vue"]]);const mQt=Lo({id:{type:String,default:void 0},size:z5,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}}),gQt=i7e,yQt=["id","aria-label","aria-labelledby"],TQt=a.defineComponent({name:"ElRadioGroup"}),vQt=a.defineComponent({...TQt,props:mQt,emits:gQt,setup(e,{emit:t}){const r=e,n=xi("radio"),i=ag(),o=a.ref(),{formItem:s}=U5(),{inputId:l,isLabeledByFormItem:c}=qT(r,{formItemContext:s}),u=h=>{t(vs,h),a.nextTick(()=>t("change",h))};a.onMounted(()=>{const h=o.value.querySelectorAll("[type=radio]"),p=h[0];!Array.from(h).some(f=>f.checked)&&p&&(p.tabIndex=0)});const d=a.computed(()=>r.name||i.value);return a.provide(o7e,a.reactive({...a.toRefs(r),changeEvent:u,name:d})),a.watch(()=>r.modelValue,()=>{r.validateEvent&&(s==null||s.validate("change").catch(h=>Bl(h)))}),(h,p)=>(a.openBlock(),a.createElementBlock("div",{id:a.unref(l),ref_key:"radioGroupRef",ref:o,class:a.normalizeClass(a.unref(n).b("group")),role:"radiogroup","aria-label":a.unref(c)?void 0:h.label||"radio-group","aria-labelledby":a.unref(c)?a.unref(s).labelId:void 0},[a.renderSlot(h.$slots,"default")],10,yQt))}});var l7e=wi(vQt,[["__file","radio-group.vue"]]);const c7e=F1(uQt,{RadioButton:s7e,RadioGroup:l7e}),u7e=i3(l7e);i3(s7e);const d7e=Lo({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Ome},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),bQt={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},QQt=a.defineComponent({name:"ElTag"}),xQt=a.defineComponent({...QQt,props:d7e,emits:bQt,setup(e,{emit:t}){const r=e,n=j5(),i=xi("tag"),o=a.computed(()=>{const{type:c,hit:u,effect:d,closable:h,round:p}=r;return[i.b(),i.is("closable",h),i.m(c||"primary"),i.m(n.value),i.m(d),i.is("hit",u),i.is("round",p)]}),s=c=>{t("close",c)},l=c=>{t("click",c)};return(c,u)=>c.disableTransitions?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(a.unref(o)),style:a.normalizeStyle({backgroundColor:c.color}),onClick:l},[a.createElementVNode("span",{class:a.normalizeClass(a.unref(i).e("content"))},[a.renderSlot(c.$slots,"default")],2),c.closable?(a.openBlock(),a.createBlock(a.unref(Fl),{key:0,class:a.normalizeClass(a.unref(i).e("close")),onClick:a.withModifiers(s,["stop"])},{default:a.withCtx(()=>[a.createVNode(a.unref(NT))]),_:1},8,["class","onClick"])):a.createCommentVNode("v-if",!0)],6)):(a.openBlock(),a.createBlock(a.Transition,{key:1,name:`${a.unref(i).namespace.value}-zoom-in-center`,appear:""},{default:a.withCtx(()=>[a.createElementVNode("span",{class:a.normalizeClass(a.unref(o)),style:a.normalizeStyle({backgroundColor:c.color}),onClick:l},[a.createElementVNode("span",{class:a.normalizeClass(a.unref(i).e("content"))},[a.renderSlot(c.$slots,"default")],2),c.closable?(a.openBlock(),a.createBlock(a.unref(Fl),{key:0,class:a.normalizeClass(a.unref(i).e("close")),onClick:a.withModifiers(s,["stop"])},{default:a.withCtx(()=>[a.createVNode(a.unref(NT))]),_:1},8,["class","onClick"])):a.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var _Qt=wi(xQt,[["__file","tag.vue"]]);const wQt=F1(_Qt),h7e=Symbol("rowContextKey"),LQt=["start","center","end","space-around","space-between","space-evenly"],SQt=["top","middle","bottom"],MQt=Lo({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:LQt,default:"start"},align:{type:String,values:SQt}}),kQt=a.defineComponent({name:"ElRow"}),CQt=a.defineComponent({...kQt,props:MQt,setup(e){const t=e,r=xi("row"),n=a.computed(()=>t.gutter);a.provide(h7e,{gutter:n});const i=a.computed(()=>{const s={};return t.gutter&&(s.marginRight=s.marginLeft=`-${t.gutter/2}px`),s}),o=a.computed(()=>[r.b(),r.is(`justify-${t.justify}`,t.justify!=="start"),r.is(`align-${t.align}`,!!t.align)]);return(s,l)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(s.tag),{class:a.normalizeClass(a.unref(o)),style:a.normalizeStyle(a.unref(i))},{default:a.withCtx(()=>[a.renderSlot(s.$slots,"default")]),_:3},8,["class","style"]))}});var EQt=wi(CQt,[["__file","row.vue"]]);const c3=F1(EQt),AQt=Lo({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:di([Number,Object]),default:()=>BT({})},sm:{type:di([Number,Object]),default:()=>BT({})},md:{type:di([Number,Object]),default:()=>BT({})},lg:{type:di([Number,Object]),default:()=>BT({})},xl:{type:di([Number,Object]),default:()=>BT({})}}),OQt=a.defineComponent({name:"ElCol"}),PQt=a.defineComponent({...OQt,props:AQt,setup(e){const t=e,{gutter:r}=a.inject(h7e,{gutter:a.computed(()=>0)}),n=xi("col"),i=a.computed(()=>{const s={};return r.value&&(s.paddingLeft=s.paddingRight=`${r.value/2}px`),s}),o=a.computed(()=>{const s=[];return["span","offset","pull","push"].forEach(l=>{const c=t[l];Nl(c)&&(l==="span"?s.push(n.b(`${t[l]}`)):c>0&&s.push(n.b(`${l}-${t[l]}`)))}),["xs","sm","md","lg","xl"].forEach(l=>{Nl(t[l])?s.push(n.b(`${l}-${t[l]}`)):B1(t[l])&&Object.entries(t[l]).forEach(([c,u])=>{s.push(c!=="span"?n.b(`${l}-${c}-${u}`):n.b(`${l}-${u}`))})}),r.value&&s.push(n.is("guttered")),[n.b(),s]});return(s,l)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(s.tag),{class:a.normalizeClass(a.unref(o)),style:a.normalizeStyle(a.unref(i))},{default:a.withCtx(()=>[a.renderSlot(s.$slots,"default")]),_:3},8,["class","style"]))}});var IQt=wi(PQt,[["__file","col.vue"]]);const Rh=F1(IQt),HQt=a.defineComponent({name:"ElCollapseTransition"}),VQt=a.defineComponent({...HQt,setup(e){const t=xi("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)=>(a.openBlock(),a.createBlock(a.Transition,a.mergeProps({name:a.unref(t).b()},a.toHandlers(n)),{default:a.withCtx(()=>[a.renderSlot(i.$slots,"default")]),_:3},16,["name"]))}});var yI=wi(VQt,[["__file","collapse-transition.vue"]]);yI.install=e=>{e.component(yI.name,yI)};const RQt=yI,NQt=Lo({color:{type:di(Object),required:!0},vertical:{type:Boolean,default:!1}});let mK=!1;function pL(e,t){if(!Ts)return;const r=function(o){var s;(s=t.drag)==null||s.call(t,o)},n=function(o){var s;document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n),document.removeEventListener("touchmove",r),document.removeEventListener("touchend",n),document.onselectstart=null,document.ondragstart=null,mK=!1,(s=t.end)==null||s.call(t,o)},i=function(o){var s;mK||(o.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",r),document.addEventListener("mouseup",n),document.addEventListener("touchmove",r),document.addEventListener("touchend",n),mK=!0,(s=t.start)==null||s.call(t,o))};e.addEventListener("mousedown",i),e.addEventListener("touchstart",i)}const BQt=e=>{const t=a.getCurrentInstance(),r=a.shallowRef(),n=a.shallowRef();function i(s){s.target!==r.value&&o(s)}function o(s){if(!n.value||!r.value)return;const l=t.vnode.el.getBoundingClientRect(),{clientX:c,clientY:u}=gX(s);if(e.vertical){let d=u-l.top;d=Math.max(r.value.offsetHeight/2,d),d=Math.min(d,l.height-r.value.offsetHeight/2),e.color.set("alpha",Math.round((d-r.value.offsetHeight/2)/(l.height-r.value.offsetHeight)*100))}else{let d=c-l.left;d=Math.max(r.value.offsetWidth/2,d),d=Math.min(d,l.width-r.value.offsetWidth/2),e.color.set("alpha",Math.round((d-r.value.offsetWidth/2)/(l.width-r.value.offsetWidth)*100))}}return{thumb:r,bar:n,handleDrag:o,handleClick:i}},FQt=(e,{bar:t,thumb:r,handleDrag:n})=>{const i=a.getCurrentInstance(),o=xi("color-alpha-slider"),s=a.ref(0),l=a.ref(0),c=a.ref();function u(){if(!r.value||e.vertical)return 0;const v=i.vnode.el,_=e.color.get("alpha");return v?Math.round(_*(v.offsetWidth-r.value.offsetWidth/2)/100):0}function d(){if(!r.value)return 0;const v=i.vnode.el;if(!e.vertical)return 0;const _=e.color.get("alpha");return v?Math.round(_*(v.offsetHeight-r.value.offsetHeight/2)/100):0}function h(){if(e.color&&e.color.value){const{r:v,g:_,b}=e.color.toRgb();return`linear-gradient(to right, rgba(${v}, ${_}, ${b}, 0) 0%, rgba(${v}, ${_}, ${b}, 1) 100%)`}return""}function p(){s.value=u(),l.value=d(),c.value=h()}a.onMounted(()=>{if(!t.value||!r.value)return;const v={drag:_=>{n(_)},end:_=>{n(_)}};pL(t.value,v),pL(r.value,v),p()}),a.watch(()=>e.color.get("alpha"),()=>p()),a.watch(()=>e.color.value,()=>p());const f=a.computed(()=>[o.b(),o.is("vertical",e.vertical)]),m=a.computed(()=>o.e("bar")),g=a.computed(()=>o.e("thumb")),T=a.computed(()=>({background:c.value})),y=a.computed(()=>({left:af(s.value),top:af(l.value)}));return{rootKls:f,barKls:m,barStyle:T,thumbKls:g,thumbStyle:y,update:p}},DQt="ElColorAlphaSlider",zQt=a.defineComponent({name:DQt}),jQt=a.defineComponent({...zQt,props:NQt,setup(e,{expose:t}){const r=e,{bar:n,thumb:i,handleDrag:o,handleClick:s}=BQt(r),{rootKls:l,barKls:c,barStyle:u,thumbKls:d,thumbStyle:h,update:p}=FQt(r,{bar:n,thumb:i,handleDrag:o});return t({update:p,bar:n,thumb:i}),(f,m)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(a.unref(l))},[a.createElementVNode("div",{ref_key:"bar",ref:n,class:a.normalizeClass(a.unref(c)),style:a.normalizeStyle(a.unref(u)),onClick:m[0]||(m[0]=(...g)=>a.unref(s)&&a.unref(s)(...g))},null,6),a.createElementVNode("div",{ref_key:"thumb",ref:i,class:a.normalizeClass(a.unref(d)),style:a.normalizeStyle(a.unref(h))},null,6)],2))}});var UQt=wi(jQt,[["__file","alpha-slider.vue"]]);const GQt=a.defineComponent({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(e){const t=xi("color-hue-slider"),r=a.getCurrentInstance(),n=a.ref(),i=a.ref(),o=a.ref(0),s=a.ref(0),l=a.computed(()=>e.color.get("hue"));a.watch(()=>l.value,()=>{p()});function c(f){f.target!==n.value&&u(f)}function u(f){if(!i.value||!n.value)return;const m=r.vnode.el.getBoundingClientRect(),{clientX:g,clientY:T}=gX(f);let y;if(e.vertical){let v=T-m.top;v=Math.min(v,m.height-n.value.offsetHeight/2),v=Math.max(n.value.offsetHeight/2,v),y=Math.round((v-n.value.offsetHeight/2)/(m.height-n.value.offsetHeight)*360)}else{let v=g-m.left;v=Math.min(v,m.width-n.value.offsetWidth/2),v=Math.max(n.value.offsetWidth/2,v),y=Math.round((v-n.value.offsetWidth/2)/(m.width-n.value.offsetWidth)*360)}e.color.set("hue",y)}function d(){if(!n.value)return 0;const f=r.vnode.el;if(e.vertical)return 0;const m=e.color.get("hue");return f?Math.round(m*(f.offsetWidth-n.value.offsetWidth/2)/360):0}function h(){if(!n.value)return 0;const f=r.vnode.el;if(!e.vertical)return 0;const m=e.color.get("hue");return f?Math.round(m*(f.offsetHeight-n.value.offsetHeight/2)/360):0}function p(){o.value=d(),s.value=h()}return a.onMounted(()=>{if(!i.value||!n.value)return;const f={drag:m=>{u(m)},end:m=>{u(m)}};pL(i.value,f),pL(n.value,f),p()}),{bar:i,thumb:n,thumbLeft:o,thumbTop:s,hueValue:l,handleClick:c,update:p,ns:t}}});function WQt(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([e.ns.b(),e.ns.is("vertical",e.vertical)])},[a.createElementVNode("div",{ref:"bar",class:a.normalizeClass(e.ns.e("bar")),onClick:t[0]||(t[0]=(...s)=>e.handleClick&&e.handleClick(...s))},null,2),a.createElementVNode("div",{ref:"thumb",class:a.normalizeClass(e.ns.e("thumb")),style:a.normalizeStyle({left:e.thumbLeft+"px",top:e.thumbTop+"px"})},null,6)],2)}var qQt=wi(GQt,[["render",WQt],["__file","hue-slider.vue"]]);const ZQt=Lo({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:z5,popperClass:{type:String,default:""},label:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},predefine:{type:di(Array)},validateEvent:{type:Boolean,default:!0}}),XQt={[vs]:e=>Rl(e)||N5(e),[$P]:e=>Rl(e)||N5(e),activeChange:e=>Rl(e)||N5(e),focus:e=>e instanceof FocusEvent,blur:e=>e instanceof FocusEvent},p7e=Symbol("colorPickerContextKey"),f7e=function(e,t,r){return[e,t*r/((e=(2-t)*r)<1?e:2-e)||0,e/2]},KQt=function(e){return typeof e=="string"&&e.includes(".")&&Number.parseFloat(e)===1},YQt=function(e){return typeof e=="string"&&e.includes("%")},JT=function(e,t){KQt(e)&&(e="100%");const r=YQt(e);return e=Math.min(t,Math.max(0,Number.parseFloat(`${e}`))),r&&(e=Number.parseInt(`${e*t}`,10)/100),Math.abs(e-t)<1e-6?1:e%t/Number.parseFloat(t)},m7e={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},TI=e=>{e=Math.min(Math.round(e),255);const t=Math.floor(e/16),r=e%16;return`${m7e[t]||t}${m7e[r]||r}`},g7e=function({r:e,g:t,b:r}){return Number.isNaN(+e)||Number.isNaN(+t)||Number.isNaN(+r)?"":`#${TI(e)}${TI(t)}${TI(r)}`},gK={A:10,B:11,C:12,D:13,E:14,F:15},lg=function(e){return e.length===2?(gK[e[0].toUpperCase()]||+e[0])*16+(gK[e[1].toUpperCase()]||+e[1]):gK[e[1].toUpperCase()]||+e[1]},JQt=function(e,t,r){t=t/100,r=r/100;let n=t;const i=Math.max(r,.01);r*=2,t*=r<=1?r:2-r,n*=i<=1?i:2-i;const o=(r+t)/2,s=r===0?2*n/(i+n):2*t/(r+t);return{h:e,s:s*100,v:o*100}},y7e=(e,t,r)=>{e=JT(e,255),t=JT(t,255),r=JT(r,255);const n=Math.max(e,t,r),i=Math.min(e,t,r);let o;const s=n,l=n-i,c=n===0?0:l/n;if(n===i)o=0;else{switch(n){case e:{o=(t-r)/l+(t<r?6:0);break}case t:{o=(r-e)/l+2;break}case r:{o=(e-t)/l+4;break}}o/=6}return{h:o*360,s:c*100,v:s*100}},fL=function(e,t,r){e=JT(e,360)*6,t=JT(t,100),r=JT(r,100);const n=Math.floor(e),i=e-n,o=r*(1-t),s=r*(1-i*t),l=r*(1-(1-i)*t),c=n%6,u=[r,s,o,o,l,r][c],d=[l,r,r,s,o,o][c],h=[o,o,l,r,r,s][c];return{r:Math.round(u*255),g:Math.round(d*255),b:Math.round(h*255)}};let mL=class{constructor(t={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this.enableAlpha=!1,this.format="hex",this.value="";for(const r in t)J7(t,r)&&(this[r]=t[r]);t.value?this.fromString(t.value):this.doOnChange()}set(t,r){if(arguments.length===1&&typeof t=="object"){for(const n in t)J7(t,n)&&this.set(n,t[n]);return}this[`_${t}`]=r,this.doOnChange()}get(t){return t==="alpha"?Math.floor(this[`_${t}`]):this[`_${t}`]}toRgb(){return fL(this._hue,this._saturation,this._value)}fromString(t){if(!t){this._hue=0,this._saturation=100,this._value=100,this.doOnChange();return}const r=(n,i,o)=>{this._hue=Math.max(0,Math.min(360,n)),this._saturation=Math.max(0,Math.min(100,i)),this._value=Math.max(0,Math.min(100,o)),this.doOnChange()};if(t.includes("hsl")){const n=t.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));if(n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3){const{h:i,s:o,v:s}=JQt(n[0],n[1],n[2]);r(i,o,s)}}else if(t.includes("hsv")){const n=t.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3&&r(n[0],n[1],n[2])}else if(t.includes("rgb")){const n=t.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));if(n.length===4?this._alpha=Number.parseFloat(n[3])*100:n.length===3&&(this._alpha=100),n.length>=3){const{h:i,s:o,v:s}=y7e(n[0],n[1],n[2]);r(i,o,s)}}else if(t.includes("#")){const n=t.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(n))return;let i,o,s;n.length===3?(i=lg(n[0]+n[0]),o=lg(n[1]+n[1]),s=lg(n[2]+n[2])):(n.length===6||n.length===8)&&(i=lg(n.slice(0,2)),o=lg(n.slice(2,4)),s=lg(n.slice(4,6))),n.length===8?this._alpha=lg(n.slice(6))/255*100:(n.length===3||n.length===6)&&(this._alpha=100);const{h:l,s:c,v:u}=y7e(i,o,s);r(l,c,u)}}compare(t){return Math.abs(t._hue-this._hue)<2&&Math.abs(t._saturation-this._saturation)<1&&Math.abs(t._value-this._value)<1&&Math.abs(t._alpha-this._alpha)<1}doOnChange(){const{_hue:t,_saturation:r,_value:n,_alpha:i,format:o}=this;if(this.enableAlpha)switch(o){case"hsl":{const s=f7e(t,r/100,n/100);this.value=`hsla(${t}, ${Math.round(s[1]*100)}%, ${Math.round(s[2]*100)}%, ${this.get("alpha")/100})`;break}case"hsv":{this.value=`hsva(${t}, ${Math.round(r)}%, ${Math.round(n)}%, ${this.get("alpha")/100})`;break}case"hex":{this.value=`${g7e(fL(t,r,n))}${TI(i*255/100)}`;break}default:{const{r:s,g:l,b:c}=fL(t,r,n);this.value=`rgba(${s}, ${l}, ${c}, ${this.get("alpha")/100})`}}else switch(o){case"hsl":{const s=f7e(t,r/100,n/100);this.value=`hsl(${t}, ${Math.round(s[1]*100)}%, ${Math.round(s[2]*100)}%)`;break}case"hsv":{this.value=`hsv(${t}, ${Math.round(r)}%, ${Math.round(n)}%)`;break}case"rgb":{const{r:s,g:l,b:c}=fL(t,r,n);this.value=`rgb(${s}, ${l}, ${c})`;break}default:this.value=g7e(fL(t,r,n))}}};const $Qt=a.defineComponent({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0}},setup(e){const t=xi("color-predefine"),{currentColor:r}=a.inject(p7e),n=a.ref(o(e.colors,e.color));a.watch(()=>r.value,s=>{const l=new mL;l.fromString(s),n.value.forEach(c=>{c.selected=l.compare(c)})}),a.watchEffect(()=>{n.value=o(e.colors,e.color)});function i(s){e.color.fromString(e.colors[s])}function o(s,l){return s.map(c=>{const u=new mL;return u.enableAlpha=!0,u.format="rgba",u.fromString(c),u.selected=u.value===l.value,u})}return{rgbaColors:n,handleSelect:i,ns:t}}}),ext=["onClick"];function txt(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(e.ns.b())},[a.createElementVNode("div",{class:a.normalizeClass(e.ns.e("colors"))},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.rgbaColors,(s,l)=>(a.openBlock(),a.createElementBlock("div",{key:e.colors[l],class:a.normalizeClass([e.ns.e("color-selector"),e.ns.is("alpha",s._alpha<100),{selected:s.selected}]),onClick:c=>e.handleSelect(l)},[a.createElementVNode("div",{style:a.normalizeStyle({backgroundColor:s.value})},null,4)],10,ext))),128))],2)],2)}var rxt=wi($Qt,[["render",txt],["__file","predefine.vue"]]);const nxt=a.defineComponent({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(e){const t=xi("color-svpanel"),r=a.getCurrentInstance(),n=a.ref(0),i=a.ref(0),o=a.ref("hsl(0, 100%, 50%)"),s=a.computed(()=>{const u=e.color.get("hue"),d=e.color.get("value");return{hue:u,value:d}});function l(){const u=e.color.get("saturation"),d=e.color.get("value"),h=r.vnode.el,{clientWidth:p,clientHeight:f}=h;i.value=u*p/100,n.value=(100-d)*f/100,o.value=`hsl(${e.color.get("hue")}, 100%, 50%)`}function c(u){const d=r.vnode.el.getBoundingClientRect(),{clientX:h,clientY:p}=gX(u);let f=h-d.left,m=p-d.top;f=Math.max(0,f),f=Math.min(f,d.width),m=Math.max(0,m),m=Math.min(m,d.height),i.value=f,n.value=m,e.color.set({saturation:f/d.width*100,value:100-m/d.height*100})}return a.watch(()=>s.value,()=>{l()}),a.onMounted(()=>{pL(r.vnode.el,{drag:u=>{c(u)},end:u=>{c(u)}}),l()}),{cursorTop:n,cursorLeft:i,background:o,colorValue:s,handleDrag:c,update:l,ns:t}}}),ixt=a.createElementVNode("div",null,null,-1),oxt=[ixt];function axt(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(e.ns.b()),style:a.normalizeStyle({backgroundColor:e.background})},[a.createElementVNode("div",{class:a.normalizeClass(e.ns.e("white"))},null,2),a.createElementVNode("div",{class:a.normalizeClass(e.ns.e("black"))},null,2),a.createElementVNode("div",{class:a.normalizeClass(e.ns.e("cursor")),style:a.normalizeStyle({top:e.cursorTop+"px",left:e.cursorLeft+"px"})},oxt,6)],6)}var sxt=wi(nxt,[["render",axt],["__file","sv-panel.vue"]]);const lxt=["onKeydown"],cxt=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"],uxt=a.defineComponent({name:"ElColorPicker"}),dxt=a.defineComponent({...uxt,props:ZQt,emits:XQt,setup(e,{expose:t,emit:r}){const n=e,{t:i}=tL(),o=xi("color"),{formItem:s}=U5(),l=j5(),c=WT(),{inputId:u,isLabeledByFormItem:d}=qT(n,{formItemContext:s}),h=a.ref(),p=a.ref(),f=a.ref(),m=a.ref(),g=a.ref(),T=a.ref(),{isFocused:y,handleFocus:v,handleBlur:_}=JX(g,{beforeBlur(ie){var Te;return(Te=m.value)==null?void 0:Te.isFocusInsideContent(ie)},afterBlur(){G(!1),U()}}),b=ie=>{if(c.value)return de();v(ie)};let L=!0;const w=a.reactive(new mL({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue})),M=a.ref(!1),C=a.ref(!1),A=a.ref(""),O=a.computed(()=>!n.modelValue&&!C.value?"transparent":j(w,n.showAlpha)),V=a.computed(()=>!n.modelValue&&!C.value?"":w.value),H=a.computed(()=>d.value?void 0:n.label||i("el.colorpicker.defaultLabel")),N=a.computed(()=>d.value?s==null?void 0:s.labelId:void 0),D=a.computed(()=>[o.b("picker"),o.is("disabled",c.value),o.bm("picker",l.value),o.is("focused",y.value)]);function j(ie,Te){if(!(ie instanceof mL))throw new TypeError("color should be instance of _color Class");const{r:Se,g:Ie,b:Ge}=ie.toRgb();return Te?`rgba(${Se}, ${Ie}, ${Ge}, ${ie.get("alpha")/100})`:`rgb(${Se}, ${Ie}, ${Ge})`}function G(ie){M.value=ie}const R=vme(G,100,{leading:!0});function Z(){c.value||G(!0)}function X(){R(!1),U()}function U(){a.nextTick(()=>{n.modelValue?w.fromString(n.modelValue):(w.value="",a.nextTick(()=>{C.value=!1}))})}function K(){c.value||R(!M.value)}function $(){w.fromString(A.value)}function le(){const ie=w.value;r(vs,ie),r("change",ie),n.validateEvent&&(s==null||s.validate("change").catch(Te=>Bl(Te))),R(!1),a.nextTick(()=>{const Te=new mL({enableAlpha:n.showAlpha,format:n.colorFormat||"",value:n.modelValue});w.compare(Te)||U()})}function me(){R(!1),r(vs,null),r("change",null),n.modelValue!==null&&n.validateEvent&&(s==null||s.validate("change").catch(ie=>Bl(ie))),U()}function ge(ie){if(M.value&&(X(),y.value)){const Te=new FocusEvent("focus",ie);_(Te)}}function ae(ie){ie.preventDefault(),ie.stopPropagation(),G(!1),U()}function Qe(ie){switch(ie.code){case iu.enter:case iu.space:ie.preventDefault(),ie.stopPropagation(),Z(),T.value.focus();break;case iu.esc:ae(ie);break}}function ne(){g.value.focus()}function de(){g.value.blur()}return a.onMounted(()=>{n.modelValue&&(A.value=V.value)}),a.watch(()=>n.modelValue,ie=>{ie?ie&&ie!==w.value&&(L=!1,w.fromString(ie)):C.value=!1}),a.watch(()=>V.value,ie=>{A.value=ie,L&&r("activeChange",ie),L=!0}),a.watch(()=>w.value,()=>{!n.modelValue&&!C.value&&(C.value=!0)}),a.watch(()=>M.value,()=>{a.nextTick(()=>{var ie,Te,Se;(ie=h.value)==null||ie.update(),(Te=p.value)==null||Te.update(),(Se=f.value)==null||Se.update()})}),a.provide(p7e,{currentColor:V}),t({color:w,show:Z,hide:X,focus:ne,blur:de}),(ie,Te)=>(a.openBlock(),a.createBlock(a.unref(lK),{ref_key:"popper",ref:m,visible:M.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[a.unref(o).be("picker","panel"),a.unref(o).b("dropdown"),ie.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",transition:`${a.unref(o).namespace.value}-zoom-in-top`,persistent:"",onHide:Te[2]||(Te[2]=Se=>G(!1))},{content:a.withCtx(()=>[a.withDirectives((a.openBlock(),a.createElementBlock("div",{onKeydown:a.withKeys(ae,["esc"])},[a.createElementVNode("div",{class:a.normalizeClass(a.unref(o).be("dropdown","main-wrapper"))},[a.createVNode(qQt,{ref_key:"hue",ref:h,class:"hue-slider",color:a.unref(w),vertical:""},null,8,["color"]),a.createVNode(sxt,{ref_key:"sv",ref:p,color:a.unref(w)},null,8,["color"])],2),ie.showAlpha?(a.openBlock(),a.createBlock(UQt,{key:0,ref_key:"alpha",ref:f,color:a.unref(w)},null,8,["color"])):a.createCommentVNode("v-if",!0),ie.predefine?(a.openBlock(),a.createBlock(rxt,{key:1,ref:"predefine",color:a.unref(w),colors:ie.predefine},null,8,["color","colors"])):a.createCommentVNode("v-if",!0),a.createElementVNode("div",{class:a.normalizeClass(a.unref(o).be("dropdown","btns"))},[a.createElementVNode("span",{class:a.normalizeClass(a.unref(o).be("dropdown","value"))},[a.createVNode(a.unref(cI),{ref_key:"inputRef",ref:T,modelValue:A.value,"onUpdate:modelValue":Te[0]||(Te[0]=Se=>A.value=Se),"validate-event":!1,size:"small",onKeyup:a.withKeys($,["enter"]),onBlur:$},null,8,["modelValue","onKeyup"])],2),a.createVNode(a.unref(l3),{class:a.normalizeClass(a.unref(o).be("dropdown","link-btn")),text:"",size:"small",onClick:me},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(a.unref(i)("el.colorpicker.clear")),1)]),_:1},8,["class"]),a.createVNode(a.unref(l3),{plain:"",size:"small",class:a.normalizeClass(a.unref(o).be("dropdown","btn")),onClick:le},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(a.unref(i)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,lxt)),[[a.unref(K8e),ge]])]),default:a.withCtx(()=>[a.createElementVNode("div",{id:a.unref(u),ref_key:"triggerRef",ref:g,class:a.normalizeClass(a.unref(D)),role:"button","aria-label":a.unref(H),"aria-labelledby":a.unref(N),"aria-description":a.unref(i)("el.colorpicker.description",{color:ie.modelValue||""}),"aria-disabled":a.unref(c),tabindex:a.unref(c)?-1:ie.tabindex,onKeydown:Qe,onFocus:b,onBlur:Te[1]||(Te[1]=(...Se)=>a.unref(_)&&a.unref(_)(...Se))},[a.unref(c)?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(a.unref(o).be("picker","mask"))},null,2)):a.createCommentVNode("v-if",!0),a.createElementVNode("div",{class:a.normalizeClass(a.unref(o).be("picker","trigger")),onClick:K},[a.createElementVNode("span",{class:a.normalizeClass([a.unref(o).be("picker","color"),a.unref(o).is("alpha",ie.showAlpha)])},[a.createElementVNode("span",{class:a.normalizeClass(a.unref(o).be("picker","color-inner")),style:a.normalizeStyle({backgroundColor:a.unref(O)})},[a.withDirectives(a.createVNode(a.unref(Fl),{class:a.normalizeClass([a.unref(o).be("picker","icon"),a.unref(o).is("icon-arrow-down")])},{default:a.withCtx(()=>[a.createVNode(a.unref(F5))]),_:1},8,["class"]),[[a.vShow,ie.modelValue||C.value]]),a.withDirectives(a.createVNode(a.unref(Fl),{class:a.normalizeClass([a.unref(o).be("picker","empty"),a.unref(o).is("icon-close")])},{default:a.withCtx(()=>[a.createVNode(a.unref(NT))]),_:1},8,["class"]),[[a.vShow,!ie.modelValue&&!C.value]])],6)],2)],2)],42,cxt)]),_:1},8,["visible","popper-class","transition"]))}});var hxt=wi(dxt,[["__file","color-picker.vue"]]);const pxt=F1(hxt),fxt=a.defineComponent({name:"ElContainer"}),mxt=a.defineComponent({...fxt,props:{direction:{type:String}},setup(e){const t=e,r=a.useSlots(),n=xi("container"),i=a.computed(()=>t.direction==="vertical"?!0:t.direction==="horizontal"?!1:r&&r.default?r.default().some(o=>{const s=o.type.name;return s==="ElHeader"||s==="ElFooter"}):!1);return(o,s)=>(a.openBlock(),a.createElementBlock("section",{class:a.normalizeClass([a.unref(n).b(),a.unref(n).is("vertical",a.unref(i))])},[a.renderSlot(o.$slots,"default")],2))}});var gxt=wi(mxt,[["__file","container.vue"]]);const yxt=a.defineComponent({name:"ElAside"}),Txt=a.defineComponent({...yxt,props:{width:{type:String,default:null}},setup(e){const t=e,r=xi("aside"),n=a.computed(()=>t.width?r.cssVarBlock({width:t.width}):{});return(i,o)=>(a.openBlock(),a.createElementBlock("aside",{class:a.normalizeClass(a.unref(r).b()),style:a.normalizeStyle(a.unref(n))},[a.renderSlot(i.$slots,"default")],6))}});var T7e=wi(Txt,[["__file","aside.vue"]]);const vxt=a.defineComponent({name:"ElFooter"}),bxt=a.defineComponent({...vxt,props:{height:{type:String,default:null}},setup(e){const t=e,r=xi("footer"),n=a.computed(()=>t.height?r.cssVarBlock({height:t.height}):{});return(i,o)=>(a.openBlock(),a.createElementBlock("footer",{class:a.normalizeClass(a.unref(r).b()),style:a.normalizeStyle(a.unref(n))},[a.renderSlot(i.$slots,"default")],6))}});var v7e=wi(bxt,[["__file","footer.vue"]]);const Qxt=a.defineComponent({name:"ElHeader"}),xxt=a.defineComponent({...Qxt,props:{height:{type:String,default:null}},setup(e){const t=e,r=xi("header"),n=a.computed(()=>t.height?r.cssVarBlock({height:t.height}):{});return(i,o)=>(a.openBlock(),a.createElementBlock("header",{class:a.normalizeClass(a.unref(r).b()),style:a.normalizeStyle(a.unref(n))},[a.renderSlot(i.$slots,"default")],6))}});var b7e=wi(xxt,[["__file","header.vue"]]);const _xt=a.defineComponent({name:"ElMain"}),wxt=a.defineComponent({..._xt,setup(e){const t=xi("main");return(r,n)=>(a.openBlock(),a.createElementBlock("main",{class:a.normalizeClass(a.unref(t).b())},[a.renderSlot(r.$slots,"default")],2))}});var Q7e=wi(wxt,[["__file","main.vue"]]);const Lxt=F1(gxt,{Aside:T7e,Footer:v7e,Header:b7e,Main:Q7e});i3(T7e),i3(v7e),i3(b7e);const x7e=i3(Q7e),Sxt=Lo({mask:{type:Boolean,default:!0},customMaskEvent:{type:Boolean,default:!1},overlayClass:{type:di([String,Array,Object])},zIndex:{type:di([String,Number])}}),Mxt={click:e=>e instanceof MouseEvent},kxt="overlay";var Cxt=a.defineComponent({name:"ElOverlay",props:Sxt,emits:Mxt,setup(e,{slots:t,emit:r}){const n=xi(kxt),i=c=>{r("click",c)},{onClick:o,onMousedown:s,onMouseup:l}=c8e(e.customMaskEvent?void 0:i);return()=>e.mask?a.createVNode("div",{class:[n.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:o,onMousedown:s,onMouseup:l},[a.renderSlot(t,"default")],eI.STYLE|eI.CLASS|eI.PROPS,["onClick","onMouseup","onMousedown"]):a.h("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[a.renderSlot(t,"default")])}});const Ext=Cxt,_7e=Symbol("dialogInjectionKey"),w7e=Lo({center:Boolean,alignCenter:Boolean,closeIcon:{type:sf},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),Axt={close:()=>!0},Oxt=["aria-level"],Pxt=["aria-label"],Ixt=["id"],Hxt=a.defineComponent({name:"ElDialogContent"}),Vxt=a.defineComponent({...Hxt,props:w7e,emits:Axt,setup(e){const t=e,{t:r}=tL(),{Close:n}=q9t,{dialogRef:i,headerRef:o,bodyId:s,ns:l,style:c}=a.inject(_7e),{focusTrapRef:u}=a.inject(P8e),d=a.computed(()=>[l.b(),l.is("fullscreen",t.fullscreen),l.is("draggable",t.draggable),l.is("align-center",t.alignCenter),{[l.m("center")]:t.center}]),h=X9t(u,i),p=a.computed(()=>t.draggable),f=a.computed(()=>t.overflow);return $9t(i,o,p,f),(m,g)=>(a.openBlock(),a.createElementBlock("div",{ref:a.unref(h),class:a.normalizeClass(a.unref(d)),style:a.normalizeStyle(a.unref(c)),tabindex:"-1"},[a.createElementVNode("header",{ref_key:"headerRef",ref:o,class:a.normalizeClass([a.unref(l).e("header"),{"show-close":m.showClose}])},[a.renderSlot(m.$slots,"header",{},()=>[a.createElementVNode("span",{role:"heading","aria-level":m.ariaLevel,class:a.normalizeClass(a.unref(l).e("title"))},a.toDisplayString(m.title),11,Oxt)]),m.showClose?(a.openBlock(),a.createElementBlock("button",{key:0,"aria-label":a.unref(r)("el.dialog.close"),class:a.normalizeClass(a.unref(l).e("headerbtn")),type:"button",onClick:g[0]||(g[0]=T=>m.$emit("close"))},[a.createVNode(a.unref(Fl),{class:a.normalizeClass(a.unref(l).e("close"))},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(m.closeIcon||a.unref(n))))]),_:1},8,["class"])],10,Pxt)):a.createCommentVNode("v-if",!0)],2),a.createElementVNode("div",{id:a.unref(s),class:a.normalizeClass(a.unref(l).e("body"))},[a.renderSlot(m.$slots,"default")],10,Ixt),m.$slots.footer?(a.openBlock(),a.createElementBlock("footer",{key:0,class:a.normalizeClass(a.unref(l).e("footer"))},[a.renderSlot(m.$slots,"footer")],2)):a.createCommentVNode("v-if",!0)],6))}});var Rxt=wi(Vxt,[["__file","dialog-content.vue"]]);const Nxt=Lo({...w7e,appendToBody:Boolean,appendTo:{type:di(String),default:"body"},beforeClose:{type:di(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"}}),Bxt={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[vs]:e=>of(e),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},Fxt=(e,t)=>{var r;const n=a.getCurrentInstance().emit,{nextZIndex:i}=YX();let o="";const s=ag(),l=ag(),c=a.ref(!1),u=a.ref(!1),d=a.ref(!1),h=a.ref((r=e.zIndex)!=null?r:i());let p,f;const m=lI("namespace",nL),g=a.computed(()=>{const D={},j=`--${m.value}-dialog`;return e.fullscreen||(e.top&&(D[`${j}-margin-top`]=e.top),e.width&&(D[`${j}-width`]=af(e.width))),D}),T=a.computed(()=>e.alignCenter?{display:"flex"}:{});function y(){n("opened")}function v(){n("closed"),n(vs,!1),e.destroyOnClose&&(d.value=!1)}function _(){n("close")}function b(){f==null||f(),p==null||p(),e.openDelay&&e.openDelay>0?{stop:p}=v5e(()=>C(),e.openDelay):C()}function L(){p==null||p(),f==null||f(),e.closeDelay&&e.closeDelay>0?{stop:f}=v5e(()=>A(),e.closeDelay):A()}function w(){function D(j){j||(u.value=!0,c.value=!1)}e.beforeClose?e.beforeClose(D):L()}function M(){e.closeOnClickModal&&w()}function C(){Ts&&(c.value=!0)}function A(){c.value=!1}function O(){n("openAutoFocus")}function V(){n("closeAutoFocus")}function H(D){var j;((j=D.detail)==null?void 0:j.focusReason)==="pointer"&&D.preventDefault()}e.lockScroll&&vyt(c);function N(){e.closeOnPressEscape&&w()}return a.watch(()=>e.modelValue,D=>{D?(u.value=!1,b(),d.value=!0,h.value=bme(e.zIndex)?i():h.value++,a.nextTick(()=>{n("open"),t.value&&(t.value.scrollTop=0)})):c.value&&L()}),a.watch(()=>e.fullscreen,D=>{t.value&&(D?(o=t.value.style.transform,t.value.style.transform=""):t.value.style.transform=o)}),a.onMounted(()=>{e.modelValue&&(c.value=!0,d.value=!0,b())}),{afterEnter:y,afterLeave:v,beforeLeave:_,handleClose:w,onModalClick:M,close:L,doClose:A,onOpenAutoFocus:O,onCloseAutoFocus:V,onCloseRequested:N,onFocusoutPrevented:H,titleId:s,bodyId:l,closed:u,style:g,overlayDialogStyle:T,rendered:d,visible:c,zIndex:h}},Dxt=["aria-label","aria-labelledby","aria-describedby"],zxt=a.defineComponent({name:"ElDialog",inheritAttrs:!1}),jxt=a.defineComponent({...zxt,props:Nxt,emits:Bxt,setup(e,{expose:t}){const r=e,n=a.useSlots();VX({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"},a.computed(()=>!!n.title));const i=xi("dialog"),o=a.ref(),s=a.ref(),l=a.ref(),{visible:c,titleId:u,bodyId:d,style:h,overlayDialogStyle:p,rendered:f,zIndex:m,afterEnter:g,afterLeave:T,beforeLeave:y,handleClose:v,onModalClick:_,onOpenAutoFocus:b,onCloseAutoFocus:L,onCloseRequested:w,onFocusoutPrevented:M}=Fxt(r,o);a.provide(_7e,{dialogRef:o,headerRef:s,bodyId:d,ns:i,rendered:f,style:h});const C=c8e(_),A=a.computed(()=>r.draggable&&!r.fullscreen);return t({visible:c,dialogContentRef:l}),(O,V)=>(a.openBlock(),a.createBlock(a.Teleport,{to:O.appendTo,disabled:O.appendTo!=="body"?!1:!O.appendToBody},[a.createVNode(a.Transition,{name:"dialog-fade",onAfterEnter:a.unref(g),onAfterLeave:a.unref(T),onBeforeLeave:a.unref(y),persisted:""},{default:a.withCtx(()=>[a.withDirectives(a.createVNode(a.unref(Ext),{"custom-mask-event":"",mask:O.modal,"overlay-class":O.modalClass,"z-index":a.unref(m)},{default:a.withCtx(()=>[a.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":O.title||void 0,"aria-labelledby":O.title?void 0:a.unref(u),"aria-describedby":a.unref(d),class:a.normalizeClass(`${a.unref(i).namespace.value}-overlay-dialog`),style:a.normalizeStyle(a.unref(p)),onClick:V[0]||(V[0]=(...H)=>a.unref(C).onClick&&a.unref(C).onClick(...H)),onMousedown:V[1]||(V[1]=(...H)=>a.unref(C).onMousedown&&a.unref(C).onMousedown(...H)),onMouseup:V[2]||(V[2]=(...H)=>a.unref(C).onMouseup&&a.unref(C).onMouseup(...H))},[a.createVNode(a.unref(B8e),{loop:"",trapped:a.unref(c),"focus-start-el":"container",onFocusAfterTrapped:a.unref(b),onFocusAfterReleased:a.unref(L),onFocusoutPrevented:a.unref(M),onReleaseRequested:a.unref(w)},{default:a.withCtx(()=>[a.unref(f)?(a.openBlock(),a.createBlock(Rxt,a.mergeProps({key:0,ref_key:"dialogContentRef",ref:l},O.$attrs,{center:O.center,"align-center":O.alignCenter,"close-icon":O.closeIcon,draggable:a.unref(A),overflow:O.overflow,fullscreen:O.fullscreen,"show-close":O.showClose,title:O.title,"aria-level":O.headerAriaLevel,onClose:a.unref(v)}),a.createSlots({header:a.withCtx(()=>[O.$slots.title?a.renderSlot(O.$slots,"title",{key:1}):a.renderSlot(O.$slots,"header",{key:0,close:a.unref(v),titleId:a.unref(u),titleClass:a.unref(i).e("title")})]),default:a.withCtx(()=>[a.renderSlot(O.$slots,"default")]),_:2},[O.$slots.footer?{name:"footer",fn:a.withCtx(()=>[a.renderSlot(O.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):a.createCommentVNode("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,Dxt)]),_:3},8,["mask","overlay-class","z-index"]),[[a.vShow,a.unref(c)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])],8,["to","disabled"]))}});var Uxt=wi(jxt,[["__file","dialog.vue"]]);const Gxt=F1(Uxt),Wxt=a.defineComponent({inheritAttrs:!1});function qxt(e,t,r,n,i,o){return a.renderSlot(e.$slots,"default")}var Zxt=wi(Wxt,[["render",qxt],["__file","collection.vue"]]);const Xxt=a.defineComponent({name:"ElCollectionItem",inheritAttrs:!1});function Kxt(e,t,r,n,i,o){return a.renderSlot(e.$slots,"default")}var Yxt=wi(Xxt,[["render",Kxt],["__file","collection-item.vue"]]);const Jxt="data-el-collection-item",$xt=e=>{const t=`El${e}Collection`,r=`${t}Item`,n=Symbol(t),i=Symbol(r),o={...Zxt,name:t,setup(){const l=a.ref(null),c=new Map;a.provide(n,{itemMap:c,getItems:()=>{const u=a.unref(l);if(!u)return[];const d=Array.from(u.querySelectorAll(`[${Jxt}]`));return[...c.values()].sort((h,p)=>d.indexOf(h.ref)-d.indexOf(p.ref))},collectionRef:l})}},s={...Yxt,name:r,setup(l,{attrs:c}){const u=a.ref(null),d=a.inject(n,void 0);a.provide(i,{collectionItemRef:u}),a.onMounted(()=>{const h=a.unref(u);h&&d.itemMap.set(h,{ref:h,...c})}),a.onBeforeUnmount(()=>{const h=a.unref(u);d.itemMap.delete(h)})}};return{COLLECTION_INJECTION_KEY:n,COLLECTION_ITEM_INJECTION_KEY:i,ElCollection:o,ElCollectionItem:s}},yK=Lo({trigger:hL.trigger,effect:{...R0.effect,default:"light"},type:{type:di(String)},placement:{type:di(String),default:"bottom"},popperOptions:{type:di(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:di([Number,String]),default:0},maxHeight:{type:di([Number,String]),default:""},popperClass:{type:String,default:""},disabled:{type:Boolean,default:!1},role:{type:String,default:"menu"},buttonProps:{type:di(Object)},teleported:R0.teleported});Lo({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:sf}}),Lo({onKeydown:{type:di(Function)}}),$xt("Dropdown");const L7e=Symbol("ElSelectGroup"),vI=Symbol("ElSelect");function e_t(e,t){const r=a.inject(vI),n=a.inject(L7e,{disabled:!1}),i=a.computed(()=>r.props.multiple?d(r.props.modelValue,e.value):d([r.props.modelValue],e.value)),o=a.computed(()=>{if(r.props.multiple){const f=r.props.modelValue||[];return!i.value&&f.length>=r.props.multipleLimit&&r.props.multipleLimit>0}else return!1}),s=a.computed(()=>e.label||(B1(e.value)?"":e.value)),l=a.computed(()=>e.value||e.label||""),c=a.computed(()=>e.disabled||t.groupDisabled||o.value),u=a.getCurrentInstance(),d=(f=[],m)=>{if(B1(e.value)){const g=r.props.valueKey;return f&&f.some(T=>a.toRaw(rf(T,g))===rf(m,g))}else return f&&f.includes(m)},h=()=>{!e.disabled&&!n.disabled&&(r.states.hoveringIndex=r.optionsArray.indexOf(u.proxy))},p=f=>{const m=new RegExp(v9t(f),"i");t.visible=m.test(s.value)||e.created};return a.watch(()=>s.value,()=>{!e.created&&!r.props.remote&&r.setSelected()}),a.watch(()=>e.value,(f,m)=>{const{remote:g,valueKey:T}=r.props;if(Jw(f,m)||(r.onOptionDestroy(m,u.proxy),r.onOptionCreate(u.proxy)),!e.created&&!g){if(T&&B1(f)&&B1(m)&&f[T]===m[T])return;r.setSelected()}}),a.watch(()=>n.disabled,()=>{t.groupDisabled=n.disabled},{immediate:!0}),{select:r,currentLabel:s,currentValue:l,itemSelected:i,isDisabled:c,hoverItem:h,updateOption:p}}const t_t=a.defineComponent({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(e){const t=xi("select"),r=ag(),n=a.computed(()=>[t.be("dropdown","item"),t.is("disabled",a.unref(l)),t.is("selected",a.unref(s)),t.is("hovering",a.unref(p))]),i=a.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:o,itemSelected:s,isDisabled:l,select:c,hoverItem:u,updateOption:d}=e_t(e,i),{visible:h,hover:p}=a.toRefs(i),f=a.getCurrentInstance().proxy;c.onOptionCreate(f),a.onBeforeUnmount(()=>{const g=f.value,{selected:T}=c.states,y=(c.props.multiple?T:[T]).some(v=>v.value===f.value);a.nextTick(()=>{c.states.cachedOptions.get(g)===f&&!y&&c.states.cachedOptions.delete(g)}),c.onOptionDestroy(g,f)});function m(){e.disabled!==!0&&i.groupDisabled!==!0&&c.handleOptionSelect(f)}return{ns:t,id:r,containerKls:n,currentLabel:o,itemSelected:s,isDisabled:l,select:c,hoverItem:u,updateOption:d,visible:h,hover:p,selectOptionClick:m,states:i}}}),r_t=["id","aria-disabled","aria-selected"];function n_t(e,t,r,n,i,o){return a.withDirectives((a.openBlock(),a.createElementBlock("li",{id:e.id,class:a.normalizeClass(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMouseenter:t[0]||(t[0]=(...s)=>e.hoverItem&&e.hoverItem(...s)),onClick:t[1]||(t[1]=a.withModifiers((...s)=>e.selectOptionClick&&e.selectOptionClick(...s),["stop"]))},[a.renderSlot(e.$slots,"default",{},()=>[a.createElementVNode("span",null,a.toDisplayString(e.currentLabel),1)])],42,r_t)),[[a.vShow,e.visible]])}var TK=wi(t_t,[["render",n_t],["__file","option.vue"]]);const i_t=a.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=a.inject(vI),t=xi("select"),r=a.computed(()=>e.props.popperClass),n=a.computed(()=>e.props.multiple),i=a.computed(()=>e.props.fitInputWidth),o=a.ref("");function s(){var l;o.value=`${(l=e.selectRef)==null?void 0:l.offsetWidth}px`}return a.onMounted(()=>{s(),J4(e.selectRef,s)}),{ns:t,minWidth:o,popperClass:r,isMultiple:n,isFitInputWidth:i}}});function o_t(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:a.normalizeStyle({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(e.ns.be("dropdown","header"))},[a.renderSlot(e.$slots,"header")],2)):a.createCommentVNode("v-if",!0),a.renderSlot(e.$slots,"default"),e.$slots.footer?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(e.ns.be("dropdown","footer"))},[a.renderSlot(e.$slots,"footer")],2)):a.createCommentVNode("v-if",!0)],6)}var a_t=wi(i_t,[["render",o_t],["__file","select-dropdown.vue"]]);function s_t(e){const t=a.ref(!1);return{handleCompositionStart:()=>{t.value=!0},handleCompositionUpdate:r=>{const n=r.target.value,i=n[n.length-1]||"";t.value=!Pme(i)},handleCompositionEnd:r=>{t.value&&(t.value=!1,Bu(e)&&e(r))}}}const l_t=11,c_t=(e,t)=>{const{t:r}=tL(),n=ag(),i=xi("select"),o=xi("input"),s=a.reactive({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:e.multiple?[]:{},selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1});VX({from:"suffixTransition",replacement:"override style scheme",version:"2.3.0",scope:"props",ref:"https://element-plus.org/en-US/component/select.html#select-attributes"},a.computed(()=>e.suffixTransition===!1));const l=a.ref(null),c=a.ref(null),u=a.ref(null),d=a.ref(null),h=a.ref(null),p=a.ref(null),f=a.ref(null),m=a.ref(null),g=a.ref(null),T=a.ref(null),y=a.ref(null),v=a.ref(null),{wrapperRef:_,isFocused:b,handleFocus:L,handleBlur:w}=JX(h,{afterFocus(){e.automaticDropdown&&!M.value&&(M.value=!0,s.menuVisibleOnFocus=!0)},beforeBlur(oe){var Le,Xe;return((Le=u.value)==null?void 0:Le.isFocusInsideContent(oe))||((Xe=d.value)==null?void 0:Xe.isFocusInsideContent(oe))},afterBlur(){M.value=!1,s.menuVisibleOnFocus=!1}}),M=a.ref(!1),C=a.ref(),{form:A,formItem:O}=U5(),{inputId:V}=qT(e,{formItemContext:O}),H=a.computed(()=>e.disabled||(A==null?void 0:A.disabled)),N=a.computed(()=>e.multiple?Qc(e.modelValue)&&e.modelValue.length>0:e.modelValue!==void 0&&e.modelValue!==null&&e.modelValue!==""),D=a.computed(()=>e.clearable&&!H.value&&s.inputHovering&&N.value),j=a.computed(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),G=a.computed(()=>i.is("reverse",j.value&&M.value&&e.suffixTransition)),R=a.computed(()=>(O==null?void 0:O.validateState)||""),Z=a.computed(()=>Ame[R.value]),X=a.computed(()=>e.remote?300:0),U=a.computed(()=>e.loading?e.loadingText||r("el.select.loading"):e.remote&&!s.inputValue&&s.options.size===0?!1:e.filterable&&s.inputValue&&s.options.size>0&&K.value===0?e.noMatchText||r("el.select.noMatch"):s.options.size===0?e.noDataText||r("el.select.noData"):null),K=a.computed(()=>$.value.filter(oe=>oe.visible).length),$=a.computed(()=>{const oe=Array.from(s.options.values()),Le=[];return s.optionValues.forEach(Xe=>{const _t=oe.findIndex(jt=>jt.value===Xe);_t>-1&&Le.push(oe[_t])}),Le.length>=oe.length?Le:oe}),le=a.computed(()=>Array.from(s.cachedOptions.values())),me=a.computed(()=>{const oe=$.value.filter(Le=>!Le.created).some(Le=>Le.currentLabel===s.inputValue);return e.filterable&&e.allowCreate&&s.inputValue!==""&&!oe}),ge=()=>{e.filterable&&Bu(e.filterMethod)||e.filterable&&e.remote&&Bu(e.remoteMethod)||$.value.forEach(oe=>{oe.updateOption(s.inputValue)})},ae=j5(),Qe=a.computed(()=>["small"].includes(ae.value)?"small":"default"),ne=a.computed({get(){return M.value&&U.value!==!1},set(oe){M.value=oe}}),de=a.computed(()=>Qc(e.modelValue)?e.modelValue.length===0&&!s.inputValue:e.filterable?!s.inputValue:!0),ie=a.computed(()=>{var oe;const Le=(oe=e.placeholder)!=null?oe:r("el.select.placeholder");return e.multiple||!N.value?Le:s.selectedLabel});a.watch(()=>e.modelValue,(oe,Le)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(s.inputValue="",Te("")),Ie(),!Jw(oe,Le)&&e.validateEvent&&(O==null||O.validate("change").catch(Xe=>Bl(Xe)))},{flush:"post",deep:!0}),a.watch(()=>M.value,oe=>{oe?Te(s.inputValue):(s.inputValue="",s.previousQuery=null,s.isBeforeHide=!0),t("visible-change",oe)}),a.watch(()=>s.options.entries(),()=>{var oe;if(!Ts)return;const Le=((oe=l.value)==null?void 0:oe.querySelectorAll("input"))||[];(!e.filterable&&!e.defaultFirstOption&&!$w(e.modelValue)||!Array.from(Le).includes(document.activeElement))&&Ie(),e.defaultFirstOption&&(e.filterable||e.remote)&&K.value&&Se()},{flush:"post"}),a.watch(()=>s.hoveringIndex,oe=>{Nl(oe)&&oe>-1?C.value=$.value[oe]||{}:C.value={},$.value.forEach(Le=>{Le.hover=C.value===Le})}),a.watchEffect(()=>{s.isBeforeHide||ge()});const Te=oe=>{s.previousQuery!==oe&&(s.previousQuery=oe,e.filterable&&Bu(e.filterMethod)?e.filterMethod(oe):e.filterable&&e.remote&&Bu(e.remoteMethod)&&e.remoteMethod(oe),e.defaultFirstOption&&(e.filterable||e.remote)&&K.value?a.nextTick(Se):a.nextTick(je))},Se=()=>{const oe=$.value.filter(_t=>_t.visible&&!_t.disabled&&!_t.states.groupDisabled),Le=oe.find(_t=>_t.created),Xe=oe[0];s.hoveringIndex=Gt($.value,Le||Xe)},Ie=()=>{if(e.multiple)s.selectedLabel="";else{const Le=Ge(e.modelValue);s.selectedLabel=Le.currentLabel,s.selected=Le;return}const oe=[];Qc(e.modelValue)&&e.modelValue.forEach(Le=>{oe.push(Ge(Le))}),s.selected=oe},Ge=oe=>{let Le;const Xe=yX(oe).toLowerCase()==="object",_t=yX(oe).toLowerCase()==="null",jt=yX(oe).toLowerCase()==="undefined";for(let pr=s.cachedOptions.size-1;pr>=0;pr--){const yr=le.value[pr];if(Xe?rf(yr.value,e.valueKey)===rf(oe,e.valueKey):yr.value===oe){Le={value:oe,currentLabel:yr.currentLabel,isDisabled:yr.isDisabled};break}}if(Le)return Le;const or=Xe?oe.label:!_t&&!jt?oe:"";return{value:oe,currentLabel:or}},je=()=>{e.multiple?s.selected.length>0?s.hoveringIndex=Math.min(...s.selected.map(oe=>$.value.findIndex(Le=>$e(Le)===$e(oe)))):s.hoveringIndex=-1:s.hoveringIndex=$.value.findIndex(oe=>$e(oe)===$e(s.selected))},rt=()=>{s.selectionWidth=c.value.getBoundingClientRect().width},Me=()=>{s.calculatorWidth=p.value.getBoundingClientRect().width},Be=()=>{s.collapseItemWidth=y.value.getBoundingClientRect().width},ut=()=>{var oe,Le;(Le=(oe=u.value)==null?void 0:oe.updatePopper)==null||Le.call(oe)},et=()=>{var oe,Le;(Le=(oe=d.value)==null?void 0:oe.updatePopper)==null||Le.call(oe)},yt=()=>{s.inputValue.length>0&&!M.value&&(M.value=!0),Te(s.inputValue)},At=oe=>{if(s.inputValue=oe.target.value,e.remote)vt();else return yt()},vt=vme(()=>{yt()},X.value),_e=oe=>{Jw(e.modelValue,oe)||t($P,oe)},qe=oe=>p9t(oe,Le=>!s.disabledOptions.has(Le)),at=oe=>{if(e.multiple&&oe.code!==iu.delete&&oe.target.value.length<=0){const Le=e.modelValue.slice(),Xe=qe(Le);if(Xe<0)return;Le.splice(Xe,1),t(vs,Le),_e(Le)}},ht=(oe,Le)=>{const Xe=s.selected.indexOf(Le);if(Xe>-1&&!H.value){const _t=e.modelValue.slice();_t.splice(Xe,1),t(vs,_t),_e(_t),t("remove-tag",Le.value)}oe.stopPropagation(),Ft()},zt=oe=>{oe.stopPropagation();const Le=e.multiple?[]:"";if(!Rl(Le))for(const Xe of s.selected)Xe.isDisabled&&Le.push(Xe.value);t(vs,Le),_e(Le),s.hoveringIndex=-1,M.value=!1,t("clear"),Ft()},wt=oe=>{if(e.multiple){const Le=(e.modelValue||[]).slice(),Xe=Gt(Le,oe.value);Xe>-1?Le.splice(Xe,1):(e.multipleLimit<=0||Le.length<e.multipleLimit)&&Le.push(oe.value),t(vs,Le),_e(Le),oe.created&&Te(""),e.filterable&&!e.reserveKeyword&&(s.inputValue="")}else t(vs,oe.value),_e(oe.value),M.value=!1;Ft(),!M.value&&a.nextTick(()=>{Zt(oe)})},Gt=(oe=[],Le)=>{if(!B1(Le))return oe.indexOf(Le);const Xe=e.valueKey;let _t=-1;return oe.some((jt,or)=>a.toRaw(rf(jt,Xe))===rf(Le,Xe)?(_t=or,!0):!1),_t},Zt=oe=>{var Le,Xe,_t,jt,or;const pr=Qc(oe)?oe[0]:oe;let yr=null;if(pr!=null&&pr.value){const ir=$.value.filter(Qr=>Qr.value===pr.value);ir.length>0&&(yr=ir[0].$el)}if(u.value&&yr){const ir=(jt=(_t=(Xe=(Le=u.value)==null?void 0:Le.popperRef)==null?void 0:Xe.contentRef)==null?void 0:_t.querySelector)==null?void 0:jt.call(_t,`.${i.be("dropdown","wrap")}`);ir&&x9t(ir,yr)}(or=v.value)==null||or.handleScroll()},Tt=oe=>{s.options.set(oe.value,oe),s.cachedOptions.set(oe.value,oe),oe.disabled&&s.disabledOptions.set(oe.value,oe)},Lt=(oe,Le)=>{s.options.get(oe)===Le&&s.options.delete(oe)},{handleCompositionStart:Qt,handleCompositionUpdate:Ut,handleCompositionEnd:Wt}=s_t(oe=>At(oe)),mr=a.computed(()=>{var oe,Le;return(Le=(oe=u.value)==null?void 0:oe.popperRef)==null?void 0:Le.contentRef}),pt=()=>{a.nextTick(()=>Zt(s.selected))},Ft=()=>{var oe;(oe=h.value)==null||oe.focus()},Nt=()=>{ot()},dr=oe=>{zt(oe)},ot=oe=>{if(M.value=!1,b.value){const Le=new FocusEvent("focus",oe);a.nextTick(()=>w(Le))}},Fe=()=>{s.inputValue.length>0?s.inputValue="":M.value=!1},ze=()=>{H.value||(s.menuVisibleOnFocus?s.menuVisibleOnFocus=!1:M.value=!M.value)},Ke=()=>{M.value?$.value[s.hoveringIndex]&&wt($.value[s.hoveringIndex]):ze()},$e=oe=>B1(oe.value)?rf(oe.value,e.valueKey):oe.value,St=a.computed(()=>$.value.filter(oe=>oe.visible).every(oe=>oe.disabled)),we=a.computed(()=>e.multiple?e.collapseTags?s.selected.slice(0,e.maxCollapseTags):s.selected:[]),De=a.computed(()=>e.multiple?e.collapseTags?s.selected.slice(e.maxCollapseTags):[]:[]),Ve=oe=>{if(!M.value){M.value=!0;return}if(!(s.options.size===0||K.value===0)&&!St.value){oe==="next"?(s.hoveringIndex++,s.hoveringIndex===s.options.size&&(s.hoveringIndex=0)):oe==="prev"&&(s.hoveringIndex--,s.hoveringIndex<0&&(s.hoveringIndex=s.options.size-1));const Le=$.value[s.hoveringIndex];(Le.disabled===!0||Le.states.groupDisabled===!0||!Le.visible)&&Ve(oe),a.nextTick(()=>Zt(C.value))}},Ae=()=>{if(!c.value)return 0;const oe=window.getComputedStyle(c.value);return Number.parseFloat(oe.gap||"6px")},ke=a.computed(()=>{const oe=Ae();return{maxWidth:`${y.value&&e.maxCollapseTags===1?s.selectionWidth-s.collapseItemWidth-oe:s.selectionWidth}px`}}),Ne=a.computed(()=>({maxWidth:`${s.selectionWidth}px`})),nt=a.computed(()=>({width:`${Math.max(s.calculatorWidth,l_t)}px`}));return e.multiple&&!Qc(e.modelValue)&&t(vs,[]),!e.multiple&&Qc(e.modelValue)&&t(vs,""),J4(c,rt),J4(p,Me),J4(g,ut),J4(_,ut),J4(T,et),J4(y,Be),a.onMounted(()=>{Ie()}),{inputId:V,contentId:n,nsSelect:i,nsInput:o,states:s,isFocused:b,expanded:M,optionsArray:$,hoverOption:C,selectSize:ae,filteredOptionsCount:K,resetCalculatorWidth:Me,updateTooltip:ut,updateTagTooltip:et,debouncedOnInputChange:vt,onInput:At,deletePrevTag:at,deleteTag:ht,deleteSelected:zt,handleOptionSelect:wt,scrollToOption:Zt,hasModelValue:N,shouldShowPlaceholder:de,currentPlaceholder:ie,showClose:D,iconComponent:j,iconReverse:G,validateState:R,validateIcon:Z,showNewOption:me,updateOptions:ge,collapseTagSize:Qe,setSelected:Ie,selectDisabled:H,emptyText:U,handleCompositionStart:Qt,handleCompositionUpdate:Ut,handleCompositionEnd:Wt,onOptionCreate:Tt,onOptionDestroy:Lt,handleMenuEnter:pt,handleFocus:L,focus:Ft,blur:Nt,handleBlur:w,handleClearClick:dr,handleClickOutside:ot,handleEsc:Fe,toggleMenu:ze,selectOption:Ke,getValueKey:$e,navigateOptions:Ve,dropdownMenuVisible:ne,showTagList:we,collapseTagList:De,tagStyle:ke,collapseTagStyle:Ne,inputStyle:nt,popperRef:mr,inputRef:h,tooltipRef:u,tagTooltipRef:d,calculatorRef:p,prefixRef:f,suffixRef:m,selectRef:l,wrapperRef:_,selectionRef:c,scrollbarRef:v,menuRef:g,tagMenuRef:T,collapseItemRef:y}};var u_t=a.defineComponent({name:"ElOptions",setup(e,{slots:t}){const r=a.inject(vI);let n=[];return()=>{var i,o;const s=(i=t.default)==null?void 0:i.call(t),l=[];function c(u){Qc(u)&&u.forEach(d=>{var h,p,f,m;const g=(h=(d==null?void 0:d.type)||{})==null?void 0:h.name;g==="ElOptionGroup"?c(!Rl(d.children)&&!Qc(d.children)&&Bu((p=d.children)==null?void 0:p.default)?(f=d.children)==null?void 0:f.default():d.children):g==="ElOption"?l.push((m=d.props)==null?void 0:m.value):Qc(d.children)&&c(d.children)})}return s.length&&c((o=s[0])==null?void 0:o.children),Jw(l,n)||(n=l,r&&(r.states.optionValues=l)),s}}});const d_t=Lo({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:z5,effect:{type:di(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:di(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:R0.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:sf,default:YP},fitInputWidth:Boolean,suffixIcon:{type:sf,default:F5},tagType:{...d7e.type,default:"info"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,suffixTransition:{type:Boolean,default:!0},placement:{type:di(String),values:rI,default:"bottom-start"},ariaLabel:{type:String,default:void 0}}),S7e="ElSelect",h_t=a.defineComponent({name:S7e,componentName:S7e,components:{ElInput:cI,ElSelectMenu:a_t,ElOption:TK,ElOptions:u_t,ElTag:wQt,ElScrollbar:hvt,ElTooltip:lK,ElIcon:Fl},directives:{ClickOutside:K8e},props:d_t,emits:[vs,$P,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const r=c_t(e,t);return a.provide(vI,a.reactive({props:e,states:r.states,optionsArray:r.optionsArray,handleOptionSelect:r.handleOptionSelect,onOptionCreate:r.onOptionCreate,onOptionDestroy:r.onOptionDestroy,selectRef:r.selectRef,setSelected:r.setSelected})),{...r}}}),p_t=["id","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],f_t=["textContent"];function m_t(e,t,r,n,i,o){const s=a.resolveComponent("el-tag"),l=a.resolveComponent("el-tooltip"),c=a.resolveComponent("el-icon"),u=a.resolveComponent("el-option"),d=a.resolveComponent("el-options"),h=a.resolveComponent("el-scrollbar"),p=a.resolveComponent("el-select-menu"),f=a.resolveDirective("click-outside");return a.withDirectives((a.openBlock(),a.createElementBlock("div",{ref:"selectRef",class:a.normalizeClass([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),onMouseenter:t[14]||(t[14]=m=>e.states.inputHovering=!0),onMouseleave:t[15]||(t[15]=m=>e.states.inputHovering=!1),onClick:t[16]||(t[16]=a.withModifiers((...m)=>e.toggleMenu&&e.toggleMenu(...m),["stop"]))},[a.createVNode(l,{ref:"tooltipRef",visible:e.dropdownMenuVisible,placement:e.placement,teleported:e.teleported,"popper-class":[e.nsSelect.e("popper"),e.popperClass],"popper-options":e.popperOptions,"fallback-placements":["bottom-start","top-start","right","left"],effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,onBeforeShow:e.handleMenuEnter,onHide:t[13]||(t[13]=m=>e.states.isBeforeHide=!1)},{default:a.withCtx(()=>{var m;return[a.createElementVNode("div",{ref:"wrapperRef",class:a.normalizeClass([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)])},[e.$slots.prefix?(a.openBlock(),a.createElementBlock("div",{key:0,ref:"prefixRef",class:a.normalizeClass(e.nsSelect.e("prefix"))},[a.renderSlot(e.$slots,"prefix")],2)):a.createCommentVNode("v-if",!0),a.createElementVNode("div",{ref:"selectionRef",class:a.normalizeClass([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?a.renderSlot(e.$slots,"tag",{key:0},()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.showTagList,g=>(a.openBlock(),a.createElementBlock("div",{key:e.getValueKey(g),class:a.normalizeClass(e.nsSelect.e("selected-item"))},[a.createVNode(s,{closable:!e.selectDisabled&&!g.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:a.normalizeStyle(e.tagStyle),onClose:T=>e.deleteTag(T,g)},{default:a.withCtx(()=>[a.createElementVNode("span",{class:a.normalizeClass(e.nsSelect.e("tags-text"))},a.toDisplayString(g.currentLabel),3)]),_:2},1032,["closable","size","type","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(a.openBlock(),a.createBlock(l,{key:0,ref:"tagTooltipRef",disabled:e.dropdownMenuVisible||!e.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:e.effect,placement:"bottom",teleported:e.teleported},{default:a.withCtx(()=>[a.createElementVNode("div",{ref:"collapseItemRef",class:a.normalizeClass(e.nsSelect.e("selected-item"))},[a.createVNode(s,{closable:!1,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",style:a.normalizeStyle(e.collapseTagStyle)},{default:a.withCtx(()=>[a.createElementVNode("span",{class:a.normalizeClass(e.nsSelect.e("tags-text"))}," + "+a.toDisplayString(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","style"])],2)]),content:a.withCtx(()=>[a.createElementVNode("div",{ref:"tagMenuRef",class:a.normalizeClass(e.nsSelect.e("selection"))},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.collapseTagList,g=>(a.openBlock(),a.createElementBlock("div",{key:e.getValueKey(g),class:a.normalizeClass(e.nsSelect.e("selected-item"))},[a.createVNode(s,{class:"in-tooltip",closable:!e.selectDisabled&&!g.isDisabled,size:e.collapseTagSize,type:e.tagType,"disable-transitions":"",onClose:T=>e.deleteTag(T,g)},{default:a.withCtx(()=>[a.createElementVNode("span",{class:a.normalizeClass(e.nsSelect.e("tags-text"))},a.toDisplayString(g.currentLabel),3)]),_:2},1032,["closable","size","type","onClose"])],2))),128))],2)]),_:1},8,["disabled","effect","teleported"])):a.createCommentVNode("v-if",!0)]):a.createCommentVNode("v-if",!0),e.selectDisabled?a.createCommentVNode("v-if",!0):(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[a.withDirectives(a.createElementVNode("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":t[0]||(t[0]=g=>e.states.inputValue=g),type:"text",class:a.normalizeClass([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:a.normalizeStyle(e.inputStyle),role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((m=e.hoverOption)==null?void 0:m.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onFocus:t[1]||(t[1]=(...g)=>e.handleFocus&&e.handleFocus(...g)),onBlur:t[2]||(t[2]=(...g)=>e.handleBlur&&e.handleBlur(...g)),onKeydown:[t[3]||(t[3]=a.withKeys(a.withModifiers(g=>e.navigateOptions("next"),["stop","prevent"]),["down"])),t[4]||(t[4]=a.withKeys(a.withModifiers(g=>e.navigateOptions("prev"),["stop","prevent"]),["up"])),t[5]||(t[5]=a.withKeys(a.withModifiers((...g)=>e.handleEsc&&e.handleEsc(...g),["stop","prevent"]),["esc"])),t[6]||(t[6]=a.withKeys(a.withModifiers((...g)=>e.selectOption&&e.selectOption(...g),["stop","prevent"]),["enter"])),t[7]||(t[7]=a.withKeys(a.withModifiers((...g)=>e.deletePrevTag&&e.deletePrevTag(...g),["stop"]),["delete"]))],onCompositionstart:t[8]||(t[8]=(...g)=>e.handleCompositionStart&&e.handleCompositionStart(...g)),onCompositionupdate:t[9]||(t[9]=(...g)=>e.handleCompositionUpdate&&e.handleCompositionUpdate(...g)),onCompositionend:t[10]||(t[10]=(...g)=>e.handleCompositionEnd&&e.handleCompositionEnd(...g)),onInput:t[11]||(t[11]=(...g)=>e.onInput&&e.onInput(...g)),onClick:t[12]||(t[12]=a.withModifiers((...g)=>e.toggleMenu&&e.toggleMenu(...g),["stop"]))},null,46,p_t),[[a.vModelText,e.states.inputValue]]),e.filterable?(a.openBlock(),a.createElementBlock("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:a.normalizeClass(e.nsSelect.e("input-calculator")),textContent:a.toDisplayString(e.states.inputValue)},null,10,f_t)):a.createCommentVNode("v-if",!0)],2)),e.shouldShowPlaceholder?(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[a.createElementVNode("span",null,a.toDisplayString(e.currentPlaceholder),1)],2)):a.createCommentVNode("v-if",!0)],2),a.createElementVNode("div",{ref:"suffixRef",class:a.normalizeClass(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(a.openBlock(),a.createBlock(c,{key:0,class:a.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):a.createCommentVNode("v-if",!0),e.showClose&&e.clearIcon?(a.openBlock(),a.createBlock(c,{key:1,class:a.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon")]),onClick:e.handleClearClick},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.clearIcon)))]),_:1},8,["class","onClick"])):a.createCommentVNode("v-if",!0),e.validateState&&e.validateIcon?(a.openBlock(),a.createBlock(c,{key:2,class:a.normalizeClass([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.validateIcon)))]),_:1},8,["class"])):a.createCommentVNode("v-if",!0)],2)],2)]}),content:a.withCtx(()=>[a.createVNode(p,{ref:"menuRef"},{default:a.withCtx(()=>[e.$slots.header?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(e.nsSelect.be("dropdown","header"))},[a.renderSlot(e.$slots,"header")],2)):a.createCommentVNode("v-if",!0),a.withDirectives(a.createVNode(h,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:a.normalizeClass([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:a.withCtx(()=>[e.showNewOption?(a.openBlock(),a.createBlock(u,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):a.createCommentVNode("v-if",!0),a.createVNode(d,null,{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[a.vShow,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(a.openBlock(),a.createElementBlock("div",{key:1,class:a.normalizeClass(e.nsSelect.be("dropdown","loading"))},[a.renderSlot(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(a.openBlock(),a.createElementBlock("div",{key:2,class:a.normalizeClass(e.nsSelect.be("dropdown","empty"))},[a.renderSlot(e.$slots,"empty",{},()=>[a.createElementVNode("span",null,a.toDisplayString(e.emptyText),1)])],2)):a.createCommentVNode("v-if",!0),e.$slots.footer?(a.openBlock(),a.createElementBlock("div",{key:3,class:a.normalizeClass(e.nsSelect.be("dropdown","footer"))},[a.renderSlot(e.$slots,"footer")],2)):a.createCommentVNode("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","effect","transition","persistent","onBeforeShow"])],34)),[[f,e.handleClickOutside,e.popperRef]])}var g_t=wi(h_t,[["render",m_t],["__file","select.vue"]]);const y_t=a.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=xi("select"),r=a.ref(null),n=a.getCurrentInstance(),i=a.ref([]);a.provide(L7e,a.reactive({...a.toRefs(e)}));const o=a.computed(()=>i.value.some(c=>c.visible===!0)),s=c=>{const u=[];return Qc(c.children)&&c.children.forEach(d=>{var h,p;d.type&&d.type.name==="ElOption"&&d.component&&d.component.proxy?u.push(d.component.proxy):(h=d.children)!=null&&h.length?u.push(...s(d)):(p=d.component)!=null&&p.subTree&&u.push(...s(d.component.subTree))}),u},l=()=>{i.value=s(n.subTree)};return a.onMounted(()=>{l()}),smt(r,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:r,visible:o,ns:t}}});function T_t(e,t,r,n,i,o){return a.withDirectives((a.openBlock(),a.createElementBlock("ul",{ref:"groupRef",class:a.normalizeClass(e.ns.be("group","wrap"))},[a.createElementVNode("li",{class:a.normalizeClass(e.ns.be("group","title"))},a.toDisplayString(e.label),3),a.createElementVNode("li",null,[a.createElementVNode("ul",{class:a.normalizeClass(e.ns.b("group"))},[a.renderSlot(e.$slots,"default")],2)])],2)),[[a.vShow,e.visible]])}var M7e=wi(y_t,[["render",T_t],["__file","option-group.vue"]]);const $T=F1(g_t,{Option:TK,OptionGroup:M7e}),bI=i3(TK);i3(M7e);const v_t=Lo({trigger:hL.trigger,placement:yK.placement,disabled:hL.disabled,visible:R0.visible,transition:R0.transition,popperOptions:yK.popperOptions,tabindex:yK.tabindex,content:R0.content,popperStyle:R0.popperStyle,popperClass:R0.popperClass,enterable:{...R0.enterable,default:!0},effect:{...R0.effect,default:"light"},teleported:R0.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}}),b_t={"update:visible":e=>of(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},Q_t="onUpdate:visible",x_t=a.defineComponent({name:"ElPopover"}),__t=a.defineComponent({...x_t,props:v_t,emits:b_t,setup(e,{expose:t,emit:r}){const n=e,i=a.computed(()=>n[Q_t]),o=xi("popover"),s=a.ref(),l=a.computed(()=>{var T;return(T=a.unref(s))==null?void 0:T.popperRef}),c=a.computed(()=>[{width:af(n.width)},n.popperStyle]),u=a.computed(()=>[o.b(),n.popperClass,{[o.m("plain")]:!!n.content}]),d=a.computed(()=>n.transition===`${o.namespace.value}-fade-in-linear`),h=()=>{var T;(T=s.value)==null||T.hide()},p=()=>{r("before-enter")},f=()=>{r("before-leave")},m=()=>{r("after-enter")},g=()=>{r("update:visible",!1),r("after-leave")};return t({popperRef:l,hide:h}),(T,y)=>(a.openBlock(),a.createBlock(a.unref(lK),a.mergeProps({ref_key:"tooltipRef",ref:s},T.$attrs,{trigger:T.trigger,placement:T.placement,disabled:T.disabled,visible:T.visible,transition:T.transition,"popper-options":T.popperOptions,tabindex:T.tabindex,content:T.content,offset:T.offset,"show-after":T.showAfter,"hide-after":T.hideAfter,"auto-close":T.autoClose,"show-arrow":T.showArrow,"aria-label":T.title,effect:T.effect,enterable:T.enterable,"popper-class":a.unref(u),"popper-style":a.unref(c),teleported:T.teleported,persistent:T.persistent,"gpu-acceleration":a.unref(d),"onUpdate:visible":a.unref(i),onBeforeShow:p,onBeforeHide:f,onShow:m,onHide:g}),{content:a.withCtx(()=>[T.title?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(a.unref(o).e("title")),role:"title"},a.toDisplayString(T.title),3)):a.createCommentVNode("v-if",!0),a.renderSlot(T.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(T.content),1)])]),default:a.withCtx(()=>[T.$slots.reference?a.renderSlot(T.$slots,"reference",{key:0}):a.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 w_t=wi(__t,[["__file","popover.vue"]]);const k7e=(e,t)=>{const r=t.arg||t.value,n=r==null?void 0:r.popperRef;n&&(n.triggerRef=e)};var L_t={mounted(e,t){k7e(e,t)},updated(e,t){k7e(e,t)}};const S_t="popover",C7e=Z9t(L_t,S_t),QI=F1(w_t,{directive:C7e}),ev="$treeNodeId",E7e=function(e,t){!t||t[ev]||Object.defineProperty(t,ev,{value:e.id,enumerable:!1,configurable:!1,writable:!1})},vK=function(e,t){return e?t[e]:t[ev]},bK=(e,t,r)=>{const n=e.value.currentNode;r();const i=e.value.currentNode;n!==i&&t("current-change",i?i.data:null,i)},QK=e=>{let t=!0,r=!0,n=!0;for(let i=0,o=e.length;i<o;i++){const s=e[i];(s.checked!==!0||s.indeterminate)&&(t=!1,s.disabled||(n=!1)),(s.checked!==!1||s.indeterminate)&&(r=!1)}return{all:t,none:r,allWithoutDisable:n,half:!t&&!r}},xI=function(e){if(e.childNodes.length===0||e.loading)return;const{all:t,none:r,half:n}=QK(e.childNodes);t?(e.checked=!0,e.indeterminate=!1):n?(e.checked=!1,e.indeterminate=!0):r&&(e.checked=!1,e.indeterminate=!1);const i=e.parent;!i||i.level===0||e.store.checkStrictly||xI(i)},_I=function(e,t){const r=e.store.props,n=e.data||{},i=r[t];if(typeof i=="function")return i(n,e);if(typeof i=="string")return n[i];if(typeof i>"u"){const o=n[t];return o===void 0?"":o}};let M_t=0,xK=class rZ{constructor(t){this.id=M_t++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const r in t)J7(t,r)&&(this[r]=t[r]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){const t=this.store;if(!t)throw new Error("[Node]store is required!");t.registerNode(this);const r=t.props;if(r&&typeof r.isLeaf<"u"){const o=_I(this,"isLeaf");typeof o=="boolean"&&(this.isLeafByUser=o)}if(t.lazy!==!0&&this.data?(this.setData(this.data),t.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&t.lazy&&t.defaultExpandAll&&this.expand(),Array.isArray(this.data)||E7e(this,this.data),!this.data)return;const n=t.defaultExpandedKeys,i=t.key;i&&n&&n.includes(this.key)&&this.expand(null,t.autoExpandParent),i&&t.currentNodeKey!==void 0&&this.key===t.currentNodeKey&&(t.currentNode=this,t.currentNode.isCurrent=!0),t.lazy&&t._initDefaultCheckedNode(this),this.updateLeafState(),this.parent&&(this.level===1||this.parent.expanded===!0)&&(this.canFocus=!0)}setData(t){Array.isArray(t)||E7e(this,t),this.data=t,this.childNodes=[];let r;this.level===0&&Array.isArray(this.data)?r=this.data:r=_I(this,"children")||[];for(let n=0,i=r.length;n<i;n++)this.insertChild({data:r[n]})}get label(){return _I(this,"label")}get key(){const t=this.store.key;return this.data?this.data[t]:null}get disabled(){return _I(this,"disabled")}get nextSibling(){const t=this.parent;if(t){const r=t.childNodes.indexOf(this);if(r>-1)return t.childNodes[r+1]}return null}get previousSibling(){const t=this.parent;if(t){const r=t.childNodes.indexOf(this);if(r>-1)return r>0?t.childNodes[r-1]:null}return null}contains(t,r=!0){return(this.childNodes||[]).some(n=>n===t||r&&n.contains(t))}remove(){const t=this.parent;t&&t.removeChild(this)}insertChild(t,r,n){if(!t)throw new Error("InsertChild error: child is required.");if(!(t instanceof rZ)){if(!n){const i=this.getChildren(!0);i.includes(t.data)||(typeof r>"u"||r<0?i.push(t.data):i.splice(r,0,t.data))}Object.assign(t,{parent:this,store:this.store}),t=a.reactive(new rZ(t)),t instanceof rZ&&t.initialize()}t.level=this.level+1,typeof r>"u"||r<0?this.childNodes.push(t):this.childNodes.splice(r,0,t),this.updateLeafState()}insertBefore(t,r){let n;r&&(n=this.childNodes.indexOf(r)),this.insertChild(t,n)}insertAfter(t,r){let n;r&&(n=this.childNodes.indexOf(r),n!==-1&&(n+=1)),this.insertChild(t,n)}removeChild(t){const r=this.getChildren()||[],n=r.indexOf(t.data);n>-1&&r.splice(n,1);const i=this.childNodes.indexOf(t);i>-1&&(this.store&&this.store.deregisterNode(t),t.parent=null,this.childNodes.splice(i,1)),this.updateLeafState()}removeChildByData(t){let r=null;for(let n=0;n<this.childNodes.length;n++)if(this.childNodes[n].data===t){r=this.childNodes[n];break}r&&this.removeChild(r)}expand(t,r){const n=()=>{if(r){let i=this.parent;for(;i.level>0;)i.expanded=!0,i=i.parent}this.expanded=!0,t&&t(),this.childNodes.forEach(i=>{i.canFocus=!0})};this.shouldLoadData()?this.loadData(i=>{Array.isArray(i)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||xI(this),n())}):n()}doCreateChildren(t,r={}){t.forEach(n=>{this.insertChild(Object.assign({data:n},r),void 0,!0)})}collapse(){this.expanded=!1,this.childNodes.forEach(t=>{t.canFocus=!1})}shouldLoadData(){return this.store.lazy===!0&&this.store.load&&!this.loaded}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser<"u"){this.isLeaf=this.isLeafByUser;return}const t=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!t||t.length===0;return}this.isLeaf=!1}setChecked(t,r,n,i){if(this.indeterminate=t==="half",this.checked=t===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:s,allWithoutDisable:l}=QK(this.childNodes);!this.isLeaf&&!s&&l&&(this.checked=!1,t=!1);const c=()=>{if(r){const u=this.childNodes;for(let p=0,f=u.length;p<f;p++){const m=u[p];i=i||t!==!1;const g=m.disabled?m.checked:i;m.setChecked(g,r,!0,i)}const{half:d,all:h}=QK(u);h||(this.checked=h,this.indeterminate=d)}};if(this.shouldLoadData()){this.loadData(()=>{c(),xI(this)},{checked:t!==!1});return}else c()}const o=this.parent;!o||o.level===0||n||xI(o)}getChildren(t=!1){if(this.level===0)return this.data;const r=this.data;if(!r)return null;const n=this.store.props;let i="children";return n&&(i=n.children||"children"),r[i]===void 0&&(r[i]=null),t&&!r[i]&&(r[i]=[]),r[i]}updateChildren(){const t=this.getChildren()||[],r=this.childNodes.map(o=>o.data),n={},i=[];t.forEach((o,s)=>{const l=o[ev];l&&r.findIndex(c=>c[ev]===l)>=0?n[l]={index:s,data:o}:i.push({index:s,data:o})}),this.store.lazy||r.forEach(o=>{n[o[ev]]||this.removeChildByData(o)}),i.forEach(({index:o,data:s})=>{this.insertChild({data:s},o)}),this.updateLeafState()}loadData(t,r={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(r).length)){this.loading=!0;const n=i=>{this.childNodes=[],this.doCreateChildren(i,r),this.loaded=!0,this.loading=!1,this.updateLeafState(),t&&t.call(this,i)};this.store.load(this,n)}else t&&t.call(this)}},k_t=class{constructor(t){this.currentNode=null,this.currentNodeKey=null;for(const r in t)J7(t,r)&&(this[r]=t[r]);this.nodesMap={}}initialize(){if(this.root=new xK({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const t=this.load;t(this.root,r=>{this.root.doCreateChildren(r),this._initDefaultCheckedNodes()})}else this._initDefaultCheckedNodes()}filter(t){const r=this.filterNodeMethod,n=this.lazy,i=function(o){const s=o.root?o.root.childNodes:o.childNodes;if(s.forEach(l=>{l.visible=r.call(l,t,l.data,l),i(l)}),!o.visible&&s.length){let l=!0;l=!s.some(c=>c.visible),o.root?o.root.visible=l===!1:o.visible=l===!1}t&&o.visible&&!o.isLeaf&&(!n||o.loaded)&&o.expand()};i(this)}setData(t){t!==this.root.data?(this.root.setData(t),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(t){if(t instanceof xK)return t;const r=B1(t)?vK(this.key,t):t;return this.nodesMap[r]||null}insertBefore(t,r){const n=this.getNode(r);n.parent.insertBefore({data:t},n)}insertAfter(t,r){const n=this.getNode(r);n.parent.insertAfter({data:t},n)}remove(t){const r=this.getNode(t);r&&r.parent&&(r===this.currentNode&&(this.currentNode=null),r.parent.removeChild(r))}append(t,r){const n=r?this.getNode(r):this.root;n&&n.insertChild({data:t})}_initDefaultCheckedNodes(){const t=this.defaultCheckedKeys||[],r=this.nodesMap;t.forEach(n=>{const i=r[n];i&&i.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(t){(this.defaultCheckedKeys||[]).includes(t.key)&&t.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(t){t!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=t,this._initDefaultCheckedNodes())}registerNode(t){const r=this.key;!t||!t.data||(r?t.key!==void 0&&(this.nodesMap[t.key]=t):this.nodesMap[t.id]=t)}deregisterNode(t){!this.key||!t||!t.data||(t.childNodes.forEach(r=>{this.deregisterNode(r)}),delete this.nodesMap[t.key])}getCheckedNodes(t=!1,r=!1){const n=[],i=function(o){(o.root?o.root.childNodes:o.childNodes).forEach(s=>{(s.checked||r&&s.indeterminate)&&(!t||t&&s.isLeaf)&&n.push(s.data),i(s)})};return i(this),n}getCheckedKeys(t=!1){return this.getCheckedNodes(t).map(r=>(r||{})[this.key])}getHalfCheckedNodes(){const t=[],r=function(n){(n.root?n.root.childNodes:n.childNodes).forEach(i=>{i.indeterminate&&t.push(i.data),r(i)})};return r(this),t}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(t=>(t||{})[this.key])}_getAllNodes(){const t=[],r=this.nodesMap;for(const n in r)J7(r,n)&&t.push(r[n]);return t}updateChildren(t,r){const n=this.nodesMap[t];if(!n)return;const i=n.childNodes;for(let o=i.length-1;o>=0;o--){const s=i[o];this.remove(s.data)}for(let o=0,s=r.length;o<s;o++){const l=r[o];this.append(l,n.data)}}_setCheckedKeys(t,r=!1,n){const i=this._getAllNodes().sort((c,u)=>c.level-u.level),o=Object.create(null),s=Object.keys(n);i.forEach(c=>c.setChecked(!1,!1));const l=c=>{c.childNodes.forEach(u=>{var d;o[u.data[t]]=!0,(d=u.childNodes)!=null&&d.length&&l(u)})};for(let c=0,u=i.length;c<u;c++){const d=i[c],h=d.data[t].toString();if(!s.includes(h)){d.checked&&!o[h]&&d.setChecked(!1,!1);continue}if(d.childNodes.length&&l(d),d.isLeaf||this.checkStrictly){d.setChecked(!0,!1);continue}if(d.setChecked(!0,!0),r){d.setChecked(!1,!1);const p=function(f){f.childNodes.forEach(m=>{m.isLeaf||m.setChecked(!1,!1),p(m)})};p(d)}}}setCheckedNodes(t,r=!1){const n=this.key,i={};t.forEach(o=>{i[(o||{})[n]]=!0}),this._setCheckedKeys(n,r,i)}setCheckedKeys(t,r=!1){this.defaultCheckedKeys=t;const n=this.key,i={};t.forEach(o=>{i[o]=!0}),this._setCheckedKeys(n,r,i)}setDefaultExpandedKeys(t){t=t||[],this.defaultExpandedKeys=t,t.forEach(r=>{const n=this.getNode(r);n&&n.expand(null,this.autoExpandParent)})}setChecked(t,r,n){const i=this.getNode(t);i&&i.setChecked(!!r,n)}getCurrentNode(){return this.currentNode}setCurrentNode(t){const r=this.currentNode;r&&(r.isCurrent=!1),this.currentNode=t,this.currentNode.isCurrent=!0}setUserCurrentNode(t,r=!0){const n=t[this.key],i=this.nodesMap[n];this.setCurrentNode(i),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(t,r=!0){if(t==null){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const n=this.getNode(t);n&&(this.setCurrentNode(n),r&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}};const C_t=a.defineComponent({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(e){const t=xi("tree"),r=a.inject("NodeInstance"),n=a.inject("RootTree");return()=>{const i=e.node,{data:o,store:s}=i;return e.renderContent?e.renderContent(a.h,{_self:r,node:i,data:o,store:s}):a.renderSlot(n.ctx.slots,"default",{node:i,data:o},()=>[a.h("span",{class:t.be("node","label")},[i.label])])}}});var E_t=wi(C_t,[["__file","tree-node-content.vue"]]);function A7e(e){const t=a.inject("TreeNodeMap",null),r={treeNodeExpand:n=>{e.node!==n&&e.node.collapse()},children:[]};return t&&t.children.push(r),a.provide("TreeNodeMap",r),{broadcastExpanded:n=>{if(e.accordion)for(const i of r.children)i.treeNodeExpand(n)}}}const O7e=Symbol("dragEvents");function A_t({props:e,ctx:t,el$:r,dropIndicator$:n,store:i}){const o=xi("tree"),s=a.ref({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return a.provide(O7e,{treeNodeDragStart:({event:l,treeNode:c})=>{if(typeof e.allowDrag=="function"&&!e.allowDrag(c.node))return l.preventDefault(),!1;l.dataTransfer.effectAllowed="move";try{l.dataTransfer.setData("text/plain","")}catch{}s.value.draggingNode=c,t.emit("node-drag-start",c.node,l)},treeNodeDragOver:({event:l,treeNode:c})=>{const u=c,d=s.value.dropNode;d&&d.node.id!==u.node.id&&B5(d.$el,o.is("drop-inner"));const h=s.value.draggingNode;if(!h||!u)return;let p=!0,f=!0,m=!0,g=!0;typeof e.allowDrop=="function"&&(p=e.allowDrop(h.node,u.node,"prev"),g=f=e.allowDrop(h.node,u.node,"inner"),m=e.allowDrop(h.node,u.node,"next")),l.dataTransfer.dropEffect=f||p||m?"move":"none",(p||f||m)&&(d==null?void 0:d.node.id)!==u.node.id&&(d&&t.emit("node-drag-leave",h.node,d.node,l),t.emit("node-drag-enter",h.node,u.node,l)),p||f||m?s.value.dropNode=u:s.value.dropNode=null,u.node.nextSibling===h.node&&(m=!1),u.node.previousSibling===h.node&&(p=!1),u.node.contains(h.node,!1)&&(f=!1),(h.node===u.node||h.node.contains(u.node))&&(p=!1,f=!1,m=!1);const T=u.$el.querySelector(`.${o.be("node","content")}`).getBoundingClientRect(),y=r.value.getBoundingClientRect();let v;const _=p?f?.25:m?.45:1:-1,b=m?f?.75:p?.55:0:1;let L=-9999;const w=l.clientY-T.top;w<T.height*_?v="before":w>T.height*b?v="after":f?v="inner":v="none";const M=u.$el.querySelector(`.${o.be("node","expand-icon")}`).getBoundingClientRect(),C=n.value;v==="before"?L=M.top-y.top:v==="after"&&(L=M.bottom-y.top),C.style.top=`${L}px`,C.style.left=`${M.right-y.left}px`,v==="inner"?ZP(u.$el,o.is("drop-inner")):B5(u.$el,o.is("drop-inner")),s.value.showDropIndicator=v==="before"||v==="after",s.value.allowDrop=s.value.showDropIndicator||g,s.value.dropType=v,t.emit("node-drag-over",h.node,u.node,l)},treeNodeDragEnd:l=>{const{draggingNode:c,dropType:u,dropNode:d}=s.value;if(l.preventDefault(),l.dataTransfer.dropEffect="move",c&&d){const h={data:c.node.data};u!=="none"&&c.node.remove(),u==="before"?d.node.parent.insertBefore(h,d.node):u==="after"?d.node.parent.insertAfter(h,d.node):u==="inner"&&d.node.insertChild(h),u!=="none"&&i.value.registerNode(h),B5(d.$el,o.is("drop-inner")),t.emit("node-drag-end",c.node,d.node,u,l),u!=="none"&&t.emit("node-drop",c.node,d.node,u,l)}c&&!d&&t.emit("node-drag-end",c.node,null,u,l),s.value.showDropIndicator=!1,s.value.draggingNode=null,s.value.dropNode=null,s.value.allowDrop=!0}}),{dragState:s}}const O_t=a.defineComponent({name:"ElTreeNode",components:{ElCollapseTransition:RQt,ElCheckbox:gI,NodeContent:E_t,ElIcon:Fl,Loading:HX},props:{node:{type:xK,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(e,t){const r=xi("tree"),{broadcastExpanded:n}=A7e(e),i=a.inject("RootTree"),o=a.ref(!1),s=a.ref(!1),l=a.ref(null),c=a.ref(null),u=a.ref(null),d=a.inject(O7e),h=a.getCurrentInstance();a.provide("NodeInstance",h),i||Bl("Tree","Can not find node's tree."),e.node.expanded&&(o.value=!0,s.value=!0);const p=i.props.props.children||"children";a.watch(()=>{const b=e.node.data[p];return b&&[...b]},()=>{e.node.updateChildren()}),a.watch(()=>e.node.indeterminate,b=>{g(e.node.checked,b)}),a.watch(()=>e.node.checked,b=>{g(b,e.node.indeterminate)}),a.watch(()=>e.node.expanded,b=>{a.nextTick(()=>o.value=b),b&&(s.value=!0)});const f=b=>vK(i.props.nodeKey,b.data),m=b=>{const L=e.props.class;if(!L)return{};let w;if(Bu(L)){const{data:M}=b;w=L(M,b)}else w=L;return Rl(w)?{[w]:!0}:w},g=(b,L)=>{(l.value!==b||c.value!==L)&&i.ctx.emit("check-change",e.node.data,b,L),l.value=b,c.value=L},T=b=>{bK(i.store,i.ctx.emit,()=>i.store.value.setCurrentNode(e.node)),i.currentNode.value=e.node,i.props.expandOnClickNode&&v(),i.props.checkOnClickNode&&!e.node.disabled&&_(null,{target:{checked:!e.node.checked}}),i.ctx.emit("node-click",e.node.data,e.node,h,b)},y=b=>{i.instance.vnode.props.onNodeContextmenu&&(b.stopPropagation(),b.preventDefault()),i.ctx.emit("node-contextmenu",b,e.node.data,e.node,h)},v=()=>{e.node.isLeaf||(o.value?(i.ctx.emit("node-collapse",e.node.data,e.node,h),e.node.collapse()):(e.node.expand(),t.emit("node-expand",e.node.data,e.node,h)))},_=(b,L)=>{e.node.setChecked(L.target.checked,!i.props.checkStrictly),a.nextTick(()=>{const w=i.store.value;i.ctx.emit("check",e.node.data,{checkedNodes:w.getCheckedNodes(),checkedKeys:w.getCheckedKeys(),halfCheckedNodes:w.getHalfCheckedNodes(),halfCheckedKeys:w.getHalfCheckedKeys()})})};return{ns:r,node$:u,tree:i,expanded:o,childNodeRendered:s,oldChecked:l,oldIndeterminate:c,getNodeKey:f,getNodeClass:m,handleSelectChange:g,handleClick:T,handleContextMenu:y,handleExpandIconClick:v,handleCheckChange:_,handleChildNodeExpand:(b,L,w)=>{n(L),i.ctx.emit("node-expand",b,L,w)},handleDragStart:b=>{i.props.draggable&&d.treeNodeDragStart({event:b,treeNode:e})},handleDragOver:b=>{b.preventDefault(),i.props.draggable&&d.treeNodeDragOver({event:b,treeNode:{$el:u.value,node:e.node}})},handleDrop:b=>{b.preventDefault()},handleDragEnd:b=>{i.props.draggable&&d.treeNodeDragEnd(b)},CaretRight:M9t}}}),P_t=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],I_t=["aria-expanded"];function H_t(e,t,r,n,i,o){const s=a.resolveComponent("el-icon"),l=a.resolveComponent("el-checkbox"),c=a.resolveComponent("loading"),u=a.resolveComponent("node-content"),d=a.resolveComponent("el-tree-node"),h=a.resolveComponent("el-collapse-transition");return a.withDirectives((a.openBlock(),a.createElementBlock("div",{ref:"node$",class:a.normalizeClass([e.ns.b("node"),e.ns.is("expanded",e.expanded),e.ns.is("current",e.node.isCurrent),e.ns.is("hidden",!e.node.visible),e.ns.is("focusable",!e.node.disabled),e.ns.is("checked",!e.node.disabled&&e.node.checked),e.getNodeClass(e.node)]),role:"treeitem",tabindex:"-1","aria-expanded":e.expanded,"aria-disabled":e.node.disabled,"aria-checked":e.node.checked,draggable:e.tree.props.draggable,"data-key":e.getNodeKey(e.node),onClick:t[1]||(t[1]=a.withModifiers((...p)=>e.handleClick&&e.handleClick(...p),["stop"])),onContextmenu:t[2]||(t[2]=(...p)=>e.handleContextMenu&&e.handleContextMenu(...p)),onDragstart:t[3]||(t[3]=a.withModifiers((...p)=>e.handleDragStart&&e.handleDragStart(...p),["stop"])),onDragover:t[4]||(t[4]=a.withModifiers((...p)=>e.handleDragOver&&e.handleDragOver(...p),["stop"])),onDragend:t[5]||(t[5]=a.withModifiers((...p)=>e.handleDragEnd&&e.handleDragEnd(...p),["stop"])),onDrop:t[6]||(t[6]=a.withModifiers((...p)=>e.handleDrop&&e.handleDrop(...p),["stop"]))},[a.createElementVNode("div",{class:a.normalizeClass(e.ns.be("node","content")),style:a.normalizeStyle({paddingLeft:(e.node.level-1)*e.tree.props.indent+"px"})},[e.tree.props.icon||e.CaretRight?(a.openBlock(),a.createBlock(s,{key:0,class:a.normalizeClass([e.ns.be("node","expand-icon"),e.ns.is("leaf",e.node.isLeaf),{expanded:!e.node.isLeaf&&e.expanded}]),onClick:a.withModifiers(e.handleExpandIconClick,["stop"])},{default:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.tree.props.icon||e.CaretRight)))]),_:1},8,["class","onClick"])):a.createCommentVNode("v-if",!0),e.showCheckbox?(a.openBlock(),a.createBlock(l,{key:1,"model-value":e.node.checked,indeterminate:e.node.indeterminate,disabled:!!e.node.disabled,onClick:t[0]||(t[0]=a.withModifiers(()=>{},["stop"])),onChange:e.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):a.createCommentVNode("v-if",!0),e.node.loading?(a.openBlock(),a.createBlock(s,{key:2,class:a.normalizeClass([e.ns.be("node","loading-icon"),e.ns.is("loading")])},{default:a.withCtx(()=>[a.createVNode(c)]),_:1},8,["class"])):a.createCommentVNode("v-if",!0),a.createVNode(u,{node:e.node,"render-content":e.renderContent},null,8,["node","render-content"])],6),a.createVNode(h,null,{default:a.withCtx(()=>[!e.renderAfterExpand||e.childNodeRendered?a.withDirectives((a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(e.ns.be("node","children")),role:"group","aria-expanded":e.expanded},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.node.childNodes,p=>(a.openBlock(),a.createBlock(d,{key:e.getNodeKey(p),"render-content":e.renderContent,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,node:p,accordion:e.accordion,props:e.props,onNodeExpand:e.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,I_t)),[[a.vShow,e.expanded]]):a.createCommentVNode("v-if",!0)]),_:1})],42,P_t)),[[a.vShow,e.node.visible]])}var V_t=wi(O_t,[["render",H_t],["__file","tree-node.vue"]]);function R_t({el$:e},t){const r=xi("tree"),n=a.shallowRef([]),i=a.shallowRef([]);a.onMounted(()=>{o()}),a.onUpdated(()=>{n.value=Array.from(e.value.querySelectorAll("[role=treeitem]")),i.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"))}),a.watch(i,s=>{s.forEach(l=>{l.setAttribute("tabindex","-1")})}),V5(e,"keydown",s=>{const l=s.target;if(!l.className.includes(r.b("node")))return;const c=s.code;n.value=Array.from(e.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`));const u=n.value.indexOf(l);let d;if([iu.up,iu.down].includes(c)){if(s.preventDefault(),c===iu.up){d=u===-1?0:u!==0?u-1:n.value.length-1;const p=d;for(;!t.value.getNode(n.value[d].dataset.key).canFocus;){if(d--,d===p){d=-1;break}d<0&&(d=n.value.length-1)}}else{d=u===-1?0:u<n.value.length-1?u+1:0;const p=d;for(;!t.value.getNode(n.value[d].dataset.key).canFocus;){if(d++,d===p){d=-1;break}d>=n.value.length&&(d=0)}}d!==-1&&n.value[d].focus()}[iu.left,iu.right].includes(c)&&(s.preventDefault(),l.click());const h=l.querySelector('[type="checkbox"]');[iu.enter,iu.space].includes(c)&&h&&(s.preventDefault(),h.click())});const o=()=>{var s;n.value=Array.from(e.value.querySelectorAll(`.${r.is("focusable")}[role=treeitem]`)),i.value=Array.from(e.value.querySelectorAll("input[type=checkbox]"));const l=e.value.querySelectorAll(`.${r.is("checked")}[role=treeitem]`);if(l.length){l[0].setAttribute("tabindex","0");return}(s=n.value[0])==null||s.setAttribute("tabindex","0")}}const N_t=a.defineComponent({name:"ElTree",components:{ElTreeNode:V_t},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:sf}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(e,t){const{t:r}=tL(),n=xi("tree"),i=a.ref(new k_t({key:e.nodeKey,data:e.data,lazy:e.lazy,props:e.props,load:e.load,currentNodeKey:e.currentNodeKey,checkStrictly:e.checkStrictly,checkDescendants:e.checkDescendants,defaultCheckedKeys:e.defaultCheckedKeys,defaultExpandedKeys:e.defaultExpandedKeys,autoExpandParent:e.autoExpandParent,defaultExpandAll:e.defaultExpandAll,filterNodeMethod:e.filterNodeMethod}));i.value.initialize();const o=a.ref(i.value.root),s=a.ref(null),l=a.ref(null),c=a.ref(null),{broadcastExpanded:u}=A7e(e),{dragState:d}=A_t({props:e,ctx:t,el$:l,dropIndicator$:c,store:i});R_t({el$:l},i);const h=a.computed(()=>{const{childNodes:R}=o.value;return!R||R.length===0||R.every(({visible:Z})=>!Z)});a.watch(()=>e.currentNodeKey,R=>{i.value.setCurrentNodeKey(R)}),a.watch(()=>e.defaultCheckedKeys,R=>{i.value.setDefaultCheckedKey(R)}),a.watch(()=>e.defaultExpandedKeys,R=>{i.value.setDefaultExpandedKeys(R)}),a.watch(()=>e.data,R=>{i.value.setData(R)},{deep:!0}),a.watch(()=>e.checkStrictly,R=>{i.value.checkStrictly=R});const p=R=>{if(!e.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");i.value.filter(R)},f=R=>vK(e.nodeKey,R.data),m=R=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const Z=i.value.getNode(R);if(!Z)return[];const X=[Z.data];let U=Z.parent;for(;U&&U!==o.value;)X.push(U.data),U=U.parent;return X.reverse()},g=(R,Z)=>i.value.getCheckedNodes(R,Z),T=R=>i.value.getCheckedKeys(R),y=()=>{const R=i.value.getCurrentNode();return R?R.data:null},v=()=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const R=y();return R?R[e.nodeKey]:null},_=(R,Z)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");i.value.setCheckedNodes(R,Z)},b=(R,Z)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");i.value.setCheckedKeys(R,Z)},L=(R,Z,X)=>{i.value.setChecked(R,Z,X)},w=()=>i.value.getHalfCheckedNodes(),M=()=>i.value.getHalfCheckedKeys(),C=(R,Z=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");bK(i,t.emit,()=>i.value.setUserCurrentNode(R,Z))},A=(R,Z=!0)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");bK(i,t.emit,()=>i.value.setCurrentNodeKey(R,Z))},O=R=>i.value.getNode(R),V=R=>{i.value.remove(R)},H=(R,Z)=>{i.value.append(R,Z)},N=(R,Z)=>{i.value.insertBefore(R,Z)},D=(R,Z)=>{i.value.insertAfter(R,Z)},j=(R,Z,X)=>{u(Z),t.emit("node-expand",R,Z,X)},G=(R,Z)=>{if(!e.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");i.value.updateChildren(R,Z)};return a.provide("RootTree",{ctx:t,props:e,store:i,root:o,currentNode:s,instance:a.getCurrentInstance()}),a.provide(dL,void 0),{ns:n,store:i,root:o,currentNode:s,dragState:d,el$:l,dropIndicator$:c,isEmpty:h,filter:p,getNodeKey:f,getNodePath:m,getCheckedNodes:g,getCheckedKeys:T,getCurrentNode:y,getCurrentKey:v,setCheckedNodes:_,setCheckedKeys:b,setChecked:L,getHalfCheckedNodes:w,getHalfCheckedKeys:M,setCurrentNode:C,setCurrentKey:A,t:r,getNode:O,remove:V,append:H,insertBefore:N,insertAfter:D,handleNodeExpand:j,updateKeyChildren:G}}});function B_t(e,t,r,n,i,o){const s=a.resolveComponent("el-tree-node");return a.openBlock(),a.createElementBlock("div",{ref:"el$",class:a.normalizeClass([e.ns.b(),e.ns.is("dragging",!!e.dragState.draggingNode),e.ns.is("drop-not-allow",!e.dragState.allowDrop),e.ns.is("drop-inner",e.dragState.dropType==="inner"),{[e.ns.m("highlight-current")]:e.highlightCurrent}]),role:"tree"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.root.childNodes,l=>(a.openBlock(),a.createBlock(s,{key:e.getNodeKey(l),node:l,props:e.props,accordion:e.accordion,"render-after-expand":e.renderAfterExpand,"show-checkbox":e.showCheckbox,"render-content":e.renderContent,onNodeExpand:e.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),e.isEmpty?(a.openBlock(),a.createElementBlock("div",{key:0,class:a.normalizeClass(e.ns.e("empty-block"))},[a.renderSlot(e.$slots,"empty",{},()=>{var l;return[a.createElementVNode("span",{class:a.normalizeClass(e.ns.e("empty-text"))},a.toDisplayString((l=e.emptyText)!=null?l:e.t("el.tree.emptyText")),3)]})],2)):a.createCommentVNode("v-if",!0),a.withDirectives(a.createElementVNode("div",{ref:"dropIndicator$",class:a.normalizeClass(e.ns.e("drop-indicator"))},null,2),[[a.vShow,e.dragState.showDropIndicator]])],2)}var wI=wi(N_t,[["render",B_t],["__file","tree.vue"]]);wI.install=e=>{e.component(wI.name,wI)};const F_t=wI,P7e=F_t;function D_t(e){let t;const r=a.ref(!1),n=a.reactive({...e,originalPosition:"",originalOverflow:"",visible:!1});function i(p){n.text=p}function o(){const p=n.parent,f=h.ns;if(!p.vLoadingAddClassList){let m=p.getAttribute("loading-number");m=Number.parseInt(m)-1,m?p.setAttribute("loading-number",m.toString()):(B5(p,f.bm("parent","relative")),p.removeAttribute("loading-number")),B5(p,f.bm("parent","hidden"))}s(),d.unmount()}function s(){var p,f;(f=(p=h.$el)==null?void 0:p.parentNode)==null||f.removeChild(h.$el)}function l(){var p;e.beforeClose&&!e.beforeClose()||(r.value=!0,clearTimeout(t),t=window.setTimeout(c,400),n.visible=!1,(p=e.closed)==null||p.call(e))}function c(){if(!r.value)return;const p=n.parent;r.value=!1,p.vLoadingAddClassList=void 0,o()}const u=a.defineComponent({name:"ElLoading",setup(p,{expose:f}){const{ns:m,zIndex:g}=RTt("loading");return f({ns:m,zIndex:g}),()=>{const T=n.spinner||n.svg,y=a.h("svg",{class:"circular",viewBox:n.svgViewBox?n.svgViewBox:"0 0 50 50",...T?{innerHTML:T}:{}},[a.h("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),v=n.text?a.h("p",{class:m.b("text")},[n.text]):void 0;return a.h(a.Transition,{name:m.b("fade"),onAfterLeave:c},{default:a.withCtx(()=>[a.withDirectives(a.createVNode("div",{style:{backgroundColor:n.background||""},class:[m.b("mask"),n.customClass,n.fullscreen?"is-fullscreen":""]},[a.h("div",{class:m.b("spinner")},[y,v])]),[[a.vShow,n.visible]])])})}}}),d=a.createApp(u),h=d.mount(document.createElement("div"));return{...a.toRefs(n),setText:i,removeElLoadingChild:s,close:l,handleAfterLeave:c,vm:h,get $el(){return h.$el}}}let LI;const _K=function(e={}){if(!Ts)return;const t=z_t(e);if(t.fullscreen&&LI)return LI;const r=D_t({...t,closed:()=>{var i;(i=t.closed)==null||i.call(t),t.fullscreen&&(LI=void 0)}});j_t(t,t.parent,r),I7e(t,t.parent,r),t.parent.vLoadingAddClassList=()=>I7e(t,t.parent,r);let n=t.parent.getAttribute("loading-number");return n?n=`${Number.parseInt(n)+1}`:n="1",t.parent.setAttribute("loading-number",n),t.parent.appendChild(r.$el),a.nextTick(()=>r.visible.value=t.visible),t.fullscreen&&(LI=r),r},z_t=e=>{var t,r,n,i;let o;return Rl(e.target)?o=(t=document.querySelector(e.target))!=null?t:document.body:o=e.target||document.body,{parent:o===document.body||e.body?document.body:o,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:o===document.body&&((r=e.fullscreen)!=null?r:!0),lock:(n=e.lock)!=null?n:!1,customClass:e.customClass||"",visible:(i=e.visible)!=null?i:!0,target:o}},j_t=async(e,t,r)=>{const{nextZIndex:n}=r.vm.zIndex||r.vm._.exposed.zIndex,i={};if(e.fullscreen)r.originalPosition.value=RT(document.body,"position"),r.originalOverflow.value=RT(document.body,"overflow"),i.zIndex=n();else if(e.parent===document.body){r.originalPosition.value=RT(document.body,"position"),await a.nextTick();for(const o of["top","left"]){const s=o==="top"?"scrollTop":"scrollLeft";i[o]=`${e.target.getBoundingClientRect()[o]+document.body[s]+document.documentElement[s]-Number.parseInt(RT(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])i[o]=`${e.target.getBoundingClientRect()[o]}px`}else r.originalPosition.value=RT(t,"position");for(const[o,s]of Object.entries(i))r.$el.style[o]=s},I7e=(e,t,r)=>{const n=r.vm.ns||r.vm._.exposed.ns;["absolute","fixed","sticky"].includes(r.originalPosition.value)?B5(t,n.bm("parent","relative")):ZP(t,n.bm("parent","relative")),e.fullscreen&&e.lock?ZP(t,n.bm("parent","hidden")):B5(t,n.bm("parent","hidden"))},SI=Symbol("ElLoading"),H7e=(e,t)=>{var r,n,i,o;const s=t.instance,l=p=>B1(t.value)?t.value[p]:void 0,c=p=>{const f=Rl(p)&&(s==null?void 0:s[p])||p;return f&&a.ref(f)},u=p=>c(l(p)||e.getAttribute(`element-loading-${bmt(p)}`)),d=(r=l("fullscreen"))!=null?r:t.modifiers.fullscreen,h={text:u("text"),svg:u("svg"),svgViewBox:u("svgViewBox"),spinner:u("spinner"),background:u("background"),customClass:u("customClass"),fullscreen:d,target:(n=l("target"))!=null?n:d?void 0:e,body:(i=l("body"))!=null?i:t.modifiers.body,lock:(o=l("lock"))!=null?o:t.modifiers.lock};e[SI]={options:h,instance:_K(h)}},U_t=(e,t)=>{for(const r of Object.keys(t))a.isRef(t[r])&&(t[r].value=e[r])},MI={mounted(e,t){t.value&&H7e(e,t)},updated(e,t){const r=e[SI];t.oldValue!==t.value&&(t.value&&!t.oldValue?H7e(e,t):t.value&&t.oldValue?B1(t.value)&&U_t(t.value,r.options):r==null||r.instance.close())},unmounted(e){var t;(t=e[SI])==null||t.instance.close(),e[SI]=null}},G_t={install(e){e.directive("loading",MI),e.config.globalProperties.$loading=_K},directive:MI,service:_K},Nh=(e,t)=>{const r=e.__vccOpts||e;for(const[n,i]of t)r[n]=i;return r},W_t={name:"ConnectionDialog",components:{Row:c3,Col:Rh,Card:Y8e},props:{entry:{type:Object},drawing:{type:Boolean,default:!1},connection:{type:Boolean,default:!1}},data:function(){return{tooltipId:void 0}},watch:{connection:function(){this.tooltipId=void 0}},methods:{capitalise:function(e){return e[0].toUpperCase()+e.slice(1)},handleTooltipOpen:function(e){this.tooltipId=e,this.$emit("tooltip",e)},handleTooltipClose:function(){this.tooltipId=void 0,this.$emit("popup",!0)}}},q_t=e=>(a.pushScopeId("data-v-fb3049ea"),e=e(),a.popScopeId(),e),Z_t={class:"dialog-container"},X_t={key:0,class:"dialog-title"},K_t={key:1,class:"dialog-title"},Y_t=q_t(()=>a.createElementVNode("b",null,[a.createElementVNode("span",null,"Related Features")],-1));function J_t(e,t,r,n,i,o){const s=l3,l=Rh,c=c3,u=Y8e,d=YP,h=Fl;return a.openBlock(),a.createElementBlock("div",Z_t,[a.createVNode(c,null,{default:a.withCtx(()=>[r.drawing?(a.openBlock(),a.createElementBlock("span",X_t,"Finalise drawing")):(a.openBlock(),a.createElementBlock("span",K_t,"Visualise connection")),r.drawing?(a.openBlock(),a.createBlock(c,{key:2},{default:a.withCtx(()=>[a.createVNode(l,{span:13},{default:a.withCtx(()=>[a.createVNode(s,{type:"primary",plain:"",onClick:t[0]||(t[0]=p=>e.$emit("confirm",!0))},{default:a.withCtx(()=>[a.createTextVNode(" Confirm ")]),_:1})]),_:1}),a.createVNode(l,{span:11},{default:a.withCtx(()=>[a.createVNode(s,{type:"primary",plain:"",onClick:t[1]||(t[1]=p=>e.$emit("cancel",!0))},{default:a.withCtx(()=>[a.createTextVNode(" Cancel ")]),_:1})]),_:1})]),_:1})):(a.openBlock(),a.createBlock(c,{key:3},{default:a.withCtx(()=>[a.createVNode(s,{type:"primary",plain:"",onClick:t[2]||(t[2]=p=>e.$emit("display",!1))},{default:a.withCtx(()=>[a.createTextVNode(" Close ")]),_:1})]),_:1}))]),_:1}),r.connection?(a.openBlock(),a.createBlock(c,{key:0},{default:a.withCtx(()=>[a.createVNode(l,null,{default:a.withCtx(()=>[Y_t,(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.entry,(p,f)=>(a.openBlock(),a.createBlock(c,{key:f},{default:a.withCtx(()=>[a.createVNode(l,{span:20},{default:a.withCtx(()=>[a.createVNode(u,{shadow:"hover",onClick:m=>o.handleTooltipOpen(f)},{default:a.withCtx(()=>[a.createElementVNode("span",null,a.toDisplayString(o.capitalise(p.label)),1)]),_:2},1032,["onClick"])]),_:2},1024),f===e.tooltipId?(a.openBlock(),a.createBlock(l,{key:0,span:4},{default:a.withCtx(()=>[a.createVNode(h,null,{default:a.withCtx(()=>[a.createVNode(d,{onClick:o.handleTooltipClose},null,8,["onClick"])]),_:1})]),_:1})):a.createCommentVNode("",!0)]),_:2},1024))),128))]),_:1})]),_:1})):a.createCommentVNode("",!0)])}const $_t=Nh(W_t,[["render",J_t],["__scopeId","data-v-fb3049ea"]]),ewt={name:"ExternalResourceCard",components:{Button:l3},props:{resources:{type:Array,default:()=>[]}},data:function(){return{pubmeds:[],pubmedIds:[],ElIconNotebook:a.shallowRef(D9t)}},methods:{capitalise:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},openUrl:function(e){window.open(e,"_blank")}}},twt={class:"resource-container"};function rwt(e,t,r,n,i,o){const s=l3;return a.openBlock(),a.createElementBlock("div",twt,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.resources,l=>(a.openBlock(),a.createElementBlock("div",{key:l.id,class:"resource"},[l.id==="pubmed"?(a.openBlock(),a.createBlock(s,{key:0,class:"button",id:"open-pubmed-button",icon:e.ElIconNotebook,onClick:c=>o.openUrl(l.url)},{default:a.withCtx(()=>[a.createTextVNode(" Open publications in pubmed ")]),_:2},1032,["icon","onClick"])):a.createCommentVNode("",!0)]))),128))])}const V7e=Nh(ewt,[["render",rwt],["__scopeId","data-v-5386b943"]]);function nwt(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map(function(i){i(r)}),(n=e.get("*"))&&n.slice().map(function(i){i(t,r)})}}}const kI=new nwt,iwt=e=>e.replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()),owt=function(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""},awt={name:"ProvenancePopup",components:{Button:l3,Container:Lxt,Icon:Fl,ExternalResourceCard:V7e,ElIconArrowUp:KP,ElIconArrowDown:F5,ElIconWarning:Cme},props:{entry:{type:Object,default:()=>({destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0})}},data:function(){return{controller:void 0,activeSpecies:void 0,pubmedSearchUrl:"",loading:!1,showToolip:!1,showDetails:!1,originDescriptions:{motor:"is the location of the initial cell body of the circuit",sensory:"is the location of the initial cell body in the PNS circuit"},componentsWithDatasets:[],uberons:[{id:void 0,name:void 0}]}},computed:{resources:function(){let e=[];return this.entry&&this.entry.hyperlinks&&(e=this.entry.hyperlinks),e},originDescription:function(){return this.entry&&this.entry.title&&this.entry.title.toLowerCase().includes("motor")?this.originDescriptions.motor:this.originDescriptions.sensory},provSpeciesDescription:function(){let e="Observed in";return this.entry.provenanceTaxonomyLabel.forEach(t=>{e+=` ${t},`}),e=e.slice(0,-1),e+=" species",e}},methods:{titleCase:function(e){return iwt(e)},capitalise:function(e){return owt(e)},openUrl:function(e){window.open(e,"_blank")},openAll:function(){kI.emit("onActionClick",{type:"Facets",labels:this.entry.componentsWithDatasets.map(e=>e.name)})},openAxons:function(){kI.emit("onActionClick",{type:"Facets",labels:this.entry.destinationsWithDatasets.map(e=>e.name)})},openDendrites:function(){kI.emit("onActionClick",{type:"Facets",labels:this.entry.originsWithDatasets.map(e=>e.name)})},pubmedSearchUrlUpdate:function(e){this.pubmedSearchUrl=e}}},gL=e=>(a.pushScopeId("data-v-a3d0eed3"),e=e(),a.popScopeId(),e),swt={key:0,class:"main"},lwt={key:0,class:"block"},cwt={class:"title"},uwt={key:0,class:"subtitle"},dwt={key:1,class:"block"},hwt={class:"title"},pwt={class:"content-container scrollbar"},fwt={key:0,class:"block"},mwt=gL(()=>a.createElementVNode("span",{class:"attribute-title"},"Origin",-1)),gwt={style:{"word-break":"keep-all"}},ywt=gL(()=>a.createElementVNode("i",null,"Origin",-1)),Twt=["origin-item-label"],vwt={key:0,class:"seperator"},bwt={key:1,class:"block"},Qwt=gL(()=>a.createElementVNode("div",{class:"attribute-title"},"Components",-1)),xwt=["component-item-label"],_wt={key:0,class:"seperator"},wwt={key:2,class:"block"},Lwt=gL(()=>a.createElementVNode("span",{class:"attribute-title"},"Destination",-1)),Swt=gL(()=>a.createElementVNode("span",{style:{"word-break":"keep-all"}},[a.createElementVNode("i",null,"Destination"),a.createTextVNode(" is where the axons terminate ")],-1)),Mwt=["destination-item-label"],kwt={key:0,class:"seperator"};function Cwt(e,t,r,n,i,o){const s=KP,l=Fl,c=F5,u=Cme,d=QI,h=l3,p=V7e,f=MI;return r.entry?a.withDirectives((a.openBlock(),a.createElementBlock("div",swt,[r.entry.title?(a.openBlock(),a.createElementBlock("div",lwt,[a.createElementVNode("span",cwt,a.toDisplayString(o.capitalise(r.entry.title)),1),r.entry.provenanceTaxonomyLabel&&r.entry.provenanceTaxonomyLabel.length>0?(a.openBlock(),a.createElementBlock("div",uwt,a.toDisplayString(o.provSpeciesDescription),1)):a.createCommentVNode("",!0)])):(a.openBlock(),a.createElementBlock("div",dwt,[a.createElementVNode("span",hwt,a.toDisplayString(r.entry.featureId),1)])),a.withDirectives(a.createElementVNode("div",{class:"hide",id:"hide-path-info",onClick:t[0]||(t[0]=m=>e.showDetails=!1)},[a.createTextVNode(" Hide path information "),a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(s)]),_:1})],512),[[a.vShow,e.showDetails]]),a.withDirectives(a.createElementVNode("div",{class:"hide",id:"show-path-info",onClick:t[1]||(t[1]=m=>e.showDetails=!0)},[a.createTextVNode(" Show path information "),a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(c)]),_:1})],512),[[a.vShow,!e.showDetails]]),a.createVNode(a.Transition,{name:"slide-fade"},{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",pwt,[a.createTextVNode(a.toDisplayString(r.entry.paths)+" ",1),r.entry.origins&&r.entry.origins.length>0?(a.openBlock(),a.createElementBlock("div",fwt,[a.createElementVNode("div",null,[mwt,a.createVNode(d,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:a.withCtx(()=>[a.createVNode(l,{class:"info"},{default:a.withCtx(()=>[a.createVNode(u)]),_:1})]),default:a.withCtx(()=>[a.createElementVNode("span",gwt,[ywt,a.createTextVNode(" "+a.toDisplayString(o.originDescription),1)])]),_:1})]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.entry.origins,(m,g)=>(a.openBlock(),a.createElementBlock("div",{class:"attribute-content","origin-item-label":m,key:m},[a.createTextVNode(a.toDisplayString(o.capitalise(m))+" ",1),g!=r.entry.origins.length-1?(a.openBlock(),a.createElementBlock("div",vwt)):a.createCommentVNode("",!0)],8,Twt))),128)),a.withDirectives(a.createVNode(h,{class:"button",id:"open-dendrites-button",onClick:o.openDendrites},{default:a.withCtx(()=>[a.createTextVNode(" Explore origin data ")]),_:1},8,["onClick"]),[[a.vShow,r.entry.originsWithDatasets&&r.entry.originsWithDatasets.length>0]])])):a.createCommentVNode("",!0),r.entry.components&&r.entry.components.length>0?(a.openBlock(),a.createElementBlock("div",bwt,[Qwt,(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.entry.components,(m,g)=>(a.openBlock(),a.createElementBlock("div",{class:"attribute-content","component-item-label":m,key:m},[a.createTextVNode(a.toDisplayString(o.capitalise(m))+" ",1),g!=r.entry.components.length-1?(a.openBlock(),a.createElementBlock("div",_wt)):a.createCommentVNode("",!0)],8,xwt))),128))])):a.createCommentVNode("",!0),r.entry.destinations&&r.entry.destinations.length>0?(a.openBlock(),a.createElementBlock("div",wwt,[a.createElementVNode("div",null,[Lwt,a.createVNode(d,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:a.withCtx(()=>[a.createVNode(l,{class:"info"},{default:a.withCtx(()=>[a.createVNode(u)]),_:1})]),default:a.withCtx(()=>[Swt]),_:1})]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.entry.destinations,(m,g)=>(a.openBlock(),a.createElementBlock("div",{class:"attribute-content","destination-item-label":m,key:m},[a.createTextVNode(a.toDisplayString(o.capitalise(m))+" ",1),g!=r.entry.destinations.length-1?(a.openBlock(),a.createElementBlock("div",kwt)):a.createCommentVNode("",!0)],8,Mwt))),128)),a.withDirectives(a.createVNode(h,{class:"button",onClick:o.openAxons},{default:a.withCtx(()=>[a.createTextVNode(" Explore destination data ")]),_:1},8,["onClick"]),[[a.vShow,r.entry.destinationsWithDatasets&&r.entry.destinationsWithDatasets.length>0]])])):a.createCommentVNode("",!0),a.withDirectives(a.createVNode(h,{class:"button",onClick:o.openAll},{default:a.withCtx(()=>[a.createTextVNode(" Search for data on components ")]),_:1},8,["onClick"]),[[a.vShow,r.entry.componentsWithDatasets&&r.entry.componentsWithDatasets.length>0]]),a.createVNode(p,{resources:o.resources},null,8,["resources"])],512),[[a.vShow,e.showDetails]])]),_:1})])),[[f,e.loading]]):a.createCommentVNode("",!0)}const R7e=Nh(awt,[["render",Cwt],["__scopeId","data-v-a3d0eed3"]]),Ewt={name:"AnnotationTool",components:{Button:l3,Col:Rh,Input:cI,Main:x7e,Row:c3,Select:$T,ElIconArrowUp:KP,ElIconArrowDown:F5,ElIconEdit:Mme,ElIconClose:NT},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(e){e&&(this.evidence.push(this.evidencePrefix+e),this.newEvidence="")},formatTime:function(e){const t={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"};return new Date(e).toLocaleDateString(void 0,t)},updatePrevSubmissions:function(){this.$annotator&&this.authenticated&&this.annotationEntry.resourceId&&this.annotationEntry.featureId&&this.$annotator.itemAnnotations(this.userApiKey,this.annotationEntry.resourceId,this.annotationEntry.featureId).then(e=>{this.prevSubs=e}).catch(e=>{console.log(e)})},submit:function(){if(this.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 e=[];this.evidence.forEach(r=>{if(r.includes("DOI:")){const n=r.replace("DOI:","https://doi.org/");e.push(new URL(n))}else if(r.includes("PMID:")){const n=r.replace("PMID:","https://pubmed.ncbi.nlm.nih.gov/");e.push(new URL(n))}});const t={resource:this.annotationEntry.resourceId,item:this.annotationEntry.featureId,body:{evidence:e,comment:this.comment},feature:this.annotationEntry.feature};Object.assign(t.body,this.annotationEntry.body),this.annotationEntry.type==="deleted"&&(t.feature=void 0),this.creator&&(t.creator=this.creator),this.$annotator.addAnnotation(this.userApiKey,t).then(()=>{this.$emit("annotation",t),this.errorMessage="",this.resetSubmission(),this.updatePrevSubmissions()}).catch(()=>{this.errorMessage="There is a problem with the submission, please try again later"})}},removeEvidence:function(e){this.evidence.splice(e,1)},resetSubmission:function(){this.editing=!1,this.evidence=[],this.newFeature="",this.comment=""}},watch:{annotationEntry:{handler:function(e,t){e!==t&&(this.resetSubmission(),this.updatePrevSubmissions())},immediate:!1,deep:!1}},mounted:function(){this.$annotator.authenticate(this.userApiKey).then(e=>{e.name&&e.email?(this.creator=e,e.orcid||(this.creator.orcid="0000-0000-0000-0000"),this.authenticated=!0,this.updatePrevSubmissions()):this.errorMessage=""})}},cg=e=>(a.pushScopeId("data-v-08d8c524"),e=e(),a.popScopeId(),e),Awt={class:"block"},Owt=cg(()=>a.createElementVNode("span",{class:"title"},"Feature Annotations",-1)),Pwt=cg(()=>a.createElementVNode("strong",{class:"sub-title"},"Previous submissions:",-1)),Iwt=cg(()=>a.createElementVNode("strong",null,"Evidence: ",-1)),Hwt=["href"],Vwt=cg(()=>a.createElementVNode("strong",null,"Comment: ",-1)),Rwt=cg(()=>a.createElementVNode("strong",{class:"sub-title"},"Suggest changes:",-1)),Nwt=cg(()=>a.createElementVNode("strong",null,"Evidence:",-1)),Bwt=cg(()=>a.createElementVNode("strong",null,"Comment:",-1)),Fwt={class:"sub-title"};function Dwt(e,t,r,n,i,o){const s=c3,l=KP,c=Fl,u=F5,d=Mme,h=P9t,p=V9t,f=Rh,m=NT,g=bI,T=$T,y=cI,v=l3,_=x7e;return a.openBlock(),a.createBlock(_,{class:"main"},{default:a.withCtx(()=>[a.createElementVNode("div",Awt,[a.createVNode(s,{class:"info-field"},{default:a.withCtx(()=>[Owt]),_:1}),r.annotationEntry?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.displayPair,(b,L)=>a.withDirectives((a.openBlock(),a.createBlock(s,{class:"dialog-text",key:b},{default:a.withCtx(()=>[a.createElementVNode("strong",null,a.toDisplayString(L)+": ",1),a.createTextVNode(" "+a.toDisplayString(r.annotationEntry[b]),1)]),_:2},1024)),[[a.vShow,r.annotationEntry[b]]])),128)),e.prevSubs.length>0?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.withDirectives(a.createElementVNode("div",{class:"hide",onClick:t[0]||(t[0]=b=>e.showSubmissions=!1)},[a.createTextVNode(" Hide previous submissions "),a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(l)]),_:1})],512),[[a.vShow,e.showSubmissions]]),a.withDirectives(a.createElementVNode("div",{class:"hide",onClick:t[1]||(t[1]=b=>e.showSubmissions=!0)},[a.createTextVNode(" Show previous "+a.toDisplayString(e.prevSubs.length)+" submission(s) ",1),a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(u)]),_:1})],512),[[a.vShow,!e.showSubmissions]]),e.showSubmissions?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createVNode(s,{class:"dialog-spacer"}),a.createVNode(s,{class:"dialog-text"},{default:a.withCtx(()=>[Pwt]),_:1}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.prevSubs,(b,L)=>(a.openBlock(),a.createElementBlock("div",{class:"entry",key:L},[a.createVNode(s,{class:"dialog-text"},{default:a.withCtx(()=>[a.createElementVNode("strong",null,a.toDisplayString(o.formatTime(b.created)),1),a.createTextVNode(" "+a.toDisplayString(b.creator.name),1)]),_:2},1024),a.createVNode(s,{class:"dialog-text"},{default:a.withCtx(()=>[Iwt,(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(b.body.evidence,w=>(a.openBlock(),a.createBlock(s,{key:w,class:"dialog-text"},{default:a.withCtx(()=>[a.createElementVNode("a",{href:w,target:"_blank"},a.toDisplayString(w),9,Hwt)]),_:2},1024))),128))]),_:2},1024),a.createVNode(s,{class:"dialog-text"},{default:a.withCtx(()=>[Vwt,a.createTextVNode(" "+a.toDisplayString(b.body.comment),1)]),_:2},1024)]))),128))],64)):a.createCommentVNode("",!0)],64)):a.createCommentVNode("",!0),e.authenticated?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[o.isEditable?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createVNode(s,{class:"dialog-spacer"}),e.editing?(a.openBlock(),a.createElementBlock(a.Fragment,{key:1},[a.createVNode(s,{class:"dialog-text"},{default:a.withCtx(()=>[Rwt]),_:1}),o.isDeleted?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createVNode(s,{class:"dialog-text"},{default:a.withCtx(()=>[Nwt]),_:1}),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.evidence,(b,L)=>(a.openBlock(),a.createBlock(s,{key:b},{default:a.withCtx(()=>[a.createVNode(f,{span:20},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(e.evidence[L]),1)]),_:2},1024),a.createVNode(f,{span:4},{default:a.withCtx(()=>[a.createVNode(c,{class:"standard-icon"},{default:a.withCtx(()=>[a.createVNode(m,{onClick:w=>o.removeEvidence(L)},null,8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128)),a.createVNode(s,null,{default:a.withCtx(()=>[a.createVNode(y,{size:"small",placeholder:"Enter",modelValue:e.newEvidence,"onUpdate:modelValue":t[4]||(t[4]=b=>e.newEvidence=b),onChange:t[5]||(t[5]=b=>o.evidenceEntered(b))},{prepend:a.withCtx(()=>[a.createVNode(T,{teleported:!1,modelValue:e.evidencePrefix,"onUpdate:modelValue":t[3]||(t[3]=b=>e.evidencePrefix=b),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.evidencePrefixes,b=>(a.openBlock(),a.createBlock(g,{key:b,label:b,value:b},{default:a.withCtx(()=>[a.createVNode(s,null,{default:a.withCtx(()=>[a.createVNode(f,{span:12},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(b),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])]),_:1})],64)),a.createVNode(s,null,{default:a.withCtx(()=>[Bwt]),_:1}),a.createVNode(s,{class:"dialog-text"},{default:a.withCtx(()=>[a.createVNode(y,{type:"textarea",autosize:{minRows:2,maxRows:4},placeholder:"Enter",modelValue:e.comment,"onUpdate:modelValue":t[6]||(t[6]=b=>e.comment=b)},null,8,["modelValue"])]),_:1}),a.createVNode(s,{class:"dialog-text"},{default:a.withCtx(()=>[a.createVNode(v,{class:"button",type:"primary",plain:"",onClick:o.submit},{default:a.withCtx(()=>[a.createTextVNode(" Submit ")]),_:1},8,["onClick"])]),_:1})],64)):(a.openBlock(),a.createBlock(s,{key:0},{default:a.withCtx(()=>[a.createVNode(c,{class:"standard-icon"},{default:a.withCtx(()=>[a.createVNode(d,{onClick:t[2]||(t[2]=b=>e.editing=!0)})]),_:1}),o.isDeleted?(a.openBlock(),a.createBlock(c,{key:0,class:"standard-icon"},{default:a.withCtx(()=>[a.createVNode(h,{onClick:o.submit},null,8,["onClick"])]),_:1})):o.isPositionUpdated?(a.openBlock(),a.createBlock(c,{key:1,class:"standard-icon"},{default:a.withCtx(()=>[a.createVNode(p,{onClick:o.submit},null,8,["onClick"])]),_:1})):a.createCommentVNode("",!0)]),_:1})),e.errorMessage?(a.openBlock(),a.createBlock(s,{key:2,class:"dialog-text"},{default:a.withCtx(()=>[a.createElementVNode("strong",Fwt,a.toDisplayString(e.errorMessage),1)]),_:1})):a.createCommentVNode("",!0)],64)):a.createCommentVNode("",!0)],64)):a.createCommentVNode("",!0)],64)):a.createCommentVNode("",!0)])]),_:1})}const N7e=Nh(Ewt,[["render",Dwt],["__scopeId","data-v-08d8c524"]]),zwt={name:"Tooltip",components:{AnnotationTool:N7e,ProvenancePopup:R7e},props:{entry:{type:Object},annotationDisplay:{type:Boolean,default:!1},annotationEntry:{type:Object}}},jwt={class:"tooltip-container",id:"tooltip-container"};function Uwt(e,t,r,n,i,o){const s=N7e,l=R7e;return a.openBlock(),a.createElementBlock("div",jwt,[r.annotationDisplay?(a.openBlock(),a.createBlock(s,{key:0,annotationEntry:r.annotationEntry,onAnnotation:t[0]||(t[0]=c=>e.$emit("annotation",c))},null,8,["annotationEntry"])):(a.openBlock(),a.createBlock(l,{key:1,entry:r.entry},null,8,["entry"]))])}const wK=Nh(zwt,[["render",Uwt],["__scopeId","data-v-8969055b"]]),Gwt={name:"SelectionsGroup",components:{Checkbox:gI,CheckboxGroup:fK,Col:Rh,Row:c3},methods:{reset:function(){this.checkAll=!0,this.checkedItems=[],this.selections.forEach(e=>{!("enabled"in e)||e.enabled===!0?this.checkedItems.push(e[this.identifierKey]):this.checkAll=!1})},visibilityToggle:function(e,t){this.$emit("changed",{key:e,value:t})},handleCheckedItemsChange:function(e){let t=e.length;this.checkAll=t===this.selections.length},handleCheckAllChange:function(e){this.checkedItems=e?this.selections.map(t=>t[this.identifierKey]):[],this.$emit("checkAll",{keys:this.selections.map(t=>t[this.identifierKey]),value:e})},getBackgroundStyles:function(e){return"colour"in e&&this.colourStyle==="background"?{background:e.colour}:{}},hasLineStyles:function(e){return"colour"in e&&this.colourStyle==="line"},getLineStyles:function(e){return"colour"in e&&this.colourStyle==="line"?"dashed"in e&&e.dashed===!0?{background:`repeating-linear-gradient(90deg,${e.colour},${e.colour} 6px,transparent 0,transparent 9px)`}:{background:e.colour}:{display:"None"}}},props:{colourStyle:{type:String,default:"line"},identifierKey:{type:String,default:"id"},labelKey:{type:String,default:"label"},title:{type:String,default:""},selections:{type:Array,default:function(){return[]}}},computed:{isIndeterminate:function(){return!(this.checkedItems.length===0||this.checkAll)}},data:function(){return{checkedItems:[],checkAll:!0}},mounted:function(){this.reset()}},Wwt={class:"selections-container"},qwt={class:"checkall-display-text"},Zwt={class:"checkbox-group-inner"},Xwt={class:"checkbox-container"};function Kwt(e,t,r,n,i,o){const s=Rh,l=gI,c=c3,u=fK;return a.openBlock(),a.createElementBlock("div",Wwt,[a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(s,{span:12},{default:a.withCtx(()=>[a.createElementVNode("div",qwt,a.toDisplayString(r.title),1)]),_:1}),a.createVNode(s,{span:12},{default:a.withCtx(()=>[r.selections&&r.selections.length>1?(a.openBlock(),a.createBlock(l,{key:0,class:"all-checkbox",indeterminate:o.isIndeterminate,modelValue:e.checkAll,"onUpdate:modelValue":t[0]||(t[0]=d=>e.checkAll=d),onChange:o.handleCheckAllChange},{default:a.withCtx(()=>[a.createTextVNode("Display all")]),_:1},8,["indeterminate","modelValue","onChange"])):a.createCommentVNode("",!0)]),_:1})]),_:1}),a.createVNode(u,{modelValue:e.checkedItems,"onUpdate:modelValue":t[1]||(t[1]=d=>e.checkedItems=d),size:"small",class:"checkbox-group",onChange:o.handleCheckedItemsChange},{default:a.withCtx(()=>[a.createElementVNode("div",Zwt,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.selections,d=>(a.openBlock(),a.createBlock(c,{key:d[r.identifierKey],label:d[r.identifierKey]},{default:a.withCtx(()=>[a.createElementVNode("div",Xwt,[a.createVNode(l,{class:"my-checkbox",label:d[r.identifierKey],onChange:h=>o.visibilityToggle(d[r.identifierKey],h),checked:!("enabled"in d)||d.enabled===!0},{default:a.withCtx(()=>[a.createVNode(c,{class:"checkbox-row"},{default:a.withCtx(()=>[o.hasLineStyles(d)?(a.openBlock(),a.createBlock(s,{key:0,span:4},{default:a.withCtx(()=>[a.createElementVNode("div",{class:"path-visual",style:a.normalizeStyle(o.getLineStyles(d))},null,4)]),_:2},1024)):a.createCommentVNode("",!0),a.createVNode(s,{span:20},{default:a.withCtx(()=>[a.createElementVNode("div",{style:a.normalizeStyle(o.getBackgroundStyles(d))},a.toDisplayString(d[r.labelKey]),5)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","onChange","checked"])])]),_:2},1032,["label"]))),128))])]),_:1},8,["modelValue","onChange"])])}const B7e=Nh(Gwt,[["render",Kwt],["__scopeId","data-v-4d3741da"]]),Ywt={name:"TreeControls",components:{Checkbox:gI,CheckboxGroup:fK,ColorPicker:pxt,Row:c3,Tree:P7e},props:{treeData:{type:Array,default:function(){return[]}},active:{type:String,default:""},hover:{type:String,default:""}},data:function(){return{defaultExpandedKeys:["All"]}},unmounted:function(){this.sortedPrimitiveGroups=void 0},methods:{nodeIsActive:function(e){return this.active===e.models},nodeIsHover:function(e){return this.hover===e.models},changeActiveByNode:function(e){e.models&&this.$emit("change-active",e.models)},changeHoverByNode:function(){},checkChanged:function(e,t){const r=t.checkedKeys.includes(e.key);e.key==="All"?this.$emit("checkAll",r):this.$emit("changed",{key:e.key,value:r})},getBackgroundStyles:function(e){return"colour"in e?{background:e.colour}:{}}}},Jwt=e=>(a.pushScopeId("data-v-df242013"),e=e(),a.popScopeId(),e),$wt={class:"container"},eLt=Jwt(()=>a.createElementVNode("div",{class:"title-text"},"Systems",-1)),tLt={class:"tree-container"},rLt=["onClick","onMouseover"];function nLt(e,t,r,n,i,o){const s=Rh,l=c3,c=P7e;return a.openBlock(),a.createElementBlock("div",$wt,[a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(s,{span:12},{default:a.withCtx(()=>[eLt]),_:1})]),_:1}),a.createElementVNode("div",tLt,[a.createVNode(c,{ref:"tree","node-key":"key","show-checkbox":"","check-strictly":!1,data:r.treeData,"render-after-expand":!1,"default-expanded-keys":e.defaultExpandedKeys,onCheck:o.checkChanged},{default:a.withCtx(({node:u,data:d})=>[a.createElementVNode("span",{class:a.normalizeClass(["region-tree-node",{activeItem:o.nodeIsActive(d),hoverItem:o.nodeIsHover(d)}]),onClick:h=>o.changeActiveByNode(d),onMouseover:h=>o.changeHoverByNode(d)},[a.createElementVNode("div",{style:a.normalizeStyle(o.getBackgroundStyles(d))},a.toDisplayString(u.label),5)],42,rLt)]),_:1},8,["data","default-expanded-keys","onCheck"])])])}const F7e=Nh(Ywt,[["render",nLt],["__scopeId","data-v-df242013"]]),iLt={name:"SvgLegends"},oLt=e=>(a.pushScopeId("data-v-88079d87"),e=e(),a.popScopeId(),e),aLt={class:"legends-container"},sLt={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"},lLt=a.createStaticVNode('<defs data-v-88079d87><bx:grid height="30.447" width="32.516" x="0" y="0" data-v-88079d87></bx:grid></defs><path class="st0 st0-translate" d="M61.3,103.8c-15.9,0-28.8-12.3-28.8-27.3c0-15,13-27.3,28.8-27.3s28.8,12.3,28.8,27.3 C90.1,91.5,77.2,103.8,61.3,103.8z" data-v-88079d87></path><path class="st1" d="M40.3,356.1C29.5,345,29.8,328,41.5,317.5c11.7-10.5,29.6-9.9,40.7,1.1c11.1,11,10.5,28.1-1.2,38.5 C69.3,367.4,51.1,366.9,40.3,356.1z" data-v-88079d87></path><path class="st2" d="M61.2,396.9c-5.3,9.3-15.3,15.1-26.1,15.1l-0.4,0.6c5.1,9,5.1,20,0,29l0.4,0.6c10.7,0,20.8,5.8,26.1,15.1 c5.3-9.3,15.3-15.1,26.1-15.1c-5.3-9.3-5.3-20.9,0-30.4C76.6,412.1,66.7,406.3,61.2,396.9z" data-v-88079d87></path><text transform="matrix(0.9908 0 0 1 118.0161 171.7975)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Tissue region </text><path class="st6" d="M40.9,231.1c11.3-10.6,29.5-10.6,40.8,0c11.3,10.6,11.3,27.9,0,38.5c-11.3,10.6-29.5,10.6-40.8,0 C29.7,259,29.7,241.7,40.9,231.1z" data-v-88079d87></path><text transform="matrix(0.9908 0 0 1 118.0161 257.675)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Brain nuclei </text><text transform="matrix(0.9908 0 0 1 118.0903 345.5266)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Ganglia </text><text transform="matrix(0.9908 0 0 1 118.0903 433.1613)" class="st3 st4 st5" style="white-space:pre;" data-v-88079d87> Ganglionated nerve plexus </text>',9),cLt=[lLt],uLt=oLt(()=>a.createElementVNode("svg",{width:"72px",height:"72px",viewBox:"0 0 24 24",fill:"yellow"},null,-1));function dLt(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",aLt,[(a.openBlock(),a.createElementBlock("svg",sLt,cLt)),uLt])}const D7e=Nh(iLt,[["render",dLt],["__scopeId","data-v-88079d87"]]),hLt='<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>',CI=function(e){return e?[...new Set(e.map(t=>JSON.stringify(t)))].map(t=>JSON.parse(t)):[]},yL={},z7e=async function(e,t){return yL&&yL.hasOwnProperty(t)?yL[t]:new Promise(r=>{fetch(`${e}knowledge/label/${t}`,{method:"GET"}).then(n=>n.json()).then(n=>{let i=n.label;i==="Mammalia"&&(i="Mammalia not otherwise specified"),yL[t]=i,r(i)}).catch(n=>{console.error("Error:",n),yL[t]=t,r(t)})})},EI=function(e,t){if(!e||!t)return!1;let r=JSON.stringify(e),n=JSON.stringify(t);return r.indexOf(n)!==-1};let pLt=function(){this.initialise=function(e){this.flatmapApi=e,this.destinations=[],this.origins=[],this.components=[],this.urls=[],this.controller=void 0,this.uberons=[],this.lookUp=[]},this.createTooltipData=async function(e){let t=[];e.feature.hyperlinks&&e.feature.hyperlinks.length>0?t=e.feature.hyperlinks:t=this.urls.map(n=>({url:n,id:"pubmed"}));let r;if(e.provenanceTaxonomy){r=[];for(let n=0;e.provenanceTaxonomy.length>n;n++)r.push(await z7e(this.flatmapAPI,e.provenanceTaxonomy[n]))}return{destinations:this.destinations,origins:this.origins,components:this.components,destinationsWithDatasets:this.destinationsWithDatasets,originsWithDatasets:this.originsWithDatasets,componentsWithDatasets:this.componentsWithDatasets,title:e.label,featureId:e.resource,hyperlinks:t,provenanceTaxonomy:e.provenanceTaxonomy,provenanceTaxonomyLabel:r}},this.createComponentsLabelList=function(e,t){let r=[];return e.forEach(n=>{r.push(this.createLabelFromNeuralNode(n[0]),t),n.length===2&&r.push(this.createLabelFromNeuralNode(n[1]),t)}),r},this.createLabelLookup=function(e){return new Promise(t=>{let r={};this.uberons=[];const n={sql:this.buildLabelSqlStatement(e)};fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then(i=>i.json()).then(i=>{const o=i.keys.indexOf("entity"),s=i.keys.indexOf("label");o>-1&&s>-1&&i.values.forEach(l=>{r[l[o]]=l[s],this.uberons.push({id:l[o],name:l[s]})}),t(r)})})},this.buildConnectivitySqlStatement=function(e){let t="select knowledge from knowledge where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.buildLabelSqlStatement=function(e){let t="select entity, label from labels where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.findAllIdsFromConnectivity=function(e){let t=e.connectivity.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),[...new Set(n.flat())]},this.flattenConntectivity=function(e){let t=e.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),n.flat()},this.findComponents=function(e){let t=e.connectivity.flat(),r=CI(t),n=[],i=!1;return r.forEach(o=>{i=!1,EI(e.axons,o)&&(i=!0),EI(e.dendrites,o)&&(i=!0),i||n.push(o)}),n},this.retrieveFlatmapKnowledgeForEvent=async function(e){this.controller&&this.controller.abort(),this.controller=new AbortController;const t=this.controller.signal,r=e.resource;if(this.destinations=[],this.origins=[],this.components=[],!r||r.length==0)return;const n={sql:this.buildConnectivitySqlStatement(r)};let i=new Promise(s=>{fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),signal:t}).then(l=>l.json()).then(l=>{if(this.connectivityExists(l)){let c=JSON.parse(l.values[0][0]);this.processConnectivity(c).then(()=>{s(!0)})}else s(!1)}).catch(l=>{console.error("Error:",l),s(!1)})}),o=await this.pubmedQueryOnIds(e);return await Promise.all([i,o])},this.connectivityExists=function(e){return!!(e.values&&e.values.length>0&&JSON.parse(e.values[0][0]).connectivity&&JSON.parse(e.values[0][0]).connectivity.length>0)},this.createLabelFromNeuralNode=function(e,t){let r=t[e[0]];return e.length===2&&e[1].length>0&&e[1].forEach(n=>{t[n]==null?r+=`, ${n}`:r+=`, ${t[n]}`}),r},this.flattenAndFindDatasets=function(e,t,r){let n=this.flattenConntectivity(e),i=this.flattenConntectivity(t),o=this.flattenConntectivity(r);this.destinationsWithDatasets=this.uberons.filter(s=>i.indexOf(s.id)!==-1),this.originsWithDatasets=this.uberons.filter(s=>o.indexOf(s.id)!==-1),this.componentsWithDatasets=this.uberons.filter(s=>n.indexOf(s.id)!==-1)},this.processConnectivity=function(e){return new Promise(t=>{let r=this.findComponents(e),n=CI(e.axons),i=CI(e.dendrites),o=this.findAllIdsFromConnectivity(e);this.createLabelLookup(o).then(s=>{this.destinations=n.map(l=>this.createLabelFromNeuralNode(l,s)),this.origins=i.map(l=>this.createLabelFromNeuralNode(l,s)),this.components=r.map(l=>this.createLabelFromNeuralNode(l,s)),this.flattenAndFindDatasets(r,n,i),t(!0)})})},this.flattenConntectivity=function(e){let t=e.flat(),r=[...new Set(t)],n=[];return r.forEach(i=>{Array.isArray(i)?n.push(i.flat()):n.push(i)}),n.flat()},this.findComponents=function(e){let t=e.connectivity.flat(),r=CI(t),n=[],i=!1;return r.forEach(o=>{i=!1,EI(e.axons,o)&&(i=!0),EI(e.dendrites,o)&&(i=!0),i||n.push(o)}),n},this.stripPMIDPrefix=function(e){return e.split(":")[1]},this.buildPubmedSqlStatement=function(e){let t="select distinct publication from publications where entity in (";if(e.length===1)t+=`'${e[0]}')`;else if(e.length>1)for(let r in e)t+=`'${e[r]}'${r>=e.length-1?")":","} `;return t},this.buildPubmedSqlStatementForModels=function(e){return`select distinct publication from publications where entity = '${e}'`},this.flatmapQuery=function(e){const t={sql:e};return fetch(`${this.flatmapApi}knowledge/query/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(r=>r.json()).catch(r=>{console.error("Error:",r)})},this.pubmedQueryOnIds=function(e){return new Promise(t=>{const r=e.resource,n=e.feature.source;if(!r||r.length===0)return;const i=this.buildPubmedSqlStatement(r);this.flatmapQuery(i).then(o=>{o.values.length>0?(this.urls=[this.pubmedSearchUrl(o.values.map(s=>this.stripPMIDPrefix(s[0])))],t(!0)):this.pubmedQueryOnModels(n).then(s=>{t(s)})})})},this.pubmedQueryOnModels=function(e){return this.flatmapQuery(this.buildPubmedSqlStatementForModels(e)).then(t=>Array.isArray(t.values)&&t.values.length>0?(this.urls=[this.pubmedSearchUrl(t.values.map(r=>this.stripPMIDPrefix(r[0])))],!0):(this.urls=[],!1))},this.pubmedSearchUrl=function(e){let t="https://pubmed.ncbi.nlm.nih.gov/?",r=new URLSearchParams;return r.append("term",e),t+r.toString()}};const fLt='<svg width="195px" height="24px" viewBox="0 0 200 24" fill="yellow"><path d="M22.0748 3.25583C22.4141 2.42845 23.5859 2.42845 23.9252 3.25583L25.6493 7.45955C25.793 7.80979 26.1221 8.04889 26.4995 8.07727L31.0303 8.41798C31.922 8.48504 32.2841 9.59942 31.6021 10.1778L28.1369 13.1166C27.8482 13.3614 27.7225 13.7483 27.8122 14.1161L28.8882 18.5304C29.1 19.3992 28.152 20.0879 27.3912 19.618L23.5255 17.2305C23.2034 17.0316 22.7966 17.0316 22.4745 17.2305L18.60881 19.618C17.84796 20.0879 16.9 19.3992 17.1118 18.5304L18.18785 14.1161C18.2775 13.7483 18.1518 13.3614 17.86309 13.1166L14.3979 10.1778C13.71588 9.59942 14.07796 8.48504 14.96971 8.41798L19.50046 8.07727C19.87794 8.04889 20.20704 7.80979 20.35068 7.45955L22.0748 3.25583Z" stroke="#000000" stroke-width="2"/><text x="42" y="50%" dominant-baseline="middle" text-anchor="start" font-family="Asap, sans-serif" font-size="12" fill="#000000">Featured dataset marker</text></svg>';var j7e={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(typeof window<"u"?window:ce,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(d){return r.setTimeout(d,20)},i=r.cancelAnimationFrame||r.mozCancelAnimationFrame||r.webkitCancelAnimationFrame||function(d){r.clearTimeout(d)};function o(d,h){var p=Object.prototype.toString.call(d),f=p==="[object Array]"||p==="[object NodeList]"||p==="[object HTMLCollection]"||p==="[object Object]"||typeof jQuery<"u"&&d instanceof jQuery||typeof Elements<"u"&&d instanceof Elements,m=0,g=d.length;if(f)for(;m<g;m++)h(d[m]);else h(d)}function s(d){if(!d.getBoundingClientRect)return{width:d.offsetWidth,height:d.offsetHeight};var h=d.getBoundingClientRect();return{width:Math.round(h.width),height:Math.round(h.height)}}function l(d,h){Object.keys(h).forEach(function(p){d.style[p]=h[p]})}var c=function(d,h){var p=0;function f(){var g=[];this.add=function(v){g.push(v)};var T,y;this.call=function(v){for(T=0,y=g.length;T<y;T++)g[T].call(this,v)},this.remove=function(v){var _=[];for(T=0,y=g.length;T<y;T++)g[T]!==v&&_.push(g[T]);g=_},this.length=function(){return g.length}}function m(g,T){if(g){if(g.resizedAttached){g.resizedAttached.add(T);return}g.resizedAttached=new f,g.resizedAttached.add(T),g.resizeSensor=document.createElement("div"),g.resizeSensor.dir="ltr",g.resizeSensor.className="resize-sensor";var y={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"};l(g.resizeSensor,y);var _=document.createElement("div");_.className="resize-sensor-expand",l(_,y);var b=document.createElement("div");l(b,v),_.appendChild(b);var L=document.createElement("div");L.className="resize-sensor-shrink",l(L,y);var w=document.createElement("div");l(w,v),l(w,{width:"200%",height:"200%"}),L.appendChild(w),g.resizeSensor.appendChild(_),g.resizeSensor.appendChild(L),g.appendChild(g.resizeSensor);var M=window.getComputedStyle(g),C=M?M.getPropertyValue("position"):null;C!=="absolute"&&C!=="relative"&&C!=="fixed"&&C!=="sticky"&&(g.style.position="relative");var A=!1,O=0,V=s(g),H=0,N=0,D=!0;p=0;var j=function(){var U=g.offsetWidth,K=g.offsetHeight;b.style.width=U+10+"px",b.style.height=K+10+"px",_.scrollLeft=U+10,_.scrollTop=K+10,L.scrollLeft=U+10,L.scrollTop=K+10},G=function(){if(D){var U=g.offsetWidth===0&&g.offsetHeight===0;if(U){p||(p=n(function(){p=0,G()}));return}else D=!1}j()};g.resizeSensor.resetSensor=G;var R=function(){O=0,A&&(H=V.width,N=V.height,g.resizedAttached&&g.resizedAttached.call(V))},Z=function(){V=s(g),A=V.width!==H||V.height!==N,A&&!O&&(O=n(R)),G()},X=function(U,K,$){U.attachEvent?U.attachEvent("on"+K,$):U.addEventListener(K,$)};X(_,"scroll",Z),X(L,"scroll",Z),p=n(function(){p=0,G()})}}o(d,function(g){m(g,h)}),this.detach=function(g){p||(i(p),p=0),c.detach(d,g)},this.reset=function(){d.resizeSensor.resetSensor()}};if(c.reset=function(d){o(d,function(h){h.resizeSensor.resetSensor()})},c.detach=function(d,h){o(d,function(p){p&&(p.resizedAttached&&typeof h=="function"&&(p.resizedAttached.remove(h),p.resizedAttached.length())||p.resizeSensor&&(p.contains(p.resizeSensor)&&p.removeChild(p.resizeSensor),delete p.resizeSensor,delete p.resizedAttached))})},typeof MutationObserver<"u"){var u=new MutationObserver(function(d){for(var h in d)if(d.hasOwnProperty(h))for(var p=d[h].addedNodes,f=0;f<p.length;f++)p[f].resizeSensor&&c.reset(p[f])});document.addEventListener("DOMContentLoaded",function(d){u.observe(document.body,{childList:!0,subtree:!0})})}return c})})(j7e);var mLt=j7e.exports;const gLt=KT(mLt);var U7e={exports:{}};/**
|
501
501
|
* MapLibre GL JS
|
502
502
|
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.1.1/LICENSE.txt
|
503
503
|
*/(function(e,t){(function(r,n){e.exports=n()})(ce,function(){var r={},n={};function i(s,l,c){if(n[s]=c,s==="index"){var u="var sharedModule = {}; ("+n.shared+")(sharedModule); ("+n.worker+")(sharedModule);",d={};return n.shared(d),n.index(r,d),typeof window<"u"&&r.setWorkerUrl(window.URL.createObjectURL(new Blob([u],{type:"text/javascript"}))),r}}i("shared",["exports"],function(s){function l(S,Q,k,P){return new(k||(k=Promise))(function(z,ee){function te(Oe){try{xe(P.next(Oe))}catch(Ue){ee(Ue)}}function ue(Oe){try{xe(P.throw(Oe))}catch(Ue){ee(Ue)}}function xe(Oe){var Ue;Oe.done?z(Oe.value):(Ue=Oe.value,Ue instanceof k?Ue:new k(function(Je){Je(Ue)})).then(te,ue)}xe((P=P.apply(S,Q||[])).next())})}function c(S){return S&&S.__esModule&&Object.prototype.hasOwnProperty.call(S,"default")?S.default:S}typeof SuppressedError=="function"&&SuppressedError;var u=d;function d(S,Q){this.x=S,this.y=Q}d.prototype={clone:function(){return new d(this.x,this.y)},add:function(S){return this.clone()._add(S)},sub:function(S){return this.clone()._sub(S)},multByPoint:function(S){return this.clone()._multByPoint(S)},divByPoint:function(S){return this.clone()._divByPoint(S)},mult:function(S){return this.clone()._mult(S)},div:function(S){return this.clone()._div(S)},rotate:function(S){return this.clone()._rotate(S)},rotateAround:function(S,Q){return this.clone()._rotateAround(S,Q)},matMult:function(S){return this.clone()._matMult(S)},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(S){return this.x===S.x&&this.y===S.y},dist:function(S){return Math.sqrt(this.distSqr(S))},distSqr:function(S){var Q=S.x-this.x,k=S.y-this.y;return Q*Q+k*k},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(S){return Math.atan2(this.y-S.y,this.x-S.x)},angleWith:function(S){return this.angleWithSep(S.x,S.y)},angleWithSep:function(S,Q){return Math.atan2(this.x*Q-this.y*S,this.x*S+this.y*Q)},_matMult:function(S){var Q=S[2]*this.x+S[3]*this.y;return this.x=S[0]*this.x+S[1]*this.y,this.y=Q,this},_add:function(S){return this.x+=S.x,this.y+=S.y,this},_sub:function(S){return this.x-=S.x,this.y-=S.y,this},_mult:function(S){return this.x*=S,this.y*=S,this},_div:function(S){return this.x/=S,this.y/=S,this},_multByPoint:function(S){return this.x*=S.x,this.y*=S.y,this},_divByPoint:function(S){return this.x/=S.x,this.y/=S.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var S=this.y;return this.y=this.x,this.x=-S,this},_rotate:function(S){var Q=Math.cos(S),k=Math.sin(S),P=k*this.x+Q*this.y;return this.x=Q*this.x-k*this.y,this.y=P,this},_rotateAround:function(S,Q){var k=Math.cos(S),P=Math.sin(S),z=Q.y+P*(this.x-Q.x)+k*(this.y-Q.y);return this.x=Q.x+k*(this.x-Q.x)-P*(this.y-Q.y),this.y=z,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},d.convert=function(S){return S instanceof d?S:Array.isArray(S)?new d(S[0],S[1]):S};var h=c(u),p=f;function f(S,Q,k,P){this.cx=3*S,this.bx=3*(k-S)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*Q,this.by=3*(P-Q)-this.cy,this.ay=1-this.cy-this.by,this.p1x=S,this.p1y=Q,this.p2x=k,this.p2y=P}f.prototype={sampleCurveX:function(S){return((this.ax*S+this.bx)*S+this.cx)*S},sampleCurveY:function(S){return((this.ay*S+this.by)*S+this.cy)*S},sampleCurveDerivativeX:function(S){return(3*this.ax*S+2*this.bx)*S+this.cx},solveCurveX:function(S,Q){if(Q===void 0&&(Q=1e-6),S<0)return 0;if(S>1)return 1;for(var k=S,P=0;P<8;P++){var z=this.sampleCurveX(k)-S;if(Math.abs(z)<Q)return k;var ee=this.sampleCurveDerivativeX(k);if(Math.abs(ee)<1e-6)break;k-=z/ee}var te=0,ue=1;for(k=S,P=0;P<20&&(z=this.sampleCurveX(k),!(Math.abs(z-S)<Q));P++)S>z?te=k:ue=k,k=.5*(ue-te)+te;return k},solve:function(S,Q){return this.sampleCurveY(this.solveCurveX(S,Q))}};var m=c(p);let g,T;function y(){return g==null&&(g=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),g}function v(){if(T==null&&(T=!1,y())){const S=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(S){for(let k=0;k<5*5;k++){const P=4*k;S.fillStyle=`rgb(${P},${P+1},${P+2})`,S.fillRect(k%5,Math.floor(k/5),1,1)}const Q=S.getImageData(0,0,5,5).data;for(let k=0;k<5*5*4;k++)if(k%4!=3&&Q[k]!==k){T=!0;break}}}return T||!1}function _(S,Q,k,P){const z=new m(S,Q,k,P);return function(ee){return z.solve(ee)}}const b=_(.25,.1,.25,1);function L(S,Q,k){return Math.min(k,Math.max(Q,S))}function w(S,Q,k){const P=k-Q,z=((S-Q)%P+P)%P+Q;return z===Q?k:z}function M(S,...Q){for(const k of Q)for(const P in k)S[P]=k[P];return S}let C=1;function A(S,Q,k){const P={};for(const z in S)P[z]=Q.call(k||this,S[z],z,S);return P}function O(S,Q,k){const P={};for(const z in S)Q.call(k||this,S[z],z,S)&&(P[z]=S[z]);return P}function V(S){return Array.isArray(S)?S.map(V):typeof S=="object"&&S?A(S,V):S}const H={};function N(S){H[S]||(typeof console<"u"&&console.warn(S),H[S]=!0)}function D(S,Q,k){return(k.y-S.y)*(Q.x-S.x)>(Q.y-S.y)*(k.x-S.x)}function j(S){let Q=0;for(let k,P,z=0,ee=S.length,te=ee-1;z<ee;te=z++)k=S[z],P=S[te],Q+=(P.x-k.x)*(k.y+P.y);return Q}function G(S){return typeof WorkerGlobalScope<"u"&&S!==void 0&&S instanceof WorkerGlobalScope}let R=null;function Z(S){return typeof ImageBitmap<"u"&&S instanceof ImageBitmap}const X="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function U(S,Q,k,P,z){return l(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const ee=new VideoFrame(S,{timestamp:0});try{const te=ee==null?void 0:ee.format;if(!te||!te.startsWith("BGR")&&!te.startsWith("RGB"))throw new Error(`Unrecognized format ${te}`);const ue=te.startsWith("BGR"),xe=new Uint8ClampedArray(P*z*4);if(yield ee.copyTo(xe,function(Oe,Ue,Je,lt,mt){const bt=4*Math.max(-Ue,0),Et=(Math.max(0,Je)-Je)*lt*4+bt,Bt=4*lt,Xt=Math.max(0,Ue),fr=Math.max(0,Je);return{rect:{x:Xt,y:fr,width:Math.min(Oe.width,Ue+lt)-Xt,height:Math.min(Oe.height,Je+mt)-fr},layout:[{offset:Et,stride:Bt}]}}(S,Q,k,P,z)),ue)for(let Oe=0;Oe<xe.length;Oe+=4){const Ue=xe[Oe];xe[Oe]=xe[Oe+2],xe[Oe+2]=Ue}return xe}finally{ee.close()}})}let K,$;const le="AbortError";function me(){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 ae(S){return ge.REGISTERED_PROTOCOLS[S.substring(0,S.indexOf("://"))]}const Qe="global-dispatcher";class ne extends Error{constructor(Q,k,P,z){super(`AJAXError: ${k} (${Q}): ${P}`),this.status=Q,this.statusText=k,this.url=P,this.body=z}}const de=()=>G(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,ie=function(S,Q){if(/:\/\//.test(S.url)&&!/^https?:|^file:/.test(S.url)){const P=ae(S.url);if(P)return P(S,Q);if(G(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"getResource",data:S,targetMapId:Qe},Q)}if(!(/^file:/.test(k=S.url)||/^file:/.test(de())&&!/^\w+:/.test(k))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(P,z){return l(this,void 0,void 0,function*(){const ee=new Request(P.url,{method:P.method||"GET",body:P.body,credentials:P.credentials,headers:P.headers,cache:P.cache,referrer:de(),signal:z.signal});P.type==="json"&&ee.headers.set("Accept","application/json");const te=yield fetch(ee);if(!te.ok){const Oe=yield te.blob();throw new ne(te.status,te.statusText,P.url,Oe)}let ue;ue=P.type==="arrayBuffer"||P.type==="image"?te.arrayBuffer():P.type==="json"?te.json():te.text();const xe=yield ue;if(z.signal.aborted)throw me();return{data:xe,cacheControl:te.headers.get("Cache-Control"),expires:te.headers.get("Expires")}})}(S,Q);if(G(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"getResource",data:S,mustQueue:!0,targetMapId:Qe},Q)}var k;return function(P,z){return new Promise((ee,te)=>{const ue=new XMLHttpRequest;ue.open(P.method||"GET",P.url,!0),P.type!=="arrayBuffer"&&P.type!=="image"||(ue.responseType="arraybuffer");for(const xe in P.headers)ue.setRequestHeader(xe,P.headers[xe]);P.type==="json"&&(ue.responseType="text",ue.setRequestHeader("Accept","application/json")),ue.withCredentials=P.credentials==="include",ue.onerror=()=>{te(new Error(ue.statusText))},ue.onload=()=>{if(!z.signal.aborted)if((ue.status>=200&&ue.status<300||ue.status===0)&&ue.response!==null){let xe=ue.response;if(P.type==="json")try{xe=JSON.parse(ue.response)}catch(Oe){return void te(Oe)}ee({data:xe,cacheControl:ue.getResponseHeader("Cache-Control"),expires:ue.getResponseHeader("Expires")})}else{const xe=new Blob([ue.response],{type:ue.getResponseHeader("Content-Type")});te(new ne(ue.status,ue.statusText,P.url,xe))}},z.signal.addEventListener("abort",()=>{ue.abort(),te(me())}),ue.send(P.body)})}(S,Q)};function Te(S){if(!S||S.indexOf("://")<=0||S.indexOf("data:image/")===0||S.indexOf("blob:")===0)return!0;const Q=new URL(S),k=window.location;return Q.protocol===k.protocol&&Q.host===k.host}function Se(S,Q,k){k[S]&&k[S].indexOf(Q)!==-1||(k[S]=k[S]||[],k[S].push(Q))}function Ie(S,Q,k){if(k&&k[S]){const P=k[S].indexOf(Q);P!==-1&&k[S].splice(P,1)}}class Ge{constructor(Q,k={}){M(this,k),this.type=Q}}class je extends Ge{constructor(Q,k={}){super("error",M({error:Q},k))}}class rt{on(Q,k){return this._listeners=this._listeners||{},Se(Q,k,this._listeners),this}off(Q,k){return Ie(Q,k,this._listeners),Ie(Q,k,this._oneTimeListeners),this}once(Q,k){return k?(this._oneTimeListeners=this._oneTimeListeners||{},Se(Q,k,this._oneTimeListeners),this):new Promise(P=>this.once(Q,P))}fire(Q,k){typeof Q=="string"&&(Q=new Ge(Q,k||{}));const P=Q.type;if(this.listens(P)){Q.target=this;const z=this._listeners&&this._listeners[P]?this._listeners[P].slice():[];for(const ue of z)ue.call(this,Q);const ee=this._oneTimeListeners&&this._oneTimeListeners[P]?this._oneTimeListeners[P].slice():[];for(const ue of ee)Ie(P,ue,this._oneTimeListeners),ue.call(this,Q);const te=this._eventedParent;te&&(M(Q,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),te.fire(Q))}else Q instanceof je&&console.error(Q.error);return this}listens(Q){return this._listeners&&this._listeners[Q]&&this._listeners[Q].length>0||this._oneTimeListeners&&this._oneTimeListeners[Q]&&this._oneTimeListeners[Q].length>0||this._eventedParent&&this._eventedParent.listens(Q)}setEventedParent(Q,k){return this._eventedParent=Q,this._eventedParentData=k,this}}var Me={$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 Be=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function ut(S,Q){const k={};for(const P in S)P!=="ref"&&(k[P]=S[P]);return Be.forEach(P=>{P in Q&&(k[P]=Q[P])}),k}function et(S,Q){if(Array.isArray(S)){if(!Array.isArray(Q)||S.length!==Q.length)return!1;for(let k=0;k<S.length;k++)if(!et(S[k],Q[k]))return!1;return!0}if(typeof S=="object"&&S!==null&&Q!==null){if(typeof Q!="object"||Object.keys(S).length!==Object.keys(Q).length)return!1;for(const k in S)if(!et(S[k],Q[k]))return!1;return!0}return S===Q}function yt(S,Q){S.push(Q)}function At(S,Q,k){yt(k,{command:"addSource",args:[S,Q[S]]})}function vt(S,Q,k){yt(Q,{command:"removeSource",args:[S]}),k[S]=!0}function _e(S,Q,k,P){vt(S,k,P),At(S,Q,k)}function qe(S,Q,k){let P;for(P in S[k])if(Object.prototype.hasOwnProperty.call(S[k],P)&&P!=="data"&&!et(S[k][P],Q[k][P]))return!1;for(P in Q[k])if(Object.prototype.hasOwnProperty.call(Q[k],P)&&P!=="data"&&!et(S[k][P],Q[k][P]))return!1;return!0}function at(S,Q,k,P,z,ee){S=S||{},Q=Q||{};for(const te in S)Object.prototype.hasOwnProperty.call(S,te)&&(et(S[te],Q[te])||k.push({command:ee,args:[P,te,Q[te],z]}));for(const te in Q)Object.prototype.hasOwnProperty.call(Q,te)&&!Object.prototype.hasOwnProperty.call(S,te)&&(et(S[te],Q[te])||k.push({command:ee,args:[P,te,Q[te],z]}))}function ht(S){return S.id}function zt(S,Q){return S[Q.id]=Q,S}class wt{constructor(Q,k,P,z){this.message=(Q?`${Q}: `:"")+P,z&&(this.identifier=z),k!=null&&k.__line__&&(this.line=k.__line__)}}function Gt(S,...Q){for(const k of Q)for(const P in k)S[P]=k[P];return S}class Zt extends Error{constructor(Q,k){super(k),this.message=k,this.key=Q}}class Tt{constructor(Q,k=[]){this.parent=Q,this.bindings={};for(const[P,z]of k)this.bindings[P]=z}concat(Q){return new Tt(this,Q)}get(Q){if(this.bindings[Q])return this.bindings[Q];if(this.parent)return this.parent.get(Q);throw new Error(`${Q} not found in scope.`)}has(Q){return!!this.bindings[Q]||!!this.parent&&this.parent.has(Q)}}const Lt={kind:"null"},Qt={kind:"number"},Ut={kind:"string"},Wt={kind:"boolean"},mr={kind:"color"},pt={kind:"object"},Ft={kind:"value"},Nt={kind:"collator"},dr={kind:"formatted"},ot={kind:"padding"},Fe={kind:"resolvedImage"},ze={kind:"variableAnchorOffsetCollection"};function Ke(S,Q){return{kind:"array",itemType:S,N:Q}}function $e(S){if(S.kind==="array"){const Q=$e(S.itemType);return typeof S.N=="number"?`array<${Q}, ${S.N}>`:S.itemType.kind==="value"?"array":`array<${Q}>`}return S.kind}const St=[Lt,Qt,Ut,Wt,mr,dr,pt,Ke(Ft),ot,Fe,ze];function we(S,Q){if(Q.kind==="error")return null;if(S.kind==="array"){if(Q.kind==="array"&&(Q.N===0&&Q.itemType.kind==="value"||!we(S.itemType,Q.itemType))&&(typeof S.N!="number"||S.N===Q.N))return null}else{if(S.kind===Q.kind)return null;if(S.kind==="value"){for(const k of St)if(!we(k,Q))return null}}return`Expected ${$e(S)} but found ${$e(Q)} instead.`}function De(S,Q){return Q.some(k=>k.kind===S.kind)}function Ve(S,Q){return Q.some(k=>k==="null"?S===null:k==="array"?Array.isArray(S):k==="object"?S&&!Array.isArray(S)&&typeof S=="object":k===typeof S)}function Ae(S,Q){return S.kind==="array"&&Q.kind==="array"?S.itemType.kind===Q.itemType.kind&&typeof S.N=="number":S.kind===Q.kind}const ke=.96422,Ne=.82521,nt=4/29,oe=6/29,Le=3*oe*oe,Xe=oe*oe*oe,_t=Math.PI/180,jt=180/Math.PI;function or(S){return(S%=360)<0&&(S+=360),S}function pr([S,Q,k,P]){let z,ee;const te=ir((.2225045*(S=yr(S))+.7168786*(Q=yr(Q))+.0606169*(k=yr(k)))/1);S===Q&&Q===k?z=ee=te:(z=ir((.4360747*S+.3850649*Q+.1430804*k)/ke),ee=ir((.0139322*S+.0971045*Q+.7141733*k)/Ne));const ue=116*te-16;return[ue<0?0:ue,500*(z-te),200*(te-ee),P]}function yr(S){return S<=.04045?S/12.92:Math.pow((S+.055)/1.055,2.4)}function ir(S){return S>Xe?Math.pow(S,1/3):S/Le+nt}function Qr([S,Q,k,P]){let z=(S+16)/116,ee=isNaN(Q)?z:z+Q/500,te=isNaN(k)?z:z-k/200;return z=1*qr(z),ee=ke*qr(ee),te=Ne*qr(te),[pn(3.1338561*ee-1.6168667*z-.4906146*te),pn(-.9787684*ee+1.9161415*z+.033454*te),pn(.0719453*ee-.2289914*z+1.4052427*te),P]}function pn(S){return(S=S<=.00304?12.92*S:1.055*Math.pow(S,1/2.4)-.055)<0?0:S>1?1:S}function qr(S){return S>oe?S*S*S:Le*(S-nt)}function Pr(S){return parseInt(S.padEnd(2,S),16)/255}function Wr(S,Q){return vn(Q?S/100:S,0,1)}function vn(S,Q,k){return Math.min(Math.max(Q,S),k)}function $r(S){return!S.some(Number.isNaN)}const cn={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 kr{constructor(Q,k,P,z=1,ee=!0){this.r=Q,this.g=k,this.b=P,this.a=z,ee||(this.r*=z,this.g*=z,this.b*=z,z||this.overwriteGetter("rgb",[Q,k,P,z]))}static parse(Q){if(Q instanceof kr)return Q;if(typeof Q!="string")return;const k=function(P){if((P=P.toLowerCase().trim())==="transparent")return[0,0,0,0];const z=cn[P];if(z){const[te,ue,xe]=z;return[te/255,ue/255,xe/255,1]}if(P.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(P)){const te=P.length<6?1:2;let ue=1;return[Pr(P.slice(ue,ue+=te)),Pr(P.slice(ue,ue+=te)),Pr(P.slice(ue,ue+=te)),Pr(P.slice(ue,ue+te)||"ff")]}if(P.startsWith("rgb")){const te=P.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(te){const[ue,xe,Oe,Ue,Je,lt,mt,bt,Et,Bt,Xt,fr]=te,tr=[Ue||" ",mt||" ",Bt].join("");if(tr===" "||tr===" /"||tr===",,"||tr===",,,"){const ur=[Oe,lt,Et].join(""),Er=ur==="%%%"?100:ur===""?255:0;if(Er){const Ir=[vn(+xe/Er,0,1),vn(+Je/Er,0,1),vn(+bt/Er,0,1),Xt?Wr(+Xt,fr):1];if($r(Ir))return Ir}}return}}const ee=P.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(ee){const[te,ue,xe,Oe,Ue,Je,lt,mt,bt]=ee,Et=[xe||" ",Ue||" ",lt].join("");if(Et===" "||Et===" /"||Et===",,"||Et===",,,"){const Bt=[+ue,vn(+Oe,0,100),vn(+Je,0,100),mt?Wr(+mt,bt):1];if($r(Bt))return function([Xt,fr,tr,ur]){function Er(Ir){const yn=(Ir+Xt/30)%12,On=fr*Math.min(tr,1-tr);return tr-On*Math.max(-1,Math.min(yn-3,9-yn,1))}return Xt=or(Xt),fr/=100,tr/=100,[Er(0),Er(8),Er(4),ur]}(Bt)}}}(Q);return k?new kr(...k,!1):void 0}get rgb(){const{r:Q,g:k,b:P,a:z}=this,ee=z||1/0;return this.overwriteGetter("rgb",[Q/ee,k/ee,P/ee,z])}get hcl(){return this.overwriteGetter("hcl",function(Q){const[k,P,z,ee]=pr(Q),te=Math.sqrt(P*P+z*z);return[Math.round(1e4*te)?or(Math.atan2(z,P)*jt):NaN,te,k,ee]}(this.rgb))}get lab(){return this.overwriteGetter("lab",pr(this.rgb))}overwriteGetter(Q,k){return Object.defineProperty(this,Q,{value:k}),k}toString(){const[Q,k,P,z]=this.rgb;return`rgba(${[Q,k,P].map(ee=>Math.round(255*ee)).join(",")},${z})`}}kr.black=new kr(0,0,0,1),kr.white=new kr(1,1,1,1),kr.transparent=new kr(0,0,0,0),kr.red=new kr(1,0,0,1);class Zr{constructor(Q,k,P){this.sensitivity=Q?k?"variant":"case":k?"accent":"base",this.locale=P,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(Q,k){return this.collator.compare(Q,k)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class nn{constructor(Q,k,P,z,ee){this.text=Q,this.image=k,this.scale=P,this.fontStack=z,this.textColor=ee}}class Cn{constructor(Q){this.sections=Q}static fromString(Q){return new Cn([new nn(Q,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(Q=>Q.text.length!==0||Q.image&&Q.image.name.length!==0)}static factory(Q){return Q instanceof Cn?Q:Cn.fromString(Q)}toString(){return this.sections.length===0?"":this.sections.map(Q=>Q.text).join("")}}class Ur{constructor(Q){this.values=Q.slice()}static parse(Q){if(Q instanceof Ur)return Q;if(typeof Q=="number")return new Ur([Q,Q,Q,Q]);if(Array.isArray(Q)&&!(Q.length<1||Q.length>4)){for(const k of Q)if(typeof k!="number")return;switch(Q.length){case 1:Q=[Q[0],Q[0],Q[0],Q[0]];break;case 2:Q=[Q[0],Q[1],Q[0],Q[1]];break;case 3:Q=[Q[0],Q[1],Q[2],Q[1]]}return new Ur(Q)}}toString(){return JSON.stringify(this.values)}}const Mn=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Yr{constructor(Q){this.values=Q.slice()}static parse(Q){if(Q instanceof Yr)return Q;if(Array.isArray(Q)&&!(Q.length<1)&&Q.length%2==0){for(let k=0;k<Q.length;k+=2){const P=Q[k],z=Q[k+1];if(typeof P!="string"||!Mn.has(P)||!Array.isArray(z)||z.length!==2||typeof z[0]!="number"||typeof z[1]!="number")return}return new Yr(Q)}}toString(){return JSON.stringify(this.values)}}class ai{constructor(Q){this.name=Q.name,this.available=Q.available}toString(){return this.name}static fromString(Q){return Q?new ai({name:Q,available:!1}):null}}function jn(S,Q,k,P){return typeof S=="number"&&S>=0&&S<=255&&typeof Q=="number"&&Q>=0&&Q<=255&&typeof k=="number"&&k>=0&&k<=255?P===void 0||typeof P=="number"&&P>=0&&P<=1?null:`Invalid rgba value [${[S,Q,k,P].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof P=="number"?[S,Q,k,P]:[S,Q,k]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function ri(S){if(S===null||typeof S=="string"||typeof S=="boolean"||typeof S=="number"||S instanceof kr||S instanceof Zr||S instanceof Cn||S instanceof Ur||S instanceof Yr||S instanceof ai)return!0;if(Array.isArray(S)){for(const Q of S)if(!ri(Q))return!1;return!0}if(typeof S=="object"){for(const Q in S)if(!ri(S[Q]))return!1;return!0}return!1}function Bn(S){if(S===null)return Lt;if(typeof S=="string")return Ut;if(typeof S=="boolean")return Wt;if(typeof S=="number")return Qt;if(S instanceof kr)return mr;if(S instanceof Zr)return Nt;if(S instanceof Cn)return dr;if(S instanceof Ur)return ot;if(S instanceof Yr)return ze;if(S instanceof ai)return Fe;if(Array.isArray(S)){const Q=S.length;let k;for(const P of S){const z=Bn(P);if(k){if(k===z)continue;k=Ft;break}k=z}return Ke(k||Ft,Q)}return pt}function Io(S){const Q=typeof S;return S===null?"":Q==="string"||Q==="number"||Q==="boolean"?String(S):S instanceof kr||S instanceof Cn||S instanceof Ur||S instanceof Yr||S instanceof ai?S.toString():JSON.stringify(S)}class co{constructor(Q,k){this.type=Q,this.value=k}static parse(Q,k){if(Q.length!==2)return k.error(`'literal' expression requires exactly one argument, but found ${Q.length-1} instead.`);if(!ri(Q[1]))return k.error("invalid value");const P=Q[1];let z=Bn(P);const ee=k.expectedType;return z.kind!=="array"||z.N!==0||!ee||ee.kind!=="array"||typeof ee.N=="number"&&ee.N!==0||(z=ee),new co(z,P)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class En{constructor(Q){this.name="ExpressionEvaluationError",this.message=Q}toJSON(){return this.message}}const Qo={string:Ut,number:Qt,boolean:Wt,object:pt};class xo{constructor(Q,k){this.type=Q,this.args=k}static parse(Q,k){if(Q.length<2)return k.error("Expected at least one argument.");let P,z=1;const ee=Q[0];if(ee==="array"){let ue,xe;if(Q.length>2){const Oe=Q[1];if(typeof Oe!="string"||!(Oe in Qo)||Oe==="object")return k.error('The item type argument of "array" must be one of string, number, boolean',1);ue=Qo[Oe],z++}else ue=Ft;if(Q.length>3){if(Q[2]!==null&&(typeof Q[2]!="number"||Q[2]<0||Q[2]!==Math.floor(Q[2])))return k.error('The length argument to "array" must be a positive integer literal',2);xe=Q[2],z++}P=Ke(ue,xe)}else{if(!Qo[ee])throw new Error(`Types doesn't contain name = ${ee}`);P=Qo[ee]}const te=[];for(;z<Q.length;z++){const ue=k.parse(Q[z],z,Ft);if(!ue)return null;te.push(ue)}return new xo(P,te)}evaluate(Q){for(let k=0;k<this.args.length;k++){const P=this.args[k].evaluate(Q);if(!we(this.type,Bn(P)))return P;if(k===this.args.length-1)throw new En(`Expected value to be of type ${$e(this.type)}, but found ${$e(Bn(P))} instead.`)}throw new Error}eachChild(Q){this.args.forEach(Q)}outputDefined(){return this.args.every(Q=>Q.outputDefined())}}const uo={"to-boolean":Wt,"to-color":mr,"to-number":Qt,"to-string":Ut};class Gi{constructor(Q,k){this.type=Q,this.args=k}static parse(Q,k){if(Q.length<2)return k.error("Expected at least one argument.");const P=Q[0];if(!uo[P])throw new Error(`Can't parse ${P} as it is not part of the known types`);if((P==="to-boolean"||P==="to-string")&&Q.length!==2)return k.error("Expected one argument.");const z=uo[P],ee=[];for(let te=1;te<Q.length;te++){const ue=k.parse(Q[te],te,Ft);if(!ue)return null;ee.push(ue)}return new Gi(z,ee)}evaluate(Q){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(Q);case"color":{let k,P;for(const z of this.args){if(k=z.evaluate(Q),P=null,k instanceof kr)return k;if(typeof k=="string"){const ee=Q.parseColor(k);if(ee)return ee}else if(Array.isArray(k)&&(P=k.length<3||k.length>4?`Invalid rbga value ${JSON.stringify(k)}: expected an array containing either three or four numeric values.`:jn(k[0],k[1],k[2],k[3]),!P))return new kr(k[0]/255,k[1]/255,k[2]/255,k[3])}throw new En(P||`Could not parse color from value '${typeof k=="string"?k:JSON.stringify(k)}'`)}case"padding":{let k;for(const P of this.args){k=P.evaluate(Q);const z=Ur.parse(k);if(z)return z}throw new En(`Could not parse padding from value '${typeof k=="string"?k:JSON.stringify(k)}'`)}case"variableAnchorOffsetCollection":{let k;for(const P of this.args){k=P.evaluate(Q);const z=Yr.parse(k);if(z)return z}throw new En(`Could not parse variableAnchorOffsetCollection from value '${typeof k=="string"?k:JSON.stringify(k)}'`)}case"number":{let k=null;for(const P of this.args){if(k=P.evaluate(Q),k===null)return 0;const z=Number(k);if(!isNaN(z))return z}throw new En(`Could not convert ${JSON.stringify(k)} to number.`)}case"formatted":return Cn.fromString(Io(this.args[0].evaluate(Q)));case"resolvedImage":return ai.fromString(Io(this.args[0].evaluate(Q)));default:return Io(this.args[0].evaluate(Q))}}eachChild(Q){this.args.forEach(Q)}outputDefined(){return this.args.every(Q=>Q.outputDefined())}}const ol=["Unknown","Point","LineString","Polygon"];class aa{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"?ol[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(Q){let k=this._parseColorCache[Q];return k||(k=this._parseColorCache[Q]=kr.parse(Q)),k}}class st{constructor(Q,k,P=[],z,ee=new Tt,te=[]){this.registry=Q,this.path=P,this.key=P.map(ue=>`[${ue}]`).join(""),this.scope=ee,this.errors=te,this.expectedType=z,this._isConstant=k}parse(Q,k,P,z,ee={}){return k?this.concat(k,P,z)._parse(Q,ee):this._parse(Q,ee)}_parse(Q,k){function P(z,ee,te){return te==="assert"?new xo(ee,[z]):te==="coerce"?new Gi(ee,[z]):z}if(Q!==null&&typeof Q!="string"&&typeof Q!="boolean"&&typeof Q!="number"||(Q=["literal",Q]),Array.isArray(Q)){if(Q.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const z=Q[0];if(typeof z!="string")return this.error(`Expression name must be a string, but found ${typeof z} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const ee=this.registry[z];if(ee){let te=ee.parse(Q,this);if(!te)return null;if(this.expectedType){const ue=this.expectedType,xe=te.type;if(ue.kind!=="string"&&ue.kind!=="number"&&ue.kind!=="boolean"&&ue.kind!=="object"&&ue.kind!=="array"||xe.kind!=="value")if(ue.kind!=="color"&&ue.kind!=="formatted"&&ue.kind!=="resolvedImage"||xe.kind!=="value"&&xe.kind!=="string")if(ue.kind!=="padding"||xe.kind!=="value"&&xe.kind!=="number"&&xe.kind!=="array")if(ue.kind!=="variableAnchorOffsetCollection"||xe.kind!=="value"&&xe.kind!=="array"){if(this.checkSubtype(ue,xe))return null}else te=P(te,ue,k.typeAnnotation||"coerce");else te=P(te,ue,k.typeAnnotation||"coerce");else te=P(te,ue,k.typeAnnotation||"coerce");else te=P(te,ue,k.typeAnnotation||"assert")}if(!(te instanceof co)&&te.type.kind!=="resolvedImage"&&this._isConstant(te)){const ue=new aa;try{te=new co(te.type,te.evaluate(ue))}catch(xe){return this.error(xe.message),null}}return te}return this.error(`Unknown expression "${z}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(Q===void 0?"'undefined' value invalid. Use null instead.":typeof Q=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof Q} instead.`)}concat(Q,k,P){const z=typeof Q=="number"?this.path.concat(Q):this.path,ee=P?this.scope.concat(P):this.scope;return new st(this.registry,this._isConstant,z,k||null,ee,this.errors)}error(Q,...k){const P=`${this.key}${k.map(z=>`[${z}]`).join("")}`;this.errors.push(new Zt(P,Q))}checkSubtype(Q,k){const P=we(Q,k);return P&&this.error(P),P}}class Pt{constructor(Q,k,P){this.type=Nt,this.locale=P,this.caseSensitive=Q,this.diacriticSensitive=k}static parse(Q,k){if(Q.length!==2)return k.error("Expected one argument.");const P=Q[1];if(typeof P!="object"||Array.isArray(P))return k.error("Collator options argument must be an object.");const z=k.parse(P["case-sensitive"]!==void 0&&P["case-sensitive"],1,Wt);if(!z)return null;const ee=k.parse(P["diacritic-sensitive"]!==void 0&&P["diacritic-sensitive"],1,Wt);if(!ee)return null;let te=null;return P.locale&&(te=k.parse(P.locale,1,Ut),!te)?null:new Pt(z,ee,te)}evaluate(Q){return new Zr(this.caseSensitive.evaluate(Q),this.diacriticSensitive.evaluate(Q),this.locale?this.locale.evaluate(Q):null)}eachChild(Q){Q(this.caseSensitive),Q(this.diacriticSensitive),this.locale&&Q(this.locale)}outputDefined(){return!1}}const J=8192;function pe(S,Q){S[0]=Math.min(S[0],Q[0]),S[1]=Math.min(S[1],Q[1]),S[2]=Math.max(S[2],Q[0]),S[3]=Math.max(S[3],Q[1])}function se(S,Q){return!(S[0]<=Q[0]||S[2]>=Q[2]||S[1]<=Q[1]||S[3]>=Q[3])}function Ee(S,Q){const k=(180+S[0])/360,P=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+S[1]*Math.PI/360)))/360,z=Math.pow(2,Q.z);return[Math.round(k*z*J),Math.round(P*z*J)]}function We(S,Q,k){const P=S[0]-Q[0],z=S[1]-Q[1],ee=S[0]-k[0],te=S[1]-k[1];return P*te-ee*z==0&&P*ee<=0&&z*te<=0}function tt(S,Q){let k=!1;for(let te=0,ue=Q.length;te<ue;te++){const xe=Q[te];for(let Oe=0,Ue=xe.length;Oe<Ue-1;Oe++){if(We(S,xe[Oe],xe[Oe+1]))return!1;(z=xe[Oe])[1]>(P=S)[1]!=(ee=xe[Oe+1])[1]>P[1]&&P[0]<(ee[0]-z[0])*(P[1]-z[1])/(ee[1]-z[1])+z[0]&&(k=!k)}}var P,z,ee;return k}function ft(S,Q){for(let k=0;k<Q.length;k++)if(tt(S,Q[k]))return!0;return!1}function Kt(S,Q,k,P){const z=P[0]-k[0],ee=P[1]-k[1],te=(S[0]-k[0])*ee-z*(S[1]-k[1]),ue=(Q[0]-k[0])*ee-z*(Q[1]-k[1]);return te>0&&ue<0||te<0&&ue>0}function nr(S,Q,k){for(const Oe of k)for(let Ue=0;Ue<Oe.length-1;++Ue)if((ue=[(te=Oe[Ue+1])[0]-(ee=Oe[Ue])[0],te[1]-ee[1]])[0]*(xe=[(z=Q)[0]-(P=S)[0],z[1]-P[1]])[1]-ue[1]*xe[0]!=0&&Kt(P,z,ee,te)&&Kt(ee,te,P,z))return!0;var P,z,ee,te,ue,xe;return!1}function vr(S,Q){for(let k=0;k<S.length;++k)if(!tt(S[k],Q))return!1;for(let k=0;k<S.length-1;++k)if(nr(S[k],S[k+1],Q))return!1;return!0}function xr(S,Q){for(let k=0;k<Q.length;k++)if(vr(S,Q[k]))return!0;return!1}function _r(S,Q,k){const P=[];for(let z=0;z<S.length;z++){const ee=[];for(let te=0;te<S[z].length;te++){const ue=Ee(S[z][te],k);pe(Q,ue),ee.push(ue)}P.push(ee)}return P}function Fr(S,Q,k){const P=[];for(let z=0;z<S.length;z++){const ee=_r(S[z],Q,k);P.push(ee)}return P}function Xn(S,Q,k,P){if(S[0]<k[0]||S[0]>k[2]){const z=.5*P;let ee=S[0]-k[0]>z?-P:k[0]-S[0]>z?P:0;ee===0&&(ee=S[0]-k[2]>z?-P:k[2]-S[0]>z?P:0),S[0]+=ee}pe(Q,S)}function Ln(S,Q,k,P){const z=Math.pow(2,P.z)*J,ee=[P.x*J,P.y*J],te=[];for(const ue of S)for(const xe of ue){const Oe=[xe.x+ee[0],xe.y+ee[1]];Xn(Oe,Q,k,z),te.push(Oe)}return te}function Ri(S,Q,k,P){const z=Math.pow(2,P.z)*J,ee=[P.x*J,P.y*J],te=[];for(const xe of S){const Oe=[];for(const Ue of xe){const Je=[Ue.x+ee[0],Ue.y+ee[1]];pe(Q,Je),Oe.push(Je)}te.push(Oe)}if(Q[2]-Q[0]<=z/2){(ue=Q)[0]=ue[1]=1/0,ue[2]=ue[3]=-1/0;for(const xe of te)for(const Oe of xe)Xn(Oe,Q,k,z)}var ue;return te}class Cr{constructor(Q,k){this.type=Wt,this.geojson=Q,this.geometries=k}static parse(Q,k){if(Q.length!==2)return k.error(`'within' expression requires exactly one argument, but found ${Q.length-1} instead.`);if(ri(Q[1])){const P=Q[1];if(P.type==="FeatureCollection"){const z=[];for(const ee of P.features){const{type:te,coordinates:ue}=ee.geometry;te==="Polygon"&&z.push(ue),te==="MultiPolygon"&&z.push(...ue)}if(z.length)return new Cr(P,{type:"MultiPolygon",coordinates:z})}else if(P.type==="Feature"){const z=P.geometry.type;if(z==="Polygon"||z==="MultiPolygon")return new Cr(P,P.geometry)}else if(P.type==="Polygon"||P.type==="MultiPolygon")return new Cr(P,P)}return k.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(Q){if(Q.geometry()!=null&&Q.canonicalID()!=null){if(Q.geometryType()==="Point")return function(k,P){const z=[1/0,1/0,-1/0,-1/0],ee=[1/0,1/0,-1/0,-1/0],te=k.canonicalID();if(P.type==="Polygon"){const ue=_r(P.coordinates,ee,te),xe=Ln(k.geometry(),z,ee,te);if(!se(z,ee))return!1;for(const Oe of xe)if(!tt(Oe,ue))return!1}if(P.type==="MultiPolygon"){const ue=Fr(P.coordinates,ee,te),xe=Ln(k.geometry(),z,ee,te);if(!se(z,ee))return!1;for(const Oe of xe)if(!ft(Oe,ue))return!1}return!0}(Q,this.geometries);if(Q.geometryType()==="LineString")return function(k,P){const z=[1/0,1/0,-1/0,-1/0],ee=[1/0,1/0,-1/0,-1/0],te=k.canonicalID();if(P.type==="Polygon"){const ue=_r(P.coordinates,ee,te),xe=Ri(k.geometry(),z,ee,te);if(!se(z,ee))return!1;for(const Oe of xe)if(!vr(Oe,ue))return!1}if(P.type==="MultiPolygon"){const ue=Fr(P.coordinates,ee,te),xe=Ri(k.geometry(),z,ee,te);if(!se(z,ee))return!1;for(const Oe of xe)if(!xr(Oe,ue))return!1}return!0}(Q,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}class dn{constructor(Q,k){this.type=k.type,this.name=Q,this.boundExpression=k}static parse(Q,k){if(Q.length!==2||typeof Q[1]!="string")return k.error("'var' expression requires exactly one string literal argument.");const P=Q[1];return k.scope.has(P)?new dn(P,k.scope.get(P)):k.error(`Unknown variable "${P}". Make sure "${P}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(Q){return this.boundExpression.evaluate(Q)}eachChild(){}outputDefined(){return!1}}class Dn{constructor(Q,k,P,z){this.name=Q,this.type=k,this._evaluate=P,this.args=z}evaluate(Q){return this._evaluate(Q,this.args)}eachChild(Q){this.args.forEach(Q)}outputDefined(){return!1}static parse(Q,k){const P=Q[0],z=Dn.definitions[P];if(!z)return k.error(`Unknown expression "${P}". If you wanted a literal array, use ["literal", [...]].`,0);const ee=Array.isArray(z)?z[0]:z.type,te=Array.isArray(z)?[[z[1],z[2]]]:z.overloads,ue=te.filter(([Oe])=>!Array.isArray(Oe)||Oe.length===Q.length-1);let xe=null;for(const[Oe,Ue]of ue){xe=new st(k.registry,ho,k.path,null,k.scope);const Je=[];let lt=!1;for(let mt=1;mt<Q.length;mt++){const bt=Q[mt],Et=Array.isArray(Oe)?Oe[mt-1]:Oe.type,Bt=xe.parse(bt,1+Je.length,Et);if(!Bt){lt=!0;break}Je.push(Bt)}if(!lt)if(Array.isArray(Oe)&&Oe.length!==Je.length)xe.error(`Expected ${Oe.length} arguments, but found ${Je.length} instead.`);else{for(let mt=0;mt<Je.length;mt++){const bt=Array.isArray(Oe)?Oe[mt]:Oe.type,Et=Je[mt];xe.concat(mt+1).checkSubtype(bt,Et.type)}if(xe.errors.length===0)return new Dn(P,ee,Ue,Je)}}if(ue.length===1)k.errors.push(...xe.errors);else{const Oe=(ue.length?ue:te).map(([Je])=>{return lt=Je,Array.isArray(lt)?`(${lt.map($e).join(", ")})`:`(${$e(lt.type)}...)`;var lt}).join(" | "),Ue=[];for(let Je=1;Je<Q.length;Je++){const lt=k.parse(Q[Je],1+Ue.length);if(!lt)return null;Ue.push($e(lt.type))}k.error(`Expected arguments of type ${Oe}, but found (${Ue.join(", ")}) instead.`)}return null}static register(Q,k){Dn.definitions=k;for(const P in k)Q[P]=Dn}}function ho(S){if(S instanceof dn)return ho(S.boundExpression);if(S instanceof Dn&&S.name==="error"||S instanceof Pt||S instanceof Cr)return!1;const Q=S instanceof Gi||S instanceof xo;let k=!0;return S.eachChild(P=>{k=Q?k&&ho(P):k&&P instanceof co}),!!k&&Ni(S)&&al(S,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Ni(S){if(S instanceof Dn&&(S.name==="get"&&S.args.length===1||S.name==="feature-state"||S.name==="has"&&S.args.length===1||S.name==="properties"||S.name==="geometry-type"||S.name==="id"||/^filter-/.test(S.name))||S instanceof Cr)return!1;let Q=!0;return S.eachChild(k=>{Q&&!Ni(k)&&(Q=!1)}),Q}function Fa(S){if(S instanceof Dn&&S.name==="feature-state")return!1;let Q=!0;return S.eachChild(k=>{Q&&!Fa(k)&&(Q=!1)}),Q}function al(S,Q){if(S instanceof Dn&&Q.indexOf(S.name)>=0)return!1;let k=!0;return S.eachChild(P=>{k&&!al(P,Q)&&(k=!1)}),k}function $i(S,Q){const k=S.length-1;let P,z,ee=0,te=k,ue=0;for(;ee<=te;)if(ue=Math.floor((ee+te)/2),P=S[ue],z=S[ue+1],P<=Q){if(ue===k||Q<z)return ue;ee=ue+1}else{if(!(P>Q))throw new En("Input is not a number.");te=ue-1}return 0}class $l{constructor(Q,k,P){this.type=Q,this.input=k,this.labels=[],this.outputs=[];for(const[z,ee]of P)this.labels.push(z),this.outputs.push(ee)}static parse(Q,k){if(Q.length-1<4)return k.error(`Expected at least 4 arguments, but found only ${Q.length-1}.`);if((Q.length-1)%2!=0)return k.error("Expected an even number of arguments.");const P=k.parse(Q[1],1,Qt);if(!P)return null;const z=[];let ee=null;k.expectedType&&k.expectedType.kind!=="value"&&(ee=k.expectedType);for(let te=1;te<Q.length;te+=2){const ue=te===1?-1/0:Q[te],xe=Q[te+1],Oe=te,Ue=te+1;if(typeof ue!="number")return k.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Oe);if(z.length&&z[z.length-1][0]>=ue)return k.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Oe);const Je=k.parse(xe,Ue,ee);if(!Je)return null;ee=ee||Je.type,z.push([ue,Je])}return new $l(ee,P,z)}evaluate(Q){const k=this.labels,P=this.outputs;if(k.length===1)return P[0].evaluate(Q);const z=this.input.evaluate(Q);if(z<=k[0])return P[0].evaluate(Q);const ee=k.length;return z>=k[ee-1]?P[ee-1].evaluate(Q):P[$i(k,z)].evaluate(Q)}eachChild(Q){Q(this.input);for(const k of this.outputs)Q(k)}outputDefined(){return this.outputs.every(Q=>Q.outputDefined())}}function yd(S){return S&&S.__esModule&&Object.prototype.hasOwnProperty.call(S,"default")?S.default:S}var Nc=n5;function n5(S,Q,k,P){this.cx=3*S,this.bx=3*(k-S)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*Q,this.by=3*(P-Q)-this.cy,this.ay=1-this.cy-this.by,this.p1x=S,this.p1y=Q,this.p2x=k,this.p2y=P}n5.prototype={sampleCurveX:function(S){return((this.ax*S+this.bx)*S+this.cx)*S},sampleCurveY:function(S){return((this.ay*S+this.by)*S+this.cy)*S},sampleCurveDerivativeX:function(S){return(3*this.ax*S+2*this.bx)*S+this.cx},solveCurveX:function(S,Q){if(Q===void 0&&(Q=1e-6),S<0)return 0;if(S>1)return 1;for(var k=S,P=0;P<8;P++){var z=this.sampleCurveX(k)-S;if(Math.abs(z)<Q)return k;var ee=this.sampleCurveDerivativeX(k);if(Math.abs(ee)<1e-6)break;k-=z/ee}var te=0,ue=1;for(k=S,P=0;P<20&&(z=this.sampleCurveX(k),!(Math.abs(z-S)<Q));P++)S>z?te=k:ue=k,k=.5*(ue-te)+te;return k},solve:function(S,Q){return this.sampleCurveY(this.solveCurveX(S,Q))}};var i5=yd(Nc);function Bc(S,Q,k){return S+k*(Q-S)}function B2(S,Q,k){return S.map((P,z)=>Bc(P,Q[z],k))}const Al={number:Bc,color:function(S,Q,k,P="rgb"){switch(P){case"rgb":{const[z,ee,te,ue]=B2(S.rgb,Q.rgb,k);return new kr(z,ee,te,ue,!1)}case"hcl":{const[z,ee,te,ue]=S.hcl,[xe,Oe,Ue,Je]=Q.hcl;let lt,mt;if(isNaN(z)||isNaN(xe))isNaN(z)?isNaN(xe)?lt=NaN:(lt=xe,te!==1&&te!==0||(mt=Oe)):(lt=z,Ue!==1&&Ue!==0||(mt=ee));else{let fr=xe-z;xe>z&&fr>180?fr-=360:xe<z&&z-xe>180&&(fr+=360),lt=z+k*fr}const[bt,Et,Bt,Xt]=function([fr,tr,ur,Er]){return fr=isNaN(fr)?0:fr*_t,Qr([ur,Math.cos(fr)*tr,Math.sin(fr)*tr,Er])}([lt,mt??Bc(ee,Oe,k),Bc(te,Ue,k),Bc(ue,Je,k)]);return new kr(bt,Et,Bt,Xt,!1)}case"lab":{const[z,ee,te,ue]=Qr(B2(S.lab,Q.lab,k));return new kr(z,ee,te,ue,!1)}}},array:B2,padding:function(S,Q,k){return new Ur(B2(S.values,Q.values,k))},variableAnchorOffsetCollection:function(S,Q,k){const P=S.values,z=Q.values;if(P.length!==z.length)throw new En(`Cannot interpolate values of different length. from: ${S.toString()}, to: ${Q.toString()}`);const ee=[];for(let te=0;te<P.length;te+=2){if(P[te]!==z[te])throw new En(`Cannot interpolate values containing mismatched anchors. from[${te}]: ${P[te]}, to[${te}]: ${z[te]}`);ee.push(P[te]);const[ue,xe]=P[te+1],[Oe,Ue]=z[te+1];ee.push([Bc(ue,Oe,k),Bc(xe,Ue,k)])}return new Yr(ee)}};class As{constructor(Q,k,P,z,ee){this.type=Q,this.operator=k,this.interpolation=P,this.input=z,this.labels=[],this.outputs=[];for(const[te,ue]of ee)this.labels.push(te),this.outputs.push(ue)}static interpolationFactor(Q,k,P,z){let ee=0;if(Q.name==="exponential")ee=F2(k,Q.base,P,z);else if(Q.name==="linear")ee=F2(k,1,P,z);else if(Q.name==="cubic-bezier"){const te=Q.controlPoints;ee=new i5(te[0],te[1],te[2],te[3]).solve(F2(k,1,P,z))}return ee}static parse(Q,k){let[P,z,ee,...te]=Q;if(!Array.isArray(z)||z.length===0)return k.error("Expected an interpolation type expression.",1);if(z[0]==="linear")z={name:"linear"};else if(z[0]==="exponential"){const Oe=z[1];if(typeof Oe!="number")return k.error("Exponential interpolation requires a numeric base.",1,1);z={name:"exponential",base:Oe}}else{if(z[0]!=="cubic-bezier")return k.error(`Unknown interpolation type ${String(z[0])}`,1,0);{const Oe=z.slice(1);if(Oe.length!==4||Oe.some(Ue=>typeof Ue!="number"||Ue<0||Ue>1))return k.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);z={name:"cubic-bezier",controlPoints:Oe}}}if(Q.length-1<4)return k.error(`Expected at least 4 arguments, but found only ${Q.length-1}.`);if((Q.length-1)%2!=0)return k.error("Expected an even number of arguments.");if(ee=k.parse(ee,2,Qt),!ee)return null;const ue=[];let xe=null;P==="interpolate-hcl"||P==="interpolate-lab"?xe=mr:k.expectedType&&k.expectedType.kind!=="value"&&(xe=k.expectedType);for(let Oe=0;Oe<te.length;Oe+=2){const Ue=te[Oe],Je=te[Oe+1],lt=Oe+3,mt=Oe+4;if(typeof Ue!="number")return k.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',lt);if(ue.length&&ue[ue.length-1][0]>=Ue)return k.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',lt);const bt=k.parse(Je,mt,xe);if(!bt)return null;xe=xe||bt.type,ue.push([Ue,bt])}return Ae(xe,Qt)||Ae(xe,mr)||Ae(xe,ot)||Ae(xe,ze)||Ae(xe,Ke(Qt))?new As(xe,P,z,ee,ue):k.error(`Type ${$e(xe)} is not interpolatable.`)}evaluate(Q){const k=this.labels,P=this.outputs;if(k.length===1)return P[0].evaluate(Q);const z=this.input.evaluate(Q);if(z<=k[0])return P[0].evaluate(Q);const ee=k.length;if(z>=k[ee-1])return P[ee-1].evaluate(Q);const te=$i(k,z),ue=As.interpolationFactor(this.interpolation,z,k[te],k[te+1]),xe=P[te].evaluate(Q),Oe=P[te+1].evaluate(Q);switch(this.operator){case"interpolate":return Al[this.type.kind](xe,Oe,ue);case"interpolate-hcl":return Al.color(xe,Oe,ue,"hcl");case"interpolate-lab":return Al.color(xe,Oe,ue,"lab")}}eachChild(Q){Q(this.input);for(const k of this.outputs)Q(k)}outputDefined(){return this.outputs.every(Q=>Q.outputDefined())}}function F2(S,Q,k,P){const z=P-k,ee=S-k;return z===0?0:Q===1?ee/z:(Math.pow(Q,ee)-1)/(Math.pow(Q,z)-1)}class Wi{constructor(Q,k){this.type=Q,this.args=k}static parse(Q,k){if(Q.length<2)return k.error("Expectected at least one argument.");let P=null;const z=k.expectedType;z&&z.kind!=="value"&&(P=z);const ee=[];for(const ue of Q.slice(1)){const xe=k.parse(ue,1+ee.length,P,void 0,{typeAnnotation:"omit"});if(!xe)return null;P=P||xe.type,ee.push(xe)}if(!P)throw new Error("No output type");const te=z&&ee.some(ue=>we(z,ue.type));return new Wi(te?Ft:P,ee)}evaluate(Q){let k,P=null,z=0;for(const ee of this.args)if(z++,P=ee.evaluate(Q),P&&P instanceof ai&&!P.available&&(k||(k=P.name),P=null,z===this.args.length&&(P=k)),P!==null)break;return P}eachChild(Q){this.args.forEach(Q)}outputDefined(){return this.args.every(Q=>Q.outputDefined())}}class d4{constructor(Q,k){this.type=k.type,this.bindings=[].concat(Q),this.result=k}evaluate(Q){return this.result.evaluate(Q)}eachChild(Q){for(const k of this.bindings)Q(k[1]);Q(this.result)}static parse(Q,k){if(Q.length<4)return k.error(`Expected at least 3 arguments, but found ${Q.length-1} instead.`);const P=[];for(let ee=1;ee<Q.length-1;ee+=2){const te=Q[ee];if(typeof te!="string")return k.error(`Expected string, but found ${typeof te} instead.`,ee);if(/[^a-zA-Z0-9_]/.test(te))return k.error("Variable names must contain only alphanumeric characters or '_'.",ee);const ue=k.parse(Q[ee+1],ee+1);if(!ue)return null;P.push([te,ue])}const z=k.parse(Q[Q.length-1],Q.length-1,k.expectedType,P);return z?new d4(P,z):null}outputDefined(){return this.result.outputDefined()}}class mh{constructor(Q,k,P){this.type=Q,this.index=k,this.input=P}static parse(Q,k){if(Q.length!==3)return k.error(`Expected 2 arguments, but found ${Q.length-1} instead.`);const P=k.parse(Q[1],1,Qt),z=k.parse(Q[2],2,Ke(k.expectedType||Ft));return P&&z?new mh(z.type.itemType,P,z):null}evaluate(Q){const k=this.index.evaluate(Q),P=this.input.evaluate(Q);if(k<0)throw new En(`Array index out of bounds: ${k} < 0.`);if(k>=P.length)throw new En(`Array index out of bounds: ${k} > ${P.length-1}.`);if(k!==Math.floor(k))throw new En(`Array index must be an integer, but found ${k} instead.`);return P[k]}eachChild(Q){Q(this.index),Q(this.input)}outputDefined(){return!1}}class h4{constructor(Q,k){this.type=Wt,this.needle=Q,this.haystack=k}static parse(Q,k){if(Q.length!==3)return k.error(`Expected 2 arguments, but found ${Q.length-1} instead.`);const P=k.parse(Q[1],1,Ft),z=k.parse(Q[2],2,Ft);return P&&z?De(P.type,[Wt,Ut,Qt,Lt,Ft])?new h4(P,z):k.error(`Expected first argument to be of type boolean, string, number or null, but found ${$e(P.type)} instead`):null}evaluate(Q){const k=this.needle.evaluate(Q),P=this.haystack.evaluate(Q);if(!P)return!1;if(!Ve(k,["boolean","string","number","null"]))throw new En(`Expected first argument to be of type boolean, string, number or null, but found ${$e(Bn(k))} instead.`);if(!Ve(P,["string","array"]))throw new En(`Expected second argument to be of type array or string, but found ${$e(Bn(P))} instead.`);return P.indexOf(k)>=0}eachChild(Q){Q(this.needle),Q(this.haystack)}outputDefined(){return!0}}class Fc{constructor(Q,k,P){this.type=Qt,this.needle=Q,this.haystack=k,this.fromIndex=P}static parse(Q,k){if(Q.length<=2||Q.length>=5)return k.error(`Expected 3 or 4 arguments, but found ${Q.length-1} instead.`);const P=k.parse(Q[1],1,Ft),z=k.parse(Q[2],2,Ft);if(!P||!z)return null;if(!De(P.type,[Wt,Ut,Qt,Lt,Ft]))return k.error(`Expected first argument to be of type boolean, string, number or null, but found ${$e(P.type)} instead`);if(Q.length===4){const ee=k.parse(Q[3],3,Qt);return ee?new Fc(P,z,ee):null}return new Fc(P,z)}evaluate(Q){const k=this.needle.evaluate(Q),P=this.haystack.evaluate(Q);if(!Ve(k,["boolean","string","number","null"]))throw new En(`Expected first argument to be of type boolean, string, number or null, but found ${$e(Bn(k))} instead.`);if(!Ve(P,["string","array"]))throw new En(`Expected second argument to be of type array or string, but found ${$e(Bn(P))} instead.`);if(this.fromIndex){const z=this.fromIndex.evaluate(Q);return P.indexOf(k,z)}return P.indexOf(k)}eachChild(Q){Q(this.needle),Q(this.haystack),this.fromIndex&&Q(this.fromIndex)}outputDefined(){return!1}}class _0{constructor(Q,k,P,z,ee,te){this.inputType=Q,this.type=k,this.input=P,this.cases=z,this.outputs=ee,this.otherwise=te}static parse(Q,k){if(Q.length<5)return k.error(`Expected at least 4 arguments, but found only ${Q.length-1}.`);if(Q.length%2!=1)return k.error("Expected an even number of arguments.");let P,z;k.expectedType&&k.expectedType.kind!=="value"&&(z=k.expectedType);const ee={},te=[];for(let Oe=2;Oe<Q.length-1;Oe+=2){let Ue=Q[Oe];const Je=Q[Oe+1];Array.isArray(Ue)||(Ue=[Ue]);const lt=k.concat(Oe);if(Ue.length===0)return lt.error("Expected at least one branch label.");for(const bt of Ue){if(typeof bt!="number"&&typeof bt!="string")return lt.error("Branch labels must be numbers or strings.");if(typeof bt=="number"&&Math.abs(bt)>Number.MAX_SAFE_INTEGER)return lt.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof bt=="number"&&Math.floor(bt)!==bt)return lt.error("Numeric branch labels must be integer values.");if(P){if(lt.checkSubtype(P,Bn(bt)))return null}else P=Bn(bt);if(ee[String(bt)]!==void 0)return lt.error("Branch labels must be unique.");ee[String(bt)]=te.length}const mt=k.parse(Je,Oe,z);if(!mt)return null;z=z||mt.type,te.push(mt)}const ue=k.parse(Q[1],1,Ft);if(!ue)return null;const xe=k.parse(Q[Q.length-1],Q.length-1,z);return xe?ue.type.kind!=="value"&&k.concat(1).checkSubtype(P,ue.type)?null:new _0(P,z,ue,ee,te,xe):null}evaluate(Q){const k=this.input.evaluate(Q);return(Bn(k)===this.inputType&&this.outputs[this.cases[k]]||this.otherwise).evaluate(Q)}eachChild(Q){Q(this.input),this.outputs.forEach(Q),Q(this.otherwise)}outputDefined(){return this.outputs.every(Q=>Q.outputDefined())&&this.otherwise.outputDefined()}}class o5{constructor(Q,k,P){this.type=Q,this.branches=k,this.otherwise=P}static parse(Q,k){if(Q.length<4)return k.error(`Expected at least 3 arguments, but found only ${Q.length-1}.`);if(Q.length%2!=0)return k.error("Expected an odd number of arguments.");let P;k.expectedType&&k.expectedType.kind!=="value"&&(P=k.expectedType);const z=[];for(let te=1;te<Q.length-1;te+=2){const ue=k.parse(Q[te],te,Wt);if(!ue)return null;const xe=k.parse(Q[te+1],te+1,P);if(!xe)return null;z.push([ue,xe]),P=P||xe.type}const ee=k.parse(Q[Q.length-1],Q.length-1,P);if(!ee)return null;if(!P)throw new Error("Can't infer output type");return new o5(P,z,ee)}evaluate(Q){for(const[k,P]of this.branches)if(k.evaluate(Q))return P.evaluate(Q);return this.otherwise.evaluate(Q)}eachChild(Q){for(const[k,P]of this.branches)Q(k),Q(P);Q(this.otherwise)}outputDefined(){return this.branches.every(([Q,k])=>k.outputDefined())&&this.otherwise.outputDefined()}}class Td{constructor(Q,k,P,z){this.type=Q,this.input=k,this.beginIndex=P,this.endIndex=z}static parse(Q,k){if(Q.length<=2||Q.length>=5)return k.error(`Expected 3 or 4 arguments, but found ${Q.length-1} instead.`);const P=k.parse(Q[1],1,Ft),z=k.parse(Q[2],2,Qt);if(!P||!z)return null;if(!De(P.type,[Ke(Ft),Ut,Ft]))return k.error(`Expected first argument to be of type array or string, but found ${$e(P.type)} instead`);if(Q.length===4){const ee=k.parse(Q[3],3,Qt);return ee?new Td(P.type,P,z,ee):null}return new Td(P.type,P,z)}evaluate(Q){const k=this.input.evaluate(Q),P=this.beginIndex.evaluate(Q);if(!Ve(k,["string","array"]))throw new En(`Expected first argument to be of type array or string, but found ${$e(Bn(k))} instead.`);if(this.endIndex){const z=this.endIndex.evaluate(Q);return k.slice(P,z)}return k.slice(P)}eachChild(Q){Q(this.input),Q(this.beginIndex),this.endIndex&&Q(this.endIndex)}outputDefined(){return!1}}function p4(S,Q){return S==="=="||S==="!="?Q.kind==="boolean"||Q.kind==="string"||Q.kind==="number"||Q.kind==="null"||Q.kind==="value":Q.kind==="string"||Q.kind==="number"||Q.kind==="value"}function f4(S,Q,k,P){return P.compare(Q,k)===0}function ns(S,Q,k){const P=S!=="=="&&S!=="!=";return class M1t{constructor(ee,te,ue){this.type=Wt,this.lhs=ee,this.rhs=te,this.collator=ue,this.hasUntypedArgument=ee.type.kind==="value"||te.type.kind==="value"}static parse(ee,te){if(ee.length!==3&&ee.length!==4)return te.error("Expected two or three arguments.");const ue=ee[0];let xe=te.parse(ee[1],1,Ft);if(!xe)return null;if(!p4(ue,xe.type))return te.concat(1).error(`"${ue}" comparisons are not supported for type '${$e(xe.type)}'.`);let Oe=te.parse(ee[2],2,Ft);if(!Oe)return null;if(!p4(ue,Oe.type))return te.concat(2).error(`"${ue}" comparisons are not supported for type '${$e(Oe.type)}'.`);if(xe.type.kind!==Oe.type.kind&&xe.type.kind!=="value"&&Oe.type.kind!=="value")return te.error(`Cannot compare types '${$e(xe.type)}' and '${$e(Oe.type)}'.`);P&&(xe.type.kind==="value"&&Oe.type.kind!=="value"?xe=new xo(Oe.type,[xe]):xe.type.kind!=="value"&&Oe.type.kind==="value"&&(Oe=new xo(xe.type,[Oe])));let Ue=null;if(ee.length===4){if(xe.type.kind!=="string"&&Oe.type.kind!=="string"&&xe.type.kind!=="value"&&Oe.type.kind!=="value")return te.error("Cannot use collator to compare non-string types.");if(Ue=te.parse(ee[3],3,Nt),!Ue)return null}return new M1t(xe,Oe,Ue)}evaluate(ee){const te=this.lhs.evaluate(ee),ue=this.rhs.evaluate(ee);if(P&&this.hasUntypedArgument){const xe=Bn(te),Oe=Bn(ue);if(xe.kind!==Oe.kind||xe.kind!=="string"&&xe.kind!=="number")throw new En(`Expected arguments for "${S}" to be (string, string) or (number, number), but found (${xe.kind}, ${Oe.kind}) instead.`)}if(this.collator&&!P&&this.hasUntypedArgument){const xe=Bn(te),Oe=Bn(ue);if(xe.kind!=="string"||Oe.kind!=="string")return Q(ee,te,ue)}return this.collator?k(ee,te,ue,this.collator.evaluate(ee)):Q(ee,te,ue)}eachChild(ee){ee(this.lhs),ee(this.rhs),this.collator&&ee(this.collator)}outputDefined(){return!0}}}const Q7=ns("==",function(S,Q,k){return Q===k},f4),gh=ns("!=",function(S,Q,k){return Q!==k},function(S,Q,k,P){return!f4(0,Q,k,P)}),m4=ns("<",function(S,Q,k){return Q<k},function(S,Q,k,P){return P.compare(Q,k)<0}),g4=ns(">",function(S,Q,k){return Q>k},function(S,Q,k,P){return P.compare(Q,k)>0}),vd=ns("<=",function(S,Q,k){return Q<=k},function(S,Q,k,P){return P.compare(Q,k)<=0}),D2=ns(">=",function(S,Q,k){return Q>=k},function(S,Q,k,P){return P.compare(Q,k)>=0});class w0{constructor(Q,k,P,z,ee){this.type=Ut,this.number=Q,this.locale=k,this.currency=P,this.minFractionDigits=z,this.maxFractionDigits=ee}static parse(Q,k){if(Q.length!==3)return k.error("Expected two arguments.");const P=k.parse(Q[1],1,Qt);if(!P)return null;const z=Q[2];if(typeof z!="object"||Array.isArray(z))return k.error("NumberFormat options argument must be an object.");let ee=null;if(z.locale&&(ee=k.parse(z.locale,1,Ut),!ee))return null;let te=null;if(z.currency&&(te=k.parse(z.currency,1,Ut),!te))return null;let ue=null;if(z["min-fraction-digits"]&&(ue=k.parse(z["min-fraction-digits"],1,Qt),!ue))return null;let xe=null;return z["max-fraction-digits"]&&(xe=k.parse(z["max-fraction-digits"],1,Qt),!xe)?null:new w0(P,ee,te,ue,xe)}evaluate(Q){return new Intl.NumberFormat(this.locale?this.locale.evaluate(Q):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(Q):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(Q):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(Q):void 0}).format(this.number.evaluate(Q))}eachChild(Q){Q(this.number),this.locale&&Q(this.locale),this.currency&&Q(this.currency),this.minFractionDigits&&Q(this.minFractionDigits),this.maxFractionDigits&&Q(this.maxFractionDigits)}outputDefined(){return!1}}class yh{constructor(Q){this.type=dr,this.sections=Q}static parse(Q,k){if(Q.length<2)return k.error("Expected at least one argument.");const P=Q[1];if(!Array.isArray(P)&&typeof P=="object")return k.error("First argument must be an image or text section.");const z=[];let ee=!1;for(let te=1;te<=Q.length-1;++te){const ue=Q[te];if(ee&&typeof ue=="object"&&!Array.isArray(ue)){ee=!1;let xe=null;if(ue["font-scale"]&&(xe=k.parse(ue["font-scale"],1,Qt),!xe))return null;let Oe=null;if(ue["text-font"]&&(Oe=k.parse(ue["text-font"],1,Ke(Ut)),!Oe))return null;let Ue=null;if(ue["text-color"]&&(Ue=k.parse(ue["text-color"],1,mr),!Ue))return null;const Je=z[z.length-1];Je.scale=xe,Je.font=Oe,Je.textColor=Ue}else{const xe=k.parse(Q[te],1,Ft);if(!xe)return null;const Oe=xe.type.kind;if(Oe!=="string"&&Oe!=="value"&&Oe!=="null"&&Oe!=="resolvedImage")return k.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ee=!0,z.push({content:xe,scale:null,font:null,textColor:null})}}return new yh(z)}evaluate(Q){return new Cn(this.sections.map(k=>{const P=k.content.evaluate(Q);return Bn(P)===Fe?new nn("",P,null,null,null):new nn(Io(P),null,k.scale?k.scale.evaluate(Q):null,k.font?k.font.evaluate(Q).join(","):null,k.textColor?k.textColor.evaluate(Q):null)}))}eachChild(Q){for(const k of this.sections)Q(k.content),k.scale&&Q(k.scale),k.font&&Q(k.font),k.textColor&&Q(k.textColor)}outputDefined(){return!1}}class uc{constructor(Q){this.type=Fe,this.input=Q}static parse(Q,k){if(Q.length!==2)return k.error("Expected two arguments.");const P=k.parse(Q[1],1,Ut);return P?new uc(P):k.error("No image name provided.")}evaluate(Q){const k=this.input.evaluate(Q),P=ai.fromString(k);return P&&Q.availableImages&&(P.available=Q.availableImages.indexOf(k)>-1),P}eachChild(Q){Q(this.input)}outputDefined(){return!1}}class y4{constructor(Q){this.type=Qt,this.input=Q}static parse(Q,k){if(Q.length!==2)return k.error(`Expected 1 argument, but found ${Q.length-1} instead.`);const P=k.parse(Q[1],1);return P?P.type.kind!=="array"&&P.type.kind!=="string"&&P.type.kind!=="value"?k.error(`Expected argument of type string or array, but found ${$e(P.type)} instead.`):new y4(P):null}evaluate(Q){const k=this.input.evaluate(Q);if(typeof k=="string"||Array.isArray(k))return k.length;throw new En(`Expected value to be of type string or array, but found ${$e(Bn(k))} instead.`)}eachChild(Q){Q(this.input)}outputDefined(){return!1}}const _u={"==":Q7,"!=":gh,">":g4,"<":m4,">=":D2,"<=":vd,array:xo,at:mh,boolean:xo,case:o5,coalesce:Wi,collator:Pt,format:yh,image:uc,in:h4,"index-of":Fc,interpolate:As,"interpolate-hcl":As,"interpolate-lab":As,length:y4,let:d4,literal:co,match:_0,number:xo,"number-format":w0,object:xo,slice:Td,step:$l,string:xo,"to-boolean":Gi,"to-color":Gi,"to-number":Gi,"to-string":Gi,var:dn,within:Cr};function x7(S,[Q,k,P,z]){Q=Q.evaluate(S),k=k.evaluate(S),P=P.evaluate(S);const ee=z?z.evaluate(S):1,te=jn(Q,k,P,ee);if(te)throw new En(te);return new kr(Q/255,k/255,P/255,ee,!1)}function T4(S,Q){return S in Q}function bd(S,Q){const k=Q[S];return k===void 0?null:k}function Dc(S){return{type:S}}function L0(S){return{result:"success",value:S}}function S0(S){return{result:"error",value:S}}function C1(S){return S["property-type"]==="data-driven"||S["property-type"]==="cross-faded-data-driven"}function a5(S){return!!S.expression&&S.expression.parameters.indexOf("zoom")>-1}function dc(S){return!!S.expression&&S.expression.interpolated}function Xi(S){return S instanceof Number?"number":S instanceof String?"string":S instanceof Boolean?"boolean":Array.isArray(S)?"array":S===null?"null":typeof S}function M0(S){return typeof S=="object"&&S!==null&&!Array.isArray(S)}function s5(S){return S}function wu(S,Q){const k=Q.type==="color",P=S.stops&&typeof S.stops[0][0]=="object",z=P||!(P||S.property!==void 0),ee=S.type||(dc(Q)?"exponential":"interval");if(k||Q.type==="padding"){const Ue=k?kr.parse:Ur.parse;(S=Gt({},S)).stops&&(S.stops=S.stops.map(Je=>[Je[0],Ue(Je[1])])),S.default=Ue(S.default?S.default:Q.default)}if(S.colorSpace&&(te=S.colorSpace)!=="rgb"&&te!=="hcl"&&te!=="lab")throw new Error(`Unknown color space: "${S.colorSpace}"`);var te;let ue,xe,Oe;if(ee==="exponential")ue=C0;else if(ee==="interval")ue=_o;else if(ee==="categorical"){ue=k0,xe=Object.create(null);for(const Ue of S.stops)xe[Ue[0]]=Ue[1];Oe=typeof S.stops[0][0]}else{if(ee!=="identity")throw new Error(`Unknown function type "${ee}"`);ue=Ai}if(P){const Ue={},Je=[];for(let bt=0;bt<S.stops.length;bt++){const Et=S.stops[bt],Bt=Et[0].zoom;Ue[Bt]===void 0&&(Ue[Bt]={zoom:Bt,type:S.type,property:S.property,default:S.default,stops:[]},Je.push(Bt)),Ue[Bt].stops.push([Et[0].value,Et[1]])}const lt=[];for(const bt of Je)lt.push([Ue[bt].zoom,wu(Ue[bt],Q)]);const mt={name:"linear"};return{kind:"composite",interpolationType:mt,interpolationFactor:As.interpolationFactor.bind(void 0,mt),zoomStops:lt.map(bt=>bt[0]),evaluate:({zoom:bt},Et)=>C0({stops:lt,base:S.base},Q,bt).evaluate(bt,Et)}}if(z){const Ue=ee==="exponential"?{name:"exponential",base:S.base!==void 0?S.base:1}:null;return{kind:"camera",interpolationType:Ue,interpolationFactor:As.interpolationFactor.bind(void 0,Ue),zoomStops:S.stops.map(Je=>Je[0]),evaluate:({zoom:Je})=>ue(S,Q,Je,xe,Oe)}}return{kind:"source",evaluate(Ue,Je){const lt=Je&&Je.properties?Je.properties[S.property]:void 0;return lt===void 0?zc(S.default,Q.default):ue(S,Q,lt,xe,Oe)}}}function zc(S,Q,k){return S!==void 0?S:Q!==void 0?Q:k!==void 0?k:void 0}function k0(S,Q,k,P,z){return zc(typeof k===z?P[k]:void 0,S.default,Q.default)}function _o(S,Q,k){if(Xi(k)!=="number")return zc(S.default,Q.default);const P=S.stops.length;if(P===1||k<=S.stops[0][0])return S.stops[0][1];if(k>=S.stops[P-1][0])return S.stops[P-1][1];const z=$i(S.stops.map(ee=>ee[0]),k);return S.stops[z][1]}function C0(S,Q,k){const P=S.base!==void 0?S.base:1;if(Xi(k)!=="number")return zc(S.default,Q.default);const z=S.stops.length;if(z===1||k<=S.stops[0][0])return S.stops[0][1];if(k>=S.stops[z-1][0])return S.stops[z-1][1];const ee=$i(S.stops.map(Ue=>Ue[0]),k),te=function(Ue,Je,lt,mt){const bt=mt-lt,Et=Ue-lt;return bt===0?0:Je===1?Et/bt:(Math.pow(Je,Et)-1)/(Math.pow(Je,bt)-1)}(k,P,S.stops[ee][0],S.stops[ee+1][0]),ue=S.stops[ee][1],xe=S.stops[ee+1][1],Oe=Al[Q.type]||s5;return typeof ue.evaluate=="function"?{evaluate(...Ue){const Je=ue.evaluate.apply(void 0,Ue),lt=xe.evaluate.apply(void 0,Ue);if(Je!==void 0&<!==void 0)return Oe(Je,lt,te,S.colorSpace)}}:Oe(ue,xe,te,S.colorSpace)}function Ai(S,Q,k){switch(Q.type){case"color":k=kr.parse(k);break;case"formatted":k=Cn.fromString(k.toString());break;case"resolvedImage":k=ai.fromString(k.toString());break;case"padding":k=Ur.parse(k);break;default:Xi(k)===Q.type||Q.type==="enum"&&Q.values[k]||(k=void 0)}return zc(k,S.default,Q.default)}Dn.register(_u,{error:[{kind:"error"},[Ut],(S,[Q])=>{throw new En(Q.evaluate(S))}],typeof:[Ut,[Ft],(S,[Q])=>$e(Bn(Q.evaluate(S)))],"to-rgba":[Ke(Qt,4),[mr],(S,[Q])=>{const[k,P,z,ee]=Q.evaluate(S).rgb;return[255*k,255*P,255*z,ee]}],rgb:[mr,[Qt,Qt,Qt],x7],rgba:[mr,[Qt,Qt,Qt,Qt],x7],has:{type:Wt,overloads:[[[Ut],(S,[Q])=>T4(Q.evaluate(S),S.properties())],[[Ut,pt],(S,[Q,k])=>T4(Q.evaluate(S),k.evaluate(S))]]},get:{type:Ft,overloads:[[[Ut],(S,[Q])=>bd(Q.evaluate(S),S.properties())],[[Ut,pt],(S,[Q,k])=>bd(Q.evaluate(S),k.evaluate(S))]]},"feature-state":[Ft,[Ut],(S,[Q])=>bd(Q.evaluate(S),S.featureState||{})],properties:[pt,[],S=>S.properties()],"geometry-type":[Ut,[],S=>S.geometryType()],id:[Ft,[],S=>S.id()],zoom:[Qt,[],S=>S.globals.zoom],"heatmap-density":[Qt,[],S=>S.globals.heatmapDensity||0],"line-progress":[Qt,[],S=>S.globals.lineProgress||0],accumulated:[Ft,[],S=>S.globals.accumulated===void 0?null:S.globals.accumulated],"+":[Qt,Dc(Qt),(S,Q)=>{let k=0;for(const P of Q)k+=P.evaluate(S);return k}],"*":[Qt,Dc(Qt),(S,Q)=>{let k=1;for(const P of Q)k*=P.evaluate(S);return k}],"-":{type:Qt,overloads:[[[Qt,Qt],(S,[Q,k])=>Q.evaluate(S)-k.evaluate(S)],[[Qt],(S,[Q])=>-Q.evaluate(S)]]},"/":[Qt,[Qt,Qt],(S,[Q,k])=>Q.evaluate(S)/k.evaluate(S)],"%":[Qt,[Qt,Qt],(S,[Q,k])=>Q.evaluate(S)%k.evaluate(S)],ln2:[Qt,[],()=>Math.LN2],pi:[Qt,[],()=>Math.PI],e:[Qt,[],()=>Math.E],"^":[Qt,[Qt,Qt],(S,[Q,k])=>Math.pow(Q.evaluate(S),k.evaluate(S))],sqrt:[Qt,[Qt],(S,[Q])=>Math.sqrt(Q.evaluate(S))],log10:[Qt,[Qt],(S,[Q])=>Math.log(Q.evaluate(S))/Math.LN10],ln:[Qt,[Qt],(S,[Q])=>Math.log(Q.evaluate(S))],log2:[Qt,[Qt],(S,[Q])=>Math.log(Q.evaluate(S))/Math.LN2],sin:[Qt,[Qt],(S,[Q])=>Math.sin(Q.evaluate(S))],cos:[Qt,[Qt],(S,[Q])=>Math.cos(Q.evaluate(S))],tan:[Qt,[Qt],(S,[Q])=>Math.tan(Q.evaluate(S))],asin:[Qt,[Qt],(S,[Q])=>Math.asin(Q.evaluate(S))],acos:[Qt,[Qt],(S,[Q])=>Math.acos(Q.evaluate(S))],atan:[Qt,[Qt],(S,[Q])=>Math.atan(Q.evaluate(S))],min:[Qt,Dc(Qt),(S,Q)=>Math.min(...Q.map(k=>k.evaluate(S)))],max:[Qt,Dc(Qt),(S,Q)=>Math.max(...Q.map(k=>k.evaluate(S)))],abs:[Qt,[Qt],(S,[Q])=>Math.abs(Q.evaluate(S))],round:[Qt,[Qt],(S,[Q])=>{const k=Q.evaluate(S);return k<0?-Math.round(-k):Math.round(k)}],floor:[Qt,[Qt],(S,[Q])=>Math.floor(Q.evaluate(S))],ceil:[Qt,[Qt],(S,[Q])=>Math.ceil(Q.evaluate(S))],"filter-==":[Wt,[Ut,Ft],(S,[Q,k])=>S.properties()[Q.value]===k.value],"filter-id-==":[Wt,[Ft],(S,[Q])=>S.id()===Q.value],"filter-type-==":[Wt,[Ut],(S,[Q])=>S.geometryType()===Q.value],"filter-<":[Wt,[Ut,Ft],(S,[Q,k])=>{const P=S.properties()[Q.value],z=k.value;return typeof P==typeof z&&P<z}],"filter-id-<":[Wt,[Ft],(S,[Q])=>{const k=S.id(),P=Q.value;return typeof k==typeof P&&k<P}],"filter->":[Wt,[Ut,Ft],(S,[Q,k])=>{const P=S.properties()[Q.value],z=k.value;return typeof P==typeof z&&P>z}],"filter-id->":[Wt,[Ft],(S,[Q])=>{const k=S.id(),P=Q.value;return typeof k==typeof P&&k>P}],"filter-<=":[Wt,[Ut,Ft],(S,[Q,k])=>{const P=S.properties()[Q.value],z=k.value;return typeof P==typeof z&&P<=z}],"filter-id-<=":[Wt,[Ft],(S,[Q])=>{const k=S.id(),P=Q.value;return typeof k==typeof P&&k<=P}],"filter->=":[Wt,[Ut,Ft],(S,[Q,k])=>{const P=S.properties()[Q.value],z=k.value;return typeof P==typeof z&&P>=z}],"filter-id->=":[Wt,[Ft],(S,[Q])=>{const k=S.id(),P=Q.value;return typeof k==typeof P&&k>=P}],"filter-has":[Wt,[Ft],(S,[Q])=>Q.value in S.properties()],"filter-has-id":[Wt,[],S=>S.id()!==null&&S.id()!==void 0],"filter-type-in":[Wt,[Ke(Ut)],(S,[Q])=>Q.value.indexOf(S.geometryType())>=0],"filter-id-in":[Wt,[Ke(Ft)],(S,[Q])=>Q.value.indexOf(S.id())>=0],"filter-in-small":[Wt,[Ut,Ke(Ft)],(S,[Q,k])=>k.value.indexOf(S.properties()[Q.value])>=0],"filter-in-large":[Wt,[Ut,Ke(Ft)],(S,[Q,k])=>function(P,z,ee,te){for(;ee<=te;){const ue=ee+te>>1;if(z[ue]===P)return!0;z[ue]>P?te=ue-1:ee=ue+1}return!1}(S.properties()[Q.value],k.value,0,k.value.length-1)],all:{type:Wt,overloads:[[[Wt,Wt],(S,[Q,k])=>Q.evaluate(S)&&k.evaluate(S)],[Dc(Wt),(S,Q)=>{for(const k of Q)if(!k.evaluate(S))return!1;return!0}]]},any:{type:Wt,overloads:[[[Wt,Wt],(S,[Q,k])=>Q.evaluate(S)||k.evaluate(S)],[Dc(Wt),(S,Q)=>{for(const k of Q)if(k.evaluate(S))return!0;return!1}]]},"!":[Wt,[Wt],(S,[Q])=>!Q.evaluate(S)],"is-supported-script":[Wt,[Ut],(S,[Q])=>{const k=S.globals&&S.globals.isSupportedScript;return!k||k(Q.evaluate(S))}],upcase:[Ut,[Ut],(S,[Q])=>Q.evaluate(S).toUpperCase()],downcase:[Ut,[Ut],(S,[Q])=>Q.evaluate(S).toLowerCase()],concat:[Ut,Dc(Ft),(S,Q)=>Q.map(k=>Io(k.evaluate(S))).join("")],"resolved-locale":[Ut,[Nt],(S,[Q])=>Q.evaluate(S).resolvedLocale()]});class e1{constructor(Q,k){var P;this.expression=Q,this._warningHistory={},this._evaluator=new aa,this._defaultValue=k?(P=k).type==="color"&&M0(P.default)?new kr(0,0,0,0):P.type==="color"?kr.parse(P.default)||null:P.type==="padding"?Ur.parse(P.default)||null:P.type==="variableAnchorOffsetCollection"?Yr.parse(P.default)||null:P.default===void 0?null:P.default:null,this._enumValues=k&&k.type==="enum"?k.values:null}evaluateWithoutErrorHandling(Q,k,P,z,ee,te){return this._evaluator.globals=Q,this._evaluator.feature=k,this._evaluator.featureState=P,this._evaluator.canonical=z,this._evaluator.availableImages=ee||null,this._evaluator.formattedSection=te,this.expression.evaluate(this._evaluator)}evaluate(Q,k,P,z,ee,te){this._evaluator.globals=Q,this._evaluator.feature=k||null,this._evaluator.featureState=P||null,this._evaluator.canonical=z,this._evaluator.availableImages=ee||null,this._evaluator.formattedSection=te||null;try{const ue=this.expression.evaluate(this._evaluator);if(ue==null||typeof ue=="number"&&ue!=ue)return this._defaultValue;if(this._enumValues&&!(ue in this._enumValues))throw new En(`Expected value to be one of ${Object.keys(this._enumValues).map(xe=>JSON.stringify(xe)).join(", ")}, but found ${JSON.stringify(ue)} instead.`);return ue}catch(ue){return this._warningHistory[ue.message]||(this._warningHistory[ue.message]=!0,typeof console<"u"&&console.warn(ue.message)),this._defaultValue}}}function Ho(S){return Array.isArray(S)&&S.length>0&&typeof S[0]=="string"&&S[0]in _u}function po(S,Q){const k=new st(_u,ho,[],Q?function(z){const ee={color:mr,string:Ut,number:Qt,enum:Ut,boolean:Wt,formatted:dr,padding:ot,resolvedImage:Fe,variableAnchorOffsetCollection:ze};return z.type==="array"?Ke(ee[z.value]||Ft,z.length):ee[z.type]}(Q):void 0),P=k.parse(S,void 0,void 0,void 0,Q&&Q.type==="string"?{typeAnnotation:"coerce"}:void 0);return P?L0(new e1(P,Q)):S0(k.errors)}class jc{constructor(Q,k){this.kind=Q,this._styleExpression=k,this.isStateDependent=Q!=="constant"&&!Fa(k.expression)}evaluateWithoutErrorHandling(Q,k,P,z,ee,te){return this._styleExpression.evaluateWithoutErrorHandling(Q,k,P,z,ee,te)}evaluate(Q,k,P,z,ee,te){return this._styleExpression.evaluate(Q,k,P,z,ee,te)}}class Th{constructor(Q,k,P,z){this.kind=Q,this.zoomStops=P,this._styleExpression=k,this.isStateDependent=Q!=="camera"&&!Fa(k.expression),this.interpolationType=z}evaluateWithoutErrorHandling(Q,k,P,z,ee,te){return this._styleExpression.evaluateWithoutErrorHandling(Q,k,P,z,ee,te)}evaluate(Q,k,P,z,ee,te){return this._styleExpression.evaluate(Q,k,P,z,ee,te)}interpolationFactor(Q,k,P){return this.interpolationType?As.interpolationFactor(this.interpolationType,Q,k,P):0}}function l5(S,Q){const k=po(S,Q);if(k.result==="error")return k;const P=k.value.expression,z=Ni(P);if(!z&&!C1(Q))return S0([new Zt("","data expressions not supported")]);const ee=al(P,["zoom"]);if(!ee&&!a5(Q))return S0([new Zt("","zoom expressions not supported")]);const te=b4(P);return te||ee?te instanceof Zt?S0([te]):te instanceof As&&!dc(Q)?S0([new Zt("",'"interpolate" expressions cannot be used with this property')]):L0(te?new Th(z?"camera":"composite",k.value,te.labels,te instanceof As?te.interpolation:void 0):new jc(z?"constant":"source",k.value)):S0([new Zt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class v4{constructor(Q,k){this._parameters=Q,this._specification=k,Gt(this,wu(this._parameters,this._specification))}static deserialize(Q){return new v4(Q._parameters,Q._specification)}static serialize(Q){return{_parameters:Q._parameters,_specification:Q._specification}}}function b4(S){let Q=null;if(S instanceof d4)Q=b4(S.result);else if(S instanceof Wi){for(const k of S.args)if(Q=b4(k),Q)break}else(S instanceof $l||S instanceof As)&&S.input instanceof Dn&&S.input.name==="zoom"&&(Q=S);return Q instanceof Zt||S.eachChild(k=>{const P=b4(k);P instanceof Zt?Q=P:!Q&&P?Q=new Zt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):Q&&P&&Q!==P&&(Q=new Zt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),Q}function Q4(S){if(S===!0||S===!1)return!0;if(!Array.isArray(S)||S.length===0)return!1;switch(S[0]){case"has":return S.length>=2&&S[1]!=="$id"&&S[1]!=="$type";case"in":return S.length>=3&&(typeof S[1]!="string"||Array.isArray(S[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return S.length!==3||Array.isArray(S[1])||Array.isArray(S[2]);case"any":case"all":for(const Q of S.slice(1))if(!Q4(Q)&&typeof Q!="boolean")return!1;return!0;default:return!0}}const c5={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Qd(S){if(S==null)return{filter:()=>!0,needGeometry:!1};Q4(S)||(S=t1(S));const Q=po(S,c5);if(Q.result==="error")throw new Error(Q.value.map(k=>`${k.key}: ${k.message}`).join(", "));return{filter:(k,P,z)=>Q.value.evaluate(k,P,{},z),needGeometry:u5(S)}}function xd(S,Q){return S<Q?-1:S>Q?1:0}function u5(S){if(!Array.isArray(S))return!1;if(S[0]==="within")return!0;for(let Q=1;Q<S.length;Q++)if(u5(S[Q]))return!0;return!1}function t1(S){if(!S)return!0;const Q=S[0];return S.length<=1?Q!=="any":Q==="=="?d5(S[1],S[2],"=="):Q==="!="?vh(d5(S[1],S[2],"==")):Q==="<"||Q===">"||Q==="<="||Q===">="?d5(S[1],S[2],Q):Q==="any"?(k=S.slice(1),["any"].concat(k.map(t1))):Q==="all"?["all"].concat(S.slice(1).map(t1)):Q==="none"?["all"].concat(S.slice(1).map(t1).map(vh)):Q==="in"?Lu(S[1],S.slice(2)):Q==="!in"?vh(Lu(S[1],S.slice(2))):Q==="has"?x4(S[1]):Q==="!has"?vh(x4(S[1])):Q!=="within"||S;var k}function d5(S,Q,k){switch(S){case"$type":return[`filter-type-${k}`,Q];case"$id":return[`filter-id-${k}`,Q];default:return[`filter-${k}`,S,Q]}}function Lu(S,Q){if(Q.length===0)return!1;switch(S){case"$type":return["filter-type-in",["literal",Q]];case"$id":return["filter-id-in",["literal",Q]];default:return Q.length>200&&!Q.some(k=>typeof k!=typeof Q[0])?["filter-in-large",S,["literal",Q.sort(xd)]]:["filter-in-small",S,["literal",Q]]}}function x4(S){switch(S){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",S]}}function vh(S){return["!",S]}function _d(S){const Q=typeof S;if(Q==="number"||Q==="boolean"||Q==="string"||S==null)return JSON.stringify(S);if(Array.isArray(S)){let z="[";for(const ee of S)z+=`${_d(ee)},`;return`${z}]`}const k=Object.keys(S).sort();let P="{";for(let z=0;z<k.length;z++)P+=`${JSON.stringify(k[z])}:${_d(S[k[z]])},`;return`${P}}`}function h5(S){let Q="";for(const k of Be)Q+=`/${_d(S[k])}`;return Q}function p5(S){const Q=S.value;return Q?[new wt(S.key,Q,"constants have been deprecated as of v8")]:[]}function Vo(S){return S instanceof Number||S instanceof String||S instanceof Boolean?S.valueOf():S}function Su(S){if(Array.isArray(S))return S.map(Su);if(S instanceof Object&&!(S instanceof Number||S instanceof String||S instanceof Boolean)){const Q={};for(const k in S)Q[k]=Su(S[k]);return Q}return Vo(S)}function Os(S){const Q=S.key,k=S.value,P=S.valueSpec||{},z=S.objectElementValidators||{},ee=S.style,te=S.styleSpec,ue=S.validateSpec;let xe=[];const Oe=Xi(k);if(Oe!=="object")return[new wt(Q,k,`object expected, ${Oe} found`)];for(const Ue in k){const Je=Ue.split(".")[0],lt=P[Je]||P["*"];let mt;if(z[Je])mt=z[Je];else if(P[Je])mt=ue;else if(z["*"])mt=z["*"];else{if(!P["*"]){xe.push(new wt(Q,k[Ue],`unknown property "${Ue}"`));continue}mt=ue}xe=xe.concat(mt({key:(Q&&`${Q}.`)+Ue,value:k[Ue],valueSpec:lt,style:ee,styleSpec:te,object:k,objectKey:Ue,validateSpec:ue},k))}for(const Ue in P)z[Ue]||P[Ue].required&&P[Ue].default===void 0&&k[Ue]===void 0&&xe.push(new wt(Q,k,`missing required property "${Ue}"`));return xe}function wd(S){const Q=S.value,k=S.valueSpec,P=S.style,z=S.styleSpec,ee=S.key,te=S.arrayElementValidator||S.validateSpec;if(Xi(Q)!=="array")return[new wt(ee,Q,`array expected, ${Xi(Q)} found`)];if(k.length&&Q.length!==k.length)return[new wt(ee,Q,`array length ${k.length} expected, length ${Q.length} found`)];if(k["min-length"]&&Q.length<k["min-length"])return[new wt(ee,Q,`array length at least ${k["min-length"]} expected, length ${Q.length} found`)];let ue={type:k.value,values:k.values};z.$version<7&&(ue.function=k.function),Xi(k.value)==="object"&&(ue=k.value);let xe=[];for(let Oe=0;Oe<Q.length;Oe++)xe=xe.concat(te({array:Q,arrayIndex:Oe,value:Q[Oe],valueSpec:ue,validateSpec:S.validateSpec,style:P,styleSpec:z,key:`${ee}[${Oe}]`}));return xe}function f5(S){const Q=S.key,k=S.value,P=S.valueSpec;let z=Xi(k);return z==="number"&&k!=k&&(z="NaN"),z!=="number"?[new wt(Q,k,`number expected, ${z} found`)]:"minimum"in P&&k<P.minimum?[new wt(Q,k,`${k} is less than the minimum value ${P.minimum}`)]:"maximum"in P&&k>P.maximum?[new wt(Q,k,`${k} is greater than the maximum value ${P.maximum}`)]:[]}function hr(S){const Q=S.valueSpec,k=Vo(S.value.type);let P,z,ee,te={};const ue=k!=="categorical"&&S.value.property===void 0,xe=!ue,Oe=Xi(S.value.stops)==="array"&&Xi(S.value.stops[0])==="array"&&Xi(S.value.stops[0][0])==="object",Ue=Os({key:S.key,value:S.value,valueSpec:S.styleSpec.function,validateSpec:S.validateSpec,style:S.style,styleSpec:S.styleSpec,objectElementValidators:{stops:function(mt){if(k==="identity")return[new wt(mt.key,mt.value,'identity function may not have a "stops" property')];let bt=[];const Et=mt.value;return bt=bt.concat(wd({key:mt.key,value:Et,valueSpec:mt.valueSpec,validateSpec:mt.validateSpec,style:mt.style,styleSpec:mt.styleSpec,arrayElementValidator:Je})),Xi(Et)==="array"&&Et.length===0&&bt.push(new wt(mt.key,Et,"array must have at least one stop")),bt},default:function(mt){return mt.validateSpec({key:mt.key,value:mt.value,valueSpec:Q,validateSpec:mt.validateSpec,style:mt.style,styleSpec:mt.styleSpec})}}});return k==="identity"&&ue&&Ue.push(new wt(S.key,S.value,'missing required property "property"')),k==="identity"||S.value.stops||Ue.push(new wt(S.key,S.value,'missing required property "stops"')),k==="exponential"&&S.valueSpec.expression&&!dc(S.valueSpec)&&Ue.push(new wt(S.key,S.value,"exponential functions not supported")),S.styleSpec.$version>=8&&(xe&&!C1(S.valueSpec)?Ue.push(new wt(S.key,S.value,"property functions not supported")):ue&&!a5(S.valueSpec)&&Ue.push(new wt(S.key,S.value,"zoom functions not supported"))),k!=="categorical"&&!Oe||S.value.property!==void 0||Ue.push(new wt(S.key,S.value,'"property" property is required')),Ue;function Je(mt){let bt=[];const Et=mt.value,Bt=mt.key;if(Xi(Et)!=="array")return[new wt(Bt,Et,`array expected, ${Xi(Et)} found`)];if(Et.length!==2)return[new wt(Bt,Et,`array length 2 expected, length ${Et.length} found`)];if(Oe){if(Xi(Et[0])!=="object")return[new wt(Bt,Et,`object expected, ${Xi(Et[0])} found`)];if(Et[0].zoom===void 0)return[new wt(Bt,Et,"object stop key must have zoom")];if(Et[0].value===void 0)return[new wt(Bt,Et,"object stop key must have value")];if(ee&&ee>Vo(Et[0].zoom))return[new wt(Bt,Et[0].zoom,"stop zoom values must appear in ascending order")];Vo(Et[0].zoom)!==ee&&(ee=Vo(Et[0].zoom),z=void 0,te={}),bt=bt.concat(Os({key:`${Bt}[0]`,value:Et[0],valueSpec:{zoom:{}},validateSpec:mt.validateSpec,style:mt.style,styleSpec:mt.styleSpec,objectElementValidators:{zoom:f5,value:lt}}))}else bt=bt.concat(lt({key:`${Bt}[0]`,value:Et[0],valueSpec:{},validateSpec:mt.validateSpec,style:mt.style,styleSpec:mt.styleSpec},Et));return Ho(Su(Et[1]))?bt.concat([new wt(`${Bt}[1]`,Et[1],"expressions are not allowed in function stops.")]):bt.concat(mt.validateSpec({key:`${Bt}[1]`,value:Et[1],valueSpec:Q,validateSpec:mt.validateSpec,style:mt.style,styleSpec:mt.styleSpec}))}function lt(mt,bt){const Et=Xi(mt.value),Bt=Vo(mt.value),Xt=mt.value!==null?mt.value:bt;if(P){if(Et!==P)return[new wt(mt.key,Xt,`${Et} stop domain type must match previous stop domain type ${P}`)]}else P=Et;if(Et!=="number"&&Et!=="string"&&Et!=="boolean")return[new wt(mt.key,Xt,"stop domain value must be a number, string, or boolean")];if(Et!=="number"&&k!=="categorical"){let fr=`number expected, ${Et} found`;return C1(Q)&&k===void 0&&(fr+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new wt(mt.key,Xt,fr)]}return k!=="categorical"||Et!=="number"||isFinite(Bt)&&Math.floor(Bt)===Bt?k!=="categorical"&&Et==="number"&&z!==void 0&&Bt<z?[new wt(mt.key,Xt,"stop domain values must appear in ascending order")]:(z=Bt,k==="categorical"&&Bt in te?[new wt(mt.key,Xt,"stop domain values must be unique")]:(te[Bt]=!0,[])):[new wt(mt.key,Xt,`integer expected, found ${Bt}`)]}}function wr(S){const Q=(S.expressionContext==="property"?l5:po)(Su(S.value),S.valueSpec);if(Q.result==="error")return Q.value.map(P=>new wt(`${S.key}${P.key}`,S.value,P.message));const k=Q.value.expression||Q.value._styleExpression.expression;if(S.expressionContext==="property"&&S.propertyKey==="text-font"&&!k.outputDefined())return[new wt(S.key,S.value,`Invalid data expression for "${S.propertyKey}". Output values must be contained as literals within the expression.`)];if(S.expressionContext==="property"&&S.propertyType==="layout"&&!Fa(k))return[new wt(S.key,S.value,'"feature-state" data expressions are not supported with layout properties.')];if(S.expressionContext==="filter"&&!Fa(k))return[new wt(S.key,S.value,'"feature-state" data expressions are not supported with filters.')];if(S.expressionContext&&S.expressionContext.indexOf("cluster")===0){if(!al(k,["zoom","feature-state"]))return[new wt(S.key,S.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(S.expressionContext==="cluster-initial"&&!Ni(k))return[new wt(S.key,S.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function an(S){const Q=S.key,k=S.value,P=S.valueSpec,z=[];return Array.isArray(P.values)?P.values.indexOf(Vo(k))===-1&&z.push(new wt(Q,k,`expected one of [${P.values.join(", ")}], ${JSON.stringify(k)} found`)):Object.keys(P.values).indexOf(Vo(k))===-1&&z.push(new wt(Q,k,`expected one of [${Object.keys(P.values).join(", ")}], ${JSON.stringify(k)} found`)),z}function Hn(S){return Q4(Su(S.value))?wr(Gt({},S,{expressionContext:"filter",valueSpec:{value:"boolean"}})):yo(S)}function yo(S){const Q=S.value,k=S.key;if(Xi(Q)!=="array")return[new wt(k,Q,`array expected, ${Xi(Q)} found`)];const P=S.styleSpec;let z,ee=[];if(Q.length<1)return[new wt(k,Q,"filter array must have at least 1 element")];switch(ee=ee.concat(an({key:`${k}[0]`,value:Q[0],valueSpec:P.filter_operator,style:S.style,styleSpec:S.styleSpec})),Vo(Q[0])){case"<":case"<=":case">":case">=":Q.length>=2&&Vo(Q[1])==="$type"&&ee.push(new wt(k,Q,`"$type" cannot be use with operator "${Q[0]}"`));case"==":case"!=":Q.length!==3&&ee.push(new wt(k,Q,`filter array for operator "${Q[0]}" must have 3 elements`));case"in":case"!in":Q.length>=2&&(z=Xi(Q[1]),z!=="string"&&ee.push(new wt(`${k}[1]`,Q[1],`string expected, ${z} found`)));for(let te=2;te<Q.length;te++)z=Xi(Q[te]),Vo(Q[1])==="$type"?ee=ee.concat(an({key:`${k}[${te}]`,value:Q[te],valueSpec:P.geometry_type,style:S.style,styleSpec:S.styleSpec})):z!=="string"&&z!=="number"&&z!=="boolean"&&ee.push(new wt(`${k}[${te}]`,Q[te],`string, number, or boolean expected, ${z} found`));break;case"any":case"all":case"none":for(let te=1;te<Q.length;te++)ee=ee.concat(yo({key:`${k}[${te}]`,value:Q[te],style:S.style,styleSpec:S.styleSpec}));break;case"has":case"!has":z=Xi(Q[1]),Q.length!==2?ee.push(new wt(k,Q,`filter array for "${Q[0]}" operator must have 2 elements`)):z!=="string"&&ee.push(new wt(`${k}[1]`,Q[1],`string expected, ${z} found`));break;case"within":z=Xi(Q[1]),Q.length!==2?ee.push(new wt(k,Q,`filter array for "${Q[0]}" operator must have 2 elements`)):z!=="object"&&ee.push(new wt(`${k}[1]`,Q[1],`object expected, ${z} found`))}return ee}function Bi(S,Q){const k=S.key,P=S.validateSpec,z=S.style,ee=S.styleSpec,te=S.value,ue=S.objectKey,xe=ee[`${Q}_${S.layerType}`];if(!xe)return[];const Oe=ue.match(/^(.*)-transition$/);if(Q==="paint"&&Oe&&xe[Oe[1]]&&xe[Oe[1]].transition)return P({key:k,value:te,valueSpec:ee.transition,style:z,styleSpec:ee});const Ue=S.valueSpec||xe[ue];if(!Ue)return[new wt(k,te,`unknown property "${ue}"`)];let Je;if(Xi(te)==="string"&&C1(Ue)&&!Ue.tokens&&(Je=/^{([^}]+)}$/.exec(te)))return[new wt(k,te,`"${ue}" does not support interpolation syntax
|
@@ -2170,7 +2170,7 @@ ${t.vs}`,t}setDataProperty(t,r,n){const i=Sr(this,Cv).get(+t);i&&(!(r in i)||i[r
|
|
2170
2170
|
`;)e.i++;e.i++},Math:function(e,t){e.saveText();for(var r=e.i,n,i,o=0;i=e.GetNext();)switch(n=e.i++,i){case"\\":var s=e.GetCS();s===")"&&(i="\\(");case"$":if(o===0&&t===i){var l=e.texParser.configuration,c=new dir.default(e.string.substr(r,n-r),e.stack.env,l).mml();e.PushMath(c);return}break;case"{":o++;break;case"}":o===0&&e.Error("ExtraCloseMissingOpen","Extra close brace or missing open brace"),o--;break}e.Error("MathNotTerminated","Math-mode is not properly terminated")},MathModeOnly:function(e,t){e.Error("MathModeOnly","'%1' allowed only in math mode",t)},Misplaced:function(e,t){e.Error("Misplaced","'%1' can not be used here",t)},OpenBrace:function(e,t){var r=e.stack.env;e.envStack.push(r),e.stack.env=Object.assign({},r)},CloseBrace:function(e,t){e.envStack.length?(e.saveText(),e.stack.env=e.envStack.pop()):e.Error("ExtraCloseMissingOpen","Extra close brace or missing open brace")},OpenQuote:function(e,t){e.string.charAt(e.i)===t?(e.text+="“",e.i++):e.text+="‘"},CloseQuote:function(e,t){e.string.charAt(e.i)===t?(e.text+="”",e.i++):e.text+="’"},Tilde:function(e,t){e.text+=" "},Space:function(e,t){for(e.text+=" ";e.GetNext().match(/\s/);)e.i++},SelfQuote:function(e,t){e.text+=t.substr(1)},Insert:function(e,t,r){e.text+=r},Accent:function(e,t,r){var n=e.ParseArg(t),i=e.create("token","mo",{},r);e.addAttributes(i),e.Push(e.create("node","mover",[n,i]))},Emph:function(e,t){var r=e.stack.env.mathvariant==="-tex-mathit"?"normal":"-tex-mathit";e.Push(e.ParseTextArg(t,{mathvariant:r}))},SetFont:function(e,t,r){e.saveText(),e.stack.env.mathvariant=r},SetSize:function(e,t,r){e.saveText(),e.stack.env.mathsize=r},CheckAutoload:function(e,t){var r=e.configuration.packageData.get("autoload"),n=e.texParser;t=t.slice(1);var i=n.lookup("macro",t);if(!i||r&&i._func===r.Autoload){if(n.parse("macro",[n,t]),!i)return;(0,hir.retryAfter)(Promise.resolve())}n.parse("macro",[e,t])},Macro:db.default.Macro,Spacer:db.default.Spacer,Hskip:db.default.Hskip,rule:db.default.rule,Rule:db.default.Rule,HandleRef:db.default.HandleRef};var BM={},pir=ce&&ce.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),jLe=ce&&ce.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},fir=ce&&ce.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(l){s={error:l}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return o},mir=ce&&ce.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))},hB=ce&&ce.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(BM,"__esModule",{value:!0}),BM.TextParser=void 0;var gir=hB(_c()),ULe=hB(Do),yir=hB(Sa()),Tir=ii,GLe=hB(La),WLe=ti,vir=function(e){pir(t,e);function t(r,n,i,o){var s=e.call(this,r,n,i)||this;return s.level=o,s}return Object.defineProperty(t.prototype,"texParser",{get:function(){return this.configuration.packageData.get("textmacros").texParser},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tags",{get:function(){return this.texParser.tags},enumerable:!1,configurable:!0}),t.prototype.mml=function(){return this.level!=null?this.create("node","mstyle",this.nodes,{displaystyle:!1,scriptlevel:this.level}):this.nodes.length===1?this.nodes[0]:this.create("node","mrow",this.nodes)},t.prototype.Parse=function(){this.text="",this.nodes=[],this.envStack=[],e.prototype.Parse.call(this)},t.prototype.saveText=function(){if(this.text){var r=this.stack.env.mathvariant,n=yir.default.internalText(this,this.text,r?{mathvariant:r}:{});this.text="",this.Push(n)}},t.prototype.Push=function(r){if(this.text&&this.saveText(),r instanceof WLe.StopItem)return e.prototype.Push.call(this,r);if(r instanceof WLe.StyleItem){this.stack.env.mathcolor=this.stack.env.color;return}r instanceof Tir.AbstractMmlNode&&(this.addAttributes(r),this.nodes.push(r))},t.prototype.PushMath=function(r){var n,i,o=this.stack.env;r.isKind("TeXAtom")||(r=this.create("node","TeXAtom",[r]));try{for(var s=jLe(["mathsize","mathcolor"]),l=s.next();!l.done;l=s.next()){var c=l.value;o[c]&&!r.attributes.getExplicit(c)&&(!r.isToken&&!r.isKind("mstyle")&&(r=this.create("node","mstyle",[r])),GLe.default.setAttribute(r,c,o[c]))}}catch(u){n={error:u}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}r.isInferred&&(r=this.create("node","mrow",r.childNodes)),this.nodes.push(r)},t.prototype.addAttributes=function(r){var n,i,o=this.stack.env;if(r.isToken)try{for(var s=jLe(["mathsize","mathcolor","mathvariant"]),l=s.next();!l.done;l=s.next()){var c=l.value;o[c]&&!r.attributes.getExplicit(c)&&GLe.default.setAttribute(r,c,o[c])}}catch(u){n={error:u}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}},t.prototype.ParseTextArg=function(r,n){var i=this.GetArgument(r);return n=Object.assign(Object.assign({},this.stack.env),n),new t(i,n,this.configuration).mml()},t.prototype.ParseArg=function(r){return new t(this.GetArgument(r),this.stack.env,this.configuration).mml()},t.prototype.Error=function(r,n){for(var i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];throw new(ULe.default.bind.apply(ULe.default,mir([void 0,r,n],fir(i),!1)))},t}(gir.default);BM.TextParser=vir;var bir=ce&&ce.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Qir=si,jd=G1,xir=ub,_ir=bir(Sa()),wir=BM;new Qir.CommandMap("textcomp-macros",{textasciicircum:["Insert","^"],textasciitilde:["Insert","~"],textasteriskcentered:["Insert","*"],textbackslash:["Insert","\\"],textbar:["Insert","|"],textbraceleft:["Insert","{"],textbraceright:["Insert","}"],textbullet:["Insert","•"],textdagger:["Insert","†"],textdaggerdbl:["Insert","‡"],textellipsis:["Insert","…"],textemdash:["Insert","—"],textendash:["Insert","–"],textexclamdown:["Insert","¡"],textgreater:["Insert",">"],textless:["Insert","<"],textordfeminine:["Insert","ª"],textordmasculine:["Insert","º"],textparagraph:["Insert","¶"],textperiodcentered:["Insert","·"],textquestiondown:["Insert","¿"],textquotedblleft:["Insert","“"],textquotedblright:["Insert","”"],textquoteleft:["Insert","‘"],textquoteright:["Insert","’"],textsection:["Insert","§"],textunderscore:["Insert","_"],textvisiblespace:["Insert","␣"],textacutedbl:["Insert","˝"],textasciiacute:["Insert","´"],textasciibreve:["Insert","˘"],textasciicaron:["Insert","ˇ"],textasciidieresis:["Insert","¨"],textasciimacron:["Insert","¯"],textgravedbl:["Insert","˵"],texttildelow:["Insert","˷"],textbaht:["Insert","฿"],textcent:["Insert","¢"],textcolonmonetary:["Insert","₡"],textcurrency:["Insert","¤"],textdollar:["Insert","$"],textdong:["Insert","₫"],texteuro:["Insert","€"],textflorin:["Insert","ƒ"],textguarani:["Insert","₲"],textlira:["Insert","₤"],textnaira:["Insert","₦"],textpeso:["Insert","₱"],textsterling:["Insert","£"],textwon:["Insert","₩"],textyen:["Insert","¥"],textcircledP:["Insert","℗"],textcompwordmark:["Insert",""],textcopyleft:["Insert","🄯"],textcopyright:["Insert","©"],textregistered:["Insert","®"],textservicemark:["Insert","℠"],texttrademark:["Insert","™"],textbardbl:["Insert","‖"],textbigcircle:["Insert","◯"],textblank:["Insert","␢"],textbrokenbar:["Insert","¦"],textdiscount:["Insert","⁒"],textestimated:["Insert","℮"],textinterrobang:["Insert","‽"],textinterrobangdown:["Insert","⸘"],textmusicalnote:["Insert","♪"],textnumero:["Insert","№"],textopenbullet:["Insert","◦"],textpertenthousand:["Insert","‱"],textperthousand:["Insert","‰"],textrecipe:["Insert","℞"],textreferencemark:["Insert","※"],textlangle:["Insert","〈"],textrangle:["Insert","〉"],textlbrackdbl:["Insert","⟦"],textrbrackdbl:["Insert","⟧"],textlquill:["Insert","⁅"],textrquill:["Insert","⁆"],textcelsius:["Insert","℃"],textdegree:["Insert","°"],textdiv:["Insert","÷"],textdownarrow:["Insert","↓"],textfractionsolidus:["Insert","⁄"],textleftarrow:["Insert","←"],textlnot:["Insert","¬"],textmho:["Insert","℧"],textminus:["Insert","−"],textmu:["Insert","µ"],textohm:["Insert","Ω"],textonehalf:["Insert","½"],textonequarter:["Insert","¼"],textonesuperior:["Insert","¹"],textpm:["Insert","±"],textrightarrow:["Insert","→"],textsurd:["Insert","√"],textthreequarters:["Insert","¾"],textthreesuperior:["Insert","³"],texttimes:["Insert","×"],texttwosuperior:["Insert","²"],textuparrow:["Insert","↑"],textborn:["Insert","*"],textdied:["Insert","†"],textdivorced:["Insert","⚮"],textmarried:["Insert","⚭"],textcentoldstyle:["Insert","¢",jd.TexConstant.Variant.OLDSTYLE],textdollaroldstyle:["Insert","$",jd.TexConstant.Variant.OLDSTYLE],textzerooldstyle:["Insert","0",jd.TexConstant.Variant.OLDSTYLE],textoneoldstyle:["Insert","1",jd.TexConstant.Variant.OLDSTYLE],texttwooldstyle:["Insert","2",jd.TexConstant.Variant.OLDSTYLE],textthreeoldstyle:["Insert","3",jd.TexConstant.Variant.OLDSTYLE],textfouroldstyle:["Insert","4",jd.TexConstant.Variant.OLDSTYLE],textfiveoldstyle:["Insert","5",jd.TexConstant.Variant.OLDSTYLE],textsixoldstyle:["Insert","6",jd.TexConstant.Variant.OLDSTYLE],textsevenoldstyle:["Insert","7",jd.TexConstant.Variant.OLDSTYLE],texteightoldstyle:["Insert","8",jd.TexConstant.Variant.OLDSTYLE],textnineoldstyle:["Insert","9",jd.TexConstant.Variant.OLDSTYLE]},{Insert:function(e,t,r,n){if(e instanceof wir.TextParser){if(!n){xir.TextMacrosMethods.Insert(e,t,r);return}e.saveText()}e.Push(_ir.default.internalText(e,r,n?{mathvariant:n}:{}))}}),Object.defineProperty(ure,"__esModule",{value:!0}),ure.TextcompConfiguration=void 0;var Lir=To;ure.TextcompConfiguration=Lir.Configuration.create("textcomp",{handler:{macro:["textcomp-macros"]}});var FM={},qLe=si,ap=G1,ZLe=ub,Kg=Jh;new qLe.MacroMap("text-special",{$:"Math","%":"Comment","^":"MathModeOnly",_:"MathModeOnly","&":"Misplaced","#":"Misplaced","~":"Tilde"," ":"Space"," ":"Space","\r":"Space","\n":"Space"," ":"Tilde","{":"OpenBrace","}":"CloseBrace","`":"OpenQuote","'":"CloseQuote"},ZLe.TextMacrosMethods),new qLe.CommandMap("text-macros",{"(":"Math",$:"SelfQuote",_:"SelfQuote","%":"SelfQuote","{":"SelfQuote","}":"SelfQuote"," ":"SelfQuote","&":"SelfQuote","#":"SelfQuote","\\":"SelfQuote","'":["Accent","´"],"’":["Accent","´"],"`":["Accent","`"],"‘":["Accent","`"],"^":["Accent","^"],'"':["Accent","¨"],"~":["Accent","~"],"=":["Accent","¯"],".":["Accent","˙"],u:["Accent","˘"],v:["Accent","ˇ"],emph:"Emph",rm:["SetFont",ap.TexConstant.Variant.NORMAL],mit:["SetFont",ap.TexConstant.Variant.ITALIC],oldstyle:["SetFont",ap.TexConstant.Variant.OLDSTYLE],cal:["SetFont",ap.TexConstant.Variant.CALLIGRAPHIC],it:["SetFont","-tex-mathit"],bf:["SetFont",ap.TexConstant.Variant.BOLD],bbFont:["SetFont",ap.TexConstant.Variant.DOUBLESTRUCK],scr:["SetFont",ap.TexConstant.Variant.SCRIPT],frak:["SetFont",ap.TexConstant.Variant.FRAKTUR],sf:["SetFont",ap.TexConstant.Variant.SANSSERIF],tt:["SetFont",ap.TexConstant.Variant.MONOSPACE],tiny:["SetSize",.5],Tiny:["SetSize",.6],scriptsize:["SetSize",.7],small:["SetSize",.85],normalsize:["SetSize",1],large:["SetSize",1.2],Large:["SetSize",1.44],LARGE:["SetSize",1.73],huge:["SetSize",2.07],Huge:["SetSize",2.49],Bbb:["Macro","{\\bbFont #1}",1],textnormal:["Macro","{\\rm #1}",1],textup:["Macro","{\\rm #1}",1],textrm:["Macro","{\\rm #1}",1],textit:["Macro","{\\it #1}",1],textbf:["Macro","{\\bf #1}",1],textsf:["Macro","{\\sf #1}",1],texttt:["Macro","{\\tt #1}",1],dagger:["Insert","†"],ddagger:["Insert","‡"],S:["Insert","§"],",":["Spacer",Kg.MATHSPACE.thinmathspace],":":["Spacer",Kg.MATHSPACE.mediummathspace],">":["Spacer",Kg.MATHSPACE.mediummathspace],";":["Spacer",Kg.MATHSPACE.thickmathspace],"!":["Spacer",Kg.MATHSPACE.negativethinmathspace],enspace:["Spacer",.5],quad:["Spacer",1],qquad:["Spacer",2],thinspace:["Spacer",Kg.MATHSPACE.thinmathspace],negthinspace:["Spacer",Kg.MATHSPACE.negativethinmathspace],hskip:"Hskip",hspace:"Hskip",kern:"Hskip",mskip:"Hskip",mspace:"Hskip",mkern:"Hskip",rule:"rule",Rule:["Rule"],Space:["Rule","blank"],color:"CheckAutoload",textcolor:"CheckAutoload",colorbox:"CheckAutoload",fcolorbox:"CheckAutoload",href:"CheckAutoload",style:"CheckAutoload",class:"CheckAutoload",cssId:"CheckAutoload",unicode:"CheckAutoload",ref:["HandleRef",!1],eqref:["HandleRef",!0]},ZLe.TextMacrosMethods);var Sir=ce&&ce.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},hb;Object.defineProperty(FM,"__esModule",{value:!0}),FM.TextMacrosConfiguration=FM.TextBaseConfiguration=void 0;var dre=To,Mir=Sir(vV),XLe=Lf,_m=ti,KLe=BM,kir=ub;FM.TextBaseConfiguration=dre.Configuration.create("text-base",{parser:"text",handler:{character:["command","text-special"],macro:["text-macros"]},fallback:{character:function(e,t){e.text+=t},macro:function(e,t){var r=e.texParser,n=r.lookup("macro",t);n&&n._func!==kir.TextMacrosMethods.Macro&&e.Error("MathMacro","%1 is only supported in math mode","\\"+t),r.parse("macro",[e,t])}},items:(hb={},hb[_m.StartItem.prototype.kind]=_m.StartItem,hb[_m.StopItem.prototype.kind]=_m.StopItem,hb[_m.MmlItem.prototype.kind]=_m.MmlItem,hb[_m.StyleItem.prototype.kind]=_m.StyleItem,hb)});function Cir(e,t,r,n){var i=e.configuration.packageData.get("textmacros");return e instanceof KLe.TextParser||(i.texParser=e),[new KLe.TextParser(t,n?{mathvariant:n}:{},i.parseOptions,r).mml()]}FM.TextMacrosConfiguration=dre.Configuration.create("textmacros",{config:function(e,t){var r=new dre.ParserConfiguration(t.parseOptions.options.textmacros.packages,["tex","text"]);r.init();var n=new Mir.default(r,[]);n.options=t.parseOptions.options,r.config(t),XLe.TagsFactory.addTags(r.tags),n.tags=XLe.TagsFactory.getDefault(),n.tags.configuration=n,n.packageData=t.parseOptions.packageData,n.packageData.set("textmacros",{parseOptions:n,jax:t,texParser:null}),n.options.internalMath=Cir},preprocessors:[function(e){var t=e.data.packageData.get("textmacros");t.parseOptions.nodeFactory.setMmlFactory(t.jax.mmlFactory)}],options:{textmacros:{packages:["text-base"]}}});var hre={};Object.defineProperty(hre,"__esModule",{value:!0}),hre.UpgreekConfiguration=void 0;var Eir=To,Air=si,Oir=G1;function Pir(e,t){var r=t.attributes||{};r.mathvariant=Oir.TexConstant.Variant.NORMAL;var n=e.create("token","mi",r,t.char);e.Push(n)}new Air.CharacterMap("upgreek",Pir,{upalpha:"α",upbeta:"β",upgamma:"γ",updelta:"δ",upepsilon:"ϵ",upzeta:"ζ",upeta:"η",uptheta:"θ",upiota:"ι",upkappa:"κ",uplambda:"λ",upmu:"μ",upnu:"ν",upxi:"ξ",upomicron:"ο",uppi:"π",uprho:"ρ",upsigma:"σ",uptau:"τ",upupsilon:"υ",upphi:"ϕ",upchi:"χ",uppsi:"ψ",upomega:"ω",upvarepsilon:"ε",upvartheta:"ϑ",upvarpi:"ϖ",upvarrho:"ϱ",upvarsigma:"ς",upvarphi:"φ",Upgamma:"Γ",Updelta:"Δ",Uptheta:"Θ",Uplambda:"Λ",Upxi:"Ξ",Uppi:"Π",Upsigma:"Σ",Upupsilon:"Υ",Upphi:"Φ",Uppsi:"Ψ",Upomega:"Ω"}),hre.UpgreekConfiguration=Eir.Configuration.create("upgreek",{handler:{macro:["upgreek"]}});var Iir={};(function(e){var t=ce&&ce.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(e,"__esModule",{value:!0}),e.UnicodeConfiguration=e.UnicodeMethods=void 0;var r=To,n=t(Do),i=si,o=t(Sa()),s=t(La),l=QS;e.UnicodeMethods={};var c={};e.UnicodeMethods.Unicode=function(u,d){var h=u.GetBrackets(d),p=null,f=null;h&&(h.replace(/ /g,"").match(/^(\d+(\.\d*)?|\.\d+),(\d+(\.\d*)?|\.\d+)$/)?(p=h.replace(/ /g,"").split(/,/),f=u.GetBrackets(d)):f=h);var m=o.default.trimSpaces(u.GetArgument(d)).replace(/^0x/,"x");if(!m.match(/^(x[0-9A-Fa-f]+|[0-9]+)$/))throw new n.default("BadUnicode","Argument to \\unicode must be a number");var g=parseInt(m.match(/^x/)?"0"+m:m);c[g]?f||(f=c[g][2]):c[g]=[800,200,f,g],p&&(c[g][0]=Math.floor(parseFloat(p[0])*1e3),c[g][1]=Math.floor(parseFloat(p[1])*1e3));var T=u.stack.env.font,y={};f?(c[g][2]=y.fontfamily=f.replace(/'/g,"'"),T&&(T.match(/bold/)&&(y.fontweight="bold"),T.match(/italic|-mathit/)&&(y.fontstyle="italic"))):T&&(y.mathvariant=T);var v=u.create("token","mtext",y,(0,l.numeric)(m));s.default.setProperty(v,"unicode",!0),u.Push(v)},new i.CommandMap("unicode",{unicode:"Unicode"},e.UnicodeMethods),e.UnicodeConfiguration=r.Configuration.create("unicode",{handler:{macro:["unicode"]}})})(Iir);var Hir={};(function(e){var t=ce&&ce.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(e,"__esModule",{value:!0}),e.VerbConfiguration=e.VerbMethods=void 0;var r=To,n=G1,i=si,o=t(Do);e.VerbMethods={},e.VerbMethods.Verb=function(s,l){var c=s.GetNext(),u=++s.i;if(c==="")throw new o.default("MissingArgFor","Missing argument for %1",l);for(;s.i<s.string.length&&s.string.charAt(s.i)!==c;)s.i++;if(s.i===s.string.length)throw new o.default("NoClosingDelim","Can't find closing delimiter for %1",s.currentCS);var d=s.string.slice(u,s.i).replace(/ /g," ");s.i++,s.Push(s.create("token","mtext",{mathvariant:n.TexConstant.Variant.MONOSPACE},d))},new i.CommandMap("verb",{verb:"Verb"},e.VerbMethods),e.VerbConfiguration=r.Configuration.create("verb",{handler:{macro:["verb"]}})})(Hir),Object.defineProperty(hte,"__esModule",{value:!0});var YLe=hte.AllPackages=void 0;ALe(),typeof MathJax<"u"&&MathJax.loader&&MathJax.loader.preLoad("[tex]/action","[tex]/ams","[tex]/amscd","[tex]/bbox","[tex]/boldsymbol","[tex]/braket","[tex]/bussproofs","[tex]/cancel","[tex]/cases","[tex]/centernot","[tex]/color","[tex]/colorv2","[tex]/colortbl","[tex]/empheq","[tex]/enclose","[tex]/extpfeil","[tex]/gensymb","[tex]/html","[tex]/mathtools","[tex]/mhchem","[tex]/newcommand","[tex]/noerrors","[tex]/noundefined","[tex]/physics","[tex]/upgreek","[tex]/unicode","[tex]/verb","[tex]/configmacros","[tex]/tagformat","[tex]/textcomp","[tex]/textmacros","[tex]/setoptions"),YLe=hte.AllPackages=["base","action","ams","amscd","bbox","boldsymbol","braket","bussproofs","cancel","cases","centernot","color","colortbl","empheq","enclose","extpfeil","gensymb","html","mathtools","mhchem","newcommand","noerrors","noundefined","upgreek","unicode","verb","configmacros","tagformat","textcomp","textmacros"];const Vir=16,Rir=8,Nir=["svg a{fill:blue;stroke:blue}",'[data-mml-node="mstyle"]>rect[data-bgcolor="true"]{rx: 8%; ry: 12%}','[data-mml-node="merror"]>g{fill:red;stroke:red}','[data-mml-node="merror"]>rect[data-background]{fill:yellow;stroke:none}',"[data-frame],[data-line]{stroke-width:70px;fill:none}",".mjx-dashed{stroke-dasharray:140}",".mjx-dotted{stroke-linecap:round;stroke-dasharray:0,140}","use[data-c]{stroke-width:3px}"].join(""),JLe=K_e();Cwe(JLe);const Bir=new _xe({packages:YLe}),Fir=new Fer.SVG({fontCache:"local"}),Dir=lV.mathjax.document("",{InputJax:Bir,OutputJax:Fir});function zir(e){const t=Dir.convert(e,{display:!1,em:2*Vir,ex:2*Rir});return JLe.innerHTML(t).replace(/<defs>/,`<defs><style>${Nir}</style>`)}function $Le(e,t,r){return e===null?[t[0]-r.lng,t[1]-r.lat,t[2]+r.lng,t[3]+r.lat]:[Math.min(e[0],t[0]-r.lng),Math.min(e[1],t[1]-r.lat),Math.max(e[2],t[2]+r.lng),Math.max(e[3],t[3]+r.lat)]}function jir(e){if(e.geometry.type==="Point")return e.geometry.coordinates;const t=e.geometry.coordinates,r="area"in e.properties?Math.sqrt(e.properties.area)/5e5:.1;return mSt(t,r)}function Uir(e){if(!("renderedLabel"in e)){const t="label"in e?e.label:"user_label"in e?e.user_label:"",r=t!==""?(t.substr(0,1).toUpperCase()+t.substr(1)).replaceAll(`
|
2171
2171
|
`,"<br/>"):"";e.renderedLabel=r.replaceAll(/`\$([^\$]*)\$`/g,n=>zir(n.slice(2,-2)))}return e.renderedLabel}var ss,DM,wm,Yg,pb,zM,fb,jM,mb,UM,pB,pre;class Gir{constructor(t){Si(this,wm),Si(this,pb),Si(this,fb),Si(this,mb),Si(this,pB),Si(this,ss,null),Si(this,DM,null),this._flatmap=t,this._map=t.map,this._activeFeatures=new Set,this._selectedFeatureIds=new Map,this._currentPopup=null,this._infoControl=null,this._tooltip=null,this._inQuery=!1,this._modal=!1,this.__colourOptions={colour:!0,outline:!0},this.__activeMarker=null,this.__lastMarkerId=9e5,this.__markerIdByMarker=new Map,this.__markerIdByFeatureId=new Map,this.__annotationByMarkerId=new Map,this.__markerPositions=new Map,t.setInitialPosition(),this.__featureEnabledCount=new Map(Array.from(this._flatmap.annotations.keys()).map(i=>[+i,0]));const r=t.options.style!=="functional";this.__pathManager=new SSt(t,this,r);const n=this.__pathManager.pathTypes();this._layerManager=new iqt(t,this),this.__pathManager.enablePathLines(!0,!0);for(const i of n)this.__pathManager.enablePathsByType(i.type,i.enabled,!0);if(this.__pathManager.haveCentrelines&&this.enableCentrelines(this.__pathManager.enabledCentrelines,!0),this.__systemsManager=new oqt(this._flatmap,this,r),this.__enabledConnectivityTaxons=new Set(this._flatmap.taxonIdentifiers),t.options.minimap&&(Ui(this,DM,new bqt(t,t.options.minimap)),this._map.addControl(Sr(this,DM))),t.options.fullscreenControl===!0&&this._map.addControl(new ou.FullscreenControl,"top-right"),t.options.navigationControl){const i=t.options.navigationControl,o=typeof i=="string"&&["top-left","top-right","bottom-right","bottom-left"].includes(i)?i:"bottom-right";this._map.addControl(new NavigationControl(t),o)}t.options.standalone&&(this._map.addControl(new Tqt(t)),this._infoControl=new sqt(t),this._map.addControl(this._infoControl),this._map.addControl(new pqt(t)),this._map.addControl(new gqt(t,n)),this._map.addControl(new cqt(t,this._layerManager)),this.__pathManager.haveCentrelines&&this._map.addControl(new dqt(t,this._layerManager,{showCentrelines:!1})),t.options.style==="functional"?(this._map.addControl(new Qqt(t,this.__systemsManager.systems)),this._map.addControl(new uqt(t,t.options.layerOptions))):this._map.addControl(new xqt(t)),this._map.addControl(new yqt(this,t.options.flightPaths)),t.options.annotator&&this._map.addControl(new hqt(t))),this.__setupAnnotation(),Ui(this,ss,new mqt(t,!1)),this._map.addControl(Sr(this,ss)),t.options.flightPaths===!0&&this._layerManager.setFlightPathMode(!0),this._map.on("click",this.clickEvent_.bind(this)),this._map.on("touchend",this.clickEvent_.bind(this)),this._map.on("mousemove",this.mouseMoveEvent_.bind(this)),this._lastFeatureMouseEntered=null,this._lastFeatureModelsMouse=null,this.__lastClickLngLat=null,this._map.on("move",this.panZoomEvent_.bind(this,"pan")),this._map.on("zoom",this.panZoomEvent_.bind(this,"zoom")),this.__pan_zoom_enabled=!1}get minimap(){return Sr(this,DM)}get pathManager(){return this.__pathManager}getState(){return{center:this._map.getCenter().toArray(),zoom:this._map.getZoom(),bearing:this._map.getBearing(),pitch:this._map.getPitch()}}setState(t){const r=Object.assign({},t);"zoom"in r&&("center"in r?r.around=r.center:r.around=[0,0]),Object.keys(r).length>0&&this._map.jumpTo(r)}showAnnotator(t=!0){Sr(this,ss)&&Sr(this,ss).show(t)}inDrawingAnnotationMode(){if(Sr(this,ss))return Sr(this,ss).inDrawingMode()}commitAnnotationEvent(t){Sr(this,ss)&&Sr(this,ss).commitEvent(t)}abortAnnotationEvent(t){Sr(this,ss)&&Sr(this,ss).abortEvent(t)}rollbackAnnotationEvent(t){Sr(this,ss)&&Sr(this,ss).rollbackEvent(t)}clearAnnotationFeatures(){Sr(this,ss)&&Sr(this,ss).clearFeatures()}removeAnnotationFeature(){Sr(this,ss)&&Sr(this,ss).removeFeature()}addAnnotationFeature(t){Sr(this,ss)&&Sr(this,ss).addFeature(t)}refreshAnnotationFeatureGeometry(t){if(Sr(this,ss))return Sr(this,ss).refreshGeometry(t)}changeAnnotationDrawMode(t){Sr(this,ss)&&Sr(this,ss).changeMode(t)}__setupAnnotation(){this.__featureIdToMapId=new Map([...this._flatmap.annotations.entries()].map(t=>[t[1].id,t[0]]));for(const t of this.__featureIdToMapId.values()){const r=this.mapFeature(t);r!==void 0&&this._map.setFeatureState(r,{"map-annotation":!0})}}setFeatureAnnotated(t){const r=this.__featureIdToMapId.get(t);if(r){const n=this.mapFeature(r);n!==void 0&&this._map.setFeatureState(n,{annotated:!0})}}setPaint(t){this.__colourOptions=t,yi(this,wm,Yg).call(this,t)}getLayers(){return this._layerManager.layers}enableLayer(t,r=!0){this._layerManager.activate(t,r)}enableFlightPaths(t=!0){this._layerManager.setFlightPathMode(t)}getSystems(){return this.__systemsManager.systems}enableSystem(t,r=!0){this.__systemsManager.enable(t,r)}mapFeature(t){const r=this._flatmap.annotation(t);if(r!==void 0)return{id:t,source:DK,sourceLayer:(this._flatmap.options.separateLayers?`${r.layer}_${r["tile-layer"]}`:r["tile-layer"]).replaceAll("/","_"),children:r.children||[]}}enableMapFeature(t,r=!0){if(t!==void 0){const n=yi(this,pb,zM).call(this,t);"hidden"in n?r?yi(this,fb,jM).call(this,t,"hidden"):n.hidden||yi(this,mb,UM).call(this,t,{hidden:!0}):r||yi(this,mb,UM).call(this,t,{hidden:!0}),this.__enableFeatureMarker(t.id,r)}}enableFeature(t,r=!0,n=!1){const i=this.__featureEnabledCount.get(+t);(n||r&&i===0||!r&&i==1)&&this.enableMapFeature(this.mapFeature(t),r),n?this.__featureEnabledCount.set(+t,r?1:0):this.__featureEnabledCount.set(+t,i+(r?1:-1))}enableFeatureWithChildren(t,r=!0,n=!1){const i=this.mapFeature(t);if(i!==void 0){this.enableFeature(t,r,n);for(const o of i.children)this.enableFeatureWithChildren(o,r,n)}}__enableFeatureMarker(t,r=!0){const n=this.__markerIdByFeatureId.get(+t);if(n!==void 0){const i=document.getElementById(`marker-${n}`);i&&(i.style.visibility=r?"visible":"hidden")}}__featureEnabled(t){if(t.id){const r=yi(this,pb,zM).call(this,t);return r!==void 0&&(!("hidden"in r)||!r.hidden)}return G$.includes(t.layer.id)}featureSelected_(t){return this._selectedFeatureIds.has(+t)}selectFeature(t,r=!0){const n=this._flatmap.annotation(t);if(n&&"sckan"in n){const s=this._layerManager.sckanState;if(s==="none"||s==="valid"&&!n.sckan||s==="invalid"&&n.sckan)return!1}t=+t;let i=!1;const o=this._selectedFeatureIds.size===0;if(this._selectedFeatureIds.has(t))this._selectedFeatureIds.set(t,this._selectedFeatureIds.get(t)+1),i=!0;else{const s=this.mapFeature(t);if(s!==void 0){const l=yi(this,pb,zM).call(this,s);l!==void 0&&(!("hidden"in l)||!l.hidden)&&(yi(this,mb,UM).call(this,s,{selected:!0}),this._selectedFeatureIds.set(t,1),i=!0)}}return i&&o&&yi(this,wm,Yg).call(this,{...this.__colourOptions,dimmed:r}),i}unselectFeature(t){if(t=+t,this._selectedFeatureIds.has(t)){const r=this._selectedFeatureIds.get(t);if(r>1)this._selectedFeatureIds.set(t,r-1);else{const n=this.mapFeature(t);n!==void 0&&(yi(this,fb,jM).call(this,n,"selected"),this._selectedFeatureIds.delete(+t))}}this._selectedFeatureIds.size===0&&yi(this,wm,Yg).call(this,{...this.__colourOptions,dimmed:!1})}unselectFeatures(){for(const t of this._selectedFeatureIds.keys()){const r=this.mapFeature(t);r!==void 0&&yi(this,fb,jM).call(this,r,"selected")}this._selectedFeatureIds.clear(),yi(this,wm,Yg).call(this,{...this.__colourOptions,dimmed:!1})}activateFeature(t){t!==void 0&&(yi(this,mb,UM).call(this,t,{active:!0}),this._activeFeatures.add(t))}activateLineFeatures(t){for(const r of t){+r.properties.featureId,this.activateFeature(r);const n=new Set(t.map(i=>i.properties.featureId));for(const i of this.__pathManager.lineFeatureIds(n))this.activateFeature(this.mapFeature(i))}}resetActiveFeatures_(){for(const t of this._activeFeatures)yi(this,fb,jM).call(this,t,"active");this._activeFeatures.clear()}smallestAnnotatedPolygonFeature_(t){let r=0,n=null;for(const i of t)if(i.geometry.type.includes("Polygon")&&yi(this,pb,zM).call(this,i)["map-annotation"]){const o=qLt(i.geometry.type,i.geometry.coordinates),s=tSt(o);(n===null||r>s)&&(n=i,r=s)}return n}setModal_(t){this._modal=!0}__clearModal(t){this._modal=!1}reset(){this.__clearModal(),this.__clearActiveMarker(),this.unselectFeatures()}clearSearchResults(t=!0){this.unselectFeatures()}selectFeatures(t){if(t.length){this.unselectFeatures();for(const r of t){const n=this._flatmap.annotation(r);if(n&&this.selectFeature(r)&&"type"in n&&n.type.startsWith("line"))for(const i of this.__pathManager.lineFeatureIds([r]))this.selectFeature(i)}}}showSearchResults(t){this.unselectFeatures(),this.zoomToFeatures(t,{noZoomIn:!0})}zoomToFeatures(t,r=null){if(r=ug(r,{noZoomIn:!1,padding:10}),t.length){this.unselectFeatures();let n=null;if(r.noZoomIn){const o=this._map.getBounds().toArray();n=[...o[0],...o[1]]}const i=this._map.unproject({x:r.padding,y:r.padding});i.lng-=n[0],i.lat=n[3]-i.lat;for(const o of t){const s=this._flatmap.annotation(o);if(s&&this.selectFeature(o)&&(n=$Le(n,s.bounds,i),"type"in s&&s.type.startsWith("line"))){for(const l of this.__pathManager.lineFeatureIds([o]))if(this.selectFeature(l)){const c=this._flatmap.annotation(l);n=$Le(n,c.bounds,i)}}}n!==null&&this._map.fitBounds(n,{padding:0,animate:!1})}}showPopup(t,r,n={}){const i=this._flatmap.annotation(t),o=n&&n.annotationFeatureGeometry;if(i||o){this._currentPopup&&(n&&n.preserveSelection&&(this._currentPopup.options.preserveSelection=n.preserveSelection),this._currentPopup.remove()),n&&n.preserveSelection?delete n.preserveSelection:this.unselectFeatures(),this.selectFeature(t);let s=null;"positionAtLastClick"in n&&n.positionAtLastClick&&this.__lastClickLngLat!==null?s=this.__lastClickLngLat:o?s=n.annotationFeatureGeometry:s=this.__markerPosition(t,i),this._map.getBounds().contains(s)||this._map.panTo(s),this.setModal_(),this._currentPopup=new ou.Popup(n).addTo(this._map),this._currentPopup.on("close",this.__onCloseCurrentPopup.bind(this)),o&&this._currentPopup.on("close",this.abortAnnotationEvent.bind(this)),this._currentPopup.setLngLat(s),typeof r=="object"?this._currentPopup.setDOMContent(r):this._currentPopup.setText(r)}}__onCloseCurrentPopup(){this._currentPopup&&(this.__clearModal(),this._currentPopup.options&&this._currentPopup.options.preserveSelection||this.unselectFeatures(),this._currentPopup=null)}removeTooltip_(){this._tooltip&&(this._tooltip.remove(),this._tooltip=null)}lineTooltip_(t){const r=[];for(const n of t){const i=n.properties;if("error"in i&&r.push(`<div class="feature-error">Error: ${i.error}</div>`),"warning"in i&&r.push(`<div class="feature-error">Warning: ${i.warning}</div>`),"label"in i&&(!("tooltip"in i)||i.tooltip)){const o=i.label,s=(o.substr(0,1).toUpperCase()+o.substr(1)).replaceAll(`
|
2172
2172
|
`,"<br/>");r.includes(s)||r.push(s)}}return r.length===0?"":`<div class='flatmap-feature-label'>${r.join("<hr/>")}</div>`}tooltipHtml_(t,r=!1){const n=[];if("error"in t&&n.push(`<div class="feature-error">Error: ${t.error}</div>`),"warning"in t&&n.push(`<div class="feature-error">Warning: ${t.warning}</div>`),("label"in t||"hyperlink"in t||"user_label"in t)&&(r||!("tooltip"in t)||t.tooltip)){const i=Uir(t);"hyperlink"in t?i===""?n.push(`<a href='${t.hyperlink}'>${t.hyperlink}</a>`):n.push(`<a href='${t.hyperlink}'>${i}</a></div>`):n.push(i)}return n.length===0?"":`<div class='flatmap-feature-label'>${n.join("<hr/>")}</div>`}__featureEvent(t,r){return r.sourceLayer===Vd?this._flatmap.featureEvent(t,this.__pathManager.pathProperties(r)):"properties"in r?this._flatmap.featureEvent(t,r.properties):!1}__resetFeatureDisplay(){this.removeTooltip_(),this._map.getCanvas().style.cursor="default",this.resetActiveFeatures_()}mouseMoveEvent_(t){if(this._modal)return;this.__resetFeatureDisplay();const r=this._infoControl&&this._infoControl.active;r&&this._infoControl.reset();const n=yi(this,pB,pre).call(this,t.point);if(n.length===0){this._lastFeatureMouseEntered=null,this._lastFeatureModelsMouse=null;return}const i=n[0],o="properties"in i&&"models"in i.properties?i.properties.models:null;this._lastFeatureMouseEntered!==i.id&&(this._lastFeatureModelsMouse===null||this._lastFeatureModelsMouse!==o)&&(this.__featureEvent("mouseenter",i)?(this._lastFeatureMouseEntered=i.id,this._lastFeatureModelsMouse=o):(this._lastFeatureMouseEntered=null,this._lastFeatureModelsMouse=null));let s="",l="";r&&("tooltip"in n[0].properties||this.activateFeature(n[0]),s=this._infoControl.featureInformation(n,t.lngLat));const c=n.filter(d=>"centreline"in d.properties||"type"in d.properties&&d.properties.type.startsWith("line"));let u=null;if(c.length>0)l=this.lineTooltip_(c),u=c[0],this.activateLineFeatures(c);else{let d=n.filter(h=>("hyperlink"in h.properties||"label"in h.properties||"user_label"in h.properties)&&(!("tooltip"in h.properties)||h.properties.tooltip)).sort((h,p)=>h.properties.area-p.properties.area);if(d.length>0){const h=this._map.getZoom(),p=d.filter(m=>m.properties.group&&h<m.properties.scale+1);p.length>0&&(d=p);const f=d[0];if(f.properties.user_drawn&&(f.id=f.properties.id),l=this.tooltipHtml_(f.properties),u=f,this._flatmap.options.debug){const m=["featureId","nerveId","tile-layer","type",...j$],g=[],T=[];for(const y of d)if(!T.includes(y.id)){T.push(y.id);for(const v of m)v in y.properties&&(g.push(`<span class="info-name">${v}:</span>`),g.push(`<span class="info-value">${y.properties[v]}</span>`))}this._flatmap.options.debug||(s=`<div id="info-control-info">${g.join(`
|
2173
|
-
`)}</div>`)}this.activateFeature(f),this.__activateRelatedFeatures(f),"hyperlink"in f.properties&&(this._map.getCanvas().style.cursor="pointer")}}s!==""&&this._infoControl.show(s),this.__showToolTip(l,t.lngLat,u)}__showToolTip(t,r,n=null){if(t!==""||this._flatmap.options.showId&&n!==null){let i="";if(this._flatmap.options.showPosition){const o=age(r.toArray()),s=oSt(o).geometry.coordinates;i=n===null?JSON.stringify(s):`${JSON.stringify(s)} (${n.id})`}this._flatmap.options.showId&&n!==null&&"id"in n.properties&&(i=`${i} ${n.properties.id}`),i!==""&&(t=`<span>${i}</span><br/>${t}`),t!==""&&(this._tooltip=new ou.Popup({closeButton:!1,closeOnClick:!1,maxWidth:"none",className:"flatmap-tooltip-popup"}),this._tooltip.setLngLat(r).setHTML(t).addTo(this._map))}}selectionEvent_(t,r){if(r!==void 0){const n=+r.id,i=!("properties"in r&&"kind"in r.properties&&["cell-type","scaffold","tissue"].includes(r.properties.kind));if(t.ctrlKey||t.metaKey){const o=this.featureSelected_(n);for(const s of this._activeFeatures)o?this.unselectFeature(s.id):this.selectFeature(s.id,i)}else{let o=!0;for(const s of this._selectedFeatureIds.keys())if(s===n){o=!1;break}if(this.unselectFeatures(),o)for(const s of this._activeFeatures)this.selectFeature(s.id,i)}}}clickEvent_(t){if(this._modal)return;this.__clearActiveMarker();const r=yi(this,pB,pre).call(this,t.point);if(r.length==0){this.unselectFeatures();return}const n=this.inDrawingAnnotationMode(),i=r.filter(s=>!s.id)[0],o=r.filter(s=>s.id)[0];this.selectionEvent_(t.originalEvent,o),this._modal?(this.__resetFeatureDisplay(),this.unselectFeatures(),this.__clearModal()):i&&!n?this.__featureEvent("click",i):o&&(this.__lastClickLngLat=t.lngLat,this.__featureEvent("click",o),"properties"in o&&"hyperlink"in o.properties&&window.open(o.properties.hyperlink,"_blank"))}__activateRelatedFeatures(t){if("nerveId"in t.properties){const r=t.properties.nerveId;r!==t.id&&this.activateFeature(this.mapFeature(r));for(const n of this.__pathManager.nerveFeatureIds(r))this.activateFeature(this.mapFeature(n))}if("nodeId"in t.properties)for(const r of this.__pathManager.pathFeatureIds(t.properties.nodeId))this.activateFeature(this.mapFeature(r))}enablePathsBySystem(t,r=!0,n=!1){this.__pathManager.enablePathsBySystem(t,r,n)}enablePathsByType(t,r=!0){this.__pathManager.enablePathsByType(t,r)}pathFeatureIds(t){const r=new Cge;return r.extend(this.__pathManager.connectivityModelFeatureIds(t)),r.extend(this.__pathManager.pathModelFeatureIds(t)),r}pathModelNodes(t){return this.__pathManager.pathModelNodes(t)}nodePathModels(t){return this.__pathManager.nodePathModels(t)}enableCentrelines(t=!0,r=!1){this.__pathManager.enablePathsByType("centreline",t,r),yi(this,wm,Yg).call(this,{showCentrelines:t})}enableSckanPaths(t,r=!0){this._layerManager.enableSckanPaths(t,r)}enableConnectivityByTaxonIds(t,r=!0){if(r)for(const n of t)this.__enabledConnectivityTaxons.add(n);else for(const n of t)this.__enabledConnectivityTaxons.delete(n);this._layerManager.setFilter({taxons:[...this.__enabledConnectivityTaxons.values()]})}excludeAnnotated(t=!1){yi(this,wm,Yg).call(this,{excludeAnnotated:t})}__markerPosition(t,r){if(this.__markerPositions.has(t))return this.__markerPositions.get(t);let n=r.markerPosition||r.centroid;if(n===null||n==null){const i=this._map.querySourceFeatures(DK,{sourceLayer:this._flatmap.options.separateLayers?`${r.layer}_${r["tile-layer"]}`:r["tile-layer"],filter:["all",["==",["id"],parseInt(t)],["==",["geometry-type"],"Polygon"]]});i.length>0&&(n=jir(i[0]))}return this.__markerPositions.set(t,n),n}addMarker(t,r={}){const n=this._flatmap.modelFeatureIds(t);let i=-1;for(const o of n){const s=this._flatmap.annotation(o);if(!(!("markerPosition"in s)&&!s.geometry.includes("Polygon"))&&!("marker"in s)){i===-1&&(this.__lastMarkerId+=1,i=this.__lastMarkerId);const l=r.colour||"#005974",c=r.element?new ou.Marker({element:r.element}):new ou.Marker({color:l,scale:.5}),u=document.createElement("div"),d=document.createElement("div");d.innerHTML=c.getElement().innerHTML,u.id=`marker-${i}`,u.appendChild(d);const h={element:u};"className"in r&&(h.className=r.className);const p=this.__markerPosition(o,s);if(r.cluster&&this._layerManager)this._layerManager.addMarkers([p]);else{const f=new ou.Marker(h).setLngLat(p).addTo(this._map);u.addEventListener("mouseenter",this.markerMouseEvent_.bind(this,f,t)),u.addEventListener("mousemove",this.markerMouseEvent_.bind(this,f,t)),u.addEventListener("mouseleave",this.markerMouseEvent_.bind(this,f,t)),u.addEventListener("click",this.markerMouseEvent_.bind(this,f,t)),this.__markerIdByMarker.set(f,i),this.__markerIdByFeatureId.set(+o,i),this.__annotationByMarkerId.set(i,s),this.__featureEnabled(this.mapFeature(+o))||(u.style.visibility="hidden")}}}return i===-1&&console.warn(`Unable to find feature '${t}' on which to place marker`),i}clearMarkers(){for(const t of this.__markerIdByMarker.keys())t.remove();this.__markerIdByMarker.clear(),this.__annotationByMarkerId.clear()}removeMarker(t){for(const[r,n]of this.__markerIdByMarker.entries())if(t===n){r.remove(),this.__markerIdByMarker.remove(r),this.__annotationByMarkerId.remove(n);break}}visibleMarkerAnatomicalIds(){const t=[],r=this._map.getBounds();for(const[n,i]of this.__markerIdByMarker.entries())if(r.contains(n.getLngLat())){const o=this.__annotationByMarkerId.get(i);t.includes(o.models)||t.push(o.models)}return t}markerMouseEvent_(t,r,n){if(!(this._modal||this.__activeMarker!==null&&n.type==="mouseleave")){if(["mouseenter","mouseleave","click"].includes(n.type)&&(this.__activeMarker=t,this.removeTooltip_(),t.setPopup(null),t.getElement().style.cursor="default",["mouseenter","click"].includes(n.type))){const i=this.__markerIdByMarker.get(t),o=this.__annotationByMarkerId.get(i),s=this.mapFeature(o.featureId);s!==void 0&&(n.type==="mouseenter"?(this.resetActiveFeatures_(),this.activateFeature(s)):this.selectionEvent_(n,s));const l=this.tooltipHtml_(o,!0);this.__showToolTip(l,t.getLngLat()),this._flatmap.markerEvent(n.type,i,r)}n.stopPropagation()}}__clearActiveMarker(){this.__activeMarker!==null&&(this.__activeMarker.setPopup(null),this.__activeMarker=null)}showMarkerPopup(t,r,n){const i=this.__activeMarker;if(t!==this.__markerIdByMarker.get(i))return this.__clearActiveMarker(),!1;const o=i.getLngLat();this._map.getBounds().contains(o)||this._map.panTo(o);const s=document.createElement("div");return typeof r=="object"?s.appendChild(r):s.innerHTML=r,s.addEventListener("click",l=>this.__clearActiveMarker()),this._tooltip=new ou.Popup({closeButton:!1,closeOnClick:!1,maxWidth:"none",className:"flatmap-marker-popup"}),this._tooltip.setLngLat(o).setDOMContent(s),i.setPopup(this._tooltip),i.togglePopup(),!0}enablePanZoomEvents(t=!0){this.__pan_zoom_enabled=t}panZoomEvent_(t){this.__pan_zoom_enabled&&this._flatmap.panZoomEvent(t)}}ss=new WeakMap,DM=new WeakMap,wm=new WeakSet,Yg=function(e){this._layerManager.setPaint(e)},pb=new WeakSet,zM=function(e){return this._map.getFeatureState(e)},fb=new WeakSet,jM=function(e,t){this._map.removeFeatureState(e,t),this._layerManager.removeFeatureState(e,t)},mb=new WeakSet,UM=function(e,t){this._map.setFeatureState(e,t),this._layerManager.setFeatureState(e,t)},pB=new WeakSet,pre=function(e){return this._layerManager.featuresAtPoint(e).filter(t=>this.__featureEnabled(t))};const Wir=[{id:"label-background",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC8AAAAmCAIAAADbSlUzAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAJOgAACToAYJjBRwAAACVSURBVFhH7dixDoJAEIThfXqMBcYKrTQ+jkYSStDYkVhZINxyEshJcZXJtC7FfNlmur9eyXb7Vqf6+bI9HUKyWkt5e4RlOF9ycerjsqbqpfefuKzNJawBWIOxBmMNxhqMNRhrMNZgrMFYg7EGYw3GGow1GGuw5dU07y4ua22nUlb3uKxd80IOx1Pjxp+f4P/P+ZButl+YrbXnPs+YmAAAAABJRU5ErkJggg==",options:{content:[21,4,28,33],stretchX:[[21,28]],stretchY:[[4,33]]}},{id:"xlabel-background",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAmCAYAAAD9XArwAAABhWlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV/TSotUROwg4pChioIFURFHrUIRKoRaoVUHk0s/hCYNSYqLo+BacPBjserg4qyrg6sgCH6AODk6KbpIif9LCi1iPTjux7t7j7t3gFArMc0KjAGabpupRFzMZFfE4CsC6EEIIxiWmWXMSlISbcfXPXx8vYvxrPbn/hxdas5igE8knmGGaROvE09t2gbnfeIIK8oq8TnxqEkXJH7kuuLxG+eCywLPjJjp1BxxhFgstLDSwqxoasSTxFFV0ylfyHisct7irJUqrHFP/sJwTl9e4jrNASSwgEVIEKGggg2UYCNGq06KhRTtx9v4+12/RC6FXBtg5JhHGRpk1w/+B7+7tfIT415SOA50vDjOxyAQ3AXqVcf5Pnac+gngfwau9Ka/XAOmP0mvNrXoEdC9DVxcNzVlD7jcAfqeDNmUXclPU8jngfcz+qYs0HsLdK56vTX2cfoApKmr5A1wcAgMFSh7rc27Q629/Xum0d8PfM1yq13h+DEAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfkBBEJExO2pF7NAAAAqUlEQVQ4y+3OIQ6CYBiH8ef9MDhxc8yABjeP4LwAx3BWTwE3oHkMrBa7JJN3YBogfQkjr0HcDCg0C0/+7f2/AjghycLFj0ECYMarHPRcUoQx25uEJMsR/lUQj4YUtQ+K9aC+1IgABPFc/NjUcy1JYD5++tXM0LEe9rCHPfwXzDu43ChV2qaUKjWWLFLUfkdqLVnkXDiWK4LDkMlckCkwfs8p1cmSbfbs7k+jIi/gASaPYQAAAABJRU5ErkJggg==",options:{content:[4,4,5,33],stretchX:[[4,5]],stretchY:[[4,33]]}},{id:"ylabel-background",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAmCAYAAAD9XArwAAABhWlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV/TSotUROwg4pChioIFURFHrUIRKoRaoVUHk0s/hCYNSYqLo+BacPBjserg4qyrg6sgCH6AODk6KbpIif9LCi1iPTjux7t7j7t3gFArMc0KjAGabpupRFzMZFfE4CsC6EEIIxiWmWXMSlISbcfXPXx8vYvxrPbn/hxdas5igE8knmGGaROvE09t2gbnfeIIK8oq8TnxqEkXJH7kuuLxG+eCywLPjJjp1BxxhFgstLDSwqxoasSTxFFV0ylfyHisct7irJUqrHFP/sJwTl9e4jrNASSwgEVIEKGggg2UYCNGq06KhRTtx9v4+12/RC6FXBtg5JhHGRpk1w/+B7+7tfIT415SOA50vDjOxyAQ3AXqVcf5Pnac+gngfwau9Ka/XAOmP0mvNrXoEdC9DVxcNzVlD7jcAfqeDNmUXclPU8jngfcz+qYs0HsLdK56vTX2cfoApKmr5A1wcAgMFSh7rc27Q629/Xum0d8PfM1yq13h+DEAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfkBBEJEyeXEKp4AAAAwklEQVQ4y+3ULU/DUBhA4XO/2rUgwV1ZBWLJBP9fI0gQuMktWcJSwUq79n68qAoSGnCYHv3oowBD09jz88t1CpGcBQCtFYWz3D3tNuz3EXgojqdWLt0gKWWZSynLpRvkeGqFpinVuf2QsnDc3mz4qe7zyjgF9BQidVWyVF2VTCGicxa0VotQa0XOguaPrXCFK1zhv8D5VkvNt9POGvphXIT9MOKsAbyvfl2z95UCCrw3769vfYjp2+ydNdxvH2sOh/QFh8F7PWWiL5EAAAAASUVORK5CYII=",options:{content:[4,4,5,33],stretchX:[[4,5]],stretchY:[[4,33]]}},{id:"rounded-rectangle",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAGmSURBVDiNldPBitpAGAfwv5mMmy85JCistD5Ai/gCPYovYJENCPZQF8VD36HXUkrfQws9R8WLF58gh2h2W2PpoeTWxBgzMr1spd3uUvOHOQ2//3yHb4C/UyGi95Zl3XLOUwASgFRVNTVN8ysRfQTwFA+FMdYhoqjf7+9ns5kMgkCGYSjDMJTb7VbO53M5HA4PRBRzzl//g8vlcrxYLE7osbNcLmWlUok459cAULgb+2YymRi1Wu3B6e7H9300Go1dkiTPGRG97Xa7LzqdjnqWBlAqlRBFEVzXNZRisXhl2/bFufh3bNvmAF4WOOd73/cvDMPIVSCEQLVaFUqWZbkxAKiqCsaYVHLLe1E452kcx7mhEALH47Gg6Lr+3fO83AXr9Rq6rofK4XD4NB6P07wFo9Eok1J+LgC41DTt1nEco16vn4VXqxWazeYuSZJnCoAfWZZdt9vtneu6/8We56HVasVCiDcAvp0uGGM2Ef3s9Xp7x3HkZrM57X8QBHI6ncrBYJASUcQYe/XYA5eapr2zLOuGc77H3XfmnKemaX4hog8AnvwJfgHMKs1jQ++4tQAAAABJRU5ErkJggg==",options:{content:[3,3,13,13],stretchX:[[7,9]],stretchY:[[7,9]]}}],qir=1.4,eSe="NCBITaxon:2787823";class Zir{constructor(t,r,n,i){this._baseUrl=r,this.__id=n.id,this.__uuid=n.uuid,this.__details=n.details,this.__provenance=n.provenance,this.__created=n.created,this.__taxon=n.taxon,this.__biologicalSex=n.biologicalSex,this._mapNumber=n.number,this._callback=n.callback,this._layers=n.layers,this._markers=n.markers,this._options=n.options,this._pathways=n.pathways,this._resolve=i,this._map=null,this.__searchIndex=new GLt(this),this.__idToAnnotation=new Map,this.__datasetToFeatureIds=new Map,this.__modelToFeatureIds=new Map,this.__mapSourceToFeatureIds=new Map,this.__annIdToFeatureId=new Map,this.__taxonToFeatureIds=new Map;for(const[s,l]of Object.entries(n.annotations))this.__addAnnotation(s,l),this.__searchIndex.indexMetadata(s,l);for(const[s,l]of Object.entries(n.style.sources))if(l.url&&(l.url=this.makeServerUrl(l.url)),l.tiles){const c=[];for(const u of l.tiles)c.push(this.makeServerUrl(u));l.tiles=c}"images"in n.options||(n.options.images=[]);for(const s of Wir){let l=!1;for(const c of n.options.images)if(s.id===c.id){l=!0;break}l||n.options.images.push(s)}const o={style:n.style,container:t,attributionControl:!1};"maxZoom"in n.options&&(o.maxZoom=n.options.maxZoom),"minZoom"in n.options&&(o.minZoom=n.options.minZoom),o.hash=n.options.debug===!0,this._map=new ou.Map(o),n.options.debug===!0&&(this._map.showTileBoundaries=!0),this._map.setRenderWorldCopies(!1),this._userInteractions=null,this._initialState=null,this._map.on("idle",()=>{if(this._userInteractions===null)this.setupUserInteractions_();else if(this._initialState===null){this._map.setMinZoom(3),this._map.setMaxBounds(null),this._map.setRenderWorldCopies(!0),this._bounds=this._map.getBounds();const s=this._bounds.toArray(),l=ou.MercatorCoordinate.fromLngLat(s[0]),c=ou.MercatorCoordinate.fromLngLat(s[1]);this.__normalised_origin=[l.x,c.y],this.__normalised_size=[c.x-l.x,l.y-c.y],"state"in this._options&&this._userInteractions.setState(this._options.state),this._initialState=this.getState(),this._userInteractions.minimap&&this._userInteractions.minimap.initialise(),this._resolve(this)}})}async setupUserInteractions_(){for(const t of this._options.images)await this.addImage(t.id,t.url,"",t.options);this._userInteractions=new Gir(this)}get bounds(){return this._bounds}resetMap(){this._initialState!==null&&this.setState(this._initialState),this._userInteractions!==null&&this._userInteractions.reset()}zoomIn(){this._map.zoomIn()}zoomOut(){this._map.zoomOut()}pathTypes(){if(this._userInteractions!==null)return this._userInteractions.pathManager.pathTypes()}enablePath(t,r=!0){this._userInteractions!==null&&this._userInteractions.enablePathsByType(t,r)}enableSckanPath(t,r=!0){this._userInteractions!==null&&this._userInteractions.enableSckanPaths(t,r)}enableConnectivityByTaxonIds(t,r=!0){this._userInteractions!==null&&(Array.isArray(t)?this._userInteractions.enableConnectivityByTaxonIds(t,r):this._userInteractions.enableConnectivityByTaxonIds([t],r))}enableCentrelines(t=!0){this._userInteractions!==null&&this._userInteractions.enableCentrelines(t)}loadImage_(t){return new Promise((r,n)=>{this._map.loadImage(t,(i,o)=>{i?n(i):r(o)})})}loadEncodedImage_(t){return new Promise((r,n)=>{const i=new Image;i.src=t,i.onload=o=>r(o.target)})}async addImage(t,r,n,i={}){if(!this._map.hasImage(t)){const o=await(r.startsWith("data:image")?this.loadEncodedImage_(r):this.loadImage_(r.startsWith("/")?this.makeServerUrl(r):new URL(r,n)));this._map.addImage(t,o,i)}}makeServerUrl(t,r="flatmap/"){return t.startsWith("http://")||t.startsWith("https://")?t:t.startsWith("/")?`${this._baseUrl}${r}${this.__uuid}${t}`:`${this._baseUrl}${r}${this.__uuid}/${t}`}get taxon(){return this.__taxon}get biologicalSex(){return this.__biologicalSex}get created(){return this.__created}get id(){return this.__id}get uuid(){return this.__uuid}get url(){let t=this.makeServerUrl("");return t.endsWith("/")?t.substring(0,t.length-1):t}get details(){return this.__details}get provenance(){return this.__provenance}get uniqueId(){return`${this.__uuid}-${this._mapNumber}`}get annotations(){return this.__idToAnnotation}annotation(t){return this.__idToAnnotation.get(t.toString())}setFeatureAnnotated(t){this._userInteractions!==null&&this._userInteractions.setFeatureAnnotated(t)}__updateFeatureIdMapEntry(t,r,n){const i=HI(t),o=r.get(i);o?o.push(n):r.set(i,[n])}__updateFeatureIdMap(t,r,n,i=null){if(t in n&&n[t].length){const o=n[t];if(Array.isArray(o))for(const s of o)this.__updateFeatureIdMapEntry(s,r,n.featureId);else this.__updateFeatureIdMapEntry(o,r,n.featureId)}else i!==null&&"models"in n&&n.models.startsWith(wSt)&&this.__updateFeatureIdMapEntry(i,r,n.featureId)}__addAnnotation(t,r){r.featureId=t,this.__idToAnnotation.set(t,r),this.__updateFeatureIdMap("dataset",this.__datasetToFeatureIds,r),this.__updateFeatureIdMap("models",this.__modelToFeatureIds,r),this.__updateFeatureIdMap("source",this.__mapSourceToFeatureIds,r),this.__updateFeatureIdMap("taxons",this.__taxonToFeatureIds,r,eSe),this.__annIdToFeatureId.set(r.id,t)}modelFeatureIds(t){return this.__modelToFeatureIds.get(HI(t))||[]}modelFeatureIdList(t){const r=new Cge;if(Array.isArray(t))for(const n of t)r.extend(this.modelFeatureIds(n));else r.extend(this.modelFeatureIds(t));return r.length==0&&(r.extend(this.__datasetToFeatureIds.get(t)),r.extend(this.__mapSourceToFeatureIds.get(t))),r.length==0&&this._userInteractions!==null&&r.extend(this._userInteractions.pathFeatureIds(t)),r}modelForFeature(t){const r=this.__idToAnnotation.get(t);return r&&"models"in r?HI(r.models):null}nodePathModels(t){if(this._userInteractions!==null)return this._userInteractions.nodePathModels(t)}pathModelNodes(t){if(this._userInteractions!==null)return[...this._userInteractions.pathModelNodes(t)]}taxonFeatureIds(t){const r=this.__taxonToFeatureIds.get(HI(t));return[...new Set(r||[])]}get layers(){return this._layers}get map(){return this._map}get markers(){return this._markers}get anatomicalIdentifiers(){return[...this.__modelToFeatureIds.keys()]}get taxonIdentifiers(){return[...this.__taxonToFeatureIds.keys()]}get datasets(){return[...this.__datasetToFeatureIds.keys()]}get options(){return this._options}get pathways(){return this._pathways}getZoom(){return{mapUUID:this.__uuid,minZoom:this._map.getMinZoom(),zoom:this._map.getZoom(),maxZoom:this._map.getMaxZoom()}}callback(t,r,...n){if(this._callback)return r.mapUUID=this.__uuid,this._callback(t,r,...n)}setInitialPosition(){"bounds"in this._options&&this._map.fitBounds(this._options.bounds,{animate:!1}),"center"in this._options&&this._map.setCenter(this._options.center),"zoom"in this._options&&this._map.setZoom(this._options.zoom)}close(){this._map&&(this._map.remove(),this._map=null)}resize(){this._map.resize()}getIdentifier(){return{taxon:this.__taxon,biologicalSex:this.__biologicalSex,uuid:this.__uuid}}getState(){return this._userInteractions!==null?this._userInteractions.getState():{}}setState(t){this._userInteractions!==null&&this._userInteractions.setState(t)}showPopup(t,r,n){this._userInteractions!==null&&this._userInteractions.showPopup(t,r,n)}setPaint(t=null){t=ug(t,{colour:!0,outline:!0}),this._userInteractions!==null&&this._userInteractions.setPaint(t)}setColour(t=null){console.log("`setColour()` is deprecated; please use `setPaint()` instead."),this.setPaint(t)}getBackgroundColour(){return this._map.getPaintProperty("background","background-color")}getBackgroundOpacity(){return this._map.getPaintProperty("background","background-opacity")}setBackgroundColour(t){localStorage.setItem("flatmap-background-colour",t),this._map.setPaintProperty("background","background-color",t),this._userInteractions.minimap&&this._userInteractions.minimap.setBackgroundColour(t)}setBackgroundOpacity(t){this._map.setPaintProperty("background","background-opacity",t),this._userInteractions.minimap&&this._userInteractions.minimap.setBackgroundOpacity(t)}showMinimap(t){this._userInteractions.minimap&&this._userInteractions.minimap.show(t)}getLayers(){if(this._userInteractions!==null)return this._userInteractions.getLayers()}enableLayer(t,r=!0){if(this._userInteractions!==null)return this._userInteractions.enableLayer(t,r)}enableFlightPaths(t=!0){this._userInteractions!==null&&this._userInteractions.enableFlightPaths(t)}getSystems(){if(this._userInteractions!==null)return this._userInteractions.getSystems()}enableSystem(t,r=!0){if(this._userInteractions!==null)return this._userInteractions.enableSystem(t,r)}addMarker(t,r={}){return this._userInteractions!==null?this._userInteractions.addMarker(t,r):-1}removeMarker(t){this._userInteractions!==null&&this._userInteractions.removeMarker(t)}clearMarkers(){this._userInteractions!==null&&this._userInteractions.clearMarkers()}visibleMarkerAnatomicalIds(){if(this._userInteractions!==null)return this._userInteractions.visibleMarkerAnatomicalIds()}showMarkerPopup(t,r,n={}){return this._userInteractions!==null?this._userInteractions.showMarkerPopup(t,r,n):!1}__exportedProperties(t){const r={},n=["id","featureId","connectivity","dataset","kind","label","models","source","taxons","hyperlinks","completeness","missing-nodes","alert","biological-sex"],i=["hyperlinks"];for(const o of n)o in t&&t[o]!==void 0&&(i.includes(o)?r[o]=JSON.parse(t[o]):o==="featureId"?r[o]=+t[o]:r[o]=t[o]);return Object.keys(r).length>0&&(r.type="feature"),r}showAnnotator(t=!0){this._userInteractions!==null&&this._userInteractions.showAnnotator(t)}annotationEvent(t,r){this.callback("annotation",{type:t,feature:r})}commitAnnotationEvent(t){this._userInteractions&&this._userInteractions.commitAnnotationEvent(t)}rollbackAnnotationEvent(t){this._userInteractions&&this._userInteractions.rollbackAnnotationEvent(t)}clearAnnotationFeature(){this._userInteractions&&this._userInteractions.clearAnnotationFeatures()}removeAnnotationFeature(){this._userInteractions&&this._userInteractions.removeAnnotationFeature()}addAnnotationFeature(t){this._userInteractions&&this._userInteractions.addAnnotationFeature(t)}refreshAnnotationFeatureGeometry(t){if(this._userInteractions)return this._userInteractions.refreshAnnotationFeatureGeometry(t)}changeAnnotationDrawMode(t){this._userInteractions&&this._userInteractions.changeAnnotationDrawMode(t)}featureEvent(t,r){const n=this.__exportedProperties(r);return Object.keys(n).length>0?(this.callback(t,n),!0):!1}featureProperties(t){const r=this.annotation(t);return r?this.__exportedProperties(r):{}}markerEvent(t,r,n){this.callback(t,{type:"marker",id:r,models:n})}controlEvent(t,r,n){this.callback(t,{type:"control",control:r,value:n})}enablePanZoomEvents(t=!0){this._userInteractions!==null&&this._userInteractions.enablePanZoomEvents(t)}panZoomEvent(t){const r=this._map.getBounds();if(this.__normalised_origin!==void 0){const n=ou.MercatorCoordinate.fromLngLat(r.toArray()[0]),i=ou.MercatorCoordinate.fromLngLat(r.toArray()[1]),o=[(n.x-this.__normalised_origin[0])/this.__normalised_size[0],(i.y-this.__normalised_origin[1])/this.__normalised_size[1]],s=[(i.x-n.x)/this.__normalised_size[0],(n.y-i.y)/this.__normalised_size[1]];this.callback("pan-zoom",{type:t,origin:o,size:s})}}panZoomTo(t,r){if(this.__normalised_origin!==void 0){const n=t[0]*this.__normalised_size[0]+this.__normalised_origin[0],i=t[1]*this.__normalised_size[1]+this.__normalised_origin[1],o=n+r[0]*this.__normalised_size[0],s=i+r[1]*this.__normalised_size[1],l=new ou.MercatorCoordinate(n,s,0).toLngLat(),c=new ou.MercatorCoordinate(o,i,0).toLngLat();this._map.fitBounds([l,c],{animate:!1})}}search(t,r=!1){return r?this.__searchIndex.auto_suggest(t):this.__searchIndex.search(t)}clearSearchResults(){this._userInteractions!==null&&this._userInteractions.clearSearchResults()}showSearchResults(t){this._userInteractions!==null&&this._userInteractions.showSearchResults(t.featureIds)}selectFeatures(t){if(this._userInteractions!==null){const r=this.modelFeatureIdList(t);this._userInteractions.selectFeatures(r)}}zoomToFeatures(t,r=null){if(r=ug(r,{select:!0,highlight:!1,padding:100}),this._userInteractions!==null){const n=this.modelFeatureIdList(t);this._userInteractions.zoomToFeatures(n,r)}}selectGeoJSONFeatures(t){this._userInteractions!==null&&this._userInteractions.selectFeatures(t)}zoomToGeoJSONFeatures(t,r=null){r=ug(r,{select:!0,highlight:!1,padding:100}),this._userInteractions!==null&&this._userInteractions.zoomToFeatures(t,r)}}let tSe=class{constructor(t,r={}){this._mapServer=new vLt(t),this._options=r,this._mapList=[],this._mapNumber=0,this._initialisingMutex=new _St,this._initialised=!1}async ensureInitialised_(){return await this._initialisingMutex.dispatch(async()=>{if(!this._initialised){this._mapList=[];const t=await this._mapServer.loadJSON("");for(const r of t)r.separateLayers="version"in r&&r.version>=qir,this._mapList.push(r);this._initialised=!0}})}allMaps(){return new Promise(async(t,r)=>{await this.ensureInitialised_();const n={};for(const i of this._mapList){const o="uuid"in i?i.uuid:i.id;n[o]=i}t(n)})}findMap_(t){return new Promise(async(r,n)=>{await this.ensureInitialised_(),r(this.lookupMap_(t))})}latestMap_(t){const r=t.constructor.name==="String"?t:"uuid"in t?t.uuid:"taxon"in t?t.taxon:null;if(r===null)return null;let n=null,i="";for(const o of this._mapList)if(("uuid"in o&&r===o.uuid||r===o.id||"taxon"in o&&r===o.taxon||r===o.source)&&(!("biologicalSex"in t)||"biologicalSex"in o&&t.biologicalSex===o.biologicalSex))if("created"in o)i<o.created&&(i=o.created,n=o);else{n=o;break}return n}lookupMap_(t){return typeof t=="object"?this.latestMap_(t):this.latestMap_({uuid:t})}loadMap(t,r,n,i={}){return new Promise(async(o,s)=>{try{const l=await this.findMap_(t);l===null&&s(`Unknown map: ${JSON.stringify(t)}`);const c="uuid"in l?l.uuid:l.id,u=await this._mapServer.loadJSON(`flatmap/${c}/`),d="uuid"in u?u.uuid:u.id;if(c!==d)throw new Error(`Map '${c}' has wrong ID in index`);const h=Object.assign({},this._options,i);!("bounds"in i)&&"bounds"in u&&(h.bounds=u.bounds),"style"in u?h.style=u.style:h.style="flatmap",!("image-layers"in u)&&"image_layer"in u&&(u["image-layers"]=u.image_layer);let p=[];if(!("version"in u)||u.version<=1)for(const v of u.layers)typeof v=="string"?p.push({id:v,description:v.charAt(0).toUpperCase()+v.slice(1),selectable:!0}):p.push(v);else p=await this._mapServer.loadJSON(`flatmap/${c}/layers`);const f=await this._mapServer.loadJSON(`flatmap/${c}/style`);"glyphs"in f||(f.glyphs="https://fonts.openmaptiles.org/{fontstack}/{range}.pbf");const m=await this._mapServer.loadJSON(`flatmap/${c}/pathways`),g=await this._mapServer.loadJSON(`flatmap/${c}/annotations`),T=await this._mapServer.loadJSON(`flatmap/${c}/metadata`),y=await this._mapServer.loadJSON(`flatmap/${c}/markers`);return"vector-tiles"in f.sources&&("minZoom"in h||(h.minZoom=f.sources["vector-tiles"].minzoom),"maxZoom"in h||(h.maxZoom=f.sources["vector-tiles"].maxzoom)),"layerOptions"in h?("colour"in h.layerOptions||(h.layerOptions.colour=!0),"outline"in h.layerOptions||(h.layerOptions.outline=!0)):h.layerOptions={colour:!0,outline:!0},h.layerOptions.authoring="authoring"in u?u.authoring:!1,h.separateLayers=l.separateLayers,this._mapNumber+=1,new Zir(r,this._mapServer.url(),{id:l,uuid:c,details:u,taxon:l.taxon,biologicalSex:l.biologicalSex,style:f,options:h,layers:p,markers:y,annotations:g,number:this._mapNumber,pathways:m,provenance:T,provenance:T,callback:n},o)}catch(l){s(l)}})}};/*! js-cookie v3.0.5 | MIT */function fB(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}var Xir={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function fre(e,t){function r(i,o,s){if(!(typeof document>"u")){s=fB({},t,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var c in s)s[c]&&(l+="; "+c,s[c]!==!0&&(l+="="+s[c].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+l}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},l=0;l<o.length;l++){var c=o[l].split("="),u=c.slice(1).join("=");try{var d=decodeURIComponent(c[0]);if(s[d]=e.read(u,d),i===d)break}catch{}}return i?s[i]:s}}return Object.create({set:r,get:n,remove:function(i,o){r(i,"",fB({},o,{expires:-1}))},withAttributes:function(i){return fre(this.converter,fB({},this.attributes,i))},withConverter:function(i){return fre(fB({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var mre=fre(Xir,{path:"/"}),sp=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Vs=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Bf,GM,Lc,lp,Lm;const Kir=1e4;class Yir{constructor(t){Bf.add(this),GM.set(this,void 0),Lc.set(this,null),lp.set(this,null),t.slice(-1)==="/"?sp(this,GM,t.slice(0,-1),"f"):sp(this,GM,t,"f")}get currentUser(){return Vs(this,lp,"f")}get currentError(){return Vs(this,Lc,"f")}async authenticate(t){sp(this,Lc,null,"f"),sp(this,lp,null,"f");const r=await Vs(this,Bf,"m",Lm).call(this,t,"authenticate");return"error"in r?(mre.remove("annotation-key"),Promise.resolve(Vs(this,Lc,"f"))):(mre.set("annotation-key",r.session,{secure:!0,expires:1}),sp(this,lp,r.data,"f"),Promise.resolve(Vs(this,lp,"f")))}async unauthenticate(t){sp(this,Lc,null,"f"),sp(this,lp,null,"f");const r=await Vs(this,Bf,"m",Lm).call(this,t,"unauthenticate");return"success"in r?Promise.resolve(r):Promise.resolve(Vs(this,Lc,"f"))}async annotatedItemIds(t,r){const n=await Vs(this,Bf,"m",Lm).call(this,t,"items/","GET",{resource:r});return"error"in n?Promise.resolve(Vs(this,Lc,"f")):Promise.resolve(n)}async drawnFeatures(t,r){const n=await Vs(this,Bf,"m",Lm).call(this,t,"features/","GET",{resource:r});return"error"in n?Promise.resolve(Vs(this,Lc,"f")):Promise.resolve(n)}async itemAnnotations(t,r,n){const i=await Vs(this,Bf,"m",Lm).call(this,t,"annotations/","GET",{resource:r,item:n});return"error"in i?Promise.resolve(Vs(this,Lc,"f")):Promise.resolve(i)}async annotation(t,r){const n=await Vs(this,Bf,"m",Lm).call(this,t,"annotation/","GET",{annotation:r});return"error"in n?Promise.resolve(Vs(this,Lc,"f")):Promise.resolve(n)}async addAnnotation(t,r){if(Vs(this,lp,"f")&&Vs(this,lp,"f").canUpdate){const n=Object.assign({creator:Vs(this,lp,"f"),created:new Date().toISOString()},r),i=await Vs(this,Bf,"m",Lm).call(this,t,"annotation/","POST",{data:n});if(!("error"in i))return Promise.resolve(i);sp(this,Lc,i,"f")}else sp(this,Lc,{error:"user cannot add annotation"},"f");return Promise.resolve(Vs(this,Lc,"f"))}}GM=new WeakMap,Lc=new WeakMap,lp=new WeakMap,Bf=new WeakSet,Lm=async function(e,t,r="GET",n={}){let i=!0;const o=new AbortController;setTimeout(()=>{i&&(console.log("Annotation server timeout..."),o.abort())},Kir);const s={method:r,signal:o.signal};let l=`${Vs(this,GM,"f")}/${t}`;const c=mre.get("annotation-key")||"";if(r==="GET"){const d=[];for(const[h,p]of Object.entries(n))d.push(`${h}=${encodeURIComponent(JSON.stringify(p))}`);d.push(`key=${encodeURIComponent(e)}`),d.push(`session=${encodeURIComponent(c)}`),l+="?"+d.join("&"),s.headers={Accept:"application/json; charset=utf-8","Cache-Control":"no-store"}}else if(r==="POST"){const d=Object.assign({key:e,session:c},n);s.body=JSON.stringify(d),s.headers={Accept:"application/json; charset=utf-8","Content-Type":"application/json; charset=utf-8","Cache-Control":"no-store"}}const u=await fetch(l,s);return i=!1,u.ok?Promise.resolve(await u.json()):(sp(this,Lc,{error:`${u.status} ${u.statusText}`},"f"),Promise.resolve(Vs(this,Lc,"f")))};var Jir=!1;function mB(e,t,r){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,r),r):(e[t]=r,r)}function gre(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}/*!
|
2173
|
+
`)}</div>`)}this.activateFeature(f),this.__activateRelatedFeatures(f),"hyperlink"in f.properties&&(this._map.getCanvas().style.cursor="pointer")}}s!==""&&this._infoControl.show(s),this.__showToolTip(l,t.lngLat,u)}__showToolTip(t,r,n=null){if(t!==""||this._flatmap.options.showId&&n!==null){let i="";if(this._flatmap.options.showPosition){const o=age(r.toArray()),s=oSt(o).geometry.coordinates;i=n===null?JSON.stringify(s):`${JSON.stringify(s)} (${n.id})`}this._flatmap.options.showId&&n!==null&&"id"in n.properties&&(i=`${i} ${n.properties.id}`),i!==""&&(t=`<span>${i}</span><br/>${t}`),t!==""&&(this._tooltip=new ou.Popup({closeButton:!1,closeOnClick:!1,maxWidth:"none",className:"flatmap-tooltip-popup"}),this._tooltip.setLngLat(r).setHTML(t).addTo(this._map))}}selectionEvent_(t,r){if(r!==void 0){const n=+r.id,i=!("properties"in r&&"kind"in r.properties&&["cell-type","scaffold","tissue"].includes(r.properties.kind));if(t.ctrlKey||t.metaKey){const o=this.featureSelected_(n);for(const s of this._activeFeatures)o?this.unselectFeature(s.id):this.selectFeature(s.id,i)}else{let o=!0;for(const s of this._selectedFeatureIds.keys())if(s===n){o=!1;break}if(this.unselectFeatures(),o)for(const s of this._activeFeatures)this.selectFeature(s.id,i)}}}clickEvent_(t){if(this._modal)return;this.__clearActiveMarker();const r=yi(this,pB,pre).call(this,t.point);if(r.length==0){this.unselectFeatures();return}const n=this.inDrawingAnnotationMode(),i=r.filter(s=>!s.id)[0],o=r.filter(s=>s.id)[0];this.selectionEvent_(t.originalEvent,o),this._modal?(this.__resetFeatureDisplay(),this.unselectFeatures(),this.__clearModal()):i&&!n?this.__featureEvent("click",i):o&&(this.__lastClickLngLat=t.lngLat,this.__featureEvent("click",o),"properties"in o&&"hyperlink"in o.properties&&window.open(o.properties.hyperlink,"_blank"))}__activateRelatedFeatures(t){if("nerveId"in t.properties){const r=t.properties.nerveId;r!==t.id&&this.activateFeature(this.mapFeature(r));for(const n of this.__pathManager.nerveFeatureIds(r))this.activateFeature(this.mapFeature(n))}if("nodeId"in t.properties)for(const r of this.__pathManager.pathFeatureIds(t.properties.nodeId))this.activateFeature(this.mapFeature(r))}enablePathsBySystem(t,r=!0,n=!1){this.__pathManager.enablePathsBySystem(t,r,n)}enablePathsByType(t,r=!0){this.__pathManager.enablePathsByType(t,r)}pathFeatureIds(t){const r=new Cge;return r.extend(this.__pathManager.connectivityModelFeatureIds(t)),r.extend(this.__pathManager.pathModelFeatureIds(t)),r}pathModelNodes(t){return this.__pathManager.pathModelNodes(t)}nodePathModels(t){return this.__pathManager.nodePathModels(t)}enableCentrelines(t=!0,r=!1){this.__pathManager.enablePathsByType("centreline",t,r),yi(this,wm,Yg).call(this,{showCentrelines:t})}enableSckanPaths(t,r=!0){this._layerManager.enableSckanPaths(t,r)}enableConnectivityByTaxonIds(t,r=!0){if(r)for(const n of t)this.__enabledConnectivityTaxons.add(n);else for(const n of t)this.__enabledConnectivityTaxons.delete(n);this._layerManager.setFilter({taxons:[...this.__enabledConnectivityTaxons.values()]})}excludeAnnotated(t=!1){yi(this,wm,Yg).call(this,{excludeAnnotated:t})}__markerPosition(t,r){if(this.__markerPositions.has(t))return this.__markerPositions.get(t);let n=r.markerPosition||r.centroid;if(n===null||n==null){const i=this._map.querySourceFeatures(DK,{sourceLayer:this._flatmap.options.separateLayers?`${r.layer}_${r["tile-layer"]}`:r["tile-layer"],filter:["all",["==",["id"],parseInt(t)],["==",["geometry-type"],"Polygon"]]});i.length>0&&(n=jir(i[0]))}return this.__markerPositions.set(t,n),n}addMarker(t,r={}){const n=this._flatmap.modelFeatureIds(t);let i=-1;for(const o of n){const s=this._flatmap.annotation(o);if(!(!("markerPosition"in s)&&!s.geometry.includes("Polygon"))&&!("marker"in s)){i===-1&&(this.__lastMarkerId+=1,i=this.__lastMarkerId);const l=r.colour||"#005974",c=r.element?new ou.Marker({element:r.element}):new ou.Marker({color:l,scale:.5}),u=document.createElement("div"),d=document.createElement("div");d.innerHTML=c.getElement().innerHTML,u.id=`marker-${i}`,u.appendChild(d);const h={element:u};"className"in r&&(h.className=r.className);const p=this.__markerPosition(o,s);if(r.cluster&&this._layerManager)this._layerManager.addMarkers([p]);else{const f=new ou.Marker(h).setLngLat(p).addTo(this._map);u.addEventListener("mouseenter",this.markerMouseEvent_.bind(this,f,t)),u.addEventListener("mousemove",this.markerMouseEvent_.bind(this,f,t)),u.addEventListener("mouseleave",this.markerMouseEvent_.bind(this,f,t)),u.addEventListener("click",this.markerMouseEvent_.bind(this,f,t)),this.__markerIdByMarker.set(f,i),this.__markerIdByFeatureId.set(+o,i),this.__annotationByMarkerId.set(i,s),this.__featureEnabled(this.mapFeature(+o))||(u.style.visibility="hidden")}}}return i===-1&&console.warn(`Unable to find feature '${t}' on which to place marker`),i}clearMarkers(){for(const t of this.__markerIdByMarker.keys())t.remove();this.__markerIdByMarker.clear(),this.__annotationByMarkerId.clear()}removeMarker(t){for(const[r,n]of this.__markerIdByMarker.entries())if(t===n){r.remove(),this.__markerIdByMarker.remove(r),this.__annotationByMarkerId.remove(n);break}}visibleMarkerAnatomicalIds(){const t=[],r=this._map.getBounds();for(const[n,i]of this.__markerIdByMarker.entries())if(r.contains(n.getLngLat())){const o=this.__annotationByMarkerId.get(i);t.includes(o.models)||t.push(o.models)}return t}markerMouseEvent_(t,r,n){if(!(this._modal||this.__activeMarker!==null&&n.type==="mouseleave")){if(["mouseenter","mouseleave","click"].includes(n.type)&&(this.__activeMarker=t,this.removeTooltip_(),t.setPopup(null),t.getElement().style.cursor="default",["mouseenter","click"].includes(n.type))){const i=this.__markerIdByMarker.get(t),o=this.__annotationByMarkerId.get(i),s=this.mapFeature(o.featureId);s!==void 0&&(n.type==="mouseenter"?(this.resetActiveFeatures_(),this.activateFeature(s)):this.selectionEvent_(n,s));const l=this.tooltipHtml_(o,!0);this.__showToolTip(l,t.getLngLat()),this._flatmap.markerEvent(n.type,i,r)}n.stopPropagation()}}__clearActiveMarker(){this.__activeMarker!==null&&(this.__activeMarker.setPopup(null),this.__activeMarker=null)}showMarkerPopup(t,r,n){const i=this.__activeMarker;if(t!==this.__markerIdByMarker.get(i))return this.__clearActiveMarker(),!1;const o=i.getLngLat();this._map.getBounds().contains(o)||this._map.panTo(o);const s=document.createElement("div");return typeof r=="object"?s.appendChild(r):s.innerHTML=r,s.addEventListener("click",l=>this.__clearActiveMarker()),this._tooltip=new ou.Popup({closeButton:!1,closeOnClick:!1,maxWidth:"none",className:"flatmap-marker-popup"}),this._tooltip.setLngLat(o).setDOMContent(s),i.setPopup(this._tooltip),i.togglePopup(),!0}enablePanZoomEvents(t=!0){this.__pan_zoom_enabled=t}panZoomEvent_(t){this.__pan_zoom_enabled&&this._flatmap.panZoomEvent(t)}}ss=new WeakMap,DM=new WeakMap,wm=new WeakSet,Yg=function(e){this._layerManager.setPaint(e)},pb=new WeakSet,zM=function(e){return this._map.getFeatureState(e)},fb=new WeakSet,jM=function(e,t){this._map.removeFeatureState(e,t),this._layerManager.removeFeatureState(e,t)},mb=new WeakSet,UM=function(e,t){this._map.setFeatureState(e,t),this._layerManager.setFeatureState(e,t)},pB=new WeakSet,pre=function(e){return this._layerManager.featuresAtPoint(e).filter(t=>this.__featureEnabled(t))};const Wir=[{id:"label-background",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAC8AAAAmCAIAAADbSlUzAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAJOgAACToAYJjBRwAAACVSURBVFhH7dixDoJAEIThfXqMBcYKrTQ+jkYSStDYkVhZINxyEshJcZXJtC7FfNlmur9eyXb7Vqf6+bI9HUKyWkt5e4RlOF9ycerjsqbqpfefuKzNJawBWIOxBmMNxhqMNRhrMNZgrMFYg7EGYw3GGow1GGuw5dU07y4ua22nUlb3uKxd80IOx1Pjxp+f4P/P+ZButl+YrbXnPs+YmAAAAABJRU5ErkJggg==",options:{content:[21,4,28,33],stretchX:[[21,28]],stretchY:[[4,33]]}},{id:"xlabel-background",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAmCAYAAAD9XArwAAABhWlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV/TSotUROwg4pChioIFURFHrUIRKoRaoVUHk0s/hCYNSYqLo+BacPBjserg4qyrg6sgCH6AODk6KbpIif9LCi1iPTjux7t7j7t3gFArMc0KjAGabpupRFzMZFfE4CsC6EEIIxiWmWXMSlISbcfXPXx8vYvxrPbn/hxdas5igE8knmGGaROvE09t2gbnfeIIK8oq8TnxqEkXJH7kuuLxG+eCywLPjJjp1BxxhFgstLDSwqxoasSTxFFV0ylfyHisct7irJUqrHFP/sJwTl9e4jrNASSwgEVIEKGggg2UYCNGq06KhRTtx9v4+12/RC6FXBtg5JhHGRpk1w/+B7+7tfIT415SOA50vDjOxyAQ3AXqVcf5Pnac+gngfwau9Ka/XAOmP0mvNrXoEdC9DVxcNzVlD7jcAfqeDNmUXclPU8jngfcz+qYs0HsLdK56vTX2cfoApKmr5A1wcAgMFSh7rc27Q629/Xum0d8PfM1yq13h+DEAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfkBBEJExO2pF7NAAAAqUlEQVQ4y+3OIQ6CYBiH8ef9MDhxc8yABjeP4LwAx3BWTwE3oHkMrBa7JJN3YBogfQkjr0HcDCg0C0/+7f2/AjghycLFj0ECYMarHPRcUoQx25uEJMsR/lUQj4YUtQ+K9aC+1IgABPFc/NjUcy1JYD5++tXM0LEe9rCHPfwXzDu43ChV2qaUKjWWLFLUfkdqLVnkXDiWK4LDkMlckCkwfs8p1cmSbfbs7k+jIi/gASaPYQAAAABJRU5ErkJggg==",options:{content:[4,4,5,33],stretchX:[[4,5]],stretchY:[[4,33]]}},{id:"ylabel-background",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAmCAYAAAD9XArwAAABhWlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw0AcxV/TSotUROwg4pChioIFURFHrUIRKoRaoVUHk0s/hCYNSYqLo+BacPBjserg4qyrg6sgCH6AODk6KbpIif9LCi1iPTjux7t7j7t3gFArMc0KjAGabpupRFzMZFfE4CsC6EEIIxiWmWXMSlISbcfXPXx8vYvxrPbn/hxdas5igE8knmGGaROvE09t2gbnfeIIK8oq8TnxqEkXJH7kuuLxG+eCywLPjJjp1BxxhFgstLDSwqxoasSTxFFV0ylfyHisct7irJUqrHFP/sJwTl9e4jrNASSwgEVIEKGggg2UYCNGq06KhRTtx9v4+12/RC6FXBtg5JhHGRpk1w/+B7+7tfIT415SOA50vDjOxyAQ3AXqVcf5Pnac+gngfwau9Ka/XAOmP0mvNrXoEdC9DVxcNzVlD7jcAfqeDNmUXclPU8jngfcz+qYs0HsLdK56vTX2cfoApKmr5A1wcAgMFSh7rc27Q629/Xum0d8PfM1yq13h+DEAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfkBBEJEyeXEKp4AAAAwklEQVQ4y+3ULU/DUBhA4XO/2rUgwV1ZBWLJBP9fI0gQuMktWcJSwUq79n68qAoSGnCYHv3oowBD09jz88t1CpGcBQCtFYWz3D3tNuz3EXgojqdWLt0gKWWZSynLpRvkeGqFpinVuf2QsnDc3mz4qe7zyjgF9BQidVWyVF2VTCGicxa0VotQa0XOguaPrXCFK1zhv8D5VkvNt9POGvphXIT9MOKsAbyvfl2z95UCCrw3769vfYjp2+ydNdxvH2sOh/QFh8F7PWWiL5EAAAAASUVORK5CYII=",options:{content:[4,4,5,33],stretchX:[[4,5]],stretchY:[[4,33]]}},{id:"rounded-rectangle",url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOxAAADsQBlSsOGwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAGmSURBVDiNldPBitpAGAfwv5mMmy85JCistD5Ai/gCPYovYJENCPZQF8VD36HXUkrfQws9R8WLF58gh2h2W2PpoeTWxBgzMr1spd3uUvOHOQ2//3yHb4C/UyGi95Zl3XLOUwASgFRVNTVN8ysRfQTwFA+FMdYhoqjf7+9ns5kMgkCGYSjDMJTb7VbO53M5HA4PRBRzzl//g8vlcrxYLE7osbNcLmWlUok459cAULgb+2YymRi1Wu3B6e7H9300Go1dkiTPGRG97Xa7LzqdjnqWBlAqlRBFEVzXNZRisXhl2/bFufh3bNvmAF4WOOd73/cvDMPIVSCEQLVaFUqWZbkxAKiqCsaYVHLLe1E452kcx7mhEALH47Gg6Lr+3fO83AXr9Rq6rofK4XD4NB6P07wFo9Eok1J+LgC41DTt1nEco16vn4VXqxWazeYuSZJnCoAfWZZdt9vtneu6/8We56HVasVCiDcAvp0uGGM2Ef3s9Xp7x3HkZrM57X8QBHI6ncrBYJASUcQYe/XYA5eapr2zLOuGc77H3XfmnKemaX4hog8AnvwJfgHMKs1jQ++4tQAAAABJRU5ErkJggg==",options:{content:[3,3,13,13],stretchX:[[7,9]],stretchY:[[7,9]]}}],qir=1.4,eSe="NCBITaxon:2787823";class Zir{constructor(t,r,n,i){this._baseUrl=r,this.__id=n.id,this.__uuid=n.uuid,this.__details=n.details,this.__provenance=n.provenance,this.__created=n.created,this.__taxon=n.taxon,this.__biologicalSex=n.biologicalSex,this._mapNumber=n.number,this._callback=n.callback,this._layers=n.layers,this._markers=n.markers,this._options=n.options,this._pathways=n.pathways,this._resolve=i,this._map=null,this.__searchIndex=new GLt(this),this.__idToAnnotation=new Map,this.__datasetToFeatureIds=new Map,this.__modelToFeatureIds=new Map,this.__mapSourceToFeatureIds=new Map,this.__annIdToFeatureId=new Map,this.__taxonToFeatureIds=new Map;for(const[s,l]of Object.entries(n.annotations))this.__addAnnotation(s,l),this.__searchIndex.indexMetadata(s,l);for(const[s,l]of Object.entries(n.style.sources))if(l.url&&(l.url=this.makeServerUrl(l.url)),l.tiles){const c=[];for(const u of l.tiles)c.push(this.makeServerUrl(u));l.tiles=c}"images"in n.options||(n.options.images=[]);for(const s of Wir){let l=!1;for(const c of n.options.images)if(s.id===c.id){l=!0;break}l||n.options.images.push(s)}const o={style:n.style,container:t,attributionControl:!1};"maxZoom"in n.options&&(o.maxZoom=n.options.maxZoom),"minZoom"in n.options&&(o.minZoom=n.options.minZoom),o.hash=n.options.debug===!0,this._map=new ou.Map(o),n.options.debug===!0&&(this._map.showTileBoundaries=!0),this._map.setRenderWorldCopies(!1),this._userInteractions=null,this._initialState=null,this._map.on("idle",()=>{if(this._userInteractions===null)this.setupUserInteractions_();else if(this._initialState===null){this._map.setMinZoom(3),this._map.setMaxBounds(null),this._map.setRenderWorldCopies(!0),this._bounds=this._map.getBounds();const s=this._bounds.toArray(),l=ou.MercatorCoordinate.fromLngLat(s[0]),c=ou.MercatorCoordinate.fromLngLat(s[1]);this.__normalised_origin=[l.x,c.y],this.__normalised_size=[c.x-l.x,l.y-c.y],"state"in this._options&&this._userInteractions.setState(this._options.state),this._initialState=this.getState(),this._userInteractions.minimap&&this._userInteractions.minimap.initialise(),this._resolve(this)}})}async setupUserInteractions_(){for(const t of this._options.images)await this.addImage(t.id,t.url,"",t.options);this._userInteractions=new Gir(this)}get bounds(){return this._bounds}resetMap(){this._initialState!==null&&this.setState(this._initialState),this._userInteractions!==null&&this._userInteractions.reset()}zoomIn(){this._map.zoomIn()}zoomOut(){this._map.zoomOut()}pathTypes(){if(this._userInteractions!==null)return this._userInteractions.pathManager.pathTypes()}enablePath(t,r=!0){this._userInteractions!==null&&this._userInteractions.enablePathsByType(t,r)}enableSckanPath(t,r=!0){this._userInteractions!==null&&this._userInteractions.enableSckanPaths(t,r)}enableConnectivityByTaxonIds(t,r=!0){this._userInteractions!==null&&(Array.isArray(t)?this._userInteractions.enableConnectivityByTaxonIds(t,r):this._userInteractions.enableConnectivityByTaxonIds([t],r))}enableCentrelines(t=!0){this._userInteractions!==null&&this._userInteractions.enableCentrelines(t)}loadImage_(t){return new Promise((r,n)=>{this._map.loadImage(t,(i,o)=>{i?n(i):r(o)})})}loadEncodedImage_(t){return new Promise((r,n)=>{const i=new Image;i.src=t,i.onload=o=>r(o.target)})}async addImage(t,r,n,i={}){if(!this._map.hasImage(t)){const o=await(r.startsWith("data:image")?this.loadEncodedImage_(r):this.loadImage_(r.startsWith("/")?this.makeServerUrl(r):new URL(r,n)));this._map.addImage(t,o,i)}}makeServerUrl(t,r="flatmap/"){return t.startsWith("http://")||t.startsWith("https://")?t:t.startsWith("/")?`${this._baseUrl}${r}${this.__uuid}${t}`:`${this._baseUrl}${r}${this.__uuid}/${t}`}get taxon(){return this.__taxon}get biologicalSex(){return this.__biologicalSex}get created(){return this.__created}get id(){return this.__id}get uuid(){return this.__uuid}get url(){let t=this.makeServerUrl("");return t.endsWith("/")?t.substring(0,t.length-1):t}get details(){return this.__details}get provenance(){return this.__provenance}get uniqueId(){return`${this.__uuid}-${this._mapNumber}`}get annotations(){return this.__idToAnnotation}annotation(t){return this.__idToAnnotation.get(t.toString())}setFeatureAnnotated(t){this._userInteractions!==null&&this._userInteractions.setFeatureAnnotated(t)}__updateFeatureIdMapEntry(t,r,n){const i=HI(t),o=r.get(i);o?o.push(n):r.set(i,[n])}__updateFeatureIdMap(t,r,n,i=null){if(t in n&&n[t].length){const o=n[t];if(Array.isArray(o))for(const s of o)this.__updateFeatureIdMapEntry(s,r,n.featureId);else this.__updateFeatureIdMapEntry(o,r,n.featureId)}else i!==null&&"models"in n&&n.models.startsWith(wSt)&&this.__updateFeatureIdMapEntry(i,r,n.featureId)}__addAnnotation(t,r){r.featureId=t,this.__idToAnnotation.set(t,r),this.__updateFeatureIdMap("dataset",this.__datasetToFeatureIds,r),this.__updateFeatureIdMap("models",this.__modelToFeatureIds,r),this.__updateFeatureIdMap("source",this.__mapSourceToFeatureIds,r),this.__updateFeatureIdMap("taxons",this.__taxonToFeatureIds,r,eSe),this.__annIdToFeatureId.set(r.id,t)}modelFeatureIds(t){return this.__modelToFeatureIds.get(HI(t))||[]}modelFeatureIdList(t){const r=new Cge;if(Array.isArray(t))for(const n of t)r.extend(this.modelFeatureIds(n));else r.extend(this.modelFeatureIds(t));return r.length==0&&(r.extend(this.__datasetToFeatureIds.get(t)),r.extend(this.__mapSourceToFeatureIds.get(t))),r.length==0&&this._userInteractions!==null&&r.extend(this._userInteractions.pathFeatureIds(t)),r}modelForFeature(t){const r=this.__idToAnnotation.get(t);return r&&"models"in r?HI(r.models):null}nodePathModels(t){if(this._userInteractions!==null)return this._userInteractions.nodePathModels(t)}pathModelNodes(t){if(this._userInteractions!==null)return[...this._userInteractions.pathModelNodes(t)]}taxonFeatureIds(t){const r=this.__taxonToFeatureIds.get(HI(t));return[...new Set(r||[])]}get layers(){return this._layers}get map(){return this._map}get markers(){return this._markers}get anatomicalIdentifiers(){return[...this.__modelToFeatureIds.keys()]}get taxonIdentifiers(){return[...this.__taxonToFeatureIds.keys()]}get datasets(){return[...this.__datasetToFeatureIds.keys()]}get options(){return this._options}get pathways(){return this._pathways}getZoom(){return{mapUUID:this.__uuid,minZoom:this._map.getMinZoom(),zoom:this._map.getZoom(),maxZoom:this._map.getMaxZoom()}}callback(t,r,...n){if(this._callback)return r.mapUUID=this.__uuid,this._callback(t,r,...n)}setInitialPosition(){"bounds"in this._options&&this._map.fitBounds(this._options.bounds,{animate:!1}),"center"in this._options&&this._map.setCenter(this._options.center),"zoom"in this._options&&this._map.setZoom(this._options.zoom)}close(){this._map&&(this._map.remove(),this._map=null)}resize(){this._map.resize()}getIdentifier(){return{taxon:this.__taxon,biologicalSex:this.__biologicalSex,uuid:this.__uuid}}getState(){return this._userInteractions!==null?this._userInteractions.getState():{}}setState(t){this._userInteractions!==null&&this._userInteractions.setState(t)}showPopup(t,r,n){this._userInteractions!==null&&this._userInteractions.showPopup(t,r,n)}setPaint(t=null){t=ug(t,{colour:!0,outline:!0}),this._userInteractions!==null&&this._userInteractions.setPaint(t)}setColour(t=null){console.log("`setColour()` is deprecated; please use `setPaint()` instead."),this.setPaint(t)}getBackgroundColour(){return this._map.getPaintProperty("background","background-color")}getBackgroundOpacity(){return this._map.getPaintProperty("background","background-opacity")}setBackgroundColour(t){localStorage.setItem("flatmap-background-colour",t),this._map.setPaintProperty("background","background-color",t),this._userInteractions.minimap&&this._userInteractions.minimap.setBackgroundColour(t)}setBackgroundOpacity(t){this._map.setPaintProperty("background","background-opacity",t),this._userInteractions.minimap&&this._userInteractions.minimap.setBackgroundOpacity(t)}showMinimap(t){this._userInteractions.minimap&&this._userInteractions.minimap.show(t)}getLayers(){if(this._userInteractions!==null)return this._userInteractions.getLayers()}enableLayer(t,r=!0){if(this._userInteractions!==null)return this._userInteractions.enableLayer(t,r)}enableFlightPaths(t=!0){this._userInteractions!==null&&this._userInteractions.enableFlightPaths(t)}getSystems(){if(this._userInteractions!==null)return this._userInteractions.getSystems()}enableSystem(t,r=!0){if(this._userInteractions!==null)return this._userInteractions.enableSystem(t,r)}addMarker(t,r={}){return this._userInteractions!==null?this._userInteractions.addMarker(t,r):-1}removeMarker(t){this._userInteractions!==null&&this._userInteractions.removeMarker(t)}clearMarkers(){this._userInteractions!==null&&this._userInteractions.clearMarkers()}visibleMarkerAnatomicalIds(){if(this._userInteractions!==null)return this._userInteractions.visibleMarkerAnatomicalIds()}showMarkerPopup(t,r,n={}){return this._userInteractions!==null?this._userInteractions.showMarkerPopup(t,r,n):!1}__exportedProperties(t){const r={},n=["id","featureId","connectivity","dataset","kind","label","models","source","taxons","hyperlinks","completeness","missing-nodes","alert","biological-sex"],i=["hyperlinks"];for(const o of n)o in t&&t[o]!==void 0&&(i.includes(o)?r[o]=JSON.parse(t[o]):o==="featureId"?r[o]=+t[o]:r[o]=t[o]);return Object.keys(r).length>0&&(r.type="feature"),r}showAnnotator(t=!0){this._userInteractions!==null&&this._userInteractions.showAnnotator(t)}annotationEvent(t,r){this.callback("annotation",{type:t,feature:r})}commitAnnotationEvent(t){this._userInteractions&&this._userInteractions.commitAnnotationEvent(t)}rollbackAnnotationEvent(t){this._userInteractions&&this._userInteractions.rollbackAnnotationEvent(t)}clearAnnotationFeature(){this._userInteractions&&this._userInteractions.clearAnnotationFeatures()}removeAnnotationFeature(){this._userInteractions&&this._userInteractions.removeAnnotationFeature()}addAnnotationFeature(t){this._userInteractions&&this._userInteractions.addAnnotationFeature(t)}refreshAnnotationFeatureGeometry(t){if(this._userInteractions)return this._userInteractions.refreshAnnotationFeatureGeometry(t)}changeAnnotationDrawMode(t){this._userInteractions&&this._userInteractions.changeAnnotationDrawMode(t)}featureEvent(t,r){const n=this.__exportedProperties(r);return Object.keys(n).length>0?(this.callback(t,n),!0):!1}featureProperties(t){const r=this.annotation(t);return r?this.__exportedProperties(r):{}}markerEvent(t,r,n){this.callback(t,{type:"marker",id:r,models:n})}controlEvent(t,r,n){this.callback(t,{type:"control",control:r,value:n})}enablePanZoomEvents(t=!0){this._userInteractions!==null&&this._userInteractions.enablePanZoomEvents(t)}panZoomEvent(t){const r=this._map.getBounds();if(this.__normalised_origin!==void 0){const n=ou.MercatorCoordinate.fromLngLat(r.toArray()[0]),i=ou.MercatorCoordinate.fromLngLat(r.toArray()[1]),o=[(n.x-this.__normalised_origin[0])/this.__normalised_size[0],(i.y-this.__normalised_origin[1])/this.__normalised_size[1]],s=[(i.x-n.x)/this.__normalised_size[0],(n.y-i.y)/this.__normalised_size[1]];this.callback("pan-zoom",{type:t,origin:o,size:s})}}panZoomTo(t,r){if(this.__normalised_origin!==void 0){const n=t[0]*this.__normalised_size[0]+this.__normalised_origin[0],i=t[1]*this.__normalised_size[1]+this.__normalised_origin[1],o=n+r[0]*this.__normalised_size[0],s=i+r[1]*this.__normalised_size[1],l=new ou.MercatorCoordinate(n,s,0).toLngLat(),c=new ou.MercatorCoordinate(o,i,0).toLngLat();this._map.fitBounds([l,c],{animate:!1})}}search(t,r=!1){return r?this.__searchIndex.auto_suggest(t):this.__searchIndex.search(t)}clearSearchResults(){this._userInteractions!==null&&this._userInteractions.clearSearchResults()}showSearchResults(t){this._userInteractions!==null&&this._userInteractions.showSearchResults(t.featureIds)}selectFeatures(t){if(this._userInteractions!==null){const r=this.modelFeatureIdList(t);this._userInteractions.selectFeatures(r)}}zoomToFeatures(t,r=null){if(r=ug(r,{select:!0,highlight:!1,padding:100}),this._userInteractions!==null){const n=this.modelFeatureIdList(t);this._userInteractions.zoomToFeatures(n,r)}}selectGeoJSONFeatures(t){this._userInteractions!==null&&this._userInteractions.selectFeatures(t)}zoomToGeoJSONFeatures(t,r=null){r=ug(r,{select:!0,highlight:!1,padding:100}),this._userInteractions!==null&&this._userInteractions.zoomToFeatures(t,r)}}let tSe=class{constructor(t,r={}){this._mapServer=new vLt(t),this._options=r,this._mapList=[],this._mapNumber=0,this._initialisingMutex=new _St,this._initialised=!1}async ensureInitialised_(){return await this._initialisingMutex.dispatch(async()=>{if(!this._initialised){this._mapList=[];const t=await this._mapServer.loadJSON("");for(const r of t)r.separateLayers="version"in r&&r.version>=qir,this._mapList.push(r);this._initialised=!0}})}allMaps(){return new Promise(async(t,r)=>{await this.ensureInitialised_();const n={};for(const i of this._mapList){const o="uuid"in i?i.uuid:i.id;n[o]=i}t(n)})}findMap_(t){return new Promise(async(r,n)=>{await this.ensureInitialised_(),r(this.lookupMap_(t))})}latestMap_(t){const r=t.constructor.name==="String"?t:"uuid"in t?t.uuid:"taxon"in t?t.taxon:null;if(r===null)return null;let n=null,i="";for(const o of this._mapList)if(("uuid"in o&&r===o.uuid||r===o.id||"taxon"in o&&r===o.taxon||r===o.source)&&(!("biologicalSex"in t)||"biologicalSex"in o&&t.biologicalSex===o.biologicalSex))if("created"in o)i<o.created&&(i=o.created,n=o);else{n=o;break}return n}lookupMap_(t){return typeof t=="object"?this.latestMap_(t):this.latestMap_({uuid:t})}loadMap(t,r,n,i={}){return new Promise(async(o,s)=>{try{const l=await this.findMap_(t);l===null&&s(`Unknown map: ${JSON.stringify(t)}`);const c="uuid"in l?l.uuid:l.id,u=await this._mapServer.loadJSON(`flatmap/${c}/`),d="uuid"in u?u.uuid:u.id;if(c!==d)throw new Error(`Map '${c}' has wrong ID in index`);const h=Object.assign({},this._options,i);!("bounds"in i)&&"bounds"in u&&(h.bounds=u.bounds),"style"in u?h.style=u.style:h.style="flatmap",!("image-layers"in u)&&"image_layer"in u&&(u["image-layers"]=u.image_layer);let p=[];if(!("version"in u)||u.version<=1)for(const v of u.layers)typeof v=="string"?p.push({id:v,description:v.charAt(0).toUpperCase()+v.slice(1),selectable:!0}):p.push(v);else p=await this._mapServer.loadJSON(`flatmap/${c}/layers`);const f=await this._mapServer.loadJSON(`flatmap/${c}/style`);"glyphs"in f||(f.glyphs="https://fonts.openmaptiles.org/{fontstack}/{range}.pbf");const m=await this._mapServer.loadJSON(`flatmap/${c}/pathways`),g=await this._mapServer.loadJSON(`flatmap/${c}/annotations`),T=await this._mapServer.loadJSON(`flatmap/${c}/metadata`),y=await this._mapServer.loadJSON(`flatmap/${c}/markers`);return"vector-tiles"in f.sources&&("minZoom"in h||(h.minZoom=f.sources["vector-tiles"].minzoom),"maxZoom"in h||(h.maxZoom=f.sources["vector-tiles"].maxzoom)),"layerOptions"in h?("colour"in h.layerOptions||(h.layerOptions.colour=!0),"outline"in h.layerOptions||(h.layerOptions.outline=!0)):h.layerOptions={colour:!0,outline:!0},h.layerOptions.authoring="authoring"in u?u.authoring:!1,h.separateLayers=l.separateLayers,this._mapNumber+=1,new Zir(r,this._mapServer.url(),{id:l,uuid:c,details:u,taxon:l.taxon,biologicalSex:l.biologicalSex,style:f,options:h,layers:p,markers:y,annotations:g,number:this._mapNumber,pathways:m,provenance:T,provenance:T,callback:n},o)}catch(l){s(l)}})}};/*! js-cookie v3.0.5 | MIT */function fB(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}var Xir={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function fre(e,t){function r(i,o,s){if(!(typeof document>"u")){s=fB({},t,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var l="";for(var c in s)s[c]&&(l+="; "+c,s[c]!==!0&&(l+="="+s[c].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+l}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},l=0;l<o.length;l++){var c=o[l].split("="),u=c.slice(1).join("=");try{var d=decodeURIComponent(c[0]);if(s[d]=e.read(u,d),i===d)break}catch{}}return i?s[i]:s}}return Object.create({set:r,get:n,remove:function(i,o){r(i,"",fB({},o,{expires:-1}))},withAttributes:function(i){return fre(this.converter,fB({},this.attributes,i))},withConverter:function(i){return fre(fB({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var mre=fre(Xir,{path:"/"}),sp=function(e,t,r,n,i){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?i.call(e,r):i?i.value=r:t.set(e,r),r},Vs=function(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)},Bf,GM,lp,Lc,Lm;const Kir=1e4;class Yir{constructor(t){Bf.add(this),GM.set(this,void 0),lp.set(this,null),Lc.set(this,null),t.slice(-1)==="/"?sp(this,GM,t.slice(0,-1),"f"):sp(this,GM,t,"f")}get currentUser(){return Vs(this,lp,"f")}get currentError(){return Vs(this,Lc,"f")}async authenticate(t){sp(this,Lc,null,"f"),sp(this,lp,null,"f");const r=await Vs(this,Bf,"m",Lm).call(this,t,"authenticate");return"error"in r?(mre.remove("annotation-key"),Promise.resolve(Vs(this,Lc,"f"))):(mre.set("annotation-key",r.session,{secure:!0,expires:1}),sp(this,lp,r.data,"f"),Promise.resolve(Vs(this,lp,"f")))}async unauthenticate(t){sp(this,Lc,null,"f"),sp(this,lp,null,"f");const r=await Vs(this,Bf,"m",Lm).call(this,t,"unauthenticate");return"success"in r?Promise.resolve(r):Promise.resolve(Vs(this,Lc,"f"))}async annotatedItemIds(t,r,n,i){const o={resource:r};n!==void 0&&(o.user=n),i!==void 0&&(o.participated=i);const s=await Vs(this,Bf,"m",Lm).call(this,t,"items/","GET",o);return"error"in s?Promise.resolve(Vs(this,Lc,"f")):Promise.resolve(s)}async drawnFeatures(t,r,n){const i={resource:r};n!==void 0&&(i.items=n);const o=await Vs(this,Bf,"m",Lm).call(this,t,"features/","GET",i);return"error"in o?Promise.resolve(Vs(this,Lc,"f")):Promise.resolve(o)}async itemAnnotations(t,r,n){const i=await Vs(this,Bf,"m",Lm).call(this,t,"annotations/","GET",{resource:r,item:n});return"error"in i?Promise.resolve(Vs(this,Lc,"f")):Promise.resolve(i)}async annotation(t,r){const n=await Vs(this,Bf,"m",Lm).call(this,t,"annotation/","GET",{annotation:r});return"error"in n?Promise.resolve(Vs(this,Lc,"f")):Promise.resolve(n)}async addAnnotation(t,r){if(Vs(this,lp,"f")&&Vs(this,lp,"f").canUpdate){const n=Object.assign({creator:Vs(this,lp,"f"),created:new Date().toISOString()},r),i=await Vs(this,Bf,"m",Lm).call(this,t,"annotation/","POST",{data:n});if(!("error"in i))return Promise.resolve(i);sp(this,Lc,i,"f")}else sp(this,Lc,{error:"user cannot add annotation"},"f");return Promise.resolve(Vs(this,Lc,"f"))}}GM=new WeakMap,lp=new WeakMap,Lc=new WeakMap,Bf=new WeakSet,Lm=async function(e,t,r="GET",n={}){let i=!0;const o=new AbortController;setTimeout(()=>{i&&(console.log("Annotation server timeout..."),o.abort())},Kir);const s={method:r,signal:o.signal};let l=`${Vs(this,GM,"f")}/${t}`;const c=mre.get("annotation-key")||"";if(r==="GET"){const d=[];for(const[h,p]of Object.entries(n))d.push(`${h}=${encodeURIComponent(JSON.stringify(p))}`);d.push(`key=${encodeURIComponent(e)}`),d.push(`session=${encodeURIComponent(c)}`),l+="?"+d.join("&"),s.headers={Accept:"application/json; charset=utf-8","Cache-Control":"no-store"}}else if(r==="POST"){const d=Object.assign({key:e,session:c},n);s.body=JSON.stringify(d),s.headers={Accept:"application/json; charset=utf-8","Content-Type":"application/json; charset=utf-8","Cache-Control":"no-store"}}const u=await fetch(l,s);return i=!1,u.ok?Promise.resolve(await u.json()):(sp(this,Lc,{error:`${u.status} ${u.statusText}`},"f"),Promise.resolve(Vs(this,Lc,"f")))};var Jir=!1;function mB(e,t,r){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,r),r):(e[t]=r,r)}function gre(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}/*!
|
2174
2174
|
* pinia v2.1.7
|
2175
2175
|
* (c) 2023 Eduardo San Martin Morote
|
2176
2176
|
* @license MIT
|
@@ -2178,7 +2178,7 @@ ${t.vs}`,t}setDataProperty(t,r,n){const i=Sr(this,Cv).get(+t);i&&(!(r in i)||i[r
|
|
2178
2178
|
state: () => new MyClass()
|
2179
2179
|
Found in store "${M.$id}".`),m&&o&&r.hydrate&&r.hydrate(M.$state,m),u=!0,d=!0,M}function nor(e,t,r){let n,i;const o=typeof t=="function";if(typeof e=="string")n=e,i=o?r:t;else if(i=e,n=e.id,process.env.NODE_ENV!=="production"&&typeof n!="string")throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');function s(l,c){const u=a.hasInjectionContext();if(l=(process.env.NODE_ENV==="test"&&WM&&WM._testing?null:l)||(u?a.inject($ir,null):null),l&&gB(l),process.env.NODE_ENV!=="production"&&!WM)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
2180
2180
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
2181
|
-
This will fail in production.`);l=WM,l._s.has(n)||(o?bre(n,t,i,l):aSe(n,i,l),process.env.NODE_ENV!=="production"&&(s._pinia=l));const d=l._s.get(n);if(process.env.NODE_ENV!=="production"&&c){const h="__hot:"+n,p=o?bre(h,t,i,l,!0):aSe(h,Ud({},i),l,!0);c._hotUpdate(p),delete l.state.value[h],l._s.delete(h)}if(process.env.NODE_ENV!=="production"&&yre){const h=a.getCurrentInstance();if(h&&h.proxy&&!c){const p=h.proxy,f="_pStores"in p?p._pStores:p._pStores={};f[n]=d}}return d}return s.$id=n,s}function ior(e,t){return Array.isArray(t)?t.reduce((r,n)=>(r[n]=function(){return e(this.$pinia)[n]},r),{}):Object.keys(t).reduce((r,n)=>(r[n]=function(){const i=e(this.$pinia),o=t[n];return typeof o=="function"?o.call(this,i):i[o]},r),{})}const oor=nor("main",{state:()=>({userProfile:{token:""}}),getters:{userToken(e){return e.userProfile.token}},actions:{setUserToken(e){this.userProfile.token=e}}}),aor=(e,t)=>{let r,n,i,o,s,l;t.style.left="",t.style.top="",t.addEventListener("mousedown",u=>{u.preventDefault(),r=t.offsetLeft,n=t.offsetTop,i=u.clientX,o=u.clientY,t.addEventListener("mousemove",c,!1),document.addEventListener("mouseup",()=>{t.removeEventListener("mousemove",c,!1)},!1)},!1);function c(u){u.preventDefault(),s=r-(i-u.clientX),l=n-(o-u.clientY),t.style.left=`${s}px`,t.style.top=`${l}px`}},sor=e=>{let t={lng:0,lat:0},r;return e.type==="Polygon"?r=e.coordinates[0]:r=e.coordinates,e.type!=="Point"?(r.map(n=>{t.lng+=parseFloat(n[0]),t.lat+=parseFloat(n[1])}),t.lng=t.lng/r.length,t.lat=t.lat/r.length):(t.lng+=parseFloat(r[0]),t.lat+=parseFloat(r[1])),t},sSe=(e,t)=>{const r=[];let n=e.organs?e.organs:e.ftus;const i=n?n.filter((o,s)=>n.findIndex(l=>l.label===o.label)===s):void 0;return i&&i.forEach(o=>{const s={label:o.label,models:o.models,key:`${t}.${o.label}`},l=sSe(o,s.key);l.length>0&&(s.children=l),r.push(s)}),r},lor=function(){return{destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0}},cor={name:"FlatmapVuer",components:{Button:l3,Col:Rh,Loading:G_t,Radio:c7e,RadioGroup:u7e,Row:c3,Select:$T,Dialog:Gxt,MapSvgIcon:HP,MapSvgSpriteColor:dX,Tooltip:wK,TreeControls:F7e,SelectionsGroup:B7e,SvgLegends:D7e,ElIconWarningFilled:kme,ElIconArrowDown:F5,ElIconArrowLeft:Sme},beforeCreate:function(){this.mapManager=void 0,this.mapImp=void 0,this.setStateRequired=!1},setup(e){return{annotator:a.markRaw(new Yir(`${e.flatmapAPI}annotator`))}},methods:{initialiseDrawing:function(){this.inDrawing=!1,this.initialiseDialog(),this.activeDrawTool=void 0,this.createdEvent=void 0},cancelDrawnFeature:function(){this.createdEvent&&(this.closePopup(),this.annotationEntry={...this.createdEvent.feature,resourceId:this.serverURL},this.rollbackAnnotationEvent(),this.initialiseDrawing())},displayRelevantFeatureTooltip:function(e){if(this.mapImp){const t=this.mapImp.featureProperties(e);this.checkAndCreatePopups({feature:t})}},confirmDrawnFeature:function(){this.createdEvent&&(this.checkAndCreatePopups(this.createdEvent),Object.keys(this.relevanceEntry).length>0&&(this.annotationEntry.feature.relevance=this.relevanceEntry),this.initialiseDrawing())},initialiseDialog:function(){this.relevanceDisplay=!1,this.relevanceEntry={}},relevanceDialogPopup:function(){!this.$el.querySelector(".drawRelevance").classList.contains("inactive")&&!this.inDrawing&&(this.closePopup(),this.relevanceDisplay=!this.relevanceDisplay)},drawingEvent:function(e){if(this.closePopup(),this.drawnTypes.includes(e)&&!this.activeDrawMode&&!this.relevanceDisplay){if(e==="Point"){const t=this.$el.querySelector(".mapbox-gl-draw_point");this.$el.querySelector(".mapbox-gl-draw_point").click(),this.activeDrawTool=t.classList.contains("active")?"Point":void 0}else if(e==="LineString"){const t=this.$el.querySelector(".mapbox-gl-draw_line");this.$el.querySelector(".mapbox-gl-draw_line").click(),this.activeDrawTool=t.classList.contains("active")?"LineString":void 0}else if(e==="Polygon"){const t=this.$el.querySelector(".mapbox-gl-draw_polygon");this.$el.querySelector(".mapbox-gl-draw_polygon").click(),this.activeDrawTool=t.classList.contains("active")?"Polygon":void 0}}else this.drawModes.includes(e)&&!this.activeDrawTool&&(e==="Delete"?(this.currentDrawnFeature&&(!this.activeDrawMode||this.activeDrawMode==="Edit")&&(this.doubleClickedFeature=!1,this.changeAnnotationDrawMode({mode:"simple_select",options:{featureIds:[this.currentDrawnFeature.id]}}),this.deleteOrEditAnnotationFeature()),this.activeDrawMode=this.activeDrawMode==="Delete"?void 0:"Delete",this.activeDrawMode||(this.currentDrawnFeature=void 0)):e==="Edit"&&(this.activeDrawMode=this.activeDrawMode==="Edit"?void 0:"Edit"))},changeAnnotationDrawMode:function(e){this.mapImp&&this.mapImp.changeAnnotationDrawMode(e)},clearAnnotationFeature:function(){this.mapImp&&this.drawnAnnotationFeatures&&this.drawnAnnotationFeatures.length>0&&this.mapImp.clearAnnotationFeature()},deleteOrEditAnnotationFeature:function(){this.mapImp&&this.mapImp.removeAnnotationFeature()},rollbackAnnotationEvent:function(){this.mapImp&&this.drawnAnnotationEvent.includes(this.annotationEntry.type)&&this.mapImp.rollbackAnnotationEvent(this.annotationEntry)},commitAnnotationEvent:function(e){this.mapImp&&this.drawnAnnotationEvent.includes(this.annotationEntry.type)&&e&&(this.annotationSubmitted=!0,this.mapImp.commitAnnotationEvent(this.annotationEntry),this.annotationEntry.type==="deleted"?this.closePopup():this.addAnnotationFeature())},setFeatureAnnotated:function(){this.mapImp&&this.annotator.annotatedItemIds(this.userToken,this.serverURL).then(e=>{for(const t of e)this.mapImp.setFeatureAnnotated(t)}).catch(e=>{console.log(e)})},addAnnotationFeature:function(){this.mapImp&&(this.annotationSubmitted||this.clearAnnotationFeature(),this.drawnType!=="None"&&(this.annotationSubmitted||(this.loading=!0),this.annotator.drawnFeatures(this.userToken,this.serverURL).then(e=>{if(this.drawnType!=="All tools"&&(e=e.filter(t=>t.geometry.type===this.drawnType)),this.drawnAnnotationFeatures=e,this.loading=!1,!this.annotationSubmitted)for(const t of e)this.annotatedType!=="Anyone"?this.annotator.itemAnnotations(this.userToken,this.serverURL,t.id).then(r=>{let n=r.filter(i=>i.creator.name===this.userInformation.name&&i.creator.email===this.userInformation.email).length>0;(this.annotatedType==="Me"&&n||this.annotatedType==="Others"&&!n)&&this.mapImp.addAnnotationFeature(t)}).catch(r=>{console.log(r)}):this.mapImp.addAnnotationFeature(t)}).catch(e=>{console.log(e)})))},showAnnotator:function(e){this.mapImp&&(this.mapImp.showAnnotator(e),this.$el.querySelector(".maplibregl-ctrl-group").style.display="none")},setDrawnType:function(e){this.drawnType=e,this.mapImp&&this.addAnnotationFeature()},setAnnotatedType:function(e){this.annotatedType=e,this.mapImp&&this.addAnnotationFeature()},setFlightPath3D:function(e){this.flightPath3DRadio=e,this.mapImp&&this.mapImp.enableFlightPaths(e)},viewLatestMap:function(){let e=this.biologicalSex?this.biologicalSex:void 0;this.entry==="NCBITaxon:9606"&&(e="PATO:0000384");const t={entry:this.entry,biologicalSex:e,viewport:this.mapImp.getState()};this.$emit("view-latest-map",t)},backgroundChangeCallback:function(e){this.currentBackground=e,this.mapImp&&this.mapImp.setBackgroundColour(this.currentBackground,1)},processSystems:function(e){if(this.systems.length=0,e&&e.length>0){const t={label:"All",key:"All",children:[]};e.forEach(r=>{const n={colour:r.colour,enabled:r.enabled,label:r.id,key:r.id},i=sSe(r,n.key);i.length>0&&(n.children=i),t.children.push(n)}),this.systems.push(t)}},processTaxon:function(e,t){this.taxonConnectivity.length=0,t.forEach(r=>{z7e(e,r).then(n=>{const i={taxon:r,label:n};this.taxonConnectivity.push(i)})})},toggleDrawer:function(){this.drawerOpen=!this.drawerOpen},setColour:function(e){this.colourRadio=e,this.mapImp&&this.mapImp.setColour({colour:e,outline:this.outlinesRadio})},setOutlines:function(e){this.outlineRadio=e,this.mapImp&&this.mapImp.setColour({colour:this.colourRadio,outline:e})},resetView:function(){this.mapImp&&(this.mapImp.resetMap(),this.$refs.centrelinesSelection&&this.$refs.centrelinesSelection.reset(),this.$refs.skcanSelection&&this.$refs.skcanSelection.reset(),this.$refs.layersSelection&&this.$refs.layersSelection.reset(),this.$refs.systemsSelection&&this.$refs.pathwaysSelection.reset(),this.$refs.pathwaysSelection&&this.$refs.pathwaysSelection.reset())},zoomIn:function(){this.mapImp&&this.mapImp.zoomIn()},zoomOut:function(){this.mapImp&&this.mapImp.zoomOut()},centreLinesSelected:function(e){this.mapImp&&this.mapImp.enableCentrelines(e.value)},sckanSelected:function(e){this.mapImp&&this.mapImp.enableSckanPath(e.key,e.value)},checkAllSCKAN:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableSckanPath(t,e.value))},highlightConnectedPaths:function(e){if(this.mapImp){let t=[...this.mapImp.pathModelNodes(e)].map(n=>this.mapImp.featureProperties(n)),r=[];t.forEach(n=>{this.mapImp.nodePathModels(n.featureId).forEach(i=>{r.push(i)})}),this.mapImp.zoomToFeatures(r,{noZoomIn:!0})}},systemSelected:function(e){this.mapImp&&this.mapImp.enableSystem(e.key,e.value)},checkAllSystems:function(e){this.mapImp&&this.systems[0].children.forEach(t=>this.mapImp.enableSystem(t.label,e))},ftuSelected:function(e){this.searchAndShowResult(e,!0)},layersSelected:function(e){this.mapImp&&this.mapImp.enableLayer(e.key,e.value)},checkAllLayers:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableLayer(t,e.value))},taxonsSelected:function(e){this.mapImp&&this.mapImp.enableConnectivityByTaxonIds(e.key,e.value)},checkAllTaxons:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableConnectivityByTaxonIds(t,e.value))},pathwaysSelected:function(e){this.mapImp&&this.mapImp.enablePath(e.key,e.value)},checkAllPathways:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enablePath(t,e.value))},enablePanZoomEvents:function(e){this.mapImp.enablePanZoomEvents(e)},eventCallback:function(){return(e,t,...r)=>{if(e==="annotation"){const n={feature:t,userData:r,eventType:e};if(t.type==="aborted")this.annotationSubmitted?this.annotationSubmitted=!1:this.rollbackAnnotationEvent();else if(t.type==="modeChanged")t.feature.mode.startsWith("draw_")?(this.initialiseDialog(),this.inDrawing=!0):t.feature.mode==="simple_select"&&this.inDrawing?this.createdEvent?this.relevanceDisplay=!0:this.initialiseDrawing():t.feature.mode==="direct_select"&&(this.doubleClickedFeature=!0);else if(t.type==="selectionChanged"){if(this.currentDrawnFeature=t.feature.features.length===0?void 0:t.feature.features[0],n.feature.feature=this.currentDrawnFeature,!this.inDrawing&&(this.initialiseDialog(),this.currentDrawnFeature)){let i=this.drawnAnnotationFeatures.filter(o=>o.id===this.currentDrawnFeature.id)[0];i&&i.relevance&&(this.relevanceEntry=i.relevance),this.drawModeEvent(n)}}else{if(t.type==="created"||t.type==="updated"){t.type==="updated"&&t.feature.action&&(t.positionUpdated=t.feature.action==="move");const i=this.mapImp.refreshAnnotationFeatureGeometry(t.feature);n.feature.feature=i}t.type==="created"?this.createdEvent=n:this.checkAndCreatePopups(n)}}else if(e!=="pan-zoom"){const n=t.label,i=[t.models],o=this.entry,s=this.biologicalSex;let l;t.taxons&&(typeof t.taxons!="object"?l=JSON.parse(t.taxons):l=t.taxons);const c={dataset:t.dataset,biologicalSex:s,taxonomy:o,resource:i,label:n,feature:t,userData:r,eventType:e,provenanceTaxonomy:l};if(e==="click"){if(this.viewingMode==="Network Discovery")this.highlightConnectedPaths([t.models]);else if(this.currentActive=t.models?t.models:"",this.inDrawing&&!this.relevanceDisplay){let u=t.label?t.label:`*${t.id}`;u&&this.activeDrawTool==="LineString"&&(this.relevanceEntry[u]=t.featureId)}}else e==="mouseenter"&&this.viewingMode!=="Network Discovery"&&(this.currentHover=t.models?t.models:"");t&&t.type!=="marker"&&e==="click"&&this.viewingMode!=="Network Discovery"&&!this.inDrawing&&this.checkAndCreatePopups(c),this.$emit("resource-selected",c)}else this.$emit("pan-zoom-callback",t)}},dialogCssHacks:function(){this.$nextTick(()=>{const e=this.$el.querySelector(".relevance-dialog");aor(this.$el,e);let t,r;const n=this.$el.getBoundingClientRect(),i=e.getBoundingClientRect();this.dialogPosition.x>n.width/2?t=this.dialogPosition.x-i.width:t=this.dialogPosition.x,this.dialogPosition.y>n.height/2?r=this.dialogPosition.y-i.height:r=this.dialogPosition.y,e.style.transform=`translate(${t-this.dialogPosition.offsetX}px, ${r-this.dialogPosition.offsetY}px)`})},drawIconCssHacks:function(){(this.$el.querySelector(".iconSelected")||!this.relevanceDisplay)&&(this.drawnTypes.map(e=>{const t=this.$el.querySelector(`.draw${e}`);t&&(t.classList.remove("iconSelected"),t.classList.remove("inactive"))}),this.drawModes.map(e=>{this.$el.querySelector(`.draw${e}`).classList.remove("iconSelected"),this.$el.querySelector(`.draw${e}`).classList.remove("inactive")})),this.activeDrawTool?(this.$el.querySelector(`.draw${this.activeDrawTool}`).classList.add("iconSelected"),this.drawModes.map(e=>{this.$el.querySelector(`.draw${e}`).classList.add("inactive")})):(this.activeDrawMode||this.relevanceDisplay)&&(this.activeDrawMode&&this.$el.querySelector(`.draw${this.activeDrawMode}`).classList.add("iconSelected"),this.drawnTypes.map(e=>{const t=this.$el.querySelector(`.draw${e}`);t&&t.classList.add("inactive")}))},drawModeEvent:function(e){this.activeDrawMode&&(this.doubleClickedFeature?(e.feature.feature.geometry.type!=="Point"&&(this.changeAnnotationDrawMode({mode:"direct_select",options:{featureId:e.feature.feature.id}}),this.deleteOrEditAnnotationFeature()),this.doubleClickedFeature=!1):this.activeDrawMode==="Delete"&&(this.changeAnnotationDrawMode({mode:"simple_select",options:{featureIds:[e.feature.feature.id]}}),this.deleteOrEditAnnotationFeature()))},createConnectivityBody:function(){if(Object.keys(this.relevanceEntry).length>0){const e=Object.values(this.relevanceEntry),t={type:"connectivity",sourceId:e[0],targetId:e[e.length-1],intermediateIds:[]};e.length>2&&e.slice(1,-1).forEach(r=>{t.intermediateIds.push(r)}),this.annotationEntry.body=t}},checkAndCreatePopups:async function(e){if(this.viewingMode==="Annotation")e.feature?(this.annotationEntry={...e.feature,resourceId:this.serverURL},e.feature.featureId&&e.feature.models?this.displayTooltip(e.feature.models):e.feature.feature&&(this.inDrawing||this.activeDrawMode?(this.annotationSubmitted=!1,this.annotationEntry.featureId=e.feature.feature.id,this.createConnectivityBody(),this.displayTooltip(e.feature.feature.id,sor(e.feature.feature.geometry))):e.feature.type==="updated"&&this.rollbackAnnotationEvent(),(e.feature.type==="updated"||e.feature.type==="deleted")&&this.initialiseDialog())):this.annotation={};else{let t=await this.flatmapQueries.retrieveFlatmapKnowledgeForEvent(e);(t[0]||t[1]||e.feature.hyperlinks&&e.feature.hyperlinks.length>0)&&(this.resourceForTooltip=e.resource[0],e.resourceForTooltip=this.resourceForTooltip,this.createTooltipFromNeuronCuration(e))}},popUpCssHacks:function(){let e=document.querySelector(".flatmap-tooltip-popup");e&&(e.style.display="none"),document.querySelector(".maplibregl-popup-close-button").style.display="block",this.$refs.tooltip.$el.style.display="flex",document.querySelector(".maplibregl-popup-close-button").onclick=()=>{e&&(e.style.display="block")}},closePopup:function(){let e=document.querySelector(".maplibregl-popup-close-button");e&&e.click()},closeTooltip:function(){this.$refs.tooltip.$el.style.display="none",document.querySelectorAll(".maplibregl-popup").forEach(e=>{e.style.display="none"})},createTooltipFromNeuronCuration:async function(e){this.tooltipEntry=await this.flatmapQueries.createTooltipData(e),this.displayTooltip(e.resource[0])},showPopup:function(e,t,r){let n=r;this.mapImp&&(n?n.className||(n.className="custom-popup"):n={className:"custom-popup",positionAtLastClick:!0},this.mapImp.showPopup(e,t,n))},showMarkerPopup:function(e,t,r){this.mapImp&&this.mapImp.showMarkerPopup(e,t,r)},closeMinimap:function(){let e=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");this.minimapSmall?(e.classList.add("enlarge"),e.classList.remove("shrink")):(e.classList.add("shrink"),e.classList.remove("enlarge")),this.minimapSmall=!this.minimapSmall},addResizeButtonToMinimap:function(){let e=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");e&&(this.$refs.minimapResize&&this.$refs.minimapResize.$el.parentNode&&this.$refs.minimapResize.$el.parentNode.removeChild(this.$refs.minimapResize.$el),e.appendChild(this.$refs.minimapResize.$el),this.minimapResizeShow=!0)},setHelpMode:function(e){e?(this.inHelp=!0,this.hoverVisibilities.forEach(t=>{t.value=!0}),this.openFlatmapHelpPopup()):(this.inHelp=!1,this.hoverVisibilities.forEach(t=>{t.value=!1}),this.closeFlatmapHelpPopup())},showToolitip:function(e){this.inHelp||(clearTimeout(this.tooltipWait[e]),this.tooltipWait[e]=setTimeout(()=>{this.hoverVisibilities[e].value=!0},500))},hideToolitip:function(e){this.inHelp||(clearTimeout(this.tooltipWait[e]),this.tooltipWait[e]=setTimeout(()=>{this.hoverVisibilities[e].value=!1},500))},displayTooltip:function(e,t=void 0){this.tooltipDisplay=!0;let r,n={className:"flatmapvuer-popover"};t?(r=e,n.annotationFeatureGeometry=t):(r=this.mapImp.modelFeatureIds(e)[0],this.inDrawing||(n.positionAtLastClick=!0)),this.disableUI||this.$nextTick(()=>{this.mapImp.showPopup(r,this.$refs.tooltip.$el,n),this.popUpCssHacks()})},openFlatmapHelpPopup:function(){if(this.mapImp){let e=this.mapImp.modelFeatureIds("UBERON:0000948");e&&e.length>0&&this.mapImp.showPopup(e[0],"Click for more information",{anchor:"top",className:"flatmap-popup-popper"})}},closeFlatmapHelpPopup:function(){this.$el.querySelectorAll(".maplibregl-popup-close-button").forEach(e=>{e.click()})},getLabels:function(){let e=[];if(this.mapImp){let t=this.mapImp.annotations;for(let r of t.values())r.label&&e.push(r.label);return Array.from(new Set(e))}},getState:function(){if(this.mapImp){let e={entry:this.entry,viewport:this.mapImp.getState()};const t=this.mapImp.getIdentifier();return this.biologicalSex?e.biologicalSex=this.biologicalSex:t&&t.biologicalSex&&(e.biologicalSex=t.biologicalSex),t&&t.uuid&&(e.uuid=t.uuid),e}},setState:function(e){e&&(this.mapImp&&e.entry&&this.entry==e.entry&&(!e.biologicalSex||e.biologicalSex===this.biologicalSex)?e.viewport&&this.mapImp.setState(e.viewport):this.createFlatmap(e),this.setStateRequired=!1)},restoreMapState:function(e){e&&(e.viewport&&this.mapImp.setState(e.viewport),e.searchTerm&&this.searchAndShowResult(e.searchTerm,!0))},setFlightPathInfo:function(e){(e===1.6||e>1.6)&&(this.displayFlightPathOption=!0,this.setFlightPath3D(!1))},createFlatmap:function(e){if(!this.mapImp&&!this.loading){this.loading=!0;let t=!1;this.displayMinimap&&(t={position:"top-right"});let r={taxon:this.entry};this.uuid&&(r.uuid=this.uuid),e?e.uuid?r={uuid:e.uuid}:e.entry&&(r.taxon=e.entry,e.biologicalSex?r.biologicalSex=e.biologicalSex:r.taxon==="NCBITaxon:9606"&&(r.biologicalSex="PATO:0000384")):this.biologicalSex&&(r.biologicalSex=this.biologicalSex),this.mapManager.loadMap(r,this.$refs.display,this.eventCallback(),{minZoom:this.minZoom,tooltips:this.tooltips,minimap:t}).then(n=>{this.mapImp=n,this.serverURL=this.mapImp.makeServerUrl("").slice(0,-1);let i=this.mapImp.details.version;this.setFlightPathInfo(i),this.onFlatmapReady(),this._stateToBeSet?this.restoreMapState(this._stateToBeSet):this.restoreMapState(e)})}else e&&(this._stateToBeSet={viewport:e.viewport,searchTerm:e.searchTerm},this.mapImp&&!this.loading&&this.restoreMapState(this._stateToBeSet))},computePathControlsMaximumHeight(){const e=this.$refs.display;if(e){const t=getComputedStyle(e),r=parseInt(t.paddingTop)+parseInt(t.paddingBottom),n=e.clientHeight-r;this.pathwaysMaxHeight=n-170}},mapResize:function(){try{this.computePathControlsMaximumHeight(),this.mapImp&&(this.mapImp.resize(),this.showMinimap(this.displayMinimap),this.mapImp._minimap&&this.mapImp._minimap._miniMap.resize())}catch{console.error("Map resize error")}},onFlatmapReady:function(){this.sensor=new gLt(this.$refs.display,this.mapResize),this.mapImp.options&&this.mapImp.options.style==="functional"&&(this.isFC=!0),this.mapImp.setBackgroundOpacity(1),this.backgroundChangeCallback(this.currentBackground),this.pathways=this.mapImp.pathTypes(),this.mapImp.enableCentrelines(!1),this.processSystems(this.mapImp.getSystems()),this.processTaxon(this.flatmapAPI,this.mapImp.taxonIdentifiers),this.addResizeButtonToMinimap(),this.loading=!1,this.computePathControlsMaximumHeight(),this.drawerOpen=!0,this.mapResize(),this.$emit("ready",this)},showMinimap:function(e){this.mapImp&&this.mapImp.showMinimap(e)},showPathwaysDrawer:function(e){this.drawerOpen=e},searchAndShowResult:function(e,t){if(this.mapImp){if(e===void 0||e==="")return this.mapImp.clearSearchResults(),!0;{const r=this.mapImp.search(e);if(r&&r.results&&r.results.length>0){if(this.mapImp.showSearchResults(r),t&&r.results[0].featureId&&r.results[0].text){const n=this.mapImp.annotation(r.results[0].featureId);this.mapImp.showPopup(r.results[0].featureId,n.label,{className:"custom-popup",positionAtLastClick:!1,preserveSelection:!0})}return!0}else this.mapImp.clearSearchResults()}}return!1},searchSuggestions:function(e){return this.mapImp?this.mapImp.search(e):[]}},props:{entry:{type:String,required:!0},uuid:String,biologicalSex:{type:String,default:""},minZoom:{type:Number,default:4},tooltips:{type:Boolean,default:!0},helpMode:{type:Boolean,default:!1},renderAtMounted:{type:Boolean,default:!0},displayMinimap:{type:Boolean,default:!1},displayWarning:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array,default:function(){return[{display:"Open AC Map",key:"AC"},{display:"Open FC Map",key:"FC"},{display:"Open 3D Human Map",key:"3D"}]}},showStarInLegend:{type:Boolean,default:!1},isLegacy:{type:Boolean,default:!1},displayLatestChanges:{type:Boolean,default:!1},state:{type:Object,default:void 0},flatmapAPI:{type:String,default:"https://mapcore-demo.org/current/flatmap/v3/"},sparcAPI:{type:String,default:"https://api.sparc.science/"},disableUI:{type:Boolean,default:!1}},provide(){return{flatmapAPI:this.flatmapAPI,sparcAPI:this.sparcAPI,$annotator:this.annotator,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},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1}],yellowstar:fLt,isFC:!1,inHelp:!1,currentBackground:"white",availableBackground:["white","lightskyblue","black"],loading:!1,flatmapMarker:hLt,tooltipEntry:lor(),connectivityTooltipVisible:!1,drawerOpen:!1,flightPath3DRadio:!1,displayFlightPathOption:!1,colourRadio:!0,outlinesRadio:!0,minimapResizeShow:!1,minimapSmall:!1,currentActive:"",currentDrawnFeature: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,drawnAnnotationEvent:["created","updated","deleted"],createdEvent:void 0,annotationSubmitted:!1,inDrawing:!1,relevanceDisplay:!1,relevanceEntry:{},drawnAnnotationFeatures:void 0,doubleClickedFeature:!1,activeDrawMode:void 0,drawModes:["Delete","Edit"],dialogPosition:{offsetX:0,offsetY:0,x:void 0,y:void 0}}},computed:{...ior(oor,["userToken"]),relevance:function(){return Object.keys(this.relevanceEntry).length>0}},watch:{entry:function(){this.state||this.createFlatmap()},helpMode:function(e,t){e!==t&&this.setHelpMode(val)},state:{handler:function(e,t){e!==t&&(this.mapManager?this.setState(e):this.setStateRequired=!0)},immediate:!0,deep:!0},activeDrawTool:function(){this.drawIconCssHacks()},activeDrawMode:function(){this.drawIconCssHacks()},relevance:function(e){const t=this.$el.querySelector(".drawRelevance");e?t.classList.remove("inactive"):(this.relevanceDisplay=!1,t.classList.add("inactive"))},relevanceDisplay:function(e){const t=this.$el.querySelector(".drawRelevance");e?(t.classList.add("iconSelected"),this.dialogCssHacks()):t.classList.remove("iconSelected"),this.drawIconCssHacks()},dialogPosition:{handler:function(){const e=this.$el.getBoundingClientRect();this.dialogPosition.offsetX=e.x,this.dialogPosition.offsetY=e.y},deep:!0,once:!0},viewingMode:function(e){e==="Annotation"?(this.$el.querySelector(".maplibregl-canvas").addEventListener("click",t=>{t.preventDefault(),this.dialogPosition.x=t.clientX,this.dialogPosition.y=t.clientY,this.activeDrawTool==="Point"&&this.dialogCssHacks()},!1),this.loading=!0,this.annotator.authenticate(this.userToken).then(t=>{t.name&&t.email&&(this.showAnnotator(!0),this.userInformation=t,this.setFeatureAnnotated(),this.drawnAnnotationFeatures||this.addAnnotationFeature()),this.loading=!1})):this.showAnnotator(!1)},disableUI:function(e){e&&this.closeTooltip()}},mounted:function(){this.openMapRef=a.shallowRef(this.$refs.openMapRef),this.backgroundIconRef=a.shallowRef(this.$refs.backgroundIconRef),this.tooltipWait=[],this.tooltipWait.length=this.hoverVisibilities.length,this.mapManager=new tSe(this.flatmapAPI),this.flatmapQueries=new pLt,this.flatmapQueries.initialise(this.flatmapAPI),this.state?this.setStateRequired&&this.setState(this.state):this.renderAtMounted&&this.createFlatmap()}},x3=e=>(a.pushScopeId("data-v-aca187ee"),e=e(),a.popScopeId(),e),uor={class:"flatmap-container",ref:"flatmapContainer","element-loading-text":"Loading...","element-loading-background":"rgba(0, 0, 0, 0.3)"},dor={style:{height:"100%",width:"100%",position:"relative","overflow-y":"none"}},hor={style:{height:"100%",width:"100%"},ref:"display"},por={class:"beta-popovers"},mor=x3(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1)),gor=x3(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1)),yor=x3(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1)),Tor=x3(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1)),vor=x3(()=>a.createElementVNode("span",{class:"warning-text"},"Legacy Map",-1)),bor={key:1,class:"warning-text"},Qor=x3(()=>a.createElementVNode("span",{class:"warning-text"},"What's new?",-1)),xor=x3(()=>a.createElementVNode("b",null,"Network discovery mode",-1)),_or=x3(()=>a.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)),wor=x3(()=>a.createElementVNode("b",null,"Now can display up to 6 panes",-1)),Lor=x3(()=>a.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)),Sor={class:"bottom-draw-control"},Mor={class:"bottom-right-control"},kor=x3(()=>a.createElementVNode("div",null,[a.createTextVNode(" Fit to "),a.createElementVNode("br"),a.createTextVNode(" window ")],-1)),Cor=["innerHTML"],Eor=["innerHTML"],Aor=["onClick"];function Oor(e,t,r,n,i,o){const s=a.resolveComponent("map-svg-sprite-color"),l=kme,c=Fl,u=QI,d=F5,h=a.resolveComponent("map-svg-icon"),p=D7e,f=F7e,m=B7e,g=Sme,T=l3,y=c3,v=Rh,_=bI,b=$T,L=c7e,w=u7e,M=wK,C=$_t,A=C7e,O=MI;return a.withDirectives((a.openBlock(),a.createElementBlock("div",uor,[a.createVNode(s),a.createElementVNode("div",dor,[a.createElementVNode("div",hor,null,512),a.withDirectives(a.createElementVNode("div",por,[a.createElementVNode("div",null,[a.createVNode(u,{placement:"right","popper-class":"warning-popper flatmap-popper",teleported:!1,visible:e.hoverVisibilities[6].value,ref:"warningPopover"},{reference:a.withCtx(()=>[r.displayWarning?(a.openBlock(),a.createElementBlock("div",{key:0,class:"warning-icon",onMouseover:t[7]||(t[7]=V=>o.showToolitip(6)),onMouseout:t[8]||(t[8]=V=>o.hideToolitip(6))},[a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(l)]),_:1}),r.isLegacy?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[vor,a.createElementVNode("div",{class:"latest-map-text",onClick:t[6]||(t[6]=(...V)=>o.viewLatestMap&&o.viewLatestMap(...V))}," Click here for the latest map ")],64)):(a.openBlock(),a.createElementBlock("span",bor,"Beta"))],32)):a.createCommentVNode("",!0)]),default:a.withCtx(()=>[r.isLegacy?(a.openBlock(),a.createElementBlock("p",{key:0,onMouseover:t[0]||(t[0]=V=>o.showToolitip(6)),onMouseout:t[1]||(t[1]=V=>o.hideToolitip(6))}," This is a legacy map, you may view the latest map instead. ",32)):e.isFC?(a.openBlock(),a.createElementBlock("p",{key:1,onMouseover:t[2]||(t[2]=V=>o.showToolitip(6)),onMouseout:t[3]||(t[3]=V=>o.hideToolitip(6))},[a.createTextVNode(" This map displays the connectivity of individual neurons. Specifically, those which align with (parts of) the neuron populations from the "),mor,a.createTextVNode(" models available in "),gor,a.createTextVNode(". ")],32)):(a.openBlock(),a.createElementBlock("p",{key:2,onMouseover:t[4]||(t[4]=V=>o.showToolitip(6)),onMouseout:t[5]||(t[5]=V=>o.hideToolitip(6))},[a.createTextVNode(" This map displays the connectivity of neuron populations. Specifically, those from the primarily rat-based "),yor,a.createTextVNode(" models available in "),Tor,a.createTextVNode(". New connectivity and species specificity will be added as the SPARC program progresses. ")],32))]),_:1},8,["visible"])]),r.displayLatestChanges?(a.openBlock(),a.createBlock(u,{key:0,placement:"right",teleported:!1,trigger:"manual","popper-class":"warning-popper flatmap-popper",visible:e.hoverVisibilities[7].value},{reference:a.withCtx(()=>[r.displayLatestChanges?(a.openBlock(),a.createElementBlock("div",{key:0,class:"latest-changesicon",onMouseover:t[9]||(t[9]=V=>o.showToolitip(7)),onMouseout:t[10]||(t[10]=V=>o.hideToolitip(7))},[a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(l)]),_:1}),Qor],32)):a.createCommentVNode("",!0)]),default:a.withCtx(()=>[xor,_or,wor,Lor]),_:1},8,["visible"])):a.createCommentVNode("",!0)],512),[[a.vShow,!r.disableUI]]),a.withDirectives(a.createVNode(c,{class:a.normalizeClass(["minimap-resize",{enlarge:e.minimapSmall,shrink:!e.minimapSmall}]),ref:"minimapResize",onClick:o.closeMinimap},{default:a.withCtx(()=>[a.createVNode(d)]),_:1},8,["class","onClick"]),[[a.vShow,e.minimapResizeShow]]),a.withDirectives(a.createElementVNode("div",Sor,[a.createVNode(u,{content:"Relevance",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:e.hoverVisibilities[10].value},{reference:a.withCtx(()=>[a.createVNode(h,{icon:"connection",class:"icon-button drawRelevance inactive",onClick:o.relevanceDialogPopup,onMouseover:t[11]||(t[11]=V=>o.showToolitip(10)),onMouseout:t[12]||(t[12]=V=>o.hideToolitip(10))},null,8,["onClick"])]),_:1},8,["visible"]),e.drawnType!=="LineString"&&e.drawnType!=="Polygon"?(a.openBlock(),a.createBlock(u,{key:0,content:"Draw Point",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:e.hoverVisibilities[11].value},{reference:a.withCtx(()=>[a.createVNode(h,{icon:"drawPoint",class:"icon-button drawPoint",onClick:t[13]||(t[13]=V=>o.drawingEvent("Point")),onMouseover:t[14]||(t[14]=V=>o.showToolitip(11)),onMouseout:t[15]||(t[15]=V=>o.hideToolitip(11))})]),_:1},8,["visible"])):a.createCommentVNode("",!0),e.drawnType!=="Point"&&e.drawnType!=="Polygon"?(a.openBlock(),a.createBlock(u,{key:1,content:"Draw Line",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:e.hoverVisibilities[12].value},{reference:a.withCtx(()=>[a.createVNode(h,{icon:"drawLine",class:"icon-button drawLineString",onClick:t[16]||(t[16]=V=>o.drawingEvent("LineString")),onMouseover:t[17]||(t[17]=V=>o.showToolitip(12)),onMouseout:t[18]||(t[18]=V=>o.hideToolitip(12))})]),_:1},8,["visible"])):a.createCommentVNode("",!0),e.drawnType!=="Point"&&e.drawnType!=="LineString"?(a.openBlock(),a.createBlock(u,{key:2,content:"Draw Polygon",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:e.hoverVisibilities[13].value},{reference:a.withCtx(()=>[a.createVNode(h,{icon:"drawPolygon",class:"icon-button drawPolygon",onClick:t[19]||(t[19]=V=>o.drawingEvent("Polygon")),onMouseover:t[20]||(t[20]=V=>o.showToolitip(13)),onMouseout:t[21]||(t[21]=V=>o.hideToolitip(13))})]),_:1},8,["visible"])):a.createCommentVNode("",!0),a.createVNode(u,{content:"Delete",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:e.hoverVisibilities[14].value},{reference:a.withCtx(()=>[a.createVNode(h,{icon:"drawTrash",class:"icon-button drawDelete",onClick:t[22]||(t[22]=V=>o.drawingEvent("Delete")),onMouseover:t[23]||(t[23]=V=>o.showToolitip(14)),onMouseout:t[24]||(t[24]=V=>o.hideToolitip(14))})]),_:1},8,["visible"]),a.createVNode(u,{content:"Edit",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:e.hoverVisibilities[15].value},{reference:a.withCtx(()=>[a.createVNode(h,{icon:"comment",class:"icon-button drawEdit",onClick:t[25]||(t[25]=V=>o.drawingEvent("Edit")),onMouseover:t[26]||(t[26]=V=>o.showToolitip(15)),onMouseout:t[27]||(t[27]=V=>o.hideToolitip(15))})]),_:1},8,["visible"])],512),[[a.vShow,e.viewingMode==="Annotation"&&e.userInformation&&!r.disableUI]]),a.withDirectives(a.createElementVNode("div",Mor,[a.createVNode(u,{content:"Zoom in",placement:"left",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[0].value},{reference:a.withCtx(()=>[a.createVNode(h,{icon:"zoomIn",class:"icon-button zoomIn",onClick:t[28]||(t[28]=V=>o.zoomIn()),onMouseover:t[29]||(t[29]=V=>o.showToolitip(0)),onMouseout:t[30]||(t[30]=V=>o.hideToolitip(0))})]),_:1},8,["visible"]),a.createVNode(u,{content:"Zoom out",placement:"top-end",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[1].value},{reference:a.withCtx(()=>[a.createVNode(h,{icon:"zoomOut",class:"icon-button zoomOut",onClick:t[31]||(t[31]=V=>o.zoomOut()),onMouseover:t[32]||(t[32]=V=>o.showToolitip(1)),onMouseout:t[33]||(t[33]=V=>o.hideToolitip(1))})]),_:1},8,["visible"]),a.createVNode(u,{content:"Reset",placement:"top",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[2].value},{reference:a.withCtx(()=>[a.createVNode(h,{icon:"fitWindow",class:"icon-button fitWindow",onClick:t[34]||(t[34]=V=>o.resetView()),onMouseover:t[35]||(t[35]=V=>o.showToolitip(2)),onMouseout:t[36]||(t[36]=V=>o.hideToolitip(2))})]),default:a.withCtx(()=>[kor]),_:1},8,["visible"])],512),[[a.vShow,!r.disableUI]]),a.createVNode(u,{content:"Change pathway visibility",placement:"right",teleported:!1,trigger:"manual","popper-class":"flatmap-popper",visible:e.hoverVisibilities[4].value,ref:"checkBoxPopover"},{reference:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{class:a.normalizeClass(["pathway-location",{open:e.drawerOpen,close:!e.drawerOpen}])},[a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["pathway-container",{open:e.drawerOpen,close:!e.drawerOpen}]),style:a.normalizeStyle({"max-height":e.pathwaysMaxHeight+"px"})},[e.isFC?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(p,{key:0,class:"svg-legends-container"})),a.createVNode(u,{content:"Location of the featured dataset",placement:"right",teleported:!1,trigger:"hover","popper-class":"flatmap-popper popper-bump-right",visible:e.hoverVisibilities[9].value,ref:"featuredMarkerPopover"},{reference:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{class:"yellow-star-legend",innerHTML:e.yellowstar},null,8,Cor),[[a.vShow,r.showStarInLegend],[A,void 0,"featuredMarkerPopover"]])]),_:1},8,["visible"]),a.createVNode(u,{content:"Find these markers for data",placement:"right",teleported:!1,trigger:"manual","popper-class":"flatmap-popper popper-bump-right",visible:e.hoverVisibilities[5].value,ref:"markerPopover"},{reference:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{class:"flatmap-marker-help",innerHTML:e.flatmapMarker},null,8,Eor),[[a.vShow,e.hoverVisibilities[5].value],[A,void 0,"markerPopover"]])]),_:1},8,["visible"]),e.isFC&&e.systems&&e.systems.length>0?(a.openBlock(),a.createBlock(f,{key:1,active:e.currentActive,hover:e.currentHover,"tree-data":e.systems,ref:"treeControls",onChanged:o.systemSelected,onCheckAll:o.checkAllSystems,onChangeActive:o.ftuSelected},null,8,["active","hover","tree-data","onChanged","onCheckAll","onChangeActive"])):a.createCommentVNode("",!0),!e.isFC&&e.centreLines&&e.centreLines.length>0?(a.openBlock(),a.createBlock(m,{title:"Nerves",labelKey:"label",identifierKey:"key",selections:e.centreLines,onChanged:o.centreLinesSelected,ref:"centrelinesSelection",key:"centrelinesSelection"},null,8,["selections","onChanged"])):a.createCommentVNode("",!0),!e.isFC&&e.taxonConnectivity&&e.taxonConnectivity.length>0?(a.openBlock(),a.createBlock(m,{title:"Observed in",labelKey:"label",identifierKey:"taxon",selections:e.taxonConnectivity,onChanged:o.taxonsSelected,onCheckAll:o.checkAllTaxons,ref:"taxonSelection",key:"taxonSelection"},null,8,["selections","onChanged","onCheckAll"])):a.createCommentVNode("",!0),e.pathways&&e.pathways.length>0?(a.openBlock(),a.createBlock(m,{title:"Pathways",labelKey:"label",identifierKey:"type",colourStyle:"line",selections:e.pathways,onChanged:o.pathwaysSelected,onCheckAll:o.checkAllPathways,ref:"pathwaysSelection",key:"pathwaysSelection"},null,8,["selections","onChanged","onCheckAll"])):a.createCommentVNode("",!0)],6)),[[A,void 0,"checkBoxPopover"]]),a.createElementVNode("div",{onClick:t[37]||(t[37]=(...V)=>o.toggleDrawer&&o.toggleDrawer(...V)),class:a.normalizeClass(["drawer-button",{open:e.drawerOpen,close:!e.drawerOpen}])},[a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(g)]),_:1})],2)],2),[[a.vShow,!r.disableUI]])]),_:1},8,["visible"]),e.openMapRef?(a.openBlock(),a.createBlock(u,{key:0,ref:"open-map-popover","virtual-ref":e.openMapRef,placement:"top-start",width:"136",teleported:!1,trigger:"click","popper-class":"open-map-popper non-selectable","virtual-triggering":""},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.openMapOptions,V=>(a.openBlock(),a.createBlock(y,{key:V.key},{default:a.withCtx(()=>[a.createVNode(T,{type:"primary",plain:"",onClick:H=>e.$emit("open-map",V.key)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(V.display),1)]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1},8,["virtual-ref"])):a.createCommentVNode("",!0),a.createVNode(u,{ref:"backgroundPopover","virtual-ref":e.backgroundIconRef,placement:"top-start",width:"200",teleported:!1,trigger:"click","popper-class":"background-popper h-auto","virtual-triggering":""},{default:a.withCtx(()=>[a.createElementVNode("div",null,[a.createVNode(y,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Viewing Mode")]),_:1}),a.createVNode(y,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(b,{teleported:!1,modelValue:e.viewingMode,"onUpdate:modelValue":t[38]||(t[38]=V=>e.viewingMode=V),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.viewingModes,(V,H)=>(a.openBlock(),a.createBlock(_,{key:V+H,label:V,value:V},{default:a.withCtx(()=>[a.createVNode(y,null,{default:a.withCtx(()=>[a.createVNode(v,{span:12},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(V),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.viewingMode==="Annotation"&&e.userInformation?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createVNode(y,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Drawn By*")]),_:1}),a.createVNode(y,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(b,{teleported:!1,modelValue:e.drawnType,"onUpdate:modelValue":t[39]||(t[39]=V=>e.drawnType=V),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown",onChange:o.setDrawnType},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.drawnTypes,V=>(a.openBlock(),a.createBlock(_,{key:V,label:V,value:V},{default:a.withCtx(()=>[a.createVNode(y,null,{default:a.withCtx(()=>[a.createVNode(v,{span:12},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(V),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),a.createVNode(y,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Annotated By*")]),_:1}),a.createVNode(y,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(b,{teleported:!1,modelValue:e.annotatedType,"onUpdate:modelValue":t[40]||(t[40]=V=>e.annotatedType=V),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown",onChange:o.setAnnotatedType},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.annotatedTypes,V=>(a.openBlock(),a.createBlock(_,{key:V,label:V,value:V},{default:a.withCtx(()=>[a.createVNode(y,null,{default:a.withCtx(()=>[a.createVNode(v,{span:12},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(V),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1})],64)):a.createCommentVNode("",!0),e.displayFlightPathOption?(a.openBlock(),a.createBlock(y,{key:1,class:"backgroundSpacer"})):a.createCommentVNode("",!0),e.displayFlightPathOption?(a.openBlock(),a.createBlock(y,{key:2,class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Flight path display")]),_:1})):a.createCommentVNode("",!0),e.displayFlightPathOption?(a.openBlock(),a.createBlock(y,{key:3,class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(w,{modelValue:e.flightPath3DRadio,"onUpdate:modelValue":t[41]||(t[41]=V=>e.flightPath3DRadio=V),class:"flatmap-radio",onChange:o.setFlightPath3D},{default:a.withCtx(()=>[a.createVNode(L,{label:!1},{default:a.withCtx(()=>[a.createTextVNode("2D")]),_:1}),a.createVNode(L,{label:!0},{default:a.withCtx(()=>[a.createTextVNode("3D")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1})):a.createCommentVNode("",!0),a.createVNode(y,{class:"backgroundSpacer"}),a.createVNode(y,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Organs display")]),_:1}),a.createVNode(y,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(w,{modelValue:e.colourRadio,"onUpdate:modelValue":t[42]||(t[42]=V=>e.colourRadio=V),class:"flatmap-radio",onChange:o.setColour},{default:a.withCtx(()=>[a.createVNode(L,{label:!0},{default:a.withCtx(()=>[a.createTextVNode("Colour")]),_:1}),a.createVNode(L,{label:!1},{default:a.withCtx(()=>[a.createTextVNode("Greyscale")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),a.createVNode(y,{class:"backgroundSpacer"}),a.createVNode(y,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Outlines display")]),_:1}),a.createVNode(y,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(w,{modelValue:e.outlinesRadio,"onUpdate:modelValue":t[43]||(t[43]=V=>e.outlinesRadio=V),class:"flatmap-radio",onChange:o.setOutlines},{default:a.withCtx(()=>[a.createVNode(L,{label:!0},{default:a.withCtx(()=>[a.createTextVNode("Show")]),_:1}),a.createVNode(L,{label:!1},{default:a.withCtx(()=>[a.createTextVNode("Hide")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),a.createVNode(y,{class:"backgroundSpacer"}),a.createVNode(y,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Change background")]),_:1}),a.createVNode(y,{class:"backgroundControl"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.availableBackground,V=>(a.openBlock(),a.createElementBlock("div",{key:V,class:a.normalizeClass(["backgroundChoice",V,V==e.currentBackground?"active":""]),onClick:H=>o.backgroundChangeCallback(V)},null,10,Aor))),128))]),_:1})])]),_:1},8,["virtual-ref"]),a.withDirectives(a.createElementVNode("div",{class:a.normalizeClass(["settings-group",{open:e.drawerOpen,close:!e.drawerOpen}])},[a.createVNode(y,null,{default:a.withCtx(()=>[a.createVNode(u,{visible:e.hoverVisibilities[8].value,content:"Open new map",placement:"right",teleported:!1,"popper-class":"flatmap-popper"},{reference:a.withCtx(()=>[r.enableOpenMapUI&&r.openMapOptions.length>0?(a.openBlock(),a.createBlock(h,{key:0,ref:"openMapRef",icon:"openMap",class:"icon-button open-map-button",onMouseover:t[44]||(t[44]=V=>o.showToolitip(8)),onMouseout:t[45]||(t[45]=V=>o.hideToolitip(8))},null,512)):a.createCommentVNode("",!0)]),_:1},8,["visible"])]),_:1}),a.createVNode(y,null,{default:a.withCtx(()=>[a.createVNode(u,{content:"Change settings",placement:"right",visible:e.hoverVisibilities[3].value,teleported:!1,trigger:"manual","popper-class":"flatmap-popper"},{reference:a.withCtx(()=>[a.createVNode(h,{ref:"backgroundIconRef",icon:"changeBckgd",class:"icon-button",onMouseover:t[46]||(t[46]=V=>o.showToolitip(3)),onMouseout:t[47]||(t[47]=V=>o.hideToolitip(3))},null,512)]),_:1},8,["visible"])]),_:1})],2),[[a.vShow,!r.disableUI]]),a.withDirectives(a.createVNode(M,{ref:"tooltip",class:"tooltip",annotationEntry:e.annotationEntry,entry:e.tooltipEntry,annotationDisplay:e.viewingMode==="Annotation",onAnnotation:o.commitAnnotationEvent},null,8,["annotationEntry","entry","annotationDisplay","onAnnotation"]),[[a.vShow,e.tooltipDisplay]]),a.withDirectives(a.createVNode(C,{class:"relevance-dialog",entry:e.relevanceEntry,drawing:e.inDrawing,relevance:o.relevance,onDisplay:o.relevanceDialogPopup,onConfirm:o.confirmDrawnFeature,onCancel:o.cancelDrawnFeature,onPopup:o.closePopup,onTooltip:o.displayRelevantFeatureTooltip},null,8,["entry","drawing","relevance","onDisplay","onConfirm","onCancel","onPopup","onTooltip"]),[[a.vShow,e.relevanceDisplay]])])])),[[O,e.loading]])}const Qre=Nh(cor,[["render",Oor],["__scopeId","data-v-aca187ee"]]),lSe={"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"},Por={name:"MultiFlatmapVuer",components:{Col:Rh,Row:c3,Option:bI,Select:$T,Popover:QI,FlatmapVuer:Qre},beforeMount(){this._resolveList=[],this._initialised=!1},mounted:function(){this.initialise(),kI.on("onActionClick",e=>{this.resourceSelected(e)})},methods:{initialise:function(){return new Promise(e=>{this.requireInitialisation?(this.requireInitialisation=!1,fetch(this.flatmapAPI).then(t=>t.json()).then(t=>{Object.keys(this.availableSpecies).forEach(n=>{const i=this.availableSpecies[n].uuid;if(i&&t.map(o=>o.uuid).indexOf(i)>0)this.speciesList[n]=a.reactive(this.availableSpecies[n]);else for(let o=0;o<t.length;o++)if(this.availableSpecies[n].taxo===t[o].taxon)if(this.availableSpecies[n].biologicalSex){if(t[o].biologicalSex&&t[o].biologicalSex===this.availableSpecies[n].biologicalSex){this.speciesList[n]=a.reactive(this.availableSpecies[n]);break}}else{this.speciesList[n]=a.reactive(this.availableSpecies[n]);break}});let r=this.initial;if(this.state){const n=this.state.state;(!n||!n.uuid&&!n.entry)&&this.state.species?r=this.state.species:r=void 0}r&&(r&&this.speciesList[r]!==void 0?this.activeSpecies=r:this.activeSpecies=Object.keys(this.speciesList)[0],this.setSpecies(this.activeSpecies,this.state?this.state.state:void 0,5)),this._initialised=!0,e(),this._resolveList.forEach(n=>{n()})})):this._initialised?e():this._resolveList.push(e)})},resourceSelected:function(e){this.$emit("resource-selected",e)},FlatmapReady:function(e){this.$emit("ready",e)},getCurrentFlatmap:function(){return this.$refs[this.activeSpecies][0]},panZoomCallback:function(e){this.$emit("pan-zoom-callback",e)},showPopup:function(e,t,r){this.getCurrentFlatmap().showPopup(e,t,r)},showMarkerPopup:function(e,t,r){this.getCurrentFlatmap().showMarkerPopup(e,t,r)},setSpecies:function(e,t,r){if(this.$refs&&e in this.$refs)this.activeSpecies=e,this.$refs[this.activeSpecies][0].createFlatmap(t),this.$emit("flatmapChanged",this.activeSpecies);else if(r){const n=r-1;n>=0&&this.$nextTick(()=>{this.setSpecies(e,t,n)})}},viewLatestMap:function(e){const t=Object.keys(this.speciesList);for(let r=0;r<t.length;r++){const n=this.speciesList[t[r]];if(!n.isLegacy&&n.taxo===e.entry&&n.biologicalSex===e.biologicalSex){this.setSpecies(t[r],e,0);return}}},createLegacyEntry:function(e,t,r){if(r&&t){let n="Legacy";return e.species&&(e.species.slice(0,6)==="Legacy"?n=e.species:n=n+` ${e.species}`),this.speciesList[n]=a.reactive({taxo:t,isLegacy:!0,displayWarning:!0}),{species:n,state:{entry:t,uuid:r,viewport:e.state.viewport,searchTerm:e.state.searchTerm}}}},updateState:function(e){return new Promise(t=>{if(e&&e.state){const r=e.state;if(r.uuid){if(r.entry)return new Promise(()=>{const n=new tSe(this.flatmapAPI),i={taxon:r.entry};r.biologicalSex&&(i.biologicalSex=r.biologicalSex),n.findMap_(i).then(o=>{if(o.uuid!==r.uuid)return this.createLegacyEntry(e,r.entry,r.uuid)}).then(o=>{t(o||e)}).catch(()=>{t(e)})})}else if(r.entry){const n=r.entry in lSe?lSe[r.entry]:void 0,i=this.createLegacyEntry(e,r.entry,n);t(i||e)}}t(e)})},getState:function(){let e={species:this.activeSpecies,state:void 0},t=this.getCurrentFlatmap();return e.state=t.getState(),e},setState:function(e){e&&this.updateState(e).then(t=>{this.initialise().then(()=>{t.species&&t.species!==this.activeSpecies?this.setSpecies(t.species,t.state,5):t.state&&this.getCurrentFlatmap().setState(t.state)})})}},props:{initial:{type:String,default:""},minZoom:{type:Number,default:4},renderAtMounted:{type:Boolean,default:!1},helpMode:{type:Boolean,default:!1},displayMinimap:{type:Boolean,default:!1},showStarInLegend:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array},availableSpecies:{type:Object,default:function(){return{"Human Female":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000383",iconClass:"mapicon-icon_human",displayWarning:!0},"Human Male":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000384",iconClass:"mapicon-icon_human",displayWarning:!0},Rat:{taxo:"NCBITaxon:10114",iconClass:"mapicon-icon_rat",displayLatestChanges:!0},Mouse:{taxo:"NCBITaxon:10090",iconClass:"mapicon-icon_mouse",displayWarning:!0},Pig:{taxo:"NCBITaxon:9823",iconClass:"mapicon-icon_pig",displayWarning:!0},Cat:{taxo:"NCBITaxon:9685",iconClass:"mapicon-icon_cat",displayWarning:!0}}}},state:{type:Object,default:void 0},flatmapAPI:{type:String,default:"https://mapcore-demo.org/current/flatmap/v3/"},sparcAPI:{type:String,default:"https://api.sparc.science/"},disableUI:{type:Boolean,default:!1}},data:function(){return{activeSpecies:void 0,speciesList:{},requireInitialisation:!0}},watch:{state:{handler:function(e){this.setState(e)},immediate:!0,deep:!0}}},Ior=e=>(a.pushScopeId("data-v-5550e1f2"),e=e(),a.popScopeId(),e),Hor={class:"multi-container",ref:"multiContainer"},Vor={key:0,style:{position:"absolute","z-index":"10"}},Ror=Ior(()=>a.createElementVNode("div",{class:"species-display-text"},"Species",-1)),Nor={class:"select-box-icon"};function Bor(e,t,r,n,i,o){const s=bI,l=$T,c=QI,u=Qre;return a.openBlock(),a.createElementBlock("div",Hor,[r.disableUI?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",Vor,[Ror,a.createVNode(c,{content:"Select a species",placement:"right",trigger:"manual","popper-class":"flatmap-popper right-popper",visible:r.helpMode,teleported:!1,ref:"selectPopover"},{reference:a.withCtx(()=>[a.createVNode(l,{id:"flatmap-select",teleported:!1,modelValue:e.activeSpecies,"onUpdate:modelValue":t[0]||(t[0]=d=>e.activeSpecies=d),placeholder:"Select",class:"select-box","popper-class":"flatmap-dropdown",onChange:o.setSpecies},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.speciesList,(d,h)=>(a.openBlock(),a.createBlock(s,{key:h,label:h,value:h},{default:a.withCtx(()=>[a.createElementVNode("span",Nor,[a.createElementVNode("i",{class:a.normalizeClass(d.iconClass)},null,2)]),a.createTextVNode(" "+a.toDisplayString(h),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible"])])),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.speciesList,(d,h)=>a.withDirectives((a.openBlock(),a.createBlock(u,{key:h,entry:d.taxo,uuid:d.uuid,biologicalSex:d.biologicalSex,displayWarning:d.displayWarning,displayLatestChanges:d.displayLatestChanges,isLegacy:d.isLegacy,ref_for:!0,ref:h,enableOpenMapUI:r.enableOpenMapUI,openMapOptions:r.openMapOptions,disableUI:r.disableUI,onViewLatestMap:o.viewLatestMap,onResourceSelected:o.resourceSelected,onReady:o.FlatmapReady,onPanZoomCallback:o.panZoomCallback,onOpenMap:t[1]||(t[1]=p=>e.$emit("open-map",p)),minZoom:r.minZoom,helpMode:r.helpMode,renderAtMounted:r.renderAtMounted,displayMinimap:r.displayMinimap,showStarInLegend:r.showStarInLegend,style:{height:"100%"},flatmapAPI:r.flatmapAPI,sparcAPI:r.sparcAPI},null,8,["entry","uuid","biologicalSex","displayWarning","displayLatestChanges","isLegacy","enableOpenMapUI","openMapOptions","disableUI","onViewLatestMap","onResourceSelected","onReady","onPanZoomCallback","minZoom","helpMode","renderAtMounted","displayMinimap","showStarInLegend","flatmapAPI","sparcAPI"])),[[a.vShow,e.activeSpecies==h]])),128))],512)}const For=Nh(Por,[["render",Bor],["__scopeId","data-v-5550e1f2"]]),ZM=[{id:"ilxtr:neuron-type-keast-13",centrelines:["n_71"]},{id:"ilxtr:neuron-type-keast-2",centrelines:["bladder_n"]},{id:"ilxtr:neuron-type-keast-3",centrelines:["bladder_n","hypogastric_n"]},{id:"ilxtr:neuron-type-keast-15",centrelines:["n_73"]},{id:"ilxtr:neuron-type-keast-1",centrelines:["bladder_n"]},{id:"ilxtr:neuron-type-keast-7",centrelines:["L1_ventral_root_ramus","L1_spinal_n-1","lumbar_splanchnic_n","L2_spinal_n","L2_ventral_root_ramus"]},{id:"ilxtr:neuron-type-keast-9",centrelines:["L6_spinal_n-1","L6_ventral_root","pudendal_n","L5_spinal_n","L5_ventral_root"]},{id:"ilxtr:neuron-type-keast-10",centrelines:["S1_dorsal_root","S1_spinal_n-2","pelvic_splanchnic_n","L6_spinal_n-2","L6_dorsal_root","bladder_n"]},{id:"ilxtr:neuron-type-keast-11",centrelines:["lumbar_splanchnic_n","L2_spinal_n","L1_spinal_n-1","hypogastric_n","bladder_n","L1_dorsal_root","L2_dorsal_root"]},{id:"ilxtr:neuron-type-keast-12",centrelines:["L6_spinal_n-1","L6_dorsal_root","pudendal_n","S1_spinal_n-1","S1_dorsal_root"]},{id:"ilxtr:neuron-type-keast-8",centrelines:["L1_ventral_root_paravertebral_ganglion","L1-L2_interganglionic_segment","sympathetic_trunk_T13-L1","L2_ventral_root_paravertebral_ganglion","sympathetic_trunk_L2-L3","sympathetic_trunk_L4-L5","sympathetic_trunk_L3-L4","sympathetic_trunk_L5-L6","sympathetic_trunk_T12-T13"]},{id:"ilxtr:neuron-type-keast-20",centrelines:["T1_T2_cns","C8_T1_cns","T2_T3_cns","T10_T11_cns","T9_T10_cns","T11_T12_cns","T8_T9_cns","C7_C8_cns","C6_C7_cns","C4_C5_cns","C3_C4_cns","C5_C6_cns","medulla_C1_cns","pons_medulla_cns","C1_C2_cns","T5_T6_cns","T4_T5_cns","T6_T7_cns","L3_L4_cns","L2_L3_cns","L4_L5_cns","L5_L6_cns","T13_L1_cns","T12_T13_cns","L1_L2_cns","T3_T4_cns","n_69","C2_C3_cns","T7_T8_cns"]},{id:"ilxtr:neuron-type-keast-16",centrelines:["n_74"]},{id:"ilxtr:neuron-type-keast-4",centrelines:["sympathetic_trunk_L6-S1","L6_gray_ramus-spinal_n","sympathetic_trunk_L5-L6","S1_gray_ramus-spinal_n","S1_spinal_n-2","pelvic_splanchnic_n","L6_spinal_n-2","L1-L2_interganglionic_segment","sympathetic_trunk_T13-L1","sympathetic_trunk_L2-L3","bladder_n","sympathetic_trunk_L4-L5","sympathetic_trunk_L3-L4","sympathetic_trunk_T12-T13"]},{id:"ilxtr:neuron-type-keast-17",centrelines:["n_75"]},{id:"ilxtr:neuron-type-keast-5",centrelines:["S1_ventral_root","S1_spinal_n-2","pelvic_splanchnic_n","L6_spinal_n-2","L6_ventral_root"]},{id:"ilxtr:neuron-type-keast-18",centrelines:["n_70"]},{id:"ilxtr:neuron-type-keast-6",centrelines:["L1_ventral_root_ramus","L1_spinal_n-1","lumbar_splanchnic_n","L2_spinal_n","hypogastric_n","L2_ventral_root_ramus"]},{id:"ilxtr:neuron-type-keast-19",centrelines:["n_69"]},{id:"ilxtr:neuron-type-keast-14",centrelines:["n_72"]}];function yb(e,t,r,n,i){let o={};if(o.dataset=r,o.scaffold=n,o.simulations=i,t?o.title=t:o.title=e,o.description="",o.actions=[],e)switch(e){case"ICN":o.title="RNA",o.description="The distribution of neurons in the intrinsic cardiac nervous system (ICN) were mapped and visualized in a 3D reconstruction of a male rat heart.",o.actions={search:{title:"Explore data",resource:"icn",type:"Search",label:"ICN",filter:{facet:"genotype",term:"heart"}},plot:{title:"View plot",label:"ICN",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/ISAN/csv-data/use-case-4/RNA_Seq.csv",type:"Plot",plotType:"heatmap",datasetTitle:"Molecular Phenotype Distribution of Single Rat Intracardiac Neurons",datasetDescription:"Images collected from serial cryostat sectioning of a cryopreserved heart was used to reconstruct the 3D context. Transcriptional profiles taken from isolated single neurons and mapped back into the previously generated 3D context.",datasetUrl:"https://discover.pennsieve.io/datasets/29",datasetImage:"https://assets.discover.pennsieve.io/dataset-assets/29/6/revisions/1/banner.jpg"}};break}else o.actions=[];return o}function Dor(e,t,r,n,i){if(e||t){let o={};switch(e){case"UBERON:0001157":o.title="Colon",o.description="",o.actions={search:{title:"Explore data",label:"Colon",resource:"https://sparc.science/data?type=dataset&q=colon",type:"Search",filter:{facet:"genotype",term:"colon"}},scaffold:{title:"View 3D scaffold",label:"Colon",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Colon/human/humanColon_metadata.json",type:"Scaffold"}};break;case"UBERON:0000948":case"UBERON:0002080":o.title="Heart",o.description="",o.actions={search:{title:"Explore data",label:"Heart",resource:"https://sparc.science/data?type=dataset&q=colon",type:"Search",filter:{facet:"genotype",term:"heart"}},scaffold:{title:"View 3D scaffold",label:"Heart",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Heart/human/humanHeart_metadata.json",type:"Scaffold"}};break;case"UBERON:0002048":o.title="Lung",o.description="",o.actions={search:{title:"Explore data",label:"Lung",resource:"https://sparc.science/data?type=dataset&q=lung",type:"Search"},scaffold:{title:"View 3D scaffold",label:"Lung",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Lungs/human/humanLeftLung_metadata.json",type:"Scaffold"}};break;default:o=yb(e,t,r,n,i);break}return o}}function zor(e,t,r,n,i){if(e||t){let o={};switch(e){case"UBERON:0000948":case"UBERON:0002080":i?o=yb(e,t,r,n,i):(o.title="Heart",o.description="",o.actions={search:{title:"Explore data",label:"Heart",resource:"https://sparc.science/data?type=dataset&q=heart",type:"Search",filter:{facet:"genotype",term:"heart"}},scaffold:{title:"View 3D scaffold",label:"Heart",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Heart/rat/ratHeart_metadata.json",type:"Scaffold"},simulation:{title:"Explore simulations",label:"Heart",resource:"https://sparc.science/data?type=simulation&q=heart",type:"URL"}});break;case"UBERON:0001156":o.title="Colon",o.description="",o.actions={search:{title:"Explore data",label:"Colon",resource:"https://sparc.science/data?type=dataset&q=colon",type:"Search"}};break;case"UBERON:0002108":o.title="Small intestines",o.description="",o.actions={search:{title:"Explore data",label:"Colon",resource:"https://sparc.science/data?type=dataset&q=small+intestines",type:"Search"}};break;case"UBERON:0001255":o.title="Urinary bladder",o.description="",o.actions={search:{title:"Explore data",label:"Urinary Bladder",resource:"https://sparc.science/data?type=dataset&q=bladder",type:"Search"},scaffold:{title:"View 3D scaffold",label:"Bladder",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Bladder/rat/ratBladder_metadata.json",type:"Scaffold"}};break;case"UBERON:0002048":o.title="Lung",o.description="",o.actions={search:{title:"Explore data",label:"Lung",resource:"https://sparc.science/data?type=dataset&q=lung",type:"Search"}};break;case"ICN":o.title="RNA",o.description="The distribution of neurons in the intrinsic cardiac nervous system (ICN) were mapped and visualized in a 3D reconstruction of a male rat heart.",o.actions={search:{title:"Explore data",resource:"icn",type:"Search"},plot:{title:"View plot",label:"ICN",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/ISAN/csv-data/use-case-4/RNA_Seq.csv",type:"Plot",plotType:"heatmap",datasetTitle:"Molecular Phenotype Distribution of Single Rat Intracardiac Neurons",datasetDescription:"Images collected from serial cryostat sectioning of a cryopreserved heart was used to reconstruct the 3D context. Transcriptional profiles taken from isolated single neurons and mapped back into the previously generated 3D context.",datasetUrl:"https://discover.pennsieve.io/datasets/29",datasetImage:"https://assets.discover.pennsieve.io/dataset-assets/29/6/revisions/1/banner.jpg"}};break;case"UBERON:0000945":case"UBERON:0001160":case"UBERON:0001161":o.title="Stomach",o.description="",o.actions={search:{title:"Explore data",label:"Stomach",resource:"https://sparc.science/data?type=dataset&q=stomach",type:"Search"},scaffold:{title:"View 3D scaffold",label:"Stomach",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Stomach/rat/ratStomach_metadata.json",type:"Scaffold"}};break;case"UBERON:0001759":t?o.title=t:o.title="Vagus nerve",o.actions={search:{title:"Explore data",label:"Vagus nerve",resource:"https://sparc.science/data?type=dataset&q=vagus+nerve",type:"Search"},simulation:{title:"Explore simulations",label:"Vagus nerve",resource:"https://sparc.science/data?type=simulation&q=vagus%20nerve",type:"simulation"}};break;default:o=yb(e,t,r,n,i);break}return o}}function jor(e,t,r,n,i){if(e||t){let o={};switch(e){case"UBERON:0001156":o.title="Colon",o.description="",o.actions={search:{title:"Explore data",label:"Colon",resource:"https://sparc.science/data?type=dataset&q=colon",type:"Search"},scaffold:{title:"View 3D scaffold",label:"Colon",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Colon/mouse/mouseColon_metadata.json",type:"Scaffold"}};break;case"UBERON:0002048":o.title="Lung",o.description="",o.actions={search:{title:"Explore data",label:"Lung",resource:"https://sparc.science/data?type=dataset&q=lung",type:"Search"},scaffold:{title:"View 3D scaffold",label:"Lung",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Lungs/mouse/mouseLeftLung_metadata.json",type:"Scaffold"}};break;case"UBERON:0002108":o.title="Small intestines",o.description="",o.actions={search:{title:"Explore data",label:"Colon",resource:"https://sparc.science/data?type=dataset&q=small+intestines",type:"Search"}};break;default:o=yb(e,t,r,n,i);break}return o}}function Uor(e,t,r,n,i){if(e||t){let o={};switch(e){case"UBERON:0008972":o.title="Colon",o.description="",o.actions={search:{title:"Explore data",label:"Colon",resource:"https://sparc.science/data?type=dataset&q=colon",type:"Search"},scaffold:{title:"View 3D scaffold",label:"Colon",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Colon/pig/pigColon_metadata.json",type:"Scaffold"}};break;case"UBERON:0002108":o.title="Small intestines",o.description="",o.actions={search:{title:"Explore data",label:"Colon",resource:"https://sparc.science/data?type=dataset&q=small+intestines",type:"Search"}};break;case"UBERON:0000948":case"UBERON:0002080":o.title="Heart",o.description="",o.actions={search:{title:"Explore data",label:"Heart",resource:"https://sparc.science/data?type=dataset&q=colon",type:"Search",filter:{facet:"genotype",term:"heart"}},scaffold:{title:"View 3D scaffold",label:"Heart",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Heart/pig/pigHeart_metadata.json",type:"Scaffold"}};break;default:o=yb(e,t,r,n,i);break}return o}}function Gor(e,t,r,n,i,o){switch(t){case"NCBITaxon:9606":return Dor(e,r,n,i,o);case"NCBITaxon:9823":return Uor(e,r,n,i,o);case"NCBITaxon:10090":return jor(e,r,n,i,o);case"NCBITaxon:10114":return zor(e,r,n,i,o);default:return yb(e,t,r,n,i)}}function Wor(){return[{id:"UBERON:0000948",name:"Heart",type:"simulation"},{id:"UBERON:0001156",name:"Colon",type:"simulation"},{id:"UBERON:0001255",name:"Bladder",type:"simulation"},{id:"UBERON:0000945",name:"Stomach",type:"simulation"},{id:"UBERON:0001759",name:"Vagus nerve",type:"simulation"},{id:"UBERON:0002108",name:"Small intestines",type:"simulation"},{id:"UBERON:0002107",name:"Liver",type:"simulation"}]}function qor(){return Wor()}function cSe(e){if(e)for(let t=0;t<ZM.length;t++){if(ZM[t].id==e)return ZM[t].centrelines;if(ZM[t].centrelines.find(n=>n===e))return[ZM[t].id]}return[]}function Zor(e){if(e){const t=e.toLowerCase();if(t.includes("heart"))return{id:"UBERON:0000948",name:"Heart"};if(t.includes("liver"))return{id:"UBERON:0002107",name:"Liver"};if(t.includes("stomach"))return{id:"UBERON:0000945",name:"Stomach"};if(t.includes("colon"))return{id:"UBERON:0001156",name:"Colon"};if(t.includes("bladder"))return{id:"UBERON:0001255",name:"Bladder"}}}function Xor(e,t){if(e&&e.resource){let r=e.resource;Array.isArray(r)&&r[0]&&(r=r[0]);let n,i,o,s,l,c=r.taxonomy;if(r.data&&r.data.id?(n=r.data.id,i=r.data.id):r.feature&&(n=r.feature.models,i=r.feature.label,o=r.feature.dataset,s=r.feature.scaffold,l=r.feature.simulations),n||i){let u=Gor(n,c,i,o,s,l);if(u&&u.actions)return u.actions[t]}}}let xre=7,cp=5;const yB=[{id:"UBERON:0000948",name:"heart",showAtZoom:1},{id:"UBERON:0001759",name:"vagus nerve",showAtZoom:1},{id:"UBERON:0001155",name:"colon",showAtZoom:1},{id:"UBERON:0000945",name:"stomach",showAtZoom:1},{id:"UBERON:0001013",name:"adipose tissue",showAtZoom:1},{id:"UBERON:0001255",name:"urinary bladder",showAtZoom:1},{id:"UBERON:0001348",name:"brown adipose tissue",showAtZoom:6},{id:"UBERON:0002008",name:"cardiac nerve plexus",showAtZoom:1},{id:"UBERON:0002240",name:"spinal cord",showAtZoom:1},{id:"UBERON:0002005",name:"Enteric Nervous System",showAtZoom:4},{id:"UBERON:0013702",name:"body proper",showAtZoom:1},{id:"UBERON:0002298",name:"brainstem",showAtZoom:1},{id:"UBERON:0002439",name:"myenteric nerve plexus",showAtZoom:6},{id:"UBERON:0000010",name:"peripheral nervous system",showAtZoom:6},{id:"UBERON:0002048",name:"lung",showAtZoom:1},{id:"UBERON:0002410",name:"autonomic nervous system",showAtZoom:6},{id:"UBERON:0002441",name:"cervicothoracic ganglion",showAtZoom:6},{id:"UBERON:0005363",name:"inferior vagus X ganglion",showAtZoom:6},{id:"UBERON:0001264",name:"pancreas",showAtZoom:1},{id:"UBERON:0001884",name:"phrenic nerve",showAtZoom:6},{id:"UBERON:0002059",name:"submandibular ganglion",showAtZoom:7},{id:"UBERON:0001347",name:"white adipose tissue",showAtZoom:6},{id:"UBERON:0001556",name:"lower urinary tract",showAtZoom:1},{id:"UBERON:0002262",name:"celiac ganglion",showAtZoom:5},{id:"UBERON:0000955",name:"Brain",showAtZoom:1},{id:"UBERON:0000160",name:"intestine",showAtZoom:1},{id:"UBERON:0001322",name:"sciatic nerve",showAtZoom:1},{id:"UBERON:0001649",name:"glossopharyngeal nerve",showAtZoom:6},{id:"UBERON:0002063",name:"sinus venosus",showAtZoom:6},{id:"UBERON:0002107",name:"liver",showAtZoom:1},{id:"UBERON:0002113",name:"kidney",showAtZoom:1},{id:"UBERON:0002481",name:"bone tissue",showAtZoom:1},{id:"UBERON:0004907",name:"lower digestive tract",showAtZoom:4},{id:"UBERON:0000044",name:"Dorsal root ganglion",showAtZoom:5},{id:"UBERON:0001736",name:"Submandibular gland",showAtZoom:xre,keyword:!0},{id:"UBERON:0001103",name:"Diaphragm",showAtZoom:cp,keyword:!0},{id:"UBERON:0001160",name:"Fundus of stomach",showAtZoom:cp,keyword:!0},{id:"UBERON:0000955",name:"Brain",showAtZoom:cp,keyword:!0},{id:"UBERON:0003708",name:"Carotid sinus",showAtZoom:xre,keyword:!0},{id:"UBERON:0002079",name:"Left cardiac atrium",showAtZoom:cp,keyword:!0},{id:"ILX:0485722",name:"Nodose ganglion",showAtZoom:xre,keyword:!0},{id:"UBERON:0002078",name:"Right cardiac atrium",showAtZoom:cp,keyword:!0},{id:"UBERON:0002084",name:"Heart left ventricle",showAtZoom:cp,keyword:!0},{id:"UBERON:0002080",name:"Heart right ventricle",showAtZoom:cp,keyword:!0},{id:"UBERON:0001508",name:"Arch of Aorta",showAtZoom:cp,keyword:!0},{id:"UBERON:0001738",name:"Thyroid cartilage",showAtZoom:cp,keyword:!0},{id:"UBERON:0000388",name:"Epiglottis",showAtZoom:cp,keyword:!0}];function Kor(e){return e[0].toUpperCase()+e.substring(1)}const Tb={props:{entry:Object,visible:{type:Boolean,default:!0},mouseHovered:{type:Boolean,default:!1}},computed:{...u1.mapStores(IT,Y7),syncMode(){return this.splitFlowStore.syncMode}},mounted:function(){Oa.on("startHelp",()=>{this.startHelp()})},methods:{toggleSyncMode:function(){},getState:function(){},openMap:function(e){e==="SYNC"?this.toggleSyncMode():Oa.emit("OpenNewMap",e)},updateWithViewUrl:function(){},search:function(){return!1},searchSuggestions:function(){},resourceSelected:function(e,t,r){if(this.resourceHasAction(t)){Oa.emit("PopoverActionClick",t);return}let n,i="none",o=!1;const s={paneIndex:this.entry.id,type:e,resource:t,internalName:void 0,eventType:void 0};if(e=="MultiFlatmap"||e=="Flatmap")if(s.internalName=this.idNamePair[t.feature.models],t.eventType=="click")if(s.eventType="selected",t.feature.type=="marker"){let l=this.idNamePair[t.feature.models],c=yB.filter(u=>u.id===t.feature.models);this.settingsStore.isFeaturedMarkerIdentifier(t.feature.id)?n={type:"Search",term:this.settingsStore.featuredMarkerDoi(t.feature.id)}:c.filter(u=>u.keyword).length>0?n={type:"Search",term:"http://purl.obolibrary.org/obo/"+t.feature.models.replace(":","_")}:n={type:"Facet",facet:l,facetPropPath:"anatomy.organ.category.name",term:"Anatomical structure"},o=!0,e=="MultiFlatmap"&&this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults()}else t.feature.type=="feature"&&(this.syncMode?o=!0:i="scaffold");else t.eventType=="mouseenter"&&(s.eventType="highlighted",o=!0);else e=="Scaffold"&&(t&&t[0]&&(s.internalName=t[0].data.id,t[0].data.lastActionOnMarker===!0&&(n={type:"Facet",facet:Kor(t[0].data.id),facetPropPath:"anatomy.organ.category.name",term:"Anatomical structure"})),s.eventType="selected",o=!0,i="search");n===void 0&&r&&(n=Xor(s,i)),n&&Oa.emit("PopoverActionClick",n),o&&this.$emit("resource-selected",s)},resourceHasAction:function(e){return e.type==="URL"||e.type==="Search"||e.type==="Neuron Search"||e.type=="Facet"||e.type=="Facets"},isVisible:function(){return this.splitFlowStore.getPaneNameById(this.entry.id)!==void 0},displayTooltip:function(){},getNameAndIdFromSyncData:async function(e){let t=e.internalName;t===void 0&&e.resource&&(t=e.resource.label);let r;if(e.resource&&e.resource.resource&&(r=e.resource.resource[0]),this.entry.type==="Scaffold"){if(this.$refs.scaffold.findObjectsWithGroupName(t).length===0){if(e.resource&&e.resource.feature){const o=cSe(e.resource.feature.models);if(o.length>0)return o}let i=Zor(t);if(i)return i;if(r&&e.eventType==="selected")return fetch(`${this.apiLocation}get-related-terms/${r}`).then(o=>o.json()).then(o=>{if(o.uberon.array.length>0)return t=o.uberon.array[0].name.charAt(0).toUpperCase()+o.uberon.array[0].name.slice(1),r=o.uberon.array[0].id.toUpperCase(),{id:r,name:t}})}}else if(this.entry.type==="MultiFlatmap")if(t==="Bladder")t="Urinary Bladder";else{const n=cSe(t);n.length>0&&(t=n[0])}return{id:r,name:t}},getDatasetAnatomyInfo:function(e){fetch(`${this.apiLocation}dataset_info/anatomy?identifier=${e}`).then(t=>t.json()).then(t=>{const r=t.result[0];let n;try{n=r.anatomy.organ[0].curie}catch{n=void 0}let i;try{i=r.item.curie}catch{i=void 0}let o;try{let s=0,l=!1;for(;!l&&s<r.organisms.subject.length;){const c=r.organisms.subject[s];c.species&&(o=c.species.name,l=!0),s+=1}}catch{o=void 0}this.updateFeatureMarkers([n],void 0),this.settingsStore.updateFeaturedMarker({identifier:e,marker:n,doi:i,species:o})})},oldFeaturedDatasetApiHasInfo:async function(){let t=await(await fetch(`${this.apiLocation}get_featured_datasets_identifiers`)).json();return!t.identifiers||t.identifiers.length==0?!1:t.identifiers},newFeaturedDatasetApiHasInfo:async function(){let t=await(await fetch(`${this.apiLocation}get_featured_dataset`)).json();return!t.datasets||t.datasets.length==0?!1:t.datasets.map(r=>r.id)},getFeaturedDatasets:async function(){let e=[],t=await this.oldFeaturedDatasetApiHasInfo();if(t)e=t;else{let r=await this.newFeaturedDatasetApiHasInfo();r&&(e=r)}this.settingsStore.updateFeatured(e),e.forEach(r=>{this.getDatasetAnatomyInfo(r)})},zoomToFeatures:function(){},handleSyncMouseEvent:async function(e){let t=await this.getNameAndIdFromSyncData(e);e.eventType==="highlighted"?this.highlightFeatures(t):e.eventType==="selected"&&this.displayTooltip(t)},handleSyncPanZoomEvent:function(){},highlightFeatures:function(){},receiveSynchronisedEvent:async function(e){if(e.paneIndex!==this.entry.id)e.eventType=="panZoom"||this.handleSyncMouseEvent(e);else if(e.eventType=="selected"){let t=await this.getNameAndIdFromSyncData(e);this.zoomToFeatures(t,!1)}},requestSynchronisedEvent:function(){},getAvailableTerms:function(){let e=qor();for(let t=0;t<e.length;t++)this.idNamePair[e[t].id]=e[t].name;if(this.apiLocation){this._controller&&this._controller.abort(),this._controller=new AbortController;let t=this._controller.signal;fetch(`${this.apiLocation}get-organ-curies`,{signal:t}).then(r=>r.json()).then(r=>{this._controller=void 0,r.uberon.array.forEach(n=>{this.idNamePair[n.id.toUpperCase()]=n.name.charAt(0).toUpperCase()+n.name.slice(1)})})}},flatmapMarkerZoomUpdate(){},onResize:function(){},startHelp:function(){this.isInHelp===!1&&(this.helpMode=!0,window.addEventListener("mousedown",this.endHelp),this.isInHelp=!0)},endHelp:function(){window.removeEventListener("mousedown",this.endHelp),this.helpMode=!1,setTimeout(()=>{this.isInHelp=!1},200)}},data:function(){return{apiLocation:void 0,activeSpecies:"Rat",scaffoldCamera:void 0,mainStyle:{height:this.entry.datasetTitle?"calc(100% - 30px)":"100%",width:"100%",bottom:"0px"},helpMode:!1,idNamePair:{},scaffoldLoaded:!1,isInHelp:!1}},created:function(){this.flatmapAPI=void 0,this.apiLocation=void 0,this.settingsStore.flatmapAPI&&(this.flatmapAPI=this.settingsStore.flatmapAPI),this.settingsStore.sparcApi&&(this.apiLocation=this.settingsStore.sparcApi)}},Yor=(e,t,r)=>{t&&t.forEach(n=>{let i=!1;for(let o=0;o<yB.length;o++)if(yB[o].id===n){i=!0,r>=yB[o].showAtZoom&&e.addMarker(n,{className:"standard-marker"});break}i||e.addMarker(n,{className:"standard-marker"})})},uSe={computed:{...u1.mapStores(IT)},methods:{flatmapPanZoomCallback:function(e){if(this.mouseHovered){const t={paneIndex:this.entry.id,eventType:"panZoom",payload:e,type:this.entry.type};this.flatmapMarkerZoomUpdate(!1,void 0),this.$emit("resource-selected",t)}},flatmapMarkerZoomUpdate(e,t){if(!this.flatmapReady)return;let r=t;if(r||(r=this.getFlatmapImp()),r){let n=r.getZoom().zoom;if(e||this.zoomLevel!==n){this.zoomLevel=n,r.clearMarkers();let i=this.settingsStore.markers;Yor(r,i,this.zoomLevel),this.entry.type==="MultiFlatmap"&&this.restoreFeaturedMarkers(r)}}},flatmapReadyForMarkerUpdates:function(e){if(e){e.enablePanZoomEvents(!0),this.flatmapReady=!0;const t=e.mapImp;this.flatmapMarkerZoomUpdate(!0,t)}}}},Jor={name:"Flatmap",mixins:[Tb,uSe],components:{FlatmapVuer:Qre},methods:{getState:function(){return this.$refs.flatmap.getState()},search:function(e){return this.$refs.flatmap.searchAndShowResult(e)},getFlatmapImp(){return this.$refs.flatmap.mapImp},flatmaprResourceSelected:function(e,t){this.$refs.flatmap.resourceSelected(e,t,this.$refs.map.viewingMode==="Exploration")},flatmapReadyCall:function(e){let t={id:this.entry.id,prov:this.getFlatmapImp().provenance};Oa.emit("mapImpProv",t),this.$emit("flatmap-provenance-ready",t),this.getAvailableTerms(),this.entry.resource==="FunctionalConnectivity"&&this.flatmapReadyForMarkerUpdates(e)},highlightFeatures:function(e){let t=e.name;const r=this.$refs.flatmap.mapImp;if(t){const n=r.search(t);n.featureIds[0]&&r.highlightFeatures([r.modelForFeature(n.featureIds[0])])}},searchSuggestions:function(e,t){e&&this.$refs.flatmap.mapImp&&this.$refs.flatmap.mapImp.search(e).__featureIds.forEach(n=>{const i=this.$refs.flatmap.mapImp.annotation(n);i&&i.label&&t.push(i.label)})},zoomToFeatures:function(e,t){let r=e.name;const n=this.$refs.flatmap.mapImp;if(r){const i=n.search(r);if(i.featureIds.length){let o=n.modelForFeature(i.featureIds[0]);o?(t&&n.selectFeatures(o),n.zoomToFeatures(o)):n.clearSearchResults()}}else n.clearSearchResults()}},computed:{facetSpecies(){return this.settingsStore.facets.species}},mounted:function(){this.getAvailableTerms(),Oa.on("markerUpdate",()=>{this.flatmapMarkerZoomUpdate(!0,void 0)})}};function $or(e,t,r,n,i,o){const s=a.resolveComponent("FlatmapVuer");return a.openBlock(),a.createBlock(s,{state:e.entry.state,entry:e.entry.resource,onResourceSelected:t[0]||(t[0]=l=>o.flatmaprResourceSelected(e.entry.type,l)),onPanZoomCallback:e.flatmapPanZoomCallback,name:e.entry.resource,style:{height:"100%",width:"100%"},minZoom:e.entry.minZoom,helpMode:e.helpMode,pathControls:!0,ref:"flatmap",onReady:o.flatmapReadyCall,displayMinimap:!1,displayWarning:!0,enableOpenMapUI:!0,flatmapAPI:e.flatmapAPI,sparcAPI:e.apiLocation,onOpenMap:e.openMap},null,8,["state","entry","onPanZoomCallback","name","minZoom","helpMode","onReady","flatmapAPI","sparcAPI","onOpenMap"])}const ear=N1(Jor,[["render",$or],["__scopeId","data-v-1cc78d5b"]]),tar={name:"Iframe",mixins:[Tb]},rar={class:"map-iframe-container"},nar=["src"];function iar(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",rar,[a.createElementVNode("iframe",{class:"my-iframe",src:e.entry.resource.share_link},null,8,nar)])}const oar=N1(tar,[["render",iar],["__scopeId","data-v-60f8bfe1"]]),aar='<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><path d="M11.0748 3.25583C11.4141 2.42845 12.5859 2.42845 12.9252 3.25583L14.6493 7.45955C14.793 7.80979 15.1221 8.04889 15.4995 8.07727L20.0303 8.41798C20.922 8.48504 21.2841 9.59942 20.6021 10.1778L17.1369 13.1166C16.8482 13.3614 16.7225 13.7483 16.8122 14.1161L17.8882 18.5304C18.1 19.3992 17.152 20.0879 16.3912 19.618L12.5255 17.2305C12.2034 17.0316 11.7966 17.0316 11.4745 17.2305L7.60881 19.618C6.84796 20.0879 5.90001 19.3992 6.1118 18.5304L7.18785 14.1161C7.2775 13.7483 7.1518 13.3614 6.86309 13.1166L3.3979 10.1778C2.71588 9.59942 3.07796 8.48504 3.96971 8.41798L8.50046 8.07727C8.87794 8.04889 9.20704 7.80979 9.35068 7.45955L11.0748 3.25583Z" stroke="#000000" stroke-width="2"/></svg>',dSe=e=>{const t=[{display:"Open AC Map",key:"AC"},{display:"Open FC Map",key:"FC"},{display:"Open 3D Human Map",key:"3D"}];switch(e){case"Human Male":case"Human Female":case"Rat":t.push({display:"Open Sync Map",key:"SYNC"});break}return t},sar={name:"MultiFlatmap",mixins:[Tb,uSe],components:{MultiFlatmapVuer:For},data:function(){return{zoomLevel:6,flatmapReady:!1,availableSpecies:p5e(),scaffoldResource:{},showStarInLegend:!1,openMapOptions:dSe("Rat")}},methods:{toggleSyncMode:async function(){if(this.syncMode==!1){let e;this.activeSpecies==="Rat"?e={contextCard:void 0,discoverId:void 0,label:"Rat Body",resource:"https://mapcore-bucket1.s3.us-west-2.amazonaws.com/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json",title:"View 3D scaffold",layout:"2horpanel",type:"SyncMap"}:(this.activeSpecies==="Human Male"||this.activeSpecies==="Human Female")&&("human"in this.scaffoldResource||(this.scaffoldResource.human=await pX(this.apiLocation,"human")),e={contextCardUrl:this.scaffoldResource.human.datasetInfo.contextCardUrl,discoverId:this.scaffoldResource.human.datasetInfo.discoverId,s3uri:this.scaffoldResource.human.datasetInfo.s3uri,version:this.scaffoldResource.human.datasetInfo.version,label:"Human Body",resource:this.scaffoldResource.human.url,title:"View 3D scaffold",layout:"2vertpanel",type:"SyncMap",isBodyScaffold:!0}),e&&Oa.emit("SyncModeRequest",{flag:!0,action:e})}else Oa.emit("SyncModeRequest",{flag:!1})},getState:function(){if(this.flatmapReady)return this.$refs.multiflatmap.getState()},flatmapPanZoomCallback:function(e){if(this.mouseHovered){const t={paneIndex:this.entry.id,eventType:"panZoom",payload:e,type:this.entry.type};this.flatmapMarkerZoomUpdate(!1,void 0),this.$emit("resource-selected",t)}},search:function(e){return this.$refs.multiflatmap.getCurrentFlatmap().searchAndShowResult(e,!0)},searchSuggestions:function(e,t){const r=this.$refs.multiflatmap.getCurrentFlatmap();e&&r.mapImp&&r.mapImp.search(e).__featureIds.forEach(i=>{const o=r.mapImp.annotation(i);o&&o.label&&t.push(o.label)})},flatmaprResourceSelected:function(e,t){const r=this.$refs.multiflatmap.getCurrentFlatmap();this.resourceSelected(e,t,r.viewingMode==="Exploration")},handleSyncPanZoomEvent:function(e){if(!this.mouseHovered&&e.type!==this.entry.type){const t=e.payload.zoom,r=e.payload.target,n=this.$el.clientHeight,i=this.$el.clientWidth,o=Math.max(i,n);let s=i/o/t;const l=n/o/t,c=[r[0]/2+.5-s/2,.5-r[1]/2-l/2];this.$refs.multiflatmap.getCurrentFlatmap().mapImp.panZoomTo(c,[s,l]),this.flatmapMarkerZoomUpdate(!1,void 0)}},displayTooltip:function(e){if(e){let t=e.name;t?this.search(t):this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults()}},zoomToFeatures:function(e,t){let r=e.name;const n=this.$refs.multiflatmap.getCurrentFlatmap().mapImp;if(r){const i=n.search(r);i.featureIds.length>0?(t&&n.selectFeatures(i.featureIds),n.zoomToFeatures(i.featureIds)):n.clearSearchResults()}else n.clearSearchResults()},highlightFeatures:function(e){let t=e.name;const r=this.$refs.multiflatmap.getCurrentFlatmap().mapImp;if(t){const n=r.search(t);n.featureIds.length>0&&r.zoomToFeatures(n.featureIds,{noZoomIn:!0})}},updateProvCard:function(){const e=this.getFlatmapImp();if(e){let t={id:this.entry.id,prov:e.provenance};this.$emit("flatmap-provenance-ready",t)}},flatmapChanged:async function(e){this.activeSpecies=e,this.openMapOptions=dSe(e),this.$emit("species-changed",e),this.entry.state&&this.entry.state.species===this.activeSpecies||this.syncMode==!0&&await this.toggleSyncMode(),this.updateProvCard()},multiFlatmapReady:function(e){if(e){e.enablePanZoomEvents(!0),this.flatmapReady=!0;const t=e.mapImp;this.flatmapMarkerZoomUpdate(!0,t),this.updateProvCard()}},getFlatmapImp:function(){if(this.entry.type==="MultiFlatmap"&&this.flatmapReady)return this.$refs.multiflatmap.getCurrentFlatmap().mapImp},flatmapAreaSearch(){let r={type:"Facets",label:"Unused",val:this.getFlatmapImp().visibleMarkerAnatomicalIds().map(n=>this.idNamePair[n])};Oa.emit("PopoverActionClick",r)},restoreFeaturedMarkers:function(e){this.settingsStore.resetFeaturedMarkerIdentifier();const t=this.settingsStore.featuredMarkers;this.updateFeatureMarkers(t,e)},updateFeatureMarkers:function(e,t){this.showStarInLegend=!1;for(let r=0;r<e.length;++r)e[r]&&(this.settingsStore.featuredMarkerIdentifiers[r]||this.addFeaturedMarker(e[r],r,t)&&(this.showStarInLegend=!0))},addFeaturedMarker:function(e,t,r){const n=this.settingsStore.featuredMarkerSpecies[t];if(n&&!this.activeSpecies.startsWith(n))return!1;let i=r;if(i||(i=this.getFlatmapImp()),i){let o=document.createElement("div");o.innerHTML=aar;const s=i.addMarker(e,{element:o,className:"highlight-marker"});return this.settingsStore.updateFeaturedMarkerIdentifier({index:t,markerIdentifier:s}),!0}return!1}},computed:{facetSpecies(){return this.settingsStore.facets.species},featuredMarkers(){return this.settingsStore.featuredMarkers}},watch:{syncMode:function(e){this.$refs.multiflatmap.getCurrentFlatmap()&&this.$refs.multiflatmap.getCurrentFlatmap().enablePanZoomEvents(e)},featuredMarkers:function(e){this.flatmapReady&&this.updateFeatureMarkers(e,void 0)}},mounted:function(){this.getAvailableTerms(),this.getFeaturedDatasets(),Oa.on("markerUpdate",()=>{this.flatmapMarkerZoomUpdate(!0,void 0)})}};function lar(e,t,r,n,i,o){const s=a.resolveComponent("MultiFlatmapVuer");return a.openBlock(),a.createBlock(s,{availableSpecies:e.availableSpecies,onFlatmapChanged:o.flatmapChanged,onReady:o.multiFlatmapReady,state:e.entry.state,onResourceSelected:t[0]||(t[0]=l=>o.flatmaprResourceSelected(e.entry.type,l)),style:{height:"100%",width:"100%"},initial:e.entry.resource,helpMode:e.helpMode,ref:"multiflatmap",displayMinimap:!0,showStarInLegend:e.showStarInLegend,enableOpenMapUI:!0,openMapOptions:e.openMapOptions,flatmapAPI:e.flatmapAPI,sparcAPI:e.apiLocation,onPanZoomCallback:o.flatmapPanZoomCallback,onOpenMap:e.openMap},null,8,["availableSpecies","onFlatmapChanged","onReady","state","initial","helpMode","showStarInLegend","openMapOptions","flatmapAPI","sparcAPI","onPanZoomCallback","onOpenMap"])}const car=N1(sar,[["render",lar],["__scopeId","data-v-d33fb08a"]]);function uar(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var hSe={exports:{}},Zs=hSe.exports={},up,dp;function _re(){throw new Error("setTimeout has not been defined")}function wre(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?up=setTimeout:up=_re}catch{up=_re}try{typeof clearTimeout=="function"?dp=clearTimeout:dp=wre}catch{dp=wre}})();function pSe(e){if(up===setTimeout)return setTimeout(e,0);if((up===_re||!up)&&setTimeout)return up=setTimeout,setTimeout(e,0);try{return up(e,0)}catch{try{return up.call(null,e,0)}catch{return up.call(this,e,0)}}}function dar(e){if(dp===clearTimeout)return clearTimeout(e);if((dp===wre||!dp)&&clearTimeout)return dp=clearTimeout,clearTimeout(e);try{return dp(e)}catch{try{return dp.call(null,e)}catch{return dp.call(this,e)}}}var Ff=[],vb=!1,$g,TB=-1;function har(){!vb||!$g||(vb=!1,$g.length?Ff=$g.concat(Ff):TB=-1,Ff.length&&fSe())}function fSe(){if(!vb){var e=pSe(har);vb=!0;for(var t=Ff.length;t;){for($g=Ff,Ff=[];++TB<t;)$g&&$g[TB].run();TB=-1,t=Ff.length}$g=null,vb=!1,dar(e)}}Zs.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];Ff.push(new mSe(e,t)),Ff.length===1&&!vb&&pSe(fSe)};function mSe(e,t){this.fun=e,this.array=t}mSe.prototype.run=function(){this.fun.apply(null,this.array)},Zs.title="browser",Zs.browser=!0,Zs.env={},Zs.argv=[],Zs.version="",Zs.versions={};function Df(){}Zs.on=Df,Zs.addListener=Df,Zs.once=Df,Zs.off=Df,Zs.removeListener=Df,Zs.removeAllListeners=Df,Zs.emit=Df,Zs.prependListener=Df,Zs.prependOnceListener=Df,Zs.listeners=function(e){return[]},Zs.binding=function(e){throw new Error("process.binding is not supported")},Zs.cwd=function(){return"/"},Zs.chdir=function(e){throw new Error("process.chdir is not supported")},Zs.umask=function(){return 0};var par=hSe.exports;const bb=uar(par),zf=(e,t,{checkForDefaultPrevented:r=!0}={})=>n=>{const i=e==null?void 0:e(n);if(r===!1||!i)return t==null?void 0:t(n)},Qb=globalThis||void 0||self;var gSe;const Sc=typeof window<"u",far=e=>typeof e=="string",ySe=()=>{},mar=Sc&&((gSe=window==null?void 0:window.navigator)==null?void 0:gSe.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function TSe(e){return typeof e=="function"?e():a.unref(e)}function gar(e){return e}function vB(e){return a.getCurrentScope()?(a.onScopeDispose(e),!0):!1}function yar(e,t=!0){a.getCurrentInstance()?a.onMounted(e):t?e():a.nextTick(e)}function jf(e){var t;const r=TSe(e);return(t=r==null?void 0:r.$el)!=null?t:r}const bB=Sc?window:void 0;function e9(...e){let t,r,n,i;if(far(e[0])||Array.isArray(e[0])?([r,n,i]=e,t=bB):[t,r,n,i]=e,!t)return ySe;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const o=[],s=()=>{o.forEach(d=>d()),o.length=0},l=(d,h,p,f)=>(d.addEventListener(h,p,f),()=>d.removeEventListener(h,p,f)),c=a.watch(()=>[jf(t),TSe(i)],([d,h])=>{s(),d&&o.push(...r.flatMap(p=>n.map(f=>l(d,p,f,h))))},{immediate:!0,flush:"post"}),u=()=>{c(),s()};return vB(u),u}let vSe=!1;function Tar(e,t,r={}){const{window:n=bB,ignore:i=[],capture:o=!0,detectIframe:s=!1}=r;if(!n)return;mar&&!vSe&&(vSe=!0,Array.from(n.document.body.children).forEach(d=>d.addEventListener("click",ySe)));let l=!0;const c=d=>i.some(h=>{if(typeof h=="string")return Array.from(n.document.querySelectorAll(h)).some(p=>p===d.target||d.composedPath().includes(p));{const p=jf(h);return p&&(d.target===p||d.composedPath().includes(p))}}),u=[e9(n,"click",d=>{const h=jf(e);if(!(!h||h===d.target||d.composedPath().includes(h))){if(d.detail===0&&(l=!c(d)),!l){l=!0;return}t(d)}},{passive:!0,capture:o}),e9(n,"pointerdown",d=>{const h=jf(e);h&&(l=!d.composedPath().includes(h)&&!c(d))},{passive:!0}),s&&e9(n,"blur",d=>{var h;const p=jf(e);((h=n.document.activeElement)==null?void 0:h.tagName)==="IFRAME"&&!(p!=null&&p.contains(n.document.activeElement))&&t(d)})].filter(Boolean);return()=>u.forEach(d=>d())}function bSe(e,t=!1){const r=a.ref(),n=()=>r.value=!!e();return n(),yar(n,t),r}const Lre=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Qb<"u"?Qb:typeof self<"u"?self:{},Sre="__vueuse_ssr_handlers__";Lre[Sre]=Lre[Sre]||{},Lre[Sre];var QSe=Object.getOwnPropertySymbols,bar=Object.prototype.hasOwnProperty,Qar=Object.prototype.propertyIsEnumerable,xar=(e,t)=>{var r={};for(var n in e)bar.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&QSe)for(var n of QSe(e))t.indexOf(n)<0&&Qar.call(e,n)&&(r[n]=e[n]);return r};function Uf(e,t,r={}){const n=r,{window:i=bB}=n,o=xar(n,["window"]);let s;const l=bSe(()=>i&&"ResizeObserver"in i),c=()=>{s&&(s.disconnect(),s=void 0)},u=a.watch(()=>jf(e),h=>{c(),l.value&&i&&h&&(s=new ResizeObserver(t),s.observe(h,o))},{immediate:!0,flush:"post"}),d=()=>{c(),u()};return vB(d),{isSupported:l,stop:d}}var xSe=Object.getOwnPropertySymbols,_ar=Object.prototype.hasOwnProperty,war=Object.prototype.propertyIsEnumerable,Lar=(e,t)=>{var r={};for(var n in e)_ar.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&xSe)for(var n of xSe(e))t.indexOf(n)<0&&war.call(e,n)&&(r[n]=e[n]);return r};function Sar(e,t,r={}){const n=r,{window:i=bB}=n,o=Lar(n,["window"]);let s;const l=bSe(()=>i&&"MutationObserver"in i),c=()=>{s&&(s.disconnect(),s=void 0)},u=a.watch(()=>jf(e),h=>{c(),l.value&&i&&h&&(s=new MutationObserver(t),s.observe(h,o))},{immediate:!0}),d=()=>{c(),u()};return vB(d),{isSupported:l,stop:d}}var _Se;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(_Se||(_Se={}));var Mar=Object.defineProperty,wSe=Object.getOwnPropertySymbols,kar=Object.prototype.hasOwnProperty,Car=Object.prototype.propertyIsEnumerable,LSe=(e,t,r)=>t in e?Mar(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ear=(e,t)=>{for(var r in t||(t={}))kar.call(t,r)&&LSe(e,r,t[r]);if(wSe)for(var r of wSe(t))Car.call(t,r)&&LSe(e,r,t[r]);return e};Ear({linear:gar},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const Aar=()=>Sc&&/firefox/i.test(window.navigator.userAgent);bb.env.NODE_ENV!=="production"&&Object.freeze({}),bb.env.NODE_ENV!=="production"&&Object.freeze([]);const XM=()=>{},Oar=Object.prototype.hasOwnProperty,SSe=(e,t)=>Oar.call(e,t),Gd=Array.isArray,Wd=e=>typeof e=="function",hp=e=>typeof e=="string",qd=e=>e!==null&&typeof e=="object",Par=Object.prototype.toString,Iar=e=>Par.call(e),Mre=e=>Iar(e).slice(8,-1);var MSe=typeof Qb=="object"&&Qb&&Qb.Object===Object&&Qb,Har=typeof self=="object"&&self&&self.Object===Object&&self,pp=MSe||Har||Function("return this")(),Sm=pp.Symbol,kSe=Object.prototype,Var=kSe.hasOwnProperty,Rar=kSe.toString,KM=Sm?Sm.toStringTag:void 0;function Nar(e){var t=Var.call(e,KM),r=e[KM];try{e[KM]=void 0;var n=!0}catch{}var i=Rar.call(e);return n&&(t?e[KM]=r:delete e[KM]),i}var Bar=Object.prototype,Far=Bar.toString;function Dar(e){return Far.call(e)}var zar="[object Null]",jar="[object Undefined]",CSe=Sm?Sm.toStringTag:void 0;function xb(e){return e==null?e===void 0?jar:zar:CSe&&CSe in Object(e)?Nar(e):Dar(e)}function _b(e){return e!=null&&typeof e=="object"}var Uar="[object Symbol]";function QB(e){return typeof e=="symbol"||_b(e)&&xb(e)==Uar}function Gar(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var fp=Array.isArray,War=1/0,ESe=Sm?Sm.prototype:void 0,ASe=ESe?ESe.toString:void 0;function OSe(e){if(typeof e=="string")return e;if(fp(e))return Gar(e,OSe)+"";if(QB(e))return ASe?ASe.call(e):"";var t=e+"";return t=="0"&&1/e==-War?"-0":t}var qar=/\s/;function Zar(e){for(var t=e.length;t--&&qar.test(e.charAt(t)););return t}var Xar=/^\s+/;function Kar(e){return e&&e.slice(0,Zar(e)+1).replace(Xar,"")}function wb(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var PSe=NaN,Yar=/^[-+]0x[0-9a-f]+$/i,Jar=/^0b[01]+$/i,$ar=/^0o[0-7]+$/i,esr=parseInt;function kre(e){if(typeof e=="number")return e;if(QB(e))return PSe;if(wb(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=wb(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Kar(e);var r=Jar.test(e);return r||$ar.test(e)?esr(e.slice(2),r?2:8):Yar.test(e)?PSe:+e}var ISe=1/0,tsr=17976931348623157e292;function rsr(e){if(!e)return e===0?e:0;if(e=kre(e),e===ISe||e===-ISe){var t=e<0?-1:1;return t*tsr}return e===e?e:0}function nsr(e){var t=rsr(e),r=t%1;return t===t?r?t-r:t:0}function isr(e){return e}var osr="[object AsyncFunction]",asr="[object Function]",ssr="[object GeneratorFunction]",lsr="[object Proxy]";function HSe(e){if(!wb(e))return!1;var t=xb(e);return t==asr||t==ssr||t==osr||t==lsr}var Cre=pp["__core-js_shared__"],VSe=function(){var e=/[^.]+$/.exec(Cre&&Cre.keys&&Cre.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function csr(e){return!!VSe&&VSe in e}var usr=Function.prototype,dsr=usr.toString;function t9(e){if(e!=null){try{return dsr.call(e)}catch{}try{return e+""}catch{}}return""}var hsr=/[\\^$.*+?()[\]{}|]/g,psr=/^\[object .+?Constructor\]$/,fsr=Function.prototype,msr=Object.prototype,gsr=fsr.toString,ysr=msr.hasOwnProperty,Tsr=RegExp("^"+gsr.call(ysr).replace(hsr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function vsr(e){if(!wb(e)||csr(e))return!1;var t=HSe(e)?Tsr:psr;return t.test(t9(e))}function bsr(e,t){return e==null?void 0:e[t]}function Lb(e,t){var r=bsr(e,t);return vsr(r)?r:void 0}var Ere=Lb(pp,"WeakMap");function Qsr(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}var xsr=9007199254740991,_sr=/^(?:0|[1-9]\d*)$/;function RSe(e,t){var r=typeof e;return t=t??xsr,!!t&&(r=="number"||r!="symbol"&&_sr.test(e))&&e>-1&&e%1==0&&e<t}function NSe(e,t){return e===t||e!==e&&t!==t}var wsr=9007199254740991;function Are(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=wsr}function Lsr(e){return e!=null&&Are(e.length)&&!HSe(e)}var Ssr=Object.prototype;function Msr(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ssr;return e===r}function ksr(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Csr="[object Arguments]";function BSe(e){return _b(e)&&xb(e)==Csr}var FSe=Object.prototype,Esr=FSe.hasOwnProperty,Asr=FSe.propertyIsEnumerable,DSe=BSe(function(){return arguments}())?BSe:function(e){return _b(e)&&Esr.call(e,"callee")&&!Asr.call(e,"callee")};function Osr(){return!1}var zSe=typeof Vn=="object"&&Vn&&!Vn.nodeType&&Vn,jSe=zSe&&typeof module=="object"&&module&&!module.nodeType&&module,Psr=jSe&&jSe.exports===zSe,USe=Psr?pp.Buffer:void 0,Isr=USe?USe.isBuffer:void 0,Ore=Isr||Osr,Hsr="[object Arguments]",Vsr="[object Array]",Rsr="[object Boolean]",Nsr="[object Date]",Bsr="[object Error]",Fsr="[object Function]",Dsr="[object Map]",zsr="[object Number]",jsr="[object Object]",Usr="[object RegExp]",Gsr="[object Set]",Wsr="[object String]",qsr="[object WeakMap]",Zsr="[object ArrayBuffer]",Xsr="[object DataView]",Ksr="[object Float32Array]",Ysr="[object Float64Array]",Jsr="[object Int8Array]",$sr="[object Int16Array]",elr="[object Int32Array]",tlr="[object Uint8Array]",rlr="[object Uint8ClampedArray]",nlr="[object Uint16Array]",ilr="[object Uint32Array]",Ka={};Ka[Ksr]=Ka[Ysr]=Ka[Jsr]=Ka[$sr]=Ka[elr]=Ka[tlr]=Ka[rlr]=Ka[nlr]=Ka[ilr]=!0,Ka[Hsr]=Ka[Vsr]=Ka[Zsr]=Ka[Rsr]=Ka[Xsr]=Ka[Nsr]=Ka[Bsr]=Ka[Fsr]=Ka[Dsr]=Ka[zsr]=Ka[jsr]=Ka[Usr]=Ka[Gsr]=Ka[Wsr]=Ka[qsr]=!1;function olr(e){return _b(e)&&Are(e.length)&&!!Ka[xb(e)]}function alr(e){return function(t){return e(t)}}var GSe=typeof Vn=="object"&&Vn&&!Vn.nodeType&&Vn,YM=GSe&&typeof module=="object"&&module&&!module.nodeType&&module,slr=YM&&YM.exports===GSe,Pre=slr&&MSe.process,WSe=function(){try{var e=YM&&YM.require&&YM.require("util").types;return e||Pre&&Pre.binding&&Pre.binding("util")}catch{}}(),qSe=WSe&&WSe.isTypedArray,ZSe=qSe?alr(qSe):olr,llr=Object.prototype,clr=llr.hasOwnProperty;function ulr(e,t){var r=fp(e),n=!r&&DSe(e),i=!r&&!n&&Ore(e),o=!r&&!n&&!i&&ZSe(e),s=r||n||i||o,l=s?ksr(e.length,String):[],c=l.length;for(var u in e)(t||clr.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||RSe(u,c)))&&l.push(u);return l}function dlr(e,t){return function(r){return e(t(r))}}var hlr=dlr(Object.keys,Object),plr=Object.prototype,flr=plr.hasOwnProperty;function mlr(e){if(!Msr(e))return hlr(e);var t=[];for(var r in Object(e))flr.call(e,r)&&r!="constructor"&&t.push(r);return t}function XSe(e){return Lsr(e)?ulr(e):mlr(e)}var glr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ylr=/^\w*$/;function Ire(e,t){if(fp(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||QB(e)?!0:ylr.test(e)||!glr.test(e)||t!=null&&e in Object(t)}var JM=Lb(Object,"create");function Tlr(){this.__data__=JM?JM(null):{},this.size=0}function vlr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var blr="__lodash_hash_undefined__",Qlr=Object.prototype,xlr=Qlr.hasOwnProperty;function _lr(e){var t=this.__data__;if(JM){var r=t[e];return r===blr?void 0:r}return xlr.call(t,e)?t[e]:void 0}var wlr=Object.prototype,Llr=wlr.hasOwnProperty;function Slr(e){var t=this.__data__;return JM?t[e]!==void 0:Llr.call(t,e)}var Mlr="__lodash_hash_undefined__";function klr(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=JM&&t===void 0?Mlr:t,this}function r9(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}r9.prototype.clear=Tlr,r9.prototype.delete=vlr,r9.prototype.get=_lr,r9.prototype.has=Slr,r9.prototype.set=klr;function Clr(){this.__data__=[],this.size=0}function xB(e,t){for(var r=e.length;r--;)if(NSe(e[r][0],t))return r;return-1}var Elr=Array.prototype,Alr=Elr.splice;function Olr(e){var t=this.__data__,r=xB(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Alr.call(t,r,1),--this.size,!0}function Plr(e){var t=this.__data__,r=xB(t,e);return r<0?void 0:t[r][1]}function Ilr(e){return xB(this.__data__,e)>-1}function Hlr(e,t){var r=this.__data__,n=xB(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Gf(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Gf.prototype.clear=Clr,Gf.prototype.delete=Olr,Gf.prototype.get=Plr,Gf.prototype.has=Ilr,Gf.prototype.set=Hlr;var $M=Lb(pp,"Map");function Vlr(){this.size=0,this.__data__={hash:new r9,map:new($M||Gf),string:new r9}}function Rlr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function _B(e,t){var r=e.__data__;return Rlr(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Nlr(e){var t=_B(this,e).delete(e);return this.size-=t?1:0,t}function Blr(e){return _B(this,e).get(e)}function Flr(e){return _B(this,e).has(e)}function Dlr(e,t){var r=_B(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Wf(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Wf.prototype.clear=Vlr,Wf.prototype.delete=Nlr,Wf.prototype.get=Blr,Wf.prototype.has=Flr,Wf.prototype.set=Dlr;var zlr="Expected a function";function Hre(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(zlr);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Hre.Cache||Wf),r}Hre.Cache=Wf;var jlr=500;function Ulr(e){var t=Hre(e,function(n){return r.size===jlr&&r.clear(),n}),r=t.cache;return t}var Glr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Wlr=/\\(\\)?/g,qlr=Ulr(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Glr,function(r,n,i,o){t.push(i?o.replace(Wlr,"$1"):n||r)}),t});function Zlr(e){return e==null?"":OSe(e)}function KSe(e,t){return fp(e)?e:Ire(e,t)?[e]:qlr(Zlr(e))}var Xlr=1/0;function wB(e){if(typeof e=="string"||QB(e))return e;var t=e+"";return t=="0"&&1/e==-Xlr?"-0":t}function YSe(e,t){t=KSe(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[wB(t[r++])];return r&&r==n?e:void 0}function qf(e,t,r){var n=e==null?void 0:YSe(e,t);return n===void 0?r:n}function Klr(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function JSe(){if(!arguments.length)return[];var e=arguments[0];return fp(e)?e:[e]}function Ylr(){this.__data__=new Gf,this.size=0}function Jlr(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function $lr(e){return this.__data__.get(e)}function e1r(e){return this.__data__.has(e)}var t1r=200;function r1r(e,t){var r=this.__data__;if(r instanceof Gf){var n=r.__data__;if(!$M||n.length<t1r-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Wf(n)}return r.set(e,t),this.size=r.size,this}function Zf(e){var t=this.__data__=new Gf(e);this.size=t.size}Zf.prototype.clear=Ylr,Zf.prototype.delete=Jlr,Zf.prototype.get=$lr,Zf.prototype.has=e1r,Zf.prototype.set=r1r;function n1r(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function i1r(){return[]}var o1r=Object.prototype,a1r=o1r.propertyIsEnumerable,$Se=Object.getOwnPropertySymbols,s1r=$Se?function(e){return e==null?[]:(e=Object(e),n1r($Se(e),function(t){return a1r.call(e,t)}))}:i1r;const l1r=s1r;function c1r(e,t,r){var n=t(e);return fp(e)?n:Klr(n,r(e))}function eMe(e){return c1r(e,XSe,l1r)}var Vre=Lb(pp,"DataView"),Rre=Lb(pp,"Promise"),Nre=Lb(pp,"Set"),tMe="[object Map]",u1r="[object Object]",rMe="[object Promise]",nMe="[object Set]",iMe="[object WeakMap]",oMe="[object DataView]",d1r=t9(Vre),h1r=t9($M),p1r=t9(Rre),f1r=t9(Nre),m1r=t9(Ere),n9=xb;(Vre&&n9(new Vre(new ArrayBuffer(1)))!=oMe||$M&&n9(new $M)!=tMe||Rre&&n9(Rre.resolve())!=rMe||Nre&&n9(new Nre)!=nMe||Ere&&n9(new Ere)!=iMe)&&(n9=function(e){var t=xb(e),r=t==u1r?e.constructor:void 0,n=r?t9(r):"";if(n)switch(n){case d1r:return oMe;case h1r:return tMe;case p1r:return rMe;case f1r:return nMe;case m1r:return iMe}return t});const aMe=n9;var g1r=pp.Uint8Array;const sMe=g1r;var y1r="__lodash_hash_undefined__";function T1r(e){return this.__data__.set(e,y1r),this}function v1r(e){return this.__data__.has(e)}function LB(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Wf;++t<r;)this.add(e[t])}LB.prototype.add=LB.prototype.push=T1r,LB.prototype.has=v1r;function b1r(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Q1r(e,t){return e.has(t)}var x1r=1,_1r=2;function lMe(e,t,r,n,i,o){var s=r&x1r,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var h=-1,p=!0,f=r&_1r?new LB:void 0;for(o.set(e,t),o.set(t,e);++h<l;){var m=e[h],g=t[h];if(n)var T=s?n(g,m,h,t,e,o):n(m,g,h,e,t,o);if(T!==void 0){if(T)continue;p=!1;break}if(f){if(!b1r(t,function(y,v){if(!Q1r(f,v)&&(m===y||i(m,y,r,n,o)))return f.push(v)})){p=!1;break}}else if(!(m===g||i(m,g,r,n,o))){p=!1;break}}return o.delete(e),o.delete(t),p}function w1r(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function L1r(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var S1r=1,M1r=2,k1r="[object Boolean]",C1r="[object Date]",E1r="[object Error]",A1r="[object Map]",O1r="[object Number]",P1r="[object RegExp]",I1r="[object Set]",H1r="[object String]",V1r="[object Symbol]",R1r="[object ArrayBuffer]",N1r="[object DataView]",cMe=Sm?Sm.prototype:void 0,Bre=cMe?cMe.valueOf:void 0;function B1r(e,t,r,n,i,o,s){switch(r){case N1r:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case R1r:return!(e.byteLength!=t.byteLength||!o(new sMe(e),new sMe(t)));case k1r:case C1r:case O1r:return NSe(+e,+t);case E1r:return e.name==t.name&&e.message==t.message;case P1r:case H1r:return e==t+"";case A1r:var l=w1r;case I1r:var c=n&S1r;if(l||(l=L1r),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=M1r,s.set(e,t);var d=lMe(l(e),l(t),n,i,o,s);return s.delete(e),d;case V1r:if(Bre)return Bre.call(e)==Bre.call(t)}return!1}var F1r=1,D1r=Object.prototype,z1r=D1r.hasOwnProperty;function j1r(e,t,r,n,i,o){var s=r&F1r,l=eMe(e),c=l.length,u=eMe(t),d=u.length;if(c!=d&&!s)return!1;for(var h=c;h--;){var p=l[h];if(!(s?p in t:z1r.call(t,p)))return!1}var f=o.get(e),m=o.get(t);if(f&&m)return f==t&&m==e;var g=!0;o.set(e,t),o.set(t,e);for(var T=s;++h<c;){p=l[h];var y=e[p],v=t[p];if(n)var _=s?n(v,y,p,t,e,o):n(y,v,p,e,t,o);if(!(_===void 0?y===v||i(y,v,r,n,o):_)){g=!1;break}T||(T=p=="constructor")}if(g&&!T){var b=e.constructor,L=t.constructor;b!=L&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof L=="function"&&L instanceof L)&&(g=!1)}return o.delete(e),o.delete(t),g}var U1r=1,uMe="[object Arguments]",dMe="[object Array]",SB="[object Object]",G1r=Object.prototype,hMe=G1r.hasOwnProperty;function W1r(e,t,r,n,i,o){var s=fp(e),l=fp(t),c=s?dMe:aMe(e),u=l?dMe:aMe(t);c=c==uMe?SB:c,u=u==uMe?SB:u;var d=c==SB,h=u==SB,p=c==u;if(p&&Ore(e)){if(!Ore(t))return!1;s=!0,d=!1}if(p&&!d)return o||(o=new Zf),s||ZSe(e)?lMe(e,t,r,n,i,o):B1r(e,t,c,r,n,i,o);if(!(r&U1r)){var f=d&&hMe.call(e,"__wrapped__"),m=h&&hMe.call(t,"__wrapped__");if(f||m){var g=f?e.value():e,T=m?t.value():t;return o||(o=new Zf),i(g,T,r,n,o)}}return p?(o||(o=new Zf),j1r(e,t,r,n,i,o)):!1}function MB(e,t,r,n,i){return e===t?!0:e==null||t==null||!_b(e)&&!_b(t)?e!==e&&t!==t:W1r(e,t,r,n,MB,i)}var q1r=1,Z1r=2;function X1r(e,t,r,n){var i=r.length,o=i,s=!n;if(e==null)return!o;for(e=Object(e);i--;){var l=r[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<o;){l=r[i];var c=l[0],u=e[c],d=l[1];if(s&&l[2]){if(u===void 0&&!(c in e))return!1}else{var h=new Zf;if(n)var p=n(u,d,c,e,t,h);if(!(p===void 0?MB(d,u,q1r|Z1r,n,h):p))return!1}}return!0}function pMe(e){return e===e&&!wb(e)}function K1r(e){for(var t=XSe(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,pMe(i)]}return t}function fMe(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function Y1r(e){var t=K1r(e);return t.length==1&&t[0][2]?fMe(t[0][0],t[0][1]):function(r){return r===e||X1r(r,e,t)}}function J1r(e,t){return e!=null&&t in Object(e)}function $1r(e,t,r){t=KSe(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var s=wB(t[n]);if(!(o=e!=null&&r(e,s)))break;e=e[s]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&Are(i)&&RSe(s,i)&&(fp(e)||DSe(e)))}function ecr(e,t){return e!=null&&$1r(e,t,J1r)}var tcr=1,rcr=2;function ncr(e,t){return Ire(e)&&pMe(t)?fMe(wB(e),t):function(r){var n=qf(r,e);return n===void 0&&n===t?ecr(r,e):MB(t,n,tcr|rcr)}}function icr(e){return function(t){return t==null?void 0:t[e]}}function ocr(e){return function(t){return YSe(t,e)}}function acr(e){return Ire(e)?icr(wB(e)):ocr(e)}function scr(e){return typeof e=="function"?e:e==null?isr:typeof e=="object"?fp(e)?ncr(e[0],e[1]):Y1r(e):acr(e)}var Fre=function(){return pp.Date.now()},lcr="Expected a function",ccr=Math.max,ucr=Math.min;function dcr(e,t,r){var n,i,o,s,l,c,u=0,d=!1,h=!1,p=!0;if(typeof e!="function")throw new TypeError(lcr);t=kre(t)||0,wb(r)&&(d=!!r.leading,h="maxWait"in r,o=h?ccr(kre(r.maxWait)||0,t):o,p="trailing"in r?!!r.trailing:p);function f(w){var M=n,C=i;return n=i=void 0,u=w,s=e.apply(C,M),s}function m(w){return u=w,l=setTimeout(y,t),d?f(w):s}function g(w){var M=w-c,C=w-u,A=t-M;return h?ucr(A,o-C):A}function T(w){var M=w-c,C=w-u;return c===void 0||M>=t||M<0||h&&C>=o}function y(){var w=Fre();if(T(w))return v(w);l=setTimeout(y,g(w))}function v(w){return l=void 0,p&&n?f(w):(n=i=void 0,s)}function _(){l!==void 0&&clearTimeout(l),u=0,n=c=i=l=void 0}function b(){return l===void 0?s:v(Fre())}function L(){var w=Fre(),M=T(w);if(n=arguments,i=this,c=w,M){if(l===void 0)return m(c);if(h)return clearTimeout(l),l=setTimeout(y,t),f(c)}return l===void 0&&(l=setTimeout(y,t)),s}return L.cancel=_,L.flush=b,L}var hcr=Math.max,pcr=Math.min;function fcr(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=n-1;return r!==void 0&&(i=nsr(r),i=r<0?hcr(n+i,0):pcr(i,n-1)),Qsr(e,scr(t),i,!0)}function kB(e){for(var t=-1,r=e==null?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n}function ek(e,t){return MB(e,t)}function CB(e){return e==null}function mcr(e){return e===void 0}const mMe=e=>e===void 0,Dre=e=>typeof e=="boolean",Xu=e=>typeof e=="number",tk=e=>typeof Element>"u"?!1:e instanceof Element,gcr=e=>hp(e)?!Number.isNaN(Number(e)):!1,ycr=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d");let gMe=class extends Error{constructor(t){super(t),this.name="ElementPlusError"}};function Tcr(e,t){throw new gMe(`[${e}] ${t}`)}function Zd(e,t){if(bb.env.NODE_ENV!=="production"){const r=hp(e)?new gMe(`[${e}] ${t}`):e;console.warn(r)}}const vcr="utils/dom/style";function EB(e,t="px"){if(!e)return"";if(Xu(e)||gcr(e))return`${e}${t}`;if(hp(e))return e;Zd(vcr,"binding value must be a string or number")}function bcr(e,t){if(!Sc)return;if(!t){e.scrollTop=0;return}const r=[];let n=t.offsetParent;for(;n!==null&&e!==n&&e.contains(n);)r.push(n),n=n.offsetParent;const i=t.offsetTop+r.reduce((c,u)=>c+u.offsetTop,0),o=i+t.offsetHeight,s=e.scrollTop,l=s+e.clientHeight;i<s?e.scrollTop=i:o>l&&(e.scrollTop=o-e.clientHeight)}/*! Element Plus Icons Vue v2.3.1 */var Qcr=a.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),xcr=Qcr,_cr=a.defineComponent({name:"ArrowRight",__name:"arrow-right",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),wcr=_cr,Lcr=a.defineComponent({name:"CircleCheck",__name:"circle-check",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),a.createElementVNode("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}}),Scr=Lcr,Mcr=a.defineComponent({name:"CircleClose",__name:"circle-close",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),a.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),zre=Mcr,kcr=a.defineComponent({name:"Close",__name:"close",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),yMe=kcr,Ccr=a.defineComponent({name:"Hide",__name:"hide",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),a.createElementVNode("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}}),Ecr=Ccr,Acr=a.defineComponent({name:"Loading",__name:"loading",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),TMe=Acr,Ocr=a.defineComponent({name:"View",__name:"view",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),Pcr=Ocr;const vMe="__epPropKey",qi=e=>e,Icr=e=>qd(e)&&!!e[vMe],AB=(e,t)=>{if(!qd(e)||Icr(e))return e;const{values:r,required:n,default:i,type:o,validator:s}=e,l={type:o,required:!!n,validator:r||s?c=>{let u=!1,d=[];if(r&&(d=Array.from(r),SSe(e,"default")&&d.push(i),u||(u=d.includes(c))),s&&(u||(u=s(c))),!u&&d.length>0){const h=[...new Set(d)].map(p=>JSON.stringify(p)).join(", ");a.warn(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${h}], got value ${JSON.stringify(c)}.`)}return u}:void 0,[vMe]:!0};return SSe(e,"default")&&(l.default=i),l},xs=e=>kB(Object.entries(e).map(([t,r])=>[t,AB(r,t)])),i9=qi([String,Object,Function]),bMe={validating:TMe,success:Scr,error:zre},mp=(e,t)=>{if(e.install=r=>{for(const n of[e,...Object.values(t??{})])r.component(n.name,n)},t)for(const[r,n]of Object.entries(t))e[r]=n;return e},Hcr=(e,t)=>(e.install=r=>{r.directive(t,e)},e),OB=e=>(e.install=XM,e),rk={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},Z0="update:modelValue",PB="change",QMe=["","default","small","large"],xMe=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e),_Me=e=>e,Vcr=["class","style"],Rcr=/^on[A-Z]/,Ncr=(e={})=>{const{excludeListeners:t=!1,excludeKeys:r}=e,n=a.computed(()=>((r==null?void 0:r.value)||[]).concat(Vcr)),i=a.getCurrentInstance();return i?a.computed(()=>{var o;return kB(Object.entries((o=i.proxy)==null?void 0:o.$attrs).filter(([s])=>!n.value.includes(s)&&!(t&&Rcr.test(s))))}):(Zd("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),a.computed(()=>({})))},wMe=({from:e,replacement:t,scope:r,version:n,ref:i,type:o="API"},s)=>{a.watch(()=>a.unref(s),l=>{l&&Zd(r,`[${o}] ${e} is about to be deprecated in version ${n}, please use ${t} instead.
|
2181
|
+
This will fail in production.`);l=WM,l._s.has(n)||(o?bre(n,t,i,l):aSe(n,i,l),process.env.NODE_ENV!=="production"&&(s._pinia=l));const d=l._s.get(n);if(process.env.NODE_ENV!=="production"&&c){const h="__hot:"+n,p=o?bre(h,t,i,l,!0):aSe(h,Ud({},i),l,!0);c._hotUpdate(p),delete l.state.value[h],l._s.delete(h)}if(process.env.NODE_ENV!=="production"&&yre){const h=a.getCurrentInstance();if(h&&h.proxy&&!c){const p=h.proxy,f="_pStores"in p?p._pStores:p._pStores={};f[n]=d}}return d}return s.$id=n,s}function ior(e,t){return Array.isArray(t)?t.reduce((r,n)=>(r[n]=function(){return e(this.$pinia)[n]},r),{}):Object.keys(t).reduce((r,n)=>(r[n]=function(){const i=e(this.$pinia),o=t[n];return typeof o=="function"?o.call(this,i):i[o]},r),{})}const oor=nor("main",{state:()=>({userProfile:{token:""}}),getters:{userToken(e){return e.userProfile.token}},actions:{setUserToken(e){this.userProfile.token=e}}}),aor=(e,t)=>{let r,n,i,o,s,l;t.style.left="",t.style.top="",t.addEventListener("mousedown",u=>{u.preventDefault(),r=t.offsetLeft,n=t.offsetTop,i=u.clientX,o=u.clientY,t.addEventListener("mousemove",c,!1),document.addEventListener("mouseup",()=>{t.removeEventListener("mousemove",c,!1)},!1)},!1);function c(u){u.preventDefault(),s=r-(i-u.clientX),l=n-(o-u.clientY),t.style.left=`${s}px`,t.style.top=`${l}px`}},sor=e=>{let t={lng:0,lat:0},r;return e.type==="Polygon"?r=e.coordinates[0]:r=e.coordinates,e.type!=="Point"?(r.map(n=>{t.lng+=parseFloat(n[0]),t.lat+=parseFloat(n[1])}),t.lng=t.lng/r.length,t.lat=t.lat/r.length):(t.lng+=parseFloat(r[0]),t.lat+=parseFloat(r[1])),t},sSe=(e,t)=>{const r=[];let n=e.organs?e.organs:e.ftus;const i=n?n.filter((o,s)=>n.findIndex(l=>l.label===o.label)===s):void 0;return i&&i.forEach(o=>{const s={label:o.label,models:o.models,key:`${t}.${o.label}`},l=sSe(o,s.key);l.length>0&&(s.children=l),r.push(s)}),r},lor=function(){return{destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0}},cor={name:"FlatmapVuer",components:{Button:l3,Col:Rh,Loading:G_t,Radio:c7e,RadioGroup:u7e,Row:c3,Select:$T,Dialog:Gxt,MapSvgIcon:HP,MapSvgSpriteColor:dX,Tooltip:wK,TreeControls:F7e,SelectionsGroup:B7e,SvgLegends:D7e,ElIconWarningFilled:kme,ElIconArrowDown:F5,ElIconArrowLeft:Sme},beforeCreate:function(){this.mapManager=void 0,this.mapImp=void 0,this.setStateRequired=!1},setup(e){return{annotator:a.markRaw(new Yir(`${e.flatmapAPI}annotator`))}},methods:{initialiseDrawing:function(){this.inDrawing=!1,this.initialiseDialog(),this.activeDrawTool=void 0,this.createdEvent=void 0},cancelDrawnFeature:function(){this.createdEvent&&(this.closePopup(),this.annotationEntry={...this.createdEvent.feature,resourceId:this.serverURL},this.rollbackAnnotationEvent(),this.initialiseDrawing())},displayConnectedFeatureTooltip:function(e){if(this.mapImp){const t=this.mapImp.featureProperties(e);this.checkAndCreatePopups({feature:t})}},confirmDrawnFeature:function(){this.createdEvent&&(this.checkAndCreatePopups(this.createdEvent),Object.keys(this.connectionEntry).length>0&&(this.annotationEntry.feature.connection=this.connectionEntry),this.initialiseDrawing())},initialiseDialog:function(){this.connectionDisplay=!1,this.connectionEntry={}},connectionDialogPopup:function(){!this.$el.querySelector(".drawConnection").classList.contains("inactive")&&!this.inDrawing&&(this.closePopup(),this.connectionDisplay=!this.connectionDisplay)},drawingEvent:function(e){if(this.closePopup(),this.drawnTypes.includes(e)&&!this.activeDrawMode&&!this.connectionDisplay){if(e==="Point"){const t=this.$el.querySelector(".mapbox-gl-draw_point");this.$el.querySelector(".mapbox-gl-draw_point").click(),this.activeDrawTool=t.classList.contains("active")?"Point":void 0}else if(e==="LineString"){const t=this.$el.querySelector(".mapbox-gl-draw_line");this.$el.querySelector(".mapbox-gl-draw_line").click(),this.activeDrawTool=t.classList.contains("active")?"LineString":void 0}else if(e==="Polygon"){const t=this.$el.querySelector(".mapbox-gl-draw_polygon");this.$el.querySelector(".mapbox-gl-draw_polygon").click(),this.activeDrawTool=t.classList.contains("active")?"Polygon":void 0}}else this.drawModes.includes(e)&&!this.activeDrawTool&&(e==="Delete"?(this.currentDrawnFeature&&(!this.activeDrawMode||this.activeDrawMode==="Edit")&&(this.doubleClickedFeature=!1,this.changeAnnotationDrawMode({mode:"simple_select",options:{featureIds:[this.currentDrawnFeature.id]}}),this.deleteOrEditAnnotationFeature()),this.activeDrawMode=this.activeDrawMode==="Delete"?void 0:"Delete",this.activeDrawMode||(this.currentDrawnFeature=void 0)):e==="Edit"&&(this.activeDrawMode=this.activeDrawMode==="Edit"?void 0:"Edit"))},changeAnnotationDrawMode:function(e){this.mapImp&&this.mapImp.changeAnnotationDrawMode(e)},clearAnnotationFeature:function(){this.mapImp&&this.drawnAnnotationFeatures&&this.drawnAnnotationFeatures.length>0&&this.mapImp.clearAnnotationFeature()},deleteOrEditAnnotationFeature:function(){this.mapImp&&this.mapImp.removeAnnotationFeature()},rollbackAnnotationEvent:function(){this.mapImp&&this.drawnAnnotationEvent.includes(this.annotationEntry.type)&&this.mapImp.rollbackAnnotationEvent(this.annotationEntry)},commitAnnotationEvent:function(e){this.mapImp&&this.drawnAnnotationEvent.includes(this.annotationEntry.type)&&e&&(this.annotationSubmitted=!0,this.mapImp.commitAnnotationEvent(this.annotationEntry),this.annotationEntry.type==="deleted"?this.closePopup():this.addAnnotationFeature())},setFeatureAnnotated:function(){this.mapImp&&this.annotator.annotatedItemIds(this.userToken,this.serverURL).then(e=>{"resource"in e&&(e=e.items);for(const t of e)this.mapImp.setFeatureAnnotated(t)}).catch(e=>{console.log(e)})},addAnnotationFeature:function(){this.mapImp&&(this.annotationSubmitted||this.clearAnnotationFeature(),this.drawnType!=="None"&&(this.annotationSubmitted||(this.loading=!0),this.annotator.drawnFeatures(this.userToken,this.serverURL).then(e=>{if("resource"in e&&(e=e.features),this.drawnType!=="All tools"&&(e=e.filter(t=>t.geometry.type===this.drawnType)),this.drawnAnnotationFeatures=e,this.loading=!1,!this.annotationSubmitted)for(const t of e)this.annotatedType!=="Anyone"?this.annotator.itemAnnotations(this.userToken,this.serverURL,t.id).then(r=>{let n=r.filter(i=>i.creator.name===this.userInformation.name&&i.creator.email===this.userInformation.email).length>0;(this.annotatedType==="Me"&&n||this.annotatedType==="Others"&&!n)&&this.mapImp.addAnnotationFeature(t)}).catch(r=>{console.log(r)}):this.mapImp.addAnnotationFeature(t)}).catch(e=>{console.log(e)})))},showAnnotator:function(e){this.mapImp&&(this.mapImp.showAnnotator(e),this.$el.querySelector(".maplibregl-ctrl-group").style.display="none")},setDrawnType:function(e){this.drawnType=e,this.mapImp&&this.addAnnotationFeature()},setAnnotatedType:function(e){this.annotatedType=e,this.mapImp&&this.addAnnotationFeature()},setFlightPath3D:function(e){this.flightPath3DRadio=e,this.mapImp&&this.mapImp.enableFlightPaths(e)},viewLatestMap:function(){let e=this.biologicalSex?this.biologicalSex:void 0;this.entry==="NCBITaxon:9606"&&(e="PATO:0000384");const t={entry:this.entry,biologicalSex:e,viewport:this.mapImp.getState()};this.$emit("view-latest-map",t)},backgroundChangeCallback:function(e){this.currentBackground=e,this.mapImp&&this.mapImp.setBackgroundColour(this.currentBackground,1)},processSystems:function(e){if(this.systems.length=0,e&&e.length>0){const t={label:"All",key:"All",children:[]};e.forEach(r=>{const n={colour:r.colour,enabled:r.enabled,label:r.id,key:r.id},i=sSe(r,n.key);i.length>0&&(n.children=i),t.children.push(n)}),this.systems.push(t)}},processTaxon:function(e,t){this.taxonConnectivity.length=0,t.forEach(r=>{z7e(e,r).then(n=>{const i={taxon:r,label:n};this.taxonConnectivity.push(i)})})},toggleDrawer:function(){this.drawerOpen=!this.drawerOpen},setColour:function(e){this.colourRadio=e,this.mapImp&&this.mapImp.setColour({colour:e,outline:this.outlinesRadio})},setOutlines:function(e){this.outlineRadio=e,this.mapImp&&this.mapImp.setColour({colour:this.colourRadio,outline:e})},resetView:function(){this.mapImp&&(this.mapImp.resetMap(),this.$refs.centrelinesSelection&&this.$refs.centrelinesSelection.reset(),this.$refs.skcanSelection&&this.$refs.skcanSelection.reset(),this.$refs.layersSelection&&this.$refs.layersSelection.reset(),this.$refs.systemsSelection&&this.$refs.pathwaysSelection.reset(),this.$refs.pathwaysSelection&&this.$refs.pathwaysSelection.reset())},zoomIn:function(){this.mapImp&&this.mapImp.zoomIn()},zoomOut:function(){this.mapImp&&this.mapImp.zoomOut()},centreLinesSelected:function(e){this.mapImp&&this.mapImp.enableCentrelines(e.value)},sckanSelected:function(e){this.mapImp&&this.mapImp.enableSckanPath(e.key,e.value)},checkAllSCKAN:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableSckanPath(t,e.value))},highlightConnectedPaths:function(e){if(this.mapImp){let t=[...this.mapImp.pathModelNodes(e)].map(n=>this.mapImp.featureProperties(n)),r=[];t.forEach(n=>{this.mapImp.nodePathModels(n.featureId).forEach(i=>{r.push(i)})}),this.mapImp.zoomToFeatures(r,{noZoomIn:!0})}},systemSelected:function(e){this.mapImp&&this.mapImp.enableSystem(e.key,e.value)},checkAllSystems:function(e){this.mapImp&&this.systems[0].children.forEach(t=>this.mapImp.enableSystem(t.label,e))},ftuSelected:function(e){this.searchAndShowResult(e,!0)},layersSelected:function(e){this.mapImp&&this.mapImp.enableLayer(e.key,e.value)},checkAllLayers:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableLayer(t,e.value))},taxonsSelected:function(e){this.mapImp&&this.mapImp.enableConnectivityByTaxonIds(e.key,e.value)},checkAllTaxons:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableConnectivityByTaxonIds(t,e.value))},pathwaysSelected:function(e){this.mapImp&&this.mapImp.enablePath(e.key,e.value)},checkAllPathways:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enablePath(t,e.value))},enablePanZoomEvents:function(e){this.mapImp.enablePanZoomEvents(e)},eventCallback:function(){return(e,t,...r)=>{if(e==="annotation"){const n={feature:t,userData:r,eventType:e};if(t.type==="aborted")this.annotationSubmitted?this.annotationSubmitted=!1:this.rollbackAnnotationEvent();else if(t.type==="modeChanged")t.feature.mode.startsWith("draw_")?(this.initialiseDialog(),this.inDrawing=!0):t.feature.mode==="simple_select"&&this.inDrawing?this.createdEvent?this.connectionDisplay=!0:this.initialiseDrawing():t.feature.mode==="direct_select"&&(this.doubleClickedFeature=!0);else if(t.type==="selectionChanged"){if(this.currentDrawnFeature=t.feature.features.length===0?void 0:t.feature.features[0],n.feature.feature=this.currentDrawnFeature,!this.inDrawing&&(this.initialiseDialog(),this.currentDrawnFeature)){let i=this.drawnAnnotationFeatures.filter(o=>o.id===this.currentDrawnFeature.id)[0];i&&i.connection&&(this.connectionEntry=i.connection),this.drawModeEvent(n)}}else{if(t.type==="created"||t.type==="updated"){t.type==="updated"&&t.feature.action&&(t.positionUpdated=t.feature.action==="move");const i=this.mapImp.refreshAnnotationFeatureGeometry(t.feature);n.feature.feature=i}t.type==="created"?this.createdEvent=n:this.checkAndCreatePopups(n)}}else if(e!=="pan-zoom"){const n=t.label,i=[t.models],o=this.entry,s=this.biologicalSex;let l;t.taxons&&(typeof t.taxons!="object"?l=JSON.parse(t.taxons):l=t.taxons);const c={dataset:t.dataset,biologicalSex:s,taxonomy:o,resource:i,label:n,feature:t,userData:r,eventType:e,provenanceTaxonomy:l};if(e==="click"){if(this.viewingMode==="Network Discovery")this.highlightConnectedPaths([t.models]);else if(this.currentActive=t.models?t.models:"",this.inDrawing&&!this.connectionDisplay){let u=t.label?t.label:`Feature ${t.id}`;u&&this.activeDrawTool==="LineString"&&(this.connectionEntry[t.featureId]=Object.assign({label:u},Object.fromEntries(Object.entries(t).filter(([d])=>["featureId","models"].includes(d)))))}}else e==="mouseenter"&&this.viewingMode!=="Network Discovery"&&(this.currentHover=t.models?t.models:"");t&&t.type!=="marker"&&e==="click"&&this.viewingMode!=="Network Discovery"&&!this.inDrawing&&this.checkAndCreatePopups(c),this.$emit("resource-selected",c)}else this.$emit("pan-zoom-callback",t)}},dialogCssHacks:function(){this.$nextTick(()=>{const e=this.$el.querySelector(".connection-dialog");aor(this.$el,e);let t,r;const n=this.$el.getBoundingClientRect(),i=e.getBoundingClientRect();this.dialogPosition.x>n.width/2?t=this.dialogPosition.x-i.width:t=this.dialogPosition.x,this.dialogPosition.y>n.height/2?r=this.dialogPosition.y-i.height:r=this.dialogPosition.y,e.style.transform=`translate(${t-this.dialogPosition.offsetX}px, ${r-this.dialogPosition.offsetY}px)`})},drawIconCssHacks:function(){(this.$el.querySelector(".iconSelected")||!this.connectionDisplay)&&(this.drawnTypes.map(e=>{const t=this.$el.querySelector(`.draw${e}`);t&&(t.classList.remove("iconSelected"),t.classList.remove("inactive"))}),this.drawModes.map(e=>{this.$el.querySelector(`.draw${e}`).classList.remove("iconSelected"),this.$el.querySelector(`.draw${e}`).classList.remove("inactive")})),this.activeDrawTool?(this.$el.querySelector(`.draw${this.activeDrawTool}`).classList.add("iconSelected"),this.drawModes.map(e=>{this.$el.querySelector(`.draw${e}`).classList.add("inactive")})):(this.activeDrawMode||this.connectionDisplay)&&(this.activeDrawMode&&this.$el.querySelector(`.draw${this.activeDrawMode}`).classList.add("iconSelected"),this.drawnTypes.map(e=>{const t=this.$el.querySelector(`.draw${e}`);t&&t.classList.add("inactive")}))},drawModeEvent:function(e){this.activeDrawMode&&(this.doubleClickedFeature?(e.feature.feature.geometry.type!=="Point"&&(this.changeAnnotationDrawMode({mode:"direct_select",options:{featureId:e.feature.feature.id}}),this.deleteOrEditAnnotationFeature()),this.doubleClickedFeature=!1):this.activeDrawMode==="Delete"&&(this.changeAnnotationDrawMode({mode:"simple_select",options:{featureIds:[e.feature.feature.id]}}),this.deleteOrEditAnnotationFeature()))},createConnectivityBody:function(){if(Object.keys(this.connectionEntry).length>0){const e=Object.values(this.connectionEntry),t={type:"connectivity",source:e[0],target:e[e.length-1],intermediates:e.slice(1,-1)};this.annotationEntry.body=t}},checkAndCreatePopups:async function(e){if(this.viewingMode==="Annotation")e.feature?(this.annotationEntry={...e.feature,resourceId:this.serverURL},e.feature.featureId&&e.feature.models?this.displayTooltip(e.feature.models):e.feature.feature&&(this.inDrawing||this.activeDrawMode?(this.annotationSubmitted=!1,this.annotationEntry.featureId=e.feature.feature.id,this.createConnectivityBody(),this.displayTooltip(e.feature.feature.id,sor(e.feature.feature.geometry))):e.feature.type==="updated"&&this.rollbackAnnotationEvent(),(e.feature.type==="updated"||e.feature.type==="deleted")&&this.initialiseDialog())):this.annotation={};else{let t=await this.flatmapQueries.retrieveFlatmapKnowledgeForEvent(e);(t[0]||t[1]||e.feature.hyperlinks&&e.feature.hyperlinks.length>0)&&(this.resourceForTooltip=e.resource[0],e.resourceForTooltip=this.resourceForTooltip,this.createTooltipFromNeuronCuration(e))}},popUpCssHacks:function(){let e=document.querySelector(".flatmap-tooltip-popup");e&&(e.style.display="none"),document.querySelector(".maplibregl-popup-close-button").style.display="block",this.$refs.tooltip.$el.style.display="flex",document.querySelector(".maplibregl-popup-close-button").onclick=()=>{e&&(e.style.display="block")}},closePopup:function(){let e=document.querySelector(".maplibregl-popup-close-button");e&&e.click()},closeTooltip:function(){this.$refs.tooltip.$el.style.display="none",document.querySelectorAll(".maplibregl-popup").forEach(e=>{e.style.display="none"})},createTooltipFromNeuronCuration:async function(e){this.tooltipEntry=await this.flatmapQueries.createTooltipData(e),this.displayTooltip(e.resource[0])},showPopup:function(e,t,r){let n=r;this.mapImp&&(n?n.className||(n.className="custom-popup"):n={className:"custom-popup",positionAtLastClick:!0},this.mapImp.showPopup(e,t,n))},showMarkerPopup:function(e,t,r){this.mapImp&&this.mapImp.showMarkerPopup(e,t,r)},closeMinimap:function(){let e=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");this.minimapSmall?(e.classList.add("enlarge"),e.classList.remove("shrink")):(e.classList.add("shrink"),e.classList.remove("enlarge")),this.minimapSmall=!this.minimapSmall},addResizeButtonToMinimap:function(){let e=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");e&&(this.$refs.minimapResize&&this.$refs.minimapResize.$el.parentNode&&this.$refs.minimapResize.$el.parentNode.removeChild(this.$refs.minimapResize.$el),e.appendChild(this.$refs.minimapResize.$el),this.minimapResizeShow=!0)},setHelpMode:function(e){e?(this.inHelp=!0,this.hoverVisibilities.forEach(t=>{t.value=!0}),this.openFlatmapHelpPopup()):(this.inHelp=!1,this.hoverVisibilities.forEach(t=>{t.value=!1}),this.closeFlatmapHelpPopup())},showToolitip:function(e){this.inHelp||(clearTimeout(this.tooltipWait[e]),this.tooltipWait[e]=setTimeout(()=>{this.hoverVisibilities[e].value=!0},500))},hideToolitip:function(e){this.inHelp||(clearTimeout(this.tooltipWait[e]),this.tooltipWait[e]=setTimeout(()=>{this.hoverVisibilities[e].value=!1},500))},displayTooltip:function(e,t=void 0){this.tooltipDisplay=!0;let r,n={className:"flatmapvuer-popover"};t?(r=e,n.annotationFeatureGeometry=t):(r=this.mapImp.modelFeatureIds(e)[0],this.inDrawing||(n.positionAtLastClick=!0)),this.disableUI||this.$nextTick(()=>{this.mapImp.showPopup(r,this.$refs.tooltip.$el,n),this.popUpCssHacks()})},openFlatmapHelpPopup:function(){if(this.mapImp){let e=this.mapImp.modelFeatureIds("UBERON:0000948");e&&e.length>0&&this.mapImp.showPopup(e[0],"Click for more information",{anchor:"top",className:"flatmap-popup-popper"})}},closeFlatmapHelpPopup:function(){this.$el.querySelectorAll(".maplibregl-popup-close-button").forEach(e=>{e.click()})},getLabels:function(){let e=[];if(this.mapImp){let t=this.mapImp.annotations;for(let r of t.values())r.label&&e.push(r.label);return Array.from(new Set(e))}},getState:function(){if(this.mapImp){let e={entry:this.entry,viewport:this.mapImp.getState()};const t=this.mapImp.getIdentifier();return this.biologicalSex?e.biologicalSex=this.biologicalSex:t&&t.biologicalSex&&(e.biologicalSex=t.biologicalSex),t&&t.uuid&&(e.uuid=t.uuid),e}},setState:function(e){e&&(this.mapImp&&e.entry&&this.entry==e.entry&&(!e.biologicalSex||e.biologicalSex===this.biologicalSex)?e.viewport&&this.mapImp.setState(e.viewport):this.createFlatmap(e),this.setStateRequired=!1)},restoreMapState:function(e){e&&(e.viewport&&this.mapImp.setState(e.viewport),e.searchTerm&&this.searchAndShowResult(e.searchTerm,!0))},setFlightPathInfo:function(e){(e===1.6||e>1.6)&&(this.displayFlightPathOption=!0,this.setFlightPath3D(!1))},createFlatmap:function(e){if(!this.mapImp&&!this.loading){this.loading=!0;let t=!1;this.displayMinimap&&(t={position:"top-right"});let r={taxon:this.entry};this.uuid&&(r.uuid=this.uuid),e?e.uuid?r={uuid:e.uuid}:e.entry&&(r.taxon=e.entry,e.biologicalSex?r.biologicalSex=e.biologicalSex:r.taxon==="NCBITaxon:9606"&&(r.biologicalSex="PATO:0000384")):this.biologicalSex&&(r.biologicalSex=this.biologicalSex),this.mapManager.loadMap(r,this.$refs.display,this.eventCallback(),{minZoom:this.minZoom,tooltips:this.tooltips,minimap:t}).then(n=>{this.mapImp=n,this.serverURL=this.mapImp.makeServerUrl("").slice(0,-1);let i=this.mapImp.details.version;this.setFlightPathInfo(i),this.onFlatmapReady(),this._stateToBeSet?this.restoreMapState(this._stateToBeSet):this.restoreMapState(e)})}else e&&(this._stateToBeSet={viewport:e.viewport,searchTerm:e.searchTerm},this.mapImp&&!this.loading&&this.restoreMapState(this._stateToBeSet))},computePathControlsMaximumHeight(){const e=this.$refs.display;if(e){const t=getComputedStyle(e),r=parseInt(t.paddingTop)+parseInt(t.paddingBottom),n=e.clientHeight-r;this.pathwaysMaxHeight=n-170}},mapResize:function(){try{this.computePathControlsMaximumHeight(),this.mapImp&&(this.mapImp.resize(),this.showMinimap(this.displayMinimap),this.mapImp._minimap&&this.mapImp._minimap._miniMap.resize())}catch{console.error("Map resize error")}},onFlatmapReady:function(){this.sensor=new gLt(this.$refs.display,this.mapResize),this.mapImp.options&&this.mapImp.options.style==="functional"&&(this.isFC=!0),this.mapImp.setBackgroundOpacity(1),this.backgroundChangeCallback(this.currentBackground),this.pathways=this.mapImp.pathTypes(),this.mapImp.enableCentrelines(!1),this.processSystems(this.mapImp.getSystems()),this.processTaxon(this.flatmapAPI,this.mapImp.taxonIdentifiers),this.addResizeButtonToMinimap(),this.loading=!1,this.computePathControlsMaximumHeight(),this.drawerOpen=!0,this.mapResize(),this.$emit("ready",this)},showMinimap:function(e){this.mapImp&&this.mapImp.showMinimap(e)},showPathwaysDrawer:function(e){this.drawerOpen=e},searchAndShowResult:function(e,t){if(this.mapImp){if(e===void 0||e==="")return this.mapImp.clearSearchResults(),!0;{const r=this.mapImp.search(e);if(r&&r.results&&r.results.length>0){if(this.mapImp.showSearchResults(r),t&&r.results[0].featureId&&r.results[0].text){const n=this.mapImp.annotation(r.results[0].featureId);this.mapImp.showPopup(r.results[0].featureId,n.label,{className:"custom-popup",positionAtLastClick:!1,preserveSelection:!0})}return!0}else this.mapImp.clearSearchResults()}}return!1},searchSuggestions:function(e){return this.mapImp?this.mapImp.search(e):[]}},props:{entry:{type:String,required:!0},uuid:String,biologicalSex:{type:String,default:""},minZoom:{type:Number,default:4},tooltips:{type:Boolean,default:!0},helpMode:{type:Boolean,default:!1},renderAtMounted:{type:Boolean,default:!0},displayMinimap:{type:Boolean,default:!1},displayWarning:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array,default:function(){return[{display:"Open AC Map",key:"AC"},{display:"Open FC Map",key:"FC"},{display:"Open 3D Human Map",key:"3D"}]}},showStarInLegend:{type:Boolean,default:!1},isLegacy:{type:Boolean,default:!1},displayLatestChanges:{type:Boolean,default:!1},state:{type:Object,default:void 0},flatmapAPI:{type:String,default:"https://mapcore-demo.org/current/flatmap/v3/"},sparcAPI:{type:String,default:"https://api.sparc.science/"},disableUI:{type:Boolean,default:!1}},provide(){return{flatmapAPI:this.flatmapAPI,sparcAPI:this.sparcAPI,$annotator:this.annotator,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},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1},{value:!1}],yellowstar:fLt,isFC:!1,inHelp:!1,currentBackground:"white",availableBackground:["white","lightskyblue","black"],loading:!1,flatmapMarker:hLt,tooltipEntry:lor(),connectivityTooltipVisible:!1,drawerOpen:!1,flightPath3DRadio:!1,displayFlightPathOption:!1,colourRadio:!0,outlinesRadio:!0,minimapResizeShow:!1,minimapSmall:!1,currentActive:"",currentDrawnFeature: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,drawnAnnotationEvent:["created","updated","deleted"],createdEvent:void 0,annotationSubmitted:!1,inDrawing:!1,connectionDisplay:!1,connectionEntry:{},drawnAnnotationFeatures:void 0,doubleClickedFeature:!1,activeDrawMode:void 0,drawModes:["Delete","Edit"],dialogPosition:{offsetX:0,offsetY:0,x:void 0,y:void 0}}},computed:{...ior(oor,["userToken"]),connection:function(){return Object.keys(this.connectionEntry).length>0}},watch:{entry:function(){this.state||this.createFlatmap()},helpMode:function(e,t){e!==t&&this.setHelpMode(val)},state:{handler:function(e,t){e!==t&&(this.mapManager?this.setState(e):this.setStateRequired=!0)},immediate:!0,deep:!0},activeDrawTool:function(){this.drawIconCssHacks()},activeDrawMode:function(){this.drawIconCssHacks()},connection:function(e){const t=this.$el.querySelector(".drawConnection");e?t.classList.remove("inactive"):(this.connectionDisplay=!1,t.classList.add("inactive"))},connectionDisplay:function(e){const t=this.$el.querySelector(".drawConnection");e?(t.classList.add("iconSelected"),this.dialogCssHacks()):t.classList.remove("iconSelected"),this.drawIconCssHacks()},dialogPosition:{handler:function(){const e=this.$el.getBoundingClientRect();this.dialogPosition.offsetX=e.x,this.dialogPosition.offsetY=e.y},deep:!0,once:!0},viewingMode:function(e){e==="Annotation"?(this.$el.querySelector(".maplibregl-canvas").addEventListener("click",t=>{t.preventDefault(),this.dialogPosition.x=t.clientX,this.dialogPosition.y=t.clientY,this.activeDrawTool==="Point"&&this.dialogCssHacks()},!1),this.loading=!0,this.annotator.authenticate(this.userToken).then(t=>{t.name&&t.email&&(this.showAnnotator(!0),this.userInformation=t,this.setFeatureAnnotated(),this.drawnAnnotationFeatures||this.addAnnotationFeature()),this.loading=!1})):this.showAnnotator(!1)},disableUI:function(e){e&&this.closeTooltip()}},mounted:function(){this.openMapRef=a.shallowRef(this.$refs.openMapRef),this.backgroundIconRef=a.shallowRef(this.$refs.backgroundIconRef),this.tooltipWait=[],this.tooltipWait.length=this.hoverVisibilities.length,this.mapManager=new tSe(this.flatmapAPI),this.flatmapQueries=new pLt,this.flatmapQueries.initialise(this.flatmapAPI),this.state?this.setStateRequired&&this.setState(this.state):this.renderAtMounted&&this.createFlatmap()}},x3=e=>(a.pushScopeId("data-v-41674482"),e=e(),a.popScopeId(),e),uor={class:"flatmap-container",ref:"flatmapContainer","element-loading-text":"Loading...","element-loading-background":"rgba(0, 0, 0, 0.3)"},dor={style:{height:"100%",width:"100%",position:"relative","overflow-y":"none"}},hor={style:{height:"100%",width:"100%"},ref:"display"},por={class:"beta-popovers"},mor=x3(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1)),gor=x3(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1)),yor=x3(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1)),Tor=x3(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1)),vor=x3(()=>a.createElementVNode("span",{class:"warning-text"},"Legacy Map",-1)),bor={key:1,class:"warning-text"},Qor=x3(()=>a.createElementVNode("span",{class:"warning-text"},"What's new?",-1)),xor=x3(()=>a.createElementVNode("b",null,"Network discovery mode",-1)),_or=x3(()=>a.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)),wor=x3(()=>a.createElementVNode("b",null,"Now can display up to 6 panes",-1)),Lor=x3(()=>a.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)),Sor={class:"bottom-draw-control"},Mor={class:"bottom-right-control"},kor=x3(()=>a.createElementVNode("div",null,[a.createTextVNode(" Fit to "),a.createElementVNode("br"),a.createTextVNode(" window ")],-1)),Cor=["innerHTML"],Eor=["innerHTML"],Aor=["onClick"];function Oor(e,t,r,n,i,o){const s=a.resolveComponent("map-svg-sprite-color"),l=kme,c=Fl,u=QI,d=F5,h=a.resolveComponent("map-svg-icon"),p=D7e,f=F7e,m=B7e,g=Sme,T=l3,y=c3,v=Rh,_=bI,b=$T,L=c7e,w=u7e,M=wK,C=$_t,A=C7e,O=MI;return a.withDirectives((a.openBlock(),a.createElementBlock("div",uor,[a.createVNode(s),a.createElementVNode("div",dor,[a.createElementVNode("div",hor,null,512),a.withDirectives(a.createElementVNode("div",por,[a.createElementVNode("div",null,[a.createVNode(u,{placement:"right","popper-class":"warning-popper flatmap-popper",teleported:!1,visible:e.hoverVisibilities[6].value,ref:"warningPopover"},{reference:a.withCtx(()=>[r.displayWarning?(a.openBlock(),a.createElementBlock("div",{key:0,class:"warning-icon",onMouseover:t[7]||(t[7]=V=>o.showToolitip(6)),onMouseout:t[8]||(t[8]=V=>o.hideToolitip(6))},[a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(l)]),_:1}),r.isLegacy?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[vor,a.createElementVNode("div",{class:"latest-map-text",onClick:t[6]||(t[6]=(...V)=>o.viewLatestMap&&o.viewLatestMap(...V))}," Click here for the latest map ")],64)):(a.openBlock(),a.createElementBlock("span",bor,"Beta"))],32)):a.createCommentVNode("",!0)]),default:a.withCtx(()=>[r.isLegacy?(a.openBlock(),a.createElementBlock("p",{key:0,onMouseover:t[0]||(t[0]=V=>o.showToolitip(6)),onMouseout:t[1]||(t[1]=V=>o.hideToolitip(6))}," This is a legacy map, you may view the latest map instead. ",32)):e.isFC?(a.openBlock(),a.createElementBlock("p",{key:1,onMouseover:t[2]||(t[2]=V=>o.showToolitip(6)),onMouseout:t[3]||(t[3]=V=>o.hideToolitip(6))},[a.createTextVNode(" This map displays the connectivity of individual neurons. Specifically, those which align with (parts of) the neuron populations from the "),mor,a.createTextVNode(" models available in "),gor,a.createTextVNode(". ")],32)):(a.openBlock(),a.createElementBlock("p",{key:2,onMouseover:t[4]||(t[4]=V=>o.showToolitip(6)),onMouseout:t[5]||(t[5]=V=>o.hideToolitip(6))},[a.createTextVNode(" This map displays the connectivity of neuron populations. Specifically, those from the primarily rat-based "),yor,a.createTextVNode(" models available in "),Tor,a.createTextVNode(". New connectivity and species specificity will be added as the SPARC program progresses. ")],32))]),_:1},8,["visible"])]),r.displayLatestChanges?(a.openBlock(),a.createBlock(u,{key:0,placement:"right",teleported:!1,trigger:"manual","popper-class":"warning-popper flatmap-popper",visible:e.hoverVisibilities[7].value},{reference:a.withCtx(()=>[r.displayLatestChanges?(a.openBlock(),a.createElementBlock("div",{key:0,class:"latest-changesicon",onMouseover:t[9]||(t[9]=V=>o.showToolitip(7)),onMouseout:t[10]||(t[10]=V=>o.hideToolitip(7))},[a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(l)]),_:1}),Qor],32)):a.createCommentVNode("",!0)]),default:a.withCtx(()=>[xor,_or,wor,Lor]),_:1},8,["visible"])):a.createCommentVNode("",!0)],512),[[a.vShow,!r.disableUI]]),a.withDirectives(a.createVNode(c,{class:a.normalizeClass(["minimap-resize",{enlarge:e.minimapSmall,shrink:!e.minimapSmall}]),ref:"minimapResize",onClick:o.closeMinimap},{default:a.withCtx(()=>[a.createVNode(d)]),_:1},8,["class","onClick"]),[[a.vShow,e.minimapResizeShow]]),a.withDirectives(a.createElementVNode("div",Sor,[a.createVNode(u,{content:"Draw Connection",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:e.hoverVisibilities[10].value},{reference:a.withCtx(()=>[a.createVNode(h,{icon:"connection",class:"icon-button drawConnection inactive",onClick:o.connectionDialogPopup,onMouseover:t[11]||(t[11]=V=>o.showToolitip(10)),onMouseout:t[12]||(t[12]=V=>o.hideToolitip(10))},null,8,["onClick"])]),_:1},8,["visible"]),e.drawnType!=="LineString"&&e.drawnType!=="Polygon"?(a.openBlock(),a.createBlock(u,{key:0,content:"Draw Point",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:e.hoverVisibilities[11].value},{reference:a.withCtx(()=>[a.createVNode(h,{icon:"drawPoint",class:"icon-button drawPoint",onClick:t[13]||(t[13]=V=>o.drawingEvent("Point")),onMouseover:t[14]||(t[14]=V=>o.showToolitip(11)),onMouseout:t[15]||(t[15]=V=>o.hideToolitip(11))})]),_:1},8,["visible"])):a.createCommentVNode("",!0),e.drawnType!=="Point"&&e.drawnType!=="Polygon"?(a.openBlock(),a.createBlock(u,{key:1,content:"Draw Line",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:e.hoverVisibilities[12].value},{reference:a.withCtx(()=>[a.createVNode(h,{icon:"drawLine",class:"icon-button drawLineString",onClick:t[16]||(t[16]=V=>o.drawingEvent("LineString")),onMouseover:t[17]||(t[17]=V=>o.showToolitip(12)),onMouseout:t[18]||(t[18]=V=>o.hideToolitip(12))})]),_:1},8,["visible"])):a.createCommentVNode("",!0),e.drawnType!=="Point"&&e.drawnType!=="LineString"?(a.openBlock(),a.createBlock(u,{key:2,content:"Draw Polygon",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:e.hoverVisibilities[13].value},{reference:a.withCtx(()=>[a.createVNode(h,{icon:"drawPolygon",class:"icon-button drawPolygon",onClick:t[19]||(t[19]=V=>o.drawingEvent("Polygon")),onMouseover:t[20]||(t[20]=V=>o.showToolitip(13)),onMouseout:t[21]||(t[21]=V=>o.hideToolitip(13))})]),_:1},8,["visible"])):a.createCommentVNode("",!0),a.createVNode(u,{content:"Delete",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:e.hoverVisibilities[14].value},{reference:a.withCtx(()=>[a.createVNode(h,{icon:"drawTrash",class:"icon-button drawDelete",onClick:t[22]||(t[22]=V=>o.drawingEvent("Delete")),onMouseover:t[23]||(t[23]=V=>o.showToolitip(14)),onMouseout:t[24]||(t[24]=V=>o.hideToolitip(14))})]),_:1},8,["visible"]),a.createVNode(u,{content:"Edit",placement:"top",teleported:!1,trigger:"manual",width:"80","popper-class":"flatmap-popper",visible:e.hoverVisibilities[15].value},{reference:a.withCtx(()=>[a.createVNode(h,{icon:"comment",class:"icon-button drawEdit",onClick:t[25]||(t[25]=V=>o.drawingEvent("Edit")),onMouseover:t[26]||(t[26]=V=>o.showToolitip(15)),onMouseout:t[27]||(t[27]=V=>o.hideToolitip(15))})]),_:1},8,["visible"])],512),[[a.vShow,e.viewingMode==="Annotation"&&e.userInformation&&!r.disableUI]]),a.withDirectives(a.createElementVNode("div",Mor,[a.createVNode(u,{content:"Zoom in",placement:"left",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[0].value},{reference:a.withCtx(()=>[a.createVNode(h,{icon:"zoomIn",class:"icon-button zoomIn",onClick:t[28]||(t[28]=V=>o.zoomIn()),onMouseover:t[29]||(t[29]=V=>o.showToolitip(0)),onMouseout:t[30]||(t[30]=V=>o.hideToolitip(0))})]),_:1},8,["visible"]),a.createVNode(u,{content:"Zoom out",placement:"top-end",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[1].value},{reference:a.withCtx(()=>[a.createVNode(h,{icon:"zoomOut",class:"icon-button zoomOut",onClick:t[31]||(t[31]=V=>o.zoomOut()),onMouseover:t[32]||(t[32]=V=>o.showToolitip(1)),onMouseout:t[33]||(t[33]=V=>o.hideToolitip(1))})]),_:1},8,["visible"]),a.createVNode(u,{content:"Reset",placement:"top",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[2].value},{reference:a.withCtx(()=>[a.createVNode(h,{icon:"fitWindow",class:"icon-button fitWindow",onClick:t[34]||(t[34]=V=>o.resetView()),onMouseover:t[35]||(t[35]=V=>o.showToolitip(2)),onMouseout:t[36]||(t[36]=V=>o.hideToolitip(2))})]),default:a.withCtx(()=>[kor]),_:1},8,["visible"])],512),[[a.vShow,!r.disableUI]]),a.createVNode(u,{content:"Change pathway visibility",placement:"right",teleported:!1,trigger:"manual","popper-class":"flatmap-popper",visible:e.hoverVisibilities[4].value,ref:"checkBoxPopover"},{reference:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{class:a.normalizeClass(["pathway-location",{open:e.drawerOpen,close:!e.drawerOpen}])},[a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["pathway-container",{open:e.drawerOpen,close:!e.drawerOpen}]),style:a.normalizeStyle({"max-height":e.pathwaysMaxHeight+"px"})},[e.isFC?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(p,{key:0,class:"svg-legends-container"})),a.createVNode(u,{content:"Location of the featured dataset",placement:"right",teleported:!1,trigger:"hover","popper-class":"flatmap-popper popper-bump-right",visible:e.hoverVisibilities[9].value,ref:"featuredMarkerPopover"},{reference:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{class:"yellow-star-legend",innerHTML:e.yellowstar},null,8,Cor),[[a.vShow,r.showStarInLegend],[A,void 0,"featuredMarkerPopover"]])]),_:1},8,["visible"]),a.createVNode(u,{content:"Find these markers for data",placement:"right",teleported:!1,trigger:"manual","popper-class":"flatmap-popper popper-bump-right",visible:e.hoverVisibilities[5].value,ref:"markerPopover"},{reference:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{class:"flatmap-marker-help",innerHTML:e.flatmapMarker},null,8,Eor),[[a.vShow,e.hoverVisibilities[5].value],[A,void 0,"markerPopover"]])]),_:1},8,["visible"]),e.isFC&&e.systems&&e.systems.length>0?(a.openBlock(),a.createBlock(f,{key:1,active:e.currentActive,hover:e.currentHover,"tree-data":e.systems,ref:"treeControls",onChanged:o.systemSelected,onCheckAll:o.checkAllSystems,onChangeActive:o.ftuSelected},null,8,["active","hover","tree-data","onChanged","onCheckAll","onChangeActive"])):a.createCommentVNode("",!0),!e.isFC&&e.centreLines&&e.centreLines.length>0?(a.openBlock(),a.createBlock(m,{title:"Nerves",labelKey:"label",identifierKey:"key",selections:e.centreLines,onChanged:o.centreLinesSelected,ref:"centrelinesSelection",key:"centrelinesSelection"},null,8,["selections","onChanged"])):a.createCommentVNode("",!0),!e.isFC&&e.taxonConnectivity&&e.taxonConnectivity.length>0?(a.openBlock(),a.createBlock(m,{title:"Observed in",labelKey:"label",identifierKey:"taxon",selections:e.taxonConnectivity,onChanged:o.taxonsSelected,onCheckAll:o.checkAllTaxons,ref:"taxonSelection",key:"taxonSelection"},null,8,["selections","onChanged","onCheckAll"])):a.createCommentVNode("",!0),e.pathways&&e.pathways.length>0?(a.openBlock(),a.createBlock(m,{title:"Pathways",labelKey:"label",identifierKey:"type",colourStyle:"line",selections:e.pathways,onChanged:o.pathwaysSelected,onCheckAll:o.checkAllPathways,ref:"pathwaysSelection",key:"pathwaysSelection"},null,8,["selections","onChanged","onCheckAll"])):a.createCommentVNode("",!0)],6)),[[A,void 0,"checkBoxPopover"]]),a.createElementVNode("div",{onClick:t[37]||(t[37]=(...V)=>o.toggleDrawer&&o.toggleDrawer(...V)),class:a.normalizeClass(["drawer-button",{open:e.drawerOpen,close:!e.drawerOpen}])},[a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(g)]),_:1})],2)],2),[[a.vShow,!r.disableUI]])]),_:1},8,["visible"]),e.openMapRef?(a.openBlock(),a.createBlock(u,{key:0,ref:"open-map-popover","virtual-ref":e.openMapRef,placement:"top-start",width:"136",teleported:!1,trigger:"click","popper-class":"open-map-popper non-selectable","virtual-triggering":""},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.openMapOptions,V=>(a.openBlock(),a.createBlock(y,{key:V.key},{default:a.withCtx(()=>[a.createVNode(T,{type:"primary",plain:"",onClick:H=>e.$emit("open-map",V.key)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(V.display),1)]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1},8,["virtual-ref"])):a.createCommentVNode("",!0),a.createVNode(u,{ref:"backgroundPopover","virtual-ref":e.backgroundIconRef,placement:"top-start",width:"200",teleported:!1,trigger:"click","popper-class":"background-popper h-auto","virtual-triggering":""},{default:a.withCtx(()=>[a.createElementVNode("div",null,[a.createVNode(y,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Viewing Mode")]),_:1}),a.createVNode(y,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(b,{teleported:!1,modelValue:e.viewingMode,"onUpdate:modelValue":t[38]||(t[38]=V=>e.viewingMode=V),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.viewingModes,(V,H)=>(a.openBlock(),a.createBlock(_,{key:V+H,label:V,value:V},{default:a.withCtx(()=>[a.createVNode(y,null,{default:a.withCtx(()=>[a.createVNode(v,{span:12},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(V),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e.viewingMode==="Annotation"&&e.userInformation?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createVNode(y,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Drawn By*")]),_:1}),a.createVNode(y,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(b,{teleported:!1,modelValue:e.drawnType,"onUpdate:modelValue":t[39]||(t[39]=V=>e.drawnType=V),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown",onChange:o.setDrawnType},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.drawnTypes,V=>(a.openBlock(),a.createBlock(_,{key:V,label:V,value:V},{default:a.withCtx(()=>[a.createVNode(y,null,{default:a.withCtx(()=>[a.createVNode(v,{span:12},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(V),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),a.createVNode(y,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Annotated By*")]),_:1}),a.createVNode(y,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(b,{teleported:!1,modelValue:e.annotatedType,"onUpdate:modelValue":t[40]||(t[40]=V=>e.annotatedType=V),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown",onChange:o.setAnnotatedType},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.annotatedTypes,V=>(a.openBlock(),a.createBlock(_,{key:V,label:V,value:V},{default:a.withCtx(()=>[a.createVNode(y,null,{default:a.withCtx(()=>[a.createVNode(v,{span:12},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(V),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1})],64)):a.createCommentVNode("",!0),e.displayFlightPathOption?(a.openBlock(),a.createBlock(y,{key:1,class:"backgroundSpacer"})):a.createCommentVNode("",!0),e.displayFlightPathOption?(a.openBlock(),a.createBlock(y,{key:2,class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Flight path display")]),_:1})):a.createCommentVNode("",!0),e.displayFlightPathOption?(a.openBlock(),a.createBlock(y,{key:3,class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(w,{modelValue:e.flightPath3DRadio,"onUpdate:modelValue":t[41]||(t[41]=V=>e.flightPath3DRadio=V),class:"flatmap-radio",onChange:o.setFlightPath3D},{default:a.withCtx(()=>[a.createVNode(L,{label:!1},{default:a.withCtx(()=>[a.createTextVNode("2D")]),_:1}),a.createVNode(L,{label:!0},{default:a.withCtx(()=>[a.createTextVNode("3D")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1})):a.createCommentVNode("",!0),a.createVNode(y,{class:"backgroundSpacer"}),a.createVNode(y,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Organs display")]),_:1}),a.createVNode(y,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(w,{modelValue:e.colourRadio,"onUpdate:modelValue":t[42]||(t[42]=V=>e.colourRadio=V),class:"flatmap-radio",onChange:o.setColour},{default:a.withCtx(()=>[a.createVNode(L,{label:!0},{default:a.withCtx(()=>[a.createTextVNode("Colour")]),_:1}),a.createVNode(L,{label:!1},{default:a.withCtx(()=>[a.createTextVNode("Greyscale")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),a.createVNode(y,{class:"backgroundSpacer"}),a.createVNode(y,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Outlines display")]),_:1}),a.createVNode(y,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(w,{modelValue:e.outlinesRadio,"onUpdate:modelValue":t[43]||(t[43]=V=>e.outlinesRadio=V),class:"flatmap-radio",onChange:o.setOutlines},{default:a.withCtx(()=>[a.createVNode(L,{label:!0},{default:a.withCtx(()=>[a.createTextVNode("Show")]),_:1}),a.createVNode(L,{label:!1},{default:a.withCtx(()=>[a.createTextVNode("Hide")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),a.createVNode(y,{class:"backgroundSpacer"}),a.createVNode(y,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Change background")]),_:1}),a.createVNode(y,{class:"backgroundControl"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.availableBackground,V=>(a.openBlock(),a.createElementBlock("div",{key:V,class:a.normalizeClass(["backgroundChoice",V,V==e.currentBackground?"active":""]),onClick:H=>o.backgroundChangeCallback(V)},null,10,Aor))),128))]),_:1})])]),_:1},8,["virtual-ref"]),a.withDirectives(a.createElementVNode("div",{class:a.normalizeClass(["settings-group",{open:e.drawerOpen,close:!e.drawerOpen}])},[a.createVNode(y,null,{default:a.withCtx(()=>[a.createVNode(u,{visible:e.hoverVisibilities[8].value,content:"Open new map",placement:"right",teleported:!1,"popper-class":"flatmap-popper"},{reference:a.withCtx(()=>[r.enableOpenMapUI&&r.openMapOptions.length>0?(a.openBlock(),a.createBlock(h,{key:0,ref:"openMapRef",icon:"openMap",class:"icon-button open-map-button",onMouseover:t[44]||(t[44]=V=>o.showToolitip(8)),onMouseout:t[45]||(t[45]=V=>o.hideToolitip(8))},null,512)):a.createCommentVNode("",!0)]),_:1},8,["visible"])]),_:1}),a.createVNode(y,null,{default:a.withCtx(()=>[a.createVNode(u,{content:"Change settings",placement:"right",visible:e.hoverVisibilities[3].value,teleported:!1,trigger:"manual","popper-class":"flatmap-popper"},{reference:a.withCtx(()=>[a.createVNode(h,{ref:"backgroundIconRef",icon:"changeBckgd",class:"icon-button",onMouseover:t[46]||(t[46]=V=>o.showToolitip(3)),onMouseout:t[47]||(t[47]=V=>o.hideToolitip(3))},null,512)]),_:1},8,["visible"])]),_:1})],2),[[a.vShow,!r.disableUI]]),a.withDirectives(a.createVNode(M,{ref:"tooltip",class:"tooltip",annotationEntry:e.annotationEntry,entry:e.tooltipEntry,annotationDisplay:e.viewingMode==="Annotation",onAnnotation:o.commitAnnotationEvent},null,8,["annotationEntry","entry","annotationDisplay","onAnnotation"]),[[a.vShow,e.tooltipDisplay]]),a.withDirectives(a.createVNode(C,{class:"connection-dialog",entry:e.connectionEntry,drawing:e.inDrawing,connection:o.connection,onDisplay:o.connectionDialogPopup,onConfirm:o.confirmDrawnFeature,onCancel:o.cancelDrawnFeature,onPopup:o.closePopup,onTooltip:o.displayConnectedFeatureTooltip},null,8,["entry","drawing","connection","onDisplay","onConfirm","onCancel","onPopup","onTooltip"]),[[a.vShow,e.connectionDisplay]])])])),[[O,e.loading]])}const Qre=Nh(cor,[["render",Oor],["__scopeId","data-v-41674482"]]),lSe={"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"},Por={name:"MultiFlatmapVuer",components:{Col:Rh,Row:c3,Option:bI,Select:$T,Popover:QI,FlatmapVuer:Qre},beforeMount(){this._resolveList=[],this._initialised=!1},mounted:function(){this.initialise(),kI.on("onActionClick",e=>{this.resourceSelected(e)})},methods:{initialise:function(){return new Promise(e=>{this.requireInitialisation?(this.requireInitialisation=!1,fetch(this.flatmapAPI).then(t=>t.json()).then(t=>{Object.keys(this.availableSpecies).forEach(n=>{const i=this.availableSpecies[n].uuid;if(i&&t.map(o=>o.uuid).indexOf(i)>0)this.speciesList[n]=a.reactive(this.availableSpecies[n]);else for(let o=0;o<t.length;o++)if(this.availableSpecies[n].taxo===t[o].taxon)if(this.availableSpecies[n].biologicalSex){if(t[o].biologicalSex&&t[o].biologicalSex===this.availableSpecies[n].biologicalSex){this.speciesList[n]=a.reactive(this.availableSpecies[n]);break}}else{this.speciesList[n]=a.reactive(this.availableSpecies[n]);break}});let r=this.initial;if(this.state){const n=this.state.state;(!n||!n.uuid&&!n.entry)&&this.state.species?r=this.state.species:r=void 0}r&&(r&&this.speciesList[r]!==void 0?this.activeSpecies=r:this.activeSpecies=Object.keys(this.speciesList)[0],this.setSpecies(this.activeSpecies,this.state?this.state.state:void 0,5)),this._initialised=!0,e(),this._resolveList.forEach(n=>{n()})})):this._initialised?e():this._resolveList.push(e)})},resourceSelected:function(e){this.$emit("resource-selected",e)},FlatmapReady:function(e){this.$emit("ready",e)},getCurrentFlatmap:function(){return this.$refs[this.activeSpecies][0]},panZoomCallback:function(e){this.$emit("pan-zoom-callback",e)},showPopup:function(e,t,r){this.getCurrentFlatmap().showPopup(e,t,r)},showMarkerPopup:function(e,t,r){this.getCurrentFlatmap().showMarkerPopup(e,t,r)},setSpecies:function(e,t,r){if(this.$refs&&e in this.$refs)this.activeSpecies=e,this.$refs[this.activeSpecies][0].createFlatmap(t),this.$emit("flatmapChanged",this.activeSpecies);else if(r){const n=r-1;n>=0&&this.$nextTick(()=>{this.setSpecies(e,t,n)})}},viewLatestMap:function(e){const t=Object.keys(this.speciesList);for(let r=0;r<t.length;r++){const n=this.speciesList[t[r]];if(!n.isLegacy&&n.taxo===e.entry&&n.biologicalSex===e.biologicalSex){this.setSpecies(t[r],e,0);return}}},createLegacyEntry:function(e,t,r){if(r&&t){let n="Legacy";return e.species&&(e.species.slice(0,6)==="Legacy"?n=e.species:n=n+` ${e.species}`),this.speciesList[n]=a.reactive({taxo:t,isLegacy:!0,displayWarning:!0}),{species:n,state:{entry:t,uuid:r,viewport:e.state.viewport,searchTerm:e.state.searchTerm}}}},updateState:function(e){return new Promise(t=>{if(e&&e.state){const r=e.state;if(r.uuid){if(r.entry)return new Promise(()=>{const n=new tSe(this.flatmapAPI),i={taxon:r.entry};r.biologicalSex&&(i.biologicalSex=r.biologicalSex),n.findMap_(i).then(o=>{if(o.uuid!==r.uuid)return this.createLegacyEntry(e,r.entry,r.uuid)}).then(o=>{t(o||e)}).catch(()=>{t(e)})})}else if(r.entry){const n=r.entry in lSe?lSe[r.entry]:void 0,i=this.createLegacyEntry(e,r.entry,n);t(i||e)}}t(e)})},getState:function(){let e={species:this.activeSpecies,state:void 0},t=this.getCurrentFlatmap();return e.state=t.getState(),e},setState:function(e){e&&this.updateState(e).then(t=>{this.initialise().then(()=>{t.species&&t.species!==this.activeSpecies?this.setSpecies(t.species,t.state,5):t.state&&this.getCurrentFlatmap().setState(t.state)})})}},props:{initial:{type:String,default:""},minZoom:{type:Number,default:4},renderAtMounted:{type:Boolean,default:!1},helpMode:{type:Boolean,default:!1},displayMinimap:{type:Boolean,default:!1},showStarInLegend:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array},availableSpecies:{type:Object,default:function(){return{"Human Female":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000383",iconClass:"mapicon-icon_human",displayWarning:!0},"Human Male":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000384",iconClass:"mapicon-icon_human",displayWarning:!0},Rat:{taxo:"NCBITaxon:10114",iconClass:"mapicon-icon_rat",displayLatestChanges:!0},Mouse:{taxo:"NCBITaxon:10090",iconClass:"mapicon-icon_mouse",displayWarning:!0},Pig:{taxo:"NCBITaxon:9823",iconClass:"mapicon-icon_pig",displayWarning:!0},Cat:{taxo:"NCBITaxon:9685",iconClass:"mapicon-icon_cat",displayWarning:!0}}}},state:{type:Object,default:void 0},flatmapAPI:{type:String,default:"https://mapcore-demo.org/current/flatmap/v3/"},sparcAPI:{type:String,default:"https://api.sparc.science/"},disableUI:{type:Boolean,default:!1}},data:function(){return{activeSpecies:void 0,speciesList:{},requireInitialisation:!0}},watch:{state:{handler:function(e){this.setState(e)},immediate:!0,deep:!0}}},Ior=e=>(a.pushScopeId("data-v-5550e1f2"),e=e(),a.popScopeId(),e),Hor={class:"multi-container",ref:"multiContainer"},Vor={key:0,style:{position:"absolute","z-index":"10"}},Ror=Ior(()=>a.createElementVNode("div",{class:"species-display-text"},"Species",-1)),Nor={class:"select-box-icon"};function Bor(e,t,r,n,i,o){const s=bI,l=$T,c=QI,u=Qre;return a.openBlock(),a.createElementBlock("div",Hor,[r.disableUI?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",Vor,[Ror,a.createVNode(c,{content:"Select a species",placement:"right",trigger:"manual","popper-class":"flatmap-popper right-popper",visible:r.helpMode,teleported:!1,ref:"selectPopover"},{reference:a.withCtx(()=>[a.createVNode(l,{id:"flatmap-select",teleported:!1,modelValue:e.activeSpecies,"onUpdate:modelValue":t[0]||(t[0]=d=>e.activeSpecies=d),placeholder:"Select",class:"select-box","popper-class":"flatmap-dropdown",onChange:o.setSpecies},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.speciesList,(d,h)=>(a.openBlock(),a.createBlock(s,{key:h,label:h,value:h},{default:a.withCtx(()=>[a.createElementVNode("span",Nor,[a.createElementVNode("i",{class:a.normalizeClass(d.iconClass)},null,2)]),a.createTextVNode(" "+a.toDisplayString(h),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible"])])),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.speciesList,(d,h)=>a.withDirectives((a.openBlock(),a.createBlock(u,{key:h,entry:d.taxo,uuid:d.uuid,biologicalSex:d.biologicalSex,displayWarning:d.displayWarning,displayLatestChanges:d.displayLatestChanges,isLegacy:d.isLegacy,ref_for:!0,ref:h,enableOpenMapUI:r.enableOpenMapUI,openMapOptions:r.openMapOptions,disableUI:r.disableUI,onViewLatestMap:o.viewLatestMap,onResourceSelected:o.resourceSelected,onReady:o.FlatmapReady,onPanZoomCallback:o.panZoomCallback,onOpenMap:t[1]||(t[1]=p=>e.$emit("open-map",p)),minZoom:r.minZoom,helpMode:r.helpMode,renderAtMounted:r.renderAtMounted,displayMinimap:r.displayMinimap,showStarInLegend:r.showStarInLegend,style:{height:"100%"},flatmapAPI:r.flatmapAPI,sparcAPI:r.sparcAPI},null,8,["entry","uuid","biologicalSex","displayWarning","displayLatestChanges","isLegacy","enableOpenMapUI","openMapOptions","disableUI","onViewLatestMap","onResourceSelected","onReady","onPanZoomCallback","minZoom","helpMode","renderAtMounted","displayMinimap","showStarInLegend","flatmapAPI","sparcAPI"])),[[a.vShow,e.activeSpecies==h]])),128))],512)}const For=Nh(Por,[["render",Bor],["__scopeId","data-v-5550e1f2"]]),ZM=[{id:"ilxtr:neuron-type-keast-13",centrelines:["n_71"]},{id:"ilxtr:neuron-type-keast-2",centrelines:["bladder_n"]},{id:"ilxtr:neuron-type-keast-3",centrelines:["bladder_n","hypogastric_n"]},{id:"ilxtr:neuron-type-keast-15",centrelines:["n_73"]},{id:"ilxtr:neuron-type-keast-1",centrelines:["bladder_n"]},{id:"ilxtr:neuron-type-keast-7",centrelines:["L1_ventral_root_ramus","L1_spinal_n-1","lumbar_splanchnic_n","L2_spinal_n","L2_ventral_root_ramus"]},{id:"ilxtr:neuron-type-keast-9",centrelines:["L6_spinal_n-1","L6_ventral_root","pudendal_n","L5_spinal_n","L5_ventral_root"]},{id:"ilxtr:neuron-type-keast-10",centrelines:["S1_dorsal_root","S1_spinal_n-2","pelvic_splanchnic_n","L6_spinal_n-2","L6_dorsal_root","bladder_n"]},{id:"ilxtr:neuron-type-keast-11",centrelines:["lumbar_splanchnic_n","L2_spinal_n","L1_spinal_n-1","hypogastric_n","bladder_n","L1_dorsal_root","L2_dorsal_root"]},{id:"ilxtr:neuron-type-keast-12",centrelines:["L6_spinal_n-1","L6_dorsal_root","pudendal_n","S1_spinal_n-1","S1_dorsal_root"]},{id:"ilxtr:neuron-type-keast-8",centrelines:["L1_ventral_root_paravertebral_ganglion","L1-L2_interganglionic_segment","sympathetic_trunk_T13-L1","L2_ventral_root_paravertebral_ganglion","sympathetic_trunk_L2-L3","sympathetic_trunk_L4-L5","sympathetic_trunk_L3-L4","sympathetic_trunk_L5-L6","sympathetic_trunk_T12-T13"]},{id:"ilxtr:neuron-type-keast-20",centrelines:["T1_T2_cns","C8_T1_cns","T2_T3_cns","T10_T11_cns","T9_T10_cns","T11_T12_cns","T8_T9_cns","C7_C8_cns","C6_C7_cns","C4_C5_cns","C3_C4_cns","C5_C6_cns","medulla_C1_cns","pons_medulla_cns","C1_C2_cns","T5_T6_cns","T4_T5_cns","T6_T7_cns","L3_L4_cns","L2_L3_cns","L4_L5_cns","L5_L6_cns","T13_L1_cns","T12_T13_cns","L1_L2_cns","T3_T4_cns","n_69","C2_C3_cns","T7_T8_cns"]},{id:"ilxtr:neuron-type-keast-16",centrelines:["n_74"]},{id:"ilxtr:neuron-type-keast-4",centrelines:["sympathetic_trunk_L6-S1","L6_gray_ramus-spinal_n","sympathetic_trunk_L5-L6","S1_gray_ramus-spinal_n","S1_spinal_n-2","pelvic_splanchnic_n","L6_spinal_n-2","L1-L2_interganglionic_segment","sympathetic_trunk_T13-L1","sympathetic_trunk_L2-L3","bladder_n","sympathetic_trunk_L4-L5","sympathetic_trunk_L3-L4","sympathetic_trunk_T12-T13"]},{id:"ilxtr:neuron-type-keast-17",centrelines:["n_75"]},{id:"ilxtr:neuron-type-keast-5",centrelines:["S1_ventral_root","S1_spinal_n-2","pelvic_splanchnic_n","L6_spinal_n-2","L6_ventral_root"]},{id:"ilxtr:neuron-type-keast-18",centrelines:["n_70"]},{id:"ilxtr:neuron-type-keast-6",centrelines:["L1_ventral_root_ramus","L1_spinal_n-1","lumbar_splanchnic_n","L2_spinal_n","hypogastric_n","L2_ventral_root_ramus"]},{id:"ilxtr:neuron-type-keast-19",centrelines:["n_69"]},{id:"ilxtr:neuron-type-keast-14",centrelines:["n_72"]}];function yb(e,t,r,n,i){let o={};if(o.dataset=r,o.scaffold=n,o.simulations=i,t?o.title=t:o.title=e,o.description="",o.actions=[],e)switch(e){case"ICN":o.title="RNA",o.description="The distribution of neurons in the intrinsic cardiac nervous system (ICN) were mapped and visualized in a 3D reconstruction of a male rat heart.",o.actions={search:{title:"Explore data",resource:"icn",type:"Search",label:"ICN",filter:{facet:"genotype",term:"heart"}},plot:{title:"View plot",label:"ICN",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/ISAN/csv-data/use-case-4/RNA_Seq.csv",type:"Plot",plotType:"heatmap",datasetTitle:"Molecular Phenotype Distribution of Single Rat Intracardiac Neurons",datasetDescription:"Images collected from serial cryostat sectioning of a cryopreserved heart was used to reconstruct the 3D context. Transcriptional profiles taken from isolated single neurons and mapped back into the previously generated 3D context.",datasetUrl:"https://discover.pennsieve.io/datasets/29",datasetImage:"https://assets.discover.pennsieve.io/dataset-assets/29/6/revisions/1/banner.jpg"}};break}else o.actions=[];return o}function Dor(e,t,r,n,i){if(e||t){let o={};switch(e){case"UBERON:0001157":o.title="Colon",o.description="",o.actions={search:{title:"Explore data",label:"Colon",resource:"https://sparc.science/data?type=dataset&q=colon",type:"Search",filter:{facet:"genotype",term:"colon"}},scaffold:{title:"View 3D scaffold",label:"Colon",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Colon/human/humanColon_metadata.json",type:"Scaffold"}};break;case"UBERON:0000948":case"UBERON:0002080":o.title="Heart",o.description="",o.actions={search:{title:"Explore data",label:"Heart",resource:"https://sparc.science/data?type=dataset&q=colon",type:"Search",filter:{facet:"genotype",term:"heart"}},scaffold:{title:"View 3D scaffold",label:"Heart",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Heart/human/humanHeart_metadata.json",type:"Scaffold"}};break;case"UBERON:0002048":o.title="Lung",o.description="",o.actions={search:{title:"Explore data",label:"Lung",resource:"https://sparc.science/data?type=dataset&q=lung",type:"Search"},scaffold:{title:"View 3D scaffold",label:"Lung",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Lungs/human/humanLeftLung_metadata.json",type:"Scaffold"}};break;default:o=yb(e,t,r,n,i);break}return o}}function zor(e,t,r,n,i){if(e||t){let o={};switch(e){case"UBERON:0000948":case"UBERON:0002080":i?o=yb(e,t,r,n,i):(o.title="Heart",o.description="",o.actions={search:{title:"Explore data",label:"Heart",resource:"https://sparc.science/data?type=dataset&q=heart",type:"Search",filter:{facet:"genotype",term:"heart"}},scaffold:{title:"View 3D scaffold",label:"Heart",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Heart/rat/ratHeart_metadata.json",type:"Scaffold"},simulation:{title:"Explore simulations",label:"Heart",resource:"https://sparc.science/data?type=simulation&q=heart",type:"URL"}});break;case"UBERON:0001156":o.title="Colon",o.description="",o.actions={search:{title:"Explore data",label:"Colon",resource:"https://sparc.science/data?type=dataset&q=colon",type:"Search"}};break;case"UBERON:0002108":o.title="Small intestines",o.description="",o.actions={search:{title:"Explore data",label:"Colon",resource:"https://sparc.science/data?type=dataset&q=small+intestines",type:"Search"}};break;case"UBERON:0001255":o.title="Urinary bladder",o.description="",o.actions={search:{title:"Explore data",label:"Urinary Bladder",resource:"https://sparc.science/data?type=dataset&q=bladder",type:"Search"},scaffold:{title:"View 3D scaffold",label:"Bladder",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Bladder/rat/ratBladder_metadata.json",type:"Scaffold"}};break;case"UBERON:0002048":o.title="Lung",o.description="",o.actions={search:{title:"Explore data",label:"Lung",resource:"https://sparc.science/data?type=dataset&q=lung",type:"Search"}};break;case"ICN":o.title="RNA",o.description="The distribution of neurons in the intrinsic cardiac nervous system (ICN) were mapped and visualized in a 3D reconstruction of a male rat heart.",o.actions={search:{title:"Explore data",resource:"icn",type:"Search"},plot:{title:"View plot",label:"ICN",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/ISAN/csv-data/use-case-4/RNA_Seq.csv",type:"Plot",plotType:"heatmap",datasetTitle:"Molecular Phenotype Distribution of Single Rat Intracardiac Neurons",datasetDescription:"Images collected from serial cryostat sectioning of a cryopreserved heart was used to reconstruct the 3D context. Transcriptional profiles taken from isolated single neurons and mapped back into the previously generated 3D context.",datasetUrl:"https://discover.pennsieve.io/datasets/29",datasetImage:"https://assets.discover.pennsieve.io/dataset-assets/29/6/revisions/1/banner.jpg"}};break;case"UBERON:0000945":case"UBERON:0001160":case"UBERON:0001161":o.title="Stomach",o.description="",o.actions={search:{title:"Explore data",label:"Stomach",resource:"https://sparc.science/data?type=dataset&q=stomach",type:"Search"},scaffold:{title:"View 3D scaffold",label:"Stomach",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Stomach/rat/ratStomach_metadata.json",type:"Scaffold"}};break;case"UBERON:0001759":t?o.title=t:o.title="Vagus nerve",o.actions={search:{title:"Explore data",label:"Vagus nerve",resource:"https://sparc.science/data?type=dataset&q=vagus+nerve",type:"Search"},simulation:{title:"Explore simulations",label:"Vagus nerve",resource:"https://sparc.science/data?type=simulation&q=vagus%20nerve",type:"simulation"}};break;default:o=yb(e,t,r,n,i);break}return o}}function jor(e,t,r,n,i){if(e||t){let o={};switch(e){case"UBERON:0001156":o.title="Colon",o.description="",o.actions={search:{title:"Explore data",label:"Colon",resource:"https://sparc.science/data?type=dataset&q=colon",type:"Search"},scaffold:{title:"View 3D scaffold",label:"Colon",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Colon/mouse/mouseColon_metadata.json",type:"Scaffold"}};break;case"UBERON:0002048":o.title="Lung",o.description="",o.actions={search:{title:"Explore data",label:"Lung",resource:"https://sparc.science/data?type=dataset&q=lung",type:"Search"},scaffold:{title:"View 3D scaffold",label:"Lung",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Lungs/mouse/mouseLeftLung_metadata.json",type:"Scaffold"}};break;case"UBERON:0002108":o.title="Small intestines",o.description="",o.actions={search:{title:"Explore data",label:"Colon",resource:"https://sparc.science/data?type=dataset&q=small+intestines",type:"Search"}};break;default:o=yb(e,t,r,n,i);break}return o}}function Uor(e,t,r,n,i){if(e||t){let o={};switch(e){case"UBERON:0008972":o.title="Colon",o.description="",o.actions={search:{title:"Explore data",label:"Colon",resource:"https://sparc.science/data?type=dataset&q=colon",type:"Search"},scaffold:{title:"View 3D scaffold",label:"Colon",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Colon/pig/pigColon_metadata.json",type:"Scaffold"}};break;case"UBERON:0002108":o.title="Small intestines",o.description="",o.actions={search:{title:"Explore data",label:"Colon",resource:"https://sparc.science/data?type=dataset&q=small+intestines",type:"Search"}};break;case"UBERON:0000948":case"UBERON:0002080":o.title="Heart",o.description="",o.actions={search:{title:"Explore data",label:"Heart",resource:"https://sparc.science/data?type=dataset&q=colon",type:"Search",filter:{facet:"genotype",term:"heart"}},scaffold:{title:"View 3D scaffold",label:"Heart",resource:"https://mapcore-bucket1.s3-us-west-2.amazonaws.com/Generic+Scaffold/Heart/pig/pigHeart_metadata.json",type:"Scaffold"}};break;default:o=yb(e,t,r,n,i);break}return o}}function Gor(e,t,r,n,i,o){switch(t){case"NCBITaxon:9606":return Dor(e,r,n,i,o);case"NCBITaxon:9823":return Uor(e,r,n,i,o);case"NCBITaxon:10090":return jor(e,r,n,i,o);case"NCBITaxon:10114":return zor(e,r,n,i,o);default:return yb(e,t,r,n,i)}}function Wor(){return[{id:"UBERON:0000948",name:"Heart",type:"simulation"},{id:"UBERON:0001156",name:"Colon",type:"simulation"},{id:"UBERON:0001255",name:"Bladder",type:"simulation"},{id:"UBERON:0000945",name:"Stomach",type:"simulation"},{id:"UBERON:0001759",name:"Vagus nerve",type:"simulation"},{id:"UBERON:0002108",name:"Small intestines",type:"simulation"},{id:"UBERON:0002107",name:"Liver",type:"simulation"}]}function qor(){return Wor()}function cSe(e){if(e)for(let t=0;t<ZM.length;t++){if(ZM[t].id==e)return ZM[t].centrelines;if(ZM[t].centrelines.find(n=>n===e))return[ZM[t].id]}return[]}function Zor(e){if(e){const t=e.toLowerCase();if(t.includes("heart"))return{id:"UBERON:0000948",name:"Heart"};if(t.includes("liver"))return{id:"UBERON:0002107",name:"Liver"};if(t.includes("stomach"))return{id:"UBERON:0000945",name:"Stomach"};if(t.includes("colon"))return{id:"UBERON:0001156",name:"Colon"};if(t.includes("bladder"))return{id:"UBERON:0001255",name:"Bladder"}}}function Xor(e,t){if(e&&e.resource){let r=e.resource;Array.isArray(r)&&r[0]&&(r=r[0]);let n,i,o,s,l,c=r.taxonomy;if(r.data&&r.data.id?(n=r.data.id,i=r.data.id):r.feature&&(n=r.feature.models,i=r.feature.label,o=r.feature.dataset,s=r.feature.scaffold,l=r.feature.simulations),n||i){let u=Gor(n,c,i,o,s,l);if(u&&u.actions)return u.actions[t]}}}let xre=7,cp=5;const yB=[{id:"UBERON:0000948",name:"heart",showAtZoom:1},{id:"UBERON:0001759",name:"vagus nerve",showAtZoom:1},{id:"UBERON:0001155",name:"colon",showAtZoom:1},{id:"UBERON:0000945",name:"stomach",showAtZoom:1},{id:"UBERON:0001013",name:"adipose tissue",showAtZoom:1},{id:"UBERON:0001255",name:"urinary bladder",showAtZoom:1},{id:"UBERON:0001348",name:"brown adipose tissue",showAtZoom:6},{id:"UBERON:0002008",name:"cardiac nerve plexus",showAtZoom:1},{id:"UBERON:0002240",name:"spinal cord",showAtZoom:1},{id:"UBERON:0002005",name:"Enteric Nervous System",showAtZoom:4},{id:"UBERON:0013702",name:"body proper",showAtZoom:1},{id:"UBERON:0002298",name:"brainstem",showAtZoom:1},{id:"UBERON:0002439",name:"myenteric nerve plexus",showAtZoom:6},{id:"UBERON:0000010",name:"peripheral nervous system",showAtZoom:6},{id:"UBERON:0002048",name:"lung",showAtZoom:1},{id:"UBERON:0002410",name:"autonomic nervous system",showAtZoom:6},{id:"UBERON:0002441",name:"cervicothoracic ganglion",showAtZoom:6},{id:"UBERON:0005363",name:"inferior vagus X ganglion",showAtZoom:6},{id:"UBERON:0001264",name:"pancreas",showAtZoom:1},{id:"UBERON:0001884",name:"phrenic nerve",showAtZoom:6},{id:"UBERON:0002059",name:"submandibular ganglion",showAtZoom:7},{id:"UBERON:0001347",name:"white adipose tissue",showAtZoom:6},{id:"UBERON:0001556",name:"lower urinary tract",showAtZoom:1},{id:"UBERON:0002262",name:"celiac ganglion",showAtZoom:5},{id:"UBERON:0000955",name:"Brain",showAtZoom:1},{id:"UBERON:0000160",name:"intestine",showAtZoom:1},{id:"UBERON:0001322",name:"sciatic nerve",showAtZoom:1},{id:"UBERON:0001649",name:"glossopharyngeal nerve",showAtZoom:6},{id:"UBERON:0002063",name:"sinus venosus",showAtZoom:6},{id:"UBERON:0002107",name:"liver",showAtZoom:1},{id:"UBERON:0002113",name:"kidney",showAtZoom:1},{id:"UBERON:0002481",name:"bone tissue",showAtZoom:1},{id:"UBERON:0004907",name:"lower digestive tract",showAtZoom:4},{id:"UBERON:0000044",name:"Dorsal root ganglion",showAtZoom:5},{id:"UBERON:0001736",name:"Submandibular gland",showAtZoom:xre,keyword:!0},{id:"UBERON:0001103",name:"Diaphragm",showAtZoom:cp,keyword:!0},{id:"UBERON:0001160",name:"Fundus of stomach",showAtZoom:cp,keyword:!0},{id:"UBERON:0000955",name:"Brain",showAtZoom:cp,keyword:!0},{id:"UBERON:0003708",name:"Carotid sinus",showAtZoom:xre,keyword:!0},{id:"UBERON:0002079",name:"Left cardiac atrium",showAtZoom:cp,keyword:!0},{id:"ILX:0485722",name:"Nodose ganglion",showAtZoom:xre,keyword:!0},{id:"UBERON:0002078",name:"Right cardiac atrium",showAtZoom:cp,keyword:!0},{id:"UBERON:0002084",name:"Heart left ventricle",showAtZoom:cp,keyword:!0},{id:"UBERON:0002080",name:"Heart right ventricle",showAtZoom:cp,keyword:!0},{id:"UBERON:0001508",name:"Arch of Aorta",showAtZoom:cp,keyword:!0},{id:"UBERON:0001738",name:"Thyroid cartilage",showAtZoom:cp,keyword:!0},{id:"UBERON:0000388",name:"Epiglottis",showAtZoom:cp,keyword:!0}];function Kor(e){return e[0].toUpperCase()+e.substring(1)}const Tb={props:{entry:Object,visible:{type:Boolean,default:!0},mouseHovered:{type:Boolean,default:!1}},computed:{...u1.mapStores(IT,Y7),syncMode(){return this.splitFlowStore.syncMode}},mounted:function(){Oa.on("startHelp",()=>{this.startHelp()})},methods:{toggleSyncMode:function(){},getState:function(){},openMap:function(e){e==="SYNC"?this.toggleSyncMode():Oa.emit("OpenNewMap",e)},updateWithViewUrl:function(){},search:function(){return!1},searchSuggestions:function(){},resourceSelected:function(e,t,r){if(this.resourceHasAction(t)){Oa.emit("PopoverActionClick",t);return}let n,i="none",o=!1;const s={paneIndex:this.entry.id,type:e,resource:t,internalName:void 0,eventType:void 0};if(e=="MultiFlatmap"||e=="Flatmap")if(s.internalName=this.idNamePair[t.feature.models],t.eventType=="click")if(s.eventType="selected",t.feature.type=="marker"){let l=this.idNamePair[t.feature.models],c=yB.filter(u=>u.id===t.feature.models);this.settingsStore.isFeaturedMarkerIdentifier(t.feature.id)?n={type:"Search",term:this.settingsStore.featuredMarkerDoi(t.feature.id)}:c.filter(u=>u.keyword).length>0?n={type:"Search",term:"http://purl.obolibrary.org/obo/"+t.feature.models.replace(":","_")}:n={type:"Facet",facet:l,facetPropPath:"anatomy.organ.category.name",term:"Anatomical structure"},o=!0,e=="MultiFlatmap"&&this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults()}else t.feature.type=="feature"&&(this.syncMode?o=!0:i="scaffold");else t.eventType=="mouseenter"&&(s.eventType="highlighted",o=!0);else e=="Scaffold"&&(t&&t[0]&&(s.internalName=t[0].data.id,t[0].data.lastActionOnMarker===!0&&(n={type:"Facet",facet:Kor(t[0].data.id),facetPropPath:"anatomy.organ.category.name",term:"Anatomical structure"})),s.eventType="selected",o=!0,i="search");n===void 0&&r&&(n=Xor(s,i)),n&&Oa.emit("PopoverActionClick",n),o&&this.$emit("resource-selected",s)},resourceHasAction:function(e){return e.type==="URL"||e.type==="Search"||e.type==="Neuron Search"||e.type=="Facet"||e.type=="Facets"},isVisible:function(){return this.splitFlowStore.getPaneNameById(this.entry.id)!==void 0},displayTooltip:function(){},getNameAndIdFromSyncData:async function(e){let t=e.internalName;t===void 0&&e.resource&&(t=e.resource.label);let r;if(e.resource&&e.resource.resource&&(r=e.resource.resource[0]),this.entry.type==="Scaffold"){if(this.$refs.scaffold.findObjectsWithGroupName(t).length===0){if(e.resource&&e.resource.feature){const o=cSe(e.resource.feature.models);if(o.length>0)return o}let i=Zor(t);if(i)return i;if(r&&e.eventType==="selected")return fetch(`${this.apiLocation}get-related-terms/${r}`).then(o=>o.json()).then(o=>{if(o.uberon.array.length>0)return t=o.uberon.array[0].name.charAt(0).toUpperCase()+o.uberon.array[0].name.slice(1),r=o.uberon.array[0].id.toUpperCase(),{id:r,name:t}})}}else if(this.entry.type==="MultiFlatmap")if(t==="Bladder")t="Urinary Bladder";else{const n=cSe(t);n.length>0&&(t=n[0])}return{id:r,name:t}},getDatasetAnatomyInfo:function(e){fetch(`${this.apiLocation}dataset_info/anatomy?identifier=${e}`).then(t=>t.json()).then(t=>{const r=t.result[0];let n;try{n=r.anatomy.organ[0].curie}catch{n=void 0}let i;try{i=r.item.curie}catch{i=void 0}let o;try{let s=0,l=!1;for(;!l&&s<r.organisms.subject.length;){const c=r.organisms.subject[s];c.species&&(o=c.species.name,l=!0),s+=1}}catch{o=void 0}this.updateFeatureMarkers([n],void 0),this.settingsStore.updateFeaturedMarker({identifier:e,marker:n,doi:i,species:o})})},oldFeaturedDatasetApiHasInfo:async function(){let t=await(await fetch(`${this.apiLocation}get_featured_datasets_identifiers`)).json();return!t.identifiers||t.identifiers.length==0?!1:t.identifiers},newFeaturedDatasetApiHasInfo:async function(){let t=await(await fetch(`${this.apiLocation}get_featured_dataset`)).json();return!t.datasets||t.datasets.length==0?!1:t.datasets.map(r=>r.id)},getFeaturedDatasets:async function(){let e=[],t=await this.oldFeaturedDatasetApiHasInfo();if(t)e=t;else{let r=await this.newFeaturedDatasetApiHasInfo();r&&(e=r)}this.settingsStore.updateFeatured(e),e.forEach(r=>{this.getDatasetAnatomyInfo(r)})},zoomToFeatures:function(){},handleSyncMouseEvent:async function(e){let t=await this.getNameAndIdFromSyncData(e);e.eventType==="highlighted"?this.highlightFeatures(t):e.eventType==="selected"&&this.displayTooltip(t)},handleSyncPanZoomEvent:function(){},highlightFeatures:function(){},receiveSynchronisedEvent:async function(e){if(e.paneIndex!==this.entry.id)e.eventType=="panZoom"||this.handleSyncMouseEvent(e);else if(e.eventType=="selected"){let t=await this.getNameAndIdFromSyncData(e);this.zoomToFeatures(t,!1)}},requestSynchronisedEvent:function(){},getAvailableTerms:function(){let e=qor();for(let t=0;t<e.length;t++)this.idNamePair[e[t].id]=e[t].name;if(this.apiLocation){this._controller&&this._controller.abort(),this._controller=new AbortController;let t=this._controller.signal;fetch(`${this.apiLocation}get-organ-curies`,{signal:t}).then(r=>r.json()).then(r=>{this._controller=void 0,r.uberon.array.forEach(n=>{this.idNamePair[n.id.toUpperCase()]=n.name.charAt(0).toUpperCase()+n.name.slice(1)})})}},flatmapMarkerZoomUpdate(){},onResize:function(){},startHelp:function(){this.isInHelp===!1&&(this.helpMode=!0,window.addEventListener("mousedown",this.endHelp),this.isInHelp=!0)},endHelp:function(){window.removeEventListener("mousedown",this.endHelp),this.helpMode=!1,setTimeout(()=>{this.isInHelp=!1},200)}},data:function(){return{apiLocation:void 0,activeSpecies:"Rat",scaffoldCamera:void 0,mainStyle:{height:this.entry.datasetTitle?"calc(100% - 30px)":"100%",width:"100%",bottom:"0px"},helpMode:!1,idNamePair:{},scaffoldLoaded:!1,isInHelp:!1}},created:function(){this.flatmapAPI=void 0,this.apiLocation=void 0,this.settingsStore.flatmapAPI&&(this.flatmapAPI=this.settingsStore.flatmapAPI),this.settingsStore.sparcApi&&(this.apiLocation=this.settingsStore.sparcApi)}},Yor=(e,t,r)=>{t&&t.forEach(n=>{let i=!1;for(let o=0;o<yB.length;o++)if(yB[o].id===n){i=!0,r>=yB[o].showAtZoom&&e.addMarker(n,{className:"standard-marker"});break}i||e.addMarker(n,{className:"standard-marker"})})},uSe={computed:{...u1.mapStores(IT)},methods:{flatmapPanZoomCallback:function(e){if(this.mouseHovered){const t={paneIndex:this.entry.id,eventType:"panZoom",payload:e,type:this.entry.type};this.flatmapMarkerZoomUpdate(!1,void 0),this.$emit("resource-selected",t)}},flatmapMarkerZoomUpdate(e,t){if(!this.flatmapReady)return;let r=t;if(r||(r=this.getFlatmapImp()),r){let n=r.getZoom().zoom;if(e||this.zoomLevel!==n){this.zoomLevel=n,r.clearMarkers();let i=this.settingsStore.markers;Yor(r,i,this.zoomLevel),this.entry.type==="MultiFlatmap"&&this.restoreFeaturedMarkers(r)}}},flatmapReadyForMarkerUpdates:function(e){if(e){e.enablePanZoomEvents(!0),this.flatmapReady=!0;const t=e.mapImp;this.flatmapMarkerZoomUpdate(!0,t)}}}},Jor={name:"Flatmap",mixins:[Tb,uSe],components:{FlatmapVuer:Qre},methods:{getState:function(){return this.$refs.flatmap.getState()},search:function(e){return this.$refs.flatmap.searchAndShowResult(e)},getFlatmapImp(){return this.$refs.flatmap.mapImp},flatmaprResourceSelected:function(e,t){this.$refs.flatmap.resourceSelected(e,t,this.$refs.map.viewingMode==="Exploration")},flatmapReadyCall:function(e){let t={id:this.entry.id,prov:this.getFlatmapImp().provenance};Oa.emit("mapImpProv",t),this.$emit("flatmap-provenance-ready",t),this.getAvailableTerms(),this.entry.resource==="FunctionalConnectivity"&&this.flatmapReadyForMarkerUpdates(e)},highlightFeatures:function(e){let t=e.name;const r=this.$refs.flatmap.mapImp;if(t){const n=r.search(t);n.featureIds[0]&&r.highlightFeatures([r.modelForFeature(n.featureIds[0])])}},searchSuggestions:function(e,t){e&&this.$refs.flatmap.mapImp&&this.$refs.flatmap.mapImp.search(e).__featureIds.forEach(n=>{const i=this.$refs.flatmap.mapImp.annotation(n);i&&i.label&&t.push(i.label)})},zoomToFeatures:function(e,t){let r=e.name;const n=this.$refs.flatmap.mapImp;if(r){const i=n.search(r);if(i.featureIds.length){let o=n.modelForFeature(i.featureIds[0]);o?(t&&n.selectFeatures(o),n.zoomToFeatures(o)):n.clearSearchResults()}}else n.clearSearchResults()}},computed:{facetSpecies(){return this.settingsStore.facets.species}},mounted:function(){this.getAvailableTerms(),Oa.on("markerUpdate",()=>{this.flatmapMarkerZoomUpdate(!0,void 0)})}};function $or(e,t,r,n,i,o){const s=a.resolveComponent("FlatmapVuer");return a.openBlock(),a.createBlock(s,{state:e.entry.state,entry:e.entry.resource,onResourceSelected:t[0]||(t[0]=l=>o.flatmaprResourceSelected(e.entry.type,l)),onPanZoomCallback:e.flatmapPanZoomCallback,name:e.entry.resource,style:{height:"100%",width:"100%"},minZoom:e.entry.minZoom,helpMode:e.helpMode,pathControls:!0,ref:"flatmap",onReady:o.flatmapReadyCall,displayMinimap:!1,displayWarning:!0,enableOpenMapUI:!0,flatmapAPI:e.flatmapAPI,sparcAPI:e.apiLocation,onOpenMap:e.openMap},null,8,["state","entry","onPanZoomCallback","name","minZoom","helpMode","onReady","flatmapAPI","sparcAPI","onOpenMap"])}const ear=N1(Jor,[["render",$or],["__scopeId","data-v-1cc78d5b"]]),tar={name:"Iframe",mixins:[Tb]},rar={class:"map-iframe-container"},nar=["src"];function iar(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",rar,[a.createElementVNode("iframe",{class:"my-iframe",src:e.entry.resource.share_link},null,8,nar)])}const oar=N1(tar,[["render",iar],["__scopeId","data-v-60f8bfe1"]]),aar='<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><path d="M11.0748 3.25583C11.4141 2.42845 12.5859 2.42845 12.9252 3.25583L14.6493 7.45955C14.793 7.80979 15.1221 8.04889 15.4995 8.07727L20.0303 8.41798C20.922 8.48504 21.2841 9.59942 20.6021 10.1778L17.1369 13.1166C16.8482 13.3614 16.7225 13.7483 16.8122 14.1161L17.8882 18.5304C18.1 19.3992 17.152 20.0879 16.3912 19.618L12.5255 17.2305C12.2034 17.0316 11.7966 17.0316 11.4745 17.2305L7.60881 19.618C6.84796 20.0879 5.90001 19.3992 6.1118 18.5304L7.18785 14.1161C7.2775 13.7483 7.1518 13.3614 6.86309 13.1166L3.3979 10.1778C2.71588 9.59942 3.07796 8.48504 3.96971 8.41798L8.50046 8.07727C8.87794 8.04889 9.20704 7.80979 9.35068 7.45955L11.0748 3.25583Z" stroke="#000000" stroke-width="2"/></svg>',dSe=e=>{const t=[{display:"Open AC Map",key:"AC"},{display:"Open FC Map",key:"FC"},{display:"Open 3D Human Map",key:"3D"}];switch(e){case"Human Male":case"Human Female":case"Rat":t.push({display:"Open Sync Map",key:"SYNC"});break}return t},sar={name:"MultiFlatmap",mixins:[Tb,uSe],components:{MultiFlatmapVuer:For},data:function(){return{zoomLevel:6,flatmapReady:!1,availableSpecies:p5e(),scaffoldResource:{},showStarInLegend:!1,openMapOptions:dSe("Rat")}},methods:{toggleSyncMode:async function(){if(this.syncMode==!1){let e;this.activeSpecies==="Rat"?e={contextCard:void 0,discoverId:void 0,label:"Rat Body",resource:"https://mapcore-bucket1.s3.us-west-2.amazonaws.com/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json",title:"View 3D scaffold",layout:"2horpanel",type:"SyncMap"}:(this.activeSpecies==="Human Male"||this.activeSpecies==="Human Female")&&("human"in this.scaffoldResource||(this.scaffoldResource.human=await pX(this.apiLocation,"human")),e={contextCardUrl:this.scaffoldResource.human.datasetInfo.contextCardUrl,discoverId:this.scaffoldResource.human.datasetInfo.discoverId,s3uri:this.scaffoldResource.human.datasetInfo.s3uri,version:this.scaffoldResource.human.datasetInfo.version,label:"Human Body",resource:this.scaffoldResource.human.url,title:"View 3D scaffold",layout:"2vertpanel",type:"SyncMap",isBodyScaffold:!0}),e&&Oa.emit("SyncModeRequest",{flag:!0,action:e})}else Oa.emit("SyncModeRequest",{flag:!1})},getState:function(){if(this.flatmapReady)return this.$refs.multiflatmap.getState()},flatmapPanZoomCallback:function(e){if(this.mouseHovered){const t={paneIndex:this.entry.id,eventType:"panZoom",payload:e,type:this.entry.type};this.flatmapMarkerZoomUpdate(!1,void 0),this.$emit("resource-selected",t)}},search:function(e){return this.$refs.multiflatmap.getCurrentFlatmap().searchAndShowResult(e,!0)},searchSuggestions:function(e,t){const r=this.$refs.multiflatmap.getCurrentFlatmap();e&&r.mapImp&&r.mapImp.search(e).__featureIds.forEach(i=>{const o=r.mapImp.annotation(i);o&&o.label&&t.push(o.label)})},flatmaprResourceSelected:function(e,t){const r=this.$refs.multiflatmap.getCurrentFlatmap();this.resourceSelected(e,t,r.viewingMode==="Exploration")},handleSyncPanZoomEvent:function(e){if(!this.mouseHovered&&e.type!==this.entry.type){const t=e.payload.zoom,r=e.payload.target,n=this.$el.clientHeight,i=this.$el.clientWidth,o=Math.max(i,n);let s=i/o/t;const l=n/o/t,c=[r[0]/2+.5-s/2,.5-r[1]/2-l/2];this.$refs.multiflatmap.getCurrentFlatmap().mapImp.panZoomTo(c,[s,l]),this.flatmapMarkerZoomUpdate(!1,void 0)}},displayTooltip:function(e){if(e){let t=e.name;t?this.search(t):this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults()}},zoomToFeatures:function(e,t){let r=e.name;const n=this.$refs.multiflatmap.getCurrentFlatmap().mapImp;if(r){const i=n.search(r);i.featureIds.length>0?(t&&n.selectFeatures(i.featureIds),n.zoomToFeatures(i.featureIds)):n.clearSearchResults()}else n.clearSearchResults()},highlightFeatures:function(e){let t=e.name;const r=this.$refs.multiflatmap.getCurrentFlatmap().mapImp;if(t){const n=r.search(t);n.featureIds.length>0&&r.zoomToFeatures(n.featureIds,{noZoomIn:!0})}},updateProvCard:function(){const e=this.getFlatmapImp();if(e){let t={id:this.entry.id,prov:e.provenance};this.$emit("flatmap-provenance-ready",t)}},flatmapChanged:async function(e){this.activeSpecies=e,this.openMapOptions=dSe(e),this.$emit("species-changed",e),this.entry.state&&this.entry.state.species===this.activeSpecies||this.syncMode==!0&&await this.toggleSyncMode(),this.updateProvCard()},multiFlatmapReady:function(e){if(e){e.enablePanZoomEvents(!0),this.flatmapReady=!0;const t=e.mapImp;this.flatmapMarkerZoomUpdate(!0,t),this.updateProvCard()}},getFlatmapImp:function(){if(this.entry.type==="MultiFlatmap"&&this.flatmapReady)return this.$refs.multiflatmap.getCurrentFlatmap().mapImp},flatmapAreaSearch(){let r={type:"Facets",label:"Unused",val:this.getFlatmapImp().visibleMarkerAnatomicalIds().map(n=>this.idNamePair[n])};Oa.emit("PopoverActionClick",r)},restoreFeaturedMarkers:function(e){this.settingsStore.resetFeaturedMarkerIdentifier();const t=this.settingsStore.featuredMarkers;this.updateFeatureMarkers(t,e)},updateFeatureMarkers:function(e,t){this.showStarInLegend=!1;for(let r=0;r<e.length;++r)e[r]&&(this.settingsStore.featuredMarkerIdentifiers[r]||this.addFeaturedMarker(e[r],r,t)&&(this.showStarInLegend=!0))},addFeaturedMarker:function(e,t,r){const n=this.settingsStore.featuredMarkerSpecies[t];if(n&&!this.activeSpecies.startsWith(n))return!1;let i=r;if(i||(i=this.getFlatmapImp()),i){let o=document.createElement("div");o.innerHTML=aar;const s=i.addMarker(e,{element:o,className:"highlight-marker"});return this.settingsStore.updateFeaturedMarkerIdentifier({index:t,markerIdentifier:s}),!0}return!1}},computed:{facetSpecies(){return this.settingsStore.facets.species},featuredMarkers(){return this.settingsStore.featuredMarkers}},watch:{syncMode:function(e){this.$refs.multiflatmap.getCurrentFlatmap()&&this.$refs.multiflatmap.getCurrentFlatmap().enablePanZoomEvents(e)},featuredMarkers:function(e){this.flatmapReady&&this.updateFeatureMarkers(e,void 0)}},mounted:function(){this.getAvailableTerms(),this.getFeaturedDatasets(),Oa.on("markerUpdate",()=>{this.flatmapMarkerZoomUpdate(!0,void 0)})}};function lar(e,t,r,n,i,o){const s=a.resolveComponent("MultiFlatmapVuer");return a.openBlock(),a.createBlock(s,{availableSpecies:e.availableSpecies,onFlatmapChanged:o.flatmapChanged,onReady:o.multiFlatmapReady,state:e.entry.state,onResourceSelected:t[0]||(t[0]=l=>o.flatmaprResourceSelected(e.entry.type,l)),style:{height:"100%",width:"100%"},initial:e.entry.resource,helpMode:e.helpMode,ref:"multiflatmap",displayMinimap:!0,showStarInLegend:e.showStarInLegend,enableOpenMapUI:!0,openMapOptions:e.openMapOptions,flatmapAPI:e.flatmapAPI,sparcAPI:e.apiLocation,onPanZoomCallback:o.flatmapPanZoomCallback,onOpenMap:e.openMap},null,8,["availableSpecies","onFlatmapChanged","onReady","state","initial","helpMode","showStarInLegend","openMapOptions","flatmapAPI","sparcAPI","onPanZoomCallback","onOpenMap"])}const car=N1(sar,[["render",lar],["__scopeId","data-v-d33fb08a"]]);function uar(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var hSe={exports:{}},Zs=hSe.exports={},up,dp;function _re(){throw new Error("setTimeout has not been defined")}function wre(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?up=setTimeout:up=_re}catch{up=_re}try{typeof clearTimeout=="function"?dp=clearTimeout:dp=wre}catch{dp=wre}})();function pSe(e){if(up===setTimeout)return setTimeout(e,0);if((up===_re||!up)&&setTimeout)return up=setTimeout,setTimeout(e,0);try{return up(e,0)}catch{try{return up.call(null,e,0)}catch{return up.call(this,e,0)}}}function dar(e){if(dp===clearTimeout)return clearTimeout(e);if((dp===wre||!dp)&&clearTimeout)return dp=clearTimeout,clearTimeout(e);try{return dp(e)}catch{try{return dp.call(null,e)}catch{return dp.call(this,e)}}}var Ff=[],vb=!1,$g,TB=-1;function har(){!vb||!$g||(vb=!1,$g.length?Ff=$g.concat(Ff):TB=-1,Ff.length&&fSe())}function fSe(){if(!vb){var e=pSe(har);vb=!0;for(var t=Ff.length;t;){for($g=Ff,Ff=[];++TB<t;)$g&&$g[TB].run();TB=-1,t=Ff.length}$g=null,vb=!1,dar(e)}}Zs.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];Ff.push(new mSe(e,t)),Ff.length===1&&!vb&&pSe(fSe)};function mSe(e,t){this.fun=e,this.array=t}mSe.prototype.run=function(){this.fun.apply(null,this.array)},Zs.title="browser",Zs.browser=!0,Zs.env={},Zs.argv=[],Zs.version="",Zs.versions={};function Df(){}Zs.on=Df,Zs.addListener=Df,Zs.once=Df,Zs.off=Df,Zs.removeListener=Df,Zs.removeAllListeners=Df,Zs.emit=Df,Zs.prependListener=Df,Zs.prependOnceListener=Df,Zs.listeners=function(e){return[]},Zs.binding=function(e){throw new Error("process.binding is not supported")},Zs.cwd=function(){return"/"},Zs.chdir=function(e){throw new Error("process.chdir is not supported")},Zs.umask=function(){return 0};var par=hSe.exports;const bb=uar(par),zf=(e,t,{checkForDefaultPrevented:r=!0}={})=>n=>{const i=e==null?void 0:e(n);if(r===!1||!i)return t==null?void 0:t(n)},Qb=globalThis||void 0||self;var gSe;const Sc=typeof window<"u",far=e=>typeof e=="string",ySe=()=>{},mar=Sc&&((gSe=window==null?void 0:window.navigator)==null?void 0:gSe.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function TSe(e){return typeof e=="function"?e():a.unref(e)}function gar(e){return e}function vB(e){return a.getCurrentScope()?(a.onScopeDispose(e),!0):!1}function yar(e,t=!0){a.getCurrentInstance()?a.onMounted(e):t?e():a.nextTick(e)}function jf(e){var t;const r=TSe(e);return(t=r==null?void 0:r.$el)!=null?t:r}const bB=Sc?window:void 0;function e9(...e){let t,r,n,i;if(far(e[0])||Array.isArray(e[0])?([r,n,i]=e,t=bB):[t,r,n,i]=e,!t)return ySe;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const o=[],s=()=>{o.forEach(d=>d()),o.length=0},l=(d,h,p,f)=>(d.addEventListener(h,p,f),()=>d.removeEventListener(h,p,f)),c=a.watch(()=>[jf(t),TSe(i)],([d,h])=>{s(),d&&o.push(...r.flatMap(p=>n.map(f=>l(d,p,f,h))))},{immediate:!0,flush:"post"}),u=()=>{c(),s()};return vB(u),u}let vSe=!1;function Tar(e,t,r={}){const{window:n=bB,ignore:i=[],capture:o=!0,detectIframe:s=!1}=r;if(!n)return;mar&&!vSe&&(vSe=!0,Array.from(n.document.body.children).forEach(d=>d.addEventListener("click",ySe)));let l=!0;const c=d=>i.some(h=>{if(typeof h=="string")return Array.from(n.document.querySelectorAll(h)).some(p=>p===d.target||d.composedPath().includes(p));{const p=jf(h);return p&&(d.target===p||d.composedPath().includes(p))}}),u=[e9(n,"click",d=>{const h=jf(e);if(!(!h||h===d.target||d.composedPath().includes(h))){if(d.detail===0&&(l=!c(d)),!l){l=!0;return}t(d)}},{passive:!0,capture:o}),e9(n,"pointerdown",d=>{const h=jf(e);h&&(l=!d.composedPath().includes(h)&&!c(d))},{passive:!0}),s&&e9(n,"blur",d=>{var h;const p=jf(e);((h=n.document.activeElement)==null?void 0:h.tagName)==="IFRAME"&&!(p!=null&&p.contains(n.document.activeElement))&&t(d)})].filter(Boolean);return()=>u.forEach(d=>d())}function bSe(e,t=!1){const r=a.ref(),n=()=>r.value=!!e();return n(),yar(n,t),r}const Lre=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof Qb<"u"?Qb:typeof self<"u"?self:{},Sre="__vueuse_ssr_handlers__";Lre[Sre]=Lre[Sre]||{},Lre[Sre];var QSe=Object.getOwnPropertySymbols,bar=Object.prototype.hasOwnProperty,Qar=Object.prototype.propertyIsEnumerable,xar=(e,t)=>{var r={};for(var n in e)bar.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&QSe)for(var n of QSe(e))t.indexOf(n)<0&&Qar.call(e,n)&&(r[n]=e[n]);return r};function Uf(e,t,r={}){const n=r,{window:i=bB}=n,o=xar(n,["window"]);let s;const l=bSe(()=>i&&"ResizeObserver"in i),c=()=>{s&&(s.disconnect(),s=void 0)},u=a.watch(()=>jf(e),h=>{c(),l.value&&i&&h&&(s=new ResizeObserver(t),s.observe(h,o))},{immediate:!0,flush:"post"}),d=()=>{c(),u()};return vB(d),{isSupported:l,stop:d}}var xSe=Object.getOwnPropertySymbols,_ar=Object.prototype.hasOwnProperty,war=Object.prototype.propertyIsEnumerable,Lar=(e,t)=>{var r={};for(var n in e)_ar.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&xSe)for(var n of xSe(e))t.indexOf(n)<0&&war.call(e,n)&&(r[n]=e[n]);return r};function Sar(e,t,r={}){const n=r,{window:i=bB}=n,o=Lar(n,["window"]);let s;const l=bSe(()=>i&&"MutationObserver"in i),c=()=>{s&&(s.disconnect(),s=void 0)},u=a.watch(()=>jf(e),h=>{c(),l.value&&i&&h&&(s=new MutationObserver(t),s.observe(h,o))},{immediate:!0}),d=()=>{c(),u()};return vB(d),{isSupported:l,stop:d}}var _Se;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(_Se||(_Se={}));var Mar=Object.defineProperty,wSe=Object.getOwnPropertySymbols,kar=Object.prototype.hasOwnProperty,Car=Object.prototype.propertyIsEnumerable,LSe=(e,t,r)=>t in e?Mar(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ear=(e,t)=>{for(var r in t||(t={}))kar.call(t,r)&&LSe(e,r,t[r]);if(wSe)for(var r of wSe(t))Car.call(t,r)&&LSe(e,r,t[r]);return e};Ear({linear:gar},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const Aar=()=>Sc&&/firefox/i.test(window.navigator.userAgent);bb.env.NODE_ENV!=="production"&&Object.freeze({}),bb.env.NODE_ENV!=="production"&&Object.freeze([]);const XM=()=>{},Oar=Object.prototype.hasOwnProperty,SSe=(e,t)=>Oar.call(e,t),Gd=Array.isArray,Wd=e=>typeof e=="function",hp=e=>typeof e=="string",qd=e=>e!==null&&typeof e=="object",Par=Object.prototype.toString,Iar=e=>Par.call(e),Mre=e=>Iar(e).slice(8,-1);var MSe=typeof Qb=="object"&&Qb&&Qb.Object===Object&&Qb,Har=typeof self=="object"&&self&&self.Object===Object&&self,pp=MSe||Har||Function("return this")(),Sm=pp.Symbol,kSe=Object.prototype,Var=kSe.hasOwnProperty,Rar=kSe.toString,KM=Sm?Sm.toStringTag:void 0;function Nar(e){var t=Var.call(e,KM),r=e[KM];try{e[KM]=void 0;var n=!0}catch{}var i=Rar.call(e);return n&&(t?e[KM]=r:delete e[KM]),i}var Bar=Object.prototype,Far=Bar.toString;function Dar(e){return Far.call(e)}var zar="[object Null]",jar="[object Undefined]",CSe=Sm?Sm.toStringTag:void 0;function xb(e){return e==null?e===void 0?jar:zar:CSe&&CSe in Object(e)?Nar(e):Dar(e)}function _b(e){return e!=null&&typeof e=="object"}var Uar="[object Symbol]";function QB(e){return typeof e=="symbol"||_b(e)&&xb(e)==Uar}function Gar(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var fp=Array.isArray,War=1/0,ESe=Sm?Sm.prototype:void 0,ASe=ESe?ESe.toString:void 0;function OSe(e){if(typeof e=="string")return e;if(fp(e))return Gar(e,OSe)+"";if(QB(e))return ASe?ASe.call(e):"";var t=e+"";return t=="0"&&1/e==-War?"-0":t}var qar=/\s/;function Zar(e){for(var t=e.length;t--&&qar.test(e.charAt(t)););return t}var Xar=/^\s+/;function Kar(e){return e&&e.slice(0,Zar(e)+1).replace(Xar,"")}function wb(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var PSe=NaN,Yar=/^[-+]0x[0-9a-f]+$/i,Jar=/^0b[01]+$/i,$ar=/^0o[0-7]+$/i,esr=parseInt;function kre(e){if(typeof e=="number")return e;if(QB(e))return PSe;if(wb(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=wb(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Kar(e);var r=Jar.test(e);return r||$ar.test(e)?esr(e.slice(2),r?2:8):Yar.test(e)?PSe:+e}var ISe=1/0,tsr=17976931348623157e292;function rsr(e){if(!e)return e===0?e:0;if(e=kre(e),e===ISe||e===-ISe){var t=e<0?-1:1;return t*tsr}return e===e?e:0}function nsr(e){var t=rsr(e),r=t%1;return t===t?r?t-r:t:0}function isr(e){return e}var osr="[object AsyncFunction]",asr="[object Function]",ssr="[object GeneratorFunction]",lsr="[object Proxy]";function HSe(e){if(!wb(e))return!1;var t=xb(e);return t==asr||t==ssr||t==osr||t==lsr}var Cre=pp["__core-js_shared__"],VSe=function(){var e=/[^.]+$/.exec(Cre&&Cre.keys&&Cre.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function csr(e){return!!VSe&&VSe in e}var usr=Function.prototype,dsr=usr.toString;function t9(e){if(e!=null){try{return dsr.call(e)}catch{}try{return e+""}catch{}}return""}var hsr=/[\\^$.*+?()[\]{}|]/g,psr=/^\[object .+?Constructor\]$/,fsr=Function.prototype,msr=Object.prototype,gsr=fsr.toString,ysr=msr.hasOwnProperty,Tsr=RegExp("^"+gsr.call(ysr).replace(hsr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function vsr(e){if(!wb(e)||csr(e))return!1;var t=HSe(e)?Tsr:psr;return t.test(t9(e))}function bsr(e,t){return e==null?void 0:e[t]}function Lb(e,t){var r=bsr(e,t);return vsr(r)?r:void 0}var Ere=Lb(pp,"WeakMap");function Qsr(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}var xsr=9007199254740991,_sr=/^(?:0|[1-9]\d*)$/;function RSe(e,t){var r=typeof e;return t=t??xsr,!!t&&(r=="number"||r!="symbol"&&_sr.test(e))&&e>-1&&e%1==0&&e<t}function NSe(e,t){return e===t||e!==e&&t!==t}var wsr=9007199254740991;function Are(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=wsr}function Lsr(e){return e!=null&&Are(e.length)&&!HSe(e)}var Ssr=Object.prototype;function Msr(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ssr;return e===r}function ksr(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Csr="[object Arguments]";function BSe(e){return _b(e)&&xb(e)==Csr}var FSe=Object.prototype,Esr=FSe.hasOwnProperty,Asr=FSe.propertyIsEnumerable,DSe=BSe(function(){return arguments}())?BSe:function(e){return _b(e)&&Esr.call(e,"callee")&&!Asr.call(e,"callee")};function Osr(){return!1}var zSe=typeof Vn=="object"&&Vn&&!Vn.nodeType&&Vn,jSe=zSe&&typeof module=="object"&&module&&!module.nodeType&&module,Psr=jSe&&jSe.exports===zSe,USe=Psr?pp.Buffer:void 0,Isr=USe?USe.isBuffer:void 0,Ore=Isr||Osr,Hsr="[object Arguments]",Vsr="[object Array]",Rsr="[object Boolean]",Nsr="[object Date]",Bsr="[object Error]",Fsr="[object Function]",Dsr="[object Map]",zsr="[object Number]",jsr="[object Object]",Usr="[object RegExp]",Gsr="[object Set]",Wsr="[object String]",qsr="[object WeakMap]",Zsr="[object ArrayBuffer]",Xsr="[object DataView]",Ksr="[object Float32Array]",Ysr="[object Float64Array]",Jsr="[object Int8Array]",$sr="[object Int16Array]",elr="[object Int32Array]",tlr="[object Uint8Array]",rlr="[object Uint8ClampedArray]",nlr="[object Uint16Array]",ilr="[object Uint32Array]",Ka={};Ka[Ksr]=Ka[Ysr]=Ka[Jsr]=Ka[$sr]=Ka[elr]=Ka[tlr]=Ka[rlr]=Ka[nlr]=Ka[ilr]=!0,Ka[Hsr]=Ka[Vsr]=Ka[Zsr]=Ka[Rsr]=Ka[Xsr]=Ka[Nsr]=Ka[Bsr]=Ka[Fsr]=Ka[Dsr]=Ka[zsr]=Ka[jsr]=Ka[Usr]=Ka[Gsr]=Ka[Wsr]=Ka[qsr]=!1;function olr(e){return _b(e)&&Are(e.length)&&!!Ka[xb(e)]}function alr(e){return function(t){return e(t)}}var GSe=typeof Vn=="object"&&Vn&&!Vn.nodeType&&Vn,YM=GSe&&typeof module=="object"&&module&&!module.nodeType&&module,slr=YM&&YM.exports===GSe,Pre=slr&&MSe.process,WSe=function(){try{var e=YM&&YM.require&&YM.require("util").types;return e||Pre&&Pre.binding&&Pre.binding("util")}catch{}}(),qSe=WSe&&WSe.isTypedArray,ZSe=qSe?alr(qSe):olr,llr=Object.prototype,clr=llr.hasOwnProperty;function ulr(e,t){var r=fp(e),n=!r&&DSe(e),i=!r&&!n&&Ore(e),o=!r&&!n&&!i&&ZSe(e),s=r||n||i||o,l=s?ksr(e.length,String):[],c=l.length;for(var u in e)(t||clr.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||RSe(u,c)))&&l.push(u);return l}function dlr(e,t){return function(r){return e(t(r))}}var hlr=dlr(Object.keys,Object),plr=Object.prototype,flr=plr.hasOwnProperty;function mlr(e){if(!Msr(e))return hlr(e);var t=[];for(var r in Object(e))flr.call(e,r)&&r!="constructor"&&t.push(r);return t}function XSe(e){return Lsr(e)?ulr(e):mlr(e)}var glr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ylr=/^\w*$/;function Ire(e,t){if(fp(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||QB(e)?!0:ylr.test(e)||!glr.test(e)||t!=null&&e in Object(t)}var JM=Lb(Object,"create");function Tlr(){this.__data__=JM?JM(null):{},this.size=0}function vlr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var blr="__lodash_hash_undefined__",Qlr=Object.prototype,xlr=Qlr.hasOwnProperty;function _lr(e){var t=this.__data__;if(JM){var r=t[e];return r===blr?void 0:r}return xlr.call(t,e)?t[e]:void 0}var wlr=Object.prototype,Llr=wlr.hasOwnProperty;function Slr(e){var t=this.__data__;return JM?t[e]!==void 0:Llr.call(t,e)}var Mlr="__lodash_hash_undefined__";function klr(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=JM&&t===void 0?Mlr:t,this}function r9(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}r9.prototype.clear=Tlr,r9.prototype.delete=vlr,r9.prototype.get=_lr,r9.prototype.has=Slr,r9.prototype.set=klr;function Clr(){this.__data__=[],this.size=0}function xB(e,t){for(var r=e.length;r--;)if(NSe(e[r][0],t))return r;return-1}var Elr=Array.prototype,Alr=Elr.splice;function Olr(e){var t=this.__data__,r=xB(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Alr.call(t,r,1),--this.size,!0}function Plr(e){var t=this.__data__,r=xB(t,e);return r<0?void 0:t[r][1]}function Ilr(e){return xB(this.__data__,e)>-1}function Hlr(e,t){var r=this.__data__,n=xB(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Gf(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Gf.prototype.clear=Clr,Gf.prototype.delete=Olr,Gf.prototype.get=Plr,Gf.prototype.has=Ilr,Gf.prototype.set=Hlr;var $M=Lb(pp,"Map");function Vlr(){this.size=0,this.__data__={hash:new r9,map:new($M||Gf),string:new r9}}function Rlr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function _B(e,t){var r=e.__data__;return Rlr(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Nlr(e){var t=_B(this,e).delete(e);return this.size-=t?1:0,t}function Blr(e){return _B(this,e).get(e)}function Flr(e){return _B(this,e).has(e)}function Dlr(e,t){var r=_B(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Wf(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Wf.prototype.clear=Vlr,Wf.prototype.delete=Nlr,Wf.prototype.get=Blr,Wf.prototype.has=Flr,Wf.prototype.set=Dlr;var zlr="Expected a function";function Hre(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(zlr);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Hre.Cache||Wf),r}Hre.Cache=Wf;var jlr=500;function Ulr(e){var t=Hre(e,function(n){return r.size===jlr&&r.clear(),n}),r=t.cache;return t}var Glr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Wlr=/\\(\\)?/g,qlr=Ulr(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Glr,function(r,n,i,o){t.push(i?o.replace(Wlr,"$1"):n||r)}),t});function Zlr(e){return e==null?"":OSe(e)}function KSe(e,t){return fp(e)?e:Ire(e,t)?[e]:qlr(Zlr(e))}var Xlr=1/0;function wB(e){if(typeof e=="string"||QB(e))return e;var t=e+"";return t=="0"&&1/e==-Xlr?"-0":t}function YSe(e,t){t=KSe(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[wB(t[r++])];return r&&r==n?e:void 0}function qf(e,t,r){var n=e==null?void 0:YSe(e,t);return n===void 0?r:n}function Klr(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function JSe(){if(!arguments.length)return[];var e=arguments[0];return fp(e)?e:[e]}function Ylr(){this.__data__=new Gf,this.size=0}function Jlr(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function $lr(e){return this.__data__.get(e)}function e1r(e){return this.__data__.has(e)}var t1r=200;function r1r(e,t){var r=this.__data__;if(r instanceof Gf){var n=r.__data__;if(!$M||n.length<t1r-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Wf(n)}return r.set(e,t),this.size=r.size,this}function Zf(e){var t=this.__data__=new Gf(e);this.size=t.size}Zf.prototype.clear=Ylr,Zf.prototype.delete=Jlr,Zf.prototype.get=$lr,Zf.prototype.has=e1r,Zf.prototype.set=r1r;function n1r(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function i1r(){return[]}var o1r=Object.prototype,a1r=o1r.propertyIsEnumerable,$Se=Object.getOwnPropertySymbols,s1r=$Se?function(e){return e==null?[]:(e=Object(e),n1r($Se(e),function(t){return a1r.call(e,t)}))}:i1r;const l1r=s1r;function c1r(e,t,r){var n=t(e);return fp(e)?n:Klr(n,r(e))}function eMe(e){return c1r(e,XSe,l1r)}var Vre=Lb(pp,"DataView"),Rre=Lb(pp,"Promise"),Nre=Lb(pp,"Set"),tMe="[object Map]",u1r="[object Object]",rMe="[object Promise]",nMe="[object Set]",iMe="[object WeakMap]",oMe="[object DataView]",d1r=t9(Vre),h1r=t9($M),p1r=t9(Rre),f1r=t9(Nre),m1r=t9(Ere),n9=xb;(Vre&&n9(new Vre(new ArrayBuffer(1)))!=oMe||$M&&n9(new $M)!=tMe||Rre&&n9(Rre.resolve())!=rMe||Nre&&n9(new Nre)!=nMe||Ere&&n9(new Ere)!=iMe)&&(n9=function(e){var t=xb(e),r=t==u1r?e.constructor:void 0,n=r?t9(r):"";if(n)switch(n){case d1r:return oMe;case h1r:return tMe;case p1r:return rMe;case f1r:return nMe;case m1r:return iMe}return t});const aMe=n9;var g1r=pp.Uint8Array;const sMe=g1r;var y1r="__lodash_hash_undefined__";function T1r(e){return this.__data__.set(e,y1r),this}function v1r(e){return this.__data__.has(e)}function LB(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Wf;++t<r;)this.add(e[t])}LB.prototype.add=LB.prototype.push=T1r,LB.prototype.has=v1r;function b1r(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Q1r(e,t){return e.has(t)}var x1r=1,_1r=2;function lMe(e,t,r,n,i,o){var s=r&x1r,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var h=-1,p=!0,f=r&_1r?new LB:void 0;for(o.set(e,t),o.set(t,e);++h<l;){var m=e[h],g=t[h];if(n)var T=s?n(g,m,h,t,e,o):n(m,g,h,e,t,o);if(T!==void 0){if(T)continue;p=!1;break}if(f){if(!b1r(t,function(y,v){if(!Q1r(f,v)&&(m===y||i(m,y,r,n,o)))return f.push(v)})){p=!1;break}}else if(!(m===g||i(m,g,r,n,o))){p=!1;break}}return o.delete(e),o.delete(t),p}function w1r(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function L1r(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var S1r=1,M1r=2,k1r="[object Boolean]",C1r="[object Date]",E1r="[object Error]",A1r="[object Map]",O1r="[object Number]",P1r="[object RegExp]",I1r="[object Set]",H1r="[object String]",V1r="[object Symbol]",R1r="[object ArrayBuffer]",N1r="[object DataView]",cMe=Sm?Sm.prototype:void 0,Bre=cMe?cMe.valueOf:void 0;function B1r(e,t,r,n,i,o,s){switch(r){case N1r:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case R1r:return!(e.byteLength!=t.byteLength||!o(new sMe(e),new sMe(t)));case k1r:case C1r:case O1r:return NSe(+e,+t);case E1r:return e.name==t.name&&e.message==t.message;case P1r:case H1r:return e==t+"";case A1r:var l=w1r;case I1r:var c=n&S1r;if(l||(l=L1r),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=M1r,s.set(e,t);var d=lMe(l(e),l(t),n,i,o,s);return s.delete(e),d;case V1r:if(Bre)return Bre.call(e)==Bre.call(t)}return!1}var F1r=1,D1r=Object.prototype,z1r=D1r.hasOwnProperty;function j1r(e,t,r,n,i,o){var s=r&F1r,l=eMe(e),c=l.length,u=eMe(t),d=u.length;if(c!=d&&!s)return!1;for(var h=c;h--;){var p=l[h];if(!(s?p in t:z1r.call(t,p)))return!1}var f=o.get(e),m=o.get(t);if(f&&m)return f==t&&m==e;var g=!0;o.set(e,t),o.set(t,e);for(var T=s;++h<c;){p=l[h];var y=e[p],v=t[p];if(n)var _=s?n(v,y,p,t,e,o):n(y,v,p,e,t,o);if(!(_===void 0?y===v||i(y,v,r,n,o):_)){g=!1;break}T||(T=p=="constructor")}if(g&&!T){var b=e.constructor,L=t.constructor;b!=L&&"constructor"in e&&"constructor"in t&&!(typeof b=="function"&&b instanceof b&&typeof L=="function"&&L instanceof L)&&(g=!1)}return o.delete(e),o.delete(t),g}var U1r=1,uMe="[object Arguments]",dMe="[object Array]",SB="[object Object]",G1r=Object.prototype,hMe=G1r.hasOwnProperty;function W1r(e,t,r,n,i,o){var s=fp(e),l=fp(t),c=s?dMe:aMe(e),u=l?dMe:aMe(t);c=c==uMe?SB:c,u=u==uMe?SB:u;var d=c==SB,h=u==SB,p=c==u;if(p&&Ore(e)){if(!Ore(t))return!1;s=!0,d=!1}if(p&&!d)return o||(o=new Zf),s||ZSe(e)?lMe(e,t,r,n,i,o):B1r(e,t,c,r,n,i,o);if(!(r&U1r)){var f=d&&hMe.call(e,"__wrapped__"),m=h&&hMe.call(t,"__wrapped__");if(f||m){var g=f?e.value():e,T=m?t.value():t;return o||(o=new Zf),i(g,T,r,n,o)}}return p?(o||(o=new Zf),j1r(e,t,r,n,i,o)):!1}function MB(e,t,r,n,i){return e===t?!0:e==null||t==null||!_b(e)&&!_b(t)?e!==e&&t!==t:W1r(e,t,r,n,MB,i)}var q1r=1,Z1r=2;function X1r(e,t,r,n){var i=r.length,o=i,s=!n;if(e==null)return!o;for(e=Object(e);i--;){var l=r[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<o;){l=r[i];var c=l[0],u=e[c],d=l[1];if(s&&l[2]){if(u===void 0&&!(c in e))return!1}else{var h=new Zf;if(n)var p=n(u,d,c,e,t,h);if(!(p===void 0?MB(d,u,q1r|Z1r,n,h):p))return!1}}return!0}function pMe(e){return e===e&&!wb(e)}function K1r(e){for(var t=XSe(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,pMe(i)]}return t}function fMe(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function Y1r(e){var t=K1r(e);return t.length==1&&t[0][2]?fMe(t[0][0],t[0][1]):function(r){return r===e||X1r(r,e,t)}}function J1r(e,t){return e!=null&&t in Object(e)}function $1r(e,t,r){t=KSe(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var s=wB(t[n]);if(!(o=e!=null&&r(e,s)))break;e=e[s]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&Are(i)&&RSe(s,i)&&(fp(e)||DSe(e)))}function ecr(e,t){return e!=null&&$1r(e,t,J1r)}var tcr=1,rcr=2;function ncr(e,t){return Ire(e)&&pMe(t)?fMe(wB(e),t):function(r){var n=qf(r,e);return n===void 0&&n===t?ecr(r,e):MB(t,n,tcr|rcr)}}function icr(e){return function(t){return t==null?void 0:t[e]}}function ocr(e){return function(t){return YSe(t,e)}}function acr(e){return Ire(e)?icr(wB(e)):ocr(e)}function scr(e){return typeof e=="function"?e:e==null?isr:typeof e=="object"?fp(e)?ncr(e[0],e[1]):Y1r(e):acr(e)}var Fre=function(){return pp.Date.now()},lcr="Expected a function",ccr=Math.max,ucr=Math.min;function dcr(e,t,r){var n,i,o,s,l,c,u=0,d=!1,h=!1,p=!0;if(typeof e!="function")throw new TypeError(lcr);t=kre(t)||0,wb(r)&&(d=!!r.leading,h="maxWait"in r,o=h?ccr(kre(r.maxWait)||0,t):o,p="trailing"in r?!!r.trailing:p);function f(w){var M=n,C=i;return n=i=void 0,u=w,s=e.apply(C,M),s}function m(w){return u=w,l=setTimeout(y,t),d?f(w):s}function g(w){var M=w-c,C=w-u,A=t-M;return h?ucr(A,o-C):A}function T(w){var M=w-c,C=w-u;return c===void 0||M>=t||M<0||h&&C>=o}function y(){var w=Fre();if(T(w))return v(w);l=setTimeout(y,g(w))}function v(w){return l=void 0,p&&n?f(w):(n=i=void 0,s)}function _(){l!==void 0&&clearTimeout(l),u=0,n=c=i=l=void 0}function b(){return l===void 0?s:v(Fre())}function L(){var w=Fre(),M=T(w);if(n=arguments,i=this,c=w,M){if(l===void 0)return m(c);if(h)return clearTimeout(l),l=setTimeout(y,t),f(c)}return l===void 0&&(l=setTimeout(y,t)),s}return L.cancel=_,L.flush=b,L}var hcr=Math.max,pcr=Math.min;function fcr(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=n-1;return r!==void 0&&(i=nsr(r),i=r<0?hcr(n+i,0):pcr(i,n-1)),Qsr(e,scr(t),i,!0)}function kB(e){for(var t=-1,r=e==null?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n}function ek(e,t){return MB(e,t)}function CB(e){return e==null}function mcr(e){return e===void 0}const mMe=e=>e===void 0,Dre=e=>typeof e=="boolean",Xu=e=>typeof e=="number",tk=e=>typeof Element>"u"?!1:e instanceof Element,gcr=e=>hp(e)?!Number.isNaN(Number(e)):!1,ycr=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d");let gMe=class extends Error{constructor(t){super(t),this.name="ElementPlusError"}};function Tcr(e,t){throw new gMe(`[${e}] ${t}`)}function Zd(e,t){if(bb.env.NODE_ENV!=="production"){const r=hp(e)?new gMe(`[${e}] ${t}`):e;console.warn(r)}}const vcr="utils/dom/style";function EB(e,t="px"){if(!e)return"";if(Xu(e)||gcr(e))return`${e}${t}`;if(hp(e))return e;Zd(vcr,"binding value must be a string or number")}function bcr(e,t){if(!Sc)return;if(!t){e.scrollTop=0;return}const r=[];let n=t.offsetParent;for(;n!==null&&e!==n&&e.contains(n);)r.push(n),n=n.offsetParent;const i=t.offsetTop+r.reduce((c,u)=>c+u.offsetTop,0),o=i+t.offsetHeight,s=e.scrollTop,l=s+e.clientHeight;i<s?e.scrollTop=i:o>l&&(e.scrollTop=o-e.clientHeight)}/*! Element Plus Icons Vue v2.3.1 */var Qcr=a.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),xcr=Qcr,_cr=a.defineComponent({name:"ArrowRight",__name:"arrow-right",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),wcr=_cr,Lcr=a.defineComponent({name:"CircleCheck",__name:"circle-check",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),a.createElementVNode("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}}),Scr=Lcr,Mcr=a.defineComponent({name:"CircleClose",__name:"circle-close",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),a.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),zre=Mcr,kcr=a.defineComponent({name:"Close",__name:"close",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),yMe=kcr,Ccr=a.defineComponent({name:"Hide",__name:"hide",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),a.createElementVNode("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}}),Ecr=Ccr,Acr=a.defineComponent({name:"Loading",__name:"loading",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),TMe=Acr,Ocr=a.defineComponent({name:"View",__name:"view",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),Pcr=Ocr;const vMe="__epPropKey",qi=e=>e,Icr=e=>qd(e)&&!!e[vMe],AB=(e,t)=>{if(!qd(e)||Icr(e))return e;const{values:r,required:n,default:i,type:o,validator:s}=e,l={type:o,required:!!n,validator:r||s?c=>{let u=!1,d=[];if(r&&(d=Array.from(r),SSe(e,"default")&&d.push(i),u||(u=d.includes(c))),s&&(u||(u=s(c))),!u&&d.length>0){const h=[...new Set(d)].map(p=>JSON.stringify(p)).join(", ");a.warn(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${h}], got value ${JSON.stringify(c)}.`)}return u}:void 0,[vMe]:!0};return SSe(e,"default")&&(l.default=i),l},xs=e=>kB(Object.entries(e).map(([t,r])=>[t,AB(r,t)])),i9=qi([String,Object,Function]),bMe={validating:TMe,success:Scr,error:zre},mp=(e,t)=>{if(e.install=r=>{for(const n of[e,...Object.values(t??{})])r.component(n.name,n)},t)for(const[r,n]of Object.entries(t))e[r]=n;return e},Hcr=(e,t)=>(e.install=r=>{r.directive(t,e)},e),OB=e=>(e.install=XM,e),rk={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},Z0="update:modelValue",PB="change",QMe=["","default","small","large"],xMe=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e),_Me=e=>e,Vcr=["class","style"],Rcr=/^on[A-Z]/,Ncr=(e={})=>{const{excludeListeners:t=!1,excludeKeys:r}=e,n=a.computed(()=>((r==null?void 0:r.value)||[]).concat(Vcr)),i=a.getCurrentInstance();return i?a.computed(()=>{var o;return kB(Object.entries((o=i.proxy)==null?void 0:o.$attrs).filter(([s])=>!n.value.includes(s)&&!(t&&Rcr.test(s))))}):(Zd("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),a.computed(()=>({})))},wMe=({from:e,replacement:t,scope:r,version:n,ref:i,type:o="API"},s)=>{a.watch(()=>a.unref(s),l=>{l&&Zd(r,`[${o}] ${e} is about to be deprecated in version ${n}, please use ${t} instead.
|
2182
2182
|
For more detail, please visit: ${i}
|
2183
2183
|
`)},{immediate:!0})};var Bcr={name:"en",el:{colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color."},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"}}};const Fcr=e=>(t,r)=>Dcr(t,r,a.unref(e)),Dcr=(e,t,r)=>qf(r,e,e).replace(/\{(\w+)\}/g,(n,i)=>{var o;return`${(o=t==null?void 0:t[i])!=null?o:`{${i}}`}`}),zcr=e=>{const t=a.computed(()=>a.unref(e).name),r=a.isRef(e)?e:a.ref(e);return{lang:t,locale:r,t:Fcr(e)}},jcr=Symbol("localeContextKey"),Ucr=e=>{const t=e||a.inject(jcr,a.ref());return zcr(a.computed(()=>t.value||Bcr))},jre="el",Gcr="is-",o9=(e,t,r,n,i)=>{let o=`${e}-${t}`;return r&&(o+=`-${r}`),n&&(o+=`__${n}`),i&&(o+=`--${i}`),o},Wcr=Symbol("namespaceContextKey"),Ure=e=>{const t=e||(a.getCurrentInstance()?a.inject(Wcr,a.ref(jre)):a.ref(jre));return a.computed(()=>a.unref(t)||jre)},ls=(e,t)=>{const r=Ure(t);return{namespace:r,b:(n="")=>o9(r.value,e,n,"",""),e:n=>n?o9(r.value,e,"",n,""):"",m:n=>n?o9(r.value,e,"","",n):"",be:(n,i)=>n&&i?o9(r.value,e,n,i,""):"",em:(n,i)=>n&&i?o9(r.value,e,"",n,i):"",bm:(n,i)=>n&&i?o9(r.value,e,n,"",i):"",bem:(n,i,o)=>n&&i&&o?o9(r.value,e,n,i,o):"",is:(n,...i)=>{const o=i.length>=1?i[0]:!0;return n&&o?`${Gcr}${n}`:""},cssVar:n=>{const i={};for(const o in n)n[o]&&(i[`--${r.value}-${o}`]=n[o]);return i},cssVarName:n=>`--${r.value}-${n}`,cssVarBlock:n=>{const i={};for(const o in n)n[o]&&(i[`--${r.value}-${e}-${o}`]=n[o]);return i},cssVarBlockName:n=>`--${r.value}-${e}-${n}`}},qcr=AB({type:qi(Boolean),default:null}),Zcr=AB({type:qi(Function)}),Xcr=e=>{const t=`update:${e}`,r=`onUpdate:${e}`,n=[t],i={[e]:qcr,[r]:Zcr};return{useModelToggle:({indicator:o,toggleReason:s,shouldHideWhenRouteChanges:l,shouldProceed:c,onShow:u,onHide:d})=>{const h=a.getCurrentInstance(),{emit:p}=h,f=h.props,m=a.computed(()=>Wd(f[r])),g=a.computed(()=>f[e]===null),T=w=>{o.value!==!0&&(o.value=!0,s&&(s.value=w),Wd(u)&&u(w))},y=w=>{o.value!==!1&&(o.value=!1,s&&(s.value=w),Wd(d)&&d(w))},v=w=>{if(f.disabled===!0||Wd(c)&&!c())return;const M=m.value&⪼M&&p(t,!0),(g.value||!M)&&T(w)},_=w=>{if(f.disabled===!0||!Sc)return;const M=m.value&⪼M&&p(t,!1),(g.value||!M)&&y(w)},b=w=>{Dre(w)&&(f.disabled&&w?m.value&&p(t,!1):o.value!==w&&(w?T():y()))},L=()=>{o.value?_():v()};return a.watch(()=>f[e],b),l&&h.appContext.config.globalProperties.$route!==void 0&&a.watch(()=>({...h.proxy.$route}),()=>{l.value&&o.value&&_()}),a.onMounted(()=>{b(f[e])}),{hide:_,show:v,toggle:L,hasUpdateHandler:m}},useModelToggleProps:i,useModelToggleEmits:n}},LMe=e=>{const t=a.getCurrentInstance();return a.computed(()=>{var r,n;return(n=(r=t==null?void 0:t.proxy)==null?void 0:r.$props)==null?void 0:n[e]})};var Ku="top",Xd="bottom",Kd="right",Yu="left",Gre="auto",nk=[Ku,Xd,Kd,Yu],Sb="start",ik="end",Kcr="clippingParents",SMe="viewport",ok="popper",Ycr="reference",MMe=nk.reduce(function(e,t){return e.concat([t+"-"+Sb,t+"-"+ik])},[]),IB=[].concat(nk,[Gre]).reduce(function(e,t){return e.concat([t,t+"-"+Sb,t+"-"+ik])},[]),Jcr="beforeRead",$cr="read",eur="afterRead",tur="beforeMain",rur="main",nur="afterMain",iur="beforeWrite",our="write",aur="afterWrite",sur=[Jcr,$cr,eur,tur,rur,nur,iur,our,aur];function gp(e){return e?(e.nodeName||"").toLowerCase():null}function _3(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Mb(e){var t=_3(e).Element;return e instanceof t||e instanceof Element}function Yd(e){var t=_3(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Wre(e){if(typeof ShadowRoot>"u")return!1;var t=_3(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function lur(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},o=t.elements[r];!Yd(o)||!gp(o)||(Object.assign(o.style,n),Object.keys(i).forEach(function(s){var l=i[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function cur(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],o=t.attributes[n]||{},s=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),l=s.reduce(function(c,u){return c[u]="",c},{});!Yd(i)||!gp(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}var kMe={name:"applyStyles",enabled:!0,phase:"write",fn:lur,effect:cur,requires:["computeStyles"]};function yp(e){return e.split("-")[0]}var a9=Math.max,HB=Math.min,kb=Math.round;function Cb(e,t){t===void 0&&(t=!1);var r=e.getBoundingClientRect(),n=1,i=1;if(Yd(e)&&t){var o=e.offsetHeight,s=e.offsetWidth;s>0&&(n=kb(r.width)/s||1),o>0&&(i=kb(r.height)/o||1)}return{width:r.width/n,height:r.height/i,top:r.top/i,right:r.right/n,bottom:r.bottom/i,left:r.left/n,x:r.left/n,y:r.top/i}}function qre(e){var t=Cb(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function CMe(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Wre(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Xf(e){return _3(e).getComputedStyle(e)}function uur(e){return["table","td","th"].indexOf(gp(e))>=0}function Mm(e){return((Mb(e)?e.ownerDocument:e.document)||window.document).documentElement}function VB(e){return gp(e)==="html"?e:e.assignedSlot||e.parentNode||(Wre(e)?e.host:null)||Mm(e)}function EMe(e){return!Yd(e)||Xf(e).position==="fixed"?null:e.offsetParent}function dur(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,r=navigator.userAgent.indexOf("Trident")!==-1;if(r&&Yd(e)){var n=Xf(e);if(n.position==="fixed")return null}var i=VB(e);for(Wre(i)&&(i=i.host);Yd(i)&&["html","body"].indexOf(gp(i))<0;){var o=Xf(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function ak(e){for(var t=_3(e),r=EMe(e);r&&uur(r)&&Xf(r).position==="static";)r=EMe(r);return r&&(gp(r)==="html"||gp(r)==="body"&&Xf(r).position==="static")?t:r||dur(e)||t}function Zre(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function sk(e,t,r){return a9(e,HB(t,r))}function hur(e,t,r){var n=sk(e,t,r);return n>r?r:n}function AMe(){return{top:0,right:0,bottom:0,left:0}}function OMe(e){return Object.assign({},AMe(),e)}function PMe(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var pur=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,OMe(typeof e!="number"?e:PMe(e,nk))};function fur(e){var t,r=e.state,n=e.name,i=e.options,o=r.elements.arrow,s=r.modifiersData.popperOffsets,l=yp(r.placement),c=Zre(l),u=[Yu,Kd].indexOf(l)>=0,d=u?"height":"width";if(!(!o||!s)){var h=pur(i.padding,r),p=qre(o),f=c==="y"?Ku:Yu,m=c==="y"?Xd:Kd,g=r.rects.reference[d]+r.rects.reference[c]-s[c]-r.rects.popper[d],T=s[c]-r.rects.reference[c],y=ak(o),v=y?c==="y"?y.clientHeight||0:y.clientWidth||0:0,_=g/2-T/2,b=h[f],L=v-p[d]-h[m],w=v/2-p[d]/2+_,M=sk(b,w,L),C=c;r.modifiersData[n]=(t={},t[C]=M,t.centerOffset=M-w,t)}}function mur(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!CMe(t.elements.popper,i)||(t.elements.arrow=i))}var gur={name:"arrow",enabled:!0,phase:"main",fn:fur,effect:mur,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Eb(e){return e.split("-")[1]}var yur={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Tur(e){var t=e.x,r=e.y,n=window,i=n.devicePixelRatio||1;return{x:kb(t*i)/i||0,y:kb(r*i)/i||0}}function IMe(e){var t,r=e.popper,n=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,l=e.position,c=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,h=e.isFixed,p=s.x,f=p===void 0?0:p,m=s.y,g=m===void 0?0:m,T=typeof d=="function"?d({x:f,y:g}):{x:f,y:g};f=T.x,g=T.y;var y=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),_=Yu,b=Ku,L=window;if(u){var w=ak(r),M="clientHeight",C="clientWidth";if(w===_3(r)&&(w=Mm(r),Xf(w).position!=="static"&&l==="absolute"&&(M="scrollHeight",C="scrollWidth")),w=w,i===Ku||(i===Yu||i===Kd)&&o===ik){b=Xd;var A=h&&w===L&&L.visualViewport?L.visualViewport.height:w[M];g-=A-n.height,g*=c?1:-1}if(i===Yu||(i===Ku||i===Xd)&&o===ik){_=Kd;var O=h&&w===L&&L.visualViewport?L.visualViewport.width:w[C];f-=O-n.width,f*=c?1:-1}}var V=Object.assign({position:l},u&&yur),H=d===!0?Tur({x:f,y:g}):{x:f,y:g};if(f=H.x,g=H.y,c){var N;return Object.assign({},V,(N={},N[b]=v?"0":"",N[_]=y?"0":"",N.transform=(L.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",N))}return Object.assign({},V,(t={},t[b]=v?g+"px":"",t[_]=y?f+"px":"",t.transform="",t))}function vur(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,o=r.adaptive,s=o===void 0?!0:o,l=r.roundOffsets,c=l===void 0?!0:l,u={placement:yp(t.placement),variation:Eb(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,IMe(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,IMe(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var HMe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:vur,data:{}},RB={passive:!0};function bur(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,o=i===void 0?!0:i,s=n.resize,l=s===void 0?!0:s,c=_3(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(d){d.addEventListener("scroll",r.update,RB)}),l&&c.addEventListener("resize",r.update,RB),function(){o&&u.forEach(function(d){d.removeEventListener("scroll",r.update,RB)}),l&&c.removeEventListener("resize",r.update,RB)}}var VMe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:bur,data:{}},Qur={left:"right",right:"left",bottom:"top",top:"bottom"};function NB(e){return e.replace(/left|right|bottom|top/g,function(t){return Qur[t]})}var xur={start:"end",end:"start"};function RMe(e){return e.replace(/start|end/g,function(t){return xur[t]})}function Xre(e){var t=_3(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function Kre(e){return Cb(Mm(e)).left+Xre(e).scrollLeft}function _ur(e){var t=_3(e),r=Mm(e),n=t.visualViewport,i=r.clientWidth,o=r.clientHeight,s=0,l=0;return n&&(i=n.width,o=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=n.offsetLeft,l=n.offsetTop)),{width:i,height:o,x:s+Kre(e),y:l}}function wur(e){var t,r=Mm(e),n=Xre(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=a9(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=a9(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-n.scrollLeft+Kre(e),c=-n.scrollTop;return Xf(i||r).direction==="rtl"&&(l+=a9(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:c}}function Yre(e){var t=Xf(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function NMe(e){return["html","body","#document"].indexOf(gp(e))>=0?e.ownerDocument.body:Yd(e)&&Yre(e)?e:NMe(VB(e))}function lk(e,t){var r;t===void 0&&(t=[]);var n=NMe(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=_3(n),s=i?[o].concat(o.visualViewport||[],Yre(n)?n:[]):n,l=t.concat(s);return i?l:l.concat(lk(VB(s)))}function Jre(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Lur(e){var t=Cb(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function BMe(e,t){return t===SMe?Jre(_ur(e)):Mb(t)?Lur(t):Jre(wur(Mm(e)))}function Sur(e){var t=lk(VB(e)),r=["absolute","fixed"].indexOf(Xf(e).position)>=0,n=r&&Yd(e)?ak(e):e;return Mb(n)?t.filter(function(i){return Mb(i)&&CMe(i,n)&&gp(i)!=="body"}):[]}function Mur(e,t,r){var n=t==="clippingParents"?Sur(e):[].concat(t),i=[].concat(n,[r]),o=i[0],s=i.reduce(function(l,c){var u=BMe(e,c);return l.top=a9(u.top,l.top),l.right=HB(u.right,l.right),l.bottom=HB(u.bottom,l.bottom),l.left=a9(u.left,l.left),l},BMe(e,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function FMe(e){var t=e.reference,r=e.element,n=e.placement,i=n?yp(n):null,o=n?Eb(n):null,s=t.x+t.width/2-r.width/2,l=t.y+t.height/2-r.height/2,c;switch(i){case Ku:c={x:s,y:t.y-r.height};break;case Xd:c={x:s,y:t.y+t.height};break;case Kd:c={x:t.x+t.width,y:l};break;case Yu:c={x:t.x-r.width,y:l};break;default:c={x:t.x,y:t.y}}var u=i?Zre(i):null;if(u!=null){var d=u==="y"?"height":"width";switch(o){case Sb:c[u]=c[u]-(t[d]/2-r[d]/2);break;case ik:c[u]=c[u]+(t[d]/2-r[d]/2);break}}return c}function ck(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,o=r.boundary,s=o===void 0?Kcr:o,l=r.rootBoundary,c=l===void 0?SMe:l,u=r.elementContext,d=u===void 0?ok:u,h=r.altBoundary,p=h===void 0?!1:h,f=r.padding,m=f===void 0?0:f,g=OMe(typeof m!="number"?m:PMe(m,nk)),T=d===ok?Ycr:ok,y=e.rects.popper,v=e.elements[p?T:d],_=Mur(Mb(v)?v:v.contextElement||Mm(e.elements.popper),s,c),b=Cb(e.elements.reference),L=FMe({reference:b,element:y,strategy:"absolute",placement:i}),w=Jre(Object.assign({},y,L)),M=d===ok?w:b,C={top:_.top-M.top+g.top,bottom:M.bottom-_.bottom+g.bottom,left:_.left-M.left+g.left,right:M.right-_.right+g.right},A=e.modifiersData.offset;if(d===ok&&A){var O=A[i];Object.keys(C).forEach(function(V){var H=[Kd,Xd].indexOf(V)>=0?1:-1,N=[Ku,Xd].indexOf(V)>=0?"y":"x";C[V]+=O[N]*H})}return C}function kur(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,o=r.rootBoundary,s=r.padding,l=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?IB:c,d=Eb(n),h=d?l?MMe:MMe.filter(function(m){return Eb(m)===d}):nk,p=h.filter(function(m){return u.indexOf(m)>=0});p.length===0&&(p=h);var f=p.reduce(function(m,g){return m[g]=ck(e,{placement:g,boundary:i,rootBoundary:o,padding:s})[yp(g)],m},{});return Object.keys(f).sort(function(m,g){return f[m]-f[g]})}function Cur(e){if(yp(e)===Gre)return[];var t=NB(e);return[RMe(e),t,RMe(t)]}function Eur(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,o=i===void 0?!0:i,s=r.altAxis,l=s===void 0?!0:s,c=r.fallbackPlacements,u=r.padding,d=r.boundary,h=r.rootBoundary,p=r.altBoundary,f=r.flipVariations,m=f===void 0?!0:f,g=r.allowedAutoPlacements,T=t.options.placement,y=yp(T),v=y===T,_=c||(v||!m?[NB(T)]:Cur(T)),b=[T].concat(_).reduce(function(me,ge){return me.concat(yp(ge)===Gre?kur(t,{placement:ge,boundary:d,rootBoundary:h,padding:u,flipVariations:m,allowedAutoPlacements:g}):ge)},[]),L=t.rects.reference,w=t.rects.popper,M=new Map,C=!0,A=b[0],O=0;O<b.length;O++){var V=b[O],H=yp(V),N=Eb(V)===Sb,D=[Ku,Xd].indexOf(H)>=0,j=D?"width":"height",G=ck(t,{placement:V,boundary:d,rootBoundary:h,altBoundary:p,padding:u}),R=D?N?Kd:Yu:N?Xd:Ku;L[j]>w[j]&&(R=NB(R));var Z=NB(R),X=[];if(o&&X.push(G[H]<=0),l&&X.push(G[R]<=0,G[Z]<=0),X.every(function(me){return me})){A=V,C=!1;break}M.set(V,X)}if(C)for(var U=m?3:1,K=function(me){var ge=b.find(function(ae){var Qe=M.get(ae);if(Qe)return Qe.slice(0,me).every(function(ne){return ne})});if(ge)return A=ge,"break"},$=U;$>0;$--){var le=K($);if(le==="break")break}t.placement!==A&&(t.modifiersData[n]._skip=!0,t.placement=A,t.reset=!0)}}var Aur={name:"flip",enabled:!0,phase:"main",fn:Eur,requiresIfExists:["offset"],data:{_skip:!1}};function DMe(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function zMe(e){return[Ku,Kd,Xd,Yu].some(function(t){return e[t]>=0})}function Our(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=ck(t,{elementContext:"reference"}),l=ck(t,{altBoundary:!0}),c=DMe(s,n),u=DMe(l,i,o),d=zMe(c),h=zMe(u);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}var Pur={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Our};function Iur(e,t,r){var n=yp(e),i=[Yu,Ku].indexOf(n)>=0?-1:1,o=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,s=o[0],l=o[1];return s=s||0,l=(l||0)*i,[Yu,Kd].indexOf(n)>=0?{x:l,y:s}:{x:s,y:l}}function Hur(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=i===void 0?[0,0]:i,s=IB.reduce(function(d,h){return d[h]=Iur(h,t.rects,o),d},{}),l=s[t.placement],c=l.x,u=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=s}var Vur={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Hur};function Rur(e){var t=e.state,r=e.name;t.modifiersData[r]=FMe({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var jMe={name:"popperOffsets",enabled:!0,phase:"read",fn:Rur,data:{}};function Nur(e){return e==="x"?"y":"x"}function Bur(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,o=i===void 0?!0:i,s=r.altAxis,l=s===void 0?!1:s,c=r.boundary,u=r.rootBoundary,d=r.altBoundary,h=r.padding,p=r.tether,f=p===void 0?!0:p,m=r.tetherOffset,g=m===void 0?0:m,T=ck(t,{boundary:c,rootBoundary:u,padding:h,altBoundary:d}),y=yp(t.placement),v=Eb(t.placement),_=!v,b=Zre(y),L=Nur(b),w=t.modifiersData.popperOffsets,M=t.rects.reference,C=t.rects.popper,A=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,O=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),V=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,H={x:0,y:0};if(w){if(o){var N,D=b==="y"?Ku:Yu,j=b==="y"?Xd:Kd,G=b==="y"?"height":"width",R=w[b],Z=R+T[D],X=R-T[j],U=f?-C[G]/2:0,K=v===Sb?M[G]:C[G],$=v===Sb?-C[G]:-M[G],le=t.elements.arrow,me=f&&le?qre(le):{width:0,height:0},ge=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:AMe(),ae=ge[D],Qe=ge[j],ne=sk(0,M[G],me[G]),de=_?M[G]/2-U-ne-ae-O.mainAxis:K-ne-ae-O.mainAxis,ie=_?-M[G]/2+U+ne+Qe+O.mainAxis:$+ne+Qe+O.mainAxis,Te=t.elements.arrow&&ak(t.elements.arrow),Se=Te?b==="y"?Te.clientTop||0:Te.clientLeft||0:0,Ie=(N=V==null?void 0:V[b])!=null?N:0,Ge=R+de-Ie-Se,je=R+ie-Ie,rt=sk(f?HB(Z,Ge):Z,R,f?a9(X,je):X);w[b]=rt,H[b]=rt-R}if(l){var Me,Be=b==="x"?Ku:Yu,ut=b==="x"?Xd:Kd,et=w[L],yt=L==="y"?"height":"width",At=et+T[Be],vt=et-T[ut],_e=[Ku,Yu].indexOf(y)!==-1,qe=(Me=V==null?void 0:V[L])!=null?Me:0,at=_e?At:et-M[yt]-C[yt]-qe+O.altAxis,ht=_e?et+M[yt]+C[yt]-qe-O.altAxis:vt,zt=f&&_e?hur(at,et,ht):sk(f?at:At,et,f?ht:vt);w[L]=zt,H[L]=zt-et}t.modifiersData[n]=H}}var Fur={name:"preventOverflow",enabled:!0,phase:"main",fn:Bur,requiresIfExists:["offset"]};function Dur(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function zur(e){return e===_3(e)||!Yd(e)?Xre(e):Dur(e)}function jur(e){var t=e.getBoundingClientRect(),r=kb(t.width)/e.offsetWidth||1,n=kb(t.height)/e.offsetHeight||1;return r!==1||n!==1}function Uur(e,t,r){r===void 0&&(r=!1);var n=Yd(t),i=Yd(t)&&jur(t),o=Mm(t),s=Cb(e,i),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((gp(t)!=="body"||Yre(o))&&(l=zur(t)),Yd(t)?(c=Cb(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=Kre(o))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function Gur(e){var t=new Map,r=new Set,n=[];e.forEach(function(o){t.set(o.name,o)});function i(o){r.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!r.has(l)){var c=t.get(l);c&&i(c)}}),n.push(o)}return e.forEach(function(o){r.has(o.name)||i(o)}),n}function Wur(e){var t=Gur(e);return sur.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function qur(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function Zur(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var UMe={placement:"bottom",modifiers:[],strategy:"absolute"};function GMe(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function $re(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,o=i===void 0?UMe:i;return function(s,l,c){c===void 0&&(c=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},UMe,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],h=!1,p={state:u,setOptions:function(g){var T=typeof g=="function"?g(u.options):g;m(),u.options=Object.assign({},o,u.options,T),u.scrollParents={reference:Mb(s)?lk(s):s.contextElement?lk(s.contextElement):[],popper:lk(l)};var y=Wur(Zur([].concat(n,u.options.modifiers)));return u.orderedModifiers=y.filter(function(v){return v.enabled}),f(),p.update()},forceUpdate:function(){if(!h){var g=u.elements,T=g.reference,y=g.popper;if(GMe(T,y)){u.rects={reference:Uur(T,ak(y),u.options.strategy==="fixed"),popper:qre(y)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(C){return u.modifiersData[C.name]=Object.assign({},C.data)});for(var v=0;v<u.orderedModifiers.length;v++){if(u.reset===!0){u.reset=!1,v=-1;continue}var _=u.orderedModifiers[v],b=_.fn,L=_.options,w=L===void 0?{}:L,M=_.name;typeof b=="function"&&(u=b({state:u,options:w,name:M,instance:p})||u)}}}},update:qur(function(){return new Promise(function(g){p.forceUpdate(),g(u)})}),destroy:function(){m(),h=!0}};if(!GMe(s,l))return p;p.setOptions(c).then(function(g){!h&&c.onFirstUpdate&&c.onFirstUpdate(g)});function f(){u.orderedModifiers.forEach(function(g){var T=g.name,y=g.options,v=y===void 0?{}:y,_=g.effect;if(typeof _=="function"){var b=_({state:u,name:T,instance:p,options:v}),L=function(){};d.push(b||L)}})}function m(){d.forEach(function(g){return g()}),d=[]}return p}}$re();var Xur=[VMe,jMe,HMe,kMe];$re({defaultModifiers:Xur});var Kur=[VMe,jMe,HMe,kMe,Vur,Aur,Fur,gur,Pur],Yur=$re({defaultModifiers:Kur});const Jur=(e,t,r={})=>{const n={name:"updateState",enabled:!0,phase:"write",fn:({state:c})=>{const u=$ur(c);Object.assign(s.value,u)},requires:["computeStyles"]},i=a.computed(()=>{const{onFirstUpdate:c,placement:u,strategy:d,modifiers:h}=a.unref(r);return{onFirstUpdate:c,placement:u||"bottom",strategy:d||"absolute",modifiers:[...h||[],n,{name:"applyStyles",enabled:!1}]}}),o=a.shallowRef(),s=a.ref({styles:{popper:{position:a.unref(i).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=()=>{o.value&&(o.value.destroy(),o.value=void 0)};return a.watch(i,c=>{const u=a.unref(o);u&&u.setOptions(c)},{deep:!0}),a.watch([e,t],([c,u])=>{l(),!(!c||!u)&&(o.value=Yur(c,u,a.unref(i)))}),a.onBeforeUnmount(()=>{l()}),{state:a.computed(()=>{var c;return{...((c=a.unref(o))==null?void 0:c.state)||{}}}),styles:a.computed(()=>a.unref(s).styles),attributes:a.computed(()=>a.unref(s).attributes),update:()=>{var c;return(c=a.unref(o))==null?void 0:c.update()},forceUpdate:()=>{var c;return(c=a.unref(o))==null?void 0:c.forceUpdate()},instanceRef:a.computed(()=>a.unref(o))}};function $ur(e){const t=Object.keys(e.elements),r=kB(t.map(i=>[i,e.styles[i]||{}])),n=kB(t.map(i=>[i,e.attributes[i]]));return{styles:r,attributes:n}}function WMe(){let e;const t=(n,i)=>{r(),e=window.setTimeout(n,i)},r=()=>window.clearTimeout(e);return vB(()=>r()),{registerTimeout:t,cancelTimeout:r}}const ene={prefix:Math.floor(Math.random()*1e4),current:0},e0r=Symbol("elIdInjection"),tne=()=>a.getCurrentInstance()?a.inject(e0r,ene):ene,BB=e=>{const t=tne();!Sc&&t===ene&&Zd("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
|
2184
2184
|
usage: app.provide(ID_INJECTION_KEY, {
|