chat-pane 2.4.17 → 2.4.18
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/longChatPane.js +217 -169
- package/dist/longChatPane.js.map +1 -1
- package/dist/main.js +217 -169
- package/dist/main.js.map +1 -1
- package/dist/shortChatPane.js +217 -169
- package/dist/shortChatPane.js.map +1 -1
- package/package.json +8 -8
package/dist/main.js
CHANGED
|
@@ -3137,6 +3137,31 @@ function freeze(object, oc) {
|
|
|
3137
3137
|
return oc && typeof oc.freeze === 'function' ? oc.freeze(object) : object
|
|
3138
3138
|
}
|
|
3139
3139
|
|
|
3140
|
+
/**
|
|
3141
|
+
* Since we can not rely on `Object.assign` we provide a simplified version
|
|
3142
|
+
* that is sufficient for our needs.
|
|
3143
|
+
*
|
|
3144
|
+
* @param {Object} target
|
|
3145
|
+
* @param {Object | null | undefined} source
|
|
3146
|
+
*
|
|
3147
|
+
* @returns {Object} target
|
|
3148
|
+
* @throws TypeError if target is not an object
|
|
3149
|
+
*
|
|
3150
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
|
|
3151
|
+
* @see https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign
|
|
3152
|
+
*/
|
|
3153
|
+
function assign(target, source) {
|
|
3154
|
+
if (target === null || typeof target !== 'object') {
|
|
3155
|
+
throw new TypeError('target is not an object')
|
|
3156
|
+
}
|
|
3157
|
+
for (var key in source) {
|
|
3158
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
3159
|
+
target[key] = source[key]
|
|
3160
|
+
}
|
|
3161
|
+
}
|
|
3162
|
+
return target
|
|
3163
|
+
}
|
|
3164
|
+
|
|
3140
3165
|
/**
|
|
3141
3166
|
* All mime types that are allowed as input to `DOMParser.parseFromString`
|
|
3142
3167
|
*
|
|
@@ -3254,6 +3279,7 @@ var NAMESPACE = freeze({
|
|
|
3254
3279
|
XMLNS: 'http://www.w3.org/2000/xmlns/',
|
|
3255
3280
|
})
|
|
3256
3281
|
|
|
3282
|
+
exports.assign = assign;
|
|
3257
3283
|
exports.freeze = freeze;
|
|
3258
3284
|
exports.MIME_TYPE = MIME_TYPE;
|
|
3259
3285
|
exports.NAMESPACE = NAMESPACE;
|
|
@@ -4788,9 +4814,10 @@ function needNamespaceDefine(node, isHTML, visibleNamespaces) {
|
|
|
4788
4814
|
* are serialized as their entity references, so they will be preserved.
|
|
4789
4815
|
* (In contrast to whitespace literals in the input which are normalized to spaces)
|
|
4790
4816
|
* @see https://www.w3.org/TR/xml11/#AVNormalize
|
|
4817
|
+
* @see https://w3c.github.io/DOM-Parsing/#serializing-an-element-s-attributes
|
|
4791
4818
|
*/
|
|
4792
4819
|
function addSerializedAttribute(buf, qualifiedName, value) {
|
|
4793
|
-
buf.push(' ', qualifiedName, '="', value.replace(/[
|
|
4820
|
+
buf.push(' ', qualifiedName, '="', value.replace(/[<>&"\t\n\r]/g, _xmlEncoder), '"')
|
|
4794
4821
|
}
|
|
4795
4822
|
|
|
4796
4823
|
function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){
|
|
@@ -4935,10 +4962,10 @@ function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){
|
|
|
4935
4962
|
* and does not include the CDATA-section-close delimiter, `]]>`.
|
|
4936
4963
|
*
|
|
4937
4964
|
* @see https://www.w3.org/TR/xml/#NT-CharData
|
|
4965
|
+
* @see https://w3c.github.io/DOM-Parsing/#xml-serializing-a-text-node
|
|
4938
4966
|
*/
|
|
4939
4967
|
return buf.push(node.data
|
|
4940
|
-
.replace(/[
|
|
4941
|
-
.replace(/]]>/g, ']]>')
|
|
4968
|
+
.replace(/[<&>]/g,_xmlEncoder)
|
|
4942
4969
|
);
|
|
4943
4970
|
case CDATA_SECTION_NODE:
|
|
4944
4971
|
return buf.push( '<![CDATA[',node.data,']]>');
|
|
@@ -44147,7 +44174,7 @@ function offlineTestID() {
|
|
|
44147
44174
|
return (0, rdflib_1.sym)($SolidTestEnvironment.username);
|
|
44148
44175
|
}
|
|
44149
44176
|
// hack that makes SolidOS work in offline mode by adding the webId directly in html
|
|
44150
|
-
// example usage: https://github.com/
|
|
44177
|
+
// example usage: https://github.com/solidos/mashlib/blob/29b8b53c46bf02e0e219f0bacd51b0e9951001dd/test/contact/local.html#L37
|
|
44151
44178
|
if (typeof document !== 'undefined' &&
|
|
44152
44179
|
document.location &&
|
|
44153
44180
|
('' + document.location).slice(0, 16) === 'http://localhost') {
|
|
@@ -45301,7 +45328,7 @@ var _fetch = function (url, requestInit) { return __awaiter(void 0, void 0, void
|
|
|
45301
45328
|
var omitCreds;
|
|
45302
45329
|
return __generator(this, function (_a) {
|
|
45303
45330
|
omitCreds = requestInit && requestInit.credentials && requestInit.credentials == 'omit';
|
|
45304
|
-
if (authSession_1.authSession.info.webId && !omitCreds) { // see https://github.com/
|
|
45331
|
+
if (authSession_1.authSession.info.webId && !omitCreds) { // see https://github.com/solidos/solidos/issues/114
|
|
45305
45332
|
// In fact ftech should respect crentials omit itself
|
|
45306
45333
|
return [2 /*return*/, authSession_1.authSession.fetch(url, requestInit)];
|
|
45307
45334
|
}
|
|
@@ -45532,7 +45559,7 @@ function ensureLoadedPreferences(context) {
|
|
|
45532
45559
|
* Resolves with the same context, outputting
|
|
45533
45560
|
* output: index.public, index.private
|
|
45534
45561
|
* @@ This is a very bizare function
|
|
45535
|
-
* @see https://github.com/
|
|
45562
|
+
* @see https://github.com/solidos/solid/blob/main/proposals/data-discovery.md#discoverability
|
|
45536
45563
|
*/
|
|
45537
45564
|
function loadIndex(context, isPublic) {
|
|
45538
45565
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -45595,7 +45622,7 @@ function loadTypeIndexes(context) {
|
|
|
45595
45622
|
exports.loadTypeIndexes = loadTypeIndexes;
|
|
45596
45623
|
/**
|
|
45597
45624
|
* Resolves with the same context, outputting
|
|
45598
|
-
* @see https://github.com/
|
|
45625
|
+
* @see https://github.com/solidos/solid/blob/main/proposals/data-discovery.md#discoverability
|
|
45599
45626
|
*/
|
|
45600
45627
|
function ensureTypeIndexes(context, agent) {
|
|
45601
45628
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -45623,7 +45650,7 @@ exports.ensureTypeIndexes = ensureTypeIndexes;
|
|
|
45623
45650
|
* Many reasons for failing including script not having permission etc
|
|
45624
45651
|
*
|
|
45625
45652
|
* Adds its output to the context
|
|
45626
|
-
* @see https://github.com/
|
|
45653
|
+
* @see https://github.com/solidos/solid/blob/main/proposals/data-discovery.md#discoverability
|
|
45627
45654
|
*/
|
|
45628
45655
|
function ensureOneTypeIndex(context, isPublic, agent) {
|
|
45629
45656
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -45776,7 +45803,7 @@ function registerInTypeIndex(context, instance, theClass, isPublic, agent // Def
|
|
|
45776
45803
|
index = indexes[0];
|
|
45777
45804
|
registration = (0, uri_1.newThing)(index);
|
|
45778
45805
|
ins = [
|
|
45779
|
-
// See https://github.com/
|
|
45806
|
+
// See https://github.com/solidos/solid/blob/main/proposals/data-discovery.md
|
|
45780
45807
|
(0, rdflib_1.st)(registration, exports.ns.rdf('type'), exports.ns.solid('TypeRegistration'), index),
|
|
45781
45808
|
(0, rdflib_1.st)(registration, exports.ns.solid('forClass'), theClass, index),
|
|
45782
45809
|
(0, rdflib_1.st)(registration, exports.ns.solid('instance'), instance, index)
|
|
@@ -45880,7 +45907,7 @@ var UtilityLogic = /** @class */ (function () {
|
|
|
45880
45907
|
});
|
|
45881
45908
|
});
|
|
45882
45909
|
};
|
|
45883
|
-
// Copied from https://github.com/
|
|
45910
|
+
// Copied from https://github.com/solidos/web-access-control-tests/blob/v3.0.0/test/surface/delete.test.ts#L5
|
|
45884
45911
|
UtilityLogic.prototype.setSinglePeerAccess = function (options) {
|
|
45885
45912
|
return __awaiter(this, void 0, void 0, function () {
|
|
45886
45913
|
var str, aclDocUrl;
|
|
@@ -45968,7 +45995,7 @@ var UtilityLogic = /** @class */ (function () {
|
|
|
45968
45995
|
headers: {
|
|
45969
45996
|
"Content-Type": "text/turtle",
|
|
45970
45997
|
"If-None-Match": "*",
|
|
45971
|
-
Link: '<http://www.w3.org/ns/ldp#BasicContainer>; rel="type"', // See https://github.com/
|
|
45998
|
+
Link: '<http://www.w3.org/ns/ldp#BasicContainer>; rel="type"', // See https://github.com/solidos/node-solid-server/issues/1465
|
|
45972
45999
|
},
|
|
45973
46000
|
body: " ", // work around https://github.com/michielbdejong/community-server/issues/4#issuecomment-776222863
|
|
45974
46001
|
})];
|
|
@@ -46428,7 +46455,7 @@ var AccessController = /*#__PURE__*/function () {
|
|
|
46428
46455
|
value: function renderTemporaryStatus(message) {
|
|
46429
46456
|
var _this5 = this;
|
|
46430
46457
|
|
|
46431
|
-
// @@ TODO Introduce better system for error notification to user https://github.com/
|
|
46458
|
+
// @@ TODO Introduce better system for error notification to user https://github.com/solidos/mashlib/issues/87
|
|
46432
46459
|
this.statusElement.classList.add(this.classes.aclControlBoxStatusRevealed);
|
|
46433
46460
|
this.statusElement.innerText = message;
|
|
46434
46461
|
this.statusElement.classList.add(this.classes.temporaryStatusInit);
|
|
@@ -46442,7 +46469,7 @@ var AccessController = /*#__PURE__*/function () {
|
|
|
46442
46469
|
}, {
|
|
46443
46470
|
key: "renderStatus",
|
|
46444
46471
|
value: function renderStatus(message) {
|
|
46445
|
-
// @@ TODO Introduce better system for error notification to user https://github.com/
|
|
46472
|
+
// @@ TODO Introduce better system for error notification to user https://github.com/solidos/mashlib/issues/87
|
|
46446
46473
|
this.statusElement.classList.toggle(this.classes.aclControlBoxStatusRevealed, !!message);
|
|
46447
46474
|
this.statusElement.innerText = message;
|
|
46448
46475
|
}
|
|
@@ -46764,7 +46791,7 @@ var EXPLANATION = {
|
|
|
46764
46791
|
|
|
46765
46792
|
/**
|
|
46766
46793
|
* Renders the table of Owners, Editors, Posters, Submitters, Viewers
|
|
46767
|
-
* for https://github.com/
|
|
46794
|
+
* for https://github.com/solidos/userguide/blob/main/views/sharing/userguide.md
|
|
46768
46795
|
*/
|
|
46769
46796
|
var AccessGroups = /*#__PURE__*/function () {
|
|
46770
46797
|
// @@ was LiveStore but does not need to be connected to web
|
|
@@ -47267,7 +47294,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
47267
47294
|
|
|
47268
47295
|
/**
|
|
47269
47296
|
* Functions for rendering the ACL User Interface.
|
|
47270
|
-
* See https://github.com/
|
|
47297
|
+
* See https://github.com/solidos/userguide/blob/main/views/sharing/userguide.md#view
|
|
47271
47298
|
* for a screenshot.
|
|
47272
47299
|
* @packageDocumentation
|
|
47273
47300
|
*/
|
|
@@ -47364,7 +47391,7 @@ function shortNameForFolder(x) {
|
|
|
47364
47391
|
if (slash >= 0) {
|
|
47365
47392
|
str = str.slice(slash + 1);
|
|
47366
47393
|
} // Return the folder's filename, or '/' if nothing found
|
|
47367
|
-
// (but see https://github.com/
|
|
47394
|
+
// (but see https://github.com/solidos/solid-ui/issues/196
|
|
47368
47395
|
// regarding whether this happens at the domain root or
|
|
47369
47396
|
// not)
|
|
47370
47397
|
|
|
@@ -47377,7 +47404,7 @@ function shortNameForFolder(x) {
|
|
|
47377
47404
|
* Presumably the '5' is a version number of some sort,
|
|
47378
47405
|
* but all we know is it was already called ACLControlBox5
|
|
47379
47406
|
* when it was introduced into solid-ui in
|
|
47380
|
-
* https://github.com/
|
|
47407
|
+
* https://github.com/solidos/solid-ui/commit/948b874bd93e7bf5160e6e224821b888f07d15f3#diff-4192a29f38a0ababd563b36b47eba5bbR54
|
|
47381
47408
|
*/
|
|
47382
47409
|
|
|
47383
47410
|
|
|
@@ -47494,13 +47521,13 @@ function getDirectory(doc) {
|
|
|
47494
47521
|
function isStorage(doc, aclDoc, store) {
|
|
47495
47522
|
// @@ TODO: The methods used for targetIsStorage are HACKs - it should not be relied upon, and work is
|
|
47496
47523
|
// @@ underway to standardize a behavior that does not rely upon this hack
|
|
47497
|
-
// @@ hopefully fixed as part of https://github.com/
|
|
47524
|
+
// @@ hopefully fixed as part of https://github.com/solidos/data-interoperability-panel/issues/10
|
|
47498
47525
|
return store.holds(doc, ns.rdf('type'), ns.space('Storage'), aclDoc);
|
|
47499
47526
|
}
|
|
47500
47527
|
|
|
47501
47528
|
function hasProtectedAcl(targetDoc) {
|
|
47502
47529
|
// @@ TODO: This is hacky way of knowing whether or not a certain ACL file can be removed
|
|
47503
|
-
// Hopefully we'll find a better, standardized solution to this - https://github.com/
|
|
47530
|
+
// Hopefully we'll find a better, standardized solution to this - https://github.com/solidos/specification/issues/37
|
|
47504
47531
|
return targetDoc.uri === targetDoc.site().uri;
|
|
47505
47532
|
}
|
|
47506
47533
|
/** @internal */
|
|
@@ -47569,7 +47596,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
47569
47596
|
|
|
47570
47597
|
/**
|
|
47571
47598
|
* Non-UI functions for access control.
|
|
47572
|
-
* See https://github.com/
|
|
47599
|
+
* See https://github.com/solidos/web-access-control-spec
|
|
47573
47600
|
* for the spec that defines how ACL documents work.
|
|
47574
47601
|
* @packageDocumentation
|
|
47575
47602
|
*/
|
|
@@ -48171,7 +48198,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
48171
48198
|
|
|
48172
48199
|
/**
|
|
48173
48200
|
* Renders the Sharing pane's "+" button and the menus behind it,
|
|
48174
|
-
* see https://github.com/
|
|
48201
|
+
* see https://github.com/solidos/userguide/blob/main/views/sharing/userguide.md#add
|
|
48175
48202
|
*/
|
|
48176
48203
|
var AddAgentButtons = /*#__PURE__*/function () {
|
|
48177
48204
|
function AddAgentButtons(groupList) {
|
|
@@ -48740,7 +48767,7 @@ exports.styles = void 0;
|
|
|
48740
48767
|
|
|
48741
48768
|
/**
|
|
48742
48769
|
* Contains CSS styles for the Sharing pane,
|
|
48743
|
-
* see https://github.com/
|
|
48770
|
+
* see https://github.com/solidos/userguide/blob/main/views/sharing/userguide.md
|
|
48744
48771
|
* @packageDocumentation
|
|
48745
48772
|
*/
|
|
48746
48773
|
var styles = {
|
|
@@ -53311,11 +53338,11 @@ var _debug = __webpack_require__(/*! ./debug */ "./node_modules/solid-ui/lib/deb
|
|
|
53311
53338
|
*
|
|
53312
53339
|
* You can also use it if you want to just run a mashlib whhich takes its
|
|
53313
53340
|
* icons seved by other than github.
|
|
53314
|
-
*/
|
|
53341
|
+
*/
|
|
53315
53342
|
|
|
53316
53343
|
/* eslint-disable multiline-ternary */
|
|
53317
53344
|
// Do not export. lways us this module to find the icons, as it varies
|
|
53318
|
-
var iconsOnGithub = 'https://
|
|
53345
|
+
var iconsOnGithub = 'https://solidos.github.io/solid-ui/src';
|
|
53319
53346
|
var icons = module.scriptURI // Firefox extension
|
|
53320
53347
|
? {
|
|
53321
53348
|
iconBase: module.scriptURI.slice(0, module.scriptURI.lastIndexOf('/')) + '/icons/',
|
|
@@ -53371,7 +53398,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
53371
53398
|
SOFTWARE.
|
|
53372
53399
|
|
|
53373
53400
|
If you would like to know more about the solid Solid project, please see
|
|
53374
|
-
https://github.com/
|
|
53401
|
+
https://github.com/solidos/solid
|
|
53375
53402
|
*/
|
|
53376
53403
|
|
|
53377
53404
|
/**
|
|
@@ -53645,7 +53672,7 @@ var stylesheetsMap = new Map();
|
|
|
53645
53672
|
/**
|
|
53646
53673
|
* returns a StyleSheet object.
|
|
53647
53674
|
* See https://cssinjs.org/ for more info about JSS.
|
|
53648
|
-
* (despite the name, see https://github.com/
|
|
53675
|
+
* (despite the name, see https://github.com/solidos/solid-ui/issues/199)
|
|
53649
53676
|
*/
|
|
53650
53677
|
|
|
53651
53678
|
function getClasses(insertionPoint, styles) {
|
|
@@ -53655,7 +53682,7 @@ function getClasses(insertionPoint, styles) {
|
|
|
53655
53682
|
/**
|
|
53656
53683
|
* returns a JSS object.
|
|
53657
53684
|
* See https://cssinjs.org/ for more info about JSS.
|
|
53658
|
-
* (despite the name, see https://github.com/
|
|
53685
|
+
* (despite the name, see https://github.com/solidos/solid-ui/issues/199)
|
|
53659
53686
|
*/
|
|
53660
53687
|
|
|
53661
53688
|
|
|
@@ -53992,6 +54019,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
53992
54019
|
|
|
53993
54020
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
53994
54021
|
|
|
54022
|
+
/* eslint-disable camelcase */
|
|
54023
|
+
|
|
53995
54024
|
/**
|
|
53996
54025
|
* Signing in, signing up, profile and preferences reloading
|
|
53997
54026
|
* Type index management
|
|
@@ -54018,10 +54047,10 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
54018
54047
|
*/
|
|
54019
54048
|
|
|
54020
54049
|
/**
|
|
54021
|
-
|
|
54022
|
-
|
|
54023
|
-
|
|
54024
|
-
|
|
54050
|
+
* Resolves with the logged in user's WebID
|
|
54051
|
+
*
|
|
54052
|
+
* @param context
|
|
54053
|
+
*/
|
|
54025
54054
|
// used to be logIn
|
|
54026
54055
|
function ensureLoggedIn(context) {
|
|
54027
54056
|
var me = _solidLogic.authn.currentUser();
|
|
@@ -54215,11 +54244,11 @@ function ensureLoadedProfile(_x3) {
|
|
|
54215
54244
|
return _ensureLoadedProfile.apply(this, arguments);
|
|
54216
54245
|
}
|
|
54217
54246
|
/**
|
|
54218
|
-
|
|
54219
|
-
|
|
54220
|
-
|
|
54221
|
-
|
|
54222
|
-
|
|
54247
|
+
* Returns promise of context with arrays of symbols
|
|
54248
|
+
*
|
|
54249
|
+
* 2016-12-11 change to include forClass arc a la
|
|
54250
|
+
* https://github.com/solid/solid/blob/main/proposals/data-discovery.md
|
|
54251
|
+
*/
|
|
54223
54252
|
|
|
54224
54253
|
|
|
54225
54254
|
function _ensureLoadedProfile() {
|
|
@@ -54287,8 +54316,8 @@ function findAppInstances(_x4, _x5, _x6) {
|
|
|
54287
54316
|
return _findAppInstances.apply(this, arguments);
|
|
54288
54317
|
}
|
|
54289
54318
|
/**
|
|
54290
|
-
|
|
54291
|
-
|
|
54319
|
+
* UI to control registration of instance
|
|
54320
|
+
*/
|
|
54292
54321
|
|
|
54293
54322
|
|
|
54294
54323
|
function _findAppInstances() {
|
|
@@ -54437,8 +54466,8 @@ function registrationControl(_x7, _x8, _x9) {
|
|
|
54437
54466
|
return _registrationControl.apply(this, arguments);
|
|
54438
54467
|
}
|
|
54439
54468
|
/**
|
|
54440
|
-
|
|
54441
|
-
|
|
54469
|
+
* UI to List at all registered things
|
|
54470
|
+
*/
|
|
54442
54471
|
|
|
54443
54472
|
|
|
54444
54473
|
function _registrationControl() {
|
|
@@ -54664,14 +54693,14 @@ function getDefaultSignInButtonStyle() {
|
|
|
54664
54693
|
return 'padding: 1em; border-radius:0.5em; font-size: 100%;';
|
|
54665
54694
|
}
|
|
54666
54695
|
/**
|
|
54667
|
-
|
|
54668
|
-
|
|
54669
|
-
|
|
54670
|
-
|
|
54671
|
-
|
|
54672
|
-
|
|
54673
|
-
|
|
54674
|
-
|
|
54696
|
+
* Bootstrapping identity
|
|
54697
|
+
* (Called by `loginStatusBox()`)
|
|
54698
|
+
*
|
|
54699
|
+
* @param dom
|
|
54700
|
+
* @param setUserCallback
|
|
54701
|
+
*
|
|
54702
|
+
* @returns
|
|
54703
|
+
*/
|
|
54675
54704
|
|
|
54676
54705
|
|
|
54677
54706
|
function signInOrSignUpBox(dom, setUserCallback) {
|
|
@@ -54749,8 +54778,8 @@ function signInOrSignUpBox(dom, setUserCallback) {
|
|
|
54749
54778
|
|
|
54750
54779
|
function renderSignInPopup(dom) {
|
|
54751
54780
|
/**
|
|
54752
|
-
|
|
54753
|
-
|
|
54781
|
+
* Issuer Menu
|
|
54782
|
+
*/
|
|
54754
54783
|
var issuerPopup = dom.createElement('div');
|
|
54755
54784
|
issuerPopup.setAttribute('style', 'position: fixed; top: 0; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: center;');
|
|
54756
54785
|
dom.body.appendChild(issuerPopup);
|
|
@@ -54764,7 +54793,7 @@ function renderSignInPopup(dom) {
|
|
|
54764
54793
|
issuerPopupBoxLabel.setAttribute('style', 'margin-right: 5px; font-weight: 800');
|
|
54765
54794
|
issuerPopupBoxLabel.innerText = 'Select an identity provider';
|
|
54766
54795
|
var issuerPopupBoxCloseButton = dom.createElement('button');
|
|
54767
|
-
issuerPopupBoxCloseButton.innerHTML = '<img src="https://
|
|
54796
|
+
issuerPopupBoxCloseButton.innerHTML = '<img src="https://solidos.github.io/solid-ui/src/icons/noun_1180156.svg" style="width: 2em; height: 2em;" title="Cancel">';
|
|
54768
54797
|
issuerPopupBoxCloseButton.setAttribute('style', 'background-color: transparent; border: none;');
|
|
54769
54798
|
issuerPopupBoxCloseButton.addEventListener('click', function () {
|
|
54770
54799
|
issuerPopup.remove();
|
|
@@ -54817,8 +54846,8 @@ function renderSignInPopup(dom) {
|
|
|
54817
54846
|
};
|
|
54818
54847
|
}();
|
|
54819
54848
|
/**
|
|
54820
|
-
|
|
54821
|
-
|
|
54849
|
+
* Text-based idp selection
|
|
54850
|
+
*/
|
|
54822
54851
|
|
|
54823
54852
|
|
|
54824
54853
|
var issuerTextContainer = dom.createElement('div');
|
|
@@ -54845,8 +54874,8 @@ function renderSignInPopup(dom) {
|
|
|
54845
54874
|
issuerTextContainer.appendChild(issuerTextInputContainer);
|
|
54846
54875
|
issuerPopupBox.appendChild(issuerTextContainer);
|
|
54847
54876
|
/**
|
|
54848
|
-
|
|
54849
|
-
|
|
54877
|
+
* Button-based idp selection
|
|
54878
|
+
*/
|
|
54850
54879
|
|
|
54851
54880
|
var issuerButtonContainer = dom.createElement('div');
|
|
54852
54881
|
issuerButtonContainer.setAttribute('style', "\n display: flex;\n flex-direction: column;\n padding-top: 10px;\n ");
|
|
@@ -54866,15 +54895,15 @@ function renderSignInPopup(dom) {
|
|
|
54866
54895
|
issuerPopupBox.appendChild(issuerButtonContainer);
|
|
54867
54896
|
}
|
|
54868
54897
|
/**
|
|
54869
|
-
|
|
54870
|
-
|
|
54871
|
-
|
|
54872
|
-
|
|
54873
|
-
|
|
54874
|
-
|
|
54875
|
-
|
|
54876
|
-
|
|
54877
|
-
|
|
54898
|
+
* Login status box
|
|
54899
|
+
*
|
|
54900
|
+
* A big sign-up/sign in box or a logout box depending on the state
|
|
54901
|
+
*
|
|
54902
|
+
* @param dom
|
|
54903
|
+
* @param listener
|
|
54904
|
+
*
|
|
54905
|
+
* @returns
|
|
54906
|
+
*/
|
|
54878
54907
|
|
|
54879
54908
|
|
|
54880
54909
|
function loginStatusBox(dom) {
|
|
@@ -55035,28 +55064,28 @@ _solidLogic.authSession.onLogout( /*#__PURE__*/(0, _asyncToGenerator2["default"]
|
|
|
55035
55064
|
}, _callee2, null, [[2, 17]]);
|
|
55036
55065
|
})));
|
|
55037
55066
|
/**
|
|
55038
|
-
|
|
55039
|
-
|
|
55040
|
-
|
|
55067
|
+
* Workspace selection etc
|
|
55068
|
+
* See https://github.com/solidos/userguide/issues/16
|
|
55069
|
+
*/
|
|
55041
55070
|
|
|
55042
55071
|
/**
|
|
55043
|
-
|
|
55044
|
-
|
|
55045
|
-
|
|
55046
|
-
|
|
55047
|
-
|
|
55048
|
-
|
|
55049
|
-
|
|
55050
|
-
|
|
55051
|
-
|
|
55052
|
-
|
|
55053
|
-
|
|
55054
|
-
|
|
55055
|
-
|
|
55056
|
-
|
|
55057
|
-
|
|
55058
|
-
|
|
55059
|
-
|
|
55072
|
+
* Returns a UI object which, if it selects a workspace,
|
|
55073
|
+
* will callback(workspace, newBase).
|
|
55074
|
+
* See https://github.com/solidos/userguide/issues/16 for more info on workspaces.
|
|
55075
|
+
*
|
|
55076
|
+
* If necessary, will get an account, preference file, etc. In sequence:
|
|
55077
|
+
*
|
|
55078
|
+
* - If not logged in, log in.
|
|
55079
|
+
* - Load preference file
|
|
55080
|
+
* - Prompt user for workspaces
|
|
55081
|
+
* - Allows the user to just type in a URI by hand
|
|
55082
|
+
*
|
|
55083
|
+
* Calls back with the workspace and the base URI
|
|
55084
|
+
*
|
|
55085
|
+
* @param dom
|
|
55086
|
+
* @param appDetails
|
|
55087
|
+
* @param callbackWS
|
|
55088
|
+
*/
|
|
55060
55089
|
|
|
55061
55090
|
|
|
55062
55091
|
function selectWorkspace(dom, appDetails, callbackWS) {
|
|
@@ -55319,21 +55348,21 @@ function selectWorkspace(dom, appDetails, callbackWS) {
|
|
|
55319
55348
|
} // selectWorkspace
|
|
55320
55349
|
|
|
55321
55350
|
/**
|
|
55322
|
-
|
|
55323
|
-
|
|
55324
|
-
|
|
55325
|
-
|
|
55326
|
-
|
|
55327
|
-
|
|
55328
|
-
|
|
55329
|
-
|
|
55330
|
-
|
|
55331
|
-
|
|
55332
|
-
|
|
55333
|
-
|
|
55334
|
-
|
|
55335
|
-
|
|
55336
|
-
|
|
55351
|
+
* Creates a new instance of an app.
|
|
55352
|
+
*
|
|
55353
|
+
* An instance of an app could be e.g. an issue tracker for a given project,
|
|
55354
|
+
* or a chess game, or calendar, or a health/fitness record for a person.
|
|
55355
|
+
*
|
|
55356
|
+
* Note that this use of the term 'app' refers more to entries in the user's
|
|
55357
|
+
* type index than to actual software applications that use the personal data
|
|
55358
|
+
* to which these entries point.
|
|
55359
|
+
*
|
|
55360
|
+
* @param dom
|
|
55361
|
+
* @param appDetails
|
|
55362
|
+
* @param callback
|
|
55363
|
+
*
|
|
55364
|
+
* @returns A div with a button in it for making a new app instance
|
|
55365
|
+
*/
|
|
55337
55366
|
|
|
55338
55367
|
|
|
55339
55368
|
function newAppInstance(dom, appDetails, callback) {
|
|
@@ -57614,7 +57643,7 @@ function participationObject(subject, padDoc, me) {
|
|
|
57614
57643
|
});
|
|
57615
57644
|
|
|
57616
57645
|
if (parps.length > 1) {
|
|
57617
|
-
// This can happen. https://github.com/
|
|
57646
|
+
// This can happen. https://github.com/solidos/chat-pane/issues/71
|
|
57618
57647
|
var candidates = [];
|
|
57619
57648
|
|
|
57620
57649
|
var _iterator = _createForOfIteratorHelper(parps),
|
|
@@ -59959,7 +59988,7 @@ var TabElement = /*#__PURE__*/function (_HTMLElement3) {
|
|
|
59959
59988
|
/**
|
|
59960
59989
|
* Use this widget to generate tabs from triples set in the global store.
|
|
59961
59990
|
*
|
|
59962
|
-
* [Here you can see examples of the tabs](https://
|
|
59991
|
+
* [Here you can see examples of the tabs](https://solidos.github.io/solid-ui/examples/tabs/).
|
|
59963
59992
|
*
|
|
59964
59993
|
* It assumes that items to use for tabs will be in a collection by default,
|
|
59965
59994
|
* e.g.:
|
|
@@ -60139,7 +60168,9 @@ function tabWidget(options) {
|
|
|
60139
60168
|
var selectedTabURI = options.selectedTab.uri;
|
|
60140
60169
|
var selectedTab1 = Array.from(tabContainer.children) // @ts-ignore
|
|
60141
60170
|
.find(function (tab) {
|
|
60142
|
-
return tab.subject &&
|
|
60171
|
+
return tab.subject && // @ts-ignore
|
|
60172
|
+
tab.subject.uri && // @ts-ignore
|
|
60173
|
+
tab.subject.uri === selectedTabURI;
|
|
60143
60174
|
});
|
|
60144
60175
|
var tab = selectedTab1 || selectedTab0 || tabContainer.children[0];
|
|
60145
60176
|
var clickMe = tab.firstChild; // @ts-ignore
|
|
@@ -60154,7 +60185,7 @@ function tabWidget(options) {
|
|
|
60154
60185
|
function addCancelButton(tabContainer) {
|
|
60155
60186
|
if (tabContainer.dataset.onCloseSet) {
|
|
60156
60187
|
// @@ TODO: this is only here to make the browser tests work
|
|
60157
|
-
// Discussion at https://github.com/
|
|
60188
|
+
// Discussion at https://github.com/solidos/solid-ui/pull/110#issuecomment-527080663
|
|
60158
60189
|
var existingCancelButton = tabContainer.querySelector('.unstyled');
|
|
60159
60190
|
tabContainer.removeChild(existingCancelButton);
|
|
60160
60191
|
}
|
|
@@ -60443,94 +60474,115 @@ function getPodOwner(_x, _x2) {
|
|
|
60443
60474
|
|
|
60444
60475
|
function _getPodOwner() {
|
|
60445
60476
|
_getPodOwner = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(pod, store) {
|
|
60446
|
-
var podOwner, guess;
|
|
60477
|
+
var response, containerTurtle, podOwner, guess;
|
|
60447
60478
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
60448
60479
|
while (1) {
|
|
60449
60480
|
switch (_context.prev = _context.next) {
|
|
60450
60481
|
case 0:
|
|
60451
60482
|
_context.prev = 0;
|
|
60452
|
-
|
|
60453
|
-
store.
|
|
60454
|
-
|
|
60455
|
-
|
|
60483
|
+
|
|
60484
|
+
if (store.any(pod, null, _.ns.ldp('Container'), pod)) {
|
|
60485
|
+
_context.next = 7;
|
|
60486
|
+
break;
|
|
60487
|
+
}
|
|
60488
|
+
|
|
60489
|
+
_context.next = 4;
|
|
60490
|
+
return store.fetcher.webOperation('GET', pod.uri, store.fetcher.initFetchOptions(pod.uri, {
|
|
60491
|
+
headers: {
|
|
60492
|
+
accept: 'text/turtle'
|
|
60493
|
+
}
|
|
60494
|
+
}));
|
|
60456
60495
|
|
|
60457
60496
|
case 4:
|
|
60458
|
-
|
|
60497
|
+
response = _context.sent;
|
|
60498
|
+
containerTurtle = response.responseText;
|
|
60499
|
+
(0, _rdflib.parse)(containerTurtle, store, pod.uri, 'text/turtle');
|
|
60500
|
+
|
|
60501
|
+
case 7:
|
|
60502
|
+
_context.next = 13;
|
|
60503
|
+
break;
|
|
60504
|
+
|
|
60505
|
+
case 9:
|
|
60506
|
+
_context.prev = 9;
|
|
60459
60507
|
_context.t0 = _context["catch"](0);
|
|
60460
60508
|
console.error('Error loading pod ' + pod + ': ' + _context.t0);
|
|
60461
60509
|
return _context.abrupt("return", null);
|
|
60462
60510
|
|
|
60463
|
-
case
|
|
60511
|
+
case 13:
|
|
60464
60512
|
if (store.holds(pod, _.ns.rdf('type'), _.ns.space('Storage'), pod)) {
|
|
60465
|
-
_context.next =
|
|
60513
|
+
_context.next = 16;
|
|
60466
60514
|
break;
|
|
60467
60515
|
}
|
|
60468
60516
|
|
|
60469
60517
|
console.warn('Pod ' + pod + ' does not declare itself as a space:Storage');
|
|
60470
60518
|
return _context.abrupt("return", null);
|
|
60471
60519
|
|
|
60472
|
-
case
|
|
60520
|
+
case 16:
|
|
60473
60521
|
podOwner = store.any(pod, _.ns.solid('owner'), null, pod) || store.any(null, _.ns.space('storage'), pod, pod);
|
|
60474
60522
|
|
|
60475
60523
|
if (!podOwner) {
|
|
60476
|
-
_context.next =
|
|
60524
|
+
_context.next = 31;
|
|
60477
60525
|
break;
|
|
60478
60526
|
}
|
|
60479
60527
|
|
|
60480
|
-
_context.prev =
|
|
60481
|
-
// @ts-ignore LiveStore always has fetcher
|
|
60482
|
-
store.fetcher.load(podOwner.doc());
|
|
60528
|
+
_context.prev = 18;
|
|
60483
60529
|
_context.next = 21;
|
|
60530
|
+
return store.fetcher.load(podOwner.doc());
|
|
60531
|
+
|
|
60532
|
+
case 21:
|
|
60533
|
+
_context.next = 27;
|
|
60484
60534
|
break;
|
|
60485
60535
|
|
|
60486
|
-
case
|
|
60487
|
-
_context.prev =
|
|
60488
|
-
_context.t1 = _context["catch"](
|
|
60536
|
+
case 23:
|
|
60537
|
+
_context.prev = 23;
|
|
60538
|
+
_context.t1 = _context["catch"](18);
|
|
60489
60539
|
console.warn('Unable to load profile of pod owner ' + podOwner);
|
|
60490
60540
|
return _context.abrupt("return", null);
|
|
60491
60541
|
|
|
60492
|
-
case
|
|
60542
|
+
case 27:
|
|
60493
60543
|
if (!store.holds(podOwner, _.ns.space('storage'), pod, podOwner.doc())) {
|
|
60494
60544
|
console.warn("Pod owner ".concat(podOwner, " does NOT list pod ").concat(pod, " as their storage"));
|
|
60495
60545
|
}
|
|
60496
60546
|
|
|
60497
60547
|
return _context.abrupt("return", podOwner);
|
|
60498
60548
|
|
|
60499
|
-
case
|
|
60549
|
+
case 31:
|
|
60500
60550
|
// pod owner not declared in pod
|
|
60501
60551
|
// @@ TODO: This is given the structure that NSS provides
|
|
60502
60552
|
// This is a massive guess. For old pods which don't have owner link
|
|
60503
60553
|
guess = (0, _rdflib.sym)("".concat(pod.uri, "profile/card#me"));
|
|
60504
|
-
_context.prev =
|
|
60505
|
-
|
|
60506
|
-
store.fetcher.load(guess);
|
|
60507
|
-
|
|
60554
|
+
_context.prev = 32;
|
|
60555
|
+
_context.next = 35;
|
|
60556
|
+
return store.fetcher.load(guess);
|
|
60557
|
+
|
|
60558
|
+
case 35:
|
|
60559
|
+
_context.next = 41;
|
|
60508
60560
|
break;
|
|
60509
60561
|
|
|
60510
|
-
case
|
|
60511
|
-
_context.prev =
|
|
60512
|
-
_context.t2 = _context["catch"](
|
|
60562
|
+
case 37:
|
|
60563
|
+
_context.prev = 37;
|
|
60564
|
+
_context.t2 = _context["catch"](32);
|
|
60513
60565
|
console.error('Ooops. Guessed wrong pod owner webid {$guess} : can\'t load it.');
|
|
60514
60566
|
return _context.abrupt("return", null);
|
|
60515
60567
|
|
|
60516
|
-
case
|
|
60568
|
+
case 41:
|
|
60517
60569
|
if (!store.holds(guess, _.ns.space('storage'), pod, guess.doc())) {
|
|
60518
|
-
_context.next =
|
|
60570
|
+
_context.next = 44;
|
|
60519
60571
|
break;
|
|
60520
60572
|
}
|
|
60521
60573
|
|
|
60522
60574
|
console.warn('Using guessed pod owner webid but it links back.');
|
|
60523
60575
|
return _context.abrupt("return", guess);
|
|
60524
60576
|
|
|
60525
|
-
case
|
|
60577
|
+
case 44:
|
|
60526
60578
|
return _context.abrupt("return", null);
|
|
60527
60579
|
|
|
60528
|
-
case
|
|
60580
|
+
case 45:
|
|
60529
60581
|
case "end":
|
|
60530
60582
|
return _context.stop();
|
|
60531
60583
|
}
|
|
60532
60584
|
}
|
|
60533
|
-
}, _callee, null, [[0,
|
|
60585
|
+
}, _callee, null, [[0, 9], [18, 23], [32, 37]]);
|
|
60534
60586
|
}));
|
|
60535
60587
|
return _getPodOwner.apply(this, arguments);
|
|
60536
60588
|
}
|
|
@@ -61376,28 +61428,26 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
61376
61428
|
}));
|
|
61377
61429
|
exports.versionInfo = void 0;
|
|
61378
61430
|
var versionInfo = {
|
|
61379
|
-
buildTime: '2022-
|
|
61380
|
-
commit: '
|
|
61431
|
+
buildTime: '2022-04-14T16:35:17Z',
|
|
61432
|
+
commit: 'deb2e922d6e6ae79a8dc9b2702fefa134ba9c14a',
|
|
61381
61433
|
npmInfo: {
|
|
61382
|
-
'solid-ui': '2.4.
|
|
61383
|
-
npm: '
|
|
61384
|
-
|
|
61385
|
-
v8: '9.4.146.24-node.20',
|
|
61386
|
-
uv: '1.43.0',
|
|
61387
|
-
zlib: '1.2.11',
|
|
61434
|
+
'solid-ui': '2.4.21',
|
|
61435
|
+
npm: '6.14.13',
|
|
61436
|
+
ares: '1.17.1',
|
|
61388
61437
|
brotli: '1.0.9',
|
|
61389
|
-
|
|
61390
|
-
|
|
61391
|
-
|
|
61438
|
+
cldr: '39.0',
|
|
61439
|
+
icu: '69.1',
|
|
61440
|
+
llhttp: '2.1.3',
|
|
61441
|
+
modules: '83',
|
|
61392
61442
|
napi: '8',
|
|
61393
|
-
|
|
61394
|
-
|
|
61395
|
-
|
|
61396
|
-
|
|
61397
|
-
|
|
61398
|
-
|
|
61399
|
-
|
|
61400
|
-
|
|
61443
|
+
nghttp2: '1.42.0',
|
|
61444
|
+
node: '14.17.3',
|
|
61445
|
+
openssl: '1.1.1k',
|
|
61446
|
+
tz: '2021a',
|
|
61447
|
+
unicode: '13.0',
|
|
61448
|
+
uv: '1.41.0',
|
|
61449
|
+
v8: '8.4.371.23-node.67',
|
|
61450
|
+
zlib: '1.2.11'
|
|
61401
61451
|
}
|
|
61402
61452
|
};
|
|
61403
61453
|
exports.versionInfo = versionInfo;
|
|
@@ -63198,7 +63248,7 @@ function uploadFiles(fetcher, files, fileBase, imageBase, successHandler) {
|
|
|
63198
63248
|
} else {
|
|
63199
63249
|
var extension = mime.extension(theFile.type); // Note not simple: eg .mp3 => audio/mpeg; .mpga => audio/mpeg; audio/mp3 => .mp3
|
|
63200
63250
|
|
|
63201
|
-
if (extension && !theFile.name.endsWith('.' + extension) && // Not already has preferred extension? and ...
|
|
63251
|
+
if (extension && extension !== 'false' && !theFile.name.endsWith('.' + extension) && // Not already has preferred extension? and ...
|
|
63202
63252
|
theFile.type !== mime.lookup(theFile.name)) {
|
|
63203
63253
|
// the mime type of this ext is not the right one?
|
|
63204
63254
|
suffix = '_.' + extension; // console.log('MIME TYPE MISMATCH: ' + mime.lookup(theFile.name) + ': adding extension: ' + suffix)
|
|
@@ -66962,7 +67012,7 @@ function queryESCODataByName(_x, _x2, _x3) {
|
|
|
66962
67012
|
*
|
|
66963
67013
|
* Wikidata bug: https://phabricator.wikimedia.org/T283962
|
|
66964
67014
|
* This will not be needed whn that WDQS bug fixed.
|
|
66965
|
-
* This is aptured in https://github.com/
|
|
67015
|
+
* This is aptured in https://github.com/solidos/solid-ui/issues/403
|
|
66966
67016
|
*/
|
|
66967
67017
|
|
|
66968
67018
|
|
|
@@ -77803,8 +77853,9 @@ class LocalJWKSet {
|
|
|
77803
77853
|
}
|
|
77804
77854
|
async getKey(protectedHeader, token) {
|
|
77805
77855
|
const { alg, kid } = { ...protectedHeader, ...token.header };
|
|
77856
|
+
const kty = getKtyFromAlg(alg);
|
|
77806
77857
|
const candidates = this._jwks.keys.filter((jwk) => {
|
|
77807
|
-
let candidate =
|
|
77858
|
+
let candidate = kty === jwk.kty;
|
|
77808
77859
|
if (candidate && typeof kid === 'string') {
|
|
77809
77860
|
candidate = kid === jwk.kid;
|
|
77810
77861
|
}
|
|
@@ -79021,21 +79072,15 @@ function lengthAndInput(input) {
|
|
|
79021
79072
|
}
|
|
79022
79073
|
async function concatKdf(secret, bits, value) {
|
|
79023
79074
|
const iterations = Math.ceil((bits >> 3) / 32);
|
|
79024
|
-
|
|
79025
|
-
for (let iter =
|
|
79075
|
+
const res = new Uint8Array(iterations * 32);
|
|
79076
|
+
for (let iter = 0; iter < iterations; iter++) {
|
|
79026
79077
|
const buf = new Uint8Array(4 + secret.length + value.length);
|
|
79027
|
-
buf.set(uint32be(iter));
|
|
79078
|
+
buf.set(uint32be(iter + 1));
|
|
79028
79079
|
buf.set(secret, 4);
|
|
79029
79080
|
buf.set(value, 4 + secret.length);
|
|
79030
|
-
|
|
79031
|
-
res = await (0,_runtime_digest_js__WEBPACK_IMPORTED_MODULE_0__["default"])('sha256', buf);
|
|
79032
|
-
}
|
|
79033
|
-
else {
|
|
79034
|
-
res = concat(res, await (0,_runtime_digest_js__WEBPACK_IMPORTED_MODULE_0__["default"])('sha256', buf));
|
|
79035
|
-
}
|
|
79081
|
+
res.set(await (0,_runtime_digest_js__WEBPACK_IMPORTED_MODULE_0__["default"])('sha256', buf), iter * 32);
|
|
79036
79082
|
}
|
|
79037
|
-
|
|
79038
|
-
return res;
|
|
79083
|
+
return res.slice(0, bits >> 3);
|
|
79039
79084
|
}
|
|
79040
79085
|
|
|
79041
79086
|
|
|
@@ -80250,9 +80295,12 @@ const encode = (input) => {
|
|
|
80250
80295
|
return encodeBase64(input).replace(/=/g, '').replace(/\+/g, '-').replace(/\//g, '_');
|
|
80251
80296
|
};
|
|
80252
80297
|
const decodeBase64 = (encoded) => {
|
|
80253
|
-
|
|
80254
|
-
|
|
80255
|
-
|
|
80298
|
+
const binary = atob(encoded);
|
|
80299
|
+
const bytes = new Uint8Array(binary.length);
|
|
80300
|
+
for (let i = 0; i < binary.length; i++) {
|
|
80301
|
+
bytes[i] = binary.charCodeAt(i);
|
|
80302
|
+
}
|
|
80303
|
+
return bytes;
|
|
80256
80304
|
};
|
|
80257
80305
|
const decode = (input) => {
|
|
80258
80306
|
let encoded = input;
|