@abi-software/mapintegratedvuer 1.14.0 → 1.14.1
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-CNJBk8X5.js → ContentMixin-D8QXfBlf.js} +1 -1
- package/dist/{Flatmap-Br1QH3KB.js → Flatmap-DM50GhPi.js} +3 -3
- package/dist/{Iframe-By3z2E5s.js → Iframe-CFzJK0tw.js} +2 -2
- package/dist/{MultiFlatmap-6VIoa11Z.js → MultiFlatmap-CzeUUF_z.js} +3 -3
- package/dist/{Plot-0VRwsvjv.js → Plot-BLVkTIwq.js} +2 -2
- package/dist/{Scaffold-du_4ru_3.js → Scaffold-Be8QBezQ.js} +2 -2
- package/dist/{Simulation-BrFO_3Hy.js → Simulation-OOY1oHMT.js} +2 -2
- package/dist/{index-Dj4nDRx6.js → index-8DUKRP2u.js} +5 -4
- package/dist/mapintegratedvuer.js +1 -1
- package/dist/mapintegratedvuer.umd.cjs +4 -3
- package/dist/{style-CwTC2nuF.js → style-CgFvkWaH.js} +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -4
- package/src/components/ContentBar.vue +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { markRaw as y } from "vue";
|
|
2
|
-
import { c as C, u as E, d as O, e as N, E as f, T as b, f as R, h as x, i as w, l as P, j as B, J as X } from "./index-
|
|
2
|
+
import { c as C, u as E, d as O, e as N, E as f, T as b, f as R, h as x, i as w, l as P, j as B, J as X } from "./index-8DUKRP2u.js";
|
|
3
3
|
import { mapStores as U } from "pinia";
|
|
4
4
|
const M = function(e) {
|
|
5
5
|
return e ? [...new Set(e.map((r) => JSON.stringify(r)))].map(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as d, q as c, E as l, T as h } from "./index-
|
|
2
|
-
import { C as u } from "./ContentMixin-
|
|
3
|
-
import { D as y } from "./style-
|
|
1
|
+
import { _ as d, q as c, E as l, T as h } from "./index-8DUKRP2u.js";
|
|
2
|
+
import { C as u } from "./ContentMixin-D8QXfBlf.js";
|
|
3
|
+
import { D as y } from "./style-CgFvkWaH.js";
|
|
4
4
|
import { FlatmapVuer as g } from "@abi-software/flatmapvuer";
|
|
5
5
|
import { resolveComponent as r, openBlock as p, createElementBlock as M, createVNode as C, createBlock as v, createCommentVNode as I } from "vue";
|
|
6
6
|
const S = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as r } from "./ContentMixin-
|
|
1
|
+
import { C as r } from "./ContentMixin-D8QXfBlf.js";
|
|
2
2
|
import { openBlock as o, createElementBlock as t, createElementVNode as a } from "vue";
|
|
3
|
-
import { _ as s } from "./index-
|
|
3
|
+
import { _ as s } from "./index-8DUKRP2u.js";
|
|
4
4
|
const n = {
|
|
5
5
|
name: "Iframe",
|
|
6
6
|
mixins: [r]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as c, q as h, a as g, T as r, E as l } from "./index-
|
|
2
|
-
import { C as M } from "./ContentMixin-
|
|
3
|
-
import { D as C } from "./style-
|
|
1
|
+
import { _ as c, q as h, a as g, T as r, E as l } from "./index-8DUKRP2u.js";
|
|
2
|
+
import { C as M } from "./ContentMixin-D8QXfBlf.js";
|
|
3
|
+
import { D as C } from "./style-CgFvkWaH.js";
|
|
4
4
|
import { MultiFlatmapVuer as y } from "@abi-software/flatmapvuer";
|
|
5
5
|
import { resolveComponent as p, openBlock as m, createElementBlock as v, createVNode as I, createBlock as S, createCommentVNode as F } from "vue";
|
|
6
6
|
const w = '<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>', d = (e) => [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PlotVuer as o } from "@abi-software/plotvuer";
|
|
2
|
-
import { C as r } from "./ContentMixin-
|
|
2
|
+
import { C as r } from "./ContentMixin-D8QXfBlf.js";
|
|
3
3
|
import { resolveComponent as a, openBlock as n, createBlock as s } from "vue";
|
|
4
|
-
import { _ as p } from "./index-
|
|
4
|
+
import { _ as p } from "./index-8DUKRP2u.js";
|
|
5
5
|
const l = {
|
|
6
6
|
name: "Plot",
|
|
7
7
|
mixins: [r],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as g, q as m, g as v, b as y, E as d } from "./index-
|
|
2
|
-
import { C as w } from "./ContentMixin-
|
|
1
|
+
import { _ as g, q as m, g as v, b as y, E as d } from "./index-8DUKRP2u.js";
|
|
2
|
+
import { C as w } from "./ContentMixin-D8QXfBlf.js";
|
|
3
3
|
import { ScaffoldVuer as b } from "@abi-software/scaffoldvuer";
|
|
4
4
|
import { resolveComponent as p, openBlock as u, createElementBlock as S, createVNode as M, createBlock as N, createCommentVNode as $ } from "vue";
|
|
5
5
|
const C = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as n } from "./ContentMixin-
|
|
1
|
+
import { C as n } from "./ContentMixin-D8QXfBlf.js";
|
|
2
2
|
import { SimulationVuer as e } from "@abi-software/simulationvuer";
|
|
3
3
|
import { resolveComponent as r, openBlock as a, createBlock as c } from "vue";
|
|
4
|
-
import { _ as m } from "./index-
|
|
4
|
+
import { _ as m } from "./index-8DUKRP2u.js";
|
|
5
5
|
const s = {
|
|
6
6
|
name: "Simulation",
|
|
7
7
|
mixins: [n],
|
|
@@ -46979,12 +46979,13 @@ const dV = /* @__PURE__ */ Ka(N5e, [["render", K5e], ["__scopeId", "data-v-fd897
|
|
|
46979
46979
|
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
46980
46980
|
<title>close no bk</title>
|
|
46981
46981
|
<g id="close-no-bk" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="square">
|
|
46982
|
-
<g id="Group-13" transform="translate(12.000000, 12.000000) rotate(-315.000000) translate(-12.000000, -12.000000) translate(5.000000, 5.000000)" stroke="
|
|
46982
|
+
<g id="Group-13" transform="translate(12.000000, 12.000000) rotate(-315.000000) translate(-12.000000, -12.000000) translate(5.000000, 5.000000)" stroke="currentColor" stroke-width="2">
|
|
46983
46983
|
<line x1="0" y1="7" x2="14" y2="7" id="Line-9"></line>
|
|
46984
46984
|
<line x1="7" y1="0" x2="7" y2="14" id="Line-9"></line>
|
|
46985
46985
|
</g>
|
|
46986
46986
|
</g>
|
|
46987
|
-
</svg
|
|
46987
|
+
</svg>
|
|
46988
|
+
`, kV = `<?xml version="1.0" encoding="UTF-8"?>
|
|
46988
46989
|
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
46989
46990
|
<title>close</title>
|
|
46990
46991
|
<g id="close" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
@@ -48465,7 +48466,7 @@ function b3e(e, t, n, r, o, a) {
|
|
|
48465
48466
|
}, {
|
|
48466
48467
|
reference: N(() => [
|
|
48467
48468
|
Be(q(p, {
|
|
48468
|
-
icon: "close",
|
|
48469
|
+
icon: "close-no-bk",
|
|
48469
48470
|
class: "header-icon",
|
|
48470
48471
|
onClick: t[5] || (t[5] = (m) => a.closeAndRemove())
|
|
48471
48472
|
}, null, 512), [
|
|
@@ -48479,7 +48480,7 @@ function b3e(e, t, n, r, o, a) {
|
|
|
48479
48480
|
})
|
|
48480
48481
|
]);
|
|
48481
48482
|
}
|
|
48482
|
-
const ZV = /* @__PURE__ */ Ka(g3e, [["render", b3e], ["__scopeId", "data-v-
|
|
48483
|
+
const ZV = /* @__PURE__ */ Ka(g3e, [["render", b3e], ["__scopeId", "data-v-0296970e"]]), w3e = dd(() => import("./Flatmap-DM50GhPi.js")), x3e = dd(() => import("./Iframe-CFzJK0tw.js")), k3e = dd(() => import("./MultiFlatmap-CzeUUF_z.js")), C3e = dd(() => import("./Plot-BLVkTIwq.js")), _3e = dd(() => import("./Scaffold-Be8QBezQ.js")), S3e = dd(() => import("./Simulation-OOY1oHMT.js")), $3e = {
|
|
48483
48484
|
name: "ContentVuer",
|
|
48484
48485
|
props: {
|
|
48485
48486
|
/**
|
|
@@ -687,12 +687,13 @@ Please report this to https://github.com/markedjs/marked.`,e){const a="<p>An err
|
|
|
687
687
|
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
688
688
|
<title>close no bk</title>
|
|
689
689
|
<g id="close-no-bk" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="square">
|
|
690
|
-
<g id="Group-13" transform="translate(12.000000, 12.000000) rotate(-315.000000) translate(-12.000000, -12.000000) translate(5.000000, 5.000000)" stroke="
|
|
690
|
+
<g id="Group-13" transform="translate(12.000000, 12.000000) rotate(-315.000000) translate(-12.000000, -12.000000) translate(5.000000, 5.000000)" stroke="currentColor" stroke-width="2">
|
|
691
691
|
<line x1="0" y1="7" x2="14" y2="7" id="Line-9"></line>
|
|
692
692
|
<line x1="7" y1="0" x2="7" y2="14" id="Line-9"></line>
|
|
693
693
|
</g>
|
|
694
694
|
</g>
|
|
695
|
-
</svg
|
|
695
|
+
</svg>
|
|
696
|
+
`,q9=`<?xml version="1.0" encoding="UTF-8"?>
|
|
696
697
|
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
697
698
|
<title>close</title>
|
|
698
699
|
<g id="close" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
@@ -973,7 +974,7 @@ Please report this to https://github.com/markedjs/marked.`,e){const a="<p>An err
|
|
|
973
974
|
where source="${Dg(e)}" and
|
|
974
975
|
knowledge like "%${t}%" order by source desc`;return(await n.queryKnowledge(a)).map(c=>JSON.parse(c)).map(c=>c.id)}function Dg(e){return wV(e.mapMetadata)}function wV(e){let t="";if(e!=null&&e.connectivity){const n=e.connectivity;"knowledge-source"in n?t=n["knowledge-source"]:"npo"in n&&(t=`${n.npo.release}-npo`)}return t}async function T5e(e,t){const n=Dg(e),o=`select knowledge from knowledge
|
|
975
976
|
where source="${n}"
|
|
976
|
-
order by source desc`;O5e();const a=sessionStorage.getItem("flatmap-knowledge"),i=sessionStorage.getItem("flatmap-knowledge-source");if(!a||i!==n){const l=(await t.queryKnowledge(o)).map(c=>JSON.parse(c));return sessionStorage.setItem("flatmap-knowledge",JSON.stringify(l)),sessionStorage.setItem("flatmap-knowledge-source",n),N5e(),l}return JSON.parse(a)}function N5e(){const n=new Date().getTime()+864e5;sessionStorage.setItem("flatmap-knowledge-expiry",n)}function M5e(){["flatmap-knowledge","flatmap-knowledge-expiry","flatmap-knowledge-source"].forEach(t=>{sessionStorage.removeItem(t)})}function O5e(){const e=sessionStorage.getItem("flatmap-knowledge-expiry");new Date().getTime()>e&&M5e()}const Of=Mt.defineStore("entries",{state:()=>RS(),getters:{findIndexOfId:e=>t=>{for(let n=0;n<e.entries.length;n++)if(e.entries[n].id==t)return n;return-1}},actions:{addNewEntry(e){this.entries.push(e)},destroyEntry(e){e>-1&&this.entries.splice(e,1)},setAll(e){this.entries=[],Object.assign(this.entries,e)},updateViewForEntry({id:e,viewUrl:t}){const n=this.entries.find(o=>o.id===e);n.viewUrl=t},updateMapForEntry(e,t){if(e.id===t.id){const n=wV(t.prov);e.uuid=t.prov.uuid,e.sckanVersion=n}},updateLabelForEntry(e,t){const n=this.entries.find(o=>o.id===e.id);n&&(n.label=t)},updateTitleForEntry(e,t){const n=this.entries.find(o=>o.id===e.id);n&&(n.title=t)}}}),If=[{id:"ilxtr:neuron-type-keast-13",centrelines:["n_71"]},{id:"ilxtr:neuron-type-keast-2",centrelines:["bladder_n"]},{id:"ilxtr:neuron-type-keast-3",centrelines:["bladder_n","hypogastric_n"]},{id:"ilxtr:neuron-type-keast-15",centrelines:["n_73"]},{id:"ilxtr:neuron-type-keast-1",centrelines:["bladder_n"]},{id:"ilxtr:neuron-type-keast-7",centrelines:["L1_ventral_root_ramus","L1_spinal_n-1","lumbar_splanchnic_n","L2_spinal_n","L2_ventral_root_ramus"]},{id:"ilxtr:neuron-type-keast-9",centrelines:["L6_spinal_n-1","L6_ventral_root","pudendal_n","L5_spinal_n","L5_ventral_root"]},{id:"ilxtr:neuron-type-keast-10",centrelines:["S1_dorsal_root","S1_spinal_n-2","pelvic_splanchnic_n","L6_spinal_n-2","L6_dorsal_root","bladder_n"]},{id:"ilxtr:neuron-type-keast-11",centrelines:["lumbar_splanchnic_n","L2_spinal_n","L1_spinal_n-1","hypogastric_n","bladder_n","L1_dorsal_root","L2_dorsal_root"]},{id:"ilxtr:neuron-type-keast-12",centrelines:["L6_spinal_n-1","L6_dorsal_root","pudendal_n","S1_spinal_n-1","S1_dorsal_root"]},{id:"ilxtr:neuron-type-keast-8",centrelines:["L1_ventral_root_paravertebral_ganglion","L1-L2_interganglionic_segment","sympathetic_trunk_T13-L1","L2_ventral_root_paravertebral_ganglion","sympathetic_trunk_L2-L3","sympathetic_trunk_L4-L5","sympathetic_trunk_L3-L4","sympathetic_trunk_L5-L6","sympathetic_trunk_T12-T13"]},{id:"ilxtr:neuron-type-keast-20",centrelines:["T1_T2_cns","C8_T1_cns","T2_T3_cns","T10_T11_cns","T9_T10_cns","T11_T12_cns","T8_T9_cns","C7_C8_cns","C6_C7_cns","C4_C5_cns","C3_C4_cns","C5_C6_cns","medulla_C1_cns","pons_medulla_cns","C1_C2_cns","T5_T6_cns","T4_T5_cns","T6_T7_cns","L3_L4_cns","L2_L3_cns","L4_L5_cns","L5_L6_cns","T13_L1_cns","T12_T13_cns","L1_L2_cns","T3_T4_cns","n_69","C2_C3_cns","T7_T8_cns"]},{id:"ilxtr:neuron-type-keast-16",centrelines:["n_74"]},{id:"ilxtr:neuron-type-keast-4",centrelines:["sympathetic_trunk_L6-S1","L6_gray_ramus-spinal_n","sympathetic_trunk_L5-L6","S1_gray_ramus-spinal_n","S1_spinal_n-2","pelvic_splanchnic_n","L6_spinal_n-2","L1-L2_interganglionic_segment","sympathetic_trunk_T13-L1","sympathetic_trunk_L2-L3","bladder_n","sympathetic_trunk_L4-L5","sympathetic_trunk_L3-L4","sympathetic_trunk_T12-T13"]},{id:"ilxtr:neuron-type-keast-17",centrelines:["n_75"]},{id:"ilxtr:neuron-type-keast-5",centrelines:["S1_ventral_root","S1_spinal_n-2","pelvic_splanchnic_n","L6_spinal_n-2","L6_ventral_root"]},{id:"ilxtr:neuron-type-keast-18",centrelines:["n_70"]},{id:"ilxtr:neuron-type-keast-6",centrelines:["L1_ventral_root_ramus","L1_spinal_n-1","lumbar_splanchnic_n","L2_spinal_n","hypogastric_n","L2_ventral_root_ramus"]},{id:"ilxtr:neuron-type-keast-19",centrelines:["n_69"]},{id:"ilxtr:neuron-type-keast-14",centrelines:["n_72"]}];function I5e(){return[{id:"UBERON:0000948",name:"Heart",type:"simulation"},{id:"UBERON:0001156",name:"Colon",type:"simulation"},{id:"UBERON:0001255",name:"Bladder",type:"simulation"},{id:"UBERON:0000945",name:"Stomach",type:"simulation"},{id:"UBERON:0001759",name:"Vagus nerve",type:"simulation"},{id:"UBERON:0002108",name:"Small intestines",type:"simulation"},{id:"UBERON:0002107",name:"Liver",type:"simulation"}]}function L5e(){return I5e()}function xV(e){if(e)for(let t=0;t<If.length;t++){if(If[t].id==e)return If[t].centrelines;if(If[t].centrelines.find(o=>o===e))return[If[t].id]}return[]}function R5e(e){if(e){const t=e.toLowerCase();if(t.includes("heart"))return{id:"UBERON:0000948",name:"Heart"};if(t.includes("liver"))return{id:"UBERON:0002107",name:"Liver"};if(t.includes("stomach"))return{id:"UBERON:0000945",name:"Stomach"};if(t.includes("colon"))return{id:"UBERON:0001156",name:"Colon"};if(t.includes("bladder"))return{id:"UBERON:0001255",name:"Bladder"}}}const VS=e=>{switch(e){case"2horpanel":return{"split-1":{content:!1,horizontal:!0,children:["pane-1","pane-2"]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2}};case"2vertpanel":return{"split-1":{content:!1,horizontal:!1,children:["pane-1","pane-2"]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2}};case"3panel":return{"split-1":{content:!1,horizontal:!1,children:["pane-1","split-2"]},"split-2":{content:!1,horizontal:!0,children:["pane-2","pane-3"]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2},"pane-3":{content:!0,id:3}};case"4panel":return{"split-1":{content:!1,horizontal:!1,children:["split-3","split-2"]},"split-2":{content:!1,horizontal:!0,children:["pane-2","pane-3"]},"split-3":{content:!1,horizontal:!0,children:["pane-1","pane-4"]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2},"pane-3":{content:!0,id:3},"pane-4":{content:!0,id:4}};case"5panel":return{"split-1":{content:!1,horizontal:!0,children:["split-3","split-2"]},"split-2":{content:!1,horizontal:!1,children:["pane-2","pane-3"]},"split-3":{content:!1,horizontal:!1,children:["pane-1","pane-4","pane-5"]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2},"pane-3":{content:!0,id:3},"pane-4":{content:!0,id:4},"pane-5":{content:!0,id:5}};case"6panel":return{"split-1":{content:!1,horizontal:!0,children:["split-3","split-2"]},"split-2":{content:!1,horizontal:!1,children:["pane-2","pane-3","pane-5"]},"split-3":{content:!1,horizontal:!1,children:["pane-1","pane-4","pane-6"]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2},"pane-3":{content:!0,id:3},"pane-4":{content:!0,id:4},"pane-5":{content:!0,id:5},"pane-6":{content:!0,id:6}};case"6panelVertical":return{"split-1":{content:!1,horizontal:!1,children:["split-3","split-2"]},"split-2":{content:!1,horizontal:!0,children:["pane-2","pane-3","pane-5"]},"split-3":{content:!1,horizontal:!0,children:["pane-1","pane-4","pane-6"]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2},"pane-3":{content:!0,id:3},"pane-4":{content:!0,id:4},"pane-5":{content:!0,id:5},"pane-6":{content:!0,id:6}};case"singlepanel":default:return{"split-1":{content:!1,horizontal:!1,children:["pane-1"]},"pane-1":{content:!0,id:1}}}},P5e=(e,t)=>{const n=[],o=[];for(const[a,i]of Object.entries(t))i.content&&(1>i.id||n.includes(i.id)?o.push(a):n.push(i.id));o.forEach(a=>{let i=!1;for(let s=0;s<e.length&&!i;s++)n.includes(e[s].id)||(t[a].id=e[s].id,n.push(e.id),i=!0)})},V5e=e=>{const t={};for(const[n,o]of Object.entries(e))o.content&&(t[n]=o);return t},kV=(e,t)=>{const n=V5e(e),o=VS(t);for(const[a,i]of Object.entries(n))o[a]=i;return o},yd=(e,t)=>Object.keys(e).find(n=>e[n].id===t),CV=()=>({activeView:"singlepanel",idNamePair:{},viewIcons:[{icon:"singlepanel",name:"Single view",min:1},{icon:"2horpanel",name:"Horizontal split",min:2},{icon:"2vertpanel",name:"Vertical split",min:2},{icon:"3panel",name:"Three panes",min:3},{icon:"4panel",name:"Four panes",min:4},{icon:"5panel",name:"Five panes",min:5},{icon:"6panel",name:"Six (horizontal)",min:6},{icon:"6panelVertical",name:"Six (vertical)",min:6}],customLayout:{"split-1":{content:!1,horizontal:!1,children:["pane-1"]},"pane-1":{content:!0,id:1}},splitters:{first:50,second:50,third:50}}),Ss=Mt.defineStore("splitFlow",{state:()=>CV(),getters:{getActivePaneIds:e=>()=>{const t=[];let n;for(const o in e.customLayout)e.customLayout[o].id&&t.push(e.customLayout[o].id);switch(e.activeView){case"singlepanel":n=t.slice(0,1);break;case"2horpanel":case"2vertpanel":n=t.slice(0,2);break;case"3panel":n=t.slice(0,3);break;case"4panel":n=t.slice(0,4);break;case"5panel":n=t.slice(0,5);break;case"6panelVertical":case"6panel":n=t.slice(0,6);break;default:n=[];break}return n},getPaneNameById:e=>t=>yd(e.customLayout,t),getState:e=>()=>({activeView:e.activeView,splitters:e.splitters,customLayout:e.customLayout}),isPaneActive:e=>t=>{const n=VS(e.activeView);return Object.keys(n).includes(t)}},actions:{assignOrSwapPaneWithIds(e){let t=yd(this.customLayout,e.source),n=yd(this.customLayout,e.target);n&&(this.customLayout[n].id=e.source),t&&(this.customLayout[t].id=e.target),this.updateSplitPanels()},getAvailableTerms(e){let t=L5e();for(let n=0;n<t.length;n++)this.idNamePair[t[n].id]=t[n].name;if(e){this._controller&&this._controller.abort(),this._controller=new AbortController;let n=this._controller.signal;fetch(`${e}get-organ-curies`,{signal:n}).then(o=>o.json()).then(o=>{this._controller=void 0,o.uberon.array.forEach(a=>{this.idNamePair[a.id.toUpperCase()]=a.name.charAt(0).toUpperCase()+a.name.slice(1)})})}},updateActiveView(e){this.activeView=e.view;const t=kV(this.customLayout,this.activeView);P5e(e.entries,t);for(const[n,o]of Object.entries(t))this.customLayout[n]=o;this.updateSplitPanels()},setSplitter(e){this.splitters[e.name]&&(this.splitters[e.name]=e.value)},setState(e){if(e){let t;if(e.activeView&&(this.activeView=e.activeView),e.customLayout)t=e.customLayout;else if(t=VS(this.activeView),e.slotInfo)for(let n=0;n<e.slotInfo.length;n++)switch(e.slotInfo[n].name){case"first":t["pane-1"].id=e.slotInfo[n].id;break;case"second":"pane-2"in t&&(t["pane-2"].id=e.slotInfo[n].id);break;case"thrid":"pane-3"in t&&(t["pane-3"].id=e.slotInfo[n].id);break;case"fourth":"pane-4"in t&&(t["pane-4"].id=e.slotInfo[n].id);break;case"fifth":"pane-5"in t&&(t["pane-5"].id=e.slotInfo[n].id);break;case"sixth":"pane-6"in t&&(t["pane-6"].id=e.slotInfo[n].id);break}for(const[n,o]of Object.entries(t))this.customLayout[n]=o;for(const[n,o]of Object.entries(e.splitters))this.splitters[n]=o}},setIdToPrimaryPane(e){const t=yd(this.customLayout,e),n=this.customLayout["pane-1"].id;this.customLayout["pane-1"].id=e,t&&(this.customLayout[t].id=n)},reset(){const e=CV();this.activeView=e.activeView,this.customLayout=e.customLayout,this.splitters=e.splitters},closeSlot(e){if(e){let t=0;if(e.entries)for(let n=0;n<e.entries.length&&t==0;n++)e.entries[n].id!==e.id&&yd(this.customLayout,e.entries[n].id)===void 0&&(t=e.entries[n].id);if(this.activeView!=="customise"){const n=this.activeView;switch(this.activeView){case"2horpanel":case"2vertpanel":this.activeView="singlepanel";break;case"3panel":this.activeView="2vertpanel";break;case"4panel":this.activeView="3panel";break;case"5panel":this.activeView="4panel";break;case"6panelVertical":case"6panel":this.activeView="5panel";break}const o=kV(this.customLayout,this.activeView);switch(yd(this.customLayout,e.id)){case"pane-1":switch(n){case"2horpanel":case"2vertpanel":o["pane-1"].id=o["pane-2"].id,o["pane-2"].id=t;break;case"3panel":o["pane-1"].id=o["pane-2"].id,o["pane-2"].id=o["pane-3"].id,o["pane-3"].id=t;break;case"4panel":o["pane-1"].id=o["pane-2"].id,o["pane-2"].id=o["pane-3"].id,o["pane-3"].id=o["pane-4"].id,o["pane-4"].id=t;break;case"5panel":o["pane-1"].id=o["pane-2"].id,o["pane-2"].id=o["pane-3"].id,o["pane-3"].id=o["pane-4"].id,o["pane-4"].id=o["pane-5"].id,o["pane-5"].id=t;break;case"6panelVertical":case"6panel":o["pane-1"].id=o["pane-2"].id,o["pane-2"].id=o["pane-3"].id,o["pane-3"].id=o["pane-4"].id,o["pane-4"].id=o["pane-5"].id,o["pane-5"].id=o["pane-6"].id,o["pane-6"].id=t;break}break;case"pane-2":switch(n){case"2horpanel":case"2vertpanel":o["pane-2"].id=t;break;case"3panel":o["pane-2"].id=o["pane-3"].id,o["pane-3"].id=t;break;case"4panel":o["pane-2"].id=o["pane-3"].id,o["pane-3"].id=o["pane-4"].id,o["pane-4"].id=t;break;case"5panel":o["pane-2"].id=o["pane-3"].id,o["pane-3"].id=o["pane-4"].id,o["pane-4"].id=o["pane-5"].id,o["pane-5"].id=t;break;case"6panelVertical":case"6panel":o["pane-2"].id=o["pane-3"].id,o["pane-3"].id=o["pane-4"].id,o["pane-4"].id=o["pane-5"].id,o["pane-5"].id=o["pane-6"].id,o["pane-6"].id=t;break}break;case"pane-3":switch(n){case"3panel":o["pane-3"].id=t;break;case"4panel":o["pane-3"].id=o["pane-4"].id,o["pane-4"].id=t;break;case"5panel":o["pane-3"].id=o["pane-4"].id,o["pane-4"].id=o["pane-5"].id,o["pane-5"].id=t;break;case"6panelVertical":case"6panel":o["pane-3"].id=o["pane-4"].id,o["pane-4"].id=o["pane-5"].id,o["pane-5"].id=o["pane-6"].id,o["pane-6"].id=t;break}break;case"pane-4":switch(n){case"4panel":o["pane-4"].id=t;break;case"5panel":o["pane-4"].id=o["pane-5"].id,o["pane-5"].id=t;break;case"6panelVertical":case"6panel":o["pane-4"].id=o["pane-5"].id,o["pane-5"].id=o["pane-6"].id,o["pane-6"].id=t;break}break;case"pane-5":switch(n){case"5panel":o["pane-5"].id=t;break;case"6panelVertical":case"6panel":o["pane-5"].id=o["pane-6"].id,o["pane-6"].id=t;break}break;case"pane-6":switch(n){case"6panelVertical":case"6panel":o["pane-6"].id=t;break}break}for(const[i,s]of Object.entries(o))this.customLayout[i]=s}}},updateSplitPanels(){$e.emit("species-layout-connectivity-update")}}}),D5e={name:"ContentBar",components:{ElIconArrowDown:lo,ElIconArrowUp:X1,ElIconInfoFilled:Q1,Input:mh,Option:G3,Popover:$h,Row:Ch,Select:K3,ContextCard:M9,FlatmapContextCard:O9,MapSvgIcon:OS},props:{entry:Object},data:function(){return{contextCardVisible:!1,slot:{},boundariesElement:null,showDetails:!0,contextCardEntry:void 0,titles:[]}},computed:{...Mt.mapStores(Of,vi,Ss),allClosable(){return this.settingsStore.allClosable},helpDelay(){return this.settingsStore.helpDelay},activeView:function(){return this.splitFlowStore.activeView},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}},popperOptions:function(){return{modifiers:[{name:"preventOverflow",options:{boundary:this.boundariesElement}},{name:"flip",options:{boundary:this.boundariesElement,flipVariations:!1,allowedAutoPlacements:["bottom"]}}]}},entries:function(){return this.titles=[],this.entriesStore.entries.map(e=>{const t=this.getEntryTitle(e);return this.titles.push({id:e.id,title:t}),{...e,title:t}})}},methods:{closeAndRemove:function(){this.splitFlowStore.closeSlot({id:this.entry.id,entries:this.entries}),$e.emit("RemoveEntryRequest",this.entry.id),this.$nextTick(()=>{this.splitFlowStore.updateSplitPanels()})},getEntryTitle:function(e){if(e){let t=e.label?e.label+" ":"",n=e.type;return n=="Scaffold"&&(n="3D Scaffold"),t+=n,e.datasetId?t+=" - "+e.datasetId:e.discoverId&&(t+=" - "+e.discoverId),t}return"Viewer"},getTitle:function(e){const{id:t,title:n}=e,o=this.titles.filter(a=>a.title===n);if(o.length>1){const a=[];for(let s=0;s<o.length;s++){const l=this.getCharById(s);a.push({id:o[s].id,title:o[s].title+l})}const i=a.find(s=>s.id===t);if(i)return i.title}return n},getCharById:function(e){return" ("+String.fromCharCode(65+e)+")"},viewerChanged:function(e){if(this.entry.id&&this.entry.id!=e){this.splitFlowStore.assignOrSwapPaneWithIds({source:this.entry.id,target:e}),this.$nextTick(()=>{setTimeout(()=>{this.$emit("chooser-changed")},1200)});const t=this.entries.find(n=>n.id===e);Bt.sendEvent({event:"interaction_event",event_name:"portal_maps_toolbar_viewer_changed",category:(t==null?void 0:t.title)||"",location:"map_toolbar"})}},setPopperWidth:function(e){let t=this.entries.find(n=>n.id===e);if(t)return t.type=="Flatmap"||t.type=="MultiFlatmap"?"240px":"440px"},setBoundary:function(e){this.boundariesElement=e},setupFlatmapContextCard:function(e){this.contextCardVisible=!1;let t=Object.assign({mapImpProv:e.prov},this.entry);this.contextCardEntry=t},setupScaffoldContextCard:function(){this.entry.contextCardUrl&&(this.contextCardEntry={...this.entry})}},mounted:function(){this.setupScaffoldContextCard()}},z5e={class:"toolbar-flex-container"},j5e={key:1,class:"toolbar-title"};function H5e(e,t,n,o,a,i){const s=G3,l=K3,c=O9,d=M9,u=X1,f=Un,h=lo,m=$h,p=r.resolveComponent("map-svg-icon"),g=Ch;return r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",z5e,[i.entries.length>1?(r.openBlock(),r.createBlock(l,{key:0,teleported:!1,"model-value":n.entry.id,placeholder:"Select",class:"select-box","popper-class":"viewer_dropdown",onChange:t[0]||(t[0]=v=>i.viewerChanged(v))},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.entries,v=>(r.openBlock(),r.createBlock(s,{key:v.id,label:i.getTitle(v),value:v.id},null,8,["label","value"]))),128))]),_:1},8,["model-value"])):(r.openBlock(),r.createElementBlock("div",j5e,r.toDisplayString(i.getEntryTitle(n.entry)),1))]),r.createVNode(g,{class:"icon-group"},{default:r.withCtx(()=>[r.createVNode(m,{placement:"bottom",teleported:!1,trigger:"manual",width:i.setPopperWidth(e.slot.id),offset:0,"popper-class":"context-card-popover","popper-options":i.popperOptions,visible:e.contextCardVisible},r.createSlots({reference:r.withCtx(()=>[r.withDirectives(r.createElementVNode("div",null,[r.withDirectives(r.createElementVNode("div",{class:"hide",onClick:t[3]||(t[3]=v=>e.contextCardVisible=!1)},[r.createTextVNode(" Hide information "),r.createVNode(f,null,{default:r.withCtx(()=>[r.createVNode(u)]),_:1})],512),[[r.vShow,e.contextCardVisible]]),r.withDirectives(r.createElementVNode("div",{class:"hide",onClick:t[4]||(t[4]=v=>e.contextCardVisible=!0)},[r.createTextVNode(" Show information "),r.createVNode(f,null,{default:r.withCtx(()=>[r.createVNode(h)]),_:1})],512),[[r.vShow,!e.contextCardVisible]])],512),[[r.vShow,e.contextCardEntry]])]),_:2},[e.contextCardEntry?{name:"default",fn:r.withCtx(()=>[e.contextCardEntry.type=="Flatmap"||e.contextCardEntry.type=="MultiFlatmap"?(r.openBlock(),r.createBlock(c,{key:0,class:"flatmap-context-card",mapImpProv:e.contextCardEntry.mapImpProv},null,8,["mapImpProv"])):r.createCommentVNode("",!0),e.contextCardEntry.type.toLowerCase()=="scaffold"?(r.openBlock(),r.createBlock(d,{key:1,entry:e.contextCardEntry,envVars:i.envVars,class:"context-card",onContextReady:t[1]||(t[1]=v=>e.contextCardVisible=!0),onScaffoldViewClicked:t[2]||(t[2]=v=>e.$emit("scaffold-view-clicked",v))},null,8,["entry","envVars"])):r.createCommentVNode("",!0)]),key:"0"}:void 0]),1032,["width","popper-options","visible"]),r.createVNode(m,{class:"tooltip",content:"Close and remove",placement:"bottom-end","show-after":i.helpDelay,teleported:!1,trigger:"hover","popper-class":"header-popper"},{reference:r.withCtx(()=>[r.withDirectives(r.createVNode(p,{icon:"close",class:"header-icon",onClick:t[5]||(t[5]=v=>i.closeAndRemove())},null,512),[[r.vShow,i.activeView!=="singlepanel"&&(n.entry.mode!=="main"||i.allClosable)]])]),_:1},8,["show-after"])]),_:1})])}const SV=tr(D5e,[["render",H5e],["__scopeId","data-v-61f2f88c"]]),U5e=r.defineAsyncComponent(()=>Promise.resolve().then(()=>bGe)),q5e=r.defineAsyncComponent(()=>Promise.resolve().then(()=>SGe)),K5e=r.defineAsyncComponent(()=>Promise.resolve().then(()=>AGe)),G5e=r.defineAsyncComponent(()=>Promise.resolve().then(()=>NGe)),W5e=r.defineAsyncComponent(()=>Promise.resolve().then(()=>LGe)),X5e=r.defineAsyncComponent(()=>Promise.resolve().then(()=>VGe)),Y5e={name:"ContentVuer",props:{entry:Object,visible:{type:Boolean,default:!0}},components:{Button:xu,ContentBar:SV,Flatmap:U5e,Iframe:q5e,MultiFlatmap:K5e,Plot:G5e,Scaffold:W5e,Simulation:X5e},methods:{flatmapProvenanceReady:function(e){var t;(t=this.$refs.contentBar)==null||t.setupFlatmapContextCard(e),this.entriesStore.updateMapForEntry(this.entry,e)},getId:function(){return this.entry.id},getState:function(){var e;return(e=this.$refs.viewer)==null?void 0:e.getState()},resourceSelected:function(e){this.$emit("resource-selected",e)},scaffoldViewClicked:function(e){var t;this.entry.viewUrl!==e?this.entriesStore.updateViewForEntry({id:this.entry.id,viewUrl:e}):(t=this.$refs.viewer)==null||t.updateWithViewUrl(e)},search:function(e){var t;return(t=this.$refs.viewer)==null?void 0:t.search(e)},searchSuggestions:function(e,t){var n;(n=this.$refs.viewer)==null||n.searchSuggestions(e,t)},setPanesBoundary:function(){var e;(e=this.$refs.contentBar)==null||e.setBoundary(this.$refs.container)},speciesChanged:function(e){this.activeSpecies=e,this.$emit("species-changed",e)},onResize:function(){var e;(e=this.$refs.viewer)==null||e.onResize()},onConnectivityItemClose:function(){var e;(e=this.$refs.viewer)==null||e.onConnectivityItemClose()},onConnectivitySourceChange:function(e,t){var n;(n=this.$refs.viewer)==null||n.changeConnectivitySource(e,t)},onFlatmapMarkerUpdate:function(){var e;(e=this.$refs.viewer)==null||e.flatmapMarkerUpdate()},onGlobalViewerSettingsUpdate:function(){var e;(e=this.$refs.viewer)==null||e.updateViewerSettings()},onHoverUpdate:function(e){var t;(t=this.$refs.viewer)==null||t.sidebarHoverHighlight(e)},onShowConnectivity:function(e){var t;(t=this.$refs.viewer)==null||t.showConnectivity(e)},onShowConnectivityTooltips:function(e){var t;(t=this.$refs.viewer)==null||t.showConnectivityTooltips(e)},onShowReferenceConnectivity:function(e){var t;(t=this.$refs.viewer)==null||t.showConnectivitiesByReference(e)},onSidebarAnnotationClose:function(){var e;(e=this.$refs.viewer)==null||e.onSidebarAnnotationClose()},onStartHelp:function(){var e;(e=this.$refs.viewer)==null||e.startHelp()},onFilterVisibility:function(e){var t;(t=this.$refs.viewer)==null||t.setVisibilityFilter(e)},onLoadConnectivityDetail:function(e){var t;(t=this.$refs.viewer)==null||t.getKnowledgeTooltip(e)},toggleMinimap:function(e,t){var n;(n=this.$refs.viewer)==null||n.toggleMinimap(e,t)}},data:function(){return{mouseHovered:!1,activeSpecies:"Rat"}},computed:{...Mt.mapStores(Of,Ss),viewerType(){switch(this.entry.type){case"Biolucida":case"Iframe":case"Segmentation":return"Iframe";default:return this.entry.type}}}},Z5e={class:"component-container",ref:"container"};function J5e(e,t,n,o,a,i){const s=SV;return r.openBlock(),r.createElementBlock("div",{class:"content-container",onMouseover:t[0]||(t[0]=l=>e.mouseHovered=!0),onMouseleave:t[1]||(t[1]=l=>e.mouseHovered=!1)},[r.createVNode(s,{class:"toolbar",entry:n.entry,ref:"contentBar",onChooserChanged:i.onResize,onScaffoldViewClicked:i.scaffoldViewClicked,onVnodeMounted:i.setPanesBoundary},null,8,["entry","onChooserChanged","onScaffoldViewClicked","onVnodeMounted"]),r.createElementVNode("div",Z5e,[(r.openBlock(),r.createBlock(r.Suspense,null,{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.viewerType),{entry:n.entry,mouseHovered:e.mouseHovered,visible:n.visible,lazy:!0,ref:"viewer",onFlatmapProvenanceReady:i.flatmapProvenanceReady,onResourceSelected:i.resourceSelected,onSpeciesChanged:i.speciesChanged},null,40,["entry","mouseHovered","visible","onFlatmapProvenanceReady","onResourceSelected","onSpeciesChanged"]))]),_:1}))],512)],32)}const EV=tr(Y5e,[["render",J5e],["__scopeId","data-v-e2441ebd"]]);var _V={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(typeof window<"u"?window:Jte,function(){if(typeof window>"u")return null;var n=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),o=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||function(u){return n.setTimeout(u,20)},a=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||function(u){n.clearTimeout(u)};function i(u,f){var h=Object.prototype.toString.call(u),m=h==="[object Array]"||h==="[object NodeList]"||h==="[object HTMLCollection]"||h==="[object Object]"||typeof jQuery<"u"&&u instanceof jQuery||typeof Elements<"u"&&u instanceof Elements,p=0,g=u.length;if(m)for(;p<g;p++)f(u[p]);else f(u)}function s(u){if(!u.getBoundingClientRect)return{width:u.offsetWidth,height:u.offsetHeight};var f=u.getBoundingClientRect();return{width:Math.round(f.width),height:Math.round(f.height)}}function l(u,f){Object.keys(f).forEach(function(h){u.style[h]=f[h]})}var c=function(u,f){var h=0;function m(){var g=[];this.add=function(b){g.push(b)};var v,y;this.call=function(b){for(v=0,y=g.length;v<y;v++)g[v].call(this,b)},this.remove=function(b){var x=[];for(v=0,y=g.length;v<y;v++)g[v]!==b&&x.push(g[v]);g=x},this.length=function(){return g.length}}function p(g,v){if(g){if(g.resizedAttached){g.resizedAttached.add(v);return}g.resizedAttached=new m,g.resizedAttached.add(v),g.resizeSensor=document.createElement("div"),g.resizeSensor.dir="ltr",g.resizeSensor.className="resize-sensor";var y={pointerEvents:"none",position:"absolute",left:"0px",top:"0px",right:"0px",bottom:"0px",overflow:"hidden",zIndex:"-1",visibility:"hidden",maxWidth:"100%"},b={position:"absolute",left:"0px",top:"0px",transition:"0s"};l(g.resizeSensor,y);var x=document.createElement("div");x.className="resize-sensor-expand",l(x,y);var w=document.createElement("div");l(w,b),x.appendChild(w);var k=document.createElement("div");k.className="resize-sensor-shrink",l(k,y);var C=document.createElement("div");l(C,b),l(C,{width:"200%",height:"200%"}),k.appendChild(C),g.resizeSensor.appendChild(x),g.resizeSensor.appendChild(k),g.appendChild(g.resizeSensor);var S=window.getComputedStyle(g),E=S?S.getPropertyValue("position"):null;E!=="absolute"&&E!=="relative"&&E!=="fixed"&&E!=="sticky"&&(g.style.position="relative");var _=!1,$=0,A=s(g),F=0,N=0,M=!0;h=0;var I=function(){var Y=g.offsetWidth,G=g.offsetHeight;w.style.width=Y+10+"px",w.style.height=G+10+"px",x.scrollLeft=Y+10,x.scrollTop=G+10,k.scrollLeft=Y+10,k.scrollTop=G+10},T=function(){if(M){var Y=g.offsetWidth===0&&g.offsetHeight===0;if(Y){h||(h=o(function(){h=0,T()}));return}else M=!1}I()};g.resizeSensor.resetSensor=T;var L=function(){$=0,_&&(F=A.width,N=A.height,g.resizedAttached&&g.resizedAttached.call(A))},R=function(){A=s(g),_=A.width!==F||A.height!==N,_&&!$&&($=o(L)),T()},V=function(Y,G,Q){Y.attachEvent?Y.attachEvent("on"+G,Q):Y.addEventListener(G,Q)};V(x,"scroll",R),V(k,"scroll",R),h=o(function(){h=0,T()})}}i(u,function(g){p(g,f)}),this.detach=function(g){h||(a(h),h=0),c.detach(u,g)},this.reset=function(){u.resizeSensor.resetSensor()}};if(c.reset=function(u){i(u,function(f){f.resizeSensor.resetSensor()})},c.detach=function(u,f){i(u,function(h){h&&(h.resizedAttached&&typeof f=="function"&&(h.resizedAttached.remove(f),h.resizedAttached.length())||h.resizeSensor&&(h.contains(h.resizeSensor)&&h.removeChild(h.resizeSensor),delete h.resizeSensor,delete h.resizedAttached))})},typeof MutationObserver<"u"){var d=new MutationObserver(function(u){for(var f in u)if(u.hasOwnProperty(f))for(var h=u[f].addedNodes,m=0;m<h.length;m++)h[m].resizeSensor&&c.reset(h[m])});document.addEventListener("DOMContentLoaded",function(u){d.observe(document.body,{childList:!0,subtree:!0})})}return c})})(_V);var Q5e=_V.exports;const e$e=a3(Q5e),t$e={name:"ResizeSensor",methods:{activate:function(){this._sensor||(this._sensor=new e$e(this.$refs.display,this.displayResize),this.displayResize())},deactivate:function(){this._sensor&&(this._sensor.detach(this.$refs.display,this.displayResize),delete this._sensor,this._sensor=void 0,this.displayResize())},displayResize:function(){this.$emit("resize")}},unmounted(){this.deactivate()},activated(){this.activate()},deactivated(){this.deactivate()},mounted:function(){this.activate()}},n$e={style:{height:"100%",width:"100%",position:"absolute"},ref:"display"};function r$e(e,t,n,o,a,i){return r.openBlock(),r.createElementBlock("div",n$e,null,512)}const $V=tr(t$e,[["render",r$e]]),o$e={name:"splitpanes",emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click"],props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((e,t)=>(e[t.id]=t)&&e,{})}},methods:{updatePaneComponents(){this.panes.forEach(e=>{e.update&&e.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[e.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(e,t){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=t},onMouseMove(e){this.touch.mouseDown&&(e.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(e)),this.$emit("resize",this.panes.map(t=>({min:t.min,max:t.max,size:t.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(e,t){"ontouchstart"in window&&(e.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===t?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(e,t),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=t,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[t])},onSplitterDblClick(e,t){let n=0;this.panes=this.panes.map((o,a)=>(o.size=a===t?o.max:o.min,a!==t&&(n+=o.min),o)),this.panes[t].size-=n,this.$emit("pane-maximize",this.panes[t]),this.$emit("resized",this.panes.map(o=>({min:o.min,max:o.max,size:o.size})))},onPaneClick(e,t){this.$emit("pane-click",this.indexedPanes[t])},getCurrentMouseDrag(e){const t=this.container.getBoundingClientRect(),{clientX:n,clientY:o}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:n-t.left,y:o-t.top}},getCurrentDragPercentage(e){e=e[this.horizontal?"y":"x"];const t=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(e=t-e),e*100/t},calculatePanesSize(e){const t=this.touch.activeSplitter;let n={prevPanesSize:this.sumPrevPanesSize(t),nextPanesSize:this.sumNextPanesSize(t),prevReachedMinPanes:0,nextReachedMinPanes:0};const o=0+(this.pushOtherPanes?0:n.prevPanesSize),a=100-(this.pushOtherPanes?0:n.nextPanesSize),i=Math.max(Math.min(this.getCurrentDragPercentage(e),a),o);let s=[t,t+1],l=this.panes[s[0]]||null,c=this.panes[s[1]]||null;const d=l.max<100&&i>=l.max+n.prevPanesSize,u=c.max<100&&i<=100-(c.max+this.sumNextPanesSize(t+1));if(d||u){d?(l.size=l.max,c.size=Math.max(100-l.max-n.prevPanesSize-n.nextPanesSize,0)):(l.size=Math.max(100-c.max-n.prevPanesSize-this.sumNextPanesSize(t+1),0),c.size=c.max);return}if(this.pushOtherPanes){const f=this.doPushOtherPanes(n,i);if(!f)return;({sums:n,panesToResize:s}=f),l=this.panes[s[0]]||null,c=this.panes[s[1]]||null}l!==null&&(l.size=Math.min(Math.max(i-n.prevPanesSize-n.prevReachedMinPanes,l.min),l.max)),c!==null&&(c.size=Math.min(Math.max(100-i-n.nextPanesSize-n.nextReachedMinPanes,c.min),c.max))},doPushOtherPanes(e,t){const n=this.touch.activeSplitter,o=[n,n+1];return t<e.prevPanesSize+this.panes[o[0]].min&&(o[0]=this.findPrevExpandedPane(n).index,e.prevReachedMinPanes=0,o[0]<n&&this.panes.forEach((a,i)=>{i>o[0]&&i<=n&&(a.size=a.min,e.prevReachedMinPanes+=a.min)}),e.prevPanesSize=this.sumPrevPanesSize(o[0]),o[0]===void 0)?(e.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((a,i)=>{i>0&&i<=n&&(a.size=a.min,e.prevReachedMinPanes+=a.min)}),this.panes[o[1]].size=100-e.prevReachedMinPanes-this.panes[0].min-e.prevPanesSize-e.nextPanesSize,null):t>100-e.nextPanesSize-this.panes[o[1]].min&&(o[1]=this.findNextExpandedPane(n).index,e.nextReachedMinPanes=0,o[1]>n+1&&this.panes.forEach((a,i)=>{i>n&&i<o[1]&&(a.size=a.min,e.nextReachedMinPanes+=a.min)}),e.nextPanesSize=this.sumNextPanesSize(o[1]-1),o[1]===void 0)?(e.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((a,i)=>{i<this.panesCount-1&&i>=n+1&&(a.size=a.min,e.nextReachedMinPanes+=a.min)}),this.panes[o[0]].size=100-e.prevPanesSize-e.nextReachedMinPanes-this.panes[this.panesCount-1].min-e.nextPanesSize,null):{sums:e,panesToResize:o}},sumPrevPanesSize(e){return this.panes.reduce((t,n,o)=>t+(o<e?n.size:0),0)},sumNextPanesSize(e){return this.panes.reduce((t,n,o)=>t+(o>e+1?n.size:0),0)},findPrevExpandedPane(e){return[...this.panes].reverse().find(t=>t.index<e&&t.size>t.min)||{}},findNextExpandedPane(e){return this.panes.find(t=>t.index>e+1&&t.size>t.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(e=>{const t=e.classList.contains("splitpanes__pane"),n=e.classList.contains("splitpanes__splitter");!t&&!n&&(e.parentNode.removeChild(e),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))})},addSplitter(e,t,n=!1){const o=e-1,a=document.createElement("div");a.classList.add("splitpanes__splitter"),n||(a.onmousedown=i=>this.onMouseDown(i,o),typeof window<"u"&&"ontouchstart"in window&&(a.ontouchstart=i=>this.onMouseDown(i,o)),a.onclick=i=>this.onSplitterClick(i,o+1)),this.dblClickSplitter&&(a.ondblclick=i=>this.onSplitterDblClick(i,o+1)),t.parentNode.insertBefore(a,t)},removeSplitter(e){e.onmousedown=void 0,e.onclick=void 0,e.ondblclick=void 0,e.parentNode.removeChild(e)},redoSplitters(){const e=Array.from(this.container.children);e.forEach(n=>{n.className.includes("splitpanes__splitter")&&this.removeSplitter(n)});let t=0;e.forEach(n=>{n.className.includes("splitpanes__pane")&&(!t&&this.firstSplitter?this.addSplitter(t,n,!0):t&&this.addSplitter(t,n),t++)})},requestUpdate({target:e,...t}){const n=this.indexedPanes[e._.uid];Object.entries(t).forEach(([o,a])=>n[o]=a)},onPaneAdd(e){let t=-1;Array.from(e.$el.parentNode.children).some(a=>(a.className.includes("splitpanes__pane")&&t++,a===e.$el));const n=parseFloat(e.minSize),o=parseFloat(e.maxSize);this.panes.splice(t,0,{id:e._.uid,index:t,min:isNaN(n)?0:n,max:isNaN(o)?100:o,size:e.size===null?null:parseFloat(e.size),givenSize:e.size,update:e.update}),this.panes.forEach((a,i)=>a.index=i),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[t]}),this.$emit("pane-add",{index:t,panes:this.panes.map(a=>({min:a.min,max:a.max,size:a.size}))})})},onPaneRemove(e){const t=this.panes.findIndex(o=>o.id===e._.uid),n=this.panes.splice(t,1)[0];this.panes.forEach((o,a)=>o.index=a),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:t}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map(o=>({min:o.min,max:o.max,size:o.size}))})})},resetPaneSizes(e={}){!e.addedPane&&!e.removedPane?this.initialPanesSizing():this.panes.some(t=>t.givenSize!==null||t.min||t.max<100)?this.equalizeAfterAddOrRemove(e):this.equalize(),this.ready&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size})))},equalize(){const e=100/this.panesCount;let t=0;const n=[],o=[];this.panes.forEach(a=>{a.size=Math.max(Math.min(e,a.max),a.min),t-=a.size,a.size>=a.max&&n.push(a.id),a.size<=a.min&&o.push(a.id)}),t>.1&&this.readjustSizes(t,n,o)},initialPanesSizing(){let e=100;const t=[],n=[];let o=0;this.panes.forEach(i=>{e-=i.size,i.size!==null&&o++,i.size>=i.max&&t.push(i.id),i.size<=i.min&&n.push(i.id)});let a=100;e>.1&&(this.panes.forEach(i=>{i.size===null&&(i.size=Math.max(Math.min(e/(this.panesCount-o),i.max),i.min)),a-=i.size}),a>.1&&this.readjustSizes(e,t,n))},equalizeAfterAddOrRemove({addedPane:e,removedPane:t}={}){let n=100/this.panesCount,o=0;const a=[],i=[];e&&e.givenSize!==null&&(n=(100-e.givenSize)/(this.panesCount-1)),this.panes.forEach(s=>{o-=s.size,s.size>=s.max&&a.push(s.id),s.size<=s.min&&i.push(s.id)}),!(Math.abs(o)<.1)&&(this.panes.forEach(s=>{e&&e.givenSize!==null&&e.id===s.id||(s.size=Math.max(Math.min(n,s.max),s.min)),o-=s.size,s.size>=s.max&&a.push(s.id),s.size<=s.min&&i.push(s.id)}),o>.1&&this.readjustSizes(o,a,i))},readjustSizes(e,t,n){let o;e>0?o=e/(this.panesCount-t.length):o=e/(this.panesCount-n.length),this.panes.forEach((a,i)=>{if(e>0&&!t.includes(a.id)){const s=Math.max(Math.min(a.size+o,a.max),a.min),l=s-a.size;e-=l,a.size=s}else if(!n.includes(a.id)){const s=Math.max(Math.min(a.size+o,a.max),a.min),l=s-a.size;e-=l,a.size=s}a.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[a.id].size}%`})}),Math.abs(e)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(e){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((t,n)=>{t.ondblclick=e?o=>this.onSplitterDblClick(o,n):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.$emit("ready"),this.ready=!0},render(){return r.h("div",{ref:"container",class:["splitpanes",`splitpanes--${this.horizontal?"horizontal":"vertical"}`,{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}},a$e=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n},i$e={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:null},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(e){this.style=e}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(e){this.requestUpdate({target:this,size:e})},minSizeNumber(e){this.requestUpdate({target:this,min:e})},maxSizeNumber(e){this.requestUpdate({target:this,max:e})}}};function s$e(e,t,n,o,a,i){return r.openBlock(),r.createElementBlock("div",{class:"splitpanes__pane",onClick:t[0]||(t[0]=s=>i.onPaneClick(s,e._.uid)),style:r.normalizeStyle(e.style)},[r.renderSlot(e.$slots,"default")],4)}const l$e={name:"CustomSplitter",components:{Splitpanes:o$e,Pane:a$e(i$e,[["render",s$e]]),ResizeSensor:$V},props:{index:{type:String,default:function(){return"split-1"}}},methods:{requestStylesUpdate:function(e){if(this.$refs&&e in this.$refs&&this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].$el){const n=this.$refs[e][0].$el.getBoundingClientRect();$e.emit("PaneResize",{refName:e,rect:n})}},calculateStyles:function(e){this.$refs&&(e.startsWith("pane")?this.requestStylesUpdate(e):e.startsWith("split")&&this.customLayout[e].children.forEach(t=>{t.startsWith("pane")&&this.requestStylesUpdate(t)}))},childUnmounted:function(e){$e.emit("PaneUnmounted",{refName:e})}},computed:{...Mt.mapStores(Ss),children(){return this.customLayout[this.index].children},customLayout(){return this.splitFlowStore.customLayout},isHorizontal(){return this.customLayout[this.index].horizontal}}},c$e={style:{height:"100%",width:"100%"}};function d$e(e,t,n,o,a,i){const s=$V,l=r.resolveComponent("custom-splitter",!0),c=r.resolveComponent("pane"),d=r.resolveComponent("splitpanes");return r.openBlock(),r.createElementBlock("div",c$e,[r.createVNode(s,{onResize:t[0]||(t[0]=u=>i.calculateStyles(n.index))}),r.createVNode(d,{class:"default-theme",horizontal:i.isHorizontal,"dbl-click-splitter":!1},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.children,u=>(r.openBlock(),r.createBlock(c,{key:u,ref_for:!0,ref:u,onVnodeBeforeUnmount:f=>i.childUnmounted(u)},{default:r.withCtx(()=>[i.customLayout[u].content?(r.openBlock(),r.createBlock(s,{key:0,onResize:f=>i.calculateStyles(u)},null,8,["onResize"])):(r.openBlock(),r.createBlock(l,{key:u,index:u},null,8,["index"]))]),_:2},1032,["onVnodeBeforeUnmount"]))),128))]),_:1},8,["horizontal"])])}const FV=tr(l$e,[["render",d$e],["__scopeId","data-v-0667e71f"]]),AV=Mt.defineStore("connectivities",{state:()=>({activeConnectivityKeys:[],globalConnectivities:{},filterOptions:{},filterSources:{}}),getters:{getUniqueConnectivitiesByKeys:e=>{const t=e.activeConnectivityKeys.reduce((n,o)=>{const a=e.globalConnectivities[o];if(!a)return n;for(const i of a){const s=i.id;n[s]=n[s]?{...n[s],...i}:{...i}}return n},{});return Object.values(t).sort((n,o)=>n.label.localeCompare(o.label))},getUniqueFilterOptionsByKeys:e=>{const t=e.activeConnectivityKeys.reduce((n,o)=>{const a=e.filterOptions[o];if(!a)return n;for(const i of a)if(n[i.key]){const s=[...n[i.key].children,...i.children],l=Array.from(new Map(s.map(c=>[c.key,c])).values());n[i.key].children=l}else n[i.key]={...i};return n},{});return Object.values(t)},getUniqueFilterSourcesByKeys:e=>e.activeConnectivityKeys.reduce((n,o)=>{const a=e.filterSources[o];if(!a)return n;for(const[i,s]of Object.entries(a)){n[i]||(n[i]={});for(const[l,c]of Object.entries(s))n[i][l]=n[i][l]?Array.from(new Set([...n[i][l],...c])):[...c]}return n},{})},actions:{updateActiveConnectivityKeys(e){this.activeConnectivityKeys=e},updateGlobalConnectivities(e){this.globalConnectivities=e},updateFilterOptions(e){this.filterOptions=e},updateFilterSources(e){this.filterSources=e}}}),u$e={name:"SplitDialog",components:{ContentVuer:EV,CustomSplitter:FV},props:{entries:{type:Array,default:function(){return[]}}},data:function(){return{styles:{},query:"",filter:[]}},methods:{resourceSelected:function(e){this.$emit("resource-selected",e)},speciesChanged:function(e){this.$emit("species-changed",e)},getClass:function(e){return this.isIdVisible(e)?this.getRefsName(e):"inactive"},getRefsName:function(e){const t=this.splitFlowStore.getPaneNameById(e);return t&&(t in this.styles||(this.styles[t]={})),t},getStyle:function(e){const t=this.getRefsName(e);return t&&t in this.styles&&this.styles[t]?this.styles[t]:{}},getActiveContents:function(){const e=[],t=this.$refs.content;return t&&t.forEach(n=>{n.visible&&e.push(n)}),e},isIdVisible:function(e){const t=this.splitFlowStore.getPaneNameById(e);let n=!1;return t!==void 0&&(n=this.splitFlowStore.isPaneActive(t)),n},getContentsWithId:function(e){let t=this.$refs.content;for(let n=0;n<t.length;n++)if(t[n].getId()==e)return t[n]},getContentsState:function(){let e=[],t=this.$refs.content;for(let n=0;n<t.length;n++)e.push(t[n].getState());return e},setStyles:function(e,t){if(this.$refs&&this.$refs.tabContainer){const n=this.$refs.tabContainer.getBoundingClientRect(),o={};o.width=`${t.width}px`,o.left=`${t.left-n.left}px`,o.height=`${t.height}px`,o.top=`${t.top-n.top}px`,o.display="block",this.styles[e]=o}},hidePane:function(e){if(this.$refs&&"tabContainer"in this.$refs){const t={};t.display="none",this.styles[e]=t}},resize:function(){this.__userResize__=!0},resized:function(e,t){this.__userResize__&&this.splitFlowStore.setSplitter({name:e,value:t[0].size}),this.__userResize__=!1},onSpeciesLayoutConnectivityUpdate:function(){let e=this.splitFlowStore.getActivePaneIds();const t=[307,"307"],n=Object.keys(this.connectivitiesStore.globalConnectivities).find(a=>a.includes("sckan")),o=Array.from(new Set(this.entries.filter(a=>e.includes(a.id)&&(a.uuid&&(a.type==="Flatmap"||a.type==="MultiFlatmap")||a.type==="Scaffold"&&a.resource&&(a.isBodyScaffold||t.includes(a.discoverId)))).map(a=>{if(a.type==="Flatmap"||a.type==="MultiFlatmap")return a.uuid;if(a.type==="Scaffold")return a.resource})));if(o.length){this.connectivitiesStore.updateActiveConnectivityKeys(o);const a=this.connectivitiesStore.getUniqueFilterOptionsByKeys;$e.emit("connectivity-filter-options",a)}else{const a=this.connectivitiesStore.globalConnectivities[n]||[];$e.emit("connectivity-knowledge",{data:a,highlight:[],processed:!1}),$e.emit("connectivity-filter-options",[]),this.connectivitiesStore.updateActiveConnectivityKeys([n])}},getGeneralSearchedId:function(e,t,n="query"){const o=[];return e.forEach(a=>{let i=[JSON.stringify(a["nerve-label"])];(n="query")&&(i=[...i,a.id,a.label,a["long-label"],JSON.stringify(a.nerves)]),i.some(l=>l==null?void 0:l.toLowerCase().includes(t.toLowerCase()))&&!o.includes(a.id)&&o.push(a.id)}),o},getFlatmapSearchedId:function(e,t){const n=[],o=e.mapImp.search(t);return(o.__featureIds||o.featureIds).forEach(i=>{const s=e.mapImp.annotation(i);[s.id,s.name,s.label,s.models,s.source].some(d=>d&&d.toLowerCase().includes(t.toLowerCase()))&&s.models&&!n.includes(s.models)&&n.push(s.models)}),n},getLatestFlatmapUUID:async function(e,t){return(await(await fetch(e)).json()).filter(s=>s.id===t).sort((s,l)=>l.created.localeCompare(s.created))[0].uuid},connectivityQueryFilter:async function(e){this.query="",this.filter=[];const t=this.getActiveContents(),n=this.settingsStore.flatmapAPI,o=[],a=[];let i=[],s=!1,l=[],c=[],d="";const u=this.connectivitiesStore.getUniqueFilterOptionsByKeys,f=this.connectivitiesStore.getUniqueFilterSourcesByKeys;let h=this.connectivitiesStore.getUniqueConnectivitiesByKeys;for(const b of t){const x=b.$refs.viewer;if(x){const w=x.$refs.multiflatmap,k=x.$refs.flatmap,C=x.$refs.scaffold,S=x.$refs.iframe,E=x.$refs.plot,_=x.$refs.simulation;let $=null;if(w){const F=w.getCurrentFlatmap();F&&F.mapImp&&($=F,d=$.mapImp.uuid)}else k&&k.mapImp?($=k,d=$.mapImp.uuid):($=C||S||E||_,d=await this.getLatestFlatmapUUID(n,"human-flatmap_male"));const A=k||w;if(e){if(this.query=e.query,e.query){const T=this.query.replace(/["']/g,"").split(",").map(V=>V.trim()).filter(V=>V),L=[];for(let V=0;V<T.length;V++)A?L.push(this.getFlatmapSearchedId($,T[V])):L.push(this.getGeneralSearchedId(h,T[V],"query"));const R=[...new Set(L.flat())];if(R.length){o.push(...R);const V=A?await e9(n,d,R):R;l.push(...V)}}const F={origins:[],vias:[],destinations:[],all:[]};let N={};if(C&&x.syncFilter(e.filter),e.filter.forEach(T=>{var V,Y;const L=T.facetPropPath.split(".").pop(),R=T.facetPropPath.includes("flatmap.connectivity.source");if(R&&((V=T.facet)==null?void 0:V.toLowerCase())!=="show all"){const G=T.facet.replace(",[",", ["),Q=T.facetPropPath.split(".").pop();if(Q==="origin")F.origins.push(G);else if(Q==="destination")F.destinations.push(G);else if(Q==="via")F.vias.push(G);else{const ne=JSON.parse(G).flat(1/0);F.all.push(...ne)}}if(C)!R&&((Y=T.facet)==null?void 0:Y.toLowerCase())!=="show all"&&(L in N||(N[L]=[]),N[L].push(...this.getGeneralSearchedId(h,T.facet,"facet")));else if(A&&!R){const G=u.find(Q=>Q.key.includes(L));G&&G.children.forEach(Q=>{if(Q.label.toLowerCase()===T.facet.toLowerCase()&&Q.key){const ne=Q.key.split(".").pop();L in N||(N[L]=[]),N[L].push(...f[L][ne])}})}}),F.origins.length||F.destinations.length||F.vias.length){const T={flatmapAPI:n,knowledgeSource:d,origins:F.origins,destinations:F.destinations,vias:F.vias};"ovd"in N||(N.ovd=[]),N.ovd.push(...await QSe(T))}else F.all.length&&("all"in N||(N.all=[]),N.all.push(...await e9(n,d,F.all)));const M=Object.values(N);this.filter=[...this.filter,...M];const I=this.filter.length?this.filter.reduce((T,L)=>T.filter(R=>L.includes(R))):[];c.push(...I)}}}let m;this.query&&!this.filter.length?m=l:!this.query&&this.filter.length?m=c:this.query&&this.filter.length&&(m=l.filter(b=>c.includes(b))),m&&(i.push(...m),h=h.filter(b=>m.includes(b.id)),s=!0),a.push(...h);const p=[...new Set(o)],g=[...new Set(i)];let v=Array.from(new Map(a.map(b=>[b.id,b])).values());v=[...v.filter(b=>p.includes(b.id)),...v.filter(b=>!p.includes(b.id))];const y={data:v,highlight:g,processed:s};$e.emit("connectivity-knowledge",y)},updateFlatmapMinimap:function(){const e=this.splitFlowStore.getActivePaneIds();let t=this.$refs.content,n=[];for(let i=0;i<t.length;i++)t[i].viewerType==="MultiFlatmap"&&n.push(t[i]);n.sort((i,s)=>s.visible-i.visible);const o=!(e.length>4),a=this.settingsStore.displayMinimap;this.settingsStore.updateDisplayMinimap(o),n.forEach(i=>{i.toggleMinimap(o,a)})}},computed:{...Mt.mapStores(Ss,AV,vi),horizontal(){return this.splitFlowStore.activeView==="2horpanel"},splitters(){return this.splitFlowStore.splitters}},mounted:function(){$e.on("PaneResize",e=>{this.setStyles(e.refName,e.rect),this.updateFlatmapMinimap()}),$e.on("PaneUnmounted",e=>{this.hidePane(e.refName)}),$e.on("species-layout-connectivity-update",()=>{this.onSpeciesLayoutConnectivityUpdate()}),$e.on("connectivity-query-filter",e=>{this.connectivityQueryFilter(e)}),$e.on("hoverUpdate",e=>{this.getActiveContents().forEach(n=>{n.onHoverUpdate(e)})}),$e.on("startHelp",()=>{this.getActiveContents().forEach(t=>{t.onStartHelp()})}),$e.on("connectivity-item-close",()=>{this.getActiveContents().forEach(t=>{t.onConnectivityItemClose()})}),$e.on("sidebar-annotation-close",()=>{this.getActiveContents().forEach(t=>{t.onSidebarAnnotationClose()})}),$e.on("globalViewerSettingsUpdate",()=>{this.$refs.content.forEach(t=>{t.onGlobalViewerSettingsUpdate()})}),$e.on("markerUpdate",()=>{this.$refs.content.forEach(t=>{t.onFlatmapMarkerUpdate()})}),$e.on("connectivity-hovered",e=>{this.getActiveContents().forEach(n=>{n.onShowConnectivityTooltips(e)})}),$e.on("connectivity-source-change",e=>{const t=this.getActiveContents(),n=[];t.forEach(o=>{o.onConnectivitySourceChange(e,n)})}),$e.on("show-connectivity",e=>{this.getActiveContents().forEach(n=>{n.onShowConnectivity(e)})}),$e.on("show-reference-connectivities",e=>{this.getActiveContents().forEach(n=>{n.onShowReferenceConnectivity(e)})}),$e.on("filter-visibility",e=>{this.getActiveContents().forEach(n=>{n.onFilterVisibility(e)})})}},f$e={class:"tab-container",ref:"tabContainer"};function p$e(e,t,n,o,a,i){const s=FV,l=EV;return r.openBlock(),r.createElementBlock("div",f$e,[r.createVNode(s,{index:"split-1",key:"split-1"}),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.entries,c=>(r.openBlock(),r.createElementBlock("div",{key:c.id,style:r.normalizeStyle(i.getStyle(c.id)),class:r.normalizeClass([i.getClass(c.id),"contentvuer"])},[(r.openBlock(),r.createBlock(l,{key:c.id,entry:c,ref_for:!0,ref:"content",onResourceSelected:i.resourceSelected,onSpeciesChanged:i.speciesChanged,visible:i.isIdVisible(c.id)},null,8,["entry","onResourceSelected","onSpeciesChanged","visible"]))],6))),128))],512)}const BV=tr(u$e,[["render",p$e],["__scopeId","data-v-9572e54d"]]),h$e={name:"SearchControls",props:{failedSearch:void 0},components:{Autocomplete:ZF,MapSvgIcon:OS},methods:{fetchSuggestions:function(e,t){e===""?t([]):this.$emit("fetch-suggestions",{term:e,cb:t})}},data:function(){return{searchText:""}}},m$e=e=>(r.pushScopeId("data-v-eb3db1ae"),e=e(),r.popScopeId(),e),g$e={class:"search-container"},y$e=m$e(()=>r.createElementVNode("div",{class:"text search-text"}," Search within display ",-1)),v$e={key:0,class:"text not-found-text"};function b$e(e,t,n,o,a,i){const s=ZF,l=r.resolveComponent("map-svg-icon");return r.openBlock(),r.createElementBlock("div",g$e,[y$e,r.createVNode(s,{class:"search-box",placeholder:"Search",modelValue:e.searchText,"onUpdate:modelValue":t[0]||(t[0]=c=>e.searchText=c),"fetch-suggestions":i.fetchSuggestions,onKeyup:t[1]||(t[1]=r.withKeys(c=>e.$emit("search",e.searchText),["enter"])),onSelect:t[2]||(t[2]=c=>e.$emit("search",c.value)),teleported:!1,"popper-class":"autocomplete-popper"},null,8,["modelValue","fetch-suggestions"]),r.createVNode(l,{icon:"magnifyingGlass",class:"magnify",onClick:t[3]||(t[3]=c=>e.$emit("search",e.searchText))}),n.failedSearch?(r.openBlock(),r.createElementBlock("div",v$e," '"+r.toDisplayString(n.failedSearch)+"' not found ",1)):r.createCommentVNode("",!0)])}const TV=tr(h$e,[["render",b$e],["__scopeId","data-v-eb3db1ae"]]),w$e={name:"DialogToolbarContent",components:{Button:xu,Checkbox:f3,Col:k3,Icon:Un,Input:mh,Popover:$h,Radio:b3,RadioGroup:w3,Row:Ch,MapSvgIcon:OS,MapSvgSpriteColor:yV,SearchControls:TV,ElIconCopyDocument:Z1},props:{numberOfEntries:{type:Number,default:0},showIcons:{type:Boolean,default:!1}},inject:["showGlobalSettings"],computed:{...Mt.mapStores(Of,vi,Ss),activeView(){return this.splitFlowStore.activeView},helpDelay(){return this.settingsStore.helpDelay},shareLink(){return this.settingsStore.shareLink},offlineAnnotationEnabled(){return this.settingsStore.offlineAnnotationEnabled},viewIcons(){return this.splitFlowStore.viewIcons}},watch:{shareLink:function(){this.loadingLink=!1}},data:function(){return{activeViewRef:void 0,displayShareOptions:!1,ElIconCopyDocument:r.shallowRef(Z1),exportAnnotation:!1,failedSearch:void 0,globalSettings:{},globalSettingRef:void 0,isFullscreen:!1,loadingLink:!0,permalinkRef:void 0,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 feature and viewing its associated network connections",Annotation:["View feature annotations","Add, comment on and view feature annotations"]},authorisedUser:!1,mapLoaded:!1}},methods:{loadGlobalSettings:function(){this.globalSettings={...this.globalSettings,...this.settingsStore.globalSettings}},updateViewingMode:function(e,t){const{target:n}=e;n.closest(".el-checkbox")||(this.globalSettings.viewingMode=t,t==="Exploration"?(this.globalSettings.displayMarkers=!0,this.globalSettings.interactiveMode="dataset"):t==="Annotation"?(this.globalSettings.displayMarkers=!1,this.globalSettings.interactiveMode="dataset"):(this.globalSettings.displayMarkers=!1,this.globalSettings.interactiveMode="connectivity"),this.updateGlobalSettings("viewingMode"))},updateGlobalSettings:function(e){const t=this.settingsStore.getUpdatedGlobalSettingsKey(this.globalSettings);this.settingsStore.updateGlobalSettings(this.globalSettings),t.includes("displayMarkers")&&$e.emit("markerUpdate"),t.includes("interactiveMode")&&$e.emit("modeUpdate",this.globalSettings.interactiveMode),(t.includes("viewingMode")||t.includes("connectionType")||t.includes("flightPathDisplay")||t.includes("organsDisplay")||t.includes("outlinesDisplay")||t.includes("backgroundDisplay"))&&$e.emit("globalViewerSettingsUpdate");let n=this.globalSettings[e];e==="flightPathDisplay"&&(n=this.globalSettings.flightPathDisplay?"3D":"2D"),e==="organsDisplay"&&(n=this.globalSettings.organsDisplay?"Color":"Grayscale"),e==="outlinesDisplay"&&(n=this.globalSettings.outlinesDisplay?"Show":"Hide"),t.length&&Bt.sendEvent({event:"interaction_event",event_name:`portal_maps_settings_${e}`,category:n,location:"map_toolbar"})},titleClicked:function(e){this.$emit("titleClicked",e)},startHelp:function(){$e.emit("startHelp"),Bt.sendEvent({event:"interaction_event",event_name:"portal_maps_toolbar_help",category:"help_mode_start",location:"map_toolbar"})},onFullscreen:function(){this.$emit("onFullscreen"),this.isFullscreen=!this.isFullscreen,this.isFullscreen&&Bt.sendEvent({event:"interaction_event",event_name:"portal_maps_toolbar_fullscreen",category:this.isFullscreen?"enter":"exit",location:"map_toolbar"})},onFullscreenEsc:function(){document.fullscreenElement||(this.isFullscreen=!1,Bt.sendEvent({event:"interaction_event",event_name:"portal_maps_toolbar_fullscreen",category:this.isFullscreen?"enter":"exit",location:"map_toolbar"}))},close:function(){this.$emit("close")},copyShareLink:function(){document&&(this.$refs.linkInput.$el.querySelector("input").select(),document.execCommand("copy"),Bt.sendEvent({event:"interaction_event",event_name:"portal_maps_permalink",category:"permalink_copy",location:"map_toolbar"}))},setFailedSearch:function(e){this.failedSearch=e},requestShareLink:function(){sessionStorage.getItem("anonymous-annotation")?this.displayShareOptions=!0:this.getShareLink(!1)},getShareLink:function(e){this.displayShareOptions=!1,this.loadingLink=!0,$e.emit("updateShareLinkRequested",e),Bt.sendEvent({event:"interaction_event",event_name:"portal_maps_permalink",category:"permalink_generate",location:"map_toolbar"})},viewClicked:function(e){const t=this.activeView;if(this.splitFlowStore.updateActiveView({view:e,entries:this.entriesStore.entries}),e!==t){const n=this.viewIcons.find(o=>o.icon===e);Bt.sendEvent({event:"interaction_event",event_name:"portal_maps_toolbar_split_view",category:(n==null?void 0:n.name)||"",location:"map_toolbar"})}this.$refs.viewPopover&&this.$refs.viewPopover.hide()}},mounted:function(){this.activeViewRef=r.shallowRef(this.$refs.activeViewRef),this.permalinkRef=r.shallowRef(this.$refs.permalinkRef),this.globalSettingRef=r.shallowRef(this.$refs.globalSettingRef),$e.on("mapLoaded",e=>{this.mapLoaded=!0}),document.addEventListener("fullscreenchange",this.onFullscreenEsc),this.loadGlobalSettings()},unmounted:function(){document.removeEventListener("fullscreenchange",this.onFullscreenEsc)}},ea=e=>(r.pushScopeId("data-v-1cc10ca9"),e=e(),r.popScopeId(),e),x$e={class:"header"},k$e={class:"viewing-mode-selector"},C$e={class:"el-dropdown-link"},S$e={class:"toolbar-dropdown-badge"},E$e=ea(()=>r.createElementVNode("h4",null,"Viewing Mode:",-1)),_$e={class:"el-option__description"},$$e={key:0,class:"setting-popover-block"},F$e={class:"el-radio__description"},A$e={key:0},B$e={key:1},T$e={key:2},N$e={key:3},M$e=ea(()=>r.createElementVNode("br",null,null,-1)),O$e=ea(()=>r.createElementVNode("br",null,null,-1)),I$e={class:"setting-popover-inner"},L$e=ea(()=>r.createElementVNode("h4",null,"Display options:",-1)),R$e={key:0,class:"setting-popover-block"},P$e=ea(()=>r.createElementVNode("h5",null,"Flight path",-1)),V$e={key:1,class:"setting-popover-block"},D$e=ea(()=>r.createElementVNode("h5",null,"Organs",-1)),z$e={key:2,class:"setting-popover-block"},j$e=ea(()=>r.createElementVNode("h5",null,"Apply outlines",-1)),H$e={key:3,class:"setting-popover-block"},U$e=ea(()=>r.createElementVNode("h5",null,"Background color",-1)),q$e=ea(()=>r.createElementVNode("span",{style:{"--bg-color":"white"}},"white",-1)),K$e=ea(()=>r.createElementVNode("span",{style:{"--bg-color":"lightskyblue"}},"lightskyblue",-1)),G$e=ea(()=>r.createElementVNode("span",{style:{"--bg-color":"black"}},"black",-1));function W$e(e,t,n,o,a,i){const s=r.resolveComponent("map-svg-sprite-color"),l=TV,c=VZ,d=Un,u=sJ,f=GZ,h=lo,m=Sne,p=w3,g=noe,v=roe,y=toe,b=r.resolveComponent("map-svg-icon"),x=k3,w=Ch,k=$h,C=xu,S=f3,E=mh,_=b3,$=ey,A=wc;return r.openBlock(),r.createElementBlock("div",x$e,[r.createVNode(s),r.createVNode(l,{onSearch:t[0]||(t[0]=F=>{e.$emit("local-search",{term:F})}),onFetchSuggestions:t[1]||(t[1]=F=>{e.$emit("fetch-suggestions",{data:F})}),failedSearch:e.failedSearch},null,8,["failedSearch"]),r.createVNode(w,{class:"icon-group"},{default:r.withCtx(()=>[r.createElementVNode("div",k$e,[r.createTextVNode(" Viewing Mode: "),r.createVNode(y,{teleported:!1,trigger:"hover",class:"toolbar-dropdown","popper-class":"toolbar-dropdown-popper","hide-on-click":!1,disabled:!e.mapLoaded,placement:"bottom-end"},{dropdown:r.withCtx(()=>[E$e,r.createVNode(v,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.viewingModes,(F,N,M)=>(r.openBlock(),r.createBlock(g,{key:N,onClick:I=>i.updateViewingMode(I,N),class:r.normalizeClass({"is-selected":e.globalSettings.viewingMode===N})},{default:r.withCtx(()=>[r.createElementVNode("h5",null,[N==="Exploration"?(r.openBlock(),r.createBlock(d,{key:0,class:"el-icon--left"},{default:r.withCtx(()=>[r.createVNode(c)]),_:1})):r.createCommentVNode("",!0),N==="Neuron Connection"?(r.openBlock(),r.createBlock(d,{key:1,class:"el-icon--left"},{default:r.withCtx(()=>[r.createVNode(u)]),_:1})):r.createCommentVNode("",!0),N==="Annotation"?(r.openBlock(),r.createBlock(d,{key:2,class:"el-icon--left"},{default:r.withCtx(()=>[r.createVNode(f)]),_:1})):r.createCommentVNode("",!0),r.createTextVNode(" "+r.toDisplayString(N),1)]),r.createElementVNode("small",_$e,[N==="Annotation"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[e.authorisedUser?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createTextVNode(r.toDisplayString(F[1]),1)],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(F[0]),1)],64)),i.offlineAnnotationEnabled?(r.openBlock(),r.createElementBlock(r.Fragment,{key:2},[r.createTextVNode(" (Anonymous annotate) ")],64)):r.createCommentVNode("",!0)],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(F),1)],64))]),N==="Neuron Connection"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},["connectionType"in e.globalSettings?(r.openBlock(),r.createElementBlock("div",$$e,[r.createVNode(p,{modelValue:e.globalSettings.connectionType,"onUpdate:modelValue":t[2]||(t[2]=I=>e.globalSettings.connectionType=I),onChange:t[3]||(t[3]=I=>i.updateGlobalSettings("connectionType"))},{default:r.withCtx(()=>[r.createVNode(m,{value:"Origin",size:"small"},{default:r.withCtx(()=>[r.createTextVNode("Origin")]),_:1}),r.createVNode(m,{value:"Via",size:"small"},{default:r.withCtx(()=>[r.createTextVNode("Via")]),_:1}),r.createVNode(m,{value:"Destination",size:"small"},{default:r.withCtx(()=>[r.createTextVNode("Destination")]),_:1}),r.createVNode(m,{value:"All",size:"small"},{default:r.withCtx(()=>[r.createTextVNode("All")]),_:1})]),_:1},8,["modelValue"]),r.createElementVNode("div",F$e,[e.globalSettings.connectionType==="Origin"?(r.openBlock(),r.createElementBlock("small",A$e," Neuron populations beginning at a location. ")):e.globalSettings.connectionType==="Via"?(r.openBlock(),r.createElementBlock("small",B$e," Neuron populations that run through a location. ")):e.globalSettings.connectionType==="Destination"?(r.openBlock(),r.createElementBlock("small",T$e," Neuron populations terminating at a location. ")):(r.openBlock(),r.createElementBlock("small",N$e," Neuron populations associated with a location (or) Neuron populations that share at least one edge with another neuron population. "))])])):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0)]),_:2},1032,["onClick","class"]))),128))]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("span",C$e,[e.globalSettings.viewingMode==="Exploration"?(r.openBlock(),r.createBlock(d,{key:0,class:"el-icon--left"},{default:r.withCtx(()=>[r.createVNode(c)]),_:1})):r.createCommentVNode("",!0),e.globalSettings.viewingMode==="Neuron Connection"?(r.openBlock(),r.createBlock(d,{key:1,class:"el-icon--left"},{default:r.withCtx(()=>[r.createVNode(u)]),_:1})):r.createCommentVNode("",!0),e.globalSettings.viewingMode==="Annotation"?(r.openBlock(),r.createBlock(d,{key:2,class:"el-icon--left"},{default:r.withCtx(()=>[r.createVNode(f)]),_:1})):r.createCommentVNode("",!0),r.createTextVNode(" "+r.toDisplayString(e.globalSettings.viewingMode)+" ",1),e.globalSettings.viewingMode==="Neuron Connection"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:3},[r.createTextVNode(" "),r.createElementVNode("small",S$e,[r.createElementVNode("em",null,r.toDisplayString(e.globalSettings.connectionType),1)])],64)):r.createCommentVNode("",!0),r.createVNode(d,{class:"el-icon--right"},{default:r.withCtx(()=>[r.createVNode(h)]),_:1})])]),_:1},8,["disabled"])]),e.activeViewRef?(r.openBlock(),r.createBlock(k,{key:0,"virtual-ref":e.activeViewRef,ref:"viewPopover",placement:"bottom",width:"133",teleported:!1,trigger:"click","popper-class":"view-icon-popover","virtual-triggering":""},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.viewIcons,F=>(r.openBlock(),r.createBlock(w,{gutter:20,key:F.name,class:r.normalizeClass([{active:F.icon==i.activeView},{disabled:F.min>n.numberOfEntries},"view-icon-row"]),onClick:N=>i.viewClicked(F.icon)},{default:r.withCtx(()=>[r.createVNode(x,{span:4},{default:r.withCtx(()=>[r.createVNode(b,{icon:F.icon,class:"view-icon"},null,8,["icon"])]),_:2},1024),r.createVNode(x,{offset:2,span:18,class:"view-text"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(F.name),1)]),_:2},1024)]),_:2},1032,["class","onClick"]))),128))]),_:1},8,["virtual-ref"])):r.createCommentVNode("",!0),r.createVNode(k,{class:"tooltip",content:"Split screen",placement:"bottom-end","show-after":i.helpDelay,teleported:!1,trigger:"hover","popper-class":"header-popper"},{reference:r.withCtx(()=>[r.createVNode(b,{icon:i.activeView,ref:"activeViewRef",class:r.normalizeClass([{disabled:1>=n.numberOfEntries},"header-icon","splitscreen-icon"])},null,8,["icon","class"])]),_:1},8,["show-after"]),r.createVNode(k,{class:"tooltip",content:"Help",placement:"bottom-end","show-after":i.helpDelay,teleported:!1,trigger:"hover","popper-class":"header-popper"},{reference:r.withCtx(()=>[r.createVNode(b,{icon:"tooltips",class:"header-icon",onClick:t[4]||(t[4]=F=>i.startHelp())})]),_:1},8,["show-after"]),r.createVNode(k,{class:"tooltip",content:"Fullscreen",placement:"bottom-end","show-after":i.helpDelay,teleported:!1,trigger:"hover","popper-class":"header-popper"},{reference:r.withCtx(()=>[r.withDirectives(r.createVNode(b,{icon:"fullScreen",class:"header-icon",onClick:i.onFullscreen},null,8,["onClick"]),[[r.vShow,!e.isFullscreen]])]),_:1},8,["show-after"]),r.createVNode(k,{class:"tooltip",content:"Exit fullscreen",placement:"bottom-end","show-after":i.helpDelay,teleported:!1,trigger:"hover","popper-class":"header-popper"},{reference:r.withCtx(()=>[r.withDirectives(r.createVNode(b,{icon:"closeFullScreen",class:"header-icon",onClick:i.onFullscreen},null,8,["onClick"]),[[r.vShow,e.isFullscreen]])]),_:1},8,["show-after"]),e.permalinkRef?(r.openBlock(),r.createBlock(k,{key:1,ref:"linkPopover","virtual-ref":e.permalinkRef,placement:"bottom-end",width:"400",teleported:!1,trigger:"click","popper-class":"link-popover","virtual-triggering":""},{default:r.withCtx(()=>[e.displayShareOptions?(r.openBlock(),r.createBlock(w,{key:0},{default:r.withCtx(()=>[r.createVNode(x,{offset:3,span:8},{default:r.withCtx(()=>[r.createVNode(C,{type:"primary",size:"small",onClick:t[5]||(t[5]=F=>i.getShareLink(e.exportAnnotation)),class:"share-options"},{default:r.withCtx(()=>[r.createTextVNode(" Create Permalink ")]),_:1})]),_:1}),r.createVNode(x,{span:10},{default:r.withCtx(()=>[r.createVNode(k,{class:"tooltip",placement:"bottom-end","show-after":i.helpDelay,teleported:!1,trigger:"hover","popper-class":"header-popper"},{reference:r.withCtx(()=>[r.createVNode(S,{modelValue:e.exportAnnotation,"onUpdate:modelValue":t[6]||(t[6]=F=>e.exportAnnotation=F),size:"small"},{default:r.withCtx(()=>[r.createTextVNode(" Export Annotations ")]),_:1},8,["modelValue"])]),default:r.withCtx(()=>[r.createTextVNode(" Create a permalink with anonymous annotations. "),M$e,r.createTextVNode(" NOTE: Annotations will only be stored for "),O$e,r.createTextVNode(" 30 days on the server. ")]),_:1},8,["show-after"])]),_:1})]),_:1})):r.withDirectives((r.openBlock(),r.createBlock(w,{key:1,gutter:20,"element-loading-text":"Creating link..."},{default:r.withCtx(()=>[r.createVNode(x,{span:20},{default:r.withCtx(()=>[r.createVNode(E,{class:"link-input",size:"small",placeholder:"Permanant Link Here",readonly:!0,modelValue:i.shareLink,"onUpdate:modelValue":t[7]||(t[7]=F=>i.shareLink=F),ref:"linkInput"},null,8,["modelValue"])]),_:1}),r.createVNode(x,{span:4},{default:r.withCtx(()=>[r.createVNode(k,{class:"tooltip",content:"Copy link",placement:"bottom-end","show-after":i.helpDelay,teleported:!1,trigger:"hover","popper-class":"header-popper"},{reference:r.withCtx(()=>[r.createVNode(C,{class:"copy-button",icon:e.ElIconCopyDocument,size:"small",onClick:i.copyShareLink},null,8,["icon","onClick"])]),_:1},8,["show-after"])]),_:1})]),_:1})),[[A,e.loadingLink]])]),_:1},8,["virtual-ref"])):r.createCommentVNode("",!0),r.createVNode(k,{class:"tooltip",content:"Get permalink",placement:"bottom-end","show-after":i.helpDelay,teleported:!1,trigger:"hover","popper-class":"header-popper"},{reference:r.withCtx(()=>[r.withDirectives(r.createVNode(b,{icon:"permalink",ref:"permalinkRef",class:"header-icon",onClick:i.requestShareLink},null,8,["onClick"]),[[r.vShow,i.shareLink]])]),_:1},8,["show-after"]),r.createVNode(k,{class:"tooltip",content:"Close",placement:"bottom-end","show-after":i.helpDelay,teleported:!1,trigger:"hover","popper-class":"header-popper"},{reference:r.withCtx(()=>[r.withDirectives(r.createVNode(b,{icon:"close",class:"header-icon",onClick:i.close},null,8,["onClick"]),[[r.vShow,n.showIcons]])]),_:1},8,["show-after"]),e.globalSettingRef?(r.openBlock(),r.createBlock(k,{key:2,"virtual-ref":e.globalSettingRef,ref:"settingPopover",placement:"bottom",width:"230",teleported:!1,trigger:"click","popper-class":"setting-popover","virtual-triggering":"",disabled:!e.mapLoaded},{default:r.withCtx(()=>[r.createElementVNode("div",I$e,[L$e,"flightPathDisplay"in e.globalSettings?(r.openBlock(),r.createElementBlock("div",R$e,[P$e,r.createVNode(p,{modelValue:e.globalSettings.flightPathDisplay,"onUpdate:modelValue":t[8]||(t[8]=F=>e.globalSettings.flightPathDisplay=F),onChange:t[9]||(t[9]=F=>i.updateGlobalSettings("flightPathDisplay"))},{default:r.withCtx(()=>[r.createVNode(_,{value:!1},{default:r.withCtx(()=>[r.createTextVNode("2D")]),_:1}),r.createVNode(_,{value:!0},{default:r.withCtx(()=>[r.createTextVNode("3D")]),_:1})]),_:1},8,["modelValue"])])):r.createCommentVNode("",!0),"organsDisplay"in e.globalSettings?(r.openBlock(),r.createElementBlock("div",V$e,[D$e,r.createVNode(p,{modelValue:e.globalSettings.organsDisplay,"onUpdate:modelValue":t[10]||(t[10]=F=>e.globalSettings.organsDisplay=F),onChange:t[11]||(t[11]=F=>i.updateGlobalSettings("organsDisplay"))},{default:r.withCtx(()=>[r.createVNode(_,{value:!0},{default:r.withCtx(()=>[r.createTextVNode("Color")]),_:1}),r.createVNode(_,{value:!1},{default:r.withCtx(()=>[r.createTextVNode("Grayscale")]),_:1})]),_:1},8,["modelValue"])])):r.createCommentVNode("",!0),"outlinesDisplay"in e.globalSettings?(r.openBlock(),r.createElementBlock("div",z$e,[j$e,r.createVNode(p,{modelValue:e.globalSettings.outlinesDisplay,"onUpdate:modelValue":t[12]||(t[12]=F=>e.globalSettings.outlinesDisplay=F),onChange:t[13]||(t[13]=F=>i.updateGlobalSettings("outlinesDisplay"))},{default:r.withCtx(()=>[r.createVNode(_,{value:!0},{default:r.withCtx(()=>[r.createTextVNode("Show")]),_:1}),r.createVNode(_,{value:!1},{default:r.withCtx(()=>[r.createTextVNode("Hide")]),_:1})]),_:1},8,["modelValue"])])):r.createCommentVNode("",!0),"backgroundDisplay"in e.globalSettings?(r.openBlock(),r.createElementBlock("div",H$e,[U$e,r.createVNode(p,{class:"bg-color-radio-group",modelValue:e.globalSettings.backgroundDisplay,"onUpdate:modelValue":t[14]||(t[14]=F=>e.globalSettings.backgroundDisplay=F),onChange:t[15]||(t[15]=F=>i.updateGlobalSettings("backgroundDisplay"))},{default:r.withCtx(()=>[r.createVNode(_,{value:"white",class:"bg-color-radio"},{default:r.withCtx(()=>[q$e]),_:1}),r.createVNode(_,{value:"lightskyblue",class:"bg-color-radio"},{default:r.withCtx(()=>[K$e]),_:1}),r.createVNode(_,{value:"black",class:"bg-color-radio"},{default:r.withCtx(()=>[G$e]),_:1})]),_:1},8,["modelValue"])])):r.createCommentVNode("",!0)])]),_:1},8,["virtual-ref","disabled"])):r.createCommentVNode("",!0),i.showGlobalSettings?(r.openBlock(),r.createBlock(k,{key:3,class:"tooltip",content:"Global Settings",placement:"bottom-end","show-after":i.helpDelay,teleported:!1,trigger:"hover","popper-class":"header-popper",disabled:!e.mapLoaded},{reference:r.withCtx(()=>[r.createVNode(d,{ref:"globalSettingRef",disabled:!e.mapLoaded,class:r.normalizeClass(["header-icon",{disabled:!e.mapLoaded}])},{default:r.withCtx(()=>[r.createVNode($)]),_:1},8,["disabled","class"])]),_:1},8,["show-after","disabled"])):r.createCommentVNode("",!0)]),_:1})])}const NV=tr(w$e,[["render",W$e],["__scopeId","data-v-1cc10ca9"]]),MV=e=>!e.getAttribute("aria-owns"),OV=(e,t,n)=>{const{parentNode:o}=e;if(!o)return null;const a=o.querySelectorAll(n),i=Array.prototype.indexOf.call(a,e);return a[i+t]||null},zg=e=>{e&&(e.focus(),!MV(e)&&e.click())},bn=(e,t,{checkForDefaultPrevented:n=!0}={})=>o=>{const a=e==null?void 0:e(o);if(n===!1||!a)return t==null?void 0:t(o)},IV=e=>t=>t.pointerType==="mouse"?e(t):void 0;var LV;const Lt=typeof window<"u",X$e=e=>typeof e=="string",RV=()=>{},DS=Lt&&((LV=window==null?void 0:window.navigator)==null?void 0:LV.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Lf(e){return typeof e=="function"?e():r.unref(e)}function Y$e(e){return e}function Rf(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}function Z$e(e,t=!0){r.getCurrentInstance()?r.onMounted(e):t?e():r.nextTick(e)}function zS(e,t,n={}){const{immediate:o=!0}=n,a=r.ref(!1);let i=null;function s(){i&&(clearTimeout(i),i=null)}function l(){a.value=!1,s()}function c(...d){s(),a.value=!0,i=setTimeout(()=>{a.value=!1,i=null,e(...d)},Lf(t))}return o&&(a.value=!0,Lt&&c()),Rf(l),{isPending:r.readonly(a),start:c,stop:l}}function Ta(e){var t;const n=Lf(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Pf=Lt?window:void 0;function Qr(...e){let t,n,o,a;if(X$e(e[0])||Array.isArray(e[0])?([n,o,a]=e,t=Pf):[t,n,o,a]=e,!t)return RV;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const i=[],s=()=>{i.forEach(u=>u()),i.length=0},l=(u,f,h,m)=>(u.addEventListener(f,h,m),()=>u.removeEventListener(f,h,m)),c=r.watch(()=>[Ta(t),Lf(a)],([u,f])=>{s(),u&&i.push(...n.flatMap(h=>o.map(m=>l(u,h,m,f))))},{immediate:!0,flush:"post"}),d=()=>{c(),s()};return Rf(d),d}let PV=!1;function J$e(e,t,n={}){const{window:o=Pf,ignore:a=[],capture:i=!0,detectIframe:s=!1}=n;if(!o)return;DS&&!PV&&(PV=!0,Array.from(o.document.body.children).forEach(u=>u.addEventListener("click",RV)));let l=!0;const c=u=>a.some(f=>{if(typeof f=="string")return Array.from(o.document.querySelectorAll(f)).some(h=>h===u.target||u.composedPath().includes(h));{const h=Ta(f);return h&&(u.target===h||u.composedPath().includes(h))}}),d=[Qr(o,"click",u=>{const f=Ta(e);if(!(!f||f===u.target||u.composedPath().includes(f))){if(u.detail===0&&(l=!c(u)),!l){l=!0;return}t(u)}},{passive:!0,capture:i}),Qr(o,"pointerdown",u=>{const f=Ta(e);f&&(l=!u.composedPath().includes(f)&&!c(u))},{passive:!0}),s&&Qr(o,"blur",u=>{var f;const h=Ta(e);((f=o.document.activeElement)==null?void 0:f.tagName)==="IFRAME"&&!(h!=null&&h.contains(o.document.activeElement))&&t(u)})].filter(Boolean);return()=>d.forEach(u=>u())}function VV(e,t=!1){const n=r.ref(),o=()=>n.value=!!e();return o(),Z$e(o,t),n}const DV=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},zV="__vueuse_ssr_handlers__";DV[zV]=DV[zV]||{};function Q$e(e,t,{window:n=Pf,initialValue:o=""}={}){const a=r.ref(o),i=r.computed(()=>{var s;return Ta(t)||((s=n==null?void 0:n.document)==null?void 0:s.documentElement)});return r.watch([i,()=>Lf(e)],([s,l])=>{var c;if(s&&n){const d=(c=n.getComputedStyle(s).getPropertyValue(l))==null?void 0:c.trim();a.value=d||o}},{immediate:!0}),r.watch(a,s=>{var l;(l=i.value)!=null&&l.style&&i.value.style.setProperty(Lf(e),s)}),a}var jV=Object.getOwnPropertySymbols,eFe=Object.prototype.hasOwnProperty,tFe=Object.prototype.propertyIsEnumerable,nFe=(e,t)=>{var n={};for(var o in e)eFe.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&jV)for(var o of jV(e))t.indexOf(o)<0&&tFe.call(e,o)&&(n[o]=e[o]);return n};function ta(e,t,n={}){const o=n,{window:a=Pf}=o,i=nFe(o,["window"]);let s;const l=VV(()=>a&&"ResizeObserver"in a),c=()=>{s&&(s.disconnect(),s=void 0)},d=r.watch(()=>Ta(e),f=>{c(),l.value&&a&&f&&(s=new ResizeObserver(t),s.observe(f,i))},{immediate:!0,flush:"post"}),u=()=>{c(),d()};return Rf(u),{isSupported:l,stop:u}}var HV=Object.getOwnPropertySymbols,rFe=Object.prototype.hasOwnProperty,oFe=Object.prototype.propertyIsEnumerable,aFe=(e,t)=>{var n={};for(var o in e)rFe.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&HV)for(var o of HV(e))t.indexOf(o)<0&&oFe.call(e,o)&&(n[o]=e[o]);return n};function iFe(e,t,n={}){const o=n,{window:a=Pf}=o,i=aFe(o,["window"]);let s;const l=VV(()=>a&&"MutationObserver"in a),c=()=>{s&&(s.disconnect(),s=void 0)},d=r.watch(()=>Ta(e),f=>{c(),l.value&&a&&f&&(s=new MutationObserver(t),s.observe(f,i))},{immediate:!0}),u=()=>{c(),d()};return Rf(u),{isSupported:l,stop:u}}var UV;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(UV||(UV={}));var sFe=Object.defineProperty,qV=Object.getOwnPropertySymbols,lFe=Object.prototype.hasOwnProperty,cFe=Object.prototype.propertyIsEnumerable,KV=(e,t,n)=>t in e?sFe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dFe=(e,t)=>{for(var n in t||(t={}))lFe.call(t,n)&&KV(e,n,t[n]);if(qV)for(var n of qV(t))cFe.call(t,n)&&KV(e,n,t[n]);return e};dFe({linear:Y$e},{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 uFe=()=>Lt&&/firefox/i.test(window.navigator.userAgent);/**
|
|
977
|
+
order by source desc`;O5e();const a=sessionStorage.getItem("flatmap-knowledge"),i=sessionStorage.getItem("flatmap-knowledge-source");if(!a||i!==n){const l=(await t.queryKnowledge(o)).map(c=>JSON.parse(c));return sessionStorage.setItem("flatmap-knowledge",JSON.stringify(l)),sessionStorage.setItem("flatmap-knowledge-source",n),N5e(),l}return JSON.parse(a)}function N5e(){const n=new Date().getTime()+864e5;sessionStorage.setItem("flatmap-knowledge-expiry",n)}function M5e(){["flatmap-knowledge","flatmap-knowledge-expiry","flatmap-knowledge-source"].forEach(t=>{sessionStorage.removeItem(t)})}function O5e(){const e=sessionStorage.getItem("flatmap-knowledge-expiry");new Date().getTime()>e&&M5e()}const Of=Mt.defineStore("entries",{state:()=>RS(),getters:{findIndexOfId:e=>t=>{for(let n=0;n<e.entries.length;n++)if(e.entries[n].id==t)return n;return-1}},actions:{addNewEntry(e){this.entries.push(e)},destroyEntry(e){e>-1&&this.entries.splice(e,1)},setAll(e){this.entries=[],Object.assign(this.entries,e)},updateViewForEntry({id:e,viewUrl:t}){const n=this.entries.find(o=>o.id===e);n.viewUrl=t},updateMapForEntry(e,t){if(e.id===t.id){const n=wV(t.prov);e.uuid=t.prov.uuid,e.sckanVersion=n}},updateLabelForEntry(e,t){const n=this.entries.find(o=>o.id===e.id);n&&(n.label=t)},updateTitleForEntry(e,t){const n=this.entries.find(o=>o.id===e.id);n&&(n.title=t)}}}),If=[{id:"ilxtr:neuron-type-keast-13",centrelines:["n_71"]},{id:"ilxtr:neuron-type-keast-2",centrelines:["bladder_n"]},{id:"ilxtr:neuron-type-keast-3",centrelines:["bladder_n","hypogastric_n"]},{id:"ilxtr:neuron-type-keast-15",centrelines:["n_73"]},{id:"ilxtr:neuron-type-keast-1",centrelines:["bladder_n"]},{id:"ilxtr:neuron-type-keast-7",centrelines:["L1_ventral_root_ramus","L1_spinal_n-1","lumbar_splanchnic_n","L2_spinal_n","L2_ventral_root_ramus"]},{id:"ilxtr:neuron-type-keast-9",centrelines:["L6_spinal_n-1","L6_ventral_root","pudendal_n","L5_spinal_n","L5_ventral_root"]},{id:"ilxtr:neuron-type-keast-10",centrelines:["S1_dorsal_root","S1_spinal_n-2","pelvic_splanchnic_n","L6_spinal_n-2","L6_dorsal_root","bladder_n"]},{id:"ilxtr:neuron-type-keast-11",centrelines:["lumbar_splanchnic_n","L2_spinal_n","L1_spinal_n-1","hypogastric_n","bladder_n","L1_dorsal_root","L2_dorsal_root"]},{id:"ilxtr:neuron-type-keast-12",centrelines:["L6_spinal_n-1","L6_dorsal_root","pudendal_n","S1_spinal_n-1","S1_dorsal_root"]},{id:"ilxtr:neuron-type-keast-8",centrelines:["L1_ventral_root_paravertebral_ganglion","L1-L2_interganglionic_segment","sympathetic_trunk_T13-L1","L2_ventral_root_paravertebral_ganglion","sympathetic_trunk_L2-L3","sympathetic_trunk_L4-L5","sympathetic_trunk_L3-L4","sympathetic_trunk_L5-L6","sympathetic_trunk_T12-T13"]},{id:"ilxtr:neuron-type-keast-20",centrelines:["T1_T2_cns","C8_T1_cns","T2_T3_cns","T10_T11_cns","T9_T10_cns","T11_T12_cns","T8_T9_cns","C7_C8_cns","C6_C7_cns","C4_C5_cns","C3_C4_cns","C5_C6_cns","medulla_C1_cns","pons_medulla_cns","C1_C2_cns","T5_T6_cns","T4_T5_cns","T6_T7_cns","L3_L4_cns","L2_L3_cns","L4_L5_cns","L5_L6_cns","T13_L1_cns","T12_T13_cns","L1_L2_cns","T3_T4_cns","n_69","C2_C3_cns","T7_T8_cns"]},{id:"ilxtr:neuron-type-keast-16",centrelines:["n_74"]},{id:"ilxtr:neuron-type-keast-4",centrelines:["sympathetic_trunk_L6-S1","L6_gray_ramus-spinal_n","sympathetic_trunk_L5-L6","S1_gray_ramus-spinal_n","S1_spinal_n-2","pelvic_splanchnic_n","L6_spinal_n-2","L1-L2_interganglionic_segment","sympathetic_trunk_T13-L1","sympathetic_trunk_L2-L3","bladder_n","sympathetic_trunk_L4-L5","sympathetic_trunk_L3-L4","sympathetic_trunk_T12-T13"]},{id:"ilxtr:neuron-type-keast-17",centrelines:["n_75"]},{id:"ilxtr:neuron-type-keast-5",centrelines:["S1_ventral_root","S1_spinal_n-2","pelvic_splanchnic_n","L6_spinal_n-2","L6_ventral_root"]},{id:"ilxtr:neuron-type-keast-18",centrelines:["n_70"]},{id:"ilxtr:neuron-type-keast-6",centrelines:["L1_ventral_root_ramus","L1_spinal_n-1","lumbar_splanchnic_n","L2_spinal_n","hypogastric_n","L2_ventral_root_ramus"]},{id:"ilxtr:neuron-type-keast-19",centrelines:["n_69"]},{id:"ilxtr:neuron-type-keast-14",centrelines:["n_72"]}];function I5e(){return[{id:"UBERON:0000948",name:"Heart",type:"simulation"},{id:"UBERON:0001156",name:"Colon",type:"simulation"},{id:"UBERON:0001255",name:"Bladder",type:"simulation"},{id:"UBERON:0000945",name:"Stomach",type:"simulation"},{id:"UBERON:0001759",name:"Vagus nerve",type:"simulation"},{id:"UBERON:0002108",name:"Small intestines",type:"simulation"},{id:"UBERON:0002107",name:"Liver",type:"simulation"}]}function L5e(){return I5e()}function xV(e){if(e)for(let t=0;t<If.length;t++){if(If[t].id==e)return If[t].centrelines;if(If[t].centrelines.find(o=>o===e))return[If[t].id]}return[]}function R5e(e){if(e){const t=e.toLowerCase();if(t.includes("heart"))return{id:"UBERON:0000948",name:"Heart"};if(t.includes("liver"))return{id:"UBERON:0002107",name:"Liver"};if(t.includes("stomach"))return{id:"UBERON:0000945",name:"Stomach"};if(t.includes("colon"))return{id:"UBERON:0001156",name:"Colon"};if(t.includes("bladder"))return{id:"UBERON:0001255",name:"Bladder"}}}const VS=e=>{switch(e){case"2horpanel":return{"split-1":{content:!1,horizontal:!0,children:["pane-1","pane-2"]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2}};case"2vertpanel":return{"split-1":{content:!1,horizontal:!1,children:["pane-1","pane-2"]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2}};case"3panel":return{"split-1":{content:!1,horizontal:!1,children:["pane-1","split-2"]},"split-2":{content:!1,horizontal:!0,children:["pane-2","pane-3"]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2},"pane-3":{content:!0,id:3}};case"4panel":return{"split-1":{content:!1,horizontal:!1,children:["split-3","split-2"]},"split-2":{content:!1,horizontal:!0,children:["pane-2","pane-3"]},"split-3":{content:!1,horizontal:!0,children:["pane-1","pane-4"]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2},"pane-3":{content:!0,id:3},"pane-4":{content:!0,id:4}};case"5panel":return{"split-1":{content:!1,horizontal:!0,children:["split-3","split-2"]},"split-2":{content:!1,horizontal:!1,children:["pane-2","pane-3"]},"split-3":{content:!1,horizontal:!1,children:["pane-1","pane-4","pane-5"]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2},"pane-3":{content:!0,id:3},"pane-4":{content:!0,id:4},"pane-5":{content:!0,id:5}};case"6panel":return{"split-1":{content:!1,horizontal:!0,children:["split-3","split-2"]},"split-2":{content:!1,horizontal:!1,children:["pane-2","pane-3","pane-5"]},"split-3":{content:!1,horizontal:!1,children:["pane-1","pane-4","pane-6"]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2},"pane-3":{content:!0,id:3},"pane-4":{content:!0,id:4},"pane-5":{content:!0,id:5},"pane-6":{content:!0,id:6}};case"6panelVertical":return{"split-1":{content:!1,horizontal:!1,children:["split-3","split-2"]},"split-2":{content:!1,horizontal:!0,children:["pane-2","pane-3","pane-5"]},"split-3":{content:!1,horizontal:!0,children:["pane-1","pane-4","pane-6"]},"pane-1":{content:!0,id:1},"pane-2":{content:!0,id:2},"pane-3":{content:!0,id:3},"pane-4":{content:!0,id:4},"pane-5":{content:!0,id:5},"pane-6":{content:!0,id:6}};case"singlepanel":default:return{"split-1":{content:!1,horizontal:!1,children:["pane-1"]},"pane-1":{content:!0,id:1}}}},P5e=(e,t)=>{const n=[],o=[];for(const[a,i]of Object.entries(t))i.content&&(1>i.id||n.includes(i.id)?o.push(a):n.push(i.id));o.forEach(a=>{let i=!1;for(let s=0;s<e.length&&!i;s++)n.includes(e[s].id)||(t[a].id=e[s].id,n.push(e.id),i=!0)})},V5e=e=>{const t={};for(const[n,o]of Object.entries(e))o.content&&(t[n]=o);return t},kV=(e,t)=>{const n=V5e(e),o=VS(t);for(const[a,i]of Object.entries(n))o[a]=i;return o},yd=(e,t)=>Object.keys(e).find(n=>e[n].id===t),CV=()=>({activeView:"singlepanel",idNamePair:{},viewIcons:[{icon:"singlepanel",name:"Single view",min:1},{icon:"2horpanel",name:"Horizontal split",min:2},{icon:"2vertpanel",name:"Vertical split",min:2},{icon:"3panel",name:"Three panes",min:3},{icon:"4panel",name:"Four panes",min:4},{icon:"5panel",name:"Five panes",min:5},{icon:"6panel",name:"Six (horizontal)",min:6},{icon:"6panelVertical",name:"Six (vertical)",min:6}],customLayout:{"split-1":{content:!1,horizontal:!1,children:["pane-1"]},"pane-1":{content:!0,id:1}},splitters:{first:50,second:50,third:50}}),Ss=Mt.defineStore("splitFlow",{state:()=>CV(),getters:{getActivePaneIds:e=>()=>{const t=[];let n;for(const o in e.customLayout)e.customLayout[o].id&&t.push(e.customLayout[o].id);switch(e.activeView){case"singlepanel":n=t.slice(0,1);break;case"2horpanel":case"2vertpanel":n=t.slice(0,2);break;case"3panel":n=t.slice(0,3);break;case"4panel":n=t.slice(0,4);break;case"5panel":n=t.slice(0,5);break;case"6panelVertical":case"6panel":n=t.slice(0,6);break;default:n=[];break}return n},getPaneNameById:e=>t=>yd(e.customLayout,t),getState:e=>()=>({activeView:e.activeView,splitters:e.splitters,customLayout:e.customLayout}),isPaneActive:e=>t=>{const n=VS(e.activeView);return Object.keys(n).includes(t)}},actions:{assignOrSwapPaneWithIds(e){let t=yd(this.customLayout,e.source),n=yd(this.customLayout,e.target);n&&(this.customLayout[n].id=e.source),t&&(this.customLayout[t].id=e.target),this.updateSplitPanels()},getAvailableTerms(e){let t=L5e();for(let n=0;n<t.length;n++)this.idNamePair[t[n].id]=t[n].name;if(e){this._controller&&this._controller.abort(),this._controller=new AbortController;let n=this._controller.signal;fetch(`${e}get-organ-curies`,{signal:n}).then(o=>o.json()).then(o=>{this._controller=void 0,o.uberon.array.forEach(a=>{this.idNamePair[a.id.toUpperCase()]=a.name.charAt(0).toUpperCase()+a.name.slice(1)})})}},updateActiveView(e){this.activeView=e.view;const t=kV(this.customLayout,this.activeView);P5e(e.entries,t);for(const[n,o]of Object.entries(t))this.customLayout[n]=o;this.updateSplitPanels()},setSplitter(e){this.splitters[e.name]&&(this.splitters[e.name]=e.value)},setState(e){if(e){let t;if(e.activeView&&(this.activeView=e.activeView),e.customLayout)t=e.customLayout;else if(t=VS(this.activeView),e.slotInfo)for(let n=0;n<e.slotInfo.length;n++)switch(e.slotInfo[n].name){case"first":t["pane-1"].id=e.slotInfo[n].id;break;case"second":"pane-2"in t&&(t["pane-2"].id=e.slotInfo[n].id);break;case"thrid":"pane-3"in t&&(t["pane-3"].id=e.slotInfo[n].id);break;case"fourth":"pane-4"in t&&(t["pane-4"].id=e.slotInfo[n].id);break;case"fifth":"pane-5"in t&&(t["pane-5"].id=e.slotInfo[n].id);break;case"sixth":"pane-6"in t&&(t["pane-6"].id=e.slotInfo[n].id);break}for(const[n,o]of Object.entries(t))this.customLayout[n]=o;for(const[n,o]of Object.entries(e.splitters))this.splitters[n]=o}},setIdToPrimaryPane(e){const t=yd(this.customLayout,e),n=this.customLayout["pane-1"].id;this.customLayout["pane-1"].id=e,t&&(this.customLayout[t].id=n)},reset(){const e=CV();this.activeView=e.activeView,this.customLayout=e.customLayout,this.splitters=e.splitters},closeSlot(e){if(e){let t=0;if(e.entries)for(let n=0;n<e.entries.length&&t==0;n++)e.entries[n].id!==e.id&&yd(this.customLayout,e.entries[n].id)===void 0&&(t=e.entries[n].id);if(this.activeView!=="customise"){const n=this.activeView;switch(this.activeView){case"2horpanel":case"2vertpanel":this.activeView="singlepanel";break;case"3panel":this.activeView="2vertpanel";break;case"4panel":this.activeView="3panel";break;case"5panel":this.activeView="4panel";break;case"6panelVertical":case"6panel":this.activeView="5panel";break}const o=kV(this.customLayout,this.activeView);switch(yd(this.customLayout,e.id)){case"pane-1":switch(n){case"2horpanel":case"2vertpanel":o["pane-1"].id=o["pane-2"].id,o["pane-2"].id=t;break;case"3panel":o["pane-1"].id=o["pane-2"].id,o["pane-2"].id=o["pane-3"].id,o["pane-3"].id=t;break;case"4panel":o["pane-1"].id=o["pane-2"].id,o["pane-2"].id=o["pane-3"].id,o["pane-3"].id=o["pane-4"].id,o["pane-4"].id=t;break;case"5panel":o["pane-1"].id=o["pane-2"].id,o["pane-2"].id=o["pane-3"].id,o["pane-3"].id=o["pane-4"].id,o["pane-4"].id=o["pane-5"].id,o["pane-5"].id=t;break;case"6panelVertical":case"6panel":o["pane-1"].id=o["pane-2"].id,o["pane-2"].id=o["pane-3"].id,o["pane-3"].id=o["pane-4"].id,o["pane-4"].id=o["pane-5"].id,o["pane-5"].id=o["pane-6"].id,o["pane-6"].id=t;break}break;case"pane-2":switch(n){case"2horpanel":case"2vertpanel":o["pane-2"].id=t;break;case"3panel":o["pane-2"].id=o["pane-3"].id,o["pane-3"].id=t;break;case"4panel":o["pane-2"].id=o["pane-3"].id,o["pane-3"].id=o["pane-4"].id,o["pane-4"].id=t;break;case"5panel":o["pane-2"].id=o["pane-3"].id,o["pane-3"].id=o["pane-4"].id,o["pane-4"].id=o["pane-5"].id,o["pane-5"].id=t;break;case"6panelVertical":case"6panel":o["pane-2"].id=o["pane-3"].id,o["pane-3"].id=o["pane-4"].id,o["pane-4"].id=o["pane-5"].id,o["pane-5"].id=o["pane-6"].id,o["pane-6"].id=t;break}break;case"pane-3":switch(n){case"3panel":o["pane-3"].id=t;break;case"4panel":o["pane-3"].id=o["pane-4"].id,o["pane-4"].id=t;break;case"5panel":o["pane-3"].id=o["pane-4"].id,o["pane-4"].id=o["pane-5"].id,o["pane-5"].id=t;break;case"6panelVertical":case"6panel":o["pane-3"].id=o["pane-4"].id,o["pane-4"].id=o["pane-5"].id,o["pane-5"].id=o["pane-6"].id,o["pane-6"].id=t;break}break;case"pane-4":switch(n){case"4panel":o["pane-4"].id=t;break;case"5panel":o["pane-4"].id=o["pane-5"].id,o["pane-5"].id=t;break;case"6panelVertical":case"6panel":o["pane-4"].id=o["pane-5"].id,o["pane-5"].id=o["pane-6"].id,o["pane-6"].id=t;break}break;case"pane-5":switch(n){case"5panel":o["pane-5"].id=t;break;case"6panelVertical":case"6panel":o["pane-5"].id=o["pane-6"].id,o["pane-6"].id=t;break}break;case"pane-6":switch(n){case"6panelVertical":case"6panel":o["pane-6"].id=t;break}break}for(const[i,s]of Object.entries(o))this.customLayout[i]=s}}},updateSplitPanels(){$e.emit("species-layout-connectivity-update")}}}),D5e={name:"ContentBar",components:{ElIconArrowDown:lo,ElIconArrowUp:X1,ElIconInfoFilled:Q1,Input:mh,Option:G3,Popover:$h,Row:Ch,Select:K3,ContextCard:M9,FlatmapContextCard:O9,MapSvgIcon:OS},props:{entry:Object},data:function(){return{contextCardVisible:!1,slot:{},boundariesElement:null,showDetails:!0,contextCardEntry:void 0,titles:[]}},computed:{...Mt.mapStores(Of,vi,Ss),allClosable(){return this.settingsStore.allClosable},helpDelay(){return this.settingsStore.helpDelay},activeView:function(){return this.splitFlowStore.activeView},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}},popperOptions:function(){return{modifiers:[{name:"preventOverflow",options:{boundary:this.boundariesElement}},{name:"flip",options:{boundary:this.boundariesElement,flipVariations:!1,allowedAutoPlacements:["bottom"]}}]}},entries:function(){return this.titles=[],this.entriesStore.entries.map(e=>{const t=this.getEntryTitle(e);return this.titles.push({id:e.id,title:t}),{...e,title:t}})}},methods:{closeAndRemove:function(){this.splitFlowStore.closeSlot({id:this.entry.id,entries:this.entries}),$e.emit("RemoveEntryRequest",this.entry.id),this.$nextTick(()=>{this.splitFlowStore.updateSplitPanels()})},getEntryTitle:function(e){if(e){let t=e.label?e.label+" ":"",n=e.type;return n=="Scaffold"&&(n="3D Scaffold"),t+=n,e.datasetId?t+=" - "+e.datasetId:e.discoverId&&(t+=" - "+e.discoverId),t}return"Viewer"},getTitle:function(e){const{id:t,title:n}=e,o=this.titles.filter(a=>a.title===n);if(o.length>1){const a=[];for(let s=0;s<o.length;s++){const l=this.getCharById(s);a.push({id:o[s].id,title:o[s].title+l})}const i=a.find(s=>s.id===t);if(i)return i.title}return n},getCharById:function(e){return" ("+String.fromCharCode(65+e)+")"},viewerChanged:function(e){if(this.entry.id&&this.entry.id!=e){this.splitFlowStore.assignOrSwapPaneWithIds({source:this.entry.id,target:e}),this.$nextTick(()=>{setTimeout(()=>{this.$emit("chooser-changed")},1200)});const t=this.entries.find(n=>n.id===e);Bt.sendEvent({event:"interaction_event",event_name:"portal_maps_toolbar_viewer_changed",category:(t==null?void 0:t.title)||"",location:"map_toolbar"})}},setPopperWidth:function(e){let t=this.entries.find(n=>n.id===e);if(t)return t.type=="Flatmap"||t.type=="MultiFlatmap"?"240px":"440px"},setBoundary:function(e){this.boundariesElement=e},setupFlatmapContextCard:function(e){this.contextCardVisible=!1;let t=Object.assign({mapImpProv:e.prov},this.entry);this.contextCardEntry=t},setupScaffoldContextCard:function(){this.entry.contextCardUrl&&(this.contextCardEntry={...this.entry})}},mounted:function(){this.setupScaffoldContextCard()}},z5e={class:"toolbar-flex-container"},j5e={key:1,class:"toolbar-title"};function H5e(e,t,n,o,a,i){const s=G3,l=K3,c=O9,d=M9,u=X1,f=Un,h=lo,m=$h,p=r.resolveComponent("map-svg-icon"),g=Ch;return r.openBlock(),r.createElementBlock("div",null,[r.createElementVNode("div",z5e,[i.entries.length>1?(r.openBlock(),r.createBlock(l,{key:0,teleported:!1,"model-value":n.entry.id,placeholder:"Select",class:"select-box","popper-class":"viewer_dropdown",onChange:t[0]||(t[0]=v=>i.viewerChanged(v))},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.entries,v=>(r.openBlock(),r.createBlock(s,{key:v.id,label:i.getTitle(v),value:v.id},null,8,["label","value"]))),128))]),_:1},8,["model-value"])):(r.openBlock(),r.createElementBlock("div",j5e,r.toDisplayString(i.getEntryTitle(n.entry)),1))]),r.createVNode(g,{class:"icon-group"},{default:r.withCtx(()=>[r.createVNode(m,{placement:"bottom",teleported:!1,trigger:"manual",width:i.setPopperWidth(e.slot.id),offset:0,"popper-class":"context-card-popover","popper-options":i.popperOptions,visible:e.contextCardVisible},r.createSlots({reference:r.withCtx(()=>[r.withDirectives(r.createElementVNode("div",null,[r.withDirectives(r.createElementVNode("div",{class:"hide",onClick:t[3]||(t[3]=v=>e.contextCardVisible=!1)},[r.createTextVNode(" Hide information "),r.createVNode(f,null,{default:r.withCtx(()=>[r.createVNode(u)]),_:1})],512),[[r.vShow,e.contextCardVisible]]),r.withDirectives(r.createElementVNode("div",{class:"hide",onClick:t[4]||(t[4]=v=>e.contextCardVisible=!0)},[r.createTextVNode(" Show information "),r.createVNode(f,null,{default:r.withCtx(()=>[r.createVNode(h)]),_:1})],512),[[r.vShow,!e.contextCardVisible]])],512),[[r.vShow,e.contextCardEntry]])]),_:2},[e.contextCardEntry?{name:"default",fn:r.withCtx(()=>[e.contextCardEntry.type=="Flatmap"||e.contextCardEntry.type=="MultiFlatmap"?(r.openBlock(),r.createBlock(c,{key:0,class:"flatmap-context-card",mapImpProv:e.contextCardEntry.mapImpProv},null,8,["mapImpProv"])):r.createCommentVNode("",!0),e.contextCardEntry.type.toLowerCase()=="scaffold"?(r.openBlock(),r.createBlock(d,{key:1,entry:e.contextCardEntry,envVars:i.envVars,class:"context-card",onContextReady:t[1]||(t[1]=v=>e.contextCardVisible=!0),onScaffoldViewClicked:t[2]||(t[2]=v=>e.$emit("scaffold-view-clicked",v))},null,8,["entry","envVars"])):r.createCommentVNode("",!0)]),key:"0"}:void 0]),1032,["width","popper-options","visible"]),r.createVNode(m,{class:"tooltip",content:"Close and remove",placement:"bottom-end","show-after":i.helpDelay,teleported:!1,trigger:"hover","popper-class":"header-popper"},{reference:r.withCtx(()=>[r.withDirectives(r.createVNode(p,{icon:"close-no-bk",class:"header-icon",onClick:t[5]||(t[5]=v=>i.closeAndRemove())},null,512),[[r.vShow,i.activeView!=="singlepanel"&&(n.entry.mode!=="main"||i.allClosable)]])]),_:1},8,["show-after"])]),_:1})])}const SV=tr(D5e,[["render",H5e],["__scopeId","data-v-0296970e"]]),U5e=r.defineAsyncComponent(()=>Promise.resolve().then(()=>bGe)),q5e=r.defineAsyncComponent(()=>Promise.resolve().then(()=>SGe)),K5e=r.defineAsyncComponent(()=>Promise.resolve().then(()=>AGe)),G5e=r.defineAsyncComponent(()=>Promise.resolve().then(()=>NGe)),W5e=r.defineAsyncComponent(()=>Promise.resolve().then(()=>LGe)),X5e=r.defineAsyncComponent(()=>Promise.resolve().then(()=>VGe)),Y5e={name:"ContentVuer",props:{entry:Object,visible:{type:Boolean,default:!0}},components:{Button:xu,ContentBar:SV,Flatmap:U5e,Iframe:q5e,MultiFlatmap:K5e,Plot:G5e,Scaffold:W5e,Simulation:X5e},methods:{flatmapProvenanceReady:function(e){var t;(t=this.$refs.contentBar)==null||t.setupFlatmapContextCard(e),this.entriesStore.updateMapForEntry(this.entry,e)},getId:function(){return this.entry.id},getState:function(){var e;return(e=this.$refs.viewer)==null?void 0:e.getState()},resourceSelected:function(e){this.$emit("resource-selected",e)},scaffoldViewClicked:function(e){var t;this.entry.viewUrl!==e?this.entriesStore.updateViewForEntry({id:this.entry.id,viewUrl:e}):(t=this.$refs.viewer)==null||t.updateWithViewUrl(e)},search:function(e){var t;return(t=this.$refs.viewer)==null?void 0:t.search(e)},searchSuggestions:function(e,t){var n;(n=this.$refs.viewer)==null||n.searchSuggestions(e,t)},setPanesBoundary:function(){var e;(e=this.$refs.contentBar)==null||e.setBoundary(this.$refs.container)},speciesChanged:function(e){this.activeSpecies=e,this.$emit("species-changed",e)},onResize:function(){var e;(e=this.$refs.viewer)==null||e.onResize()},onConnectivityItemClose:function(){var e;(e=this.$refs.viewer)==null||e.onConnectivityItemClose()},onConnectivitySourceChange:function(e,t){var n;(n=this.$refs.viewer)==null||n.changeConnectivitySource(e,t)},onFlatmapMarkerUpdate:function(){var e;(e=this.$refs.viewer)==null||e.flatmapMarkerUpdate()},onGlobalViewerSettingsUpdate:function(){var e;(e=this.$refs.viewer)==null||e.updateViewerSettings()},onHoverUpdate:function(e){var t;(t=this.$refs.viewer)==null||t.sidebarHoverHighlight(e)},onShowConnectivity:function(e){var t;(t=this.$refs.viewer)==null||t.showConnectivity(e)},onShowConnectivityTooltips:function(e){var t;(t=this.$refs.viewer)==null||t.showConnectivityTooltips(e)},onShowReferenceConnectivity:function(e){var t;(t=this.$refs.viewer)==null||t.showConnectivitiesByReference(e)},onSidebarAnnotationClose:function(){var e;(e=this.$refs.viewer)==null||e.onSidebarAnnotationClose()},onStartHelp:function(){var e;(e=this.$refs.viewer)==null||e.startHelp()},onFilterVisibility:function(e){var t;(t=this.$refs.viewer)==null||t.setVisibilityFilter(e)},onLoadConnectivityDetail:function(e){var t;(t=this.$refs.viewer)==null||t.getKnowledgeTooltip(e)},toggleMinimap:function(e,t){var n;(n=this.$refs.viewer)==null||n.toggleMinimap(e,t)}},data:function(){return{mouseHovered:!1,activeSpecies:"Rat"}},computed:{...Mt.mapStores(Of,Ss),viewerType(){switch(this.entry.type){case"Biolucida":case"Iframe":case"Segmentation":return"Iframe";default:return this.entry.type}}}},Z5e={class:"component-container",ref:"container"};function J5e(e,t,n,o,a,i){const s=SV;return r.openBlock(),r.createElementBlock("div",{class:"content-container",onMouseover:t[0]||(t[0]=l=>e.mouseHovered=!0),onMouseleave:t[1]||(t[1]=l=>e.mouseHovered=!1)},[r.createVNode(s,{class:"toolbar",entry:n.entry,ref:"contentBar",onChooserChanged:i.onResize,onScaffoldViewClicked:i.scaffoldViewClicked,onVnodeMounted:i.setPanesBoundary},null,8,["entry","onChooserChanged","onScaffoldViewClicked","onVnodeMounted"]),r.createElementVNode("div",Z5e,[(r.openBlock(),r.createBlock(r.Suspense,null,{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.viewerType),{entry:n.entry,mouseHovered:e.mouseHovered,visible:n.visible,lazy:!0,ref:"viewer",onFlatmapProvenanceReady:i.flatmapProvenanceReady,onResourceSelected:i.resourceSelected,onSpeciesChanged:i.speciesChanged},null,40,["entry","mouseHovered","visible","onFlatmapProvenanceReady","onResourceSelected","onSpeciesChanged"]))]),_:1}))],512)],32)}const EV=tr(Y5e,[["render",J5e],["__scopeId","data-v-e2441ebd"]]);var _V={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(typeof window<"u"?window:Jte,function(){if(typeof window>"u")return null;var n=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")(),o=n.requestAnimationFrame||n.mozRequestAnimationFrame||n.webkitRequestAnimationFrame||function(u){return n.setTimeout(u,20)},a=n.cancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelAnimationFrame||function(u){n.clearTimeout(u)};function i(u,f){var h=Object.prototype.toString.call(u),m=h==="[object Array]"||h==="[object NodeList]"||h==="[object HTMLCollection]"||h==="[object Object]"||typeof jQuery<"u"&&u instanceof jQuery||typeof Elements<"u"&&u instanceof Elements,p=0,g=u.length;if(m)for(;p<g;p++)f(u[p]);else f(u)}function s(u){if(!u.getBoundingClientRect)return{width:u.offsetWidth,height:u.offsetHeight};var f=u.getBoundingClientRect();return{width:Math.round(f.width),height:Math.round(f.height)}}function l(u,f){Object.keys(f).forEach(function(h){u.style[h]=f[h]})}var c=function(u,f){var h=0;function m(){var g=[];this.add=function(b){g.push(b)};var v,y;this.call=function(b){for(v=0,y=g.length;v<y;v++)g[v].call(this,b)},this.remove=function(b){var x=[];for(v=0,y=g.length;v<y;v++)g[v]!==b&&x.push(g[v]);g=x},this.length=function(){return g.length}}function p(g,v){if(g){if(g.resizedAttached){g.resizedAttached.add(v);return}g.resizedAttached=new m,g.resizedAttached.add(v),g.resizeSensor=document.createElement("div"),g.resizeSensor.dir="ltr",g.resizeSensor.className="resize-sensor";var y={pointerEvents:"none",position:"absolute",left:"0px",top:"0px",right:"0px",bottom:"0px",overflow:"hidden",zIndex:"-1",visibility:"hidden",maxWidth:"100%"},b={position:"absolute",left:"0px",top:"0px",transition:"0s"};l(g.resizeSensor,y);var x=document.createElement("div");x.className="resize-sensor-expand",l(x,y);var w=document.createElement("div");l(w,b),x.appendChild(w);var k=document.createElement("div");k.className="resize-sensor-shrink",l(k,y);var C=document.createElement("div");l(C,b),l(C,{width:"200%",height:"200%"}),k.appendChild(C),g.resizeSensor.appendChild(x),g.resizeSensor.appendChild(k),g.appendChild(g.resizeSensor);var S=window.getComputedStyle(g),E=S?S.getPropertyValue("position"):null;E!=="absolute"&&E!=="relative"&&E!=="fixed"&&E!=="sticky"&&(g.style.position="relative");var _=!1,$=0,A=s(g),F=0,N=0,M=!0;h=0;var I=function(){var Y=g.offsetWidth,G=g.offsetHeight;w.style.width=Y+10+"px",w.style.height=G+10+"px",x.scrollLeft=Y+10,x.scrollTop=G+10,k.scrollLeft=Y+10,k.scrollTop=G+10},T=function(){if(M){var Y=g.offsetWidth===0&&g.offsetHeight===0;if(Y){h||(h=o(function(){h=0,T()}));return}else M=!1}I()};g.resizeSensor.resetSensor=T;var L=function(){$=0,_&&(F=A.width,N=A.height,g.resizedAttached&&g.resizedAttached.call(A))},R=function(){A=s(g),_=A.width!==F||A.height!==N,_&&!$&&($=o(L)),T()},V=function(Y,G,Q){Y.attachEvent?Y.attachEvent("on"+G,Q):Y.addEventListener(G,Q)};V(x,"scroll",R),V(k,"scroll",R),h=o(function(){h=0,T()})}}i(u,function(g){p(g,f)}),this.detach=function(g){h||(a(h),h=0),c.detach(u,g)},this.reset=function(){u.resizeSensor.resetSensor()}};if(c.reset=function(u){i(u,function(f){f.resizeSensor.resetSensor()})},c.detach=function(u,f){i(u,function(h){h&&(h.resizedAttached&&typeof f=="function"&&(h.resizedAttached.remove(f),h.resizedAttached.length())||h.resizeSensor&&(h.contains(h.resizeSensor)&&h.removeChild(h.resizeSensor),delete h.resizeSensor,delete h.resizedAttached))})},typeof MutationObserver<"u"){var d=new MutationObserver(function(u){for(var f in u)if(u.hasOwnProperty(f))for(var h=u[f].addedNodes,m=0;m<h.length;m++)h[m].resizeSensor&&c.reset(h[m])});document.addEventListener("DOMContentLoaded",function(u){d.observe(document.body,{childList:!0,subtree:!0})})}return c})})(_V);var Q5e=_V.exports;const e$e=a3(Q5e),t$e={name:"ResizeSensor",methods:{activate:function(){this._sensor||(this._sensor=new e$e(this.$refs.display,this.displayResize),this.displayResize())},deactivate:function(){this._sensor&&(this._sensor.detach(this.$refs.display,this.displayResize),delete this._sensor,this._sensor=void 0,this.displayResize())},displayResize:function(){this.$emit("resize")}},unmounted(){this.deactivate()},activated(){this.activate()},deactivated(){this.deactivate()},mounted:function(){this.activate()}},n$e={style:{height:"100%",width:"100%",position:"absolute"},ref:"display"};function r$e(e,t,n,o,a,i){return r.openBlock(),r.createElementBlock("div",n$e,null,512)}const $V=tr(t$e,[["render",r$e]]),o$e={name:"splitpanes",emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click"],props:{horizontal:{type:Boolean},pushOtherPanes:{type:Boolean,default:!0},dblClickSplitter:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean}},provide(){return{requestUpdate:this.requestUpdate,onPaneAdd:this.onPaneAdd,onPaneRemove:this.onPaneRemove,onPaneClick:this.onPaneClick}},data:()=>({container:null,ready:!1,panes:[],touch:{mouseDown:!1,dragging:!1,activeSplitter:null},splitterTaps:{splitter:null,timeoutId:null}}),computed:{panesCount(){return this.panes.length},indexedPanes(){return this.panes.reduce((e,t)=>(e[t.id]=t)&&e,{})}},methods:{updatePaneComponents(){this.panes.forEach(e=>{e.update&&e.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[e.id].size}%`})})},bindEvents(){document.addEventListener("mousemove",this.onMouseMove,{passive:!1}),document.addEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.addEventListener("touchmove",this.onMouseMove,{passive:!1}),document.addEventListener("touchend",this.onMouseUp))},unbindEvents(){document.removeEventListener("mousemove",this.onMouseMove,{passive:!1}),document.removeEventListener("mouseup",this.onMouseUp),"ontouchstart"in window&&(document.removeEventListener("touchmove",this.onMouseMove,{passive:!1}),document.removeEventListener("touchend",this.onMouseUp))},onMouseDown(e,t){this.bindEvents(),this.touch.mouseDown=!0,this.touch.activeSplitter=t},onMouseMove(e){this.touch.mouseDown&&(e.preventDefault(),this.touch.dragging=!0,this.calculatePanesSize(this.getCurrentMouseDrag(e)),this.$emit("resize",this.panes.map(t=>({min:t.min,max:t.max,size:t.size}))))},onMouseUp(){this.touch.dragging&&this.$emit("resized",this.panes.map(e=>({min:e.min,max:e.max,size:e.size}))),this.touch.mouseDown=!1,setTimeout(()=>{this.touch.dragging=!1,this.unbindEvents()},100)},onSplitterClick(e,t){"ontouchstart"in window&&(e.preventDefault(),this.dblClickSplitter&&(this.splitterTaps.splitter===t?(clearTimeout(this.splitterTaps.timeoutId),this.splitterTaps.timeoutId=null,this.onSplitterDblClick(e,t),this.splitterTaps.splitter=null):(this.splitterTaps.splitter=t,this.splitterTaps.timeoutId=setTimeout(()=>{this.splitterTaps.splitter=null},500)))),this.touch.dragging||this.$emit("splitter-click",this.panes[t])},onSplitterDblClick(e,t){let n=0;this.panes=this.panes.map((o,a)=>(o.size=a===t?o.max:o.min,a!==t&&(n+=o.min),o)),this.panes[t].size-=n,this.$emit("pane-maximize",this.panes[t]),this.$emit("resized",this.panes.map(o=>({min:o.min,max:o.max,size:o.size})))},onPaneClick(e,t){this.$emit("pane-click",this.indexedPanes[t])},getCurrentMouseDrag(e){const t=this.container.getBoundingClientRect(),{clientX:n,clientY:o}="ontouchstart"in window&&e.touches?e.touches[0]:e;return{x:n-t.left,y:o-t.top}},getCurrentDragPercentage(e){e=e[this.horizontal?"y":"x"];const t=this.container[this.horizontal?"clientHeight":"clientWidth"];return this.rtl&&!this.horizontal&&(e=t-e),e*100/t},calculatePanesSize(e){const t=this.touch.activeSplitter;let n={prevPanesSize:this.sumPrevPanesSize(t),nextPanesSize:this.sumNextPanesSize(t),prevReachedMinPanes:0,nextReachedMinPanes:0};const o=0+(this.pushOtherPanes?0:n.prevPanesSize),a=100-(this.pushOtherPanes?0:n.nextPanesSize),i=Math.max(Math.min(this.getCurrentDragPercentage(e),a),o);let s=[t,t+1],l=this.panes[s[0]]||null,c=this.panes[s[1]]||null;const d=l.max<100&&i>=l.max+n.prevPanesSize,u=c.max<100&&i<=100-(c.max+this.sumNextPanesSize(t+1));if(d||u){d?(l.size=l.max,c.size=Math.max(100-l.max-n.prevPanesSize-n.nextPanesSize,0)):(l.size=Math.max(100-c.max-n.prevPanesSize-this.sumNextPanesSize(t+1),0),c.size=c.max);return}if(this.pushOtherPanes){const f=this.doPushOtherPanes(n,i);if(!f)return;({sums:n,panesToResize:s}=f),l=this.panes[s[0]]||null,c=this.panes[s[1]]||null}l!==null&&(l.size=Math.min(Math.max(i-n.prevPanesSize-n.prevReachedMinPanes,l.min),l.max)),c!==null&&(c.size=Math.min(Math.max(100-i-n.nextPanesSize-n.nextReachedMinPanes,c.min),c.max))},doPushOtherPanes(e,t){const n=this.touch.activeSplitter,o=[n,n+1];return t<e.prevPanesSize+this.panes[o[0]].min&&(o[0]=this.findPrevExpandedPane(n).index,e.prevReachedMinPanes=0,o[0]<n&&this.panes.forEach((a,i)=>{i>o[0]&&i<=n&&(a.size=a.min,e.prevReachedMinPanes+=a.min)}),e.prevPanesSize=this.sumPrevPanesSize(o[0]),o[0]===void 0)?(e.prevReachedMinPanes=0,this.panes[0].size=this.panes[0].min,this.panes.forEach((a,i)=>{i>0&&i<=n&&(a.size=a.min,e.prevReachedMinPanes+=a.min)}),this.panes[o[1]].size=100-e.prevReachedMinPanes-this.panes[0].min-e.prevPanesSize-e.nextPanesSize,null):t>100-e.nextPanesSize-this.panes[o[1]].min&&(o[1]=this.findNextExpandedPane(n).index,e.nextReachedMinPanes=0,o[1]>n+1&&this.panes.forEach((a,i)=>{i>n&&i<o[1]&&(a.size=a.min,e.nextReachedMinPanes+=a.min)}),e.nextPanesSize=this.sumNextPanesSize(o[1]-1),o[1]===void 0)?(e.nextReachedMinPanes=0,this.panes[this.panesCount-1].size=this.panes[this.panesCount-1].min,this.panes.forEach((a,i)=>{i<this.panesCount-1&&i>=n+1&&(a.size=a.min,e.nextReachedMinPanes+=a.min)}),this.panes[o[0]].size=100-e.prevPanesSize-e.nextReachedMinPanes-this.panes[this.panesCount-1].min-e.nextPanesSize,null):{sums:e,panesToResize:o}},sumPrevPanesSize(e){return this.panes.reduce((t,n,o)=>t+(o<e?n.size:0),0)},sumNextPanesSize(e){return this.panes.reduce((t,n,o)=>t+(o>e+1?n.size:0),0)},findPrevExpandedPane(e){return[...this.panes].reverse().find(t=>t.index<e&&t.size>t.min)||{}},findNextExpandedPane(e){return this.panes.find(t=>t.index>e+1&&t.size>t.min)||{}},checkSplitpanesNodes(){Array.from(this.container.children).forEach(e=>{const t=e.classList.contains("splitpanes__pane"),n=e.classList.contains("splitpanes__splitter");!t&&!n&&(e.parentNode.removeChild(e),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))})},addSplitter(e,t,n=!1){const o=e-1,a=document.createElement("div");a.classList.add("splitpanes__splitter"),n||(a.onmousedown=i=>this.onMouseDown(i,o),typeof window<"u"&&"ontouchstart"in window&&(a.ontouchstart=i=>this.onMouseDown(i,o)),a.onclick=i=>this.onSplitterClick(i,o+1)),this.dblClickSplitter&&(a.ondblclick=i=>this.onSplitterDblClick(i,o+1)),t.parentNode.insertBefore(a,t)},removeSplitter(e){e.onmousedown=void 0,e.onclick=void 0,e.ondblclick=void 0,e.parentNode.removeChild(e)},redoSplitters(){const e=Array.from(this.container.children);e.forEach(n=>{n.className.includes("splitpanes__splitter")&&this.removeSplitter(n)});let t=0;e.forEach(n=>{n.className.includes("splitpanes__pane")&&(!t&&this.firstSplitter?this.addSplitter(t,n,!0):t&&this.addSplitter(t,n),t++)})},requestUpdate({target:e,...t}){const n=this.indexedPanes[e._.uid];Object.entries(t).forEach(([o,a])=>n[o]=a)},onPaneAdd(e){let t=-1;Array.from(e.$el.parentNode.children).some(a=>(a.className.includes("splitpanes__pane")&&t++,a===e.$el));const n=parseFloat(e.minSize),o=parseFloat(e.maxSize);this.panes.splice(t,0,{id:e._.uid,index:t,min:isNaN(n)?0:n,max:isNaN(o)?100:o,size:e.size===null?null:parseFloat(e.size),givenSize:e.size,update:e.update}),this.panes.forEach((a,i)=>a.index=i),this.ready&&this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({addedPane:this.panes[t]}),this.$emit("pane-add",{index:t,panes:this.panes.map(a=>({min:a.min,max:a.max,size:a.size}))})})},onPaneRemove(e){const t=this.panes.findIndex(o=>o.id===e._.uid),n=this.panes.splice(t,1)[0];this.panes.forEach((o,a)=>o.index=a),this.$nextTick(()=>{this.redoSplitters(),this.resetPaneSizes({removedPane:{...n,index:t}}),this.$emit("pane-remove",{removed:n,panes:this.panes.map(o=>({min:o.min,max:o.max,size:o.size}))})})},resetPaneSizes(e={}){!e.addedPane&&!e.removedPane?this.initialPanesSizing():this.panes.some(t=>t.givenSize!==null||t.min||t.max<100)?this.equalizeAfterAddOrRemove(e):this.equalize(),this.ready&&this.$emit("resized",this.panes.map(t=>({min:t.min,max:t.max,size:t.size})))},equalize(){const e=100/this.panesCount;let t=0;const n=[],o=[];this.panes.forEach(a=>{a.size=Math.max(Math.min(e,a.max),a.min),t-=a.size,a.size>=a.max&&n.push(a.id),a.size<=a.min&&o.push(a.id)}),t>.1&&this.readjustSizes(t,n,o)},initialPanesSizing(){let e=100;const t=[],n=[];let o=0;this.panes.forEach(i=>{e-=i.size,i.size!==null&&o++,i.size>=i.max&&t.push(i.id),i.size<=i.min&&n.push(i.id)});let a=100;e>.1&&(this.panes.forEach(i=>{i.size===null&&(i.size=Math.max(Math.min(e/(this.panesCount-o),i.max),i.min)),a-=i.size}),a>.1&&this.readjustSizes(e,t,n))},equalizeAfterAddOrRemove({addedPane:e,removedPane:t}={}){let n=100/this.panesCount,o=0;const a=[],i=[];e&&e.givenSize!==null&&(n=(100-e.givenSize)/(this.panesCount-1)),this.panes.forEach(s=>{o-=s.size,s.size>=s.max&&a.push(s.id),s.size<=s.min&&i.push(s.id)}),!(Math.abs(o)<.1)&&(this.panes.forEach(s=>{e&&e.givenSize!==null&&e.id===s.id||(s.size=Math.max(Math.min(n,s.max),s.min)),o-=s.size,s.size>=s.max&&a.push(s.id),s.size<=s.min&&i.push(s.id)}),o>.1&&this.readjustSizes(o,a,i))},readjustSizes(e,t,n){let o;e>0?o=e/(this.panesCount-t.length):o=e/(this.panesCount-n.length),this.panes.forEach((a,i)=>{if(e>0&&!t.includes(a.id)){const s=Math.max(Math.min(a.size+o,a.max),a.min),l=s-a.size;e-=l,a.size=s}else if(!n.includes(a.id)){const s=Math.max(Math.min(a.size+o,a.max),a.min),l=s-a.size;e-=l,a.size=s}a.update({[this.horizontal?"height":"width"]:`${this.indexedPanes[a.id].size}%`})}),Math.abs(e)>.1&&this.$nextTick(()=>{this.ready&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})}},watch:{panes:{deep:!0,immediate:!1,handler(){this.updatePaneComponents()}},horizontal(){this.updatePaneComponents()},firstSplitter(){this.redoSplitters()},dblClickSplitter(e){[...this.container.querySelectorAll(".splitpanes__splitter")].forEach((t,n)=>{t.ondblclick=e?o=>this.onSplitterDblClick(o,n):void 0})}},beforeUnmount(){this.ready=!1},mounted(){this.container=this.$refs.container,this.checkSplitpanesNodes(),this.redoSplitters(),this.resetPaneSizes(),this.$emit("ready"),this.ready=!0},render(){return r.h("div",{ref:"container",class:["splitpanes",`splitpanes--${this.horizontal?"horizontal":"vertical"}`,{"splitpanes--dragging":this.touch.dragging}]},this.$slots.default())}},a$e=(e,t)=>{const n=e.__vccOpts||e;for(const[o,a]of t)n[o]=a;return n},i$e={name:"pane",inject:["requestUpdate","onPaneAdd","onPaneRemove","onPaneClick"],props:{size:{type:[Number,String],default:null},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},data:()=>({style:{}}),mounted(){this.onPaneAdd(this)},beforeUnmount(){this.onPaneRemove(this)},methods:{update(e){this.style=e}},computed:{sizeNumber(){return this.size||this.size===0?parseFloat(this.size):null},minSizeNumber(){return parseFloat(this.minSize)},maxSizeNumber(){return parseFloat(this.maxSize)}},watch:{sizeNumber(e){this.requestUpdate({target:this,size:e})},minSizeNumber(e){this.requestUpdate({target:this,min:e})},maxSizeNumber(e){this.requestUpdate({target:this,max:e})}}};function s$e(e,t,n,o,a,i){return r.openBlock(),r.createElementBlock("div",{class:"splitpanes__pane",onClick:t[0]||(t[0]=s=>i.onPaneClick(s,e._.uid)),style:r.normalizeStyle(e.style)},[r.renderSlot(e.$slots,"default")],4)}const l$e={name:"CustomSplitter",components:{Splitpanes:o$e,Pane:a$e(i$e,[["render",s$e]]),ResizeSensor:$V},props:{index:{type:String,default:function(){return"split-1"}}},methods:{requestStylesUpdate:function(e){if(this.$refs&&e in this.$refs&&this.$refs[e]&&this.$refs[e][0]&&this.$refs[e][0].$el){const n=this.$refs[e][0].$el.getBoundingClientRect();$e.emit("PaneResize",{refName:e,rect:n})}},calculateStyles:function(e){this.$refs&&(e.startsWith("pane")?this.requestStylesUpdate(e):e.startsWith("split")&&this.customLayout[e].children.forEach(t=>{t.startsWith("pane")&&this.requestStylesUpdate(t)}))},childUnmounted:function(e){$e.emit("PaneUnmounted",{refName:e})}},computed:{...Mt.mapStores(Ss),children(){return this.customLayout[this.index].children},customLayout(){return this.splitFlowStore.customLayout},isHorizontal(){return this.customLayout[this.index].horizontal}}},c$e={style:{height:"100%",width:"100%"}};function d$e(e,t,n,o,a,i){const s=$V,l=r.resolveComponent("custom-splitter",!0),c=r.resolveComponent("pane"),d=r.resolveComponent("splitpanes");return r.openBlock(),r.createElementBlock("div",c$e,[r.createVNode(s,{onResize:t[0]||(t[0]=u=>i.calculateStyles(n.index))}),r.createVNode(d,{class:"default-theme",horizontal:i.isHorizontal,"dbl-click-splitter":!1},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.children,u=>(r.openBlock(),r.createBlock(c,{key:u,ref_for:!0,ref:u,onVnodeBeforeUnmount:f=>i.childUnmounted(u)},{default:r.withCtx(()=>[i.customLayout[u].content?(r.openBlock(),r.createBlock(s,{key:0,onResize:f=>i.calculateStyles(u)},null,8,["onResize"])):(r.openBlock(),r.createBlock(l,{key:u,index:u},null,8,["index"]))]),_:2},1032,["onVnodeBeforeUnmount"]))),128))]),_:1},8,["horizontal"])])}const FV=tr(l$e,[["render",d$e],["__scopeId","data-v-0667e71f"]]),AV=Mt.defineStore("connectivities",{state:()=>({activeConnectivityKeys:[],globalConnectivities:{},filterOptions:{},filterSources:{}}),getters:{getUniqueConnectivitiesByKeys:e=>{const t=e.activeConnectivityKeys.reduce((n,o)=>{const a=e.globalConnectivities[o];if(!a)return n;for(const i of a){const s=i.id;n[s]=n[s]?{...n[s],...i}:{...i}}return n},{});return Object.values(t).sort((n,o)=>n.label.localeCompare(o.label))},getUniqueFilterOptionsByKeys:e=>{const t=e.activeConnectivityKeys.reduce((n,o)=>{const a=e.filterOptions[o];if(!a)return n;for(const i of a)if(n[i.key]){const s=[...n[i.key].children,...i.children],l=Array.from(new Map(s.map(c=>[c.key,c])).values());n[i.key].children=l}else n[i.key]={...i};return n},{});return Object.values(t)},getUniqueFilterSourcesByKeys:e=>e.activeConnectivityKeys.reduce((n,o)=>{const a=e.filterSources[o];if(!a)return n;for(const[i,s]of Object.entries(a)){n[i]||(n[i]={});for(const[l,c]of Object.entries(s))n[i][l]=n[i][l]?Array.from(new Set([...n[i][l],...c])):[...c]}return n},{})},actions:{updateActiveConnectivityKeys(e){this.activeConnectivityKeys=e},updateGlobalConnectivities(e){this.globalConnectivities=e},updateFilterOptions(e){this.filterOptions=e},updateFilterSources(e){this.filterSources=e}}}),u$e={name:"SplitDialog",components:{ContentVuer:EV,CustomSplitter:FV},props:{entries:{type:Array,default:function(){return[]}}},data:function(){return{styles:{},query:"",filter:[]}},methods:{resourceSelected:function(e){this.$emit("resource-selected",e)},speciesChanged:function(e){this.$emit("species-changed",e)},getClass:function(e){return this.isIdVisible(e)?this.getRefsName(e):"inactive"},getRefsName:function(e){const t=this.splitFlowStore.getPaneNameById(e);return t&&(t in this.styles||(this.styles[t]={})),t},getStyle:function(e){const t=this.getRefsName(e);return t&&t in this.styles&&this.styles[t]?this.styles[t]:{}},getActiveContents:function(){const e=[],t=this.$refs.content;return t&&t.forEach(n=>{n.visible&&e.push(n)}),e},isIdVisible:function(e){const t=this.splitFlowStore.getPaneNameById(e);let n=!1;return t!==void 0&&(n=this.splitFlowStore.isPaneActive(t)),n},getContentsWithId:function(e){let t=this.$refs.content;for(let n=0;n<t.length;n++)if(t[n].getId()==e)return t[n]},getContentsState:function(){let e=[],t=this.$refs.content;for(let n=0;n<t.length;n++)e.push(t[n].getState());return e},setStyles:function(e,t){if(this.$refs&&this.$refs.tabContainer){const n=this.$refs.tabContainer.getBoundingClientRect(),o={};o.width=`${t.width}px`,o.left=`${t.left-n.left}px`,o.height=`${t.height}px`,o.top=`${t.top-n.top}px`,o.display="block",this.styles[e]=o}},hidePane:function(e){if(this.$refs&&"tabContainer"in this.$refs){const t={};t.display="none",this.styles[e]=t}},resize:function(){this.__userResize__=!0},resized:function(e,t){this.__userResize__&&this.splitFlowStore.setSplitter({name:e,value:t[0].size}),this.__userResize__=!1},onSpeciesLayoutConnectivityUpdate:function(){let e=this.splitFlowStore.getActivePaneIds();const t=[307,"307"],n=Object.keys(this.connectivitiesStore.globalConnectivities).find(a=>a.includes("sckan")),o=Array.from(new Set(this.entries.filter(a=>e.includes(a.id)&&(a.uuid&&(a.type==="Flatmap"||a.type==="MultiFlatmap")||a.type==="Scaffold"&&a.resource&&(a.isBodyScaffold||t.includes(a.discoverId)))).map(a=>{if(a.type==="Flatmap"||a.type==="MultiFlatmap")return a.uuid;if(a.type==="Scaffold")return a.resource})));if(o.length){this.connectivitiesStore.updateActiveConnectivityKeys(o);const a=this.connectivitiesStore.getUniqueFilterOptionsByKeys;$e.emit("connectivity-filter-options",a)}else{const a=this.connectivitiesStore.globalConnectivities[n]||[];$e.emit("connectivity-knowledge",{data:a,highlight:[],processed:!1}),$e.emit("connectivity-filter-options",[]),this.connectivitiesStore.updateActiveConnectivityKeys([n])}},getGeneralSearchedId:function(e,t,n="query"){const o=[];return e.forEach(a=>{let i=[JSON.stringify(a["nerve-label"])];(n="query")&&(i=[...i,a.id,a.label,a["long-label"],JSON.stringify(a.nerves)]),i.some(l=>l==null?void 0:l.toLowerCase().includes(t.toLowerCase()))&&!o.includes(a.id)&&o.push(a.id)}),o},getFlatmapSearchedId:function(e,t){const n=[],o=e.mapImp.search(t);return(o.__featureIds||o.featureIds).forEach(i=>{const s=e.mapImp.annotation(i);[s.id,s.name,s.label,s.models,s.source].some(d=>d&&d.toLowerCase().includes(t.toLowerCase()))&&s.models&&!n.includes(s.models)&&n.push(s.models)}),n},getLatestFlatmapUUID:async function(e,t){return(await(await fetch(e)).json()).filter(s=>s.id===t).sort((s,l)=>l.created.localeCompare(s.created))[0].uuid},connectivityQueryFilter:async function(e){this.query="",this.filter=[];const t=this.getActiveContents(),n=this.settingsStore.flatmapAPI,o=[],a=[];let i=[],s=!1,l=[],c=[],d="";const u=this.connectivitiesStore.getUniqueFilterOptionsByKeys,f=this.connectivitiesStore.getUniqueFilterSourcesByKeys;let h=this.connectivitiesStore.getUniqueConnectivitiesByKeys;for(const b of t){const x=b.$refs.viewer;if(x){const w=x.$refs.multiflatmap,k=x.$refs.flatmap,C=x.$refs.scaffold,S=x.$refs.iframe,E=x.$refs.plot,_=x.$refs.simulation;let $=null;if(w){const F=w.getCurrentFlatmap();F&&F.mapImp&&($=F,d=$.mapImp.uuid)}else k&&k.mapImp?($=k,d=$.mapImp.uuid):($=C||S||E||_,d=await this.getLatestFlatmapUUID(n,"human-flatmap_male"));const A=k||w;if(e){if(this.query=e.query,e.query){const T=this.query.replace(/["']/g,"").split(",").map(V=>V.trim()).filter(V=>V),L=[];for(let V=0;V<T.length;V++)A?L.push(this.getFlatmapSearchedId($,T[V])):L.push(this.getGeneralSearchedId(h,T[V],"query"));const R=[...new Set(L.flat())];if(R.length){o.push(...R);const V=A?await e9(n,d,R):R;l.push(...V)}}const F={origins:[],vias:[],destinations:[],all:[]};let N={};if(C&&x.syncFilter(e.filter),e.filter.forEach(T=>{var V,Y;const L=T.facetPropPath.split(".").pop(),R=T.facetPropPath.includes("flatmap.connectivity.source");if(R&&((V=T.facet)==null?void 0:V.toLowerCase())!=="show all"){const G=T.facet.replace(",[",", ["),Q=T.facetPropPath.split(".").pop();if(Q==="origin")F.origins.push(G);else if(Q==="destination")F.destinations.push(G);else if(Q==="via")F.vias.push(G);else{const ne=JSON.parse(G).flat(1/0);F.all.push(...ne)}}if(C)!R&&((Y=T.facet)==null?void 0:Y.toLowerCase())!=="show all"&&(L in N||(N[L]=[]),N[L].push(...this.getGeneralSearchedId(h,T.facet,"facet")));else if(A&&!R){const G=u.find(Q=>Q.key.includes(L));G&&G.children.forEach(Q=>{if(Q.label.toLowerCase()===T.facet.toLowerCase()&&Q.key){const ne=Q.key.split(".").pop();L in N||(N[L]=[]),N[L].push(...f[L][ne])}})}}),F.origins.length||F.destinations.length||F.vias.length){const T={flatmapAPI:n,knowledgeSource:d,origins:F.origins,destinations:F.destinations,vias:F.vias};"ovd"in N||(N.ovd=[]),N.ovd.push(...await QSe(T))}else F.all.length&&("all"in N||(N.all=[]),N.all.push(...await e9(n,d,F.all)));const M=Object.values(N);this.filter=[...this.filter,...M];const I=this.filter.length?this.filter.reduce((T,L)=>T.filter(R=>L.includes(R))):[];c.push(...I)}}}let m;this.query&&!this.filter.length?m=l:!this.query&&this.filter.length?m=c:this.query&&this.filter.length&&(m=l.filter(b=>c.includes(b))),m&&(i.push(...m),h=h.filter(b=>m.includes(b.id)),s=!0),a.push(...h);const p=[...new Set(o)],g=[...new Set(i)];let v=Array.from(new Map(a.map(b=>[b.id,b])).values());v=[...v.filter(b=>p.includes(b.id)),...v.filter(b=>!p.includes(b.id))];const y={data:v,highlight:g,processed:s};$e.emit("connectivity-knowledge",y)},updateFlatmapMinimap:function(){const e=this.splitFlowStore.getActivePaneIds();let t=this.$refs.content,n=[];for(let i=0;i<t.length;i++)t[i].viewerType==="MultiFlatmap"&&n.push(t[i]);n.sort((i,s)=>s.visible-i.visible);const o=!(e.length>4),a=this.settingsStore.displayMinimap;this.settingsStore.updateDisplayMinimap(o),n.forEach(i=>{i.toggleMinimap(o,a)})}},computed:{...Mt.mapStores(Ss,AV,vi),horizontal(){return this.splitFlowStore.activeView==="2horpanel"},splitters(){return this.splitFlowStore.splitters}},mounted:function(){$e.on("PaneResize",e=>{this.setStyles(e.refName,e.rect),this.updateFlatmapMinimap()}),$e.on("PaneUnmounted",e=>{this.hidePane(e.refName)}),$e.on("species-layout-connectivity-update",()=>{this.onSpeciesLayoutConnectivityUpdate()}),$e.on("connectivity-query-filter",e=>{this.connectivityQueryFilter(e)}),$e.on("hoverUpdate",e=>{this.getActiveContents().forEach(n=>{n.onHoverUpdate(e)})}),$e.on("startHelp",()=>{this.getActiveContents().forEach(t=>{t.onStartHelp()})}),$e.on("connectivity-item-close",()=>{this.getActiveContents().forEach(t=>{t.onConnectivityItemClose()})}),$e.on("sidebar-annotation-close",()=>{this.getActiveContents().forEach(t=>{t.onSidebarAnnotationClose()})}),$e.on("globalViewerSettingsUpdate",()=>{this.$refs.content.forEach(t=>{t.onGlobalViewerSettingsUpdate()})}),$e.on("markerUpdate",()=>{this.$refs.content.forEach(t=>{t.onFlatmapMarkerUpdate()})}),$e.on("connectivity-hovered",e=>{this.getActiveContents().forEach(n=>{n.onShowConnectivityTooltips(e)})}),$e.on("connectivity-source-change",e=>{const t=this.getActiveContents(),n=[];t.forEach(o=>{o.onConnectivitySourceChange(e,n)})}),$e.on("show-connectivity",e=>{this.getActiveContents().forEach(n=>{n.onShowConnectivity(e)})}),$e.on("show-reference-connectivities",e=>{this.getActiveContents().forEach(n=>{n.onShowReferenceConnectivity(e)})}),$e.on("filter-visibility",e=>{this.getActiveContents().forEach(n=>{n.onFilterVisibility(e)})})}},f$e={class:"tab-container",ref:"tabContainer"};function p$e(e,t,n,o,a,i){const s=FV,l=EV;return r.openBlock(),r.createElementBlock("div",f$e,[r.createVNode(s,{index:"split-1",key:"split-1"}),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(n.entries,c=>(r.openBlock(),r.createElementBlock("div",{key:c.id,style:r.normalizeStyle(i.getStyle(c.id)),class:r.normalizeClass([i.getClass(c.id),"contentvuer"])},[(r.openBlock(),r.createBlock(l,{key:c.id,entry:c,ref_for:!0,ref:"content",onResourceSelected:i.resourceSelected,onSpeciesChanged:i.speciesChanged,visible:i.isIdVisible(c.id)},null,8,["entry","onResourceSelected","onSpeciesChanged","visible"]))],6))),128))],512)}const BV=tr(u$e,[["render",p$e],["__scopeId","data-v-9572e54d"]]),h$e={name:"SearchControls",props:{failedSearch:void 0},components:{Autocomplete:ZF,MapSvgIcon:OS},methods:{fetchSuggestions:function(e,t){e===""?t([]):this.$emit("fetch-suggestions",{term:e,cb:t})}},data:function(){return{searchText:""}}},m$e=e=>(r.pushScopeId("data-v-eb3db1ae"),e=e(),r.popScopeId(),e),g$e={class:"search-container"},y$e=m$e(()=>r.createElementVNode("div",{class:"text search-text"}," Search within display ",-1)),v$e={key:0,class:"text not-found-text"};function b$e(e,t,n,o,a,i){const s=ZF,l=r.resolveComponent("map-svg-icon");return r.openBlock(),r.createElementBlock("div",g$e,[y$e,r.createVNode(s,{class:"search-box",placeholder:"Search",modelValue:e.searchText,"onUpdate:modelValue":t[0]||(t[0]=c=>e.searchText=c),"fetch-suggestions":i.fetchSuggestions,onKeyup:t[1]||(t[1]=r.withKeys(c=>e.$emit("search",e.searchText),["enter"])),onSelect:t[2]||(t[2]=c=>e.$emit("search",c.value)),teleported:!1,"popper-class":"autocomplete-popper"},null,8,["modelValue","fetch-suggestions"]),r.createVNode(l,{icon:"magnifyingGlass",class:"magnify",onClick:t[3]||(t[3]=c=>e.$emit("search",e.searchText))}),n.failedSearch?(r.openBlock(),r.createElementBlock("div",v$e," '"+r.toDisplayString(n.failedSearch)+"' not found ",1)):r.createCommentVNode("",!0)])}const TV=tr(h$e,[["render",b$e],["__scopeId","data-v-eb3db1ae"]]),w$e={name:"DialogToolbarContent",components:{Button:xu,Checkbox:f3,Col:k3,Icon:Un,Input:mh,Popover:$h,Radio:b3,RadioGroup:w3,Row:Ch,MapSvgIcon:OS,MapSvgSpriteColor:yV,SearchControls:TV,ElIconCopyDocument:Z1},props:{numberOfEntries:{type:Number,default:0},showIcons:{type:Boolean,default:!1}},inject:["showGlobalSettings"],computed:{...Mt.mapStores(Of,vi,Ss),activeView(){return this.splitFlowStore.activeView},helpDelay(){return this.settingsStore.helpDelay},shareLink(){return this.settingsStore.shareLink},offlineAnnotationEnabled(){return this.settingsStore.offlineAnnotationEnabled},viewIcons(){return this.splitFlowStore.viewIcons}},watch:{shareLink:function(){this.loadingLink=!1}},data:function(){return{activeViewRef:void 0,displayShareOptions:!1,ElIconCopyDocument:r.shallowRef(Z1),exportAnnotation:!1,failedSearch:void 0,globalSettings:{},globalSettingRef:void 0,isFullscreen:!1,loadingLink:!0,permalinkRef:void 0,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 feature and viewing its associated network connections",Annotation:["View feature annotations","Add, comment on and view feature annotations"]},authorisedUser:!1,mapLoaded:!1}},methods:{loadGlobalSettings:function(){this.globalSettings={...this.globalSettings,...this.settingsStore.globalSettings}},updateViewingMode:function(e,t){const{target:n}=e;n.closest(".el-checkbox")||(this.globalSettings.viewingMode=t,t==="Exploration"?(this.globalSettings.displayMarkers=!0,this.globalSettings.interactiveMode="dataset"):t==="Annotation"?(this.globalSettings.displayMarkers=!1,this.globalSettings.interactiveMode="dataset"):(this.globalSettings.displayMarkers=!1,this.globalSettings.interactiveMode="connectivity"),this.updateGlobalSettings("viewingMode"))},updateGlobalSettings:function(e){const t=this.settingsStore.getUpdatedGlobalSettingsKey(this.globalSettings);this.settingsStore.updateGlobalSettings(this.globalSettings),t.includes("displayMarkers")&&$e.emit("markerUpdate"),t.includes("interactiveMode")&&$e.emit("modeUpdate",this.globalSettings.interactiveMode),(t.includes("viewingMode")||t.includes("connectionType")||t.includes("flightPathDisplay")||t.includes("organsDisplay")||t.includes("outlinesDisplay")||t.includes("backgroundDisplay"))&&$e.emit("globalViewerSettingsUpdate");let n=this.globalSettings[e];e==="flightPathDisplay"&&(n=this.globalSettings.flightPathDisplay?"3D":"2D"),e==="organsDisplay"&&(n=this.globalSettings.organsDisplay?"Color":"Grayscale"),e==="outlinesDisplay"&&(n=this.globalSettings.outlinesDisplay?"Show":"Hide"),t.length&&Bt.sendEvent({event:"interaction_event",event_name:`portal_maps_settings_${e}`,category:n,location:"map_toolbar"})},titleClicked:function(e){this.$emit("titleClicked",e)},startHelp:function(){$e.emit("startHelp"),Bt.sendEvent({event:"interaction_event",event_name:"portal_maps_toolbar_help",category:"help_mode_start",location:"map_toolbar"})},onFullscreen:function(){this.$emit("onFullscreen"),this.isFullscreen=!this.isFullscreen,this.isFullscreen&&Bt.sendEvent({event:"interaction_event",event_name:"portal_maps_toolbar_fullscreen",category:this.isFullscreen?"enter":"exit",location:"map_toolbar"})},onFullscreenEsc:function(){document.fullscreenElement||(this.isFullscreen=!1,Bt.sendEvent({event:"interaction_event",event_name:"portal_maps_toolbar_fullscreen",category:this.isFullscreen?"enter":"exit",location:"map_toolbar"}))},close:function(){this.$emit("close")},copyShareLink:function(){document&&(this.$refs.linkInput.$el.querySelector("input").select(),document.execCommand("copy"),Bt.sendEvent({event:"interaction_event",event_name:"portal_maps_permalink",category:"permalink_copy",location:"map_toolbar"}))},setFailedSearch:function(e){this.failedSearch=e},requestShareLink:function(){sessionStorage.getItem("anonymous-annotation")?this.displayShareOptions=!0:this.getShareLink(!1)},getShareLink:function(e){this.displayShareOptions=!1,this.loadingLink=!0,$e.emit("updateShareLinkRequested",e),Bt.sendEvent({event:"interaction_event",event_name:"portal_maps_permalink",category:"permalink_generate",location:"map_toolbar"})},viewClicked:function(e){const t=this.activeView;if(this.splitFlowStore.updateActiveView({view:e,entries:this.entriesStore.entries}),e!==t){const n=this.viewIcons.find(o=>o.icon===e);Bt.sendEvent({event:"interaction_event",event_name:"portal_maps_toolbar_split_view",category:(n==null?void 0:n.name)||"",location:"map_toolbar"})}this.$refs.viewPopover&&this.$refs.viewPopover.hide()}},mounted:function(){this.activeViewRef=r.shallowRef(this.$refs.activeViewRef),this.permalinkRef=r.shallowRef(this.$refs.permalinkRef),this.globalSettingRef=r.shallowRef(this.$refs.globalSettingRef),$e.on("mapLoaded",e=>{this.mapLoaded=!0}),document.addEventListener("fullscreenchange",this.onFullscreenEsc),this.loadGlobalSettings()},unmounted:function(){document.removeEventListener("fullscreenchange",this.onFullscreenEsc)}},ea=e=>(r.pushScopeId("data-v-1cc10ca9"),e=e(),r.popScopeId(),e),x$e={class:"header"},k$e={class:"viewing-mode-selector"},C$e={class:"el-dropdown-link"},S$e={class:"toolbar-dropdown-badge"},E$e=ea(()=>r.createElementVNode("h4",null,"Viewing Mode:",-1)),_$e={class:"el-option__description"},$$e={key:0,class:"setting-popover-block"},F$e={class:"el-radio__description"},A$e={key:0},B$e={key:1},T$e={key:2},N$e={key:3},M$e=ea(()=>r.createElementVNode("br",null,null,-1)),O$e=ea(()=>r.createElementVNode("br",null,null,-1)),I$e={class:"setting-popover-inner"},L$e=ea(()=>r.createElementVNode("h4",null,"Display options:",-1)),R$e={key:0,class:"setting-popover-block"},P$e=ea(()=>r.createElementVNode("h5",null,"Flight path",-1)),V$e={key:1,class:"setting-popover-block"},D$e=ea(()=>r.createElementVNode("h5",null,"Organs",-1)),z$e={key:2,class:"setting-popover-block"},j$e=ea(()=>r.createElementVNode("h5",null,"Apply outlines",-1)),H$e={key:3,class:"setting-popover-block"},U$e=ea(()=>r.createElementVNode("h5",null,"Background color",-1)),q$e=ea(()=>r.createElementVNode("span",{style:{"--bg-color":"white"}},"white",-1)),K$e=ea(()=>r.createElementVNode("span",{style:{"--bg-color":"lightskyblue"}},"lightskyblue",-1)),G$e=ea(()=>r.createElementVNode("span",{style:{"--bg-color":"black"}},"black",-1));function W$e(e,t,n,o,a,i){const s=r.resolveComponent("map-svg-sprite-color"),l=TV,c=VZ,d=Un,u=sJ,f=GZ,h=lo,m=Sne,p=w3,g=noe,v=roe,y=toe,b=r.resolveComponent("map-svg-icon"),x=k3,w=Ch,k=$h,C=xu,S=f3,E=mh,_=b3,$=ey,A=wc;return r.openBlock(),r.createElementBlock("div",x$e,[r.createVNode(s),r.createVNode(l,{onSearch:t[0]||(t[0]=F=>{e.$emit("local-search",{term:F})}),onFetchSuggestions:t[1]||(t[1]=F=>{e.$emit("fetch-suggestions",{data:F})}),failedSearch:e.failedSearch},null,8,["failedSearch"]),r.createVNode(w,{class:"icon-group"},{default:r.withCtx(()=>[r.createElementVNode("div",k$e,[r.createTextVNode(" Viewing Mode: "),r.createVNode(y,{teleported:!1,trigger:"hover",class:"toolbar-dropdown","popper-class":"toolbar-dropdown-popper","hide-on-click":!1,disabled:!e.mapLoaded,placement:"bottom-end"},{dropdown:r.withCtx(()=>[E$e,r.createVNode(v,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.viewingModes,(F,N,M)=>(r.openBlock(),r.createBlock(g,{key:N,onClick:I=>i.updateViewingMode(I,N),class:r.normalizeClass({"is-selected":e.globalSettings.viewingMode===N})},{default:r.withCtx(()=>[r.createElementVNode("h5",null,[N==="Exploration"?(r.openBlock(),r.createBlock(d,{key:0,class:"el-icon--left"},{default:r.withCtx(()=>[r.createVNode(c)]),_:1})):r.createCommentVNode("",!0),N==="Neuron Connection"?(r.openBlock(),r.createBlock(d,{key:1,class:"el-icon--left"},{default:r.withCtx(()=>[r.createVNode(u)]),_:1})):r.createCommentVNode("",!0),N==="Annotation"?(r.openBlock(),r.createBlock(d,{key:2,class:"el-icon--left"},{default:r.withCtx(()=>[r.createVNode(f)]),_:1})):r.createCommentVNode("",!0),r.createTextVNode(" "+r.toDisplayString(N),1)]),r.createElementVNode("small",_$e,[N==="Annotation"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[e.authorisedUser?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createTextVNode(r.toDisplayString(F[1]),1)],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(F[0]),1)],64)),i.offlineAnnotationEnabled?(r.openBlock(),r.createElementBlock(r.Fragment,{key:2},[r.createTextVNode(" (Anonymous annotate) ")],64)):r.createCommentVNode("",!0)],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(F),1)],64))]),N==="Neuron Connection"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},["connectionType"in e.globalSettings?(r.openBlock(),r.createElementBlock("div",$$e,[r.createVNode(p,{modelValue:e.globalSettings.connectionType,"onUpdate:modelValue":t[2]||(t[2]=I=>e.globalSettings.connectionType=I),onChange:t[3]||(t[3]=I=>i.updateGlobalSettings("connectionType"))},{default:r.withCtx(()=>[r.createVNode(m,{value:"Origin",size:"small"},{default:r.withCtx(()=>[r.createTextVNode("Origin")]),_:1}),r.createVNode(m,{value:"Via",size:"small"},{default:r.withCtx(()=>[r.createTextVNode("Via")]),_:1}),r.createVNode(m,{value:"Destination",size:"small"},{default:r.withCtx(()=>[r.createTextVNode("Destination")]),_:1}),r.createVNode(m,{value:"All",size:"small"},{default:r.withCtx(()=>[r.createTextVNode("All")]),_:1})]),_:1},8,["modelValue"]),r.createElementVNode("div",F$e,[e.globalSettings.connectionType==="Origin"?(r.openBlock(),r.createElementBlock("small",A$e," Neuron populations beginning at a location. ")):e.globalSettings.connectionType==="Via"?(r.openBlock(),r.createElementBlock("small",B$e," Neuron populations that run through a location. ")):e.globalSettings.connectionType==="Destination"?(r.openBlock(),r.createElementBlock("small",T$e," Neuron populations terminating at a location. ")):(r.openBlock(),r.createElementBlock("small",N$e," Neuron populations associated with a location (or) Neuron populations that share at least one edge with another neuron population. "))])])):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0)]),_:2},1032,["onClick","class"]))),128))]),_:1})]),default:r.withCtx(()=>[r.createElementVNode("span",C$e,[e.globalSettings.viewingMode==="Exploration"?(r.openBlock(),r.createBlock(d,{key:0,class:"el-icon--left"},{default:r.withCtx(()=>[r.createVNode(c)]),_:1})):r.createCommentVNode("",!0),e.globalSettings.viewingMode==="Neuron Connection"?(r.openBlock(),r.createBlock(d,{key:1,class:"el-icon--left"},{default:r.withCtx(()=>[r.createVNode(u)]),_:1})):r.createCommentVNode("",!0),e.globalSettings.viewingMode==="Annotation"?(r.openBlock(),r.createBlock(d,{key:2,class:"el-icon--left"},{default:r.withCtx(()=>[r.createVNode(f)]),_:1})):r.createCommentVNode("",!0),r.createTextVNode(" "+r.toDisplayString(e.globalSettings.viewingMode)+" ",1),e.globalSettings.viewingMode==="Neuron Connection"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:3},[r.createTextVNode(" "),r.createElementVNode("small",S$e,[r.createElementVNode("em",null,r.toDisplayString(e.globalSettings.connectionType),1)])],64)):r.createCommentVNode("",!0),r.createVNode(d,{class:"el-icon--right"},{default:r.withCtx(()=>[r.createVNode(h)]),_:1})])]),_:1},8,["disabled"])]),e.activeViewRef?(r.openBlock(),r.createBlock(k,{key:0,"virtual-ref":e.activeViewRef,ref:"viewPopover",placement:"bottom",width:"133",teleported:!1,trigger:"click","popper-class":"view-icon-popover","virtual-triggering":""},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.viewIcons,F=>(r.openBlock(),r.createBlock(w,{gutter:20,key:F.name,class:r.normalizeClass([{active:F.icon==i.activeView},{disabled:F.min>n.numberOfEntries},"view-icon-row"]),onClick:N=>i.viewClicked(F.icon)},{default:r.withCtx(()=>[r.createVNode(x,{span:4},{default:r.withCtx(()=>[r.createVNode(b,{icon:F.icon,class:"view-icon"},null,8,["icon"])]),_:2},1024),r.createVNode(x,{offset:2,span:18,class:"view-text"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(F.name),1)]),_:2},1024)]),_:2},1032,["class","onClick"]))),128))]),_:1},8,["virtual-ref"])):r.createCommentVNode("",!0),r.createVNode(k,{class:"tooltip",content:"Split screen",placement:"bottom-end","show-after":i.helpDelay,teleported:!1,trigger:"hover","popper-class":"header-popper"},{reference:r.withCtx(()=>[r.createVNode(b,{icon:i.activeView,ref:"activeViewRef",class:r.normalizeClass([{disabled:1>=n.numberOfEntries},"header-icon","splitscreen-icon"])},null,8,["icon","class"])]),_:1},8,["show-after"]),r.createVNode(k,{class:"tooltip",content:"Help",placement:"bottom-end","show-after":i.helpDelay,teleported:!1,trigger:"hover","popper-class":"header-popper"},{reference:r.withCtx(()=>[r.createVNode(b,{icon:"tooltips",class:"header-icon",onClick:t[4]||(t[4]=F=>i.startHelp())})]),_:1},8,["show-after"]),r.createVNode(k,{class:"tooltip",content:"Fullscreen",placement:"bottom-end","show-after":i.helpDelay,teleported:!1,trigger:"hover","popper-class":"header-popper"},{reference:r.withCtx(()=>[r.withDirectives(r.createVNode(b,{icon:"fullScreen",class:"header-icon",onClick:i.onFullscreen},null,8,["onClick"]),[[r.vShow,!e.isFullscreen]])]),_:1},8,["show-after"]),r.createVNode(k,{class:"tooltip",content:"Exit fullscreen",placement:"bottom-end","show-after":i.helpDelay,teleported:!1,trigger:"hover","popper-class":"header-popper"},{reference:r.withCtx(()=>[r.withDirectives(r.createVNode(b,{icon:"closeFullScreen",class:"header-icon",onClick:i.onFullscreen},null,8,["onClick"]),[[r.vShow,e.isFullscreen]])]),_:1},8,["show-after"]),e.permalinkRef?(r.openBlock(),r.createBlock(k,{key:1,ref:"linkPopover","virtual-ref":e.permalinkRef,placement:"bottom-end",width:"400",teleported:!1,trigger:"click","popper-class":"link-popover","virtual-triggering":""},{default:r.withCtx(()=>[e.displayShareOptions?(r.openBlock(),r.createBlock(w,{key:0},{default:r.withCtx(()=>[r.createVNode(x,{offset:3,span:8},{default:r.withCtx(()=>[r.createVNode(C,{type:"primary",size:"small",onClick:t[5]||(t[5]=F=>i.getShareLink(e.exportAnnotation)),class:"share-options"},{default:r.withCtx(()=>[r.createTextVNode(" Create Permalink ")]),_:1})]),_:1}),r.createVNode(x,{span:10},{default:r.withCtx(()=>[r.createVNode(k,{class:"tooltip",placement:"bottom-end","show-after":i.helpDelay,teleported:!1,trigger:"hover","popper-class":"header-popper"},{reference:r.withCtx(()=>[r.createVNode(S,{modelValue:e.exportAnnotation,"onUpdate:modelValue":t[6]||(t[6]=F=>e.exportAnnotation=F),size:"small"},{default:r.withCtx(()=>[r.createTextVNode(" Export Annotations ")]),_:1},8,["modelValue"])]),default:r.withCtx(()=>[r.createTextVNode(" Create a permalink with anonymous annotations. "),M$e,r.createTextVNode(" NOTE: Annotations will only be stored for "),O$e,r.createTextVNode(" 30 days on the server. ")]),_:1},8,["show-after"])]),_:1})]),_:1})):r.withDirectives((r.openBlock(),r.createBlock(w,{key:1,gutter:20,"element-loading-text":"Creating link..."},{default:r.withCtx(()=>[r.createVNode(x,{span:20},{default:r.withCtx(()=>[r.createVNode(E,{class:"link-input",size:"small",placeholder:"Permanant Link Here",readonly:!0,modelValue:i.shareLink,"onUpdate:modelValue":t[7]||(t[7]=F=>i.shareLink=F),ref:"linkInput"},null,8,["modelValue"])]),_:1}),r.createVNode(x,{span:4},{default:r.withCtx(()=>[r.createVNode(k,{class:"tooltip",content:"Copy link",placement:"bottom-end","show-after":i.helpDelay,teleported:!1,trigger:"hover","popper-class":"header-popper"},{reference:r.withCtx(()=>[r.createVNode(C,{class:"copy-button",icon:e.ElIconCopyDocument,size:"small",onClick:i.copyShareLink},null,8,["icon","onClick"])]),_:1},8,["show-after"])]),_:1})]),_:1})),[[A,e.loadingLink]])]),_:1},8,["virtual-ref"])):r.createCommentVNode("",!0),r.createVNode(k,{class:"tooltip",content:"Get permalink",placement:"bottom-end","show-after":i.helpDelay,teleported:!1,trigger:"hover","popper-class":"header-popper"},{reference:r.withCtx(()=>[r.withDirectives(r.createVNode(b,{icon:"permalink",ref:"permalinkRef",class:"header-icon",onClick:i.requestShareLink},null,8,["onClick"]),[[r.vShow,i.shareLink]])]),_:1},8,["show-after"]),r.createVNode(k,{class:"tooltip",content:"Close",placement:"bottom-end","show-after":i.helpDelay,teleported:!1,trigger:"hover","popper-class":"header-popper"},{reference:r.withCtx(()=>[r.withDirectives(r.createVNode(b,{icon:"close",class:"header-icon",onClick:i.close},null,8,["onClick"]),[[r.vShow,n.showIcons]])]),_:1},8,["show-after"]),e.globalSettingRef?(r.openBlock(),r.createBlock(k,{key:2,"virtual-ref":e.globalSettingRef,ref:"settingPopover",placement:"bottom",width:"230",teleported:!1,trigger:"click","popper-class":"setting-popover","virtual-triggering":"",disabled:!e.mapLoaded},{default:r.withCtx(()=>[r.createElementVNode("div",I$e,[L$e,"flightPathDisplay"in e.globalSettings?(r.openBlock(),r.createElementBlock("div",R$e,[P$e,r.createVNode(p,{modelValue:e.globalSettings.flightPathDisplay,"onUpdate:modelValue":t[8]||(t[8]=F=>e.globalSettings.flightPathDisplay=F),onChange:t[9]||(t[9]=F=>i.updateGlobalSettings("flightPathDisplay"))},{default:r.withCtx(()=>[r.createVNode(_,{value:!1},{default:r.withCtx(()=>[r.createTextVNode("2D")]),_:1}),r.createVNode(_,{value:!0},{default:r.withCtx(()=>[r.createTextVNode("3D")]),_:1})]),_:1},8,["modelValue"])])):r.createCommentVNode("",!0),"organsDisplay"in e.globalSettings?(r.openBlock(),r.createElementBlock("div",V$e,[D$e,r.createVNode(p,{modelValue:e.globalSettings.organsDisplay,"onUpdate:modelValue":t[10]||(t[10]=F=>e.globalSettings.organsDisplay=F),onChange:t[11]||(t[11]=F=>i.updateGlobalSettings("organsDisplay"))},{default:r.withCtx(()=>[r.createVNode(_,{value:!0},{default:r.withCtx(()=>[r.createTextVNode("Color")]),_:1}),r.createVNode(_,{value:!1},{default:r.withCtx(()=>[r.createTextVNode("Grayscale")]),_:1})]),_:1},8,["modelValue"])])):r.createCommentVNode("",!0),"outlinesDisplay"in e.globalSettings?(r.openBlock(),r.createElementBlock("div",z$e,[j$e,r.createVNode(p,{modelValue:e.globalSettings.outlinesDisplay,"onUpdate:modelValue":t[12]||(t[12]=F=>e.globalSettings.outlinesDisplay=F),onChange:t[13]||(t[13]=F=>i.updateGlobalSettings("outlinesDisplay"))},{default:r.withCtx(()=>[r.createVNode(_,{value:!0},{default:r.withCtx(()=>[r.createTextVNode("Show")]),_:1}),r.createVNode(_,{value:!1},{default:r.withCtx(()=>[r.createTextVNode("Hide")]),_:1})]),_:1},8,["modelValue"])])):r.createCommentVNode("",!0),"backgroundDisplay"in e.globalSettings?(r.openBlock(),r.createElementBlock("div",H$e,[U$e,r.createVNode(p,{class:"bg-color-radio-group",modelValue:e.globalSettings.backgroundDisplay,"onUpdate:modelValue":t[14]||(t[14]=F=>e.globalSettings.backgroundDisplay=F),onChange:t[15]||(t[15]=F=>i.updateGlobalSettings("backgroundDisplay"))},{default:r.withCtx(()=>[r.createVNode(_,{value:"white",class:"bg-color-radio"},{default:r.withCtx(()=>[q$e]),_:1}),r.createVNode(_,{value:"lightskyblue",class:"bg-color-radio"},{default:r.withCtx(()=>[K$e]),_:1}),r.createVNode(_,{value:"black",class:"bg-color-radio"},{default:r.withCtx(()=>[G$e]),_:1})]),_:1},8,["modelValue"])])):r.createCommentVNode("",!0)])]),_:1},8,["virtual-ref","disabled"])):r.createCommentVNode("",!0),i.showGlobalSettings?(r.openBlock(),r.createBlock(k,{key:3,class:"tooltip",content:"Global Settings",placement:"bottom-end","show-after":i.helpDelay,teleported:!1,trigger:"hover","popper-class":"header-popper",disabled:!e.mapLoaded},{reference:r.withCtx(()=>[r.createVNode(d,{ref:"globalSettingRef",disabled:!e.mapLoaded,class:r.normalizeClass(["header-icon",{disabled:!e.mapLoaded}])},{default:r.withCtx(()=>[r.createVNode($)]),_:1},8,["disabled","class"])]),_:1},8,["show-after","disabled"])):r.createCommentVNode("",!0)]),_:1})])}const NV=tr(w$e,[["render",W$e],["__scopeId","data-v-1cc10ca9"]]),MV=e=>!e.getAttribute("aria-owns"),OV=(e,t,n)=>{const{parentNode:o}=e;if(!o)return null;const a=o.querySelectorAll(n),i=Array.prototype.indexOf.call(a,e);return a[i+t]||null},zg=e=>{e&&(e.focus(),!MV(e)&&e.click())},bn=(e,t,{checkForDefaultPrevented:n=!0}={})=>o=>{const a=e==null?void 0:e(o);if(n===!1||!a)return t==null?void 0:t(o)},IV=e=>t=>t.pointerType==="mouse"?e(t):void 0;var LV;const Lt=typeof window<"u",X$e=e=>typeof e=="string",RV=()=>{},DS=Lt&&((LV=window==null?void 0:window.navigator)==null?void 0:LV.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Lf(e){return typeof e=="function"?e():r.unref(e)}function Y$e(e){return e}function Rf(e){return r.getCurrentScope()?(r.onScopeDispose(e),!0):!1}function Z$e(e,t=!0){r.getCurrentInstance()?r.onMounted(e):t?e():r.nextTick(e)}function zS(e,t,n={}){const{immediate:o=!0}=n,a=r.ref(!1);let i=null;function s(){i&&(clearTimeout(i),i=null)}function l(){a.value=!1,s()}function c(...d){s(),a.value=!0,i=setTimeout(()=>{a.value=!1,i=null,e(...d)},Lf(t))}return o&&(a.value=!0,Lt&&c()),Rf(l),{isPending:r.readonly(a),start:c,stop:l}}function Ta(e){var t;const n=Lf(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Pf=Lt?window:void 0;function Qr(...e){let t,n,o,a;if(X$e(e[0])||Array.isArray(e[0])?([n,o,a]=e,t=Pf):[t,n,o,a]=e,!t)return RV;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const i=[],s=()=>{i.forEach(u=>u()),i.length=0},l=(u,f,h,m)=>(u.addEventListener(f,h,m),()=>u.removeEventListener(f,h,m)),c=r.watch(()=>[Ta(t),Lf(a)],([u,f])=>{s(),u&&i.push(...n.flatMap(h=>o.map(m=>l(u,h,m,f))))},{immediate:!0,flush:"post"}),d=()=>{c(),s()};return Rf(d),d}let PV=!1;function J$e(e,t,n={}){const{window:o=Pf,ignore:a=[],capture:i=!0,detectIframe:s=!1}=n;if(!o)return;DS&&!PV&&(PV=!0,Array.from(o.document.body.children).forEach(u=>u.addEventListener("click",RV)));let l=!0;const c=u=>a.some(f=>{if(typeof f=="string")return Array.from(o.document.querySelectorAll(f)).some(h=>h===u.target||u.composedPath().includes(h));{const h=Ta(f);return h&&(u.target===h||u.composedPath().includes(h))}}),d=[Qr(o,"click",u=>{const f=Ta(e);if(!(!f||f===u.target||u.composedPath().includes(f))){if(u.detail===0&&(l=!c(u)),!l){l=!0;return}t(u)}},{passive:!0,capture:i}),Qr(o,"pointerdown",u=>{const f=Ta(e);f&&(l=!u.composedPath().includes(f)&&!c(u))},{passive:!0}),s&&Qr(o,"blur",u=>{var f;const h=Ta(e);((f=o.document.activeElement)==null?void 0:f.tagName)==="IFRAME"&&!(h!=null&&h.contains(o.document.activeElement))&&t(u)})].filter(Boolean);return()=>d.forEach(u=>u())}function VV(e,t=!1){const n=r.ref(),o=()=>n.value=!!e();return o(),Z$e(o,t),n}const DV=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},zV="__vueuse_ssr_handlers__";DV[zV]=DV[zV]||{};function Q$e(e,t,{window:n=Pf,initialValue:o=""}={}){const a=r.ref(o),i=r.computed(()=>{var s;return Ta(t)||((s=n==null?void 0:n.document)==null?void 0:s.documentElement)});return r.watch([i,()=>Lf(e)],([s,l])=>{var c;if(s&&n){const d=(c=n.getComputedStyle(s).getPropertyValue(l))==null?void 0:c.trim();a.value=d||o}},{immediate:!0}),r.watch(a,s=>{var l;(l=i.value)!=null&&l.style&&i.value.style.setProperty(Lf(e),s)}),a}var jV=Object.getOwnPropertySymbols,eFe=Object.prototype.hasOwnProperty,tFe=Object.prototype.propertyIsEnumerable,nFe=(e,t)=>{var n={};for(var o in e)eFe.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&jV)for(var o of jV(e))t.indexOf(o)<0&&tFe.call(e,o)&&(n[o]=e[o]);return n};function ta(e,t,n={}){const o=n,{window:a=Pf}=o,i=nFe(o,["window"]);let s;const l=VV(()=>a&&"ResizeObserver"in a),c=()=>{s&&(s.disconnect(),s=void 0)},d=r.watch(()=>Ta(e),f=>{c(),l.value&&a&&f&&(s=new ResizeObserver(t),s.observe(f,i))},{immediate:!0,flush:"post"}),u=()=>{c(),d()};return Rf(u),{isSupported:l,stop:u}}var HV=Object.getOwnPropertySymbols,rFe=Object.prototype.hasOwnProperty,oFe=Object.prototype.propertyIsEnumerable,aFe=(e,t)=>{var n={};for(var o in e)rFe.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&HV)for(var o of HV(e))t.indexOf(o)<0&&oFe.call(e,o)&&(n[o]=e[o]);return n};function iFe(e,t,n={}){const o=n,{window:a=Pf}=o,i=aFe(o,["window"]);let s;const l=VV(()=>a&&"MutationObserver"in a),c=()=>{s&&(s.disconnect(),s=void 0)},d=r.watch(()=>Ta(e),f=>{c(),l.value&&a&&f&&(s=new MutationObserver(t),s.observe(f,i))},{immediate:!0}),u=()=>{c(),d()};return Rf(u),{isSupported:l,stop:u}}var UV;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(UV||(UV={}));var sFe=Object.defineProperty,qV=Object.getOwnPropertySymbols,lFe=Object.prototype.hasOwnProperty,cFe=Object.prototype.propertyIsEnumerable,KV=(e,t,n)=>t in e?sFe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dFe=(e,t)=>{for(var n in t||(t={}))lFe.call(t,n)&&KV(e,n,t[n]);if(qV)for(var n of qV(t))cFe.call(t,n)&&KV(e,n,t[n]);return e};dFe({linear:Y$e},{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 uFe=()=>Lt&&/firefox/i.test(window.navigator.userAgent);/**
|
|
977
978
|
* @vue/shared v3.5.13
|
|
978
979
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
979
980
|
* @license MIT
|