solid-panes 5.1.0-1 → 5.1.0-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.
Files changed (277) hide show
  1. package/dist/RDFXMLPane2.esm.js +1 -2
  2. package/dist/_virtual/~icons/lucide/cake.esm.js +1 -2
  3. package/dist/_virtual/~icons/lucide/camera.esm.js +1 -2
  4. package/dist/_virtual/~icons/lucide/circle-user-round.esm.js +1 -2
  5. package/dist/_virtual/~icons/lucide/folder-open.esm.js +1 -2
  6. package/dist/_virtual/~icons/lucide/help-circle.esm.js +1 -2
  7. package/dist/_virtual/~icons/lucide/layout-dashboard.esm.js +1 -2
  8. package/dist/_virtual/~icons/lucide/mail.esm.js +1 -2
  9. package/dist/_virtual/~icons/lucide/map-pin.esm.js +1 -2
  10. package/dist/_virtual/~icons/lucide/pencil.esm.js +1 -2
  11. package/dist/_virtual/~icons/lucide/phone.esm.js +1 -2
  12. package/dist/_virtual/~icons/lucide/settings-2.esm.js +1 -2
  13. package/dist/_virtual/~icons/lucide/user-round-plus.esm.js +1 -2
  14. package/dist/_virtual/~icons/lucide/user.esm.js +1 -2
  15. package/dist/_virtual/~icons/lucide/users.esm.js +1 -2
  16. package/dist/_virtual/~icons/lucide/x.esm.js +1 -2
  17. package/dist/audio/audioPane.esm.js +1 -2
  18. package/dist/classInstancePane.esm.js +1 -2
  19. package/dist/components/editor-card/EditorCard.cjs.js +1 -1
  20. package/dist/components/editor-card/EditorCard.cjs.js.map +1 -1
  21. package/dist/components/editor-card/EditorCard.esm.js +6 -7
  22. package/dist/components/editor-card/EditorCard.styles.esm.js +1 -2
  23. package/dist/components/header/Header.cjs.js +1 -1
  24. package/dist/components/header/Header.cjs.js.map +1 -1
  25. package/dist/components/header/Header.esm.js +7 -8
  26. package/dist/components/header/Header.styles.esm.js +1 -2
  27. package/dist/components/navbar/Navbar.cjs.js +2 -2
  28. package/dist/components/navbar/Navbar.cjs.js.map +1 -1
  29. package/dist/components/navbar/Navbar.esm.js +8 -9
  30. package/dist/components/navbar/Navbar.styles.esm.js +1 -2
  31. package/dist/components/profile-heading/ProfileHeading.cjs.js +17 -17
  32. package/dist/components/profile-heading/ProfileHeading.cjs.js.map +1 -1
  33. package/dist/components/profile-heading/ProfileHeading.esm.js +28 -29
  34. package/dist/components/profile-heading/ProfileHeading.styles.esm.js +1 -2
  35. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.cjs.js +1 -1
  36. package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.esm.js +2 -3
  37. package/dist/components/profile-heading/editor/sections/heading/dateHelpers.esm.js +1 -2
  38. package/dist/components/profile-heading/editor/sections/heading/imageHelpers.esm.js +1 -2
  39. package/dist/components/profile-heading/editor/sections/heading/imagePreview.esm.js +1 -2
  40. package/dist/components/profile-heading/editor/sections/heading/mutations.esm.js +1 -2
  41. package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.esm.js +1 -2
  42. package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.esm.js +1 -2
  43. package/dist/components/profile-heading/editor/sections/shared/phoneCountries.esm.js +0 -1
  44. package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.esm.js +1 -2
  45. package/dist/components/profile-heading/editor/sections/shared/rowState.esm.js +1 -2
  46. package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.esm.js +1 -2
  47. package/dist/components/profile-heading/editor/textUtils.esm.js +1 -2
  48. package/dist/components/profile-heading/editor/texts/dialogTexts.esm.js +1 -2
  49. package/dist/components/profile-heading/editor/texts/messageTexts.esm.js +1 -2
  50. package/dist/components/profile-heading/editor/ui/dialog2.cjs.js +3 -3
  51. package/dist/components/profile-heading/editor/ui/dialog2.cjs.js.map +1 -1
  52. package/dist/components/profile-heading/editor/ui/dialog2.esm.js +4 -19
  53. package/dist/components/profile-heading/editor/ui/dialog2.esm.js.map +1 -1
  54. package/dist/components/profile-heading/editor/ui/spinner.esm.js +1 -2
  55. package/dist/components/profile-heading/editor/utils/errorDisplay.esm.js +1 -2
  56. package/dist/components/profile-heading/friendActions.esm.js +1 -2
  57. package/dist/components/profile-heading/profileHeadingData.esm.js +1 -2
  58. package/dist/dashboard/basicPreferences.esm.js +1 -2
  59. package/dist/dashboard/dashboardPane.esm.js +0 -1
  60. package/dist/dashboard/homepage.esm.js +1 -2
  61. package/dist/dashboard/ontologyData.esm.js +1 -2
  62. package/dist/dashboard/preferencesFormText.esm.js +1 -2
  63. package/dist/dataContentPane2.cjs.js +1 -1
  64. package/dist/dataContentPane2.esm.js +2 -3
  65. package/dist/defaultPane2.cjs.js +1 -1
  66. package/dist/defaultPane2.esm.js +2 -3
  67. package/dist/dokieli/dokieliPane.cjs.js +1 -1
  68. package/dist/dokieli/dokieliPane.cjs.js.map +1 -1
  69. package/dist/dokieli/dokieliPane.esm.js +7 -12
  70. package/dist/dokieli/dokieliPane.esm.js.map +1 -1
  71. package/dist/dokieli/new.esm.js +1 -2
  72. package/dist/form/pane.esm.js +1 -2
  73. package/dist/home/homePane.esm.js +1 -2
  74. package/dist/humanReadablePane.d.ts +3 -0
  75. package/dist/humanReadablePane.d.ts.map +1 -1
  76. package/dist/humanReadablePane2.cjs.js +276 -1
  77. package/dist/humanReadablePane2.cjs.js.map +1 -1
  78. package/dist/humanReadablePane2.esm.js +428 -31
  79. package/dist/humanReadablePane2.esm.js.map +1 -1
  80. package/dist/icons/folder.esm.js +1 -2
  81. package/dist/icons/friends.esm.js +1 -2
  82. package/dist/icons/person.esm.js +1 -2
  83. package/dist/imagePane.d.ts.map +1 -1
  84. package/dist/imagePane2.cjs.js +1 -1
  85. package/dist/imagePane2.cjs.js.map +1 -1
  86. package/dist/imagePane2.esm.js +2 -3
  87. package/dist/imagePane2.esm.js.map +1 -1
  88. package/dist/index.esm.js +1 -2
  89. package/dist/internal/internalPane2.cjs.js +1 -1
  90. package/dist/internal/internalPane2.esm.js +2 -3
  91. package/dist/mainPage/header.esm.js +1 -2
  92. package/dist/mainPage/index.cjs.js +1 -1
  93. package/dist/mainPage/index.cjs.js.map +1 -1
  94. package/dist/mainPage/index.d.ts +1 -1
  95. package/dist/mainPage/index.d.ts.map +1 -1
  96. package/dist/mainPage/index.esm.js +6 -2
  97. package/dist/mainPage/index.esm.js.map +1 -1
  98. package/dist/mainPage/navbar.esm.js +1 -2
  99. package/dist/mainPage/navigation.cjs.js +1 -1
  100. package/dist/mainPage/navigation.cjs.js.map +1 -1
  101. package/dist/mainPage/navigation.d.ts.map +1 -1
  102. package/dist/mainPage/navigation.esm.js +14 -11
  103. package/dist/mainPage/navigation.esm.js.map +1 -1
  104. package/dist/mainPage/profileHeading2.esm.js +1 -2
  105. package/dist/n3Pane2.esm.js +1 -2
  106. package/dist/navigation/browserEvents.esm.js +1 -2
  107. package/dist/navigation/chrome.esm.js +1 -2
  108. package/dist/navigation/controller.cjs.js +1 -1
  109. package/dist/navigation/controller.cjs.js.map +1 -1
  110. package/dist/navigation/controller.esm.js +6 -7
  111. package/dist/navigation/controller.esm.js.map +1 -1
  112. package/dist/navigation/events.esm.js +1 -2
  113. package/dist/navigation/navbarVisibility.esm.js +1 -2
  114. package/dist/navigation/options.esm.js +1 -2
  115. package/dist/navigation/podContext.esm.js +1 -2
  116. package/dist/navigation/state.esm.js +1 -2
  117. package/dist/outline/context.esm.js +1 -2
  118. package/dist/outline/fileExplorerHelpers.cjs.js +2 -0
  119. package/dist/outline/fileExplorerHelpers.cjs.js.map +1 -0
  120. package/dist/outline/fileExplorerHelpers.d.ts +13 -0
  121. package/dist/outline/fileExplorerHelpers.d.ts.map +1 -0
  122. package/dist/outline/fileExplorerHelpers.esm.js +24 -0
  123. package/dist/outline/fileExplorerHelpers.esm.js.map +1 -0
  124. package/dist/outline/manager2.cjs.js +1 -1
  125. package/dist/outline/manager2.cjs.js.map +1 -1
  126. package/dist/outline/manager2.esm.js +422 -433
  127. package/dist/outline/manager2.esm.js.map +1 -1
  128. package/dist/outline/outlineDomHelpers.cjs.js +2 -0
  129. package/dist/outline/outlineDomHelpers.cjs.js.map +1 -0
  130. package/dist/outline/outlineDomHelpers.d.ts +30 -0
  131. package/dist/outline/outlineDomHelpers.d.ts.map +1 -0
  132. package/dist/outline/outlineDomHelpers.esm.js +79 -0
  133. package/dist/outline/outlineDomHelpers.esm.js.map +1 -0
  134. package/dist/outline/outlineIcons.esm.js +1 -2
  135. package/dist/outline/propertyViews.esm.js +1 -2
  136. package/dist/outline/queryByExample.cjs.js.map +1 -1
  137. package/dist/outline/queryByExample.esm.js +1 -2
  138. package/dist/outline/queryByExample.esm.js.map +1 -1
  139. package/dist/outline/userInput.cjs.js +9 -9
  140. package/dist/outline/userInput.cjs.js.map +1 -1
  141. package/dist/outline/userInput.esm.js +50 -40
  142. package/dist/outline/userInput.esm.js.map +1 -1
  143. package/dist/outline/viewAsImage.esm.js +1 -2
  144. package/dist/outline/viewAsMbox.esm.js +1 -2
  145. package/dist/pad/padPane2.cjs.js +1 -1
  146. package/dist/pad/padPane2.esm.js +2 -3
  147. package/dist/playlist/playlistPane.esm.js +1 -2
  148. package/dist/registerPanes.esm.js +1 -2
  149. package/dist/schedule/formsForSchedule.esm.js +1 -2
  150. package/dist/schedule/schedulePane.d.ts.map +1 -1
  151. package/dist/schedule/schedulePane2.cjs.js +1 -1
  152. package/dist/schedule/schedulePane2.cjs.js.map +1 -1
  153. package/dist/schedule/schedulePane2.esm.js +60 -59
  154. package/dist/schedule/schedulePane2.esm.js.map +1 -1
  155. package/dist/sharing/sharingPane.esm.js +1 -2
  156. package/dist/slideshow/slideshowPane.esm.js +1 -2
  157. package/dist/social/editProfileDetails.cjs.js +1 -1
  158. package/dist/social/editProfileDetails.esm.js +1 -2
  159. package/dist/social/icons.esm.js +1 -2
  160. package/dist/social/socialPane2.esm.js +1 -2
  161. package/dist/social/socialSections.esm.js +1 -2
  162. package/dist/social/triage.esm.js +1 -2
  163. package/dist/tabbed/tabbedPane.esm.js +1 -2
  164. package/dist/tableViewPane.esm.js +1 -2
  165. package/dist/transaction/pane.esm.js +1 -2
  166. package/dist/transaction/period.esm.js +1 -2
  167. package/dist/trip/tripPane.esm.js +1 -2
  168. package/dist/trustedApplications/trustedApplications.dom.esm.js +1 -2
  169. package/dist/trustedApplications/trustedApplications.utils.esm.js +1 -2
  170. package/dist/trustedApplications/trustedApplications.view.esm.js +1 -2
  171. package/dist/ui/pane.esm.js +1 -2
  172. package/dist/utils/paneUtils.cjs.js +1 -1
  173. package/dist/utils/paneUtils.cjs.js.map +1 -1
  174. package/dist/utils/paneUtils.d.ts +5 -3
  175. package/dist/utils/paneUtils.d.ts.map +1 -1
  176. package/dist/utils/paneUtils.esm.js +36 -29
  177. package/dist/utils/paneUtils.esm.js.map +1 -1
  178. package/dist/utils/podUtils.cjs.js +1 -1
  179. package/dist/utils/podUtils.cjs.js.map +1 -1
  180. package/dist/utils/podUtils.d.ts +9 -1
  181. package/dist/utils/podUtils.d.ts.map +1 -1
  182. package/dist/utils/podUtils.esm.js +22 -95
  183. package/dist/utils/podUtils.esm.js.map +1 -1
  184. package/dist/utils/viewerUtils.esm.js +1 -2
  185. package/dist/utils/webIdUtils.esm.js +1 -2
  186. package/dist/versionInfo.cjs.js +1 -1
  187. package/dist/versionInfo.cjs.js.map +1 -1
  188. package/dist/versionInfo.esm.js +4 -5
  189. package/dist/versionInfo.esm.js.map +1 -1
  190. package/dist/video/videoPane.esm.js +1 -2
  191. package/package.json +7 -6
  192. package/dist/_virtual/~icons/lucide/arrow-left.cjs.js +0 -2
  193. package/dist/_virtual/~icons/lucide/arrow-left.cjs.js.map +0 -1
  194. package/dist/_virtual/~icons/lucide/arrow-left.esm.js +0 -11
  195. package/dist/_virtual/~icons/lucide/arrow-left.esm.js.map +0 -1
  196. package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js +0 -2
  197. package/dist/_virtual/~icons/lucide/ellipsis-vertical.cjs.js.map +0 -1
  198. package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js +0 -11
  199. package/dist/_virtual/~icons/lucide/ellipsis-vertical.esm.js.map +0 -1
  200. package/dist/_virtual/~icons/lucide/folder.cjs.js +0 -2
  201. package/dist/_virtual/~icons/lucide/folder.cjs.js.map +0 -1
  202. package/dist/_virtual/~icons/lucide/folder.esm.js +0 -11
  203. package/dist/_virtual/~icons/lucide/folder.esm.js.map +0 -1
  204. package/dist/_virtual/~icons/lucide/globe.cjs.js +0 -2
  205. package/dist/_virtual/~icons/lucide/globe.cjs.js.map +0 -1
  206. package/dist/_virtual/~icons/lucide/globe.esm.js +0 -11
  207. package/dist/_virtual/~icons/lucide/globe.esm.js.map +0 -1
  208. package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js +0 -2
  209. package/dist/_virtual/~icons/lucide/lock-keyhole.cjs.js.map +0 -1
  210. package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js +0 -11
  211. package/dist/_virtual/~icons/lucide/lock-keyhole.esm.js.map +0 -1
  212. package/dist/_virtual/~icons/lucide/share-2.cjs.js +0 -2
  213. package/dist/_virtual/~icons/lucide/share-2.cjs.js.map +0 -1
  214. package/dist/_virtual/~icons/lucide/share-2.esm.js +0 -11
  215. package/dist/_virtual/~icons/lucide/share-2.esm.js.map +0 -1
  216. package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js +0 -2
  217. package/dist/_virtual/~icons/lucide/user-round-cog.cjs.js.map +0 -1
  218. package/dist/_virtual/~icons/lucide/user-round-cog.esm.js +0 -11
  219. package/dist/_virtual/~icons/lucide/user-round-cog.esm.js.map +0 -1
  220. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js +0 -14
  221. package/dist/components/file-explorer-header/FileExplorerHeader.cjs.js.map +0 -1
  222. package/dist/components/file-explorer-header/FileExplorerHeader.d.ts +0 -18
  223. package/dist/components/file-explorer-header/FileExplorerHeader.d.ts.map +0 -1
  224. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js +0 -292
  225. package/dist/components/file-explorer-header/FileExplorerHeader.esm.js.map +0 -1
  226. package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js +0 -2
  227. package/dist/components/file-explorer-header/FileExplorerHeader.styles.cjs.js.map +0 -1
  228. package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js +0 -7
  229. package/dist/components/file-explorer-header/FileExplorerHeader.styles.esm.js.map +0 -1
  230. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js +0 -32
  231. package/dist/components/file-explorer-header/FileExplorerHeaderControls.cjs.js.map +0 -1
  232. package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts +0 -21
  233. package/dist/components/file-explorer-header/FileExplorerHeaderControls.d.ts.map +0 -1
  234. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js +0 -294
  235. package/dist/components/file-explorer-header/FileExplorerHeaderControls.esm.js.map +0 -1
  236. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js +0 -2
  237. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.cjs.js.map +0 -1
  238. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js +0 -7
  239. package/dist/components/file-explorer-header/FileExplorerHeaderControls.styles.esm.js.map +0 -1
  240. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js +0 -34
  241. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.cjs.js.map +0 -1
  242. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts +0 -20
  243. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.d.ts.map +0 -1
  244. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js +0 -346
  245. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.esm.js.map +0 -1
  246. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js +0 -2
  247. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.cjs.js.map +0 -1
  248. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js +0 -7
  249. package/dist/components/file-explorer-header/FileExplorerHeaderSummary.styles.esm.js.map +0 -1
  250. package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js +0 -13
  251. package/dist/components/file-explorer-header/FileExplorerProvider.cjs.js.map +0 -1
  252. package/dist/components/file-explorer-header/FileExplorerProvider.d.ts +0 -36
  253. package/dist/components/file-explorer-header/FileExplorerProvider.d.ts.map +0 -1
  254. package/dist/components/file-explorer-header/FileExplorerProvider.esm.js +0 -470
  255. package/dist/components/file-explorer-header/FileExplorerProvider.esm.js.map +0 -1
  256. package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js +0 -2
  257. package/dist/components/file-explorer-header/FileExplorerProvider.styles.cjs.js.map +0 -1
  258. package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js +0 -7
  259. package/dist/components/file-explorer-header/FileExplorerProvider.styles.esm.js.map +0 -1
  260. package/dist/components/file-explorer-header/index.cjs.js +0 -1
  261. package/dist/components/file-explorer-header/index.d.ts +0 -3
  262. package/dist/components/file-explorer-header/index.d.ts.map +0 -1
  263. package/dist/components/file-explorer-header/index.esm.js +0 -2
  264. package/dist/components/file-explorer-header/types.d.ts +0 -10
  265. package/dist/components/file-explorer-header/types.d.ts.map +0 -1
  266. package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts +0 -8
  267. package/dist/components/resource-actions-menu/DeleteResourceDialog.d.ts.map +0 -1
  268. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js +0 -32
  269. package/dist/components/resource-actions-menu/ResourceActionsMenu.cjs.js.map +0 -1
  270. package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts +0 -19
  271. package/dist/components/resource-actions-menu/ResourceActionsMenu.d.ts.map +0 -1
  272. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js +0 -322
  273. package/dist/components/resource-actions-menu/ResourceActionsMenu.esm.js.map +0 -1
  274. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js +0 -2
  275. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.cjs.js.map +0 -1
  276. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js +0 -7
  277. package/dist/components/resource-actions-menu/ResourceActionsMenu.styles.esm.js.map +0 -1
