@beam3_dev/api_module 0.0.48 → 0.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/wb3Api.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { v4 as M } from "uuid";
2
2
  import { DateTime as b } from "luxon";
3
- import { requirejs as O, widget as j } from "@widget-lab/3ddashboard-utils";
4
- function A() {
3
+ import { requirejs as O, widget as A } from "@widget-lab/3ddashboard-utils";
4
+ function R() {
5
5
  return M();
6
6
  }
7
7
  const L = {
@@ -67,9 +67,9 @@ async function re(e, t = void 0, n = void 0) {
67
67
  }
68
68
  async function ce(e, t = L) {
69
69
  let n = b.now().year;
70
- const s = e, i = [], c = (a) => {
71
- for (let r in a)
72
- i.push({ date: r, comment: a[r] });
70
+ const s = e, i = [], r = (a) => {
71
+ for (let c in a)
72
+ i.push({ date: c, comment: a[c] });
73
73
  };
74
74
  for (let a = n; a <= n + 1; a++)
75
75
  await fetch(
@@ -80,20 +80,20 @@ async function ce(e, t = L) {
80
80
  Accept: "application/json"
81
81
  }
82
82
  }
83
- ).then((r) => r.json()).then((r) => {
84
- c(r);
85
- }).catch((r) => console.error("Erreur : " + r));
83
+ ).then((c) => c.json()).then((c) => {
84
+ r(c);
85
+ }).catch((c) => console.error("Erreur : " + c));
86
86
  return (() => {
87
87
  const a = s.length === 0 ? {
88
88
  events: []
89
89
  } : s;
90
- for (let r of i)
90
+ for (let c of i)
91
91
  a.events.findIndex(
92
- (l) => l.start === b.fromISO(r.date).toISODate() && l.name === "Férié : " + r.comment
92
+ (l) => l.start === b.fromISO(c.date).toISODate() && l.name === "Férié : " + c.comment
93
93
  ) === -1 && a.events.push({
94
- name: "Férié : " + r.comment,
95
- start: b.fromISO(r.date).toISODate(),
96
- end: b.fromISO(r.date).toISODate(),
94
+ name: "Férié : " + c.comment,
95
+ start: b.fromISO(c.date).toISODate(),
96
+ end: b.fromISO(c.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
@@ -102,7 +102,7 @@ async function ce(e, t = L) {
102
102
  }
103
103
  async function de(e, t, n = !0) {
104
104
  const s = e.events.findIndex((i) => i.uuid === t.uuid);
105
- return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((i, c) => i.start - c.start), e;
105
+ return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
106
106
  }
107
107
  function f(e, t) {
108
108
  O(["DS/WAFData/WAFData"], (n) => {
@@ -118,7 +118,7 @@ function pe(e, t = void 0) {
118
118
  O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
119
119
  let s;
120
120
  s === void 0 && (s = n.createProxy({
121
- widgetId: j.id,
121
+ widgetId: A.id,
122
122
  filteringMode: "WithFilteringServices"
123
123
  }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
124
124
  });
@@ -132,7 +132,7 @@ async function fe(e, t = void 0, n = void 0) {
132
132
  O(
133
133
  ["DS/i3DXCompassServices/i3DXCompassServices"],
134
134
  (s) => {
135
- (!e || e === "") && (e = j.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
135
+ (!e || e === "") && (e = A.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
136
136
  s.getPlatformServices({
137
137
  platformId: e,
138
138
  onComplete: t,
@@ -145,14 +145,14 @@ async function fe(e, t = void 0, n = void 0) {
145
145
  function me() {
146
146
  let e = {};
147
147
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
148
- const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
148
+ const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
149
149
  "com.3ds.wp.passport.cors"
150
150
  );
151
151
  e = {
152
152
  tenant: n,
153
153
  user: s,
154
154
  appsConfiguration: i,
155
- appConf: c
155
+ appConf: r
156
156
  };
157
157
  }), console.log("%cRETOUR API :", "color:blue", e), e;
158
158
  }
@@ -169,15 +169,15 @@ function ge(e, t, n) {
169
169
  "Content-Type": "application/json",
170
170
  Accept: "application/json"
171
171
  },
172
- onComplete(c, o, a) {
173
- const r = JSON.parse(c), d = r.data.map((l) => {
172
+ onComplete(r, o, a) {
173
+ const c = JSON.parse(r), d = c.data.map((l) => {
174
174
  const p = l.attributes.name, u = l.id;
175
175
  return { name: p, id: u };
176
176
  });
177
- t && t(d, r);
177
+ t && t(d, c);
178
178
  },
179
- onFailure(c, o) {
180
- const a = c;
179
+ onFailure(r, o) {
180
+ const a = r;
181
181
  a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
182
182
  }
183
183
  });
@@ -185,42 +185,42 @@ function ge(e, t, n) {
185
185
  function he(e, t = void 0, n = void 0) {
186
186
  let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
187
187
  f(s, {
188
- onComplete(i, c, o) {
188
+ onComplete(i, r, o) {
189
189
  const a = JSON.parse(i);
190
190
  console.log("_AppMngt_get_users => ", a), t && t(a);
191
191
  },
192
- onFailure(i, c) {
192
+ onFailure(i, r) {
193
193
  const o = i;
194
- o.msg = c.errormsg, o.errCode = c.errorcode, n && n(o);
194
+ o.msg = r.errormsg, o.errCode = r.errorcode, n && n(o);
195
195
  }
196
196
  });
197
197
  }
198
198
  function Se(e, t, n = void 0, s = void 0) {
199
199
  let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
200
200
  f(i, {
201
- onComplete(c, o, a) {
202
- const r = JSON.parse(c);
203
- n && n(r);
201
+ onComplete(r, o, a) {
202
+ const c = JSON.parse(r);
203
+ n && n(c);
204
204
  },
205
- onFailure(c, o) {
206
- const a = c;
205
+ onFailure(r, o) {
206
+ const a = r;
207
207
  a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
208
208
  }
209
209
  });
210
210
  }
211
- const U = {
211
+ const D = {
212
212
  "Content-Type": "application/json",
213
213
  Accept: "application/json,text/javascript,*/*"
214
214
  };
215
215
  function _e(e, t, n = void 0, s = void 0) {
216
- const { space: i, currentUser: c } = e, a = `${i}${{
216
+ const { space: i, currentUser: r } = e, a = `${i}${{
217
217
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
218
- }.URIUGr}`, r = {
218
+ }.URIUGr}`, c = {
219
219
  groups: [
220
220
  {
221
221
  title: t.title,
222
222
  description: t.description,
223
- members: t.members || [c.email, "samuel.mureau@beam3.fr"],
223
+ members: t.members || [r.email, "samuel.mureau@beam3.fr"],
224
224
  pending_members: [],
225
225
  sharing: t.sharing,
226
226
  visibility: t.visibility
@@ -229,8 +229,8 @@ function _e(e, t, n = void 0, s = void 0) {
229
229
  };
230
230
  f(a, {
231
231
  method: "POST",
232
- headers: U,
233
- data: JSON.stringify(r),
232
+ headers: D,
233
+ data: JSON.stringify(c),
234
234
  onComplete(d) {
235
235
  n && n(JSON.parse(d));
236
236
  },
@@ -242,7 +242,7 @@ function _e(e, t, n = void 0, s = void 0) {
242
242
  });
243
243
  }
244
244
  function ye(e, t, n = void 0, s = void 0) {
245
- const { space: i, tenant: c } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, r = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${o}${a}${r}`;
245
+ const { space: i, tenant: r } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${o}${a}${c}`;
246
246
  f(d, {
247
247
  opts: {
248
248
  method: "GET",
@@ -261,12 +261,12 @@ function ye(e, t, n = void 0, s = void 0) {
261
261
  });
262
262
  }
263
263
  function E(e, t = void 0, n = void 0) {
264
- const { space: s, tenant: i } = e, c = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, r = {
264
+ const { space: s, tenant: i } = e, r = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, c = {
265
265
  method: "GET",
266
266
  Accept: "application/json,*/*,test/javascript"
267
- }, d = `${c}${o}${a}`;
267
+ }, d = `${r}${o}${a}`;
268
268
  f(d, {
269
- OPTsH: r,
269
+ OPTsH: c,
270
270
  onComplete(l) {
271
271
  t && t(JSON.parse(l));
272
272
  },
@@ -314,7 +314,7 @@ function Te(e, t) {
314
314
  });
315
315
  }
316
316
  function Ce(e, t, n, s = void 0, i = void 0) {
317
- const { space: c, tenant: o } = e, a = {
317
+ const { space: r, tenant: o } = e, a = {
318
318
  URITI: "/3drdfpersist/resources/v1/template-instances",
319
319
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
320
320
  nextURICh: "/characteristics",
@@ -322,9 +322,9 @@ function Ce(e, t, n, s = void 0, i = void 0) {
322
322
  nexURImem: "/members",
323
323
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
324
324
  OPTsTenant: `tenant=dstenant:${o}`
325
- }, r = n, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(r);
325
+ }, c = n, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(c);
326
326
  f(d, {
327
- headers: U,
327
+ headers: D,
328
328
  method: "PATCH",
329
329
  data: l,
330
330
  type: "json",
@@ -337,10 +337,10 @@ function Ce(e, t, n, s = void 0, i = void 0) {
337
337
  });
338
338
  }
339
339
  function Oe(e, t, n, s = void 0, i = void 0) {
340
- const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
340
+ const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
341
341
  f(a, {
342
342
  method: "PATCH",
343
- headers: U,
343
+ headers: D,
344
344
  data: JSON.stringify(n),
345
345
  type: "json",
346
346
  onComplete(d) {
@@ -375,9 +375,9 @@ async function J(e, t = void 0, n = void 0, s = void 0) {
375
375
  console.log("Le paramètre docid est obligatoire");
376
376
  return;
377
377
  }
378
- const c = i + `/resources/v1/modeler/documents/${t}`;
379
- f(c, {
380
- onComplete(o, a, r) {
378
+ const r = i + `/resources/v1/modeler/documents/${t}`;
379
+ f(r, {
380
+ onComplete(o, a, c) {
381
381
  const d = JSON.parse(o);
382
382
  n && n(d);
383
383
  },
@@ -390,7 +390,7 @@ function k(e, t = void 0, n = void 0) {
390
390
  if (e.objID && e.objID !== "") {
391
391
  let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
392
392
  f(s, {
393
- onComplete(i, c, o) {
393
+ onComplete(i, r, o) {
394
394
  const a = JSON.parse(i);
395
395
  e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
396
396
  },
@@ -405,44 +405,46 @@ function C(e, t = void 0, n = void 0) {
405
405
  if (e.space) {
406
406
  const s = e.space + "/resources/v1/application/CSRF";
407
407
  f(s, {
408
- onComplete(i, c, o) {
408
+ onComplete(i, r, o) {
409
409
  const a = JSON.parse(i);
410
- t && t(a.csrf.value);
410
+ console.log("_3DSpace_csrf() / info => ", a), t && t(a.csrf.value);
411
411
  },
412
- onFailure(i, c, o) {
413
- n && n({ response: i, headers: c, xhr: o });
412
+ onFailure(i, r, o) {
413
+ n && n({ response: i, headers: r, xhr: o });
414
414
  }
415
415
  });
416
416
  } else
417
417
  n && n("ERROR : url du 3DSpace non défini.");
418
418
  }
419
- function D(e, t, n = void 0, s = void 0) {
420
- let i = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
419
+ function U(e, t = void 0, n = void 0) {
420
+ let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
421
421
  k(
422
422
  e,
423
- (c) => {
424
- console.log("onComplete / ☠️ info => ", c), f(i, {
423
+ (i) => {
424
+ console.log("onComplete / ☠️ info => ", i, e.token), f(s, {
425
425
  method: "PUT",
426
426
  headers: {
427
- ENO_CSRF_TOKEN: e.token
427
+ ENO_CSRF_TOKEN: i.csrf.value === e.token ? i.csrf.value : e.token
428
428
  },
429
- onComplete(o) {
430
- let a = JSON.parse(o);
431
- console.log("_3DSpace_file_url() / ☠️ info => ", a);
432
- const r = a.data[0].dataelements.ticketURL;
433
- n && n(r);
429
+ onComplete(r) {
430
+ let o = JSON.parse(r);
431
+ console.log("_3DSpace_file_url() / ☠️ info => ", o);
432
+ const a = o.data[0].dataelements.ticketURL;
433
+ e.ticket = a, t && t(a);
434
434
  },
435
- onFailure(o, a) {
436
- console.log("☠️ error => ", o, a), s && s(o, a);
435
+ onFailure(r, o) {
436
+ console.warn("☠️ error => ", r, o), n && n(r, o);
437
437
  }
438
438
  });
439
439
  },
440
- s
440
+ (i) => {
441
+ console.warn("_3DSpace_file_url / error => ", i), n && n(i);
442
+ }
441
443
  );
442
444
  }
443
445
  function be(e, t, n, s = void 0, i = void 0) {
444
- const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
445
- n || (n = e.token), f(c, {
446
+ const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
447
+ n || (n = e.token), f(r, {
446
448
  method: "PUT",
447
449
  headers: {
448
450
  ENO_CSRF_TOKEN: n
@@ -451,10 +453,10 @@ function be(e, t, n, s = void 0, i = void 0) {
451
453
  let a = JSON.parse(o);
452
454
  if (console.log("☠️ info => ", a), a.success === !0)
453
455
  try {
454
- const r = a.data[0].dataelements.ticketURL;
455
- s && s(r);
456
- } catch (r) {
457
- i && i(r);
456
+ const c = a.data[0].dataelements.ticketURL;
457
+ s && s(c);
458
+ } catch (c) {
459
+ i && i(c);
458
460
  }
459
461
  },
460
462
  onFailure(o) {
@@ -462,7 +464,7 @@ function be(e, t, n, s = void 0, i = void 0) {
462
464
  }
463
465
  });
464
466
  }
465
- function G(e, t, n, s, i, c = void 0, o = void 0) {
467
+ function G(e, t, n, s, i, r = void 0, o = void 0) {
466
468
  k(
467
469
  e,
468
470
  t,
@@ -474,18 +476,18 @@ function G(e, t, n, s, i, c = void 0, o = void 0) {
474
476
  s,
475
477
  i,
476
478
  a.csrf.value,
477
- c,
479
+ r,
478
480
  o
479
481
  );
480
482
  }
481
483
  );
482
484
  }
483
- function K(e, t, n, s, i, c, o = void 0, a = void 0) {
484
- const r = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
485
- f(r, {
485
+ function K(e, t, n, s, i, r, o = void 0, a = void 0) {
486
+ const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
487
+ f(c, {
486
488
  method: "PUT",
487
489
  headers: {
488
- ENO_CSRF_TOKEN: c
490
+ ENO_CSRF_TOKEN: r
489
491
  },
490
492
  onComplete(d, l, p) {
491
493
  const u = JSON.parse(d).data[0].dataelements, m = new FormData();
@@ -495,7 +497,7 @@ function K(e, t, n, s, i, c, o = void 0, a = void 0) {
495
497
  let S = "temp_" + Date.now(), _ = {
496
498
  method: "PUT",
497
499
  headers: {
498
- ENO_CSRF_TOKEN: c
500
+ ENO_CSRF_TOKEN: r
499
501
  },
500
502
  data: JSON.stringify({
501
503
  data: [
@@ -535,12 +537,12 @@ function K(e, t, n, s, i, c, o = void 0, a = void 0) {
535
537
  }
536
538
  });
537
539
  }
538
- async function ke(e, t, n, s, i = void 0, c = void 0) {
539
- const o = e.space, a = e.token, r = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
540
+ async function ke(e, t, n, s, i = void 0, r = void 0) {
541
+ const o = e.space, a = e.token, c = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
540
542
  type: "text/plain"
541
543
  }), p = {
542
544
  url_Ticket: `${o}/resources/v1/modeler/documents/files/CheckinTicket`,
543
- url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${r}`
545
+ url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`
544
546
  };
545
547
  if (!o && o !== "") {
546
548
  console.log("le store._3DSpace est vide");
@@ -558,7 +560,7 @@ async function ke(e, t, n, s, i = void 0, c = void 0) {
558
560
  method: "POST",
559
561
  data: d,
560
562
  onComplete(T) {
561
- if (r !== "" && a !== "") {
563
+ if (c !== "" && a !== "") {
562
564
  const F = {
563
565
  method: "POST",
564
566
  headers: {
@@ -585,7 +587,7 @@ async function ke(e, t, n, s, i = void 0, c = void 0) {
585
587
  }
586
588
  ]
587
589
  },
588
- tempId: A()
590
+ tempId: R()
589
591
  }
590
592
  ]
591
593
  }),
@@ -594,7 +596,7 @@ async function ke(e, t, n, s, i = void 0, c = void 0) {
594
596
  onComplete: _,
595
597
  onFailure: y
596
598
  };
597
- r !== "" && f(p.url_Post, F);
599
+ c !== "" && f(p.url_Post, F);
598
600
  } else
599
601
  console.warn("le store est vide");
600
602
  },
@@ -605,21 +607,21 @@ async function ke(e, t, n, s, i = void 0, c = void 0) {
605
607
  }
606
608
  function y(T, F) {
607
609
  console.log("Erreur -- response ", T, `
608
- headers `, F), c && c(T);
610
+ headers `, F), r && r(T);
609
611
  }
610
612
  f(h.ticketURL, S);
611
613
  }
612
614
  });
613
615
  }
614
- function N(e, t = void 0, n = void 0, s = void 0, i = void 0, c = void 0) {
616
+ function N(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0) {
615
617
  const o = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
616
618
  f(o, {
617
619
  method: "GET",
618
620
  onComplete(a) {
619
- const r = JSON.parse(a);
621
+ const c = JSON.parse(a);
620
622
  let d = "", l, p, u;
621
623
  if (t) {
622
- let m = r.collabspaces.find((g) => g.title === t);
624
+ let m = c.collabspaces.find((g) => g.title === t);
623
625
  if (m) {
624
626
  l = t;
625
627
  let g = m.couples;
@@ -635,7 +637,7 @@ function N(e, t = void 0, n = void 0, s = void 0, i = void 0, c = void 0) {
635
637
  let _ = g.filter(
636
638
  (y) => y.role.name === h
637
639
  );
638
- _.length === 1 ? (u = _[0].role.name, p = _[0].organization.title) : c(_);
640
+ _.length === 1 ? (u = _[0].role.name, p = _[0].organization.title) : r(_);
639
641
  }
640
642
  });
641
643
  }) : g.forEach((h) => {
@@ -645,12 +647,12 @@ function N(e, t = void 0, n = void 0, s = void 0, i = void 0, c = void 0) {
645
647
  let S = g.filter(
646
648
  (_) => _.role.name === n
647
649
  );
648
- S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) : c(S);
650
+ S.length === 1 ? (u = S[0].role.name, p = S[0].organization.title) : r(S);
649
651
  }
650
652
  }));
651
653
  }
652
654
  }
653
- l && p && u ? (d = u + "." + p + "." + l, i(d)) : r.preferredcredentials ? (d = r.preferredcredentials.role.name + "." + r.preferredcredentials.organization.title + "." + r.preferredcredentials.collabspace.title, i(d)) : c && (d = u + "." + p + "." + l, c(d));
655
+ l && p && u ? (d = u + "." + p + "." + l, i(d)) : c.preferredcredentials ? (d = c.preferredcredentials.role.name + "." + c.preferredcredentials.organization.title + "." + c.preferredcredentials.collabspace.title, i(d)) : r && (d = u + "." + p + "." + l, r(d));
654
656
  },
655
657
  onFailure(a) {
656
658
  console.log("Erreur de récupération du contexte de sécurité. => ", a);
@@ -665,11 +667,10 @@ async function I(e, t = void 0, n = void 0, s = void 0) {
665
667
  "_3DSpace_download_doc() / Le paramètre space est obligatoire"
666
668
  );
667
669
  try {
668
- console.log("_3DSpace_download_doc / credentials", e), D(
670
+ console.log("_3DSpace_download_doc / credentials", e), U(
669
671
  e,
670
- i,
671
- (c) => {
672
- f(c, {
672
+ (r) => {
673
+ f(r, {
673
674
  headers: {
674
675
  ENO_CSRF_TOKEN: e.token
675
676
  },
@@ -677,24 +678,24 @@ async function I(e, t = void 0, n = void 0, s = void 0) {
677
678
  const a = JSON.parse(o);
678
679
  t && t(a);
679
680
  },
680
- onFailure(o, a, r) {
681
- n && (console.log("error http", o), n({ error: o, headers: a, xhr: r }));
681
+ onFailure(o, a, c) {
682
+ n && (console.log("error http", o), n({ error: o, headers: a, xhr: c }));
682
683
  }
683
684
  });
684
685
  },
685
- (c) => {
686
- n && n(c), console.log("*_3dspace_download_doc / error file URL *", c);
686
+ (r) => {
687
+ n && n(r), console.log("*_3dspace_download_doc / error file URL *", r);
687
688
  }
688
689
  );
689
- } catch (c) {
690
- console.log("*_3dspace_download_doc / error file URL *", c);
690
+ } catch (r) {
691
+ console.log("*_3dspace_download_doc / error file URL *", r);
691
692
  }
692
693
  }
693
694
  async function W(e, t, n = void 0, s = void 0) {
694
695
  let i = [];
695
696
  for (let a = 0; a < t.length; a += 80) {
696
- const r = t.slice(a, a + 80);
697
- i.push(r);
697
+ const c = t.slice(a, a + 80);
698
+ i.push(c);
698
699
  }
699
700
  const o = (a) => {
700
701
  X(
@@ -703,18 +704,18 @@ async function W(e, t, n = void 0, s = void 0) {
703
704
  () => {
704
705
  a++, a < i.length && o(a);
705
706
  },
706
- (r) => {
707
- n && n(r);
707
+ (c) => {
708
+ n && n(c);
708
709
  }
709
710
  );
710
711
  };
711
712
  o(0);
712
713
  }
713
714
  function X(e, t, n = void 0, s = void 0, i = void 0) {
714
- const c = [];
715
- t.forEach((r) => {
716
- c.push({
717
- id: r
715
+ const r = [];
716
+ t.forEach((c) => {
717
+ r.push({
718
+ id: c
718
719
  });
719
720
  });
720
721
  let o = JSON.stringify({
@@ -722,16 +723,16 @@ function X(e, t, n = void 0, s = void 0, i = void 0) {
722
723
  name: "ENO_CSRF_TOKEN",
723
724
  value: e.token
724
725
  },
725
- data: c
726
+ data: r
726
727
  });
727
728
  const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
728
729
  f(a, {
729
730
  method: "PUT",
730
731
  data: o,
731
732
  type: "json",
732
- onComplete(r) {
733
- const d = r.data;
734
- r.success === !0 && (n && n(), d.forEach((l) => {
733
+ onComplete(c) {
734
+ const d = c.data;
735
+ c.success === !0 && (n && n(), d.forEach((l) => {
735
736
  try {
736
737
  const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
737
738
  f(u, {
@@ -751,15 +752,15 @@ function X(e, t, n = void 0, s = void 0, i = void 0) {
751
752
  }
752
753
  }));
753
754
  },
754
- onFailure(r) {
755
- console.log(r), i && i(r);
755
+ onFailure(c) {
756
+ console.log(c), i && i(c);
756
757
  }
757
758
  });
758
759
  }
759
760
  function Fe(e, t, n = void 0, s = void 0) {
760
761
  return new Promise((i) => {
761
762
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
762
- const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
763
+ const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
763
764
  N(
764
765
  e.space,
765
766
  "ESPACE COMMUN",
@@ -793,12 +794,12 @@ function Fe(e, t, n = void 0, s = void 0) {
793
794
  s && s(a);
794
795
  }
795
796
  };
796
- f(c, o);
797
+ f(r, o);
797
798
  }
798
799
  });
799
800
  }
800
- function Ue(e, t, n, s = void 0, i = void 0) {
801
- return new Promise((c) => {
801
+ function De(e, t, n, s = void 0, i = void 0) {
802
+ return new Promise((r) => {
802
803
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
803
804
  const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
804
805
  N(
@@ -806,9 +807,9 @@ function Ue(e, t, n, s = void 0, i = void 0) {
806
807
  "ESPACE COMMUN",
807
808
  ["VPLMProjectLeader", "VPLMCreator"],
808
809
  void 0,
809
- (r) => e.ctx = r,
810
- (r) => {
811
- console.log("onError =>", r);
810
+ (c) => e.ctx = c,
811
+ (c) => {
812
+ console.log("onError =>", c);
812
813
  }
813
814
  );
814
815
  let a = {
@@ -828,21 +829,21 @@ function Ue(e, t, n, s = void 0, i = void 0) {
828
829
  ]
829
830
  }),
830
831
  type: "json",
831
- onComplete(r) {
832
- s && s(r);
832
+ onComplete(c) {
833
+ s && s(c);
833
834
  },
834
- onFailure(r) {
835
- i && i(r);
835
+ onFailure(c) {
836
+ i && i(c);
836
837
  }
837
838
  };
838
839
  f(o, a);
839
840
  }
840
841
  });
841
842
  }
842
- function De(e, t, n = void 0, s = void 0) {
843
+ function Ue(e, t, n = void 0, s = void 0) {
843
844
  return new Promise((i) => {
844
845
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
845
- const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
846
+ const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
846
847
  N(
847
848
  e.space,
848
849
  "ESPACE COMMUN",
@@ -876,14 +877,14 @@ function De(e, t, n = void 0, s = void 0) {
876
877
  s && s(a);
877
878
  }
878
879
  };
879
- f(c, o);
880
+ f(r, o);
880
881
  }
881
882
  });
882
883
  }
883
884
  function $e(e, t, n = void 0, s = void 0) {
884
885
  return new Promise((i) => {
885
886
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
886
- const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
887
+ const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
887
888
  N(
888
889
  e.space,
889
890
  "ESPACE COMMUN",
@@ -923,12 +924,12 @@ function $e(e, t, n = void 0, s = void 0) {
923
924
  s && s(a);
924
925
  }
925
926
  };
926
- f(c, o);
927
+ f(r, o);
927
928
  }
928
929
  });
929
930
  }
930
- function Re(e, t, n, s = void 0, i = void 0) {
931
- return new Promise((c) => {
931
+ function je(e, t, n, s = void 0, i = void 0) {
932
+ return new Promise((r) => {
932
933
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
933
934
  const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
934
935
  N(
@@ -936,9 +937,9 @@ function Re(e, t, n, s = void 0, i = void 0) {
936
937
  "ESPACE COMMUN",
937
938
  ["VPLMProjectLeader", "VPLMCreator"],
938
939
  void 0,
939
- (r) => e.ctx = r,
940
- (r) => {
941
- console.log("onError =>", r);
940
+ (c) => e.ctx = c,
941
+ (c) => {
942
+ console.log("onError =>", c);
942
943
  }
943
944
  );
944
945
  let a = {
@@ -963,11 +964,11 @@ function Re(e, t, n, s = void 0, i = void 0) {
963
964
  notificationTimeout: 600
964
965
  }),
965
966
  type: "json",
966
- onComplete(r) {
967
- s && s(r);
967
+ onComplete(c) {
968
+ s && s(c);
968
969
  },
969
- onFailure(r) {
970
- i && i(r);
970
+ onFailure(c) {
971
+ i && i(c);
971
972
  }
972
973
  };
973
974
  f(o, a);
@@ -975,18 +976,18 @@ function Re(e, t, n, s = void 0, i = void 0) {
975
976
  });
976
977
  }
977
978
  //!SECTION
978
- async function je(e, t, n) {
979
+ async function Ae(e, t, n) {
979
980
  const s = `${e.space}/resources/v1/application/CSRF`;
980
981
  f(s, {
981
982
  onComplete(i) {
982
983
  i = JSON.parse(i), t && t(i.csrf);
983
984
  },
984
- onFailure(i, c, o) {
985
- n && n({ error: i, headers: c, xhr: o });
985
+ onFailure(i, r, o) {
986
+ n && n({ error: i, headers: r, xhr: o });
986
987
  }
987
988
  });
988
989
  }
989
- function Ae(e, t = void 0, n = void 0) {
990
+ function Re(e, t = void 0, n = void 0) {
990
991
  const s = {
991
992
  base: `${e.space}`,
992
993
  uri: "/resources/bps/cspaces",
@@ -998,60 +999,57 @@ function Ae(e, t = void 0, n = void 0) {
998
999
  Accept: "application/json,text/javascript,*/*",
999
1000
  "Content-Type": "application/ds-json"
1000
1001
  },
1001
- onComplete(c, o) {
1002
- const a = JSON.parse(c);
1002
+ onComplete(r, o) {
1003
+ const a = JSON.parse(r);
1003
1004
  t && t(a, o);
1004
1005
  },
1005
- onFailure(c, o, a) {
1006
- n && n({ response: c, headers: o, xhr: a });
1006
+ onFailure(r, o, a) {
1007
+ n && n({ response: r, headers: o, xhr: a });
1007
1008
  }
1008
1009
  });
1009
1010
  }
1010
1011
  function Ie(e, t, n, s) {
1011
- D(
1012
+ U(
1012
1013
  e.space,
1013
1014
  t,
1014
1015
  (i) => {
1015
1016
  f(i, {
1016
1017
  header: { ENO_CSRF_TOKEN: e.token },
1017
- onComplete: (c) => {
1018
- n && n(c);
1018
+ onComplete: (r) => {
1019
+ n && n(r);
1019
1020
  },
1020
- onFailure: (c) => {
1021
- console.log("error http", c), s && s(c);
1021
+ onFailure: (r) => {
1022
+ console.log("error http", r), s && s(r);
1022
1023
  }
1023
1024
  });
1024
- },
1025
- (i) => {
1026
- console.log("error file URL", i), s && s(i);
1027
1025
  }
1028
1026
  );
1029
1027
  }
1030
1028
  async function ve(e, t, n = void 0, s = void 0) {
1031
1029
  return new Promise((i) => {
1032
- D(e.space, t, (c) => {
1033
- f(c, {
1034
- onComplete: (o, a, r) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, r), i),
1035
- onFailure: (o, a, r) => {
1036
- s && s(o, a, r), console.log(o, a?.errormsg);
1030
+ U(e.space, t, (r) => {
1031
+ f(r, {
1032
+ onComplete: (o, a, c) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, c), i),
1033
+ onFailure: (o, a, c) => {
1034
+ s && s(o, a, c), console.log(o, a?.errormsg);
1037
1035
  }
1038
1036
  });
1039
1037
  });
1040
1038
  });
1041
1039
  }
1042
1040
  function xe(e, t, n, s = void 0, i = void 0) {
1043
- const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
1041
+ const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1044
1042
  k(
1045
1043
  e,
1046
1044
  n,
1047
1045
  (o) => {
1048
- const a = o.data[0].relateddata.files[0].id, r = o.data[0].dataelements.secondaryTitle !== "" ? o.data[0].dataelements.secondaryTitle : o.data[0].dataelements.title;
1046
+ 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;
1049
1047
  G(
1050
1048
  e,
1051
1049
  n,
1052
1050
  a,
1053
- c,
1054
1051
  r,
1052
+ c,
1055
1053
  (d) => {
1056
1054
  s && s(d);
1057
1055
  },
@@ -1065,7 +1063,7 @@ function xe(e, t, n, s = void 0, i = void 0) {
1065
1063
  let v, x;
1066
1064
  const $ = [];
1067
1065
  async function Pe(e, t = void 0, n = void 0) {
1068
- e.objID && e.objID !== "" ? k(
1066
+ e.objID && e.objID !== "" ? (console.log("obj est présent"), k(
1069
1067
  e,
1070
1068
  (s) => {
1071
1069
  t && t(s);
@@ -1073,7 +1071,7 @@ async function Pe(e, t = void 0, n = void 0) {
1073
1071
  (s) => {
1074
1072
  n && n(s);
1075
1073
  }
1076
- ) : e.objID === null && C(
1074
+ )) : (e.objID === null || e.objID === "") && C(
1077
1075
  e,
1078
1076
  (s) => {
1079
1077
  t && t({ rep: s, msg: "Pas d'objID, ou invalide" });
@@ -1084,17 +1082,17 @@ async function Pe(e, t = void 0, n = void 0) {
1084
1082
  );
1085
1083
  }
1086
1084
  async function Me(e, t = void 0, n = void 0) {
1087
- console.log("getDatasByTenant", e), await I(
1085
+ console.log("getDatasByTenant (getDocuments)", e), await I(
1088
1086
  e,
1089
1087
  (s) => {
1090
1088
  const i = {};
1091
1089
  i.obj = s, V(
1092
1090
  e,
1093
- (c) => {
1094
- i.datas = c, t && t(i);
1091
+ (r) => {
1092
+ i.datas = r, t && t(i);
1095
1093
  },
1096
- (c) => {
1097
- n && n(c);
1094
+ (r) => {
1095
+ n && n(r);
1098
1096
  }
1099
1097
  );
1100
1098
  },
@@ -1105,12 +1103,12 @@ async function Me(e, t = void 0, n = void 0) {
1105
1103
  }
1106
1104
  function V(e, t = void 0, n = void 0) {
1107
1105
  const s = [];
1108
- e.objIds.forEach((i, c) => {
1106
+ e.objIds.forEach((i, r) => {
1109
1107
  I(
1110
1108
  e,
1111
1109
  i.objId,
1112
1110
  (o) => {
1113
- s.push({ [i.name]: o }), i.name === "dbProjets" && (v = o.affaires.map((a) => a.objectID), B(e, x)), c === e.objIds.length - 1 && t && t(s);
1111
+ s.push({ [i.name]: o }), i.name === "dbProjets" && (v = o.affaires.map((a) => a.objectID), B(e, x)), r === e.objIds.length - 1 && t && t(s);
1114
1112
  },
1115
1113
  (o) => {
1116
1114
  n && n(o);
@@ -1123,8 +1121,8 @@ function B(e, t, n = void 0, s = void 0) {
1123
1121
  e,
1124
1122
  v,
1125
1123
  (i) => {
1126
- const c = [...t];
1127
- c.find((o) => o.objectID === i.objectId).data = i.data, x = c, $.push(i.data), n && n($);
1124
+ const r = [...t];
1125
+ r.find((o) => o.objectID === i.objectId).data = i.data, x = r, $.push(i.data), n && n($);
1128
1126
  },
1129
1127
  (i) => {
1130
1128
  s && (s(i), console.log(i));
@@ -1152,10 +1150,10 @@ const Y = "FA35FB9B177A280065800EA0000F599C", H = [
1152
1150
  tag: "testTag"
1153
1151
  };
1154
1152
  function Le(e, t, n = void 0, s = void 0) {
1155
- const { space: i, tenant: c } = e, { objId: o, pred: a, tag: r } = t, d = {
1153
+ const { space: i, tenant: r } = e, { objId: o, pred: a, tag: c } = t, d = {
1156
1154
  uri: "/resources/6w/tags",
1157
1155
  otpCTX: "SecurityContext=preferred",
1158
- optTenant: `tenant=${c}`
1156
+ optTenant: `tenant=${r}`
1159
1157
  }, l = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1160
1158
  tag: [
1161
1159
  {
@@ -1166,7 +1164,7 @@ function Le(e, t, n = void 0, s = void 0) {
1166
1164
  ],
1167
1165
  predicate: P[a],
1168
1166
  object: {
1169
- literal: r
1167
+ literal: c
1170
1168
  }
1171
1169
  }
1172
1170
  ]
@@ -1213,17 +1211,17 @@ function Le(e, t, n = void 0, s = void 0) {
1213
1211
  }
1214
1212
  function q(e, t, n = void 0, s = void 0) {
1215
1213
  console.log("obj ", t);
1216
- const i = t.info.name, c = {
1214
+ const i = t.info.name, r = {
1217
1215
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1218
1216
  uri: "/federated/search"
1219
- }, o = `${c.baseUrl}${c.uri}`, a = {
1217
+ }, o = `${r.baseUrl}${r.uri}`, a = {
1220
1218
  "Content-Type": "application/json",
1221
1219
  Accept: "application/json,text/javascript,*/*"
1222
- }, r = A(), d = {
1220
+ }, c = R(), d = {
1223
1221
  with_indexing_date: !0,
1224
1222
  with_synthesis: !0,
1225
1223
  with_nls: !1,
1226
- label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${r}`,
1224
+ label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${c}`,
1227
1225
  locale: "fr",
1228
1226
  select_predicate: [
1229
1227
  "ds6w:label",
@@ -1295,11 +1293,11 @@ function q(e, t, n = void 0, s = void 0) {
1295
1293
  });
1296
1294
  }
1297
1295
  function Ee(e, t, n = void 0, s = void 0) {
1298
- const { objId: i, pred: c, tag: o } = t, a = {
1296
+ const { objId: i, pred: r, tag: o } = t, a = {
1299
1297
  uri: "/resources/6w/tags",
1300
1298
  otpCTX: "SecurityContext=preferred",
1301
1299
  optTenant: `tenant=${e.tenant}`
1302
- }, r = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1300
+ }, c = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1303
1301
  tag: [
1304
1302
  {
1305
1303
  subject: [
@@ -1307,14 +1305,14 @@ function Ee(e, t, n = void 0, s = void 0) {
1307
1305
  uri: `pid://${i}`
1308
1306
  }
1309
1307
  ],
1310
- predicate: P[c],
1308
+ predicate: P[r],
1311
1309
  object: {
1312
1310
  literal: o
1313
1311
  }
1314
1312
  }
1315
1313
  ]
1316
1314
  };
1317
- f(r, {
1315
+ f(c, {
1318
1316
  method: "DELETE",
1319
1317
  data: JSON.stringify(d),
1320
1318
  headers: {
@@ -1334,16 +1332,16 @@ function Je(e, t = "", n = void 0, s = void 0) {
1334
1332
  const { space: i } = e;
1335
1333
  if (t === "")
1336
1334
  return;
1337
- const c = {
1335
+ const r = {
1338
1336
  uri: "/enovia/resources/v1/modeler/documents"
1339
1337
  }, o = {
1340
1338
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1341
1339
  Accept: "application/json,text/javascript,*/*"
1342
- }, a = `${i}${c.uri}`, r = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;
1340
+ }, 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}`;
1343
1341
  f(a, {
1344
1342
  method: "POST",
1345
1343
  headers: o,
1346
- data: r,
1344
+ data: c,
1347
1345
  onComplete(d) {
1348
1346
  n && n(JSON.parse(d));
1349
1347
  },
@@ -1356,7 +1354,7 @@ function Je(e, t = "", n = void 0, s = void 0) {
1356
1354
  async function w(e, t = void 0, n = void 0) {
1357
1355
  const s = e.space + "/api/index/tk";
1358
1356
  return f(s, {
1359
- onComplete(i, c, o) {
1357
+ onComplete(i, r, o) {
1360
1358
  const a = JSON.parse(i);
1361
1359
  if (t)
1362
1360
  return t(a), e.token = a?.result?.ServerToken;
@@ -1377,11 +1375,11 @@ function Ge(e, t = void 0, n = void 0) {
1377
1375
  start: 0
1378
1376
  }
1379
1377
  };
1380
- w(e, (c) => {
1378
+ w(e, (r) => {
1381
1379
  f(s, {
1382
1380
  method: "POST",
1383
1381
  headers: {
1384
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1382
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1385
1383
  "Content-type": "application/json;charset=UTF-8",
1386
1384
  Accept: "application/json"
1387
1385
  },
@@ -1406,19 +1404,19 @@ function Ke(e, t = void 0, n = void 0) {
1406
1404
  maxNbOfCommonElements: "5"
1407
1405
  }
1408
1406
  };
1409
- w(e, (c) => {
1407
+ w(e, (r) => {
1410
1408
  f(s, {
1411
1409
  method: "POST",
1412
1410
  headers: {
1413
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1411
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1414
1412
  "Content-type": "application/json;charset=UTF-8",
1415
1413
  Accept: "application/json"
1416
1414
  },
1417
1415
  data: JSON.stringify(i),
1418
1416
  type: "json",
1419
1417
  onComplete(o, a) {
1420
- const r = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1421
- t && t(r, o);
1418
+ const c = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1419
+ t && t(c, o);
1422
1420
  },
1423
1421
  onFailure(o, a) {
1424
1422
  n && n(o, a);
@@ -1432,14 +1430,14 @@ function We(e, t = void 0, n = void 0) {
1432
1430
  uri: "/api/community/listmycommunities",
1433
1431
  limit: `/limit/${e.limit ? e.limit : 128}`,
1434
1432
  page: `/page/${e.page ? e.page : "1"}`
1435
- }, i = `${s.base}${s.uri}${s.limit}${s.page}`, c = [];
1433
+ }, i = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1436
1434
  w(e, (o) => {
1437
1435
  f(i, {
1438
1436
  method: "GET",
1439
1437
  headers: {
1440
1438
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1441
1439
  },
1442
- onComplete(a, r, d) {
1440
+ onComplete(a, c, d) {
1443
1441
  const p = JSON.parse(a).result;
1444
1442
  let u = 0;
1445
1443
  p.forEach((m) => {
@@ -1455,21 +1453,21 @@ function We(e, t = void 0, n = void 0) {
1455
1453
  e,
1456
1454
  m.id,
1457
1455
  (h) => {
1458
- u++, g.members = h, c.push(g), u === p.length && t && t(c);
1456
+ u++, g.members = h, r.push(g), u === p.length && t && t(r);
1459
1457
  },
1460
1458
  (h) => n(h)
1461
1459
  );
1462
1460
  });
1463
1461
  },
1464
- onFailure(a, r) {
1462
+ onFailure(a, c) {
1465
1463
  const d = a;
1466
- d.status = r.status, d.response = r.errormsg, n && n(d);
1464
+ d.status = c.status, d.response = c.errormsg, n && n(d);
1467
1465
  }
1468
1466
  });
1469
1467
  });
1470
1468
  }
1471
1469
  function Q(e, t, n, s) {
1472
- const i = `${e.space}/api/community/listmembers`, c = {
1470
+ const i = `${e.space}/api/community/listmembers`, r = {
1473
1471
  params: {
1474
1472
  page: e.page ? e.page : 1,
1475
1473
  limit: e.limit ? e.limit : 50,
@@ -1484,14 +1482,14 @@ function Q(e, t, n, s) {
1484
1482
  Accept: "application/json",
1485
1483
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1486
1484
  },
1487
- data: JSON.stringify(c),
1485
+ data: JSON.stringify(r),
1488
1486
  type: "json",
1489
- onComplete(a, r, d) {
1487
+ onComplete(a, c, d) {
1490
1488
  n && n(a);
1491
1489
  },
1492
- onFailure(a, r) {
1490
+ onFailure(a, c) {
1493
1491
  const d = a;
1494
- d.status = r.status, d.response = r.errormsg, s && s(d);
1492
+ d.status = c.status, d.response = c.errormsg, s && s(d);
1495
1493
  }
1496
1494
  });
1497
1495
  });
@@ -1500,31 +1498,31 @@ function Xe(e, t = void 0, n = void 0) {
1500
1498
  const s = "YXdA5x4DSUKtlAi2wmnyTA";
1501
1499
  e.commu_id || (e.commu_id = s);
1502
1500
  const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1503
- w(e, (c) => {
1501
+ w(e, (r) => {
1504
1502
  f(i, {
1505
1503
  method: "GET",
1506
1504
  headers: {
1507
1505
  "Content-type": "application/json;charset=UTF-8",
1508
1506
  Accept: "application/json",
1509
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1507
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1510
1508
  },
1511
1509
  onComplete(o) {
1512
1510
  const a = JSON.parse(o);
1513
1511
  t && t(a);
1514
1512
  },
1515
1513
  onFailure(o, a) {
1516
- const r = o;
1517
- r.status = a.status, r.response = a.errormsg, n && n(r);
1514
+ const c = o;
1515
+ c.status = a.status, c.response = a.errormsg, n && n(c);
1518
1516
  }
1519
1517
  });
1520
1518
  });
1521
1519
  }
1522
1520
  function Ve(e, t, n = void 0, s = void 0) {
1523
- const { listAllContacts: i, currentUser: c } = e;
1521
+ const { listAllContacts: i, currentUser: r } = e;
1524
1522
  console.log("__listAllContacts", i.hits);
1525
1523
  const o = `${e.space}/api/directmessages`, a = {
1526
- users: [c.login].concat(t.receipt)
1527
- }, r = {
1524
+ users: [r.login].concat(t.receipt)
1525
+ }, c = {
1528
1526
  id_msg: "",
1529
1527
  senderId: e.currentUser.login,
1530
1528
  senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
@@ -1534,10 +1532,10 @@ function Ve(e, t, n = void 0, s = void 0) {
1534
1532
  Z(
1535
1533
  a.users,
1536
1534
  (l) => {
1537
- l !== void 0 && (r.id_msg = l.id, d = !0, R(e, r));
1535
+ l !== void 0 && (c.id_msg = l.id, d = !0, j(e, c));
1538
1536
  },
1539
1537
  (l) => {
1540
- d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), r.id_msg = "";
1538
+ d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), c.id_msg = "";
1541
1539
  }
1542
1540
  ), d === !1 && setTimeout(() => {
1543
1541
  d === !1 && w(e, (l) => {
@@ -1552,7 +1550,7 @@ function Ve(e, t, n = void 0, s = void 0) {
1552
1550
  type: "json",
1553
1551
  onComplete(p, u, m) {
1554
1552
  const g = p;
1555
- g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), r.id_msg = g.result.id, R(e, r);
1553
+ g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), c.id_msg = g.result.id, j(e, c);
1556
1554
  },
1557
1555
  onFailure(p, u, m) {
1558
1556
  const g = p;
@@ -1564,19 +1562,19 @@ function Ve(e, t, n = void 0, s = void 0) {
1564
1562
  }
1565
1563
  function Z(e, t, n, s) {
1566
1564
  const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
1567
- w(e, (c) => {
1565
+ w(e, (r) => {
1568
1566
  f(i, {
1569
1567
  method: "GET",
1570
1568
  headers: {
1571
1569
  Accept: "application/json,text/javascript,*/*",
1572
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1570
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1573
1571
  },
1574
1572
  onComplete(o) {
1575
- const a = JSON.parse(o), r = [];
1573
+ const a = JSON.parse(o), c = [];
1576
1574
  a.result.forEach((p) => {
1577
- p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && r.push(p);
1575
+ p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && c.push(p);
1578
1576
  });
1579
- const d = t.sort(), l = r.find((p) => {
1577
+ const d = t.sort(), l = c.find((p) => {
1580
1578
  const u = [];
1581
1579
  return p.users.forEach((m) => {
1582
1580
  u.push(m.login);
@@ -1591,13 +1589,13 @@ function Z(e, t, n, s) {
1591
1589
  });
1592
1590
  });
1593
1591
  }
1594
- function R(e, t, n = void 0, s = void 0) {
1592
+ function j(e, t, n = void 0, s = void 0) {
1595
1593
  const i = {
1596
1594
  base: e.space,
1597
1595
  uri: "/api/community",
1598
1596
  id_msg: `${t.id_msg}`,
1599
1597
  endUri: "/instantmessages"
1600
- }, c = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
1598
+ }, r = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
1601
1599
  author: { login: t.senderId, displayName: t.senderName },
1602
1600
  accessState: null,
1603
1601
  commentUri: null,
@@ -1607,8 +1605,8 @@ function R(e, t, n = void 0, s = void 0) {
1607
1605
  parentCommentUri: null,
1608
1606
  richMessage: t.msg
1609
1607
  };
1610
- console.log("_3dSwym_sendDirectMessageData url ", c), w(e, (a) => {
1611
- f(c, {
1608
+ console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (a) => {
1609
+ f(r, {
1612
1610
  method: "POST",
1613
1611
  headers: {
1614
1612
  "Content-Type": "application/json",
@@ -1617,12 +1615,12 @@ function R(e, t, n = void 0, s = void 0) {
1617
1615
  },
1618
1616
  data: JSON.stringify(o),
1619
1617
  type: "json",
1620
- onComplete(r, d, l) {
1621
- const p = r;
1618
+ onComplete(c, d, l) {
1619
+ const p = c;
1622
1620
  p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
1623
1621
  },
1624
- onFailure(r, d) {
1625
- const l = r;
1622
+ onFailure(c, d) {
1623
+ const l = c;
1626
1624
  l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
1627
1625
  }
1628
1626
  });
@@ -1646,15 +1644,15 @@ const te = {
1646
1644
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1647
1645
  };
1648
1646
  function Be(e, t, n = void 0, s = void 0) {
1649
- const i = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
1650
- (r) => r.id === t.community_id
1647
+ const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1648
+ (c) => c.id === t.community_id
1651
1649
  ), o = e.swymCommunities.find(
1652
- (r) => r.title.toLowerCase() === t.community_title.toLowerCase()
1650
+ (c) => c.title.toLowerCase() === t.community_title.toLowerCase()
1653
1651
  ), a = {
1654
1652
  params: {
1655
1653
  title: t.title,
1656
1654
  // String, le nom de l'affaire
1657
- community_id: c?.id !== void 0 ? c.id : o.id,
1655
+ community_id: r?.id !== void 0 ? r.id : o.id,
1658
1656
  // String, l'id de la communauté
1659
1657
  message: ne(t.text_html),
1660
1658
  // STRING => le contenue du message doit être au format HTML
@@ -1662,11 +1660,11 @@ function Be(e, t, n = void 0, s = void 0) {
1662
1660
  // 1 publier, 0 non publier
1663
1661
  }
1664
1662
  };
1665
- w(e, (r) => {
1663
+ w(e, (c) => {
1666
1664
  const d = {
1667
1665
  "Content-type": "application/json;charset=UTF-8",
1668
1666
  Accept: "application/json",
1669
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1667
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1670
1668
  };
1671
1669
  f(i, {
1672
1670
  method: "POST",
@@ -1685,7 +1683,7 @@ function Be(e, t, n = void 0, s = void 0) {
1685
1683
  });
1686
1684
  }
1687
1685
  function Ye(e, t, n = void 0, s = void 0) {
1688
- const i = `${e.space}/api/idea/delete`, c = {
1686
+ const i = `${e.space}/api/idea/delete`, r = {
1689
1687
  params: {
1690
1688
  community_id: t.community_id,
1691
1689
  ideationIds: [t.idee_id]
@@ -1699,14 +1697,14 @@ function Ye(e, t, n = void 0, s = void 0) {
1699
1697
  Accept: "application/json",
1700
1698
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1701
1699
  },
1702
- data: JSON.stringify(c),
1700
+ data: JSON.stringify(r),
1703
1701
  type: "json",
1704
- onComplete(a, r, d) {
1702
+ onComplete(a, c, d) {
1705
1703
  n && n(a);
1706
1704
  },
1707
- onFailure(a, r, d) {
1705
+ onFailure(a, c, d) {
1708
1706
  const l = a;
1709
- l.status = r.status, l.response = r.errormsg, s && s(l);
1707
+ l.status = c.status, l.response = c.errormsg, s && s(l);
1710
1708
  }
1711
1709
  });
1712
1710
  });
@@ -1714,13 +1712,13 @@ function Ye(e, t, n = void 0, s = void 0) {
1714
1712
  function He(e, t = "", n = void 0, s = void 0) {
1715
1713
  const i = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1716
1714
  t === "" && (t = i);
1717
- const c = `${e.space}/api/idea/get`, o = {
1715
+ const r = `${e.space}/api/idea/get`, o = {
1718
1716
  params: {
1719
1717
  id: t
1720
1718
  }
1721
1719
  };
1722
1720
  w(e, (a) => {
1723
- f(c, {
1721
+ f(r, {
1724
1722
  method: "POST",
1725
1723
  headers: {
1726
1724
  "Content-type": "application/json;charset=UTF-8",
@@ -1729,12 +1727,12 @@ function He(e, t = "", n = void 0, s = void 0) {
1729
1727
  },
1730
1728
  data: JSON.stringify(o),
1731
1729
  type: "json",
1732
- onComplete(r) {
1733
- const d = r;
1730
+ onComplete(c) {
1731
+ const d = c;
1734
1732
  d.msg = d.result.message, n && n(d);
1735
1733
  },
1736
- onFailure(r) {
1737
- const d = r;
1734
+ onFailure(c) {
1735
+ const d = c;
1738
1736
  d.status = headers.status, d.response = headers.errormsg, s && s(d);
1739
1737
  }
1740
1738
  });
@@ -1745,20 +1743,20 @@ function ze(e, t = te, n = void 0, s = void 0) {
1745
1743
  uri: "/api/idea/list",
1746
1744
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1747
1745
  limit: `/limit/${t.limit ? t.limit : 10}`
1748
- }, c = `${e.space}${i.uri}${i.comId}${i.limit}`;
1746
+ }, r = `${e.space}${i.uri}${i.comId}${i.limit}`;
1749
1747
  w(e, (o) => {
1750
- f(c, {
1748
+ f(r, {
1751
1749
  method: "GET",
1752
1750
  headers: {
1753
1751
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1754
1752
  },
1755
1753
  onComplete(a) {
1756
- const r = JSON.parse(a);
1757
- n && n(r);
1754
+ const c = JSON.parse(a);
1755
+ n && n(c);
1758
1756
  },
1759
- onFailure(a, r) {
1757
+ onFailure(a, c) {
1760
1758
  const d = a;
1761
- d.status = r.status, d.response = r.errormsg, s && s(d);
1759
+ d.status = c.status, d.response = c.errormsg, s && s(d);
1762
1760
  }
1763
1761
  });
1764
1762
  });
@@ -1846,12 +1844,12 @@ function qe(e, t = void 0, n = void 0) {
1846
1844
  f(s, {
1847
1845
  method: "GET",
1848
1846
  headers: { "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken },
1849
- onComplete(c, o, a) {
1850
- const r = JSON.parse(c);
1851
- t && t(r.result);
1847
+ onComplete(r, o, a) {
1848
+ const c = JSON.parse(r);
1849
+ t && t(c.result);
1852
1850
  },
1853
- onFailure(c, o, a) {
1854
- n && n({ response: c, headers: o, xhr: a });
1851
+ onFailure(r, o, a) {
1852
+ n && n({ response: r, headers: o, xhr: a });
1855
1853
  }
1856
1854
  });
1857
1855
  },
@@ -1862,11 +1860,11 @@ function Qe(e, t, n = void 0, s = void 0) {
1862
1860
  const i = e.space + "/api/user/find/login/" + t;
1863
1861
  w(
1864
1862
  e,
1865
- (c) => {
1863
+ (r) => {
1866
1864
  f(i, {
1867
1865
  method: "GET",
1868
- headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
1869
- onComplete(o, a, r) {
1866
+ headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
1867
+ onComplete(o, a, c) {
1870
1868
  const d = JSON.parse(o);
1871
1869
  n && n(d);
1872
1870
  },
@@ -1883,22 +1881,22 @@ function Ze(e) {
1883
1881
  return console.log(t), t;
1884
1882
  }
1885
1883
  export {
1886
- A as UUID,
1884
+ R as UUID,
1887
1885
  ke as _3DSpace_Create_Doc,
1888
1886
  C as _3DSpace_csrf,
1889
1887
  I as _3DSpace_download_doc,
1890
1888
  W as _3DSpace_download_multidoc,
1891
1889
  G as _3DSpace_file_update,
1892
1890
  K as _3DSpace_file_update_csr,
1893
- D as _3DSpace_file_url,
1891
+ U as _3DSpace_file_url,
1894
1892
  be as _3DSpace_file_url_csr,
1895
1893
  k as _3DSpace_get_csrf,
1896
1894
  J as _3DSpace_get_docInfo,
1897
1895
  X as _3DSpace_get_downloadTicket_multidoc,
1898
1896
  N as _3DSpace_get_securityContexts,
1899
- Re as _3DSpace_lifecycle_changeRevision,
1900
- Ue as _3DSpace_lifecycle_changeState,
1901
- De as _3DSpace_lifecycle_getGraph,
1897
+ je as _3DSpace_lifecycle_changeRevision,
1898
+ De as _3DSpace_lifecycle_changeState,
1899
+ Ue as _3DSpace_lifecycle_getGraph,
1902
1900
  $e as _3DSpace_lifecycle_getNextRevision,
1903
1901
  Fe as _3DSpace_lifecycle_getNextStates,
1904
1902
  We as _3DSwim_getAllCommunities,
@@ -1915,7 +1913,7 @@ export {
1915
1913
  Qe as _3DSwym_get_findUser,
1916
1914
  w as _3DSwym_get_version,
1917
1915
  Be as _3DSwym_postIdea,
1918
- R as _3DSwym_sendMessageData,
1916
+ j as _3DSwym_sendMessageData,
1919
1917
  Se as _AppMngt_get_info_user,
1920
1918
  he as _AppMngt_get_users,
1921
1919
  me as _getPlateformInfos,
@@ -1931,8 +1929,8 @@ export {
1931
1929
  B as dataMixing,
1932
1930
  Te as deleteUserGroups,
1933
1931
  re as findAdresse,
1934
- Ae as getAllContextSecurity,
1935
- je as getCSRFToken,
1932
+ Re as getAllContextSecurity,
1933
+ Ae as getCSRFToken,
1936
1934
  oe as getCommunes,
1937
1935
  ye as getComplementUG,
1938
1936
  Ie as getDataFrom3DSpace,