@beam3_dev/api_module 0.0.311 → 0.0.313

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/wb3Api.js CHANGED
@@ -89,7 +89,7 @@ async function Ie(e, t = z) {
89
89
  } : s;
90
90
  for (let c of i)
91
91
  o.events.findIndex(
92
- (p) => p.start === O.fromISO(c.date).toISODate() && p.name === "Férié : " + c.comment
92
+ (u) => u.start === O.fromISO(c.date).toISODate() && u.name === "Férié : " + c.comment
93
93
  ) === -1 && o.events.push({
94
94
  name: "Férié : " + c.comment,
95
95
  start: O.fromISO(c.date).toISODate(),
@@ -258,9 +258,9 @@ function Ae(e, t, n) {
258
258
  Accept: "application/json"
259
259
  },
260
260
  onComplete(r, a, o) {
261
- const c = JSON.parse(r), d = c.data.map((p) => {
262
- const u = p.attributes.name, f = p.id;
263
- return { name: u, id: f };
261
+ const c = JSON.parse(r), d = c.data.map((u) => {
262
+ const p = u.attributes.name, f = u.id;
263
+ return { name: p, id: f };
264
264
  });
265
265
  t && t(d, c);
266
266
  },
@@ -322,10 +322,10 @@ function Me(e, t, n = void 0, s = void 0) {
322
322
  onComplete(d) {
323
323
  n && n(JSON.parse(d));
324
324
  },
325
- onFailure(d, p) {
325
+ onFailure(d, u) {
326
326
  console.log(d);
327
- const u = d;
328
- u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
327
+ const p = d;
328
+ p.msg = u.errormsg, p.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
329
329
  }
330
330
  });
331
331
  }
@@ -355,31 +355,33 @@ function ee(e, t = void 0, n = void 0) {
355
355
  }, d = `${r}${a}${o}`;
356
356
  m(d, {
357
357
  OPTsH: c,
358
- onComplete(p) {
359
- t && t(JSON.parse(p));
358
+ onComplete(u) {
359
+ t && t(JSON.parse(u));
360
360
  },
361
- onFailure(p, u) {
362
- const f = p;
363
- f.function = "getUsersGroupRules()", f.msg = u.errormsg, f.errCode = u.errorcode, n && n(f);
361
+ onFailure(u, p) {
362
+ const f = u;
363
+ f.function = "getUsersGroupRules()", f.msg = p.errormsg, f.errCode = p.errorcode, n && n(f);
364
364
  }
365
365
  });
366
366
  }
367
367
  function Ge(e, t = void 0, n = void 0) {
368
- const { _usersgroup: s, currentUser: i } = e, c = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility&top=150`, p = { method: "GET", headers: {
368
+ const { _usersgroup: s, currentUser: i, numMax: r } = e;
369
+ r || (r = 50);
370
+ const a = "/3drdfpersist/resources/v1/usersgroup", o = "?select=uri,title,description,owner,members,pending_members,creation_date,modification_date", c = `&top=${r}`, d = `${s}${a}${o}${c}`, p = { method: "GET", headers: {
369
371
  "Content-Type": "application/json",
370
372
  Accept: "application/json,text/javascript,*/*"
371
373
  } };
372
374
  try {
373
- m(c, {
375
+ m(d, {
374
376
  opts: p,
375
- onComplete(u) {
376
- const f = JSON.parse(u), l = {}, g = f.groups.filter((h) => h.uri.startsWith("uuid:"));
377
+ onComplete(f) {
378
+ const l = JSON.parse(f), g = {}, h = l.groups.filter((_) => _.uri.startsWith("uuid:"));
377
379
  if (i && Object.keys(i).length > 0) {
378
- const h = g.filter((y) => y.owner === i.email), _ = g.filter((y) => y.members.includes(i.email)), S = h.concat(_);
379
- l.iam = S, l.UG = g, l.iamMember = _, l.all = f, ee(
380
+ const _ = h.filter((y) => y.owner === i.email), S = h.filter((y) => y.members.includes(i.email)), w = _.concat(S);
381
+ g.iam = w, g.UG = h, g.iamMember = S, ee(
380
382
  e,
381
383
  (y) => {
382
- l.rules = y, t && t(l);
384
+ g.rules = y, t && t(g);
383
385
  },
384
386
  (y) => {
385
387
  y.function += ", getUserGroupsList()", n && n(y);
@@ -387,21 +389,21 @@ function Ge(e, t = void 0, n = void 0) {
387
389
  );
388
390
  }
389
391
  },
390
- onFailure(u, f) {
391
- const l = u;
392
- l.function = "getUserGroupsList()", l.msg = f.errormsg, l.errCode = f.errorcode, n && n(l);
392
+ onFailure(f, l) {
393
+ const g = f;
394
+ g.function = "getUserGroupsList()", g.msg = l.errormsg, g.errCode = l.errorcode, n && n(g);
393
395
  }
394
396
  });
395
- } catch (u) {
396
- console.log(u);
397
- const f = {
398
- infoError: u,
397
+ } catch (f) {
398
+ console.log(f);
399
+ const l = {
400
+ infoError: f,
399
401
  fonction: "getUserGroupsList()",
400
402
  catch: new Error("Erreur sur la fonction getUserGroupsList()", {
401
- cause: u
403
+ cause: f
402
404
  })
403
405
  };
404
- n(f);
406
+ n(l);
405
407
  }
406
408
  }
407
409
  function Ke(e, t) {
@@ -419,17 +421,17 @@ function qe(e, t, n, s = void 0, i = void 0) {
419
421
  nexURImem: "/members",
420
422
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
421
423
  OPTsTenant: `tenant=dstenant:${a}`
422
- }, c = n, d = `${r}${o.URIUGr}/${t}`, p = JSON.stringify(c);
424
+ }, c = n, d = `${r}${o.URIUGr}/${t}`, u = JSON.stringify(c);
423
425
  m(d, {
424
426
  headers: j,
425
427
  method: "PATCH",
426
- data: p,
428
+ data: u,
427
429
  type: "json",
428
- onComplete(u) {
429
- s && s(u);
430
+ onComplete(p) {
431
+ s && s(p);
430
432
  },
431
- onFailure(u) {
432
- i && i(u);
433
+ onFailure(p) {
434
+ i && i(p);
433
435
  }
434
436
  });
435
437
  }
@@ -495,8 +497,8 @@ var se = function(e, t, n, s) {
495
497
  var o = e.length;
496
498
  a > 0 && o > a && (o = a);
497
499
  for (var c = 0; c < o; ++c) {
498
- var d = e[c].replace(r, "%20"), p = d.indexOf(n), u, f, l, g;
499
- p >= 0 ? (u = d.substr(0, p), f = d.substr(p + 1)) : (u = d, f = ""), l = decodeURIComponent(u), g = decodeURIComponent(f), ne(i, l) ? Array.isArray(i[l]) ? i[l].push(g) : i[l] = [i[l], g] : i[l] = g;
500
+ var d = e[c].replace(r, "%20"), u = d.indexOf(n), p, f, l, g;
501
+ u >= 0 ? (p = d.substr(0, u), f = d.substr(u + 1)) : (p = d, f = ""), l = decodeURIComponent(p), g = decodeURIComponent(f), ne(i, l) ? Array.isArray(i[l]) ? i[l].push(g) : i[l] = [i[l], g] : i[l] = g;
500
502
  }
501
503
  return i;
502
504
  }, x = function(e) {
@@ -553,8 +555,8 @@ async function Xe(e, t = void 0, n = void 0, s = void 0) {
553
555
  },
554
556
  data: a,
555
557
  onComplete(o, c, d) {
556
- const p = JSON.parse(o);
557
- n && n(p);
558
+ const u = JSON.parse(o);
559
+ n && n(u);
558
560
  },
559
561
  onFailure(o) {
560
562
  s && s(o);
@@ -574,7 +576,7 @@ function N(e, t = void 0, n = void 0) {
574
576
  }
575
577
  });
576
578
  } else
577
- b(
579
+ T(
578
580
  e,
579
581
  (s) => {
580
582
  console.log("_3DSpace_get_csrf / _3DSpace_csrf", s), e.token = s, t && t(e);
@@ -584,7 +586,7 @@ function N(e, t = void 0, n = void 0) {
584
586
  }
585
587
  );
586
588
  }
587
- function b(e, t = void 0, n = void 0) {
589
+ function T(e, t = void 0, n = void 0) {
588
590
  if (e.space) {
589
591
  const s = e.space + "/resources/v1/application/CSRF";
590
592
  m(s, {
@@ -686,7 +688,7 @@ function ae(e, t, n, s, i, r, a = void 0, o = void 0) {
686
688
  }
687
689
  }),
688
690
  type: "json",
689
- onComplete(d, p, u) {
691
+ onComplete(d, u, p) {
690
692
  const f = d.csrf, l = d.data[0].dataelements, g = new FormData();
691
693
  let h;
692
694
  s instanceof Blob ? h = s : h = new Blob([s], {
@@ -694,7 +696,7 @@ function ae(e, t, n, s, i, r, a = void 0, o = void 0) {
694
696
  }), g.append(l.ticketparamname, l.ticket), g.append("file_0", h, i);
695
697
  const _ = {};
696
698
  _.method = "POST", _.data = g, _.onComplete = function(S) {
697
- let y = {
699
+ let w = {
698
700
  method: "PUT",
699
701
  headers: {
700
702
  SecurityContext: "ctx::" + e.ctx
@@ -720,16 +722,16 @@ function ae(e, t, n, s, i, r, a = void 0, o = void 0) {
720
722
  ]
721
723
  }),
722
724
  type: "json",
723
- onComplete(w) {
724
- a && a(w);
725
+ onComplete(y) {
726
+ a && a(y);
725
727
  },
726
- onFailure(w) {
727
- o && o(w);
728
+ onFailure(y) {
729
+ o && o(y);
728
730
  }
729
731
  };
730
732
  e.tenant.toUpperCase(), m(
731
733
  e.space + `/resources/v1/modeler/documents/?$include=versions&tenant=${e.tenant.toUpperCase()}&e6w-lang=fr&e6w-timezone=-60&xrequestedwith=xmlhttprequest`,
732
- y
734
+ w
733
735
  );
734
736
  }, _.onFailure = function(S) {
735
737
  o && o(S);
@@ -788,11 +790,11 @@ async function Ye(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
788
790
  `https://${a.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/session?tenant=${a.toUpperCase()}&xrequestedwith=xmlhttprequest`,
789
791
  {
790
792
  method: "GET",
791
- onComplete(p) {
793
+ onComplete(u) {
792
794
  try {
793
- p = JSON.parse(p);
794
- const { csrftoken: u, isadmin: f } = p;
795
- u && m(d, {
795
+ u = JSON.parse(u);
796
+ const { csrftoken: p, isadmin: f } = u;
797
+ p && m(d, {
796
798
  method: "GET",
797
799
  headers: {
798
800
  //"x-ds-csrftoken": csrftoken,
@@ -801,14 +803,14 @@ async function Ye(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
801
803
  onComplete(l, g, h) {
802
804
  try {
803
805
  if (l = JSON.parse(l), l?.ticket) {
804
- const { ticket: _, actionurl: S, jobticket: y } = l;
806
+ const { ticket: _, actionurl: S, jobticket: w } = l;
805
807
  K(
806
808
  { dataelements: { ticket: _, ticketURL: S } },
807
809
  n,
808
810
  t,
809
- (w) => {
811
+ (y) => {
810
812
  const R = new DOMParser().parseFromString(
811
- w,
813
+ y,
812
814
  "text/html"
813
815
  ).body.firstChild.querySelector("input").getAttributeNode("value").value, k = `https://${a.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/collabspaces/${encodeURIComponent(o)}/contents?receipt=${encodeURIComponent(R)}`;
814
816
  let W = /(?:\.([^.]+))?$/.exec(t)[1];
@@ -833,11 +835,11 @@ async function Ye(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
833
835
  headers: {
834
836
  Accept: "application/json",
835
837
  "Content-Type": "application/json;charset=UTF-8",
836
- "X-DS-CSRFTOKEN": u
838
+ "X-DS-CSRFTOKEN": p
837
839
  },
838
840
  data: v,
839
841
  type: "json",
840
- onComplete(I, Ce, be) {
842
+ onComplete(I, Ce, Te) {
841
843
  s && s(I);
842
844
  },
843
845
  onFailure(I) {
@@ -848,11 +850,11 @@ async function Ye(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
848
850
  }
849
851
  });
850
852
  },
851
- (w) => {
852
- console.warn("pushFileInFcs", w), i && i(w);
853
+ (y) => {
854
+ console.warn("pushFileInFcs", y), i && i(y);
853
855
  },
854
- (w) => {
855
- r && r({ fileName: t, progress: w });
856
+ (y) => {
857
+ r && r({ fileName: t, progress: y });
856
858
  }
857
859
  );
858
860
  }
@@ -868,8 +870,8 @@ async function Ye(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
868
870
  i && i();
869
871
  }
870
872
  },
871
- onFailure(p) {
872
- i && i(p);
873
+ onFailure(u) {
874
+ i && i(u);
873
875
  }
874
876
  }
875
877
  );
@@ -965,8 +967,8 @@ function K(e, t, n, s = void 0, i = void 0, r = void 0) {
965
967
  const c = new XMLHttpRequest();
966
968
  c.open("POST", o, !0), c.upload.onprogress = function(d) {
967
969
  if (d.lengthComputable) {
968
- const p = d.loaded / d.total * 100;
969
- r && r(p);
970
+ const u = d.loaded / d.total * 100;
971
+ r && r(u);
970
972
  }
971
973
  }, c.onload = function() {
972
974
  c.status === 200 ? s && s(c.responseText.replace(/[\n\r]/g, "")) : i && i(c.statusText);
@@ -1027,25 +1029,25 @@ function F(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, a = !1
1027
1029
  method: "GET",
1028
1030
  onComplete(c) {
1029
1031
  const d = JSON.parse(c);
1030
- let p = "", u, f, l;
1032
+ let u = "", p, f, l;
1031
1033
  if (t) {
1032
1034
  let g = d.collabspaces.find((h) => h.title === t);
1033
1035
  if (g) {
1034
- u = t;
1036
+ p = t;
1035
1037
  let h = g.couples;
1036
1038
  h = h.filter(
1037
- (_, S, y) => S === y.findIndex(
1038
- (w) => w.organization.pid === _.organization.pid && w.role.pid === _.role.pid
1039
+ (_, S, w) => S === w.findIndex(
1040
+ (y) => y.organization.pid === _.organization.pid && y.role.pid === _.role.pid
1039
1041
  )
1040
1042
  ), n && (Array.isArray(n) ? n.forEach((_) => {
1041
1043
  l || h.forEach((S) => {
1042
1044
  if (_ === S.role.name && s === S.organization.title)
1043
1045
  l = _, f = s;
1044
1046
  else if (_ === S.role.name) {
1045
- let y = h.filter(
1046
- (w) => w.role.name === _
1047
+ let w = h.filter(
1048
+ (y) => y.role.name === _
1047
1049
  );
1048
- y.length === 1 ? (l = y[0].role.name, f = y[0].organization.title) : r(y);
1050
+ w.length === 1 ? (l = w[0].role.name, f = w[0].organization.title) : r(w);
1049
1051
  }
1050
1052
  });
1051
1053
  }) : h.forEach((_) => {
@@ -1053,14 +1055,14 @@ function F(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, a = !1
1053
1055
  l = n, f = s;
1054
1056
  else if (n === _.role.name) {
1055
1057
  let S = h.filter(
1056
- (y) => y.role.name === n
1058
+ (w) => w.role.name === n
1057
1059
  );
1058
1060
  S.length === 1 ? (l = S[0].role.name, f = S[0].organization.title) : r(S);
1059
1061
  }
1060
1062
  }));
1061
1063
  }
1062
1064
  }
1063
- u && f && l ? (p = l + "." + f + "." + u, i(p)) : d.preferredcredentials && a ? (p = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(p)) : r && (p = l + "." + f + "." + u, r(p));
1065
+ p && f && l ? (u = l + "." + f + "." + p, i(u)) : d.preferredcredentials && a ? (u = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(u)) : r && (u = l + "." + f + "." + p, r(u));
1064
1066
  },
1065
1067
  onFailure(c, d) {
1066
1068
  console.warn("Erreur de récupération du contexte de sécurité. => ", {
@@ -1157,9 +1159,9 @@ function de(e, t, n = void 0, s = void 0, i = void 0) {
1157
1159
  type: "json",
1158
1160
  onComplete(c) {
1159
1161
  const d = c.data;
1160
- c.success === !0 && (n && n(), d.forEach((p) => {
1162
+ c.success === !0 && (n && n(), d.forEach((u) => {
1161
1163
  try {
1162
- const u = p.dataelements.fileName, f = p.dataelements.ticketURL;
1164
+ const p = u.dataelements.fileName, f = u.dataelements.ticketURL;
1163
1165
  m(f, {
1164
1166
  onComplete: (l, g) => {
1165
1167
  let h;
@@ -1169,9 +1171,9 @@ function de(e, t, n = void 0, s = void 0, i = void 0) {
1169
1171
  h = l.blob();
1170
1172
  }
1171
1173
  s && s({
1172
- objectId: p.id,
1174
+ objectId: u.id,
1173
1175
  headers: g,
1174
- fileName: u,
1176
+ fileName: p,
1175
1177
  data: h
1176
1178
  });
1177
1179
  },
@@ -1179,8 +1181,8 @@ function de(e, t, n = void 0, s = void 0, i = void 0) {
1179
1181
  console.log("error http", l);
1180
1182
  }
1181
1183
  });
1182
- } catch (u) {
1183
- console.log(u), i && i(u);
1184
+ } catch (p) {
1185
+ console.log(p), i && i(p);
1184
1186
  }
1185
1187
  }));
1186
1188
  },
@@ -1191,7 +1193,7 @@ function de(e, t, n = void 0, s = void 0, i = void 0) {
1191
1193
  }
1192
1194
  function Qe(e, t, n = void 0, s = void 0) {
1193
1195
  return new Promise((i) => {
1194
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1196
+ if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1195
1197
  const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
1196
1198
  let a = {
1197
1199
  method: "POST",
@@ -1222,7 +1224,7 @@ function Qe(e, t, n = void 0, s = void 0) {
1222
1224
  }
1223
1225
  function Ze(e, t, n, s = void 0, i = void 0) {
1224
1226
  return new Promise((r) => {
1225
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1227
+ if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1226
1228
  const a = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
1227
1229
  let o = {
1228
1230
  method: "POST",
@@ -1254,7 +1256,7 @@ function Ze(e, t, n, s = void 0, i = void 0) {
1254
1256
  }
1255
1257
  function et(e, t, n = void 0, s = void 0) {
1256
1258
  return new Promise((i) => {
1257
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1259
+ if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1258
1260
  const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
1259
1261
  F(
1260
1262
  e.space,
@@ -1295,7 +1297,7 @@ function et(e, t, n = void 0, s = void 0) {
1295
1297
  }
1296
1298
  function tt(e, t, n = void 0, s = void 0) {
1297
1299
  return new Promise((i) => {
1298
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1300
+ if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1299
1301
  const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
1300
1302
  F(
1301
1303
  e.space,
@@ -1342,7 +1344,7 @@ function tt(e, t, n = void 0, s = void 0) {
1342
1344
  }
1343
1345
  function nt(e, t, n, s = void 0, i = void 0) {
1344
1346
  return new Promise((r) => {
1345
- if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1347
+ if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1346
1348
  const a = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
1347
1349
  F(
1348
1350
  e.space,
@@ -1406,14 +1408,14 @@ function st(e, t, n = void 0, s = void 0) {
1406
1408
  const { tenant: a, ctx: o, space: c } = e;
1407
1409
  (!a || !o || !c) && r({ error: "Erreur de credentials", tenant: a, ctx: o, space: c });
1408
1410
  const d = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=1&withAttributes=1&withCopyFrom=1&tenant=${e.tenant.toUpperCase()}&xrequestedwith=xmlhttprequest`;
1409
- let p;
1411
+ let u;
1410
1412
  await ue(e).then(
1411
- (f) => p = f?.SecurityContext
1413
+ (f) => u = f?.SecurityContext
1412
1414
  );
1413
- let u = {
1415
+ let p = {
1414
1416
  method: "POST",
1415
1417
  headers: {
1416
- securitycontext: "ctx::" + p,
1418
+ securitycontext: "ctx::" + u,
1417
1419
  Accept: "application/json",
1418
1420
  "Content-Type": "application/json"
1419
1421
  },
@@ -1433,7 +1435,7 @@ function st(e, t, n = void 0, s = void 0) {
1433
1435
  s && s(f), r(f);
1434
1436
  }
1435
1437
  };
1436
- m(d, u);
1438
+ m(d, p);
1437
1439
  });
1438
1440
  }
1439
1441
  function it(e, t, n, s, i = void 0, r = void 0) {
@@ -1449,7 +1451,7 @@ function it(e, t, n, s, i = void 0, r = void 0) {
1449
1451
  items: []
1450
1452
  };
1451
1453
  t && (d.parentId = t), d.items.push(c);
1452
- let p = {
1454
+ let u = {
1453
1455
  method: "POST",
1454
1456
  headers: {
1455
1457
  Accept: "application/json",
@@ -1459,14 +1461,14 @@ function it(e, t, n, s, i = void 0, r = void 0) {
1459
1461
  },
1460
1462
  data: JSON.stringify(d),
1461
1463
  type: "json",
1462
- onComplete(u) {
1463
- i && i(u);
1464
+ onComplete(p) {
1465
+ i && i(p);
1464
1466
  },
1465
- onFailure(u) {
1466
- r && r(u);
1467
+ onFailure(p) {
1468
+ r && r(p);
1467
1469
  }
1468
1470
  };
1469
- m(o, p);
1471
+ m(o, u);
1470
1472
  });
1471
1473
  }
1472
1474
  function at(e, t, n, s, i = void 0, r = void 0) {
@@ -1580,7 +1582,7 @@ async function ut(e, t = void 0, n = void 0) {
1580
1582
  (s) => {
1581
1583
  n && n(s);
1582
1584
  }
1583
- ) : (e.objID === null || e.objID === "") && b(
1585
+ ) : (e.objID === null || e.objID === "") && T(
1584
1586
  e,
1585
1587
  (s) => {
1586
1588
  t && t({ rep: s, msg: "Pas d'objID, ou invalide" });
@@ -1656,7 +1658,7 @@ function ft(e, t, n = void 0, s = void 0) {
1656
1658
  uri: "/resources/6w/tags",
1657
1659
  otpCTX: "SecurityContext=preferred",
1658
1660
  optTenant: `tenant=${r}`
1659
- }, p = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, u = {
1661
+ }, u = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1660
1662
  tag: [
1661
1663
  {
1662
1664
  subject: [
@@ -1671,13 +1673,13 @@ function ft(e, t, n = void 0, s = void 0) {
1671
1673
  }
1672
1674
  ]
1673
1675
  };
1674
- m(p, {
1676
+ m(u, {
1675
1677
  method: "PUT",
1676
1678
  headers: {
1677
1679
  "Content-Type": "application/json",
1678
1680
  Accept: "application/json"
1679
1681
  },
1680
- data: JSON.stringify(u),
1682
+ data: JSON.stringify(p),
1681
1683
  onComplete(f) {
1682
1684
  JSON.parse(f);
1683
1685
  const l = {};
@@ -1690,11 +1692,11 @@ function ft(e, t, n = void 0, s = void 0) {
1690
1692
  l.name = h, l.ext = _, l.createBy = S, t.info = { ...l }, ge(
1691
1693
  e,
1692
1694
  t,
1693
- (y) => {
1694
- n && n(y);
1695
+ (w) => {
1696
+ n && n(w);
1695
1697
  },
1696
- (y) => {
1697
- s && s(y);
1698
+ (w) => {
1699
+ s && s(w);
1698
1700
  }
1699
1701
  );
1700
1702
  },
@@ -1784,13 +1786,13 @@ function ge(e, t, n = void 0, s = void 0) {
1784
1786
  method: "POST",
1785
1787
  headers: o,
1786
1788
  data: JSON.stringify(d),
1787
- onComplete(p) {
1788
- const u = JSON.parse(p);
1789
- n(u);
1789
+ onComplete(u) {
1790
+ const p = JSON.parse(u);
1791
+ n(p);
1790
1792
  },
1791
- onFailure(p, u) {
1792
- const f = p;
1793
- f.msg = u.errormsg, f.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f), console.log("Erreur de recuperation d'id du doc et des tags", p);
1793
+ onFailure(u, p) {
1794
+ const f = u;
1795
+ f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f), console.log("Erreur de recuperation d'id du doc et des tags", u);
1794
1796
  }
1795
1797
  });
1796
1798
  }
@@ -1821,12 +1823,12 @@ function mt(e, t, n = void 0, s = void 0) {
1821
1823
  "Content-Type": "application/json",
1822
1824
  Accept: "application/json,text/javascript,*/*"
1823
1825
  },
1824
- onComplete(p) {
1825
- n && n(p);
1826
+ onComplete(u) {
1827
+ n && n(u);
1826
1828
  },
1827
- onFailure(p, u) {
1828
- const f = p;
1829
- f.msg = u.errormsg, f.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f);
1829
+ onFailure(u, p) {
1830
+ const f = u;
1831
+ f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f);
1830
1832
  }
1831
1833
  });
1832
1834
  }
@@ -1847,9 +1849,9 @@ function gt(e, t = "", n = void 0, s = void 0) {
1847
1849
  onComplete(d) {
1848
1850
  n && n(JSON.parse(d));
1849
1851
  },
1850
- onFailure(d, p) {
1851
- const u = d;
1852
- u.msg = p.error, s && s(u);
1852
+ onFailure(d, u) {
1853
+ const p = d;
1854
+ p.msg = u.error, s && s(p);
1853
1855
  }
1854
1856
  });
1855
1857
  }
@@ -1940,9 +1942,9 @@ function yt(e, t = void 0, n = void 0) {
1940
1942
  "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1941
1943
  },
1942
1944
  onComplete(o, c, d) {
1943
- const u = JSON.parse(o).result;
1945
+ const p = JSON.parse(o).result;
1944
1946
  let f = 0;
1945
- u.forEach((l) => {
1947
+ p.forEach((l) => {
1946
1948
  const g = {
1947
1949
  description: l.description,
1948
1950
  id: l.id,
@@ -1955,7 +1957,7 @@ function yt(e, t = void 0, n = void 0) {
1955
1957
  e,
1956
1958
  l.id,
1957
1959
  (h) => {
1958
- f++, g.members = h, r.push(g), f === u.length && t && t(r);
1960
+ f++, g.members = h, r.push(g), f === p.length && t && t(r);
1959
1961
  },
1960
1962
  (h) => n(h)
1961
1963
  );
@@ -2030,23 +2032,23 @@ function wt(e, t, n = void 0, s = void 0) {
2030
2032
  senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
2031
2033
  msg: ye(t.msg)
2032
2034
  };
2033
- let p = !1;
2035
+ let u = !1;
2034
2036
  _e(
2035
2037
  c.users,
2036
- (u) => {
2037
- u !== void 0 && (d.id_msg = u.id, p = !0, P(e, d));
2038
+ (p) => {
2039
+ p !== void 0 && (d.id_msg = p.id, u = !0, P(e, d));
2038
2040
  },
2039
- (u) => {
2040
- p = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", u), s && s(u), d.id_msg = "";
2041
+ (p) => {
2042
+ u = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), s && s(p), d.id_msg = "";
2041
2043
  }
2042
- ), p === !1 && setTimeout(() => {
2043
- p === !1 && C(e, (u) => {
2044
+ ), u === !1 && setTimeout(() => {
2045
+ u === !1 && C(e, (p) => {
2044
2046
  m(o, {
2045
2047
  method: "POST",
2046
2048
  headers: {
2047
2049
  "Content-Type": "application/json",
2048
2050
  Accept: "application/json",
2049
- "X-DS-SWYM-CSRFTOKEN": u.result.ServerToken
2051
+ "X-DS-SWYM-CSRFTOKEN": p.result.ServerToken
2050
2052
  },
2051
2053
  data: JSON.stringify(c),
2052
2054
  type: "json",
@@ -2073,16 +2075,16 @@ function _e(e, t, n, s) {
2073
2075
  },
2074
2076
  onComplete(a) {
2075
2077
  const o = JSON.parse(a), c = [];
2076
- o.result.forEach((u) => {
2077
- u.users = u.users.sort((f, l) => f.login.localeCompare(l.login)), u.users.length === t.length && c.push(u);
2078
+ o.result.forEach((p) => {
2079
+ p.users = p.users.sort((f, l) => f.login.localeCompare(l.login)), p.users.length === t.length && c.push(p);
2078
2080
  });
2079
- const d = t.sort(), p = c.find((u) => {
2081
+ const d = t.sort(), u = c.find((p) => {
2080
2082
  const f = [];
2081
- return u.users.forEach((l) => {
2083
+ return p.users.forEach((l) => {
2082
2084
  f.push(l.login);
2083
2085
  }), JSON.stringify(f) === JSON.stringify(d);
2084
2086
  });
2085
- n && p !== void 0 ? n(p) : (s || p === void 0) && s(p);
2087
+ n && u !== void 0 ? n(u) : (s || u === void 0) && s(u);
2086
2088
  },
2087
2089
  onFailure(a) {
2088
2090
  const o = a;
@@ -2117,13 +2119,13 @@ function P(e, t, n = void 0, s = void 0) {
2117
2119
  },
2118
2120
  data: JSON.stringify(a),
2119
2121
  type: "json",
2120
- onComplete(c, d, p) {
2121
- const u = c;
2122
- u.status = p.status, u.response = JSON.parse(p.response), console.log("✅ _3dSwym_sendDirectMessageData => ", u), n && n(u);
2122
+ onComplete(c, d, u) {
2123
+ const p = c;
2124
+ p.status = u.status, p.response = JSON.parse(u.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
2123
2125
  },
2124
2126
  onFailure(c, d) {
2125
- const p = c;
2126
- p.msg = d.errormsg, p.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
2127
+ const u = c;
2128
+ u.msg = d.errormsg, u.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
2127
2129
  }
2128
2130
  });
2129
2131
  });
@@ -2163,18 +2165,18 @@ function Ct(e, t, n = void 0, s = void 0) {
2163
2165
  headers: d,
2164
2166
  data: JSON.stringify(o),
2165
2167
  type: "json",
2166
- onComplete(p, u, f) {
2167
- const l = JSON.parse(p);
2168
+ onComplete(u, p, f) {
2169
+ const l = JSON.parse(u);
2168
2170
  l.status = f.status, l.response = f.response, n && n(l);
2169
2171
  },
2170
- onFailure(p, u, f) {
2171
- const l = p;
2172
- l.status = u.status, l.response = u.errormsg, s && s(l);
2172
+ onFailure(u, p, f) {
2173
+ const l = u;
2174
+ l.status = p.status, l.response = p.errormsg, s && s(l);
2173
2175
  }
2174
2176
  });
2175
2177
  });
2176
2178
  }
2177
- function bt(e, t = void 0, n = void 0) {
2179
+ function Tt(e, t = void 0, n = void 0) {
2178
2180
  const s = { base: e.space, uri: "/api/idea/add" };
2179
2181
  if (!Array.isArray(e.swymCommunities)) {
2180
2182
  const a = "☠️ swymCommunities doit être un tableau d'objets de communautés";
@@ -2230,15 +2232,15 @@ function bt(e, t = void 0, n = void 0) {
2230
2232
  },
2231
2233
  method: "POST",
2232
2234
  data: JSON.stringify(r),
2233
- onComplete(c, d, p) {
2234
- const u = { response: c };
2235
- typeof u.response == "string" && (u.response = JSON.parse(u.response)), u.status = p.status, t && t(u);
2235
+ onComplete(c, d, u) {
2236
+ const p = { response: c };
2237
+ typeof p.response == "string" && (p.response = JSON.parse(p.response)), p.status = u.status, t && t(p);
2236
2238
  },
2237
- onFailure(c, d, p) {
2238
- const u = JSON.parse(d), f = JSON.parse(c), l = new Error(
2239
+ onFailure(c, d, u) {
2240
+ const p = JSON.parse(d), f = JSON.parse(c), l = new Error(
2239
2241
  `Erreur sur cette requête : ${s.base + s.uri}`,
2240
2242
  {
2241
- cause: { head: u, rep: f }
2243
+ cause: { head: p, rep: f }
2242
2244
  }
2243
2245
  );
2244
2246
  n && n(l);
@@ -2247,7 +2249,7 @@ function bt(e, t = void 0, n = void 0) {
2247
2249
  m(s.base + s.uri, o);
2248
2250
  });
2249
2251
  }
2250
- function Tt(e, t, n = void 0, s = void 0) {
2252
+ function bt(e, t, n = void 0, s = void 0) {
2251
2253
  const i = `${e.space}/api/idea/delete`, r = {
2252
2254
  params: {
2253
2255
  community_id: t.community_id,
@@ -2268,8 +2270,8 @@ function Tt(e, t, n = void 0, s = void 0) {
2268
2270
  n && n(o);
2269
2271
  },
2270
2272
  onFailure(o, c, d) {
2271
- const p = o;
2272
- p.status = c.status, p.response = c.errormsg, s && s(p);
2273
+ const u = o;
2274
+ u.status = c.status, u.response = c.errormsg, s && s(u);
2273
2275
  }
2274
2276
  });
2275
2277
  });
@@ -2311,8 +2313,8 @@ function $t(e, t, n) {
2311
2313
  community_id: o,
2312
2314
  status_comment: c,
2313
2315
  status_id: d,
2314
- message: p
2315
- } = e, u = {
2316
+ message: u
2317
+ } = e, p = {
2316
2318
  base: `${s}`,
2317
2319
  uri: "/api/idea/edit"
2318
2320
  }, l = {
@@ -2330,7 +2332,7 @@ function $t(e, t, n) {
2330
2332
  community_id: o,
2331
2333
  status_comment: c,
2332
2334
  status_id: d,
2333
- message: p,
2335
+ message: u,
2334
2336
  published: "1"
2335
2337
  }
2336
2338
  }),
@@ -2345,14 +2347,14 @@ function $t(e, t, n) {
2345
2347
  n && n(g);
2346
2348
  }
2347
2349
  };
2348
- m(u.base + u.uri, l);
2350
+ m(p.base + p.uri, l);
2349
2351
  }
2350
2352
  function xt(e, t, n = void 0, s = void 0) {
2351
2353
  const { _3DSwym: i } = e;
2352
2354
  let { community_id: r, limit: a, page: o, search: c } = t;
2353
- const d = [], p = 1;
2354
- let u = !1, f = 2;
2355
- o || (o = p), a || (a = 100);
2355
+ const d = [], u = 1;
2356
+ let p = !1, f = 2;
2357
+ o || (o = u), a || (a = 100);
2356
2358
  const l = {
2357
2359
  uri: "/api/idea/list",
2358
2360
  comId: `/community_id/${r}`,
@@ -2367,34 +2369,34 @@ function xt(e, t, n = void 0, s = void 0) {
2367
2369
  headers: {
2368
2370
  "X-DS-SWYM-CSRFTOKEN": h.result.ServerToken
2369
2371
  },
2370
- onComplete(y) {
2371
- const w = { response: JSON.parse(y) };
2372
- if (f = Math.ceil(Number(w.response.nb_result) / 100), y && f >= o) {
2372
+ onComplete(w) {
2373
+ const y = { response: JSON.parse(w) };
2374
+ if (f = Math.ceil(Number(y.response.nb_result) / 100), w && f >= o) {
2373
2375
  if (o++, l.page = `/page/${o}`, S = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
2374
- d.push(w.response.result);
2376
+ d.push(y.response.result);
2375
2377
  else {
2376
- const T = w.response.result.find(
2378
+ const b = y.response.result.find(
2377
2379
  (R) => R.title.includes(c)
2378
2380
  );
2379
- if (T) {
2380
- n(T);
2381
+ if (b) {
2382
+ n(b);
2381
2383
  return;
2382
2384
  }
2383
2385
  }
2384
2386
  if (n && f < o && !c) {
2385
- u = !0, n(d);
2387
+ p = !0, n(d);
2386
2388
  return;
2387
2389
  }
2388
2390
  _(S);
2389
2391
  }
2390
2392
  },
2391
- onFailure(y, w) {
2392
- const T = y;
2393
- T.status = w.status, T.response = w.errormsg, s && s(T);
2393
+ onFailure(w, y) {
2394
+ const b = w;
2395
+ b.status = y.status, b.response = y.errormsg, s && s(b);
2394
2396
  }
2395
2397
  });
2396
2398
  };
2397
- u || _(g);
2399
+ p || _(g);
2398
2400
  });
2399
2401
  }
2400
2402
  function Se(e) {
@@ -2492,9 +2494,9 @@ function Ut(e, t = void 0, n = void 0) {
2492
2494
  onComplete(d) {
2493
2495
  t && t(d);
2494
2496
  },
2495
- onFailure(d, p) {
2496
- const u = d;
2497
- u.status = p.status, u.response = p.errormsg, n && n(u);
2497
+ onFailure(d, u) {
2498
+ const p = d;
2499
+ p.status = u.status, p.response = u.errormsg, n && n(p);
2498
2500
  }
2499
2501
  });
2500
2502
  } else
@@ -2514,15 +2516,15 @@ function It(e, t = void 0, n = void 0) {
2514
2516
  console.log("_3DSwym_get_currentUser | url", a), m(a, {
2515
2517
  method: "GET",
2516
2518
  onComplete(o, c, d) {
2517
- let p = o.replace(/\"\[/g, "[").replace(/\]\"/g, "]").replace(/\"{/g, "{").replace(/}\"/g, "}").replace(/\\/g, "");
2518
- p = p.replace(/\"\[/g, "[").replace(/\]\"/g, "]").replace(/\"{/g, "{").replace(/}\"/g, "}").replace(/\\/g, ""), console.log("result", p);
2519
- let u = {};
2519
+ let u = o.replace(/\"\[/g, "[").replace(/\]\"/g, "]").replace(/\"{/g, "{").replace(/}\"/g, "}").replace(/\\/g, "");
2520
+ u = u.replace(/\"\[/g, "[").replace(/\]\"/g, "]").replace(/\"{/g, "{").replace(/}\"/g, "}").replace(/\\/g, ""), console.log("result", u);
2521
+ let p = {};
2520
2522
  try {
2521
- u = JSON.parse(p);
2523
+ p = JSON.parse(u);
2522
2524
  } catch (f) {
2523
2525
  i("ERROR | _3DSwym_get_currentUser => JSON.Parse()", f);
2524
2526
  }
2525
- console.log(u), u.first_name = u?.firstName ? u.firstName : "", u.last_name = u?.lastName ? u.lastName : "", console.log("_3DSwym_get_currentUser | info", u), r = u, s(u);
2527
+ console.log(p), p.first_name = p?.firstName ? p.firstName : "", p.last_name = p?.lastName ? p.lastName : "", console.log("_3DSwym_get_currentUser | info", p), r = p, s(p);
2526
2528
  },
2527
2529
  onFailure(o) {
2528
2530
  i("ERROR | _3DSwym_get_currentUser => _3DDashboard + /api/users/current", o);
@@ -2570,14 +2572,14 @@ function Ft(e, t = void 0, n = void 0) {
2570
2572
  },
2571
2573
  data: JSON.stringify({ richMessage: a }),
2572
2574
  type: "json",
2573
- onComplete(p, u, f) {
2575
+ onComplete(u, p, f) {
2574
2576
  const l = {
2575
- response: typeof p == "string" ? JSON.parse(p) : p
2577
+ response: typeof u == "string" ? JSON.parse(u) : u
2576
2578
  };
2577
2579
  l.status = f.status, t && t(l);
2578
2580
  },
2579
- onFailure(p) {
2580
- n && n(p);
2581
+ onFailure(u) {
2582
+ n && n(u);
2581
2583
  }
2582
2584
  };
2583
2585
  m(o, d);
@@ -2818,7 +2820,7 @@ function Xt(e) {
2818
2820
  }
2819
2821
  function Wt(e, t = void 0, n = void 0) {
2820
2822
  return console.log("credentials", e), new Promise((s) => {
2821
- if (e.token === "" && b(e), !e.space || e.space === "") {
2823
+ if (e.token === "" && T(e), !e.space || e.space === "") {
2822
2824
  const a = Z();
2823
2825
  console.log("platformeInfo", a);
2824
2826
  }
@@ -2903,7 +2905,7 @@ export {
2903
2905
  Ye as _3DSpace_Upload_File,
2904
2906
  at as _3DSpace_bookmark_addSubsciptions,
2905
2907
  it as _3DSpace_bookmark_newWorkspace,
2906
- b as _3DSpace_csrf,
2908
+ T as _3DSpace_csrf,
2907
2909
  q as _3DSpace_download_doc,
2908
2910
  ce as _3DSpace_download_multidoc,
2909
2911
  G as _3DSpace_file_update,
@@ -2925,7 +2927,7 @@ export {
2925
2927
  Ut as _3DSwym_ForwardIdea,
2926
2928
  Ft as _3DSwym_addComment,
2927
2929
  wt as _3DSwym_buildDirectMessage,
2928
- Tt as _3DSwym_deleteIdea,
2930
+ bt as _3DSwym_deleteIdea,
2929
2931
  $t as _3DSwym_editIdea,
2930
2932
  _e as _3DSwym_findCommunityToInstantMSG,
2931
2933
  yt as _3DSwym_getAllCommunities,
@@ -2938,7 +2940,7 @@ export {
2938
2940
  C as _3DSwym_get_Token,
2939
2941
  It as _3DSwym_get_currentUser,
2940
2942
  Nt as _3DSwym_get_findUser,
2941
- bt as _3DSwym_postIdea,
2943
+ Tt as _3DSwym_postIdea,
2942
2944
  Ct as _3DSwym_postIdeaTemplate,
2943
2945
  P as _3DSwym_sendMessageData,
2944
2946
  Le as _AppMngt_get_info_user,