@overmap-ai/core 1.0.74-geojson-layers.2 → 1.0.74-geojson-layers.3

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.
@@ -2,7 +2,7 @@ var ic = Object.defineProperty;
2
2
  var nc = (t, e, s) => e in t ? ic(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
3
3
  var y = (t, e, s) => nc(t, typeof e != "symbol" ? e + "" : e, s);
4
4
  import "@redux-offline/redux-offline/lib/types";
5
- import { createSlice as S, createSelector as m, combineReducers as ac, compose as cc } from "@reduxjs/toolkit";
5
+ import { createSlice as S, createSelector as p, combineReducers as ac, compose as cc } from "@reduxjs/toolkit";
6
6
  import Pe from "superagent";
7
7
  import { v4 as Fe } from "uuid";
8
8
  import { saveAs as rc } from "file-saver";
@@ -22,93 +22,93 @@ var Qi = /* @__PURE__ */ ((t) => (t[t.GUEST = 0] = "GUEST", t[t.BASIC = 2] = "BA
22
22
  const Em = en.BACKLOG, km = Zi.MEDIUM, Tc = 6e4;
23
23
  function T(t) {
24
24
  return {
25
- addOne: (h, p) => {
26
- const f = t(p.payload);
27
- h.instances[f] = p.payload;
25
+ addOne: (l, m) => {
26
+ const f = t(m.payload);
27
+ l.instances[f] = m.payload;
28
28
  },
29
- addMany: (h, p) => {
30
- for (const f of p.payload) {
29
+ addMany: (l, m) => {
30
+ for (const f of m.payload) {
31
31
  const g = t(f);
32
- h.instances[g] = f;
32
+ l.instances[g] = f;
33
33
  }
34
34
  },
35
- setOne: (h, p) => {
36
- const f = t(p.payload);
37
- h.instances[f] = p.payload;
35
+ setOne: (l, m) => {
36
+ const f = t(m.payload);
37
+ l.instances[f] = m.payload;
38
38
  },
39
- setMany: (h, p) => {
40
- for (const f of p.payload) {
39
+ setMany: (l, m) => {
40
+ for (const f of m.payload) {
41
41
  const g = t(f);
42
- h.instances[g] = f;
42
+ l.instances[g] = f;
43
43
  }
44
44
  },
45
- updateOne: (h, p) => {
46
- const f = t(p.payload);
47
- h.instances[f] = p.payload;
45
+ updateOne: (l, m) => {
46
+ const f = t(m.payload);
47
+ l.instances[f] = m.payload;
48
48
  },
49
- updateMany: (h, p) => {
50
- for (const f of p.payload) {
49
+ updateMany: (l, m) => {
50
+ for (const f of m.payload) {
51
51
  const g = t(f);
52
- h.instances[g] = f;
52
+ l.instances[g] = f;
53
53
  }
54
54
  },
55
- deleteOne: (h, p) => {
56
- delete h.instances[p.payload];
55
+ deleteOne: (l, m) => {
56
+ delete l.instances[m.payload];
57
57
  },
58
- deleteMany: (h, p) => {
59
- for (const f of p.payload)
60
- delete h.instances[f];
58
+ deleteMany: (l, m) => {
59
+ for (const f of m.payload)
60
+ delete l.instances[f];
61
61
  },
62
- initialize: (h, p) => {
63
- h.instances = {};
64
- for (const f of p.payload) {
62
+ initialize: (l, m) => {
63
+ l.instances = {};
64
+ for (const f of m.payload) {
65
65
  const g = t(f);
66
- h.instances[g] = f;
66
+ l.instances[g] = f;
67
67
  }
68
68
  },
69
- getInitialState: (h) => ({
70
- ...h,
69
+ getInitialState: (l) => ({
70
+ ...l,
71
71
  instances: {}
72
72
  })
73
73
  };
74
74
  }
75
- function qm() {
75
+ function qm(t) {
76
76
  return {
77
- initializeSelection: (l, r) => {
78
- l.selection = Array.from(new Set(r.payload));
77
+ initializeSelection: (r, d) => {
78
+ r[t] = Array.from(new Set(d.payload));
79
79
  },
80
- selectOne: (l, r) => {
81
- new Set(l.selection).has(r.payload) || l.selection.push(r.payload);
80
+ selectOne: (r, d) => {
81
+ new Set(r[t]).has(d.payload) || r[t].push(d.payload);
82
82
  },
83
- selectMany: (l, r) => {
84
- const d = new Set(l.selection);
85
- for (const h of r.payload)
86
- d.has(h) || d.add(h);
87
- l.selection = Array.from(d);
83
+ selectMany: (r, d) => {
84
+ const l = new Set(r[t]);
85
+ for (const m of d.payload)
86
+ l.has(m) || l.add(m);
87
+ r[t] = Array.from(l);
88
88
  },
89
- unselectOne: (l, r) => {
90
- const d = new Set(l.selection);
91
- d.has(r.payload) && (d.delete(r.payload), l.selection = Array.from(d));
89
+ unselectOne: (r, d) => {
90
+ const l = new Set(r[t]);
91
+ l.has(d.payload) && (l.delete(d.payload), r[t] = Array.from(l));
92
92
  },
93
- unselectMany: (l, r) => {
94
- const d = new Set(l.selection);
95
- for (const h of r.payload)
96
- d.has(h) && d.delete(h);
97
- l.selection = Array.from(d);
93
+ unselectMany: (r, d) => {
94
+ const l = new Set(r[t]);
95
+ for (const m of d.payload)
96
+ l.has(m) && l.delete(m);
97
+ r[t] = Array.from(l);
98
98
  },
99
- toggleOne: (l, r) => {
100
- const d = new Set(l.selection);
101
- d.has(r.payload) ? d.delete(r.payload) : d.add(r.payload), l.selection = Array.from(d);
99
+ toggleOne: (r, d) => {
100
+ const l = new Set(r[t]);
101
+ l.has(d.payload) ? l.delete(d.payload) : l.add(d.payload), r[t] = Array.from(l);
102
102
  },
103
- toggleMany: (l, r) => {
104
- const d = new Set(l.selection);
105
- for (const h of r.payload)
106
- d.has(h) ? d.delete(h) : d.add(h);
107
- l.selection = Array.from(d);
103
+ toggleMany: (r, d) => {
104
+ const l = new Set(r[t]);
105
+ for (const m of d.payload)
106
+ l.has(m) ? l.delete(m) : l.add(m);
107
+ r[t] = Array.from(l);
108
108
  },
109
- getInitialState: (l) => ({
110
- ...l,
111
- selection: []
109
+ getInitialState: (r) => ({
110
+ ...r,
111
+ [t]: []
112
112
  })
113
113
  };
114
114
  }
@@ -317,11 +317,11 @@ const Me = T(
317
317
  setConversation: Me.setOne,
318
318
  updateConversation: Me.updateOne
319
319
  }
320
- }), { initializeConversations: jc, addConversation: Mc, setConversation: Cc, updateConversation: Dc } = sn.actions, nn = (t) => t.agentsReducer.instances, Xm = m(
320
+ }), { initializeConversations: jc, addConversation: Mc, setConversation: Cc, updateConversation: Dc } = sn.actions, nn = (t) => t.agentsReducer.instances, Xm = p(
321
321
  [nn],
322
322
  (t) => Object.values(t)
323
323
  ), Zm = b(
324
- m(
324
+ p(
325
325
  [nn, (t, e) => e],
326
326
  (t, e) => t[e]
327
327
  )
@@ -352,11 +352,11 @@ const Me = T(
352
352
  updateAssetAttachments: Uc,
353
353
  deleteAssetAttachment: $c,
354
354
  deleteAssetAttachments: rn
355
- } = an.actions, Gc = (t) => t.assetAttachmentReducer.instances, Vc = m(
355
+ } = an.actions, Gc = (t) => t.assetAttachmentReducer.instances, Vc = p(
356
356
  [Gc],
357
357
  (t) => Object.values(t)
358
358
  ), Lc = (t) => (e) => e.assetAttachmentReducer.instances[t], Bc = b(
359
- m(
359
+ p(
360
360
  [Vc, (t, e) => e],
361
361
  (t, e) => A(t.filter(({ asset: s }) => e === s))
362
362
  )
@@ -385,11 +385,11 @@ const Me = T(
385
385
  updateAssetProcedureAttachments: Kc,
386
386
  deleteAssetProcedureAttachment: Yc,
387
387
  deleteAssetProcedureAttachments: Qc
388
- } = on.actions, Xc = (t) => t.assetProcedureAttachmentReducer.instances, Zc = m(
388
+ } = on.actions, Xc = (t) => t.assetProcedureAttachmentReducer.instances, Zc = p(
389
389
  [Xc],
390
390
  (t) => Object.values(t)
391
391
  ), er = (t) => (e) => e.assetProcedureAttachmentReducer.instances[t], cp = b(
392
- m(
392
+ p(
393
393
  [
394
394
  Zc,
395
395
  (t, e) => e
@@ -423,11 +423,11 @@ const Me = T(
423
423
  updateAssetProcedureFieldsAttachments: nr,
424
424
  deleteAssetProcedureFieldsAttachment: lp,
425
425
  deleteAssetProcedureFieldsAttachments: ar
426
- } = dn.actions, cr = (t) => t.assetProcedureFieldsAttachmentReducer.instances, rr = m(
426
+ } = dn.actions, cr = (t) => t.assetProcedureFieldsAttachmentReducer.instances, rr = p(
427
427
  [cr],
428
428
  (t) => Object.values(t)
429
429
  ), hp = b(
430
- m([rr, (t, e) => e], (t, e) => A(t.filter((s) => s.fields_revision === e)))
430
+ p([rr, (t, e) => e], (t, e) => A(t.filter((s) => s.fields_revision === e)))
431
431
  ), mp = (t) => (e) => e.assetProcedureFieldsAttachmentReducer.instances[t], or = dn.reducer, z = T(
432
432
  (t) => t.uuid
433
433
  ), Bt = z.getInitialState({}), un = S({
@@ -455,13 +455,13 @@ const Me = T(
455
455
  updateAssetProcedureFieldsMany: Ap,
456
456
  deleteAssetProcedureFields: hr,
457
457
  deleteAssetProcedureFieldsMany: bp
458
- } = un.actions, mr = (t) => t.assetProcedureFieldsReducer.instances, ln = m([mr], (t) => Object.values(t)), gp = b(
459
- m(
458
+ } = un.actions, mr = (t) => t.assetProcedureFieldsReducer.instances, ln = p([mr], (t) => Object.values(t)), gp = b(
459
+ p(
460
460
  [ln, (t, e) => e],
461
461
  (t, e) => A(t.filter((s) => s.asset_procedure === e))
462
462
  )
463
463
  ), Sp = b(
464
- m([ln, (t, e) => e], (t, e) => t.filter((s) => s.asset_procedure === e).sort((s, i) => s.submitted_at > i.submitted_at ? -1 : 1)[0])
464
+ p([ln, (t, e) => e], (t, e) => t.filter((s) => s.asset_procedure === e).sort((s, i) => s.submitted_at > i.submitted_at ? -1 : 1)[0])
465
465
  ), Tp = (t) => (e) => e.assetProcedureFieldsReducer.instances[t], pr = un.reducer, U = T((t) => t.uuid), Nt = U.getInitialState({}), hn = S({
466
466
  name: "assetProcedureFieldValuesAttachments",
467
467
  initialState: Nt,
@@ -487,11 +487,11 @@ const Me = T(
487
487
  updateAssetProcedureFieldValuesAttachments: yr,
488
488
  deleteAssetProcedureFieldValuesAttachment: Fp,
489
489
  deleteAssetProcedureFieldValuesAttachments: At
490
- } = hn.actions, mn = (t) => t.assetProcedureFieldValuesAttachmentReducer.instances, Ar = m(
490
+ } = hn.actions, mn = (t) => t.assetProcedureFieldValuesAttachmentReducer.instances, Ar = p(
491
491
  [mn],
492
492
  (t) => Object.values(t)
493
493
  ), Pp = (t) => (e) => e.assetProcedureFieldValuesAttachmentReducer.instances[t], br = b(
494
- m(
494
+ p(
495
495
  [
496
496
  mn,
497
497
  (t, e) => e
@@ -502,7 +502,7 @@ const Me = T(
502
502
  }
503
503
  )
504
504
  ), gr = b(
505
- m(
505
+ p(
506
506
  [Ar, (t, e) => e],
507
507
  (t, e) => A(t.filter((s) => s.field_values === e))
508
508
  )
@@ -531,13 +531,13 @@ const Me = T(
531
531
  updateAssetProcedureFieldValuesMany: Or,
532
532
  deleteAssetProcedureFieldValues: Wt,
533
533
  deleteAssetProcedureFieldValuesMany: _r
534
- } = pn.actions, Ir = (t) => t.assetProcedureFieldValuesReducer.instances, fn = m(
534
+ } = pn.actions, Ir = (t) => t.assetProcedureFieldValuesReducer.instances, fn = p(
535
535
  [Ir],
536
536
  (t) => Object.values(t)
537
537
  ), Ep = b(
538
- m([fn, (t, e) => e], (t, e) => A(t.filter((s) => s.asset === e)))
538
+ p([fn, (t, e) => e], (t, e) => A(t.filter((s) => s.asset === e)))
539
539
  ), kp = b(
540
- m([fn, (t, e) => e], (t, e) => A(t.filter((s) => s.asset_procedure_instance === e)))
540
+ p([fn, (t, e) => e], (t, e) => A(t.filter((s) => s.asset_procedure_instance === e)))
541
541
  ), Kt = (t) => (e) => e.assetProcedureFieldValuesReducer.instances[t], Fr = pn.reducer, G = T((t) => t.uuid), Yt = G.getInitialState({}), yn = S({
542
542
  name: "assetProcedureInstances",
543
543
  initialState: Yt,
@@ -563,11 +563,11 @@ const Me = T(
563
563
  deleteAssetProcedureInstances: wr,
564
564
  setAssetProcedureInstance: jp,
565
565
  setAssetProcedureInstances: Mp
566
- } = yn.actions, An = (t) => t.assetProcedureInstanceReducer.instances, bn = m(
566
+ } = yn.actions, An = (t) => t.assetProcedureInstanceReducer.instances, bn = p(
567
567
  [An],
568
568
  (t) => Object.values(t)
569
569
  ), Er = b(
570
- m(
570
+ p(
571
571
  [bn, (t, e) => e],
572
572
  (t, e) => A(
573
573
  t.filter(
@@ -576,7 +576,7 @@ const Me = T(
576
576
  )
577
577
  )
578
578
  ), Cp = b(
579
- m(
579
+ p(
580
580
  [bn, (t, e) => e],
581
581
  (t, e) => A(
582
582
  t.filter(
@@ -585,7 +585,7 @@ const Me = T(
585
585
  )
586
586
  )
587
587
  ), Zt = (t) => (e) => e.assetProcedureInstanceReducer.instances[t], Dp = b(
588
- m(
588
+ p(
589
589
  [An, (t, e) => e],
590
590
  (t, e) => {
591
591
  const s = [];
@@ -623,15 +623,15 @@ const Me = T(
623
623
  deleteAssetProcedures: Up,
624
624
  setAssetProcedure: $p,
625
625
  setAssetProcedures: Gp
626
- } = gn.actions, Sn = (t) => t.assetProcedureReducer.instances, jr = m([Sn], (t) => Object.values(t)), Vp = b(
627
- m(
626
+ } = gn.actions, Sn = (t) => t.assetProcedureReducer.instances, jr = p([Sn], (t) => Object.values(t)), Vp = b(
627
+ p(
628
628
  [jr, (t, e) => e],
629
629
  (t, e) => A(
630
630
  t.filter((s) => s.organization === e)
631
631
  )
632
632
  )
633
633
  ), is = (t) => (e) => e.assetProcedureReducer.instances[t], Lp = b(
634
- m(
634
+ p(
635
635
  [Sn, (t, e) => e],
636
636
  (t, e) => {
637
637
  const s = [];
@@ -667,10 +667,10 @@ const Me = T(
667
667
  deleteAssets: Dr,
668
668
  setAsset: Np,
669
669
  setAssets: Jp
670
- } = Tn.actions, On = (t) => t.assetReducer.instances, xr = m([On], (t) => A(Object.values(t))), _n = b(
671
- m([xr, (t, e) => e], (t, e) => A(t.filter((s) => s.asset_type === e)))
670
+ } = Tn.actions, On = (t) => t.assetReducer.instances, xr = p([On], (t) => A(Object.values(t))), _n = b(
671
+ p([xr, (t, e) => e], (t, e) => A(t.filter((s) => s.asset_type === e)))
672
672
  ), rs = (t) => (e) => e.assetReducer.instances[t], Hp = b(
673
- m([On, (t, e) => e], (t, e) => {
673
+ p([On, (t, e) => e], (t, e) => {
674
674
  const s = [];
675
675
  for (const i of e) {
676
676
  const n = t[i];
@@ -701,11 +701,11 @@ const Me = T(
701
701
  updateAssetStageCompletions: Gr,
702
702
  deleteAssetStageCompletion: ls,
703
703
  deleteAssetStageCompletions: hs
704
- } = In.actions, Vr = In.reducer, Fn = (t) => t.assetStageCompletionReducer.instances, Kp = m(
704
+ } = In.actions, Vr = In.reducer, Fn = (t) => t.assetStageCompletionReducer.instances, Kp = p(
705
705
  [Fn],
706
706
  (t) => Object.values(t)
707
707
  ), Lr = (t) => (e) => e.assetStageCompletionReducer.instances[t], Br = b(
708
- m(
708
+ p(
709
709
  [Fn, (t, e) => e],
710
710
  (t, e) => {
711
711
  const s = new Set(e);
@@ -741,17 +741,17 @@ const Me = T(
741
741
  updateAssetStages: ot,
742
742
  deleteAssetStage: Xp,
743
743
  deleteAssetStages: ys
744
- } = Pn.actions, Hr = Pn.reducer, It = (t) => t.assetStageReducer.instances, Wr = (t) => (e) => e.assetStageReducer.instances[t], Kr = m([It], (t) => Object.values(t)), Zp = b(
745
- m([It, (t, e) => e], (t, e) => {
744
+ } = Pn.actions, Hr = Pn.reducer, It = (t) => t.assetStageReducer.instances, Wr = (t) => (e) => e.assetStageReducer.instances[t], Kr = p([It], (t) => Object.values(t)), Zp = b(
745
+ p([It, (t, e) => e], (t, e) => {
746
746
  const s = {};
747
747
  for (const [i, n] of Object.entries(t))
748
748
  n.asset_procedure === e && (s[i] = n);
749
749
  return Ge(s);
750
750
  })
751
751
  ), ef = b(
752
- m([Kr, (t, e) => e], (t, e) => A(t.filter((s) => s.asset_procedure === e)))
752
+ p([Kr, (t, e) => e], (t, e) => A(t.filter((s) => s.asset_procedure === e)))
753
753
  ), As = b(
754
- m([It, (t, e) => e], (t, e) => {
754
+ p([It, (t, e) => e], (t, e) => {
755
755
  const s = [];
756
756
  for (const i of e) {
757
757
  const n = t[i];
@@ -786,11 +786,11 @@ const Me = T(
786
786
  updateAssetTypeAttachments: Xr,
787
787
  deleteAssetTypeAttachment: Zr,
788
788
  deleteAssetTypeAttachments: En
789
- } = vn.actions, eo = (t) => t.assetTypeAttachmentReducer.instances, to = m(
789
+ } = vn.actions, eo = (t) => t.assetTypeAttachmentReducer.instances, to = p(
790
790
  [eo],
791
791
  (t) => Object.values(t)
792
792
  ), so = (t) => (e) => e.assetTypeAttachmentReducer.instances[t], io = b(
793
- m(
793
+ p(
794
794
  [to, (t, e) => e],
795
795
  (t, e) => A(t.filter(({ asset_type: s }) => e === s))
796
796
  )
@@ -819,11 +819,11 @@ const Me = T(
819
819
  updateAssetTypeFieldsAttachments: ro,
820
820
  deleteAssetTypeFieldsAttachment: df,
821
821
  deleteAssetTypeFieldsAttachments: oo
822
- } = kn.actions, uo = (t) => t.assetTypeFieldsAttachmentReducer.instances, lo = m(
822
+ } = kn.actions, uo = (t) => t.assetTypeFieldsAttachmentReducer.instances, lo = p(
823
823
  [uo],
824
824
  (t) => Object.values(t)
825
825
  ), uf = b(
826
- m([lo, (t, e) => e], (t, e) => A(t.filter((s) => s.fields_revision === e)))
826
+ p([lo, (t, e) => e], (t, e) => A(t.filter((s) => s.fields_revision === e)))
827
827
  ), lf = (t) => (e) => e.assetTypeFieldsAttachmentReducer.instances[t], ho = kn.reducer, H = T(
828
828
  (t) => t.uuid
829
829
  ), Ss = H.getInitialState({}), qn = S({
@@ -851,10 +851,10 @@ const Me = T(
851
851
  updateAssetTypeFieldsMany: ff,
852
852
  deleteAssetTypeFields: yo,
853
853
  deleteAssetTypeFieldsMany: yf
854
- } = qn.actions, Ao = (t) => t.assetTypeFieldsReducer.instances, Ft = m([Ao], (t) => Object.values(t)), Af = b(
855
- m([Ft, (t, e) => e], (t, e) => A(t.filter((s) => s.asset_type === e)))
854
+ } = qn.actions, Ao = (t) => t.assetTypeFieldsReducer.instances, Ft = p([Ao], (t) => Object.values(t)), Af = b(
855
+ p([Ft, (t, e) => e], (t, e) => A(t.filter((s) => s.asset_type === e)))
856
856
  ), bf = b(
857
- m([Ft, (t, e) => e], (t, e) => t.filter((s) => s.asset_type === e).sort((s, i) => s.submitted_at > i.submitted_at ? -1 : 1)[0])
857
+ p([Ft, (t, e) => e], (t, e) => t.filter((s) => s.asset_type === e).sort((s, i) => s.submitted_at > i.submitted_at ? -1 : 1)[0])
858
858
  ), gf = (t) => (e) => e.assetTypeFieldsReducer.instances[t], bo = qn.reducer, W = T((t) => t.uuid), Ts = W.getInitialState({}), jn = S({
859
859
  name: "assetTypeFieldValuesAttachments",
860
860
  initialState: Ts,
@@ -880,11 +880,11 @@ const Me = T(
880
880
  updateAssetTypeFieldValuesAttachments: So,
881
881
  deleteAssetTypeFieldValuesAttachment: _f,
882
882
  deleteAssetTypeFieldValuesAttachments: gt
883
- } = jn.actions, Mn = (t) => t.assetTypeFieldValuesAttachmentReducer.instances, To = m(
883
+ } = jn.actions, Mn = (t) => t.assetTypeFieldValuesAttachmentReducer.instances, To = p(
884
884
  [Mn],
885
885
  (t) => Object.values(t)
886
886
  ), If = (t) => (e) => e.assetTypeFieldValuesAttachmentReducer.instances[t], Ro = b(
887
- m(
887
+ p(
888
888
  [
889
889
  Mn,
890
890
  (t, e) => e
@@ -897,7 +897,7 @@ const Me = T(
897
897
  }
898
898
  )
899
899
  ), Oo = b(
900
- m([To, (t, e) => e], (t, e) => A(t.filter((s) => s.field_values === e)))
900
+ p([To, (t, e) => e], (t, e) => A(t.filter((s) => s.field_values === e)))
901
901
  ), _o = jn.reducer, K = T(
902
902
  (t) => t.uuid
903
903
  ), Rs = K.getInitialState({}), Cn = S({
@@ -925,10 +925,10 @@ const Me = T(
925
925
  updateAssetTypeFieldValuesMany: Po,
926
926
  deleteAssetTypeFieldValues: _s,
927
927
  deleteAssetTypeFieldValuesMany: vo
928
- } = Cn.actions, wo = (t) => t.assetTypeFieldValuesReducer.instances, Dn = m([wo], (t) => Object.values(t)), vf = b(
929
- m([Dn, (t, e) => e], (t, e) => A(t.filter((s) => s.asset === e)))
928
+ } = Cn.actions, wo = (t) => t.assetTypeFieldValuesReducer.instances, Dn = p([wo], (t) => Object.values(t)), vf = b(
929
+ p([Dn, (t, e) => e], (t, e) => A(t.filter((s) => s.asset === e)))
930
930
  ), wf = b(
931
- m(
931
+ p(
932
932
  [Ft, Dn, (t, e) => e],
933
933
  (t, e, s) => {
934
934
  const i = new Set(
@@ -962,11 +962,11 @@ const Me = T(
962
962
  updateAssetTypes: jf,
963
963
  deleteAssetType: vs,
964
964
  deleteAssetTypes: Mf
965
- } = xn.actions, zn = (t) => t.assetTypeReducer.instances, Cf = m(
965
+ } = xn.actions, zn = (t) => t.assetTypeReducer.instances, Cf = p(
966
966
  [zn],
967
967
  (t) => Object.values(t)
968
968
  ), ws = (t) => (e) => e.assetTypeReducer.instances[t], Df = b(
969
- m(
969
+ p(
970
970
  [zn, (t, e) => e],
971
971
  (t, e) => {
972
972
  const s = [];
@@ -1006,8 +1006,8 @@ const Me = T(
1006
1006
  updateCategory: Ce.updateOne,
1007
1007
  deleteCategory: Ce.deleteOne
1008
1008
  }
1009
- }), { initializeCategories: Co, addCategory: qs, updateCategory: Do, deleteCategory: xo } = Un.actions, $n = (t) => t.categoryReducer.instances, Gf = m([$n], (t) => Object.values(t)), js = (t) => (e) => e.categoryReducer.instances[t], Vf = b(
1010
- m(
1009
+ }), { initializeCategories: Co, addCategory: qs, updateCategory: Do, deleteCategory: xo } = Un.actions, $n = (t) => t.categoryReducer.instances, Gf = p([$n], (t) => Object.values(t)), js = (t) => (e) => e.categoryReducer.instances[t], Vf = b(
1010
+ p(
1011
1011
  [$n, (t, e) => e],
1012
1012
  (t, e) => {
1013
1013
  const s = [];
@@ -1045,11 +1045,11 @@ const Me = T(
1045
1045
  updateDocumentAttachments: Vo,
1046
1046
  deleteDocumentAttachment: Lo,
1047
1047
  deleteDocumentAttachments: Bo
1048
- } = Gn.actions, No = (t) => t.documentAttachmentReducer.instances, Jo = m(
1048
+ } = Gn.actions, No = (t) => t.documentAttachmentReducer.instances, Jo = p(
1049
1049
  [No],
1050
1050
  (t) => Object.values(t)
1051
1051
  ), Ho = (t) => (e) => e.documentAttachmentReducer.instances[t], Hf = b(
1052
- m(
1052
+ p(
1053
1053
  [Jo, (t, e) => e],
1054
1054
  (t, e) => A(t.filter(({ document: s }) => e === s))
1055
1055
  )
@@ -1179,11 +1179,11 @@ const Me = T(
1179
1179
  }
1180
1180
  }
1181
1181
  }
1182
- }), { setDocuments: Ko, addDocuments: Yo, updateDocuments: Se, moveDocument: Qo, removeDocuments: Ds } = Vn.actions, Ue = (t) => t.documentsReducer.documents, Xo = m(
1182
+ }), { setDocuments: Ko, addDocuments: Yo, updateDocuments: Se, moveDocument: Qo, removeDocuments: Ds } = Vn.actions, Ue = (t) => t.documentsReducer.documents, Xo = p(
1183
1183
  [Ue],
1184
1184
  (t) => Object.values(t)
1185
1185
  ), Zo = (t) => (e) => e.documentsReducer.documents[t], Wf = b(
1186
- m(
1186
+ p(
1187
1187
  [Ue, (t, e) => e],
1188
1188
  (t, e) => {
1189
1189
  const s = [];
@@ -1195,7 +1195,7 @@ const Me = T(
1195
1195
  }
1196
1196
  )
1197
1197
  ), Kf = b(
1198
- m(
1198
+ p(
1199
1199
  [Ue, (t, e) => e],
1200
1200
  (t, e) => {
1201
1201
  const s = [], i = t[e];
@@ -1206,7 +1206,7 @@ const Me = T(
1206
1206
  return A(s);
1207
1207
  }
1208
1208
  )
1209
- ), Yf = m(
1209
+ ), Yf = p(
1210
1210
  [Xo],
1211
1211
  (t) => A(t.filter((e) => !e.parent_document))
1212
1212
  ), ed = Vn.reducer, nt = T(
@@ -1219,8 +1219,8 @@ const Me = T(
1219
1219
  addEmailDomain: nt.addOne,
1220
1220
  deleteEmailDomain: nt.deleteOne
1221
1221
  }
1222
- }), { initializeEmailDomains: sd, addEmailDomain: id, deleteEmailDomain: nd } = Ln.actions, ad = (t) => t.emailDomainsReducer.instances, cd = m([ad], (t) => Object.values(t)), Qf = b(
1223
- m(
1222
+ }), { initializeEmailDomains: sd, addEmailDomain: id, deleteEmailDomain: nd } = Ln.actions, ad = (t) => t.emailDomainsReducer.instances, cd = p([ad], (t) => Object.values(t)), Qf = b(
1223
+ p(
1224
1224
  [cd, (t, e) => e],
1225
1225
  (t, e) => A(
1226
1226
  t.filter((s) => s.organization === e)
@@ -1275,7 +1275,7 @@ const Me = T(
1275
1275
  deleteFormRevisionAttachment: sy,
1276
1276
  deleteFormRevisionAttachments: fd
1277
1277
  } = Jn.actions, yd = (t) => t.formRevisionAttachmentReducer.instances, iy = b(
1278
- m(
1278
+ p(
1279
1279
  [yd, (t, e) => e],
1280
1280
  (t, e) => A(
1281
1281
  Object.values(t).filter((s) => s.form_revision === e)
@@ -1303,11 +1303,11 @@ const Me = T(
1303
1303
  addFormRevisions: Td,
1304
1304
  deleteFormRevision: Kn,
1305
1305
  deleteFormRevisions: Rd
1306
- } = Hn.actions, vt = (t) => t.formRevisionReducer.instances, Od = m(
1306
+ } = Hn.actions, vt = (t) => t.formRevisionReducer.instances, Od = p(
1307
1307
  [vt],
1308
1308
  (t) => Object.values(t)
1309
1309
  ), ny = (t) => (e) => e.formRevisionReducer.instances[t], ay = b(
1310
- m(
1310
+ p(
1311
1311
  [vt, (t, e) => e],
1312
1312
  (t, e) => {
1313
1313
  const s = Object.values(t).filter((a) => a.form === e);
@@ -1317,7 +1317,7 @@ const Me = T(
1317
1317
  }
1318
1318
  )
1319
1319
  ), _d = b(
1320
- m(
1320
+ p(
1321
1321
  [Od, (t, e) => e],
1322
1322
  (t, e) => A(t.filter((s) => s.form === e))
1323
1323
  )
@@ -1333,7 +1333,7 @@ const Me = T(
1333
1333
  updateForm: Re.updateOne,
1334
1334
  deleteForm: Re.deleteOne
1335
1335
  }
1336
- }), { initializeForms: Fd, setForm: cy, addForm: Gs, addForms: ry, updateForm: oy, deleteForm: Vs } = Yn.actions, Pd = Yn.reducer, vd = (t) => t.formReducer.instances, dy = m([vd], (t) => Object.values(t)), wd = (t) => (e) => e.formReducer.instances[t], Z = T((t) => t.uuid), Ls = Z.getInitialState({}), Qn = S({
1336
+ }), { initializeForms: Fd, setForm: cy, addForm: Gs, addForms: ry, updateForm: oy, deleteForm: Vs } = Yn.actions, Pd = Yn.reducer, vd = (t) => t.formReducer.instances, dy = p([vd], (t) => Object.values(t)), wd = (t) => (e) => e.formReducer.instances[t], Z = T((t) => t.uuid), Ls = Z.getInitialState({}), Qn = S({
1337
1337
  name: "formSubmissionAttachments",
1338
1338
  initialState: Ls,
1339
1339
  extraReducers: (t) => t.addCase("RESET", (e) => Object.assign(e, Ls)),
@@ -1359,7 +1359,7 @@ const Me = T(
1359
1359
  deleteFormSubmissionAttachment: py,
1360
1360
  deleteFormSubmissionAttachments: Tt
1361
1361
  } = Qn.actions, Xn = (t) => t.formSubmissionAttachmentReducer.instances, qd = b(
1362
- m(
1362
+ p(
1363
1363
  [
1364
1364
  Xn,
1365
1365
  (t, e) => e
@@ -1372,7 +1372,7 @@ const Me = T(
1372
1372
  }
1373
1373
  )
1374
1374
  ), jd = b(
1375
- m(
1375
+ p(
1376
1376
  [Xn, (t, e) => e],
1377
1377
  (t, e) => A(
1378
1378
  Object.values(t).filter((s) => s.form_submission === e)
@@ -1405,11 +1405,11 @@ const Me = T(
1405
1405
  updateFormSubmissions: yy,
1406
1406
  deleteFormSubmission: Js,
1407
1407
  deleteFormSubmissions: Et
1408
- } = Zn.actions, ea = (t) => t.formSubmissionReducer.instances, ta = m(
1408
+ } = Zn.actions, ea = (t) => t.formSubmissionReducer.instances, ta = p(
1409
1409
  [ea],
1410
1410
  (t) => Object.values(t)
1411
1411
  ), Hs = (t) => (e) => e.formSubmissionReducer.instances[t], xd = b(
1412
- m(
1412
+ p(
1413
1413
  [
1414
1414
  ea,
1415
1415
  vt,
@@ -1425,12 +1425,12 @@ const Me = T(
1425
1425
  }
1426
1426
  )
1427
1427
  ), zd = b(
1428
- m(
1428
+ p(
1429
1429
  [ta, (t, e) => e],
1430
1430
  (t, e) => Object.values(t).filter((s) => s.issue === e)
1431
1431
  )
1432
1432
  ), Ud = b(
1433
- m(
1433
+ p(
1434
1434
  [ta, (t, e) => e],
1435
1435
  (t, e) => t.filter((s) => s.asset === e)
1436
1436
  )
@@ -1463,8 +1463,8 @@ const Me = T(
1463
1463
  updateGeoImages: Ay,
1464
1464
  deleteGeoImage: Ks,
1465
1465
  deleteGeoImages: Jd
1466
- } = sa.actions, Hd = (t) => t.geoImageReducer.instances, Wd = m([Hd], (t) => Object.values(t)), Ys = (t) => (e) => e.geoImageReducer.instances[t], by = b(
1467
- m([Wd, (t, e) => e], (t, e) => A(t.filter((s) => s.project === e)))
1466
+ } = sa.actions, Hd = (t) => t.geoImageReducer.instances, Wd = p([Hd], (t) => Object.values(t)), Ys = (t) => (e) => e.geoImageReducer.instances[t], by = b(
1467
+ p([Wd, (t, e) => e], (t, e) => A(t.filter((s) => s.project === e)))
1468
1468
  ), Kd = sa.reducer, se = T(
1469
1469
  (t) => t.uuid
1470
1470
  ), Qs = se.getInitialState({}), ia = S({
@@ -1492,10 +1492,10 @@ const Me = T(
1492
1492
  deleteGeoJsonFeatures: Xd,
1493
1493
  setGeoJsonFeature: Sy,
1494
1494
  setGeoJsonFeatures: Ty
1495
- } = ia.actions, na = (t) => t.geoJsonFeatureReducer.instances, Zd = m([na], (t) => A(Object.values(t))), eu = b(
1496
- m([Zd, (t, e) => e], (t, e) => A(t.filter((s) => s.geojson_layer === e)))
1495
+ } = ia.actions, na = (t) => t.geoJsonFeatureReducer.instances, Zd = p([na], (t) => A(Object.values(t))), eu = b(
1496
+ p([Zd, (t, e) => e], (t, e) => A(t.filter((s) => s.geojson_layer === e)))
1497
1497
  ), ei = (t) => (e) => e.geoJsonFeatureReducer.instances[t], Ry = b(
1498
- m(
1498
+ p(
1499
1499
  [na, (t, e) => e],
1500
1500
  (t, e) => {
1501
1501
  const s = [];
@@ -1531,10 +1531,10 @@ const Me = T(
1531
1531
  deleteGeoJsonLayers: Iy,
1532
1532
  setGeoJsonLayer: Fy,
1533
1533
  setGeoJsonLayers: Py
1534
- } = aa.actions, ca = (t) => t.geoJsonLayerReducer.instances, iu = m([ca], (t) => A(Object.values(t))), vy = b(
1535
- m([iu, (t, e) => e], (t, e) => A(t.filter((s) => s.project === e)))
1534
+ } = aa.actions, ca = (t) => t.geoJsonLayerReducer.instances, iu = p([ca], (t) => A(Object.values(t))), vy = b(
1535
+ p([iu, (t, e) => e], (t, e) => A(t.filter((s) => s.project === e)))
1536
1536
  ), ni = (t) => (e) => e.geoJsonLayerReducer.instances[t], wy = b(
1537
- m(
1537
+ p(
1538
1538
  [ca, (t, e) => e],
1539
1539
  (t, e) => {
1540
1540
  const s = [];
@@ -1572,20 +1572,20 @@ const Me = T(
1572
1572
  addIssueAssociations: oa,
1573
1573
  deleteIssueAssociation: ri,
1574
1574
  deleteIssueAssociations: da
1575
- } = ra.actions, rt = (t) => t.issueAssociationReducer.instances, jy = m([rt], (t) => Object.values(t)), ru = (t) => (e) => e.issueAssociationReducer.instances[t], ou = b(
1576
- m(
1575
+ } = ra.actions, rt = (t) => t.issueAssociationReducer.instances, jy = p([rt], (t) => Object.values(t)), ru = (t) => (e) => e.issueAssociationReducer.instances[t], ou = b(
1576
+ p(
1577
1577
  [rt, (t, e) => e],
1578
1578
  (t, e) => A(
1579
1579
  Object.values(t).filter((s) => s.associated_issue === e)
1580
1580
  )
1581
1581
  )
1582
1582
  ), du = b(
1583
- m(
1583
+ p(
1584
1584
  [rt, (t, e) => e],
1585
1585
  (t, e) => A(Object.values(t).filter((s) => s.issue === e))
1586
1586
  )
1587
1587
  ), uu = b(
1588
- m(
1588
+ p(
1589
1589
  [rt, (t, e) => e],
1590
1590
  (t, e) => A(Object.values(t).filter((s) => s.asset === e))
1591
1591
  )
@@ -1616,11 +1616,11 @@ const Me = T(
1616
1616
  updateIssueAttachments: mu,
1617
1617
  deleteIssueAttachment: pu,
1618
1618
  deleteIssueAttachments: ha
1619
- } = ua.actions, fu = (t) => t.issueAttachmentReducer.instances, yu = m(
1619
+ } = ua.actions, fu = (t) => t.issueAttachmentReducer.instances, yu = p(
1620
1620
  [fu],
1621
1621
  (t) => Object.values(t)
1622
1622
  ), Au = b(
1623
- m(
1623
+ p(
1624
1624
  [yu, (t, e) => e],
1625
1625
  (t, e) => A(t.filter(({ issue: s }) => e === s))
1626
1626
  )
@@ -1649,11 +1649,11 @@ const Me = T(
1649
1649
  updateIssueCommentAttachments: Ru,
1650
1650
  deleteIssueCommentAttachment: Ou,
1651
1651
  deleteIssueCommentAttachments: _u
1652
- } = ma.actions, Iu = (t) => t.issueCommentAttachmentReducer.instances, Fu = m(
1652
+ } = ma.actions, Iu = (t) => t.issueCommentAttachmentReducer.instances, Fu = p(
1653
1653
  [Iu],
1654
1654
  (t) => Object.values(t)
1655
1655
  ), Pu = (t) => (e) => e.issueCommentAttachmentReducer.instances[t], $y = b(
1656
- m(
1656
+ p(
1657
1657
  [
1658
1658
  Fu,
1659
1659
  (t, e) => e
@@ -1680,7 +1680,7 @@ const Me = T(
1680
1680
  deleteIssueComment: fi,
1681
1681
  deleteIssueComments: Vy
1682
1682
  } = pa.actions, Eu = (t) => t.issueCommentReducer.instances, yi = (t) => (e) => e.issueCommentReducer.instances[t], Ly = b(
1683
- m(
1683
+ p(
1684
1684
  [Eu, (t, e) => e],
1685
1685
  (t, e) => A(Object.values(t).filter((s) => s.issue === e))
1686
1686
  )
@@ -1699,7 +1699,7 @@ const Me = T(
1699
1699
  deleteIssues: _e.deleteMany
1700
1700
  }
1701
1701
  }), { initializeIssues: qu, addIssue: bi, addIssues: ju, updateIssue: ut, deleteIssue: gi, deleteIssues: Mu } = fa.actions, Cu = (t) => t.issueReducer.instances, Si = (t) => (e) => e.issueReducer.instances[t], By = b(
1702
- m([Cu, (t, e) => e], (t, e) => {
1702
+ p([Cu, (t, e) => e], (t, e) => {
1703
1703
  const s = [];
1704
1704
  for (const i of e) {
1705
1705
  const n = t[i];
@@ -1734,11 +1734,11 @@ const Me = T(
1734
1734
  updateIssueTypeAttachments: Uu,
1735
1735
  deleteIssueTypeAttachment: $u,
1736
1736
  deleteIssueTypeAttachments: Gu
1737
- } = ya.actions, Vu = (t) => t.issueTypeAttachmentReducer.instances, Lu = m(
1737
+ } = ya.actions, Vu = (t) => t.issueTypeAttachmentReducer.instances, Lu = p(
1738
1738
  [Vu],
1739
1739
  (t) => Object.values(t)
1740
1740
  ), Bu = (t) => (e) => e.issueTypeAttachmentReducer.instances[t], Wy = b(
1741
- m(
1741
+ p(
1742
1742
  [Lu, (t, e) => e],
1743
1743
  (t, e) => A(t.filter(({ issue_type: s }) => e === s))
1744
1744
  )
@@ -1767,11 +1767,11 @@ const Me = T(
1767
1767
  updateIssueTypeFieldsAttachments: Wu,
1768
1768
  deleteIssueTypeFieldsAttachment: Zy,
1769
1769
  deleteIssueTypeFieldsAttachments: Ku
1770
- } = Aa.actions, Yu = (t) => t.issueTypeFieldsAttachmentReducer.instances, Qu = m(
1770
+ } = Aa.actions, Yu = (t) => t.issueTypeFieldsAttachmentReducer.instances, Qu = p(
1771
1771
  [Yu],
1772
1772
  (t) => Object.values(t)
1773
1773
  ), eA = b(
1774
- m(
1774
+ p(
1775
1775
  [Qu, (t, e) => e],
1776
1776
  (t, e) => A(
1777
1777
  t.filter((s) => s.fields_revision === e)
@@ -1804,8 +1804,8 @@ const Me = T(
1804
1804
  updateIssueTypeFieldValuesMany: aA,
1805
1805
  deleteIssueTypeFieldValues: Fi,
1806
1806
  deleteIssueTypeFieldValuesMany: cA
1807
- } = ba.actions, el = (t) => t.issueTypeFieldValuesReducer.instances, ga = m([el], (t) => Object.values(t)), rA = b(
1808
- m([ga, (t, e) => e], (t, e) => A(t.filter((s) => s.issue === e)))
1807
+ } = ba.actions, el = (t) => t.issueTypeFieldValuesReducer.instances, ga = p([el], (t) => Object.values(t)), rA = b(
1808
+ p([ga, (t, e) => e], (t, e) => A(t.filter((s) => s.issue === e)))
1809
1809
  ), Pi = (t) => (e) => e.issueTypeFieldValuesReducer.instances[t], tl = ba.reducer, ue = T(
1810
1810
  (t) => t.uuid
1811
1811
  ), vi = ue.getInitialState({}), Sa = S({
@@ -1833,12 +1833,12 @@ const Me = T(
1833
1833
  updateIssueTypeFieldsMany: lA,
1834
1834
  deleteIssueTypeFields: al,
1835
1835
  deleteIssueTypeFieldsMany: hA
1836
- } = Sa.actions, cl = (t) => t.issueTypeFieldsReducer.instances, kt = m([cl], (t) => Object.values(t)), mA = b(
1837
- m([kt, (t, e) => e], (t, e) => A(t.filter((s) => s.issue_type === e)))
1836
+ } = Sa.actions, cl = (t) => t.issueTypeFieldsReducer.instances, kt = p([cl], (t) => Object.values(t)), mA = b(
1837
+ p([kt, (t, e) => e], (t, e) => A(t.filter((s) => s.issue_type === e)))
1838
1838
  ), pA = b(
1839
- m([kt, (t, e) => e], (t, e) => t.filter((s) => s.issue_type === e).sort((s, i) => s.submitted_at > i.submitted_at ? -1 : 1)[0])
1839
+ p([kt, (t, e) => e], (t, e) => t.filter((s) => s.issue_type === e).sort((s, i) => s.submitted_at > i.submitted_at ? -1 : 1)[0])
1840
1840
  ), fA = b(
1841
- m(
1841
+ p(
1842
1842
  [kt, ga, (t, e) => e],
1843
1843
  (t, e, s) => {
1844
1844
  const i = new Set(
@@ -1872,11 +1872,11 @@ const Me = T(
1872
1872
  updateIssueTypeFieldValuesAttachments: dl,
1873
1873
  deleteIssueTypeFieldValuesAttachment: TA,
1874
1874
  deleteIssueTypeFieldValuesAttachments: Ot
1875
- } = Ta.actions, Ra = (t) => t.issueTypeFieldValuesAttachmentReducer.instances, ul = m(
1875
+ } = Ta.actions, Ra = (t) => t.issueTypeFieldValuesAttachmentReducer.instances, ul = p(
1876
1876
  [Ra],
1877
1877
  (t) => Object.values(t)
1878
1878
  ), RA = (t) => (e) => e.issueTypeFieldValuesAttachmentReducer.instances[t], ll = b(
1879
- m(
1879
+ p(
1880
1880
  [
1881
1881
  Ra,
1882
1882
  (t, e) => e
@@ -1889,7 +1889,7 @@ const Me = T(
1889
1889
  }
1890
1890
  )
1891
1891
  ), hl = b(
1892
- m(
1892
+ p(
1893
1893
  [ul, (t, e) => e],
1894
1894
  (t, e) => A(t.filter((s) => s.field_values === e))
1895
1895
  )
@@ -1906,7 +1906,7 @@ const Me = T(
1906
1906
  updateIssueType: ve.updateOne,
1907
1907
  removeIssueType: ve.deleteOne
1908
1908
  }
1909
- }), { initializeIssueTypes: pl, setIssueType: tt, addIssueType: fl, updateIssueType: yl, removeIssueType: ki } = Oa.actions, Al = (t) => t.issueTypeReducer.instances, bl = m(
1909
+ }), { initializeIssueTypes: pl, setIssueType: tt, addIssueType: fl, updateIssueType: yl, removeIssueType: ki } = Oa.actions, Al = (t) => t.issueTypeReducer.instances, bl = p(
1910
1910
  Al,
1911
1911
  (t) => Object.values(t)
1912
1912
  ), qi = (t) => (e) => e.issueTypeReducer.instances[t], OA = (t) => (e) => {
@@ -1917,12 +1917,12 @@ const Me = T(
1917
1917
  }
1918
1918
  return s;
1919
1919
  }, _A = b(
1920
- m(
1920
+ p(
1921
1921
  [bl, (t, e) => e],
1922
1922
  (t, e) => A(t.filter((s) => s.organization === e))
1923
1923
  )
1924
1924
  ), _a = b(
1925
- m(
1925
+ p(
1926
1926
  [(t) => t.issueReducer.instances, (t, e) => e],
1927
1927
  (t, e) => A(
1928
1928
  Object.values(t).filter((s) => s.issue_type === e)
@@ -1950,7 +1950,7 @@ const Me = T(
1950
1950
  deleteIssueUpdate: Ol,
1951
1951
  deleteIssueUpdates: _l
1952
1952
  } = Ia.actions, Il = (t) => t.issueUpdateReducer.instances, Fl = b(
1953
- m(
1953
+ p(
1954
1954
  [Il, (t, e) => e],
1955
1955
  (t, e) => A(Object.values(t).filter((s) => s.issue === e))
1956
1956
  )
@@ -1963,10 +1963,10 @@ const Me = T(
1963
1963
  addLicenses: at.addMany,
1964
1964
  updateLicense: at.updateOne
1965
1965
  }
1966
- }), { initializeLicences: vl, addLicenses: PA, updateLicense: Ae } = Fa.actions, qt = (t) => t.licenseReducer.instances, vA = (t) => (e) => e.licenseReducer.instances[t], wl = (t) => (e) => Object.values(e.licenseReducer.instances).find((s) => s.project === t), wA = m(
1966
+ }), { initializeLicences: vl, addLicenses: PA, updateLicense: Ae } = Fa.actions, qt = (t) => t.licenseReducer.instances, vA = (t) => (e) => e.licenseReducer.instances[t], wl = (t) => (e) => Object.values(e.licenseReducer.instances).find((s) => s.project === t), wA = p(
1967
1967
  [qt],
1968
1968
  (t) => A(Object.values(t).filter((e) => e.is_active))
1969
- ), EA = m(
1969
+ ), EA = p(
1970
1970
  [qt],
1971
1971
  (t) => Ge(
1972
1972
  Object.values(t).filter((e) => e.project).reduce((e, s) => ({ ...e, [s.project]: s }), {})
@@ -2015,7 +2015,7 @@ const Me = T(
2015
2015
  setCurrentUser: UA,
2016
2016
  setProfilePicture: $A
2017
2017
  } = Pa.actions, jl = Pa.reducer, jt = (t) => t.userReducer.currentUser, Mt = (t) => t.userReducer.instances, GA = (t) => (e) => e.userReducer.instances[t], VA = b(
2018
- m([Mt, (t, e) => e], (t, e) => {
2018
+ p([Mt, (t, e) => e], (t, e) => {
2019
2019
  const s = [];
2020
2020
  for (const i of e) {
2021
2021
  const n = t[i];
@@ -2034,7 +2034,7 @@ const Me = T(
2034
2034
  updateOrganizationAccess: ct.updateOne,
2035
2035
  deleteOrganizationAccess: ct.deleteOne
2036
2036
  }
2037
- }), { initializeOrganizationAccesses: Ml, updateOrganizationAccess: Cl, deleteOrganizationAccess: Dl } = va.actions, wa = (t) => t.organizationAccessReducer.instances, LA = (t) => (e) => e.organizationAccessReducer.instances[t], BA = m(
2037
+ }), { initializeOrganizationAccesses: Ml, updateOrganizationAccess: Cl, deleteOrganizationAccess: Dl } = va.actions, wa = (t) => t.organizationAccessReducer.instances, LA = (t) => (e) => e.organizationAccessReducer.instances[t], BA = p(
2038
2038
  [jt, wa],
2039
2039
  (t, e) => Object.values(e).find(
2040
2040
  (i) => i.user === (t == null ? void 0 : t.id)
@@ -2058,7 +2058,7 @@ const Me = T(
2058
2058
  deleteProjectAccess: De.deleteOne,
2059
2059
  deleteProjectAccesses: De.deleteMany
2060
2060
  }
2061
- }), { initializeProjectAccesses: ka, updateProjectAccess: Ul, deleteProjectAccess: $l, deleteProjectAccesses: Gl } = Ea.actions, qa = (t) => t.projectAccessReducer.instances, Vl = m(
2061
+ }), { initializeProjectAccesses: ka, updateProjectAccess: Ul, deleteProjectAccess: $l, deleteProjectAccesses: Gl } = Ea.actions, qa = (t) => t.projectAccessReducer.instances, Vl = p(
2062
2062
  qa,
2063
2063
  (t) => Object.values(t)
2064
2064
  ), JA = (t) => (e) => e.projectAccessReducer.instances[t], HA = (t) => (e) => Object.values(e.projectAccessReducer.instances).find(
@@ -2100,13 +2100,13 @@ const Me = T(
2100
2100
  deleteProject: Hl,
2101
2101
  deleteProjects: ZA,
2102
2102
  acceptProjectInvite: Wl
2103
- } = ja.actions, Kl = ja.reducer, Ct = (t) => t.projectReducer.instances, eb = m([Ct], (t) => A(Object.values(t))), tb = (t) => (e) => e.projectReducer.instances[t], Yl = m(
2103
+ } = ja.actions, Kl = ja.reducer, Ct = (t) => t.projectReducer.instances, eb = p([Ct], (t) => A(Object.values(t))), tb = (t) => (e) => e.projectReducer.instances[t], Yl = p(
2104
2104
  [qa],
2105
2105
  (t) => Object.values(t).map((e) => e.user)
2106
- ), Ql = m(
2106
+ ), Ql = p(
2107
2107
  [Yl, Mt],
2108
2108
  (t, e) => t.reduce((s, i) => ({ ...s, [i]: e[i] }), {})
2109
- ), sb = m(
2109
+ ), sb = p(
2110
2110
  [jt, Ql, Ll],
2111
2111
  (t, e, s) => A(
2112
2112
  Object.values(e).sort((i, n) => {
@@ -2143,34 +2143,34 @@ const Me = T(
2143
2143
  updateOrganization: ob,
2144
2144
  deleteOrganization: db,
2145
2145
  deleteOrganizations: ub
2146
- } = Ma.actions, Zl = (t) => t.organizationReducer.instances, eh = m([Zl], (t) => Object.values(t)), lb = (t) => (e) => e.organizationReducer.instances[t], hb = m(
2146
+ } = Ma.actions, Zl = (t) => t.organizationReducer.instances, eh = p([Zl], (t) => Object.values(t)), lb = (t) => (e) => e.organizationReducer.instances[t], hb = p(
2147
2147
  [eh],
2148
2148
  (t) => A(
2149
2149
  Object.values(t).filter((e) => e.has_access)
2150
2150
  )
2151
- ), th = m(
2151
+ ), th = p(
2152
2152
  [wa],
2153
2153
  (t) => Object.values(t).map((e) => e.user)
2154
2154
  ), mb = b(
2155
- m(
2155
+ p(
2156
2156
  [Ct, (t, e) => e],
2157
2157
  (t, e) => A(
2158
2158
  Object.values(t).filter((s) => s.organization_owner === e)
2159
2159
  )
2160
2160
  )
2161
2161
  ), pb = b(
2162
- m(
2162
+ p(
2163
2163
  [qt, (t, e) => e],
2164
2164
  (t, e) => A(
2165
2165
  Object.values(t).filter((s) => s.organization_owner === e)
2166
2166
  )
2167
2167
  )
2168
- ), sh = m(
2168
+ ), sh = p(
2169
2169
  [th, Mt],
2170
2170
  (t, e) => Ge(
2171
2171
  t.reduce((s, i) => ({ ...s, [i]: e[i] }), {})
2172
2172
  )
2173
- ), fb = m(
2173
+ ), fb = p(
2174
2174
  [jt, sh, xl],
2175
2175
  (t, e, s) => A(
2176
2176
  Object.values(e).sort((i, n) => {
@@ -2255,11 +2255,11 @@ const Me = T(
2255
2255
  updateProjectAttachments: mh,
2256
2256
  deleteProjectAttachment: ph,
2257
2257
  deleteProjectAttachments: xa
2258
- } = Da.actions, fh = (t) => t.projectAttachmentReducer.instances, yh = m(
2258
+ } = Da.actions, fh = (t) => t.projectAttachmentReducer.instances, yh = p(
2259
2259
  [fh],
2260
2260
  (t) => Object.values(t)
2261
2261
  ), Ah = (t) => (e) => e.projectAttachmentReducer.instances[t], bh = b(
2262
- m(
2262
+ p(
2263
2263
  [yh, (t, e) => e],
2264
2264
  (t, e) => A(t.filter(({ project: s }) => e === s))
2265
2265
  )
@@ -2320,7 +2320,7 @@ const Me = T(
2320
2320
  setActiveProjectFileId: Ih,
2321
2321
  saveActiveProjectFileBounds: Fh,
2322
2322
  resetProjectFileObjectUrls: Ib
2323
- } = za.actions, Ph = (t) => t.projectFileReducer.instances, vh = m([Ph], (t) => A(Object.values(t).sort((e, s) => e.z_index - s.z_index))), Fb = (t) => (e) => e.projectFileReducer.instances[t], Pb = (t) => t.projectFileReducer.activeProjectFileId, vb = (t) => t.projectFileReducer.isImportingProjectFile, wh = za.reducer, Eh = {
2323
+ } = za.actions, Ph = (t) => t.projectFileReducer.instances, vh = p([Ph], (t) => A(Object.values(t).sort((e, s) => e.z_index - s.z_index))), Fb = (t) => (e) => e.projectFileReducer.instances[t], Pb = (t) => t.projectFileReducer.activeProjectFileId, vb = (t) => t.projectFileReducer.isImportingProjectFile, wh = za.reducer, Eh = {
2324
2324
  isRehydrated: !1
2325
2325
  }, Ua = S({
2326
2326
  name: "rehydrated",
@@ -2342,8 +2342,8 @@ const Me = T(
2342
2342
  updateTeam: we.updateOne,
2343
2343
  deleteTeam: we.deleteOne
2344
2344
  }
2345
- }), { setTeam: qe, initializeTeams: qh, addTeam: jh, updateTeam: Ni, deleteTeam: Ji } = $a.actions, Ga = (t) => t.teamReducer.instances, Va = m([Ga], (t) => Object.values(t)), je = (t) => (e) => e.teamReducer.instances[t], kb = b(
2346
- m(
2345
+ }), { setTeam: qe, initializeTeams: qh, addTeam: jh, updateTeam: Ni, deleteTeam: Ji } = $a.actions, Ga = (t) => t.teamReducer.instances, Va = p([Ga], (t) => Object.values(t)), je = (t) => (e) => e.teamReducer.instances[t], kb = b(
2346
+ p(
2347
2347
  [Ga, (t, e) => e],
2348
2348
  (t, e) => {
2349
2349
  const s = [];
@@ -2355,12 +2355,12 @@ const Me = T(
2355
2355
  }
2356
2356
  )
2357
2357
  ), qb = b(
2358
- m(
2358
+ p(
2359
2359
  [Va, (t, e) => e],
2360
2360
  (t, e) => A(t.filter((s) => s.organization === e))
2361
2361
  )
2362
2362
  ), jb = b(
2363
- m([Va, (t, e) => e], (t, e) => A(t.filter((s) => s.members.includes(e))))
2363
+ p([Va, (t, e) => e], (t, e) => A(t.filter((s) => s.members.includes(e))))
2364
2364
  ), Mh = $a.reducer, Ch = {
2365
2365
  version: 0
2366
2366
  }, Dh = S({
@@ -2531,23 +2531,23 @@ async function Xa(t, e) {
2531
2531
  const a = {
2532
2532
  queryParams: "",
2533
2533
  isAuthNeeded: !0
2534
- }, c = t.meta.offline.effect, { payload: o, headers: l, method: r, queryParams: d, attachmentHash: h, isExternalUrl: p, isAuthNeeded: f, isResponseBlob: g } = {
2534
+ }, c = t.meta.offline.effect, { payload: o, headers: h, method: r, queryParams: d, attachmentHash: l, isExternalUrl: m, isAuthNeeded: f, isResponseBlob: g } = {
2535
2535
  ...a,
2536
2536
  ...c.request
2537
2537
  }, R = c.request;
2538
2538
  let O = R.url;
2539
- const F = h ? await e.files.fetchCache(h) : void 0;
2540
- if (h && !F)
2541
- throw new Error(`Cannot upload file ${h} because it's not cached.`);
2542
- !p && !O.startsWith("http") && (!O.startsWith("/") && !O.startsWith("blob:") && (O = "/" + O), O = t.meta.offline.effect.BASE_URL + O);
2539
+ const F = l ? await e.files.fetchCache(l) : void 0;
2540
+ if (l && !F)
2541
+ throw new Error(`Cannot upload file ${l} because it's not cached.`);
2542
+ !m && !O.startsWith("http") && (!O.startsWith("/") && !O.startsWith("blob:") && (O = "/" + O), O = t.meta.offline.effect.BASE_URL + O);
2543
2543
  const k = (v) => {
2544
- if (h) {
2544
+ if (l) {
2545
2545
  const M = R.s3url;
2546
- if (!M) throw new Error(`No S3 URL for file ${h}`);
2547
- if ("warning" in M) throw new Error(`S3 URL warning for file ${h}`);
2548
- if (!F) throw new Error(`No file for file ${h}`);
2546
+ if (!M) throw new Error(`No S3 URL for file ${l}`);
2547
+ if ("warning" in M) throw new Error(`S3 URL warning for file ${l}`);
2548
+ if (!F) throw new Error(`No file for file ${l}`);
2549
2549
  const ke = M.fields["x-amz-checksum-sha1"];
2550
- if (!ke) throw new Error(`No checksum for file ${h}`);
2550
+ if (!ke) throw new Error(`No checksum for file ${l}`);
2551
2551
  return v.set("x-amz-checksum-sha1", ke).field({ ...o, ...M.fields }).attach("file", F);
2552
2552
  }
2553
2553
  return v.send(o);
@@ -2575,7 +2575,7 @@ async function Xa(t, e) {
2575
2575
  const v = s.auth.getAuthHeader();
2576
2576
  ge = ge.set("Authorization", v);
2577
2577
  }
2578
- l && (ge = ge.set(l));
2578
+ h && (ge = ge.set(h));
2579
2579
  try {
2580
2580
  return await ge.query(d);
2581
2581
  } catch (v) {
@@ -2661,8 +2661,8 @@ Retries:`,
2661
2661
  if (!d)
2662
2662
  throw new Error("Outbox coordinator not set");
2663
2663
  d.remove(e.payload.uuid);
2664
- const h = e.meta.offline.rollback;
2665
- throw h && (console.warn("Rolling back request due to SDK error:", e), i.dispatch(h)), t;
2664
+ const l = e.meta.offline.rollback;
2665
+ throw l && (console.warn("Rolling back request due to SDK error:", e), i.dispatch(l)), t;
2666
2666
  }
2667
2667
  if (t instanceof j && t.options.discard)
2668
2668
  return console.debug("Discarding request due to explicit discard:", e), o();
@@ -2673,17 +2673,17 @@ Retries:`,
2673
2673
  if (d || console.warn("Error has no status code:", t), d !== void 0 && ec.includes(d)) {
2674
2674
  console.warn("Discarding request due to error:", t, `
2675
2675
  Action:`, e);
2676
- const h = Ee();
2677
- if (!h)
2676
+ const l = Ee();
2677
+ if (!l)
2678
2678
  throw new Error("Outbox coordinator not set");
2679
- h.remove(e.payload.uuid), t.options.discard = !0, o();
2679
+ l.remove(e.payload.uuid), t.options.discard = !0, o();
2680
2680
  }
2681
2681
  }
2682
2682
  console.debug("Registering a retry for request:", e.payload.uuid);
2683
- const l = Ee();
2684
- if (!l)
2683
+ const h = Ee();
2684
+ if (!h)
2685
2685
  throw new Error("Outbox coordinator not set");
2686
- return l.registerRetry(e.payload.uuid), !1;
2686
+ return h.registerRetry(e.payload.uuid), !1;
2687
2687
  }
2688
2688
  function nm(t, e, s) {
2689
2689
  var i;
@@ -2810,12 +2810,12 @@ class E extends I {
2810
2810
  documentAttachmentReducer: a,
2811
2811
  projectAttachmentReducer: c,
2812
2812
  formRevisionAttachmentReducer: o,
2813
- formSubmissionAttachmentReducer: l,
2813
+ formSubmissionAttachmentReducer: h,
2814
2814
  geoImageReducer: r,
2815
2815
  // fields
2816
2816
  assetTypeFieldsAttachmentReducer: d,
2817
- assetTypeFieldValuesAttachmentReducer: h,
2818
- issueTypeFieldsAttachmentReducer: p,
2817
+ assetTypeFieldValuesAttachmentReducer: l,
2818
+ issueTypeFieldsAttachmentReducer: m,
2819
2819
  issueTypeFieldValuesAttachmentReducer: f
2820
2820
  } = this.client.store.getState();
2821
2821
  return [].concat(
@@ -2825,11 +2825,11 @@ class E extends I {
2825
2825
  Object.values(a.instances),
2826
2826
  Object.values(c.instances),
2827
2827
  Object.values(o.instances),
2828
- Object.values(l.instances),
2828
+ Object.values(h.instances),
2829
2829
  Object.values(r.instances),
2830
2830
  Object.values(d.instances),
2831
- Object.values(h.instances),
2832
- Object.values(p.instances),
2831
+ Object.values(l.instances),
2832
+ Object.values(m.instances),
2833
2833
  Object.values(f.instances)
2834
2834
  ).filter((R) => R.file_sha1 === e).length;
2835
2835
  }
@@ -2865,15 +2865,15 @@ class be extends E {
2865
2865
  var r;
2866
2866
  const { store: s } = this.client, i = (r = s.getState().userReducer.currentUser) == null ? void 0 : r.id, n = (/* @__PURE__ */ new Date()).toISOString(), a = [], c = [], o = {};
2867
2867
  for (const d of e) {
2868
- const { modelUuid: h, file: p } = d, f = await this.getFilePayload(p);
2868
+ const { modelUuid: l, file: m } = d, f = await this.getFilePayload(m);
2869
2869
  f.sha1 in o || (o[f.sha1] = f);
2870
2870
  const g = this.buildOfflineAttachment({
2871
- file: p,
2871
+ file: m,
2872
2872
  file_sha1: f.sha1,
2873
2873
  submitted_at: n,
2874
2874
  created_by: i,
2875
2875
  description: "",
2876
- modelUuid: h
2876
+ modelUuid: l
2877
2877
  });
2878
2878
  a.push(g), c.push(
2879
2879
  this.buildAttachmentPayload({
@@ -2882,12 +2882,12 @@ class be extends E {
2882
2882
  file_sha1: g.file_sha1,
2883
2883
  file_extension: f.extension,
2884
2884
  description: g.description,
2885
- modelUuid: h
2885
+ modelUuid: l
2886
2886
  })
2887
2887
  );
2888
2888
  }
2889
2889
  this.dispatch(this.addAttachments(a));
2890
- const l = this.enqueueRequest({
2890
+ const h = this.enqueueRequest({
2891
2891
  description: `Add ${this.name}`,
2892
2892
  method: u.POST,
2893
2893
  url: `${this.url}/bulk/`,
@@ -2899,11 +2899,11 @@ class be extends E {
2899
2899
  blocks: a.map((d) => d.uuid),
2900
2900
  blockers: a.map((d) => d.file_sha1)
2901
2901
  });
2902
- return l.then(({ attachments: d, presigned_urls: h }) => {
2903
- this.dispatch(this.updateAttachments(d)), this.processPresignedUrls(h);
2902
+ return h.then(({ attachments: d, presigned_urls: l }) => {
2903
+ this.dispatch(this.updateAttachments(d)), this.processPresignedUrls(l);
2904
2904
  }).catch(() => {
2905
2905
  this.dispatch(this.removeAttachments(a.map((d) => d.uuid)));
2906
- }), [a, l.then(({ attachments: d }) => d)];
2906
+ }), [a, h.then(({ attachments: d }) => d)];
2907
2907
  }
2908
2908
  async _delete(e) {
2909
2909
  const { store: s } = this.client, i = this.selectAttachment(e)(s.getState());
@@ -3027,26 +3027,26 @@ class zb extends be {
3027
3027
  }
3028
3028
  class Ub extends E {
3029
3029
  async bulkAdd(e) {
3030
- var l;
3031
- const s = (/* @__PURE__ */ new Date()).toISOString(), i = (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id, n = {}, a = [], c = [];
3030
+ var h;
3031
+ const s = (/* @__PURE__ */ new Date()).toISOString(), i = (h = this.client.store.getState().userReducer.currentUser) == null ? void 0 : h.id, n = {}, a = [], c = [];
3032
3032
  for (const r of e) {
3033
- const { fieldsRevisionUuid: d, fieldIdentifier: h, file: p } = r, f = await this.getFilePayload(p);
3033
+ const { fieldsRevisionUuid: d, fieldIdentifier: l, file: m } = r, f = await this.getFilePayload(m);
3034
3034
  f.sha1 in n || (n[f.sha1] = f);
3035
3035
  const g = _({
3036
- file: URL.createObjectURL(p),
3037
- file_type: p.type,
3038
- file_name: p.name,
3036
+ file: URL.createObjectURL(m),
3037
+ file_type: m.type,
3038
+ file_name: m.name,
3039
3039
  file_sha1: f.sha1,
3040
3040
  created_by: i,
3041
3041
  fields_revision: d,
3042
3042
  submitted_at: s,
3043
- field_identifier: h
3043
+ field_identifier: l
3044
3044
  });
3045
3045
  a.push(g);
3046
3046
  const R = {
3047
3047
  uuid: g.uuid,
3048
- file_name: p.name,
3049
- field_identifier: h,
3048
+ file_name: m.name,
3049
+ field_identifier: l,
3050
3050
  file_extension: f.extension,
3051
3051
  file_sha1: f.sha1,
3052
3052
  fields_revision: d
@@ -3107,10 +3107,10 @@ class $b extends I {
3107
3107
  blockers: [a.asset_procedure],
3108
3108
  blocks: [a.uuid]
3109
3109
  });
3110
- return c.then((l) => {
3111
- this.dispatch(lr(l));
3112
- }).catch((l) => {
3113
- throw this.dispatch(hr(a.uuid)), l;
3110
+ return c.then((h) => {
3111
+ this.dispatch(lr(h));
3112
+ }).catch((h) => {
3113
+ throw this.dispatch(hr(a.uuid)), h;
3114
3114
  }), [a, c];
3115
3115
  }
3116
3116
  async refreshStore(e) {
@@ -3140,10 +3140,10 @@ class Gb extends E {
3140
3140
  var r;
3141
3141
  const i = (/* @__PURE__ */ new Date()).toISOString(), n = (r = this.client.store.getState().userReducer.currentUser) == null ? void 0 : r.id, a = Le(e, s ?? e.length), c = [], o = [];
3142
3142
  for (const d of a) {
3143
- const h = {}, p = [];
3143
+ const l = {}, m = [];
3144
3144
  for (const f of d) {
3145
3145
  const { fieldValuesUuid: g, fieldIdentifier: R, file: O } = f, F = await this.getFilePayload(O);
3146
- F.sha1 in h || (h[F.sha1] = F);
3146
+ F.sha1 in l || (l[F.sha1] = F);
3147
3147
  const k = _(
3148
3148
  {
3149
3149
  file: URL.createObjectURL(O),
@@ -3165,36 +3165,36 @@ class Gb extends E {
3165
3165
  field_identifier: R,
3166
3166
  field_values: g
3167
3167
  };
3168
- p.push(Be);
3168
+ m.push(Be);
3169
3169
  }
3170
3170
  o.push({
3171
3171
  submitted_at: i,
3172
- attachments: p,
3173
- files: Object.values(h)
3172
+ attachments: m,
3173
+ files: Object.values(l)
3174
3174
  });
3175
3175
  }
3176
3176
  this.dispatch(yt(c));
3177
- const l = o.map((d) => this.enqueueRequest({
3177
+ const h = o.map((d) => this.enqueueRequest({
3178
3178
  description: "Add asset procedure field values attachments",
3179
3179
  method: u.POST,
3180
3180
  url: "/asset-procedure-field-values-attachments/bulk/",
3181
3181
  payload: d,
3182
- blockers: d.attachments.map((h) => h.field_values),
3183
- blocks: d.attachments.map((h) => h.uuid)
3182
+ blockers: d.attachments.map((l) => l.field_values),
3183
+ blocks: d.attachments.map((l) => l.uuid)
3184
3184
  }));
3185
- return Promise.all(l).then((d) => {
3186
- for (const p of d) this.processPresignedUrls(p.presigned_urls);
3187
- const h = d.flatMap((p) => p.attachments);
3188
- this.dispatch(yr(h));
3185
+ return Promise.all(h).then((d) => {
3186
+ for (const m of d) this.processPresignedUrls(m.presigned_urls);
3187
+ const l = d.flatMap((m) => m.attachments);
3188
+ this.dispatch(yr(l));
3189
3189
  }).catch((d) => {
3190
3190
  throw this.dispatch(
3191
3191
  At(
3192
- c.map((h) => h.uuid)
3192
+ c.map((l) => l.uuid)
3193
3193
  )
3194
3194
  ), d;
3195
3195
  }), [
3196
3196
  c,
3197
- l.map((d) => d.then(({ attachments: h }) => h))
3197
+ h.map((d) => d.then(({ attachments: l }) => l))
3198
3198
  ];
3199
3199
  }
3200
3200
  async bulkDelete(e) {
@@ -3247,24 +3247,24 @@ class Vb extends I {
3247
3247
  }), [n, a];
3248
3248
  }
3249
3249
  bulkAdd(e, s) {
3250
- var l;
3250
+ var h;
3251
3251
  const i = (/* @__PURE__ */ new Date()).toISOString(), n = [], a = Le(e.payloads, s ?? e.payloads.length), c = [];
3252
3252
  for (const r of a) {
3253
3253
  const d = [];
3254
- for (const h of r) {
3255
- const p = _({
3256
- ...h,
3257
- values: h.values,
3258
- created_by: (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id,
3254
+ for (const l of r) {
3255
+ const m = _({
3256
+ ...l,
3257
+ values: l.values,
3258
+ created_by: (h = this.client.store.getState().userReducer.currentUser) == null ? void 0 : h.id,
3259
3259
  submitted_at: i
3260
3260
  });
3261
- n.push(p), d.push({
3262
- uuid: p.uuid,
3263
- asset: h.asset,
3264
- fields_revision: h.fields_revision,
3265
- asset_procedure_instance: h.asset_procedure_instance,
3266
- published_at: h.published_at,
3267
- values: p.values
3261
+ n.push(m), d.push({
3262
+ uuid: m.uuid,
3263
+ asset: l.asset,
3264
+ fields_revision: l.fields_revision,
3265
+ asset_procedure_instance: l.asset_procedure_instance,
3266
+ published_at: l.published_at,
3267
+ values: m.values
3268
3268
  });
3269
3269
  }
3270
3270
  c.push({
@@ -3276,12 +3276,12 @@ class Vb extends I {
3276
3276
  this.dispatch(Rr(n));
3277
3277
  const o = [];
3278
3278
  for (const r of c) {
3279
- const d = r.field_values.map((R) => R.asset), h = r.field_values.map((R) => R.fields_revision), p = r.field_values.map((R) => R.asset_procedure_instance), f = r.field_values.map((R) => R.uuid), g = this.enqueueRequest({
3279
+ const d = r.field_values.map((R) => R.asset), l = r.field_values.map((R) => R.fields_revision), m = r.field_values.map((R) => R.asset_procedure_instance), f = r.field_values.map((R) => R.uuid), g = this.enqueueRequest({
3280
3280
  description: "Bulk add asset procedure field values",
3281
3281
  method: u.POST,
3282
3282
  url: "/asset-procedure-field-values/bulk/",
3283
3283
  payload: r,
3284
- blockers: [...d, ...h, ...p],
3284
+ blockers: [...d, ...l, ...m],
3285
3285
  blocks: f
3286
3286
  });
3287
3287
  o.push(g);
@@ -3372,8 +3372,8 @@ class Lb extends I {
3372
3372
  blockers: [e.asset_procedure, e.asset_type],
3373
3373
  blocks: [a.uuid]
3374
3374
  });
3375
- return c.then((l) => {
3376
- this.dispatch(Je(l));
3375
+ return c.then((h) => {
3376
+ this.dispatch(Je(h));
3377
3377
  }).catch(() => {
3378
3378
  this.dispatch(Xt(a.uuid));
3379
3379
  }), [a, c];
@@ -3446,8 +3446,8 @@ class Bb extends I {
3446
3446
  blockers: [],
3447
3447
  blocks: [a.uuid]
3448
3448
  });
3449
- return c.then((l) => {
3450
- this.dispatch(He(l));
3449
+ return c.then((h) => {
3450
+ this.dispatch(He(h));
3451
3451
  }).catch(() => {
3452
3452
  this.dispatch(ss(a.uuid));
3453
3453
  }), [a, c];
@@ -3525,8 +3525,8 @@ class Nb extends I {
3525
3525
  blockers: [a.asset_type],
3526
3526
  blocks: [a.uuid]
3527
3527
  });
3528
- return c.then((l) => {
3529
- this.dispatch(We(l));
3528
+ return c.then((h) => {
3529
+ this.dispatch(We(h));
3530
3530
  }).catch(() => {
3531
3531
  this.dispatch(cs(a.uuid));
3532
3532
  }), [a, c];
@@ -3561,16 +3561,16 @@ class Nb extends I {
3561
3561
  if (!n) throw new Error(`No asset with uuid ${e} found in the store`);
3562
3562
  const a = Bc(e)(i), c = Ud(e)(i), o = uu(e)(i);
3563
3563
  if (this.dispatch(cs(e)), a.length > 0) {
3564
- const l = a.map(({ uuid: r }) => r);
3565
- this.dispatch(rn(l));
3564
+ const h = a.map(({ uuid: r }) => r);
3565
+ this.dispatch(rn(h));
3566
3566
  }
3567
3567
  if (c.length > 0) {
3568
- const l = c.map(({ uuid: r }) => r);
3569
- this.dispatch(Et(l));
3568
+ const h = c.map(({ uuid: r }) => r);
3569
+ this.dispatch(Et(h));
3570
3570
  }
3571
3571
  if (o.length > 0) {
3572
- const l = o.map(({ uuid: r }) => r);
3573
- this.dispatch(da(l));
3572
+ const h = o.map(({ uuid: r }) => r);
3573
+ this.dispatch(da(h));
3574
3574
  }
3575
3575
  return this.enqueueRequest({
3576
3576
  description: "Delete asset",
@@ -3578,13 +3578,13 @@ class Nb extends I {
3578
3578
  url: `/assets/${e}/`,
3579
3579
  blockers: [e],
3580
3580
  blocks: []
3581
- }).catch((l) => {
3582
- throw this.dispatch(as(n)), this.dispatch(cn(a)), this.dispatch(wt(c)), this.dispatch(oa(o)), l;
3581
+ }).catch((h) => {
3582
+ throw this.dispatch(as(n)), this.dispatch(cn(a)), this.dispatch(wt(c)), this.dispatch(oa(o)), h;
3583
3583
  });
3584
3584
  }
3585
3585
  bulkAdd(e, s, i, n) {
3586
3586
  const a = (/* @__PURE__ */ new Date()).toISOString(), c = Fe(), o = Le(e, n).map((d) => {
3587
- const h = d.map((p) => _(p));
3587
+ const l = d.map((m) => _(m));
3588
3588
  return {
3589
3589
  batchId: Fe(),
3590
3590
  payload: {
@@ -3592,30 +3592,30 @@ class Nb extends I {
3592
3592
  submitted_at: a,
3593
3593
  asset_type: s,
3594
3594
  project: i,
3595
- assets: h
3595
+ assets: l
3596
3596
  }
3597
3597
  };
3598
- }), l = [];
3598
+ }), h = [];
3599
3599
  let r = null;
3600
3600
  for (const d of o) {
3601
- const { batchId: h, payload: p } = d, f = p.assets.map((F) => F.uuid), g = [s];
3601
+ const { batchId: l, payload: m } = d, f = m.assets.map((F) => F.uuid), g = [s];
3602
3602
  r && g.push(r);
3603
3603
  const R = f;
3604
- R.push(h);
3604
+ R.push(l);
3605
3605
  const O = this.enqueueRequest({
3606
3606
  description: "Batch create assets",
3607
3607
  method: u.POST,
3608
3608
  url: "/assets/bulk/",
3609
- payload: p,
3609
+ payload: m,
3610
3610
  blockers: g,
3611
3611
  blocks: R
3612
3612
  });
3613
- r = d.batchId, l.push(O);
3613
+ r = d.batchId, h.push(O);
3614
3614
  }
3615
- return Promise.all(l).then((d) => {
3616
- const h = d.flat();
3617
- this.dispatch(Rn(h));
3618
- }), l;
3615
+ return Promise.all(h).then((d) => {
3616
+ const l = d.flat();
3617
+ this.dispatch(Rn(l));
3618
+ }), h;
3619
3619
  }
3620
3620
  async refreshStore(e) {
3621
3621
  const s = await this.enqueueRequest({
@@ -3648,8 +3648,8 @@ class Jb extends I {
3648
3648
  blockers: [e.asset, e.stage],
3649
3649
  blocks: [a.uuid]
3650
3650
  });
3651
- return c.then((l) => {
3652
- this.dispatch($r(l));
3651
+ return c.then((h) => {
3652
+ this.dispatch($r(h));
3653
3653
  }).catch(() => {
3654
3654
  this.dispatch(ls(a.uuid));
3655
3655
  }), [a, c];
@@ -3678,7 +3678,7 @@ class Jb extends I {
3678
3678
  submitted_at: i
3679
3679
  })), o = c.map(({ uuid: d }) => d);
3680
3680
  this.dispatch(us(c));
3681
- const l = this.enqueueRequest({
3681
+ const h = this.enqueueRequest({
3682
3682
  description: "Bulk create asset stage completions",
3683
3683
  method: u.POST,
3684
3684
  url: "/asset-stage-completions/bulk/",
@@ -3693,11 +3693,11 @@ class Jb extends I {
3693
3693
  ],
3694
3694
  blocks: o
3695
3695
  });
3696
- return l.then((d) => {
3696
+ return h.then((d) => {
3697
3697
  this.dispatch(Gr(d));
3698
3698
  }).catch(() => {
3699
3699
  this.dispatch(hs(o));
3700
- }), [c, l];
3700
+ }), [c, h];
3701
3701
  }
3702
3702
  bulkDelete(e) {
3703
3703
  const { store: s } = this.client, i = Br(e)(s.getState());
@@ -3732,8 +3732,8 @@ class Jb extends I {
3732
3732
  }
3733
3733
  class Hb extends I {
3734
3734
  bulkAdd(e, s) {
3735
- var l;
3736
- const i = (/* @__PURE__ */ new Date()).toISOString(), n = (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id, a = e.map((r) => _(r)), c = a.map((r) => ({ ...r, asset_procedure: s, created_by: n, submitted_at: i }));
3735
+ var h;
3736
+ const i = (/* @__PURE__ */ new Date()).toISOString(), n = (h = this.client.store.getState().userReducer.currentUser) == null ? void 0 : h.id, a = e.map((r) => _(r)), c = a.map((r) => ({ ...r, asset_procedure: s, created_by: n, submitted_at: i }));
3737
3737
  this.dispatch(ps(c));
3738
3738
  const o = this.enqueueRequest({
3739
3739
  description: "Add asset stages",
@@ -3878,26 +3878,26 @@ class Wb extends be {
3878
3878
  }
3879
3879
  class Kb extends E {
3880
3880
  async bulkAdd(e) {
3881
- var l;
3882
- const s = (/* @__PURE__ */ new Date()).toISOString(), i = (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id, n = {}, a = [], c = [];
3881
+ var h;
3882
+ const s = (/* @__PURE__ */ new Date()).toISOString(), i = (h = this.client.store.getState().userReducer.currentUser) == null ? void 0 : h.id, n = {}, a = [], c = [];
3883
3883
  for (const r of e) {
3884
- const { fieldsRevisionUuid: d, fieldIdentifier: h, file: p } = r, f = await this.getFilePayload(p);
3884
+ const { fieldsRevisionUuid: d, fieldIdentifier: l, file: m } = r, f = await this.getFilePayload(m);
3885
3885
  f.sha1 in n || (n[f.sha1] = f);
3886
3886
  const g = _({
3887
- file: URL.createObjectURL(p),
3888
- file_type: p.type,
3889
- file_name: p.name,
3887
+ file: URL.createObjectURL(m),
3888
+ file_type: m.type,
3889
+ file_name: m.name,
3890
3890
  file_sha1: f.sha1,
3891
3891
  created_by: i,
3892
3892
  fields_revision: d,
3893
3893
  submitted_at: s,
3894
- field_identifier: h
3894
+ field_identifier: l
3895
3895
  });
3896
3896
  a.push(g);
3897
3897
  const R = {
3898
3898
  uuid: g.uuid,
3899
- file_name: p.name,
3900
- field_identifier: h,
3899
+ file_name: m.name,
3900
+ field_identifier: l,
3901
3901
  file_extension: f.extension,
3902
3902
  file_sha1: f.sha1,
3903
3903
  fields_revision: d
@@ -3958,10 +3958,10 @@ class Yb extends I {
3958
3958
  blockers: [a.asset_type],
3959
3959
  blocks: [a.uuid]
3960
3960
  });
3961
- return c.then((l) => {
3962
- this.dispatch(fo(l));
3963
- }).catch((l) => {
3964
- throw this.dispatch(yo(a.uuid)), l;
3961
+ return c.then((h) => {
3962
+ this.dispatch(fo(h));
3963
+ }).catch((h) => {
3964
+ throw this.dispatch(yo(a.uuid)), h;
3965
3965
  }), [a, c];
3966
3966
  }
3967
3967
  async refreshStore(e) {
@@ -3983,10 +3983,10 @@ class Qb extends E {
3983
3983
  var r;
3984
3984
  const i = (/* @__PURE__ */ new Date()).toISOString(), n = (r = this.client.store.getState().userReducer.currentUser) == null ? void 0 : r.id, a = Le(e, s ?? e.length), c = [], o = [];
3985
3985
  for (const d of a) {
3986
- const h = {}, p = [];
3986
+ const l = {}, m = [];
3987
3987
  for (const f of d) {
3988
3988
  const { fieldValuesUuid: g, fieldIdentifier: R, file: O } = f, F = await this.getFilePayload(O);
3989
- F.sha1 in h || (h[F.sha1] = F);
3989
+ F.sha1 in l || (l[F.sha1] = F);
3990
3990
  const k = _({
3991
3991
  file: URL.createObjectURL(O),
3992
3992
  file_type: O.type,
@@ -4006,36 +4006,36 @@ class Qb extends E {
4006
4006
  field_identifier: R,
4007
4007
  field_values: g
4008
4008
  };
4009
- p.push(Be);
4009
+ m.push(Be);
4010
4010
  }
4011
4011
  o.push({
4012
4012
  submitted_at: i,
4013
- attachments: p,
4014
- files: Object.values(h)
4013
+ attachments: m,
4014
+ files: Object.values(l)
4015
4015
  });
4016
4016
  }
4017
4017
  this.dispatch(bt(c));
4018
- const l = o.map((d) => this.enqueueRequest({
4018
+ const h = o.map((d) => this.enqueueRequest({
4019
4019
  description: "Add asset type field values attachments",
4020
4020
  method: u.POST,
4021
4021
  url: "/asset-type-field-values-attachments/bulk/",
4022
4022
  payload: d,
4023
- blockers: d.attachments.map((h) => h.field_values),
4024
- blocks: d.attachments.map((h) => h.uuid)
4023
+ blockers: d.attachments.map((l) => l.field_values),
4024
+ blocks: d.attachments.map((l) => l.uuid)
4025
4025
  }));
4026
- return Promise.all(l).then((d) => {
4027
- for (const p of d) this.processPresignedUrls(p.presigned_urls);
4028
- const h = d.flatMap((p) => p.attachments);
4029
- this.dispatch(So(h));
4026
+ return Promise.all(h).then((d) => {
4027
+ for (const m of d) this.processPresignedUrls(m.presigned_urls);
4028
+ const l = d.flatMap((m) => m.attachments);
4029
+ this.dispatch(So(l));
4030
4030
  }).catch((d) => {
4031
4031
  throw this.dispatch(
4032
4032
  gt(
4033
- c.map((h) => h.uuid)
4033
+ c.map((l) => l.uuid)
4034
4034
  )
4035
4035
  ), d;
4036
4036
  }), [
4037
4037
  c,
4038
- l.map((d) => d.then(({ attachments: h }) => h))
4038
+ h.map((d) => d.then(({ attachments: l }) => l))
4039
4039
  ];
4040
4040
  }
4041
4041
  async bulkDelete(e) {
@@ -4088,23 +4088,23 @@ class Xb extends I {
4088
4088
  }), [n, a];
4089
4089
  }
4090
4090
  bulkAdd(e, s) {
4091
- var l;
4091
+ var h;
4092
4092
  const i = (/* @__PURE__ */ new Date()).toISOString(), n = [], a = Le(e.payloads, s ?? e.payloads.length), c = [];
4093
4093
  for (const r of a) {
4094
4094
  const d = [];
4095
- for (const h of r) {
4096
- const p = _({
4097
- ...h,
4098
- values: h.values,
4099
- created_by: (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id,
4095
+ for (const l of r) {
4096
+ const m = _({
4097
+ ...l,
4098
+ values: l.values,
4099
+ created_by: (h = this.client.store.getState().userReducer.currentUser) == null ? void 0 : h.id,
4100
4100
  submitted_at: i
4101
4101
  });
4102
- n.push(p), d.push({
4103
- uuid: p.uuid,
4104
- asset: h.asset,
4105
- fields_revision: h.fields_revision,
4106
- published_at: h.published_at,
4107
- values: p.values
4102
+ n.push(m), d.push({
4103
+ uuid: m.uuid,
4104
+ asset: l.asset,
4105
+ fields_revision: l.fields_revision,
4106
+ published_at: l.published_at,
4107
+ values: m.values
4108
4108
  });
4109
4109
  }
4110
4110
  c.push({
@@ -4116,13 +4116,13 @@ class Xb extends I {
4116
4116
  this.dispatch(Fo(n));
4117
4117
  const o = [];
4118
4118
  for (const r of c) {
4119
- const d = r.field_values.map((g) => g.asset), h = r.field_values.map((g) => g.fields_revision), p = r.field_values.map((g) => g.uuid), f = this.enqueueRequest({
4119
+ const d = r.field_values.map((g) => g.asset), l = r.field_values.map((g) => g.fields_revision), m = r.field_values.map((g) => g.uuid), f = this.enqueueRequest({
4120
4120
  description: "Bulk add asset type field values",
4121
4121
  method: u.POST,
4122
4122
  url: "/asset-type-field-values/bulk/",
4123
4123
  payload: r,
4124
- blockers: [...d, ...h],
4125
- blocks: p
4124
+ blockers: [...d, ...l],
4125
+ blocks: m
4126
4126
  });
4127
4127
  o.push(f);
4128
4128
  }
@@ -4208,8 +4208,8 @@ class Zb extends I {
4208
4208
  blockers: [],
4209
4209
  blocks: [a.uuid]
4210
4210
  });
4211
- return c.then((l) => {
4212
- this.dispatch(Ye(l));
4211
+ return c.then((h) => {
4212
+ this.dispatch(Ye(h));
4213
4213
  }).catch(() => {
4214
4214
  this.dispatch(vs(a.uuid));
4215
4215
  }), [a, c];
@@ -4368,11 +4368,11 @@ class tg extends be {
4368
4368
  }
4369
4369
  // NOTE: overriding the method from BaseAttachmentService since document attachments get vectorized
4370
4370
  async bulkAdd(s) {
4371
- var h;
4372
- const { store: i } = this.client, n = (h = i.getState().userReducer.currentUser) == null ? void 0 : h.id, a = (/* @__PURE__ */ new Date()).toISOString(), c = [], o = [], l = {}, r = {};
4373
- for (const p of s) {
4374
- const { documentUuid: f, file: g } = p, R = await this.getFilePayload(g);
4375
- R.sha1 in l || (l[R.sha1] = R, r[R.sha1] = []);
4371
+ var l;
4372
+ const { store: i } = this.client, n = (l = i.getState().userReducer.currentUser) == null ? void 0 : l.id, a = (/* @__PURE__ */ new Date()).toISOString(), c = [], o = [], h = {}, r = {};
4373
+ for (const m of s) {
4374
+ const { documentUuid: f, file: g } = m, R = await this.getFilePayload(g);
4375
+ R.sha1 in h || (h[R.sha1] = R, r[R.sha1] = []);
4376
4376
  const O = this.buildOfflineAttachment({
4377
4377
  file: g,
4378
4378
  file_sha1: R.sha1,
@@ -4398,13 +4398,13 @@ class tg extends be {
4398
4398
  payload: {
4399
4399
  submitted_at: a,
4400
4400
  attachments: o,
4401
- files: Object.values(l)
4401
+ files: Object.values(h)
4402
4402
  },
4403
- blocks: c.map((p) => p.uuid),
4404
- blockers: c.map((p) => p.file_sha1)
4403
+ blocks: c.map((m) => m.uuid),
4404
+ blockers: c.map((m) => m.file_sha1)
4405
4405
  });
4406
- return d.then(({ attachments: p, presigned_urls: f }) => {
4407
- this.dispatch(this.updateAttachments(p));
4406
+ return d.then(({ attachments: m, presigned_urls: f }) => {
4407
+ this.dispatch(this.updateAttachments(m));
4408
4408
  const g = this.processPresignedUrls(f);
4409
4409
  for (const [R, O] of Object.entries(g))
4410
4410
  O.then(() => {
@@ -4413,8 +4413,8 @@ class tg extends be {
4413
4413
  this.makeReadable(k);
4414
4414
  });
4415
4415
  }).catch(() => {
4416
- this.dispatch(this.removeAttachments(c.map((p) => p.uuid)));
4417
- }), [c, d.then(({ attachments: p }) => p)];
4416
+ this.dispatch(this.removeAttachments(c.map((m) => m.uuid)));
4417
+ }), [c, d.then(({ attachments: m }) => m)];
4418
4418
  }
4419
4419
  async delete(s) {
4420
4420
  return this._delete(s);
@@ -4514,7 +4514,7 @@ class sg extends I {
4514
4514
  c.push(r), r.parent_document && c.push(a[r.parent_document]);
4515
4515
  }
4516
4516
  this.dispatch(Qo({ documentId: e, targetDocumentId: s, position: i }));
4517
- const l = this.enqueueRequest({
4517
+ const h = this.enqueueRequest({
4518
4518
  description: "Move Document",
4519
4519
  method: u.PATCH,
4520
4520
  url: `/documents/${e}/move/`,
@@ -4525,11 +4525,11 @@ class sg extends I {
4525
4525
  blockers: [e],
4526
4526
  blocks: []
4527
4527
  });
4528
- return l.then((r) => {
4528
+ return h.then((r) => {
4529
4529
  this.dispatch(Se(r));
4530
4530
  }).catch(() => {
4531
4531
  this.dispatch(Se(c));
4532
- }), l;
4532
+ }), h;
4533
4533
  }
4534
4534
  delete(e) {
4535
4535
  const { store: s } = this.client, i = Ue(s.getState()), n = Zo(e)(s.getState());
@@ -4703,7 +4703,7 @@ class ag extends I {
4703
4703
  return [a, Promise.resolve(void 0).then()];
4704
4704
  throw new Error(c.warning);
4705
4705
  }
4706
- const o = c.url, l = this.enqueueRequest({
4706
+ const o = c.url, h = this.enqueueRequest({
4707
4707
  url: o,
4708
4708
  description: "Upload file",
4709
4709
  method: u.POST,
@@ -4714,7 +4714,7 @@ class ag extends I {
4714
4714
  blocks: [s],
4715
4715
  s3url: c
4716
4716
  });
4717
- return [a, l];
4717
+ return [a, h];
4718
4718
  }
4719
4719
  /**
4720
4720
  * Fetches a file based on its URL and SHA1. SHA1 values should be known ahead of time because the SHA1 and URL of
@@ -4734,11 +4734,11 @@ class ag extends I {
4734
4734
  return c;
4735
4735
  }
4736
4736
  if (s.startsWith("blob:")) {
4737
- const d = await wc(s), h = new File([d], n ?? i, { type: d.type });
4738
- return await this.addCache(h, i), h;
4737
+ const d = await wc(s), l = new File([d], n ?? i, { type: d.type });
4738
+ return await this.addCache(l, i), l;
4739
4739
  }
4740
- let o = st[a], l = !0;
4741
- o ? l = !1 : (o = new Promise((d) => {
4740
+ let o = st[a], h = !0;
4741
+ o ? h = !1 : (o = new Promise((d) => {
4742
4742
  this.enqueueRequest({
4743
4743
  description: "Download file",
4744
4744
  method: u.GET,
@@ -4750,18 +4750,18 @@ class ag extends I {
4750
4750
  isAuthNeeded: !1,
4751
4751
  blockers: [i],
4752
4752
  blocks: [i]
4753
- }).then((h) => {
4754
- const p = new File([h], n ?? i, { type: h.type });
4755
- d(p);
4753
+ }).then((l) => {
4754
+ const m = new File([l], n ?? i, { type: l.type });
4755
+ d(m);
4756
4756
  });
4757
4757
  }), st[a] = o);
4758
4758
  let r;
4759
4759
  try {
4760
4760
  r = await o;
4761
4761
  } catch (d) {
4762
- throw l && d instanceof j && delete st[a], d;
4762
+ throw h && d instanceof j && delete st[a], d;
4763
4763
  }
4764
- if (l) {
4764
+ if (h) {
4765
4765
  const d = await ze(r);
4766
4766
  if (d !== i) {
4767
4767
  const f = `The hash of the file returned from the server (${d}) does not match the
@@ -4773,11 +4773,11 @@ class ag extends I {
4773
4773
  external URLs and therefore not prepended with VITE_API_URL.`;
4774
4774
  throw new Error(f);
4775
4775
  }
4776
- const h = r.type.split("/")[1];
4777
- if (!h)
4776
+ const l = r.type.split("/")[1];
4777
+ if (!l)
4778
4778
  throw new Error("File has no extension");
4779
- const p = n ?? d + "." + h;
4780
- if (r = vc(r, p), !r.name)
4779
+ const m = n ?? d + "." + l;
4780
+ if (r = vc(r, m), !r.name)
4781
4781
  throw new Error("Failed to set file's name");
4782
4782
  await this.addCache(r, d), st[a] = new Promise((f) => {
4783
4783
  f(r);
@@ -4788,26 +4788,26 @@ class ag extends I {
4788
4788
  }
4789
4789
  class cg extends E {
4790
4790
  async bulkAdd(e) {
4791
- var l;
4792
- const s = (/* @__PURE__ */ new Date()).toISOString(), i = (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id, n = {}, a = [], c = [];
4791
+ var h;
4792
+ const s = (/* @__PURE__ */ new Date()).toISOString(), i = (h = this.client.store.getState().userReducer.currentUser) == null ? void 0 : h.id, n = {}, a = [], c = [];
4793
4793
  for (const r of e) {
4794
- const { revisionUuid: d, fieldIdentifier: h, file: p } = r, f = await this.getFilePayload(p);
4794
+ const { revisionUuid: d, fieldIdentifier: l, file: m } = r, f = await this.getFilePayload(m);
4795
4795
  f.sha1 in n || (n[f.sha1] = f);
4796
4796
  const g = _({
4797
- file: URL.createObjectURL(p),
4798
- file_type: p.type,
4799
- file_name: p.name,
4797
+ file: URL.createObjectURL(m),
4798
+ file_type: m.type,
4799
+ file_name: m.name,
4800
4800
  file_sha1: f.sha1,
4801
4801
  created_by: i,
4802
4802
  form_revision: d,
4803
4803
  submitted_at: s,
4804
- field_identifier: h
4804
+ field_identifier: l
4805
4805
  });
4806
4806
  a.push(g);
4807
4807
  const R = {
4808
4808
  uuid: g.uuid,
4809
- file_name: p.name,
4810
- field_identifier: h,
4809
+ file_name: m.name,
4810
+ field_identifier: l,
4811
4811
  file_extension: f.extension,
4812
4812
  file_sha1: f.sha1,
4813
4813
  form_revision: d
@@ -4866,8 +4866,8 @@ class rg extends E {
4866
4866
  blockers: [e.form],
4867
4867
  blocks: [a.uuid]
4868
4868
  });
4869
- return c.then((l) => {
4870
- this.dispatch(gd(l));
4869
+ return c.then((h) => {
4870
+ this.dispatch(gd(h));
4871
4871
  }).catch(() => {
4872
4872
  this.dispatch(Kn(a.uuid));
4873
4873
  }), [a, c];
@@ -4900,7 +4900,7 @@ class og extends E {
4900
4900
  created_by: a
4901
4901
  });
4902
4902
  this.dispatch(Gs(c)), this.dispatch(Wn(o));
4903
- const l = this.enqueueRequest({
4903
+ const h = this.enqueueRequest({
4904
4904
  description: "Create form",
4905
4905
  method: u.POST,
4906
4906
  url: "/forms/",
@@ -4917,9 +4917,9 @@ class og extends E {
4917
4917
  blockers: [],
4918
4918
  blocks: [c.uuid, o.uuid]
4919
4919
  });
4920
- return l.catch((d) => {
4920
+ return h.catch((d) => {
4921
4921
  throw this.dispatch(Vs(c.uuid)), this.dispatch(Kn(o.uuid)), d;
4922
- }), [c, o, l];
4922
+ }), [c, o, h];
4923
4923
  }
4924
4924
  async delete(e) {
4925
4925
  const { store: s } = this.client, i = s.getState(), n = wd(e)(i);
@@ -4957,28 +4957,28 @@ class og extends E {
4957
4957
  }
4958
4958
  class dg extends E {
4959
4959
  async bulkAdd(e) {
4960
- var l;
4961
- const s = (/* @__PURE__ */ new Date()).toISOString(), i = (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id, n = {}, a = [], c = [];
4960
+ var h;
4961
+ const s = (/* @__PURE__ */ new Date()).toISOString(), i = (h = this.client.store.getState().userReducer.currentUser) == null ? void 0 : h.id, n = {}, a = [], c = [];
4962
4962
  for (const r of e) {
4963
- const { submissionUuid: d, fieldIdentifier: h, file: p } = r, f = await this.getFilePayload(p);
4963
+ const { submissionUuid: d, fieldIdentifier: l, file: m } = r, f = await this.getFilePayload(m);
4964
4964
  f.sha1 in n || (n[f.sha1] = f);
4965
4965
  const g = _({
4966
- file: URL.createObjectURL(p),
4967
- file_type: p.type,
4968
- file_name: p.name,
4966
+ file: URL.createObjectURL(m),
4967
+ file_type: m.type,
4968
+ file_name: m.name,
4969
4969
  file_sha1: f.sha1,
4970
4970
  created_by: i,
4971
4971
  form_submission: d,
4972
4972
  submitted_at: s,
4973
- field_identifier: h
4973
+ field_identifier: l
4974
4974
  });
4975
4975
  a.push(g);
4976
4976
  const R = {
4977
4977
  uuid: g.uuid,
4978
- file_name: p.name,
4978
+ file_name: m.name,
4979
4979
  file_sha1: f.sha1,
4980
4980
  file_extension: f.extension,
4981
- field_identifier: h,
4981
+ field_identifier: l,
4982
4982
  form_submission: d
4983
4983
  };
4984
4984
  c.push(R);
@@ -5117,11 +5117,11 @@ class ug extends E {
5117
5117
  }
5118
5118
  class lg extends E {
5119
5119
  async add(e) {
5120
- var h;
5121
- const { store: s } = this.client, { file: i, ...n } = e, a = (/* @__PURE__ */ new Date()).toISOString(), c = (h = s.getState().userReducer.currentUser) == null ? void 0 : h.id, o = n.project, l = await this.getFilePayload(i), r = _({
5120
+ var l;
5121
+ const { store: s } = this.client, { file: i, ...n } = e, a = (/* @__PURE__ */ new Date()).toISOString(), c = (l = s.getState().userReducer.currentUser) == null ? void 0 : l.id, o = n.project, h = await this.getFilePayload(i), r = _({
5122
5122
  ...n,
5123
5123
  file_name: i.name,
5124
- file_sha1: l.sha1,
5124
+ file_sha1: h.sha1,
5125
5125
  file: URL.createObjectURL(i),
5126
5126
  submitted_at: a,
5127
5127
  created_by: c
@@ -5143,22 +5143,22 @@ class lg extends E {
5143
5143
  file_name: r.file_name,
5144
5144
  direction: r.direction,
5145
5145
  original_date: r.original_date,
5146
- file: l
5146
+ file: h
5147
5147
  },
5148
5148
  blocks: [o],
5149
5149
  blockers: [o]
5150
5150
  });
5151
- return d.then((p) => {
5152
- this.processPresignedUrls(p.presigned_urls), this.dispatch(Qe(p.geo_image));
5151
+ return d.then((m) => {
5152
+ this.processPresignedUrls(m.presigned_urls), this.dispatch(Qe(m.geo_image));
5153
5153
  }).catch(() => {
5154
5154
  this.dispatch(Ks(r.uuid));
5155
- }), [r, d.then((p) => p.geo_image)];
5155
+ }), [r, d.then((m) => m.geo_image)];
5156
5156
  }
5157
5157
  async bulkAdd(e, s) {
5158
- var h;
5159
- const { store: i } = this.client, n = (/* @__PURE__ */ new Date()).toISOString(), a = (h = i.getState().userReducer.currentUser) == null ? void 0 : h.id, c = [], o = [], l = [], r = {};
5160
- for (const p of e) {
5161
- const { file: f, ...g } = p, R = await this.getFilePayload(f);
5158
+ var l;
5159
+ const { store: i } = this.client, n = (/* @__PURE__ */ new Date()).toISOString(), a = (l = i.getState().userReducer.currentUser) == null ? void 0 : l.id, c = [], o = [], h = [], r = {};
5160
+ for (const m of e) {
5161
+ const { file: f, ...g } = m, R = await this.getFilePayload(f);
5162
5162
  R.sha1 in r || (r[R.sha1] = R);
5163
5163
  const O = _({
5164
5164
  ...g,
@@ -5169,7 +5169,7 @@ class lg extends E {
5169
5169
  created_by: a,
5170
5170
  project: s
5171
5171
  });
5172
- c.push(O), o.push(O.uuid), l.push({
5172
+ c.push(O), o.push(O.uuid), h.push({
5173
5173
  uuid: O.uuid,
5174
5174
  sha1: O.file_sha1,
5175
5175
  file_name: O.file_name,
@@ -5189,17 +5189,17 @@ class lg extends E {
5189
5189
  payload: {
5190
5190
  submitted_at: n,
5191
5191
  project: s,
5192
- geo_images: l,
5192
+ geo_images: h,
5193
5193
  files: Object.values(r)
5194
5194
  },
5195
5195
  blocks: [s],
5196
5196
  blockers: o
5197
5197
  });
5198
- return d.then((p) => {
5199
- this.processPresignedUrls(p.presigned_urls), this.dispatch(Vd(p.geo_images));
5198
+ return d.then((m) => {
5199
+ this.processPresignedUrls(m.presigned_urls), this.dispatch(Vd(m.geo_images));
5200
5200
  }).catch(() => {
5201
5201
  this.dispatch(Jd(o));
5202
- }), [c, d.then((p) => p.geo_images)];
5202
+ }), [c, d.then((m) => m.geo_images)];
5203
5203
  }
5204
5204
  update(e) {
5205
5205
  const { store: s } = this.client, i = s.getState(), n = Ys(e.uuid)(i);
@@ -5268,8 +5268,8 @@ class hg extends I {
5268
5268
  blockers: [a.geojson_layer],
5269
5269
  blocks: [a.uuid]
5270
5270
  });
5271
- return c.then((l) => {
5272
- this.dispatch(Xe(l));
5271
+ return c.then((h) => {
5272
+ this.dispatch(Xe(h));
5273
5273
  }).catch(() => {
5274
5274
  this.dispatch(Zs(a.uuid));
5275
5275
  }), [a, c];
@@ -5341,8 +5341,8 @@ class mg extends I {
5341
5341
  blockers: [a.project],
5342
5342
  blocks: [a.uuid]
5343
5343
  });
5344
- return c.then((l) => {
5345
- this.dispatch(Ze(l));
5344
+ return c.then((h) => {
5345
+ this.dispatch(Ze(h));
5346
5346
  }).catch(() => {
5347
5347
  this.dispatch(ii(a.uuid));
5348
5348
  }), [a, c];
@@ -5423,8 +5423,8 @@ class pg extends I {
5423
5423
  ],
5424
5424
  blocks: [a.uuid]
5425
5425
  });
5426
- return c.then((l) => {
5427
- this.dispatch(cu(l));
5426
+ return c.then((h) => {
5427
+ this.dispatch(cu(h));
5428
5428
  }).catch(() => {
5429
5429
  this.dispatch(ri(a.uuid));
5430
5430
  }), [a, c];
@@ -5633,8 +5633,8 @@ class Ag extends I {
5633
5633
  }
5634
5634
  class bg extends I {
5635
5635
  add(e) {
5636
- var l;
5637
- const { store: s } = this.client, i = s.getState(), n = (/* @__PURE__ */ new Date()).toISOString(), a = (l = i.userReducer.currentUser) == null ? void 0 : l.id, c = _({
5636
+ var h;
5637
+ const { store: s } = this.client, i = s.getState(), n = (/* @__PURE__ */ new Date()).toISOString(), a = (h = i.userReducer.currentUser) == null ? void 0 : h.id, c = _({
5638
5638
  ...e,
5639
5639
  submitted_at: n,
5640
5640
  created_by: a
@@ -5660,7 +5660,7 @@ class bg extends I {
5660
5660
  }), [c, o];
5661
5661
  }
5662
5662
  update(e) {
5663
- var l;
5663
+ var h;
5664
5664
  const s = this.client.store.getState(), i = Si(e.uuid)(s);
5665
5665
  if (!i)
5666
5666
  throw new Error(`Attempting to update an issue with uuid ${e.uuid} that doesn't exist in the store`);
@@ -5691,10 +5691,10 @@ class bg extends I {
5691
5691
  break;
5692
5692
  case w.CATEGORY: {
5693
5693
  let d = null;
5694
- const h = e[r];
5695
- if (h && (d = s.categoryReducer.instances[h] ?? null, !d))
5694
+ const l = e[r];
5695
+ if (l && (d = s.categoryReducer.instances[l] ?? null, !d))
5696
5696
  throw new Error(
5697
- `Trying to update issue category to ${h} which does not exist in store`
5697
+ `Trying to update issue category to ${l} which does not exist in store`
5698
5698
  );
5699
5699
  a[r] = d ? {
5700
5700
  name: d.name,
@@ -5705,10 +5705,10 @@ class bg extends I {
5705
5705
  }
5706
5706
  case w.ASSIGNED_TO: {
5707
5707
  let d = null;
5708
- const h = e[r];
5709
- if (h && (d = s.userReducer.instances[h] ?? null, !d))
5708
+ const l = e[r];
5709
+ if (l && (d = s.userReducer.instances[l] ?? null, !d))
5710
5710
  throw new Error(
5711
- `Trying to update issue assigned_to to ${h} which does not exist in store`
5711
+ `Trying to update issue assigned_to to ${l} which does not exist in store`
5712
5712
  );
5713
5713
  a[r] = d ? {
5714
5714
  full_name: d.username,
@@ -5718,7 +5718,7 @@ class bg extends I {
5718
5718
  }
5719
5719
  }
5720
5720
  const c = _({
5721
- created_by: (l = s.userReducer.currentUser) == null ? void 0 : l.id,
5721
+ created_by: (h = s.userReducer.currentUser) == null ? void 0 : h.id,
5722
5722
  submitted_at: (/* @__PURE__ */ new Date()).toISOString(),
5723
5723
  issue: i.uuid,
5724
5724
  changes: a
@@ -5740,12 +5740,12 @@ class bg extends I {
5740
5740
  const { store: s } = this.client, i = s.getState(), n = Si(e)(i);
5741
5741
  if (!n)
5742
5742
  throw new Error(`No issue with uuid ${e} found in the store`);
5743
- const a = Au(e)(i), c = Fl(e)(i), o = zd(e)(i), l = {};
5743
+ const a = Au(e)(i), c = Fl(e)(i), o = zd(e)(i), h = {};
5744
5744
  for (const d of ou(e)(i))
5745
- l[d.uuid] = d;
5745
+ h[d.uuid] = d;
5746
5746
  for (const d of du(e)(i))
5747
- l[d.uuid] = d;
5748
- const r = Object.values(l);
5747
+ h[d.uuid] = d;
5748
+ const r = Object.values(h);
5749
5749
  this.dispatch(gi(e)), a.length > 0 && this.dispatch(ha(a.map(({ uuid: d }) => d))), c.length > 0 && this.dispatch(_l(c.map(({ uuid: d }) => d))), o.length > 0 && this.dispatch(Et(o.map(({ uuid: d }) => d))), r.length > 0 && this.dispatch(da(r.map(({ uuid: d }) => d)));
5750
5750
  try {
5751
5751
  return await this.enqueueRequest({
@@ -5826,27 +5826,27 @@ class gg extends be {
5826
5826
  }
5827
5827
  class Sg extends E {
5828
5828
  async bulkAdd(e) {
5829
- var l;
5830
- const s = (/* @__PURE__ */ new Date()).toISOString(), i = (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id, n = {}, a = [], c = [];
5829
+ var h;
5830
+ const s = (/* @__PURE__ */ new Date()).toISOString(), i = (h = this.client.store.getState().userReducer.currentUser) == null ? void 0 : h.id, n = {}, a = [], c = [];
5831
5831
  for (const r of e) {
5832
- const { fieldsRevisionUuid: d, fieldIdentifier: h, file: p } = r, f = await this.getFilePayload(p);
5832
+ const { fieldsRevisionUuid: d, fieldIdentifier: l, file: m } = r, f = await this.getFilePayload(m);
5833
5833
  f.sha1 in n || (n[f.sha1] = f);
5834
5834
  const g = _({
5835
- file: URL.createObjectURL(p),
5836
- file_type: p.type,
5837
- file_name: p.name,
5835
+ file: URL.createObjectURL(m),
5836
+ file_type: m.type,
5837
+ file_name: m.name,
5838
5838
  file_sha1: f.sha1,
5839
5839
  created_by: i,
5840
5840
  fields_revision: d,
5841
5841
  submitted_at: s,
5842
- field_identifier: h
5842
+ field_identifier: l
5843
5843
  });
5844
5844
  a.push(g);
5845
5845
  const R = {
5846
5846
  uuid: g.uuid,
5847
- file_name: p.name,
5847
+ file_name: m.name,
5848
5848
  file_extension: f.extension,
5849
- field_identifier: h,
5849
+ field_identifier: l,
5850
5850
  file_sha1: f.sha1,
5851
5851
  fields_revision: d
5852
5852
  };
@@ -5906,10 +5906,10 @@ class Tg extends I {
5906
5906
  blockers: [a.issue_type],
5907
5907
  blocks: [a.uuid]
5908
5908
  });
5909
- return c.then((l) => {
5910
- this.dispatch(nl(l));
5911
- }).catch((l) => {
5912
- throw this.dispatch(al(a.uuid)), l;
5909
+ return c.then((h) => {
5910
+ this.dispatch(nl(h));
5911
+ }).catch((h) => {
5912
+ throw this.dispatch(al(a.uuid)), h;
5913
5913
  }), [a, c];
5914
5914
  }
5915
5915
  async refreshStore(e) {
@@ -5928,28 +5928,28 @@ class Tg extends I {
5928
5928
  }
5929
5929
  class Rg extends E {
5930
5930
  async bulkAdd(e) {
5931
- var l;
5932
- const s = (/* @__PURE__ */ new Date()).toISOString(), i = (l = this.client.store.getState().userReducer.currentUser) == null ? void 0 : l.id, n = {}, a = [], c = [];
5931
+ var h;
5932
+ const s = (/* @__PURE__ */ new Date()).toISOString(), i = (h = this.client.store.getState().userReducer.currentUser) == null ? void 0 : h.id, n = {}, a = [], c = [];
5933
5933
  for (const r of e) {
5934
- const { fieldValuesUuid: d, fieldIdentifier: h, file: p } = r, f = await this.getFilePayload(p);
5934
+ const { fieldValuesUuid: d, fieldIdentifier: l, file: m } = r, f = await this.getFilePayload(m);
5935
5935
  f.sha1 in n || (n[f.sha1] = f);
5936
5936
  const g = _({
5937
- file: URL.createObjectURL(p),
5938
- file_type: p.type,
5939
- file_name: p.name,
5937
+ file: URL.createObjectURL(m),
5938
+ file_type: m.type,
5939
+ file_name: m.name,
5940
5940
  file_sha1: f.sha1,
5941
5941
  created_by: i,
5942
5942
  field_values: d,
5943
5943
  submitted_at: s,
5944
- field_identifier: h
5944
+ field_identifier: l
5945
5945
  });
5946
5946
  a.push(g);
5947
5947
  const R = {
5948
5948
  uuid: g.uuid,
5949
- file_name: p.name,
5949
+ file_name: m.name,
5950
5950
  file_sha1: f.sha1,
5951
5951
  file_extension: f.extension,
5952
- field_identifier: h,
5952
+ field_identifier: l,
5953
5953
  field_values: d
5954
5954
  };
5955
5955
  c.push(R);
@@ -6606,18 +6606,18 @@ class qg extends I {
6606
6606
  throw new Error("Project file must either have bounds or canvas_bounds set");
6607
6607
  let a;
6608
6608
  if (typeof n.file == "string" && !n.file.startsWith("blob:")) {
6609
- const l = { ...n };
6610
- delete l.file, a = {
6609
+ const h = { ...n };
6610
+ delete h.file, a = {
6611
6611
  method: u.PATCH,
6612
6612
  url: `/projects/files/${i}/`,
6613
- payload: l,
6613
+ payload: h,
6614
6614
  blockers: [i],
6615
6615
  blocks: [i]
6616
6616
  };
6617
6617
  } else
6618
- a = new Promise((l, r) => {
6618
+ a = new Promise((h, r) => {
6619
6619
  this.client.files.uploadFileToS3(n.file_sha1).then(([d]) => {
6620
- l({
6620
+ h({
6621
6621
  method: u.POST,
6622
6622
  url: `/projects/${n.project}/files/`,
6623
6623
  payload: {
@@ -6629,9 +6629,9 @@ class qg extends I {
6629
6629
  });
6630
6630
  }).catch(r);
6631
6631
  });
6632
- const o = Promise.resolve(a).then((l) => this.enqueueRequest(l));
6633
- return o.then((l) => {
6634
- this.dispatch(Li(l));
6632
+ const o = Promise.resolve(a).then((h) => this.enqueueRequest(h));
6633
+ return o.then((h) => {
6634
+ this.dispatch(Li(h));
6635
6635
  }), this.dispatch(Fh), this.dispatch(Ih(null)), this.dispatch(_h(!1)), [n, o];
6636
6636
  }
6637
6637
  delete(e) {
@@ -6693,8 +6693,8 @@ class jg extends I {
6693
6693
  this.dispatch(Oh(c.map(({ uuid: d }) => d)));
6694
6694
  const o = bh(a.uuid)(i);
6695
6695
  this.dispatch(xa(o.map(({ uuid: d }) => d)));
6696
- const l = Vl(i);
6697
- this.dispatch(Gl(l.map(({ uuid: d }) => d))), this.dispatch({ type: "rehydrated/setRehydrated", payload: !1 }), this.dispatch(Hl(a.uuid));
6696
+ const h = Vl(i);
6697
+ this.dispatch(Gl(h.map(({ uuid: d }) => d))), this.dispatch({ type: "rehydrated/setRehydrated", payload: !1 }), this.dispatch(Hl(a.uuid));
6698
6698
  const r = wl(a.uuid)(i);
6699
6699
  r && this.dispatch(Ae({ ...r, project: null }));
6700
6700
  try {
@@ -6706,7 +6706,7 @@ class jg extends I {
6706
6706
  blocks: []
6707
6707
  }), this.dispatch({ type: "rehydrated/setRehydrated", payload: !0 });
6708
6708
  } catch (d) {
6709
- throw this.dispatch(Nl(Object.values(n))), this.dispatch(ka(Object.values(l))), this.dispatch(Th(c)), this.dispatch(hh(o)), this.dispatch({ type: "rehydrated/setRehydrated", payload: !0 }), r && this.dispatch(Ae({ ...r, project: a.uuid })), d;
6709
+ throw this.dispatch(Nl(Object.values(n))), this.dispatch(ka(Object.values(h))), this.dispatch(Th(c)), this.dispatch(hh(o)), this.dispatch({ type: "rehydrated/setRehydrated", payload: !0 }), r && this.dispatch(Ae({ ...r, project: a.uuid })), d;
6710
6710
  }
6711
6711
  }
6712
6712
  invite(e, s) {
@@ -6912,10 +6912,10 @@ class Dg {
6912
6912
  }
6913
6913
  }
6914
6914
  };
6915
- Xa(o, this).then((l) => {
6916
- n.resolve(l.body);
6917
- }).catch((l) => {
6918
- tc(l, o), l instanceof Error ? n.reject(l) : n.reject(new Error((l ?? $e).toString()));
6915
+ Xa(o, this).then((h) => {
6916
+ n.resolve(h.body);
6917
+ }).catch((h) => {
6918
+ tc(h, o), h instanceof Error ? n.reject(h) : n.reject(new Error((h ?? $e).toString()));
6919
6919
  });
6920
6920
  } else {
6921
6921
  const c = this.store.dispatch(
@@ -6931,7 +6931,7 @@ class Dg {
6931
6931
  });
6932
6932
  n.reject(d);
6933
6933
  }
6934
- }, l = (r) => {
6934
+ }, h = (r) => {
6935
6935
  r instanceof j ? r.options.discard = !0 : (console.error(
6936
6936
  "Received an unexpected error while processing a request:",
6937
6937
  r,
@@ -6943,7 +6943,7 @@ Converting error to APIError and discarding.`
6943
6943
  discard: !0
6944
6944
  })), n.reject(r);
6945
6945
  };
6946
- c.then(o, l);
6946
+ c.then(o, h);
6947
6947
  }
6948
6948
  return n;
6949
6949
  }