@peerbit/any-store-opfs 1.1.7 → 1.1.9
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.
|
@@ -13,7 +13,11 @@
|
|
|
13
13
|
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
14
14
|
});
|
|
15
15
|
var __commonJS = (cb, mod) => function __require2() {
|
|
16
|
-
|
|
16
|
+
try {
|
|
17
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
18
|
+
} catch (e) {
|
|
19
|
+
throw mod = 0, e;
|
|
20
|
+
}
|
|
17
21
|
};
|
|
18
22
|
var __copyProps = (to, from2, except, desc) => {
|
|
19
23
|
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
@@ -226,11 +230,12 @@
|
|
|
226
230
|
}
|
|
227
231
|
});
|
|
228
232
|
|
|
229
|
-
// ../../../../node_modules/.pnpm/@protobufjs+utf8@1.1.
|
|
233
|
+
// ../../../../node_modules/.pnpm/@protobufjs+utf8@1.1.2/node_modules/@protobufjs/utf8/index.js
|
|
230
234
|
var require_utf8 = __commonJS({
|
|
231
|
-
"../../../../node_modules/.pnpm/@protobufjs+utf8@1.1.
|
|
235
|
+
"../../../../node_modules/.pnpm/@protobufjs+utf8@1.1.2/node_modules/@protobufjs/utf8/index.js"(exports) {
|
|
232
236
|
"use strict";
|
|
233
237
|
var utf82 = exports;
|
|
238
|
+
var replacementCharCode = 65533;
|
|
234
239
|
utf82.length = function utf8_length(string) {
|
|
235
240
|
var len = 0, c = 0;
|
|
236
241
|
for (var i = 0; i < string.length; ++i) {
|
|
@@ -248,24 +253,31 @@
|
|
|
248
253
|
return len;
|
|
249
254
|
};
|
|
250
255
|
utf82.read = function utf8_read(buffer, start, end) {
|
|
251
|
-
|
|
252
|
-
if (len < 1)
|
|
256
|
+
if (end - start < 1)
|
|
253
257
|
return "";
|
|
254
|
-
var parts = null, chunk = [], i = 0, t;
|
|
258
|
+
var parts = null, chunk = [], i = 0, t, t2, c2, c3;
|
|
255
259
|
while (start < end) {
|
|
256
260
|
t = buffer[start++];
|
|
257
|
-
if (t
|
|
261
|
+
if (t <= 127) {
|
|
258
262
|
chunk[i++] = t;
|
|
259
|
-
else if (t
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
chunk[i++] =
|
|
265
|
-
} else
|
|
266
|
-
|
|
263
|
+
} else if (t >= 192 && t < 224) {
|
|
264
|
+
c2 = (t & 31) << 6 | buffer[start++] & 63;
|
|
265
|
+
chunk[i++] = c2 >= 128 ? c2 : replacementCharCode;
|
|
266
|
+
} else if (t >= 224 && t < 240) {
|
|
267
|
+
c3 = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;
|
|
268
|
+
chunk[i++] = c3 >= 2048 ? c3 : replacementCharCode;
|
|
269
|
+
} else if (t >= 240) {
|
|
270
|
+
t2 = (t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;
|
|
271
|
+
if (t2 < 65536 || t2 > 1114111)
|
|
272
|
+
chunk[i++] = replacementCharCode;
|
|
273
|
+
else {
|
|
274
|
+
t2 -= 65536;
|
|
275
|
+
chunk[i++] = 55296 + (t2 >> 10);
|
|
276
|
+
chunk[i++] = 56320 + (t2 & 1023);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
267
279
|
if (i > 8191) {
|
|
268
|
-
(parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
|
|
280
|
+
(parts || (parts = [])).push(String.fromCharCode.apply(String, chunk.slice(0, i)));
|
|
269
281
|
i = 0;
|
|
270
282
|
}
|
|
271
283
|
}
|
|
@@ -6162,8 +6174,8 @@
|
|
|
6162
6174
|
|
|
6163
6175
|
// ../../../../node_modules/.pnpm/@dao-xyz+borsh@6.0.1/node_modules/@dao-xyz/borsh/lib/esm/index.js
|
|
6164
6176
|
var _a;
|
|
6165
|
-
var symbolMetadataSymbol = Symbol.metadata ?? Symbol.for("Symbol.metadata");
|
|
6166
|
-
var STAGE3_FINALIZERS_SYMBOL = Symbol.for("@dao-xyz/stage3-finalizers");
|
|
6177
|
+
var symbolMetadataSymbol = Symbol.metadata ?? /* @__PURE__ */ Symbol.for("Symbol.metadata");
|
|
6178
|
+
var STAGE3_FINALIZERS_SYMBOL = /* @__PURE__ */ Symbol.for("@dao-xyz/stage3-finalizers");
|
|
6167
6179
|
var metadataFinalizers = (_a = globalThis)[STAGE3_FINALIZERS_SYMBOL] ?? (_a[STAGE3_FINALIZERS_SYMBOL] = []);
|
|
6168
6180
|
var metadataValueStore = /* @__PURE__ */ new WeakMap();
|
|
6169
6181
|
var runMetadataFinalizers = (ctor, metadata) => {
|
|
@@ -6183,8 +6195,8 @@
|
|
|
6183
6195
|
value: symbolMetadataSymbol
|
|
6184
6196
|
});
|
|
6185
6197
|
}
|
|
6186
|
-
var REQUIRES_VARIANT_FLAG = Symbol.for("@dao-xyz/borsh:requires-variant");
|
|
6187
|
-
var VARIANT_ALREADY_READ = Symbol.for("@dao-xyz/borsh:variant-read");
|
|
6198
|
+
var REQUIRES_VARIANT_FLAG = /* @__PURE__ */ Symbol.for("@dao-xyz/borsh:requires-variant");
|
|
6199
|
+
var VARIANT_ALREADY_READ = /* @__PURE__ */ Symbol.for("@dao-xyz/borsh:variant-read");
|
|
6188
6200
|
var STAGE3_GUARD_FLAG = "__borsh_ts_rpc_stage_3_initialized";
|
|
6189
6201
|
if (!globalThis[STAGE3_GUARD_FLAG]) {
|
|
6190
6202
|
const originalDefineProperty = Object.defineProperty;
|
|
@@ -6209,7 +6221,7 @@
|
|
|
6209
6221
|
});
|
|
6210
6222
|
globalThis[STAGE3_GUARD_FLAG] = true;
|
|
6211
6223
|
}
|
|
6212
|
-
var BORSH_STAGE3_METADATA_KEY = Symbol.for("@dao-xyz/borsh:stage3-decorators");
|
|
6224
|
+
var BORSH_STAGE3_METADATA_KEY = /* @__PURE__ */ Symbol.for("@dao-xyz/borsh:stage3-decorators");
|
|
6213
6225
|
function isStage3DecoratorContext(value) {
|
|
6214
6226
|
return !!value && typeof value === "object" && typeof value.kind === "string";
|
|
6215
6227
|
}
|
|
@@ -6864,47 +6876,50 @@
|
|
|
6864
6876
|
arr.length = newSize;
|
|
6865
6877
|
};
|
|
6866
6878
|
|
|
6867
|
-
// ../../../../node_modules/.pnpm/uuid@
|
|
6879
|
+
// ../../../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm-browser/stringify.js
|
|
6868
6880
|
var byteToHex = [];
|
|
6869
|
-
for (i = 0; i < 256; ++i) {
|
|
6881
|
+
for (let i = 0; i < 256; ++i) {
|
|
6870
6882
|
byteToHex.push((i + 256).toString(16).slice(1));
|
|
6871
6883
|
}
|
|
6872
|
-
var i;
|
|
6873
6884
|
function unsafeStringify(arr, offset = 0) {
|
|
6874
6885
|
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
6875
6886
|
}
|
|
6876
6887
|
|
|
6877
|
-
// ../../../../node_modules/.pnpm/uuid@
|
|
6888
|
+
// ../../../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm-browser/rng.js
|
|
6878
6889
|
var getRandomValues;
|
|
6879
6890
|
var rnds8 = new Uint8Array(16);
|
|
6880
6891
|
function rng() {
|
|
6881
6892
|
if (!getRandomValues) {
|
|
6882
|
-
|
|
6883
|
-
if (!getRandomValues) {
|
|
6893
|
+
if (typeof crypto === "undefined" || !crypto.getRandomValues) {
|
|
6884
6894
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
6885
6895
|
}
|
|
6896
|
+
getRandomValues = crypto.getRandomValues.bind(crypto);
|
|
6886
6897
|
}
|
|
6887
6898
|
return getRandomValues(rnds8);
|
|
6888
6899
|
}
|
|
6889
6900
|
|
|
6890
|
-
// ../../../../node_modules/.pnpm/uuid@
|
|
6901
|
+
// ../../../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm-browser/native.js
|
|
6891
6902
|
var randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
6892
|
-
var native_default = {
|
|
6893
|
-
randomUUID
|
|
6894
|
-
};
|
|
6903
|
+
var native_default = { randomUUID };
|
|
6895
6904
|
|
|
6896
|
-
// ../../../../node_modules/.pnpm/uuid@
|
|
6905
|
+
// ../../../../node_modules/.pnpm/uuid@11.1.1/node_modules/uuid/dist/esm-browser/v4.js
|
|
6897
6906
|
function v4(options, buf, offset) {
|
|
6898
6907
|
if (native_default.randomUUID && !buf && !options) {
|
|
6899
6908
|
return native_default.randomUUID();
|
|
6900
6909
|
}
|
|
6901
6910
|
options = options || {};
|
|
6902
|
-
|
|
6911
|
+
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
6912
|
+
if (rnds.length < 16) {
|
|
6913
|
+
throw new Error("Random bytes length must be >= 16");
|
|
6914
|
+
}
|
|
6903
6915
|
rnds[6] = rnds[6] & 15 | 64;
|
|
6904
6916
|
rnds[8] = rnds[8] & 63 | 128;
|
|
6905
6917
|
if (buf) {
|
|
6906
6918
|
offset = offset || 0;
|
|
6907
|
-
|
|
6919
|
+
if (offset < 0 || offset + 16 > buf.length) {
|
|
6920
|
+
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
6921
|
+
}
|
|
6922
|
+
for (let i = 0; i < 16; ++i) {
|
|
6908
6923
|
buf[offset + i] = rnds[i];
|
|
6909
6924
|
}
|
|
6910
6925
|
return buf;
|