solid-panes 5.1.0-2 → 5.1.0

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.
Files changed (192) hide show
  1. package/README.md +6 -0
  2. package/dist/RDFXMLPane.d.ts.map +1 -1
  3. package/dist/RDFXMLPane2.cjs.js +1 -1
  4. package/dist/RDFXMLPane2.cjs.js.map +1 -1
  5. package/dist/RDFXMLPane2.esm.js +3 -3
  6. package/dist/RDFXMLPane2.esm.js.map +1 -1
  7. package/dist/components/editor-card/EditorCard.cjs.js +2 -2
  8. package/dist/components/editor-card/EditorCard.cjs.js.map +1 -1
  9. package/dist/components/editor-card/EditorCard.d.ts +2 -0
  10. package/dist/components/editor-card/EditorCard.d.ts.map +1 -1
  11. package/dist/components/editor-card/EditorCard.esm.js +68 -43
  12. package/dist/components/editor-card/EditorCard.esm.js.map +1 -1
  13. package/dist/components/editor-card/EditorCard.styles.cjs.js.map +1 -1
  14. package/dist/components/editor-card/EditorCard.styles.esm.js.map +1 -1
  15. package/dist/components/header/Header.cjs.js.map +1 -1
  16. package/dist/components/header/Header.esm.js.map +1 -1
  17. package/dist/components/header/Header.styles.cjs.js.map +1 -1
  18. package/dist/components/header/Header.styles.esm.js.map +1 -1
  19. package/dist/components/navbar/Navbar.cjs.js.map +1 -1
  20. package/dist/components/navbar/Navbar.esm.js.map +1 -1
  21. package/dist/components/navbar/Navbar.styles.cjs.js.map +1 -1
  22. package/dist/components/navbar/Navbar.styles.esm.js.map +1 -1
  23. package/dist/components/profile-heading/ProfileHeading.cjs.js +6 -6
  24. package/dist/components/profile-heading/ProfileHeading.cjs.js.map +1 -1
  25. package/dist/components/profile-heading/ProfileHeading.d.ts +4 -0
  26. package/dist/components/profile-heading/ProfileHeading.d.ts.map +1 -1
  27. package/dist/components/profile-heading/ProfileHeading.esm.js +123 -107
  28. package/dist/components/profile-heading/ProfileHeading.esm.js.map +1 -1
  29. package/dist/components/profile-heading/ProfileHeading.styles.cjs.js +1 -1
  30. package/dist/components/profile-heading/ProfileHeading.styles.cjs.js.map +1 -1
  31. package/dist/components/profile-heading/ProfileHeading.styles.esm.js +1 -1
  32. package/dist/components/profile-heading/ProfileHeading.styles.esm.js.map +1 -1
  33. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.cjs.js +19 -19
  34. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.cjs.js.map +1 -1
  35. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.esm.js +86 -86
  36. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.esm.js.map +1 -1
  37. package/dist/components/profile-heading/editor/sections/heading/dateHelpers.cjs.js.map +1 -1
  38. package/dist/components/profile-heading/editor/sections/heading/dateHelpers.esm.js.map +1 -1
  39. package/dist/components/profile-heading/editor/sections/heading/imageHelpers.cjs.js.map +1 -1
  40. package/dist/components/profile-heading/editor/sections/heading/imagePreview.cjs.js.map +1 -1
  41. package/dist/components/profile-heading/editor/sections/heading/mutations.cjs.js +1 -1
  42. package/dist/components/profile-heading/editor/sections/heading/mutations.cjs.js.map +1 -1
  43. package/dist/components/profile-heading/editor/sections/heading/mutations.esm.js +61 -61
  44. package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.cjs.js.map +1 -1
  45. package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.esm.js.map +1 -1
  46. package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.cjs.js.map +1 -1
  47. package/dist/components/profile-heading/editor/sections/shared/phoneCountries.cjs.js.map +1 -1
  48. package/dist/components/profile-heading/editor/sections/shared/phoneCountries.esm.js.map +1 -1
  49. package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.cjs.js.map +1 -1
  50. package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.esm.js.map +1 -1
  51. package/dist/components/profile-heading/editor/sections/shared/rowState.cjs.js.map +1 -1
  52. package/dist/components/profile-heading/editor/sections/shared/rowState.esm.js.map +1 -1
  53. package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.cjs.js.map +1 -1
  54. package/dist/components/profile-heading/editor/textUtils.cjs.js.map +1 -1
  55. package/dist/components/profile-heading/editor/textUtils.esm.js.map +1 -1
  56. package/dist/components/profile-heading/editor/texts/dialogTexts.cjs.js.map +1 -1
  57. package/dist/components/profile-heading/editor/texts/dialogTexts.esm.js.map +1 -1
  58. package/dist/components/profile-heading/editor/texts/messageTexts.cjs.js.map +1 -1
  59. package/dist/components/profile-heading/editor/texts/messageTexts.esm.js.map +1 -1
  60. package/dist/components/profile-heading/editor/ui/dialog2.cjs.js +1 -1
  61. package/dist/components/profile-heading/editor/ui/dialog2.cjs.js.map +1 -1
  62. package/dist/components/profile-heading/editor/ui/dialog2.esm.js +1 -1
  63. package/dist/components/profile-heading/editor/ui/dialog2.esm.js.map +1 -1
  64. package/dist/components/profile-heading/friendActions.cjs.js +1 -1
  65. package/dist/components/profile-heading/friendActions.cjs.js.map +1 -1
  66. package/dist/components/profile-heading/friendActions.esm.js +5 -5
  67. package/dist/components/profile-heading/profileHeadingData.cjs.js.map +1 -1
  68. package/dist/components/resource-action-dialog/ResourceActionDialog.cjs.js +33 -0
  69. package/dist/components/resource-action-dialog/ResourceActionDialog.cjs.js.map +1 -0
  70. package/dist/components/resource-action-dialog/ResourceActionDialog.d.ts +16 -0
  71. package/dist/components/resource-action-dialog/ResourceActionDialog.d.ts.map +1 -0
  72. package/dist/components/resource-action-dialog/ResourceActionDialog.esm.js +309 -0
  73. package/dist/components/resource-action-dialog/ResourceActionDialog.esm.js.map +1 -0
  74. package/dist/components/resource-action-dialog/ResourceActionDialog.styles.cjs.js +2 -0
  75. package/dist/components/resource-action-dialog/ResourceActionDialog.styles.cjs.js.map +1 -0
  76. package/dist/components/resource-action-dialog/ResourceActionDialog.styles.esm.js +6 -0
  77. package/dist/components/resource-action-dialog/ResourceActionDialog.styles.esm.js.map +1 -0
  78. package/dist/dataContentPane.d.ts.map +1 -1
  79. package/dist/dataContentPane2.cjs.js +1 -1
  80. package/dist/dataContentPane2.cjs.js.map +1 -1
  81. package/dist/dataContentPane2.esm.js +90 -78
  82. package/dist/dataContentPane2.esm.js.map +1 -1
  83. package/dist/humanReadablePane.d.ts +1 -0
  84. package/dist/humanReadablePane.d.ts.map +1 -1
  85. package/dist/humanReadablePane2.cjs.js +147 -15
  86. package/dist/humanReadablePane2.cjs.js.map +1 -1
  87. package/dist/humanReadablePane2.esm.js +281 -114
  88. package/dist/humanReadablePane2.esm.js.map +1 -1
  89. package/dist/imagePane.d.ts.map +1 -1
  90. package/dist/imagePane2.cjs.js +1 -1
  91. package/dist/imagePane2.cjs.js.map +1 -1
  92. package/dist/imagePane2.esm.js +9 -7
  93. package/dist/imagePane2.esm.js.map +1 -1
  94. package/dist/index.cjs.js +1 -1
  95. package/dist/index.cjs.js.map +1 -1
  96. package/dist/index.d.ts +1 -0
  97. package/dist/index.d.ts.map +1 -1
  98. package/dist/index.esm.js +16 -15
  99. package/dist/index.esm.js.map +1 -1
  100. package/dist/internal/internalPane.d.ts.map +1 -1
  101. package/dist/internal/internalPane2.cjs.js +1 -1
  102. package/dist/internal/internalPane2.cjs.js.map +1 -1
  103. package/dist/internal/internalPane2.esm.js +55 -60
  104. package/dist/internal/internalPane2.esm.js.map +1 -1
  105. package/dist/mainPage/header.cjs.js +1 -1
  106. package/dist/mainPage/header.esm.js +2 -2
  107. package/dist/mainPage/index.cjs.js +1 -1
  108. package/dist/mainPage/index.cjs.js.map +1 -1
  109. package/dist/mainPage/index.d.ts.map +1 -1
  110. package/dist/mainPage/index.esm.js +44 -24
  111. package/dist/mainPage/index.esm.js.map +1 -1
  112. package/dist/mainPage/navbar.cjs.js +1 -1
  113. package/dist/mainPage/navbar.cjs.js.map +1 -1
  114. package/dist/mainPage/navbar.esm.js +15 -15
  115. package/dist/mainPage/navigation.cjs.js +1 -1
  116. package/dist/mainPage/navigation.cjs.js.map +1 -1
  117. package/dist/mainPage/navigation.esm.js +4 -4
  118. package/dist/mainPage/profileHeading.d.ts +2 -1
  119. package/dist/mainPage/profileHeading.d.ts.map +1 -1
  120. package/dist/mainPage/profileHeading2.cjs.js +1 -1
  121. package/dist/mainPage/profileHeading2.cjs.js.map +1 -1
  122. package/dist/mainPage/profileHeading2.esm.js +76 -76
  123. package/dist/mainPage/profileHeading2.esm.js.map +1 -1
  124. package/dist/n3Pane.d.ts.map +1 -1
  125. package/dist/n3Pane2.cjs.js +1 -1
  126. package/dist/n3Pane2.cjs.js.map +1 -1
  127. package/dist/n3Pane2.esm.js +1 -1
  128. package/dist/n3Pane2.esm.js.map +1 -1
  129. package/dist/navigation/browserEvents.cjs.js +1 -1
  130. package/dist/navigation/browserEvents.cjs.js.map +1 -1
  131. package/dist/navigation/browserEvents.d.ts.map +1 -1
  132. package/dist/navigation/browserEvents.esm.js +17 -17
  133. package/dist/navigation/browserEvents.esm.js.map +1 -1
  134. package/dist/navigation/chrome.cjs.js +1 -1
  135. package/dist/navigation/chrome.cjs.js.map +1 -1
  136. package/dist/navigation/chrome.d.ts +20 -2
  137. package/dist/navigation/chrome.d.ts.map +1 -1
  138. package/dist/navigation/chrome.esm.js +14 -8
  139. package/dist/navigation/chrome.esm.js.map +1 -1
  140. package/dist/navigation/controller.cjs.js +1 -1
  141. package/dist/navigation/controller.cjs.js.map +1 -1
  142. package/dist/navigation/controller.d.ts +3 -0
  143. package/dist/navigation/controller.d.ts.map +1 -1
  144. package/dist/navigation/controller.esm.js +50 -29
  145. package/dist/navigation/controller.esm.js.map +1 -1
  146. package/dist/navigation/options.cjs.js +1 -1
  147. package/dist/navigation/options.cjs.js.map +1 -1
  148. package/dist/navigation/options.d.ts +12 -0
  149. package/dist/navigation/options.d.ts.map +1 -1
  150. package/dist/navigation/options.esm.js +4 -1
  151. package/dist/navigation/options.esm.js.map +1 -1
  152. package/dist/navigation/podContext.cjs.js +1 -1
  153. package/dist/navigation/podContext.cjs.js.map +1 -1
  154. package/dist/navigation/podContext.d.ts.map +1 -1
  155. package/dist/navigation/podContext.esm.js +17 -17
  156. package/dist/navigation/podContext.esm.js.map +1 -1
  157. package/dist/navigation/state.cjs.js +1 -1
  158. package/dist/navigation/state.cjs.js.map +1 -1
  159. package/dist/navigation/state.d.ts +4 -0
  160. package/dist/navigation/state.d.ts.map +1 -1
  161. package/dist/navigation/state.esm.js +18 -5
  162. package/dist/navigation/state.esm.js.map +1 -1
  163. package/dist/outline/fileExplorerHelpers.cjs.js +1 -1
  164. package/dist/outline/fileExplorerHelpers.cjs.js.map +1 -1
  165. package/dist/outline/fileExplorerHelpers.d.ts +2 -5
  166. package/dist/outline/fileExplorerHelpers.d.ts.map +1 -1
  167. package/dist/outline/fileExplorerHelpers.esm.js +11 -13
  168. package/dist/outline/fileExplorerHelpers.esm.js.map +1 -1
  169. package/dist/outline/manager2.cjs.js +1 -1
  170. package/dist/outline/manager2.cjs.js.map +1 -1
  171. package/dist/outline/manager2.esm.js +355 -296
  172. package/dist/outline/manager2.esm.js.map +1 -1
  173. package/dist/registerPanes.cjs.js +1 -1
  174. package/dist/registerPanes.cjs.js.map +1 -1
  175. package/dist/registerPanes.esm.js +1 -1
  176. package/dist/registerPanes.esm.js.map +1 -1
  177. package/dist/slideshow/slideshowPane.cjs.js +1 -1
  178. package/dist/slideshow/slideshowPane.cjs.js.map +1 -1
  179. package/dist/slideshow/slideshowPane.esm.js +30 -30
  180. package/dist/slideshow/slideshowPane.esm.js.map +1 -1
  181. package/dist/social/socialPane2.cjs.js +1 -1
  182. package/dist/social/socialPane2.esm.js +1 -1
  183. package/dist/social/socialSections.cjs.js +1 -1
  184. package/dist/social/socialSections.esm.js +1 -1
  185. package/dist/utils/paneUtils.cjs.js +1 -1
  186. package/dist/utils/paneUtils.cjs.js.map +1 -1
  187. package/dist/utils/paneUtils.esm.js +15 -15
  188. package/dist/versionInfo.cjs.js +1 -1
  189. package/dist/versionInfo.cjs.js.map +1 -1
  190. package/dist/versionInfo.esm.js +9 -9
  191. package/dist/versionInfo.esm.js.map +1 -1
  192. package/package.json +11 -12
