@hostlink/light 3.3.2 → 3.5.0

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/light.js CHANGED
@@ -1,71 +1,71 @@
1
- import { jsonToGraphQLQuery as Q, VariableType as O } from "json-to-graphql-query";
2
- import L from "collect.js";
3
- import ot from "axios";
4
- function R(t) {
1
+ import { jsonToGraphQLQuery as x, VariableType as j } from "json-to-graphql-query";
2
+ import W from "collect.js";
3
+ import ht from "axios";
4
+ function z(t) {
5
5
  if (t === null || typeof t != "object")
6
6
  return !1;
7
7
  const e = Object.getPrototypeOf(t);
8
8
  return e !== null && e !== Object.prototype && Object.getPrototypeOf(e) !== null || Symbol.iterator in t ? !1 : Symbol.toStringTag in t ? Object.prototype.toString.call(t) === "[object Module]" : !0;
9
9
  }
10
- function T(t, e, r = ".", s) {
11
- if (!R(e))
12
- return T(t, {}, r, s);
10
+ function H(t, e, r = ".", s) {
11
+ if (!z(e))
12
+ return H(t, {}, r, s);
13
13
  const n = Object.assign({}, e);
14
- for (const h in t) {
15
- if (h === "__proto__" || h === "constructor")
14
+ for (const f in t) {
15
+ if (f === "__proto__" || f === "constructor")
16
16
  continue;
17
- const l = t[h];
18
- l != null && (s && s(n, h, l, r) || (Array.isArray(l) && Array.isArray(n[h]) ? n[h] = [...l, ...n[h]] : R(l) && R(n[h]) ? n[h] = T(
19
- l,
20
- n[h],
21
- (r ? `${r}.` : "") + h.toString(),
17
+ const c = t[f];
18
+ c != null && (s && s(n, f, c, r) || (Array.isArray(c) && Array.isArray(n[f]) ? n[f] = [...c, ...n[f]] : z(c) && z(n[f]) ? n[f] = H(
19
+ c,
20
+ n[f],
21
+ (r ? `${r}.` : "") + f.toString(),
22
22
  s
23
- ) : n[h] = l));
23
+ ) : n[f] = c));
24
24
  }
25
25
  return n;
26
26
  }
27
- function it(t) {
27
+ function ft(t) {
28
28
  return (...e) => (
29
29
  // eslint-disable-next-line unicorn/no-array-reduce
30
- e.reduce((r, s) => T(r, s, "", t), {})
30
+ e.reduce((r, s) => H(r, s, "", t), {})
31
31
  );
32
32
  }
33
- const U = it();
34
- let M = null;
35
- const at = (t) => {
36
- M = t;
37
- }, z = () => {
38
- if (!M)
33
+ const E = ft();
34
+ let R = null;
35
+ const pt = (t) => {
36
+ R = t;
37
+ }, I = () => {
38
+ if (!R)
39
39
  throw new Error("Api client not initialized. Call setApiClient() first.");
40
- return M;
41
- }, xt = () => M;
42
- function S(t) {
40
+ return R;
41
+ }, ne = () => R;
42
+ function T(t) {
43
43
  for (let e = 0; e < t.length; e++)
44
44
  if (t[e] instanceof File)
45
45
  return !0;
46
46
  return !1;
47
47
  }
48
- function W(t) {
48
+ function K(t) {
49
49
  for (let e in t)
50
- if (t[e] instanceof File || t[e] instanceof Array && S(t[e]))
50
+ if (t[e] instanceof File || t[e] instanceof Array && T(t[e]))
51
51
  return !0;
52
52
  return !1;
53
53
  }
54
- function lt(t) {
54
+ function gt(t) {
55
55
  t = "<~" + t + "~>";
56
- var e, r, s, n, h, l = String, f = 255;
57
- for (t.slice(0, 2) === "<~" && t.slice(-2), t = t.slice(2, -2).replace(/\s/g, "").replace("z", "!!!!!"), e = "uuuuu".slice(t.length % 5 || 5), t += e, s = [], n = 0, h = t.length; h > n; n += 5) r = 52200625 * (t.charCodeAt(n) - 33) + 614125 * (t.charCodeAt(n + 1) - 33) + 7225 * (t.charCodeAt(n + 2) - 33) + 85 * (t.charCodeAt(n + 3) - 33) + (t.charCodeAt(n + 4) - 33), s.push(f & r >> 24, f & r >> 16, f & r >> 8, f & r);
58
- return (function(p, o) {
59
- for (var i = o; i > 0; i--) p.pop();
60
- })(s, e.length), l.fromCharCode.apply(l, s);
56
+ var e, r, s, n, f, c = String, p = 255;
57
+ for (t.slice(0, 2) === "<~" && t.slice(-2), t = t.slice(2, -2).replace(/\s/g, "").replace("z", "!!!!!"), e = "uuuuu".slice(t.length % 5 || 5), t += e, s = [], n = 0, f = t.length; f > n; n += 5) r = 52200625 * (t.charCodeAt(n) - 33) + 614125 * (t.charCodeAt(n + 1) - 33) + 7225 * (t.charCodeAt(n + 2) - 33) + 85 * (t.charCodeAt(n + 3) - 33) + (t.charCodeAt(n + 4) - 33), s.push(p & r >> 24, p & r >> 16, p & r >> 8, p & r);
58
+ return (function(h, o) {
59
+ for (var i = o; i > 0; i--) h.pop();
60
+ })(s, e.length), c.fromCharCode.apply(c, s);
61
61
  }
62
- const H = (t = "") => {
62
+ const tt = (t = "") => {
63
63
  const e = t, r = (s = "application/octet-stream") => {
64
64
  const n = new Uint8Array(e.length);
65
- for (let f = 0; f < e.length; f++)
66
- n[f] = e.charCodeAt(f);
67
- const h = new Blob([n], { type: s });
68
- return URL.createObjectURL(h);
65
+ for (let p = 0; p < e.length; p++)
66
+ n[p] = e.charCodeAt(p);
67
+ const f = new Blob([n], { type: s });
68
+ return URL.createObjectURL(f);
69
69
  };
70
70
  return {
71
71
  getContent: () => e,
@@ -78,54 +78,54 @@ const H = (t = "") => {
78
78
  window.open(r(s), "_blank");
79
79
  }
80
80
  };
81
- }, te = (t) => H(atob(t)), ee = (t) => H(lt(t));
82
- function X(t, e, r, s, n) {
81
+ }, oe = (t) => tt(atob(t)), ie = (t) => tt(gt(t));
82
+ function et(t, e, r, s, n) {
83
83
  if (!(!t || typeof t != "object"))
84
- for (let h in t) {
85
- const l = t[h];
86
- if (l && typeof l == "object") {
87
- if ("__args" in l) {
88
- const f = l.__args, p = {};
89
- Object.entries(f).forEach(([o, i]) => {
90
- if (i instanceof Array && S(i)) {
91
- p[o] = new O(o);
84
+ for (let f in t) {
85
+ const c = t[f];
86
+ if (c && typeof c == "object") {
87
+ if ("__args" in c) {
88
+ const p = c.__args, h = {};
89
+ Object.entries(p).forEach(([o, i]) => {
90
+ if (i instanceof Array && T(i)) {
91
+ h[o] = new j(o);
92
92
  let a = 0;
93
- i.forEach((c) => {
94
- c instanceof File && (r[n.current] || (r[n.current] = []), r[n.current].push("variables." + o + "." + a), s.append(n.current.toString(), c), n.current++, a++);
93
+ i.forEach((l) => {
94
+ l instanceof File && (r[n.current] || (r[n.current] = []), r[n.current].push("variables." + o + "." + a), s.append(n.current.toString(), l), n.current++, a++);
95
95
  }), e[o] = "[Upload!]!";
96
- } else i instanceof File ? (p[o] = new O(o), r[n.current] = ["variables." + o], s.append(n.current.toString(), i), e[o] = "Upload!", n.current++) : i instanceof Object && W(i) ? (p[o] = {}, Object.entries(i).forEach(([a, c]) => {
97
- if (c instanceof Array && S(c)) {
98
- p[o][a] = new O(a);
96
+ } else i instanceof File ? (h[o] = new j(o), r[n.current] = ["variables." + o], s.append(n.current.toString(), i), e[o] = "Upload!", n.current++) : i instanceof Object && K(i) ? (h[o] = {}, Object.entries(i).forEach(([a, l]) => {
97
+ if (l instanceof Array && T(l)) {
98
+ h[o][a] = new j(a);
99
99
  let m = 0;
100
- c.forEach((w) => {
101
- w instanceof File && (r[n.current] || (r[n.current] = []), r[n.current].push("variables." + a + "." + m), s.append(n.current.toString(), w), n.current++, m++);
100
+ l.forEach((d) => {
101
+ d instanceof File && (r[n.current] || (r[n.current] = []), r[n.current].push("variables." + a + "." + m), s.append(n.current.toString(), d), n.current++, m++);
102
102
  }), e[a] = "[Upload!]!";
103
- } else c instanceof File ? (p[o][a] = new O(a), r[n.current] = ["variables." + a], s.append(n.current.toString(), c), e[a] = "Upload!", n.current++) : p[o][a] = c;
104
- })) : i != null && (p[o] = i);
105
- }), l.__args = p;
103
+ } else l instanceof File ? (h[o][a] = new j(a), r[n.current] = ["variables." + a], s.append(n.current.toString(), l), e[a] = "Upload!", n.current++) : h[o][a] = l;
104
+ })) : i != null && (h[o] = i);
105
+ }), c.__args = h;
106
106
  }
107
- X(l, e, r, s, n);
107
+ et(c, e, r, s, n);
108
108
  }
109
109
  }
110
110
  }
111
- const Y = (t) => async (e) => {
111
+ const rt = (t) => async (e) => {
112
112
  const r = e, s = new FormData();
113
113
  let n = !1;
114
- const h = {}, l = {};
115
- X(r, h, l, s, { current: 0 }), n = Object.keys(h).length > 0, n && (r.__variables = h);
116
- let p = null;
117
- const i = Q({ query: r });
118
- if (n ? (s.append("map", JSON.stringify(l)), s.append("operations", JSON.stringify({
114
+ const f = {}, c = {};
115
+ et(r, f, c, s, { current: 0 }), n = Object.keys(f).length > 0, n && (r.__variables = f);
116
+ let h = null;
117
+ const i = x({ query: r });
118
+ if (n ? (s.append("map", JSON.stringify(c)), s.append("operations", JSON.stringify({
119
119
  query: i
120
- })), p = await t.post("", s)) : p = await t.post("", {
120
+ })), h = await t.post("", s)) : h = await t.post("", {
121
121
  query: i
122
- }), p.data.errors)
123
- throw new Error(p.data.errors[0].message);
124
- return p.data.data;
125
- }, F = async (t) => Y(z().axios)(t);
126
- function v(t, e, r = F) {
127
- let s, n = [], h, l;
128
- const f = (o) => !o || typeof o != "object" ? !1 : Object.values(o).some((i) => i && typeof i == "object" && Object.keys(i).some((a) => a.startsWith("_"))), p = () => n.length === 0 ? (n.unshift({}), n[0]) : (f(n[0]) && n.unshift({}), n[0]);
122
+ }), h.data.errors)
123
+ throw new Error(h.data.errors[0].message);
124
+ return h.data.data;
125
+ }, O = async (t) => rt(I().axios)(t);
126
+ function G(t, e, r = O) {
127
+ let s, n = [], f, c;
128
+ const p = (o) => !o || typeof o != "object" ? !1 : Object.values(o).some((i) => i && typeof i == "object" && Object.keys(i).some((a) => a.startsWith("_"))), h = () => n.length === 0 ? (n.unshift({}), n[0]) : (p(n[0]) && n.unshift({}), n[0]);
129
129
  return {
130
130
  first() {
131
131
  return this.fetchFirst();
@@ -139,29 +139,29 @@ function v(t, e, r = F) {
139
139
  },
140
140
  async fetchWithMeta() {
141
141
  let i = await r(this.toQuery(!0));
142
- if (l) {
143
- const a = l.split(".");
144
- for (const c of a)
145
- i = i[c];
142
+ if (c) {
143
+ const a = c.split(".");
144
+ for (const l of a)
145
+ i = i[l];
146
146
  return i;
147
147
  }
148
148
  return i[`list${t}`];
149
149
  },
150
150
  async fetch() {
151
151
  let i = await r(this.toQuery());
152
- if (l) {
153
- const a = l.split(".");
154
- for (const c of a)
155
- i = i[c];
152
+ if (c) {
153
+ const a = c.split(".");
154
+ for (const l of a)
155
+ i = i[l];
156
156
  return i.data;
157
157
  }
158
158
  return i[`list${t}`].data;
159
159
  },
160
160
  dataPath(o) {
161
- return o && typeof o == "string" && (l = o), this;
161
+ return o && typeof o == "string" && (c = o), this;
162
162
  },
163
163
  sort(o) {
164
- return o && typeof o == "string" && (h = o), this;
164
+ return o && typeof o == "string" && (f = o), this;
165
165
  },
166
166
  filters(o) {
167
167
  return o && typeof o == "object" && (n = [o]), this;
@@ -170,8 +170,8 @@ function v(t, e, r = F) {
170
170
  // where('key', value) -> exact match
171
171
  // where('key', '>', value) -> operator-based (>, <, >=, <=, !=, in, contains)
172
172
  where(o, i, a) {
173
- const c = (m, w, u) => {
174
- const d = {
173
+ const l = (m, d, b) => {
174
+ const k = {
175
175
  ">": "_gt",
176
176
  "<": "_lt",
177
177
  ">=": "_gte",
@@ -179,14 +179,14 @@ function v(t, e, r = F) {
179
179
  "!=": "_ne",
180
180
  in: "_in",
181
181
  contains: "_contains"
182
- }[w];
183
- d && n.push({ [m]: { [d]: u } });
182
+ }[d];
183
+ k && n.push({ [m]: { [k]: b } });
184
184
  };
185
185
  if (a !== void 0)
186
- c(o, String(i), a);
186
+ l(o, String(i), a);
187
187
  else {
188
- const m = p(), w = U(m, { [o]: i });
189
- n[0] = w;
188
+ const m = h(), d = E(m, { [o]: i });
189
+ n[0] = d;
190
190
  }
191
191
  return this;
192
192
  },
@@ -194,8 +194,8 @@ function v(t, e, r = F) {
194
194
  // If the same field is used multiple times, it merges them into an array
195
195
  whereContains(o, i) {
196
196
  if (o && typeof o == "string") {
197
- const a = p(), c = { _contains: i };
198
- a[o] ? Array.isArray(a[o]) ? a[o].push(c) : a[o] = [a[o], c] : a[o] = [c], n[0] = a;
197
+ const a = h(), l = { _contains: i };
198
+ a[o] ? Array.isArray(a[o]) ? a[o].push(l) : a[o] = [a[o], l] : a[o] = [l], n[0] = a;
199
199
  }
200
200
  return this;
201
201
  },
@@ -204,59 +204,59 @@ function v(t, e, r = F) {
204
204
  // If the same field is used multiple times, it merges them into an array
205
205
  whereIn(o, i) {
206
206
  if (o && typeof o == "string" && Array.isArray(i)) {
207
- const a = p(), c = { _in: i };
208
- a[o] ? Array.isArray(a[o]) ? a[o].push(c) : a[o] = [a[o], c] : a[o] = [c], n[0] = a;
207
+ const a = h(), l = { _in: i };
208
+ a[o] ? Array.isArray(a[o]) ? a[o].push(l) : a[o] = [a[o], l] : a[o] = [l], n[0] = a;
209
209
  }
210
210
  return this;
211
211
  },
212
212
  // whereBetween adds a _between filter for a specific field
213
213
  whereBetween(o, i, a) {
214
214
  if (o && typeof o == "string") {
215
- const c = p(), m = { _between: [i, a] };
216
- c[o] ? Array.isArray(c[o]) ? c[o].push(m) : c[o] = [c[o], m] : c[o] = m, n[0] = c;
215
+ const l = h(), m = { _between: [i, a] };
216
+ l[o] ? Array.isArray(l[o]) ? l[o].push(m) : l[o] = [l[o], m] : l[o] = m, n[0] = l;
217
217
  }
218
218
  return this;
219
219
  },
220
220
  // limit sets paging/limit for the data selection
221
221
  limit(o) {
222
- return typeof o == "number" && Number.isFinite(o) && (s = U(s || {}, { limit: o })), this;
222
+ return typeof o == "number" && Number.isFinite(o) && (s = E(s || {}, { limit: o })), this;
223
223
  },
224
224
  // offset sets the starting index for the data selection
225
225
  offset(o) {
226
- return typeof o == "number" && Number.isFinite(o) && (s = U(s || {}, { offset: o })), this;
226
+ return typeof o == "number" && Number.isFinite(o) && (s = E(s || {}, { offset: o })), this;
227
227
  },
228
228
  toQuery(o = !1) {
229
229
  let i;
230
- const a = n.length > 0 && Object.keys(n[0] || {}).length > 0, c = a ? 1 : 0, m = n.length > c;
231
- a && m ? i = n : m ? i = n.slice(c) : a && (i = n[0]);
232
- const w = U(
233
- h ? { sort: h } : {},
230
+ const a = n.length > 0 && Object.keys(n[0] || {}).length > 0, l = a ? 1 : 0, m = n.length > l;
231
+ a && m ? i = n : m ? i = n.slice(l) : a && (i = n[0]);
232
+ const d = E(
233
+ f ? { sort: f } : {},
234
234
  i ? { filters: i } : {}
235
- ), u = {
235
+ ), b = {
236
236
  data: {
237
237
  ...e
238
238
  }
239
239
  };
240
- if (s && (u.data.__args = s), Object.keys(w).length > 0 && (u.__args = w), o && (u.meta = {
240
+ if (s && (b.data.__args = s), Object.keys(d).length > 0 && (b.__args = d), o && (b.meta = {
241
241
  total: !0,
242
242
  key: !0,
243
243
  name: !0
244
- }), l) {
245
- const _ = l.split(".");
246
- let d = u;
247
- for (let y = _.length - 1; y >= 0; y--)
248
- d = {
249
- [_[y]]: d
244
+ }), c) {
245
+ const P = c.split(".");
246
+ let k = b;
247
+ for (let U = P.length - 1; U >= 0; U--)
248
+ k = {
249
+ [P[U]]: k
250
250
  };
251
- return d;
251
+ return k;
252
252
  }
253
253
  return {
254
- [`list${t}`]: u
254
+ [`list${t}`]: b
255
255
  };
256
256
  }
257
257
  };
258
258
  }
259
- const ct = "list", ht = [
259
+ const dt = "list", _t = [
260
260
  "flatMap",
261
261
  "chunk",
262
262
  "shuffle",
@@ -282,7 +282,7 @@ const ct = "list", ht = [
282
282
  "slice",
283
283
  "tap",
284
284
  "sort"
285
- ], ut = [
285
+ ], yt = [
286
286
  "avg",
287
287
  "count",
288
288
  "countBy",
@@ -310,7 +310,7 @@ const ct = "list", ht = [
310
310
  "implode",
311
311
  "partition"
312
312
  ];
313
- class b {
313
+ class w {
314
314
  _batchData = null;
315
315
  data_path = "";
316
316
  filters;
@@ -327,7 +327,7 @@ class b {
327
327
  this.filters = {}, this.steps = [], this.fields = e;
328
328
  }
329
329
  }
330
- b.prototype.getQueryPayload = function() {
330
+ w.prototype.getQueryPayload = function() {
331
331
  let t = {
332
332
  meta: {
333
333
  total: !0,
@@ -341,26 +341,26 @@ b.prototype.getQueryPayload = function() {
341
341
  steps: this.steps
342
342
  };
343
343
  };
344
- b.prototype.dataPath = function(t) {
344
+ w.prototype.dataPath = function(t) {
345
345
  const e = this.clone();
346
346
  return e.data_path = t, e;
347
347
  };
348
- b.prototype.buildArgs = function() {
348
+ w.prototype.buildArgs = function() {
349
349
  let t = {};
350
350
  return Object.keys(this.filters).length > 0 && (t.filters = this.filters), this._sort && (t.sort = this._sort, this._sortDesc && (t.sort += ":desc")), t;
351
351
  };
352
- b.prototype.clone = function() {
352
+ w.prototype.clone = function() {
353
353
  const t = Object.create(this);
354
354
  return t.steps = JSON.parse(JSON.stringify(this.steps)), t.filters = JSON.parse(JSON.stringify(this.filters)), t.fields = JSON.parse(JSON.stringify(this.fields)), t;
355
355
  };
356
- L().macro("whereContains", function(t, e) {
356
+ W().macro("whereContains", function(t, e) {
357
357
  return this.filter((r) => r[t].toLowerCase().includes(e.toLowerCase()));
358
358
  });
359
- b.prototype.fetchData = async function() {
359
+ w.prototype.fetchData = async function() {
360
360
  try {
361
361
  if (this._batchData) {
362
- const f = this._batchData;
363
- return this.meta = f.meta, L(f.data);
362
+ const p = this._batchData;
363
+ return this.meta = p.meta, W(p.data);
364
364
  }
365
365
  let t = {
366
366
  meta: {
@@ -372,47 +372,47 @@ b.prototype.fetchData = async function() {
372
372
  t.__args = this.buildArgs(), t.data = this.fields, this.already_limit && (t.data.__args = t.data.__args || {}, t.data.__args.limit = this.limit), this.already_offset && (t.data.__args = t.data.__args || {}, t.data.__args.offset = this.offset);
373
373
  const e = this.data_path.split(".");
374
374
  let r = {}, s = r, n = e[e.length - 1];
375
- for (const f of e) {
376
- if (f === n) {
377
- s[f] = t;
375
+ for (const p of e) {
376
+ if (p === n) {
377
+ s[p] = t;
378
378
  break;
379
379
  }
380
- s[f] = {}, s = s[f];
380
+ s[p] = {}, s = s[p];
381
381
  }
382
- let l = await (this._queryFn || F)(r);
383
- for (const f of e)
384
- l = l[f];
385
- return this.meta = l.meta, L(l.data);
382
+ let c = await (this._queryFn || O)(r);
383
+ for (const p of e)
384
+ c = c[p];
385
+ return this.meta = c.meta, W(c.data);
386
386
  } catch (t) {
387
387
  throw console.error("Error fetching collection data:", t), t;
388
388
  }
389
389
  };
390
- b.prototype.processData = async function() {
390
+ w.prototype.processData = async function() {
391
391
  let t = await this.fetchData();
392
392
  for (const e of this.steps)
393
393
  t = t[e.type](...e.args);
394
394
  return t;
395
395
  };
396
- b.prototype.all = async function() {
396
+ w.prototype.all = async function() {
397
397
  return (await this.processData()).all();
398
398
  };
399
- for (const t of ht)
400
- b.prototype[t] = function(...e) {
399
+ for (const t of _t)
400
+ w.prototype[t] = function(...e) {
401
401
  const r = this.clone();
402
402
  return r.steps.push({ type: t, args: e }), r;
403
403
  };
404
- for (const t of ut)
405
- b.prototype[t] = async function(...e) {
404
+ for (const t of yt)
405
+ w.prototype[t] = async function(...e) {
406
406
  return (await this.clone().processData())[t](...e);
407
407
  };
408
- b.prototype.average = b.prototype.avg;
409
- b.prototype.first = async function() {
408
+ w.prototype.average = w.prototype.avg;
409
+ w.prototype.first = async function() {
410
410
  return this.take(1), (await this.processData()).first();
411
411
  };
412
- b.prototype._handleBatchData = function(t, e) {
412
+ w.prototype._handleBatchData = function(t, e) {
413
413
  return this._batchData ? (this.steps.push({ type: t, args: e }), this) : null;
414
414
  };
415
- b.prototype.where = function(...t) {
415
+ w.prototype.where = function(...t) {
416
416
  const e = this._handleBatchData("where", t);
417
417
  if (e) return e;
418
418
  if (t.length === 2)
@@ -444,71 +444,71 @@ b.prototype.where = function(...t) {
444
444
  }
445
445
  return this;
446
446
  };
447
- b.prototype.whereContains = function(t, e) {
447
+ w.prototype.whereContains = function(t, e) {
448
448
  const r = this._handleBatchData("whereContains", [t, e]);
449
449
  return r || (this.filters[t] = { contains: e }, this);
450
450
  };
451
- b.prototype.forPage = function(t, e) {
451
+ w.prototype.forPage = function(t, e) {
452
452
  return t = Math.max(1, t), this.already_limit ? (this.steps.push({ type: "forPage", args: [t, e] }), this) : (this.limit = e, this.offset = (t - 1) * e, this.already_limit = !0, this.already_offset = !0, this);
453
453
  };
454
- b.prototype.whereIn = function(t, e) {
454
+ w.prototype.whereIn = function(t, e) {
455
455
  const r = this._handleBatchData("whereIn", [t, e]);
456
456
  return r || (this.filters[t] = { in: e }, this);
457
457
  };
458
- b.prototype.whereNotIn = function(t, e) {
458
+ w.prototype.whereNotIn = function(t, e) {
459
459
  const r = this._handleBatchData("whereNotIn", [t, e]);
460
460
  return r || (this.filters[t] = { nin: e }, this);
461
461
  };
462
- b.prototype.whereNotBetween = function(t, e) {
462
+ w.prototype.whereNotBetween = function(t, e) {
463
463
  const r = this._handleBatchData("whereNotBetween", [t, e]);
464
464
  return r || (this.filters[t] = { notBetween: e }, this);
465
465
  };
466
- b.prototype.whereBetween = function(t, e) {
466
+ w.prototype.whereBetween = function(t, e) {
467
467
  const r = this._handleBatchData("whereBetween", [t, e]);
468
468
  return r || (this.filters[t] = { between: e }, this);
469
469
  };
470
- b.prototype.sortBy = function(t) {
470
+ w.prototype.sortBy = function(t) {
471
471
  return this.steps.push({ type: "sortBy", args: [t] }), typeof t == "string" && (this._sort = t), this;
472
472
  };
473
- b.prototype.sortByDesc = function(t) {
473
+ w.prototype.sortByDesc = function(t) {
474
474
  return this.steps.push({ type: "sortByDesc", args: [t] }), typeof t == "string" && (this._sort = t, this._sortDesc = !0), this;
475
475
  };
476
- b.prototype.skip = function(t) {
476
+ w.prototype.skip = function(t) {
477
477
  if (t < 0)
478
478
  throw new Error("Offset must be non-negative");
479
479
  return this.already_offset && this.steps.push({ type: "skip", args: [t] }), this.offset = t, this.already_offset = !0, this;
480
480
  };
481
- b.prototype.take = function(t) {
481
+ w.prototype.take = function(t) {
482
482
  if (t < 0)
483
483
  throw new Error("Length must be non-negative");
484
484
  return this.already_limit ? (this.steps.push({ type: "take", args: [t] }), this) : (this.limit = t, this.already_limit = !0, this);
485
485
  };
486
- b.prototype.splice = function(t, e) {
486
+ w.prototype.splice = function(t, e) {
487
487
  return this.steps.push({ type: "splice", args: [t, e] }), this.offset = t, this.limit = e, this.already_limit = !0, this.already_offset = !0, this;
488
488
  };
489
- const Z = (t, e, r = F) => {
490
- const s = new b(e);
491
- return s._queryFn = r, s.data_path = ct + t, s;
492
- }, V = (t, e = {}, r = {}) => {
493
- const s = r.mutation || g, n = r.createList || v, h = r.createCollection || Z, l = e;
494
- let f = "list" + t;
495
- const p = (o) => l[o] ? l[o] : null;
489
+ const st = (t, e, r = O) => {
490
+ const s = new w(e);
491
+ return s._queryFn = r, s.data_path = dt + t, s;
492
+ }, nt = (t, e = {}, r = {}) => {
493
+ const s = r.mutation || g, n = r.createList || G, f = r.createCollection || st, c = e;
494
+ let p = "list" + t;
495
+ const h = (o) => c[o] ? c[o] : null;
496
496
  return {
497
- field: p,
498
- $fields: l,
497
+ field: h,
498
+ $fields: c,
499
499
  setDataPath(o) {
500
- return f = o, f;
500
+ return p = o, p;
501
501
  },
502
502
  getDataPath() {
503
- return f;
503
+ return p;
504
504
  },
505
505
  gqlFields(o) {
506
506
  let i = {};
507
507
  for (const a of o)
508
508
  if (typeof a == "string") {
509
- const c = p(a);
510
- c && (i = U(i, c.gqlField ? typeof c.gqlField == "string" ? { [c.gqlField]: !0 } : c.gqlField : { [c.name || a]: !0 }));
511
- } else typeof a == "object" && (i = U(i, a));
509
+ const l = h(a);
510
+ l && (i = E(i, l.gqlField ? typeof l.gqlField == "string" ? { [l.gqlField]: !0 } : l.gqlField : { [l.name || a]: !0 }));
511
+ } else typeof a == "object" && (i = E(i, a));
512
512
  return i;
513
513
  },
514
514
  update(o, i) {
@@ -535,111 +535,111 @@ const Z = (t, e, r = F) => {
535
535
  fields(o) {
536
536
  let i = [];
537
537
  for (let a of o) {
538
- const c = p(a);
539
- c && i.push(c);
538
+ const l = h(a);
539
+ l && i.push(l);
540
540
  }
541
541
  return i;
542
542
  },
543
543
  async get(o, i) {
544
- const a = h(t, Zt(i));
545
- for (const [c, m] of Object.entries(o))
546
- a.where(c, "==", m);
544
+ const a = f(t, Kt(i));
545
+ for (const [l, m] of Object.entries(o))
546
+ a.where(l, "==", m);
547
547
  return await a.first();
548
548
  },
549
549
  list(o) {
550
550
  let i = o;
551
551
  const a = {};
552
- Object.entries(o).forEach(([w]) => {
553
- l[w] && (a[w] = l[w], l[w].gqlField && (delete i[w], i = U(i, l[w].gqlField)), l[w].gql && (delete i[w], i = U(i, l[w].gql)));
552
+ Object.entries(o).forEach(([d]) => {
553
+ c[d] && (a[d] = c[d], c[d].gqlField && (delete i[d], i = E(i, c[d].gqlField)), c[d].gql && (delete i[d], i = E(i, c[d].gql)));
554
554
  });
555
- const c = n(t, i).dataPath(f), m = c.fetch.bind(c);
555
+ const l = n(t, i).dataPath(p), m = l.fetch.bind(l);
556
556
  return {
557
- ...c,
557
+ ...l,
558
558
  async fetch() {
559
- return (await m()).map((u) => {
560
- const _ = { ...u };
561
- return Object.entries(a).forEach(([d, y]) => {
562
- y.field && typeof y.field == "function" && (_[d] = y.field(u[d], u));
563
- }), _;
559
+ return (await m()).map((b) => {
560
+ const P = { ...b };
561
+ return Object.entries(a).forEach(([k, U]) => {
562
+ U.field && typeof U.field == "function" && (P[k] = U.field(b[k], b));
563
+ }), P;
564
564
  });
565
565
  },
566
566
  async fetchFirst() {
567
- const u = await c.fetchFirst.bind(c)();
568
- if (!u) return u;
569
- const _ = { ...u };
570
- return Object.entries(a).forEach(([d, y]) => {
571
- y.field && typeof y.field == "function" && (_[d] = y.field(u[d], u));
572
- }), _;
567
+ const b = await l.fetchFirst.bind(l)();
568
+ if (!b) return b;
569
+ const P = { ...b };
570
+ return Object.entries(a).forEach(([k, U]) => {
571
+ U.field && typeof U.field == "function" && (P[k] = U.field(b[k], b));
572
+ }), P;
573
573
  }
574
574
  };
575
575
  }
576
576
  };
577
- }, D = {}, I = (t, e) => {
578
- const r = V(t, e);
577
+ }, D = {}, ot = (t, e) => {
578
+ const r = nt(t, e);
579
579
  return D[t] = r, r;
580
- }, q = (t) => D[t] ? D[t] : I(t, {}), re = (t) => !!D[t], se = () => Object.keys(D), ne = () => {
580
+ }, $ = (t) => D[t] ? D[t] : ot(t, {}), ae = (t) => !!D[t], ce = () => Object.keys(D), le = () => {
581
581
  Object.keys(D).forEach((t) => delete D[t]);
582
- }, oe = (t) => {
582
+ }, ue = (t) => {
583
583
  Object.entries(t).forEach(([e, r]) => {
584
- I(e, r);
584
+ ot(e, r);
585
585
  });
586
- }, ie = () => F({
586
+ }, he = () => O({
587
587
  app: {
588
588
  permissions: !0
589
589
  }
590
- }).then((t) => t.app.permissions), $ = (t, e) => {
590
+ }).then((t) => t.app.permissions), Y = (t, e) => {
591
591
  const r = async () => {
592
- const { app: l } = await t({
592
+ const { app: c } = await t({
593
593
  app: {
594
594
  auth: {
595
595
  webAuthnRequestOptions: !0
596
596
  }
597
597
  }
598
- }), f = l.auth.webAuthnRequestOptions, p = PublicKeyCredential.parseRequestOptionsFromJSON(f);
599
- return await navigator.credentials.get({ publicKey: p });
598
+ }), p = c.auth.webAuthnRequestOptions, h = PublicKeyCredential.parseRequestOptionsFromJSON(p);
599
+ return await navigator.credentials.get({ publicKey: h });
600
600
  }, s = async () => {
601
- const { app: l } = await t({
601
+ const { app: c } = await t({
602
602
  app: {
603
603
  auth: {
604
604
  webAuthnCreationOptions: !0
605
605
  }
606
606
  }
607
- }), f = PublicKeyCredential.parseCreationOptionsFromJSON(l.auth.webAuthnCreationOptions);
608
- return await navigator.credentials.create({ publicKey: f });
607
+ }), p = PublicKeyCredential.parseCreationOptionsFromJSON(c.auth.webAuthnCreationOptions);
608
+ return await navigator.credentials.create({ publicKey: p });
609
609
  };
610
610
  return { assertion: r, attestation: s, login: async () => {
611
- const l = await r();
611
+ const c = await r();
612
612
  return await e({
613
613
  webAuthnAssertion: {
614
614
  __args: {
615
- assertion: l.toJSON()
615
+ assertion: c.toJSON()
616
616
  }
617
617
  }
618
- }).then((f) => f.webAuthnAssertion);
618
+ }).then((p) => p.webAuthnAssertion);
619
619
  }, register: async () => {
620
- const l = await s();
620
+ const c = await s();
621
621
  return await e({
622
622
  webAuthnRegister: {
623
623
  __args: {
624
- registration: l.toJSON()
624
+ registration: c.toJSON()
625
625
  }
626
626
  }
627
- }).then((f) => f.webAuthnRegister);
627
+ }).then((p) => p.webAuthnRegister);
628
628
  } };
629
- }, N = $(F, g), pt = N.assertion, ft = N.attestation, gt = N.login, dt = N.register, _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
629
+ }, J = Y((t) => O(t), (t) => g(t)), wt = J.assertion, bt = J.attestation, mt = J.login, At = J.register, Ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
630
630
  __proto__: null,
631
- assertion: pt,
632
- attestation: ft,
633
- createWebAuthn: $,
634
- login: gt,
635
- register: dt
636
- }, Symbol.toStringTag, { value: "Module" })), yt = (t, e) => ({
637
- getCurrentUser: (r = B) => t({ my: r }).then((s) => s.my),
638
- login: (r, s, n = "") => e({ login: { __args: { username: r, password: s, code: n } } }).then((h) => h.login),
631
+ assertion: wt,
632
+ attestation: bt,
633
+ createWebAuthn: Y,
634
+ login: mt,
635
+ register: At
636
+ }, Symbol.toStringTag, { value: "Module" })), kt = (t, e) => ({
637
+ getCurrentUser: (r = Q) => t({ my: r }).then((s) => s.my),
638
+ login: (r, s, n = "") => e({ login: { __args: { username: r, password: s, code: n } } }).then((f) => f.login),
639
639
  logout: () => e({ logout: !0 }).then((r) => r.logout),
640
- changeExpiredPassword: (r, s, n) => e({ changeExpiredPassword: { __args: { username: r, old_password: s, new_password: n } } }).then((h) => h.changeExpiredPassword),
640
+ changeExpiredPassword: (r, s, n) => e({ changeExpiredPassword: { __args: { username: r, old_password: s, new_password: n } } }).then((f) => f.changeExpiredPassword),
641
641
  updatePassword: (r, s) => e({ changeUserPassword: { __args: { old_password: r, new_password: s } } }).then((n) => n.changeUserPassword),
642
- resetPassword: (r, s, n) => e({ resetPassword: { __args: { jwt: r, password: s, code: n } } }).then((h) => h.resetPassword),
642
+ resetPassword: (r, s, n) => e({ resetPassword: { __args: { jwt: r, password: s, code: n } } }).then((f) => f.resetPassword),
643
643
  forgetPassword: (r, s) => e({ forgetPassword: { __args: { username: r, email: s } } }).then((n) => n.forgetPassword),
644
644
  verifyCode: (r, s) => e({ forgetPasswordVerifyCode: { __args: { jwt: r, code: s } } }).then((n) => n.forgetPasswordVerifyCode),
645
645
  grantedRights: (r) => t({
@@ -648,7 +648,7 @@ const Z = (t, e, r = F) => {
648
648
  isGranted: (r) => t({
649
649
  my: { granted: { __args: { right: r } } }
650
650
  }).then((s) => s.my.granted),
651
- webAuthn: $(t, e),
651
+ webAuthn: Y(t, e),
652
652
  google: {
653
653
  unlink: () => e({ lightAuthUnlinkGoogle: !0 }).then((r) => r.lightAuthUnlinkGoogle),
654
654
  login: (r) => e({ lightAuthLoginGoogle: { __args: { credential: r } } }).then((s) => s.lightAuthLoginGoogle),
@@ -664,7 +664,7 @@ const Z = (t, e, r = F) => {
664
664
  login: (r) => e({ lightAuthLoginMicrosoft: { __args: { access_token: r } } }).then((s) => s.lightAuthLoginMicrosoft),
665
665
  register: (r) => e({ lightAuthRegisterMicrosoft: { __args: { account_id: r } } }).then((s) => s.lightAuthRegisterMicrosoft)
666
666
  }
667
- }), wt = (t = B) => F({ my: t }).then((e) => e.my), bt = (t, e, r = "") => g({ login: { __args: { username: t, password: e, code: r } } }).then((s) => s.login), mt = () => g({ logout: !0 }).then((t) => t.logout), Ft = (t, e, r) => g({ changeExpiredPassword: { __args: { username: t, old_password: e, new_password: r } } }).then((s) => s.changeExpiredPassword), At = (t, e) => g({ changeUserPassword: { __args: { old_password: t, new_password: e } } }).then((r) => r.changeUserPassword), Ct = (t, e, r) => g({ resetPassword: { __args: { jwt: t, password: e, code: r } } }).then((s) => s.resetPassword), Ot = (t, e) => g({ forgetPassword: { __args: { username: t, email: e } } }).then((r) => r.forgetPassword), Ut = (t, e) => g({ forgetPasswordVerifyCode: { __args: { jwt: t, code: e } } }).then((r) => r.forgetPasswordVerifyCode), kt = (t) => F({
667
+ }), Ot = (t = Q) => O({ my: t }).then((e) => e.my), Pt = (t, e, r = "") => g({ login: { __args: { username: t, password: e, code: r } } }).then((s) => s.login), Ut = () => g({ logout: !0 }).then((t) => t.logout), Ct = (t, e, r) => g({ changeExpiredPassword: { __args: { username: t, old_password: e, new_password: r } } }).then((s) => s.changeExpiredPassword), St = (t, e) => g({ changeUserPassword: { __args: { old_password: t, new_password: e } } }).then((r) => r.changeUserPassword), jt = (t, e, r) => g({ resetPassword: { __args: { jwt: t, password: e, code: r } } }).then((s) => s.resetPassword), Et = (t, e) => g({ forgetPassword: { __args: { username: t, email: e } } }).then((r) => r.forgetPassword), Mt = (t, e) => g({ forgetPasswordVerifyCode: { __args: { jwt: t, code: e } } }).then((r) => r.forgetPasswordVerifyCode), Dt = (t) => O({
668
668
  my: {
669
669
  granted: {
670
670
  __args: {
@@ -672,7 +672,7 @@ const Z = (t, e, r = F) => {
672
672
  }
673
673
  }
674
674
  }
675
- }).then((e) => e.my.granted), Dt = (t) => F({
675
+ }).then((e) => e.my.granted), qt = (t) => O({
676
676
  my: {
677
677
  grantedRights: {
678
678
  __args: {
@@ -680,9 +680,9 @@ const Z = (t, e, r = F) => {
680
680
  }
681
681
  }
682
682
  }
683
- }).then((e) => e.my.grantedRights), ae = {
684
- getCurrentUser: wt,
685
- webAuthn: _t,
683
+ }).then((e) => e.my.grantedRights), fe = {
684
+ getCurrentUser: Ot,
685
+ webAuthn: Ft,
686
686
  google: {
687
687
  unlink: () => g({ lightAuthUnlinkGoogle: !0 }).then((t) => t.lightAuthUnlinkGoogle),
688
688
  login: (t) => g({ lightAuthLoginGoogle: { __args: { credential: t } } }).then((e) => e.lightAuthLoginGoogle),
@@ -698,153 +698,22 @@ const Z = (t, e, r = F) => {
698
698
  login: (t) => g({ lightAuthLoginMicrosoft: { __args: { access_token: t } } }).then((e) => e.lightAuthLoginMicrosoft),
699
699
  register: (t) => g({ lightAuthRegisterMicrosoft: { __args: { account_id: t } } }).then((e) => e.lightAuthRegisterMicrosoft)
700
700
  },
701
- login: bt,
702
- logout: mt,
703
- changeExpiredPassword: Ft,
704
- updatePassword: At,
705
- resetPassword: Ct,
706
- forgetPassword: Ot,
707
- verifyCode: Ut,
708
- grantedRights: Dt,
709
- isGranted: kt
710
- }, K = {
711
- name: !0,
712
- path: !0,
713
- size: !0,
714
- mime: !0,
715
- url: !0
716
- }, le = (t, e, r = K) => F({
717
- app: {
718
- drive: {
719
- __args: { index: t },
720
- files: {
721
- __args: { path: e },
722
- ...r
723
- }
724
- }
725
- }
726
- }).then((s) => s.app.drive.files), ce = (t, e) => F({
727
- app: {
728
- drive: {
729
- __args: {
730
- index: t
731
- },
732
- file: {
733
- __args: {
734
- path: e
735
- },
736
- base64Content: !0
737
- }
738
- }
739
- }
740
- }).then((r) => r.app.drive?.file?.base64Content), Pt = (t, e = F, r = g) => ({
741
- list: (s, n = K) => e({ app: { drive: { __args: { index: t }, files: { __args: { path: s }, ...n } } } }).then((h) => h.app.drive.files),
742
- get: (s, n = {
743
- name: !0,
744
- path: !0,
745
- size: !0,
746
- mime: !0,
747
- url: !0
748
- }) => e({
749
- app: {
750
- drive: {
751
- __args: {
752
- index: t
753
- },
754
- file: {
755
- __args: {
756
- path: s
757
- },
758
- ...n
759
- }
760
- }
761
- }
762
- }).then((h) => h.app.drive.file),
763
- readFileAsBase64(s) {
764
- return e({ app: { drive: { __args: { index: t }, file: { __args: { path: s }, base64Content: !0 } } } }).then((n) => n.app.drive?.file?.base64Content);
765
- },
766
- read: async (s) => {
767
- let n = await e({
768
- app: {
769
- drive: {
770
- __args: {
771
- index: t
772
- },
773
- file: {
774
- __args: {
775
- path: s
776
- },
777
- base64Content: !0
778
- }
779
- }
780
- }
781
- });
782
- if (!n.app.drive.file || !n.app.drive.file.base64Content)
783
- throw new Error(`File not found or cannot read content: ${s}`);
784
- return typeof window < "u" && window.atob ? window.atob(n.app.drive.file.base64Content) : n.app.drive.file.base64Content;
785
- },
786
- write: (s, n) => r({ lightDriveWriteFile: { __args: { index: t, path: s, content: n } } }).then((h) => h.lightDriveWriteFile),
787
- delete: (s) => r({ lightDriveDeleteFile: { __args: { index: t, path: s } } }).then((n) => n.lightDriveDeleteFile),
788
- rename: (s, n) => r({ lightDriveRenameFile: { __args: { index: t, path: s, name: n } } }).then((h) => h.lightDriveRenameFile),
789
- move: (s, n) => r({ lightDriveMoveFile: { __args: { index: t, source: s, destination: n } } }).then((h) => h.lightDriveMoveFile)
790
- }), x = {
791
- name: !0,
792
- path: !0
793
- }, he = (t, e, r = x) => F({
794
- app: {
795
- drive: {
796
- __args: { index: t },
797
- folders: {
798
- __args: { path: e },
799
- ...r
800
- }
801
- }
802
- }
803
- }).then((s) => s.app.drive.folders), St = (t, e = F, r = g) => ({
804
- list: (s, n = x) => e({ app: { drive: { __args: { index: t }, folders: { __args: { path: s }, ...n } } } }).then((h) => h.app.drive.folders),
805
- create: (s) => r({ lightDriveCreateFolder: { __args: { index: t, path: s } } }).then((n) => n.lightDriveCreateFolder),
806
- delete: (s) => r({ lightDriveDeleteFolder: { __args: { index: t, path: s } } }).then((n) => n.lightDriveDeleteFolder),
807
- rename: (s, n) => r({ lightDriveRenameFolder: { __args: { index: t, path: s, name: n } } }).then((h) => h.lightDriveRenameFolder)
808
- }), ue = () => F({
809
- app: {
810
- drives: {
811
- index: !0,
812
- name: !0
813
- }
814
- }
815
- }).then((t) => t.app.drives), pe = (t) => tt(F, g)(t), tt = (t, e) => (r) => {
816
- const s = Pt(r, t, e), n = St(r, t, e);
817
- return {
818
- folders: n,
819
- files: s,
820
- listFiles: s.list,
821
- getFile: s.get,
822
- readFile: s.read,
823
- writeFile: s.write,
824
- deleteFile: s.delete,
825
- renameFile: s.rename,
826
- moveFile: s.move,
827
- listFolders: n.list,
828
- createFolder: n.create,
829
- deleteFolder: n.delete,
830
- renameFolder: n.rename,
831
- uploadTempFile: (h) => e({
832
- lightDriveUploadTempFile: {
833
- __args: { index: r, file: h },
834
- name: !0,
835
- path: !0,
836
- size: !0,
837
- mime: !0
838
- }
839
- }).then((l) => l.lightDriveUploadTempFile)
840
- };
841
- }, B = {
701
+ login: Pt,
702
+ logout: Ut,
703
+ changeExpiredPassword: Ct,
704
+ updatePassword: St,
705
+ resetPassword: jt,
706
+ forgetPassword: Et,
707
+ verifyCode: Mt,
708
+ grantedRights: qt,
709
+ isGranted: Dt
710
+ }, Q = {
842
711
  user_id: !0,
843
712
  username: !0,
844
713
  first_name: !0,
845
714
  last_name: !0,
846
715
  status: !0
847
- }, fe = (t) => g({
716
+ }, pe = (t) => g({
848
717
  addUser: {
849
718
  __args: t
850
719
  }
@@ -852,12 +721,12 @@ const Z = (t, e, r = F) => {
852
721
  deleteUser: {
853
722
  __args: { id: t }
854
723
  }
855
- }).then((e) => e.deleteUser), de = (t = B) => v("Users", t).dataPath("app.listUser").fetch(), _e = (t, e) => g({
724
+ }).then((e) => e.deleteUser), de = (t = Q) => G("Users", t).dataPath("app.listUser").fetch(), _e = (t, e) => g({
856
725
  updateUser: {
857
726
  __args: { id: t, data: e }
858
727
  }
859
- }).then((r) => r.updateUser), jt = (t, e) => ({
860
- list: (r = B) => e("Users", r).dataPath("app.listUser").fetch(),
728
+ }).then((r) => r.updateUser), Nt = (t, e) => ({
729
+ list: (r = Q) => e("Users", r).dataPath("app.listUser").fetch(),
861
730
  create: (r) => t({
862
731
  addUser: { __args: r }
863
732
  }).then((s) => s.addUser),
@@ -867,7 +736,7 @@ const Z = (t, e, r = F) => {
867
736
  update: (r, s) => t({
868
737
  updateUser: { __args: { id: r, data: s } }
869
738
  }).then((n) => n.updateUser)
870
- }), et = (t) => (e) => t({
739
+ }), it = (t) => (e) => t({
871
740
  app: {
872
741
  listConfig: {
873
742
  __args: {
@@ -881,9 +750,9 @@ const Z = (t, e, r = F) => {
881
750
  }
882
751
  }
883
752
  }
884
- }).then((r) => r.app.listConfig.data[0]?.value), ye = et(F), rt = {
753
+ }).then((r) => r.app.listConfig.data[0]?.value), ye = it(O), at = {
885
754
  name: !0
886
- }, we = (t = rt) => F({
755
+ }, we = (t = at) => O({
887
756
  app: {
888
757
  roles: t
889
758
  }
@@ -900,8 +769,8 @@ const Z = (t, e, r = F) => {
900
769
  deleteRole: {
901
770
  __args: { name: t }
902
771
  }
903
- }).then((e) => e.deleteRole), Et = (t, e) => ({
904
- list: (r = rt) => t({
772
+ }).then((e) => e.deleteRole), Tt = (t, e) => ({
773
+ list: (r = at) => t({
905
774
  app: { roles: r }
906
775
  }).then((s) => s.app.roles),
907
776
  create: (r, s) => e({
@@ -911,96 +780,96 @@ const Z = (t, e, r = F) => {
911
780
  deleteRole: { __args: { name: r } }
912
781
  }).then((s) => s.deleteRole)
913
782
  });
914
- function G(t) {
783
+ function X(t) {
915
784
  if (Array.isArray(t))
916
- return t.map((e) => G(e)).filter((e) => e !== void 0);
785
+ return t.map((e) => X(e)).filter((e) => e !== void 0);
917
786
  if (t !== null && typeof t == "object") {
918
787
  const e = Object.getPrototypeOf(t);
919
788
  if (e === Object.prototype || e === null)
920
789
  return Object.fromEntries(
921
- Object.entries(t).filter(([, r]) => r !== void 0).map(([r, s]) => [r, G(s)])
790
+ Object.entries(t).filter(([, r]) => r !== void 0).map(([r, s]) => [r, X(s)])
922
791
  );
923
792
  }
924
793
  return t;
925
794
  }
926
- function st(t, e, r, s, n) {
795
+ function ct(t, e, r, s, n) {
927
796
  if (!(!t || typeof t != "object"))
928
- for (let h in t) {
929
- const l = t[h];
930
- if (l && typeof l == "object") {
931
- if ("__args" in l) {
932
- const f = G(l.__args), p = {};
933
- Object.entries(f).forEach(([o, i]) => {
934
- if (i instanceof Array && S(i)) {
935
- p[o] = new O(o);
797
+ for (let f in t) {
798
+ const c = t[f];
799
+ if (c && typeof c == "object") {
800
+ if ("__args" in c) {
801
+ const p = X(c.__args), h = {};
802
+ Object.entries(p).forEach(([o, i]) => {
803
+ if (i instanceof Array && T(i)) {
804
+ h[o] = new j(o);
936
805
  let a = 0;
937
- i.forEach((c) => {
938
- c instanceof File && (r[n.current] || (r[n.current] = []), r[n.current].push("variables." + o + "." + a), s.append(n.current.toString(), c), n.current++, a++);
806
+ i.forEach((l) => {
807
+ l instanceof File && (r[n.current] || (r[n.current] = []), r[n.current].push("variables." + o + "." + a), s.append(n.current.toString(), l), n.current++, a++);
939
808
  }), e[o] = "[Upload!]!";
940
- } else i instanceof File ? (p[o] = new O(o), r[n.current] = ["variables." + o], s.append(n.current.toString(), i), e[o] = "Upload!", n.current++) : i instanceof Object && W(i) ? (p[o] = {}, Object.entries(i).forEach(([a, c]) => {
941
- if (c instanceof Array && S(c)) {
942
- p[o][a] = new O(a);
809
+ } else i instanceof File ? (h[o] = new j(o), r[n.current] = ["variables." + o], s.append(n.current.toString(), i), e[o] = "Upload!", n.current++) : i instanceof Object && K(i) ? (h[o] = {}, Object.entries(i).forEach(([a, l]) => {
810
+ if (l instanceof Array && T(l)) {
811
+ h[o][a] = new j(a);
943
812
  let m = 0;
944
- c.forEach((w) => {
945
- w instanceof File && (r[n.current] || (r[n.current] = []), r[n.current].push("variables." + a + "." + m), s.append(n.current.toString(), w), n.current++, m++);
813
+ l.forEach((d) => {
814
+ d instanceof File && (r[n.current] || (r[n.current] = []), r[n.current].push("variables." + a + "." + m), s.append(n.current.toString(), d), n.current++, m++);
946
815
  }), e[a] = "[Upload!]!";
947
- } else c instanceof File ? (p[o][a] = new O(a), r[n.current] = ["variables." + a], s.append(n.current.toString(), c), e[a] = "Upload!", n.current++) : p[o][a] = c;
948
- })) : i != null && (p[o] = i);
949
- }), l.__args = p;
816
+ } else l instanceof File ? (h[o][a] = new j(a), r[n.current] = ["variables." + a], s.append(n.current.toString(), l), e[a] = "Upload!", n.current++) : h[o][a] = l;
817
+ })) : i != null && (h[o] = i);
818
+ }), c.__args = h;
950
819
  }
951
- st(l, e, r, s, n);
820
+ ct(c, e, r, s, n);
952
821
  }
953
822
  }
954
823
  }
955
- const nt = (t) => async (e) => {
824
+ const lt = (t) => async (e) => {
956
825
  const r = e, s = new FormData();
957
826
  let n = !1;
958
- const h = {}, l = {};
959
- st(r, h, l, s, { current: 0 }), n = Object.keys(h).length > 0, n && (r.__variables = h);
960
- let p = null;
961
- const i = Q({ mutation: r });
962
- if (n ? (s.append("map", JSON.stringify(l)), s.append("operations", JSON.stringify({
827
+ const f = {}, c = {};
828
+ ct(r, f, c, s, { current: 0 }), n = Object.keys(f).length > 0, n && (r.__variables = f);
829
+ let h = null;
830
+ const i = x({ mutation: r });
831
+ if (n ? (s.append("map", JSON.stringify(c)), s.append("operations", JSON.stringify({
963
832
  query: i
964
- })), p = await t.post("", s)) : p = await t.post("", {
833
+ })), h = await t.post("", s)) : h = await t.post("", {
965
834
  query: i
966
- }), p.data.errors)
967
- throw new Error(p.data.errors[0].message);
968
- return p.data.data;
969
- }, g = async (t) => nt(z().axios)(t), Fe = (t, e, r) => g({ sendMail: { __args: { email: t, subject: e, message: r } } }).then((s) => s.sendMail), Mt = (t) => ({
835
+ }), h.data.errors)
836
+ throw new Error(h.data.errors[0].message);
837
+ return h.data.data;
838
+ }, g = async (t) => lt(I().axios)(t), Ae = (t, e, r) => g({ sendMail: { __args: { email: t, subject: e, message: r } } }).then((s) => s.sendMail), Bt = (t) => ({
970
839
  send: (e, r, s) => t({ sendMail: { __args: { email: e, subject: r, message: s } } }).then((n) => n.sendMail)
971
- }), vt = (t) => g({
840
+ }), Lt = (t) => g({
972
841
  lightFSCreateFolder: {
973
842
  __args: { location: t }
974
843
  }
975
- }).then((e) => e.lightFSCreateFolder), Nt = (t) => g({
844
+ }).then((e) => e.lightFSCreateFolder), Rt = (t) => g({
976
845
  lightFSDeleteFolder: {
977
846
  __args: { location: t }
978
847
  }
979
- }).then((e) => e.lightFSDeleteFolder), Bt = (t, e) => g({
848
+ }).then((e) => e.lightFSDeleteFolder), Gt = (t, e) => g({
980
849
  lightFSRenameFolder: {
981
850
  __args: { location: t, newName: e }
982
851
  }
983
- }).then((r) => r.lightFSRenameFolder), Rt = (t, e) => g({
852
+ }).then((r) => r.lightFSRenameFolder), Jt = (t, e) => g({
984
853
  lightFSRenameFile: {
985
854
  __args: { location: t, newName: e }
986
855
  }
987
- }).then((r) => r.lightFSRenameFile), qt = (t, e) => g({
856
+ }).then((r) => r.lightFSRenameFile), Qt = (t, e) => g({
988
857
  lightFSWriteFile: {
989
858
  __args: { location: t, content: e }
990
859
  }
991
- }).then((r) => r.lightFSWriteFile), Lt = (t, e, r = !1) => g({
860
+ }).then((r) => r.lightFSWriteFile), zt = (t, e, r = !1) => g({
992
861
  lightFSUploadFile: {
993
862
  __args: { location: t, file: e, rename: r }
994
863
  }
995
- }).then((s) => s.lightFSUploadFile), Tt = (t) => g({
864
+ }).then((s) => s.lightFSUploadFile), $t = (t) => g({
996
865
  lightFSDeleteFile: {
997
866
  __args: { location: t }
998
867
  }
999
- }).then((e) => e.lightFSDeleteFile), Gt = (t, e) => g({
868
+ }).then((e) => e.lightFSDeleteFile), Wt = (t, e) => g({
1000
869
  lightFSMove: {
1001
870
  __args: { from: t, to: e }
1002
871
  }
1003
- }).then((r) => r.lightFSMove), Jt = (t) => F({
872
+ }).then((r) => r.lightFSMove), Ht = (t) => O({
1004
873
  app: {
1005
874
  fs: {
1006
875
  exists: {
@@ -1008,9 +877,9 @@ const nt = (t) => async (e) => {
1008
877
  }
1009
878
  }
1010
879
  }
1011
- }).then((e) => e.app.fs.exists), $t = (t, e) => {
880
+ }).then((e) => e.app.fs.exists), Xt = (t, e) => {
1012
881
  const r = {};
1013
- return t && (r.search = t), e && (r.label = e), F({
882
+ return t && (r.search = t), e && (r.label = e), O({
1014
883
  app: {
1015
884
  fs: {
1016
885
  find: {
@@ -1032,7 +901,7 @@ const nt = (t) => async (e) => {
1032
901
  }
1033
902
  }
1034
903
  }).then((s) => s.app.fs.find);
1035
- }, Qt = (t) => F({
904
+ }, vt = (t) => O({
1036
905
  app: {
1037
906
  fs: {
1038
907
  node: {
@@ -1062,7 +931,7 @@ const nt = (t) => async (e) => {
1062
931
  }
1063
932
  }
1064
933
  }
1065
- }).then((r) => r.app.fs.node), zt = (t, e = "text") => F({
934
+ }).then((r) => r.app.fs.node), Yt = (t, e = "text") => O({
1066
935
  app: {
1067
936
  fs: {
1068
937
  node: {
@@ -1079,7 +948,7 @@ const nt = (t) => async (e) => {
1079
948
  }).then((r) => {
1080
949
  const s = r.app.fs.node;
1081
950
  return s?.__typename === "File" ? e === "text" ? s.content : s.base64Content : null;
1082
- }), Wt = (t, e) => g({
951
+ }), Zt = (t, e) => g({
1083
952
  lightFSUploadBase64: {
1084
953
  __args: { location: t, base64: e },
1085
954
  __typename: !0,
@@ -1093,11 +962,11 @@ const nt = (t) => async (e) => {
1093
962
  lastModified: !0
1094
963
  }]
1095
964
  }
1096
- }).then((r) => r.lightFSUploadBase64), Ht = (t) => g({
965
+ }).then((r) => r.lightFSUploadBase64), Vt = (t) => g({
1097
966
  lightFSDuplicateFile: {
1098
967
  __args: { location: t }
1099
968
  }
1100
- }).then((e) => e.lightFSDuplicateFile), Xt = (t, e) => g({
969
+ }).then((e) => e.lightFSDuplicateFile), xt = (t, e) => g({
1101
970
  lightFSUploadTempFile: {
1102
971
  __args: { location: t, file: e },
1103
972
  name: !0,
@@ -1106,9 +975,9 @@ const nt = (t) => async (e) => {
1106
975
  size: !0,
1107
976
  mimeType: !0
1108
977
  }
1109
- }).then((r) => r.lightFSUploadTempFile), Yt = (t, e, r) => {
978
+ }).then((r) => r.lightFSUploadTempFile), It = (t, e, r) => {
1110
979
  const s = { location: t };
1111
- return e && (s.type = e), r && (s.search = r), F({
980
+ return e && (s.type = e), r && (s.search = r), O({
1112
981
  app: {
1113
982
  fs: {
1114
983
  listFiles: {
@@ -1124,28 +993,28 @@ const nt = (t) => async (e) => {
1124
993
  }
1125
994
  }
1126
995
  }).then((n) => n.app.fs.listFiles);
1127
- }, Ae = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
996
+ }, Fe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1128
997
  __proto__: null,
1129
- createFolder: vt,
1130
- deleteFile: Tt,
1131
- deleteFolder: Nt,
1132
- duplicateFile: Ht,
1133
- exists: Jt,
1134
- find: $t,
1135
- list: Qt,
1136
- listFiles: Yt,
1137
- move: Gt,
1138
- readFile: zt,
1139
- renameFile: Rt,
1140
- renameFolder: Bt,
1141
- uploadBase64: Wt,
1142
- uploadFile: Lt,
1143
- uploadTempFile: Xt,
1144
- writeFile: qt
1145
- }, Symbol.toStringTag, { value: "Module" })), J = (t) => {
998
+ createFolder: Lt,
999
+ deleteFile: $t,
1000
+ deleteFolder: Rt,
1001
+ duplicateFile: Vt,
1002
+ exists: Ht,
1003
+ find: Xt,
1004
+ list: vt,
1005
+ listFiles: It,
1006
+ move: Wt,
1007
+ readFile: Yt,
1008
+ renameFile: Jt,
1009
+ renameFolder: Gt,
1010
+ uploadBase64: Zt,
1011
+ uploadFile: zt,
1012
+ uploadTempFile: xt,
1013
+ writeFile: Qt
1014
+ }, Symbol.toStringTag, { value: "Module" })), v = (t) => {
1146
1015
  let e = {};
1147
1016
  return typeof t == "string" ? (e[t] = !0, e) : t instanceof Array ? (t.forEach((r) => {
1148
- Object.entries(J(r)).forEach(([s, n]) => {
1017
+ Object.entries(v(r)).forEach(([s, n]) => {
1149
1018
  e[s] = n;
1150
1019
  });
1151
1020
  }), e) : (Object.entries(t).forEach(([r, s]) => {
@@ -1157,168 +1026,220 @@ const nt = (t) => async (e) => {
1157
1026
  e[r] = s;
1158
1027
  return;
1159
1028
  }
1160
- e[r] = J(s);
1029
+ e[r] = v(s);
1161
1030
  }), e);
1162
- }, Zt = (t) => J(t), Ce = (t) => {
1031
+ }, Kt = (t) => v(t), ke = (t) => {
1163
1032
  const e = typeof window > "u";
1164
- let r = [];
1165
- const s = ot.create({
1033
+ let r = [], s = null, n = null, f = null, c = null;
1034
+ const p = /* @__PURE__ */ new Set(), h = ht.create({
1166
1035
  baseURL: t,
1167
1036
  withCredentials: !0
1037
+ }), o = async () => s && !te(s) || !n ? s : (f ??= n().then((u) => (s = u, u)).finally(() => {
1038
+ f = null;
1039
+ }), f);
1040
+ h.interceptors.request.use(async (u) => {
1041
+ const _ = await o();
1042
+ return _ && (u.headers.Authorization = `Bearer ${_}`), u;
1168
1043
  });
1169
- let n = !1, h = [];
1044
+ let i = !1, a = [];
1170
1045
  const l = (u, _ = null) => {
1171
- h.forEach((d) => {
1172
- u ? d.reject(u) : d.resolve(_);
1173
- }), h = [];
1046
+ a.forEach((y) => {
1047
+ u ? y.reject(u) : y.resolve(_);
1048
+ }), a = [];
1174
1049
  };
1175
- s.interceptors.response.use(
1050
+ h.interceptors.response.use(
1176
1051
  (u) => {
1177
1052
  const _ = u.data.errors;
1178
- if (_ && _.some((d) => d.extensions?.code === "TOKEN_EXPIRED")) {
1179
- const d = u.config;
1180
- return n ? new Promise((y, A) => {
1181
- h.push({ resolve: y, reject: A });
1182
- }).then(() => s(d)).catch((y) => Promise.reject(y)) : (n = !0, f().then(() => (n = !1, l(null), s(d))).catch((y) => (n = !1, l(y), Promise.reject(y))));
1053
+ if (_ && _.some((y) => y.extensions?.code === "TOKEN_EXPIRED")) {
1054
+ const y = u.config;
1055
+ return y._lightTokenRetried ? u : (y._lightTokenRetried = !0, n && (s = null), i ? new Promise((A, F) => {
1056
+ a.push({ resolve: A, reject: F });
1057
+ }).then(() => h(y)).catch((A) => Promise.reject(A)) : (i = !0, m().then(() => (i = !1, l(null), h(y))).catch((A) => (i = !1, l(A), Promise.reject(A)))));
1183
1058
  }
1184
1059
  return u;
1185
1060
  },
1186
1061
  (u) => Promise.reject(u)
1187
1062
  );
1188
- function f() {
1189
- return s.post("/refresh_token");
1063
+ function m() {
1064
+ return n ? o().then(() => {
1065
+ }) : h.post("/refresh_token");
1190
1066
  }
1191
- e && (s.interceptors.request.use((u) => (u.withCredentials = !0, r.length > 0 && (u.headers.Cookie = r.join("; ")), u)), s.interceptors.response.use((u) => {
1067
+ e && (h.interceptors.request.use((u) => (u.withCredentials = !0, r.length > 0 && (u.headers.Cookie = r.join("; ")), u)), h.interceptors.response.use((u) => {
1192
1068
  if (u.headers["set-cookie"]) {
1193
- const _ = u.headers["set-cookie"].map((y) => y.split(";")[0]), d = /* @__PURE__ */ new Map();
1194
- r.forEach((y) => {
1195
- const A = y.split("=")[0];
1196
- d.set(A, y);
1197
- }), _.forEach((y) => {
1198
- const A = y.split("=")[0];
1199
- d.set(A, y);
1200
- }), r = Array.from(d.values());
1069
+ const _ = u.headers["set-cookie"].map((A) => A.split(";")[0]), y = /* @__PURE__ */ new Map();
1070
+ r.forEach((A) => {
1071
+ const F = A.split("=")[0];
1072
+ y.set(F, A);
1073
+ }), _.forEach((A) => {
1074
+ const F = A.split("=")[0];
1075
+ y.set(F, A);
1076
+ }), r = Array.from(y.values());
1201
1077
  }
1202
1078
  return u;
1203
1079
  }));
1204
- const p = Y(s), o = nt(s), i = (u, _) => v(u, _, p), a = (u, _) => Z(u, _, p), c = (u) => {
1205
- const _ = q(u), d = V(u, _.$fields, {
1206
- mutation: o,
1207
- createList: i,
1208
- createCollection: a
1080
+ const d = rt(h), b = lt(h), P = (u, _) => G(u, _, d), k = (u, _) => st(u, _, d), U = (u) => {
1081
+ const _ = $(u), y = nt(u, _.$fields, {
1082
+ mutation: b,
1083
+ createList: P,
1084
+ createCollection: k
1209
1085
  });
1210
- return d.setDataPath(_.getDataPath()), d;
1211
- }, m = yt(p, o), w = {
1212
- post: s.post.bind(s),
1086
+ return y.setDataPath(_.getDataPath()), y;
1087
+ }, C = kt(d, b), Z = () => p.forEach((u) => u()), N = (u) => (async (..._) => {
1088
+ const y = await u(..._);
1089
+ return Z(), y;
1090
+ }), ut = {
1091
+ ...C,
1092
+ login: N(C.login),
1093
+ logout: (async () => {
1094
+ try {
1095
+ return await C.logout();
1096
+ } finally {
1097
+ Z();
1098
+ }
1099
+ }),
1100
+ google: { ...C.google, login: N(C.google.login) },
1101
+ facebook: { ...C.facebook, login: N(C.facebook.login) },
1102
+ microsoft: { ...C.microsoft, login: N(C.microsoft.login) },
1103
+ webAuthn: { ...C.webAuthn, login: N(C.webAuthn.login) }
1104
+ }, V = {
1105
+ post: h.post.bind(h),
1213
1106
  baseURL: t,
1214
- axios: s,
1215
- auth: m,
1216
- mutation: o,
1217
- query: p,
1218
- config: et(p),
1219
- mail: Mt(o),
1220
- users: jt(o, i),
1107
+ axios: h,
1108
+ setAccessToken(u) {
1109
+ s = u;
1110
+ },
1111
+ getAccessToken() {
1112
+ return s;
1113
+ },
1114
+ clearAccessToken() {
1115
+ s = null;
1116
+ },
1117
+ setAccessTokenProvider(u) {
1118
+ c?.(), c = null, n = u, s = null, f = null;
1119
+ },
1120
+ onAuthChange(u) {
1121
+ return p.add(u), () => p.delete(u);
1122
+ },
1123
+ useAudience(u, _) {
1124
+ c?.(), n = async () => (await u.mutation({
1125
+ createAudienceAccessToken: {
1126
+ __args: { audience: _ }
1127
+ }
1128
+ })).createAudienceAccessToken, s = null, f = null, c = u.onAuthChange(() => {
1129
+ s = null, f = null;
1130
+ });
1131
+ },
1132
+ auth: ut,
1133
+ mutation: b,
1134
+ query: d,
1135
+ config: it(d),
1136
+ mail: Bt(b),
1137
+ users: Nt(b, P),
1221
1138
  model(u) {
1222
- return c(u);
1139
+ return U(u);
1223
1140
  },
1224
- roles: Et(p, o),
1141
+ roles: Tt(d, b),
1225
1142
  collect: (u, _) => {
1226
- const d = a(u, _);
1227
- return d.data_path = q(u).getDataPath(), d;
1143
+ const y = k(u, _);
1144
+ return y.data_path = $(u).getDataPath(), y;
1228
1145
  },
1229
- list: (u, _) => i(u, _).dataPath(q(u).getDataPath()),
1146
+ list: (u, _) => P(u, _).dataPath($(u).getDataPath()),
1230
1147
  /**
1231
1148
  * @deprecated Use `fs.*` from `filesystem` instead.
1232
1149
  */
1233
- drive: tt(p, o),
1234
1150
  async collects(u) {
1235
- const _ = {}, d = {};
1236
- for (const A in u) {
1237
- const k = u[A].getQueryPayload();
1238
- d[A] = k.data_path, _[A] = {};
1239
- const P = k.data_path.split(".");
1240
- let j = P[P.length - 1], C = _[A];
1241
- for (const E of P) {
1242
- if (E === j) {
1243
- C[E] = k.query;
1151
+ const _ = {}, y = {};
1152
+ for (const F in u) {
1153
+ const M = u[F].getQueryPayload();
1154
+ y[F] = M.data_path, _[F] = {};
1155
+ const q = M.data_path.split(".");
1156
+ let B = q[q.length - 1], S = _[F];
1157
+ for (const L of q) {
1158
+ if (L === B) {
1159
+ S[L] = M.query;
1244
1160
  break;
1245
1161
  }
1246
- C[E] = C[E] || {};
1162
+ S[L] = S[L] || {};
1247
1163
  }
1248
- _[A].__aliasFor = P[0];
1164
+ _[F].__aliasFor = q[0];
1249
1165
  }
1250
- const y = await p(_);
1251
- for (const A in u) {
1252
- const k = d[A].split(".");
1253
- let P = k[k.length - 1], j = y[A];
1254
- for (const C of k) {
1255
- if (C === P) {
1256
- u[A]._batchData = y[A][C];
1166
+ const A = await d(_);
1167
+ for (const F in u) {
1168
+ const M = y[F].split(".");
1169
+ let q = M[M.length - 1], B = A[F];
1170
+ for (const S of M) {
1171
+ if (S === q) {
1172
+ u[F]._batchData = A[F][S];
1257
1173
  break;
1258
1174
  }
1259
- j[C] = j[C] || {};
1175
+ B[S] = B[S] || {};
1260
1176
  }
1261
1177
  }
1262
1178
  return u;
1263
1179
  }
1264
1180
  };
1265
- return at(w), w;
1266
- }, Oe = v;
1181
+ return pt(V), V;
1182
+ };
1183
+ function te(t, e = 30) {
1184
+ try {
1185
+ const r = t.split(".")[1];
1186
+ if (!r) return !0;
1187
+ const s = r.replace(/-/g, "+").replace(/_/g, "/"), n = s.padEnd(Math.ceil(s.length / 4) * 4, "="), f = JSON.parse(globalThis.atob(n));
1188
+ return typeof f.exp == "number" ? f.exp <= Math.floor(Date.now() / 1e3) + e : !1;
1189
+ } catch {
1190
+ return !0;
1191
+ }
1192
+ }
1193
+ const Oe = G;
1267
1194
  export {
1268
- S as arrayHasFile,
1269
- ae as auth,
1270
- Ft as changeExpiredPassword,
1271
- ne as clearModels,
1272
- yt as createAuth,
1273
- Ce as createClient,
1274
- Z as createCollection,
1275
- et as createConfig,
1276
- tt as createDrive,
1277
- te as createFileFromBase64,
1278
- ee as createFileFromBase85,
1279
- H as createFileFromString,
1280
- v as createList,
1281
- Mt as createMail,
1195
+ T as arrayHasFile,
1196
+ fe as auth,
1197
+ Ct as changeExpiredPassword,
1198
+ le as clearModels,
1199
+ kt as createAuth,
1200
+ ke as createClient,
1201
+ st as createCollection,
1202
+ it as createConfig,
1203
+ oe as createFileFromBase64,
1204
+ ie as createFileFromBase85,
1205
+ tt as createFileFromString,
1206
+ G as createList,
1207
+ Bt as createMail,
1282
1208
  be as createRole,
1283
- Et as createRoles,
1284
- fe as createUser,
1285
- jt as createUsers,
1286
- B as defaultUserFields,
1287
- I as defineModel,
1288
- oe as defineModels,
1209
+ Tt as createRoles,
1210
+ pe as createUser,
1211
+ Nt as createUsers,
1212
+ Q as defaultUserFields,
1213
+ ot as defineModel,
1214
+ ue as defineModels,
1289
1215
  me as deleteRole,
1290
1216
  ge as deleteUser,
1291
- Ot as forgetPassword,
1292
- Ae as fs,
1293
- z as getApiClient,
1294
- xt as getApiClientOptional,
1217
+ Et as forgetPassword,
1218
+ Fe as fs,
1219
+ I as getApiClient,
1220
+ ne as getApiClientOptional,
1295
1221
  ye as getConfig,
1296
- wt as getCurrentUser,
1297
- pe as getDrive,
1298
- Dt as getGrantedRights,
1299
- q as getModel,
1300
- re as hasModel,
1301
- kt as isGranted,
1222
+ Ot as getCurrentUser,
1223
+ qt as getGrantedRights,
1224
+ $ as getModel,
1225
+ ae as hasModel,
1226
+ Dt as isGranted,
1302
1227
  Oe as list,
1303
- ue as listDrives,
1304
- le as listFiles,
1305
- he as listFolders,
1306
- se as listModels,
1307
- ie as listPermissions,
1228
+ ce as listModels,
1229
+ he as listPermissions,
1308
1230
  we as listRoles,
1309
1231
  de as listUsers,
1310
- bt as login,
1311
- mt as logout,
1232
+ Pt as login,
1233
+ Ut as logout,
1312
1234
  g as mutation,
1313
- W as objectHasFile,
1314
- F as query,
1315
- ce as readFileAsBase64,
1316
- Ct as resetPassword,
1317
- Fe as sendMail,
1318
- at as setApiClient,
1319
- Zt as toQuery,
1320
- At as updatePassword,
1235
+ K as objectHasFile,
1236
+ O as query,
1237
+ jt as resetPassword,
1238
+ Ae as sendMail,
1239
+ pt as setApiClient,
1240
+ Kt as toQuery,
1241
+ St as updatePassword,
1321
1242
  _e as updateUser,
1322
- Ut as verifyCode,
1323
- _t as webAuthn
1243
+ Mt as verifyCode,
1244
+ Ft as webAuthn
1324
1245
  };