@beam3_dev/api_module 0.0.236 → 0.0.237

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 _e(e, t = void 0, n = void 0) {
67
67
  }
68
68
  async function we(e, t = V) {
69
69
  let n = $.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 we(e, t = V) {
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 === $.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: $.fromISO(c.date).toISODate(),
96
96
  end: $.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 W(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
  X(
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 W(e, t, n) {
117
117
  );
118
118
  }
119
119
  function X(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 X(e, t, n) {
132
132
  }
133
133
  );
134
134
  };
135
- a(r);
135
+ o(r);
136
136
  }
137
137
  async function Ce(e, t, n = !0) {
138
138
  const s = e.events.findIndex((i) => i.uuid === t.uuid);
@@ -202,10 +202,10 @@ function b(e, t = void 0, n = void 0) {
202
202
  onComplete(i) {
203
203
  const r = typeof i == "string" ? JSON.parse(i) : i;
204
204
  if (r && "platforms" in r) {
205
- const o = r.platforms.find(
206
- (a) => a.id === e.tenant.toUpperCase()
205
+ const a = r.platforms.find(
206
+ (o) => o.id === e.tenant.toUpperCase()
207
207
  );
208
- t && o ? t(o) : n && n("_getServiceUrl return listServiceUrl = undefined");
208
+ t && a ? t(a) : n && n("_getServiceUrl return listServiceUrl = undefined");
209
209
  } else
210
210
  n && n("_getServiceUrl return oResponse = undefined");
211
211
  },
@@ -222,8 +222,8 @@ function Ie(e, t = void 0, n = void 0) {
222
222
  onComplete(i) {
223
223
  const r = JSON.parse(i);
224
224
  if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
225
- const o = `${r[0].services[0].url}`;
226
- t && t(o);
225
+ const a = `${r[0].services[0].url}`;
226
+ t && t(a);
227
227
  }
228
228
  },
229
229
  onFailure(i) {
@@ -245,42 +245,42 @@ function Ne(e, t, n) {
245
245
  "Content-Type": "application/json",
246
246
  Accept: "application/json"
247
247
  },
248
- onComplete(r, o, a) {
248
+ onComplete(r, a, o) {
249
249
  const c = JSON.parse(r), d = c.data.map((u) => {
250
250
  const p = u.attributes.name, f = u.id;
251
251
  return { name: p, id: f };
252
252
  });
253
253
  t && t(d, c);
254
254
  },
255
- onFailure(r, o) {
256
- const a = r;
257
- a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
255
+ onFailure(r, a) {
256
+ const o = r;
257
+ o.msg = a.errormsg, o.errCode = a.errorcode, n && n(o);
258
258
  }
259
259
  });
260
260
  }
261
261
  function ve(e, t = void 0, n = void 0) {
262
262
  let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
263
263
  m(s, {
264
- onComplete(i, r, o) {
265
- const a = JSON.parse(i);
266
- console.log("_AppMngt_get_users => ", a), t && t(a);
264
+ onComplete(i, r, a) {
265
+ const o = JSON.parse(i);
266
+ console.log("_AppMngt_get_users => ", o), t && t(o);
267
267
  },
268
268
  onFailure(i, r) {
269
- const o = i;
270
- o.msg = r.errormsg, o.errCode = r.errorcode, n && n(o);
269
+ const a = i;
270
+ a.msg = r.errormsg, a.errCode = r.errorcode, n && n(a);
271
271
  }
272
272
  });
273
273
  }
274
274
  function Fe(e, t, n = void 0, s = void 0) {
275
275
  let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
276
276
  m(i, {
277
- onComplete(r, o, a) {
277
+ onComplete(r, a, o) {
278
278
  const c = JSON.parse(r);
279
279
  n && n(c);
280
280
  },
281
- onFailure(r, o) {
282
- const a = r;
283
- a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
281
+ onFailure(r, a) {
282
+ const o = r;
283
+ o.msg = a.errormsg, o.errCode = a.errorcode, s && s(o);
284
284
  }
285
285
  });
286
286
  }
@@ -289,7 +289,7 @@ const A = {
289
289
  Accept: "application/json,text/javascript,*/*"
290
290
  };
291
291
  function ke(e, t, n = void 0, s = void 0) {
292
- const { space: i, currentUser: r } = e, a = `${i}${{
292
+ const { space: i, currentUser: r } = e, o = `${i}${{
293
293
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
294
294
  }.URIUGr}`, c = {
295
295
  groups: [
@@ -303,7 +303,7 @@ function ke(e, t, n = void 0, s = void 0) {
303
303
  }
304
304
  ]
305
305
  };
306
- m(a, {
306
+ m(o, {
307
307
  method: "POST",
308
308
  headers: A,
309
309
  data: JSON.stringify(c),
@@ -318,7 +318,7 @@ function ke(e, t, n = void 0, s = void 0) {
318
318
  });
319
319
  }
320
320
  function Ae(e, t, n = void 0, s = void 0) {
321
- 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}`;
321
+ 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}`;
322
322
  m(d, {
323
323
  opts: {
324
324
  method: "GET",
@@ -337,10 +337,10 @@ function Ae(e, t, n = void 0, s = void 0) {
337
337
  });
338
338
  }
339
339
  function Y(e, t = void 0, n = void 0) {
340
- const { space: s, tenant: i } = e, r = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, c = {
340
+ const { space: s, tenant: i } = e, r = s, a = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", o = `?tenant=dstenant:${i}`, c = {
341
341
  method: "GET",
342
342
  Accept: "application/json,*/*,test/javascript"
343
- }, d = `${r}${o}${a}`;
343
+ }, d = `${r}${a}${o}`;
344
344
  m(d, {
345
345
  OPTsH: c,
346
346
  onComplete(u) {
@@ -353,12 +353,12 @@ function Y(e, t = void 0, n = void 0) {
353
353
  });
354
354
  }
355
355
  function Ue(e, t = void 0, n = void 0) {
356
- 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: {
356
+ 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: {
357
357
  "Content-Type": "application/json",
358
358
  Accept: "application/json,text/javascript,*/*"
359
359
  } };
360
360
  try {
361
- m(a, {
361
+ m(o, {
362
362
  opts: d,
363
363
  onComplete(u) {
364
364
  const p = JSON.parse(u), f = {}, l = p.groups.filter((g) => g.uri.startsWith("uuid:"));
@@ -390,15 +390,15 @@ function je(e, t) {
390
390
  });
391
391
  }
392
392
  function xe(e, t, n, s = void 0, i = void 0) {
393
- const { space: r, tenant: o } = e, a = {
393
+ const { space: r, tenant: a } = e, o = {
394
394
  URITI: "/3drdfpersist/resources/v1/template-instances",
395
395
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
396
396
  nextURICh: "/characteristics",
397
397
  nextURIGr: "/group",
398
398
  nexURImem: "/members",
399
399
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
400
- OPTsTenant: `tenant=dstenant:${o}`
401
- }, c = n, d = `${r}${a.URIUGr}/${t}`, u = JSON.stringify(c);
400
+ OPTsTenant: `tenant=dstenant:${a}`
401
+ }, c = n, d = `${r}${o.URIUGr}/${t}`, u = JSON.stringify(c);
402
402
  m(d, {
403
403
  headers: A,
404
404
  method: "PATCH",
@@ -413,8 +413,8 @@ function xe(e, t, n, s = void 0, i = void 0) {
413
413
  });
414
414
  }
415
415
  function Pe(e, t, n, s = void 0, i = void 0) {
416
- const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
417
- m(a, {
416
+ const { space: r } = e, o = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
417
+ m(o, {
418
418
  method: "PATCH",
419
419
  headers: A,
420
420
  data: JSON.stringify(n),
@@ -428,8 +428,8 @@ function Pe(e, t, n, s = void 0, i = void 0) {
428
428
  });
429
429
  }
430
430
  function Re(e, t, n = void 0, s = void 0) {
431
- const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
432
- m(o, {
431
+ const { space: i } = e, a = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
432
+ m(a, {
433
433
  opts: {
434
434
  method: "GET",
435
435
  headers: {
@@ -452,8 +452,8 @@ async function H(e, t, n) {
452
452
  onComplete(i) {
453
453
  i = JSON.parse(i), t && t(i.csrf);
454
454
  },
455
- onFailure(i, r, o) {
456
- n && n({ error: i, headers: r, xhr: o });
455
+ onFailure(i, r, a) {
456
+ n && n({ error: i, headers: r, xhr: a });
457
457
  }
458
458
  });
459
459
  }
@@ -469,11 +469,11 @@ var Q = function(e, t, n, s) {
469
469
  return i;
470
470
  var r = /\+/g;
471
471
  e = e.split(t);
472
- var o = 1e3;
473
- s && typeof s.maxKeys == "number" && (o = s.maxKeys);
474
- var a = e.length;
475
- o > 0 && a > o && (a = o);
476
- for (var c = 0; c < a; ++c) {
472
+ var a = 1e3;
473
+ s && typeof s.maxKeys == "number" && (a = s.maxKeys);
474
+ var o = e.length;
475
+ a > 0 && o > a && (o = a);
476
+ for (var c = 0; c < o; ++c) {
477
477
  var d = e[c].replace(r, "%20"), u = d.indexOf(n), p, f, l, g;
478
478
  u >= 0 ? (p = d.substr(0, u), f = d.substr(u + 1)) : (p = d, f = ""), l = decodeURIComponent(p), g = decodeURIComponent(f), z(i, l) ? Array.isArray(i[l]) ? i[l].push(g) : i[l] = [i[l], g] : i[l] = g;
479
479
  }
@@ -492,8 +492,8 @@ var Q = function(e, t, n, s) {
492
492
  }, Z = function(e, t, n, s) {
493
493
  return t = t || "&", n = n || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
494
494
  var r = encodeURIComponent(N(i)) + n;
495
- return Array.isArray(e[i]) ? e[i].map(function(o) {
496
- return r + encodeURIComponent(N(o));
495
+ return Array.isArray(e[i]) ? e[i].map(function(a) {
496
+ return r + encodeURIComponent(N(a));
497
497
  }).join(t) : r + encodeURIComponent(N(e[i]));
498
498
  }).filter(Boolean).join(t) : s ? encodeURIComponent(N(s)) + n + encodeURIComponent(N(e)) : "";
499
499
  };
@@ -507,12 +507,12 @@ async function R(e, t = void 0, n = void 0, s = void 0) {
507
507
  }
508
508
  const r = i + `/resources/v1/modeler/documents/${t}`;
509
509
  m(r, {
510
- onComplete(o, a, c) {
511
- const d = JSON.parse(o);
510
+ onComplete(a, o, c) {
511
+ const d = JSON.parse(a);
512
512
  n && n(d);
513
513
  },
514
- onFailure(o) {
515
- s && s(o);
514
+ onFailure(a) {
515
+ s && s(a);
516
516
  }
517
517
  });
518
518
  }
@@ -522,7 +522,7 @@ async function De(e, t = void 0, n = void 0, s = void 0) {
522
522
  console.log("Le paramètre docids est obligatoire");
523
523
  return;
524
524
  }
525
- let r = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, o = v.stringify({
525
+ let r = `${i}/resources/v1/modeler/documents/ids?$include=!files,!ownerInfo,!originatorInfo,!relOwnerInfo'`, a = v.stringify({
526
526
  $ids: t.toString().replace('"', "").replace("[", "").replace("]", "")
527
527
  });
528
528
  m(r, {
@@ -530,13 +530,13 @@ async function De(e, t = void 0, n = void 0, s = void 0) {
530
530
  headers: {
531
531
  "Content-Type": "application/x-www-form-urlencoded"
532
532
  },
533
- data: o,
534
- onComplete(a, c, d) {
535
- const u = JSON.parse(a);
533
+ data: a,
534
+ onComplete(o, c, d) {
535
+ const u = JSON.parse(o);
536
536
  n && n(u);
537
537
  },
538
- onFailure(a) {
539
- s && s(a);
538
+ onFailure(o) {
539
+ s && s(o);
540
540
  }
541
541
  });
542
542
  }
@@ -544,9 +544,9 @@ function F(e, t = void 0, n = void 0) {
544
544
  if (e.objID && e.objID !== "") {
545
545
  let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
546
546
  m(s, {
547
- onComplete(i, r, o) {
548
- const a = JSON.parse(i);
549
- e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
547
+ onComplete(i, r, a) {
548
+ const o = JSON.parse(i);
549
+ e.token = o?.csrf?.value, e.datas = o?.data[0], t && t(e);
550
550
  },
551
551
  onFailure(i) {
552
552
  n && n(i);
@@ -567,15 +567,15 @@ function O(e, t = void 0, n = void 0) {
567
567
  if (e.space) {
568
568
  const s = e.space + "/resources/v1/application/CSRF";
569
569
  m(s, {
570
- onComplete(i, r, o) {
571
- const a = JSON.parse(i);
572
- t && t(a.csrf.value);
570
+ onComplete(i, r, a) {
571
+ const o = JSON.parse(i);
572
+ t && t(o.csrf.value);
573
573
  },
574
- onFailure(i, r, o) {
574
+ onFailure(i, r, a) {
575
575
  n && n({
576
576
  response: i,
577
577
  headers: r,
578
- xhr: o
578
+ xhr: a
579
579
  });
580
580
  }
581
581
  });
@@ -592,12 +592,12 @@ function U(e, t = void 0, n = void 0) {
592
592
  headers: {
593
593
  ENO_CSRF_TOKEN: e.token
594
594
  },
595
- onComplete(r, o) {
595
+ onComplete(r, a) {
596
596
  const c = JSON.parse(r).data[0].dataelements.ticketURL;
597
- t && t(c, o);
597
+ t && t(c, a);
598
598
  },
599
- onFailure(r, o) {
600
- console.warn("☠️ error => ", r, o), n && n(r, o);
599
+ onFailure(r, a) {
600
+ console.warn("☠️ error => ", r, a), n && n(r, a);
601
601
  }
602
602
  });
603
603
  },
@@ -613,23 +613,23 @@ function Le(e, t, n, s = void 0, i = void 0) {
613
613
  headers: {
614
614
  ENO_CSRF_TOKEN: n
615
615
  },
616
- onComplete(o) {
617
- let a = JSON.parse(o);
618
- if (console.log("☠️ info => ", a), a.success === !0)
616
+ onComplete(a) {
617
+ let o = JSON.parse(a);
618
+ if (console.log("☠️ info => ", o), o.success === !0)
619
619
  try {
620
- const c = a.data[0].dataelements.ticketURL;
620
+ const c = o.data[0].dataelements.ticketURL;
621
621
  s && s(c);
622
622
  } catch (c) {
623
623
  i && i(c);
624
624
  }
625
625
  },
626
- onFailure(o) {
627
- i && i(o);
626
+ onFailure(a) {
627
+ i && i(a);
628
628
  }
629
629
  });
630
630
  }
631
- function D(e, t, n, s, i, r = void 0, o = void 0) {
632
- const a = () => ee(
631
+ function D(e, t, n, s, i, r = void 0, a = void 0) {
632
+ const o = () => ee(
633
633
  e,
634
634
  t,
635
635
  n,
@@ -637,17 +637,17 @@ function D(e, t, n, s, i, r = void 0, o = void 0) {
637
637
  i,
638
638
  e.token,
639
639
  r,
640
- o
640
+ a
641
641
  );
642
- e.token ? a() : F(
642
+ e.token ? o() : F(
643
643
  e,
644
644
  t,
645
645
  (c) => {
646
- e.token = c.csrf.value, a();
646
+ e.token = c.csrf.value, o();
647
647
  }
648
648
  );
649
649
  }
650
- function ee(e, t, n, s, i, r, o = void 0, a = void 0) {
650
+ function ee(e, t, n, s, i, r, a = void 0, o = void 0) {
651
651
  const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
652
652
  m(c, {
653
653
  method: "PUT",
@@ -689,10 +689,10 @@ function ee(e, t, n, s, i, r, o = void 0, a = void 0) {
689
689
  }),
690
690
  type: "json",
691
691
  onComplete(T) {
692
- o && o(T);
692
+ a && a(T);
693
693
  },
694
694
  onFailure(T) {
695
- a && a(T);
695
+ o && o(T);
696
696
  }
697
697
  }, C = e.tenant.toUpperCase();
698
698
  m(
@@ -700,7 +700,7 @@ function ee(e, t, n, s, i, r, o = void 0, a = void 0) {
700
700
  _
701
701
  );
702
702
  }, y.onFailure = function(S) {
703
- a && a(S);
703
+ o && o(S);
704
704
  }, y.timeout = 0, m(l.ticketURL, y);
705
705
  }
706
706
  });
@@ -710,13 +710,13 @@ async function Me(e, t, n, s = void 0, i = void 0) {
710
710
  e,
711
711
  t,
712
712
  (r) => {
713
- 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;
713
+ 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;
714
714
  D(
715
715
  e,
716
716
  t,
717
- o,
718
- n,
719
717
  a,
718
+ n,
719
+ o,
720
720
  (c) => {
721
721
  s && s(c);
722
722
  },
@@ -733,10 +733,10 @@ async function Me(e, t, n, s = void 0, i = void 0) {
733
733
  async function Je(e, t, n, s, i = void 0, r = void 0) {
734
734
  te(
735
735
  e,
736
- (o) => {
737
- console.log("resultCheckinTicket", n, o), o?.items >= 1 && o.data.forEach((a) => {
736
+ (a) => {
737
+ console.log("resultCheckinTicket", n, a), a?.items >= 1 && a.data.forEach((o) => {
738
738
  ne(
739
- a,
739
+ o,
740
740
  t,
741
741
  n,
742
742
  (c) => {
@@ -755,7 +755,7 @@ async function Je(e, t, n, s, i = void 0, r = void 0) {
755
755
  );
756
756
  });
757
757
  },
758
- (o) => console.warn(o)
758
+ (a) => console.warn(a)
759
759
  );
760
760
  }
761
761
  function te(e, t = void 0, n = void 0) {
@@ -769,7 +769,7 @@ function te(e, t = void 0, n = void 0) {
769
769
  "Content-Type": "application/json",
770
770
  SecurityContext: e.ctx
771
771
  },
772
- onComplete(i, r, o) {
772
+ onComplete(i, r, a) {
773
773
  try {
774
774
  i = JSON.parse(i);
775
775
  } catch {
@@ -788,22 +788,22 @@ function ne(e, t, n, s = void 0, i = void 0) {
788
788
  t instanceof Blob || (t = new Blob([t], {
789
789
  type: "text/plain"
790
790
  })), r.append("__fcs__jobTicket", e.dataelements.ticket), r.append("file_0", t, n);
791
- let o = e.dataelements.ticketURL;
792
- m(o, {
791
+ let a = e.dataelements.ticketURL;
792
+ m(a, {
793
793
  method: "POST",
794
794
  data: r,
795
- onComplete(a) {
796
- s && s(a.replace(/[\n\r]/g, ""));
795
+ onComplete(o) {
796
+ s && s(o.replace(/[\n\r]/g, ""));
797
797
  },
798
- onFailure(a) {
799
- i && i(a);
798
+ onFailure(o) {
799
+ i && i(o);
800
800
  }
801
801
  });
802
802
  }
803
803
  function se(e, t, n, s = void 0, i = void 0, r = void 0) {
804
804
  console.log("relatedDocAndFile", { credentials: e, receipt: t, filename: n });
805
- const o = (d) => d.indexOf(".") === -1 ? d : d.split(".").slice(0, -1).join(".");
806
- let a = "temp_" + $.now().ts, c = e.space + "/resources/v1/modeler/documents/?e6w-lang=fr&e6w-timezone=-120&xrequestedwith=xmlhttprequest";
805
+ const a = (d) => d.indexOf(".") === -1 ? d : d.split(".").slice(0, -1).join(".");
806
+ let o = "temp_" + $.now().ts, c = e.space + "/resources/v1/modeler/documents/?e6w-lang=fr&e6w-timezone=-120&xrequestedwith=xmlhttprequest";
807
807
  m(c, {
808
808
  method: "POST",
809
809
  headers: {
@@ -817,7 +817,7 @@ function se(e, t, n, s = void 0, i = void 0, r = void 0) {
817
817
  {
818
818
  type: "Document",
819
819
  dataelements: {
820
- title: o(n),
820
+ title: a(n),
821
821
  description: s
822
822
  },
823
823
  relateddata: {
@@ -831,7 +831,7 @@ function se(e, t, n, s = void 0, i = void 0, r = void 0) {
831
831
  }
832
832
  ]
833
833
  },
834
- tempId: a
834
+ tempId: o
835
835
  }
836
836
  ]
837
837
  }),
@@ -847,9 +847,9 @@ function se(e, t, n, s = void 0, i = void 0, r = void 0) {
847
847
  }
848
848
  });
849
849
  }
850
- function k(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1) {
851
- const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
852
- m(a, {
850
+ function k(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, a = !1) {
851
+ const o = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
852
+ m(o, {
853
853
  method: "GET",
854
854
  onComplete(c) {
855
855
  const d = JSON.parse(c);
@@ -886,7 +886,7 @@ function k(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1
886
886
  }));
887
887
  }
888
888
  }
889
- 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));
889
+ 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));
890
890
  },
891
891
  onFailure(c, d) {
892
892
  console.warn("Erreur de récupération du contexte de sécurité. => ", {
@@ -915,28 +915,28 @@ async function L(e, t = void 0, n = void 0) {
915
915
  U(
916
916
  e,
917
917
  (r) => {
918
- e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((o) => o.blob()).then((o) => {
919
- t && t(o);
920
- }).catch((o) => {
921
- n && n(o);
918
+ e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((a) => a.blob()).then((a) => {
919
+ t && t(a);
920
+ }).catch((a) => {
921
+ n && n(a);
922
922
  })) : m(r, {
923
- onComplete(o) {
924
- let a;
923
+ onComplete(a) {
924
+ let o;
925
925
  try {
926
- a = JSON.parse(o);
926
+ o = JSON.parse(a);
927
927
  } catch {
928
- a = o;
928
+ o = a;
929
929
  }
930
- t && typeof t == "function" && t(a), s(a);
930
+ t && typeof t == "function" && t(o), s(o);
931
931
  },
932
- onFailure(o, a, c) {
933
- n && (console.log("error http", o), n({
934
- msg: JSON.parse(o),
935
- headers: a,
932
+ onFailure(a, o, c) {
933
+ n && (console.log("error http", a), n({
934
+ msg: JSON.parse(a),
935
+ headers: o,
936
936
  xhr: c
937
937
  }), i({
938
- msg: JSON.parse(o),
939
- headers: a,
938
+ msg: JSON.parse(a),
939
+ headers: o,
940
940
  xhr: c
941
941
  }));
942
942
  }
@@ -969,17 +969,17 @@ function ae(e, t, n = void 0, s = void 0, i = void 0) {
969
969
  id: c
970
970
  });
971
971
  });
972
- let o = JSON.stringify({
972
+ let a = JSON.stringify({
973
973
  csrf: {
974
974
  name: "ENO_CSRF_TOKEN",
975
975
  value: e.token
976
976
  },
977
977
  data: r
978
978
  });
979
- const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
980
- m(a, {
979
+ const o = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
980
+ m(o, {
981
981
  method: "PUT",
982
- data: o,
982
+ data: a,
983
983
  type: "json",
984
984
  onComplete(c) {
985
985
  const d = c.data;
@@ -1019,7 +1019,7 @@ function Ge(e, t, n = void 0, s = void 0) {
1019
1019
  return new Promise((i) => {
1020
1020
  if (e.token === "" && O(e), t !== void 0 && t !== "" && t !== null) {
1021
1021
  const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
1022
- let o = {
1022
+ let a = {
1023
1023
  method: "POST",
1024
1024
  headers: {
1025
1025
  SecurityContext: "ctx::" + e.ctx,
@@ -1035,22 +1035,22 @@ function Ge(e, t, n = void 0, s = void 0) {
1035
1035
  ]
1036
1036
  }),
1037
1037
  type: "json",
1038
- onComplete(a) {
1039
- n && n(a);
1038
+ onComplete(o) {
1039
+ n && n(o);
1040
1040
  },
1041
- onFailure(a) {
1042
- s && s(a);
1041
+ onFailure(o) {
1042
+ s && s(o);
1043
1043
  }
1044
1044
  };
1045
- m(r, o);
1045
+ m(r, a);
1046
1046
  }
1047
1047
  });
1048
1048
  }
1049
1049
  function Ee(e, t, n, s = void 0, i = void 0) {
1050
1050
  return new Promise((r) => {
1051
1051
  if (e.token === "" && O(e), t !== void 0 && t !== "" && t !== null) {
1052
- const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
1053
- let a = {
1052
+ const a = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
1053
+ let o = {
1054
1054
  method: "POST",
1055
1055
  headers: {
1056
1056
  SecurityContext: "ctx::" + e.ctx,
@@ -1074,7 +1074,7 @@ function Ee(e, t, n, s = void 0, i = void 0) {
1074
1074
  i && i(c);
1075
1075
  }
1076
1076
  };
1077
- m(o, a);
1077
+ m(a, o);
1078
1078
  }
1079
1079
  });
1080
1080
  }
@@ -1087,12 +1087,12 @@ function Ke(e, t, n = void 0, s = void 0) {
1087
1087
  "ESPACE COMMUN",
1088
1088
  ["VPLMProjectLeader", "VPLMCreator"],
1089
1089
  void 0,
1090
- (a) => e.ctx = a,
1091
- (a) => {
1092
- console.log("onError =>", a);
1090
+ (o) => e.ctx = o,
1091
+ (o) => {
1092
+ console.log("onError =>", o);
1093
1093
  }
1094
1094
  );
1095
- let o = {
1095
+ let a = {
1096
1096
  method: "POST",
1097
1097
  headers: {
1098
1098
  securitycontext: "ctx::" + e.ctx,
@@ -1108,14 +1108,14 @@ function Ke(e, t, n = void 0, s = void 0) {
1108
1108
  ]
1109
1109
  }),
1110
1110
  type: "json",
1111
- onComplete(a) {
1112
- n && n(a);
1111
+ onComplete(o) {
1112
+ n && n(o);
1113
1113
  },
1114
- onFailure(a) {
1115
- s && s(a);
1114
+ onFailure(o) {
1115
+ s && s(o);
1116
1116
  }
1117
1117
  };
1118
- m(r, o);
1118
+ m(r, a);
1119
1119
  }
1120
1120
  });
1121
1121
  }
@@ -1128,12 +1128,12 @@ function Be(e, t, n = void 0, s = void 0) {
1128
1128
  "ESPACE COMMUN",
1129
1129
  ["VPLMProjectLeader", "VPLMCreator"],
1130
1130
  void 0,
1131
- (a) => e.ctx = a,
1132
- (a) => {
1133
- console.log("onError =>", a);
1131
+ (o) => e.ctx = o,
1132
+ (o) => {
1133
+ console.log("onError =>", o);
1134
1134
  }
1135
1135
  );
1136
- let o = {
1136
+ let a = {
1137
1137
  method: "POST",
1138
1138
  headers: {
1139
1139
  SecurityContext: "ctx::" + e.ctx,
@@ -1155,21 +1155,21 @@ function Be(e, t, n = void 0, s = void 0) {
1155
1155
  ]
1156
1156
  }),
1157
1157
  type: "json",
1158
- onComplete(a) {
1159
- n && n(a);
1158
+ onComplete(o) {
1159
+ n && n(o);
1160
1160
  },
1161
- onFailure(a) {
1162
- s && s(a);
1161
+ onFailure(o) {
1162
+ s && s(o);
1163
1163
  }
1164
1164
  };
1165
- m(r, o);
1165
+ m(r, a);
1166
1166
  }
1167
1167
  });
1168
1168
  }
1169
1169
  function Ve(e, t, n, s = void 0, i = void 0) {
1170
1170
  return new Promise((r) => {
1171
1171
  if (e.token === "" && O(e), t !== void 0 && t !== "" && t !== null) {
1172
- const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
1172
+ const a = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
1173
1173
  k(
1174
1174
  e.space,
1175
1175
  "ESPACE COMMUN",
@@ -1180,7 +1180,7 @@ function Ve(e, t, n, s = void 0, i = void 0) {
1180
1180
  console.log("onError =>", c);
1181
1181
  }
1182
1182
  );
1183
- let a = {
1183
+ let o = {
1184
1184
  method: "POST",
1185
1185
  headers: {
1186
1186
  securitycontext: "ctx::" + e.ctx,
@@ -1209,13 +1209,13 @@ function Ve(e, t, n, s = void 0, i = void 0) {
1209
1209
  i && i(c);
1210
1210
  }
1211
1211
  };
1212
- m(o, a);
1212
+ m(a, o);
1213
1213
  }
1214
1214
  });
1215
1215
  }
1216
1216
  function We(e, t, n, s, i = void 0, r = void 0) {
1217
- return new Promise((o) => {
1218
- const a = `${e.space}/resources/v1/modeler/dsbks/dsbks:Bookmark`;
1217
+ return new Promise((a) => {
1218
+ const o = `${e.space}/resources/v1/modeler/dsbks/dsbks:Bookmark`;
1219
1219
  let c = {
1220
1220
  attributes: {
1221
1221
  title: n,
@@ -1243,11 +1243,11 @@ function We(e, t, n, s, i = void 0, r = void 0) {
1243
1243
  r && r(p);
1244
1244
  }
1245
1245
  };
1246
- m(a, u);
1246
+ m(o, u);
1247
1247
  });
1248
1248
  }
1249
1249
  function Xe(e, t, n, s, i = void 0, r = void 0) {
1250
- return console.log("credentials", e), new Promise((o) => {
1250
+ return console.log("credentials", e), new Promise((a) => {
1251
1251
  `${e.space}`, JSON.stringify({
1252
1252
  csrf: {
1253
1253
  name: "ENO_CSRF_TOKEN",
@@ -1282,12 +1282,12 @@ function qe(e, t = void 0, n = void 0) {
1282
1282
  Accept: "application/json,text/javascript,*/*",
1283
1283
  "Content-Type": "application/ds-json"
1284
1284
  },
1285
- onComplete(r, o) {
1286
- const a = JSON.parse(r);
1287
- t && t(a, o);
1285
+ onComplete(r, a) {
1286
+ const o = JSON.parse(r);
1287
+ t && t(o, a);
1288
1288
  },
1289
- onFailure(r, o, a) {
1290
- n && n({ response: r, headers: o, xhr: a });
1289
+ onFailure(r, a, o) {
1290
+ n && n({ response: r, headers: a, xhr: o });
1291
1291
  }
1292
1292
  });
1293
1293
  }
@@ -1312,9 +1312,9 @@ async function He(e, t, n = void 0, s = void 0) {
1312
1312
  return new Promise((i) => {
1313
1313
  U(e, t, (r) => {
1314
1314
  m(r, {
1315
- onComplete: (o, a, c) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, c), i),
1316
- onFailure: (o, a, c) => {
1317
- s && s(o, a, c), console.log(o, a?.errormsg);
1315
+ onComplete: (a, o, c) => (i(JSON.parse(a)), n && n(JSON.parse(a), o, c), i),
1316
+ onFailure: (a, o, c) => {
1317
+ s && s(a, o, c), console.log(a, o?.errormsg);
1318
1318
  }
1319
1319
  });
1320
1320
  });
@@ -1325,12 +1325,12 @@ function ze(e, t, n, s = void 0, i = void 0) {
1325
1325
  F(
1326
1326
  e,
1327
1327
  n,
1328
- (o) => {
1329
- 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;
1328
+ (a) => {
1329
+ 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;
1330
1330
  D(
1331
1331
  e,
1332
1332
  n,
1333
- a,
1333
+ o,
1334
1334
  r,
1335
1335
  c,
1336
1336
  (d) => {
@@ -1386,8 +1386,8 @@ function et(e, t = void 0, n = void 0) {
1386
1386
  L(
1387
1387
  e,
1388
1388
  i.objID,
1389
- (o) => {
1390
- s.push({ [i.name]: o }), i.name === "dbProjets" && (M = o.affaires.map((a) => a.objectID), oe(e, J)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1389
+ (a) => {
1390
+ s.push({ [i.name]: a }), i.name === "dbProjets" && (M = a.affaires.map((o) => o.objectID), oe(e, J)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1391
1391
  }
1392
1392
  );
1393
1393
  });
@@ -1398,7 +1398,7 @@ function oe(e, t, n = void 0, s = void 0) {
1398
1398
  M,
1399
1399
  (i) => {
1400
1400
  const r = [...t];
1401
- r.find((o) => o.objectID === i.objectId).data = i.data, J = r, j.push(i.data), n && n(j);
1401
+ r.find((a) => a.objectID === i.objectId).data = i.data, J = r, j.push(i.data), n && n(j);
1402
1402
  },
1403
1403
  (i) => {
1404
1404
  s && (s(i), console.log(i));
@@ -1426,7 +1426,7 @@ const re = "FA35FB9B177A280065800EA0000F599C", ce = [
1426
1426
  tag: "testTag"
1427
1427
  };
1428
1428
  function tt(e, t, n = void 0, s = void 0) {
1429
- const { space: i, tenant: r } = e, { objId: o, pred: a, tag: c } = t, d = {
1429
+ const { space: i, tenant: r } = e, { objId: a, pred: o, tag: c } = t, d = {
1430
1430
  uri: "/resources/6w/tags",
1431
1431
  otpCTX: "SecurityContext=preferred",
1432
1432
  optTenant: `tenant=${r}`
@@ -1435,10 +1435,10 @@ function tt(e, t, n = void 0, s = void 0) {
1435
1435
  {
1436
1436
  subject: [
1437
1437
  {
1438
- uri: `pid://${o}`
1438
+ uri: `pid://${a}`
1439
1439
  }
1440
1440
  ],
1441
- predicate: G[a],
1441
+ predicate: G[o],
1442
1442
  object: {
1443
1443
  literal: c
1444
1444
  }
@@ -1458,7 +1458,7 @@ function tt(e, t, n = void 0, s = void 0) {
1458
1458
  setTimeout(() => {
1459
1459
  R(
1460
1460
  e,
1461
- o,
1461
+ a,
1462
1462
  (g) => {
1463
1463
  const h = g.data[0].dataelements.title, y = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", S = g.data[0].relateddata.ownerInfo[0].dataelements.name;
1464
1464
  l.name = h, l.ext = y, l.createBy = S, t.info = { ...l }, ue(
@@ -1490,7 +1490,7 @@ function ue(e, t, n = void 0, s = void 0) {
1490
1490
  const i = t.info.name, r = {
1491
1491
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1492
1492
  uri: "/federated/search"
1493
- }, o = `${r.baseUrl}${r.uri}`, a = {
1493
+ }, a = `${r.baseUrl}${r.uri}`, o = {
1494
1494
  "Content-Type": "application/json",
1495
1495
  Accept: "application/json,text/javascript,*/*"
1496
1496
  }, c = B(), d = {
@@ -1554,9 +1554,9 @@ function ue(e, t, n = void 0, s = void 0) {
1554
1554
  }
1555
1555
  }
1556
1556
  };
1557
- console.log("dataPattern => ", d), m(o, {
1557
+ console.log("dataPattern => ", d), m(a, {
1558
1558
  method: "POST",
1559
- headers: a,
1559
+ headers: o,
1560
1560
  data: JSON.stringify(d),
1561
1561
  onComplete(u) {
1562
1562
  const p = JSON.parse(u);
@@ -1569,11 +1569,11 @@ function ue(e, t, n = void 0, s = void 0) {
1569
1569
  });
1570
1570
  }
1571
1571
  function nt(e, t, n = void 0, s = void 0) {
1572
- const { objId: i, pred: r, tag: o } = t, a = {
1572
+ const { objId: i, pred: r, tag: a } = t, o = {
1573
1573
  uri: "/resources/6w/tags",
1574
1574
  otpCTX: "SecurityContext=preferred",
1575
1575
  optTenant: `tenant=${e.tenant}`
1576
- }, c = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1576
+ }, c = `${e.space}${o.uri}?${o.otpCTX}&${o.optTenant}`, d = {
1577
1577
  tag: [
1578
1578
  {
1579
1579
  subject: [
@@ -1583,7 +1583,7 @@ function nt(e, t, n = void 0, s = void 0) {
1583
1583
  ],
1584
1584
  predicate: G[r],
1585
1585
  object: {
1586
- literal: o
1586
+ literal: a
1587
1587
  }
1588
1588
  }
1589
1589
  ]
@@ -1610,13 +1610,13 @@ function st(e, t = "", n = void 0, s = void 0) {
1610
1610
  return;
1611
1611
  const r = {
1612
1612
  uri: "/resources/v1/modeler/documents"
1613
- }, o = {
1613
+ }, a = {
1614
1614
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1615
1615
  Accept: "application/json,text/javascript,*/*"
1616
- }, 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}`;
1617
- m(a, {
1616
+ }, 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}`;
1617
+ m(o, {
1618
1618
  method: "POST",
1619
- headers: o,
1619
+ headers: a,
1620
1620
  data: c,
1621
1621
  onComplete(d) {
1622
1622
  n && n(JSON.parse(d));
@@ -1630,10 +1630,10 @@ function st(e, t = "", n = void 0, s = void 0) {
1630
1630
  async function w(e, t = void 0, n = void 0) {
1631
1631
  const s = e._3DSwym + "/api/index/tk";
1632
1632
  return m(s, {
1633
- onComplete(i, r, o) {
1634
- const a = JSON.parse(i);
1633
+ onComplete(i, r, a) {
1634
+ const o = JSON.parse(i);
1635
1635
  if (t)
1636
- return t(a), e.token = a?.result?.ServerToken;
1636
+ return t(o), e.token = o?.result?.ServerToken;
1637
1637
  },
1638
1638
  onFailure(i) {
1639
1639
  n && n(i);
@@ -1661,11 +1661,11 @@ function it(e, t = void 0, n = void 0) {
1661
1661
  },
1662
1662
  data: JSON.stringify(i),
1663
1663
  type: "json",
1664
- onComplete(o, a) {
1665
- t && t(o, a);
1664
+ onComplete(a, o) {
1665
+ t && t(a, o);
1666
1666
  },
1667
- onFailure(o, a) {
1668
- n && n(o, a);
1667
+ onFailure(a, o) {
1668
+ n && n(a, o);
1669
1669
  }
1670
1670
  });
1671
1671
  });
@@ -1690,12 +1690,12 @@ function at(e, t = void 0, n = void 0) {
1690
1690
  },
1691
1691
  data: JSON.stringify(i),
1692
1692
  type: "json",
1693
- onComplete(o, a) {
1694
- const c = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1695
- t && t(c, o);
1693
+ onComplete(a, o) {
1694
+ const c = a.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1695
+ t && t(c, a);
1696
1696
  },
1697
- onFailure(o, a) {
1698
- n && n(o, a);
1697
+ onFailure(a, o) {
1698
+ n && n(a, o);
1699
1699
  }
1700
1700
  });
1701
1701
  });
@@ -1707,14 +1707,14 @@ function ot(e, t = void 0, n = void 0) {
1707
1707
  limit: `/limit/${e.limit ? e.limit : 500}`,
1708
1708
  page: `/page/${e.page ? e.page : "1"}`
1709
1709
  }, i = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1710
- w(e, (o) => {
1710
+ w(e, (a) => {
1711
1711
  m(i, {
1712
1712
  method: "GET",
1713
1713
  headers: {
1714
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1714
+ "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1715
1715
  },
1716
- onComplete(a, c, d) {
1717
- const p = JSON.parse(a).result;
1716
+ onComplete(o, c, d) {
1717
+ const p = JSON.parse(o).result;
1718
1718
  let f = 0;
1719
1719
  p.forEach((l) => {
1720
1720
  const g = {
@@ -1735,8 +1735,8 @@ function ot(e, t = void 0, n = void 0) {
1735
1735
  );
1736
1736
  });
1737
1737
  },
1738
- onFailure(a, c) {
1739
- const d = a;
1738
+ onFailure(o, c) {
1739
+ const d = o;
1740
1740
  d.status = c.status, d.response = c.errormsg, n && n(d);
1741
1741
  }
1742
1742
  });
@@ -1750,21 +1750,21 @@ function pe(e, t, n, s) {
1750
1750
  community_id: t
1751
1751
  }
1752
1752
  };
1753
- w(e, (o) => {
1753
+ w(e, (a) => {
1754
1754
  m(i, {
1755
1755
  method: "POST",
1756
1756
  headers: {
1757
1757
  "Content-type": "application/json;charset=UTF-8",
1758
1758
  Accept: "application/json",
1759
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1759
+ "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1760
1760
  },
1761
1761
  data: JSON.stringify(r),
1762
1762
  type: "json",
1763
- onComplete(a, c, d) {
1764
- n && n(a);
1763
+ onComplete(o, c, d) {
1764
+ n && n(o);
1765
1765
  },
1766
- onFailure(a, c) {
1767
- const d = a;
1766
+ onFailure(o, c) {
1767
+ const d = o;
1768
1768
  d.status = c.status, d.response = c.errormsg, s && s(d);
1769
1769
  }
1770
1770
  });
@@ -1782,21 +1782,21 @@ function rt(e, t = void 0, n = void 0) {
1782
1782
  Accept: "application/json",
1783
1783
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1784
1784
  },
1785
- onComplete(o) {
1786
- const a = JSON.parse(o);
1787
- t && t(a);
1785
+ onComplete(a) {
1786
+ const o = JSON.parse(a);
1787
+ t && t(o);
1788
1788
  },
1789
- onFailure(o, a) {
1790
- const c = o;
1791
- c.status = a.status, c.response = a.errormsg, n && n(c);
1789
+ onFailure(a, o) {
1790
+ const c = a;
1791
+ c.status = o.status, c.response = o.errormsg, n && n(c);
1792
1792
  }
1793
1793
  });
1794
1794
  });
1795
1795
  }
1796
1796
  function ct(e, t, n = void 0, s = void 0) {
1797
- const { listAllContacts: i, currentUser: r, _3DSwym: o } = e;
1797
+ const { listAllContacts: i, currentUser: r, _3DSwym: a } = e;
1798
1798
  console.log("__listAllContacts", i.hits);
1799
- const a = `${o}/api/directmessages`, c = {
1799
+ const o = `${a}/api/directmessages`, c = {
1800
1800
  users: [r.login].concat(t.receipt)
1801
1801
  }, d = {
1802
1802
  id_msg: "",
@@ -1815,7 +1815,7 @@ function ct(e, t, n = void 0, s = void 0) {
1815
1815
  }
1816
1816
  ), u === !1 && setTimeout(() => {
1817
1817
  u === !1 && w(e, (p) => {
1818
- m(a, {
1818
+ m(o, {
1819
1819
  method: "POST",
1820
1820
  headers: {
1821
1821
  "Content-Type": "application/json",
@@ -1845,9 +1845,9 @@ function le(e, t, n, s) {
1845
1845
  Accept: "application/json,text/javascript,*/*",
1846
1846
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1847
1847
  },
1848
- onComplete(o) {
1849
- const a = JSON.parse(o), c = [];
1850
- a.result.forEach((p) => {
1848
+ onComplete(a) {
1849
+ const o = JSON.parse(a), c = [];
1850
+ o.result.forEach((p) => {
1851
1851
  p.users = p.users.sort((f, l) => f.login.localeCompare(l.login)), p.users.length === t.length && c.push(p);
1852
1852
  });
1853
1853
  const d = t.sort(), u = c.find((p) => {
@@ -1858,9 +1858,9 @@ function le(e, t, n, s) {
1858
1858
  });
1859
1859
  n && u !== void 0 ? n(u) : (s || u === void 0) && s(u);
1860
1860
  },
1861
- onFailure(o) {
1862
- const a = o;
1863
- a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
1861
+ onFailure(a) {
1862
+ const o = a;
1863
+ o.msg = headers.errormsg, o.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", o), s && s(o);
1864
1864
  }
1865
1865
  });
1866
1866
  });
@@ -1871,7 +1871,7 @@ function x(e, t, n = void 0, s = void 0) {
1871
1871
  uri: "/api/community",
1872
1872
  id_msg: `${t.id_msg}`,
1873
1873
  endUri: "/instantmessages"
1874
- }, r = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
1874
+ }, r = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, a = {
1875
1875
  author: { login: t.senderId, displayName: t.senderName },
1876
1876
  accessState: null,
1877
1877
  commentUri: null,
@@ -1881,15 +1881,15 @@ function x(e, t, n = void 0, s = void 0) {
1881
1881
  parentCommentUri: null,
1882
1882
  richMessage: t.msg
1883
1883
  };
1884
- console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (a) => {
1884
+ console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (o) => {
1885
1885
  m(r, {
1886
1886
  method: "POST",
1887
1887
  headers: {
1888
1888
  "Content-Type": "application/json",
1889
1889
  Accept: "application/json",
1890
- "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1890
+ "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1891
1891
  },
1892
- data: JSON.stringify(o),
1892
+ data: JSON.stringify(a),
1893
1893
  type: "json",
1894
1894
  onComplete(c, d, u) {
1895
1895
  const p = c;
@@ -1912,13 +1912,13 @@ function fe(e) {
1912
1912
  function dt(e, t, n = void 0, s = void 0) {
1913
1913
  const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1914
1914
  (c) => c.id === t.community_id
1915
- ), o = e.swymCommunities.find(
1915
+ ), a = e.swymCommunities.find(
1916
1916
  (c) => c.title.toLowerCase() === t.community_title.toLowerCase()
1917
- ), a = {
1917
+ ), o = {
1918
1918
  params: {
1919
1919
  title: t.title,
1920
1920
  // String, le nom de l'affaire
1921
- community_id: r?.id !== void 0 ? r.id : o.id,
1921
+ community_id: r?.id !== void 0 ? r.id : a.id,
1922
1922
  // String, l'id de la communauté
1923
1923
  message: me(t.text_html),
1924
1924
  // STRING => le contenue du message doit être au format HTML
@@ -1935,7 +1935,7 @@ function dt(e, t, n = void 0, s = void 0) {
1935
1935
  m(i, {
1936
1936
  method: "POST",
1937
1937
  headers: d,
1938
- data: JSON.stringify(a),
1938
+ data: JSON.stringify(o),
1939
1939
  type: "json",
1940
1940
  onComplete(u, p, f) {
1941
1941
  const l = JSON.parse(u);
@@ -1951,29 +1951,29 @@ function dt(e, t, n = void 0, s = void 0) {
1951
1951
  function ut(e, t = void 0, n = void 0) {
1952
1952
  const s = { base: e.space, uri: "/api/idea/add" };
1953
1953
  if (!Array.isArray(e.swymCommunities)) {
1954
- const o = "☠️ swymCommunities doit être un tableau d'objets de communautés";
1954
+ const a = "☠️ swymCommunities doit être un tableau d'objets de communautés";
1955
1955
  throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
1956
- cause: o
1956
+ cause: a
1957
1957
  });
1958
1958
  }
1959
1959
  if (e.swymCommunities.findIndex(
1960
- (o) => o.id === e.community_id
1960
+ (a) => a.id === e.community_id
1961
1961
  ) === -1) {
1962
- const o = "la communauté n'existe pas dans la liste des communautés du Swym";
1962
+ const a = "la communauté n'existe pas dans la liste des communautés du Swym";
1963
1963
  throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
1964
- cause: o
1964
+ cause: a
1965
1965
  });
1966
1966
  }
1967
1967
  if (e.community_id && e.community_id === "") {
1968
- const o = "☠️ community_id doit être un String qui contient l'id de la communauté dans laquelle on souhaite publier l'idée.";
1968
+ const a = "☠️ community_id doit être un String qui contient l'id de la communauté dans laquelle on souhaite publier l'idée.";
1969
1969
  throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
1970
- cause: o
1970
+ cause: a
1971
1971
  });
1972
1972
  }
1973
1973
  if (e.title && e.title === "") {
1974
- const o = "☠️ title doit être un String.";
1974
+ const a = "☠️ title doit être un String.";
1975
1975
  throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
1976
- cause: o
1976
+ cause: a
1977
1977
  });
1978
1978
  }
1979
1979
  const r = {
@@ -1988,19 +1988,19 @@ function ut(e, t = void 0, n = void 0) {
1988
1988
  // 1 publier, 0 brouillon
1989
1989
  }
1990
1990
  };
1991
- w(e, (o) => {
1992
- if (!o)
1991
+ w(e, (a) => {
1992
+ if (!a)
1993
1993
  throw new Error(
1994
1994
  `☠️ token n'est pas disponible pour cette requête : ${s.base + s.uri}`,
1995
1995
  {
1996
- cause: o
1996
+ cause: a
1997
1997
  }
1998
1998
  );
1999
- const a = {
1999
+ const o = {
2000
2000
  headers: {
2001
2001
  "Content-type": "application/json;charset=UTF-8",
2002
2002
  Accept: "application/json",
2003
- "X-DS-SWYM-CSRFTOKEN": o?.result?.ServerToken
2003
+ "X-DS-SWYM-CSRFTOKEN": a?.result?.ServerToken
2004
2004
  },
2005
2005
  method: "POST",
2006
2006
  data: JSON.stringify(r),
@@ -2018,7 +2018,7 @@ function ut(e, t = void 0, n = void 0) {
2018
2018
  n && n(l);
2019
2019
  }
2020
2020
  };
2021
- m(s.base + s.uri, a);
2021
+ m(s.base + s.uri, o);
2022
2022
  });
2023
2023
  }
2024
2024
  function pt(e, t, n = void 0, s = void 0) {
@@ -2028,21 +2028,21 @@ function pt(e, t, n = void 0, s = void 0) {
2028
2028
  ideationIds: [t.idee_id]
2029
2029
  }
2030
2030
  };
2031
- w(e, (o) => {
2031
+ w(e, (a) => {
2032
2032
  m(i, {
2033
2033
  method: "POST",
2034
2034
  headers: {
2035
2035
  "Content-type": "application/json;charset=UTF-8",
2036
2036
  Accept: "application/json",
2037
- "X-DS-SWYM-CSRFTOKEN": o?.result?.ServerToken
2037
+ "X-DS-SWYM-CSRFTOKEN": a?.result?.ServerToken
2038
2038
  },
2039
2039
  data: JSON.stringify(r),
2040
2040
  type: "json",
2041
- onComplete(a, c, d) {
2042
- n && n(a);
2041
+ onComplete(o, c, d) {
2042
+ n && n(o);
2043
2043
  },
2044
- onFailure(a, c, d) {
2045
- const u = a;
2044
+ onFailure(o, c, d) {
2045
+ const u = o;
2046
2046
  u.status = c.status, u.response = c.errormsg, s && s(u);
2047
2047
  }
2048
2048
  });
@@ -2059,23 +2059,21 @@ function lt(e, t = void 0, n = void 0) {
2059
2059
  id: e.idPost
2060
2060
  }
2061
2061
  };
2062
- w(e, (r) => {
2063
- m(s, {
2064
- method: "POST",
2065
- headers: {
2066
- "Content-type": "application/json;charset=UTF-8",
2067
- Accept: "application/json",
2068
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
2069
- },
2070
- data: JSON.stringify(i),
2071
- onComplete(o) {
2072
- t && t({ response: o });
2073
- },
2074
- onFailure(o) {
2075
- const a = o;
2076
- a.status = headers.status, a.response = headers.errormsg, n && n(a);
2077
- }
2078
- });
2062
+ m(s, {
2063
+ method: "POST",
2064
+ headers: {
2065
+ "Content-type": "application/json;charset=UTF-8",
2066
+ Accept: "application/json",
2067
+ "X-DS-SWYM-CSRFTOKEN": e._3DSwym_token
2068
+ },
2069
+ data: JSON.stringify(i),
2070
+ onComplete(r) {
2071
+ t && t({ response: r });
2072
+ },
2073
+ onFailure(r) {
2074
+ const a = r;
2075
+ a.status = headers.status, a.response = headers.errormsg, n && n(a);
2076
+ }
2079
2077
  });
2080
2078
  }
2081
2079
  function ft(e, t, n) {
@@ -2095,37 +2093,37 @@ function ft(e, t, n) {
2095
2093
  }
2096
2094
  };
2097
2095
  console.log("body", i), w((r) => {
2098
- const o = {
2096
+ const a = {
2099
2097
  method: "POST",
2100
2098
  headers: {
2101
2099
  "X-DS-SWYM-CSRFTOKEN": r?.result?.ServerToken,
2102
2100
  "Content-type": "application/json;charset=UTF-8"
2103
2101
  },
2104
2102
  data: JSON.stringify(i),
2105
- onComplete(a, c, d) {
2103
+ onComplete(o, c, d) {
2106
2104
  const u = {
2107
- response: typeof a == "string" ? JSON.parse(a) : a
2105
+ response: typeof o == "string" ? JSON.parse(o) : o
2108
2106
  };
2109
2107
  u.status = d.status, t && t(u);
2110
2108
  },
2111
- onFailure(a) {
2112
- n && n(a);
2109
+ onFailure(o) {
2110
+ n && n(o);
2113
2111
  }
2114
2112
  };
2115
- m(s.base + s.uri, o);
2113
+ m(s.base + s.uri, a);
2116
2114
  });
2117
2115
  }
2118
2116
  function mt(e, t, n = void 0, s = void 0) {
2119
2117
  const { _3DSwym: i } = e;
2120
- let { community_id: r, limit: o, page: a, search: c } = t;
2118
+ let { community_id: r, limit: a, page: o, search: c } = t;
2121
2119
  const d = [], u = 1;
2122
2120
  let p = !1, f = 2;
2123
- a || (a = u), o || (o = 100);
2121
+ o || (o = u), a || (a = 100);
2124
2122
  const l = {
2125
2123
  uri: "/api/idea/list",
2126
2124
  comId: `/community_id/${r}`,
2127
- limit: `/limit/${o}`,
2128
- page: `/page/${a}`
2125
+ limit: `/limit/${a}`,
2126
+ page: `/page/${o}`
2129
2127
  };
2130
2128
  let g = `${i}${l.uri}${l.comId}${l.limit}${l.page}`;
2131
2129
  w(e, (h) => {
@@ -2137,8 +2135,8 @@ function mt(e, t, n = void 0, s = void 0) {
2137
2135
  },
2138
2136
  onComplete(_) {
2139
2137
  const C = { response: JSON.parse(_) };
2140
- if (f = Math.ceil(Number(C.response.nb_result) / 100), _ && f >= a) {
2141
- if (a++, l.page = `/page/${a}`, S = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
2138
+ if (f = Math.ceil(Number(C.response.nb_result) / 100), _ && f >= o) {
2139
+ if (o++, l.page = `/page/${o}`, S = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
2142
2140
  d.push(C.response.result);
2143
2141
  else {
2144
2142
  const T = C.response.result.find(
@@ -2149,7 +2147,7 @@ function mt(e, t, n = void 0, s = void 0) {
2149
2147
  return;
2150
2148
  }
2151
2149
  }
2152
- if (n && f < a && !c) {
2150
+ if (n && f < o && !c) {
2153
2151
  p = !0, n(d);
2154
2152
  return;
2155
2153
  }
@@ -2241,8 +2239,8 @@ function me(e) {
2241
2239
  </p>` : e;
2242
2240
  }
2243
2241
  function gt(e, t = void 0, n = void 0) {
2244
- const { tenant: s, _3DSwym: i, _3DSwym_token: r, community_id: o, idea_id: a } = e;
2245
- if (s && i && r && o && a) {
2242
+ const { tenant: s, _3DSwym: i, _3DSwym_token: r, community_id: a, idea_id: o } = e;
2243
+ if (s && i && r && a && o) {
2246
2244
  const c = `${i}/api/idea/forward`;
2247
2245
  m(c, {
2248
2246
  method: "POST",
@@ -2252,8 +2250,8 @@ function gt(e, t = void 0, n = void 0) {
2252
2250
  "X-DS-SWYM-CSRFTOKEN": r
2253
2251
  },
2254
2252
  data: JSON.stringify({
2255
- community_uri: `swym:prd:${s.toUpperCase()}:community:${o}`,
2256
- content_uri: `swym:prd:${s.toUpperCase()}:idea:${a}`,
2253
+ community_uri: `swym:prd:${s.toUpperCase()}:community:${a}`,
2254
+ content_uri: `swym:prd:${s.toUpperCase()}:idea:${o}`,
2257
2255
  timeout: 3e4
2258
2256
  }),
2259
2257
  type: "json",
@@ -2276,12 +2274,12 @@ function ht(e, t = void 0, n = void 0) {
2276
2274
  headers: {
2277
2275
  "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
2278
2276
  },
2279
- onComplete(r, o, a) {
2277
+ onComplete(r, a, o) {
2280
2278
  const c = JSON.parse(r);
2281
2279
  t && t(c.result);
2282
2280
  },
2283
- onFailure(r, o, a) {
2284
- const c = { erreur: JSON.parse(r), headers: o, xhr: a };
2281
+ onFailure(r, a, o) {
2282
+ const c = { erreur: JSON.parse(r), headers: a, xhr: o };
2285
2283
  n && n(c);
2286
2284
  }
2287
2285
  });
@@ -2295,12 +2293,12 @@ function yt(e, t, n = void 0, s = void 0) {
2295
2293
  m(i, {
2296
2294
  method: "GET",
2297
2295
  headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
2298
- onComplete(o, a, c) {
2299
- const d = JSON.parse(o);
2296
+ onComplete(a, o, c) {
2297
+ const d = JSON.parse(a);
2300
2298
  n && n(d);
2301
2299
  },
2302
- onFailure(o) {
2303
- s && s(o);
2300
+ onFailure(a) {
2301
+ s && s(a);
2304
2302
  }
2305
2303
  });
2306
2304
  },
@@ -2315,18 +2313,18 @@ function St(e, t = void 0, n = void 0) {
2315
2313
  }
2316
2314
  function _t(e, t = void 0, n = void 0) {
2317
2315
  e.tenant && b(e, (s) => {
2318
- const i = s.services.find((a) => a.id === "3dpassport")?.url, r = s.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${r}/auth/cas`;
2319
- m(o, {
2320
- async onComplete(a) {
2321
- const c = typeof a == "string" ? JSON.parse(a)?.x3ds_service_redirect_url : a?.x3ds_service_redirect_url;
2316
+ const i = s.services.find((o) => o.id === "3dpassport")?.url, r = s.services.find((o) => o.id === "businessprocess")?.url + "/api/v2", a = `${i}/login/?service=${r}/auth/cas`;
2317
+ m(a, {
2318
+ async onComplete(o) {
2319
+ const c = typeof o == "string" ? JSON.parse(o)?.x3ds_service_redirect_url : o?.x3ds_service_redirect_url;
2322
2320
  await fetch(c, {
2323
2321
  method: "POST"
2324
2322
  }).then((d) => d.json()).then(async (d) => {
2325
2323
  t && t(d?.token);
2326
2324
  });
2327
2325
  },
2328
- onFailure(a) {
2329
- n && n(a);
2326
+ onFailure(o) {
2327
+ n && n(o);
2330
2328
  }
2331
2329
  });
2332
2330
  });
@@ -2345,8 +2343,8 @@ function wt(e, t = void 0, n = void 0) {
2345
2343
  }
2346
2344
  async function Ct(e, t, n = void 0, s = void 0) {
2347
2345
  e.tenant && b(e, (i) => {
2348
- const o = `${i.services.find((c) => c.id === "businessprocess")?.url + "/api/v2"}/identity/users`, a = e.tenant.toLowerCase();
2349
- fetch(`https://api.uixhome.fr/${a}/iterop/listusers?t=${t}&s=${o}`, {
2346
+ const a = `${i.services.find((c) => c.id === "businessprocess")?.url + "/api/v2"}/identity/users`, o = e.tenant.toLowerCase();
2347
+ fetch(`https://api.uixhome.fr/${o}/iterop/listusers?t=${t}&s=${a}`, {
2350
2348
  method: "POST"
2351
2349
  }).then((c) => c.json()).then((c) => {
2352
2350
  n && n(c);
@@ -2357,8 +2355,8 @@ async function Ct(e, t, n = void 0, s = void 0) {
2357
2355
  }
2358
2356
  async function Tt(e, t, n = void 0, s = void 0) {
2359
2357
  e.tenant && b(e, (i) => {
2360
- const o = `${i.services.find((c) => c.id === "businessprocess")?.url + "/api/v2"}/repository/data/tables`, a = e.tenant.toLowerCase();
2361
- fetch(`https://api.uixhome.fr/${a}/iterop/repository/data/tables?t=${t}&s=${o}`, {
2358
+ const a = `${i.services.find((c) => c.id === "businessprocess")?.url + "/api/v2"}/repository/data/tables`, o = e.tenant.toLowerCase();
2359
+ fetch(`https://api.uixhome.fr/${o}/iterop/repository/data/tables?t=${t}&s=${a}`, {
2362
2360
  method: "GET"
2363
2361
  }).then((c) => c.json()).then((c) => {
2364
2362
  n && n(c);
@@ -2372,10 +2370,10 @@ async function bt(e, t, n, s = void 0, i = void 0) {
2372
2370
  const r = e.tenant.toLowerCase();
2373
2371
  fetch(`https://api.uixhome.fr/${r}/iterop/businesstable/${n}?t=${t}`, {
2374
2372
  method: "POST"
2375
- }).then((o) => o.json()).then((o) => {
2376
- s && s(o);
2377
- }).catch((o) => {
2378
- i && i(o);
2373
+ }).then((a) => a.json()).then((a) => {
2374
+ s && s(a);
2375
+ }).catch((a) => {
2376
+ i && i(a);
2379
2377
  });
2380
2378
  }
2381
2379
  }
@@ -2384,18 +2382,18 @@ async function Ot(e, t, n, s = void 0, i = void 0) {
2384
2382
  const r = e.tenant.toLowerCase();
2385
2383
  fetch(`https://api.uixhome.fr/${r}/iterop/businesstable/rows/${n}/?t=${t}`, {
2386
2384
  method: "POST"
2387
- }).then((o) => o.json()).then((o) => {
2388
- s && s(o);
2389
- }).catch((o) => {
2390
- i && i(o);
2385
+ }).then((a) => a.json()).then((a) => {
2386
+ s && s(a);
2387
+ }).catch((a) => {
2388
+ i && i(a);
2391
2389
  });
2392
2390
  }
2393
2391
  }
2394
2392
  async function $t(e, t, n, s, i = void 0, r = void 0) {
2395
- e.tenant && b(e, (o) => {
2396
- o.services.find((c) => c.id === "businessprocess")?.url + "";
2397
- const a = e.tenant.toLowerCase();
2398
- fetch(`https://api.uixhome.fr/${a}/iterop/businesstable/patch/rows/${n}/?t=${t}&b=${s}`, {
2393
+ e.tenant && b(e, (a) => {
2394
+ a.services.find((c) => c.id === "businessprocess")?.url + "";
2395
+ const o = e.tenant.toLowerCase();
2396
+ fetch(`https://api.uixhome.fr/${o}/iterop/businesstable/patch/rows/${n}/?t=${t}&b=${s}`, {
2399
2397
  method: "POST"
2400
2398
  }).then((c) => c.json()).then((c) => {
2401
2399
  i && i(c);
@@ -2404,17 +2402,17 @@ async function $t(e, t, n, s, i = void 0, r = void 0) {
2404
2402
  });
2405
2403
  });
2406
2404
  }
2407
- async function It(e, t, n, s, i, r = void 0, o = void 0) {
2405
+ async function It(e, t, n, s, i, r = void 0, a = void 0) {
2408
2406
  if (e.tenant) {
2409
- const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${n}?t=${t}&c=${encodeURIComponent(
2407
+ const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${n}?t=${t}&c=${encodeURIComponent(
2410
2408
  s
2411
2409
  )}&b=${encodeURIComponent(i)}`;
2412
- fetch(a, {
2410
+ fetch(o, {
2413
2411
  method: "POST"
2414
2412
  }).then((c) => c.json()).then((c) => {
2415
- c.url = a, r && r(c);
2413
+ c.url = o, r && r(c);
2416
2414
  }).catch((c) => {
2417
- o && o({
2415
+ a && a({
2418
2416
  error: c,
2419
2417
  tableId: n,
2420
2418
  columns: s,
@@ -2425,27 +2423,27 @@ async function It(e, t, n, s, i, r = void 0, o = void 0) {
2425
2423
  }
2426
2424
  async function Nt(e, t, n, s, i = void 0, r = void 0) {
2427
2425
  if (e.tenant) {
2428
- const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${n}?t=${t}&b=${encodeURIComponent(
2426
+ const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${n}?t=${t}&b=${encodeURIComponent(
2429
2427
  s
2430
2428
  )}`;
2431
- fetch(o, {
2429
+ fetch(a, {
2432
2430
  method: "POST"
2433
- }).then((a) => a.json()).then((a) => {
2434
- i && i(a);
2435
- }).catch((a) => {
2431
+ }).then((o) => o.json()).then((o) => {
2432
+ i && i(o);
2433
+ }).catch((o) => {
2436
2434
  r && r({
2437
- error: a,
2438
- url: o
2435
+ error: o,
2436
+ url: a
2439
2437
  });
2440
2438
  });
2441
2439
  }
2442
2440
  }
2443
2441
  async function vt(e, t, n, s, i = void 0, r = void 0) {
2444
- e.tenant && b(e, (o) => {
2445
- o.services.find((c) => c.id === "businessprocess")?.url + "";
2446
- const a = e.tenant.toLowerCase();
2442
+ e.tenant && b(e, (a) => {
2443
+ a.services.find((c) => c.id === "businessprocess")?.url + "";
2444
+ const o = e.tenant.toLowerCase();
2447
2445
  fetch(
2448
- `https://api.uixhome.fr/${a}/iterop/runtime/processes/${n}?t=${t}&b=${s}`,
2446
+ `https://api.uixhome.fr/${o}/iterop/runtime/processes/${n}?t=${t}&b=${s}`,
2449
2447
  {
2450
2448
  method: "POST"
2451
2449
  }
@@ -2458,23 +2456,23 @@ async function vt(e, t, n, s, i = void 0, r = void 0) {
2458
2456
  }
2459
2457
  async function Ft(e, t, n, s = void 0, i = void 0) {
2460
2458
  e.tenant && b(e, (r) => {
2461
- r.services.find((a) => a.id === "businessprocess")?.url + "";
2462
- const o = e.tenant.toLowerCase();
2459
+ r.services.find((o) => o.id === "businessprocess")?.url + "";
2460
+ const a = e.tenant.toLowerCase();
2463
2461
  fetch(
2464
- `https://api.uixhome.fr/${o}/iterop/dependencytable/one/${n}/?t=${t}`,
2462
+ `https://api.uixhome.fr/${a}/iterop/dependencytable/one/${n}/?t=${t}`,
2465
2463
  {
2466
2464
  method: "POST"
2467
2465
  }
2468
- ).then((a) => a.json()).then((a) => {
2469
- s && s(a);
2470
- }).catch((a) => {
2471
- i && i(a);
2466
+ ).then((o) => o.json()).then((o) => {
2467
+ s && s(o);
2468
+ }).catch((o) => {
2469
+ i && i(o);
2472
2470
  });
2473
2471
  });
2474
2472
  }
2475
- async function kt(e, t, n, s, i, r = void 0, o = void 0) {
2476
- e.tenant && b(e, (a) => {
2477
- a.services.find((d) => d.id === "businessprocess")?.url + "";
2473
+ async function kt(e, t, n, s, i, r = void 0, a = void 0) {
2474
+ e.tenant && b(e, (o) => {
2475
+ o.services.find((d) => d.id === "businessprocess")?.url + "";
2478
2476
  const c = e.tenant.toLowerCase();
2479
2477
  fetch(
2480
2478
  `https://api.uixhome.fr/${c}/iterop/dependencytable/patch/${n}/?t=${t}&cli=${s}&b=${i}`,
@@ -2484,16 +2482,16 @@ async function kt(e, t, n, s, i, r = void 0, o = void 0) {
2484
2482
  ).then((d) => d.json()).then((d) => {
2485
2483
  r && r(d);
2486
2484
  }).catch((d) => {
2487
- o && o(d);
2485
+ a && a(d);
2488
2486
  });
2489
2487
  });
2490
2488
  }
2491
2489
  async function At(e, t, n, s, i = void 0, r = void 0) {
2492
- e.tenant && b(e, (o) => {
2493
- o.services.find((c) => c.id === "businessprocess")?.url + "";
2494
- const a = e.tenant.toLowerCase();
2490
+ e.tenant && b(e, (a) => {
2491
+ a.services.find((c) => c.id === "businessprocess")?.url + "";
2492
+ const o = e.tenant.toLowerCase();
2495
2493
  fetch(
2496
- `https://api.uixhome.fr/${a}/iterop/dependencytable/put/${n}/?t=${t}&b=${s}`,
2494
+ `https://api.uixhome.fr/${o}/iterop/dependencytable/put/${n}/?t=${t}&b=${s}`,
2497
2495
  {
2498
2496
  method: "POST"
2499
2497
  }
@@ -2513,10 +2511,10 @@ async function Ut(e, t, n, s = void 0, i = void 0) {
2513
2511
  {
2514
2512
  method: "POST"
2515
2513
  }
2516
- ).then((o) => o.json()).then((o) => {
2517
- s && s(o);
2518
- }).catch((o) => {
2519
- i && i(o);
2514
+ ).then((a) => a.json()).then((a) => {
2515
+ s && s(a);
2516
+ }).catch((a) => {
2517
+ i && i(a);
2520
2518
  });
2521
2519
  }
2522
2520
  }
@@ -2528,27 +2526,27 @@ function jt(e) {
2528
2526
  function xt(e, t = void 0, n = void 0) {
2529
2527
  return console.log("credentials", e), new Promise((s) => {
2530
2528
  if (e.token === "" && O(e), !e.space || e.space === "") {
2531
- const o = q();
2532
- console.log("platformeInfo", o);
2529
+ const a = q();
2530
+ console.log("platformeInfo", a);
2533
2531
  }
2534
2532
  k(
2535
2533
  e,
2536
2534
  "Common space",
2537
2535
  ["VPLMProjectLeader", "VPLMCreator"],
2538
2536
  void 0,
2539
- (o) => e.ctx = o,
2540
- (o) => {
2541
- console.log("onError =>", o);
2537
+ (a) => e.ctx = a,
2538
+ (a) => {
2539
+ console.log("onError =>", a);
2542
2540
  },
2543
2541
  !0
2544
2542
  );
2545
2543
  const i = $.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
2546
2544
  m(r, {
2547
- onComplete(o) {
2548
- if (Array.isArray(JSON.parse(o))) {
2549
- const a = JSON.parse(o);
2550
- console.log("serviceId=3dsearch", a);
2551
- const c = `${a[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
2545
+ onComplete(a) {
2546
+ if (Array.isArray(JSON.parse(a))) {
2547
+ const o = JSON.parse(a);
2548
+ console.log("serviceId=3dsearch", o);
2549
+ const c = `${o[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
2552
2550
  m(c, {
2553
2551
  method: "POST",
2554
2552
  headers: {
@@ -2598,8 +2596,8 @@ function xt(e, t = void 0, n = void 0) {
2598
2596
  });
2599
2597
  }
2600
2598
  },
2601
- onFailure(o) {
2602
- n && n(o);
2599
+ onFailure(a) {
2600
+ n && n(a);
2603
2601
  }
2604
2602
  });
2605
2603
  });