@abi-software/map-utilities 1.2.0-beta.1 → 1.2.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9768,187 +9768,668 @@ const Ey = function(e = {}) {
9768
9768
  for (const [o, r] of t)
9769
9769
  n[o] = r;
9770
9770
  return n;
9771
- }, Oy = function(e) {
9772
- return e ? e.charAt(0).toUpperCase() + e.slice(1) : "";
9773
- }, Iy = {
9774
- name: "ConnectionDialog",
9771
+ }, Oy = {
9772
+ name: "AnnotationPopup",
9775
9773
  props: {
9776
- connectionEntry: {
9777
- type: Object,
9778
- default: {}
9779
- },
9780
- inDrawing: {
9781
- type: Boolean,
9782
- default: !1
9783
- },
9784
- connectionExist: {
9785
- type: Boolean,
9786
- default: !1
9774
+ annotationEntry: {
9775
+ type: Object
9787
9776
  }
9788
9777
  },
9778
+ inject: ["$annotator", "userApiKey"],
9789
9779
  data: function() {
9790
9780
  return {
9791
- tooltipId: void 0
9781
+ displayPair: {
9782
+ "Feature ID": "featureId",
9783
+ Tooltip: "label",
9784
+ Models: "models",
9785
+ Name: "name",
9786
+ Resource: "resourceId"
9787
+ },
9788
+ editing: !1,
9789
+ evidencePrefixes: ["DOI:", "PMID:"],
9790
+ evidencePrefix: "DOI:",
9791
+ evidence: [],
9792
+ authenticated: !1,
9793
+ newEvidence: "",
9794
+ comment: "",
9795
+ prevSubs: [],
9796
+ showSubmissions: !0,
9797
+ errorMessage: "",
9798
+ creator: void 0
9792
9799
  };
9793
9800
  },
9801
+ computed: {
9802
+ isEditable: function() {
9803
+ return this.annotationEntry.resourceId && this.annotationEntry.featureId;
9804
+ },
9805
+ isPositionUpdated: function() {
9806
+ return this.annotationEntry.resourceId && this.annotationEntry.type === "updated" && this.annotationEntry.positionUpdated;
9807
+ },
9808
+ isDeleted: function() {
9809
+ return this.annotationEntry.resourceId && this.annotationEntry.type === "deleted";
9810
+ }
9811
+ },
9794
9812
  methods: {
9795
- shadowDisplay: function(e) {
9796
- return this.tooltipId === e ? "always" : "hover";
9813
+ evidenceEntered: function(e) {
9814
+ e && (this.evidence.push(this.evidencePrefix + e), this.newEvidence = "");
9797
9815
  },
9798
- capitalise: function(e) {
9799
- return Oy(e);
9816
+ formatTime: function(e) {
9817
+ const t = {
9818
+ year: "numeric",
9819
+ month: "long",
9820
+ day: "numeric",
9821
+ hour: "numeric",
9822
+ minute: "numeric",
9823
+ second: "numeric"
9824
+ };
9825
+ return new Date(e).toLocaleDateString(void 0, t);
9800
9826
  },
9801
- handleTooltip: function(e) {
9802
- this.tooltipId = this.tooltipId === e ? void 0 : e, this.$emit("featureTooltip", this.tooltipId);
9827
+ updatePrevSubmissions: function() {
9828
+ var e;
9829
+ this.$annotator && this.authenticated && this.annotationEntry.resourceId && this.annotationEntry.featureId && ((e = this.$annotator) == null || e.itemAnnotations(
9830
+ this.userApiKey,
9831
+ this.annotationEntry.resourceId,
9832
+ this.annotationEntry.featureId
9833
+ ).then((t) => {
9834
+ this.prevSubs = t;
9835
+ }).catch((t) => {
9836
+ console.log(t);
9837
+ }));
9838
+ },
9839
+ submit: function() {
9840
+ var e;
9841
+ if (this.annotationEntry.type === "updated" && this.annotationEntry.positionUpdated ? this.comment = this.comment ? `Position Updated: ${this.comment}` : "Position Updated" : this.annotationEntry.type === "deleted" && (this.comment = this.comment ? `Feature Deleted: ${this.comment}` : "Feature Deleted"), (this.evidence.length > 0 || this.comment) && this.annotationEntry.resourceId && this.annotationEntry.featureId) {
9842
+ const t = [];
9843
+ this.evidence.forEach((o) => {
9844
+ if (o.includes("DOI:")) {
9845
+ const r = o.replace("DOI:", "https://doi.org/");
9846
+ t.push(new URL(r));
9847
+ } else if (o.includes("PMID:")) {
9848
+ const r = o.replace(
9849
+ "PMID:",
9850
+ "https://pubmed.ncbi.nlm.nih.gov/"
9851
+ );
9852
+ t.push(new URL(r));
9853
+ }
9854
+ });
9855
+ const n = {
9856
+ resource: this.annotationEntry.resourceId,
9857
+ item: Object.assign(
9858
+ { id: this.annotationEntry.featureId },
9859
+ Object.fromEntries(
9860
+ Object.entries(this.annotationEntry).filter(
9861
+ ([o]) => ["label", "models"].includes(o)
9862
+ )
9863
+ )
9864
+ ),
9865
+ body: {
9866
+ evidence: t,
9867
+ comment: this.comment
9868
+ },
9869
+ feature: this.annotationEntry.feature
9870
+ };
9871
+ Object.assign(n.body, this.annotationEntry.body), this.annotationEntry.type === "deleted" && (n.feature = void 0), this.creator && (n.creator = this.creator), (e = this.$annotator) == null || e.addAnnotation(this.userApiKey, n).then(() => {
9872
+ this.$emit("annotation", n), this.errorMessage = "", this.resetSubmission(), this.updatePrevSubmissions();
9873
+ }).catch(() => {
9874
+ this.errorMessage = "There is a problem with the submission, please try again later";
9875
+ });
9876
+ }
9877
+ },
9878
+ removeEvidence: function(e) {
9879
+ this.evidence.splice(e, 1);
9880
+ },
9881
+ resetSubmission: function() {
9882
+ this.editing = !1, this.evidence = [], this.newFeature = "", this.comment = "";
9883
+ }
9884
+ },
9885
+ watch: {
9886
+ annotationEntry: {
9887
+ handler: function(e, t) {
9888
+ e !== t && (this.resetSubmission(), this.updatePrevSubmissions());
9889
+ },
9890
+ immediate: !1,
9891
+ deep: !1
9803
9892
  }
9893
+ },
9894
+ mounted: function() {
9895
+ var e;
9896
+ (e = this.$annotator) == null || e.authenticate(this.userApiKey).then((t) => {
9897
+ t.name && t.email && t.canUpdate ? (this.creator = t, t.orcid || (this.creator.orcid = "0000-0000-0000-0000"), this.authenticated = !0, this.updatePrevSubmissions()) : this.errorMessage = "";
9898
+ });
9804
9899
  }
9805
- }, va = (e) => (Vo("data-v-8168ee98"), e = e(), zo(), e), $y = { class: "dialog-container" }, Ny = /* @__PURE__ */ va(() => /* @__PURE__ */ T("span", { class: "dialog-title" }, "Finalise drawing", -1)), Ay = /* @__PURE__ */ va(() => /* @__PURE__ */ T("span", { class: "dialog-title" }, "Visualise connection", -1)), Py = /* @__PURE__ */ va(() => /* @__PURE__ */ T("b", null, [
9806
- /* @__PURE__ */ T("span", null, "Related Features")
9807
- ], -1));
9808
- function Ly(e, t, n, o, r, a) {
9809
- const i = Wt, s = cm, l = ua, c = da, u = hm;
9810
- return b(), E("div", $y, [
9811
- I(l, null, {
9812
- default: S(() => [
9813
- I(c, null, {
9900
+ }, hn = (e) => (Vo("data-v-09c78af1"), e = e(), zo(), e), Iy = { class: "block" }, $y = /* @__PURE__ */ hn(() => /* @__PURE__ */ T("div", { class: "title" }, "Feature Annotations", -1)), Ny = /* @__PURE__ */ hn(() => /* @__PURE__ */ T("strong", { class: "sub-title" }, "Previous submissions:", -1)), Ay = /* @__PURE__ */ hn(() => /* @__PURE__ */ T("strong", null, "Evidence: ", -1)), Py = ["href"], Ly = /* @__PURE__ */ hn(() => /* @__PURE__ */ T("strong", null, "Comment: ", -1)), My = /* @__PURE__ */ hn(() => /* @__PURE__ */ T("strong", { class: "sub-title" }, "Suggest changes:", -1)), Dy = /* @__PURE__ */ hn(() => /* @__PURE__ */ T("strong", null, "Evidence:", -1)), By = /* @__PURE__ */ hn(() => /* @__PURE__ */ T("strong", null, "Comment:", -1)), Ry = { class: "sub-title" };
9901
+ function Hy(e, t, n, o, r, a) {
9902
+ const i = ua, s = ms, l = Me, c = Zo, u = hh, f = fh, v = gh, g = da, d = Bo, h = ty, y = ey, m = ra, k = Wt, $ = I1;
9903
+ return b(), B($, { class: "main" }, {
9904
+ default: S(() => [
9905
+ T("div", Iy, [
9906
+ I(i, { class: "info-field" }, {
9814
9907
  default: S(() => [
9815
- n.inDrawing ? (b(), B(l, { key: 0 }, {
9816
- default: S(() => [
9817
- Ny,
9818
- I(s, null, {
9908
+ $y
9909
+ ]),
9910
+ _: 1
9911
+ }),
9912
+ n.annotationEntry ? (b(), E(ie, { key: 0 }, [
9913
+ (b(!0), E(ie, null, Re(e.displayPair, (_, C) => se((b(), B(i, {
9914
+ class: "dialog-text",
9915
+ key: _
9916
+ }, {
9917
+ default: S(() => [
9918
+ T("strong", null, Z(C) + ": ", 1),
9919
+ ne(" " + Z(n.annotationEntry[_]), 1)
9920
+ ]),
9921
+ _: 2
9922
+ }, 1024)), [
9923
+ [we, n.annotationEntry[_]]
9924
+ ])), 128)),
9925
+ e.prevSubs.length > 0 ? (b(), E(ie, { key: 0 }, [
9926
+ se(T("div", {
9927
+ class: "hide",
9928
+ onClick: t[0] || (t[0] = (_) => e.showSubmissions = !1)
9929
+ }, [
9930
+ ne(" Hide previous submissions "),
9931
+ I(l, null, {
9932
+ default: S(() => [
9933
+ I(s)
9934
+ ]),
9935
+ _: 1
9936
+ })
9937
+ ], 512), [
9938
+ [we, e.showSubmissions]
9939
+ ]),
9940
+ se(T("div", {
9941
+ class: "hide",
9942
+ onClick: t[1] || (t[1] = (_) => e.showSubmissions = !0)
9943
+ }, [
9944
+ ne(" Show previous " + Z(e.prevSubs.length) + " submission(s) ", 1),
9945
+ I(l, null, {
9946
+ default: S(() => [
9947
+ I(c)
9948
+ ]),
9949
+ _: 1
9950
+ })
9951
+ ], 512), [
9952
+ [we, !e.showSubmissions]
9953
+ ]),
9954
+ e.showSubmissions ? (b(), E(ie, { key: 0 }, [
9955
+ I(i, { class: "dialog-spacer" }),
9956
+ I(i, { class: "dialog-text" }, {
9957
+ default: S(() => [
9958
+ Ny
9959
+ ]),
9960
+ _: 1
9961
+ }),
9962
+ (b(!0), E(ie, null, Re(e.prevSubs, (_, C) => (b(), E("div", {
9963
+ class: "entry",
9964
+ key: C
9965
+ }, [
9966
+ I(i, { class: "dialog-text" }, {
9819
9967
  default: S(() => [
9820
- I(i, {
9821
- type: "primary",
9822
- plain: "",
9823
- onClick: t[0] || (t[0] = (f) => e.$emit("confirmDrawn", !0))
9824
- }, {
9825
- default: S(() => [
9826
- ne(" Confirm ")
9827
- ]),
9828
- _: 1
9829
- }),
9830
- I(i, {
9831
- type: "primary",
9832
- plain: "",
9833
- onClick: t[1] || (t[1] = (f) => e.$emit("cancelDrawn", !0))
9968
+ T("strong", null, Z(a.formatTime(_.created)), 1),
9969
+ ne(" " + Z(_.creator.name), 1)
9970
+ ]),
9971
+ _: 2
9972
+ }, 1024),
9973
+ I(i, { class: "dialog-text" }, {
9974
+ default: S(() => [
9975
+ Ay,
9976
+ (b(!0), E(ie, null, Re(_.body.evidence, (A) => (b(), B(i, {
9977
+ key: A,
9978
+ class: "dialog-text"
9834
9979
  }, {
9835
9980
  default: S(() => [
9836
- ne(" Cancel ")
9981
+ T("a", {
9982
+ href: A,
9983
+ target: "_blank"
9984
+ }, Z(A), 9, Py)
9837
9985
  ]),
9838
- _: 1
9839
- })
9986
+ _: 2
9987
+ }, 1024))), 128))
9840
9988
  ]),
9841
- _: 1
9842
- })
9843
- ]),
9844
- _: 1
9845
- })) : (b(), B(l, { key: 1 }, {
9846
- default: S(() => [
9847
- Ay,
9848
- I(i, {
9849
- type: "primary",
9850
- plain: "",
9851
- onClick: t[2] || (t[2] = (f) => e.$emit("dialogDisplay", !1))
9852
- }, {
9989
+ _: 2
9990
+ }, 1024),
9991
+ I(i, { class: "dialog-text" }, {
9853
9992
  default: S(() => [
9854
- ne(" Close ")
9993
+ Ly,
9994
+ ne(" " + Z(_.body.comment), 1)
9855
9995
  ]),
9856
- _: 1
9857
- })
9858
- ]),
9859
- _: 1
9860
- }))
9861
- ]),
9862
- _: 1
9863
- })
9864
- ]),
9865
- _: 1
9866
- }),
9867
- n.connectionExist ? (b(), B(l, { key: 0 }, {
9868
- default: S(() => [
9869
- I(c, null, {
9870
- default: S(() => [
9871
- Py,
9872
- (b(!0), E(ie, null, Re(n.connectionEntry, (f, v) => (b(), B(l, { key: v }, {
9873
- default: S(() => [
9874
- I(u, {
9875
- shadow: a.shadowDisplay(v),
9876
- onClick: (g) => a.handleTooltip(v)
9877
- }, {
9996
+ _: 2
9997
+ }, 1024)
9998
+ ]))), 128))
9999
+ ], 64)) : D("", !0)
10000
+ ], 64)) : D("", !0),
10001
+ e.authenticated ? (b(), E(ie, { key: 1 }, [
10002
+ a.isEditable ? (b(), E(ie, { key: 0 }, [
10003
+ I(i, { class: "dialog-spacer" }),
10004
+ e.editing ? (b(), E(ie, { key: 1 }, [
10005
+ I(i, { class: "dialog-text" }, {
9878
10006
  default: S(() => [
9879
- T("span", null, Z(a.capitalise(f.label)), 1)
10007
+ My
9880
10008
  ]),
9881
- _: 2
9882
- }, 1032, ["shadow", "onClick"])
9883
- ]),
9884
- _: 2
9885
- }, 1024))), 128))
9886
- ]),
9887
- _: 1
9888
- })
9889
- ]),
9890
- _: 1
9891
- })) : D("", !0)
9892
- ]);
10009
+ _: 1
10010
+ }),
10011
+ a.isDeleted ? D("", !0) : (b(), E(ie, { key: 0 }, [
10012
+ I(i, { class: "dialog-text" }, {
10013
+ default: S(() => [
10014
+ Dy
10015
+ ]),
10016
+ _: 1
10017
+ }),
10018
+ (b(!0), E(ie, null, Re(e.evidence, (_, C) => (b(), B(i, { key: _ }, {
10019
+ default: S(() => [
10020
+ I(g, { span: 20 }, {
10021
+ default: S(() => [
10022
+ ne(Z(e.evidence[C]), 1)
10023
+ ]),
10024
+ _: 2
10025
+ }, 1024),
10026
+ I(g, { span: 4 }, {
10027
+ default: S(() => [
10028
+ I(l, { class: "standard-icon" }, {
10029
+ default: S(() => [
10030
+ I(d, {
10031
+ onClick: (A) => a.removeEvidence(C)
10032
+ }, null, 8, ["onClick"])
10033
+ ]),
10034
+ _: 2
10035
+ }, 1024)
10036
+ ]),
10037
+ _: 2
10038
+ }, 1024)
10039
+ ]),
10040
+ _: 2
10041
+ }, 1024))), 128)),
10042
+ I(i, null, {
10043
+ default: S(() => [
10044
+ I(m, {
10045
+ size: "small",
10046
+ placeholder: "Enter",
10047
+ modelValue: e.newEvidence,
10048
+ "onUpdate:modelValue": t[4] || (t[4] = (_) => e.newEvidence = _),
10049
+ onChange: t[5] || (t[5] = (_) => a.evidenceEntered(_))
10050
+ }, {
10051
+ prepend: S(() => [
10052
+ I(y, {
10053
+ teleported: !1,
10054
+ modelValue: e.evidencePrefix,
10055
+ "onUpdate:modelValue": t[3] || (t[3] = (_) => e.evidencePrefix = _),
10056
+ placeholder: "Select",
10057
+ class: "select-box",
10058
+ "popper-class": "flatmap_dropdown"
10059
+ }, {
10060
+ default: S(() => [
10061
+ (b(!0), E(ie, null, Re(e.evidencePrefixes, (_) => (b(), B(h, {
10062
+ key: _,
10063
+ label: _,
10064
+ value: _
10065
+ }, {
10066
+ default: S(() => [
10067
+ I(i, null, {
10068
+ default: S(() => [
10069
+ I(g, { span: 12 }, {
10070
+ default: S(() => [
10071
+ ne(Z(_), 1)
10072
+ ]),
10073
+ _: 2
10074
+ }, 1024)
10075
+ ]),
10076
+ _: 2
10077
+ }, 1024)
10078
+ ]),
10079
+ _: 2
10080
+ }, 1032, ["label", "value"]))), 128))
10081
+ ]),
10082
+ _: 1
10083
+ }, 8, ["modelValue"])
10084
+ ]),
10085
+ _: 1
10086
+ }, 8, ["modelValue"])
10087
+ ]),
10088
+ _: 1
10089
+ })
10090
+ ], 64)),
10091
+ I(i, null, {
10092
+ default: S(() => [
10093
+ By
10094
+ ]),
10095
+ _: 1
10096
+ }),
10097
+ I(i, { class: "dialog-text" }, {
10098
+ default: S(() => [
10099
+ I(m, {
10100
+ type: "textarea",
10101
+ autosize: { minRows: 2, maxRows: 4 },
10102
+ placeholder: "Enter",
10103
+ modelValue: e.comment,
10104
+ "onUpdate:modelValue": t[6] || (t[6] = (_) => e.comment = _)
10105
+ }, null, 8, ["modelValue"])
10106
+ ]),
10107
+ _: 1
10108
+ }),
10109
+ I(i, { class: "dialog-text" }, {
10110
+ default: S(() => [
10111
+ I(k, {
10112
+ class: "button",
10113
+ type: "primary",
10114
+ plain: "",
10115
+ onClick: a.submit
10116
+ }, {
10117
+ default: S(() => [
10118
+ ne(" Submit ")
10119
+ ]),
10120
+ _: 1
10121
+ }, 8, ["onClick"])
10122
+ ]),
10123
+ _: 1
10124
+ })
10125
+ ], 64)) : (b(), B(i, { key: 0 }, {
10126
+ default: S(() => [
10127
+ I(l, { class: "standard-icon" }, {
10128
+ default: S(() => [
10129
+ I(u, {
10130
+ onClick: t[2] || (t[2] = (_) => e.editing = !0)
10131
+ })
10132
+ ]),
10133
+ _: 1
10134
+ }),
10135
+ a.isDeleted ? (b(), B(l, {
10136
+ key: 0,
10137
+ class: "standard-icon"
10138
+ }, {
10139
+ default: S(() => [
10140
+ I(f, { onClick: a.submit }, null, 8, ["onClick"])
10141
+ ]),
10142
+ _: 1
10143
+ })) : a.isPositionUpdated ? (b(), B(l, {
10144
+ key: 1,
10145
+ class: "standard-icon"
10146
+ }, {
10147
+ default: S(() => [
10148
+ I(v, { onClick: a.submit }, null, 8, ["onClick"])
10149
+ ]),
10150
+ _: 1
10151
+ })) : D("", !0)
10152
+ ]),
10153
+ _: 1
10154
+ })),
10155
+ e.errorMessage ? (b(), B(i, {
10156
+ key: 2,
10157
+ class: "dialog-text"
10158
+ }, {
10159
+ default: S(() => [
10160
+ T("strong", Ry, Z(e.errorMessage), 1)
10161
+ ]),
10162
+ _: 1
10163
+ })) : D("", !0)
10164
+ ], 64)) : D("", !0)
10165
+ ], 64)) : D("", !0)
10166
+ ], 64)) : D("", !0)
10167
+ ])
10168
+ ]),
10169
+ _: 1
10170
+ });
9893
10171
  }
9894
- const My = /* @__PURE__ */ $t(Iy, [["render", Ly], ["__scopeId", "data-v-8168ee98"]]), yl = (e, t) => {
9895
- const n = e.__vccOpts || e;
9896
- for (const [o, r] of t)
9897
- n[o] = r;
9898
- return n;
9899
- }, Dy = ["xlink:href"], By = {
9900
- __name: "SvgIcon",
10172
+ const Vy = /* @__PURE__ */ $t(Oy, [["render", Hy], ["__scopeId", "data-v-09c78af1"]]), ji = "Copy to clipboard", zy = "Copied!", Ky = "#8300bf", jy = {
10173
+ name: "CopyToClipboard",
9901
10174
  props: {
9902
- /**
9903
- * The svg icon to show.
9904
- */
9905
- icon: {
10175
+ content: {
9906
10176
  type: String,
9907
- required: !0
10177
+ default: ""
9908
10178
  },
9909
10179
  /**
9910
- * The option to spin the icon.
10180
+ * `theme: light` will show white button,
10181
+ * to use when the button is over other readable text content.
10182
+ * Default button is transparent.
9911
10183
  */
9912
- spin: {
9913
- type: Boolean,
9914
- default: !1
10184
+ theme: {
10185
+ type: String,
10186
+ default: ""
9915
10187
  }
9916
10188
  },
9917
- setup(e) {
9918
- return (t, n) => (b(), E("svg", {
9919
- class: F(["map-icon", { "map-icon-spin": e.spin }])
9920
- }, [
9921
- T("use", {
9922
- "xlink:href": `#${e.icon}`
9923
- }, null, 8, Dy)
9924
- ], 2));
9925
- }
9926
- }, Ry = /* @__PURE__ */ yl(By, [["__scopeId", "data-v-e172d5ff"]]), bl = `<?xml version="1.0" encoding="UTF-8"?>
9927
- <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">
9928
- <title>2horpanel</title>
9929
- <g id="2horpanel" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
9930
- <g id="Group-10-Copy-4">
9931
- <g id="Group-15-Copy" fill="currentColor">
9932
- <circle id="Oval-Copy" cx="12" cy="12" r="12"></circle>
9933
- <text id="?" font-family="Asap-Bold, Asap" font-size="16" font-weight="bold">
9934
- <tspan x="8.5" y="18">?</tspan>
9935
- </text>
9936
- </g>
9937
- <rect id="Rectangle" stroke="#FFFFFF" x="5" y="7" width="14" height="10"></rect>
9938
- <line x1="18.5" y1="12" x2="5.5" y2="12" id="Line-10" stroke="#FFFFFF" stroke-linecap="square"></line>
9939
- </g>
9940
- </g>
9941
- </svg>`, wl = `<?xml version="1.0" encoding="UTF-8"?>
9942
- <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">
9943
- <title>2vertpanel</title>
9944
- <g id="2vertpanel" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
9945
- <g id="Group-10-Copy-3">
9946
- <g id="Group-15-Copy" fill="currentColor">
9947
- <circle id="Oval-Copy" cx="12" cy="12" r="12"></circle>
9948
- <text id="?" font-family="Asap-Bold, Asap" font-size="16" font-weight="bold">
9949
- <tspan x="8.5" y="18">?</tspan>
9950
- </text>
9951
- </g>
10189
+ data: function() {
10190
+ return {
10191
+ textLabel: ji,
10192
+ autoHideTimeout: 0,
10193
+ iconColor: Ky
10194
+ };
10195
+ },
10196
+ methods: {
10197
+ copyToClipboard: async function() {
10198
+ let e = !0;
10199
+ this.autoHideTimeout = 600;
10200
+ try {
10201
+ const t = this.content.replaceAll(`
10202
+ `, ""), n = document.createElement("div");
10203
+ n.innerHTML = this.content;
10204
+ const o = n.textContent || n.innerText || "", r = new Blob([t], { type: "text/html" }), a = new Blob([o], { type: "text/plain" }), i = new ClipboardItem({
10205
+ "text/html": r,
10206
+ "text/plain": a
10207
+ });
10208
+ await navigator.clipboard.write([i]);
10209
+ } catch (t) {
10210
+ console.error(
10211
+ "Error when trying to use navigator.clipboard.write()",
10212
+ t
10213
+ ), e = !1;
10214
+ }
10215
+ e ? this.textLabel = zy : this.textLabel = "Error trying to copy to clipboard!";
10216
+ },
10217
+ resetSettings: function() {
10218
+ this.autoHideTimeout = 0, this.textLabel = ji;
10219
+ }
10220
+ }
10221
+ }, Uy = { class: "visually-hidden" };
10222
+ function qy(e, t, n, o, r, a) {
10223
+ const i = uh, s = Me, l = Wt, c = nr;
10224
+ return b(), B(c, {
10225
+ content: e.textLabel,
10226
+ placement: "bottom",
10227
+ "hide-after": e.autoHideTimeout,
10228
+ effect: "clipboard-tooltip",
10229
+ onHide: a.resetSettings
10230
+ }, {
10231
+ default: S(() => [
10232
+ I(l, {
10233
+ class: F(["copy-clipboard-button", n.theme]),
10234
+ size: "small",
10235
+ onClick: a.copyToClipboard
10236
+ }, {
10237
+ default: S(() => [
10238
+ I(s, { color: e.iconColor }, {
10239
+ default: S(() => [
10240
+ I(i)
10241
+ ]),
10242
+ _: 1
10243
+ }, 8, ["color"]),
10244
+ T("span", Uy, Z(e.textLabel), 1)
10245
+ ]),
10246
+ _: 1
10247
+ }, 8, ["class", "onClick"])
10248
+ ]),
10249
+ _: 1
10250
+ }, 8, ["content", "hide-after", "onHide"]);
10251
+ }
10252
+ const w2 = /* @__PURE__ */ $t(jy, [["render", qy], ["__scopeId", "data-v-de3b5311"]]), Wy = function(e) {
10253
+ return e ? e.charAt(0).toUpperCase() + e.slice(1) : "";
10254
+ }, Gy = {
10255
+ name: "ConnectionDialog",
10256
+ props: {
10257
+ connectionEntry: {
10258
+ type: Object,
10259
+ default: {}
10260
+ },
10261
+ inDrawing: {
10262
+ type: Boolean,
10263
+ default: !1
10264
+ },
10265
+ connectionExist: {
10266
+ type: Boolean,
10267
+ default: !1
10268
+ }
10269
+ },
10270
+ data: function() {
10271
+ return {
10272
+ tooltipId: void 0
10273
+ };
10274
+ },
10275
+ methods: {
10276
+ shadowDisplay: function(e) {
10277
+ return this.tooltipId === e ? "always" : "hover";
10278
+ },
10279
+ capitalise: function(e) {
10280
+ return Wy(e);
10281
+ },
10282
+ handleTooltip: function(e) {
10283
+ this.tooltipId = this.tooltipId === e ? void 0 : e, this.$emit("featureTooltip", this.tooltipId);
10284
+ }
10285
+ }
10286
+ }, va = (e) => (Vo("data-v-8168ee98"), e = e(), zo(), e), Yy = { class: "dialog-container" }, Zy = /* @__PURE__ */ va(() => /* @__PURE__ */ T("span", { class: "dialog-title" }, "Finalise drawing", -1)), Xy = /* @__PURE__ */ va(() => /* @__PURE__ */ T("span", { class: "dialog-title" }, "Visualise connection", -1)), Jy = /* @__PURE__ */ va(() => /* @__PURE__ */ T("b", null, [
10287
+ /* @__PURE__ */ T("span", null, "Related Features")
10288
+ ], -1));
10289
+ function Qy(e, t, n, o, r, a) {
10290
+ const i = Wt, s = cm, l = ua, c = da, u = hm;
10291
+ return b(), E("div", Yy, [
10292
+ I(l, null, {
10293
+ default: S(() => [
10294
+ I(c, null, {
10295
+ default: S(() => [
10296
+ n.inDrawing ? (b(), B(l, { key: 0 }, {
10297
+ default: S(() => [
10298
+ Zy,
10299
+ I(s, null, {
10300
+ default: S(() => [
10301
+ I(i, {
10302
+ type: "primary",
10303
+ plain: "",
10304
+ onClick: t[0] || (t[0] = (f) => e.$emit("confirmDrawn", !0))
10305
+ }, {
10306
+ default: S(() => [
10307
+ ne(" Confirm ")
10308
+ ]),
10309
+ _: 1
10310
+ }),
10311
+ I(i, {
10312
+ type: "primary",
10313
+ plain: "",
10314
+ onClick: t[1] || (t[1] = (f) => e.$emit("cancelDrawn", !0))
10315
+ }, {
10316
+ default: S(() => [
10317
+ ne(" Cancel ")
10318
+ ]),
10319
+ _: 1
10320
+ })
10321
+ ]),
10322
+ _: 1
10323
+ })
10324
+ ]),
10325
+ _: 1
10326
+ })) : (b(), B(l, { key: 1 }, {
10327
+ default: S(() => [
10328
+ Xy,
10329
+ I(i, {
10330
+ type: "primary",
10331
+ plain: "",
10332
+ onClick: t[2] || (t[2] = (f) => e.$emit("dialogDisplay", !1))
10333
+ }, {
10334
+ default: S(() => [
10335
+ ne(" Close ")
10336
+ ]),
10337
+ _: 1
10338
+ })
10339
+ ]),
10340
+ _: 1
10341
+ }))
10342
+ ]),
10343
+ _: 1
10344
+ })
10345
+ ]),
10346
+ _: 1
10347
+ }),
10348
+ n.connectionExist ? (b(), B(l, { key: 0 }, {
10349
+ default: S(() => [
10350
+ I(c, null, {
10351
+ default: S(() => [
10352
+ Jy,
10353
+ (b(!0), E(ie, null, Re(n.connectionEntry, (f, v) => (b(), B(l, { key: v }, {
10354
+ default: S(() => [
10355
+ I(u, {
10356
+ shadow: a.shadowDisplay(v),
10357
+ onClick: (g) => a.handleTooltip(v)
10358
+ }, {
10359
+ default: S(() => [
10360
+ T("span", null, Z(a.capitalise(f.label)), 1)
10361
+ ]),
10362
+ _: 2
10363
+ }, 1032, ["shadow", "onClick"])
10364
+ ]),
10365
+ _: 2
10366
+ }, 1024))), 128))
10367
+ ]),
10368
+ _: 1
10369
+ })
10370
+ ]),
10371
+ _: 1
10372
+ })) : D("", !0)
10373
+ ]);
10374
+ }
10375
+ const eb = /* @__PURE__ */ $t(Gy, [["render", Qy], ["__scopeId", "data-v-8168ee98"]]), yl = (e, t) => {
10376
+ const n = e.__vccOpts || e;
10377
+ for (const [o, r] of t)
10378
+ n[o] = r;
10379
+ return n;
10380
+ }, tb = ["xlink:href"], nb = {
10381
+ __name: "SvgIcon",
10382
+ props: {
10383
+ /**
10384
+ * The svg icon to show.
10385
+ */
10386
+ icon: {
10387
+ type: String,
10388
+ required: !0
10389
+ },
10390
+ /**
10391
+ * The option to spin the icon.
10392
+ */
10393
+ spin: {
10394
+ type: Boolean,
10395
+ default: !1
10396
+ }
10397
+ },
10398
+ setup(e) {
10399
+ return (t, n) => (b(), E("svg", {
10400
+ class: F(["map-icon", { "map-icon-spin": e.spin }])
10401
+ }, [
10402
+ T("use", {
10403
+ "xlink:href": `#${e.icon}`
10404
+ }, null, 8, tb)
10405
+ ], 2));
10406
+ }
10407
+ }, ob = /* @__PURE__ */ yl(nb, [["__scopeId", "data-v-e172d5ff"]]), bl = `<?xml version="1.0" encoding="UTF-8"?>
10408
+ <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">
10409
+ <title>2horpanel</title>
10410
+ <g id="2horpanel" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
10411
+ <g id="Group-10-Copy-4">
10412
+ <g id="Group-15-Copy" fill="currentColor">
10413
+ <circle id="Oval-Copy" cx="12" cy="12" r="12"></circle>
10414
+ <text id="?" font-family="Asap-Bold, Asap" font-size="16" font-weight="bold">
10415
+ <tspan x="8.5" y="18">?</tspan>
10416
+ </text>
10417
+ </g>
10418
+ <rect id="Rectangle" stroke="#FFFFFF" x="5" y="7" width="14" height="10"></rect>
10419
+ <line x1="18.5" y1="12" x2="5.5" y2="12" id="Line-10" stroke="#FFFFFF" stroke-linecap="square"></line>
10420
+ </g>
10421
+ </g>
10422
+ </svg>`, wl = `<?xml version="1.0" encoding="UTF-8"?>
10423
+ <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">
10424
+ <title>2vertpanel</title>
10425
+ <g id="2vertpanel" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
10426
+ <g id="Group-10-Copy-3">
10427
+ <g id="Group-15-Copy" fill="currentColor">
10428
+ <circle id="Oval-Copy" cx="12" cy="12" r="12"></circle>
10429
+ <text id="?" font-family="Asap-Bold, Asap" font-size="16" font-weight="bold">
10430
+ <tspan x="8.5" y="18">?</tspan>
10431
+ </text>
10432
+ </g>
9952
10433
  <rect id="Rectangle" stroke="#FFFFFF" x="5" y="7" width="14" height="10"></rect>
9953
10434
  <line x1="12" y1="7.5" x2="12" y2="16.5" id="Line-6" stroke="#FFFFFF" stroke-linecap="square"></line>
9954
10435
  </g>
@@ -10359,7 +10840,7 @@ const My = /* @__PURE__ */ $t(Iy, [["render", Ly], ["__scopeId", "data-v-8168ee9
10359
10840
  // replace whitespace sequences with a single space
10360
10841
  [/\> \</g, "><"]
10361
10842
  // remove whitespace between tags
10362
- ].reduce((t, n) => "".replace.apply(t, n), e).trim(), Hy = !0, Vy = !0, zy = ["fill"], Ar = /* @__PURE__ */ Object.assign({
10843
+ ].reduce((t, n) => "".replace.apply(t, n), e).trim(), rb = !0, ab = !0, ib = ["fill"], Ar = /* @__PURE__ */ Object.assign({
10363
10844
  "/assets/icons/2horpanel.svg": bl,
10364
10845
  "/assets/icons/2vertpanel.svg": wl,
10365
10846
  "/assets/icons/3panel.svg": Cl,
@@ -10393,11 +10874,11 @@ const My = /* @__PURE__ */ $t(Iy, [["render", Ly], ["__scopeId", "data-v-8168ee9
10393
10874
  "/assets/icons/undock.svg": Yl,
10394
10875
  "/assets/icons/zoomIn.svg": Zl,
10395
10876
  "/assets/icons/zoomOut.svg": Xl
10396
- }), Ky = Object.keys(Ar).map((e) => {
10397
- const t = Jl(Ar[e], Hy, Vy, zy), n = e.replace(/^.+\/(\w+).svg$/, "$1");
10877
+ }), sb = Object.keys(Ar).map((e) => {
10878
+ const t = Jl(Ar[e], rb, ab, ib), n = e.replace(/^.+\/(\w+).svg$/, "$1");
10398
10879
  return Ql(t).replace("<svg", `<symbol id="${n}"`).replace("svg>", "symbol>");
10399
10880
  });
10400
- Ky.join(`
10881
+ sb.join(`
10401
10882
  `);
