@graffiti-garden/wrapper-vue 0.6.3 → 0.6.4
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 +419 -395
- package/dist/browser/plugin.mjs.map +1 -1
- package/dist/node/plugin.js +1 -1
- package/dist/node/plugin.js.map +1 -1
- package/dist/node/plugin.mjs +98 -73
- package/dist/node/plugin.mjs.map +1 -1
- package/dist/node/pollers.d.ts +1 -1
- package/dist/node/pollers.d.ts.map +1 -1
- package/dist/node/reducers.d.ts +3 -3
- package/dist/node/reducers.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/pollers.ts +14 -2
- package/src/reducers.ts +11 -3
package/dist/browser/plugin.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var v = (t,
|
|
4
|
-
import { inject as X, ref as
|
|
1
|
+
var pe = Object.defineProperty;
|
|
2
|
+
var de = (t, r, e) => r in t ? pe(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
|
|
3
|
+
var v = (t, r, e) => de(t, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
+
import { inject as X, ref as N, computed as ye, watch as ve, onScopeDispose as me, toValue as j, defineComponent as L, toRef as g, renderSlot as W, unref as b } from "vue";
|
|
5
5
|
const Y = Symbol(), Z = Symbol();
|
|
6
|
-
function
|
|
6
|
+
function M() {
|
|
7
7
|
const t = X(Y);
|
|
8
8
|
if (!t)
|
|
9
9
|
throw new Error(
|
|
@@ -11,8 +11,8 @@ function N() {
|
|
|
11
11
|
);
|
|
12
12
|
return t;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
return
|
|
14
|
+
function Le() {
|
|
15
|
+
return M();
|
|
16
16
|
}
|
|
17
17
|
function ee() {
|
|
18
18
|
const t = X(Z);
|
|
@@ -22,132 +22,156 @@ function ee() {
|
|
|
22
22
|
);
|
|
23
23
|
return t;
|
|
24
24
|
}
|
|
25
|
-
var
|
|
26
|
-
},
|
|
27
|
-
constructor(
|
|
28
|
-
super(
|
|
29
|
-
}
|
|
30
|
-
}, be = class ne extends Error {
|
|
31
|
-
constructor(n) {
|
|
32
|
-
super(n), this.name = "GraffitiErrorPatchTestFailed", Object.setPrototypeOf(this, ne.prototype);
|
|
25
|
+
var we = class {
|
|
26
|
+
}, be = class te extends Error {
|
|
27
|
+
constructor(r) {
|
|
28
|
+
super(r), this.name = "GraffitiErrorNotFound", Object.setPrototypeOf(this, te.prototype);
|
|
33
29
|
}
|
|
34
30
|
}, ge = class re extends Error {
|
|
35
|
-
constructor(
|
|
36
|
-
super(
|
|
31
|
+
constructor(r) {
|
|
32
|
+
super(r), this.name = "GraffitiErrorInvalidSchema", Object.setPrototypeOf(this, re.prototype);
|
|
33
|
+
}
|
|
34
|
+
}, Pe = class ne extends Error {
|
|
35
|
+
constructor(r) {
|
|
36
|
+
super(r), this.name = "GraffitiErrorPatchTestFailed", Object.setPrototypeOf(this, ne.prototype);
|
|
37
|
+
}
|
|
38
|
+
}, xe = class ie extends Error {
|
|
39
|
+
constructor(r) {
|
|
40
|
+
super(r), this.name = "GraffitiErrorPatchError", Object.setPrototypeOf(this, ie.prototype);
|
|
37
41
|
}
|
|
38
42
|
};
|
|
39
|
-
class
|
|
40
|
-
constructor(
|
|
41
|
-
v(this, "poll", async (
|
|
43
|
+
class je {
|
|
44
|
+
constructor(r) {
|
|
45
|
+
v(this, "poll", async (r) => {
|
|
42
46
|
let e;
|
|
43
|
-
const
|
|
47
|
+
const n = this.getter;
|
|
44
48
|
try {
|
|
45
|
-
e = await
|
|
49
|
+
e = await n();
|
|
46
50
|
} catch {
|
|
47
|
-
this.getter ===
|
|
51
|
+
this.getter === n && r(null);
|
|
48
52
|
return;
|
|
49
53
|
}
|
|
50
|
-
this.getter ===
|
|
54
|
+
this.getter === n && r({ object: e });
|
|
51
55
|
});
|
|
52
|
-
this.getter =
|
|
56
|
+
this.getter = r;
|
|
53
57
|
}
|
|
54
58
|
clear() {
|
|
55
59
|
}
|
|
56
60
|
}
|
|
57
|
-
class
|
|
58
|
-
constructor(
|
|
61
|
+
class oe {
|
|
62
|
+
constructor(r) {
|
|
59
63
|
v(this, "iterator");
|
|
60
64
|
v(this, "continue");
|
|
61
|
-
v(this, "poll", async (
|
|
62
|
-
|
|
63
|
-
|
|
65
|
+
v(this, "poll", async (r) => {
|
|
66
|
+
if (!this.iterator)
|
|
67
|
+
if (this.continue)
|
|
68
|
+
try {
|
|
69
|
+
this.iterator = this.continue();
|
|
70
|
+
} catch (e) {
|
|
71
|
+
if (e instanceof be)
|
|
72
|
+
r("clear"), this.iterator = this.streamFactory();
|
|
73
|
+
else
|
|
74
|
+
throw e;
|
|
75
|
+
}
|
|
76
|
+
else
|
|
77
|
+
this.iterator = this.streamFactory();
|
|
78
|
+
for (; this.iterator; ) {
|
|
79
|
+
const e = this.iterator, n = await e.next();
|
|
64
80
|
if (e === this.iterator) {
|
|
65
|
-
if (
|
|
66
|
-
|
|
81
|
+
if (n.done) {
|
|
82
|
+
n.value && (this.iterator = void 0, this.continue = n.value.continue);
|
|
67
83
|
break;
|
|
68
84
|
}
|
|
69
|
-
if (
|
|
70
|
-
console.error(
|
|
85
|
+
if (n.value.error) {
|
|
86
|
+
console.error(n.value.error);
|
|
71
87
|
continue;
|
|
72
88
|
}
|
|
73
|
-
n
|
|
89
|
+
r(n.value);
|
|
74
90
|
}
|
|
75
91
|
}
|
|
76
92
|
});
|
|
77
|
-
this.streamFactory =
|
|
93
|
+
this.streamFactory = r;
|
|
78
94
|
}
|
|
79
95
|
clear() {
|
|
80
96
|
if (this.iterator) {
|
|
81
|
-
const
|
|
97
|
+
const r = this.iterator;
|
|
82
98
|
this.iterator.return({
|
|
83
|
-
continue: () =>
|
|
99
|
+
continue: () => r,
|
|
84
100
|
cursor: ""
|
|
85
101
|
});
|
|
86
102
|
}
|
|
87
103
|
this.iterator = void 0, this.continue = void 0;
|
|
88
104
|
}
|
|
89
105
|
}
|
|
90
|
-
function
|
|
91
|
-
return !
|
|
106
|
+
function se(t, r) {
|
|
107
|
+
return !r || t.object.lastModified > r.object.lastModified || t.object.lastModified === r.object.lastModified && !t.tombstone && !!r.tombstone;
|
|
92
108
|
}
|
|
93
|
-
class
|
|
109
|
+
class Oe {
|
|
94
110
|
constructor() {
|
|
95
|
-
v(this, "entry",
|
|
111
|
+
v(this, "entry", N());
|
|
96
112
|
}
|
|
97
113
|
get result() {
|
|
98
|
-
return
|
|
99
|
-
const
|
|
100
|
-
return
|
|
114
|
+
return ye(() => {
|
|
115
|
+
const r = this.entry.value;
|
|
116
|
+
return r && (r.tombstone ? null : r.object);
|
|
101
117
|
});
|
|
102
118
|
}
|
|
103
119
|
clear() {
|
|
104
120
|
this.entry.value = void 0;
|
|
105
121
|
}
|
|
106
|
-
onEntry(
|
|
107
|
-
(
|
|
122
|
+
onEntry(r) {
|
|
123
|
+
if (r === "clear") {
|
|
124
|
+
this.clear();
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
(!r || se(r, this.entry.value)) && (this.entry.value = r);
|
|
108
128
|
}
|
|
109
129
|
}
|
|
110
|
-
class
|
|
111
|
-
constructor(
|
|
112
|
-
v(this, "results",
|
|
130
|
+
class ae {
|
|
131
|
+
constructor(r) {
|
|
132
|
+
v(this, "results", N([]));
|
|
113
133
|
v(this, "resultsRaw", /* @__PURE__ */ new Map());
|
|
114
134
|
v(this, "batchFlattenTimer");
|
|
115
|
-
this.graffiti =
|
|
135
|
+
this.graffiti = r;
|
|
116
136
|
}
|
|
117
137
|
clear() {
|
|
118
138
|
this.resultsRaw.clear(), this.results.value = [], clearTimeout(this.batchFlattenTimer), this.batchFlattenTimer = void 0;
|
|
119
139
|
}
|
|
120
140
|
flattenResults() {
|
|
121
|
-
this.results.value = Array.from(this.resultsRaw.values()).reduce((
|
|
141
|
+
this.results.value = Array.from(this.resultsRaw.values()).reduce((r, e) => (e.tombstone || r.push(e.object), r), []);
|
|
122
142
|
}
|
|
123
|
-
onEntry(
|
|
124
|
-
if (!
|
|
125
|
-
|
|
126
|
-
|
|
143
|
+
onEntry(r) {
|
|
144
|
+
if (!r) return;
|
|
145
|
+
if (r === "clear") {
|
|
146
|
+
this.clear();
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
const e = this.resultsRaw.get(r.object.url);
|
|
150
|
+
se(r, e) && (this.resultsRaw.set(r.object.url, r), this.batchFlattenTimer || (this.batchFlattenTimer = setTimeout(() => {
|
|
127
151
|
this.flattenResults(), this.batchFlattenTimer = void 0;
|
|
128
152
|
}, 0)));
|
|
129
153
|
}
|
|
130
154
|
}
|
|
131
|
-
function J(t,
|
|
155
|
+
function J(t, r, e, n) {
|
|
132
156
|
let o;
|
|
133
157
|
async function i() {
|
|
134
158
|
o = e();
|
|
135
|
-
for await (const
|
|
136
|
-
if (
|
|
137
|
-
console.error(
|
|
159
|
+
for await (const u of o) {
|
|
160
|
+
if (u.error) {
|
|
161
|
+
console.error(u.error);
|
|
138
162
|
continue;
|
|
139
163
|
}
|
|
140
|
-
t.onEntry(
|
|
164
|
+
t.onEntry(u);
|
|
141
165
|
}
|
|
142
166
|
}
|
|
143
|
-
const
|
|
144
|
-
return
|
|
145
|
-
|
|
146
|
-
async (
|
|
147
|
-
if (JSON.stringify(
|
|
148
|
-
o == null || o.return(null), t.clear(),
|
|
167
|
+
const a = () => r.poll(t.onEntry.bind(t)), l = N(!1);
|
|
168
|
+
return ve(
|
|
169
|
+
n,
|
|
170
|
+
async (u, s) => {
|
|
171
|
+
if (JSON.stringify(u) !== JSON.stringify(s)) {
|
|
172
|
+
o == null || o.return(null), t.clear(), r.clear(), i(), l.value = !0;
|
|
149
173
|
try {
|
|
150
|
-
await
|
|
174
|
+
await a();
|
|
151
175
|
} finally {
|
|
152
176
|
l.value = !1;
|
|
153
177
|
}
|
|
@@ -156,23 +180,23 @@ function J(t, n, e, r) {
|
|
|
156
180
|
{
|
|
157
181
|
immediate: !0
|
|
158
182
|
}
|
|
159
|
-
),
|
|
183
|
+
), me(() => o == null ? void 0 : o.return(null)), { poll: a, isPolling: l };
|
|
160
184
|
}
|
|
161
|
-
function ue(t,
|
|
185
|
+
function ue(t, r) {
|
|
162
186
|
return () => {
|
|
163
|
-
const e = j(
|
|
187
|
+
const e = j(r);
|
|
164
188
|
return e === void 0 ? t == null ? void 0 : t.value : e;
|
|
165
189
|
};
|
|
166
190
|
}
|
|
167
|
-
function
|
|
168
|
-
return t.map((
|
|
191
|
+
function S(t) {
|
|
192
|
+
return t.map((r) => r());
|
|
169
193
|
}
|
|
170
|
-
function
|
|
171
|
-
const
|
|
194
|
+
function Ee(t, r, e) {
|
|
195
|
+
const n = M(), o = ee(), i = () => j(t), a = () => j(r), l = ue(o, e), u = [i, a, l], s = () => n.synchronizeDiscover(...S(u)), f = () => n.discover(...S(u)), p = new ae(n), c = new oe(f), { poll: d, isPolling: h } = J(
|
|
172
196
|
p,
|
|
173
197
|
c,
|
|
174
198
|
s,
|
|
175
|
-
|
|
199
|
+
u
|
|
176
200
|
);
|
|
177
201
|
return {
|
|
178
202
|
/**
|
|
@@ -192,16 +216,16 @@ function je(t, n, e) {
|
|
|
192
216
|
isPolling: h
|
|
193
217
|
};
|
|
194
218
|
}
|
|
195
|
-
function
|
|
196
|
-
const
|
|
219
|
+
function Se(t, r, e) {
|
|
220
|
+
const n = M(), o = ee(), i = () => j(t), a = () => j(r), l = ue(o, e), u = [
|
|
197
221
|
i,
|
|
198
|
-
|
|
222
|
+
a,
|
|
199
223
|
l
|
|
200
|
-
], s = () =>
|
|
224
|
+
], s = () => n.synchronizeGet(...S(u)), f = new Oe(), p = () => n.get(...S(u)), c = new je(p), { poll: d, isPolling: h } = J(
|
|
201
225
|
f,
|
|
202
226
|
c,
|
|
203
227
|
s,
|
|
204
|
-
|
|
228
|
+
u
|
|
205
229
|
);
|
|
206
230
|
return {
|
|
207
231
|
/**
|
|
@@ -222,11 +246,11 @@ function Oe(t, n, e) {
|
|
|
222
246
|
isPolling: h
|
|
223
247
|
};
|
|
224
248
|
}
|
|
225
|
-
function
|
|
226
|
-
const e =
|
|
249
|
+
function Ge(t, r) {
|
|
250
|
+
const e = M(), i = [() => j(t), () => j(r)], a = () => e.synchronizeRecoverOrphans(...S(i)), l = new ae(e), u = () => e.recoverOrphans(...S(i)), s = new oe(u), { poll: f, isPolling: p } = J(
|
|
227
251
|
l,
|
|
228
252
|
s,
|
|
229
|
-
|
|
253
|
+
a,
|
|
230
254
|
i
|
|
231
255
|
);
|
|
232
256
|
return {
|
|
@@ -247,7 +271,7 @@ function Se(t, n) {
|
|
|
247
271
|
isPolling: p
|
|
248
272
|
};
|
|
249
273
|
}
|
|
250
|
-
const
|
|
274
|
+
const ce = /* @__PURE__ */ L({
|
|
251
275
|
__name: "Discover",
|
|
252
276
|
props: {
|
|
253
277
|
channels: {},
|
|
@@ -255,18 +279,18 @@ const ae = /* @__PURE__ */ L({
|
|
|
255
279
|
session: {}
|
|
256
280
|
},
|
|
257
281
|
setup(t) {
|
|
258
|
-
const
|
|
259
|
-
g(
|
|
260
|
-
g(
|
|
261
|
-
g(
|
|
282
|
+
const r = t, { results: e, poll: n, isPolling: o } = Ee(
|
|
283
|
+
g(r, "channels"),
|
|
284
|
+
g(r, "schema"),
|
|
285
|
+
g(r, "session")
|
|
262
286
|
);
|
|
263
|
-
return (i,
|
|
287
|
+
return (i, a) => W(i.$slots, "default", {
|
|
264
288
|
results: b(e),
|
|
265
|
-
poll: b(
|
|
289
|
+
poll: b(n),
|
|
266
290
|
isPolling: b(o)
|
|
267
291
|
});
|
|
268
292
|
}
|
|
269
|
-
}),
|
|
293
|
+
}), le = /* @__PURE__ */ L({
|
|
270
294
|
__name: "Get",
|
|
271
295
|
props: {
|
|
272
296
|
url: {},
|
|
@@ -274,31 +298,31 @@ const ae = /* @__PURE__ */ L({
|
|
|
274
298
|
session: {}
|
|
275
299
|
},
|
|
276
300
|
setup(t) {
|
|
277
|
-
const
|
|
278
|
-
g(
|
|
279
|
-
g(
|
|
280
|
-
g(
|
|
301
|
+
const r = t, { result: e, poll: n, isPolling: o } = Se(
|
|
302
|
+
g(r, "url"),
|
|
303
|
+
g(r, "schema"),
|
|
304
|
+
g(r, "session")
|
|
281
305
|
);
|
|
282
|
-
return (i,
|
|
306
|
+
return (i, a) => W(i.$slots, "default", {
|
|
283
307
|
result: b(e),
|
|
284
|
-
poll: b(
|
|
308
|
+
poll: b(n),
|
|
285
309
|
isPolling: b(o)
|
|
286
310
|
});
|
|
287
311
|
}
|
|
288
|
-
}),
|
|
312
|
+
}), fe = /* @__PURE__ */ L({
|
|
289
313
|
__name: "RecoverOrphans",
|
|
290
314
|
props: {
|
|
291
315
|
schema: {},
|
|
292
316
|
session: {}
|
|
293
317
|
},
|
|
294
318
|
setup(t) {
|
|
295
|
-
const
|
|
296
|
-
g(
|
|
297
|
-
g(
|
|
319
|
+
const r = t, { results: e, poll: n, isPolling: o } = Ge(
|
|
320
|
+
g(r, "schema"),
|
|
321
|
+
g(r, "session")
|
|
298
322
|
);
|
|
299
|
-
return (i,
|
|
323
|
+
return (i, a) => W(i.$slots, "default", {
|
|
300
324
|
results: b(e),
|
|
301
|
-
poll: b(
|
|
325
|
+
poll: b(n),
|
|
302
326
|
isPolling: b(o)
|
|
303
327
|
});
|
|
304
328
|
}
|
|
@@ -317,64 +341,64 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
317
341
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
318
342
|
PERFORMANCE OF THIS SOFTWARE.
|
|
319
343
|
***************************************************************************** */
|
|
320
|
-
var C = function(t,
|
|
321
|
-
return C = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e,
|
|
322
|
-
e.__proto__ =
|
|
323
|
-
} || function(e,
|
|
324
|
-
for (var o in
|
|
325
|
-
}, C(t,
|
|
344
|
+
var C = function(t, r) {
|
|
345
|
+
return C = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, n) {
|
|
346
|
+
e.__proto__ = n;
|
|
347
|
+
} || function(e, n) {
|
|
348
|
+
for (var o in n) n.hasOwnProperty(o) && (e[o] = n[o]);
|
|
349
|
+
}, C(t, r);
|
|
326
350
|
};
|
|
327
|
-
function
|
|
328
|
-
C(t,
|
|
351
|
+
function _e(t, r) {
|
|
352
|
+
C(t, r);
|
|
329
353
|
function e() {
|
|
330
354
|
this.constructor = t;
|
|
331
355
|
}
|
|
332
|
-
t.prototype =
|
|
356
|
+
t.prototype = r === null ? Object.create(r) : (e.prototype = r.prototype, new e());
|
|
333
357
|
}
|
|
334
|
-
function G(t,
|
|
358
|
+
function G(t, r, e, n) {
|
|
335
359
|
function o(i) {
|
|
336
|
-
return i instanceof e ? i : new e(function(
|
|
337
|
-
|
|
360
|
+
return i instanceof e ? i : new e(function(a) {
|
|
361
|
+
a(i);
|
|
338
362
|
});
|
|
339
363
|
}
|
|
340
|
-
return new (e || (e = Promise))(function(i,
|
|
364
|
+
return new (e || (e = Promise))(function(i, a) {
|
|
341
365
|
function l(f) {
|
|
342
366
|
try {
|
|
343
|
-
s(
|
|
367
|
+
s(n.next(f));
|
|
344
368
|
} catch (p) {
|
|
345
|
-
|
|
369
|
+
a(p);
|
|
346
370
|
}
|
|
347
371
|
}
|
|
348
|
-
function
|
|
372
|
+
function u(f) {
|
|
349
373
|
try {
|
|
350
|
-
s(
|
|
374
|
+
s(n.throw(f));
|
|
351
375
|
} catch (p) {
|
|
352
|
-
|
|
376
|
+
a(p);
|
|
353
377
|
}
|
|
354
378
|
}
|
|
355
379
|
function s(f) {
|
|
356
|
-
f.done ? i(f.value) : o(f.value).then(l,
|
|
380
|
+
f.done ? i(f.value) : o(f.value).then(l, u);
|
|
357
381
|
}
|
|
358
|
-
s((
|
|
382
|
+
s((n = n.apply(t, [])).next());
|
|
359
383
|
});
|
|
360
384
|
}
|
|
361
|
-
function P(t,
|
|
385
|
+
function P(t, r) {
|
|
362
386
|
var e = { label: 0, sent: function() {
|
|
363
387
|
if (i[0] & 1) throw i[1];
|
|
364
388
|
return i[1];
|
|
365
|
-
}, trys: [], ops: [] },
|
|
366
|
-
return
|
|
389
|
+
}, trys: [], ops: [] }, n, o, i, a;
|
|
390
|
+
return a = { next: l(0), throw: l(1), return: l(2) }, typeof Symbol == "function" && (a[Symbol.iterator] = function() {
|
|
367
391
|
return this;
|
|
368
|
-
}),
|
|
392
|
+
}), a;
|
|
369
393
|
function l(s) {
|
|
370
394
|
return function(f) {
|
|
371
|
-
return
|
|
395
|
+
return u([s, f]);
|
|
372
396
|
};
|
|
373
397
|
}
|
|
374
|
-
function
|
|
375
|
-
if (
|
|
398
|
+
function u(s) {
|
|
399
|
+
if (n) throw new TypeError("Generator is already executing.");
|
|
376
400
|
for (; e; ) try {
|
|
377
|
-
if (
|
|
401
|
+
if (n = 1, o && (i = s[0] & 2 ? o.return : s[0] ? o.throw || ((i = o.return) && i.call(o), 0) : o.next) && !(i = i.call(o, s[1])).done) return i;
|
|
378
402
|
switch (o = 0, i && (s = [s[0] & 2, i.value]), s[0]) {
|
|
379
403
|
case 0:
|
|
380
404
|
case 1:
|
|
@@ -408,37 +432,37 @@ function P(t, n) {
|
|
|
408
432
|
i[2] && e.ops.pop(), e.trys.pop();
|
|
409
433
|
continue;
|
|
410
434
|
}
|
|
411
|
-
s =
|
|
435
|
+
s = r.call(t, e);
|
|
412
436
|
} catch (f) {
|
|
413
437
|
s = [6, f], o = 0;
|
|
414
438
|
} finally {
|
|
415
|
-
|
|
439
|
+
n = i = 0;
|
|
416
440
|
}
|
|
417
441
|
if (s[0] & 5) throw s[1];
|
|
418
442
|
return { value: s[0] ? s[1] : void 0, done: !0 };
|
|
419
443
|
}
|
|
420
444
|
}
|
|
421
445
|
function _(t) {
|
|
422
|
-
var
|
|
446
|
+
var r = typeof Symbol == "function" && Symbol.iterator, e = r && t[r], n = 0;
|
|
423
447
|
if (e) return e.call(t);
|
|
424
448
|
if (t && typeof t.length == "number") return {
|
|
425
449
|
next: function() {
|
|
426
|
-
return t &&
|
|
450
|
+
return t && n >= t.length && (t = void 0), { value: t && t[n++], done: !t };
|
|
427
451
|
}
|
|
428
452
|
};
|
|
429
|
-
throw new TypeError(
|
|
453
|
+
throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
430
454
|
}
|
|
431
455
|
function z(t) {
|
|
432
456
|
return this instanceof z ? (this.v = t, this) : new z(t);
|
|
433
457
|
}
|
|
434
|
-
function
|
|
458
|
+
function Re(t, r, e) {
|
|
435
459
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
436
|
-
var
|
|
437
|
-
return o = {},
|
|
460
|
+
var n = e.apply(t, r || []), o, i = [];
|
|
461
|
+
return o = {}, a("next"), a("throw"), a("return"), o[Symbol.asyncIterator] = function() {
|
|
438
462
|
return this;
|
|
439
463
|
}, o;
|
|
440
|
-
function
|
|
441
|
-
|
|
464
|
+
function a(c) {
|
|
465
|
+
n[c] && (o[c] = function(d) {
|
|
442
466
|
return new Promise(function(h, y) {
|
|
443
467
|
i.push([c, d, h, y]) > 1 || l(c, d);
|
|
444
468
|
});
|
|
@@ -446,12 +470,12 @@ function Ge(t, n, e) {
|
|
|
446
470
|
}
|
|
447
471
|
function l(c, d) {
|
|
448
472
|
try {
|
|
449
|
-
|
|
473
|
+
u(n[c](d));
|
|
450
474
|
} catch (h) {
|
|
451
475
|
p(i[0][3], h);
|
|
452
476
|
}
|
|
453
477
|
}
|
|
454
|
-
function
|
|
478
|
+
function u(c) {
|
|
455
479
|
c.value instanceof z ? Promise.resolve(c.value.v).then(s, f) : p(i[0][2], c);
|
|
456
480
|
}
|
|
457
481
|
function s(c) {
|
|
@@ -464,25 +488,25 @@ function Ge(t, n, e) {
|
|
|
464
488
|
c(d), i.shift(), i.length && l(i[0][0], i[0][1]);
|
|
465
489
|
}
|
|
466
490
|
}
|
|
467
|
-
var
|
|
491
|
+
var he = (
|
|
468
492
|
/** @class */
|
|
469
493
|
function(t) {
|
|
470
|
-
|
|
471
|
-
function
|
|
472
|
-
var
|
|
473
|
-
return Object.defineProperty(
|
|
494
|
+
_e(r, t);
|
|
495
|
+
function r(e) {
|
|
496
|
+
var n = t.call(this, e) || this;
|
|
497
|
+
return Object.defineProperty(n, "name", {
|
|
474
498
|
value: "RepeaterOverflowError",
|
|
475
499
|
enumerable: !1
|
|
476
|
-
}), typeof Object.setPrototypeOf == "function" ? Object.setPrototypeOf(
|
|
500
|
+
}), typeof Object.setPrototypeOf == "function" ? Object.setPrototypeOf(n, n.constructor.prototype) : n.__proto__ = n.constructor.prototype, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(n, n.constructor), n;
|
|
477
501
|
}
|
|
478
|
-
return
|
|
502
|
+
return r;
|
|
479
503
|
}(Error)
|
|
480
504
|
);
|
|
481
505
|
(function() {
|
|
482
|
-
function t(
|
|
483
|
-
if (
|
|
506
|
+
function t(r) {
|
|
507
|
+
if (r < 0)
|
|
484
508
|
throw new RangeError("Capacity may not be less than 0");
|
|
485
|
-
this._c =
|
|
509
|
+
this._c = r, this._q = [];
|
|
486
510
|
}
|
|
487
511
|
return Object.defineProperty(t.prototype, "empty", {
|
|
488
512
|
get: function() {
|
|
@@ -496,10 +520,10 @@ var fe = (
|
|
|
496
520
|
},
|
|
497
521
|
enumerable: !1,
|
|
498
522
|
configurable: !0
|
|
499
|
-
}), t.prototype.add = function(
|
|
523
|
+
}), t.prototype.add = function(r) {
|
|
500
524
|
if (this.full)
|
|
501
525
|
throw new Error("Buffer full");
|
|
502
|
-
this._q.push(
|
|
526
|
+
this._q.push(r);
|
|
503
527
|
}, t.prototype.remove = function() {
|
|
504
528
|
if (this.empty)
|
|
505
529
|
throw new Error("Buffer empty");
|
|
@@ -507,10 +531,10 @@ var fe = (
|
|
|
507
531
|
}, t;
|
|
508
532
|
})();
|
|
509
533
|
(function() {
|
|
510
|
-
function t(
|
|
511
|
-
if (
|
|
534
|
+
function t(r) {
|
|
535
|
+
if (r < 1)
|
|
512
536
|
throw new RangeError("Capacity may not be less than 1");
|
|
513
|
-
this._c =
|
|
537
|
+
this._c = r, this._q = [];
|
|
514
538
|
}
|
|
515
539
|
return Object.defineProperty(t.prototype, "empty", {
|
|
516
540
|
get: function() {
|
|
@@ -524,10 +548,10 @@ var fe = (
|
|
|
524
548
|
},
|
|
525
549
|
enumerable: !1,
|
|
526
550
|
configurable: !0
|
|
527
|
-
}), t.prototype.add = function(
|
|
551
|
+
}), t.prototype.add = function(r) {
|
|
528
552
|
for (; this._q.length >= this._c; )
|
|
529
553
|
this._q.shift();
|
|
530
|
-
this._q.push(
|
|
554
|
+
this._q.push(r);
|
|
531
555
|
}, t.prototype.remove = function() {
|
|
532
556
|
if (this.empty)
|
|
533
557
|
throw new Error("Buffer empty");
|
|
@@ -535,10 +559,10 @@ var fe = (
|
|
|
535
559
|
}, t;
|
|
536
560
|
})();
|
|
537
561
|
(function() {
|
|
538
|
-
function t(
|
|
539
|
-
if (
|
|
562
|
+
function t(r) {
|
|
563
|
+
if (r < 1)
|
|
540
564
|
throw new RangeError("Capacity may not be less than 1");
|
|
541
|
-
this._c =
|
|
565
|
+
this._c = r, this._q = [];
|
|
542
566
|
}
|
|
543
567
|
return Object.defineProperty(t.prototype, "empty", {
|
|
544
568
|
get: function() {
|
|
@@ -552,8 +576,8 @@ var fe = (
|
|
|
552
576
|
},
|
|
553
577
|
enumerable: !1,
|
|
554
578
|
configurable: !0
|
|
555
|
-
}), t.prototype.add = function(
|
|
556
|
-
this._q.length < this._c && this._q.push(
|
|
579
|
+
}), t.prototype.add = function(r) {
|
|
580
|
+
this._q.length < this._c && this._q.push(r);
|
|
557
581
|
}, t.prototype.remove = function() {
|
|
558
582
|
if (this.empty)
|
|
559
583
|
throw new Error("Buffer empty");
|
|
@@ -563,13 +587,13 @@ var fe = (
|
|
|
563
587
|
function $(t) {
|
|
564
588
|
t != null && typeof t.then == "function" && t.then(A, A);
|
|
565
589
|
}
|
|
566
|
-
var B = 0, H = 1, O = 2,
|
|
590
|
+
var B = 0, H = 1, O = 2, D = 3, U = 4, I = 1024, A = function() {
|
|
567
591
|
};
|
|
568
|
-
function
|
|
569
|
-
var
|
|
570
|
-
if (
|
|
571
|
-
throw
|
|
572
|
-
return
|
|
592
|
+
function E(t) {
|
|
593
|
+
var r = t.err, e = Promise.resolve(t.execution).then(function(n) {
|
|
594
|
+
if (r != null)
|
|
595
|
+
throw r;
|
|
596
|
+
return n;
|
|
573
597
|
});
|
|
574
598
|
return t.err = void 0, t.execution = e.then(function() {
|
|
575
599
|
}, function() {
|
|
@@ -577,121 +601,121 @@ function S(t) {
|
|
|
577
601
|
return e;
|
|
578
602
|
});
|
|
579
603
|
}
|
|
580
|
-
function x(t,
|
|
581
|
-
var e = t.state >=
|
|
582
|
-
return Promise.resolve(
|
|
583
|
-
return !e && t.state >= U ?
|
|
604
|
+
function x(t, r) {
|
|
605
|
+
var e = t.state >= D;
|
|
606
|
+
return Promise.resolve(r).then(function(n) {
|
|
607
|
+
return !e && t.state >= U ? E(t).then(function(o) {
|
|
584
608
|
return {
|
|
585
609
|
value: o,
|
|
586
610
|
done: !0
|
|
587
611
|
};
|
|
588
|
-
}) : { value:
|
|
612
|
+
}) : { value: n, done: e };
|
|
589
613
|
});
|
|
590
614
|
}
|
|
591
|
-
function K(t,
|
|
592
|
-
var e,
|
|
615
|
+
function K(t, r) {
|
|
616
|
+
var e, n;
|
|
593
617
|
if (!(t.state >= O))
|
|
594
|
-
if (t.state = O, t.onnext(), t.onstop(), t.err == null && (t.err =
|
|
618
|
+
if (t.state = O, t.onnext(), t.onstop(), t.err == null && (t.err = r), t.pushes.length === 0 && (typeof t.buffer > "u" || t.buffer.empty))
|
|
595
619
|
R(t);
|
|
596
620
|
else
|
|
597
621
|
try {
|
|
598
622
|
for (var o = _(t.pushes), i = o.next(); !i.done; i = o.next()) {
|
|
599
|
-
var
|
|
600
|
-
|
|
623
|
+
var a = i.value;
|
|
624
|
+
a.resolve();
|
|
601
625
|
}
|
|
602
626
|
} catch (l) {
|
|
603
627
|
e = { error: l };
|
|
604
628
|
} finally {
|
|
605
629
|
try {
|
|
606
|
-
i && !i.done && (
|
|
630
|
+
i && !i.done && (n = o.return) && n.call(o);
|
|
607
631
|
} finally {
|
|
608
632
|
if (e) throw e.error;
|
|
609
633
|
}
|
|
610
634
|
}
|
|
611
635
|
}
|
|
612
636
|
function R(t) {
|
|
613
|
-
var
|
|
614
|
-
if (!(t.state >=
|
|
615
|
-
t.state < O && K(t), t.state =
|
|
637
|
+
var r, e;
|
|
638
|
+
if (!(t.state >= D)) {
|
|
639
|
+
t.state < O && K(t), t.state = D, t.buffer = void 0;
|
|
616
640
|
try {
|
|
617
|
-
for (var
|
|
618
|
-
var i = o.value,
|
|
619
|
-
return
|
|
641
|
+
for (var n = _(t.nexts), o = n.next(); !o.done; o = n.next()) {
|
|
642
|
+
var i = o.value, a = t.pending === void 0 ? E(t) : t.pending.then(function() {
|
|
643
|
+
return E(t);
|
|
620
644
|
});
|
|
621
|
-
i.resolve(x(t,
|
|
645
|
+
i.resolve(x(t, a));
|
|
622
646
|
}
|
|
623
647
|
} catch (l) {
|
|
624
|
-
|
|
648
|
+
r = { error: l };
|
|
625
649
|
} finally {
|
|
626
650
|
try {
|
|
627
|
-
o && !o.done && (e =
|
|
651
|
+
o && !o.done && (e = n.return) && e.call(n);
|
|
628
652
|
} finally {
|
|
629
|
-
if (
|
|
653
|
+
if (r) throw r.error;
|
|
630
654
|
}
|
|
631
655
|
}
|
|
632
656
|
t.pushes = [], t.nexts = [];
|
|
633
657
|
}
|
|
634
658
|
}
|
|
635
659
|
function Q(t) {
|
|
636
|
-
t.state >= U || (t.state <
|
|
660
|
+
t.state >= U || (t.state < D && R(t), t.state = U);
|
|
637
661
|
}
|
|
638
|
-
function
|
|
639
|
-
if ($(
|
|
640
|
-
throw new
|
|
662
|
+
function ze(t, r) {
|
|
663
|
+
if ($(r), t.pushes.length >= I)
|
|
664
|
+
throw new he("No more than " + I + " pending calls to push are allowed on a single repeater.");
|
|
641
665
|
if (t.state >= O)
|
|
642
666
|
return Promise.resolve(void 0);
|
|
643
|
-
var e = t.pending === void 0 ? Promise.resolve(
|
|
644
|
-
return
|
|
667
|
+
var e = t.pending === void 0 ? Promise.resolve(r) : t.pending.then(function() {
|
|
668
|
+
return r;
|
|
645
669
|
});
|
|
646
|
-
e = e.catch(function(
|
|
647
|
-
t.state < O && (t.err =
|
|
670
|
+
e = e.catch(function(u) {
|
|
671
|
+
t.state < O && (t.err = u), Q(t);
|
|
648
672
|
});
|
|
649
|
-
var
|
|
673
|
+
var n;
|
|
650
674
|
if (t.nexts.length) {
|
|
651
675
|
var o = t.nexts.shift();
|
|
652
|
-
o.resolve(x(t, e)), t.nexts.length ?
|
|
653
|
-
return t.onnext =
|
|
676
|
+
o.resolve(x(t, e)), t.nexts.length ? n = Promise.resolve(t.nexts[0].value) : typeof t.buffer < "u" && !t.buffer.full ? n = Promise.resolve(void 0) : n = new Promise(function(u) {
|
|
677
|
+
return t.onnext = u;
|
|
654
678
|
});
|
|
655
|
-
} else typeof t.buffer < "u" && !t.buffer.full ? (t.buffer.add(e),
|
|
656
|
-
return t.pushes.push({ resolve:
|
|
679
|
+
} else typeof t.buffer < "u" && !t.buffer.full ? (t.buffer.add(e), n = Promise.resolve(void 0)) : n = new Promise(function(u) {
|
|
680
|
+
return t.pushes.push({ resolve: u, value: e });
|
|
657
681
|
});
|
|
658
|
-
var i = !0,
|
|
682
|
+
var i = !0, a = {}, l = n.catch(function(u) {
|
|
659
683
|
if (i)
|
|
660
|
-
throw
|
|
684
|
+
throw u;
|
|
661
685
|
});
|
|
662
|
-
return
|
|
663
|
-
return i = !1, Promise.prototype.then.call(
|
|
664
|
-
},
|
|
665
|
-
return i = !1, Promise.prototype.catch.call(
|
|
666
|
-
},
|
|
686
|
+
return a.then = function(u, s) {
|
|
687
|
+
return i = !1, Promise.prototype.then.call(n, u, s);
|
|
688
|
+
}, a.catch = function(u) {
|
|
689
|
+
return i = !1, Promise.prototype.catch.call(n, u);
|
|
690
|
+
}, a.finally = n.finally.bind(n), t.pending = e.then(function() {
|
|
667
691
|
return l;
|
|
668
|
-
}).catch(function(
|
|
669
|
-
t.err =
|
|
670
|
-
}),
|
|
692
|
+
}).catch(function(u) {
|
|
693
|
+
t.err = u, Q(t);
|
|
694
|
+
}), a;
|
|
671
695
|
}
|
|
672
|
-
function
|
|
673
|
-
var
|
|
674
|
-
return t.onstop =
|
|
696
|
+
function ke(t) {
|
|
697
|
+
var r = K.bind(null, t), e = new Promise(function(n) {
|
|
698
|
+
return t.onstop = n;
|
|
675
699
|
});
|
|
676
|
-
return
|
|
700
|
+
return r.then = e.then.bind(e), r.catch = e.catch.bind(e), r.finally = e.finally.bind(e), r;
|
|
677
701
|
}
|
|
678
|
-
function
|
|
702
|
+
function Te(t) {
|
|
679
703
|
if (!(t.state >= H)) {
|
|
680
704
|
t.state = H;
|
|
681
|
-
var
|
|
682
|
-
t.execution = new Promise(function(
|
|
683
|
-
return
|
|
705
|
+
var r = ze.bind(null, t), e = ke(t);
|
|
706
|
+
t.execution = new Promise(function(n) {
|
|
707
|
+
return n(t.executor(r, e));
|
|
684
708
|
}), t.execution.catch(function() {
|
|
685
709
|
return K(t);
|
|
686
710
|
});
|
|
687
711
|
}
|
|
688
712
|
}
|
|
689
|
-
var
|
|
713
|
+
var q = /* @__PURE__ */ new WeakMap(), k = (
|
|
690
714
|
/** @class */
|
|
691
715
|
function() {
|
|
692
|
-
function t(
|
|
693
|
-
|
|
694
|
-
executor:
|
|
716
|
+
function t(r, e) {
|
|
717
|
+
q.set(this, {
|
|
718
|
+
executor: r,
|
|
695
719
|
buffer: e,
|
|
696
720
|
err: void 0,
|
|
697
721
|
state: B,
|
|
@@ -703,60 +727,60 @@ var D = /* @__PURE__ */ new WeakMap(), k = (
|
|
|
703
727
|
onstop: A
|
|
704
728
|
});
|
|
705
729
|
}
|
|
706
|
-
return t.prototype.next = function(
|
|
707
|
-
$(
|
|
708
|
-
var e =
|
|
730
|
+
return t.prototype.next = function(r) {
|
|
731
|
+
$(r);
|
|
732
|
+
var e = q.get(this);
|
|
709
733
|
if (e === void 0)
|
|
710
734
|
throw new Error("WeakMap error");
|
|
711
735
|
if (e.nexts.length >= I)
|
|
712
|
-
throw new
|
|
713
|
-
if (e.state <= B &&
|
|
714
|
-
var
|
|
736
|
+
throw new he("No more than " + I + " pending calls to next are allowed on a single repeater.");
|
|
737
|
+
if (e.state <= B && Te(e), e.onnext(r), typeof e.buffer < "u" && !e.buffer.empty) {
|
|
738
|
+
var n = x(e, e.buffer.remove());
|
|
715
739
|
if (e.pushes.length) {
|
|
716
740
|
var o = e.pushes.shift();
|
|
717
741
|
e.buffer.add(o.value), e.onnext = o.resolve;
|
|
718
742
|
}
|
|
719
|
-
return
|
|
743
|
+
return n;
|
|
720
744
|
} else if (e.pushes.length) {
|
|
721
745
|
var i = e.pushes.shift();
|
|
722
746
|
return e.onnext = i.resolve, x(e, i.value);
|
|
723
747
|
} else if (e.state >= O)
|
|
724
|
-
return R(e), x(e,
|
|
725
|
-
return new Promise(function(
|
|
726
|
-
return e.nexts.push({ resolve:
|
|
748
|
+
return R(e), x(e, E(e));
|
|
749
|
+
return new Promise(function(a) {
|
|
750
|
+
return e.nexts.push({ resolve: a, value: r });
|
|
727
751
|
});
|
|
728
|
-
}, t.prototype.return = function(
|
|
729
|
-
$(
|
|
730
|
-
var e =
|
|
752
|
+
}, t.prototype.return = function(r) {
|
|
753
|
+
$(r);
|
|
754
|
+
var e = q.get(this);
|
|
731
755
|
if (e === void 0)
|
|
732
756
|
throw new Error("WeakMap error");
|
|
733
757
|
return R(e), e.execution = Promise.resolve(e.execution).then(function() {
|
|
734
|
-
return
|
|
735
|
-
}), x(e,
|
|
736
|
-
}, t.prototype.throw = function(
|
|
737
|
-
var e =
|
|
758
|
+
return r;
|
|
759
|
+
}), x(e, E(e));
|
|
760
|
+
}, t.prototype.throw = function(r) {
|
|
761
|
+
var e = q.get(this);
|
|
738
762
|
if (e === void 0)
|
|
739
763
|
throw new Error("WeakMap error");
|
|
740
|
-
return e.state <= B || e.state >= O || typeof e.buffer < "u" && !e.buffer.empty ? (R(e), e.err == null && (e.err =
|
|
764
|
+
return e.state <= B || e.state >= O || typeof e.buffer < "u" && !e.buffer.empty ? (R(e), e.err == null && (e.err = r), x(e, E(e))) : this.next(Promise.reject(r));
|
|
741
765
|
}, t.prototype[Symbol.asyncIterator] = function() {
|
|
742
766
|
return this;
|
|
743
|
-
}, t.race =
|
|
767
|
+
}, t.race = Fe, t.merge = qe, t.zip = De, t.latest = Ie, t;
|
|
744
768
|
}()
|
|
745
769
|
);
|
|
746
|
-
function V(t,
|
|
747
|
-
var e,
|
|
770
|
+
function V(t, r) {
|
|
771
|
+
var e, n, o = [], i = function(s) {
|
|
748
772
|
s != null && typeof s[Symbol.asyncIterator] == "function" ? o.push(s[Symbol.asyncIterator]()) : s != null && typeof s[Symbol.iterator] == "function" ? o.push(s[Symbol.iterator]()) : o.push(function() {
|
|
749
|
-
return
|
|
773
|
+
return Re(this, arguments, function() {
|
|
750
774
|
return P(this, function(c) {
|
|
751
775
|
switch (c.label) {
|
|
752
776
|
case 0:
|
|
753
|
-
return
|
|
777
|
+
return r.yieldValues ? [4, z(s)] : [3, 3];
|
|
754
778
|
case 1:
|
|
755
779
|
return [4, c.sent()];
|
|
756
780
|
case 2:
|
|
757
781
|
c.sent(), c.label = 3;
|
|
758
782
|
case 3:
|
|
759
|
-
return
|
|
783
|
+
return r.returnValues ? [4, z(s)] : [3, 5];
|
|
760
784
|
case 4:
|
|
761
785
|
return [2, c.sent()];
|
|
762
786
|
case 5:
|
|
@@ -770,26 +794,26 @@ function V(t, n) {
|
|
|
770
794
|
}());
|
|
771
795
|
};
|
|
772
796
|
try {
|
|
773
|
-
for (var
|
|
774
|
-
var
|
|
775
|
-
i(
|
|
797
|
+
for (var a = _(t), l = a.next(); !l.done; l = a.next()) {
|
|
798
|
+
var u = l.value;
|
|
799
|
+
i(u);
|
|
776
800
|
}
|
|
777
801
|
} catch (s) {
|
|
778
802
|
e = { error: s };
|
|
779
803
|
} finally {
|
|
780
804
|
try {
|
|
781
|
-
l && !l.done && (
|
|
805
|
+
l && !l.done && (n = a.return) && n.call(a);
|
|
782
806
|
} finally {
|
|
783
807
|
if (e) throw e.error;
|
|
784
808
|
}
|
|
785
809
|
}
|
|
786
810
|
return o;
|
|
787
811
|
}
|
|
788
|
-
function
|
|
789
|
-
var
|
|
790
|
-
return new k(function(
|
|
791
|
-
return G(
|
|
792
|
-
var i,
|
|
812
|
+
function Fe(t) {
|
|
813
|
+
var r = this, e = V(t, { returnValues: !0 });
|
|
814
|
+
return new k(function(n, o) {
|
|
815
|
+
return G(r, void 0, void 0, function() {
|
|
816
|
+
var i, a, l, u, s, f;
|
|
793
817
|
return P(this, function(p) {
|
|
794
818
|
switch (p.label) {
|
|
795
819
|
case 0:
|
|
@@ -798,14 +822,14 @@ function ke(t) {
|
|
|
798
822
|
2
|
|
799
823
|
/*return*/
|
|
800
824
|
];
|
|
801
|
-
|
|
802
|
-
i(),
|
|
825
|
+
a = !1, o.then(function() {
|
|
826
|
+
i(), a = !0;
|
|
803
827
|
}), p.label = 1;
|
|
804
828
|
case 1:
|
|
805
|
-
p.trys.push([1, , 5, 7]),
|
|
829
|
+
p.trys.push([1, , 5, 7]), u = void 0, s = 0, f = function() {
|
|
806
830
|
var c, d, h, y, m, T;
|
|
807
|
-
return P(this, function(
|
|
808
|
-
switch (
|
|
831
|
+
return P(this, function(F) {
|
|
832
|
+
switch (F.label) {
|
|
809
833
|
case 0:
|
|
810
834
|
c = s;
|
|
811
835
|
try {
|
|
@@ -828,9 +852,9 @@ function ke(t) {
|
|
|
828
852
|
return i = w;
|
|
829
853
|
})];
|
|
830
854
|
case 1:
|
|
831
|
-
return
|
|
855
|
+
return u = F.sent(), u === void 0 ? [3, 3] : [4, n(u.value)];
|
|
832
856
|
case 2:
|
|
833
|
-
|
|
857
|
+
F.sent(), F.label = 3;
|
|
834
858
|
case 3:
|
|
835
859
|
return [
|
|
836
860
|
2
|
|
@@ -840,7 +864,7 @@ function ke(t) {
|
|
|
840
864
|
});
|
|
841
865
|
}, p.label = 2;
|
|
842
866
|
case 2:
|
|
843
|
-
return
|
|
867
|
+
return a ? [3, 4] : [5, f()];
|
|
844
868
|
case 3:
|
|
845
869
|
return p.sent(), [3, 2];
|
|
846
870
|
case 4:
|
|
@@ -864,11 +888,11 @@ function ke(t) {
|
|
|
864
888
|
});
|
|
865
889
|
});
|
|
866
890
|
}
|
|
867
|
-
function
|
|
868
|
-
var
|
|
869
|
-
return new k(function(
|
|
870
|
-
return G(
|
|
871
|
-
var i,
|
|
891
|
+
function qe(t) {
|
|
892
|
+
var r = this, e = V(t, { yieldValues: !0 });
|
|
893
|
+
return new k(function(n, o) {
|
|
894
|
+
return G(r, void 0, void 0, function() {
|
|
895
|
+
var i, a, l, u = this;
|
|
872
896
|
return P(this, function(s) {
|
|
873
897
|
switch (s.label) {
|
|
874
898
|
case 0:
|
|
@@ -877,9 +901,9 @@ function Te(t) {
|
|
|
877
901
|
2
|
|
878
902
|
/*return*/
|
|
879
903
|
];
|
|
880
|
-
i = [],
|
|
904
|
+
i = [], a = !1, o.then(function() {
|
|
881
905
|
var f, p;
|
|
882
|
-
|
|
906
|
+
a = !0;
|
|
883
907
|
try {
|
|
884
908
|
for (var c = _(i), d = c.next(); !d.done; d = c.next()) {
|
|
885
909
|
var h = d.value;
|
|
@@ -897,14 +921,14 @@ function Te(t) {
|
|
|
897
921
|
}), s.label = 1;
|
|
898
922
|
case 1:
|
|
899
923
|
return s.trys.push([1, , 3, 4]), [4, Promise.all(e.map(function(f, p) {
|
|
900
|
-
return G(
|
|
924
|
+
return G(u, void 0, void 0, function() {
|
|
901
925
|
var c, d;
|
|
902
926
|
return P(this, function(h) {
|
|
903
927
|
switch (h.label) {
|
|
904
928
|
case 0:
|
|
905
929
|
h.trys.push([0, , 6, 9]), h.label = 1;
|
|
906
930
|
case 1:
|
|
907
|
-
return
|
|
931
|
+
return a ? [3, 5] : (Promise.resolve(f.next()).then(function(y) {
|
|
908
932
|
return i[p](y);
|
|
909
933
|
}, function(y) {
|
|
910
934
|
return o(y);
|
|
@@ -915,7 +939,7 @@ function Te(t) {
|
|
|
915
939
|
return c = h.sent(), c === void 0 ? [3, 4] : c.done ? (l = c, [
|
|
916
940
|
2
|
|
917
941
|
/*return*/
|
|
918
|
-
]) : [4,
|
|
942
|
+
]) : [4, n(c.value)];
|
|
919
943
|
case 3:
|
|
920
944
|
h.sent(), h.label = 4;
|
|
921
945
|
case 4:
|
|
@@ -957,23 +981,23 @@ function Te(t) {
|
|
|
957
981
|
});
|
|
958
982
|
});
|
|
959
983
|
}
|
|
960
|
-
function
|
|
961
|
-
var
|
|
962
|
-
return new k(function(
|
|
963
|
-
return G(
|
|
964
|
-
var i,
|
|
984
|
+
function De(t) {
|
|
985
|
+
var r = this, e = V(t, { returnValues: !0 });
|
|
986
|
+
return new k(function(n, o) {
|
|
987
|
+
return G(r, void 0, void 0, function() {
|
|
988
|
+
var i, a, l, u;
|
|
965
989
|
return P(this, function(s) {
|
|
966
990
|
switch (s.label) {
|
|
967
991
|
case 0:
|
|
968
992
|
if (!e.length)
|
|
969
993
|
return o(), [2, []];
|
|
970
|
-
|
|
971
|
-
i(),
|
|
994
|
+
a = !1, o.then(function() {
|
|
995
|
+
i(), a = !0;
|
|
972
996
|
}), s.label = 1;
|
|
973
997
|
case 1:
|
|
974
998
|
s.trys.push([1, , 6, 8]), s.label = 2;
|
|
975
999
|
case 2:
|
|
976
|
-
return
|
|
1000
|
+
return a ? [3, 5] : (Promise.all(e.map(function(f) {
|
|
977
1001
|
return f.next();
|
|
978
1002
|
})).then(function(f) {
|
|
979
1003
|
return i(f);
|
|
@@ -986,11 +1010,11 @@ function qe(t) {
|
|
|
986
1010
|
return l = s.sent(), l === void 0 ? [
|
|
987
1011
|
2
|
|
988
1012
|
/*return*/
|
|
989
|
-
] : (
|
|
1013
|
+
] : (u = l.map(function(f) {
|
|
990
1014
|
return f.value;
|
|
991
1015
|
}), l.some(function(f) {
|
|
992
1016
|
return f.done;
|
|
993
|
-
}) ? [2,
|
|
1017
|
+
}) ? [2, u] : [4, n(u)]);
|
|
994
1018
|
case 4:
|
|
995
1019
|
return s.sent(), [3, 2];
|
|
996
1020
|
case 5:
|
|
@@ -1014,24 +1038,24 @@ function qe(t) {
|
|
|
1014
1038
|
});
|
|
1015
1039
|
});
|
|
1016
1040
|
}
|
|
1017
|
-
function
|
|
1018
|
-
var
|
|
1041
|
+
function Ie(t) {
|
|
1042
|
+
var r = this, e = V(t, {
|
|
1019
1043
|
yieldValues: !0,
|
|
1020
1044
|
returnValues: !0
|
|
1021
1045
|
});
|
|
1022
|
-
return new k(function(
|
|
1023
|
-
return G(
|
|
1024
|
-
var i,
|
|
1046
|
+
return new k(function(n, o) {
|
|
1047
|
+
return G(r, void 0, void 0, function() {
|
|
1048
|
+
var i, a, l, u, s, f = this;
|
|
1025
1049
|
return P(this, function(p) {
|
|
1026
1050
|
switch (p.label) {
|
|
1027
1051
|
case 0:
|
|
1028
1052
|
if (!e.length)
|
|
1029
1053
|
return o(), [2, []];
|
|
1030
|
-
|
|
1054
|
+
a = [], l = !1, o.then(function() {
|
|
1031
1055
|
var c, d;
|
|
1032
1056
|
i();
|
|
1033
1057
|
try {
|
|
1034
|
-
for (var h = _(
|
|
1058
|
+
for (var h = _(a), y = h.next(); !y.done; y = h.next()) {
|
|
1035
1059
|
var m = y.value;
|
|
1036
1060
|
m();
|
|
1037
1061
|
}
|
|
@@ -1057,14 +1081,14 @@ function De(t) {
|
|
|
1057
1081
|
return i = c;
|
|
1058
1082
|
})];
|
|
1059
1083
|
case 2:
|
|
1060
|
-
return
|
|
1084
|
+
return u = p.sent(), u === void 0 ? [
|
|
1061
1085
|
2
|
|
1062
1086
|
/*return*/
|
|
1063
|
-
] : (s =
|
|
1087
|
+
] : (s = u.map(function(c) {
|
|
1064
1088
|
return c.value;
|
|
1065
|
-
}),
|
|
1089
|
+
}), u.every(function(c) {
|
|
1066
1090
|
return c.done;
|
|
1067
|
-
}) ? [2, s] : [4,
|
|
1091
|
+
}) ? [2, s] : [4, n(s.slice())]);
|
|
1068
1092
|
case 3:
|
|
1069
1093
|
return p.sent(), [4, Promise.all(e.map(function(c, d) {
|
|
1070
1094
|
return G(f, void 0, void 0, function() {
|
|
@@ -1072,19 +1096,19 @@ function De(t) {
|
|
|
1072
1096
|
return P(this, function(y) {
|
|
1073
1097
|
switch (y.label) {
|
|
1074
1098
|
case 0:
|
|
1075
|
-
if (
|
|
1076
|
-
return [2,
|
|
1099
|
+
if (u[d].done)
|
|
1100
|
+
return [2, u[d].value];
|
|
1077
1101
|
y.label = 1;
|
|
1078
1102
|
case 1:
|
|
1079
1103
|
return l ? [3, 4] : (Promise.resolve(c.next()).then(function(m) {
|
|
1080
|
-
return
|
|
1104
|
+
return a[d](m);
|
|
1081
1105
|
}, function(m) {
|
|
1082
1106
|
return o(m);
|
|
1083
1107
|
}), [4, new Promise(function(m) {
|
|
1084
|
-
return
|
|
1108
|
+
return a[d] = m;
|
|
1085
1109
|
})]);
|
|
1086
1110
|
case 2:
|
|
1087
|
-
return h = y.sent(), h === void 0 ? [2,
|
|
1111
|
+
return h = y.sent(), h === void 0 ? [2, u[d].value] : h.done ? [2, h.value] : (s[d] = h.value, [4, n(s.slice())]);
|
|
1088
1112
|
case 3:
|
|
1089
1113
|
return y.sent(), [3, 1];
|
|
1090
1114
|
case 4:
|
|
@@ -1117,42 +1141,42 @@ function De(t) {
|
|
|
1117
1141
|
});
|
|
1118
1142
|
});
|
|
1119
1143
|
}
|
|
1120
|
-
function
|
|
1144
|
+
function Ae(t) {
|
|
1121
1145
|
return typeof t == "string" ? t : t.url;
|
|
1122
1146
|
}
|
|
1123
|
-
function
|
|
1124
|
-
const o = e[
|
|
1147
|
+
function Ne(t, r, e, n) {
|
|
1148
|
+
const o = e[r];
|
|
1125
1149
|
if (!(!o || !o.length))
|
|
1126
1150
|
try {
|
|
1127
|
-
r
|
|
1151
|
+
n[r] = t(n[r], o, !0, !1).newDocument;
|
|
1128
1152
|
} catch (i) {
|
|
1129
|
-
throw typeof i == "object" && i && "name" in i && typeof i.name == "string" && "message" in i && typeof i.message == "string" ? i.name === "TEST_OPERATION_FAILED" ? new
|
|
1153
|
+
throw typeof i == "object" && i && "name" in i && typeof i.name == "string" && "message" in i && typeof i.message == "string" ? i.name === "TEST_OPERATION_FAILED" ? new Pe(i.message) : new xe(i.name + ": " + i.message) : i;
|
|
1130
1154
|
}
|
|
1131
1155
|
}
|
|
1132
|
-
function
|
|
1156
|
+
function Me(t, r) {
|
|
1133
1157
|
try {
|
|
1134
|
-
return t.compile(
|
|
1158
|
+
return t.compile(r);
|
|
1135
1159
|
} catch (e) {
|
|
1136
|
-
throw new
|
|
1160
|
+
throw new ge(
|
|
1137
1161
|
e instanceof Error ? e.message : void 0
|
|
1138
1162
|
);
|
|
1139
1163
|
}
|
|
1140
1164
|
}
|
|
1141
|
-
function
|
|
1165
|
+
function Ve(t, r, e) {
|
|
1142
1166
|
t.actor !== (e == null ? void 0 : e.actor) && (t.allowed = t.allowed && e ? [e.actor] : void 0, t.channels = t.channels.filter(
|
|
1143
|
-
(
|
|
1167
|
+
(n) => r.includes(n)
|
|
1144
1168
|
));
|
|
1145
1169
|
}
|
|
1146
|
-
function
|
|
1147
|
-
return t.allowed === void 0 || t.allowed === null || !!(
|
|
1170
|
+
function Be(t, r) {
|
|
1171
|
+
return t.allowed === void 0 || t.allowed === null || !!(r != null && r.actor) && (t.actor === r.actor || t.allowed.includes(r.actor));
|
|
1148
1172
|
}
|
|
1149
|
-
class
|
|
1173
|
+
class Ce extends we {
|
|
1150
1174
|
/**
|
|
1151
1175
|
* Wraps a Graffiti API instance to provide the synchronize methods.
|
|
1152
1176
|
* The GraffitiSyncrhonize class rather than the Graffiti class
|
|
1153
1177
|
* must be used for all functions for the synchronize methods to work.
|
|
1154
1178
|
*/
|
|
1155
|
-
constructor(e,
|
|
1179
|
+
constructor(e, n) {
|
|
1156
1180
|
super();
|
|
1157
1181
|
v(this, "ajv_");
|
|
1158
1182
|
v(this, "applyPatch_");
|
|
@@ -1164,12 +1188,12 @@ class Ve extends me {
|
|
|
1164
1188
|
v(this, "logout");
|
|
1165
1189
|
v(this, "sessionEvents");
|
|
1166
1190
|
v(this, "get", async (...e) => {
|
|
1167
|
-
const
|
|
1168
|
-
return this.synchronizeDispatch({ object:
|
|
1191
|
+
const n = await this.graffiti.get(...e);
|
|
1192
|
+
return this.synchronizeDispatch({ object: n }), n;
|
|
1169
1193
|
});
|
|
1170
1194
|
v(this, "put", async (...e) => {
|
|
1171
|
-
const
|
|
1172
|
-
...
|
|
1195
|
+
const n = await this.graffiti.put(...e), o = e[0], i = {
|
|
1196
|
+
...n,
|
|
1173
1197
|
value: o.value,
|
|
1174
1198
|
channels: o.channels,
|
|
1175
1199
|
allowed: o.allowed
|
|
@@ -1177,54 +1201,54 @@ class Ve extends me {
|
|
|
1177
1201
|
return await this.synchronizeDispatch(
|
|
1178
1202
|
{
|
|
1179
1203
|
tombstone: !0,
|
|
1180
|
-
object:
|
|
1204
|
+
object: n
|
|
1181
1205
|
},
|
|
1182
1206
|
{
|
|
1183
1207
|
object: i
|
|
1184
1208
|
},
|
|
1185
1209
|
!0
|
|
1186
|
-
),
|
|
1210
|
+
), n;
|
|
1187
1211
|
});
|
|
1188
1212
|
v(this, "patch", async (...e) => {
|
|
1189
|
-
const
|
|
1213
|
+
const n = await this.graffiti.patch(...e), o = { ...n };
|
|
1190
1214
|
for (const i of ["value", "channels", "allowed"])
|
|
1191
|
-
|
|
1215
|
+
Ne(await this.applyPatch, i, e[0], o);
|
|
1192
1216
|
return await this.synchronizeDispatch(
|
|
1193
1217
|
{
|
|
1194
1218
|
tombstone: !0,
|
|
1195
|
-
object:
|
|
1219
|
+
object: n
|
|
1196
1220
|
},
|
|
1197
1221
|
{
|
|
1198
1222
|
object: o
|
|
1199
1223
|
},
|
|
1200
1224
|
!0
|
|
1201
|
-
),
|
|
1225
|
+
), n;
|
|
1202
1226
|
});
|
|
1203
1227
|
v(this, "delete", async (...e) => {
|
|
1204
|
-
const
|
|
1228
|
+
const n = await this.graffiti.delete(...e);
|
|
1205
1229
|
return await this.synchronizeDispatch(
|
|
1206
1230
|
{
|
|
1207
1231
|
tombstone: !0,
|
|
1208
|
-
object:
|
|
1232
|
+
object: n
|
|
1209
1233
|
},
|
|
1210
1234
|
void 0,
|
|
1211
1235
|
!0
|
|
1212
|
-
),
|
|
1236
|
+
), n;
|
|
1213
1237
|
});
|
|
1214
1238
|
v(this, "discover", (...e) => {
|
|
1215
|
-
const
|
|
1216
|
-
return this.objectStream(
|
|
1239
|
+
const n = this.graffiti.discover(...e);
|
|
1240
|
+
return this.objectStream(n);
|
|
1217
1241
|
});
|
|
1218
1242
|
v(this, "recoverOrphans", (...e) => {
|
|
1219
|
-
const
|
|
1220
|
-
return this.objectStream(
|
|
1243
|
+
const n = this.graffiti.recoverOrphans(...e);
|
|
1244
|
+
return this.objectStream(n);
|
|
1221
1245
|
});
|
|
1222
1246
|
v(this, "continueObjectStream", (...e) => this.graffiti.continueObjectStream(...e));
|
|
1223
|
-
this.options =
|
|
1247
|
+
this.options = n ?? {}, this.graffiti = e, this.channelStats = e.channelStats.bind(e), this.login = e.login.bind(e), this.logout = e.logout.bind(e), this.sessionEvents = e.sessionEvents;
|
|
1224
1248
|
}
|
|
1225
1249
|
get ajv() {
|
|
1226
1250
|
return this.ajv_ || (this.ajv_ = (async () => {
|
|
1227
|
-
const { default: e } = await import("./ajv-C30pimY5.mjs").then((
|
|
1251
|
+
const { default: e } = await import("./ajv-C30pimY5.mjs").then((n) => n.a);
|
|
1228
1252
|
return new e({ strict: !1 });
|
|
1229
1253
|
})()), this.ajv_;
|
|
1230
1254
|
}
|
|
@@ -1234,18 +1258,18 @@ class Ve extends me {
|
|
|
1234
1258
|
return e;
|
|
1235
1259
|
})()), this.applyPatch_;
|
|
1236
1260
|
}
|
|
1237
|
-
synchronize(e,
|
|
1238
|
-
const
|
|
1261
|
+
synchronize(e, n, o, i) {
|
|
1262
|
+
const a = /* @__PURE__ */ new Set();
|
|
1239
1263
|
return new k(
|
|
1240
|
-
async (
|
|
1241
|
-
const f =
|
|
1264
|
+
async (u, s) => {
|
|
1265
|
+
const f = Me(await this.ajv, o), p = (c, d) => {
|
|
1242
1266
|
for (const h of [d, c])
|
|
1243
1267
|
if (h != null && h.tombstone)
|
|
1244
|
-
|
|
1245
|
-
else if (h && e(h.object) && (this.options.omniscient ||
|
|
1268
|
+
a.has(h.object.url) && u(h);
|
|
1269
|
+
else if (h && e(h.object) && (this.options.omniscient || Be(h.object, i))) {
|
|
1246
1270
|
const y = { ...h.object };
|
|
1247
|
-
if (this.options.omniscient ||
|
|
1248
|
-
|
|
1271
|
+
if (this.options.omniscient || Ve(y, n, i), f(y)) {
|
|
1272
|
+
u({ object: y }), a.add(y.url);
|
|
1249
1273
|
break;
|
|
1250
1274
|
}
|
|
1251
1275
|
}
|
|
@@ -1268,11 +1292,11 @@ class Ve extends me {
|
|
|
1268
1292
|
* @group Synchronize Methods
|
|
1269
1293
|
*/
|
|
1270
1294
|
synchronizeDiscover(...e) {
|
|
1271
|
-
const [
|
|
1272
|
-
function
|
|
1273
|
-
return l.channels.some((
|
|
1295
|
+
const [n, o, i] = e;
|
|
1296
|
+
function a(l) {
|
|
1297
|
+
return l.channels.some((u) => n.includes(u));
|
|
1274
1298
|
}
|
|
1275
|
-
return this.synchronize(
|
|
1299
|
+
return this.synchronize(a, n, o, i);
|
|
1276
1300
|
}
|
|
1277
1301
|
/**
|
|
1278
1302
|
* This method has the same signature as {@link get} but
|
|
@@ -1287,9 +1311,9 @@ class Ve extends me {
|
|
|
1287
1311
|
* @group Synchronize Methods
|
|
1288
1312
|
*/
|
|
1289
1313
|
synchronizeGet(...e) {
|
|
1290
|
-
const [
|
|
1291
|
-
function l(
|
|
1292
|
-
return
|
|
1314
|
+
const [n, o, i] = e, a = Ae(n);
|
|
1315
|
+
function l(u) {
|
|
1316
|
+
return u.url === a;
|
|
1293
1317
|
}
|
|
1294
1318
|
return this.synchronize(l, [], o, i);
|
|
1295
1319
|
}
|
|
@@ -1307,11 +1331,11 @@ class Ve extends me {
|
|
|
1307
1331
|
* @group Synchronize Methods
|
|
1308
1332
|
*/
|
|
1309
1333
|
synchronizeRecoverOrphans(...e) {
|
|
1310
|
-
const [
|
|
1311
|
-
function i(
|
|
1312
|
-
return
|
|
1334
|
+
const [n, o] = e;
|
|
1335
|
+
function i(a) {
|
|
1336
|
+
return a.actor === o.actor && a.channels.length === 0;
|
|
1313
1337
|
}
|
|
1314
|
-
return this.synchronize(i, [],
|
|
1338
|
+
return this.synchronize(i, [], n, o);
|
|
1315
1339
|
}
|
|
1316
1340
|
/**
|
|
1317
1341
|
* Streams changes made to *any* object in *any* channel
|
|
@@ -1323,79 +1347,79 @@ class Ve extends me {
|
|
|
1323
1347
|
* Be careful using this method. Without additional filters it can
|
|
1324
1348
|
* expose the user to content out of context.
|
|
1325
1349
|
*/
|
|
1326
|
-
synchronizeAll(e,
|
|
1327
|
-
return this.synchronize(() => !0, [], e,
|
|
1350
|
+
synchronizeAll(e, n) {
|
|
1351
|
+
return this.synchronize(() => !0, [], e, n);
|
|
1328
1352
|
}
|
|
1329
|
-
async synchronizeDispatch(e,
|
|
1353
|
+
async synchronizeDispatch(e, n, o = !1) {
|
|
1330
1354
|
for (const i of this.callbacks)
|
|
1331
|
-
i(e,
|
|
1355
|
+
i(e, n);
|
|
1332
1356
|
o && await new Promise((i) => setTimeout(i, 0));
|
|
1333
1357
|
}
|
|
1334
1358
|
objectStreamContinue(e) {
|
|
1335
|
-
const
|
|
1359
|
+
const n = this;
|
|
1336
1360
|
return async function* () {
|
|
1337
1361
|
for (; ; ) {
|
|
1338
1362
|
const o = await e.next();
|
|
1339
1363
|
if (o.done) {
|
|
1340
|
-
const { continue: i, cursor:
|
|
1364
|
+
const { continue: i, cursor: a } = o.value;
|
|
1341
1365
|
return {
|
|
1342
|
-
continue: () =>
|
|
1343
|
-
cursor:
|
|
1366
|
+
continue: () => n.objectStreamContinue(i()),
|
|
1367
|
+
cursor: a
|
|
1344
1368
|
};
|
|
1345
1369
|
}
|
|
1346
|
-
o.value.error ||
|
|
1370
|
+
o.value.error || n.synchronizeDispatch(
|
|
1347
1371
|
o.value
|
|
1348
1372
|
), yield o.value;
|
|
1349
1373
|
}
|
|
1350
1374
|
}();
|
|
1351
1375
|
}
|
|
1352
1376
|
objectStream(e) {
|
|
1353
|
-
const
|
|
1377
|
+
const n = this.objectStreamContinue(e);
|
|
1354
1378
|
return async function* () {
|
|
1355
1379
|
for (; ; ) {
|
|
1356
|
-
const o = await
|
|
1380
|
+
const o = await n.next();
|
|
1357
1381
|
if (o.done) return o.value;
|
|
1358
1382
|
(o.value.error || !o.value.tombstone) && (yield o.value);
|
|
1359
1383
|
}
|
|
1360
1384
|
}();
|
|
1361
1385
|
}
|
|
1362
1386
|
}
|
|
1363
|
-
const
|
|
1364
|
-
install(t,
|
|
1365
|
-
const e =
|
|
1366
|
-
|
|
1367
|
-
const
|
|
1368
|
-
if (
|
|
1387
|
+
const We = {
|
|
1388
|
+
install(t, r) {
|
|
1389
|
+
const e = r.graffiti, n = new Ce(e), o = N(void 0);
|
|
1390
|
+
n.sessionEvents.addEventListener("initialized", async (i) => {
|
|
1391
|
+
const a = i.detail;
|
|
1392
|
+
if (a && a.error && console.error(a.error), a && a.href) {
|
|
1369
1393
|
const l = t.config.globalProperties.$router;
|
|
1370
1394
|
if (l) {
|
|
1371
|
-
const
|
|
1372
|
-
s.pathname.startsWith(
|
|
1395
|
+
const u = l.options.history.base, s = new URL(a.href);
|
|
1396
|
+
s.pathname.startsWith(u) && (s.pathname = s.pathname.slice(u.length)), await l.replace(s.pathname + s.search + s.hash);
|
|
1373
1397
|
}
|
|
1374
1398
|
}
|
|
1375
1399
|
o.value || (o.value = null);
|
|
1376
|
-
}),
|
|
1377
|
-
const
|
|
1378
|
-
if (
|
|
1379
|
-
console.error("Error logging in:"), console.error(
|
|
1400
|
+
}), n.sessionEvents.addEventListener("login", (i) => {
|
|
1401
|
+
const a = i.detail;
|
|
1402
|
+
if (a.error) {
|
|
1403
|
+
console.error("Error logging in:"), console.error(a.error);
|
|
1380
1404
|
return;
|
|
1381
1405
|
} else
|
|
1382
|
-
o.value =
|
|
1383
|
-
}),
|
|
1384
|
-
const
|
|
1385
|
-
|
|
1386
|
-
}), t.provide(Y,
|
|
1406
|
+
o.value = a.session;
|
|
1407
|
+
}), n.sessionEvents.addEventListener("logout", (i) => {
|
|
1408
|
+
const a = i.detail;
|
|
1409
|
+
a.error ? (console.error("Error logging out:"), console.error(a.error)) : o.value = null;
|
|
1410
|
+
}), t.provide(Y, n), t.provide(Z, o), t.component("GraffitiDiscover", ce), t.component("GraffitiGet", le), t.component("GraffitiRecoverOrphans", fe), t.config.globalProperties.$graffiti = n, t.config.globalProperties.$graffitiSession = o;
|
|
1387
1411
|
}
|
|
1388
|
-
},
|
|
1412
|
+
}, Je = ce, Ke = le, He = fe;
|
|
1389
1413
|
export {
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1414
|
+
Je as GraffitiDiscover,
|
|
1415
|
+
Ke as GraffitiGet,
|
|
1416
|
+
We as GraffitiPlugin,
|
|
1417
|
+
He as GraffitiRecoverOrphans,
|
|
1418
|
+
Le as useGraffiti,
|
|
1419
|
+
Ee as useGraffitiDiscover,
|
|
1420
|
+
Se as useGraffitiGet,
|
|
1421
|
+
Ge as useGraffitiRecoverOrphans,
|
|
1398
1422
|
ee as useGraffitiSession,
|
|
1399
|
-
|
|
1423
|
+
M as useGraffitiSynchronize
|
|
1400
1424
|
};
|
|
1401
1425
|
//# sourceMappingURL=plugin.mjs.map
|