@@ -2,7 +2,7 @@
2
2
  import "./components/editor-card/index.esm.js";
3
3
  import * as e from "solid-ui";
4
4
  import * as t from "rdflib";
5
- //#region src/n3Pane.ts
5
+ // src/n3Pane.ts
6
6
  var n = e.ns, r = {
7
7
  icon: e.icons.originalIconBase + "w3c/n3_smaller.png",
8
8
  name: "n3",
@@ -22,7 +22,6 @@ var n = e.ns, r = {
22
22
  return l.contentType = "text/n3", l.content = c, a.appendChild(l), a;
23
23
  }
24
24
  };
25
- //#endregion
26
25
  export { r as n3Pane };
27
26
 
28
27
  //# sourceMappingURL=n3Pane2.esm.js.map
@@ -1,5 +1,5 @@
1
1
  import { clearPaneState as e } from "./state.esm.js";
2
- //#region src/navigation/browserEvents.ts
2
+ // src/navigation/browserEvents.ts
3
3
  var t, n = !1;
4
4
  function r() {
5
5
  return n;
@@ -26,7 +26,6 @@ function a(r) {
26
26
  a();
27
27
  });
28
28
  }
29
- //#endregion
30
29
  export { r as isHandlingBrowserNavigation, a as registerBrowserNavigation };
31
30
 
32
31
  //# sourceMappingURL=browserEvents.esm.js.map
@@ -1,4 +1,4 @@
1
- //#region src/navigation/chrome.ts
1
+ // src/navigation/chrome.ts
2
2
  var e = ["profile", "social"];