10402
10883
  const Pr = /* @__PURE__ */ Object.assign({
10403
10884
  "/assets/icons/2horpanel.svg": bl,
@@ -10433,25 +10914,25 @@ const Pr = /* @__PURE__ */ Object.assign({
10433
10914
  "/assets/icons/undock.svg": Yl,
10434
10915
  "/assets/icons/zoomIn.svg": Zl,
10435
10916
  "/assets/icons/zoomOut.svg": Xl
10436
- }), jy = Object.keys(Pr).map((e) => {
10917
+ }), lb = Object.keys(Pr).map((e) => {
10437
10918
  const t = Jl(Pr[e]), n = e.replace(/^.+\/(\w+).svg$/, "$1");
10438
10919
  return Ql(t).replace("<svg", `<symbol id="${n}"`).replace("svg>", "symbol>");
10439
- }), Uy = {
10920
+ }), cb = {
10440
10921
  name: "MapSvgSpriteColor",
10441
10922
  svgContext: Pr,
10442
- svgSprite: jy.join(`
10923
+ svgSprite: lb.join(`
10443
10924
  `)
10444
10925
  // concatenate all symbols into $options.svgSprite
10445
- }, qy = ["innerHTML"];
10446
- function Wy(e, t, n, o, r, a) {
10926
+ }, ub = ["innerHTML"];
10927
+ function db(e, t, n, o, r, a) {
10447
10928
  return b(), E("svg", {
10448
10929
  width: "0",
10449
10930
  height: "0",
10450
10931
  style: { display: "none" },
10451
10932
  innerHTML: e.$options.svgSprite
10452
- }, null, 8, qy);
10933
+ }, null, 8, ub);
10453
10934
  }
10454
- const Gy = /* @__PURE__ */ yl(Uy, [["render", Wy]]), Yy = (e, t) => {
10935
+ const fb = /* @__PURE__ */ yl(cb, [["render", db]]), pb = (e, t) => {
10455
10936
  let n, o, r, a, i, s;
10456
10937
  t.style.left = "", t.style.top = "", t.addEventListener(
10457
10938
  "mousedown",
@@ -10469,11 +10950,11 @@ const Gy = /* @__PURE__ */ yl(Uy, [["render", Wy]]), Yy = (e, t) => {
10469
10950
  function l(c) {
10470
10951
  c.preventDefault(), i = n - (r - c.clientX), s = o - (a - c.clientY), t.style.left = `${i}px`, t.style.top = `${s}px`;
10471
10952
  }
10472
- }, Zy = {
10953
+ }, hb = {
10473
10954
  name: "DrawToolbar",
10474
10955
  components: {
10475
- MapSvgIcon: Ry,
10476
- MapSvgSpriteColor: Gy
10956
+ MapSvgIcon: ob,
10957
+ MapSvgSpriteColor: fb
10477
10958
  },
10478
10959
  props: {
10479
10960
  /**
@@ -10693,7 +11174,7 @@ const Gy = /* @__PURE__ */ yl(Uy, [["render", Wy]]), Yy = (e, t) => {
10693
11174
  dialogCssHacks: function() {
10694
11175
  this.$nextTick(() => {
10695
11176
  const e = this.$el.querySelector(".connection-dialog");
10696
- Yy(this.mapCanvas.containerHTML, e);
11177
+ pb(this.mapCanvas.containerHTML, e);
10697
11178
  let t, n;
10698
11179
  const o = this.mapCanvas.containerHTML.getBoundingClientRect(), r = e.getBoundingClientRect();
10699
11180
  this.dialogPosition.x > o.width / 2 ? t = this.dialogPosition.x - r.width : t = this.dialogPosition.x, this.dialogPosition.y > o.height / 2 ? n = this.dialogPosition.y - r.height : n = this.dialogPosition.y, e.style.transform = `translate(${t - this.dialogPosition.offsetX}px, ${n - this.dialogPosition.offsetY}px)`;
@@ -10720,12 +11201,12 @@ const Gy = /* @__PURE__ */ yl(Uy, [["render", Wy]]), Yy = (e, t) => {
10720
11201
  destroyed: function() {
10721
11202
  this.mapCanvas && this.mapCanvas.containerHTML.querySelector(this.mapCanvas.class).removeEventListener("click", this.dialogPopUpPositionHandler, !1);
10722
11203
  }
10723
- }, Xy = { class: "toolbar-container" }, Jy = { class: "toolbar-icons" };
10724
- function Qy(e, t, n, o, r, a) {
10725
- const i = Le("map-svg-sprite-color"), s = Le("map-svg-icon"), l = pa, c = My;
10726
- return b(), E("div", Xy, [
11204
+ }, vb = { class: "toolbar-container" }, gb = { class: "toolbar-icons" };
11205
+ function mb(e, t, n, o, r, a) {
11206
+ const i = Le("map-svg-sprite-color"), s = Le("map-svg-icon"), l = pa, c = eb;
11207
+ return b(), E("div", vb, [
10727
11208
  I(i),
10728
- T("div", Jy, [
11209
+ T("div", gb, [
10729
11210
  a.showEditModeIcon ? (b(), B(l, {
10730
11211
  key: 0,
10731
11212
  content: "Edit Mode",
@@ -10874,7 +11355,7 @@ function Qy(e, t, n, o, r, a) {
10874
11355
  ]) : D("", !0)
10875
11356
  ]);
10876
11357
  }
10877
- const w2 = /* @__PURE__ */ $t(Zy, [["render", Qy], ["__scopeId", "data-v-6ac1a744"]]), eb = {
11358
+ const C2 = /* @__PURE__ */ $t(hb, [["render", mb], ["__scopeId", "data-v-6ac1a744"]]), yb = {
10878
11359
  name: "HelpModeDialog",
10879
11360
  props: {
10880
11361
  /**
@@ -11008,19 +11489,19 @@ const w2 = /* @__PURE__ */ $t(Zy, [["render", Qy], ["__scopeId", "data-v-6ac1a74
11008
11489
  return n ? n[n.length - 1].slice(10, -1) : "";
11009
11490
  }
11010
11491
  }
11011
- }, ga = (e) => (Vo("data-v-3efb89fb"), e = e(), zo(), e), tb = /* @__PURE__ */ ga(() => /* @__PURE__ */ T("h4", null, "Help Mode", -1)), nb = /* @__PURE__ */ ga(() => /* @__PURE__ */ T("p", null, [
11492
+ }, ga = (e) => (Vo("data-v-3efb89fb"), e = e(), zo(), e), bb = /* @__PURE__ */ ga(() => /* @__PURE__ */ T("h4", null, "Help Mode", -1)), wb = /* @__PURE__ */ ga(() => /* @__PURE__ */ T("p", null, [
11012
11493
  /* @__PURE__ */ ne(" All caught up! "),
11013
11494
  /* @__PURE__ */ T("br"),
11014
11495
  /* @__PURE__ */ ne(" Click 'Help' to restart. ")
11015
- ], -1)), ob = /* @__PURE__ */ ga(() => /* @__PURE__ */ T("p", null, 'Click "Next" to see the next item.', -1));
11016
- function rb(e, t, n, o, r, a) {
11496
+ ], -1)), Cb = /* @__PURE__ */ ga(() => /* @__PURE__ */ T("p", null, 'Click "Next" to see the next item.', -1));
11497
+ function kb(e, t, n, o, r, a) {
11017
11498
  const i = Wt;
11018
11499
  return b(), E("div", {
11019
11500
  class: F(["help-mode-dialog", { finish: n.lastItem }])
11020
11501
  }, [
11021
- tb,
11502
+ bb,
11022
11503
  n.lastItem ? (b(), E(ie, { key: 0 }, [
11023
- nb,
11504
+ wb,
11024
11505
  T("div", null, [
11025
11506
  I(i, {
11026
11507
  class: "button",
@@ -11033,7 +11514,7 @@ function rb(e, t, n, o, r, a) {
11033
11514
  }, 8, ["onClick"])
11034
11515
  ])
11035
11516
  ], 64)) : (b(), E(ie, { key: 1 }, [
11036
- ob,
11517
+ Cb,
11037
11518
  T("div", null, [
11038
11519
  I(i, {
11039
11520
  class: "button",
@@ -11057,8 +11538,8 @@ function rb(e, t, n, o, r, a) {
11057
11538
  ], 64))
11058
11539
  ], 2);
11059
11540
  }
11060
- const C2 = /* @__PURE__ */ $t(eb, [["render", rb], ["__scopeId", "data-v-3efb89fb"]]);
11061
- function ab(e) {
11541
+ const k2 = /* @__PURE__ */ $t(yb, [["render", kb], ["__scopeId", "data-v-3efb89fb"]]);
11542
+ function _b(e) {
11062
11543
  return { all: e = e || /* @__PURE__ */ new Map(), on: function(t, n) {
11063
11544
  var o = e.get(t);
11064
11545
  o ? o.push(n) : e.set(t, [n]);
@@ -11074,7 +11555,7 @@ function ab(e) {
11074
11555
  });
11075
11556
  } };
11076
11557
  }
11077
- const Yn = new ab(), ib = {
11558
+ const Yn = new _b(), xb = {
11078
11559
  name: "ExternalResourceCard",
11079
11560
  props: {
11080
11561
  resources: {
@@ -11097,10 +11578,10 @@ const Yn = new ab(), ib = {
11097
11578
  Yn.emit("open-pubmed-url", e), window.open(e, "_blank");
11098
11579
  }
11099
11580
  }
11100
- }, sb = { class: "resource-container" };
11101
- function lb(e, t, n, o, r, a) {
11581
+ }, Eb = { class: "resource-container" };
11582
+ function Sb(e, t, n, o, r, a) {
11102
11583
  const i = Wt;
11103
- return b(), E("div", sb, [
11584
+ return b(), E("div", Eb, [
11104
11585
  (b(!0), E(ie, null, Re(n.resources, (s) => (b(), E("div", {
11105
11586
  key: s.id,
11106
11587
  class: "resource"
@@ -11120,9 +11601,9 @@ function lb(e, t, n, o, r, a) {
11120
11601
  ]))), 128))
11121
11602
  ]);
11122
11603
  }
11123
- const cb = /* @__PURE__ */ $t(ib, [["render", lb], ["__scopeId", "data-v-4f8d8b0f"]]), ub = (e) => e.replace(/\w\S*/g, (t) => t.charAt(0).toUpperCase() + t.substr(1).toLowerCase()), db = function(e) {
11604
+ const Fb = /* @__PURE__ */ $t(xb, [["render", Sb], ["__scopeId", "data-v-4f8d8b0f"]]), Tb = (e) => e.replace(/\w\S*/g, (t) => t.charAt(0).toUpperCase() + t.substr(1).toLowerCase()), Ob = function(e) {
11124
11605
  return e ? e.charAt(0).toUpperCase() + e.slice(1) : "";
11125
- }, fb = {
11606
+ }, Ib = {
11126
11607
  name: "ProvenancePopup",
11127
11608
  props: {
11128
11609
  tooltipEntry: {
@@ -11175,10 +11656,10 @@ const cb = /* @__PURE__ */ $t(ib, [["render", lb], ["__scopeId", "data-v-4f8d8b0
11175
11656
  },
11176
11657
  methods: {
11177
11658
  titleCase: function(e) {
11178
- return ub(e);
11659
+ return Tb(e);
11179
11660
  },
11180
11661
  capitalise: function(e) {
11181
- return db(e);
11662
+ return Ob(e);
11182
11663
  },
11183
11664
  openUrl: function(e) {
11184
11665
  window.open(e, "_blank");
@@ -11205,56 +11686,56 @@ const cb = /* @__PURE__ */ $t(ib, [["render", lb], ["__scopeId", "data-v-4f8d8b0
11205
11686
  this.pubmedSearchUrl = e;
11206
11687
  }
11207
11688
  }
11208
- }, Rn = (e) => (Vo("data-v-ef9a0f6d"), e = e(), zo(), e), pb = {
11689
+ }, Rn = (e) => (Vo("data-v-ef9a0f6d"), e = e(), zo(), e), $b = {
11209
11690
  key: 0,
11210
11691
  class: "main"
11211
- }, hb = {
11692
+ }, Nb = {
11212
11693
  key: 0,
11213
11694
  class: "block"
11214
- }, vb = { class: "title" }, gb = {
11695
+ }, Ab = { class: "title" }, Pb = {
11215
11696
  key: 0,
11216
11697
  class: "subtitle"
11217
- }, mb = {
11698
+ }, Lb = {
11218
11699
  key: 1,
11219
11700
  class: "block"
11220
- }, yb = { class: "title" }, bb = {
11701
+ }, Mb = { class: "title" }, Db = {
11221
11702
  key: 2,
11222
11703
  class: "attribute-title-container"
11223
- }, wb = /* @__PURE__ */ Rn(() => /* @__PURE__ */ T("span", { class: "attribute-title" }, "Alert", -1)), Cb = { style: { "word-break": "keep-all" } }, kb = { class: "content-container scrollbar" }, _b = {
11704
+ }, Bb = /* @__PURE__ */ Rn(() => /* @__PURE__ */ T("span", { class: "attribute-title" }, "Alert", -1)), Rb = { style: { "word-break": "keep-all" } }, Hb = { class: "content-container scrollbar" }, Vb = {
11224
11705
  key: 0,
11225
11706
  class: "block"
11226
- }, xb = { class: "attribute-title-container" }, Eb = /* @__PURE__ */ Rn(() => /* @__PURE__ */ T("span", { class: "attribute-title" }, "Origin", -1)), Sb = { style: { "word-break": "keep-all" } }, Fb = /* @__PURE__ */ Rn(() => /* @__PURE__ */ T("i", null, "Origin", -1)), Tb = ["origin-item-label"], Ob = {
11707
+ }, zb = { class: "attribute-title-container" }, Kb = /* @__PURE__ */ Rn(() => /* @__PURE__ */ T("span", { class: "attribute-title" }, "Origin", -1)), jb = { style: { "word-break": "keep-all" } }, Ub = /* @__PURE__ */ Rn(() => /* @__PURE__ */ T("i", null, "Origin", -1)), qb = ["origin-item-label"], Wb = {
11227
11708
  key: 0,
11228
11709
  class: "separator"
11229
- }, Ib = {
11710
+ }, Gb = {
11230
11711
  key: 1,
11231
11712
  class: "block"
11232
- }, $b = /* @__PURE__ */ Rn(() => /* @__PURE__ */ T("div", { class: "attribute-title-container" }, [
11713
+ }, Yb = /* @__PURE__ */ Rn(() => /* @__PURE__ */ T("div", { class: "attribute-title-container" }, [
11233
11714
  /* @__PURE__ */ T("div", { class: "attribute-title" }, "Components")
11234
- ], -1)), Nb = ["component-item-label"], Ab = {
11715
+ ], -1)), Zb = ["component-item-label"], Xb = {
11235
11716
  key: 0,
11236
11717
  class: "separator"
11237
- }, Pb = {
11718
+ }, Jb = {
11238
11719
  key: 2,
11239
11720
  class: "block"
11240
- }, Lb = { class: "attribute-title-container" }, Mb = /* @__PURE__ */ Rn(() => /* @__PURE__ */ T("span", { class: "attribute-title" }, "Destination", -1)), Db = /* @__PURE__ */ Rn(() => /* @__PURE__ */ T("span", { style: { "word-break": "keep-all" } }, [
11721
+ }, Qb = { class: "attribute-title-container" }, e2 = /* @__PURE__ */ Rn(() => /* @__PURE__ */ T("span", { class: "attribute-title" }, "Destination", -1)), t2 = /* @__PURE__ */ Rn(() => /* @__PURE__ */ T("span", { style: { "word-break": "keep-all" } }, [
11241
11722
  /* @__PURE__ */ T("i", null, "Destination"),
11242
11723
  /* @__PURE__ */ ne(" is where the axons terminate ")
11243
- ], -1)), Bb = ["destination-item-label"], Rb = {
11724
+ ], -1)), n2 = ["destination-item-label"], o2 = {
11244
11725
  key: 0,
11245
11726
  class: "separator"
11246
11727
  };
11247
- function Hb(e, t, n, o, r, a) {
11248
- const i = Eh, s = Me, l = pa, c = ms, u = Zo, f = Wt, v = cb, g = ml;
11249
- return n.tooltipEntry ? se((b(), E("div", pb, [
11250
- n.tooltipEntry.title ? (b(), E("div", hb, [
11251
- T("div", vb, Z(a.capitalise(n.tooltipEntry.title)), 1),
11252
- n.tooltipEntry.provenanceTaxonomyLabel && n.tooltipEntry.provenanceTaxonomyLabel.length > 0 ? (b(), E("div", gb, Z(a.provSpeciesDescription), 1)) : D("", !0)
11253
- ])) : (b(), E("div", mb, [
11254
- T("div", yb, Z(n.tooltipEntry.featureId), 1)
11728
+ function r2(e, t, n, o, r, a) {
11729
+ const i = Eh, s = Me, l = pa, c = ms, u = Zo, f = Wt, v = Fb, g = ml;
11730
+ return n.tooltipEntry ? se((b(), E("div", $b, [
11731
+ n.tooltipEntry.title ? (b(), E("div", Nb, [
11732
+ T("div", Ab, Z(a.capitalise(n.tooltipEntry.title)), 1),
11733
+ n.tooltipEntry.provenanceTaxonomyLabel && n.tooltipEntry.provenanceTaxonomyLabel.length > 0 ? (b(), E("div", Pb, Z(a.provSpeciesDescription), 1)) : D("", !0)
11734
+ ])) : (b(), E("div", Lb, [
11735
+ T("div", Mb, Z(n.tooltipEntry.featureId), 1)
11255
11736
  ])),
11256
- a.featuresAlert ? (b(), E("div", bb, [
11257
- wb,
11737
+ a.featuresAlert ? (b(), E("div", Db, [
11738
+ Bb,
11258
11739
  I(l, {
11259
11740
  width: "250",
11260
11741
  trigger: "hover",
@@ -11270,7 +11751,7 @@ function Hb(e, t, n, o, r, a) {
11270
11751
  })
11271
11752
  ]),
11272
11753
  default: S(() => [
11273
- T("span", Cb, Z(a.featuresAlert), 1)
11754
+ T("span", Rb, Z(a.featuresAlert), 1)
11274
11755
  ]),
11275
11756
  _: 1
11276
11757
  })
@@ -11302,547 +11783,146 @@ function Hb(e, t, n, o, r, a) {
11302
11783
  ]),
11303
11784
  _: 1
11304
11785
  })
11305
- ], 512), [
11306
- [we, !e.showDetails]
11307
- ]),
11308
- I(Ln, { name: "slide-fade" }, {
11309
- default: S(() => [
11310
- se(T("div", kb, [
11311
- ne(Z(n.tooltipEntry.paths) + " ", 1),
11312
- n.tooltipEntry.origins && n.tooltipEntry.origins.length > 0 ? (b(), E("div", _b, [
11313
- T("div", xb, [
11314
- Eb,
11315
- I(l, {
11316
- width: "250",
11317
- trigger: "hover",
11318
- teleported: !1,
11319
- "popper-class": "popover-origin-help"
11320
- }, {
11321
- reference: S(() => [
11322
- I(s, { class: "info" }, {
11323
- default: S(() => [
11324
- I(i)
11325
- ]),
11326
- _: 1
11327
- })
11328
- ]),
11329
- default: S(() => [
11330
- T("span", Sb, [
11331
- Fb,
11332
- ne(" " + Z(a.originDescription), 1)
11333
- ])
11334
- ]),
11335
- _: 1
11336
- })
11337
- ]),
11338
- (b(!0), E(ie, null, Re(n.tooltipEntry.origins, (d, h) => (b(), E("div", {
11339
- class: "attribute-content",
11340
- "origin-item-label": d,
11341
- key: d
11342
- }, [
11343
- ne(Z(a.capitalise(d)) + " ", 1),
11344
- h != n.tooltipEntry.origins.length - 1 ? (b(), E("div", Ob)) : D("", !0)
11345
- ], 8, Tb))), 128)),
11346
- se(I(f, {
11347
- class: "button",
11348
- id: "open-dendrites-button",
11349
- onClick: a.openDendrites
11350
- }, {
11351
- default: S(() => [
11352
- ne(" Explore origin data ")
11353
- ]),
11354
- _: 1
11355
- }, 8, ["onClick"]), [
11356
- [
11357
- we,
11358
- n.tooltipEntry.originsWithDatasets && n.tooltipEntry.originsWithDatasets.length > 0
11359
- ]
11360
- ])
11361
- ])) : D("", !0),
11362
- n.tooltipEntry.components && n.tooltipEntry.components.length > 0 ? (b(), E("div", Ib, [
11363
- $b,
11364
- (b(!0), E(ie, null, Re(n.tooltipEntry.components, (d, h) => (b(), E("div", {
11365
- class: "attribute-content",
11366
- "component-item-label": d,
11367
- key: d
11368
- }, [
11369
- ne(Z(a.capitalise(d)) + " ", 1),
11370
- h != n.tooltipEntry.components.length - 1 ? (b(), E("div", Ab)) : D("", !0)
11371
- ], 8, Nb))), 128))
11372
- ])) : D("", !0),
11373
- n.tooltipEntry.destinations && n.tooltipEntry.destinations.length > 0 ? (b(), E("div", Pb, [
11374
- T("div", Lb, [
11375
- Mb,
11376
- I(l, {
11377
- width: "250",
11378
- trigger: "hover",
11379
- teleported: !1,
11380
- "popper-class": "popover-origin-help"
11381
- }, {
11382
- reference: S(() => [
11383
- I(s, { class: "info" }, {
11384
- default: S(() => [
11385
- I(i)
11386
- ]),
11387
- _: 1
11388
- })
11389
- ]),
11390
- default: S(() => [
11391
- Db
11392
- ]),
11393
- _: 1
11394
- })
11395
- ]),
11396
- (b(!0), E(ie, null, Re(n.tooltipEntry.destinations, (d, h) => (b(), E("div", {
11397
- class: "attribute-content",
11398
- "destination-item-label": d,
11399
- key: d
11400
- }, [
11401
- ne(Z(a.capitalise(d)) + " ", 1),
11402
- h != n.tooltipEntry.destinations.length - 1 ? (b(), E("div", Rb)) : D("", !0)
11403
- ], 8, Bb))), 128)),
11404
- se(I(f, {
11405
- class: "button",
11406
- onClick: a.openAxons
11407
- }, {
11408
- default: S(() => [
11409
- ne(" Explore destination data ")
11410
- ]),
11411
- _: 1
11412
- }, 8, ["onClick"]), [
11413
- [
11414
- we,
11415
- n.tooltipEntry.destinationsWithDatasets && n.tooltipEntry.destinationsWithDatasets.length > 0
11416
- ]
11417
- ])
11418
- ])) : D("", !0),
11419
- se(I(f, {
11420
- class: "button",
11421
- onClick: a.openAll
11422
- }, {
11423
- default: S(() => [
11424
- ne(" Search for data on components ")
11425
- ]),
11426
- _: 1
11427
- }, 8, ["onClick"]), [
11428
- [
11429
- we,
11430
- n.tooltipEntry.componentsWithDatasets && n.tooltipEntry.componentsWithDatasets.length > 0
11431
- ]
11432
- ]),
11433
- I(v, { resources: a.resources }, null, 8, ["resources"])
11434
- ], 512), [
11435
- [we, e.showDetails]
11436
- ])
11437
- ]),
11438
- _: 1
11439
- })
11440
- ])), [
11441
- [g, e.loading]
11442
- ]) : D("", !0);
11443
- }
11444
- const Vb = /* @__PURE__ */ $t(fb, [["render", Hb], ["__scopeId", "data-v-ef9a0f6d"]]), zb = {
11445
- name: "AnnotationPopup",
11446
- props: {
11447
- annotationEntry: {
11448
- type: Object
11449
- }
11450
- },
11451
- inject: ["$annotator", "userApiKey"],
11452
- data: function() {
11453
- return {
11454
- displayPair: {
11455
- "Feature ID": "featureId",
11456
- Tooltip: "label",
11457
- Models: "models",
11458
- Name: "name",
11459
- Resource: "resourceId"
11460
- },
11461
- editing: !1,
11462
- evidencePrefixes: ["DOI:", "PMID:"],
11463
- evidencePrefix: "DOI:",
11464
- evidence: [],
11465
- authenticated: !1,
11466
- newEvidence: "",
11467
- comment: "",
11468
- prevSubs: [],
11469
- showSubmissions: !0,
11470
- errorMessage: "",
11471
- creator: void 0
11472
- };
11473
- },
11474
- computed: {
11475
- isEditable: function() {
11476
- return this.annotationEntry.resourceId && this.annotationEntry.featureId;
11477
- },
11478
- isPositionUpdated: function() {
11479
- return this.annotationEntry.resourceId && this.annotationEntry.type === "updated" && this.annotationEntry.positionUpdated;
11480
- },
11481
- isDeleted: function() {
11482
- return this.annotationEntry.resourceId && this.annotationEntry.type === "deleted";
11483
- }
11484
- },
11485
- methods: {
11486
- evidenceEntered: function(e) {
11487
- e && (this.evidence.push(this.evidencePrefix + e), this.newEvidence = "");
11488
- },
11489
- formatTime: function(e) {
11490
- const t = {
11491
- year: "numeric",
11492
- month: "long",
11493
- day: "numeric",
11494
- hour: "numeric",
11495
- minute: "numeric",
11496
- second: "numeric"
11497
- };
11498
- return new Date(e).toLocaleDateString(void 0, t);
11499
- },
11500
- updatePrevSubmissions: function() {
11501
- var e;
11502
- this.$annotator && this.authenticated && this.annotationEntry.resourceId && this.annotationEntry.featureId && ((e = this.$annotator) == null || e.itemAnnotations(
11503
- this.userApiKey,
11504
- this.annotationEntry.resourceId,
11505
- this.annotationEntry.featureId
11506
- ).then((t) => {
11507
- this.prevSubs = t;
11508
- }).catch((t) => {
11509
- console.log(t);
11510
- }));
11511
- },
11512
- submit: function() {
11513
- var e;
11514
- if (this.annotationEntry.type === "updated" && this.annotationEntry.positionUpdated ? this.comment = this.comment ? `Position Updated: ${this.comment}` : "Position Updated" : this.annotationEntry.type === "deleted" && (this.comment = this.comment ? `Feature Deleted: ${this.comment}` : "Feature Deleted"), (this.evidence.length > 0 || this.comment) && this.annotationEntry.resourceId && this.annotationEntry.featureId) {
11515
- const t = [];
11516
- this.evidence.forEach((o) => {
11517
- if (o.includes("DOI:")) {
11518
- const r = o.replace("DOI:", "https://doi.org/");
11519
- t.push(new URL(r));
11520
- } else if (o.includes("PMID:")) {
11521
- const r = o.replace(
11522
- "PMID:",
11523
- "https://pubmed.ncbi.nlm.nih.gov/"
11524
- );
11525
- t.push(new URL(r));
11526
- }
11527
- });
11528
- const n = {
11529
- resource: this.annotationEntry.resourceId,
11530
- item: Object.assign(
11531
- { id: this.annotationEntry.featureId },
11532
- Object.fromEntries(
11533
- Object.entries(this.annotationEntry).filter(
11534
- ([o]) => ["label", "models"].includes(o)
11535
- )
11536
- )
11537
- ),
11538
- body: {
11539
- evidence: t,
11540
- comment: this.comment
11541
- },
11542
- feature: this.annotationEntry.feature
11543
- };
11544
- Object.assign(n.body, this.annotationEntry.body), this.annotationEntry.type === "deleted" && (n.feature = void 0), this.creator && (n.creator = this.creator), (e = this.$annotator) == null || e.addAnnotation(this.userApiKey, n).then(() => {
11545
- this.$emit("annotation", n), this.errorMessage = "", this.resetSubmission(), this.updatePrevSubmissions();
11546
- }).catch(() => {
11547
- this.errorMessage = "There is a problem with the submission, please try again later";
11548
- });
11549
- }
11550
- },
11551
- removeEvidence: function(e) {
11552
- this.evidence.splice(e, 1);
11553
- },
11554
- resetSubmission: function() {
11555
- this.editing = !1, this.evidence = [], this.newFeature = "", this.comment = "";
11556
- }
11557
- },
11558
- watch: {
11559
- annotationEntry: {
11560
- handler: function(e, t) {
11561
- e !== t && (this.resetSubmission(), this.updatePrevSubmissions());
11562
- },
11563
- immediate: !1,
11564
- deep: !1
11565
- }
11566
- },
11567
- mounted: function() {
11568
- var e;
11569
- (e = this.$annotator) == null || e.authenticate(this.userApiKey).then((t) => {
11570
- t.name && t.email && t.canUpdate ? (this.creator = t, t.orcid || (this.creator.orcid = "0000-0000-0000-0000"), this.authenticated = !0, this.updatePrevSubmissions()) : this.errorMessage = "";
11571
- });
11572
- }
11573
- }, hn = (e) => (Vo("data-v-09c78af1"), e = e(), zo(), e), Kb = { class: "block" }, jb = /* @__PURE__ */ hn(() => /* @__PURE__ */ T("div", { class: "title" }, "Feature Annotations", -1)), Ub = /* @__PURE__ */ hn(() => /* @__PURE__ */ T("strong", { class: "sub-title" }, "Previous submissions:", -1)), qb = /* @__PURE__ */ hn(() => /* @__PURE__ */ T("strong", null, "Evidence: ", -1)), Wb = ["href"], Gb = /* @__PURE__ */ hn(() => /* @__PURE__ */ T("strong", null, "Comment: ", -1)), Yb = /* @__PURE__ */ hn(() => /* @__PURE__ */ T("strong", { class: "sub-title" }, "Suggest changes:", -1)), Zb = /* @__PURE__ */ hn(() => /* @__PURE__ */ T("strong", null, "Evidence:", -1)), Xb = /* @__PURE__ */ hn(() => /* @__PURE__ */ T("strong", null, "Comment:", -1)), Jb = { class: "sub-title" };
11574
- function Qb(e, t, n, o, r, a) {
11575
- const i = ua, s = ms, l = Me, c = Zo, u = hh, f = fh, v = gh, g = da, d = Bo, h = ty, y = ey, m = ra, k = Wt, $ = I1;
11576
- return b(), B($, { class: "main" }, {
11577
- default: S(() => [
11578
- T("div", Kb, [
11579
- I(i, { class: "info-field" }, {
11580
- default: S(() => [
11581
- jb
11582
- ]),
11583
- _: 1
11584
- }),
11585
- n.annotationEntry ? (b(), E(ie, { key: 0 }, [
11586
- (b(!0), E(ie, null, Re(e.displayPair, (_, C) => se((b(), B(i, {
11587
- class: "dialog-text",
11588
- key: _
11589
- }, {
11590
- default: S(() => [
11591
- T("strong", null, Z(C) + ": ", 1),
11592
- ne(" " + Z(n.annotationEntry[_]), 1)
11593
- ]),
11594
- _: 2
11595
- }, 1024)), [
11596
- [we, n.annotationEntry[_]]
11597
- ])), 128)),
11598
- e.prevSubs.length > 0 ? (b(), E(ie, { key: 0 }, [
11599
- se(T("div", {
11600
- class: "hide",
11601
- onClick: t[0] || (t[0] = (_) => e.showSubmissions = !1)
11602
- }, [
11603
- ne(" Hide previous submissions "),
11604
- I(l, null, {
11605
- default: S(() => [
11606
- I(s)
11607
- ]),
11608
- _: 1
11609
- })
11610
- ], 512), [
11611
- [we, e.showSubmissions]
11612
- ]),
11613
- se(T("div", {
11614
- class: "hide",
11615
- onClick: t[1] || (t[1] = (_) => e.showSubmissions = !0)
11616
- }, [
11617
- ne(" Show previous " + Z(e.prevSubs.length) + " submission(s) ", 1),
11618
- I(l, null, {
11619
- default: S(() => [
11620
- I(c)
11621
- ]),
11622
- _: 1
11623
- })
11624
- ], 512), [
11625
- [we, !e.showSubmissions]
11626
- ]),
11627
- e.showSubmissions ? (b(), E(ie, { key: 0 }, [
11628
- I(i, { class: "dialog-spacer" }),
11629
- I(i, { class: "dialog-text" }, {
11630
- default: S(() => [
11631
- Ub
11632
- ]),
11633
- _: 1
11634
- }),
11635
- (b(!0), E(ie, null, Re(e.prevSubs, (_, C) => (b(), E("div", {
11636
- class: "entry",
11637
- key: C
11638
- }, [
11639
- I(i, { class: "dialog-text" }, {
11640
- default: S(() => [
11641
- T("strong", null, Z(a.formatTime(_.created)), 1),
11642
- ne(" " + Z(_.creator.name), 1)
11643
- ]),
11644
- _: 2
11645
- }, 1024),
11646
- I(i, { class: "dialog-text" }, {
11647
- default: S(() => [
11648
- qb,
11649
- (b(!0), E(ie, null, Re(_.body.evidence, (A) => (b(), B(i, {
11650
- key: A,
11651
- class: "dialog-text"
11652
- }, {
11653
- default: S(() => [
11654
- T("a", {
11655
- href: A,
11656
- target: "_blank"
11657
- }, Z(A), 9, Wb)
11658
- ]),
11659
- _: 2
11660
- }, 1024))), 128))
11661
- ]),
11662
- _: 2
11663
- }, 1024),
11664
- I(i, { class: "dialog-text" }, {
11665
- default: S(() => [
11666
- Gb,
11667
- ne(" " + Z(_.body.comment), 1)
11668
- ]),
11669
- _: 2
11670
- }, 1024)
11671
- ]))), 128))
11672
- ], 64)) : D("", !0)
11673
- ], 64)) : D("", !0),
11674
- e.authenticated ? (b(), E(ie, { key: 1 }, [
11675
- a.isEditable ? (b(), E(ie, { key: 0 }, [
11676
- I(i, { class: "dialog-spacer" }),
11677
- e.editing ? (b(), E(ie, { key: 1 }, [
11678
- I(i, { class: "dialog-text" }, {
11679
- default: S(() => [
11680
- Yb
11681
- ]),
11682
- _: 1
11683
- }),
11684
- a.isDeleted ? D("", !0) : (b(), E(ie, { key: 0 }, [
11685
- I(i, { class: "dialog-text" }, {
11686
- default: S(() => [
11687
- Zb
11688
- ]),
11689
- _: 1
11690
- }),
11691
- (b(!0), E(ie, null, Re(e.evidence, (_, C) => (b(), B(i, { key: _ }, {
11692
- default: S(() => [
11693
- I(g, { span: 20 }, {
11694
- default: S(() => [
11695
- ne(Z(e.evidence[C]), 1)
11696
- ]),
11697
- _: 2
11698
- }, 1024),
11699
- I(g, { span: 4 }, {
11700
- default: S(() => [
11701
- I(l, { class: "standard-icon" }, {
11702
- default: S(() => [
11703
- I(d, {
11704
- onClick: (A) => a.removeEvidence(C)
11705
- }, null, 8, ["onClick"])
11706
- ]),
11707
- _: 2
11708
- }, 1024)
11709
- ]),
11710
- _: 2
11711
- }, 1024)
11712
- ]),
11713
- _: 2
11714
- }, 1024))), 128)),
11715
- I(i, null, {
11716
- default: S(() => [
11717
- I(m, {
11718
- size: "small",
11719
- placeholder: "Enter",
11720
- modelValue: e.newEvidence,
11721
- "onUpdate:modelValue": t[4] || (t[4] = (_) => e.newEvidence = _),
11722
- onChange: t[5] || (t[5] = (_) => a.evidenceEntered(_))
11723
- }, {
11724
- prepend: S(() => [
11725
- I(y, {
11726
- teleported: !1,
11727
- modelValue: e.evidencePrefix,
11728
- "onUpdate:modelValue": t[3] || (t[3] = (_) => e.evidencePrefix = _),
11729
- placeholder: "Select",
11730
- class: "select-box",
11731
- "popper-class": "flatmap_dropdown"
11732
- }, {
11733
- default: S(() => [
11734
- (b(!0), E(ie, null, Re(e.evidencePrefixes, (_) => (b(), B(h, {
11735
- key: _,
11736
- label: _,
11737
- value: _
11738
- }, {
11739
- default: S(() => [
11740
- I(i, null, {
11741
- default: S(() => [
11742
- I(g, { span: 12 }, {
11743
- default: S(() => [
11744
- ne(Z(_), 1)
11745
- ]),
11746
- _: 2
11747
- }, 1024)
11748
- ]),
11749
- _: 2
11750
- }, 1024)
11751
- ]),
11752
- _: 2
11753
- }, 1032, ["label", "value"]))), 128))
11754
- ]),
11755
- _: 1
11756
- }, 8, ["modelValue"])
11757
- ]),
11758
- _: 1
11759
- }, 8, ["modelValue"])
11786
+ ], 512), [
11787
+ [we, !e.showDetails]
11788
+ ]),
11789
+ I(Ln, { name: "slide-fade" }, {
11790
+ default: S(() => [
11791
+ se(T("div", Hb, [
11792
+ ne(Z(n.tooltipEntry.paths) + " ", 1),
11793
+ n.tooltipEntry.origins && n.tooltipEntry.origins.length > 0 ? (b(), E("div", Vb, [
11794
+ T("div", zb, [
11795
+ Kb,
11796
+ I(l, {
11797
+ width: "250",
11798
+ trigger: "hover",
11799
+ teleported: !1,
11800
+ "popper-class": "popover-origin-help"
11801
+ }, {
11802
+ reference: S(() => [
11803
+ I(s, { class: "info" }, {
11804
+ default: S(() => [
11805
+ I(i)
11760
11806
  ]),
11761
11807
  _: 1
11762
11808
  })
11763
- ], 64)),
11764
- I(i, null, {
11765
- default: S(() => [
11766
- Xb
11767
- ]),
11768
- _: 1
11769
- }),
11770
- I(i, { class: "dialog-text" }, {
11771
- default: S(() => [
11772
- I(m, {
11773
- type: "textarea",
11774
- autosize: { minRows: 2, maxRows: 4 },
11775
- placeholder: "Enter",
11776
- modelValue: e.comment,
11777
- "onUpdate:modelValue": t[6] || (t[6] = (_) => e.comment = _)
11778
- }, null, 8, ["modelValue"])
11779
- ]),
11780
- _: 1
11781
- }),
11782
- I(i, { class: "dialog-text" }, {
11783
- default: S(() => [
11784
- I(k, {
11785
- class: "button",
11786
- type: "primary",
11787
- plain: "",
11788
- onClick: a.submit
11789
- }, {
11790
- default: S(() => [
11791
- ne(" Submit ")
11792
- ]),
11793
- _: 1
11794
- }, 8, ["onClick"])
11795
- ]),
11796
- _: 1
11797
- })
11798
- ], 64)) : (b(), B(i, { key: 0 }, {
11809
+ ]),
11799
11810
  default: S(() => [
11800
- I(l, { class: "standard-icon" }, {
11801
- default: S(() => [
11802
- I(u, {
11803
- onClick: t[2] || (t[2] = (_) => e.editing = !0)
11804
- })
11805
- ]),
11806
- _: 1
11807
- }),
11808
- a.isDeleted ? (b(), B(l, {
11809
- key: 0,
11810
- class: "standard-icon"
11811
- }, {
11812
- default: S(() => [
11813
- I(f, { onClick: a.submit }, null, 8, ["onClick"])
11814
- ]),
11815
- _: 1
11816
- })) : a.isPositionUpdated ? (b(), B(l, {
11817
- key: 1,
11818
- class: "standard-icon"
11819
- }, {
11811
+ T("span", jb, [
11812
+ Ub,
11813
+ ne(" " + Z(a.originDescription), 1)
11814
+ ])
11815
+ ]),
11816
+ _: 1
11817
+ })
11818
+ ]),
11819
+ (b(!0), E(ie, null, Re(n.tooltipEntry.origins, (d, h) => (b(), E("div", {
11820
+ class: "attribute-content",
11821
+ "origin-item-label": d,
11822
+ key: d
11823
+ }, [
11824
+ ne(Z(a.capitalise(d)) + " ", 1),
11825
+ h != n.tooltipEntry.origins.length - 1 ? (b(), E("div", Wb)) : D("", !0)
11826
+ ], 8, qb))), 128)),
11827
+ se(I(f, {
11828
+ class: "button",
11829
+ id: "open-dendrites-button",
11830
+ onClick: a.openDendrites
11831
+ }, {
11832
+ default: S(() => [
11833
+ ne(" Explore origin data ")
11834
+ ]),
11835
+ _: 1
11836
+ }, 8, ["onClick"]), [
11837
+ [
11838
+ we,
11839
+ n.tooltipEntry.originsWithDatasets && n.tooltipEntry.originsWithDatasets.length > 0
11840
+ ]
11841
+ ])
11842
+ ])) : D("", !0),
11843
+ n.tooltipEntry.components && n.tooltipEntry.components.length > 0 ? (b(), E("div", Gb, [
11844
+ Yb,
11845
+ (b(!0), E(ie, null, Re(n.tooltipEntry.components, (d, h) => (b(), E("div", {
11846
+ class: "attribute-content",
11847
+ "component-item-label": d,
11848
+ key: d
11849
+ }, [
11850
+ ne(Z(a.capitalise(d)) + " ", 1),
11851
+ h != n.tooltipEntry.components.length - 1 ? (b(), E("div", Xb)) : D("", !0)
11852
+ ], 8, Zb))), 128))
11853
+ ])) : D("", !0),
11854
+ n.tooltipEntry.destinations && n.tooltipEntry.destinations.length > 0 ? (b(), E("div", Jb, [
11855
+ T("div", Qb, [
11856
+ e2,
11857
+ I(l, {
11858
+ width: "250",
11859
+ trigger: "hover",
11860
+ teleported: !1,
11861
+ "popper-class": "popover-origin-help"
11862
+ }, {
11863
+ reference: S(() => [
11864
+ I(s, { class: "info" }, {
11820
11865
  default: S(() => [
11821
- I(v, { onClick: a.submit }, null, 8, ["onClick"])
11866
+ I(i)
11822
11867
  ]),
11823
11868
  _: 1
11824
- })) : D("", !0)
11869
+ })
11825
11870
  ]),
11826
- _: 1
11827
- })),
11828
- e.errorMessage ? (b(), B(i, {
11829
- key: 2,
11830
- class: "dialog-text"
11831
- }, {
11832
11871
  default: S(() => [
11833
- T("strong", Jb, Z(e.errorMessage), 1)
11872
+ t2
11834
11873
  ]),
11835
11874
  _: 1
11836
- })) : D("", !0)
11837
- ], 64)) : D("", !0)
11838
- ], 64)) : D("", !0)
11839
- ], 64)) : D("", !0)
11840
- ])
11841
- ]),
11842
- _: 1
11843
- });
11875
+ })
11876
+ ]),
11877
+ (b(!0), E(ie, null, Re(n.tooltipEntry.destinations, (d, h) => (b(), E("div", {
11878
+ class: "attribute-content",
11879
+ "destination-item-label": d,
11880
+ key: d
11881
+ }, [
11882
+ ne(Z(a.capitalise(d)) + " ", 1),
11883
+ h != n.tooltipEntry.destinations.length - 1 ? (b(), E("div", o2)) : D("", !0)
11884
+ ], 8, n2))), 128)),
11885
+ se(I(f, {
11886
+ class: "button",
11887
+ onClick: a.openAxons
11888
+ }, {
11889
+ default: S(() => [
11890
+ ne(" Explore destination data ")
11891
+ ]),
11892
+ _: 1
11893
+ }, 8, ["onClick"]), [
11894
+ [
11895
+ we,
11896
+ n.tooltipEntry.destinationsWithDatasets && n.tooltipEntry.destinationsWithDatasets.length > 0
11897
+ ]
11898
+ ])
11899
+ ])) : D("", !0),
11900
+ se(I(f, {
11901
+ class: "button",
11902
+ onClick: a.openAll
11903
+ }, {
11904
+ default: S(() => [
11905
+ ne(" Search for data on components ")
11906
+ ]),
11907
+ _: 1
11908
+ }, 8, ["onClick"]), [
11909
+ [
11910
+ we,
11911
+ n.tooltipEntry.componentsWithDatasets && n.tooltipEntry.componentsWithDatasets.length > 0
11912
+ ]
11913
+ ]),
11914
+ I(v, { resources: a.resources }, null, 8, ["resources"])
11915
+ ], 512), [
11916
+ [we, e.showDetails]
11917
+ ])
11918
+ ]),
11919
+ _: 1
11920
+ })
11921
+ ])), [
11922
+ [g, e.loading]
11923
+ ]) : D("", !0);
11844
11924
  }
11845
- const e2 = /* @__PURE__ */ $t(zb, [["render", Qb], ["__scopeId", "data-v-09c78af1"]]), t2 = {
11925
+ const a2 = /* @__PURE__ */ $t(Ib, [["render", r2], ["__scopeId", "data-v-ef9a0f6d"]]), i2 = {
11846
11926
  name: "Tooltip",
11847
11927
  props: {
11848
11928
  tooltipEntry: {
@@ -11861,13 +11941,13 @@ const e2 = /* @__PURE__ */ $t(zb, [["render", Qb], ["__scopeId", "data-v-09c78af
11861
11941
  this.$emit("onActionClick", e);
11862
11942
  });
11863
11943
  }
11864
- }, n2 = {
11944
+ }, s2 = {
11865
11945
  class: "tooltip-container",
11866
11946
  id: "tooltip-container"
11867
11947
  };
11868
- function o2(e, t, n, o, r, a) {
11869
- const i = e2, s = Vb;
11870
- return b(), E("div", n2, [
11948
+ function l2(e, t, n, o, r, a) {
11949
+ const i = Vy, s = a2;
11950
+ return b(), E("div", s2, [
11871
11951
  n.annotationDisplay ? (b(), B(i, {
11872
11952
  key: 0,
11873
11953
  annotationEntry: n.annotationEntry,
@@ -11878,7 +11958,7 @@ function o2(e, t, n, o, r, a) {
11878
11958
  }, null, 8, ["tooltipEntry"]))
11879
11959
  ]);
11880
11960
  }
11881
- const k2 = /* @__PURE__ */ $t(t2, [["render", o2], ["__scopeId", "data-v-229b3988"]]), r2 = {
11961
+ const _2 = /* @__PURE__ */ $t(i2, [["render", l2], ["__scopeId", "data-v-229b3988"]]), c2 = {
11882
11962
  name: "TreeControls",
11883
11963
  props: {
11884
11964
  /**
@@ -12018,21 +12098,21 @@ const k2 = /* @__PURE__ */ $t(t2, [["render", o2], ["__scopeId", "data-v-229b398
12018
12098
  mounted: function() {
12019
12099
  this.$refs.regionTree && this.$refs.regionTree.filter(this.filterText);
12020
12100
  }
12021
- }, a2 = { class: "selections-container" }, i2 = { class: "title-text" }, s2 = {
12101
+ }, u2 = { class: "selections-container" }, d2 = { class: "title-text" }, f2 = {
12022
12102
  class: "tree-container",
12023
12103
  ref: "treeContainer"
12024
- }, l2 = { class: "tooltip-text" }, c2 = ["onClick", "onMouseover", "onMouseenter"], u2 = ["onClick", "onMouseover", "onMouseenter"], d2 = { class: "lastChildInItem" }, f2 = {
12104
+ }, p2 = { class: "tooltip-text" }, h2 = ["onClick", "onMouseover", "onMouseenter"], v2 = ["onClick", "onMouseover", "onMouseenter"], g2 = { class: "lastChildInItem" }, m2 = {
12025
12105
  key: 0,
12026
12106
  class: "node-options"
12027
12107
  };
12028
- function p2(e, t, n, o, r, a) {
12108
+ function y2(e, t, n, o, r, a) {
12029
12109
  const i = da, s = ra, l = ua, c = pa, u = y1, f = _y, v = ml;
12030
- return b(), E("div", a2, [
12110
+ return b(), E("div", u2, [
12031
12111
  n.title ? (b(), B(l, { key: 0 }, {
12032
12112
  default: S(() => [
12033
12113
  I(i, { span: 12 }, {
12034
12114
  default: S(() => [
12035
- T("div", i2, Z(n.title), 1)
12115
+ T("div", d2, Z(n.title), 1)
12036
12116
  ]),
12037
12117
  _: 1
12038
12118
  }),
@@ -12055,7 +12135,7 @@ function p2(e, t, n, o, r, a) {
12055
12135
  ]),
12056
12136
  _: 1
12057
12137
  })) : D("", !0),
12058
- T("div", s2, [
12138
+ T("div", f2, [
12059
12139
  T("div", {
12060
12140
  class: F(["tree-tooltip", e.tooltipAtBottom ? "bottom" : ""])
12061
12141
  }, [
@@ -12071,7 +12151,7 @@ function p2(e, t, n, o, r, a) {
12071
12151
  width: 260
12072
12152
  }, {
12073
12153
  default: S(() => [
12074
- T("div", l2, Z(e.tooltipLabel), 1)
12154
+ T("div", p2, Z(e.tooltipLabel), 1)
12075
12155
  ]),
12076
12156
  _: 1
12077
12157
  }, 8, ["visible"])
@@ -12107,7 +12187,7 @@ function p2(e, t, n, o, r, a) {
12107
12187
  style: de(a.getBackgroundStyles(d)),
12108
12188
  class: "lastChildInItem"
12109
12189
  }, Z(g.label), 5)
12110
- ], 42, c2)) : n.mapType === "scaffold" ? (b(), E("span", {
12190
+ ], 42, h2)) : n.mapType === "scaffold" ? (b(), E("span", {
12111
12191
  key: 1,
12112
12192
  class: F(["region-tree-node", {
12113
12193
  activeItem: n.active.includes(d.id),
@@ -12127,11 +12207,11 @@ function p2(e, t, n, o, r, a) {
12127
12207
  "popper-class": e.myPopperClass,
12128
12208
  onChange: (h) => a.setColour(d, h)
12129
12209
  }, null, 8, ["class", "modelValue", "onUpdate:modelValue", "popper-class", "onChange"])) : D("", !0),
12130
- T("div", d2, [
12210
+ T("div", g2, [
12131
12211
  T("span", null, Z(g.label), 1),
12132
- d.isTextureSlides ? (b(), E("span", f2, " (Texture) ")) : D("", !0)
12212
+ d.isTextureSlides ? (b(), E("span", m2, " (Texture) ")) : D("", !0)
12133
12213
  ])
12134
- ], 42, u2)) : D("", !0)
12214
+ ], 42, v2)) : D("", !0)
12135
12215
  ]),
12136
12216
  _: 1
12137
12217
  }, 8, ["node-key", "data", "default-expanded-keys", "onCheck", "filter-node-method", "class"])), [
@@ -12140,91 +12220,12 @@ function p2(e, t, n, o, r, a) {
12140
12220
  ], 512)
12141
12221
  ]);
12142
12222
  }
12143
- const _2 = /* @__PURE__ */ $t(r2, [["render", p2], ["__scopeId", "data-v-e4e81c87"]]), ji = "Copy to clipboard", h2 = "Copied!", v2 = "#8300bf", g2 = {
12144
- name: "CopyToClipboard",
12145
- props: {
12146
- content: {
12147
- type: String,
12148
- default: ""
12149
- },
12150
- /**
12151
- * `theme: light` will show white button,
12152
- * to use when the button is over other readable text content.
12153
- * Default button is transparent.
12154
- */
12155
- theme: {
12156
- type: String,
12157
- default: ""
12158
- }
12159
- },
12160
- data: function() {
12161
- return {
12162
- textLabel: ji,
12163
- autoHideTimeout: 0,
12164
- iconColor: v2
12165
- };
12166
- },
12167
- methods: {
12168
- copyToClipboard: async function() {
12169
- let e = !0;
12170
- this.autoHideTimeout = 600;
12171
- try {
12172
- const t = this.content.replaceAll(`
12173
- `, ""), n = document.createElement("div");
12174
- n.innerHTML = this.content;
12175
- const o = n.textContent || n.innerText || "", r = new Blob([t], { type: "text/html" }), a = new Blob([o], { type: "text/plain" }), i = new ClipboardItem({
12176
- "text/html": r,
12177
- "text/plain": a
12178
- });
12179
- await navigator.clipboard.write([i]);
12180
- } catch (t) {
12181
- console.error(
12182
- "Error when trying to use navigator.clipboard.write()",
12183
- t
12184
- ), e = !1;
12185
- }
12186
- e ? this.textLabel = h2 : this.textLabel = "Error trying to copy to clipboard!";
12187
- },
12188
- resetSettings: function() {
12189
- this.autoHideTimeout = 0, this.textLabel = ji;
12190
- }
12191
- }
12192
- }, m2 = { class: "visually-hidden" };
12193
- function y2(e, t, n, o, r, a) {
12194
- const i = uh, s = Me, l = Wt, c = nr;
12195
- return b(), B(c, {
12196
- content: e.textLabel,
12197
- placement: "bottom",
12198
- "hide-after": e.autoHideTimeout,
12199
- effect: "clipboard-tooltip",
12200
- onHide: a.resetSettings
12201
- }, {
12202
- default: S(() => [
12203
- I(l, {
12204
- class: F(["copy-clipboard-button", n.theme]),
12205
- size: "small",
12206
- onClick: a.copyToClipboard
12207
- }, {
12208
- default: S(() => [
12209
- I(s, { color: e.iconColor }, {
12210
- default: S(() => [
12211
- I(i)
12212
- ]),
12213
- _: 1
12214
- }, 8, ["color"]),
12215
- T("span", m2, Z(e.textLabel), 1)
12216
- ]),
12217
- _: 1
12218
- }, 8, ["class", "onClick"])
12219
- ]),
12220
- _: 1
12221
- }, 8, ["content", "hide-after", "onHide"]);
12222
- }
12223
- const x2 = /* @__PURE__ */ $t(g2, [["render", y2], ["__scopeId", "data-v-de3b5311"]]);
12223
+ const x2 = /* @__PURE__ */ $t(c2, [["render", y2], ["__scopeId", "data-v-e4e81c87"]]);
12224
12224
  export {
12225
- x2 as CopyToClipboard,
12226
- w2 as DrawToolbar,
12227
- C2 as HelpModeDialog,
12228
- k2 as Tooltip,
12229
- _2 as TreeControls
12225
+ Vy as AnnotationPopup,
12226
+ w2 as CopyToClipboard,
12227
+ C2 as DrawToolbar,
12228
+ k2 as HelpModeDialog,
12229
+ _2 as Tooltip,
12230
+ x2 as TreeControls
12230
12231
  };