solid-panes 5.1.0-3 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/RDFXMLPane.d.ts.map +1 -1
- package/dist/RDFXMLPane2.cjs.js +1 -1
- package/dist/RDFXMLPane2.cjs.js.map +1 -1
- package/dist/RDFXMLPane2.esm.js +3 -3
- package/dist/RDFXMLPane2.esm.js.map +1 -1
- package/dist/components/editor-card/EditorCard.cjs.js +2 -2
- package/dist/components/editor-card/EditorCard.cjs.js.map +1 -1
- package/dist/components/editor-card/EditorCard.d.ts +2 -0
- package/dist/components/editor-card/EditorCard.d.ts.map +1 -1
- package/dist/components/editor-card/EditorCard.esm.js +68 -43
- package/dist/components/editor-card/EditorCard.esm.js.map +1 -1
- package/dist/components/editor-card/EditorCard.styles.cjs.js.map +1 -1
- package/dist/components/editor-card/EditorCard.styles.esm.js.map +1 -1
- package/dist/components/header/Header.cjs.js.map +1 -1
- package/dist/components/header/Header.esm.js.map +1 -1
- package/dist/components/header/Header.styles.cjs.js.map +1 -1
- package/dist/components/header/Header.styles.esm.js.map +1 -1
- package/dist/components/navbar/Navbar.cjs.js.map +1 -1
- package/dist/components/navbar/Navbar.esm.js.map +1 -1
- package/dist/components/navbar/Navbar.styles.cjs.js.map +1 -1
- package/dist/components/navbar/Navbar.styles.esm.js.map +1 -1
- package/dist/components/profile-heading/ProfileHeading.cjs.js +4 -4
- package/dist/components/profile-heading/ProfileHeading.cjs.js.map +1 -1
- package/dist/components/profile-heading/ProfileHeading.d.ts +4 -0
- package/dist/components/profile-heading/ProfileHeading.d.ts.map +1 -1
- package/dist/components/profile-heading/ProfileHeading.esm.js +123 -107
- package/dist/components/profile-heading/ProfileHeading.esm.js.map +1 -1
- package/dist/components/profile-heading/ProfileHeading.styles.cjs.js.map +1 -1
- package/dist/components/profile-heading/ProfileHeading.styles.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.cjs.js +19 -19
- package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.esm.js +86 -86
- package/dist/components/profile-heading/editor/sections/heading/HeadingEditDialog.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/heading/dateHelpers.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/heading/dateHelpers.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/heading/imageHelpers.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/heading/imagePreview.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/heading/mutations.cjs.js +1 -1
- package/dist/components/profile-heading/editor/sections/heading/mutations.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/heading/mutations.esm.js +61 -61
- package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/shared/contactTypeUtils.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/shared/idNodeFactory.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/shared/phoneCountries.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/shared/phoneCountries.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/shared/rdfMutationHelpers.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/shared/rowState.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/shared/rowState.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/sections/shared/sanitizeUtils.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/textUtils.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/textUtils.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/texts/dialogTexts.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/texts/dialogTexts.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/texts/messageTexts.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/texts/messageTexts.esm.js.map +1 -1
- package/dist/components/profile-heading/editor/ui/dialog2.cjs.js +1 -1
- package/dist/components/profile-heading/editor/ui/dialog2.cjs.js.map +1 -1
- package/dist/components/profile-heading/editor/ui/dialog2.esm.js +1 -1
- package/dist/components/profile-heading/editor/ui/dialog2.esm.js.map +1 -1
- package/dist/components/profile-heading/friendActions.cjs.js +1 -1
- package/dist/components/profile-heading/friendActions.cjs.js.map +1 -1
- package/dist/components/profile-heading/friendActions.esm.js +5 -5
- package/dist/components/profile-heading/profileHeadingData.cjs.js.map +1 -1
- package/dist/components/resource-action-dialog/ResourceActionDialog.cjs.js +33 -0
- package/dist/components/resource-action-dialog/ResourceActionDialog.cjs.js.map +1 -0
- package/dist/components/resource-action-dialog/ResourceActionDialog.d.ts +16 -0
- package/dist/components/resource-action-dialog/ResourceActionDialog.d.ts.map +1 -0
- package/dist/components/resource-action-dialog/ResourceActionDialog.esm.js +309 -0
- package/dist/components/resource-action-dialog/ResourceActionDialog.esm.js.map +1 -0
- package/dist/components/resource-action-dialog/ResourceActionDialog.styles.cjs.js +2 -0
- package/dist/components/resource-action-dialog/ResourceActionDialog.styles.cjs.js.map +1 -0
- package/dist/components/resource-action-dialog/ResourceActionDialog.styles.esm.js +6 -0
- package/dist/components/resource-action-dialog/ResourceActionDialog.styles.esm.js.map +1 -0
- package/dist/dataContentPane.d.ts.map +1 -1
- package/dist/dataContentPane2.cjs.js +1 -1
- package/dist/dataContentPane2.cjs.js.map +1 -1
- package/dist/dataContentPane2.esm.js +90 -78
- package/dist/dataContentPane2.esm.js.map +1 -1
- package/dist/humanReadablePane.d.ts +1 -0
- package/dist/humanReadablePane.d.ts.map +1 -1
- package/dist/humanReadablePane2.cjs.js +147 -15
- package/dist/humanReadablePane2.cjs.js.map +1 -1
- package/dist/humanReadablePane2.esm.js +281 -114
- package/dist/humanReadablePane2.esm.js.map +1 -1
- package/dist/imagePane.d.ts.map +1 -1
- package/dist/imagePane2.cjs.js +1 -1
- package/dist/imagePane2.cjs.js.map +1 -1
- package/dist/imagePane2.esm.js +9 -7
- package/dist/imagePane2.esm.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3 -3
- package/dist/internal/internalPane.d.ts.map +1 -1
- package/dist/internal/internalPane2.cjs.js +1 -1
- package/dist/internal/internalPane2.cjs.js.map +1 -1
- package/dist/internal/internalPane2.esm.js +55 -60
- package/dist/internal/internalPane2.esm.js.map +1 -1
- package/dist/mainPage/header.cjs.js +1 -1
- package/dist/mainPage/header.esm.js +2 -2
- package/dist/mainPage/index.cjs.js +1 -1
- package/dist/mainPage/index.cjs.js.map +1 -1
- package/dist/mainPage/index.d.ts.map +1 -1
- package/dist/mainPage/index.esm.js +35 -26
- package/dist/mainPage/index.esm.js.map +1 -1
- package/dist/mainPage/navbar.cjs.js +1 -1
- package/dist/mainPage/navbar.cjs.js.map +1 -1
- package/dist/mainPage/navbar.esm.js +15 -15
- package/dist/mainPage/navigation.cjs.js +1 -1
- package/dist/mainPage/navigation.cjs.js.map +1 -1
- package/dist/mainPage/navigation.esm.js +4 -4
- package/dist/mainPage/profileHeading.d.ts.map +1 -1
- package/dist/mainPage/profileHeading2.cjs.js +1 -1
- package/dist/mainPage/profileHeading2.cjs.js.map +1 -1
- package/dist/mainPage/profileHeading2.esm.js +14 -14
- package/dist/mainPage/profileHeading2.esm.js.map +1 -1
- package/dist/n3Pane.d.ts.map +1 -1
- package/dist/n3Pane2.cjs.js +1 -1
- package/dist/n3Pane2.cjs.js.map +1 -1
- package/dist/n3Pane2.esm.js +1 -1
- package/dist/n3Pane2.esm.js.map +1 -1
- package/dist/navigation/browserEvents.cjs.js +1 -1
- package/dist/navigation/browserEvents.cjs.js.map +1 -1
- package/dist/navigation/browserEvents.d.ts.map +1 -1
- package/dist/navigation/browserEvents.esm.js +17 -17
- package/dist/navigation/browserEvents.esm.js.map +1 -1
- package/dist/navigation/chrome.cjs.js +1 -1
- package/dist/navigation/chrome.cjs.js.map +1 -1
- package/dist/navigation/chrome.d.ts +2 -2
- package/dist/navigation/chrome.d.ts.map +1 -1
- package/dist/navigation/chrome.esm.js +2 -2
- package/dist/navigation/chrome.esm.js.map +1 -1
- package/dist/navigation/controller.cjs.js +1 -1
- package/dist/navigation/controller.cjs.js.map +1 -1
- package/dist/navigation/controller.esm.js +37 -37
- package/dist/navigation/podContext.cjs.js +1 -1
- package/dist/navigation/podContext.cjs.js.map +1 -1
- package/dist/navigation/podContext.esm.js +5 -5
- package/dist/navigation/state.cjs.js +1 -1
- package/dist/navigation/state.cjs.js.map +1 -1
- package/dist/navigation/state.d.ts +4 -0
- package/dist/navigation/state.d.ts.map +1 -1
- package/dist/navigation/state.esm.js +18 -5
- package/dist/navigation/state.esm.js.map +1 -1
- package/dist/outline/fileExplorerHelpers.cjs.js +1 -1
- package/dist/outline/fileExplorerHelpers.cjs.js.map +1 -1
- package/dist/outline/fileExplorerHelpers.d.ts +2 -5
- package/dist/outline/fileExplorerHelpers.d.ts.map +1 -1
- package/dist/outline/fileExplorerHelpers.esm.js +11 -13
- package/dist/outline/fileExplorerHelpers.esm.js.map +1 -1
- package/dist/outline/manager2.cjs.js +1 -1
- package/dist/outline/manager2.cjs.js.map +1 -1
- package/dist/outline/manager2.esm.js +355 -327
- package/dist/outline/manager2.esm.js.map +1 -1
- package/dist/registerPanes.cjs.js +1 -1
- package/dist/registerPanes.cjs.js.map +1 -1
- package/dist/registerPanes.esm.js +1 -1
- package/dist/registerPanes.esm.js.map +1 -1
- package/dist/slideshow/slideshowPane.cjs.js +1 -1
- package/dist/slideshow/slideshowPane.cjs.js.map +1 -1
- package/dist/slideshow/slideshowPane.esm.js +30 -30
- package/dist/slideshow/slideshowPane.esm.js.map +1 -1
- package/dist/social/socialPane2.cjs.js +1 -1
- package/dist/social/socialPane2.esm.js +1 -1
- package/dist/social/socialSections.cjs.js +1 -1
- package/dist/social/socialSections.esm.js +1 -1
- package/dist/utils/paneUtils.cjs.js +1 -1
- package/dist/utils/paneUtils.cjs.js.map +1 -1
- package/dist/utils/paneUtils.esm.js +15 -15
- package/dist/versionInfo.cjs.js +1 -1
- package/dist/versionInfo.cjs.js.map +1 -1
- package/dist/versionInfo.esm.js +9 -9
- package/dist/versionInfo.esm.js.map +1 -1
- package/package.json +12 -13
|
@@ -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%}.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"),require("solid-ui/components/error-state");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,a.options.folderView)?{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&&!r.folderView&&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),s=!1;function c(){if(s){if(O.getState(o.doc().uri)!==`fetched`)return!1;s=!1,i=!1}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 l(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),c(),!1)}if(n.solo&&Y(o),r?.global){c();return}h.log.debug(`outlineExpand: dereferencing `+o);let u=x.createElement(`span`);if(e.appendChild(u),O.addCallback(`done`,l),O.addCallback(`fail`,l),o.uri&&o.uri.split(`:`)[0]===`rdf`)c();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(){let e=!!(o&&o.uri&&o.site&&o.site().uri===o.uri),t=!!g.solidLogicSingleton.authn.currentUser();return e?t?`You are logged in, but this root resource is not publicly readable. Select a storage location from the account menu to continue.`:`This root resource is not publicly readable. Try logging in or opening a profile document.`:t?`You are logged in, but your account does not have permission to view this resource.`:`This resource is not publicly readable. Log in to view it.`},l=function(){s=!0;let n=x.createElement(`solid-ui-error-state`);n.setAttribute(`title`,`Access denied`),n.setAttribute(`message`,a()),t&&n.setAttribute(`data-outline-error-for`,t),h.utils.emptyNode(e).appendChild(n),O.addCallback(`done`,function(n){return!s||!e.isConnected?!1:n!==t||(c(),!1)}),O.getState(t)===`fetched`&&c()},u=function(a,o){if(e.querySelector&&t&&e.querySelector(`[data-outline-error-for="`+t+`"]`))return;let s=i(a,o);if(s&&n.solo){if(!d&&g.solidLogicSingleton.authn.currentUser()){d=!0,f(!0);return}l();return}let c=s?r(s):a,u=h.widgets.errorMessageBlock(x,c,`#fee`,o instanceof Error?o:void 0);t&&u.setAttribute(`data-outline-error-for`,t),e.appendChild(u)},d=!1,f=function(e){let t=!1,r=O.nowOrWhenFetched(o.doc(),e?{force:!0}:{},function(e,r){e?(O.lookUpThing(o),c(),n.solo&&Y(o)):(t=!0,u(r,void 0))});r&&typeof r.catch==`function`&&r.catch(function(e){t||(t=!0,u(e,e))})},p=O.requested[t];f(!!n.solo&&(p===401||p===403))}else c()}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,folderView:d.resolveFolderView(o),headerOnlyInViewerPod:!s||!!(n&&n.subject&&n.subject.uri)}):r||m(),r&&x&&x.defaultView&&x.defaultView.history){let t=o&&typeof o==`object`&&o.preserveUrl===!0,r=x.defaultView.history.state||{},i=document.location.href!==e.uri,a=l.nextHistoryState(r,{pane:n?{name:n.name,subject:n.subject&&typeof n.subject.uri==`string`?n.subject.uri:void 0}:void 0,leavingPage:i,viaAccountMenu:!s});try{let n=new URL(x.location.href),o=new URL(e.uri,x.location.href);t?x.defaultView.history.replaceState(a,``):n.origin===o.origin&&(i?x.defaultView.history.pushState(a,e.uri,e.uri):JSON.stringify(r)!==JSON.stringify(a)&&x.defaultView.history.replaceState(a,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;
|
|
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/podUtils.cjs.js"),o=require("../utils/webIdUtils.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"),require("solid-ui/components/error-state");let y=require("solid-ui/components/access-control-modal");y=e.__toESM(y);var b=`solid-ui-file-explorer-provider`;function x(e){e.addEventListener(`close`,()=>e.remove())}function S(e){let S=e.dom,C=new WeakMap,w=new WeakMap,T=new WeakSet;this.document=e.dom,this.context=e,this.outlineIcons=n.outlineIcons,this.labeller=this.labeller||{},this.labeller.LanguagePreference=``;let E=this,D=this,O=[];this.selection=O,this.ancestor=h.utils.ancestor,this.sparql=v.UpdateManager,this.kb=g.store;let k=g.store,A=g.store.fetcher;S.outline=this,this.qs=new i.QuerySource,this.UserInput=new r.UserInput(this),this.clipboardAddress=`tabulator:clipboard`,this.UserInput.clipboardInit(this.clipboardAddress);let{outlineObjectDiv:j,outlinePredicateDiv:M,termWidget:N}=p.createOutlineDomHelpers({dom:S,UI:h,kb:g.store,outlineIcons:n.outlineIcons,expandMouseDownListener:ce,selectableTDClickListener:pe,setSelected:G,viewAsBoringDefault:ge,removeNodeIconMouseDownListener:fe});this.outlineObjectDiv=j,this.outlinePredicateDiv=M,this.outlineObjectTD=j,this.outlinePredicateTD=M,this.termWidget=N,this.init=function(){let e=ee();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`},P.lastkbsize=0;function P(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: `+(k.statements.length-P.lastkbsize)+`, time elapsed for `+e+` was `+(i-n)+`ms`),P.lastkbsize=k.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],D.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=A.getState(r),a,o,s;switch(i){case`unrequested`:a=n.outlineIcons.src.icon_unrequested,o=`fetch`,s=de;break;case`requested`:a=n.outlineIcons.src.icon_requested,o=`fetching`,s=J;break;case`fetched`:a=n.outlineIcons.src.icon_fetched,s=ue,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),S);return c.classList.add(`objectValueAccessIcon`),c.setAttribute(`uri`,t),c.addEventListener(`click`,s),se(c,r),e.appendChild(c),c};function ee(){return ne(`OutlineView`,`Resource browser`)}function te(e){f.refreshNavbarVisibility(e.uri).catch(e=>h.log.error(`Failed to update navbar visibility: `+e))}function ne(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 F(e,t){return e.uri.endsWith(`/`)&&await a.loadContainerRepresentation(e),h.getRelevantPanes(e,t,{excludedPaneNames:[`sharing`],fallbackPaneName:`internal`})}function re(e){let t=S.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=S.createElement(`div`),a.setAttribute(`class`,`exceptionPane`);let t=S.createElement(`pre`);a.appendChild(t),t.appendChild(S.createTextNode(h.utils.stackString(e)))}R(t,n,r,a),w.set(t,{pane:r,subjectUri:n.uri})}function L(e,t,n){n?(re(!!n.requireQueryButton),e.pane=n,I(e,t,n,C.get(e)?.options||{})):h.log.warn(`outline: Unable to open pane in place: pane is undefined.`)}this.refreshActiveExplorerPanes=function(){let t=Array.from(S.querySelectorAll(b));for(let n of t){let t=n.subjectUri,r=n.pane;if(!t||!r)continue;let i=n.querySelector(`:scope > .paneDiv`);if(!i||i.matches(`[data-preserve-pane-on-resize="true"]`)||i.querySelector(`[data-preserve-pane-on-resize="true"]`)||i.querySelector(`:scope > folder-pane-view`))continue;let a;try{a=r.render(v.sym(t),e,n.paneRenderOptions||C.get(n)?.options||{})}catch(e){h.log.error(`outline: Failed to refresh pane layout: `+h.utils.stackString(e));continue}a.classList.add(`paneDiv`),i.replaceWith(a),w.set(n,{pane:r,subjectUri:t})}};function R(t,n,r,i){let a=C.get(t);h.composeExplorer(t,{context:e,subjectUri:n.uri,pane:r,relevantPanes:t.relevantPanes||[],header:a&&s.explorerHeaderForPane(a.showHeader,r?.name,a.options.folderView,a.options.solo)?{paneIcon:m.getPaneIcon(r,n,e),menuItems:a.menuItems,showBack:!a.options.solo}:void 0,paneElement:i})}async function ie(t,n,r,i){r||={},i||=S.createElement(b);let a={generation:(C.get(i)?.generation||0)+1,menuItems:[],options:r};C.set(i,a),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,T.has(i)||(i.addEventListener(h.FILE_EXPLORER_BACK_EVENT,e=>{h.isExplorerEvent(e,i)&&(e.stopPropagation(),le({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)}),T.add(i));let l=r.hideList?[]:await F(t,e);if(C.get(i)!==a)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&&!r.folderView&&d&&(typeof u?.containerHasIndexDocument==`function`&&u.containerHasIndexDocument(t)||k.holds(t,h.ns.ldp(`contains`),d,t.doc()))){if(t=typeof u?.getContainerIndexThing==`function`?u.getContainerIndexThing(t):v.sym(`${d.uri}#this`),await k.fetcher.load(t.doc()),l=await F(t,e),C.get(i)!==a)return i;i.subjectUri=t.uri,i.setAttribute(`about`,t.toNT())}i.relevantPanes=l,i.pane=n||h.getPreferredPane(t,e,l);let f=!!(t&&t.uri&&t.site&&t.site().uri===t.uri),p=!!r.headerOnlyInViewerPod,x=!t.uri.endsWith(`/index.ttl#this`)&&s.deriveExplorerHeader({isRootResource:f,isWebId:o.isWebIdUri(t),viewerPodOnly:p,inViewerPod:!p||await c.isPageInViewerPod(S.location.href)});if(C.get(i)!==a)return i;a.showHeader=x,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))}};let E=w.get(i);if(i.pane?.managesUpdates===!0&&E?.pane===i.pane&&E.subjectUri===t.uri&&!r.refresh&&i.querySelector(`:scope > .paneDiv`)?R(i,t,i.pane):i.pane?I(i,t,i.pane,r):R(i,t,i.pane),x){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}}))});C.get(i)===a&&(a.menuItems=n,R(i,t,i.pane))}return i}function ae(e){let t=e.parentNode,n=t.parentNode,r=S.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=k.canon(e);let i=t?t.matches?.(b)?t:t.firstElementChild||t:S.createElement(b);return ie(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=D.outlinePredicateDiv(t.predicate,r,n);return r.appendChild(i),r}this.propertyTR=B;function oe(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(S,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&&E.labeller.LanguagePreference&&(p+=1,i(t[a+o]).lang.indexOf(E.labeller.LanguagePreference)>=0&&m++);if(m>0&&p===f+1){for(let e=a;e<=a+f;e++)if(E.labeller.LanguagePreference&&i(t[e]).lang.indexOf(E.labeller.LanguagePreference)>=0){l.appendChild(D.outlineObjectDiv(i(t[e]),d,void 0,c));break}a+=f}else l.appendChild(D.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(k.canon(i(t[a+f])).sameTerm(k.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=S.createElement(`div`);r.style.colspan=`1`,r.appendChild(D.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=S.createElement(`div`),n=t.appendChild(S.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=S.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`,S)),e.appendChild(S.createTextNode(s-i+` more...`)),t.setAttribute(`rowspan`,i+1)):(e.appendChild(h.utils.AJARImage(h.icons.originalIconBase+`tbl-shrink.png`,`(less)`,void 0,S)),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=oe;function se(e,t){h.log.debug(`Button callbacks for `+t+` added`);let r=function(r){return function(i){return i.indexOf(`#`),!e||!E.ancestor(e,`DIV`)?!1:(i===t&&(e.src=r,e.title=n.outlineIcons.tooltips[r]),!0)}};A.addCallback(`request`,r(n.outlineIcons.src.icon_requested)),A.addCallback(`done`,r(n.outlineIcons.src.icon_fetched)),A.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=D.targetOf(e).parentNode;N.replaceIcon(t.parentNode,n.outlineIcons.termWidgets.optOn,n.outlineIcons.termWidgets.optOff,U),t.parentNode.parentNode.removeAttribute(`optional`)}function U(e){let t=D.targetOf(e).parentNode;N.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&&N.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`),N.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&&S.getElementById(`UserURI`)&&(S.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<O.length;e++){if(!O[e].parentNode)continue;let t=O[e].parentNode.AJAR_statement;if(!t)continue;let n=t.why;n&&n.uri&&sourceWidget.highlight(n,!0)}}},this.getSelection=function(){return O};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),O.push(e);let t=h.utils.getTerm(e);D.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,k)&&r.indexOf(`pred`)>=0&&N.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&&N.removeIcon(e,n.outlineIcons.termWidgets.addTri),O=O.filter(function(t){return t===e}),h.log.info(`Deselecting `+e.textContent);typeof sourceWidget<`u`&&D.showSource(),e.setAttribute(`class`,r)}function K(){let e=O.length;for(let t=e-1;t>=0;t--)G(O[t],!1);O=[]}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||O[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&&S.getElementById(`UserURI`)&&(S.getElementById(`UserURI`).value=e.termType===`NamedNode`?e.uri:``)}function n(e){return arguments[3]||(o(`right`,a),t(h.utils.getAbout(k,O[0]))),!0}let r,i;if(h.utils.getTarget(e).tagName===`TEXTAREA`||h.utils.getTarget(e).id===`UserURI`||O.length>1)return;if(O.length===0){(e.keyCode===13||e.keyCode===38||e.keyCode===40||e.keyCode===37||e.keyCode===39)&&(this.walk(`right`,D.focusTd),t(h.utils.getAbout(k,O[0])));return}let a=O[0];switch(A.removeCallback(`done`,`setSelectedAfterward`),A.removeCallback(`fail`,`setSelectedAfterward`),e.keyCode){case 13:if(h.utils.getTarget(e).tagName===`HTML`){let e=h.utils.getAbout(k,a);r=a.parentNode.AJAR_statement.why,i=g.store.updater.editable(r.uri,k),e?E.GotoSubject(e,!0):i&&D.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,k),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(k,e.provider);t&&Z(e.block,t);break}case 39:{let e=h.utils.getAbout(k,a);if(e){if(o=this.walk,a.nextSibling){this.walk(`right`);return}a.firstElementChild?.matches(b)||(A.addCallback(`done`,n),A.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){D.UserInput.copyToClipboard(D.clipboardAddress,a);break}break;case 118:case 112:if(e.ctrlKey){D.UserInput.pasteFromClipboard(D.clipboardAddress,a);break}break;default:h.utils.getTarget(e).tagName}}t(h.utils.getAbout(k,O[0]))},this.OutlinerMouseclickPanel=function(e){switch(D.UserInput._tabulatorMode){case 0:me(e);break;case 1:D.UserInput.Click(e)}};function ce(e){let t=D.targetOf(e),n,r;for(let e=t;e&&e!==S;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(k,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 le(e){let t=D.targetOf(e),n=e.altKey?_.byName(`internal`):void 0,r=q(t);if(!r)return;let i=h.utils.getAbout(k,r.provider);i&&Z(r.block,i,n)}function q(e){for(let t=e;t&&t!==S;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=D.targetOf(e).getAttribute(`uri`);e.altKey?A.fetch(v.uri.docpart(t),{force:!0}):A.refresh(k.sym(v.uri.docpart(t)))}function ue(e){let t=D.targetOf(e).getAttribute(`uri`);e.altKey?A.fetch(v.uri.docpart(t),{force:!0}):A.refresh(k.sym(v.uri.docpart(t)))}function de(e){let t=D.targetOf(e).getAttribute(`uri`);A.fetch(v.uri.docpart(t))}function fe(e){let t=D.targetOf(e),n=t.node;n.childNodes.length>1&&(n=t.parentNode),ae(n)}function pe(e){if(D.UserInput._tabulatorMode)return D.UserInput.Click(e);let t=D.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(),D.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,k);r&&a&&D.UserInput.Click(e,O[0])}h.log.debug(`Was node selected after: `+V(n)+`, count=`+O.length),e.stopPropagation()}function me(e){h.log.info(`@TabulatorMousedown, dom.location is now `+S.location);let t=D.targetOf(e);if(!t)return;let r=t.tagName;r!==`INPUT`&&r!==`TEXTAREA`&&(D.UserInput.clearMenu(),D.UserInput.lastModified&&D.UserInput.lastModified.parentNode.nextSibling&&D.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)&&D.UserInput.clearInputAndSave(e),t.src&&t.src.slice(t.src.indexOf(`/icons/`)+1)===n.outlineIcons.src.icon_show_choices||D.UserInput.clearMenu(),e&&e.stopPropagation())}function Y(e){S.title=h.utils.label(e),S.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 `+S.location),A.removeCallback(`done`,`expand`),A.removeCallback(`fail`,`expand`);let o=k.canon(t),s=!1;function c(){if(s){if(A.getState(o.doc().uri)!==`fetched`)return!1;s=!1,i=!1}if(o=k.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),D.focusTd=e,h.log.debug(`expand: Node for `+o+` expanded`);let a=k.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),A.lookUpThing(a[e],o)}function l(e){if(arguments[3])return!0;let t=k.canon(o);h.log.info(`@@ expand: relevant subject=`+t+`, uri=`+e+`, already=`+i);let n=k.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=k.uris(t);if(!r)return!1;for(let t=0;t<r.length;t++)for(let n=v.uri.docpart(r[t]);n;n=k.HTTPRedirects[n])if(e===n)return!0;return!!k.anyStatementMatching(t,void 0,void 0,n)}()||(h.log.success(`@@ expand OK: relevant subject=`+t+`, uri=`+e+`, source=`+i),c(),!1)}if(n.solo&&Y(o),r?.global){c();return}h.log.debug(`outlineExpand: dereferencing `+o);let u=S.createElement(`span`);if(e.appendChild(u),A.addCallback(`done`,l),A.addCallback(`fail`,l),o.uri&&o.uri.split(`:`)[0]===`rdf`)c();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(){let e=!!(o&&o.uri&&o.site&&o.site().uri===o.uri),t=!!g.solidLogicSingleton.authn.currentUser();return e?t?`You are logged in, but this root resource is not publicly readable. Select a storage location from the account menu to continue.`:`This root resource is not publicly readable. Try logging in or opening a profile document.`:t?`You are logged in, but your account does not have permission to view this resource.`:`This resource is not publicly readable. Log in to view it.`},l=function(){s=!0;let n=S.createElement(`solid-ui-error-state`);n.setAttribute(`title`,`Access denied`),n.setAttribute(`message`,a()),t&&n.setAttribute(`data-outline-error-for`,t),x(n),h.utils.emptyNode(e).appendChild(n),A.addCallback(`done`,function(n){return!s||!e.isConnected?!1:n!==t||(c(),!1)}),A.getState(t)===`fetched`&&c()},u=function(a,o){if(e.querySelector&&t&&e.querySelector(`[data-outline-error-for="`+t+`"]`))return;let s=i(a,o);if(s&&n.solo){if(!d&&g.solidLogicSingleton.authn.currentUser()){d=!0,f(!0);return}l();return}let c=s?r(s):a,u=h.widgets.errorMessageBlock(S,c,`#fee`,o instanceof Error?o:void 0);t&&u.setAttribute(`data-outline-error-for`,t),e.appendChild(u)},d=!1,f=function(e){let t=!1,r=A.nowOrWhenFetched(o.doc(),e?{force:!0}:{},function(e,r){e?(A.lookUpThing(o),c(),n.solo&&Y(o)):(t=!0,u(r,void 0))});r&&typeof r.catch==`function`&&r.catch(function(e){t||(t=!0,u(e,e))})},p=A.requested[t];f(!!n.solo&&(p===401||p===403))}else c()}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),D.replaceTD(D.outlineObjectDiv(t,r,i,n),e)}this.replaceTD=function(e,t){let n;V(t)&&(n=!0);for(let e=O.length-1;e>-1;e--)for(let n=O[e];n.parentNode;n=n.parentNode)n===t&&G(O[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())}E.outlineRefocus=Q,this.GotoFormURI_enterKey=function(e){e.keyCode===13&&E.GotoFormURI(e)},this.GotoFormURI=function(e){he(S.getElementById(`UserURI`).value)};function he(e){let t=k.sym(e);this.GotoSubject(t,!0)}this.GotoURIinit=function(e){let t=k.sym(e);this.GotoSubject(t)},this.GotoSubject=function(e,t,n,r,i,a,o){let s=d.resolveSource(o)!==`accountMenu`,c=ee();s&&(!a||a===c)&&te(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=S.createElement(`div`);e.classList.add(`outline-subject-block`);let t=D.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,folderView:d.resolveFolderView(o),headerOnlyInViewerPod:!s||!!(n&&n.subject&&n.subject.uri)}):r||m(),r&&S&&S.defaultView&&S.defaultView.history){let t=o&&typeof o==`object`&&o.preserveUrl===!0,r=S.defaultView.history.state||{},i=document.location.href!==e.uri,a=l.nextHistoryState(r,{pane:n?{name:n.name,subject:n.subject&&typeof n.subject.uri==`string`?n.subject.uri:void 0}:void 0,leavingPage:i,viaAccountMenu:!s});try{let n=new URL(S.location.href),o=new URL(e.uri,S.location.href);t?l.writeNavigationHistory(S.defaultView.history,`replaceState`,a,``):n.origin===o.origin&&(i?l.writeNavigationHistory(S.defaultView.history,`pushState`,a,e.uri,e.uri):JSON.stringify(r)!==JSON.stringify(a)&&l.writeNavigationHistory(S.defaultView.history,`replaceState`,a,e.uri,e.uri))}catch(e){h.log.error(`Failed to update navigation history: `+h.utils.stackString(e))}}return r&&u.announceNavigation(S),e};let $=t.propertyViews(S);function ge(t){let r;if(t.termType===`Literal`){if(r=S.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=S.createElement(`span`),r.classList.add(`objectValue`,`objectValue--resource`),r.setAttribute(`about`,t.toNT()),D.appendAccessIcons(k,r,t),t.termType===`NamedNode`){if(t.uri.slice(0,4)===`tel:`){let e=t.uri.slice(4),i=S.createElement(`a`);r.appendChild(S.createTextNode(e)),i.setAttribute(`href`,t.uri),i.appendChild(h.utils.AJARImage(n.outlineIcons.src.icon_telephone,`phone`,`phone `+e,S)),r.appendChild(i),i.firstChild.setAttribute(`class`,`phoneIcon`),i.firstChild.classList.add(`objectValueLinkIcon`)}else{r.appendChild(S.createTextNode(h.utils.label(t)));let e=h.widgets.linkIcon(S,t);e.firstChild&&e.firstChild.classList.add(`objectValueLinkIcon`),r.appendChild(e),h.widgets.makeDraggable(r,t)}}else r.appendChild(S.createTextNode(h.utils.label(t)))}else if(t.termType===`Collection`){r=S.createElement(`div`),r.setAttribute(`about`,t.toNT());for(let e=0;e<t.elements.length;e++){let n=t.elements[e],i=r.appendChild(S.createElement(`div`)),a=i.appendChild(S.createElement(`div`));a.classList.add(`obj`),a.setAttribute(`notSelectable`,`false`),a.setAttribute(`about`,t.toNT()),a.innerHTML=e+1+`)`,i.appendChild(D.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=S.createTextNode(`[unknownTermType:`+t.termType+`]`));return h.log.debug(`contents: `+r.innerHTML),r}return this.createTabURI=function(){S.getElementById(`UserURI`).value=S.URL+`?uri=`+S.getElementById(`UserURI`).value},this.UserInput.setSelected=G,this.UserInput.deselectAll=K,this.UserInput.views=$,this.outlineExpand=X,this}exports.default=S,exports.dismissErrorStateOnClose=x;
|
|
2
2
|
//# sourceMappingURL=manager2.cjs.js.map
|