@beam3_dev/api_module 0.0.90 → 0.0.92

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
@@ -67,9 +67,9 @@ async function re(e, t = void 0, s = void 0) {
67
67
  }
68
68
  async function ce(e, t = L) {
69
69
  let s = N.now().year;
70
- const n = e, i = [], c = (a) => {
71
- for (let r in a)
72
- i.push({ date: r, comment: a[r] });
70
+ const n = e, i = [], r = (a) => {
71
+ for (let o in a)
72
+ i.push({ date: o, comment: a[o] });
73
73
  };
74
74
  for (let a = s; a <= s + 1; a++)
75
75
  await fetch(
@@ -80,20 +80,20 @@ async function ce(e, t = L) {
80
80
  Accept: "application/json"
81
81
  }
82
82
  }
83
- ).then((r) => r.json()).then((r) => {
84
- c(r);
85
- }).catch((r) => console.error("Erreur : " + r));
83
+ ).then((o) => o.json()).then((o) => {
84
+ r(o);
85
+ }).catch((o) => console.error("Erreur : " + o));
86
86
  return (() => {
87
87
  const a = n.length === 0 ? {
88
88
  events: []
89
89
  } : n;
90
- for (let r of i)
90
+ for (let o of i)
91
91
  a.events.findIndex(
92
- (l) => l.start === N.fromISO(r.date).toISODate() && l.name === "Férié : " + r.comment
92
+ (l) => l.start === N.fromISO(o.date).toISODate() && l.name === "Férié : " + o.comment
93
93
  ) === -1 && a.events.push({
94
- name: "Férié : " + r.comment,
95
- start: N.fromISO(r.date).toISODate(),
96
- end: N.fromISO(r.date).toISODate(),
94
+ name: "Férié : " + o.comment,
95
+ start: N.fromISO(o.date).toISODate(),
96
+ end: N.fromISO(o.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
@@ -102,7 +102,7 @@ async function ce(e, t = L) {
102
102
  }
103
103
  async function de(e, t, s = !0) {
104
104
  const n = e.events.findIndex((i) => i.uuid === t.uuid);
105
- return n === -1 ? e.events.push(t) : s ? e.events[n] = t : e.events.splice(n, 1), e.length > 0 && e.sort((i, c) => i.start - c.start), e;
105
+ return n === -1 ? e.events.push(t) : s ? e.events[n] = t : e.events.splice(n, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
106
106
  }
107
107
  function m(e, t) {
108
108
  O(["DS/WAFData/WAFData"], (s) => {
@@ -145,14 +145,14 @@ async function fe(e, t = void 0, s = void 0) {
145
145
  function me() {
146
146
  let e = {};
147
147
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
148
- const s = t.getTenant(), n = t.getUser(), i = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
148
+ const s = t.getTenant(), n = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
149
149
  "com.3ds.wp.passport.cors"
150
150
  );
151
151
  e = {
152
152
  tenant: s,
153
153
  user: n,
154
154
  appsConfiguration: i,
155
- appConf: c
155
+ appConf: r
156
156
  };
157
157
  }), console.log("%cRETOUR API :", "color:blue", e), e;
158
158
  }
@@ -169,42 +169,42 @@ function ge(e, t, s) {
169
169
  "Content-Type": "application/json",
170
170
  Accept: "application/json"
171
171
  },
172
- onComplete(c, o, a) {
173
- const r = JSON.parse(c), d = r.data.map((l) => {
172
+ onComplete(r, c, a) {
173
+ const o = JSON.parse(r), d = o.data.map((l) => {
174
174
  const p = l.attributes.name, u = l.id;
175
175
  return { name: p, id: u };
176
176
  });
177
- t && t(d, r);
177
+ t && t(d, o);
178
178
  },
179
- onFailure(c, o) {
180
- const a = c;
181
- a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
179
+ onFailure(r, c) {
180
+ const a = r;
181
+ a.msg = c.errormsg, a.errCode = c.errorcode, s && s(a);
182
182
  }
183
183
  });
184
184
  }
185
185
  function he(e, t = void 0, s = void 0) {
186
186
  let n = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
187
187
  m(n, {
188
- onComplete(i, c, o) {
188
+ onComplete(i, r, c) {
189
189
  const a = JSON.parse(i);
190
190
  console.log("_AppMngt_get_users => ", a), t && t(a);
191
191
  },
192
- onFailure(i, c) {
193
- const o = i;
194
- o.msg = c.errormsg, o.errCode = c.errorcode, s && s(o);
192
+ onFailure(i, r) {
193
+ const c = i;
194
+ c.msg = r.errormsg, c.errCode = r.errorcode, s && s(c);
195
195
  }
196
196
  });
197
197
  }
198
198
  function Se(e, t, s = void 0, n = void 0) {
199
199
  let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
200
200
  m(i, {
201
- onComplete(c, o, a) {
202
- const r = JSON.parse(c);
203
- s && s(r);
201
+ onComplete(r, c, a) {
202
+ const o = JSON.parse(r);
203
+ s && s(o);
204
204
  },
205
- onFailure(c, o) {
206
- const a = c;
207
- a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
205
+ onFailure(r, c) {
206
+ const a = r;
207
+ a.msg = c.errormsg, a.errCode = c.errorcode, n && n(a);
208
208
  }
209
209
  });
210
210
  }
@@ -213,14 +213,14 @@ const D = {
213
213
  Accept: "application/json,text/javascript,*/*"
214
214
  };
215
215
  function _e(e, t, s = void 0, n = void 0) {
216
- const { space: i, currentUser: c } = e, a = `${i}${{
216
+ const { space: i, currentUser: r } = e, a = `${i}${{
217
217
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
218
- }.URIUGr}`, r = {
218
+ }.URIUGr}`, o = {
219
219
  groups: [
220
220
  {
221
221
  title: t.title,
222
222
  description: t.description,
223
- members: t.members || [c.email, "samuel.mureau@beam3.fr"],
223
+ members: t.members || [r.email, "samuel.mureau@beam3.fr"],
224
224
  pending_members: [],
225
225
  sharing: t.sharing,
226
226
  visibility: t.visibility
@@ -230,7 +230,7 @@ function _e(e, t, s = void 0, n = void 0) {
230
230
  m(a, {
231
231
  method: "POST",
232
232
  headers: D,
233
- data: JSON.stringify(r),
233
+ data: JSON.stringify(o),
234
234
  onComplete(d) {
235
235
  s && s(JSON.parse(d));
236
236
  },
@@ -242,7 +242,7 @@ function _e(e, t, s = void 0, n = void 0) {
242
242
  });
243
243
  }
244
244
  function ye(e, t, s = void 0, n = void 0) {
245
- 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}`;
245
+ const { space: i, tenant: r } = e, c = i, a = `/3drdfpersist/v1/resources/${t}`, o = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${c}${a}${o}`;
246
246
  m(d, {
247
247
  opts: {
248
248
  method: "GET",
@@ -261,12 +261,12 @@ function ye(e, t, s = void 0, n = void 0) {
261
261
  });
262
262
  }
263
263
  function J(e, t = void 0, s = void 0) {
264
- const { space: n, tenant: i } = e, c = n, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, r = {
264
+ const { space: n, tenant: i } = e, r = n, c = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, o = {
265
265
  method: "GET",
266
266
  Accept: "application/json,*/*,test/javascript"
267
- }, d = `${c}${o}${a}`;
267
+ }, d = `${r}${c}${a}`;
268
268
  m(d, {
269
- OPTsH: r,
269
+ OPTsH: o,
270
270
  onComplete(l) {
271
271
  t && t(JSON.parse(l));
272
272
  },
@@ -314,15 +314,15 @@ function Ce(e, t) {
314
314
  });
315
315
  }
316
316
  function Te(e, t, s, n = void 0, i = void 0) {
317
- const { space: c, tenant: o } = e, a = {
317
+ const { space: r, tenant: c } = e, a = {
318
318
  URITI: "/3drdfpersist/resources/v1/template-instances",
319
319
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
320
320
  nextURICh: "/characteristics",
321
321
  nextURIGr: "/group",
322
322
  nexURImem: "/members",
323
323
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
324
- OPTsTenant: `tenant=dstenant:${o}`
325
- }, r = s, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(r);
324
+ OPTsTenant: `tenant=dstenant:${c}`
325
+ }, o = s, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(o);
326
326
  m(d, {
327
327
  headers: D,
328
328
  method: "PATCH",
@@ -337,7 +337,7 @@ function Te(e, t, s, n = void 0, i = void 0) {
337
337
  });
338
338
  }
339
339
  function Oe(e, t, s, n = void 0, i = void 0) {
340
- const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
340
+ const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
341
341
  m(a, {
342
342
  method: "PATCH",
343
343
  headers: D,
@@ -352,8 +352,8 @@ function Oe(e, t, s, n = void 0, i = void 0) {
352
352
  });
353
353
  }
354
354
  function Ne(e, t, s = void 0, n = void 0) {
355
- const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
- m(o, {
355
+ const { space: i } = e, c = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
+ m(c, {
357
357
  opts: {
358
358
  method: "GET",
359
359
  headers: {
@@ -376,8 +376,8 @@ async function E(e, t, s) {
376
376
  onComplete(i) {
377
377
  i = JSON.parse(i), t && t(i.csrf);
378
378
  },
379
- onFailure(i, c, o) {
380
- s && s({ error: i, headers: c, xhr: o });
379
+ onFailure(i, r, c) {
380
+ s && s({ error: i, headers: r, xhr: c });
381
381
  }
382
382
  });
383
383
  }
@@ -388,14 +388,14 @@ async function G(e, t = void 0, s = void 0, n = void 0) {
388
388
  console.log("Le paramètre docid est obligatoire");
389
389
  return;
390
390
  }
391
- const c = i + `/resources/v1/modeler/documents/${t}`;
392
- m(c, {
393
- onComplete(o, a, r) {
394
- const d = JSON.parse(o);
391
+ const r = i + `/resources/v1/modeler/documents/${t}`;
392
+ m(r, {
393
+ onComplete(c, a, o) {
394
+ const d = JSON.parse(c);
395
395
  s && s(d);
396
396
  },
397
- onFailure(o) {
398
- n && n(o);
397
+ onFailure(c) {
398
+ n && n(c);
399
399
  }
400
400
  });
401
401
  }
@@ -403,7 +403,7 @@ function k(e, t = void 0, s = void 0) {
403
403
  if (e.objID && e.objID !== "") {
404
404
  let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
405
405
  m(n, {
406
- onComplete(i, c, o) {
406
+ onComplete(i, r, c) {
407
407
  const a = JSON.parse(i);
408
408
  e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
409
409
  },
@@ -426,15 +426,15 @@ function T(e, t = void 0, s = void 0) {
426
426
  if (e.space) {
427
427
  const n = e.space + "/resources/v1/application/CSRF";
428
428
  m(n, {
429
- onComplete(i, c, o) {
429
+ onComplete(i, r, c) {
430
430
  const a = JSON.parse(i);
431
431
  t && t(a.csrf.value);
432
432
  },
433
- onFailure(i, c, o) {
433
+ onFailure(i, r, c) {
434
434
  s && s({
435
435
  response: i,
436
- headers: c,
437
- xhr: o
436
+ headers: r,
437
+ xhr: c
438
438
  });
439
439
  }
440
440
  });
@@ -451,12 +451,12 @@ function A(e, t = void 0, s = void 0) {
451
451
  headers: {
452
452
  ENO_CSRF_TOKEN: e.token
453
453
  },
454
- onComplete(c) {
455
- const a = JSON.parse(c).data[0].dataelements.ticketURL;
454
+ onComplete(r) {
455
+ const a = JSON.parse(r).data[0].dataelements.ticketURL;
456
456
  t && t(a);
457
457
  },
458
- onFailure(c, o) {
459
- console.warn("☠️ error => ", c, o), s && s(c, o);
458
+ onFailure(r, c) {
459
+ console.warn("☠️ error => ", r, c), s && s(r, c);
460
460
  }
461
461
  });
462
462
  },
@@ -466,28 +466,28 @@ function A(e, t = void 0, s = void 0) {
466
466
  );
467
467
  }
468
468
  function be(e, t, s, n = void 0, i = void 0) {
469
- const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
470
- s || (s = e.token), m(c, {
469
+ const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
470
+ s || (s = e.token), m(r, {
471
471
  method: "PUT",
472
472
  headers: {
473
473
  ENO_CSRF_TOKEN: s
474
474
  },
475
- onComplete(o) {
476
- let a = JSON.parse(o);
475
+ onComplete(c) {
476
+ let a = JSON.parse(c);
477
477
  if (console.log("☠️ info => ", a), a.success === !0)
478
478
  try {
479
- const r = a.data[0].dataelements.ticketURL;
480
- n && n(r);
481
- } catch (r) {
482
- i && i(r);
479
+ const o = a.data[0].dataelements.ticketURL;
480
+ n && n(o);
481
+ } catch (o) {
482
+ i && i(o);
483
483
  }
484
484
  },
485
- onFailure(o) {
486
- i && i(o);
485
+ onFailure(c) {
486
+ i && i(c);
487
487
  }
488
488
  });
489
489
  }
490
- function K(e, t, s, n, i, c = void 0, o = void 0) {
490
+ function K(e, t, s, n, i, r = void 0, c = void 0) {
491
491
  k(
492
492
  e,
493
493
  t,
@@ -499,18 +499,18 @@ function K(e, t, s, n, i, c = void 0, o = void 0) {
499
499
  n,
500
500
  i,
501
501
  a.csrf.value,
502
- c,
503
- o
502
+ r,
503
+ c
504
504
  );
505
505
  }
506
506
  );
507
507
  }
508
- function X(e, t, s, n, i, c, o = void 0, a = void 0) {
509
- const r = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
510
- m(r, {
508
+ function X(e, t, s, n, i, r, c = void 0, a = void 0) {
509
+ const o = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
510
+ m(o, {
511
511
  method: "PUT",
512
512
  headers: {
513
- ENO_CSRF_TOKEN: c
513
+ ENO_CSRF_TOKEN: r
514
514
  },
515
515
  onComplete(d, l, p) {
516
516
  const u = JSON.parse(d).data[0].dataelements, f = new FormData();
@@ -520,7 +520,7 @@ function X(e, t, s, n, i, c, o = void 0, a = void 0) {
520
520
  let S = "temp_" + Date.now(), _ = {
521
521
  method: "PUT",
522
522
  headers: {
523
- ENO_CSRF_TOKEN: c
523
+ ENO_CSRF_TOKEN: r
524
524
  },
525
525
  data: JSON.stringify({
526
526
  data: [{
@@ -540,7 +540,7 @@ function X(e, t, s, n, i, c, o = void 0, a = void 0) {
540
540
  }),
541
541
  type: "json",
542
542
  onComplete(y) {
543
- o && o(y);
543
+ c && c(y);
544
544
  },
545
545
  onFailure(y) {
546
546
  a && a(y);
@@ -556,14 +556,14 @@ function X(e, t, s, n, i, c, o = void 0, a = void 0) {
556
556
  }
557
557
  });
558
558
  }
559
- async function ke(e, t, s, n, i = void 0, c = void 0) {
560
- const o = e.space, a = e.token, r = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
559
+ async function ke(e, t, s, n, i = void 0, r = void 0) {
560
+ const c = e.space, a = e.token, o = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
561
561
  type: "text/plain"
562
562
  }), p = {
563
- url_Ticket: `${o}/resources/v1/modeler/documents/files/CheckinTicket`,
564
- url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${r}`
563
+ url_Ticket: `${c}/resources/v1/modeler/documents/files/CheckinTicket`,
564
+ url_Post: `${c}/resources/v1/modeler/documents/?SecurityContext=ctx::${o}`
565
565
  };
566
- if (!o && o !== "") {
566
+ if (!c && c !== "") {
567
567
  console.log("le store._3DSpace est vide");
568
568
  return;
569
569
  }
@@ -579,7 +579,7 @@ async function ke(e, t, s, n, i = void 0, c = void 0) {
579
579
  method: "POST",
580
580
  data: d,
581
581
  onComplete(C) {
582
- if (r !== "" && a !== "") {
582
+ if (o !== "" && a !== "") {
583
583
  const F = {
584
584
  method: "POST",
585
585
  headers: {
@@ -611,7 +611,7 @@ async function ke(e, t, s, n, i = void 0, c = void 0) {
611
611
  onComplete: _,
612
612
  onFailure: y
613
613
  };
614
- r !== "" && m(p.url_Post, F);
614
+ o !== "" && m(p.url_Post, F);
615
615
  } else
616
616
  console.warn("le store est vide");
617
617
  },
@@ -622,18 +622,18 @@ async function ke(e, t, s, n, i = void 0, c = void 0) {
622
622
  }
623
623
  function y(C, F) {
624
624
  console.log("Erreur -- response ", C, `
625
- headers `, F), c && c(C);
625
+ headers `, F), r && r(C);
626
626
  }
627
627
  m(h.ticketURL, S);
628
628
  }
629
629
  });
630
630
  }
631
- function b(e, t = void 0, s = void 0, n = void 0, i = void 0, c = void 0, o = !1) {
631
+ function b(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, c = !1) {
632
632
  const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
633
633
  m(a, {
634
634
  method: "GET",
635
- onComplete(r) {
636
- const d = JSON.parse(r);
635
+ onComplete(o) {
636
+ const d = JSON.parse(o);
637
637
  let l = "", p, u, f;
638
638
  if (t) {
639
639
  let g = d.collabspaces.find((h) => h.title === t);
@@ -652,7 +652,7 @@ function b(e, t = void 0, s = void 0, n = void 0, i = void 0, c = void 0, o = !1
652
652
  let y = h.filter(
653
653
  (C) => C.role.name === S
654
654
  );
655
- y.length === 1 ? (f = y[0].role.name, u = y[0].organization.title) : c(y);
655
+ y.length === 1 ? (f = y[0].role.name, u = y[0].organization.title) : r(y);
656
656
  }
657
657
  });
658
658
  }) : h.forEach((S) => {
@@ -662,22 +662,22 @@ function b(e, t = void 0, s = void 0, n = void 0, i = void 0, c = void 0, o = !1
662
662
  let _ = h.filter(
663
663
  (y) => y.role.name === s
664
664
  );
665
- _.length === 1 ? (f = _[0].role.name, u = _[0].organization.title) : c(_);
665
+ _.length === 1 ? (f = _[0].role.name, u = _[0].organization.title) : r(_);
666
666
  }
667
667
  }));
668
668
  }
669
669
  }
670
- p && u && f ? (l = f + "." + u + "." + p, i(l)) : d.preferredcredentials && o ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(l)) : c && (l = f + "." + u + "." + p, c(l));
670
+ p && u && f ? (l = f + "." + u + "." + p, i(l)) : d.preferredcredentials && c ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(l)) : r && (l = f + "." + u + "." + p, r(l));
671
671
  },
672
- onFailure(r, d) {
672
+ onFailure(o, d) {
673
673
  console.log("Erreur de récupération du contexte de sécurité. => ", {
674
- err: r,
674
+ err: o,
675
675
  headers: d
676
676
  });
677
677
  }
678
678
  });
679
679
  }
680
- async function I(e, t = void 0, s = void 0) {
680
+ async function v(e, t = void 0, s = void 0) {
681
681
  return (!e.objID || e.objID === "") && console.warn(
682
682
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
683
683
  ), (e.space === "" || !e.space) && console.warn(
@@ -695,36 +695,36 @@ async function I(e, t = void 0, s = void 0) {
695
695
  )), new Promise((n, i) => {
696
696
  A(
697
697
  e,
698
- (c) => {
699
- m(c, {
698
+ (r) => {
699
+ m(r, {
700
700
  headers: {
701
701
  "Content-Type": "application/json",
702
702
  Accept: "application/json"
703
703
  },
704
704
  onComplete(a) {
705
- let r;
705
+ let o;
706
706
  try {
707
- r = JSON.parse(a);
707
+ o = JSON.parse(a);
708
708
  } catch {
709
- r = a;
709
+ o = a;
710
710
  }
711
- t && t(r), n(r);
711
+ t && t(o), n(o);
712
712
  },
713
- onFailure(a, r, d) {
713
+ onFailure(a, o, d) {
714
714
  s && (console.log("error http", a), s({
715
715
  msg: JSON.parse(a),
716
- headers: r,
716
+ headers: o,
717
717
  xhr: d
718
718
  }), i({
719
719
  msg: JSON.parse(a),
720
- headers: r,
720
+ headers: o,
721
721
  xhr: d
722
722
  }));
723
723
  }
724
724
  });
725
725
  },
726
- (c) => {
727
- s && s(c), console.log("*_3dspace_download_doc / error file URL *", c), i(c);
726
+ (r) => {
727
+ s && s(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
728
728
  }
729
729
  );
730
730
  });
@@ -733,47 +733,47 @@ async function W(e, t, s = void 0, n = void 0) {
733
733
  let i = [];
734
734
  if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
735
735
  for (let a = 0; a < t.length; a += 80) {
736
- const r = t.slice(a, a + 80);
737
- i.push(r);
736
+ const o = t.slice(a, a + 80);
737
+ i.push(o);
738
738
  }
739
- const o = (a) => {
739
+ const c = (a) => {
740
740
  V(
741
741
  e,
742
742
  i[a],
743
743
  () => {
744
- a++, a < i.length && o(a);
744
+ a++, a < i.length && c(a);
745
745
  },
746
- (r) => {
747
- s && s(r);
746
+ (o) => {
747
+ s && s(o);
748
748
  }
749
749
  );
750
750
  };
751
- o(0);
751
+ c(0);
752
752
  } else
753
753
  console.warn("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."), n && n("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini.");
754
754
  }
755
755
  function V(e, t, s = void 0, n = void 0, i = void 0) {
756
- const c = [];
757
- t.forEach((r) => {
758
- c.push({
759
- id: r
756
+ const r = [];
757
+ t.forEach((o) => {
758
+ r.push({
759
+ id: o
760
760
  });
761
761
  });
762
- let o = JSON.stringify({
762
+ let c = JSON.stringify({
763
763
  csrf: {
764
764
  name: "ENO_CSRF_TOKEN",
765
765
  value: e.token
766
766
  },
767
- data: c
767
+ data: r
768
768
  });
769
769
  const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
770
770
  m(a, {
771
771
  method: "PUT",
772
- data: o,
772
+ data: c,
773
773
  type: "json",
774
- onComplete(r) {
775
- const d = r.data;
776
- r.success === !0 && (s && s(), d.forEach((l) => {
774
+ onComplete(o) {
775
+ const d = o.data;
776
+ o.success === !0 && (s && s(), d.forEach((l) => {
777
777
  try {
778
778
  const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
779
779
  m(u, {
@@ -793,15 +793,15 @@ function V(e, t, s = void 0, n = void 0, i = void 0) {
793
793
  }
794
794
  }));
795
795
  },
796
- onFailure(r) {
797
- console.log(r), i && i(r);
796
+ onFailure(o) {
797
+ console.log(o), i && i(o);
798
798
  }
799
799
  });
800
800
  }
801
801
  function Fe(e, t, s = void 0, n = void 0) {
802
802
  return new Promise((i) => {
803
803
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
804
- const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
804
+ const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
805
805
  b(
806
806
  e.space,
807
807
  "ESPACE COMMUN",
@@ -812,7 +812,7 @@ function Fe(e, t, s = void 0, n = void 0) {
812
812
  console.log("onError =>", a);
813
813
  }
814
814
  );
815
- let o = {
815
+ let c = {
816
816
  method: "POST",
817
817
  headers: {
818
818
  SecurityContext: "ctx::" + e.ctx,
@@ -833,22 +833,22 @@ function Fe(e, t, s = void 0, n = void 0) {
833
833
  n && n(a);
834
834
  }
835
835
  };
836
- m(c, o);
836
+ m(r, c);
837
837
  }
838
838
  });
839
839
  }
840
840
  function De(e, t, s, n = void 0, i = void 0) {
841
- return new Promise((c) => {
841
+ return new Promise((r) => {
842
842
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
843
- const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
843
+ const c = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
844
844
  b(
845
845
  e.space,
846
846
  "ESPACE COMMUN",
847
847
  ["VPLMProjectLeader", "VPLMCreator"],
848
848
  void 0,
849
- (r) => e.ctx = r,
850
- (r) => {
851
- console.log("onError =>", r);
849
+ (o) => e.ctx = o,
850
+ (o) => {
851
+ console.log("onError =>", o);
852
852
  }
853
853
  );
854
854
  let a = {
@@ -866,21 +866,21 @@ function De(e, t, s, n = void 0, i = void 0) {
866
866
  }]
867
867
  }),
868
868
  type: "json",
869
- onComplete(r) {
870
- n && n(r);
869
+ onComplete(o) {
870
+ n && n(o);
871
871
  },
872
- onFailure(r) {
873
- i && i(r);
872
+ onFailure(o) {
873
+ i && i(o);
874
874
  }
875
875
  };
876
- m(o, a);
876
+ m(c, a);
877
877
  }
878
878
  });
879
879
  }
880
880
  function Ae(e, t, s = void 0, n = void 0) {
881
881
  return new Promise((i) => {
882
882
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
883
- const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
883
+ const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
884
884
  b(
885
885
  e.space,
886
886
  "ESPACE COMMUN",
@@ -891,7 +891,7 @@ function Ae(e, t, s = void 0, n = void 0) {
891
891
  console.log("onError =>", a);
892
892
  }
893
893
  );
894
- let o = {
894
+ let c = {
895
895
  method: "POST",
896
896
  headers: {
897
897
  securitycontext: "ctx::" + e.ctx,
@@ -912,14 +912,14 @@ function Ae(e, t, s = void 0, n = void 0) {
912
912
  n && n(a);
913
913
  }
914
914
  };
915
- m(c, o);
915
+ m(r, c);
916
916
  }
917
917
  });
918
918
  }
919
919
  function $e(e, t, s = void 0, n = void 0) {
920
920
  return new Promise((i) => {
921
921
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
922
- const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
922
+ const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
923
923
  b(
924
924
  e.space,
925
925
  "ESPACE COMMUN",
@@ -930,7 +930,7 @@ function $e(e, t, s = void 0, n = void 0) {
930
930
  console.log("onError =>", a);
931
931
  }
932
932
  );
933
- let o = {
933
+ let c = {
934
934
  method: "POST",
935
935
  headers: {
936
936
  SecurityContext: "ctx::" + e.ctx,
@@ -957,22 +957,22 @@ function $e(e, t, s = void 0, n = void 0) {
957
957
  n && n(a);
958
958
  }
959
959
  };
960
- m(c, o);
960
+ m(r, c);
961
961
  }
962
962
  });
963
963
  }
964
964
  function Ue(e, t, s, n = void 0, i = void 0) {
965
- return new Promise((c) => {
965
+ return new Promise((r) => {
966
966
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
967
- const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
967
+ const c = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
968
968
  b(
969
969
  e.space,
970
970
  "ESPACE COMMUN",
971
971
  ["VPLMProjectLeader", "VPLMCreator"],
972
972
  void 0,
973
- (r) => e.ctx = r,
974
- (r) => {
975
- console.log("onError =>", r);
973
+ (o) => e.ctx = o,
974
+ (o) => {
975
+ console.log("onError =>", o);
976
976
  }
977
977
  );
978
978
  let a = {
@@ -995,26 +995,30 @@ function Ue(e, t, s, n = void 0, i = void 0) {
995
995
  notificationTimeout: 600
996
996
  }),
997
997
  type: "json",
998
- onComplete(r) {
999
- n && n(r);
998
+ onComplete(o) {
999
+ n && n(o);
1000
1000
  },
1001
- onFailure(r) {
1002
- i && i(r);
1001
+ onFailure(o) {
1002
+ i && i(o);
1003
1003
  }
1004
1004
  };
1005
- m(o, a);
1005
+ m(c, a);
1006
1006
  }
1007
1007
  });
1008
1008
  }
1009
1009
  function je(e, t, s = void 0, n = void 0) {
1010
1010
  return new Promise((i) => {
1011
1011
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1012
- const c = N.now().ts;
1013
- `${e.space}`, m(`https://eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e._platformId}`, {
1014
- onComplete(o) {
1015
- if (Array.isArray(JSON.parse(o))) {
1016
- const r = `${JSON.parse(o)[0].services[0].url}/search?xrequestedwith=xmlhttprequest&tenant=${e._platformId}&timestamp=${c}`;
1017
- m(r, {
1012
+ const r = N.now().ts;
1013
+ `${e.space}`;
1014
+ const c = `https://eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
1015
+ m(c, {
1016
+ onComplete(a) {
1017
+ if (Array.isArray(JSON.parse(a))) {
1018
+ const o = JSON.parse(a);
1019
+ console.log("serviceId=3dsearch", o);
1020
+ const d = `${o[0].services[0].url}/search?xrequestedwith=xmlhttprequest&tenant=${e.tenant}&timestamp=${r}`;
1021
+ m(d, {
1018
1022
  method: "POST",
1019
1023
  headers: {
1020
1024
  Accept: "application/json",
@@ -1023,7 +1027,7 @@ function je(e, t, s = void 0, n = void 0) {
1023
1027
  data: JSON.stringify({
1024
1028
  with_indexing_date: !0,
1025
1029
  with_nls: !1,
1026
- label: `yus-${c}`,
1030
+ label: `yus-${r}`,
1027
1031
  locale: "en",
1028
1032
  select_predicate: [
1029
1033
  "ds6w:label",
@@ -1049,17 +1053,17 @@ function je(e, t, s = void 0, n = void 0) {
1049
1053
  tenant: e._platformId
1050
1054
  }),
1051
1055
  type: "json",
1052
- onComplete(d) {
1053
- s && s(d);
1056
+ onComplete(l) {
1057
+ s && s(l);
1054
1058
  },
1055
- onFailure(d) {
1056
- n && n(d);
1059
+ onFailure(l) {
1060
+ n && n(l);
1057
1061
  }
1058
1062
  });
1059
1063
  }
1060
1064
  },
1061
- onFailure(o) {
1062
- n && n(o);
1065
+ onFailure(a) {
1066
+ n && n(a);
1063
1067
  }
1064
1068
  }), JSON.stringify({
1065
1069
  csrf: {
@@ -1094,57 +1098,57 @@ function Re(e, t = void 0, s = void 0) {
1094
1098
  Accept: "application/json,text/javascript,*/*",
1095
1099
  "Content-Type": "application/ds-json"
1096
1100
  },
1097
- onComplete(c, o) {
1098
- const a = JSON.parse(c);
1099
- t && t(a, o);
1101
+ onComplete(r, c) {
1102
+ const a = JSON.parse(r);
1103
+ t && t(a, c);
1100
1104
  },
1101
- onFailure(c, o, a) {
1102
- s && s({ response: c, headers: o, xhr: a });
1105
+ onFailure(r, c, a) {
1106
+ s && s({ response: r, headers: c, xhr: a });
1103
1107
  }
1104
1108
  });
1105
1109
  }
1106
- function Ie(e, t, s, n) {
1110
+ function ve(e, t, s, n) {
1107
1111
  A(
1108
1112
  e.space,
1109
1113
  t,
1110
1114
  (i) => {
1111
1115
  m(i, {
1112
1116
  header: { ENO_CSRF_TOKEN: e.token },
1113
- onComplete: (c) => {
1114
- s && s(c);
1117
+ onComplete: (r) => {
1118
+ s && s(r);
1115
1119
  },
1116
- onFailure: (c) => {
1117
- console.log("error http", c), n && n(c);
1120
+ onFailure: (r) => {
1121
+ console.log("error http", r), n && n(r);
1118
1122
  }
1119
1123
  });
1120
1124
  }
1121
1125
  );
1122
1126
  }
1123
- async function ve(e, t, s = void 0, n = void 0) {
1127
+ async function Ie(e, t, s = void 0, n = void 0) {
1124
1128
  return new Promise((i) => {
1125
- A(e, t, (c) => {
1126
- m(c, {
1127
- onComplete: (o, a, r) => (i(JSON.parse(o)), s && s(JSON.parse(o), a, r), i),
1128
- onFailure: (o, a, r) => {
1129
- n && n(o, a, r), console.log(o, a?.errormsg);
1129
+ A(e, t, (r) => {
1130
+ m(r, {
1131
+ onComplete: (c, a, o) => (i(JSON.parse(c)), s && s(JSON.parse(c), a, o), i),
1132
+ onFailure: (c, a, o) => {
1133
+ n && n(c, a, o), console.log(c, a?.errormsg);
1130
1134
  }
1131
1135
  });
1132
1136
  });
1133
1137
  });
1134
1138
  }
1135
1139
  function Pe(e, t, s, n = void 0, i = void 0) {
1136
- const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
1140
+ const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1137
1141
  k(
1138
1142
  e,
1139
1143
  s,
1140
- (o) => {
1141
- 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;
1144
+ (c) => {
1145
+ const a = c.data[0].relateddata.files[0].id, o = c.data[0].dataelements.secondaryTitle !== "" ? c.data[0].dataelements.secondaryTitle : c.data[0].dataelements.title;
1142
1146
  K(
1143
1147
  e,
1144
1148
  s,
1145
1149
  a,
1146
- c,
1147
1150
  r,
1151
+ o,
1148
1152
  (d) => {
1149
1153
  n && n(d);
1150
1154
  },
@@ -1155,7 +1159,7 @@ function Pe(e, t, s, n = void 0, i = void 0) {
1155
1159
  }
1156
1160
  );
1157
1161
  }
1158
- let v, P;
1162
+ let I, P;
1159
1163
  const $ = [];
1160
1164
  async function xe(e, t = void 0, s = void 0) {
1161
1165
  e.objID && e.objID !== "" ? k(
@@ -1177,7 +1181,7 @@ async function xe(e, t = void 0, s = void 0) {
1177
1181
  );
1178
1182
  }
1179
1183
  async function Me(e, t = void 0, s = void 0) {
1180
- console.log("getDatasByTenant (getDocuments)", e), await I(
1184
+ console.log("getDatasByTenant (getDocuments)", e), await v(
1181
1185
  e,
1182
1186
  (n) => {
1183
1187
  const i = {};
@@ -1194,12 +1198,12 @@ function Le(e, t = void 0, s = void 0) {
1194
1198
  console.warn("la liste est vide ou n'est pas un tableau");
1195
1199
  return;
1196
1200
  }
1197
- e.objIds.forEach((i, c) => {
1198
- I(
1201
+ e.objIds.forEach((i, r) => {
1202
+ v(
1199
1203
  e,
1200
1204
  i.objID,
1201
- (o) => {
1202
- n.push({ [i.name]: o }), i.name === "dbProjets" && (v = o.affaires.map((a) => a.objectID), B(e, P)), c === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
1205
+ (c) => {
1206
+ n.push({ [i.name]: c }), i.name === "dbProjets" && (I = c.affaires.map((a) => a.objectID), B(e, P)), r === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
1203
1207
  }
1204
1208
  );
1205
1209
  });
@@ -1207,10 +1211,10 @@ function Le(e, t = void 0, s = void 0) {
1207
1211
  function B(e, t, s = void 0, n = void 0) {
1208
1212
  W(
1209
1213
  e,
1210
- v,
1214
+ I,
1211
1215
  (i) => {
1212
- const c = [...t];
1213
- c.find((o) => o.objectID === i.objectId).data = i.data, P = c, $.push(i.data), s && s($);
1216
+ const r = [...t];
1217
+ r.find((c) => c.objectID === i.objectId).data = i.data, P = r, $.push(i.data), s && s($);
1214
1218
  },
1215
1219
  (i) => {
1216
1220
  n && (n(i), console.log(i));
@@ -1238,21 +1242,21 @@ const Y = "FA35FB9B177A280065800EA0000F599C", q = [
1238
1242
  tag: "testTag"
1239
1243
  };
1240
1244
  function Je(e, t, s = void 0, n = void 0) {
1241
- const { space: i, tenant: c } = e, { objId: o, pred: a, tag: r } = t, d = {
1245
+ const { space: i, tenant: r } = e, { objId: c, pred: a, tag: o } = t, d = {
1242
1246
  uri: "/resources/6w/tags",
1243
1247
  otpCTX: "SecurityContext=preferred",
1244
- optTenant: `tenant=${c}`
1248
+ optTenant: `tenant=${r}`
1245
1249
  }, l = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1246
1250
  tag: [
1247
1251
  {
1248
1252
  subject: [
1249
1253
  {
1250
- uri: `pid://${o}`
1254
+ uri: `pid://${c}`
1251
1255
  }
1252
1256
  ],
1253
1257
  predicate: x[a],
1254
1258
  object: {
1255
- literal: r
1259
+ literal: o
1256
1260
  }
1257
1261
  }
1258
1262
  ]
@@ -1270,7 +1274,7 @@ function Je(e, t, s = void 0, n = void 0) {
1270
1274
  setTimeout(() => {
1271
1275
  G(
1272
1276
  e,
1273
- o,
1277
+ c,
1274
1278
  (g) => {
1275
1279
  const h = g.data[0].dataelements.title, S = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", _ = g.data[0].relateddata.ownerInfo[0].dataelements.name;
1276
1280
  f.name = h, f.ext = S, f.createBy = _, t.info = { ...f }, z(
@@ -1299,17 +1303,17 @@ function Je(e, t, s = void 0, n = void 0) {
1299
1303
  }
1300
1304
  function z(e, t, s = void 0, n = void 0) {
1301
1305
  console.log("obj ", t);
1302
- const i = t.info.name, c = {
1306
+ const i = t.info.name, r = {
1303
1307
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1304
1308
  uri: "/federated/search"
1305
- }, o = `${c.baseUrl}${c.uri}`, a = {
1309
+ }, c = `${r.baseUrl}${r.uri}`, a = {
1306
1310
  "Content-Type": "application/json",
1307
1311
  Accept: "application/json,text/javascript,*/*"
1308
- }, r = R(), d = {
1312
+ }, o = R(), d = {
1309
1313
  with_indexing_date: !0,
1310
1314
  with_synthesis: !0,
1311
1315
  with_nls: !1,
1312
- label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${r}`,
1316
+ label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${o}`,
1313
1317
  locale: "fr",
1314
1318
  select_predicate: [
1315
1319
  "ds6w:label",
@@ -1366,7 +1370,7 @@ function z(e, t, s = void 0, n = void 0) {
1366
1370
  }
1367
1371
  }
1368
1372
  };
1369
- console.log("dataPattern => ", d), m(o, {
1373
+ console.log("dataPattern => ", d), m(c, {
1370
1374
  method: "POST",
1371
1375
  headers: a,
1372
1376
  data: JSON.stringify(d),
@@ -1381,11 +1385,11 @@ function z(e, t, s = void 0, n = void 0) {
1381
1385
  });
1382
1386
  }
1383
1387
  function Ee(e, t, s = void 0, n = void 0) {
1384
- const { objId: i, pred: c, tag: o } = t, a = {
1388
+ const { objId: i, pred: r, tag: c } = t, a = {
1385
1389
  uri: "/resources/6w/tags",
1386
1390
  otpCTX: "SecurityContext=preferred",
1387
1391
  optTenant: `tenant=${e.tenant}`
1388
- }, r = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1392
+ }, o = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1389
1393
  tag: [
1390
1394
  {
1391
1395
  subject: [
@@ -1393,14 +1397,14 @@ function Ee(e, t, s = void 0, n = void 0) {
1393
1397
  uri: `pid://${i}`
1394
1398
  }
1395
1399
  ],
1396
- predicate: x[c],
1400
+ predicate: x[r],
1397
1401
  object: {
1398
- literal: o
1402
+ literal: c
1399
1403
  }
1400
1404
  }
1401
1405
  ]
1402
1406
  };
1403
- m(r, {
1407
+ m(o, {
1404
1408
  method: "DELETE",
1405
1409
  data: JSON.stringify(d),
1406
1410
  headers: {
@@ -1420,16 +1424,16 @@ function Ge(e, t = "", s = void 0, n = void 0) {
1420
1424
  const { space: i } = e;
1421
1425
  if (t === "")
1422
1426
  return;
1423
- const c = {
1427
+ const r = {
1424
1428
  uri: "/resources/v1/modeler/documents"
1425
- }, o = {
1429
+ }, c = {
1426
1430
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1427
1431
  Accept: "application/json,text/javascript,*/*"
1428
- }, 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}`;
1432
+ }, a = `${i}${r.uri}`, o = `$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}`;
1429
1433
  m(a, {
1430
1434
  method: "POST",
1431
- headers: o,
1432
- data: r,
1435
+ headers: c,
1436
+ data: o,
1433
1437
  onComplete(d) {
1434
1438
  s && s(JSON.parse(d));
1435
1439
  },
@@ -1442,7 +1446,7 @@ function Ge(e, t = "", s = void 0, n = void 0) {
1442
1446
  async function w(e, t = void 0, s = void 0) {
1443
1447
  const n = e.space + "/api/index/tk";
1444
1448
  return m(n, {
1445
- onComplete(i, c, o) {
1449
+ onComplete(i, r, c) {
1446
1450
  const a = JSON.parse(i);
1447
1451
  if (t)
1448
1452
  return t(a), e.token = a?.result?.ServerToken;
@@ -1463,21 +1467,21 @@ function Ke(e, t = void 0, s = void 0) {
1463
1467
  start: 0
1464
1468
  }
1465
1469
  };
1466
- w(e, (c) => {
1470
+ w(e, (r) => {
1467
1471
  m(n, {
1468
1472
  method: "POST",
1469
1473
  headers: {
1470
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1474
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1471
1475
  "Content-type": "application/json;charset=UTF-8",
1472
1476
  Accept: "application/json"
1473
1477
  },
1474
1478
  data: JSON.stringify(i),
1475
1479
  type: "json",
1476
- onComplete(o, a) {
1477
- t && t(o, a);
1480
+ onComplete(c, a) {
1481
+ t && t(c, a);
1478
1482
  },
1479
- onFailure(o, a) {
1480
- s && s(o, a);
1483
+ onFailure(c, a) {
1484
+ s && s(c, a);
1481
1485
  }
1482
1486
  });
1483
1487
  });
@@ -1492,22 +1496,22 @@ function Xe(e, t = void 0, s = void 0) {
1492
1496
  maxNbOfCommonElements: "5"
1493
1497
  }
1494
1498
  };
1495
- w(e, (c) => {
1499
+ w(e, (r) => {
1496
1500
  m(n, {
1497
1501
  method: "POST",
1498
1502
  headers: {
1499
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1503
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1500
1504
  "Content-type": "application/json;charset=UTF-8",
1501
1505
  Accept: "application/json"
1502
1506
  },
1503
1507
  data: JSON.stringify(i),
1504
1508
  type: "json",
1505
- onComplete(o, a) {
1506
- const r = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1507
- t && t(r, o);
1509
+ onComplete(c, a) {
1510
+ const o = c.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1511
+ t && t(o, c);
1508
1512
  },
1509
- onFailure(o, a) {
1510
- s && s(o, a);
1513
+ onFailure(c, a) {
1514
+ s && s(c, a);
1511
1515
  }
1512
1516
  });
1513
1517
  });
@@ -1518,14 +1522,14 @@ function We(e, t = void 0, s = void 0) {
1518
1522
  uri: "/api/community/listmycommunities",
1519
1523
  limit: `/limit/${e.limit ? e.limit : 128}`,
1520
1524
  page: `/page/${e.page ? e.page : "1"}`
1521
- }, i = `${n.base}${n.uri}${n.limit}${n.page}`, c = [];
1522
- w(e, (o) => {
1525
+ }, i = `${n.base}${n.uri}${n.limit}${n.page}`, r = [];
1526
+ w(e, (c) => {
1523
1527
  m(i, {
1524
1528
  method: "GET",
1525
1529
  headers: {
1526
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1530
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1527
1531
  },
1528
- onComplete(a, r, d) {
1532
+ onComplete(a, o, d) {
1529
1533
  const p = JSON.parse(a).result;
1530
1534
  let u = 0;
1531
1535
  p.forEach((f) => {
@@ -1541,43 +1545,43 @@ function We(e, t = void 0, s = void 0) {
1541
1545
  e,
1542
1546
  f.id,
1543
1547
  (h) => {
1544
- u++, g.members = h, c.push(g), u === p.length && t && t(c);
1548
+ u++, g.members = h, r.push(g), u === p.length && t && t(r);
1545
1549
  },
1546
1550
  (h) => s(h)
1547
1551
  );
1548
1552
  });
1549
1553
  },
1550
- onFailure(a, r) {
1554
+ onFailure(a, o) {
1551
1555
  const d = a;
1552
- d.status = r.status, d.response = r.errormsg, s && s(d);
1556
+ d.status = o.status, d.response = o.errormsg, s && s(d);
1553
1557
  }
1554
1558
  });
1555
1559
  });
1556
1560
  }
1557
1561
  function Q(e, t, s, n) {
1558
- const i = `${e.space}/api/community/listmembers`, c = {
1562
+ const i = `${e.space}/api/community/listmembers`, r = {
1559
1563
  params: {
1560
1564
  page: e.page ? e.page : 1,
1561
1565
  limit: e.limit ? e.limit : 50,
1562
1566
  community_id: t
1563
1567
  }
1564
1568
  };
1565
- w(e, (o) => {
1569
+ w(e, (c) => {
1566
1570
  m(i, {
1567
1571
  method: "POST",
1568
1572
  headers: {
1569
1573
  "Content-type": "application/json;charset=UTF-8",
1570
1574
  Accept: "application/json",
1571
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1575
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1572
1576
  },
1573
- data: JSON.stringify(c),
1577
+ data: JSON.stringify(r),
1574
1578
  type: "json",
1575
- onComplete(a, r, d) {
1579
+ onComplete(a, o, d) {
1576
1580
  s && s(a);
1577
1581
  },
1578
- onFailure(a, r) {
1582
+ onFailure(a, o) {
1579
1583
  const d = a;
1580
- d.status = r.status, d.response = r.errormsg, n && n(d);
1584
+ d.status = o.status, d.response = o.errormsg, n && n(d);
1581
1585
  }
1582
1586
  });
1583
1587
  });
@@ -1586,31 +1590,31 @@ function Ve(e, t = void 0, s = void 0) {
1586
1590
  const n = "YXdA5x4DSUKtlAi2wmnyTA";
1587
1591
  e.commu_id || (e.commu_id = n);
1588
1592
  const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1589
- w(e, (c) => {
1593
+ w(e, (r) => {
1590
1594
  m(i, {
1591
1595
  method: "GET",
1592
1596
  headers: {
1593
1597
  "Content-type": "application/json;charset=UTF-8",
1594
1598
  Accept: "application/json",
1595
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1599
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1596
1600
  },
1597
- onComplete(o) {
1598
- const a = JSON.parse(o);
1601
+ onComplete(c) {
1602
+ const a = JSON.parse(c);
1599
1603
  t && t(a);
1600
1604
  },
1601
- onFailure(o, a) {
1602
- const r = o;
1603
- r.status = a.status, r.response = a.errormsg, s && s(r);
1605
+ onFailure(c, a) {
1606
+ const o = c;
1607
+ o.status = a.status, o.response = a.errormsg, s && s(o);
1604
1608
  }
1605
1609
  });
1606
1610
  });
1607
1611
  }
1608
1612
  function Be(e, t, s = void 0, n = void 0) {
1609
- const { listAllContacts: i, currentUser: c } = e;
1613
+ const { listAllContacts: i, currentUser: r } = e;
1610
1614
  console.log("__listAllContacts", i.hits);
1611
- const o = `${e.space}/api/directmessages`, a = {
1612
- users: [c.login].concat(t.receipt)
1613
- }, r = {
1615
+ const c = `${e.space}/api/directmessages`, a = {
1616
+ users: [r.login].concat(t.receipt)
1617
+ }, o = {
1614
1618
  id_msg: "",
1615
1619
  senderId: e.currentUser.login,
1616
1620
  senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
@@ -1620,14 +1624,14 @@ function Be(e, t, s = void 0, n = void 0) {
1620
1624
  Z(
1621
1625
  a.users,
1622
1626
  (l) => {
1623
- l !== void 0 && (r.id_msg = l.id, d = !0, U(e, r));
1627
+ l !== void 0 && (o.id_msg = l.id, d = !0, U(e, o));
1624
1628
  },
1625
1629
  (l) => {
1626
- d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l), r.id_msg = "";
1630
+ d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l), o.id_msg = "";
1627
1631
  }
1628
1632
  ), d === !1 && setTimeout(() => {
1629
1633
  d === !1 && w(e, (l) => {
1630
- m(o, {
1634
+ m(c, {
1631
1635
  method: "POST",
1632
1636
  headers: {
1633
1637
  "Content-Type": "application/json",
@@ -1638,7 +1642,7 @@ function Be(e, t, s = void 0, n = void 0) {
1638
1642
  type: "json",
1639
1643
  onComplete(p, u, f) {
1640
1644
  const g = p;
1641
- g.reponse = JSON.parse(f.response), g.status = f.status, s && s(g), r.id_msg = g.result.id, U(e, r);
1645
+ g.reponse = JSON.parse(f.response), g.status = f.status, s && s(g), o.id_msg = g.result.id, U(e, o);
1642
1646
  },
1643
1647
  onFailure(p, u, f) {
1644
1648
  const g = p;
@@ -1650,19 +1654,19 @@ function Be(e, t, s = void 0, n = void 0) {
1650
1654
  }
1651
1655
  function Z(e, t, s, n) {
1652
1656
  const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
1653
- w(e, (c) => {
1657
+ w(e, (r) => {
1654
1658
  m(i, {
1655
1659
  method: "GET",
1656
1660
  headers: {
1657
1661
  Accept: "application/json,text/javascript,*/*",
1658
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1662
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1659
1663
  },
1660
- onComplete(o) {
1661
- const a = JSON.parse(o), r = [];
1664
+ onComplete(c) {
1665
+ const a = JSON.parse(c), o = [];
1662
1666
  a.result.forEach((p) => {
1663
- p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length && r.push(p);
1667
+ p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length && o.push(p);
1664
1668
  });
1665
- const d = t.sort(), l = r.find((p) => {
1669
+ const d = t.sort(), l = o.find((p) => {
1666
1670
  const u = [];
1667
1671
  return p.users.forEach((f) => {
1668
1672
  u.push(f.login);
@@ -1670,8 +1674,8 @@ function Z(e, t, s, n) {
1670
1674
  });
1671
1675
  s && l !== void 0 ? s(l) : (n || l === void 0) && n(l);
1672
1676
  },
1673
- onFailure(o) {
1674
- const a = o;
1677
+ onFailure(c) {
1678
+ const a = c;
1675
1679
  a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), n && n(a);
1676
1680
  }
1677
1681
  });
@@ -1683,7 +1687,7 @@ function U(e, t, s = void 0, n = void 0) {
1683
1687
  uri: "/api/community",
1684
1688
  id_msg: `${t.id_msg}`,
1685
1689
  endUri: "/instantmessages"
1686
- }, c = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
1690
+ }, r = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, c = {
1687
1691
  author: { login: t.senderId, displayName: t.senderName },
1688
1692
  accessState: null,
1689
1693
  commentUri: null,
@@ -1693,22 +1697,22 @@ function U(e, t, s = void 0, n = void 0) {
1693
1697
  parentCommentUri: null,
1694
1698
  richMessage: t.msg
1695
1699
  };
1696
- console.log("_3dSwym_sendDirectMessageData url ", c), w(e, (a) => {
1697
- m(c, {
1700
+ console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (a) => {
1701
+ m(r, {
1698
1702
  method: "POST",
1699
1703
  headers: {
1700
1704
  "Content-Type": "application/json",
1701
1705
  Accept: "application/json",
1702
1706
  "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1703
1707
  },
1704
- data: JSON.stringify(o),
1708
+ data: JSON.stringify(c),
1705
1709
  type: "json",
1706
- onComplete(r, d, l) {
1707
- const p = r;
1710
+ onComplete(o, d, l) {
1711
+ const p = o;
1708
1712
  p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), s && s(p);
1709
1713
  },
1710
- onFailure(r, d) {
1711
- const l = r;
1714
+ onFailure(o, d) {
1715
+ const l = o;
1712
1716
  l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), n && n(l);
1713
1717
  }
1714
1718
  });
@@ -1732,15 +1736,15 @@ const te = {
1732
1736
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1733
1737
  };
1734
1738
  function Ye(e, t, s = void 0, n = void 0) {
1735
- const i = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
1736
- (r) => r.id === t.community_id
1737
- ), o = e.swymCommunities.find(
1738
- (r) => r.title.toLowerCase() === t.community_title.toLowerCase()
1739
+ const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1740
+ (o) => o.id === t.community_id
1741
+ ), c = e.swymCommunities.find(
1742
+ (o) => o.title.toLowerCase() === t.community_title.toLowerCase()
1739
1743
  ), a = {
1740
1744
  params: {
1741
1745
  title: t.title,
1742
1746
  // String, le nom de l'affaire
1743
- community_id: c?.id !== void 0 ? c.id : o.id,
1747
+ community_id: r?.id !== void 0 ? r.id : c.id,
1744
1748
  // String, l'id de la communauté
1745
1749
  message: ne(t.text_html),
1746
1750
  // STRING => le contenue du message doit être au format HTML
@@ -1748,11 +1752,11 @@ function Ye(e, t, s = void 0, n = void 0) {
1748
1752
  // 1 publier, 0 non publier
1749
1753
  }
1750
1754
  };
1751
- w(e, (r) => {
1755
+ w(e, (o) => {
1752
1756
  const d = {
1753
1757
  "Content-type": "application/json;charset=UTF-8",
1754
1758
  Accept: "application/json",
1755
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1759
+ "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1756
1760
  };
1757
1761
  m(i, {
1758
1762
  method: "POST",
@@ -1771,28 +1775,28 @@ function Ye(e, t, s = void 0, n = void 0) {
1771
1775
  });
1772
1776
  }
1773
1777
  function qe(e, t, s = void 0, n = void 0) {
1774
- const i = `${e.space}/api/idea/delete`, c = {
1778
+ const i = `${e.space}/api/idea/delete`, r = {
1775
1779
  params: {
1776
1780
  community_id: t.community_id,
1777
1781
  ideationIds: [t.idee_id]
1778
1782
  }
1779
1783
  };
1780
- w(e, (o) => {
1784
+ w(e, (c) => {
1781
1785
  m(i, {
1782
1786
  method: "POST",
1783
1787
  headers: {
1784
1788
  "Content-type": "application/json;charset=UTF-8",
1785
1789
  Accept: "application/json",
1786
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1790
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1787
1791
  },
1788
- data: JSON.stringify(c),
1792
+ data: JSON.stringify(r),
1789
1793
  type: "json",
1790
- onComplete(a, r, d) {
1794
+ onComplete(a, o, d) {
1791
1795
  s && s(a);
1792
1796
  },
1793
- onFailure(a, r, d) {
1797
+ onFailure(a, o, d) {
1794
1798
  const l = a;
1795
- l.status = r.status, l.response = r.errormsg, n && n(l);
1799
+ l.status = o.status, l.response = o.errormsg, n && n(l);
1796
1800
  }
1797
1801
  });
1798
1802
  });
@@ -1800,27 +1804,27 @@ function qe(e, t, s = void 0, n = void 0) {
1800
1804
  function He(e, t = "", s = void 0, n = void 0) {
1801
1805
  const i = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1802
1806
  t === "" && (t = i);
1803
- const c = `${e.space}/api/idea/get`, o = {
1807
+ const r = `${e.space}/api/idea/get`, c = {
1804
1808
  params: {
1805
1809
  id: t
1806
1810
  }
1807
1811
  };
1808
1812
  w(e, (a) => {
1809
- m(c, {
1813
+ m(r, {
1810
1814
  method: "POST",
1811
1815
  headers: {
1812
1816
  "Content-type": "application/json;charset=UTF-8",
1813
1817
  Accept: "application/json",
1814
1818
  "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1815
1819
  },
1816
- data: JSON.stringify(o),
1820
+ data: JSON.stringify(c),
1817
1821
  type: "json",
1818
- onComplete(r) {
1819
- const d = r;
1822
+ onComplete(o) {
1823
+ const d = o;
1820
1824
  d.msg = d.result.message, s && s(d);
1821
1825
  },
1822
- onFailure(r) {
1823
- const d = r;
1826
+ onFailure(o) {
1827
+ const d = o;
1824
1828
  d.status = headers.status, d.response = headers.errormsg, n && n(d);
1825
1829
  }
1826
1830
  });
@@ -1831,20 +1835,20 @@ function ze(e, t = te, s = void 0, n = void 0) {
1831
1835
  uri: "/api/idea/list",
1832
1836
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1833
1837
  limit: `/limit/${t.limit ? t.limit : 10}`
1834
- }, c = `${e.space}${i.uri}${i.comId}${i.limit}`;
1835
- w(e, (o) => {
1836
- m(c, {
1838
+ }, r = `${e.space}${i.uri}${i.comId}${i.limit}`;
1839
+ w(e, (c) => {
1840
+ m(r, {
1837
1841
  method: "GET",
1838
1842
  headers: {
1839
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1843
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1840
1844
  },
1841
1845
  onComplete(a) {
1842
- const r = JSON.parse(a);
1843
- s && s(r);
1846
+ const o = JSON.parse(a);
1847
+ s && s(o);
1844
1848
  },
1845
- onFailure(a, r) {
1849
+ onFailure(a, o) {
1846
1850
  const d = a;
1847
- d.status = r.status, d.response = r.errormsg, n && n(d);
1851
+ d.status = o.status, d.response = o.errormsg, n && n(d);
1848
1852
  }
1849
1853
  });
1850
1854
  });
@@ -1932,13 +1936,13 @@ function Qe(e, t = void 0, s = void 0) {
1932
1936
  headers: {
1933
1937
  "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1934
1938
  },
1935
- onComplete(c, o, a) {
1936
- const r = JSON.parse(c);
1937
- t && t(r.result);
1939
+ onComplete(r, c, a) {
1940
+ const o = JSON.parse(r);
1941
+ t && t(o.result);
1938
1942
  },
1939
- onFailure(c, o, a) {
1940
- const r = { erreur: JSON.parse(c), headers: o, xhr: a };
1941
- s && s(r);
1943
+ onFailure(r, c, a) {
1944
+ const o = { erreur: JSON.parse(r), headers: c, xhr: a };
1945
+ s && s(o);
1942
1946
  }
1943
1947
  });
1944
1948
  });
@@ -1947,16 +1951,16 @@ function Ze(e, t, s = void 0, n = void 0) {
1947
1951
  const i = e.space + "/api/user/find/login/" + t;
1948
1952
  w(
1949
1953
  e,
1950
- (c) => {
1954
+ (r) => {
1951
1955
  m(i, {
1952
1956
  method: "GET",
1953
- headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
1954
- onComplete(o, a, r) {
1955
- const d = JSON.parse(o);
1957
+ headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
1958
+ onComplete(c, a, o) {
1959
+ const d = JSON.parse(c);
1956
1960
  s && s(d);
1957
1961
  },
1958
- onFailure(o) {
1959
- n && n(o);
1962
+ onFailure(c) {
1963
+ n && n(c);
1960
1964
  }
1961
1965
  });
1962
1966
  },
@@ -1972,7 +1976,7 @@ export {
1972
1976
  ke as _3DSpace_Create_Doc,
1973
1977
  je as _3DSpace_bookmark_addSubsciptions,
1974
1978
  T as _3DSpace_csrf,
1975
- I as _3DSpace_download_doc,
1979
+ v as _3DSpace_download_doc,
1976
1980
  W as _3DSpace_download_multidoc,
1977
1981
  K as _3DSpace_file_update,
1978
1982
  X as _3DSpace_file_update_csr,
@@ -2021,11 +2025,11 @@ export {
2021
2025
  E as getCSRFToken,
2022
2026
  oe as getCommunes,
2023
2027
  ye as getComplementUG,
2024
- Ie as getDataFrom3DSpace,
2028
+ ve as getDataFrom3DSpace,
2025
2029
  ce as getDataFromGouvFr,
2026
2030
  Me as getDatasByTenant,
2027
2031
  Le as getDatasFrom3DSpace,
2028
- ve as getDownloadDocument,
2032
+ Ie as getDownloadDocument,
2029
2033
  Ge as getInfoDocTags,
2030
2034
  we as getUserGroupsList,
2031
2035
  J as getUsersGroupRules,