@@ -3,46 +3,50 @@ import { propertyViews as e } from "./propertyViews.esm.js";
3
3
  import { outlineIcons as t } from "./outlineIcons.esm.js";
4
4
  import { UserInput as n } from "./userInput.esm.js";
5
5
  import { QuerySource as r } from "./queryByExample.esm.js";
6
- import { isWebIdUri as i } from "../utils/webIdUtils.esm.js";
7
- import { loadContainerRepresentation as a } from "../utils/podUtils.esm.js";
6
+ import { loadContainerRepresentation as i } from "../utils/podUtils.esm.js";
7
+ import { isWebIdUri as a } from "../utils/webIdUtils.esm.js";
8
8
  import { deriveExplorerHeader as o, explorerHeaderForPane as s } from "../navigation/chrome.esm.js";
9
9
  import { isPageInViewerPod as c } from "../navigation/podContext.esm.js";
10
- import { nextHistoryState as l } from "../navigation/state.esm.js";
11
- import { announceNavigation as u } from "../navigation/events.esm.js";
12
- import { resolveSource as d } from "../navigation/options.esm.js";
13
- import { refreshNavbarVisibility as f } from "../navigation/navbarVisibility.esm.js";
14
- import { createOutlineDomHelpers as p } from "./outlineDomHelpers.esm.js";
15
- import { getPaneIcon as m, getPaneItems as h } from "./fileExplorerHelpers.esm.js";
16
- import * as g from "solid-ui";
17
- import { solidLogicSingleton as _, store as v } from "solid-logic";
18
- import * as y from "pane-registry";
19
- import * as b from "rdflib";
10
+ import { nextHistoryState as l, writeNavigationHistory as u } from "../navigation/state.esm.js";
11
+ import { announceNavigation as d } from "../navigation/events.esm.js";
12
+ import { resolveFolderView as f, resolveSource as p } from "../navigation/options.esm.js";
13
+ import { refreshNavbarVisibility as m } from "../navigation/navbarVisibility.esm.js";
14
+ import { createOutlineDomHelpers as h } from "./outlineDomHelpers.esm.js";
15
+ import { getPaneIcon as g, getPaneItems as _ } from "./fileExplorerHelpers.esm.js";
16
+ import * as v from "solid-ui";
17
+ import { solidLogicSingleton as y, store as b } from "solid-logic";
18
+ import * as x from "pane-registry";
19
+ import * as S from "rdflib";
20
20
  import "solid-ui/components/file-explorer-provider";
21
21
  import "solid-ui/components/file-explorer-header";
22
- import x from "solid-ui/components/access-control-modal";
22
+ import "solid-ui/components/error-state";
23
+ import C from "solid-ui/components/access-control-modal";
23
24
  // src/outline/manager.js
24
25
  /* istanbul ignore file */
