@beam3_dev/api_module 0.0.35 → 0.0.37

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,10 +1,10 @@
1
- import { v4 as L } from "uuid";
1
+ import { v4 as M } from "uuid";
2
2
  import { DateTime as b } from "luxon";
3
- import { requirejs as O, widget as U } from "@widget-lab/3ddashboard-utils";
4
- function v() {
5
- return L();
3
+ import { requirejs as O, widget as R } from "@widget-lab/3ddashboard-utils";
4
+ function j() {
5
+ return M();
6
6
  }
7
- const E = {
7
+ const L = {
8
8
  b3M3Yellow: "#FFB300",
9
9
  b3AboutageBlue: "#42A5F5",
10
10
  b3UsinageGreen: "#689F38",
@@ -34,7 +34,7 @@ const E = {
34
34
  b3Edit8: "#616161",
35
35
  b3Edit9: "#795548"
36
36
  };
37
- async function ce(e, t = void 0, s = void 0) {
37
+ async function re(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,
@@ -50,7 +50,7 @@ async function ce(e, t = void 0, s = void 0) {
50
50
  s && s(i), console.error("Erreur : " + i);
51
51
  });
52
52
  }
53
- async function de(e, t = void 0, s = void 0) {
53
+ async function ce(e, t = void 0, s = void 0) {
54
54
  e = encodeURIComponent(e), await fetch(
55
55
  "https://api-adresse.data.gouv.fr/search/?q=" + e + "&limit=15",
56
56
  {
@@ -65,11 +65,11 @@ async function de(e, t = void 0, s = void 0) {
65
65
  s && s(n), console.error("Erreur : " + n);
66
66
  });
67
67
  }
68
- async function le(e, t = E) {
68
+ async function de(e, t = L) {
69
69
  let s = b.now().year;
70
70
  const n = e, i = [], c = (a) => {
71
- for (let o in a)
72
- i.push({ date: o, comment: a[o] });
71
+ for (let r in a)
72
+ i.push({ date: r, comment: a[r] });
73
73
  };
74
74
  for (let a = s; a <= s + 1; a++)
75
75
  await fetch(
@@ -80,27 +80,27 @@ async function le(e, t = E) {
80
80
  Accept: "application/json"
81
81
  }
82
82
  }
83
- ).then((o) => o.json()).then((o) => {
84
- c(o);
85
- }).catch((o) => console.error("Erreur : " + o));
83
+ ).then((r) => r.json()).then((r) => {
84
+ c(r);
85
+ }).catch((r) => console.error("Erreur : " + r));
86
86
  return (() => {
87
87
  const a = n.length === 0 ? {
88
88
  events: []
89
89
  } : n;
90
- for (let o of i)
90
+ for (let r of i)
91
91
  a.events.findIndex(
92
- (l) => l.start === b.fromISO(o.date).toISODate() && l.name === "Férié : " + o.comment
92
+ (l) => l.start === b.fromISO(r.date).toISODate() && l.name === "Férié : " + r.comment
93
93
  ) === -1 && a.events.push({
94
- name: "Férié : " + o.comment,
95
- start: b.fromISO(o.date).toISODate(),
96
- end: b.fromISO(o.date).toISODate(),
94
+ name: "Férié : " + r.comment,
95
+ start: b.fromISO(r.date).toISODate(),
96
+ end: b.fromISO(r.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
100
100
  return a;
101
101
  })();
102
102
  }
103
- async function pe(e, t, s = !0) {
103
+ async function le(e, t, s = !0) {
104
104
  const n = e.events.findIndex((i) => i.uuid === t.uuid);
105
105
  return n === -1 ? e.events.push(t) : s ? e.events[n] = t : e.events.splice(n, 1), e.length > 0 && e.sort((i, c) => i.start - c.start), e;
106
106
  }
@@ -109,30 +109,30 @@ function f(e, t) {
109
109
  s.authenticatedRequest(e, t);
110
110
  });
111
111
  }
112
- function ue(e, t, s) {
112
+ function pe(e, t, s) {
113
113
  O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
114
114
  n.draggable(e, { data: t, start: s });
115
115
  });
116
116
  }
117
- function fe(e, t = void 0) {
117
+ function ue(e, t = void 0) {
118
118
  O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (s) => {
119
119
  let n;
120
120
  n === void 0 && (n = s.createProxy({
121
- widgetId: U.id,
121
+ widgetId: R.id,
122
122
  filteringMode: "WithFilteringServices"
123
123
  }), t !== void 0 && n.addEvent("onFilterSubjectsChange", t)), n.setSubjectsTags(e);
124
124
  });
125
125
  }
126
- function me(e, t) {
126
+ function fe(e, t) {
127
127
  O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
128
128
  s.droppable(e, { drop: t });
129
129
  });
130
130
  }
131
- function j(e, t = void 0, s = void 0) {
131
+ async function J(e, t = void 0, s = void 0) {
132
132
  O(
133
133
  ["DS/i3DXCompassServices/i3DXCompassServices"],
134
134
  (n) => {
135
- (!e || e === "") && (e = U.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
135
+ (!e || e === "") && (e = R.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
136
136
  n.getPlatformServices({
137
137
  platformId: e,
138
138
  onComplete: t,
@@ -142,7 +142,7 @@ function j(e, t = void 0, s = void 0) {
142
142
  }
143
143
  );
144
144
  }
145
- function ge() {
145
+ function me() {
146
146
  let e = {};
147
147
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
148
148
  const s = t.getTenant(), n = t.getUser(), i = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
@@ -156,7 +156,7 @@ function ge() {
156
156
  };
157
157
  }), console.log("%cRETOUR API :", "color:blue", e), e;
158
158
  }
159
- function he(e, t, s) {
159
+ function ge(e, t, s) {
160
160
  const n = {
161
161
  base: `${e.space}`,
162
162
  uri: "/resources/AppsMngt/api/custom/applications",
@@ -169,53 +169,53 @@ function he(e, t, s) {
169
169
  "Content-Type": "application/json",
170
170
  Accept: "application/json"
171
171
  },
172
- onComplete(c, r, a) {
173
- const o = JSON.parse(c), d = o.data.map((l) => {
172
+ onComplete(c, o, a) {
173
+ const r = JSON.parse(c), d = r.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, o);
177
+ t && t(d, r);
178
178
  },
179
- onFailure(c, r) {
179
+ onFailure(c, o) {
180
180
  const a = c;
181
- a.msg = r.errormsg, a.errCode = r.errorcode, s && s(a);
181
+ a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
182
182
  }
183
183
  });
184
184
  }
185
- function Se(e, t = void 0, s = void 0) {
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
  f(n, {
188
- onComplete(i, c, r) {
188
+ onComplete(i, c, o) {
189
189
  const a = JSON.parse(i);
190
190
  console.log("_AppMngt_get_users => ", a), t && t(a);
191
191
  },
192
192
  onFailure(i, c) {
193
- const r = i;
194
- r.msg = c.errormsg, r.errCode = c.errorcode, s && s(r);
193
+ const o = i;
194
+ o.msg = c.errormsg, o.errCode = c.errorcode, s && s(o);
195
195
  }
196
196
  });
197
197
  }
198
- function ye(e, t, s = void 0, n = void 0) {
198
+ function Se(e, t, s = void 0, n = void 0) {
199
199
  let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
200
200
  f(i, {
201
- onComplete(c, r, a) {
202
- const o = JSON.parse(c);
203
- s && s(o);
201
+ onComplete(c, o, a) {
202
+ const r = JSON.parse(c);
203
+ s && s(r);
204
204
  },
205
- onFailure(c, r) {
205
+ onFailure(c, o) {
206
206
  const a = c;
207
- a.msg = r.errormsg, a.errCode = r.errorcode, n && n(a);
207
+ a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
208
208
  }
209
209
  });
210
210
  }
211
- const $ = {
211
+ const U = {
212
212
  "Content-Type": "application/json",
213
213
  Accept: "application/json,text/javascript,*/*"
214
214
  };
215
- function _e(e, t, s = void 0, n = void 0) {
215
+ function ye(e, t, s = void 0, n = void 0) {
216
216
  const { space: i, currentUser: c } = e, a = `${i}${{
217
217
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
218
- }.URIUGr}`, o = {
218
+ }.URIUGr}`, r = {
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
  f(a, {
231
231
  method: "POST",
232
- headers: $,
233
- data: JSON.stringify(o),
232
+ headers: U,
233
+ data: JSON.stringify(r),
234
234
  onComplete(d) {
235
235
  s && s(JSON.parse(d));
236
236
  },
@@ -241,8 +241,8 @@ function _e(e, t, s = void 0, n = void 0) {
241
241
  }
242
242
  });
243
243
  }
244
- function we(e, t, s = void 0, n = void 0) {
245
- const { space: i, tenant: c } = e, r = i, a = `/3drdfpersist/v1/resources/${t}`, o = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${r}${a}${o}`;
244
+ function _e(e, t, s = void 0, n = void 0) {
245
+ const { space: i, tenant: c } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, r = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${o}${a}${r}`;
246
246
  f(d, {
247
247
  opts: {
248
248
  method: "GET",
@@ -260,13 +260,13 @@ function we(e, t, s = void 0, n = void 0) {
260
260
  }
261
261
  });
262
262
  }
263
- function J(e, t = void 0, s = void 0) {
264
- const { space: n, tenant: i } = e, c = n, r = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, o = {
263
+ function E(e, t = void 0, s = void 0) {
264
+ const { space: n, tenant: i } = e, c = n, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, r = {
265
265
  method: "GET",
266
266
  Accept: "application/json,*/*,test/javascript"
267
- }, d = `${c}${r}${a}`;
267
+ }, d = `${c}${o}${a}`;
268
268
  f(d, {
269
- OPTsH: o,
269
+ OPTsH: r,
270
270
  onComplete(l) {
271
271
  t && t(JSON.parse(l));
272
272
  },
@@ -276,7 +276,7 @@ function J(e, t = void 0, s = void 0) {
276
276
  }
277
277
  });
278
278
  }
279
- function Te(e, t = void 0, s = void 0) {
279
+ function we(e, t = void 0, s = void 0) {
280
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,*/*"
@@ -288,7 +288,7 @@ function Te(e, t = void 0, s = void 0) {
288
288
  const p = JSON.parse(l), u = {}, m = p.groups.filter((g) => g.uri.startsWith("uuid:"));
289
289
  if (i && Object.keys(i).length > 0) {
290
290
  const g = m.filter((y) => y.owner === i.email), h = m.filter((y) => y.members.includes(i.email)), S = g.concat(h);
291
- u.iam = S, u.UG = m, u.iamMember = h, J(
291
+ u.iam = S, u.UG = m, u.iamMember = h, E(
292
292
  e,
293
293
  (y) => {
294
294
  u.rules = y, t && t(u);
@@ -307,24 +307,24 @@ function Te(e, t = void 0, s = void 0) {
307
307
  console.log(l);
308
308
  }
309
309
  }
310
- function Ce(e, t) {
310
+ function Te(e, t) {
311
311
  const { space: s } = e, i = `${s}/3drdfpersist/resources/v1/usersgroup/${t}`;
312
312
  f(i, {
313
313
  method: "DELETE"
314
314
  });
315
315
  }
316
- function Oe(e, t, s, n = void 0, i = void 0) {
317
- const { space: c, tenant: r } = e, a = {
316
+ function Ce(e, t, s, n = void 0, i = void 0) {
317
+ const { space: c, tenant: o } = e, a = {
318
318
  URITI: "/3drdfpersist/resources/v1/template-instances",
319
319
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
320
320
  nextURICh: "/characteristics",
321
321
  nextURIGr: "/group",
322
322
  nexURImem: "/members",
323
323
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
324
- OPTsTenant: `tenant=dstenant:${r}`
325
- }, o = s, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(o);
324
+ OPTsTenant: `tenant=dstenant:${o}`
325
+ }, r = s, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(r);
326
326
  f(d, {
327
- headers: $,
327
+ headers: U,
328
328
  method: "PATCH",
329
329
  data: l,
330
330
  type: "json",
@@ -336,11 +336,11 @@ function Oe(e, t, s, n = void 0, i = void 0) {
336
336
  }
337
337
  });
338
338
  }
339
- function Ne(e, t, s, n = void 0, i = void 0) {
339
+ function Oe(e, t, s, n = void 0, i = void 0) {
340
340
  const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
341
341
  f(a, {
342
342
  method: "PATCH",
343
- headers: $,
343
+ headers: U,
344
344
  data: JSON.stringify(s),
345
345
  type: "json",
346
346
  onComplete(d) {
@@ -351,9 +351,9 @@ function Ne(e, t, s, n = void 0, i = void 0) {
351
351
  }
352
352
  });
353
353
  }
354
- function be(e, t, s = void 0, n = void 0) {
355
- const { space: i } = e, r = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
- f(r, {
354
+ function Ne(e, t, s = void 0, n = void 0) {
355
+ const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
+ f(o, {
357
357
  opts: {
358
358
  method: "GET",
359
359
  headers: {
@@ -377,25 +377,25 @@ async function G(e, t = void 0, s = void 0, n = void 0) {
377
377
  }
378
378
  const c = i + `/resources/v1/modeler/documents/${t}`;
379
379
  f(c, {
380
- onComplete(r, a, o) {
381
- const d = JSON.parse(r);
380
+ onComplete(o, a, r) {
381
+ const d = JSON.parse(o);
382
382
  s && s(d);
383
383
  },
384
- onFailure(r) {
385
- n && n(r);
384
+ onFailure(o) {
385
+ n && n(o);
386
386
  }
387
387
  });
388
388
  }
389
- function k(e, t, s = void 0, n = void 0) {
390
- if (t !== null) {
391
- let i = `${e.space}/resources/v1/modeler/documents/${t}`;
392
- f(i, {
393
- onComplete(c, r, a) {
394
- const o = JSON.parse(c);
395
- s && s(o);
389
+ function F(e, t = void 0, s = void 0) {
390
+ if (objID && objID !== null) {
391
+ let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
392
+ f(n, {
393
+ onComplete(i, c, o) {
394
+ const a = JSON.parse(i);
395
+ e.token = a, t && t(e);
396
396
  },
397
- onFailure(c) {
398
- n && n(c);
397
+ onFailure(i) {
398
+ s && s(i);
399
399
  }
400
400
  });
401
401
  } else
@@ -405,20 +405,20 @@ function C(e, t = void 0, s = void 0) {
405
405
  if (e.space) {
406
406
  const n = e.space + "/resources/v1/application/CSRF";
407
407
  f(n, {
408
- onComplete(i, c, r) {
408
+ onComplete(i, c, o) {
409
409
  const a = JSON.parse(i);
410
410
  t && t(a.csrf.value);
411
411
  },
412
- onFailure(i) {
413
- s && s(i);
412
+ onFailure(i, c, o) {
413
+ s && s({ response: i, headers: c, xhr: o });
414
414
  }
415
415
  });
416
416
  } else
417
417
  s && s("ERROR : url du 3DSpace non défini.");
418
418
  }
419
- function A(e, t, s = void 0, n = void 0) {
419
+ function $(e, t, s = void 0, n = void 0) {
420
420
  let i = e.space + `/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
421
- k(
421
+ F(
422
422
  e,
423
423
  t,
424
424
  (c) => {
@@ -427,52 +427,51 @@ function A(e, t, s = void 0, n = void 0) {
427
427
  headers: {
428
428
  ENO_CSRF_TOKEN: c.csrf.value
429
429
  },
430
- onComplete(r) {
431
- let a = JSON.parse(r);
430
+ onComplete(o) {
431
+ let a = JSON.parse(o);
432
432
  if (a.success === !0)
433
433
  try {
434
- const o = a.data[0].dataelements.ticketURL;
435
- s && s(o);
436
- } catch (o) {
437
- n && n(o);
434
+ const r = a.data[0].dataelements.ticketURL;
435
+ s && s(r);
436
+ } catch (r) {
437
+ n && n(r);
438
438
  }
439
439
  },
440
- onFailure(r, a) {
441
- console.log("☠️ error => ", r, a), n && n(r, a);
440
+ onFailure(o, a) {
441
+ console.log("☠️ error => ", o, a), n && n(o, a);
442
442
  }
443
443
  });
444
- },
445
- n
444
+ }
446
445
  );
447
446
  }
448
- function ke(e, t, s, n = void 0, i = void 0) {
447
+ function be(e, t, s, n = void 0, i = void 0) {
449
448
  const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
450
449
  f(c, {
451
450
  method: "PUT",
452
451
  headers: {
453
452
  ENO_CSRF_TOKEN: s
454
453
  },
455
- onComplete(r) {
456
- let a = JSON.parse(r);
454
+ onComplete(o) {
455
+ let a = JSON.parse(o);
457
456
  if (a.success === !0)
458
457
  try {
459
- const o = a.data[0].dataelements.ticketURL;
460
- n && n(o);
461
- } catch (o) {
462
- i && i(o);
458
+ const r = a.data[0].dataelements.ticketURL;
459
+ n && n(r);
460
+ } catch (r) {
461
+ i && i(r);
463
462
  }
464
463
  },
465
- onFailure(r) {
466
- i && i(r);
464
+ onFailure(o) {
465
+ i && i(o);
467
466
  }
468
467
  });
469
468
  }
470
- function K(e, t, s, n, i, c = void 0, r = void 0) {
471
- k(
469
+ function K(e, t, s, n, i, c = void 0, o = void 0) {
470
+ F(
472
471
  e,
473
472
  t,
474
473
  (a) => {
475
- V(
474
+ W(
476
475
  e,
477
476
  t,
478
477
  s,
@@ -480,15 +479,14 @@ function K(e, t, s, n, i, c = void 0, r = void 0) {
480
479
  i,
481
480
  a.csrf.value,
482
481
  c,
483
- r
482
+ o
484
483
  );
485
- },
486
- r
484
+ }
487
485
  );
488
486
  }
489
- function V(e, t, s, n, i, c, r = void 0, a = void 0) {
490
- const o = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
491
- f(o, {
487
+ function W(e, t, s, n, i, c, o = void 0, a = void 0) {
488
+ const r = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
489
+ f(r, {
492
490
  method: "PUT",
493
491
  headers: {
494
492
  ENO_CSRF_TOKEN: c
@@ -525,7 +523,7 @@ function V(e, t, s, n, i, c, r = void 0, a = void 0) {
525
523
  }),
526
524
  type: "json",
527
525
  onComplete(_) {
528
- r && r(_);
526
+ o && o(_);
529
527
  },
530
528
  onFailure(_) {
531
529
  a && a(_);
@@ -542,13 +540,13 @@ function V(e, t, s, n, i, c, r = void 0, a = void 0) {
542
540
  });
543
541
  }
544
542
  async function Fe(e, t, s, n, i = void 0, c = void 0) {
545
- const r = e.space, a = e.token, o = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
543
+ const o = e.space, a = e.token, r = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
546
544
  type: "text/plain"
547
545
  }), p = {
548
- url_Ticket: `${r}/resources/v1/modeler/documents/files/CheckinTicket`,
549
- url_Post: `${r}/resources/v1/modeler/documents/?SecurityContext=ctx::${o}`
546
+ url_Ticket: `${o}/resources/v1/modeler/documents/files/CheckinTicket`,
547
+ url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${r}`
550
548
  };
551
- if (!r && r !== "") {
549
+ if (!o && o !== "") {
552
550
  console.log("le store._3DSpace est vide");
553
551
  return;
554
552
  }
@@ -564,8 +562,8 @@ async function Fe(e, t, s, n, i = void 0, c = void 0) {
564
562
  method: "POST",
565
563
  data: d,
566
564
  onComplete(T) {
567
- if (o !== "" && a !== "") {
568
- const F = {
565
+ if (r !== "" && a !== "") {
566
+ const k = {
569
567
  method: "POST",
570
568
  headers: {
571
569
  ENO_CSRF_TOKEN: a,
@@ -591,7 +589,7 @@ async function Fe(e, t, s, n, i = void 0, c = void 0) {
591
589
  }
592
590
  ]
593
591
  },
594
- tempId: v()
592
+ tempId: j()
595
593
  }
596
594
  ]
597
595
  }),
@@ -600,7 +598,7 @@ async function Fe(e, t, s, n, i = void 0, c = void 0) {
600
598
  onComplete: y,
601
599
  onFailure: _
602
600
  };
603
- o !== "" && f(p.url_Post, F);
601
+ r !== "" && f(p.url_Post, k);
604
602
  } else
605
603
  console.warn("le store est vide");
606
604
  },
@@ -609,23 +607,23 @@ async function Fe(e, t, s, n, i = void 0, c = void 0) {
609
607
  function y(T) {
610
608
  console.log("Success -- response ", T.data[0]), i && i(T);
611
609
  }
612
- function _(T, F) {
610
+ function _(T, k) {
613
611
  console.log("Erreur -- response ", T, `
614
- headers `, F), c && c(T);
612
+ headers `, k), c && c(T);
615
613
  }
616
614
  f(h.ticketURL, S);
617
615
  }
618
616
  });
619
617
  }
620
618
  function N(e, t = void 0, s = void 0, n = void 0, i = void 0, c = void 0) {
621
- const r = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
622
- f(r, {
619
+ const o = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
620
+ f(o, {
623
621
  method: "GET",
624
622
  onComplete(a) {
625
- const o = JSON.parse(a);
623
+ const r = JSON.parse(a);
626
624
  let d = "", l, p, u;
627
625
  if (t) {
628
- let m = o.collabspaces.find((g) => g.title === t);
626
+ let m = r.collabspaces.find((g) => g.title === t);
629
627
  if (m) {
630
628
  l = t;
631
629
  let g = m.couples;
@@ -656,7 +654,7 @@ function N(e, t = void 0, s = void 0, n = void 0, i = void 0, c = void 0) {
656
654
  }));
657
655
  }
658
656
  }
659
- l && p && u ? (d = u + "." + p + "." + l, i(d)) : o.preferredcredentials ? (d = o.preferredcredentials.role.name + "." + o.preferredcredentials.organization.title + "." + o.preferredcredentials.collabspace.title, i(d)) : c && (d = u + "." + p + "." + l, c(d));
657
+ 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));
660
658
  },
661
659
  onFailure(a) {
662
660
  console.log("Erreur de récupération du contexte de sécurité. => ", a);
@@ -665,11 +663,11 @@ function N(e, t = void 0, s = void 0, n = void 0, i = void 0, c = void 0) {
665
663
  }
666
664
  async function I(e, t, s = void 0, n = void 0, i = void 0) {
667
665
  return t === void 0 || t === "" ? "Le paramètre objectId est obligatoire" : new Promise((c) => {
668
- (e.space === "" || !e.space) && j(), t !== void 0 && t !== "" && t !== null && A(
666
+ (e.space === "" || !e.space) && J(), t !== void 0 && t !== "" && t !== null && $(
669
667
  e.space,
670
668
  t,
671
- (r) => {
672
- f(r, {
669
+ (o) => {
670
+ f(o, {
673
671
  headers: {
674
672
  ENO_CSRF_TOKEN: e.token
675
673
  },
@@ -681,8 +679,8 @@ async function I(e, t, s = void 0, n = void 0, i = void 0) {
681
679
  }
682
680
  });
683
681
  },
684
- (r) => {
685
- n && n(r), console.log("*_3dspace_download_doc / error file URL *", r);
682
+ (o) => {
683
+ n && n(o), console.log("*_3dspace_download_doc / error file URL *", o);
686
684
  }
687
685
  );
688
686
  });
@@ -690,31 +688,31 @@ async function I(e, t, s = void 0, n = void 0, i = void 0) {
690
688
  async function X(e, t, s = void 0, n = void 0) {
691
689
  let i = [];
692
690
  for (let a = 0; a < t.length; a += 80) {
693
- const o = t.slice(a, a + 80);
694
- i.push(o);
691
+ const r = t.slice(a, a + 80);
692
+ i.push(r);
695
693
  }
696
- const r = (a) => {
697
- W(
694
+ const o = (a) => {
695
+ V(
698
696
  e,
699
697
  i[a],
700
698
  () => {
701
- a++, a < i.length && r(a);
699
+ a++, a < i.length && o(a);
702
700
  },
703
- (o) => {
704
- s && s(o);
701
+ (r) => {
702
+ s && s(r);
705
703
  }
706
704
  );
707
705
  };
708
- r(0);
706
+ o(0);
709
707
  }
710
- function W(e, t, s = void 0, n = void 0, i = void 0) {
708
+ function V(e, t, s = void 0, n = void 0, i = void 0) {
711
709
  const c = [];
712
- t.forEach((o) => {
710
+ t.forEach((r) => {
713
711
  c.push({
714
- id: o
712
+ id: r
715
713
  });
716
714
  });
717
- let r = JSON.stringify({
715
+ let o = JSON.stringify({
718
716
  csrf: {
719
717
  name: "ENO_CSRF_TOKEN",
720
718
  value: e.token
@@ -724,11 +722,11 @@ function W(e, t, s = void 0, n = void 0, i = void 0) {
724
722
  const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
725
723
  f(a, {
726
724
  method: "PUT",
727
- data: r,
725
+ data: o,
728
726
  type: "json",
729
- onComplete(o) {
730
- const d = o.data;
731
- o.success === !0 && (s && s(), d.forEach((l) => {
727
+ onComplete(r) {
728
+ const d = r.data;
729
+ r.success === !0 && (s && s(), d.forEach((l) => {
732
730
  try {
733
731
  const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
734
732
  f(u, {
@@ -748,12 +746,12 @@ function W(e, t, s = void 0, n = void 0, i = void 0) {
748
746
  }
749
747
  }));
750
748
  },
751
- onFailure(o) {
752
- console.log(o), i && i(o);
749
+ onFailure(r) {
750
+ console.log(r), i && i(r);
753
751
  }
754
752
  });
755
753
  }
756
- function Ue(e, t, s = void 0, n = void 0) {
754
+ function ke(e, t, s = void 0, n = void 0) {
757
755
  return new Promise((i) => {
758
756
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
759
757
  const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
@@ -767,7 +765,7 @@ function Ue(e, t, s = void 0, n = void 0) {
767
765
  console.log("onError =>", a);
768
766
  }
769
767
  );
770
- let r = {
768
+ let o = {
771
769
  method: "POST",
772
770
  headers: {
773
771
  SecurityContext: "ctx::" + e.ctx,
@@ -790,22 +788,22 @@ function Ue(e, t, s = void 0, n = void 0) {
790
788
  n && n(a);
791
789
  }
792
790
  };
793
- f(c, r);
791
+ f(c, o);
794
792
  }
795
793
  });
796
794
  }
797
- function $e(e, t, s, n = void 0, i = void 0) {
795
+ function Ue(e, t, s, n = void 0, i = void 0) {
798
796
  return new Promise((c) => {
799
797
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
800
- const r = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
798
+ const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
801
799
  N(
802
800
  e.space,
803
801
  "ESPACE COMMUN",
804
802
  ["VPLMProjectLeader", "VPLMCreator"],
805
803
  void 0,
806
- (o) => e.ctx = o,
807
- (o) => {
808
- console.log("onError =>", o);
804
+ (r) => e.ctx = r,
805
+ (r) => {
806
+ console.log("onError =>", r);
809
807
  }
810
808
  );
811
809
  let a = {
@@ -825,18 +823,18 @@ function $e(e, t, s, n = void 0, i = void 0) {
825
823
  ]
826
824
  }),
827
825
  type: "json",
828
- onComplete(o) {
829
- n && n(o);
826
+ onComplete(r) {
827
+ n && n(r);
830
828
  },
831
- onFailure(o) {
832
- i && i(o);
829
+ onFailure(r) {
830
+ i && i(r);
833
831
  }
834
832
  };
835
- f(r, a);
833
+ f(o, a);
836
834
  }
837
835
  });
838
836
  }
839
- function Ae(e, t, s = void 0, n = void 0) {
837
+ function $e(e, t, s = void 0, n = void 0) {
840
838
  return new Promise((i) => {
841
839
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
842
840
  const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
@@ -850,7 +848,7 @@ function Ae(e, t, s = void 0, n = void 0) {
850
848
  console.log("onError =>", a);
851
849
  }
852
850
  );
853
- let r = {
851
+ let o = {
854
852
  method: "POST",
855
853
  headers: {
856
854
  securitycontext: "ctx::" + e.ctx,
@@ -873,11 +871,11 @@ function Ae(e, t, s = void 0, n = void 0) {
873
871
  n && n(a);
874
872
  }
875
873
  };
876
- f(c, r);
874
+ f(c, o);
877
875
  }
878
876
  });
879
877
  }
880
- function De(e, t, s = void 0, n = void 0) {
878
+ function Ae(e, t, s = void 0, n = void 0) {
881
879
  return new Promise((i) => {
882
880
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
883
881
  const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
@@ -891,7 +889,7 @@ function De(e, t, s = void 0, n = void 0) {
891
889
  console.log("onError =>", a);
892
890
  }
893
891
  );
894
- let r = {
892
+ let o = {
895
893
  method: "POST",
896
894
  headers: {
897
895
  SecurityContext: "ctx::" + e.ctx,
@@ -920,22 +918,22 @@ function De(e, t, s = void 0, n = void 0) {
920
918
  n && n(a);
921
919
  }
922
920
  };
923
- f(c, r);
921
+ f(c, o);
924
922
  }
925
923
  });
926
924
  }
927
- function Re(e, t, s, n = void 0, i = void 0) {
925
+ function De(e, t, s, n = void 0, i = void 0) {
928
926
  return new Promise((c) => {
929
927
  if (e.token === "" && C(e), t !== void 0 && t !== "" && t !== null) {
930
- const r = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
928
+ const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
931
929
  N(
932
930
  e.space,
933
931
  "ESPACE COMMUN",
934
932
  ["VPLMProjectLeader", "VPLMCreator"],
935
933
  void 0,
936
- (o) => e.ctx = o,
937
- (o) => {
938
- console.log("onError =>", o);
934
+ (r) => e.ctx = r,
935
+ (r) => {
936
+ console.log("onError =>", r);
939
937
  }
940
938
  );
941
939
  let a = {
@@ -960,186 +958,30 @@ function Re(e, t, s, n = void 0, i = void 0) {
960
958
  notificationTimeout: 600
961
959
  }),
962
960
  type: "json",
963
- onComplete(o) {
964
- n && n(o);
961
+ onComplete(r) {
962
+ n && n(r);
965
963
  },
966
- onFailure(o) {
967
- i && i(o);
964
+ onFailure(r) {
965
+ i && i(r);
968
966
  }
969
967
  };
970
- f(r, a);
968
+ f(o, a);
971
969
  }
972
970
  });
973
971
  }
974
972
  //!SECTION
975
- async function w(e, t = void 0, s = void 0) {
976
- const n = e.space + "/api/index/tk";
977
- return console.log("_3DSwym_get_version", n, e), f(n, {
978
- onComplete(i, c, r) {
979
- const a = JSON.parse(i);
980
- if (t)
981
- return t(a), e.token = a?.result?.ServerToken;
982
- },
983
- onFailure(i) {
984
- s && s(i);
985
- }
986
- });
987
- }
988
- function ve(e, t = void 0, s = void 0) {
989
- const n = `${e.space}/api/exalead/whatsnew`, i = {
990
- params: {
991
- community_id: null,
992
- hash_key: null,
993
- legacyFormat: !1,
994
- nresults: 1,
995
- query: "#all",
996
- start: 0
997
- }
998
- };
999
- w(e, (c) => {
1000
- f(n, {
1001
- method: "POST",
1002
- headers: {
1003
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1004
- "Content-type": "application/json;charset=UTF-8",
1005
- Accept: "application/json"
1006
- },
1007
- data: JSON.stringify(i),
1008
- type: "json",
1009
- onComplete(r, a) {
1010
- t && t(r, a);
1011
- },
1012
- onFailure(r, a) {
1013
- s && s(r, a);
1014
- }
1015
- });
1016
- });
1017
- }
1018
- function je(e, t = void 0, s = void 0) {
1019
- const n = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
1020
- params: {
1021
- idsToFilterArr: [],
1022
- mode: "offline",
1023
- limit: 30,
1024
- itemType: "User",
1025
- maxNbOfCommonElements: "5"
1026
- }
1027
- };
1028
- w(e, (c) => {
1029
- f(n, {
1030
- method: "POST",
1031
- headers: {
1032
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1033
- "Content-type": "application/json;charset=UTF-8",
1034
- Accept: "application/json"
1035
- },
1036
- data: JSON.stringify(i),
1037
- type: "json",
1038
- onComplete(r, a) {
1039
- const o = r.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1040
- t && t(o, r);
1041
- },
1042
- onFailure(r, a) {
1043
- s && s(r, a);
1044
- }
1045
- });
1046
- });
1047
- }
1048
- function Y(e, t = void 0, s = void 0) {
1049
- const n = e.space + "/api/user/getcurrent/";
1050
- w(
1051
- e,
1052
- (i) => {
1053
- f(n, {
1054
- method: "GET",
1055
- headers: { "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken },
1056
- onComplete(c, r, a) {
1057
- const o = JSON.parse(c);
1058
- t && t(o.result);
1059
- },
1060
- onFailure(c, r, a) {
1061
- s && s({ response: c, headers: r, xhr: a });
1062
- }
1063
- });
1064
- },
1065
- s
1066
- );
1067
- }
1068
- function Ie(e, t, s = void 0, n = void 0) {
1069
- const i = e.space + "/api/user/find/login/" + t;
1070
- w(
1071
- e,
1072
- (c) => {
1073
- f(i, {
1074
- method: "GET",
1075
- headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
1076
- onComplete(r, a, o) {
1077
- const d = JSON.parse(r);
1078
- s && s(d);
1079
- },
1080
- onFailure(r) {
1081
- n && n(r);
1082
- }
1083
- });
1084
- },
1085
- n
1086
- );
1087
- }
1088
- function Pe(e, t = void 0, s = void 0) {
1089
- j(
1090
- null,
1091
- (n) => {
1092
- let i = [], c = [], r, a = {};
1093
- for (let o of n)
1094
- "3DSpace" in o && (c.push({
1095
- label: `${o.displayName} ( ${o.platformId} )`,
1096
- value: `${c.length}`
1097
- }), c.sort(), i.push(o));
1098
- for (let [o, d] of i.entries())
1099
- d.platformId === e.tenant && (a = d, r = o);
1100
- U.addPreference({
1101
- name: "_CurrentTenantID_",
1102
- type: "list",
1103
- label: "Tenant",
1104
- defaultValue: r,
1105
- options: c
1106
- }), Object.keys(a).length > 0, N(
1107
- e,
1108
- "ESPACE COMMUN",
1109
- // "B3-R&D" || "ESPACE COMMUN",
1110
- ["VPLMProjectLeader", "VPLMCreator"],
1111
- void 0,
1112
- (o) => e.ctx = o,
1113
- (o) => {
1114
- console.log("on Error CTX =>", o);
1115
- }
1116
- ), Y(
1117
- e,
1118
- (o) => {
1119
- t && t({ reponse: o, activeSpace: a, credentials: e });
1120
- },
1121
- (o) => {
1122
- s && s(o);
1123
- }
1124
- );
1125
- },
1126
- (n) => {
1127
- console.log("** _getPlatformServices Erreur **", n);
1128
- }
1129
- );
1130
- }
1131
- async function xe(e, t, s) {
973
+ async function Re(e, t, s) {
1132
974
  const n = `${e.space}/resources/v1/application/CSRF`;
1133
975
  f(n, {
1134
976
  onComplete(i) {
1135
977
  i = JSON.parse(i), t && t(i.csrf);
1136
978
  },
1137
- onFailure(i) {
1138
- s && s(i);
979
+ onFailure(i, c, o) {
980
+ s && s({ error: i, headers: c, xhr: o });
1139
981
  }
1140
982
  });
1141
983
  }
1142
- function Me(e, t = void 0, s = void 0) {
984
+ function je(e, t = void 0, s = void 0) {
1143
985
  const n = {
1144
986
  base: `${e.space}`,
1145
987
  uri: "/resources/bps/cspaces",
@@ -1151,17 +993,17 @@ function Me(e, t = void 0, s = void 0) {
1151
993
  Accept: "application/json,text/javascript,*/*",
1152
994
  "Content-Type": "application/ds-json"
1153
995
  },
1154
- onComplete(c, r) {
996
+ onComplete(c, o) {
1155
997
  const a = JSON.parse(c);
1156
- t && t(a, r);
998
+ t && t(a, o);
1157
999
  },
1158
- onFailure(c, r, a) {
1159
- s && s(c, r, a);
1000
+ onFailure(c, o, a) {
1001
+ s && s({ response: c, headers: o, xhr: a });
1160
1002
  }
1161
1003
  });
1162
1004
  }
1163
- function Le(e, t, s, n) {
1164
- A(
1005
+ function Ie(e, t, s, n) {
1006
+ $(
1165
1007
  e.space,
1166
1008
  t,
1167
1009
  (i) => {
@@ -1180,31 +1022,31 @@ function Le(e, t, s, n) {
1180
1022
  }
1181
1023
  );
1182
1024
  }
1183
- async function Ee(e, t, s = void 0, n = void 0) {
1025
+ async function ve(e, t, s = void 0, n = void 0) {
1184
1026
  return new Promise((i) => {
1185
- A(e.space, t, (c) => {
1027
+ $(e.space, t, (c) => {
1186
1028
  f(c, {
1187
- onComplete: (r, a, o) => (i(JSON.parse(r)), s && s(JSON.parse(r), a, o), i),
1188
- onFailure: (r, a, o) => {
1189
- n && n(r, a, o), console.log(r, a?.errormsg);
1029
+ onComplete: (o, a, r) => (i(JSON.parse(o)), s && s(JSON.parse(o), a, r), i),
1030
+ onFailure: (o, a, r) => {
1031
+ n && n(o, a, r), console.log(o, a?.errormsg);
1190
1032
  }
1191
1033
  });
1192
1034
  });
1193
1035
  });
1194
1036
  }
1195
- function Je(e, t, s, n = void 0, i = void 0) {
1037
+ function xe(e, t, s, n = void 0, i = void 0) {
1196
1038
  const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
1197
- k(
1039
+ F(
1198
1040
  e,
1199
1041
  s,
1200
- (r) => {
1201
- const a = r.data[0].relateddata.files[0].id, o = r.data[0].dataelements.secondaryTitle !== "" ? r.data[0].dataelements.secondaryTitle : r.data[0].dataelements.title;
1042
+ (o) => {
1043
+ 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;
1202
1044
  K(
1203
1045
  e,
1204
1046
  s,
1205
1047
  a,
1206
1048
  c,
1207
- o,
1049
+ r,
1208
1050
  (d) => {
1209
1051
  n && n(d);
1210
1052
  },
@@ -1212,35 +1054,36 @@ function Je(e, t, s, n = void 0, i = void 0) {
1212
1054
  i && i(d);
1213
1055
  }
1214
1056
  );
1215
- },
1216
- (r) => {
1217
- console.log("En cas d'erreur nous avons :", r), alert("Erreur lors de la sauvegarde, Veuillez réessayez"), i && i(r);
1218
1057
  }
1219
1058
  );
1220
1059
  }
1221
- let P, x;
1222
- const D = [];
1223
- async function Ge(e, t = void 0, s = void 0) {
1224
- console.log(
1225
- `%c 3ds & objID ok ${e.space} et ${e.objID} *`,
1226
- "color: green"
1227
- ), e.objID && e.objID !== "" ? k(
1228
- e.space,
1229
- e.objID,
1060
+ let v, x;
1061
+ const A = [];
1062
+ async function Pe(e, t = void 0, s = void 0) {
1063
+ e.objID && e.objID !== "" ? F(
1064
+ e,
1230
1065
  (n) => {
1231
1066
  t && t(n.csrf.value);
1232
1067
  },
1233
1068
  (n) => {
1234
1069
  s && s(n);
1235
1070
  }
1236
- ) : e.objID === null && C(e);
1071
+ ) : e.objID === null && C(
1072
+ e,
1073
+ (n) => {
1074
+ t && t({ rep: n, msg: "Pas d'objID, ou invalide" });
1075
+ },
1076
+ (n) => {
1077
+ s && s({ msg: "Pas d'objID et erreur sur le Space", err: n });
1078
+ }
1079
+ );
1237
1080
  }
1238
- async function Ke(e, t = void 0, s = void 0) {
1081
+ async function Me(e, t = void 0, s = void 0) {
1239
1082
  await I(
1240
1083
  e,
1241
1084
  (n) => {
1242
1085
  const i = {};
1243
- i.obj = n, B(
1086
+ i.obj = n, Y(
1244
1087
  e,
1245
1088
  (c) => {
1246
1089
  i.datas = c, t && t(i);
@@ -1255,56 +1098,56 @@ async function Ke(e, t = void 0, s = void 0) {
1255
1098
  }
1256
1099
  );
1257
1100
  }
1258
- function B(e, t = void 0, s = void 0) {
1101
+ function Y(e, t = void 0, s = void 0) {
1259
1102
  const n = [];
1260
1103
  e.objIds.forEach((i, c) => {
1261
1104
  I(
1262
1105
  e,
1263
1106
  i.objId,
1264
- (r) => {
1265
- n.push({ [i.name]: r }), i.name === "dbProjets" && (P = r.affaires.map((a) => a.objectID), z(e, x)), c === e.objIds.length - 1 && t && t(n);
1107
+ (o) => {
1108
+ n.push({ [i.name]: o }), i.name === "dbProjets" && (v = o.affaires.map((a) => a.objectID), B(e, x)), c === e.objIds.length - 1 && t && t(n);
1266
1109
  },
1267
- (r) => {
1268
- s && s(r);
1110
+ (o) => {
1111
+ s && s(o);
1269
1112
  }
1270
1113
  );
1271
1114
  });
1272
1115
  }
1273
- function z(e, t, s = void 0, n = void 0) {
1116
+ function B(e, t, s = void 0, n = void 0) {
1274
1117
  X(
1275
1118
  e,
1276
- P,
1119
+ v,
1277
1120
  (i) => {
1278
1121
  const c = [...t];
1279
- c.find((r) => r.objectID === i.objectId).data = i.data, x = c, D.push(i.data), s && s(D);
1122
+ c.find((o) => o.objectID === i.objectId).data = i.data, x = c, A.push(i.data), s && s(A);
1280
1123
  },
1281
1124
  (i) => {
1282
1125
  n && (n(i), console.log(i));
1283
1126
  }
1284
1127
  );
1285
1128
  }
1286
- const H = "FA35FB9B177A280065800EA0000F599C", q = [
1129
+ const H = "FA35FB9B177A280065800EA0000F599C", z = [
1287
1130
  "swym",
1288
1131
  "3dspace",
1289
1132
  "drive",
1290
1133
  "usersgroup",
1291
1134
  "3dplan",
1292
1135
  "dashboard"
1293
- ], M = {
1136
+ ], P = {
1294
1137
  how: "ds6w:how",
1295
1138
  what: "ds6w:what",
1296
1139
  when: "ds6w:when",
1297
1140
  where: "ds6w:where",
1298
1141
  who: "ds6w:who",
1299
1142
  why: "ds6w:why"
1300
- }, Q = {
1143
+ }, q = {
1301
1144
  objId: H,
1302
1145
  pred: "who",
1303
1146
  order_by: "desc",
1304
1147
  tag: "testTag"
1305
1148
  };
1306
- function Ve(e, t, s = void 0, n = void 0) {
1307
- const { space: i, tenant: c } = e, { objId: r, pred: a, tag: o } = t, d = {
1149
+ function Le(e, t, s = void 0, n = void 0) {
1150
+ const { space: i, tenant: c } = e, { objId: o, pred: a, tag: r } = t, d = {
1308
1151
  uri: "/resources/6w/tags",
1309
1152
  otpCTX: "SecurityContext=preferred",
1310
1153
  optTenant: `tenant=${c}`
@@ -1313,12 +1156,12 @@ function Ve(e, t, s = void 0, n = void 0) {
1313
1156
  {
1314
1157
  subject: [
1315
1158
  {
1316
- uri: `pid://${r}`
1159
+ uri: `pid://${o}`
1317
1160
  }
1318
1161
  ],
1319
- predicate: M[a],
1162
+ predicate: P[a],
1320
1163
  object: {
1321
- literal: o
1164
+ literal: r
1322
1165
  }
1323
1166
  }
1324
1167
  ]
@@ -1336,10 +1179,10 @@ function Ve(e, t, s = void 0, n = void 0) {
1336
1179
  setTimeout(() => {
1337
1180
  G(
1338
1181
  e,
1339
- r,
1182
+ o,
1340
1183
  (g) => {
1341
1184
  const h = g.data[0].dataelements.title, S = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", y = g.data[0].relateddata.ownerInfo[0].dataelements.name;
1342
- m.name = h, m.ext = S, m.createBy = y, t.info = { ...m }, Z(
1185
+ m.name = h, m.ext = S, m.createBy = y, t.info = { ...m }, Q(
1343
1186
  e,
1344
1187
  t,
1345
1188
  (_) => {
@@ -1363,19 +1206,19 @@ function Ve(e, t, s = void 0, n = void 0) {
1363
1206
  }
1364
1207
  });
1365
1208
  }
1366
- function Z(e, t, s = void 0, n = void 0) {
1209
+ function Q(e, t, s = void 0, n = void 0) {
1367
1210
  console.log("obj ", t);
1368
1211
  const i = t.info.name, c = {
1369
1212
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1370
1213
  uri: "/federated/search"
1371
- }, r = `${c.baseUrl}${c.uri}`, a = {
1214
+ }, o = `${c.baseUrl}${c.uri}`, a = {
1372
1215
  "Content-Type": "application/json",
1373
1216
  Accept: "application/json,text/javascript,*/*"
1374
- }, o = v(), d = {
1217
+ }, r = j(), d = {
1375
1218
  with_indexing_date: !0,
1376
1219
  with_synthesis: !0,
1377
1220
  with_nls: !1,
1378
- label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${o}`,
1221
+ label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${r}`,
1379
1222
  locale: "fr",
1380
1223
  select_predicate: [
1381
1224
  "ds6w:label",
@@ -1413,7 +1256,7 @@ function Z(e, t, s = void 0, n = void 0) {
1413
1256
  }
1414
1257
  },
1415
1258
  select_exclude_synthesis: ["ds6w:what/ds6w:topic"],
1416
- order_by: Q.order_by,
1259
+ order_by: q.order_by,
1417
1260
  order_field: "relevance",
1418
1261
  select_snippets: [
1419
1262
  "ds6w:snippet",
@@ -1424,7 +1267,7 @@ function Z(e, t, s = void 0, n = void 0) {
1424
1267
  ],
1425
1268
  nresults: 40,
1426
1269
  start: "0",
1427
- source: q,
1270
+ source: z,
1428
1271
  tenant: e.tenant,
1429
1272
  login: {
1430
1273
  "3dspace": {
@@ -1432,7 +1275,7 @@ function Z(e, t, s = void 0, n = void 0) {
1432
1275
  }
1433
1276
  }
1434
1277
  };
1435
- console.log("dataPattern => ", d), f(r, {
1278
+ console.log("dataPattern => ", d), f(o, {
1436
1279
  method: "POST",
1437
1280
  headers: a,
1438
1281
  data: JSON.stringify(d),
@@ -1446,12 +1289,12 @@ function Z(e, t, s = void 0, n = void 0) {
1446
1289
  }
1447
1290
  });
1448
1291
  }
1449
- function Xe(e, t, s = void 0, n = void 0) {
1450
- const { objId: i, pred: c, tag: r } = t, a = {
1292
+ function Je(e, t, s = void 0, n = void 0) {
1293
+ const { objId: i, pred: c, tag: o } = t, a = {
1451
1294
  uri: "/resources/6w/tags",
1452
1295
  otpCTX: "SecurityContext=preferred",
1453
1296
  optTenant: `tenant=${e.tenant}`
1454
- }, o = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1297
+ }, r = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1455
1298
  tag: [
1456
1299
  {
1457
1300
  subject: [
@@ -1459,14 +1302,14 @@ function Xe(e, t, s = void 0, n = void 0) {
1459
1302
  uri: `pid://${i}`
1460
1303
  }
1461
1304
  ],
1462
- predicate: M[c],
1305
+ predicate: P[c],
1463
1306
  object: {
1464
- literal: r
1307
+ literal: o
1465
1308
  }
1466
1309
  }
1467
1310
  ]
1468
1311
  };
1469
- f(o, {
1312
+ f(r, {
1470
1313
  method: "DELETE",
1471
1314
  data: JSON.stringify(d),
1472
1315
  headers: {
@@ -1482,20 +1325,20 @@ function Xe(e, t, s = void 0, n = void 0) {
1482
1325
  }
1483
1326
  });
1484
1327
  }
1485
- function We(e, t = "", s = void 0, n = void 0) {
1328
+ function Ee(e, t = "", s = void 0, n = void 0) {
1486
1329
  const { space: i } = e;
1487
1330
  if (t === "")
1488
1331
  return;
1489
1332
  const c = {
1490
1333
  uri: "/enovia/resources/v1/modeler/documents"
1491
- }, r = {
1334
+ }, o = {
1492
1335
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1493
1336
  Accept: "application/json,text/javascript,*/*"
1494
- }, a = `${i}${c.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}`;
1337
+ }, 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}`;
1495
1338
  f(a, {
1496
1339
  method: "POST",
1497
- headers: r,
1498
- data: o,
1340
+ headers: o,
1341
+ data: r,
1499
1342
  onComplete(d) {
1500
1343
  s && s(JSON.parse(d));
1501
1344
  },
@@ -1505,20 +1348,93 @@ function We(e, t = "", s = void 0, n = void 0) {
1505
1348
  }
1506
1349
  });
1507
1350
  }
1508
- function Ye(e, t = void 0, s = void 0) {
1351
+ async function w(e, t = void 0, s = void 0) {
1352
+ const n = e.space + "/api/index/tk";
1353
+ return f(n, {
1354
+ onComplete(i, c, o) {
1355
+ const a = JSON.parse(i);
1356
+ if (t)
1357
+ return t(a), e.token = a?.result?.ServerToken;
1358
+ },
1359
+ onFailure(i) {
1360
+ s && s(i);
1361
+ }
1362
+ });
1363
+ }
1364
+ function Ge(e, t = void 0, s = void 0) {
1365
+ const n = `${e.space}/api/exalead/whatsnew`, i = {
1366
+ params: {
1367
+ community_id: null,
1368
+ hash_key: null,
1369
+ legacyFormat: !1,
1370
+ nresults: 1,
1371
+ query: "#all",
1372
+ start: 0
1373
+ }
1374
+ };
1375
+ w(e, (c) => {
1376
+ f(n, {
1377
+ method: "POST",
1378
+ headers: {
1379
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1380
+ "Content-type": "application/json;charset=UTF-8",
1381
+ Accept: "application/json"
1382
+ },
1383
+ data: JSON.stringify(i),
1384
+ type: "json",
1385
+ onComplete(o, a) {
1386
+ t && t(o, a);
1387
+ },
1388
+ onFailure(o, a) {
1389
+ s && s(o, a);
1390
+ }
1391
+ });
1392
+ });
1393
+ }
1394
+ function Ke(e, t = void 0, s = void 0) {
1395
+ const n = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
1396
+ params: {
1397
+ idsToFilterArr: [],
1398
+ mode: "offline",
1399
+ limit: 30,
1400
+ itemType: "User",
1401
+ maxNbOfCommonElements: "5"
1402
+ }
1403
+ };
1404
+ w(e, (c) => {
1405
+ f(n, {
1406
+ method: "POST",
1407
+ headers: {
1408
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1409
+ "Content-type": "application/json;charset=UTF-8",
1410
+ Accept: "application/json"
1411
+ },
1412
+ data: JSON.stringify(i),
1413
+ type: "json",
1414
+ onComplete(o, a) {
1415
+ const r = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1416
+ t && t(r, o);
1417
+ },
1418
+ onFailure(o, a) {
1419
+ s && s(o, a);
1420
+ }
1421
+ });
1422
+ });
1423
+ }
1424
+ function We(e, t = void 0, s = void 0) {
1509
1425
  const n = {
1510
1426
  base: e.space,
1511
1427
  uri: "/api/community/listmycommunities",
1512
1428
  limit: `/limit/${e.limit ? e.limit : 128}`,
1513
1429
  page: `/page/${e.page ? e.page : "1"}`
1514
1430
  }, i = `${n.base}${n.uri}${n.limit}${n.page}`, c = [];
1515
- w(e, (r) => {
1431
+ w(e, (o) => {
1516
1432
  f(i, {
1517
1433
  method: "GET",
1518
1434
  headers: {
1519
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1435
+ "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1520
1436
  },
1521
- onComplete(a, o, d) {
1437
+ onComplete(a, r, d) {
1522
1438
  const p = JSON.parse(a).result;
1523
1439
  let u = 0;
1524
1440
  p.forEach((m) => {
@@ -1530,7 +1446,7 @@ function Ye(e, t = void 0, s = void 0) {
1530
1446
  role: m.role,
1531
1447
  access: m.access
1532
1448
  };
1533
- ee(
1449
+ Z(
1534
1450
  e,
1535
1451
  m.id,
1536
1452
  (h) => {
@@ -1540,14 +1456,14 @@ function Ye(e, t = void 0, s = void 0) {
1540
1456
  );
1541
1457
  });
1542
1458
  },
1543
- onFailure(a, o) {
1459
+ onFailure(a, r) {
1544
1460
  const d = a;
1545
- d.status = o.status, d.response = o.errormsg, s && s(d);
1461
+ d.status = r.status, d.response = r.errormsg, s && s(d);
1546
1462
  }
1547
1463
  });
1548
1464
  });
1549
1465
  }
1550
- function ee(e, t, s, n) {
1466
+ function Z(e, t, s, n) {
1551
1467
  const i = `${e.space}/api/community/listmembers`, c = {
1552
1468
  params: {
1553
1469
  page: e.page ? e.page : 1,
@@ -1555,27 +1471,27 @@ function ee(e, t, s, n) {
1555
1471
  community_id: t
1556
1472
  }
1557
1473
  };
1558
- w(e, (r) => {
1474
+ w(e, (o) => {
1559
1475
  f(i, {
1560
1476
  method: "POST",
1561
1477
  headers: {
1562
1478
  "Content-type": "application/json;charset=UTF-8",
1563
1479
  Accept: "application/json",
1564
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1480
+ "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1565
1481
  },
1566
1482
  data: JSON.stringify(c),
1567
1483
  type: "json",
1568
- onComplete(a, o, d) {
1484
+ onComplete(a, r, d) {
1569
1485
  s && s(a);
1570
1486
  },
1571
- onFailure(a, o) {
1487
+ onFailure(a, r) {
1572
1488
  const d = a;
1573
- d.status = o.status, d.response = o.errormsg, n && n(d);
1489
+ d.status = r.status, d.response = r.errormsg, n && n(d);
1574
1490
  }
1575
1491
  });
1576
1492
  });
1577
1493
  }
1578
- function Be(e, t = void 0, s = void 0) {
1494
+ function Xe(e, t = void 0, s = void 0) {
1579
1495
  const n = "YXdA5x4DSUKtlAi2wmnyTA";
1580
1496
  e.commu_id || (e.commu_id = n);
1581
1497
  const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
@@ -1587,40 +1503,40 @@ function Be(e, t = void 0, s = void 0) {
1587
1503
  Accept: "application/json",
1588
1504
  "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1589
1505
  },
1590
- onComplete(r) {
1591
- const a = JSON.parse(r);
1506
+ onComplete(o) {
1507
+ const a = JSON.parse(o);
1592
1508
  t && t(a);
1593
1509
  },
1594
- onFailure(r, a) {
1595
- const o = r;
1596
- o.status = a.status, o.response = a.errormsg, s && s(o);
1510
+ onFailure(o, a) {
1511
+ const r = o;
1512
+ r.status = a.status, r.response = a.errormsg, s && s(r);
1597
1513
  }
1598
1514
  });
1599
1515
  });
1600
1516
  }
1601
- function ze(e, t, s = void 0, n = void 0) {
1517
+ function Ve(e, t, s = void 0, n = void 0) {
1602
1518
  const { listAllContacts: i, currentUser: c } = e;
1603
1519
  console.log("__listAllContacts", i.hits);
1604
- const r = `${e.space}/api/directmessages`, a = {
1520
+ const o = `${e.space}/api/directmessages`, a = {
1605
1521
  users: [c.login].concat(t.receipt)
1606
- }, o = {
1522
+ }, r = {
1607
1523
  id_msg: "",
1608
1524
  senderId: e.currentUser.login,
1609
1525
  senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
1610
- msg: ne(t.msg)
1526
+ msg: te(t.msg)
1611
1527
  };
1612
1528
  let d = !1;
1613
- te(
1529
+ ee(
1614
1530
  a.users,
1615
1531
  (l) => {
1616
- l !== void 0 && (o.id_msg = l.id, d = !0, R(e, o));
1532
+ l !== void 0 && (r.id_msg = l.id, d = !0, D(e, r));
1617
1533
  },
1618
1534
  (l) => {
1619
- d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l), o.id_msg = "";
1535
+ d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), n && n(l), r.id_msg = "";
1620
1536
  }
1621
1537
  ), d === !1 && setTimeout(() => {
1622
1538
  d === !1 && w(e, (l) => {
1623
- f(r, {
1539
+ f(o, {
1624
1540
  method: "POST",
1625
1541
  headers: {
1626
1542
  "Content-Type": "application/json",
@@ -1631,7 +1547,7 @@ function ze(e, t, s = void 0, n = void 0) {
1631
1547
  type: "json",
1632
1548
  onComplete(p, u, m) {
1633
1549
  const g = p;
1634
- g.reponse = JSON.parse(m.response), g.status = m.status, s && s(g), o.id_msg = g.result.id, R(e, o);
1550
+ g.reponse = JSON.parse(m.response), g.status = m.status, s && s(g), r.id_msg = g.result.id, D(e, r);
1635
1551
  },
1636
1552
  onFailure(p, u, m) {
1637
1553
  const g = p;
@@ -1641,7 +1557,7 @@ function ze(e, t, s = void 0, n = void 0) {
1641
1557
  });
1642
1558
  }, 500);
1643
1559
  }
1644
- function te(e, t, s, n) {
1560
+ function ee(e, t, s, n) {
1645
1561
  const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
1646
1562
  w(e, (c) => {
1647
1563
  f(i, {
@@ -1650,12 +1566,12 @@ function te(e, t, s, n) {
1650
1566
  Accept: "application/json,text/javascript,*/*",
1651
1567
  "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1652
1568
  },
1653
- onComplete(r) {
1654
- const a = JSON.parse(r), o = [];
1569
+ onComplete(o) {
1570
+ const a = JSON.parse(o), r = [];
1655
1571
  a.result.forEach((p) => {
1656
- p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && o.push(p);
1572
+ p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && r.push(p);
1657
1573
  });
1658
- const d = t.sort(), l = o.find((p) => {
1574
+ const d = t.sort(), l = r.find((p) => {
1659
1575
  const u = [];
1660
1576
  return p.users.forEach((m) => {
1661
1577
  u.push(m.login);
@@ -1663,20 +1579,20 @@ function te(e, t, s, n) {
1663
1579
  });
1664
1580
  s && l !== void 0 ? s(l) : (n || l === void 0) && n(l);
1665
1581
  },
1666
- onFailure(r) {
1667
- const a = r;
1582
+ onFailure(o) {
1583
+ const a = o;
1668
1584
  a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), n && n(a);
1669
1585
  }
1670
1586
  });
1671
1587
  });
1672
1588
  }
1673
- function R(e, t, s = void 0, n = void 0) {
1589
+ function D(e, t, s = void 0, n = void 0) {
1674
1590
  const i = {
1675
1591
  base: e.space,
1676
1592
  uri: "/api/community",
1677
1593
  id_msg: `${t.id_msg}`,
1678
1594
  endUri: "/instantmessages"
1679
- }, c = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, r = {
1595
+ }, c = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
1680
1596
  author: { login: t.senderId, displayName: t.senderName },
1681
1597
  accessState: null,
1682
1598
  commentUri: null,
@@ -1694,27 +1610,27 @@ function R(e, t, s = void 0, n = void 0) {
1694
1610
  Accept: "application/json",
1695
1611
  "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1696
1612
  },
1697
- data: JSON.stringify(r),
1613
+ data: JSON.stringify(o),
1698
1614
  type: "json",
1699
- onComplete(o, d, l) {
1700
- const p = o;
1615
+ onComplete(r, d, l) {
1616
+ const p = r;
1701
1617
  p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), s && s(p);
1702
1618
  },
1703
- onFailure(o, d) {
1704
- const l = o;
1619
+ onFailure(r, d) {
1620
+ const l = r;
1705
1621
  l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), n && n(l);
1706
1622
  }
1707
1623
  });
1708
1624
  });
1709
1625
  }
1710
- function ne(e) {
1626
+ function te(e) {
1711
1627
  const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), s = (/* @__PURE__ */ new Date()).toLocaleTimeString();
1712
1628
  return `<p>${e} </p>
1713
1629
  <br/>
1714
1630
  <hr/>
1715
1631
  <p><u>envoyer :</u>Le <b>${t} à ${s}</b></p>`;
1716
1632
  }
1717
- const se = {
1633
+ const ne = {
1718
1634
  title: "TEST DEV COMMUNITY IDEA",
1719
1635
  // titre du post
1720
1636
  community_id: "YXdA5x4DSUKtlAi2wmnyTA",
@@ -1724,28 +1640,28 @@ const se = {
1724
1640
  idee_id: "THhRI8rlQNWKRxpv3Xqqug"
1725
1641
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1726
1642
  };
1727
- function He(e, t, s = void 0, n = void 0) {
1643
+ function Ye(e, t, s = void 0, n = void 0) {
1728
1644
  const i = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
1729
- (o) => o.id === t.community_id
1730
- ), r = e.swymCommunities.find(
1731
- (o) => o.title.toLowerCase() === t.community_title.toLowerCase()
1645
+ (r) => r.id === t.community_id
1646
+ ), o = e.swymCommunities.find(
1647
+ (r) => r.title.toLowerCase() === t.community_title.toLowerCase()
1732
1648
  ), a = {
1733
1649
  params: {
1734
1650
  title: t.title,
1735
1651
  // String, le nom de l'affaire
1736
- community_id: c?.id !== void 0 ? c.id : r.id,
1652
+ community_id: c?.id !== void 0 ? c.id : o.id,
1737
1653
  // String, l'id de la communauté
1738
- message: ae(t.text_html),
1654
+ message: se(t.text_html),
1739
1655
  // STRING => le contenue du message doit être au format HTML
1740
1656
  published: 1
1741
1657
  // 1 publier, 0 non publier
1742
1658
  }
1743
1659
  };
1744
- w(e, (o) => {
1660
+ w(e, (r) => {
1745
1661
  const d = {
1746
1662
  "Content-type": "application/json;charset=UTF-8",
1747
1663
  Accept: "application/json",
1748
- "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1664
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1749
1665
  };
1750
1666
  f(i, {
1751
1667
  method: "POST",
@@ -1763,37 +1679,37 @@ function He(e, t, s = void 0, n = void 0) {
1763
1679
  });
1764
1680
  });
1765
1681
  }
1766
- function qe(e, t, s = void 0, n = void 0) {
1682
+ function Be(e, t, s = void 0, n = void 0) {
1767
1683
  const i = `${e.space}/api/idea/delete`, c = {
1768
1684
  params: {
1769
1685
  community_id: t.community_id,
1770
1686
  ideationIds: [t.idee_id]
1771
1687
  }
1772
1688
  };
1773
- w(e, (r) => {
1689
+ w(e, (o) => {
1774
1690
  f(i, {
1775
1691
  method: "POST",
1776
1692
  headers: {
1777
1693
  "Content-type": "application/json;charset=UTF-8",
1778
1694
  Accept: "application/json",
1779
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1695
+ "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1780
1696
  },
1781
1697
  data: JSON.stringify(c),
1782
1698
  type: "json",
1783
- onComplete(a, o, d) {
1699
+ onComplete(a, r, d) {
1784
1700
  s && s(a);
1785
1701
  },
1786
- onFailure(a, o, d) {
1702
+ onFailure(a, r, d) {
1787
1703
  const l = a;
1788
- l.status = o.status, l.response = o.errormsg, n && n(l);
1704
+ l.status = r.status, l.response = r.errormsg, n && n(l);
1789
1705
  }
1790
1706
  });
1791
1707
  });
1792
1708
  }
1793
- function Qe(e, t = "", s = void 0, n = void 0) {
1709
+ function He(e, t = "", s = void 0, n = void 0) {
1794
1710
  const i = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1795
1711
  t === "" && (t = i);
1796
- const c = `${e.space}/api/idea/get`, r = {
1712
+ const c = `${e.space}/api/idea/get`, o = {
1797
1713
  params: {
1798
1714
  id: t
1799
1715
  }
@@ -1806,43 +1722,43 @@ function Qe(e, t = "", s = void 0, n = void 0) {
1806
1722
  Accept: "application/json",
1807
1723
  "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1808
1724
  },
1809
- data: JSON.stringify(r),
1725
+ data: JSON.stringify(o),
1810
1726
  type: "json",
1811
- onComplete(o) {
1812
- const d = o;
1727
+ onComplete(r) {
1728
+ const d = r;
1813
1729
  d.msg = d.result.message, s && s(d);
1814
1730
  },
1815
- onFailure(o) {
1816
- const d = o;
1731
+ onFailure(r) {
1732
+ const d = r;
1817
1733
  d.status = headers.status, d.response = headers.errormsg, n && n(d);
1818
1734
  }
1819
1735
  });
1820
1736
  });
1821
1737
  }
1822
- function Ze(e, t = se, s = void 0, n = void 0) {
1738
+ function ze(e, t = ne, s = void 0, n = void 0) {
1823
1739
  const i = {
1824
1740
  uri: "/api/idea/list",
1825
1741
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1826
1742
  limit: `/limit/${t.limit ? t.limit : 10}`
1827
1743
  }, c = `${e.space}${i.uri}${i.comId}${i.limit}`;
1828
- w(e, (r) => {
1744
+ w(e, (o) => {
1829
1745
  f(c, {
1830
1746
  method: "GET",
1831
1747
  headers: {
1832
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1748
+ "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1833
1749
  },
1834
1750
  onComplete(a) {
1835
- const o = JSON.parse(a);
1836
- s && s(o);
1751
+ const r = JSON.parse(a);
1752
+ s && s(r);
1837
1753
  },
1838
- onFailure(a, o) {
1754
+ onFailure(a, r) {
1839
1755
  const d = a;
1840
- d.status = o.status, d.response = o.errormsg, n && n(d);
1756
+ d.status = r.status, d.response = r.errormsg, n && n(d);
1841
1757
  }
1842
1758
  });
1843
1759
  });
1844
1760
  }
1845
- function ae(e) {
1761
+ function se(e) {
1846
1762
  return !e || e === "" ? `<h2><u>INFORMATIONS AFFAIRE :</u></h2>
1847
1763
  <p><u>|⚠️<em> Merci de respecter l&#39;écriture des tags, en MAJUSCULES, nom complet, pas de caractères</em></u></p>
1848
1764
  <p><u><em>|spéciaux, séparation par &#34;_&#34; si besoin !</em></u></p>
@@ -1917,78 +1833,117 @@ function ae(e) {
1917
1833
  <p>
1918
1834
  </p>` : e;
1919
1835
  }
1920
- function et(e) {
1836
+ function qe(e, t = void 0, s = void 0) {
1837
+ const n = e.space + "/api/user/getcurrent/";
1838
+ w(
1839
+ e,
1840
+ (i) => {
1841
+ f(n, {
1842
+ method: "GET",
1843
+ headers: { "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken },
1844
+ onComplete(c, o, a) {
1845
+ const r = JSON.parse(c);
1846
+ t && t(r.result);
1847
+ },
1848
+ onFailure(c, o, a) {
1849
+ s && s({ response: c, headers: o, xhr: a });
1850
+ }
1851
+ });
1852
+ },
1853
+ s
1854
+ );
1855
+ }
1856
+ function Qe(e, t, s = void 0, n = void 0) {
1857
+ const i = e.space + "/api/user/find/login/" + t;
1858
+ w(
1859
+ e,
1860
+ (c) => {
1861
+ f(i, {
1862
+ method: "GET",
1863
+ headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
1864
+ onComplete(o, a, r) {
1865
+ const d = JSON.parse(o);
1866
+ s && s(d);
1867
+ },
1868
+ onFailure(o) {
1869
+ n && n(o);
1870
+ }
1871
+ });
1872
+ },
1873
+ n
1874
+ );
1875
+ }
1876
+ function Ze(e) {
1921
1877
  const t = "Hello " + e;
1922
1878
  return console.log(t), t;
1923
1879
  }
1924
1880
  export {
1925
- v as UUID,
1881
+ j as UUID,
1926
1882
  Fe as _3DSpace_Create_Doc,
1927
1883
  C as _3DSpace_csrf,
1928
1884
  I as _3DSpace_download_doc,
1929
1885
  X as _3DSpace_download_multidoc,
1930
1886
  K as _3DSpace_file_update,
1931
- V as _3DSpace_file_update_csr,
1932
- A as _3DSpace_file_url,
1933
- ke as _3DSpace_file_url_csr,
1934
- k as _3DSpace_get_csrf,
1887
+ W as _3DSpace_file_update_csr,
1888
+ $ as _3DSpace_file_url,
1889
+ be as _3DSpace_file_url_csr,
1890
+ F as _3DSpace_get_csrf,
1935
1891
  G as _3DSpace_get_docInfo,
1936
- W as _3DSpace_get_downloadTicket_multidoc,
1892
+ V as _3DSpace_get_downloadTicket_multidoc,
1937
1893
  N as _3DSpace_get_securityContexts,
1938
- Re as _3DSpace_lifecycle_changeRevision,
1939
- $e as _3DSpace_lifecycle_changeState,
1940
- Ae as _3DSpace_lifecycle_getGraph,
1941
- De as _3DSpace_lifecycle_getNextRevision,
1942
- Ue as _3DSpace_lifecycle_getNextStates,
1943
- Ye as _3DSwim_getAllCommunities,
1944
- ee as _3DSwim_getMembersCommunity,
1945
- ze as _3DSwym_buildDirectMessage,
1946
- qe as _3DSwym_deleteIdea,
1947
- te as _3DSwym_findCommunityToInstantMSG,
1948
- ve as _3DSwym_getAllNews,
1949
- je as _3DSwym_getFamiliarPeople,
1950
- Be as _3DSwym_getIdeaStatusMaturity,
1951
- Qe as _3DSwym_getSWYMIdea,
1952
- Ze as _3DSwym_get_AllSWYMIdeas,
1953
- Y as _3DSwym_get_currentUser,
1954
- Ie as _3DSwym_get_findUser,
1894
+ De as _3DSpace_lifecycle_changeRevision,
1895
+ Ue as _3DSpace_lifecycle_changeState,
1896
+ $e as _3DSpace_lifecycle_getGraph,
1897
+ Ae as _3DSpace_lifecycle_getNextRevision,
1898
+ ke as _3DSpace_lifecycle_getNextStates,
1899
+ We as _3DSwim_getAllCommunities,
1900
+ Z as _3DSwim_getMembersCommunity,
1901
+ Ve as _3DSwym_buildDirectMessage,
1902
+ Be as _3DSwym_deleteIdea,
1903
+ ee as _3DSwym_findCommunityToInstantMSG,
1904
+ Ge as _3DSwym_getAllNews,
1905
+ Ke as _3DSwym_getFamiliarPeople,
1906
+ Xe as _3DSwym_getIdeaStatusMaturity,
1907
+ He as _3DSwym_getSWYMIdea,
1908
+ ze as _3DSwym_get_AllSWYMIdeas,
1909
+ qe as _3DSwym_get_currentUser,
1910
+ Qe as _3DSwym_get_findUser,
1955
1911
  w as _3DSwym_get_version,
1956
- He as _3DSwym_postIdea,
1957
- R as _3DSwym_sendMessageData,
1958
- ye as _AppMngt_get_info_user,
1959
- Se as _AppMngt_get_users,
1960
- ge as _getPlateformInfos,
1961
- j as _getPlatformServices,
1912
+ Ye as _3DSwym_postIdea,
1913
+ D as _3DSwym_sendMessageData,
1914
+ Se as _AppMngt_get_info_user,
1915
+ he as _AppMngt_get_users,
1916
+ me as _getPlateformInfos,
1917
+ J as _getPlatformServices,
1962
1918
  f as _httpCallAuthenticated,
1963
- ue as _setDraggable,
1964
- me as _setDroppable,
1965
- fe as _setupTagger,
1966
- Ve as addTagToDoc,
1967
- he as compass_getListAdditionalApps,
1968
- E as couleurs,
1969
- _e as createUserGroups,
1970
- z as dataMixing,
1971
- Ce as deleteUserGroups,
1972
- de as findAdresse,
1973
- Pe as getActiveServices,
1974
- Me as getAllContextSecurity,
1975
- xe as getCSRFToken,
1976
- ce as getCommunes,
1977
- we as getComplementUG,
1978
- Le as getDataFrom3DSpace,
1979
- le as getDataFromGouvFr,
1980
- Ke as getDatasByTenant,
1981
- B as getDatasFrom3DSpace,
1982
- Ee as getDownloadDocument,
1983
- We as getInfoDocTags,
1984
- Te as getUserGroupsList,
1985
- J as getUsersGroupRules,
1986
- Ge as get_3DSpace_csrf,
1987
- Oe as patchUserGroups,
1988
- Ne as patchUserGroupsControl,
1989
- Je as pushDataIn3DSpace,
1990
- be as readUserGroupControl,
1991
- Xe as removeTagToDoc,
1992
- et as sayHello,
1993
- pe as updateEvent
1919
+ pe as _setDraggable,
1920
+ fe as _setDroppable,
1921
+ ue as _setupTagger,
1922
+ Le as addTagToDoc,
1923
+ ge as compass_getListAdditionalApps,
1924
+ L as couleurs,
1925
+ ye as createUserGroups,
1926
+ B as dataMixing,
1927
+ Te as deleteUserGroups,
1928
+ ce as findAdresse,
1929
+ je as getAllContextSecurity,
1930
+ Re as getCSRFToken,
1931
+ re as getCommunes,
1932
+ _e as getComplementUG,
1933
+ Ie as getDataFrom3DSpace,
1934
+ de as getDataFromGouvFr,
1935
+ Me as getDatasByTenant,
1936
+ Y as getDatasFrom3DSpace,
1937
+ ve as getDownloadDocument,
1938
+ Ee as getInfoDocTags,
1939
+ we as getUserGroupsList,
1940
+ E as getUsersGroupRules,
1941
+ Pe as get_3DSpace_csrf,
1942
+ Ce as patchUserGroups,
1943
+ Oe as patchUserGroupsControl,
1944
+ xe as pushDataIn3DSpace,
1945
+ Ne as readUserGroupControl,
1946
+ Je as removeTagToDoc,
1947
+ Ze as sayHello,
1948
+ le as updateEvent
1994
1949
  };