@beam3_dev/api_module 0.0.85 → 0.0.86

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
@@ -34,7 +34,7 @@ const L = {
34
34
  b3Edit8: "#616161",
35
35
  b3Edit9: "#795548"
36
36
  };
37
- async function ie(e, t = void 0, s = void 0) {
37
+ async function oe(e, t = void 0, s = void 0) {
38
38
  const n = parseInt(e);
39
39
  await fetch(
40
40
  "https://apicarto.ign.fr/api/codes-postaux/communes/" + n,
@@ -44,10 +44,10 @@ async function ie(e, t = void 0, s = void 0) {
44
44
  Accept: "application/json"
45
45
  }
46
46
  }
47
- ).then((o) => o.json()).then((o) => {
48
- t && t(o);
49
- }).catch((o) => {
50
- s && s(o), console.error("Erreur : " + o);
47
+ ).then((i) => i.json()).then((i) => {
48
+ t && t(i);
49
+ }).catch((i) => {
50
+ s && s(i), console.error("Erreur : " + i);
51
51
  });
52
52
  }
53
53
  async function re(e, t = void 0, s = void 0) {
@@ -67,9 +67,9 @@ async function re(e, t = void 0, s = void 0) {
67
67
  }
68
68
  async function ce(e, t = L) {
69
69
  let s = b.now().year;
70
- const n = e, o = [], r = (a) => {
71
- for (let i in a)
72
- o.push({ date: i, comment: a[i] });
70
+ const n = e, i = [], r = (a) => {
71
+ for (let o in a)
72
+ i.push({ date: o, comment: a[o] });
73
73
  };
74
74
  for (let a = s; a <= s + 1; a++)
75
75
  await fetch(
@@ -80,20 +80,20 @@ async function ce(e, t = L) {
80
80
  Accept: "application/json"
81
81
  }
82
82
  }
83
- ).then((i) => i.json()).then((i) => {
84
- r(i);
85
- }).catch((i) => console.error("Erreur : " + i));
83
+ ).then((o) => o.json()).then((o) => {
84
+ r(o);
85
+ }).catch((o) => console.error("Erreur : " + o));
86
86
  return (() => {
87
87
  const a = n.length === 0 ? {
88
88
  events: []
89
89
  } : n;
90
- for (let i of o)
90
+ for (let o of i)
91
91
  a.events.findIndex(
92
- (l) => l.start === b.fromISO(i.date).toISODate() && l.name === "Férié : " + i.comment
92
+ (l) => l.start === b.fromISO(o.date).toISODate() && l.name === "Férié : " + o.comment
93
93
  ) === -1 && a.events.push({
94
- name: "Férié : " + i.comment,
95
- start: b.fromISO(i.date).toISODate(),
96
- end: b.fromISO(i.date).toISODate(),
94
+ name: "Férié : " + o.comment,
95
+ start: b.fromISO(o.date).toISODate(),
96
+ end: b.fromISO(o.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
@@ -101,8 +101,8 @@ async function ce(e, t = L) {
101
101
  })();
102
102
  }
103
103
  async function de(e, t, s = !0) {
104
- const n = e.events.findIndex((o) => o.uuid === t.uuid);
105
- return n === -1 ? e.events.push(t) : s ? e.events[n] = t : e.events.splice(n, 1), e.length > 0 && e.sort((o, r) => o.start - r.start), e;
104
+ const n = e.events.findIndex((i) => i.uuid === t.uuid);
105
+ return n === -1 ? e.events.push(t) : s ? e.events[n] = t : e.events.splice(n, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
106
106
  }
107
107
  function m(e, t) {
108
108
  O(["DS/WAFData/WAFData"], (s) => {
@@ -145,13 +145,13 @@ async function fe(e, t = void 0, s = void 0) {
145
145
  function me() {
146
146
  let e = {};
147
147
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
148
- const s = t.getTenant(), n = t.getUser(), o = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
148
+ const s = t.getTenant(), n = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
149
149
  "com.3ds.wp.passport.cors"
150
150
  );
151
151
  e = {
152
152
  tenant: s,
153
153
  user: n,
154
- appsConfiguration: o,
154
+ appsConfiguration: i,
155
155
  appConf: r
156
156
  };
157
157
  }), console.log("%cRETOUR API :", "color:blue", e), e;
@@ -162,19 +162,19 @@ function ge(e, t, s) {
162
162
  uri: "/resources/AppsMngt/api/custom/applications",
163
163
  option: `?filter=${e.tenant}`
164
164
  // facultatif
165
- }, o = `${n.base}${n.uri}${n.option}`;
166
- m(o, {
165
+ }, i = `${n.base}${n.uri}${n.option}`;
166
+ m(i, {
167
167
  method: "GET",
168
168
  headers: {
169
169
  "Content-Type": "application/json",
170
170
  Accept: "application/json"
171
171
  },
172
172
  onComplete(r, c, a) {
173
- const i = JSON.parse(r), d = i.data.map((l) => {
173
+ const o = JSON.parse(r), d = o.data.map((l) => {
174
174
  const p = l.attributes.name, u = l.id;
175
175
  return { name: p, id: u };
176
176
  });
177
- t && t(d, i);
177
+ t && t(d, o);
178
178
  },
179
179
  onFailure(r, c) {
180
180
  const a = r;
@@ -185,22 +185,22 @@ function ge(e, t, s) {
185
185
  function he(e, t = void 0, s = void 0) {
186
186
  let n = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
187
187
  m(n, {
188
- onComplete(o, r, c) {
189
- const a = JSON.parse(o);
188
+ onComplete(i, r, c) {
189
+ const a = JSON.parse(i);
190
190
  console.log("_AppMngt_get_users => ", a), t && t(a);
191
191
  },
192
- onFailure(o, r) {
193
- const c = o;
192
+ onFailure(i, r) {
193
+ const c = i;
194
194
  c.msg = r.errormsg, c.errCode = r.errorcode, s && s(c);
195
195
  }
196
196
  });
197
197
  }
198
198
  function Se(e, t, s = void 0, n = void 0) {
199
- let o = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
200
- m(o, {
199
+ let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
200
+ m(i, {
201
201
  onComplete(r, c, a) {
202
- const i = JSON.parse(r);
203
- s && s(i);
202
+ const o = JSON.parse(r);
203
+ s && s(o);
204
204
  },
205
205
  onFailure(r, c) {
206
206
  const a = r;
@@ -208,14 +208,14 @@ function Se(e, t, s = void 0, n = void 0) {
208
208
  }
209
209
  });
210
210
  }
211
- const F = {
211
+ const D = {
212
212
  "Content-Type": "application/json",
213
213
  Accept: "application/json,text/javascript,*/*"
214
214
  };
215
215
  function _e(e, t, s = void 0, n = void 0) {
216
- const { space: o, currentUser: r } = e, a = `${o}${{
216
+ const { space: i, currentUser: r } = e, a = `${i}${{
217
217
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
218
- }.URIUGr}`, i = {
218
+ }.URIUGr}`, o = {
219
219
  groups: [
220
220
  {
221
221
  title: t.title,
@@ -229,8 +229,8 @@ function _e(e, t, s = void 0, n = void 0) {
229
229
  };
230
230
  m(a, {
231
231
  method: "POST",
232
- headers: F,
233
- data: JSON.stringify(i),
232
+ headers: D,
233
+ data: JSON.stringify(o),
234
234
  onComplete(d) {
235
235
  s && s(JSON.parse(d));
236
236
  },
@@ -242,7 +242,7 @@ function _e(e, t, s = void 0, n = void 0) {
242
242
  });
243
243
  }
244
244
  function ye(e, t, s = void 0, n = void 0) {
245
- const { space: o, tenant: r } = e, c = o, a = `/3drdfpersist/v1/resources/${t}`, i = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${c}${a}${i}`;
245
+ const { space: i, tenant: r } = e, c = i, a = `/3drdfpersist/v1/resources/${t}`, o = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${c}${a}${o}`;
246
246
  m(d, {
247
247
  opts: {
248
248
  method: "GET",
@@ -261,12 +261,12 @@ function ye(e, t, s = void 0, n = void 0) {
261
261
  });
262
262
  }
263
263
  function J(e, t = void 0, s = void 0) {
264
- const { space: n, tenant: o } = e, r = n, c = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, i = {
264
+ const { space: n, tenant: i } = e, r = n, c = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, o = {
265
265
  method: "GET",
266
266
  Accept: "application/json,*/*,test/javascript"
267
267
  }, d = `${r}${c}${a}`;
268
268
  m(d, {
269
- OPTsH: i,
269
+ OPTsH: o,
270
270
  onComplete(l) {
271
271
  t && t(JSON.parse(l));
272
272
  },
@@ -277,7 +277,7 @@ function J(e, t = void 0, s = void 0) {
277
277
  });
278
278
  }
279
279
  function we(e, t = void 0, s = void 0) {
280
- const { space: n, currentUser: o } = e, a = `${n}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
280
+ const { space: n, currentUser: i } = e, a = `${n}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
281
281
  "Content-Type": "application/json",
282
282
  Accept: "application/json,text/javascript,*/*"
283
283
  } };
@@ -286,8 +286,8 @@ function we(e, t = void 0, s = void 0) {
286
286
  opts: d,
287
287
  onComplete(l) {
288
288
  const p = JSON.parse(l), u = {}, f = p.groups.filter((g) => g.uri.startsWith("uuid:"));
289
- if (o && Object.keys(o).length > 0) {
290
- const g = f.filter((_) => _.owner === o.email), h = f.filter((_) => _.members.includes(o.email)), S = g.concat(h);
289
+ if (i && Object.keys(i).length > 0) {
290
+ const g = f.filter((_) => _.owner === i.email), h = f.filter((_) => _.members.includes(i.email)), S = g.concat(h);
291
291
  u.iam = S, u.UG = f, u.iamMember = h, J(
292
292
  e,
293
293
  (_) => {
@@ -308,12 +308,12 @@ function we(e, t = void 0, s = void 0) {
308
308
  }
309
309
  }
310
310
  function Te(e, t) {
311
- const { space: s } = e, o = `${s}/3drdfpersist/resources/v1/usersgroup/${t}`;
312
- m(o, {
311
+ const { space: s } = e, i = `${s}/3drdfpersist/resources/v1/usersgroup/${t}`;
312
+ m(i, {
313
313
  method: "DELETE"
314
314
  });
315
315
  }
316
- function Ce(e, t, s, n = void 0, o = void 0) {
316
+ function Ce(e, t, s, n = void 0, i = void 0) {
317
317
  const { space: r, tenant: c } = e, a = {
318
318
  URITI: "/3drdfpersist/resources/v1/template-instances",
319
319
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
@@ -322,9 +322,9 @@ function Ce(e, t, s, n = void 0, o = void 0) {
322
322
  nexURImem: "/members",
323
323
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
324
324
  OPTsTenant: `tenant=dstenant:${c}`
325
- }, i = s, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(i);
325
+ }, o = s, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(o);
326
326
  m(d, {
327
- headers: F,
327
+ headers: D,
328
328
  method: "PATCH",
329
329
  data: l,
330
330
  type: "json",
@@ -332,27 +332,27 @@ function Ce(e, t, s, n = void 0, o = void 0) {
332
332
  n && n(p);
333
333
  },
334
334
  onFailure(p) {
335
- o && o(p);
335
+ i && i(p);
336
336
  }
337
337
  });
338
338
  }
339
- function Oe(e, t, s, n = void 0, o = void 0) {
339
+ function Oe(e, t, s, n = void 0, i = void 0) {
340
340
  const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
341
341
  m(a, {
342
342
  method: "PATCH",
343
- headers: F,
343
+ headers: D,
344
344
  data: JSON.stringify(s),
345
345
  type: "json",
346
346
  onComplete(d) {
347
347
  n && n(d);
348
348
  },
349
349
  onFailure(d) {
350
- o && o(d);
350
+ i && i(d);
351
351
  }
352
352
  });
353
353
  }
354
354
  function be(e, t, s = void 0, n = void 0) {
355
- const { space: o } = e, c = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
355
+ const { space: i } = e, c = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
356
  m(c, {
357
357
  opts: {
358
358
  method: "GET",
@@ -373,24 +373,24 @@ async function E(e, t, s) {
373
373
  if (e.space) {
374
374
  const n = `${e.space}/resources/v1/application/CSRF`;
375
375
  m(n, {
376
- onComplete(o) {
377
- o = JSON.parse(o), t && t(o.csrf);
376
+ onComplete(i) {
377
+ i = JSON.parse(i), t && t(i.csrf);
378
378
  },
379
- onFailure(o, r, c) {
380
- s && s({ error: o, headers: r, xhr: c });
379
+ onFailure(i, r, c) {
380
+ s && s({ error: i, headers: r, xhr: c });
381
381
  }
382
382
  });
383
383
  }
384
384
  }
385
385
  async function G(e, t = void 0, s = void 0, n = void 0) {
386
- const o = e.space;
386
+ const i = e.space;
387
387
  if (t === void 0) {
388
388
  console.log("Le paramètre docid est obligatoire");
389
389
  return;
390
390
  }
391
- const r = o + `/resources/v1/modeler/documents/${t}`;
391
+ const r = i + `/resources/v1/modeler/documents/${t}`;
392
392
  m(r, {
393
- onComplete(c, a, i) {
393
+ onComplete(c, a, o) {
394
394
  const d = JSON.parse(c);
395
395
  s && s(d);
396
396
  },
@@ -403,12 +403,12 @@ function k(e, t = void 0, s = void 0) {
403
403
  if (e.objID && e.objID !== "") {
404
404
  let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
405
405
  m(n, {
406
- onComplete(o, r, c) {
407
- const a = JSON.parse(o);
406
+ onComplete(i, r, c) {
407
+ const a = JSON.parse(i);
408
408
  e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
409
409
  },
410
- onFailure(o) {
411
- s && s(o);
410
+ onFailure(i) {
411
+ s && s(i);
412
412
  }
413
413
  });
414
414
  } else
@@ -426,13 +426,13 @@ function C(e, t = void 0, s = void 0) {
426
426
  if (e.space) {
427
427
  const n = e.space + "/resources/v1/application/CSRF";
428
428
  m(n, {
429
- onComplete(o, r, c) {
430
- const a = JSON.parse(o);
429
+ onComplete(i, r, c) {
430
+ const a = JSON.parse(i);
431
431
  t && t(a.csrf.value);
432
432
  },
433
- onFailure(o, r, c) {
433
+ onFailure(i, r, c) {
434
434
  s && s({
435
- response: o,
435
+ response: i,
436
436
  headers: r,
437
437
  xhr: c
438
438
  });
@@ -445,7 +445,7 @@ function A(e, t = void 0, s = void 0) {
445
445
  let n = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
446
446
  k(
447
447
  e,
448
- (o) => {
448
+ (i) => {
449
449
  m(n, {
450
450
  method: "PUT",
451
451
  headers: {
@@ -460,12 +460,12 @@ function A(e, t = void 0, s = void 0) {
460
460
  }
461
461
  });
462
462
  },
463
- (o) => {
464
- console.warn("_3DSpace_get_ticket / error => ", o), s && s(o);
463
+ (i) => {
464
+ console.warn("_3DSpace_get_ticket / error => ", i), s && s(i);
465
465
  }
466
466
  );
467
467
  }
468
- function Ne(e, t, s, n = void 0, o = void 0) {
468
+ function Ne(e, t, s, n = void 0, i = void 0) {
469
469
  const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
470
470
  s || (s = e.token), m(r, {
471
471
  method: "PUT",
@@ -476,18 +476,18 @@ function Ne(e, t, s, n = void 0, o = void 0) {
476
476
  let a = JSON.parse(c);
477
477
  if (console.log("☠️ info => ", a), a.success === !0)
478
478
  try {
479
- const i = a.data[0].dataelements.ticketURL;
480
- n && n(i);
481
- } catch (i) {
482
- o && o(i);
479
+ const o = a.data[0].dataelements.ticketURL;
480
+ n && n(o);
481
+ } catch (o) {
482
+ i && i(o);
483
483
  }
484
484
  },
485
485
  onFailure(c) {
486
- o && o(c);
486
+ i && i(c);
487
487
  }
488
488
  });
489
489
  }
490
- function K(e, t, s, n, o, r = void 0, c = void 0) {
490
+ function K(e, t, s, n, i, r = void 0, c = void 0) {
491
491
  k(
492
492
  e,
493
493
  t,
@@ -497,7 +497,7 @@ function K(e, t, s, n, o, r = void 0, c = void 0) {
497
497
  t,
498
498
  s,
499
499
  n,
500
- o,
500
+ i,
501
501
  a.csrf.value,
502
502
  r,
503
503
  c
@@ -505,16 +505,16 @@ function K(e, t, s, n, o, r = void 0, c = void 0) {
505
505
  }
506
506
  );
507
507
  }
508
- function X(e, t, s, n, o, r, c = void 0, a = void 0) {
509
- const i = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
510
- m(i, {
508
+ function X(e, t, s, n, i, r, c = void 0, a = void 0) {
509
+ const o = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
510
+ m(o, {
511
511
  method: "PUT",
512
512
  headers: {
513
513
  ENO_CSRF_TOKEN: r
514
514
  },
515
515
  onComplete(d, l, p) {
516
516
  const u = JSON.parse(d).data[0].dataelements, f = new FormData();
517
- f.append("__fcs__jobTicket", u.ticket), f.append("file_0", n, o);
517
+ f.append("__fcs__jobTicket", u.ticket), f.append("file_0", n, i);
518
518
  const g = {};
519
519
  g.method = "POST", g.data = f, g.onComplete = function(h) {
520
520
  let S = "temp_" + Date.now(), _ = {
@@ -529,7 +529,7 @@ function X(e, t, s, n, o, r, c = void 0, a = void 0) {
529
529
  files: [{
530
530
  id: s,
531
531
  dataelements: {
532
- title: o,
532
+ title: i,
533
533
  receipt: h
534
534
  },
535
535
  updateAction: "REVISE"
@@ -556,12 +556,12 @@ function X(e, t, s, n, o, r, c = void 0, a = void 0) {
556
556
  }
557
557
  });
558
558
  }
559
- async function ke(e, t, s, n, o = void 0, r = void 0) {
560
- const c = e.space, a = e.token, i = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
559
+ async function ke(e, t, s, n, i = void 0, r = void 0) {
560
+ const c = e.space, a = e.token, o = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
561
561
  type: "text/plain"
562
562
  }), p = {
563
563
  url_Ticket: `${c}/resources/v1/modeler/documents/files/CheckinTicket`,
564
- url_Post: `${c}/resources/v1/modeler/documents/?SecurityContext=ctx::${i}`
564
+ url_Post: `${c}/resources/v1/modeler/documents/?SecurityContext=ctx::${o}`
565
565
  };
566
566
  if (!c && c !== "") {
567
567
  console.log("le store._3DSpace est vide");
@@ -579,8 +579,8 @@ async function ke(e, t, s, n, o = void 0, r = void 0) {
579
579
  method: "POST",
580
580
  data: d,
581
581
  onComplete(T) {
582
- if (i !== "" && a !== "") {
583
- const D = {
582
+ if (o !== "" && a !== "") {
583
+ const F = {
584
584
  method: "POST",
585
585
  headers: {
586
586
  ENO_CSRF_TOKEN: a,
@@ -611,29 +611,29 @@ async function ke(e, t, s, n, o = void 0, r = void 0) {
611
611
  onComplete: _,
612
612
  onFailure: y
613
613
  };
614
- i !== "" && m(p.url_Post, D);
614
+ o !== "" && m(p.url_Post, F);
615
615
  } else
616
616
  console.warn("le store est vide");
617
617
  },
618
618
  onFailure: y
619
619
  };
620
620
  function _(T) {
621
- console.log("Success -- response ", T.data[0]), o && o(T);
621
+ console.log("Success -- response ", T.data[0]), i && i(T);
622
622
  }
623
- function y(T, D) {
623
+ function y(T, F) {
624
624
  console.log("Erreur -- response ", T, `
625
- headers `, D), r && r(T);
625
+ headers `, F), r && r(T);
626
626
  }
627
627
  m(h.ticketURL, S);
628
628
  }
629
629
  });
630
630
  }
631
- function N(e, t = void 0, s = void 0, n = void 0, o = void 0, r = void 0, c = !1) {
631
+ function N(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, c = !1) {
632
632
  const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
633
633
  m(a, {
634
634
  method: "GET",
635
- onComplete(i) {
636
- const d = JSON.parse(i);
635
+ onComplete(o) {
636
+ const d = JSON.parse(o);
637
637
  let l = "", p, u, f;
638
638
  if (t) {
639
639
  let g = d.collabspaces.find((h) => h.title === t);
@@ -667,11 +667,11 @@ function N(e, t = void 0, s = void 0, n = void 0, o = void 0, r = void 0, c = !1
667
667
  }));
668
668
  }
669
669
  }
670
- p && u && f ? (l = f + "." + u + "." + p, o(l)) : d.preferredcredentials && c ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, o(l)) : r && (l = f + "." + u + "." + p, r(l));
670
+ p && u && f ? (l = f + "." + u + "." + p, i(l)) : d.preferredcredentials && c ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(l)) : r && (l = f + "." + u + "." + p, r(l));
671
671
  },
672
- onFailure(i, d) {
672
+ onFailure(o, d) {
673
673
  console.log("Erreur de récupération du contexte de sécurité. => ", {
674
- err: i,
674
+ err: o,
675
675
  headers: d
676
676
  });
677
677
  }
@@ -692,7 +692,7 @@ async function I(e, t = void 0, s = void 0) {
692
692
  }
693
693
  ), console.warn(
694
694
  "_3DSpace_download_doc() / Le paramètre token est obligatoire"
695
- )), new Promise((n, o) => {
695
+ )), new Promise((n, i) => {
696
696
  A(
697
697
  e,
698
698
  (r) => {
@@ -702,49 +702,49 @@ async function I(e, t = void 0, s = void 0) {
702
702
  Accept: "application/json"
703
703
  },
704
704
  onComplete(a) {
705
- let i;
705
+ let o;
706
706
  try {
707
- i = JSON.parse(a);
707
+ o = JSON.parse(a);
708
708
  } catch {
709
- i = a;
709
+ o = a;
710
710
  }
711
- t && t(i), n(i);
711
+ t && t(o), n(o);
712
712
  },
713
- onFailure(a, i, d) {
713
+ onFailure(a, o, d) {
714
714
  s && (console.log("error http", a), s({
715
715
  msg: JSON.parse(a),
716
- headers: i,
716
+ headers: o,
717
717
  xhr: d
718
- }), o({
718
+ }), i({
719
719
  msg: JSON.parse(a),
720
- headers: i,
720
+ headers: o,
721
721
  xhr: d
722
722
  }));
723
723
  }
724
724
  });
725
725
  },
726
726
  (r) => {
727
- s && s(r), console.log("*_3dspace_download_doc / error file URL *", r), o(r);
727
+ s && s(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
728
728
  }
729
729
  );
730
730
  });
731
731
  }
732
732
  async function W(e, t, s = void 0, n = void 0) {
733
- let o = [];
733
+ let i = [];
734
734
  if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
735
735
  for (let a = 0; a < t.length; a += 80) {
736
- const i = t.slice(a, a + 80);
737
- o.push(i);
736
+ const o = t.slice(a, a + 80);
737
+ i.push(o);
738
738
  }
739
739
  const c = (a) => {
740
740
  V(
741
741
  e,
742
- o[a],
742
+ i[a],
743
743
  () => {
744
- a++, a < o.length && c(a);
744
+ a++, a < i.length && c(a);
745
745
  },
746
- (i) => {
747
- s && s(i);
746
+ (o) => {
747
+ s && s(o);
748
748
  }
749
749
  );
750
750
  };
@@ -752,11 +752,11 @@ async function W(e, t, s = void 0, n = void 0) {
752
752
  } else
753
753
  console.warn("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."), n && n("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini.");
754
754
  }
755
- function V(e, t, s = void 0, n = void 0, o = void 0) {
755
+ function V(e, t, s = void 0, n = void 0, i = void 0) {
756
756
  const r = [];
757
- t.forEach((i) => {
757
+ t.forEach((o) => {
758
758
  r.push({
759
- id: i
759
+ id: o
760
760
  });
761
761
  });
762
762
  let c = JSON.stringify({
@@ -771,9 +771,9 @@ function V(e, t, s = void 0, n = void 0, o = void 0) {
771
771
  method: "PUT",
772
772
  data: c,
773
773
  type: "json",
774
- onComplete(i) {
775
- const d = i.data;
776
- i.success === !0 && (s && s(), d.forEach((l) => {
774
+ onComplete(o) {
775
+ const d = o.data;
776
+ o.success === !0 && (s && s(), d.forEach((l) => {
777
777
  try {
778
778
  const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
779
779
  m(u, {
@@ -789,17 +789,17 @@ function V(e, t, s = void 0, n = void 0, o = void 0) {
789
789
  }
790
790
  });
791
791
  } catch (p) {
792
- console.log(p), o && o(p);
792
+ console.log(p), i && i(p);
793
793
  }
794
794
  }));
795
795
  },
796
- onFailure(i) {
797
- console.log(i), o && o(i);
796
+ onFailure(o) {
797
+ console.log(o), i && i(o);
798
798
  }
799
799
  });
800
800
  }
801
- function De(e, t, s = void 0, n = void 0) {
802
- return new Promise((o) => {
801
+ function Fe(e, t, s = void 0, n = void 0) {
802
+ return new Promise((i) => {
803
803
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
804
804
  const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
805
805
  N(
@@ -837,7 +837,7 @@ function De(e, t, s = void 0, n = void 0) {
837
837
  }
838
838
  });
839
839
  }
840
- function Fe(e, t, s, n = void 0, o = void 0) {
840
+ function De(e, t, s, n = void 0, i = void 0) {
841
841
  return new Promise((r) => {
842
842
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
843
843
  const c = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
@@ -846,9 +846,9 @@ function Fe(e, t, s, n = void 0, o = void 0) {
846
846
  "ESPACE COMMUN",
847
847
  ["VPLMProjectLeader", "VPLMCreator"],
848
848
  void 0,
849
- (i) => e.ctx = i,
850
- (i) => {
851
- console.log("onError =>", i);
849
+ (o) => e.ctx = o,
850
+ (o) => {
851
+ console.log("onError =>", o);
852
852
  }
853
853
  );
854
854
  let a = {
@@ -866,11 +866,11 @@ function Fe(e, t, s, n = void 0, o = void 0) {
866
866
  }]
867
867
  }),
868
868
  type: "json",
869
- onComplete(i) {
870
- n && n(i);
869
+ onComplete(o) {
870
+ n && n(o);
871
871
  },
872
- onFailure(i) {
873
- o && o(i);
872
+ onFailure(o) {
873
+ i && i(o);
874
874
  }
875
875
  };
876
876
  m(c, a);
@@ -878,7 +878,7 @@ function Fe(e, t, s, n = void 0, o = void 0) {
878
878
  });
879
879
  }
880
880
  function Ae(e, t, s = void 0, n = void 0) {
881
- return new Promise((o) => {
881
+ return new Promise((i) => {
882
882
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
883
883
  const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
884
884
  N(
@@ -917,7 +917,7 @@ function Ae(e, t, s = void 0, n = void 0) {
917
917
  });
918
918
  }
919
919
  function $e(e, t, s = void 0, n = void 0) {
920
- return new Promise((o) => {
920
+ return new Promise((i) => {
921
921
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
922
922
  const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
923
923
  N(
@@ -961,7 +961,7 @@ function $e(e, t, s = void 0, n = void 0) {
961
961
  }
962
962
  });
963
963
  }
964
- function Ue(e, t, s, n = void 0, o = void 0) {
964
+ function Ue(e, t, s, n = void 0, i = void 0) {
965
965
  return new Promise((r) => {
966
966
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
967
967
  const c = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
@@ -970,9 +970,9 @@ function Ue(e, t, s, n = void 0, o = void 0) {
970
970
  "ESPACE COMMUN",
971
971
  ["VPLMProjectLeader", "VPLMCreator"],
972
972
  void 0,
973
- (i) => e.ctx = i,
974
- (i) => {
975
- console.log("onError =>", i);
973
+ (o) => e.ctx = o,
974
+ (o) => {
975
+ console.log("onError =>", o);
976
976
  }
977
977
  );
978
978
  let a = {
@@ -995,11 +995,11 @@ function Ue(e, t, s, n = void 0, o = void 0) {
995
995
  notificationTimeout: 600
996
996
  }),
997
997
  type: "json",
998
- onComplete(i) {
999
- n && n(i);
998
+ onComplete(o) {
999
+ n && n(o);
1000
1000
  },
1001
- onFailure(i) {
1002
- o && o(i);
1001
+ onFailure(o) {
1002
+ i && i(o);
1003
1003
  }
1004
1004
  };
1005
1005
  m(c, a);
@@ -1007,7 +1007,7 @@ function Ue(e, t, s, n = void 0, o = void 0) {
1007
1007
  });
1008
1008
  }
1009
1009
  function je(e, t, s = void 0, n = void 0) {
1010
- return new Promise((o) => {
1010
+ return new Promise((i) => {
1011
1011
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
1012
1012
  const r = b.now().ts;
1013
1013
  `${e.space}`;
@@ -1047,11 +1047,11 @@ function je(e, t, s = void 0, n = void 0) {
1047
1047
  tenant: e._platformId
1048
1048
  }),
1049
1049
  type: "json",
1050
- onComplete(i) {
1051
- console.log(i);
1050
+ onComplete(o) {
1051
+ s && s(o);
1052
1052
  },
1053
- onFailure(i) {
1054
- console.warn(i);
1053
+ onFailure(o) {
1054
+ n && n(o);
1055
1055
  }
1056
1056
  };
1057
1057
  JSON.stringify({
@@ -1080,8 +1080,8 @@ function Re(e, t = void 0, s = void 0) {
1080
1080
  base: `${e.space}`,
1081
1081
  uri: "/resources/bps/cspaces",
1082
1082
  optTenant: `tenant=${e.tenant}`
1083
- }, o = `${n.base}${n.uri}?${n.optTenant}`;
1084
- m(o, {
1083
+ }, i = `${n.base}${n.uri}?${n.optTenant}`;
1084
+ m(i, {
1085
1085
  method: "GET",
1086
1086
  headers: {
1087
1087
  Accept: "application/json,text/javascript,*/*",
@@ -1100,8 +1100,8 @@ function Ie(e, t, s, n) {
1100
1100
  A(
1101
1101
  e.space,
1102
1102
  t,
1103
- (o) => {
1104
- m(o, {
1103
+ (i) => {
1104
+ m(i, {
1105
1105
  header: { ENO_CSRF_TOKEN: e.token },
1106
1106
  onComplete: (r) => {
1107
1107
  s && s(r);
@@ -1114,35 +1114,35 @@ function Ie(e, t, s, n) {
1114
1114
  );
1115
1115
  }
1116
1116
  async function ve(e, t, s = void 0, n = void 0) {
1117
- return new Promise((o) => {
1117
+ return new Promise((i) => {
1118
1118
  A(e, t, (r) => {
1119
1119
  m(r, {
1120
- onComplete: (c, a, i) => (o(JSON.parse(c)), s && s(JSON.parse(c), a, i), o),
1121
- onFailure: (c, a, i) => {
1122
- n && n(c, a, i), console.log(c, a?.errormsg);
1120
+ onComplete: (c, a, o) => (i(JSON.parse(c)), s && s(JSON.parse(c), a, o), i),
1121
+ onFailure: (c, a, o) => {
1122
+ n && n(c, a, o), console.log(c, a?.errormsg);
1123
1123
  }
1124
1124
  });
1125
1125
  });
1126
1126
  });
1127
1127
  }
1128
- function Pe(e, t, s, n = void 0, o = void 0) {
1128
+ function Pe(e, t, s, n = void 0, i = void 0) {
1129
1129
  const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1130
1130
  k(
1131
1131
  e,
1132
1132
  s,
1133
1133
  (c) => {
1134
- const a = c.data[0].relateddata.files[0].id, i = c.data[0].dataelements.secondaryTitle !== "" ? c.data[0].dataelements.secondaryTitle : c.data[0].dataelements.title;
1134
+ const a = c.data[0].relateddata.files[0].id, o = c.data[0].dataelements.secondaryTitle !== "" ? c.data[0].dataelements.secondaryTitle : c.data[0].dataelements.title;
1135
1135
  K(
1136
1136
  e,
1137
1137
  s,
1138
1138
  a,
1139
1139
  r,
1140
- i,
1140
+ o,
1141
1141
  (d) => {
1142
1142
  n && n(d);
1143
1143
  },
1144
1144
  (d) => {
1145
- o && o(d);
1145
+ i && i(d);
1146
1146
  }
1147
1147
  );
1148
1148
  }
@@ -1173,8 +1173,8 @@ async function Me(e, t = void 0, s = void 0) {
1173
1173
  console.log("getDatasByTenant (getDocuments)", e), await I(
1174
1174
  e,
1175
1175
  (n) => {
1176
- const o = {};
1177
- o.obj = n, console.log("getDatasByTenant (getDocuments) _datas", o), t && t?.(o);
1176
+ const i = {};
1177
+ i.obj = n, console.log("getDatasByTenant (getDocuments) _datas", i), t && t?.(i);
1178
1178
  },
1179
1179
  (n) => {
1180
1180
  s && s?.(n);
@@ -1187,12 +1187,12 @@ function Le(e, t = void 0, s = void 0) {
1187
1187
  console.warn("la liste est vide ou n'est pas un tableau");
1188
1188
  return;
1189
1189
  }
1190
- e.objIds.forEach((o, r) => {
1190
+ e.objIds.forEach((i, r) => {
1191
1191
  I(
1192
1192
  e,
1193
- o.objID,
1193
+ i.objID,
1194
1194
  (c) => {
1195
- n.push({ [o.name]: c }), o.name === "dbProjets" && (v = c.affaires.map((a) => a.objectID), B(e, P)), r === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
1195
+ n.push({ [i.name]: c }), i.name === "dbProjets" && (v = c.affaires.map((a) => a.objectID), B(e, P)), r === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
1196
1196
  }
1197
1197
  );
1198
1198
  });
@@ -1201,12 +1201,12 @@ function B(e, t, s = void 0, n = void 0) {
1201
1201
  W(
1202
1202
  e,
1203
1203
  v,
1204
- (o) => {
1204
+ (i) => {
1205
1205
  const r = [...t];
1206
- r.find((c) => c.objectID === o.objectId).data = o.data, P = r, $.push(o.data), s && s($);
1206
+ r.find((c) => c.objectID === i.objectId).data = i.data, P = r, $.push(i.data), s && s($);
1207
1207
  },
1208
- (o) => {
1209
- n && (n(o), console.log(o));
1208
+ (i) => {
1209
+ n && (n(i), console.log(i));
1210
1210
  }
1211
1211
  );
1212
1212
  }
@@ -1231,11 +1231,11 @@ const Y = "FA35FB9B177A280065800EA0000F599C", q = [
1231
1231
  tag: "testTag"
1232
1232
  };
1233
1233
  function Je(e, t, s = void 0, n = void 0) {
1234
- const { space: o, tenant: r } = e, { objId: c, pred: a, tag: i } = t, d = {
1234
+ const { space: i, tenant: r } = e, { objId: c, pred: a, tag: o } = t, d = {
1235
1235
  uri: "/resources/6w/tags",
1236
1236
  otpCTX: "SecurityContext=preferred",
1237
1237
  optTenant: `tenant=${r}`
1238
- }, l = `${o}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1238
+ }, l = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1239
1239
  tag: [
1240
1240
  {
1241
1241
  subject: [
@@ -1245,7 +1245,7 @@ function Je(e, t, s = void 0, n = void 0) {
1245
1245
  ],
1246
1246
  predicate: x[a],
1247
1247
  object: {
1248
- literal: i
1248
+ literal: o
1249
1249
  }
1250
1250
  }
1251
1251
  ]
@@ -1292,17 +1292,17 @@ function Je(e, t, s = void 0, n = void 0) {
1292
1292
  }
1293
1293
  function z(e, t, s = void 0, n = void 0) {
1294
1294
  console.log("obj ", t);
1295
- const o = t.info.name, r = {
1295
+ const i = t.info.name, r = {
1296
1296
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1297
1297
  uri: "/federated/search"
1298
1298
  }, c = `${r.baseUrl}${r.uri}`, a = {
1299
1299
  "Content-Type": "application/json",
1300
1300
  Accept: "application/json,text/javascript,*/*"
1301
- }, i = R(), d = {
1301
+ }, o = R(), d = {
1302
1302
  with_indexing_date: !0,
1303
1303
  with_synthesis: !0,
1304
1304
  with_nls: !1,
1305
- label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${i}`,
1305
+ label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${o}`,
1306
1306
  locale: "fr",
1307
1307
  select_predicate: [
1308
1308
  "ds6w:label",
@@ -1330,7 +1330,7 @@ function z(e, t, s = void 0, n = void 0) {
1330
1330
  ],
1331
1331
  with_synthesis_hierarchical: !0,
1332
1332
  select_file: ["icon", "thumbnail_2d"],
1333
- query: o,
1333
+ query: i,
1334
1334
  specific_source_parameter: {
1335
1335
  "3dspace": {
1336
1336
  additional_query: ' AND NOT (owner:"ENOVIA_CLOUD" OR owner:"Service Creator" OR owner:"Corporate" OR owner:"User Agent" OR owner:"SLMInstallerAdmin" OR owner:"Creator" OR owner:"VPLMAdminUser") AND (ds6w_58_islastrevisionperstate:true OR NOT listoffields:ds6w_58_islastrevisionperstate)'
@@ -1374,16 +1374,16 @@ function z(e, t, s = void 0, n = void 0) {
1374
1374
  });
1375
1375
  }
1376
1376
  function Ee(e, t, s = void 0, n = void 0) {
1377
- const { objId: o, pred: r, tag: c } = t, a = {
1377
+ const { objId: i, pred: r, tag: c } = t, a = {
1378
1378
  uri: "/resources/6w/tags",
1379
1379
  otpCTX: "SecurityContext=preferred",
1380
1380
  optTenant: `tenant=${e.tenant}`
1381
- }, i = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1381
+ }, o = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1382
1382
  tag: [
1383
1383
  {
1384
1384
  subject: [
1385
1385
  {
1386
- uri: `pid://${o}`
1386
+ uri: `pid://${i}`
1387
1387
  }
1388
1388
  ],
1389
1389
  predicate: x[r],
@@ -1393,7 +1393,7 @@ function Ee(e, t, s = void 0, n = void 0) {
1393
1393
  }
1394
1394
  ]
1395
1395
  };
1396
- m(i, {
1396
+ m(o, {
1397
1397
  method: "DELETE",
1398
1398
  data: JSON.stringify(d),
1399
1399
  headers: {
@@ -1410,7 +1410,7 @@ function Ee(e, t, s = void 0, n = void 0) {
1410
1410
  });
1411
1411
  }
1412
1412
  function Ge(e, t = "", s = void 0, n = void 0) {
1413
- const { space: o } = e;
1413
+ const { space: i } = e;
1414
1414
  if (t === "")
1415
1415
  return;
1416
1416
  const r = {
@@ -1418,11 +1418,11 @@ function Ge(e, t = "", s = void 0, n = void 0) {
1418
1418
  }, c = {
1419
1419
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1420
1420
  Accept: "application/json,text/javascript,*/*"
1421
- }, a = `${o}${r.uri}`, i = `$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}`;
1421
+ }, a = `${i}${r.uri}`, o = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;
1422
1422
  m(a, {
1423
1423
  method: "POST",
1424
1424
  headers: c,
1425
- data: i,
1425
+ data: o,
1426
1426
  onComplete(d) {
1427
1427
  s && s(JSON.parse(d));
1428
1428
  },
@@ -1435,18 +1435,18 @@ function Ge(e, t = "", s = void 0, n = void 0) {
1435
1435
  async function w(e, t = void 0, s = void 0) {
1436
1436
  const n = e.space + "/api/index/tk";
1437
1437
  return m(n, {
1438
- onComplete(o, r, c) {
1439
- const a = JSON.parse(o);
1438
+ onComplete(i, r, c) {
1439
+ const a = JSON.parse(i);
1440
1440
  if (t)
1441
1441
  return t(a), e.token = a?.result?.ServerToken;
1442
1442
  },
1443
- onFailure(o) {
1444
- s && s(o);
1443
+ onFailure(i) {
1444
+ s && s(i);
1445
1445
  }
1446
1446
  });
1447
1447
  }
1448
1448
  function Ke(e, t = void 0, s = void 0) {
1449
- const n = `${e.space}/api/exalead/whatsnew`, o = {
1449
+ const n = `${e.space}/api/exalead/whatsnew`, i = {
1450
1450
  params: {
1451
1451
  community_id: null,
1452
1452
  hash_key: null,
@@ -1464,7 +1464,7 @@ function Ke(e, t = void 0, s = void 0) {
1464
1464
  "Content-type": "application/json;charset=UTF-8",
1465
1465
  Accept: "application/json"
1466
1466
  },
1467
- data: JSON.stringify(o),
1467
+ data: JSON.stringify(i),
1468
1468
  type: "json",
1469
1469
  onComplete(c, a) {
1470
1470
  t && t(c, a);
@@ -1476,7 +1476,7 @@ function Ke(e, t = void 0, s = void 0) {
1476
1476
  });
1477
1477
  }
1478
1478
  function Xe(e, t = void 0, s = void 0) {
1479
- const n = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, o = {
1479
+ const n = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
1480
1480
  params: {
1481
1481
  idsToFilterArr: [],
1482
1482
  mode: "offline",
@@ -1493,11 +1493,11 @@ function Xe(e, t = void 0, s = void 0) {
1493
1493
  "Content-type": "application/json;charset=UTF-8",
1494
1494
  Accept: "application/json"
1495
1495
  },
1496
- data: JSON.stringify(o),
1496
+ data: JSON.stringify(i),
1497
1497
  type: "json",
1498
1498
  onComplete(c, a) {
1499
- const i = c.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1500
- t && t(i, c);
1499
+ const o = c.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1500
+ t && t(o, c);
1501
1501
  },
1502
1502
  onFailure(c, a) {
1503
1503
  s && s(c, a);
@@ -1511,14 +1511,14 @@ function We(e, t = void 0, s = void 0) {
1511
1511
  uri: "/api/community/listmycommunities",
1512
1512
  limit: `/limit/${e.limit ? e.limit : 128}`,
1513
1513
  page: `/page/${e.page ? e.page : "1"}`
1514
- }, o = `${n.base}${n.uri}${n.limit}${n.page}`, r = [];
1514
+ }, i = `${n.base}${n.uri}${n.limit}${n.page}`, r = [];
1515
1515
  w(e, (c) => {
1516
- m(o, {
1516
+ m(i, {
1517
1517
  method: "GET",
1518
1518
  headers: {
1519
1519
  "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1520
1520
  },
1521
- onComplete(a, i, d) {
1521
+ onComplete(a, o, d) {
1522
1522
  const p = JSON.parse(a).result;
1523
1523
  let u = 0;
1524
1524
  p.forEach((f) => {
@@ -1540,15 +1540,15 @@ function We(e, t = void 0, s = void 0) {
1540
1540
  );
1541
1541
  });
1542
1542
  },
1543
- onFailure(a, i) {
1543
+ onFailure(a, o) {
1544
1544
  const d = a;
1545
- d.status = i.status, d.response = i.errormsg, s && s(d);
1545
+ d.status = o.status, d.response = o.errormsg, s && s(d);
1546
1546
  }
1547
1547
  });
1548
1548
  });
1549
1549
  }
1550
1550
  function Q(e, t, s, n) {
1551
- const o = `${e.space}/api/community/listmembers`, r = {
1551
+ const i = `${e.space}/api/community/listmembers`, r = {
1552
1552
  params: {
1553
1553
  page: e.page ? e.page : 1,
1554
1554
  limit: e.limit ? e.limit : 50,
@@ -1556,7 +1556,7 @@ function Q(e, t, s, n) {
1556
1556
  }
1557
1557
  };
1558
1558
  w(e, (c) => {
1559
- m(o, {
1559
+ m(i, {
1560
1560
  method: "POST",
1561
1561
  headers: {
1562
1562
  "Content-type": "application/json;charset=UTF-8",
@@ -1565,12 +1565,12 @@ function Q(e, t, s, n) {
1565
1565
  },
1566
1566
  data: JSON.stringify(r),
1567
1567
  type: "json",
1568
- onComplete(a, i, d) {
1568
+ onComplete(a, o, d) {
1569
1569
  s && s(a);
1570
1570
  },
1571
- onFailure(a, i) {
1571
+ onFailure(a, o) {
1572
1572
  const d = a;
1573
- d.status = i.status, d.response = i.errormsg, n && n(d);
1573
+ d.status = o.status, d.response = o.errormsg, n && n(d);
1574
1574
  }
1575
1575
  });
1576
1576
  });
@@ -1578,9 +1578,9 @@ function Q(e, t, s, n) {
1578
1578
  function Ve(e, t = void 0, s = void 0) {
1579
1579
  const n = "YXdA5x4DSUKtlAi2wmnyTA";
1580
1580
  e.commu_id || (e.commu_id = n);
1581
- const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1581
+ const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1582
1582
  w(e, (r) => {
1583
- m(o, {
1583
+ m(i, {
1584
1584
  method: "GET",
1585
1585
  headers: {
1586
1586
  "Content-type": "application/json;charset=UTF-8",
@@ -1592,18 +1592,18 @@ function Ve(e, t = void 0, s = void 0) {
1592
1592
  t && t(a);
1593
1593
  },
1594
1594
  onFailure(c, a) {
1595
- const i = c;
1596
- i.status = a.status, i.response = a.errormsg, s && s(i);
1595
+ const o = c;
1596
+ o.status = a.status, o.response = a.errormsg, s && s(o);
1597
1597
  }
1598
1598
  });
1599
1599
  });
1600
1600
  }
1601
1601
  function Be(e, t, s = void 0, n = void 0) {
1602
- const { listAllContacts: o, currentUser: r } = e;
1603
- console.log("__listAllContacts", o.hits);
1602
+ const { listAllContacts: i, currentUser: r } = e;
1603
+ console.log("__listAllContacts", i.hits);
1604
1604
  const c = `${e.space}/api/directmessages`, a = {
1605
1605
  users: [r.login].concat(t.receipt)
1606
- }, i = {
1606
+ }, o = {
1607
1607
  id_msg: "",
1608
1608
  senderId: e.currentUser.login,
1609
1609
  senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
@@ -1613,10 +1613,10 @@ function Be(e, t, s = void 0, n = void 0) {
1613
1613
  Z(
1614
1614
  a.users,
1615
1615
  (l) => {
1616
- l !== void 0 && (i.id_msg = l.id, d = !0, U(e, i));
1616
+ l !== void 0 && (o.id_msg = l.id, d = !0, U(e, o));
1617
1617
  },
1618
1618
  (l) => {
1619
- d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l), i.id_msg = "";
1619
+ d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l), o.id_msg = "";
1620
1620
  }
1621
1621
  ), d === !1 && setTimeout(() => {
1622
1622
  d === !1 && w(e, (l) => {
@@ -1631,7 +1631,7 @@ function Be(e, t, s = void 0, n = void 0) {
1631
1631
  type: "json",
1632
1632
  onComplete(p, u, f) {
1633
1633
  const g = p;
1634
- g.reponse = JSON.parse(f.response), g.status = f.status, s && s(g), i.id_msg = g.result.id, U(e, i);
1634
+ g.reponse = JSON.parse(f.response), g.status = f.status, s && s(g), o.id_msg = g.result.id, U(e, o);
1635
1635
  },
1636
1636
  onFailure(p, u, f) {
1637
1637
  const g = p;
@@ -1642,20 +1642,20 @@ function Be(e, t, s = void 0, n = void 0) {
1642
1642
  }, 500);
1643
1643
  }
1644
1644
  function Z(e, t, s, n) {
1645
- const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
1645
+ const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
1646
1646
  w(e, (r) => {
1647
- m(o, {
1647
+ m(i, {
1648
1648
  method: "GET",
1649
1649
  headers: {
1650
1650
  Accept: "application/json,text/javascript,*/*",
1651
1651
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1652
1652
  },
1653
1653
  onComplete(c) {
1654
- const a = JSON.parse(c), i = [];
1654
+ const a = JSON.parse(c), o = [];
1655
1655
  a.result.forEach((p) => {
1656
- p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length && i.push(p);
1656
+ p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length && o.push(p);
1657
1657
  });
1658
- const d = t.sort(), l = i.find((p) => {
1658
+ const d = t.sort(), l = o.find((p) => {
1659
1659
  const u = [];
1660
1660
  return p.users.forEach((f) => {
1661
1661
  u.push(f.login);
@@ -1671,12 +1671,12 @@ function Z(e, t, s, n) {
1671
1671
  });
1672
1672
  }
1673
1673
  function U(e, t, s = void 0, n = void 0) {
1674
- const o = {
1674
+ const i = {
1675
1675
  base: e.space,
1676
1676
  uri: "/api/community",
1677
1677
  id_msg: `${t.id_msg}`,
1678
1678
  endUri: "/instantmessages"
1679
- }, r = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, c = {
1679
+ }, r = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, c = {
1680
1680
  author: { login: t.senderId, displayName: t.senderName },
1681
1681
  accessState: null,
1682
1682
  commentUri: null,
@@ -1696,12 +1696,12 @@ function U(e, t, s = void 0, n = void 0) {
1696
1696
  },
1697
1697
  data: JSON.stringify(c),
1698
1698
  type: "json",
1699
- onComplete(i, d, l) {
1700
- const p = i;
1699
+ onComplete(o, d, l) {
1700
+ const p = o;
1701
1701
  p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), s && s(p);
1702
1702
  },
1703
- onFailure(i, d) {
1704
- const l = i;
1703
+ onFailure(o, d) {
1704
+ const l = o;
1705
1705
  l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), n && n(l);
1706
1706
  }
1707
1707
  });
@@ -1725,10 +1725,10 @@ const te = {
1725
1725
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1726
1726
  };
1727
1727
  function Ye(e, t, s = void 0, n = void 0) {
1728
- const o = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1729
- (i) => i.id === t.community_id
1728
+ const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1729
+ (o) => o.id === t.community_id
1730
1730
  ), c = e.swymCommunities.find(
1731
- (i) => i.title.toLowerCase() === t.community_title.toLowerCase()
1731
+ (o) => o.title.toLowerCase() === t.community_title.toLowerCase()
1732
1732
  ), a = {
1733
1733
  params: {
1734
1734
  title: t.title,
@@ -1741,13 +1741,13 @@ function Ye(e, t, s = void 0, n = void 0) {
1741
1741
  // 1 publier, 0 non publier
1742
1742
  }
1743
1743
  };
1744
- w(e, (i) => {
1744
+ w(e, (o) => {
1745
1745
  const d = {
1746
1746
  "Content-type": "application/json;charset=UTF-8",
1747
1747
  Accept: "application/json",
1748
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1748
+ "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1749
1749
  };
1750
- m(o, {
1750
+ m(i, {
1751
1751
  method: "POST",
1752
1752
  headers: d,
1753
1753
  data: JSON.stringify(a),
@@ -1764,14 +1764,14 @@ function Ye(e, t, s = void 0, n = void 0) {
1764
1764
  });
1765
1765
  }
1766
1766
  function qe(e, t, s = void 0, n = void 0) {
1767
- const o = `${e.space}/api/idea/delete`, r = {
1767
+ const i = `${e.space}/api/idea/delete`, r = {
1768
1768
  params: {
1769
1769
  community_id: t.community_id,
1770
1770
  ideationIds: [t.idee_id]
1771
1771
  }
1772
1772
  };
1773
1773
  w(e, (c) => {
1774
- m(o, {
1774
+ m(i, {
1775
1775
  method: "POST",
1776
1776
  headers: {
1777
1777
  "Content-type": "application/json;charset=UTF-8",
@@ -1780,19 +1780,19 @@ function qe(e, t, s = void 0, n = void 0) {
1780
1780
  },
1781
1781
  data: JSON.stringify(r),
1782
1782
  type: "json",
1783
- onComplete(a, i, d) {
1783
+ onComplete(a, o, d) {
1784
1784
  s && s(a);
1785
1785
  },
1786
- onFailure(a, i, d) {
1786
+ onFailure(a, o, d) {
1787
1787
  const l = a;
1788
- l.status = i.status, l.response = i.errormsg, n && n(l);
1788
+ l.status = o.status, l.response = o.errormsg, n && n(l);
1789
1789
  }
1790
1790
  });
1791
1791
  });
1792
1792
  }
1793
1793
  function He(e, t = "", s = void 0, n = void 0) {
1794
- const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1795
- t === "" && (t = o);
1794
+ const i = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1795
+ t === "" && (t = i);
1796
1796
  const r = `${e.space}/api/idea/get`, c = {
1797
1797
  params: {
1798
1798
  id: t
@@ -1808,23 +1808,23 @@ function He(e, t = "", s = void 0, n = void 0) {
1808
1808
  },
1809
1809
  data: JSON.stringify(c),
1810
1810
  type: "json",
1811
- onComplete(i) {
1812
- const d = i;
1811
+ onComplete(o) {
1812
+ const d = o;
1813
1813
  d.msg = d.result.message, s && s(d);
1814
1814
  },
1815
- onFailure(i) {
1816
- const d = i;
1815
+ onFailure(o) {
1816
+ const d = o;
1817
1817
  d.status = headers.status, d.response = headers.errormsg, n && n(d);
1818
1818
  }
1819
1819
  });
1820
1820
  });
1821
1821
  }
1822
1822
  function ze(e, t = te, s = void 0, n = void 0) {
1823
- const o = {
1823
+ const i = {
1824
1824
  uri: "/api/idea/list",
1825
1825
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1826
1826
  limit: `/limit/${t.limit ? t.limit : 10}`
1827
- }, r = `${e.space}${o.uri}${o.comId}${o.limit}`;
1827
+ }, r = `${e.space}${i.uri}${i.comId}${i.limit}`;
1828
1828
  w(e, (c) => {
1829
1829
  m(r, {
1830
1830
  method: "GET",
@@ -1832,12 +1832,12 @@ function ze(e, t = te, s = void 0, n = void 0) {
1832
1832
  "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1833
1833
  },
1834
1834
  onComplete(a) {
1835
- const i = JSON.parse(a);
1836
- s && s(i);
1835
+ const o = JSON.parse(a);
1836
+ s && s(o);
1837
1837
  },
1838
- onFailure(a, i) {
1838
+ onFailure(a, o) {
1839
1839
  const d = a;
1840
- d.status = i.status, d.response = i.errormsg, n && n(d);
1840
+ d.status = o.status, d.response = o.errormsg, n && n(d);
1841
1841
  }
1842
1842
  });
1843
1843
  });
@@ -1919,32 +1919,32 @@ function ne(e) {
1919
1919
  }
1920
1920
  function Qe(e, t = void 0, s = void 0) {
1921
1921
  const n = e.space + "/api/user/getcurrent/";
1922
- w(e, (o) => {
1922
+ w(e, (i) => {
1923
1923
  m(n, {
1924
1924
  method: "GET",
1925
1925
  headers: {
1926
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1926
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1927
1927
  },
1928
1928
  onComplete(r, c, a) {
1929
- const i = JSON.parse(r);
1930
- t && t(i.result);
1929
+ const o = JSON.parse(r);
1930
+ t && t(o.result);
1931
1931
  },
1932
1932
  onFailure(r, c, a) {
1933
- const i = { erreur: JSON.parse(r), headers: c, xhr: a };
1934
- s && s(i);
1933
+ const o = { erreur: JSON.parse(r), headers: c, xhr: a };
1934
+ s && s(o);
1935
1935
  }
1936
1936
  });
1937
1937
  });
1938
1938
  }
1939
1939
  function Ze(e, t, s = void 0, n = void 0) {
1940
- const o = e.space + "/api/user/find/login/" + t;
1940
+ const i = e.space + "/api/user/find/login/" + t;
1941
1941
  w(
1942
1942
  e,
1943
1943
  (r) => {
1944
- m(o, {
1944
+ m(i, {
1945
1945
  method: "GET",
1946
1946
  headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
1947
- onComplete(c, a, i) {
1947
+ onComplete(c, a, o) {
1948
1948
  const d = JSON.parse(c);
1949
1949
  s && s(d);
1950
1950
  },
@@ -1976,10 +1976,10 @@ export {
1976
1976
  N as _3DSpace_get_securityContexts,
1977
1977
  A as _3DSpace_get_ticket,
1978
1978
  Ue as _3DSpace_lifecycle_changeRevision,
1979
- Fe as _3DSpace_lifecycle_changeState,
1979
+ De as _3DSpace_lifecycle_changeState,
1980
1980
  Ae as _3DSpace_lifecycle_getGraph,
1981
1981
  $e as _3DSpace_lifecycle_getNextRevision,
1982
- De as _3DSpace_lifecycle_getNextStates,
1982
+ Fe as _3DSpace_lifecycle_getNextStates,
1983
1983
  Be as _3DSwym_buildDirectMessage,
1984
1984
  qe as _3DSwym_deleteIdea,
1985
1985
  Z as _3DSwym_findCommunityToInstantMSG,
@@ -2012,7 +2012,7 @@ export {
2012
2012
  re as findAdresse,
2013
2013
  Re as getAllContextSecurity,
2014
2014
  E as getCSRFToken,
2015
- ie as getCommunes,
2015
+ oe as getCommunes,
2016
2016
  ye as getComplementUG,
2017
2017
  Ie as getDataFrom3DSpace,
2018
2018
  ce as getDataFromGouvFr,