@beam3_dev/api_module 0.0.282 → 0.0.283

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,13 +67,13 @@ async function Ne(e, t = void 0, n = void 0) {
67
67
  }
68
68
  async function Fe(e, t = H) {
69
69
  let n = O.now().year;
70
- const s = e, i = [], r = (a) => {
71
- for (let c in a)
72
- i.push({ date: c, comment: a[c] });
70
+ const s = e, i = [], r = (o) => {
71
+ for (let c in o)
72
+ i.push({ date: c, comment: o[c] });
73
73
  };
74
- for (let a = n; a <= n + 1; a++)
74
+ for (let o = n; o <= n + 1; o++)
75
75
  await fetch(
76
- "https://calendrier.api.gouv.fr/jours-feries/metropole/" + a + ".json",
76
+ "https://calendrier.api.gouv.fr/jours-feries/metropole/" + o + ".json",
77
77
  {
78
78
  method: "GET",
79
79
  headers: {
@@ -84,30 +84,30 @@ async function Fe(e, t = H) {
84
84
  r(c);
85
85
  }).catch((c) => console.error("Erreur : " + c));
86
86
  return (() => {
87
- const a = s.length === 0 ? {
87
+ const o = s.length === 0 ? {
88
88
  events: []
89
89
  } : s;
90
90
  for (let c of i)
91
- a.events.findIndex(
91
+ o.events.findIndex(
92
92
  (u) => u.start === O.fromISO(c.date).toISODate() && u.name === "Férié : " + c.comment
93
- ) === -1 && a.events.push({
93
+ ) === -1 && o.events.push({
94
94
  name: "Férié : " + c.comment,
95
95
  start: O.fromISO(c.date).toISODate(),
96
96
  end: O.fromISO(c.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
100
- return a;
100
+ return o;
101
101
  })();
102
102
  }
103
103
  function z(e, t, n) {
104
- const { credentials: s, myArray: i, chunk: r, fn_to_call: o } = e, a = [];
104
+ const { credentials: s, myArray: i, chunk: r, fn_to_call: a } = e, o = [];
105
105
  for (let c = 0; c < i.length; c += r) {
106
106
  const d = i.slice(c, c + r);
107
- a.push(d);
107
+ o.push(d);
108
108
  }
109
109
  Q(
110
- { credentials: s, chunks: a, initLoop: 0, fn: o },
110
+ { credentials: s, chunks: o, initLoop: 0, fn: a },
111
111
  (c) => {
112
112
  t && t(c);
113
113
  },
@@ -117,12 +117,12 @@ function z(e, t, n) {
117
117
  );
118
118
  }
119
119
  function Q(e, t, n) {
120
- const { credentials: s, chunks: i, initLoop: r, fn: o } = e, a = (c) => {
121
- o(
120
+ const { credentials: s, chunks: i, initLoop: r, fn: a } = e, o = (c) => {
121
+ a(
122
122
  s,
123
123
  i[c],
124
124
  () => {
125
- c++, c < i.length && a(c);
125
+ c++, c < i.length && o(c);
126
126
  },
127
127
  (d) => {
128
128
  t && t(d);
@@ -132,7 +132,7 @@ function Q(e, t, n) {
132
132
  }
133
133
  );
134
134
  };
135
- a(r);
135
+ o(r);
136
136
  }
137
137
  async function Ie(e, t, n = !0) {
138
138
  const s = e.events.findIndex((i) => i.uuid === t.uuid);
@@ -216,10 +216,10 @@ function P(e, t = void 0, n = void 0) {
216
216
  onComplete(i) {
217
217
  const r = typeof i == "string" ? JSON.parse(i) : i;
218
218
  if (r && "platforms" in r) {
219
- const o = r.platforms.find(
220
- (a) => a.id === e.tenant.toUpperCase()
219
+ const a = r.platforms.find(
220
+ (o) => o.id === e.tenant.toUpperCase()
221
221
  );
222
- t && o ? t(o) : n && n("_getServiceUrl return listServiceUrl = undefined");
222
+ t && a ? t(a) : n && n("_getServiceUrl return listServiceUrl = undefined");
223
223
  } else
224
224
  n && n("_getServiceUrl return oResponse = undefined");
225
225
  },
@@ -236,8 +236,8 @@ function De(e, t = void 0, n = void 0) {
236
236
  onComplete(i) {
237
237
  const r = JSON.parse(i);
238
238
  if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
239
- const o = `${r[0].services[0].url}`;
240
- t && t(o);
239
+ const a = `${r[0].services[0].url}`;
240
+ t && t(a);
241
241
  }
242
242
  },
243
243
  onFailure(i) {
@@ -259,42 +259,42 @@ function ve(e, t, n) {
259
259
  "Content-Type": "application/json",
260
260
  Accept: "application/json"
261
261
  },
262
- onComplete(r, o, a) {
262
+ onComplete(r, a, o) {
263
263
  const c = JSON.parse(r), d = c.data.map((u) => {
264
264
  const p = u.attributes.name, f = u.id;
265
265
  return { name: p, id: f };
266
266
  });
267
267
  t && t(d, c);
268
268
  },
269
- onFailure(r, o) {
270
- const a = r;
271
- a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
269
+ onFailure(r, a) {
270
+ const o = r;
271
+ o.msg = a.errormsg, o.errCode = a.errorcode, n && n(o);
272
272
  }
273
273
  });
274
274
  }
275
275
  function Ae(e, t = void 0, n = void 0) {
276
276
  let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
277
277
  m(s, {
278
- onComplete(i, r, o) {
279
- const a = JSON.parse(i);
280
- console.log("_AppMngt_get_users => ", a), t && t(a);
278
+ onComplete(i, r, a) {
279
+ const o = JSON.parse(i);
280
+ console.log("_AppMngt_get_users => ", o), t && t(o);
281
281
  },
282
282
  onFailure(i, r) {
283
- const o = i;
284
- o.msg = r.errormsg, o.errCode = r.errorcode, n && n(o);
283
+ const a = i;
284
+ a.msg = r.errormsg, a.errCode = r.errorcode, n && n(a);
285
285
  }
286
286
  });
287
287
  }
288
288
  function Pe(e, t, n = void 0, s = void 0) {
289
289
  let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
290
290
  m(i, {
291
- onComplete(r, o, a) {
291
+ onComplete(r, a, o) {
292
292
  const c = JSON.parse(r);
293
293
  n && n(c);
294
294
  },
295
- onFailure(r, o) {
296
- const a = r;
297
- a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
295
+ onFailure(r, a) {
296
+ const o = r;
297
+ o.msg = a.errormsg, o.errCode = a.errorcode, s && s(o);
298
298
  }
299
299
  });
300
300
  }
@@ -303,7 +303,7 @@ const k = {
303
303
  Accept: "application/json,text/javascript,*/*"
304
304
  };
305
305
  function Le(e, t, n = void 0, s = void 0) {
306
- const { space: i, currentUser: r } = e, a = `${i}${{
306
+ const { space: i, currentUser: r } = e, o = `${i}${{
307
307
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
308
308
  }.URIUGr}`, c = {
309
309
  groups: [
@@ -317,7 +317,7 @@ function Le(e, t, n = void 0, s = void 0) {
317
317
  }
318
318
  ]
319
319
  };
320
- m(a, {
320
+ m(o, {
321
321
  method: "POST",
322
322
  headers: k,
323
323
  data: JSON.stringify(c),
@@ -332,7 +332,7 @@ function Le(e, t, n = void 0, s = void 0) {
332
332
  });
333
333
  }
334
334
  function Me(e, t, n = void 0, s = void 0) {
335
- 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}`;
335
+ const { space: i, tenant: r } = e, a = i, o = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${a}${o}${c}`;
336
336
  m(d, {
337
337
  opts: {
338
338
  method: "GET",
@@ -351,10 +351,10 @@ function Me(e, t, n = void 0, s = void 0) {
351
351
  });
352
352
  }
353
353
  function ee(e, t = void 0, n = void 0) {
354
- const { space: s, tenant: i } = e, r = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, c = {
354
+ const { space: s, tenant: i } = e, r = s, a = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", o = `?tenant=dstenant:${i}`, c = {
355
355
  method: "GET",
356
356
  Accept: "application/json,*/*,test/javascript"
357
- }, d = `${r}${o}${a}`;
357
+ }, d = `${r}${a}${o}`;
358
358
  m(d, {
359
359
  OPTsH: c,
360
360
  onComplete(u) {
@@ -367,12 +367,12 @@ function ee(e, t = void 0, n = void 0) {
367
367
  });
368
368
  }
369
369
  function Je(e, t = void 0, n = void 0) {
370
- const { space: s, currentUser: i } = e, a = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
370
+ const { space: s, currentUser: i } = e, o = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
371
371
  "Content-Type": "application/json",
372
372
  Accept: "application/json,text/javascript,*/*"
373
373
  } };
374
374
  try {
375
- m(a, {
375
+ m(o, {
376
376
  opts: d,
377
377
  onComplete(u) {
378
378
  const p = JSON.parse(u), f = {}, l = p.groups.filter((h) => h.uri.startsWith("uuid:"));
@@ -404,15 +404,15 @@ function Ge(e, t) {
404
404
  });
405
405
  }
406
406
  function Ke(e, t, n, s = void 0, i = void 0) {
407
- const { space: r, tenant: o } = e, a = {
407
+ const { space: r, tenant: a } = e, o = {
408
408
  URITI: "/3drdfpersist/resources/v1/template-instances",
409
409
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
410
410
  nextURICh: "/characteristics",
411
411
  nextURIGr: "/group",
412
412
  nexURImem: "/members",
413
413
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
414
- OPTsTenant: `tenant=dstenant:${o}`
415
- }, c = n, d = `${r}${a.URIUGr}/${t}`, u = JSON.stringify(c);
414
+ OPTsTenant: `tenant=dstenant:${a}`
415
+ }, c = n, d = `${r}${o.URIUGr}/${t}`, u = JSON.stringify(c);
416
416
  m(d, {
417
417
  headers: k,
418
418
  method: "PATCH",
@@ -427,8 +427,8 @@ function Ke(e, t, n, s = void 0, i = void 0) {
427
427
  });
428
428
  }
429
429
  function Be(e, t, n, s = void 0, i = void 0) {
430
- const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
431
- m(a, {
430
+ const { space: r } = e, o = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
431
+ m(o, {
432
432
  method: "PATCH",
433
433
  headers: k,
434
434
  data: JSON.stringify(n),
@@ -442,8 +442,8 @@ function Be(e, t, n, s = void 0, i = void 0) {
442
442
  });
443
443
  }
444
444
  function Ee(e, t, n = void 0, s = void 0) {
445
- const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
446
- m(o, {
445
+ const { space: i } = e, a = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
446
+ m(a, {
447
447
  opts: {
448
448
  method: "GET",
449
449
  headers: {
@@ -466,8 +466,8 @@ async function te(e, t, n) {
466
466
  onComplete(i) {
467
467
  i = JSON.parse(i), t && t(i.csrf);
468
468
  },
469
- onFailure(i, r, o) {
470
- n && n({ error: i, headers: r, xhr: o });
469
+ onFailure(i, r, a) {
470
+ n && n({ error: i, headers: r, xhr: a });
471
471
  }
472
472
  });
473
473
  }
@@ -483,11 +483,11 @@ var se = function(e, t, n, s) {
483
483
  return i;
484
484
  var r = /\+/g;
485
485
  e = e.split(t);
486
- var o = 1e3;
487
- s && typeof s.maxKeys == "number" && (o = s.maxKeys);
488
- var a = e.length;
489
- o > 0 && a > o && (a = o);
490
- for (var c = 0; c < a; ++c) {
486
+ var a = 1e3;
487
+ s && typeof s.maxKeys == "number" && (a = s.maxKeys);
488
+ var o = e.length;
489
+ a > 0 && o > a && (o = a);
490
+ for (var c = 0; c < o; ++c) {
491
491
  var d = e[c].replace(r, "%20"), u = d.indexOf(n), p, f, l, h;
492
492
  u >= 0 ? (p = d.substr(0, u), f = d.substr(u + 1)) : (p = d, f = ""), l = decodeURIComponent(p), h = decodeURIComponent(f), ne(i, l) ? Array.isArray(i[l]) ? i[l].push(h) : i[l] = [i[l], h] : i[l] = h;
493
493
  }
@@ -506,8 +506,8 @@ var se = function(e, t, n, s) {
506
506
  }, ie = function(e, t, n, s) {
507
507
  return t = t || "&", n = n || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
508
508
  var r = encodeURIComponent(N(i)) + n;
509
- return Array.isArray(e[i]) ? e[i].map(function(o) {
510
- return r + encodeURIComponent(N(o));
509
+ return Array.isArray(e[i]) ? e[i].map(function(a) {
510
+ return r + encodeURIComponent(N(a));
511
511
  }).join(t) : r + encodeURIComponent(N(e[i]));
512
512
  }).filter(Boolean).join(t) : s ? encodeURIComponent(N(s)) + n + encodeURIComponent(N(e)) : "";
513
513
  };
@@ -521,12 +521,12 @@ async function L(e, t = void 0, n = void 0, s = void 0) {
521
521
  }
522
522
  const r = i + `/resources/v1/modeler/documents/${t}`;
523
523
  m(r, {
524
- onComplete(o, a, c) {
525
- const d = JSON.parse(o);
524
+ onComplete(a, o, c) {
525
+ const d = JSON.parse(a);
526
526
  n && n(d);
527
527
  },
528
- onFailure(o) {
529
- s && s(o);
528
+ onFailure(a) {
529
+ s && s(a);
530
530
  }
531
531
  });
532
532
  }
@@ -536,7 +536,7 @@ async function qe(e, t = void 0, n = void 0, s = void 0) {
536
536
  console.log("Le paramètre docids est obligatoire");
537
537
  return;
538
538
  }
539
- let r = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, o = F.stringify({
539
+ let r = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, a = F.stringify({
540
540
  $ids: t.toString().replace('"', "").replace("[", "").replace("]", "")
541
541
  });
542
542
  m(r, {
@@ -544,13 +544,13 @@ async function qe(e, t = void 0, n = void 0, s = void 0) {
544
544
  headers: {
545
545
  "Content-Type": "application/x-www-form-urlencoded"
546
546
  },
547
- data: o,
548
- onComplete(a, c, d) {
549
- const u = JSON.parse(a);
547
+ data: a,
548
+ onComplete(o, c, d) {
549
+ const u = JSON.parse(o);
550
550
  n && n(u);
551
551
  },
552
- onFailure(a) {
553
- s && s(a);
552
+ onFailure(o) {
553
+ s && s(o);
554
554
  }
555
555
  });
556
556
  }
@@ -558,9 +558,9 @@ function I(e, t = void 0, n = void 0) {
558
558
  if (e.objID && e.objID !== "") {
559
559
  let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
560
560
  m(s, {
561
- onComplete(i, r, o) {
562
- const a = JSON.parse(i);
563
- e.success = !0, e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
561
+ onComplete(i, r, a) {
562
+ const o = JSON.parse(i);
563
+ e.success = !0, e.token = o?.csrf?.value, e.datas = o?.data[0], t && t(e);
564
564
  },
565
565
  onFailure(i) {
566
566
  n && n(i);
@@ -581,15 +581,15 @@ function b(e, t = void 0, n = void 0) {
581
581
  if (e.space) {
582
582
  const s = e.space + "/resources/v1/application/CSRF";
583
583
  m(s, {
584
- onComplete(i, r, o) {
585
- const a = JSON.parse(i);
586
- t && t(a.csrf.value);
584
+ onComplete(i, r, a) {
585
+ const o = JSON.parse(i);
586
+ t && t(o.csrf.value);
587
587
  },
588
- onFailure(i, r, o) {
588
+ onFailure(i, r, a) {
589
589
  n && n({
590
590
  response: i,
591
591
  headers: r,
592
- xhr: o
592
+ xhr: a
593
593
  });
594
594
  }
595
595
  });
@@ -606,12 +606,12 @@ function j(e, t = void 0, n = void 0) {
606
606
  headers: {
607
607
  ENO_CSRF_TOKEN: e.token
608
608
  },
609
- onComplete(r, o) {
609
+ onComplete(r, a) {
610
610
  const c = JSON.parse(r).data[0].dataelements.ticketURL;
611
- t && t(c, o);
611
+ t && t(c, a);
612
612
  },
613
- onFailure(r, o) {
614
- console.warn("☠️ error => ", r, o), n && n(r, o);
613
+ onFailure(r, a) {
614
+ console.warn("☠️ error => ", r, a), n && n(r, a);
615
615
  }
616
616
  });
617
617
  },
@@ -627,23 +627,23 @@ function Xe(e, t, n = void 0, s = void 0, i = void 0) {
627
627
  headers: {
628
628
  ENO_CSRF_TOKEN: n
629
629
  },
630
- onComplete(o) {
631
- let a = JSON.parse(o);
632
- if (console.log("☠️ info => ", a), a.success === !0)
630
+ onComplete(a) {
631
+ let o = JSON.parse(a);
632
+ if (console.log("☠️ info => ", o), o.success === !0)
633
633
  try {
634
- const c = a.data[0].dataelements.ticketURL;
634
+ const c = o.data[0].dataelements.ticketURL;
635
635
  s && s(c);
636
636
  } catch (c) {
637
637
  i && i(c);
638
638
  }
639
639
  },
640
- onFailure(o) {
641
- i && i(o);
640
+ onFailure(a) {
641
+ i && i(a);
642
642
  }
643
643
  });
644
644
  }
645
- function M(e, t, n, s, i, r = void 0, o = void 0) {
646
- const a = () => ae(
645
+ function M(e, t, n, s, i, r = void 0, a = void 0) {
646
+ const o = () => ae(
647
647
  e,
648
648
  t,
649
649
  n,
@@ -651,17 +651,17 @@ function M(e, t, n, s, i, r = void 0, o = void 0) {
651
651
  i,
652
652
  e.token,
653
653
  r,
654
- o
654
+ a
655
655
  );
656
- e.token ? a() : I(
656
+ e.token ? o() : I(
657
657
  e,
658
658
  t,
659
659
  (c) => {
660
- e.token = c.csrf.value, a();
660
+ e.token = c.csrf.value, o();
661
661
  }
662
662
  );
663
663
  }
664
- function ae(e, t, n, s, i, r, o = void 0, a = void 0) {
664
+ function ae(e, t, n, s, i, r, a = void 0, o = void 0) {
665
665
  const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
666
666
  m(c, {
667
667
  method: "PUT",
@@ -703,10 +703,10 @@ function ae(e, t, n, s, i, r, o = void 0, a = void 0) {
703
703
  }),
704
704
  type: "json",
705
705
  onComplete(T) {
706
- o && o(T);
706
+ a && a(T);
707
707
  },
708
708
  onFailure(T) {
709
- a && a(T);
709
+ o && o(T);
710
710
  }
711
711
  }, w = e.tenant.toUpperCase();
712
712
  m(
@@ -714,7 +714,7 @@ function ae(e, t, n, s, i, r, o = void 0, a = void 0) {
714
714
  S
715
715
  );
716
716
  }, _.onFailure = function(y) {
717
- a && a(y);
717
+ o && o(y);
718
718
  }, _.timeout = 0, m(l.ticketURL, _);
719
719
  }
720
720
  });
@@ -722,8 +722,8 @@ function ae(e, t, n, s, i, r, o = void 0, a = void 0) {
722
722
  async function We(e, t, n = void 0, s = void 0) {
723
723
  e.space, e.token, e.ctx;
724
724
  const i = e?.description, r = e?.title;
725
- let o = `${e.space}/resources/v1/modeler/documents/${t}`;
726
- const a = JSON.stringify({
725
+ let a = `${e.space}/resources/v1/modeler/documents/${t}`;
726
+ const o = JSON.stringify({
727
727
  data: [
728
728
  {
729
729
  dataelements: {
@@ -733,12 +733,12 @@ async function We(e, t, n = void 0, s = void 0) {
733
733
  }
734
734
  ]
735
735
  });
736
- m(o, {
736
+ m(a, {
737
737
  method: "PUT",
738
738
  headers: {
739
739
  ENO_CSRF_TOKEN: e.token
740
740
  },
741
- data: a,
741
+ data: o,
742
742
  type: "json",
743
743
  onComplete(c) {
744
744
  n && n(c);
@@ -749,8 +749,8 @@ async function We(e, t, n = void 0, s = void 0) {
749
749
  });
750
750
  }
751
751
  async function Ve(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0) {
752
- let { tenant: o, cs_name: a } = e;
753
- if (!o && !a) {
752
+ let { tenant: a, cs_name: o } = e;
753
+ if (!a && !o) {
754
754
  i && i("Credentials undefined");
755
755
  return;
756
756
  }
@@ -759,11 +759,11 @@ async function Ve(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
759
759
  return;
760
760
  }
761
761
  const c = O.now().ts;
762
- let d = `https://${o.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/collabspaces/${encodeURIComponent(
763
- a
764
- )}/ticket?id=${c}&tenant=${o.toUpperCase()}&xrequestedwith=xmlhttprequest`;
762
+ let d = `https://${a.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/collabspaces/${encodeURIComponent(
763
+ o
764
+ )}/ticket?id=${c}&tenant=${a.toUpperCase()}&xrequestedwith=xmlhttprequest`;
765
765
  m(
766
- `https://${o.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/session?tenant=${o.toUpperCase()}&xrequestedwith=xmlhttprequest`,
766
+ `https://${a.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/session?tenant=${a.toUpperCase()}&xrequestedwith=xmlhttprequest`,
767
767
  {
768
768
  method: "GET",
769
769
  onComplete(u) {
@@ -785,7 +785,10 @@ async function Ve(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
785
785
  n,
786
786
  t,
787
787
  (w) => {
788
- const R = new DOMParser().parseFromString(w, "text/html").body.firstChild.querySelector("input").getAttributeNode("value").value, q = `https://${o.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/collabspaces/${a}/contents?receipt=${encodeURIComponent(
788
+ const R = new DOMParser().parseFromString(
789
+ w,
790
+ "text/html"
791
+ ).body.firstChild.querySelector("input").getAttributeNode("value").value, q = `https://${a.toLowerCase()}-eu1-space.3dexperience.3ds.com/enovia/resources/enocsmrest/collabspaces/${o}/contents?receipt=${encodeURIComponent(
789
792
  R
790
793
  )}`;
791
794
  let X = /(?:\.([^.]+))?$/.exec(t)[1];
@@ -803,7 +806,7 @@ async function Ve(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
803
806
  title: X ? t.split(".").slice(0, -1).join(".") : t,
804
807
  type: {}
805
808
  },
806
- collabspace: a
809
+ collabspace: o
807
810
  });
808
811
  m(q, {
809
812
  method: "POST",
@@ -818,7 +821,9 @@ async function Ve(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
818
821
  s && s(x);
819
822
  },
820
823
  onFailure(x) {
821
- console.warn("_3DSpace_Upload_Doc | pushFileInFcs | onFailure"), i && i(x);
824
+ console.warn(
825
+ "_3DSpace_Upload_Doc | pushFileInFcs | onFailure"
826
+ ), i && i(x);
822
827
  }
823
828
  });
824
829
  },
@@ -853,13 +858,13 @@ async function Ye(e, t, n, s = void 0, i = void 0) {
853
858
  e,
854
859
  t,
855
860
  (r) => {
856
- const o = r.data[0].relateddata.files[0].id, a = r.data[0].dataelements.secondaryTitle && r.data[0].dataelements.secondaryTitle !== "" ? r.data[0].dataelements.secondaryTitle : r.data[0].dataelements.title;
861
+ const a = r.data[0].relateddata.files[0].id, o = r.data[0].dataelements.secondaryTitle && r.data[0].dataelements.secondaryTitle !== "" ? r.data[0].dataelements.secondaryTitle : r.data[0].dataelements.title;
857
862
  M(
858
863
  e,
859
864
  t,
860
- o,
861
- n,
862
865
  a,
866
+ n,
867
+ o,
863
868
  (c) => {
864
869
  s && s(c);
865
870
  },
@@ -876,10 +881,10 @@ async function Ye(e, t, n, s = void 0, i = void 0) {
876
881
  async function He(e, t, n, s, i = void 0, r = void 0) {
877
882
  oe(
878
883
  e,
879
- (o) => {
880
- o?.items >= 1 && o.data.forEach((a) => {
884
+ (a) => {
885
+ a?.items >= 1 && a.data.forEach((o) => {
881
886
  J(
882
- a,
887
+ o,
883
888
  t,
884
889
  n,
885
890
  (c) => {
@@ -901,7 +906,7 @@ async function He(e, t, n, s, i = void 0, r = void 0) {
901
906
  );
902
907
  });
903
908
  },
904
- (o) => console.warn(o)
909
+ (a) => console.warn(a)
905
910
  );
906
911
  }
907
912
  function oe(e, t = void 0, n = void 0) {
@@ -915,7 +920,7 @@ function oe(e, t = void 0, n = void 0) {
915
920
  "Content-Type": "application/json",
916
921
  SecurityContext: e.ctx
917
922
  },
918
- onComplete(i, r, o) {
923
+ onComplete(i, r, a) {
919
924
  try {
920
925
  i = JSON.parse(i);
921
926
  } catch {
@@ -929,27 +934,30 @@ function oe(e, t = void 0, n = void 0) {
929
934
  } else
930
935
  console.log("Error de credentials", e);
931
936
  }
932
- function J(e, t, n, s = void 0, i = void 0) {
933
- let r = new FormData();
937
+ function J(e, t, n, s = void 0, i = void 0, r = void 0) {
938
+ let a = new FormData();
934
939
  t instanceof Blob || (t = new Blob([t], {
935
940
  type: "text/plain"
936
- })), r.append("__fcs__jobTicket", e.dataelements.ticket), r.append("file_0", t, n);
941
+ })), a.append("__fcs__jobTicket", e.dataelements.ticket), a.append("file_0", t, n);
937
942
  let o = e.dataelements.ticketURL;
938
943
  m(o, {
939
944
  method: "POST",
940
- data: r,
941
- onComplete(a) {
942
- s && s(a.replace(/[\n\r]/g, ""));
945
+ data: a,
946
+ onProgress(c) {
947
+ r && r(c);
943
948
  },
944
- onFailure(a) {
945
- i && i(a);
949
+ onComplete(c) {
950
+ s && s(c.replace(/[\n\r]/g, ""));
951
+ },
952
+ onFailure(c) {
953
+ i && i(c);
946
954
  }
947
955
  });
948
956
  }
949
957
  function re(e, t, n, s = void 0, i = void 0, r = void 0) {
950
958
  console.log("relatedDocAndFile", { credentials: e, receipt: t, filename: n });
951
- const o = (d) => d.indexOf(".") === -1 ? d : d.split(".").slice(0, -1).join(".");
952
- let a = "temp_" + O.now().ts, c = e.space + "/resources/v1/modeler/documents/?e6w-lang=fr&e6w-timezone=-120&xrequestedwith=xmlhttprequest";
959
+ const a = (d) => d.indexOf(".") === -1 ? d : d.split(".").slice(0, -1).join(".");
960
+ let o = "temp_" + O.now().ts, c = e.space + "/resources/v1/modeler/documents/?e6w-lang=fr&e6w-timezone=-120&xrequestedwith=xmlhttprequest";
953
961
  m(c, {
954
962
  method: "POST",
955
963
  headers: {
@@ -963,7 +971,7 @@ function re(e, t, n, s = void 0, i = void 0, r = void 0) {
963
971
  {
964
972
  type: "Document",
965
973
  dataelements: {
966
- title: o(n),
974
+ title: a(n),
967
975
  description: s
968
976
  },
969
977
  relateddata: {
@@ -977,7 +985,7 @@ function re(e, t, n, s = void 0, i = void 0, r = void 0) {
977
985
  }
978
986
  ]
979
987
  },
980
- tempId: a
988
+ tempId: o
981
989
  }
982
990
  ]
983
991
  }),
@@ -993,9 +1001,9 @@ function re(e, t, n, s = void 0, i = void 0, r = void 0) {
993
1001
  }
994
1002
  });
995
1003
  }
996
- function U(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1) {
997
- const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
998
- m(a, {
1004
+ function U(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, a = !1) {
1005
+ const o = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
1006
+ m(o, {
999
1007
  method: "GET",
1000
1008
  onComplete(c) {
1001
1009
  const d = JSON.parse(c);
@@ -1032,7 +1040,7 @@ function U(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1
1032
1040
  }));
1033
1041
  }
1034
1042
  }
1035
- p && f && l ? (u = l + "." + f + "." + p, i(u)) : d.preferredcredentials && o ? (u = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(u)) : r && (u = l + "." + f + "." + p, r(u));
1043
+ p && f && l ? (u = l + "." + f + "." + p, i(u)) : d.preferredcredentials && a ? (u = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(u)) : r && (u = l + "." + f + "." + p, r(u));
1036
1044
  },
1037
1045
  onFailure(c, d) {
1038
1046
  console.warn("Erreur de récupération du contexte de sécurité. => ", {
@@ -1061,28 +1069,28 @@ async function G(e, t = void 0, n = void 0) {
1061
1069
  j(
1062
1070
  e,
1063
1071
  (r) => {
1064
- e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((o) => o.blob()).then((o) => {
1065
- t && t(o);
1066
- }).catch((o) => {
1067
- n && n(o);
1072
+ e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((a) => a.blob()).then((a) => {
1073
+ t && t(a);
1074
+ }).catch((a) => {
1075
+ n && n(a);
1068
1076
  })) : m(r, {
1069
- onComplete(o) {
1070
- let a;
1077
+ onComplete(a) {
1078
+ let o;
1071
1079
  try {
1072
- a = JSON.parse(o);
1080
+ o = JSON.parse(a);
1073
1081
  } catch {
1074
- a = o;
1082
+ o = a;
1075
1083
  }
1076
- t && typeof t == "function" && t(a), s(a);
1084
+ t && typeof t == "function" && t(o), s(o);
1077
1085
  },
1078
- onFailure(o, a, c) {
1079
- n && (console.log("error http", o), n({
1080
- msg: JSON.parse(o),
1081
- headers: a,
1086
+ onFailure(a, o, c) {
1087
+ n && (console.log("error http", a), n({
1088
+ msg: JSON.parse(a),
1089
+ headers: o,
1082
1090
  xhr: c
1083
1091
  }), i({
1084
- msg: JSON.parse(o),
1085
- headers: a,
1092
+ msg: JSON.parse(a),
1093
+ headers: o,
1086
1094
  xhr: c
1087
1095
  }));
1088
1096
  }
@@ -1115,17 +1123,17 @@ function de(e, t, n = void 0, s = void 0, i = void 0) {
1115
1123
  id: c
1116
1124
  });
1117
1125
  });
1118
- let o = JSON.stringify({
1126
+ let a = JSON.stringify({
1119
1127
  csrf: {
1120
1128
  name: "ENO_CSRF_TOKEN",
1121
1129
  value: e.token
1122
1130
  },
1123
1131
  data: r
1124
1132
  });
1125
- const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
1126
- m(a, {
1133
+ const o = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
1134
+ m(o, {
1127
1135
  method: "PUT",
1128
- data: o,
1136
+ data: a,
1129
1137
  type: "json",
1130
1138
  onComplete(c) {
1131
1139
  const d = c.data;
@@ -1165,7 +1173,7 @@ function ze(e, t, n = void 0, s = void 0) {
1165
1173
  return new Promise((i) => {
1166
1174
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1167
1175
  const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
1168
- let o = {
1176
+ let a = {
1169
1177
  method: "POST",
1170
1178
  headers: {
1171
1179
  SecurityContext: "ctx::" + e.ctx,
@@ -1181,22 +1189,22 @@ function ze(e, t, n = void 0, s = void 0) {
1181
1189
  ]
1182
1190
  }),
1183
1191
  type: "json",
1184
- onComplete(a) {
1185
- n && n(a);
1192
+ onComplete(o) {
1193
+ n && n(o);
1186
1194
  },
1187
- onFailure(a) {
1188
- s && s(a);
1195
+ onFailure(o) {
1196
+ s && s(o);
1189
1197
  }
1190
1198
  };
1191
- m(r, o);
1199
+ m(r, a);
1192
1200
  }
1193
1201
  });
1194
1202
  }
1195
1203
  function Qe(e, t, n, s = void 0, i = void 0) {
1196
1204
  return new Promise((r) => {
1197
1205
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1198
- const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
1199
- let a = {
1206
+ const a = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
1207
+ let o = {
1200
1208
  method: "POST",
1201
1209
  headers: {
1202
1210
  SecurityContext: "ctx::" + e.ctx,
@@ -1220,7 +1228,7 @@ function Qe(e, t, n, s = void 0, i = void 0) {
1220
1228
  i && i(c);
1221
1229
  }
1222
1230
  };
1223
- m(o, a);
1231
+ m(a, o);
1224
1232
  }
1225
1233
  });
1226
1234
  }
@@ -1233,12 +1241,12 @@ function Ze(e, t, n = void 0, s = void 0) {
1233
1241
  "ESPACE COMMUN",
1234
1242
  ["VPLMProjectLeader", "VPLMCreator"],
1235
1243
  void 0,
1236
- (a) => e.ctx = a,
1237
- (a) => {
1238
- console.log("onError =>", a);
1244
+ (o) => e.ctx = o,
1245
+ (o) => {
1246
+ console.log("onError =>", o);
1239
1247
  }
1240
1248
  );
1241
- let o = {
1249
+ let a = {
1242
1250
  method: "POST",
1243
1251
  headers: {
1244
1252
  securitycontext: "ctx::" + e.ctx,
@@ -1254,14 +1262,14 @@ function Ze(e, t, n = void 0, s = void 0) {
1254
1262
  ]
1255
1263
  }),
1256
1264
  type: "json",
1257
- onComplete(a) {
1258
- n && n(a);
1265
+ onComplete(o) {
1266
+ n && n(o);
1259
1267
  },
1260
- onFailure(a) {
1261
- s && s(a);
1268
+ onFailure(o) {
1269
+ s && s(o);
1262
1270
  }
1263
1271
  };
1264
- m(r, o);
1272
+ m(r, a);
1265
1273
  }
1266
1274
  });
1267
1275
  }
@@ -1274,12 +1282,12 @@ function et(e, t, n = void 0, s = void 0) {
1274
1282
  "ESPACE COMMUN",
1275
1283
  ["VPLMProjectLeader", "VPLMCreator"],
1276
1284
  void 0,
1277
- (a) => e.ctx = a,
1278
- (a) => {
1279
- console.log("onError =>", a);
1285
+ (o) => e.ctx = o,
1286
+ (o) => {
1287
+ console.log("onError =>", o);
1280
1288
  }
1281
1289
  );
1282
- let o = {
1290
+ let a = {
1283
1291
  method: "POST",
1284
1292
  headers: {
1285
1293
  SecurityContext: "ctx::" + e.ctx,
@@ -1301,21 +1309,21 @@ function et(e, t, n = void 0, s = void 0) {
1301
1309
  ]
1302
1310
  }),
1303
1311
  type: "json",
1304
- onComplete(a) {
1305
- n && n(a);
1312
+ onComplete(o) {
1313
+ n && n(o);
1306
1314
  },
1307
- onFailure(a) {
1308
- s && s(a);
1315
+ onFailure(o) {
1316
+ s && s(o);
1309
1317
  }
1310
1318
  };
1311
- m(r, o);
1319
+ m(r, a);
1312
1320
  }
1313
1321
  });
1314
1322
  }
1315
1323
  function tt(e, t, n, s = void 0, i = void 0) {
1316
1324
  return new Promise((r) => {
1317
1325
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1318
- const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
1326
+ const a = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
1319
1327
  U(
1320
1328
  e.space,
1321
1329
  "ESPACE COMMUN",
@@ -1326,7 +1334,7 @@ function tt(e, t, n, s = void 0, i = void 0) {
1326
1334
  console.log("onError =>", c);
1327
1335
  }
1328
1336
  );
1329
- let a = {
1337
+ let o = {
1330
1338
  method: "POST",
1331
1339
  headers: {
1332
1340
  securitycontext: "ctx::" + e.ctx,
@@ -1355,13 +1363,13 @@ function tt(e, t, n, s = void 0, i = void 0) {
1355
1363
  i && i(c);
1356
1364
  }
1357
1365
  };
1358
- m(o, a);
1366
+ m(a, o);
1359
1367
  }
1360
1368
  });
1361
1369
  }
1362
1370
  function nt(e, t, n, s, i = void 0, r = void 0) {
1363
- return new Promise((o) => {
1364
- const a = `${e.space}/resources/v1/modeler/dsbks/dsbks:Bookmark`;
1371
+ return new Promise((a) => {
1372
+ const o = `${e.space}/resources/v1/modeler/dsbks/dsbks:Bookmark`;
1365
1373
  let c = {
1366
1374
  attributes: {
1367
1375
  title: n,
@@ -1389,11 +1397,11 @@ function nt(e, t, n, s, i = void 0, r = void 0) {
1389
1397
  r && r(p);
1390
1398
  }
1391
1399
  };
1392
- m(a, u);
1400
+ m(o, u);
1393
1401
  });
1394
1402
  }
1395
1403
  function st(e, t, n, s, i = void 0, r = void 0) {
1396
- return console.log("credentials", e), new Promise((o) => {
1404
+ return console.log("credentials", e), new Promise((a) => {
1397
1405
  `${e.space}`, JSON.stringify({
1398
1406
  csrf: {
1399
1407
  name: "ENO_CSRF_TOKEN",
@@ -1428,12 +1436,12 @@ function it(e, t = void 0, n = void 0) {
1428
1436
  Accept: "application/json,text/javascript,*/*",
1429
1437
  "Content-Type": "application/ds-json"
1430
1438
  },
1431
- onComplete(r, o) {
1432
- const a = JSON.parse(r);
1433
- t && t(a, o);
1439
+ onComplete(r, a) {
1440
+ const o = JSON.parse(r);
1441
+ t && t(o, a);
1434
1442
  },
1435
- onFailure(r, o, a) {
1436
- n && n({ response: r, headers: o, xhr: a });
1443
+ onFailure(r, a, o) {
1444
+ n && n({ response: r, headers: a, xhr: o });
1437
1445
  }
1438
1446
  });
1439
1447
  }
@@ -1458,9 +1466,9 @@ async function ot(e, t, n = void 0, s = void 0) {
1458
1466
  return new Promise((i) => {
1459
1467
  j(e, t, (r) => {
1460
1468
  m(r, {
1461
- onComplete: (o, a, c) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, c), i),
1462
- onFailure: (o, a, c) => {
1463
- s && s(o, a, c), console.log(o, a?.errormsg);
1469
+ onComplete: (a, o, c) => (i(JSON.parse(a)), n && n(JSON.parse(a), o, c), i),
1470
+ onFailure: (a, o, c) => {
1471
+ s && s(a, o, c), console.log(a, o?.errormsg);
1464
1472
  }
1465
1473
  });
1466
1474
  });
@@ -1471,12 +1479,12 @@ function rt(e, t, n, s = void 0, i = void 0) {
1471
1479
  I(
1472
1480
  e,
1473
1481
  n,
1474
- (o) => {
1475
- 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;
1482
+ (a) => {
1483
+ const o = a.data[0].relateddata.files[0].id, c = a.data[0].dataelements.secondaryTitle !== "" ? a.data[0].dataelements.secondaryTitle : a.data[0].dataelements.title;
1476
1484
  M(
1477
1485
  e,
1478
1486
  n,
1479
- a,
1487
+ o,
1480
1488
  r,
1481
1489
  c,
1482
1490
  (d) => {
@@ -1532,8 +1540,8 @@ function ut(e, t = void 0, n = void 0) {
1532
1540
  G(
1533
1541
  e,
1534
1542
  i.objID,
1535
- (o) => {
1536
- s.push({ [i.name]: o }), i.name === "dbProjets" && (K = o.affaires.map((a) => a.objectID), ue(e, B)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1543
+ (a) => {
1544
+ s.push({ [i.name]: a }), i.name === "dbProjets" && (K = a.affaires.map((o) => o.objectID), ue(e, B)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1537
1545
  }
1538
1546
  );
1539
1547
  });
@@ -1544,7 +1552,7 @@ function ue(e, t, n = void 0, s = void 0) {
1544
1552
  K,
1545
1553
  (i) => {
1546
1554
  const r = [...t];
1547
- r.find((o) => o.objectID === i.objectId).data = i.data, B = r, D.push(i.data), n && n(D);
1555
+ r.find((a) => a.objectID === i.objectId).data = i.data, B = r, D.push(i.data), n && n(D);
1548
1556
  },
1549
1557
  (i) => {
1550
1558
  s && (s(i), console.log(i));
@@ -1572,7 +1580,7 @@ const pe = "FA35FB9B177A280065800EA0000F599C", le = [
1572
1580
  tag: "testTag"
1573
1581
  };
1574
1582
  function pt(e, t, n = void 0, s = void 0) {
1575
- const { space: i, tenant: r } = e, { objId: o, pred: a, tag: c } = t, d = {
1583
+ const { space: i, tenant: r } = e, { objId: a, pred: o, tag: c } = t, d = {
1576
1584
  uri: "/resources/6w/tags",
1577
1585
  otpCTX: "SecurityContext=preferred",
1578
1586
  optTenant: `tenant=${r}`
@@ -1581,10 +1589,10 @@ function pt(e, t, n = void 0, s = void 0) {
1581
1589
  {
1582
1590
  subject: [
1583
1591
  {
1584
- uri: `pid://${o}`
1592
+ uri: `pid://${a}`
1585
1593
  }
1586
1594
  ],
1587
- predicate: E[a],
1595
+ predicate: E[o],
1588
1596
  object: {
1589
1597
  literal: c
1590
1598
  }
@@ -1604,7 +1612,7 @@ function pt(e, t, n = void 0, s = void 0) {
1604
1612
  setTimeout(() => {
1605
1613
  L(
1606
1614
  e,
1607
- o,
1615
+ a,
1608
1616
  (h) => {
1609
1617
  const g = h.data[0].dataelements.title, _ = h.data[0].dataelements.fileExtension !== void 0 ? h.data[0].dataelements.fileExtension : "", y = h.data[0].relateddata.ownerInfo[0].dataelements.name;
1610
1618
  l.name = g, l.ext = _, l.createBy = y, t.info = { ...l }, me(
@@ -1636,7 +1644,7 @@ function me(e, t, n = void 0, s = void 0) {
1636
1644
  const i = t.info.name, r = {
1637
1645
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1638
1646
  uri: "/federated/search"
1639
- }, o = `${r.baseUrl}${r.uri}`, a = {
1647
+ }, a = `${r.baseUrl}${r.uri}`, o = {
1640
1648
  "Content-Type": "application/json",
1641
1649
  Accept: "application/json,text/javascript,*/*"
1642
1650
  }, c = Y(), d = {
@@ -1700,9 +1708,9 @@ function me(e, t, n = void 0, s = void 0) {
1700
1708
  }
1701
1709
  }
1702
1710
  };
1703
- console.log("dataPattern => ", d), m(o, {
1711
+ console.log("dataPattern => ", d), m(a, {
1704
1712
  method: "POST",
1705
- headers: a,
1713
+ headers: o,
1706
1714
  data: JSON.stringify(d),
1707
1715
  onComplete(u) {
1708
1716
  const p = JSON.parse(u);
@@ -1715,11 +1723,11 @@ function me(e, t, n = void 0, s = void 0) {
1715
1723
  });
1716
1724
  }
1717
1725
  function lt(e, t, n = void 0, s = void 0) {
1718
- const { objId: i, pred: r, tag: o } = t, a = {
1726
+ const { objId: i, pred: r, tag: a } = t, o = {
1719
1727
  uri: "/resources/6w/tags",
1720
1728
  otpCTX: "SecurityContext=preferred",
1721
1729
  optTenant: `tenant=${e.tenant}`
1722
- }, c = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1730
+ }, c = `${e.space}${o.uri}?${o.otpCTX}&${o.optTenant}`, d = {
1723
1731
  tag: [
1724
1732
  {
1725
1733
  subject: [
@@ -1729,7 +1737,7 @@ function lt(e, t, n = void 0, s = void 0) {
1729
1737
  ],
1730
1738
  predicate: E[r],
1731
1739
  object: {
1732
- literal: o
1740
+ literal: a
1733
1741
  }
1734
1742
  }
1735
1743
  ]
@@ -1756,13 +1764,13 @@ function ft(e, t = "", n = void 0, s = void 0) {
1756
1764
  return;
1757
1765
  const r = {
1758
1766
  uri: "/resources/v1/modeler/documents"
1759
- }, o = {
1767
+ }, a = {
1760
1768
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1761
1769
  Accept: "application/json,text/javascript,*/*"
1762
- }, 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}`;
1763
- m(a, {
1770
+ }, o = `${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}`;
1771
+ m(o, {
1764
1772
  method: "POST",
1765
- headers: o,
1773
+ headers: a,
1766
1774
  data: c,
1767
1775
  onComplete(d) {
1768
1776
  n && n(JSON.parse(d));
@@ -1776,10 +1784,10 @@ function ft(e, t = "", n = void 0, s = void 0) {
1776
1784
  async function C(e, t = void 0, n = void 0) {
1777
1785
  const s = e._3DSwym + "/api/index/tk";
1778
1786
  return m(s, {
1779
- onComplete(i, r, o) {
1780
- const a = JSON.parse(i);
1787
+ onComplete(i, r, a) {
1788
+ const o = JSON.parse(i);
1781
1789
  if (t)
1782
- return t(a), e.token = a?.result?.ServerToken;
1790
+ return t(o), e.token = o?.result?.ServerToken;
1783
1791
  },
1784
1792
  onFailure(i) {
1785
1793
  n && n(i);
@@ -1807,11 +1815,11 @@ function mt(e, t = void 0, n = void 0) {
1807
1815
  },
1808
1816
  data: JSON.stringify(i),
1809
1817
  type: "json",
1810
- onComplete(o, a) {
1811
- t && t(o, a);
1818
+ onComplete(a, o) {
1819
+ t && t(a, o);
1812
1820
  },
1813
- onFailure(o, a) {
1814
- n && n(o, a);
1821
+ onFailure(a, o) {
1822
+ n && n(a, o);
1815
1823
  }
1816
1824
  });
1817
1825
  });
@@ -1836,12 +1844,12 @@ function ht(e, t = void 0, n = void 0) {
1836
1844
  },
1837
1845
  data: JSON.stringify(i),
1838
1846
  type: "json",
1839
- onComplete(o, a) {
1840
- const c = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1841
- t && t(c, o);
1847
+ onComplete(a, o) {
1848
+ const c = a.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1849
+ t && t(c, a);
1842
1850
  },
1843
- onFailure(o, a) {
1844
- n && n(o, a);
1851
+ onFailure(a, o) {
1852
+ n && n(a, o);
1845
1853
  }
1846
1854
  });
1847
1855
  });
@@ -1853,14 +1861,14 @@ function gt(e, t = void 0, n = void 0) {
1853
1861
  limit: `/limit/${e.limit ? e.limit : 500}`,
1854
1862
  page: `/page/${e.page ? e.page : "1"}`
1855
1863
  }, i = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1856
- C(e, (o) => {
1864
+ C(e, (a) => {
1857
1865
  m(i, {
1858
1866
  method: "GET",
1859
1867
  headers: {
1860
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1868
+ "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1861
1869
  },
1862
- onComplete(a, c, d) {
1863
- const p = JSON.parse(a).result;
1870
+ onComplete(o, c, d) {
1871
+ const p = JSON.parse(o).result;
1864
1872
  let f = 0;
1865
1873
  p.forEach((l) => {
1866
1874
  const h = {
@@ -1881,8 +1889,8 @@ function gt(e, t = void 0, n = void 0) {
1881
1889
  );
1882
1890
  });
1883
1891
  },
1884
- onFailure(a, c) {
1885
- const d = a;
1892
+ onFailure(o, c) {
1893
+ const d = o;
1886
1894
  d.status = c.status, d.response = c.errormsg, n && n(d);
1887
1895
  }
1888
1896
  });
@@ -1896,21 +1904,21 @@ function he(e, t, n, s) {
1896
1904
  community_id: t
1897
1905
  }
1898
1906
  };
1899
- C(e, (o) => {
1907
+ C(e, (a) => {
1900
1908
  m(i, {
1901
1909
  method: "POST",
1902
1910
  headers: {
1903
1911
  "Content-type": "application/json;charset=UTF-8",
1904
1912
  Accept: "application/json",
1905
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1913
+ "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1906
1914
  },
1907
1915
  data: JSON.stringify(r),
1908
1916
  type: "json",
1909
- onComplete(a, c, d) {
1910
- n && n(a);
1917
+ onComplete(o, c, d) {
1918
+ n && n(o);
1911
1919
  },
1912
- onFailure(a, c) {
1913
- const d = a;
1920
+ onFailure(o, c) {
1921
+ const d = o;
1914
1922
  d.status = c.status, d.response = c.errormsg, s && s(d);
1915
1923
  }
1916
1924
  });
@@ -1928,21 +1936,21 @@ function _t(e, t = void 0, n = void 0) {
1928
1936
  Accept: "application/json",
1929
1937
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1930
1938
  },
1931
- onComplete(o) {
1932
- const a = JSON.parse(o);
1933
- t && t(a);
1939
+ onComplete(a) {
1940
+ const o = JSON.parse(a);
1941
+ t && t(o);
1934
1942
  },
1935
- onFailure(o, a) {
1936
- const c = o;
1937
- c.status = a.status, c.response = a.errormsg, n && n(c);
1943
+ onFailure(a, o) {
1944
+ const c = a;
1945
+ c.status = o.status, c.response = o.errormsg, n && n(c);
1938
1946
  }
1939
1947
  });
1940
1948
  });
1941
1949
  }
1942
1950
  function yt(e, t, n = void 0, s = void 0) {
1943
- const { listAllContacts: i, currentUser: r, _3DSwym: o } = e;
1951
+ const { listAllContacts: i, currentUser: r, _3DSwym: a } = e;
1944
1952
  console.log("__listAllContacts", i.hits);
1945
- const a = `${o}/api/directmessages`, c = {
1953
+ const o = `${a}/api/directmessages`, c = {
1946
1954
  users: [r.login].concat(t.receipt)
1947
1955
  }, d = {
1948
1956
  id_msg: "",
@@ -1961,7 +1969,7 @@ function yt(e, t, n = void 0, s = void 0) {
1961
1969
  }
1962
1970
  ), u === !1 && setTimeout(() => {
1963
1971
  u === !1 && C(e, (p) => {
1964
- m(a, {
1972
+ m(o, {
1965
1973
  method: "POST",
1966
1974
  headers: {
1967
1975
  "Content-Type": "application/json",
@@ -1991,9 +1999,9 @@ function ge(e, t, n, s) {
1991
1999
  Accept: "application/json,text/javascript,*/*",
1992
2000
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1993
2001
  },
1994
- onComplete(o) {
1995
- const a = JSON.parse(o), c = [];
1996
- a.result.forEach((p) => {
2002
+ onComplete(a) {
2003
+ const o = JSON.parse(a), c = [];
2004
+ o.result.forEach((p) => {
1997
2005
  p.users = p.users.sort((f, l) => f.login.localeCompare(l.login)), p.users.length === t.length && c.push(p);
1998
2006
  });
1999
2007
  const d = t.sort(), u = c.find((p) => {
@@ -2004,9 +2012,9 @@ function ge(e, t, n, s) {
2004
2012
  });
2005
2013
  n && u !== void 0 ? n(u) : (s || u === void 0) && s(u);
2006
2014
  },
2007
- onFailure(o) {
2008
- const a = o;
2009
- a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
2015
+ onFailure(a) {
2016
+ const o = a;
2017
+ o.msg = headers.errormsg, o.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", o), s && s(o);
2010
2018
  }
2011
2019
  });
2012
2020
  });
@@ -2017,7 +2025,7 @@ function v(e, t, n = void 0, s = void 0) {
2017
2025
  uri: "/api/community",
2018
2026
  id_msg: `${t.id_msg}`,
2019
2027
  endUri: "/instantmessages"
2020
- }, r = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
2028
+ }, r = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, a = {
2021
2029
  author: { login: t.senderId, displayName: t.senderName },
2022
2030
  accessState: null,
2023
2031
  commentUri: null,
@@ -2027,15 +2035,15 @@ function v(e, t, n = void 0, s = void 0) {
2027
2035
  parentCommentUri: null,
2028
2036
  richMessage: t.msg
2029
2037
  };
2030
- console.log("_3dSwym_sendDirectMessageData url ", r), C(e, (a) => {
2038
+ console.log("_3dSwym_sendDirectMessageData url ", r), C(e, (o) => {
2031
2039
  m(r, {
2032
2040
  method: "POST",
2033
2041
  headers: {
2034
2042
  "Content-Type": "application/json",
2035
2043
  Accept: "application/json",
2036
- "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
2044
+ "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
2037
2045
  },
2038
- data: JSON.stringify(o),
2046
+ data: JSON.stringify(a),
2039
2047
  type: "json",
2040
2048
  onComplete(c, d, u) {
2041
2049
  const p = c;
@@ -2058,13 +2066,13 @@ function _e(e) {
2058
2066
  function St(e, t, n = void 0, s = void 0) {
2059
2067
  const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
2060
2068
  (c) => c.id === t.community_id
2061
- ), o = e.swymCommunities.find(
2069
+ ), a = e.swymCommunities.find(
2062
2070
  (c) => c.title.toLowerCase() === t.community_title.toLowerCase()
2063
- ), a = {
2071
+ ), o = {
2064
2072
  params: {
2065
2073
  title: t.title,
2066
2074
  // String, le nom de l'affaire
2067
- community_id: r?.id !== void 0 ? r.id : o.id,
2075
+ community_id: r?.id !== void 0 ? r.id : a.id,
2068
2076
  // String, l'id de la communauté
2069
2077
  message: ye(t.text_html),
2070
2078
  // STRING => le contenue du message doit être au format HTML
@@ -2081,7 +2089,7 @@ function St(e, t, n = void 0, s = void 0) {
2081
2089
  m(i, {
2082
2090
  method: "POST",
2083
2091
  headers: d,
2084
- data: JSON.stringify(a),
2092
+ data: JSON.stringify(o),
2085
2093
  type: "json",
2086
2094
  onComplete(u, p, f) {
2087
2095
  const l = JSON.parse(u);
@@ -2097,29 +2105,29 @@ function St(e, t, n = void 0, s = void 0) {
2097
2105
  function wt(e, t = void 0, n = void 0) {
2098
2106
  const s = { base: e.space, uri: "/api/idea/add" };
2099
2107
  if (!Array.isArray(e.swymCommunities)) {
2100
- const o = "☠️ swymCommunities doit être un tableau d'objets de communautés";
2108
+ const a = "☠️ swymCommunities doit être un tableau d'objets de communautés";
2101
2109
  throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2102
- cause: o
2110
+ cause: a
2103
2111
  });
2104
2112
  }
2105
2113
  if (e.swymCommunities.findIndex(
2106
- (o) => o.id === e.community_id
2114
+ (a) => a.id === e.community_id
2107
2115
  ) === -1) {
2108
- const o = "la communauté n'existe pas dans la liste des communautés du Swym";
2116
+ const a = "la communauté n'existe pas dans la liste des communautés du Swym";
2109
2117
  throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2110
- cause: o
2118
+ cause: a
2111
2119
  });
2112
2120
  }
2113
2121
  if (e.community_id && e.community_id === "") {
2114
- const o = "☠️ community_id doit être un String qui contient l'id de la communauté dans laquelle on souhaite publier l'idée.";
2122
+ const a = "☠️ community_id doit être un String qui contient l'id de la communauté dans laquelle on souhaite publier l'idée.";
2115
2123
  throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2116
- cause: o
2124
+ cause: a
2117
2125
  });
2118
2126
  }
2119
2127
  if (e.title && e.title === "") {
2120
- const o = "☠️ title doit être un String.";
2128
+ const a = "☠️ title doit être un String.";
2121
2129
  throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2122
- cause: o
2130
+ cause: a
2123
2131
  });
2124
2132
  }
2125
2133
  const r = {
@@ -2134,19 +2142,19 @@ function wt(e, t = void 0, n = void 0) {
2134
2142
  // 1 publier, 0 brouillon
2135
2143
  }
2136
2144
  };
2137
- C(e, (o) => {
2138
- if (!o)
2145
+ C(e, (a) => {
2146
+ if (!a)
2139
2147
  throw new Error(
2140
2148
  `☠️ token n'est pas disponible pour cette requête : ${s.base + s.uri}`,
2141
2149
  {
2142
- cause: o
2150
+ cause: a
2143
2151
  }
2144
2152
  );
2145
- const a = {
2153
+ const o = {
2146
2154
  headers: {
2147
2155
  "Content-type": "application/json;charset=UTF-8",
2148
2156
  Accept: "application/json",
2149
- "X-DS-SWYM-CSRFTOKEN": o?.result?.ServerToken
2157
+ "X-DS-SWYM-CSRFTOKEN": a?.result?.ServerToken
2150
2158
  },
2151
2159
  method: "POST",
2152
2160
  data: JSON.stringify(r),
@@ -2164,7 +2172,7 @@ function wt(e, t = void 0, n = void 0) {
2164
2172
  n && n(l);
2165
2173
  }
2166
2174
  };
2167
- m(s.base + s.uri, a);
2175
+ m(s.base + s.uri, o);
2168
2176
  });
2169
2177
  }
2170
2178
  function Ct(e, t, n = void 0, s = void 0) {
@@ -2174,21 +2182,21 @@ function Ct(e, t, n = void 0, s = void 0) {
2174
2182
  ideationIds: [t.idee_id]
2175
2183
  }
2176
2184
  };
2177
- C(e, (o) => {
2185
+ C(e, (a) => {
2178
2186
  m(i, {
2179
2187
  method: "POST",
2180
2188
  headers: {
2181
2189
  "Content-type": "application/json;charset=UTF-8",
2182
2190
  Accept: "application/json",
2183
- "X-DS-SWYM-CSRFTOKEN": o?.result?.ServerToken
2191
+ "X-DS-SWYM-CSRFTOKEN": a?.result?.ServerToken
2184
2192
  },
2185
2193
  data: JSON.stringify(r),
2186
2194
  type: "json",
2187
- onComplete(a, c, d) {
2188
- n && n(a);
2195
+ onComplete(o, c, d) {
2196
+ n && n(o);
2189
2197
  },
2190
- onFailure(a, c, d) {
2191
- const u = a;
2198
+ onFailure(o, c, d) {
2199
+ const u = o;
2192
2200
  u.status = c.status, u.response = c.errormsg, s && s(u);
2193
2201
  }
2194
2202
  });
@@ -2197,10 +2205,10 @@ function Ct(e, t, n = void 0, s = void 0) {
2197
2205
  function Tt(e, t = void 0, n = void 0) {
2198
2206
  const { _3DSwym: s, _3DSwym_token: i } = e, r = `${s}/api/idea/get`;
2199
2207
  if (e.idPost === "") {
2200
- const a = "☠️ idPost est vide, vous devez renseigner un identifiant de post";
2201
- throw new Error(`Erreur sur cette requête : ${r}`, { cause: a });
2208
+ const o = "☠️ idPost est vide, vous devez renseigner un identifiant de post";
2209
+ throw new Error(`Erreur sur cette requête : ${r}`, { cause: o });
2202
2210
  }
2203
- const o = {
2211
+ const a = {
2204
2212
  params: {
2205
2213
  id: e.idPost
2206
2214
  }
@@ -2212,12 +2220,12 @@ function Tt(e, t = void 0, n = void 0) {
2212
2220
  Accept: "application/json",
2213
2221
  "X-DS-SWYM-CSRFTOKEN": i
2214
2222
  },
2215
- data: JSON.stringify(o),
2216
- onComplete(a) {
2217
- a = typeof a == "string" ? JSON.parse(a) : a, t && t({ response: a });
2223
+ data: JSON.stringify(a),
2224
+ onComplete(o) {
2225
+ o = typeof o == "string" ? JSON.parse(o) : o, t && t({ response: o });
2218
2226
  },
2219
- onFailure(a) {
2220
- const c = a;
2227
+ onFailure(o) {
2228
+ const c = o;
2221
2229
  c.status = headers.status, c.response = headers.errormsg, n && n(c);
2222
2230
  }
2223
2231
  });
@@ -2227,8 +2235,8 @@ function bt(e, t, n) {
2227
2235
  _3DSwym: s,
2228
2236
  _3DSwym_token: i,
2229
2237
  idPost: r,
2230
- title: o,
2231
- community_id: a,
2238
+ title: a,
2239
+ community_id: o,
2232
2240
  status_comment: c,
2233
2241
  status_id: d,
2234
2242
  message: u
@@ -2246,8 +2254,8 @@ function bt(e, t, n) {
2246
2254
  params: {
2247
2255
  out: "false",
2248
2256
  id: r,
2249
- title: o,
2250
- community_id: a,
2257
+ title: a,
2258
+ community_id: o,
2251
2259
  status_comment: c,
2252
2260
  status_id: d,
2253
2261
  message: u,
@@ -2269,15 +2277,15 @@ function bt(e, t, n) {
2269
2277
  }
2270
2278
  function Ot(e, t, n = void 0, s = void 0) {
2271
2279
  const { _3DSwym: i } = e;
2272
- let { community_id: r, limit: o, page: a, search: c } = t;
2280
+ let { community_id: r, limit: a, page: o, search: c } = t;
2273
2281
  const d = [], u = 1;
2274
2282
  let p = !1, f = 2;
2275
- a || (a = u), o || (o = 100);
2283
+ o || (o = u), a || (a = 100);
2276
2284
  const l = {
2277
2285
  uri: "/api/idea/list",
2278
2286
  comId: `/community_id/${r}`,
2279
- limit: `/limit/${o}`,
2280
- page: `/page/${a}`
2287
+ limit: `/limit/${a}`,
2288
+ page: `/page/${o}`
2281
2289
  };
2282
2290
  let h = `${i}${l.uri}${l.comId}${l.limit}${l.page}`;
2283
2291
  C(e, (g) => {
@@ -2289,8 +2297,8 @@ function Ot(e, t, n = void 0, s = void 0) {
2289
2297
  },
2290
2298
  onComplete(S) {
2291
2299
  const w = { response: JSON.parse(S) };
2292
- if (f = Math.ceil(Number(w.response.nb_result) / 100), S && f >= a) {
2293
- if (a++, l.page = `/page/${a}`, y = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
2300
+ if (f = Math.ceil(Number(w.response.nb_result) / 100), S && f >= o) {
2301
+ if (o++, l.page = `/page/${o}`, y = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
2294
2302
  d.push(w.response.result);
2295
2303
  else {
2296
2304
  const T = w.response.result.find(
@@ -2301,7 +2309,7 @@ function Ot(e, t, n = void 0, s = void 0) {
2301
2309
  return;
2302
2310
  }
2303
2311
  }
2304
- if (n && f < a && !c) {
2312
+ if (n && f < o && !c) {
2305
2313
  p = !0, n(d);
2306
2314
  return;
2307
2315
  }
@@ -2393,8 +2401,8 @@ function ye(e) {
2393
2401
  </p>` : e;
2394
2402
  }
2395
2403
  function $t(e, t = void 0, n = void 0) {
2396
- const { tenant: s, _3DSwym: i, _3DSwym_token: r, community_id: o, idea_id: a } = e;
2397
- if (s && i && r && o && a) {
2404
+ const { tenant: s, _3DSwym: i, _3DSwym_token: r, community_id: a, idea_id: o } = e;
2405
+ if (s && i && r && a && o) {
2398
2406
  const c = `${i}/api/idea/forward`;
2399
2407
  m(c, {
2400
2408
  method: "POST",
@@ -2404,8 +2412,8 @@ function $t(e, t = void 0, n = void 0) {
2404
2412
  "X-DS-SWYM-CSRFTOKEN": r
2405
2413
  },
2406
2414
  data: JSON.stringify({
2407
- community_uri: `swym:prd:${s.toUpperCase()}:community:${o}`,
2408
- content_uri: `swym:prd:${s.toUpperCase()}:idea:${a}`,
2415
+ community_uri: `swym:prd:${s.toUpperCase()}:community:${a}`,
2416
+ content_uri: `swym:prd:${s.toUpperCase()}:idea:${o}`,
2409
2417
  timeout: 3e4
2410
2418
  }),
2411
2419
  type: "json",
@@ -2430,11 +2438,11 @@ function Nt(e, t = void 0, n = void 0) {
2430
2438
  try {
2431
2439
  let r;
2432
2440
  if (e._3DDashboard) {
2433
- const o = e._3DDashboard + "/api/users/current";
2434
- console.log("_3DSwym_get_currentUser | url", o), m(o, {
2441
+ const a = e._3DDashboard + "/api/users/current";
2442
+ console.log("_3DSwym_get_currentUser | url", a), m(a, {
2435
2443
  method: "GET",
2436
- onComplete(a, c, d) {
2437
- let u = a.replace(/\"\[/g, "[").replace(/\]\"/g, "]").replace(/\"{/g, "{").replace(/}\"/g, "}").replace(/\\/g, "");
2444
+ onComplete(o, c, d) {
2445
+ let u = o.replace(/\"\[/g, "[").replace(/\]\"/g, "]").replace(/\"{/g, "{").replace(/}\"/g, "}").replace(/\\/g, "");
2438
2446
  u = u.replace(/\"\[/g, "[").replace(/\]\"/g, "]").replace(/\"{/g, "{").replace(/}\"/g, "}").replace(/\\/g, ""), console.log("result", u);
2439
2447
  let p = {};
2440
2448
  try {
@@ -2444,8 +2452,8 @@ function Nt(e, t = void 0, n = void 0) {
2444
2452
  }
2445
2453
  console.log(p), p.first_name = p?.firstName ? p.firstName : "", p.last_name = p?.lastName ? p.lastName : "", console.log("_3DSwym_get_currentUser | info", p), r = p, s(p);
2446
2454
  },
2447
- onFailure(a) {
2448
- i("ERROR | _3DSwym_get_currentUser => _3DDashboard + /api/users/current", a);
2455
+ onFailure(o) {
2456
+ i("ERROR | _3DSwym_get_currentUser => _3DDashboard + /api/users/current", o);
2449
2457
  }
2450
2458
  });
2451
2459
  }
@@ -2463,12 +2471,12 @@ function Ft(e, t, n = void 0, s = void 0) {
2463
2471
  m(i, {
2464
2472
  method: "GET",
2465
2473
  headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
2466
- onComplete(o, a, c) {
2467
- const d = JSON.parse(o);
2474
+ onComplete(a, o, c) {
2475
+ const d = JSON.parse(a);
2468
2476
  n && n(d);
2469
2477
  },
2470
- onFailure(o) {
2471
- s && s(o);
2478
+ onFailure(a) {
2479
+ s && s(a);
2472
2480
  }
2473
2481
  });
2474
2482
  },
@@ -2480,15 +2488,15 @@ function It(e, t = void 0, n = void 0) {
2480
2488
  _3DSwym: s,
2481
2489
  _3DSwym_token: i,
2482
2490
  subjectUri: r,
2483
- richMessage: o
2484
- } = e, a = `${s}/commentproxy/subjects/${r}/comments`, d = {
2491
+ richMessage: a
2492
+ } = e, o = `${s}/commentproxy/subjects/${r}/comments`, d = {
2485
2493
  method: "POST",
2486
2494
  headers: {
2487
2495
  "Content-type": "application/json;charset=UTF-8",
2488
2496
  Accept: "application/json",
2489
2497
  "X-DS-SWYM-CSRFTOKEN": i
2490
2498
  },
2491
- data: JSON.stringify({ richMessage: o }),
2499
+ data: JSON.stringify({ richMessage: a }),
2492
2500
  type: "json",
2493
2501
  onComplete(u, p, f) {
2494
2502
  const l = {
@@ -2500,7 +2508,7 @@ function It(e, t = void 0, n = void 0) {
2500
2508
  n && n(u);
2501
2509
  }
2502
2510
  };
2503
- m(a, d);
2511
+ m(o, d);
2504
2512
  }
2505
2513
  function Ut(e, t = void 0, n = void 0) {
2506
2514
  e.tenant && P(e, (s) => {
@@ -2511,19 +2519,19 @@ function Ut(e, t = void 0, n = void 0) {
2511
2519
  function Rt(e, t = void 0, n = void 0) {
2512
2520
  e.tenant && P(e, (s) => {
2513
2521
  const i = s.services.find(
2514
- (a) => a.id === "3dpassport"
2515
- )?.url, r = s.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${r}/auth/cas`;
2516
- m(o, {
2517
- async onComplete(a) {
2518
- const c = typeof a == "string" ? JSON.parse(a)?.x3ds_service_redirect_url : a?.x3ds_service_redirect_url;
2522
+ (o) => o.id === "3dpassport"
2523
+ )?.url, r = s.services.find((o) => o.id === "businessprocess")?.url + "/api/v2", a = `${i}/login/?service=${r}/auth/cas`;
2524
+ m(a, {
2525
+ async onComplete(o) {
2526
+ const c = typeof o == "string" ? JSON.parse(o)?.x3ds_service_redirect_url : o?.x3ds_service_redirect_url;
2519
2527
  await fetch(c, {
2520
2528
  method: "POST"
2521
2529
  }).then((d) => d.json()).then(async (d) => {
2522
2530
  t && t(d?.token);
2523
2531
  });
2524
2532
  },
2525
- onFailure(a) {
2526
- n && n(a);
2533
+ onFailure(o) {
2534
+ n && n(o);
2527
2535
  }
2528
2536
  });
2529
2537
  });
@@ -2563,10 +2571,10 @@ async function jt(e, t, n, s = void 0, i = void 0) {
2563
2571
  {
2564
2572
  method: "POST"
2565
2573
  }
2566
- ).then((o) => o.json()).then((o) => {
2567
- s && s(o);
2568
- }).catch((o) => {
2569
- i && i(o);
2574
+ ).then((a) => a.json()).then((a) => {
2575
+ s && s(a);
2576
+ }).catch((a) => {
2577
+ i && i(a);
2570
2578
  });
2571
2579
  }
2572
2580
  }
@@ -2578,39 +2586,39 @@ async function Dt(e, t, n, s = void 0, i = void 0) {
2578
2586
  {
2579
2587
  method: "POST"
2580
2588
  }
2581
- ).then((o) => o.json()).then((o) => {
2582
- s && s(o);
2583
- }).catch((o) => {
2584
- i && i(o);
2589
+ ).then((a) => a.json()).then((a) => {
2590
+ s && s(a);
2591
+ }).catch((a) => {
2592
+ i && i(a);
2585
2593
  });
2586
2594
  }
2587
2595
  }
2588
2596
  async function vt(e, t, n, s, i = void 0, r = void 0) {
2589
2597
  if (e.tenant) {
2590
- const o = e.tenant.toLowerCase();
2598
+ const a = e.tenant.toLowerCase();
2591
2599
  fetch(
2592
- `https://api.uixhome.fr/${o}/iterop/businesstable/patch/rows/${n}/?t=${t}&b=${s}`,
2600
+ `https://api.uixhome.fr/${a}/iterop/businesstable/patch/rows/${n}/?t=${t}&b=${s}`,
2593
2601
  {
2594
2602
  method: "POST"
2595
2603
  }
2596
- ).then((a) => a.json()).then((a) => {
2597
- i && i(a);
2598
- }).catch((a) => {
2599
- r && r(a, n, s);
2604
+ ).then((o) => o.json()).then((o) => {
2605
+ i && i(o);
2606
+ }).catch((o) => {
2607
+ r && r(o, n, s);
2600
2608
  });
2601
2609
  }
2602
2610
  }
2603
- async function At(e, t, n, s, i, r = void 0, o = void 0) {
2611
+ async function At(e, t, n, s, i, r = void 0, a = void 0) {
2604
2612
  if (e.tenant) {
2605
- const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${n}?t=${t}&c=${encodeURIComponent(
2613
+ const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${n}?t=${t}&c=${encodeURIComponent(
2606
2614
  s
2607
2615
  )}&b=${encodeURIComponent(i)}`;
2608
- fetch(a, {
2616
+ fetch(o, {
2609
2617
  method: "POST"
2610
2618
  }).then((c) => c.json()).then((c) => {
2611
- c.url = a, r && r(c);
2619
+ c.url = o, r && r(c);
2612
2620
  }).catch((c) => {
2613
- o && o({
2621
+ a && a({
2614
2622
  error: c,
2615
2623
  tableId: n,
2616
2624
  columns: s,
@@ -2621,17 +2629,17 @@ async function At(e, t, n, s, i, r = void 0, o = void 0) {
2621
2629
  }
2622
2630
  async function Pt(e, t, n, s, i = void 0, r = void 0) {
2623
2631
  if (e.tenant) {
2624
- const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${n}?t=${t}&b=${encodeURIComponent(
2632
+ const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${n}?t=${t}&b=${encodeURIComponent(
2625
2633
  s
2626
2634
  )}`;
2627
- fetch(o, {
2635
+ fetch(a, {
2628
2636
  method: "POST"
2629
- }).then((a) => a.json()).then((a) => {
2630
- i && i(a);
2631
- }).catch((a) => {
2637
+ }).then((o) => o.json()).then((o) => {
2638
+ i && i(o);
2639
+ }).catch((o) => {
2632
2640
  r && r({
2633
- error: a,
2634
- url: o
2641
+ error: o,
2642
+ url: a
2635
2643
  });
2636
2644
  });
2637
2645
  }
@@ -2643,11 +2651,11 @@ async function Lt(e, t, n, s = void 0, i = void 0) {
2643
2651
  )}`;
2644
2652
  fetch(r, {
2645
2653
  method: "POST"
2646
- }).then((o) => o.json()).then((o) => {
2647
- s && s(o);
2648
- }).catch((o) => {
2654
+ }).then((a) => a.json()).then((a) => {
2655
+ s && s(a);
2656
+ }).catch((a) => {
2649
2657
  i && i({
2650
- error: o,
2658
+ error: a,
2651
2659
  url: r
2652
2660
  });
2653
2661
  });
@@ -2655,16 +2663,16 @@ async function Lt(e, t, n, s = void 0, i = void 0) {
2655
2663
  }
2656
2664
  async function Mt(e, t, n, s, i = void 0, r = void 0) {
2657
2665
  if (e.tenant) {
2658
- const o = e.tenant.toLowerCase();
2666
+ const a = e.tenant.toLowerCase();
2659
2667
  fetch(
2660
- `https://api.uixhome.fr/${o}/iterop/runtime/processes/${n}?t=${t}&b=${s}`,
2668
+ `https://api.uixhome.fr/${a}/iterop/runtime/processes/${n}?t=${t}&b=${s}`,
2661
2669
  {
2662
2670
  method: "POST"
2663
2671
  }
2664
- ).then((a) => a.json()).then((a) => {
2665
- console.log("_Iterop_runProcess : OK"), i && i(a);
2666
- }).catch((a) => {
2667
- r && r(a);
2672
+ ).then((o) => o.json()).then((o) => {
2673
+ console.log("_Iterop_runProcess : OK"), i && i(o);
2674
+ }).catch((o) => {
2675
+ r && r(o);
2668
2676
  });
2669
2677
  }
2670
2678
  }
@@ -2676,40 +2684,40 @@ async function Jt(e, t, n, s = void 0, i = void 0) {
2676
2684
  {
2677
2685
  method: "POST"
2678
2686
  }
2679
- ).then((o) => o.json()).then((o) => {
2680
- s && s(o);
2681
- }).catch((o) => {
2682
- i && i(o);
2687
+ ).then((a) => a.json()).then((a) => {
2688
+ s && s(a);
2689
+ }).catch((a) => {
2690
+ i && i(a);
2683
2691
  });
2684
2692
  }
2685
2693
  }
2686
- async function Gt(e, t, n, s, i, r = void 0, o = void 0) {
2694
+ async function Gt(e, t, n, s, i, r = void 0, a = void 0) {
2687
2695
  if (e.tenant) {
2688
- const a = e.tenant.toLowerCase();
2696
+ const o = e.tenant.toLowerCase();
2689
2697
  fetch(
2690
- `https://api.uixhome.fr/${a}/iterop/dependencytable/patch/${n}/?t=${t}&cli=${s}&b=${i}`,
2698
+ `https://api.uixhome.fr/${o}/iterop/dependencytable/patch/${n}/?t=${t}&cli=${s}&b=${i}`,
2691
2699
  {
2692
2700
  method: "POST"
2693
2701
  }
2694
2702
  ).then((c) => c.json()).then((c) => {
2695
2703
  r && r(c);
2696
2704
  }).catch((c) => {
2697
- o && o(c);
2705
+ a && a(c);
2698
2706
  });
2699
2707
  }
2700
2708
  }
2701
2709
  async function Kt(e, t, n, s, i = void 0, r = void 0) {
2702
2710
  if (e.tenant) {
2703
- const o = e.tenant.toLowerCase();
2711
+ const a = e.tenant.toLowerCase();
2704
2712
  fetch(
2705
- `https://api.uixhome.fr/${o}/iterop/dependencytable/put/${n}/?t=${t}&b=${s}`,
2713
+ `https://api.uixhome.fr/${a}/iterop/dependencytable/put/${n}/?t=${t}&b=${s}`,
2706
2714
  {
2707
2715
  method: "POST"
2708
2716
  }
2709
- ).then((a) => a.json()).then((a) => {
2710
- i && i(a);
2711
- }).catch((a) => {
2712
- r && r(a);
2717
+ ).then((o) => o.json()).then((o) => {
2718
+ i && i(o);
2719
+ }).catch((o) => {
2720
+ r && r(o);
2713
2721
  });
2714
2722
  }
2715
2723
  }
@@ -2722,10 +2730,10 @@ async function Bt(e, t, n, s = void 0, i = void 0) {
2722
2730
  {
2723
2731
  method: "POST"
2724
2732
  }
2725
- ).then((o) => o.json()).then((o) => {
2726
- s && s(o);
2727
- }).catch((o) => {
2728
- i && i(o);
2733
+ ).then((a) => a.json()).then((a) => {
2734
+ s && s(a);
2735
+ }).catch((a) => {
2736
+ i && i(a);
2729
2737
  });
2730
2738
  }
2731
2739
  }
@@ -2737,27 +2745,27 @@ function Et(e) {
2737
2745
  function qt(e, t = void 0, n = void 0) {
2738
2746
  return console.log("credentials", e), new Promise((s) => {
2739
2747
  if (e.token === "" && b(e), !e.space || e.space === "") {
2740
- const o = Z();
2741
- console.log("platformeInfo", o);
2748
+ const a = Z();
2749
+ console.log("platformeInfo", a);
2742
2750
  }
2743
2751
  U(
2744
2752
  e,
2745
2753
  "Common space",
2746
2754
  ["VPLMProjectLeader", "VPLMCreator"],
2747
2755
  void 0,
2748
- (o) => e.ctx = o,
2749
- (o) => {
2750
- console.log("onError =>", o);
2756
+ (a) => e.ctx = a,
2757
+ (a) => {
2758
+ console.log("onError =>", a);
2751
2759
  },
2752
2760
  !0
2753
2761
  );
2754
2762
  const i = O.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
2755
2763
  m(r, {
2756
- onComplete(o) {
2757
- if (Array.isArray(JSON.parse(o))) {
2758
- const a = JSON.parse(o);
2759
- console.log("serviceId=3dsearch", a);
2760
- const c = `${a[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
2764
+ onComplete(a) {
2765
+ if (Array.isArray(JSON.parse(a))) {
2766
+ const o = JSON.parse(a);
2767
+ console.log("serviceId=3dsearch", o);
2768
+ const c = `${o[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
2761
2769
  m(c, {
2762
2770
  method: "POST",
2763
2771
  headers: {
@@ -2807,8 +2815,8 @@ function qt(e, t = void 0, n = void 0) {
2807
2815
  });
2808
2816
  }
2809
2817
  },
2810
- onFailure(o) {
2811
- n && n(o);
2818
+ onFailure(a) {
2819
+ n && n(a);
2812
2820
  }
2813
2821
  });
2814
2822
  });