@beam3_dev/api_module 0.0.102 → 0.0.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/wb3Api.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { v4 as M } from "uuid";
2
2
  import { DateTime as N } from "luxon";
3
- import { requirejs as O, widget as U } from "@widget-lab/3ddashboard-utils";
4
- function I() {
3
+ import { requirejs as O, widget as j } from "@widget-lab/3ddashboard-utils";
4
+ function U() {
5
5
  return M();
6
6
  }
7
7
  const L = {
@@ -34,7 +34,7 @@ const L = {
34
34
  b3Edit8: "#616161",
35
35
  b3Edit9: "#795548"
36
36
  };
37
- async function re(e, t = void 0, n = void 0) {
37
+ async function ce(e, t = void 0, n = void 0) {
38
38
  const s = parseInt(e);
39
39
  await fetch(
40
40
  "https://apicarto.ign.fr/api/codes-postaux/communes/" + s,
@@ -50,7 +50,7 @@ async function re(e, t = void 0, n = void 0) {
50
50
  n && n(o), console.error("Erreur : " + o);
51
51
  });
52
52
  }
53
- async function ce(e, t = void 0, n = void 0) {
53
+ async function de(e, t = void 0, n = 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 ce(e, t = void 0, n = void 0) {
65
65
  n && n(s), console.error("Erreur : " + s);
66
66
  });
67
67
  }
68
- async function de(e, t = L) {
68
+ async function le(e, t = L) {
69
69
  let n = N.now().year;
70
- const s = e, o = [], c = (a) => {
71
- for (let r in a)
72
- o.push({ date: r, comment: a[r] });
70
+ const s = e, o = [], r = (a) => {
71
+ for (let c in a)
72
+ o.push({ date: c, comment: a[c] });
73
73
  };
74
74
  for (let a = n; a <= n + 1; a++)
75
75
  await fetch(
@@ -80,59 +80,64 @@ async function de(e, t = L) {
80
80
  Accept: "application/json"
81
81
  }
82
82
  }
83
- ).then((r) => r.json()).then((r) => {
84
- c(r);
85
- }).catch((r) => console.error("Erreur : " + r));
83
+ ).then((c) => c.json()).then((c) => {
84
+ r(c);
85
+ }).catch((c) => console.error("Erreur : " + c));
86
86
  return (() => {
87
87
  const a = s.length === 0 ? {
88
88
  events: []
89
89
  } : s;
90
- for (let r of o)
90
+ for (let c of o)
91
91
  a.events.findIndex(
92
- (l) => l.start === N.fromISO(r.date).toISODate() && l.name === "Férié : " + r.comment
92
+ (l) => l.start === N.fromISO(c.date).toISODate() && l.name === "Férié : " + c.comment
93
93
  ) === -1 && a.events.push({
94
- name: "Férié : " + r.comment,
95
- start: N.fromISO(r.date).toISODate(),
96
- end: N.fromISO(r.date).toISODate(),
94
+ name: "Férié : " + c.comment,
95
+ start: N.fromISO(c.date).toISODate(),
96
+ end: N.fromISO(c.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
100
100
  return a;
101
101
  })();
102
102
  }
103
- async function le(e, t, n = !0) {
103
+ async function pe(e, t, n = !0) {
104
104
  const s = e.events.findIndex((o) => o.uuid === t.uuid);
105
- return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((o, c) => o.start - c.start), e;
105
+ return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((o, r) => o.start - r.start), e;
106
106
  }
107
- function m(e, t) {
107
+ function f(e, t) {
108
108
  O(["DS/WAFData/WAFData"], (n) => {
109
109
  n.authenticatedRequest(e, t);
110
110
  });
111
111
  }
112
- function pe(e, t, n) {
112
+ function ue(e, t, n) {
113
113
  O(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
114
- s.draggable(e, { data: t, start: n });
114
+ s.draggable(e, {
115
+ data: t,
116
+ start: n
117
+ });
115
118
  });
116
119
  }
117
- function ue(e, t = void 0) {
120
+ function fe(e, t = void 0) {
118
121
  O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
119
122
  let s;
120
123
  s === void 0 && (s = n.createProxy({
121
- widgetId: U.id,
124
+ widgetId: j.id,
122
125
  filteringMode: "WithFilteringServices"
123
126
  }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
124
127
  });
125
128
  }
126
- function fe(e, t) {
129
+ function me(e, t) {
127
130
  O(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
128
- n.droppable(e, { drop: t });
131
+ n.droppable(e, {
132
+ drop: t
133
+ });
129
134
  });
130
135
  }
131
- async function me(e, t = void 0, n = void 0) {
136
+ async function ge(e, t = void 0, n = void 0) {
132
137
  await O(
133
138
  ["DS/i3DXCompassServices/i3DXCompassServices"],
134
139
  (s) => {
135
- (!e || e === "") && (e = U.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
140
+ (!e || e === "") && (e = j.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
136
141
  s.getPlatformServices({
137
142
  platformId: e,
138
143
  onComplete: t,
@@ -145,92 +150,128 @@ async function me(e, t = void 0, n = void 0) {
145
150
  function J() {
146
151
  let e = {};
147
152
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
148
- const n = t.getTenant(), s = t.getUser(), o = t.getAllApplicationConfigurations(), c = t.getApplicationConfiguration(
153
+ const n = t.getTenant(), s = t.getUser(), o = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
149
154
  "com.3ds.wp.passport.cors"
150
155
  );
151
156
  e = {
152
157
  tenant: n,
153
158
  user: s,
154
159
  appsConfiguration: o,
155
- appConf: c
160
+ appConf: r
156
161
  };
157
162
  }), console.log("%cRETOUR API :", "color:blue", e), e;
158
163
  }
159
- function ge(e, t, n) {
164
+ function E(e, t = void 0, n = void 0) {
165
+ if (e.tenant) {
166
+ const s = `https://${e.tenant}-eu1-apps.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?tenant=${e.tenant}&cors=true&xrequestedwith=xmlhttprequest`;
167
+ f(s, {
168
+ onComplete(o) {
169
+ const r = JSON.parse(o);
170
+ if (console.log("_getServiceUrl", r), r && "platforms" in r) {
171
+ const i = r.find((a) => {
172
+ a.id, e.tenant;
173
+ });
174
+ t && t(i);
175
+ }
176
+ },
177
+ onFailure(o) {
178
+ n && n(o);
179
+ }
180
+ });
181
+ }
182
+ }
183
+ function he(e, t = void 0, n = void 0) {
184
+ if (e.tenant) {
185
+ const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
186
+ f(s, {
187
+ onComplete(o) {
188
+ const r = JSON.parse(o);
189
+ if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
190
+ const i = `${r[0].services[0].url}`;
191
+ t && t(i);
192
+ }
193
+ },
194
+ onFailure(o) {
195
+ n && n(o);
196
+ }
197
+ });
198
+ }
199
+ }
200
+ function Se(e, t, n) {
160
201
  const s = {
161
202
  base: `${e.space}`,
162
203
  uri: "/resources/AppsMngt/api/custom/applications",
163
204
  option: `?filter=${e.tenant}`
164
205
  // facultatif
165
206
  }, o = `${s.base}${s.uri}${s.option}`;
166
- m(o, {
207
+ f(o, {
167
208
  method: "GET",
168
209
  headers: {
169
210
  "Content-Type": "application/json",
170
211
  Accept: "application/json"
171
212
  },
172
- onComplete(c, i, a) {
173
- const r = JSON.parse(c), d = r.data.map((l) => {
213
+ onComplete(r, i, a) {
214
+ const c = JSON.parse(r), d = c.data.map((l) => {
174
215
  const p = l.attributes.name, u = l.id;
175
216
  return { name: p, id: u };
176
217
  });
177
- t && t(d, r);
218
+ t && t(d, c);
178
219
  },
179
- onFailure(c, i) {
180
- const a = c;
220
+ onFailure(r, i) {
221
+ const a = r;
181
222
  a.msg = i.errormsg, a.errCode = i.errorcode, n && n(a);
182
223
  }
183
224
  });
184
225
  }
185
- function he(e, t = void 0, n = void 0) {
226
+ function _e(e, t = void 0, n = void 0) {
186
227
  let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
187
- m(s, {
188
- onComplete(o, c, i) {
228
+ f(s, {
229
+ onComplete(o, r, i) {
189
230
  const a = JSON.parse(o);
190
231
  console.log("_AppMngt_get_users => ", a), t && t(a);
191
232
  },
192
- onFailure(o, c) {
233
+ onFailure(o, r) {
193
234
  const i = o;
194
- i.msg = c.errormsg, i.errCode = c.errorcode, n && n(i);
235
+ i.msg = r.errormsg, i.errCode = r.errorcode, n && n(i);
195
236
  }
196
237
  });
197
238
  }
198
- function Se(e, t, n = void 0, s = void 0) {
239
+ function ye(e, t, n = void 0, s = void 0) {
199
240
  let o = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
200
- m(o, {
201
- onComplete(c, i, a) {
202
- const r = JSON.parse(c);
203
- n && n(r);
241
+ f(o, {
242
+ onComplete(r, i, a) {
243
+ const c = JSON.parse(r);
244
+ n && n(c);
204
245
  },
205
- onFailure(c, i) {
206
- const a = c;
246
+ onFailure(r, i) {
247
+ const a = r;
207
248
  a.msg = i.errormsg, a.errCode = i.errorcode, s && s(a);
208
249
  }
209
250
  });
210
251
  }
211
- const F = {
252
+ const v = {
212
253
  "Content-Type": "application/json",
213
254
  Accept: "application/json,text/javascript,*/*"
214
255
  };
215
- function _e(e, t, n = void 0, s = void 0) {
216
- const { space: o, currentUser: c } = e, a = `${o}${{
256
+ function we(e, t, n = void 0, s = void 0) {
257
+ const { space: o, currentUser: r } = e, a = `${o}${{
217
258
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
218
- }.URIUGr}`, r = {
259
+ }.URIUGr}`, c = {
219
260
  groups: [
220
261
  {
221
262
  title: t.title,
222
263
  description: t.description,
223
- members: t.members || [c.email, "samuel.mureau@beam3.fr"],
264
+ members: t.members || [r.email, "samuel.mureau@beam3.fr"],
224
265
  pending_members: [],
225
266
  sharing: t.sharing,
226
267
  visibility: t.visibility
227
268
  }
228
269
  ]
229
270
  };
230
- m(a, {
271
+ f(a, {
231
272
  method: "POST",
232
- headers: F,
233
- data: JSON.stringify(r),
273
+ headers: v,
274
+ data: JSON.stringify(c),
234
275
  onComplete(d) {
235
276
  n && n(JSON.parse(d));
236
277
  },
@@ -241,9 +282,9 @@ function _e(e, t, n = void 0, s = void 0) {
241
282
  }
242
283
  });
243
284
  }
244
- function ye(e, t, n = void 0, s = void 0) {
245
- const { space: o, tenant: c } = e, i = o, a = `/3drdfpersist/v1/resources/${t}`, r = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${c}`, d = `${i}${a}${r}`;
246
- m(d, {
285
+ function Ce(e, t, n = void 0, s = void 0) {
286
+ const { space: o, tenant: r } = e, i = o, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${i}${a}${c}`;
287
+ f(d, {
247
288
  opts: {
248
289
  method: "GET",
249
290
  headers: {
@@ -254,19 +295,19 @@ function ye(e, t, n = void 0, s = void 0) {
254
295
  onComplete(u) {
255
296
  n && n(JSON.parse(u));
256
297
  },
257
- onFailure(u, f) {
298
+ onFailure(u, m) {
258
299
  const g = u;
259
- g.msg = f.errormsg, g.errCode = f.errorcode, s && s(g);
300
+ g.msg = m.errormsg, g.errCode = m.errorcode, s && s(g);
260
301
  }
261
302
  });
262
303
  }
263
- function E(e, t = void 0, n = void 0) {
264
- const { space: s, tenant: o } = e, c = s, i = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, r = {
304
+ function G(e, t = void 0, n = void 0) {
305
+ const { space: s, tenant: o } = e, r = s, i = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${o}`, c = {
265
306
  method: "GET",
266
307
  Accept: "application/json,*/*,test/javascript"
267
- }, d = `${c}${i}${a}`;
268
- m(d, {
269
- OPTsH: r,
308
+ }, d = `${r}${i}${a}`;
309
+ f(d, {
310
+ OPTsH: c,
270
311
  onComplete(l) {
271
312
  t && t(JSON.parse(l));
272
313
  },
@@ -276,19 +317,19 @@ function E(e, t = void 0, n = void 0) {
276
317
  }
277
318
  });
278
319
  }
279
- function we(e, t = void 0, n = void 0) {
320
+ function Te(e, t = void 0, n = void 0) {
280
321
  const { space: s, currentUser: o } = e, a = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
281
322
  "Content-Type": "application/json",
282
323
  Accept: "application/json,text/javascript,*/*"
283
324
  } };
284
325
  try {
285
- m(a, {
326
+ f(a, {
286
327
  opts: d,
287
328
  onComplete(l) {
288
- const p = JSON.parse(l), u = {}, f = p.groups.filter((g) => g.uri.startsWith("uuid:"));
329
+ const p = JSON.parse(l), u = {}, m = p.groups.filter((g) => g.uri.startsWith("uuid:"));
289
330
  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);
291
- u.iam = S, u.UG = f, u.iamMember = h, E(
331
+ const g = m.filter((_) => _.owner === o.email), h = m.filter((_) => _.members.includes(o.email)), S = g.concat(h);
332
+ u.iam = S, u.UG = m, u.iamMember = h, G(
292
333
  e,
293
334
  (_) => {
294
335
  u.rules = _, t && t(u);
@@ -307,14 +348,14 @@ function we(e, t = void 0, n = void 0) {
307
348
  console.log(l);
308
349
  }
309
350
  }
310
- function Ce(e, t) {
351
+ function Oe(e, t) {
311
352
  const { space: n } = e, o = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
312
- m(o, {
353
+ f(o, {
313
354
  method: "DELETE"
314
355
  });
315
356
  }
316
- function Te(e, t, n, s = void 0, o = void 0) {
317
- const { space: c, tenant: i } = e, a = {
357
+ function be(e, t, n, s = void 0, o = void 0) {
358
+ const { space: r, tenant: i } = e, a = {
318
359
  URITI: "/3drdfpersist/resources/v1/template-instances",
319
360
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
320
361
  nextURICh: "/characteristics",
@@ -322,9 +363,9 @@ function Te(e, t, n, s = void 0, o = void 0) {
322
363
  nexURImem: "/members",
323
364
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
324
365
  OPTsTenant: `tenant=dstenant:${i}`
325
- }, r = n, d = `${c}${a.URIUGr}/${t}`, l = JSON.stringify(r);
326
- m(d, {
327
- headers: F,
366
+ }, c = n, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(c);
367
+ f(d, {
368
+ headers: v,
328
369
  method: "PATCH",
329
370
  data: l,
330
371
  type: "json",
@@ -336,11 +377,11 @@ function Te(e, t, n, s = void 0, o = void 0) {
336
377
  }
337
378
  });
338
379
  }
339
- function Oe(e, t, n, s = void 0, o = void 0) {
340
- const { space: c } = e, a = `${c}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
341
- m(a, {
380
+ function Ne(e, t, n, s = void 0, o = void 0) {
381
+ const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
382
+ f(a, {
342
383
  method: "PATCH",
343
- headers: F,
384
+ headers: v,
344
385
  data: JSON.stringify(n),
345
386
  type: "json",
346
387
  onComplete(d) {
@@ -351,9 +392,9 @@ function Oe(e, t, n, s = void 0, o = void 0) {
351
392
  }
352
393
  });
353
394
  }
354
- function be(e, t, n = void 0, s = void 0) {
395
+ function ke(e, t, n = void 0, s = void 0) {
355
396
  const { space: o } = e, i = `${o}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
356
- m(i, {
397
+ f(i, {
357
398
  opts: {
358
399
  method: "GET",
359
400
  headers: {
@@ -369,28 +410,28 @@ function be(e, t, n = void 0, s = void 0) {
369
410
  }
370
411
  });
371
412
  }
372
- async function G(e, t, n) {
413
+ async function K(e, t, n) {
373
414
  if (e.space) {
374
415
  const s = `${e.space}/resources/v1/application/CSRF`;
375
- m(s, {
416
+ f(s, {
376
417
  onComplete(o) {
377
418
  o = JSON.parse(o), t && t(o.csrf);
378
419
  },
379
- onFailure(o, c, i) {
380
- n && n({ error: o, headers: c, xhr: i });
420
+ onFailure(o, r, i) {
421
+ n && n({ error: o, headers: r, xhr: i });
381
422
  }
382
423
  });
383
424
  }
384
425
  }
385
- async function K(e, t = void 0, n = void 0, s = void 0) {
426
+ async function X(e, t = void 0, n = void 0, s = void 0) {
386
427
  const o = e.space;
387
428
  if (t === void 0) {
388
429
  console.log("Le paramètre docid est obligatoire");
389
430
  return;
390
431
  }
391
- const c = o + `/resources/v1/modeler/documents/${t}`;
392
- m(c, {
393
- onComplete(i, a, r) {
432
+ const r = o + `/resources/v1/modeler/documents/${t}`;
433
+ f(r, {
434
+ onComplete(i, a, c) {
394
435
  const d = JSON.parse(i);
395
436
  n && n(d);
396
437
  },
@@ -402,8 +443,8 @@ async function K(e, t = void 0, n = void 0, s = void 0) {
402
443
  function k(e, t = void 0, n = void 0) {
403
444
  if (e.objID && e.objID !== "") {
404
445
  let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
405
- m(s, {
406
- onComplete(o, c, i) {
446
+ f(s, {
447
+ onComplete(o, r, i) {
407
448
  const a = JSON.parse(o);
408
449
  e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
409
450
  },
@@ -425,15 +466,15 @@ function k(e, t = void 0, n = void 0) {
425
466
  function T(e, t = void 0, n = void 0) {
426
467
  if (e.space) {
427
468
  const s = e.space + "/resources/v1/application/CSRF";
428
- m(s, {
429
- onComplete(o, c, i) {
469
+ f(s, {
470
+ onComplete(o, r, i) {
430
471
  const a = JSON.parse(o);
431
472
  t && t(a.csrf.value);
432
473
  },
433
- onFailure(o, c, i) {
474
+ onFailure(o, r, i) {
434
475
  n && n({
435
476
  response: o,
436
- headers: c,
477
+ headers: r,
437
478
  xhr: i
438
479
  });
439
480
  }
@@ -441,22 +482,22 @@ function T(e, t = void 0, n = void 0) {
441
482
  } else
442
483
  n && n("ERROR : url du 3DSpace non défini.");
443
484
  }
444
- function j(e, t = void 0, n = void 0) {
485
+ function D(e, t = void 0, n = void 0) {
445
486
  let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
446
487
  k(
447
488
  e,
448
489
  (o) => {
449
- m(s, {
490
+ f(s, {
450
491
  method: "PUT",
451
492
  headers: {
452
493
  ENO_CSRF_TOKEN: e.token
453
494
  },
454
- onComplete(c) {
455
- const a = JSON.parse(c).data[0].dataelements.ticketURL;
495
+ onComplete(r) {
496
+ const a = JSON.parse(r).data[0].dataelements.ticketURL;
456
497
  t && t(a);
457
498
  },
458
- onFailure(c, i) {
459
- console.warn("☠️ error => ", c, i), n && n(c, i);
499
+ onFailure(r, i) {
500
+ console.warn("☠️ error => ", r, i), n && n(r, i);
460
501
  }
461
502
  });
462
503
  },
@@ -465,9 +506,9 @@ function j(e, t = void 0, n = void 0) {
465
506
  }
466
507
  );
467
508
  }
468
- function Ne(e, t, n, s = void 0, o = void 0) {
469
- const c = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
470
- n || (n = e.token), m(c, {
509
+ function Fe(e, t, n, s = void 0, o = void 0) {
510
+ const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
511
+ n || (n = e.token), f(r, {
471
512
  method: "PUT",
472
513
  headers: {
473
514
  ENO_CSRF_TOKEN: n
@@ -476,10 +517,10 @@ function Ne(e, t, n, s = void 0, o = void 0) {
476
517
  let a = JSON.parse(i);
477
518
  if (console.log("☠️ info => ", a), a.success === !0)
478
519
  try {
479
- const r = a.data[0].dataelements.ticketURL;
480
- s && s(r);
481
- } catch (r) {
482
- o && o(r);
520
+ const c = a.data[0].dataelements.ticketURL;
521
+ s && s(c);
522
+ } catch (c) {
523
+ o && o(c);
483
524
  }
484
525
  },
485
526
  onFailure(i) {
@@ -487,40 +528,40 @@ function Ne(e, t, n, s = void 0, o = void 0) {
487
528
  }
488
529
  });
489
530
  }
490
- function X(e, t, n, s, o, c = void 0, i = void 0) {
531
+ function V(e, t, n, s, o, r = void 0, i = void 0) {
491
532
  k(
492
533
  e,
493
534
  t,
494
535
  (a) => {
495
- V(
536
+ W(
496
537
  e,
497
538
  t,
498
539
  n,
499
540
  s,
500
541
  o,
501
542
  a.csrf.value,
502
- c,
543
+ r,
503
544
  i
504
545
  );
505
546
  }
506
547
  );
507
548
  }
508
- function V(e, t, n, s, o, c, i = void 0, a = void 0) {
509
- const r = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
510
- m(r, {
549
+ function W(e, t, n, s, o, r, i = void 0, a = void 0) {
550
+ const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
551
+ f(c, {
511
552
  method: "PUT",
512
553
  headers: {
513
- ENO_CSRF_TOKEN: c
554
+ ENO_CSRF_TOKEN: r
514
555
  },
515
556
  onComplete(d, l, p) {
516
- const u = JSON.parse(d).data[0].dataelements, f = new FormData();
517
- f.append("__fcs__jobTicket", u.ticket), f.append("file_0", s, o);
557
+ const u = JSON.parse(d).data[0].dataelements, m = new FormData();
558
+ m.append("__fcs__jobTicket", u.ticket), m.append("file_0", s, o);
518
559
  const g = {};
519
- g.method = "POST", g.data = f, g.onComplete = function(h) {
560
+ g.method = "POST", g.data = m, g.onComplete = function(h) {
520
561
  let S = "temp_" + Date.now(), _ = {
521
562
  method: "PUT",
522
563
  headers: {
523
- ENO_CSRF_TOKEN: c
564
+ ENO_CSRF_TOKEN: r
524
565
  },
525
566
  data: JSON.stringify({
526
567
  data: [{
@@ -546,41 +587,41 @@ function V(e, t, n, s, o, c, i = void 0, a = void 0) {
546
587
  a && a(y);
547
588
  }
548
589
  };
549
- m(
590
+ f(
550
591
  e.space + "/resources/v1/modeler/documents",
551
592
  _
552
593
  );
553
594
  }, g.onFailure = function(h) {
554
595
  a && a(h);
555
- }, g.timeout = 0, m(u.ticketURL, g);
596
+ }, g.timeout = 0, f(u.ticketURL, g);
556
597
  }
557
598
  });
558
599
  }
559
- async function ke(e, t, n, s, o = void 0, c = void 0) {
560
- const i = e.space, a = e.token, r = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
600
+ async function ve(e, t, n, s, o = void 0, r = void 0) {
601
+ const i = e.space, a = e.token, c = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
561
602
  type: "text/plain"
562
603
  }), p = {
563
604
  url_Ticket: `${i}/resources/v1/modeler/documents/files/CheckinTicket`,
564
- url_Post: `${i}/resources/v1/modeler/documents/?SecurityContext=ctx::${r}`
605
+ url_Post: `${i}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`
565
606
  };
566
607
  if (!i && i !== "") {
567
608
  console.log("le store._3DSpace est vide");
568
609
  return;
569
610
  }
570
- m(p.url_Ticket, {
611
+ f(p.url_Ticket, {
571
612
  method: "PUT",
572
613
  headers: {
573
614
  ENO_CSRF_TOKEN: a.value
574
615
  },
575
- onComplete(u, f, g) {
616
+ onComplete(u, m, g) {
576
617
  const h = JSON.parse(u).data[0].dataelements;
577
618
  d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, n);
578
619
  const S = {
579
620
  method: "POST",
580
621
  data: d,
581
622
  onComplete(C) {
582
- if (r !== "" && a !== "") {
583
- const D = {
623
+ if (c !== "" && a !== "") {
624
+ const F = {
584
625
  method: "POST",
585
626
  headers: {
586
627
  ENO_CSRF_TOKEN: a,
@@ -603,7 +644,7 @@ async function ke(e, t, n, s, o = void 0, c = void 0) {
603
644
  }
604
645
  }]
605
646
  },
606
- tempId: I()
647
+ tempId: U()
607
648
  }]
608
649
  }),
609
650
  type: "json",
@@ -611,7 +652,7 @@ async function ke(e, t, n, s, o = void 0, c = void 0) {
611
652
  onComplete: _,
612
653
  onFailure: y
613
654
  };
614
- r !== "" && m(p.url_Post, D);
655
+ c !== "" && f(p.url_Post, F);
615
656
  } else
616
657
  console.warn("le store est vide");
617
658
  },
@@ -620,21 +661,21 @@ async function ke(e, t, n, s, o = void 0, c = void 0) {
620
661
  function _(C) {
621
662
  console.log("Success -- response ", C.data[0]), o && o(C);
622
663
  }
623
- function y(C, D) {
664
+ function y(C, F) {
624
665
  console.log("Erreur -- response ", C, `
625
- headers `, D), c && c(C);
666
+ headers `, F), r && r(C);
626
667
  }
627
- m(h.ticketURL, S);
668
+ f(h.ticketURL, S);
628
669
  }
629
670
  });
630
671
  }
631
- function b(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0, i = !1) {
672
+ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, r = void 0, i = !1) {
632
673
  const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
633
- m(a, {
674
+ f(a, {
634
675
  method: "GET",
635
- onComplete(r) {
636
- const d = JSON.parse(r);
637
- let l = "", p, u, f;
676
+ onComplete(c) {
677
+ const d = JSON.parse(c);
678
+ let l = "", p, u, m;
638
679
  if (t) {
639
680
  let g = d.collabspaces.find((h) => h.title === t);
640
681
  if (g) {
@@ -645,44 +686,44 @@ function b(e, t = void 0, n = void 0, s = void 0, o = void 0, c = void 0, i = !1
645
686
  (C) => C.organization.pid === S.organization.pid && C.role.pid === S.role.pid
646
687
  )
647
688
  ), n && (Array.isArray(n) ? n.forEach((S) => {
648
- f || h.forEach((_) => {
689
+ m || h.forEach((_) => {
649
690
  if (S === _.role.name && s === _.organization.title)
650
- f = S, u = s;
691
+ m = S, u = s;
651
692
  else if (S === _.role.name) {
652
693
  let y = h.filter(
653
694
  (C) => C.role.name === S
654
695
  );
655
- y.length === 1 ? (f = y[0].role.name, u = y[0].organization.title) : c(y);
696
+ y.length === 1 ? (m = y[0].role.name, u = y[0].organization.title) : r(y);
656
697
  }
657
698
  });
658
699
  }) : h.forEach((S) => {
659
700
  if (n === S.role.name && s === S.organization.title)
660
- f = n, u = s;
701
+ m = n, u = s;
661
702
  else if (n === S.role.name) {
662
703
  let _ = h.filter(
663
704
  (y) => y.role.name === n
664
705
  );
665
- _.length === 1 ? (f = _[0].role.name, u = _[0].organization.title) : c(_);
706
+ _.length === 1 ? (m = _[0].role.name, u = _[0].organization.title) : r(_);
666
707
  }
667
708
  }));
668
709
  }
669
710
  }
670
- p && u && f ? (l = f + "." + u + "." + p, o(l)) : d.preferredcredentials && i ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, o(l)) : c && (l = f + "." + u + "." + p, c(l));
711
+ p && u && m ? (l = m + "." + u + "." + p, o(l)) : d.preferredcredentials && i ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, o(l)) : r && (l = m + "." + u + "." + p, r(l));
671
712
  },
672
- onFailure(r, d) {
713
+ onFailure(c, d) {
673
714
  console.log("Erreur de récupération du contexte de sécurité. => ", {
674
- err: r,
715
+ err: c,
675
716
  headers: d
676
717
  });
677
718
  }
678
719
  });
679
720
  }
680
- async function v(e, t = void 0, n = void 0) {
721
+ async function I(e, t = void 0, n = void 0) {
681
722
  return (!e.objID || e.objID === "") && console.warn(
682
723
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
683
724
  ), (e.space === "" || !e.space) && console.warn(
684
725
  "_3DSpace_download_doc() / Le paramètre space est obligatoire"
685
- ), (e.token === "" || !e.token) && (G(
726
+ ), (e.token === "" || !e.token) && (K(
686
727
  e,
687
728
  (s) => {
688
729
  e.token = s;
@@ -693,58 +734,58 @@ async function v(e, t = void 0, n = void 0) {
693
734
  ), console.warn(
694
735
  "_3DSpace_download_doc() / Le paramètre token est obligatoire"
695
736
  )), new Promise((s, o) => {
696
- j(
737
+ D(
697
738
  e,
698
- (c) => {
699
- m(c, {
739
+ (r) => {
740
+ f(r, {
700
741
  headers: {
701
742
  "Content-Type": "application/json",
702
743
  Accept: "application/json"
703
744
  },
704
745
  onComplete(a) {
705
- let r;
746
+ let c;
706
747
  try {
707
- r = JSON.parse(a);
748
+ c = JSON.parse(a);
708
749
  } catch {
709
- r = a;
750
+ c = a;
710
751
  }
711
- t && typeof t == "function" && t(r), s(r);
752
+ t && typeof t == "function" && t(c), s(c);
712
753
  },
713
- onFailure(a, r, d) {
754
+ onFailure(a, c, d) {
714
755
  n && (console.log("error http", a), n({
715
756
  msg: JSON.parse(a),
716
- headers: r,
757
+ headers: c,
717
758
  xhr: d
718
759
  }), o({
719
760
  msg: JSON.parse(a),
720
- headers: r,
761
+ headers: c,
721
762
  xhr: d
722
763
  }));
723
764
  }
724
765
  });
725
766
  },
726
- (c) => {
727
- n && n(c), console.log("*_3dspace_download_doc / error file URL *", c), o(c);
767
+ (r) => {
768
+ n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), o(r);
728
769
  }
729
770
  );
730
771
  });
731
772
  }
732
- async function W(e, t, n = void 0, s = void 0) {
773
+ async function B(e, t, n = void 0, s = void 0) {
733
774
  let o = [];
734
775
  if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
735
776
  for (let a = 0; a < t.length; a += 80) {
736
- const r = t.slice(a, a + 80);
737
- o.push(r);
777
+ const c = t.slice(a, a + 80);
778
+ o.push(c);
738
779
  }
739
780
  const i = (a) => {
740
- B(
781
+ Y(
741
782
  e,
742
783
  o[a],
743
784
  () => {
744
785
  a++, a < o.length && i(a);
745
786
  },
746
- (r) => {
747
- n && n(r);
787
+ (c) => {
788
+ n && n(c);
748
789
  }
749
790
  );
750
791
  };
@@ -752,11 +793,11 @@ async function W(e, t, n = void 0, s = void 0) {
752
793
  } else
753
794
  console.warn("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."), s && s("La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini.");
754
795
  }
755
- function B(e, t, n = void 0, s = void 0, o = void 0) {
756
- const c = [];
757
- t.forEach((r) => {
758
- c.push({
759
- id: r
796
+ function Y(e, t, n = void 0, s = void 0, o = void 0) {
797
+ const r = [];
798
+ t.forEach((c) => {
799
+ r.push({
800
+ id: c
760
801
  });
761
802
  });
762
803
  let i = JSON.stringify({
@@ -764,28 +805,28 @@ function B(e, t, n = void 0, s = void 0, o = void 0) {
764
805
  name: "ENO_CSRF_TOKEN",
765
806
  value: e.token
766
807
  },
767
- data: c
808
+ data: r
768
809
  });
769
810
  const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
770
- m(a, {
811
+ f(a, {
771
812
  method: "PUT",
772
813
  data: i,
773
814
  type: "json",
774
- onComplete(r) {
775
- const d = r.data;
776
- r.success === !0 && (n && n(), d.forEach((l) => {
815
+ onComplete(c) {
816
+ const d = c.data;
817
+ c.success === !0 && (n && n(), d.forEach((l) => {
777
818
  try {
778
819
  const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
779
- m(u, {
780
- onComplete: (f) => {
820
+ f(u, {
821
+ onComplete: (m) => {
781
822
  s && s({
782
823
  objectId: l.id,
783
824
  fileName: p,
784
- data: JSON.parse(f)
825
+ data: JSON.parse(m)
785
826
  });
786
827
  },
787
- onFailure: (f) => {
788
- console.log("error http", f);
828
+ onFailure: (m) => {
829
+ console.log("error http", m);
789
830
  }
790
831
  });
791
832
  } catch (p) {
@@ -793,15 +834,15 @@ function B(e, t, n = void 0, s = void 0, o = void 0) {
793
834
  }
794
835
  }));
795
836
  },
796
- onFailure(r) {
797
- console.log(r), o && o(r);
837
+ onFailure(c) {
838
+ console.log(c), o && o(c);
798
839
  }
799
840
  });
800
841
  }
801
842
  function De(e, t, n = void 0, s = void 0) {
802
843
  return new Promise((o) => {
803
844
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
804
- const c = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
845
+ const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
805
846
  b(
806
847
  e.space,
807
848
  "ESPACE COMMUN",
@@ -833,12 +874,12 @@ function De(e, t, n = void 0, s = void 0) {
833
874
  s && s(a);
834
875
  }
835
876
  };
836
- m(c, i);
877
+ f(r, i);
837
878
  }
838
879
  });
839
880
  }
840
- function Fe(e, t, n, s = void 0, o = void 0) {
841
- return new Promise((c) => {
881
+ function Ae(e, t, n, s = void 0, o = void 0) {
882
+ return new Promise((r) => {
842
883
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
843
884
  const i = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
844
885
  b(
@@ -846,9 +887,9 @@ function Fe(e, t, n, s = void 0, o = void 0) {
846
887
  "ESPACE COMMUN",
847
888
  ["VPLMProjectLeader", "VPLMCreator"],
848
889
  void 0,
849
- (r) => e.ctx = r,
850
- (r) => {
851
- console.log("onError =>", r);
890
+ (c) => e.ctx = c,
891
+ (c) => {
892
+ console.log("onError =>", c);
852
893
  }
853
894
  );
854
895
  let a = {
@@ -866,21 +907,21 @@ function Fe(e, t, n, s = void 0, o = void 0) {
866
907
  }]
867
908
  }),
868
909
  type: "json",
869
- onComplete(r) {
870
- s && s(r);
910
+ onComplete(c) {
911
+ s && s(c);
871
912
  },
872
- onFailure(r) {
873
- o && o(r);
913
+ onFailure(c) {
914
+ o && o(c);
874
915
  }
875
916
  };
876
- m(i, a);
917
+ f(i, a);
877
918
  }
878
919
  });
879
920
  }
880
- function je(e, t, n = void 0, s = void 0) {
921
+ function $e(e, t, n = void 0, s = void 0) {
881
922
  return new Promise((o) => {
882
923
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
883
- const c = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
924
+ const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
884
925
  b(
885
926
  e.space,
886
927
  "ESPACE COMMUN",
@@ -912,14 +953,14 @@ function je(e, t, n = void 0, s = void 0) {
912
953
  s && s(a);
913
954
  }
914
955
  };
915
- m(c, i);
956
+ f(r, i);
916
957
  }
917
958
  });
918
959
  }
919
- function Ae(e, t, n = void 0, s = void 0) {
960
+ function je(e, t, n = void 0, s = void 0) {
920
961
  return new Promise((o) => {
921
962
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
922
- const c = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
963
+ const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
923
964
  b(
924
965
  e.space,
925
966
  "ESPACE COMMUN",
@@ -957,12 +998,12 @@ function Ae(e, t, n = void 0, s = void 0) {
957
998
  s && s(a);
958
999
  }
959
1000
  };
960
- m(c, i);
1001
+ f(r, i);
961
1002
  }
962
1003
  });
963
1004
  }
964
- function $e(e, t, n, s = void 0, o = void 0) {
965
- return new Promise((c) => {
1005
+ function Ue(e, t, n, s = void 0, o = void 0) {
1006
+ return new Promise((r) => {
966
1007
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
967
1008
  const i = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
968
1009
  b(
@@ -970,9 +1011,9 @@ function $e(e, t, n, s = void 0, o = void 0) {
970
1011
  "ESPACE COMMUN",
971
1012
  ["VPLMProjectLeader", "VPLMCreator"],
972
1013
  void 0,
973
- (r) => e.ctx = r,
974
- (r) => {
975
- console.log("onError =>", r);
1014
+ (c) => e.ctx = c,
1015
+ (c) => {
1016
+ console.log("onError =>", c);
976
1017
  }
977
1018
  );
978
1019
  let a = {
@@ -995,18 +1036,18 @@ function $e(e, t, n, s = void 0, o = void 0) {
995
1036
  notificationTimeout: 600
996
1037
  }),
997
1038
  type: "json",
998
- onComplete(r) {
999
- s && s(r);
1039
+ onComplete(c) {
1040
+ s && s(c);
1000
1041
  },
1001
- onFailure(r) {
1002
- o && o(r);
1042
+ onFailure(c) {
1043
+ o && o(c);
1003
1044
  }
1004
1045
  };
1005
- m(i, a);
1046
+ f(i, a);
1006
1047
  }
1007
1048
  });
1008
1049
  }
1009
- function Ue(e, t, n, s, o = void 0, c = void 0) {
1050
+ function Ie(e, t, n, s, o = void 0, r = void 0) {
1010
1051
  return console.log("credentials", e), new Promise((i) => {
1011
1052
  `${e.space}`, JSON.stringify({
1012
1053
  csrf: {
@@ -1028,69 +1069,69 @@ function Ue(e, t, n, s, o = void 0, c = void 0) {
1028
1069
  });
1029
1070
  }
1030
1071
  //!SECTION
1031
- function Ie(e, t = void 0, n = void 0) {
1072
+ function Re(e, t = void 0, n = void 0) {
1032
1073
  const s = {
1033
1074
  base: `${e.space}`,
1034
1075
  uri: "/resources/bps/cspaces",
1035
1076
  optTenant: `tenant=${e.tenant}`
1036
1077
  }, o = `${s.base}${s.uri}?${s.optTenant}`;
1037
- m(o, {
1078
+ f(o, {
1038
1079
  method: "GET",
1039
1080
  headers: {
1040
1081
  Accept: "application/json,text/javascript,*/*",
1041
1082
  "Content-Type": "application/ds-json"
1042
1083
  },
1043
- onComplete(c, i) {
1044
- const a = JSON.parse(c);
1084
+ onComplete(r, i) {
1085
+ const a = JSON.parse(r);
1045
1086
  t && t(a, i);
1046
1087
  },
1047
- onFailure(c, i, a) {
1048
- n && n({ response: c, headers: i, xhr: a });
1088
+ onFailure(r, i, a) {
1089
+ n && n({ response: r, headers: i, xhr: a });
1049
1090
  }
1050
1091
  });
1051
1092
  }
1052
- function ve(e, t, n, s) {
1053
- j(
1093
+ function Pe(e, t, n, s) {
1094
+ D(
1054
1095
  e.space,
1055
1096
  t,
1056
1097
  (o) => {
1057
- m(o, {
1098
+ f(o, {
1058
1099
  header: { ENO_CSRF_TOKEN: e.token },
1059
- onComplete: (c) => {
1060
- n && n(c);
1100
+ onComplete: (r) => {
1101
+ n && n(r);
1061
1102
  },
1062
- onFailure: (c) => {
1063
- console.log("error http", c), s && s(c);
1103
+ onFailure: (r) => {
1104
+ console.log("error http", r), s && s(r);
1064
1105
  }
1065
1106
  });
1066
1107
  }
1067
1108
  );
1068
1109
  }
1069
- async function Re(e, t, n = void 0, s = void 0) {
1110
+ async function xe(e, t, n = void 0, s = void 0) {
1070
1111
  return new Promise((o) => {
1071
- j(e, t, (c) => {
1072
- m(c, {
1073
- onComplete: (i, a, r) => (o(JSON.parse(i)), n && n(JSON.parse(i), a, r), o),
1074
- onFailure: (i, a, r) => {
1075
- s && s(i, a, r), console.log(i, a?.errormsg);
1112
+ D(e, t, (r) => {
1113
+ f(r, {
1114
+ onComplete: (i, a, c) => (o(JSON.parse(i)), n && n(JSON.parse(i), a, c), o),
1115
+ onFailure: (i, a, c) => {
1116
+ s && s(i, a, c), console.log(i, a?.errormsg);
1076
1117
  }
1077
1118
  });
1078
1119
  });
1079
1120
  });
1080
1121
  }
1081
- function Pe(e, t, n, s = void 0, o = void 0) {
1082
- const c = new Blob([JSON.stringify(t)], { type: "text/plain" });
1122
+ function Me(e, t, n, s = void 0, o = void 0) {
1123
+ const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1083
1124
  k(
1084
1125
  e,
1085
1126
  n,
1086
1127
  (i) => {
1087
- const a = i.data[0].relateddata.files[0].id, r = i.data[0].dataelements.secondaryTitle !== "" ? i.data[0].dataelements.secondaryTitle : i.data[0].dataelements.title;
1088
- X(
1128
+ const a = i.data[0].relateddata.files[0].id, c = i.data[0].dataelements.secondaryTitle !== "" ? i.data[0].dataelements.secondaryTitle : i.data[0].dataelements.title;
1129
+ V(
1089
1130
  e,
1090
1131
  n,
1091
1132
  a,
1092
- c,
1093
1133
  r,
1134
+ c,
1094
1135
  (d) => {
1095
1136
  s && s(d);
1096
1137
  },
@@ -1103,7 +1144,7 @@ function Pe(e, t, n, s = void 0, o = void 0) {
1103
1144
  }
1104
1145
  let R, P;
1105
1146
  const A = [];
1106
- async function xe(e, t = void 0, n = void 0) {
1147
+ async function Le(e, t = void 0, n = void 0) {
1107
1148
  e.objID && e.objID !== "" ? k(
1108
1149
  e,
1109
1150
  (s) => {
@@ -1122,8 +1163,8 @@ async function xe(e, t = void 0, n = void 0) {
1122
1163
  }
1123
1164
  );
1124
1165
  }
1125
- async function Me(e, t = void 0, n = void 0) {
1126
- console.log("getDatasByTenant (getDocuments)", e), await v(
1166
+ async function Je(e, t = void 0, n = void 0) {
1167
+ console.log("getDatasByTenant (getDocuments)", e), await I(
1127
1168
  e,
1128
1169
  (s) => {
1129
1170
  const o = {};
@@ -1134,36 +1175,36 @@ async function Me(e, t = void 0, n = void 0) {
1134
1175
  }
1135
1176
  );
1136
1177
  }
1137
- function Le(e, t = void 0, n = void 0) {
1178
+ function Ee(e, t = void 0, n = void 0) {
1138
1179
  const s = [];
1139
1180
  if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
1140
1181
  console.warn("la liste est vide ou n'est pas un tableau");
1141
1182
  return;
1142
1183
  }
1143
- e.objIds.forEach((o, c) => {
1144
- v(
1184
+ e.objIds.forEach((o, r) => {
1185
+ I(
1145
1186
  e,
1146
1187
  o.objID,
1147
1188
  (i) => {
1148
- s.push({ [o.name]: i }), o.name === "dbProjets" && (R = i.affaires.map((a) => a.objectID), Y(e, P)), c === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1189
+ s.push({ [o.name]: i }), o.name === "dbProjets" && (R = i.affaires.map((a) => a.objectID), q(e, P)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1149
1190
  }
1150
1191
  );
1151
1192
  });
1152
1193
  }
1153
- function Y(e, t, n = void 0, s = void 0) {
1154
- W(
1194
+ function q(e, t, n = void 0, s = void 0) {
1195
+ B(
1155
1196
  e,
1156
1197
  R,
1157
1198
  (o) => {
1158
- const c = [...t];
1159
- c.find((i) => i.objectID === o.objectId).data = o.data, P = c, A.push(o.data), n && n(A);
1199
+ const r = [...t];
1200
+ r.find((i) => i.objectID === o.objectId).data = o.data, P = r, A.push(o.data), n && n(A);
1160
1201
  },
1161
1202
  (o) => {
1162
1203
  s && (s(o), console.log(o));
1163
1204
  }
1164
1205
  );
1165
1206
  }
1166
- const q = "FA35FB9B177A280065800EA0000F599C", H = [
1207
+ const H = "FA35FB9B177A280065800EA0000F599C", z = [
1167
1208
  "swym",
1168
1209
  "3dspace",
1169
1210
  "drive",
@@ -1177,17 +1218,17 @@ const q = "FA35FB9B177A280065800EA0000F599C", H = [
1177
1218
  where: "ds6w:where",
1178
1219
  who: "ds6w:who",
1179
1220
  why: "ds6w:why"
1180
- }, z = {
1181
- objId: q,
1221
+ }, Q = {
1222
+ objId: H,
1182
1223
  pred: "who",
1183
1224
  order_by: "desc",
1184
1225
  tag: "testTag"
1185
1226
  };
1186
- function Je(e, t, n = void 0, s = void 0) {
1187
- const { space: o, tenant: c } = e, { objId: i, pred: a, tag: r } = t, d = {
1227
+ function Ge(e, t, n = void 0, s = void 0) {
1228
+ const { space: o, tenant: r } = e, { objId: i, pred: a, tag: c } = t, d = {
1188
1229
  uri: "/resources/6w/tags",
1189
1230
  otpCTX: "SecurityContext=preferred",
1190
- optTenant: `tenant=${c}`
1231
+ optTenant: `tenant=${r}`
1191
1232
  }, l = `${o}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1192
1233
  tag: [
1193
1234
  {
@@ -1198,12 +1239,12 @@ function Je(e, t, n = void 0, s = void 0) {
1198
1239
  ],
1199
1240
  predicate: x[a],
1200
1241
  object: {
1201
- literal: r
1242
+ literal: c
1202
1243
  }
1203
1244
  }
1204
1245
  ]
1205
1246
  };
1206
- m(l, {
1247
+ f(l, {
1207
1248
  method: "PUT",
1208
1249
  headers: {
1209
1250
  "Content-Type": "application/json",
@@ -1212,14 +1253,14 @@ function Je(e, t, n = void 0, s = void 0) {
1212
1253
  data: JSON.stringify(p),
1213
1254
  onComplete(u) {
1214
1255
  JSON.parse(u);
1215
- const f = {};
1256
+ const m = {};
1216
1257
  setTimeout(() => {
1217
- K(
1258
+ X(
1218
1259
  e,
1219
1260
  i,
1220
1261
  (g) => {
1221
1262
  const h = g.data[0].dataelements.title, S = g.data[0].dataelements.fileExtension !== void 0 ? g.data[0].dataelements.fileExtension : "", _ = g.data[0].relateddata.ownerInfo[0].dataelements.name;
1222
- f.name = h, f.ext = S, f.createBy = _, t.info = { ...f }, Q(
1263
+ m.name = h, m.ext = S, m.createBy = _, t.info = { ...m }, Z(
1223
1264
  e,
1224
1265
  t,
1225
1266
  (y) => {
@@ -1237,25 +1278,25 @@ function Je(e, t, n = void 0, s = void 0) {
1237
1278
  );
1238
1279
  }, 2e3);
1239
1280
  },
1240
- onFailure(u, f) {
1281
+ onFailure(u, m) {
1241
1282
  const g = u;
1242
- g.msg = f.errormsg, g.errCode = f.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
1283
+ g.msg = m.errormsg, g.errCode = m.errorcode, console.log("❌ sendDirectMessage => ", g), s && s(g);
1243
1284
  }
1244
1285
  });
1245
1286
  }
1246
- function Q(e, t, n = void 0, s = void 0) {
1287
+ function Z(e, t, n = void 0, s = void 0) {
1247
1288
  console.log("obj ", t);
1248
- const o = t.info.name, c = {
1289
+ const o = t.info.name, r = {
1249
1290
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1250
1291
  uri: "/federated/search"
1251
- }, i = `${c.baseUrl}${c.uri}`, a = {
1292
+ }, i = `${r.baseUrl}${r.uri}`, a = {
1252
1293
  "Content-Type": "application/json",
1253
1294
  Accept: "application/json,text/javascript,*/*"
1254
- }, r = I(), d = {
1295
+ }, c = U(), d = {
1255
1296
  with_indexing_date: !0,
1256
1297
  with_synthesis: !0,
1257
1298
  with_nls: !1,
1258
- label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${r}`,
1299
+ label: `3DSearch-${e.currentUser.username}-AjoutDeTagBeam-${c}`,
1259
1300
  locale: "fr",
1260
1301
  select_predicate: [
1261
1302
  "ds6w:label",
@@ -1293,7 +1334,7 @@ function Q(e, t, n = void 0, s = void 0) {
1293
1334
  }
1294
1335
  },
1295
1336
  select_exclude_synthesis: ["ds6w:what/ds6w:topic"],
1296
- order_by: z.order_by,
1337
+ order_by: Q.order_by,
1297
1338
  order_field: "relevance",
1298
1339
  select_snippets: [
1299
1340
  "ds6w:snippet",
@@ -1304,7 +1345,7 @@ function Q(e, t, n = void 0, s = void 0) {
1304
1345
  ],
1305
1346
  nresults: 40,
1306
1347
  start: "0",
1307
- source: H,
1348
+ source: z,
1308
1349
  tenant: e.tenant,
1309
1350
  login: {
1310
1351
  "3dspace": {
@@ -1312,7 +1353,7 @@ function Q(e, t, n = void 0, s = void 0) {
1312
1353
  }
1313
1354
  }
1314
1355
  };
1315
- console.log("dataPattern => ", d), m(i, {
1356
+ console.log("dataPattern => ", d), f(i, {
1316
1357
  method: "POST",
1317
1358
  headers: a,
1318
1359
  data: JSON.stringify(d),
@@ -1326,12 +1367,12 @@ function Q(e, t, n = void 0, s = void 0) {
1326
1367
  }
1327
1368
  });
1328
1369
  }
1329
- function Ee(e, t, n = void 0, s = void 0) {
1330
- const { objId: o, pred: c, tag: i } = t, a = {
1370
+ function Ke(e, t, n = void 0, s = void 0) {
1371
+ const { objId: o, pred: r, tag: i } = t, a = {
1331
1372
  uri: "/resources/6w/tags",
1332
1373
  otpCTX: "SecurityContext=preferred",
1333
1374
  optTenant: `tenant=${e.tenant}`
1334
- }, r = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1375
+ }, c = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1335
1376
  tag: [
1336
1377
  {
1337
1378
  subject: [
@@ -1339,14 +1380,14 @@ function Ee(e, t, n = void 0, s = void 0) {
1339
1380
  uri: `pid://${o}`
1340
1381
  }
1341
1382
  ],
1342
- predicate: x[c],
1383
+ predicate: x[r],
1343
1384
  object: {
1344
1385
  literal: i
1345
1386
  }
1346
1387
  }
1347
1388
  ]
1348
1389
  };
1349
- m(r, {
1390
+ f(c, {
1350
1391
  method: "DELETE",
1351
1392
  data: JSON.stringify(d),
1352
1393
  headers: {
@@ -1362,20 +1403,20 @@ function Ee(e, t, n = void 0, s = void 0) {
1362
1403
  }
1363
1404
  });
1364
1405
  }
1365
- function Ge(e, t = "", n = void 0, s = void 0) {
1406
+ function Xe(e, t = "", n = void 0, s = void 0) {
1366
1407
  const { space: o } = e;
1367
1408
  if (t === "")
1368
1409
  return;
1369
- const c = {
1410
+ const r = {
1370
1411
  uri: "/resources/v1/modeler/documents"
1371
1412
  }, i = {
1372
1413
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1373
1414
  Accept: "application/json,text/javascript,*/*"
1374
- }, a = `${o}${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}`;
1375
- m(a, {
1415
+ }, a = `${o}${r.uri}`, c = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;
1416
+ f(a, {
1376
1417
  method: "POST",
1377
1418
  headers: i,
1378
- data: r,
1419
+ data: c,
1379
1420
  onComplete(d) {
1380
1421
  n && n(JSON.parse(d));
1381
1422
  },
@@ -1387,8 +1428,8 @@ function Ge(e, t = "", n = void 0, s = void 0) {
1387
1428
  }
1388
1429
  async function w(e, t = void 0, n = void 0) {
1389
1430
  const s = e.space + "/api/index/tk";
1390
- return m(s, {
1391
- onComplete(o, c, i) {
1431
+ return f(s, {
1432
+ onComplete(o, r, i) {
1392
1433
  const a = JSON.parse(o);
1393
1434
  if (t)
1394
1435
  return t(a), e.token = a?.result?.ServerToken;
@@ -1398,7 +1439,7 @@ async function w(e, t = void 0, n = void 0) {
1398
1439
  }
1399
1440
  });
1400
1441
  }
1401
- function Ke(e, t = void 0, n = void 0) {
1442
+ function Ve(e, t = void 0, n = void 0) {
1402
1443
  const s = `${e.space}/api/exalead/whatsnew`, o = {
1403
1444
  params: {
1404
1445
  community_id: null,
@@ -1409,11 +1450,11 @@ function Ke(e, t = void 0, n = void 0) {
1409
1450
  start: 0
1410
1451
  }
1411
1452
  };
1412
- w(e, (c) => {
1413
- m(s, {
1453
+ w(e, (r) => {
1454
+ f(s, {
1414
1455
  method: "POST",
1415
1456
  headers: {
1416
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1457
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1417
1458
  "Content-type": "application/json;charset=UTF-8",
1418
1459
  Accept: "application/json"
1419
1460
  },
@@ -1428,7 +1469,7 @@ function Ke(e, t = void 0, n = void 0) {
1428
1469
  });
1429
1470
  });
1430
1471
  }
1431
- function Xe(e, t = void 0, n = void 0) {
1472
+ function We(e, t = void 0, n = void 0) {
1432
1473
  const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, o = {
1433
1474
  params: {
1434
1475
  idsToFilterArr: [],
@@ -1438,19 +1479,19 @@ function Xe(e, t = void 0, n = void 0) {
1438
1479
  maxNbOfCommonElements: "5"
1439
1480
  }
1440
1481
  };
1441
- w(e, (c) => {
1442
- m(s, {
1482
+ w(e, (r) => {
1483
+ f(s, {
1443
1484
  method: "POST",
1444
1485
  headers: {
1445
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken,
1486
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
1446
1487
  "Content-type": "application/json;charset=UTF-8",
1447
1488
  Accept: "application/json"
1448
1489
  },
1449
1490
  data: JSON.stringify(o),
1450
1491
  type: "json",
1451
1492
  onComplete(i, a) {
1452
- const r = i.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1453
- t && t(r, i);
1493
+ const c = i.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1494
+ t && t(c, i);
1454
1495
  },
1455
1496
  onFailure(i, a) {
1456
1497
  n && n(i, a);
@@ -1458,50 +1499,50 @@ function Xe(e, t = void 0, n = void 0) {
1458
1499
  });
1459
1500
  });
1460
1501
  }
1461
- function Ve(e, t = void 0, n = void 0) {
1502
+ function Be(e, t = void 0, n = void 0) {
1462
1503
  const s = {
1463
1504
  base: e.space,
1464
1505
  uri: "/api/community/listmycommunities",
1465
1506
  limit: `/limit/${e.limit ? e.limit : 128}`,
1466
1507
  page: `/page/${e.page ? e.page : "1"}`
1467
- }, o = `${s.base}${s.uri}${s.limit}${s.page}`, c = [];
1508
+ }, o = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1468
1509
  w(e, (i) => {
1469
- m(o, {
1510
+ f(o, {
1470
1511
  method: "GET",
1471
1512
  headers: {
1472
1513
  "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1473
1514
  },
1474
- onComplete(a, r, d) {
1515
+ onComplete(a, c, d) {
1475
1516
  const p = JSON.parse(a).result;
1476
1517
  let u = 0;
1477
- p.forEach((f) => {
1518
+ p.forEach((m) => {
1478
1519
  const g = {
1479
- description: f.description,
1480
- id: f.id,
1481
- title: f.title,
1482
- owner: f.owner,
1483
- role: f.role,
1484
- access: f.access
1520
+ description: m.description,
1521
+ id: m.id,
1522
+ title: m.title,
1523
+ owner: m.owner,
1524
+ role: m.role,
1525
+ access: m.access
1485
1526
  };
1486
- Z(
1527
+ ee(
1487
1528
  e,
1488
- f.id,
1529
+ m.id,
1489
1530
  (h) => {
1490
- u++, g.members = h, c.push(g), u === p.length && t && t(c);
1531
+ u++, g.members = h, r.push(g), u === p.length && t && t(r);
1491
1532
  },
1492
1533
  (h) => n(h)
1493
1534
  );
1494
1535
  });
1495
1536
  },
1496
- onFailure(a, r) {
1537
+ onFailure(a, c) {
1497
1538
  const d = a;
1498
- d.status = r.status, d.response = r.errormsg, n && n(d);
1539
+ d.status = c.status, d.response = c.errormsg, n && n(d);
1499
1540
  }
1500
1541
  });
1501
1542
  });
1502
1543
  }
1503
- function Z(e, t, n, s) {
1504
- const o = `${e.space}/api/community/listmembers`, c = {
1544
+ function ee(e, t, n, s) {
1545
+ const o = `${e.space}/api/community/listmembers`, r = {
1505
1546
  params: {
1506
1547
  page: e.page ? e.page : 1,
1507
1548
  limit: e.limit ? e.limit : 50,
@@ -1509,71 +1550,71 @@ function Z(e, t, n, s) {
1509
1550
  }
1510
1551
  };
1511
1552
  w(e, (i) => {
1512
- m(o, {
1553
+ f(o, {
1513
1554
  method: "POST",
1514
1555
  headers: {
1515
1556
  "Content-type": "application/json;charset=UTF-8",
1516
1557
  Accept: "application/json",
1517
1558
  "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1518
1559
  },
1519
- data: JSON.stringify(c),
1560
+ data: JSON.stringify(r),
1520
1561
  type: "json",
1521
- onComplete(a, r, d) {
1562
+ onComplete(a, c, d) {
1522
1563
  n && n(a);
1523
1564
  },
1524
- onFailure(a, r) {
1565
+ onFailure(a, c) {
1525
1566
  const d = a;
1526
- d.status = r.status, d.response = r.errormsg, s && s(d);
1567
+ d.status = c.status, d.response = c.errormsg, s && s(d);
1527
1568
  }
1528
1569
  });
1529
1570
  });
1530
1571
  }
1531
- function We(e, t = void 0, n = void 0) {
1572
+ function Ye(e, t = void 0, n = void 0) {
1532
1573
  const s = "YXdA5x4DSUKtlAi2wmnyTA";
1533
1574
  e.commu_id || (e.commu_id = s);
1534
1575
  const o = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1535
- w(e, (c) => {
1536
- m(o, {
1576
+ w(e, (r) => {
1577
+ f(o, {
1537
1578
  method: "GET",
1538
1579
  headers: {
1539
1580
  "Content-type": "application/json;charset=UTF-8",
1540
1581
  Accept: "application/json",
1541
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1582
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1542
1583
  },
1543
1584
  onComplete(i) {
1544
1585
  const a = JSON.parse(i);
1545
1586
  t && t(a);
1546
1587
  },
1547
1588
  onFailure(i, a) {
1548
- const r = i;
1549
- r.status = a.status, r.response = a.errormsg, n && n(r);
1589
+ const c = i;
1590
+ c.status = a.status, c.response = a.errormsg, n && n(c);
1550
1591
  }
1551
1592
  });
1552
1593
  });
1553
1594
  }
1554
- function Be(e, t, n = void 0, s = void 0) {
1555
- const { listAllContacts: o, currentUser: c } = e;
1595
+ function qe(e, t, n = void 0, s = void 0) {
1596
+ const { listAllContacts: o, currentUser: r } = e;
1556
1597
  console.log("__listAllContacts", o.hits);
1557
1598
  const i = `${e.space}/api/directmessages`, a = {
1558
- users: [c.login].concat(t.receipt)
1559
- }, r = {
1599
+ users: [r.login].concat(t.receipt)
1600
+ }, c = {
1560
1601
  id_msg: "",
1561
1602
  senderId: e.currentUser.login,
1562
1603
  senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
1563
- msg: te(t.msg)
1604
+ msg: ne(t.msg)
1564
1605
  };
1565
1606
  let d = !1;
1566
- ee(
1607
+ te(
1567
1608
  a.users,
1568
1609
  (l) => {
1569
- l !== void 0 && (r.id_msg = l.id, d = !0, $(e, r));
1610
+ l !== void 0 && (c.id_msg = l.id, d = !0, $(e, c));
1570
1611
  },
1571
1612
  (l) => {
1572
- d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), r.id_msg = "";
1613
+ d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), c.id_msg = "";
1573
1614
  }
1574
1615
  ), d === !1 && setTimeout(() => {
1575
1616
  d === !1 && w(e, (l) => {
1576
- m(i, {
1617
+ f(i, {
1577
1618
  method: "POST",
1578
1619
  headers: {
1579
1620
  "Content-Type": "application/json",
@@ -1582,11 +1623,11 @@ function Be(e, t, n = void 0, s = void 0) {
1582
1623
  },
1583
1624
  data: JSON.stringify(a),
1584
1625
  type: "json",
1585
- onComplete(p, u, f) {
1626
+ onComplete(p, u, m) {
1586
1627
  const g = p;
1587
- g.reponse = JSON.parse(f.response), g.status = f.status, n && n(g), r.id_msg = g.result.id, $(e, r);
1628
+ g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), c.id_msg = g.result.id, $(e, c);
1588
1629
  },
1589
- onFailure(p, u, f) {
1630
+ onFailure(p, u, m) {
1590
1631
  const g = p;
1591
1632
  g.msg = u.errormsg, g.status = u.status, s && s(g);
1592
1633
  }
@@ -1594,24 +1635,24 @@ function Be(e, t, n = void 0, s = void 0) {
1594
1635
  });
1595
1636
  }, 500);
1596
1637
  }
1597
- function ee(e, t, n, s) {
1638
+ function te(e, t, n, s) {
1598
1639
  const o = `${e.space}/api/directmessages/lite?with_favorites=false`;
1599
- w(e, (c) => {
1600
- m(o, {
1640
+ w(e, (r) => {
1641
+ f(o, {
1601
1642
  method: "GET",
1602
1643
  headers: {
1603
1644
  Accept: "application/json,text/javascript,*/*",
1604
- "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1645
+ "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1605
1646
  },
1606
1647
  onComplete(i) {
1607
- const a = JSON.parse(i), r = [];
1648
+ const a = JSON.parse(i), c = [];
1608
1649
  a.result.forEach((p) => {
1609
- p.users = p.users.sort((u, f) => u.login.localeCompare(f.login)), p.users.length === t.length && r.push(p);
1650
+ p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && c.push(p);
1610
1651
  });
1611
- const d = t.sort(), l = r.find((p) => {
1652
+ const d = t.sort(), l = c.find((p) => {
1612
1653
  const u = [];
1613
- return p.users.forEach((f) => {
1614
- u.push(f.login);
1654
+ return p.users.forEach((m) => {
1655
+ u.push(m.login);
1615
1656
  }), JSON.stringify(u) === JSON.stringify(d);
1616
1657
  });
1617
1658
  n && l !== void 0 ? n(l) : (s || l === void 0) && s(l);
@@ -1629,7 +1670,7 @@ function $(e, t, n = void 0, s = void 0) {
1629
1670
  uri: "/api/community",
1630
1671
  id_msg: `${t.id_msg}`,
1631
1672
  endUri: "/instantmessages"
1632
- }, c = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, i = {
1673
+ }, r = `${o.base}${o.uri}/${o.id_msg}${o.endUri}`, i = {
1633
1674
  author: { login: t.senderId, displayName: t.senderName },
1634
1675
  accessState: null,
1635
1676
  commentUri: null,
@@ -1639,8 +1680,8 @@ function $(e, t, n = void 0, s = void 0) {
1639
1680
  parentCommentUri: null,
1640
1681
  richMessage: t.msg
1641
1682
  };
1642
- console.log("_3dSwym_sendDirectMessageData url ", c), w(e, (a) => {
1643
- m(c, {
1683
+ console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (a) => {
1684
+ f(r, {
1644
1685
  method: "POST",
1645
1686
  headers: {
1646
1687
  "Content-Type": "application/json",
@@ -1649,25 +1690,25 @@ function $(e, t, n = void 0, s = void 0) {
1649
1690
  },
1650
1691
  data: JSON.stringify(i),
1651
1692
  type: "json",
1652
- onComplete(r, d, l) {
1653
- const p = r;
1693
+ onComplete(c, d, l) {
1694
+ const p = c;
1654
1695
  p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
1655
1696
  },
1656
- onFailure(r, d) {
1657
- const l = r;
1697
+ onFailure(c, d) {
1698
+ const l = c;
1658
1699
  l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
1659
1700
  }
1660
1701
  });
1661
1702
  });
1662
1703
  }
1663
- function te(e) {
1704
+ function ne(e) {
1664
1705
  const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
1665
1706
  return `<p>${e} </p>
1666
1707
  <br/>
1667
1708
  <hr/>
1668
1709
  <p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
1669
1710
  }
1670
- const ne = {
1711
+ const se = {
1671
1712
  title: "TEST DEV COMMUNITY IDEA",
1672
1713
  // titre du post
1673
1714
  community_id: "YXdA5x4DSUKtlAi2wmnyTA",
@@ -1677,82 +1718,82 @@ const ne = {
1677
1718
  idee_id: "THhRI8rlQNWKRxpv3Xqqug"
1678
1719
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1679
1720
  };
1680
- function Ye(e, t, n = void 0, s = void 0) {
1681
- const o = `${e.space}/api/idea/add`, c = e.swymCommunities.find(
1682
- (r) => r.id === t.community_id
1721
+ function He(e, t, n = void 0, s = void 0) {
1722
+ const o = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1723
+ (c) => c.id === t.community_id
1683
1724
  ), i = e.swymCommunities.find(
1684
- (r) => r.title.toLowerCase() === t.community_title.toLowerCase()
1725
+ (c) => c.title.toLowerCase() === t.community_title.toLowerCase()
1685
1726
  ), a = {
1686
1727
  params: {
1687
1728
  title: t.title,
1688
1729
  // String, le nom de l'affaire
1689
- community_id: c?.id !== void 0 ? c.id : i.id,
1730
+ community_id: r?.id !== void 0 ? r.id : i.id,
1690
1731
  // String, l'id de la communauté
1691
- message: se(t.text_html),
1732
+ message: ae(t.text_html),
1692
1733
  // STRING => le contenue du message doit être au format HTML
1693
1734
  published: 1
1694
1735
  // 1 publier, 0 non publier
1695
1736
  }
1696
1737
  };
1697
- w(e, (r) => {
1738
+ w(e, (c) => {
1698
1739
  const d = {
1699
1740
  "Content-type": "application/json;charset=UTF-8",
1700
1741
  Accept: "application/json",
1701
- "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1742
+ "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1702
1743
  };
1703
- m(o, {
1744
+ f(o, {
1704
1745
  method: "POST",
1705
1746
  headers: d,
1706
1747
  data: JSON.stringify(a),
1707
1748
  type: "json",
1708
1749
  onComplete(l, p, u) {
1709
- const f = JSON.parse(l);
1710
- f.status = u.status, f.response = u.response, n && n(f);
1750
+ const m = JSON.parse(l);
1751
+ m.status = u.status, m.response = u.response, n && n(m);
1711
1752
  },
1712
1753
  onFailure(l, p, u) {
1713
- const f = l;
1714
- f.status = p.status, f.response = p.errormsg, s && s(f);
1754
+ const m = l;
1755
+ m.status = p.status, m.response = p.errormsg, s && s(m);
1715
1756
  }
1716
1757
  });
1717
1758
  });
1718
1759
  }
1719
- function qe(e, t, n = void 0, s = void 0) {
1720
- const o = `${e.space}/api/idea/delete`, c = {
1760
+ function ze(e, t, n = void 0, s = void 0) {
1761
+ const o = `${e.space}/api/idea/delete`, r = {
1721
1762
  params: {
1722
1763
  community_id: t.community_id,
1723
1764
  ideationIds: [t.idee_id]
1724
1765
  }
1725
1766
  };
1726
1767
  w(e, (i) => {
1727
- m(o, {
1768
+ f(o, {
1728
1769
  method: "POST",
1729
1770
  headers: {
1730
1771
  "Content-type": "application/json;charset=UTF-8",
1731
1772
  Accept: "application/json",
1732
1773
  "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1733
1774
  },
1734
- data: JSON.stringify(c),
1775
+ data: JSON.stringify(r),
1735
1776
  type: "json",
1736
- onComplete(a, r, d) {
1777
+ onComplete(a, c, d) {
1737
1778
  n && n(a);
1738
1779
  },
1739
- onFailure(a, r, d) {
1780
+ onFailure(a, c, d) {
1740
1781
  const l = a;
1741
- l.status = r.status, l.response = r.errormsg, s && s(l);
1782
+ l.status = c.status, l.response = c.errormsg, s && s(l);
1742
1783
  }
1743
1784
  });
1744
1785
  });
1745
1786
  }
1746
- function He(e, t = "", n = void 0, s = void 0) {
1787
+ function Qe(e, t = "", n = void 0, s = void 0) {
1747
1788
  const o = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1748
1789
  t === "" && (t = o);
1749
- const c = `${e.space}/api/idea/get`, i = {
1790
+ const r = `${e.space}/api/idea/get`, i = {
1750
1791
  params: {
1751
1792
  id: t
1752
1793
  }
1753
1794
  };
1754
1795
  w(e, (a) => {
1755
- m(c, {
1796
+ f(r, {
1756
1797
  method: "POST",
1757
1798
  headers: {
1758
1799
  "Content-type": "application/json;charset=UTF-8",
@@ -1761,41 +1802,41 @@ function He(e, t = "", n = void 0, s = void 0) {
1761
1802
  },
1762
1803
  data: JSON.stringify(i),
1763
1804
  type: "json",
1764
- onComplete(r) {
1765
- const d = r;
1805
+ onComplete(c) {
1806
+ const d = c;
1766
1807
  d.msg = d.result.message, n && n(d);
1767
1808
  },
1768
- onFailure(r) {
1769
- const d = r;
1809
+ onFailure(c) {
1810
+ const d = c;
1770
1811
  d.status = headers.status, d.response = headers.errormsg, s && s(d);
1771
1812
  }
1772
1813
  });
1773
1814
  });
1774
1815
  }
1775
- function ze(e, t = ne, n = void 0, s = void 0) {
1816
+ function Ze(e, t = se, n = void 0, s = void 0) {
1776
1817
  const o = {
1777
1818
  uri: "/api/idea/list",
1778
1819
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1779
1820
  limit: `/limit/${t.limit ? t.limit : 10}`
1780
- }, c = `${e.space}${o.uri}${o.comId}${o.limit}`;
1821
+ }, r = `${e.space}${o.uri}${o.comId}${o.limit}`;
1781
1822
  w(e, (i) => {
1782
- m(c, {
1823
+ f(r, {
1783
1824
  method: "GET",
1784
1825
  headers: {
1785
1826
  "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1786
1827
  },
1787
1828
  onComplete(a) {
1788
- const r = JSON.parse(a);
1789
- n && n(r);
1829
+ const c = JSON.parse(a);
1830
+ n && n(c);
1790
1831
  },
1791
- onFailure(a, r) {
1832
+ onFailure(a, c) {
1792
1833
  const d = a;
1793
- d.status = r.status, d.response = r.errormsg, s && s(d);
1834
+ d.status = c.status, d.response = c.errormsg, s && s(d);
1794
1835
  }
1795
1836
  });
1796
1837
  });
1797
1838
  }
1798
- function se(e) {
1839
+ function ae(e) {
1799
1840
  return !e || e === "" ? `<h2><u>INFORMATIONS AFFAIRE :</u></h2>
1800
1841
  <p><u>|⚠️<em> Merci de respecter l&#39;écriture des tags, en MAJUSCULES, nom complet, pas de caractères</em></u></p>
1801
1842
  <p><u><em>|spéciaux, séparation par &#34;_&#34; si besoin !</em></u></p>
@@ -1870,34 +1911,34 @@ function se(e) {
1870
1911
  <p>
1871
1912
  </p>` : e;
1872
1913
  }
1873
- function Qe(e, t = void 0, n = void 0) {
1914
+ function et(e, t = void 0, n = void 0) {
1874
1915
  const s = e.space + "/api/user/getcurrent/";
1875
1916
  w(e, (o) => {
1876
- m(s, {
1917
+ f(s, {
1877
1918
  method: "GET",
1878
1919
  headers: {
1879
1920
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1880
1921
  },
1881
- onComplete(c, i, a) {
1882
- const r = JSON.parse(c);
1883
- t && t(r.result);
1922
+ onComplete(r, i, a) {
1923
+ const c = JSON.parse(r);
1924
+ t && t(c.result);
1884
1925
  },
1885
- onFailure(c, i, a) {
1886
- const r = { erreur: JSON.parse(c), headers: i, xhr: a };
1887
- n && n(r);
1926
+ onFailure(r, i, a) {
1927
+ const c = { erreur: JSON.parse(r), headers: i, xhr: a };
1928
+ n && n(c);
1888
1929
  }
1889
1930
  });
1890
1931
  });
1891
1932
  }
1892
- function Ze(e, t, n = void 0, s = void 0) {
1933
+ function tt(e, t, n = void 0, s = void 0) {
1893
1934
  const o = e.space + "/api/user/find/login/" + t;
1894
1935
  w(
1895
1936
  e,
1896
- (c) => {
1897
- m(o, {
1937
+ (r) => {
1938
+ f(o, {
1898
1939
  method: "GET",
1899
- headers: { "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken },
1900
- onComplete(i, a, r) {
1940
+ headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
1941
+ onComplete(i, a, c) {
1901
1942
  const d = JSON.parse(i);
1902
1943
  n && n(d);
1903
1944
  },
@@ -1909,11 +1950,24 @@ function Ze(e, t, n = void 0, s = void 0) {
1909
1950
  s
1910
1951
  );
1911
1952
  }
1912
- function et(e) {
1953
+ function nt(e, t = void 0, n = void 0) {
1954
+ e.tenant && E(e, (s) => {
1955
+ const o = s.find((a) => a.id === "3dpassport")?.url, r = s.find((a) => a.id === "businessprocess")?.url + "/api/v2", i = `${o}/login/?service=${r}/auth/cas`;
1956
+ f(i, {
1957
+ onComplete(a, c) {
1958
+ console.log("response", a), console.log("headers", c);
1959
+ },
1960
+ onFailure(a) {
1961
+ n && n(a);
1962
+ }
1963
+ });
1964
+ });
1965
+ }
1966
+ function st(e) {
1913
1967
  const t = "Hello " + e;
1914
1968
  return console.log(t), t;
1915
1969
  }
1916
- function tt(e, t = void 0, n = void 0) {
1970
+ function at(e, t = void 0, n = void 0) {
1917
1971
  return console.log("credentials", e), new Promise((s) => {
1918
1972
  if (e.token === "" && T(e), !e.space || e.space === "") {
1919
1973
  const i = J();
@@ -1930,14 +1984,14 @@ function tt(e, t = void 0, n = void 0) {
1930
1984
  },
1931
1985
  !0
1932
1986
  );
1933
- const o = N.now().ts, c = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
1934
- m(c, {
1987
+ const o = N.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
1988
+ f(r, {
1935
1989
  onComplete(i) {
1936
1990
  if (Array.isArray(JSON.parse(i))) {
1937
1991
  const a = JSON.parse(i);
1938
1992
  console.log("serviceId=3dsearch", a);
1939
- const r = `${a[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
1940
- m(r, {
1993
+ const c = `${a[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
1994
+ f(c, {
1941
1995
  method: "POST",
1942
1996
  headers: {
1943
1997
  Accept: "application/json",
@@ -1993,75 +2047,78 @@ function tt(e, t = void 0, n = void 0) {
1993
2047
  });
1994
2048
  }
1995
2049
  export {
1996
- I as UUID,
1997
- tt as _3DSearch_usersGroup,
1998
- ke as _3DSpace_Create_Doc,
1999
- Ue as _3DSpace_bookmark_addSubsciptions,
2050
+ U as UUID,
2051
+ at as _3DSearch_usersGroup,
2052
+ ve as _3DSpace_Create_Doc,
2053
+ Ie as _3DSpace_bookmark_addSubsciptions,
2000
2054
  T as _3DSpace_csrf,
2001
- v as _3DSpace_download_doc,
2002
- W as _3DSpace_download_multidoc,
2003
- X as _3DSpace_file_update,
2004
- V as _3DSpace_file_update_csr,
2005
- Ne as _3DSpace_file_url_csr,
2055
+ I as _3DSpace_download_doc,
2056
+ B as _3DSpace_download_multidoc,
2057
+ V as _3DSpace_file_update,
2058
+ W as _3DSpace_file_update_csr,
2059
+ Fe as _3DSpace_file_url_csr,
2006
2060
  k as _3DSpace_get_csrf,
2007
- K as _3DSpace_get_docInfo,
2008
- B as _3DSpace_get_downloadTicket_multidoc,
2061
+ X as _3DSpace_get_docInfo,
2062
+ Y as _3DSpace_get_downloadTicket_multidoc,
2009
2063
  b as _3DSpace_get_securityContexts,
2010
- j as _3DSpace_get_ticket,
2011
- $e as _3DSpace_lifecycle_changeRevision,
2012
- Fe as _3DSpace_lifecycle_changeState,
2013
- je as _3DSpace_lifecycle_getGraph,
2014
- Ae as _3DSpace_lifecycle_getNextRevision,
2064
+ D as _3DSpace_get_ticket,
2065
+ Ue as _3DSpace_lifecycle_changeRevision,
2066
+ Ae as _3DSpace_lifecycle_changeState,
2067
+ $e as _3DSpace_lifecycle_getGraph,
2068
+ je as _3DSpace_lifecycle_getNextRevision,
2015
2069
  De as _3DSpace_lifecycle_getNextStates,
2016
- Be as _3DSwym_buildDirectMessage,
2017
- qe as _3DSwym_deleteIdea,
2018
- ee as _3DSwym_findCommunityToInstantMSG,
2019
- Ve as _3DSwym_getAllCommunities,
2020
- Ke as _3DSwym_getAllNews,
2021
- Xe as _3DSwym_getFamiliarPeople,
2022
- We as _3DSwym_getIdeaStatusMaturity,
2023
- Z as _3DSwym_getMembersCommunity,
2024
- He as _3DSwym_getSWYMIdea,
2025
- ze as _3DSwym_get_AllSWYMIdeas,
2026
- Qe as _3DSwym_get_currentUser,
2027
- Ze as _3DSwym_get_findUser,
2070
+ qe as _3DSwym_buildDirectMessage,
2071
+ ze as _3DSwym_deleteIdea,
2072
+ te as _3DSwym_findCommunityToInstantMSG,
2073
+ Be as _3DSwym_getAllCommunities,
2074
+ Ve as _3DSwym_getAllNews,
2075
+ We as _3DSwym_getFamiliarPeople,
2076
+ Ye as _3DSwym_getIdeaStatusMaturity,
2077
+ ee as _3DSwym_getMembersCommunity,
2078
+ Qe as _3DSwym_getSWYMIdea,
2079
+ Ze as _3DSwym_get_AllSWYMIdeas,
2080
+ et as _3DSwym_get_currentUser,
2081
+ tt as _3DSwym_get_findUser,
2028
2082
  w as _3DSwym_get_version,
2029
- Ye as _3DSwym_postIdea,
2083
+ He as _3DSwym_postIdea,
2030
2084
  $ as _3DSwym_sendMessageData,
2031
- Se as _AppMngt_get_info_user,
2032
- he as _AppMngt_get_users,
2085
+ ye as _AppMngt_get_info_user,
2086
+ _e as _AppMngt_get_users,
2087
+ nt as _Iterop_Auth_CAS,
2033
2088
  J as _getPlateformInfos,
2034
- me as _getPlatformServices,
2035
- m as _httpCallAuthenticated,
2036
- pe as _setDraggable,
2037
- fe as _setDroppable,
2038
- ue as _setupTagger,
2039
- Je as addTagToDoc,
2040
- ge as compass_getListAdditionalApps,
2089
+ ge as _getPlatformServices,
2090
+ E as _getServiceUrl,
2091
+ he as _getServiceUrl_3DPassport,
2092
+ f as _httpCallAuthenticated,
2093
+ ue as _setDraggable,
2094
+ me as _setDroppable,
2095
+ fe as _setupTagger,
2096
+ Ge as addTagToDoc,
2097
+ Se as compass_getListAdditionalApps,
2041
2098
  L as couleurs,
2042
- _e as createUserGroups,
2043
- Y as dataMixing,
2044
- Ce as deleteUserGroups,
2045
- ce as findAdresse,
2046
- Ie as getAllContextSecurity,
2047
- G as getCSRFToken,
2048
- re as getCommunes,
2049
- ye as getComplementUG,
2050
- ve as getDataFrom3DSpace,
2051
- de as getDataFromGouvFr,
2052
- Me as getDatasByTenant,
2053
- Le as getDatasFrom3DSpace,
2054
- Re as getDownloadDocument,
2055
- Ge as getInfoDocTags,
2056
- we as getUserGroupsList,
2057
- E as getUsersGroupRules,
2058
- xe as get_3DSpace_csrf,
2059
- Te as patchUserGroups,
2060
- Oe as patchUserGroupsControl,
2061
- Pe as pushDataIn3DSpace,
2062
- be as readUserGroupControl,
2063
- Ee as removeTagToDoc,
2064
- et as sayHello,
2065
- le as updateEvent
2099
+ we as createUserGroups,
2100
+ q as dataMixing,
2101
+ Oe as deleteUserGroups,
2102
+ de as findAdresse,
2103
+ Re as getAllContextSecurity,
2104
+ K as getCSRFToken,
2105
+ ce as getCommunes,
2106
+ Ce as getComplementUG,
2107
+ Pe as getDataFrom3DSpace,
2108
+ le as getDataFromGouvFr,
2109
+ Je as getDatasByTenant,
2110
+ Ee as getDatasFrom3DSpace,
2111
+ xe as getDownloadDocument,
2112
+ Xe as getInfoDocTags,
2113
+ Te as getUserGroupsList,
2114
+ G as getUsersGroupRules,
2115
+ Le as get_3DSpace_csrf,
2116
+ be as patchUserGroups,
2117
+ Ne as patchUserGroupsControl,
2118
+ Me as pushDataIn3DSpace,
2119
+ ke as readUserGroupControl,
2120
+ Ke as removeTagToDoc,
2121
+ st as sayHello,
2122
+ pe as updateEvent
2066
2123
  };
2067
2124
  //# sourceMappingURL=wb3Api.js.map