solid-panes 3.7.3-1bd42721 → 3.7.3-1ca893eb
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/dashboard/basicPreferences.js +121 -129
- package/dist/dashboard/basicPreferences.js.map +1 -1
- package/dist/dashboard/dashboardPane.js +60 -54
- package/dist/dashboard/dashboardPane.js.map +1 -1
- package/dist/dashboard/homepage.js +45 -54
- package/dist/dashboard/homepage.js.map +1 -1
- package/dist/home/homePane.d.ts.map +1 -1
- package/dist/home/homePane.js +60 -55
- package/dist/home/homePane.js.map +1 -1
- package/dist/index.js +86 -25
- package/dist/index.js.map +1 -1
- package/dist/internal/internalPane.js +168 -179
- package/dist/internal/internalPane.js.map +1 -1
- package/dist/mainPage/footer.js +13 -7
- package/dist/mainPage/footer.js.map +1 -1
- package/dist/mainPage/header.js +59 -58
- package/dist/mainPage/header.js.map +1 -1
- package/dist/mainPage/index.js +19 -24
- package/dist/mainPage/index.js.map +1 -1
- package/dist/outline/context.js +17 -11
- package/dist/outline/context.js.map +1 -1
- package/dist/outline/propertyViews.js +39 -28
- package/dist/outline/propertyViews.js.map +1 -1
- package/dist/outline/viewAsImage.js +13 -5
- package/dist/outline/viewAsImage.js.map +1 -1
- package/dist/outline/viewAsMbox.js +20 -11
- package/dist/outline/viewAsMbox.js.map +1 -1
- package/dist/pad/padPane.js +395 -404
- package/dist/pad/padPane.js.map +1 -1
- package/dist/schedule/schedulePane.js +3 -4
- package/dist/schedule/schedulePane.js.map +1 -1
- package/dist/sharing/sharingPane.js +36 -32
- package/dist/sharing/sharingPane.js.map +1 -1
- package/dist/tabbed/tabbedPane.js +54 -51
- package/dist/tabbed/tabbedPane.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.dom.js +134 -146
- package/dist/trustedApplications/trustedApplications.dom.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.utils.js +20 -20
- package/dist/trustedApplications/trustedApplications.utils.js.map +1 -1
- package/dist/trustedApplications/trustedApplications.view.js +51 -57
- package/dist/trustedApplications/trustedApplications.view.js.map +1 -1
- package/dist/versionInfo.js +35 -29
- package/dist/versionInfo.js.map +1 -1
- package/package.json +21 -21
- package/dist/schedule/formsForSchedule.js +0 -124
- package/dist/schedule/formsForSchedule.js.map +0 -1
- package/dist/types.d.ts +0 -30
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
|
@@ -1,109 +1,103 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
parse(turtle, store, doc.uri, 'text/turtle', null); // Load form directly
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
const preferencesForm = store.sym('urn:uuid:93774ba1-d3b6-41f2-85b6-4ae27ffd2597#this');
|
|
41
|
-
loadData(preferencesForm, preferencesFormText);
|
|
42
|
-
const ontologyExtra = store.sym('urn:uuid:93774ba1-d3b6-41f2-85b6-4ae27ffd2597-ONT');
|
|
43
|
-
loadData(ontologyExtra, ontologyData);
|
|
44
|
-
function doRender() {
|
|
45
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
const renderContext = yield login.ensureLoadedPreferences({
|
|
47
|
-
dom,
|
|
48
|
-
div: container
|
|
49
|
-
});
|
|
50
|
-
if (!renderContext.preferencesFile) {
|
|
51
|
-
// Could be CORS
|
|
52
|
-
console.log('Not doing private class preferences as no access to preferences file. ' +
|
|
53
|
-
renderContext.preferencesFileError);
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
const appendedForm = widgets.appendForm(dom, formArea, {}, renderContext.me, preferencesForm, renderContext.preferencesFile, complainIfBad);
|
|
57
|
-
appendedForm.style.borderStyle = 'none';
|
|
58
|
-
const trustedApplicationsView = context.session.paneRegistry.byName('trustedApplications');
|
|
59
|
-
if (trustedApplicationsView) {
|
|
60
|
-
container.appendChild(trustedApplicationsView.render(null, context));
|
|
61
|
-
}
|
|
62
|
-
// @@ TODO Remove need for casting as any and bang (!) syntax
|
|
63
|
-
addDeleteSection(container, store, renderContext.me, dom);
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
doRender();
|
|
67
|
-
return container;
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.basicPreferencesPane = void 0;
|
|
7
|
+
var _rdflib = require("rdflib");
|
|
8
|
+
var _solidUi = require("solid-ui");
|
|
9
|
+
/* babel-plugin-inline-import './ontologyData.ttl' */
|
|
10
|
+
const ontologyData = "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix foaf: <http://xmlns.com/foaf/0.1/>.\n@prefix schema: <http:/schema.org/>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix vcard: <http://www.w3.org/2006/vcard/ns#>.\n@prefix : <#>.\n\nsolid:User a rdfs:Class;\n rdfs:label \"user\"@en, \"utilisateur\"@fr;\n rdfs:comment \"\"\"Any person who might use a Solid-based system\"\"\";\n rdfs:subClassOf foaf:Person, schema:Person, vcard:Individual.\n\n# Since these options are opt-in, it is a bit strange to have new users opt in\n# That they are new users - also we do not use this class for anything specific\n# yet\n# solid:NewUser a rdfs:Class;\n# rdfs:label \"new user\"@en;\n# rdfs:comment \"\"\"A person who might use a Solid-based system who has a low\n# level of familiarity with technical details.\"\"\";\n# rdfs:subClassOf solid:User.\n\nsolid:PowerUser a rdfs:Class;\n rdfs:label \"power user\"@en;\n rdfs:comment \"\"\"A person who might use a Solid-based system\n who is prepared to be given a more complex interface in order\n to be provided with more pwerful features.\"\"\";\n rdfs:subClassOf solid:User.\n\n solid:Developer a rdfs:Class;\n rdfs:label \"Developer\";\n rdfs:comment \"\"\"Any person who might use a Solid-based system,\n who has software development skills.\"\"\";\n rdfs:subClassOf solid:User.\n";
|
|
11
|
+
/* babel-plugin-inline-import './preferencesFormText.ttl' */
|
|
12
|
+
const preferencesFormText = "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.\n@prefix solid: <http://www.w3.org/ns/solid/terms#>.\n@prefix ui: <http://www.w3.org/ns/ui#>.\n@prefix : <#>.\n\n:this <http://purl.org/dc/elements/1.1/title> \"Basic preferences\" ;\n a ui:Form ;\n ui:part :categorizeUser, :privateComment, :personalInformationHeading;\n ui:parts ( :personalInformationHeading :privateComment :categorizeUser ).\n\n:personalInformationHeading a ui:Heading;\n ui:contents \"Personal information\".\n\n:privateComment a ui:Comment;\n ui:contents \"This information is private.\".\n\n:categorizeUser a ui:Classifier;\n ui:label \"Level of user\"; ui:property rdf:type ; ui:category solid:User.\n";
|
|
13
|
+
const basicPreferencesPane = exports.basicPreferencesPane = {
|
|
14
|
+
icon: _solidUi.icons.iconBase + 'noun_Sliders_341315_000000.svg',
|
|
15
|
+
name: 'basicPreferences',
|
|
16
|
+
label: _subject => {
|
|
17
|
+
return null;
|
|
18
|
+
},
|
|
19
|
+
// Render the pane
|
|
20
|
+
// The subject should be the logged in user.
|
|
21
|
+
render: (subject, context) => {
|
|
22
|
+
const dom = context.dom;
|
|
23
|
+
const store = context.session.store;
|
|
24
|
+
function complainIfBad(ok, mess) {
|
|
25
|
+
if (ok) return;
|
|
26
|
+
container.appendChild(_solidUi.widgets.errorMessageBlock(dom, mess, '#fee'));
|
|
27
|
+
}
|
|
28
|
+
const container = dom.createElement('div');
|
|
29
|
+
const formArea = setupUserTypesSection(container, dom);
|
|
30
|
+
function loadData(doc, turtle) {
|
|
31
|
+
doc = doc.doc(); // remove # from URI if nec
|
|
32
|
+
if (!store.holds(undefined, undefined, undefined, doc)) {
|
|
33
|
+
// If not loaded already
|
|
34
|
+
;
|
|
35
|
+
(0, _rdflib.parse)(turtle, store, doc.uri, 'text/turtle', null); // Load form directly
|
|
36
|
+
}
|
|
68
37
|
}
|
|
38
|
+
const preferencesForm = store.sym('urn:uuid:93774ba1-d3b6-41f2-85b6-4ae27ffd2597#this');
|
|
39
|
+
loadData(preferencesForm, preferencesFormText);
|
|
40
|
+
const ontologyExtra = store.sym('urn:uuid:93774ba1-d3b6-41f2-85b6-4ae27ffd2597-ONT');
|
|
41
|
+
loadData(ontologyExtra, ontologyData);
|
|
42
|
+
async function doRender() {
|
|
43
|
+
const renderContext = await _solidUi.login.ensureLoadedPreferences({
|
|
44
|
+
dom,
|
|
45
|
+
div: container
|
|
46
|
+
});
|
|
47
|
+
if (!renderContext.preferencesFile) {
|
|
48
|
+
// Could be CORS
|
|
49
|
+
console.log('Not doing private class preferences as no access to preferences file. ' + renderContext.preferencesFileError);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const appendedForm = _solidUi.widgets.appendForm(dom, formArea, {}, renderContext.me, preferencesForm, renderContext.preferencesFile, complainIfBad);
|
|
53
|
+
appendedForm.style.borderStyle = 'none';
|
|
54
|
+
const trustedApplicationsView = context.session.paneRegistry.byName('trustedApplications');
|
|
55
|
+
if (trustedApplicationsView) {
|
|
56
|
+
container.appendChild(trustedApplicationsView.render(null, context));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// @@ TODO Remove need for casting as any and bang (!) syntax
|
|
60
|
+
addDeleteSection(container, store, renderContext.me, dom);
|
|
61
|
+
}
|
|
62
|
+
doRender();
|
|
63
|
+
return container;
|
|
64
|
+
}
|
|
69
65
|
};
|
|
70
66
|
function setupUserTypesSection(container, dom) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
67
|
+
const formContainer = createSection(container, dom, 'User types');
|
|
68
|
+
const description = formContainer.appendChild(dom.createElement('p'));
|
|
69
|
+
description.innerText = 'Here you can self-assign user types to help the data browser know which views you would like to access.';
|
|
70
|
+
const userTypesLink = formContainer.appendChild(dom.createElement('a'));
|
|
71
|
+
userTypesLink.href = 'https://github.com/solidos/userguide/#role';
|
|
72
|
+
userTypesLink.innerText = 'Read more';
|
|
73
|
+
const formArea = formContainer.appendChild(dom.createElement('div'));
|
|
74
|
+
return formArea;
|
|
79
75
|
}
|
|
80
|
-
|
|
81
|
-
// ends
|
|
76
|
+
var _default = exports.default = basicPreferencesPane; // ends
|
|
82
77
|
function addDeleteSection(container, store, profile, dom) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
78
|
+
const section = createSection(container, dom, 'Delete account');
|
|
79
|
+
const podServerNodes = store.each(profile, _solidUi.ns.space('storage'), null, profile.doc());
|
|
80
|
+
const podServers = podServerNodes.map(node => node.value);
|
|
81
|
+
const list = section.appendChild(dom.createElement('ul'));
|
|
82
|
+
podServers.forEach(async server => {
|
|
83
|
+
const deletionLink = await generateDeletionLink(server, dom);
|
|
84
|
+
if (deletionLink) {
|
|
85
|
+
const listItem = list.appendChild(dom.createElement('li'));
|
|
86
|
+
listItem.appendChild(deletionLink);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
94
89
|
}
|
|
95
|
-
function generateDeletionLink(podServer, dom) {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return link;
|
|
105
|
-
});
|
|
90
|
+
async function generateDeletionLink(podServer, dom) {
|
|
91
|
+
const link = dom.createElement('a');
|
|
92
|
+
link.textContent = `Delete your account at ${podServer}`;
|
|
93
|
+
const deletionUrl = await getDeletionUrlForServer(podServer);
|
|
94
|
+
if (typeof deletionUrl !== 'string') {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
link.href = deletionUrl;
|
|
98
|
+
return link;
|
|
106
99
|
}
|
|
100
|
+
|
|
107
101
|
/**
|
|
108
102
|
* Hacky way to get the deletion link to a Pod
|
|
109
103
|
*
|
|
@@ -119,37 +113,35 @@ function generateDeletionLink(podServer, dom) {
|
|
|
119
113
|
* @returns URL of the page that Node Solid Server would offer to delete the account, or null if
|
|
120
114
|
* the URLs we tried give invalid responses.
|
|
121
115
|
*/
|
|
122
|
-
function getDeletionUrlForServer(server) {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
return null;
|
|
143
|
-
});
|
|
116
|
+
async function getDeletionUrlForServer(server) {
|
|
117
|
+
const singleUserUrl = new URL(server);
|
|
118
|
+
const multiUserUrl = new URL(server);
|
|
119
|
+
multiUserUrl.pathname = singleUserUrl.pathname = '/account/delete';
|
|
120
|
+
const hostnameParts = multiUserUrl.hostname.split('.');
|
|
121
|
+
// Remove `vincent.` from `vincent.dev.inrupt.net`, for example:
|
|
122
|
+
multiUserUrl.hostname = hostnameParts.slice(1).join('.');
|
|
123
|
+
const multiUserNssResponse = await fetch(multiUserUrl.href, {
|
|
124
|
+
method: 'HEAD'
|
|
125
|
+
});
|
|
126
|
+
if (multiUserNssResponse.ok) {
|
|
127
|
+
return multiUserUrl.href;
|
|
128
|
+
}
|
|
129
|
+
const singleUserNssResponse = await fetch(singleUserUrl.href, {
|
|
130
|
+
method: 'HEAD'
|
|
131
|
+
});
|
|
132
|
+
if (singleUserNssResponse.ok) {
|
|
133
|
+
return singleUserUrl.href;
|
|
134
|
+
}
|
|
135
|
+
return null;
|
|
144
136
|
}
|
|
145
137
|
function createSection(container, dom, title) {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
138
|
+
const section = container.appendChild(dom.createElement('div'));
|
|
139
|
+
section.style.border = '0.3em solid #418d99';
|
|
140
|
+
section.style.borderRadius = '0.5em';
|
|
141
|
+
section.style.padding = '0.7em';
|
|
142
|
+
section.style.marginTop = '0.7em';
|
|
143
|
+
const titleElement = section.appendChild(dom.createElement('h3'));
|
|
144
|
+
titleElement.innerText = title;
|
|
145
|
+
return section;
|
|
154
146
|
}
|
|
155
147
|
//# sourceMappingURL=basicPreferences.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basicPreferences.js","sourceRoot":"","sources":["../../src/dashboard/basicPreferences.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAA6B,KAAK,EAAS,MAAM,QAAQ,CAAA;AAChE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AACpD,OAAO,YAAY,MAAM,oBAAoB,CAAA;AAC7C,OAAO,mBAAmB,MAAM,2BAA2B,CAAA;AAE3D,MAAM,CAAC,MAAM,oBAAoB,GAAmB;IAClD,IAAI,EAAE,KAAK,CAAC,QAAQ,GAAG,gCAAgC;IACvD,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,QAAQ,CAAC,EAAE;QAChB,OAAO,IAAI,CAAA;IACb,CAAC;IAED,kBAAkB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AAO,GAAG,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAA;IAC/D,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,qBAAqB,CAAA;IAC5C,OAAO,CAAC,KAAK,CAAC,YAAY,GAAG,OAAO,CAAA;IACpC,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAA;IAC/B,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,OAAO,CAAA;IAEjC,MAAM,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAA;IACjE,YAAY,CAAC,SAAS,GAAG,KAAK,CAAA;IAE9B,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
|
1
|
+
{"version":3,"file":"basicPreferences.js","names":["_rdflib","require","_solidUi","ontologyData","preferencesFormText","basicPreferencesPane","exports","icon","icons","iconBase","name","label","_subject","render","subject","context","dom","store","session","complainIfBad","ok","mess","container","appendChild","widgets","errorMessageBlock","createElement","formArea","setupUserTypesSection","loadData","doc","turtle","holds","undefined","parse","uri","preferencesForm","sym","ontologyExtra","doRender","renderContext","login","ensureLoadedPreferences","div","preferencesFile","console","log","preferencesFileError","appendedForm","appendForm","me","style","borderStyle","trustedApplicationsView","paneRegistry","byName","addDeleteSection","formContainer","createSection","description","innerText","userTypesLink","href","_default","default","profile","section","podServerNodes","each","ns","space","podServers","map","node","value","list","forEach","server","deletionLink","generateDeletionLink","listItem","podServer","link","textContent","deletionUrl","getDeletionUrlForServer","singleUserUrl","URL","multiUserUrl","pathname","hostnameParts","hostname","split","slice","join","multiUserNssResponse","fetch","method","singleUserNssResponse","title","border","borderRadius","padding","marginTop","titleElement"],"sources":["../../src/dashboard/basicPreferences.ts"],"sourcesContent":["import { PaneDefinition } from 'pane-registry'\nimport { IndexedFormula, NamedNode, parse, Store } from 'rdflib'\nimport { icons, login, ns, widgets } from 'solid-ui'\nimport ontologyData from './ontologyData.ttl'\nimport preferencesFormText from './preferencesFormText.ttl'\n\nexport const basicPreferencesPane: PaneDefinition = {\n icon: icons.iconBase + 'noun_Sliders_341315_000000.svg',\n name: 'basicPreferences',\n label: _subject => {\n return null\n },\n\n // Render the pane\n // The subject should be the logged in user.\n render: (subject, context) => {\n const dom = context.dom\n const store = context.session.store as Store\n\n function complainIfBad (ok: Boolean, mess: any) {\n if (ok) return\n container.appendChild(widgets.errorMessageBlock(dom, mess, '#fee'))\n }\n\n const container = dom.createElement('div')\n\n const formArea = setupUserTypesSection(container, dom)\n\n function loadData (doc: NamedNode, turtle: String) {\n doc = doc.doc() // remove # from URI if nec\n if (!store.holds(undefined, undefined, undefined, doc)) {\n // If not loaded already\n ;(parse as any)(turtle, store, doc.uri, 'text/turtle', null) // Load form directly\n }\n }\n\n const preferencesForm = store.sym(\n 'urn:uuid:93774ba1-d3b6-41f2-85b6-4ae27ffd2597#this'\n )\n loadData(preferencesForm, preferencesFormText)\n\n const ontologyExtra = store.sym(\n 'urn:uuid:93774ba1-d3b6-41f2-85b6-4ae27ffd2597-ONT'\n )\n loadData(ontologyExtra, ontologyData)\n\n async function doRender () {\n const renderContext = await login.ensureLoadedPreferences({\n dom,\n div: container\n })\n if (!renderContext.preferencesFile) {\n // Could be CORS\n console.log(\n 'Not doing private class preferences as no access to preferences file. ' +\n renderContext.preferencesFileError\n )\n return\n }\n const appendedForm = widgets.appendForm(\n dom,\n formArea,\n {},\n renderContext.me,\n preferencesForm,\n renderContext.preferencesFile,\n complainIfBad\n )\n appendedForm.style.borderStyle = 'none'\n\n const trustedApplicationsView = context.session.paneRegistry.byName('trustedApplications')\n if (trustedApplicationsView) {\n container.appendChild(trustedApplicationsView.render(null, context))\n }\n\n // @@ TODO Remove need for casting as any and bang (!) syntax\n addDeleteSection(container, store, renderContext.me!, dom)\n }\n\n doRender()\n\n return container\n }\n}\n\nfunction setupUserTypesSection (\n container: Element,\n dom: HTMLDocument\n): Element {\n const formContainer = createSection(container, dom, 'User types')\n\n const description = formContainer.appendChild(dom.createElement('p'))\n description.innerText = 'Here you can self-assign user types to help the data browser know which views you would like to access.'\n\n const userTypesLink = formContainer.appendChild(dom.createElement('a'))\n userTypesLink.href = 'https://github.com/solidos/userguide/#role'\n userTypesLink.innerText = 'Read more'\n\n const formArea = formContainer.appendChild(dom.createElement('div'))\n\n return formArea\n}\n\nexport default basicPreferencesPane\n\n// ends\n\nfunction addDeleteSection (\n container: HTMLElement,\n store: IndexedFormula,\n profile: NamedNode,\n dom: HTMLDocument\n): void {\n const section = createSection(container, dom, 'Delete account')\n\n const podServerNodes = store.each(profile, ns.space('storage'), null, profile.doc())\n const podServers = podServerNodes.map(node => node.value)\n\n const list = section.appendChild(dom.createElement('ul'))\n\n podServers.forEach(async server => {\n const deletionLink = await generateDeletionLink(server, dom)\n if (deletionLink) {\n const listItem = list.appendChild(dom.createElement('li'))\n listItem.appendChild(deletionLink)\n }\n })\n}\n\nasync function generateDeletionLink (\n podServer: string,\n dom: HTMLDocument\n): Promise<HTMLElement | null> {\n const link = dom.createElement('a')\n link.textContent = `Delete your account at ${podServer}`\n const deletionUrl = await getDeletionUrlForServer(podServer)\n if (typeof deletionUrl !== 'string') {\n return null\n }\n link.href = deletionUrl\n return link\n}\n\n/**\n * Hacky way to get the deletion link to a Pod\n *\n * This function infers the deletion link by assuming the URL structure of Node Solid server.\n * In the future, Solid will hopefully provide a standardised way of discovering the deletion link:\n * https://github.com/solidos/data-interoperability-panel/issues/18\n *\n * If NSS is in multi-user mode (the case on inrupt.net and solid.community), the deletion URL for\n * vincent.dev.inrupt.net would be at dev.inrupt.net/account/delete. In single-user mode, the\n * deletion URL would be at vincent.dev.inrupt.net/account/delete.\n *\n * @param server Pod server containing the user's account.\n * @returns URL of the page that Node Solid Server would offer to delete the account, or null if\n * the URLs we tried give invalid responses.\n */\nasync function getDeletionUrlForServer (\n server: string\n): Promise<string | null> {\n const singleUserUrl = new URL(server)\n const multiUserUrl = new URL(server)\n multiUserUrl.pathname = singleUserUrl.pathname = '/account/delete'\n\n const hostnameParts = multiUserUrl.hostname.split('.')\n // Remove `vincent.` from `vincent.dev.inrupt.net`, for example:\n multiUserUrl.hostname = hostnameParts.slice(1).join('.')\n\n const multiUserNssResponse = await fetch(multiUserUrl.href, {\n method: 'HEAD'\n })\n if (multiUserNssResponse.ok) {\n return multiUserUrl.href\n }\n\n const singleUserNssResponse = await fetch(singleUserUrl.href, {\n method: 'HEAD'\n })\n if (singleUserNssResponse.ok) {\n return singleUserUrl.href\n }\n return null\n}\n\nfunction createSection (\n container: Element,\n dom: HTMLDocument,\n title: string\n): Element {\n const section = container.appendChild(dom.createElement('div'))\n section.style.border = '0.3em solid #418d99'\n section.style.borderRadius = '0.5em'\n section.style.padding = '0.7em'\n section.style.marginTop = '0.7em'\n\n const titleElement = section.appendChild(dom.createElement('h3'))\n titleElement.innerText = title\n\n return section\n}\n"],"mappings":";;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAAoD;AAAA,MAAAE,YAAA;AAAA;AAAA,MAAAC,mBAAA;AAI7C,MAAMC,oBAAoC,GAAAC,OAAA,CAAAD,oBAAA,GAAG;EAClDE,IAAI,EAAEC,cAAK,CAACC,QAAQ,GAAG,gCAAgC;EACvDC,IAAI,EAAE,kBAAkB;EACxBC,KAAK,EAAEC,QAAQ,IAAI;IACjB,OAAO,IAAI;EACb,CAAC;EAED;EACA;EACAC,MAAM,EAAEA,CAACC,OAAO,EAAEC,OAAO,KAAK;IAC5B,MAAMC,GAAG,GAAGD,OAAO,CAACC,GAAG;IACvB,MAAMC,KAAK,GAAGF,OAAO,CAACG,OAAO,CAACD,KAAc;IAE5C,SAASE,aAAaA,CAAEC,EAAW,EAAEC,IAAS,EAAE;MAC9C,IAAID,EAAE,EAAE;MACRE,SAAS,CAACC,WAAW,CAACC,gBAAO,CAACC,iBAAiB,CAACT,GAAG,EAAEK,IAAI,EAAE,MAAM,CAAC,CAAC;IAC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
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const container = dom.createElement('div');
|
|
18
|
-
const runBuildPage = () => {
|
|
19
|
-
container.innerHTML = '';
|
|
20
|
-
buildPage(container, authn.currentUser() || null, context, subject);
|
|
21
|
-
};
|
|
22
|
-
authSession.events.on('login', () => {
|
|
23
|
-
// console.log('On Login')
|
|
24
|
-
runBuildPage();
|
|
25
|
-
});
|
|
26
|
-
authSession.events.on('sessionRestore', () => {
|
|
27
|
-
// console.log('On Session Restore')
|
|
28
|
-
runBuildPage();
|
|
29
|
-
});
|
|
30
|
-
// console.log('Initial Load')
|
|
31
|
-
runBuildPage();
|
|
32
|
-
return container;
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.dashboardPane = void 0;
|
|
7
|
+
var _solidUi = require("solid-ui");
|
|
8
|
+
var _solidLogic = require("solid-logic");
|
|
9
|
+
var _homepage = require("./homepage");
|
|
10
|
+
const dashboardPane = exports.dashboardPane = {
|
|
11
|
+
icon: _solidUi.icons.iconBase + 'noun_547570.svg',
|
|
12
|
+
name: 'dashboard',
|
|
13
|
+
label: subject => {
|
|
14
|
+
console.log();
|
|
15
|
+
if (subject.uri === subject.site().uri) {
|
|
16
|
+
return 'Dashboard';
|
|
33
17
|
}
|
|
18
|
+
return null;
|
|
19
|
+
},
|
|
20
|
+
render: (subject, context) => {
|
|
21
|
+
console.log('Dashboard Pane Render');
|
|
22
|
+
const dom = context.dom;
|
|
23
|
+
const container = dom.createElement('div');
|
|
24
|
+
const runBuildPage = () => {
|
|
25
|
+
container.innerHTML = '';
|
|
26
|
+
buildPage(container, _solidLogic.authn.currentUser() || null, context, subject);
|
|
27
|
+
};
|
|
28
|
+
_solidLogic.authSession.events.on('login', () => {
|
|
29
|
+
// console.log('On Login')
|
|
30
|
+
runBuildPage();
|
|
31
|
+
});
|
|
32
|
+
_solidLogic.authSession.events.on('sessionRestore', () => {
|
|
33
|
+
// console.log('On Session Restore')
|
|
34
|
+
runBuildPage();
|
|
35
|
+
});
|
|
36
|
+
// console.log('Initial Load')
|
|
37
|
+
runBuildPage();
|
|
38
|
+
return container;
|
|
39
|
+
}
|
|
34
40
|
};
|
|
35
41
|
function buildPage(container, webId, context, subject) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
// if uri then SolidOS is a browse.html web app
|
|
43
|
+
const uri = new URL(window.location.href).searchParams.get('uri');
|
|
44
|
+
if (webId && (uri || webId.site().uri === subject.site().uri)) {
|
|
45
|
+
return buildDashboard(container, context);
|
|
46
|
+
}
|
|
47
|
+
return buildHomePage(container, subject);
|
|
42
48
|
}
|
|
43
49
|
function buildDashboard(container, context) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
.getDashboard()
|
|
49
|
-
.then((dashboard) => container.appendChild(dashboard));
|
|
50
|
+
// console.log('build dashboard')
|
|
51
|
+
// @@ TODO get a proper type
|
|
52
|
+
const outliner = context.getOutliner(context.dom);
|
|
53
|
+
outliner.getDashboard().then(dashboard => container.appendChild(dashboard));
|
|
50
54
|
}
|
|
51
55
|
function buildHomePage(container, subject) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
// console.log('build home page')
|
|
57
|
+
const wrapper = document.createElement('div');
|
|
58
|
+
container.appendChild(wrapper);
|
|
59
|
+
const shadow = wrapper.attachShadow({
|
|
60
|
+
mode: 'open'
|
|
61
|
+
});
|
|
62
|
+
const link = document.createElement('link');
|
|
63
|
+
link.rel = 'stylesheet';
|
|
64
|
+
link.href = '/common/css/bootstrap.min.css';
|
|
65
|
+
shadow.appendChild(link);
|
|
66
|
+
(0, _homepage.generateHomepage)(subject, _solidLogic.store, _solidLogic.store.fetcher).then(homepage => shadow.appendChild(homepage));
|
|
61
67
|
}
|
|
62
|
-
|
|
68
|
+
var _default = exports.default = dashboardPane;
|
|
63
69
|
//# sourceMappingURL=dashboardPane.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboardPane.js","
|
|
1
|
+
{"version":3,"file":"dashboardPane.js","names":["_solidUi","require","_solidLogic","_homepage","dashboardPane","exports","icon","icons","iconBase","name","label","subject","console","log","uri","site","render","context","dom","container","createElement","runBuildPage","innerHTML","buildPage","authn","currentUser","authSession","events","on","webId","URL","window","location","href","searchParams","get","buildDashboard","buildHomePage","outliner","getOutliner","getDashboard","then","dashboard","appendChild","wrapper","document","shadow","attachShadow","mode","link","rel","generateHomepage","store","fetcher","homepage","_default","default"],"sources":["../../src/dashboard/dashboardPane.ts"],"sourcesContent":["import { icons } from 'solid-ui'\nimport { authn, authSession, store } from 'solid-logic'\nimport { Fetcher, NamedNode } from 'rdflib'\nimport { generateHomepage } from './homepage'\nimport { DataBrowserContext, PaneDefinition } from 'pane-registry'\n\nexport const dashboardPane: PaneDefinition = {\n icon: icons.iconBase + 'noun_547570.svg',\n name: 'dashboard',\n label: subject => {\n console.log()\n if (subject.uri === subject.site().uri) {\n return 'Dashboard'\n }\n return null\n },\n render: (subject, context) => {\n console.log('Dashboard Pane Render')\n const dom = context.dom\n const container = dom.createElement('div')\n const runBuildPage = () => {\n container.innerHTML = ''\n buildPage(\n container,\n authn.currentUser() || null,\n context,\n subject\n )\n }\n\n authSession.events.on('login', () => {\n // console.log('On Login')\n runBuildPage()\n })\n authSession.events.on('sessionRestore', () => {\n // console.log('On Session Restore')\n runBuildPage()\n })\n // console.log('Initial Load')\n runBuildPage()\n\n return container\n }\n}\n\nfunction buildPage (\n container: HTMLElement,\n webId: NamedNode | null,\n context: DataBrowserContext,\n subject: NamedNode\n) {\n // if uri then SolidOS is a browse.html web app\n const uri = (new URL(window.location.href)).searchParams.get('uri')\n if (webId && (uri || webId.site().uri === subject.site().uri)) {\n return buildDashboard(container, context)\n }\n return buildHomePage(container, subject)\n}\n\nfunction buildDashboard (container: HTMLElement, context: DataBrowserContext) {\n // console.log('build dashboard')\n // @@ TODO get a proper type\n const outliner: any = context.getOutliner(context.dom)\n outliner\n .getDashboard()\n .then((dashboard: HTMLElement) => container.appendChild(dashboard))\n}\n\nfunction buildHomePage (container: HTMLElement, subject: NamedNode) {\n // console.log('build home page')\n const wrapper = document.createElement('div')\n container.appendChild(wrapper)\n const shadow = wrapper.attachShadow({ mode: 'open' })\n const link = document.createElement('link')\n link.rel = 'stylesheet'\n link.href = '/common/css/bootstrap.min.css'\n shadow.appendChild(link)\n generateHomepage(subject, store, store.fetcher as Fetcher).then(homepage =>\n shadow.appendChild(homepage)\n )\n}\n\nexport default dashboardPane\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAF,OAAA;AAGO,MAAMG,aAA6B,GAAAC,OAAA,CAAAD,aAAA,GAAG;EAC3CE,IAAI,EAAEC,cAAK,CAACC,QAAQ,GAAG,iBAAiB;EACxCC,IAAI,EAAE,WAAW;EACjBC,KAAK,EAAEC,OAAO,IAAI;IAChBC,OAAO,CAACC,GAAG,CAAC,CAAC;IACb,IAAIF,OAAO,CAACG,GAAG,KAAKH,OAAO,CAACI,IAAI,CAAC,CAAC,CAACD,GAAG,EAAE;MACtC,OAAO,WAAW;IACpB;IACA,OAAO,IAAI;EACb,CAAC;EACDE,MAAM,EAAEA,CAACL,OAAO,EAAEM,OAAO,KAAK;IAC5BL,OAAO,CAACC,GAAG,CAAC,uBAAuB,CAAC;IACpC,MAAMK,GAAG,GA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CACdC,IAAI,CAAEC,SAAsB,IAAKvB,SAAS,CAACwB,WAAW,CAACD,SAAS,CAAC,CAAC;AACvE;AAEA,SAASL,aAAaA,CAAElB,SAAsB,EAAER,OAAkB,EAAE;EAClE;EACA,MAAMiC,OAAO,GAAGC,QAAQ,CAACzB,aAAa,CAAC,KAAK,CAAC;EAC7CD,SAAS,CAACwB,WAAW,CAACC,OAAO,CAAC;EAC9B,MAAME,MAAM,GAAGF,OAAO,CAACG,YAAY,CAAC;IAAEC,IAAI,EAAE;EAAO,CAAC,CAAC;EACrD,MAAMC,IAAI,GAAGJ,QAAQ,CAACzB,aAAa,CAAC,MAAM,CAAC;EAC3C6B,IAAI,CAACC,GAAG,GAAG,YAAY;EACvBD,IAAI,CAAChB,IAAI,GAAG,+BAA+B;EAC3Ca,MAAM,CAACH,WAAW,CAACM,IAAI,CAAC;EACxB,IAAAE,0BAAgB,EAACxC,OAAO,EAAEyC,iBAAK,EAAEA,iBAAK,CAACC,OAAkB,CAAC,CAACZ,IAAI,CAACa,QAAQ,IACtER,MAAM,CAACH,WAAW,CAACW,QAAQ,CAC7B,CAAC;AACH;AAAC,IAAAC,QAAA,GAAAlD,OAAA,CAAAmD,OAAA,GAEcpD,aAAa","ignoreList":[]}
|
|
@@ -1,63 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
wrapper.classList.add('container');
|
|
18
|
-
wrapper.appendChild(createTitle(ownersProfile.uri, name));
|
|
19
|
-
wrapper.appendChild(createDataSection(name));
|
|
20
|
-
return wrapper;
|
|
21
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.generateHomepage = generateHomepage;
|
|
7
|
+
var _rdflib = require("rdflib");
|
|
8
|
+
var _solidUi = require("solid-ui");
|
|
9
|
+
async function generateHomepage(subject, store, fetcher) {
|
|
10
|
+
const ownersProfile = await loadProfile(subject, fetcher);
|
|
11
|
+
const name = getName(store, ownersProfile);
|
|
12
|
+
const wrapper = document.createElement('div');
|
|
13
|
+
wrapper.classList.add('container');
|
|
14
|
+
wrapper.appendChild(createTitle(ownersProfile.uri, name));
|
|
15
|
+
wrapper.appendChild(createDataSection(name));
|
|
16
|
+
return wrapper;
|
|
22
17
|
}
|
|
23
18
|
function createDataSection(name) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
19
|
+
const dataSection = document.createElement('section');
|
|
20
|
+
const title = document.createElement('h2');
|
|
21
|
+
title.innerText = 'Data';
|
|
22
|
+
dataSection.appendChild(title);
|
|
23
|
+
const listGroup = document.createElement('div');
|
|
24
|
+
listGroup.classList.add('list-group');
|
|
25
|
+
dataSection.appendChild(listGroup);
|
|
26
|
+
const publicDataLink = document.createElement('a');
|
|
27
|
+
publicDataLink.classList.add('list-group-item');
|
|
28
|
+
publicDataLink.href = window.document.location.href + 'public/';
|
|
29
|
+
publicDataLink.innerText = `View ${name}'s files`;
|
|
30
|
+
listGroup.appendChild(publicDataLink);
|
|
31
|
+
return dataSection;
|
|
37
32
|
}
|
|
38
33
|
function createTitle(uri, name) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
34
|
+
const profileLink = document.createElement('a');
|
|
35
|
+
profileLink.href = uri;
|
|
36
|
+
profileLink.innerText = name;
|
|
37
|
+
const profileLinkPost = document.createElement('span');
|
|
38
|
+
profileLinkPost.innerText = '\'s Pod';
|
|
39
|
+
const title = document.createElement('h1');
|
|
40
|
+
title.appendChild(profileLink);
|
|
41
|
+
title.appendChild(profileLinkPost);
|
|
42
|
+
return title;
|
|
48
43
|
}
|
|
49
|
-
function loadProfile(subject, fetcher) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return webId;
|
|
56
|
-
});
|
|
44
|
+
async function loadProfile(subject, fetcher) {
|
|
45
|
+
const pod = subject.site().uri;
|
|
46
|
+
// TODO: This is a hack - we cannot assume that the profile is at this document, but we will live with it for now
|
|
47
|
+
const webId = (0, _rdflib.sym)(`${pod}profile/card#me`);
|
|
48
|
+
await fetcher.load(webId);
|
|
49
|
+
return webId;
|
|
57
50
|
}
|
|
58
51
|
function getName(store, ownersProfile) {
|
|
59
|
-
|
|
60
|
-
store.anyValue(ownersProfile, ns.foaf('name'), null, ownersProfile.doc()) ||
|
|
61
|
-
new URL(ownersProfile.uri).host.split('.')[0]);
|
|
52
|
+
return store.anyValue(ownersProfile, _solidUi.ns.vcard('fn'), null, ownersProfile.doc()) || store.anyValue(ownersProfile, _solidUi.ns.foaf('name'), null, ownersProfile.doc()) || new URL(ownersProfile.uri).host.split('.')[0];
|
|
62
53
|
}
|
|
63
54
|
//# sourceMappingURL=homepage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"homepage.js","
|
|
1
|
+
{"version":3,"file":"homepage.js","names":["_rdflib","require","_solidUi","generateHomepage","subject","store","fetcher","ownersProfile","loadProfile","name","getName","wrapper","document","createElement","classList","add","appendChild","createTitle","uri","createDataSection","dataSection","title","innerText","listGroup","publicDataLink","href","window","location","profileLink","profileLinkPost","pod","site","webId","sym","load","anyValue","ns","vcard","doc","foaf","URL","host","split"],"sources":["../../src/dashboard/homepage.ts"],"sourcesContent":["import { Fetcher, IndexedFormula, NamedNode, sym } from 'rdflib'\nimport { ns } from 'solid-ui'\n\nexport async function generateHomepage (\n subject: NamedNode,\n store: IndexedFormula,\n fetcher: Fetcher\n): Promise<HTMLElement> {\n const ownersProfile = await loadProfile(subject, fetcher)\n const name = getName(store, ownersProfile)\n\n const wrapper = document.createElement('div')\n wrapper.classList.add('container')\n wrapper.appendChild(createTitle(ownersProfile.uri, name))\n wrapper.appendChild(createDataSection(name))\n\n return wrapper\n}\n\nfunction createDataSection (name: string): HTMLElement {\n const dataSection = document.createElement('section')\n\n const title = document.createElement('h2')\n title.innerText = 'Data'\n dataSection.appendChild(title)\n\n const listGroup = document.createElement('div')\n listGroup.classList.add('list-group')\n dataSection.appendChild(listGroup)\n\n const publicDataLink = document.createElement('a')\n publicDataLink.classList.add('list-group-item')\n publicDataLink.href = window.document.location.href + 'public/'\n publicDataLink.innerText = `View ${name}'s files`\n listGroup.appendChild(publicDataLink)\n\n return dataSection\n}\n\nfunction createTitle (uri: string, name: string): HTMLElement {\n const profileLink = document.createElement('a')\n profileLink.href = uri\n profileLink.innerText = name\n\n const profileLinkPost = document.createElement('span')\n profileLinkPost.innerText = '\\'s Pod'\n\n const title = document.createElement('h1')\n title.appendChild(profileLink)\n title.appendChild(profileLinkPost)\n\n return title\n}\n\nasync function loadProfile (\n subject: NamedNode,\n fetcher: Fetcher\n): Promise<NamedNode> {\n const pod = subject.site().uri\n // TODO: This is a hack - we cannot assume that the profile is at this document, but we will live with it for now\n const webId = sym(`${pod}profile/card#me`)\n await fetcher.load(webId)\n return webId\n}\n\nfunction getName (store: IndexedFormula, ownersProfile: NamedNode): string {\n return (\n store.anyValue(ownersProfile, ns.vcard('fn'), null, ownersProfile.doc()) ||\n store.anyValue(ownersProfile, ns.foaf('name'), null, ownersProfile.doc()) ||\n new URL(ownersProfile.uri).host.split('.')[0]\n )\n}\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAEO,eAAeE,gBAAgBA,CACpCC,OAAkB,EAClBC,KAA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