@beam3_dev/api_module 0.0.114 → 0.0.116

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
@@ -1,5 +1,5 @@
1
1
  import { v4 as M } from "uuid";
2
- import { DateTime as N } from "luxon";
2
+ import { DateTime as b } from "luxon";
3
3
  import { requirejs as O, widget as U } from "@widget-lab/3ddashboard-utils";
4
4
  function j() {
5
5
  return M();
@@ -66,10 +66,10 @@ async function de(e, t = void 0, n = void 0) {
66
66
  });
67
67
  }
68
68
  async function le(e, t = L) {
69
- let n = N.now().year;
70
- const s = e, i = [], r = (a) => {
71
- for (let c in a)
72
- i.push({ date: c, comment: a[c] });
69
+ let n = b.now().year;
70
+ const s = e, i = [], c = (a) => {
71
+ for (let r in a)
72
+ i.push({ date: r, comment: a[r] });
73
73
  };
74
74
  for (let a = n; a <= n + 1; a++)
75
75
  await fetch(
@@ -80,20 +80,20 @@ async function le(e, t = L) {
80
80
  Accept: "application/json"
81
81
  }
82
82
  }
83
- ).then((c) => c.json()).then((c) => {
84
- r(c);
85
- }).catch((c) => console.error("Erreur : " + c));
83
+ ).then((r) => r.json()).then((r) => {
84
+ c(r);
85
+ }).catch((r) => console.error("Erreur : " + r));
86
86
  return (() => {
87
87
  const a = s.length === 0 ? {
88
88
  events: []
89
89
  } : s;
90
- for (let c of i)
90
+ for (let r of i)
91
91
  a.events.findIndex(
92
- (l) => l.start === N.fromISO(c.date).toISODate() && l.name === "Férié : " + c.comment
92
+ (l) => l.start === b.fromISO(r.date).toISODate() && l.name === "Férié : " + r.comment
93
93
  ) === -1 && a.events.push({
94
- name: "Férié : " + c.comment,
95
- start: N.fromISO(c.date).toISODate(),
96
- end: N.fromISO(c.date).toISODate(),
94
+ name: "Férié : " + r.comment,
95
+ start: b.fromISO(r.date).toISODate(),
96
+ end: b.fromISO(r.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
@@ -102,7 +102,7 @@ async function le(e, t = L) {
102
102
  }
103
103
  async function pe(e, t, n = !0) {
104
104
  const s = e.events.findIndex((i) => i.uuid === t.uuid);
105
- return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
105
+ return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((i, c) => i.start - c.start), e;
106
106
  }
107
107
  function f(e, t) {
108
108
  O(["DS/WAFData/WAFData"], (n) => {
@@ -150,14 +150,14 @@ async function ge(e, t = void 0, n = void 0) {
150
150
  function J() {
151
151
  let e = {};
152
152
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
153
- const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
153
+ const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
154
154
  "com.3ds.wp.passport.cors"
155
155
  );
156
156
  e = {
157
157
  tenant: n,
158
158
  user: s,
159
159
  appsConfiguration: i,
160
- appConf: r
160
+ appConf: c
161
161
  };
162
162
  }), console.log("%cRETOUR API :", "color:blue", e), e;
163
163
  }
@@ -166,9 +166,9 @@ function E(e, t = void 0, n = void 0) {
166
166
  const s = `https://${e.tenant}-eu1-apps.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?tenant=${e.tenant}&cors=true&xrequestedwith=xmlhttprequest`;
167
167
  f(s, {
168
168
  onComplete(i) {
169
- const r = typeof i == "string" ? JSON.parse(i) : i;
170
- if (r && "platforms" in r) {
171
- const o = r.platforms.find(
169
+ const c = typeof i == "string" ? JSON.parse(i) : i;
170
+ if (c && "platforms" in c) {
171
+ const o = c.platforms.find(
172
172
  (a) => a.id === e.tenant.toUpperCase()
173
173
  );
174
174
  t && o ? t(o) : n && n("_getServiceUrl return listServiceUrl = undefined");
@@ -186,9 +186,9 @@ function he(e, t = void 0, n = void 0) {
186
186
  const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
187
187
  f(s, {
188
188
  onComplete(i) {
189
- const r = JSON.parse(i);
190
- if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
191
- const o = `${r[0].services[0].url}`;
189
+ const c = JSON.parse(i);
190
+ if (console.log("serviceId=3dpassport", c), Array.isArray(c) && c.length > 0) {
191
+ const o = `${c[0].services[0].url}`;
192
192
  t && t(o);
193
193
  }
194
194
  },
@@ -211,15 +211,15 @@ function Se(e, t, n) {
211
211
  "Content-Type": "application/json",
212
212
  Accept: "application/json"
213
213
  },
214
- onComplete(r, o, a) {
215
- const c = JSON.parse(r), d = c.data.map((l) => {
214
+ onComplete(c, o, a) {
215
+ const r = JSON.parse(c), d = r.data.map((l) => {
216
216
  const p = l.attributes.name, u = l.id;
217
217
  return { name: p, id: u };
218
218
  });
219
- t && t(d, c);
219
+ t && t(d, r);
220
220
  },
221
- onFailure(r, o) {
222
- const a = r;
221
+ onFailure(c, o) {
222
+ const a = c;
223
223
  a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
224
224
  }
225
225
  });
@@ -227,25 +227,25 @@ function Se(e, t, n) {
227
227
  function _e(e, t = void 0, n = void 0) {
228
228
  let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
229
229
  f(s, {
230
- onComplete(i, r, o) {
230
+ onComplete(i, c, o) {
231
231
  const a = JSON.parse(i);
232
232
  console.log("_AppMngt_get_users => ", a), t && t(a);
233
233
  },
234
- onFailure(i, r) {
234
+ onFailure(i, c) {
235
235
  const o = i;
236
- o.msg = r.errormsg, o.errCode = r.errorcode, n && n(o);
236
+ o.msg = c.errormsg, o.errCode = c.errorcode, n && n(o);
237
237
  }
238
238
  });
239
239
  }
240
240
  function ye(e, t, n = void 0, s = void 0) {
241
241
  let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
242
242
  f(i, {
243
- onComplete(r, o, a) {
244
- const c = JSON.parse(r);
245
- n && n(c);
243
+ onComplete(c, o, a) {
244
+ const r = JSON.parse(c);
245
+ n && n(r);
246
246
  },
247
- onFailure(r, o) {
248
- const a = r;
247
+ onFailure(c, o) {
248
+ const a = c;
249
249
  a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
250
250
  }
251
251
  });
@@ -255,14 +255,14 @@ const F = {
255
255
  Accept: "application/json,text/javascript,*/*"
256
256
  };
257
257
  function we(e, t, n = void 0, s = void 0) {
258
- const { space: i, currentUser: r } = e, a = `${i}${{
258
+ const { space: i, currentUser: c } = e, a = `${i}${{
259
259
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
260
- }.URIUGr}`, c = {
260
+ }.URIUGr}`, r = {
261
261
  groups: [
262
262
  {
263
263
  title: t.title,
264
264
  description: t.description,
265
- members: t.members || [r.email, "samuel.mureau@beam3.fr"],
265
+ members: t.members || [c.email, "samuel.mureau@beam3.fr"],
266
266
  pending_members: [],
267
267
  sharing: t.sharing,
268
268
  visibility: t.visibility
@@ -272,7 +272,7 @@ function we(e, t, n = void 0, s = void 0) {
272
272
  f(a, {
273
273
  method: "POST",
274
274
  headers: F,
275
- data: JSON.stringify(c),
275
+ data: JSON.stringify(r),
276
276
  onComplete(d) {
277
277
  n && n(JSON.parse(d));
278
278
  },
@@ -284,7 +284,7 @@ function we(e, t, n = void 0, s = void 0) {
284
284
  });
285
285
  }
286
286
  function Ce(e, t, n = void 0, s = void 0) {
287
- const { space: i, tenant: r } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${o}${a}${c}`;
287
+ const { space: i, tenant: c } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, r = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${o}${a}${r}`;
288
288
  f(d, {
289
289
  opts: {
290
290
  method: "GET",
@@ -303,12 +303,12 @@ function Ce(e, t, n = void 0, s = void 0) {
303
303
  });
304
304
  }
305
305
  function G(e, t = void 0, n = void 0) {
306
- const { space: s, tenant: i } = e, r = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, c = {
306
+ const { space: s, tenant: i } = e, c = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, r = {
307
307
  method: "GET",
308
308
  Accept: "application/json,*/*,test/javascript"
309
- }, d = `${r}${o}${a}`;
309
+ }, d = `${c}${o}${a}`;
310
310
  f(d, {
311
- OPTsH: c,
311
+ OPTsH: r,
312
312
  onComplete(l) {
313
313
  t && t(JSON.parse(l));
314
314
  },
@@ -355,8 +355,8 @@ function Oe(e, t) {
355
355
  method: "DELETE"
356
356
  });
357
357
  }
358
- function be(e, t, n, s = void 0, i = void 0) {
359
- const { space: r, tenant: o } = e, a = {
358
+ function Ne(e, t, n, s = void 0, i = void 0) {
359
+ const { space: c, tenant: o } = e, a = {
360
360
  URITI: "/3drdfpersist/resources/v1/template-instances",
361
361
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
362
362
  nextURICh: "/characteristics",
@@ -364,7 +364,7 @@ function be(e, t, n, s = void 0, i = void 0) {
364
364
  nexURImem: "/members",
365
365
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
366
366
  OPTsTenant: `tenant=dstenant:${o}`
367
- }, c = n, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(c);
367
+ }, r = n, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(r);
368
368
  f(d, {
369
369
  headers: F,
370
370
  method: "PATCH",
@@ -378,8 +378,8 @@ function be(e, t, n, s = void 0, i = void 0) {
378
378
  }
379
379
  });
380
380
  }
381
- function Ne(e, t, n, s = void 0, i = void 0) {
382
- const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
381
+ function be(e, t, n, s = void 0, i = void 0) {
382
+ const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
383
383
  f(a, {
384
384
  method: "PATCH",
385
385
  headers: F,
@@ -418,8 +418,8 @@ async function K(e, t, n) {
418
418
  onComplete(i) {
419
419
  i = JSON.parse(i), t && t(i.csrf);
420
420
  },
421
- onFailure(i, r, o) {
422
- n && n({ error: i, headers: r, xhr: o });
421
+ onFailure(i, c, o) {
422
+ n && n({ error: i, headers: c, xhr: o });
423
423
  }
424
424
  });
425
425
  }
@@ -430,9 +430,9 @@ async function X(e, t = void 0, n = void 0, s = void 0) {
430
430
  console.log("Le paramètre docid est obligatoire");
431
431
  return;
432
432
  }
433
- const r = i + `/resources/v1/modeler/documents/${t}`;
434
- f(r, {
435
- onComplete(o, a, c) {
433
+ const c = i + `/resources/v1/modeler/documents/${t}`;
434
+ f(c, {
435
+ onComplete(o, a, r) {
436
436
  const d = JSON.parse(o);
437
437
  n && n(d);
438
438
  },
@@ -445,7 +445,7 @@ function v(e, t = void 0, n = void 0) {
445
445
  if (e.objID && e.objID !== "") {
446
446
  let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
447
447
  f(s, {
448
- onComplete(i, r, o) {
448
+ onComplete(i, c, o) {
449
449
  const a = JSON.parse(i);
450
450
  e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
451
451
  },
@@ -468,14 +468,14 @@ function T(e, t = void 0, n = void 0) {
468
468
  if (e.space) {
469
469
  const s = e.space + "/resources/v1/application/CSRF";
470
470
  f(s, {
471
- onComplete(i, r, o) {
471
+ onComplete(i, c, o) {
472
472
  const a = JSON.parse(i);
473
473
  t && t(a.csrf.value);
474
474
  },
475
- onFailure(i, r, o) {
475
+ onFailure(i, c, o) {
476
476
  n && n({
477
477
  response: i,
478
- headers: r,
478
+ headers: c,
479
479
  xhr: o
480
480
  });
481
481
  }
@@ -483,7 +483,7 @@ function T(e, t = void 0, n = void 0) {
483
483
  } else
484
484
  n && n("ERROR : url du 3DSpace non défini.");
485
485
  }
486
- function A(e, t = void 0, n = void 0) {
486
+ function $(e, t = void 0, n = void 0) {
487
487
  let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
488
488
  v(
489
489
  e,
@@ -493,12 +493,12 @@ function A(e, t = void 0, n = void 0) {
493
493
  headers: {
494
494
  ENO_CSRF_TOKEN: e.token
495
495
  },
496
- onComplete(r) {
497
- const a = JSON.parse(r).data[0].dataelements.ticketURL;
496
+ onComplete(c) {
497
+ const a = JSON.parse(c).data[0].dataelements.ticketURL;
498
498
  t && t(a);
499
499
  },
500
- onFailure(r, o) {
501
- console.warn("☠️ error => ", r, o), n && n(r, o);
500
+ onFailure(c, o) {
501
+ console.warn("☠️ error => ", c, o), n && n(c, o);
502
502
  }
503
503
  });
504
504
  },
@@ -508,8 +508,8 @@ function A(e, t = void 0, n = void 0) {
508
508
  );
509
509
  }
510
510
  function ke(e, t, n, s = void 0, i = void 0) {
511
- const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
512
- n || (n = e.token), f(r, {
511
+ const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
512
+ n || (n = e.token), f(c, {
513
513
  method: "PUT",
514
514
  headers: {
515
515
  ENO_CSRF_TOKEN: n
@@ -518,10 +518,10 @@ function ke(e, t, n, s = void 0, i = void 0) {
518
518
  let a = JSON.parse(o);
519
519
  if (console.log("☠️ info => ", a), a.success === !0)
520
520
  try {
521
- const c = a.data[0].dataelements.ticketURL;
522
- s && s(c);
523
- } catch (c) {
524
- i && i(c);
521
+ const r = a.data[0].dataelements.ticketURL;
522
+ s && s(r);
523
+ } catch (r) {
524
+ i && i(r);
525
525
  }
526
526
  },
527
527
  onFailure(o) {
@@ -529,7 +529,7 @@ function ke(e, t, n, s = void 0, i = void 0) {
529
529
  }
530
530
  });
531
531
  }
532
- function V(e, t, n, s, i, r = void 0, o = void 0) {
532
+ function V(e, t, n, s, i, c = void 0, o = void 0) {
533
533
  v(
534
534
  e,
535
535
  t,
@@ -541,18 +541,18 @@ function V(e, t, n, s, i, r = void 0, o = void 0) {
541
541
  s,
542
542
  i,
543
543
  a.csrf.value,
544
- r,
544
+ c,
545
545
  o
546
546
  );
547
547
  }
548
548
  );
549
549
  }
550
- function W(e, t, n, s, i, r, o = void 0, a = void 0) {
551
- const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
552
- f(c, {
550
+ function W(e, t, n, s, i, c, o = void 0, a = void 0) {
551
+ const r = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
552
+ f(r, {
553
553
  method: "PUT",
554
554
  headers: {
555
- ENO_CSRF_TOKEN: r
555
+ ENO_CSRF_TOKEN: c
556
556
  },
557
557
  onComplete(d, l, p) {
558
558
  const u = JSON.parse(d).data[0].dataelements, m = new FormData();
@@ -562,7 +562,7 @@ function W(e, t, n, s, i, r, o = void 0, a = void 0) {
562
562
  let S = "temp_" + Date.now(), _ = {
563
563
  method: "PUT",
564
564
  headers: {
565
- ENO_CSRF_TOKEN: r
565
+ ENO_CSRF_TOKEN: c
566
566
  },
567
567
  data: JSON.stringify({
568
568
  data: [{
@@ -598,12 +598,12 @@ function W(e, t, n, s, i, r, o = void 0, a = void 0) {
598
598
  }
599
599
  });
600
600
  }
601
- async function Fe(e, t, n, s, i = void 0, r = void 0) {
602
- const o = e.space, a = e.token, c = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
601
+ async function Fe(e, t, n, s, i = void 0, c = void 0) {
602
+ const o = e.space, a = e.token, r = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
603
603
  type: "text/plain"
604
604
  }), p = {
605
605
  url_Ticket: `${o}/resources/v1/modeler/documents/files/CheckinTicket`,
606
- url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`
606
+ url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${r}`
607
607
  };
608
608
  if (!o && o !== "") {
609
609
  console.log("le store._3DSpace est vide");
@@ -621,7 +621,7 @@ async function Fe(e, t, n, s, i = void 0, r = void 0) {
621
621
  method: "POST",
622
622
  data: d,
623
623
  onComplete(C) {
624
- if (c !== "" && a !== "") {
624
+ if (r !== "" && a !== "") {
625
625
  const k = {
626
626
  method: "POST",
627
627
  headers: {
@@ -653,7 +653,7 @@ async function Fe(e, t, n, s, i = void 0, r = void 0) {
653
653
  onComplete: _,
654
654
  onFailure: y
655
655
  };
656
- c !== "" && f(p.url_Post, k);
656
+ r !== "" && f(p.url_Post, k);
657
657
  } else
658
658
  console.warn("le store est vide");
659
659
  },
@@ -664,18 +664,18 @@ async function Fe(e, t, n, s, i = void 0, r = void 0) {
664
664
  }
665
665
  function y(C, k) {
666
666
  console.log("Erreur -- response ", C, `
667
- headers `, k), r && r(C);
667
+ headers `, k), c && c(C);
668
668
  }
669
669
  f(h.ticketURL, S);
670
670
  }
671
671
  });
672
672
  }
673
- function b(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1) {
673
+ function N(e, t = void 0, n = void 0, s = void 0, i = void 0, c = void 0, o = !1) {
674
674
  const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
675
675
  f(a, {
676
676
  method: "GET",
677
- onComplete(c) {
678
- const d = JSON.parse(c);
677
+ onComplete(r) {
678
+ const d = JSON.parse(r);
679
679
  let l = "", p, u, m;
680
680
  if (t) {
681
681
  let g = d.collabspaces.find((h) => h.title === t);
@@ -694,7 +694,7 @@ function b(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1
694
694
  let y = h.filter(
695
695
  (C) => C.role.name === S
696
696
  );
697
- y.length === 1 ? (m = y[0].role.name, u = y[0].organization.title) : r(y);
697
+ y.length === 1 ? (m = y[0].role.name, u = y[0].organization.title) : c(y);
698
698
  }
699
699
  });
700
700
  }) : h.forEach((S) => {
@@ -704,16 +704,16 @@ function b(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1
704
704
  let _ = h.filter(
705
705
  (y) => y.role.name === n
706
706
  );
707
- _.length === 1 ? (m = _[0].role.name, u = _[0].organization.title) : r(_);
707
+ _.length === 1 ? (m = _[0].role.name, u = _[0].organization.title) : c(_);
708
708
  }
709
709
  }));
710
710
  }
711
711
  }
712
- p && u && m ? (l = m + "." + u + "." + p, i(l)) : d.preferredcredentials && o ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(l)) : r && (l = m + "." + u + "." + p, r(l));
712
+ p && u && m ? (l = m + "." + u + "." + p, i(l)) : d.preferredcredentials && o ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(l)) : c && (l = m + "." + u + "." + p, c(l));
713
713
  },
714
- onFailure(c, d) {
714
+ onFailure(r, d) {
715
715
  console.log("Erreur de récupération du contexte de sécurité. => ", {
716
- err: c,
716
+ err: r,
717
717
  headers: d
718
718
  });
719
719
  }
@@ -735,38 +735,38 @@ async function I(e, t = void 0, n = void 0) {
735
735
  ), console.warn(
736
736
  "_3DSpace_download_doc() / Le paramètre token est obligatoire"
737
737
  )), new Promise((s, i) => {
738
- A(
738
+ $(
739
739
  e,
740
- (r) => {
741
- f(r, {
740
+ (c) => {
741
+ f(c, {
742
742
  headers: {
743
743
  "Content-Type": "application/json",
744
744
  Accept: "application/json"
745
745
  },
746
746
  onComplete(a) {
747
- let c;
747
+ let r;
748
748
  try {
749
- c = JSON.parse(a);
749
+ r = JSON.parse(a);
750
750
  } catch {
751
- c = a;
751
+ r = a;
752
752
  }
753
- t && typeof t == "function" && t(c), s(c);
753
+ t && typeof t == "function" && t(r), s(r);
754
754
  },
755
- onFailure(a, c, d) {
755
+ onFailure(a, r, d) {
756
756
  n && (console.log("error http", a), n({
757
757
  msg: JSON.parse(a),
758
- headers: c,
758
+ headers: r,
759
759
  xhr: d
760
760
  }), i({
761
761
  msg: JSON.parse(a),
762
- headers: c,
762
+ headers: r,
763
763
  xhr: d
764
764
  }));
765
765
  }
766
766
  });
767
767
  },
768
- (r) => {
769
- n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
768
+ (c) => {
769
+ n && n(c), console.log("*_3dspace_download_doc / error file URL *", c), i(c);
770
770
  }
771
771
  );
772
772
  });
@@ -775,8 +775,8 @@ async function B(e, t, n = void 0, s = void 0) {
775
775
  let i = [];
776
776
  if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
777
777
  for (let a = 0; a < t.length; a += 80) {
778
- const c = t.slice(a, a + 80);
779
- i.push(c);
778
+ const r = t.slice(a, a + 80);
779
+ i.push(r);
780
780
  }
781
781
  const o = (a) => {
782
782
  Y(
@@ -785,8 +785,8 @@ async function B(e, t, n = void 0, s = void 0) {
785
785
  () => {
786
786
  a++, a < i.length && o(a);
787
787
  },
788
- (c) => {
789
- n && n(c);
788
+ (r) => {
789
+ n && n(r);
790
790
  }
791
791
  );
792
792
  };
@@ -795,10 +795,10 @@ async function B(e, t, n = void 0, s = void 0) {
795
795
  console.warn("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."), s && s("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini.");
796
796
  }
797
797
  function Y(e, t, n = void 0, s = void 0, i = void 0) {
798
- const r = [];
799
- t.forEach((c) => {
800
- r.push({
801
- id: c
798
+ const c = [];
799
+ t.forEach((r) => {
800
+ c.push({
801
+ id: r
802
802
  });
803
803
  });
804
804
  let o = JSON.stringify({
@@ -806,16 +806,16 @@ function Y(e, t, n = void 0, s = void 0, i = void 0) {
806
806
  name: "ENO_CSRF_TOKEN",
807
807
  value: e.token
808
808
  },
809
- data: r
809
+ data: c
810
810
  });
811
811
  const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
812
812
  f(a, {
813
813
  method: "PUT",
814
814
  data: o,
815
815
  type: "json",
816
- onComplete(c) {
817
- const d = c.data;
818
- c.success === !0 && (n && n(), d.forEach((l) => {
816
+ onComplete(r) {
817
+ const d = r.data;
818
+ r.success === !0 && (n && n(), d.forEach((l) => {
819
819
  try {
820
820
  const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
821
821
  f(u, {
@@ -835,16 +835,16 @@ function Y(e, t, n = void 0, s = void 0, i = void 0) {
835
835
  }
836
836
  }));
837
837
  },
838
- onFailure(c) {
839
- console.log(c), i && i(c);
838
+ onFailure(r) {
839
+ console.log(r), i && i(r);
840
840
  }
841
841
  });
842
842
  }
843
- function Ae(e, t, n = void 0, s = void 0) {
843
+ function $e(e, t, n = void 0, s = void 0) {
844
844
  return new Promise((i) => {
845
845
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
846
- const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
847
- b(
846
+ const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
847
+ N(
848
848
  e.space,
849
849
  "ESPACE COMMUN",
850
850
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -875,22 +875,22 @@ function Ae(e, t, n = void 0, s = void 0) {
875
875
  s && s(a);
876
876
  }
877
877
  };
878
- f(r, o);
878
+ f(c, o);
879
879
  }
880
880
  });
881
881
  }
882
- function $e(e, t, n, s = void 0, i = void 0) {
883
- return new Promise((r) => {
882
+ function Ae(e, t, n, s = void 0, i = void 0) {
883
+ return new Promise((c) => {
884
884
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
885
885
  const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
886
- b(
886
+ N(
887
887
  e.space,
888
888
  "ESPACE COMMUN",
889
889
  ["VPLMProjectLeader", "VPLMCreator"],
890
890
  void 0,
891
- (c) => e.ctx = c,
892
- (c) => {
893
- console.log("onError =>", c);
891
+ (r) => e.ctx = r,
892
+ (r) => {
893
+ console.log("onError =>", r);
894
894
  }
895
895
  );
896
896
  let a = {
@@ -908,11 +908,11 @@ function $e(e, t, n, s = void 0, i = void 0) {
908
908
  }]
909
909
  }),
910
910
  type: "json",
911
- onComplete(c) {
912
- s && s(c);
911
+ onComplete(r) {
912
+ s && s(r);
913
913
  },
914
- onFailure(c) {
915
- i && i(c);
914
+ onFailure(r) {
915
+ i && i(r);
916
916
  }
917
917
  };
918
918
  f(o, a);
@@ -922,8 +922,8 @@ function $e(e, t, n, s = void 0, i = void 0) {
922
922
  function De(e, t, n = void 0, s = void 0) {
923
923
  return new Promise((i) => {
924
924
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
925
- const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
926
- b(
925
+ const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
926
+ N(
927
927
  e.space,
928
928
  "ESPACE COMMUN",
929
929
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -954,15 +954,15 @@ function De(e, t, n = void 0, s = void 0) {
954
954
  s && s(a);
955
955
  }
956
956
  };
957
- f(r, o);
957
+ f(c, o);
958
958
  }
959
959
  });
960
960
  }
961
961
  function Ue(e, t, n = void 0, s = void 0) {
962
962
  return new Promise((i) => {
963
963
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
964
- const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
965
- b(
964
+ const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
965
+ N(
966
966
  e.space,
967
967
  "ESPACE COMMUN",
968
968
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -999,22 +999,22 @@ function Ue(e, t, n = void 0, s = void 0) {
999
999
  s && s(a);
1000
1000
  }
1001
1001
  };
1002
- f(r, o);
1002
+ f(c, o);
1003
1003
  }
1004
1004
  });
1005
1005
  }
1006
1006
  function je(e, t, n, s = void 0, i = void 0) {
1007
- return new Promise((r) => {
1007
+ return new Promise((c) => {
1008
1008
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1009
1009
  const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
1010
- b(
1010
+ N(
1011
1011
  e.space,
1012
1012
  "ESPACE COMMUN",
1013
1013
  ["VPLMProjectLeader", "VPLMCreator"],
1014
1014
  void 0,
1015
- (c) => e.ctx = c,
1016
- (c) => {
1017
- console.log("onError =>", c);
1015
+ (r) => e.ctx = r,
1016
+ (r) => {
1017
+ console.log("onError =>", r);
1018
1018
  }
1019
1019
  );
1020
1020
  let a = {
@@ -1037,18 +1037,18 @@ function je(e, t, n, s = void 0, i = void 0) {
1037
1037
  notificationTimeout: 600
1038
1038
  }),
1039
1039
  type: "json",
1040
- onComplete(c) {
1041
- s && s(c);
1040
+ onComplete(r) {
1041
+ s && s(r);
1042
1042
  },
1043
- onFailure(c) {
1044
- i && i(c);
1043
+ onFailure(r) {
1044
+ i && i(r);
1045
1045
  }
1046
1046
  };
1047
1047
  f(o, a);
1048
1048
  }
1049
1049
  });
1050
1050
  }
1051
- function Ie(e, t, n, s, i = void 0, r = void 0) {
1051
+ function Ie(e, t, n, s, i = void 0, c = void 0) {
1052
1052
  return console.log("credentials", e), new Promise((o) => {
1053
1053
  `${e.space}`, JSON.stringify({
1054
1054
  csrf: {
@@ -1082,27 +1082,27 @@ function Re(e, t = void 0, n = void 0) {
1082
1082
  Accept: "application/json,text/javascript,*/*",
1083
1083
  "Content-Type": "application/ds-json"
1084
1084
  },
1085
- onComplete(r, o) {
1086
- const a = JSON.parse(r);
1085
+ onComplete(c, o) {
1086
+ const a = JSON.parse(c);
1087
1087
  t && t(a, o);
1088
1088
  },
1089
- onFailure(r, o, a) {
1090
- n && n({ response: r, headers: o, xhr: a });
1089
+ onFailure(c, o, a) {
1090
+ n && n({ response: c, headers: o, xhr: a });
1091
1091
  }
1092
1092
  });
1093
1093
  }
1094
1094
  function xe(e, t, n, s) {
1095
- A(
1095
+ $(
1096
1096
  e.space,
1097
1097
  t,
1098
1098
  (i) => {
1099
1099
  f(i, {
1100
1100
  header: { ENO_CSRF_TOKEN: e.token },
1101
- onComplete: (r) => {
1102
- n && n(r);
1101
+ onComplete: (c) => {
1102
+ n && n(c);
1103
1103
  },
1104
- onFailure: (r) => {
1105
- console.log("error http", r), s && s(r);
1104
+ onFailure: (c) => {
1105
+ console.log("error http", c), s && s(c);
1106
1106
  }
1107
1107
  });
1108
1108
  }
@@ -1110,29 +1110,29 @@ function xe(e, t, n, s) {
1110
1110
  }
1111
1111
  async function Pe(e, t, n = void 0, s = void 0) {
1112
1112
  return new Promise((i) => {
1113
- A(e, t, (r) => {
1114
- f(r, {
1115
- onComplete: (o, a, c) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, c), i),
1116
- onFailure: (o, a, c) => {
1117
- s && s(o, a, c), console.log(o, a?.errormsg);
1113
+ $(e, t, (c) => {
1114
+ f(c, {
1115
+ onComplete: (o, a, r) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, r), i),
1116
+ onFailure: (o, a, r) => {
1117
+ s && s(o, a, r), console.log(o, a?.errormsg);
1118
1118
  }
1119
1119
  });
1120
1120
  });
1121
1121
  });
1122
1122
  }
1123
1123
  function Me(e, t, n, s = void 0, i = void 0) {
1124
- const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1124
+ const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
1125
1125
  v(
1126
1126
  e,
1127
1127
  n,
1128
1128
  (o) => {
1129
- const a = o.data[0].relateddata.files[0].id, c = o.data[0].dataelements.secondaryTitle !== "" ? o.data[0].dataelements.secondaryTitle : o.data[0].dataelements.title;
1129
+ const a = o.data[0].relateddata.files[0].id, r = o.data[0].dataelements.secondaryTitle !== "" ? o.data[0].dataelements.secondaryTitle : o.data[0].dataelements.title;
1130
1130
  V(
1131
1131
  e,
1132
1132
  n,
1133
1133
  a,
1134
- r,
1135
1134
  c,
1135
+ r,
1136
1136
  (d) => {
1137
1137
  s && s(d);
1138
1138
  },
@@ -1144,7 +1144,7 @@ function Me(e, t, n, s = void 0, i = void 0) {
1144
1144
  );
1145
1145
  }
1146
1146
  let R, x;
1147
- const $ = [];
1147
+ const A = [];
1148
1148
  async function Le(e, t = void 0, n = void 0) {
1149
1149
  e.objID && e.objID !== "" ? v(
1150
1150
  e,
@@ -1182,12 +1182,12 @@ function Ee(e, t = void 0, n = void 0) {
1182
1182
  console.warn("la liste est vide ou n'est pas un tableau");
1183
1183
  return;
1184
1184
  }
1185
- e.objIds.forEach((i, r) => {
1185
+ e.objIds.forEach((i, c) => {
1186
1186
  I(
1187
1187
  e,
1188
1188
  i.objID,
1189
1189
  (o) => {
1190
- s.push({ [i.name]: o }), i.name === "dbProjets" && (R = o.affaires.map((a) => a.objectID), q(e, x)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1190
+ s.push({ [i.name]: o }), i.name === "dbProjets" && (R = o.affaires.map((a) => a.objectID), q(e, x)), c === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1191
1191
  }
1192
1192
  );
1193
1193
  });
@@ -1197,8 +1197,8 @@ function q(e, t, n = void 0, s = void 0) {
1197
1197
  e,
1198
1198
  R,
1199
1199
  (i) => {
1200
- const r = [...t];
1201
- r.find((o) => o.objectID === i.objectId).data = i.data, x = r, $.push(i.data), n && n($);
1200
+ const c = [...t];
1201
+ c.find((o) => o.objectID === i.objectId).data = i.data, x = c, A.push(i.data), n && n(A);
1202
1202
  },
1203
1203
  (i) => {
1204
1204
  s && (s(i), console.log(i));
@@ -1226,10 +1226,10 @@ const H = "FA35FB9B177A280065800EA0000F599C", z = [
1226
1226
  tag: "testTag"
1227
1227
  };
1228
1228
  function Ge(e, t, n = void 0, s = void 0) {
1229
- const { space: i, tenant: r } = e, { objId: o, pred: a, tag: c } = t, d = {
1229
+ const { space: i, tenant: c } = e, { objId: o, pred: a, tag: r } = t, d = {
1230
1230
  uri: "/resources/6w/tags",
1231
1231
  otpCTX: "SecurityContext=preferred",
1232
- optTenant: `tenant=${r}`
1232
+ optTenant: `tenant=${c}`
1233
1233
  }, l = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1234
1234
  tag: [
1235
1235
  {
@@ -1240,7 +1240,7 @@ function Ge(e, t, n = void 0, s = void 0) {
1240
1240
  ],
1241
1241
  predicate: P[a],
1242
1242
  object: {
1243
- literal: c
1243
+ literal: r
1244
1244
  }
1245
1245
  }
1246
1246
  ]
@@ -1287,17 +1287,17 @@ function Ge(e, t, n = void 0, s = void 0) {
1287
1287
  }
1288
1288
  function Z(e, t, n = void 0, s = void 0) {
1289
1289
  console.log("obj ", t);
1290
- const i = t.info.name, r = {
1290
+ const i = t.info.name, c = {
1291
1291
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1292
1292
  uri: "/federated/search"
1293
- }, o = `${r.baseUrl}${r.uri}`, a = {
1293
+ }, o = `${c.baseUrl}${c.uri}`, a = {
1294
1294
  "Content-Type": "application/json",
1295
1295
  Accept: "application/json,text/javascript,*/*"
1296
- }, c = j(), d = {
1296
+ }, r = j(), d = {
1297
1297
  with_indexing_date: !0,
1298
1298
  with_synthesis: !0,
1299
1299
  with_nls: !1,
1300
- label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${c}`,
1300
+ label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${r}`,
1301
1301
  locale: "fr",
1302
1302
  select_predicate: [
1303
1303
  "ds6w:label",
@@ -1369,11 +1369,11 @@ function Z(e, t, n = void 0, s = void 0) {
1369
1369
  });
1370
1370
  }
1371
1371
  function Ke(e, t, n = void 0, s = void 0) {
1372
- const { objId: i, pred: r, tag: o } = t, a = {
1372
+ const { objId: i, pred: c, tag: o } = t, a = {
1373
1373
  uri: "/resources/6w/tags",
1374
1374
  otpCTX: "SecurityContext=preferred",
1375
1375
  optTenant: `tenant=${e.tenant}`
1376
- }, c = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1376
+ }, r = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1377
1377
  tag: [
1378
1378
  {
1379
1379
  subject: [
@@ -1381,14 +1381,14 @@ function Ke(e, t, n = void 0, s = void 0) {
1381
1381
  uri: `pid://${i}`
1382
1382
  }
1383
1383
  ],
1384
- predicate: P[r],
1384
+ predicate: P[c],
1385
1385
  object: {
1386
1386
  literal: o
1387
1387
  }
1388
1388
  }
1389
1389
  ]
1390
1390
  };
1391
- f(c, {
1391
+ f(r, {
1392
1392
  method: "DELETE",
1393
1393
  data: JSON.stringify(d),
1394
1394
  headers: {
@@ -1408,16 +1408,16 @@ function Xe(e, t = "", n = void 0, s = void 0) {
1408
1408
  const { space: i } = e;
1409
1409
  if (t === "")
1410
1410
  return;
1411
- const r = {
1411
+ const c = {
1412
1412
  uri: "/resources/v1/modeler/documents"
1413
1413
  }, o = {
1414
1414
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1415
1415
  Accept: "application/json,text/javascript,*/*"
1416
- }, a = `${i}${r.uri}`, c = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;
1416
+ }, a = `${i}${c.uri}`, r = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;
1417
1417
  f(a, {
1418
1418
  method: "POST",
1419
1419
  headers: o,
1420
- data: c,
1420
+ data: r,
1421
1421
  onComplete(d) {
1422
1422
  n && n(JSON.parse(d));
1423
1423
  },
@@ -1430,7 +1430,7 @@ function Xe(e, t = "", n = void 0, s = void 0) {
1430
1430
  async function w(e, t = void 0, n = void 0) {
1431
1431
  const s = e.space + "/api/index/tk";
1432
1432
  return f(s, {
1433
- onComplete(i, r, o) {
1433
+ onComplete(i, c, o) {
1434
1434
  const a = JSON.parse(i);
1435
1435
  if (t)
1436
1436
  return t(a), e.token = a?.result?.ServerToken;
@@ -1451,11 +1451,11 @@ function Ve(e, t = void 0, n = void 0) {
1451
1451
  start: 0
1452
1452
  }
1453
1453
  };
1454
- w(e, (r) => {
1454
+ w(e, (c) => {
1455
1455
  f(s, {
1456
1456
  method: "POST",
1457
1457
  headers: {
1458
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1458
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1459
1459
  "Content-type": "application/json;charset=UTF-8",
1460
1460
  Accept: "application/json"
1461
1461
  },
@@ -1480,19 +1480,19 @@ function We(e, t = void 0, n = void 0) {
1480
1480
  maxNbOfCommonElements: "5"
1481
1481
  }
1482
1482
  };
1483
- w(e, (r) => {
1483
+ w(e, (c) => {
1484
1484
  f(s, {
1485
1485
  method: "POST",
1486
1486
  headers: {
1487
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1487
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1488
1488
  "Content-type": "application/json;charset=UTF-8",
1489
1489
  Accept: "application/json"
1490
1490
  },
1491
1491
  data: JSON.stringify(i),
1492
1492
  type: "json",
1493
1493
  onComplete(o, a) {
1494
- const c = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1495
- t && t(c, o);
1494
+ const r = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1495
+ t && t(r, o);
1496
1496
  },
1497
1497
  onFailure(o, a) {
1498
1498
  n && n(o, a);
@@ -1506,14 +1506,14 @@ function Be(e, t = void 0, n = void 0) {
1506
1506
  uri: "/api/community/listmycommunities",
1507
1507
  limit: `/limit/${e.limit ? e.limit : 128}`,
1508
1508
  page: `/page/${e.page ? e.page : "1"}`
1509
- }, i = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1509
+ }, i = `${s.base}${s.uri}${s.limit}${s.page}`, c = [];
1510
1510
  w(e, (o) => {
1511
1511
  f(i, {
1512
1512
  method: "GET",
1513
1513
  headers: {
1514
1514
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1515
1515
  },
1516
- onComplete(a, c, d) {
1516
+ onComplete(a, r, d) {
1517
1517
  const p = JSON.parse(a).result;
1518
1518
  let u = 0;
1519
1519
  p.forEach((m) => {
@@ -1529,21 +1529,21 @@ function Be(e, t = void 0, n = void 0) {
1529
1529
  e,
1530
1530
  m.id,
1531
1531
  (h) => {
1532
- u++, g.members = h, r.push(g), u === p.length && t && t(r);
1532
+ u++, g.members = h, c.push(g), u === p.length && t && t(c);
1533
1533
  },
1534
1534
  (h) => n(h)
1535
1535
  );
1536
1536
  });
1537
1537
  },
1538
- onFailure(a, c) {
1538
+ onFailure(a, r) {
1539
1539
  const d = a;
1540
- d.status = c.status, d.response = c.errormsg, n && n(d);
1540
+ d.status = r.status, d.response = r.errormsg, n && n(d);
1541
1541
  }
1542
1542
  });
1543
1543
  });
1544
1544
  }
1545
1545
  function ee(e, t, n, s) {
1546
- const i = `${e.space}/api/community/listmembers`, r = {
1546
+ const i = `${e.space}/api/community/listmembers`, c = {
1547
1547
  params: {
1548
1548
  page: e.page ? e.page : 1,
1549
1549
  limit: e.limit ? e.limit : 50,
@@ -1558,14 +1558,14 @@ function ee(e, t, n, s) {
1558
1558
  Accept: "application/json",
1559
1559
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1560
1560
  },
1561
- data: JSON.stringify(r),
1561
+ data: JSON.stringify(c),
1562
1562
  type: "json",
1563
- onComplete(a, c, d) {
1563
+ onComplete(a, r, d) {
1564
1564
  n && n(a);
1565
1565
  },
1566
- onFailure(a, c) {
1566
+ onFailure(a, r) {
1567
1567
  const d = a;
1568
- d.status = c.status, d.response = c.errormsg, s && s(d);
1568
+ d.status = r.status, d.response = r.errormsg, s && s(d);
1569
1569
  }
1570
1570
  });
1571
1571
  });
@@ -1574,31 +1574,31 @@ function Ye(e, t = void 0, n = void 0) {
1574
1574
  const s = "YXdA5x4DSUKtlAi2wmnyTA";
1575
1575
  e.commu_id || (e.commu_id = s);
1576
1576
  const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1577
- w(e, (r) => {
1577
+ w(e, (c) => {
1578
1578
  f(i, {
1579
1579
  method: "GET",
1580
1580
  headers: {
1581
1581
  "Content-type": "application/json;charset=UTF-8",
1582
1582
  Accept: "application/json",
1583
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1583
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1584
1584
  },
1585
1585
  onComplete(o) {
1586
1586
  const a = JSON.parse(o);
1587
1587
  t && t(a);
1588
1588
  },
1589
1589
  onFailure(o, a) {
1590
- const c = o;
1591
- c.status = a.status, c.response = a.errormsg, n && n(c);
1590
+ const r = o;
1591
+ r.status = a.status, r.response = a.errormsg, n && n(r);
1592
1592
  }
1593
1593
  });
1594
1594
  });
1595
1595
  }
1596
1596
  function qe(e, t, n = void 0, s = void 0) {
1597
- const { listAllContacts: i, currentUser: r } = e;
1597
+ const { listAllContacts: i, currentUser: c } = e;
1598
1598
  console.log("__listAllContacts", i.hits);
1599
1599
  const o = `${e.space}/api/directmessages`, a = {
1600
- users: [r.login].concat(t.receipt)
1601
- }, c = {
1600
+ users: [c.login].concat(t.receipt)
1601
+ }, r = {
1602
1602
  id_msg: "",
1603
1603
  senderId: e.currentUser.login,
1604
1604
  senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
@@ -1608,10 +1608,10 @@ function qe(e, t, n = void 0, s = void 0) {
1608
1608
  te(
1609
1609
  a.users,
1610
1610
  (l) => {
1611
- l !== void 0 && (c.id_msg = l.id, d = !0, D(e, c));
1611
+ l !== void 0 && (r.id_msg = l.id, d = !0, D(e, r));
1612
1612
  },
1613
1613
  (l) => {
1614
- d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), c.id_msg = "";
1614
+ d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), r.id_msg = "";
1615
1615
  }
1616
1616
  ), d === !1 && setTimeout(() => {
1617
1617
  d === !1 && w(e, (l) => {
@@ -1626,7 +1626,7 @@ function qe(e, t, n = void 0, s = void 0) {
1626
1626
  type: "json",
1627
1627
  onComplete(p, u, m) {
1628
1628
  const g = p;
1629
- g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), c.id_msg = g.result.id, D(e, c);
1629
+ g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), r.id_msg = g.result.id, D(e, r);
1630
1630
  },
1631
1631
  onFailure(p, u, m) {
1632
1632
  const g = p;
@@ -1638,19 +1638,19 @@ function qe(e, t, n = void 0, s = void 0) {
1638
1638
  }
1639
1639
  function te(e, t, n, s) {
1640
1640
  const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
1641
- w(e, (r) => {
1641
+ w(e, (c) => {
1642
1642
  f(i, {
1643
1643
  method: "GET",
1644
1644
  headers: {
1645
1645
  Accept: "application/json,text/javascript,*/*",
1646
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1646
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1647
1647
  },
1648
1648
  onComplete(o) {
1649
- const a = JSON.parse(o), c = [];
1649
+ const a = JSON.parse(o), r = [];
1650
1650
  a.result.forEach((p) => {
1651
- p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && c.push(p);
1651
+ p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && r.push(p);
1652
1652
  });
1653
- const d = t.sort(), l = c.find((p) => {
1653
+ const d = t.sort(), l = r.find((p) => {
1654
1654
  const u = [];
1655
1655
  return p.users.forEach((m) => {
1656
1656
  u.push(m.login);
@@ -1671,7 +1671,7 @@ function D(e, t, n = void 0, s = void 0) {
1671
1671
  uri: "/api/community",
1672
1672
  id_msg: `${t.id_msg}`,
1673
1673
  endUri: "/instantmessages"
1674
- }, r = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
1674
+ }, c = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
1675
1675
  author: { login: t.senderId, displayName: t.senderName },
1676
1676
  accessState: null,
1677
1677
  commentUri: null,
@@ -1681,8 +1681,8 @@ function D(e, t, n = void 0, s = void 0) {
1681
1681
  parentCommentUri: null,
1682
1682
  richMessage: t.msg
1683
1683
  };
1684
- console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (a) => {
1685
- f(r, {
1684
+ console.log("_3dSwym_sendDirectMessageData url ", c), w(e, (a) => {
1685
+ f(c, {
1686
1686
  method: "POST",
1687
1687
  headers: {
1688
1688
  "Content-Type": "application/json",
@@ -1691,12 +1691,12 @@ function D(e, t, n = void 0, s = void 0) {
1691
1691
  },
1692
1692
  data: JSON.stringify(o),
1693
1693
  type: "json",
1694
- onComplete(c, d, l) {
1695
- const p = c;
1694
+ onComplete(r, d, l) {
1695
+ const p = r;
1696
1696
  p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
1697
1697
  },
1698
- onFailure(c, d) {
1699
- const l = c;
1698
+ onFailure(r, d) {
1699
+ const l = r;
1700
1700
  l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
1701
1701
  }
1702
1702
  });
@@ -1720,15 +1720,15 @@ const se = {
1720
1720
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1721
1721
  };
1722
1722
  function He(e, t, n = void 0, s = void 0) {
1723
- const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1724
- (c) => c.id === t.community_id
1723
+ const i = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
1724
+ (r) => r.id === t.community_id
1725
1725
  ), o = e.swymCommunities.find(
1726
- (c) => c.title.toLowerCase() === t.community_title.toLowerCase()
1726
+ (r) => r.title.toLowerCase() === t.community_title.toLowerCase()
1727
1727
  ), a = {
1728
1728
  params: {
1729
1729
  title: t.title,
1730
1730
  // String, le nom de l'affaire
1731
- community_id: r?.id !== void 0 ? r.id : o.id,
1731
+ community_id: c?.id !== void 0 ? c.id : o.id,
1732
1732
  // String, l'id de la communauté
1733
1733
  message: ae(t.text_html),
1734
1734
  // STRING => le contenue du message doit être au format HTML
@@ -1736,11 +1736,11 @@ function He(e, t, n = void 0, s = void 0) {
1736
1736
  // 1 publier, 0 non publier
1737
1737
  }
1738
1738
  };
1739
- w(e, (c) => {
1739
+ w(e, (r) => {
1740
1740
  const d = {
1741
1741
  "Content-type": "application/json;charset=UTF-8",
1742
1742
  Accept: "application/json",
1743
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1743
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1744
1744
  };
1745
1745
  f(i, {
1746
1746
  method: "POST",
@@ -1759,7 +1759,7 @@ function He(e, t, n = void 0, s = void 0) {
1759
1759
  });
1760
1760
  }
1761
1761
  function ze(e, t, n = void 0, s = void 0) {
1762
- const i = `${e.space}/api/idea/delete`, r = {
1762
+ const i = `${e.space}/api/idea/delete`, c = {
1763
1763
  params: {
1764
1764
  community_id: t.community_id,
1765
1765
  ideationIds: [t.idee_id]
@@ -1773,14 +1773,14 @@ function ze(e, t, n = void 0, s = void 0) {
1773
1773
  Accept: "application/json",
1774
1774
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1775
1775
  },
1776
- data: JSON.stringify(r),
1776
+ data: JSON.stringify(c),
1777
1777
  type: "json",
1778
- onComplete(a, c, d) {
1778
+ onComplete(a, r, d) {
1779
1779
  n && n(a);
1780
1780
  },
1781
- onFailure(a, c, d) {
1781
+ onFailure(a, r, d) {
1782
1782
  const l = a;
1783
- l.status = c.status, l.response = c.errormsg, s && s(l);
1783
+ l.status = r.status, l.response = r.errormsg, s && s(l);
1784
1784
  }
1785
1785
  });
1786
1786
  });
@@ -1788,13 +1788,13 @@ function ze(e, t, n = void 0, s = void 0) {
1788
1788
  function Qe(e, t = "", n = void 0, s = void 0) {
1789
1789
  const i = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1790
1790
  t === "" && (t = i);
1791
- const r = `${e.space}/api/idea/get`, o = {
1791
+ const c = `${e.space}/api/idea/get`, o = {
1792
1792
  params: {
1793
1793
  id: t
1794
1794
  }
1795
1795
  };
1796
1796
  w(e, (a) => {
1797
- f(r, {
1797
+ f(c, {
1798
1798
  method: "POST",
1799
1799
  headers: {
1800
1800
  "Content-type": "application/json;charset=UTF-8",
@@ -1803,12 +1803,12 @@ function Qe(e, t = "", n = void 0, s = void 0) {
1803
1803
  },
1804
1804
  data: JSON.stringify(o),
1805
1805
  type: "json",
1806
- onComplete(c) {
1807
- const d = c;
1806
+ onComplete(r) {
1807
+ const d = r;
1808
1808
  d.msg = d.result.message, n && n(d);
1809
1809
  },
1810
- onFailure(c) {
1811
- const d = c;
1810
+ onFailure(r) {
1811
+ const d = r;
1812
1812
  d.status = headers.status, d.response = headers.errormsg, s && s(d);
1813
1813
  }
1814
1814
  });
@@ -1819,20 +1819,20 @@ function Ze(e, t = se, n = void 0, s = void 0) {
1819
1819
  uri: "/api/idea/list",
1820
1820
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1821
1821
  limit: `/limit/${t.limit ? t.limit : 10}`
1822
- }, r = `${e.space}${i.uri}${i.comId}${i.limit}`;
1822
+ }, c = `${e.space}${i.uri}${i.comId}${i.limit}`;
1823
1823
  w(e, (o) => {
1824
- f(r, {
1824
+ f(c, {
1825
1825
  method: "GET",
1826
1826
  headers: {
1827
1827
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1828
1828
  },
1829
1829
  onComplete(a) {
1830
- const c = JSON.parse(a);
1831
- n && n(c);
1830
+ const r = JSON.parse(a);
1831
+ n && n(r);
1832
1832
  },
1833
- onFailure(a, c) {
1833
+ onFailure(a, r) {
1834
1834
  const d = a;
1835
- d.status = c.status, d.response = c.errormsg, s && s(d);
1835
+ d.status = r.status, d.response = r.errormsg, s && s(d);
1836
1836
  }
1837
1837
  });
1838
1838
  });
@@ -1920,13 +1920,13 @@ function et(e, t = void 0, n = void 0) {
1920
1920
  headers: {
1921
1921
  "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1922
1922
  },
1923
- onComplete(r, o, a) {
1924
- const c = JSON.parse(r);
1925
- t && t(c.result);
1923
+ onComplete(c, o, a) {
1924
+ const r = JSON.parse(c);
1925
+ t && t(r.result);
1926
1926
  },
1927
- onFailure(r, o, a) {
1928
- const c = { erreur: JSON.parse(r), headers: o, xhr: a };
1929
- n && n(c);
1927
+ onFailure(c, o, a) {
1928
+ const r = { erreur: JSON.parse(c), headers: o, xhr: a };
1929
+ n && n(r);
1930
1930
  }
1931
1931
  });
1932
1932
  });
@@ -1935,11 +1935,11 @@ function tt(e, t, n = void 0, s = void 0) {
1935
1935
  const i = e.space + "/api/user/find/login/" + t;
1936
1936
  w(
1937
1937
  e,
1938
- (r) => {
1938
+ (c) => {
1939
1939
  f(i, {
1940
1940
  method: "GET",
1941
- headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
1942
- onComplete(o, a, c) {
1941
+ headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
1942
+ onComplete(o, a, r) {
1943
1943
  const d = JSON.parse(o);
1944
1944
  n && n(d);
1945
1945
  },
@@ -1954,16 +1954,25 @@ function tt(e, t, n = void 0, s = void 0) {
1954
1954
  function nt(e, t = void 0, n = void 0) {
1955
1955
  e.tenant && E(e, (s) => {
1956
1956
  console.log("serviceUrls", s);
1957
- const i = s.services.find((d) => d.id === "3dpassport")?.url, r = s.services.find((d) => d.id === "3dcompass")?.url, o = s.services.find((d) => d.id === "businessprocess")?.url + "/api/v2", a = `${i}/login/?service=${r}/resources/AppsMngt/api/pull/self`, c = `${i}/login/?service=${o}/auth/cas`;
1958
- f(a, {
1959
- method: "POST",
1960
- onComplete(d) {
1961
- f(c, {
1957
+ const i = s.services.find((r) => r.id === "3dpassport")?.url;
1958
+ s.services.find((r) => r.id === "3dcompass")?.url;
1959
+ const c = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2", o = `${i}/login?action=get_auth_params`, a = `${i}/login/?service=${c}/auth/cas`;
1960
+ f(o, {
1961
+ onComplete(r) {
1962
+ const d = r.lt;
1963
+ f(a, {
1962
1964
  onComplete(l) {
1963
1965
  console.log("response", l);
1964
1966
  const p = typeof l == "string" ? JSON.parse(l)?.x3ds_service_redirect_url : l?.x3ds_service_redirect_url;
1965
1967
  p ? f(p, {
1966
1968
  method: "POST",
1969
+ headers: {
1970
+ ENO_CSRF_TOKEN: e.token,
1971
+ "Content-Type": "application/x-www-form-urlencoded"
1972
+ },
1973
+ data: JSON.stringify({
1974
+ lt: d
1975
+ }),
1967
1976
  onComplete(u) {
1968
1977
  t && t(u);
1969
1978
  },
@@ -1976,9 +1985,6 @@ function nt(e, t = void 0, n = void 0) {
1976
1985
  n && n(l);
1977
1986
  }
1978
1987
  });
1979
- },
1980
- onFailure(d) {
1981
- n && n(d);
1982
1988
  }
1983
1989
  });
1984
1990
  });
@@ -1993,7 +1999,7 @@ function at(e, t = void 0, n = void 0) {
1993
1999
  const o = J();
1994
2000
  console.log("platformeInfo", o);
1995
2001
  }
1996
- b(
2002
+ N(
1997
2003
  e,
1998
2004
  "Common space",
1999
2005
  ["VPLMProjectLeader", "VPLMCreator"],
@@ -2004,14 +2010,14 @@ function at(e, t = void 0, n = void 0) {
2004
2010
  },
2005
2011
  !0
2006
2012
  );
2007
- const i = N.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
2008
- f(r, {
2013
+ const i = b.now().ts, c = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
2014
+ f(c, {
2009
2015
  onComplete(o) {
2010
2016
  if (Array.isArray(JSON.parse(o))) {
2011
2017
  const a = JSON.parse(o);
2012
2018
  console.log("serviceId=3dsearch", a);
2013
- const c = `${a[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
2014
- f(c, {
2019
+ const r = `${a[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
2020
+ f(r, {
2015
2021
  method: "POST",
2016
2022
  headers: {
2017
2023
  Accept: "application/json",
@@ -2080,13 +2086,13 @@ export {
2080
2086
  v as _3DSpace_get_csrf,
2081
2087
  X as _3DSpace_get_docInfo,
2082
2088
  Y as _3DSpace_get_downloadTicket_multidoc,
2083
- b as _3DSpace_get_securityContexts,
2084
- A as _3DSpace_get_ticket,
2089
+ N as _3DSpace_get_securityContexts,
2090
+ $ as _3DSpace_get_ticket,
2085
2091
  je as _3DSpace_lifecycle_changeRevision,
2086
- $e as _3DSpace_lifecycle_changeState,
2092
+ Ae as _3DSpace_lifecycle_changeState,
2087
2093
  De as _3DSpace_lifecycle_getGraph,
2088
2094
  Ue as _3DSpace_lifecycle_getNextRevision,
2089
- Ae as _3DSpace_lifecycle_getNextStates,
2095
+ $e as _3DSpace_lifecycle_getNextStates,
2090
2096
  qe as _3DSwym_buildDirectMessage,
2091
2097
  ze as _3DSwym_deleteIdea,
2092
2098
  te as _3DSwym_findCommunityToInstantMSG,
@@ -2133,8 +2139,8 @@ export {
2133
2139
  Te as getUserGroupsList,
2134
2140
  G as getUsersGroupRules,
2135
2141
  Le as get_3DSpace_csrf,
2136
- be as patchUserGroups,
2137
- Ne as patchUserGroupsControl,
2142
+ Ne as patchUserGroups,
2143
+ be as patchUserGroupsControl,
2138
2144
  Me as pushDataIn3DSpace,
2139
2145
  ve as readUserGroupControl,
2140
2146
  Ke as removeTagToDoc,