3
3
  function t(t) {
4
4
  return t !== void 0 && e.includes(t);
@@ -37,7 +37,6 @@ function s(e) {
37
37
  function c(e, n) {
38
38
  return e && !t(n);
39
39
  }
40
- //#endregion
41
40
  export { e as PERSON_PANES, s as deriveExplorerHeader, n as deriveHeading, r as deriveNavbarSelection, c as explorerHeaderForPane, o as isNavbarHidden, i as isNavbarItemSelected, t as isPersonPane, a as pickNavbarItem };
42
41
 
43
42
  //# sourceMappingURL=chrome.esm.js.map
@@ -1,2 +1,2 @@
1
- const e=require("../utils/webIdUtils.cjs.js"),t=require("../utils/paneUtils.cjs.js"),n=require("./state.cjs.js"),r=require("./navbarVisibility.cjs.js");function i(i){let{store:a,outliner:o,byName:s,effects:c}=i,l=0;async function u(n,r){if(r.subject){let e=a.sym(r.subject);if(r.kind===`profile`)return t.getProfilePaneFromURI(e);if(r.kind===`friends`)return t.getSocialPaneFromURI(e);if(r.kind===`storage`)return t.getFolderPaneForStorage(e)}return r.pane?s(r.pane)??void 0:e.isWebIdUri(n)?t.getProfilePaneFromURI(n):void 0}async function d(e,n,r){switch(e.kind){case`restore`:return u(n,r.view);case`profile`:return t.getProfilePaneFromURI(a.sym(e.subject));case`friends`:return t.getSocialPaneFromURI(a.sym(e.subject));case`storage`:return e.pane;case`app`:return s(e.pane)}}return{async show(e){let t=++l,i=n.readNavigationState(),s=e.kind===`restore`?i.viaAccountMenu?`accountMenu`:`default`:e.source??`default`;s===`accountMenu`&&r.setNavbarHidden(!0);let u=a.sym(e.kind===`restore`&&e.subject?e.subject:window.location.href),f=await d(e,u,i);if(t===l){if(!f&&e.kind!==`restore`)console.warn(`Could not open the requested view for the logged-in user.`);else{if(o.GotoSubject(u,!0,f??void 0,!0,void 0,void 0,{source:s}),s!==`accountMenu`){let{view:e}=n.readNavigationState();e.pane&&c.selectNavbarPane(e.pane,e.subject)}await c.refreshHeading(e.kind===`restore`&&e.forceHeading===!0)}}}}}exports.createNavigationController=i;
1
+ const e=require("../utils/webIdUtils.cjs.js"),t=require("../utils/paneUtils.cjs.js"),n=require("./state.cjs.js"),r=require("./navbarVisibility.cjs.js");function i(i){let{store:a,outliner:o,byName:s,effects:c}=i,l=0;async function u(n,r){if(r.subject){let e=a.sym(r.subject);if(r.kind===`profile`)return t.getProfilePaneFromURI(e,s);if(r.kind===`friends`)return t.getSocialPaneFromURI(e,s);if(r.kind===`storage`)return t.getFolderPaneForStorage(e)}return r.pane?s(r.pane)??void 0:e.isWebIdUri(n)?t.getProfilePaneFromURI(n,s):void 0}async function d(e,n,r){switch(e.kind){case`restore`:return u(n,r.view);case`profile`:return t.getProfilePaneFromURI(a.sym(e.subject),s);case`friends`:return t.getSocialPaneFromURI(a.sym(e.subject),s);case`storage`:return e.pane;case`app`:return s(e.pane)}}return{async show(e){let t=++l,i=n.readNavigationState(),s=e.kind===`restore`?i.viaAccountMenu?`accountMenu`:`default`:e.source??`default`;s===`accountMenu`&&r.setNavbarHidden(!0);let u=a.sym(e.kind===`restore`&&e.subject?e.subject:window.location.href),f=await d(e,u,i);if(t===l){if(!f&&e.kind!==`restore`)console.warn(`Could not open the requested view for the logged-in user.`);else{if(o.GotoSubject(u,!0,f??void 0,!0,void 0,void 0,{source:s}),s!==`accountMenu`){let{view:e}=n.readNavigationState();e.pane&&c.selectNavbarPane(e.pane,e.subject)}await c.refreshHeading(e.kind===`restore`&&e.forceHeading===!0)}}}}}exports.createNavigationController=i;
2
2
  //# sourceMappingURL=controller.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"controller.cjs.js","names":["getProfilePaneFromURI","getSocialPaneFromURI","getFolderPaneForStorage","isWebIdUri","readNavigationState","require_webIdUtils","require_paneUtils","require_state","require_navbarVisibility","createNavigationController","deps","latest","paneForView","view","paneSubject","store","byName","subject","paneFor","intent","state","request","source","pane","outliner","effects"],"sources":["../../src/navigation/controller.ts"],"sourcesContent":["/*\n * The one place that displays a view and brings the page chrome in line with it.\n *\n * The account menu, the navbar, a page load, Enter in the address bar, back and forward and a\n * layout change used to each resolve a pane, call `GotoSubject` and then do some of the follow-up\n * themselves. Now each describes what it wants as an intent, and the follow-up is always the same:\n * navbar visibility and selection, then the profile heading.\n */\n\nimport type { LiveStore, NamedNode } from 'rdflib'\nimport type { PaneDefinition } from 'pane-registry'\nimport type { OutlineManager } from '../outline/manager'\nimport { getFolderPaneForStorage, getProfilePaneFromURI, getSocialPaneFromURI, type PaneItem } from '../utils/paneUtils'\nimport { setNavbarHidden } from './navbarVisibility'\nimport { readNavigationState, type NavigationState, type NavigationView } from './state'\nimport type { NavigationSource } from './options'\nimport { isWebIdUri } from '../utils/webIdUtils'\n\nexport type NavigationIntent =\n /** Display what the current history entry says was displayed, for the page's own URL. */\n | {\n kind: 'restore'\n /** The page subject, when it is not the current URL. */\n subject?: string\n /** Redo the heading even if it believes it already shows the right profile. */\n forceHeading?: boolean\n }\n /** A person's profile or friends, by WebID. */\n | { kind: 'profile' | 'friends', subject: string, source?: NavigationSource }\n /** A storage, as the navbar or the account menu offers it. */\n | { kind: 'storage', pane: PaneItem, source?: NavigationSource }\n /** A pane of the application itself, by registry name (dashboard, preferences). */\n | { kind: 'app', pane: string, source?: NavigationSource }\n\nexport interface NavigationEffects {\n selectNavbarPane: (paneName: string, paneUri?: string) => void\n refreshHeading: (force: boolean) => Promise<void>\n}\n\nexport interface NavigationDeps {\n store: LiveStore\n outliner: OutlineManager\n byName: (name: string) => PaneDefinition | null | undefined\n effects: NavigationEffects\n}\n\nexport interface NavigationController {\n /**\n * Display what the intent asks for. If another intent arrives while this one is still\n * resolving its pane, only the later one is displayed.\n */\n show: (intent: NavigationIntent) => Promise<void>\n}\n\ntype DisplayedPane = PaneItem | PaneDefinition | null | undefined\n\nexport function createNavigationController (deps: NavigationDeps): NavigationController {\n const { store, outliner, byName, effects } = deps\n let latest = 0\n\n async function paneForView (subject: NamedNode, view: NavigationView): Promise<DisplayedPane> {\n // These panes render a subject other than the page URL.\n if (view.subject) {\n const paneSubject = store.sym(view.subject)\n if (view.kind === 'profile') return getProfilePaneFromURI(paneSubject)\n if (view.kind === 'friends') return getSocialPaneFromURI(paneSubject)\n if (view.kind === 'storage') return getFolderPaneForStorage(paneSubject)\n }\n if (view.pane) return byName(view.pane) ?? undefined\n return isWebIdUri(subject) ? getProfilePaneFromURI(subject) : undefined\n }\n\n async function paneFor (intent: NavigationIntent, subject: NamedNode, state: NavigationState): Promise<DisplayedPane> {\n switch (intent.kind) {\n case 'restore': return paneForView(subject, state.view)\n case 'profile': return getProfilePaneFromURI(store.sym(intent.subject))\n case 'friends': return getSocialPaneFromURI(store.sym(intent.subject))\n case 'storage': return intent.pane\n case 'app': return byName(intent.pane)\n }\n }\n\n return {\n async show (intent) {\n const request = ++latest\n const state = readNavigationState()\n const source: NavigationSource = intent.kind === 'restore'\n ? (state.viaAccountMenu ? 'accountMenu' : 'default')\n : intent.source ?? 'default'\n // The account menu shows the viewer's own content, so the navbar for the page is not offered\n if (source === 'accountMenu') setNavbarHidden(true)\n\n const subject = store.sym(intent.kind === 'restore' && intent.subject ? intent.subject : window.location.href)\n const pane = await paneFor(intent, subject, state)\n if (request !== latest) return\n\n // Without a pane the outline would fall back to the page URL's own default view, which\n // is only right when restoring an entry that displayed nothing in particular.\n if (!pane && intent.kind !== 'restore') {\n console.warn('Could not open the requested view for the logged-in user.')\n return\n }\n\n outliner.GotoSubject(subject, true, pane ?? undefined, true, undefined, undefined, { source })\n\n if (source !== 'accountMenu') {\n const { view } = readNavigationState()\n if (view.pane) effects.selectNavbarPane(view.pane, view.subject)\n }\n await effects.refreshHeading(intent.kind === 'restore' && intent.forceHeading === true)\n }\n }\n}\n"],"mappings":"A,wJAwDA,SAAgBS,EAA4B,EAA4C,CACtF,GAAM,CAAE,QAAO,WAAU,SAAQ,WAAYC,EACzCC,EAAS,EAEb,eAAeC,EAAa,EAAoB,EAA8C,CAE5F,GAAIC,EAAK,QAAS,CAChB,IAAMC,EAAcC,EAAM,IAAIF,EAAK,OAAO,EAC1C,GAAIA,EAAK,OAAS,UAAW,OAAOb,EAAAA,sBAAsBc,CAAW,EACrE,GAAID,EAAK,OAAS,UAAW,OAAOZ,EAAAA,qBAAqBa,CAAW,EACpE,GAAID,EAAK,OAAS,UAAW,OAAOX,EAAAA,wBAAwBY,CAAW,CACzE,CAEA,OADID,EAAK,KAAaG,EAAOH,EAAK,IAAI,GAAK,IAAA,GACpCV,EAAAA,WAAWc,CAAO,EAAIjB,EAAAA,sBAAsBiB,CAAO,EAAI,IAAA,EAChE,CAEA,eAAeC,EAAS,EAA0B,EAAoB,EAAgD,CACpH,OAAQC,EAAO,KAAf,CACE,IAAK,UAAW,OAAOP,EAAYK,EAASG,EAAM,IAAI,EACtD,IAAK,UAAW,OAAOpB,EAAAA,sBAAsBe,EAAM,IAAII,EAAO,OAAO,CAAC,EACtE,IAAK,UAAW,OAAOlB,EAAAA,qBAAqBc,EAAM,IAAII,EAAO,OAAO,CAAC,EACrE,IAAK,UAAW,OAAOA,EAAO,KAC9B,IAAK,MAAO,OAAOH,EAAOG,EAAO,IAAI,CACvC,CACF,CAEA,MAAO,CACL,MAAM,KAAM,EAAQ,CAClB,IAAME,EAAU,EAAEV,EACZS,EAAQhB,EAAAA,oBAAoB,EAC5BkB,EAA2BH,EAAO,OAAS,UAC5CC,EAAM,eAAiB,cAAgB,UACxCD,EAAO,QAAU,UAEjBG,IAAW,eAAed,EAAA,gBAAgB,EAAI,EAElD,IAAMS,EAAUF,EAAM,IAAII,EAAO,OAAS,WAAaA,EAAO,QAAUA,EAAO,QAAU,OAAO,SAAS,IAAI,EACvGI,EAAO,MAAML,EAAQC,EAAQF,EAASG,CAAK,EACjD,GAAIC,IAAYV,EAIhB,IAAI,CAACY,GAAQJ,EAAO,OAAS,UAC3B,QAAQ,KAAK,2DAA2D,MAI1E,CAEA,GAFAK,EAAS,YAAYP,EAAS,GAAMM,GAAQ,IAAA,GAAW,GAAM,IAAA,GAAW,IAAA,GAAW,CAAE,QAAO,CAAC,EAEzFD,IAAW,cAAe,CAC5B,GAAM,CAAE,QAASlB,EAAAA,oBAAoB,EACjCS,EAAK,MAAMY,EAAQ,iBAAiBZ,EAAK,KAAMA,EAAK,OAAO,CACjE,CACA,MAAMY,EAAQ,eAAeN,EAAO,OAAS,WAAaA,EAAO,eAAiB,EAAI,CANO,CAF7F,CASF,CACF,CACF,C"}
1
+ {"version":3,"file":"controller.cjs.js","names":["getProfilePaneFromURI","getSocialPaneFromURI","getFolderPaneForStorage","isWebIdUri","readNavigationState","require_webIdUtils","require_paneUtils","require_state","require_navbarVisibility","createNavigationController","deps","latest","paneForView","view","paneSubject","store","byName","subject","paneFor","intent","state","request","source","pane","outliner","effects"],"sources":["../../src/navigation/controller.ts"],"sourcesContent":["/*\n * The one place that displays a view and brings the page chrome in line with it.\n *\n * The account menu, the navbar, a page load, Enter in the address bar, back and forward and a\n * layout change used to each resolve a pane, call `GotoSubject` and then do some of the follow-up\n * themselves. Now each describes what it wants as an intent, and the follow-up is always the same:\n * navbar visibility and selection, then the profile heading.\n */\n\nimport type { LiveStore, NamedNode } from 'rdflib'\nimport type { PaneDefinition } from 'pane-registry'\nimport type { OutlineManager } from '../outline/manager'\nimport { getFolderPaneForStorage, getProfilePaneFromURI, getSocialPaneFromURI, type PaneItem } from '../utils/paneUtils'\nimport { setNavbarHidden } from './navbarVisibility'\nimport { readNavigationState, type NavigationState, type NavigationView } from './state'\nimport type { NavigationSource } from './options'\nimport { isWebIdUri } from '../utils/webIdUtils'\n\nexport type NavigationIntent =\n /** Display what the current history entry says was displayed, for the page's own URL. */\n | {\n kind: 'restore'\n /** The page subject, when it is not the current URL. */\n subject?: string\n /** Redo the heading even if it believes it already shows the right profile. */\n forceHeading?: boolean\n }\n /** A person's profile or friends, by WebID. */\n | { kind: 'profile' | 'friends', subject: string, source?: NavigationSource }\n /** A storage, as the navbar or the account menu offers it. */\n | { kind: 'storage', pane: PaneItem, source?: NavigationSource }\n /** A pane of the application itself, by registry name (dashboard, preferences). */\n | { kind: 'app', pane: string, source?: NavigationSource }\n\nexport interface NavigationEffects {\n selectNavbarPane: (paneName: string, paneUri?: string) => void\n refreshHeading: (force: boolean) => Promise<void>\n}\n\nexport interface NavigationDeps {\n store: LiveStore\n outliner: OutlineManager\n byName: (name: string) => PaneDefinition | null | undefined\n effects: NavigationEffects\n}\n\nexport interface NavigationController {\n /**\n * Display what the intent asks for. If another intent arrives while this one is still\n * resolving its pane, only the later one is displayed.\n */\n show: (intent: NavigationIntent) => Promise<void>\n}\n\ntype DisplayedPane = PaneItem | PaneDefinition | null | undefined\n\nexport function createNavigationController (deps: NavigationDeps): NavigationController {\n const { store, outliner, byName, effects } = deps\n let latest = 0\n\n async function paneForView (subject: NamedNode, view: NavigationView): Promise<DisplayedPane> {\n // These panes render a subject other than the page URL.\n if (view.subject) {\n const paneSubject = store.sym(view.subject)\n if (view.kind === 'profile') return getProfilePaneFromURI(paneSubject, byName)\n if (view.kind === 'friends') return getSocialPaneFromURI(paneSubject, byName)\n if (view.kind === 'storage') return getFolderPaneForStorage(paneSubject)\n }\n if (view.pane) return byName(view.pane) ?? undefined\n return isWebIdUri(subject) ? getProfilePaneFromURI(subject, byName) : undefined\n }\n\n async function paneFor (intent: NavigationIntent, subject: NamedNode, state: NavigationState): Promise<DisplayedPane> {\n switch (intent.kind) {\n case 'restore': return paneForView(subject, state.view)\n case 'profile': return getProfilePaneFromURI(store.sym(intent.subject), byName)\n case 'friends': return getSocialPaneFromURI(store.sym(intent.subject), byName)\n case 'storage': return intent.pane\n case 'app': return byName(intent.pane)\n }\n }\n\n return {\n async show (intent) {\n const request = ++latest\n const state = readNavigationState()\n const source: NavigationSource = intent.kind === 'restore'\n ? (state.viaAccountMenu ? 'accountMenu' : 'default')\n : intent.source ?? 'default'\n // The account menu shows the viewer's own content, so the navbar for the page is not offered\n if (source === 'accountMenu') setNavbarHidden(true)\n\n const subject = store.sym(intent.kind === 'restore' && intent.subject ? intent.subject : window.location.href)\n const pane = await paneFor(intent, subject, state)\n if (request !== latest) return\n\n // Without a pane the outline would fall back to the page URL's own default view, which\n // is only right when restoring an entry that displayed nothing in particular.\n if (!pane && intent.kind !== 'restore') {\n console.warn('Could not open the requested view for the logged-in user.')\n return\n }\n\n outliner.GotoSubject(subject, true, pane ?? undefined, true, undefined, undefined, { source })\n\n if (source !== 'accountMenu') {\n const { view } = readNavigationState()\n if (view.pane) effects.selectNavbarPane(view.pane, view.subject)\n }\n await effects.refreshHeading(intent.kind === 'restore' && intent.forceHeading === true)\n }\n }\n}\n"],"mappings":"A,wJAwDA,SAAgBS,EAA4B,EAA4C,CACtF,GAAM,CAAE,QAAO,WAAU,SAAQ,WAAYC,EACzCC,EAAS,EAEb,eAAeC,EAAa,EAAoB,EAA8C,CAE5F,GAAIC,EAAK,QAAS,CAChB,IAAMC,EAAcC,EAAM,IAAIF,EAAK,OAAO,EAC1C,GAAIA,EAAK,OAAS,UAAW,OAAOb,EAAAA,sBAAsBc,EAAaE,CAAM,EAC7E,GAAIH,EAAK,OAAS,UAAW,OAAOZ,EAAAA,qBAAqBa,EAAaE,CAAM,EAC5E,GAAIH,EAAK,OAAS,UAAW,OAAOX,EAAAA,wBAAwBY,CAAW,CACzE,CAEA,OADID,EAAK,KAAaG,EAAOH,EAAK,IAAI,GAAK,IAAA,GACpCV,EAAAA,WAAWc,CAAO,EAAIjB,EAAAA,sBAAsBiB,EAASD,CAAM,EAAI,IAAA,EACxE,CAEA,eAAeE,EAAS,EAA0B,EAAoB,EAAgD,CACpH,OAAQC,EAAO,KAAf,CACE,IAAK,UAAW,OAAOP,EAAYK,EAASG,EAAM,IAAI,EACtD,IAAK,UAAW,OAAOpB,EAAAA,sBAAsBe,EAAM,IAAII,EAAO,OAAO,EAAGH,CAAM,EAC9E,IAAK,UAAW,OAAOf,EAAAA,qBAAqBc,EAAM,IAAII,EAAO,OAAO,EAAGH,CAAM,EAC7E,IAAK,UAAW,OAAOG,EAAO,KAC9B,IAAK,MAAO,OAAOH,EAAOG,EAAO,IAAI,CACvC,CACF,CAEA,MAAO,CACL,MAAM,KAAM,EAAQ,CAClB,IAAME,EAAU,EAAEV,EACZS,EAAQhB,EAAAA,oBAAoB,EAC5BkB,EAA2BH,EAAO,OAAS,UAC5CC,EAAM,eAAiB,cAAgB,UACxCD,EAAO,QAAU,UAEjBG,IAAW,eAAed,EAAA,gBAAgB,EAAI,EAElD,IAAMS,EAAUF,EAAM,IAAII,EAAO,OAAS,WAAaA,EAAO,QAAUA,EAAO,QAAU,OAAO,SAAS,IAAI,EACvGI,EAAO,MAAML,EAAQC,EAAQF,EAASG,CAAK,EACjD,GAAIC,IAAYV,EAIhB,IAAI,CAACY,GAAQJ,EAAO,OAAS,UAC3B,QAAQ,KAAK,2DAA2D,MAI1E,CAEA,GAFAK,EAAS,YAAYP,EAAS,GAAMM,GAAQ,IAAA,GAAW,GAAM,IAAA,GAAW,IAAA,GAAW,CAAE,QAAO,CAAC,EAEzFD,IAAW,cAAe,CAC5B,GAAM,CAAE,QAASlB,EAAAA,oBAAoB,EACjCS,EAAK,MAAMY,EAAQ,iBAAiBZ,EAAK,KAAMA,EAAK,OAAO,CACjE,CACA,MAAMY,EAAQ,eAAeN,EAAO,OAAS,WAAaA,EAAO,eAAiB,EAAI,CANO,CAF7F,CASF,CACF,CACF,C"}
@@ -2,23 +2,23 @@ import { isWebIdUri as e } from "../utils/webIdUtils.esm.js";
2
2
  import { getFolderPaneForStorage as t, getProfilePaneFromURI as n, getSocialPaneFromURI as r } from "../utils/paneUtils.esm.js";
3
3
  import { readNavigationState as i } from "./state.esm.js";
4
4
  import { setNavbarHidden as a } from "./navbarVisibility.esm.js";
5
- //#region src/navigation/controller.ts
5
+ // src/navigation/controller.ts
6
6
  function o(o) {
7
7
  let { store: s, outliner: c, byName: l, effects: u } = o, d = 0;
8
8
  async function f(i, a) {
9
9
  if (a.subject) {
10
10
  let e = s.sym(a.subject);
11
- if (a.kind === "profile") return n(e);
12
- if (a.kind === "friends") return r(e);
11
+ if (a.kind === "profile") return n(e, l);
12
+ if (a.kind === "friends") return r(e, l);
13
13
  if (a.kind === "storage") return t(e);
14
14
  }
15
- return a.pane ? l(a.pane) ?? void 0 : e(i) ? n(i) : void 0;
15
+ return a.pane ? l(a.pane) ?? void 0 : e(i) ? n(i, l) : void 0;
16
16
  }
17
17
  async function p(e, t, i) {
18
18
  switch (e.kind) {
19
19
  case "restore": return f(t, i.view);
20
- case "profile": return n(s.sym(e.subject));
21
- case "friends": return r(s.sym(e.subject));
20
+ case "profile": return n(s.sym(e.subject), l);
21
+ case "friends": return r(s.sym(e.subject), l);
22
22
  case "storage": return e.pane;
23
23
  case "app": return l(e.pane);
24
24
  }
@@ -39,7 +39,6 @@ function o(o) {
39
39
  }
40
40
  } };
41
41
  }
42
- //#endregion
43
42
  export { o as createNavigationController };
44
43
 
45
44
  //# sourceMappingURL=controller.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"controller.esm.js","names":["createNavigationController","deps","latest","paneForView","view","paneSubject","store","getProfilePaneFromURI","getSocialPaneFromURI","getFolderPaneForStorage","byName","isWebIdUri","subject","paneFor","intent","state","request","readNavigationState","source","setNavbarHidden","pane","outliner","effects"],"sources":["../../src/navigation/controller.ts"],"sourcesContent":["/*\n * The one place that displays a view and brings the page chrome in line with it.\n *\n * The account menu, the navbar, a page load, Enter in the address bar, back and forward and a\n * layout change used to each resolve a pane, call `GotoSubject` and then do some of the follow-up\n * themselves. Now each describes what it wants as an intent, and the follow-up is always the same:\n * navbar visibility and selection, then the profile heading.\n */\n\nimport type { LiveStore, NamedNode } from 'rdflib'\nimport type { PaneDefinition } from 'pane-registry'\nimport type { OutlineManager } from '../outline/manager'\nimport { getFolderPaneForStorage, getProfilePaneFromURI, getSocialPaneFromURI, type PaneItem } from '../utils/paneUtils'\nimport { setNavbarHidden } from './navbarVisibility'\nimport { readNavigationState, type NavigationState, type NavigationView } from './state'\nimport type { NavigationSource } from './options'\nimport { isWebIdUri } from '../utils/webIdUtils'\n\nexport type NavigationIntent =\n /** Display what the current history entry says was displayed, for the page's own URL. */\n | {\n kind: 'restore'\n /** The page subject, when it is not the current URL. */\n subject?: string\n /** Redo the heading even if it believes it already shows the right profile. */\n forceHeading?: boolean\n }\n /** A person's profile or friends, by WebID. */\n | { kind: 'profile' | 'friends', subject: string, source?: NavigationSource }\n /** A storage, as the navbar or the account menu offers it. */\n | { kind: 'storage', pane: PaneItem, source?: NavigationSource }\n /** A pane of the application itself, by registry name (dashboard, preferences). */\n | { kind: 'app', pane: string, source?: NavigationSource }\n\nexport interface NavigationEffects {\n selectNavbarPane: (paneName: string, paneUri?: string) => void\n refreshHeading: (force: boolean) => Promise<void>\n}\n\nexport interface NavigationDeps {\n store: LiveStore\n outliner: OutlineManager\n byName: (name: string) => PaneDefinition | null | undefined\n effects: NavigationEffects\n}\n\nexport interface NavigationController {\n /**\n * Display what the intent asks for. If another intent arrives while this one is still\n * resolving its pane, only the later one is displayed.\n */\n show: (intent: NavigationIntent) => Promise<void>\n}\n\ntype DisplayedPane = PaneItem | PaneDefinition | null | undefined\n\nexport function createNavigationController (deps: NavigationDeps): NavigationController {\n const { store, outliner, byName, effects } = deps\n let latest = 0\n\n async function paneForView (subject: NamedNode, view: NavigationView): Promise<DisplayedPane> {\n // These panes render a subject other than the page URL.\n if (view.subject) {\n const paneSubject = store.sym(view.subject)\n if (view.kind === 'profile') return getProfilePaneFromURI(paneSubject)\n if (view.kind === 'friends') return getSocialPaneFromURI(paneSubject)\n if (view.kind === 'storage') return getFolderPaneForStorage(paneSubject)\n }\n if (view.pane) return byName(view.pane) ?? undefined\n return isWebIdUri(subject) ? getProfilePaneFromURI(subject) : undefined\n }\n\n async function paneFor (intent: NavigationIntent, subject: NamedNode, state: NavigationState): Promise<DisplayedPane> {\n switch (intent.kind) {\n case 'restore': return paneForView(subject, state.view)\n case 'profile': return getProfilePaneFromURI(store.sym(intent.subject))\n case 'friends': return getSocialPaneFromURI(store.sym(intent.subject))\n case 'storage': return intent.pane\n case 'app': return byName(intent.pane)\n }\n }\n\n return {\n async show (intent) {\n const request = ++latest\n const state = readNavigationState()\n const source: NavigationSource = intent.kind === 'restore'\n ? (state.viaAccountMenu ? 'accountMenu' : 'default')\n : intent.source ?? 'default'\n // The account menu shows the viewer's own content, so the navbar for the page is not offered\n if (source === 'accountMenu') setNavbarHidden(true)\n\n const subject = store.sym(intent.kind === 'restore' && intent.subject ? intent.subject : window.location.href)\n const pane = await paneFor(intent, subject, state)\n if (request !== latest) return\n\n // Without a pane the outline would fall back to the page URL's own default view, which\n // is only right when restoring an entry that displayed nothing in particular.\n if (!pane && intent.kind !== 'restore') {\n console.warn('Could not open the requested view for the logged-in user.')\n return\n }\n\n outliner.GotoSubject(subject, true, pane ?? undefined, true, undefined, undefined, { source })\n\n if (source !== 'accountMenu') {\n const { view } = readNavigationState()\n if (view.pane) effects.selectNavbarPane(view.pane, view.subject)\n }\n await effects.refreshHeading(intent.kind === 'restore' && intent.forceHeading === true)\n }\n }\n}\n"],"mappings":";;;;;AAwDA,SAAgBA,EAA4B,GAA4C;CACtF,IAAM,EAAE,UAAO,aAAU,WAAQ,eAAYC,GACzCC,IAAS;CAEb,eAAeC,EAAa,GAAoB,GAA8C;EAE5F,IAAIC,EAAK,SAAS;GAChB,IAAMC,IAAcC,EAAM,IAAIF,EAAK,OAAO;GAC1C,IAAIA,EAAK,SAAS,WAAW,OAAOG,EAAsBF,CAAW;GACrE,IAAID,EAAK,SAAS,WAAW,OAAOI,EAAqBH,CAAW;GACpE,IAAID,EAAK,SAAS,WAAW,OAAOK,EAAwBJ,CAAW;EACzE;EAEA,OADID,EAAK,OAAaM,EAAON,EAAK,IAAI,KAAK,KAAA,IACpCO,EAAWC,CAAO,IAAIL,EAAsBK,CAAO,IAAI,KAAA;CAChE;CAEA,eAAeC,EAAS,GAA0B,GAAoB,GAAgD;EACpH,QAAQC,EAAO,MAAf;GACE,KAAK,WAAW,OAAOX,EAAYS,GAASG,EAAM,IAAI;GACtD,KAAK,WAAW,OAAOR,EAAsBD,EAAM,IAAIQ,EAAO,OAAO,CAAC;GACtE,KAAK,WAAW,OAAON,EAAqBF,EAAM,IAAIQ,EAAO,OAAO,CAAC;GACrE,KAAK,WAAW,OAAOA,EAAO;GAC9B,KAAK,OAAO,OAAOJ,EAAOI,EAAO,IAAI;EACvC;CACF;CAEA,OAAO,EACL,MAAM,KAAM,GAAQ;EAClB,IAAME,IAAU,EAAEd,GACZa,IAAQE,EAAoB,GAC5BC,IAA2BJ,EAAO,SAAS,YAC5CC,EAAM,iBAAiB,gBAAgB,YACxCD,EAAO,UAAU;EAErB,AAAII,MAAW,iBAAeC,EAAgB,EAAI;EAElD,IAAMP,IAAUN,EAAM,IAAIQ,EAAO,SAAS,aAAaA,EAAO,UAAUA,EAAO,UAAU,OAAO,SAAS,IAAI,GACvGM,IAAO,MAAMP,EAAQC,GAAQF,GAASG,CAAK;EACjD,IAAIC,MAAYd,GAIhB;OAAI,CAACkB,KAAQN,EAAO,SAAS,WAC3B,QAAQ,KAAK,2DAA2D;QAI1E;IAEA,IAFAO,EAAS,YAAYT,GAAS,IAAMQ,KAAQ,KAAA,GAAW,IAAM,KAAA,GAAW,KAAA,GAAW,EAAE,UAAO,CAAC,GAEzFF,MAAW,eAAe;KAC5B,IAAM,EAAE,YAASD,EAAoB;KACrC,AAAIb,EAAK,QAAMkB,EAAQ,iBAAiBlB,EAAK,MAAMA,EAAK,OAAO;IACjE;IACA,MAAMkB,EAAQ,eAAeR,EAAO,SAAS,aAAaA,EAAO,iBAAiB,EAAI;GANO;EAF7F;CASF,EACF;AACF"}
1
+ {"version":3,"file":"controller.esm.js","names":["createNavigationController","deps","latest","paneForView","view","paneSubject","store","getProfilePaneFromURI","byName","getSocialPaneFromURI","getFolderPaneForStorage","isWebIdUri","subject","paneFor","intent","state","request","readNavigationState","source","setNavbarHidden","pane","outliner","effects"],"sources":["../../src/navigation/controller.ts"],"sourcesContent":["/*\n * The one place that displays a view and brings the page chrome in line with it.\n *\n * The account menu, the navbar, a page load, Enter in the address bar, back and forward and a\n * layout change used to each resolve a pane, call `GotoSubject` and then do some of the follow-up\n * themselves. Now each describes what it wants as an intent, and the follow-up is always the same:\n * navbar visibility and selection, then the profile heading.\n */\n\nimport type { LiveStore, NamedNode } from 'rdflib'\nimport type { PaneDefinition } from 'pane-registry'\nimport type { OutlineManager } from '../outline/manager'\nimport { getFolderPaneForStorage, getProfilePaneFromURI, getSocialPaneFromURI, type PaneItem } from '../utils/paneUtils'\nimport { setNavbarHidden } from './navbarVisibility'\nimport { readNavigationState, type NavigationState, type NavigationView } from './state'\nimport type { NavigationSource } from './options'\nimport { isWebIdUri } from '../utils/webIdUtils'\n\nexport type NavigationIntent =\n /** Display what the current history entry says was displayed, for the page's own URL. */\n | {\n kind: 'restore'\n /** The page subject, when it is not the current URL. */\n subject?: string\n /** Redo the heading even if it believes it already shows the right profile. */\n forceHeading?: boolean\n }\n /** A person's profile or friends, by WebID. */\n | { kind: 'profile' | 'friends', subject: string, source?: NavigationSource }\n /** A storage, as the navbar or the account menu offers it. */\n | { kind: 'storage', pane: PaneItem, source?: NavigationSource }\n /** A pane of the application itself, by registry name (dashboard, preferences). */\n | { kind: 'app', pane: string, source?: NavigationSource }\n\nexport interface NavigationEffects {\n selectNavbarPane: (paneName: string, paneUri?: string) => void\n refreshHeading: (force: boolean) => Promise<void>\n}\n\nexport interface NavigationDeps {\n store: LiveStore\n outliner: OutlineManager\n byName: (name: string) => PaneDefinition | null | undefined\n effects: NavigationEffects\n}\n\nexport interface NavigationController {\n /**\n * Display what the intent asks for. If another intent arrives while this one is still\n * resolving its pane, only the later one is displayed.\n */\n show: (intent: NavigationIntent) => Promise<void>\n}\n\ntype DisplayedPane = PaneItem | PaneDefinition | null | undefined\n\nexport function createNavigationController (deps: NavigationDeps): NavigationController {\n const { store, outliner, byName, effects } = deps\n let latest = 0\n\n async function paneForView (subject: NamedNode, view: NavigationView): Promise<DisplayedPane> {\n // These panes render a subject other than the page URL.\n if (view.subject) {\n const paneSubject = store.sym(view.subject)\n if (view.kind === 'profile') return getProfilePaneFromURI(paneSubject, byName)\n if (view.kind === 'friends') return getSocialPaneFromURI(paneSubject, byName)\n if (view.kind === 'storage') return getFolderPaneForStorage(paneSubject)\n }\n if (view.pane) return byName(view.pane) ?? undefined\n return isWebIdUri(subject) ? getProfilePaneFromURI(subject, byName) : undefined\n }\n\n async function paneFor (intent: NavigationIntent, subject: NamedNode, state: NavigationState): Promise<DisplayedPane> {\n switch (intent.kind) {\n case 'restore': return paneForView(subject, state.view)\n case 'profile': return getProfilePaneFromURI(store.sym(intent.subject), byName)\n case 'friends': return getSocialPaneFromURI(store.sym(intent.subject), byName)\n case 'storage': return intent.pane\n case 'app': return byName(intent.pane)\n }\n }\n\n return {\n async show (intent) {\n const request = ++latest\n const state = readNavigationState()\n const source: NavigationSource = intent.kind === 'restore'\n ? (state.viaAccountMenu ? 'accountMenu' : 'default')\n : intent.source ?? 'default'\n // The account menu shows the viewer's own content, so the navbar for the page is not offered\n if (source === 'accountMenu') setNavbarHidden(true)\n\n const subject = store.sym(intent.kind === 'restore' && intent.subject ? intent.subject : window.location.href)\n const pane = await paneFor(intent, subject, state)\n if (request !== latest) return\n\n // Without a pane the outline would fall back to the page URL's own default view, which\n // is only right when restoring an entry that displayed nothing in particular.\n if (!pane && intent.kind !== 'restore') {\n console.warn('Could not open the requested view for the logged-in user.')\n return\n }\n\n outliner.GotoSubject(subject, true, pane ?? undefined, true, undefined, undefined, { source })\n\n if (source !== 'accountMenu') {\n const { view } = readNavigationState()\n if (view.pane) effects.selectNavbarPane(view.pane, view.subject)\n }\n await effects.refreshHeading(intent.kind === 'restore' && intent.forceHeading === true)\n }\n }\n}\n"],"mappings":";;;;;AAwDA,SAAgBA,EAA4B,GAA4C;CACtF,IAAM,EAAE,UAAO,aAAU,WAAQ,eAAYC,GACzCC,IAAS;CAEb,eAAeC,EAAa,GAAoB,GAA8C;EAE5F,IAAIC,EAAK,SAAS;GAChB,IAAMC,IAAcC,EAAM,IAAIF,EAAK,OAAO;GAC1C,IAAIA,EAAK,SAAS,WAAW,OAAOG,EAAsBF,GAAaG,CAAM;GAC7E,IAAIJ,EAAK,SAAS,WAAW,OAAOK,EAAqBJ,GAAaG,CAAM;GAC5E,IAAIJ,EAAK,SAAS,WAAW,OAAOM,EAAwBL,CAAW;EACzE;EAEA,OADID,EAAK,OAAaI,EAAOJ,EAAK,IAAI,KAAK,KAAA,IACpCO,EAAWC,CAAO,IAAIL,EAAsBK,GAASJ,CAAM,IAAI,KAAA;CACxE;CAEA,eAAeK,EAAS,GAA0B,GAAoB,GAAgD;EACpH,QAAQC,EAAO,MAAf;GACE,KAAK,WAAW,OAAOX,EAAYS,GAASG,EAAM,IAAI;GACtD,KAAK,WAAW,OAAOR,EAAsBD,EAAM,IAAIQ,EAAO,OAAO,GAAGN,CAAM;GAC9E,KAAK,WAAW,OAAOC,EAAqBH,EAAM,IAAIQ,EAAO,OAAO,GAAGN,CAAM;GAC7E,KAAK,WAAW,OAAOM,EAAO;GAC9B,KAAK,OAAO,OAAON,EAAOM,EAAO,IAAI;EACvC;CACF;CAEA,OAAO,EACL,MAAM,KAAM,GAAQ;EAClB,IAAME,IAAU,EAAEd,GACZa,IAAQE,EAAoB,GAC5BC,IAA2BJ,EAAO,SAAS,YAC5CC,EAAM,iBAAiB,gBAAgB,YACxCD,EAAO,UAAU;EAErB,AAAII,MAAW,iBAAeC,EAAgB,EAAI;EAElD,IAAMP,IAAUN,EAAM,IAAIQ,EAAO,SAAS,aAAaA,EAAO,UAAUA,EAAO,UAAU,OAAO,SAAS,IAAI,GACvGM,IAAO,MAAMP,EAAQC,GAAQF,GAASG,CAAK;EACjD,IAAIC,MAAYd,GAIhB;OAAI,CAACkB,KAAQN,EAAO,SAAS,WAC3B,QAAQ,KAAK,2DAA2D;QAI1E;IAEA,IAFAO,EAAS,YAAYT,GAAS,IAAMQ,KAAQ,KAAA,GAAW,IAAM,KAAA,GAAW,KAAA,GAAW,EAAE,UAAO,CAAC,GAEzFF,MAAW,eAAe;KAC5B,IAAM,EAAE,YAASD,EAAoB;KACrC,AAAIb,EAAK,QAAMkB,EAAQ,iBAAiBlB,EAAK,MAAMA,EAAK,OAAO;IACjE;IACA,MAAMkB,EAAQ,eAAeR,EAAO,SAAS,aAAaA,EAAO,iBAAiB,EAAI;GANO;EAF7F;CASF,EACF;AACF"}
@@ -1,5 +1,5 @@
1
1
  import { parseNavigationState as e } from "./state.esm.js";
2
- //#region src/navigation/events.ts
2
+ // src/navigation/events.ts
3
3
  var t = "solid-panes:navigated";
4
4
  function n(n) {
5
5
  let r = {
@@ -12,7 +12,6 @@ function r(e, n = document) {
12
12
  let r = (t) => e(t.detail);
13
13
  return n.addEventListener(t, r), () => n.removeEventListener(t, r);
14
14
  }
15
- //#endregion
16
15
  export { t as NAVIGATED_EVENT, n as announceNavigation, r as onNavigated };
17
16
 
18
17
  //# sourceMappingURL=events.esm.js.map
@@ -2,7 +2,7 @@ import { isOwnWebIdProfile as e } from "../utils/webIdUtils.esm.js";
2
2
  import { isNavbarHidden as t } from "./chrome.esm.js";
3
3
  import { isPageInViewerPod as n } from "./podContext.esm.js";
4
4
  import { sym as r } from "rdflib";
5
- //#region src/navigation/navbarVisibility.ts
5
+ // src/navigation/navbarVisibility.ts
6
6
  var i = "navbar--hidden", a = 0;
7
7
  function o(e) {
8
8
  ++a, document.querySelector("solid-panes-navbar")?.classList.toggle(i, e);
@@ -20,7 +20,6 @@ async function s(i, s = !1) {
20
20
  inViewerPod: u
21
21
  }));
22
22
  }
23
- //#endregion
24
23
  export { s as refreshNavbarVisibility, o as setNavbarHidden };
25
24
 
26
25
  //# sourceMappingURL=navbarVisibility.esm.js.map
@@ -1,8 +1,7 @@
1
- //#region src/navigation/options.ts
1
+ // src/navigation/options.ts
2
2
  function e(e) {
3
3
  return typeof e == "object" && e ? e.source ?? "default" : e === void 0 || e ? "default" : "accountMenu";
4
4
  }
5
- //#endregion
6
5
  export { e as resolveSource };
7
6
 
8
7
  //# sourceMappingURL=options.esm.js.map
@@ -3,7 +3,7 @@ import { getPodStorages as n } from "../utils/podUtils.esm.js";
3
3
  import { getFolderPanesFromURI as r } from "../utils/paneUtils.esm.js";
4
4
  import { authn as i } from "solid-logic";
5
5
  import { sym as a } from "rdflib";
6
- //#region src/navigation/podContext.ts
6
+ // src/navigation/podContext.ts
7
7
  var o = 500, s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map();
8
8
  function u(e) {
9
9
  try {
@@ -56,7 +56,6 @@ function v(e, t) {
56
56
  async function y(e) {
57
57
  return v(await g(e), e);
58
58
  }
59
- //#endregion
60
59
  export { g as getPodContext, v as isInViewerPod, y as isPageInViewerPod, _ as isSamePod };
61
60
 
62
61
  //# sourceMappingURL=podContext.esm.js.map
@@ -1,4 +1,4 @@
1
- //#region src/navigation/state.ts
1
+ // src/navigation/state.ts
2
2
  var e = {
3
3
  profile: "profile",
4
4
  social: "friends",
@@ -35,7 +35,6 @@ function o(e) {
35
35
  function s() {
36
36
  window.history.replaceState(o(window.history.state), "", window.location.href);
37
37
  }
38
- //#endregion
39
38
  export { s as clearPaneState, a as nextHistoryState, r as parseNavigationState, i as readNavigationState, n as viewFromPane, o as withoutPaneState };
40
39
 
41
40
  //# sourceMappingURL=state.esm.js.map
@@ -1,5 +1,5 @@
1
1
  import { getOutliner as e } from "../index.esm.js";
2
- //#region src/outline/context.ts
2
+ // src/outline/context.ts
3
3
  function t(t, n, r, i, a) {
4
4
  return {
5
5
  dom: t,
@@ -12,7 +12,6 @@ function t(t, n, r, i, a) {
12
12
  environment: a
13
13
  };
14
14
  }
15
- //#endregion
16
15
  export { t as createContext };
17
16
 
18
17
  //# sourceMappingURL=context.esm.js.map
@@ -0,0 +1,2 @@
1
+ const e=require("../_virtual/_rolldown/runtime.cjs.js"),t=require("../icons/person.cjs.js"),n=require("../icons/friends.cjs.js");let r=require("solid-ui");r=e.__toESM(r);function i(e,t,n){if(e)return typeof e.icon==`function`?e.icon(t,n):e.icon}async function a(e,a,o,s){return typeof s==`function`?(await Promise.all(o.map(async o=>{let c=o.label(e,a);if(!c)return;let l;l=o.name===`profile`?t.default:o.name===`social`?n.default:await i(o,e,a)||void 0;let u=r.utils.AJARImage(l||``,c,c,a.dom);return u.setAttribute(`slot`,`left-icon`),{label:c,icon:u,action:()=>s(e,o.name)}}))).filter(e=>e!==void 0):[]}exports.getPaneIcon=i,exports.getPaneItems=a;
2
+ //# sourceMappingURL=fileExplorerHelpers.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileExplorerHelpers.cjs.js","names":["personIcon","friendsIcon","UI","require_runtime","require_person","require_friends","solid_ui","getPaneIcon","pane","subject","context","getPaneItems","dispatchOpenPane","relevantPanes","label","iconSrc","icon","item"],"sources":["../../src/outline/fileExplorerHelpers.ts"],"sourcesContent":["import * as UI from 'solid-ui'\nimport type { DataBrowserContext, PaneDefinition } from 'pane-registry'\nimport type { NamedNode } from 'rdflib'\nimport personIcon from '../icons/person.svg'\nimport friendsIcon from '../icons/friends.svg'\n\ntype ExplorerPane = Omit<PaneDefinition, 'icon'> & {\n icon: string | ((subject: NamedNode, context: DataBrowserContext) => string | undefined)\n}\n\nexport function getPaneIcon (\n pane: ExplorerPane | undefined,\n subject: NamedNode,\n context: DataBrowserContext\n) {\n if (!pane) return undefined\n\n return typeof pane.icon === 'function'\n ? pane.icon(subject, context)\n : pane.icon\n}\n\nexport async function getPaneItems (\n subject: NamedNode,\n context: DataBrowserContext,\n relevantPanes: ExplorerPane[],\n dispatchOpenPane: ((subject: NamedNode, paneName: string) => void) | undefined\n) {\n if (typeof dispatchOpenPane !== 'function') return []\n\n const menuItems = await Promise.all(relevantPanes.map(async pane => {\n const label = pane.label(subject, context)\n if (!label) return undefined\n\n let iconSrc: string | undefined\n if (pane.name === 'profile') {\n iconSrc = personIcon\n } else if (pane.name === 'social') {\n iconSrc = friendsIcon\n } else {\n iconSrc = await getPaneIcon(pane, subject, context) || undefined\n }\n\n const icon = UI.utils.AJARImage(iconSrc || '', label, label, context.dom)\n icon.setAttribute('slot', 'left-icon')\n\n return {\n label,\n icon,\n action: () => dispatchOpenPane(subject, pane.name)\n }\n }))\n\n return menuItems.filter((item): item is NonNullable<typeof item> => item !== undefined)\n}\n"],"mappings":"A,0KAUA,SAAgBO,EACd,EACA,EACA,EACA,CACA,GAAKC,EAEL,OAAO,OAAOA,EAAK,MAAS,WACxBA,EAAK,KAAKC,EAASC,CAAO,EAC1BF,EAAK,IACX,CAEA,eAAsBG,EACpB,EACA,EACA,EACA,EACA,CA0BA,OAzBI,OAAOC,GAAqB,YAyBzB,MAvBiB,QAAQ,IAAIC,EAAc,IAAI,KAAM,IAAQ,CAClE,IAAMC,EAAQN,EAAK,MAAMC,EAASC,CAAO,EACzC,GAAI,CAACI,EAAO,OAEZ,IAAIC,EACJ,AAKEA,EALEP,EAAK,OAAS,UACNR,EAAAA,QACDQ,EAAK,OAAS,SACbP,EAAAA,QAEA,MAAMM,EAAYC,EAAMC,EAASC,CAAO,GAAK,IAAA,GAGzD,IAAMM,EAAOd,EAAG,MAAM,UAAUa,GAAW,GAAID,EAAOA,EAAOJ,EAAQ,GAAG,EAGxE,OAFAM,EAAK,aAAa,OAAQ,WAAW,EAE9B,CACL,QACA,OACA,WAAcJ,EAAiBH,EAASD,EAAK,IAAI,CACnD,CACF,CAAC,CAAC,EAAA,CAEe,OAAQ,GAA2CS,IAAS,IAAA,EAAS,EAzBnC,CAAC,CA0BtD,C"}
@@ -0,0 +1,13 @@
1
+ import { DataBrowserContext, PaneDefinition } from '../../node_modules/pane-registry';
2
+ import { NamedNode } from '../../node_modules/rdflib';
3
+ type ExplorerPane = Omit<PaneDefinition, 'icon'> & {
4
+ icon: string | ((subject: NamedNode, context: DataBrowserContext) => string | undefined);
5
+ };
6
+ export declare function getPaneIcon(pane: ExplorerPane | undefined, subject: NamedNode, context: DataBrowserContext): string | undefined;
7
+ export declare function getPaneItems(subject: NamedNode, context: DataBrowserContext, relevantPanes: ExplorerPane[], dispatchOpenPane: ((subject: NamedNode, paneName: string) => void) | undefined): Promise<{
8
+ label: string;
9
+ icon: any;
10
+ action: () => void;
11
+ }[]>;
12
+ export {};
13
+ //# sourceMappingURL=fileExplorerHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileExplorerHelpers.d.ts","sourceRoot":"","sources":["../../src/outline/fileExplorerHelpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAIvC,KAAK,YAAY,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,GAAG;IACjD,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,kBAAkB,KAAK,MAAM,GAAG,SAAS,CAAC,CAAA;CACzF,CAAA;AAED,wBAAgB,WAAW,CACzB,IAAI,EAAE,YAAY,GAAG,SAAS,EAC9B,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,kBAAkB,sBAO5B;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,kBAAkB,EAC3B,aAAa,EAAE,YAAY,EAAE,EAC7B,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS;;;;KA4B/E"}
@@ -0,0 +1,24 @@
1
+ import e from "../icons/person.esm.js";
2
+ import t from "../icons/friends.esm.js";
3
+ import * as n from "solid-ui";
4
+ // src/outline/fileExplorerHelpers.ts
5
+ function r(e, t, n) {
6
+ if (e) return typeof e.icon == "function" ? e.icon(t, n) : e.icon;
7
+ }
8
+ async function i(i, a, o, s) {
9
+ return typeof s == "function" ? (await Promise.all(o.map(async (o) => {
10
+ let c = o.label(i, a);
11
+ if (!c) return;
12
+ let l;
13
+ l = o.name === "profile" ? e : o.name === "social" ? t : await r(o, i, a) || void 0;
14
+ let u = n.utils.AJARImage(l || "", c, c, a.dom);
15
+ return u.setAttribute("slot", "left-icon"), {
16
+ label: c,
17
+ icon: u,
18
+ action: () => s(i, o.name)
19
+ };
20
+ }))).filter((e) => e !== void 0) : [];
21
+ }
22
+ export { r as getPaneIcon, i as getPaneItems };
23
+
24
+ //# sourceMappingURL=fileExplorerHelpers.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileExplorerHelpers.esm.js","names":["personIcon","friendsIcon","person_default","friends_default","UI","getPaneIcon","pane","subject","context","getPaneItems","dispatchOpenPane","relevantPanes","label","iconSrc","icon","item"],"sources":["../../src/outline/fileExplorerHelpers.ts"],"sourcesContent":["import * as UI from 'solid-ui'\nimport type { DataBrowserContext, PaneDefinition } from 'pane-registry'\nimport type { NamedNode } from 'rdflib'\nimport personIcon from '../icons/person.svg'\nimport friendsIcon from '../icons/friends.svg'\n\ntype ExplorerPane = Omit<PaneDefinition, 'icon'> & {\n icon: string | ((subject: NamedNode, context: DataBrowserContext) => string | undefined)\n}\n\nexport function getPaneIcon (\n pane: ExplorerPane | undefined,\n subject: NamedNode,\n context: DataBrowserContext\n) {\n if (!pane) return undefined\n\n return typeof pane.icon === 'function'\n ? pane.icon(subject, context)\n : pane.icon\n}\n\nexport async function getPaneItems (\n subject: NamedNode,\n context: DataBrowserContext,\n relevantPanes: ExplorerPane[],\n dispatchOpenPane: ((subject: NamedNode, paneName: string) => void) | undefined\n) {\n if (typeof dispatchOpenPane !== 'function') return []\n\n const menuItems = await Promise.all(relevantPanes.map(async pane => {\n const label = pane.label(subject, context)\n if (!label) return undefined\n\n let iconSrc: string | undefined\n if (pane.name === 'profile') {\n iconSrc = personIcon\n } else if (pane.name === 'social') {\n iconSrc = friendsIcon\n } else {\n iconSrc = await getPaneIcon(pane, subject, context) || undefined\n }\n\n const icon = UI.utils.AJARImage(iconSrc || '', label, label, context.dom)\n icon.setAttribute('slot', 'left-icon')\n\n return {\n label,\n icon,\n action: () => dispatchOpenPane(subject, pane.name)\n }\n }))\n\n return menuItems.filter((item): item is NonNullable<typeof item> => item !== undefined)\n}\n"],"mappings":";;;;AAUA,SAAgBK,EACd,GACA,GACA,GACA;CACA,IAAKC,GAEL,OAAO,OAAOA,EAAK,QAAS,aACxBA,EAAK,KAAKC,GAASC,CAAO,IAC1BF,EAAK;AACX;AAEA,eAAsBG,EACpB,GACA,GACA,GACA,GACA;CA0BA,OAzBI,OAAOC,KAAqB,cAyBzB,MAvBiB,QAAQ,IAAIC,EAAc,IAAI,OAAM,MAAQ;EAClE,IAAMC,IAAQN,EAAK,MAAMC,GAASC,CAAO;EACzC,IAAI,CAACI,GAAO;EAEZ,IAAIC;EACJ,AAKEA,IALEP,EAAK,SAAS,YACNN,IACDM,EAAK,SAAS,WACbL,IAEA,MAAMI,EAAYC,GAAMC,GAASC,CAAO,KAAK,KAAA;EAGzD,IAAMM,IAAOV,EAAG,MAAM,UAAUS,KAAW,IAAID,GAAOA,GAAOJ,EAAQ,GAAG;EAGxE,OAFAM,EAAK,aAAa,QAAQ,WAAW,GAE9B;GACL;GACA;GACA,cAAcJ,EAAiBH,GAASD,EAAK,IAAI;EACnD;CACF,CAAC,CAAC,EAAA,CAEe,QAAQ,MAA2CS,MAAS,KAAA,CAAS,IAzBnC,CAAC;AA0BtD"}
@@ -1,2 +1,2 @@
1
- (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.obj{vertical-align:top;border:none;margin:.2em;padding:0 0 5px}.iconTD{vertical-align:top;border:none;width:0;margin:.2em;padding:0}.labelTD{width:100%}.file-explorer-header{flex-wrap:wrap;justify-content:flex-start;align-items:center;display:flex}.strongHeader{margin:0 .6rem 0 0;padding:.1rem .4rem;font-size:150%}.tableFullWidth{width:100%;background:var(--color-background,#f8f9fb)!important}.placeholderTable{width:100%}.tdFlex{vertical-align:top;border-radius:5px;flex-direction:row;justify-content:space-between;display:flex;overflow:hidden}.paneDiv,.exceptionPane{box-sizing:border-box;width:100%;min-width:0;max-width:100%;display:block;overflow-x:hidden}.objectValue--literal{white-space:pre-wrap}.objectValue--integer,.objectValue--decimal,.objectValue--double{text-align:right;display:block}.objectValueAccessIcon,.objectValueLinkIcon,.phoneIcon{vertical-align:middle;display:inline-block}.objectValueLinkIcon,.phoneIcon{width:12px;height:12px}@media (width<=600px){.obj,.iconTD{vertical-align:top;font-size:100%;margin:0!important}}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();const e=require("../_virtual/_rolldown/runtime.cjs.js");;const t=require("./propertyViews.cjs.js"),n=require("./outlineIcons.cjs.js"),r=require("./userInput.cjs.js"),i=require("./queryByExample.cjs.js"),a=require("../utils/webIdUtils.cjs.js"),o=require("../utils/podUtils.cjs.js"),s=require("../navigation/chrome.cjs.js"),c=require("../navigation/podContext.cjs.js"),l=require("../navigation/state.cjs.js"),u=require("../navigation/events.cjs.js"),d=require("../navigation/options.cjs.js"),f=require("../navigation/navbarVisibility.cjs.js");require("../components/file-explorer-header/index.cjs.js");let p=require("solid-ui");p=e.__toESM(p);let m=require("solid-logic"),h=require("pane-registry");h=e.__toESM(h);let g=require("rdflib");g=e.__toESM(g);function _(e){let _=e.dom;this.document=e.dom,this.context=e,this.outlineIcons=n.outlineIcons,this.labeller=this.labeller||{},this.labeller.LanguagePreference=``;let v=this,y=this,b=[];this.selection=b,this.ancestor=p.utils.ancestor,this.sparql=g.UpdateManager,this.kb=m.store;let x=m.store,S=m.store.fetcher;_.outline=this,this.qs=new i.QuerySource,this.UserInput=new r.UserInput(this),this.clipboardAddress=`tabulator:clipboard`,this.UserInput.clipboardInit(this.clipboardAddress);let C=this.outlineElement;this.init=function(){let e=E();e.outline=this},this.getLayoutMode=function(){let e=this.context?.environment?.layout;if(e===`mobile`||e===`desktop`)return e;if(typeof window<`u`&&window.matchMedia){let e=Math.round(Math.min(window.innerWidth,window.visualViewport?.width||window.innerWidth)),t=window.matchMedia(`(pointer: coarse)`).matches||navigator.maxTouchPoints>0;return e<=768||t&&e<=1024?`mobile`:`desktop`}return`desktop`},w.lastkbsize=0;function w(e){let t=[];for(let e=arguments.length-1;e>0;e--)t[e-1]=arguments[e];let n=new Date().getTime(),r=e.apply(e,t),i=new Date().getTime();return p.log.info(`BENCHMARK: kb delta: `+(x.statements.length-w.lastkbsize)+`, time elapsed for `+e+` was `+(i-n)+`ms`),w.lastkbsize=x.statements.length,r}function T(e,t,r){let i=p.utils.AJARImage(n.outlineIcons.src.icon_remove_node,`remove`,void 0,_);return i.addEventListener(`click`,ae),i.node=r,i.setAttribute(`about`,t.toNT()),i.style.marginLeft=`5px`,i.style.marginRight=`10px`,e.appendChild(i),i}this.appendAccessIcons=function(e,t,n){if(n.termType!==`NamedNode`)return;let r=e.uris(n);r.sort();let i=null;for(let e=0;e<r.length;e++)r[e]!==i&&(i=r[e],y.appendAccessIcon(t,i))},this.appendAccessIcon=function(e,t){if(!t)return``;let r=g.uri.docpart(t);if(r.slice(0,5)!==`http:`)return``;let i=S.getState(r),a,o,s;switch(i){case`unrequested`:a=n.outlineIcons.src.icon_unrequested,o=`fetch`,s=ie;break;case`requested`:a=n.outlineIcons.src.icon_requested,o=`fetching`,s=G;break;case`fetched`:a=n.outlineIcons.src.icon_fetched,s=K,o=`loaded`;break;case`failed`:a=n.outlineIcons.src.icon_failed,o=`failed`,s=G;break;case`unpermitted`:a=n.outlineIcons.src.icon_failed,s=G,o=`no perm`;break;case`unfetchable`:a=n.outlineIcons.src.icon_failed,s=G,o=`cannot fetch`;break;default:p.log.error(`?? state = `+i)}let c=p.utils.AJARImage(a,o,n.outlineIcons.tooltips[a].replace(/[Tt]his resource/,r),_);return c.classList.add(`objectValueAccessIcon`),c.setAttribute(`uri`,t),c.addEventListener(`click`,s),I(c,r),e.appendChild(c),c},this.outlineObjectTD=function(e,t,n,r){let i=_.createElement(`td`);return i.classList.add(`obj`),i.setAttribute(`notSelectable`,`false`),e?((e.termType===`NamedNode`||e.termType===`BlankNode`||e.termType===`Literal`&&e.value.slice&&(e.value.slice(0,6)===`ftp://`||e.value.slice(0,8)===`https://`||e.value.slice(0,7)===`http://`))&&(i.setAttribute(`about`,e.toNT()),i.appendChild(p.utils.AJARImage(p.icons.originalIconBase+`tbl-expand-trans.png`,`expand`,void 0,_)).addEventListener(`click`,U)),i.setAttribute(`class`,`obj`),x.whether(e,p.ns.rdf(`type`),p.ns.link(`Request`))&&(i.className=`undetermined`),t||=le,i.appendChild(t(e)),n&&T(i,e,n),i.tabulatorSelect=function(){V(this,!0)},i.tabulatorDeselect=function(){V(this,!1)},i.addEventListener(`click`,q),i):(i.textContent=`No object available.`,i)},this.outlinePredicateTD=function(e,t,r,i){let a=_.createElement(`TD`);a.setAttribute(`about`,e.toNT()),a.setAttribute(`class`,i?`pred internal`:`pred`);let o;switch(e.termType){case`BlankNode`:a.className=`undetermined`;break;case`NamedNode`:o=p.utils.predicateLabelForXML(e,r);break;case`Collection`:o=p.utils.predicateLabelForXML(e.elements[0],r)}o=o?o.slice(0,1).toUpperCase()+o.slice(1):`...`;let s=_.createElement(`TD`);s.classList.add(`labelTD`),s.setAttribute(`notSelectable`,`true`),s.appendChild(_.createTextNode(o)),a.appendChild(s),s.style.width=`100%`,a.appendChild(F.construct(_));for(let e in n.outlineIcons.termWidgets){if(!t||!t.AJAR_statement)break;n.outlineIcons.termWidgets[e].filter&&n.outlineIcons.termWidgets[e].filter(t.AJAR_statement,`pred`,r)&&F.addIcon(a,n.outlineIcons.termWidgets[e])}return a.tabulatorSelect=function(){V(this,!0)},a.tabulatorDeselect=function(){V(this,!1)},a.addEventListener(`click`,q),a};function E(){return ee(`OutlineView`,`Resource browser`)}function D(e){f.refreshNavbarVisibility(e.uri).catch(e=>p.log.error(`Failed to update navbar visibility: `+e))}function ee(e){if(document.getElementById(`MainContent`)||document.body,e===`OutlineView`){let e=document.getElementById(`OutlineView`);if(e)return e;let t=document.getElementById(`MainContent`)||document.body;if(t){let e=document.createElement(`table`);return e.id=`OutlineView`,e.classList.add(`outline-view`),e.setAttribute(`aria-label`,`Resource browser`),t.appendChild(e),e}}}async function te(e,t){e.uri.endsWith(`/`)&&await o.loadContainerRepresentation(e);let n=t.session.paneRegistry,r=n.list.filter(n=>n.label(e,t)&&!n.global&&n.name!==`sharing`);if(r.length===0)return[n.byName(`internal`)];let i=await p.login.filterAvailablePanes(r);return i.length===0?[r[0]]:n.list.indexOf(r[0])<n.list.indexOf(i[0])?[r[0]].concat(i):i}function ne(e,t){return e.find(e=>e.shouldGetFocus&&e.shouldGetFocus(t))||e[0]}function re(e){let t=_.getElementById(`queryButton`);t&&(e?t.removeAttribute(`style`):t.setAttribute(`style`,`display:none;`))}function O(t,n,r,i){if(!t||!r)return;let a;try{p.log.info(`outline: Rendering pane (menu): `+r.name),a=r.render(n,e,i)}catch(e){a=_.createElement(`div`),a.setAttribute(`class`,`exceptionPane`);let t=_.createElement(`pre`);a.appendChild(t),t.appendChild(_.createTextNode(p.utils.stackString(e)))}a.classList.add(`paneDiv`);let o=t.querySelector(`.paneDiv`);o?o.replaceWith(a):t.appendChild(a)}function k(e,t){let n=_.getElementById(`OutlineView`);if(!n)return;let r=e.toNT(),i=n.querySelector(`td.paneView[about="`+r+`"]`);if(!i)return;let a=i.querySelector(`file-explorer-provider`);a&&(t?(re(!!t.requireQueryButton),a.openSelectedPane?.(t),O(a,e,t,a.paneRenderOptions)):p.log.warn(`outline: Unable to open pane in place: pane is undefined.`))}async function A(t,n,r){r||={};let i=_.createElement(`tr`);r.hover&&i.classList.add(`hoverControl`);let o=i.appendChild(_.createElement(`td`));o.classList.add(`paneView`,`tdFlex`),o.setAttribute(`notSelectable`,`true`),o.setAttribute(`about`,t.toNT()),o.setAttribute(`colspan`,`2`);let l=o.appendChild(_.createElement(`file-explorer-provider`));l.context=e,l.subjectUri=t.uri,l.onBack=()=>W({target:l});let u=r.hideList?[]:await te(t,e);l.relevantPanes=u,l.pane=n||ne(u,t);let d=!!(t&&t.uri&&t.site&&t.site().uri===t.uri),f=!!r.headerOnlyInViewerPod;return l.showHeader=s.deriveExplorerHeader({isRootResource:d,isWebId:a.isWebIdUri(t),viewerPodOnly:f,inViewerPod:!f||await c.isPageInViewerPod(document.location.href)}),l.paneRenderOptions=r,l.soloPane=r.solo,l.openPane=(e,t)=>k(e,h.byName(t)),l.handleAccessClick=()=>k(t,h.byName(`sharing`)),l.pane&&(i.classList.add(`outlinePaneRow`),O(l,t,l.pane,r)),i}function j(e){let t=e.parentNode,n=t.parentNode,r=_.createElement(`table`);r.classList.add(`placeholderTable`),n.replaceChild(r,t),t.removeChild(e),n.replaceChild(t,r)}let M=this.propertyTable=function(e,t,n,r){return p.log.debug(`Property table for: `+e),e=x.canon(e),t?(p.log.info(`Re-expand: `+t),t):(t=_.createElement(`table`),t.classList.add(`tableFullWidth`),A(e,n,r).then(e=>{t.appendChild(e)}),t)};function N(e,t,n){let r=e.createElement(`TR`);r.AJAR_statement=t,r.AJAR_inverse=n,r.setAttribute(`predTR`,`true`);let i=y.outlinePredicateTD(t.predicate,r,n);return r.appendChild(i),r}this.propertyTR=N;function P(e,t,n,r){if(p.log.debug(`Property list length = `+t.length),t.length===0)return``;let i,a,o;n?(i=function(e){return e.subject},t=t.sort(p.utils.RDFComparePredicateSubject)):(i=function(e){return e.object},t=t.sort(p.utils.RDFComparePredicateObject));let s=t.length;for(a=0;a<s;a++){let c=t[a];if(r&&!r(c.predicate,n))continue;let l=N(_,c,n);e.appendChild(l);let u=l.firstChild,d=$.defaults[c.predicate.uri],f=0,m=0,h=0;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&&v.labeller.LanguagePreference&&(m+=1,i(t[a+o]).lang.indexOf(v.labeller.LanguagePreference)>=0&&h++);if(h>0&&m===f+1){for(let e=a;e<=a+f;e++)if(v.labeller.LanguagePreference&&i(t[e]).lang.indexOf(v.labeller.LanguagePreference)>=0){l.appendChild(y.outlineObjectTD(i(t[e]),d,void 0,c));break}a+=f}else l.appendChild(y.outlineObjectTD(i(c),d,void 0,c)),l.showNobj=function(r){let s=o-f,l=2*r<s?r:s,m=[];if(s!==1){u.setAttribute(`rowspan`,l===s?s:r+1);let f;l<s&&l===1&&u.setAttribute(`rowspan`,2);let h=0;for(f=1;f<o;f++)if(x.canon(i(t[a+f])).sameTerm(x.canon(i(t[a+f-1]))))p.log.info(`there are duplicates here: %s`,t[a+f-1]);else{h++,c=t[a+f],d=$.defaults[c.predicate.uri];let r=_.createElement(`tr`);r.style.colspan=`1`,r.appendChild(y.outlineObjectTD(i(t[a+f]),d,void 0,c)),r.AJAR_statement=c,r.AJAR_inverse=n,e.appendChild(r),h>=l&&(r.style.display=`none`,m.push(r))}l===s&&u.setAttribute(`rowspan`,h+1)}if(l<s){let t=_.createElement(`tr`),n=t.appendChild(_.createElement(`td`));if(n.classList.add(`obj`),n.setAttribute(`notSelectable`,`false`),s>r){let e=_.createElement(`a`);n.appendChild(e);let t=(function(e){return e(u,o,f,r)})(function(t,n,r,i){return function(n){e.innerHTML=``,n===`none`?(e.appendChild(p.utils.AJARImage(p.icons.originalIconBase+`tbl-more-trans.png`,`more`,`See all`,_)),e.appendChild(_.createTextNode(s-i+` more...`)),t.setAttribute(`rowspan`,i+1)):(e.appendChild(p.utils.AJARImage(p.icons.originalIconBase+`tbl-shrink.png`,`(less)`,void 0,_)),t.setAttribute(`rowspan`,s+1));for(let e=0;e<m.length;e++){let t=m[e];t.style.display=n}}}),i=`none`,a=function(e){return t(i),i=i===`none`?``:`none`,e&&e.stopPropagation(),!1};a(),e.addEventListener(`click`,a,!1)}e.appendChild(t)}},l.showAllobj=function(){l.showNobj(o-f)},l.showNobj(10),a+=o-1}}this.appendPropertyTRs=P;let F={};globalThis.termWidget=F,F.construct=function(e){e||=document;let t=e.createElement(`TD`);return t.setAttribute(`class`,`iconTD`),t.setAttribute(`notSelectable`,`true`),t},F.addIcon=function(e,t,n){let r=e.childNodes[1];if(!r)return;let i=p.utils.AJARImage(t.src,t.alt,t.tooltip,_);r.appendChild(i),n&&i.addEventListener(`click`,n)},F.removeIcon=function(e,t){let n=e.childNodes[1],r;if(n)for(let e=0;e<n.childNodes.length;e++){let i=n.childNodes[e],a=i.src;try{r=_.location.href.split(`?`)[0]}catch{r=``}a===g.uri.join(t.src,r)&&n.removeChild(i)}},F.replaceIcon=function(e,t,n,r){F.removeIcon(e,t),F.addIcon(e,n,r)};function I(e,t){p.log.debug(`Button callbacks for `+t+` added`);let r=function(r){return function(i){return i.indexOf(`#`),!e||!v.ancestor(e,`DIV`)?!1:(i===t&&(e.src=r,e.title=n.outlineIcons.tooltips[r]),!0)}};S.addCallback(`request`,r(n.outlineIcons.src.icon_requested)),S.addCallback(`done`,r(n.outlineIcons.src.icon_fetched)),S.addCallback(`fail`,r(n.outlineIcons.src.icon_failed))}function L(e){let t=e.getAttribute(`class`);return!!(t&&t.indexOf(`selected`)>=0)}function R(e){let t=y.targetOf(e).parentNode;F.replaceIcon(t.parentNode,n.outlineIcons.termWidgets.optOn,n.outlineIcons.termWidgets.optOff,z),t.parentNode.parentNode.removeAttribute(`optional`)}function z(e){let t=y.targetOf(e).parentNode;F.replaceIcon(t.parentNode,n.outlineIcons.termWidgets.optOff,n.outlineIcons.termWidgets.optOn,R),t.parentNode.parentNode.setAttribute(`optional`,`true`)}function B(e,t){let r=n.outlineIcons.termWidgets.optOn,i=n.outlineIcons.termWidgets.optOff;for(let n=e;n.parentNode;n=n.parentNode)for(;;)if(n.getAttribute(`predTR`)){let e=n.getAttribute(`parentOfSelected`);e=e?parseInt(e):0,e===0&&t>0&&F.addIcon(n.childNodes[0],n.getAttribute(`optional`)?r:i,n.getAttribute(`optional`)?R:z),e+=t,n.setAttribute(`parentOfSelected`,e),e===0&&(n.removeAttribute(`parentOfSelected`),F.removeIcon(n.childNodes[0],n.getAttribute(`optional`)?r:i));break}else if(n.previousSibling&&n.previousSibling.nodeName===`TR`)n=n.previousSibling;else break}this.statusBarClick=function(e){let t=p.utils.getTarget(e);t.label&&(window.content.location=t.label)},this.showURI=function(e){e&&_.getElementById(`UserURI`)&&(_.getElementById(`UserURI`).value=e.termType===`NamedNode`?e.uri:``)},this.showSource=function(){if(typeof sourceWidget<`u`){for(let e in sourceWidget.sources)sourceWidget.sources[e].setAttribute(`class`,``);for(let e=0;e<b.length;e++){if(!b[e].parentNode)continue;let t=b[e].parentNode.AJAR_statement;if(!t)continue;let n=t.why;n&&n.uri&&sourceWidget.highlight(n,!0)}}},this.getSelection=function(){return b};function V(e,t){if(e.nodeName!==`TD`)throw p.log.debug(`down`+e.nodeName),Error(`Expected TD in setSelected: `+e.nodeName+` : `+e.textContent);p.log.debug(`pass`);let r=e.getAttribute(`class`);if(r||=``,t){r+=` selected`,(r.indexOf(`pred`)>=0||r.indexOf(`obj`)>=0)&&B(e,1),b.push(e);let t=p.utils.getTerm(e);y.showURI(t);let i=e.AJAR_statement;if(i===void 0&&e.parentNode&&(i=e.parentNode.AJAR_statement),i){let t=i.why;m.store.updater.editable(t.uri,x)&&r.indexOf(`pred`)>=0&&F.addIcon(e,n.outlineIcons.termWidgets.addTri)}}else p.log.debug(`cla=$`+r+`$`),r===`selected`&&(r=``),r=r.replace(` selected`,``),(r.indexOf(`pred`)>=0||r.indexOf(`obj`)>=0)&&B(e,-1),r.indexOf(`pred`)>=0&&F.removeIcon(e,n.outlineIcons.termWidgets.addTri),b=b.filter(function(t){return t===e}),p.log.info(`Deselecting `+e.textContent);typeof sourceWidget<`u`&&y.showSource(),e.setAttribute(`class`,r)}function H(){let e=b.length;for(let t=e-1;t>=0;t--)V(b[t],!1);b=[]}this.targetOf=function(e){let t;if(e||=window.event,e.target)t=e.target;else if(e.srcElement)t=e.srcElement;else return p.log.error(`can't get target for event `+e),!1;return t.nodeType===3&&(t=t.parentNode),t},this.walk=function(e,t){let n=t||b[0],r;switch(e){case`down`:try{r=n.parentNode.nextSibling.lastChild}catch{this.walk(`up`);return}H(),V(r,!0);break;case`up`:try{r=n.parentNode.previousSibling.lastChild}catch{return}H(),V(r,!0);break;case`right`:if(H(),n.nextSibling||n.lastChild.tagName===`strong`)V(n.nextSibling,!0);else{let e=_.evaluate(`table/div/tr/td[2]`,n,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;V(e,!0)}break;case`left`:if(H(),n.previousSibling&&n.previousSibling.className===`undetermined`)return V(n.previousSibling,!0),!0;V(p.utils.ancestor(n.parentNode,`TD`),!0);break;case`moveTo`:H(),V(t,!0)}(e===`down`||e===`up`)&&(r.tabulatorSelect||this.walk(e))},this.OutlinerKeypressPanel=function(e){p.log.info(`Key `+e.keyCode+` pressed`);function t(e){e&&_.getElementById(`UserURI`)&&(_.getElementById(`UserURI`).value=e.termType===`NamedNode`?e.uri:``)}function n(e){return arguments[3]||(o(`right`,a),t(p.utils.getAbout(x,b[0]))),!0}let r,i;if(p.utils.getTarget(e).tagName===`TEXTAREA`||p.utils.getTarget(e).id===`UserURI`||b.length>1)return;if(b.length===0){(e.keyCode===13||e.keyCode===38||e.keyCode===40||e.keyCode===37||e.keyCode===39)&&(this.walk(`right`,y.focusTd),t(p.utils.getAbout(x,b[0])));return}let a=b[0];switch(S.removeCallback(`done`,`setSelectedAfterward`),S.removeCallback(`fail`,`setSelectedAfterward`),e.keyCode){case 13:if(p.utils.getTarget(e).tagName===`HTML`){let e=p.utils.getAbout(x,a);r=a.parentNode.AJAR_statement.why,i=m.store.updater.editable(r.uri,x),e?v.GotoSubject(e,!0):i&&y.UserInput.Enter(a)}else this.UserInput.Keypress(e),this.walk(`down`),e.stopPropagation();return;case 38:this.walk(`up`),e.stopPropagation(),e.preventDefault();break;case 40:this.walk(`down`),e.stopPropagation(),e.preventDefault()}if(p.utils.getTarget(e).tagName===`INPUT`)return;let o;switch(e.keyCode){case 46:case 8:r=a.parentNode.AJAR_statement.why,i=m.store.updater.editable(r.uri,x),i&&(e.preventDefault(),this.UserInput.Delete(a));break;case 37:{if(this.walk(`left`))return;let e=p.utils.ancestor(a.parentNode,`TD`);X(a,p.utils.getAbout(x,e));break}case 39:{let e=p.utils.getAbout(x,a);if(e){if(o=this.walk,a.nextSibling){this.walk(`right`);return}a.firstChild.tagName!==`TABLE`&&(S.addCallback(`done`,n),S.addCallback(`fail`,n),Y(a,e,{pane:h.byName(`defaultPane`)})),n()}}break;case 38:case 40:break;default:switch(e.charCode){case 99:if(e.ctrlKey){y.UserInput.copyToClipboard(y.clipboardAddress,a);break}break;case 118:case 112:if(e.ctrlKey){y.UserInput.pasteFromClipboard(y.clipboardAddress,a);break}break;default:p.utils.getTarget(e).tagName}}t(p.utils.getAbout(x,b[0]))},this.OutlinerMouseclickPanel=function(e){switch(y.UserInput._tabulatorMode){case 0:oe(e);break;case 1:y.UserInput.Click(e)}};function U(e){let t=y.targetOf(e),n=t.parentNode,r=p.utils.getAbout(x,t),i=e.altKey?h.byName(`internal`):void 0;e.shiftKey?Z(n,r,i):e.altKey?Y(n,r,{pane:h.byName(`internal`),immediate:!0}):Y(n,r)}function W(e){let t=y.targetOf(e),n=p.utils.getAbout(x,t),r=e.altKey?h.byName(`internal`):void 0,i=t.parentNode.parentNode;X(i,n,r)}function G(e){let t=y.targetOf(e).getAttribute(`uri`);e.altKey?S.fetch(g.uri.docpart(t),{force:!0}):S.refresh(x.sym(g.uri.docpart(t)))}function K(e){let t=y.targetOf(e).getAttribute(`uri`);e.altKey?S.fetch(g.uri.docpart(t),{force:!0}):S.refresh(x.sym(g.uri.docpart(t)))}function ie(e){let t=y.targetOf(e).getAttribute(`uri`);S.fetch(g.uri.docpart(t))}function ae(e){let t=y.targetOf(e),n=t.node;n.childNodes.length>1&&(n=t.parentNode),j(n)}function q(e){if(y.UserInput._tabulatorMode)return y.UserInput.Click(e);let t=y.targetOf(e),n;for(n=p.utils.ancestor(t,`TD`);n&&n.getAttribute(`notSelectable`)!==`false`;n=p.utils.ancestor(n.parentNode,`TD`));if(!n)return;let r=L(n);if(p.log.debug(`Was node selected before: `+r),e.altKey)V(n,!L(n));else if(e.shiftKey)V(n,!0);else{if(H(),y.UserInput.clearInputAndSave(e),V(n,!0),e.detail===2){e.stopPropagation();return}let t;if(n.parentNode&&(t=n.parentNode.AJAR_statement),!t)return;let i=t.why,a=m.store.updater.editable(i.uri,x);r&&a&&y.UserInput.Click(e,b[0])}p.log.debug(`Was node selected after: `+L(n)+`, count=`+b.length),e.stopPropagation()}function oe(e){p.log.info(`@TabulatorMousedown, dom.location is now `+_.location);let t=y.targetOf(e);if(!t)return;let r=t.tagName;r!==`INPUT`&&r!==`TEXTAREA`&&(y.UserInput.clearMenu(),y.UserInput.lastModified&&y.UserInput.lastModified.parentNode.nextSibling&&y.UserInput.backOut(),(!t.src||t.src.slice(t.src.indexOf(`/icons/`)+1)!==n.outlineIcons.src.icon_show_choices&&t.src.slice(t.src.indexOf(`/icons/`)+1)!==n.outlineIcons.src.icon_add_triple)&&y.UserInput.clearInputAndSave(e),(!t.src||t.src.slice(t.src.indexOf(`/icons/`)+1)!==n.outlineIcons.src.icon_show_choices)&&y.UserInput.clearMenu(),e&&e.stopPropagation())}function J(e){_.title=p.utils.label(e),_.location.href.startsWith(e.site().uri)}function Y(e,t,n){n||={};let r=n.pane,i=!!n.already,a=n.immediate;p.log.info(`@outlineExpand, dom is now `+_.location),S.removeCallback(`done`,`expand`),S.removeCallback(`fail`,`expand`);let o=x.canon(t);function s(){if(o=x.canon(o),!e||!e.parentNode||!e.parentNode.parentNode)return!1;let t;if(p.log.info(`@@ REPAINTING `),!i)t=M(o,void 0,r,n);else{for(p.log.info(` ... p is `+e),t=e.firstChild;t.nextSibling&&(p.log.info(` ... checking node `+t),t.nodeName!==`table`);t=t.nextSibling);t=M(o,t,r,n)}i=!0,p.utils.ancestor(e,`TABLE`)&&p.utils.ancestor(e,`TABLE`).style.backgroundColor===`white`?t.style.backgroundColor=`#eee`:t.style.backgroundColor=`white`,p.utils.emptyNode(e).appendChild(t),y.focusTd=e,p.log.debug(`expand: Node for `+o+` expanded`);let a=x.each(o,p.ns.rdfs(`seeAlso`));for(let e=0;e<a.length;e++)e===25&&p.log.warn(`expand: Warning: many (`+a.length+`) seeAlso links for `+o),S.lookUpThing(a[e],o)}function c(e){if(arguments[3])return!0;let t=x.canon(o);p.log.info(`@@ expand: relevant subject=`+t+`, uri=`+e+`, already=`+i);let n=x.sym(g.uri.docpart(e));if(e.indexOf(`#`)>=0)throw Error(`Internal error: hash in `+e);return!function(){if(!t.uri)return!0;let r=x.uris(t);if(!r)return!1;for(let t=0;t<r.length;t++)for(let n=g.uri.docpart(r[t]);n;n=x.HTTPRedirects[n])if(e===n)return!0;return!!x.anyStatementMatching(t,void 0,void 0,n)}()||(p.log.success(`@@ expand OK: relevant subject=`+t+`, uri=`+e+`, source=`+i),s(),!1)}n.solo&&J(o),p.log.debug(`outlineExpand: dereferencing `+o);let l=_.createElement(`span`);e.appendChild(l),S.addCallback(`done`,c),S.addCallback(`fail`,c);let u=[];if(o.uri&&o.uri.split(`:`)[0]===`rdf`)s();else{for(let e=0;e<u.length;e++){let t;if(t===u[e](o)){s(),p.log.debug(`outline 1815`),t[1]&&C.removeChild(C.lastChild);return}}if(o.uri&&!a&&!p.widgets.isAudio(o)&&!p.widgets.isVideo(o)){let t=o.doc()&&o.doc().uri?o.doc().uri:``+o.doc(),r=function(e){let t=!!(o&&o.uri&&o.site&&o.site().uri===o.uri);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.`},i=function(e,t){let n=typeof e==`string`?e:String(e||``),r=t?.status||t?.response?.status;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},a=function(n,a){if(e.querySelector&&t&&e.querySelector(`[data-outline-error-for="`+t+`"]`))return;let o=i(n,a),s=o?r(o):n,c=p.widgets.errorMessageBlock(_,s,`#fee`,a instanceof Error?a:void 0);t&&c.setAttribute(`data-outline-error-for`,t),e.appendChild(c)},c=!1,l=S.nowOrWhenFetched(o.doc(),void 0,function(e,t){e?(S.lookUpThing(o),s(),n.solo&&J(o)):(c=!0,a(t,void 0))});l&&typeof l.catch==`function`&&l.catch(function(e){c||(c=!0,a(e,e))})}else s()}}function X(e,t){let n=p.utils.ancestor(e,`TR`);n=p.utils.ancestor(n.parentNode,`TR`);let r;n&&(r=n.AJAR_statement);let i;for(i=e.parentNode;i.tagName!==`TD`;i=i.parentNode)if(i===void 0){alert(`Not enclosed in TD!`);return}p.log.debug(`Collapsing subject `+t);let a;r&&(p.log.debug(`looking up pred `+r.predicate.uri+`in defaults`),a=$.defaults[r.predicate.uri]),p.log.debug(`view= `+a);let o;i.parentNode.parentNode.id===`outline`&&(o=i.parentNode),y.replaceTD(y.outlineObjectTD(t,a,o,r),i)}this.replaceTD=function(e,t){let n;L(t)&&(n=!0);for(let e=b.length-1;e>-1;e--)for(let n=b[e];n.parentNode;n=n.parentNode)n===t&&V(b[e],!1);t.parentNode.replaceChild(e,t),n&&V(e,!0)};function Z(e,t){let n=null;for(let t=e.parentNode;t;t=t.parentNode)p.log.debug(`level `+t.tagName),t.tagName===`TD`&&(n=t);p.utils.emptyNode(n).appendChild(M(t)),J(t),n.setAttribute(`about`,t.toNT())}v.outlineRefocus=Z,this.GotoFormURI_enterKey=function(e){e.keyCode===13&&v.GotoFormURI(e)},this.GotoFormURI=function(e){se(_.getElementById(`UserURI`).value)};function se(e){let t=x.sym(e);this.GotoSubject(t,!0)}let Q=0;function ce(e,t,n){let r=++Q,i=t.uri,a=n.uri.split(`#`)[0];if(!i.endsWith(`/`)||!a.startsWith(i)||a===i)return;let o=[],s=a.slice(i.length).split(`/`),c=i;s.forEach((e,t)=>{e&&(c+=t<s.length-1?e+`/`:e,o.push(c))});let l=t=>Array.from(e.querySelectorAll(`td.obj[about]`)).find(e=>e.getAttribute(`about`)===x.sym(t).toNT()),u=t=>new Promise(n=>{let i=l(t);if(i)return n(i);let a=setTimeout(()=>{o.disconnect(),n(null)},1e4),o=new MutationObserver(()=>{let e=l(t);(e||r!==Q)&&(clearTimeout(a),o.disconnect(),n(e))});o.observe(e,{childList:!0,subtree:!0})});(async()=>{for(let e of o){let t=await u(e);if(!t||r!==Q)return;(!t.firstChild||t.firstChild.nodeName!==`TABLE`)&&Y(t,x.sym(e)),e===o[o.length-1]&&typeof t.scrollIntoView==`function`&&t.scrollIntoView({block:`nearest`})}})().catch(e=>p.log.warn(`outline: could not open `+n.uri+` inside `+i+`: `+e))}this.GotoURIinit=function(e){let t=x.sym(e);this.GotoSubject(t)},this.GotoSubject=function(e,t,n,r,i,a,o){let s=d.resolveSource(o)!==`accountMenu`,c=E();s&&(!a||a===c)&&D(e),a||=c,r&&(p.utils.emptyNode(a),a.style.width=`100%`);let f=n&&n.subject&&n.subject.uri?n.subject:e;function m(){let e=_.createElement(`tr`);e.classList.add(`outlineRow1`),e.style.verticalAlign=`top`,a.appendChild(e);let t=y.outlineObjectTD(f,void 0,e);return e.appendChild(t),t}let h=m();if(r&&J(f),t&&(Y(h,f,{pane:n,solo:r,headerOnlyInViewerPod:!s||!!(n&&n.subject&&n.subject.uri)}),r&&f!==e&&ce(a,f,e)),r&&_&&_.defaultView&&_.defaultView.history){let t=_.defaultView.history.state||{},r=document.location.href!==e.uri,i=l.nextHistoryState(t,{pane:n?{name:n.name,subject:n.subject&&typeof n.subject.uri==`string`?n.subject.uri:void 0}:void 0,leavingPage:r,viaAccountMenu:!s});try{let n=new URL(document.location.href),a=new URL(e.uri,document.location.href);n.origin===a.origin&&(r?_.defaultView.history.pushState(i,e.uri,e.uri):JSON.stringify(t)!==JSON.stringify(i)&&_.defaultView.history.replaceState(i,e.uri,e.uri))}catch{}}return r&&u.announceNavigation(_),e};let $=t.propertyViews(_);function le(t){let r;if(t.termType===`Literal`){if(r=_.createElement(`span`),r.classList.add(`objectValue`,`objectValue--literal`),r.textContent=t.value,t.datatype&&t.datatype.uri){let e=p.ns.xsd(``).uri;t.datatype.uri.slice(0,e.length)===e&&r.classList.add(`objectValue--`+t.datatype.uri.slice(e.length))}}else if(t.termType===`NamedNode`||t.termType===`BlankNode`){if(r=_.createElement(`span`),r.classList.add(`objectValue`,`objectValue--resource`),r.setAttribute(`about`,t.toNT()),y.appendAccessIcons(x,r,t),t.termType===`NamedNode`){if(t.uri.slice(0,4)===`tel:`){let e=t.uri.slice(4),i=_.createElement(`a`);r.appendChild(_.createTextNode(e)),i.setAttribute(`href`,t.uri),i.appendChild(p.utils.AJARImage(n.outlineIcons.src.icon_telephone,`phone`,`phone `+e,_)),r.appendChild(i),i.firstChild.setAttribute(`class`,`phoneIcon`),i.firstChild.classList.add(`objectValueLinkIcon`)}else{r.appendChild(_.createTextNode(p.utils.label(t)));let e=p.widgets.linkIcon(_,t);e.firstChild&&e.firstChild.classList.add(`objectValueLinkIcon`),r.appendChild(e),p.widgets.makeDraggable(r,t)}}else r.appendChild(_.createTextNode(p.utils.label(t)))}else if(t.termType===`Collection`){r=_.createElement(`table`),r.classList.add(`tableFullWidth`),r.setAttribute(`about`,t.toNT());for(let e=0;e<t.elements.length;e++){let n=t.elements[e],i=r.appendChild(_.createElement(`tr`)),a=i.appendChild(_.createElement(`td`));a.classList.add(`obj`),a.setAttribute(`notSelectable`,`false`),a.setAttribute(`about`,t.toNT()),a.innerHTML=e+1+`)`,i.appendChild(y.outlineObjectTD(n))}}else t.termType===`Graph`?(r=h.byName(`dataContentPane`).statementsAsTables(t.statements,e),r.setAttribute(`class`,`nestedFormula`)):(p.log.error(`Object `+t+` has unknown term type: `+t.termType),r=_.createTextNode(`[unknownTermType:`+t.termType+`]`));return p.log.debug(`contents: `+r.innerHTML),r}return this.createTabURI=function(){_.getElementById(`UserURI`).value=_.URL+`?uri=`+_.getElementById(`UserURI`).value},this.UserInput.setSelected=V,this.UserInput.deselectAll=H,this.UserInput.views=$,this.outlineExpand=Y,this}exports.default=_;
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.obj{vertical-align:top;border:none;margin:.2em;padding:0 0 5px}.iconTD{vertical-align:top;border:none;width:0;margin:.2em;padding:0}.labelTD{width:100%}.strongHeader{margin:0 .6rem 0 0;padding:.1rem .4rem;font-size:150%}.tableFullWidth{width:100%;background:var(--color-background,#f8f9fb)!important}.placeholderTable{width:100%}.tdFlex{vertical-align:top;border-radius:5px;flex-direction:row;justify-content:space-between;display:flex;overflow:hidden}solid-ui-file-explorer-provider{flex-direction:column;gap:0;width:100%;min-width:0;height:100%;min-height:0;display:flex;overflow:hidden}solid-ui-file-explorer-provider.tdFlex{flex-direction:column;align-items:stretch}solid-ui-file-explorer-provider>solid-ui-file-explorer-header{flex:none;width:100%}solid-ui-file-explorer-provider>.paneDiv,solid-ui-file-explorer-provider>.exceptionPane{flex:auto;width:100%;min-height:0;margin:0;overflow:hidden auto}.paneDiv,.exceptionPane{box-sizing:border-box;width:100%;min-width:0;max-width:100%;display:block;overflow-x:hidden}.objectValue--literal{white-space:pre-wrap}.objectValue--integer,.objectValue--decimal,.objectValue--double{text-align:right;display:block}.objectValueAccessIcon,.objectValueLinkIcon,.phoneIcon{vertical-align:middle;display:inline-block}.objectValueLinkIcon,.phoneIcon{width:12px;height:12px}@media (width<=600px){.obj,.iconTD{vertical-align:top;font-size:100%;margin:0!important}}`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();const e=require("../_virtual/_rolldown/runtime.cjs.js");;const t=require("./propertyViews.cjs.js"),n=require("./outlineIcons.cjs.js"),r=require("./userInput.cjs.js"),i=require("./queryByExample.cjs.js"),a=require("../utils/webIdUtils.cjs.js"),o=require("../utils/podUtils.cjs.js"),s=require("../navigation/chrome.cjs.js"),c=require("../navigation/podContext.cjs.js"),l=require("../navigation/state.cjs.js"),u=require("../navigation/events.cjs.js"),d=require("../navigation/options.cjs.js"),f=require("../navigation/navbarVisibility.cjs.js"),p=require("./outlineDomHelpers.cjs.js"),m=require("./fileExplorerHelpers.cjs.js");let h=require("solid-ui");h=e.__toESM(h);let g=require("solid-logic"),_=require("pane-registry");_=e.__toESM(_);let v=require("rdflib");v=e.__toESM(v),require("solid-ui/components/file-explorer-provider"),require("solid-ui/components/file-explorer-header");let y=require("solid-ui/components/access-control-modal");y=e.__toESM(y);var b=`solid-ui-file-explorer-provider`;function x(e){let x=e.dom,S=new WeakMap,C=new WeakSet;this.document=e.dom,this.context=e,this.outlineIcons=n.outlineIcons,this.labeller=this.labeller||{},this.labeller.LanguagePreference=``;let w=this,T=this,E=[];this.selection=E,this.ancestor=h.utils.ancestor,this.sparql=v.UpdateManager,this.kb=g.store;let D=g.store,O=g.store.fetcher;x.outline=this,this.qs=new i.QuerySource,this.UserInput=new r.UserInput(this),this.clipboardAddress=`tabulator:clipboard`,this.UserInput.clipboardInit(this.clipboardAddress);let{outlineObjectDiv:k,outlinePredicateDiv:A,termWidget:j}=p.createOutlineDomHelpers({dom:x,UI:h,kb:g.store,outlineIcons:n.outlineIcons,expandMouseDownListener:se,selectableTDClickListener:fe,setSelected:G,viewAsBoringDefault:he,removeNodeIconMouseDownListener:de});this.outlineObjectDiv=k,this.outlinePredicateDiv=A,this.outlineObjectTD=k,this.outlinePredicateTD=A,this.termWidget=j,this.init=function(){let e=N();e.outline=this},this.getLayoutMode=function(){let e=this.context?.environment?.layout;if(e===`mobile`||e===`desktop`)return e;if(typeof window<`u`&&window.matchMedia){let e=Math.round(Math.min(window.innerWidth,window.visualViewport?.width||window.innerWidth)),t=window.matchMedia(`(pointer: coarse)`).matches||navigator.maxTouchPoints>0;return e<=768||t&&e<=1024?`mobile`:`desktop`}return`desktop`},M.lastkbsize=0;function M(e){let t=[];for(let e=arguments.length-1;e>0;e--)t[e-1]=arguments[e];let n=new Date().getTime(),r=e.apply(e,t),i=new Date().getTime();return h.log.info(`BENCHMARK: kb delta: `+(D.statements.length-M.lastkbsize)+`, time elapsed for `+e+` was `+(i-n)+`ms`),M.lastkbsize=D.statements.length,r}this.appendAccessIcons=function(e,t,n){if(n.termType!==`NamedNode`)return;let r=e.uris(n);r.sort();let i=null;for(let e=0;e<r.length;e++)r[e]!==i&&(i=r[e],T.appendAccessIcon(t,i))},this.appendAccessIcon=function(e,t){if(!t)return``;let r=v.uri.docpart(t);if(r.slice(0,5)!==`http:`)return``;let i=O.getState(r),a,o,s;switch(i){case`unrequested`:a=n.outlineIcons.src.icon_unrequested,o=`fetch`,s=ue;break;case`requested`:a=n.outlineIcons.src.icon_requested,o=`fetching`,s=J;break;case`fetched`:a=n.outlineIcons.src.icon_fetched,s=le,o=`loaded`;break;case`failed`:a=n.outlineIcons.src.icon_failed,o=`failed`,s=J;break;case`unpermitted`:a=n.outlineIcons.src.icon_failed,s=J,o=`no perm`;break;case`unfetchable`:a=n.outlineIcons.src.icon_failed,s=J,o=`cannot fetch`;break;default:h.log.error(`?? state = `+i)}let c=h.utils.AJARImage(a,o,n.outlineIcons.tooltips[a].replace(/[Tt]his resource/,r),x);return c.classList.add(`objectValueAccessIcon`),c.setAttribute(`uri`,t),c.addEventListener(`click`,s),oe(c,r),e.appendChild(c),c};function N(){return te(`OutlineView`,`Resource browser`)}function ee(e){f.refreshNavbarVisibility(e.uri).catch(e=>h.log.error(`Failed to update navbar visibility: `+e))}function te(e){if(e===`OutlineView`){let e=document.getElementById(`OutlineView`);if(e)return e;let t=document.getElementById(`MainContent`)||document.body;if(t){let e=document.createElement(`div`);return e.id=`OutlineView`,e.classList.add(`outline-view`),e.setAttribute(`aria-label`,`Resource browser`),t.appendChild(e),e}}}async function P(e,t){return e.uri.endsWith(`/`)&&await o.loadContainerRepresentation(e),h.getRelevantPanes(e,t,{excludedPaneNames:[`sharing`],fallbackPaneName:`internal`})}function ne(e,t){return e.find(e=>e.shouldGetFocus&&e.shouldGetFocus(t))||e[0]}function F(e){let t=x.getElementById(`queryButton`);t&&(e?t.removeAttribute(`style`):t.setAttribute(`style`,`display:none;`))}function I(t,n,r,i){if(!t||!r)return;let a;try{h.log.info(`outline: Rendering pane (menu): `+r.name),a=r.render(n,e,i)}catch(e){a=x.createElement(`div`),a.setAttribute(`class`,`exceptionPane`);let t=x.createElement(`pre`);a.appendChild(t),t.appendChild(x.createTextNode(h.utils.stackString(e)))}R(t,n,r,a)}function L(e,t,n){n?(F(!!n.requireQueryButton),e.pane=n,I(e,t,n,S.get(e)?.options||{})):h.log.warn(`outline: Unable to open pane in place: pane is undefined.`)}function R(t,n,r,i){let a=S.get(t);h.composeExplorer(t,{context:e,subjectUri:n.uri,pane:r,relevantPanes:t.relevantPanes||[],header:a&&s.explorerHeaderForPane(a.showHeader,r?.name)?{paneIcon:m.getPaneIcon(r,n,e),menuItems:a.menuItems}:void 0,paneElement:i})}async function re(t,n,r,i){r||={},i||=x.createElement(b);let o={generation:(S.get(i)?.generation||0)+1,menuItems:[],options:r};S.set(i,o),i.classList.add(`paneView`,`tdFlex`),i.setAttribute(`notSelectable`,`true`),i.setAttribute(`role`,`grid`),i.setAttribute(`about`,t.toNT()),r.hover&&i.classList.add(`hoverControl`),i.context=e,i.subjectUri=t.uri,i.soloPane=r.solo,C.has(i)||(i.addEventListener(h.FILE_EXPLORER_BACK_EVENT,e=>{h.isExplorerEvent(e,i)&&(e.stopPropagation(),ce({target:i}))}),i.addEventListener(h.FILE_EXPLORER_MANAGE_ACCESS_EVENT,e=>{e.stopPropagation();let t=v.sym(e.detail.subjectUri).doc();g.solidLogicSingleton.acl.findAccessGrants(t).then(e=>{h.showDialog(y.default,{props:{subjectUri:t.uri,accessGrants:e}})}).catch(e=>{h.log.error(`outline: Failed to open access controls: `+h.utils.stackString(e))})}),i.addEventListener(h.FILE_EXPLORER_OPEN_PANE_EVENT,t=>{if(!h.isExplorerEvent(t,i))return;t.stopPropagation();let n=e.session.paneRegistry.byName(t.detail.paneName);L(i,v.sym(t.detail.subjectUri),n)}),C.add(i));let l=r.hideList?[]:await P(t,e);if(S.get(i)!==o)return i;let u=e.session.logic?.resource||g.solidLogicSingleton.resource,d=t.uri.endsWith(`/`)?v.sym(`${t.uri}index.ttl`):null;if(r.solo&&!n&&d&&(typeof u?.containerHasIndexDocument==`function`&&u.containerHasIndexDocument(t)||D.holds(t,h.ns.ldp(`contains`),d,t.doc()))){if(t=typeof u?.getContainerIndexThing==`function`?u.getContainerIndexThing(t):v.sym(`${d.uri}#this`),await D.fetcher.load(t.doc()),l=await P(t,e),S.get(i)!==o)return i;i.subjectUri=t.uri,i.setAttribute(`about`,t.toNT())}i.relevantPanes=l,i.pane=n||ne(l,t);let f=!!(t&&t.uri&&t.site&&t.site().uri===t.uri),p=!!r.headerOnlyInViewerPod,w=!t.uri.endsWith(`/index.ttl#this`)&&s.deriveExplorerHeader({isRootResource:f,isWebId:a.isWebIdUri(t),viewerPodOnly:p,inViewerPod:!p||await c.isPageInViewerPod(x.location.href)});if(S.get(i)!==o)return i;if(o.showHeader=w,i.paneRenderOptions=r,i.soloPane=r.solo,i.openPane=(e,t)=>L(i,e,_.byName(t)),i.handleAccessClick=async()=>{try{let e=t.doc(),n=await g.solidLogicSingleton.acl.findAccessGrants(e);h.showDialog(y.default,{props:{subjectUri:e.uri,accessGrants:n}})}catch(e){h.log.error(`outline: Failed to open access controls: `+h.utils.stackString(e))}},i.pane?I(i,t,i.pane,r):R(i,t,i.pane),w){let n=await m.getPaneItems(t,e,l,(e,t)=>{i.dispatchEvent(new CustomEvent(h.FILE_EXPLORER_OPEN_PANE_EVENT,{bubbles:!0,composed:!0,detail:{subjectUri:e.uri,paneName:t}}))});S.get(i)===o&&(o.menuItems=n,R(i,t,i.pane))}return i}function ie(e){let t=e.parentNode,n=t.parentNode,r=x.createElement(`div`);n.replaceChild(r,t),t.removeChild(e),n.replaceChild(t,r)}let z=this.propertyTable=function(e,t,n,r){h.log.debug(`Property block for: `+e),e=D.canon(e);let i=t?t.matches?.(b)?t:t.firstElementChild||t:x.createElement(b);return re(e,n,r,i).catch(e=>{h.log.error(`outline: Failed to set up file explorer: `+h.utils.stackString(e))}),t&&h.log.info(`Re-expand: `+t),t||i};function B(e,t,n){let r=e.createElement(`div`);r.AJAR_statement=t,r.AJAR_inverse=n,r.setAttribute(`predTR`,`true`),r.setAttribute(`role`,`row`);let i=T.outlinePredicateDiv(t.predicate,r,n);return r.appendChild(i),r}this.propertyTR=B;function ae(e,t,n,r){if(h.log.debug(`Property list length = `+t.length),t.length===0)return``;let i,a,o;n?(i=function(e){return e.subject},t=t.sort(h.utils.RDFComparePredicateSubject)):(i=function(e){return e.object},t=t.sort(h.utils.RDFComparePredicateObject));let s=t.length;for(a=0;a<s;a++){let c=t[a];if(r&&!r(c.predicate,n))continue;let l=B(x,c,n);e.appendChild(l);let u=l.firstChild,d=$.defaults[c.predicate.uri],f=0,p=0,m=0;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&&w.labeller.LanguagePreference&&(p+=1,i(t[a+o]).lang.indexOf(w.labeller.LanguagePreference)>=0&&m++);if(m>0&&p===f+1){for(let e=a;e<=a+f;e++)if(w.labeller.LanguagePreference&&i(t[e]).lang.indexOf(w.labeller.LanguagePreference)>=0){l.appendChild(T.outlineObjectDiv(i(t[e]),d,void 0,c));break}a+=f}else l.appendChild(T.outlineObjectDiv(i(c),d,void 0,c)),l.showNobj=function(r){let s=o-f,l=2*r<s?r:s,p=[];if(s!==1){u.setAttribute(`rowspan`,l===s?s:r+1);let f;l<s&&l===1&&u.setAttribute(`rowspan`,2);let m=0;for(f=1;f<o;f++)if(D.canon(i(t[a+f])).sameTerm(D.canon(i(t[a+f-1]))))h.log.info(`there are duplicates here: %s`,t[a+f-1]);else{m++,c=t[a+f],d=$.defaults[c.predicate.uri];let r=x.createElement(`div`);r.style.colspan=`1`,r.appendChild(T.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))}l===s&&u.setAttribute(`rowspan`,m+1)}if(l<s){let t=x.createElement(`div`),n=t.appendChild(x.createElement(`div`));if(n.setAttribute(`style`,`margin: 0.2em; border: none; padding: 0; vertical-align: top;`),n.classList.add(`obj`),n.setAttribute(`notSelectable`,`false`),s>r){let e=x.createElement(`a`);n.appendChild(e);let t=(function(e){return e(u,o,f,r)})(function(t,n,r,i){return function(n){e.innerHTML=``,n===`none`?(e.appendChild(h.utils.AJARImage(h.icons.originalIconBase+`tbl-more-trans.png`,`more`,`See all`,x)),e.appendChild(x.createTextNode(s-i+` more...`)),t.setAttribute(`rowspan`,i+1)):(e.appendChild(h.utils.AJARImage(h.icons.originalIconBase+`tbl-shrink.png`,`(less)`,void 0,x)),t.setAttribute(`rowspan`,s+1));for(let e=0;e<p.length;e++){let t=p[e];t.style.display=n}}}),i=`none`,a=function(e){return t(i),i=i===`none`?``:`none`,e&&e.stopPropagation(),!1};a(),e.addEventListener(`click`,a,!1)}e.appendChild(t)}},l.showAllobj=function(){l.showNobj(o-f)},l.showNobj(10),a+=o-1}}this.appendPropertyTRs=ae;function oe(e,t){h.log.debug(`Button callbacks for `+t+` added`);let r=function(r){return function(i){return i.indexOf(`#`),!e||!w.ancestor(e,`DIV`)?!1:(i===t&&(e.src=r,e.title=n.outlineIcons.tooltips[r]),!0)}};O.addCallback(`request`,r(n.outlineIcons.src.icon_requested)),O.addCallback(`done`,r(n.outlineIcons.src.icon_fetched)),O.addCallback(`fail`,r(n.outlineIcons.src.icon_failed))}function V(e){let t=e.getAttribute(`class`);return!!(t&&t.indexOf(`selected`)>=0)}function H(e){let t=T.targetOf(e).parentNode;j.replaceIcon(t.parentNode,n.outlineIcons.termWidgets.optOn,n.outlineIcons.termWidgets.optOff,U),t.parentNode.parentNode.removeAttribute(`optional`)}function U(e){let t=T.targetOf(e).parentNode;j.replaceIcon(t.parentNode,n.outlineIcons.termWidgets.optOff,n.outlineIcons.termWidgets.optOn,H),t.parentNode.parentNode.setAttribute(`optional`,`true`)}function W(e,t){let r=n.outlineIcons.termWidgets.optOn,i=n.outlineIcons.termWidgets.optOff,a=e=>!(!e||typeof e.getAttribute!=`function`||e.getAttribute(`predTR`)!==`true`&&e.getAttribute(`data-outline-node`)!==`predicate`);for(let n=e;n.parentNode;n=n.parentNode)for(;;)if(a(n)){let e=n.getAttribute(`parentOfSelected`);e=e?parseInt(e):0,e===0&&t>0&&j.addIcon(n.childNodes[0],n.getAttribute(`optional`)?r:i,n.getAttribute(`optional`)?H:U),e+=t,n.setAttribute(`parentOfSelected`,e),e===0&&(n.removeAttribute(`parentOfSelected`),j.removeIcon(n.childNodes[0],n.getAttribute(`optional`)?r:i));break}else if(n.previousElementSibling)n=n.previousElementSibling;else break}this.statusBarClick=function(e){let t=h.utils.getTarget(e);t.label&&(window.content.location=t.label)},this.showURI=function(e){e&&x.getElementById(`UserURI`)&&(x.getElementById(`UserURI`).value=e.termType===`NamedNode`?e.uri:``)},this.showSource=function(){if(typeof sourceWidget<`u`){for(let e in sourceWidget.sources)sourceWidget.sources[e].setAttribute(`class`,``);for(let e=0;e<E.length;e++){if(!E[e].parentNode)continue;let t=E[e].parentNode.AJAR_statement;if(!t)continue;let n=t.why;n&&n.uri&&sourceWidget.highlight(n,!0)}}},this.getSelection=function(){return E};function G(e,t){if(e.nodeName!==`TD`&&e.nodeName!==`DIV`)throw h.log.debug(`down`+e.nodeName),Error(`Expected TD or DIV in setSelected: `+e.nodeName+` : `+e.textContent);h.log.debug(`pass`);let r=e.getAttribute(`class`);if(r||=``,t){r+=` selected`,(r.indexOf(`pred`)>=0||r.indexOf(`obj`)>=0)&&W(e,1),E.push(e);let t=h.utils.getTerm(e);T.showURI(t);let i=e.AJAR_statement;if(i===void 0&&e.parentNode&&(i=e.parentNode.AJAR_statement),i){let t=i.why;g.store.updater.editable(t.uri,D)&&r.indexOf(`pred`)>=0&&j.addIcon(e,n.outlineIcons.termWidgets.addTri)}}else h.log.debug(`cla=$`+r+`$`),r===`selected`&&(r=``),r=r.replace(` selected`,``),(r.indexOf(`pred`)>=0||r.indexOf(`obj`)>=0)&&W(e,-1),r.indexOf(`pred`)>=0&&j.removeIcon(e,n.outlineIcons.termWidgets.addTri),E=E.filter(function(t){return t===e}),h.log.info(`Deselecting `+e.textContent);typeof sourceWidget<`u`&&T.showSource(),e.setAttribute(`class`,r)}function K(){let e=E.length;for(let t=e-1;t>=0;t--)G(E[t],!1);E=[]}this.targetOf=function(e){let t;if(e||=window.event,e.target)t=e.target;else if(e.srcElement)t=e.srcElement;else return h.log.error(`can't get target for event `+e),!1;return t.nodeType===3&&(t=t.parentNode),t},this.walk=function(e,t){let n=t||E[0],r;switch(e){case`down`:try{r=n.parentNode.nextSibling.lastChild}catch{this.walk(`up`);return}K(),G(r,!0);break;case`up`:try{r=n.parentNode.previousSibling.lastChild}catch{return}K(),G(r,!0);break;case`right`:{let e=n.matches?.(b)?n:n.querySelector?.(b),t=e?.querySelector?.(`[data-outline-node="object"]`);if(e){t&&(K(),G(t,!0));return}}if(K(),n.nextSibling||n.lastChild.tagName===`strong`)G(n.nextSibling,!0);else{let e=n.parentNode&&n.parentNode.nextSibling,t=e?e.lastChild:null;if(!t){G(n,!0);return}G(t,!0)}break;case`left`:if(K(),n.previousSibling&&n.previousSibling.className===`undetermined`)return G(n.previousSibling,!0),!0;G(q(n)?.block||n.parentNode&&n.parentNode.firstChild,!0);break;case`moveTo`:K(),G(t,!0)}e!==`down`&&e!==`up`||r.tabulatorSelect||this.walk(e)},this.OutlinerKeypressPanel=function(e){h.log.info(`Key `+e.keyCode+` pressed`);function t(e){e&&x.getElementById(`UserURI`)&&(x.getElementById(`UserURI`).value=e.termType===`NamedNode`?e.uri:``)}function n(e){return arguments[3]||(o(`right`,a),t(h.utils.getAbout(D,E[0]))),!0}let r,i;if(h.utils.getTarget(e).tagName===`TEXTAREA`||h.utils.getTarget(e).id===`UserURI`||E.length>1)return;if(E.length===0){(e.keyCode===13||e.keyCode===38||e.keyCode===40||e.keyCode===37||e.keyCode===39)&&(this.walk(`right`,T.focusTd),t(h.utils.getAbout(D,E[0])));return}let a=E[0];switch(O.removeCallback(`done`,`setSelectedAfterward`),O.removeCallback(`fail`,`setSelectedAfterward`),e.keyCode){case 13:if(h.utils.getTarget(e).tagName===`HTML`){let e=h.utils.getAbout(D,a);r=a.parentNode.AJAR_statement.why,i=g.store.updater.editable(r.uri,D),e?w.GotoSubject(e,!0):i&&T.UserInput.Enter(a)}else this.UserInput.Keypress(e),this.walk(`down`),e.stopPropagation();return;case 38:this.walk(`up`),e.stopPropagation(),e.preventDefault();break;case 40:this.walk(`down`),e.stopPropagation(),e.preventDefault()}if(h.utils.getTarget(e).tagName===`INPUT`)return;let o;switch(e.keyCode){case 46:case 8:r=a.parentNode.AJAR_statement.why,i=g.store.updater.editable(r.uri,D),i&&(e.preventDefault(),this.UserInput.Delete(a));break;case 37:{if(this.walk(`left`))return;let e=q(a);if(!e)break;let t=h.utils.getAbout(D,e.provider);t&&Z(e.block,t);break}case 39:{let e=h.utils.getAbout(D,a);if(e){if(o=this.walk,a.nextSibling){this.walk(`right`);return}a.firstElementChild?.matches(b)||(O.addCallback(`done`,n),O.addCallback(`fail`,n),X(a,e,{pane:_.byName(`defaultPane`)})),n()}}break;case 38:case 40:break;default:switch(e.charCode){case 99:if(e.ctrlKey){T.UserInput.copyToClipboard(T.clipboardAddress,a);break}break;case 118:case 112:if(e.ctrlKey){T.UserInput.pasteFromClipboard(T.clipboardAddress,a);break}break;default:h.utils.getTarget(e).tagName}}t(h.utils.getAbout(D,E[0]))},this.OutlinerMouseclickPanel=function(e){switch(T.UserInput._tabulatorMode){case 0:pe(e);break;case 1:T.UserInput.Click(e)}};function se(e){let t=T.targetOf(e),n,r;for(let e=t;e&&e!==x;e=e.parentNode)e.matches?.(`[data-outline-node="object"]`)&&(n=e),e.matches?.(`.outline-subject-block`)&&(r=e);let i=r||n||t.parentNode,a=h.utils.getAbout(D,t),o=e.altKey?_.byName(`internal`):void 0;e.shiftKey?Q(i,a,o):e.altKey?X(i,a,{pane:_.byName(`internal`),immediate:!0}):X(i,a)}function ce(e){let t=T.targetOf(e),n=e.altKey?_.byName(`internal`):void 0,r=q(t);if(!r)return;let i=h.utils.getAbout(D,r.provider);i&&Z(r.block,i,n)}function q(e){for(let t=e;t&&t!==x;t=t.parentNode){if(t.matches?.(`[data-outline-node="object"]`)){let e=t.querySelector?.(b);if(e)return{block:t,provider:e}}if(t.matches?.(b))return{block:t.closest?.(`[data-outline-node="object"]`)||t.closest?.(`.outline-subject-block`)||t,provider:t}}return null}function J(e){let t=T.targetOf(e).getAttribute(`uri`);e.altKey?O.fetch(v.uri.docpart(t),{force:!0}):O.refresh(D.sym(v.uri.docpart(t)))}function le(e){let t=T.targetOf(e).getAttribute(`uri`);e.altKey?O.fetch(v.uri.docpart(t),{force:!0}):O.refresh(D.sym(v.uri.docpart(t)))}function ue(e){let t=T.targetOf(e).getAttribute(`uri`);O.fetch(v.uri.docpart(t))}function de(e){let t=T.targetOf(e),n=t.node;n.childNodes.length>1&&(n=t.parentNode),ie(n)}function fe(e){if(T.UserInput._tabulatorMode)return T.UserInput.Click(e);let t=T.targetOf(e),n;for(n=h.utils.ancestor(t,`td`)||h.utils.ancestor(t,`tr`)||h.utils.ancestor(t,`div`);n&&n.getAttribute(`notSelectable`)!==`false`;n=h.utils.ancestor(n.parentNode,`td`)||h.utils.ancestor(n.parentNode,`tr`)||h.utils.ancestor(n.parentNode,`div`));if(!n)return;let r=V(n);if(h.log.debug(`Was node selected before: `+r),e.altKey)G(n,!V(n));else if(e.shiftKey)G(n,!0);else{if(K(),T.UserInput.clearInputAndSave(e),G(n,!0),e.detail===2){e.stopPropagation();return}let t;if(n.parentNode&&(t=n.parentNode.AJAR_statement),!t)return;let i=t.why,a=g.store.updater.editable(i.uri,D);r&&a&&T.UserInput.Click(e,E[0])}h.log.debug(`Was node selected after: `+V(n)+`, count=`+E.length),e.stopPropagation()}function pe(e){h.log.info(`@TabulatorMousedown, dom.location is now `+x.location);let t=T.targetOf(e);if(!t)return;let r=t.tagName;r!==`INPUT`&&r!==`TEXTAREA`&&(T.UserInput.clearMenu(),T.UserInput.lastModified&&T.UserInput.lastModified.parentNode.nextSibling&&T.UserInput.backOut(),(!t.src||t.src.slice(t.src.indexOf(`/icons/`)+1)!==n.outlineIcons.src.icon_show_choices&&t.src.slice(t.src.indexOf(`/icons/`)+1)!==n.outlineIcons.src.icon_add_triple)&&T.UserInput.clearInputAndSave(e),t.src&&t.src.slice(t.src.indexOf(`/icons/`)+1)===n.outlineIcons.src.icon_show_choices||T.UserInput.clearMenu(),e&&e.stopPropagation())}function Y(e){x.title=h.utils.label(e),x.location.href.startsWith(e.site().uri)}function X(e,t,n){n||={};let r=n.pane,i=!!n.already,a=n.immediate;h.log.info(`@outlineExpand, dom is now `+x.location),O.removeCallback(`done`,`expand`),O.removeCallback(`fail`,`expand`);let o=D.canon(t);function s(){if(o=D.canon(o),!e||!e.parentNode||!e.parentNode.parentNode)return!1;let t;h.log.info(`@@ REPAINTING `),t=i?z(o,e,r,n):z(o,void 0,r,n),i=!0,t!==e&&h.utils.emptyNode(e).appendChild(t),T.focusTd=e,h.log.debug(`expand: Node for `+o+` expanded`);let a=D.each(o,h.ns.rdfs(`seeAlso`));for(let e=0;e<a.length;e++)e===25&&h.log.warn(`expand: Warning: many (`+a.length+`) seeAlso links for `+o),O.lookUpThing(a[e],o)}function c(e){if(arguments[3])return!0;let t=D.canon(o);h.log.info(`@@ expand: relevant subject=`+t+`, uri=`+e+`, already=`+i);let n=D.sym(v.uri.docpart(e));if(e.indexOf(`#`)>=0)throw Error(`Internal error: hash in `+e);return!function(){if(!t.uri)return!0;let r=D.uris(t);if(!r)return!1;for(let t=0;t<r.length;t++)for(let n=v.uri.docpart(r[t]);n;n=D.HTTPRedirects[n])if(e===n)return!0;return!!D.anyStatementMatching(t,void 0,void 0,n)}()||(h.log.success(`@@ expand OK: relevant subject=`+t+`, uri=`+e+`, source=`+i),s(),!1)}n.solo&&Y(o),h.log.debug(`outlineExpand: dereferencing `+o);let l=x.createElement(`span`);if(e.appendChild(l),O.addCallback(`done`,c),O.addCallback(`fail`,c),o.uri&&o.uri.split(`:`)[0]===`rdf`)s();else if(o.uri&&!a&&!h.widgets.isAudio(o)&&!h.widgets.isVideo(o)){let t=o.doc()&&o.doc().uri?o.doc().uri:``+o.doc(),r=function(e){let t=!!(o&&o.uri&&o.site&&o.site().uri===o.uri);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.`},i=function(e,t){let n=typeof e==`string`?e:String(e||``),r=t?.status||t?.response?.status;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},a=function(n,a){if(e.querySelector&&t&&e.querySelector(`[data-outline-error-for="`+t+`"]`))return;let o=i(n,a),s=o?r(o):n,c=h.widgets.errorMessageBlock(x,s,`#fee`,a instanceof Error?a:void 0);t&&c.setAttribute(`data-outline-error-for`,t),e.appendChild(c)},c=!1,l=O.nowOrWhenFetched(o.doc(),void 0,function(e,t){e?(O.lookUpThing(o),s(),n.solo&&Y(o)):(c=!0,a(t,void 0))});l&&typeof l.catch==`function`&&l.catch(function(e){c||(c=!0,a(e,e))})}else s()}function Z(e,t){let n=e.AJAR_statement||e.parentNode&&e.parentNode.AJAR_statement;h.log.debug(`Collapsing subject `+t);let r;n&&(h.log.debug(`looking up pred `+n.predicate.uri+`in defaults`),r=$.defaults[n.predicate.uri]),h.log.debug(`view= `+r);let i;e.parentNode&&e.parentNode.id===`outline`&&(i=e),T.replaceTD(T.outlineObjectDiv(t,r,i,n),e)}this.replaceTD=function(e,t){let n;V(t)&&(n=!0);for(let e=E.length-1;e>-1;e--)for(let n=E[e];n.parentNode;n=n.parentNode)n===t&&G(E[e],!1);t.parentNode.replaceChild(e,t),n&&G(e,!0)};function Q(e,t){h.utils.emptyNode(e).appendChild(z(t)),Y(t),e.setAttribute(`about`,t.toNT())}w.outlineRefocus=Q,this.GotoFormURI_enterKey=function(e){e.keyCode===13&&w.GotoFormURI(e)},this.GotoFormURI=function(e){me(x.getElementById(`UserURI`).value)};function me(e){let t=D.sym(e);this.GotoSubject(t,!0)}this.GotoURIinit=function(e){let t=D.sym(e);this.GotoSubject(t)},this.GotoSubject=function(e,t,n,r,i,a,o){let s=d.resolveSource(o)!==`accountMenu`,c=N();s&&(!a||a===c)&&ee(e);let f=a||c;r&&(f.style.width=`100%`,h.utils.emptyNode(f));let p=n&&n.subject&&n.subject.uri?n.subject:e;function m(){let e=x.createElement(`div`);e.classList.add(`outline-subject-block`);let t=T.outlineObjectDiv(p,void 0,e);return e.appendChild(t),f.appendChild(e),e}let g=r?m():f;if(r&&Y(p),t?X(g,p,{pane:n,solo:r,headerOnlyInViewerPod:!s||!!(n&&n.subject&&n.subject.uri)}):r||m(),r&&x&&x.defaultView&&x.defaultView.history){let t=x.defaultView.history.state||{},r=document.location.href!==e.uri,i=l.nextHistoryState(t,{pane:n?{name:n.name,subject:n.subject&&typeof n.subject.uri==`string`?n.subject.uri:void 0}:void 0,leavingPage:r,viaAccountMenu:!s});try{let n=new URL(document.location.href),a=new URL(e.uri,document.location.href);n.origin===a.origin&&(r?x.defaultView.history.pushState(i,e.uri,e.uri):JSON.stringify(t)!==JSON.stringify(i)&&x.defaultView.history.replaceState(i,e.uri,e.uri))}catch{}}return r&&u.announceNavigation(x),e};let $=t.propertyViews(x);function he(t){let r;if(t.termType===`Literal`){if(r=x.createElement(`span`),r.classList.add(`objectValue`,`objectValue--literal`),r.textContent=t.value,t.datatype&&t.datatype.uri){let e=h.ns.xsd(``).uri;t.datatype.uri.slice(0,e.length)===e&&r.classList.add(`objectValue--`+t.datatype.uri.slice(e.length))}}else if(t.termType===`NamedNode`||t.termType===`BlankNode`){if(r=x.createElement(`span`),r.classList.add(`objectValue`,`objectValue--resource`),r.setAttribute(`about`,t.toNT()),T.appendAccessIcons(D,r,t),t.termType===`NamedNode`){if(t.uri.slice(0,4)===`tel:`){let e=t.uri.slice(4),i=x.createElement(`a`);r.appendChild(x.createTextNode(e)),i.setAttribute(`href`,t.uri),i.appendChild(h.utils.AJARImage(n.outlineIcons.src.icon_telephone,`phone`,`phone `+e,x)),r.appendChild(i),i.firstChild.setAttribute(`class`,`phoneIcon`),i.firstChild.classList.add(`objectValueLinkIcon`)}else{r.appendChild(x.createTextNode(h.utils.label(t)));let e=h.widgets.linkIcon(x,t);e.firstChild&&e.firstChild.classList.add(`objectValueLinkIcon`),r.appendChild(e),h.widgets.makeDraggable(r,t)}}else r.appendChild(x.createTextNode(h.utils.label(t)))}else if(t.termType===`Collection`){r=x.createElement(`div`),r.setAttribute(`about`,t.toNT());for(let e=0;e<t.elements.length;e++){let n=t.elements[e],i=r.appendChild(x.createElement(`div`)),a=i.appendChild(x.createElement(`div`));a.classList.add(`obj`),a.setAttribute(`notSelectable`,`false`),a.setAttribute(`about`,t.toNT()),a.innerHTML=e+1+`)`,i.appendChild(T.outlineObjectDiv(n))}}else t.termType===`Graph`?(r=_.byName(`dataContentPane`).statementsAsTables(t.statements,e),r.setAttribute(`class`,`nestedFormula`)):(h.log.error(`Object `+t+` has unknown term type: `+t.termType),r=x.createTextNode(`[unknownTermType:`+t.termType+`]`));return h.log.debug(`contents: `+r.innerHTML),r}return this.createTabURI=function(){x.getElementById(`UserURI`).value=x.URL+`?uri=`+x.getElementById(`UserURI`).value},this.UserInput.setSelected=G,this.UserInput.deselectAll=K,this.UserInput.views=$,this.outlineExpand=X,this}exports.default=x;
2
2
  //# sourceMappingURL=manager2.cjs.js.map