(function(H,Pt){typeof exports=="object"&&typeof module<"u"?Pt(exports,require("https://cdn.jsdelivr.net/npm/@abi-software/flatmap-viewer@4.4.1/+esm"),require("@element-plus/icons-vue"),require("vue"),require("@abi-software/svg-sprite"),require("@abi-software/map-utilities"),require("@abi-software/sparc-annotation"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","https://cdn.jsdelivr.net/npm/@abi-software/flatmap-viewer@4.4.1/+esm","@element-plus/icons-vue","vue","@abi-software/svg-sprite","@abi-software/map-utilities","@abi-software/sparc-annotation","pinia"],Pt):(H=typeof globalThis<"u"?globalThis:H||self,Pt(H.FlatmapVuer={},H.flatmap,H["@element-plus/icons-vue"],H.Vue,H["@abi-software/svg-sprite"],H["@abi-software/map-utilities"],H["@abi-software/sparc-annotation"],H.pinia))})(this,function(H,Pt,W,n,wi,Lt,Ts,Ci){"use strict";function As(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const i=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const vi=As(Pt),Ae=(e,t,{checkForDefaultPrevented:o=!0}={})=>r=>{const a=e==null?void 0:e(r);if(o===!1||!a)return t==null?void 0:t(r)};var Si;const K=typeof window<"u",Os=e=>typeof e=="string",ki=()=>{},oo=K&&((Si=window==null?void 0:window.navigator)==null?void 0:Si.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function io(e){return typeof e=="function"?e():n.unref(e)}function xs(e){return e}function Vt(e){return n.getCurrentScope()?(n.onScopeDispose(e),!0):!1}function Ms(e,t=!0){n.getCurrentInstance()?n.onMounted(e):t?e():n.nextTick(e)}function Ei(e,t,o={}){const{immediate:i=!0}=o,r=n.ref(!1);let a=null;function s(){a&&(clearTimeout(a),a=null)}function l(){r.value=!1,s()}function c(...d){s(),r.value=!0,a=setTimeout(()=>{r.value=!1,a=null,e(...d)},io(t))}return i&&(r.value=!0,K&&c()),Vt(l),{isPending:n.readonly(r),start:c,stop:l}}function Oe(e){var t;const o=io(e);return(t=o==null?void 0:o.$el)!=null?t:o}const hn=K?window:void 0;function he(...e){let t,o,i,r;if(Os(e[0])||Array.isArray(e[0])?([o,i,r]=e,t=hn):[t,o,i,r]=e,!t)return ki;Array.isArray(o)||(o=[o]),Array.isArray(i)||(i=[i]);const a=[],s=()=>{a.forEach(f=>f()),a.length=0},l=(f,u,p,g)=>(f.addEventListener(u,p,g),()=>f.removeEventListener(u,p,g)),c=n.watch(()=>[Oe(t),io(r)],([f,u])=>{s(),f&&a.push(...o.flatMap(p=>i.map(g=>l(f,p,g,u))))},{immediate:!0,flush:"post"}),d=()=>{c(),s()};return Vt(d),d}let Ii=!1;function Bs(e,t,o={}){const{window:i=hn,ignore:r=[],capture:a=!0,detectIframe:s=!1}=o;if(!i)return;oo&&!Ii&&(Ii=!0,Array.from(i.document.body.children).forEach(p=>p.addEventListener("click",ki)));let l=!0;const c=p=>r.some(g=>{if(typeof g=="string")return Array.from(i.document.querySelectorAll(g)).some(h=>h===p.target||p.composedPath().includes(h));{const h=Oe(g);return h&&(p.target===h||p.composedPath().includes(h))}}),f=[he(i,"click",p=>{const g=Oe(e);if(!(!g||g===p.target||p.composedPath().includes(g))){if(p.detail===0&&(l=!c(p)),!l){l=!0;return}t(p)}},{passive:!0,capture:a}),he(i,"pointerdown",p=>{const g=Oe(e);g&&(l=!p.composedPath().includes(g)&&!c(p))},{passive:!0}),s&&he(i,"blur",p=>{var g;const h=Oe(e);((g=i.document.activeElement)==null?void 0:g.tagName)==="IFRAME"&&!(h!=null&&h.contains(i.document.activeElement))&&t(p)})].filter(Boolean);return()=>f.forEach(p=>p())}function Ti(e,t=!1){const o=n.ref(),i=()=>o.value=!!e();return i(),Ms(i,t),o}const Ai=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Oi="__vueuse_ssr_handlers__";Ai[Oi]=Ai[Oi]||{};var xi=Object.getOwnPropertySymbols,Ns=Object.prototype.hasOwnProperty,_s=Object.prototype.propertyIsEnumerable,Ps=(e,t)=>{var o={};for(var i in e)Ns.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(e!=null&&xi)for(var i of xi(e))t.indexOf(i)<0&&_s.call(e,i)&&(o[i]=e[i]);return o};function Re(e,t,o={}){const i=o,{window:r=hn}=i,a=Ps(i,["window"]);let s;const l=Ti(()=>r&&"ResizeObserver"in r),c=()=>{s&&(s.disconnect(),s=void 0)},d=n.watch(()=>Oe(e),u=>{c(),l.value&&r&&u&&(s=new ResizeObserver(t),s.observe(u,a))},{immediate:!0,flush:"post"}),f=()=>{c(),d()};return Vt(f),{isSupported:l,stop:f}}var Mi=Object.getOwnPropertySymbols,Ls=Object.prototype.hasOwnProperty,Vs=Object.prototype.propertyIsEnumerable,Rs=(e,t)=>{var o={};for(var i in e)Ls.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(e!=null&&Mi)for(var i of Mi(e))t.indexOf(i)<0&&Vs.call(e,i)&&(o[i]=e[i]);return o};function Fs(e,t,o={}){const i=o,{window:r=hn}=i,a=Rs(i,["window"]);let s;const l=Ti(()=>r&&"MutationObserver"in r),c=()=>{s&&(s.disconnect(),s=void 0)},d=n.watch(()=>Oe(e),u=>{c(),l.value&&r&&u&&(s=new MutationObserver(t),s.observe(u,a))},{immediate:!0}),f=()=>{c(),d()};return Vt(f),{isSupported:l,stop:f}}var Bi;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(Bi||(Bi={}));var Ds=Object.defineProperty,Ni=Object.getOwnPropertySymbols,$s=Object.prototype.hasOwnProperty,zs=Object.prototype.propertyIsEnumerable,_i=(e,t,o)=>t in e?Ds(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,js=(e,t)=>{for(var o in t||(t={}))$s.call(t,o)&&_i(e,o,t[o]);if(Ni)for(var o of Ni(t))zs.call(t,o)&&_i(e,o,t[o]);return e};js({linear:xs},{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]});/** * @vue/shared v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/process.env.NODE_ENV!=="production"&&Object.freeze({}),process.env.NODE_ENV!=="production"&&Object.freeze([]);const Je=()=>{},Hs=Object.prototype.hasOwnProperty,Pi=(e,t)=>Hs.call(e,t),ee=Array.isArray,Q=e=>typeof e=="function",me=e=>typeof e=="string",te=e=>e!==null&&typeof e=="object",Ks=Object.prototype.toString,Us=e=>Ks.call(e),ro=e=>Us(e).slice(8,-1),Li=e=>{const t=Object.create(null);return o=>t[o]||(t[o]=e(o))},Ws=/-(\w)/g,qs=Li(e=>e.replace(Ws,(t,o)=>o?o.toUpperCase():"")),Gs=/\B([A-Z])/g,Js=Li(e=>e.replace(Gs,"-$1").toLowerCase());var Vi=typeof global=="object"&&global&&global.Object===Object&&global,Ys=typeof self=="object"&&self&&self.Object===Object&&self,Ce=Vi||Ys||Function("return this")(),ve=Ce.Symbol,Ri=Object.prototype,Zs=Ri.hasOwnProperty,Qs=Ri.toString,Rt=ve?ve.toStringTag:void 0;function Xs(e){var t=Zs.call(e,Rt),o=e[Rt];try{e[Rt]=void 0;var i=!0}catch{}var r=Qs.call(e);return i&&(t?e[Rt]=o:delete e[Rt]),r}var el=Object.prototype,tl=el.toString;function nl(e){return tl.call(e)}var ol="[object Null]",il="[object Undefined]",Fi=ve?ve.toStringTag:void 0;function ut(e){return e==null?e===void 0?il:ol:Fi&&Fi in Object(e)?Xs(e):nl(e)}function pt(e){return e!=null&&typeof e=="object"}var rl="[object Symbol]";function mn(e){return typeof e=="symbol"||pt(e)&&ut(e)==rl}function al(e,t){for(var o=-1,i=e==null?0:e.length,r=Array(i);++o0){if(++t>=_l)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Rl(e){return function(){return e}}var gn=function(){try{var e=Ze(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Fl=gn?function(e,t){return gn(e,"toString",{configurable:!0,enumerable:!1,value:Rl(t),writable:!0})}:Ki,Dl=Vl(Fl);function $l(e,t,o,i){e.length;for(var r=o+1;r--;)if(t(e[r],r,e))return r;return-1}var zl=9007199254740991,jl=/^(?:0|[1-9]\d*)$/;function lo(e,t){var o=typeof e;return t=t??zl,!!t&&(o=="number"||o!="symbol"&&jl.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=Gl}function Jl(e){return e!=null&&fo(e.length)&&!Ui(e)}var Yl=Object.prototype;function Zl(e){var t=e&&e.constructor,o=typeof t=="function"&&t.prototype||Yl;return e===o}function Ql(e,t){for(var o=-1,i=Array(e);++o-1}function rd(e,t){var o=this.__data__,i=yn(o,e);return i<0?(++this.size,o.push([e,t])):o[i][1]=t,this}function xe(e){var t=-1,o=e==null?0:e.length;for(this.clear();++tl))return!1;var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var u=-1,p=!0,g=o&Gd?new Cn:void 0;for(a.set(e,t),a.set(t,e);++u=t||E<0||u&&O>=a}function b(){var S=So();if(y(S))return C(S);l=setTimeout(b,m(S))}function C(S){return l=void 0,p&&i?g(S):(i=r=void 0,s)}function I(){l!==void 0&&clearTimeout(l),d=0,i=c=r=l=void 0}function k(){return l===void 0?s:C(So())}function v(){var S=So(),E=y(S);if(i=arguments,r=this,c=S,E){if(l===void 0)return h(c);if(u)return clearTimeout(l),l=setTimeout(b,t),g(c)}return l===void 0&&(l=setTimeout(b,t)),s}return v.cancel=I,v.flush=k,v}function Rf(e,t,o){var i=e==null?0:e.length;if(!i)return-1;var r=i-1;return $l(e,Nf(t),r)}function ko(e){for(var t=-1,o=e==null?0:e.length,i={};++te===void 0,_e=e=>typeof e=="boolean",G=e=>typeof e=="number",Xe=e=>typeof Element>"u"?!1:e instanceof Element,jt=e=>En(e),zf=e=>me(e)?!Number.isNaN(Number(e)):!1,jf=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),Er=e=>Object.keys(e);class Ir extends Error{constructor(t){super(t),this.name="ElementPlusError"}}function Tr(e,t){throw new Ir(`[${e}] ${t}`)}function ne(e,t){if(process.env.NODE_ENV!=="production"){const o=me(e)?new Ir(`[${e}] ${t}`):e;console.warn(o)}}const Hf="utils/dom/style",Ar=(e="")=>e.split(" ").filter(t=>!!t.trim()),Or=(e,t)=>{if(!e||!t)return!1;if(t.includes(" "))throw new Error("className should not contain space.");return e.classList.contains(t)},Eo=(e,t)=>{!e||!t.trim()||e.classList.add(...Ar(t))},Ht=(e,t)=>{!e||!t.trim()||e.classList.remove(...Ar(t))},ht=(e,t)=>{var o;if(!K||!e||!t)return"";let i=qs(t);i==="float"&&(i="cssFloat");try{const r=e.style[i];if(r)return r;const a=(o=document.defaultView)==null?void 0:o.getComputedStyle(e,"");return a?a[i]:""}catch{return e.style[i]}};function et(e,t="px"){if(!e)return"";if(G(e)||zf(e))return`${e}${t}`;if(me(e))return e;ne(Hf,"binding value must be a string or number")}let In;const Kf=e=>{var t;if(!K)return 0;if(In!==void 0)return In;const o=document.createElement("div");o.className=`${e}-scrollbar__wrap`,o.style.visibility="hidden",o.style.width="100px",o.style.position="absolute",o.style.top="-9999px",document.body.appendChild(o);const i=o.offsetWidth;o.style.overflow="scroll";const r=document.createElement("div");r.style.width="100%",o.appendChild(r);const a=r.offsetWidth;return(t=o.parentNode)==null||t.removeChild(o),In=i-a,In};function Uf(e,t){if(!K)return;if(!t){e.scrollTop=0;return}const o=[];let i=t.offsetParent;for(;i!==null&&e!==i&&e.contains(i);)o.push(i),i=i.offsetParent;const r=t.offsetTop+o.reduce((c,d)=>c+d.offsetTop,0),a=r+t.offsetHeight,s=e.scrollTop,l=s+e.clientHeight;rl&&(e.scrollTop=a-e.clientHeight)}const xr="__epPropKey",_=e=>e,Wf=e=>te(e)&&!!e[xr],Tn=(e,t)=>{if(!te(e)||Wf(e))return e;const{values:o,required:i,default:r,type:a,validator:s}=e,c={type:a,required:!!i,validator:o||s?d=>{let f=!1,u=[];if(o&&(u=Array.from(o),Pi(e,"default")&&u.push(r),f||(f=u.includes(d))),s&&(f||(f=s(d))),!f&&u.length>0){const p=[...new Set(u)].map(g=>JSON.stringify(g)).join(", ");n.warn(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${p}], got value ${JSON.stringify(d)}.`)}return f}:void 0,[xr]:!0};return Pi(e,"default")&&(c.default=r),c},R=e=>ko(Object.entries(e).map(([t,o])=>[t,Tn(o,t)])),mt=_([String,Object,Function]),qf={Close:W.Close},Gf={validating:W.Loading,success:W.CircleCheck,error:W.CircleClose},oe=(e,t)=>{if(e.install=o=>{for(const i of[e,...Object.values(t??{})])o.component(i.name,i)},t)for(const[o,i]of Object.entries(t))e[o]=i;return e},Jf=(e,t)=>(e.install=o=>{o.directive(t,e)},e),tt=e=>(e.install=Je,e),Yf=(...e)=>t=>{e.forEach(o=>{Q(o)?o(t):o.value=t})},Kt={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"},X="update:modelValue",Io="change",Mr=["","default","small","large"];var An=(e=>(e[e.TEXT=1]="TEXT",e[e.CLASS=2]="CLASS",e[e.STYLE=4]="STYLE",e[e.PROPS=8]="PROPS",e[e.FULL_PROPS=16]="FULL_PROPS",e[e.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",e[e.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",e[e.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",e[e.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",e[e.NEED_PATCH=512]="NEED_PATCH",e[e.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",e[e.HOISTED=-1]="HOISTED",e[e.BAIL=-2]="BAIL",e))(An||{});const Zf=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e),Ut=e=>e,gt=({from:e,replacement:t,scope:o,version:i,ref:r,type:a="API"},s)=>{n.watch(()=>n.unref(s),l=>{l&&ne(o,`[${a}] ${e} is about to be deprecated in version ${i}, please use ${t} instead. For more detail, please visit: ${r} `)},{immediate:!0})},Qf=(e,t,o,i)=>{let r={offsetX:0,offsetY:0};const a=d=>{const f=d.clientX,u=d.clientY,{offsetX:p,offsetY:g}=r,h=e.value.getBoundingClientRect(),m=h.left,y=h.top,b=h.width,C=h.height,I=document.documentElement.clientWidth,k=document.documentElement.clientHeight,v=-m+p,S=-y+g,E=I-m-b+p,O=k-y-C+g,M=B=>{let T=p+B.clientX-f,P=g+B.clientY-u;i!=null&&i.value||(T=Math.min(Math.max(T,v),E),P=Math.min(Math.max(P,S),O)),r={offsetX:T,offsetY:P},e.value&&(e.value.style.transform=`translate(${et(T)}, ${et(P)})`)},N=()=>{document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",N)};document.addEventListener("mousemove",M),document.addEventListener("mouseup",N)},s=()=>{t.value&&e.value&&t.value.addEventListener("mousedown",a)},l=()=>{t.value&&e.value&&t.value.removeEventListener("mousedown",a)},c=()=>{r={offsetX:0,offsetY:0},e.value&&(e.value.style.transform="none")};return n.onMounted(()=>{n.watchEffect(()=>{o.value?s():l()})}),n.onBeforeUnmount(()=>{l()}),{resetPosition:c}};var Xf={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value"},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"},mention:{loading:"Loading"},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"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const eu=e=>(t,o)=>tu(t,o,n.unref(e)),tu=(e,t,o)=>Be(o,e,e).replace(/\{(\w+)\}/g,(i,r)=>{var a;return`${(a=t==null?void 0:t[r])!=null?a:`{${r}}`}`}),nu=e=>{const t=n.computed(()=>n.unref(e).name),o=n.isRef(e)?e:n.ref(e);return{lang:t,locale:o,t:eu(e)}},Br=Symbol("localeContextKey"),To=e=>{const t=e||n.inject(Br,n.ref());return nu(n.computed(()=>t.value||Xf))},Wt="el",ou="is-",nt=(e,t,o,i,r)=>{let a=`${e}-${t}`;return o&&(a+=`-${o}`),i&&(a+=`__${i}`),r&&(a+=`--${r}`),a},Nr=Symbol("namespaceContextKey"),Ao=e=>{const t=e||(n.getCurrentInstance()?n.inject(Nr,n.ref(Wt)):n.ref(Wt));return n.computed(()=>n.unref(t)||Wt)},D=(e,t)=>{const o=Ao(t);return{namespace:o,b:(m="")=>nt(o.value,e,m,"",""),e:m=>m?nt(o.value,e,"",m,""):"",m:m=>m?nt(o.value,e,"","",m):"",be:(m,y)=>m&&y?nt(o.value,e,m,y,""):"",em:(m,y)=>m&&y?nt(o.value,e,"",m,y):"",bm:(m,y)=>m&&y?nt(o.value,e,m,"",y):"",bem:(m,y,b)=>m&&y&&b?nt(o.value,e,m,y,b):"",is:(m,...y)=>{const b=y.length>=1?y[0]:!0;return m&&b?`${ou}${m}`:""},cssVar:m=>{const y={};for(const b in m)m[b]&&(y[`--${o.value}-${b}`]=m[b]);return y},cssVarName:m=>`--${o.value}-${m}`,cssVarBlock:m=>{const y={};for(const b in m)m[b]&&(y[`--${o.value}-${e}-${b}`]=m[b]);return y},cssVarBlockName:m=>`--${o.value}-${e}-${m}`}},iu=(e,t={})=>{n.isRef(e)||Tr("[useLockscreen]","You need to pass a ref param to this function");const o=t.ns||D("popup"),i=n.computed(()=>o.bm("parent","hidden"));if(!K||Or(document.body,i.value))return;let r=0,a=!1,s="0";const l=()=>{setTimeout(()=>{Ht(document==null?void 0:document.body,i.value),a&&document&&(document.body.style.width=s)},200)};n.watch(e,c=>{if(!c){l();return}a=!Or(document.body,i.value),a&&(s=document.body.style.width),r=Kf(o.namespace.value);const d=document.documentElement.clientHeight0&&(d||f==="scroll")&&a&&(document.body.style.width=`calc(100% - ${r}px)`),Eo(document.body,i.value)}),n.onScopeDispose(()=>l())},ru=Tn({type:_(Boolean),default:null}),au=Tn({type:_(Function)}),su=e=>{const t=`update:${e}`,o=`onUpdate:${e}`,i=[t],r={[e]:ru,[o]:au};return{useModelToggle:({indicator:s,toggleReason:l,shouldHideWhenRouteChanges:c,shouldProceed:d,onShow:f,onHide:u})=>{const p=n.getCurrentInstance(),{emit:g}=p,h=p.props,m=n.computed(()=>Q(h[o])),y=n.computed(()=>h[e]===null),b=E=>{s.value!==!0&&(s.value=!0,l&&(l.value=E),Q(f)&&f(E))},C=E=>{s.value!==!1&&(s.value=!1,l&&(l.value=E),Q(u)&&u(E))},I=E=>{if(h.disabled===!0||Q(d)&&!d())return;const O=m.value&&K;O&&g(t,!0),(y.value||!O)&&b(E)},k=E=>{if(h.disabled===!0||!K)return;const O=m.value&&K;O&&g(t,!1),(y.value||!O)&&C(E)},v=E=>{_e(E)&&(h.disabled&&E?m.value&&g(t,!1):s.value!==E&&(E?b():C()))},S=()=>{s.value?k():I()};return n.watch(()=>h[e],v),c&&p.appContext.config.globalProperties.$route!==void 0&&n.watch(()=>({...p.proxy.$route}),()=>{c.value&&s.value&&k()}),n.onMounted(()=>{v(h[e])}),{hide:k,show:I,toggle:S,hasUpdateHandler:m}},useModelToggleProps:r,useModelToggleEmits:i}},_r=e=>{const t=n.getCurrentInstance();return n.computed(()=>{var o,i;return(i=(o=t==null?void 0:t.proxy)==null?void 0:o.$props)==null?void 0:i[e]})};var ie="top",de="bottom",fe="right",re="left",Oo="auto",qt=[ie,de,fe,re],yt="start",Gt="end",lu="clippingParents",Pr="viewport",Jt="popper",cu="reference",Lr=qt.reduce(function(e,t){return e.concat([t+"-"+yt,t+"-"+Gt])},[]),On=[].concat(qt,[Oo]).reduce(function(e,t){return e.concat([t,t+"-"+yt,t+"-"+Gt])},[]),du="beforeRead",fu="read",uu="afterRead",pu="beforeMain",hu="main",mu="afterMain",gu="beforeWrite",yu="write",bu="afterWrite",wu=[du,fu,uu,pu,hu,mu,gu,yu,bu];function Se(e){return e?(e.nodeName||"").toLowerCase():null}function ye(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function bt(e){var t=ye(e).Element;return e instanceof t||e instanceof Element}function ue(e){var t=ye(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function xo(e){if(typeof ShadowRoot>"u")return!1;var t=ye(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Cu(e){var t=e.state;Object.keys(t.elements).forEach(function(o){var i=t.styles[o]||{},r=t.attributes[o]||{},a=t.elements[o];!ue(a)||!Se(a)||(Object.assign(a.style,i),Object.keys(r).forEach(function(s){var l=r[s];l===!1?a.removeAttribute(s):a.setAttribute(s,l===!0?"":l)}))})}function vu(e){var t=e.state,o={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,o.popper),t.styles=o,t.elements.arrow&&Object.assign(t.elements.arrow.style,o.arrow),function(){Object.keys(t.elements).forEach(function(i){var r=t.elements[i],a=t.attributes[i]||{},s=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:o[i]),l=s.reduce(function(c,d){return c[d]="",c},{});!ue(r)||!Se(r)||(Object.assign(r.style,l),Object.keys(a).forEach(function(c){r.removeAttribute(c)}))})}}var Vr={name:"applyStyles",enabled:!0,phase:"write",fn:Cu,effect:vu,requires:["computeStyles"]};function ke(e){return e.split("-")[0]}var ot=Math.max,xn=Math.min,wt=Math.round;function Ct(e,t){t===void 0&&(t=!1);var o=e.getBoundingClientRect(),i=1,r=1;if(ue(e)&&t){var a=e.offsetHeight,s=e.offsetWidth;s>0&&(i=wt(o.width)/s||1),a>0&&(r=wt(o.height)/a||1)}return{width:o.width/i,height:o.height/r,top:o.top/r,right:o.right/i,bottom:o.bottom/r,left:o.left/i,x:o.left/i,y:o.top/r}}function Mo(e){var t=Ct(e),o=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-o)<=1&&(o=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:o,height:i}}function Rr(e,t){var o=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(o&&xo(o)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Pe(e){return ye(e).getComputedStyle(e)}function Su(e){return["table","td","th"].indexOf(Se(e))>=0}function je(e){return((bt(e)?e.ownerDocument:e.document)||window.document).documentElement}function Mn(e){return Se(e)==="html"?e:e.assignedSlot||e.parentNode||(xo(e)?e.host:null)||je(e)}function Fr(e){return!ue(e)||Pe(e).position==="fixed"?null:e.offsetParent}function ku(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,o=navigator.userAgent.indexOf("Trident")!==-1;if(o&&ue(e)){var i=Pe(e);if(i.position==="fixed")return null}var r=Mn(e);for(xo(r)&&(r=r.host);ue(r)&&["html","body"].indexOf(Se(r))<0;){var a=Pe(r);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return r;r=r.parentNode}return null}function Yt(e){for(var t=ye(e),o=Fr(e);o&&Su(o)&&Pe(o).position==="static";)o=Fr(o);return o&&(Se(o)==="html"||Se(o)==="body"&&Pe(o).position==="static")?t:o||ku(e)||t}function Bo(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Zt(e,t,o){return ot(e,xn(t,o))}function Eu(e,t,o){var i=Zt(e,t,o);return i>o?o:i}function Dr(){return{top:0,right:0,bottom:0,left:0}}function $r(e){return Object.assign({},Dr(),e)}function zr(e,t){return t.reduce(function(o,i){return o[i]=e,o},{})}var Iu=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,$r(typeof e!="number"?e:zr(e,qt))};function Tu(e){var t,o=e.state,i=e.name,r=e.options,a=o.elements.arrow,s=o.modifiersData.popperOffsets,l=ke(o.placement),c=Bo(l),d=[re,fe].indexOf(l)>=0,f=d?"height":"width";if(!(!a||!s)){var u=Iu(r.padding,o),p=Mo(a),g=c==="y"?ie:re,h=c==="y"?de:fe,m=o.rects.reference[f]+o.rects.reference[c]-s[c]-o.rects.popper[f],y=s[c]-o.rects.reference[c],b=Yt(a),C=b?c==="y"?b.clientHeight||0:b.clientWidth||0:0,I=m/2-y/2,k=u[g],v=C-p[f]-u[h],S=C/2-p[f]/2+I,E=Zt(k,S,v),O=c;o.modifiersData[i]=(t={},t[O]=E,t.centerOffset=E-S,t)}}function Au(e){var t=e.state,o=e.options,i=o.element,r=i===void 0?"[data-popper-arrow]":i;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||!Rr(t.elements.popper,r)||(t.elements.arrow=r))}var Ou={name:"arrow",enabled:!0,phase:"main",fn:Tu,effect:Au,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function vt(e){return e.split("-")[1]}var xu={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Mu(e){var t=e.x,o=e.y,i=window,r=i.devicePixelRatio||1;return{x:wt(t*r)/r||0,y:wt(o*r)/r||0}}function jr(e){var t,o=e.popper,i=e.popperRect,r=e.placement,a=e.variation,s=e.offsets,l=e.position,c=e.gpuAcceleration,d=e.adaptive,f=e.roundOffsets,u=e.isFixed,p=s.x,g=p===void 0?0:p,h=s.y,m=h===void 0?0:h,y=typeof f=="function"?f({x:g,y:m}):{x:g,y:m};g=y.x,m=y.y;var b=s.hasOwnProperty("x"),C=s.hasOwnProperty("y"),I=re,k=ie,v=window;if(d){var S=Yt(o),E="clientHeight",O="clientWidth";if(S===ye(o)&&(S=je(o),Pe(S).position!=="static"&&l==="absolute"&&(E="scrollHeight",O="scrollWidth")),S=S,r===ie||(r===re||r===fe)&&a===Gt){k=de;var M=u&&S===v&&v.visualViewport?v.visualViewport.height:S[E];m-=M-i.height,m*=c?1:-1}if(r===re||(r===ie||r===de)&&a===Gt){I=fe;var N=u&&S===v&&v.visualViewport?v.visualViewport.width:S[O];g-=N-i.width,g*=c?1:-1}}var B=Object.assign({position:l},d&&xu),T=f===!0?Mu({x:g,y:m}):{x:g,y:m};if(g=T.x,m=T.y,c){var P;return Object.assign({},B,(P={},P[k]=C?"0":"",P[I]=b?"0":"",P.transform=(v.devicePixelRatio||1)<=1?"translate("+g+"px, "+m+"px)":"translate3d("+g+"px, "+m+"px, 0)",P))}return Object.assign({},B,(t={},t[k]=C?m+"px":"",t[I]=b?g+"px":"",t.transform="",t))}function Bu(e){var t=e.state,o=e.options,i=o.gpuAcceleration,r=i===void 0?!0:i,a=o.adaptive,s=a===void 0?!0:a,l=o.roundOffsets,c=l===void 0?!0:l,d={placement:ke(t.placement),variation:vt(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,jr(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,jr(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Hr={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Bu,data:{}},Bn={passive:!0};function Nu(e){var t=e.state,o=e.instance,i=e.options,r=i.scroll,a=r===void 0?!0:r,s=i.resize,l=s===void 0?!0:s,c=ye(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&d.forEach(function(f){f.addEventListener("scroll",o.update,Bn)}),l&&c.addEventListener("resize",o.update,Bn),function(){a&&d.forEach(function(f){f.removeEventListener("scroll",o.update,Bn)}),l&&c.removeEventListener("resize",o.update,Bn)}}var Kr={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Nu,data:{}},_u={left:"right",right:"left",bottom:"top",top:"bottom"};function Nn(e){return e.replace(/left|right|bottom|top/g,function(t){return _u[t]})}var Pu={start:"end",end:"start"};function Ur(e){return e.replace(/start|end/g,function(t){return Pu[t]})}function No(e){var t=ye(e),o=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:o,scrollTop:i}}function _o(e){return Ct(je(e)).left+No(e).scrollLeft}function Lu(e){var t=ye(e),o=je(e),i=t.visualViewport,r=o.clientWidth,a=o.clientHeight,s=0,l=0;return i&&(r=i.width,a=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=i.offsetLeft,l=i.offsetTop)),{width:r,height:a,x:s+_o(e),y:l}}function Vu(e){var t,o=je(e),i=No(e),r=(t=e.ownerDocument)==null?void 0:t.body,a=ot(o.scrollWidth,o.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=ot(o.scrollHeight,o.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-i.scrollLeft+_o(e),c=-i.scrollTop;return Pe(r||o).direction==="rtl"&&(l+=ot(o.clientWidth,r?r.clientWidth:0)-a),{width:a,height:s,x:l,y:c}}function Po(e){var t=Pe(e),o=t.overflow,i=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(o+r+i)}function Wr(e){return["html","body","#document"].indexOf(Se(e))>=0?e.ownerDocument.body:ue(e)&&Po(e)?e:Wr(Mn(e))}function Qt(e,t){var o;t===void 0&&(t=[]);var i=Wr(e),r=i===((o=e.ownerDocument)==null?void 0:o.body),a=ye(i),s=r?[a].concat(a.visualViewport||[],Po(i)?i:[]):i,l=t.concat(s);return r?l:l.concat(Qt(Mn(s)))}function Lo(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ru(e){var t=Ct(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 qr(e,t){return t===Pr?Lo(Lu(e)):bt(t)?Ru(t):Lo(Vu(je(e)))}function Fu(e){var t=Qt(Mn(e)),o=["absolute","fixed"].indexOf(Pe(e).position)>=0,i=o&&ue(e)?Yt(e):e;return bt(i)?t.filter(function(r){return bt(r)&&Rr(r,i)&&Se(r)!=="body"}):[]}function Du(e,t,o){var i=t==="clippingParents"?Fu(e):[].concat(t),r=[].concat(i,[o]),a=r[0],s=r.reduce(function(l,c){var d=qr(e,c);return l.top=ot(d.top,l.top),l.right=xn(d.right,l.right),l.bottom=xn(d.bottom,l.bottom),l.left=ot(d.left,l.left),l},qr(e,a));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Gr(e){var t=e.reference,o=e.element,i=e.placement,r=i?ke(i):null,a=i?vt(i):null,s=t.x+t.width/2-o.width/2,l=t.y+t.height/2-o.height/2,c;switch(r){case ie:c={x:s,y:t.y-o.height};break;case de:c={x:s,y:t.y+t.height};break;case fe:c={x:t.x+t.width,y:l};break;case re:c={x:t.x-o.width,y:l};break;default:c={x:t.x,y:t.y}}var d=r?Bo(r):null;if(d!=null){var f=d==="y"?"height":"width";switch(a){case yt:c[d]=c[d]-(t[f]/2-o[f]/2);break;case Gt:c[d]=c[d]+(t[f]/2-o[f]/2);break}}return c}function Xt(e,t){t===void 0&&(t={});var o=t,i=o.placement,r=i===void 0?e.placement:i,a=o.boundary,s=a===void 0?lu:a,l=o.rootBoundary,c=l===void 0?Pr:l,d=o.elementContext,f=d===void 0?Jt:d,u=o.altBoundary,p=u===void 0?!1:u,g=o.padding,h=g===void 0?0:g,m=$r(typeof h!="number"?h:zr(h,qt)),y=f===Jt?cu:Jt,b=e.rects.popper,C=e.elements[p?y:f],I=Du(bt(C)?C:C.contextElement||je(e.elements.popper),s,c),k=Ct(e.elements.reference),v=Gr({reference:k,element:b,strategy:"absolute",placement:r}),S=Lo(Object.assign({},b,v)),E=f===Jt?S:k,O={top:I.top-E.top+m.top,bottom:E.bottom-I.bottom+m.bottom,left:I.left-E.left+m.left,right:E.right-I.right+m.right},M=e.modifiersData.offset;if(f===Jt&&M){var N=M[r];Object.keys(O).forEach(function(B){var T=[fe,de].indexOf(B)>=0?1:-1,P=[ie,de].indexOf(B)>=0?"y":"x";O[B]+=N[P]*T})}return O}function $u(e,t){t===void 0&&(t={});var o=t,i=o.placement,r=o.boundary,a=o.rootBoundary,s=o.padding,l=o.flipVariations,c=o.allowedAutoPlacements,d=c===void 0?On:c,f=vt(i),u=f?l?Lr:Lr.filter(function(h){return vt(h)===f}):qt,p=u.filter(function(h){return d.indexOf(h)>=0});p.length===0&&(p=u);var g=p.reduce(function(h,m){return h[m]=Xt(e,{placement:m,boundary:r,rootBoundary:a,padding:s})[ke(m)],h},{});return Object.keys(g).sort(function(h,m){return g[h]-g[m]})}function zu(e){if(ke(e)===Oo)return[];var t=Nn(e);return[Ur(e),t,Ur(t)]}function ju(e){var t=e.state,o=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var r=o.mainAxis,a=r===void 0?!0:r,s=o.altAxis,l=s===void 0?!0:s,c=o.fallbackPlacements,d=o.padding,f=o.boundary,u=o.rootBoundary,p=o.altBoundary,g=o.flipVariations,h=g===void 0?!0:g,m=o.allowedAutoPlacements,y=t.options.placement,b=ke(y),C=b===y,I=c||(C||!h?[Nn(y)]:zu(y)),k=[y].concat(I).reduce(function(Ie,ae){return Ie.concat(ke(ae)===Oo?$u(t,{placement:ae,boundary:f,rootBoundary:u,padding:d,flipVariations:h,allowedAutoPlacements:m}):ae)},[]),v=t.rects.reference,S=t.rects.popper,E=new Map,O=!0,M=k[0],N=0;N=0,V=q?"width":"height",x=Xt(t,{placement:B,boundary:f,rootBoundary:u,altBoundary:p,padding:d}),$=q?P?fe:re:P?de:ie;v[V]>S[V]&&($=Nn($));var pe=Nn($),Y=[];if(a&&Y.push(x[T]<=0),l&&Y.push(x[$]<=0,x[pe]<=0),Y.every(function(Ie){return Ie})){M=B,O=!1;break}E.set(B,Y)}if(O)for(var Z=h?3:1,ce=function(Ie){var ae=k.find(function(U){var lt=E.get(U);if(lt)return lt.slice(0,Ie).every(function(qe){return qe})});if(ae)return M=ae,"break"},Ee=Z;Ee>0;Ee--){var Mt=ce(Ee);if(Mt==="break")break}t.placement!==M&&(t.modifiersData[i]._skip=!0,t.placement=M,t.reset=!0)}}var Hu={name:"flip",enabled:!0,phase:"main",fn:ju,requiresIfExists:["offset"],data:{_skip:!1}};function Jr(e,t,o){return o===void 0&&(o={x:0,y:0}),{top:e.top-t.height-o.y,right:e.right-t.width+o.x,bottom:e.bottom-t.height+o.y,left:e.left-t.width-o.x}}function Yr(e){return[ie,fe,de,re].some(function(t){return e[t]>=0})}function Ku(e){var t=e.state,o=e.name,i=t.rects.reference,r=t.rects.popper,a=t.modifiersData.preventOverflow,s=Xt(t,{elementContext:"reference"}),l=Xt(t,{altBoundary:!0}),c=Jr(s,i),d=Jr(l,r,a),f=Yr(c),u=Yr(d);t.modifiersData[o]={referenceClippingOffsets:c,popperEscapeOffsets:d,isReferenceHidden:f,hasPopperEscaped:u},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":u})}var Uu={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ku};function Wu(e,t,o){var i=ke(e),r=[re,ie].indexOf(i)>=0?-1:1,a=typeof o=="function"?o(Object.assign({},t,{placement:e})):o,s=a[0],l=a[1];return s=s||0,l=(l||0)*r,[re,fe].indexOf(i)>=0?{x:l,y:s}:{x:s,y:l}}function qu(e){var t=e.state,o=e.options,i=e.name,r=o.offset,a=r===void 0?[0,0]:r,s=On.reduce(function(f,u){return f[u]=Wu(u,t.rects,a),f},{}),l=s[t.placement],c=l.x,d=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=d),t.modifiersData[i]=s}var Gu={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:qu};function Ju(e){var t=e.state,o=e.name;t.modifiersData[o]=Gr({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var Zr={name:"popperOffsets",enabled:!0,phase:"read",fn:Ju,data:{}};function Yu(e){return e==="x"?"y":"x"}function Zu(e){var t=e.state,o=e.options,i=e.name,r=o.mainAxis,a=r===void 0?!0:r,s=o.altAxis,l=s===void 0?!1:s,c=o.boundary,d=o.rootBoundary,f=o.altBoundary,u=o.padding,p=o.tether,g=p===void 0?!0:p,h=o.tetherOffset,m=h===void 0?0:h,y=Xt(t,{boundary:c,rootBoundary:d,padding:u,altBoundary:f}),b=ke(t.placement),C=vt(t.placement),I=!C,k=Bo(b),v=Yu(k),S=t.modifiersData.popperOffsets,E=t.rects.reference,O=t.rects.popper,M=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,N=typeof M=="number"?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,T={x:0,y:0};if(S){if(a){var P,q=k==="y"?ie:re,V=k==="y"?de:fe,x=k==="y"?"height":"width",$=S[k],pe=$+y[q],Y=$-y[V],Z=g?-O[x]/2:0,ce=C===yt?E[x]:O[x],Ee=C===yt?-O[x]:-E[x],Mt=t.elements.arrow,Ie=g&&Mt?Mo(Mt):{width:0,height:0},ae=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Dr(),U=ae[q],lt=ae[V],qe=Zt(0,E[x],Ie[x]),Jn=I?E[x]/2-Z-qe-U-N.mainAxis:ce-qe-U-N.mainAxis,Yn=I?-E[x]/2+Z+qe+lt+N.mainAxis:Ee+qe+lt+N.mainAxis,an=t.elements.arrow&&Yt(t.elements.arrow),mi=an?k==="y"?an.clientTop||0:an.clientLeft||0:0,Zn=(P=B==null?void 0:B[k])!=null?P:0,gi=$+Jn-Zn-mi,yi=$+Yn-Zn,ct=Zt(g?xn(pe,gi):pe,$,g?ot(Y,yi):Y);S[k]=ct,T[k]=ct-$}if(l){var sn,Bt=k==="x"?ie:re,Qn=k==="x"?de:fe,Ve=S[v],Nt=v==="y"?"height":"width",ln=Ve+y[Bt],Xn=Ve-y[Qn],dt=[ie,re].indexOf(b)!==-1,cn=(sn=B==null?void 0:B[v])!=null?sn:0,dn=dt?ln:Ve-E[Nt]-O[Nt]-cn+N.altAxis,fn=dt?Ve+E[Nt]+O[Nt]-cn-N.altAxis:Xn,un=g&&dt?Eu(dn,Ve,fn):Zt(g?dn:ln,Ve,g?fn:Xn);S[v]=un,T[v]=un-Ve}t.modifiersData[i]=T}}var Qu={name:"preventOverflow",enabled:!0,phase:"main",fn:Zu,requiresIfExists:["offset"]};function Xu(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function ep(e){return e===ye(e)||!ue(e)?No(e):Xu(e)}function tp(e){var t=e.getBoundingClientRect(),o=wt(t.width)/e.offsetWidth||1,i=wt(t.height)/e.offsetHeight||1;return o!==1||i!==1}function np(e,t,o){o===void 0&&(o=!1);var i=ue(t),r=ue(t)&&tp(t),a=je(t),s=Ct(e,r),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(i||!i&&!o)&&((Se(t)!=="body"||Po(a))&&(l=ep(t)),ue(t)?(c=Ct(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=_o(a))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function op(e){var t=new Map,o=new Set,i=[];e.forEach(function(a){t.set(a.name,a)});function r(a){o.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(l){if(!o.has(l)){var c=t.get(l);c&&r(c)}}),i.push(a)}return e.forEach(function(a){o.has(a.name)||r(a)}),i}function ip(e){var t=op(e);return wu.reduce(function(o,i){return o.concat(t.filter(function(r){return r.phase===i}))},[])}function rp(e){var t;return function(){return t||(t=new Promise(function(o){Promise.resolve().then(function(){t=void 0,o(e())})})),t}}function ap(e){var t=e.reduce(function(o,i){var r=o[i.name];return o[i.name]=r?Object.assign({},r,i,{options:Object.assign({},r.options,i.options),data:Object.assign({},r.data,i.data)}):i,o},{});return Object.keys(t).map(function(o){return t[o]})}var Qr={placement:"bottom",modifiers:[],strategy:"absolute"};function Xr(){for(var e=arguments.length,t=new Array(e),o=0;o{const i={name:"updateState",enabled:!0,phase:"write",fn:({state:c})=>{const d=fp(c);Object.assign(s.value,d)},requires:["computeStyles"]},r=n.computed(()=>{const{onFirstUpdate:c,placement:d,strategy:f,modifiers:u}=n.unref(o);return{onFirstUpdate:c,placement:d||"bottom",strategy:f||"absolute",modifiers:[...u||[],i,{name:"applyStyles",enabled:!1}]}}),a=n.shallowRef(),s=n.ref({styles:{popper:{position:n.unref(r).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=()=>{a.value&&(a.value.destroy(),a.value=void 0)};return n.watch(r,c=>{const d=n.unref(a);d&&d.setOptions(c)},{deep:!0}),n.watch([e,t],([c,d])=>{l(),!(!c||!d)&&(a.value=cp(c,d,n.unref(r)))}),n.onBeforeUnmount(()=>{l()}),{state:n.computed(()=>{var c;return{...((c=n.unref(a))==null?void 0:c.state)||{}}}),styles:n.computed(()=>n.unref(s).styles),attributes:n.computed(()=>n.unref(s).attributes),update:()=>{var c;return(c=n.unref(a))==null?void 0:c.update()},forceUpdate:()=>{var c;return(c=n.unref(a))==null?void 0:c.forceUpdate()},instanceRef:n.computed(()=>n.unref(a))}};function fp(e){const t=Object.keys(e.elements),o=ko(t.map(r=>[r,e.styles[r]||{}])),i=ko(t.map(r=>[r,e.attributes[r]]));return{styles:o,attributes:i}}const ea=e=>{if(!e)return{onClick:Je,onMousedown:Je,onMouseup:Je};let t=!1,o=!1;return{onClick:s=>{t&&o&&e(s),t=o=!1},onMousedown:s=>{t=s.target===s.currentTarget},onMouseup:s=>{o=s.target===s.currentTarget}}};function ta(){let e;const t=(i,r)=>{o(),e=window.setTimeout(i,r)},o=()=>window.clearTimeout(e);return Vt(()=>o()),{registerTimeout:t,cancelTimeout:o}}const Ro={prefix:Math.floor(Math.random()*1e4),current:0},up=Symbol("elIdInjection"),na=()=>n.getCurrentInstance()?n.inject(up,Ro):Ro,it=e=>{const t=na();!K&&t===Ro&&ne("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed usage: app.provide(ID_INJECTION_KEY, { prefix: number, current: number, })`);const o=Ao();return n.computed(()=>n.unref(e)||`${o.value}-id-${t.prefix}-${t.current++}`)};let St=[];const oa=e=>{const t=e;t.key===Kt.esc&&St.forEach(o=>o(t))},pp=e=>{n.onMounted(()=>{St.length===0&&document.addEventListener("keydown",oa),K&&St.push(e)}),n.onBeforeUnmount(()=>{St=St.filter(t=>t!==e),St.length===0&&K&&document.removeEventListener("keydown",oa)})};let ia;const ra=()=>{const e=Ao(),t=na(),o=n.computed(()=>`${e.value}-popper-container-${t.prefix}`),i=n.computed(()=>`#${o.value}`);return{id:o,selector:i}},hp=e=>{const t=document.createElement("div");return t.id=e,document.body.appendChild(t),t},mp=()=>{const{id:e,selector:t}=ra();return n.onBeforeMount(()=>{K&&(process.env.NODE_ENV==="test"||!ia||!document.body.querySelector(t.value))&&(ia=hp(e.value))}),{id:e,selector:t}},gp=R({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),yp=({showAfter:e,hideAfter:t,autoClose:o,open:i,close:r})=>{const{registerTimeout:a}=ta(),{registerTimeout:s,cancelTimeout:l}=ta();return{onOpen:f=>{a(()=>{i(f);const u=n.unref(o);G(u)&&u>0&&s(()=>{r(f)},u)},n.unref(e))},onClose:f=>{l(),a(()=>{r(f)},n.unref(t))}}},aa=Symbol("elForwardRef"),bp=e=>{const t=o=>{e.value=o};n.provide(aa,{setForwardRef:t})},wp=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),sa={current:0},la=n.ref(0),ca=2e3,da=Symbol("elZIndexContextKey"),fa=Symbol("zIndexContextKey"),Fo=e=>{const t=n.getCurrentInstance()?n.inject(da,sa):sa,o=e||(n.getCurrentInstance()?n.inject(fa,void 0):void 0),i=n.computed(()=>{const s=n.unref(o);return G(s)?s:ca}),r=n.computed(()=>i.value+la.value),a=()=>(t.current++,la.value=t.current,r.value);return!K&&!n.inject(da)&&ne("ZIndexInjection",`Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:i,currentZIndex:r,nextZIndex:a}},kt=Tn({type:String,values:Mr,required:!1}),ua=Symbol("size"),Cp=()=>{const e=n.inject(ua,{});return n.computed(()=>n.unref(e.size)||"")};function vp(e,{beforeFocus:t,afterFocus:o,beforeBlur:i,afterBlur:r}={}){const a=n.getCurrentInstance(),{emit:s}=a,l=n.shallowRef(),c=n.ref(!1),d=p=>{Q(t)&&t(p)||c.value||(c.value=!0,s("focus",p),o==null||o())},f=p=>{var g;Q(i)&&i(p)||p.relatedTarget&&((g=l.value)!=null&&g.contains(p.relatedTarget))||(c.value=!1,s("blur",p),r==null||r())},u=()=>{var p,g;(p=l.value)!=null&&p.contains(document.activeElement)&&l.value!==document.activeElement||(g=e.value)==null||g.focus()};return n.watch(l,p=>{p&&p.setAttribute("tabindex","-1")}),he(l,"focus",d,!0),he(l,"blur",f,!0),he(l,"click",u,!0),process.env.NODE_ENV==="test"&&n.onMounted(()=>{const p=Xe(e.value)?e.value:document.querySelector("input,textarea");p&&(he(p,"focus",d,!0),he(p,"blur",f,!0))}),{isFocused:c,wrapperRef:l,handleFocus:d,handleBlur:f}}function Sp({afterComposition:e,emit:t}){const o=n.ref(!1),i=l=>{t==null||t("compositionstart",l),o.value=!0},r=l=>{var c;t==null||t("compositionupdate",l);const d=(c=l.target)==null?void 0:c.value,f=d[d.length-1]||"";o.value=!Zf(f)},a=l=>{t==null||t("compositionend",l),o.value&&(o.value=!1,n.nextTick(()=>e(l)))};return{isComposing:o,handleComposition:l=>{l.type==="compositionend"?a(l):r(l)},handleCompositionStart:i,handleCompositionUpdate:r,handleCompositionEnd:a}}const pa=Symbol("emptyValuesContextKey"),kp="use-empty-values",Ep=["",void 0,null],Ip=void 0,Tp=R({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:e=>Q(e)?!e():!e}}),Ap=(e,t)=>{const o=n.getCurrentInstance()?n.inject(pa,n.ref({})):n.ref({}),i=n.computed(()=>e.emptyValues||o.value.emptyValues||Ep),r=n.computed(()=>Q(e.valueOnClear)?e.valueOnClear():e.valueOnClear!==void 0?e.valueOnClear:Q(o.value.valueOnClear)?o.value.valueOnClear():o.value.valueOnClear!==void 0?o.value.valueOnClear:Ip),a=s=>i.value.includes(s);return i.value.includes(r.value)||ne(kp,"value-on-clear should be a value of empty-values"),{emptyValues:i,valueOnClear:r,isEmptyValue:a}},Op=R({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),rt=e=>kr(Op,e),ha=Symbol(),_n=n.ref();function Pn(e,t=void 0){const o=n.getCurrentInstance()?n.inject(ha,_n):_n;return e?n.computed(()=>{var i,r;return(r=(i=o.value)==null?void 0:i[e])!=null?r:t}):o}function xp(e,t){const o=Pn(),i=D(e,n.computed(()=>{var l;return((l=o.value)==null?void 0:l.namespace)||Wt})),r=To(n.computed(()=>{var l;return(l=o.value)==null?void 0:l.locale})),a=Fo(n.computed(()=>{var l;return((l=o.value)==null?void 0:l.zIndex)||ca})),s=n.computed(()=>{var l;return n.unref(t)||((l=o.value)==null?void 0:l.size)||""});return Mp(n.computed(()=>n.unref(o)||{})),{ns:i,locale:r,zIndex:a,size:s}}const Mp=(e,t,o=!1)=>{var i;const r=!!n.getCurrentInstance(),a=r?Pn():void 0,s=(i=void 0)!=null?i:r?n.provide:void 0;if(!s){ne("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const l=n.computed(()=>{const c=n.unref(e);return a!=null&&a.value?Bp(a.value,c):c});return s(ha,l),s(Br,n.computed(()=>l.value.locale)),s(Nr,n.computed(()=>l.value.namespace)),s(fa,n.computed(()=>l.value.zIndex)),s(ua,{size:n.computed(()=>l.value.size||"")}),s(pa,n.computed(()=>({emptyValues:l.value.emptyValues,valueOnClear:l.value.valueOnClear}))),(o||!_n.value)&&(_n.value=l.value),l},Bp=(e,t)=>{const o=[...new Set([...Er(e),...Er(t)])],i={};for(const r of o)i[r]=t[r]!==void 0?t[r]:e[r];return i};var F=(e,t)=>{const o=e.__vccOpts||e;for(const[i,r]of t)o[i]=r;return o};const Np=R({size:{type:_([Number,String])},color:{type:String}}),_p=n.defineComponent({name:"ElIcon",inheritAttrs:!1}),Pp=n.defineComponent({..._p,props:Np,setup(e){const t=e,o=D("icon"),i=n.computed(()=>{const{size:r,color:a}=t;return!r&&!a?{}:{fontSize:ze(r)?void 0:et(r),"--color":a}});return(r,a)=>(n.openBlock(),n.createElementBlock("i",n.mergeProps({class:n.unref(o).b(),style:n.unref(i)},r.$attrs),[n.renderSlot(r.$slots,"default")],16))}});var Lp=F(Pp,[["__file","icon.vue"]]);const be=oe(Lp),Do=Symbol("formContextKey"),Ln=Symbol("formItemContextKey"),Et=(e,t={})=>{const o=n.ref(void 0),i=t.prop?o:_r("size"),r=t.global?o:Cp(),a=t.form?{size:void 0}:n.inject(Do,void 0),s=t.formItem?{size:void 0}:n.inject(Ln,void 0);return n.computed(()=>i.value||n.unref(e)||(s==null?void 0:s.size)||(a==null?void 0:a.size)||r.value||"")},Vn=e=>{const t=_r("disabled"),o=n.inject(Do,void 0);return n.computed(()=>t.value||n.unref(e)||(o==null?void 0:o.disabled)||!1)},It=()=>{const e=n.inject(Do,void 0),t=n.inject(Ln,void 0);return{form:e,formItem:t}},Rn=(e,{formItemContext:t,disableIdGeneration:o,disableIdManagement:i})=>{o||(o=n.ref(!1)),i||(i=n.ref(!1));const r=n.ref();let a;const s=n.computed(()=>{var l;return!!(!(e.label||e.ariaLabel)&&t&&t.inputIds&&((l=t.inputIds)==null?void 0:l.length)<=1)});return n.onMounted(()=>{a=n.watch([n.toRef(e,"id"),o],([l,c])=>{const d=l??(c?void 0:it().value);d!==r.value&&(t!=null&&t.removeInputId&&(r.value&&t.removeInputId(r.value),!(i!=null&&i.value)&&!c&&d&&t.addInputId(d)),r.value=d)},{immediate:!0})}),n.onUnmounted(()=>{a&&a(),t!=null&&t.removeInputId&&r.value&&t.removeInputId(r.value)}),{isLabeledByFormItem:s,inputId:r}},Tt=4,Vp={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"}},Rp=({move:e,size:t,bar:o})=>({[o.size]:t,transform:`translate${o.axis}(${e}%)`}),$o=Symbol("scrollbarContextKey"),Fp=R({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),Dp="Thumb";var ma=F(n.defineComponent({__name:"thumb",props:Fp,setup(e){const t=e,o=n.inject($o),i=D("scrollbar");o||Tr(Dp,"can not inject scrollbar context");const r=n.ref(),a=n.ref(),s=n.ref({}),l=n.ref(!1);let c=!1,d=!1,f=K?document.onselectstart:null;const u=n.computed(()=>Vp[t.vertical?"vertical":"horizontal"]),p=n.computed(()=>Rp({size:t.size,move:t.move,bar:u.value})),g=n.computed(()=>r.value[u.value.offset]**2/o.wrapElement[u.value.scrollSize]/t.ratio/a.value[u.value.offset]),h=S=>{var E;if(S.stopPropagation(),S.ctrlKey||[1,2].includes(S.button))return;(E=window.getSelection())==null||E.removeAllRanges(),y(S);const O=S.currentTarget;O&&(s.value[u.value.axis]=O[u.value.offset]-(S[u.value.client]-O.getBoundingClientRect()[u.value.direction]))},m=S=>{if(!a.value||!r.value||!o.wrapElement)return;const E=Math.abs(S.target.getBoundingClientRect()[u.value.direction]-S[u.value.client]),O=a.value[u.value.offset]/2,M=(E-O)*100*g.value/r.value[u.value.offset];o.wrapElement[u.value.scroll]=M*o.wrapElement[u.value.scrollSize]/100},y=S=>{S.stopImmediatePropagation(),c=!0,document.addEventListener("mousemove",b),document.addEventListener("mouseup",C),f=document.onselectstart,document.onselectstart=()=>!1},b=S=>{if(!r.value||!a.value||c===!1)return;const E=s.value[u.value.axis];if(!E)return;const O=(r.value.getBoundingClientRect()[u.value.direction]-S[u.value.client])*-1,M=a.value[u.value.offset]-E,N=(O-M)*100*g.value/r.value[u.value.offset];o.wrapElement[u.value.scroll]=N*o.wrapElement[u.value.scrollSize]/100},C=()=>{c=!1,s.value[u.value.axis]=0,document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",C),v(),d&&(l.value=!1)},I=()=>{d=!1,l.value=!!t.size},k=()=>{d=!0,l.value=c};n.onBeforeUnmount(()=>{v(),document.removeEventListener("mouseup",C)});const v=()=>{document.onselectstart!==f&&(document.onselectstart=f)};return he(n.toRef(o,"scrollbarElement"),"mousemove",I),he(n.toRef(o,"scrollbarElement"),"mouseleave",k),(S,E)=>(n.openBlock(),n.createBlock(n.Transition,{name:n.unref(i).b("fade"),persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",{ref_key:"instance",ref:r,class:n.normalizeClass([n.unref(i).e("bar"),n.unref(i).is(n.unref(u).key)]),onMousedown:m},[n.createElementVNode("div",{ref_key:"thumb",ref:a,class:n.normalizeClass(n.unref(i).e("thumb")),style:n.normalizeStyle(n.unref(p)),onMousedown:h},null,38)],34),[[n.vShow,S.always||l.value]])]),_:1},8,["name"]))}}),[["__file","thumb.vue"]]);const $p=R({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}});var zp=F(n.defineComponent({__name:"bar",props:$p,setup(e,{expose:t}){const o=e,i=n.inject($o),r=n.ref(0),a=n.ref(0),s=n.ref(""),l=n.ref(""),c=n.ref(1),d=n.ref(1);return t({handleScroll:p=>{if(p){const g=p.offsetHeight-Tt,h=p.offsetWidth-Tt;a.value=p.scrollTop*100/g*c.value,r.value=p.scrollLeft*100/h*d.value}},update:()=>{const p=i==null?void 0:i.wrapElement;if(!p)return;const g=p.offsetHeight-Tt,h=p.offsetWidth-Tt,m=g**2/p.scrollHeight,y=h**2/p.scrollWidth,b=Math.max(m,o.minSize),C=Math.max(y,o.minSize);c.value=m/(g-m)/(b/(g-b)),d.value=y/(h-y)/(C/(h-C)),l.value=b+Tt(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(ma,{move:r.value,ratio:d.value,size:s.value,always:p.always},null,8,["move","ratio","size","always"]),n.createVNode(ma,{move:a.value,ratio:c.value,size:l.value,vertical:"",always:p.always},null,8,["move","ratio","size","always"])],64))}}),[["__file","bar.vue"]]);const jp=R({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:_([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...rt(["ariaLabel","ariaOrientation"])}),Hp={scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(G)},zo="ElScrollbar",Kp=n.defineComponent({name:zo}),Up=n.defineComponent({...Kp,props:jp,emits:Hp,setup(e,{expose:t,emit:o}){const i=e,r=D("scrollbar");let a,s,l=0,c=0;const d=n.ref(),f=n.ref(),u=n.ref(),p=n.ref(),g=n.computed(()=>{const v={};return i.height&&(v.height=et(i.height)),i.maxHeight&&(v.maxHeight=et(i.maxHeight)),[i.wrapStyle,v]}),h=n.computed(()=>[i.wrapClass,r.e("wrap"),{[r.em("wrap","hidden-default")]:!i.native}]),m=n.computed(()=>[r.e("view"),i.viewClass]),y=()=>{var v;f.value&&((v=p.value)==null||v.handleScroll(f.value),l=f.value.scrollTop,c=f.value.scrollLeft,o("scroll",{scrollTop:f.value.scrollTop,scrollLeft:f.value.scrollLeft}))};function b(v,S){te(v)?f.value.scrollTo(v):G(v)&&G(S)&&f.value.scrollTo(v,S)}const C=v=>{if(!G(v)){ne(zo,"value must be a number");return}f.value.scrollTop=v},I=v=>{if(!G(v)){ne(zo,"value must be a number");return}f.value.scrollLeft=v},k=()=>{var v;(v=p.value)==null||v.update()};return n.watch(()=>i.noresize,v=>{v?(a==null||a(),s==null||s()):({stop:a}=Re(u,k),s=he("resize",k))},{immediate:!0}),n.watch(()=>[i.maxHeight,i.height],()=>{i.native||n.nextTick(()=>{var v;k(),f.value&&((v=p.value)==null||v.handleScroll(f.value))})}),n.provide($o,n.reactive({scrollbarElement:d,wrapElement:f})),n.onActivated(()=>{f.value&&(f.value.scrollTop=l,f.value.scrollLeft=c)}),n.onMounted(()=>{i.native||n.nextTick(()=>{k()})}),n.onUpdated(()=>k()),t({wrapRef:f,update:k,scrollTo:b,setScrollTop:C,setScrollLeft:I,handleScroll:y}),(v,S)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"scrollbarRef",ref:d,class:n.normalizeClass(n.unref(r).b())},[n.createElementVNode("div",{ref_key:"wrapRef",ref:f,class:n.normalizeClass(n.unref(h)),style:n.normalizeStyle(n.unref(g)),tabindex:v.tabindex,onScroll:y},[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(v.tag),{id:v.id,ref_key:"resizeRef",ref:u,class:n.normalizeClass(n.unref(m)),style:n.normalizeStyle(v.viewStyle),role:v.role,"aria-label":v.ariaLabel,"aria-orientation":v.ariaOrientation},{default:n.withCtx(()=>[n.renderSlot(v.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),v.native?n.createCommentVNode("v-if",!0):(n.openBlock(),n.createBlock(zp,{key:0,ref_key:"barRef",ref:p,always:v.always,"min-size":v.minSize},null,8,["always","min-size"]))],2))}});var Wp=F(Up,[["__file","scrollbar.vue"]]);const qp=oe(Wp),jo=Symbol("popper"),ga=Symbol("popperContent"),ya=R({role:{type:String,values:["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],default:"tooltip"}}),Gp=n.defineComponent({name:"ElPopper",inheritAttrs:!1}),Jp=n.defineComponent({...Gp,props:ya,setup(e,{expose:t}){const o=e,i=n.ref(),r=n.ref(),a=n.ref(),s=n.ref(),l=n.computed(()=>o.role),c={triggerRef:i,popperInstanceRef:r,contentRef:a,referenceRef:s,role:l};return t(c),n.provide(jo,c),(d,f)=>n.renderSlot(d.$slots,"default")}});var Yp=F(Jp,[["__file","popper.vue"]]);const ba=R({arrowOffset:{type:Number,default:5}}),Zp=n.defineComponent({name:"ElPopperArrow",inheritAttrs:!1}),Qp=n.defineComponent({...Zp,props:ba,setup(e,{expose:t}){const o=e,i=D("popper"),{arrowOffset:r,arrowRef:a,arrowStyle:s}=n.inject(ga,void 0);return n.watch(()=>o.arrowOffset,l=>{r.value=l}),n.onBeforeUnmount(()=>{a.value=void 0}),t({arrowRef:a}),(l,c)=>(n.openBlock(),n.createElementBlock("span",{ref_key:"arrowRef",ref:a,class:n.normalizeClass(n.unref(i).e("arrow")),style:n.normalizeStyle(n.unref(s)),"data-popper-arrow":""},null,6))}});var Xp=F(Qp,[["__file","arrow.vue"]]);const Ho="ElOnlyChild",eh=n.defineComponent({name:Ho,setup(e,{slots:t,attrs:o}){var i;const r=n.inject(aa),a=wp((i=r==null?void 0:r.setForwardRef)!=null?i:Je);return()=>{var s;const l=(s=t.default)==null?void 0:s.call(t,o);if(!l)return null;if(l.length>1)return ne(Ho,"requires exact only one valid child."),null;const c=wa(l);return c?n.withDirectives(n.cloneVNode(c,o),[[a]]):(ne(Ho,"no valid child node found"),null)}}});function wa(e){if(!e)return null;const t=e;for(const o of t){if(te(o))switch(o.type){case n.Comment:continue;case n.Text:case"svg":return Ca(o);case n.Fragment:return wa(o.children);default:return o}return Ca(o)}return null}function Ca(e){const t=D("only-child");return n.createVNode("span",{class:t.e("content")},[e])}const va=R({virtualRef:{type:_(Object)},virtualTriggering:Boolean,onMouseenter:{type:_(Function)},onMouseleave:{type:_(Function)},onClick:{type:_(Function)},onKeydown:{type:_(Function)},onFocus:{type:_(Function)},onBlur:{type:_(Function)},onContextmenu:{type:_(Function)},id:String,open:Boolean}),th=n.defineComponent({name:"ElPopperTrigger",inheritAttrs:!1}),nh=n.defineComponent({...th,props:va,setup(e,{expose:t}){const o=e,{role:i,triggerRef:r}=n.inject(jo,void 0);bp(r);const a=n.computed(()=>l.value?o.id:void 0),s=n.computed(()=>{if(i&&i.value==="tooltip")return o.open&&o.id?o.id:void 0}),l=n.computed(()=>{if(i&&i.value!=="tooltip")return i.value}),c=n.computed(()=>l.value?`${o.open}`:void 0);let d;const f=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return n.onMounted(()=>{n.watch(()=>o.virtualRef,u=>{u&&(r.value=Oe(u))},{immediate:!0}),n.watch(r,(u,p)=>{d==null||d(),d=void 0,Xe(u)&&(f.forEach(g=>{var h;const m=o[g];m&&(u.addEventListener(g.slice(2).toLowerCase(),m),(h=p==null?void 0:p.removeEventListener)==null||h.call(p,g.slice(2).toLowerCase(),m))}),d=n.watch([a,s,l,c],g=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((h,m)=>{En(g[m])?u.removeAttribute(h):u.setAttribute(h,g[m])})},{immediate:!0})),Xe(p)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(g=>p.removeAttribute(g))},{immediate:!0})}),n.onBeforeUnmount(()=>{if(d==null||d(),d=void 0,r.value&&Xe(r.value)){const u=r.value;f.forEach(p=>{const g=o[p];g&&u.removeEventListener(p.slice(2).toLowerCase(),g)}),r.value=void 0}}),t({triggerRef:r}),(u,p)=>u.virtualTriggering?n.createCommentVNode("v-if",!0):(n.openBlock(),n.createBlock(n.unref(eh),n.mergeProps({key:0},u.$attrs,{"aria-controls":n.unref(a),"aria-describedby":n.unref(s),"aria-expanded":n.unref(c),"aria-haspopup":n.unref(l)}),{default:n.withCtx(()=>[n.renderSlot(u.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var oh=F(nh,[["__file","trigger.vue"]]);const Ko="focus-trap.focus-after-trapped",Uo="focus-trap.focus-after-released",ih="focus-trap.focusout-prevented",Sa={cancelable:!0,bubbles:!1},rh={cancelable:!0,bubbles:!1},ka="focusAfterTrapped",Ea="focusAfterReleased",Ia=Symbol("elFocusTrap"),Wo=n.ref(),Fn=n.ref(0),qo=n.ref(0);let Dn=0;const Ta=e=>{const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0||i===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t},Aa=(e,t)=>{for(const o of e)if(!ah(o,t))return o},ah=(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},sh=e=>{const t=Ta(e),o=Aa(t,e),i=Aa(t.reverse(),e);return[o,i]},lh=e=>e instanceof HTMLInputElement&&"select"in e,He=(e,t)=>{if(e&&e.focus){const o=document.activeElement;e.focus({preventScroll:!0}),qo.value=window.performance.now(),e!==o&&lh(e)&&t&&e.select()}};function Oa(e,t){const o=[...e],i=e.indexOf(t);return i!==-1&&o.splice(i,1),o}const ch=()=>{let e=[];return{push:i=>{const r=e[0];r&&i!==r&&r.pause(),e=Oa(e,i),e.unshift(i)},remove:i=>{var r,a;e=Oa(e,i),(a=(r=e[0])==null?void 0:r.resume)==null||a.call(r)}}},dh=(e,t=!1)=>{const o=document.activeElement;for(const i of e)if(He(i,t),document.activeElement!==o)return},xa=ch(),fh=()=>Fn.value>qo.value,$n=()=>{Wo.value="pointer",Fn.value=window.performance.now()},Ma=()=>{Wo.value="keyboard",Fn.value=window.performance.now()},uh=()=>(n.onMounted(()=>{Dn===0&&(document.addEventListener("mousedown",$n),document.addEventListener("touchstart",$n),document.addEventListener("keydown",Ma)),Dn++}),n.onBeforeUnmount(()=>{Dn--,Dn<=0&&(document.removeEventListener("mousedown",$n),document.removeEventListener("touchstart",$n),document.removeEventListener("keydown",Ma))}),{focusReason:Wo,lastUserFocusTimestamp:Fn,lastAutomatedFocusTimestamp:qo}),zn=e=>new CustomEvent(ih,{...rh,detail:e}),ph=n.defineComponent({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[ka,Ea,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const o=n.ref();let i,r;const{focusReason:a}=uh();pp(h=>{e.trapped&&!s.paused&&t("release-requested",h)});const s={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},l=h=>{if(!e.loop&&!e.trapped||s.paused)return;const{key:m,altKey:y,ctrlKey:b,metaKey:C,currentTarget:I,shiftKey:k}=h,{loop:v}=e,S=m===Kt.tab&&!y&&!b&&!C,E=document.activeElement;if(S&&E){const O=I,[M,N]=sh(O);if(M&&N){if(!k&&E===N){const T=zn({focusReason:a.value});t("focusout-prevented",T),T.defaultPrevented||(h.preventDefault(),v&&He(M,!0))}else if(k&&[M,O].includes(E)){const T=zn({focusReason:a.value});t("focusout-prevented",T),T.defaultPrevented||(h.preventDefault(),v&&He(N,!0))}}else if(E===O){const T=zn({focusReason:a.value});t("focusout-prevented",T),T.defaultPrevented||h.preventDefault()}}};n.provide(Ia,{focusTrapRef:o,onKeydown:l}),n.watch(()=>e.focusTrapEl,h=>{h&&(o.value=h)},{immediate:!0}),n.watch([o],([h],[m])=>{h&&(h.addEventListener("keydown",l),h.addEventListener("focusin",f),h.addEventListener("focusout",u)),m&&(m.removeEventListener("keydown",l),m.removeEventListener("focusin",f),m.removeEventListener("focusout",u))});const c=h=>{t(ka,h)},d=h=>t(Ea,h),f=h=>{const m=n.unref(o);if(!m)return;const y=h.target,b=h.relatedTarget,C=y&&m.contains(y);e.trapped||b&&m.contains(b)||(i=b),C&&t("focusin",h),!s.paused&&e.trapped&&(C?r=y:He(r,!0))},u=h=>{const m=n.unref(o);if(!(s.paused||!m))if(e.trapped){const y=h.relatedTarget;!En(y)&&!m.contains(y)&&setTimeout(()=>{if(!s.paused&&e.trapped){const b=zn({focusReason:a.value});t("focusout-prevented",b),b.defaultPrevented||He(r,!0)}},0)}else{const y=h.target;y&&m.contains(y)||t("focusout",h)}};async function p(){await n.nextTick();const h=n.unref(o);if(h){xa.push(s);const m=h.contains(document.activeElement)?i:document.activeElement;if(i=m,!h.contains(m)){const b=new Event(Ko,Sa);h.addEventListener(Ko,c),h.dispatchEvent(b),b.defaultPrevented||n.nextTick(()=>{let C=e.focusStartEl;me(C)||(He(C),document.activeElement!==C&&(C="first")),C==="first"&&dh(Ta(h),!0),(document.activeElement===m||C==="container")&&He(h)})}}}function g(){const h=n.unref(o);if(h){h.removeEventListener(Ko,c);const m=new CustomEvent(Uo,{...Sa,detail:{focusReason:a.value}});h.addEventListener(Uo,d),h.dispatchEvent(m),!m.defaultPrevented&&(a.value=="keyboard"||!fh()||h.contains(document.activeElement))&&He(i??document.body),h.removeEventListener(Uo,d),xa.remove(s)}}return n.onMounted(()=>{e.trapped&&p(),n.watch(()=>e.trapped,h=>{h?p():g()})}),n.onBeforeUnmount(()=>{e.trapped&&g(),o.value&&(o.value.removeEventListener("keydown",l),o.value.removeEventListener("focusin",f),o.value.removeEventListener("focusout",u),o.value=void 0)}),{onKeydown:l}}});function hh(e,t,o,i,r,a){return n.renderSlot(e.$slots,"default",{handleKeydown:e.onKeydown})}var Ba=F(ph,[["render",hh],["__file","focus-trap.vue"]]);const mh=["fixed","absolute"],gh=R({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:_(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:On,default:"bottom"},popperOptions:{type:_(Object),default:()=>({})},strategy:{type:String,values:mh,default:"absolute"}}),Na=R({...gh,id:String,style:{type:_([String,Array,Object])},className:{type:_([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:_([String,Array,Object])},popperStyle:{type:_([String,Array,Object])},referenceEl:{type:_(Object)},triggerTargetEl:{type:_(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...rt(["ariaLabel"])}),yh={mouseenter:e=>e instanceof MouseEvent,mouseleave:e=>e instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},bh=(e,t=[])=>{const{placement:o,strategy:i,popperOptions:r}=e,a={placement:o,strategy:i,...r,modifiers:[...Ch(e),...t]};return vh(a,r==null?void 0:r.modifiers),a},wh=e=>{if(K)return Oe(e)};function Ch(e){const{offset:t,gpuAcceleration:o,fallbackPlacements:i}=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:i}},{name:"computeStyles",options:{gpuAcceleration:o}}]}function vh(e,t){t&&(e.modifiers=[...e.modifiers,...t??[]])}const Sh=0,kh=e=>{const{popperInstanceRef:t,contentRef:o,triggerRef:i,role:r}=n.inject(jo,void 0),a=n.ref(),s=n.ref(),l=n.computed(()=>({name:"eventListeners",enabled:!!e.visible})),c=n.computed(()=>{var b;const C=n.unref(a),I=(b=n.unref(s))!=null?b:Sh;return{name:"arrow",enabled:!Sr(C),options:{element:C,padding:I}}}),d=n.computed(()=>({onFirstUpdate:()=>{h()},...bh(e,[n.unref(c),n.unref(l)])})),f=n.computed(()=>wh(e.referenceEl)||n.unref(i)),{attributes:u,state:p,styles:g,update:h,forceUpdate:m,instanceRef:y}=dp(f,o,d);return n.watch(y,b=>t.value=b),n.onMounted(()=>{n.watch(()=>{var b;return(b=n.unref(f))==null?void 0:b.getBoundingClientRect()},()=>{h()})}),{attributes:u,arrowRef:a,contentRef:o,instanceRef:y,state:p,styles:g,role:r,forceUpdate:m,update:h}},Eh=(e,{attributes:t,styles:o,role:i})=>{const{nextZIndex:r}=Fo(),a=D("popper"),s=n.computed(()=>n.unref(t).popper),l=n.ref(G(e.zIndex)?e.zIndex:r()),c=n.computed(()=>[a.b(),a.is("pure",e.pure),a.is(e.effect),e.popperClass]),d=n.computed(()=>[{zIndex:n.unref(l)},n.unref(o).popper,e.popperStyle||{}]),f=n.computed(()=>i.value==="dialog"?"false":void 0),u=n.computed(()=>n.unref(o).arrow||{});return{ariaModal:f,arrowStyle:u,contentAttrs:s,contentClass:c,contentStyle:d,contentZIndex:l,updateZIndex:()=>{l.value=G(e.zIndex)?e.zIndex:r()}}},Ih=(e,t)=>{const o=n.ref(!1),i=n.ref();return{focusStartRef:i,trapped:o,onFocusAfterReleased:d=>{var f;((f=d.detail)==null?void 0:f.focusReason)!=="pointer"&&(i.value="first",t("blur"))},onFocusAfterTrapped:()=>{t("focus")},onFocusInTrap:d=>{e.visible&&!o.value&&(d.target&&(i.value=d.target),o.value=!0)},onFocusoutPrevented:d=>{e.trapping||(d.detail.focusReason==="pointer"&&d.preventDefault(),o.value=!1)},onReleaseRequested:()=>{o.value=!1,t("close")}}},Th=n.defineComponent({name:"ElPopperContent"}),Ah=n.defineComponent({...Th,props:Na,emits:yh,setup(e,{expose:t,emit:o}){const i=e,{focusStartRef:r,trapped:a,onFocusAfterReleased:s,onFocusAfterTrapped:l,onFocusInTrap:c,onFocusoutPrevented:d,onReleaseRequested:f}=Ih(i,o),{attributes:u,arrowRef:p,contentRef:g,styles:h,instanceRef:m,role:y,update:b}=kh(i),{ariaModal:C,arrowStyle:I,contentAttrs:k,contentClass:v,contentStyle:S,updateZIndex:E}=Eh(i,{styles:h,attributes:u,role:y}),O=n.inject(Ln,void 0),M=n.ref();n.provide(ga,{arrowStyle:I,arrowRef:p,arrowOffset:M}),O&&n.provide(Ln,{...O,addInputId:Je,removeInputId:Je});let N;const B=(P=!0)=>{b(),P&&E()},T=()=>{B(!1),i.visible&&i.focusOnShow?a.value=!0:i.visible===!1&&(a.value=!1)};return n.onMounted(()=>{n.watch(()=>i.triggerTargetEl,(P,q)=>{N==null||N(),N=void 0;const V=n.unref(P||g.value),x=n.unref(q||g.value);Xe(V)&&(N=n.watch([y,()=>i.ariaLabel,C,()=>i.id],$=>{["role","aria-label","aria-modal","id"].forEach((pe,Y)=>{En($[Y])?V.removeAttribute(pe):V.setAttribute(pe,$[Y])})},{immediate:!0})),x!==V&&Xe(x)&&["role","aria-label","aria-modal","id"].forEach($=>{x.removeAttribute($)})},{immediate:!0}),n.watch(()=>i.visible,T,{immediate:!0})}),n.onBeforeUnmount(()=>{N==null||N(),N=void 0}),t({popperContentRef:g,popperInstanceRef:m,updatePopper:B,contentStyle:S}),(P,q)=>(n.openBlock(),n.createElementBlock("div",n.mergeProps({ref_key:"contentRef",ref:g},n.unref(k),{style:n.unref(S),class:n.unref(v),tabindex:"-1",onMouseenter:V=>P.$emit("mouseenter",V),onMouseleave:V=>P.$emit("mouseleave",V)}),[n.createVNode(n.unref(Ba),{trapped:n.unref(a),"trap-on-focus-in":!0,"focus-trap-el":n.unref(g),"focus-start-el":n.unref(r),onFocusAfterTrapped:n.unref(l),onFocusAfterReleased:n.unref(s),onFocusin:n.unref(c),onFocusoutPrevented:n.unref(d),onReleaseRequested:n.unref(f)},{default:n.withCtx(()=>[n.renderSlot(P.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var Oh=F(Ah,[["__file","content.vue"]]);const xh=oe(Yp),Go=Symbol("elTooltip"),se=R({...gp,...Na,appendTo:{type:_([String,Object])},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:_(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...rt(["ariaLabel"])}),en=R({...va,disabled:Boolean,trigger:{type:_([String,Array]),default:"hover"},triggerKeys:{type:_(Array),default:()=>[Kt.enter,Kt.space]}}),{useModelToggleProps:Mh,useModelToggleEmits:Bh,useModelToggle:Nh}=su("visible"),_h=R({...ya,...Mh,...se,...en,...ba,showArrow:{type:Boolean,default:!0}}),Ph=[...Bh,"before-show","before-hide","show","hide","open","close"],Lh=(e,t)=>ee(e)?e.includes(t):e===t,At=(e,t,o)=>i=>{Lh(n.unref(e),t)&&o(i)},Vh=n.defineComponent({name:"ElTooltipTrigger"}),Rh=n.defineComponent({...Vh,props:en,setup(e,{expose:t}){const o=e,i=D("tooltip"),{controlled:r,id:a,open:s,onOpen:l,onClose:c,onToggle:d}=n.inject(Go,void 0),f=n.ref(null),u=()=>{if(n.unref(r)||o.disabled)return!0},p=n.toRef(o,"trigger"),g=Ae(u,At(p,"hover",l)),h=Ae(u,At(p,"hover",c)),m=Ae(u,At(p,"click",k=>{k.button===0&&d(k)})),y=Ae(u,At(p,"focus",l)),b=Ae(u,At(p,"focus",c)),C=Ae(u,At(p,"contextmenu",k=>{k.preventDefault(),d(k)})),I=Ae(u,k=>{const{code:v}=k;o.triggerKeys.includes(v)&&(k.preventDefault(),d(k))});return t({triggerRef:f}),(k,v)=>(n.openBlock(),n.createBlock(n.unref(oh),{id:n.unref(a),"virtual-ref":k.virtualRef,open:n.unref(s),"virtual-triggering":k.virtualTriggering,class:n.normalizeClass(n.unref(i).e("trigger")),onBlur:n.unref(b),onClick:n.unref(m),onContextmenu:n.unref(C),onFocus:n.unref(y),onMouseenter:n.unref(g),onMouseleave:n.unref(h),onKeydown:n.unref(I)},{default:n.withCtx(()=>[n.renderSlot(k.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var Fh=F(Rh,[["__file","trigger.vue"]]);const Dh=R({to:{type:_([String,Object]),required:!0},disabled:Boolean});var $h=F(n.defineComponent({__name:"teleport",props:Dh,setup(e){return(t,o)=>t.disabled?n.renderSlot(t.$slots,"default",{key:0}):(n.openBlock(),n.createBlock(n.Teleport,{key:1,to:t.to},[n.renderSlot(t.$slots,"default")],8,["to"]))}}),[["__file","teleport.vue"]]);const _a=oe($h),zh=n.defineComponent({name:"ElTooltipContent",inheritAttrs:!1}),jh=n.defineComponent({...zh,props:se,setup(e,{expose:t}){const o=e,{selector:i}=ra(),r=D("tooltip"),a=n.ref(null);let s;const{controlled:l,id:c,open:d,trigger:f,onClose:u,onOpen:p,onShow:g,onHide:h,onBeforeShow:m,onBeforeHide:y}=n.inject(Go,void 0),b=n.computed(()=>o.transition||`${r.namespace.value}-fade-in-linear`),C=n.computed(()=>process.env.NODE_ENV==="test"?!0:o.persistent);n.onBeforeUnmount(()=>{s==null||s()});const I=n.computed(()=>n.unref(C)?!0:n.unref(d)),k=n.computed(()=>o.disabled?!1:n.unref(d)),v=n.computed(()=>o.appendTo||i.value),S=n.computed(()=>{var x;return(x=o.style)!=null?x:{}}),E=n.ref(!0),O=()=>{h(),E.value=!0},M=()=>{if(n.unref(l))return!0},N=Ae(M,()=>{o.enterable&&n.unref(f)==="hover"&&p()}),B=Ae(M,()=>{n.unref(f)==="hover"&&u()}),T=()=>{var x,$;($=(x=a.value)==null?void 0:x.updatePopper)==null||$.call(x),m==null||m()},P=()=>{y==null||y()},q=()=>{g(),s=Bs(n.computed(()=>{var x;return(x=a.value)==null?void 0:x.popperContentRef}),()=>{if(n.unref(l))return;n.unref(f)!=="hover"&&u()})},V=()=>{o.virtualTriggering||u()};return n.watch(()=>n.unref(d),x=>{x?E.value=!1:s==null||s()},{flush:"post"}),n.watch(()=>o.content,()=>{var x,$;($=(x=a.value)==null?void 0:x.updatePopper)==null||$.call(x)}),t({contentRef:a}),(x,$)=>(n.openBlock(),n.createBlock(n.unref(_a),{disabled:!x.teleported,to:n.unref(v)},{default:n.withCtx(()=>[n.createVNode(n.Transition,{name:n.unref(b),onAfterLeave:O,onBeforeEnter:T,onAfterEnter:q,onBeforeLeave:P},{default:n.withCtx(()=>[n.unref(I)?n.withDirectives((n.openBlock(),n.createBlock(n.unref(Oh),n.mergeProps({key:0,id:n.unref(c),ref_key:"contentRef",ref:a},x.$attrs,{"aria-label":x.ariaLabel,"aria-hidden":E.value,"boundaries-padding":x.boundariesPadding,"fallback-placements":x.fallbackPlacements,"gpu-acceleration":x.gpuAcceleration,offset:x.offset,placement:x.placement,"popper-options":x.popperOptions,strategy:x.strategy,effect:x.effect,enterable:x.enterable,pure:x.pure,"popper-class":x.popperClass,"popper-style":[x.popperStyle,n.unref(S)],"reference-el":x.referenceEl,"trigger-target-el":x.triggerTargetEl,visible:n.unref(k),"z-index":x.zIndex,onMouseenter:n.unref(N),onMouseleave:n.unref(B),onBlur:V,onClose:n.unref(u)}),{default:n.withCtx(()=>[n.renderSlot(x.$slots,"default")]),_: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"])),[[n.vShow,n.unref(k)]]):n.createCommentVNode("v-if",!0)]),_:3},8,["name"])]),_:3},8,["disabled","to"]))}});var Hh=F(jh,[["__file","content.vue"]]);const Kh=n.defineComponent({name:"ElTooltip"}),Uh=n.defineComponent({...Kh,props:_h,emits:Ph,setup(e,{expose:t,emit:o}){const i=e;mp();const r=it(),a=n.ref(),s=n.ref(),l=()=>{var b;const C=n.unref(a);C&&((b=C.popperInstanceRef)==null||b.update())},c=n.ref(!1),d=n.ref(),{show:f,hide:u,hasUpdateHandler:p}=Nh({indicator:c,toggleReason:d}),{onOpen:g,onClose:h}=yp({showAfter:n.toRef(i,"showAfter"),hideAfter:n.toRef(i,"hideAfter"),autoClose:n.toRef(i,"autoClose"),open:f,close:u}),m=n.computed(()=>_e(i.visible)&&!p.value);n.provide(Go,{controlled:m,id:r,open:n.readonly(c),trigger:n.toRef(i,"trigger"),onOpen:b=>{g(b)},onClose:b=>{h(b)},onToggle:b=>{n.unref(c)?h(b):g(b)},onShow:()=>{o("show",d.value)},onHide:()=>{o("hide",d.value)},onBeforeShow:()=>{o("before-show",d.value)},onBeforeHide:()=>{o("before-hide",d.value)},updatePopper:l}),n.watch(()=>i.disabled,b=>{b&&c.value&&(c.value=!1)});const y=b=>{var C,I;const k=(I=(C=s.value)==null?void 0:C.contentRef)==null?void 0:I.popperContentRef,v=(b==null?void 0:b.relatedTarget)||document.activeElement;return k&&k.contains(v)};return n.onDeactivated(()=>c.value&&u()),t({popperRef:a,contentRef:s,isFocusInsideContent:y,updatePopper:l,onOpen:g,onClose:h,hide:u}),(b,C)=>(n.openBlock(),n.createBlock(n.unref(xh),{ref_key:"popperRef",ref:a,role:b.role},{default:n.withCtx(()=>[n.createVNode(Fh,{disabled:b.disabled,trigger:b.trigger,"trigger-keys":b.triggerKeys,"virtual-ref":b.virtualRef,"virtual-triggering":b.virtualTriggering},{default:n.withCtx(()=>[b.$slots.default?n.renderSlot(b.$slots,"default",{key:0}):n.createCommentVNode("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),n.createVNode(Hh,{ref_key:"contentRef",ref:s,"aria-label":b.ariaLabel,"boundaries-padding":b.boundariesPadding,content:b.content,disabled:b.disabled,effect:b.effect,enterable:b.enterable,"fallback-placements":b.fallbackPlacements,"hide-after":b.hideAfter,"gpu-acceleration":b.gpuAcceleration,offset:b.offset,persistent:b.persistent,"popper-class":b.popperClass,"popper-style":b.popperStyle,placement:b.placement,"popper-options":b.popperOptions,pure:b.pure,"raw-content":b.rawContent,"reference-el":b.referenceEl,"trigger-target-el":b.triggerTargetEl,"show-after":b.showAfter,strategy:b.strategy,teleported:b.teleported,transition:b.transition,"virtual-triggering":b.virtualTriggering,"z-index":b.zIndex,"append-to":b.appendTo},{default:n.withCtx(()=>[n.renderSlot(b.$slots,"content",{},()=>[b.rawContent?(n.openBlock(),n.createElementBlock("span",{key:0,innerHTML:b.content},null,8,["innerHTML"])):(n.openBlock(),n.createElementBlock("span",{key:1},n.toDisplayString(b.content),1))]),b.showArrow?(n.openBlock(),n.createBlock(n.unref(Xp),{key:0,"arrow-offset":b.arrowOffset},null,8,["arrow-offset"])):n.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 Wh=F(Uh,[["__file","tooltip.vue"]]);const Pa=oe(Wh),La=Symbol("buttonGroupContextKey"),qh=(e,t)=>{gt({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},n.computed(()=>e.type==="text"));const o=n.inject(La,void 0),i=Pn("button"),{form:r}=It(),a=Et(n.computed(()=>o==null?void 0:o.size)),s=Vn(),l=n.ref(),c=n.useSlots(),d=n.computed(()=>e.type||(o==null?void 0:o.type)||""),f=n.computed(()=>{var h,m,y;return(y=(m=e.autoInsertSpace)!=null?m:(h=i.value)==null?void 0:h.autoInsertSpace)!=null?y:!1}),u=n.computed(()=>e.tag==="button"?{ariaDisabled:s.value||e.loading,disabled:s.value||e.loading,autofocus:e.autofocus,type:e.nativeType}:{}),p=n.computed(()=>{var h;const m=(h=c.default)==null?void 0:h.call(c);if(f.value&&(m==null?void 0:m.length)===1){const y=m[0];if((y==null?void 0:y.type)===n.Text){const b=y.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(b.trim())}}return!1});return{_disabled:s,_size:a,_type:d,_ref:l,_props:u,shouldAddSpace:p,handleClick:h=>{if(s.value||e.loading){h.stopPropagation();return}e.nativeType==="reset"&&(r==null||r.resetFields()),t("click",h)}}},Jo=R({size:kt,disabled:Boolean,type:{type:String,values:["default","primary","success","warning","info","danger","text",""],default:""},icon:{type:mt},nativeType:{type:String,values:["button","submit","reset"],default:"button"},loading:Boolean,loadingIcon:{type:mt,default:()=>W.Loading},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:_([String,Object]),default:"button"}}),Gh={click:e=>e instanceof MouseEvent};function J(e,t){Jh(e)&&(e="100%");var o=Yh(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),o&&(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 jn(e){return Math.min(1,Math.max(0,e))}function Jh(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Yh(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Va(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Hn(e){return e<=1?"".concat(Number(e)*100,"%"):e}function at(e){return e.length===1?"0"+e:String(e)}function Zh(e,t,o){return{r:J(e,255)*255,g:J(t,255)*255,b:J(o,255)*255}}function Ra(e,t,o){e=J(e,255),t=J(t,255),o=J(o,255);var i=Math.max(e,t,o),r=Math.min(e,t,o),a=0,s=0,l=(i+r)/2;if(i===r)s=0,a=0;else{var c=i-r;switch(s=l>.5?c/(2-i-r):c/(i+r),i){case e:a=(t-o)/c+(t1&&(o-=1),o<1/6?e+(t-e)*(6*o):o<1/2?t:o<2/3?e+(t-e)*(2/3-o)*6:e}function Qh(e,t,o){var i,r,a;if(e=J(e,360),t=J(t,100),o=J(o,100),t===0)r=o,a=o,i=o;else{var s=o<.5?o*(1+t):o+t-o*t,l=2*o-s;i=Yo(l,s,e+1/3),r=Yo(l,s,e),a=Yo(l,s,e-1/3)}return{r:i*255,g:r*255,b:a*255}}function Fa(e,t,o){e=J(e,255),t=J(t,255),o=J(o,255);var i=Math.max(e,t,o),r=Math.min(e,t,o),a=0,s=i,l=i-r,c=i===0?0:l/i;if(i===r)a=0;else{switch(i){case e:a=(t-o)/l+(t>16,g:(e&65280)>>8,b:e&255}}var Zo={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 om(e){var t={r:0,g:0,b:0},o=1,i=null,r=null,a=null,s=!1,l=!1;return typeof e=="string"&&(e=am(e)),typeof e=="object"&&(Le(e.r)&&Le(e.g)&&Le(e.b)?(t=Zh(e.r,e.g,e.b),s=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Le(e.h)&&Le(e.s)&&Le(e.v)?(i=Hn(e.s),r=Hn(e.v),t=Xh(e.h,i,r),s=!0,l="hsv"):Le(e.h)&&Le(e.s)&&Le(e.l)&&(i=Hn(e.s),a=Hn(e.l),t=Qh(e.h,i,a),s=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(o=e.a)),o=Va(o),{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:o}}var im="[-\\+]?\\d+%?",rm="[-\\+]?\\d*\\.\\d+%?",Ke="(?:".concat(rm,")|(?:").concat(im,")"),Qo="[\\s|\\(]+(".concat(Ke,")[,|\\s]+(").concat(Ke,")[,|\\s]+(").concat(Ke,")\\s*\\)?"),Xo="[\\s|\\(]+(".concat(Ke,")[,|\\s]+(").concat(Ke,")[,|\\s]+(").concat(Ke,")[,|\\s]+(").concat(Ke,")\\s*\\)?"),we={CSS_UNIT:new RegExp(Ke),rgb:new RegExp("rgb"+Qo),rgba:new RegExp("rgba"+Xo),hsl:new RegExp("hsl"+Qo),hsla:new RegExp("hsla"+Xo),hsv:new RegExp("hsv"+Qo),hsva:new RegExp("hsva"+Xo),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 am(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Zo[e])e=Zo[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var o=we.rgb.exec(e);return o?{r:o[1],g:o[2],b:o[3]}:(o=we.rgba.exec(e),o?{r:o[1],g:o[2],b:o[3],a:o[4]}:(o=we.hsl.exec(e),o?{h:o[1],s:o[2],l:o[3]}:(o=we.hsla.exec(e),o?{h:o[1],s:o[2],l:o[3],a:o[4]}:(o=we.hsv.exec(e),o?{h:o[1],s:o[2],v:o[3]}:(o=we.hsva.exec(e),o?{h:o[1],s:o[2],v:o[3],a:o[4]}:(o=we.hex8.exec(e),o?{r:le(o[1]),g:le(o[2]),b:le(o[3]),a:$a(o[4]),format:t?"name":"hex8"}:(o=we.hex6.exec(e),o?{r:le(o[1]),g:le(o[2]),b:le(o[3]),format:t?"name":"hex"}:(o=we.hex4.exec(e),o?{r:le(o[1]+o[1]),g:le(o[2]+o[2]),b:le(o[3]+o[3]),a:$a(o[4]+o[4]),format:t?"name":"hex8"}:(o=we.hex3.exec(e),o?{r:le(o[1]+o[1]),g:le(o[2]+o[2]),b:le(o[3]+o[3]),format:t?"name":"hex"}:!1)))))))))}function Le(e){return!!we.CSS_UNIT.exec(String(e))}var sm=function(){function e(t,o){t===void 0&&(t=""),o===void 0&&(o={});var i;if(t instanceof e)return t;typeof t=="number"&&(t=nm(t)),this.originalInput=t;var r=om(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=(i=o.format)!==null&&i!==void 0?i:r.format,this.gradientType=o.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=r.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(),o,i,r,a=t.r/255,s=t.g/255,l=t.b/255;return a<=.03928?o=a/12.92:o=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),l<=.03928?r=l/12.92:r=Math.pow((l+.055)/1.055,2.4),.2126*o+.7152*i+.0722*r},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=Va(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=Fa(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=Fa(this.r,this.g,this.b),o=Math.round(t.h*360),i=Math.round(t.s*100),r=Math.round(t.v*100);return this.a===1?"hsv(".concat(o,", ").concat(i,"%, ").concat(r,"%)"):"hsva(".concat(o,", ").concat(i,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=Ra(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=Ra(this.r,this.g,this.b),o=Math.round(t.h*360),i=Math.round(t.s*100),r=Math.round(t.l*100);return this.a===1?"hsl(".concat(o,", ").concat(i,"%, ").concat(r,"%)"):"hsla(".concat(o,", ").concat(i,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),Da(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),em(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),o=Math.round(this.g),i=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(o,", ").concat(i,")"):"rgba(".concat(t,", ").concat(o,", ").concat(i,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(o){return"".concat(Math.round(J(o,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(o){return Math.round(J(o,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="#"+Da(this.r,this.g,this.b,!1),o=0,i=Object.entries(Zo);o=0,a=!o&&r&&(t.startsWith("hex")||t==="name");return a?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(i=this.toRgbString()),t==="prgb"&&(i=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(i=this.toHexString()),t==="hex3"&&(i=this.toHexString(!0)),t==="hex4"&&(i=this.toHex8String(!0)),t==="hex8"&&(i=this.toHex8String()),t==="name"&&(i=this.toName()),t==="hsl"&&(i=this.toHslString()),t==="hsv"&&(i=this.toHsvString()),i||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 o=this.toHsl();return o.l+=t/100,o.l=jn(o.l),new e(o)},e.prototype.brighten=function(t){t===void 0&&(t=10);var o=this.toRgb();return o.r=Math.max(0,Math.min(255,o.r-Math.round(255*-(t/100)))),o.g=Math.max(0,Math.min(255,o.g-Math.round(255*-(t/100)))),o.b=Math.max(0,Math.min(255,o.b-Math.round(255*-(t/100)))),new e(o)},e.prototype.darken=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.l-=t/100,o.l=jn(o.l),new e(o)},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 o=this.toHsl();return o.s-=t/100,o.s=jn(o.s),new e(o)},e.prototype.saturate=function(t){t===void 0&&(t=10);var o=this.toHsl();return o.s+=t/100,o.s=jn(o.s),new e(o)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var o=this.toHsl(),i=(o.h+t)%360;return o.h=i<0?360+i:i,new e(o)},e.prototype.mix=function(t,o){o===void 0&&(o=50);var i=this.toRgb(),r=new e(t).toRgb(),a=o/100,s={r:(r.r-i.r)*a+i.r,g:(r.g-i.g)*a+i.g,b:(r.b-i.b)*a+i.b,a:(r.a-i.a)*a+i.a};return new e(s)},e.prototype.analogous=function(t,o){t===void 0&&(t=6),o===void 0&&(o=30);var i=this.toHsl(),r=360/o,a=[this];for(i.h=(i.h-(r*t>>1)+720)%360;--t;)i.h=(i.h+r)%360,a.push(new e(i));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var o=this.toHsv(),i=o.h,r=o.s,a=o.v,s=[],l=1/t;t--;)s.push(new e({h:i,s:r,v:a})),a=(a+l)%1;return s},e.prototype.splitcomplement=function(){var t=this.toHsl(),o=t.h;return[this,new e({h:(o+72)%360,s:t.s,l:t.l}),new e({h:(o+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var o=this.toRgb(),i=new e(t).toRgb(),r=o.a+i.a*(1-o.a);return new e({r:(o.r*o.a+i.r*i.a*(1-o.a))/r,g:(o.g*o.a+i.g*i.a*(1-o.a))/r,b:(o.b*o.a+i.b*i.a*(1-o.a))/r,a:r})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var o=this.toHsl(),i=o.h,r=[this],a=360/t,s=1;s{let i={},r=e.color;if(r){const a=r.match(/var\((.*?)\)/);a&&(r=window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));const s=new sm(r),l=e.dark?s.tint(20).toString():Ue(s,20);if(e.plain)i=o.cssVarBlock({"bg-color":e.dark?Ue(s,90):s.tint(90).toString(),"text-color":r,"border-color":e.dark?Ue(s,50):s.tint(50).toString(),"hover-text-color":`var(${o.cssVarName("color-white")})`,"hover-bg-color":r,"hover-border-color":r,"active-bg-color":l,"active-text-color":`var(${o.cssVarName("color-white")})`,"active-border-color":l}),t.value&&(i[o.cssVarBlockName("disabled-bg-color")]=e.dark?Ue(s,90):s.tint(90).toString(),i[o.cssVarBlockName("disabled-text-color")]=e.dark?Ue(s,50):s.tint(50).toString(),i[o.cssVarBlockName("disabled-border-color")]=e.dark?Ue(s,80):s.tint(80).toString());else{const c=e.dark?Ue(s,30):s.tint(30).toString(),d=s.isDark()?`var(${o.cssVarName("color-white")})`:`var(${o.cssVarName("color-black")})`;if(i=o.cssVarBlock({"bg-color":r,"text-color":d,"border-color":r,"hover-bg-color":c,"hover-text-color":d,"hover-border-color":c,"active-bg-color":l,"active-border-color":l}),t.value){const f=e.dark?Ue(s,50):s.tint(50).toString();i[o.cssVarBlockName("disabled-bg-color")]=f,i[o.cssVarBlockName("disabled-text-color")]=e.dark?"rgba(255, 255, 255, 0.5)":`var(${o.cssVarName("color-white")})`,i[o.cssVarBlockName("disabled-border-color")]=f}}}return i})}const cm=n.defineComponent({name:"ElButton"}),dm=n.defineComponent({...cm,props:Jo,emits:Gh,setup(e,{expose:t,emit:o}){const i=e,r=lm(i),a=D("button"),{_ref:s,_size:l,_type:c,_disabled:d,_props:f,shouldAddSpace:u,handleClick:p}=qh(i,o),g=n.computed(()=>[a.b(),a.m(c.value),a.m(l.value),a.is("disabled",d.value),a.is("loading",i.loading),a.is("plain",i.plain),a.is("round",i.round),a.is("circle",i.circle),a.is("text",i.text),a.is("link",i.link),a.is("has-bg",i.bg)]);return t({ref:s,size:l,type:c,disabled:d,shouldAddSpace:u}),(h,m)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(h.tag),n.mergeProps({ref_key:"_ref",ref:s},n.unref(f),{class:n.unref(g),style:n.unref(r),onClick:n.unref(p)}),{default:n.withCtx(()=>[h.loading?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[h.$slots.loading?n.renderSlot(h.$slots,"loading",{key:0}):(n.openBlock(),n.createBlock(n.unref(be),{key:1,class:n.normalizeClass(n.unref(a).is("loading"))},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(h.loadingIcon)))]),_:1},8,["class"]))],64)):h.icon||h.$slots.icon?(n.openBlock(),n.createBlock(n.unref(be),{key:1},{default:n.withCtx(()=>[h.icon?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(h.icon),{key:0})):n.renderSlot(h.$slots,"icon",{key:1})]),_:3})):n.createCommentVNode("v-if",!0),h.$slots.default?(n.openBlock(),n.createElementBlock("span",{key:2,class:n.normalizeClass({[n.unref(a).em("text","expand")]:n.unref(u)})},[n.renderSlot(h.$slots,"default")],2)):n.createCommentVNode("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var fm=F(dm,[["__file","button.vue"]]);const um={size:Jo.size,type:Jo.type},pm=n.defineComponent({name:"ElButtonGroup"}),hm=n.defineComponent({...pm,props:um,setup(e){const t=e;n.provide(La,n.reactive({size:n.toRef(t,"size"),type:n.toRef(t,"type")}));const o=D("button");return(i,r)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(n.unref(o).b("group"))},[n.renderSlot(i.$slots,"default")],2))}});var za=F(hm,[["__file","button-group.vue"]]);const ei=oe(fm,{ButtonGroup:za});tt(za);var mm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function gm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const We=new Map;if(K){let e;document.addEventListener("mousedown",t=>e=t),document.addEventListener("mouseup",t=>{if(e){for(const o of We.values())for(const{documentHandler:i}of o)i(t,e);e=void 0}})}function ja(e,t){let o=[];return Array.isArray(t.arg)?o=t.arg:Xe(t.arg)&&o.push(t.arg),function(i,r){const a=t.instance.popperRef,s=i.target,l=r==null?void 0:r.target,c=!t||!t.instance,d=!s||!l,f=e.contains(s)||e.contains(l),u=e===s,p=o.length&&o.some(h=>h==null?void 0:h.contains(s))||o.length&&o.includes(l),g=a&&(a.contains(s)||a.contains(l));c||d||f||u||p||g||t.value(i,r)}}const ym={beforeMount(e,t){We.has(e)||We.set(e,[]),We.get(e).push({documentHandler:ja(e,t),bindingFn:t.value})},updated(e,t){We.has(e)||We.set(e,[]);const o=We.get(e),i=o.findIndex(a=>a.bindingFn===t.oldValue),r={documentHandler:ja(e,t),bindingFn:t.value};i>=0?o.splice(i,1,r):o.push(r)},unmounted(e){We.delete(e)}},Ha={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:kt,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...rt(["ariaControls"])},Ka={[X]:e=>me(e)||G(e)||_e(e),change:e=>me(e)||G(e)||_e(e)},Ot=Symbol("checkboxGroupContextKey"),bm=({model:e,isChecked:t})=>{const o=n.inject(Ot,void 0),i=n.computed(()=>{var a,s;const l=(a=o==null?void 0:o.max)==null?void 0:a.value,c=(s=o==null?void 0:o.min)==null?void 0:s.value;return!ze(l)&&e.value.length>=l&&!t.value||!ze(c)&&e.value.length<=c&&t.value});return{isDisabled:Vn(n.computed(()=>(o==null?void 0:o.disabled.value)||i.value)),isLimitDisabled:i}},wm=(e,{model:t,isLimitExceeded:o,hasOwnLabel:i,isDisabled:r,isLabeledByFormItem:a})=>{const s=n.inject(Ot,void 0),{formItem:l}=It(),{emit:c}=n.getCurrentInstance();function d(h){var m,y,b,C;return[!0,e.trueValue,e.trueLabel].includes(h)?(y=(m=e.trueValue)!=null?m:e.trueLabel)!=null?y:!0:(C=(b=e.falseValue)!=null?b:e.falseLabel)!=null?C:!1}function f(h,m){c("change",d(h),m)}function u(h){if(o.value)return;const m=h.target;c("change",d(m.checked),h)}async function p(h){o.value||!i.value&&!r.value&&a.value&&(h.composedPath().some(b=>b.tagName==="LABEL")||(t.value=d([!1,e.falseValue,e.falseLabel].includes(t.value)),await n.nextTick(),f(t.value,h)))}const g=n.computed(()=>(s==null?void 0:s.validateEvent)||e.validateEvent);return n.watch(()=>e.modelValue,()=>{g.value&&(l==null||l.validate("change").catch(h=>ne(h)))}),{handleChange:u,onClickRoot:p}},Cm=e=>{const t=n.ref(!1),{emit:o}=n.getCurrentInstance(),i=n.inject(Ot,void 0),r=n.computed(()=>ze(i)===!1),a=n.ref(!1),s=n.computed({get(){var l,c;return r.value?(l=i==null?void 0:i.modelValue)==null?void 0:l.value:(c=e.modelValue)!=null?c:t.value},set(l){var c,d;r.value&&ee(l)?(a.value=((c=i==null?void 0:i.max)==null?void 0:c.value)!==void 0&&l.length>(i==null?void 0:i.max.value)&&l.length>s.value.length,a.value===!1&&((d=i==null?void 0:i.changeEvent)==null||d.call(i,l))):(o(X,l),t.value=l)}});return{model:s,isGroup:r,isLimitExceeded:a}},vm=(e,t,{model:o})=>{const i=n.inject(Ot,void 0),r=n.ref(!1),a=n.computed(()=>jt(e.value)?e.label:e.value),s=n.computed(()=>{const f=o.value;return _e(f)?f:ee(f)?te(a.value)?f.map(n.toRaw).some(u=>kn(u,a.value)):f.map(n.toRaw).includes(a.value):f!=null?f===e.trueValue||f===e.trueLabel:!!f}),l=Et(n.computed(()=>{var f;return(f=i==null?void 0:i.size)==null?void 0:f.value}),{prop:!0}),c=Et(n.computed(()=>{var f;return(f=i==null?void 0:i.size)==null?void 0:f.value})),d=n.computed(()=>!!t.default||!jt(a.value));return{checkboxButtonSize:l,isChecked:s,isFocused:r,checkboxSize:c,hasOwnLabel:d,actualValue:a}},Ua=(e,t)=>{const{formItem:o}=It(),{model:i,isGroup:r,isLimitExceeded:a}=Cm(e),{isFocused:s,isChecked:l,checkboxButtonSize:c,checkboxSize:d,hasOwnLabel:f,actualValue:u}=vm(e,t,{model:i}),{isDisabled:p}=bm({model:i,isChecked:l}),{inputId:g,isLabeledByFormItem:h}=Rn(e,{formItemContext:o,disableIdGeneration:f,disableIdManagement:r}),{handleChange:m,onClickRoot:y}=wm(e,{model:i,isLimitExceeded:a,hasOwnLabel:f,isDisabled:p,isLabeledByFormItem:h});return(()=>{function C(){var I,k;ee(i.value)&&!i.value.includes(u.value)?i.value.push(u.value):i.value=(k=(I=e.trueValue)!=null?I:e.trueLabel)!=null?k:!0}e.checked&&C()})(),gt({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},n.computed(()=>r.value&&jt(e.value))),gt({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},n.computed(()=>!!e.trueLabel)),gt({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},n.computed(()=>!!e.falseLabel)),{inputId:g,isLabeledByFormItem:h,isChecked:l,isDisabled:p,isFocused:s,checkboxButtonSize:c,checkboxSize:d,hasOwnLabel:f,model:i,actualValue:u,handleChange:m,onClickRoot:y}},Sm=n.defineComponent({name:"ElCheckbox"}),km=n.defineComponent({...Sm,props:Ha,emits:Ka,setup(e){const t=e,o=n.useSlots(),{inputId:i,isLabeledByFormItem:r,isChecked:a,isDisabled:s,isFocused:l,checkboxSize:c,hasOwnLabel:d,model:f,actualValue:u,handleChange:p,onClickRoot:g}=Ua(t,o),h=D("checkbox"),m=n.computed(()=>[h.b(),h.m(c.value),h.is("disabled",s.value),h.is("bordered",t.border),h.is("checked",a.value)]),y=n.computed(()=>[h.e("input"),h.is("disabled",s.value),h.is("checked",a.value),h.is("indeterminate",t.indeterminate),h.is("focus",l.value)]);return(b,C)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(!n.unref(d)&&n.unref(r)?"span":"label"),{class:n.normalizeClass(n.unref(m)),"aria-controls":b.indeterminate?b.ariaControls:null,onClick:n.unref(g)},{default:n.withCtx(()=>{var I,k,v,S;return[n.createElementVNode("span",{class:n.normalizeClass(n.unref(y))},[b.trueValue||b.falseValue||b.trueLabel||b.falseLabel?n.withDirectives((n.openBlock(),n.createElementBlock("input",{key:0,id:n.unref(i),"onUpdate:modelValue":E=>n.isRef(f)?f.value=E:null,class:n.normalizeClass(n.unref(h).e("original")),type:"checkbox",indeterminate:b.indeterminate,name:b.name,tabindex:b.tabindex,disabled:n.unref(s),"true-value":(k=(I=b.trueValue)!=null?I:b.trueLabel)!=null?k:!0,"false-value":(S=(v=b.falseValue)!=null?v:b.falseLabel)!=null?S:!1,onChange:n.unref(p),onFocus:E=>l.value=!0,onBlur:E=>l.value=!1,onClick:n.withModifiers(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[n.vModelCheckbox,n.unref(f)]]):n.withDirectives((n.openBlock(),n.createElementBlock("input",{key:1,id:n.unref(i),"onUpdate:modelValue":E=>n.isRef(f)?f.value=E:null,class:n.normalizeClass(n.unref(h).e("original")),type:"checkbox",indeterminate:b.indeterminate,disabled:n.unref(s),value:n.unref(u),name:b.name,tabindex:b.tabindex,onChange:n.unref(p),onFocus:E=>l.value=!0,onBlur:E=>l.value=!1,onClick:n.withModifiers(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","disabled","value","name","tabindex","onChange","onFocus","onBlur","onClick"])),[[n.vModelCheckbox,n.unref(f)]]),n.createElementVNode("span",{class:n.normalizeClass(n.unref(h).e("inner"))},null,2)],2),n.unref(d)?(n.openBlock(),n.createElementBlock("span",{key:0,class:n.normalizeClass(n.unref(h).e("label"))},[n.renderSlot(b.$slots,"default"),b.$slots.default?n.createCommentVNode("v-if",!0):(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createTextVNode(n.toDisplayString(b.label),1)],64))],2)):n.createCommentVNode("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var Em=F(km,[["__file","checkbox.vue"]]);const Im=n.defineComponent({name:"ElCheckboxButton"}),Tm=n.defineComponent({...Im,props:Ha,emits:Ka,setup(e){const t=e,o=n.useSlots(),{isFocused:i,isChecked:r,isDisabled:a,checkboxButtonSize:s,model:l,actualValue:c,handleChange:d}=Ua(t,o),f=n.inject(Ot,void 0),u=D("checkbox"),p=n.computed(()=>{var h,m,y,b;const C=(m=(h=f==null?void 0:f.fill)==null?void 0:h.value)!=null?m:"";return{backgroundColor:C,borderColor:C,color:(b=(y=f==null?void 0:f.textColor)==null?void 0:y.value)!=null?b:"",boxShadow:C?`-1px 0 0 0 ${C}`:void 0}}),g=n.computed(()=>[u.b("button"),u.bm("button",s.value),u.is("disabled",a.value),u.is("checked",r.value),u.is("focus",i.value)]);return(h,m)=>{var y,b,C,I;return n.openBlock(),n.createElementBlock("label",{class:n.normalizeClass(n.unref(g))},[h.trueValue||h.falseValue||h.trueLabel||h.falseLabel?n.withDirectives((n.openBlock(),n.createElementBlock("input",{key:0,"onUpdate:modelValue":k=>n.isRef(l)?l.value=k:null,class:n.normalizeClass(n.unref(u).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:n.unref(a),"true-value":(b=(y=h.trueValue)!=null?y:h.trueLabel)!=null?b:!0,"false-value":(I=(C=h.falseValue)!=null?C:h.falseLabel)!=null?I:!1,onChange:n.unref(d),onFocus:k=>i.value=!0,onBlur:k=>i.value=!1,onClick:n.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[n.vModelCheckbox,n.unref(l)]]):n.withDirectives((n.openBlock(),n.createElementBlock("input",{key:1,"onUpdate:modelValue":k=>n.isRef(l)?l.value=k:null,class:n.normalizeClass(n.unref(u).be("button","original")),type:"checkbox",name:h.name,tabindex:h.tabindex,disabled:n.unref(a),value:n.unref(c),onChange:n.unref(d),onFocus:k=>i.value=!0,onBlur:k=>i.value=!1,onClick:n.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","value","onChange","onFocus","onBlur","onClick"])),[[n.vModelCheckbox,n.unref(l)]]),h.$slots.default||h.label?(n.openBlock(),n.createElementBlock("span",{key:2,class:n.normalizeClass(n.unref(u).be("button","inner")),style:n.normalizeStyle(n.unref(r)?n.unref(p):void 0)},[n.renderSlot(h.$slots,"default",{},()=>[n.createTextVNode(n.toDisplayString(h.label),1)])],6)):n.createCommentVNode("v-if",!0)],2)}}});var Wa=F(Tm,[["__file","checkbox-button.vue"]]);const Am=R({modelValue:{type:_(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:kt,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...rt(["ariaLabel"])}),Om={[X]:e=>ee(e),change:e=>ee(e)},xm=n.defineComponent({name:"ElCheckboxGroup"}),Mm=n.defineComponent({...xm,props:Am,emits:Om,setup(e,{emit:t}){const o=e,i=D("checkbox"),{formItem:r}=It(),{inputId:a,isLabeledByFormItem:s}=Rn(o,{formItemContext:r}),l=async d=>{t(X,d),await n.nextTick(),t("change",d)},c=n.computed({get(){return o.modelValue},set(d){l(d)}});return n.provide(Ot,{...kr(n.toRefs(o),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:c,changeEvent:l}),n.watch(()=>o.modelValue,()=>{o.validateEvent&&(r==null||r.validate("change").catch(d=>ne(d)))}),(d,f)=>{var u;return n.openBlock(),n.createBlock(n.resolveDynamicComponent(d.tag),{id:n.unref(a),class:n.normalizeClass(n.unref(i).b("group")),role:"group","aria-label":n.unref(s)?void 0:d.ariaLabel||"checkbox-group","aria-labelledby":n.unref(s)?(u=n.unref(r))==null?void 0:u.labelId:void 0},{default:n.withCtx(()=>[n.renderSlot(d.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var qa=F(Mm,[["__file","checkbox-group.vue"]]);const Ga=oe(Em,{CheckboxButton:Wa,CheckboxGroup:qa});tt(Wa);const Ja=tt(qa),Ya=R({modelValue:{type:[String,Number,Boolean],default:void 0},size:kt,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),Bm=R({...Ya,border:Boolean}),Za={[X]:e=>me(e)||G(e)||_e(e),[Io]:e=>me(e)||G(e)||_e(e)},Qa=Symbol("radioGroupKey"),Xa=(e,t)=>{const o=n.ref(),i=n.inject(Qa,void 0),r=n.computed(()=>!!i),a=n.computed(()=>jt(e.value)?e.label:e.value),s=n.computed({get(){return r.value?i.modelValue:e.modelValue},set(u){r.value?i.changeEvent(u):t&&t(X,u),o.value.checked=e.modelValue===a.value}}),l=Et(n.computed(()=>i==null?void 0:i.size)),c=Vn(n.computed(()=>i==null?void 0:i.disabled)),d=n.ref(!1),f=n.computed(()=>c.value||r.value&&s.value!==a.value?-1:0);return gt({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},n.computed(()=>r.value&&jt(e.value))),{radioRef:o,isGroup:r,radioGroup:i,focus:d,size:l,disabled:c,tabIndex:f,modelValue:s,actualValue:a}},Nm=n.defineComponent({name:"ElRadio"}),_m=n.defineComponent({...Nm,props:Bm,emits:Za,setup(e,{emit:t}){const o=e,i=D("radio"),{radioRef:r,radioGroup:a,focus:s,size:l,disabled:c,modelValue:d,actualValue:f}=Xa(o,t);function u(){n.nextTick(()=>t("change",d.value))}return(p,g)=>{var h;return n.openBlock(),n.createElementBlock("label",{class:n.normalizeClass([n.unref(i).b(),n.unref(i).is("disabled",n.unref(c)),n.unref(i).is("focus",n.unref(s)),n.unref(i).is("bordered",p.border),n.unref(i).is("checked",n.unref(d)===n.unref(f)),n.unref(i).m(n.unref(l))])},[n.createElementVNode("span",{class:n.normalizeClass([n.unref(i).e("input"),n.unref(i).is("disabled",n.unref(c)),n.unref(i).is("checked",n.unref(d)===n.unref(f))])},[n.withDirectives(n.createElementVNode("input",{ref_key:"radioRef",ref:r,"onUpdate:modelValue":m=>n.isRef(d)?d.value=m:null,class:n.normalizeClass(n.unref(i).e("original")),value:n.unref(f),name:p.name||((h=n.unref(a))==null?void 0:h.name),disabled:n.unref(c),checked:n.unref(d)===n.unref(f),type:"radio",onFocus:m=>s.value=!0,onBlur:m=>s.value=!1,onChange:u,onClick:n.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","checked","onFocus","onBlur","onClick"]),[[n.vModelRadio,n.unref(d)]]),n.createElementVNode("span",{class:n.normalizeClass(n.unref(i).e("inner"))},null,2)],2),n.createElementVNode("span",{class:n.normalizeClass(n.unref(i).e("label")),onKeydown:n.withModifiers(()=>{},["stop"])},[n.renderSlot(p.$slots,"default",{},()=>[n.createTextVNode(n.toDisplayString(p.label),1)])],42,["onKeydown"])],2)}}});var Pm=F(_m,[["__file","radio.vue"]]);const Lm=R({...Ya}),Vm=n.defineComponent({name:"ElRadioButton"}),Rm=n.defineComponent({...Vm,props:Lm,setup(e){const t=e,o=D("radio"),{radioRef:i,focus:r,size:a,disabled:s,modelValue:l,radioGroup:c,actualValue:d}=Xa(t),f=n.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(u,p)=>{var g;return n.openBlock(),n.createElementBlock("label",{class:n.normalizeClass([n.unref(o).b("button"),n.unref(o).is("active",n.unref(l)===n.unref(d)),n.unref(o).is("disabled",n.unref(s)),n.unref(o).is("focus",n.unref(r)),n.unref(o).bm("button",n.unref(a))])},[n.withDirectives(n.createElementVNode("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":h=>n.isRef(l)?l.value=h:null,class:n.normalizeClass(n.unref(o).be("button","original-radio")),value:n.unref(d),type:"radio",name:u.name||((g=n.unref(c))==null?void 0:g.name),disabled:n.unref(s),onFocus:h=>r.value=!0,onBlur:h=>r.value=!1,onClick:n.withModifiers(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","onFocus","onBlur","onClick"]),[[n.vModelRadio,n.unref(l)]]),n.createElementVNode("span",{class:n.normalizeClass(n.unref(o).be("button","inner")),style:n.normalizeStyle(n.unref(l)===n.unref(d)?n.unref(f):{}),onKeydown:n.withModifiers(()=>{},["stop"])},[n.renderSlot(u.$slots,"default",{},()=>[n.createTextVNode(n.toDisplayString(u.label),1)])],46,["onKeydown"])],2)}}});var es=F(Rm,[["__file","radio-button.vue"]]);const Fm=R({id:{type:String,default:void 0},size:kt,disabled:Boolean,modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},...rt(["ariaLabel"])}),Dm=Za,$m=n.defineComponent({name:"ElRadioGroup"}),zm=n.defineComponent({...$m,props:Fm,emits:Dm,setup(e,{emit:t}){const o=e,i=D("radio"),r=it(),a=n.ref(),{formItem:s}=It(),{inputId:l,isLabeledByFormItem:c}=Rn(o,{formItemContext:s}),d=u=>{t(X,u),n.nextTick(()=>t("change",u))};n.onMounted(()=>{const u=a.value.querySelectorAll("[type=radio]"),p=u[0];!Array.from(u).some(g=>g.checked)&&p&&(p.tabIndex=0)});const f=n.computed(()=>o.name||r.value);return n.provide(Qa,n.reactive({...n.toRefs(o),changeEvent:d,name:f})),n.watch(()=>o.modelValue,()=>{o.validateEvent&&(s==null||s.validate("change").catch(u=>ne(u)))}),(u,p)=>(n.openBlock(),n.createElementBlock("div",{id:n.unref(l),ref_key:"radioGroupRef",ref:a,class:n.normalizeClass(n.unref(i).b("group")),role:"radiogroup","aria-label":n.unref(c)?void 0:u.ariaLabel||"radio-group","aria-labelledby":n.unref(c)?n.unref(s).labelId:void 0},[n.renderSlot(u.$slots,"default")],10,["id","aria-label","aria-labelledby"]))}});var ts=F(zm,[["__file","radio-group.vue"]]);const ns=oe(Pm,{RadioButton:es,RadioGroup:ts}),os=tt(ts);tt(es);const ti=R({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Mr},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),jm={close:e=>e instanceof MouseEvent,click:e=>e instanceof MouseEvent},Hm=n.defineComponent({name:"ElTag"}),Km=n.defineComponent({...Hm,props:ti,emits:jm,setup(e,{emit:t}){const o=e,i=Et(),r=D("tag"),a=n.computed(()=>{const{type:d,hit:f,effect:u,closable:p,round:g}=o;return[r.b(),r.is("closable",p),r.m(d||"primary"),r.m(i.value),r.m(u),r.is("hit",f),r.is("round",g)]}),s=d=>{t("close",d)},l=d=>{t("click",d)},c=d=>{d.component.subTree.component.bum=null};return(d,f)=>d.disableTransitions?(n.openBlock(),n.createElementBlock("span",{key:0,class:n.normalizeClass(n.unref(a)),style:n.normalizeStyle({backgroundColor:d.color}),onClick:l},[n.createElementVNode("span",{class:n.normalizeClass(n.unref(r).e("content"))},[n.renderSlot(d.$slots,"default")],2),d.closable?(n.openBlock(),n.createBlock(n.unref(be),{key:0,class:n.normalizeClass(n.unref(r).e("close")),onClick:n.withModifiers(s,["stop"])},{default:n.withCtx(()=>[n.createVNode(n.unref(W.Close))]),_:1},8,["class","onClick"])):n.createCommentVNode("v-if",!0)],6)):(n.openBlock(),n.createBlock(n.Transition,{key:1,name:`${n.unref(r).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:c},{default:n.withCtx(()=>[n.createElementVNode("span",{class:n.normalizeClass(n.unref(a)),style:n.normalizeStyle({backgroundColor:d.color}),onClick:l},[n.createElementVNode("span",{class:n.normalizeClass(n.unref(r).e("content"))},[n.renderSlot(d.$slots,"default")],2),d.closable?(n.openBlock(),n.createBlock(n.unref(be),{key:0,class:n.normalizeClass(n.unref(r).e("close")),onClick:n.withModifiers(s,["stop"])},{default:n.withCtx(()=>[n.createVNode(n.unref(W.Close))]),_:1},8,["class","onClick"])):n.createCommentVNode("v-if",!0)],6)]),_:3},8,["name"]))}});var Um=F(Km,[["__file","tag.vue"]]);const Wm=oe(Um),is=Symbol("rowContextKey"),qm=R({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:["start","center","end","space-around","space-between","space-evenly"],default:"start"},align:{type:String,values:["top","middle","bottom"]}}),Gm=n.defineComponent({name:"ElRow"}),Jm=n.defineComponent({...Gm,props:qm,setup(e){const t=e,o=D("row"),i=n.computed(()=>t.gutter);n.provide(is,{gutter:i});const r=n.computed(()=>{const s={};return t.gutter&&(s.marginRight=s.marginLeft=`-${t.gutter/2}px`),s}),a=n.computed(()=>[o.b(),o.is(`justify-${t.justify}`,t.justify!=="start"),o.is(`align-${t.align}`,!!t.align)]);return(s,l)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(s.tag),{class:n.normalizeClass(n.unref(a)),style:n.normalizeStyle(n.unref(r))},{default:n.withCtx(()=>[n.renderSlot(s.$slots,"default")]),_:3},8,["class","style"]))}});var Ym=F(Jm,[["__file","row.vue"]]);const tn=oe(Ym),Zm=R({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:_([Number,Object]),default:()=>Ut({})},sm:{type:_([Number,Object]),default:()=>Ut({})},md:{type:_([Number,Object]),default:()=>Ut({})},lg:{type:_([Number,Object]),default:()=>Ut({})},xl:{type:_([Number,Object]),default:()=>Ut({})}}),Qm=n.defineComponent({name:"ElCol"}),Xm=n.defineComponent({...Qm,props:Zm,setup(e){const t=e,{gutter:o}=n.inject(is,{gutter:n.computed(()=>0)}),i=D("col"),r=n.computed(()=>{const s={};return o.value&&(s.paddingLeft=s.paddingRight=`${o.value/2}px`),s}),a=n.computed(()=>{const s=[];return["span","offset","pull","push"].forEach(d=>{const f=t[d];G(f)&&(d==="span"?s.push(i.b(`${t[d]}`)):f>0&&s.push(i.b(`${d}-${t[d]}`)))}),["xs","sm","md","lg","xl"].forEach(d=>{G(t[d])?s.push(i.b(`${d}-${t[d]}`)):te(t[d])&&Object.entries(t[d]).forEach(([f,u])=>{s.push(f!=="span"?i.b(`${d}-${f}-${u}`):i.b(`${d}-${u}`))})}),o.value&&s.push(i.is("guttered")),[i.b(),s]});return(s,l)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(s.tag),{class:n.normalizeClass(n.unref(a)),style:n.normalizeStyle(n.unref(r))},{default:n.withCtx(()=>[n.renderSlot(s.$slots,"default")]),_:3},8,["class","style"]))}});var eg=F(Xm,[["__file","col.vue"]]);const nn=oe(eg),tg=R({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:_([String,Array,Object])},zIndex:{type:_([String,Number])}}),ng={click:e=>e instanceof MouseEvent},og="overlay";var ig=n.defineComponent({name:"ElOverlay",props:tg,emits:ng,setup(e,{slots:t,emit:o}){const i=D(og),r=c=>{o("click",c)},{onClick:a,onMousedown:s,onMouseup:l}=ea(e.customMaskEvent?void 0:r);return()=>e.mask?n.createVNode("div",{class:[i.b(),e.overlayClass],style:{zIndex:e.zIndex},onClick:a,onMousedown:s,onMouseup:l},[n.renderSlot(t,"default")],An.STYLE|An.CLASS|An.PROPS,["onClick","onMouseup","onMousedown"]):n.h("div",{class:e.overlayClass,style:{zIndex:e.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[n.renderSlot(t,"default")])}});const rg=ig,rs=Symbol("dialogInjectionKey"),as=R({center:Boolean,alignCenter:Boolean,closeIcon:{type:mt},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),ag={close:()=>!0},sg=n.defineComponent({name:"ElDialogContent"}),lg=n.defineComponent({...sg,props:as,emits:ag,setup(e,{expose:t}){const o=e,{t:i}=To(),{Close:r}=qf,{dialogRef:a,headerRef:s,bodyId:l,ns:c,style:d}=n.inject(rs),{focusTrapRef:f}=n.inject(Ia),u=n.computed(()=>[c.b(),c.is("fullscreen",o.fullscreen),c.is("draggable",o.draggable),c.is("align-center",o.alignCenter),{[c.m("center")]:o.center}]),p=Yf(f,a),g=n.computed(()=>o.draggable),h=n.computed(()=>o.overflow),{resetPosition:m}=Qf(a,s,g,h);return t({resetPosition:m}),(y,b)=>(n.openBlock(),n.createElementBlock("div",{ref:n.unref(p),class:n.normalizeClass(n.unref(u)),style:n.normalizeStyle(n.unref(d)),tabindex:"-1"},[n.createElementVNode("header",{ref_key:"headerRef",ref:s,class:n.normalizeClass([n.unref(c).e("header"),{"show-close":y.showClose}])},[n.renderSlot(y.$slots,"header",{},()=>[n.createElementVNode("span",{role:"heading","aria-level":y.ariaLevel,class:n.normalizeClass(n.unref(c).e("title"))},n.toDisplayString(y.title),11,["aria-level"])]),y.showClose?(n.openBlock(),n.createElementBlock("button",{key:0,"aria-label":n.unref(i)("el.dialog.close"),class:n.normalizeClass(n.unref(c).e("headerbtn")),type:"button",onClick:C=>y.$emit("close")},[n.createVNode(n.unref(be),{class:n.normalizeClass(n.unref(c).e("close"))},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(y.closeIcon||n.unref(r))))]),_:1},8,["class"])],10,["aria-label","onClick"])):n.createCommentVNode("v-if",!0)],2),n.createElementVNode("div",{id:n.unref(l),class:n.normalizeClass(n.unref(c).e("body"))},[n.renderSlot(y.$slots,"default")],10,["id"]),y.$slots.footer?(n.openBlock(),n.createElementBlock("footer",{key:0,class:n.normalizeClass(n.unref(c).e("footer"))},[n.renderSlot(y.$slots,"footer")],2)):n.createCommentVNode("v-if",!0)],6))}});var cg=F(lg,[["__file","dialog-content.vue"]]);const dg=R({...as,appendToBody:Boolean,appendTo:{type:_([String,Object]),default:"body"},beforeClose:{type:_(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:Boolean,headerAriaLevel:{type:String,default:"2"}}),fg={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[X]:e=>_e(e),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},ug=(e,t)=>{var o;const r=n.getCurrentInstance().emit,{nextZIndex:a}=Fo();let s="";const l=it(),c=it(),d=n.ref(!1),f=n.ref(!1),u=n.ref(!1),p=n.ref((o=e.zIndex)!=null?o:a());let g,h;const m=Pn("namespace",Wt),y=n.computed(()=>{const V={},x=`--${m.value}-dialog`;return e.fullscreen||(e.top&&(V[`${x}-margin-top`]=e.top),e.width&&(V[`${x}-width`]=et(e.width))),V}),b=n.computed(()=>e.alignCenter?{display:"flex"}:{});function C(){r("opened")}function I(){r("closed"),r(X,!1),e.destroyOnClose&&(u.value=!1)}function k(){r("close")}function v(){h==null||h(),g==null||g(),e.openDelay&&e.openDelay>0?{stop:g}=Ei(()=>M(),e.openDelay):M()}function S(){g==null||g(),h==null||h(),e.closeDelay&&e.closeDelay>0?{stop:h}=Ei(()=>N(),e.closeDelay):N()}function E(){function V(x){x||(f.value=!0,d.value=!1)}e.beforeClose?e.beforeClose(V):S()}function O(){e.closeOnClickModal&&E()}function M(){K&&(d.value=!0)}function N(){d.value=!1}function B(){r("openAutoFocus")}function T(){r("closeAutoFocus")}function P(V){var x;((x=V.detail)==null?void 0:x.focusReason)==="pointer"&&V.preventDefault()}e.lockScroll&&iu(d);function q(){e.closeOnPressEscape&&E()}return n.watch(()=>e.modelValue,V=>{V?(f.value=!1,v(),u.value=!0,p.value=Sr(e.zIndex)?a():p.value++,n.nextTick(()=>{r("open"),t.value&&(t.value.scrollTop=0)})):d.value&&S()}),n.watch(()=>e.fullscreen,V=>{t.value&&(V?(s=t.value.style.transform,t.value.style.transform=""):t.value.style.transform=s)}),n.onMounted(()=>{e.modelValue&&(d.value=!0,u.value=!0,v())}),{afterEnter:C,afterLeave:I,beforeLeave:k,handleClose:E,onModalClick:O,close:S,doClose:N,onOpenAutoFocus:B,onCloseAutoFocus:T,onCloseRequested:q,onFocusoutPrevented:P,titleId:l,bodyId:c,closed:f,style:y,overlayDialogStyle:b,rendered:u,visible:d,zIndex:p}},pg=n.defineComponent({name:"ElDialog",inheritAttrs:!1}),hg=n.defineComponent({...pg,props:dg,emits:fg,setup(e,{expose:t}){const o=e,i=n.useSlots();gt({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"},n.computed(()=>!!i.title));const r=D("dialog"),a=n.ref(),s=n.ref(),l=n.ref(),{visible:c,titleId:d,bodyId:f,style:u,overlayDialogStyle:p,rendered:g,zIndex:h,afterEnter:m,afterLeave:y,beforeLeave:b,handleClose:C,onModalClick:I,onOpenAutoFocus:k,onCloseAutoFocus:v,onCloseRequested:S,onFocusoutPrevented:E}=ug(o,a);n.provide(rs,{dialogRef:a,headerRef:s,bodyId:f,ns:r,rendered:g,style:u});const O=ea(I),M=n.computed(()=>o.draggable&&!o.fullscreen);return t({visible:c,dialogContentRef:l,resetPosition:()=>{var B;(B=l.value)==null||B.resetPosition()}}),(B,T)=>(n.openBlock(),n.createBlock(n.unref(_a),{to:B.appendTo,disabled:B.appendTo!=="body"?!1:!B.appendToBody},{default:n.withCtx(()=>[n.createVNode(n.Transition,{name:"dialog-fade",onAfterEnter:n.unref(m),onAfterLeave:n.unref(y),onBeforeLeave:n.unref(b),persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createVNode(n.unref(rg),{"custom-mask-event":"",mask:B.modal,"overlay-class":B.modalClass,"z-index":n.unref(h)},{default:n.withCtx(()=>[n.createElementVNode("div",{role:"dialog","aria-modal":"true","aria-label":B.title||void 0,"aria-labelledby":B.title?void 0:n.unref(d),"aria-describedby":n.unref(f),class:n.normalizeClass(`${n.unref(r).namespace.value}-overlay-dialog`),style:n.normalizeStyle(n.unref(p)),onClick:n.unref(O).onClick,onMousedown:n.unref(O).onMousedown,onMouseup:n.unref(O).onMouseup},[n.createVNode(n.unref(Ba),{loop:"",trapped:n.unref(c),"focus-start-el":"container",onFocusAfterTrapped:n.unref(k),onFocusAfterReleased:n.unref(v),onFocusoutPrevented:n.unref(E),onReleaseRequested:n.unref(S)},{default:n.withCtx(()=>[n.unref(g)?(n.openBlock(),n.createBlock(cg,n.mergeProps({key:0,ref_key:"dialogContentRef",ref:l},B.$attrs,{center:B.center,"align-center":B.alignCenter,"close-icon":B.closeIcon,draggable:n.unref(M),overflow:B.overflow,fullscreen:B.fullscreen,"show-close":B.showClose,title:B.title,"aria-level":B.headerAriaLevel,onClose:n.unref(C)}),n.createSlots({header:n.withCtx(()=>[B.$slots.title?n.renderSlot(B.$slots,"title",{key:1}):n.renderSlot(B.$slots,"header",{key:0,close:n.unref(C),titleId:n.unref(d),titleClass:n.unref(r).e("title")})]),default:n.withCtx(()=>[n.renderSlot(B.$slots,"default")]),_:2},[B.$slots.footer?{name:"footer",fn:n.withCtx(()=>[n.renderSlot(B.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):n.createCommentVNode("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[n.vShow,n.unref(c)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var mg=F(hg,[["__file","dialog.vue"]]);const gg=oe(mg),yg=n.defineComponent({inheritAttrs:!1});function bg(e,t,o,i,r,a){return n.renderSlot(e.$slots,"default")}var wg=F(yg,[["render",bg],["__file","collection.vue"]]);const Cg=n.defineComponent({name:"ElCollectionItem",inheritAttrs:!1});function vg(e,t,o,i,r,a){return n.renderSlot(e.$slots,"default")}var Sg=F(Cg,[["render",vg],["__file","collection-item.vue"]]);const kg="data-el-collection-item",Eg=e=>{const t=`El${e}Collection`,o=`${t}Item`,i=Symbol(t),r=Symbol(o),a={...wg,name:t,setup(){const l=n.ref(null),c=new Map,d=()=>{const f=n.unref(l);if(!f)return[];const u=Array.from(f.querySelectorAll(`[${kg}]`));return[...c.values()].sort((g,h)=>u.indexOf(g.ref)-u.indexOf(h.ref))};n.provide(i,{itemMap:c,getItems:d,collectionRef:l})}},s={...Sg,name:o,setup(l,{attrs:c}){const d=n.ref(null),f=n.inject(i,void 0);n.provide(r,{collectionItemRef:d}),n.onMounted(()=>{const u=n.unref(d);u&&f.itemMap.set(u,{ref:u,...c})}),n.onBeforeUnmount(()=>{const u=n.unref(d);f.itemMap.delete(u)})}};return{COLLECTION_INJECTION_KEY:i,COLLECTION_ITEM_INJECTION_KEY:r,ElCollection:a,ElCollectionItem:s}},ni=R({trigger:en.trigger,effect:{...se.effect,default:"light"},type:{type:_(String)},placement:{type:_(String),default:"bottom"},popperOptions:{type:_(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:_([Number,String]),default:0},maxHeight:{type:_([Number,String]),default:""},popperClass:{type:String,default:""},disabled:Boolean,role:{type:String,default:"menu"},buttonProps:{type:_(Object)},teleported:se.teleported});R({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:mt}}),R({onKeydown:{type:_(Function)}}),Eg("Dropdown");const ss=Symbol("ElSelectGroup"),Kn=Symbol("ElSelect");function Ig(e,t){const o=n.inject(Kn),i=n.inject(ss,{disabled:!1}),r=n.computed(()=>f(De(o.props.modelValue),e.value)),a=n.computed(()=>{var g;if(o.props.multiple){const h=De((g=o.props.modelValue)!=null?g:[]);return!r.value&&h.length>=o.props.multipleLimit&&o.props.multipleLimit>0}else return!1}),s=n.computed(()=>e.label||(te(e.value)?"":e.value)),l=n.computed(()=>e.value||e.label||""),c=n.computed(()=>e.disabled||t.groupDisabled||a.value),d=n.getCurrentInstance(),f=(g=[],h)=>{if(te(e.value)){const m=o.props.valueKey;return g&&g.some(y=>n.toRaw(Be(y,m))===Be(h,m))}else return g&&g.includes(h)},u=()=>{!e.disabled&&!i.disabled&&(o.states.hoveringIndex=o.optionsArray.indexOf(d.proxy))},p=g=>{const h=new RegExp(jf(g),"i");t.visible=h.test(s.value)||e.created};return n.watch(()=>s.value,()=>{!e.created&&!o.props.remote&&o.setSelected()}),n.watch(()=>e.value,(g,h)=>{const{remote:m,valueKey:y}=o.props;if(g!==h&&(o.onOptionDestroy(h,d.proxy),o.onOptionCreate(d.proxy)),!e.created&&!m){if(y&&te(g)&&te(h)&&g[y]===h[y])return;o.setSelected()}}),n.watch(()=>i.disabled,()=>{t.groupDisabled=i.disabled},{immediate:!0}),{select:o,currentLabel:s,currentValue:l,itemSelected:r,isDisabled:c,hoverItem:u,updateOption:p}}const Tg=n.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=D("select"),o=it(),i=n.computed(()=>[t.be("dropdown","item"),t.is("disabled",n.unref(l)),t.is("selected",n.unref(s)),t.is("hovering",n.unref(p))]),r=n.reactive({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:a,itemSelected:s,isDisabled:l,select:c,hoverItem:d,updateOption:f}=Ig(e,r),{visible:u,hover:p}=n.toRefs(r),g=n.getCurrentInstance().proxy;c.onOptionCreate(g),n.onBeforeUnmount(()=>{const m=g.value,{selected:y}=c.states,C=(c.props.multiple?y:[y]).some(I=>I.value===g.value);n.nextTick(()=>{c.states.cachedOptions.get(m)===g&&!C&&c.states.cachedOptions.delete(m)}),c.onOptionDestroy(m,g)});function h(){l.value||c.handleOptionSelect(g)}return{ns:t,id:o,containerKls:i,currentLabel:a,itemSelected:s,isDisabled:l,select:c,hoverItem:d,updateOption:f,visible:u,hover:p,selectOptionClick:h,states:r}}});function Ag(e,t,o,i,r,a){return n.withDirectives((n.openBlock(),n.createElementBlock("li",{id:e.id,class:n.normalizeClass(e.containerKls),role:"option","aria-disabled":e.isDisabled||void 0,"aria-selected":e.itemSelected,onMouseenter:e.hoverItem,onClick:n.withModifiers(e.selectOptionClick,["stop"])},[n.renderSlot(e.$slots,"default",{},()=>[n.createElementVNode("span",null,n.toDisplayString(e.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMouseenter","onClick"])),[[n.vShow,e.visible]])}var oi=F(Tg,[["render",Ag],["__file","option.vue"]]);const Og=n.defineComponent({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const e=n.inject(Kn),t=D("select"),o=n.computed(()=>e.props.popperClass),i=n.computed(()=>e.props.multiple),r=n.computed(()=>e.props.fitInputWidth),a=n.ref("");function s(){var l;a.value=`${(l=e.selectRef)==null?void 0:l.offsetWidth}px`}return n.onMounted(()=>{s(),Re(e.selectRef,s)}),{ns:t,minWidth:a,popperClass:o,isMultiple:i,isFitInputWidth:r}}});function xg(e,t,o,i,r,a){return n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([e.ns.b("dropdown"),e.ns.is("multiple",e.isMultiple),e.popperClass]),style:n.normalizeStyle({[e.isFitInputWidth?"width":"minWidth"]:e.minWidth})},[e.$slots.header?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(e.ns.be("dropdown","header"))},[n.renderSlot(e.$slots,"header")],2)):n.createCommentVNode("v-if",!0),n.renderSlot(e.$slots,"default"),e.$slots.footer?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(e.ns.be("dropdown","footer"))},[n.renderSlot(e.$slots,"footer")],2)):n.createCommentVNode("v-if",!0)],6)}var Mg=F(Og,[["render",xg],["__file","select-dropdown.vue"]]);const Bg=11,Ng=(e,t)=>{const{t:o}=To(),i=it(),r=D("select"),a=D("input"),s=n.reactive({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:[],selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),l=n.ref(null),c=n.ref(null),d=n.ref(null),f=n.ref(null),u=n.ref(null),p=n.ref(null),g=n.ref(null),h=n.ref(null),m=n.ref(null),y=n.ref(null),b=n.ref(null),C=n.ref(null),{isComposing:I,handleCompositionStart:k,handleCompositionUpdate:v,handleCompositionEnd:S}=Sp({afterComposition:w=>fn(w)}),{wrapperRef:E,isFocused:O}=vp(u,{beforeFocus(){return x.value},afterFocus(){e.automaticDropdown&&!M.value&&(M.value=!0,s.menuVisibleOnFocus=!0)},beforeBlur(w){var A,L;return((A=d.value)==null?void 0:A.isFocusInsideContent(w))||((L=f.value)==null?void 0:L.isFocusInsideContent(w))},afterBlur(){M.value=!1,s.menuVisibleOnFocus=!1}}),M=n.ref(!1),N=n.ref(),{form:B,formItem:T}=It(),{inputId:P}=Rn(e,{formItemContext:T}),{valueOnClear:q,isEmptyValue:V}=Ap(e),x=n.computed(()=>e.disabled||(B==null?void 0:B.disabled)),$=n.computed(()=>ee(e.modelValue)?e.modelValue.length>0:!V(e.modelValue)),pe=n.computed(()=>e.clearable&&!x.value&&s.inputHovering&&$.value),Y=n.computed(()=>e.remote&&e.filterable&&!e.remoteShowSuffix?"":e.suffixIcon),Z=n.computed(()=>r.is("reverse",Y.value&&M.value)),ce=n.computed(()=>(T==null?void 0:T.validateState)||""),Ee=n.computed(()=>Gf[ce.value]),Mt=n.computed(()=>e.remote?300:0),Ie=n.computed(()=>e.loading?e.loadingText||o("el.select.loading"):e.remote&&!s.inputValue&&s.options.size===0?!1:e.filterable&&s.inputValue&&s.options.size>0&&ae.value===0?e.noMatchText||o("el.select.noMatch"):s.options.size===0?e.noDataText||o("el.select.noData"):null),ae=n.computed(()=>U.value.filter(w=>w.visible).length),U=n.computed(()=>{const w=Array.from(s.options.values()),A=[];return s.optionValues.forEach(L=>{const z=w.findIndex(Ge=>Ge.value===L);z>-1&&A.push(w[z])}),A.length>=w.length?A:w}),lt=n.computed(()=>Array.from(s.cachedOptions.values())),qe=n.computed(()=>{const w=U.value.filter(A=>!A.created).some(A=>A.currentLabel===s.inputValue);return e.filterable&&e.allowCreate&&s.inputValue!==""&&!w}),Jn=()=>{e.filterable&&Q(e.filterMethod)||e.filterable&&e.remote&&Q(e.remoteMethod)||U.value.forEach(w=>{var A;(A=w.updateOption)==null||A.call(w,s.inputValue)})},Yn=Et(),an=n.computed(()=>["small"].includes(Yn.value)?"small":"default"),mi=n.computed({get(){return M.value&&Ie.value!==!1},set(w){M.value=w}}),Zn=n.computed(()=>{if(e.multiple&&!ze(e.modelValue))return De(e.modelValue).length===0&&!s.inputValue;const w=ee(e.modelValue)?e.modelValue[0]:e.modelValue;return e.filterable||ze(w)?!s.inputValue:!0}),gi=n.computed(()=>{var w;const A=(w=e.placeholder)!=null?w:o("el.select.placeholder");return e.multiple||!$.value?A:s.selectedLabel}),yi=n.computed(()=>oo?null:"mouseenter");n.watch(()=>e.modelValue,(w,A)=>{e.multiple&&e.filterable&&!e.reserveKeyword&&(s.inputValue="",ct("")),Bt(),!kn(w,A)&&e.validateEvent&&(T==null||T.validate("change").catch(L=>ne(L)))},{flush:"post",deep:!0}),n.watch(()=>M.value,w=>{w?ct(s.inputValue):(s.inputValue="",s.previousQuery=null,s.isBeforeHide=!0),t("visible-change",w)}),n.watch(()=>s.options.entries(),()=>{var w;if(!K)return;const A=((w=l.value)==null?void 0:w.querySelectorAll("input"))||[];(!e.filterable&&!e.defaultFirstOption&&!ze(e.modelValue)||!Array.from(A).includes(document.activeElement))&&Bt(),e.defaultFirstOption&&(e.filterable||e.remote)&&ae.value&&sn()},{flush:"post"}),n.watch(()=>s.hoveringIndex,w=>{G(w)&&w>-1?N.value=U.value[w]||{}:N.value={},U.value.forEach(A=>{A.hover=N.value===A})}),n.watchEffect(()=>{s.isBeforeHide||Jn()});const ct=w=>{s.previousQuery===w||I.value||(s.previousQuery=w,e.filterable&&Q(e.filterMethod)?e.filterMethod(w):e.filterable&&e.remote&&Q(e.remoteMethod)&&e.remoteMethod(w),e.defaultFirstOption&&(e.filterable||e.remote)&&ae.value?n.nextTick(sn):n.nextTick(Ve))},sn=()=>{const w=U.value.filter(z=>z.visible&&!z.disabled&&!z.states.groupDisabled),A=w.find(z=>z.created),L=w[0];s.hoveringIndex=vs(U.value,A||L)},Bt=()=>{if(e.multiple)s.selectedLabel="";else{const A=ee(e.modelValue)?e.modelValue[0]:e.modelValue,L=Qn(A);s.selectedLabel=L.currentLabel,s.selected=[L];return}const w=[];ze(e.modelValue)||De(e.modelValue).forEach(A=>{w.push(Qn(A))}),s.selected=w},Qn=w=>{let A;const L=ro(w).toLowerCase()==="object",z=ro(w).toLowerCase()==="null",Ge=ro(w).toLowerCase()==="undefined";for(let ft=s.cachedOptions.size-1;ft>=0;ft--){const Te=lt.value[ft];if(L?Be(Te.value,e.valueKey)===Be(w,e.valueKey):Te.value===w){A={value:w,currentLabel:Te.currentLabel,get isDisabled(){return Te.isDisabled}};break}}if(A)return A;const _t=L?w.label:!z&&!Ge?w:"";return{value:w,currentLabel:_t}},Ve=()=>{s.hoveringIndex=U.value.findIndex(w=>s.selected.some(A=>bi(A)===bi(w)))},Nt=()=>{s.selectionWidth=c.value.getBoundingClientRect().width},ln=()=>{s.calculatorWidth=p.value.getBoundingClientRect().width},Xn=()=>{s.collapseItemWidth=b.value.getBoundingClientRect().width},dt=()=>{var w,A;(A=(w=d.value)==null?void 0:w.updatePopper)==null||A.call(w)},cn=()=>{var w,A;(A=(w=f.value)==null?void 0:w.updatePopper)==null||A.call(w)},dn=()=>{s.inputValue.length>0&&!M.value&&(M.value=!0),ct(s.inputValue)},fn=w=>{if(s.inputValue=w.target.value,e.remote)un();else return dn()},un=Vf(()=>{dn()},Mt.value),pn=w=>{kn(e.modelValue,w)||t(Io,w)},sb=w=>Rf(w,A=>!s.disabledOptions.has(A)),lb=w=>{if(e.multiple&&w.code!==Kt.delete&&w.target.value.length<=0){const A=De(e.modelValue).slice(),L=sb(A);if(L<0)return;const z=A[L];A.splice(L,1),t(X,A),pn(A),t("remove-tag",z)}},cb=(w,A)=>{const L=s.selected.indexOf(A);if(L>-1&&!x.value){const z=De(e.modelValue).slice();z.splice(L,1),t(X,z),pn(z),t("remove-tag",A.value)}w.stopPropagation(),to()},ws=w=>{w.stopPropagation();const A=e.multiple?[]:q.value;if(e.multiple)for(const L of s.selected)L.isDisabled&&A.push(L.value);t(X,A),pn(A),s.hoveringIndex=-1,M.value=!1,t("clear"),to()},Cs=w=>{var A;if(e.multiple){const L=De((A=e.modelValue)!=null?A:[]).slice(),z=vs(L,w.value);z>-1?L.splice(z,1):(e.multipleLimit<=0||L.length{eo(w)})},vs=(w=[],A)=>{if(!te(A))return w.indexOf(A);const L=e.valueKey;let z=-1;return w.some((Ge,_t)=>n.toRaw(Be(Ge,L))===Be(A,L)?(z=_t,!0):!1),z},eo=w=>{var A,L,z,Ge,_t;const no=ee(w)?w[0]:w;let ft=null;if(no!=null&&no.value){const Te=U.value.filter(Is=>Is.value===no.value);Te.length>0&&(ft=Te[0].$el)}if(d.value&&ft){const Te=(Ge=(z=(L=(A=d.value)==null?void 0:A.popperRef)==null?void 0:L.contentRef)==null?void 0:z.querySelector)==null?void 0:Ge.call(z,`.${r.be("dropdown","wrap")}`);Te&&Uf(Te,ft)}(_t=C.value)==null||_t.handleScroll()},db=w=>{s.options.set(w.value,w),s.cachedOptions.set(w.value,w),w.disabled&&s.disabledOptions.set(w.value,w)},fb=(w,A)=>{s.options.get(w)===A&&s.options.delete(w)},ub=n.computed(()=>{var w,A;return(A=(w=d.value)==null?void 0:w.popperRef)==null?void 0:A.contentRef}),pb=()=>{s.isBeforeHide=!1,n.nextTick(()=>eo(s.selected))},to=()=>{var w;(w=u.value)==null||w.focus()},Ss=()=>{var w;(w=u.value)==null||w.blur()},hb=w=>{ws(w)},mb=()=>{M.value=!1,O.value&&Ss()},gb=()=>{s.inputValue.length>0?s.inputValue="":M.value=!1},ks=()=>{x.value||(oo&&(s.inputHovering=!0),s.menuVisibleOnFocus?s.menuVisibleOnFocus=!1:M.value=!M.value)},yb=()=>{M.value?U.value[s.hoveringIndex]&&Cs(U.value[s.hoveringIndex]):ks()},bi=w=>te(w.value)?Be(w.value,e.valueKey):w.value,bb=n.computed(()=>U.value.filter(w=>w.visible).every(w=>w.disabled)),wb=n.computed(()=>e.multiple?e.collapseTags?s.selected.slice(0,e.maxCollapseTags):s.selected:[]),Cb=n.computed(()=>e.multiple?e.collapseTags?s.selected.slice(e.maxCollapseTags):[]:[]),Es=w=>{if(!M.value){M.value=!0;return}if(!(s.options.size===0||s.filteredOptionsCount===0||I.value)&&!bb.value){w==="next"?(s.hoveringIndex++,s.hoveringIndex===s.options.size&&(s.hoveringIndex=0)):w==="prev"&&(s.hoveringIndex--,s.hoveringIndex<0&&(s.hoveringIndex=s.options.size-1));const A=U.value[s.hoveringIndex];(A.disabled===!0||A.states.groupDisabled===!0||!A.visible)&&Es(w),n.nextTick(()=>eo(N.value))}},vb=()=>{if(!c.value)return 0;const w=window.getComputedStyle(c.value);return Number.parseFloat(w.gap||"6px")},Sb=n.computed(()=>{const w=vb();return{maxWidth:`${b.value&&e.maxCollapseTags===1?s.selectionWidth-s.collapseItemWidth-w:s.selectionWidth}px`}}),kb=n.computed(()=>({maxWidth:`${s.selectionWidth}px`})),Eb=n.computed(()=>({width:`${Math.max(s.calculatorWidth,Bg)}px`}));return Re(c,Nt),Re(p,ln),Re(m,dt),Re(E,dt),Re(y,cn),Re(b,Xn),n.onMounted(()=>{Bt()}),{inputId:P,contentId:i,nsSelect:r,nsInput:a,states:s,isFocused:O,expanded:M,optionsArray:U,hoverOption:N,selectSize:Yn,filteredOptionsCount:ae,resetCalculatorWidth:ln,updateTooltip:dt,updateTagTooltip:cn,debouncedOnInputChange:un,onInput:fn,deletePrevTag:lb,deleteTag:cb,deleteSelected:ws,handleOptionSelect:Cs,scrollToOption:eo,hasModelValue:$,shouldShowPlaceholder:Zn,currentPlaceholder:gi,mouseEnterEventName:yi,showClose:pe,iconComponent:Y,iconReverse:Z,validateState:ce,validateIcon:Ee,showNewOption:qe,updateOptions:Jn,collapseTagSize:an,setSelected:Bt,selectDisabled:x,emptyText:Ie,handleCompositionStart:k,handleCompositionUpdate:v,handleCompositionEnd:S,onOptionCreate:db,onOptionDestroy:fb,handleMenuEnter:pb,focus:to,blur:Ss,handleClearClick:hb,handleClickOutside:mb,handleEsc:gb,toggleMenu:ks,selectOption:yb,getValueKey:bi,navigateOptions:Es,dropdownMenuVisible:mi,showTagList:wb,collapseTagList:Cb,tagStyle:Sb,collapseTagStyle:kb,inputStyle:Eb,popperRef:ub,inputRef:u,tooltipRef:d,tagTooltipRef:f,calculatorRef:p,prefixRef:g,suffixRef:h,selectRef:l,wrapperRef:E,selectionRef:c,scrollbarRef:C,menuRef:m,tagMenuRef:y,collapseItemRef:b}};var _g=n.defineComponent({name:"ElOptions",setup(e,{slots:t}){const o=n.inject(Kn);let i=[];return()=>{var r,a;const s=(r=t.default)==null?void 0:r.call(t),l=[];function c(d){ee(d)&&d.forEach(f=>{var u,p,g,h;const m=(u=(f==null?void 0:f.type)||{})==null?void 0:u.name;m==="ElOptionGroup"?c(!me(f.children)&&!ee(f.children)&&Q((p=f.children)==null?void 0:p.default)?(g=f.children)==null?void 0:g.default():f.children):m==="ElOption"?l.push((h=f.props)==null?void 0:h.value):ee(f.children)&&c(f.children)})}return s.length&&c((a=s[0])==null?void 0:a.children),kn(l,i)||(i=l,o&&(o.states.optionValues=l)),s}}});const Pg=R({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:kt,effect:{type:_(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:_(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:se.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:mt,default:W.CircleClose},fitInputWidth:Boolean,suffixIcon:{type:mt,default:W.ArrowDown},tagType:{...ti.type,default:"info"},tagEffect:{...ti.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,placement:{type:_(String),values:On,default:"bottom-start"},fallbackPlacements:{type:_(Array),default:["bottom-start","top-start","right","left"]},appendTo:String,...Tp,...rt(["ariaLabel"])}),ls="ElSelect",Lg=n.defineComponent({name:ls,componentName:ls,components:{ElSelectMenu:Mg,ElOption:oi,ElOptions:_g,ElTag:Wm,ElScrollbar:qp,ElTooltip:Pa,ElIcon:be},directives:{ClickOutside:ym},props:Pg,emits:[X,Io,"remove-tag","clear","visible-change","focus","blur"],setup(e,{emit:t}){const o=n.computed(()=>{const{modelValue:a,multiple:s}=e,l=s?[]:void 0;return ee(a)?s?a:l:s?l:a}),i=n.reactive({...n.toRefs(e),modelValue:o}),r=Ng(i,t);return n.provide(Kn,n.reactive({props:i,states:r.states,optionsArray:r.optionsArray,handleOptionSelect:r.handleOptionSelect,onOptionCreate:r.onOptionCreate,onOptionDestroy:r.onOptionDestroy,selectRef:r.selectRef,setSelected:r.setSelected})),{...r,modelValue:o}}});function Vg(e,t,o,i,r,a){const s=n.resolveComponent("el-tag"),l=n.resolveComponent("el-tooltip"),c=n.resolveComponent("el-icon"),d=n.resolveComponent("el-option"),f=n.resolveComponent("el-options"),u=n.resolveComponent("el-scrollbar"),p=n.resolveComponent("el-select-menu"),g=n.resolveDirective("click-outside");return n.withDirectives((n.openBlock(),n.createElementBlock("div",{ref:"selectRef",class:n.normalizeClass([e.nsSelect.b(),e.nsSelect.m(e.selectSize)]),[n.toHandlerKey(e.mouseEnterEventName)]:h=>e.states.inputHovering=!0,onMouseleave:h=>e.states.inputHovering=!1},[n.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":e.fallbackPlacements,effect:e.effect,pure:"",trigger:"click",transition:`${e.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:e.persistent,"append-to":e.appendTo,onBeforeShow:e.handleMenuEnter,onHide:h=>e.states.isBeforeHide=!1},{default:n.withCtx(()=>{var h;return[n.createElementVNode("div",{ref:"wrapperRef",class:n.normalizeClass([e.nsSelect.e("wrapper"),e.nsSelect.is("focused",e.isFocused),e.nsSelect.is("hovering",e.states.inputHovering),e.nsSelect.is("filterable",e.filterable),e.nsSelect.is("disabled",e.selectDisabled)]),onClick:n.withModifiers(e.toggleMenu,["prevent"])},[e.$slots.prefix?(n.openBlock(),n.createElementBlock("div",{key:0,ref:"prefixRef",class:n.normalizeClass(e.nsSelect.e("prefix"))},[n.renderSlot(e.$slots,"prefix")],2)):n.createCommentVNode("v-if",!0),n.createElementVNode("div",{ref:"selectionRef",class:n.normalizeClass([e.nsSelect.e("selection"),e.nsSelect.is("near",e.multiple&&!e.$slots.prefix&&!!e.states.selected.length)])},[e.multiple?n.renderSlot(e.$slots,"tag",{key:0},()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.showTagList,m=>(n.openBlock(),n.createElementBlock("div",{key:e.getValueKey(m),class:n.normalizeClass(e.nsSelect.e("selected-item"))},[n.createVNode(s,{closable:!e.selectDisabled&&!m.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:n.normalizeStyle(e.tagStyle),onClose:y=>e.deleteTag(y,m)},{default:n.withCtx(()=>[n.createElementVNode("span",{class:n.normalizeClass(e.nsSelect.e("tags-text"))},[n.renderSlot(e.$slots,"label",{label:m.currentLabel,value:m.value},()=>[n.createTextVNode(n.toDisplayString(m.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),e.collapseTags&&e.states.selected.length>e.maxCollapseTags?(n.openBlock(),n.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:n.withCtx(()=>[n.createElementVNode("div",{ref:"collapseItemRef",class:n.normalizeClass(e.nsSelect.e("selected-item"))},[n.createVNode(s,{closable:!1,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",style:n.normalizeStyle(e.collapseTagStyle)},{default:n.withCtx(()=>[n.createElementVNode("span",{class:n.normalizeClass(e.nsSelect.e("tags-text"))}," + "+n.toDisplayString(e.states.selected.length-e.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:n.withCtx(()=>[n.createElementVNode("div",{ref:"tagMenuRef",class:n.normalizeClass(e.nsSelect.e("selection"))},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.collapseTagList,m=>(n.openBlock(),n.createElementBlock("div",{key:e.getValueKey(m),class:n.normalizeClass(e.nsSelect.e("selected-item"))},[n.createVNode(s,{class:"in-tooltip",closable:!e.selectDisabled&&!m.isDisabled,size:e.collapseTagSize,type:e.tagType,effect:e.tagEffect,"disable-transitions":"",onClose:y=>e.deleteTag(y,m)},{default:n.withCtx(()=>[n.createElementVNode("span",{class:n.normalizeClass(e.nsSelect.e("tags-text"))},[n.renderSlot(e.$slots,"label",{label:m.currentLabel,value:m.value},()=>[n.createTextVNode(n.toDisplayString(m.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):n.createCommentVNode("v-if",!0)]):n.createCommentVNode("v-if",!0),e.selectDisabled?n.createCommentVNode("v-if",!0):(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("input-wrapper"),e.nsSelect.is("hidden",!e.filterable)])},[n.withDirectives(n.createElementVNode("input",{id:e.inputId,ref:"inputRef","onUpdate:modelValue":m=>e.states.inputValue=m,type:"text",name:e.name,class:n.normalizeClass([e.nsSelect.e("input"),e.nsSelect.is(e.selectSize)]),disabled:e.selectDisabled,autocomplete:e.autocomplete,style:n.normalizeStyle(e.inputStyle),role:"combobox",readonly:!e.filterable,spellcheck:"false","aria-activedescendant":((h=e.hoverOption)==null?void 0:h.id)||"","aria-controls":e.contentId,"aria-expanded":e.dropdownMenuVisible,"aria-label":e.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[n.withKeys(n.withModifiers(m=>e.navigateOptions("next"),["stop","prevent"]),["down"]),n.withKeys(n.withModifiers(m=>e.navigateOptions("prev"),["stop","prevent"]),["up"]),n.withKeys(n.withModifiers(e.handleEsc,["stop","prevent"]),["esc"]),n.withKeys(n.withModifiers(e.selectOption,["stop","prevent"]),["enter"]),n.withKeys(n.withModifiers(e.deletePrevTag,["stop"]),["delete"])],onCompositionstart:e.handleCompositionStart,onCompositionupdate:e.handleCompositionUpdate,onCompositionend:e.handleCompositionEnd,onInput:e.onInput,onClick:n.withModifiers(e.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[n.vModelText,e.states.inputValue]]),e.filterable?(n.openBlock(),n.createElementBlock("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:n.normalizeClass(e.nsSelect.e("input-calculator")),textContent:n.toDisplayString(e.states.inputValue)},null,10,["textContent"])):n.createCommentVNode("v-if",!0)],2)),e.shouldShowPlaceholder?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass([e.nsSelect.e("selected-item"),e.nsSelect.e("placeholder"),e.nsSelect.is("transparent",!e.hasModelValue||e.expanded&&!e.states.inputValue)])},[e.hasModelValue?n.renderSlot(e.$slots,"label",{key:0,label:e.currentPlaceholder,value:e.modelValue},()=>[n.createElementVNode("span",null,n.toDisplayString(e.currentPlaceholder),1)]):(n.openBlock(),n.createElementBlock("span",{key:1},n.toDisplayString(e.currentPlaceholder),1))],2)):n.createCommentVNode("v-if",!0)],2),n.createElementVNode("div",{ref:"suffixRef",class:n.normalizeClass(e.nsSelect.e("suffix"))},[e.iconComponent&&!e.showClose?(n.openBlock(),n.createBlock(c,{key:0,class:n.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.iconReverse])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.iconComponent)))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0),e.showClose&&e.clearIcon?(n.openBlock(),n.createBlock(c,{key:1,class:n.normalizeClass([e.nsSelect.e("caret"),e.nsSelect.e("icon"),e.nsSelect.e("clear")]),onClick:e.handleClearClick},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.clearIcon)))]),_:1},8,["class","onClick"])):n.createCommentVNode("v-if",!0),e.validateState&&e.validateIcon?(n.openBlock(),n.createBlock(c,{key:2,class:n.normalizeClass([e.nsInput.e("icon"),e.nsInput.e("validateIcon")])},{default:n.withCtx(()=>[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.validateIcon)))]),_:1},8,["class"])):n.createCommentVNode("v-if",!0)],2)],10,["onClick"])]}),content:n.withCtx(()=>[n.createVNode(p,{ref:"menuRef"},{default:n.withCtx(()=>[e.$slots.header?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(e.nsSelect.be("dropdown","header")),onClick:n.withModifiers(()=>{},["stop"])},[n.renderSlot(e.$slots,"header")],10,["onClick"])):n.createCommentVNode("v-if",!0),n.withDirectives(n.createVNode(u,{id:e.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":e.nsSelect.be("dropdown","wrap"),"view-class":e.nsSelect.be("dropdown","list"),class:n.normalizeClass([e.nsSelect.is("empty",e.filteredOptionsCount===0)]),role:"listbox","aria-label":e.ariaLabel,"aria-orientation":"vertical"},{default:n.withCtx(()=>[e.showNewOption?(n.openBlock(),n.createBlock(d,{key:0,value:e.states.inputValue,created:!0},null,8,["value"])):n.createCommentVNode("v-if",!0),n.createVNode(f,null,{default:n.withCtx(()=>[n.renderSlot(e.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[n.vShow,e.states.options.size>0&&!e.loading]]),e.$slots.loading&&e.loading?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(e.nsSelect.be("dropdown","loading"))},[n.renderSlot(e.$slots,"loading")],2)):e.loading||e.filteredOptionsCount===0?(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(e.nsSelect.be("dropdown","empty"))},[n.renderSlot(e.$slots,"empty",{},()=>[n.createElementVNode("span",null,n.toDisplayString(e.emptyText),1)])],2)):n.createCommentVNode("v-if",!0),e.$slots.footer?(n.openBlock(),n.createElementBlock("div",{key:3,class:n.normalizeClass(e.nsSelect.be("dropdown","footer")),onClick:n.withModifiers(()=>{},["stop"])},[n.renderSlot(e.$slots,"footer")],10,["onClick"])):n.createCommentVNode("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","append-to","onBeforeShow","onHide"])],16,["onMouseleave"])),[[g,e.handleClickOutside,e.popperRef]])}var Rg=F(Lg,[["render",Vg],["__file","select.vue"]]);const Fg=n.defineComponent({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(e){const t=D("select"),o=n.ref(null),i=n.getCurrentInstance(),r=n.ref([]);n.provide(ss,n.reactive({...n.toRefs(e)}));const a=n.computed(()=>r.value.some(d=>d.visible===!0)),s=d=>{var f,u;return((f=d.type)==null?void 0:f.name)==="ElOption"&&!!((u=d.component)!=null&&u.proxy)},l=d=>{const f=De(d),u=[];return f.forEach(p=>{var g,h;s(p)?u.push(p.component.proxy):(g=p.children)!=null&&g.length?u.push(...l(p.children)):(h=p.component)!=null&&h.subTree&&u.push(...l(p.component.subTree))}),u},c=()=>{r.value=l(i.subTree)};return n.onMounted(()=>{c()}),Fs(o,c,{attributes:!0,subtree:!0,childList:!0}),{groupRef:o,visible:a,ns:t}}});function Dg(e,t,o,i,r,a){return n.withDirectives((n.openBlock(),n.createElementBlock("ul",{ref:"groupRef",class:n.normalizeClass(e.ns.be("group","wrap"))},[n.createElementVNode("li",{class:n.normalizeClass(e.ns.be("group","title"))},n.toDisplayString(e.label),3),n.createElementVNode("li",null,[n.createElementVNode("ul",{class:n.normalizeClass(e.ns.b("group"))},[n.renderSlot(e.$slots,"default")],2)])],2)),[[n.vShow,e.visible]])}var cs=F(Fg,[["render",Dg],["__file","option-group.vue"]]);const Un=oe(Rg,{Option:oi,OptionGroup:cs}),ii=tt(oi);tt(cs);const $g=R({trigger:en.trigger,placement:ni.placement,disabled:en.disabled,visible:se.visible,transition:se.transition,popperOptions:ni.popperOptions,tabindex:ni.tabindex,content:se.content,popperStyle:se.popperStyle,popperClass:se.popperClass,enterable:{...se.enterable,default:!0},effect:{...se.effect,default:"light"},teleported:se.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}}),zg={"update:visible":e=>_e(e),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},jg="onUpdate:visible",Hg=n.defineComponent({name:"ElPopover"}),Kg=n.defineComponent({...Hg,props:$g,emits:zg,setup(e,{expose:t,emit:o}){const i=e,r=n.computed(()=>i[jg]),a=D("popover"),s=n.ref(),l=n.computed(()=>{var y;return(y=n.unref(s))==null?void 0:y.popperRef}),c=n.computed(()=>[{width:et(i.width)},i.popperStyle]),d=n.computed(()=>[a.b(),i.popperClass,{[a.m("plain")]:!!i.content}]),f=n.computed(()=>i.transition===`${a.namespace.value}-fade-in-linear`),u=()=>{var y;(y=s.value)==null||y.hide()},p=()=>{o("before-enter")},g=()=>{o("before-leave")},h=()=>{o("after-enter")},m=()=>{o("update:visible",!1),o("after-leave")};return t({popperRef:l,hide:u}),(y,b)=>(n.openBlock(),n.createBlock(n.unref(Pa),n.mergeProps({ref_key:"tooltipRef",ref:s},y.$attrs,{trigger:y.trigger,placement:y.placement,disabled:y.disabled,visible:y.visible,transition:y.transition,"popper-options":y.popperOptions,tabindex:y.tabindex,content:y.content,offset:y.offset,"show-after":y.showAfter,"hide-after":y.hideAfter,"auto-close":y.autoClose,"show-arrow":y.showArrow,"aria-label":y.title,effect:y.effect,enterable:y.enterable,"popper-class":n.unref(d),"popper-style":n.unref(c),teleported:y.teleported,persistent:y.persistent,"gpu-acceleration":n.unref(f),"onUpdate:visible":n.unref(r),onBeforeShow:p,onBeforeHide:g,onShow:h,onHide:m}),{content:n.withCtx(()=>[y.title?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(n.unref(a).e("title")),role:"title"},n.toDisplayString(y.title),3)):n.createCommentVNode("v-if",!0),n.renderSlot(y.$slots,"default",{},()=>[n.createTextVNode(n.toDisplayString(y.content),1)])]),default:n.withCtx(()=>[y.$slots.reference?n.renderSlot(y.$slots,"reference",{key:0}):n.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 Ug=F(Kg,[["__file","popover.vue"]]);const ds=(e,t)=>{const o=t.arg||t.value,i=o==null?void 0:o.popperRef;i&&(i.triggerRef=e)};var Wg={mounted(e,t){ds(e,t)},updated(e,t){ds(e,t)}};const ri=Jf(Wg,"popover"),on=oe(Ug,{directive:ri});function qg(e){let t;const o=n.ref(!1),i=n.reactive({...e,originalPosition:"",originalOverflow:"",visible:!1});function r(p){i.text=p}function a(){const p=i.parent,g=u.ns;if(!p.vLoadingAddClassList){let h=p.getAttribute("loading-number");h=Number.parseInt(h)-1,h?p.setAttribute("loading-number",h.toString()):(Ht(p,g.bm("parent","relative")),p.removeAttribute("loading-number")),Ht(p,g.bm("parent","hidden"))}s(),f.unmount()}function s(){var p,g;(g=(p=u.$el)==null?void 0:p.parentNode)==null||g.removeChild(u.$el)}function l(){var p;e.beforeClose&&!e.beforeClose()||(o.value=!0,clearTimeout(t),t=setTimeout(c,400),i.visible=!1,(p=e.closed)==null||p.call(e))}function c(){if(!o.value)return;const p=i.parent;o.value=!1,p.vLoadingAddClassList=void 0,a()}const d=n.defineComponent({name:"ElLoading",setup(p,{expose:g}){const{ns:h,zIndex:m}=xp("loading");return g({ns:h,zIndex:m}),()=>{const y=i.spinner||i.svg,b=n.h("svg",{class:"circular",viewBox:i.svgViewBox?i.svgViewBox:"0 0 50 50",...y?{innerHTML:y}:{}},[n.h("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),C=i.text?n.h("p",{class:h.b("text")},[i.text]):void 0;return n.h(n.Transition,{name:h.b("fade"),onAfterLeave:c},{default:n.withCtx(()=>[n.withDirectives(n.createVNode("div",{style:{backgroundColor:i.background||""},class:[h.b("mask"),i.customClass,i.fullscreen?"is-fullscreen":""]},[n.h("div",{class:h.b("spinner")},[b,C])]),[[n.vShow,i.visible]])])})}}}),f=n.createApp(d),u=f.mount(document.createElement("div"));return{...n.toRefs(i),setText:r,removeElLoadingChild:s,close:l,handleAfterLeave:c,vm:u,get $el(){return u.$el}}}let Wn;const ai=function(e={}){if(!K)return;const t=Gg(e);if(t.fullscreen&&Wn)return Wn;const o=qg({...t,closed:()=>{var r;(r=t.closed)==null||r.call(t),t.fullscreen&&(Wn=void 0)}});Jg(t,t.parent,o),fs(t,t.parent,o),t.parent.vLoadingAddClassList=()=>fs(t,t.parent,o);let i=t.parent.getAttribute("loading-number");return i?i=`${Number.parseInt(i)+1}`:i="1",t.parent.setAttribute("loading-number",i),t.parent.appendChild(o.$el),n.nextTick(()=>o.visible.value=t.visible),t.fullscreen&&(Wn=o),o},Gg=e=>{var t,o,i,r;let a;return me(e.target)?a=(t=document.querySelector(e.target))!=null?t:document.body:a=e.target||document.body,{parent:a===document.body||e.body?document.body:a,background:e.background||"",svg:e.svg||"",svgViewBox:e.svgViewBox||"",spinner:e.spinner||!1,text:e.text||"",fullscreen:a===document.body&&((o=e.fullscreen)!=null?o:!0),lock:(i=e.lock)!=null?i:!1,customClass:e.customClass||"",visible:(r=e.visible)!=null?r:!0,beforeClose:e.beforeClose,closed:e.closed,target:a}},Jg=async(e,t,o)=>{const{nextZIndex:i}=o.vm.zIndex||o.vm._.exposed.zIndex,r={};if(e.fullscreen)o.originalPosition.value=ht(document.body,"position"),o.originalOverflow.value=ht(document.body,"overflow"),r.zIndex=i();else if(e.parent===document.body){o.originalPosition.value=ht(document.body,"position"),await n.nextTick();for(const a of["top","left"]){const s=a==="top"?"scrollTop":"scrollLeft";r[a]=`${e.target.getBoundingClientRect()[a]+document.body[s]+document.documentElement[s]-Number.parseInt(ht(document.body,`margin-${a}`),10)}px`}for(const a of["height","width"])r[a]=`${e.target.getBoundingClientRect()[a]}px`}else o.originalPosition.value=ht(t,"position");for(const[a,s]of Object.entries(r))o.$el.style[a]=s},fs=(e,t,o)=>{const i=o.vm.ns||o.vm._.exposed.ns;["absolute","fixed","sticky"].includes(o.originalPosition.value)?Ht(t,i.bm("parent","relative")):Eo(t,i.bm("parent","relative")),e.fullscreen&&e.lock?Eo(t,i.bm("parent","hidden")):Ht(t,i.bm("parent","hidden"))},qn=Symbol("ElLoading"),us=(e,t)=>{var o,i,r,a;const s=t.instance,l=p=>te(t.value)?t.value[p]:void 0,c=p=>{const g=me(p)&&(s==null?void 0:s[p])||p;return g&&n.ref(g)},d=p=>c(l(p)||e.getAttribute(`element-loading-${Js(p)}`)),f=(o=l("fullscreen"))!=null?o:t.modifiers.fullscreen,u={text:d("text"),svg:d("svg"),svgViewBox:d("svgViewBox"),spinner:d("spinner"),background:d("background"),customClass:d("customClass"),fullscreen:f,target:(i=l("target"))!=null?i:f?void 0:e,body:(r=l("body"))!=null?r:t.modifiers.body,lock:(a=l("lock"))!=null?a:t.modifiers.lock};e[qn]={options:u,instance:ai(u)}},Yg=(e,t)=>{for(const o of Object.keys(t))n.isRef(t[o])&&(t[o].value=e[o])},si={mounted(e,t){t.value&&us(e,t)},updated(e,t){const o=e[qn];t.oldValue!==t.value&&(t.value&&!t.oldValue?us(e,t):t.value&&t.oldValue?te(t.value)&&Yg(t.value,o.options):o==null||o.instance.close())},unmounted(e){var t;(t=e[qn])==null||t.instance.close(),e[qn]=null}},Zg={install(e){e.directive("loading",si),e.config.globalProperties.$loading=ai},directive:si,service:ai},st=(e,t)=>{const o=e.__vccOpts||e;for(const[i,r]of t)o[i]=r;return o},Qg={name:"SelectionsGroup",components:{Checkbox:Ga,CheckboxGroup:Ja,Col:nn,Icon:be,Row:tn,ElIconWarning:W.Warning},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})},setCheckboxActionData:function(e,t){if(e){const o=e.querySelector('input[type="checkbox"]'),i=e.querySelector(".el-checkbox__label"),a=e.closest(".selections-container").querySelector(".checkall-display-text");let s="";o&&(s=o.checked?"checked":"unchecked"),this.checkboxActionData={selectionsTitle:a?a.innerText:"",property:o&&t!=="all"?o.value:"",label:i?i.innerText:"",checked:s}}else this.checkboxActionData={selectionsTitle:"",property:"",label:"",checked:""}},onCheckboxNativeChange:function(e){const t=e.target.closest(".checkbox-container");this.setCheckboxActionData(t,"individual")},onAllCheckboxNativeChange:function(e){const t=e.target.closest(".all-checkbox");this.setCheckboxActionData(t,"all")},visibilityToggle:function(e,t){this.$emit("changed",{key:e,value:t}),e===this.checkboxActionData.property&&(this.checkboxActionData.checked=t?"checked":"unchecked"),this.$emit("selections-data-changed",this.checkboxActionData)},checkboxMouseEnterEmit:function(e,t){this.$emit("checkboxMouseEnter",{key:e,value:t,selections:this.selections,checked:this.checkedItems})},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}),this.checkboxActionData.property=this.identifierKey,this.checkboxActionData.checked=e?"checked":"unchecked",this.$emit("selections-data-changed",this.checkboxActionData)},getBackgroundStyles:function(e){return"colour"in e&&this.colourStyle==="background"?{background:e.colour}:{}},getState:function(){const t=this.checkedItems.length===this.selections.length;return{checkAll:t,checked:t?[]:this.checkedItems}},setState:function(e){var t;if(this.checkAll=e.checkAll,this.checkedItems.length=0,(t=e.checked)!=null&&t.length)this.checkedItems.push(...e.checked),this.selections.forEach(o=>{const i=o[this.identifierKey];this.$emit("changed",{key:i,value:this.checkedItems.includes(i)})});else{const o=this.selections.map(r=>r[this.identifierKey]);let i=!1;this.checkAll&&(i=!0,this.checkedItems.push(...o)),this.$emit("checkAll",{keys:o,value:i})}},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"},helpMessage:{type:String,default:""},identifierKey:{type:String,default:"id"},labelKey:{type:String,default:"label"},title:{type:String,default:""},selections:{type:Array,default:function(){return[]}},showAsLegend:{type:Boolean,default:!1}},computed:{isIndeterminate:function(){return!(this.checkedItems.length===0||this.checkAll)}},data:function(){return{checkedItems:[],checkAll:!0,checkboxActionData:{selectionsTitle:"",property:"",label:"",checked:""}}},mounted:function(){this.reset()}},Xg={class:"selections-container"},ey={class:"checkall-display-text"},ty={style:{"word-break":"keep-all"}},ny={class:"checkbox-group-inner"},oy=["onMouseenter","onMouseleave"];function iy(e,t,o,i,r,a){const s=W.Warning,l=be,c=on,d=nn,f=Ga,u=tn,p=Ja;return n.openBlock(),n.createElementBlock("div",Xg,[n.createVNode(u,null,{default:n.withCtx(()=>[n.createVNode(d,{span:12},{default:n.withCtx(()=>[n.createElementVNode("span",ey,n.toDisplayString(o.title),1),o.helpMessage?(n.openBlock(),n.createBlock(c,{key:0,width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},n.createSlots({default:n.withCtx(()=>[n.createElementVNode("span",ty,n.toDisplayString(o.helpMessage),1)]),_:2},[o.helpMessage?{name:"reference",fn:n.withCtx(()=>[n.createVNode(l,{class:"info"},{default:n.withCtx(()=>[n.createVNode(s)]),_:1})]),key:"0"}:void 0]),1024)):n.createCommentVNode("",!0)]),_:1}),n.createVNode(d,{span:12},{default:n.withCtx(()=>[o.selections&&o.selections.length>1&&!o.showAsLegend?(n.openBlock(),n.createBlock(f,{key:0,class:"all-checkbox",indeterminate:a.isIndeterminate,modelValue:e.checkAll,"onUpdate:modelValue":t[0]||(t[0]=g=>e.checkAll=g),onChange:a.handleCheckAllChange,onClick:a.onAllCheckboxNativeChange},{default:n.withCtx(()=>t[2]||(t[2]=[n.createTextVNode("Display all")])),_:1},8,["indeterminate","modelValue","onChange","onClick"])):n.createCommentVNode("",!0)]),_:1})]),_:1}),n.createVNode(p,{class:n.normalizeClass({"show-as-legend":o.showAsLegend,"checkbox-group":!o.showAsLegend}),modelValue:e.checkedItems,"onUpdate:modelValue":t[1]||(t[1]=g=>e.checkedItems=g),size:"small",onChange:a.handleCheckedItemsChange},{default:n.withCtx(()=>[n.createElementVNode("div",ny,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.selections,g=>(n.openBlock(),n.createBlock(u,{key:g[o.identifierKey],label:g[o.identifierKey]},{default:n.withCtx(()=>[n.createElementVNode("div",{class:"checkbox-container",onMouseenter:h=>a.checkboxMouseEnterEmit(g[o.identifierKey],!0),onMouseleave:h=>a.checkboxMouseEnterEmit(g[o.identifierKey],!1)},[n.createVNode(f,{class:"my-checkbox",label:g[o.identifierKey],value:g[o.identifierKey],onChange:h=>a.visibilityToggle(g[o.identifierKey],h),onClick:a.onCheckboxNativeChange,checked:!("enabled"in g)||g.enabled===!0},{default:n.withCtx(()=>[n.createVNode(u,{class:"checkbox-row"},{default:n.withCtx(()=>[a.hasLineStyles(g)?(n.openBlock(),n.createBlock(d,{key:0,span:4},{default:n.withCtx(()=>[n.createElementVNode("div",{class:"path-visual",style:n.normalizeStyle(a.getLineStyles(g))},null,4)]),_:2},1024)):n.createCommentVNode("",!0),n.createVNode(d,{span:20},{default:n.withCtx(()=>[n.createElementVNode("div",{style:n.normalizeStyle(a.getBackgroundStyles(g))},n.toDisplayString(g[o.labelKey]),5)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value","onChange","onClick","checked"])],40,oy)]),_:2},1032,["label"]))),128))])]),_:1},8,["class","modelValue","onChange"])])}const ps=st(Qg,[["render",iy],["__scopeId","data-v-35fb97d0"]]),ry='',ay={name:"LegendItem",props:{item:{type:Object,required:!0},identifierKey:{type:String,default:"id"},styleKey:{type:String,default:"style"},showStarInLegend:{type:Boolean,default:!1}},computed:{clipPathLegends:function(){return["exoid","hexagon"]},legendStyleValue:function(){return this.item[this.styleKey]==="star"?this.item[this.identifierKey]==="Featured dataset marker"&&!this.showStarInLegend?void 0:"star":this.clipPathLegends.includes(this.item[this.styleKey])?this.item[this.styleKey]:this.item[this.styleKey]==="line"?[this.item[this.styleKey],this.item.dashed?"dashed":"",this.item.arrow?"arrow":""]:[this.item[this.styleKey],"shape"]},customStyle:function(){const e=this.item.color?this.item.color:this.item.colour;let t=e||"transparent",o=this.item.border?this.item.border:"black";if(e&&!this.item.border&&(o=t),this.item[this.styleKey]==="star"){let i=ry.replace("",t);return i=i.replace("",o),i=i.replace("",o?"2":"0"),i="data:image/svg+xml,"+encodeURIComponent(i),{color:t,"background-image":`url(${i})`}}else return this.item[this.styleKey]==="line"?{color:t}:{"background-color":t,"border-color":o}}},methods:{capitalise:function(e){return e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},customClipPathStyle:function(e){const t={...this.customStyle};return e?t["background-color"]=t["border-color"]:t.scale=.7,t}}},sy={key:0,class:"legend-item"},ly={class:"label"};function cy(e,t,o,i,r,a){return a.legendStyleValue?(n.openBlock(),n.createElementBlock("div",sy,[a.clipPathLegends.includes(a.legendStyleValue)?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(a.legendStyleValue),style:n.normalizeStyle(a.customClipPathStyle(!0))},[n.createElementVNode("div",{class:n.normalizeClass(a.legendStyleValue),style:n.normalizeStyle(a.customClipPathStyle(!1))},null,6)],6)):(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(a.legendStyleValue),style:n.normalizeStyle(a.customStyle)},null,6)),n.createElementVNode("div",ly,n.toDisplayString(a.capitalise(o.item[o.identifierKey])),1)])):n.createCommentVNode("",!0)}const hs=st(ay,[["render",cy],["__scopeId","data-v-1db7582f"]]),dy={name:"DynamicLegends",components:{LegendItem:hs},props:{identifierKey:{type:String,default:"id"},styleKey:{type:String,default:"style"},title:{type:String,default:""},legends:{type:Array,default:function(){return[]}},showStarInLegend:{type:Boolean,default:!1},showDatasetMarkerTooltip:{type:Boolean,default:!1}},data(){return{isHovering:!1,hoverTimeout:null}},computed:{tooltipVisible(){return this.showDatasetMarkerTooltip&&this.showStarInLegend||this.isHovering}},methods:{onMouseOver(){clearTimeout(this.hoverTimeout),this.hoverTimeout=setTimeout(()=>{this.isHovering=!0},500)},onMouseOut(){clearTimeout(this.hoverTimeout),this.hoverTimeout=setTimeout(()=>{this.isHovering=!1},500)}}},fy={class:"legend-group"},uy=["label"];function py(e,t,o,i,r,a){const s=hs,l=on,c=ri;return n.openBlock(),n.createElementBlock("div",fy,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.legends,d=>(n.openBlock(),n.createElementBlock("div",{class:"legend-container",key:d[o.identifierKey],label:d[o.identifierKey]},[d[o.identifierKey]==="Featured dataset marker"?(n.openBlock(),n.createBlock(l,{key:0,content:"Location of the featured dataset",placement:"right",teleported:!0,trigger:"manual",width:"max-content",offset:0,"popper-class":"flatmap-popper flatmap-teleport-popper",visible:a.tooltipVisible,ref_for:!0,ref:"featuredMarkerPopover"},{reference:n.withCtx(()=>[n.withDirectives((n.openBlock(),n.createElementBlock("div",{onMouseover:t[0]||(t[0]=(...f)=>a.onMouseOver&&a.onMouseOver(...f)),onMouseout:t[1]||(t[1]=(...f)=>a.onMouseOut&&a.onMouseOut(...f))},[n.createVNode(s,{item:d,identifierKey:o.identifierKey,styleKey:o.styleKey,showStarInLegend:o.showStarInLegend},null,8,["item","identifierKey","styleKey","showStarInLegend"])],32)),[[c,void 0,"featuredMarkerPopover"]])]),_:2},1032,["visible"])):(n.openBlock(),n.createBlock(s,{key:1,item:d,identifierKey:o.identifierKey,styleKey:o.styleKey,showStarInLegend:o.showStarInLegend},null,8,["item","identifierKey","styleKey","showStarInLegend"]))],8,uy))),128))])}const hy=st(dy,[["render",py],["__scopeId","data-v-32c93a1a"]]),my={name:"FlatmapError",props:{flatmapError:{type:Object,default:()=>({})}}},gy={class:"flatmap-error"},yy={class:"flatmap-error-title"},by={key:0},wy={key:0,class:"flatmap-error-message"},Cy={key:1};function vy(e,t,o,i,r,a){const s=W.DocumentDelete,l=be,c=ei;return n.openBlock(),n.createElementBlock("div",gy,[n.createElementVNode("div",yy,[n.createVNode(l,{size:"24"},{default:n.withCtx(()=>[n.createVNode(s)]),_:1}),o.flatmapError.title?(n.openBlock(),n.createElementBlock("div",by,n.toDisplayString(o.flatmapError.title),1)):n.createCommentVNode("",!0)]),o.flatmapError.messages?(n.openBlock(),n.createElementBlock("div",wy,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.flatmapError.messages,(d,f)=>(n.openBlock(),n.createElementBlock("div",{key:f},n.toDisplayString(d),1))),128))])):n.createCommentVNode("",!0),o.flatmapError.button?(n.openBlock(),n.createElementBlock("div",Cy,[n.createVNode(c,{class:"button",type:"primary",onClick:o.flatmapError.button.callback},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(o.flatmapError.button.text),1)]),_:1},8,["onClick"])])):n.createCommentVNode("",!0)])}const li=st(my,[["render",vy],["__scopeId","data-v-7cfcfa1f"]]),Sy={name:"SvgLegends"},ky={class:"legends-container"},Ey={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"};function Iy(e,t,o,i,r,a){return n.openBlock(),n.createElementBlock("div",ky,[(n.openBlock(),n.createElementBlock("svg",Ey,t[0]||(t[0]=[n.createStaticVNode(' Tissue region Brain nuclei Ganglia Ganglionated nerve plexus ',9)]))),t[1]||(t[1]=n.createElementVNode("svg",{width:"72px",height:"72px",viewBox:"0 0 24 24",fill:"yellow"},null,-1))])}const Ty=st(Sy,[["render",Iy],["__scopeId","data-v-88079d87"]]),Ay=`
2
`,rn=function(e){return e?[...new Set(e.map(t=>JSON.stringify(t)))].map(t=>JSON.parse(t)):[]},ci=[],di=async function(e,t){const o=t.filter(a=>ci.some(s=>s.taxon===a)),i=ci.filter(a=>o.includes(a.taxon)),r=t.filter(a=>!o.includes(a));if(r.length){const a=await e.queryLabels(r);if(a.length)return a.forEach(s=>{let{entity:l,label:c}=s;c==="Mammalia"&&(c="Mammalia not otherwise specified");const d={taxon:l,label:c};i.push(d),ci.push(d)}),i}else return i},fi=function(e,t){if(!e||!t)return!1;let o=JSON.stringify(e),i=JSON.stringify(t);return o.indexOf(i)!==-1},xt=(e,t)=>{const o=e.name??e,i=t.name??t,r=o.toUpperCase(),a=i.toUpperCase();return ra?1:0};let Oy=function(){this.initialise=function(e){this.flatmapAPI=e,this.destinations=[],this.origins=[],this.components=[],this.rawURLs=[],this.controller=void 0,this.uberons=[],this.lookUp=[],this.connectivitySource="map",this.noMapConnectivity=!1},this.createTooltipData=async function(e,t){let o=[];t.feature.hyperlinks&&t.feature.hyperlinks.length>0?o=t.feature.hyperlinks:o=this.rawURLs;let i;if(t.provenanceTaxonomy){i=[];try{const a=await di(e,t.provenanceTaxonomy);a.length&&a.forEach(s=>{const{label:l}=s;i.push(l)})}catch(a){console.log(a)}}return{destinations:this.destinations,origins:this.origins,components:this.components,destinationsWithDatasets:this.destinationsWithDatasets,originsWithDatasets:this.originsWithDatasets,componentsWithDatasets:this.componentsWithDatasets,title:t.label,featureId:t.resource,hyperlinks:o,provenanceTaxonomy:t.provenanceTaxonomy,provenanceTaxonomyLabel:i,connectivitySource:this.connectivitySource,noMapConnectivity:this.noMapConnectivity}},this.updateTooltipData=function(e){return{...e,origins:this.origins,originsWithDatasets:this.originsWithDatasets,components:this.components,componentsWithDatasets:this.componentsWithDatasets,destinations:this.destinations,destinationsWithDatasets:this.destinationsWithDatasets,connectivitySource:this.connectivitySource,noMapConnectivity:this.noMapConnectivity}},this.createComponentsLabelList=function(e,t){let o=[];return e.forEach(i=>{o.push(this.createLabelFromNeuralNode(i[0]),t),i.length===2&&o.push(this.createLabelFromNeuralNode(i[1]),t)}),o},this.createLabelLookup=function(e,t){return new Promise(async o=>{let i={};this.uberons=[];const r=await di(e,t);r.length&&(r.forEach(a=>{const{taxon:s,label:l}=a;i[s]=l,this.uberons.push({id:s,name:l})}),o(i))})},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 o in e)t+=`'${e[o]}'${o>=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 o in e)t+=`'${e[o]}'${o>=e.length-1?")":","} `;return t},this.findAllIdsFromConnectivity=function(e){let t=e.connectivity.flat(),o=[...new Set(t)],i=[];return o.forEach(r=>{Array.isArray(r)?i.push(r.flat()):i.push(r)}),[...new Set(i.flat())]},this.flattenConnectivity=function(e){let t=e.flat(),o=[...new Set(t)],i=[];return o.forEach(r=>{Array.isArray(r)?i.push(r.flat()):i.push(r)}),i.flat()},this.findComponents=function(e,t,o,i){let r=e.connectivity.flat(),a=rn(r),s=[],l=!1;return a.forEach(c=>{l=!1,fi(t,c)&&(l=!0),i&&fi(i,c)&&(l=!0),fi(o,c)&&(l=!0),l||s.push(c)}),s},this.retrieveFlatmapKnowledgeForEvent=async function(e,t){this.controller&&this.controller.abort(),this.controller=new AbortController,this.controller.signal;const o=t.resource;if(this.destinations=[],this.origins=[],this.components=[],this.rawURLs=[],!o||o.length===0||!o[0])return;let i=this.queryForConnectivityNew(e,o[0]);return await Promise.all([i])},this.queryForConnectivityNew=function(e,t,o="map",i=!0){return this.connectivitySource=o,new Promise(r=>{(o==="map"?this.queryMapConnectivity(e.mapMetadata.uuid,t):e.queryKnowledge(t)).then(s=>{if(this.checkConnectivityExists(s)){o==="map"&&(this.noMapConnectivity=!1);let l=s;i?this.processConnectivity(e,l).then(c=>{s.references&&(this.rawURLs=[...s.references]),r(c)}):r(l)}else o==="map"?(this.connectivitySource="sckan",this.noMapConnectivity=!0,e.queryKnowledge(t).then(l=>{if(this.checkConnectivityExists(l)){let c=l;i?this.processConnectivity(e,c).then(d=>{l.references&&(this.rawURLs=[...l.references]),r(d)}):r(c)}else r(!1)}).catch(()=>r(!1))):r(!1)}).catch(s=>{s.name==="AbortError"||console.warn(`Unable to get the knowledge for the entity ${t}.`),r(!1)})})},this.queryMapConnectivity=async function(e,t){const o=this.flatmapAPI+`flatmap/${e}/connectivity/${t}`;try{const i=await fetch(o);if(!i.ok)throw new Error(`Response status: ${i.status}`);return await i.json()}catch(i){throw new Error(i)}},this.queryForConnectivity=function(e,t,o,i=!0){const r={sql:this.buildConnectivitySqlStatement(t)},a={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r),...o?{signal:o}:{}};return new Promise(s=>{fetch(`${this.flatmapAPI}knowledge/query/`,a).then(l=>l.json()).then(l=>{if(this.connectivityExists(l)){let c=JSON.parse(l.values[0][0]);i?this.processConnectivity(e,c).then(d=>{s(d)}):s(c)}else s(!1)}).catch(l=>{l.name==="AbortError"||console.error("Error:",l),s(!1)})})},this.checkConnectivityExists=function(e){var t;return e&&((t=e.connectivity)==null?void 0:t.length)},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.findIfNodeIsSingle=function(e){return e.length===1?(console.error("Server returns a single node",e),e[0]):e.length===2&&e[1].length===0?e[0]:!1},this.createLabelFromNeuralNode=function(e,t){let o=this.findIfNodeIsSingle(e);if(o)return t[o];let i=t[e[0]];return e.length===2&&e[1].length>0&&e[1].forEach(r=>{t[r]==null?i+=`, ${r}`:i+=`, ${t[r]}`}),i},this.flattenAndFindDatasets=function(e,t,o){let i=this.flattenConnectivity(e),r=this.flattenConnectivity(t),a=this.flattenConnectivity(o);this.originsWithDatasets=this.uberons.filter(s=>i.indexOf(s.id)!==-1).sort(xt),this.componentsWithDatasets=this.uberons.filter(s=>r.indexOf(s.id)!==-1).sort(xt),this.destinationsWithDatasets=this.uberons.filter(s=>a.indexOf(s.id)!==-1).sort(xt)},this.processConnectivity=function(e,t){return new Promise(o=>{let i=[],r=[],a;if(t&&t["node-phenotypes"]){const c=["ilxtr:hasSomaLocatedIn"],d=["ilxtr:hasAxonPresynapticElementIn","ilxtr:hasAxonSensorySubcellularElementIn"];c.forEach(f=>{f in t["node-phenotypes"]&&i.push(...t["node-phenotypes"][f])}),i=rn(i),d.forEach(f=>{f in t["node-phenotypes"]&&r.push(...t["node-phenotypes"][f])}),r=rn(r)}else r=rn(t.axons),t.somas&&t.somas.length>0&&i.push(...t.somas),t.dendrites&&t.dendrites.length>0&&i.push(...t.dendrites),i=rn(i),a=t.somas;const s=this.findComponents(t,r,i,a),l=this.findAllIdsFromConnectivity(t);this.createLabelLookup(e,l).then(c=>{this.origins=i.map(d=>this.createLabelFromNeuralNode(d,c)).sort(xt),this.components=s.map(d=>this.createLabelFromNeuralNode(d,c)).sort(xt),this.destinations=r.map(d=>this.createLabelFromNeuralNode(d,c)).sort(xt),this.flattenAndFindDatasets(i,s,r),o({ids:{dendrites:i,components:s,axons:r},labels:{origins:this.origins,components:this.components,destinations:this.destinations}})})})},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 o in e)t+=`'${e[o]}'${o>=e.length-1?")":","} `;return t},this.buildPubmedSqlStatementForModels=function(e){return`select distinct publication from publications where entity = '${e}'`},this.queryKnowledge=async(e,t)=>{const o=`${this.flatmapAPI}/knowledge/query/`,r=await fetch(o,{method:"POST",headers:{Accept:"application/json"},body:JSON.stringify({sql:e,params:t})});if(!r.ok)throw new Error(`Cannot access ${o}`);const a=await r.json();if("error"in a)throw new TypeError(a.error);return a.values}};async function xy(e){const t=sessionStorage.getItem("flatmap-knowledge");if(t){const r=JSON.parse(t).filter(a=>a.references&&a.references.length).filter(a=>a.references.includes(e));if(r.length)return r.map(s=>s.id)}return[]}async function My(e,t,o){const r=`select knowledge from knowledge where source="${ui(e)}" and knowledge like "%${t}%" order by source desc`;return(await o.queryKnowledge(r)).map(c=>JSON.parse(c)).map(c=>c.id)}function ui(e){return By(e.mapMetadata)}function By(e){let t="";if(e!=null&&e.connectivity){const o=e.connectivity;"knowledge-source"in o?t=o["knowledge-source"]:"npo"in o&&(t=`${o.npo.release}-npo`)}return t}async function Ny(e,t){const o=ui(e),i=`select knowledge from knowledge where source="${o}" order by source desc`;ms();const r=sessionStorage.getItem("flatmap-knowledge"),a=sessionStorage.getItem("flatmap-knowledge-source");if(!r||a!==o){const l=(await t.queryKnowledge(i)).map(c=>JSON.parse(c));return sessionStorage.setItem("flatmap-knowledge",JSON.stringify(l)),sessionStorage.setItem("flatmap-knowledge-source",o),_y(),l}return JSON.parse(r)}function _y(){const o=new Date().getTime()+864e5;sessionStorage.setItem("flatmap-knowledge-expiry",o)}function Py(){["flatmap-knowledge","flatmap-knowledge-expiry","flatmap-knowledge-source"].forEach(t=>{sessionStorage.removeItem(t)})}function ms(){const e=sessionStorage.getItem("flatmap-knowledge-expiry");new Date().getTime()>e&&Py()}const Gn=e=>e&&e.charAt(0).toUpperCase()+e.slice(1),Ly='Featured dataset marker';var gs={exports:{}};(function(e,t){(function(o,i){e.exports=i()})(typeof window<"u"?window:mm,function(){if(typeof window>"u")return null;var o=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),i=o.requestAnimationFrame||o.mozRequestAnimationFrame||o.webkitRequestAnimationFrame||function(f){return o.setTimeout(f,20)},r=o.cancelAnimationFrame||o.mozCancelAnimationFrame||o.webkitCancelAnimationFrame||function(f){o.clearTimeout(f)};function a(f,u){var p=Object.prototype.toString.call(f),g=p==="[object Array]"||p==="[object NodeList]"||p==="[object HTMLCollection]"||p==="[object Object]"||typeof jQuery<"u"&&f instanceof jQuery||typeof Elements<"u"&&f instanceof Elements,h=0,m=f.length;if(g)for(;h({userProfile:{token:""}}),getters:{userToken(e){return e.userProfile.token}},actions:{setUserToken(e){this.userProfile.token=e}}});function Dy(e){return{all:e=e||new Map,on:function(t,o){var i=e.get(t);i?i.push(o):e.set(t,[o])},off:function(t,o){var i=e.get(t);i&&(o?i.splice(i.indexOf(o)>>>0,1):e.set(t,[]))},emit:function(t,o){var i=e.get(t);i&&i.slice().map(function(r){r(o)}),(i=e.get("*"))&&i.slice().map(function(r){r(t,o)})}}}const pi=new Dy,$y="cannot be found on the map.",zy=e=>{let t={lng:0,lat:0},o;return e.type==="Polygon"?e.coordinates.length&&(o=e.coordinates[0]):o=e.coordinates,o&&(e.type!=="Point"?(o.map(i=>{t.lng+=parseFloat(i[0]),t.lat+=parseFloat(i[1])}),t.lng=t.lng/o.length,t.lat=t.lat/o.length):(t.lng+=parseFloat(o[0]),t.lat+=parseFloat(o[1]))),t},ys=(e,t)=>{const o=[];let i=e.organs?e.organs:e.ftus;const r=i?i.filter((a,s)=>i.findIndex(l=>l.label===a.label)===s):void 0;return r&&r.forEach(a=>{const s={label:a.label,models:a.models,key:`${t}.${a.label}`},l=ys(a,s.key);l.length>0&&(s.children=l),o.push(s)}),o},jy={name:"FlatmapVuer",components:{Button:ei,Col:nn,Loading:Zg,Radio:ns,Icon:be,RadioGroup:os,Row:tn,Select:Un,Dialog:gg,MapSvgIcon:wi.MapSvgIcon,MapSvgSpriteColor:wi.MapSvgSpriteColor,Tooltip:Lt.Tooltip,TreeControls:Lt.TreeControls,SelectionsGroup:ps,SvgLegends:Ty,ElIconWarningFilled:W.WarningFilled,ElIconArrowDown:W.ArrowDown,ElIconArrowLeft:W.ArrowLeft,DrawToolbar:Lt.DrawToolbar,FlatmapError:li},beforeCreate:function(){this.setStateRequired=!1},setup(e){let t=n.inject("$annotator");return t||(t=n.markRaw(new Ts.AnnotationService(`${e.flatmapAPI}annotator`)),n.provide("$annotator",t)),{annotator:t}},methods:{enableFeatureResetOnClick:function(e){this.mapImp&&this.mapImp.enableFeatureResetOnClick(e)},setVisibilityFilter:function(e){this.mapImp&&(this.mapImp.contextLost?e?this.filterToRestore=n.markRaw(JSON.parse(JSON.stringify(e))):this.filterToRestore=void 0:(e?this.mapImp.setVisibilityFilter(e):this.mapImp.clearVisibilityFilter(),this.filterToRestore=void 0))},manualAbortedOnClose:function(){this.annotationSidebar&&this.$emit("annotation-close"),this.closeTooltip(),this.annotationEventCallback({},{type:"aborted"}),this.initialiseDrawing()},initialiseDrawing:function(){this.connectionEntry={},this.activeDrawTool=void 0,this.activeDrawMode=void 0,this.drawnCreatedEvent={}},cancelDrawnFeature:function(){this.isValidDrawnCreated&&(this.annotationSidebar&&this.$emit("annotation-close"),this.closeTooltip(),this.annotationEntry=[{...this.drawnCreatedEvent.feature,resourceId:this.serverURL}],this.rollbackAnnotationEvent(),this.initialiseDrawing())},connectedFeatureTooltip:function(e){if(this.mapImp)if(e){const t=Number(e);let i={feature:t?this.mapImp.featureProperties(t):{feature:this.existDrawnFeatures.find(r=>r.id===e.trim())}};this.checkAndCreatePopups([i],!1)}else this.closeTooltip()},confirmDrawnFeature:function(){this.isValidDrawnCreated&&(this.checkAndCreatePopups([this.drawnCreatedEvent],!1),Object.keys(this.connectionEntry).length>0&&(this.annotationEntry[0].feature.connection=this.connectionEntry),this.initialiseDrawing())},toolbarEvent:function(e,t){if(!this.isValidDrawnCreated){if(this.manualAbortedOnClose(),this.doubleClickedFeature=!1,this.changeAnnotationDrawMode({mode:"simple_select"}),e==="mode")this.activeDrawMode=t;else if(e==="tool"){if(this.cancelDrawnFeature(),t){const o=t.replace(/[A-Z]/g,i=>`_${i.toLowerCase()}`);this.changeAnnotationDrawMode({mode:`draw${o}`})}this.activeDrawTool=t}}},annotationDrawModeEvent:function(e){this.activeDrawMode==="Edit"?this.doubleClickedFeature&&(e.feature.feature.geometry.type!=="Point"&&(this.changeAnnotationDrawMode({mode:"direct_select",options:{featureId:e.feature.feature.id}}),this.modifyAnnotationFeature()),this.doubleClickedFeature=!1):this.activeDrawMode==="Delete"&&(this.changeAnnotationDrawMode({mode:"simple_select",options:{featureIds:[e.feature.feature.id]}}),this.modifyAnnotationFeature())},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.filter((o,i)=>i!==0&&i!==e.length-1)};this.annotationEntry[0].body=t}},changeAnnotationDrawMode:function(e){this.mapImp&&this.mapImp.changeAnnotationDrawMode(e)},clearAnnotationFeature:function(){this.mapImp&&this.mapImp.clearAnnotationFeature()},forceContextLoss:function(){this.mapImp&&!this.mapImp.contextLost&&!this.loading&&this.mapImp.forceContextLoss()},forceContextRestore:function(){this.mapImp&&(this.flatmapError=null,this.mapImp.forceContextRestore())},modifyAnnotationFeature:function(){this.mapImp&&this.mapImp.removeAnnotationFeature()},rollbackAnnotationEvent:function(){this.mapImp&&this.annotationEntry.length>0&&["created","updated","deleted"].includes(this.annotationEntry[0].type)&&(this.mapImp.rollbackAnnotationEvent(this.annotationEntry[0]),this.annotationEntry=[])},commitAnnotationEvent:function(e){this.mapImp&&(this.offlineAnnotationEnabled&&(this.offlineAnnotations=JSON.parse(sessionStorage.getItem("anonymous-annotation"))||[],this.offlineAnnotations.push(e),this.annotationEntry[0].type==="deleted"&&(this.offlineAnnotations=this.offlineAnnotations.filter(t=>t.resource!==this.serverURL||t.item.id!==e.item.id)),sessionStorage.setItem("anonymous-annotation",JSON.stringify(this.offlineAnnotations))),["created","updated","deleted"].includes(this.annotationEntry[0].type)&&(this.featureAnnotationSubmitted=!0,this.mapImp.commitAnnotationEvent(this.annotationEntry[0]),e.body.comment==="Position Updated"?this.annotationEntry[0].positionUpdated=!1:this.annotationEntry[0].type==="deleted"&&(this.annotationSidebar&&this.$emit("annotation-close"),this.closeTooltip(),this.annotationEntry=[]),this.addAnnotationFeature()))},fetchAnnotatedItemIds:async function(e=void 0,t=void 0){let o;return this.offlineAnnotationEnabled?(this.offlineAnnotations=JSON.parse(sessionStorage.getItem("anonymous-annotation"))||[],o=this.offlineAnnotations.filter(i=>i.resource===this.serverURL).map(i=>i.item.id)):(o=await this.annotator.annotatedItemIds(this.userToken,this.serverURL,e,t),"resource"in o&&(o=o.itemIds)),o},setFeatureAnnotated:async function(){if(this.mapImp){const e=await this.fetchAnnotatedItemIds();for(const t of e)this.mapImp.setFeatureAnnotated(t)}},fetchDrawnFeatures:async function(e,t){let o;if(this.offlineAnnotationEnabled)this.offlineAnnotations=JSON.parse(sessionStorage.getItem("anonymous-annotation"))||[],o=this.offlineAnnotations.filter(i=>i.feature&&i.resource===this.serverURL).map(i=>i.feature);else{const i=await this.fetchAnnotatedItemIds(e,t);o=await this.annotator.drawnFeatures(this.userToken,this.serverURL,i),"resource"in o&&(o=o.features)}return o},addAnnotationFeature:async function(){if(this.mapImp){this.featureAnnotationSubmitted||(this.clearAnnotationFeature(),this.loading=!0);const e=this.annotationFrom==="Anyone"?void 0:this.authorisedUser.orcid?this.authorisedUser.orcid:"0000-0000-0000-0000",t=this.annotationFrom==="Anyone"?void 0:this.annotationFrom==="Me",o=await this.fetchDrawnFeatures(e,t);if(this.existDrawnFeatures=o,this.loading=!1,!this.featureAnnotationSubmitted)for(const i of o)this.mapImp.addAnnotationFeature(i)}},showAnnotator:function(e){this.mapImp&&(this.mapImp.showAnnotator(e),this.$el.querySelector(".maplibregl-ctrl-group").style.display="none")},setAnnotationFrom:function(e){this.annotationFrom=e,this.mapImp&&(this.manualAbortedOnClose(),this.addAnnotationFeature())},emitOfflineAnnotationUpdate:function(){this.$emit("update-offline-annotation-enabled",this.offlineAnnotationEnabled)},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(o=>{const i={colour:o.colour,enabled:o.enabled,label:o.id,key:o.id},r=ys(o,i.key);r.length>0&&(i.children=r),t.children.push(i)}),this.systems.push(t)}},processTaxon:function(e,t){this.taxonConnectivity.length=0,di(this.mapImp,e).then(o=>{o.length&&o.forEach(i=>{let r=!0;t&&(r=t.checkAll?!0:t.checked.includes(i.taxon)),this.taxonConnectivity.push({...i,enabled:r}),this.mapImp&&this.mapImp.enableConnectivityByTaxonIds(i.taxon,r)})})},toggleDrawer:function(){this.drawerOpen=!this.drawerOpen},setColour:function(e){this.colourRadio=e,this.mapImp&&this.mapImp.setPaint({coloured:e,outlined:this.outlinesRadio})},setOutlines:function(e){this.outlinesRadio=e,this.mapImp&&this.mapImp.setPaint({coloured:this.colourRadio,outlined:e})},setInitMapState:function(){if(this.mapImp){const e=this.mapImp.map,t=this.mapImp.options.bounds,o=[[t[0],t[1]],[t[2],t[3]]];e.setMaxBounds(null),e.setRenderWorldCopies(!1),this.initMapState=n.markRaw({initBounds:o})}},resetView:function(){if(this.mapImp){const e=this.mapImp.map,{initBounds:t}=this.initMapState;e.resetNorthPitch({animate:!1}),t&&e.fitBounds(t,{animate:!1}),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()},onSelectionsDataChanged:function(e){this.$emit("pathway-selection-changed",e)},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))},zoomToFeatures:function(e){this.mapImp&&this.mapImp.zoomToFeatures(e)},retrieveConnectedPaths:async function(e,t={}){var o,i,r,a,s;if(this.mapImp){let l=[],c=(o=t.target)!=null&&o.length?t.target:[];const d=[...this.mapImp.pathModelNodes(e)],f=await this.mapImp.queryPathsForFeatures(e);if(d.length){if(!c.length){const u=(i=t.type)!=null&&i.length?t.type:["all"],p=await this.flatmapQueries.queryForConnectivityNew(this.mapImp,e[0]),g=(r=p==null?void 0:p.ids)==null?void 0:r.dendrites.flat(1/0),h=(a=p==null?void 0:p.ids)==null?void 0:a.components.flat(1/0),m=(s=p==null?void 0:p.ids)==null?void 0:s.axons.flat(1/0);let y=[];u.includes("origins")&&y.push(...g),u.includes("components")&&y.push(...h),u.includes("destinations")&&y.push(...m),u.includes("all")&&y.push(...g,...h,...m),c=[...new Set(y)]}d.forEach(u=>{this.mapImp.nodePathModels(u).forEach(g=>{const m=this.mapImp.pathModelNodes(g).map(b=>this.mapImp.featureProperties(b).models);c.filter(b=>m.includes(b)).length&&!l.includes(g)&&l.push(g)})})}else f.length&&(c.length?f.forEach(u=>{const g=this.mapImp.pathModelNodes(u).map(m=>this.mapImp.featureProperties(m).models);c.filter(m=>g.includes(m)).length&&!l.includes(u)&&l.push(u)}):l=f);return l=[...new Set([...l,...e])],l}},resetMapFilter:function(){const e=this.mapFilters.alert;let t;const o={"tile-layer":"pathways"},i={NOT:o};e.with&&!e.without?t={OR:[i,{AND:[o,{HAS:"alert"}]}]}:!e.with&&e.without?t={OR:[i,{AND:[o,{NOT:{HAS:"alert"}}]}]}:!e.with&&!e.without&&(t=i),this.setVisibilityFilter(t)},alertMouseEnterEmitted:function(e){if(this.mapImp)if(e.value){let t;const o={"tile-layer":"pathways"},i={NOT:o};if(e.key==="alert"||e.key==="withoutAlert"){const r=e.key==="alert"?{HAS:"alert"}:{NOT:{HAS:"alert"}};t={OR:[i,{AND:[o,r]}]}}this.setVisibilityFilter(t)}else this.resetMapFilter()},alertSelected:function(e){this.mapImp&&(e.key==="alert"?e.value?this.mapFilters.alert.with=!0:this.mapFilters.alert.with=!1:e.key==="withoutAlert"&&(e.value?this.mapFilters.alert.without=!0:this.mapFilters.alert.without=!1),this.resetMapFilter())},checkAllAlerts:function(e){this.mapImp&&(e.value?(this.mapFilters.alert.without=!0,this.mapFilters.alert.with=!0):(this.mapFilters.alert.without=!1,this.mapFilters.alert.with=!1),this.resetMapFilter())},systemSelected:function(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,!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)},taxonMouseEnterEmitted:function(e){if(this.mapImp)if(e.value){clearTimeout(this.taxonLeaveDelay);let t=this.mapImp.taxonFeatureIds(e.key);this.mapImp.enableConnectivityByTaxonIds(e.key,e.value),this.mapImp.zoomToGeoJSONFeatures(t,{noZoomIn:!0})}else this.taxonLeaveDelay=setTimeout(()=>{this.mapImp.unselectGeoJSONFeatures(),e.selections.forEach(t=>{let o=e.checked.includes(t.taxon);this.mapImp.enableConnectivityByTaxonIds(t.taxon,o)})},1e3)},checkAllTaxons:function(e){this.mapImp&&this.mapImp.enableConnectivityByTaxonIds(e.keys,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)},annotationEventCallback:function(e,t){if(t.type==="aborted")this.featureAnnotationSubmitted?this.featureAnnotationSubmitted=!1:this.rollbackAnnotationEvent(),this.annotationEntry=[];else if(t.type==="modeChanged")t.feature.mode==="direct_select"&&(this.doubleClickedFeature=!0),this.annotationSidebar&&t.feature.mode==="simple_select"&&this.activeDrawMode==="Deleted"&&this.annotationEventCallback({},{type:"aborted"});else if(t.type==="selectionChanged"){if(this.selectedDrawnFeature=t.feature.features.length===0?void 0:t.feature.features[0],e.feature.feature=this.selectedDrawnFeature,!this.activeDrawTool)if(this.connectionEntry={},this.selectedDrawnFeature){const o=this.existDrawnFeatures.find(i=>i.id===this.selectedDrawnFeature.id);o&&o.connection&&(this.connectionEntry=o.connection),this.annotationDrawModeEvent(e)}else this.annotationSidebar&&this.previousEditEvent.type==="updated"&&(this.annotationEntry=[{...this.previousEditEvent,resourceId:this.serverURL}],this.annotationEventCallback({},{type:"aborted"})),this.previousEditEvent={}}else{if(t.type==="created"||t.type==="updated"){t.type==="updated"&&t.feature.action&&(t.positionUpdated=t.feature.action==="move");const o=this.mapImp.refreshAnnotationFeatureGeometry(t.feature);e.feature.feature=o}t.type==="created"?this.drawnCreatedEvent=e:this.checkAndCreatePopups([e])}t.type==="updated"&&(this.previousEditEvent=t),t.type==="deleted"?this.previousDeletedEvent=t:this.previousDeletedEvent={}},getTaxons:function(e){let t;return e.taxons&&(typeof e.taxons!="object"?t=JSON.parse(e.taxons):t=e.taxons),t},eventCallback:function(){return(e,t,...o)=>{if(e==="annotation"){const i={feature:t,userData:o,eventType:e};this.annotationEventCallback(i,t)}else if(e==="context-lost")this.onContextLost();else if(e==="context-restored")this.onContextRestored();else if(e==="pan-zoom")this.$emit("pan-zoom-callback",t);else{const i=t.label,r=[t.models],a=this.entry,s=this.biologicalSex,l=t.alert,c=this.getTaxons(t);let d=[{dataset:t.dataset,biologicalSex:s,taxonomy:a,resource:r,label:i,feature:t,userData:o,eventType:e,provenanceTaxonomy:c,alert:l}];if(e==="click"){const f=!t[0];if(!f){d=[];const p=t.mapUUID,g=new Set;for(let[h,m]of Object.entries(t))if(h!=="mapUUID"){const y=m.featureId,b=m.label,C=[m.models],I=this.getTaxons(m);if(g.has(y))continue;g.add(y),d.push({dataset:m.dataset,biologicalSex:s,taxonomy:a,resource:C,label:b,feature:m,userData:o,eventType:e,provenanceTaxonomy:I,alert:m.alert,mapUUID:p})}}const u=f?t:t[0];if(this.setConnectivityDataSource(this.viewingMode,u),this.viewingMode!=="Neuron Connection"){if(this.currentActive=u.models?u.models:"",this.activeDrawTool&&!this.isValidDrawnCreated){const p=u.featureId||this.existDrawnFeatures.find(g=>g.id===u.id);if(this.activeDrawTool==="LineString"&&p){const g=u.featureId?u.featureId:u.id,h=u.label?u.label:`Feature ${u.id}`;this.connectionEntry[` ${g}`]=Object.assign({label:h},Object.fromEntries(Object.entries(u).filter(([m])=>["featureId","models"].includes(m)).map(([m,y])=>[m==="featureId"?"id":m,y])))}}}t&&t.type!=="marker"&&!this.activeDrawTool&&this.checkAndCreatePopups(d)}else e==="mouseenter"&&this.viewingMode!=="Neuron Connection"&&(this.currentHover=t.models?t.models:"");this.$emit("resource-selected",d)}}},setConnectivityDataSource:function(e,t){var o;e==="Exploration"?this.connectivityDataSource=(o=t.models)!=null&&o.startsWith("ilxtr:")?t.models:"":this.connectivityDataSource=t.featureId||t.id},changeViewingMode:function(e){e&&(this.viewingMode=e),this.manualAbortedOnClose()},removeActiveTooltips:function(){this.mapImp&&this.mapImp.removePopup(),this.$el.querySelectorAll(".flatmap-tooltip-popup").forEach(t=>t.remove())},createTooltipForConnectivity:function(e,t){const o=document.createElement("div");o.classList.add("flatmap-feature-label"),e.forEach((i,r)=>{const{label:a}=i;if(o.append(Gn(a)),r+1{const g=this.mapImp.search(p.id);if(g!=null&&g.results.length){const h=g==null?void 0:g.results[0].featureId;a.push({featureId:h,...p})}else s.push(p)}),a.length){let p=a[0].featureId;this.mapImp.annotations.forEach(g=>{const h=g["anatomical-nodes"];if(h){const m=h.join("");a.every(b=>m.indexOf(b.id)!==-1)&&(p=g.featureId,r.push(p))}}),this.createTooltipForConnectivity(a,p)}else this.removeActiveTooltips();this.emitConnectivityError(s);const l=i.reduce((p,g)=>{const h=this.mapImp.pathways.paths[g],m=h?h.connectivity:null;if(m){const y=m.flat(1/0);p.push(...y)}return p},[]),c=[...new Set(l)],d=[...i,...c],u=[...this.mapImp.modelFeatureIdList(d),...r];this.mapImp.selectGeoJSONFeatures(u)}},showConnectivitiesByReference:function(e){this.searchConnectivitiesByReference(e).then(t=>{this.mapImp.selectFeatures(t)})},searchConnectivitiesByReference:async function(e){const t=sessionStorage.getItem("flatmap-knowledge");let o=[];return t?o=await xy(e):o=await My(this.mapImp,e,this.flatmapQueries),o},getFlatmapKnowledge:function(){let e=[];const t=sessionStorage.getItem("flatmap-knowledge");return t&&(e=JSON.parse(t)),e},emitConnectivityError:function(e){this.$emit("connectivity-error",{data:{errorData:e,errorMessage:$y}})},checkConnectivityTooltipEntry:function(e){return e!=null&&e.length?e.find(t=>{var o,i;return((o=t==null?void 0:t.destinations)==null?void 0:o.length)||((i=t==null?void 0:t.components)==null?void 0:i.length)})!==void 0:!1},changeConnectivitySource:async function(e){const{entry:t,connectivitySource:o}=e;t.mapId===this.mapImp.id&&(await this.flatmapQueries.queryForConnectivityNew(this.mapImp,t.featureId[0],o),this.tooltipEntry=this.tooltipEntry.map(i=>i.featureId[0]===t.featureId[0]?this.flatmapQueries.updateTooltipData(i):i),this.checkConnectivityTooltipEntry(this.tooltipEntry)&&this.$emit("connectivity-info-open",this.tooltipEntry))},checkAndCreatePopups:async function(e,t=!0){var o;if(this.viewingMode==="Annotation"){const i=e.filter(r=>r.feature).map(r=>r.feature);if(i.length>0)if(this.annotationSidebar&&this.previousDeletedEvent.type==="deleted"&&(this.annotationEntry=[{...this.previousDeletedEvent,resourceId:this.serverURL}],this.annotationEventCallback({},{type:"aborted"})),this.annotationEntry=[],i.forEach(r=>{var a;this.annotationEntry.push({...r,resourceId:this.serverURL,featureId:r.featureId?r.featureId:(a=r.feature)==null?void 0:a.id,offline:this.offlineAnnotationEnabled})}),i[0].feature)this.activeDrawTool||this.activeDrawMode||this.isValidDrawnCreated?(this.featureAnnotationSubmitted=!1,this.activeDrawTool&&this.createConnectivityBody(),this.displayTooltip(i[0].feature.id,zy(i[0].feature.geometry))):this.rollbackAnnotationEvent();else{const r=this.annotationEntry.filter(a=>a.featureId&&a.models).map(a=>a.models);r.length>0&&this.displayTooltip(r)}else this.annotation={}}else if(this.viewingMode==="Neuron Connection"&&t){const i=e.map(a=>a.resource[0]);if(i.find(a=>!a.startsWith("ilxtr:"))){const a=Array.isArray(i)?[...i]:[i];a.length===1&&a.push([]);const s=(o=e[0].feature)==null?void 0:o.featureId,l=this.mapImp.annotations.get(s),c=l==null?void 0:l["anatomical-nodes"],d=l==null?void 0:l.models;let f,u=a;const p=l==null?void 0:l.models;c!=null&&c.length&&(f=c.find(S=>JSON.parse(S)[0]===d)),f?u=JSON.parse(f):p&&(u=[p,[]]);const g=this.mapImp.knowledgeSource,h=u.flat(1/0),m=[...new Set(h)],b=(await Lt.fetchLabels(this.flatmapAPI,m)).reduce((S,E)=>{const O=E[0],M=JSON.parse(E[1]);return S.push({id:O,label:M.label,source:M.source}),S},[]);b.sort((S,E)=>S.id===E.id?S.source===g&&E.source!==g?-1:S.source!==g&&E.source===g?1:0:S.id.localeCompare(E.id));const C=[];for(let S=0;SO.id===m[S]);E&&C.push(E.label)}const I=Gn(C.join(", ")),k={facet:JSON.stringify(u),facetPropPath:`flatmap.connectivity.source.${this.connectionType.toLowerCase()}`,tagLabel:I,term:this.connectionType};this.connectivityFilters.some(S=>S.facet===k.facet&&S.facetPropPath===k.facetPropPath)||this.connectivityFilters.push(k),this.$emit("neuron-connection-feature-click",{filters:this.connectivityFilters,search:""})}else{const a=i.join();this.connectionType.toLowerCase()==="all"?this.$emit("neuron-connection-feature-click",{filters:[],search:a}):await this.openConnectivityInfo(e)}}else await this.openConnectivityInfo(e)},openConnectivityInfo:async function(e){Ny(this.mapImp,this.flatmapQueries);let t=[];if(this.tooltipEntry=e.filter(o=>o.resource[0]in this.mapImp.pathways.paths).map(o=>({title:o.label,featureId:o.resource,ready:!1})),this.tooltipEntry.length){this.$emit("connectivity-info-open",this.tooltipEntry);for(let i=0;ii.featureId[0]);o.length>0&&this.displayTooltip(o)}},updateConnectivityFilters:function(e){e.length&&(this.connectivityFilters=e.filter(t=>t.facet.toLowerCase()!=="show all"))},resetConnectivityfilters:function(e){e.length?this.connectivityFilters=this.connectivityFilters.filter(t=>e.some(o=>o.facetPropPath===t.facetPropPath&&o.facet!==t.facet)):this.connectivityFilters=[]},getKnowledgeTooltip:async function(e){const t=await this.flatmapQueries.retrieveFlatmapKnowledgeForEvent(this.mapImp,e);let o=await this.flatmapQueries.createTooltipData(this.mapImp,e);return(t&&t[0]||e.feature.hyperlinks&&e.feature.hyperlinks.length>0)&&(o.featuresAlert=e.alert,o.knowledgeSource=ui(this.mapImp),o.mapId=this.mapImp.mapMetadata.id,o.mapuuid=this.mapImp.mapMetadata.uuid),o.ready=!0,o},popUpCssHacks:function(){const e=document.querySelector(".flatmap-tooltip-popup"),t=document.querySelector(".maplibregl-popup-close-button");e&&(e.style.display="none"),t.style.display="block",this.$refs.tooltip.$el.style.display="flex",t.onclick=()=>{this.$emit("connectivity-info-close"),e&&(e.style.display="block")}},closeTooltip:function(){this.$refs.tooltip&&(this.$refs.tooltip.$el.style.display="none"),document.querySelectorAll(".maplibregl-popup").forEach(e=>{e.style.display="none"})},showPopup:function(e,t,o){let i=o;this.mapImp&&(i?i.className||(i.className="custom-popup"):i={className:"custom-popup",positionAtLastClick:!0},this.mapImp.showPopup(e,t,i))},showMarkerPopup:function(e,t,o){this.mapImp&&this.mapImp.showMarkerPopup(e,t,o)},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){const t=this.hoverVisibilities.length,o=t-1,i=this.hoverVisibilities[this.helpModeActiveIndex];if(i){const a=i==null?void 0:i.refs,s=i==null?void 0:i.ref,l=this.$refs[a||s];if(l){const{parentElement:c,nextElementSibling:d}=l.$el,f=u=>u&&(u.classList.contains("pathway-container")||u.classList.contains("pathway-location"));(f(c)||f(d))&&(this.requiresDrawer?this.drawerOpen=!0:this.helpModeActiveIndex+=1)}else this.helpModeActiveIndex+=1,this.setHelpMode(e)}const r=this.hoverVisibilities[this.helpModeActiveIndex];(r==null?void 0:r.ref)==="checkBoxPopover"&&!this.showPathwayFilter&&(this.helpModeActiveIndex+=1,this.setHelpMode(e)),e||(this.helpModeActiveIndex=this.helpModeInitialIndex),this.viewingMode!=="Annotation"&&this.helpModeActiveIndex>9&&(this.helpModeActiveIndex=o),e&&this.helpModeActiveIndex>=o&&this.$emit("help-mode-last-item",!0),e&&!this.helpModeDialog?(this.inHelp=!0,this.hoverVisibilities.forEach(a=>{a.value=!0})):e&&this.helpModeDialog&&t>this.helpModeActiveIndex?this.helpModeActiveIndex>-1?(this.closeFlatmapHelpPopup(),setTimeout(()=>{this.inHelp=!1,this.hoverVisibilities.forEach(a=>{a.value=!1}),this.showTooltip(this.helpModeActiveIndex,200)},300)):this.helpModeActiveIndex===-1&&this.openFlatmapHelpPopup():(this.inHelp=!1,this.hoverVisibilities.forEach(a=>{a.value=!1}),this.closeFlatmapHelpPopup())},showTooltip:function(e,t=500){this.inHelp||(clearTimeout(this.tooltipWait[e]),this.tooltipWait[e]=setTimeout(()=>{this.hoverVisibilities[e].value=!0,this.$emit("shown-tooltip")},t))},hideTooltip:function(e,t=500){this.inHelp||(clearTimeout(this.tooltipWait[e]),this.tooltipWait[e]=setTimeout(()=>{this.hoverVisibilities[e].value=!1},t))},displayTooltip:function(e,t=void 0){let o,i={className:"flatmapvuer-popover"};if(t)o=e,i.annotationFeatureGeometry=t,this.annotationEntry.length&&(i.annotationEvent={type:this.annotationEntry[0].type,feature:this.annotationEntry[0].feature});else{const r=Array.isArray(e)?e[0]:e;r&&(o=this.mapImp.modelFeatureIds(r)[0]),this.activeDrawTool||(i.positionAtLastClick=!0)}this.connectivityInfoSidebar&&this.tooltipEntry.length&&this.viewingMode!=="Annotation"&&this.checkConnectivityTooltipEntry(this.tooltipEntry)&&this.$emit("connectivity-info-open",this.tooltipEntry),this.annotationSidebar&&this.viewingMode==="Annotation"&&this.$emit("annotation-open",{annotationEntry:this.annotationEntry,commitCallback:this.commitAnnotationEvent}),o&&!this.disableUI&&(this.viewingMode==="Annotation"&&!this.annotationSidebar||this.viewingMode==="Exploration"&&!this.connectivityInfoSidebar)&&(this.tooltipDisplay=!0,this.$nextTick(()=>{this.mapImp.showPopup(o,this.$refs.tooltip.$el,i),this.popUpCssHacks()}))},moveMap:function(e,t={}){if(this.mapImp){const{offsetX:o=0,offsetY:i=0,zoom:r=4}=t,a=this.mapImp.map,s=this.mapImp.bounds.toArray();this.mapImp.zoomToFeatures(e,{noZoomIn:!0}),this.showPathwaysDrawer(!1),s!=null&&s.length&&setTimeout(()=>{a.fitBounds(s,{offset:[o,i],zoom:r,animate:!0})})}},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"}),this.$emit("shown-map-tooltip"))}},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 o of t.values())o.label&&e.push(o.label);return Array.from(new Set(e))}},getVisibilityState:function(e){if(["alertSelection","pathwaysSelection","taxonSelection"].forEach(o=>{let i=this.$refs[o];i&&(e[o]=i.getState())}),this.$refs.treeControls){const o=this.$refs.treeControls.$refs.regionTree.getCheckedKeys();e.systemsSelection=o.filter(i=>!i.includes("."))}},setVisibilityState:function(e){["alertSelection","pathwaysSelection","taxonSelection"].forEach(o=>{const i=e[o];if(i){const r=this.$refs[o];r&&r.setState(i)}}),"systemsSelection"in e&&this.$refs.treeControls&&(this.$refs.treeControls.$refs.regionTree.setCheckedKeys(e.systemsSelection),this.systems[0].children.forEach(o=>{this.mapImp.enableSystem(o.key,e.systemsSelection.includes(o.key))}))},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.viewingMode=this.viewingMode,e.searchTerm=this.searchTerm,e.flightPath3D=this.flightPath3DRadio,e.colour=this.colourRadio,e.outlines=this.outlinesRadio,e.background=this.currentBackground,this.offlineAnnotationEnabled&&(e.offlineAnnotations=sessionStorage.getItem("anonymous-annotation")),this.getVisibilityState(e),e}},setState:function(e){e&&(this.mapImp&&e.entry&&this.entry==e.entry&&(!e.biologicalSex||e.biologicalSex===this.biologicalSex)?this.restoreMapState(e):this.createFlatmap(e),this.setStateRequired=!1)},restoreMapState:function(e){if(e){if(e.viewport&&this.mapImp.setState(e.viewport),e.offlineAnnotations&&sessionStorage.setItem("anonymous-annotation",e.offlineAnnotations),e.viewingMode&&this.changeViewingMode(e.viewingMode),"flightPath3D"in e&&this.setFlightPath3D(e.flightPath3D),"colour"in e&&this.setColour(e.colour),"outlines"in e&&this.setOutlines(e.outlines),e.background&&this.backgroundChangeCallback(e.background),e.searchTerm){const t=e.searchTerm;this.searchAndShowResult(t,!0,!0)}this.setVisibilityState(e)}},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,this.flatmapError=null;let t={taxon:this.entry};this.uuid&&(t.uuid=this.uuid),e?(e.uuid?t={uuid:e.uuid}:e.entry&&(t.taxon=e.entry),e.biologicalSex?t.biologicalSex=e.biologicalSex:t.taxon==="NCBITaxon:9606"&&(t.biologicalSex="PATO:0000384")):this.biologicalSex&&(t.biologicalSex=this.biologicalSex),this.mapManagerRef.loadMap(t,this.eventCallback(),{minZoom:this.minZoom,tooltips:this.tooltips,minimap:!1,container:this.$refs.display}).then(i=>{this.mapImp=i,this.serverURL=this.mapImp.makeServerUrl("").slice(0,-1);let r=this.mapImp.details.version;this.setFlightPathInfo(r);const a=this._stateToBeSet?this._stateToBeSet:e;this.onFlatmapReady(a),this.$nextTick(()=>this.restoreMapState(a))}).catch(i=>{var r,a;if(console.error("Flatmap loading error:",i),this.flatmapError={},i.message&&i.message.indexOf("Unknown map")!==-1?(this.flatmapError.title="Unknown Map!",this.flatmapError.messages=Object.keys(t).map(s=>`${s==="uuid"?"UUID":Gn(s)}: ${t[s]}`)):(this.flatmapError.title="Error Loading Map!",this.flatmapError.messages=[i.message?i.message:i.toString(),"Please try again later or contact support if the problem persists."]),(a=(r=this.$parent)==null?void 0:r.$refs)!=null&&a.multiContainer){const s=this.$parent;this.flatmapError.button={text:"Load Default Map",callback:()=>{const l=s.initial;s.setSpecies(l,void 0,3)}}}this.loading=!1})}else e&&(this._stateToBeSet={...e},this.mapImp&&!this.loading&&this.restoreMapState(this._stateToBeSet))},computePathControlsMaximumHeight(){const e=this.$refs.display;if(e){const t=getComputedStyle(e),o=parseInt(t.paddingTop)+parseInt(t.paddingBottom),i=e.clientHeight-o;this.pathwaysMaxHeight=i-170}},mapResize:function(){try{this.computePathControlsMaximumHeight(),this.mapImp&&this.mapImp.resize()}catch{console.error("Map resize error")}},getFilterSources:function(){const e=["kind","taxons"];let t=new Set,o=new Set,i=new Map;for(const a of this.mapImp.annotations.values())if(a.source){"alert"in a?t.add(a.source):o.add(a.source);for(const[s,l]of Object.entries(a))if(e.includes(s)){i.has(s)||i.set(s,new Map);const c=i.get(s),d=f=>{const u=f;c.has(u)||c.set(u,new Set),c.get(u).add(`${a.source}`)};Array.isArray(l)?l.forEach(d):d(l)}}let r={alert:{with:[...t],without:[...o]}};for(const[a,s]of i.entries()){r[a]={};for(const[l,c]of s.entries())r[a][l]=[...c.values()]}return r},getFilterOptions:async function(e,t){const o=t||this.getFlatmapKnowledge(),i=this.pathways;return await Lt.getFlatmapFilterOptions(this.flatmapAPI,e,o,i)},onFlatmapReady:function(e){var t;if(this.sensor=n.markRaw(new Ry(this.$refs.display,this.mapResize)),((t=this.mapImp.options)==null?void 0:t.style)==="functional"&&(this.isFC=!0),this.mapImp.setBackgroundOpacity(1),this.backgroundChangeCallback(this.currentBackground),this.pathways=this.mapImp.pathTypes(),this.pathways=this.pathways.filter(o=>o.enabled&&o.type!=="other"),this.processSystems(this.mapImp.getSystems()),this.processTaxon(this.mapImp.taxonIdentifiers,e?e.taxonSelection:void 0),this.containsAlert="alert"in this.mapImp.featureFilterRanges(),this.flatmapLegends=this.mapImp.flatmapLegend,this.loading=!1,this.computePathControlsMaximumHeight(),this.mapResize(),this.handleMapClick(),this.setInitMapState(),this.displayMinimap){const o={position:"top-right"};this.mapImp.createMinimap(o),this.addResizeButtonToMinimap()}this.$emit("ready",this)},handleMapClick:function(){const e=this.mapImp.map;e&&e.on("click",t=>{this.connectivityDataSource||this.$emit("connectivity-info-close"),this.connectivityDataSource=""})},onContextLost:function(){this.lastViewport=n.markRaw(this.mapImp.getState()),this.flatmapError={},this.flatmapError.title="GL context lost!",this.flatmapError.messages=["GL context is lost due to too many concurrent GL contexts. Please try using the Restore Context button."],this.flatmapError.button={text:"Restore Context",callback:()=>{this.forceContextRestore()}}},onContextRestored:function(){if(this.mapImp){this.handleMapClick(),this.setInitMapState();const e=this.getState();if(e&&(e.viewport=this.lastViewport),this.restoreMapState(e),this.displayMinimap){const t={position:"top-right"};this.mapImp.createMinimap(t),this.addResizeButtonToMinimap()}this.filterToRestore&&(this.mapImp.setVisibilityFilter(this.filterToRestore),this.filterToRestore=void 0),this.$emit("context-restored",this)}},showPathwaysDrawer:function(e){this.drawerOpen=e},searchAndShowResult:function(e,t,o=!0){var i;if(this.mapImp){if(e===void 0||e==="")return this.mapImp.clearSearchResults(),this.viewingMode==="Exploration"?this.$emit("connectivity-info-close"):this.viewingMode==="Annotation"&&this.manualAbortedOnClose(),this.searchTerm="",!0;{const r=this.mapImp.search(e);if((i=r==null?void 0:r.results)!=null&&i.length){if(this.mapImp.showSearchResults(r),t){let a;for(let s=0;si in this.mapImp.pathways.paths),o=this.mapImp.modelFeatureIdList(t);this.mapImp.selectGeoJSONFeatures(o)}},searchSuggestions:function(e){return this.mapImp?this.mapImp.search(e):[]},onActionClick:function(e){pi.emit("onActionClick",e)},setConnectionType:function(e){this.connectionType=e}},props:{entry:{type:String,required:!0},uuid:String,biologicalSex:{type:String,default:""},minZoom:{type:Number,default:1},tooltips:{type:Boolean,default:!0},helpMode:{type:Boolean,default:!1},helpModeActiveItem:{type:Number,default:0},helpModeDialog:{type:Boolean,default:!1},helpModeLastItem:{type:Boolean,default:!1},helpModeInitialIndex:{type:Number,default:0},render:{type:Boolean,default:!0},renderAtMounted:{type:Boolean,default:!0},displayMinimap:{type:Boolean,default:!1},displayWarning:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array,default:function(){return[{display:"Open AC Map",key:"AC"},{display:"Open FC Map",key:"FC"},{display:"Open 3D Human Map",key:"3D"}]}},showStarInLegend:{type:Boolean,default:!1},isLegacy:{type:Boolean,default:!1},displayLatestChanges:{type:Boolean,default:!1},state:{type:Object,default:void 0},mapManager:{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},connectivityInfoSidebar:{type:Boolean,default:!1},annotationSidebar:{type:Boolean,default:!1},showLocalSettings:{type:Boolean,default:!0},showOpenMapButton:{type:Boolean,default:!0},showPathwayFilter:{type:Boolean,default:!0},externalLegends:{type:Array,default:function(){return[]}}},provide(){return{flatmapAPI:this.flatmapAPI,sparcAPI:this.sparcAPI,userApiKey:this.userToken}},data:function(){return{filterToRestore:void 0,flatmapError:null,sensor:null,mapManagerRef:void 0,flatmapQueries:void 0,annotationEntry:[],tooltipDisplay:!1,serverURL:void 0,layers:[],pathways:[],initMapState:n.markRaw({}),sckanDisplay:[{label:"Display Path with SCKAN",key:"VALID"}],systems:[],taxonConnectivity:[],pathwaysMaxHeight:1e3,tooltipWait:n.markRaw([]),hoverVisibilities:[{value:!1,ref:"markerPopover"},{value:!1,ref:"zoomInPopover"},{value:!1,ref:"zoomOutPopover"},{value:!1,ref:"zoomFitPopover"},{value:!1,ref:"openMapPopover"},{value:!1,ref:"settingsPopover"},{value:!1,ref:"checkBoxPopover"},{value:!1,ref:"warningPopover"},{value:!1,ref:"whatsNewPopover"},{value:!1,ref:"featuredMarkerPopover"},{value:!1,refs:"toolbarPopover",ref:"editPopover"},{value:!1,refs:"toolbarPopover",ref:"deletePopover"},{value:!1,refs:"toolbarPopover",ref:"pointPopover"},{value:!1,refs:"toolbarPopover",ref:"lineStringPopover"},{value:!1,refs:"toolbarPopover",ref:"polygonPopover"},{value:!1,refs:"toolbarPopover",ref:"connectionPopover"}],helpModeActiveIndex:this.helpModeInitialIndex,yellowstar:Ly,isFC:!1,inHelp:!1,currentBackground:"white",availableBackground:["white","lightskyblue","black"],loading:!1,flatmapMarker:Ay,tooltipEntry:[],connectivityDataSource:"",connectivityTooltipVisible:!1,drawerOpen:!1,flightPath3DRadio:!1,displayFlightPathOption:!1,colourRadio:!0,outlinesRadio:!0,minimapResizeShow:!1,minimapSmall:!1,currentActive:"",selectedDrawnFeature:void 0,currentHover:"",viewingMode:"Exploration",viewingModes:{Exploration:"Find relevant research and view detail of neural pathways by selecting a pathway to view its connections and data sources","Neuron Connection":"Discover Neuron connections by selecting a neuron and viewing its associated network connections",Annotation:["View feature annotations","Add, comment on and view feature annotations"]},connectionType:"All",offlineAnnotationEnabled:!1,offlineAnnotations:[],annotationFrom:"Anyone",annotatedSource:["Anyone","Me","Others"],openMapRef:void 0,backgroundIconRef:void 0,toolbarOptions:["Edit","Delete","Point","LineString","Polygon","Connection"],annotator:void 0,authorisedUser:void 0,activeDrawMode:void 0,activeDrawTool:void 0,featureAnnotationSubmitted:!1,drawnCreatedEvent:{},previousEditEvent:{},previousDeletedEvent:{},connectionEntry:{},existDrawnFeatures:[],doubleClickedFeature:!1,containsAlert:!1,alertOptions:[{label:"Display Path With Alerts",key:"alert",enabled:!0},{label:"Display Path Without Alerts",key:"withoutAlert",enabled:!0}],mapFilters:n.markRaw({alert:{with:!0,without:!0}}),searchTerm:"",taxonLeaveDelay:void 0,connectivityFilters:[],flatmapLegends:[],lastViewport:void 0}},computed:{...Ci.mapState(Fy,["userToken"]),isValidDrawnCreated:function(){return Object.keys(this.drawnCreatedEvent).length>0},requiresDrawer:function(){var e,t,o,i;return this.loading?(this.drawerOpen=!1,!1):((e=this.systems)==null?void 0:e.length)>0||this.containsAlert&&this.alertOptions||((t=this.pathways)==null?void 0:t.length)>0||((o=this.taxonConnectivity)==null?void 0:o.length)>0||((i=this.legendEntry)==null?void 0:i.length)>0?(this.drawerOpen=!0,!0):(this.drawerOpen=!1,!1)},modeDescription:function(){let e=this.viewingModes[this.viewingMode];return this.viewingMode==="Annotation"?this.authorisedUser?e[1]:e[0]:e},legendEntry:function(){return[...this.flatmapLegends,...this.externalLegends]},showDatasetMarkerTooltip:function(){return this.hoverVisibilities[9].value}},watch:{entry:function(){this.state||this.createFlatmap()},helpMode:function(e,t){e!==t&&this.setHelpMode(e)},helpModeActiveItem:function(){this.helpMode&&(this.helpModeActiveIndex+=1,this.setHelpMode(this.helpMode))},render:function(e){e&&this.mapImp&&this.mapImp.contextLost&&!this.loading&&this.$nextTick(()=>{this.forceContextRestore()})},state:{handler:function(e,t){e!==t&&(this.mapManagerRef?this.setState(e):this.setStateRequired=!0)},immediate:!0,deep:!0},viewingMode:function(e){this.clearAnnotationFeature(),e==="Annotation"&&(this.loading=!0,this.annotator.authenticate(this.userToken).then(t=>{t.name&&t.email&&t.canUpdate?(this.authorisedUser=t,this.offlineAnnotationEnabled=!1):(this.authorisedUser=void 0,this.offlineAnnotationEnabled=!0),this.emitOfflineAnnotationUpdate(),this.setFeatureAnnotated(),this.addAnnotationFeature(),this.loading=!1}))},disableUI:function(e){e&&this.closeTooltip()},activeDrawTool:function(e){let t=[],o={x:null,y:null};const i=this.$el.querySelector(".maplibregl-canvas"),r=()=>{i.removeEventListener("keydown",a),i.removeEventListener("click",s)},a=l=>{if(!["Escape","Enter"].includes(l.key))return;const c=e==="Point"&&t.length===1||e==="LineString"&&t.length>=2||e==="Polygon"&&t.length>=3;(l.key==="Escape"||l.key==="Enter"&&!c)&&(this.activeDrawTool=void 0),r()},s=l=>{const c=i.getBoundingClientRect(),d=l.clientX-c.left,f=l.clientY-c.top;if(Math.sqrt((d-o.x)**2+(f-o.y)**2)<8){this.isValidDrawnCreated||(this.activeDrawTool=void 0),r();return}o={x:d,y:f},t.push(o)};e&&(r(),i.addEventListener("keydown",a),i.addEventListener("click",s))}},created:function(){this.mapManager?this.mapManagerRef=this.mapManager:(this.mapManagerRef=n.markRaw(new vi.MapViewer(this.flatmapAPI,{container:void 0})),this.$emit("mapmanager-loaded",this.mapManagerRef))},mounted:function(){this.openMapRef=n.shallowRef(this.$refs.openMapRef),this.backgroundIconRef=n.shallowRef(this.$refs.backgroundIconRef),this.tooltipWait.length=this.hoverVisibilities.length,this.flatmapQueries=n.markRaw(new Oy),this.flatmapQueries.initialise(this.flatmapAPI),this.state?this.setStateRequired&&this.setState(this.state):this.renderAtMounted&&this.createFlatmap(),ms()}},Hy={class:"flatmap-container",ref:"flatmapContainer","element-loading-text":"Loading...","element-loading-background":"rgba(0, 0, 0, 0.3)"},Ky={style:{height:"100%",width:"100%",position:"relative","overflow-y":"none"}},Uy={style:{height:"100%",width:"100%"},ref:"display",class:"flatmap-display"},Wy={class:"beta-popovers"},qy={key:2,class:"warning-text"},Gy={class:"bottom-right-control"},Jy=["innerHTML"],Yy={style:{"margin-bottom":"2px"}},Zy={key:0,class:"viewing-mode-title"},Qy=["onClick"],Xy=["onClick"];function eb(e,t,o,i,r,a){const s=n.resolveComponent("map-svg-sprite-color"),l=li,c=W.WarningFilled,d=be,f=on,u=W.ArrowDown,p=n.resolveComponent("DrawToolbar"),g=n.resolveComponent("map-svg-icon"),h=hy,m=n.resolveComponent("tree-controls"),y=ps,b=W.ArrowLeft,C=ei,I=tn,k=nn,v=ii,S=Un,E=ns,O=os,M=n.resolveComponent("Tooltip"),N=ri,B=si;return n.withDirectives((n.openBlock(),n.createElementBlock("div",Hy,[n.createVNode(s),n.createElementVNode("div",Ky,[n.createElementVNode("div",Uy,null,512),e.flatmapError?(n.openBlock(),n.createBlock(l,{key:0,flatmapError:e.flatmapError},null,8,["flatmapError"])):n.createCommentVNode("",!0),n.withDirectives(n.createElementVNode("div",Wy,[n.createElementVNode("div",null,[o.displayWarning||o.isLegacy?(n.openBlock(),n.createBlock(f,{key:0,placement:"right","popper-class":"warning-popper flatmap-popper",teleported:!1,visible:e.hoverVisibilities[7].value,ref:"warningPopover"},{reference:n.withCtx(()=>[n.createElementVNode("div",{class:"warning-icon",onMouseover:t[7]||(t[7]=T=>a.showTooltip(7)),onMouseout:t[8]||(t[8]=T=>a.hideTooltip(7))},[o.displayWarning||o.isLegacy?(n.openBlock(),n.createBlock(d,{key:0},{default:n.withCtx(()=>[n.createVNode(c)]),_:1})):n.createCommentVNode("",!0),o.isLegacy?(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[t[31]||(t[31]=n.createElementVNode("span",{class:"warning-text"},"Legacy Map",-1)),n.createElementVNode("div",{class:"latest-map-text",onClick:t[6]||(t[6]=(...T)=>a.viewLatestMap&&a.viewLatestMap(...T))}," Click here for the latest map ")],64)):o.displayWarning?(n.openBlock(),n.createElementBlock("span",qy,"Beta")):n.createCommentVNode("",!0)],32)]),default:n.withCtx(()=>[o.isLegacy?(n.openBlock(),n.createElementBlock("p",{key:0,onMouseover:t[0]||(t[0]=T=>a.showTooltip(7)),onMouseout:t[1]||(t[1]=T=>a.hideTooltip(7))}," This is a legacy map, you may view the latest map instead. ",32)):e.isFC?(n.openBlock(),n.createElementBlock("p",{key:1,onMouseover:t[2]||(t[2]=T=>a.showTooltip(7)),onMouseout:t[3]||(t[3]=T=>a.hideTooltip(7))},t[29]||(t[29]=[n.createTextVNode(" This map displays the connectivity of individual neurons. Specifically, those which align with (parts of) the neuron populations from the "),n.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1),n.createTextVNode(" models available in "),n.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1),n.createTextVNode(". ")]),32)):(n.openBlock(),n.createElementBlock("p",{key:2,onMouseover:t[4]||(t[4]=T=>a.showTooltip(7)),onMouseout:t[5]||(t[5]=T=>a.hideTooltip(7))},t[30]||(t[30]=[n.createTextVNode(" This map displays the connectivity of neuron populations. Specifically, those from the primarily rat-based "),n.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1),n.createTextVNode(" models available in "),n.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1),n.createTextVNode(". New connectivity and species specificity will be added as the SPARC program progresses. ")]),32))]),_:1},8,["visible"])):n.createCommentVNode("",!0)]),o.displayLatestChanges?(n.openBlock(),n.createBlock(f,{key:0,placement:"right",teleported:!1,trigger:"manual","popper-class":"warning-popper flatmap-popper",visible:e.hoverVisibilities[8].value,ref:"whatsNewPopover"},{reference:n.withCtx(()=>[o.displayLatestChanges?(n.openBlock(),n.createElementBlock("div",{key:0,class:"latest-changesicon",onMouseover:t[9]||(t[9]=T=>a.showTooltip(8)),onMouseout:t[10]||(t[10]=T=>a.hideTooltip(8))},[n.createVNode(d,null,{default:n.withCtx(()=>[n.createVNode(c)]),_:1}),t[32]||(t[32]=n.createElementVNode("span",{class:"warning-text"},"What's new?",-1))],32)):n.createCommentVNode("",!0)]),default:n.withCtx(()=>t[33]||(t[33]=[n.createElementVNode("b",null,"Connectivity References",-1),n.createElementVNode("p",null," Connectivity references have been improved and available in various formats. ",-1),n.createElementVNode("b",null,"Improved state storing",-1),n.createElementVNode("p",null," Current selection and visibility filters are now stored when creating a permalink. ",-1)])),_:1},8,["visible"])):n.createCommentVNode("",!0)],512),[[n.vShow,!o.disableUI]]),n.withDirectives(n.createVNode(d,{class:n.normalizeClass(["minimap-resize",{enlarge:e.minimapSmall,shrink:!e.minimapSmall}]),ref:"minimapResize",onClick:a.closeMinimap},{default:n.withCtx(()=>[n.createVNode(u)]),_:1},8,["class","onClick"]),[[n.vShow,e.minimapResizeShow]]),e.viewingMode==="Annotation"&&(e.authorisedUser||e.offlineAnnotationEnabled)&&!o.disableUI?(n.openBlock(),n.createBlock(p,{key:1,mapCanvas:{containerHTML:this.$el,class:".maplibregl-canvas"},toolbarOptions:e.toolbarOptions,activeDrawTool:e.activeDrawTool,activeDrawMode:e.activeDrawMode,newlyDrawnEntry:e.drawnCreatedEvent,connectionEntry:e.connectionEntry,hoverVisibilities:e.hoverVisibilities,onClickToolbar:a.toolbarEvent,onFeatureTooltip:a.connectedFeatureTooltip,onConfirmDrawn:a.confirmDrawnFeature,onCancelDrawn:a.cancelDrawnFeature,onShowTooltip:a.showTooltip,onHideTooltip:a.hideTooltip,ref:"toolbarPopover"},null,8,["mapCanvas","toolbarOptions","activeDrawTool","activeDrawMode","newlyDrawnEntry","connectionEntry","hoverVisibilities","onClickToolbar","onFeatureTooltip","onConfirmDrawn","onCancelDrawn","onShowTooltip","onHideTooltip"])):n.createCommentVNode("",!0),n.withDirectives(n.createElementVNode("div",Gy,[n.createVNode(f,{content:"Zoom in",placement:"left",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[1].value,ref:"zoomInPopover"},{reference:n.withCtx(()=>[n.createElementVNode("div",{class:"icon-button-container",onClick:t[11]||(t[11]=T=>a.zoomIn()),onMouseover:t[12]||(t[12]=T=>a.showTooltip(1)),onMouseout:t[13]||(t[13]=T=>a.hideTooltip(1))},[n.createVNode(g,{class:"icon-button zoomIn",icon:"zoomIn"})],32)]),_:1},8,["visible"]),n.createVNode(f,{content:"Zoom out",placement:"top-end",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[2].value,ref:"zoomOutPopover"},{reference:n.withCtx(()=>[n.createElementVNode("div",{class:"icon-button-container",onClick:t[14]||(t[14]=T=>a.zoomOut()),onMouseover:t[15]||(t[15]=T=>a.showTooltip(2)),onMouseout:t[16]||(t[16]=T=>a.hideTooltip(2))},[n.createVNode(g,{class:"icon-button zoomOut",icon:"zoomOut"})],32)]),_:1},8,["visible"]),n.createVNode(f,{content:"Reset",placement:"top",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[3].value,ref:"zoomFitPopover"},{reference:n.withCtx(()=>[n.createElementVNode("div",{class:"icon-button-container",onClick:t[17]||(t[17]=T=>a.resetView()),onMouseover:t[18]||(t[18]=T=>a.showTooltip(3)),onMouseout:t[19]||(t[19]=T=>a.hideTooltip(3))},[n.createVNode(g,{class:"icon-button fitWindow",icon:"fitWindow"})],32)]),default:n.withCtx(()=>[t[34]||(t[34]=n.createElementVNode("div",null,[n.createTextVNode(" Fit to "),n.createElementVNode("br"),n.createTextVNode(" window ")],-1))]),_:1},8,["visible"])],512),[[n.vShow,!o.disableUI]]),n.createVNode(f,{content:"Change pathway visibility",placement:"right",teleported:!1,trigger:"manual",offset:-18,"popper-class":"flatmap-popper",visible:e.hoverVisibilities[6].value,ref:"checkBoxPopover"},{reference:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",{class:n.normalizeClass(["pathway-location",{open:e.drawerOpen,close:!e.drawerOpen}])},[n.withDirectives((n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["pathway-container",{open:e.drawerOpen,close:!e.drawerOpen}]),style:n.normalizeStyle({"max-height":e.pathwaysMaxHeight+"px"})},[a.legendEntry.length?(n.openBlock(),n.createBlock(h,{key:0,identifierKey:"prompt",colourKey:"colour",styleKey:"style",legends:a.legendEntry,showStarInLegend:!0,showDatasetMarkerTooltip:a.showDatasetMarkerTooltip,ref:"featuredMarkerPopover",class:"svg-legends-container"},null,8,["legends","showDatasetMarkerTooltip"])):n.createCommentVNode("",!0),n.createVNode(f,{content:"Find these markers for data. The number inside the markers is the number of datasets available for each marker.",placement:"right",teleported:!1,width:"200",trigger:"manual","popper-class":"flatmap-popper flatmap-marker-popper",visible:e.hoverVisibilities[0].value,ref:"markerPopover"},{reference:n.withCtx(()=>[n.withDirectives(n.createElementVNode("div",{class:"flatmap-marker-help",innerHTML:e.flatmapMarker},null,8,Jy),[[n.vShow,e.hoverVisibilities[0].value],[N,void 0,"markerPopover"]])]),_:1},8,["visible"]),e.isFC&&e.systems&&e.systems.length>0?(n.openBlock(),n.createBlock(m,{key:1,class:"treeControls",mapType:"flatmap",title:"Systems",treeData:e.systems,active:e.currentActive,hover:e.currentHover,onCheckChanged:a.systemSelected,onCheckAll:a.checkAllSystems,onChangeActive:a.ftuSelected,ref:"treeControls"},null,8,["treeData","active","hover","onCheckChanged","onCheckAll","onChangeActive"])):n.createCommentVNode("",!0),e.containsAlert&&e.alertOptions&&o.showPathwayFilter?(n.openBlock(),n.createBlock(y,{title:"Alert",labelKey:"label",identifierKey:"key",selections:e.alertOptions,onChanged:a.alertSelected,onCheckboxMouseEnter:a.alertMouseEnterEmitted,onSelectionsDataChanged:a.onSelectionsDataChanged,onCheckAll:a.checkAllAlerts,ref:"alertSelection",key:"alertSelection"},null,8,["selections","onChanged","onCheckboxMouseEnter","onSelectionsDataChanged","onCheckAll"])):n.createCommentVNode("",!0),e.pathways&&e.pathways.length>0?(n.openBlock(),n.createBlock(y,{title:"Pathways",labelKey:"label",identifierKey:"type",colourStyle:"line",selections:e.pathways,showAsLegend:!o.showPathwayFilter,onChanged:a.pathwaysSelected,onSelectionsDataChanged:a.onSelectionsDataChanged,onCheckAll:a.checkAllPathways,ref:"pathwaysSelection",key:"pathwaysSelection"},null,8,["selections","showAsLegend","onChanged","onSelectionsDataChanged","onCheckAll"])):n.createCommentVNode("",!0),e.taxonConnectivity&&e.taxonConnectivity.length>0&&o.showPathwayFilter?(n.openBlock(),n.createBlock(y,{title:"Studied in",labelKey:"label",identifierKey:"taxon",helpMessage:"Evidence exists that this set of neuron populations have been studied in the given species.",selections:e.taxonConnectivity,onChanged:a.taxonsSelected,onCheckboxMouseEnter:a.taxonMouseEnterEmitted,onSelectionsDataChanged:a.onSelectionsDataChanged,onCheckAll:a.checkAllTaxons,ref:"taxonSelection",key:"taxonSelection"},null,8,["selections","onChanged","onCheckboxMouseEnter","onSelectionsDataChanged","onCheckAll"])):n.createCommentVNode("",!0)],6)),[[N,void 0,"checkBoxPopover"]]),n.createElementVNode("div",{onClick:t[20]||(t[20]=(...T)=>a.toggleDrawer&&a.toggleDrawer(...T)),class:n.normalizeClass(["drawer-button",{open:e.drawerOpen,close:!e.drawerOpen}])},[n.createVNode(d,null,{default:n.withCtx(()=>[n.createVNode(b)]),_:1})],2)],2),[[n.vShow,!o.disableUI&&a.requiresDrawer]])]),_:1},8,["visible"]),e.openMapRef?(n.openBlock(),n.createBlock(f,{key:2,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:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.openMapOptions,T=>(n.openBlock(),n.createBlock(I,{key:T.key},{default:n.withCtx(()=>[n.createVNode(C,{type:"primary",plain:"",onClick:P=>e.$emit("open-map",T.key)},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(T.display),1)]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1},8,["virtual-ref"])):n.createCommentVNode("",!0),n.createVNode(f,{ref:"backgroundPopover","virtual-ref":e.backgroundIconRef,placement:"top-start",width:"320",teleported:!1,trigger:"click","popper-class":"background-popper h-auto","virtual-triggering":""},{default:n.withCtx(()=>[n.createElementVNode("div",null,[n.createVNode(I,{class:"backgroundText"},{default:n.withCtx(()=>t[35]||(t[35]=[n.createTextVNode("Viewing Mode")])),_:1}),n.createVNode(I,{class:"backgroundControl"},{default:n.withCtx(()=>[n.createElementVNode("div",Yy,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.viewingModes,(T,P,q)=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:P},[P===e.viewingMode?(n.openBlock(),n.createElementBlock("span",Zy,[n.createElementVNode("b",null,n.toDisplayString(P),1)])):(n.openBlock(),n.createElementBlock("span",{key:1,class:"viewing-mode-unselected",onClick:V=>a.changeViewingMode(P)},n.toDisplayString(P),9,Qy))],64))),128))]),n.createVNode(I,{class:"viewing-mode-description"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(a.modeDescription),1)]),_:1}),e.viewingMode==="Annotation"&&e.offlineAnnotationEnabled?(n.openBlock(),n.createBlock(I,{key:0,class:"viewing-mode-description"},{default:n.withCtx(()=>t[36]||(t[36]=[n.createTextVNode(" (Anonymous annotate) ")])),_:1})):n.createCommentVNode("",!0)]),_:1}),e.viewingMode==="Annotation"&&e.authorisedUser?(n.openBlock(),n.createElementBlock(n.Fragment,{key:0},[n.createVNode(I,{class:"backgroundText"},{default:n.withCtx(()=>t[37]||(t[37]=[n.createTextVNode("Annotations From")])),_:1}),n.createVNode(I,{class:"backgroundControl"},{default:n.withCtx(()=>[n.createVNode(S,{teleported:!1,modelValue:e.annotationFrom,"onUpdate:modelValue":t[21]||(t[21]=T=>e.annotationFrom=T),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown",onChange:a.setAnnotationFrom},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.annotatedSource,T=>(n.openBlock(),n.createBlock(v,{key:T,label:T,value:T},{default:n.withCtx(()=>[n.createVNode(I,null,{default:n.withCtx(()=>[n.createVNode(k,{span:12},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(T),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1})],64)):n.createCommentVNode("",!0),e.displayFlightPathOption?(n.openBlock(),n.createBlock(I,{key:1,class:"backgroundSpacer"})):n.createCommentVNode("",!0),e.displayFlightPathOption?(n.openBlock(),n.createBlock(I,{key:2,class:"backgroundText"},{default:n.withCtx(()=>t[38]||(t[38]=[n.createTextVNode("Flight path display")])),_:1})):n.createCommentVNode("",!0),e.displayFlightPathOption?(n.openBlock(),n.createBlock(I,{key:3,class:"backgroundControl"},{default:n.withCtx(()=>[n.createVNode(O,{modelValue:e.flightPath3DRadio,"onUpdate:modelValue":t[22]||(t[22]=T=>e.flightPath3DRadio=T),class:"flatmap-radio",onChange:a.setFlightPath3D},{default:n.withCtx(()=>[n.createVNode(E,{value:!1},{default:n.withCtx(()=>t[39]||(t[39]=[n.createTextVNode("2D")])),_:1}),n.createVNode(E,{value:!0},{default:n.withCtx(()=>t[40]||(t[40]=[n.createTextVNode("3D")])),_:1})]),_:1},8,["modelValue","onChange"])]),_:1})):n.createCommentVNode("",!0),n.createVNode(I,{class:"backgroundSpacer"}),n.createVNode(I,{class:"backgroundText"},{default:n.withCtx(()=>t[41]||(t[41]=[n.createTextVNode("Organs display")])),_:1}),n.createVNode(I,{class:"backgroundControl"},{default:n.withCtx(()=>[n.createVNode(O,{modelValue:e.colourRadio,"onUpdate:modelValue":t[23]||(t[23]=T=>e.colourRadio=T),class:"flatmap-radio",onChange:a.setColour},{default:n.withCtx(()=>[n.createVNode(E,{value:!0},{default:n.withCtx(()=>t[42]||(t[42]=[n.createTextVNode("Colour")])),_:1}),n.createVNode(E,{value:!1},{default:n.withCtx(()=>t[43]||(t[43]=[n.createTextVNode("Greyscale")])),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),n.createVNode(I,{class:"backgroundSpacer"}),n.createVNode(I,{class:"backgroundText"},{default:n.withCtx(()=>t[44]||(t[44]=[n.createTextVNode("Outlines display")])),_:1}),n.createVNode(I,{class:"backgroundControl"},{default:n.withCtx(()=>[n.createVNode(O,{modelValue:e.outlinesRadio,"onUpdate:modelValue":t[24]||(t[24]=T=>e.outlinesRadio=T),class:"flatmap-radio",onChange:a.setOutlines},{default:n.withCtx(()=>[n.createVNode(E,{value:!0},{default:n.withCtx(()=>t[45]||(t[45]=[n.createTextVNode("Show")])),_:1}),n.createVNode(E,{value:!1},{default:n.withCtx(()=>t[46]||(t[46]=[n.createTextVNode("Hide")])),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),n.createVNode(I,{class:"backgroundSpacer"}),n.createVNode(I,{class:"backgroundText"},{default:n.withCtx(()=>t[47]||(t[47]=[n.createTextVNode("Change background")])),_:1}),n.createVNode(I,{class:"backgroundControl"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.availableBackground,T=>(n.openBlock(),n.createElementBlock("div",{key:T,class:n.normalizeClass(["backgroundChoice",T,T==e.currentBackground?"active":""]),onClick:P=>a.backgroundChangeCallback(T)},null,10,Xy))),128))]),_:1})])]),_:1},8,["virtual-ref"]),n.withDirectives(n.createElementVNode("div",{class:n.normalizeClass(["settings-group",{open:e.drawerOpen,close:!e.drawerOpen}])},[o.showOpenMapButton?(n.openBlock(),n.createBlock(I,{key:0},{default:n.withCtx(()=>[n.createVNode(f,{visible:e.hoverVisibilities[4].value,content:"Open new map",placement:"right",teleported:!1,"popper-class":"flatmap-popper",ref:"openMapPopover"},{reference:n.withCtx(()=>[o.enableOpenMapUI&&o.openMapOptions.length>0?(n.openBlock(),n.createElementBlock("div",{key:0,ref:"openMapRef",class:"icon-button-container",onMouseover:t[25]||(t[25]=T=>a.showTooltip(4)),onMouseout:t[26]||(t[26]=T=>a.hideTooltip(4))},[n.createVNode(g,{icon:"openMap",class:"icon-button open-map-button"})],544)):n.createCommentVNode("",!0)]),_:1},8,["visible"])]),_:1})):n.createCommentVNode("",!0),o.showLocalSettings?(n.openBlock(),n.createBlock(I,{key:1},{default:n.withCtx(()=>[n.createVNode(f,{content:"Change settings",placement:"right",visible:e.hoverVisibilities[5].value,teleported:!1,trigger:"manual","popper-class":"flatmap-popper",ref:"settingsPopover"},{reference:n.withCtx(()=>[n.createElementVNode("div",{ref:"backgroundIconRef",class:"icon-button-container",onMouseover:t[27]||(t[27]=T=>a.showTooltip(5)),onMouseout:t[28]||(t[28]=T=>a.hideTooltip(5))},[n.createVNode(g,{icon:"changeBckgd",class:"icon-button"})],544)]),_:1},8,["visible"])]),_:1})):n.createCommentVNode("",!0)],2),[[n.vShow,!o.disableUI]]),e.tooltipDisplay?(n.openBlock(),n.createBlock(M,{key:3,ref:"tooltip",class:"tooltip",annotationEntry:e.annotationEntry,tooltipEntry:e.tooltipEntry,annotationDisplay:e.viewingMode==="Annotation",onAnnotation:a.commitAnnotationEvent,onOnActionClick:a.onActionClick},null,8,["annotationEntry","tooltipEntry","annotationDisplay","onAnnotation","onOnActionClick"])):n.createCommentVNode("",!0)])])),[[B,e.loading]])}const hi=st(jy,[["render",eb],["__scopeId","data-v-b1c18844"]]),bs={"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"},tb={name:"MultiFlatmapVuer",components:{Col:nn,Row:tn,Option:ii,Select:Un,Popover:on,FlatmapVuer:hi},created:function(){this.loadMapManager()},mounted:function(){this.initialise(),pi.on("onActionClick",e=>{this.resourceSelected(e)}),pi.on("open-pubmed-url",e=>{this.$emit("open-pubmed-url",e)})},methods:{initialise:function(){return this.multiflatmapError=null,new Promise(e=>{if(this.requireInitialisation){this.requireInitialisation=!1;const t=new AbortController,o=t.signal,i=setTimeout(()=>t.abort(),5e3);fetch(this.flatmapAPI,{signal:o}).then(r=>{if(!r.ok){if(r.status===404)return this.multiflatmapError={},this.multiflatmapError.title="MultiFlatmap Error!",this.multiflatmapError.messages=[`Sorry, the component could not be loaded because the specified flatmap API endpoint is incorrect. Please check the endpoint URL or contact support if the problem persists.`],this.initialised=!0,e(),this.resolveList.forEach(a=>a()),Promise.reject({handled:!0});throw new Error(`HTTP ${r.status}: ${r.statusText}`)}return r.json()}).then(r=>{if(r&&r.status_code===404){console.error("Flatmap API endpoint is incorrect",r),this.multiflatmapError={},this.multiflatmapError.title="MultiFlatmap Error!",this.multiflatmapError.messages=[`Sorry, the component could not be loaded because the specified flatmap API endpoint is incorrect. Please check the endpoint URL or contact support if the problem persists.`],this.initialised=!0,e(),this.resolveList.forEach(s=>s());return}Object.keys(this.availableSpecies).forEach(s=>{const l=this.availableSpecies[s].uuid;if(l&&r.length&&r.map(c=>c.uuid).indexOf(l)>0)this.speciesList[s]=this.availableSpecies[s];else for(let c=0;c{s()})}).catch(r=>{r&&r.handled||(console.error("Error fetching flatmap:",r),this.initialised=!0,this.multiflatmapError={},this.multiflatmapError.title="MultiFlatmap Error!",this.multiflatmapError.messages=[`Sorry, the component could not be loaded due to an unexpected error. Please try again later or contact support if the problem persists.`],e(),this.resolveList.forEach(a=>{a()}))}).finally(()=>{clearTimeout(i)})}else this.initialised?e():this.resolveList.push(e)})},loadMapManager:function(){this.mapManagerRef||(this.mapManager?this.mapManagerRef=this.mapManager:(this.mapManagerRef=n.markRaw(new vi.MapViewer(this.flatmapAPI,{container:void 0})),this.$emit("mapmanager-loaded",this.mapManagerRef)))},resourceSelected:function(e){this.$emit("resource-selected",e)},onContextRestored:function(e){this.$emit("context-restored",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)},onAnnotationClose:function(){this.$emit("annotation-close")},onAnnotationOpen:function(e){this.$emit("annotation-open",e)},updateOfflineAnnotationEnabled:function(e){this.$emit("update-offline-annotation-enabled",e)},onConnectivityInfoClose:function(){this.$emit("connectivity-info-close")},onConnectivityInfoOpen:function(e){this.$emit("connectivity-info-open",e)},onConnectivityError:function(e){this.$emit("connectivity-error",e)},onNeuronConnectionFeatureClick:function(e){this.$emit("neuron-connection-feature-click",e)},onSelectionsDataChanged:function(e){this.$emit("pathway-selection-changed",e)},showPopup:function(e,t,o){this.getCurrentFlatmap().showPopup(e,t,o)},showMarkerPopup:function(e,t,o){this.getCurrentFlatmap().showMarkerPopup(e,t,o)},setSpecies:function(e,t,o){if(this.$refs&&e in this.$refs)this.activeSpecies=e,this.$refs[this.activeSpecies][0].createFlatmap(t),this.$emit("flatmapChanged",this.activeSpecies);else if(o){const i=o-1;i>=0&&this.$nextTick(()=>{this.setSpecies(e,t,i)})}},viewLatestMap:function(e){const t=Object.keys(this.speciesList);for(let o=0;o{if(e&&e.state){const o=e.state;if(o.uuid){if(o.entry)return new Promise(()=>{const i={taxon:o.entry};o.biologicalSex&&(i.biologicalSex=o.biologicalSex),this.mapManagerRef.findMap(i).then(r=>{if(r.uuid!==o.uuid)return this.createLegacyEntry(e,o.entry,o.uuid)}).then(r=>{t(r||e)}).catch(()=>{t(e)})})}else if(o.entry){const i=o.entry in bs?bs[o.entry]:void 0,r=this.createLegacyEntry(e,o.entry,i);t(r||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.loadMapManager(),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)})}))},activateTooltipByIndex:function(e){return e===this.helpModeActiveItem&&this.helpMode},onHelpModeLastItem:function(e){e&&this.$emit("help-mode-last-item",!0)},onTooltipShown:function(){this.$emit("shown-tooltip")},onMapTooltipShown:function(){this.$emit("shown-map-tooltip")},changeViewingMode:function(e){this.getCurrentFlatmap().changeViewingMode(e)},setConnectionType:function(e){this.getCurrentFlatmap().setConnectionType(e)}},props:{initial:{type:String,default:""},minZoom:{type:Number,default:1},renderAtMounted:{type:Boolean,default:!1},render:{type:Boolean,default:!0},helpMode:{type:Boolean,default:!1},helpModeActiveItem:{type:Number,default:0},helpModeDialog:{type:Boolean,default:!1},helpModeLastItem:{type:Boolean,default:!1},displayMinimap:{type:Boolean,default:!1},showStarInLegend:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array},availableSpecies:{type:Object,default:function(){return{"Human Female":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000383",iconClass:"mapicon-icon_human",displayWarning:!0},"Human Male":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000384",iconClass:"mapicon-icon_human",displayWarning:!0},Rat:{taxo:"NCBITaxon:10114",iconClass:"mapicon-icon_rat",displayLatestChanges:!0},Mouse:{taxo:"NCBITaxon:10090",iconClass:"mapicon-icon_mouse",displayWarning:!0},Pig:{taxo:"NCBITaxon:9823",iconClass:"mapicon-icon_pig",displayWarning:!0},Cat:{taxo:"NCBITaxon:9685",iconClass:"mapicon-icon_cat",displayWarning:!0}}}},state:{type:Object,default:void 0},mapManager:{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},connectivityInfoSidebar:{type:Boolean,default:!1},annotationSidebar:{type:Boolean,default:!1},showLocalSettings:{type:Boolean,default:!0},showOpenMapButton:{type:Boolean,default:!0},showPathwayFilter:{type:Boolean,default:!0},externalLegends:{type:Array,default:function(){return[]}}},data:function(){return{activeSpecies:void 0,speciesList:{},requireInitialisation:!0,resolveList:n.markRaw([]),initialised:!1,mapManagerRef:void 0,multiflatmapError:null}},watch:{state:{handler:function(e){this.setState(e)},immediate:!0,deep:!0},activeSpecies:{handler:function(e,t){t&&this.$refs[t][0].forceContextLoss()}}}},nb={class:"multi-container",ref:"multiContainer"},ob={key:0,style:{position:"absolute","z-index":"100"}},ib={class:"select-box-icon"};function rb(e,t,o,i,r,a){const s=ii,l=Un,c=on,d=hi,f=li;return n.openBlock(),n.createElementBlock("div",nb,[o.disableUI?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",ob,[t[2]||(t[2]=n.createElementVNode("div",{class:"species-display-text"},"Species",-1)),n.createVNode(c,{content:"Select a species",placement:"right",trigger:"manual","popper-class":"flatmap-popper flatmap-teleport-popper right-popper",width:"max-content",visible:a.activateTooltipByIndex(0),teleported:!1,ref:"selectPopover"},{reference:n.withCtx(()=>[n.createVNode(l,{id:"flatmap-select",teleported:!1,modelValue:e.activeSpecies,"onUpdate:modelValue":t[0]||(t[0]=u=>e.activeSpecies=u),placeholder:"Select",class:"select-box","popper-class":"flatmap-dropdown",onChange:a.setSpecies},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.speciesList,(u,p)=>(n.openBlock(),n.createBlock(s,{key:p,label:p,value:p},{default:n.withCtx(()=>[n.createElementVNode("span",ib,[n.createElementVNode("i",{class:n.normalizeClass(u.iconClass)},null,2)]),n.createTextVNode(" "+n.toDisplayString(p),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible"])])),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(e.speciesList,(u,p)=>n.withDirectives((n.openBlock(),n.createBlock(d,{key:p,entry:u.taxo,uuid:u.uuid,biologicalSex:u.biologicalSex,displayWarning:u.displayWarning,displayLatestChanges:u.displayLatestChanges,isLegacy:u.isLegacy,ref_for:!0,ref:p,enableOpenMapUI:o.enableOpenMapUI,openMapOptions:o.openMapOptions,disableUI:o.disableUI,onContextRestored:a.onContextRestored,onViewLatestMap:a.viewLatestMap,onResourceSelected:a.resourceSelected,onReady:a.FlatmapReady,onPanZoomCallback:a.panZoomCallback,annotationSidebar:o.annotationSidebar,onAnnotationOpen:a.onAnnotationOpen,onAnnotationClose:a.onAnnotationClose,onUpdateOfflineAnnotationEnabled:a.updateOfflineAnnotationEnabled,connectivityInfoSidebar:o.connectivityInfoSidebar,onConnectivityInfoOpen:a.onConnectivityInfoOpen,onConnectivityInfoClose:a.onConnectivityInfoClose,onConnectivityError:a.onConnectivityError,onNeuronConnectionFeatureClick:a.onNeuronConnectionFeatureClick,onOpenMap:t[1]||(t[1]=g=>e.$emit("open-map",g)),onPathwaySelectionChanged:a.onSelectionsDataChanged,minZoom:o.minZoom,helpMode:e.activeSpecies==p&&o.helpMode,helpModeActiveItem:o.helpModeActiveItem,helpModeDialog:o.helpModeDialog,helpModeInitialIndex:-2,onHelpModeLastItem:a.onHelpModeLastItem,onShownTooltip:a.onTooltipShown,onShownMapTooltip:a.onMapTooltipShown,renderAtMounted:o.renderAtMounted,render:o.render&&e.activeSpecies==p,displayMinimap:o.displayMinimap,showStarInLegend:o.showStarInLegend,style:{height:"100%"},mapManager:e.mapManagerRef,flatmapAPI:o.flatmapAPI,sparcAPI:o.sparcAPI,showLocalSettings:o.showLocalSettings,showOpenMapButton:o.showOpenMapButton,showPathwayFilter:o.showPathwayFilter,externalLegends:o.externalLegends},null,8,["entry","uuid","biologicalSex","displayWarning","displayLatestChanges","isLegacy","enableOpenMapUI","openMapOptions","disableUI","onContextRestored","onViewLatestMap","onResourceSelected","onReady","onPanZoomCallback","annotationSidebar","onAnnotationOpen","onAnnotationClose","onUpdateOfflineAnnotationEnabled","connectivityInfoSidebar","onConnectivityInfoOpen","onConnectivityInfoClose","onConnectivityError","onNeuronConnectionFeatureClick","onPathwaySelectionChanged","minZoom","helpMode","helpModeActiveItem","helpModeDialog","onHelpModeLastItem","onShownTooltip","onShownMapTooltip","renderAtMounted","render","displayMinimap","showStarInLegend","mapManager","flatmapAPI","sparcAPI","showLocalSettings","showOpenMapButton","showPathwayFilter","externalLegends"])),[[n.vShow,e.activeSpecies==p]])),128)),e.multiflatmapError?(n.openBlock(),n.createBlock(f,{key:1,flatmapError:e.multiflatmapError},null,8,["flatmapError"])):n.createCommentVNode("",!0)],512)}const ab=st(tb,[["render",rb],["__scopeId","data-v-1a5d097a"]]);H.FlatmapVuer=hi,H.MultiFlatmapVuer=ab,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"})});