@abi-software/mapintegratedvuer 1.3.4-beta.3 → 1.3.4-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ContentMixin-e_R3pshi.js → ContentMixin-CUpLoykV.js} +1 -1
- package/dist/{Flatmap-C5vT7xKS.js → Flatmap-D4Yn48p4.js} +5 -5
- package/dist/{Iframe-VUzwonAL.js → Iframe-DP0tJ9dA.js} +2 -2
- package/dist/{MultiFlatmap-CmpC1OzB.js → MultiFlatmap-CITmXpgg.js} +3 -3
- package/dist/{Plot-CmjKwdil.js → Plot-DcHgPVml.js} +2 -2
- package/dist/{Scaffold-DCk59qIg.js → Scaffold-Dm9N-5_F.js} +2 -2
- package/dist/{Simulation-H03BonwT.js → Simulation-BtnHnexU.js} +2 -2
- package/dist/{index-fNKt5pKW.js → index-BbVlbhv9.js} +4 -4
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +2 -2
- package/dist/{style-DTVzdiHD.js → style-CkPtTE3H.js} +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/App.vue +7 -3
- package/src/components/MapContent.vue +7 -2
- package/src/components/viewers/Flatmap.vue +1 -1
- package/src/stores/index.js +1 -1
@@ -934,7 +934,7 @@ usage: app.provide(ID_INJECTION_KEY, {
|
|
934
934
|
</g>
|
935
935
|
</svg>`,Lwe=(e,t,r,n)=>{const i=["title","desc","defs","style"],o=["width","height"],s=n||[];let l=document.createElement("div");l.innerHTML=e,i.map(u=>{const d=l.querySelector(u);d&&d.remove()}),o.map(u=>{l.querySelector("svg").removeAttribute(u)}),n&&s.map(u=>{Object.values(l.querySelectorAll(`[${u}]`)).map(d=>{d.removeAttribute(u)})});const c=l.innerHTML;return l=null,c},Swe=e=>[[/<\?xml[\s\S]*?>/gi,""],[/<!doctype[\s\S]*?>/gi,""],[/<!--.*-->/gi,""],[/\<([A-Za-z]+)([^\>]*)\/\>/g,"<$1$2></$1>"],[/\s+/g," "],[/\> \</g,"><"]].reduce((t,r)=>"".replace.apply(t,r),e).trim(),MGt=!0,EGt=!0,AGt=["fill"],kwe=Object.assign({"/assets/icons/2horpanel.svg":W_e,"/assets/icons/2vertpanel.svg":q_e,"/assets/icons/3panel.svg":Z_e,"/assets/icons/4panel.svg":X_e,"/assets/icons/5panel.svg":K_e,"/assets/icons/6panel.svg":Y_e,"/assets/icons/6panelVertical.svg":J_e,"/assets/icons/changeBckgd.svg":$_e,"/assets/icons/close-no-bk.svg":ewe,"/assets/icons/close.svg":twe,"/assets/icons/closeFullScreen.svg":rwe,"/assets/icons/comment.svg":nwe,"/assets/icons/connection.svg":iwe,"/assets/icons/dock.svg":owe,"/assets/icons/drawLine.svg":awe,"/assets/icons/drawPoint.svg":swe,"/assets/icons/drawPolygon.svg":lwe,"/assets/icons/drawTrash.svg":cwe,"/assets/icons/fitWindow.svg":uwe,"/assets/icons/fullScreen.svg":dwe,"/assets/icons/help.svg":hwe,"/assets/icons/magnifyingGlass.svg":pwe,"/assets/icons/noun-filter.svg":fwe,"/assets/icons/openMap.svg":mwe,"/assets/icons/pause.svg":gwe,"/assets/icons/permalink.svg":ywe,"/assets/icons/play.svg":Twe,"/assets/icons/resetZoom.svg":vwe,"/assets/icons/singlepanel.svg":bwe,"/assets/icons/tooltips.svg":Qwe,"/assets/icons/undock.svg":xwe,"/assets/icons/zoomIn.svg":_we,"/assets/icons/zoomOut.svg":wwe});Object.keys(kwe).map(e=>{const t=Lwe(kwe[e],MGt,EGt,AGt),r=e.replace(/^.+\/(\w+).svg$/,"$1");return Swe(t).replace("<svg",`<symbol id="${r}"`).replace("svg>","symbol>")}).join(`
|
936
936
|
`);const zte=Object.assign({"/assets/icons/2horpanel.svg":W_e,"/assets/icons/2vertpanel.svg":q_e,"/assets/icons/3panel.svg":Z_e,"/assets/icons/4panel.svg":X_e,"/assets/icons/5panel.svg":K_e,"/assets/icons/6panel.svg":Y_e,"/assets/icons/6panelVertical.svg":J_e,"/assets/icons/changeBckgd.svg":$_e,"/assets/icons/close-no-bk.svg":ewe,"/assets/icons/close.svg":twe,"/assets/icons/closeFullScreen.svg":rwe,"/assets/icons/comment.svg":nwe,"/assets/icons/connection.svg":iwe,"/assets/icons/dock.svg":owe,"/assets/icons/drawLine.svg":awe,"/assets/icons/drawPoint.svg":swe,"/assets/icons/drawPolygon.svg":lwe,"/assets/icons/drawTrash.svg":cwe,"/assets/icons/fitWindow.svg":uwe,"/assets/icons/fullScreen.svg":dwe,"/assets/icons/help.svg":hwe,"/assets/icons/magnifyingGlass.svg":pwe,"/assets/icons/noun-filter.svg":fwe,"/assets/icons/openMap.svg":mwe,"/assets/icons/pause.svg":gwe,"/assets/icons/permalink.svg":ywe,"/assets/icons/play.svg":Twe,"/assets/icons/resetZoom.svg":vwe,"/assets/icons/singlepanel.svg":bwe,"/assets/icons/tooltips.svg":Qwe,"/assets/icons/undock.svg":xwe,"/assets/icons/zoomIn.svg":_we,"/assets/icons/zoomOut.svg":wwe}),OGt=Object.keys(zte).map(e=>{const t=Lwe(zte[e]),r=e.replace(/^.+\/(\w+).svg$/,"$1");return Swe(t).replace("<svg",`<symbol id="${r}"`).replace("svg>","symbol>")}),IGt={name:"MapSvgSpriteColor",svgContext:zte,svgSprite:OGt.join(`
|
937
|
-
`)},PGt=["innerHTML"];function VGt(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("svg",{width:"0",height:"0",style:{display:"none"},innerHTML:e.$options.svgSprite},null,8,PGt)}const HGt=G_e(IGt,[["render",VGt]]);var Cwe={exports:{}};/*! algoliasearch.umd.js | 4.23.2 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */(function(e,t){(function(r,n){e.exports=n()})(rIt,function(){function r(Ae,We,st){return We in Ae?Object.defineProperty(Ae,We,{value:st,enumerable:!0,configurable:!0,writable:!0}):Ae[We]=st,Ae}function n(Ae,We){var st=Object.keys(Ae);if(Object.getOwnPropertySymbols){var vt=Object.getOwnPropertySymbols(Ae);We&&(vt=vt.filter(function(Ft){return Object.getOwnPropertyDescriptor(Ae,Ft).enumerable})),st.push.apply(st,vt)}return st}function i(Ae){for(var We=1;We<arguments.length;We++){var st=arguments[We]!=null?arguments[We]:{};We%2?n(Object(st),!0).forEach(function(vt){r(Ae,vt,st[vt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ae,Object.getOwnPropertyDescriptors(st)):n(Object(st)).forEach(function(vt){Object.defineProperty(Ae,vt,Object.getOwnPropertyDescriptor(st,vt))})}return Ae}function o(Ae,We){if(Ae==null)return{};var st,vt,Ft=function(mr,Tr){if(mr==null)return{};var Rr,Mr,zr={},xr=Object.keys(mr);for(Mr=0;Mr<xr.length;Mr++)Rr=xr[Mr],Tr.indexOf(Rr)>=0||(zr[Rr]=mr[Rr]);return zr}(Ae,We);if(Object.getOwnPropertySymbols){var ur=Object.getOwnPropertySymbols(Ae);for(vt=0;vt<ur.length;vt++)st=ur[vt],We.indexOf(st)>=0||Object.prototype.propertyIsEnumerable.call(Ae,st)&&(Ft[st]=Ae[st])}return Ft}function s(Ae,We){return function(st){if(Array.isArray(st))return st}(Ae)||function(st,vt){if(Symbol.iterator in Object(st)||Object.prototype.toString.call(st)==="[object Arguments]"){var Ft=[],ur=!0,mr=!1,Tr=void 0;try{for(var Rr,Mr=st[Symbol.iterator]();!(ur=(Rr=Mr.next()).done)&&(Ft.push(Rr.value),!vt||Ft.length!==vt);ur=!0);}catch(zr){mr=!0,Tr=zr}finally{try{ur||Mr.return==null||Mr.return()}finally{if(mr)throw Tr}}return Ft}}(Ae,We)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function l(Ae){return function(We){if(Array.isArray(We)){for(var st=0,vt=new Array(We.length);st<We.length;st++)vt[st]=We[st];return vt}}(Ae)||function(We){if(Symbol.iterator in Object(We)||Object.prototype.toString.call(We)==="[object Arguments]")return Array.from(We)}(Ae)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function c(Ae){var We,st="algoliasearch-client-js-".concat(Ae.key),vt=function(){return We===void 0&&(We=Ae.localStorage||window.localStorage),We},Ft=function(){return JSON.parse(vt().getItem(st)||"{}")},ur=function(Tr){vt().setItem(st,JSON.stringify(Tr))},mr=function(){var Tr=Ae.timeToLive?1e3*Ae.timeToLive:null,Rr=Ft(),Mr=Object.fromEntries(Object.entries(Rr).filter(function(xr){return s(xr,2)[1].timestamp!==void 0}));if(ur(Mr),Tr){var zr=Object.fromEntries(Object.entries(Mr).filter(function(xr){var Hr=s(xr,2)[1],Hn=new Date().getTime();return!(Hr.timestamp+Tr<Hn)}));ur(zr)}};return{get:function(Tr,Rr){var Mr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){mr();var zr=JSON.stringify(Tr);return Ft()[zr]}).then(function(zr){return Promise.all([zr?zr.value:Rr(),zr!==void 0])}).then(function(zr){var xr=s(zr,2),Hr=xr[0],Hn=xr[1];return Promise.all([Hr,Hn||Mr.miss(Hr)])}).then(function(zr){return s(zr,1)[0]})},set:function(Tr,Rr){return Promise.resolve().then(function(){var Mr=Ft();return Mr[JSON.stringify(Tr)]={timestamp:new Date().getTime(),value:Rr},vt().setItem(st,JSON.stringify(Mr)),Rr})},delete:function(Tr){return Promise.resolve().then(function(){var Rr=Ft();delete Rr[JSON.stringify(Tr)],vt().setItem(st,JSON.stringify(Rr))})},clear:function(){return Promise.resolve().then(function(){vt().removeItem(st)})}}}function u(Ae){var We=l(Ae.caches),st=We.shift();return st===void 0?{get:function(vt,Ft){var ur=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},mr=Ft();return mr.then(function(Tr){return Promise.all([Tr,ur.miss(Tr)])}).then(function(Tr){return s(Tr,1)[0]})},set:function(vt,Ft){return Promise.resolve(Ft)},delete:function(vt){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(vt,Ft){var ur=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return st.get(vt,Ft,ur).catch(function(){return u({caches:We}).get(vt,Ft,ur)})},set:function(vt,Ft){return st.set(vt,Ft).catch(function(){return u({caches:We}).set(vt,Ft)})},delete:function(vt){return st.delete(vt).catch(function(){return u({caches:We}).delete(vt)})},clear:function(){return st.clear().catch(function(){return u({caches:We}).clear()})}}}function d(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},We={};return{get:function(st,vt){var Ft=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},ur=JSON.stringify(st);if(ur in We)return Promise.resolve(Ae.serializable?JSON.parse(We[ur]):We[ur]);var mr=vt(),Tr=Ft&&Ft.miss||function(){return Promise.resolve()};return mr.then(function(Rr){return Tr(Rr)}).then(function(){return mr})},set:function(st,vt){return We[JSON.stringify(st)]=Ae.serializable?JSON.stringify(vt):vt,Promise.resolve(vt)},delete:function(st){return delete We[JSON.stringify(st)],Promise.resolve()},clear:function(){return We={},Promise.resolve()}}}function h(Ae,We,st){var vt={"x-algolia-api-key":st,"x-algolia-application-id":We};return{headers:function(){return Ae===y.WithinHeaders?vt:{}},queryParameters:function(){return Ae===y.WithinQueryParameters?vt:{}}}}function p(Ae){var We=0;return Ae(function st(){return We++,new Promise(function(vt){setTimeout(function(){vt(Ae(st))},Math.min(100*We,1e3))})})}function f(Ae){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(st,vt){return Promise.resolve()};return Object.assign(Ae,{wait:function(st){return f(Ae.then(function(vt){return Promise.all([We(vt,st),vt])}).then(function(vt){return vt[1]}))}})}function m(Ae){for(var We=Ae.length-1;We>0;We--){var st=Math.floor(Math.random()*(We+1)),vt=Ae[We];Ae[We]=Ae[st],Ae[st]=vt}return Ae}function g(Ae,We){return We&&Object.keys(We).forEach(function(st){Ae[st]=We[st](Ae)}),Ae}function T(Ae){for(var We=arguments.length,st=new Array(We>1?We-1:0),vt=1;vt<We;vt++)st[vt-1]=arguments[vt];var Ft=0;return Ae.replace(/%s/g,function(){return encodeURIComponent(st[Ft++])})}var y={WithinQueryParameters:0,WithinHeaders:1};function v(Ae,We){var st=Ae||{},vt=st.data||{};return Object.keys(st).forEach(function(Ft){["timeout","headers","queryParameters","data","cacheable"].indexOf(Ft)===-1&&(vt[Ft]=st[Ft])}),{data:Object.entries(vt).length>0?vt:void 0,timeout:st.timeout||We,headers:st.headers||{},queryParameters:st.queryParameters||{},cacheable:st.cacheable}}var Q={Read:1,Write:2,Any:3},_=1,L=2,w=3;function S(Ae){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_;return i(i({},Ae),{},{status:We,lastUpdate:Date.now()})}function C(Ae){return typeof Ae=="string"?{protocol:"https",url:Ae,accept:Q.Any}:{protocol:Ae.protocol||"https",url:Ae.url,accept:Ae.accept||Q.Any}}var E="DELETE",O="GET",I="POST",R="PUT";function B(Ae,We){return Promise.all(We.map(function(st){return Ae.get(st,function(){return Promise.resolve(S(st))})})).then(function(st){var vt=st.filter(function(mr){return function(Tr){return Tr.status===_||Date.now()-Tr.lastUpdate>12e4}(mr)}),Ft=st.filter(function(mr){return function(Tr){return Tr.status===w&&Date.now()-Tr.lastUpdate<=12e4}(mr)}),ur=[].concat(l(vt),l(Ft));return{getTimeout:function(mr,Tr){return(Ft.length===0&&mr===0?1:Ft.length+3+mr)*Tr},statelessHosts:ur.length>0?ur.map(function(mr){return C(mr)}):We}})}function D(Ae,We,st,vt){var Ft=[],ur=function(Hr,Hn){if(!(Hr.method===O||Hr.data===void 0&&Hn.data===void 0)){var Wn=Array.isArray(Hr.data)?Hr.data:i(i({},Hr.data),Hn.data);return JSON.stringify(Wn)}}(st,vt),mr=function(Hr,Hn){var Wn=i(i({},Hr.headers),Hn.headers),ei={};return Object.keys(Wn).forEach(function(uo){var _a=Wn[uo];ei[uo.toLowerCase()]=_a}),ei}(Ae,vt),Tr=st.method,Rr=st.method!==O?{}:i(i({},st.data),vt.data),Mr=i(i(i({"x-algolia-agent":Ae.userAgent.value},Ae.queryParameters),Rr),vt.queryParameters),zr=0,xr=function Hr(Hn,Wn){var ei=Hn.pop();if(ei===void 0)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:G(Ft)};var uo={data:ur,headers:mr,method:Tr,url:V(ei,st.path,Mr),connectTimeout:Wn(zr,Ae.timeouts.connect),responseTimeout:Wn(zr,vt.timeout)},_a=function(ds){var wa={request:uo,response:ds,host:ei,triesLeft:Hn.length};return Ft.push(wa),wa},ho={onSuccess:function(ds){return function(wa){try{return JSON.parse(wa.content)}catch(_s){throw function(zl,Bc){return{name:"DeserializationError",message:zl,response:Bc}}(_s.message,wa)}}(ds)},onRetry:function(ds){var wa=_a(ds);return ds.isTimedOut&&zr++,Promise.all([Ae.logger.info("Retryable failure",X(wa)),Ae.hostsCache.set(ei,S(ei,ds.isTimedOut?w:L))]).then(function(){return Hr(Hn,Wn)})},onFail:function(ds){throw _a(ds),function(wa,_s){var zl=wa.content,Bc=wa.status,dc=zl;try{dc=JSON.parse(zl).message}catch{}return function(qu,ou,Rs){return{name:"ApiError",message:qu,status:ou,transporterStackTrace:Rs}}(dc,Bc,_s)}(ds,G(Ft))}};return Ae.requester.send(uo).then(function(ds){return function(wa,_s){return function(zl){var Bc=zl.status;return zl.isTimedOut||function(dc){var qu=dc.isTimedOut,ou=dc.status;return!qu&&~~ou==0}(zl)||~~(Bc/100)!=2&&~~(Bc/100)!=4}(wa)?_s.onRetry(wa):~~(wa.status/100)==2?_s.onSuccess(wa):_s.onFail(wa)}(ds,ho)})};return B(Ae.hostsCache,We).then(function(Hr){return xr(l(Hr.statelessHosts).reverse(),Hr.getTimeout)})}function j(Ae){var We=Ae.hostsCache,st=Ae.logger,vt=Ae.requester,Ft=Ae.requestsCache,ur=Ae.responsesCache,mr=Ae.timeouts,Tr=Ae.userAgent,Rr=Ae.hosts,Mr=Ae.queryParameters,zr={hostsCache:We,logger:st,requester:vt,requestsCache:Ft,responsesCache:ur,timeouts:mr,userAgent:Tr,headers:Ae.headers,queryParameters:Mr,hosts:Rr.map(function(xr){return C(xr)}),read:function(xr,Hr){var Hn=v(Hr,zr.timeouts.read),Wn=function(){return D(zr,zr.hosts.filter(function(uo){return(uo.accept&Q.Read)!=0}),xr,Hn)};if((Hn.cacheable!==void 0?Hn.cacheable:xr.cacheable)!==!0)return Wn();var ei={request:xr,mappedRequestOptions:Hn,transporter:{queryParameters:zr.queryParameters,headers:zr.headers}};return zr.responsesCache.get(ei,function(){return zr.requestsCache.get(ei,function(){return zr.requestsCache.set(ei,Wn()).then(function(uo){return Promise.all([zr.requestsCache.delete(ei),uo])},function(uo){return Promise.all([zr.requestsCache.delete(ei),Promise.reject(uo)])}).then(function(uo){var _a=s(uo,2);return _a[0],_a[1]})})},{miss:function(uo){return zr.responsesCache.set(ei,uo)}})},write:function(xr,Hr){return D(zr,zr.hosts.filter(function(Hn){return(Hn.accept&Q.Write)!=0}),xr,v(Hr,zr.timeouts.write))}};return zr}function N(Ae){var We={value:"Algolia for JavaScript (".concat(Ae,")"),add:function(st){var vt="; ".concat(st.segment).concat(st.version!==void 0?" (".concat(st.version,")"):"");return We.value.indexOf(vt)===-1&&(We.value="".concat(We.value).concat(vt)),We}};return We}function V(Ae,We,st){var vt=W(st),Ft="".concat(Ae.protocol,"://").concat(Ae.url,"/").concat(We.charAt(0)==="/"?We.substr(1):We);return vt.length&&(Ft+="?".concat(vt)),Ft}function W(Ae){return Object.keys(Ae).map(function(We){return T("%s=%s",We,(st=Ae[We],Object.prototype.toString.call(st)==="[object Object]"||Object.prototype.toString.call(st)==="[object Array]"?JSON.stringify(Ae[We]):Ae[We]));var st}).join("&")}function G(Ae){return Ae.map(function(We){return X(We)})}function X(Ae){var We=Ae.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return i(i({},Ae),{},{request:i(i({},Ae.request),{},{headers:i(i({},Ae.request.headers),We)})})}var $=function(Ae){return function(We,st){return Ae.transporter.write({method:I,path:"2/abtests",data:We},st)}},te=function(Ae){return function(We,st){return Ae.transporter.write({method:E,path:T("2/abtests/%s",We)},st)}},ce=function(Ae){return function(We,st){return Ae.transporter.read({method:O,path:T("2/abtests/%s",We)},st)}},Qe=function(Ae){return function(We){return Ae.transporter.read({method:O,path:"2/abtests"},We)}},me=function(Ae){return function(We,st){return Ae.transporter.write({method:I,path:T("2/abtests/%s/stop",We)},st)}},ne=function(Ae){return function(We){return Ae.transporter.read({method:O,path:"1/strategies/personalization"},We)}},le=function(Ae){return function(We,st){return Ae.transporter.write({method:I,path:"1/strategies/personalization",data:We},st)}};function ee(Ae){return function We(st){return Ae.request(st).then(function(vt){if(Ae.batch!==void 0&&Ae.batch(vt.hits),!Ae.shouldStop(vt))return vt.cursor?We({cursor:vt.cursor}):We({page:(st.page||0)+1})})}({})}var oe=function(Ae){return function(We,st){var vt=st||{},Ft=vt.queryParameters,ur=o(vt,["queryParameters"]),mr=i({acl:We},Ft!==void 0?{queryParameters:Ft}:{});return f(Ae.transporter.write({method:I,path:"1/keys",data:mr},ur),function(Tr,Rr){return p(function(Mr){return rt(Ae)(Tr.key,Rr).catch(function(zr){if(zr.status!==404)throw zr;return Mr()})})})}},ie=function(Ae){return function(We,st,vt){var Ft=v(vt);return Ft.queryParameters["X-Algolia-User-ID"]=We,Ae.transporter.write({method:I,path:"1/clusters/mapping",data:{cluster:st}},Ft)}},he=function(Ae){return function(We,st,vt){return Ae.transporter.write({method:I,path:"1/clusters/mapping/batch",data:{users:We,cluster:st}},vt)}},we=function(Ae){return function(We,st){return f(Ae.transporter.write({method:I,path:T("/1/dictionaries/%s/batch",We),data:{clearExistingDictionaryEntries:!0,requests:{action:"addEntry",body:[]}}},st),function(vt,Ft){return Ye(Ae)(vt.taskID,Ft)})}},Pe=function(Ae){return function(We,st,vt){return f(Ae.transporter.write({method:I,path:T("1/indexes/%s/operation",We),data:{operation:"copy",destination:st}},vt),function(Ft,ur){return ft(Ae)(We,{methods:{waitTask:ci}}).waitTask(Ft.taskID,ur)})}},pe=function(Ae){return function(We,st,vt){return Pe(Ae)(We,st,i(i({},vt),{},{scope:[xa.Rules]}))}},Ce=function(Ae){return function(We,st,vt){return Pe(Ae)(We,st,i(i({},vt),{},{scope:[xa.Settings]}))}},Le=function(Ae){return function(We,st,vt){return Pe(Ae)(We,st,i(i({},vt),{},{scope:[xa.Synonyms]}))}},Oe=function(Ae){return function(We,st){return We.method===O?Ae.transporter.read(We,st):Ae.transporter.write(We,st)}},De=function(Ae){return function(We,st){return f(Ae.transporter.write({method:E,path:T("1/keys/%s",We)},st),function(vt,Ft){return p(function(ur){return rt(Ae)(We,Ft).then(ur).catch(function(mr){if(mr.status!==404)throw mr})})})}},ot=function(Ae){return function(We,st,vt){var Ft=st.map(function(ur){return{action:"deleteEntry",body:{objectID:ur}}});return f(Ae.transporter.write({method:I,path:T("/1/dictionaries/%s/batch",We),data:{clearExistingDictionaryEntries:!1,requests:Ft}},vt),function(ur,mr){return Ye(Ae)(ur.taskID,mr)})}},rt=function(Ae){return function(We,st){return Ae.transporter.read({method:O,path:T("1/keys/%s",We)},st)}},dt=function(Ae){return function(We,st){return Ae.transporter.read({method:O,path:T("1/task/%s",We.toString())},st)}},wt=function(Ae){return function(We){return Ae.transporter.read({method:O,path:"/1/dictionaries/*/settings"},We)}},yt=function(Ae){return function(We){return Ae.transporter.read({method:O,path:"1/logs"},We)}},ge=function(Ae){return function(We){return Ae.transporter.read({method:O,path:"1/clusters/mapping/top"},We)}},Xe=function(Ae){return function(We,st){return Ae.transporter.read({method:O,path:T("1/clusters/mapping/%s",We)},st)}},pt=function(Ae){return function(We){var st=We||{},vt=st.retrieveMappings,Ft=o(st,["retrieveMappings"]);return vt===!0&&(Ft.getClusters=!0),Ae.transporter.read({method:O,path:"1/clusters/mapping/pending"},Ft)}},ft=function(Ae){return function(We){var st=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},vt={transporter:Ae.transporter,appId:Ae.appId,indexName:We};return g(vt,st.methods)}},_t=function(Ae){return function(We){return Ae.transporter.read({method:O,path:"1/keys"},We)}},Pt=function(Ae){return function(We){return Ae.transporter.read({method:O,path:"1/clusters"},We)}},Vt=function(Ae){return function(We){return Ae.transporter.read({method:O,path:"1/indexes"},We)}},qt=function(Ae){return function(We){return Ae.transporter.read({method:O,path:"1/clusters/mapping"},We)}},Zt=function(Ae){return function(We,st,vt){return f(Ae.transporter.write({method:I,path:T("1/indexes/%s/operation",We),data:{operation:"move",destination:st}},vt),function(Ft,ur){return ft(Ae)(We,{methods:{waitTask:ci}}).waitTask(Ft.taskID,ur)})}},ht=function(Ae){return function(We,st){return f(Ae.transporter.write({method:I,path:"1/indexes/*/batch",data:{requests:We}},st),function(vt,Ft){return Promise.all(Object.keys(vt.taskID).map(function(ur){return ft(Ae)(ur,{methods:{waitTask:ci}}).waitTask(vt.taskID[ur],Ft)}))})}},kt=function(Ae){return function(We,st){return Ae.transporter.read({method:I,path:"1/indexes/*/objects",data:{requests:We}},st)}},Ht=function(Ae){return function(We,st){var vt=We.map(function(Ft){return i(i({},Ft),{},{params:W(Ft.params||{})})});return Ae.transporter.read({method:I,path:"1/indexes/*/queries",data:{requests:vt},cacheable:!0},st)}},Gt=function(Ae){return function(We,st){return Promise.all(We.map(function(vt){var Ft=vt.params,ur=Ft.facetName,mr=Ft.facetQuery,Tr=o(Ft,["facetName","facetQuery"]);return ft(Ae)(vt.indexName,{methods:{searchForFacetValues:Gn}}).searchForFacetValues(ur,mr,i(i({},st),Tr))}))}},fr=function(Ae){return function(We,st){var vt=v(st);return vt.queryParameters["X-Algolia-User-ID"]=We,Ae.transporter.write({method:E,path:"1/clusters/mapping"},vt)}},tr=function(Ae){return function(We,st,vt){var Ft=st.map(function(ur){return{action:"addEntry",body:ur}});return f(Ae.transporter.write({method:I,path:T("/1/dictionaries/%s/batch",We),data:{clearExistingDictionaryEntries:!0,requests:Ft}},vt),function(ur,mr){return Ye(Ae)(ur.taskID,mr)})}},_r=function(Ae){return function(We,st){return f(Ae.transporter.write({method:I,path:T("1/keys/%s/restore",We)},st),function(vt,Ft){return p(function(ur){return rt(Ae)(We,Ft).catch(function(mr){if(mr.status!==404)throw mr;return ur()})})})}},Jt=function(Ae){return function(We,st,vt){var Ft=st.map(function(ur){return{action:"addEntry",body:ur}});return f(Ae.transporter.write({method:I,path:T("/1/dictionaries/%s/batch",We),data:{clearExistingDictionaryEntries:!1,requests:Ft}},vt),function(ur,mr){return Ye(Ae)(ur.taskID,mr)})}},Qr=function(Ae){return function(We,st,vt){return Ae.transporter.read({method:I,path:T("/1/dictionaries/%s/search",We),data:{query:st},cacheable:!0},vt)}},He=function(Ae){return function(We,st){return Ae.transporter.read({method:I,path:"1/clusters/mapping/search",data:{query:We}},st)}},Re=function(Ae){return function(We,st){return f(Ae.transporter.write({method:R,path:"/1/dictionaries/*/settings",data:We},st),function(vt,Ft){return Ye(Ae)(vt.taskID,Ft)})}},Fe=function(Ae){return function(We,st){var vt=Object.assign({},st),Ft=st||{},ur=Ft.queryParameters,mr=o(Ft,["queryParameters"]),Tr=ur?{queryParameters:ur}:{},Rr=["acl","indexes","referers","restrictSources","queryParameters","description","maxQueriesPerIPPerHour","maxHitsPerQuery"];return f(Ae.transporter.write({method:R,path:T("1/keys/%s",We),data:Tr},mr),function(Mr,zr){return p(function(xr){return rt(Ae)(We,zr).then(function(Hr){return function(Hn){return Object.keys(vt).filter(function(Wn){return Rr.indexOf(Wn)!==-1}).every(function(Wn){if(Array.isArray(Hn[Wn])&&Array.isArray(vt[Wn])){var ei=Hn[Wn];return ei.length===vt[Wn].length&&ei.every(function(uo,_a){return uo===vt[Wn][_a]})}return Hn[Wn]===vt[Wn]})}(Hr)?Promise.resolve():xr()})})})}},Ye=function(Ae){return function(We,st){return p(function(vt){return dt(Ae)(We,st).then(function(Ft){return Ft.status!=="published"?vt():void 0})})}},at=function(Ae){return function(We,st){return f(Ae.transporter.write({method:I,path:T("1/indexes/%s/batch",Ae.indexName),data:{requests:We}},st),function(vt,Ft){return ci(Ae)(vt.taskID,Ft)})}},Lt=function(Ae){return function(We){return ee(i(i({shouldStop:function(st){return st.cursor===void 0}},We),{},{request:function(st){return Ae.transporter.read({method:I,path:T("1/indexes/%s/browse",Ae.indexName),data:st},We)}}))}},Se=function(Ae){return function(We){var st=i({hitsPerPage:1e3},We);return ee(i(i({shouldStop:function(vt){return vt.hits.length<st.hitsPerPage}},st),{},{request:function(vt){return _i(Ae)("",i(i({},st),vt)).then(function(Ft){return i(i({},Ft),{},{hits:Ft.hits.map(function(ur){return delete ur._highlightResult,ur})})})}}))}},Ze=function(Ae){return function(We){var st=i({hitsPerPage:1e3},We);return ee(i(i({shouldStop:function(vt){return vt.hits.length<st.hitsPerPage}},st),{},{request:function(vt){return Qo(Ae)("",i(i({},st),vt)).then(function(Ft){return i(i({},Ft),{},{hits:Ft.hits.map(function(ur){return delete ur._highlightResult,ur})})})}}))}},ze=function(Ae){return function(We,st,vt){var Ft=vt||{},ur=Ft.batchSize,mr=o(Ft,["batchSize"]),Tr={taskIDs:[],objectIDs:[]};return f(function Rr(){var Mr,zr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,xr=[];for(Mr=zr;Mr<We.length&&(xr.push(We[Mr]),xr.length!==(ur||1e3));Mr++);return xr.length===0?Promise.resolve(Tr):at(Ae)(xr.map(function(Hr){return{action:st,body:Hr}}),mr).then(function(Hr){return Tr.objectIDs=Tr.objectIDs.concat(Hr.objectIDs),Tr.taskIDs.push(Hr.taskID),Mr++,Rr(Mr)})}(),function(Rr,Mr){return Promise.all(Rr.taskIDs.map(function(zr){return ci(Ae)(zr,Mr)}))})}},Je=function(Ae){return function(We){return f(Ae.transporter.write({method:I,path:T("1/indexes/%s/clear",Ae.indexName)},We),function(st,vt){return ci(Ae)(st.taskID,vt)})}},Be=function(Ae){return function(We){var st=We||{},vt=st.forwardToReplicas,Ft=v(o(st,["forwardToReplicas"]));return vt&&(Ft.queryParameters.forwardToReplicas=1),f(Ae.transporter.write({method:I,path:T("1/indexes/%s/rules/clear",Ae.indexName)},Ft),function(ur,mr){return ci(Ae)(ur.taskID,mr)})}},$e=function(Ae){return function(We){var st=We||{},vt=st.forwardToReplicas,Ft=v(o(st,["forwardToReplicas"]));return vt&&(Ft.queryParameters.forwardToReplicas=1),f(Ae.transporter.write({method:I,path:T("1/indexes/%s/synonyms/clear",Ae.indexName)},Ft),function(ur,mr){return ci(Ae)(ur.taskID,mr)})}},ut=function(Ae){return function(We,st){return f(Ae.transporter.write({method:I,path:T("1/indexes/%s/deleteByQuery",Ae.indexName),data:We},st),function(vt,Ft){return ci(Ae)(vt.taskID,Ft)})}},ke=function(Ae){return function(We){return f(Ae.transporter.write({method:E,path:T("1/indexes/%s",Ae.indexName)},We),function(st,vt){return ci(Ae)(st.taskID,vt)})}},Te=function(Ae){return function(We,st){return f(Ee(Ae)([We],st).then(function(vt){return{taskID:vt.taskIDs[0]}}),function(vt,Ft){return ci(Ae)(vt.taskID,Ft)})}},Ee=function(Ae){return function(We,st){var vt=We.map(function(Ft){return{objectID:Ft}});return ze(Ae)(vt,co.DeleteObject,st)}},Ge=function(Ae){return function(We,st){var vt=st||{},Ft=vt.forwardToReplicas,ur=v(o(vt,["forwardToReplicas"]));return Ft&&(ur.queryParameters.forwardToReplicas=1),f(Ae.transporter.write({method:E,path:T("1/indexes/%s/rules/%s",Ae.indexName,We)},ur),function(mr,Tr){return ci(Ae)(mr.taskID,Tr)})}},Qt=function(Ae){return function(We,st){var vt=st||{},Ft=vt.forwardToReplicas,ur=v(o(vt,["forwardToReplicas"]));return Ft&&(ur.queryParameters.forwardToReplicas=1),f(Ae.transporter.write({method:E,path:T("1/indexes/%s/synonyms/%s",Ae.indexName,We)},ur),function(mr,Tr){return ci(Ae)(mr.taskID,Tr)})}},jt=function(Ae){return function(We){return Or(Ae)(We).then(function(){return!0}).catch(function(st){if(st.status!==404)throw st;return!1})}},or=function(Ae){return function(We,st,vt){return Ae.transporter.read({method:I,path:T("1/answers/%s/prediction",Ae.indexName),data:{query:We,queryLanguages:st},cacheable:!0},vt)}},yr=function(Ae){return function(We,st){var vt=st||{},Ft=vt.query,ur=vt.paginate,mr=o(vt,["query","paginate"]),Tr=0;return function Rr(){return Fn(Ae)(Ft||"",i(i({},mr),{},{page:Tr})).then(function(Mr){for(var zr=0,xr=Object.entries(Mr.hits);zr<xr.length;zr++){var Hr=s(xr[zr],2),Hn=Hr[0],Wn=Hr[1];if(We(Wn))return{object:Wn,position:parseInt(Hn,10),page:Tr}}if(Tr++,ur===!1||Tr>=Mr.nbPages)throw{name:"ObjectNotFoundError",message:"Object not found."};return Rr()})}()}},rr=function(Ae){return function(We,st){return Ae.transporter.read({method:O,path:T("1/indexes/%s/%s",Ae.indexName,We)},st)}},br=function(){return function(Ae,We){for(var st=0,vt=Object.entries(Ae.hits);st<vt.length;st++){var Ft=s(vt[st],2),ur=Ft[0];if(Ft[1].objectID===We)return parseInt(ur,10)}return-1}},Wr=function(Ae){return function(We,st){var vt=st||{},Ft=vt.attributesToRetrieve,ur=o(vt,["attributesToRetrieve"]),mr=We.map(function(Tr){return i({indexName:Ae.indexName,objectID:Tr},Ft?{attributesToRetrieve:Ft}:{})});return Ae.transporter.read({method:I,path:"1/indexes/*/objects",data:{requests:mr}},ur)}},Fr=function(Ae){return function(We,st){return Ae.transporter.read({method:O,path:T("1/indexes/%s/rules/%s",Ae.indexName,We)},st)}},Or=function(Ae){return function(We){return Ae.transporter.read({method:O,path:T("1/indexes/%s/settings",Ae.indexName),data:{getVersion:2}},We)}},Ur=function(Ae){return function(We,st){return Ae.transporter.read({method:O,path:T("1/indexes/%s/synonyms/%s",Ae.indexName,We)},st)}},En=function(Ae){return function(We,st){return f(rn(Ae)([We],st).then(function(vt){return{objectID:vt.objectIDs[0],taskID:vt.taskIDs[0]}}),function(vt,Ft){return ci(Ae)(vt.taskID,Ft)})}},rn=function(Ae){return function(We,st){var vt=st||{},Ft=vt.createIfNotExists,ur=o(vt,["createIfNotExists"]),mr=Ft?co.PartialUpdateObject:co.PartialUpdateObjectNoCreate;return ze(Ae)(We,mr,ur)}},Vr=function(Ae){return function(We,st){var vt=st||{},Ft=vt.safe,ur=vt.autoGenerateObjectIDIfNotExist,mr=vt.batchSize,Tr=o(vt,["safe","autoGenerateObjectIDIfNotExist","batchSize"]),Rr=function(Wn,ei,uo,_a){return f(Ae.transporter.write({method:I,path:T("1/indexes/%s/operation",Wn),data:{operation:uo,destination:ei}},_a),function(ho,ds){return ci(Ae)(ho.taskID,ds)})},Mr=Math.random().toString(36).substring(7),zr="".concat(Ae.indexName,"_tmp_").concat(Mr),xr=On({appId:Ae.appId,transporter:Ae.transporter,indexName:zr}),Hr=[],Hn=Rr(Ae.indexName,zr,"copy",i(i({},Tr),{},{scope:["settings","synonyms","rules"]}));return Hr.push(Hn),f((Ft?Hn.wait(Tr):Hn).then(function(){var Wn=xr(We,i(i({},Tr),{},{autoGenerateObjectIDIfNotExist:ur,batchSize:mr}));return Hr.push(Wn),Ft?Wn.wait(Tr):Wn}).then(function(){var Wn=Rr(zr,Ae.indexName,"move",Tr);return Hr.push(Wn),Ft?Wn.wait(Tr):Wn}).then(function(){return Promise.all(Hr)}).then(function(Wn){var ei=s(Wn,3),uo=ei[0],_a=ei[1],ho=ei[2];return{objectIDs:_a.objectIDs,taskIDs:[uo.taskID].concat(l(_a.taskIDs),[ho.taskID])}}),function(Wn,ei){return Promise.all(Hr.map(function(uo){return uo.wait(ei)}))})}},Dr=function(Ae){return function(We,st){return pn(Ae)(We,i(i({},st),{},{clearExistingRules:!0}))}},Kr=function(Ae){return function(We,st){return zi(Ae)(We,i(i({},st),{},{clearExistingSynonyms:!0}))}},Xr=function(Ae){return function(We,st){return f(On(Ae)([We],st).then(function(vt){return{objectID:vt.objectIDs[0],taskID:vt.taskIDs[0]}}),function(vt,Ft){return ci(Ae)(vt.taskID,Ft)})}},On=function(Ae){return function(We,st){var vt=st||{},Ft=vt.autoGenerateObjectIDIfNotExist,ur=o(vt,["autoGenerateObjectIDIfNotExist"]),mr=Ft?co.AddObject:co.UpdateObject;if(mr===co.UpdateObject){var Tr=!0,Rr=!1,Mr=void 0;try{for(var zr,xr=We[Symbol.iterator]();!(Tr=(zr=xr.next()).done);Tr=!0)if(zr.value.objectID===void 0)return f(Promise.reject({name:"MissingObjectIDError",message:"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option."}))}catch(Hr){Rr=!0,Mr=Hr}finally{try{Tr||xr.return==null||xr.return()}finally{if(Rr)throw Mr}}}return ze(Ae)(We,mr,ur)}},$r=function(Ae){return function(We,st){return pn(Ae)([We],st)}},pn=function(Ae){return function(We,st){var vt=st||{},Ft=vt.forwardToReplicas,ur=vt.clearExistingRules,mr=v(o(vt,["forwardToReplicas","clearExistingRules"]));return Ft&&(mr.queryParameters.forwardToReplicas=1),ur&&(mr.queryParameters.clearExistingRules=1),f(Ae.transporter.write({method:I,path:T("1/indexes/%s/rules/batch",Ae.indexName),data:We},mr),function(Tr,Rr){return ci(Ae)(Tr.taskID,Rr)})}},on=function(Ae){return function(We,st){return zi(Ae)([We],st)}},zi=function(Ae){return function(We,st){var vt=st||{},Ft=vt.forwardToReplicas,ur=vt.clearExistingSynonyms,mr=vt.replaceExistingSynonyms,Tr=v(o(vt,["forwardToReplicas","clearExistingSynonyms","replaceExistingSynonyms"]));return Ft&&(Tr.queryParameters.forwardToReplicas=1),(mr||ur)&&(Tr.queryParameters.replaceExistingSynonyms=1),f(Ae.transporter.write({method:I,path:T("1/indexes/%s/synonyms/batch",Ae.indexName),data:We},Tr),function(Rr,Mr){return ci(Ae)(Rr.taskID,Mr)})}},Fn=function(Ae){return function(We,st){return Ae.transporter.read({method:I,path:T("1/indexes/%s/query",Ae.indexName),data:{query:We},cacheable:!0},st)}},Gn=function(Ae){return function(We,st,vt){return Ae.transporter.read({method:I,path:T("1/indexes/%s/facets/%s/query",Ae.indexName,We),data:{facetQuery:st},cacheable:!0},vt)}},_i=function(Ae){return function(We,st){return Ae.transporter.read({method:I,path:T("1/indexes/%s/rules/search",Ae.indexName),data:{query:We}},st)}},Qo=function(Ae){return function(We,st){return Ae.transporter.read({method:I,path:T("1/indexes/%s/synonyms/search",Ae.indexName),data:{query:We}},st)}},vi=function(Ae){return function(We,st){var vt=st||{},Ft=vt.forwardToReplicas,ur=v(o(vt,["forwardToReplicas"]));return Ft&&(ur.queryParameters.forwardToReplicas=1),f(Ae.transporter.write({method:R,path:T("1/indexes/%s/settings",Ae.indexName),data:We},ur),function(mr,Tr){return ci(Ae)(mr.taskID,Tr)})}},ci=function(Ae){return function(We,st){return p(function(vt){return function(Ft){return function(ur,mr){return Ft.transporter.read({method:O,path:T("1/indexes/%s/task/%s",Ft.indexName,ur.toString())},mr)}}(Ae)(We,st).then(function(Ft){return Ft.status!=="published"?vt():void 0})})}},co={AddObject:"addObject",UpdateObject:"updateObject",PartialUpdateObject:"partialUpdateObject",PartialUpdateObjectNoCreate:"partialUpdateObjectNoCreate",DeleteObject:"deleteObject",DeleteIndex:"delete",ClearIndex:"clear"},xa={Settings:"settings",Synonyms:"synonyms",Rules:"rules"},qi=1,Vo=2,xs=3,ui=function(Ae){return function(We,st){var vt=We.map(function(Ft){return i(i({},Ft),{},{threshold:Ft.threshold||0})});return Ae.transporter.read({method:I,path:"1/indexes/*/recommendations",data:{requests:vt},cacheable:!0},st)}},bi=function(Ae){return function(We,st){return ui(Ae)(We.map(function(vt){return i(i({},vt),{},{fallbackParameters:{},model:"bought-together"})}),st)}},Jo=function(Ae){return function(We,st){return ui(Ae)(We.map(function(vt){return i(i({},vt),{},{model:"related-products"})}),st)}},se=function(Ae){return function(We,st){var vt=We.map(function(Ft){return i(i({},Ft),{},{model:"trending-facets",threshold:Ft.threshold||0})});return Ae.transporter.read({method:I,path:"1/indexes/*/recommendations",data:{requests:vt},cacheable:!0},st)}},Ve=function(Ae){return function(We,st){var vt=We.map(function(Ft){return i(i({},Ft),{},{model:"trending-items",threshold:Ft.threshold||0})});return Ae.transporter.read({method:I,path:"1/indexes/*/recommendations",data:{requests:vt},cacheable:!0},st)}},_e=function(Ae){return function(We,st){return ui(Ae)(We.map(function(vt){return i(i({},vt),{},{model:"looking-similar"})}),st)}},qe=function(Ae){return function(We,st){var vt=We.map(function(Ft){return i(i({},Ft),{},{model:"recommended-for-you",threshold:Ft.threshold||0})});return Ae.transporter.read({method:I,path:"1/indexes/*/recommendations",data:{requests:vt},cacheable:!0},st)}};function ct(Ae,We,st){var vt,Ft={appId:Ae,apiKey:We,timeouts:{connect:1,read:2,write:30},requester:{send:function(Tr){return new Promise(function(Rr){var Mr=new XMLHttpRequest;Mr.open(Tr.method,Tr.url,!0),Object.keys(Tr.headers).forEach(function(Hn){return Mr.setRequestHeader(Hn,Tr.headers[Hn])});var zr,xr=function(Hn,Wn){return setTimeout(function(){Mr.abort(),Rr({status:0,content:Wn,isTimedOut:!0})},1e3*Hn)},Hr=xr(Tr.connectTimeout,"Connection timeout");Mr.onreadystatechange=function(){Mr.readyState>Mr.OPENED&&zr===void 0&&(clearTimeout(Hr),zr=xr(Tr.responseTimeout,"Socket timeout"))},Mr.onerror=function(){Mr.status===0&&(clearTimeout(Hr),clearTimeout(zr),Rr({content:Mr.responseText||"Network request failed",status:Mr.status,isTimedOut:!1}))},Mr.onload=function(){clearTimeout(Hr),clearTimeout(zr),Rr({content:Mr.responseText,status:Mr.status,isTimedOut:!1})},Mr.send(Tr.data)})}},logger:(vt=xs,{debug:function(Tr,Rr){return qi>=vt&&console.debug(Tr,Rr),Promise.resolve()},info:function(Tr,Rr){return Vo>=vt&&console.info(Tr,Rr),Promise.resolve()},error:function(Tr,Rr){return console.error(Tr,Rr),Promise.resolve()}}),responsesCache:d(),requestsCache:d({serializable:!1}),hostsCache:u({caches:[c({key:"".concat("4.23.2","-").concat(Ae)}),d()]}),userAgent:N("4.23.2").add({segment:"Browser"})},ur=i(i({},Ft),st),mr=function(){return function(Tr){return function(Rr){var Mr=Rr.region||"us",zr=h(y.WithinHeaders,Rr.appId,Rr.apiKey),xr=j(i(i({hosts:[{url:"personalization.".concat(Mr,".algolia.com")}]},Rr),{},{headers:i(i(i({},zr.headers()),{"content-type":"application/json"}),Rr.headers),queryParameters:i(i({},zr.queryParameters()),Rr.queryParameters)}));return g({appId:Rr.appId,transporter:xr},Rr.methods)}(i(i(i({},Ft),Tr),{},{methods:{getPersonalizationStrategy:ne,setPersonalizationStrategy:le}}))}};return function(Tr){var Rr=Tr.appId,Mr=h(Tr.authMode!==void 0?Tr.authMode:y.WithinHeaders,Rr,Tr.apiKey),zr=j(i(i({hosts:[{url:"".concat(Rr,"-dsn.algolia.net"),accept:Q.Read},{url:"".concat(Rr,".algolia.net"),accept:Q.Write}].concat(m([{url:"".concat(Rr,"-1.algolianet.com")},{url:"".concat(Rr,"-2.algolianet.com")},{url:"".concat(Rr,"-3.algolianet.com")}]))},Tr),{},{headers:i(i(i({},Mr.headers()),{"content-type":"application/x-www-form-urlencoded"}),Tr.headers),queryParameters:i(i({},Mr.queryParameters()),Tr.queryParameters)}));return g({transporter:zr,appId:Rr,addAlgoliaAgent:function(xr,Hr){zr.userAgent.add({segment:xr,version:Hr})},clearCache:function(){return Promise.all([zr.requestsCache.clear(),zr.responsesCache.clear()]).then(function(){})}},Tr.methods)}(i(i({},ur),{},{methods:{search:Ht,searchForFacetValues:Gt,multipleBatch:ht,multipleGetObjects:kt,multipleQueries:Ht,copyIndex:Pe,copySettings:Ce,copySynonyms:Le,copyRules:pe,moveIndex:Zt,listIndices:Vt,getLogs:yt,listClusters:Pt,multipleSearchForFacetValues:Gt,getApiKey:rt,addApiKey:oe,listApiKeys:_t,updateApiKey:Fe,deleteApiKey:De,restoreApiKey:_r,assignUserID:ie,assignUserIDs:he,getUserID:Xe,searchUserIDs:He,listUserIDs:qt,getTopUserIDs:ge,removeUserID:fr,hasPendingMappings:pt,clearDictionaryEntries:we,deleteDictionaryEntries:ot,getDictionarySettings:wt,getAppTask:dt,replaceDictionaryEntries:tr,saveDictionaryEntries:Jt,searchDictionaryEntries:Qr,setDictionarySettings:Re,waitAppTask:Ye,customRequest:Oe,initIndex:function(Tr){return function(Rr){return ft(Tr)(Rr,{methods:{batch:at,delete:ke,findAnswers:or,getObject:rr,getObjects:Wr,saveObject:Xr,saveObjects:On,search:Fn,searchForFacetValues:Gn,waitTask:ci,setSettings:vi,getSettings:Or,partialUpdateObject:En,partialUpdateObjects:rn,deleteObject:Te,deleteObjects:Ee,deleteBy:ut,clearObjects:Je,browseObjects:Lt,getObjectPosition:br,findObject:yr,exists:jt,saveSynonym:on,saveSynonyms:zi,getSynonym:Ur,searchSynonyms:Qo,browseSynonyms:Ze,deleteSynonym:Qt,clearSynonyms:$e,replaceAllObjects:Vr,replaceAllSynonyms:Kr,searchRules:_i,getRule:Fr,deleteRule:Ge,saveRule:$r,saveRules:pn,replaceAllRules:Dr,browseRules:Se,clearRules:Be}})}},initAnalytics:function(){return function(Tr){return function(Rr){var Mr=Rr.region||"us",zr=h(y.WithinHeaders,Rr.appId,Rr.apiKey),xr=j(i(i({hosts:[{url:"analytics.".concat(Mr,".algolia.com")}]},Rr),{},{headers:i(i(i({},zr.headers()),{"content-type":"application/json"}),Rr.headers),queryParameters:i(i({},zr.queryParameters()),Rr.queryParameters)}));return g({appId:Rr.appId,transporter:xr},Rr.methods)}(i(i(i({},Ft),Tr),{},{methods:{addABTest:$,getABTest:ce,getABTests:Qe,stopABTest:me,deleteABTest:te}}))}},initPersonalization:mr,initRecommendation:function(){return function(Tr){return ur.logger.info("The `initRecommendation` method is deprecated. Use `initPersonalization` instead."),mr()(Tr)}},getRecommendations:ui,getFrequentlyBoughtTogether:bi,getLookingSimilar:_e,getRecommendedForYou:qe,getRelatedProducts:Jo,getTrendingFacets:se,getTrendingItems:Ve}}))}return ct.version="4.23.2",ct})})(Cwe);var RGt=Cwe.exports;const NGt=nIt(RGt);let Mwe=class{constructor(t,r,n="https://api.pennsieve.io"){this.client=NGt(t,r),this.PENNSIEVE_API_LOCATION=n,this.anatomyFacetLabels=[]}initIndex(t){this.index=this.client.initIndex(t)}getAlgoliaFacets(t){const r=t.map(s=>s.facetPropPath),n=t.map(s=>s.facetSubpropPath);let i=[],o=0;return this.index.search("",{sortFacetValuesBy:"alpha",facets:r.concat(n)}).then(s=>(r.map(l=>{const c=t.find(f=>f.facetPropPath==l);var u=[];const d=s.facets;if(d===void 0)return;const h=d[l]==null?{}:d[l],p=c&&d[c.facetSubpropPath]?Object.keys(d[c.facetSubpropPath]):[];Object.keys(h).map(f=>{const m=p.reduce((T,y)=>{const v=y.split(".");return v.length!==2||f===v[0]&&T.push({label:v[1],id:o++,facetPropPath:`${c?c.facetSubpropPath:void 0}`}),T},[]);let g={label:f,id:o++,facetPropPath:l};m.length>0&&(g.children=m),u.push(g)}),u.length>0&&i.push({label:c?c.label:"",id:o++,children:u,key:l})}),i))}_discoverAllDois(t,r="https://api.pennsieve.io"){return new Promise(n=>{fetch(`${r}/discover/datasets/${t}/versions`).then(i=>i.json()).then(i=>{n(i.map(o=>o.doi))})})}_expandDois(t,r="https://api.pennsieve.io"){return new Promise(n=>{let i=t.map(o=>this._discoverAllDois(o,r));Promise.all(i).then(o=>{n(o.flat())})})}_processResultsForCards(t){let r=[],n={};for(let i of t)n={...i},n={anatomy:i.anatomy?i.anatomy.organ.map(o=>o.curie):void 0,doi:i.item.curie.split(":")[1],name:i.item.name,description:i.item.description,updated:i.pennsieve?i.pennsieve.updatedAt:void 0,publishDate:i.pennsieve?i.pennsieve.publishDate:void 0,datasetId:i.objectID,detailsReady:!1},r.push(n);return r}_processAnatomy(t){let r=[],n=[],i=[],o=[];return t.forEach(s=>{s.item&&s.item.keywords&&s.item.keywords.forEach(l=>{let c=l.keyword.toUpperCase();(c.includes("UBERON")||c.includes("ILX"))&&r.push(this._processUberonURL(c))}),s.anatomy&&s.anatomy.organ&&s.anatomy.organ.forEach(l=>{l.curie&&(r.push(l.curie),n.push(l.name))})}),o=[...new Set(r)],i=[...new Set(n)],this.anatomyFacetLabels=i,o}_processUberonURL(t){return t.split("/").pop().replace("_",":")}search(t,r="",n=10,i=1){return new Promise(o=>{this.index.search(r,{facets:["*"],hitsPerPage:n,page:i-1,filters:t,attributesToHighlight:[],attributesToRetrieve:["pennsieve.publishDate","pennsieve.updatedAt","item.curie","item.name","item.description","objectID","anatomy.organ.curie"]}).then(s=>{let l={items:this._processResultsForCards(s.hits),total:s.nbHits,discoverIds:s.hits.map(c=>c.pennsieve?c.pennsieve.identifier:c.objectID),dois:s.hits.map(c=>c.item.curie.split(":")[1])};o(l)})})}anatomyInSearch(t,r="",n=999999,i=1){return new Promise(o=>{this.index.search(r,{facets:["*"],hitsPerPage:n,page:i-1,filters:t,attributesToHighlight:[],attributesToRetrieve:["objectID","item.keywords.keyword","anatomy.organ.name","anatomy.organ.curie"]}).then(s=>{o({forFlatmap:this.processResultsForFlatmap(s.hits),forScaffold:this.processResultsForScaffold(s.hits)})})})}processResultsForFlatmap(t){return t.map(r=>({id:r.objectID,terms:r.anatomy?r.anatomy.organ.map(n=>n.curie):[]}))}processResultsForScaffold(t){let r={};return t.forEach(n=>{n.anatomy&&n.anatomy.organ&&n.anatomy.organ.forEach(i=>{i.name&&(r[i.name]?r[i.name]++:r[i.name]=1)})}),r}};const jte=[{label:"Data Type",id:"item.types",facetPropPath:"item.types.name",facetSubpropPath:"item.types.subcategory.name"},{label:"Anatomical Structure",id:"anatomy.organ.category",facetPropPath:"anatomy.organ.category.name",facetSubpropPath:"anatomy.organ.subcategory.name",facetFilterPath:"anatomy.organ.name"},{label:"Species",id:"organisms.primary.species",facetPropPath:"organisms.primary.species.name",facetSubpropPath:"organisms.primary.species.subcategory.name"},{label:"Experimental Approach",id:"item.modalities",facetPropPath:"item.modalities.keyword",facetSubpropPath:"item.modalities.subcategory.name"},{label:"Sex",id:"attributes.subject.sex",facetPropPath:"attributes.subject.sex.value",facetSubpropPath:"attributes.subject.sex.subcategory.name"},{label:"Age Categories",id:"attributes.subject.ageCategory",facetPropPath:"attributes.subject.ageCategory.value",facetSubpropPath:"attributes.subject.ageCategory.subcategory.name"}];function Ewe(e=void 0){if(e===void 0)return"NOT item.published.status:embargo";e.forEach(n=>n.label=n.facet);let t=BGt(e),r="NOT item.published.status:embargo";return r=`(${r}) AND `,jte.map(n=>n.facetPropPath).map(n=>{let i=t.filter(l=>l.facetPropPath==n),o="",s="";i.map(l=>{let c=l.facetSubPropPath?l.facetSubPropPath:n;l.AND?s+=`AND "${c}":"${l.label}"`:o+=`"${c}":"${l.label}" OR `}),!(o==""&&s=="")&&(o=`(${o.substring(0,o.lastIndexOf(" OR "))})`,r+=`${o+s} AND `,r=r.split("()AND ").join(""))}),r.substring(0,r.lastIndexOf(" AND "))}function BGt(e){return e.filter(t=>t.label!=="Show all")}const TN=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},Ute=function(e){const t=e.toLowerCase();return yN[t]?TN(yN[t]):TN(t)},FGt={name:"SearchFilters",components:{MapSvgIcon:CGt,MapSvgSpriteColor:HGt,Option:LR,Select:Sk,Popover:Cee,Cascader:Pbe},props:{entry:Object,envVars:{type:Object,default:()=>{}}},data:function(){return{cascaderIsReady:!1,previousShowAllChecked:{species:!1,gender:!1,organ:!1,datasets:!1},showFilters:!0,showFiltersText:!0,cascadeSelected:[],cascadeSelectedWithBoolean:[],numberShown:10,filters:[],facets:["Species","Gender","Organ","Datasets"],numberDatasetsShown:["10","20","50"],props:{multiple:!0},options:[{value:"Species",label:"Species",children:[{}]}],presentTags:[]}},setup(){const e=a.markRaw({}),t=a.markRaw({term:new Set,facet:new Set,facet2:new Set});return{cascaderTags:e,correctnessCheck:t}},computed:{numberOfResultsText:function(){return`${this.entry.numberOfHits} results | Showing`}},methods:{createCascaderItemValue:function(e,t=void 0,r=void 0){let n=e;return t&&(n=`${e}>${t}`),t&&r&&(n=`${e}>${t}>${r}`),!t&&r&&console.warn(`Warning: ${r} provided without its parent, this will not be shown in the cascader`),n},populateCascader:function(){return new Promise(e=>{this.algoliaClient.getAlgoliaFacets(jte).then(t=>{this.facets=t,Lc.emit("available-facets",t),this.options=t,this.options.forEach((r,n)=>{this.options[n].total=this.countTotalFacet(r),this.options[n].label=Ute(r.label),this.options[n].value=this.createCascaderItemValue(r.key,void 0),this.options[n].children.unshift({value:this.createCascaderItemValue("Show all"),label:"Show all"}),this.options[n].children.forEach((i,o)=>{this.options[n].children[o].label=Ute(i.label),this.options[n].children[o].value=this.createCascaderItemValue(r.label,i.label),this.options[n].children[o].children&&this.options[n].children[o].children.length>0&&this.options[n].children[o].children.forEach((s,l)=>{this.options[n].children[o].children[l].label=Ute(s.label),this.options[n].children[o].children[l].value=this.createCascaderItemValue(r.label,i.label,s.label)})})})}).finally(()=>{e()})})},cascadeTagClose:function(e){let t=[];Object.entries(this.cascaderTags).map(r=>{const n=r[0],i=r[1],o=this.options.filter(l=>l.label==n)[0],s=o.key;for(let l=0;l<o.children.length;l++){const c=o.children[l],u=c.label,d=c.value;if(Array.isArray(i))if(i.length===0&&u.toLowerCase()==="show all"){t.push([s,d]);break}else u!==e&&i.includes(u)&&t.push([s,d]);else Object.entries(i).map(h=>{const p=h[0],f=h[1];p===u&&c.children.map(m=>{const g=m.label,T=m.value;g!==e&&f.includes(g)&&t.push([s,T])})})}}),this.cascadeEvent(t)},tagsChangedCallback:function(e){this.correctnessCheck.term&&this.correctnessCheck.facet&&this.correctnessCheck.facet2&&this.options.map(t=>{this.correctnessCheck.term.add(t.label),t.children.map(r=>{this.correctnessCheck.facet.add(r.label),t.label==="Anatomical structure"&&r.label!=="Show all"&&r.children.map(n=>{this.correctnessCheck.facet2.add(n.label)})})}),this.cascaderTags={},this.presentTags=[],e.map(t=>{const{facet:r,facet2:n,term:i}=t;this.correctnessCheck.term.has(i)&&this.correctnessCheck.facet.has(r)&&(n?this.correctnessCheck.facet2.has(n)&&(i in this.cascaderTags?r in this.cascaderTags[i]?this.cascaderTags[i][r].push(n):this.cascaderTags[i][r]=[n]:(this.cascaderTags[i]={},this.cascaderTags[i][r]=[n])):i in this.cascaderTags&&i!=="Anatomical structure"?this.cascaderTags[i].push(r):r.toLowerCase()!=="show all"?this.cascaderTags[i]=[r]:this.cascaderTags[i]=[])}),Object.values(this.cascaderTags).map(t=>{const r=Array.isArray(t)?t:Object.values(t).flat(1);this.presentTags=[...this.presentTags,...r]}),this.presentTags=[...new Set(this.presentTags)],this.presentTags.length>0?this.showFiltersText=!1:this.showFiltersText=!0},countTotalFacet:function(e){return["anatomy.organ.category.name"].includes(e.key)?e.children.reduce((t,r)=>(t=typeof t=="number"?t:t.children.length,t+r.children.length)):e.children.length},showAllEventModifierForAutoCheckAll:function(e){const t={};return e.map(r=>{const n=r[0];n in t?t[n]+=1:t[n]=1}),this.options.map(r=>{const n=r.key,i=r.children.filter(s=>s.label==="Show all")[0].value,o=r.total;t[n]===o&&(e=e.filter(s=>s[0]!==r.key),delete t[n]),n in t||e.unshift([n,i])}),e},cascadeEvent:function(e){let t=[...e];if(t){if(t=this.showAllEventModifier(t),t=this.showAllEventModifierForAutoCheckAll(t),this.__expandItem__){let i=0;this.__expandItem__.length>1&&(i=1);const o=t.filter(l=>l[i]==this.__expandItem__[i]),s=t.filter(l=>l[i]!==this.__expandItem__[i]);t=[...o,...s]}let r=t.filter(i=>i!==void 0).map(i=>{let{hString:o,bString:s}=this.findHierarachyStringAndBooleanString(i),{facet:l,facet2:c,term:u}=this.getFacetsFromHierarchyString(o);return{facetPropPath:i[0],facet:l,facet2:c,term:u,AND:s}}),n=t.filter(i=>i!==void 0).map(i=>{let o,s=i[0].includes("duplicate")?i[0].split("duplicate")[0]:i[0],{hString:l,bString:c}=this.findHierarachyStringAndBooleanString(i),{facet:u,facet2:d,term:h}=this.getFacetsFromHierarchyString(l);return d&&(u=d,o="anatomy.organ.name"),{facetPropPath:s,facet:u,term:h,AND:c,facetSubPropPath:o}});this.$emit("loading",!0),this.$emit("filterResults",n),this.setCascader(r),this.cssMods()}},findHierarachyStringAndBooleanString(e){let t,r;return e.length>=3?e[2]&&(typeof e[2]=="string"||e[2]instanceof String)&&e[2].split(">").length>2?(t=e[2],r=e.length==4?e[3]:void 0):(t=e[1],r=e[2]):(t=e[1],r=void 0),{hString:t,bString:r}},getFacetsFromHierarchyString(e){let t,r,n,i=e.split(">");return i.length==3?(n=i[2],t=i[1],r=i[0]):(t=i[1],r=i[0]),{facet:t,facet2:n,term:r}},showAllEventModifier:function(e){if(e.map(t=>t?t[1].toLowerCase().includes("show all"):!1).includes(!0)){let t=[],r={};for(const n in e)r[e[n][0]]===void 0&&(r[e[n][0]]=[]),r[e[n][0]].push(e[n]);for(const n in r){let i;for(let o=r[n].length-1;o>=0;o--)if(r[n][o][1].toLowerCase().includes("show all")){i=r[n].splice(o,1)[0];break}i?this.previousShowAllChecked[n]&&r[n].length>0?t.push(...r[n]):t.push(i):t.push(...r[n])}return t.sort((n,i)=>this.__expandItem__?n[0]==this.__expandItem__?i[0]==this.__expandItem__?0:-1:i[0]==this.__expandItem__?n[0]==this.__expandItem__?0:1:0:0)}return e},cascadeExpandChange:function(e){this.__expandItem__=e,this.cssMods()},numberShownChanged:function(e){this.$emit("numberPerPage",parseInt(e))},updatePreviousShowAllChecked:function(e){for(const t in this.previousShowAllChecked)this.previousShowAllChecked[t]=!1;e.forEach(t=>{t[1].toLowerCase().includes("show all")&&(this.previousShowAllChecked[t[0]]=!0)})},setCascader:function(e){if(this.cascaderIsReady&&e&&e.length!=0){const t=r=>{let n=[r.facetPropPath,this.createCascaderItemValue(TN(r.term),r.facet)];return r.facet2&&n.push(this.createCascaderItemValue(TN(r.term),r.facet,r.facet2)),n};this.cascadeSelected=e.map(r=>t(r)),this.cascadeSelectedWithBoolean=e.map(r=>{let n=t(r);return n.push(r.AND),n}),this.updatePreviousShowAllChecked(this.cascadeSelected)}this.tagsChangedCallback(e)},addFilter:function(e){if(this.cascaderIsReady&&e){let t=this.validateAndConvertFilterToHierarchical(e);if(t)return this.cascadeSelected.filter(r=>r.term!=t.term),this.cascadeSelected.push([t.facetPropPath,this.createCascaderItemValue(t.term,t.facet),this.createCascaderItemValue(t.term,t.facet,t.facet2)]),this.cascadeSelectedWithBoolean.push([t.facetPropPath,this.createCascaderItemValue(t.term,t.facet),this.createCascaderItemValue(t.term,t.facet,t.facet2),t.AND]),!0}},initiateSearch:function(){this.cascadeEvent(this.cascadeSelectedWithBoolean)},checkShowAllBoxes:function(){this.setCascader(this.options.map(e=>({facetPropPath:e.value,term:e.label,facet:"Show all"})))},makeCascadeLabelsClickable:function(){this.$nextTick(()=>{document.querySelectorAll(".sidebar-cascader-popper .el-cascader-node__label").forEach(e=>{e.onclick=function(){const t=this.previousElementSibling;t&&(t.parentElement.attributes["aria-owns"]||this.previousElementSibling.click())}})})},cssMods:function(){this.makeCascadeLabelsClickable(),this.removeTopLevelCascaderCheckboxes()},removeTopLevelCascaderCheckboxes:function(){this.$nextTick(()=>{document.querySelectorAll(".sidebar-cascader-popper .el-cascader-menu__list")[0].querySelectorAll(".el-checkbox__input").forEach(e=>e.style.display="none")})},validateAndConvertFilterToHierarchical:function(e){if(e&&e.facet&&e.term){if(e.facet2)return e;for(const t of this.options)if(t.value===e.facetPropPath)for(const r of t.children){if(r.label===e.facet)return e;if(r.children&&r.children.length>0){for(const n of r.children)if(n.label===e.facet)return e.facet2=n.label,e.facet=r.label,e}}}return!1},getHierarchicalValidatedFilters:function(e){if(e)if(this.cascaderIsReady){const t=[];return e.forEach(r=>{const n=this.validateAndConvertFilterToHierarchical(r);n&&t.push(n)}),t}else return e;return[]}},mounted:function(){this.algoliaClient=new Mwe(this.envVars.ALGOLIA_ID,this.envVars.ALGOLIA_KEY,this.envVars.PENNSIEVE_API_LOCATION),this.algoliaClient.initIndex(this.envVars.ALGOLIA_INDEX),this.populateCascader().then(()=>{this.cascaderIsReady=!0,this.checkShowAllBoxes(),this.setCascader(this.entry.filterFacets),this.cssMods(),this.$emit("cascaderReady")})}},DGt=e=>(a.pushScopeId("data-v-307e97be"),e=e(),a.popScopeId(),e),zGt={class:"filters"},jGt={key:0,class:"cascader-tag"},UGt={class:"el-tags-container"},GGt={class:"el-tags-container"},WGt={class:"search-filters transition-box"},qGt={key:0,class:"filter-default-value"},ZGt=DGt(()=>a.createElementVNode("div",null,[a.createElementVNode("strong",null,"Within categories:"),a.createTextVNode(" OR "),a.createElementVNode("br"),a.createTextVNode(" example: 'heart' OR 'colon' "),a.createElementVNode("br"),a.createElementVNode("br"),a.createElementVNode("strong",null,"Between categories:"),a.createTextVNode(" AND "),a.createElementVNode("br"),a.createTextVNode(" example: 'rat' AND 'lung' ")],-1)),XGt={class:"dataset-shown"},KGt={class:"dataset-results-feedback"};function YGt(e,t,r,n,i,o){const s=a.resolveComponent("MapSvgSpriteColor"),l=Bb,c=Cee,u=Pbe,d=a.resolveComponent("MapSvgIcon"),h=LR,p=Sk,f=CR;return a.openBlock(),a.createElementBlock("div",zGt,[a.createVNode(s),e.presentTags.length>0?(a.openBlock(),a.createElementBlock("div",jGt,[a.createVNode(l,{class:"ml-2",type:"info",closable:"",onClose:t[0]||(t[0]=m=>o.cascadeTagClose(e.presentTags[0]))},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(e.presentTags[0]),1)]),_:1}),e.presentTags.length>1?(a.openBlock(),a.createBlock(c,{key:0,placement:"bottom-start",width:200,trigger:"hover"},{default:a.withCtx(()=>[a.createElementVNode("div",UGt,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.presentTags.slice(1),(m,g)=>(a.openBlock(),a.createBlock(l,{key:g,class:"ml-2",type:"info",closable:"",onClose:T=>o.cascadeTagClose(m)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(m),1)]),_:2},1032,["onClose"]))),128))])]),reference:a.withCtx(()=>[a.createElementVNode("div",GGt,[e.presentTags.length>1?(a.openBlock(),a.createBlock(l,{key:0,class:"ml-2",type:"info"},{default:a.withCtx(()=>[a.createTextVNode(" +"+a.toDisplayString(e.presentTags.length-1),1)]),_:1})):a.createCommentVNode("",!0)])]),_:1})):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),a.createVNode(a.Transition,{name:"el-zoom-in-top"},{default:a.withCtx(()=>[a.withDirectives((a.openBlock(),a.createElementBlock("span",WGt,[a.createVNode(u,{class:"cascader",ref:"cascader",modelValue:e.cascadeSelected,"onUpdate:modelValue":t[1]||(t[1]=m=>e.cascadeSelected=m),size:"large",placeholder:" ","collapse-tags":!0,"collapse-tags-tooltip":"",options:e.options,props:e.props,onChange:t[2]||(t[2]=m=>o.cascadeEvent(m)),onExpandChange:o.cascadeExpandChange,"show-all-levels":!0,"popper-class":"sidebar-cascader-popper"},null,8,["modelValue","options","props","onExpandChange"]),e.showFiltersText?(a.openBlock(),a.createElementBlock("div",qGt,"Filters")):a.createCommentVNode("",!0),a.createVNode(c,{title:"How do filters work?",width:"250",trigger:"hover","append-to-body":!1,"popper-class":"popover"},{reference:a.withCtx(()=>[a.createVNode(d,{icon:"help",class:"help"})]),default:a.withCtx(()=>[ZGt]),_:1})])),[[a.vShow,e.showFilters],[f,!e.cascaderIsReady]])]),_:1}),a.createElementVNode("div",XGt,[a.createElementVNode("span",KGt,a.toDisplayString(o.numberOfResultsText),1),a.createVNode(p,{class:"number-shown-select",modelValue:e.numberShown,"onUpdate:modelValue":t[3]||(t[3]=m=>e.numberShown=m),placeholder:"10",onChange:t[4]||(t[4]=m=>o.numberShownChanged(m))},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.numberDatasetsShown,m=>(a.openBlock(),a.createBlock(h,{key:m,label:m,value:m},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])])}const Awe=W3(FGt,[["render",YGt],["__scopeId","data-v-307e97be"]]);var JGt=async function(e){if(!e.ok){let t=await e.json();throw t?new Error(t.message):new Error(e)}return e},$Gt={searchInput:"",lastSearch:"",results:[],numberOfHits:0,filter:[],loadingCards:!1,numberPerPage:10,page:1,pageModel:1,start:0,hasSearched:!1,contextCardEnabled:!1};const eWt={components:{SearchFilters:Awe,DatasetCard:z_e,SearchHistory:U_e,Button:np,Card:vbe,Drawer:wee,Icon:ms,Input:wk,Pagination:Ube},name:"SideBarContent",props:{visible:{type:Boolean,default:!1},isDrawer:{type:Boolean,default:!0},entry:{type:Object,default:()=>$Gt},envVars:{type:Object,default:()=>{}}},data:function(){return{...this.entry,bodyStyle:{flex:"1 1 auto","flex-flow":"column",display:"flex"},cascaderIsReady:!1}},computed:{filterEntry:function(){return{numberOfHits:this.numberOfHits,filterFacets:this.filter}}},methods:{hoverChanged:function(e){this.$emit("hover-changed",e)},resetSearch:function(){this.numberOfHits=0,this.discoverIds=[],this._dois=[],this.results=[],this.loadingCards=!1},openSearch:function(e,t=""){this.searchInput=t,this.resetPageNavigation(),this.cascaderIsReady?(this.filter=this.$refs.filtersRef.getHierarchicalValidatedFilters(e),e&&e.length>0&&this.filter&&this.filter.length===0?(this.$refs.filtersRef.checkShowAllBoxes(),this.resetSearch()):this.filter&&(this.searchAlgolia(this.filter,t),this.$refs.filtersRef.setCascader(this.filter))):(this.filter=e,(!e||e.length==0)&&this.searchAlgolia(this.filter,t))},addFilter:function(e){this.cascaderIsReady?(this.resetPageNavigation(),e&&this.$refs.filtersRef.addFilter(e)&&this.$refs.filtersRef.initiateSearch()):Array.isArray(this.filter)?this.filter.push(e):this.filter=[e]},cascaderReady:function(){this.cascaderIsReady=!0,this.openSearch(this.filter,this.searchInput)},clearSearchClicked:function(){this.searchInput="",this.resetPageNavigation(),this.searchAlgolia(this.filters,this.searchInput),this.$refs.searchHistory.selectValue="Full search history"},searchEvent:function(e=!1){(e.keyCode===13||e instanceof MouseEvent)&&(this.resetPageNavigation(),this.searchAlgolia(this.filters,this.searchInput),this.$refs.searchHistory.selectValue="Full search history",this.$refs.searchHistory.addSearchToHistory(this.filters,this.searchInput))},filterUpdate:function(e){this.filters=[...e],this.resetPageNavigation(),this.searchAlgolia(e,this.searchInput),this.$emit("search-changed",{value:e,type:"filter-update"})},searchAlgolia(e,t=""){this.loadingCards=!0,this.algoliaClient.anatomyInSearch(Ewe(e),t).then(r=>{Lc.emit("anatomy-in-datasets",r.forFlatmap),Lc.emit("number-of-datasets-for-anatomies",r.forScaffold)}),this.algoliaClient.search(Ewe(e),t,this.numberPerPage,this.page).then(r=>{this.numberOfHits=r.total,this.discoverIds=r.discoverIds,this._dois=r.dois,this.results=r.items,this.loadingCards=!1,this.scrollToTop(),this.$emit("search-changed",{value:this.searchInput,type:"query-update"}),this._abortController&&this._abortController.abort(),this._abortController=new AbortController;const n=this._abortController.signal;this.perItemSearch(n,{count:0})})},filtersLoading:function(e){this.loadingCards=e},numberPerPageUpdate:function(e){this.numberPerPage=e,this.pageChange(1)},pageChange:function(e){this.start=(e-1)*this.numberPerPage,this.page=e,this.searchAlgolia(this.filters,this.searchInput,this.numberPerPage,this.page)},handleMissingData:function(e){let t=this.results.findIndex(r=>r.doi===e);this.results[t]&&(this.results[t].detailsReady=!0)},perItemSearch:function(e,t){if(10>t.count){const r=this._dois.shift();r&&(t.count++,this.callSciCrunch(this.envVars.API_LOCATION,{dois:[r]},e).then(n=>{n.numberOfHits===0?this.handleMissingData(r):this.resultsProcessing(n),this.$refs.content.style["overflow-y"]="scroll",t.count--,this.perItemSearch(e,t)}).catch(n=>{n.name!=="AbortError"&&(this.handleMissingData(r),t.count--,this.perItemSearch(e,t))}),this.perItemSearch(e,t))}},scrollToTop:function(){this.$refs.content&&this.$refs.content.scroll({top:0,behavior:"smooth"})},resetPageNavigation:function(){this.start=0,this.page=1},resultsProcessing:function(e){this.lastSearch=this.searchInput,e.results.length!==0&&e.results.forEach(t=>{let r=this.results.findIndex(n=>t.doi?t.doi.includes(n.doi):!1);Object.assign(this.results[r],t),Object.assign(this.results[r],{numberSamples:t.sampleSize?parseInt(t.sampleSize):0,numberSubjects:t.subjectSize?parseInt(t.subjectSize):0,updated:(t.updated&&t.updated.length)>0?t.updated[0].timestamp.split("T")[0]:"",url:t.uri[0],datasetId:t.dataset_identifier,datasetRevision:t.dataset_revision,datasetVersion:t.dataset_version,organs:t.organs&&t.organs.length>0?[...new Set(t.organs.map(n=>n.name))]:void 0,species:t.organisms&&t.organisms[0].species?[...new Set(t.organisms.map(n=>n.species?n.species.name:null))]:void 0,scaffolds:t["abi-scaffold-metadata-file"],thumbnails:t["abi-thumbnail"]?t["abi-thumbnail"]:t["abi-scaffold-thumbnail"],scaffoldViews:t["abi-scaffold-view-file"],videos:t.video,plots:t["abi-plot"],images:t["common-images"],contextualInformation:t["abi-contextual-information"].length>0?t["abi-contextual-information"]:void 0,segmentation:t["mbf-segmentation"],simulation:t["abi-simulation-file"],additionalLinks:t.additionalLinks,detailsReady:!0}),this.results[r]=this.results[r]})},createfilterParams:function(e){let t=new URLSearchParams;for(const r in e)Array.isArray(e[r])?e[r].forEach(n=>{t.append(r,n)}):t.append(r,e[r]);return t.toString()},callSciCrunch:function(e,t={},r){return new Promise((n,i)=>{let o=this.envVars.API_LOCATION+this.searchEndpoint+"?"+this.createfilterParams(t);fetch(o,{signal:r}).then(JGt).then(s=>s.json()).then(s=>n(s)).catch(s=>i(s))})},getAlgoliaFacets:async function(){return await this.algoliaClient.getAlgoliaFacets(jte)},searchHistorySearch:function(e){this.searchInput=e.search,this.filters=e.filters,this.openSearch(e.filters,e.search)}},mounted:function(){this.algoliaClient=new Mwe(this.envVars.ALGOLIA_ID,this.envVars.ALGOLIA_KEY,this.envVars.PENNSIEVE_API_LOCATION),this.algoliaClient.initIndex(this.envVars.ALGOLIA_INDEX),this.openSearch(this.filter,this.searchInput)},created:function(){this.searchEndpoint="dataset_info/using_multiple_dois/"}},tWt={class:"header"},rWt={class:"content scrollbar",ref:"content"},nWt={key:0,class:"error-feedback"};function iWt(e,t,r,n,i,o){const s=wk,l=np,c=Awe,u=U_e,d=z_e,h=Ube,p=vbe,f=CR;return a.openBlock(),a.createBlock(p,{"body-style":e.bodyStyle,class:"content-card"},{header:a.withCtx(()=>[a.createElementVNode("div",tWt,[a.createVNode(s,{class:"search-input",placeholder:"Search",modelValue:e.searchInput,"onUpdate:modelValue":t[0]||(t[0]=m=>e.searchInput=m),onKeyup:o.searchEvent,clearable:"",onClear:o.clearSearchClicked},null,8,["modelValue","onKeyup","onClear"]),a.createVNode(l,{type:"primary",class:"button",onClick:o.searchEvent,size:"large"},{default:a.withCtx(()=>[a.createTextVNode(" Search ")]),_:1},8,["onClick"])])]),default:a.withCtx(()=>[a.createVNode(c,{class:"filters",ref:"filtersRef",entry:o.filterEntry,envVars:r.envVars,onFilterResults:o.filterUpdate,onNumberPerPage:o.numberPerPageUpdate,onLoading:o.filtersLoading,onCascaderReady:o.cascaderReady},null,8,["entry","envVars","onFilterResults","onNumberPerPage","onLoading","onCascaderReady"]),a.createVNode(u,{ref:"searchHistory",onSearch:o.searchHistorySearch},null,8,["onSearch"]),a.withDirectives((a.openBlock(),a.createElementBlock("div",rWt,[e.results.length===0&&!e.loadingCards?(a.openBlock(),a.createElementBlock("div",nWt," No results found - Please change your search / filter criteria. ")):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.results,m=>(a.openBlock(),a.createElementBlock("div",{key:m.doi,class:"step-item"},[a.createVNode(d,{class:"dataset-card",entry:m,envVars:r.envVars,onMouseenter:g=>o.hoverChanged(m),onMouseleave:t[1]||(t[1]=g=>o.hoverChanged(void 0))},null,8,["entry","envVars","onMouseenter"])]))),128)),a.createVNode(h,{class:"pagination","current-page":e.page,"onUpdate:currentPage":t[2]||(t[2]=m=>e.page=m),"hide-on-single-page":"",large:"",layout:"prev, pager, next","page-size":e.numberPerPage,total:e.numberOfHits,onCurrentChange:o.pageChange},null,8,["current-page","page-size","total","onCurrentChange"])])),[[f,e.loadingCards]])]),_:1},8,["body-style"])}const Owe=W3(eWt,[["render",iWt],["__scopeId","data-v-aeb7c099"]]),oWt={name:"ExternalResourceCard",components:{Button:np},props:{resources:{type:Array,default:()=>[]}},data:function(){return{pubmeds:[],pubmedIds:[],ElIconNotebook:a.shallowRef(uMt)}},methods:{capitalise:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},openUrl:function(e){Lc.emit("open-pubmed-url",e),window.open(e,"_blank")}}},aWt={class:"resource-container"};function sWt(e,t,r,n,i,o){const s=np;return a.openBlock(),a.createElementBlock("div",aWt,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.resources,l=>(a.openBlock(),a.createElementBlock("div",{key:l.id,class:"resource"},[l.id==="pubmed"?(a.openBlock(),a.createBlock(s,{key:0,class:"button",id:"open-pubmed-button",icon:e.ElIconNotebook,onClick:c=>o.openUrl(l.url)},{default:a.withCtx(()=>[a.createTextVNode(" Open publications in PubMed ")]),_:2},1032,["icon","onClick"])):a.createCommentVNode("",!0)]))),128))])}const Iwe=W3(oWt,[["render",sWt],["__scopeId","data-v-e726c314"]]),lWt=e=>e.replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()),cWt=function(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""},uWt={name:"ConnectivityInfo",components:{Button:np,Container:MPt,Icon:ms,ElIconArrowUp:qCt,ElIconArrowDown:N$,ElIconWarning:YTe,ExternalResourceCard:Iwe},props:{entry:{type:Object,default:()=>({destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0})},availableAnatomyFacets:{type:Array,default:()=>[]}},data:function(){return{controller:void 0,activeSpecies:void 0,pubmedSearchUrl:"",loading:!1,facetList:[],showToolip:!1,showDetails:!1,originDescriptions:{motor:"is the location of the initial cell body of the circuit",sensory:"is the location of the initial cell body in the PNS circuit"},componentsWithDatasets:[],uberons:[{id:void 0,name:void 0}]}},watch:{availableAnatomyFacets:{handler:function(e){this.convertFacetsToList(e)},immediate:!0,deep:!0}},computed:{resources:function(){let e=[];return this.entry&&this.entry.hyperlinks&&(e=this.entry.hyperlinks),e},featuresAlert(){},originDescription:function(){return this.entry&&this.entry.title&&this.entry.title.toLowerCase().includes("motor")?this.originDescriptions.motor:this.originDescriptions.sensory},provSpeciesDescription:function(){let e="Studied in";return this.entry.provenanceTaxonomyLabel.forEach(t=>{e+=` ${t},`}),e=e.slice(0,-1),e+=" species",e}},methods:{titleCase:function(e){return lWt(e)},capitalise:function(e){return cWt(e)},openUrl:function(e){window.open(e,"_blank")},openAll:function(){Lc.emit("onConnectivityActionClick",{type:"Facets",labels:this.entry.componentsWithDatasets.map(e=>e.name.toLowerCase())})},openAxons:function(){Lc.emit("onConnectivityActionClick",{type:"Facets",labels:this.entry.destinationsWithDatasets.map(e=>e.name.toLowerCase())})},shouldShowExploreButton:function(e){for(let t=0;t<e.length;t++)if(this.facetList.includes(e[t].name.toLowerCase()))return!0;return!1},convertFacetsToList:function(e){e.forEach(t=>{t.children?this.convertFacetsToList(t.children):this.facetList.push(t.label.toLowerCase())})},openDendrites:function(){Lc.emit("onConnectivityActionClick",{type:"Facets",labels:this.entry.originsWithDatasets.map(e=>e.name.toLowerCase())})},pubmedSearchUrlUpdate:function(e){this.pubmedSearchUrl=e},showConnectivity:function(e){const t=e.featureId||[];this.$emit("show-connectivity",t)}}},H9=e=>(a.pushScopeId("data-v-f1c50620"),e=e(),a.popScopeId(),e),dWt={key:0,class:"main"},hWt={class:"connectivity-info-title"},pWt={key:0,class:"block"},fWt={class:"title"},mWt={key:0,class:"subtitle"},gWt={key:1,class:"block"},yWt={class:"title"},TWt=H9(()=>a.createElementVNode("span",null," Show connectivity on map ",-1)),vWt={key:0,class:"attribute-title-container"},bWt=H9(()=>a.createElementVNode("span",{class:"attribute-title"},"Alert",-1)),QWt={style:{"word-break":"keep-all"}},xWt={class:"content-container scrollbar"},_Wt={key:0,class:"block"},wWt={class:"attribute-title-container"},LWt=H9(()=>a.createElementVNode("span",{class:"attribute-title"},"Origin",-1)),SWt={style:{"word-break":"keep-all"}},kWt=H9(()=>a.createElementVNode("i",null,"Origin",-1)),CWt=["origin-item-label"],MWt={key:0,class:"seperator"},EWt={key:1,class:"block"},AWt=H9(()=>a.createElementVNode("div",{class:"attribute-title-container"},[a.createElementVNode("div",{class:"attribute-title"},"Components")],-1)),OWt=["component-item-label"],IWt={key:0,class:"seperator"},PWt={key:2,class:"block"},VWt={class:"attribute-title-container"},HWt=H9(()=>a.createElementVNode("span",{class:"attribute-title"},"Destination",-1)),RWt=H9(()=>a.createElementVNode("span",{style:{"word-break":"keep-all"}},[a.createElementVNode("i",null,"Destination"),a.createTextVNode(" is where the axons terminate ")],-1)),NWt=["destination-item-label"],BWt={key:0,class:"seperator"};function FWt(e,t,r,n,i,o){const s=Iwe,l=sMt,c=ms,u=np,d=Cee,h=YTe,p=CR;return r.entry?a.withDirectives((a.openBlock(),a.createElementBlock("div",dWt,[a.createElementVNode("div",hWt,[a.createElementVNode("div",null,[r.entry.title?(a.openBlock(),a.createElementBlock("div",pWt,[a.createElementVNode("div",fWt,a.toDisplayString(o.capitalise(r.entry.title)),1),r.entry.provenanceTaxonomyLabel&&r.entry.provenanceTaxonomyLabel.length>0?(a.openBlock(),a.createElementBlock("div",mWt,a.toDisplayString(o.provSpeciesDescription),1)):a.createCommentVNode("",!0)])):(a.openBlock(),a.createElementBlock("div",gWt,[a.createElementVNode("div",yWt,a.toDisplayString(r.entry.featureId),1)])),a.createVNode(s,{resources:o.resources},null,8,["resources"])]),a.createElementVNode("div",null,[a.createVNode(d,{width:"200",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:a.withCtx(()=>[a.createVNode(u,{class:"button-circle",circle:"",onClick:t[0]||(t[0]=f=>o.showConnectivity(r.entry))},{default:a.withCtx(()=>[a.createVNode(c,{color:"white"},{default:a.withCtx(()=>[a.createVNode(l)]),_:1})]),_:1})]),default:a.withCtx(()=>[TWt]),_:1})])]),o.featuresAlert?(a.openBlock(),a.createElementBlock("div",vWt,[bWt,a.createVNode(d,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:a.withCtx(()=>[a.createVNode(c,{class:"info"},{default:a.withCtx(()=>[a.createVNode(h)]),_:1})]),default:a.withCtx(()=>[a.createElementVNode("span",QWt,a.toDisplayString(o.featuresAlert),1)]),_:1})])):a.createCommentVNode("",!0),a.createElementVNode("div",xWt,[a.createTextVNode(a.toDisplayString(r.entry.paths)+" ",1),r.entry.origins&&r.entry.origins.length>0?(a.openBlock(),a.createElementBlock("div",_Wt,[a.createElementVNode("div",wWt,[LWt,a.createVNode(d,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:a.withCtx(()=>[a.createVNode(c,{class:"info"},{default:a.withCtx(()=>[a.createVNode(h)]),_:1})]),default:a.withCtx(()=>[a.createElementVNode("span",SWt,[kWt,a.createTextVNode(" "+a.toDisplayString(o.originDescription),1)])]),_:1})]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.entry.origins,(f,m)=>(a.openBlock(),a.createElementBlock("div",{class:"attribute-content","origin-item-label":f,key:f},[a.createTextVNode(a.toDisplayString(o.capitalise(f))+" ",1),m!=r.entry.origins.length-1?(a.openBlock(),a.createElementBlock("div",MWt)):a.createCommentVNode("",!0)],8,CWt))),128)),a.withDirectives(a.createVNode(u,{class:"button",id:"open-dendrites-button",onClick:o.openDendrites},{default:a.withCtx(()=>[a.createTextVNode(" Explore origin data ")]),_:1},8,["onClick"]),[[a.vShow,r.entry.originsWithDatasets&&r.entry.originsWithDatasets.length>0&&o.shouldShowExploreButton(r.entry.originsWithDatasets)]])])):a.createCommentVNode("",!0),r.entry.components&&r.entry.components.length>0?(a.openBlock(),a.createElementBlock("div",EWt,[AWt,(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.entry.components,(f,m)=>(a.openBlock(),a.createElementBlock("div",{class:"attribute-content","component-item-label":f,key:f},[a.createTextVNode(a.toDisplayString(o.capitalise(f))+" ",1),m!=r.entry.components.length-1?(a.openBlock(),a.createElementBlock("div",IWt)):a.createCommentVNode("",!0)],8,OWt))),128))])):a.createCommentVNode("",!0),r.entry.destinations&&r.entry.destinations.length>0?(a.openBlock(),a.createElementBlock("div",PWt,[a.createElementVNode("div",VWt,[HWt,a.createVNode(d,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:a.withCtx(()=>[a.createVNode(c,{class:"info"},{default:a.withCtx(()=>[a.createVNode(h)]),_:1})]),default:a.withCtx(()=>[RWt]),_:1})]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.entry.destinations,(f,m)=>(a.openBlock(),a.createElementBlock("div",{class:"attribute-content","destination-item-label":f,key:f},[a.createTextVNode(a.toDisplayString(o.capitalise(f))+" ",1),m!=r.entry.destinations.length-1?(a.openBlock(),a.createElementBlock("div",BWt)):a.createCommentVNode("",!0)],8,NWt))),128)),a.withDirectives(a.createVNode(u,{class:"button",onClick:o.openAxons},{default:a.withCtx(()=>[a.createTextVNode(" Explore destination data ")]),_:1},8,["onClick"]),[[a.vShow,r.entry.destinationsWithDatasets&&r.entry.destinationsWithDatasets.length>0&&o.shouldShowExploreButton(r.entry.destinationsWithDatasets)]])])):a.createCommentVNode("",!0),a.withDirectives(a.createVNode(u,{class:"button",onClick:o.openAll},{default:a.withCtx(()=>[a.createTextVNode(" Search for data on components ")]),_:1},8,["onClick"]),[[a.vShow,r.entry.componentsWithDatasets&&r.entry.componentsWithDatasets.length>0&&o.shouldShowExploreButton(r.entry.componentsWithDatasets)]])])])),[[p,e.loading]]):a.createCommentVNode("",!0)}const Pwe=W3(uWt,[["render",FWt],["__scopeId","data-v-f1c50620"]]),DWt={name:"Tabs",props:{tabTitles:{type:Array,default:()=>[]},activeId:{type:Number,default:1}},methods:{titleClicked:function(e,t){this.$emit("titleClicked",{id:e,type:t})},tabClose:function(e){this.$emit("tab-close",e)}}},zWt=e=>(a.pushScopeId("data-v-a569bcfd"),e=e(),a.popScopeId(),e),jWt={class:"tab-container"},UWt=["onClick"],GWt={class:"title-text"},WWt=zWt(()=>a.createElementVNode("span",{class:"visually-hidden"},"Close",-1));function qWt(e,t,r,n,i,o){const s=np;return a.openBlock(),a.createElementBlock("div",jWt,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.tabTitles,l=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["title",{"active-tab":l.id==r.activeId}]),key:l.id},[a.createElementVNode("div",{class:a.normalizeClass(["title-text-table",{highlightText:l.id==r.activeId}]),onClick:c=>o.titleClicked(l.id,l.type)},[a.createElementVNode("div",GWt,a.toDisplayString(l.title),1)],10,UWt),l.id===2?(a.openBlock(),a.createBlock(s,{key:0,onClick:c=>o.tabClose(l.id),class:"button-tab-close","aria-label":"Close"},{default:a.withCtx(()=>[a.createTextVNode(" × "),WWt]),_:2},1032,["onClick"])):a.createCommentVNode("",!0)],2))),128))])}const Vwe=W3(DWt,[["render",qWt],["__scopeId","data-v-a569bcfd"]]),ZWt={components:{SidebarContent:Owe,Tabs:Vwe,ElIconArrowLeft:B$,ElIconArrowRight:eR,Drawer:wee,Icon:ms,ConnectivityInfo:Pwe},name:"SideBar",props:{visible:{type:Boolean,default:!1},envVars:{type:Object,default:()=>{}},tabs:{type:Array,default:()=>[{id:1,title:"Search",type:"search"},{id:2,title:"Connectivity",type:"connectivity"}]},activeTabId:{type:Number,default:1},openAtStart:{type:Boolean,default:!1},connectivityInfo:{type:Object,default:null}},data:function(){return{drawerOpen:!1,availableAnatomyFacets:[]}},methods:{hoverChanged:function(e){this.$emit("hover-changed",e)},showConnectivity:function(e){this.$emit("show-connectivity",e)},searchChanged:function(e,t){this.$emit("search-changed",{...t,id:e})},close:function(){this.drawerOpen=!1},toggleDrawer:function(){this.drawerOpen=!this.drawerOpen},openSearch:function(e,t){this.drawerOpen=!0,this.$nextTick(()=>{this.getSearchTabRefById(1).openSearch(e,t)})},getTabByIdAndType:function(e,t){const r=e||this.activeTabId,n=t||"search",i=this.tabs.find(s=>s.id===r&&s.type===n),o=this.tabs[0];return i||o},getTabRefId:function(e,t){let r="searchTab_";t==="connectivity"&&(r="connectivityTab_");const n=this.getTabByIdAndType(e,t);return r+n.id},getSearchTabRefById:function(e){const t=e||1,r=this.getTabRefId(t,"search");return this.$refs[r][0]},addFilter:function(e){this.drawerOpen=!0,e.AND=!0,this.$nextTick(()=>{this.getSearchTabRefById(1).addFilter(e)})},openNeuronSearch:function(e){this.drawerOpen=!0,this.$nextTick(()=>{this.getSearchTabRefById(1).openSearch("",void 0,"scicrunch-query-string/",{field:"*organ.curie",curie:e})})},getAlgoliaFacets:async function(){return await this.getSearchTabRefById(1).getAlgoliaFacets()},setDrawerOpen:function(e=!0){this.drawerOpen=e},tabClicked:function({id:e,type:t}){this.$emit("tabClicked",{id:e,type:t})},tabClose:function(e){this.$emit("connectivity-info-close")}},created:function(){this.drawerOpen=this.openAtStart},mounted:function(){Lc.on("PopoverActionClick",e=>{this.$emit("actionClick",e)}),Lc.on("number-of-datasets-for-anatomies",e=>{this.$emit("number-of-datasets-for-anatomies",e)}),Lc.on("anatomy-in-datasets",e=>{this.$emit("anatomy-in-datasets",e)}),Lc.on("contextUpdate",e=>{this.$emit("contextUpdate",e)}),Lc.on("datalink-clicked",e=>{this.$emit("datalink-clicked",e)}),Lc.on("onConnectivityActionClick",e=>{this.tabClicked({id:1,type:"search"}),this.$emit("actionClick",e)}),Lc.on("available-facets",e=>{this.availableAnatomyFacets=e.find(t=>t.label==="Anatomical Structure").children})}},XWt={ref:"container"},KWt={class:"box-card"},YWt={class:"sidebar-container"};function JWt(e,t,r,n,i,o){const s=B$,l=ms,c=eR,u=Vwe,d=Pwe,h=Owe,p=wee;return a.openBlock(),a.createElementBlock("div",XWt,[e.drawerOpen?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,onClick:t[0]||(t[0]=(...f)=>o.toggleDrawer&&o.toggleDrawer(...f)),class:"open-tab"},[a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(s)]),_:1})])),a.createVNode(p,{class:"side-bar my-drawer",modelValue:e.drawerOpen,"onUpdate:modelValue":t[3]||(t[3]=f=>e.drawerOpen=f),teleported:!1,"modal-append-to-body":!1,size:"584","with-header":!1,wrapperClosable:!1,modal:!1,"modal-class":"sidebar-body","z-index":10,"lock-scroll":!1},{default:a.withCtx(()=>[a.createElementVNode("div",KWt,[e.drawerOpen?(a.openBlock(),a.createElementBlock("div",{key:0,onClick:t[1]||(t[1]=(...f)=>o.close&&o.close(...f)),class:"close-tab"},[a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(c)]),_:1})])):a.createCommentVNode("",!0),a.createElementVNode("div",YWt,[r.tabs.length>1&&r.connectivityInfo?(a.openBlock(),a.createBlock(u,{key:0,tabTitles:r.tabs,activeId:r.activeTabId,onTitleClicked:o.tabClicked,onTabClose:o.tabClose},null,8,["tabTitles","activeId","onTitleClicked","onTabClose"])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.tabs,f=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:"tab.id"},[f.type==="connectivity"?a.withDirectives((a.openBlock(),a.createBlock(d,{key:0,entry:r.connectivityInfo,availableAnatomyFacets:e.availableAnatomyFacets,ref_for:!0,ref:"connectivityTab_"+f.id,onShowConnectivity:o.showConnectivity},null,8,["entry","availableAnatomyFacets","onShowConnectivity"])),[[a.vShow,f.id===r.activeTabId]]):a.withDirectives((a.openBlock(),a.createBlock(h,{key:1,class:"sidebar-content-container",contextCardEntry:f.contextCard,envVars:r.envVars,ref_for:!0,ref:"searchTab_"+f.id,onSearchChanged:m=>o.searchChanged(f.id,m),onHoverChanged:t[2]||(t[2]=m=>o.hoverChanged(m))},null,8,["contextCardEntry","envVars","onSearchChanged"])),[[a.vShow,f.id===r.activeTabId]])],64))),128))])])]),_:1},8,["modelValue"])],512)}const $Wt={name:"SplitFlow",components:{Container:Ige,Header:Pge,Main:Vge,DialogToolbarContent:bye,SplitDialog:Tye,SideBar:W3(ZWt,[["render",JWt],["__scopeId","data-v-4d616bd4"]])},props:{state:{type:Object,default:void 0}},data:function(){return{sideBarVisibility:!0,startUp:!0,search:"",activeDockedId:1,filterTriggered:!1,availableFacets:[],connectivityInfo:null}},watch:{state:{handler:function(e){e&&(this._externalStateSet||this.setState(e),this._externalStateSet=!0)},immediate:!0}},methods:{actionClick:function(e){if(e)if(e.type=="Search")if(e.nervePath)this.openSearch([e.filter],e.label);else{this.openSearch([],e.term);const t=e.featuredDataset?"portal_maps_featured_dataset_search":"portal_maps_action_search";V1.sendEvent({event:"interaction_event",event_name:t,category:e.term||"filter",location:"map_location_pin"}),this.filterTriggered=!0}else if(e.type=="URL")window.open(e.resource,"_blank");else if(e.type=="Facet"){if(this.$refs.sideBar){this.closeConnectivityInfo(),this.$refs.sideBar.addFilter(e);const{facet:t}=e;V1.sendEvent({event:"interaction_event",event_name:"portal_maps_action_filter",category:t||"filter",location:"map_location_pin"}),this.filterTriggered=!0}}else if(e.type=="Facets"){const t=[];if(this.settingsStore.facets.species.forEach(r=>{t.push({facet:sye(r),term:"Species",facetPropPath:"organisms.primary.species.name"})}),t.length==0&&t.push({facet:"Show All",term:"Species",facetPropPath:"organisms.primary.species.name"}),t.push(...e.labels.map(r=>({facet:sye(r),term:"Anatomical structure",facetPropPath:"anatomy.organ.category.name"}))),this.$refs.sideBar){this.closeConnectivityInfo(),this.$refs.sideBar.openSearch(t,"");const n=ext(this.availableFacets,e.labels).join(", ");V1.sendEvent({event:"interaction_event",event_name:"portal_maps_action_filter",category:n||"filter",location:"map_popup_button"})}}else this.trackGalleryClick(e),this.createNewEntry(e)},trackGalleryClick:function(e){const t=[],{label:r,type:n,datasetId:i,discoverId:o,resource:s}=e;let l="",c=i||o;r&&t.push(r),n&&t.push(n),i&&t.push("("+c+")"),s&&(n==="Plot"?l=s.dataSource.url:l=typeof s=="string"?s:s.share_link),V1.sendEvent({event:"interaction_event",event_name:"portal_maps_gallery_click",category:t.join(" "),location:"map_sidebar_gallery",dataset_id:c?c+"":"",file_path:l})},onDisplaySearch:function(e){let t=!1,r=this.$refs.splitdialog;r&&r.getActiveContents().forEach(i=>{i.search(e.term)&&(t=!0)}),this.$refs.dialogToolbar.setFailedSearch(t?void 0:e.term),V1.sendEvent({event:"interaction_event",event_name:"portal_maps_display_search",category:e.term,location:"map_toolbar"})},fetchSuggestions:function(e){const t=[];this.$refs.splitdialog.getActiveContents().forEach(o=>o.searchSuggestions(e.data.term,t));const i=new Set(t);t.length=0;for(const o of i)t.push({value:'"'+o+'"'});e.data.cb(t)},onShowConnectivity:function(e){const t=this.splitFlowStore.getState(),r=(t==null?void 0:t.activeView)||"";Li.emit("show-connectivity",{featureIds:e,offset:r==="singlepanel"||r==="2horpanel"})},hoverChanged:function(e){const t=e&&e.anatomy?e.anatomy:[],r=e&&e.organs?e.organs:[];this.settingsStore.updateHoverFeatures(t,r),Li.emit("hoverUpdate")},searchChanged:function(e){if(e&&e.type=="query-update"&&(this.search=e.value,this.search&&!this.filterTriggered&&V1.sendEvent({event:"interaction_event",event_name:"portal_maps_action_search",category:this.search,location:"map_sidebar_search"}),this.filterTriggered=!1),e&&e.type=="filter-update"){if(this.settingsStore.updateFacets(e.value),!this.filterTriggered){const{value:t}=e,n=t.filter(i=>i.facet&&i.facet.toLowerCase()!=="show all").map(i=>i.facet).join(", ");V1.sendEvent({event:"interaction_event",event_name:"portal_maps_action_filter",category:n||"filter",location:"map_sidebar_filter"})}this.filterTriggered=!1}},updateMarkers:function(e){this.settingsStore.updateMarkers(e),Li.emit("markerUpdate")},updateScaffoldMarkers:function(e){this.settingsStore.updateNumberOfDatasetsForFacets(e)},getNewEntryId:function(){return this.entries.length?this.entries[this.entries.length-1].id+1:1},activateSyncMap:function(e){let t={};return Object.assign(t,e),t.mode="normal",t.id=this.getNewEntryId(),t.state=void 0,t.type="Scaffold",t.discoverId=e.discoverId,t.rotation="free",e.layout=="2vertpanel"?t.rotation="horizontal":e.layout=="2horpanel"&&(t.rotation="vertical"),this.entriesStore.addNewEntry(t),this.splitFlowStore.setSyncMode({flag:!0,newId:t.id,layout:e.layout}),t.id},createNewEntry:function(e){let t={};return t.viewUrl=void 0,t.state=void 0,Object.assign(t,e),t.mode="normal",t.id=this.getNewEntryId(),t.discoverId=e.discoverId,this.entriesStore.addNewEntry(t),this.splitFlowStore.setIdToPrimaryPane(t.id),this.splitFlowStore.syncMode&&this.splitFlowStore.setSyncMode({flag:!1}),this.$refs.sideBar&&this.$refs.sideBar.setDrawerOpen(!1),t.id},openNewMap:async function(e){const t=await KQt(e,this.settingsStore.sparcApi);this.createNewEntry(t),t.contextCard&&Li.emit("contextUpdate",t.contextCard)},openSearch:function(e,t){this.search=t,this._facets=e,this.$refs&&this.$refs.sideBar&&(this.closeConnectivityInfo(),this.$refs.sideBar.openSearch(e,t)),this.startUp=!1},closeConnectivityInfo:function(){this.$el.querySelectorAll(".maplibregl-popup-close-button").forEach(t=>{t.click()})},onFullscreen:function(e){this.$emit("onFullscreen",e)},resetApp:function(){this.setState(a$())},setIdToPrimaryPane:function(e){this.splitFlowStore.setIdToPrimaryPane(e)},setState:function(e){this.entriesStore.setAll(e.entries),e.splitFlow?this.splitFlowStore.setState(e.splitFlow):this.entries.forEach(t=>this.splitFlowStore.setIdToPrimaryPane(t.id))},getState:function(){let e=JSON.parse(JSON.stringify(this.entriesStore.$state)),r=this.$refs.splitdialog.getContentsState();if(e.entries.length===r.length)for(let n=0;n<r.length;n++){const i=e.entries[n];i.state=r[n],i.type==="Scaffold"&&"viewUrl"in i&&delete i.viewUrl,i.type==="MultiFlatmap"&&"uberonId"in i&&delete i.uberonId}return e.splitFlow=this.splitFlowStore.getState(),e},removeEntry:function(e){let t=this.entriesStore.findIndexOfId(e);this.entriesStore.destroyEntry(t)},resourceSelected:function(e){this.$emit("resource-selected",e),this.splitFlowStore.globalCallback&&this.$refs.splitdialog.sendSynchronisedEvent(e)},tabClicked:function({id:e,type:t}){this.activeDockedId=e},toggleSyncMode:function(e){e&&(e.flag?e.action&&this.activateSyncMap(e.action):this.splitFlowStore.syncMode&&this.splitFlowStore.setSyncMode({flag:!1}))},contextUpdate:function(e){Li.emit("contextUpdate",e)},datalinkClicked:function(e){const t=e||"",r="datasets/",i=t.substring(t.indexOf(r)+r.length,t.indexOf("?type=dataset"));V1.sendEvent({event:"interaction_event",event_name:"portal_maps_gallery_click",category:t,location:"map_sidebar_gallery",dataset_id:i||""})},onConnectivityInfoClose:function(){Li.emit("connectivity-info-close")},resetActivePathways:function(){const t=this.$el.querySelector(".maplibregl-canvas");t&&t.click()}},created:function(){this._facets=[],this._externalStateSet=!1},mounted:function(){Li.on("RemoveEntryRequest",e=>{this.removeEntry(e)}),Li.on("SyncModeRequest",e=>{this.toggleSyncMode(e)}),Li.on("PopoverActionClick",e=>{this.actionClick(e)}),Li.on("connectivity-info-open",e=>{this.connectivityInfo=e,this.$refs.sideBar&&(this.tabClicked({id:2,type:"connectivity"}),this.$refs.sideBar.setDrawerOpen(!0))}),Li.on("connectivity-info-close",e=>{this.tabClicked({id:1,type:"search"}),this.connectivityInfo=null,this.resetActivePathways()}),Li.on("OpenNewMap",e=>{this.openNewMap(e)}),Li.on("startHelp",()=>{this.$refs.sideBar&&this.$refs.sideBar.close()}),this.$nextTick(()=>{this.search===""&&this._facets.length===0?(this.$refs.sideBar&&this.$refs.sideBar.close(),setTimeout(()=>{this.startUp=!1},2e3)):this.openSearch(this._facets,this.search)})},computed:{...Qc.mapStores(HH,Qb,Nm),envVars:function(){return{API_LOCATION:this.settingsStore.sparcApi,ALGOLIA_INDEX:this.settingsStore.algoliaIndex,ALGOLIA_KEY:this.settingsStore.algoliaKey,ALGOLIA_ID:this.settingsStore.algoliaId,PENNSIEVE_API_LOCATION:this.settingsStore.pennsieveApi,NL_LINK_PREFIX:this.settingsStore.nlLinkPrefix,ROOT_URL:this.settingsStore.rootUrl}},entries:function(){return this.entriesStore.entries}}},eqt={style:{width:"100%",height:"100%",position:"relative",overflow:"hidden"}};function tqt(e,t,r,n,i,o){const s=bye,l=Pge,c=a.resolveComponent("SideBar"),u=Tye,d=Vge,h=Ige;return a.openBlock(),a.createBlock(h,{style:{height:"100%",background:"white"}},{default:a.withCtx(()=>[a.createVNode(l,{ref:"header",style:{"text-align":"left","font-size":"14px",padding:"0"},height:"32px",class:"dialog-header"},{default:a.withCtx(()=>[a.createVNode(s,{numberOfEntries:o.entries.length,onOnFullscreen:o.onFullscreen,onLocalSearch:o.onDisplaySearch,onFetchSuggestions:o.fetchSuggestions,ref:"dialogToolbar"},null,8,["numberOfEntries","onOnFullscreen","onLocalSearch","onFetchSuggestions"])]),_:1},512),a.createVNode(d,{class:"dialog-main"},{default:a.withCtx(()=>[a.createElementVNode("div",eqt,[a.createVNode(c,{ref:"sideBar",envVars:o.envVars,visible:e.sideBarVisibility,class:a.normalizeClass(["side-bar",{"start-up":e.startUp}]),activeTabId:e.activeDockedId,"open-at-start":e.startUp,connectivityInfo:e.connectivityInfo,onConnectivityInfoClose:o.onConnectivityInfoClose,onActionClick:o.actionClick,onTabClicked:o.tabClicked,onSearchChanged:t[0]||(t[0]=p=>o.searchChanged(p)),onAnatomyInDatasets:t[1]||(t[1]=p=>o.updateMarkers(p)),onNumberOfDatasetsForAnatomies:t[2]||(t[2]=p=>o.updateScaffoldMarkers(p)),onHoverChanged:t[3]||(t[3]=p=>o.hoverChanged(p)),onContextUpdate:t[4]||(t[4]=p=>o.contextUpdate(p)),onDatalinkClicked:t[5]||(t[5]=p=>o.datalinkClicked(p)),onShowConnectivity:o.onShowConnectivity},null,8,["envVars","visible","class","activeTabId","open-at-start","connectivityInfo","onConnectivityInfoClose","onActionClick","onTabClicked","onShowConnectivity"]),a.createVNode(u,{entries:o.entries,ref:"splitdialog",onResourceSelected:o.resourceSelected},null,8,["entries","onResourceSelected"])])]),_:1})]),_:1})}const Hwe=Zc($Wt,[["render",tqt],["__scopeId","data-v-7c28698d"]]),rqt={name:"MapContent",components:{MapSvgSpriteColor:VH,Loading:Gge,SplitFlow:Hwe},mixins:[{methods:{retrieveContextCardFromUrl:async function(e){const[t,r,n,i]=this.splitInfoFromUrl(e),o=await this.getContextFileFromScicrunch(t,n);if(!o.success)return{};const s=r+o.contextFile+i;return{s3uri:o.s3uri,contextCardUrl:s}},splitInfoFromUrl:function(e){let t=e.split("s3-resource")[1],r=e.split("files/")[0]+"files/",n=e.split("files/")[1].split("?")[0],i="?"+e.split("?")[1];const o=t.split("/");return o.shift(),[o[0],r,n,i]},getContextFileFromScicrunch:async function(e,t){return await fetch(`${this.settingsStore.sparcApi}/dataset_info/using_multiple_discoverIds/?discoverIds=${e}`).then(n=>n.json()).then(n=>{if(n.numberOfHits===1){const i=n.results[0]["abi-contextual-information"];if(i&&i.length===1)return{success:!0,contextFile:i[0],s3uri:n.results[0].s3uri};if(i&&i.length>1){let o=this.findContextInforForFilePath(n.results[0]["abi-context-file"],t);if(o)return{success:!0,contextFile:o,s3uri:n.results[0].s3uri}}}return{success:!1}}).catch(n=>(console.error("Error:",n),{success:!1}))},findContextInforForFilePath:function(e,t){var n;let r=e.find(i=>i.datacite.isDerivedFrom.path.includes(t));return(n=r==null?void 0:r.dataset)==null?void 0:n.path}}}],props:{shareLink:{type:String,default:void 0},state:{type:Object,default:void 0},options:{type:Object,default:()=>{},required:!0},startingMap:{type:String,default:"AC"},useHelpModeDialog:{type:Boolean,default:!1},connectivityInfoSidebar:{type:Boolean,default:!0}},data:function(){return{isReady:!1,initialState:void 0}},methods:{isFullscreen:function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},onFullscreen:function(e){e!==void 0?(e&&!this.isFullscreen()&&this.goFullscreen(),!e&&this.isFullscreen()&&this.leaveFullscreen()):this.isFullscreen()?this.leaveFullscreen():this.goFullscreen()},leaveFullscreen:function(){this.isFullscreen()&&(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen())},goFullscreen:function(){let e=this.$refs.MapApp;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():parent.msRequestFullscreen&&e.msRequestFullscreen()},setState:function(e){return this.$refs.flow.setState(e)},getState:function(){return this.$refs.flow.getState()},setCurrentEntry:async function(e){if(e&&e.type){if(e.type==="Scaffold"&&e.url){let t={type:e.type,label:e.label,region:e.region,resource:e.url,state:e.state,viewUrl:e.viewUrl};const r=await this.retrieveContextCardFromUrl(e.url);t={...t,...r},this.$refs.flow.createNewEntry(t)}else if(e.type==="MultiFlatmap"){const t=JQt(e);if(t){const r=this.getState();if(r&&r.entries)for(let n=0;n<r.entries.length;n++){const i=r.entries[n];if(i.type==="MultiFlatmap"){i.resource=t,i.state={species:t},(e.organ||e.uuid)&&(i.state.state={searchTerm:e.organ,uuid:e.uuid},e.uuid&&(i.state.state.entry=e.taxo)),this.$refs.flow.setState(r),this.$refs.flow.setIdToPrimaryPane(i.id);break}}}}else if(e.type==="Flatmap"){const t={type:e.type,resource:e.resource,state:e.state,label:e.label};this.$refs.flow.createNewEntry(t)}}},openSearch:function(e,t){return this.$refs.flow.openSearch(e,t)},flowMounted:function(){this._flowMounted=!0,V1.sendEvent({event:"interaction_event",event_name:"portal_maps_page_view",category:this.startingMap})},changeViewingMode:function(e){Li.emit("changeViewingMode",e)}},computed:{...Qc.mapStores(Qb,Nm),stateToSet(){return this.state?this.state:this.initialState}},watch:{shareLink:{handler:function(e){this.settingsStore.updateShareLink(e)},immediate:!0}},beforeMount:function(){var e,t;this.options&&(this.options.sparcApi&&this.settingsStore.updateSparcAPI(this.options.sparcApi),this.options.algoliaIndex&&this.settingsStore.updateAlgoliaIndex(this.options.algoliaIndex),this.options.algoliaKey&&this.settingsStore.updateAlgoliaKey(this.options.algoliaKey),this.options.algoliaId&&this.settingsStore.updateAlgoliaId(this.options.algoliaId),this.options.pennsieveApi&&this.settingsStore.updatePennsieveApi(this.options.pennsieveApi),this.options.flatmapAPI&&this.settingsStore.updateFlatmapAPI(this.options.flatmapAPI),this.options.nlLinkPrefix&&this.settingsStore.updateNLLinkPrefix(this.options.nlLinkPrefix),this.options.rootUrl&&this.settingsStore.updateRootUrl(this.options.rootUrl)),(e=this.splitFlowStore)==null||e.reset(),(t=this.splitFlowStore)==null||t.getAvailableTerms(this.settingsStore.sparcApi)},mounted:async function(){Li.on("updateShareLinkRequested",()=>{this.$emit("updateShareLinkRequested")}),Li.on("trackEvent",e=>{this.$emit("trackEvent",e)}),this.state||(this.initialState=await YQt(this.startingMap,this.options.sparcApi)),Li.on("mapReady",()=>{this._flowMounted&&this.$emit("isReady")}),this.isReady=!0,this.settingsStore.updateUseHelpModeDialog(this.useHelpModeDialog),this.settingsStore.updateConnectivityInfoSidebar(this.connectivityInfoSidebar)}},nqt={ref:"MapApp",class:"mapcontent","element-loading-text":"Loading...","element-loading-background":"rgba(0, 0, 0, 0.3)"};function iqt(e,t,r,n,i,o){const s=a.resolveComponent("map-svg-sprite-color"),l=Hwe,c=bb;return a.withDirectives((a.openBlock(),a.createElementBlock("div",nqt,[a.createVNode(s),e.isReady?(a.openBlock(),a.createBlock(l,{key:0,onOnFullscreen:o.onFullscreen,state:o.stateToSet,ref:"flow",onVnodeMounted:o.flowMounted},null,8,["onOnFullscreen","state","onVnodeMounted"])):a.createCommentVNode("",!0)])),[[c,!e.isReady]])}const oqt=Zc(rqt,[["render",iqt],["__scopeId","data-v-d67889d6"]]);let Gte=7,$3=5;const aqt=[{id:"UBERON:0000948",name:"heart",showAtZoom:1},{id:"UBERON:0001759",name:"vagus nerve",showAtZoom:1},{id:"UBERON:0001155",name:"colon",showAtZoom:1},{id:"UBERON:0000945",name:"stomach",showAtZoom:1},{id:"UBERON:0001013",name:"adipose tissue",showAtZoom:1},{id:"UBERON:0001255",name:"urinary bladder",showAtZoom:1},{id:"UBERON:0001348",name:"brown adipose tissue",showAtZoom:6},{id:"UBERON:0002008",name:"cardiac nerve plexus",showAtZoom:1},{id:"UBERON:0002240",name:"spinal cord",showAtZoom:1},{id:"UBERON:0002005",name:"Enteric Nervous System",showAtZoom:4},{id:"UBERON:0013702",name:"body proper",showAtZoom:1},{id:"UBERON:0002298",name:"brainstem",showAtZoom:1},{id:"UBERON:0002439",name:"myenteric nerve plexus",showAtZoom:6},{id:"UBERON:0000010",name:"peripheral nervous system",showAtZoom:6},{id:"UBERON:0002048",name:"lung",showAtZoom:1},{id:"UBERON:0002410",name:"autonomic nervous system",showAtZoom:6},{id:"UBERON:0002441",name:"cervicothoracic ganglion",showAtZoom:6},{id:"UBERON:0005363",name:"inferior vagus X ganglion",showAtZoom:6},{id:"UBERON:0001264",name:"pancreas",showAtZoom:1},{id:"UBERON:0001884",name:"phrenic nerve",showAtZoom:6},{id:"UBERON:0002059",name:"submandibular ganglion",showAtZoom:7},{id:"UBERON:0001347",name:"white adipose tissue",showAtZoom:6},{id:"UBERON:0001556",name:"lower urinary tract",showAtZoom:1},{id:"UBERON:0002262",name:"celiac ganglion",showAtZoom:5},{id:"UBERON:0000955",name:"Brain",showAtZoom:1},{id:"UBERON:0000160",name:"intestine",showAtZoom:1},{id:"UBERON:0001322",name:"sciatic nerve",showAtZoom:1},{id:"UBERON:0001649",name:"glossopharyngeal nerve",showAtZoom:6},{id:"UBERON:0002063",name:"sinus venosus",showAtZoom:6},{id:"UBERON:0002107",name:"liver",showAtZoom:1},{id:"UBERON:0002113",name:"kidney",showAtZoom:1},{id:"UBERON:0002481",name:"bone tissue",showAtZoom:1},{id:"UBERON:0004907",name:"lower digestive tract",showAtZoom:4},{id:"UBERON:0000044",name:"Dorsal root ganglion",showAtZoom:5},{id:"UBERON:0001736",name:"Submandibular gland",showAtZoom:Gte,keyword:!0},{id:"UBERON:0001103",name:"Diaphragm",showAtZoom:$3,keyword:!0},{id:"UBERON:0001160",name:"Fundus of stomach",showAtZoom:$3,keyword:!0},{id:"UBERON:0000955",name:"Brain",showAtZoom:$3,keyword:!0},{id:"UBERON:0003708",name:"Carotid sinus",showAtZoom:Gte,keyword:!0},{id:"UBERON:0002079",name:"Left cardiac atrium",showAtZoom:$3,keyword:!0},{id:"ILX:0485722",name:"Nodose ganglion",showAtZoom:Gte,keyword:!0},{id:"UBERON:0002078",name:"Right cardiac atrium",showAtZoom:$3,keyword:!0},{id:"UBERON:0002084",name:"Heart left ventricle",showAtZoom:$3,keyword:!0},{id:"UBERON:0002080",name:"Heart right ventricle",showAtZoom:$3,keyword:!0},{id:"UBERON:0001508",name:"Arch of Aorta",showAtZoom:$3,keyword:!0},{id:"UBERON:0001738",name:"Thyroid cartilage",showAtZoom:$3,keyword:!0},{id:"UBERON:0000388",name:"Epiglottis",showAtZoom:$3,keyword:!0}];function sqt(e){return e[0].toUpperCase()+e.substring(1)}const rQ={emits:["flatmap-provenance-ready","resource-selected","species-changed"],props:{entry:Object,visible:{type:Boolean,default:!0},mouseHovered:{type:Boolean,default:!1}},computed:{...Qc.mapStores(Qb,Nm),idNamePair(){return this.splitFlowStore.idNamePair},syncMode(){return this.splitFlowStore.syncMode},useHelpModeDialog(){return this.settingsStore.useHelpModeDialog},connectivityInfoSidebar(){return this.settingsStore.connectivityInfoSidebar}},mounted:function(){Li.on("startHelp",()=>{this.startHelp()}),this.multiflatmapRef=this.$refs.multiflatmap,this.flatmapRef=this.$refs.flatmap,this.scaffoldRef=this.$refs.scaffold},methods:{toggleSyncMode:function(){},getState:function(){},openMap:function(e){e==="SYNC"?(this.toggleSyncMode(),this.trackOpenMap("toggle_map_sync_mode")):(Li.emit("OpenNewMap",e),this.trackOpenMap(`open_new_${e}_map`)),this.onConnectivityInfoClose()},trackOpenMap:function(e){V1.sendEvent({event:"interaction_event",event_name:"portal_maps_open_map",category:e,location:"open_new_map"})},updateWithViewUrl:function(){},search:function(){return!1},searchSuggestions:function(){},resourceSelected:function(e,t,r){var l,c,u;if(this.resourceHasAction(t)){Li.emit("PopoverActionClick",t);return}let n,i="none",o=!1;const s={paneIndex:this.entry.id,type:e,resource:t,internalName:void 0,eventType:void 0};if(e=="MultiFlatmap"||e=="Flatmap")if(s.internalName=this.idNamePair[t.feature.models],t.eventType=="click")if(s.eventType="selected",t.feature.type=="marker"){let d=this.idNamePair[t.feature.models],h=aqt.filter(p=>p.id===t.feature.models);this.settingsStore.isFeaturedMarkerIdentifier(t.feature.id)?n={type:"Search",term:this.settingsStore.featuredMarkerDoi(t.feature.id),featuredDataset:!0}:h.filter(p=>p.keyword).length>0?n={type:"Search",term:"http://purl.obolibrary.org/obo/"+t.feature.models.replace(":","_")}:n={type:"Facet",facet:d,facetPropPath:"anatomy.organ.category.name",term:"Anatomical structure"},o=!0,e=="MultiFlatmap"&&this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults()}else t.feature.type=="feature"&&(this.syncMode?o=!0:i="scaffold");else t.eventType=="mouseenter"&&(s.eventType="highlighted",o=!0);else e=="Scaffold"&&(t&&t[0]&&((((l=t[0].data)==null?void 0:l.id)===void 0||((c=t[0].data)==null?void 0:c.id)==="")&&(t[0].data.id=(u=t[0].data)==null?void 0:u.group),s.internalName=t[0].data.id,t[0].data.lastActionOnMarker===!0&&(n={type:"Facet",facet:sqt(t[0].data.id),facetPropPath:"anatomy.organ.category.name",term:"Anatomical structure"})),s.eventType="selected",o=!0,i="search");n===void 0&&r&&(n=cxt(s,i)),n&&Li.emit("PopoverActionClick",n),o&&this.$emit("resource-selected",s)},resourceHasAction:function(e){return e.type==="URL"||e.type==="Search"||e.type==="Neuron Search"||e.type=="Facet"||e.type=="Facets"},isVisible:function(){return this.splitFlowStore.getPaneNameById(this.entry.id)!==void 0},displayTooltip:function(){},getNameAndIdFromSyncData:async function(e){let t=e.internalName;t===void 0&&e.resource&&(t=e.resource.label);let r;if(e.resource&&e.resource.resource&&(r=e.resource.resource[0]),this.entry.type==="Scaffold"){if(this.$refs.scaffold.findObjectsWithGroupName(t).length===0){if(e.resource&&e.resource.feature){const o=uye(e.resource.feature.models);if(o.length>0)return o}let i=lxt(t);if(i)return i;if(r&&e.eventType==="selected")return fetch(`${this.apiLocation}get-related-terms/${r}`).then(o=>o.json()).then(o=>{if(o.uberon.array.length>0)return t=o.uberon.array[0].name.charAt(0).toUpperCase()+o.uberon.array[0].name.slice(1),r=o.uberon.array[0].id.toUpperCase(),{id:r,name:t}})}}else if(this.entry.type==="MultiFlatmap")if(t==="Bladder")t="Urinary Bladder";else{const n=uye(t);n.length>0&&(t=n[0])}return{id:r,name:t}},getDatasetAnatomyInfo:function(e){fetch(`${this.apiLocation}dataset_info/anatomy?identifier=${e}`).then(t=>t.json()).then(t=>{const r=t.result[0];let n;try{n=r.anatomy.organ[0].curie}catch{n=void 0}let i;try{i=r.item.curie}catch{i=void 0}let o;try{let s=0,l=!1;for(;!l&&s<r.organisms.subject.length;){const c=r.organisms.subject[s];c.species&&(o=c.species.name,l=!0),s+=1}}catch{o=void 0}this.settingsStore.updateFeaturedMarker({identifier:e,marker:n,doi:i,species:o})})},oldFeaturedDatasetApiHasInfo:async function(){let t=await(await fetch(`${this.apiLocation}get_featured_datasets_identifiers`)).json();return!t.identifiers||t.identifiers.length==0?!1:t.identifiers},newFeaturedDatasetApiHasInfo:async function(){let t=await(await fetch(`${this.apiLocation}get_featured_dataset`)).json();return!t.datasets||t.datasets.length==0?!1:t.datasets.map(r=>r.id)},getFeaturedDatasets:async function(){let e=[],t=await this.oldFeaturedDatasetApiHasInfo();if(t)e=t;else{let r=await this.newFeaturedDatasetApiHasInfo();r&&(e=r)}this.settingsStore.updateFeatured(e),e.forEach(r=>{this.getDatasetAnatomyInfo(r)})},zoomToFeatures:function(){},handleSyncMouseEvent:async function(e){let t=await this.getNameAndIdFromSyncData(e);e.eventType==="highlighted"?this.highlightFeatures(t):e.eventType==="selected"&&this.displayTooltip(t)},handleSyncPanZoomEvent:function(){},highlightFeatures:function(){},receiveSynchronisedEvent:async function(e){if(e.paneIndex!==this.entry.id)e.eventType=="panZoom"||this.handleSyncMouseEvent(e);else if(e.eventType=="selected"){let t=await this.getNameAndIdFromSyncData(e);this.zoomToFeatures(t,!1)}},requestSynchronisedEvent:function(){},flatmapMarkerUpdate(){},onResize:function(){},startHelp:function(){this.isInHelp===!1&&(this.helpMode=!0,window.addEventListener("mousedown",this.checkEndHelpMouseDown),this.isInHelp=!0)},endHelp:function(){window.removeEventListener("mousedown",this.checkEndHelpMouseDown),this.helpMode=!1,setTimeout(()=>{this.isInHelp=!1},200)},onHelpModeShowNext:function(){this.helpModeActiveItem+=1},onHelpModeLastItem:function(e){e&&(this.helpModeLastItem=!0)},onFinishHelpMode:function(){this.helpMode=!1,this.helpModeActiveItem=0,this.helpModeLastItem=!1},onTooltipShown:function(){this.$refs.multiflatmap&&this.$refs.multiflatmapHelp&&this.$refs.multiflatmapHelp.toggleTooltipHighlight(),this.$refs.flatmap&&this.$refs.flatmapHelp&&this.$refs.flatmapHelp.toggleTooltipHighlight(),this.$refs.scaffold&&this.$refs.scaffoldHelp&&this.$refs.scaffoldHelp.toggleTooltipHighlight()},onMapTooltipShown:function(){this.$refs.multiflatmap&&this.$refs.multiflatmapHelp&&this.$refs.multiflatmapHelp.toggleTooltipPinHighlight(),this.$refs.flatmap&&this.$refs.flatmapHelp&&this.$refs.flatmapHelp.toggleTooltipPinHighlight(),this.$refs.scaffold&&this.$refs.scaffoldHelp&&this.$refs.scaffoldHelp.toggleTooltipPinHighlight()},checkEndHelpMouseDown:function(e){e.target.closest(".help-mode-dialog")||this.endHelp()},mapHoverHighlight:function(e){if(this.visible){const t=this.settingsStore.hoverAnatomies,r=this.settingsStore.hoverOrgans;t.length||r.length?(clearTimeout(this.hoverDelay),this.multiflatmapRef||this.flatmapRef?e==null||e.zoomToFeatures(t,{noZoomIn:!0}):this.scaffoldRef&&(e==null||e.changeHighlightedByName(r,"",!1))):this.hoverDelay=setTimeout(()=>{this.multiflatmapRef||this.flatmapRef?e==null||e.clearSearchResults():this.scaffoldRef&&(e==null||e.changeHighlightedByName(r,"",!1))},500)}},onConnectivityInfoOpen:function(e){Li.emit("connectivity-info-open",e)},onConnectivityInfoClose:function(){Li.emit("connectivity-info-close")}},data:function(){return{apiLocation:void 0,activeSpecies:"Rat",scaffoldCamera:void 0,mainStyle:{height:this.entry.datasetTitle?"calc(100% - 30px)":"100%",width:"100%",bottom:"0px"},helpMode:!1,helpModeActiveItem:0,helpModeLastItem:!1,multiflatmapRef:null,flatmapRef:null,scaffoldRef:null,scaffoldLoaded:!1,isInHelp:!1,hoverDelay:void 0}},created:function(){this.flatmapAPI=void 0,this.apiLocation=void 0,this.settingsStore.flatmapAPI&&(this.flatmapAPI=this.settingsStore.flatmapAPI),this.settingsStore.sparcApi&&(this.apiLocation=this.settingsStore.sparcApi)},watch:{helpMode:function(e){e||(this.helpModeActiveItem=0)}}},lqt=function(e){return e?[...new Set(e.map(t=>JSON.stringify(t)))].map(t=>JSON.parse(t)):[]},Rwe={computed:{...Qc.mapStores(Qb)},methods:{flatmapPanZoomCallback:function(e){if(this.mouseHovered){const t={paneIndex:this.entry.id,eventType:"panZoom",payload:e,type:this.entry.type};this.$emit("resource-selected",t)}},flatmapMarkerUpdate(e){if(!this.flatmapReady)return;let t=e;if(t||(t=this.getFlatmapImp()),t){let r=this.settingsStore.markers;r=lqt(r);let n=this.removeMarkersNotOnFlatmap(t,r);t.clearMarkers(),t.clearDatasetMarkers(),t.addDatasetMarkers(n),this.entry.type==="MultiFlatmap"&&this.restoreFeaturedMarkers(t)}},removeMarkersNotOnFlatmap(e,t){let r=e.anatomicalIdentifiers,n=[];for(let i=0;i<t.length;i++){let o=t[i],s={id:o.id,terms:[]};for(let l=0;l<o.terms.length;l++)r.includes(o.terms[l])&&s.terms.push(o.terms[l]);n.push(s)}return n},flatmapReadyForMarkerUpdates:function(e){if(e){e.enablePanZoomEvents(!0),this.flatmapReady=!0;const t=e.mapImp;this.flatmapMarkerUpdate(t)}}}},m6=(e,t,{checkForDefaultPrevented:r=!0}={})=>n=>{const i=e==null?void 0:e(n);if(r===!1||!i)return t==null?void 0:t(n)};var Nwe;const Al=typeof window<"u",cqt=e=>typeof e=="string",Bwe=()=>{},uqt=Al&&((Nwe=window==null?void 0:window.navigator)==null?void 0:Nwe.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Fwe(e){return typeof e=="function"?e():a.unref(e)}function dqt(e){return e}function vN(e){return a.getCurrentScope()?(a.onScopeDispose(e),!0):!1}function hqt(e,t=!0){a.getCurrentInstance()?a.onMounted(e):t?e():a.nextTick(e)}function g6(e){var t;const r=Fwe(e);return(t=r==null?void 0:r.$el)!=null?t:r}const bN=Al?window:void 0;function t8(...e){let t,r,n,i;if(cqt(e[0])||Array.isArray(e[0])?([r,n,i]=e,t=bN):[t,r,n,i]=e,!t)return Bwe;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const o=[],s=()=>{o.forEach(d=>d()),o.length=0},l=(d,h,p,f)=>(d.addEventListener(h,p,f),()=>d.removeEventListener(h,p,f)),c=a.watch(()=>[g6(t),Fwe(i)],([d,h])=>{s(),d&&o.push(...r.flatMap(p=>n.map(f=>l(d,p,f,h))))},{immediate:!0,flush:"post"}),u=()=>{c(),s()};return vN(u),u}let Dwe=!1;function pqt(e,t,r={}){const{window:n=bN,ignore:i=[],capture:o=!0,detectIframe:s=!1}=r;if(!n)return;uqt&&!Dwe&&(Dwe=!0,Array.from(n.document.body.children).forEach(d=>d.addEventListener("click",Bwe)));let l=!0;const c=d=>i.some(h=>{if(typeof h=="string")return Array.from(n.document.querySelectorAll(h)).some(p=>p===d.target||d.composedPath().includes(p));{const p=g6(h);return p&&(d.target===p||d.composedPath().includes(p))}}),u=[t8(n,"click",d=>{const h=g6(e);if(!(!h||h===d.target||d.composedPath().includes(h))){if(d.detail===0&&(l=!c(d)),!l){l=!0;return}t(d)}},{passive:!0,capture:o}),t8(n,"pointerdown",d=>{const h=g6(e);h&&(l=!d.composedPath().includes(h)&&!c(d))},{passive:!0}),s&&t8(n,"blur",d=>{var h;const p=g6(e);((h=n.document.activeElement)==null?void 0:h.tagName)==="IFRAME"&&!(p!=null&&p.contains(n.document.activeElement))&&t(d)})].filter(Boolean);return()=>u.forEach(d=>d())}function zwe(e,t=!1){const r=a.ref(),n=()=>r.value=!!e();return n(),hqt(n,t),r}const jwe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Uwe="__vueuse_ssr_handlers__";jwe[Uwe]=jwe[Uwe]||{};var Gwe=Object.getOwnPropertySymbols,fqt=Object.prototype.hasOwnProperty,mqt=Object.prototype.propertyIsEnumerable,gqt=(e,t)=>{var r={};for(var n in e)fqt.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Gwe)for(var n of Gwe(e))t.indexOf(n)<0&&mqt.call(e,n)&&(r[n]=e[n]);return r};function y6(e,t,r={}){const n=r,{window:i=bN}=n,o=gqt(n,["window"]);let s;const l=zwe(()=>i&&"ResizeObserver"in i),c=()=>{s&&(s.disconnect(),s=void 0)},u=a.watch(()=>g6(e),h=>{c(),l.value&&i&&h&&(s=new ResizeObserver(t),s.observe(h,o))},{immediate:!0,flush:"post"}),d=()=>{c(),u()};return vN(d),{isSupported:l,stop:d}}var Wwe=Object.getOwnPropertySymbols,yqt=Object.prototype.hasOwnProperty,Tqt=Object.prototype.propertyIsEnumerable,vqt=(e,t)=>{var r={};for(var n in e)yqt.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Wwe)for(var n of Wwe(e))t.indexOf(n)<0&&Tqt.call(e,n)&&(r[n]=e[n]);return r};function bqt(e,t,r={}){const n=r,{window:i=bN}=n,o=vqt(n,["window"]);let s;const l=zwe(()=>i&&"MutationObserver"in i),c=()=>{s&&(s.disconnect(),s=void 0)},u=a.watch(()=>g6(e),h=>{c(),l.value&&i&&h&&(s=new MutationObserver(t),s.observe(h,o))},{immediate:!0}),d=()=>{c(),u()};return vN(d),{isSupported:l,stop:d}}var qwe;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(qwe||(qwe={}));var Qqt=Object.defineProperty,Zwe=Object.getOwnPropertySymbols,xqt=Object.prototype.hasOwnProperty,_qt=Object.prototype.propertyIsEnumerable,Xwe=(e,t,r)=>t in e?Qqt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wqt=(e,t)=>{for(var r in t||(t={}))xqt.call(t,r)&&Xwe(e,r,t[r]);if(Zwe)for(var r of Zwe(t))_qt.call(t,r)&&Xwe(e,r,t[r]);return e};wqt({linear:dqt},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const Lqt=()=>Al&&/firefox/i.test(window.navigator.userAgent),Wte=e=>{let t,r;return e.type==="touchend"?(r=e.changedTouches[0].clientY,t=e.changedTouches[0].clientX):e.type.startsWith("touch")?(r=e.touches[0].clientY,t=e.touches[0].clientX):(r=e.clientY,t=e.clientX),{clientX:t,clientY:r}};/**
|
937
|
+
`)},PGt=["innerHTML"];function VGt(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("svg",{width:"0",height:"0",style:{display:"none"},innerHTML:e.$options.svgSprite},null,8,PGt)}const HGt=G_e(IGt,[["render",VGt]]);var Cwe={exports:{}};/*! algoliasearch.umd.js | 4.23.2 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */(function(e,t){(function(r,n){e.exports=n()})(rIt,function(){function r(Ae,We,st){return We in Ae?Object.defineProperty(Ae,We,{value:st,enumerable:!0,configurable:!0,writable:!0}):Ae[We]=st,Ae}function n(Ae,We){var st=Object.keys(Ae);if(Object.getOwnPropertySymbols){var vt=Object.getOwnPropertySymbols(Ae);We&&(vt=vt.filter(function(Ft){return Object.getOwnPropertyDescriptor(Ae,Ft).enumerable})),st.push.apply(st,vt)}return st}function i(Ae){for(var We=1;We<arguments.length;We++){var st=arguments[We]!=null?arguments[We]:{};We%2?n(Object(st),!0).forEach(function(vt){r(Ae,vt,st[vt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Ae,Object.getOwnPropertyDescriptors(st)):n(Object(st)).forEach(function(vt){Object.defineProperty(Ae,vt,Object.getOwnPropertyDescriptor(st,vt))})}return Ae}function o(Ae,We){if(Ae==null)return{};var st,vt,Ft=function(mr,Tr){if(mr==null)return{};var Rr,Mr,zr={},xr=Object.keys(mr);for(Mr=0;Mr<xr.length;Mr++)Rr=xr[Mr],Tr.indexOf(Rr)>=0||(zr[Rr]=mr[Rr]);return zr}(Ae,We);if(Object.getOwnPropertySymbols){var ur=Object.getOwnPropertySymbols(Ae);for(vt=0;vt<ur.length;vt++)st=ur[vt],We.indexOf(st)>=0||Object.prototype.propertyIsEnumerable.call(Ae,st)&&(Ft[st]=Ae[st])}return Ft}function s(Ae,We){return function(st){if(Array.isArray(st))return st}(Ae)||function(st,vt){if(Symbol.iterator in Object(st)||Object.prototype.toString.call(st)==="[object Arguments]"){var Ft=[],ur=!0,mr=!1,Tr=void 0;try{for(var Rr,Mr=st[Symbol.iterator]();!(ur=(Rr=Mr.next()).done)&&(Ft.push(Rr.value),!vt||Ft.length!==vt);ur=!0);}catch(zr){mr=!0,Tr=zr}finally{try{ur||Mr.return==null||Mr.return()}finally{if(mr)throw Tr}}return Ft}}(Ae,We)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function l(Ae){return function(We){if(Array.isArray(We)){for(var st=0,vt=new Array(We.length);st<We.length;st++)vt[st]=We[st];return vt}}(Ae)||function(We){if(Symbol.iterator in Object(We)||Object.prototype.toString.call(We)==="[object Arguments]")return Array.from(We)}(Ae)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function c(Ae){var We,st="algoliasearch-client-js-".concat(Ae.key),vt=function(){return We===void 0&&(We=Ae.localStorage||window.localStorage),We},Ft=function(){return JSON.parse(vt().getItem(st)||"{}")},ur=function(Tr){vt().setItem(st,JSON.stringify(Tr))},mr=function(){var Tr=Ae.timeToLive?1e3*Ae.timeToLive:null,Rr=Ft(),Mr=Object.fromEntries(Object.entries(Rr).filter(function(xr){return s(xr,2)[1].timestamp!==void 0}));if(ur(Mr),Tr){var zr=Object.fromEntries(Object.entries(Mr).filter(function(xr){var Hr=s(xr,2)[1],Hn=new Date().getTime();return!(Hr.timestamp+Tr<Hn)}));ur(zr)}};return{get:function(Tr,Rr){var Mr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){mr();var zr=JSON.stringify(Tr);return Ft()[zr]}).then(function(zr){return Promise.all([zr?zr.value:Rr(),zr!==void 0])}).then(function(zr){var xr=s(zr,2),Hr=xr[0],Hn=xr[1];return Promise.all([Hr,Hn||Mr.miss(Hr)])}).then(function(zr){return s(zr,1)[0]})},set:function(Tr,Rr){return Promise.resolve().then(function(){var Mr=Ft();return Mr[JSON.stringify(Tr)]={timestamp:new Date().getTime(),value:Rr},vt().setItem(st,JSON.stringify(Mr)),Rr})},delete:function(Tr){return Promise.resolve().then(function(){var Rr=Ft();delete Rr[JSON.stringify(Tr)],vt().setItem(st,JSON.stringify(Rr))})},clear:function(){return Promise.resolve().then(function(){vt().removeItem(st)})}}}function u(Ae){var We=l(Ae.caches),st=We.shift();return st===void 0?{get:function(vt,Ft){var ur=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},mr=Ft();return mr.then(function(Tr){return Promise.all([Tr,ur.miss(Tr)])}).then(function(Tr){return s(Tr,1)[0]})},set:function(vt,Ft){return Promise.resolve(Ft)},delete:function(vt){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(vt,Ft){var ur=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return st.get(vt,Ft,ur).catch(function(){return u({caches:We}).get(vt,Ft,ur)})},set:function(vt,Ft){return st.set(vt,Ft).catch(function(){return u({caches:We}).set(vt,Ft)})},delete:function(vt){return st.delete(vt).catch(function(){return u({caches:We}).delete(vt)})},clear:function(){return st.clear().catch(function(){return u({caches:We}).clear()})}}}function d(){var Ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},We={};return{get:function(st,vt){var Ft=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},ur=JSON.stringify(st);if(ur in We)return Promise.resolve(Ae.serializable?JSON.parse(We[ur]):We[ur]);var mr=vt(),Tr=Ft&&Ft.miss||function(){return Promise.resolve()};return mr.then(function(Rr){return Tr(Rr)}).then(function(){return mr})},set:function(st,vt){return We[JSON.stringify(st)]=Ae.serializable?JSON.stringify(vt):vt,Promise.resolve(vt)},delete:function(st){return delete We[JSON.stringify(st)],Promise.resolve()},clear:function(){return We={},Promise.resolve()}}}function h(Ae,We,st){var vt={"x-algolia-api-key":st,"x-algolia-application-id":We};return{headers:function(){return Ae===y.WithinHeaders?vt:{}},queryParameters:function(){return Ae===y.WithinQueryParameters?vt:{}}}}function p(Ae){var We=0;return Ae(function st(){return We++,new Promise(function(vt){setTimeout(function(){vt(Ae(st))},Math.min(100*We,1e3))})})}function f(Ae){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(st,vt){return Promise.resolve()};return Object.assign(Ae,{wait:function(st){return f(Ae.then(function(vt){return Promise.all([We(vt,st),vt])}).then(function(vt){return vt[1]}))}})}function m(Ae){for(var We=Ae.length-1;We>0;We--){var st=Math.floor(Math.random()*(We+1)),vt=Ae[We];Ae[We]=Ae[st],Ae[st]=vt}return Ae}function g(Ae,We){return We&&Object.keys(We).forEach(function(st){Ae[st]=We[st](Ae)}),Ae}function T(Ae){for(var We=arguments.length,st=new Array(We>1?We-1:0),vt=1;vt<We;vt++)st[vt-1]=arguments[vt];var Ft=0;return Ae.replace(/%s/g,function(){return encodeURIComponent(st[Ft++])})}var y={WithinQueryParameters:0,WithinHeaders:1};function v(Ae,We){var st=Ae||{},vt=st.data||{};return Object.keys(st).forEach(function(Ft){["timeout","headers","queryParameters","data","cacheable"].indexOf(Ft)===-1&&(vt[Ft]=st[Ft])}),{data:Object.entries(vt).length>0?vt:void 0,timeout:st.timeout||We,headers:st.headers||{},queryParameters:st.queryParameters||{},cacheable:st.cacheable}}var Q={Read:1,Write:2,Any:3},_=1,L=2,w=3;function S(Ae){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_;return i(i({},Ae),{},{status:We,lastUpdate:Date.now()})}function C(Ae){return typeof Ae=="string"?{protocol:"https",url:Ae,accept:Q.Any}:{protocol:Ae.protocol||"https",url:Ae.url,accept:Ae.accept||Q.Any}}var E="DELETE",O="GET",I="POST",R="PUT";function B(Ae,We){return Promise.all(We.map(function(st){return Ae.get(st,function(){return Promise.resolve(S(st))})})).then(function(st){var vt=st.filter(function(mr){return function(Tr){return Tr.status===_||Date.now()-Tr.lastUpdate>12e4}(mr)}),Ft=st.filter(function(mr){return function(Tr){return Tr.status===w&&Date.now()-Tr.lastUpdate<=12e4}(mr)}),ur=[].concat(l(vt),l(Ft));return{getTimeout:function(mr,Tr){return(Ft.length===0&&mr===0?1:Ft.length+3+mr)*Tr},statelessHosts:ur.length>0?ur.map(function(mr){return C(mr)}):We}})}function D(Ae,We,st,vt){var Ft=[],ur=function(Hr,Hn){if(!(Hr.method===O||Hr.data===void 0&&Hn.data===void 0)){var Wn=Array.isArray(Hr.data)?Hr.data:i(i({},Hr.data),Hn.data);return JSON.stringify(Wn)}}(st,vt),mr=function(Hr,Hn){var Wn=i(i({},Hr.headers),Hn.headers),ei={};return Object.keys(Wn).forEach(function(uo){var _a=Wn[uo];ei[uo.toLowerCase()]=_a}),ei}(Ae,vt),Tr=st.method,Rr=st.method!==O?{}:i(i({},st.data),vt.data),Mr=i(i(i({"x-algolia-agent":Ae.userAgent.value},Ae.queryParameters),Rr),vt.queryParameters),zr=0,xr=function Hr(Hn,Wn){var ei=Hn.pop();if(ei===void 0)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:G(Ft)};var uo={data:ur,headers:mr,method:Tr,url:V(ei,st.path,Mr),connectTimeout:Wn(zr,Ae.timeouts.connect),responseTimeout:Wn(zr,vt.timeout)},_a=function(ds){var wa={request:uo,response:ds,host:ei,triesLeft:Hn.length};return Ft.push(wa),wa},ho={onSuccess:function(ds){return function(wa){try{return JSON.parse(wa.content)}catch(_s){throw function(zl,Bc){return{name:"DeserializationError",message:zl,response:Bc}}(_s.message,wa)}}(ds)},onRetry:function(ds){var wa=_a(ds);return ds.isTimedOut&&zr++,Promise.all([Ae.logger.info("Retryable failure",X(wa)),Ae.hostsCache.set(ei,S(ei,ds.isTimedOut?w:L))]).then(function(){return Hr(Hn,Wn)})},onFail:function(ds){throw _a(ds),function(wa,_s){var zl=wa.content,Bc=wa.status,dc=zl;try{dc=JSON.parse(zl).message}catch{}return function(qu,ou,Rs){return{name:"ApiError",message:qu,status:ou,transporterStackTrace:Rs}}(dc,Bc,_s)}(ds,G(Ft))}};return Ae.requester.send(uo).then(function(ds){return function(wa,_s){return function(zl){var Bc=zl.status;return zl.isTimedOut||function(dc){var qu=dc.isTimedOut,ou=dc.status;return!qu&&~~ou==0}(zl)||~~(Bc/100)!=2&&~~(Bc/100)!=4}(wa)?_s.onRetry(wa):~~(wa.status/100)==2?_s.onSuccess(wa):_s.onFail(wa)}(ds,ho)})};return B(Ae.hostsCache,We).then(function(Hr){return xr(l(Hr.statelessHosts).reverse(),Hr.getTimeout)})}function j(Ae){var We=Ae.hostsCache,st=Ae.logger,vt=Ae.requester,Ft=Ae.requestsCache,ur=Ae.responsesCache,mr=Ae.timeouts,Tr=Ae.userAgent,Rr=Ae.hosts,Mr=Ae.queryParameters,zr={hostsCache:We,logger:st,requester:vt,requestsCache:Ft,responsesCache:ur,timeouts:mr,userAgent:Tr,headers:Ae.headers,queryParameters:Mr,hosts:Rr.map(function(xr){return C(xr)}),read:function(xr,Hr){var Hn=v(Hr,zr.timeouts.read),Wn=function(){return D(zr,zr.hosts.filter(function(uo){return(uo.accept&Q.Read)!=0}),xr,Hn)};if((Hn.cacheable!==void 0?Hn.cacheable:xr.cacheable)!==!0)return Wn();var ei={request:xr,mappedRequestOptions:Hn,transporter:{queryParameters:zr.queryParameters,headers:zr.headers}};return zr.responsesCache.get(ei,function(){return zr.requestsCache.get(ei,function(){return zr.requestsCache.set(ei,Wn()).then(function(uo){return Promise.all([zr.requestsCache.delete(ei),uo])},function(uo){return Promise.all([zr.requestsCache.delete(ei),Promise.reject(uo)])}).then(function(uo){var _a=s(uo,2);return _a[0],_a[1]})})},{miss:function(uo){return zr.responsesCache.set(ei,uo)}})},write:function(xr,Hr){return D(zr,zr.hosts.filter(function(Hn){return(Hn.accept&Q.Write)!=0}),xr,v(Hr,zr.timeouts.write))}};return zr}function N(Ae){var We={value:"Algolia for JavaScript (".concat(Ae,")"),add:function(st){var vt="; ".concat(st.segment).concat(st.version!==void 0?" (".concat(st.version,")"):"");return We.value.indexOf(vt)===-1&&(We.value="".concat(We.value).concat(vt)),We}};return We}function V(Ae,We,st){var vt=W(st),Ft="".concat(Ae.protocol,"://").concat(Ae.url,"/").concat(We.charAt(0)==="/"?We.substr(1):We);return vt.length&&(Ft+="?".concat(vt)),Ft}function W(Ae){return Object.keys(Ae).map(function(We){return T("%s=%s",We,(st=Ae[We],Object.prototype.toString.call(st)==="[object Object]"||Object.prototype.toString.call(st)==="[object Array]"?JSON.stringify(Ae[We]):Ae[We]));var st}).join("&")}function G(Ae){return Ae.map(function(We){return X(We)})}function X(Ae){var We=Ae.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return i(i({},Ae),{},{request:i(i({},Ae.request),{},{headers:i(i({},Ae.request.headers),We)})})}var $=function(Ae){return function(We,st){return Ae.transporter.write({method:I,path:"2/abtests",data:We},st)}},te=function(Ae){return function(We,st){return Ae.transporter.write({method:E,path:T("2/abtests/%s",We)},st)}},ce=function(Ae){return function(We,st){return Ae.transporter.read({method:O,path:T("2/abtests/%s",We)},st)}},Qe=function(Ae){return function(We){return Ae.transporter.read({method:O,path:"2/abtests"},We)}},me=function(Ae){return function(We,st){return Ae.transporter.write({method:I,path:T("2/abtests/%s/stop",We)},st)}},ne=function(Ae){return function(We){return Ae.transporter.read({method:O,path:"1/strategies/personalization"},We)}},le=function(Ae){return function(We,st){return Ae.transporter.write({method:I,path:"1/strategies/personalization",data:We},st)}};function ee(Ae){return function We(st){return Ae.request(st).then(function(vt){if(Ae.batch!==void 0&&Ae.batch(vt.hits),!Ae.shouldStop(vt))return vt.cursor?We({cursor:vt.cursor}):We({page:(st.page||0)+1})})}({})}var oe=function(Ae){return function(We,st){var vt=st||{},Ft=vt.queryParameters,ur=o(vt,["queryParameters"]),mr=i({acl:We},Ft!==void 0?{queryParameters:Ft}:{});return f(Ae.transporter.write({method:I,path:"1/keys",data:mr},ur),function(Tr,Rr){return p(function(Mr){return rt(Ae)(Tr.key,Rr).catch(function(zr){if(zr.status!==404)throw zr;return Mr()})})})}},ie=function(Ae){return function(We,st,vt){var Ft=v(vt);return Ft.queryParameters["X-Algolia-User-ID"]=We,Ae.transporter.write({method:I,path:"1/clusters/mapping",data:{cluster:st}},Ft)}},he=function(Ae){return function(We,st,vt){return Ae.transporter.write({method:I,path:"1/clusters/mapping/batch",data:{users:We,cluster:st}},vt)}},we=function(Ae){return function(We,st){return f(Ae.transporter.write({method:I,path:T("/1/dictionaries/%s/batch",We),data:{clearExistingDictionaryEntries:!0,requests:{action:"addEntry",body:[]}}},st),function(vt,Ft){return Ye(Ae)(vt.taskID,Ft)})}},Pe=function(Ae){return function(We,st,vt){return f(Ae.transporter.write({method:I,path:T("1/indexes/%s/operation",We),data:{operation:"copy",destination:st}},vt),function(Ft,ur){return ft(Ae)(We,{methods:{waitTask:ci}}).waitTask(Ft.taskID,ur)})}},pe=function(Ae){return function(We,st,vt){return Pe(Ae)(We,st,i(i({},vt),{},{scope:[xa.Rules]}))}},Ce=function(Ae){return function(We,st,vt){return Pe(Ae)(We,st,i(i({},vt),{},{scope:[xa.Settings]}))}},Le=function(Ae){return function(We,st,vt){return Pe(Ae)(We,st,i(i({},vt),{},{scope:[xa.Synonyms]}))}},Oe=function(Ae){return function(We,st){return We.method===O?Ae.transporter.read(We,st):Ae.transporter.write(We,st)}},De=function(Ae){return function(We,st){return f(Ae.transporter.write({method:E,path:T("1/keys/%s",We)},st),function(vt,Ft){return p(function(ur){return rt(Ae)(We,Ft).then(ur).catch(function(mr){if(mr.status!==404)throw mr})})})}},ot=function(Ae){return function(We,st,vt){var Ft=st.map(function(ur){return{action:"deleteEntry",body:{objectID:ur}}});return f(Ae.transporter.write({method:I,path:T("/1/dictionaries/%s/batch",We),data:{clearExistingDictionaryEntries:!1,requests:Ft}},vt),function(ur,mr){return Ye(Ae)(ur.taskID,mr)})}},rt=function(Ae){return function(We,st){return Ae.transporter.read({method:O,path:T("1/keys/%s",We)},st)}},dt=function(Ae){return function(We,st){return Ae.transporter.read({method:O,path:T("1/task/%s",We.toString())},st)}},wt=function(Ae){return function(We){return Ae.transporter.read({method:O,path:"/1/dictionaries/*/settings"},We)}},yt=function(Ae){return function(We){return Ae.transporter.read({method:O,path:"1/logs"},We)}},ge=function(Ae){return function(We){return Ae.transporter.read({method:O,path:"1/clusters/mapping/top"},We)}},Xe=function(Ae){return function(We,st){return Ae.transporter.read({method:O,path:T("1/clusters/mapping/%s",We)},st)}},pt=function(Ae){return function(We){var st=We||{},vt=st.retrieveMappings,Ft=o(st,["retrieveMappings"]);return vt===!0&&(Ft.getClusters=!0),Ae.transporter.read({method:O,path:"1/clusters/mapping/pending"},Ft)}},ft=function(Ae){return function(We){var st=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},vt={transporter:Ae.transporter,appId:Ae.appId,indexName:We};return g(vt,st.methods)}},_t=function(Ae){return function(We){return Ae.transporter.read({method:O,path:"1/keys"},We)}},Pt=function(Ae){return function(We){return Ae.transporter.read({method:O,path:"1/clusters"},We)}},Vt=function(Ae){return function(We){return Ae.transporter.read({method:O,path:"1/indexes"},We)}},qt=function(Ae){return function(We){return Ae.transporter.read({method:O,path:"1/clusters/mapping"},We)}},Zt=function(Ae){return function(We,st,vt){return f(Ae.transporter.write({method:I,path:T("1/indexes/%s/operation",We),data:{operation:"move",destination:st}},vt),function(Ft,ur){return ft(Ae)(We,{methods:{waitTask:ci}}).waitTask(Ft.taskID,ur)})}},ht=function(Ae){return function(We,st){return f(Ae.transporter.write({method:I,path:"1/indexes/*/batch",data:{requests:We}},st),function(vt,Ft){return Promise.all(Object.keys(vt.taskID).map(function(ur){return ft(Ae)(ur,{methods:{waitTask:ci}}).waitTask(vt.taskID[ur],Ft)}))})}},kt=function(Ae){return function(We,st){return Ae.transporter.read({method:I,path:"1/indexes/*/objects",data:{requests:We}},st)}},Ht=function(Ae){return function(We,st){var vt=We.map(function(Ft){return i(i({},Ft),{},{params:W(Ft.params||{})})});return Ae.transporter.read({method:I,path:"1/indexes/*/queries",data:{requests:vt},cacheable:!0},st)}},Gt=function(Ae){return function(We,st){return Promise.all(We.map(function(vt){var Ft=vt.params,ur=Ft.facetName,mr=Ft.facetQuery,Tr=o(Ft,["facetName","facetQuery"]);return ft(Ae)(vt.indexName,{methods:{searchForFacetValues:Gn}}).searchForFacetValues(ur,mr,i(i({},st),Tr))}))}},fr=function(Ae){return function(We,st){var vt=v(st);return vt.queryParameters["X-Algolia-User-ID"]=We,Ae.transporter.write({method:E,path:"1/clusters/mapping"},vt)}},tr=function(Ae){return function(We,st,vt){var Ft=st.map(function(ur){return{action:"addEntry",body:ur}});return f(Ae.transporter.write({method:I,path:T("/1/dictionaries/%s/batch",We),data:{clearExistingDictionaryEntries:!0,requests:Ft}},vt),function(ur,mr){return Ye(Ae)(ur.taskID,mr)})}},_r=function(Ae){return function(We,st){return f(Ae.transporter.write({method:I,path:T("1/keys/%s/restore",We)},st),function(vt,Ft){return p(function(ur){return rt(Ae)(We,Ft).catch(function(mr){if(mr.status!==404)throw mr;return ur()})})})}},Jt=function(Ae){return function(We,st,vt){var Ft=st.map(function(ur){return{action:"addEntry",body:ur}});return f(Ae.transporter.write({method:I,path:T("/1/dictionaries/%s/batch",We),data:{clearExistingDictionaryEntries:!1,requests:Ft}},vt),function(ur,mr){return Ye(Ae)(ur.taskID,mr)})}},Qr=function(Ae){return function(We,st,vt){return Ae.transporter.read({method:I,path:T("/1/dictionaries/%s/search",We),data:{query:st},cacheable:!0},vt)}},He=function(Ae){return function(We,st){return Ae.transporter.read({method:I,path:"1/clusters/mapping/search",data:{query:We}},st)}},Re=function(Ae){return function(We,st){return f(Ae.transporter.write({method:R,path:"/1/dictionaries/*/settings",data:We},st),function(vt,Ft){return Ye(Ae)(vt.taskID,Ft)})}},Fe=function(Ae){return function(We,st){var vt=Object.assign({},st),Ft=st||{},ur=Ft.queryParameters,mr=o(Ft,["queryParameters"]),Tr=ur?{queryParameters:ur}:{},Rr=["acl","indexes","referers","restrictSources","queryParameters","description","maxQueriesPerIPPerHour","maxHitsPerQuery"];return f(Ae.transporter.write({method:R,path:T("1/keys/%s",We),data:Tr},mr),function(Mr,zr){return p(function(xr){return rt(Ae)(We,zr).then(function(Hr){return function(Hn){return Object.keys(vt).filter(function(Wn){return Rr.indexOf(Wn)!==-1}).every(function(Wn){if(Array.isArray(Hn[Wn])&&Array.isArray(vt[Wn])){var ei=Hn[Wn];return ei.length===vt[Wn].length&&ei.every(function(uo,_a){return uo===vt[Wn][_a]})}return Hn[Wn]===vt[Wn]})}(Hr)?Promise.resolve():xr()})})})}},Ye=function(Ae){return function(We,st){return p(function(vt){return dt(Ae)(We,st).then(function(Ft){return Ft.status!=="published"?vt():void 0})})}},at=function(Ae){return function(We,st){return f(Ae.transporter.write({method:I,path:T("1/indexes/%s/batch",Ae.indexName),data:{requests:We}},st),function(vt,Ft){return ci(Ae)(vt.taskID,Ft)})}},Lt=function(Ae){return function(We){return ee(i(i({shouldStop:function(st){return st.cursor===void 0}},We),{},{request:function(st){return Ae.transporter.read({method:I,path:T("1/indexes/%s/browse",Ae.indexName),data:st},We)}}))}},Se=function(Ae){return function(We){var st=i({hitsPerPage:1e3},We);return ee(i(i({shouldStop:function(vt){return vt.hits.length<st.hitsPerPage}},st),{},{request:function(vt){return _i(Ae)("",i(i({},st),vt)).then(function(Ft){return i(i({},Ft),{},{hits:Ft.hits.map(function(ur){return delete ur._highlightResult,ur})})})}}))}},Ze=function(Ae){return function(We){var st=i({hitsPerPage:1e3},We);return ee(i(i({shouldStop:function(vt){return vt.hits.length<st.hitsPerPage}},st),{},{request:function(vt){return Qo(Ae)("",i(i({},st),vt)).then(function(Ft){return i(i({},Ft),{},{hits:Ft.hits.map(function(ur){return delete ur._highlightResult,ur})})})}}))}},ze=function(Ae){return function(We,st,vt){var Ft=vt||{},ur=Ft.batchSize,mr=o(Ft,["batchSize"]),Tr={taskIDs:[],objectIDs:[]};return f(function Rr(){var Mr,zr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,xr=[];for(Mr=zr;Mr<We.length&&(xr.push(We[Mr]),xr.length!==(ur||1e3));Mr++);return xr.length===0?Promise.resolve(Tr):at(Ae)(xr.map(function(Hr){return{action:st,body:Hr}}),mr).then(function(Hr){return Tr.objectIDs=Tr.objectIDs.concat(Hr.objectIDs),Tr.taskIDs.push(Hr.taskID),Mr++,Rr(Mr)})}(),function(Rr,Mr){return Promise.all(Rr.taskIDs.map(function(zr){return ci(Ae)(zr,Mr)}))})}},Je=function(Ae){return function(We){return f(Ae.transporter.write({method:I,path:T("1/indexes/%s/clear",Ae.indexName)},We),function(st,vt){return ci(Ae)(st.taskID,vt)})}},Be=function(Ae){return function(We){var st=We||{},vt=st.forwardToReplicas,Ft=v(o(st,["forwardToReplicas"]));return vt&&(Ft.queryParameters.forwardToReplicas=1),f(Ae.transporter.write({method:I,path:T("1/indexes/%s/rules/clear",Ae.indexName)},Ft),function(ur,mr){return ci(Ae)(ur.taskID,mr)})}},$e=function(Ae){return function(We){var st=We||{},vt=st.forwardToReplicas,Ft=v(o(st,["forwardToReplicas"]));return vt&&(Ft.queryParameters.forwardToReplicas=1),f(Ae.transporter.write({method:I,path:T("1/indexes/%s/synonyms/clear",Ae.indexName)},Ft),function(ur,mr){return ci(Ae)(ur.taskID,mr)})}},ut=function(Ae){return function(We,st){return f(Ae.transporter.write({method:I,path:T("1/indexes/%s/deleteByQuery",Ae.indexName),data:We},st),function(vt,Ft){return ci(Ae)(vt.taskID,Ft)})}},ke=function(Ae){return function(We){return f(Ae.transporter.write({method:E,path:T("1/indexes/%s",Ae.indexName)},We),function(st,vt){return ci(Ae)(st.taskID,vt)})}},Te=function(Ae){return function(We,st){return f(Ee(Ae)([We],st).then(function(vt){return{taskID:vt.taskIDs[0]}}),function(vt,Ft){return ci(Ae)(vt.taskID,Ft)})}},Ee=function(Ae){return function(We,st){var vt=We.map(function(Ft){return{objectID:Ft}});return ze(Ae)(vt,co.DeleteObject,st)}},Ge=function(Ae){return function(We,st){var vt=st||{},Ft=vt.forwardToReplicas,ur=v(o(vt,["forwardToReplicas"]));return Ft&&(ur.queryParameters.forwardToReplicas=1),f(Ae.transporter.write({method:E,path:T("1/indexes/%s/rules/%s",Ae.indexName,We)},ur),function(mr,Tr){return ci(Ae)(mr.taskID,Tr)})}},Qt=function(Ae){return function(We,st){var vt=st||{},Ft=vt.forwardToReplicas,ur=v(o(vt,["forwardToReplicas"]));return Ft&&(ur.queryParameters.forwardToReplicas=1),f(Ae.transporter.write({method:E,path:T("1/indexes/%s/synonyms/%s",Ae.indexName,We)},ur),function(mr,Tr){return ci(Ae)(mr.taskID,Tr)})}},jt=function(Ae){return function(We){return Or(Ae)(We).then(function(){return!0}).catch(function(st){if(st.status!==404)throw st;return!1})}},or=function(Ae){return function(We,st,vt){return Ae.transporter.read({method:I,path:T("1/answers/%s/prediction",Ae.indexName),data:{query:We,queryLanguages:st},cacheable:!0},vt)}},yr=function(Ae){return function(We,st){var vt=st||{},Ft=vt.query,ur=vt.paginate,mr=o(vt,["query","paginate"]),Tr=0;return function Rr(){return Fn(Ae)(Ft||"",i(i({},mr),{},{page:Tr})).then(function(Mr){for(var zr=0,xr=Object.entries(Mr.hits);zr<xr.length;zr++){var Hr=s(xr[zr],2),Hn=Hr[0],Wn=Hr[1];if(We(Wn))return{object:Wn,position:parseInt(Hn,10),page:Tr}}if(Tr++,ur===!1||Tr>=Mr.nbPages)throw{name:"ObjectNotFoundError",message:"Object not found."};return Rr()})}()}},rr=function(Ae){return function(We,st){return Ae.transporter.read({method:O,path:T("1/indexes/%s/%s",Ae.indexName,We)},st)}},br=function(){return function(Ae,We){for(var st=0,vt=Object.entries(Ae.hits);st<vt.length;st++){var Ft=s(vt[st],2),ur=Ft[0];if(Ft[1].objectID===We)return parseInt(ur,10)}return-1}},Wr=function(Ae){return function(We,st){var vt=st||{},Ft=vt.attributesToRetrieve,ur=o(vt,["attributesToRetrieve"]),mr=We.map(function(Tr){return i({indexName:Ae.indexName,objectID:Tr},Ft?{attributesToRetrieve:Ft}:{})});return Ae.transporter.read({method:I,path:"1/indexes/*/objects",data:{requests:mr}},ur)}},Fr=function(Ae){return function(We,st){return Ae.transporter.read({method:O,path:T("1/indexes/%s/rules/%s",Ae.indexName,We)},st)}},Or=function(Ae){return function(We){return Ae.transporter.read({method:O,path:T("1/indexes/%s/settings",Ae.indexName),data:{getVersion:2}},We)}},Ur=function(Ae){return function(We,st){return Ae.transporter.read({method:O,path:T("1/indexes/%s/synonyms/%s",Ae.indexName,We)},st)}},En=function(Ae){return function(We,st){return f(rn(Ae)([We],st).then(function(vt){return{objectID:vt.objectIDs[0],taskID:vt.taskIDs[0]}}),function(vt,Ft){return ci(Ae)(vt.taskID,Ft)})}},rn=function(Ae){return function(We,st){var vt=st||{},Ft=vt.createIfNotExists,ur=o(vt,["createIfNotExists"]),mr=Ft?co.PartialUpdateObject:co.PartialUpdateObjectNoCreate;return ze(Ae)(We,mr,ur)}},Vr=function(Ae){return function(We,st){var vt=st||{},Ft=vt.safe,ur=vt.autoGenerateObjectIDIfNotExist,mr=vt.batchSize,Tr=o(vt,["safe","autoGenerateObjectIDIfNotExist","batchSize"]),Rr=function(Wn,ei,uo,_a){return f(Ae.transporter.write({method:I,path:T("1/indexes/%s/operation",Wn),data:{operation:uo,destination:ei}},_a),function(ho,ds){return ci(Ae)(ho.taskID,ds)})},Mr=Math.random().toString(36).substring(7),zr="".concat(Ae.indexName,"_tmp_").concat(Mr),xr=On({appId:Ae.appId,transporter:Ae.transporter,indexName:zr}),Hr=[],Hn=Rr(Ae.indexName,zr,"copy",i(i({},Tr),{},{scope:["settings","synonyms","rules"]}));return Hr.push(Hn),f((Ft?Hn.wait(Tr):Hn).then(function(){var Wn=xr(We,i(i({},Tr),{},{autoGenerateObjectIDIfNotExist:ur,batchSize:mr}));return Hr.push(Wn),Ft?Wn.wait(Tr):Wn}).then(function(){var Wn=Rr(zr,Ae.indexName,"move",Tr);return Hr.push(Wn),Ft?Wn.wait(Tr):Wn}).then(function(){return Promise.all(Hr)}).then(function(Wn){var ei=s(Wn,3),uo=ei[0],_a=ei[1],ho=ei[2];return{objectIDs:_a.objectIDs,taskIDs:[uo.taskID].concat(l(_a.taskIDs),[ho.taskID])}}),function(Wn,ei){return Promise.all(Hr.map(function(uo){return uo.wait(ei)}))})}},Dr=function(Ae){return function(We,st){return pn(Ae)(We,i(i({},st),{},{clearExistingRules:!0}))}},Kr=function(Ae){return function(We,st){return zi(Ae)(We,i(i({},st),{},{clearExistingSynonyms:!0}))}},Xr=function(Ae){return function(We,st){return f(On(Ae)([We],st).then(function(vt){return{objectID:vt.objectIDs[0],taskID:vt.taskIDs[0]}}),function(vt,Ft){return ci(Ae)(vt.taskID,Ft)})}},On=function(Ae){return function(We,st){var vt=st||{},Ft=vt.autoGenerateObjectIDIfNotExist,ur=o(vt,["autoGenerateObjectIDIfNotExist"]),mr=Ft?co.AddObject:co.UpdateObject;if(mr===co.UpdateObject){var Tr=!0,Rr=!1,Mr=void 0;try{for(var zr,xr=We[Symbol.iterator]();!(Tr=(zr=xr.next()).done);Tr=!0)if(zr.value.objectID===void 0)return f(Promise.reject({name:"MissingObjectIDError",message:"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option."}))}catch(Hr){Rr=!0,Mr=Hr}finally{try{Tr||xr.return==null||xr.return()}finally{if(Rr)throw Mr}}}return ze(Ae)(We,mr,ur)}},$r=function(Ae){return function(We,st){return pn(Ae)([We],st)}},pn=function(Ae){return function(We,st){var vt=st||{},Ft=vt.forwardToReplicas,ur=vt.clearExistingRules,mr=v(o(vt,["forwardToReplicas","clearExistingRules"]));return Ft&&(mr.queryParameters.forwardToReplicas=1),ur&&(mr.queryParameters.clearExistingRules=1),f(Ae.transporter.write({method:I,path:T("1/indexes/%s/rules/batch",Ae.indexName),data:We},mr),function(Tr,Rr){return ci(Ae)(Tr.taskID,Rr)})}},on=function(Ae){return function(We,st){return zi(Ae)([We],st)}},zi=function(Ae){return function(We,st){var vt=st||{},Ft=vt.forwardToReplicas,ur=vt.clearExistingSynonyms,mr=vt.replaceExistingSynonyms,Tr=v(o(vt,["forwardToReplicas","clearExistingSynonyms","replaceExistingSynonyms"]));return Ft&&(Tr.queryParameters.forwardToReplicas=1),(mr||ur)&&(Tr.queryParameters.replaceExistingSynonyms=1),f(Ae.transporter.write({method:I,path:T("1/indexes/%s/synonyms/batch",Ae.indexName),data:We},Tr),function(Rr,Mr){return ci(Ae)(Rr.taskID,Mr)})}},Fn=function(Ae){return function(We,st){return Ae.transporter.read({method:I,path:T("1/indexes/%s/query",Ae.indexName),data:{query:We},cacheable:!0},st)}},Gn=function(Ae){return function(We,st,vt){return Ae.transporter.read({method:I,path:T("1/indexes/%s/facets/%s/query",Ae.indexName,We),data:{facetQuery:st},cacheable:!0},vt)}},_i=function(Ae){return function(We,st){return Ae.transporter.read({method:I,path:T("1/indexes/%s/rules/search",Ae.indexName),data:{query:We}},st)}},Qo=function(Ae){return function(We,st){return Ae.transporter.read({method:I,path:T("1/indexes/%s/synonyms/search",Ae.indexName),data:{query:We}},st)}},vi=function(Ae){return function(We,st){var vt=st||{},Ft=vt.forwardToReplicas,ur=v(o(vt,["forwardToReplicas"]));return Ft&&(ur.queryParameters.forwardToReplicas=1),f(Ae.transporter.write({method:R,path:T("1/indexes/%s/settings",Ae.indexName),data:We},ur),function(mr,Tr){return ci(Ae)(mr.taskID,Tr)})}},ci=function(Ae){return function(We,st){return p(function(vt){return function(Ft){return function(ur,mr){return Ft.transporter.read({method:O,path:T("1/indexes/%s/task/%s",Ft.indexName,ur.toString())},mr)}}(Ae)(We,st).then(function(Ft){return Ft.status!=="published"?vt():void 0})})}},co={AddObject:"addObject",UpdateObject:"updateObject",PartialUpdateObject:"partialUpdateObject",PartialUpdateObjectNoCreate:"partialUpdateObjectNoCreate",DeleteObject:"deleteObject",DeleteIndex:"delete",ClearIndex:"clear"},xa={Settings:"settings",Synonyms:"synonyms",Rules:"rules"},qi=1,Vo=2,xs=3,ui=function(Ae){return function(We,st){var vt=We.map(function(Ft){return i(i({},Ft),{},{threshold:Ft.threshold||0})});return Ae.transporter.read({method:I,path:"1/indexes/*/recommendations",data:{requests:vt},cacheable:!0},st)}},bi=function(Ae){return function(We,st){return ui(Ae)(We.map(function(vt){return i(i({},vt),{},{fallbackParameters:{},model:"bought-together"})}),st)}},Jo=function(Ae){return function(We,st){return ui(Ae)(We.map(function(vt){return i(i({},vt),{},{model:"related-products"})}),st)}},se=function(Ae){return function(We,st){var vt=We.map(function(Ft){return i(i({},Ft),{},{model:"trending-facets",threshold:Ft.threshold||0})});return Ae.transporter.read({method:I,path:"1/indexes/*/recommendations",data:{requests:vt},cacheable:!0},st)}},Ve=function(Ae){return function(We,st){var vt=We.map(function(Ft){return i(i({},Ft),{},{model:"trending-items",threshold:Ft.threshold||0})});return Ae.transporter.read({method:I,path:"1/indexes/*/recommendations",data:{requests:vt},cacheable:!0},st)}},_e=function(Ae){return function(We,st){return ui(Ae)(We.map(function(vt){return i(i({},vt),{},{model:"looking-similar"})}),st)}},qe=function(Ae){return function(We,st){var vt=We.map(function(Ft){return i(i({},Ft),{},{model:"recommended-for-you",threshold:Ft.threshold||0})});return Ae.transporter.read({method:I,path:"1/indexes/*/recommendations",data:{requests:vt},cacheable:!0},st)}};function ct(Ae,We,st){var vt,Ft={appId:Ae,apiKey:We,timeouts:{connect:1,read:2,write:30},requester:{send:function(Tr){return new Promise(function(Rr){var Mr=new XMLHttpRequest;Mr.open(Tr.method,Tr.url,!0),Object.keys(Tr.headers).forEach(function(Hn){return Mr.setRequestHeader(Hn,Tr.headers[Hn])});var zr,xr=function(Hn,Wn){return setTimeout(function(){Mr.abort(),Rr({status:0,content:Wn,isTimedOut:!0})},1e3*Hn)},Hr=xr(Tr.connectTimeout,"Connection timeout");Mr.onreadystatechange=function(){Mr.readyState>Mr.OPENED&&zr===void 0&&(clearTimeout(Hr),zr=xr(Tr.responseTimeout,"Socket timeout"))},Mr.onerror=function(){Mr.status===0&&(clearTimeout(Hr),clearTimeout(zr),Rr({content:Mr.responseText||"Network request failed",status:Mr.status,isTimedOut:!1}))},Mr.onload=function(){clearTimeout(Hr),clearTimeout(zr),Rr({content:Mr.responseText,status:Mr.status,isTimedOut:!1})},Mr.send(Tr.data)})}},logger:(vt=xs,{debug:function(Tr,Rr){return qi>=vt&&console.debug(Tr,Rr),Promise.resolve()},info:function(Tr,Rr){return Vo>=vt&&console.info(Tr,Rr),Promise.resolve()},error:function(Tr,Rr){return console.error(Tr,Rr),Promise.resolve()}}),responsesCache:d(),requestsCache:d({serializable:!1}),hostsCache:u({caches:[c({key:"".concat("4.23.2","-").concat(Ae)}),d()]}),userAgent:N("4.23.2").add({segment:"Browser"})},ur=i(i({},Ft),st),mr=function(){return function(Tr){return function(Rr){var Mr=Rr.region||"us",zr=h(y.WithinHeaders,Rr.appId,Rr.apiKey),xr=j(i(i({hosts:[{url:"personalization.".concat(Mr,".algolia.com")}]},Rr),{},{headers:i(i(i({},zr.headers()),{"content-type":"application/json"}),Rr.headers),queryParameters:i(i({},zr.queryParameters()),Rr.queryParameters)}));return g({appId:Rr.appId,transporter:xr},Rr.methods)}(i(i(i({},Ft),Tr),{},{methods:{getPersonalizationStrategy:ne,setPersonalizationStrategy:le}}))}};return function(Tr){var Rr=Tr.appId,Mr=h(Tr.authMode!==void 0?Tr.authMode:y.WithinHeaders,Rr,Tr.apiKey),zr=j(i(i({hosts:[{url:"".concat(Rr,"-dsn.algolia.net"),accept:Q.Read},{url:"".concat(Rr,".algolia.net"),accept:Q.Write}].concat(m([{url:"".concat(Rr,"-1.algolianet.com")},{url:"".concat(Rr,"-2.algolianet.com")},{url:"".concat(Rr,"-3.algolianet.com")}]))},Tr),{},{headers:i(i(i({},Mr.headers()),{"content-type":"application/x-www-form-urlencoded"}),Tr.headers),queryParameters:i(i({},Mr.queryParameters()),Tr.queryParameters)}));return g({transporter:zr,appId:Rr,addAlgoliaAgent:function(xr,Hr){zr.userAgent.add({segment:xr,version:Hr})},clearCache:function(){return Promise.all([zr.requestsCache.clear(),zr.responsesCache.clear()]).then(function(){})}},Tr.methods)}(i(i({},ur),{},{methods:{search:Ht,searchForFacetValues:Gt,multipleBatch:ht,multipleGetObjects:kt,multipleQueries:Ht,copyIndex:Pe,copySettings:Ce,copySynonyms:Le,copyRules:pe,moveIndex:Zt,listIndices:Vt,getLogs:yt,listClusters:Pt,multipleSearchForFacetValues:Gt,getApiKey:rt,addApiKey:oe,listApiKeys:_t,updateApiKey:Fe,deleteApiKey:De,restoreApiKey:_r,assignUserID:ie,assignUserIDs:he,getUserID:Xe,searchUserIDs:He,listUserIDs:qt,getTopUserIDs:ge,removeUserID:fr,hasPendingMappings:pt,clearDictionaryEntries:we,deleteDictionaryEntries:ot,getDictionarySettings:wt,getAppTask:dt,replaceDictionaryEntries:tr,saveDictionaryEntries:Jt,searchDictionaryEntries:Qr,setDictionarySettings:Re,waitAppTask:Ye,customRequest:Oe,initIndex:function(Tr){return function(Rr){return ft(Tr)(Rr,{methods:{batch:at,delete:ke,findAnswers:or,getObject:rr,getObjects:Wr,saveObject:Xr,saveObjects:On,search:Fn,searchForFacetValues:Gn,waitTask:ci,setSettings:vi,getSettings:Or,partialUpdateObject:En,partialUpdateObjects:rn,deleteObject:Te,deleteObjects:Ee,deleteBy:ut,clearObjects:Je,browseObjects:Lt,getObjectPosition:br,findObject:yr,exists:jt,saveSynonym:on,saveSynonyms:zi,getSynonym:Ur,searchSynonyms:Qo,browseSynonyms:Ze,deleteSynonym:Qt,clearSynonyms:$e,replaceAllObjects:Vr,replaceAllSynonyms:Kr,searchRules:_i,getRule:Fr,deleteRule:Ge,saveRule:$r,saveRules:pn,replaceAllRules:Dr,browseRules:Se,clearRules:Be}})}},initAnalytics:function(){return function(Tr){return function(Rr){var Mr=Rr.region||"us",zr=h(y.WithinHeaders,Rr.appId,Rr.apiKey),xr=j(i(i({hosts:[{url:"analytics.".concat(Mr,".algolia.com")}]},Rr),{},{headers:i(i(i({},zr.headers()),{"content-type":"application/json"}),Rr.headers),queryParameters:i(i({},zr.queryParameters()),Rr.queryParameters)}));return g({appId:Rr.appId,transporter:xr},Rr.methods)}(i(i(i({},Ft),Tr),{},{methods:{addABTest:$,getABTest:ce,getABTests:Qe,stopABTest:me,deleteABTest:te}}))}},initPersonalization:mr,initRecommendation:function(){return function(Tr){return ur.logger.info("The `initRecommendation` method is deprecated. Use `initPersonalization` instead."),mr()(Tr)}},getRecommendations:ui,getFrequentlyBoughtTogether:bi,getLookingSimilar:_e,getRecommendedForYou:qe,getRelatedProducts:Jo,getTrendingFacets:se,getTrendingItems:Ve}}))}return ct.version="4.23.2",ct})})(Cwe);var RGt=Cwe.exports;const NGt=nIt(RGt);let Mwe=class{constructor(t,r,n="https://api.pennsieve.io"){this.client=NGt(t,r),this.PENNSIEVE_API_LOCATION=n,this.anatomyFacetLabels=[]}initIndex(t){this.index=this.client.initIndex(t)}getAlgoliaFacets(t){const r=t.map(s=>s.facetPropPath),n=t.map(s=>s.facetSubpropPath);let i=[],o=0;return this.index.search("",{sortFacetValuesBy:"alpha",facets:r.concat(n)}).then(s=>(r.map(l=>{const c=t.find(f=>f.facetPropPath==l);var u=[];const d=s.facets;if(d===void 0)return;const h=d[l]==null?{}:d[l],p=c&&d[c.facetSubpropPath]?Object.keys(d[c.facetSubpropPath]):[];Object.keys(h).map(f=>{const m=p.reduce((T,y)=>{const v=y.split(".");return v.length!==2||f===v[0]&&T.push({label:v[1],id:o++,facetPropPath:`${c?c.facetSubpropPath:void 0}`}),T},[]);let g={label:f,id:o++,facetPropPath:l};m.length>0&&(g.children=m),u.push(g)}),u.length>0&&i.push({label:c?c.label:"",id:o++,children:u,key:l})}),i))}_discoverAllDois(t,r="https://api.pennsieve.io"){return new Promise(n=>{fetch(`${r}/discover/datasets/${t}/versions`).then(i=>i.json()).then(i=>{n(i.map(o=>o.doi))})})}_expandDois(t,r="https://api.pennsieve.io"){return new Promise(n=>{let i=t.map(o=>this._discoverAllDois(o,r));Promise.all(i).then(o=>{n(o.flat())})})}_processResultsForCards(t){let r=[],n={};for(let i of t)n={...i},n={anatomy:i.anatomy?i.anatomy.organ.map(o=>o.curie):void 0,doi:i.item.curie.split(":")[1],name:i.item.name,description:i.item.description,updated:i.pennsieve?i.pennsieve.updatedAt:void 0,publishDate:i.pennsieve?i.pennsieve.publishDate:void 0,datasetId:i.objectID,detailsReady:!1},r.push(n);return r}_processAnatomy(t){let r=[],n=[],i=[],o=[];return t.forEach(s=>{s.item&&s.item.keywords&&s.item.keywords.forEach(l=>{let c=l.keyword.toUpperCase();(c.includes("UBERON")||c.includes("ILX"))&&r.push(this._processUberonURL(c))}),s.anatomy&&s.anatomy.organ&&s.anatomy.organ.forEach(l=>{l.curie&&(r.push(l.curie),n.push(l.name))})}),o=[...new Set(r)],i=[...new Set(n)],this.anatomyFacetLabels=i,o}_processUberonURL(t){return t.split("/").pop().replace("_",":")}search(t,r="",n=10,i=1){return new Promise(o=>{this.index.search(r,{facets:["*"],hitsPerPage:n,page:i-1,filters:t,attributesToHighlight:[],attributesToRetrieve:["pennsieve.publishDate","pennsieve.updatedAt","item.curie","item.name","item.description","objectID","anatomy.organ.curie"]}).then(s=>{let l={items:this._processResultsForCards(s.hits),total:s.nbHits,discoverIds:s.hits.map(c=>c.pennsieve?c.pennsieve.identifier:c.objectID),dois:s.hits.map(c=>c.item.curie.split(":")[1])};o(l)})})}anatomyInSearch(t,r="",n=999999,i=1){return new Promise(o=>{this.index.search(r,{facets:["*"],hitsPerPage:n,page:i-1,filters:t,attributesToHighlight:[],attributesToRetrieve:["objectID","item.keywords.keyword","anatomy.organ.name","anatomy.organ.curie"]}).then(s=>{o({forFlatmap:this.processResultsForFlatmap(s.hits),forScaffold:this.processResultsForScaffold(s.hits)})})})}processResultsForFlatmap(t){return t.map(r=>({id:r.objectID,terms:r.anatomy?r.anatomy.organ.map(n=>n.curie):[]}))}processResultsForScaffold(t){let r={};return t.forEach(n=>{n.anatomy&&n.anatomy.organ&&n.anatomy.organ.forEach(i=>{i.name&&(r[i.name]?r[i.name]++:r[i.name]=1)})}),r}};const jte=[{label:"Data Type",id:"item.types",facetPropPath:"item.types.name",facetSubpropPath:"item.types.subcategory.name"},{label:"Anatomical Structure",id:"anatomy.organ.category",facetPropPath:"anatomy.organ.category.name",facetSubpropPath:"anatomy.organ.subcategory.name",facetFilterPath:"anatomy.organ.name"},{label:"Species",id:"organisms.primary.species",facetPropPath:"organisms.primary.species.name",facetSubpropPath:"organisms.primary.species.subcategory.name"},{label:"Experimental Approach",id:"item.modalities",facetPropPath:"item.modalities.keyword",facetSubpropPath:"item.modalities.subcategory.name"},{label:"Sex",id:"attributes.subject.sex",facetPropPath:"attributes.subject.sex.value",facetSubpropPath:"attributes.subject.sex.subcategory.name"},{label:"Age Categories",id:"attributes.subject.ageCategory",facetPropPath:"attributes.subject.ageCategory.value",facetSubpropPath:"attributes.subject.ageCategory.subcategory.name"}];function Ewe(e=void 0){if(e===void 0)return"NOT item.published.status:embargo";e.forEach(n=>n.label=n.facet);let t=BGt(e),r="NOT item.published.status:embargo";return r=`(${r}) AND `,jte.map(n=>n.facetPropPath).map(n=>{let i=t.filter(l=>l.facetPropPath==n),o="",s="";i.map(l=>{let c=l.facetSubPropPath?l.facetSubPropPath:n;l.AND?s+=`AND "${c}":"${l.label}"`:o+=`"${c}":"${l.label}" OR `}),!(o==""&&s=="")&&(o=`(${o.substring(0,o.lastIndexOf(" OR "))})`,r+=`${o+s} AND `,r=r.split("()AND ").join(""))}),r.substring(0,r.lastIndexOf(" AND "))}function BGt(e){return e.filter(t=>t.label!=="Show all")}const TN=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},Ute=function(e){const t=e.toLowerCase();return yN[t]?TN(yN[t]):TN(t)},FGt={name:"SearchFilters",components:{MapSvgIcon:CGt,MapSvgSpriteColor:HGt,Option:LR,Select:Sk,Popover:Cee,Cascader:Pbe},props:{entry:Object,envVars:{type:Object,default:()=>{}}},data:function(){return{cascaderIsReady:!1,previousShowAllChecked:{species:!1,gender:!1,organ:!1,datasets:!1},showFilters:!0,showFiltersText:!0,cascadeSelected:[],cascadeSelectedWithBoolean:[],numberShown:10,filters:[],facets:["Species","Gender","Organ","Datasets"],numberDatasetsShown:["10","20","50"],props:{multiple:!0},options:[{value:"Species",label:"Species",children:[{}]}],presentTags:[]}},setup(){const e=a.markRaw({}),t=a.markRaw({term:new Set,facet:new Set,facet2:new Set});return{cascaderTags:e,correctnessCheck:t}},computed:{numberOfResultsText:function(){return`${this.entry.numberOfHits} results | Showing`}},methods:{createCascaderItemValue:function(e,t=void 0,r=void 0){let n=e;return t&&(n=`${e}>${t}`),t&&r&&(n=`${e}>${t}>${r}`),!t&&r&&console.warn(`Warning: ${r} provided without its parent, this will not be shown in the cascader`),n},populateCascader:function(){return new Promise(e=>{this.algoliaClient.getAlgoliaFacets(jte).then(t=>{this.facets=t,Lc.emit("available-facets",t),this.options=t,this.options.forEach((r,n)=>{this.options[n].total=this.countTotalFacet(r),this.options[n].label=Ute(r.label),this.options[n].value=this.createCascaderItemValue(r.key,void 0),this.options[n].children.unshift({value:this.createCascaderItemValue("Show all"),label:"Show all"}),this.options[n].children.forEach((i,o)=>{this.options[n].children[o].label=Ute(i.label),this.options[n].children[o].value=this.createCascaderItemValue(r.label,i.label),this.options[n].children[o].children&&this.options[n].children[o].children.length>0&&this.options[n].children[o].children.forEach((s,l)=>{this.options[n].children[o].children[l].label=Ute(s.label),this.options[n].children[o].children[l].value=this.createCascaderItemValue(r.label,i.label,s.label)})})})}).finally(()=>{e()})})},cascadeTagClose:function(e){let t=[];Object.entries(this.cascaderTags).map(r=>{const n=r[0],i=r[1],o=this.options.filter(l=>l.label==n)[0],s=o.key;for(let l=0;l<o.children.length;l++){const c=o.children[l],u=c.label,d=c.value;if(Array.isArray(i))if(i.length===0&&u.toLowerCase()==="show all"){t.push([s,d]);break}else u!==e&&i.includes(u)&&t.push([s,d]);else Object.entries(i).map(h=>{const p=h[0],f=h[1];p===u&&c.children.map(m=>{const g=m.label,T=m.value;g!==e&&f.includes(g)&&t.push([s,T])})})}}),this.cascadeEvent(t)},tagsChangedCallback:function(e){this.correctnessCheck.term&&this.correctnessCheck.facet&&this.correctnessCheck.facet2&&this.options.map(t=>{this.correctnessCheck.term.add(t.label),t.children.map(r=>{this.correctnessCheck.facet.add(r.label),t.label==="Anatomical structure"&&r.label!=="Show all"&&r.children.map(n=>{this.correctnessCheck.facet2.add(n.label)})})}),this.cascaderTags={},this.presentTags=[],e.map(t=>{const{facet:r,facet2:n,term:i}=t;this.correctnessCheck.term.has(i)&&this.correctnessCheck.facet.has(r)&&(n?this.correctnessCheck.facet2.has(n)&&(i in this.cascaderTags?r in this.cascaderTags[i]?this.cascaderTags[i][r].push(n):this.cascaderTags[i][r]=[n]:(this.cascaderTags[i]={},this.cascaderTags[i][r]=[n])):i in this.cascaderTags&&i!=="Anatomical structure"?this.cascaderTags[i].push(r):r.toLowerCase()!=="show all"?this.cascaderTags[i]=[r]:this.cascaderTags[i]=[])}),Object.values(this.cascaderTags).map(t=>{const r=Array.isArray(t)?t:Object.values(t).flat(1);this.presentTags=[...this.presentTags,...r]}),this.presentTags=[...new Set(this.presentTags)],this.presentTags.length>0?this.showFiltersText=!1:this.showFiltersText=!0},countTotalFacet:function(e){return["anatomy.organ.category.name"].includes(e.key)?e.children.reduce((t,r)=>(t=typeof t=="number"?t:t.children.length,t+r.children.length)):e.children.length},showAllEventModifierForAutoCheckAll:function(e){const t={};return e.map(r=>{const n=r[0];n in t?t[n]+=1:t[n]=1}),this.options.map(r=>{const n=r.key,i=r.children.filter(s=>s.label==="Show all")[0].value,o=r.total;t[n]===o&&(e=e.filter(s=>s[0]!==r.key),delete t[n]),n in t||e.unshift([n,i])}),e},cascadeEvent:function(e){let t=[...e];if(t){if(t=this.showAllEventModifier(t),t=this.showAllEventModifierForAutoCheckAll(t),this.__expandItem__){let i=0;this.__expandItem__.length>1&&(i=1);const o=t.filter(l=>l[i]==this.__expandItem__[i]),s=t.filter(l=>l[i]!==this.__expandItem__[i]);t=[...o,...s]}let r=t.filter(i=>i!==void 0).map(i=>{let{hString:o,bString:s}=this.findHierarachyStringAndBooleanString(i),{facet:l,facet2:c,term:u}=this.getFacetsFromHierarchyString(o);return{facetPropPath:i[0],facet:l,facet2:c,term:u,AND:s}}),n=t.filter(i=>i!==void 0).map(i=>{let o,s=i[0].includes("duplicate")?i[0].split("duplicate")[0]:i[0],{hString:l,bString:c}=this.findHierarachyStringAndBooleanString(i),{facet:u,facet2:d,term:h}=this.getFacetsFromHierarchyString(l);return d&&(u=d,o="anatomy.organ.name"),{facetPropPath:s,facet:u,term:h,AND:c,facetSubPropPath:o}});this.$emit("loading",!0),this.$emit("filterResults",n),this.setCascader(r),this.cssMods()}},findHierarachyStringAndBooleanString(e){let t,r;return e.length>=3?e[2]&&(typeof e[2]=="string"||e[2]instanceof String)&&e[2].split(">").length>2?(t=e[2],r=e.length==4?e[3]:void 0):(t=e[1],r=e[2]):(t=e[1],r=void 0),{hString:t,bString:r}},getFacetsFromHierarchyString(e){let t,r,n,i=e.split(">");return i.length==3?(n=i[2],t=i[1],r=i[0]):(t=i[1],r=i[0]),{facet:t,facet2:n,term:r}},showAllEventModifier:function(e){if(e.map(t=>t?t[1].toLowerCase().includes("show all"):!1).includes(!0)){let t=[],r={};for(const n in e)r[e[n][0]]===void 0&&(r[e[n][0]]=[]),r[e[n][0]].push(e[n]);for(const n in r){let i;for(let o=r[n].length-1;o>=0;o--)if(r[n][o][1].toLowerCase().includes("show all")){i=r[n].splice(o,1)[0];break}i?this.previousShowAllChecked[n]&&r[n].length>0?t.push(...r[n]):t.push(i):t.push(...r[n])}return t.sort((n,i)=>this.__expandItem__?n[0]==this.__expandItem__?i[0]==this.__expandItem__?0:-1:i[0]==this.__expandItem__?n[0]==this.__expandItem__?0:1:0:0)}return e},cascadeExpandChange:function(e){this.__expandItem__=e,this.cssMods()},numberShownChanged:function(e){this.$emit("numberPerPage",parseInt(e))},updatePreviousShowAllChecked:function(e){for(const t in this.previousShowAllChecked)this.previousShowAllChecked[t]=!1;e.forEach(t=>{t[1].toLowerCase().includes("show all")&&(this.previousShowAllChecked[t[0]]=!0)})},setCascader:function(e){if(this.cascaderIsReady&&e&&e.length!=0){const t=r=>{let n=[r.facetPropPath,this.createCascaderItemValue(TN(r.term),r.facet)];return r.facet2&&n.push(this.createCascaderItemValue(TN(r.term),r.facet,r.facet2)),n};this.cascadeSelected=e.map(r=>t(r)),this.cascadeSelectedWithBoolean=e.map(r=>{let n=t(r);return n.push(r.AND),n}),this.updatePreviousShowAllChecked(this.cascadeSelected)}this.tagsChangedCallback(e)},addFilter:function(e){if(this.cascaderIsReady&&e){let t=this.validateAndConvertFilterToHierarchical(e);if(t)return this.cascadeSelected.filter(r=>r.term!=t.term),this.cascadeSelected.push([t.facetPropPath,this.createCascaderItemValue(t.term,t.facet),this.createCascaderItemValue(t.term,t.facet,t.facet2)]),this.cascadeSelectedWithBoolean.push([t.facetPropPath,this.createCascaderItemValue(t.term,t.facet),this.createCascaderItemValue(t.term,t.facet,t.facet2),t.AND]),!0}},initiateSearch:function(){this.cascadeEvent(this.cascadeSelectedWithBoolean)},checkShowAllBoxes:function(){this.setCascader(this.options.map(e=>({facetPropPath:e.value,term:e.label,facet:"Show all"})))},makeCascadeLabelsClickable:function(){this.$nextTick(()=>{document.querySelectorAll(".sidebar-cascader-popper .el-cascader-node__label").forEach(e=>{e.onclick=function(){const t=this.previousElementSibling;t&&(t.parentElement.attributes["aria-owns"]||this.previousElementSibling.click())}})})},cssMods:function(){this.makeCascadeLabelsClickable(),this.removeTopLevelCascaderCheckboxes()},removeTopLevelCascaderCheckboxes:function(){this.$nextTick(()=>{document.querySelectorAll(".sidebar-cascader-popper .el-cascader-menu__list")[0].querySelectorAll(".el-checkbox__input").forEach(e=>e.style.display="none")})},validateAndConvertFilterToHierarchical:function(e){if(e&&e.facet&&e.term){if(e.facet2)return e;for(const t of this.options)if(t.value===e.facetPropPath)for(const r of t.children){if(r.label===e.facet)return e;if(r.children&&r.children.length>0){for(const n of r.children)if(n.label===e.facet)return e.facet2=n.label,e.facet=r.label,e}}}return!1},getHierarchicalValidatedFilters:function(e){if(e)if(this.cascaderIsReady){const t=[];return e.forEach(r=>{const n=this.validateAndConvertFilterToHierarchical(r);n&&t.push(n)}),t}else return e;return[]}},mounted:function(){this.algoliaClient=new Mwe(this.envVars.ALGOLIA_ID,this.envVars.ALGOLIA_KEY,this.envVars.PENNSIEVE_API_LOCATION),this.algoliaClient.initIndex(this.envVars.ALGOLIA_INDEX),this.populateCascader().then(()=>{this.cascaderIsReady=!0,this.checkShowAllBoxes(),this.setCascader(this.entry.filterFacets),this.cssMods(),this.$emit("cascaderReady")})}},DGt=e=>(a.pushScopeId("data-v-307e97be"),e=e(),a.popScopeId(),e),zGt={class:"filters"},jGt={key:0,class:"cascader-tag"},UGt={class:"el-tags-container"},GGt={class:"el-tags-container"},WGt={class:"search-filters transition-box"},qGt={key:0,class:"filter-default-value"},ZGt=DGt(()=>a.createElementVNode("div",null,[a.createElementVNode("strong",null,"Within categories:"),a.createTextVNode(" OR "),a.createElementVNode("br"),a.createTextVNode(" example: 'heart' OR 'colon' "),a.createElementVNode("br"),a.createElementVNode("br"),a.createElementVNode("strong",null,"Between categories:"),a.createTextVNode(" AND "),a.createElementVNode("br"),a.createTextVNode(" example: 'rat' AND 'lung' ")],-1)),XGt={class:"dataset-shown"},KGt={class:"dataset-results-feedback"};function YGt(e,t,r,n,i,o){const s=a.resolveComponent("MapSvgSpriteColor"),l=Bb,c=Cee,u=Pbe,d=a.resolveComponent("MapSvgIcon"),h=LR,p=Sk,f=CR;return a.openBlock(),a.createElementBlock("div",zGt,[a.createVNode(s),e.presentTags.length>0?(a.openBlock(),a.createElementBlock("div",jGt,[a.createVNode(l,{class:"ml-2",type:"info",closable:"",onClose:t[0]||(t[0]=m=>o.cascadeTagClose(e.presentTags[0]))},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(e.presentTags[0]),1)]),_:1}),e.presentTags.length>1?(a.openBlock(),a.createBlock(c,{key:0,placement:"bottom-start",width:200,trigger:"hover"},{default:a.withCtx(()=>[a.createElementVNode("div",UGt,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.presentTags.slice(1),(m,g)=>(a.openBlock(),a.createBlock(l,{key:g,class:"ml-2",type:"info",closable:"",onClose:T=>o.cascadeTagClose(m)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(m),1)]),_:2},1032,["onClose"]))),128))])]),reference:a.withCtx(()=>[a.createElementVNode("div",GGt,[e.presentTags.length>1?(a.openBlock(),a.createBlock(l,{key:0,class:"ml-2",type:"info"},{default:a.withCtx(()=>[a.createTextVNode(" +"+a.toDisplayString(e.presentTags.length-1),1)]),_:1})):a.createCommentVNode("",!0)])]),_:1})):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),a.createVNode(a.Transition,{name:"el-zoom-in-top"},{default:a.withCtx(()=>[a.withDirectives((a.openBlock(),a.createElementBlock("span",WGt,[a.createVNode(u,{class:"cascader",ref:"cascader",modelValue:e.cascadeSelected,"onUpdate:modelValue":t[1]||(t[1]=m=>e.cascadeSelected=m),size:"large",placeholder:" ","collapse-tags":!0,"collapse-tags-tooltip":"",options:e.options,props:e.props,onChange:t[2]||(t[2]=m=>o.cascadeEvent(m)),onExpandChange:o.cascadeExpandChange,"show-all-levels":!0,"popper-class":"sidebar-cascader-popper"},null,8,["modelValue","options","props","onExpandChange"]),e.showFiltersText?(a.openBlock(),a.createElementBlock("div",qGt,"Filters")):a.createCommentVNode("",!0),a.createVNode(c,{title:"How do filters work?",width:"250",trigger:"hover","append-to-body":!1,"popper-class":"popover"},{reference:a.withCtx(()=>[a.createVNode(d,{icon:"help",class:"help"})]),default:a.withCtx(()=>[ZGt]),_:1})])),[[a.vShow,e.showFilters],[f,!e.cascaderIsReady]])]),_:1}),a.createElementVNode("div",XGt,[a.createElementVNode("span",KGt,a.toDisplayString(o.numberOfResultsText),1),a.createVNode(p,{class:"number-shown-select",modelValue:e.numberShown,"onUpdate:modelValue":t[3]||(t[3]=m=>e.numberShown=m),placeholder:"10",onChange:t[4]||(t[4]=m=>o.numberShownChanged(m))},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.numberDatasetsShown,m=>(a.openBlock(),a.createBlock(h,{key:m,label:m,value:m},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])])}const Awe=W3(FGt,[["render",YGt],["__scopeId","data-v-307e97be"]]);var JGt=async function(e){if(!e.ok){let t=await e.json();throw t?new Error(t.message):new Error(e)}return e},$Gt={searchInput:"",lastSearch:"",results:[],numberOfHits:0,filter:[],loadingCards:!1,numberPerPage:10,page:1,pageModel:1,start:0,hasSearched:!1,contextCardEnabled:!1};const eWt={components:{SearchFilters:Awe,DatasetCard:z_e,SearchHistory:U_e,Button:np,Card:vbe,Drawer:wee,Icon:ms,Input:wk,Pagination:Ube},name:"SideBarContent",props:{visible:{type:Boolean,default:!1},isDrawer:{type:Boolean,default:!0},entry:{type:Object,default:()=>$Gt},envVars:{type:Object,default:()=>{}}},data:function(){return{...this.entry,bodyStyle:{flex:"1 1 auto","flex-flow":"column",display:"flex"},cascaderIsReady:!1}},computed:{filterEntry:function(){return{numberOfHits:this.numberOfHits,filterFacets:this.filter}}},methods:{hoverChanged:function(e){this.$emit("hover-changed",e)},resetSearch:function(){this.numberOfHits=0,this.discoverIds=[],this._dois=[],this.results=[],this.loadingCards=!1},openSearch:function(e,t=""){this.searchInput=t,this.resetPageNavigation(),this.cascaderIsReady?(this.filter=this.$refs.filtersRef.getHierarchicalValidatedFilters(e),e&&e.length>0&&this.filter&&this.filter.length===0?(this.$refs.filtersRef.checkShowAllBoxes(),this.resetSearch()):this.filter&&(this.searchAlgolia(this.filter,t),this.$refs.filtersRef.setCascader(this.filter))):(this.filter=e,(!e||e.length==0)&&this.searchAlgolia(this.filter,t))},addFilter:function(e){this.cascaderIsReady?(this.resetPageNavigation(),e&&this.$refs.filtersRef.addFilter(e)&&this.$refs.filtersRef.initiateSearch()):Array.isArray(this.filter)?this.filter.push(e):this.filter=[e]},cascaderReady:function(){this.cascaderIsReady=!0,this.openSearch(this.filter,this.searchInput)},clearSearchClicked:function(){this.searchInput="",this.resetPageNavigation(),this.searchAlgolia(this.filters,this.searchInput),this.$refs.searchHistory.selectValue="Full search history"},searchEvent:function(e=!1){(e.keyCode===13||e instanceof MouseEvent)&&(this.resetPageNavigation(),this.searchAlgolia(this.filters,this.searchInput),this.$refs.searchHistory.selectValue="Full search history",this.$refs.searchHistory.addSearchToHistory(this.filters,this.searchInput))},filterUpdate:function(e){this.filters=[...e],this.resetPageNavigation(),this.searchAlgolia(e,this.searchInput),this.$emit("search-changed",{value:e,type:"filter-update"})},searchAlgolia(e,t=""){this.loadingCards=!0,this.algoliaClient.anatomyInSearch(Ewe(e),t).then(r=>{Lc.emit("anatomy-in-datasets",r.forFlatmap),Lc.emit("number-of-datasets-for-anatomies",r.forScaffold)}),this.algoliaClient.search(Ewe(e),t,this.numberPerPage,this.page).then(r=>{this.numberOfHits=r.total,this.discoverIds=r.discoverIds,this._dois=r.dois,this.results=r.items,this.loadingCards=!1,this.scrollToTop(),this.$emit("search-changed",{value:this.searchInput,type:"query-update"}),this._abortController&&this._abortController.abort(),this._abortController=new AbortController;const n=this._abortController.signal;this.perItemSearch(n,{count:0})})},filtersLoading:function(e){this.loadingCards=e},numberPerPageUpdate:function(e){this.numberPerPage=e,this.pageChange(1)},pageChange:function(e){this.start=(e-1)*this.numberPerPage,this.page=e,this.searchAlgolia(this.filters,this.searchInput,this.numberPerPage,this.page)},handleMissingData:function(e){let t=this.results.findIndex(r=>r.doi===e);this.results[t]&&(this.results[t].detailsReady=!0)},perItemSearch:function(e,t){if(10>t.count){const r=this._dois.shift();r&&(t.count++,this.callSciCrunch(this.envVars.API_LOCATION,{dois:[r]},e).then(n=>{n.numberOfHits===0?this.handleMissingData(r):this.resultsProcessing(n),this.$refs.content.style["overflow-y"]="scroll",t.count--,this.perItemSearch(e,t)}).catch(n=>{n.name!=="AbortError"&&(this.handleMissingData(r),t.count--,this.perItemSearch(e,t))}),this.perItemSearch(e,t))}},scrollToTop:function(){this.$refs.content&&this.$refs.content.scroll({top:0,behavior:"smooth"})},resetPageNavigation:function(){this.start=0,this.page=1},resultsProcessing:function(e){this.lastSearch=this.searchInput,e.results.length!==0&&e.results.forEach(t=>{let r=this.results.findIndex(n=>t.doi?t.doi.includes(n.doi):!1);Object.assign(this.results[r],t),Object.assign(this.results[r],{numberSamples:t.sampleSize?parseInt(t.sampleSize):0,numberSubjects:t.subjectSize?parseInt(t.subjectSize):0,updated:(t.updated&&t.updated.length)>0?t.updated[0].timestamp.split("T")[0]:"",url:t.uri[0],datasetId:t.dataset_identifier,datasetRevision:t.dataset_revision,datasetVersion:t.dataset_version,organs:t.organs&&t.organs.length>0?[...new Set(t.organs.map(n=>n.name))]:void 0,species:t.organisms&&t.organisms[0].species?[...new Set(t.organisms.map(n=>n.species?n.species.name:null))]:void 0,scaffolds:t["abi-scaffold-metadata-file"],thumbnails:t["abi-thumbnail"]?t["abi-thumbnail"]:t["abi-scaffold-thumbnail"],scaffoldViews:t["abi-scaffold-view-file"],videos:t.video,plots:t["abi-plot"],images:t["common-images"],contextualInformation:t["abi-contextual-information"].length>0?t["abi-contextual-information"]:void 0,segmentation:t["mbf-segmentation"],simulation:t["abi-simulation-file"],additionalLinks:t.additionalLinks,detailsReady:!0}),this.results[r]=this.results[r]})},createfilterParams:function(e){let t=new URLSearchParams;for(const r in e)Array.isArray(e[r])?e[r].forEach(n=>{t.append(r,n)}):t.append(r,e[r]);return t.toString()},callSciCrunch:function(e,t={},r){return new Promise((n,i)=>{let o=this.envVars.API_LOCATION+this.searchEndpoint+"?"+this.createfilterParams(t);fetch(o,{signal:r}).then(JGt).then(s=>s.json()).then(s=>n(s)).catch(s=>i(s))})},getAlgoliaFacets:async function(){return await this.algoliaClient.getAlgoliaFacets(jte)},searchHistorySearch:function(e){this.searchInput=e.search,this.filters=e.filters,this.openSearch(e.filters,e.search)}},mounted:function(){this.algoliaClient=new Mwe(this.envVars.ALGOLIA_ID,this.envVars.ALGOLIA_KEY,this.envVars.PENNSIEVE_API_LOCATION),this.algoliaClient.initIndex(this.envVars.ALGOLIA_INDEX),this.openSearch(this.filter,this.searchInput)},created:function(){this.searchEndpoint="dataset_info/using_multiple_dois/"}},tWt={class:"header"},rWt={class:"content scrollbar",ref:"content"},nWt={key:0,class:"error-feedback"};function iWt(e,t,r,n,i,o){const s=wk,l=np,c=Awe,u=U_e,d=z_e,h=Ube,p=vbe,f=CR;return a.openBlock(),a.createBlock(p,{"body-style":e.bodyStyle,class:"content-card"},{header:a.withCtx(()=>[a.createElementVNode("div",tWt,[a.createVNode(s,{class:"search-input",placeholder:"Search",modelValue:e.searchInput,"onUpdate:modelValue":t[0]||(t[0]=m=>e.searchInput=m),onKeyup:o.searchEvent,clearable:"",onClear:o.clearSearchClicked},null,8,["modelValue","onKeyup","onClear"]),a.createVNode(l,{type:"primary",class:"button",onClick:o.searchEvent,size:"large"},{default:a.withCtx(()=>[a.createTextVNode(" Search ")]),_:1},8,["onClick"])])]),default:a.withCtx(()=>[a.createVNode(c,{class:"filters",ref:"filtersRef",entry:o.filterEntry,envVars:r.envVars,onFilterResults:o.filterUpdate,onNumberPerPage:o.numberPerPageUpdate,onLoading:o.filtersLoading,onCascaderReady:o.cascaderReady},null,8,["entry","envVars","onFilterResults","onNumberPerPage","onLoading","onCascaderReady"]),a.createVNode(u,{ref:"searchHistory",onSearch:o.searchHistorySearch},null,8,["onSearch"]),a.withDirectives((a.openBlock(),a.createElementBlock("div",rWt,[e.results.length===0&&!e.loadingCards?(a.openBlock(),a.createElementBlock("div",nWt," No results found - Please change your search / filter criteria. ")):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.results,m=>(a.openBlock(),a.createElementBlock("div",{key:m.doi,class:"step-item"},[a.createVNode(d,{class:"dataset-card",entry:m,envVars:r.envVars,onMouseenter:g=>o.hoverChanged(m),onMouseleave:t[1]||(t[1]=g=>o.hoverChanged(void 0))},null,8,["entry","envVars","onMouseenter"])]))),128)),a.createVNode(h,{class:"pagination","current-page":e.page,"onUpdate:currentPage":t[2]||(t[2]=m=>e.page=m),"hide-on-single-page":"",large:"",layout:"prev, pager, next","page-size":e.numberPerPage,total:e.numberOfHits,onCurrentChange:o.pageChange},null,8,["current-page","page-size","total","onCurrentChange"])])),[[f,e.loadingCards]])]),_:1},8,["body-style"])}const Owe=W3(eWt,[["render",iWt],["__scopeId","data-v-aeb7c099"]]),oWt={name:"ExternalResourceCard",components:{Button:np},props:{resources:{type:Array,default:()=>[]}},data:function(){return{pubmeds:[],pubmedIds:[],ElIconNotebook:a.shallowRef(uMt)}},methods:{capitalise:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},openUrl:function(e){Lc.emit("open-pubmed-url",e),window.open(e,"_blank")}}},aWt={class:"resource-container"};function sWt(e,t,r,n,i,o){const s=np;return a.openBlock(),a.createElementBlock("div",aWt,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.resources,l=>(a.openBlock(),a.createElementBlock("div",{key:l.id,class:"resource"},[l.id==="pubmed"?(a.openBlock(),a.createBlock(s,{key:0,class:"button",id:"open-pubmed-button",icon:e.ElIconNotebook,onClick:c=>o.openUrl(l.url)},{default:a.withCtx(()=>[a.createTextVNode(" Open publications in PubMed ")]),_:2},1032,["icon","onClick"])):a.createCommentVNode("",!0)]))),128))])}const Iwe=W3(oWt,[["render",sWt],["__scopeId","data-v-e726c314"]]),lWt=e=>e.replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()),cWt=function(e){return e?e.charAt(0).toUpperCase()+e.slice(1):""},uWt={name:"ConnectivityInfo",components:{Button:np,Container:MPt,Icon:ms,ElIconArrowUp:qCt,ElIconArrowDown:N$,ElIconWarning:YTe,ExternalResourceCard:Iwe},props:{entry:{type:Object,default:()=>({destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0})},availableAnatomyFacets:{type:Array,default:()=>[]}},data:function(){return{controller:void 0,activeSpecies:void 0,pubmedSearchUrl:"",loading:!1,facetList:[],showToolip:!1,showDetails:!1,originDescriptions:{motor:"is the location of the initial cell body of the circuit",sensory:"is the location of the initial cell body in the PNS circuit"},componentsWithDatasets:[],uberons:[{id:void 0,name:void 0}]}},watch:{availableAnatomyFacets:{handler:function(e){this.convertFacetsToList(e)},immediate:!0,deep:!0}},computed:{resources:function(){let e=[];return this.entry&&this.entry.hyperlinks&&(e=this.entry.hyperlinks),e},featuresAlert(){},originDescription:function(){return this.entry&&this.entry.title&&this.entry.title.toLowerCase().includes("motor")?this.originDescriptions.motor:this.originDescriptions.sensory},provSpeciesDescription:function(){let e="Studied in";return this.entry.provenanceTaxonomyLabel.forEach(t=>{e+=` ${t},`}),e=e.slice(0,-1),e+=" species",e}},methods:{titleCase:function(e){return lWt(e)},capitalise:function(e){return cWt(e)},openUrl:function(e){window.open(e,"_blank")},openAll:function(){Lc.emit("onConnectivityActionClick",{type:"Facets",labels:this.entry.componentsWithDatasets.map(e=>e.name.toLowerCase())})},openAxons:function(){Lc.emit("onConnectivityActionClick",{type:"Facets",labels:this.entry.destinationsWithDatasets.map(e=>e.name.toLowerCase())})},shouldShowExploreButton:function(e){for(let t=0;t<e.length;t++)if(this.facetList.includes(e[t].name.toLowerCase()))return!0;return!1},convertFacetsToList:function(e){e.forEach(t=>{t.children?this.convertFacetsToList(t.children):this.facetList.push(t.label.toLowerCase())})},openDendrites:function(){Lc.emit("onConnectivityActionClick",{type:"Facets",labels:this.entry.originsWithDatasets.map(e=>e.name.toLowerCase())})},pubmedSearchUrlUpdate:function(e){this.pubmedSearchUrl=e},showConnectivity:function(e){const t=e.featureId||[];this.$emit("show-connectivity",t)}}},H9=e=>(a.pushScopeId("data-v-f1c50620"),e=e(),a.popScopeId(),e),dWt={key:0,class:"main"},hWt={class:"connectivity-info-title"},pWt={key:0,class:"block"},fWt={class:"title"},mWt={key:0,class:"subtitle"},gWt={key:1,class:"block"},yWt={class:"title"},TWt=H9(()=>a.createElementVNode("span",null," Show connectivity on map ",-1)),vWt={key:0,class:"attribute-title-container"},bWt=H9(()=>a.createElementVNode("span",{class:"attribute-title"},"Alert",-1)),QWt={style:{"word-break":"keep-all"}},xWt={class:"content-container scrollbar"},_Wt={key:0,class:"block"},wWt={class:"attribute-title-container"},LWt=H9(()=>a.createElementVNode("span",{class:"attribute-title"},"Origin",-1)),SWt={style:{"word-break":"keep-all"}},kWt=H9(()=>a.createElementVNode("i",null,"Origin",-1)),CWt=["origin-item-label"],MWt={key:0,class:"seperator"},EWt={key:1,class:"block"},AWt=H9(()=>a.createElementVNode("div",{class:"attribute-title-container"},[a.createElementVNode("div",{class:"attribute-title"},"Components")],-1)),OWt=["component-item-label"],IWt={key:0,class:"seperator"},PWt={key:2,class:"block"},VWt={class:"attribute-title-container"},HWt=H9(()=>a.createElementVNode("span",{class:"attribute-title"},"Destination",-1)),RWt=H9(()=>a.createElementVNode("span",{style:{"word-break":"keep-all"}},[a.createElementVNode("i",null,"Destination"),a.createTextVNode(" is where the axons terminate ")],-1)),NWt=["destination-item-label"],BWt={key:0,class:"seperator"};function FWt(e,t,r,n,i,o){const s=Iwe,l=sMt,c=ms,u=np,d=Cee,h=YTe,p=CR;return r.entry?a.withDirectives((a.openBlock(),a.createElementBlock("div",dWt,[a.createElementVNode("div",hWt,[a.createElementVNode("div",null,[r.entry.title?(a.openBlock(),a.createElementBlock("div",pWt,[a.createElementVNode("div",fWt,a.toDisplayString(o.capitalise(r.entry.title)),1),r.entry.provenanceTaxonomyLabel&&r.entry.provenanceTaxonomyLabel.length>0?(a.openBlock(),a.createElementBlock("div",mWt,a.toDisplayString(o.provSpeciesDescription),1)):a.createCommentVNode("",!0)])):(a.openBlock(),a.createElementBlock("div",gWt,[a.createElementVNode("div",yWt,a.toDisplayString(r.entry.featureId),1)])),a.createVNode(s,{resources:o.resources},null,8,["resources"])]),a.createElementVNode("div",null,[a.createVNode(d,{width:"200",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:a.withCtx(()=>[a.createVNode(u,{class:"button-circle",circle:"",onClick:t[0]||(t[0]=f=>o.showConnectivity(r.entry))},{default:a.withCtx(()=>[a.createVNode(c,{color:"white"},{default:a.withCtx(()=>[a.createVNode(l)]),_:1})]),_:1})]),default:a.withCtx(()=>[TWt]),_:1})])]),o.featuresAlert?(a.openBlock(),a.createElementBlock("div",vWt,[bWt,a.createVNode(d,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:a.withCtx(()=>[a.createVNode(c,{class:"info"},{default:a.withCtx(()=>[a.createVNode(h)]),_:1})]),default:a.withCtx(()=>[a.createElementVNode("span",QWt,a.toDisplayString(o.featuresAlert),1)]),_:1})])):a.createCommentVNode("",!0),a.createElementVNode("div",xWt,[a.createTextVNode(a.toDisplayString(r.entry.paths)+" ",1),r.entry.origins&&r.entry.origins.length>0?(a.openBlock(),a.createElementBlock("div",_Wt,[a.createElementVNode("div",wWt,[LWt,a.createVNode(d,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:a.withCtx(()=>[a.createVNode(c,{class:"info"},{default:a.withCtx(()=>[a.createVNode(h)]),_:1})]),default:a.withCtx(()=>[a.createElementVNode("span",SWt,[kWt,a.createTextVNode(" "+a.toDisplayString(o.originDescription),1)])]),_:1})]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.entry.origins,(f,m)=>(a.openBlock(),a.createElementBlock("div",{class:"attribute-content","origin-item-label":f,key:f},[a.createTextVNode(a.toDisplayString(o.capitalise(f))+" ",1),m!=r.entry.origins.length-1?(a.openBlock(),a.createElementBlock("div",MWt)):a.createCommentVNode("",!0)],8,CWt))),128)),a.withDirectives(a.createVNode(u,{class:"button",id:"open-dendrites-button",onClick:o.openDendrites},{default:a.withCtx(()=>[a.createTextVNode(" Explore origin data ")]),_:1},8,["onClick"]),[[a.vShow,r.entry.originsWithDatasets&&r.entry.originsWithDatasets.length>0&&o.shouldShowExploreButton(r.entry.originsWithDatasets)]])])):a.createCommentVNode("",!0),r.entry.components&&r.entry.components.length>0?(a.openBlock(),a.createElementBlock("div",EWt,[AWt,(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.entry.components,(f,m)=>(a.openBlock(),a.createElementBlock("div",{class:"attribute-content","component-item-label":f,key:f},[a.createTextVNode(a.toDisplayString(o.capitalise(f))+" ",1),m!=r.entry.components.length-1?(a.openBlock(),a.createElementBlock("div",IWt)):a.createCommentVNode("",!0)],8,OWt))),128))])):a.createCommentVNode("",!0),r.entry.destinations&&r.entry.destinations.length>0?(a.openBlock(),a.createElementBlock("div",PWt,[a.createElementVNode("div",VWt,[HWt,a.createVNode(d,{width:"250",trigger:"hover",teleported:!1,"popper-class":"popover-origin-help"},{reference:a.withCtx(()=>[a.createVNode(c,{class:"info"},{default:a.withCtx(()=>[a.createVNode(h)]),_:1})]),default:a.withCtx(()=>[RWt]),_:1})]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.entry.destinations,(f,m)=>(a.openBlock(),a.createElementBlock("div",{class:"attribute-content","destination-item-label":f,key:f},[a.createTextVNode(a.toDisplayString(o.capitalise(f))+" ",1),m!=r.entry.destinations.length-1?(a.openBlock(),a.createElementBlock("div",BWt)):a.createCommentVNode("",!0)],8,NWt))),128)),a.withDirectives(a.createVNode(u,{class:"button",onClick:o.openAxons},{default:a.withCtx(()=>[a.createTextVNode(" Explore destination data ")]),_:1},8,["onClick"]),[[a.vShow,r.entry.destinationsWithDatasets&&r.entry.destinationsWithDatasets.length>0&&o.shouldShowExploreButton(r.entry.destinationsWithDatasets)]])])):a.createCommentVNode("",!0),a.withDirectives(a.createVNode(u,{class:"button",onClick:o.openAll},{default:a.withCtx(()=>[a.createTextVNode(" Search for data on components ")]),_:1},8,["onClick"]),[[a.vShow,r.entry.componentsWithDatasets&&r.entry.componentsWithDatasets.length>0&&o.shouldShowExploreButton(r.entry.componentsWithDatasets)]])])])),[[p,e.loading]]):a.createCommentVNode("",!0)}const Pwe=W3(uWt,[["render",FWt],["__scopeId","data-v-f1c50620"]]),DWt={name:"Tabs",props:{tabTitles:{type:Array,default:()=>[]},activeId:{type:Number,default:1}},methods:{titleClicked:function(e,t){this.$emit("titleClicked",{id:e,type:t})},tabClose:function(e){this.$emit("tab-close",e)}}},zWt=e=>(a.pushScopeId("data-v-a569bcfd"),e=e(),a.popScopeId(),e),jWt={class:"tab-container"},UWt=["onClick"],GWt={class:"title-text"},WWt=zWt(()=>a.createElementVNode("span",{class:"visually-hidden"},"Close",-1));function qWt(e,t,r,n,i,o){const s=np;return a.openBlock(),a.createElementBlock("div",jWt,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.tabTitles,l=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["title",{"active-tab":l.id==r.activeId}]),key:l.id},[a.createElementVNode("div",{class:a.normalizeClass(["title-text-table",{highlightText:l.id==r.activeId}]),onClick:c=>o.titleClicked(l.id,l.type)},[a.createElementVNode("div",GWt,a.toDisplayString(l.title),1)],10,UWt),l.id===2?(a.openBlock(),a.createBlock(s,{key:0,onClick:c=>o.tabClose(l.id),class:"button-tab-close","aria-label":"Close"},{default:a.withCtx(()=>[a.createTextVNode(" × "),WWt]),_:2},1032,["onClick"])):a.createCommentVNode("",!0)],2))),128))])}const Vwe=W3(DWt,[["render",qWt],["__scopeId","data-v-a569bcfd"]]),ZWt={components:{SidebarContent:Owe,Tabs:Vwe,ElIconArrowLeft:B$,ElIconArrowRight:eR,Drawer:wee,Icon:ms,ConnectivityInfo:Pwe},name:"SideBar",props:{visible:{type:Boolean,default:!1},envVars:{type:Object,default:()=>{}},tabs:{type:Array,default:()=>[{id:1,title:"Search",type:"search"},{id:2,title:"Connectivity",type:"connectivity"}]},activeTabId:{type:Number,default:1},openAtStart:{type:Boolean,default:!1},connectivityInfo:{type:Object,default:null}},data:function(){return{drawerOpen:!1,availableAnatomyFacets:[]}},methods:{hoverChanged:function(e){this.$emit("hover-changed",e)},showConnectivity:function(e){this.$emit("show-connectivity",e)},searchChanged:function(e,t){this.$emit("search-changed",{...t,id:e})},close:function(){this.drawerOpen=!1},toggleDrawer:function(){this.drawerOpen=!this.drawerOpen},openSearch:function(e,t){this.drawerOpen=!0,this.$nextTick(()=>{this.getSearchTabRefById(1).openSearch(e,t)})},getTabByIdAndType:function(e,t){const r=e||this.activeTabId,n=t||"search",i=this.tabs.find(s=>s.id===r&&s.type===n),o=this.tabs[0];return i||o},getTabRefId:function(e,t){let r="searchTab_";t==="connectivity"&&(r="connectivityTab_");const n=this.getTabByIdAndType(e,t);return r+n.id},getSearchTabRefById:function(e){const t=e||1,r=this.getTabRefId(t,"search");return this.$refs[r][0]},addFilter:function(e){this.drawerOpen=!0,e.AND=!0,this.$nextTick(()=>{this.getSearchTabRefById(1).addFilter(e)})},openNeuronSearch:function(e){this.drawerOpen=!0,this.$nextTick(()=>{this.getSearchTabRefById(1).openSearch("",void 0,"scicrunch-query-string/",{field:"*organ.curie",curie:e})})},getAlgoliaFacets:async function(){return await this.getSearchTabRefById(1).getAlgoliaFacets()},setDrawerOpen:function(e=!0){this.drawerOpen=e},tabClicked:function({id:e,type:t}){this.$emit("tabClicked",{id:e,type:t})},tabClose:function(e){this.$emit("connectivity-info-close")}},created:function(){this.drawerOpen=this.openAtStart},mounted:function(){Lc.on("PopoverActionClick",e=>{this.$emit("actionClick",e)}),Lc.on("number-of-datasets-for-anatomies",e=>{this.$emit("number-of-datasets-for-anatomies",e)}),Lc.on("anatomy-in-datasets",e=>{this.$emit("anatomy-in-datasets",e)}),Lc.on("contextUpdate",e=>{this.$emit("contextUpdate",e)}),Lc.on("datalink-clicked",e=>{this.$emit("datalink-clicked",e)}),Lc.on("onConnectivityActionClick",e=>{this.tabClicked({id:1,type:"search"}),this.$emit("actionClick",e)}),Lc.on("available-facets",e=>{this.availableAnatomyFacets=e.find(t=>t.label==="Anatomical Structure").children})}},XWt={ref:"container"},KWt={class:"box-card"},YWt={class:"sidebar-container"};function JWt(e,t,r,n,i,o){const s=B$,l=ms,c=eR,u=Vwe,d=Pwe,h=Owe,p=wee;return a.openBlock(),a.createElementBlock("div",XWt,[e.drawerOpen?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,onClick:t[0]||(t[0]=(...f)=>o.toggleDrawer&&o.toggleDrawer(...f)),class:"open-tab"},[a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(s)]),_:1})])),a.createVNode(p,{class:"side-bar my-drawer",modelValue:e.drawerOpen,"onUpdate:modelValue":t[3]||(t[3]=f=>e.drawerOpen=f),teleported:!1,"modal-append-to-body":!1,size:"584","with-header":!1,wrapperClosable:!1,modal:!1,"modal-class":"sidebar-body","z-index":10,"lock-scroll":!1},{default:a.withCtx(()=>[a.createElementVNode("div",KWt,[e.drawerOpen?(a.openBlock(),a.createElementBlock("div",{key:0,onClick:t[1]||(t[1]=(...f)=>o.close&&o.close(...f)),class:"close-tab"},[a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(c)]),_:1})])):a.createCommentVNode("",!0),a.createElementVNode("div",YWt,[r.tabs.length>1&&r.connectivityInfo?(a.openBlock(),a.createBlock(u,{key:0,tabTitles:r.tabs,activeId:r.activeTabId,onTitleClicked:o.tabClicked,onTabClose:o.tabClose},null,8,["tabTitles","activeId","onTitleClicked","onTabClose"])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.tabs,f=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:"tab.id"},[f.type==="connectivity"?a.withDirectives((a.openBlock(),a.createBlock(d,{key:0,entry:r.connectivityInfo,availableAnatomyFacets:e.availableAnatomyFacets,ref_for:!0,ref:"connectivityTab_"+f.id,onShowConnectivity:o.showConnectivity},null,8,["entry","availableAnatomyFacets","onShowConnectivity"])),[[a.vShow,f.id===r.activeTabId]]):a.withDirectives((a.openBlock(),a.createBlock(h,{key:1,class:"sidebar-content-container",contextCardEntry:f.contextCard,envVars:r.envVars,ref_for:!0,ref:"searchTab_"+f.id,onSearchChanged:m=>o.searchChanged(f.id,m),onHoverChanged:t[2]||(t[2]=m=>o.hoverChanged(m))},null,8,["contextCardEntry","envVars","onSearchChanged"])),[[a.vShow,f.id===r.activeTabId]])],64))),128))])])]),_:1},8,["modelValue"])],512)}const $Wt={name:"SplitFlow",components:{Container:Ige,Header:Pge,Main:Vge,DialogToolbarContent:bye,SplitDialog:Tye,SideBar:W3(ZWt,[["render",JWt],["__scopeId","data-v-4d616bd4"]])},props:{state:{type:Object,default:void 0}},data:function(){return{sideBarVisibility:!0,startUp:!0,search:"",activeDockedId:1,filterTriggered:!1,availableFacets:[],connectivityInfo:null}},watch:{state:{handler:function(e){e&&(this._externalStateSet||this.setState(e),this._externalStateSet=!0)},immediate:!0}},methods:{actionClick:function(e){if(e)if(e.type=="Search")if(e.nervePath)this.openSearch([e.filter],e.label);else{this.openSearch([],e.term);const t=e.featuredDataset?"portal_maps_featured_dataset_search":"portal_maps_action_search";V1.sendEvent({event:"interaction_event",event_name:t,category:e.term||"filter",location:"map_location_pin"}),this.filterTriggered=!0}else if(e.type=="URL")window.open(e.resource,"_blank");else if(e.type=="Facet"){if(this.$refs.sideBar){this.closeConnectivityInfo(),this.$refs.sideBar.addFilter(e);const{facet:t}=e;V1.sendEvent({event:"interaction_event",event_name:"portal_maps_action_filter",category:t||"filter",location:"map_location_pin"}),this.filterTriggered=!0}}else if(e.type=="Facets"){const t=[];if(this.settingsStore.facets.species.forEach(r=>{t.push({facet:sye(r),term:"Species",facetPropPath:"organisms.primary.species.name"})}),t.length==0&&t.push({facet:"Show All",term:"Species",facetPropPath:"organisms.primary.species.name"}),t.push(...e.labels.map(r=>({facet:sye(r),term:"Anatomical structure",facetPropPath:"anatomy.organ.category.name"}))),this.$refs.sideBar){this.closeConnectivityInfo(),this.$refs.sideBar.openSearch(t,"");const n=ext(this.availableFacets,e.labels).join(", ");V1.sendEvent({event:"interaction_event",event_name:"portal_maps_action_filter",category:n||"filter",location:"map_popup_button"})}}else this.trackGalleryClick(e),this.createNewEntry(e)},trackGalleryClick:function(e){const t=[],{label:r,type:n,datasetId:i,discoverId:o,resource:s}=e;let l="",c=i||o;r&&t.push(r),n&&t.push(n),i&&t.push("("+c+")"),s&&(n==="Plot"?l=s.dataSource.url:l=typeof s=="string"?s:s.share_link),V1.sendEvent({event:"interaction_event",event_name:"portal_maps_gallery_click",category:t.join(" "),location:"map_sidebar_gallery",dataset_id:c?c+"":"",file_path:l})},onDisplaySearch:function(e){let t=!1,r=this.$refs.splitdialog;r&&r.getActiveContents().forEach(i=>{i.search(e.term)&&(t=!0)}),this.$refs.dialogToolbar.setFailedSearch(t?void 0:e.term),V1.sendEvent({event:"interaction_event",event_name:"portal_maps_display_search",category:e.term,location:"map_toolbar"})},fetchSuggestions:function(e){const t=[];this.$refs.splitdialog.getActiveContents().forEach(o=>o.searchSuggestions(e.data.term,t));const i=new Set(t);t.length=0;for(const o of i)t.push({value:'"'+o+'"'});e.data.cb(t)},onShowConnectivity:function(e){const t=this.splitFlowStore.getState(),r=(t==null?void 0:t.activeView)||"";Li.emit("show-connectivity",{featureIds:e,offset:r==="singlepanel"||r==="2horpanel"})},hoverChanged:function(e){const t=e&&e.anatomy?e.anatomy:[],r=e&&e.organs?e.organs:[];this.settingsStore.updateHoverFeatures(t,r),Li.emit("hoverUpdate")},searchChanged:function(e){if(e&&e.type=="query-update"&&(this.search=e.value,this.search&&!this.filterTriggered&&V1.sendEvent({event:"interaction_event",event_name:"portal_maps_action_search",category:this.search,location:"map_sidebar_search"}),this.filterTriggered=!1),e&&e.type=="filter-update"){if(this.settingsStore.updateFacets(e.value),!this.filterTriggered){const{value:t}=e,n=t.filter(i=>i.facet&&i.facet.toLowerCase()!=="show all").map(i=>i.facet).join(", ");V1.sendEvent({event:"interaction_event",event_name:"portal_maps_action_filter",category:n||"filter",location:"map_sidebar_filter"})}this.filterTriggered=!1}},updateMarkers:function(e){this.settingsStore.updateMarkers(e),Li.emit("markerUpdate")},updateScaffoldMarkers:function(e){this.settingsStore.updateNumberOfDatasetsForFacets(e)},getNewEntryId:function(){return this.entries.length?this.entries[this.entries.length-1].id+1:1},activateSyncMap:function(e){let t={};return Object.assign(t,e),t.mode="normal",t.id=this.getNewEntryId(),t.state=void 0,t.type="Scaffold",t.discoverId=e.discoverId,t.rotation="free",e.layout=="2vertpanel"?t.rotation="horizontal":e.layout=="2horpanel"&&(t.rotation="vertical"),this.entriesStore.addNewEntry(t),this.splitFlowStore.setSyncMode({flag:!0,newId:t.id,layout:e.layout}),t.id},createNewEntry:function(e){let t={};return t.viewUrl=void 0,t.state=void 0,Object.assign(t,e),t.mode="normal",t.id=this.getNewEntryId(),t.discoverId=e.discoverId,this.entriesStore.addNewEntry(t),this.splitFlowStore.setIdToPrimaryPane(t.id),this.splitFlowStore.syncMode&&this.splitFlowStore.setSyncMode({flag:!1}),this.$refs.sideBar&&this.$refs.sideBar.setDrawerOpen(!1),t.id},openNewMap:async function(e){const t=await KQt(e,this.settingsStore.sparcApi);this.createNewEntry(t),t.contextCard&&Li.emit("contextUpdate",t.contextCard)},openSearch:function(e,t){this.search=t,this._facets=e,this.$refs&&this.$refs.sideBar&&(this.closeConnectivityInfo(),this.$refs.sideBar.openSearch(e,t)),this.startUp=!1},closeConnectivityInfo:function(){this.$el.querySelectorAll(".maplibregl-popup-close-button").forEach(t=>{t.click()})},onFullscreen:function(e){this.$emit("onFullscreen",e)},resetApp:function(){this.setState(a$())},setIdToPrimaryPane:function(e){this.splitFlowStore.setIdToPrimaryPane(e)},setState:function(e){this.entriesStore.setAll(e.entries),e.splitFlow?this.splitFlowStore.setState(e.splitFlow):this.entries.forEach(t=>this.splitFlowStore.setIdToPrimaryPane(t.id))},getState:function(){let e=JSON.parse(JSON.stringify(this.entriesStore.$state)),r=this.$refs.splitdialog.getContentsState();if(e.entries.length===r.length)for(let n=0;n<r.length;n++){const i=e.entries[n];i.state=r[n],i.type==="Scaffold"&&"viewUrl"in i&&delete i.viewUrl,i.type==="MultiFlatmap"&&"uberonId"in i&&delete i.uberonId}return e.splitFlow=this.splitFlowStore.getState(),e},removeEntry:function(e){let t=this.entriesStore.findIndexOfId(e);this.entriesStore.destroyEntry(t)},resourceSelected:function(e){this.$emit("resource-selected",e),this.splitFlowStore.globalCallback&&this.$refs.splitdialog.sendSynchronisedEvent(e)},tabClicked:function({id:e,type:t}){this.activeDockedId=e},toggleSyncMode:function(e){e&&(e.flag?e.action&&this.activateSyncMap(e.action):this.splitFlowStore.syncMode&&this.splitFlowStore.setSyncMode({flag:!1}))},contextUpdate:function(e){Li.emit("contextUpdate",e)},datalinkClicked:function(e){const t=e||"",r="datasets/",i=t.substring(t.indexOf(r)+r.length,t.indexOf("?type=dataset"));V1.sendEvent({event:"interaction_event",event_name:"portal_maps_gallery_click",category:t,location:"map_sidebar_gallery",dataset_id:i||""})},onConnectivityInfoClose:function(){Li.emit("connectivity-info-close")},resetActivePathways:function(){const t=this.$el.querySelector(".maplibregl-canvas");t&&t.click()}},created:function(){this._facets=[],this._externalStateSet=!1},mounted:function(){Li.on("RemoveEntryRequest",e=>{this.removeEntry(e)}),Li.on("SyncModeRequest",e=>{this.toggleSyncMode(e)}),Li.on("PopoverActionClick",e=>{this.actionClick(e)}),Li.on("connectivity-info-open",e=>{this.connectivityInfo=e,this.$refs.sideBar&&(this.tabClicked({id:2,type:"connectivity"}),this.$refs.sideBar.setDrawerOpen(!0))}),Li.on("connectivity-info-close",e=>{this.tabClicked({id:1,type:"search"}),this.connectivityInfo=null,this.resetActivePathways()}),Li.on("OpenNewMap",e=>{this.openNewMap(e)}),Li.on("startHelp",()=>{this.$refs.sideBar&&this.$refs.sideBar.close()}),this.$nextTick(()=>{this.search===""&&this._facets.length===0?(this.$refs.sideBar&&this.$refs.sideBar.close(),setTimeout(()=>{this.startUp=!1},2e3)):this.openSearch(this._facets,this.search)})},computed:{...Qc.mapStores(HH,Qb,Nm),envVars:function(){return{API_LOCATION:this.settingsStore.sparcApi,ALGOLIA_INDEX:this.settingsStore.algoliaIndex,ALGOLIA_KEY:this.settingsStore.algoliaKey,ALGOLIA_ID:this.settingsStore.algoliaId,PENNSIEVE_API_LOCATION:this.settingsStore.pennsieveApi,NL_LINK_PREFIX:this.settingsStore.nlLinkPrefix,ROOT_URL:this.settingsStore.rootUrl}},entries:function(){return this.entriesStore.entries}}},eqt={style:{width:"100%",height:"100%",position:"relative",overflow:"hidden"}};function tqt(e,t,r,n,i,o){const s=bye,l=Pge,c=a.resolveComponent("SideBar"),u=Tye,d=Vge,h=Ige;return a.openBlock(),a.createBlock(h,{style:{height:"100%",background:"white"}},{default:a.withCtx(()=>[a.createVNode(l,{ref:"header",style:{"text-align":"left","font-size":"14px",padding:"0"},height:"32px",class:"dialog-header"},{default:a.withCtx(()=>[a.createVNode(s,{numberOfEntries:o.entries.length,onOnFullscreen:o.onFullscreen,onLocalSearch:o.onDisplaySearch,onFetchSuggestions:o.fetchSuggestions,ref:"dialogToolbar"},null,8,["numberOfEntries","onOnFullscreen","onLocalSearch","onFetchSuggestions"])]),_:1},512),a.createVNode(d,{class:"dialog-main"},{default:a.withCtx(()=>[a.createElementVNode("div",eqt,[a.createVNode(c,{ref:"sideBar",envVars:o.envVars,visible:e.sideBarVisibility,class:a.normalizeClass(["side-bar",{"start-up":e.startUp}]),activeTabId:e.activeDockedId,"open-at-start":e.startUp,connectivityInfo:e.connectivityInfo,onConnectivityInfoClose:o.onConnectivityInfoClose,onActionClick:o.actionClick,onTabClicked:o.tabClicked,onSearchChanged:t[0]||(t[0]=p=>o.searchChanged(p)),onAnatomyInDatasets:t[1]||(t[1]=p=>o.updateMarkers(p)),onNumberOfDatasetsForAnatomies:t[2]||(t[2]=p=>o.updateScaffoldMarkers(p)),onHoverChanged:t[3]||(t[3]=p=>o.hoverChanged(p)),onContextUpdate:t[4]||(t[4]=p=>o.contextUpdate(p)),onDatalinkClicked:t[5]||(t[5]=p=>o.datalinkClicked(p)),onShowConnectivity:o.onShowConnectivity},null,8,["envVars","visible","class","activeTabId","open-at-start","connectivityInfo","onConnectivityInfoClose","onActionClick","onTabClicked","onShowConnectivity"]),a.createVNode(u,{entries:o.entries,ref:"splitdialog",onResourceSelected:o.resourceSelected},null,8,["entries","onResourceSelected"])])]),_:1})]),_:1})}const Hwe=Zc($Wt,[["render",tqt],["__scopeId","data-v-7c28698d"]]),rqt={name:"MapContent",components:{MapSvgSpriteColor:VH,Loading:Gge,SplitFlow:Hwe},mixins:[{methods:{retrieveContextCardFromUrl:async function(e){const[t,r,n,i]=this.splitInfoFromUrl(e),o=await this.getContextFileFromScicrunch(t,n);if(!o.success)return{};const s=r+o.contextFile+i;return{s3uri:o.s3uri,contextCardUrl:s}},splitInfoFromUrl:function(e){let t=e.split("s3-resource")[1],r=e.split("files/")[0]+"files/",n=e.split("files/")[1].split("?")[0],i="?"+e.split("?")[1];const o=t.split("/");return o.shift(),[o[0],r,n,i]},getContextFileFromScicrunch:async function(e,t){return await fetch(`${this.settingsStore.sparcApi}/dataset_info/using_multiple_discoverIds/?discoverIds=${e}`).then(n=>n.json()).then(n=>{if(n.numberOfHits===1){const i=n.results[0]["abi-contextual-information"];if(i&&i.length===1)return{success:!0,contextFile:i[0],s3uri:n.results[0].s3uri};if(i&&i.length>1){let o=this.findContextInforForFilePath(n.results[0]["abi-context-file"],t);if(o)return{success:!0,contextFile:o,s3uri:n.results[0].s3uri}}}return{success:!1}}).catch(n=>(console.error("Error:",n),{success:!1}))},findContextInforForFilePath:function(e,t){var n;let r=e.find(i=>i.datacite.isDerivedFrom.path.includes(t));return(n=r==null?void 0:r.dataset)==null?void 0:n.path}}}],props:{shareLink:{type:String,default:void 0},state:{type:Object,default:void 0},options:{type:Object,default:()=>{},required:!0},startingMap:{type:String,default:"AC"},useHelpModeDialog:{type:Boolean,default:!1},connectivityInfoSidebar:{type:Boolean,default:!0}},data:function(){return{isReady:!1,initialState:void 0}},methods:{isFullscreen:function(){return document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement},onFullscreen:function(e){e!==void 0?(e&&!this.isFullscreen()&&this.goFullscreen(),!e&&this.isFullscreen()&&this.leaveFullscreen()):this.isFullscreen()?this.leaveFullscreen():this.goFullscreen()},leaveFullscreen:function(){this.isFullscreen()&&(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen())},goFullscreen:function(){let e=this.$refs.MapApp;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():parent.msRequestFullscreen&&e.msRequestFullscreen()},setState:function(e){return this.$refs.flow.setState(e)},getState:function(){return this.$refs.flow.getState()},setCurrentEntry:async function(e){if(e&&e.type){if(e.type==="Scaffold"&&e.url){let t={type:e.type,label:e.label,region:e.region,resource:e.url,state:e.state,viewUrl:e.viewUrl};const r=await this.retrieveContextCardFromUrl(e.url);t={...t,...r},this.$refs.flow.createNewEntry(t)}else if(e.type==="MultiFlatmap"){const t=JQt(e);if(t){const r=this.getState();if(r&&r.entries)for(let n=0;n<r.entries.length;n++){const i=r.entries[n];if(i.type==="MultiFlatmap"){i.resource=t,i.state={species:t},(e.organ||e.uuid)&&(i.state.state={searchTerm:e.organ,uuid:e.uuid},e.uuid&&(i.state.state.entry=e.taxo)),this.$refs.flow.setState(r),this.$refs.flow.setIdToPrimaryPane(i.id);break}}}}else if(e.type==="Flatmap"){const t={type:e.type,resource:e.resource,state:e.state,label:e.label};this.$refs.flow.createNewEntry(t)}}},openSearch:function(e,t){return this.$refs.flow.openSearch(e,t)},flowMounted:function(){this._flowMounted=!0,this.$emit("isReady"),V1.sendEvent({event:"interaction_event",event_name:"portal_maps_page_view",category:this.startingMap})},changeViewingMode:function(e){Li.emit("changeViewingMode",e)}},computed:{...Qc.mapStores(Qb,Nm),stateToSet(){return this.state?this.state:this.initialState}},watch:{shareLink:{handler:function(e){this.settingsStore.updateShareLink(e)},immediate:!0}},beforeMount:function(){var e,t;this.options&&(this.options.sparcApi&&this.settingsStore.updateSparcAPI(this.options.sparcApi),this.options.algoliaIndex&&this.settingsStore.updateAlgoliaIndex(this.options.algoliaIndex),this.options.algoliaKey&&this.settingsStore.updateAlgoliaKey(this.options.algoliaKey),this.options.algoliaId&&this.settingsStore.updateAlgoliaId(this.options.algoliaId),this.options.pennsieveApi&&this.settingsStore.updatePennsieveApi(this.options.pennsieveApi),this.options.flatmapAPI&&this.settingsStore.updateFlatmapAPI(this.options.flatmapAPI),this.options.nlLinkPrefix&&this.settingsStore.updateNLLinkPrefix(this.options.nlLinkPrefix),this.options.rootUrl&&this.settingsStore.updateRootUrl(this.options.rootUrl)),(e=this.splitFlowStore)==null||e.reset(),(t=this.splitFlowStore)==null||t.getAvailableTerms(this.settingsStore.sparcApi)},mounted:async function(){Li.on("updateShareLinkRequested",()=>{this.$emit("updateShareLinkRequested")}),Li.on("trackEvent",e=>{this.$emit("trackEvent",e)}),this.state||(this.initialState=await YQt(this.startingMap,this.options.sparcApi)),Li.on("mapReady",()=>{this._flowMounted&&this.$emit("isLoaded")}),this.isReady=!0,this.settingsStore.updateUseHelpModeDialog(this.useHelpModeDialog),this.settingsStore.updateConnectivityInfoSidebar(this.connectivityInfoSidebar)}},nqt={ref:"MapApp",class:"mapcontent","element-loading-text":"Loading...","element-loading-background":"rgba(0, 0, 0, 0.3)"};function iqt(e,t,r,n,i,o){const s=a.resolveComponent("map-svg-sprite-color"),l=Hwe,c=bb;return a.withDirectives((a.openBlock(),a.createElementBlock("div",nqt,[a.createVNode(s),e.isReady?(a.openBlock(),a.createBlock(l,{key:0,onOnFullscreen:o.onFullscreen,state:o.stateToSet,ref:"flow",onVnodeMounted:o.flowMounted},null,8,["onOnFullscreen","state","onVnodeMounted"])):a.createCommentVNode("",!0)])),[[c,!e.isReady]])}const oqt=Zc(rqt,[["render",iqt],["__scopeId","data-v-871312dd"]]);let Gte=7,$3=5;const aqt=[{id:"UBERON:0000948",name:"heart",showAtZoom:1},{id:"UBERON:0001759",name:"vagus nerve",showAtZoom:1},{id:"UBERON:0001155",name:"colon",showAtZoom:1},{id:"UBERON:0000945",name:"stomach",showAtZoom:1},{id:"UBERON:0001013",name:"adipose tissue",showAtZoom:1},{id:"UBERON:0001255",name:"urinary bladder",showAtZoom:1},{id:"UBERON:0001348",name:"brown adipose tissue",showAtZoom:6},{id:"UBERON:0002008",name:"cardiac nerve plexus",showAtZoom:1},{id:"UBERON:0002240",name:"spinal cord",showAtZoom:1},{id:"UBERON:0002005",name:"Enteric Nervous System",showAtZoom:4},{id:"UBERON:0013702",name:"body proper",showAtZoom:1},{id:"UBERON:0002298",name:"brainstem",showAtZoom:1},{id:"UBERON:0002439",name:"myenteric nerve plexus",showAtZoom:6},{id:"UBERON:0000010",name:"peripheral nervous system",showAtZoom:6},{id:"UBERON:0002048",name:"lung",showAtZoom:1},{id:"UBERON:0002410",name:"autonomic nervous system",showAtZoom:6},{id:"UBERON:0002441",name:"cervicothoracic ganglion",showAtZoom:6},{id:"UBERON:0005363",name:"inferior vagus X ganglion",showAtZoom:6},{id:"UBERON:0001264",name:"pancreas",showAtZoom:1},{id:"UBERON:0001884",name:"phrenic nerve",showAtZoom:6},{id:"UBERON:0002059",name:"submandibular ganglion",showAtZoom:7},{id:"UBERON:0001347",name:"white adipose tissue",showAtZoom:6},{id:"UBERON:0001556",name:"lower urinary tract",showAtZoom:1},{id:"UBERON:0002262",name:"celiac ganglion",showAtZoom:5},{id:"UBERON:0000955",name:"Brain",showAtZoom:1},{id:"UBERON:0000160",name:"intestine",showAtZoom:1},{id:"UBERON:0001322",name:"sciatic nerve",showAtZoom:1},{id:"UBERON:0001649",name:"glossopharyngeal nerve",showAtZoom:6},{id:"UBERON:0002063",name:"sinus venosus",showAtZoom:6},{id:"UBERON:0002107",name:"liver",showAtZoom:1},{id:"UBERON:0002113",name:"kidney",showAtZoom:1},{id:"UBERON:0002481",name:"bone tissue",showAtZoom:1},{id:"UBERON:0004907",name:"lower digestive tract",showAtZoom:4},{id:"UBERON:0000044",name:"Dorsal root ganglion",showAtZoom:5},{id:"UBERON:0001736",name:"Submandibular gland",showAtZoom:Gte,keyword:!0},{id:"UBERON:0001103",name:"Diaphragm",showAtZoom:$3,keyword:!0},{id:"UBERON:0001160",name:"Fundus of stomach",showAtZoom:$3,keyword:!0},{id:"UBERON:0000955",name:"Brain",showAtZoom:$3,keyword:!0},{id:"UBERON:0003708",name:"Carotid sinus",showAtZoom:Gte,keyword:!0},{id:"UBERON:0002079",name:"Left cardiac atrium",showAtZoom:$3,keyword:!0},{id:"ILX:0485722",name:"Nodose ganglion",showAtZoom:Gte,keyword:!0},{id:"UBERON:0002078",name:"Right cardiac atrium",showAtZoom:$3,keyword:!0},{id:"UBERON:0002084",name:"Heart left ventricle",showAtZoom:$3,keyword:!0},{id:"UBERON:0002080",name:"Heart right ventricle",showAtZoom:$3,keyword:!0},{id:"UBERON:0001508",name:"Arch of Aorta",showAtZoom:$3,keyword:!0},{id:"UBERON:0001738",name:"Thyroid cartilage",showAtZoom:$3,keyword:!0},{id:"UBERON:0000388",name:"Epiglottis",showAtZoom:$3,keyword:!0}];function sqt(e){return e[0].toUpperCase()+e.substring(1)}const rQ={emits:["flatmap-provenance-ready","resource-selected","species-changed"],props:{entry:Object,visible:{type:Boolean,default:!0},mouseHovered:{type:Boolean,default:!1}},computed:{...Qc.mapStores(Qb,Nm),idNamePair(){return this.splitFlowStore.idNamePair},syncMode(){return this.splitFlowStore.syncMode},useHelpModeDialog(){return this.settingsStore.useHelpModeDialog},connectivityInfoSidebar(){return this.settingsStore.connectivityInfoSidebar}},mounted:function(){Li.on("startHelp",()=>{this.startHelp()}),this.multiflatmapRef=this.$refs.multiflatmap,this.flatmapRef=this.$refs.flatmap,this.scaffoldRef=this.$refs.scaffold},methods:{toggleSyncMode:function(){},getState:function(){},openMap:function(e){e==="SYNC"?(this.toggleSyncMode(),this.trackOpenMap("toggle_map_sync_mode")):(Li.emit("OpenNewMap",e),this.trackOpenMap(`open_new_${e}_map`)),this.onConnectivityInfoClose()},trackOpenMap:function(e){V1.sendEvent({event:"interaction_event",event_name:"portal_maps_open_map",category:e,location:"open_new_map"})},updateWithViewUrl:function(){},search:function(){return!1},searchSuggestions:function(){},resourceSelected:function(e,t,r){var l,c,u;if(this.resourceHasAction(t)){Li.emit("PopoverActionClick",t);return}let n,i="none",o=!1;const s={paneIndex:this.entry.id,type:e,resource:t,internalName:void 0,eventType:void 0};if(e=="MultiFlatmap"||e=="Flatmap")if(s.internalName=this.idNamePair[t.feature.models],t.eventType=="click")if(s.eventType="selected",t.feature.type=="marker"){let d=this.idNamePair[t.feature.models],h=aqt.filter(p=>p.id===t.feature.models);this.settingsStore.isFeaturedMarkerIdentifier(t.feature.id)?n={type:"Search",term:this.settingsStore.featuredMarkerDoi(t.feature.id),featuredDataset:!0}:h.filter(p=>p.keyword).length>0?n={type:"Search",term:"http://purl.obolibrary.org/obo/"+t.feature.models.replace(":","_")}:n={type:"Facet",facet:d,facetPropPath:"anatomy.organ.category.name",term:"Anatomical structure"},o=!0,e=="MultiFlatmap"&&this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults()}else t.feature.type=="feature"&&(this.syncMode?o=!0:i="scaffold");else t.eventType=="mouseenter"&&(s.eventType="highlighted",o=!0);else e=="Scaffold"&&(t&&t[0]&&((((l=t[0].data)==null?void 0:l.id)===void 0||((c=t[0].data)==null?void 0:c.id)==="")&&(t[0].data.id=(u=t[0].data)==null?void 0:u.group),s.internalName=t[0].data.id,t[0].data.lastActionOnMarker===!0&&(n={type:"Facet",facet:sqt(t[0].data.id),facetPropPath:"anatomy.organ.category.name",term:"Anatomical structure"})),s.eventType="selected",o=!0,i="search");n===void 0&&r&&(n=cxt(s,i)),n&&Li.emit("PopoverActionClick",n),o&&this.$emit("resource-selected",s)},resourceHasAction:function(e){return e.type==="URL"||e.type==="Search"||e.type==="Neuron Search"||e.type=="Facet"||e.type=="Facets"},isVisible:function(){return this.splitFlowStore.getPaneNameById(this.entry.id)!==void 0},displayTooltip:function(){},getNameAndIdFromSyncData:async function(e){let t=e.internalName;t===void 0&&e.resource&&(t=e.resource.label);let r;if(e.resource&&e.resource.resource&&(r=e.resource.resource[0]),this.entry.type==="Scaffold"){if(this.$refs.scaffold.findObjectsWithGroupName(t).length===0){if(e.resource&&e.resource.feature){const o=uye(e.resource.feature.models);if(o.length>0)return o}let i=lxt(t);if(i)return i;if(r&&e.eventType==="selected")return fetch(`${this.apiLocation}get-related-terms/${r}`).then(o=>o.json()).then(o=>{if(o.uberon.array.length>0)return t=o.uberon.array[0].name.charAt(0).toUpperCase()+o.uberon.array[0].name.slice(1),r=o.uberon.array[0].id.toUpperCase(),{id:r,name:t}})}}else if(this.entry.type==="MultiFlatmap")if(t==="Bladder")t="Urinary Bladder";else{const n=uye(t);n.length>0&&(t=n[0])}return{id:r,name:t}},getDatasetAnatomyInfo:function(e){fetch(`${this.apiLocation}dataset_info/anatomy?identifier=${e}`).then(t=>t.json()).then(t=>{const r=t.result[0];let n;try{n=r.anatomy.organ[0].curie}catch{n=void 0}let i;try{i=r.item.curie}catch{i=void 0}let o;try{let s=0,l=!1;for(;!l&&s<r.organisms.subject.length;){const c=r.organisms.subject[s];c.species&&(o=c.species.name,l=!0),s+=1}}catch{o=void 0}this.settingsStore.updateFeaturedMarker({identifier:e,marker:n,doi:i,species:o})})},oldFeaturedDatasetApiHasInfo:async function(){let t=await(await fetch(`${this.apiLocation}get_featured_datasets_identifiers`)).json();return!t.identifiers||t.identifiers.length==0?!1:t.identifiers},newFeaturedDatasetApiHasInfo:async function(){let t=await(await fetch(`${this.apiLocation}get_featured_dataset`)).json();return!t.datasets||t.datasets.length==0?!1:t.datasets.map(r=>r.id)},getFeaturedDatasets:async function(){let e=[],t=await this.oldFeaturedDatasetApiHasInfo();if(t)e=t;else{let r=await this.newFeaturedDatasetApiHasInfo();r&&(e=r)}this.settingsStore.updateFeatured(e),e.forEach(r=>{this.getDatasetAnatomyInfo(r)})},zoomToFeatures:function(){},handleSyncMouseEvent:async function(e){let t=await this.getNameAndIdFromSyncData(e);e.eventType==="highlighted"?this.highlightFeatures(t):e.eventType==="selected"&&this.displayTooltip(t)},handleSyncPanZoomEvent:function(){},highlightFeatures:function(){},receiveSynchronisedEvent:async function(e){if(e.paneIndex!==this.entry.id)e.eventType=="panZoom"||this.handleSyncMouseEvent(e);else if(e.eventType=="selected"){let t=await this.getNameAndIdFromSyncData(e);this.zoomToFeatures(t,!1)}},requestSynchronisedEvent:function(){},flatmapMarkerUpdate(){},onResize:function(){},startHelp:function(){this.isInHelp===!1&&(this.helpMode=!0,window.addEventListener("mousedown",this.checkEndHelpMouseDown),this.isInHelp=!0)},endHelp:function(){window.removeEventListener("mousedown",this.checkEndHelpMouseDown),this.helpMode=!1,setTimeout(()=>{this.isInHelp=!1},200)},onHelpModeShowNext:function(){this.helpModeActiveItem+=1},onHelpModeLastItem:function(e){e&&(this.helpModeLastItem=!0)},onFinishHelpMode:function(){this.helpMode=!1,this.helpModeActiveItem=0,this.helpModeLastItem=!1},onTooltipShown:function(){this.$refs.multiflatmap&&this.$refs.multiflatmapHelp&&this.$refs.multiflatmapHelp.toggleTooltipHighlight(),this.$refs.flatmap&&this.$refs.flatmapHelp&&this.$refs.flatmapHelp.toggleTooltipHighlight(),this.$refs.scaffold&&this.$refs.scaffoldHelp&&this.$refs.scaffoldHelp.toggleTooltipHighlight()},onMapTooltipShown:function(){this.$refs.multiflatmap&&this.$refs.multiflatmapHelp&&this.$refs.multiflatmapHelp.toggleTooltipPinHighlight(),this.$refs.flatmap&&this.$refs.flatmapHelp&&this.$refs.flatmapHelp.toggleTooltipPinHighlight(),this.$refs.scaffold&&this.$refs.scaffoldHelp&&this.$refs.scaffoldHelp.toggleTooltipPinHighlight()},checkEndHelpMouseDown:function(e){e.target.closest(".help-mode-dialog")||this.endHelp()},mapHoverHighlight:function(e){if(this.visible){const t=this.settingsStore.hoverAnatomies,r=this.settingsStore.hoverOrgans;t.length||r.length?(clearTimeout(this.hoverDelay),this.multiflatmapRef||this.flatmapRef?e==null||e.zoomToFeatures(t,{noZoomIn:!0}):this.scaffoldRef&&(e==null||e.changeHighlightedByName(r,"",!1))):this.hoverDelay=setTimeout(()=>{this.multiflatmapRef||this.flatmapRef?e==null||e.clearSearchResults():this.scaffoldRef&&(e==null||e.changeHighlightedByName(r,"",!1))},500)}},onConnectivityInfoOpen:function(e){Li.emit("connectivity-info-open",e)},onConnectivityInfoClose:function(){Li.emit("connectivity-info-close")}},data:function(){return{apiLocation:void 0,activeSpecies:"Rat",scaffoldCamera:void 0,mainStyle:{height:this.entry.datasetTitle?"calc(100% - 30px)":"100%",width:"100%",bottom:"0px"},helpMode:!1,helpModeActiveItem:0,helpModeLastItem:!1,multiflatmapRef:null,flatmapRef:null,scaffoldRef:null,scaffoldLoaded:!1,isInHelp:!1,hoverDelay:void 0}},created:function(){this.flatmapAPI=void 0,this.apiLocation=void 0,this.settingsStore.flatmapAPI&&(this.flatmapAPI=this.settingsStore.flatmapAPI),this.settingsStore.sparcApi&&(this.apiLocation=this.settingsStore.sparcApi)},watch:{helpMode:function(e){e||(this.helpModeActiveItem=0)}}},lqt=function(e){return e?[...new Set(e.map(t=>JSON.stringify(t)))].map(t=>JSON.parse(t)):[]},Rwe={computed:{...Qc.mapStores(Qb)},methods:{flatmapPanZoomCallback:function(e){if(this.mouseHovered){const t={paneIndex:this.entry.id,eventType:"panZoom",payload:e,type:this.entry.type};this.$emit("resource-selected",t)}},flatmapMarkerUpdate(e){if(!this.flatmapReady)return;let t=e;if(t||(t=this.getFlatmapImp()),t){let r=this.settingsStore.markers;r=lqt(r);let n=this.removeMarkersNotOnFlatmap(t,r);t.clearMarkers(),t.clearDatasetMarkers(),t.addDatasetMarkers(n),this.entry.type==="MultiFlatmap"&&this.restoreFeaturedMarkers(t)}},removeMarkersNotOnFlatmap(e,t){let r=e.anatomicalIdentifiers,n=[];for(let i=0;i<t.length;i++){let o=t[i],s={id:o.id,terms:[]};for(let l=0;l<o.terms.length;l++)r.includes(o.terms[l])&&s.terms.push(o.terms[l]);n.push(s)}return n},flatmapReadyForMarkerUpdates:function(e){if(e){e.enablePanZoomEvents(!0),this.flatmapReady=!0;const t=e.mapImp;this.flatmapMarkerUpdate(t)}}}},m6=(e,t,{checkForDefaultPrevented:r=!0}={})=>n=>{const i=e==null?void 0:e(n);if(r===!1||!i)return t==null?void 0:t(n)};var Nwe;const Al=typeof window<"u",cqt=e=>typeof e=="string",Bwe=()=>{},uqt=Al&&((Nwe=window==null?void 0:window.navigator)==null?void 0:Nwe.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Fwe(e){return typeof e=="function"?e():a.unref(e)}function dqt(e){return e}function vN(e){return a.getCurrentScope()?(a.onScopeDispose(e),!0):!1}function hqt(e,t=!0){a.getCurrentInstance()?a.onMounted(e):t?e():a.nextTick(e)}function g6(e){var t;const r=Fwe(e);return(t=r==null?void 0:r.$el)!=null?t:r}const bN=Al?window:void 0;function t8(...e){let t,r,n,i;if(cqt(e[0])||Array.isArray(e[0])?([r,n,i]=e,t=bN):[t,r,n,i]=e,!t)return Bwe;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const o=[],s=()=>{o.forEach(d=>d()),o.length=0},l=(d,h,p,f)=>(d.addEventListener(h,p,f),()=>d.removeEventListener(h,p,f)),c=a.watch(()=>[g6(t),Fwe(i)],([d,h])=>{s(),d&&o.push(...r.flatMap(p=>n.map(f=>l(d,p,f,h))))},{immediate:!0,flush:"post"}),u=()=>{c(),s()};return vN(u),u}let Dwe=!1;function pqt(e,t,r={}){const{window:n=bN,ignore:i=[],capture:o=!0,detectIframe:s=!1}=r;if(!n)return;uqt&&!Dwe&&(Dwe=!0,Array.from(n.document.body.children).forEach(d=>d.addEventListener("click",Bwe)));let l=!0;const c=d=>i.some(h=>{if(typeof h=="string")return Array.from(n.document.querySelectorAll(h)).some(p=>p===d.target||d.composedPath().includes(p));{const p=g6(h);return p&&(d.target===p||d.composedPath().includes(p))}}),u=[t8(n,"click",d=>{const h=g6(e);if(!(!h||h===d.target||d.composedPath().includes(h))){if(d.detail===0&&(l=!c(d)),!l){l=!0;return}t(d)}},{passive:!0,capture:o}),t8(n,"pointerdown",d=>{const h=g6(e);h&&(l=!d.composedPath().includes(h)&&!c(d))},{passive:!0}),s&&t8(n,"blur",d=>{var h;const p=g6(e);((h=n.document.activeElement)==null?void 0:h.tagName)==="IFRAME"&&!(p!=null&&p.contains(n.document.activeElement))&&t(d)})].filter(Boolean);return()=>u.forEach(d=>d())}function zwe(e,t=!1){const r=a.ref(),n=()=>r.value=!!e();return n(),hqt(n,t),r}const jwe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Uwe="__vueuse_ssr_handlers__";jwe[Uwe]=jwe[Uwe]||{};var Gwe=Object.getOwnPropertySymbols,fqt=Object.prototype.hasOwnProperty,mqt=Object.prototype.propertyIsEnumerable,gqt=(e,t)=>{var r={};for(var n in e)fqt.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Gwe)for(var n of Gwe(e))t.indexOf(n)<0&&mqt.call(e,n)&&(r[n]=e[n]);return r};function y6(e,t,r={}){const n=r,{window:i=bN}=n,o=gqt(n,["window"]);let s;const l=zwe(()=>i&&"ResizeObserver"in i),c=()=>{s&&(s.disconnect(),s=void 0)},u=a.watch(()=>g6(e),h=>{c(),l.value&&i&&h&&(s=new ResizeObserver(t),s.observe(h,o))},{immediate:!0,flush:"post"}),d=()=>{c(),u()};return vN(d),{isSupported:l,stop:d}}var Wwe=Object.getOwnPropertySymbols,yqt=Object.prototype.hasOwnProperty,Tqt=Object.prototype.propertyIsEnumerable,vqt=(e,t)=>{var r={};for(var n in e)yqt.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Wwe)for(var n of Wwe(e))t.indexOf(n)<0&&Tqt.call(e,n)&&(r[n]=e[n]);return r};function bqt(e,t,r={}){const n=r,{window:i=bN}=n,o=vqt(n,["window"]);let s;const l=zwe(()=>i&&"MutationObserver"in i),c=()=>{s&&(s.disconnect(),s=void 0)},u=a.watch(()=>g6(e),h=>{c(),l.value&&i&&h&&(s=new MutationObserver(t),s.observe(h,o))},{immediate:!0}),d=()=>{c(),u()};return vN(d),{isSupported:l,stop:d}}var qwe;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(qwe||(qwe={}));var Qqt=Object.defineProperty,Zwe=Object.getOwnPropertySymbols,xqt=Object.prototype.hasOwnProperty,_qt=Object.prototype.propertyIsEnumerable,Xwe=(e,t,r)=>t in e?Qqt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wqt=(e,t)=>{for(var r in t||(t={}))xqt.call(t,r)&&Xwe(e,r,t[r]);if(Zwe)for(var r of Zwe(t))_qt.call(t,r)&&Xwe(e,r,t[r]);return e};wqt({linear:dqt},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const Lqt=()=>Al&&/firefox/i.test(window.navigator.userAgent),Wte=e=>{let t,r;return e.type==="touchend"?(r=e.changedTouches[0].clientY,t=e.changedTouches[0].clientX):e.type.startsWith("touch")?(r=e.touches[0].clientY,t=e.touches[0].clientX):(r=e.clientY,t=e.clientX),{clientX:t,clientY:r}};/**
|
938
938
|
* @vue/shared v3.4.27
|
939
939
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
940
940
|
* @license MIT
|
@@ -3090,7 +3090,7 @@ ${t.vs}`,t}setDataProperty(t,r,n){const i=ar(this,mx).get(+t);i&&(!(r in i)||i[r
|
|
3090
3090
|
state: () => new MyClass()
|
3091
3091
|
Found in store "${S.$id}".`),m&&o&&r.hydrate&&r.hydrate(S.$state,m),u=!0,d=!0,S}function vjr(e,t,r){let n,i;const o=typeof t=="function";n=e,i=o?r:t;function s(l,c){const u=a.hasInjectionContext();if(l=(process.env.NODE_ENV==="test"&&zA&&zA._testing?null:l)||(u?a.inject(mjr,null):null),l&&GU(l),process.env.NODE_ENV!=="production"&&!zA)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
3092
3092
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
3093
|
-
This will fail in production.`);l=zA,l._s.has(n)||(o?N1e(n,t,i,l):qje(n,i,l),process.env.NODE_ENV!=="production"&&(s._pinia=l));const d=l._s.get(n);if(process.env.NODE_ENV!=="production"&&c){const h="__hot:"+n,p=o?N1e(h,t,i,l,!0):qje(h,jd({},i),l,!0);c._hotUpdate(p),delete l.state.value[h],l._s.delete(h)}if(process.env.NODE_ENV!=="production"&&V1e){const h=a.getCurrentInstance();if(h&&h.proxy&&!c){const p=h.proxy,f="_pStores"in p?p._pStores:p._pStores={};f[n]=d}}return d}return s.$id=n,s}function bjr(e,t){return Array.isArray(t)?t.reduce((r,n)=>(r[n]=function(){return e(this.$pinia)[n]},r),{}):Object.keys(t).reduce((r,n)=>(r[n]=function(){const i=e(this.$pinia),o=t[n];return typeof o=="function"?o.call(this,i):i[o]},r),{})}const Qjr=vjr("main",{state:()=>({userProfile:{token:""}}),getters:{userToken(e){return e.userProfile.token}},actions:{setUserToken(e){this.userProfile.token=e}}}),xjr=e=>{let t={lng:0,lat:0},r;return e.type==="Polygon"?r=e.coordinates[0]:r=e.coordinates,e.type!=="Point"?(r.map(n=>{t.lng+=parseFloat(n[0]),t.lat+=parseFloat(n[1])}),t.lng=t.lng/r.length,t.lat=t.lat/r.length):(t.lng+=parseFloat(r[0]),t.lat+=parseFloat(r[1])),t},Zje=(e,t)=>{const r=[];let n=e.organs?e.organs:e.ftus;const i=n?n.filter((o,s)=>n.findIndex(l=>l.label===o.label)===s):void 0;return i&&i.forEach(o=>{const s={label:o.label,models:o.models,key:`${t}.${o.label}`},l=Zje(o,s.key);l.length>0&&(s.children=l),r.push(s)}),r},_jr=function(){return{destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0}},wjr={name:"FlatmapVuer",components:{Button:WEe,Col:WC,Loading:kpr,Radio:lAe,Icon:Cu,RadioGroup:cAe,Row:GC,Select:OB,Dialog:Dhr,MapSvgIcon:$S,MapSvgSpriteColor:VH,Tooltip:pCe,TreeControls:fCe,SelectionsGroup:QAe,SvgLegends:xAe,ElIconWarningFilled:wMe,ElIconArrowDown:_ne,ElIconArrowLeft:xMe,DrawToolbar:hCe},beforeCreate:function(){this.setStateRequired=!1},setup(e){return{annotator:a.markRaw(new pjr(`${e.flatmapAPI}annotator`))}},methods:{initialiseDrawing:function(){this.connectionEntry={},this.activeDrawTool=void 0,this.activeDrawMode=void 0,this.drawnCreatedEvent={}},cancelDrawnFeature:function(){this.isValidDrawnCreated&&(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 r={feature:{}};if(t){const n=this.mapImp.featureProperties(t);r.feature=n}else{const n=this.existDrawnFeatures.find(i=>i.id===e.replace(" ",""));r.feature.feature=n}this.checkAndCreatePopups(r)}else this.closeTooltip()},confirmDrawnFeature:function(){this.isValidDrawnCreated&&(this.checkAndCreatePopups(this.drawnCreatedEvent),Object.keys(this.connectionEntry).length>0&&(this.annotationEntry.feature.connection=this.connectionEntry),this.initialiseDrawing())},toolbarEvent:function(e,t){if(this.closeTooltip(),this.doubleClickedFeature=!1,this.connectionEntry={},e==="mode")this.changeAnnotationDrawMode({mode:"simple_select"}),this.activeDrawMode=t,Object.keys(this.annotationEntry).length>0&&!this.featureAnnotationSubmitted&&this.rollbackAnnotationEvent();else if(e==="tool"){if(t){const r=t.replace(/[A-Z]/g,n=>`_${n.toLowerCase()}`);this.changeAnnotationDrawMode({mode:`draw${r}`}),this.initialiseDrawing()}else this.changeAnnotationDrawMode({mode:"simple_select"}),this.cancelDrawnFeature();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((r,n)=>n!==0&&n!==e.length-1)};this.annotationEntry.body=t}},changeAnnotationDrawMode:function(e){this.mapImp&&this.mapImp.changeAnnotationDrawMode(e)},clearAnnotationFeature:function(){this.mapImp&&this.existDrawnFeatures.length>0&&this.mapImp.clearAnnotationFeature()},modifyAnnotationFeature:function(){this.mapImp&&this.mapImp.removeAnnotationFeature()},rollbackAnnotationEvent:function(){this.mapImp&&["created","updated","deleted"].includes(this.annotationEntry.type)&&(this.mapImp.rollbackAnnotationEvent(this.annotationEntry),this.annotationEntry={})},commitAnnotationEvent:function(e){this.mapImp&&["created","updated","deleted"].includes(this.annotationEntry.type)&&e&&(this.featureAnnotationSubmitted=!0,this.mapImp.commitAnnotationEvent(this.annotationEntry),this.annotationEntry.type==="deleted"?(this.closeTooltip(),this.annotationEntry={}):this.addAnnotationFeature())},fetchAnnotatedItemIds:async function(e=void 0,t=void 0){let r=await this.annotator.annotatedItemIds(this.userToken,this.serverURL,e,t);return"resource"in r&&(r=r.itemIds),r},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){const r=await this.fetchAnnotatedItemIds(e,t);let n=await this.annotator.drawnFeatures(this.userToken,this.serverURL,r);return"resource"in n&&(n=n.features),this.drawnType!=="All tools"&&(n=n.filter(i=>i.geometry.type===this.drawnType)),n},addAnnotationFeature:async function(){if(this.mapImp&&(this.featureAnnotationSubmitted||this.clearAnnotationFeature(),this.drawnType!=="None")){this.featureAnnotationSubmitted||(this.loading=!0);const e=this.annotatedType==="Anyone"?void 0:this.userInformation.orcid?this.userInformation.orcid:"0000-0000-0000-0000",t=this.annotatedType==="Anyone"?void 0:this.annotatedType==="Me",r=await this.fetchDrawnFeatures(e,t);if(this.existDrawnFeatures=r,this.loading=!1,!this.featureAnnotationSubmitted)for(const n of r)this.mapImp.addAnnotationFeature(n)}},showAnnotator:function(e){this.mapImp&&(this.mapImp.showAnnotator(e),this.$el.querySelector(".maplibregl-ctrl-group").style.display="none")},setDrawnType:function(e){this.drawnType=e,this.mapImp&&(this.addAnnotationFeature(),this.initialiseDrawing())},setAnnotatedType:function(e){this.annotatedType=e,this.mapImp&&this.addAnnotationFeature()},setFlightPath3D:function(e){this.flightPath3DRadio=e,this.mapImp&&this.mapImp.enableFlightPaths(e)},viewLatestMap:function(){let e=this.biologicalSex?this.biologicalSex:void 0;this.entry==="NCBITaxon:9606"&&(e="PATO:0000384");const t={entry:this.entry,biologicalSex:e,viewport:this.mapImp.getState()};this.$emit("view-latest-map",t)},backgroundChangeCallback:function(e){this.currentBackground=e,this.mapImp&&this.mapImp.setBackgroundColour(this.currentBackground,1)},processSystems:function(e){if(this.systems.length=0,e&&e.length>0){const t={label:"All",key:"All",children:[]};e.forEach(r=>{const n={colour:r.colour,enabled:r.enabled,label:r.id,key:r.id},i=Zje(r,n.key);i.length>0&&(n.children=i),t.children.push(n)}),this.systems.push(t)}},processTaxon:function(e,t){this.taxonConnectivity.length=0,t.forEach(r=>{_Ae(e,r).then(n=>{const i={taxon:r,label:n};this.taxonConnectivity.push(i)})})},toggleDrawer:function(){this.drawerOpen=!this.drawerOpen},setColour:function(e){this.colourRadio=e,this.mapImp&&this.mapImp.setColour({colour:e,outline:this.outlinesRadio})},setOutlines:function(e){this.outlineRadio=e,this.mapImp&&this.mapImp.setColour({colour:this.colourRadio,outline:e})},resetView:function(){this.mapImp&&(this.mapImp.resetMap(),this.$refs.centrelinesSelection&&this.$refs.centrelinesSelection.reset(),this.$refs.skcanSelection&&this.$refs.skcanSelection.reset(),this.$refs.layersSelection&&this.$refs.layersSelection.reset(),this.$refs.systemsSelection&&this.$refs.pathwaysSelection.reset(),this.$refs.pathwaysSelection&&this.$refs.pathwaysSelection.reset())},zoomIn:function(){this.mapImp&&this.mapImp.zoomIn()},zoomOut:function(){this.mapImp&&this.mapImp.zoomOut()},centreLinesSelected:function(e){this.mapImp&&this.mapImp.enableCentrelines(e.value)},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))},highlightConnectedPaths:async function(e){var t,r;if(this.mapImp){let n=[...this.mapImp.pathModelNodes(e)].map(c=>this.mapImp.featureProperties(c)),i=await this.flatmapQueries.queryForConnectivity(e),o=(r=(t=i==null?void 0:i.ids)==null?void 0:t.dendrites)==null?void 0:r.flat().flat(),s=[],l=!1;n.forEach(c=>{this.mapImp.nodePathModels(c.featureId).forEach(u=>{l=!0,this.mapImp.pathModelNodes(u).forEach(d=>{let h=this.mapImp.featureProperties([d]);if(o.includes(h.models)){l=!1;return}}),l&&s.push(u)})}),this.mapImp.zoomToFeatures(s,{noZoomIn:!0})}},resetMapFilter:function(){const e=this.mapFilters.alert;let t;e.with?e.without||(t={HAS:"alert"}):e.without?t={NOT:{HAS:"alert"}}:t={AND:[{NOT:{HAS:"alert"}},{HAS:"alert"}]},t?this.mapImp.setVisibilityFilter(t):this.mapImp.clearVisibilityFilter()},alertMouseEnterEmitted:function(e){if(this.mapImp)if(e.value){let t;e.key==="alert"?t={HAS:"alert"}:e.key==="withoutAlert"&&(t={NOT:{HAS:"alert"}}),this.mapImp.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)},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){let t=this.mapImp.taxonFeatureIds(e.key);this.mapImp.enableConnectivityByTaxonIds(e.key,e.value),this.mapImp.zoomToGeoJSONFeatures(t,{noZoomIn:!0})}else this.mapImp.selectGeoJSONFeatures("-1"),e.selections.forEach(t=>{let r=e.checked.includes(t.taxon);this.mapImp.enableConnectivityByTaxonIds(t.taxon,r)})},checkAllTaxons:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableConnectivityByTaxonIds(t,e.value))},pathwaysSelected:function(e){this.mapImp&&this.mapImp.enablePath(e.key,e.value)},checkAllPathways:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enablePath(t,e.value))},enablePanZoomEvents:function(e){this.mapImp.enablePanZoomEvents(e)},annotationEventCallback:function(e,t){if(t.type==="aborted")this.featureAnnotationSubmitted?this.featureAnnotationSubmitted=!1:this.rollbackAnnotationEvent();else if(t.type==="modeChanged")t.feature.mode==="direct_select"&&(this.doubleClickedFeature=!0);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&&(this.connectionEntry={},this.selectedDrawnFeature)){const r=this.existDrawnFeatures.find(n=>n.id===this.selectedDrawnFeature.id);r&&r.connection&&(this.connectionEntry=r.connection),this.annotationDrawModeEvent(e)}}else{if(t.type==="created"||t.type==="updated"){t.type==="updated"&&t.feature.action&&(t.positionUpdated=t.feature.action==="move");const r=this.mapImp.refreshAnnotationFeatureGeometry(t.feature);e.feature.feature=r}t.type==="created"?this.drawnCreatedEvent=e:this.checkAndCreatePopups(e)}},eventCallback:function(){return(e,t,...r)=>{if(e==="annotation"){const n={feature:t,userData:r,eventType:e};this.annotationEventCallback(n,t)}else if(e!=="pan-zoom"){const n=t.label,i=[t.models],o=this.entry,s=this.biologicalSex;let l;t.taxons&&(typeof t.taxons!="object"?l=JSON.parse(t.taxons):l=t.taxons);const c={dataset:t.dataset,biologicalSex:s,taxonomy:o,resource:i,label:n,feature:t,userData:r,eventType:e,provenanceTaxonomy:l};if(e==="click"){if(this.featuresAlert=t.alert,this.viewingMode==="Neuron Connection")this.highlightConnectedPaths([t.models]);else if(this.currentActive=t.models?t.models:"",this.activeDrawTool&&!this.isValidDrawnCreated){const u=t.featureId||this.existDrawnFeatures.find(d=>d.id===t.id);if(this.activeDrawTool==="LineString"&&u){const d=t.featureId?t.featureId:t.id,h=t.label?t.label:`Feature ${t.id}`;this.connectionEntry[` ${d}`]=Object.assign({label:h},Object.fromEntries(Object.entries(t).filter(([p])=>["featureId","models"].includes(p)).map(([p,f])=>[p==="featureId"?"id":p,f])))}}}else e==="mouseenter"&&this.viewingMode!=="Neuron Connection"&&(this.currentHover=t.models?t.models:"");t&&t.type!=="marker"&&e==="click"&&this.viewingMode!=="Neuron Connection"&&!this.activeDrawTool&&this.checkAndCreatePopups(c),this.$emit("resource-selected",c)}else this.$emit("pan-zoom-callback",t)}},changeViewingMode:function(e){e&&(this.viewingMode=e),this.closeTooltip()},checkAndCreatePopups:async function(e){if(this.viewingMode==="Annotation")e.feature?(this.annotationEntry={...e.feature,resourceId:this.serverURL},e.feature.featureId&&e.feature.models?this.displayTooltip(e.feature.models):e.feature.feature&&(this.activeDrawTool||this.activeDrawMode||Object.keys(this.connectionEntry).length>0?(this.featureAnnotationSubmitted=!1,this.annotationEntry.featureId=e.feature.feature.id,this.activeDrawTool&&this.createConnectivityBody(),this.displayTooltip(e.feature.feature.id,xjr(e.feature.feature.geometry))):this.rollbackAnnotationEvent())):this.annotation={};else{let t=await this.flatmapQueries.retrieveFlatmapKnowledgeForEvent(e);(t[0]||t[1]||e.feature.hyperlinks&&e.feature.hyperlinks.length>0)&&(this.resourceForTooltip=e.resource[0],e.resourceForTooltip=this.resourceForTooltip,this.createTooltipFromNeuronCuration(e))}},popUpCssHacks:function(){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.$el.style.display="none",document.querySelectorAll(".maplibregl-popup").forEach(e=>{e.style.display="none"})},createTooltipFromNeuronCuration:async function(e){this.tooltipEntry=await this.flatmapQueries.createTooltipData(e),this.displayTooltip(e.resource[0])},showPopup:function(e,t,r){let n=r;this.mapImp&&(n?n.className||(n.className="custom-popup"):n={className:"custom-popup",positionAtLastClick:!0},this.mapImp.showPopup(e,t,n))},showMarkerPopup:function(e,t,r){this.mapImp&&this.mapImp.showMarkerPopup(e,t,r)},closeMinimap:function(){let e=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");this.minimapSmall?(e.classList.add("enlarge"),e.classList.remove("shrink")):(e.classList.add("shrink"),e.classList.remove("enlarge")),this.minimapSmall=!this.minimapSmall},addResizeButtonToMinimap:function(){let e=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");e&&(this.$refs.minimapResize&&this.$refs.minimapResize.$el.parentNode&&this.$refs.minimapResize.$el.parentNode.removeChild(this.$refs.minimapResize.$el),e.appendChild(this.$refs.minimapResize.$el),this.minimapResizeShow=!0)},setHelpMode:function(e){const t=this.hoverVisibilities.length,r=t-1,n=this.hoverVisibilities[this.helpModeActiveIndex];if(n){const i=n==null?void 0:n.refs,o=n==null?void 0:n.ref,s=this.$refs[i||o];if(s){const{parentElement:l,nextElementSibling:c}=s.$el,u=d=>d&&(d.classList.contains("pathway-container")||d.classList.contains("pathway-location"));(u(l)||u(c))&&(this.drawerOpen=!0)}else this.helpModeActiveIndex+=1}e||(this.helpModeActiveIndex=this.helpModeInitialIndex),this.viewingMode!=="Annotation"&&this.helpModeActiveIndex>9&&(this.helpModeActiveIndex=r),e&&this.helpModeActiveIndex>=r&&this.$emit("help-mode-last-item",!0),e&&!this.helpModeDialog?(this.inHelp=!0,this.hoverVisibilities.forEach(i=>{i.value=!0})):e&&this.helpModeDialog&&t>this.helpModeActiveIndex?this.helpModeActiveIndex>-1?(this.closeFlatmapHelpPopup(),setTimeout(()=>{this.inHelp=!1,this.hoverVisibilities.forEach(i=>{i.value=!1}),this.showTooltip(this.helpModeActiveIndex,200)},300)):this.helpModeActiveIndex===-1&&this.openFlatmapHelpPopup():(this.inHelp=!1,this.hoverVisibilities.forEach(i=>{i.value=!1}),this.closeFlatmapHelpPopup())},showTooltip:function(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 r,n={className:"flatmapvuer-popover"};t?(r=e,n.annotationFeatureGeometry=t):(r=this.mapImp.modelFeatureIds(e)[0],this.activeDrawTool||(n.positionAtLastClick=!0)),this.connectivityInfoSidebar&&this.hasTooltipEntry()&&this.viewingMode!=="Annotation"&&(this.featuresAlert&&(this.tooltipEntry.featuresAlert=this.featuresAlert),this.$emit("connectivity-info-open",this.tooltipEntry)),!this.disableUI&&(this.viewingMode==="Annotation"||this.viewingMode==="Exploration"&&!this.connectivityInfoSidebar&&this.hasTooltipEntry())&&(this.tooltipDisplay=!0,this.$nextTick(()=>{this.mapImp.showPopup(r,this.$refs.tooltip.$el,n),this.popUpCssHacks()}))},hasTooltipEntry:function(){const{components:e,destinations:t,origins:r,provenanceTaxonomy:n,provenanceTaxonomyLabel:i}=this.tooltipEntry;return!!(e!=null&&e.length||t!=null&&t.length||r!=null&&r.length||n!=null&&n.length||i!=null&&i.length)},moveMap:function(e,t={}){if(this.mapImp){const{offsetX:r=0,offsetY:n=0,zoom:i=4}=t,o=this.mapImp._map,s=this.mapImp._bounds.toArray();this.mapImp.zoomToFeatures(e,{noZoomIn:!0}),this.showPathwaysDrawer(!1),s!=null&&s.length&&setTimeout(()=>{o.fitBounds(s,{offset:[r,n],zoom:i,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 r of t.values())r.label&&e.push(r.label);return Array.from(new Set(e))}},getState:function(){if(this.mapImp){let e={entry:this.entry,viewport:this.mapImp.getState()};const t=this.mapImp.getIdentifier();return this.biologicalSex?e.biologicalSex=this.biologicalSex:t&&t.biologicalSex&&(e.biologicalSex=t.biologicalSex),t&&t.uuid&&(e.uuid=t.uuid),e}},setState:function(e){e&&(this.mapImp&&e.entry&&this.entry==e.entry&&(!e.biologicalSex||e.biologicalSex===this.biologicalSex)?e.viewport&&this.mapImp.setState(e.viewport):this.createFlatmap(e),this.setStateRequired=!1)},restoreMapState:function(e){e&&(e.viewport&&this.mapImp.setState(e.viewport),e.searchTerm&&this.searchAndShowResult(e.searchTerm,!0))},setFlightPathInfo:function(e){(e===1.6||e>1.6)&&(this.displayFlightPathOption=!0,this.setFlightPath3D(!1))},createFlatmap:function(e){if(!this.mapImp&&!this.loading){this.loading=!0;let t=!1;this.displayMinimap&&(t={position:"top-right"});let r={taxon:this.entry};this.uuid&&(r.uuid=this.uuid),e?e.uuid?r={uuid:e.uuid}:e.entry&&(r.taxon=e.entry,e.biologicalSex?r.biologicalSex=e.biologicalSex:r.taxon==="NCBITaxon:9606"&&(r.biologicalSex="PATO:0000384")):this.biologicalSex&&(r.biologicalSex=this.biologicalSex),this.mapManager.loadMap(r,this.$refs.display,this.eventCallback(),{minZoom:this.minZoom,tooltips:this.tooltips,minimap:t}).then(n=>{this.mapImp=n,this.serverURL=this.mapImp.makeServerUrl("").slice(0,-1);let i=this.mapImp.details.version;this.setFlightPathInfo(i),this.onFlatmapReady(),this._stateToBeSet?this.restoreMapState(this._stateToBeSet):this.restoreMapState(e)})}else e&&(this._stateToBeSet={viewport:e.viewport,searchTerm:e.searchTerm},this.mapImp&&!this.loading&&this.restoreMapState(this._stateToBeSet))},computePathControlsMaximumHeight(){const e=this.$refs.display;if(e){const t=getComputedStyle(e),r=parseInt(t.paddingTop)+parseInt(t.paddingBottom),n=e.clientHeight-r;this.pathwaysMaxHeight=n-170}},mapResize:function(){try{this.computePathControlsMaximumHeight(),this.mapImp&&(this.mapImp.resize(),this.showMinimap(this.displayMinimap),this.mapImp._minimap&&this.mapImp._minimap._miniMap.resize())}catch{console.error("Map resize error")}},onFlatmapReady:function(){this.sensor=a.markRaw(new qpr(this.$refs.display,this.mapResize)),this.mapImp.options&&this.mapImp.options.style==="functional"&&(this.isFC=!0),this.mapImp.setBackgroundOpacity(1),this.backgroundChangeCallback(this.currentBackground),this.pathways=this.mapImp.pathTypes(),this.mapImp.enableCentrelines(!1),this.processSystems(this.mapImp.getSystems()),this.processTaxon(this.flatmapAPI,this.mapImp.taxonIdentifiers),this.containsAlert="alert"in this.mapImp.featureFilterRanges(),this.addResizeButtonToMinimap(),this.loading=!1,this.computePathControlsMaximumHeight(),this.drawerOpen=!0,this.mapResize(),this.handleMapClick(),this.$emit("ready",this)},handleMapClick:function(){const e=this.mapImp._map;e&&e.on("click",t=>{this.tooltipEntry.featureId&&this.$emit("connectivity-info-close")})},showMinimap:function(e){this.mapImp&&this.mapImp.showMinimap(e)},showPathwaysDrawer:function(e){this.drawerOpen=e},searchAndShowResult:function(e,t){if(this.mapImp){if(e===void 0||e==="")return this.mapImp.clearSearchResults(),!0;{const r=this.mapImp.search(e);if(r&&r.results&&r.results.length>0){if(this.mapImp.showSearchResults(r),t&&r.results[0].featureId&&r.results[0].text){const n=this.mapImp.annotation(r.results[0].featureId);this.mapImp.showPopup(r.results[0].featureId,n.label,{className:"custom-popup",positionAtLastClick:!1,preserveSelection:!0})}return!0}else this.mapImp.clearSearchResults()}}return!1},searchSuggestions:function(e){return this.mapImp?this.mapImp.search(e):[]}},props:{entry:{type:String,required:!0},uuid:String,biologicalSex:{type:String,default:""},minZoom:{type:Number,default:4},tooltips:{type:Boolean,default:!0},helpMode:{type:Boolean,default:!1},helpModeActiveItem:{type:Number,default:0},helpModeDialog:{type:Boolean,default:!1},helpModeLastItem:{type:Boolean,default:!1},helpModeInitialIndex:{type:Number,default:0},renderAtMounted:{type:Boolean,default:!0},displayMinimap:{type:Boolean,default:!1},displayWarning:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array,default:function(){return[{display:"Open AC Map",key:"AC"},{display:"Open FC Map",key:"FC"},{display:"Open 3D Human Map",key:"3D"}]}},showStarInLegend:{type:Boolean,default:!1},isLegacy:{type:Boolean,default:!1},displayLatestChanges:{type:Boolean,default:!1},state:{type:Object,default:void 0},flatmapAPI:{type:String,default:"https://mapcore-demo.org/current/flatmap/v3/"},sparcAPI:{type:String,default:"https://api.sparc.science/"},disableUI:{type:Boolean,default:!1},connectivityInfoSidebar:{type:Boolean,default:!1}},provide(){return{flatmapAPI:this.flatmapAPI,sparcAPI:this.sparcAPI,$annotator:this.annotator,getFeaturesAlert:()=>this.featuresAlert,userApiKey:this.userToken}},data:function(){return{sensor:null,mapManager:void 0,flatmapQueries:void 0,annotationEntry:{},tooltipDisplay:!1,serverURL:void 0,layers:[],pathways:[],sckanDisplay:[{label:"Display Path with SCKAN",key:"VALID"}],centreLines:[{label:"Display Nerves",key:"centrelines",enabled:!1}],systems:[],taxonConnectivity:[],pathwaysMaxHeight:1e3,tooltipWait:a.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:Gpr,isFC:!1,inHelp:!1,currentBackground:"white",availableBackground:["white","lightskyblue","black"],loading:!1,flatmapMarker:jpr,tooltipEntry:_jr(),connectivityTooltipVisible:!1,drawerOpen:!1,featuresAlert:void 0,flightPath3DRadio:!1,displayFlightPathOption:!1,colourRadio:!0,outlinesRadio:!0,minimapResizeShow:!1,minimapSmall:!1,currentActive:"",selectedDrawnFeature:void 0,currentHover:"",viewingMode:"Exploration",viewingModes:{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 internal identifiers of features"},drawnType:"All tools",drawnTypes:["All tools","Point","LineString","Polygon","None"],annotatedType:"Anyone",annotatedTypes:["Anyone","Me","Others"],openMapRef:void 0,backgroundIconRef:void 0,toolbarOptions:["Edit","Delete","Point","LineString","Polygon","Connection"],annotator:void 0,userInformation:void 0,activeDrawMode:void 0,activeDrawTool:void 0,featureAnnotationSubmitted:!1,drawnCreatedEvent:{},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:a.markRaw({alert:{with:!0,without:!0}})}},computed:{...bjr(Qjr,["userToken"]),isValidDrawnCreated:function(){return Object.keys(this.drawnCreatedEvent).length>0}},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))},state:{handler:function(e,t){e!==t&&(this.mapManager?this.setState(e):this.setStateRequired=!0)},immediate:!0,deep:!0},viewingMode:function(e){e==="Annotation"?(this.loading=!0,this.annotator.authenticate(this.userToken).then(t=>{t.name&&t.email&&(this.showAnnotator(!0),this.userInformation=t,this.setFeatureAnnotated(),this.existDrawnFeatures.length===0&&this.addAnnotationFeature()),this.loading=!1})):this.showAnnotator(!1)},disableUI:function(e){e&&this.closeTooltip()}},mounted:function(){this.openMapRef=a.shallowRef(this.$refs.openMapRef),this.backgroundIconRef=a.shallowRef(this.$refs.backgroundIconRef),this.tooltipWait.length=this.hoverVisibilities.length,this.mapManager=a.markRaw(new A1e(this.flatmapAPI)),this.flatmapQueries=a.markRaw(new Upr),this.flatmapQueries.initialise(this.flatmapAPI),this.state?this.setStateRequired&&this.setState(this.state):this.renderAtMounted&&this.createFlatmap()}},Cp=e=>(a.pushScopeId("data-v-84223540"),e=e(),a.popScopeId(),e),Ljr={class:"flatmap-container",ref:"flatmapContainer","element-loading-text":"Loading...","element-loading-background":"rgba(0, 0, 0, 0.3)"},Sjr={style:{height:"100%",width:"100%",position:"relative","overflow-y":"none"}},kjr={style:{height:"100%",width:"100%"},ref:"display"},Cjr={class:"beta-popovers"},Mjr=Cp(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1)),Ejr=Cp(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1)),Ajr=Cp(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1)),Ojr=Cp(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1)),Ijr=Cp(()=>a.createElementVNode("span",{class:"warning-text"},"Legacy Map",-1)),Pjr={key:1,class:"warning-text"},Vjr=Cp(()=>a.createElementVNode("span",{class:"warning-text"},"What's new?",-1)),Hjr=Cp(()=>a.createElementVNode("b",null,"Neuron Connection mode",-1)),Rjr=Cp(()=>a.createElementVNode("p",null," You can now view the network of neurons connected to a selected neuron. This mode is located in the settings at the bottom right. Once discovery mode is on, click on a neuron to see its connections. ",-1)),Njr=Cp(()=>a.createElementVNode("b",null,"Now can display up to 6 panes",-1)),Bjr=Cp(()=>a.createElementVNode("p",null," You can now display up to 6 panes in the flatmap. This allows you to compare between different datasets and/or different views of the same dataset. ",-1)),Fjr={class:"bottom-right-control"},Djr=Cp(()=>a.createElementVNode("div",null,[a.createTextVNode(" Fit to "),a.createElementVNode("br"),a.createTextVNode(" window ")],-1)),zjr=["innerHTML"],jjr=["innerHTML"],Ujr={style:{"margin-bottom":"2px"}},Gjr={key:0,class:"viewing-mode-title"},Wjr=["onClick"],qjr=["onClick"];function Zjr(e,t,r,n,i,o){const s=a.resolveComponent("map-svg-sprite-color"),l=wMe,c=Cu,u=IB,d=_ne,h=a.resolveComponent("DrawToolbar"),p=a.resolveComponent("map-svg-icon"),f=xAe,m=a.resolveComponent("tree-controls"),g=QAe,T=xMe,y=WEe,v=GC,Q=WC,_=aie,L=OB,w=lAe,S=cAe,C=a.resolveComponent("Tooltip"),E=TAe,O=lie;return a.withDirectives((a.openBlock(),a.createElementBlock("div",Ljr,[a.createVNode(s),a.createElementVNode("div",Sjr,[a.createElementVNode("div",kjr,null,512),a.withDirectives(a.createElementVNode("div",Cjr,[a.createElementVNode("div",null,[a.createVNode(u,{placement:"right","popper-class":"warning-popper flatmap-popper",teleported:!1,visible:e.hoverVisibilities[7].value,ref:"warningPopover"},{reference:a.withCtx(()=>[r.displayWarning?(a.openBlock(),a.createElementBlock("div",{key:0,class:"warning-icon",onMouseover:t[7]||(t[7]=I=>o.showTooltip(6)),onMouseout:t[8]||(t[8]=I=>o.hideTooltip(6))},[a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(l)]),_:1}),r.isLegacy?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[Ijr,a.createElementVNode("div",{class:"latest-map-text",onClick:t[6]||(t[6]=(...I)=>o.viewLatestMap&&o.viewLatestMap(...I))}," Click here for the latest map ")],64)):(a.openBlock(),a.createElementBlock("span",Pjr,"Beta"))],32)):a.createCommentVNode("",!0)]),default:a.withCtx(()=>[r.isLegacy?(a.openBlock(),a.createElementBlock("p",{key:0,onMouseover:t[0]||(t[0]=I=>o.showTooltip(7)),onMouseout:t[1]||(t[1]=I=>o.hideTooltip(7))}," This is a legacy map, you may view the latest map instead. ",32)):e.isFC?(a.openBlock(),a.createElementBlock("p",{key:1,onMouseover:t[2]||(t[2]=I=>o.showTooltip(7)),onMouseout:t[3]||(t[3]=I=>o.hideTooltip(7))},[a.createTextVNode(" This map displays the connectivity of individual neurons. Specifically, those which align with (parts of) the neuron populations from the "),Mjr,a.createTextVNode(" models available in "),Ejr,a.createTextVNode(". ")],32)):(a.openBlock(),a.createElementBlock("p",{key:2,onMouseover:t[4]||(t[4]=I=>o.showTooltip(6)),onMouseout:t[5]||(t[5]=I=>o.hideTooltip(6))},[a.createTextVNode(" This map displays the connectivity of neuron populations. Specifically, those from the primarily rat-based "),Ajr,a.createTextVNode(" models available in "),Ojr,a.createTextVNode(". New connectivity and species specificity will be added as the SPARC program progresses. ")],32))]),_:1},8,["visible"])]),r.displayLatestChanges?(a.openBlock(),a.createBlock(u,{key:0,placement:"right",teleported:!1,trigger:"manual","popper-class":"warning-popper flatmap-popper",visible:e.hoverVisibilities[8].value,ref:"whatsNewPopover"},{reference:a.withCtx(()=>[r.displayLatestChanges?(a.openBlock(),a.createElementBlock("div",{key:0,class:"latest-changesicon",onMouseover:t[9]||(t[9]=I=>o.showTooltip(8)),onMouseout:t[10]||(t[10]=I=>o.hideTooltip(8))},[a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(l)]),_:1}),Vjr],32)):a.createCommentVNode("",!0)]),default:a.withCtx(()=>[Hjr,Rjr,Njr,Bjr]),_:1},8,["visible"])):a.createCommentVNode("",!0)],512),[[a.vShow,!r.disableUI]]),a.withDirectives(a.createVNode(c,{class:a.normalizeClass(["minimap-resize",{enlarge:e.minimapSmall,shrink:!e.minimapSmall}]),ref:"minimapResize",onClick:o.closeMinimap},{default:a.withCtx(()=>[a.createVNode(d)]),_:1},8,["class","onClick"]),[[a.vShow,e.minimapResizeShow]]),e.viewingMode==="Annotation"&&e.userInformation&&!r.disableUI?(a.openBlock(),a.createBlock(h,{key:0,mapCanvas:{containerHTML:this.$el,class:".maplibregl-canvas"},toolbarOptions:e.toolbarOptions,drawnType:e.drawnType,activeDrawTool:e.activeDrawTool,activeDrawMode:e.activeDrawMode,newlyDrawnEntry:e.drawnCreatedEvent,connectionEntry:e.connectionEntry,hoverVisibilities:e.hoverVisibilities,onClickToolbar:o.toolbarEvent,onFeatureTooltip:o.connectedFeatureTooltip,onConfirmDrawn:o.confirmDrawnFeature,onCancelDrawn:o.cancelDrawnFeature,onShowTooltip:o.showTooltip,onHideTooltip:o.hideTooltip,ref:"toolbarPopover"},null,8,["mapCanvas","toolbarOptions","drawnType","activeDrawTool","activeDrawMode","newlyDrawnEntry","connectionEntry","hoverVisibilities","onClickToolbar","onFeatureTooltip","onConfirmDrawn","onCancelDrawn","onShowTooltip","onHideTooltip"])):a.createCommentVNode("",!0),a.withDirectives(a.createElementVNode("div",Fjr,[a.createVNode(u,{content:"Zoom in",placement:"left",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[1].value,ref:"zoomInPopover"},{reference:a.withCtx(()=>[a.createVNode(p,{icon:"zoomIn",class:"icon-button zoomIn",onClick:t[11]||(t[11]=I=>o.zoomIn()),onMouseover:t[12]||(t[12]=I=>o.showTooltip(1)),onMouseout:t[13]||(t[13]=I=>o.hideTooltip(1))})]),_:1},8,["visible"]),a.createVNode(u,{content:"Zoom out",placement:"top-end",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[2].value,ref:"zoomOutPopover"},{reference:a.withCtx(()=>[a.createVNode(p,{icon:"zoomOut",class:"icon-button zoomOut",onClick:t[14]||(t[14]=I=>o.zoomOut()),onMouseover:t[15]||(t[15]=I=>o.showTooltip(2)),onMouseout:t[16]||(t[16]=I=>o.hideTooltip(2))})]),_:1},8,["visible"]),a.createVNode(u,{content:"Reset",placement:"top",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[3].value,ref:"zoomFitPopover"},{reference:a.withCtx(()=>[a.createVNode(p,{icon:"fitWindow",class:"icon-button fitWindow",onClick:t[17]||(t[17]=I=>o.resetView()),onMouseover:t[18]||(t[18]=I=>o.showTooltip(3)),onMouseout:t[19]||(t[19]=I=>o.hideTooltip(3))})]),default:a.withCtx(()=>[Djr]),_:1},8,["visible"])],512),[[a.vShow,!r.disableUI]]),a.createVNode(u,{content:"Change pathway visibility",placement:"right",teleported:!1,trigger:"manual",offset:-18,"popper-class":"flatmap-popper",visible:e.hoverVisibilities[6].value,ref:"checkBoxPopover"},{reference:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{class:a.normalizeClass(["pathway-location",{open:e.drawerOpen,close:!e.drawerOpen}])},[a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["pathway-container",{open:e.drawerOpen,close:!e.drawerOpen}]),style:a.normalizeStyle({"max-height":e.pathwaysMaxHeight+"px"})},[e.isFC?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(f,{key:0,class:"svg-legends-container"})),r.showStarInLegend?(a.openBlock(),a.createBlock(u,{key:1,content:"Location of the featured dataset",placement:"right",teleported:!0,trigger:"manual",width:"max-content",offset:-10,"popper-class":"flatmap-popper flatmap-teleport-popper",visible:e.hoverVisibilities[9].value,ref:"featuredMarkerPopover"},{reference:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{class:"yellow-star-legend",innerHTML:e.yellowstar,onMouseover:t[20]||(t[20]=I=>o.showTooltip(9)),onMouseout:t[21]||(t[21]=I=>o.hideTooltip(9))},null,40,zjr),[[E,void 0,"featuredMarkerPopover"]])]),_:1},8,["visible"])):a.createCommentVNode("",!0),a.createVNode(u,{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[5].value,ref:"markerPopover"},{reference:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{class:"flatmap-marker-help",innerHTML:e.flatmapMarker},null,8,jjr),[[a.vShow,e.hoverVisibilities[0].value],[E,void 0,"markerPopover"]])]),_:1},8,["visible"]),e.isFC&&e.systems&&e.systems.length>0?(a.openBlock(),a.createBlock(m,{key:2,class:"treeControls",mapType:"flatmap",title:"Systems",treeData:e.systems,active:e.currentActive,hover:e.currentHover,onCheckChanged:o.systemSelected,onCheckAll:o.checkAllSystems,onChangeActive:o.ftuSelected,ref:"treeControls"},null,8,["treeData","active","hover","onCheckChanged","onCheckAll","onChangeActive"])):a.createCommentVNode("",!0),e.containsAlert&&e.alertOptions?(a.openBlock(),a.createBlock(g,{title:"Alert",labelKey:"label",identifierKey:"key",selections:e.alertOptions,onChanged:o.alertSelected,onCheckboxMouseEnter:o.alertMouseEnterEmitted,onSelectionsDataChanged:o.onSelectionsDataChanged,onCheckAll:o.checkAllAlerts,ref:"alertSelection",key:"alertSelection"},null,8,["selections","onChanged","onCheckboxMouseEnter","onSelectionsDataChanged","onCheckAll"])):a.createCommentVNode("",!0),e.pathways&&e.pathways.length>0?(a.openBlock(),a.createBlock(g,{title:"Pathways",labelKey:"label",identifierKey:"type",colourStyle:"line",selections:e.pathways,onChanged:o.pathwaysSelected,onSelectionsDataChanged:o.onSelectionsDataChanged,onCheckAll:o.checkAllPathways,ref:"pathwaysSelection",key:"pathwaysSelection"},null,8,["selections","onChanged","onSelectionsDataChanged","onCheckAll"])):a.createCommentVNode("",!0),!e.isFC&&e.taxonConnectivity&&e.taxonConnectivity.length>0?(a.openBlock(),a.createBlock(g,{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:o.taxonsSelected,onCheckboxMouseEnter:o.taxonMouseEnterEmitted,onSelectionsDataChanged:o.onSelectionsDataChanged,onCheckAll:o.checkAllTaxons,ref:"taxonSelection",key:"taxonSelection"},null,8,["selections","onChanged","onCheckboxMouseEnter","onSelectionsDataChanged","onCheckAll"])):a.createCommentVNode("",!0),!e.isFC&&e.centreLines&&e.centreLines.length>0?(a.openBlock(),a.createBlock(g,{title:"Nerves",labelKey:"label",identifierKey:"key",selections:e.centreLines,onChanged:o.centreLinesSelected,onSelectionsDataChanged:o.onSelectionsDataChanged,ref:"centrelinesSelection",key:"centrelinesSelection"},null,8,["selections","onChanged","onSelectionsDataChanged"])):a.createCommentVNode("",!0)],6)),[[E,void 0,"checkBoxPopover"]]),a.createElementVNode("div",{onClick:t[22]||(t[22]=(...I)=>o.toggleDrawer&&o.toggleDrawer(...I)),class:a.normalizeClass(["drawer-button",{open:e.drawerOpen,close:!e.drawerOpen}])},[a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(T)]),_:1})],2)],2),[[a.vShow,!r.disableUI]])]),_:1},8,["visible"]),e.openMapRef?(a.openBlock(),a.createBlock(u,{key:1,ref:"open-map-popover","virtual-ref":e.openMapRef,placement:"top-start",width:"136",teleported:!1,trigger:"click","popper-class":"open-map-popper non-selectable","virtual-triggering":""},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.openMapOptions,I=>(a.openBlock(),a.createBlock(v,{key:I.key},{default:a.withCtx(()=>[a.createVNode(y,{type:"primary",plain:"",onClick:R=>e.$emit("open-map",I.key)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(I.display),1)]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1},8,["virtual-ref"])):a.createCommentVNode("",!0),a.createVNode(u,{ref:"backgroundPopover","virtual-ref":e.backgroundIconRef,placement:"top-start",width:"320",teleported:!1,trigger:"click","popper-class":"background-popper h-auto","virtual-triggering":""},{default:a.withCtx(()=>[a.createElementVNode("div",null,[a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Viewing Mode")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createElementVNode("div",Ujr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.viewingModes,(I,R,B)=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:R},[R===e.viewingMode?(a.openBlock(),a.createElementBlock("span",Gjr,[a.createElementVNode("b",null,a.toDisplayString(R),1)])):(a.openBlock(),a.createElementBlock("span",{key:1,class:"viewing-mode-unselected",onClick:D=>o.changeViewingMode(R)},a.toDisplayString(R),9,Wjr))],64))),128))]),a.createVNode(v,{class:"viewing-mode-description"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(e.viewingModes[e.viewingMode]),1)]),_:1})]),_:1}),e.viewingMode==="Annotation"&&e.userInformation?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Drawn By*")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(L,{teleported:!1,modelValue:e.drawnType,"onUpdate:modelValue":t[23]||(t[23]=I=>e.drawnType=I),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown",onChange:o.setDrawnType},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.drawnTypes,I=>(a.openBlock(),a.createBlock(_,{key:I,label:I,value:I},{default:a.withCtx(()=>[a.createVNode(v,null,{default:a.withCtx(()=>[a.createVNode(Q,{span:12},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(I),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Annotated By*")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(L,{teleported:!1,modelValue:e.annotatedType,"onUpdate:modelValue":t[24]||(t[24]=I=>e.annotatedType=I),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown",onChange:o.setAnnotatedType},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.annotatedTypes,I=>(a.openBlock(),a.createBlock(_,{key:I,label:I,value:I},{default:a.withCtx(()=>[a.createVNode(v,null,{default:a.withCtx(()=>[a.createVNode(Q,{span:12},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(I),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1})],64)):a.createCommentVNode("",!0),e.displayFlightPathOption?(a.openBlock(),a.createBlock(v,{key:1,class:"backgroundSpacer"})):a.createCommentVNode("",!0),e.displayFlightPathOption?(a.openBlock(),a.createBlock(v,{key:2,class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Flight path display")]),_:1})):a.createCommentVNode("",!0),e.displayFlightPathOption?(a.openBlock(),a.createBlock(v,{key:3,class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(S,{modelValue:e.flightPath3DRadio,"onUpdate:modelValue":t[25]||(t[25]=I=>e.flightPath3DRadio=I),class:"flatmap-radio",onChange:o.setFlightPath3D},{default:a.withCtx(()=>[a.createVNode(w,{label:!1},{default:a.withCtx(()=>[a.createTextVNode("2D")]),_:1}),a.createVNode(w,{label:!0},{default:a.withCtx(()=>[a.createTextVNode("3D")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1})):a.createCommentVNode("",!0),a.createVNode(v,{class:"backgroundSpacer"}),a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Organs display")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(S,{modelValue:e.colourRadio,"onUpdate:modelValue":t[26]||(t[26]=I=>e.colourRadio=I),class:"flatmap-radio",onChange:o.setColour},{default:a.withCtx(()=>[a.createVNode(w,{label:!0},{default:a.withCtx(()=>[a.createTextVNode("Colour")]),_:1}),a.createVNode(w,{label:!1},{default:a.withCtx(()=>[a.createTextVNode("Greyscale")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),a.createVNode(v,{class:"backgroundSpacer"}),a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Outlines display")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(S,{modelValue:e.outlinesRadio,"onUpdate:modelValue":t[27]||(t[27]=I=>e.outlinesRadio=I),class:"flatmap-radio",onChange:o.setOutlines},{default:a.withCtx(()=>[a.createVNode(w,{label:!0},{default:a.withCtx(()=>[a.createTextVNode("Show")]),_:1}),a.createVNode(w,{label:!1},{default:a.withCtx(()=>[a.createTextVNode("Hide")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),a.createVNode(v,{class:"backgroundSpacer"}),a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Change background")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.availableBackground,I=>(a.openBlock(),a.createElementBlock("div",{key:I,class:a.normalizeClass(["backgroundChoice",I,I==e.currentBackground?"active":""]),onClick:R=>o.backgroundChangeCallback(I)},null,10,qjr))),128))]),_:1})])]),_:1},8,["virtual-ref"]),a.withDirectives(a.createElementVNode("div",{class:a.normalizeClass(["settings-group",{open:e.drawerOpen,close:!e.drawerOpen}])},[a.createVNode(v,null,{default:a.withCtx(()=>[a.createVNode(u,{visible:e.hoverVisibilities[4].value,content:"Open new map",placement:"right",teleported:!1,"popper-class":"flatmap-popper",ref:"openMapPopover"},{reference:a.withCtx(()=>[r.enableOpenMapUI&&r.openMapOptions.length>0?(a.openBlock(),a.createBlock(p,{key:0,ref:"openMapRef",icon:"openMap",class:"icon-button open-map-button",onMouseover:t[28]||(t[28]=I=>o.showTooltip(4)),onMouseout:t[29]||(t[29]=I=>o.hideTooltip(4))},null,512)):a.createCommentVNode("",!0)]),_:1},8,["visible"])]),_:1}),a.createVNode(v,null,{default:a.withCtx(()=>[a.createVNode(u,{content:"Change settings",placement:"right",visible:e.hoverVisibilities[5].value,teleported:!1,trigger:"manual","popper-class":"flatmap-popper",ref:"settingsPopover"},{reference:a.withCtx(()=>[a.createVNode(p,{ref:"backgroundIconRef",icon:"changeBckgd",class:"icon-button",onMouseover:t[30]||(t[30]=I=>o.showTooltip(5)),onMouseout:t[31]||(t[31]=I=>o.hideTooltip(5))},null,512)]),_:1},8,["visible"])]),_:1})],2),[[a.vShow,!r.disableUI]]),a.withDirectives(a.createVNode(C,{ref:"tooltip",class:"tooltip",annotationEntry:e.annotationEntry,tooltipEntry:e.tooltipEntry,annotationDisplay:e.viewingMode==="Annotation",onAnnotation:o.commitAnnotationEvent},null,8,["annotationEntry","tooltipEntry","annotationDisplay","onAnnotation"]),[[a.vShow,e.tooltipDisplay]])])])),[[O,e.loading]])}const B1e=HB(wjr,[["render",Zjr],["__scopeId","data-v-84223540"]]);function Xjr(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map(function(i){i(r)}),(n=e.get("*"))&&n.slice().map(function(i){i(t,r)})}}}const Xje=new Xjr,Kje={"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"},Kjr={name:"MultiFlatmapVuer",components:{Col:WC,Row:GC,Option:aie,Select:OB,Popover:IB,FlatmapVuer:B1e},mounted:function(){this.initialise(),Xje.on("onActionClick",e=>{this.resourceSelected(e)}),Xje.on("open-pubmed-url",e=>{this.$emit("open-pubmed-url",e)})},methods:{initialise:function(){return new Promise(e=>{this.requireInitialisation?(this.requireInitialisation=!1,fetch(this.flatmapAPI).then(t=>t.json()).then(t=>{Object.keys(this.availableSpecies).forEach(n=>{const i=this.availableSpecies[n].uuid;if(i&&t.map(o=>o.uuid).indexOf(i)>0)this.speciesList[n]=this.availableSpecies[n];else for(let o=0;o<t.length;o++)if(this.availableSpecies[n].taxo===t[o].taxon)if(this.availableSpecies[n].biologicalSex){if(t[o].biologicalSex&&t[o].biologicalSex===this.availableSpecies[n].biologicalSex){this.speciesList[n]=this.availableSpecies[n];break}}else{this.speciesList[n]=this.availableSpecies[n];break}});let r=this.initial;if(this.state){const n=this.state.state;(!n||!n.uuid&&!n.entry)&&this.state.species?r=this.state.species:r=void 0}r&&(r&&this.speciesList[r]!==void 0?this.activeSpecies=r:this.activeSpecies=Object.keys(this.speciesList)[0],this.setSpecies(this.activeSpecies,this.state?this.state.state:void 0,5)),this.initialised=!0,e(),this.resolveList.forEach(n=>{n()})})):this.initialised?e():this.resolveList.push(e)})},resourceSelected:function(e){this.$emit("resource-selected",e)},FlatmapReady:function(e){this.$emit("ready",e)},getCurrentFlatmap:function(){return this.$refs[this.activeSpecies][0]},panZoomCallback:function(e){this.$emit("pan-zoom-callback",e)},onConnectivityInfoClose:function(){this.$emit("connectivity-info-close")},onConnectivityInfoOpen:function(e){this.$emit("connectivity-info-open",e)},onSelectionsDataChanged:function(e){this.$emit("pathway-selection-changed",e)},showPopup:function(e,t,r){this.getCurrentFlatmap().showPopup(e,t,r)},showMarkerPopup:function(e,t,r){this.getCurrentFlatmap().showMarkerPopup(e,t,r)},setSpecies:function(e,t,r){if(this.$refs&&e in this.$refs)this.activeSpecies=e,this.$refs[this.activeSpecies][0].createFlatmap(t),this.$emit("flatmapChanged",this.activeSpecies);else if(r){const n=r-1;n>=0&&this.$nextTick(()=>{this.setSpecies(e,t,n)})}},viewLatestMap:function(e){const t=Object.keys(this.speciesList);for(let r=0;r<t.length;r++){const n=this.speciesList[t[r]];if(!n.isLegacy&&n.taxo===e.entry&&n.biologicalSex===e.biologicalSex){this.setSpecies(t[r],e,0);return}}},createLegacyEntry:function(e,t,r){if(r&&t){let n="Legacy";return e.species&&(e.species.slice(0,6)==="Legacy"?n=e.species:n=n+` ${e.species}`),this.speciesList[n]={taxo:t,isLegacy:!0,displayWarning:!0},{species:n,state:{entry:t,uuid:r,viewport:e.state.viewport,searchTerm:e.state.searchTerm}}}},updateState:function(e){return new Promise(t=>{if(e&&e.state){const r=e.state;if(r.uuid){if(r.entry)return new Promise(()=>{const n=new A1e(this.flatmapAPI),i={taxon:r.entry};r.biologicalSex&&(i.biologicalSex=r.biologicalSex),n.findMap_(i).then(o=>{if(o.uuid!==r.uuid)return this.createLegacyEntry(e,r.entry,r.uuid)}).then(o=>{t(o||e)}).catch(()=>{t(e)})})}else if(r.entry){const n=r.entry in Kje?Kje[r.entry]:void 0,i=this.createLegacyEntry(e,r.entry,n);t(i||e)}}t(e)})},getState:function(){let e={species:this.activeSpecies,state:void 0},t=this.getCurrentFlatmap();return e.state=t.getState(),e},setState:function(e){e&&this.updateState(e).then(t=>{this.initialise().then(()=>{t.species&&t.species!==this.activeSpecies?this.setSpecies(t.species,t.state,5):t.state&&this.getCurrentFlatmap().setState(t.state)})})},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)}},props:{initial:{type:String,default:""},minZoom:{type:Number,default:4},renderAtMounted:{type:Boolean,default:!1},helpMode:{type:Boolean,default:!1},helpModeActiveItem:{type:Number,default:0},helpModeDialog:{type:Boolean,default:!1},helpModeLastItem:{type:Boolean,default:!1},displayMinimap:{type:Boolean,default:!1},showStarInLegend:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array},availableSpecies:{type:Object,default:function(){return{"Human Female":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000383",iconClass:"mapicon-icon_human",displayWarning:!0},"Human Male":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000384",iconClass:"mapicon-icon_human",displayWarning:!0},Rat:{taxo:"NCBITaxon:10114",iconClass:"mapicon-icon_rat",displayLatestChanges:!0},Mouse:{taxo:"NCBITaxon:10090",iconClass:"mapicon-icon_mouse",displayWarning:!0},Pig:{taxo:"NCBITaxon:9823",iconClass:"mapicon-icon_pig",displayWarning:!0},Cat:{taxo:"NCBITaxon:9685",iconClass:"mapicon-icon_cat",displayWarning:!0}}}},state:{type:Object,default:void 0},flatmapAPI:{type:String,default:"https://mapcore-demo.org/current/flatmap/v3/"},sparcAPI:{type:String,default:"https://api.sparc.science/"},disableUI:{type:Boolean,default:!1},connectivityInfoSidebar:{type:Boolean,default:!1}},data:function(){return{activeSpecies:void 0,speciesList:{},requireInitialisation:!0,resolveList:a.markRaw([]),initialised:!1}},watch:{state:{handler:function(e){this.setState(e)},immediate:!0,deep:!0}}},Yjr=e=>(a.pushScopeId("data-v-5364de02"),e=e(),a.popScopeId(),e),Jjr={class:"multi-container",ref:"multiContainer"},$jr={key:0,style:{position:"absolute","z-index":"10"}},eUr=Yjr(()=>a.createElementVNode("div",{class:"species-display-text"},"Species",-1)),tUr={class:"select-box-icon"};function rUr(e,t,r,n,i,o){const s=aie,l=OB,c=IB,u=B1e;return a.openBlock(),a.createElementBlock("div",Jjr,[r.disableUI?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",$jr,[eUr,a.createVNode(c,{content:"Select a species",placement:"right",trigger:"manual","popper-class":"flatmap-popper flatmap-teleport-popper right-popper",width:"max-content",visible:o.activateTooltipByIndex(0),teleported:!1,ref:"selectPopover"},{reference:a.withCtx(()=>[a.createVNode(l,{id:"flatmap-select",teleported:!1,modelValue:e.activeSpecies,"onUpdate:modelValue":t[0]||(t[0]=d=>e.activeSpecies=d),placeholder:"Select",class:"select-box","popper-class":"flatmap-dropdown",onChange:o.setSpecies},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.speciesList,(d,h)=>(a.openBlock(),a.createBlock(s,{key:h,label:h,value:h},{default:a.withCtx(()=>[a.createElementVNode("span",tUr,[a.createElementVNode("i",{class:a.normalizeClass(d.iconClass)},null,2)]),a.createTextVNode(" "+a.toDisplayString(h),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible"])])),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.speciesList,(d,h)=>a.withDirectives((a.openBlock(),a.createBlock(u,{key:h,entry:d.taxo,uuid:d.uuid,biologicalSex:d.biologicalSex,displayWarning:d.displayWarning,displayLatestChanges:d.displayLatestChanges,isLegacy:d.isLegacy,ref_for:!0,ref:h,enableOpenMapUI:r.enableOpenMapUI,openMapOptions:r.openMapOptions,disableUI:r.disableUI,onViewLatestMap:o.viewLatestMap,onResourceSelected:o.resourceSelected,onReady:o.FlatmapReady,onPanZoomCallback:o.panZoomCallback,connectivityInfoSidebar:r.connectivityInfoSidebar,onConnectivityInfoOpen:o.onConnectivityInfoOpen,onConnectivityInfoClose:o.onConnectivityInfoClose,onOpenMap:t[1]||(t[1]=p=>e.$emit("open-map",p)),onPathwaySelectionChanged:o.onSelectionsDataChanged,minZoom:r.minZoom,helpMode:e.activeSpecies==h&&r.helpMode,helpModeActiveItem:r.helpModeActiveItem,helpModeDialog:r.helpModeDialog,helpModeInitialIndex:-2,onHelpModeLastItem:o.onHelpModeLastItem,onShownTooltip:o.onTooltipShown,onShownMapTooltip:o.onMapTooltipShown,renderAtMounted:r.renderAtMounted,displayMinimap:r.displayMinimap,showStarInLegend:r.showStarInLegend,style:{height:"100%"},flatmapAPI:r.flatmapAPI,sparcAPI:r.sparcAPI},null,8,["entry","uuid","biologicalSex","displayWarning","displayLatestChanges","isLegacy","enableOpenMapUI","openMapOptions","disableUI","onViewLatestMap","onResourceSelected","onReady","onPanZoomCallback","connectivityInfoSidebar","onConnectivityInfoOpen","onConnectivityInfoClose","onPathwaySelectionChanged","minZoom","helpMode","helpModeActiveItem","helpModeDialog","onHelpModeLastItem","onShownTooltip","onShownMapTooltip","renderAtMounted","displayMinimap","showStarInLegend","flatmapAPI","sparcAPI"])),[[a.vShow,e.activeSpecies==h]])),128))],512)}const nUr=HB(Kjr,[["render",rUr],["__scopeId","data-v-5364de02"]]),iUr={name:"Flatmap",mixins:[rQ,Rwe],components:{FlatmapVuer:B1e,HelpModeDialog:nne},methods:{getState:function(){return this.$refs.flatmap.getState()},search:function(e){return this.$refs.flatmap.searchAndShowResult(e)},getFlatmapImp(){var e;return(e=this.$refs.flatmap)==null?void 0:e.mapImp},flatmaprResourceSelected:function(e,t){if(this.resourceSelected(e,t,this.$refs.flatmap.viewingMode==="Exploration"),t.eventType==="click"&&t.feature.type==="feature"){const r={label:t.label||"",id:t.feature.id||"",featureId:t.feature.featureId||"",taxonomy:t.taxonomy||"",resources:t.resource.join(", ")},n=cye(r);V1.sendEvent({event:"interaction_event",event_name:"portal_maps_connectivity",category:n,location:e+" "+this.$refs.flatmap.viewingMode})}},flatmapReadyCall:function(e){let t={id:this.entry.id,prov:this.getFlatmapImp().provenance};Li.emit("mapImpProv",t),this.$emit("flatmap-provenance-ready",t),this.entry.resource==="FunctionalConnectivity"&&this.flatmapReadyForMarkerUpdates(e),Li.emit("mapReady",e)},onPathwaySelectionChanged:function(e){const{label:t,property:r,checked:n,selectionsTitle:i}=e;V1.sendEvent({event:"interaction_event",event_name:"portal_maps_pathway_change",category:t+" ["+r+"] "+n,location:i})},highlightFeatures:function(e){let t=e.name;const r=this.$refs.flatmap.mapImp;if(t){const n=r.search(t);n.featureIds[0]&&r.highlightFeatures([r.modelForFeature(n.featureIds[0])])}},searchSuggestions:function(e,t){e&&this.$refs.flatmap.mapImp&&this.$refs.flatmap.mapImp.search(e).__featureIds.forEach(n=>{const i=this.$refs.flatmap.mapImp.annotation(n);i&&i.label&&t.push(i.label)})},zoomToFeatures:function(e,t){let r=e.name;const n=this.$refs.flatmap.mapImp;if(r){const i=n.search(r);if(i.featureIds.length){let o=n.modelForFeature(i.featureIds[0]);o?(t&&n.selectFeatures(o),n.zoomToFeatures(o)):n.clearSearchResults()}}else n.clearSearchResults()},changeViewingMode:function(e){this.$refs.flatmap.changeViewingMode(e)}},computed:{facetSpecies(){return this.settingsStore.facets.species}},mounted:function(){Li.on("markerUpdate",()=>{this.flatmapMarkerUpdate(void 0)}),Li.on("hoverUpdate",()=>{this.mapHoverHighlight(this.$refs.flatmap.mapImp)}),Li.on("show-connectivity",e=>{const{featureIds:t,offset:r}=e,n=this.$refs.flatmap;n&&n.moveMap(t,{offsetX:r?-150:0,zoom:4})}),Li.on("changeViewingMode",e=>{this.changeViewingMode(e)})}},oUr={class:"viewer-container"};function aUr(e,t,r,n,i,o){const s=a.resolveComponent("FlatmapVuer"),l=a.resolveComponent("HelpModeDialog");return a.openBlock(),a.createElementBlock("div",oUr,[a.createVNode(s,{state:e.entry.state,entry:e.entry.resource,onResourceSelected:t[0]||(t[0]=c=>o.flatmaprResourceSelected(e.entry.type,c)),onPanZoomCallback:e.flatmapPanZoomCallback,name:e.entry.resource,style:{height:"100%",width:"100%"},minZoom:e.entry.minZoom,helpMode:e.helpMode,helpModeActiveItem:e.helpModeActiveItem,helpModeInitialIndex:-1,helpModeDialog:e.useHelpModeDialog,onHelpModeLastItem:e.onHelpModeLastItem,onShownTooltip:e.onTooltipShown,onShownMapTooltip:e.onMapTooltipShown,onConnectivityInfoOpen:e.onConnectivityInfoOpen,onConnectivityInfoClose:e.onConnectivityInfoClose,connectivityInfoSidebar:e.connectivityInfoSidebar,pathControls:!0,ref:"flatmap",onReady:o.flatmapReadyCall,displayMinimap:!1,displayWarning:!0,enableOpenMapUI:!0,flatmapAPI:e.flatmapAPI,sparcAPI:e.apiLocation,onOpenMap:e.openMap,onPathwaySelectionChanged:o.onPathwaySelectionChanged},null,8,["state","entry","onPanZoomCallback","name","minZoom","helpMode","helpModeActiveItem","helpModeDialog","onHelpModeLastItem","onShownTooltip","onShownMapTooltip","onConnectivityInfoOpen","onConnectivityInfoClose","connectivityInfoSidebar","onReady","flatmapAPI","sparcAPI","onOpenMap","onPathwaySelectionChanged"]),e.helpMode&&e.useHelpModeDialog?(a.openBlock(),a.createBlock(l,{key:0,ref:"flatmapHelp",flatmapRef:e.flatmapRef,lastItem:e.helpModeLastItem,onShowNext:e.onHelpModeShowNext,onFinishHelpMode:e.onFinishHelpMode},null,8,["flatmapRef","lastItem","onShowNext","onFinishHelpMode"])):a.createCommentVNode("",!0)])}const sUr=Object.freeze(Object.defineProperty({__proto__:null,default:Zc(iUr,[["render",aUr],["__scopeId","data-v-c97b0a1f"]])},Symbol.toStringTag,{value:"Module"})),lUr={name:"Iframe",mixins:[rQ]},cUr={class:"map-iframe-container"},uUr=["src"];function dUr(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",cUr,[a.createElementVNode("iframe",{class:"my-iframe",src:e.entry.resource.share_link},null,8,uUr)])}const hUr=Object.freeze(Object.defineProperty({__proto__:null,default:Zc(lUr,[["render",dUr],["__scopeId","data-v-60f8bfe1"]])},Symbol.toStringTag,{value:"Module"})),pUr='<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><path d="M11.0748 3.25583C11.4141 2.42845 12.5859 2.42845 12.9252 3.25583L14.6493 7.45955C14.793 7.80979 15.1221 8.04889 15.4995 8.07727L20.0303 8.41798C20.922 8.48504 21.2841 9.59942 20.6021 10.1778L17.1369 13.1166C16.8482 13.3614 16.7225 13.7483 16.8122 14.1161L17.8882 18.5304C18.1 19.3992 17.152 20.0879 16.3912 19.618L12.5255 17.2305C12.2034 17.0316 11.7966 17.0316 11.4745 17.2305L7.60881 19.618C6.84796 20.0879 5.90001 19.3992 6.1118 18.5304L7.18785 14.1161C7.2775 13.7483 7.1518 13.3614 6.86309 13.1166L3.3979 10.1778C2.71588 9.59942 3.07796 8.48504 3.96971 8.41798L8.50046 8.07727C8.87794 8.04889 9.20704 7.80979 9.35068 7.45955L11.0748 3.25583Z" stroke="#000000" stroke-width="2"/></svg>',Yje=e=>{const t=[{display:"Open AC Map",key:"AC"},{display:"Open FC Map",key:"FC"},{display:"Open 3D Human Map",key:"3D"}];switch(e){case"Human Male":case"Human Female":case"Rat":t.push({display:"Open Sync Map",key:"SYNC"});break}return t},fUr={name:"MultiFlatmap",mixins:[rQ,Rwe],components:{MultiFlatmapVuer:nUr,HelpModeDialog:nne},data:function(){return{zoomLevel:6,flatmapReady:!1,availableSpecies:lye(),scaffoldResource:{},showStarInLegend:!1,openMapOptions:Yje("Rat")}},methods:{toggleSyncMode:async function(){if(this.syncMode==!1){let e;this.activeSpecies==="Rat"?e={contextCard:void 0,discoverId:void 0,label:"Rat Body",resource:"https://mapcore-bucket1.s3.us-west-2.amazonaws.com/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json",title:"View 3D scaffold",layout:"2horpanel",type:"SyncMap"}:(this.activeSpecies==="Human Male"||this.activeSpecies==="Human Female")&&("human"in this.scaffoldResource||(this.scaffoldResource.human=await s$(this.apiLocation,"human")),e={contextCardUrl:this.scaffoldResource.human.datasetInfo.contextCardUrl,discoverId:this.scaffoldResource.human.datasetInfo.discoverId,s3uri:this.scaffoldResource.human.datasetInfo.s3uri,version:this.scaffoldResource.human.datasetInfo.version,label:"Human Body",resource:this.scaffoldResource.human.url,title:"View 3D scaffold",layout:"2vertpanel",type:"SyncMap",isBodyScaffold:!0}),e&&Li.emit("SyncModeRequest",{flag:!0,action:e})}else Li.emit("SyncModeRequest",{flag:!1})},getState:function(){if(this.flatmapReady)return this.$refs.multiflatmap.getState()},flatmapPanZoomCallback:function(e){if(this.mouseHovered){const t={paneIndex:this.entry.id,eventType:"panZoom",payload:e,type:this.entry.type};this.$emit("resource-selected",t)}},search:function(e){return this.$refs.multiflatmap.getCurrentFlatmap().searchAndShowResult(e,!0)},searchSuggestions:function(e,t){const r=this.$refs.multiflatmap.getCurrentFlatmap();e&&r.mapImp&&r.mapImp.search(e).__featureIds.forEach(i=>{const o=r.mapImp.annotation(i);o&&o.label&&t.push(o.label)})},flatmaprResourceSelected:function(e,t){const r=this.$refs.multiflatmap.getCurrentFlatmap();if(this.resourceSelected(e,t,r.viewingMode==="Exploration"),t.eventType==="click"&&t.feature.type==="feature"){const n={label:t.label||"",id:t.feature.id||"",featureId:t.feature.featureId||"",taxonomy:t.taxonomy||"",resources:t.resource.join(", ")},i=cye(n);V1.sendEvent({event:"interaction_event",event_name:"portal_maps_connectivity",category:i,location:e+" "+r.viewingMode})}},onPathwaySelectionChanged:function(e){const{label:t,property:r,checked:n,selectionsTitle:i}=e;V1.sendEvent({event:"interaction_event",event_name:"portal_maps_pathway_change",category:t+" ["+r+"] "+n,location:i})},onOpenPubmedUrl:function(e){V1.sendEvent({event:"interaction_event",event_name:"portal_maps_pubmed_url",file_path:e,location:"map_popup_button"})},handleSyncPanZoomEvent:function(e){if(!this.mouseHovered&&e.type!==this.entry.type){const t=e.payload.zoom,r=e.payload.target,n=this.$el.clientHeight,i=this.$el.clientWidth,o=Math.max(i,n);let s=i/o/t;const l=n/o/t,c=[r[0]/2+.5-s/2,.5-r[1]/2-l/2];this.$refs.multiflatmap.getCurrentFlatmap().mapImp.panZoomTo(c,[s,l])}},displayTooltip:function(e){if(e){let t=e.name;t?this.search(t):this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults()}},zoomToFeatures:function(e,t){let r=e.name;const n=this.$refs.multiflatmap.getCurrentFlatmap().mapImp;if(r){const i=n.search(r);i.featureIds.length>0?(t&&n.selectFeatures(i.featureIds),n.zoomToFeatures(i.featureIds)):n.clearSearchResults()}else n.clearSearchResults()},highlightFeatures:function(e){let t=e.name;const r=this.$refs.multiflatmap.getCurrentFlatmap().mapImp;if(t){const n=r.search(t);n.featureIds.length>0&&r.zoomToFeatures(n.featureIds,{noZoomIn:!0})}},updateProvCard:function(){const e=this.getFlatmapImp();if(e){let t={id:this.entry.id,prov:e.provenance};this.$emit("flatmap-provenance-ready",t)}},flatmapChanged:async function(e){this.activeSpecies=e,this.openMapOptions=Yje(e),this.$emit("species-changed",e),this.entry.state&&this.entry.state.species===this.activeSpecies||this.syncMode==!0&&await this.toggleSyncMode(),this.updateProvCard(),this.onConnectivityInfoClose(),V1.sendEvent({event:"interaction_event",event_name:"portal_maps_species_change",category:this.activeSpecies})},multiFlatmapReady:function(e){if(e){e.enablePanZoomEvents(!0),this.flatmapReady=!0;const t=e.mapImp;this.flatmapMarkerUpdate(t),this.updateProvCard(),Li.emit("mapReady",e)}},getFlatmapImp:function(){if(this.entry.type==="MultiFlatmap"&&this.flatmapReady&&this.$refs.multiflatmap)return this.$refs.multiflatmap.getCurrentFlatmap().mapImp},flatmapAreaSearch(){let r={type:"Facets",label:"Unused",val:this.getFlatmapImp().visibleMarkerAnatomicalIds().map(n=>this.idNamePair[n])};Li.emit("PopoverActionClick",r)},restoreFeaturedMarkers:function(e){this.settingsStore.resetFeaturedMarkerIdentifier();const t=this.settingsStore.featuredMarkers;this.updateFeaturedMarkers(t,e)},updateFeaturedMarkers:function(e,t){this.showStarInLegend=!1;for(let r=0;r<e.length;++r)e[r]&&(this.settingsStore.featuredMarkerIdentifiers[r]||this.addFeaturedMarker(e[r],r,t)&&(this.showStarInLegend=!0))},addFeaturedMarker:function(e,t,r){const n=this.settingsStore.featuredMarkerSpecies[t];if(n&&!this.activeSpecies.startsWith(n))return!1;let i=r;if(i||(i=this.getFlatmapImp()),i){let o=document.createElement("div");o.innerHTML=pUr;const s=i.addMarker(e,{element:o,className:"highlight-marker",cluster:!1});return this.settingsStore.updateFeaturedMarkerIdentifier({index:t,markerIdentifier:s}),!0}return!1},changeViewingMode:function(e){this.$refs.multiflatmap.getCurrentFlatmap().changeViewingMode(e)}},computed:{facetSpecies(){return this.settingsStore.facets.species},featuredMarkers(){return this.settingsStore.featuredMarkers}},watch:{syncMode:function(e){this.$refs.multiflatmap.getCurrentFlatmap()&&this.$refs.multiflatmap.getCurrentFlatmap().enablePanZoomEvents(e)},featuredMarkers:function(e){this.flatmapReady&&this.updateFeaturedMarkers(e,void 0)}},mounted:function(){this.getFeaturedDatasets(),Li.on("show-connectivity",e=>{const{featureIds:t,offset:r}=e;if(this.flatmapReady&&this.$refs.multiflatmap){const n=this.$refs.multiflatmap.getCurrentFlatmap();n&&n.moveMap(t,{offsetX:r?-150:0,zoom:4})}}),Li.on("markerUpdate",()=>{this.flatmapReady&&this.flatmapMarkerUpdate(this.$refs.multiflatmap.getCurrentFlatmap().mapImp)}),Li.on("hoverUpdate",()=>{this.flatmapReady&&this.mapHoverHighlight(this.$refs.multiflatmap.getCurrentFlatmap().mapImp)}),Li.on("changeViewingMode",e=>{this.flatmapReady&&this.changeViewingMode(e)})}},mUr={class:"viewer-container"};function gUr(e,t,r,n,i,o){const s=a.resolveComponent("MultiFlatmapVuer"),l=a.resolveComponent("HelpModeDialog");return a.openBlock(),a.createElementBlock("div",mUr,[a.createVNode(s,{availableSpecies:e.availableSpecies,onFlatmapChanged:o.flatmapChanged,onReady:o.multiFlatmapReady,state:e.entry.state,onResourceSelected:t[0]||(t[0]=c=>o.flatmaprResourceSelected(e.entry.type,c)),style:{height:"100%",width:"100%"},initial:e.entry.resource,helpMode:e.helpMode,helpModeActiveItem:e.helpModeActiveItem,helpModeDialog:e.useHelpModeDialog,onHelpModeLastItem:e.onHelpModeLastItem,onShownTooltip:e.onTooltipShown,onShownMapTooltip:e.onMapTooltipShown,onConnectivityInfoOpen:e.onConnectivityInfoOpen,onConnectivityInfoClose:e.onConnectivityInfoClose,connectivityInfoSidebar:e.connectivityInfoSidebar,ref:"multiflatmap",displayMinimap:!0,showStarInLegend:e.showStarInLegend,enableOpenMapUI:!0,openMapOptions:e.openMapOptions,flatmapAPI:e.flatmapAPI,sparcAPI:e.apiLocation,onPanZoomCallback:o.flatmapPanZoomCallback,onOpenMap:e.openMap,onFinishHelpMode:e.endHelp,onPathwaySelectionChanged:o.onPathwaySelectionChanged,onOpenPubmedUrl:o.onOpenPubmedUrl},null,8,["availableSpecies","onFlatmapChanged","onReady","state","initial","helpMode","helpModeActiveItem","helpModeDialog","onHelpModeLastItem","onShownTooltip","onShownMapTooltip","onConnectivityInfoOpen","onConnectivityInfoClose","connectivityInfoSidebar","showStarInLegend","openMapOptions","flatmapAPI","sparcAPI","onPanZoomCallback","onOpenMap","onFinishHelpMode","onPathwaySelectionChanged","onOpenPubmedUrl"]),e.helpMode&&e.useHelpModeDialog?(a.openBlock(),a.createBlock(l,{key:0,ref:"multiflatmapHelp",multiflatmapRef:e.multiflatmapRef,lastItem:e.helpModeLastItem,onShowNext:e.onHelpModeShowNext,onFinishHelpMode:e.onFinishHelpMode},null,8,["multiflatmapRef","lastItem","onShowNext","onFinishHelpMode"])):a.createCommentVNode("",!0)])}const yUr=Object.freeze(Object.defineProperty({__proto__:null,default:Zc(fUr,[["render",gUr],["__scopeId","data-v-b02cb930"]])},Symbol.toStringTag,{value:"Module"}));function TUr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jje={exports:{}},sl=Jje.exports={},Rf,Nf;function F1e(){throw new Error("setTimeout has not been defined")}function D1e(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Rf=setTimeout:Rf=F1e}catch{Rf=F1e}try{typeof clearTimeout=="function"?Nf=clearTimeout:Nf=D1e}catch{Nf=D1e}})();function $je(e){if(Rf===setTimeout)return setTimeout(e,0);if((Rf===F1e||!Rf)&&setTimeout)return Rf=setTimeout,setTimeout(e,0);try{return Rf(e,0)}catch{try{return Rf.call(null,e,0)}catch{return Rf.call(this,e,0)}}}function vUr(e){if(Nf===clearTimeout)return clearTimeout(e);if((Nf===D1e||!Nf)&&clearTimeout)return Nf=clearTimeout,clearTimeout(e);try{return Nf(e)}catch{try{return Nf.call(null,e)}catch{return Nf.call(this,e)}}}var d5=[],o_=!1,oT,WU=-1;function bUr(){!o_||!oT||(o_=!1,oT.length?d5=oT.concat(d5):WU=-1,d5.length&&eUe())}function eUe(){if(!o_){var e=$je(bUr);o_=!0;for(var t=d5.length;t;){for(oT=d5,d5=[];++WU<t;)oT&&oT[WU].run();WU=-1,t=d5.length}oT=null,o_=!1,vUr(e)}}sl.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];d5.push(new tUe(e,t)),d5.length===1&&!o_&&$je(eUe)};function tUe(e,t){this.fun=e,this.array=t}tUe.prototype.run=function(){this.fun.apply(null,this.array)},sl.title="browser",sl.browser=!0,sl.env={},sl.argv=[],sl.version="",sl.versions={};function h5(){}sl.on=h5,sl.addListener=h5,sl.once=h5,sl.off=h5,sl.removeListener=h5,sl.removeAllListeners=h5,sl.emit=h5,sl.prependListener=h5,sl.prependOnceListener=h5,sl.listeners=function(e){return[]},sl.binding=function(e){throw new Error("process.binding is not supported")},sl.cwd=function(){return"/"},sl.chdir=function(e){throw new Error("process.chdir is not supported")},sl.umask=function(){return 0};var QUr=Jje.exports;const a_=TUr(QUr),p5=(e,t,{checkForDefaultPrevented:r=!0}={})=>n=>{const i=e==null?void 0:e(n);if(r===!1||!i)return t==null?void 0:t(n)},s_=globalThis||void 0||self;var rUe;const W1=typeof window<"u",xUr=e=>typeof e=="string",nUe=()=>{},_Ur=W1&&((rUe=window==null?void 0:window.navigator)==null?void 0:rUe.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function iUe(e){return typeof e=="function"?e():a.unref(e)}function wUr(e){return e}function qU(e){return a.getCurrentScope()?(a.onScopeDispose(e),!0):!1}function LUr(e,t=!0){a.getCurrentInstance()?a.onMounted(e):t?e():a.nextTick(e)}function f5(e){var t;const r=iUe(e);return(t=r==null?void 0:r.$el)!=null?t:r}const ZU=W1?window:void 0;function aT(...e){let t,r,n,i;if(xUr(e[0])||Array.isArray(e[0])?([r,n,i]=e,t=ZU):[t,r,n,i]=e,!t)return nUe;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const o=[],s=()=>{o.forEach(d=>d()),o.length=0},l=(d,h,p,f)=>(d.addEventListener(h,p,f),()=>d.removeEventListener(h,p,f)),c=a.watch(()=>[f5(t),iUe(i)],([d,h])=>{s(),d&&o.push(...r.flatMap(p=>n.map(f=>l(d,p,f,h))))},{immediate:!0,flush:"post"}),u=()=>{c(),s()};return qU(u),u}let oUe=!1;function SUr(e,t,r={}){const{window:n=ZU,ignore:i=[],capture:o=!0,detectIframe:s=!1}=r;if(!n)return;_Ur&&!oUe&&(oUe=!0,Array.from(n.document.body.children).forEach(d=>d.addEventListener("click",nUe)));let l=!0;const c=d=>i.some(h=>{if(typeof h=="string")return Array.from(n.document.querySelectorAll(h)).some(p=>p===d.target||d.composedPath().includes(p));{const p=f5(h);return p&&(d.target===p||d.composedPath().includes(p))}}),u=[aT(n,"click",d=>{const h=f5(e);if(!(!h||h===d.target||d.composedPath().includes(h))){if(d.detail===0&&(l=!c(d)),!l){l=!0;return}t(d)}},{passive:!0,capture:o}),aT(n,"pointerdown",d=>{const h=f5(e);h&&(l=!d.composedPath().includes(h)&&!c(d))},{passive:!0}),s&&aT(n,"blur",d=>{var h;const p=f5(e);((h=n.document.activeElement)==null?void 0:h.tagName)==="IFRAME"&&!(p!=null&&p.contains(n.document.activeElement))&&t(d)})].filter(Boolean);return()=>u.forEach(d=>d())}function aUe(e,t=!1){const r=a.ref(),n=()=>r.value=!!e();return n(),LUr(n,t),r}const z1e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof s_<"u"?s_:typeof self<"u"?self:{},j1e="__vueuse_ssr_handlers__";z1e[j1e]=z1e[j1e]||{},z1e[j1e];var sUe=Object.getOwnPropertySymbols,kUr=Object.prototype.hasOwnProperty,CUr=Object.prototype.propertyIsEnumerable,MUr=(e,t)=>{var r={};for(var n in e)kUr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&sUe)for(var n of sUe(e))t.indexOf(n)<0&&CUr.call(e,n)&&(r[n]=e[n]);return r};function m5(e,t,r={}){const n=r,{window:i=ZU}=n,o=MUr(n,["window"]);let s;const l=aUe(()=>i&&"ResizeObserver"in i),c=()=>{s&&(s.disconnect(),s=void 0)},u=a.watch(()=>f5(e),h=>{c(),l.value&&i&&h&&(s=new ResizeObserver(t),s.observe(h,o))},{immediate:!0,flush:"post"}),d=()=>{c(),u()};return qU(d),{isSupported:l,stop:d}}var lUe=Object.getOwnPropertySymbols,EUr=Object.prototype.hasOwnProperty,AUr=Object.prototype.propertyIsEnumerable,OUr=(e,t)=>{var r={};for(var n in e)EUr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&lUe)for(var n of lUe(e))t.indexOf(n)<0&&AUr.call(e,n)&&(r[n]=e[n]);return r};function IUr(e,t,r={}){const n=r,{window:i=ZU}=n,o=OUr(n,["window"]);let s;const l=aUe(()=>i&&"MutationObserver"in i),c=()=>{s&&(s.disconnect(),s=void 0)},u=a.watch(()=>f5(e),h=>{c(),l.value&&i&&h&&(s=new MutationObserver(t),s.observe(h,o))},{immediate:!0}),d=()=>{c(),u()};return qU(d),{isSupported:l,stop:d}}var cUe;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(cUe||(cUe={}));var PUr=Object.defineProperty,uUe=Object.getOwnPropertySymbols,VUr=Object.prototype.hasOwnProperty,HUr=Object.prototype.propertyIsEnumerable,dUe=(e,t,r)=>t in e?PUr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,RUr=(e,t)=>{for(var r in t||(t={}))VUr.call(t,r)&&dUe(e,r,t[r]);if(uUe)for(var r of uUe(t))HUr.call(t,r)&&dUe(e,r,t[r]);return e};RUr({linear:wUr},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const NUr=()=>W1&&/firefox/i.test(window.navigator.userAgent);a_.env.NODE_ENV!=="production"&&Object.freeze({}),a_.env.NODE_ENV!=="production"&&Object.freeze([]);const UA=()=>{},BUr=Object.prototype.hasOwnProperty,hUe=(e,t)=>BUr.call(e,t),Ud=Array.isArray,Gd=e=>typeof e=="function",Bf=e=>typeof e=="string",Wd=e=>e!==null&&typeof e=="object",FUr=Object.prototype.toString,DUr=e=>FUr.call(e),U1e=e=>DUr(e).slice(8,-1);var pUe=typeof s_=="object"&&s_&&s_.Object===Object&&s_,zUr=typeof self=="object"&&self&&self.Object===Object&&self,Ff=pUe||zUr||Function("return this")(),t7=Ff.Symbol,fUe=Object.prototype,jUr=fUe.hasOwnProperty,UUr=fUe.toString,GA=t7?t7.toStringTag:void 0;function GUr(e){var t=jUr.call(e,GA),r=e[GA];try{e[GA]=void 0;var n=!0}catch{}var i=UUr.call(e);return n&&(t?e[GA]=r:delete e[GA]),i}var WUr=Object.prototype,qUr=WUr.toString;function ZUr(e){return qUr.call(e)}var XUr="[object Null]",KUr="[object Undefined]",mUe=t7?t7.toStringTag:void 0;function l_(e){return e==null?e===void 0?KUr:XUr:mUe&&mUe in Object(e)?GUr(e):ZUr(e)}function c_(e){return e!=null&&typeof e=="object"}var YUr="[object Symbol]";function XU(e){return typeof e=="symbol"||c_(e)&&l_(e)==YUr}function JUr(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Df=Array.isArray,$Ur=1/0,gUe=t7?t7.prototype:void 0,yUe=gUe?gUe.toString:void 0;function TUe(e){if(typeof e=="string")return e;if(Df(e))return JUr(e,TUe)+"";if(XU(e))return yUe?yUe.call(e):"";var t=e+"";return t=="0"&&1/e==-$Ur?"-0":t}var eGr=/\s/;function tGr(e){for(var t=e.length;t--&&eGr.test(e.charAt(t)););return t}var rGr=/^\s+/;function nGr(e){return e&&e.slice(0,tGr(e)+1).replace(rGr,"")}function u_(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var vUe=NaN,iGr=/^[-+]0x[0-9a-f]+$/i,oGr=/^0b[01]+$/i,aGr=/^0o[0-7]+$/i,sGr=parseInt;function G1e(e){if(typeof e=="number")return e;if(XU(e))return vUe;if(u_(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=u_(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=nGr(e);var r=oGr.test(e);return r||aGr.test(e)?sGr(e.slice(2),r?2:8):iGr.test(e)?vUe:+e}var bUe=1/0,lGr=17976931348623157e292;function cGr(e){if(!e)return e===0?e:0;if(e=G1e(e),e===bUe||e===-bUe){var t=e<0?-1:1;return t*lGr}return e===e?e:0}function uGr(e){var t=cGr(e),r=t%1;return t===t?r?t-r:t:0}function dGr(e){return e}var hGr="[object AsyncFunction]",pGr="[object Function]",fGr="[object GeneratorFunction]",mGr="[object Proxy]";function QUe(e){if(!u_(e))return!1;var t=l_(e);return t==pGr||t==fGr||t==hGr||t==mGr}var W1e=Ff["__core-js_shared__"],xUe=function(){var e=/[^.]+$/.exec(W1e&&W1e.keys&&W1e.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function gGr(e){return!!xUe&&xUe in e}var yGr=Function.prototype,TGr=yGr.toString;function sT(e){if(e!=null){try{return TGr.call(e)}catch{}try{return e+""}catch{}}return""}var vGr=/[\\^$.*+?()[\]{}|]/g,bGr=/^\[object .+?Constructor\]$/,QGr=Function.prototype,xGr=Object.prototype,_Gr=QGr.toString,wGr=xGr.hasOwnProperty,LGr=RegExp("^"+_Gr.call(wGr).replace(vGr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function SGr(e){if(!u_(e)||gGr(e))return!1;var t=QUe(e)?LGr:bGr;return t.test(sT(e))}function kGr(e,t){return e==null?void 0:e[t]}function d_(e,t){var r=kGr(e,t);return SGr(r)?r:void 0}var q1e=d_(Ff,"WeakMap");function CGr(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}var MGr=9007199254740991,EGr=/^(?:0|[1-9]\d*)$/;function _Ue(e,t){var r=typeof e;return t=t??MGr,!!t&&(r=="number"||r!="symbol"&&EGr.test(e))&&e>-1&&e%1==0&&e<t}function wUe(e,t){return e===t||e!==e&&t!==t}var AGr=9007199254740991;function Z1e(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=AGr}function OGr(e){return e!=null&&Z1e(e.length)&&!QUe(e)}var IGr=Object.prototype;function PGr(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||IGr;return e===r}function VGr(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var HGr="[object Arguments]";function LUe(e){return c_(e)&&l_(e)==HGr}var SUe=Object.prototype,RGr=SUe.hasOwnProperty,NGr=SUe.propertyIsEnumerable,kUe=LUe(function(){return arguments}())?LUe:function(e){return c_(e)&&RGr.call(e,"callee")&&!NGr.call(e,"callee")};function BGr(){return!1}var CUe=typeof Pn=="object"&&Pn&&!Pn.nodeType&&Pn,MUe=CUe&&typeof module=="object"&&module&&!module.nodeType&&module,FGr=MUe&&MUe.exports===CUe,EUe=FGr?Ff.Buffer:void 0,DGr=EUe?EUe.isBuffer:void 0,X1e=DGr||BGr,zGr="[object Arguments]",jGr="[object Array]",UGr="[object Boolean]",GGr="[object Date]",WGr="[object Error]",qGr="[object Function]",ZGr="[object Map]",XGr="[object Number]",KGr="[object Object]",YGr="[object RegExp]",JGr="[object Set]",$Gr="[object String]",eWr="[object WeakMap]",tWr="[object ArrayBuffer]",rWr="[object DataView]",nWr="[object Float32Array]",iWr="[object Float64Array]",oWr="[object Int8Array]",aWr="[object Int16Array]",sWr="[object Int32Array]",lWr="[object Uint8Array]",cWr="[object Uint8ClampedArray]",uWr="[object Uint16Array]",dWr="[object Uint32Array]",is={};is[nWr]=is[iWr]=is[oWr]=is[aWr]=is[sWr]=is[lWr]=is[cWr]=is[uWr]=is[dWr]=!0,is[zGr]=is[jGr]=is[tWr]=is[UGr]=is[rWr]=is[GGr]=is[WGr]=is[qGr]=is[ZGr]=is[XGr]=is[KGr]=is[YGr]=is[JGr]=is[$Gr]=is[eWr]=!1;function hWr(e){return c_(e)&&Z1e(e.length)&&!!is[l_(e)]}function pWr(e){return function(t){return e(t)}}var AUe=typeof Pn=="object"&&Pn&&!Pn.nodeType&&Pn,WA=AUe&&typeof module=="object"&&module&&!module.nodeType&&module,fWr=WA&&WA.exports===AUe,K1e=fWr&&pUe.process,OUe=function(){try{var e=WA&&WA.require&&WA.require("util").types;return e||K1e&&K1e.binding&&K1e.binding("util")}catch{}}(),IUe=OUe&&OUe.isTypedArray,PUe=IUe?pWr(IUe):hWr,mWr=Object.prototype,gWr=mWr.hasOwnProperty;function yWr(e,t){var r=Df(e),n=!r&&kUe(e),i=!r&&!n&&X1e(e),o=!r&&!n&&!i&&PUe(e),s=r||n||i||o,l=s?VGr(e.length,String):[],c=l.length;for(var u in e)(t||gWr.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||_Ue(u,c)))&&l.push(u);return l}function TWr(e,t){return function(r){return e(t(r))}}var vWr=TWr(Object.keys,Object),bWr=Object.prototype,QWr=bWr.hasOwnProperty;function xWr(e){if(!PGr(e))return vWr(e);var t=[];for(var r in Object(e))QWr.call(e,r)&&r!="constructor"&&t.push(r);return t}function VUe(e){return OGr(e)?yWr(e):xWr(e)}var _Wr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wWr=/^\w*$/;function Y1e(e,t){if(Df(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||XU(e)?!0:wWr.test(e)||!_Wr.test(e)||t!=null&&e in Object(t)}var qA=d_(Object,"create");function LWr(){this.__data__=qA?qA(null):{},this.size=0}function SWr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var kWr="__lodash_hash_undefined__",CWr=Object.prototype,MWr=CWr.hasOwnProperty;function EWr(e){var t=this.__data__;if(qA){var r=t[e];return r===kWr?void 0:r}return MWr.call(t,e)?t[e]:void 0}var AWr=Object.prototype,OWr=AWr.hasOwnProperty;function IWr(e){var t=this.__data__;return qA?t[e]!==void 0:OWr.call(t,e)}var PWr="__lodash_hash_undefined__";function VWr(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=qA&&t===void 0?PWr:t,this}function lT(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}lT.prototype.clear=LWr,lT.prototype.delete=SWr,lT.prototype.get=EWr,lT.prototype.has=IWr,lT.prototype.set=VWr;function HWr(){this.__data__=[],this.size=0}function KU(e,t){for(var r=e.length;r--;)if(wUe(e[r][0],t))return r;return-1}var RWr=Array.prototype,NWr=RWr.splice;function BWr(e){var t=this.__data__,r=KU(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():NWr.call(t,r,1),--this.size,!0}function FWr(e){var t=this.__data__,r=KU(t,e);return r<0?void 0:t[r][1]}function DWr(e){return KU(this.__data__,e)>-1}function zWr(e,t){var r=this.__data__,n=KU(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function g5(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}g5.prototype.clear=HWr,g5.prototype.delete=BWr,g5.prototype.get=FWr,g5.prototype.has=DWr,g5.prototype.set=zWr;var ZA=d_(Ff,"Map");function jWr(){this.size=0,this.__data__={hash:new lT,map:new(ZA||g5),string:new lT}}function UWr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function YU(e,t){var r=e.__data__;return UWr(t)?r[typeof t=="string"?"string":"hash"]:r.map}function GWr(e){var t=YU(this,e).delete(e);return this.size-=t?1:0,t}function WWr(e){return YU(this,e).get(e)}function qWr(e){return YU(this,e).has(e)}function ZWr(e,t){var r=YU(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function y5(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}y5.prototype.clear=jWr,y5.prototype.delete=GWr,y5.prototype.get=WWr,y5.prototype.has=qWr,y5.prototype.set=ZWr;var XWr="Expected a function";function J1e(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(XWr);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(J1e.Cache||y5),r}J1e.Cache=y5;var KWr=500;function YWr(e){var t=J1e(e,function(n){return r.size===KWr&&r.clear(),n}),r=t.cache;return t}var JWr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$Wr=/\\(\\)?/g,eqr=YWr(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(JWr,function(r,n,i,o){t.push(i?o.replace($Wr,"$1"):n||r)}),t});function tqr(e){return e==null?"":TUe(e)}function HUe(e,t){return Df(e)?e:Y1e(e,t)?[e]:eqr(tqr(e))}var rqr=1/0;function JU(e){if(typeof e=="string"||XU(e))return e;var t=e+"";return t=="0"&&1/e==-rqr?"-0":t}function RUe(e,t){t=HUe(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[JU(t[r++])];return r&&r==n?e:void 0}function T5(e,t,r){var n=e==null?void 0:RUe(e,t);return n===void 0?r:n}function nqr(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function NUe(){if(!arguments.length)return[];var e=arguments[0];return Df(e)?e:[e]}function iqr(){this.__data__=new g5,this.size=0}function oqr(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function aqr(e){return this.__data__.get(e)}function sqr(e){return this.__data__.has(e)}var lqr=200;function cqr(e,t){var r=this.__data__;if(r instanceof g5){var n=r.__data__;if(!ZA||n.length<lqr-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new y5(n)}return r.set(e,t),this.size=r.size,this}function v5(e){var t=this.__data__=new g5(e);this.size=t.size}v5.prototype.clear=iqr,v5.prototype.delete=oqr,v5.prototype.get=aqr,v5.prototype.has=sqr,v5.prototype.set=cqr;function uqr(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function dqr(){return[]}var hqr=Object.prototype,pqr=hqr.propertyIsEnumerable,BUe=Object.getOwnPropertySymbols,fqr=BUe?function(e){return e==null?[]:(e=Object(e),uqr(BUe(e),function(t){return pqr.call(e,t)}))}:dqr;const mqr=fqr;function gqr(e,t,r){var n=t(e);return Df(e)?n:nqr(n,r(e))}function FUe(e){return gqr(e,VUe,mqr)}var $1e=d_(Ff,"DataView"),eue=d_(Ff,"Promise"),tue=d_(Ff,"Set"),DUe="[object Map]",yqr="[object Object]",zUe="[object Promise]",jUe="[object Set]",UUe="[object WeakMap]",GUe="[object DataView]",Tqr=sT($1e),vqr=sT(ZA),bqr=sT(eue),Qqr=sT(tue),xqr=sT(q1e),cT=l_;($1e&&cT(new $1e(new ArrayBuffer(1)))!=GUe||ZA&&cT(new ZA)!=DUe||eue&&cT(eue.resolve())!=zUe||tue&&cT(new tue)!=jUe||q1e&&cT(new q1e)!=UUe)&&(cT=function(e){var t=l_(e),r=t==yqr?e.constructor:void 0,n=r?sT(r):"";if(n)switch(n){case Tqr:return GUe;case vqr:return DUe;case bqr:return zUe;case Qqr:return jUe;case xqr:return UUe}return t});const WUe=cT;var _qr=Ff.Uint8Array;const qUe=_qr;var wqr="__lodash_hash_undefined__";function Lqr(e){return this.__data__.set(e,wqr),this}function Sqr(e){return this.__data__.has(e)}function $U(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new y5;++t<r;)this.add(e[t])}$U.prototype.add=$U.prototype.push=Lqr,$U.prototype.has=Sqr;function kqr(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Cqr(e,t){return e.has(t)}var Mqr=1,Eqr=2;function ZUe(e,t,r,n,i,o){var s=r&Mqr,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var h=-1,p=!0,f=r&Eqr?new $U:void 0;for(o.set(e,t),o.set(t,e);++h<l;){var m=e[h],g=t[h];if(n)var T=s?n(g,m,h,t,e,o):n(m,g,h,e,t,o);if(T!==void 0){if(T)continue;p=!1;break}if(f){if(!kqr(t,function(y,v){if(!Cqr(f,v)&&(m===y||i(m,y,r,n,o)))return f.push(v)})){p=!1;break}}else if(!(m===g||i(m,g,r,n,o))){p=!1;break}}return o.delete(e),o.delete(t),p}function Aqr(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function Oqr(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Iqr=1,Pqr=2,Vqr="[object Boolean]",Hqr="[object Date]",Rqr="[object Error]",Nqr="[object Map]",Bqr="[object Number]",Fqr="[object RegExp]",Dqr="[object Set]",zqr="[object String]",jqr="[object Symbol]",Uqr="[object ArrayBuffer]",Gqr="[object DataView]",XUe=t7?t7.prototype:void 0,rue=XUe?XUe.valueOf:void 0;function Wqr(e,t,r,n,i,o,s){switch(r){case Gqr:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Uqr:return!(e.byteLength!=t.byteLength||!o(new qUe(e),new qUe(t)));case Vqr:case Hqr:case Bqr:return wUe(+e,+t);case Rqr:return e.name==t.name&&e.message==t.message;case Fqr:case zqr:return e==t+"";case Nqr:var l=Aqr;case Dqr:var c=n&Iqr;if(l||(l=Oqr),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=Pqr,s.set(e,t);var d=ZUe(l(e),l(t),n,i,o,s);return s.delete(e),d;case jqr:if(rue)return rue.call(e)==rue.call(t)}return!1}var qqr=1,Zqr=Object.prototype,Xqr=Zqr.hasOwnProperty;function Kqr(e,t,r,n,i,o){var s=r&qqr,l=FUe(e),c=l.length,u=FUe(t),d=u.length;if(c!=d&&!s)return!1;for(var h=c;h--;){var p=l[h];if(!(s?p in t:Xqr.call(t,p)))return!1}var f=o.get(e),m=o.get(t);if(f&&m)return f==t&&m==e;var g=!0;o.set(e,t),o.set(t,e);for(var T=s;++h<c;){p=l[h];var y=e[p],v=t[p];if(n)var Q=s?n(v,y,p,t,e,o):n(y,v,p,e,t,o);if(!(Q===void 0?y===v||i(y,v,r,n,o):Q)){g=!1;break}T||(T=p=="constructor")}if(g&&!T){var _=e.constructor,L=t.constructor;_!=L&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof L=="function"&&L instanceof L)&&(g=!1)}return o.delete(e),o.delete(t),g}var Yqr=1,KUe="[object Arguments]",YUe="[object Array]",eG="[object Object]",Jqr=Object.prototype,JUe=Jqr.hasOwnProperty;function $qr(e,t,r,n,i,o){var s=Df(e),l=Df(t),c=s?YUe:WUe(e),u=l?YUe:WUe(t);c=c==KUe?eG:c,u=u==KUe?eG:u;var d=c==eG,h=u==eG,p=c==u;if(p&&X1e(e)){if(!X1e(t))return!1;s=!0,d=!1}if(p&&!d)return o||(o=new v5),s||PUe(e)?ZUe(e,t,r,n,i,o):Wqr(e,t,c,r,n,i,o);if(!(r&Yqr)){var f=d&&JUe.call(e,"__wrapped__"),m=h&&JUe.call(t,"__wrapped__");if(f||m){var g=f?e.value():e,T=m?t.value():t;return o||(o=new v5),i(g,T,r,n,o)}}return p?(o||(o=new v5),Kqr(e,t,r,n,i,o)):!1}function tG(e,t,r,n,i){return e===t?!0:e==null||t==null||!c_(e)&&!c_(t)?e!==e&&t!==t:$qr(e,t,r,n,tG,i)}var eZr=1,tZr=2;function rZr(e,t,r,n){var i=r.length,o=i,s=!n;if(e==null)return!o;for(e=Object(e);i--;){var l=r[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<o;){l=r[i];var c=l[0],u=e[c],d=l[1];if(s&&l[2]){if(u===void 0&&!(c in e))return!1}else{var h=new v5;if(n)var p=n(u,d,c,e,t,h);if(!(p===void 0?tG(d,u,eZr|tZr,n,h):p))return!1}}return!0}function $Ue(e){return e===e&&!u_(e)}function nZr(e){for(var t=VUe(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,$Ue(i)]}return t}function eGe(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function iZr(e){var t=nZr(e);return t.length==1&&t[0][2]?eGe(t[0][0],t[0][1]):function(r){return r===e||rZr(r,e,t)}}function oZr(e,t){return e!=null&&t in Object(e)}function aZr(e,t,r){t=HUe(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var s=JU(t[n]);if(!(o=e!=null&&r(e,s)))break;e=e[s]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&Z1e(i)&&_Ue(s,i)&&(Df(e)||kUe(e)))}function sZr(e,t){return e!=null&&aZr(e,t,oZr)}var lZr=1,cZr=2;function uZr(e,t){return Y1e(e)&&$Ue(t)?eGe(JU(e),t):function(r){var n=T5(r,e);return n===void 0&&n===t?sZr(r,e):tG(t,n,lZr|cZr)}}function dZr(e){return function(t){return t==null?void 0:t[e]}}function hZr(e){return function(t){return RUe(t,e)}}function pZr(e){return Y1e(e)?dZr(JU(e)):hZr(e)}function fZr(e){return typeof e=="function"?e:e==null?dGr:typeof e=="object"?Df(e)?uZr(e[0],e[1]):iZr(e):pZr(e)}var nue=function(){return Ff.Date.now()},mZr="Expected a function",gZr=Math.max,yZr=Math.min;function TZr(e,t,r){var n,i,o,s,l,c,u=0,d=!1,h=!1,p=!0;if(typeof e!="function")throw new TypeError(mZr);t=G1e(t)||0,u_(r)&&(d=!!r.leading,h="maxWait"in r,o=h?gZr(G1e(r.maxWait)||0,t):o,p="trailing"in r?!!r.trailing:p);function f(w){var S=n,C=i;return n=i=void 0,u=w,s=e.apply(C,S),s}function m(w){return u=w,l=setTimeout(y,t),d?f(w):s}function g(w){var S=w-c,C=w-u,E=t-S;return h?yZr(E,o-C):E}function T(w){var S=w-c,C=w-u;return c===void 0||S>=t||S<0||h&&C>=o}function y(){var w=nue();if(T(w))return v(w);l=setTimeout(y,g(w))}function v(w){return l=void 0,p&&n?f(w):(n=i=void 0,s)}function Q(){l!==void 0&&clearTimeout(l),u=0,n=c=i=l=void 0}function _(){return l===void 0?s:v(nue())}function L(){var w=nue(),S=T(w);if(n=arguments,i=this,c=w,S){if(l===void 0)return m(c);if(h)return clearTimeout(l),l=setTimeout(y,t),f(c)}return l===void 0&&(l=setTimeout(y,t)),s}return L.cancel=Q,L.flush=_,L}var vZr=Math.max,bZr=Math.min;function QZr(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=n-1;return r!==void 0&&(i=uGr(r),i=r<0?vZr(n+i,0):bZr(i,n-1)),CGr(e,fZr(t),i,!0)}function rG(e){for(var t=-1,r=e==null?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n}function XA(e,t){return tG(e,t)}function nG(e){return e==null}function xZr(e){return e===void 0}const tGe=e=>e===void 0,iue=e=>typeof e=="boolean",k0=e=>typeof e=="number",KA=e=>typeof Element>"u"?!1:e instanceof Element,_Zr=e=>Bf(e)?!Number.isNaN(Number(e)):!1,wZr=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d");let rGe=class extends Error{constructor(t){super(t),this.name="ElementPlusError"}};function LZr(e,t){throw new rGe(`[${e}] ${t}`)}function qd(e,t){if(a_.env.NODE_ENV!=="production"){const r=Bf(e)?new rGe(`[${e}] ${t}`):e;console.warn(r)}}const SZr="utils/dom/style";function iG(e,t="px"){if(!e)return"";if(k0(e)||_Zr(e))return`${e}${t}`;if(Bf(e))return e;qd(SZr,"binding value must be a string or number")}function kZr(e,t){if(!W1)return;if(!t){e.scrollTop=0;return}const r=[];let n=t.offsetParent;for(;n!==null&&e!==n&&e.contains(n);)r.push(n),n=n.offsetParent;const i=t.offsetTop+r.reduce((c,u)=>c+u.offsetTop,0),o=i+t.offsetHeight,s=e.scrollTop,l=s+e.clientHeight;i<s?e.scrollTop=i:o>l&&(e.scrollTop=o-e.clientHeight)}/*! Element Plus Icons Vue v2.3.1 */var CZr=a.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),MZr=CZr,EZr=a.defineComponent({name:"ArrowRight",__name:"arrow-right",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),AZr=EZr,OZr=a.defineComponent({name:"CircleCheck",__name:"circle-check",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),a.createElementVNode("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}}),IZr=OZr,PZr=a.defineComponent({name:"CircleClose",__name:"circle-close",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),a.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),oue=PZr,VZr=a.defineComponent({name:"Close",__name:"close",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),nGe=VZr,HZr=a.defineComponent({name:"Hide",__name:"hide",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),a.createElementVNode("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}}),RZr=HZr,NZr=a.defineComponent({name:"Loading",__name:"loading",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),iGe=NZr,BZr=a.defineComponent({name:"View",__name:"view",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),FZr=BZr;const oGe="__epPropKey",$i=e=>e,DZr=e=>Wd(e)&&!!e[oGe],oG=(e,t)=>{if(!Wd(e)||DZr(e))return e;const{values:r,required:n,default:i,type:o,validator:s}=e,l={type:o,required:!!n,validator:r||s?c=>{let u=!1,d=[];if(r&&(d=Array.from(r),hUe(e,"default")&&d.push(i),u||(u=d.includes(c))),s&&(u||(u=s(c))),!u&&d.length>0){const h=[...new Set(d)].map(p=>JSON.stringify(p)).join(", ");a.warn(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${h}], got value ${JSON.stringify(c)}.`)}return u}:void 0,[oGe]:!0};return hUe(e,"default")&&(l.default=i),l},Cs=e=>rG(Object.entries(e).map(([t,r])=>[t,oG(r,t)])),uT=$i([String,Object,Function]),aGe={validating:iGe,success:IZr,error:oue},zf=(e,t)=>{if(e.install=r=>{for(const n of[e,...Object.values(t??{})])r.component(n.name,n)},t)for(const[r,n]of Object.entries(t))e[r]=n;return e},zZr=(e,t)=>(e.install=r=>{r.directive(t,e)},e),aG=e=>(e.install=UA,e),YA={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"},_2="update:modelValue",sG="change",sGe=["","default","small","large"],lGe=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e),cGe=e=>e,jZr=["class","style"],UZr=/^on[A-Z]/,GZr=(e={})=>{const{excludeListeners:t=!1,excludeKeys:r}=e,n=a.computed(()=>((r==null?void 0:r.value)||[]).concat(jZr)),i=a.getCurrentInstance();return i?a.computed(()=>{var o;return rG(Object.entries((o=i.proxy)==null?void 0:o.$attrs).filter(([s])=>!n.value.includes(s)&&!(t&&UZr.test(s))))}):(qd("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),a.computed(()=>({})))},uGe=({from:e,replacement:t,scope:r,version:n,ref:i,type:o="API"},s)=>{a.watch(()=>a.unref(s),l=>{l&&qd(r,`[${o}] ${e} is about to be deprecated in version ${n}, please use ${t} instead.
|
3093
|
+
This will fail in production.`);l=zA,l._s.has(n)||(o?N1e(n,t,i,l):qje(n,i,l),process.env.NODE_ENV!=="production"&&(s._pinia=l));const d=l._s.get(n);if(process.env.NODE_ENV!=="production"&&c){const h="__hot:"+n,p=o?N1e(h,t,i,l,!0):qje(h,jd({},i),l,!0);c._hotUpdate(p),delete l.state.value[h],l._s.delete(h)}if(process.env.NODE_ENV!=="production"&&V1e){const h=a.getCurrentInstance();if(h&&h.proxy&&!c){const p=h.proxy,f="_pStores"in p?p._pStores:p._pStores={};f[n]=d}}return d}return s.$id=n,s}function bjr(e,t){return Array.isArray(t)?t.reduce((r,n)=>(r[n]=function(){return e(this.$pinia)[n]},r),{}):Object.keys(t).reduce((r,n)=>(r[n]=function(){const i=e(this.$pinia),o=t[n];return typeof o=="function"?o.call(this,i):i[o]},r),{})}const Qjr=vjr("main",{state:()=>({userProfile:{token:""}}),getters:{userToken(e){return e.userProfile.token}},actions:{setUserToken(e){this.userProfile.token=e}}}),xjr=e=>{let t={lng:0,lat:0},r;return e.type==="Polygon"?r=e.coordinates[0]:r=e.coordinates,e.type!=="Point"?(r.map(n=>{t.lng+=parseFloat(n[0]),t.lat+=parseFloat(n[1])}),t.lng=t.lng/r.length,t.lat=t.lat/r.length):(t.lng+=parseFloat(r[0]),t.lat+=parseFloat(r[1])),t},Zje=(e,t)=>{const r=[];let n=e.organs?e.organs:e.ftus;const i=n?n.filter((o,s)=>n.findIndex(l=>l.label===o.label)===s):void 0;return i&&i.forEach(o=>{const s={label:o.label,models:o.models,key:`${t}.${o.label}`},l=Zje(o,s.key);l.length>0&&(s.children=l),r.push(s)}),r},_jr=function(){return{destinations:[],origins:[],components:[],destinationsWithDatasets:[],originsWithDatasets:[],componentsWithDatasets:[],resource:void 0}},wjr={name:"FlatmapVuer",components:{Button:WEe,Col:WC,Loading:kpr,Radio:lAe,Icon:Cu,RadioGroup:cAe,Row:GC,Select:OB,Dialog:Dhr,MapSvgIcon:$S,MapSvgSpriteColor:VH,Tooltip:pCe,TreeControls:fCe,SelectionsGroup:QAe,SvgLegends:xAe,ElIconWarningFilled:wMe,ElIconArrowDown:_ne,ElIconArrowLeft:xMe,DrawToolbar:hCe},beforeCreate:function(){this.setStateRequired=!1},setup(e){return{annotator:a.markRaw(new pjr(`${e.flatmapAPI}annotator`))}},methods:{initialiseDrawing:function(){this.connectionEntry={},this.activeDrawTool=void 0,this.activeDrawMode=void 0,this.drawnCreatedEvent={}},cancelDrawnFeature:function(){this.isValidDrawnCreated&&(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 r={feature:{}};if(t){const n=this.mapImp.featureProperties(t);r.feature=n}else{const n=this.existDrawnFeatures.find(i=>i.id===e.replace(" ",""));r.feature.feature=n}this.checkAndCreatePopups(r)}else this.closeTooltip()},confirmDrawnFeature:function(){this.isValidDrawnCreated&&(this.checkAndCreatePopups(this.drawnCreatedEvent),Object.keys(this.connectionEntry).length>0&&(this.annotationEntry.feature.connection=this.connectionEntry),this.initialiseDrawing())},toolbarEvent:function(e,t){if(this.closeTooltip(),this.doubleClickedFeature=!1,this.connectionEntry={},e==="mode")this.changeAnnotationDrawMode({mode:"simple_select"}),this.activeDrawMode=t,Object.keys(this.annotationEntry).length>0&&!this.featureAnnotationSubmitted&&this.rollbackAnnotationEvent();else if(e==="tool"){if(t){const r=t.replace(/[A-Z]/g,n=>`_${n.toLowerCase()}`);this.changeAnnotationDrawMode({mode:`draw${r}`}),this.initialiseDrawing()}else this.changeAnnotationDrawMode({mode:"simple_select"}),this.cancelDrawnFeature();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((r,n)=>n!==0&&n!==e.length-1)};this.annotationEntry.body=t}},changeAnnotationDrawMode:function(e){this.mapImp&&this.mapImp.changeAnnotationDrawMode(e)},clearAnnotationFeature:function(){this.mapImp&&this.existDrawnFeatures.length>0&&this.mapImp.clearAnnotationFeature()},modifyAnnotationFeature:function(){this.mapImp&&this.mapImp.removeAnnotationFeature()},rollbackAnnotationEvent:function(){this.mapImp&&["created","updated","deleted"].includes(this.annotationEntry.type)&&(this.mapImp.rollbackAnnotationEvent(this.annotationEntry),this.annotationEntry={})},commitAnnotationEvent:function(e){this.mapImp&&["created","updated","deleted"].includes(this.annotationEntry.type)&&e&&(this.featureAnnotationSubmitted=!0,this.mapImp.commitAnnotationEvent(this.annotationEntry),this.annotationEntry.type==="deleted"?(this.closeTooltip(),this.annotationEntry={}):this.addAnnotationFeature())},fetchAnnotatedItemIds:async function(e=void 0,t=void 0){let r=await this.annotator.annotatedItemIds(this.userToken,this.serverURL,e,t);return"resource"in r&&(r=r.itemIds),r},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){const r=await this.fetchAnnotatedItemIds(e,t);let n=await this.annotator.drawnFeatures(this.userToken,this.serverURL,r);return"resource"in n&&(n=n.features),this.drawnType!=="All tools"&&(n=n.filter(i=>i.geometry.type===this.drawnType)),n},addAnnotationFeature:async function(){if(this.mapImp&&(this.featureAnnotationSubmitted||this.clearAnnotationFeature(),this.drawnType!=="None")){this.featureAnnotationSubmitted||(this.loading=!0);const e=this.annotatedType==="Anyone"?void 0:this.userInformation.orcid?this.userInformation.orcid:"0000-0000-0000-0000",t=this.annotatedType==="Anyone"?void 0:this.annotatedType==="Me",r=await this.fetchDrawnFeatures(e,t);if(this.existDrawnFeatures=r,this.loading=!1,!this.featureAnnotationSubmitted)for(const n of r)this.mapImp.addAnnotationFeature(n)}},showAnnotator:function(e){this.mapImp&&(this.mapImp.showAnnotator(e),this.$el.querySelector(".maplibregl-ctrl-group").style.display="none")},setDrawnType:function(e){this.drawnType=e,this.mapImp&&(this.addAnnotationFeature(),this.initialiseDrawing())},setAnnotatedType:function(e){this.annotatedType=e,this.mapImp&&this.addAnnotationFeature()},setFlightPath3D:function(e){this.flightPath3DRadio=e,this.mapImp&&this.mapImp.enableFlightPaths(e)},viewLatestMap:function(){let e=this.biologicalSex?this.biologicalSex:void 0;this.entry==="NCBITaxon:9606"&&(e="PATO:0000384");const t={entry:this.entry,biologicalSex:e,viewport:this.mapImp.getState()};this.$emit("view-latest-map",t)},backgroundChangeCallback:function(e){this.currentBackground=e,this.mapImp&&this.mapImp.setBackgroundColour(this.currentBackground,1)},processSystems:function(e){if(this.systems.length=0,e&&e.length>0){const t={label:"All",key:"All",children:[]};e.forEach(r=>{const n={colour:r.colour,enabled:r.enabled,label:r.id,key:r.id},i=Zje(r,n.key);i.length>0&&(n.children=i),t.children.push(n)}),this.systems.push(t)}},processTaxon:function(e,t){this.taxonConnectivity.length=0,t.forEach(r=>{_Ae(e,r).then(n=>{const i={taxon:r,label:n};this.taxonConnectivity.push(i)})})},toggleDrawer:function(){this.drawerOpen=!this.drawerOpen},setColour:function(e){this.colourRadio=e,this.mapImp&&this.mapImp.setColour({colour:e,outline:this.outlinesRadio})},setOutlines:function(e){this.outlineRadio=e,this.mapImp&&this.mapImp.setColour({colour:this.colourRadio,outline:e})},resetView:function(){this.mapImp&&(this.mapImp.resetMap(),this.$refs.centrelinesSelection&&this.$refs.centrelinesSelection.reset(),this.$refs.skcanSelection&&this.$refs.skcanSelection.reset(),this.$refs.layersSelection&&this.$refs.layersSelection.reset(),this.$refs.systemsSelection&&this.$refs.pathwaysSelection.reset(),this.$refs.pathwaysSelection&&this.$refs.pathwaysSelection.reset())},zoomIn:function(){this.mapImp&&this.mapImp.zoomIn()},zoomOut:function(){this.mapImp&&this.mapImp.zoomOut()},centreLinesSelected:function(e){this.mapImp&&this.mapImp.enableCentrelines(e.value)},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))},highlightConnectedPaths:async function(e){var t,r;if(this.mapImp){let n=[...this.mapImp.pathModelNodes(e)].map(c=>this.mapImp.featureProperties(c)),i=await this.flatmapQueries.queryForConnectivity(e),o=(r=(t=i==null?void 0:i.ids)==null?void 0:t.dendrites)==null?void 0:r.flat().flat(),s=[],l=!1;n.forEach(c=>{this.mapImp.nodePathModels(c.featureId).forEach(u=>{l=!0,this.mapImp.pathModelNodes(u).forEach(d=>{let h=this.mapImp.featureProperties([d]);if(o.includes(h.models)){l=!1;return}}),l&&s.push(u)})}),this.mapImp.zoomToFeatures(s,{noZoomIn:!0})}},resetMapFilter:function(){const e=this.mapFilters.alert;let t;e.with?e.without||(t={HAS:"alert"}):e.without?t={NOT:{HAS:"alert"}}:t={AND:[{NOT:{HAS:"alert"}},{HAS:"alert"}]},t?this.mapImp.setVisibilityFilter(t):this.mapImp.clearVisibilityFilter()},alertMouseEnterEmitted:function(e){if(this.mapImp)if(e.value){let t;e.key==="alert"?t={HAS:"alert"}:e.key==="withoutAlert"&&(t={NOT:{HAS:"alert"}}),this.mapImp.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)},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){let t=this.mapImp.taxonFeatureIds(e.key);this.mapImp.enableConnectivityByTaxonIds(e.key,e.value),this.mapImp.zoomToGeoJSONFeatures(t,{noZoomIn:!0})}else this.mapImp.selectGeoJSONFeatures("-1"),e.selections.forEach(t=>{let r=e.checked.includes(t.taxon);this.mapImp.enableConnectivityByTaxonIds(t.taxon,r)})},checkAllTaxons:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enableConnectivityByTaxonIds(t,e.value))},pathwaysSelected:function(e){this.mapImp&&this.mapImp.enablePath(e.key,e.value)},checkAllPathways:function(e){this.mapImp&&e.keys.forEach(t=>this.mapImp.enablePath(t,e.value))},enablePanZoomEvents:function(e){this.mapImp.enablePanZoomEvents(e)},annotationEventCallback:function(e,t){if(t.type==="aborted")this.featureAnnotationSubmitted?this.featureAnnotationSubmitted=!1:this.rollbackAnnotationEvent();else if(t.type==="modeChanged")t.feature.mode==="direct_select"&&(this.doubleClickedFeature=!0);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&&(this.connectionEntry={},this.selectedDrawnFeature)){const r=this.existDrawnFeatures.find(n=>n.id===this.selectedDrawnFeature.id);r&&r.connection&&(this.connectionEntry=r.connection),this.annotationDrawModeEvent(e)}}else{if(t.type==="created"||t.type==="updated"){t.type==="updated"&&t.feature.action&&(t.positionUpdated=t.feature.action==="move");const r=this.mapImp.refreshAnnotationFeatureGeometry(t.feature);e.feature.feature=r}t.type==="created"?this.drawnCreatedEvent=e:this.checkAndCreatePopups(e)}},eventCallback:function(){return(e,t,...r)=>{if(e==="annotation"){const n={feature:t,userData:r,eventType:e};this.annotationEventCallback(n,t)}else if(e!=="pan-zoom"){const n=t.label,i=[t.models],o=this.entry,s=this.biologicalSex;let l;t.taxons&&(typeof t.taxons!="object"?l=JSON.parse(t.taxons):l=t.taxons);const c={dataset:t.dataset,biologicalSex:s,taxonomy:o,resource:i,label:n,feature:t,userData:r,eventType:e,provenanceTaxonomy:l};if(e==="click"){if(this.featuresAlert=t.alert,this.viewingMode==="Neuron Connection")this.highlightConnectedPaths([t.models]);else if(this.currentActive=t.models?t.models:"",this.activeDrawTool&&!this.isValidDrawnCreated){const u=t.featureId||this.existDrawnFeatures.find(d=>d.id===t.id);if(this.activeDrawTool==="LineString"&&u){const d=t.featureId?t.featureId:t.id,h=t.label?t.label:`Feature ${t.id}`;this.connectionEntry[` ${d}`]=Object.assign({label:h},Object.fromEntries(Object.entries(t).filter(([p])=>["featureId","models"].includes(p)).map(([p,f])=>[p==="featureId"?"id":p,f])))}}}else e==="mouseenter"&&this.viewingMode!=="Neuron Connection"&&(this.currentHover=t.models?t.models:"");t&&t.type!=="marker"&&e==="click"&&this.viewingMode!=="Neuron Connection"&&!this.activeDrawTool&&this.checkAndCreatePopups(c),this.$emit("resource-selected",c)}else this.$emit("pan-zoom-callback",t)}},changeViewingMode:function(e){e&&(this.viewingMode=e),this.closeTooltip()},checkAndCreatePopups:async function(e){if(this.viewingMode==="Annotation")e.feature?(this.annotationEntry={...e.feature,resourceId:this.serverURL},e.feature.featureId&&e.feature.models?this.displayTooltip(e.feature.models):e.feature.feature&&(this.activeDrawTool||this.activeDrawMode||Object.keys(this.connectionEntry).length>0?(this.featureAnnotationSubmitted=!1,this.annotationEntry.featureId=e.feature.feature.id,this.activeDrawTool&&this.createConnectivityBody(),this.displayTooltip(e.feature.feature.id,xjr(e.feature.feature.geometry))):this.rollbackAnnotationEvent())):this.annotation={};else{let t=await this.flatmapQueries.retrieveFlatmapKnowledgeForEvent(e);(t[0]||t[1]||e.feature.hyperlinks&&e.feature.hyperlinks.length>0)&&(this.resourceForTooltip=e.resource[0],e.resourceForTooltip=this.resourceForTooltip,this.createTooltipFromNeuronCuration(e))}},popUpCssHacks:function(){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.$el.style.display="none",document.querySelectorAll(".maplibregl-popup").forEach(e=>{e.style.display="none"})},createTooltipFromNeuronCuration:async function(e){this.tooltipEntry=await this.flatmapQueries.createTooltipData(e),this.displayTooltip(e.resource[0])},showPopup:function(e,t,r){let n=r;this.mapImp&&(n?n.className||(n.className="custom-popup"):n={className:"custom-popup",positionAtLastClick:!0},this.mapImp.showPopup(e,t,n))},showMarkerPopup:function(e,t,r){this.mapImp&&this.mapImp.showMarkerPopup(e,t,r)},closeMinimap:function(){let e=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");this.minimapSmall?(e.classList.add("enlarge"),e.classList.remove("shrink")):(e.classList.add("shrink"),e.classList.remove("enlarge")),this.minimapSmall=!this.minimapSmall},addResizeButtonToMinimap:function(){let e=this.$refs.flatmapContainer.querySelector(".maplibregl-ctrl-minimap");e&&(this.$refs.minimapResize&&this.$refs.minimapResize.$el.parentNode&&this.$refs.minimapResize.$el.parentNode.removeChild(this.$refs.minimapResize.$el),e.appendChild(this.$refs.minimapResize.$el),this.minimapResizeShow=!0)},setHelpMode:function(e){const t=this.hoverVisibilities.length,r=t-1,n=this.hoverVisibilities[this.helpModeActiveIndex];if(n){const i=n==null?void 0:n.refs,o=n==null?void 0:n.ref,s=this.$refs[i||o];if(s){const{parentElement:l,nextElementSibling:c}=s.$el,u=d=>d&&(d.classList.contains("pathway-container")||d.classList.contains("pathway-location"));(u(l)||u(c))&&(this.drawerOpen=!0)}else this.helpModeActiveIndex+=1}e||(this.helpModeActiveIndex=this.helpModeInitialIndex),this.viewingMode!=="Annotation"&&this.helpModeActiveIndex>9&&(this.helpModeActiveIndex=r),e&&this.helpModeActiveIndex>=r&&this.$emit("help-mode-last-item",!0),e&&!this.helpModeDialog?(this.inHelp=!0,this.hoverVisibilities.forEach(i=>{i.value=!0})):e&&this.helpModeDialog&&t>this.helpModeActiveIndex?this.helpModeActiveIndex>-1?(this.closeFlatmapHelpPopup(),setTimeout(()=>{this.inHelp=!1,this.hoverVisibilities.forEach(i=>{i.value=!1}),this.showTooltip(this.helpModeActiveIndex,200)},300)):this.helpModeActiveIndex===-1&&this.openFlatmapHelpPopup():(this.inHelp=!1,this.hoverVisibilities.forEach(i=>{i.value=!1}),this.closeFlatmapHelpPopup())},showTooltip:function(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 r,n={className:"flatmapvuer-popover"};t?(r=e,n.annotationFeatureGeometry=t):(r=this.mapImp.modelFeatureIds(e)[0],this.activeDrawTool||(n.positionAtLastClick=!0)),this.connectivityInfoSidebar&&this.hasTooltipEntry()&&this.viewingMode!=="Annotation"&&(this.featuresAlert&&(this.tooltipEntry.featuresAlert=this.featuresAlert),this.$emit("connectivity-info-open",this.tooltipEntry)),!this.disableUI&&(this.viewingMode==="Annotation"||this.viewingMode==="Exploration"&&!this.connectivityInfoSidebar&&this.hasTooltipEntry())&&(this.tooltipDisplay=!0,this.$nextTick(()=>{this.mapImp.showPopup(r,this.$refs.tooltip.$el,n),this.popUpCssHacks()}))},hasTooltipEntry:function(){const{components:e,destinations:t,origins:r,provenanceTaxonomy:n,provenanceTaxonomyLabel:i}=this.tooltipEntry;return!!(e!=null&&e.length||t!=null&&t.length||r!=null&&r.length||n!=null&&n.length||i!=null&&i.length)},moveMap:function(e,t={}){if(this.mapImp){const{offsetX:r=0,offsetY:n=0,zoom:i=4}=t,o=this.mapImp._map,s=this.mapImp._bounds.toArray();this.mapImp.zoomToFeatures(e,{noZoomIn:!0}),this.showPathwaysDrawer(!1),s!=null&&s.length&&setTimeout(()=>{o.fitBounds(s,{offset:[r,n],zoom:i,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 r of t.values())r.label&&e.push(r.label);return Array.from(new Set(e))}},getState:function(){if(this.mapImp){let e={entry:this.entry,viewport:this.mapImp.getState()};const t=this.mapImp.getIdentifier();return this.biologicalSex?e.biologicalSex=this.biologicalSex:t&&t.biologicalSex&&(e.biologicalSex=t.biologicalSex),t&&t.uuid&&(e.uuid=t.uuid),e}},setState:function(e){e&&(this.mapImp&&e.entry&&this.entry==e.entry&&(!e.biologicalSex||e.biologicalSex===this.biologicalSex)?e.viewport&&this.mapImp.setState(e.viewport):this.createFlatmap(e),this.setStateRequired=!1)},restoreMapState:function(e){e&&(e.viewport&&this.mapImp.setState(e.viewport),e.searchTerm&&this.searchAndShowResult(e.searchTerm,!0))},setFlightPathInfo:function(e){(e===1.6||e>1.6)&&(this.displayFlightPathOption=!0,this.setFlightPath3D(!1))},createFlatmap:function(e){if(!this.mapImp&&!this.loading){this.loading=!0;let t=!1;this.displayMinimap&&(t={position:"top-right"});let r={taxon:this.entry};this.uuid&&(r.uuid=this.uuid),e?e.uuid?r={uuid:e.uuid}:e.entry&&(r.taxon=e.entry,e.biologicalSex?r.biologicalSex=e.biologicalSex:r.taxon==="NCBITaxon:9606"&&(r.biologicalSex="PATO:0000384")):this.biologicalSex&&(r.biologicalSex=this.biologicalSex),this.mapManager.loadMap(r,this.$refs.display,this.eventCallback(),{minZoom:this.minZoom,tooltips:this.tooltips,minimap:t}).then(n=>{this.mapImp=n,this.serverURL=this.mapImp.makeServerUrl("").slice(0,-1);let i=this.mapImp.details.version;this.setFlightPathInfo(i),this.onFlatmapReady(),this._stateToBeSet?this.restoreMapState(this._stateToBeSet):this.restoreMapState(e)})}else e&&(this._stateToBeSet={viewport:e.viewport,searchTerm:e.searchTerm},this.mapImp&&!this.loading&&this.restoreMapState(this._stateToBeSet))},computePathControlsMaximumHeight(){const e=this.$refs.display;if(e){const t=getComputedStyle(e),r=parseInt(t.paddingTop)+parseInt(t.paddingBottom),n=e.clientHeight-r;this.pathwaysMaxHeight=n-170}},mapResize:function(){try{this.computePathControlsMaximumHeight(),this.mapImp&&(this.mapImp.resize(),this.showMinimap(this.displayMinimap),this.mapImp._minimap&&this.mapImp._minimap._miniMap.resize())}catch{console.error("Map resize error")}},onFlatmapReady:function(){this.sensor=a.markRaw(new qpr(this.$refs.display,this.mapResize)),this.mapImp.options&&this.mapImp.options.style==="functional"&&(this.isFC=!0),this.mapImp.setBackgroundOpacity(1),this.backgroundChangeCallback(this.currentBackground),this.pathways=this.mapImp.pathTypes(),this.mapImp.enableCentrelines(!1),this.processSystems(this.mapImp.getSystems()),this.processTaxon(this.flatmapAPI,this.mapImp.taxonIdentifiers),this.containsAlert="alert"in this.mapImp.featureFilterRanges(),this.addResizeButtonToMinimap(),this.loading=!1,this.computePathControlsMaximumHeight(),this.drawerOpen=!0,this.mapResize(),this.handleMapClick(),this.$emit("ready",this)},handleMapClick:function(){const e=this.mapImp._map;e&&e.on("click",t=>{this.tooltipEntry.featureId&&this.$emit("connectivity-info-close")})},showMinimap:function(e){this.mapImp&&this.mapImp.showMinimap(e)},showPathwaysDrawer:function(e){this.drawerOpen=e},searchAndShowResult:function(e,t){if(this.mapImp){if(e===void 0||e==="")return this.mapImp.clearSearchResults(),!0;{const r=this.mapImp.search(e);if(r&&r.results&&r.results.length>0){if(this.mapImp.showSearchResults(r),t&&r.results[0].featureId&&r.results[0].text){const n=this.mapImp.annotation(r.results[0].featureId);this.mapImp.showPopup(r.results[0].featureId,n.label,{className:"custom-popup",positionAtLastClick:!1,preserveSelection:!0})}return!0}else this.mapImp.clearSearchResults()}}return!1},searchSuggestions:function(e){return this.mapImp?this.mapImp.search(e):[]}},props:{entry:{type:String,required:!0},uuid:String,biologicalSex:{type:String,default:""},minZoom:{type:Number,default:4},tooltips:{type:Boolean,default:!0},helpMode:{type:Boolean,default:!1},helpModeActiveItem:{type:Number,default:0},helpModeDialog:{type:Boolean,default:!1},helpModeLastItem:{type:Boolean,default:!1},helpModeInitialIndex:{type:Number,default:0},renderAtMounted:{type:Boolean,default:!0},displayMinimap:{type:Boolean,default:!1},displayWarning:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array,default:function(){return[{display:"Open AC Map",key:"AC"},{display:"Open FC Map",key:"FC"},{display:"Open 3D Human Map",key:"3D"}]}},showStarInLegend:{type:Boolean,default:!1},isLegacy:{type:Boolean,default:!1},displayLatestChanges:{type:Boolean,default:!1},state:{type:Object,default:void 0},flatmapAPI:{type:String,default:"https://mapcore-demo.org/current/flatmap/v3/"},sparcAPI:{type:String,default:"https://api.sparc.science/"},disableUI:{type:Boolean,default:!1},connectivityInfoSidebar:{type:Boolean,default:!1}},provide(){return{flatmapAPI:this.flatmapAPI,sparcAPI:this.sparcAPI,$annotator:this.annotator,getFeaturesAlert:()=>this.featuresAlert,userApiKey:this.userToken}},data:function(){return{sensor:null,mapManager:void 0,flatmapQueries:void 0,annotationEntry:{},tooltipDisplay:!1,serverURL:void 0,layers:[],pathways:[],sckanDisplay:[{label:"Display Path with SCKAN",key:"VALID"}],centreLines:[{label:"Display Nerves",key:"centrelines",enabled:!1}],systems:[],taxonConnectivity:[],pathwaysMaxHeight:1e3,tooltipWait:a.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:Gpr,isFC:!1,inHelp:!1,currentBackground:"white",availableBackground:["white","lightskyblue","black"],loading:!1,flatmapMarker:jpr,tooltipEntry:_jr(),connectivityTooltipVisible:!1,drawerOpen:!1,featuresAlert:void 0,flightPath3DRadio:!1,displayFlightPathOption:!1,colourRadio:!0,outlinesRadio:!0,minimapResizeShow:!1,minimapSmall:!1,currentActive:"",selectedDrawnFeature:void 0,currentHover:"",viewingMode:"Exploration",viewingModes:{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 internal identifiers of features"},drawnType:"All tools",drawnTypes:["All tools","Point","LineString","Polygon","None"],annotatedType:"Anyone",annotatedTypes:["Anyone","Me","Others"],openMapRef:void 0,backgroundIconRef:void 0,toolbarOptions:["Edit","Delete","Point","LineString","Polygon","Connection"],annotator:void 0,userInformation:void 0,activeDrawMode:void 0,activeDrawTool:void 0,featureAnnotationSubmitted:!1,drawnCreatedEvent:{},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:a.markRaw({alert:{with:!0,without:!0}})}},computed:{...bjr(Qjr,["userToken"]),isValidDrawnCreated:function(){return Object.keys(this.drawnCreatedEvent).length>0}},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))},state:{handler:function(e,t){e!==t&&(this.mapManager?this.setState(e):this.setStateRequired=!0)},immediate:!0,deep:!0},viewingMode:function(e){e==="Annotation"?(this.loading=!0,this.annotator.authenticate(this.userToken).then(t=>{t.name&&t.email&&(this.showAnnotator(!0),this.userInformation=t,this.setFeatureAnnotated(),this.existDrawnFeatures.length===0&&this.addAnnotationFeature()),this.loading=!1})):this.showAnnotator(!1)},disableUI:function(e){e&&this.closeTooltip()}},mounted:function(){this.openMapRef=a.shallowRef(this.$refs.openMapRef),this.backgroundIconRef=a.shallowRef(this.$refs.backgroundIconRef),this.tooltipWait.length=this.hoverVisibilities.length,this.mapManager=a.markRaw(new A1e(this.flatmapAPI)),this.flatmapQueries=a.markRaw(new Upr),this.flatmapQueries.initialise(this.flatmapAPI),this.state?this.setStateRequired&&this.setState(this.state):this.renderAtMounted&&this.createFlatmap()}},Cp=e=>(a.pushScopeId("data-v-84223540"),e=e(),a.popScopeId(),e),Ljr={class:"flatmap-container",ref:"flatmapContainer","element-loading-text":"Loading...","element-loading-background":"rgba(0, 0, 0, 0.3)"},Sjr={style:{height:"100%",width:"100%",position:"relative","overflow-y":"none"}},kjr={style:{height:"100%",width:"100%"},ref:"display"},Cjr={class:"beta-popovers"},Mjr=Cp(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1)),Ejr=Cp(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1)),Ajr=Cp(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/1ZUKXU2YmLcn2reCyXjlew",target:"_blank"}," ApiNATOMY ",-1)),Ojr=Cp(()=>a.createElementVNode("a",{href:"https://sparc.science/resources/6eg3VpJbwQR4B84CjrvmyD",target:"_blank"}," SCKAN ",-1)),Ijr=Cp(()=>a.createElementVNode("span",{class:"warning-text"},"Legacy Map",-1)),Pjr={key:1,class:"warning-text"},Vjr=Cp(()=>a.createElementVNode("span",{class:"warning-text"},"What's new?",-1)),Hjr=Cp(()=>a.createElementVNode("b",null,"Neuron Connection mode",-1)),Rjr=Cp(()=>a.createElementVNode("p",null," You can now view the network of neurons connected to a selected neuron. This mode is located in the settings at the bottom right. Once discovery mode is on, click on a neuron to see its connections. ",-1)),Njr=Cp(()=>a.createElementVNode("b",null,"Now can display up to 6 panes",-1)),Bjr=Cp(()=>a.createElementVNode("p",null," You can now display up to 6 panes in the flatmap. This allows you to compare between different datasets and/or different views of the same dataset. ",-1)),Fjr={class:"bottom-right-control"},Djr=Cp(()=>a.createElementVNode("div",null,[a.createTextVNode(" Fit to "),a.createElementVNode("br"),a.createTextVNode(" window ")],-1)),zjr=["innerHTML"],jjr=["innerHTML"],Ujr={style:{"margin-bottom":"2px"}},Gjr={key:0,class:"viewing-mode-title"},Wjr=["onClick"],qjr=["onClick"];function Zjr(e,t,r,n,i,o){const s=a.resolveComponent("map-svg-sprite-color"),l=wMe,c=Cu,u=IB,d=_ne,h=a.resolveComponent("DrawToolbar"),p=a.resolveComponent("map-svg-icon"),f=xAe,m=a.resolveComponent("tree-controls"),g=QAe,T=xMe,y=WEe,v=GC,Q=WC,_=aie,L=OB,w=lAe,S=cAe,C=a.resolveComponent("Tooltip"),E=TAe,O=lie;return a.withDirectives((a.openBlock(),a.createElementBlock("div",Ljr,[a.createVNode(s),a.createElementVNode("div",Sjr,[a.createElementVNode("div",kjr,null,512),a.withDirectives(a.createElementVNode("div",Cjr,[a.createElementVNode("div",null,[a.createVNode(u,{placement:"right","popper-class":"warning-popper flatmap-popper",teleported:!1,visible:e.hoverVisibilities[7].value,ref:"warningPopover"},{reference:a.withCtx(()=>[r.displayWarning?(a.openBlock(),a.createElementBlock("div",{key:0,class:"warning-icon",onMouseover:t[7]||(t[7]=I=>o.showTooltip(6)),onMouseout:t[8]||(t[8]=I=>o.hideTooltip(6))},[a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(l)]),_:1}),r.isLegacy?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[Ijr,a.createElementVNode("div",{class:"latest-map-text",onClick:t[6]||(t[6]=(...I)=>o.viewLatestMap&&o.viewLatestMap(...I))}," Click here for the latest map ")],64)):(a.openBlock(),a.createElementBlock("span",Pjr,"Beta"))],32)):a.createCommentVNode("",!0)]),default:a.withCtx(()=>[r.isLegacy?(a.openBlock(),a.createElementBlock("p",{key:0,onMouseover:t[0]||(t[0]=I=>o.showTooltip(7)),onMouseout:t[1]||(t[1]=I=>o.hideTooltip(7))}," This is a legacy map, you may view the latest map instead. ",32)):e.isFC?(a.openBlock(),a.createElementBlock("p",{key:1,onMouseover:t[2]||(t[2]=I=>o.showTooltip(7)),onMouseout:t[3]||(t[3]=I=>o.hideTooltip(7))},[a.createTextVNode(" This map displays the connectivity of individual neurons. Specifically, those which align with (parts of) the neuron populations from the "),Mjr,a.createTextVNode(" models available in "),Ejr,a.createTextVNode(". ")],32)):(a.openBlock(),a.createElementBlock("p",{key:2,onMouseover:t[4]||(t[4]=I=>o.showTooltip(6)),onMouseout:t[5]||(t[5]=I=>o.hideTooltip(6))},[a.createTextVNode(" This map displays the connectivity of neuron populations. Specifically, those from the primarily rat-based "),Ajr,a.createTextVNode(" models available in "),Ojr,a.createTextVNode(". New connectivity and species specificity will be added as the SPARC program progresses. ")],32))]),_:1},8,["visible"])]),r.displayLatestChanges?(a.openBlock(),a.createBlock(u,{key:0,placement:"right",teleported:!1,trigger:"manual","popper-class":"warning-popper flatmap-popper",visible:e.hoverVisibilities[8].value,ref:"whatsNewPopover"},{reference:a.withCtx(()=>[r.displayLatestChanges?(a.openBlock(),a.createElementBlock("div",{key:0,class:"latest-changesicon",onMouseover:t[9]||(t[9]=I=>o.showTooltip(8)),onMouseout:t[10]||(t[10]=I=>o.hideTooltip(8))},[a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(l)]),_:1}),Vjr],32)):a.createCommentVNode("",!0)]),default:a.withCtx(()=>[Hjr,Rjr,Njr,Bjr]),_:1},8,["visible"])):a.createCommentVNode("",!0)],512),[[a.vShow,!r.disableUI]]),a.withDirectives(a.createVNode(c,{class:a.normalizeClass(["minimap-resize",{enlarge:e.minimapSmall,shrink:!e.minimapSmall}]),ref:"minimapResize",onClick:o.closeMinimap},{default:a.withCtx(()=>[a.createVNode(d)]),_:1},8,["class","onClick"]),[[a.vShow,e.minimapResizeShow]]),e.viewingMode==="Annotation"&&e.userInformation&&!r.disableUI?(a.openBlock(),a.createBlock(h,{key:0,mapCanvas:{containerHTML:this.$el,class:".maplibregl-canvas"},toolbarOptions:e.toolbarOptions,drawnType:e.drawnType,activeDrawTool:e.activeDrawTool,activeDrawMode:e.activeDrawMode,newlyDrawnEntry:e.drawnCreatedEvent,connectionEntry:e.connectionEntry,hoverVisibilities:e.hoverVisibilities,onClickToolbar:o.toolbarEvent,onFeatureTooltip:o.connectedFeatureTooltip,onConfirmDrawn:o.confirmDrawnFeature,onCancelDrawn:o.cancelDrawnFeature,onShowTooltip:o.showTooltip,onHideTooltip:o.hideTooltip,ref:"toolbarPopover"},null,8,["mapCanvas","toolbarOptions","drawnType","activeDrawTool","activeDrawMode","newlyDrawnEntry","connectionEntry","hoverVisibilities","onClickToolbar","onFeatureTooltip","onConfirmDrawn","onCancelDrawn","onShowTooltip","onHideTooltip"])):a.createCommentVNode("",!0),a.withDirectives(a.createElementVNode("div",Fjr,[a.createVNode(u,{content:"Zoom in",placement:"left",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[1].value,ref:"zoomInPopover"},{reference:a.withCtx(()=>[a.createVNode(p,{icon:"zoomIn",class:"icon-button zoomIn",onClick:t[11]||(t[11]=I=>o.zoomIn()),onMouseover:t[12]||(t[12]=I=>o.showTooltip(1)),onMouseout:t[13]||(t[13]=I=>o.hideTooltip(1))})]),_:1},8,["visible"]),a.createVNode(u,{content:"Zoom out",placement:"top-end",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[2].value,ref:"zoomOutPopover"},{reference:a.withCtx(()=>[a.createVNode(p,{icon:"zoomOut",class:"icon-button zoomOut",onClick:t[14]||(t[14]=I=>o.zoomOut()),onMouseover:t[15]||(t[15]=I=>o.showTooltip(2)),onMouseout:t[16]||(t[16]=I=>o.hideTooltip(2))})]),_:1},8,["visible"]),a.createVNode(u,{content:"Reset",placement:"top",teleported:!1,trigger:"manual",width:"70","popper-class":"flatmap-popper",visible:e.hoverVisibilities[3].value,ref:"zoomFitPopover"},{reference:a.withCtx(()=>[a.createVNode(p,{icon:"fitWindow",class:"icon-button fitWindow",onClick:t[17]||(t[17]=I=>o.resetView()),onMouseover:t[18]||(t[18]=I=>o.showTooltip(3)),onMouseout:t[19]||(t[19]=I=>o.hideTooltip(3))})]),default:a.withCtx(()=>[Djr]),_:1},8,["visible"])],512),[[a.vShow,!r.disableUI]]),a.createVNode(u,{content:"Change pathway visibility",placement:"right",teleported:!1,trigger:"manual",offset:-18,"popper-class":"flatmap-popper",visible:e.hoverVisibilities[6].value,ref:"checkBoxPopover"},{reference:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{class:a.normalizeClass(["pathway-location",{open:e.drawerOpen,close:!e.drawerOpen}])},[a.withDirectives((a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["pathway-container",{open:e.drawerOpen,close:!e.drawerOpen}]),style:a.normalizeStyle({"max-height":e.pathwaysMaxHeight+"px"})},[e.isFC?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(f,{key:0,class:"svg-legends-container"})),r.showStarInLegend?(a.openBlock(),a.createBlock(u,{key:1,content:"Location of the featured dataset",placement:"right",teleported:!0,trigger:"manual",width:"max-content",offset:-10,"popper-class":"flatmap-popper flatmap-teleport-popper",visible:e.hoverVisibilities[9].value,ref:"featuredMarkerPopover"},{reference:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{class:"yellow-star-legend",innerHTML:e.yellowstar,onMouseover:t[20]||(t[20]=I=>o.showTooltip(9)),onMouseout:t[21]||(t[21]=I=>o.hideTooltip(9))},null,40,zjr),[[E,void 0,"featuredMarkerPopover"]])]),_:1},8,["visible"])):a.createCommentVNode("",!0),a.createVNode(u,{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[5].value,ref:"markerPopover"},{reference:a.withCtx(()=>[a.withDirectives(a.createElementVNode("div",{class:"flatmap-marker-help",innerHTML:e.flatmapMarker},null,8,jjr),[[a.vShow,e.hoverVisibilities[0].value],[E,void 0,"markerPopover"]])]),_:1},8,["visible"]),e.isFC&&e.systems&&e.systems.length>0?(a.openBlock(),a.createBlock(m,{key:2,class:"treeControls",mapType:"flatmap",title:"Systems",treeData:e.systems,active:e.currentActive,hover:e.currentHover,onCheckChanged:o.systemSelected,onCheckAll:o.checkAllSystems,onChangeActive:o.ftuSelected,ref:"treeControls"},null,8,["treeData","active","hover","onCheckChanged","onCheckAll","onChangeActive"])):a.createCommentVNode("",!0),e.containsAlert&&e.alertOptions?(a.openBlock(),a.createBlock(g,{title:"Alert",labelKey:"label",identifierKey:"key",selections:e.alertOptions,onChanged:o.alertSelected,onCheckboxMouseEnter:o.alertMouseEnterEmitted,onSelectionsDataChanged:o.onSelectionsDataChanged,onCheckAll:o.checkAllAlerts,ref:"alertSelection",key:"alertSelection"},null,8,["selections","onChanged","onCheckboxMouseEnter","onSelectionsDataChanged","onCheckAll"])):a.createCommentVNode("",!0),e.pathways&&e.pathways.length>0?(a.openBlock(),a.createBlock(g,{title:"Pathways",labelKey:"label",identifierKey:"type",colourStyle:"line",selections:e.pathways,onChanged:o.pathwaysSelected,onSelectionsDataChanged:o.onSelectionsDataChanged,onCheckAll:o.checkAllPathways,ref:"pathwaysSelection",key:"pathwaysSelection"},null,8,["selections","onChanged","onSelectionsDataChanged","onCheckAll"])):a.createCommentVNode("",!0),!e.isFC&&e.taxonConnectivity&&e.taxonConnectivity.length>0?(a.openBlock(),a.createBlock(g,{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:o.taxonsSelected,onCheckboxMouseEnter:o.taxonMouseEnterEmitted,onSelectionsDataChanged:o.onSelectionsDataChanged,onCheckAll:o.checkAllTaxons,ref:"taxonSelection",key:"taxonSelection"},null,8,["selections","onChanged","onCheckboxMouseEnter","onSelectionsDataChanged","onCheckAll"])):a.createCommentVNode("",!0),!e.isFC&&e.centreLines&&e.centreLines.length>0?(a.openBlock(),a.createBlock(g,{title:"Nerves",labelKey:"label",identifierKey:"key",selections:e.centreLines,onChanged:o.centreLinesSelected,onSelectionsDataChanged:o.onSelectionsDataChanged,ref:"centrelinesSelection",key:"centrelinesSelection"},null,8,["selections","onChanged","onSelectionsDataChanged"])):a.createCommentVNode("",!0)],6)),[[E,void 0,"checkBoxPopover"]]),a.createElementVNode("div",{onClick:t[22]||(t[22]=(...I)=>o.toggleDrawer&&o.toggleDrawer(...I)),class:a.normalizeClass(["drawer-button",{open:e.drawerOpen,close:!e.drawerOpen}])},[a.createVNode(c,null,{default:a.withCtx(()=>[a.createVNode(T)]),_:1})],2)],2),[[a.vShow,!r.disableUI]])]),_:1},8,["visible"]),e.openMapRef?(a.openBlock(),a.createBlock(u,{key:1,ref:"open-map-popover","virtual-ref":e.openMapRef,placement:"top-start",width:"136",teleported:!1,trigger:"click","popper-class":"open-map-popper non-selectable","virtual-triggering":""},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.openMapOptions,I=>(a.openBlock(),a.createBlock(v,{key:I.key},{default:a.withCtx(()=>[a.createVNode(y,{type:"primary",plain:"",onClick:R=>e.$emit("open-map",I.key)},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(I.display),1)]),_:2},1032,["onClick"])]),_:2},1024))),128))]),_:1},8,["virtual-ref"])):a.createCommentVNode("",!0),a.createVNode(u,{ref:"backgroundPopover","virtual-ref":e.backgroundIconRef,placement:"top-start",width:"320",teleported:!1,trigger:"click","popper-class":"background-popper h-auto","virtual-triggering":""},{default:a.withCtx(()=>[a.createElementVNode("div",null,[a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Viewing Mode")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createElementVNode("div",Ujr,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.viewingModes,(I,R,B)=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:R},[R===e.viewingMode?(a.openBlock(),a.createElementBlock("span",Gjr,[a.createElementVNode("b",null,a.toDisplayString(R),1)])):(a.openBlock(),a.createElementBlock("span",{key:1,class:"viewing-mode-unselected",onClick:D=>o.changeViewingMode(R)},a.toDisplayString(R),9,Wjr))],64))),128))]),a.createVNode(v,{class:"viewing-mode-description"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(e.viewingModes[e.viewingMode]),1)]),_:1})]),_:1}),e.viewingMode==="Annotation"&&e.userInformation?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Drawn By*")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(L,{teleported:!1,modelValue:e.drawnType,"onUpdate:modelValue":t[23]||(t[23]=I=>e.drawnType=I),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown",onChange:o.setDrawnType},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.drawnTypes,I=>(a.openBlock(),a.createBlock(_,{key:I,label:I,value:I},{default:a.withCtx(()=>[a.createVNode(v,null,{default:a.withCtx(()=>[a.createVNode(Q,{span:12},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(I),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Annotated By*")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(L,{teleported:!1,modelValue:e.annotatedType,"onUpdate:modelValue":t[24]||(t[24]=I=>e.annotatedType=I),placeholder:"Select",class:"select-box","popper-class":"flatmap_dropdown",onChange:o.setAnnotatedType},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.annotatedTypes,I=>(a.openBlock(),a.createBlock(_,{key:I,label:I,value:I},{default:a.withCtx(()=>[a.createVNode(v,null,{default:a.withCtx(()=>[a.createVNode(Q,{span:12},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(I),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1})],64)):a.createCommentVNode("",!0),e.displayFlightPathOption?(a.openBlock(),a.createBlock(v,{key:1,class:"backgroundSpacer"})):a.createCommentVNode("",!0),e.displayFlightPathOption?(a.openBlock(),a.createBlock(v,{key:2,class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Flight path display")]),_:1})):a.createCommentVNode("",!0),e.displayFlightPathOption?(a.openBlock(),a.createBlock(v,{key:3,class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(S,{modelValue:e.flightPath3DRadio,"onUpdate:modelValue":t[25]||(t[25]=I=>e.flightPath3DRadio=I),class:"flatmap-radio",onChange:o.setFlightPath3D},{default:a.withCtx(()=>[a.createVNode(w,{label:!1},{default:a.withCtx(()=>[a.createTextVNode("2D")]),_:1}),a.createVNode(w,{label:!0},{default:a.withCtx(()=>[a.createTextVNode("3D")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1})):a.createCommentVNode("",!0),a.createVNode(v,{class:"backgroundSpacer"}),a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Organs display")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(S,{modelValue:e.colourRadio,"onUpdate:modelValue":t[26]||(t[26]=I=>e.colourRadio=I),class:"flatmap-radio",onChange:o.setColour},{default:a.withCtx(()=>[a.createVNode(w,{label:!0},{default:a.withCtx(()=>[a.createTextVNode("Colour")]),_:1}),a.createVNode(w,{label:!1},{default:a.withCtx(()=>[a.createTextVNode("Greyscale")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),a.createVNode(v,{class:"backgroundSpacer"}),a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Outlines display")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[a.createVNode(S,{modelValue:e.outlinesRadio,"onUpdate:modelValue":t[27]||(t[27]=I=>e.outlinesRadio=I),class:"flatmap-radio",onChange:o.setOutlines},{default:a.withCtx(()=>[a.createVNode(w,{label:!0},{default:a.withCtx(()=>[a.createTextVNode("Show")]),_:1}),a.createVNode(w,{label:!1},{default:a.withCtx(()=>[a.createTextVNode("Hide")]),_:1})]),_:1},8,["modelValue","onChange"])]),_:1}),a.createVNode(v,{class:"backgroundSpacer"}),a.createVNode(v,{class:"backgroundText"},{default:a.withCtx(()=>[a.createTextVNode("Change background")]),_:1}),a.createVNode(v,{class:"backgroundControl"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.availableBackground,I=>(a.openBlock(),a.createElementBlock("div",{key:I,class:a.normalizeClass(["backgroundChoice",I,I==e.currentBackground?"active":""]),onClick:R=>o.backgroundChangeCallback(I)},null,10,qjr))),128))]),_:1})])]),_:1},8,["virtual-ref"]),a.withDirectives(a.createElementVNode("div",{class:a.normalizeClass(["settings-group",{open:e.drawerOpen,close:!e.drawerOpen}])},[a.createVNode(v,null,{default:a.withCtx(()=>[a.createVNode(u,{visible:e.hoverVisibilities[4].value,content:"Open new map",placement:"right",teleported:!1,"popper-class":"flatmap-popper",ref:"openMapPopover"},{reference:a.withCtx(()=>[r.enableOpenMapUI&&r.openMapOptions.length>0?(a.openBlock(),a.createBlock(p,{key:0,ref:"openMapRef",icon:"openMap",class:"icon-button open-map-button",onMouseover:t[28]||(t[28]=I=>o.showTooltip(4)),onMouseout:t[29]||(t[29]=I=>o.hideTooltip(4))},null,512)):a.createCommentVNode("",!0)]),_:1},8,["visible"])]),_:1}),a.createVNode(v,null,{default:a.withCtx(()=>[a.createVNode(u,{content:"Change settings",placement:"right",visible:e.hoverVisibilities[5].value,teleported:!1,trigger:"manual","popper-class":"flatmap-popper",ref:"settingsPopover"},{reference:a.withCtx(()=>[a.createVNode(p,{ref:"backgroundIconRef",icon:"changeBckgd",class:"icon-button",onMouseover:t[30]||(t[30]=I=>o.showTooltip(5)),onMouseout:t[31]||(t[31]=I=>o.hideTooltip(5))},null,512)]),_:1},8,["visible"])]),_:1})],2),[[a.vShow,!r.disableUI]]),a.withDirectives(a.createVNode(C,{ref:"tooltip",class:"tooltip",annotationEntry:e.annotationEntry,tooltipEntry:e.tooltipEntry,annotationDisplay:e.viewingMode==="Annotation",onAnnotation:o.commitAnnotationEvent},null,8,["annotationEntry","tooltipEntry","annotationDisplay","onAnnotation"]),[[a.vShow,e.tooltipDisplay]])])])),[[O,e.loading]])}const B1e=HB(wjr,[["render",Zjr],["__scopeId","data-v-84223540"]]);function Xjr(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map(function(i){i(r)}),(n=e.get("*"))&&n.slice().map(function(i){i(t,r)})}}}const Xje=new Xjr,Kje={"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"},Kjr={name:"MultiFlatmapVuer",components:{Col:WC,Row:GC,Option:aie,Select:OB,Popover:IB,FlatmapVuer:B1e},mounted:function(){this.initialise(),Xje.on("onActionClick",e=>{this.resourceSelected(e)}),Xje.on("open-pubmed-url",e=>{this.$emit("open-pubmed-url",e)})},methods:{initialise:function(){return new Promise(e=>{this.requireInitialisation?(this.requireInitialisation=!1,fetch(this.flatmapAPI).then(t=>t.json()).then(t=>{Object.keys(this.availableSpecies).forEach(n=>{const i=this.availableSpecies[n].uuid;if(i&&t.map(o=>o.uuid).indexOf(i)>0)this.speciesList[n]=this.availableSpecies[n];else for(let o=0;o<t.length;o++)if(this.availableSpecies[n].taxo===t[o].taxon)if(this.availableSpecies[n].biologicalSex){if(t[o].biologicalSex&&t[o].biologicalSex===this.availableSpecies[n].biologicalSex){this.speciesList[n]=this.availableSpecies[n];break}}else{this.speciesList[n]=this.availableSpecies[n];break}});let r=this.initial;if(this.state){const n=this.state.state;(!n||!n.uuid&&!n.entry)&&this.state.species?r=this.state.species:r=void 0}r&&(r&&this.speciesList[r]!==void 0?this.activeSpecies=r:this.activeSpecies=Object.keys(this.speciesList)[0],this.setSpecies(this.activeSpecies,this.state?this.state.state:void 0,5)),this.initialised=!0,e(),this.resolveList.forEach(n=>{n()})})):this.initialised?e():this.resolveList.push(e)})},resourceSelected:function(e){this.$emit("resource-selected",e)},FlatmapReady:function(e){this.$emit("ready",e)},getCurrentFlatmap:function(){return this.$refs[this.activeSpecies][0]},panZoomCallback:function(e){this.$emit("pan-zoom-callback",e)},onConnectivityInfoClose:function(){this.$emit("connectivity-info-close")},onConnectivityInfoOpen:function(e){this.$emit("connectivity-info-open",e)},onSelectionsDataChanged:function(e){this.$emit("pathway-selection-changed",e)},showPopup:function(e,t,r){this.getCurrentFlatmap().showPopup(e,t,r)},showMarkerPopup:function(e,t,r){this.getCurrentFlatmap().showMarkerPopup(e,t,r)},setSpecies:function(e,t,r){if(this.$refs&&e in this.$refs)this.activeSpecies=e,this.$refs[this.activeSpecies][0].createFlatmap(t),this.$emit("flatmapChanged",this.activeSpecies);else if(r){const n=r-1;n>=0&&this.$nextTick(()=>{this.setSpecies(e,t,n)})}},viewLatestMap:function(e){const t=Object.keys(this.speciesList);for(let r=0;r<t.length;r++){const n=this.speciesList[t[r]];if(!n.isLegacy&&n.taxo===e.entry&&n.biologicalSex===e.biologicalSex){this.setSpecies(t[r],e,0);return}}},createLegacyEntry:function(e,t,r){if(r&&t){let n="Legacy";return e.species&&(e.species.slice(0,6)==="Legacy"?n=e.species:n=n+` ${e.species}`),this.speciesList[n]={taxo:t,isLegacy:!0,displayWarning:!0},{species:n,state:{entry:t,uuid:r,viewport:e.state.viewport,searchTerm:e.state.searchTerm}}}},updateState:function(e){return new Promise(t=>{if(e&&e.state){const r=e.state;if(r.uuid){if(r.entry)return new Promise(()=>{const n=new A1e(this.flatmapAPI),i={taxon:r.entry};r.biologicalSex&&(i.biologicalSex=r.biologicalSex),n.findMap_(i).then(o=>{if(o.uuid!==r.uuid)return this.createLegacyEntry(e,r.entry,r.uuid)}).then(o=>{t(o||e)}).catch(()=>{t(e)})})}else if(r.entry){const n=r.entry in Kje?Kje[r.entry]:void 0,i=this.createLegacyEntry(e,r.entry,n);t(i||e)}}t(e)})},getState:function(){let e={species:this.activeSpecies,state:void 0},t=this.getCurrentFlatmap();return e.state=t.getState(),e},setState:function(e){e&&this.updateState(e).then(t=>{this.initialise().then(()=>{t.species&&t.species!==this.activeSpecies?this.setSpecies(t.species,t.state,5):t.state&&this.getCurrentFlatmap().setState(t.state)})})},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)}},props:{initial:{type:String,default:""},minZoom:{type:Number,default:4},renderAtMounted:{type:Boolean,default:!1},helpMode:{type:Boolean,default:!1},helpModeActiveItem:{type:Number,default:0},helpModeDialog:{type:Boolean,default:!1},helpModeLastItem:{type:Boolean,default:!1},displayMinimap:{type:Boolean,default:!1},showStarInLegend:{type:Boolean,default:!1},enableOpenMapUI:{type:Boolean,default:!1},openMapOptions:{type:Array},availableSpecies:{type:Object,default:function(){return{"Human Female":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000383",iconClass:"mapicon-icon_human",displayWarning:!0},"Human Male":{taxo:"NCBITaxon:9606",biologicalSex:"PATO:0000384",iconClass:"mapicon-icon_human",displayWarning:!0},Rat:{taxo:"NCBITaxon:10114",iconClass:"mapicon-icon_rat",displayLatestChanges:!0},Mouse:{taxo:"NCBITaxon:10090",iconClass:"mapicon-icon_mouse",displayWarning:!0},Pig:{taxo:"NCBITaxon:9823",iconClass:"mapicon-icon_pig",displayWarning:!0},Cat:{taxo:"NCBITaxon:9685",iconClass:"mapicon-icon_cat",displayWarning:!0}}}},state:{type:Object,default:void 0},flatmapAPI:{type:String,default:"https://mapcore-demo.org/current/flatmap/v3/"},sparcAPI:{type:String,default:"https://api.sparc.science/"},disableUI:{type:Boolean,default:!1},connectivityInfoSidebar:{type:Boolean,default:!1}},data:function(){return{activeSpecies:void 0,speciesList:{},requireInitialisation:!0,resolveList:a.markRaw([]),initialised:!1}},watch:{state:{handler:function(e){this.setState(e)},immediate:!0,deep:!0}}},Yjr=e=>(a.pushScopeId("data-v-5364de02"),e=e(),a.popScopeId(),e),Jjr={class:"multi-container",ref:"multiContainer"},$jr={key:0,style:{position:"absolute","z-index":"10"}},eUr=Yjr(()=>a.createElementVNode("div",{class:"species-display-text"},"Species",-1)),tUr={class:"select-box-icon"};function rUr(e,t,r,n,i,o){const s=aie,l=OB,c=IB,u=B1e;return a.openBlock(),a.createElementBlock("div",Jjr,[r.disableUI?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",$jr,[eUr,a.createVNode(c,{content:"Select a species",placement:"right",trigger:"manual","popper-class":"flatmap-popper flatmap-teleport-popper right-popper",width:"max-content",visible:o.activateTooltipByIndex(0),teleported:!1,ref:"selectPopover"},{reference:a.withCtx(()=>[a.createVNode(l,{id:"flatmap-select",teleported:!1,modelValue:e.activeSpecies,"onUpdate:modelValue":t[0]||(t[0]=d=>e.activeSpecies=d),placeholder:"Select",class:"select-box","popper-class":"flatmap-dropdown",onChange:o.setSpecies},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.speciesList,(d,h)=>(a.openBlock(),a.createBlock(s,{key:h,label:h,value:h},{default:a.withCtx(()=>[a.createElementVNode("span",tUr,[a.createElementVNode("i",{class:a.normalizeClass(d.iconClass)},null,2)]),a.createTextVNode(" "+a.toDisplayString(h),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1},8,["visible"])])),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.speciesList,(d,h)=>a.withDirectives((a.openBlock(),a.createBlock(u,{key:h,entry:d.taxo,uuid:d.uuid,biologicalSex:d.biologicalSex,displayWarning:d.displayWarning,displayLatestChanges:d.displayLatestChanges,isLegacy:d.isLegacy,ref_for:!0,ref:h,enableOpenMapUI:r.enableOpenMapUI,openMapOptions:r.openMapOptions,disableUI:r.disableUI,onViewLatestMap:o.viewLatestMap,onResourceSelected:o.resourceSelected,onReady:o.FlatmapReady,onPanZoomCallback:o.panZoomCallback,connectivityInfoSidebar:r.connectivityInfoSidebar,onConnectivityInfoOpen:o.onConnectivityInfoOpen,onConnectivityInfoClose:o.onConnectivityInfoClose,onOpenMap:t[1]||(t[1]=p=>e.$emit("open-map",p)),onPathwaySelectionChanged:o.onSelectionsDataChanged,minZoom:r.minZoom,helpMode:e.activeSpecies==h&&r.helpMode,helpModeActiveItem:r.helpModeActiveItem,helpModeDialog:r.helpModeDialog,helpModeInitialIndex:-2,onHelpModeLastItem:o.onHelpModeLastItem,onShownTooltip:o.onTooltipShown,onShownMapTooltip:o.onMapTooltipShown,renderAtMounted:r.renderAtMounted,displayMinimap:r.displayMinimap,showStarInLegend:r.showStarInLegend,style:{height:"100%"},flatmapAPI:r.flatmapAPI,sparcAPI:r.sparcAPI},null,8,["entry","uuid","biologicalSex","displayWarning","displayLatestChanges","isLegacy","enableOpenMapUI","openMapOptions","disableUI","onViewLatestMap","onResourceSelected","onReady","onPanZoomCallback","connectivityInfoSidebar","onConnectivityInfoOpen","onConnectivityInfoClose","onPathwaySelectionChanged","minZoom","helpMode","helpModeActiveItem","helpModeDialog","onHelpModeLastItem","onShownTooltip","onShownMapTooltip","renderAtMounted","displayMinimap","showStarInLegend","flatmapAPI","sparcAPI"])),[[a.vShow,e.activeSpecies==h]])),128))],512)}const nUr=HB(Kjr,[["render",rUr],["__scopeId","data-v-5364de02"]]),iUr={name:"Flatmap",mixins:[rQ,Rwe],components:{FlatmapVuer:B1e,HelpModeDialog:nne},methods:{getState:function(){return this.$refs.flatmap.getState()},search:function(e){return this.$refs.flatmap.searchAndShowResult(e)},getFlatmapImp(){var e;return(e=this.$refs.flatmap)==null?void 0:e.mapImp},flatmaprResourceSelected:function(e,t){if(this.resourceSelected(e,t,this.$refs.flatmap.viewingMode==="Exploration"),t.eventType==="click"&&t.feature.type==="feature"){const r={label:t.label||"",id:t.feature.id||"",featureId:t.feature.featureId||"",taxonomy:t.taxonomy||"",resources:t.resource.join(", ")},n=cye(r);V1.sendEvent({event:"interaction_event",event_name:"portal_maps_connectivity",category:n,location:e+" "+this.$refs.flatmap.viewingMode})}},flatmapReadyCall:function(e){let t={id:this.entry.id,prov:this.getFlatmapImp().provenance};Li.emit("mapImpProv",t),this.$emit("flatmap-provenance-ready",t),this.entry.resource!=="FunctionalConnectivity"&&this.flatmapReadyForMarkerUpdates(e),Li.emit("mapReady",e)},onPathwaySelectionChanged:function(e){const{label:t,property:r,checked:n,selectionsTitle:i}=e;V1.sendEvent({event:"interaction_event",event_name:"portal_maps_pathway_change",category:t+" ["+r+"] "+n,location:i})},highlightFeatures:function(e){let t=e.name;const r=this.$refs.flatmap.mapImp;if(t){const n=r.search(t);n.featureIds[0]&&r.highlightFeatures([r.modelForFeature(n.featureIds[0])])}},searchSuggestions:function(e,t){e&&this.$refs.flatmap.mapImp&&this.$refs.flatmap.mapImp.search(e).__featureIds.forEach(n=>{const i=this.$refs.flatmap.mapImp.annotation(n);i&&i.label&&t.push(i.label)})},zoomToFeatures:function(e,t){let r=e.name;const n=this.$refs.flatmap.mapImp;if(r){const i=n.search(r);if(i.featureIds.length){let o=n.modelForFeature(i.featureIds[0]);o?(t&&n.selectFeatures(o),n.zoomToFeatures(o)):n.clearSearchResults()}}else n.clearSearchResults()},changeViewingMode:function(e){this.$refs.flatmap.changeViewingMode(e)}},computed:{facetSpecies(){return this.settingsStore.facets.species}},mounted:function(){Li.on("markerUpdate",()=>{this.flatmapMarkerUpdate(void 0)}),Li.on("hoverUpdate",()=>{this.mapHoverHighlight(this.$refs.flatmap.mapImp)}),Li.on("show-connectivity",e=>{const{featureIds:t,offset:r}=e,n=this.$refs.flatmap;n&&n.moveMap(t,{offsetX:r?-150:0,zoom:4})}),Li.on("changeViewingMode",e=>{this.changeViewingMode(e)})}},oUr={class:"viewer-container"};function aUr(e,t,r,n,i,o){const s=a.resolveComponent("FlatmapVuer"),l=a.resolveComponent("HelpModeDialog");return a.openBlock(),a.createElementBlock("div",oUr,[a.createVNode(s,{state:e.entry.state,entry:e.entry.resource,onResourceSelected:t[0]||(t[0]=c=>o.flatmaprResourceSelected(e.entry.type,c)),onPanZoomCallback:e.flatmapPanZoomCallback,name:e.entry.resource,style:{height:"100%",width:"100%"},minZoom:e.entry.minZoom,helpMode:e.helpMode,helpModeActiveItem:e.helpModeActiveItem,helpModeInitialIndex:-1,helpModeDialog:e.useHelpModeDialog,onHelpModeLastItem:e.onHelpModeLastItem,onShownTooltip:e.onTooltipShown,onShownMapTooltip:e.onMapTooltipShown,onConnectivityInfoOpen:e.onConnectivityInfoOpen,onConnectivityInfoClose:e.onConnectivityInfoClose,connectivityInfoSidebar:e.connectivityInfoSidebar,pathControls:!0,ref:"flatmap",onReady:o.flatmapReadyCall,displayMinimap:!1,displayWarning:!0,enableOpenMapUI:!0,flatmapAPI:e.flatmapAPI,sparcAPI:e.apiLocation,onOpenMap:e.openMap,onPathwaySelectionChanged:o.onPathwaySelectionChanged},null,8,["state","entry","onPanZoomCallback","name","minZoom","helpMode","helpModeActiveItem","helpModeDialog","onHelpModeLastItem","onShownTooltip","onShownMapTooltip","onConnectivityInfoOpen","onConnectivityInfoClose","connectivityInfoSidebar","onReady","flatmapAPI","sparcAPI","onOpenMap","onPathwaySelectionChanged"]),e.helpMode&&e.useHelpModeDialog?(a.openBlock(),a.createBlock(l,{key:0,ref:"flatmapHelp",flatmapRef:e.flatmapRef,lastItem:e.helpModeLastItem,onShowNext:e.onHelpModeShowNext,onFinishHelpMode:e.onFinishHelpMode},null,8,["flatmapRef","lastItem","onShowNext","onFinishHelpMode"])):a.createCommentVNode("",!0)])}const sUr=Object.freeze(Object.defineProperty({__proto__:null,default:Zc(iUr,[["render",aUr],["__scopeId","data-v-d97dc21f"]])},Symbol.toStringTag,{value:"Module"})),lUr={name:"Iframe",mixins:[rQ]},cUr={class:"map-iframe-container"},uUr=["src"];function dUr(e,t,r,n,i,o){return a.openBlock(),a.createElementBlock("div",cUr,[a.createElementVNode("iframe",{class:"my-iframe",src:e.entry.resource.share_link},null,8,uUr)])}const hUr=Object.freeze(Object.defineProperty({__proto__:null,default:Zc(lUr,[["render",dUr],["__scopeId","data-v-60f8bfe1"]])},Symbol.toStringTag,{value:"Module"})),pUr='<svg width="72px" height="72px" viewBox="0 0 24 24" fill="yellow"><path d="M11.0748 3.25583C11.4141 2.42845 12.5859 2.42845 12.9252 3.25583L14.6493 7.45955C14.793 7.80979 15.1221 8.04889 15.4995 8.07727L20.0303 8.41798C20.922 8.48504 21.2841 9.59942 20.6021 10.1778L17.1369 13.1166C16.8482 13.3614 16.7225 13.7483 16.8122 14.1161L17.8882 18.5304C18.1 19.3992 17.152 20.0879 16.3912 19.618L12.5255 17.2305C12.2034 17.0316 11.7966 17.0316 11.4745 17.2305L7.60881 19.618C6.84796 20.0879 5.90001 19.3992 6.1118 18.5304L7.18785 14.1161C7.2775 13.7483 7.1518 13.3614 6.86309 13.1166L3.3979 10.1778C2.71588 9.59942 3.07796 8.48504 3.96971 8.41798L8.50046 8.07727C8.87794 8.04889 9.20704 7.80979 9.35068 7.45955L11.0748 3.25583Z" stroke="#000000" stroke-width="2"/></svg>',Yje=e=>{const t=[{display:"Open AC Map",key:"AC"},{display:"Open FC Map",key:"FC"},{display:"Open 3D Human Map",key:"3D"}];switch(e){case"Human Male":case"Human Female":case"Rat":t.push({display:"Open Sync Map",key:"SYNC"});break}return t},fUr={name:"MultiFlatmap",mixins:[rQ,Rwe],components:{MultiFlatmapVuer:nUr,HelpModeDialog:nne},data:function(){return{zoomLevel:6,flatmapReady:!1,availableSpecies:lye(),scaffoldResource:{},showStarInLegend:!1,openMapOptions:Yje("Rat")}},methods:{toggleSyncMode:async function(){if(this.syncMode==!1){let e;this.activeSpecies==="Rat"?e={contextCard:void 0,discoverId:void 0,label:"Rat Body",resource:"https://mapcore-bucket1.s3.us-west-2.amazonaws.com/WholeBody/31-May-2021/ratBody/ratBody_syncmap_metadata.json",title:"View 3D scaffold",layout:"2horpanel",type:"SyncMap"}:(this.activeSpecies==="Human Male"||this.activeSpecies==="Human Female")&&("human"in this.scaffoldResource||(this.scaffoldResource.human=await s$(this.apiLocation,"human")),e={contextCardUrl:this.scaffoldResource.human.datasetInfo.contextCardUrl,discoverId:this.scaffoldResource.human.datasetInfo.discoverId,s3uri:this.scaffoldResource.human.datasetInfo.s3uri,version:this.scaffoldResource.human.datasetInfo.version,label:"Human Body",resource:this.scaffoldResource.human.url,title:"View 3D scaffold",layout:"2vertpanel",type:"SyncMap",isBodyScaffold:!0}),e&&Li.emit("SyncModeRequest",{flag:!0,action:e})}else Li.emit("SyncModeRequest",{flag:!1})},getState:function(){if(this.flatmapReady)return this.$refs.multiflatmap.getState()},flatmapPanZoomCallback:function(e){if(this.mouseHovered){const t={paneIndex:this.entry.id,eventType:"panZoom",payload:e,type:this.entry.type};this.$emit("resource-selected",t)}},search:function(e){return this.$refs.multiflatmap.getCurrentFlatmap().searchAndShowResult(e,!0)},searchSuggestions:function(e,t){const r=this.$refs.multiflatmap.getCurrentFlatmap();e&&r.mapImp&&r.mapImp.search(e).__featureIds.forEach(i=>{const o=r.mapImp.annotation(i);o&&o.label&&t.push(o.label)})},flatmaprResourceSelected:function(e,t){const r=this.$refs.multiflatmap.getCurrentFlatmap();if(this.resourceSelected(e,t,r.viewingMode==="Exploration"),t.eventType==="click"&&t.feature.type==="feature"){const n={label:t.label||"",id:t.feature.id||"",featureId:t.feature.featureId||"",taxonomy:t.taxonomy||"",resources:t.resource.join(", ")},i=cye(n);V1.sendEvent({event:"interaction_event",event_name:"portal_maps_connectivity",category:i,location:e+" "+r.viewingMode})}},onPathwaySelectionChanged:function(e){const{label:t,property:r,checked:n,selectionsTitle:i}=e;V1.sendEvent({event:"interaction_event",event_name:"portal_maps_pathway_change",category:t+" ["+r+"] "+n,location:i})},onOpenPubmedUrl:function(e){V1.sendEvent({event:"interaction_event",event_name:"portal_maps_pubmed_url",file_path:e,location:"map_popup_button"})},handleSyncPanZoomEvent:function(e){if(!this.mouseHovered&&e.type!==this.entry.type){const t=e.payload.zoom,r=e.payload.target,n=this.$el.clientHeight,i=this.$el.clientWidth,o=Math.max(i,n);let s=i/o/t;const l=n/o/t,c=[r[0]/2+.5-s/2,.5-r[1]/2-l/2];this.$refs.multiflatmap.getCurrentFlatmap().mapImp.panZoomTo(c,[s,l])}},displayTooltip:function(e){if(e){let t=e.name;t?this.search(t):this.$refs.multiflatmap.getCurrentFlatmap().mapImp.clearSearchResults()}},zoomToFeatures:function(e,t){let r=e.name;const n=this.$refs.multiflatmap.getCurrentFlatmap().mapImp;if(r){const i=n.search(r);i.featureIds.length>0?(t&&n.selectFeatures(i.featureIds),n.zoomToFeatures(i.featureIds)):n.clearSearchResults()}else n.clearSearchResults()},highlightFeatures:function(e){let t=e.name;const r=this.$refs.multiflatmap.getCurrentFlatmap().mapImp;if(t){const n=r.search(t);n.featureIds.length>0&&r.zoomToFeatures(n.featureIds,{noZoomIn:!0})}},updateProvCard:function(){const e=this.getFlatmapImp();if(e){let t={id:this.entry.id,prov:e.provenance};this.$emit("flatmap-provenance-ready",t)}},flatmapChanged:async function(e){this.activeSpecies=e,this.openMapOptions=Yje(e),this.$emit("species-changed",e),this.entry.state&&this.entry.state.species===this.activeSpecies||this.syncMode==!0&&await this.toggleSyncMode(),this.updateProvCard(),this.onConnectivityInfoClose(),V1.sendEvent({event:"interaction_event",event_name:"portal_maps_species_change",category:this.activeSpecies})},multiFlatmapReady:function(e){if(e){e.enablePanZoomEvents(!0),this.flatmapReady=!0;const t=e.mapImp;this.flatmapMarkerUpdate(t),this.updateProvCard(),Li.emit("mapReady",e)}},getFlatmapImp:function(){if(this.entry.type==="MultiFlatmap"&&this.flatmapReady&&this.$refs.multiflatmap)return this.$refs.multiflatmap.getCurrentFlatmap().mapImp},flatmapAreaSearch(){let r={type:"Facets",label:"Unused",val:this.getFlatmapImp().visibleMarkerAnatomicalIds().map(n=>this.idNamePair[n])};Li.emit("PopoverActionClick",r)},restoreFeaturedMarkers:function(e){this.settingsStore.resetFeaturedMarkerIdentifier();const t=this.settingsStore.featuredMarkers;this.updateFeaturedMarkers(t,e)},updateFeaturedMarkers:function(e,t){this.showStarInLegend=!1;for(let r=0;r<e.length;++r)e[r]&&(this.settingsStore.featuredMarkerIdentifiers[r]||this.addFeaturedMarker(e[r],r,t)&&(this.showStarInLegend=!0))},addFeaturedMarker:function(e,t,r){const n=this.settingsStore.featuredMarkerSpecies[t];if(n&&!this.activeSpecies.startsWith(n))return!1;let i=r;if(i||(i=this.getFlatmapImp()),i){let o=document.createElement("div");o.innerHTML=pUr;const s=i.addMarker(e,{element:o,className:"highlight-marker",cluster:!1});return this.settingsStore.updateFeaturedMarkerIdentifier({index:t,markerIdentifier:s}),!0}return!1},changeViewingMode:function(e){this.$refs.multiflatmap.getCurrentFlatmap().changeViewingMode(e)}},computed:{facetSpecies(){return this.settingsStore.facets.species},featuredMarkers(){return this.settingsStore.featuredMarkers}},watch:{syncMode:function(e){this.$refs.multiflatmap.getCurrentFlatmap()&&this.$refs.multiflatmap.getCurrentFlatmap().enablePanZoomEvents(e)},featuredMarkers:function(e){this.flatmapReady&&this.updateFeaturedMarkers(e,void 0)}},mounted:function(){this.getFeaturedDatasets(),Li.on("show-connectivity",e=>{const{featureIds:t,offset:r}=e;if(this.flatmapReady&&this.$refs.multiflatmap){const n=this.$refs.multiflatmap.getCurrentFlatmap();n&&n.moveMap(t,{offsetX:r?-150:0,zoom:4})}}),Li.on("markerUpdate",()=>{this.flatmapReady&&this.flatmapMarkerUpdate(this.$refs.multiflatmap.getCurrentFlatmap().mapImp)}),Li.on("hoverUpdate",()=>{this.flatmapReady&&this.mapHoverHighlight(this.$refs.multiflatmap.getCurrentFlatmap().mapImp)}),Li.on("changeViewingMode",e=>{this.flatmapReady&&this.changeViewingMode(e)})}},mUr={class:"viewer-container"};function gUr(e,t,r,n,i,o){const s=a.resolveComponent("MultiFlatmapVuer"),l=a.resolveComponent("HelpModeDialog");return a.openBlock(),a.createElementBlock("div",mUr,[a.createVNode(s,{availableSpecies:e.availableSpecies,onFlatmapChanged:o.flatmapChanged,onReady:o.multiFlatmapReady,state:e.entry.state,onResourceSelected:t[0]||(t[0]=c=>o.flatmaprResourceSelected(e.entry.type,c)),style:{height:"100%",width:"100%"},initial:e.entry.resource,helpMode:e.helpMode,helpModeActiveItem:e.helpModeActiveItem,helpModeDialog:e.useHelpModeDialog,onHelpModeLastItem:e.onHelpModeLastItem,onShownTooltip:e.onTooltipShown,onShownMapTooltip:e.onMapTooltipShown,onConnectivityInfoOpen:e.onConnectivityInfoOpen,onConnectivityInfoClose:e.onConnectivityInfoClose,connectivityInfoSidebar:e.connectivityInfoSidebar,ref:"multiflatmap",displayMinimap:!0,showStarInLegend:e.showStarInLegend,enableOpenMapUI:!0,openMapOptions:e.openMapOptions,flatmapAPI:e.flatmapAPI,sparcAPI:e.apiLocation,onPanZoomCallback:o.flatmapPanZoomCallback,onOpenMap:e.openMap,onFinishHelpMode:e.endHelp,onPathwaySelectionChanged:o.onPathwaySelectionChanged,onOpenPubmedUrl:o.onOpenPubmedUrl},null,8,["availableSpecies","onFlatmapChanged","onReady","state","initial","helpMode","helpModeActiveItem","helpModeDialog","onHelpModeLastItem","onShownTooltip","onShownMapTooltip","onConnectivityInfoOpen","onConnectivityInfoClose","connectivityInfoSidebar","showStarInLegend","openMapOptions","flatmapAPI","sparcAPI","onPanZoomCallback","onOpenMap","onFinishHelpMode","onPathwaySelectionChanged","onOpenPubmedUrl"]),e.helpMode&&e.useHelpModeDialog?(a.openBlock(),a.createBlock(l,{key:0,ref:"multiflatmapHelp",multiflatmapRef:e.multiflatmapRef,lastItem:e.helpModeLastItem,onShowNext:e.onHelpModeShowNext,onFinishHelpMode:e.onFinishHelpMode},null,8,["multiflatmapRef","lastItem","onShowNext","onFinishHelpMode"])):a.createCommentVNode("",!0)])}const yUr=Object.freeze(Object.defineProperty({__proto__:null,default:Zc(fUr,[["render",gUr],["__scopeId","data-v-b02cb930"]])},Symbol.toStringTag,{value:"Module"}));function TUr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jje={exports:{}},sl=Jje.exports={},Rf,Nf;function F1e(){throw new Error("setTimeout has not been defined")}function D1e(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Rf=setTimeout:Rf=F1e}catch{Rf=F1e}try{typeof clearTimeout=="function"?Nf=clearTimeout:Nf=D1e}catch{Nf=D1e}})();function $je(e){if(Rf===setTimeout)return setTimeout(e,0);if((Rf===F1e||!Rf)&&setTimeout)return Rf=setTimeout,setTimeout(e,0);try{return Rf(e,0)}catch{try{return Rf.call(null,e,0)}catch{return Rf.call(this,e,0)}}}function vUr(e){if(Nf===clearTimeout)return clearTimeout(e);if((Nf===D1e||!Nf)&&clearTimeout)return Nf=clearTimeout,clearTimeout(e);try{return Nf(e)}catch{try{return Nf.call(null,e)}catch{return Nf.call(this,e)}}}var d5=[],o_=!1,oT,WU=-1;function bUr(){!o_||!oT||(o_=!1,oT.length?d5=oT.concat(d5):WU=-1,d5.length&&eUe())}function eUe(){if(!o_){var e=$je(bUr);o_=!0;for(var t=d5.length;t;){for(oT=d5,d5=[];++WU<t;)oT&&oT[WU].run();WU=-1,t=d5.length}oT=null,o_=!1,vUr(e)}}sl.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];d5.push(new tUe(e,t)),d5.length===1&&!o_&&$je(eUe)};function tUe(e,t){this.fun=e,this.array=t}tUe.prototype.run=function(){this.fun.apply(null,this.array)},sl.title="browser",sl.browser=!0,sl.env={},sl.argv=[],sl.version="",sl.versions={};function h5(){}sl.on=h5,sl.addListener=h5,sl.once=h5,sl.off=h5,sl.removeListener=h5,sl.removeAllListeners=h5,sl.emit=h5,sl.prependListener=h5,sl.prependOnceListener=h5,sl.listeners=function(e){return[]},sl.binding=function(e){throw new Error("process.binding is not supported")},sl.cwd=function(){return"/"},sl.chdir=function(e){throw new Error("process.chdir is not supported")},sl.umask=function(){return 0};var QUr=Jje.exports;const a_=TUr(QUr),p5=(e,t,{checkForDefaultPrevented:r=!0}={})=>n=>{const i=e==null?void 0:e(n);if(r===!1||!i)return t==null?void 0:t(n)},s_=globalThis||void 0||self;var rUe;const W1=typeof window<"u",xUr=e=>typeof e=="string",nUe=()=>{},_Ur=W1&&((rUe=window==null?void 0:window.navigator)==null?void 0:rUe.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function iUe(e){return typeof e=="function"?e():a.unref(e)}function wUr(e){return e}function qU(e){return a.getCurrentScope()?(a.onScopeDispose(e),!0):!1}function LUr(e,t=!0){a.getCurrentInstance()?a.onMounted(e):t?e():a.nextTick(e)}function f5(e){var t;const r=iUe(e);return(t=r==null?void 0:r.$el)!=null?t:r}const ZU=W1?window:void 0;function aT(...e){let t,r,n,i;if(xUr(e[0])||Array.isArray(e[0])?([r,n,i]=e,t=ZU):[t,r,n,i]=e,!t)return nUe;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const o=[],s=()=>{o.forEach(d=>d()),o.length=0},l=(d,h,p,f)=>(d.addEventListener(h,p,f),()=>d.removeEventListener(h,p,f)),c=a.watch(()=>[f5(t),iUe(i)],([d,h])=>{s(),d&&o.push(...r.flatMap(p=>n.map(f=>l(d,p,f,h))))},{immediate:!0,flush:"post"}),u=()=>{c(),s()};return qU(u),u}let oUe=!1;function SUr(e,t,r={}){const{window:n=ZU,ignore:i=[],capture:o=!0,detectIframe:s=!1}=r;if(!n)return;_Ur&&!oUe&&(oUe=!0,Array.from(n.document.body.children).forEach(d=>d.addEventListener("click",nUe)));let l=!0;const c=d=>i.some(h=>{if(typeof h=="string")return Array.from(n.document.querySelectorAll(h)).some(p=>p===d.target||d.composedPath().includes(p));{const p=f5(h);return p&&(d.target===p||d.composedPath().includes(p))}}),u=[aT(n,"click",d=>{const h=f5(e);if(!(!h||h===d.target||d.composedPath().includes(h))){if(d.detail===0&&(l=!c(d)),!l){l=!0;return}t(d)}},{passive:!0,capture:o}),aT(n,"pointerdown",d=>{const h=f5(e);h&&(l=!d.composedPath().includes(h)&&!c(d))},{passive:!0}),s&&aT(n,"blur",d=>{var h;const p=f5(e);((h=n.document.activeElement)==null?void 0:h.tagName)==="IFRAME"&&!(p!=null&&p.contains(n.document.activeElement))&&t(d)})].filter(Boolean);return()=>u.forEach(d=>d())}function aUe(e,t=!1){const r=a.ref(),n=()=>r.value=!!e();return n(),LUr(n,t),r}const z1e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof s_<"u"?s_:typeof self<"u"?self:{},j1e="__vueuse_ssr_handlers__";z1e[j1e]=z1e[j1e]||{},z1e[j1e];var sUe=Object.getOwnPropertySymbols,kUr=Object.prototype.hasOwnProperty,CUr=Object.prototype.propertyIsEnumerable,MUr=(e,t)=>{var r={};for(var n in e)kUr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&sUe)for(var n of sUe(e))t.indexOf(n)<0&&CUr.call(e,n)&&(r[n]=e[n]);return r};function m5(e,t,r={}){const n=r,{window:i=ZU}=n,o=MUr(n,["window"]);let s;const l=aUe(()=>i&&"ResizeObserver"in i),c=()=>{s&&(s.disconnect(),s=void 0)},u=a.watch(()=>f5(e),h=>{c(),l.value&&i&&h&&(s=new ResizeObserver(t),s.observe(h,o))},{immediate:!0,flush:"post"}),d=()=>{c(),u()};return qU(d),{isSupported:l,stop:d}}var lUe=Object.getOwnPropertySymbols,EUr=Object.prototype.hasOwnProperty,AUr=Object.prototype.propertyIsEnumerable,OUr=(e,t)=>{var r={};for(var n in e)EUr.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&lUe)for(var n of lUe(e))t.indexOf(n)<0&&AUr.call(e,n)&&(r[n]=e[n]);return r};function IUr(e,t,r={}){const n=r,{window:i=ZU}=n,o=OUr(n,["window"]);let s;const l=aUe(()=>i&&"MutationObserver"in i),c=()=>{s&&(s.disconnect(),s=void 0)},u=a.watch(()=>f5(e),h=>{c(),l.value&&i&&h&&(s=new MutationObserver(t),s.observe(h,o))},{immediate:!0}),d=()=>{c(),u()};return qU(d),{isSupported:l,stop:d}}var cUe;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(cUe||(cUe={}));var PUr=Object.defineProperty,uUe=Object.getOwnPropertySymbols,VUr=Object.prototype.hasOwnProperty,HUr=Object.prototype.propertyIsEnumerable,dUe=(e,t,r)=>t in e?PUr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,RUr=(e,t)=>{for(var r in t||(t={}))VUr.call(t,r)&&dUe(e,r,t[r]);if(uUe)for(var r of uUe(t))HUr.call(t,r)&&dUe(e,r,t[r]);return e};RUr({linear:wUr},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const NUr=()=>W1&&/firefox/i.test(window.navigator.userAgent);a_.env.NODE_ENV!=="production"&&Object.freeze({}),a_.env.NODE_ENV!=="production"&&Object.freeze([]);const UA=()=>{},BUr=Object.prototype.hasOwnProperty,hUe=(e,t)=>BUr.call(e,t),Ud=Array.isArray,Gd=e=>typeof e=="function",Bf=e=>typeof e=="string",Wd=e=>e!==null&&typeof e=="object",FUr=Object.prototype.toString,DUr=e=>FUr.call(e),U1e=e=>DUr(e).slice(8,-1);var pUe=typeof s_=="object"&&s_&&s_.Object===Object&&s_,zUr=typeof self=="object"&&self&&self.Object===Object&&self,Ff=pUe||zUr||Function("return this")(),t7=Ff.Symbol,fUe=Object.prototype,jUr=fUe.hasOwnProperty,UUr=fUe.toString,GA=t7?t7.toStringTag:void 0;function GUr(e){var t=jUr.call(e,GA),r=e[GA];try{e[GA]=void 0;var n=!0}catch{}var i=UUr.call(e);return n&&(t?e[GA]=r:delete e[GA]),i}var WUr=Object.prototype,qUr=WUr.toString;function ZUr(e){return qUr.call(e)}var XUr="[object Null]",KUr="[object Undefined]",mUe=t7?t7.toStringTag:void 0;function l_(e){return e==null?e===void 0?KUr:XUr:mUe&&mUe in Object(e)?GUr(e):ZUr(e)}function c_(e){return e!=null&&typeof e=="object"}var YUr="[object Symbol]";function XU(e){return typeof e=="symbol"||c_(e)&&l_(e)==YUr}function JUr(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Df=Array.isArray,$Ur=1/0,gUe=t7?t7.prototype:void 0,yUe=gUe?gUe.toString:void 0;function TUe(e){if(typeof e=="string")return e;if(Df(e))return JUr(e,TUe)+"";if(XU(e))return yUe?yUe.call(e):"";var t=e+"";return t=="0"&&1/e==-$Ur?"-0":t}var eGr=/\s/;function tGr(e){for(var t=e.length;t--&&eGr.test(e.charAt(t)););return t}var rGr=/^\s+/;function nGr(e){return e&&e.slice(0,tGr(e)+1).replace(rGr,"")}function u_(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var vUe=NaN,iGr=/^[-+]0x[0-9a-f]+$/i,oGr=/^0b[01]+$/i,aGr=/^0o[0-7]+$/i,sGr=parseInt;function G1e(e){if(typeof e=="number")return e;if(XU(e))return vUe;if(u_(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=u_(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=nGr(e);var r=oGr.test(e);return r||aGr.test(e)?sGr(e.slice(2),r?2:8):iGr.test(e)?vUe:+e}var bUe=1/0,lGr=17976931348623157e292;function cGr(e){if(!e)return e===0?e:0;if(e=G1e(e),e===bUe||e===-bUe){var t=e<0?-1:1;return t*lGr}return e===e?e:0}function uGr(e){var t=cGr(e),r=t%1;return t===t?r?t-r:t:0}function dGr(e){return e}var hGr="[object AsyncFunction]",pGr="[object Function]",fGr="[object GeneratorFunction]",mGr="[object Proxy]";function QUe(e){if(!u_(e))return!1;var t=l_(e);return t==pGr||t==fGr||t==hGr||t==mGr}var W1e=Ff["__core-js_shared__"],xUe=function(){var e=/[^.]+$/.exec(W1e&&W1e.keys&&W1e.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function gGr(e){return!!xUe&&xUe in e}var yGr=Function.prototype,TGr=yGr.toString;function sT(e){if(e!=null){try{return TGr.call(e)}catch{}try{return e+""}catch{}}return""}var vGr=/[\\^$.*+?()[\]{}|]/g,bGr=/^\[object .+?Constructor\]$/,QGr=Function.prototype,xGr=Object.prototype,_Gr=QGr.toString,wGr=xGr.hasOwnProperty,LGr=RegExp("^"+_Gr.call(wGr).replace(vGr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function SGr(e){if(!u_(e)||gGr(e))return!1;var t=QUe(e)?LGr:bGr;return t.test(sT(e))}function kGr(e,t){return e==null?void 0:e[t]}function d_(e,t){var r=kGr(e,t);return SGr(r)?r:void 0}var q1e=d_(Ff,"WeakMap");function CGr(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}var MGr=9007199254740991,EGr=/^(?:0|[1-9]\d*)$/;function _Ue(e,t){var r=typeof e;return t=t??MGr,!!t&&(r=="number"||r!="symbol"&&EGr.test(e))&&e>-1&&e%1==0&&e<t}function wUe(e,t){return e===t||e!==e&&t!==t}var AGr=9007199254740991;function Z1e(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=AGr}function OGr(e){return e!=null&&Z1e(e.length)&&!QUe(e)}var IGr=Object.prototype;function PGr(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||IGr;return e===r}function VGr(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var HGr="[object Arguments]";function LUe(e){return c_(e)&&l_(e)==HGr}var SUe=Object.prototype,RGr=SUe.hasOwnProperty,NGr=SUe.propertyIsEnumerable,kUe=LUe(function(){return arguments}())?LUe:function(e){return c_(e)&&RGr.call(e,"callee")&&!NGr.call(e,"callee")};function BGr(){return!1}var CUe=typeof Pn=="object"&&Pn&&!Pn.nodeType&&Pn,MUe=CUe&&typeof module=="object"&&module&&!module.nodeType&&module,FGr=MUe&&MUe.exports===CUe,EUe=FGr?Ff.Buffer:void 0,DGr=EUe?EUe.isBuffer:void 0,X1e=DGr||BGr,zGr="[object Arguments]",jGr="[object Array]",UGr="[object Boolean]",GGr="[object Date]",WGr="[object Error]",qGr="[object Function]",ZGr="[object Map]",XGr="[object Number]",KGr="[object Object]",YGr="[object RegExp]",JGr="[object Set]",$Gr="[object String]",eWr="[object WeakMap]",tWr="[object ArrayBuffer]",rWr="[object DataView]",nWr="[object Float32Array]",iWr="[object Float64Array]",oWr="[object Int8Array]",aWr="[object Int16Array]",sWr="[object Int32Array]",lWr="[object Uint8Array]",cWr="[object Uint8ClampedArray]",uWr="[object Uint16Array]",dWr="[object Uint32Array]",is={};is[nWr]=is[iWr]=is[oWr]=is[aWr]=is[sWr]=is[lWr]=is[cWr]=is[uWr]=is[dWr]=!0,is[zGr]=is[jGr]=is[tWr]=is[UGr]=is[rWr]=is[GGr]=is[WGr]=is[qGr]=is[ZGr]=is[XGr]=is[KGr]=is[YGr]=is[JGr]=is[$Gr]=is[eWr]=!1;function hWr(e){return c_(e)&&Z1e(e.length)&&!!is[l_(e)]}function pWr(e){return function(t){return e(t)}}var AUe=typeof Pn=="object"&&Pn&&!Pn.nodeType&&Pn,WA=AUe&&typeof module=="object"&&module&&!module.nodeType&&module,fWr=WA&&WA.exports===AUe,K1e=fWr&&pUe.process,OUe=function(){try{var e=WA&&WA.require&&WA.require("util").types;return e||K1e&&K1e.binding&&K1e.binding("util")}catch{}}(),IUe=OUe&&OUe.isTypedArray,PUe=IUe?pWr(IUe):hWr,mWr=Object.prototype,gWr=mWr.hasOwnProperty;function yWr(e,t){var r=Df(e),n=!r&&kUe(e),i=!r&&!n&&X1e(e),o=!r&&!n&&!i&&PUe(e),s=r||n||i||o,l=s?VGr(e.length,String):[],c=l.length;for(var u in e)(t||gWr.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||_Ue(u,c)))&&l.push(u);return l}function TWr(e,t){return function(r){return e(t(r))}}var vWr=TWr(Object.keys,Object),bWr=Object.prototype,QWr=bWr.hasOwnProperty;function xWr(e){if(!PGr(e))return vWr(e);var t=[];for(var r in Object(e))QWr.call(e,r)&&r!="constructor"&&t.push(r);return t}function VUe(e){return OGr(e)?yWr(e):xWr(e)}var _Wr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wWr=/^\w*$/;function Y1e(e,t){if(Df(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||XU(e)?!0:wWr.test(e)||!_Wr.test(e)||t!=null&&e in Object(t)}var qA=d_(Object,"create");function LWr(){this.__data__=qA?qA(null):{},this.size=0}function SWr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var kWr="__lodash_hash_undefined__",CWr=Object.prototype,MWr=CWr.hasOwnProperty;function EWr(e){var t=this.__data__;if(qA){var r=t[e];return r===kWr?void 0:r}return MWr.call(t,e)?t[e]:void 0}var AWr=Object.prototype,OWr=AWr.hasOwnProperty;function IWr(e){var t=this.__data__;return qA?t[e]!==void 0:OWr.call(t,e)}var PWr="__lodash_hash_undefined__";function VWr(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=qA&&t===void 0?PWr:t,this}function lT(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}lT.prototype.clear=LWr,lT.prototype.delete=SWr,lT.prototype.get=EWr,lT.prototype.has=IWr,lT.prototype.set=VWr;function HWr(){this.__data__=[],this.size=0}function KU(e,t){for(var r=e.length;r--;)if(wUe(e[r][0],t))return r;return-1}var RWr=Array.prototype,NWr=RWr.splice;function BWr(e){var t=this.__data__,r=KU(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():NWr.call(t,r,1),--this.size,!0}function FWr(e){var t=this.__data__,r=KU(t,e);return r<0?void 0:t[r][1]}function DWr(e){return KU(this.__data__,e)>-1}function zWr(e,t){var r=this.__data__,n=KU(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function g5(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}g5.prototype.clear=HWr,g5.prototype.delete=BWr,g5.prototype.get=FWr,g5.prototype.has=DWr,g5.prototype.set=zWr;var ZA=d_(Ff,"Map");function jWr(){this.size=0,this.__data__={hash:new lT,map:new(ZA||g5),string:new lT}}function UWr(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function YU(e,t){var r=e.__data__;return UWr(t)?r[typeof t=="string"?"string":"hash"]:r.map}function GWr(e){var t=YU(this,e).delete(e);return this.size-=t?1:0,t}function WWr(e){return YU(this,e).get(e)}function qWr(e){return YU(this,e).has(e)}function ZWr(e,t){var r=YU(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function y5(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}y5.prototype.clear=jWr,y5.prototype.delete=GWr,y5.prototype.get=WWr,y5.prototype.has=qWr,y5.prototype.set=ZWr;var XWr="Expected a function";function J1e(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(XWr);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(J1e.Cache||y5),r}J1e.Cache=y5;var KWr=500;function YWr(e){var t=J1e(e,function(n){return r.size===KWr&&r.clear(),n}),r=t.cache;return t}var JWr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,$Wr=/\\(\\)?/g,eqr=YWr(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(JWr,function(r,n,i,o){t.push(i?o.replace($Wr,"$1"):n||r)}),t});function tqr(e){return e==null?"":TUe(e)}function HUe(e,t){return Df(e)?e:Y1e(e,t)?[e]:eqr(tqr(e))}var rqr=1/0;function JU(e){if(typeof e=="string"||XU(e))return e;var t=e+"";return t=="0"&&1/e==-rqr?"-0":t}function RUe(e,t){t=HUe(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[JU(t[r++])];return r&&r==n?e:void 0}function T5(e,t,r){var n=e==null?void 0:RUe(e,t);return n===void 0?r:n}function nqr(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function NUe(){if(!arguments.length)return[];var e=arguments[0];return Df(e)?e:[e]}function iqr(){this.__data__=new g5,this.size=0}function oqr(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function aqr(e){return this.__data__.get(e)}function sqr(e){return this.__data__.has(e)}var lqr=200;function cqr(e,t){var r=this.__data__;if(r instanceof g5){var n=r.__data__;if(!ZA||n.length<lqr-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new y5(n)}return r.set(e,t),this.size=r.size,this}function v5(e){var t=this.__data__=new g5(e);this.size=t.size}v5.prototype.clear=iqr,v5.prototype.delete=oqr,v5.prototype.get=aqr,v5.prototype.has=sqr,v5.prototype.set=cqr;function uqr(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function dqr(){return[]}var hqr=Object.prototype,pqr=hqr.propertyIsEnumerable,BUe=Object.getOwnPropertySymbols,fqr=BUe?function(e){return e==null?[]:(e=Object(e),uqr(BUe(e),function(t){return pqr.call(e,t)}))}:dqr;const mqr=fqr;function gqr(e,t,r){var n=t(e);return Df(e)?n:nqr(n,r(e))}function FUe(e){return gqr(e,VUe,mqr)}var $1e=d_(Ff,"DataView"),eue=d_(Ff,"Promise"),tue=d_(Ff,"Set"),DUe="[object Map]",yqr="[object Object]",zUe="[object Promise]",jUe="[object Set]",UUe="[object WeakMap]",GUe="[object DataView]",Tqr=sT($1e),vqr=sT(ZA),bqr=sT(eue),Qqr=sT(tue),xqr=sT(q1e),cT=l_;($1e&&cT(new $1e(new ArrayBuffer(1)))!=GUe||ZA&&cT(new ZA)!=DUe||eue&&cT(eue.resolve())!=zUe||tue&&cT(new tue)!=jUe||q1e&&cT(new q1e)!=UUe)&&(cT=function(e){var t=l_(e),r=t==yqr?e.constructor:void 0,n=r?sT(r):"";if(n)switch(n){case Tqr:return GUe;case vqr:return DUe;case bqr:return zUe;case Qqr:return jUe;case xqr:return UUe}return t});const WUe=cT;var _qr=Ff.Uint8Array;const qUe=_qr;var wqr="__lodash_hash_undefined__";function Lqr(e){return this.__data__.set(e,wqr),this}function Sqr(e){return this.__data__.has(e)}function $U(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new y5;++t<r;)this.add(e[t])}$U.prototype.add=$U.prototype.push=Lqr,$U.prototype.has=Sqr;function kqr(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Cqr(e,t){return e.has(t)}var Mqr=1,Eqr=2;function ZUe(e,t,r,n,i,o){var s=r&Mqr,l=e.length,c=t.length;if(l!=c&&!(s&&c>l))return!1;var u=o.get(e),d=o.get(t);if(u&&d)return u==t&&d==e;var h=-1,p=!0,f=r&Eqr?new $U:void 0;for(o.set(e,t),o.set(t,e);++h<l;){var m=e[h],g=t[h];if(n)var T=s?n(g,m,h,t,e,o):n(m,g,h,e,t,o);if(T!==void 0){if(T)continue;p=!1;break}if(f){if(!kqr(t,function(y,v){if(!Cqr(f,v)&&(m===y||i(m,y,r,n,o)))return f.push(v)})){p=!1;break}}else if(!(m===g||i(m,g,r,n,o))){p=!1;break}}return o.delete(e),o.delete(t),p}function Aqr(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function Oqr(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Iqr=1,Pqr=2,Vqr="[object Boolean]",Hqr="[object Date]",Rqr="[object Error]",Nqr="[object Map]",Bqr="[object Number]",Fqr="[object RegExp]",Dqr="[object Set]",zqr="[object String]",jqr="[object Symbol]",Uqr="[object ArrayBuffer]",Gqr="[object DataView]",XUe=t7?t7.prototype:void 0,rue=XUe?XUe.valueOf:void 0;function Wqr(e,t,r,n,i,o,s){switch(r){case Gqr:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Uqr:return!(e.byteLength!=t.byteLength||!o(new qUe(e),new qUe(t)));case Vqr:case Hqr:case Bqr:return wUe(+e,+t);case Rqr:return e.name==t.name&&e.message==t.message;case Fqr:case zqr:return e==t+"";case Nqr:var l=Aqr;case Dqr:var c=n&Iqr;if(l||(l=Oqr),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=Pqr,s.set(e,t);var d=ZUe(l(e),l(t),n,i,o,s);return s.delete(e),d;case jqr:if(rue)return rue.call(e)==rue.call(t)}return!1}var qqr=1,Zqr=Object.prototype,Xqr=Zqr.hasOwnProperty;function Kqr(e,t,r,n,i,o){var s=r&qqr,l=FUe(e),c=l.length,u=FUe(t),d=u.length;if(c!=d&&!s)return!1;for(var h=c;h--;){var p=l[h];if(!(s?p in t:Xqr.call(t,p)))return!1}var f=o.get(e),m=o.get(t);if(f&&m)return f==t&&m==e;var g=!0;o.set(e,t),o.set(t,e);for(var T=s;++h<c;){p=l[h];var y=e[p],v=t[p];if(n)var Q=s?n(v,y,p,t,e,o):n(y,v,p,e,t,o);if(!(Q===void 0?y===v||i(y,v,r,n,o):Q)){g=!1;break}T||(T=p=="constructor")}if(g&&!T){var _=e.constructor,L=t.constructor;_!=L&&"constructor"in e&&"constructor"in t&&!(typeof _=="function"&&_ instanceof _&&typeof L=="function"&&L instanceof L)&&(g=!1)}return o.delete(e),o.delete(t),g}var Yqr=1,KUe="[object Arguments]",YUe="[object Array]",eG="[object Object]",Jqr=Object.prototype,JUe=Jqr.hasOwnProperty;function $qr(e,t,r,n,i,o){var s=Df(e),l=Df(t),c=s?YUe:WUe(e),u=l?YUe:WUe(t);c=c==KUe?eG:c,u=u==KUe?eG:u;var d=c==eG,h=u==eG,p=c==u;if(p&&X1e(e)){if(!X1e(t))return!1;s=!0,d=!1}if(p&&!d)return o||(o=new v5),s||PUe(e)?ZUe(e,t,r,n,i,o):Wqr(e,t,c,r,n,i,o);if(!(r&Yqr)){var f=d&&JUe.call(e,"__wrapped__"),m=h&&JUe.call(t,"__wrapped__");if(f||m){var g=f?e.value():e,T=m?t.value():t;return o||(o=new v5),i(g,T,r,n,o)}}return p?(o||(o=new v5),Kqr(e,t,r,n,i,o)):!1}function tG(e,t,r,n,i){return e===t?!0:e==null||t==null||!c_(e)&&!c_(t)?e!==e&&t!==t:$qr(e,t,r,n,tG,i)}var eZr=1,tZr=2;function rZr(e,t,r,n){var i=r.length,o=i,s=!n;if(e==null)return!o;for(e=Object(e);i--;){var l=r[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<o;){l=r[i];var c=l[0],u=e[c],d=l[1];if(s&&l[2]){if(u===void 0&&!(c in e))return!1}else{var h=new v5;if(n)var p=n(u,d,c,e,t,h);if(!(p===void 0?tG(d,u,eZr|tZr,n,h):p))return!1}}return!0}function $Ue(e){return e===e&&!u_(e)}function nZr(e){for(var t=VUe(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,$Ue(i)]}return t}function eGe(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function iZr(e){var t=nZr(e);return t.length==1&&t[0][2]?eGe(t[0][0],t[0][1]):function(r){return r===e||rZr(r,e,t)}}function oZr(e,t){return e!=null&&t in Object(e)}function aZr(e,t,r){t=HUe(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var s=JU(t[n]);if(!(o=e!=null&&r(e,s)))break;e=e[s]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&Z1e(i)&&_Ue(s,i)&&(Df(e)||kUe(e)))}function sZr(e,t){return e!=null&&aZr(e,t,oZr)}var lZr=1,cZr=2;function uZr(e,t){return Y1e(e)&&$Ue(t)?eGe(JU(e),t):function(r){var n=T5(r,e);return n===void 0&&n===t?sZr(r,e):tG(t,n,lZr|cZr)}}function dZr(e){return function(t){return t==null?void 0:t[e]}}function hZr(e){return function(t){return RUe(t,e)}}function pZr(e){return Y1e(e)?dZr(JU(e)):hZr(e)}function fZr(e){return typeof e=="function"?e:e==null?dGr:typeof e=="object"?Df(e)?uZr(e[0],e[1]):iZr(e):pZr(e)}var nue=function(){return Ff.Date.now()},mZr="Expected a function",gZr=Math.max,yZr=Math.min;function TZr(e,t,r){var n,i,o,s,l,c,u=0,d=!1,h=!1,p=!0;if(typeof e!="function")throw new TypeError(mZr);t=G1e(t)||0,u_(r)&&(d=!!r.leading,h="maxWait"in r,o=h?gZr(G1e(r.maxWait)||0,t):o,p="trailing"in r?!!r.trailing:p);function f(w){var S=n,C=i;return n=i=void 0,u=w,s=e.apply(C,S),s}function m(w){return u=w,l=setTimeout(y,t),d?f(w):s}function g(w){var S=w-c,C=w-u,E=t-S;return h?yZr(E,o-C):E}function T(w){var S=w-c,C=w-u;return c===void 0||S>=t||S<0||h&&C>=o}function y(){var w=nue();if(T(w))return v(w);l=setTimeout(y,g(w))}function v(w){return l=void 0,p&&n?f(w):(n=i=void 0,s)}function Q(){l!==void 0&&clearTimeout(l),u=0,n=c=i=l=void 0}function _(){return l===void 0?s:v(nue())}function L(){var w=nue(),S=T(w);if(n=arguments,i=this,c=w,S){if(l===void 0)return m(c);if(h)return clearTimeout(l),l=setTimeout(y,t),f(c)}return l===void 0&&(l=setTimeout(y,t)),s}return L.cancel=Q,L.flush=_,L}var vZr=Math.max,bZr=Math.min;function QZr(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=n-1;return r!==void 0&&(i=uGr(r),i=r<0?vZr(n+i,0):bZr(i,n-1)),CGr(e,fZr(t),i,!0)}function rG(e){for(var t=-1,r=e==null?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n}function XA(e,t){return tG(e,t)}function nG(e){return e==null}function xZr(e){return e===void 0}const tGe=e=>e===void 0,iue=e=>typeof e=="boolean",k0=e=>typeof e=="number",KA=e=>typeof Element>"u"?!1:e instanceof Element,_Zr=e=>Bf(e)?!Number.isNaN(Number(e)):!1,wZr=(e="")=>e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d");let rGe=class extends Error{constructor(t){super(t),this.name="ElementPlusError"}};function LZr(e,t){throw new rGe(`[${e}] ${t}`)}function qd(e,t){if(a_.env.NODE_ENV!=="production"){const r=Bf(e)?new rGe(`[${e}] ${t}`):e;console.warn(r)}}const SZr="utils/dom/style";function iG(e,t="px"){if(!e)return"";if(k0(e)||_Zr(e))return`${e}${t}`;if(Bf(e))return e;qd(SZr,"binding value must be a string or number")}function kZr(e,t){if(!W1)return;if(!t){e.scrollTop=0;return}const r=[];let n=t.offsetParent;for(;n!==null&&e!==n&&e.contains(n);)r.push(n),n=n.offsetParent;const i=t.offsetTop+r.reduce((c,u)=>c+u.offsetTop,0),o=i+t.offsetHeight,s=e.scrollTop,l=s+e.clientHeight;i<s?e.scrollTop=i:o>l&&(e.scrollTop=o-e.clientHeight)}/*! Element Plus Icons Vue v2.3.1 */var CZr=a.defineComponent({name:"ArrowDown",__name:"arrow-down",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),MZr=CZr,EZr=a.defineComponent({name:"ArrowRight",__name:"arrow-right",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),AZr=EZr,OZr=a.defineComponent({name:"CircleCheck",__name:"circle-check",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),a.createElementVNode("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})]))}}),IZr=OZr,PZr=a.defineComponent({name:"CircleClose",__name:"circle-close",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),a.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),oue=PZr,VZr=a.defineComponent({name:"Close",__name:"close",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),nGe=VZr,HZr=a.defineComponent({name:"Hide",__name:"hide",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),a.createElementVNode("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}}),RZr=HZr,NZr=a.defineComponent({name:"Loading",__name:"loading",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"})]))}}),iGe=NZr,BZr=a.defineComponent({name:"View",__name:"view",setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),FZr=BZr;const oGe="__epPropKey",$i=e=>e,DZr=e=>Wd(e)&&!!e[oGe],oG=(e,t)=>{if(!Wd(e)||DZr(e))return e;const{values:r,required:n,default:i,type:o,validator:s}=e,l={type:o,required:!!n,validator:r||s?c=>{let u=!1,d=[];if(r&&(d=Array.from(r),hUe(e,"default")&&d.push(i),u||(u=d.includes(c))),s&&(u||(u=s(c))),!u&&d.length>0){const h=[...new Set(d)].map(p=>JSON.stringify(p)).join(", ");a.warn(`Invalid prop: validation failed${t?` for prop "${t}"`:""}. Expected one of [${h}], got value ${JSON.stringify(c)}.`)}return u}:void 0,[oGe]:!0};return hUe(e,"default")&&(l.default=i),l},Cs=e=>rG(Object.entries(e).map(([t,r])=>[t,oG(r,t)])),uT=$i([String,Object,Function]),aGe={validating:iGe,success:IZr,error:oue},zf=(e,t)=>{if(e.install=r=>{for(const n of[e,...Object.values(t??{})])r.component(n.name,n)},t)for(const[r,n]of Object.entries(t))e[r]=n;return e},zZr=(e,t)=>(e.install=r=>{r.directive(t,e)},e),aG=e=>(e.install=UA,e),YA={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"},_2="update:modelValue",sG="change",sGe=["","default","small","large"],lGe=e=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e),cGe=e=>e,jZr=["class","style"],UZr=/^on[A-Z]/,GZr=(e={})=>{const{excludeListeners:t=!1,excludeKeys:r}=e,n=a.computed(()=>((r==null?void 0:r.value)||[]).concat(jZr)),i=a.getCurrentInstance();return i?a.computed(()=>{var o;return rG(Object.entries((o=i.proxy)==null?void 0:o.$attrs).filter(([s])=>!n.value.includes(s)&&!(t&&UZr.test(s))))}):(qd("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),a.computed(()=>({})))},uGe=({from:e,replacement:t,scope:r,version:n,ref:i,type:o="API"},s)=>{a.watch(()=>a.unref(s),l=>{l&&qd(r,`[${o}] ${e} is about to be deprecated in version ${n}, please use ${t} instead.
|
3094
3094
|
For more detail, please visit: ${i}
|
3095
3095
|
`)},{immediate:!0})};var WZr={name:"en",el:{colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color."},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",week:"week",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum"},tour:{next:"Next",previous:"Previous",finish:"Finish"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"}}};const qZr=e=>(t,r)=>ZZr(t,r,a.unref(e)),ZZr=(e,t,r)=>T5(r,e,e).replace(/\{(\w+)\}/g,(n,i)=>{var o;return`${(o=t==null?void 0:t[i])!=null?o:`{${i}}`}`}),XZr=e=>{const t=a.computed(()=>a.unref(e).name),r=a.isRef(e)?e:a.ref(e);return{lang:t,locale:r,t:qZr(e)}},KZr=Symbol("localeContextKey"),YZr=e=>{const t=e||a.inject(KZr,a.ref());return XZr(a.computed(()=>t.value||WZr))},aue="el",JZr="is-",dT=(e,t,r,n,i)=>{let o=`${e}-${t}`;return r&&(o+=`-${r}`),n&&(o+=`__${n}`),i&&(o+=`--${i}`),o},$Zr=Symbol("namespaceContextKey"),sue=e=>{const t=e||(a.getCurrentInstance()?a.inject($Zr,a.ref(aue)):a.ref(aue));return a.computed(()=>a.unref(t)||aue)},Ts=(e,t)=>{const r=sue(t);return{namespace:r,b:(n="")=>dT(r.value,e,n,"",""),e:n=>n?dT(r.value,e,"",n,""):"",m:n=>n?dT(r.value,e,"","",n):"",be:(n,i)=>n&&i?dT(r.value,e,n,i,""):"",em:(n,i)=>n&&i?dT(r.value,e,"",n,i):"",bm:(n,i)=>n&&i?dT(r.value,e,n,"",i):"",bem:(n,i,o)=>n&&i&&o?dT(r.value,e,n,i,o):"",is:(n,...i)=>{const o=i.length>=1?i[0]:!0;return n&&o?`${JZr}${n}`:""},cssVar:n=>{const i={};for(const o in n)n[o]&&(i[`--${r.value}-${o}`]=n[o]);return i},cssVarName:n=>`--${r.value}-${n}`,cssVarBlock:n=>{const i={};for(const o in n)n[o]&&(i[`--${r.value}-${e}-${o}`]=n[o]);return i},cssVarBlockName:n=>`--${r.value}-${e}-${n}`}},eXr=oG({type:$i(Boolean),default:null}),tXr=oG({type:$i(Function)}),rXr=e=>{const t=`update:${e}`,r=`onUpdate:${e}`,n=[t],i={[e]:eXr,[r]:tXr};return{useModelToggle:({indicator:o,toggleReason:s,shouldHideWhenRouteChanges:l,shouldProceed:c,onShow:u,onHide:d})=>{const h=a.getCurrentInstance(),{emit:p}=h,f=h.props,m=a.computed(()=>Gd(f[r])),g=a.computed(()=>f[e]===null),T=w=>{o.value!==!0&&(o.value=!0,s&&(s.value=w),Gd(u)&&u(w))},y=w=>{o.value!==!1&&(o.value=!1,s&&(s.value=w),Gd(d)&&d(w))},v=w=>{if(f.disabled===!0||Gd(c)&&!c())return;const S=m.value&&W1;S&&p(t,!0),(g.value||!S)&&T(w)},Q=w=>{if(f.disabled===!0||!W1)return;const S=m.value&&W1;S&&p(t,!1),(g.value||!S)&&y(w)},_=w=>{iue(w)&&(f.disabled&&w?m.value&&p(t,!1):o.value!==w&&(w?T():y()))},L=()=>{o.value?Q():v()};return a.watch(()=>f[e],_),l&&h.appContext.config.globalProperties.$route!==void 0&&a.watch(()=>({...h.proxy.$route}),()=>{l.value&&o.value&&Q()}),a.onMounted(()=>{_(f[e])}),{hide:Q,show:v,toggle:L,hasUpdateHandler:m}},useModelToggleProps:i,useModelToggleEmits:n}},dGe=e=>{const t=a.getCurrentInstance();return a.computed(()=>{var r,n;return(n=(r=t==null?void 0:t.proxy)==null?void 0:r.$props)==null?void 0:n[e]})};var C0="top",Zd="bottom",Xd="right",M0="left",lue="auto",JA=[C0,Zd,Xd,M0],h_="start",$A="end",nXr="clippingParents",hGe="viewport",eO="popper",iXr="reference",pGe=JA.reduce(function(e,t){return e.concat([t+"-"+h_,t+"-"+$A])},[]),lG=[].concat(JA,[lue]).reduce(function(e,t){return e.concat([t,t+"-"+h_,t+"-"+$A])},[]),oXr="beforeRead",aXr="read",sXr="afterRead",lXr="beforeMain",cXr="main",uXr="afterMain",dXr="beforeWrite",hXr="write",pXr="afterWrite",fXr=[oXr,aXr,sXr,lXr,cXr,uXr,dXr,hXr,pXr];function jf(e){return e?(e.nodeName||"").toLowerCase():null}function Mp(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function p_(e){var t=Mp(e).Element;return e instanceof t||e instanceof Element}function Kd(e){var t=Mp(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function cue(e){if(typeof ShadowRoot>"u")return!1;var t=Mp(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function mXr(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},o=t.elements[r];!Kd(o)||!jf(o)||(Object.assign(o.style,n),Object.keys(i).forEach(function(s){var l=i[s];l===!1?o.removeAttribute(s):o.setAttribute(s,l===!0?"":l)}))})}function gXr(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],o=t.attributes[n]||{},s=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),l=s.reduce(function(c,u){return c[u]="",c},{});!Kd(i)||!jf(i)||(Object.assign(i.style,l),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}var fGe={name:"applyStyles",enabled:!0,phase:"write",fn:mXr,effect:gXr,requires:["computeStyles"]};function Uf(e){return e.split("-")[0]}var hT=Math.max,cG=Math.min,f_=Math.round;function m_(e,t){t===void 0&&(t=!1);var r=e.getBoundingClientRect(),n=1,i=1;if(Kd(e)&&t){var o=e.offsetHeight,s=e.offsetWidth;s>0&&(n=f_(r.width)/s||1),o>0&&(i=f_(r.height)/o||1)}return{width:r.width/n,height:r.height/i,top:r.top/i,right:r.right/n,bottom:r.bottom/i,left:r.left/n,x:r.left/n,y:r.top/i}}function uue(e){var t=m_(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function mGe(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&cue(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function b5(e){return Mp(e).getComputedStyle(e)}function yXr(e){return["table","td","th"].indexOf(jf(e))>=0}function r7(e){return((p_(e)?e.ownerDocument:e.document)||window.document).documentElement}function uG(e){return jf(e)==="html"?e:e.assignedSlot||e.parentNode||(cue(e)?e.host:null)||r7(e)}function gGe(e){return!Kd(e)||b5(e).position==="fixed"?null:e.offsetParent}function TXr(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,r=navigator.userAgent.indexOf("Trident")!==-1;if(r&&Kd(e)){var n=b5(e);if(n.position==="fixed")return null}var i=uG(e);for(cue(i)&&(i=i.host);Kd(i)&&["html","body"].indexOf(jf(i))<0;){var o=b5(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function tO(e){for(var t=Mp(e),r=gGe(e);r&&yXr(r)&&b5(r).position==="static";)r=gGe(r);return r&&(jf(r)==="html"||jf(r)==="body"&&b5(r).position==="static")?t:r||TXr(e)||t}function due(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function rO(e,t,r){return hT(e,cG(t,r))}function vXr(e,t,r){var n=rO(e,t,r);return n>r?r:n}function yGe(){return{top:0,right:0,bottom:0,left:0}}function TGe(e){return Object.assign({},yGe(),e)}function vGe(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var bXr=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,TGe(typeof e!="number"?e:vGe(e,JA))};function QXr(e){var t,r=e.state,n=e.name,i=e.options,o=r.elements.arrow,s=r.modifiersData.popperOffsets,l=Uf(r.placement),c=due(l),u=[M0,Xd].indexOf(l)>=0,d=u?"height":"width";if(!(!o||!s)){var h=bXr(i.padding,r),p=uue(o),f=c==="y"?C0:M0,m=c==="y"?Zd:Xd,g=r.rects.reference[d]+r.rects.reference[c]-s[c]-r.rects.popper[d],T=s[c]-r.rects.reference[c],y=tO(o),v=y?c==="y"?y.clientHeight||0:y.clientWidth||0:0,Q=g/2-T/2,_=h[f],L=v-p[d]-h[m],w=v/2-p[d]/2+Q,S=rO(_,w,L),C=c;r.modifiersData[n]=(t={},t[C]=S,t.centerOffset=S-w,t)}}function xXr(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!mGe(t.elements.popper,i)||(t.elements.arrow=i))}var _Xr={name:"arrow",enabled:!0,phase:"main",fn:QXr,effect:xXr,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function g_(e){return e.split("-")[1]}var wXr={top:"auto",right:"auto",bottom:"auto",left:"auto"};function LXr(e){var t=e.x,r=e.y,n=window,i=n.devicePixelRatio||1;return{x:f_(t*i)/i||0,y:f_(r*i)/i||0}}function bGe(e){var t,r=e.popper,n=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,l=e.position,c=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,h=e.isFixed,p=s.x,f=p===void 0?0:p,m=s.y,g=m===void 0?0:m,T=typeof d=="function"?d({x:f,y:g}):{x:f,y:g};f=T.x,g=T.y;var y=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),Q=M0,_=C0,L=window;if(u){var w=tO(r),S="clientHeight",C="clientWidth";if(w===Mp(r)&&(w=r7(r),b5(w).position!=="static"&&l==="absolute"&&(S="scrollHeight",C="scrollWidth")),w=w,i===C0||(i===M0||i===Xd)&&o===$A){_=Zd;var E=h&&w===L&&L.visualViewport?L.visualViewport.height:w[S];g-=E-n.height,g*=c?1:-1}if(i===M0||(i===C0||i===Zd)&&o===$A){Q=Xd;var O=h&&w===L&&L.visualViewport?L.visualViewport.width:w[C];f-=O-n.width,f*=c?1:-1}}var I=Object.assign({position:l},u&&wXr),R=d===!0?LXr({x:f,y:g}):{x:f,y:g};if(f=R.x,g=R.y,c){var B;return Object.assign({},I,(B={},B[_]=v?"0":"",B[Q]=y?"0":"",B.transform=(L.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",B))}return Object.assign({},I,(t={},t[_]=v?g+"px":"",t[Q]=y?f+"px":"",t.transform="",t))}function SXr(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,o=r.adaptive,s=o===void 0?!0:o,l=r.roundOffsets,c=l===void 0?!0:l,u={placement:Uf(t.placement),variation:g_(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,bGe(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,bGe(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var QGe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:SXr,data:{}},dG={passive:!0};function kXr(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,o=i===void 0?!0:i,s=n.resize,l=s===void 0?!0:s,c=Mp(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(d){d.addEventListener("scroll",r.update,dG)}),l&&c.addEventListener("resize",r.update,dG),function(){o&&u.forEach(function(d){d.removeEventListener("scroll",r.update,dG)}),l&&c.removeEventListener("resize",r.update,dG)}}var xGe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:kXr,data:{}},CXr={left:"right",right:"left",bottom:"top",top:"bottom"};function hG(e){return e.replace(/left|right|bottom|top/g,function(t){return CXr[t]})}var MXr={start:"end",end:"start"};function _Ge(e){return e.replace(/start|end/g,function(t){return MXr[t]})}function hue(e){var t=Mp(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function pue(e){return m_(r7(e)).left+hue(e).scrollLeft}function EXr(e){var t=Mp(e),r=r7(e),n=t.visualViewport,i=r.clientWidth,o=r.clientHeight,s=0,l=0;return n&&(i=n.width,o=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=n.offsetLeft,l=n.offsetTop)),{width:i,height:o,x:s+pue(e),y:l}}function AXr(e){var t,r=r7(e),n=hue(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=hT(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=hT(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),l=-n.scrollLeft+pue(e),c=-n.scrollTop;return b5(i||r).direction==="rtl"&&(l+=hT(r.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:l,y:c}}function fue(e){var t=b5(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function wGe(e){return["html","body","#document"].indexOf(jf(e))>=0?e.ownerDocument.body:Kd(e)&&fue(e)?e:wGe(uG(e))}function nO(e,t){var r;t===void 0&&(t=[]);var n=wGe(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=Mp(n),s=i?[o].concat(o.visualViewport||[],fue(n)?n:[]):n,l=t.concat(s);return i?l:l.concat(nO(uG(s)))}function mue(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function OXr(e){var t=m_(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 LGe(e,t){return t===hGe?mue(EXr(e)):p_(t)?OXr(t):mue(AXr(r7(e)))}function IXr(e){var t=nO(uG(e)),r=["absolute","fixed"].indexOf(b5(e).position)>=0,n=r&&Kd(e)?tO(e):e;return p_(n)?t.filter(function(i){return p_(i)&&mGe(i,n)&&jf(i)!=="body"}):[]}function PXr(e,t,r){var n=t==="clippingParents"?IXr(e):[].concat(t),i=[].concat(n,[r]),o=i[0],s=i.reduce(function(l,c){var u=LGe(e,c);return l.top=hT(u.top,l.top),l.right=cG(u.right,l.right),l.bottom=cG(u.bottom,l.bottom),l.left=hT(u.left,l.left),l},LGe(e,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function SGe(e){var t=e.reference,r=e.element,n=e.placement,i=n?Uf(n):null,o=n?g_(n):null,s=t.x+t.width/2-r.width/2,l=t.y+t.height/2-r.height/2,c;switch(i){case C0:c={x:s,y:t.y-r.height};break;case Zd:c={x:s,y:t.y+t.height};break;case Xd:c={x:t.x+t.width,y:l};break;case M0:c={x:t.x-r.width,y:l};break;default:c={x:t.x,y:t.y}}var u=i?due(i):null;if(u!=null){var d=u==="y"?"height":"width";switch(o){case h_:c[u]=c[u]-(t[d]/2-r[d]/2);break;case $A:c[u]=c[u]+(t[d]/2-r[d]/2);break}}return c}function iO(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,o=r.boundary,s=o===void 0?nXr:o,l=r.rootBoundary,c=l===void 0?hGe:l,u=r.elementContext,d=u===void 0?eO:u,h=r.altBoundary,p=h===void 0?!1:h,f=r.padding,m=f===void 0?0:f,g=TGe(typeof m!="number"?m:vGe(m,JA)),T=d===eO?iXr:eO,y=e.rects.popper,v=e.elements[p?T:d],Q=PXr(p_(v)?v:v.contextElement||r7(e.elements.popper),s,c),_=m_(e.elements.reference),L=SGe({reference:_,element:y,strategy:"absolute",placement:i}),w=mue(Object.assign({},y,L)),S=d===eO?w:_,C={top:Q.top-S.top+g.top,bottom:S.bottom-Q.bottom+g.bottom,left:Q.left-S.left+g.left,right:S.right-Q.right+g.right},E=e.modifiersData.offset;if(d===eO&&E){var O=E[i];Object.keys(C).forEach(function(I){var R=[Xd,Zd].indexOf(I)>=0?1:-1,B=[C0,Zd].indexOf(I)>=0?"y":"x";C[I]+=O[B]*R})}return C}function VXr(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,o=r.rootBoundary,s=r.padding,l=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?lG:c,d=g_(n),h=d?l?pGe:pGe.filter(function(m){return g_(m)===d}):JA,p=h.filter(function(m){return u.indexOf(m)>=0});p.length===0&&(p=h);var f=p.reduce(function(m,g){return m[g]=iO(e,{placement:g,boundary:i,rootBoundary:o,padding:s})[Uf(g)],m},{});return Object.keys(f).sort(function(m,g){return f[m]-f[g]})}function HXr(e){if(Uf(e)===lue)return[];var t=hG(e);return[_Ge(e),t,_Ge(t)]}function RXr(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,o=i===void 0?!0:i,s=r.altAxis,l=s===void 0?!0:s,c=r.fallbackPlacements,u=r.padding,d=r.boundary,h=r.rootBoundary,p=r.altBoundary,f=r.flipVariations,m=f===void 0?!0:f,g=r.allowedAutoPlacements,T=t.options.placement,y=Uf(T),v=y===T,Q=c||(v||!m?[hG(T)]:HXr(T)),_=[T].concat(Q).reduce(function(Qe,me){return Qe.concat(Uf(me)===lue?VXr(t,{placement:me,boundary:d,rootBoundary:h,padding:u,flipVariations:m,allowedAutoPlacements:g}):me)},[]),L=t.rects.reference,w=t.rects.popper,S=new Map,C=!0,E=_[0],O=0;O<_.length;O++){var I=_[O],R=Uf(I),B=g_(I)===h_,D=[C0,Zd].indexOf(R)>=0,j=D?"width":"height",N=iO(t,{placement:I,boundary:d,rootBoundary:h,altBoundary:p,padding:u}),V=D?B?Xd:M0:B?Zd:C0;L[j]>w[j]&&(V=hG(V));var W=hG(V),G=[];if(o&&G.push(N[R]<=0),l&&G.push(N[V]<=0,N[W]<=0),G.every(function(Qe){return Qe})){E=I,C=!1;break}S.set(I,G)}if(C)for(var X=m?3:1,$=function(Qe){var me=_.find(function(ne){var le=S.get(ne);if(le)return le.slice(0,Qe).every(function(ee){return ee})});if(me)return E=me,"break"},te=X;te>0;te--){var ce=$(te);if(ce==="break")break}t.placement!==E&&(t.modifiersData[n]._skip=!0,t.placement=E,t.reset=!0)}}var NXr={name:"flip",enabled:!0,phase:"main",fn:RXr,requiresIfExists:["offset"],data:{_skip:!1}};function kGe(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function CGe(e){return[C0,Xd,Zd,M0].some(function(t){return e[t]>=0})}function BXr(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=iO(t,{elementContext:"reference"}),l=iO(t,{altBoundary:!0}),c=kGe(s,n),u=kGe(l,i,o),d=CGe(c),h=CGe(u);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}var FXr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:BXr};function DXr(e,t,r){var n=Uf(e),i=[M0,C0].indexOf(n)>=0?-1:1,o=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,s=o[0],l=o[1];return s=s||0,l=(l||0)*i,[M0,Xd].indexOf(n)>=0?{x:l,y:s}:{x:s,y:l}}function zXr(e){var t=e.state,r=e.options,n=e.name,i=r.offset,o=i===void 0?[0,0]:i,s=lG.reduce(function(d,h){return d[h]=DXr(h,t.rects,o),d},{}),l=s[t.placement],c=l.x,u=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=s}var jXr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:zXr};function UXr(e){var t=e.state,r=e.name;t.modifiersData[r]=SGe({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var MGe={name:"popperOffsets",enabled:!0,phase:"read",fn:UXr,data:{}};function GXr(e){return e==="x"?"y":"x"}function WXr(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,o=i===void 0?!0:i,s=r.altAxis,l=s===void 0?!1:s,c=r.boundary,u=r.rootBoundary,d=r.altBoundary,h=r.padding,p=r.tether,f=p===void 0?!0:p,m=r.tetherOffset,g=m===void 0?0:m,T=iO(t,{boundary:c,rootBoundary:u,padding:h,altBoundary:d}),y=Uf(t.placement),v=g_(t.placement),Q=!v,_=due(y),L=GXr(_),w=t.modifiersData.popperOffsets,S=t.rects.reference,C=t.rects.popper,E=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,O=typeof E=="number"?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),I=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,R={x:0,y:0};if(w){if(o){var B,D=_==="y"?C0:M0,j=_==="y"?Zd:Xd,N=_==="y"?"height":"width",V=w[_],W=V+T[D],G=V-T[j],X=f?-C[N]/2:0,$=v===h_?S[N]:C[N],te=v===h_?-C[N]:-S[N],ce=t.elements.arrow,Qe=f&&ce?uue(ce):{width:0,height:0},me=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:yGe(),ne=me[D],le=me[j],ee=rO(0,S[N],Qe[N]),oe=Q?S[N]/2-X-ee-ne-O.mainAxis:$-ee-ne-O.mainAxis,ie=Q?-S[N]/2+X+ee+le+O.mainAxis:te+ee+le+O.mainAxis,he=t.elements.arrow&&tO(t.elements.arrow),we=he?_==="y"?he.clientTop||0:he.clientLeft||0:0,Pe=(B=I==null?void 0:I[_])!=null?B:0,pe=V+oe-Pe-we,Ce=V+ie-Pe,Le=rO(f?cG(W,pe):W,V,f?hT(G,Ce):G);w[_]=Le,R[_]=Le-V}if(l){var Oe,De=_==="x"?C0:M0,ot=_==="x"?Zd:Xd,rt=w[L],dt=L==="y"?"height":"width",wt=rt+T[De],yt=rt-T[ot],ge=[C0,M0].indexOf(y)!==-1,Xe=(Oe=I==null?void 0:I[L])!=null?Oe:0,pt=ge?wt:rt-S[dt]-C[dt]-Xe+O.altAxis,ft=ge?rt+S[dt]+C[dt]-Xe-O.altAxis:yt,_t=f&&ge?vXr(pt,rt,ft):rO(f?pt:wt,rt,f?ft:yt);w[L]=_t,R[L]=_t-rt}t.modifiersData[n]=R}}var qXr={name:"preventOverflow",enabled:!0,phase:"main",fn:WXr,requiresIfExists:["offset"]};function ZXr(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function XXr(e){return e===Mp(e)||!Kd(e)?hue(e):ZXr(e)}function KXr(e){var t=e.getBoundingClientRect(),r=f_(t.width)/e.offsetWidth||1,n=f_(t.height)/e.offsetHeight||1;return r!==1||n!==1}function YXr(e,t,r){r===void 0&&(r=!1);var n=Kd(t),i=Kd(t)&&KXr(t),o=r7(t),s=m_(e,i),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((jf(t)!=="body"||fue(o))&&(l=XXr(t)),Kd(t)?(c=m_(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=pue(o))),{x:s.left+l.scrollLeft-c.x,y:s.top+l.scrollTop-c.y,width:s.width,height:s.height}}function JXr(e){var t=new Map,r=new Set,n=[];e.forEach(function(o){t.set(o.name,o)});function i(o){r.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(l){if(!r.has(l)){var c=t.get(l);c&&i(c)}}),n.push(o)}return e.forEach(function(o){r.has(o.name)||i(o)}),n}function $Xr(e){var t=JXr(e);return fXr.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function eKr(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function tKr(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var EGe={placement:"bottom",modifiers:[],strategy:"absolute"};function AGe(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function gue(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,o=i===void 0?EGe:i;return function(s,l,c){c===void 0&&(c=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},EGe,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],h=!1,p={state:u,setOptions:function(g){var T=typeof g=="function"?g(u.options):g;m(),u.options=Object.assign({},o,u.options,T),u.scrollParents={reference:p_(s)?nO(s):s.contextElement?nO(s.contextElement):[],popper:nO(l)};var y=$Xr(tKr([].concat(n,u.options.modifiers)));return u.orderedModifiers=y.filter(function(v){return v.enabled}),f(),p.update()},forceUpdate:function(){if(!h){var g=u.elements,T=g.reference,y=g.popper;if(AGe(T,y)){u.rects={reference:YXr(T,tO(y),u.options.strategy==="fixed"),popper:uue(y)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(C){return u.modifiersData[C.name]=Object.assign({},C.data)});for(var v=0;v<u.orderedModifiers.length;v++){if(u.reset===!0){u.reset=!1,v=-1;continue}var Q=u.orderedModifiers[v],_=Q.fn,L=Q.options,w=L===void 0?{}:L,S=Q.name;typeof _=="function"&&(u=_({state:u,options:w,name:S,instance:p})||u)}}}},update:eKr(function(){return new Promise(function(g){p.forceUpdate(),g(u)})}),destroy:function(){m(),h=!0}};if(!AGe(s,l))return p;p.setOptions(c).then(function(g){!h&&c.onFirstUpdate&&c.onFirstUpdate(g)});function f(){u.orderedModifiers.forEach(function(g){var T=g.name,y=g.options,v=y===void 0?{}:y,Q=g.effect;if(typeof Q=="function"){var _=Q({state:u,name:T,instance:p,options:v}),L=function(){};d.push(_||L)}})}function m(){d.forEach(function(g){return g()}),d=[]}return p}}gue();var rKr=[xGe,MGe,QGe,fGe];gue({defaultModifiers:rKr});var nKr=[xGe,MGe,QGe,fGe,jXr,NXr,qXr,_Xr,FXr],iKr=gue({defaultModifiers:nKr});const oKr=(e,t,r={})=>{const n={name:"updateState",enabled:!0,phase:"write",fn:({state:c})=>{const u=aKr(c);Object.assign(s.value,u)},requires:["computeStyles"]},i=a.computed(()=>{const{onFirstUpdate:c,placement:u,strategy:d,modifiers:h}=a.unref(r);return{onFirstUpdate:c,placement:u||"bottom",strategy:d||"absolute",modifiers:[...h||[],n,{name:"applyStyles",enabled:!1}]}}),o=a.shallowRef(),s=a.ref({styles:{popper:{position:a.unref(i).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),l=()=>{o.value&&(o.value.destroy(),o.value=void 0)};return a.watch(i,c=>{const u=a.unref(o);u&&u.setOptions(c)},{deep:!0}),a.watch([e,t],([c,u])=>{l(),!(!c||!u)&&(o.value=iKr(c,u,a.unref(i)))}),a.onBeforeUnmount(()=>{l()}),{state:a.computed(()=>{var c;return{...((c=a.unref(o))==null?void 0:c.state)||{}}}),styles:a.computed(()=>a.unref(s).styles),attributes:a.computed(()=>a.unref(s).attributes),update:()=>{var c;return(c=a.unref(o))==null?void 0:c.update()},forceUpdate:()=>{var c;return(c=a.unref(o))==null?void 0:c.forceUpdate()},instanceRef:a.computed(()=>a.unref(o))}};function aKr(e){const t=Object.keys(e.elements),r=rG(t.map(i=>[i,e.styles[i]||{}])),n=rG(t.map(i=>[i,e.attributes[i]]));return{styles:r,attributes:n}}function OGe(){let e;const t=(n,i)=>{r(),e=window.setTimeout(n,i)},r=()=>window.clearTimeout(e);return qU(()=>r()),{registerTimeout:t,cancelTimeout:r}}const yue={prefix:Math.floor(Math.random()*1e4),current:0},sKr=Symbol("elIdInjection"),Tue=()=>a.getCurrentInstance()?a.inject(sKr,yue):yue,pG=e=>{const t=Tue();!W1&&t===yue&&qd("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
|
3096
3096
|
usage: app.provide(ID_INJECTION_KEY, {
|