25
- var S = "solid-ui-file-explorer-provider";
26
- function C(C) {
27
- let w = C.dom, T = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakSet();
28
- this.document = C.dom, this.context = C, this.outlineIcons = t, this.labeller = this.labeller || {}, this.labeller.LanguagePreference = "";
29
- let D = this, O = this, k = [];
30
- this.selection = k, this.ancestor = g.utils.ancestor, this.sparql = b.UpdateManager, this.kb = v;
31
- let A = v, j = v.fetcher;
32
- w.outline = this, this.qs = new r(), this.UserInput = new n(this), this.clipboardAddress = "tabulator:clipboard", this.UserInput.clipboardInit(this.clipboardAddress);
33
- let { outlineObjectDiv: M, outlinePredicateDiv: N, termWidget: P } = p({
34
- dom: w,
35
- UI: g,
36
- kb: v,
26
+ var w = "solid-ui-file-explorer-provider";
27
+ function ee(e) {
28
+ e.addEventListener("close", () => e.remove());
29
+ }
30
+ function T(T) {
31
+ let E = T.dom, D = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakSet();
32
+ this.document = T.dom, this.context = T, this.outlineIcons = t, this.labeller = this.labeller || {}, this.labeller.LanguagePreference = "";
33
+ let A = this, j = this, M = [];
34
+ this.selection = M, this.ancestor = v.utils.ancestor, this.sparql = S.UpdateManager, this.kb = b;
35
+ let N = b, P = b.fetcher;
36
+ E.outline = this, this.qs = new r(), this.UserInput = new n(this), this.clipboardAddress = "tabulator:clipboard", this.UserInput.clipboardInit(this.clipboardAddress);
37
+ let { outlineObjectDiv: F, outlinePredicateDiv: te, termWidget: I } = h({
38
+ dom: E,
39
+ UI: v,
40
+ kb: b,
37
41
  outlineIcons: t,
38
- expandMouseDownListener: ce,
39
- selectableTDClickListener: pe,
42
+ expandMouseDownListener: de,
43
+ selectableTDClickListener: ge,
40
44
  setSelected: q,
41
- viewAsBoringDefault: ve,
42
- removeNodeIconMouseDownListener: fe
45
+ viewAsBoringDefault: xe,
46
+ removeNodeIconMouseDownListener: he
43
47
  });
44
- this.outlineObjectDiv = M, this.outlinePredicateDiv = N, this.outlineObjectTD = M, this.outlinePredicateTD = N, this.termWidget = P, this.init = function() {
45
- let e = I();
48
+ this.outlineObjectDiv = F, this.outlinePredicateDiv = te, this.outlineObjectTD = F, this.outlinePredicateTD = te, this.termWidget = I, this.init = function() {
49
+ let e = R();
46
50
  e.outline = this;
47
51
  }, this.getLayoutMode = function() {
48
52
  let e = this.context?.environment?.layout;
@@ -52,33 +56,33 @@ function C(C) {
52
56
  return e <= 768 || t && e <= 1024 ? "mobile" : "desktop";
53
57
  }
54
58
  return "desktop";
55
- }, F.lastkbsize = 0;
56
- function F(e) {
59
+ }, L.lastkbsize = 0;
60
+ function L(e) {
57
61
  let t = [];
58
62
  for (let e = arguments.length - 1; e > 0; e--) t[e - 1] = arguments[e];
59
63
  let n = (/* @__PURE__ */ new Date()).getTime(), r = e.apply(e, t), i = (/* @__PURE__ */ new Date()).getTime();
60
- return g.log.info("BENCHMARK: kb delta: " + (A.statements.length - F.lastkbsize) + ", time elapsed for " + e + " was " + (i - n) + "ms"), F.lastkbsize = A.statements.length, r;
64
+ return v.log.info("BENCHMARK: kb delta: " + (N.statements.length - L.lastkbsize) + ", time elapsed for " + e + " was " + (i - n) + "ms"), L.lastkbsize = N.statements.length, r;
61
65
  }
62
66
  this.appendAccessIcons = function(e, t, n) {
63
67
  if (n.termType !== "NamedNode") return;
64
68
  let r = e.uris(n);
65
69
  r.sort();
66
70
  let i = null;
67
- for (let e = 0; e < r.length; e++) r[e] !== i && (i = r[e], O.appendAccessIcon(t, i));
71
+ for (let e = 0; e < r.length; e++) r[e] !== i && (i = r[e], j.appendAccessIcon(t, i));
68
72
  }, this.appendAccessIcon = function(e, n) {
69
73
  if (!n) return "";
70
- let r = b.uri.docpart(n);
74
+ let r = S.uri.docpart(n);
71
75
  if (r.slice(0, 5) !== "http:") return "";
72
- let i = j.getState(r), a, o, s;
76
+ let i = P.getState(r), a, o, s;
73
77
  switch (i) {
74
78
  case "unrequested":
75
- a = t.src.icon_unrequested, o = "fetch", s = de;
79
+ a = t.src.icon_unrequested, o = "fetch", s = me;
76
80
  break;
77
81
  case "requested":
78
82
  a = t.src.icon_requested, o = "fetching", s = X;
79
83
  break;
80
84
  case "fetched":
81
- a = t.src.icon_fetched, s = ue, o = "loaded";
85
+ a = t.src.icon_fetched, s = pe, o = "loaded";
82
86
  break;
83
87
  case "failed":
84
88
  a = t.src.icon_failed, o = "failed", s = X;
@@ -89,18 +93,18 @@ function C(C) {
89
93
  case "unfetchable":
90
94
  a = t.src.icon_failed, s = X, o = "cannot fetch";
91
95
  break;
92
- default: g.log.error("?? state = " + i);
96
+ default: v.log.error("?? state = " + i);
93
97
  }
94
- let c = g.utils.AJARImage(a, o, t.tooltips[a].replace(/[Tt]his resource/, r), w);
95
- return c.classList.add("objectValueAccessIcon"), c.setAttribute("uri", n), c.addEventListener("click", s), se(c, r), e.appendChild(c), c;
98
+ let c = v.utils.AJARImage(a, o, t.tooltips[a].replace(/[Tt]his resource/, r), E);
99
+ return c.classList.add("objectValueAccessIcon"), c.setAttribute("uri", n), c.addEventListener("click", s), ue(c, r), e.appendChild(c), c;
96
100
  };
97
- function I() {
98
- return te("OutlineView", "Resource browser");
101
+ function R() {
102
+ return re("OutlineView", "Resource browser");
99
103
  }
100
- function ee(e) {
101
- f(e.uri).catch((e) => g.log.error("Failed to update navbar visibility: " + e));
104
+ function ne(e) {
105
+ m(e.uri).catch((e) => v.log.error("Failed to update navbar visibility: " + e));
102
106
  }
103
- function te(e) {
107
+ function re(e) {
104
108
  if (e === "OutlineView") {
105
109
  let e = document.getElementById("OutlineView");
106
110
  if (e) return e;
@@ -111,102 +115,125 @@ function C(C) {
111
115
  }
112
116
  }
113
117
  }
114
- async function L(e, t) {
115
- return e.uri.endsWith("/") && await a(e), g.getRelevantPanes(e, t, {
118
+ async function ie(e, t) {
119
+ return e.uri.endsWith("/") && await i(e), v.getRelevantPanes(e, t, {
116
120
  excludedPaneNames: ["sharing"],
117
121
  fallbackPaneName: "internal"
118
122
  });
119
123
  }
120
- function ne(e, t) {
121
- return e.find((e) => e.shouldGetFocus && e.shouldGetFocus(t)) || e[0];
122
- }
123
- function re(e) {
124
- let t = w.getElementById("queryButton");
124
+ function ae(e) {
125
+ let t = E.getElementById("queryButton");
125
126
  t && (e ? t.removeAttribute("style") : t.setAttribute("style", "display:none;"));
126
127
  }
127
- function R(e, t, n, r) {
128
+ function oe(e, t, n, r) {
128
129
  if (!e || !n) return;
129
130
  let i;
130
131
  try {
131
- g.log.info("outline: Rendering pane (menu): " + n.name), i = n.render(t, C, r);
132
+ v.log.info("outline: Rendering pane (menu): " + n.name), i = n.render(t, T, r);
132
133
  } catch (e) {
133
- i = w.createElement("div"), i.setAttribute("class", "exceptionPane");
134
- let t = w.createElement("pre");
135
- i.appendChild(t), t.appendChild(w.createTextNode(g.utils.stackString(e)));
134
+ i = E.createElement("div"), i.setAttribute("class", "exceptionPane");
135
+ let t = E.createElement("pre");
136
+ i.appendChild(t), t.appendChild(E.createTextNode(v.utils.stackString(e)));
136
137
  }
137
- B(e, t, n, i);
138
+ B(e, t, n, i), O.set(e, {
139
+ pane: n,
140
+ subjectUri: t.uri
141
+ });
138
142
  }
139
143
  function z(e, t, n) {
140
- n ? (re(!!n.requireQueryButton), e.pane = n, R(e, t, n, T.get(e)?.options || {})) : g.log.warn("outline: Unable to open pane in place: pane is undefined.");
141
- }
144
+ n ? (ae(!!n.requireQueryButton), e.pane = n, oe(e, t, n, D.get(e)?.options || {})) : v.log.warn("outline: Unable to open pane in place: pane is undefined.");
145
+ }
146
+ this.refreshActiveExplorerPanes = function() {
147
+ let e = Array.from(E.querySelectorAll(w));
148
+ for (let t of e) {
149
+ let e = t.subjectUri, n = t.pane;
150
+ if (!e || !n) continue;
151
+ let r = t.querySelector(":scope > .paneDiv");
152
+ if (!r || r.matches("[data-preserve-pane-on-resize=\"true\"]") || r.querySelector("[data-preserve-pane-on-resize=\"true\"]") || r.querySelector(":scope > folder-pane-view")) continue;
153
+ let i;
154
+ try {
155
+ i = n.render(S.sym(e), T, t.paneRenderOptions || D.get(t)?.options || {});
156
+ } catch (e) {
157
+ v.log.error("outline: Failed to refresh pane layout: " + v.utils.stackString(e));
158
+ continue;
159
+ }
160
+ i.classList.add("paneDiv"), r.replaceWith(i), O.set(t, {
161
+ pane: n,
162
+ subjectUri: e
163
+ });
164
+ }
165
+ };
142
166
  function B(e, t, n, r) {
143
- let i = T.get(e);
144
- g.composeExplorer(e, {
145
- context: C,
167
+ let i = D.get(e);
168
+ v.composeExplorer(e, {
169
+ context: T,
146
170
  subjectUri: t.uri,
147
171
  pane: n,
148
172
  relevantPanes: e.relevantPanes || [],
149
- header: i && s(i.showHeader, n?.name) ? {
150
- paneIcon: m(n, t, C),
151
- menuItems: i.menuItems
173
+ header: i && s(i.showHeader, n?.name, i.options.folderView, i.options.solo) ? {
174
+ paneIcon: g(n, t, T),
175
+ menuItems: i.menuItems,
176
+ showBack: !i.options.solo
152
177
  } : void 0,
153
178
  paneElement: r
154
179
  });
155
180
  }
156
- async function ie(e, t, n, r) {
157
- n ||= {}, r ||= w.createElement(S);
158
- let a = {
159
- generation: (T.get(r)?.generation || 0) + 1,
181
+ async function se(e, t, n, r) {
182
+ n ||= {}, r ||= E.createElement(w);
183
+ let i = {
184
+ generation: (D.get(r)?.generation || 0) + 1,
160
185
  menuItems: [],
161
186
  options: n
162
187
  };
163
- T.set(r, a), r.classList.add("paneView", "tdFlex"), r.setAttribute("notSelectable", "true"), r.setAttribute("role", "grid"), r.setAttribute("about", e.toNT()), n.hover && r.classList.add("hoverControl"), r.context = C, r.subjectUri = e.uri, r.soloPane = n.solo, E.has(r) || (r.addEventListener(g.FILE_EXPLORER_BACK_EVENT, (e) => {
164
- g.isExplorerEvent(e, r) && (e.stopPropagation(), le({ target: r }));
165
- }), r.addEventListener(g.FILE_EXPLORER_MANAGE_ACCESS_EVENT, (e) => {
188
+ D.set(r, i), r.classList.add("paneView", "tdFlex"), r.setAttribute("notSelectable", "true"), r.setAttribute("role", "grid"), r.setAttribute("about", e.toNT()), n.hover && r.classList.add("hoverControl"), r.context = T, r.subjectUri = e.uri, r.soloPane = n.solo, k.has(r) || (r.addEventListener(v.FILE_EXPLORER_BACK_EVENT, (e) => {
189
+ v.isExplorerEvent(e, r) && (e.stopPropagation(), fe({ target: r }));
190
+ }), r.addEventListener(v.FILE_EXPLORER_MANAGE_ACCESS_EVENT, (e) => {
166
191
  e.stopPropagation();
167
- let t = b.sym(e.detail.subjectUri).doc();
168
- _.acl.findAccessGrants(t).then((e) => {
169
- g.showDialog(x, { props: {
192
+ let t = S.sym(e.detail.subjectUri).doc();
193
+ y.acl.findAccessGrants(t).then((e) => {
194
+ v.showDialog(C, { props: {
170
195
  subjectUri: t.uri,
171
196
  accessGrants: e
172
197
  } });
173
198
  }).catch((e) => {
174
- g.log.error("outline: Failed to open access controls: " + g.utils.stackString(e));
199
+ v.log.error("outline: Failed to open access controls: " + v.utils.stackString(e));
175
200
  });
176
- }), r.addEventListener(g.FILE_EXPLORER_OPEN_PANE_EVENT, (e) => {
177
- if (!g.isExplorerEvent(e, r)) return;
201
+ }), r.addEventListener(v.FILE_EXPLORER_OPEN_PANE_EVENT, (e) => {
202
+ if (!v.isExplorerEvent(e, r)) return;
178
203
  e.stopPropagation();
179
- let t = C.session.paneRegistry.byName(e.detail.paneName);
180
- z(r, b.sym(e.detail.subjectUri), t);
181
- }), E.add(r));
182
- let s = n.hideList ? [] : await L(e, C);
183
- if (T.get(r) !== a) return r;
184
- let l = C.session.logic?.resource || _.resource, u = e.uri.endsWith("/") ? b.sym(`${e.uri}index.ttl`) : null;
185
- if (n.solo && !t && u && (typeof l?.containerHasIndexDocument == "function" && l.containerHasIndexDocument(e) || A.holds(e, g.ns.ldp("contains"), u, e.doc()))) {
186
- if (e = typeof l?.getContainerIndexThing == "function" ? l.getContainerIndexThing(e) : b.sym(`${u.uri}#this`), await A.fetcher.load(e.doc()), s = await L(e, C), T.get(r) !== a) return r;
204
+ let t = T.session.paneRegistry.byName(e.detail.paneName);
205
+ z(r, S.sym(e.detail.subjectUri), t);
206
+ }), k.add(r));
207
+ let s = n.hideList ? [] : await ie(e, T);
208
+ if (D.get(r) !== i) return r;
209
+ let l = T.session.logic?.resource || y.resource, u = e.uri.endsWith("/") ? S.sym(`${e.uri}index.ttl`) : null;
210
+ if (n.solo && !t && !n.folderView && u && (typeof l?.containerHasIndexDocument == "function" && l.containerHasIndexDocument(e) || N.holds(e, v.ns.ldp("contains"), u, e.doc()))) {
211
+ if (e = typeof l?.getContainerIndexThing == "function" ? l.getContainerIndexThing(e) : S.sym(`${u.uri}#this`), await N.fetcher.load(e.doc()), s = await ie(e, T), D.get(r) !== i) return r;
187
212
  r.subjectUri = e.uri, r.setAttribute("about", e.toNT());
188
213
  }
189
- r.relevantPanes = s, r.pane = t || ne(s, e);
214
+ r.relevantPanes = s, r.pane = t || v.getPreferredPane(e, T, s);
190
215
  let d = !!(e && e.uri && e.site && e.site().uri === e.uri), f = !!n.headerOnlyInViewerPod, p = !e.uri.endsWith("/index.ttl#this") && o({
191
216
  isRootResource: d,
192
- isWebId: i(e),
217
+ isWebId: a(e),
193
218
  viewerPodOnly: f,
194
- inViewerPod: !f || await c(w.location.href)
219
+ inViewerPod: !f || await c(E.location.href)
195
220
  });
196
- if (T.get(r) !== a) return r;
197
- if (a.showHeader = p, r.paneRenderOptions = n, r.soloPane = n.solo, r.openPane = (e, t) => z(r, e, y.byName(t)), r.handleAccessClick = async () => {
221
+ if (D.get(r) !== i) return r;
222
+ i.showHeader = p, r.paneRenderOptions = n, r.soloPane = n.solo, r.openPane = (e, t) => z(r, e, x.byName(t)), r.handleAccessClick = async () => {
198
223
  try {
199
- let t = e.doc(), n = await _.acl.findAccessGrants(t);
200
- g.showDialog(x, { props: {
224
+ let t = e.doc(), n = await y.acl.findAccessGrants(t);
225
+ v.showDialog(C, { props: {
201
226
  subjectUri: t.uri,
202
227
  accessGrants: n
203
228
  } });
204
229
  } catch (e) {
205
- g.log.error("outline: Failed to open access controls: " + g.utils.stackString(e));
230
+ v.log.error("outline: Failed to open access controls: " + v.utils.stackString(e));
206
231
  }
207
- }, r.pane ? R(r, e, r.pane, n) : B(r, e, r.pane), p) {
208
- let t = await h(e, C, s, (e, t) => {
209
- r.dispatchEvent(new CustomEvent(g.FILE_EXPLORER_OPEN_PANE_EVENT, {
232
+ };
233
+ let m = O.get(r);
234
+ if (r.pane?.managesUpdates === !0 && m?.pane === r.pane && m.subjectUri === e.uri && !n.refresh && r.querySelector(":scope > .paneDiv") ? B(r, e, r.pane) : r.pane ? oe(r, e, r.pane, n) : B(r, e, r.pane), p) {
235
+ let t = await _(e, T, s, (e, t) => {
236
+ r.dispatchEvent(new CustomEvent(v.FILE_EXPLORER_OPEN_PANE_EVENT, {
210
237
  bubbles: !0,
211
238
  composed: !0,
212
239
  detail: {
@@ -215,75 +242,75 @@ function C(C) {
215
242
  }
216
243
  }));
217
244
  });
218
- T.get(r) === a && (a.menuItems = t, B(r, e, r.pane));
245
+ D.get(r) === i && (i.menuItems = t, B(r, e, r.pane));
219
246
  }
220
247
  return r;
221
248
  }
222
- function ae(e) {
223
- let t = e.parentNode, n = t.parentNode, r = w.createElement("div");
249
+ function ce(e) {
250
+ let t = e.parentNode, n = t.parentNode, r = E.createElement("div");
224
251
  n.replaceChild(r, t), t.removeChild(e), n.replaceChild(t, r);
225
252
  }
226
253
  let V = this.propertyTable = function(e, t, n, r) {
227
- g.log.debug("Property block for: " + e), e = A.canon(e);
228
- let i = t ? t.matches?.(S) ? t : t.firstElementChild || t : w.createElement(S);
229
- return ie(e, n, r, i).catch((e) => {
230
- g.log.error("outline: Failed to set up file explorer: " + g.utils.stackString(e));
231
- }), t && g.log.info("Re-expand: " + t), t || i;
254
+ v.log.debug("Property block for: " + e), e = N.canon(e);
255
+ let i = t ? t.matches?.(w) ? t : t.firstElementChild || t : E.createElement(w);
256
+ return se(e, n, r, i).catch((e) => {
257
+ v.log.error("outline: Failed to set up file explorer: " + v.utils.stackString(e));
258
+ }), t && v.log.info("Re-expand: " + t), t || i;
232
259
  };
233
260
  function H(e, t, n) {
234
261
  let r = e.createElement("div");
235
262
  r.AJAR_statement = t, r.AJAR_inverse = n, r.setAttribute("predTR", "true"), r.setAttribute("role", "row");
236
- let i = O.outlinePredicateDiv(t.predicate, r, n);
263
+ let i = j.outlinePredicateDiv(t.predicate, r, n);
237
264
  return r.appendChild(i), r;
238
265
  }
239
266
  this.propertyTR = H;
240
- function oe(e, t, n, r) {
241
- if (g.log.debug("Property list length = " + t.length), t.length === 0) return "";
267
+ function le(e, t, n, r) {
268
+ if (v.log.debug("Property list length = " + t.length), t.length === 0) return "";
242
269
  let i, a, o;
243
270
  n ? (i = function(e) {
244
271
  return e.subject;
245
- }, t = t.sort(g.utils.RDFComparePredicateSubject)) : (i = function(e) {
272
+ }, t = t.sort(v.utils.RDFComparePredicateSubject)) : (i = function(e) {
246
273
  return e.object;
247
- }, t = t.sort(g.utils.RDFComparePredicateObject));
274
+ }, t = t.sort(v.utils.RDFComparePredicateObject));
248
275
  let s = t.length;
249
276
  for (a = 0; a < s; a++) {
250
277
  let c = t[a];
251
278
  if (r && !r(c.predicate, n)) continue;
252
- let l = H(w, c, n);
279
+ let l = H(E, c, n);
253
280
  e.appendChild(l);
254
281
  let u = l.firstChild, d = $.defaults[c.predicate.uri], f = 0, p = 0, m = 0;
255
- for (o = 0; o + a < s && t[a + o].predicate.sameTerm(c.predicate); o++) o > 0 && i(t[a + o]).sameTerm(i(t[a + o - 1])) && f++, i(t[a + o]).lang && D.labeller.LanguagePreference && (p += 1, i(t[a + o]).lang.indexOf(D.labeller.LanguagePreference) >= 0 && m++);
282
+ for (o = 0; o + a < s && t[a + o].predicate.sameTerm(c.predicate); o++) o > 0 && i(t[a + o]).sameTerm(i(t[a + o - 1])) && f++, i(t[a + o]).lang && A.labeller.LanguagePreference && (p += 1, i(t[a + o]).lang.indexOf(A.labeller.LanguagePreference) >= 0 && m++);
256
283
  if (m > 0 && p === f + 1) {
257
- for (let e = a; e <= a + f; e++) if (D.labeller.LanguagePreference && i(t[e]).lang.indexOf(D.labeller.LanguagePreference) >= 0) {
258
- l.appendChild(O.outlineObjectDiv(i(t[e]), d, void 0, c));
284
+ for (let e = a; e <= a + f; e++) if (A.labeller.LanguagePreference && i(t[e]).lang.indexOf(A.labeller.LanguagePreference) >= 0) {
285
+ l.appendChild(j.outlineObjectDiv(i(t[e]), d, void 0, c));
259
286
  break;
260
287
  }
261
288
  a += f;
262
- } else l.appendChild(O.outlineObjectDiv(i(c), d, void 0, c)), l.showNobj = function(r) {
289
+ } else l.appendChild(j.outlineObjectDiv(i(c), d, void 0, c)), l.showNobj = function(r) {
263
290
  let s = o - f, l = 2 * r < s ? r : s, p = [];
264
291
  if (s !== 1) {
265
292
  u.setAttribute("rowspan", l === s ? s : r + 1);
266
293
  let f;
267
294
  l < s && l === 1 && u.setAttribute("rowspan", 2);
268
295
  let m = 0;
269
- for (f = 1; f < o; f++) if (A.canon(i(t[a + f])).sameTerm(A.canon(i(t[a + f - 1])))) g.log.info("there are duplicates here: %s", t[a + f - 1]);
296
+ for (f = 1; f < o; f++) if (N.canon(i(t[a + f])).sameTerm(N.canon(i(t[a + f - 1])))) v.log.info("there are duplicates here: %s", t[a + f - 1]);
270
297
  else {
271
298
  m++, c = t[a + f], d = $.defaults[c.predicate.uri];
272
- let r = w.createElement("div");
273
- r.style.colspan = "1", r.appendChild(O.outlineObjectDiv(i(t[a + f]), d, void 0, c)), r.AJAR_statement = c, r.AJAR_inverse = n, e.appendChild(r), m >= l && (r.style.display = "none", p.push(r));
299
+ let r = E.createElement("div");
300
+ r.style.colspan = "1", r.appendChild(j.outlineObjectDiv(i(t[a + f]), d, void 0, c)), r.AJAR_statement = c, r.AJAR_inverse = n, e.appendChild(r), m >= l && (r.style.display = "none", p.push(r));
274
301
  }
275
302
  l === s && u.setAttribute("rowspan", m + 1);
276
303
  }
277
304
  if (l < s) {
278
- let t = w.createElement("div"), n = t.appendChild(w.createElement("div"));
305
+ let t = E.createElement("div"), n = t.appendChild(E.createElement("div"));
279
306
  if (n.setAttribute("style", "margin: 0.2em; border: none; padding: 0; vertical-align: top;"), n.classList.add("obj"), n.setAttribute("notSelectable", "false"), s > r) {
280
- let e = w.createElement("a");
307
+ let e = E.createElement("a");
281
308
  n.appendChild(e);
282
309
  let t = (function(e) {
283
310
  return e(u, o, f, r);
284
311
  })(function(t, n, r, i) {
285
312
  return function(n) {
286
- e.innerHTML = "", n === "none" ? (e.appendChild(g.utils.AJARImage(g.icons.originalIconBase + "tbl-more-trans.png", "more", "See all", w)), e.appendChild(w.createTextNode(s - i + " more...")), t.setAttribute("rowspan", i + 1)) : (e.appendChild(g.utils.AJARImage(g.icons.originalIconBase + "tbl-shrink.png", "(less)", void 0, w)), t.setAttribute("rowspan", s + 1));
313
+ e.innerHTML = "", n === "none" ? (e.appendChild(v.utils.AJARImage(v.icons.originalIconBase + "tbl-more-trans.png", "more", "See all", E)), e.appendChild(E.createTextNode(s - i + " more...")), t.setAttribute("rowspan", i + 1)) : (e.appendChild(v.utils.AJARImage(v.icons.originalIconBase + "tbl-shrink.png", "(less)", void 0, E)), t.setAttribute("rowspan", s + 1));
287
314
  for (let e = 0; e < p.length; e++) {
288
315
  let t = p[e];
289
316
  t.style.display = n;
@@ -301,87 +328,87 @@ function C(C) {
301
328
  }, l.showNobj(10), a += o - 1;
302
329
  }
303
330
  }
304
- this.appendPropertyTRs = oe;
305
- function se(e, n) {
306
- g.log.debug("Button callbacks for " + n + " added");
331
+ this.appendPropertyTRs = le;
332
+ function ue(e, n) {
333
+ v.log.debug("Button callbacks for " + n + " added");
307
334
  let r = function(r) {
308
335
  return function(i) {
309
- return i.indexOf("#"), !e || !D.ancestor(e, "DIV") ? !1 : (i === n && (e.src = r, e.title = t.tooltips[r]), !0);
336
+ return i.indexOf("#"), !e || !A.ancestor(e, "DIV") ? !1 : (i === n && (e.src = r, e.title = t.tooltips[r]), !0);
310
337
  };
311
338
  };
312
- j.addCallback("request", r(t.src.icon_requested)), j.addCallback("done", r(t.src.icon_fetched)), j.addCallback("fail", r(t.src.icon_failed));
339
+ P.addCallback("request", r(t.src.icon_requested)), P.addCallback("done", r(t.src.icon_fetched)), P.addCallback("fail", r(t.src.icon_failed));
313
340
  }
314
341
  function U(e) {
315
342
  let t = e.getAttribute("class");
316
343
  return !!(t && t.indexOf("selected") >= 0);
317
344
  }
318
345
  function W(e) {
319
- let n = O.targetOf(e).parentNode;
320
- P.replaceIcon(n.parentNode, t.termWidgets.optOn, t.termWidgets.optOff, G), n.parentNode.parentNode.removeAttribute("optional");
346
+ let n = j.targetOf(e).parentNode;
347
+ I.replaceIcon(n.parentNode, t.termWidgets.optOn, t.termWidgets.optOff, G), n.parentNode.parentNode.removeAttribute("optional");
321
348
  }
322
349
  function G(e) {
323
- let n = O.targetOf(e).parentNode;
324
- P.replaceIcon(n.parentNode, t.termWidgets.optOff, t.termWidgets.optOn, W), n.parentNode.parentNode.setAttribute("optional", "true");
350
+ let n = j.targetOf(e).parentNode;
351
+ I.replaceIcon(n.parentNode, t.termWidgets.optOff, t.termWidgets.optOn, W), n.parentNode.parentNode.setAttribute("optional", "true");
325
352
  }
326
353
  function K(e, n) {
327
354
  let r = t.termWidgets.optOn, i = t.termWidgets.optOff, a = (e) => !(!e || typeof e.getAttribute != "function" || e.getAttribute("predTR") !== "true" && e.getAttribute("data-outline-node") !== "predicate");
328
355
  for (let t = e; t.parentNode; t = t.parentNode) for (;;) if (a(t)) {
329
356
  let e = t.getAttribute("parentOfSelected");
330
- e = e ? parseInt(e) : 0, e === 0 && n > 0 && P.addIcon(t.childNodes[0], t.getAttribute("optional") ? r : i, t.getAttribute("optional") ? W : G), e += n, t.setAttribute("parentOfSelected", e), e === 0 && (t.removeAttribute("parentOfSelected"), P.removeIcon(t.childNodes[0], t.getAttribute("optional") ? r : i));
357
+ e = e ? parseInt(e) : 0, e === 0 && n > 0 && I.addIcon(t.childNodes[0], t.getAttribute("optional") ? r : i, t.getAttribute("optional") ? W : G), e += n, t.setAttribute("parentOfSelected", e), e === 0 && (t.removeAttribute("parentOfSelected"), I.removeIcon(t.childNodes[0], t.getAttribute("optional") ? r : i));
331
358
  break;
332
359
  } else if (t.previousElementSibling) t = t.previousElementSibling;
333
360
  else break;
334
361
  }
335
362
  this.statusBarClick = function(e) {
336
- let t = g.utils.getTarget(e);
363
+ let t = v.utils.getTarget(e);
337
364
  t.label && (window.content.location = t.label);
338
365
  }, this.showURI = function(e) {
339
- e && w.getElementById("UserURI") && (w.getElementById("UserURI").value = e.termType === "NamedNode" ? e.uri : "");
366
+ e && E.getElementById("UserURI") && (E.getElementById("UserURI").value = e.termType === "NamedNode" ? e.uri : "");
340
367
  }, this.showSource = function() {
341
368
  if (typeof sourceWidget < "u") {
342
369
  for (let e in sourceWidget.sources) sourceWidget.sources[e].setAttribute("class", "");
343
- for (let e = 0; e < k.length; e++) {
344
- if (!k[e].parentNode) continue;
345
- let t = k[e].parentNode.AJAR_statement;
370
+ for (let e = 0; e < M.length; e++) {
371
+ if (!M[e].parentNode) continue;
372
+ let t = M[e].parentNode.AJAR_statement;
346
373
  if (!t) continue;
347
374
  let n = t.why;
348
375
  n && n.uri && sourceWidget.highlight(n, !0);
349
376
  }
350
377
  }
351
378
  }, this.getSelection = function() {
352
- return k;
379
+ return M;
353
380
  };
354
381
  function q(e, n) {
355
- if (e.nodeName !== "TD" && e.nodeName !== "DIV") throw g.log.debug("down" + e.nodeName), Error("Expected TD or DIV in setSelected: " + e.nodeName + " : " + e.textContent);
356
- g.log.debug("pass");
382
+ if (e.nodeName !== "TD" && e.nodeName !== "DIV") throw v.log.debug("down" + e.nodeName), Error("Expected TD or DIV in setSelected: " + e.nodeName + " : " + e.textContent);
383
+ v.log.debug("pass");
357
384
  let r = e.getAttribute("class");
358
385
  if (r ||= "", n) {
359
- r += " selected", (r.indexOf("pred") >= 0 || r.indexOf("obj") >= 0) && K(e, 1), k.push(e);
360
- let n = g.utils.getTerm(e);
361
- O.showURI(n);
386
+ r += " selected", (r.indexOf("pred") >= 0 || r.indexOf("obj") >= 0) && K(e, 1), M.push(e);
387
+ let n = v.utils.getTerm(e);
388
+ j.showURI(n);
362
389
  let i = e.AJAR_statement;
363
390
  if (i === void 0 && e.parentNode && (i = e.parentNode.AJAR_statement), i) {
364
391
  let n = i.why;
365
- v.updater.editable(n.uri, A) && r.indexOf("pred") >= 0 && P.addIcon(e, t.termWidgets.addTri);
392
+ b.updater.editable(n.uri, N) && r.indexOf("pred") >= 0 && I.addIcon(e, t.termWidgets.addTri);
366
393
  }
367
- } else g.log.debug("cla=$" + r + "$"), r === "selected" && (r = ""), r = r.replace(" selected", ""), (r.indexOf("pred") >= 0 || r.indexOf("obj") >= 0) && K(e, -1), r.indexOf("pred") >= 0 && P.removeIcon(e, t.termWidgets.addTri), k = k.filter(function(t) {
394
+ } else v.log.debug("cla=$" + r + "$"), r === "selected" && (r = ""), r = r.replace(" selected", ""), (r.indexOf("pred") >= 0 || r.indexOf("obj") >= 0) && K(e, -1), r.indexOf("pred") >= 0 && I.removeIcon(e, t.termWidgets.addTri), M = M.filter(function(t) {
368
395
  return t === e;
369
- }), g.log.info("Deselecting " + e.textContent);
370
- typeof sourceWidget < "u" && O.showSource(), e.setAttribute("class", r);
396
+ }), v.log.info("Deselecting " + e.textContent);
397
+ typeof sourceWidget < "u" && j.showSource(), e.setAttribute("class", r);
371
398
  }
372
399
  function J() {
373
- let e = k.length;
374
- for (let t = e - 1; t >= 0; t--) q(k[t], !1);
375
- k = [];
400
+ let e = M.length;
401
+ for (let t = e - 1; t >= 0; t--) q(M[t], !1);
402
+ M = [];
376
403
  }
377
404
  this.targetOf = function(e) {
378
405
  let t;
379
406
  if (e ||= window.event, e.target) t = e.target;
380
407
  else if (e.srcElement) t = e.srcElement;
381
- else return g.log.error("can't get target for event " + e), !1;
408
+ else return v.log.error("can't get target for event " + e), !1;
382
409
  return t.nodeType === 3 && (t = t.parentNode), t;
383
410
  }, this.walk = function(e, t) {
384
- let n = t || k[0], r;
411
+ let n = t || M[0], r;
385
412
  switch (e) {
386
413
  case "down":
387
414
  try {
@@ -402,7 +429,7 @@ function C(C) {
402
429
  break;
403
430
  case "right":
404
431
  {
405
- let e = n.matches?.(S) ? n : n.querySelector?.(S), t = e?.querySelector?.("[data-outline-node=\"object\"]");
432
+ let e = n.matches?.(w) ? n : n.querySelector?.(w), t = e?.querySelector?.("[data-outline-node=\"object\"]");
406
433
  if (e) {
407
434
  t && (J(), q(t, !0));
408
435
  return;
@@ -426,25 +453,25 @@ function C(C) {
426
453
  }
427
454
  e !== "down" && e !== "up" || r.tabulatorSelect || this.walk(e);
428
455
  }, this.OutlinerKeypressPanel = function(e) {
429
- g.log.info("Key " + e.keyCode + " pressed");
456
+ v.log.info("Key " + e.keyCode + " pressed");
430
457
  function t(e) {
431
- e && w.getElementById("UserURI") && (w.getElementById("UserURI").value = e.termType === "NamedNode" ? e.uri : "");
458
+ e && E.getElementById("UserURI") && (E.getElementById("UserURI").value = e.termType === "NamedNode" ? e.uri : "");
432
459
  }
433
460
  function n(e) {
434
- return arguments[3] || (o("right", a), t(g.utils.getAbout(A, k[0]))), !0;
461
+ return arguments[3] || (o("right", a), t(v.utils.getAbout(N, M[0]))), !0;
435
462
  }
436
463
  let r, i;
437
- if (g.utils.getTarget(e).tagName === "TEXTAREA" || g.utils.getTarget(e).id === "UserURI" || k.length > 1) return;
438
- if (k.length === 0) {
439
- (e.keyCode === 13 || e.keyCode === 38 || e.keyCode === 40 || e.keyCode === 37 || e.keyCode === 39) && (this.walk("right", O.focusTd), t(g.utils.getAbout(A, k[0])));
464
+ if (v.utils.getTarget(e).tagName === "TEXTAREA" || v.utils.getTarget(e).id === "UserURI" || M.length > 1) return;
465
+ if (M.length === 0) {
466
+ (e.keyCode === 13 || e.keyCode === 38 || e.keyCode === 40 || e.keyCode === 37 || e.keyCode === 39) && (this.walk("right", j.focusTd), t(v.utils.getAbout(N, M[0])));
440
467
  return;
441
468
  }
442
- let a = k[0];
443
- switch (j.removeCallback("done", "setSelectedAfterward"), j.removeCallback("fail", "setSelectedAfterward"), e.keyCode) {
469
+ let a = M[0];
470
+ switch (P.removeCallback("done", "setSelectedAfterward"), P.removeCallback("fail", "setSelectedAfterward"), e.keyCode) {
444
471
  case 13:
445
- if (g.utils.getTarget(e).tagName === "HTML") {
446
- let e = g.utils.getAbout(A, a);
447
- r = a.parentNode.AJAR_statement.why, i = v.updater.editable(r.uri, A), e ? D.GotoSubject(e, !0) : i && O.UserInput.Enter(a);
472
+ if (v.utils.getTarget(e).tagName === "HTML") {
473
+ let e = v.utils.getAbout(N, a);
474
+ r = a.parentNode.AJAR_statement.why, i = b.updater.editable(r.uri, N), e ? A.GotoSubject(e, !0) : i && j.UserInput.Enter(a);
448
475
  } else this.UserInput.Keypress(e), this.walk("down"), e.stopPropagation();
449
476
  return;
450
477
  case 38:
@@ -452,30 +479,30 @@ function C(C) {
452
479
  break;
453
480
  case 40: this.walk("down"), e.stopPropagation(), e.preventDefault();
454
481
  }
455
- if (g.utils.getTarget(e).tagName === "INPUT") return;
482
+ if (v.utils.getTarget(e).tagName === "INPUT") return;
456
483
  let o;
457
484
  switch (e.keyCode) {
458
485
  case 46:
459
486
  case 8:
460
- r = a.parentNode.AJAR_statement.why, i = v.updater.editable(r.uri, A), i && (e.preventDefault(), this.UserInput.Delete(a));
487
+ r = a.parentNode.AJAR_statement.why, i = b.updater.editable(r.uri, N), i && (e.preventDefault(), this.UserInput.Delete(a));
461
488
  break;
462
489
  case 37: {
463
490
  if (this.walk("left")) return;
464
491
  let e = Y(a);
465
492
  if (!e) break;
466
- let t = g.utils.getAbout(A, e.provider);
467
- t && he(e.block, t);
493
+ let t = v.utils.getAbout(N, e.provider);
494
+ t && ve(e.block, t);
468
495
  break;
469
496
  }
470
497
  case 39:
471
498
  {
472
- let e = g.utils.getAbout(A, a);
499
+ let e = v.utils.getAbout(N, a);
473
500
  if (e) {
474
501
  if (o = this.walk, a.nextSibling) {
475
502
  this.walk("right");
476
503
  return;
477
504
  }
478
- a.firstElementChild?.matches(S) || (j.addCallback("done", n), j.addCallback("fail", n), Q(a, e, { pane: y.byName("defaultPane") })), n();
505
+ a.firstElementChild?.matches(w) || (P.addCallback("done", n), P.addCallback("fail", n), Q(a, e, { pane: x.byName("defaultPane") })), n();
479
506
  }
480
507
  }
481
508
  break;
@@ -484,54 +511,54 @@ function C(C) {
484
511
  default: switch (e.charCode) {
485
512
  case 99:
486
513
  if (e.ctrlKey) {
487
- O.UserInput.copyToClipboard(O.clipboardAddress, a);
514
+ j.UserInput.copyToClipboard(j.clipboardAddress, a);
488
515
  break;
489
516
  }
490
517
  break;
491
518
  case 118:
492
519
  case 112:
493
520
  if (e.ctrlKey) {
494
- O.UserInput.pasteFromClipboard(O.clipboardAddress, a);
521
+ j.UserInput.pasteFromClipboard(j.clipboardAddress, a);
495
522
  break;
496
523
  }
497
524
  break;
498
- default: g.utils.getTarget(e).tagName;
525
+ default: v.utils.getTarget(e).tagName;
499
526
  }
500
527
  }
501
- t(g.utils.getAbout(A, k[0]));
528
+ t(v.utils.getAbout(N, M[0]));
502
529
  }, this.OutlinerMouseclickPanel = function(e) {
503
- switch (O.UserInput._tabulatorMode) {
530
+ switch (j.UserInput._tabulatorMode) {
504
531
  case 0:
505
- me(e);
532
+ _e(e);
506
533
  break;
507
- case 1: O.UserInput.Click(e);
534
+ case 1: j.UserInput.Click(e);
508
535
  }
509
536
  };
510
- function ce(e) {
511
- let t = O.targetOf(e), n, r;
512
- for (let e = t; e && e !== w; e = e.parentNode) e.matches?.("[data-outline-node=\"object\"]") && (n = e), e.matches?.(".outline-subject-block") && (r = e);
513
- let i = r || n || t.parentNode, a = g.utils.getAbout(A, t), o = e.altKey ? y.byName("internal") : void 0;
514
- e.shiftKey ? ge(i, a, o) : e.altKey ? Q(i, a, {
515
- pane: y.byName("internal"),
537
+ function de(e) {
538
+ let t = j.targetOf(e), n, r;
539
+ for (let e = t; e && e !== E; e = e.parentNode) e.matches?.("[data-outline-node=\"object\"]") && (n = e), e.matches?.(".outline-subject-block") && (r = e);
540
+ let i = r || n || t.parentNode, a = v.utils.getAbout(N, t), o = e.altKey ? x.byName("internal") : void 0;
541
+ e.shiftKey ? ye(i, a, o) : e.altKey ? Q(i, a, {
542
+ pane: x.byName("internal"),
516
543
  immediate: !0
517
544
  }) : Q(i, a);
518
545
  }
519
- function le(e) {
520
- let t = O.targetOf(e), n = e.altKey ? y.byName("internal") : void 0, r = Y(t);
546
+ function fe(e) {
547
+ let t = j.targetOf(e), n = e.altKey ? x.byName("internal") : void 0, r = Y(t);
521
548
  if (!r) return;
522
- let i = g.utils.getAbout(A, r.provider);
523
- i && he(r.block, i, n);
549
+ let i = v.utils.getAbout(N, r.provider);
550
+ i && ve(r.block, i, n);
524
551
  }
525
552
  function Y(e) {
526
- for (let t = e; t && t !== w; t = t.parentNode) {
553
+ for (let t = e; t && t !== E; t = t.parentNode) {
527
554
  if (t.matches?.("[data-outline-node=\"object\"]")) {
528
- let e = t.querySelector?.(S);
555
+ let e = t.querySelector?.(w);
529
556
  if (e) return {
530
557
  block: t,
531
558
  provider: e
532
559
  };
533
560
  }
534
- if (t.matches?.(S)) return {
561
+ if (t.matches?.(w)) return {
535
562
  block: t.closest?.("[data-outline-node=\"object\"]") || t.closest?.(".outline-subject-block") || t,
536
563
  provider: t
537
564
  };
@@ -539,193 +566,225 @@ function C(C) {
539
566
  return null;
540
567
  }
541
568
  function X(e) {
542
- let t = O.targetOf(e).getAttribute("uri");
543
- e.altKey ? j.fetch(b.uri.docpart(t), { force: !0 }) : j.refresh(A.sym(b.uri.docpart(t)));
569
+ let t = j.targetOf(e).getAttribute("uri");
570
+ e.altKey ? P.fetch(S.uri.docpart(t), { force: !0 }) : P.refresh(N.sym(S.uri.docpart(t)));
544
571
  }
545
- function ue(e) {
546
- let t = O.targetOf(e).getAttribute("uri");
547
- e.altKey ? j.fetch(b.uri.docpart(t), { force: !0 }) : j.refresh(A.sym(b.uri.docpart(t)));
572
+ function pe(e) {
573
+ let t = j.targetOf(e).getAttribute("uri");
574
+ e.altKey ? P.fetch(S.uri.docpart(t), { force: !0 }) : P.refresh(N.sym(S.uri.docpart(t)));
548
575
  }
549
- function de(e) {
550
- let t = O.targetOf(e).getAttribute("uri");
551
- j.fetch(b.uri.docpart(t));
576
+ function me(e) {
577
+ let t = j.targetOf(e).getAttribute("uri");
578
+ P.fetch(S.uri.docpart(t));
552
579
  }
553
- function fe(e) {
554
- let t = O.targetOf(e), n = t.node;
555
- n.childNodes.length > 1 && (n = t.parentNode), ae(n);
580
+ function he(e) {
581
+ let t = j.targetOf(e), n = t.node;
582
+ n.childNodes.length > 1 && (n = t.parentNode), ce(n);
556
583
  }
557
- function pe(e) {
558
- if (O.UserInput._tabulatorMode) return O.UserInput.Click(e);
559
- let t = O.targetOf(e), n;
560
- for (n = g.utils.ancestor(t, "td") || g.utils.ancestor(t, "tr") || g.utils.ancestor(t, "div"); n && n.getAttribute("notSelectable") !== "false"; n = g.utils.ancestor(n.parentNode, "td") || g.utils.ancestor(n.parentNode, "tr") || g.utils.ancestor(n.parentNode, "div"));
584
+ function ge(e) {
585
+ if (j.UserInput._tabulatorMode) return j.UserInput.Click(e);
586
+ let t = j.targetOf(e), n;
587
+ for (n = v.utils.ancestor(t, "td") || v.utils.ancestor(t, "tr") || v.utils.ancestor(t, "div"); n && n.getAttribute("notSelectable") !== "false"; n = v.utils.ancestor(n.parentNode, "td") || v.utils.ancestor(n.parentNode, "tr") || v.utils.ancestor(n.parentNode, "div"));
561
588
  if (!n) return;
562
589
  let r = U(n);
563
- if (g.log.debug("Was node selected before: " + r), e.altKey) q(n, !U(n));
590
+ if (v.log.debug("Was node selected before: " + r), e.altKey) q(n, !U(n));
564
591
  else if (e.shiftKey) q(n, !0);
565
592
  else {
566
- if (J(), O.UserInput.clearInputAndSave(e), q(n, !0), e.detail === 2) {
593
+ if (J(), j.UserInput.clearInputAndSave(e), q(n, !0), e.detail === 2) {
567
594
  e.stopPropagation();
568
595
  return;
569
596
  }
570
597
  let t;
571
598
  if (n.parentNode && (t = n.parentNode.AJAR_statement), !t) return;
572
- let i = t.why, a = v.updater.editable(i.uri, A);
573
- r && a && O.UserInput.Click(e, k[0]);
599
+ let i = t.why, a = b.updater.editable(i.uri, N);
600
+ r && a && j.UserInput.Click(e, M[0]);
574
601
  }
575
- g.log.debug("Was node selected after: " + U(n) + ", count=" + k.length), e.stopPropagation();
602
+ v.log.debug("Was node selected after: " + U(n) + ", count=" + M.length), e.stopPropagation();
576
603
  }
577
- function me(e) {
578
- g.log.info("@TabulatorMousedown, dom.location is now " + w.location);
579
- let n = O.targetOf(e);
604
+ function _e(e) {
605
+ v.log.info("@TabulatorMousedown, dom.location is now " + E.location);
606
+ let n = j.targetOf(e);
580
607
  if (!n) return;
581
608
  let r = n.tagName;
582
- r !== "INPUT" && r !== "TEXTAREA" && (O.UserInput.clearMenu(), O.UserInput.lastModified && O.UserInput.lastModified.parentNode.nextSibling && O.UserInput.backOut(), (!n.src || n.src.slice(n.src.indexOf("/icons/") + 1) !== t.src.icon_show_choices && n.src.slice(n.src.indexOf("/icons/") + 1) !== t.src.icon_add_triple) && O.UserInput.clearInputAndSave(e), n.src && n.src.slice(n.src.indexOf("/icons/") + 1) === t.src.icon_show_choices || O.UserInput.clearMenu(), e && e.stopPropagation());
609
+ r !== "INPUT" && r !== "TEXTAREA" && (j.UserInput.clearMenu(), j.UserInput.lastModified && j.UserInput.lastModified.parentNode.nextSibling && j.UserInput.backOut(), (!n.src || n.src.slice(n.src.indexOf("/icons/") + 1) !== t.src.icon_show_choices && n.src.slice(n.src.indexOf("/icons/") + 1) !== t.src.icon_add_triple) && j.UserInput.clearInputAndSave(e), n.src && n.src.slice(n.src.indexOf("/icons/") + 1) === t.src.icon_show_choices || j.UserInput.clearMenu(), e && e.stopPropagation());
583
610
  }
584
611
  function Z(e) {
585
- w.title = g.utils.label(e), w.location.href.startsWith(e.site().uri);
612
+ E.title = v.utils.label(e), E.location.href.startsWith(e.site().uri);
586
613
  }
587
614
  function Q(e, t, n) {
588
615
  n ||= {};
589
616
  let r = n.pane, i = !!n.already, a = n.immediate;
590
- g.log.info("@outlineExpand, dom is now " + w.location), j.removeCallback("done", "expand"), j.removeCallback("fail", "expand");
591
- let o = A.canon(t);
592
- function s() {
593
- if (o = A.canon(o), !e || !e.parentNode || !e.parentNode.parentNode) return !1;
617
+ v.log.info("@outlineExpand, dom is now " + E.location), P.removeCallback("done", "expand"), P.removeCallback("fail", "expand");
618
+ let o = N.canon(t), s = !1;
619
+ function c() {
620
+ if (s) {
621
+ if (P.getState(o.doc().uri) !== "fetched") return !1;
622
+ s = !1, i = !1;
623
+ }
624
+ if (o = N.canon(o), !e || !e.parentNode || !e.parentNode.parentNode) return !1;
594
625
  let t;
595
- g.log.info("@@ REPAINTING "), t = i ? V(o, e, r, n) : V(o, void 0, r, n), i = !0, t !== e && g.utils.emptyNode(e).appendChild(t), O.focusTd = e, g.log.debug("expand: Node for " + o + " expanded");
596
- let a = A.each(o, g.ns.rdfs("seeAlso"));
597
- for (let e = 0; e < a.length; e++) e === 25 && g.log.warn("expand: Warning: many (" + a.length + ") seeAlso links for " + o), j.lookUpThing(a[e], o);
626
+ v.log.info("@@ REPAINTING "), t = i ? V(o, e, r, n) : V(o, void 0, r, n), i = !0, t !== e && v.utils.emptyNode(e).appendChild(t), j.focusTd = e, v.log.debug("expand: Node for " + o + " expanded");
627
+ let a = N.each(o, v.ns.rdfs("seeAlso"));
628
+ for (let e = 0; e < a.length; e++) e === 25 && v.log.warn("expand: Warning: many (" + a.length + ") seeAlso links for " + o), P.lookUpThing(a[e], o);
598
629
  }
599
- function c(e) {
630
+ function l(e) {
600
631
  if (arguments[3]) return !0;
601
- let t = A.canon(o);
602
- g.log.info("@@ expand: relevant subject=" + t + ", uri=" + e + ", already=" + i);
603
- let n = A.sym(b.uri.docpart(e));
632
+ let t = N.canon(o);
633
+ v.log.info("@@ expand: relevant subject=" + t + ", uri=" + e + ", already=" + i);
634
+ let n = N.sym(S.uri.docpart(e));
604
635
  if (e.indexOf("#") >= 0) throw Error("Internal error: hash in " + e);
605
636
  return !function() {
606
637
  if (!t.uri) return !0;
607
- let r = A.uris(t);
638
+ let r = N.uris(t);
608
639
  if (!r) return !1;
609
- for (let t = 0; t < r.length; t++) for (let n = b.uri.docpart(r[t]); n; n = A.HTTPRedirects[n]) if (e === n) return !0;
610
- return !!A.anyStatementMatching(t, void 0, void 0, n);
611
- }() || (g.log.success("@@ expand OK: relevant subject=" + t + ", uri=" + e + ", source=" + i), s(), !1);
640
+ for (let t = 0; t < r.length; t++) for (let n = S.uri.docpart(r[t]); n; n = N.HTTPRedirects[n]) if (e === n) return !0;
641
+ return !!N.anyStatementMatching(t, void 0, void 0, n);
642
+ }() || (v.log.success("@@ expand OK: relevant subject=" + t + ", uri=" + e + ", source=" + i), c(), !1);
643
+ }
644
+ if (n.solo && Z(o), r?.global) {
645
+ c();
646
+ return;
612
647
  }
613
- n.solo && Z(o), g.log.debug("outlineExpand: dereferencing " + o);
614
- let l = w.createElement("span");
615
- if (e.appendChild(l), j.addCallback("done", c), j.addCallback("fail", c), o.uri && o.uri.split(":")[0] === "rdf") s();
616
- else if (o.uri && !a && !g.widgets.isAudio(o) && !g.widgets.isVideo(o)) {
648
+ v.log.debug("outlineExpand: dereferencing " + o);
649
+ let u = E.createElement("span");
650
+ if (e.appendChild(u), P.addCallback("done", l), P.addCallback("fail", l), o.uri && o.uri.split(":")[0] === "rdf") c();
651
+ else if (o.uri && !a && !v.widgets.isAudio(o) && !v.widgets.isVideo(o)) {
617
652
  let t = o.doc() && o.doc().uri ? o.doc().uri : "" + o.doc(), r = function(e) {
618
653
  let t = !!(o && o.uri && o.site && o.site().uri === o.uri);
619
654
  return e === 403 ? t ? "This root resource is not accessible with your current permissions. Try logging in with an authorized account or opening a public profile document." : "This resource is not accessible with your current permissions." : t ? "This root resource is not publicly readable. Try logging in or opening a profile document." : "This resource is not publicly readable. Try logging in or opening a different public resource.";
620
655
  }, i = function(e, t) {
621
656
  let n = typeof e == "string" ? e : String(e || ""), r = t?.status || t?.response?.status;
622
657
  return r === 401 || r === 403 ? r : n.includes("status: 403") || n.includes("status 403") ? 403 : n.includes("status: 401") || n.includes("status 401") ? 401 : null;
623
- }, a = function(n, a) {
658
+ }, a = function() {
659
+ let e = !!(o && o.uri && o.site && o.site().uri === o.uri), t = !!y.authn.currentUser();
660
+ return e ? t ? "You are logged in, but this root resource is not publicly readable. Select a storage location from the account menu to continue." : "This root resource is not publicly readable. Try logging in or opening a profile document." : t ? "You are logged in, but your account does not have permission to view this resource." : "This resource is not publicly readable. Log in to view it.";
661
+ }, l = function() {
662
+ s = !0;
663
+ let n = E.createElement("solid-ui-error-state");
664
+ n.setAttribute("title", "Access denied"), n.setAttribute("message", a()), t && n.setAttribute("data-outline-error-for", t), ee(n), v.utils.emptyNode(e).appendChild(n), P.addCallback("done", function(n) {
665
+ return !s || !e.isConnected ? !1 : n !== t || (c(), !1);
666
+ }), P.getState(t) === "fetched" && c();
667
+ }, u = function(a, o) {
624
668
  if (e.querySelector && t && e.querySelector("[data-outline-error-for=\"" + t + "\"]")) return;
625
- let o = i(n, a), s = o ? r(o) : n, c = g.widgets.errorMessageBlock(w, s, "#fee", a instanceof Error ? a : void 0);
626
- t && c.setAttribute("data-outline-error-for", t), e.appendChild(c);
627
- }, c = !1, l = j.nowOrWhenFetched(o.doc(), void 0, function(e, t) {
628
- e ? (j.lookUpThing(o), s(), n.solo && Z(o)) : (c = !0, a(t, void 0));
629
- });
630
- l && typeof l.catch == "function" && l.catch(function(e) {
631
- c || (c = !0, a(e, e));
632
- });
633
- } else s();
634
- }
635
- function he(e, t) {
669
+ let s = i(a, o);
670
+ if (s && n.solo) {
671
+ if (!d && y.authn.currentUser()) {
672
+ d = !0, f(!0);
673
+ return;
674
+ }
675
+ l();
676
+ return;
677
+ }
678
+ let c = s ? r(s) : a, u = v.widgets.errorMessageBlock(E, c, "#fee", o instanceof Error ? o : void 0);
679
+ t && u.setAttribute("data-outline-error-for", t), e.appendChild(u);
680
+ }, d = !1, f = function(e) {
681
+ let t = !1, r = P.nowOrWhenFetched(o.doc(), e ? { force: !0 } : {}, function(e, r) {
682
+ e ? (P.lookUpThing(o), c(), n.solo && Z(o)) : (t = !0, u(r, void 0));
683
+ });
684
+ r && typeof r.catch == "function" && r.catch(function(e) {
685
+ t || (t = !0, u(e, e));
686
+ });
687
+ }, p = P.requested[t];
688
+ f(!!n.solo && (p === 401 || p === 403));
689
+ } else c();
690
+ }
691
+ function ve(e, t) {
636
692
  let n = e.AJAR_statement || e.parentNode && e.parentNode.AJAR_statement;
637
- g.log.debug("Collapsing subject " + t);
693
+ v.log.debug("Collapsing subject " + t);
638
694
  let r;
639
- n && (g.log.debug("looking up pred " + n.predicate.uri + "in defaults"), r = $.defaults[n.predicate.uri]), g.log.debug("view= " + r);
695
+ n && (v.log.debug("looking up pred " + n.predicate.uri + "in defaults"), r = $.defaults[n.predicate.uri]), v.log.debug("view= " + r);
640
696
  let i;
641
- e.parentNode && e.parentNode.id === "outline" && (i = e), O.replaceTD(O.outlineObjectDiv(t, r, i, n), e);
697
+ e.parentNode && e.parentNode.id === "outline" && (i = e), j.replaceTD(j.outlineObjectDiv(t, r, i, n), e);
642
698
  }
643
699
  this.replaceTD = function(e, t) {
644
700
  let n;
645
701
  U(t) && (n = !0);
646
- for (let e = k.length - 1; e > -1; e--) for (let n = k[e]; n.parentNode; n = n.parentNode) n === t && q(k[e], !1);
702
+ for (let e = M.length - 1; e > -1; e--) for (let n = M[e]; n.parentNode; n = n.parentNode) n === t && q(M[e], !1);
647
703
  t.parentNode.replaceChild(e, t), n && q(e, !0);
648
704
  };
649
- function ge(e, t) {
650
- g.utils.emptyNode(e).appendChild(V(t)), Z(t), e.setAttribute("about", t.toNT());
705
+ function ye(e, t) {
706
+ v.utils.emptyNode(e).appendChild(V(t)), Z(t), e.setAttribute("about", t.toNT());
651
707
  }
652
- D.outlineRefocus = ge, this.GotoFormURI_enterKey = function(e) {
653
- e.keyCode === 13 && D.GotoFormURI(e);
708
+ A.outlineRefocus = ye, this.GotoFormURI_enterKey = function(e) {
709
+ e.keyCode === 13 && A.GotoFormURI(e);
654
710
  }, this.GotoFormURI = function(e) {
655
- _e(w.getElementById("UserURI").value);
711
+ be(E.getElementById("UserURI").value);
656
712
  };
657
- function _e(e) {
658
- let t = A.sym(e);
713
+ function be(e) {
714
+ let t = N.sym(e);
659
715
  this.GotoSubject(t, !0);
660
716
  }
661
717
  this.GotoURIinit = function(e) {
662
- let t = A.sym(e);
718
+ let t = N.sym(e);
663
719
  this.GotoSubject(t);
664
720
  }, this.GotoSubject = function(e, t, n, r, i, a, o) {
665
- let s = d(o) !== "accountMenu", c = I();
666
- s && (!a || a === c) && ee(e);
667
- let f = a || c;
668
- r && (f.style.width = "100%", g.utils.emptyNode(f));
669
- let p = n && n.subject && n.subject.uri ? n.subject : e;
670
- function m() {
671
- let e = w.createElement("div");
721
+ let s = p(o) !== "accountMenu", c = R();
722
+ s && (!a || a === c) && ne(e);
723
+ let m = a || c;
724
+ r && (m.style.width = "100%", v.utils.emptyNode(m));
725
+ let h = n && n.subject && n.subject.uri ? n.subject : e;
726
+ function g() {
727
+ let e = E.createElement("div");
672
728
  e.classList.add("outline-subject-block");
673
- let t = O.outlineObjectDiv(p, void 0, e);
674
- return e.appendChild(t), f.appendChild(e), e;
729
+ let t = j.outlineObjectDiv(h, void 0, e);
730
+ return e.appendChild(t), m.appendChild(e), e;
675
731
  }
676
- let h = r ? m() : f;
677
- if (r && Z(p), t ? Q(h, p, {
732
+ let _ = r ? g() : m;
733
+ if (r && Z(h), t ? Q(_, h, {
678
734
  pane: n,
679
735
  solo: r,
736
+ folderView: f(o),
680
737
  headerOnlyInViewerPod: !s || !!(n && n.subject && n.subject.uri)
681
- }) : r || m(), r && w && w.defaultView && w.defaultView.history) {
682
- let t = w.defaultView.history.state || {}, r = document.location.href !== e.uri, i = l(t, {
738
+ }) : r || g(), r && E && E.defaultView && E.defaultView.history) {
739
+ let t = o && typeof o == "object" && o.preserveUrl === !0, r = E.defaultView.history.state || {}, i = document.location.href !== e.uri, a = l(r, {
683
740
  pane: n ? {
684
741
  name: n.name,
685
742
  subject: n.subject && typeof n.subject.uri == "string" ? n.subject.uri : void 0
686
743
  } : void 0,
687
- leavingPage: r,
744
+ leavingPage: i,
688
745
  viaAccountMenu: !s
689
746
  });
690
747
  try {
691
- let n = new URL(document.location.href), a = new URL(e.uri, document.location.href);
692
- n.origin === a.origin && (r ? w.defaultView.history.pushState(i, e.uri, e.uri) : JSON.stringify(t) !== JSON.stringify(i) && w.defaultView.history.replaceState(i, e.uri, e.uri));
693
- } catch {}
748
+ let n = new URL(E.location.href), o = new URL(e.uri, E.location.href);
749
+ t ? u(E.defaultView.history, "replaceState", a, "") : n.origin === o.origin && (i ? u(E.defaultView.history, "pushState", a, e.uri, e.uri) : JSON.stringify(r) !== JSON.stringify(a) && u(E.defaultView.history, "replaceState", a, e.uri, e.uri));
750
+ } catch (e) {
751
+ v.log.error("Failed to update navigation history: " + v.utils.stackString(e));
752
+ }
694
753
  }
695
- return r && u(w), e;
754
+ return r && d(E), e;
696
755
  };
697
- let $ = e(w);
698
- function ve(e) {
756
+ let $ = e(E);
757
+ function xe(e) {
699
758
  let n;
700
759
  if (e.termType === "Literal") {
701
- if (n = w.createElement("span"), n.classList.add("objectValue", "objectValue--literal"), n.textContent = e.value, e.datatype && e.datatype.uri) {
702
- let t = g.ns.xsd("").uri;
760
+ if (n = E.createElement("span"), n.classList.add("objectValue", "objectValue--literal"), n.textContent = e.value, e.datatype && e.datatype.uri) {
761
+ let t = v.ns.xsd("").uri;
703
762
  e.datatype.uri.slice(0, t.length) === t && n.classList.add("objectValue--" + e.datatype.uri.slice(t.length));
704
763
  }
705
764
  } else if (e.termType === "NamedNode" || e.termType === "BlankNode") {
706
- if (n = w.createElement("span"), n.classList.add("objectValue", "objectValue--resource"), n.setAttribute("about", e.toNT()), O.appendAccessIcons(A, n, e), e.termType === "NamedNode") {
765
+ if (n = E.createElement("span"), n.classList.add("objectValue", "objectValue--resource"), n.setAttribute("about", e.toNT()), j.appendAccessIcons(N, n, e), e.termType === "NamedNode") {
707
766
  if (e.uri.slice(0, 4) === "tel:") {
708
- let r = e.uri.slice(4), i = w.createElement("a");
709
- n.appendChild(w.createTextNode(r)), i.setAttribute("href", e.uri), i.appendChild(g.utils.AJARImage(t.src.icon_telephone, "phone", "phone " + r, w)), n.appendChild(i), i.firstChild.setAttribute("class", "phoneIcon"), i.firstChild.classList.add("objectValueLinkIcon");
767
+ let r = e.uri.slice(4), i = E.createElement("a");
768
+ n.appendChild(E.createTextNode(r)), i.setAttribute("href", e.uri), i.appendChild(v.utils.AJARImage(t.src.icon_telephone, "phone", "phone " + r, E)), n.appendChild(i), i.firstChild.setAttribute("class", "phoneIcon"), i.firstChild.classList.add("objectValueLinkIcon");
710
769
  } else {
711
- n.appendChild(w.createTextNode(g.utils.label(e)));
712
- let t = g.widgets.linkIcon(w, e);
713
- t.firstChild && t.firstChild.classList.add("objectValueLinkIcon"), n.appendChild(t), g.widgets.makeDraggable(n, e);
770
+ n.appendChild(E.createTextNode(v.utils.label(e)));
771
+ let t = v.widgets.linkIcon(E, e);
772
+ t.firstChild && t.firstChild.classList.add("objectValueLinkIcon"), n.appendChild(t), v.widgets.makeDraggable(n, e);
714
773
  }
715
- } else n.appendChild(w.createTextNode(g.utils.label(e)));
774
+ } else n.appendChild(E.createTextNode(v.utils.label(e)));
716
775
  } else if (e.termType === "Collection") {
717
- n = w.createElement("div"), n.setAttribute("about", e.toNT());
776
+ n = E.createElement("div"), n.setAttribute("about", e.toNT());
718
777
  for (let t = 0; t < e.elements.length; t++) {
719
- let r = e.elements[t], i = n.appendChild(w.createElement("div")), a = i.appendChild(w.createElement("div"));
720
- a.classList.add("obj"), a.setAttribute("notSelectable", "false"), a.setAttribute("about", e.toNT()), a.innerHTML = t + 1 + ")", i.appendChild(O.outlineObjectDiv(r));
778
+ let r = e.elements[t], i = n.appendChild(E.createElement("div")), a = i.appendChild(E.createElement("div"));
779
+ a.classList.add("obj"), a.setAttribute("notSelectable", "false"), a.setAttribute("about", e.toNT()), a.innerHTML = t + 1 + ")", i.appendChild(j.outlineObjectDiv(r));
721
780
  }
722
- } else e.termType === "Graph" ? (n = y.byName("dataContentPane").statementsAsTables(e.statements, C), n.setAttribute("class", "nestedFormula")) : (g.log.error("Object " + e + " has unknown term type: " + e.termType), n = w.createTextNode("[unknownTermType:" + e.termType + "]"));
723
- return g.log.debug("contents: " + n.innerHTML), n;
781
+ } else e.termType === "Graph" ? (n = x.byName("dataContentPane").statementsAsTables(e.statements, T), n.setAttribute("class", "nestedFormula")) : (v.log.error("Object " + e + " has unknown term type: " + e.termType), n = E.createTextNode("[unknownTermType:" + e.termType + "]"));
782
+ return v.log.debug("contents: " + n.innerHTML), n;
724
783
  }
725
784
  return this.createTabURI = function() {
726
- w.getElementById("UserURI").value = w.URL + "?uri=" + w.getElementById("UserURI").value;
785
+ E.getElementById("UserURI").value = E.URL + "?uri=" + E.getElementById("UserURI").value;
727
786
  }, this.UserInput.setSelected = q, this.UserInput.deselectAll = J, this.UserInput.views = $, this.outlineExpand = Q, this;
728
787
  }
729
- export { C as default };
788
+ export { T as default, ee as dismissErrorStateOnClose };
730
789
 
731
790
  //# sourceMappingURL=manager2.esm.js.map