@graffiti-garden/wrapper-vue 1.0.4 → 1.0.8
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/browser/plugin.mjs +1272 -628
- package/dist/browser/plugin.mjs.map +1 -1
- package/dist/node/components/ObjectInfo.vue.d.ts.map +1 -1
- package/dist/node/composables/discover.d.ts.map +1 -1
- package/dist/node/composables/resolve-string.d.ts.map +1 -1
- package/dist/node/plugin.d.ts.map +1 -1
- package/dist/node/plugin.js +1 -1
- package/dist/node/plugin.js.map +1 -1
- package/dist/node/plugin.mjs +967 -332
- package/dist/node/plugin.mjs.map +1 -1
- package/package.json +5 -5
- package/src/components/Discover.vue +1 -1
- package/src/components/GetMedia.vue +2 -2
- package/src/components/ObjectInfo.vue +53 -69
- package/src/composables/discover.ts +4 -2
- package/src/composables/resolve-string.ts +2 -3
package/dist/browser/plugin.mjs
CHANGED
|
@@ -1,158 +1,823 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
|
|
1
|
+
import { ref as S, onScopeDispose as _e, watch as H, toValue as j, defineComponent as R, toRef as k, renderSlot as X, unref as v, createElementVNode as m, toDisplayString as E, createElementBlock as b, openBlock as g, createCommentVNode as Ee, createTextVNode as Se, createVNode as F, Fragment as ve, renderList as ye } from "vue";
|
|
2
|
+
class T extends Error {
|
|
3
3
|
constructor(n) {
|
|
4
|
-
super(n), this.name = "GraffitiErrorNotFound", Object.setPrototypeOf(this,
|
|
4
|
+
super(n), this.name = "GraffitiErrorNotFound", Object.setPrototypeOf(this, T.prototype);
|
|
5
5
|
}
|
|
6
|
-
}
|
|
6
|
+
}
|
|
7
|
+
class ze extends Error {
|
|
7
8
|
constructor(n) {
|
|
8
|
-
super(n), this.name = "GraffitiErrorInvalidSchema", Object.setPrototypeOf(this,
|
|
9
|
+
super(n), this.name = "GraffitiErrorInvalidSchema", Object.setPrototypeOf(this, ze.prototype);
|
|
9
10
|
}
|
|
10
|
-
}
|
|
11
|
-
|
|
11
|
+
}
|
|
12
|
+
class Pe extends Error {
|
|
13
|
+
constructor(n) {
|
|
14
|
+
super(n), this.name = "GraffitiErrorCursorExpired", Object.setPrototypeOf(this, Pe.prototype);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function he(e) {
|
|
12
18
|
return typeof e == "string" ? e : e.url;
|
|
13
19
|
}
|
|
14
|
-
function
|
|
15
|
-
return
|
|
20
|
+
function Je(e, n) {
|
|
21
|
+
return (
|
|
22
|
+
// If there is no allowed list, the actor is allowed.
|
|
23
|
+
!Array.isArray(e.allowed) || // Otherwise...
|
|
24
|
+
typeof n?.actor == "string" && // The actor must be the creator of the object
|
|
25
|
+
(e.actor === n.actor || // Or be on the allowed list
|
|
26
|
+
e.allowed.includes(n.actor))
|
|
27
|
+
);
|
|
16
28
|
}
|
|
17
|
-
function
|
|
29
|
+
function Ke(e, n, t) {
|
|
18
30
|
if (t === e.actor) return e;
|
|
19
|
-
|
|
20
|
-
return {
|
|
31
|
+
const r = e.allowed && t ? [t] : void 0, i = e.channels.filter((o) => n.includes(o));
|
|
32
|
+
return {
|
|
33
|
+
...e,
|
|
34
|
+
allowed: r,
|
|
35
|
+
channels: i
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
let pe;
|
|
39
|
+
async function Qe(e) {
|
|
40
|
+
if (!pe) {
|
|
41
|
+
const { default: n } = await import("./ajv-D_HICdxS.mjs").then((t) => t.a);
|
|
42
|
+
pe = new n({ strict: !1 });
|
|
43
|
+
}
|
|
44
|
+
try {
|
|
45
|
+
return pe.compile(e);
|
|
46
|
+
} catch (n) {
|
|
47
|
+
throw new ze(
|
|
48
|
+
n instanceof Error ? n.message : String(n)
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function w(e, n, t) {
|
|
53
|
+
function r(u, c) {
|
|
54
|
+
if (u._zod || Object.defineProperty(u, "_zod", {
|
|
55
|
+
value: {
|
|
56
|
+
def: c,
|
|
57
|
+
constr: s,
|
|
58
|
+
traits: /* @__PURE__ */ new Set()
|
|
59
|
+
},
|
|
60
|
+
enumerable: !1
|
|
61
|
+
}), u._zod.traits.has(e))
|
|
62
|
+
return;
|
|
63
|
+
u._zod.traits.add(e), n(u, c);
|
|
64
|
+
const a = s.prototype, f = Object.keys(a);
|
|
65
|
+
for (let d = 0; d < f.length; d++) {
|
|
66
|
+
const l = f[d];
|
|
67
|
+
l in u || (u[l] = a[l].bind(u));
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
const i = t?.Parent ?? Object;
|
|
71
|
+
class o extends i {
|
|
72
|
+
}
|
|
73
|
+
Object.defineProperty(o, "name", { value: e });
|
|
74
|
+
function s(u) {
|
|
75
|
+
var c;
|
|
76
|
+
const a = t?.Parent ? new o() : this;
|
|
77
|
+
r(a, u), (c = a._zod).deferred ?? (c.deferred = []);
|
|
78
|
+
for (const f of a._zod.deferred)
|
|
79
|
+
f();
|
|
80
|
+
return a;
|
|
81
|
+
}
|
|
82
|
+
return Object.defineProperty(s, "init", { value: r }), Object.defineProperty(s, Symbol.hasInstance, {
|
|
83
|
+
value: (u) => t?.Parent && u instanceof t.Parent ? !0 : u?._zod?.traits?.has(e)
|
|
84
|
+
}), Object.defineProperty(s, "name", { value: e }), s;
|
|
85
|
+
}
|
|
86
|
+
class L extends Error {
|
|
87
|
+
constructor() {
|
|
88
|
+
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
const Ye = {};
|
|
92
|
+
function se(e) {
|
|
93
|
+
return Ye;
|
|
21
94
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
95
|
+
function et(e, n) {
|
|
96
|
+
return typeof n == "bigint" ? n.toString() : n;
|
|
97
|
+
}
|
|
98
|
+
function tt(e) {
|
|
99
|
+
return {
|
|
100
|
+
get value() {
|
|
101
|
+
{
|
|
102
|
+
const n = e();
|
|
103
|
+
return Object.defineProperty(this, "value", { value: n }), n;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function nt(e) {
|
|
109
|
+
const n = e.startsWith("^") ? 1 : 0, t = e.endsWith("$") ? e.length - 1 : e.length;
|
|
110
|
+
return e.slice(n, t);
|
|
111
|
+
}
|
|
112
|
+
const xe = /* @__PURE__ */ Symbol("evaluating");
|
|
113
|
+
function W(e, n, t) {
|
|
114
|
+
let r;
|
|
115
|
+
Object.defineProperty(e, n, {
|
|
116
|
+
get() {
|
|
117
|
+
if (r !== xe)
|
|
118
|
+
return r === void 0 && (r = xe, r = t()), r;
|
|
119
|
+
},
|
|
120
|
+
set(i) {
|
|
121
|
+
Object.defineProperty(e, n, {
|
|
122
|
+
value: i
|
|
123
|
+
// configurable: true,
|
|
124
|
+
});
|
|
125
|
+
},
|
|
126
|
+
configurable: !0
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
const Ze = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
130
|
+
};
|
|
131
|
+
function rt(e) {
|
|
132
|
+
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
133
|
+
}
|
|
134
|
+
function ot(e, n, t) {
|
|
135
|
+
const r = new e._zod.constr(n ?? e._zod.def);
|
|
136
|
+
return (!n || t?.parent) && (r._zod.parent = e), r;
|
|
137
|
+
}
|
|
138
|
+
function J(e) {
|
|
139
|
+
return {};
|
|
140
|
+
}
|
|
141
|
+
function it(e) {
|
|
142
|
+
return Object.keys(e).filter((n) => e[n]._zod.optin === "optional" && e[n]._zod.optout === "optional");
|
|
143
|
+
}
|
|
144
|
+
const st = {
|
|
145
|
+
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
146
|
+
int32: [-2147483648, 2147483647],
|
|
147
|
+
uint32: [0, 4294967295],
|
|
148
|
+
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
149
|
+
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
150
|
+
};
|
|
151
|
+
function Y(e, n = 0) {
|
|
152
|
+
if (e.aborted === !0)
|
|
153
|
+
return !0;
|
|
154
|
+
for (let t = n; t < e.issues.length; t++)
|
|
155
|
+
if (e.issues[t]?.continue !== !0)
|
|
156
|
+
return !0;
|
|
157
|
+
return !1;
|
|
158
|
+
}
|
|
159
|
+
function Ie(e, n) {
|
|
160
|
+
return n.map((t) => {
|
|
161
|
+
var r;
|
|
162
|
+
return (r = t).path ?? (r.path = []), t.path.unshift(e), t;
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
function ee(e) {
|
|
166
|
+
return typeof e == "string" ? e : e?.message;
|
|
167
|
+
}
|
|
168
|
+
function ue(e, n, t) {
|
|
169
|
+
const r = { ...e, path: e.path ?? [] };
|
|
170
|
+
if (!e.message) {
|
|
171
|
+
const i = ee(e.inst?._zod.def?.error?.(e)) ?? ee(n?.error?.(e)) ?? ee(t.customError?.(e)) ?? ee(t.localeError?.(e)) ?? "Invalid input";
|
|
172
|
+
r.message = i;
|
|
173
|
+
}
|
|
174
|
+
return delete r.inst, delete r.continue, n?.reportInput || delete r.input, r;
|
|
175
|
+
}
|
|
176
|
+
const Re = (e, n) => {
|
|
177
|
+
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
178
|
+
value: e._zod,
|
|
179
|
+
enumerable: !1
|
|
180
|
+
}), Object.defineProperty(e, "issues", {
|
|
181
|
+
value: n,
|
|
182
|
+
enumerable: !1
|
|
183
|
+
}), e.message = JSON.stringify(n, et, 2), Object.defineProperty(e, "toString", {
|
|
184
|
+
value: () => e.message,
|
|
185
|
+
enumerable: !1
|
|
186
|
+
});
|
|
187
|
+
}, ut = w("$ZodError", Re), ae = w("$ZodError", Re, { Parent: Error }), at = (e) => (n, t, r, i) => {
|
|
188
|
+
const o = r ? Object.assign(r, { async: !1 }) : { async: !1 }, s = n._zod.run({ value: t, issues: [] }, o);
|
|
189
|
+
if (s instanceof Promise)
|
|
190
|
+
throw new L();
|
|
191
|
+
if (s.issues.length) {
|
|
192
|
+
const u = new (i?.Err ?? e)(s.issues.map((c) => ue(c, o, se())));
|
|
193
|
+
throw Ze(u, i?.callee), u;
|
|
194
|
+
}
|
|
195
|
+
return s.value;
|
|
196
|
+
}, ct = /* @__PURE__ */ at(ae), lt = (e) => async (n, t, r, i) => {
|
|
197
|
+
const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
198
|
+
let s = n._zod.run({ value: t, issues: [] }, o);
|
|
199
|
+
if (s instanceof Promise && (s = await s), s.issues.length) {
|
|
200
|
+
const u = new (i?.Err ?? e)(s.issues.map((c) => ue(c, o, se())));
|
|
201
|
+
throw Ze(u, i?.callee), u;
|
|
202
|
+
}
|
|
203
|
+
return s.value;
|
|
204
|
+
}, ft = /* @__PURE__ */ lt(ae), dt = (e) => (n, t, r) => {
|
|
205
|
+
const i = r ? { ...r, async: !1 } : { async: !1 }, o = n._zod.run({ value: t, issues: [] }, i);
|
|
206
|
+
if (o instanceof Promise)
|
|
207
|
+
throw new L();
|
|
208
|
+
return o.issues.length ? {
|
|
209
|
+
success: !1,
|
|
210
|
+
error: new (e ?? ut)(o.issues.map((s) => ue(s, i, se())))
|
|
211
|
+
} : { success: !0, data: o.value };
|
|
212
|
+
}, Ce = /* @__PURE__ */ dt(ae), ht = (e) => async (n, t, r) => {
|
|
213
|
+
const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
214
|
+
let o = n._zod.run({ value: t, issues: [] }, i);
|
|
215
|
+
return o instanceof Promise && (o = await o), o.issues.length ? {
|
|
216
|
+
success: !1,
|
|
217
|
+
error: new e(o.issues.map((s) => ue(s, i, se())))
|
|
218
|
+
} : { success: !0, data: o.value };
|
|
219
|
+
}, De = /* @__PURE__ */ ht(ae), pt = (e) => {
|
|
220
|
+
const n = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
221
|
+
return new RegExp(`^${n}$`);
|
|
222
|
+
}, mt = /^-?\d+$/, vt = /^-?\d+(?:\.\d+)?$/, Ue = /* @__PURE__ */ w("$ZodCheck", (e, n) => {
|
|
223
|
+
var t;
|
|
224
|
+
e._zod ?? (e._zod = {}), e._zod.def = n, (t = e._zod).onattach ?? (t.onattach = []);
|
|
225
|
+
}), yt = {
|
|
226
|
+
number: "number",
|
|
227
|
+
bigint: "bigint",
|
|
228
|
+
object: "date"
|
|
229
|
+
}, bt = /* @__PURE__ */ w("$ZodCheckGreaterThan", (e, n) => {
|
|
230
|
+
Ue.init(e, n);
|
|
231
|
+
const t = yt[typeof n.value];
|
|
232
|
+
e._zod.onattach.push((r) => {
|
|
233
|
+
const i = r._zod.bag, o = (n.inclusive ? i.minimum : i.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
234
|
+
n.value > o && (n.inclusive ? i.minimum = n.value : i.exclusiveMinimum = n.value);
|
|
235
|
+
}), e._zod.check = (r) => {
|
|
236
|
+
(n.inclusive ? r.value >= n.value : r.value > n.value) || r.issues.push({
|
|
237
|
+
origin: t,
|
|
238
|
+
code: "too_small",
|
|
239
|
+
minimum: typeof n.value == "object" ? n.value.getTime() : n.value,
|
|
240
|
+
input: r.value,
|
|
241
|
+
inclusive: n.inclusive,
|
|
242
|
+
inst: e,
|
|
243
|
+
continue: !n.abort
|
|
244
|
+
});
|
|
245
|
+
};
|
|
246
|
+
}), gt = /* @__PURE__ */ w("$ZodCheckNumberFormat", (e, n) => {
|
|
247
|
+
Ue.init(e, n), n.format = n.format || "float64";
|
|
248
|
+
const t = n.format?.includes("int"), r = t ? "int" : "number", [i, o] = st[n.format];
|
|
249
|
+
e._zod.onattach.push((s) => {
|
|
250
|
+
const u = s._zod.bag;
|
|
251
|
+
u.format = n.format, u.minimum = i, u.maximum = o, t && (u.pattern = mt);
|
|
252
|
+
}), e._zod.check = (s) => {
|
|
253
|
+
const u = s.value;
|
|
254
|
+
if (t) {
|
|
255
|
+
if (!Number.isInteger(u)) {
|
|
256
|
+
s.issues.push({
|
|
257
|
+
expected: r,
|
|
258
|
+
format: n.format,
|
|
259
|
+
code: "invalid_type",
|
|
260
|
+
continue: !1,
|
|
261
|
+
input: u,
|
|
262
|
+
inst: e
|
|
263
|
+
});
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
if (!Number.isSafeInteger(u)) {
|
|
267
|
+
u > 0 ? s.issues.push({
|
|
268
|
+
input: u,
|
|
269
|
+
code: "too_big",
|
|
270
|
+
maximum: Number.MAX_SAFE_INTEGER,
|
|
271
|
+
note: "Integers must be within the safe integer range.",
|
|
272
|
+
inst: e,
|
|
273
|
+
origin: r,
|
|
274
|
+
inclusive: !0,
|
|
275
|
+
continue: !n.abort
|
|
276
|
+
}) : s.issues.push({
|
|
277
|
+
input: u,
|
|
278
|
+
code: "too_small",
|
|
279
|
+
minimum: Number.MIN_SAFE_INTEGER,
|
|
280
|
+
note: "Integers must be within the safe integer range.",
|
|
281
|
+
inst: e,
|
|
282
|
+
origin: r,
|
|
283
|
+
inclusive: !0,
|
|
284
|
+
continue: !n.abort
|
|
285
|
+
});
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
u < i && s.issues.push({
|
|
290
|
+
origin: "number",
|
|
291
|
+
input: u,
|
|
292
|
+
code: "too_small",
|
|
293
|
+
minimum: i,
|
|
294
|
+
inclusive: !0,
|
|
295
|
+
inst: e,
|
|
296
|
+
continue: !n.abort
|
|
297
|
+
}), u > o && s.issues.push({
|
|
298
|
+
origin: "number",
|
|
299
|
+
input: u,
|
|
300
|
+
code: "too_big",
|
|
301
|
+
maximum: o,
|
|
302
|
+
inclusive: !0,
|
|
303
|
+
inst: e,
|
|
304
|
+
continue: !n.abort
|
|
305
|
+
});
|
|
306
|
+
};
|
|
307
|
+
}), wt = {
|
|
308
|
+
major: 4,
|
|
309
|
+
minor: 3,
|
|
310
|
+
patch: 5
|
|
311
|
+
}, M = /* @__PURE__ */ w("$ZodType", (e, n) => {
|
|
312
|
+
var t;
|
|
313
|
+
e ?? (e = {}), e._zod.def = n, e._zod.bag = e._zod.bag || {}, e._zod.version = wt;
|
|
314
|
+
const r = [...e._zod.def.checks ?? []];
|
|
315
|
+
e._zod.traits.has("$ZodCheck") && r.unshift(e);
|
|
316
|
+
for (const i of r)
|
|
317
|
+
for (const o of i._zod.onattach)
|
|
318
|
+
o(e);
|
|
319
|
+
if (r.length === 0)
|
|
320
|
+
(t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred?.push(() => {
|
|
321
|
+
e._zod.run = e._zod.parse;
|
|
322
|
+
});
|
|
323
|
+
else {
|
|
324
|
+
const i = (s, u, c) => {
|
|
325
|
+
let a = Y(s), f;
|
|
326
|
+
for (const d of u) {
|
|
327
|
+
if (d._zod.def.when) {
|
|
328
|
+
if (!d._zod.def.when(s))
|
|
329
|
+
continue;
|
|
330
|
+
} else if (a)
|
|
331
|
+
continue;
|
|
332
|
+
const l = s.issues.length, p = d._zod.check(s);
|
|
333
|
+
if (p instanceof Promise && c?.async === !1)
|
|
334
|
+
throw new L();
|
|
335
|
+
if (f || p instanceof Promise)
|
|
336
|
+
f = (f ?? Promise.resolve()).then(async () => {
|
|
337
|
+
await p, s.issues.length !== l && (a || (a = Y(s, l)));
|
|
338
|
+
});
|
|
339
|
+
else {
|
|
340
|
+
if (s.issues.length === l)
|
|
341
|
+
continue;
|
|
342
|
+
a || (a = Y(s, l));
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
return f ? f.then(() => s) : s;
|
|
346
|
+
}, o = (s, u, c) => {
|
|
347
|
+
if (Y(s))
|
|
348
|
+
return s.aborted = !0, s;
|
|
349
|
+
const a = i(u, r, c);
|
|
350
|
+
if (a instanceof Promise) {
|
|
351
|
+
if (c.async === !1)
|
|
352
|
+
throw new L();
|
|
353
|
+
return a.then((f) => e._zod.parse(f, c));
|
|
354
|
+
}
|
|
355
|
+
return e._zod.parse(a, c);
|
|
356
|
+
};
|
|
357
|
+
e._zod.run = (s, u) => {
|
|
358
|
+
if (u.skipChecks)
|
|
359
|
+
return e._zod.parse(s, u);
|
|
360
|
+
if (u.direction === "backward") {
|
|
361
|
+
const a = e._zod.parse({ value: s.value, issues: [] }, { ...u, skipChecks: !0 });
|
|
362
|
+
return a instanceof Promise ? a.then((f) => o(f, s, u)) : o(a, s, u);
|
|
363
|
+
}
|
|
364
|
+
const c = e._zod.parse(s, u);
|
|
365
|
+
if (c instanceof Promise) {
|
|
366
|
+
if (u.async === !1)
|
|
367
|
+
throw new L();
|
|
368
|
+
return c.then((a) => i(a, r, u));
|
|
369
|
+
}
|
|
370
|
+
return i(c, r, u);
|
|
371
|
+
};
|
|
372
|
+
}
|
|
373
|
+
W(e, "~standard", () => ({
|
|
374
|
+
validate: (i) => {
|
|
375
|
+
try {
|
|
376
|
+
const o = Ce(e, i);
|
|
377
|
+
return o.success ? { value: o.data } : { issues: o.error?.issues };
|
|
378
|
+
} catch {
|
|
379
|
+
return De(e, i).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
vendor: "zod",
|
|
383
|
+
version: 1
|
|
384
|
+
}));
|
|
385
|
+
}), _t = /* @__PURE__ */ w("$ZodString", (e, n) => {
|
|
386
|
+
M.init(e, n), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? pt(e._zod.bag), e._zod.parse = (t, r) => {
|
|
387
|
+
if (n.coerce)
|
|
388
|
+
try {
|
|
389
|
+
t.value = String(t.value);
|
|
390
|
+
} catch {
|
|
391
|
+
}
|
|
392
|
+
return typeof t.value == "string" || t.issues.push({
|
|
393
|
+
expected: "string",
|
|
394
|
+
code: "invalid_type",
|
|
395
|
+
input: t.value,
|
|
396
|
+
inst: e
|
|
397
|
+
}), t;
|
|
398
|
+
};
|
|
399
|
+
}), Fe = /* @__PURE__ */ w("$ZodNumber", (e, n) => {
|
|
400
|
+
M.init(e, n), e._zod.pattern = e._zod.bag.pattern ?? vt, e._zod.parse = (t, r) => {
|
|
401
|
+
if (n.coerce)
|
|
402
|
+
try {
|
|
403
|
+
t.value = Number(t.value);
|
|
404
|
+
} catch {
|
|
405
|
+
}
|
|
406
|
+
const i = t.value;
|
|
407
|
+
if (typeof i == "number" && !Number.isNaN(i) && Number.isFinite(i))
|
|
408
|
+
return t;
|
|
409
|
+
const o = typeof i == "number" ? Number.isNaN(i) ? "NaN" : Number.isFinite(i) ? void 0 : "Infinity" : void 0;
|
|
410
|
+
return t.issues.push({
|
|
411
|
+
expected: "number",
|
|
412
|
+
code: "invalid_type",
|
|
413
|
+
input: i,
|
|
414
|
+
inst: e,
|
|
415
|
+
...o ? { received: o } : {}
|
|
416
|
+
}), t;
|
|
417
|
+
};
|
|
418
|
+
}), zt = /* @__PURE__ */ w("$ZodNumberFormat", (e, n) => {
|
|
419
|
+
gt.init(e, n), Fe.init(e, n);
|
|
420
|
+
}), Pt = /* @__PURE__ */ w("$ZodUnknown", (e, n) => {
|
|
421
|
+
M.init(e, n), e._zod.parse = (t) => t;
|
|
422
|
+
});
|
|
423
|
+
function $e(e, n, t) {
|
|
424
|
+
e.issues.length && n.issues.push(...Ie(t, e.issues)), n.value[t] = e.value;
|
|
425
|
+
}
|
|
426
|
+
const jt = /* @__PURE__ */ w("$ZodArray", (e, n) => {
|
|
427
|
+
M.init(e, n), e._zod.parse = (t, r) => {
|
|
428
|
+
const i = t.value;
|
|
429
|
+
if (!Array.isArray(i))
|
|
430
|
+
return t.issues.push({
|
|
431
|
+
expected: "array",
|
|
432
|
+
code: "invalid_type",
|
|
433
|
+
input: i,
|
|
434
|
+
inst: e
|
|
435
|
+
}), t;
|
|
436
|
+
t.value = Array(i.length);
|
|
437
|
+
const o = [];
|
|
438
|
+
for (let s = 0; s < i.length; s++) {
|
|
439
|
+
const u = i[s], c = n.element._zod.run({
|
|
440
|
+
value: u,
|
|
441
|
+
issues: []
|
|
442
|
+
}, r);
|
|
443
|
+
c instanceof Promise ? o.push(c.then((a) => $e(a, t, s))) : $e(c, t, s);
|
|
444
|
+
}
|
|
445
|
+
return o.length ? Promise.all(o).then(() => t) : t;
|
|
446
|
+
};
|
|
447
|
+
});
|
|
448
|
+
function ne(e, n, t, r, i) {
|
|
449
|
+
if (e.issues.length) {
|
|
450
|
+
if (i && !(t in r))
|
|
451
|
+
return;
|
|
452
|
+
n.issues.push(...Ie(t, e.issues));
|
|
453
|
+
}
|
|
454
|
+
e.value === void 0 ? t in r && (n.value[t] = void 0) : n.value[t] = e.value;
|
|
455
|
+
}
|
|
456
|
+
function kt(e) {
|
|
457
|
+
const n = Object.keys(e.shape);
|
|
458
|
+
for (const r of n)
|
|
459
|
+
if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
|
|
460
|
+
throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
|
|
461
|
+
const t = it(e.shape);
|
|
462
|
+
return {
|
|
463
|
+
...e,
|
|
464
|
+
keys: n,
|
|
465
|
+
keySet: new Set(n),
|
|
466
|
+
numKeys: n.length,
|
|
467
|
+
optionalKeys: new Set(t)
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
function Ot(e, n, t, r, i, o) {
|
|
471
|
+
const s = [], u = i.keySet, c = i.catchall._zod, a = c.def.type, f = c.optout === "optional";
|
|
472
|
+
for (const d in n) {
|
|
473
|
+
if (u.has(d))
|
|
474
|
+
continue;
|
|
475
|
+
if (a === "never") {
|
|
476
|
+
s.push(d);
|
|
477
|
+
continue;
|
|
478
|
+
}
|
|
479
|
+
const l = c.run({ value: n[d], issues: [] }, r);
|
|
480
|
+
l instanceof Promise ? e.push(l.then((p) => ne(p, t, d, n, f))) : ne(l, t, d, n, f);
|
|
481
|
+
}
|
|
482
|
+
return s.length && t.issues.push({
|
|
483
|
+
code: "unrecognized_keys",
|
|
484
|
+
keys: s,
|
|
485
|
+
input: n,
|
|
486
|
+
inst: o
|
|
487
|
+
}), e.length ? Promise.all(e).then(() => t) : t;
|
|
488
|
+
}
|
|
489
|
+
const Et = /* @__PURE__ */ w("$ZodObject", (e, n) => {
|
|
490
|
+
if (M.init(e, n), !Object.getOwnPropertyDescriptor(n, "shape")?.get) {
|
|
491
|
+
const u = n.shape;
|
|
492
|
+
Object.defineProperty(n, "shape", {
|
|
493
|
+
get: () => {
|
|
494
|
+
const c = { ...u };
|
|
495
|
+
return Object.defineProperty(n, "shape", {
|
|
496
|
+
value: c
|
|
497
|
+
}), c;
|
|
498
|
+
}
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
const r = tt(() => kt(n));
|
|
502
|
+
W(e._zod, "propValues", () => {
|
|
503
|
+
const u = n.shape, c = {};
|
|
504
|
+
for (const a in u) {
|
|
505
|
+
const f = u[a]._zod;
|
|
506
|
+
if (f.values) {
|
|
507
|
+
c[a] ?? (c[a] = /* @__PURE__ */ new Set());
|
|
508
|
+
for (const d of f.values)
|
|
509
|
+
c[a].add(d);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
return c;
|
|
513
|
+
});
|
|
514
|
+
const i = rt, o = n.catchall;
|
|
515
|
+
let s;
|
|
516
|
+
e._zod.parse = (u, c) => {
|
|
517
|
+
s ?? (s = r.value);
|
|
518
|
+
const a = u.value;
|
|
519
|
+
if (!i(a))
|
|
520
|
+
return u.issues.push({
|
|
521
|
+
expected: "object",
|
|
522
|
+
code: "invalid_type",
|
|
523
|
+
input: a,
|
|
524
|
+
inst: e
|
|
525
|
+
}), u;
|
|
526
|
+
u.value = {};
|
|
527
|
+
const f = [], d = s.shape;
|
|
528
|
+
for (const l of s.keys) {
|
|
529
|
+
const p = d[l], h = p._zod.optout === "optional", y = p._zod.run({ value: a[l], issues: [] }, c);
|
|
530
|
+
y instanceof Promise ? f.push(y.then((_) => ne(_, u, l, a, h))) : ne(y, u, l, a, h);
|
|
531
|
+
}
|
|
532
|
+
return o ? Ot(f, a, u, c, r.value, e) : f.length ? Promise.all(f).then(() => u) : u;
|
|
533
|
+
};
|
|
534
|
+
});
|
|
535
|
+
function Ae(e, n) {
|
|
536
|
+
return e.issues.length && n === void 0 ? { issues: [], value: void 0 } : e;
|
|
537
|
+
}
|
|
538
|
+
const St = /* @__PURE__ */ w("$ZodOptional", (e, n) => {
|
|
539
|
+
M.init(e, n), e._zod.optin = "optional", e._zod.optout = "optional", W(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, void 0]) : void 0), W(e._zod, "pattern", () => {
|
|
540
|
+
const t = n.innerType._zod.pattern;
|
|
541
|
+
return t ? new RegExp(`^(${nt(t.source)})?$`) : void 0;
|
|
542
|
+
}), e._zod.parse = (t, r) => {
|
|
543
|
+
if (n.innerType._zod.optin === "optional") {
|
|
544
|
+
const i = n.innerType._zod.run(t, r);
|
|
545
|
+
return i instanceof Promise ? i.then((o) => Ae(o, t.value)) : Ae(i, t.value);
|
|
546
|
+
}
|
|
547
|
+
return t.value === void 0 ? t : n.innerType._zod.run(t, r);
|
|
548
|
+
};
|
|
549
|
+
});
|
|
550
|
+
var Te;
|
|
551
|
+
class xt {
|
|
552
|
+
constructor() {
|
|
553
|
+
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
554
|
+
}
|
|
555
|
+
add(n, ...t) {
|
|
556
|
+
const r = t[0];
|
|
557
|
+
return this._map.set(n, r), r && typeof r == "object" && "id" in r && this._idmap.set(r.id, n), this;
|
|
558
|
+
}
|
|
559
|
+
clear() {
|
|
560
|
+
return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
|
|
561
|
+
}
|
|
562
|
+
remove(n) {
|
|
563
|
+
const t = this._map.get(n);
|
|
564
|
+
return t && typeof t == "object" && "id" in t && this._idmap.delete(t.id), this._map.delete(n), this;
|
|
565
|
+
}
|
|
566
|
+
get(n) {
|
|
567
|
+
const t = n._zod.parent;
|
|
568
|
+
if (t) {
|
|
569
|
+
const r = { ...this.get(t) ?? {} };
|
|
570
|
+
delete r.id;
|
|
571
|
+
const i = { ...r, ...this._map.get(n) };
|
|
572
|
+
return Object.keys(i).length ? i : void 0;
|
|
573
|
+
}
|
|
574
|
+
return this._map.get(n);
|
|
575
|
+
}
|
|
576
|
+
has(n) {
|
|
577
|
+
return this._map.has(n);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
function $t() {
|
|
581
|
+
return new xt();
|
|
582
|
+
}
|
|
583
|
+
(Te = globalThis).__zod_globalRegistry ?? (Te.__zod_globalRegistry = $t());
|
|
584
|
+
// @__NO_SIDE_EFFECTS__
|
|
585
|
+
function At(e, n) {
|
|
586
|
+
return new e({
|
|
587
|
+
type: "string",
|
|
588
|
+
...J()
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
// @__NO_SIDE_EFFECTS__
|
|
592
|
+
function Tt(e, n) {
|
|
593
|
+
return new e({
|
|
594
|
+
type: "number",
|
|
595
|
+
check: "number_format",
|
|
596
|
+
abort: !1,
|
|
597
|
+
format: "safeint",
|
|
598
|
+
...J()
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
// @__NO_SIDE_EFFECTS__
|
|
602
|
+
function Gt(e) {
|
|
603
|
+
return new e({
|
|
604
|
+
type: "unknown"
|
|
605
|
+
});
|
|
606
|
+
}
|
|
607
|
+
// @__NO_SIDE_EFFECTS__
|
|
608
|
+
function Mt(e, n) {
|
|
609
|
+
return new bt({
|
|
610
|
+
check: "greater_than",
|
|
611
|
+
...J(),
|
|
612
|
+
value: e,
|
|
613
|
+
inclusive: !0
|
|
614
|
+
});
|
|
615
|
+
}
|
|
616
|
+
// @__NO_SIDE_EFFECTS__
|
|
617
|
+
function Nt(e) {
|
|
618
|
+
return /* @__PURE__ */ Mt(0);
|
|
619
|
+
}
|
|
620
|
+
const C = /* @__PURE__ */ w("ZodMiniType", (e, n) => {
|
|
621
|
+
if (!e._zod)
|
|
622
|
+
throw new Error("Uninitialized schema in ZodMiniType.");
|
|
623
|
+
M.init(e, n), e.def = n, e.type = n.type, e.parse = (t, r) => ct(e, t, r, { callee: e.parse }), e.safeParse = (t, r) => Ce(e, t, r), e.parseAsync = async (t, r) => ft(e, t, r, { callee: e.parseAsync }), e.safeParseAsync = async (t, r) => De(e, t, r), e.check = (...t) => e.clone({
|
|
624
|
+
...n,
|
|
625
|
+
checks: [
|
|
626
|
+
...n.checks ?? [],
|
|
627
|
+
...t.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
|
|
628
|
+
]
|
|
629
|
+
}, { parent: !0 }), e.with = e.check, e.clone = (t, r) => ot(e, t, r), e.brand = () => e, e.register = ((t, r) => (t.add(e, r), e)), e.apply = (t) => t(e);
|
|
630
|
+
}), Zt = /* @__PURE__ */ w("ZodMiniString", (e, n) => {
|
|
631
|
+
_t.init(e, n), C.init(e, n);
|
|
632
|
+
});
|
|
633
|
+
// @__NO_SIDE_EFFECTS__
|
|
634
|
+
function It(e) {
|
|
635
|
+
return /* @__PURE__ */ At(Zt);
|
|
636
|
+
}
|
|
637
|
+
const Rt = /* @__PURE__ */ w("ZodMiniNumber", (e, n) => {
|
|
638
|
+
Fe.init(e, n), C.init(e, n);
|
|
639
|
+
}), Ct = /* @__PURE__ */ w("ZodMiniNumberFormat", (e, n) => {
|
|
640
|
+
zt.init(e, n), Rt.init(e, n);
|
|
641
|
+
});
|
|
642
|
+
// @__NO_SIDE_EFFECTS__
|
|
643
|
+
function Dt(e) {
|
|
644
|
+
return /* @__PURE__ */ Tt(Ct);
|
|
645
|
+
}
|
|
646
|
+
const Ut = /* @__PURE__ */ w("ZodMiniUnknown", (e, n) => {
|
|
647
|
+
Pt.init(e, n), C.init(e, n);
|
|
648
|
+
});
|
|
649
|
+
// @__NO_SIDE_EFFECTS__
|
|
650
|
+
function Ft() {
|
|
651
|
+
return /* @__PURE__ */ Gt(Ut);
|
|
652
|
+
}
|
|
653
|
+
const Lt = /* @__PURE__ */ w("ZodMiniArray", (e, n) => {
|
|
654
|
+
jt.init(e, n), C.init(e, n);
|
|
655
|
+
});
|
|
656
|
+
// @__NO_SIDE_EFFECTS__
|
|
657
|
+
function Vt(e, n) {
|
|
658
|
+
return new Lt({
|
|
659
|
+
type: "array",
|
|
660
|
+
element: e,
|
|
661
|
+
...J()
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
const qt = /* @__PURE__ */ w("ZodMiniObject", (e, n) => {
|
|
665
|
+
Et.init(e, n), C.init(e, n), W(e, "shape", () => n.shape);
|
|
666
|
+
});
|
|
667
|
+
// @__NO_SIDE_EFFECTS__
|
|
668
|
+
function Ht(e, n) {
|
|
669
|
+
return new qt({
|
|
670
|
+
type: "object",
|
|
671
|
+
shape: e,
|
|
672
|
+
catchall: /* @__PURE__ */ Ft(),
|
|
673
|
+
...J()
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
const Wt = /* @__PURE__ */ w("ZodMiniOptional", (e, n) => {
|
|
677
|
+
St.init(e, n), C.init(e, n);
|
|
678
|
+
});
|
|
679
|
+
// @__NO_SIDE_EFFECTS__
|
|
680
|
+
function Ge(e) {
|
|
681
|
+
return new Wt({
|
|
682
|
+
type: "optional",
|
|
683
|
+
innerType: e
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
(/* @__PURE__ */ Dt()).check(/* @__PURE__ */ Nt());
|
|
687
|
+
const Z = {};
|
|
688
|
+
function Bt(e) {
|
|
689
|
+
if (!Z.graffitiSession)
|
|
690
|
+
Z.graffitiSession = e;
|
|
26
691
|
else
|
|
27
692
|
throw new Error(
|
|
28
693
|
"Graffiti session already set - plugin installed multiple times?"
|
|
29
694
|
);
|
|
30
695
|
}
|
|
31
|
-
function
|
|
32
|
-
if (!
|
|
33
|
-
|
|
696
|
+
function Xt(e) {
|
|
697
|
+
if (!Z.graffitiSynchronize)
|
|
698
|
+
Z.graffitiSynchronize = e;
|
|
34
699
|
else
|
|
35
700
|
throw new Error(
|
|
36
701
|
"Graffiti synchronize already set - plugin installed multiple times?"
|
|
37
702
|
);
|
|
38
703
|
}
|
|
39
|
-
function
|
|
40
|
-
const e =
|
|
704
|
+
function ce() {
|
|
705
|
+
const e = Z.graffitiSynchronize;
|
|
41
706
|
if (!e)
|
|
42
707
|
throw new Error(
|
|
43
708
|
"No Graffiti instance provided, did you forget to install the plugin?"
|
|
44
709
|
);
|
|
45
710
|
return e;
|
|
46
711
|
}
|
|
47
|
-
function
|
|
48
|
-
return
|
|
712
|
+
function je() {
|
|
713
|
+
return ce();
|
|
49
714
|
}
|
|
50
|
-
function
|
|
51
|
-
const e =
|
|
715
|
+
function $n() {
|
|
716
|
+
const e = Z.graffitiSession;
|
|
52
717
|
if (!e)
|
|
53
718
|
throw new Error(
|
|
54
719
|
"No Graffiti session provided, did you forget to install the plugin?"
|
|
55
720
|
);
|
|
56
721
|
return e;
|
|
57
722
|
}
|
|
58
|
-
function
|
|
59
|
-
const i =
|
|
60
|
-
let
|
|
723
|
+
function Jt(e, n, t, r = !1) {
|
|
724
|
+
const i = ce(), o = /* @__PURE__ */ new Map(), s = S([]);
|
|
725
|
+
let u = async () => {
|
|
61
726
|
};
|
|
62
|
-
const c = async () =>
|
|
63
|
-
let f,
|
|
64
|
-
|
|
65
|
-
f?.return(null),
|
|
66
|
-
continue: () =>
|
|
727
|
+
const c = async () => u(), a = S(!0);
|
|
728
|
+
let f, d;
|
|
729
|
+
_e(() => {
|
|
730
|
+
f?.return(null), d?.return({
|
|
731
|
+
continue: () => d,
|
|
67
732
|
cursor: ""
|
|
68
733
|
});
|
|
69
734
|
});
|
|
70
|
-
const l =
|
|
71
|
-
function
|
|
735
|
+
const l = S(0);
|
|
736
|
+
function p(h = 0) {
|
|
72
737
|
setTimeout(() => {
|
|
73
738
|
l.value++;
|
|
74
|
-
},
|
|
739
|
+
}, h);
|
|
75
740
|
}
|
|
76
741
|
return H(
|
|
77
742
|
() => ({
|
|
78
|
-
args: [
|
|
743
|
+
args: [j(e), j(n), j(t)],
|
|
79
744
|
refresh: l.value
|
|
80
745
|
}),
|
|
81
|
-
({ args:
|
|
82
|
-
|
|
83
|
-
const
|
|
84
|
-
f =
|
|
85
|
-
let
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
continue: () =>
|
|
746
|
+
({ args: h }, y, _) => {
|
|
747
|
+
o.clear(), s.value = [], a.value = !0;
|
|
748
|
+
const x = i.synchronizeDiscover(...h);
|
|
749
|
+
f = x;
|
|
750
|
+
let O, z = !0;
|
|
751
|
+
_(() => {
|
|
752
|
+
z = !1, x.return(null), O?.return({
|
|
753
|
+
continue: () => d,
|
|
89
754
|
cursor: ""
|
|
90
755
|
});
|
|
91
756
|
});
|
|
92
|
-
let
|
|
757
|
+
let U;
|
|
93
758
|
(async () => {
|
|
94
|
-
for await (const
|
|
95
|
-
if (!
|
|
96
|
-
|
|
759
|
+
for await (const P of x) {
|
|
760
|
+
if (!z) break;
|
|
761
|
+
P.tombstone ? o.delete(P.object.url) : o.set(P.object.url, P.object), U || (U = new Promise((Q) => {
|
|
97
762
|
setTimeout(() => {
|
|
98
|
-
|
|
763
|
+
z && (s.value = Array.from(o.values())), U = void 0, Q();
|
|
99
764
|
}, 50);
|
|
100
765
|
}));
|
|
101
766
|
}
|
|
102
767
|
})();
|
|
103
|
-
let
|
|
104
|
-
|
|
105
|
-
if (!(
|
|
106
|
-
|
|
768
|
+
let de = !1, Oe = () => i.discover(...h);
|
|
769
|
+
u = async () => {
|
|
770
|
+
if (!(de || !z)) {
|
|
771
|
+
de = !0;
|
|
107
772
|
try {
|
|
108
|
-
|
|
773
|
+
O = Oe(h[2]);
|
|
109
774
|
} catch {
|
|
110
|
-
return
|
|
775
|
+
return p(5e3);
|
|
111
776
|
}
|
|
112
|
-
if (
|
|
113
|
-
for (
|
|
114
|
-
let
|
|
777
|
+
if (z) {
|
|
778
|
+
for (d = O; ; ) {
|
|
779
|
+
let P;
|
|
115
780
|
try {
|
|
116
|
-
|
|
117
|
-
} catch (
|
|
118
|
-
return
|
|
781
|
+
P = await O.next();
|
|
782
|
+
} catch (Q) {
|
|
783
|
+
return Q instanceof Pe ? p() : (console.error("Fatal error in discover"), console.error(Q), p(5e3));
|
|
119
784
|
}
|
|
120
|
-
if (!
|
|
121
|
-
if (
|
|
122
|
-
|
|
785
|
+
if (!z) return;
|
|
786
|
+
if (P.done) {
|
|
787
|
+
Oe = P.value.continue;
|
|
123
788
|
break;
|
|
124
|
-
} else
|
|
789
|
+
} else P.value.error && console.error(P.value.error);
|
|
125
790
|
}
|
|
126
|
-
await new Promise((
|
|
791
|
+
await new Promise((P) => setTimeout(P, 0)), U && await U, z && (de = !1, a.value = !1, j(r) && c());
|
|
127
792
|
}
|
|
128
793
|
}
|
|
129
794
|
}, c();
|
|
130
795
|
},
|
|
131
796
|
{ immediate: !0 }
|
|
132
797
|
), H(
|
|
133
|
-
() =>
|
|
134
|
-
(
|
|
798
|
+
() => j(r),
|
|
799
|
+
(h) => h && c()
|
|
135
800
|
), {
|
|
136
801
|
objects: s,
|
|
137
802
|
poll: c,
|
|
138
|
-
isFirstPoll:
|
|
803
|
+
isFirstPoll: a
|
|
139
804
|
};
|
|
140
805
|
}
|
|
141
|
-
function
|
|
142
|
-
const t =
|
|
806
|
+
function Le(e, n) {
|
|
807
|
+
const t = S(void 0);
|
|
143
808
|
return H(
|
|
144
|
-
() =>
|
|
145
|
-
async (
|
|
809
|
+
() => j(e),
|
|
810
|
+
async (r, i, o) => {
|
|
146
811
|
let s = !0;
|
|
147
|
-
|
|
812
|
+
o(() => {
|
|
148
813
|
s = !1;
|
|
149
814
|
}), t.value = void 0;
|
|
150
815
|
try {
|
|
151
|
-
const
|
|
152
|
-
s && (t.value =
|
|
153
|
-
} catch (
|
|
816
|
+
const u = await n(r);
|
|
817
|
+
s && (t.value = u);
|
|
818
|
+
} catch (u) {
|
|
154
819
|
if (!s) return;
|
|
155
|
-
|
|
820
|
+
t.value = null, u instanceof T || console.error(u);
|
|
156
821
|
}
|
|
157
822
|
},
|
|
158
823
|
{ immediate: !0 }
|
|
@@ -160,127 +825,122 @@ function me(e, n) {
|
|
|
160
825
|
output: t
|
|
161
826
|
};
|
|
162
827
|
}
|
|
163
|
-
function
|
|
828
|
+
function Ve(e) {
|
|
164
829
|
return e === void 0 ? "Loading..." : e === null ? "Not found" : e;
|
|
165
830
|
}
|
|
166
|
-
function
|
|
167
|
-
const n =
|
|
831
|
+
function Kt(e) {
|
|
832
|
+
const n = je(), { output: t } = Le(
|
|
168
833
|
e,
|
|
169
834
|
n.actorToHandle.bind(n)
|
|
170
835
|
);
|
|
171
836
|
return { handle: t };
|
|
172
837
|
}
|
|
173
|
-
const
|
|
838
|
+
const V = /* @__PURE__ */ R({
|
|
174
839
|
__name: "ActorToHandle",
|
|
175
840
|
props: {
|
|
176
841
|
actor: {}
|
|
177
842
|
},
|
|
178
843
|
setup(e) {
|
|
179
|
-
const t =
|
|
180
|
-
return (i,
|
|
181
|
-
|
|
844
|
+
const t = k(e, "actor"), { handle: r } = Kt(t);
|
|
845
|
+
return (i, o) => X(i.$slots, "default", { handle: v(r) }, () => [
|
|
846
|
+
m("span", null, E(v(Ve)(v(r))), 1)
|
|
182
847
|
]);
|
|
183
848
|
}
|
|
184
|
-
}),
|
|
849
|
+
}), Qt = ["data-url"], Yt = { key: 0 }, en = { key: 1 }, tn = { key: 0 }, nn = { key: 1 }, rn = ["disabled"], on = { key: 1 }, sn = { key: 2 }, le = /* @__PURE__ */ R({
|
|
185
850
|
__name: "ObjectInfo",
|
|
186
851
|
props: {
|
|
187
852
|
object: {}
|
|
188
853
|
},
|
|
189
854
|
setup(e) {
|
|
190
|
-
const n =
|
|
191
|
-
async function
|
|
855
|
+
const n = je(), t = S(!1);
|
|
856
|
+
async function r(i, o) {
|
|
192
857
|
t.value = !0, await new Promise((s) => setTimeout(s, 0)), confirm(
|
|
193
858
|
"Are you sure you want to delete this object? It cannot be undone."
|
|
194
|
-
) && await n.delete(i,
|
|
859
|
+
) && await n.delete(i, o), t.value = !1;
|
|
195
860
|
}
|
|
196
|
-
return (i,
|
|
861
|
+
return (i, o) => e.object ? (g(), b("article", {
|
|
197
862
|
key: 0,
|
|
198
863
|
"data-url": e.object.url
|
|
199
864
|
}, [
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
865
|
+
m("p", null, [
|
|
866
|
+
o[1] || (o[1] = Se("@", -1)),
|
|
867
|
+
F(V, {
|
|
868
|
+
actor: e.object.actor
|
|
869
|
+
}, null, 8, ["actor"]),
|
|
870
|
+
o[2] || (o[2] = Se(" posted:", -1))
|
|
871
|
+
]),
|
|
872
|
+
m("pre", null, E(e.object.value), 1),
|
|
873
|
+
m("details", null, [
|
|
874
|
+
o[14] || (o[14] = m("summary", null, "Show object properties", -1)),
|
|
875
|
+
m("dl", null, [
|
|
876
|
+
o[8] || (o[8] = m("dt", null, "Object URL", -1)),
|
|
877
|
+
m("dd", null, [
|
|
878
|
+
m("code", null, E(e.object.url), 1)
|
|
206
879
|
]),
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
880
|
+
o[9] || (o[9] = m("dt", null, "Actor", -1)),
|
|
881
|
+
m("dd", null, [
|
|
882
|
+
m("code", null, E(e.object.actor), 1)
|
|
210
883
|
]),
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
V
|
|
884
|
+
o[10] || (o[10] = m("dt", null, "Handle", -1)),
|
|
885
|
+
m("dd", null, [
|
|
886
|
+
F(V, {
|
|
214
887
|
actor: e.object.actor
|
|
215
888
|
}, null, 8, ["actor"])
|
|
216
|
-
])
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
])
|
|
889
|
+
]),
|
|
890
|
+
o[11] || (o[11] = m("dt", null, "Content", -1)),
|
|
891
|
+
m("dd", null, [
|
|
892
|
+
m("pre", null, E(e.object.value), 1)
|
|
893
|
+
]),
|
|
894
|
+
o[12] || (o[12] = m("dt", null, "Allowed actors", -1)),
|
|
895
|
+
m("dd", null, [
|
|
896
|
+
Array.isArray(e.object.allowed) ? e.object.allowed.length === 0 ? (g(), b("p", en, [...o[4] || (o[4] = [
|
|
897
|
+
m("em", null, "No one is allowed (except you)", -1)
|
|
898
|
+
])])) : Ee("", !0) : (g(), b("p", Yt, [...o[3] || (o[3] = [
|
|
899
|
+
m("em", null, "Public", -1)
|
|
900
|
+
])])),
|
|
901
|
+
m("ul", null, [
|
|
902
|
+
(g(!0), b(ve, null, ye(e.object.allowed, (s) => (g(), b("li", { key: s }, [
|
|
903
|
+
m("dl", null, [
|
|
904
|
+
o[5] || (o[5] = m("dt", null, "Actor", -1)),
|
|
905
|
+
m("dd", null, [
|
|
906
|
+
m("code", null, E(s), 1)
|
|
907
|
+
]),
|
|
908
|
+
o[6] || (o[6] = m("dt", null, "Handle", -1)),
|
|
909
|
+
m("dd", null, [
|
|
910
|
+
F(V, { actor: s }, null, 8, ["actor"])
|
|
911
|
+
])
|
|
912
|
+
])
|
|
913
|
+
]))), 128))
|
|
241
914
|
])
|
|
242
|
-
])
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
p("em", null, "No channels", -1)
|
|
253
|
-
])]))
|
|
254
|
-
]),
|
|
255
|
-
p("footer", null, [
|
|
256
|
-
p("nav", null, [
|
|
257
|
-
p("ul", null, [
|
|
258
|
-
i.$graffitiSession.value?.actor === e.object.actor ? (w(), b("li", _e, [
|
|
259
|
-
p("button", {
|
|
260
|
-
disabled: t.value,
|
|
261
|
-
onClick: r[0] || (r[0] = (s) => o(e.object, i.$graffitiSession.value))
|
|
262
|
-
}, O(t.value ? "Deleting..." : "Delete"), 9, Re)
|
|
263
|
-
])) : de("", !0)
|
|
915
|
+
]),
|
|
916
|
+
o[13] || (o[13] = m("dt", null, "Channels", -1)),
|
|
917
|
+
m("dd", null, [
|
|
918
|
+
e.object.channels?.length ? (g(), b("ul", tn, [
|
|
919
|
+
(g(!0), b(ve, null, ye(e.object.channels, (s) => (g(), b("li", { key: s }, [
|
|
920
|
+
m("code", null, E(s), 1)
|
|
921
|
+
]))), 128))
|
|
922
|
+
])) : (g(), b("p", nn, [...o[7] || (o[7] = [
|
|
923
|
+
m("em", null, "No channels", -1)
|
|
924
|
+
])]))
|
|
264
925
|
])
|
|
265
926
|
])
|
|
266
|
-
])
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
927
|
+
]),
|
|
928
|
+
i.$graffitiSession.value?.actor === e.object.actor ? (g(), b("button", {
|
|
929
|
+
key: 0,
|
|
930
|
+
disabled: t.value,
|
|
931
|
+
onClick: o[0] || (o[0] = (s) => r(e.object, i.$graffitiSession.value))
|
|
932
|
+
}, E(t.value ? "Deleting..." : "Delete"), 9, rn)) : Ee("", !0)
|
|
933
|
+
], 8, Qt)) : e.object === null ? (g(), b("article", on, [...o[15] || (o[15] = [
|
|
934
|
+
m("p", null, [
|
|
935
|
+
m("em", null, "Graffiti object not found")
|
|
273
936
|
], -1)
|
|
274
|
-
])])) : (
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
], -1),
|
|
278
|
-
p("p", null, [
|
|
279
|
-
p("em", null, "Loading...")
|
|
937
|
+
])])) : (g(), b("article", sn, [...o[16] || (o[16] = [
|
|
938
|
+
m("p", null, [
|
|
939
|
+
m("em", null, "Graffiti object loading...")
|
|
280
940
|
], -1)
|
|
281
941
|
])]));
|
|
282
942
|
}
|
|
283
|
-
}),
|
|
943
|
+
}), un = { key: 0 }, an = { key: 1 }, qe = /* @__PURE__ */ R({
|
|
284
944
|
__name: "Discover",
|
|
285
945
|
props: {
|
|
286
946
|
channels: {},
|
|
@@ -289,62 +949,62 @@ const W = /* @__PURE__ */ _({
|
|
|
289
949
|
autopoll: { type: Boolean }
|
|
290
950
|
},
|
|
291
951
|
setup(e) {
|
|
292
|
-
const n = e, { objects: t, poll:
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
952
|
+
const n = e, { objects: t, poll: r, isFirstPoll: i } = Jt(
|
|
953
|
+
k(n, "channels"),
|
|
954
|
+
k(n, "schema"),
|
|
955
|
+
k(n, "session"),
|
|
956
|
+
k(n, "autopoll")
|
|
297
957
|
);
|
|
298
|
-
return (
|
|
958
|
+
return (o, s) => X(o.$slots, "default", {
|
|
299
959
|
objects: v(t),
|
|
300
|
-
poll: v(
|
|
960
|
+
poll: v(r),
|
|
301
961
|
isFirstPoll: v(i)
|
|
302
962
|
}, () => [
|
|
303
|
-
v(i) ? (
|
|
304
|
-
|
|
305
|
-
])])) : (
|
|
306
|
-
(
|
|
307
|
-
key:
|
|
963
|
+
v(i) ? (g(), b("p", an, [...s[0] || (s[0] = [
|
|
964
|
+
m("em", null, " Graffiti discover loading... ", -1)
|
|
965
|
+
])])) : (g(), b("ul", un, [
|
|
966
|
+
(g(!0), b(ve, null, ye(v(t), (u) => (g(), b("li", {
|
|
967
|
+
key: u.url
|
|
308
968
|
}, [
|
|
309
|
-
|
|
969
|
+
F(le, { object: u }, null, 8, ["object"])
|
|
310
970
|
]))), 128))
|
|
311
971
|
]))
|
|
312
972
|
]);
|
|
313
973
|
}
|
|
314
974
|
});
|
|
315
|
-
function
|
|
316
|
-
const
|
|
317
|
-
let
|
|
975
|
+
function cn(e, n, t) {
|
|
976
|
+
const r = ce(), i = S(void 0);
|
|
977
|
+
let o = async () => {
|
|
318
978
|
};
|
|
319
|
-
const s = async () =>
|
|
320
|
-
let
|
|
321
|
-
return
|
|
322
|
-
|
|
979
|
+
const s = async () => o();
|
|
980
|
+
let u;
|
|
981
|
+
return _e(() => {
|
|
982
|
+
u?.return(null);
|
|
323
983
|
}), H(
|
|
324
|
-
() => [
|
|
325
|
-
(c,
|
|
984
|
+
() => [j(e), j(n), j(t)],
|
|
985
|
+
(c, a, f) => {
|
|
326
986
|
i.value = void 0;
|
|
327
|
-
const
|
|
328
|
-
|
|
987
|
+
const d = r.synchronizeGet(...c);
|
|
988
|
+
u = d;
|
|
329
989
|
let l = !0;
|
|
330
990
|
f(() => {
|
|
331
|
-
l = !1,
|
|
991
|
+
l = !1, d.return(null);
|
|
332
992
|
}), (async () => {
|
|
333
|
-
for await (const
|
|
993
|
+
for await (const h of d) {
|
|
334
994
|
if (!l) return;
|
|
335
|
-
|
|
995
|
+
h.tombstone ? i.value = null : i.value = h.object;
|
|
336
996
|
}
|
|
337
997
|
})();
|
|
338
|
-
let
|
|
339
|
-
|
|
340
|
-
if (!(
|
|
341
|
-
|
|
998
|
+
let p = !1;
|
|
999
|
+
o = async () => {
|
|
1000
|
+
if (!(p || !l)) {
|
|
1001
|
+
p = !0;
|
|
342
1002
|
try {
|
|
343
|
-
await
|
|
344
|
-
} catch (
|
|
345
|
-
|
|
1003
|
+
await r.get(...c);
|
|
1004
|
+
} catch (h) {
|
|
1005
|
+
h instanceof T || console.error(h);
|
|
346
1006
|
}
|
|
347
|
-
await new Promise((
|
|
1007
|
+
await new Promise((h) => setTimeout(h, 0)), p = !1;
|
|
348
1008
|
}
|
|
349
1009
|
}, s();
|
|
350
1010
|
},
|
|
@@ -354,7 +1014,7 @@ function Ne(e, n, t) {
|
|
|
354
1014
|
poll: s
|
|
355
1015
|
};
|
|
356
1016
|
}
|
|
357
|
-
const
|
|
1017
|
+
const He = /* @__PURE__ */ R({
|
|
358
1018
|
__name: "Get",
|
|
359
1019
|
props: {
|
|
360
1020
|
url: {},
|
|
@@ -362,69 +1022,69 @@ const ge = /* @__PURE__ */ _({
|
|
|
362
1022
|
session: {}
|
|
363
1023
|
},
|
|
364
1024
|
setup(e) {
|
|
365
|
-
const n = e, { object: t, poll:
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
1025
|
+
const n = e, { object: t, poll: r } = cn(
|
|
1026
|
+
k(n, "url"),
|
|
1027
|
+
k(n, "schema"),
|
|
1028
|
+
k(n, "session")
|
|
369
1029
|
);
|
|
370
|
-
return (i,
|
|
1030
|
+
return (i, o) => X(i.$slots, "default", {
|
|
371
1031
|
object: v(t),
|
|
372
|
-
poll: v(
|
|
1032
|
+
poll: v(r)
|
|
373
1033
|
}, () => [
|
|
374
|
-
|
|
1034
|
+
F(le, { object: v(t) }, null, 8, ["object"])
|
|
375
1035
|
]);
|
|
376
1036
|
}
|
|
377
1037
|
});
|
|
378
|
-
function
|
|
379
|
-
const
|
|
1038
|
+
function ln(e, n, t) {
|
|
1039
|
+
const r = ce(), i = S(
|
|
380
1040
|
void 0
|
|
381
|
-
),
|
|
382
|
-
let s = null,
|
|
1041
|
+
), o = S(0);
|
|
1042
|
+
let s = null, u = () => {
|
|
383
1043
|
};
|
|
384
1044
|
function c() {
|
|
385
|
-
return s || (
|
|
386
|
-
|
|
387
|
-
s = null,
|
|
1045
|
+
return s || (o.value++, s = new Promise((a) => {
|
|
1046
|
+
u = () => {
|
|
1047
|
+
s = null, a();
|
|
388
1048
|
};
|
|
389
1049
|
}), s);
|
|
390
1050
|
}
|
|
391
1051
|
return H(
|
|
392
1052
|
() => ({
|
|
393
|
-
args: [
|
|
394
|
-
pollCounter:
|
|
1053
|
+
args: [j(e), j(n), j(t)],
|
|
1054
|
+
pollCounter: o.value
|
|
395
1055
|
}),
|
|
396
|
-
async ({ args:
|
|
1056
|
+
async ({ args: a }, f, d) => {
|
|
397
1057
|
i.value?.dataUrl && URL.revokeObjectURL(i.value.dataUrl), i.value = void 0;
|
|
398
1058
|
let l = !0;
|
|
399
|
-
|
|
1059
|
+
d(() => {
|
|
400
1060
|
l = !1;
|
|
401
1061
|
});
|
|
402
1062
|
try {
|
|
403
|
-
const { data:
|
|
1063
|
+
const { data: p, actor: h, allowed: y } = await r.getMedia(...a);
|
|
404
1064
|
if (!l) return;
|
|
405
|
-
const
|
|
1065
|
+
const _ = URL.createObjectURL(p);
|
|
406
1066
|
i.value = {
|
|
407
|
-
data:
|
|
408
|
-
dataUrl:
|
|
409
|
-
actor:
|
|
410
|
-
allowed:
|
|
1067
|
+
data: p,
|
|
1068
|
+
dataUrl: _,
|
|
1069
|
+
actor: h,
|
|
1070
|
+
allowed: y
|
|
411
1071
|
};
|
|
412
|
-
} catch (
|
|
1072
|
+
} catch (p) {
|
|
413
1073
|
if (!l) return;
|
|
414
|
-
|
|
1074
|
+
p instanceof T ? i.value = null : console.error(p);
|
|
415
1075
|
} finally {
|
|
416
|
-
|
|
1076
|
+
u();
|
|
417
1077
|
}
|
|
418
1078
|
},
|
|
419
1079
|
{ immediate: !0 }
|
|
420
|
-
),
|
|
421
|
-
|
|
1080
|
+
), _e(() => {
|
|
1081
|
+
u(), i.value?.dataUrl && URL.revokeObjectURL(i.value.dataUrl);
|
|
422
1082
|
}), {
|
|
423
1083
|
media: i,
|
|
424
1084
|
poll: c
|
|
425
1085
|
};
|
|
426
1086
|
}
|
|
427
|
-
const
|
|
1087
|
+
const fn = ["src", "alt"], dn = ["src", "alt"], hn = ["src", "alt"], pn = ["src", "alt"], mn = ["data", "alt"], vn = { key: 6 }, yn = { key: 7 }, We = /* @__PURE__ */ R({
|
|
428
1088
|
__name: "GetMedia",
|
|
429
1089
|
props: {
|
|
430
1090
|
url: {},
|
|
@@ -432,229 +1092,229 @@ const Be = ["src", "alt"], Ve = ["src", "alt"], We = ["src", "alt"], Fe = ["src"
|
|
|
432
1092
|
session: {}
|
|
433
1093
|
},
|
|
434
1094
|
setup(e) {
|
|
435
|
-
const n = e, { media: t, poll:
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
1095
|
+
const n = e, { media: t, poll: r } = ln(
|
|
1096
|
+
k(n, "url"),
|
|
1097
|
+
k(n, "accept"),
|
|
1098
|
+
k(n, "session")
|
|
439
1099
|
);
|
|
440
1100
|
function i() {
|
|
441
1101
|
t.value && (window.location.href = t.value.dataUrl);
|
|
442
1102
|
}
|
|
443
|
-
return (
|
|
1103
|
+
return (o, s) => X(o.$slots, "default", {
|
|
444
1104
|
media: v(t),
|
|
445
|
-
poll: v(
|
|
1105
|
+
poll: v(r)
|
|
446
1106
|
}, () => [
|
|
447
|
-
v(t)?.data.type.startsWith("image/") ? (
|
|
1107
|
+
v(t)?.data.type.startsWith("image/") ? (g(), b("img", {
|
|
448
1108
|
key: 0,
|
|
449
1109
|
src: v(t).dataUrl,
|
|
450
1110
|
alt: `An image by ${v(t).actor}`
|
|
451
|
-
}, null, 8,
|
|
1111
|
+
}, null, 8, fn)) : v(t)?.data.type.startsWith("video/") ? (g(), b("video", {
|
|
452
1112
|
key: 1,
|
|
453
1113
|
controls: "",
|
|
454
1114
|
src: v(t).dataUrl,
|
|
455
1115
|
alt: `A video by ${v(t).actor}`
|
|
456
|
-
}, null, 8,
|
|
1116
|
+
}, null, 8, dn)) : v(t)?.data.type.startsWith("audio/") ? (g(), b("audio", {
|
|
457
1117
|
key: 2,
|
|
458
1118
|
controls: "",
|
|
459
1119
|
src: v(t).dataUrl,
|
|
460
1120
|
alt: `Audio by ${v(t).actor}`
|
|
461
|
-
}, null, 8,
|
|
1121
|
+
}, null, 8, hn)) : v(t)?.data.type === "text/html" ? (g(), b("iframe", {
|
|
462
1122
|
key: 3,
|
|
463
1123
|
src: v(t).dataUrl,
|
|
464
1124
|
alt: `HTML by ${v(t).actor}`,
|
|
465
1125
|
sandbox: ""
|
|
466
|
-
}, null, 8,
|
|
1126
|
+
}, null, 8, pn)) : v(t)?.data.type.startsWith("application/pdf") ? (g(), b("object", {
|
|
467
1127
|
key: 4,
|
|
468
1128
|
data: v(t).dataUrl,
|
|
469
1129
|
type: "application/pdf",
|
|
470
1130
|
alt: `PDF by ${v(t).actor}`
|
|
471
|
-
}, null, 8,
|
|
1131
|
+
}, null, 8, mn)) : v(t) ? (g(), b("button", {
|
|
472
1132
|
key: 5,
|
|
473
1133
|
onClick: i
|
|
474
|
-
}, "Download")) : v(t) === null ? (
|
|
475
|
-
|
|
476
|
-
])])) : (
|
|
477
|
-
|
|
1134
|
+
}, "Download media")) : v(t) === null ? (g(), b("p", vn, [...s[0] || (s[0] = [
|
|
1135
|
+
m("em", null, "Media not found", -1)
|
|
1136
|
+
])])) : (g(), b("p", yn, [...s[1] || (s[1] = [
|
|
1137
|
+
m("em", null, " Media loading... ", -1)
|
|
478
1138
|
])]))
|
|
479
1139
|
]);
|
|
480
1140
|
}
|
|
481
1141
|
});
|
|
482
|
-
function
|
|
483
|
-
const n =
|
|
1142
|
+
function bn(e) {
|
|
1143
|
+
const n = je(), { output: t } = Le(
|
|
484
1144
|
e,
|
|
485
1145
|
n.handleToActor.bind(n)
|
|
486
1146
|
);
|
|
487
1147
|
return { actor: t };
|
|
488
1148
|
}
|
|
489
|
-
const
|
|
1149
|
+
const Be = /* @__PURE__ */ R({
|
|
490
1150
|
__name: "HandleToActor",
|
|
491
1151
|
props: {
|
|
492
1152
|
handle: {}
|
|
493
1153
|
},
|
|
494
1154
|
setup(e) {
|
|
495
|
-
const t =
|
|
496
|
-
return (i,
|
|
497
|
-
|
|
1155
|
+
const t = k(e, "handle"), { actor: r } = bn(t);
|
|
1156
|
+
return (i, o) => X(i.$slots, "default", { actor: v(r) }, () => [
|
|
1157
|
+
m("span", null, E(v(Ve)(v(r))), 1)
|
|
498
1158
|
]);
|
|
499
1159
|
}
|
|
500
1160
|
});
|
|
501
|
-
var
|
|
502
|
-
return
|
|
503
|
-
t.__proto__ =
|
|
504
|
-
} || function(t,
|
|
505
|
-
for (var i in
|
|
506
|
-
},
|
|
1161
|
+
var be = function(e, n) {
|
|
1162
|
+
return be = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t, r) {
|
|
1163
|
+
t.__proto__ = r;
|
|
1164
|
+
} || function(t, r) {
|
|
1165
|
+
for (var i in r) r.hasOwnProperty(i) && (t[i] = r[i]);
|
|
1166
|
+
}, be(e, n);
|
|
507
1167
|
};
|
|
508
|
-
function
|
|
509
|
-
|
|
1168
|
+
function gn(e, n) {
|
|
1169
|
+
be(e, n);
|
|
510
1170
|
function t() {
|
|
511
1171
|
this.constructor = e;
|
|
512
1172
|
}
|
|
513
1173
|
e.prototype = n === null ? Object.create(n) : (t.prototype = n.prototype, new t());
|
|
514
1174
|
}
|
|
515
|
-
function
|
|
516
|
-
function i(
|
|
517
|
-
return
|
|
518
|
-
s(
|
|
1175
|
+
function I(e, n, t, r) {
|
|
1176
|
+
function i(o) {
|
|
1177
|
+
return o instanceof t ? o : new t(function(s) {
|
|
1178
|
+
s(o);
|
|
519
1179
|
});
|
|
520
1180
|
}
|
|
521
|
-
return new (t || (t = Promise))(function(
|
|
522
|
-
function
|
|
1181
|
+
return new (t || (t = Promise))(function(o, s) {
|
|
1182
|
+
function u(f) {
|
|
523
1183
|
try {
|
|
524
|
-
|
|
525
|
-
} catch (
|
|
526
|
-
s(
|
|
1184
|
+
a(r.next(f));
|
|
1185
|
+
} catch (d) {
|
|
1186
|
+
s(d);
|
|
527
1187
|
}
|
|
528
1188
|
}
|
|
529
1189
|
function c(f) {
|
|
530
1190
|
try {
|
|
531
|
-
|
|
532
|
-
} catch (
|
|
533
|
-
s(
|
|
1191
|
+
a(r.throw(f));
|
|
1192
|
+
} catch (d) {
|
|
1193
|
+
s(d);
|
|
534
1194
|
}
|
|
535
1195
|
}
|
|
536
|
-
function
|
|
537
|
-
f.done ?
|
|
1196
|
+
function a(f) {
|
|
1197
|
+
f.done ? o(f.value) : i(f.value).then(u, c);
|
|
538
1198
|
}
|
|
539
|
-
|
|
1199
|
+
a((r = r.apply(e, [])).next());
|
|
540
1200
|
});
|
|
541
1201
|
}
|
|
542
|
-
function
|
|
1202
|
+
function $(e, n) {
|
|
543
1203
|
var t = { label: 0, sent: function() {
|
|
544
|
-
if (
|
|
545
|
-
return
|
|
546
|
-
}, trys: [], ops: [] },
|
|
547
|
-
return s = { next:
|
|
1204
|
+
if (o[0] & 1) throw o[1];
|
|
1205
|
+
return o[1];
|
|
1206
|
+
}, trys: [], ops: [] }, r, i, o, s;
|
|
1207
|
+
return s = { next: u(0), throw: u(1), return: u(2) }, typeof Symbol == "function" && (s[Symbol.iterator] = function() {
|
|
548
1208
|
return this;
|
|
549
1209
|
}), s;
|
|
550
|
-
function a
|
|
1210
|
+
function u(a) {
|
|
551
1211
|
return function(f) {
|
|
552
|
-
return c([
|
|
1212
|
+
return c([a, f]);
|
|
553
1213
|
};
|
|
554
1214
|
}
|
|
555
|
-
function c(
|
|
556
|
-
if (
|
|
1215
|
+
function c(a) {
|
|
1216
|
+
if (r) throw new TypeError("Generator is already executing.");
|
|
557
1217
|
for (; t; ) try {
|
|
558
|
-
if (
|
|
559
|
-
switch (i = 0,
|
|
1218
|
+
if (r = 1, i && (o = a[0] & 2 ? i.return : a[0] ? i.throw || ((o = i.return) && o.call(i), 0) : i.next) && !(o = o.call(i, a[1])).done) return o;
|
|
1219
|
+
switch (i = 0, o && (a = [a[0] & 2, o.value]), a[0]) {
|
|
560
1220
|
case 0:
|
|
561
1221
|
case 1:
|
|
562
|
-
|
|
1222
|
+
o = a;
|
|
563
1223
|
break;
|
|
564
1224
|
case 4:
|
|
565
|
-
return t.label++, { value:
|
|
1225
|
+
return t.label++, { value: a[1], done: !1 };
|
|
566
1226
|
case 5:
|
|
567
|
-
t.label++, i =
|
|
1227
|
+
t.label++, i = a[1], a = [0];
|
|
568
1228
|
continue;
|
|
569
1229
|
case 7:
|
|
570
|
-
|
|
1230
|
+
a = t.ops.pop(), t.trys.pop();
|
|
571
1231
|
continue;
|
|
572
1232
|
default:
|
|
573
|
-
if (
|
|
1233
|
+
if (o = t.trys, !(o = o.length > 0 && o[o.length - 1]) && (a[0] === 6 || a[0] === 2)) {
|
|
574
1234
|
t = 0;
|
|
575
1235
|
continue;
|
|
576
1236
|
}
|
|
577
|
-
if (
|
|
578
|
-
t.label =
|
|
1237
|
+
if (a[0] === 3 && (!o || a[1] > o[0] && a[1] < o[3])) {
|
|
1238
|
+
t.label = a[1];
|
|
579
1239
|
break;
|
|
580
1240
|
}
|
|
581
|
-
if (
|
|
582
|
-
t.label =
|
|
1241
|
+
if (a[0] === 6 && t.label < o[1]) {
|
|
1242
|
+
t.label = o[1], o = a;
|
|
583
1243
|
break;
|
|
584
1244
|
}
|
|
585
|
-
if (
|
|
586
|
-
t.label =
|
|
1245
|
+
if (o && t.label < o[2]) {
|
|
1246
|
+
t.label = o[2], t.ops.push(a);
|
|
587
1247
|
break;
|
|
588
1248
|
}
|
|
589
|
-
|
|
1249
|
+
o[2] && t.ops.pop(), t.trys.pop();
|
|
590
1250
|
continue;
|
|
591
1251
|
}
|
|
592
|
-
|
|
1252
|
+
a = n.call(e, t);
|
|
593
1253
|
} catch (f) {
|
|
594
|
-
|
|
1254
|
+
a = [6, f], i = 0;
|
|
595
1255
|
} finally {
|
|
596
|
-
|
|
1256
|
+
r = o = 0;
|
|
597
1257
|
}
|
|
598
|
-
if (
|
|
599
|
-
return { value:
|
|
1258
|
+
if (a[0] & 5) throw a[1];
|
|
1259
|
+
return { value: a[0] ? a[1] : void 0, done: !0 };
|
|
600
1260
|
}
|
|
601
1261
|
}
|
|
602
|
-
function
|
|
603
|
-
var n = typeof Symbol == "function" && Symbol.iterator, t = n && e[n],
|
|
1262
|
+
function D(e) {
|
|
1263
|
+
var n = typeof Symbol == "function" && Symbol.iterator, t = n && e[n], r = 0;
|
|
604
1264
|
if (t) return t.call(e);
|
|
605
1265
|
if (e && typeof e.length == "number") return {
|
|
606
1266
|
next: function() {
|
|
607
|
-
return e &&
|
|
1267
|
+
return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e };
|
|
608
1268
|
}
|
|
609
1269
|
};
|
|
610
1270
|
throw new TypeError(n ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
611
1271
|
}
|
|
612
|
-
function
|
|
613
|
-
return this instanceof
|
|
1272
|
+
function B(e) {
|
|
1273
|
+
return this instanceof B ? (this.v = e, this) : new B(e);
|
|
614
1274
|
}
|
|
615
|
-
function
|
|
1275
|
+
function wn(e, n, t) {
|
|
616
1276
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
617
|
-
var
|
|
1277
|
+
var r = t.apply(e, n || []), i, o = [];
|
|
618
1278
|
return i = {}, s("next"), s("throw"), s("return"), i[Symbol.asyncIterator] = function() {
|
|
619
1279
|
return this;
|
|
620
1280
|
}, i;
|
|
621
1281
|
function s(l) {
|
|
622
|
-
|
|
623
|
-
return new Promise(function(
|
|
624
|
-
|
|
1282
|
+
r[l] && (i[l] = function(p) {
|
|
1283
|
+
return new Promise(function(h, y) {
|
|
1284
|
+
o.push([l, p, h, y]) > 1 || u(l, p);
|
|
625
1285
|
});
|
|
626
1286
|
});
|
|
627
1287
|
}
|
|
628
|
-
function
|
|
1288
|
+
function u(l, p) {
|
|
629
1289
|
try {
|
|
630
|
-
c(
|
|
631
|
-
} catch (
|
|
632
|
-
|
|
1290
|
+
c(r[l](p));
|
|
1291
|
+
} catch (h) {
|
|
1292
|
+
d(o[0][3], h);
|
|
633
1293
|
}
|
|
634
1294
|
}
|
|
635
1295
|
function c(l) {
|
|
636
|
-
l.value instanceof
|
|
1296
|
+
l.value instanceof B ? Promise.resolve(l.value.v).then(a, f) : d(o[0][2], l);
|
|
637
1297
|
}
|
|
638
|
-
function
|
|
639
|
-
|
|
1298
|
+
function a(l) {
|
|
1299
|
+
u("next", l);
|
|
640
1300
|
}
|
|
641
1301
|
function f(l) {
|
|
642
|
-
|
|
1302
|
+
u("throw", l);
|
|
643
1303
|
}
|
|
644
|
-
function
|
|
645
|
-
l(
|
|
1304
|
+
function d(l, p) {
|
|
1305
|
+
l(p), o.shift(), o.length && u(o[0][0], o[0][1]);
|
|
646
1306
|
}
|
|
647
1307
|
}
|
|
648
|
-
var
|
|
1308
|
+
var Xe = (
|
|
649
1309
|
/** @class */
|
|
650
1310
|
(function(e) {
|
|
651
|
-
|
|
1311
|
+
gn(n, e);
|
|
652
1312
|
function n(t) {
|
|
653
|
-
var
|
|
654
|
-
return Object.defineProperty(
|
|
1313
|
+
var r = e.call(this, t) || this;
|
|
1314
|
+
return Object.defineProperty(r, "name", {
|
|
655
1315
|
value: "RepeaterOverflowError",
|
|
656
1316
|
enumerable: !1
|
|
657
|
-
}), typeof Object.setPrototypeOf == "function" ? Object.setPrototypeOf(
|
|
1317
|
+
}), typeof Object.setPrototypeOf == "function" ? Object.setPrototypeOf(r, r.constructor.prototype) : r.__proto__ = r.constructor.prototype, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(r, r.constructor), r;
|
|
658
1318
|
}
|
|
659
1319
|
return n;
|
|
660
1320
|
})(Error)
|
|
@@ -741,16 +1401,16 @@ var Pe = (
|
|
|
741
1401
|
return this._q.shift();
|
|
742
1402
|
}, e;
|
|
743
1403
|
})();
|
|
744
|
-
function
|
|
745
|
-
e != null && typeof e.then == "function" && e.then(
|
|
1404
|
+
function ge(e) {
|
|
1405
|
+
e != null && typeof e.then == "function" && e.then(ie, ie);
|
|
746
1406
|
}
|
|
747
|
-
var
|
|
1407
|
+
var me = 0, Me = 1, G = 2, re = 3, we = 4, oe = 1024, ie = function() {
|
|
748
1408
|
};
|
|
749
|
-
function
|
|
750
|
-
var n = e.err, t = Promise.resolve(e.execution).then(function(
|
|
1409
|
+
function N(e) {
|
|
1410
|
+
var n = e.err, t = Promise.resolve(e.execution).then(function(r) {
|
|
751
1411
|
if (n != null)
|
|
752
1412
|
throw n;
|
|
753
|
-
return
|
|
1413
|
+
return r;
|
|
754
1414
|
});
|
|
755
1415
|
return e.err = void 0, e.execution = t.then(function() {
|
|
756
1416
|
}, function() {
|
|
@@ -758,33 +1418,33 @@ function z(e) {
|
|
|
758
1418
|
return t;
|
|
759
1419
|
});
|
|
760
1420
|
}
|
|
761
|
-
function
|
|
762
|
-
var t = e.state >=
|
|
763
|
-
return Promise.resolve(n).then(function(
|
|
764
|
-
return !t && e.state >=
|
|
1421
|
+
function A(e, n) {
|
|
1422
|
+
var t = e.state >= re;
|
|
1423
|
+
return Promise.resolve(n).then(function(r) {
|
|
1424
|
+
return !t && e.state >= we ? N(e).then(function(i) {
|
|
765
1425
|
return {
|
|
766
1426
|
value: i,
|
|
767
1427
|
done: !0
|
|
768
1428
|
};
|
|
769
|
-
}) : { value:
|
|
1429
|
+
}) : { value: r, done: t };
|
|
770
1430
|
});
|
|
771
1431
|
}
|
|
772
|
-
function
|
|
773
|
-
var t,
|
|
774
|
-
if (!(e.state >=
|
|
775
|
-
if (e.state =
|
|
1432
|
+
function ke(e, n) {
|
|
1433
|
+
var t, r;
|
|
1434
|
+
if (!(e.state >= G))
|
|
1435
|
+
if (e.state = G, e.onnext(), e.onstop(), e.err == null && (e.err = n), e.pushes.length === 0 && (typeof e.buffer > "u" || e.buffer.empty))
|
|
776
1436
|
q(e);
|
|
777
1437
|
else
|
|
778
1438
|
try {
|
|
779
|
-
for (var i =
|
|
780
|
-
var s =
|
|
1439
|
+
for (var i = D(e.pushes), o = i.next(); !o.done; o = i.next()) {
|
|
1440
|
+
var s = o.value;
|
|
781
1441
|
s.resolve();
|
|
782
1442
|
}
|
|
783
|
-
} catch (
|
|
784
|
-
t = { error:
|
|
1443
|
+
} catch (u) {
|
|
1444
|
+
t = { error: u };
|
|
785
1445
|
} finally {
|
|
786
1446
|
try {
|
|
787
|
-
|
|
1447
|
+
o && !o.done && (r = i.return) && r.call(i);
|
|
788
1448
|
} finally {
|
|
789
1449
|
if (t) throw t.error;
|
|
790
1450
|
}
|
|
@@ -792,20 +1452,20 @@ function ce(e, n) {
|
|
|
792
1452
|
}
|
|
793
1453
|
function q(e) {
|
|
794
1454
|
var n, t;
|
|
795
|
-
if (!(e.state >=
|
|
796
|
-
e.state <
|
|
1455
|
+
if (!(e.state >= re)) {
|
|
1456
|
+
e.state < G && ke(e), e.state = re, e.buffer = void 0;
|
|
797
1457
|
try {
|
|
798
|
-
for (var
|
|
799
|
-
var
|
|
800
|
-
return
|
|
1458
|
+
for (var r = D(e.nexts), i = r.next(); !i.done; i = r.next()) {
|
|
1459
|
+
var o = i.value, s = e.pending === void 0 ? N(e) : e.pending.then(function() {
|
|
1460
|
+
return N(e);
|
|
801
1461
|
});
|
|
802
|
-
|
|
1462
|
+
o.resolve(A(e, s));
|
|
803
1463
|
}
|
|
804
|
-
} catch (
|
|
805
|
-
n = { error:
|
|
1464
|
+
} catch (u) {
|
|
1465
|
+
n = { error: u };
|
|
806
1466
|
} finally {
|
|
807
1467
|
try {
|
|
808
|
-
i && !i.done && (t =
|
|
1468
|
+
i && !i.done && (t = r.return) && t.call(r);
|
|
809
1469
|
} finally {
|
|
810
1470
|
if (n) throw n.error;
|
|
811
1471
|
}
|
|
@@ -813,131 +1473,131 @@ function q(e) {
|
|
|
813
1473
|
e.pushes = [], e.nexts = [];
|
|
814
1474
|
}
|
|
815
1475
|
}
|
|
816
|
-
function
|
|
817
|
-
e.state >=
|
|
1476
|
+
function Ne(e) {
|
|
1477
|
+
e.state >= we || (e.state < re && q(e), e.state = we);
|
|
818
1478
|
}
|
|
819
|
-
function
|
|
820
|
-
if (
|
|
821
|
-
throw new
|
|
822
|
-
if (e.state >=
|
|
1479
|
+
function _n(e, n) {
|
|
1480
|
+
if (ge(n), e.pushes.length >= oe)
|
|
1481
|
+
throw new Xe("No more than " + oe + " pending calls to push are allowed on a single repeater.");
|
|
1482
|
+
if (e.state >= G)
|
|
823
1483
|
return Promise.resolve(void 0);
|
|
824
1484
|
var t = e.pending === void 0 ? Promise.resolve(n) : e.pending.then(function() {
|
|
825
1485
|
return n;
|
|
826
1486
|
});
|
|
827
1487
|
t = t.catch(function(c) {
|
|
828
|
-
e.state <
|
|
1488
|
+
e.state < G && (e.err = c), Ne(e);
|
|
829
1489
|
});
|
|
830
|
-
var
|
|
1490
|
+
var r;
|
|
831
1491
|
if (e.nexts.length) {
|
|
832
1492
|
var i = e.nexts.shift();
|
|
833
|
-
i.resolve(
|
|
1493
|
+
i.resolve(A(e, t)), e.nexts.length ? r = Promise.resolve(e.nexts[0].value) : typeof e.buffer < "u" && !e.buffer.full ? r = Promise.resolve(void 0) : r = new Promise(function(c) {
|
|
834
1494
|
return e.onnext = c;
|
|
835
1495
|
});
|
|
836
|
-
} else typeof e.buffer < "u" && !e.buffer.full ? (e.buffer.add(t),
|
|
1496
|
+
} else typeof e.buffer < "u" && !e.buffer.full ? (e.buffer.add(t), r = Promise.resolve(void 0)) : r = new Promise(function(c) {
|
|
837
1497
|
return e.pushes.push({ resolve: c, value: t });
|
|
838
1498
|
});
|
|
839
|
-
var
|
|
840
|
-
if (
|
|
1499
|
+
var o = !0, s = {}, u = r.catch(function(c) {
|
|
1500
|
+
if (o)
|
|
841
1501
|
throw c;
|
|
842
1502
|
});
|
|
843
|
-
return s.then = function(c,
|
|
844
|
-
return
|
|
1503
|
+
return s.then = function(c, a) {
|
|
1504
|
+
return o = !1, Promise.prototype.then.call(r, c, a);
|
|
845
1505
|
}, s.catch = function(c) {
|
|
846
|
-
return
|
|
847
|
-
}, s.finally =
|
|
848
|
-
return
|
|
1506
|
+
return o = !1, Promise.prototype.catch.call(r, c);
|
|
1507
|
+
}, s.finally = r.finally.bind(r), e.pending = t.then(function() {
|
|
1508
|
+
return u;
|
|
849
1509
|
}).catch(function(c) {
|
|
850
|
-
e.err = c,
|
|
1510
|
+
e.err = c, Ne(e);
|
|
851
1511
|
}), s;
|
|
852
1512
|
}
|
|
853
|
-
function
|
|
854
|
-
var n =
|
|
855
|
-
return e.onstop =
|
|
1513
|
+
function zn(e) {
|
|
1514
|
+
var n = ke.bind(null, e), t = new Promise(function(r) {
|
|
1515
|
+
return e.onstop = r;
|
|
856
1516
|
});
|
|
857
1517
|
return n.then = t.then.bind(t), n.catch = t.catch.bind(t), n.finally = t.finally.bind(t), n;
|
|
858
1518
|
}
|
|
859
|
-
function
|
|
860
|
-
if (!(e.state >=
|
|
861
|
-
e.state =
|
|
862
|
-
var n =
|
|
863
|
-
e.execution = new Promise(function(
|
|
864
|
-
return
|
|
1519
|
+
function Pn(e) {
|
|
1520
|
+
if (!(e.state >= Me)) {
|
|
1521
|
+
e.state = Me;
|
|
1522
|
+
var n = _n.bind(null, e), t = zn(e);
|
|
1523
|
+
e.execution = new Promise(function(r) {
|
|
1524
|
+
return r(e.executor(n, t));
|
|
865
1525
|
}), e.execution.catch(function() {
|
|
866
|
-
return
|
|
1526
|
+
return ke(e);
|
|
867
1527
|
});
|
|
868
1528
|
}
|
|
869
1529
|
}
|
|
870
|
-
var
|
|
1530
|
+
var te = /* @__PURE__ */ new WeakMap(), K = (
|
|
871
1531
|
/** @class */
|
|
872
1532
|
(function() {
|
|
873
1533
|
function e(n, t) {
|
|
874
|
-
|
|
1534
|
+
te.set(this, {
|
|
875
1535
|
executor: n,
|
|
876
1536
|
buffer: t,
|
|
877
1537
|
err: void 0,
|
|
878
|
-
state:
|
|
1538
|
+
state: me,
|
|
879
1539
|
pushes: [],
|
|
880
1540
|
nexts: [],
|
|
881
1541
|
pending: void 0,
|
|
882
1542
|
execution: void 0,
|
|
883
|
-
onnext:
|
|
884
|
-
onstop:
|
|
1543
|
+
onnext: ie,
|
|
1544
|
+
onstop: ie
|
|
885
1545
|
});
|
|
886
1546
|
}
|
|
887
1547
|
return e.prototype.next = function(n) {
|
|
888
|
-
|
|
889
|
-
var t =
|
|
1548
|
+
ge(n);
|
|
1549
|
+
var t = te.get(this);
|
|
890
1550
|
if (t === void 0)
|
|
891
1551
|
throw new Error("WeakMap error");
|
|
892
|
-
if (t.nexts.length >=
|
|
893
|
-
throw new
|
|
894
|
-
if (t.state <=
|
|
895
|
-
var
|
|
1552
|
+
if (t.nexts.length >= oe)
|
|
1553
|
+
throw new Xe("No more than " + oe + " pending calls to next are allowed on a single repeater.");
|
|
1554
|
+
if (t.state <= me && Pn(t), t.onnext(n), typeof t.buffer < "u" && !t.buffer.empty) {
|
|
1555
|
+
var r = A(t, t.buffer.remove());
|
|
896
1556
|
if (t.pushes.length) {
|
|
897
1557
|
var i = t.pushes.shift();
|
|
898
1558
|
t.buffer.add(i.value), t.onnext = i.resolve;
|
|
899
1559
|
}
|
|
900
|
-
return
|
|
1560
|
+
return r;
|
|
901
1561
|
} else if (t.pushes.length) {
|
|
902
|
-
var
|
|
903
|
-
return t.onnext =
|
|
904
|
-
} else if (t.state >=
|
|
905
|
-
return q(t),
|
|
1562
|
+
var o = t.pushes.shift();
|
|
1563
|
+
return t.onnext = o.resolve, A(t, o.value);
|
|
1564
|
+
} else if (t.state >= G)
|
|
1565
|
+
return q(t), A(t, N(t));
|
|
906
1566
|
return new Promise(function(s) {
|
|
907
1567
|
return t.nexts.push({ resolve: s, value: n });
|
|
908
1568
|
});
|
|
909
1569
|
}, e.prototype.return = function(n) {
|
|
910
|
-
|
|
911
|
-
var t =
|
|
1570
|
+
ge(n);
|
|
1571
|
+
var t = te.get(this);
|
|
912
1572
|
if (t === void 0)
|
|
913
1573
|
throw new Error("WeakMap error");
|
|
914
1574
|
return q(t), t.execution = Promise.resolve(t.execution).then(function() {
|
|
915
1575
|
return n;
|
|
916
|
-
}),
|
|
1576
|
+
}), A(t, N(t));
|
|
917
1577
|
}, e.prototype.throw = function(n) {
|
|
918
|
-
var t =
|
|
1578
|
+
var t = te.get(this);
|
|
919
1579
|
if (t === void 0)
|
|
920
1580
|
throw new Error("WeakMap error");
|
|
921
|
-
return t.state <=
|
|
1581
|
+
return t.state <= me || t.state >= G || typeof t.buffer < "u" && !t.buffer.empty ? (q(t), t.err == null && (t.err = n), A(t, N(t))) : this.next(Promise.reject(n));
|
|
922
1582
|
}, e.prototype[Symbol.asyncIterator] = function() {
|
|
923
1583
|
return this;
|
|
924
|
-
}, e.race =
|
|
1584
|
+
}, e.race = jn, e.merge = kn, e.zip = On, e.latest = En, e;
|
|
925
1585
|
})()
|
|
926
1586
|
);
|
|
927
|
-
function
|
|
928
|
-
var t,
|
|
929
|
-
|
|
930
|
-
return
|
|
931
|
-
return
|
|
1587
|
+
function fe(e, n) {
|
|
1588
|
+
var t, r, i = [], o = function(a) {
|
|
1589
|
+
a != null && typeof a[Symbol.asyncIterator] == "function" ? i.push(a[Symbol.asyncIterator]()) : a != null && typeof a[Symbol.iterator] == "function" ? i.push(a[Symbol.iterator]()) : i.push((function() {
|
|
1590
|
+
return wn(this, arguments, function() {
|
|
1591
|
+
return $(this, function(l) {
|
|
932
1592
|
switch (l.label) {
|
|
933
1593
|
case 0:
|
|
934
|
-
return n.yieldValues ? [4,
|
|
1594
|
+
return n.yieldValues ? [4, B(a)] : [3, 3];
|
|
935
1595
|
case 1:
|
|
936
1596
|
return [4, l.sent()];
|
|
937
1597
|
case 2:
|
|
938
1598
|
l.sent(), l.label = 3;
|
|
939
1599
|
case 3:
|
|
940
|
-
return n.returnValues ? [4,
|
|
1600
|
+
return n.returnValues ? [4, B(a)] : [3, 5];
|
|
941
1601
|
case 4:
|
|
942
1602
|
return [2, l.sent()];
|
|
943
1603
|
case 5:
|
|
@@ -951,28 +1611,28 @@ function Y(e, n) {
|
|
|
951
1611
|
})());
|
|
952
1612
|
};
|
|
953
1613
|
try {
|
|
954
|
-
for (var s =
|
|
955
|
-
var c =
|
|
956
|
-
|
|
1614
|
+
for (var s = D(e), u = s.next(); !u.done; u = s.next()) {
|
|
1615
|
+
var c = u.value;
|
|
1616
|
+
o(c);
|
|
957
1617
|
}
|
|
958
|
-
} catch (
|
|
959
|
-
t = { error:
|
|
1618
|
+
} catch (a) {
|
|
1619
|
+
t = { error: a };
|
|
960
1620
|
} finally {
|
|
961
1621
|
try {
|
|
962
|
-
|
|
1622
|
+
u && !u.done && (r = s.return) && r.call(s);
|
|
963
1623
|
} finally {
|
|
964
1624
|
if (t) throw t.error;
|
|
965
1625
|
}
|
|
966
1626
|
}
|
|
967
1627
|
return i;
|
|
968
1628
|
}
|
|
969
|
-
function
|
|
970
|
-
var n = this, t =
|
|
971
|
-
return new
|
|
972
|
-
return
|
|
973
|
-
var
|
|
974
|
-
return
|
|
975
|
-
switch (
|
|
1629
|
+
function jn(e) {
|
|
1630
|
+
var n = this, t = fe(e, { returnValues: !0 });
|
|
1631
|
+
return new K(function(r, i) {
|
|
1632
|
+
return I(n, void 0, void 0, function() {
|
|
1633
|
+
var o, s, u, c, a, f;
|
|
1634
|
+
return $(this, function(d) {
|
|
1635
|
+
switch (d.label) {
|
|
976
1636
|
case 0:
|
|
977
1637
|
if (!t.length)
|
|
978
1638
|
return i(), [
|
|
@@ -980,38 +1640,38 @@ function rt(e) {
|
|
|
980
1640
|
/*return*/
|
|
981
1641
|
];
|
|
982
1642
|
s = !1, i.then(function() {
|
|
983
|
-
|
|
984
|
-
}),
|
|
1643
|
+
o(), s = !0;
|
|
1644
|
+
}), d.label = 1;
|
|
985
1645
|
case 1:
|
|
986
|
-
|
|
987
|
-
var l,
|
|
988
|
-
return
|
|
989
|
-
switch (
|
|
1646
|
+
d.trys.push([1, , 5, 7]), c = void 0, a = 0, f = function() {
|
|
1647
|
+
var l, p, h, y, _, x;
|
|
1648
|
+
return $(this, function(O) {
|
|
1649
|
+
switch (O.label) {
|
|
990
1650
|
case 0:
|
|
991
|
-
l =
|
|
1651
|
+
l = a;
|
|
992
1652
|
try {
|
|
993
|
-
for (
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
}, function(
|
|
997
|
-
return i(
|
|
1653
|
+
for (p = (_ = void 0, D(t)), h = p.next(); !h.done; h = p.next())
|
|
1654
|
+
y = h.value, Promise.resolve(y.next()).then(function(z) {
|
|
1655
|
+
z.done ? (i(), u === void 0 && (u = z)) : a === l && (a++, o(z));
|
|
1656
|
+
}, function(z) {
|
|
1657
|
+
return i(z);
|
|
998
1658
|
});
|
|
999
|
-
} catch (
|
|
1000
|
-
|
|
1659
|
+
} catch (z) {
|
|
1660
|
+
_ = { error: z };
|
|
1001
1661
|
} finally {
|
|
1002
1662
|
try {
|
|
1003
|
-
|
|
1663
|
+
h && !h.done && (x = p.return) && x.call(p);
|
|
1004
1664
|
} finally {
|
|
1005
|
-
if (
|
|
1665
|
+
if (_) throw _.error;
|
|
1006
1666
|
}
|
|
1007
1667
|
}
|
|
1008
|
-
return [4, new Promise(function(
|
|
1009
|
-
return
|
|
1668
|
+
return [4, new Promise(function(z) {
|
|
1669
|
+
return o = z;
|
|
1010
1670
|
})];
|
|
1011
1671
|
case 1:
|
|
1012
|
-
return c =
|
|
1672
|
+
return c = O.sent(), c === void 0 ? [3, 3] : [4, r(c.value)];
|
|
1013
1673
|
case 2:
|
|
1014
|
-
|
|
1674
|
+
O.sent(), O.label = 3;
|
|
1015
1675
|
case 3:
|
|
1016
1676
|
return [
|
|
1017
1677
|
2
|
|
@@ -1019,19 +1679,19 @@ function rt(e) {
|
|
|
1019
1679
|
];
|
|
1020
1680
|
}
|
|
1021
1681
|
});
|
|
1022
|
-
},
|
|
1682
|
+
}, d.label = 2;
|
|
1023
1683
|
case 2:
|
|
1024
1684
|
return s ? [3, 4] : [5, f()];
|
|
1025
1685
|
case 3:
|
|
1026
|
-
return
|
|
1686
|
+
return d.sent(), [3, 2];
|
|
1027
1687
|
case 4:
|
|
1028
|
-
return [2,
|
|
1688
|
+
return [2, u && u.value];
|
|
1029
1689
|
case 5:
|
|
1030
1690
|
return i(), [4, Promise.race(t.map(function(l) {
|
|
1031
1691
|
return l.return && l.return();
|
|
1032
1692
|
}))];
|
|
1033
1693
|
case 6:
|
|
1034
|
-
return
|
|
1694
|
+
return d.sent(), [
|
|
1035
1695
|
7
|
|
1036
1696
|
/*endfinally*/
|
|
1037
1697
|
];
|
|
@@ -1045,68 +1705,68 @@ function rt(e) {
|
|
|
1045
1705
|
});
|
|
1046
1706
|
});
|
|
1047
1707
|
}
|
|
1048
|
-
function
|
|
1049
|
-
var n = this, t =
|
|
1050
|
-
return new
|
|
1051
|
-
return
|
|
1052
|
-
var
|
|
1053
|
-
return
|
|
1054
|
-
switch (
|
|
1708
|
+
function kn(e) {
|
|
1709
|
+
var n = this, t = fe(e, { yieldValues: !0 });
|
|
1710
|
+
return new K(function(r, i) {
|
|
1711
|
+
return I(n, void 0, void 0, function() {
|
|
1712
|
+
var o, s, u, c = this;
|
|
1713
|
+
return $(this, function(a) {
|
|
1714
|
+
switch (a.label) {
|
|
1055
1715
|
case 0:
|
|
1056
1716
|
if (!t.length)
|
|
1057
1717
|
return i(), [
|
|
1058
1718
|
2
|
|
1059
1719
|
/*return*/
|
|
1060
1720
|
];
|
|
1061
|
-
|
|
1062
|
-
var f,
|
|
1721
|
+
o = [], s = !1, i.then(function() {
|
|
1722
|
+
var f, d;
|
|
1063
1723
|
s = !0;
|
|
1064
1724
|
try {
|
|
1065
|
-
for (var l =
|
|
1066
|
-
var
|
|
1067
|
-
|
|
1725
|
+
for (var l = D(o), p = l.next(); !p.done; p = l.next()) {
|
|
1726
|
+
var h = p.value;
|
|
1727
|
+
h();
|
|
1068
1728
|
}
|
|
1069
|
-
} catch (
|
|
1070
|
-
f = { error:
|
|
1729
|
+
} catch (y) {
|
|
1730
|
+
f = { error: y };
|
|
1071
1731
|
} finally {
|
|
1072
1732
|
try {
|
|
1073
|
-
|
|
1733
|
+
p && !p.done && (d = l.return) && d.call(l);
|
|
1074
1734
|
} finally {
|
|
1075
1735
|
if (f) throw f.error;
|
|
1076
1736
|
}
|
|
1077
1737
|
}
|
|
1078
|
-
}),
|
|
1738
|
+
}), a.label = 1;
|
|
1079
1739
|
case 1:
|
|
1080
|
-
return
|
|
1081
|
-
return
|
|
1082
|
-
var l,
|
|
1083
|
-
return
|
|
1084
|
-
switch (
|
|
1740
|
+
return a.trys.push([1, , 3, 4]), [4, Promise.all(t.map(function(f, d) {
|
|
1741
|
+
return I(c, void 0, void 0, function() {
|
|
1742
|
+
var l, p;
|
|
1743
|
+
return $(this, function(h) {
|
|
1744
|
+
switch (h.label) {
|
|
1085
1745
|
case 0:
|
|
1086
|
-
|
|
1746
|
+
h.trys.push([0, , 6, 9]), h.label = 1;
|
|
1087
1747
|
case 1:
|
|
1088
|
-
return s ? [3, 5] : (Promise.resolve(f.next()).then(function(
|
|
1089
|
-
return
|
|
1090
|
-
}, function(
|
|
1091
|
-
return i(
|
|
1092
|
-
}), [4, new Promise(function(
|
|
1093
|
-
|
|
1748
|
+
return s ? [3, 5] : (Promise.resolve(f.next()).then(function(y) {
|
|
1749
|
+
return o[d](y);
|
|
1750
|
+
}, function(y) {
|
|
1751
|
+
return i(y);
|
|
1752
|
+
}), [4, new Promise(function(y) {
|
|
1753
|
+
o[d] = y;
|
|
1094
1754
|
})]);
|
|
1095
1755
|
case 2:
|
|
1096
|
-
return l =
|
|
1756
|
+
return l = h.sent(), l === void 0 ? [3, 4] : l.done ? (u = l, [
|
|
1097
1757
|
2
|
|
1098
1758
|
/*return*/
|
|
1099
|
-
]) : [4,
|
|
1759
|
+
]) : [4, r(l.value)];
|
|
1100
1760
|
case 3:
|
|
1101
|
-
|
|
1761
|
+
h.sent(), h.label = 4;
|
|
1102
1762
|
case 4:
|
|
1103
1763
|
return [3, 1];
|
|
1104
1764
|
case 5:
|
|
1105
1765
|
return [3, 9];
|
|
1106
1766
|
case 6:
|
|
1107
|
-
return
|
|
1767
|
+
return p = f.return, p ? [4, f.return()] : [3, 8];
|
|
1108
1768
|
case 7:
|
|
1109
|
-
|
|
1769
|
+
p = h.sent(), h.label = 8;
|
|
1110
1770
|
case 8:
|
|
1111
1771
|
return [
|
|
1112
1772
|
7
|
|
@@ -1122,7 +1782,7 @@ function ot(e) {
|
|
|
1122
1782
|
});
|
|
1123
1783
|
}))];
|
|
1124
1784
|
case 2:
|
|
1125
|
-
return
|
|
1785
|
+
return a.sent(), [2, u && u.value];
|
|
1126
1786
|
case 3:
|
|
1127
1787
|
return i(), [
|
|
1128
1788
|
7
|
|
@@ -1138,42 +1798,42 @@ function ot(e) {
|
|
|
1138
1798
|
});
|
|
1139
1799
|
});
|
|
1140
1800
|
}
|
|
1141
|
-
function
|
|
1142
|
-
var n = this, t =
|
|
1143
|
-
return new
|
|
1144
|
-
return
|
|
1145
|
-
var
|
|
1146
|
-
return
|
|
1147
|
-
switch (
|
|
1801
|
+
function On(e) {
|
|
1802
|
+
var n = this, t = fe(e, { returnValues: !0 });
|
|
1803
|
+
return new K(function(r, i) {
|
|
1804
|
+
return I(n, void 0, void 0, function() {
|
|
1805
|
+
var o, s, u, c;
|
|
1806
|
+
return $(this, function(a) {
|
|
1807
|
+
switch (a.label) {
|
|
1148
1808
|
case 0:
|
|
1149
1809
|
if (!t.length)
|
|
1150
1810
|
return i(), [2, []];
|
|
1151
1811
|
s = !1, i.then(function() {
|
|
1152
|
-
|
|
1153
|
-
}),
|
|
1812
|
+
o(), s = !0;
|
|
1813
|
+
}), a.label = 1;
|
|
1154
1814
|
case 1:
|
|
1155
|
-
|
|
1815
|
+
a.trys.push([1, , 6, 8]), a.label = 2;
|
|
1156
1816
|
case 2:
|
|
1157
1817
|
return s ? [3, 5] : (Promise.all(t.map(function(f) {
|
|
1158
1818
|
return f.next();
|
|
1159
1819
|
})).then(function(f) {
|
|
1160
|
-
return
|
|
1820
|
+
return o(f);
|
|
1161
1821
|
}, function(f) {
|
|
1162
1822
|
return i(f);
|
|
1163
1823
|
}), [4, new Promise(function(f) {
|
|
1164
|
-
return
|
|
1824
|
+
return o = f;
|
|
1165
1825
|
})]);
|
|
1166
1826
|
case 3:
|
|
1167
|
-
return
|
|
1827
|
+
return u = a.sent(), u === void 0 ? [
|
|
1168
1828
|
2
|
|
1169
1829
|
/*return*/
|
|
1170
|
-
] : (c =
|
|
1830
|
+
] : (c = u.map(function(f) {
|
|
1171
1831
|
return f.value;
|
|
1172
|
-
}),
|
|
1832
|
+
}), u.some(function(f) {
|
|
1173
1833
|
return f.done;
|
|
1174
|
-
}) ? [2, c] : [4,
|
|
1834
|
+
}) ? [2, c] : [4, r(c)]);
|
|
1175
1835
|
case 4:
|
|
1176
|
-
return
|
|
1836
|
+
return a.sent(), [3, 2];
|
|
1177
1837
|
case 5:
|
|
1178
1838
|
return [3, 8];
|
|
1179
1839
|
case 6:
|
|
@@ -1181,7 +1841,7 @@ function it(e) {
|
|
|
1181
1841
|
return f.return && f.return();
|
|
1182
1842
|
}))];
|
|
1183
1843
|
case 7:
|
|
1184
|
-
return
|
|
1844
|
+
return a.sent(), [
|
|
1185
1845
|
7
|
|
1186
1846
|
/*endfinally*/
|
|
1187
1847
|
];
|
|
@@ -1195,79 +1855,79 @@ function it(e) {
|
|
|
1195
1855
|
});
|
|
1196
1856
|
});
|
|
1197
1857
|
}
|
|
1198
|
-
function
|
|
1199
|
-
var n = this, t =
|
|
1858
|
+
function En(e) {
|
|
1859
|
+
var n = this, t = fe(e, {
|
|
1200
1860
|
yieldValues: !0,
|
|
1201
1861
|
returnValues: !0
|
|
1202
1862
|
});
|
|
1203
|
-
return new
|
|
1204
|
-
return
|
|
1205
|
-
var
|
|
1206
|
-
return
|
|
1207
|
-
switch (
|
|
1863
|
+
return new K(function(r, i) {
|
|
1864
|
+
return I(n, void 0, void 0, function() {
|
|
1865
|
+
var o, s, u, c, a, f = this;
|
|
1866
|
+
return $(this, function(d) {
|
|
1867
|
+
switch (d.label) {
|
|
1208
1868
|
case 0:
|
|
1209
1869
|
if (!t.length)
|
|
1210
1870
|
return i(), [2, []];
|
|
1211
|
-
s = [],
|
|
1212
|
-
var l,
|
|
1213
|
-
|
|
1871
|
+
s = [], u = !1, i.then(function() {
|
|
1872
|
+
var l, p;
|
|
1873
|
+
o();
|
|
1214
1874
|
try {
|
|
1215
|
-
for (var
|
|
1216
|
-
var
|
|
1217
|
-
|
|
1875
|
+
for (var h = D(s), y = h.next(); !y.done; y = h.next()) {
|
|
1876
|
+
var _ = y.value;
|
|
1877
|
+
_();
|
|
1218
1878
|
}
|
|
1219
|
-
} catch (
|
|
1220
|
-
l = { error:
|
|
1879
|
+
} catch (x) {
|
|
1880
|
+
l = { error: x };
|
|
1221
1881
|
} finally {
|
|
1222
1882
|
try {
|
|
1223
|
-
|
|
1883
|
+
y && !y.done && (p = h.return) && p.call(h);
|
|
1224
1884
|
} finally {
|
|
1225
1885
|
if (l) throw l.error;
|
|
1226
1886
|
}
|
|
1227
1887
|
}
|
|
1228
|
-
|
|
1229
|
-
}),
|
|
1888
|
+
u = !0;
|
|
1889
|
+
}), d.label = 1;
|
|
1230
1890
|
case 1:
|
|
1231
|
-
return
|
|
1891
|
+
return d.trys.push([1, , 5, 7]), Promise.all(t.map(function(l) {
|
|
1232
1892
|
return l.next();
|
|
1233
1893
|
})).then(function(l) {
|
|
1234
|
-
return
|
|
1894
|
+
return o(l);
|
|
1235
1895
|
}, function(l) {
|
|
1236
1896
|
return i(l);
|
|
1237
1897
|
}), [4, new Promise(function(l) {
|
|
1238
|
-
return
|
|
1898
|
+
return o = l;
|
|
1239
1899
|
})];
|
|
1240
1900
|
case 2:
|
|
1241
|
-
return c =
|
|
1901
|
+
return c = d.sent(), c === void 0 ? [
|
|
1242
1902
|
2
|
|
1243
1903
|
/*return*/
|
|
1244
|
-
] : (
|
|
1904
|
+
] : (a = c.map(function(l) {
|
|
1245
1905
|
return l.value;
|
|
1246
1906
|
}), c.every(function(l) {
|
|
1247
1907
|
return l.done;
|
|
1248
|
-
}) ? [2,
|
|
1908
|
+
}) ? [2, a] : [4, r(a.slice())]);
|
|
1249
1909
|
case 3:
|
|
1250
|
-
return
|
|
1251
|
-
return
|
|
1252
|
-
var
|
|
1253
|
-
return
|
|
1254
|
-
switch (
|
|
1910
|
+
return d.sent(), [4, Promise.all(t.map(function(l, p) {
|
|
1911
|
+
return I(f, void 0, void 0, function() {
|
|
1912
|
+
var h;
|
|
1913
|
+
return $(this, function(y) {
|
|
1914
|
+
switch (y.label) {
|
|
1255
1915
|
case 0:
|
|
1256
|
-
if (c[
|
|
1257
|
-
return [2, c[
|
|
1258
|
-
|
|
1916
|
+
if (c[p].done)
|
|
1917
|
+
return [2, c[p].value];
|
|
1918
|
+
y.label = 1;
|
|
1259
1919
|
case 1:
|
|
1260
|
-
return
|
|
1261
|
-
return s[
|
|
1262
|
-
}, function(
|
|
1263
|
-
return i(
|
|
1264
|
-
}), [4, new Promise(function(
|
|
1265
|
-
return s[
|
|
1920
|
+
return u ? [3, 4] : (Promise.resolve(l.next()).then(function(_) {
|
|
1921
|
+
return s[p](_);
|
|
1922
|
+
}, function(_) {
|
|
1923
|
+
return i(_);
|
|
1924
|
+
}), [4, new Promise(function(_) {
|
|
1925
|
+
return s[p] = _;
|
|
1266
1926
|
})]);
|
|
1267
1927
|
case 2:
|
|
1268
|
-
return
|
|
1928
|
+
return h = y.sent(), h === void 0 ? [2, c[p].value] : h.done ? [2, h.value] : (a[p] = h.value, [4, r(a.slice())]);
|
|
1269
1929
|
case 3:
|
|
1270
|
-
return
|
|
1930
|
+
return y.sent(), [3, 1];
|
|
1271
1931
|
case 4:
|
|
1272
1932
|
return [
|
|
1273
1933
|
2
|
|
@@ -1278,13 +1938,13 @@ function st(e) {
|
|
|
1278
1938
|
});
|
|
1279
1939
|
}))];
|
|
1280
1940
|
case 4:
|
|
1281
|
-
return [2,
|
|
1941
|
+
return [2, d.sent()];
|
|
1282
1942
|
case 5:
|
|
1283
1943
|
return i(), [4, Promise.all(t.map(function(l) {
|
|
1284
1944
|
return l.return && l.return();
|
|
1285
1945
|
}))];
|
|
1286
1946
|
case 6:
|
|
1287
|
-
return
|
|
1947
|
+
return d.sent(), [
|
|
1288
1948
|
7
|
|
1289
1949
|
/*endfinally*/
|
|
1290
1950
|
];
|
|
@@ -1298,8 +1958,7 @@ function st(e) {
|
|
|
1298
1958
|
});
|
|
1299
1959
|
});
|
|
1300
1960
|
}
|
|
1301
|
-
class
|
|
1302
|
-
ajv_;
|
|
1961
|
+
class Sn {
|
|
1303
1962
|
graffiti;
|
|
1304
1963
|
callbacks = /* @__PURE__ */ new Set();
|
|
1305
1964
|
options;
|
|
@@ -1311,12 +1970,6 @@ class ut {
|
|
|
1311
1970
|
deleteMedia;
|
|
1312
1971
|
actorToHandle;
|
|
1313
1972
|
handleToActor;
|
|
1314
|
-
get ajv() {
|
|
1315
|
-
return this.ajv_ || (this.ajv_ = (async () => {
|
|
1316
|
-
const { default: n } = await import("./ajv-D_HICdxS.mjs").then((t) => t.a);
|
|
1317
|
-
return new n({ strict: !1 });
|
|
1318
|
-
})()), this.ajv_;
|
|
1319
|
-
}
|
|
1320
1973
|
/**
|
|
1321
1974
|
* Wraps a Graffiti API instance to provide the synchronize methods.
|
|
1322
1975
|
* The GraffitiSyncrhonize class rather than the Graffiti class
|
|
@@ -1325,24 +1978,24 @@ class ut {
|
|
|
1325
1978
|
constructor(n, t) {
|
|
1326
1979
|
this.options = t ?? {}, this.graffiti = n, this.login = n.login.bind(n), this.logout = n.logout.bind(n), this.sessionEvents = n.sessionEvents, this.postMedia = n.postMedia.bind(n), this.getMedia = n.getMedia.bind(n), this.deleteMedia = n.deleteMedia.bind(n), this.actorToHandle = n.actorToHandle.bind(n), this.handleToActor = n.handleToActor.bind(n);
|
|
1327
1980
|
}
|
|
1328
|
-
synchronize(n, t,
|
|
1329
|
-
const s = new
|
|
1330
|
-
async (
|
|
1331
|
-
const
|
|
1332
|
-
if (
|
|
1333
|
-
|
|
1334
|
-
else if (
|
|
1981
|
+
synchronize(n, t, r, i, o = /* @__PURE__ */ new Set()) {
|
|
1982
|
+
const s = new K(
|
|
1983
|
+
async (u, c) => {
|
|
1984
|
+
const a = await Qe(r), f = (d) => {
|
|
1985
|
+
if (d?.tombstone)
|
|
1986
|
+
o.has(d.object.url) && u(d);
|
|
1987
|
+
else if (d && n(d.object) && (this.options.omniscient || Je(d.object, i))) {
|
|
1335
1988
|
let l = JSON.parse(
|
|
1336
|
-
JSON.stringify(
|
|
1989
|
+
JSON.stringify(d.object)
|
|
1337
1990
|
);
|
|
1338
|
-
this.options.omniscient || (l =
|
|
1991
|
+
this.options.omniscient || (l = Ke(l, t, i?.actor)), a(l) && (u({ object: l }), o.add(l.url));
|
|
1339
1992
|
}
|
|
1340
1993
|
};
|
|
1341
1994
|
this.callbacks.add(f), await c, this.callbacks.delete(f);
|
|
1342
1995
|
}
|
|
1343
1996
|
);
|
|
1344
1997
|
return (async function* () {
|
|
1345
|
-
for await (const
|
|
1998
|
+
for await (const u of s) yield u;
|
|
1346
1999
|
})();
|
|
1347
2000
|
}
|
|
1348
2001
|
/**
|
|
@@ -1358,11 +2011,11 @@ class ut {
|
|
|
1358
2011
|
*
|
|
1359
2012
|
* @group 0 - Synchronize Methods
|
|
1360
2013
|
*/
|
|
1361
|
-
synchronizeDiscover(n, t,
|
|
1362
|
-
function i(
|
|
1363
|
-
return
|
|
2014
|
+
synchronizeDiscover(n, t, r) {
|
|
2015
|
+
function i(o) {
|
|
2016
|
+
return o.channels.some((s) => n.includes(s));
|
|
1364
2017
|
}
|
|
1365
|
-
return this.synchronize(i, n, t,
|
|
2018
|
+
return this.synchronize(i, n, t, r);
|
|
1366
2019
|
}
|
|
1367
2020
|
/**
|
|
1368
2021
|
* This method has the same signature as {@link get} but
|
|
@@ -1376,16 +2029,16 @@ class ut {
|
|
|
1376
2029
|
*
|
|
1377
2030
|
* @group 0 - Synchronize Methods
|
|
1378
2031
|
*/
|
|
1379
|
-
synchronizeGet(n, t,
|
|
1380
|
-
const i =
|
|
1381
|
-
function
|
|
2032
|
+
synchronizeGet(n, t, r) {
|
|
2033
|
+
const i = he(n);
|
|
2034
|
+
function o(s) {
|
|
1382
2035
|
return s.url === i;
|
|
1383
2036
|
}
|
|
1384
2037
|
return this.synchronize(
|
|
1385
|
-
|
|
2038
|
+
o,
|
|
1386
2039
|
[],
|
|
1387
2040
|
t,
|
|
1388
|
-
|
|
2041
|
+
r,
|
|
1389
2042
|
/* @__PURE__ */ new Set([i])
|
|
1390
2043
|
);
|
|
1391
2044
|
}
|
|
@@ -1405,18 +2058,18 @@ class ut {
|
|
|
1405
2058
|
return this.synchronize(() => !0, [], n, t);
|
|
1406
2059
|
}
|
|
1407
2060
|
async synchronizeDispatch(n, t = !1) {
|
|
1408
|
-
for (const
|
|
1409
|
-
|
|
1410
|
-
t && await new Promise((
|
|
2061
|
+
for (const r of this.callbacks)
|
|
2062
|
+
r(n);
|
|
2063
|
+
t && await new Promise((r) => setTimeout(r, 0));
|
|
1411
2064
|
}
|
|
1412
2065
|
get = async (...n) => {
|
|
1413
2066
|
try {
|
|
1414
2067
|
const t = await this.graffiti.get(...n);
|
|
1415
2068
|
return this.synchronizeDispatch({ object: t }), t;
|
|
1416
2069
|
} catch (t) {
|
|
1417
|
-
throw t instanceof
|
|
2070
|
+
throw t instanceof T && this.synchronizeDispatch({
|
|
1418
2071
|
tombstone: !0,
|
|
1419
|
-
object: { url:
|
|
2072
|
+
object: { url: he(n[0]) }
|
|
1420
2073
|
}), t;
|
|
1421
2074
|
}
|
|
1422
2075
|
};
|
|
@@ -1427,28 +2080,28 @@ class ut {
|
|
|
1427
2080
|
delete = async (...n) => {
|
|
1428
2081
|
const t = {
|
|
1429
2082
|
tombstone: !0,
|
|
1430
|
-
object: { url:
|
|
2083
|
+
object: { url: he(n[0]) }
|
|
1431
2084
|
};
|
|
1432
2085
|
try {
|
|
1433
|
-
const
|
|
1434
|
-
return await this.synchronizeDispatch(t, !0),
|
|
1435
|
-
} catch (
|
|
1436
|
-
throw
|
|
2086
|
+
const r = await this.graffiti.delete(...n);
|
|
2087
|
+
return await this.synchronizeDispatch(t, !0), r;
|
|
2088
|
+
} catch (r) {
|
|
2089
|
+
throw r instanceof T && await this.synchronizeDispatch(t, !0), r;
|
|
1437
2090
|
}
|
|
1438
2091
|
};
|
|
1439
2092
|
objectStreamContinue(n) {
|
|
1440
2093
|
const t = this;
|
|
1441
2094
|
return (async function* () {
|
|
1442
2095
|
for (; ; ) {
|
|
1443
|
-
const
|
|
1444
|
-
if (
|
|
1445
|
-
const { continue: i, cursor:
|
|
2096
|
+
const r = await n.next();
|
|
2097
|
+
if (r.done) {
|
|
2098
|
+
const { continue: i, cursor: o } = r.value;
|
|
1446
2099
|
return {
|
|
1447
2100
|
continue: (s) => t.objectStreamContinue(i(s)),
|
|
1448
|
-
cursor:
|
|
2101
|
+
cursor: o
|
|
1449
2102
|
};
|
|
1450
2103
|
}
|
|
1451
|
-
|
|
2104
|
+
r.value.error || t.synchronizeDispatch(r.value), yield r.value;
|
|
1452
2105
|
}
|
|
1453
2106
|
})();
|
|
1454
2107
|
}
|
|
@@ -1456,9 +2109,9 @@ class ut {
|
|
|
1456
2109
|
const t = this.objectStreamContinue(n);
|
|
1457
2110
|
return (async function* () {
|
|
1458
2111
|
for (; ; ) {
|
|
1459
|
-
const
|
|
1460
|
-
if (
|
|
1461
|
-
(
|
|
2112
|
+
const r = await t.next();
|
|
2113
|
+
if (r.done) return r.value;
|
|
2114
|
+
(r.value.error || !r.value.tombstone) && (yield r.value);
|
|
1462
2115
|
}
|
|
1463
2116
|
})();
|
|
1464
2117
|
}
|
|
@@ -1471,56 +2124,47 @@ class ut {
|
|
|
1471
2124
|
return this.objectStreamContinue(t);
|
|
1472
2125
|
};
|
|
1473
2126
|
}
|
|
1474
|
-
|
|
1475
|
-
try {
|
|
1476
|
-
return e.compile(n);
|
|
1477
|
-
} catch (t) {
|
|
1478
|
-
throw new Se(
|
|
1479
|
-
t instanceof Error ? t.message : String(t)
|
|
1480
|
-
);
|
|
1481
|
-
}
|
|
1482
|
-
}
|
|
1483
|
-
const ft = {
|
|
2127
|
+
const An = {
|
|
1484
2128
|
install(e, n) {
|
|
1485
|
-
const t = n.graffiti,
|
|
1486
|
-
|
|
1487
|
-
const s =
|
|
2129
|
+
const t = n.graffiti, r = new Sn(t), i = S(void 0);
|
|
2130
|
+
r.sessionEvents.addEventListener("initialized", async (o) => {
|
|
2131
|
+
const s = o.detail;
|
|
1488
2132
|
if (s && s.error && console.error(s.error), s && s.href) {
|
|
1489
|
-
const
|
|
1490
|
-
if (
|
|
1491
|
-
const c =
|
|
1492
|
-
|
|
2133
|
+
const u = e.config.globalProperties.$router;
|
|
2134
|
+
if (u) {
|
|
2135
|
+
const c = u.options.history.base, a = new URL(s.href);
|
|
2136
|
+
a.pathname.startsWith(c) && (a.pathname = a.pathname.slice(c.length)), await u.replace(a.pathname + a.search + a.hash);
|
|
1493
2137
|
}
|
|
1494
2138
|
}
|
|
1495
2139
|
i.value || (i.value = null);
|
|
1496
|
-
}),
|
|
1497
|
-
const s =
|
|
2140
|
+
}), r.sessionEvents.addEventListener("login", (o) => {
|
|
2141
|
+
const s = o.detail;
|
|
1498
2142
|
if (s.error) {
|
|
1499
2143
|
console.error("Error logging in:"), console.error(s.error);
|
|
1500
2144
|
return;
|
|
1501
2145
|
} else
|
|
1502
2146
|
i.value = s.session;
|
|
1503
|
-
}),
|
|
1504
|
-
const s =
|
|
2147
|
+
}), r.sessionEvents.addEventListener("logout", (o) => {
|
|
2148
|
+
const s = o.detail;
|
|
1505
2149
|
s.error ? (console.error("Error logging out:"), console.error(s.error)) : i.value = null;
|
|
1506
|
-
}),
|
|
2150
|
+
}), Xt(r), Bt(i), e.component("GraffitiDiscover", qe), e.component("GraffitiGet", He), e.component("GraffitiGetMedia", We), e.component("GraffitiActorToHandle", V), e.component("GraffitiHandleToActor", Be), e.component("GraffitiObjectInfo", le), e.config.globalProperties.$graffiti = r, e.config.globalProperties.$graffitiSession = i;
|
|
1507
2151
|
}
|
|
1508
|
-
},
|
|
2152
|
+
}, Tn = qe, Gn = He, Mn = We, Nn = V, Zn = Be, In = le;
|
|
1509
2153
|
export {
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
2154
|
+
Nn as GraffitiActorToHandle,
|
|
2155
|
+
Tn as GraffitiDiscover,
|
|
2156
|
+
Gn as GraffitiGet,
|
|
2157
|
+
Mn as GraffitiGetMedia,
|
|
2158
|
+
Zn as GraffitiHandleToActor,
|
|
2159
|
+
In as GraffitiObjectInfo,
|
|
2160
|
+
An as GraffitiPlugin,
|
|
2161
|
+
je as useGraffiti,
|
|
2162
|
+
Kt as useGraffitiActorToHandle,
|
|
2163
|
+
Jt as useGraffitiDiscover,
|
|
2164
|
+
cn as useGraffitiGet,
|
|
2165
|
+
ln as useGraffitiGetMedia,
|
|
2166
|
+
bn as useGraffitiHandleToActor,
|
|
2167
|
+
$n as useGraffitiSession,
|
|
2168
|
+
ce as useGraffitiSynchronize
|
|
1525
2169
|
};
|
|
1526
2170
|
//# sourceMappingURL=plugin.mjs.map
|