@beam3_dev/api_module 0.0.141 → 0.0.143

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 L } from "uuid";
2
2
  import { DateTime as N } from "luxon";
3
- import { requirejs as O, widget as D } from "@widget-lab/3ddashboard-utils";
4
- function j() {
3
+ import { requirejs as O, widget as j } from "@widget-lab/3ddashboard-utils";
4
+ function D() {
5
5
  return L();
6
6
  }
7
7
  const J = {
@@ -44,10 +44,10 @@ async function ce(e, t = void 0, n = void 0) {
44
44
  Accept: "application/json"
45
45
  }
46
46
  }
47
- ).then((i) => i.json()).then((i) => {
48
- t && t(i);
49
- }).catch((i) => {
50
- n && n(i), console.error("Erreur : " + i);
47
+ ).then((a) => a.json()).then((a) => {
48
+ t && t(a);
49
+ }).catch((a) => {
50
+ n && n(a), console.error("Erreur : " + a);
51
51
  });
52
52
  }
53
53
  async function de(e, t = void 0, n = void 0) {
@@ -65,15 +65,15 @@ async function de(e, t = void 0, n = void 0) {
65
65
  n && n(s), console.error("Erreur : " + s);
66
66
  });
67
67
  }
68
- async function le(e, t = J) {
68
+ async function pe(e, t = J) {
69
69
  let n = N.now().year;
70
- const s = e, i = [], r = (a) => {
71
- for (let c in a)
72
- i.push({ date: c, comment: a[c] });
70
+ const s = e, a = [], r = (i) => {
71
+ for (let c in i)
72
+ a.push({ date: c, comment: i[c] });
73
73
  };
74
- for (let a = n; a <= n + 1; a++)
74
+ for (let i = n; i <= n + 1; i++)
75
75
  await fetch(
76
- "https://calendrier.api.gouv.fr/jours-feries/metropole/" + a + ".json",
76
+ "https://calendrier.api.gouv.fr/jours-feries/metropole/" + i + ".json",
77
77
  {
78
78
  method: "GET",
79
79
  headers: {
@@ -84,25 +84,25 @@ async function le(e, t = J) {
84
84
  r(c);
85
85
  }).catch((c) => console.error("Erreur : " + c));
86
86
  return (() => {
87
- const a = s.length === 0 ? {
87
+ const i = s.length === 0 ? {
88
88
  events: []
89
89
  } : s;
90
- for (let c of i)
91
- a.events.findIndex(
92
- (l) => l.start === N.fromISO(c.date).toISODate() && l.name === "Férié : " + c.comment
93
- ) === -1 && a.events.push({
90
+ for (let c of a)
91
+ i.events.findIndex(
92
+ (p) => p.start === N.fromISO(c.date).toISODate() && p.name === "Férié : " + c.comment
93
+ ) === -1 && i.events.push({
94
94
  name: "Férié : " + c.comment,
95
95
  start: N.fromISO(c.date).toISODate(),
96
96
  end: N.fromISO(c.date).toISODate(),
97
97
  color: t.b3BusinnessDays,
98
98
  timed: !1
99
99
  });
100
- return a;
100
+ return i;
101
101
  })();
102
102
  }
103
- async function pe(e, t, n = !0) {
104
- const s = e.events.findIndex((i) => i.uuid === t.uuid);
105
- return s === -1 ? e.events.push(t) : n ? e.events[s] = t : e.events.splice(s, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
103
+ async function le(e, t, n = !0) {
104
+ const s = e.events.findIndex((a) => a.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((a, r) => a.start - r.start), e;
106
106
  }
107
107
  function f(e, t) {
108
108
  O(["DS/WAFData/WAFData"], (n) => {
@@ -121,7 +121,7 @@ function fe(e, t = void 0) {
121
121
  O(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
122
122
  let s;
123
123
  s === void 0 && (s = n.createProxy({
124
- widgetId: D.id,
124
+ widgetId: j.id,
125
125
  filteringMode: "WithFilteringServices"
126
126
  }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
127
127
  });
@@ -137,7 +137,7 @@ async function ge(e, t = void 0, n = void 0) {
137
137
  await O(
138
138
  ["DS/i3DXCompassServices/i3DXCompassServices"],
139
139
  (s) => {
140
- (!e || e === "") && (e = D.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
140
+ (!e || e === "") && (e = j.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
141
141
  s.getPlatformServices({
142
142
  platformId: e,
143
143
  onComplete: t,
@@ -150,33 +150,33 @@ async function ge(e, t = void 0, n = void 0) {
150
150
  function E() {
151
151
  let e = {};
152
152
  return O(["DS/PlatformAPI/PlatformAPI"], (t) => {
153
- const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
153
+ const n = t.getTenant(), s = t.getUser(), a = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
154
154
  "com.3ds.wp.passport.cors"
155
155
  );
156
156
  e = {
157
157
  tenant: n,
158
158
  user: s,
159
- appsConfiguration: i,
159
+ appsConfiguration: a,
160
160
  appConf: r
161
161
  };
162
162
  }), console.log("%cRETOUR API :", "color:blue", e), e;
163
163
  }
164
- function A(e, t = void 0, n = void 0) {
164
+ function v(e, t = void 0, n = void 0) {
165
165
  if (e.tenant) {
166
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
167
  f(s, {
168
- onComplete(i) {
169
- const r = typeof i == "string" ? JSON.parse(i) : i;
168
+ onComplete(a) {
169
+ const r = typeof a == "string" ? JSON.parse(a) : a;
170
170
  if (r && "platforms" in r) {
171
171
  const o = r.platforms.find(
172
- (a) => a.id === e.tenant.toUpperCase()
172
+ (i) => i.id === e.tenant.toUpperCase()
173
173
  );
174
174
  t && o ? t(o) : n && n("_getServiceUrl return listServiceUrl = undefined");
175
175
  } else
176
176
  n && n("_getServiceUrl return oResponse = undefined");
177
177
  },
178
- onFailure(i) {
179
- n && n(i);
178
+ onFailure(a) {
179
+ n && n(a);
180
180
  }
181
181
  });
182
182
  }
@@ -185,15 +185,15 @@ function he(e, t = void 0, n = void 0) {
185
185
  if (e.tenant) {
186
186
  const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
187
187
  f(s, {
188
- onComplete(i) {
189
- const r = JSON.parse(i);
188
+ onComplete(a) {
189
+ const r = JSON.parse(a);
190
190
  if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
191
191
  const o = `${r[0].services[0].url}`;
192
192
  t && t(o);
193
193
  }
194
194
  },
195
- onFailure(i) {
196
- n && n(i);
195
+ onFailure(a) {
196
+ n && n(a);
197
197
  }
198
198
  });
199
199
  }
@@ -204,58 +204,58 @@ function Se(e, t, n) {
204
204
  uri: "/resources/AppsMngt/api/custom/applications",
205
205
  option: `?filter=${e.tenant}`
206
206
  // facultatif
207
- }, i = `${s.base}${s.uri}${s.option}`;
208
- f(i, {
207
+ }, a = `${s.base}${s.uri}${s.option}`;
208
+ f(a, {
209
209
  method: "GET",
210
210
  headers: {
211
211
  "Content-Type": "application/json",
212
212
  Accept: "application/json"
213
213
  },
214
- onComplete(r, o, a) {
215
- const c = JSON.parse(r), d = c.data.map((l) => {
216
- const p = l.attributes.name, u = l.id;
217
- return { name: p, id: u };
214
+ onComplete(r, o, i) {
215
+ const c = JSON.parse(r), d = c.data.map((p) => {
216
+ const l = p.attributes.name, u = p.id;
217
+ return { name: l, id: u };
218
218
  });
219
219
  t && t(d, c);
220
220
  },
221
221
  onFailure(r, o) {
222
- const a = r;
223
- a.msg = o.errormsg, a.errCode = o.errorcode, n && n(a);
222
+ const i = r;
223
+ i.msg = o.errormsg, i.errCode = o.errorcode, n && n(i);
224
224
  }
225
225
  });
226
226
  }
227
227
  function _e(e, t = void 0, n = void 0) {
228
228
  let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
229
229
  f(s, {
230
- onComplete(i, r, o) {
231
- const a = JSON.parse(i);
232
- console.log("_AppMngt_get_users => ", a), t && t(a);
230
+ onComplete(a, r, o) {
231
+ const i = JSON.parse(a);
232
+ console.log("_AppMngt_get_users => ", i), t && t(i);
233
233
  },
234
- onFailure(i, r) {
235
- const o = i;
234
+ onFailure(a, r) {
235
+ const o = a;
236
236
  o.msg = r.errormsg, o.errCode = r.errorcode, n && n(o);
237
237
  }
238
238
  });
239
239
  }
240
240
  function ye(e, t, n = void 0, s = void 0) {
241
- let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
242
- f(i, {
243
- onComplete(r, o, a) {
241
+ let a = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
242
+ f(a, {
243
+ onComplete(r, o, i) {
244
244
  const c = JSON.parse(r);
245
245
  n && n(c);
246
246
  },
247
247
  onFailure(r, o) {
248
- const a = r;
249
- a.msg = o.errormsg, a.errCode = o.errorcode, s && s(a);
248
+ const i = r;
249
+ i.msg = o.errormsg, i.errCode = o.errorcode, s && s(i);
250
250
  }
251
251
  });
252
252
  }
253
- const F = {
253
+ const A = {
254
254
  "Content-Type": "application/json",
255
255
  Accept: "application/json,text/javascript,*/*"
256
256
  };
257
257
  function we(e, t, n = void 0, s = void 0) {
258
- const { space: i, currentUser: r } = e, a = `${i}${{
258
+ const { space: a, currentUser: r } = e, i = `${a}${{
259
259
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
260
260
  }.URIUGr}`, c = {
261
261
  groups: [
@@ -269,22 +269,22 @@ function we(e, t, n = void 0, s = void 0) {
269
269
  }
270
270
  ]
271
271
  };
272
- f(a, {
272
+ f(i, {
273
273
  method: "POST",
274
- headers: F,
274
+ headers: A,
275
275
  data: JSON.stringify(c),
276
276
  onComplete(d) {
277
277
  n && n(JSON.parse(d));
278
278
  },
279
- onFailure(d, l) {
279
+ onFailure(d, p) {
280
280
  console.log(d);
281
- const p = d;
282
- p.msg = l.errormsg, p.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
281
+ const l = d;
282
+ l.msg = p.errormsg, l.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
283
283
  }
284
284
  });
285
285
  }
286
286
  function Ce(e, t, n = void 0, s = void 0) {
287
- const { space: i, tenant: r } = e, o = i, a = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${o}${a}${c}`;
287
+ const { space: a, tenant: r } = e, o = a, i = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${o}${i}${c}`;
288
288
  f(d, {
289
289
  opts: {
290
290
  method: "GET",
@@ -303,33 +303,33 @@ function Ce(e, t, n = void 0, s = void 0) {
303
303
  });
304
304
  }
305
305
  function G(e, t = void 0, n = void 0) {
306
- const { space: s, tenant: i } = e, r = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", a = `?tenant=dstenant:${i}`, c = {
306
+ const { space: s, tenant: a } = e, r = s, o = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", i = `?tenant=dstenant:${a}`, c = {
307
307
  method: "GET",
308
308
  Accept: "application/json,*/*,test/javascript"
309
- }, d = `${r}${o}${a}`;
309
+ }, d = `${r}${o}${i}`;
310
310
  f(d, {
311
311
  OPTsH: c,
312
- onComplete(l) {
313
- t && t(JSON.parse(l));
312
+ onComplete(p) {
313
+ t && t(JSON.parse(p));
314
314
  },
315
- onFailure(l, p) {
316
- const u = l;
317
- u.msg = p.errormsg, u.errCode = p.errorcode, n && n(u);
315
+ onFailure(p, l) {
316
+ const u = p;
317
+ u.msg = l.errormsg, u.errCode = l.errorcode, n && n(u);
318
318
  }
319
319
  });
320
320
  }
321
321
  function Te(e, t = void 0, n = void 0) {
322
- const { space: s, currentUser: i } = e, a = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
322
+ const { space: s, currentUser: a } = e, i = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
323
323
  "Content-Type": "application/json",
324
324
  Accept: "application/json,text/javascript,*/*"
325
325
  } };
326
326
  try {
327
- f(a, {
327
+ f(i, {
328
328
  opts: d,
329
- onComplete(l) {
330
- const p = JSON.parse(l), u = {}, m = p.groups.filter((g) => g.uri.startsWith("uuid:"));
331
- if (i && Object.keys(i).length > 0) {
332
- const g = m.filter((_) => _.owner === i.email), h = m.filter((_) => _.members.includes(i.email)), S = g.concat(h);
329
+ onComplete(p) {
330
+ const l = JSON.parse(p), u = {}, m = l.groups.filter((g) => g.uri.startsWith("uuid:"));
331
+ if (a && Object.keys(a).length > 0) {
332
+ const g = m.filter((_) => _.owner === a.email), h = m.filter((_) => _.members.includes(a.email)), S = g.concat(h);
333
333
  u.iam = S, u.UG = m, u.iamMember = h, G(
334
334
  e,
335
335
  (_) => {
@@ -341,22 +341,22 @@ function Te(e, t = void 0, n = void 0) {
341
341
  );
342
342
  }
343
343
  },
344
- onFailure(l) {
345
- n && n(l);
344
+ onFailure(p) {
345
+ n && n(p);
346
346
  }
347
347
  });
348
- } catch (l) {
349
- console.log(l);
348
+ } catch (p) {
349
+ console.log(p);
350
350
  }
351
351
  }
352
352
  function Oe(e, t) {
353
- const { space: n } = e, i = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
354
- f(i, {
353
+ const { space: n } = e, a = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
354
+ f(a, {
355
355
  method: "DELETE"
356
356
  });
357
357
  }
358
- function be(e, t, n, s = void 0, i = void 0) {
359
- const { space: r, tenant: o } = e, a = {
358
+ function be(e, t, n, s = void 0, a = void 0) {
359
+ const { space: r, tenant: o } = e, i = {
360
360
  URITI: "/3drdfpersist/resources/v1/template-instances",
361
361
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
362
362
  nextURICh: "/characteristics",
@@ -364,37 +364,37 @@ function be(e, t, n, s = void 0, i = void 0) {
364
364
  nexURImem: "/members",
365
365
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
366
366
  OPTsTenant: `tenant=dstenant:${o}`
367
- }, c = n, d = `${r}${a.URIUGr}/${t}`, l = JSON.stringify(c);
367
+ }, c = n, d = `${r}${i.URIUGr}/${t}`, p = JSON.stringify(c);
368
368
  f(d, {
369
- headers: F,
369
+ headers: A,
370
370
  method: "PATCH",
371
- data: l,
371
+ data: p,
372
372
  type: "json",
373
- onComplete(p) {
374
- s && s(p);
373
+ onComplete(l) {
374
+ s && s(l);
375
375
  },
376
- onFailure(p) {
377
- i && i(p);
376
+ onFailure(l) {
377
+ a && a(l);
378
378
  }
379
379
  });
380
380
  }
381
- function Ne(e, t, n, s = void 0, i = void 0) {
382
- const { space: r } = e, a = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
383
- f(a, {
381
+ function Ne(e, t, n, s = void 0, a = void 0) {
382
+ const { space: r } = e, i = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
383
+ f(i, {
384
384
  method: "PATCH",
385
- headers: F,
385
+ headers: A,
386
386
  data: JSON.stringify(n),
387
387
  type: "json",
388
388
  onComplete(d) {
389
389
  s && s(d);
390
390
  },
391
391
  onFailure(d) {
392
- i && i(d);
392
+ a && a(d);
393
393
  }
394
394
  });
395
395
  }
396
396
  function ve(e, t, n = void 0, s = void 0) {
397
- const { space: i } = e, o = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
397
+ const { space: a } = e, o = `${a}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
398
398
  f(o, {
399
399
  opts: {
400
400
  method: "GET",
@@ -415,24 +415,24 @@ async function K(e, t, n) {
415
415
  if (e.space) {
416
416
  const s = `${e.space}/resources/v1/application/CSRF`;
417
417
  f(s, {
418
- onComplete(i) {
419
- i = JSON.parse(i), t && t(i.csrf);
418
+ onComplete(a) {
419
+ a = JSON.parse(a), t && t(a.csrf);
420
420
  },
421
- onFailure(i, r, o) {
422
- n && n({ error: i, headers: r, xhr: o });
421
+ onFailure(a, r, o) {
422
+ n && n({ error: a, headers: r, xhr: o });
423
423
  }
424
424
  });
425
425
  }
426
426
  }
427
427
  async function V(e, t = void 0, n = void 0, s = void 0) {
428
- const i = e.space;
428
+ const a = e.space;
429
429
  if (t === void 0) {
430
430
  console.log("Le paramètre docid est obligatoire");
431
431
  return;
432
432
  }
433
- const r = i + `/resources/v1/modeler/documents/${t}`;
433
+ const r = a + `/resources/v1/modeler/documents/${t}`;
434
434
  f(r, {
435
- onComplete(o, a, c) {
435
+ onComplete(o, i, c) {
436
436
  const d = JSON.parse(o);
437
437
  n && n(d);
438
438
  },
@@ -441,16 +441,16 @@ async function V(e, t = void 0, n = void 0, s = void 0) {
441
441
  }
442
442
  });
443
443
  }
444
- function v(e, t = void 0, n = void 0) {
444
+ function $(e, t = void 0, n = void 0) {
445
445
  if (e.objID && e.objID !== "") {
446
446
  let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
447
447
  f(s, {
448
- onComplete(i, r, o) {
449
- const a = JSON.parse(i);
450
- e.token = a?.csrf?.value, e.datas = a?.data[0], t && t(e);
448
+ onComplete(a, r, o) {
449
+ const i = JSON.parse(a);
450
+ e.token = i?.csrf?.value, e.datas = i?.data[0], t && t(e);
451
451
  },
452
- onFailure(i) {
453
- n && n(i);
452
+ onFailure(a) {
453
+ n && n(a);
454
454
  }
455
455
  });
456
456
  } else
@@ -468,13 +468,13 @@ function T(e, t = void 0, n = void 0) {
468
468
  if (e.space) {
469
469
  const s = e.space + "/resources/v1/application/CSRF";
470
470
  f(s, {
471
- onComplete(i, r, o) {
472
- const a = JSON.parse(i);
473
- t && t(a.csrf.value);
471
+ onComplete(a, r, o) {
472
+ const i = JSON.parse(a);
473
+ t && t(i.csrf.value);
474
474
  },
475
- onFailure(i, r, o) {
475
+ onFailure(a, r, o) {
476
476
  n && n({
477
- response: i,
477
+ response: a,
478
478
  headers: r,
479
479
  xhr: o
480
480
  });
@@ -483,31 +483,31 @@ function T(e, t = void 0, n = void 0) {
483
483
  } else
484
484
  n && n("ERROR : url du 3DSpace non défini.");
485
485
  }
486
- function $(e, t = void 0, n = void 0) {
486
+ function k(e, t = void 0, n = void 0) {
487
487
  let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
488
- v(
488
+ $(
489
489
  e,
490
- (i) => {
490
+ (a) => {
491
491
  f(s, {
492
492
  method: "PUT",
493
493
  headers: {
494
494
  ENO_CSRF_TOKEN: e.token
495
495
  },
496
496
  onComplete(r) {
497
- const a = JSON.parse(r).data[0].dataelements.ticketURL;
498
- t && t(a);
497
+ const i = JSON.parse(r).data[0].dataelements.ticketURL;
498
+ t && t(i);
499
499
  },
500
500
  onFailure(r, o) {
501
501
  console.warn("☠️ error => ", r, o), n && n(r, o);
502
502
  }
503
503
  });
504
504
  },
505
- (i) => {
506
- console.warn("_3DSpace_get_ticket / error => ", i), n && n(i);
505
+ (a) => {
506
+ console.warn("_3DSpace_get_ticket / error => ", a), n && n(a);
507
507
  }
508
508
  );
509
509
  }
510
- function ke(e, t, n, s = void 0, i = void 0) {
510
+ function $e(e, t, n, s = void 0, a = void 0) {
511
511
  const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
512
512
  n || (n = e.token), f(r, {
513
513
  method: "PUT",
@@ -515,48 +515,48 @@ function ke(e, t, n, s = void 0, i = void 0) {
515
515
  ENO_CSRF_TOKEN: n
516
516
  },
517
517
  onComplete(o) {
518
- let a = JSON.parse(o);
519
- if (console.log("☠️ info => ", a), a.success === !0)
518
+ let i = JSON.parse(o);
519
+ if (console.log("☠️ info => ", i), i.success === !0)
520
520
  try {
521
- const c = a.data[0].dataelements.ticketURL;
521
+ const c = i.data[0].dataelements.ticketURL;
522
522
  s && s(c);
523
523
  } catch (c) {
524
- i && i(c);
524
+ a && a(c);
525
525
  }
526
526
  },
527
527
  onFailure(o) {
528
- i && i(o);
528
+ a && a(o);
529
529
  }
530
530
  });
531
531
  }
532
- function X(e, t, n, s, i, r = void 0, o = void 0) {
533
- v(
532
+ function X(e, t, n, s, a, r = void 0, o = void 0) {
533
+ $(
534
534
  e,
535
535
  t,
536
- (a) => {
536
+ (i) => {
537
537
  W(
538
538
  e,
539
539
  t,
540
540
  n,
541
541
  s,
542
- i,
543
- a.csrf.value,
542
+ a,
543
+ i.csrf.value,
544
544
  r,
545
545
  o
546
546
  );
547
547
  }
548
548
  );
549
549
  }
550
- function W(e, t, n, s, i, r, o = void 0, a = void 0) {
550
+ function W(e, t, n, s, a, r, o = void 0, i = void 0) {
551
551
  const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
552
552
  f(c, {
553
553
  method: "PUT",
554
554
  headers: {
555
555
  ENO_CSRF_TOKEN: r
556
556
  },
557
- onComplete(d, l, p) {
557
+ onComplete(d, p, l) {
558
558
  const u = JSON.parse(d).data[0].dataelements, m = new FormData();
559
- m.append("__fcs__jobTicket", u.ticket), m.append("file_0", s, i);
559
+ m.append("__fcs__jobTicket", u.ticket), m.append("file_0", s, a);
560
560
  const g = {};
561
561
  g.method = "POST", g.data = m, g.onComplete = function(h) {
562
562
  let S = "temp_" + Date.now(), _ = {
@@ -571,7 +571,7 @@ function W(e, t, n, s, i, r, o = void 0, a = void 0) {
571
571
  files: [{
572
572
  id: n,
573
573
  dataelements: {
574
- title: i,
574
+ title: a,
575
575
  receipt: h
576
576
  },
577
577
  updateAction: "REVISE"
@@ -585,7 +585,7 @@ function W(e, t, n, s, i, r, o = void 0, a = void 0) {
585
585
  o && o(y);
586
586
  },
587
587
  onFailure(y) {
588
- a && a(y);
588
+ i && i(y);
589
589
  }
590
590
  };
591
591
  f(
@@ -593,15 +593,15 @@ function W(e, t, n, s, i, r, o = void 0, a = void 0) {
593
593
  _
594
594
  );
595
595
  }, g.onFailure = function(h) {
596
- a && a(h);
596
+ i && i(h);
597
597
  }, g.timeout = 0, f(u.ticketURL, g);
598
598
  }
599
599
  });
600
600
  }
601
- async function Ae(e, t, n, s, i = void 0, r = void 0) {
602
- const o = e.space, a = e.token, c = e.ctx, d = new FormData(), l = new Blob([JSON.stringify(t)], {
601
+ async function Ie(e, t, n, s, a = void 0, r = void 0) {
602
+ const o = e.space, i = e.token, c = e.ctx, d = new FormData(), p = new Blob([JSON.stringify(t)], {
603
603
  type: "text/plain"
604
- }), p = {
604
+ }), l = {
605
605
  url_Ticket: `${o}/resources/v1/modeler/documents/files/CheckinTicket`,
606
606
  url_Post: `${o}/resources/v1/modeler/documents/?SecurityContext=ctx::${c}`
607
607
  };
@@ -609,23 +609,23 @@ async function Ae(e, t, n, s, i = void 0, r = void 0) {
609
609
  console.log("le store._3DSpace est vide");
610
610
  return;
611
611
  }
612
- f(p.url_Ticket, {
612
+ f(l.url_Ticket, {
613
613
  method: "PUT",
614
614
  headers: {
615
- ENO_CSRF_TOKEN: a.value
615
+ ENO_CSRF_TOKEN: i.value
616
616
  },
617
617
  onComplete(u, m, g) {
618
618
  const h = JSON.parse(u).data[0].dataelements;
619
- d.append("__fcs__jobTicket", h.ticket), d.append("filename", l, n);
619
+ d.append("__fcs__jobTicket", h.ticket), d.append("filename", p, n);
620
620
  const S = {
621
621
  method: "POST",
622
622
  data: d,
623
623
  onComplete(C) {
624
- if (c !== "" && a !== "") {
625
- const k = {
624
+ if (c !== "" && i !== "") {
625
+ const I = {
626
626
  method: "POST",
627
627
  headers: {
628
- ENO_CSRF_TOKEN: a,
628
+ ENO_CSRF_TOKEN: i,
629
629
  Accept: "application/json",
630
630
  "Content-Type": "application/json"
631
631
  },
@@ -645,7 +645,7 @@ async function Ae(e, t, n, s, i = void 0, r = void 0) {
645
645
  }
646
646
  }]
647
647
  },
648
- tempId: j()
648
+ tempId: D()
649
649
  }]
650
650
  }),
651
651
  type: "json",
@@ -653,34 +653,34 @@ async function Ae(e, t, n, s, i = void 0, r = void 0) {
653
653
  onComplete: _,
654
654
  onFailure: y
655
655
  };
656
- c !== "" && f(p.url_Post, k);
656
+ c !== "" && f(l.url_Post, I);
657
657
  } else
658
658
  console.warn("le store est vide");
659
659
  },
660
660
  onFailure: y
661
661
  };
662
662
  function _(C) {
663
- console.log("Success -- response ", C.data[0]), i && i(C);
663
+ console.log("Success -- response ", C.data[0]), a && a(C);
664
664
  }
665
- function y(C, k) {
665
+ function y(C, I) {
666
666
  console.log("Erreur -- response ", C, `
667
- headers `, k), r && r(C);
667
+ headers `, I), r && r(C);
668
668
  }
669
669
  f(h.ticketURL, S);
670
670
  }
671
671
  });
672
672
  }
673
- function b(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1) {
674
- const a = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
675
- f(a, {
673
+ function b(e, t = void 0, n = void 0, s = void 0, a = void 0, r = void 0, o = !1) {
674
+ const i = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
675
+ f(i, {
676
676
  method: "GET",
677
677
  onComplete(c) {
678
678
  const d = JSON.parse(c);
679
- let l = "", p, u, m;
679
+ let p = "", l, u, m;
680
680
  if (t) {
681
681
  let g = d.collabspaces.find((h) => h.title === t);
682
682
  if (g) {
683
- p = t;
683
+ l = t;
684
684
  let h = g.couples;
685
685
  h = h.filter(
686
686
  (S, _, y) => _ === y.findIndex(
@@ -709,7 +709,7 @@ function b(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1
709
709
  }));
710
710
  }
711
711
  }
712
- p && u && m ? (l = m + "." + u + "." + p, i(l)) : d.preferredcredentials && o ? (l = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, i(l)) : r && (l = m + "." + u + "." + p, r(l));
712
+ l && u && m ? (p = m + "." + u + "." + l, a(p)) : d.preferredcredentials && o ? (p = d.preferredcredentials.role.name + "." + d.preferredcredentials.organization.title + "." + d.preferredcredentials.collabspace.title, a(p)) : r && (p = m + "." + u + "." + l, r(p));
713
713
  },
714
714
  onFailure(c, d) {
715
715
  console.log("Erreur de récupération du contexte de sécurité. => ", {
@@ -719,7 +719,7 @@ function b(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, o = !1
719
719
  }
720
720
  });
721
721
  }
722
- async function R(e, t = void 0, n = void 0) {
722
+ async function P(e, t = void 0, n = void 0) {
723
723
  return (!e.objID || e.objID === "") && console.warn(
724
724
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
725
725
  ), (e.space === "" || !e.space) && console.warn(
@@ -734,8 +734,8 @@ async function R(e, t = void 0, n = void 0) {
734
734
  }
735
735
  ), console.warn(
736
736
  "_3DSpace_download_doc() / Le paramètre token est obligatoire"
737
- )), new Promise((s, i) => {
738
- $(
737
+ )), new Promise((s, a) => {
738
+ k(
739
739
  e,
740
740
  (r) => {
741
741
  f(r, {
@@ -743,22 +743,22 @@ async function R(e, t = void 0, n = void 0) {
743
743
  "Content-Type": "application/json",
744
744
  Accept: "application/json"
745
745
  },
746
- onComplete(a) {
746
+ onComplete(i) {
747
747
  let c;
748
748
  try {
749
- c = JSON.parse(a);
749
+ c = JSON.parse(i);
750
750
  } catch {
751
- c = a;
751
+ c = i;
752
752
  }
753
753
  t && typeof t == "function" && t(c), s(c);
754
754
  },
755
- onFailure(a, c, d) {
756
- n && (console.log("error http", a), n({
757
- msg: JSON.parse(a),
755
+ onFailure(i, c, d) {
756
+ n && (console.log("error http", i), n({
757
+ msg: JSON.parse(i),
758
758
  headers: c,
759
759
  xhr: d
760
- }), i({
761
- msg: JSON.parse(a),
760
+ }), a({
761
+ msg: JSON.parse(i),
762
762
  headers: c,
763
763
  xhr: d
764
764
  }));
@@ -766,24 +766,24 @@ async function R(e, t = void 0, n = void 0) {
766
766
  });
767
767
  },
768
768
  (r) => {
769
- n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
769
+ n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), a(r);
770
770
  }
771
771
  );
772
772
  });
773
773
  }
774
774
  async function B(e, t, n = void 0, s = void 0) {
775
- let i = [];
775
+ let a = [];
776
776
  if (typeof t < "u" && Array.isArray(t) && t?.length > 0) {
777
- for (let a = 0; a < t.length; a += 80) {
778
- const c = t.slice(a, a + 80);
779
- i.push(c);
777
+ for (let i = 0; i < t.length; i += 80) {
778
+ const c = t.slice(i, i + 80);
779
+ a.push(c);
780
780
  }
781
- const o = (a) => {
781
+ const o = (i) => {
782
782
  Y(
783
783
  e,
784
- i[a],
784
+ a[i],
785
785
  () => {
786
- a++, a < i.length && o(a);
786
+ i++, i < a.length && o(i);
787
787
  },
788
788
  (c) => {
789
789
  n && n(c);
@@ -794,7 +794,7 @@ async function B(e, t, n = void 0, s = void 0) {
794
794
  } else
795
795
  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.");
796
796
  }
797
- function Y(e, t, n = void 0, s = void 0, i = void 0) {
797
+ function Y(e, t, n = void 0, s = void 0, a = void 0) {
798
798
  const r = [];
799
799
  t.forEach((c) => {
800
800
  r.push({
@@ -808,21 +808,21 @@ function Y(e, t, n = void 0, s = void 0, i = void 0) {
808
808
  },
809
809
  data: r
810
810
  });
811
- const a = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
812
- f(a, {
811
+ const i = `${e.space}/resources/v1/modeler/documents/DownloadTicket?tenant=${e.tenant}&e6w-lang=fr&e6w-timezone=-120`;
812
+ f(i, {
813
813
  method: "PUT",
814
814
  data: o,
815
815
  type: "json",
816
816
  onComplete(c) {
817
817
  const d = c.data;
818
- c.success === !0 && (n && n(), d.forEach((l) => {
818
+ c.success === !0 && (n && n(), d.forEach((p) => {
819
819
  try {
820
- const p = l.dataelements.fileName, u = l.dataelements.ticketURL;
820
+ const l = p.dataelements.fileName, u = p.dataelements.ticketURL;
821
821
  f(u, {
822
822
  onComplete: (m) => {
823
823
  s && s({
824
- objectId: l.id,
825
- fileName: p,
824
+ objectId: p.id,
825
+ fileName: l,
826
826
  data: JSON.parse(m)
827
827
  });
828
828
  },
@@ -830,18 +830,18 @@ function Y(e, t, n = void 0, s = void 0, i = void 0) {
830
830
  console.log("error http", m);
831
831
  }
832
832
  });
833
- } catch (p) {
834
- console.log(p), i && i(p);
833
+ } catch (l) {
834
+ console.log(l), a && a(l);
835
835
  }
836
836
  }));
837
837
  },
838
838
  onFailure(c) {
839
- console.log(c), i && i(c);
839
+ console.log(c), a && a(c);
840
840
  }
841
841
  });
842
842
  }
843
- function Fe(e, t, n = void 0, s = void 0) {
844
- return new Promise((i) => {
843
+ function Ae(e, t, n = void 0, s = void 0) {
844
+ return new Promise((a) => {
845
845
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
846
846
  const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
847
847
  b(
@@ -849,9 +849,9 @@ function Fe(e, t, n = void 0, s = void 0) {
849
849
  "ESPACE COMMUN",
850
850
  ["VPLMProjectLeader", "VPLMCreator"],
851
851
  void 0,
852
- (a) => e.ctx = a,
853
- (a) => {
854
- console.log("onError =>", a);
852
+ (i) => e.ctx = i,
853
+ (i) => {
854
+ console.log("onError =>", i);
855
855
  }
856
856
  );
857
857
  let o = {
@@ -868,18 +868,18 @@ function Fe(e, t, n = void 0, s = void 0) {
868
868
  }]
869
869
  }),
870
870
  type: "json",
871
- onComplete(a) {
872
- n && n(a);
871
+ onComplete(i) {
872
+ n && n(i);
873
873
  },
874
- onFailure(a) {
875
- s && s(a);
874
+ onFailure(i) {
875
+ s && s(i);
876
876
  }
877
877
  };
878
878
  f(r, o);
879
879
  }
880
880
  });
881
881
  }
882
- function $e(e, t, n, s = void 0, i = void 0) {
882
+ function ke(e, t, n, s = void 0, a = void 0) {
883
883
  return new Promise((r) => {
884
884
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
885
885
  const o = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
@@ -893,7 +893,7 @@ function $e(e, t, n, s = void 0, i = void 0) {
893
893
  console.log("onError =>", c);
894
894
  }
895
895
  );
896
- let a = {
896
+ let i = {
897
897
  method: "POST",
898
898
  headers: {
899
899
  SecurityContext: "ctx::" + e.ctx,
@@ -912,15 +912,15 @@ function $e(e, t, n, s = void 0, i = void 0) {
912
912
  s && s(c);
913
913
  },
914
914
  onFailure(c) {
915
- i && i(c);
915
+ a && a(c);
916
916
  }
917
917
  };
918
- f(o, a);
918
+ f(o, i);
919
919
  }
920
920
  });
921
921
  }
922
- function Ie(e, t, n = void 0, s = void 0) {
923
- return new Promise((i) => {
922
+ function Fe(e, t, n = void 0, s = void 0) {
923
+ return new Promise((a) => {
924
924
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
925
925
  const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
926
926
  b(
@@ -928,9 +928,9 @@ function Ie(e, t, n = void 0, s = void 0) {
928
928
  "ESPACE COMMUN",
929
929
  ["VPLMProjectLeader", "VPLMCreator"],
930
930
  void 0,
931
- (a) => e.ctx = a,
932
- (a) => {
933
- console.log("onError =>", a);
931
+ (i) => e.ctx = i,
932
+ (i) => {
933
+ console.log("onError =>", i);
934
934
  }
935
935
  );
936
936
  let o = {
@@ -947,11 +947,11 @@ function Ie(e, t, n = void 0, s = void 0) {
947
947
  }]
948
948
  }),
949
949
  type: "json",
950
- onComplete(a) {
951
- n && n(a);
950
+ onComplete(i) {
951
+ n && n(i);
952
952
  },
953
- onFailure(a) {
954
- s && s(a);
953
+ onFailure(i) {
954
+ s && s(i);
955
955
  }
956
956
  };
957
957
  f(r, o);
@@ -959,7 +959,7 @@ function Ie(e, t, n = void 0, s = void 0) {
959
959
  });
960
960
  }
961
961
  function Ue(e, t, n = void 0, s = void 0) {
962
- return new Promise((i) => {
962
+ return new Promise((a) => {
963
963
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
964
964
  const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
965
965
  b(
@@ -967,9 +967,9 @@ function Ue(e, t, n = void 0, s = void 0) {
967
967
  "ESPACE COMMUN",
968
968
  ["VPLMProjectLeader", "VPLMCreator"],
969
969
  void 0,
970
- (a) => e.ctx = a,
971
- (a) => {
972
- console.log("onError =>", a);
970
+ (i) => e.ctx = i,
971
+ (i) => {
972
+ console.log("onError =>", i);
973
973
  }
974
974
  );
975
975
  let o = {
@@ -992,18 +992,18 @@ function Ue(e, t, n = void 0, s = void 0) {
992
992
  }]
993
993
  }),
994
994
  type: "json",
995
- onComplete(a) {
996
- n && n(a);
995
+ onComplete(i) {
996
+ n && n(i);
997
997
  },
998
- onFailure(a) {
999
- s && s(a);
998
+ onFailure(i) {
999
+ s && s(i);
1000
1000
  }
1001
1001
  };
1002
1002
  f(r, o);
1003
1003
  }
1004
1004
  });
1005
1005
  }
1006
- function De(e, t, n, s = void 0, i = void 0) {
1006
+ function je(e, t, n, s = void 0, a = void 0) {
1007
1007
  return new Promise((r) => {
1008
1008
  if (e.token === "" && T(e), t !== void 0 && t !== "" && t !== null) {
1009
1009
  const o = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
@@ -1017,7 +1017,7 @@ function De(e, t, n, s = void 0, i = void 0) {
1017
1017
  console.log("onError =>", c);
1018
1018
  }
1019
1019
  );
1020
- let a = {
1020
+ let i = {
1021
1021
  method: "POST",
1022
1022
  headers: {
1023
1023
  securitycontext: "ctx::" + e.ctx,
@@ -1041,14 +1041,14 @@ function De(e, t, n, s = void 0, i = void 0) {
1041
1041
  s && s(c);
1042
1042
  },
1043
1043
  onFailure(c) {
1044
- i && i(c);
1044
+ a && a(c);
1045
1045
  }
1046
1046
  };
1047
- f(o, a);
1047
+ f(o, i);
1048
1048
  }
1049
1049
  });
1050
1050
  }
1051
- function je(e, t, n, s, i = void 0, r = void 0) {
1051
+ function De(e, t, n, s, a = void 0, r = void 0) {
1052
1052
  return console.log("credentials", e), new Promise((o) => {
1053
1053
  `${e.space}`, JSON.stringify({
1054
1054
  csrf: {
@@ -1070,33 +1070,33 @@ function je(e, t, n, s, i = void 0, r = void 0) {
1070
1070
  });
1071
1071
  }
1072
1072
  //!SECTION
1073
- function Re(e, t = void 0, n = void 0) {
1073
+ function Pe(e, t = void 0, n = void 0) {
1074
1074
  const s = {
1075
1075
  base: `${e.space}`,
1076
1076
  uri: "/resources/bps/cspaces",
1077
1077
  optTenant: `tenant=${e.tenant}`
1078
- }, i = `${s.base}${s.uri}?${s.optTenant}`;
1079
- f(i, {
1078
+ }, a = `${s.base}${s.uri}?${s.optTenant}`;
1079
+ f(a, {
1080
1080
  method: "GET",
1081
1081
  headers: {
1082
1082
  Accept: "application/json,text/javascript,*/*",
1083
1083
  "Content-Type": "application/ds-json"
1084
1084
  },
1085
1085
  onComplete(r, o) {
1086
- const a = JSON.parse(r);
1087
- t && t(a, o);
1086
+ const i = JSON.parse(r);
1087
+ t && t(i, o);
1088
1088
  },
1089
- onFailure(r, o, a) {
1090
- n && n({ response: r, headers: o, xhr: a });
1089
+ onFailure(r, o, i) {
1090
+ n && n({ response: r, headers: o, xhr: i });
1091
1091
  }
1092
1092
  });
1093
1093
  }
1094
- function Pe(e, t, n, s) {
1095
- $(
1094
+ function Re(e, t, n, s) {
1095
+ k(
1096
1096
  e.space,
1097
1097
  t,
1098
- (i) => {
1099
- f(i, {
1098
+ (a) => {
1099
+ f(a, {
1100
1100
  header: { ENO_CSRF_TOKEN: e.token },
1101
1101
  onComplete: (r) => {
1102
1102
  n && n(r);
@@ -1109,44 +1109,44 @@ function Pe(e, t, n, s) {
1109
1109
  );
1110
1110
  }
1111
1111
  async function xe(e, t, n = void 0, s = void 0) {
1112
- return new Promise((i) => {
1113
- $(e, t, (r) => {
1112
+ return new Promise((a) => {
1113
+ k(e, t, (r) => {
1114
1114
  f(r, {
1115
- onComplete: (o, a, c) => (i(JSON.parse(o)), n && n(JSON.parse(o), a, c), i),
1116
- onFailure: (o, a, c) => {
1117
- s && s(o, a, c), console.log(o, a?.errormsg);
1115
+ onComplete: (o, i, c) => (a(JSON.parse(o)), n && n(JSON.parse(o), i, c), a),
1116
+ onFailure: (o, i, c) => {
1117
+ s && s(o, i, c), console.log(o, i?.errormsg);
1118
1118
  }
1119
1119
  });
1120
1120
  });
1121
1121
  });
1122
1122
  }
1123
- function Me(e, t, n, s = void 0, i = void 0) {
1123
+ function Me(e, t, n, s = void 0, a = void 0) {
1124
1124
  const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1125
- v(
1125
+ $(
1126
1126
  e,
1127
1127
  n,
1128
1128
  (o) => {
1129
- const a = o.data[0].relateddata.files[0].id, c = o.data[0].dataelements.secondaryTitle !== "" ? o.data[0].dataelements.secondaryTitle : o.data[0].dataelements.title;
1129
+ const i = o.data[0].relateddata.files[0].id, c = o.data[0].dataelements.secondaryTitle !== "" ? o.data[0].dataelements.secondaryTitle : o.data[0].dataelements.title;
1130
1130
  X(
1131
1131
  e,
1132
1132
  n,
1133
- a,
1133
+ i,
1134
1134
  r,
1135
1135
  c,
1136
1136
  (d) => {
1137
1137
  s && s(d);
1138
1138
  },
1139
1139
  (d) => {
1140
- i && i(d);
1140
+ a && a(d);
1141
1141
  }
1142
1142
  );
1143
1143
  }
1144
1144
  );
1145
1145
  }
1146
- let P, x;
1147
- const I = [];
1146
+ let R, x;
1147
+ const F = [];
1148
1148
  async function Le(e, t = void 0, n = void 0) {
1149
- e.objID && e.objID !== "" ? v(
1149
+ e.objID && e.objID !== "" ? $(
1150
1150
  e,
1151
1151
  (s) => {
1152
1152
  t && t(s);
@@ -1165,11 +1165,11 @@ async function Le(e, t = void 0, n = void 0) {
1165
1165
  );
1166
1166
  }
1167
1167
  async function Je(e, t = void 0, n = void 0) {
1168
- console.log("getDatasByTenant (getDocuments)", e), await R(
1168
+ console.log("getDatasByTenant (getDocuments)", e), await P(
1169
1169
  e,
1170
1170
  (s) => {
1171
- const i = {};
1172
- i.obj = s, console.log("getDatasByTenant (getDocuments) _datas", i), t && t?.(i);
1171
+ const a = {};
1172
+ a.obj = s, console.log("getDatasByTenant (getDocuments) _datas", a), t && t?.(a);
1173
1173
  },
1174
1174
  (s) => {
1175
1175
  n && n?.(s);
@@ -1182,12 +1182,12 @@ function Ee(e, t = void 0, n = void 0) {
1182
1182
  console.warn("la liste est vide ou n'est pas un tableau");
1183
1183
  return;
1184
1184
  }
1185
- e.objIds.forEach((i, r) => {
1186
- R(
1185
+ e.objIds.forEach((a, r) => {
1186
+ P(
1187
1187
  e,
1188
- i.objID,
1188
+ a.objID,
1189
1189
  (o) => {
1190
- s.push({ [i.name]: o }), i.name === "dbProjets" && (P = o.affaires.map((a) => a.objectID), q(e, x)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1190
+ s.push({ [a.name]: o }), a.name === "dbProjets" && (R = o.affaires.map((i) => i.objectID), q(e, x)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1191
1191
  }
1192
1192
  );
1193
1193
  });
@@ -1195,13 +1195,13 @@ function Ee(e, t = void 0, n = void 0) {
1195
1195
  function q(e, t, n = void 0, s = void 0) {
1196
1196
  B(
1197
1197
  e,
1198
- P,
1199
- (i) => {
1198
+ R,
1199
+ (a) => {
1200
1200
  const r = [...t];
1201
- r.find((o) => o.objectID === i.objectId).data = i.data, x = r, I.push(i.data), n && n(I);
1201
+ r.find((o) => o.objectID === a.objectId).data = a.data, x = r, F.push(a.data), n && n(F);
1202
1202
  },
1203
- (i) => {
1204
- s && (s(i), console.log(i));
1203
+ (a) => {
1204
+ s && (s(a), console.log(a));
1205
1205
  }
1206
1206
  );
1207
1207
  }
@@ -1226,11 +1226,11 @@ const H = "FA35FB9B177A280065800EA0000F599C", z = [
1226
1226
  tag: "testTag"
1227
1227
  };
1228
1228
  function Ge(e, t, n = void 0, s = void 0) {
1229
- const { space: i, tenant: r } = e, { objId: o, pred: a, tag: c } = t, d = {
1229
+ const { space: a, tenant: r } = e, { objId: o, pred: i, tag: c } = t, d = {
1230
1230
  uri: "/resources/6w/tags",
1231
1231
  otpCTX: "SecurityContext=preferred",
1232
1232
  optTenant: `tenant=${r}`
1233
- }, l = `${i}${d.uri}?${d.otpCTX}&${d.optTenant}`, p = {
1233
+ }, p = `${a}${d.uri}?${d.otpCTX}&${d.optTenant}`, l = {
1234
1234
  tag: [
1235
1235
  {
1236
1236
  subject: [
@@ -1238,20 +1238,20 @@ function Ge(e, t, n = void 0, s = void 0) {
1238
1238
  uri: `pid://${o}`
1239
1239
  }
1240
1240
  ],
1241
- predicate: M[a],
1241
+ predicate: M[i],
1242
1242
  object: {
1243
1243
  literal: c
1244
1244
  }
1245
1245
  }
1246
1246
  ]
1247
1247
  };
1248
- f(l, {
1248
+ f(p, {
1249
1249
  method: "PUT",
1250
1250
  headers: {
1251
1251
  "Content-Type": "application/json",
1252
1252
  Accept: "application/json"
1253
1253
  },
1254
- data: JSON.stringify(p),
1254
+ data: JSON.stringify(l),
1255
1255
  onComplete(u) {
1256
1256
  JSON.parse(u);
1257
1257
  const m = {};
@@ -1287,13 +1287,13 @@ function Ge(e, t, n = void 0, s = void 0) {
1287
1287
  }
1288
1288
  function Z(e, t, n = void 0, s = void 0) {
1289
1289
  console.log("obj ", t);
1290
- const i = t.info.name, r = {
1290
+ const a = t.info.name, r = {
1291
1291
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
1292
1292
  uri: "/federated/search"
1293
- }, o = `${r.baseUrl}${r.uri}`, a = {
1293
+ }, o = `${r.baseUrl}${r.uri}`, i = {
1294
1294
  "Content-Type": "application/json",
1295
1295
  Accept: "application/json,text/javascript,*/*"
1296
- }, c = j(), d = {
1296
+ }, c = D(), d = {
1297
1297
  with_indexing_date: !0,
1298
1298
  with_synthesis: !0,
1299
1299
  with_nls: !1,
@@ -1325,7 +1325,7 @@ function Z(e, t, n = void 0, s = void 0) {
1325
1325
  ],
1326
1326
  with_synthesis_hierarchical: !0,
1327
1327
  select_file: ["icon", "thumbnail_2d"],
1328
- query: i,
1328
+ query: a,
1329
1329
  specific_source_parameter: {
1330
1330
  "3dspace": {
1331
1331
  additional_query: ' AND NOT (owner:"ENOVIA_CLOUD" OR owner:"Service Creator" OR owner:"Corporate" OR owner:"User Agent" OR owner:"SLMInstallerAdmin" OR owner:"Creator" OR owner:"VPLMAdminUser") AND (ds6w_58_islastrevisionperstate:true OR NOT listoffields:ds6w_58_islastrevisionperstate)'
@@ -1356,29 +1356,29 @@ function Z(e, t, n = void 0, s = void 0) {
1356
1356
  };
1357
1357
  console.log("dataPattern => ", d), f(o, {
1358
1358
  method: "POST",
1359
- headers: a,
1359
+ headers: i,
1360
1360
  data: JSON.stringify(d),
1361
- onComplete(l) {
1362
- const p = JSON.parse(l);
1363
- n(p);
1361
+ onComplete(p) {
1362
+ const l = JSON.parse(p);
1363
+ n(l);
1364
1364
  },
1365
- onFailure(l, p) {
1366
- const u = l;
1367
- u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u), console.log("Erreur de recuperation d'id du doc et des tags", l);
1365
+ onFailure(p, l) {
1366
+ const u = p;
1367
+ u.msg = l.errormsg, u.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u), console.log("Erreur de recuperation d'id du doc et des tags", p);
1368
1368
  }
1369
1369
  });
1370
1370
  }
1371
1371
  function Ke(e, t, n = void 0, s = void 0) {
1372
- const { objId: i, pred: r, tag: o } = t, a = {
1372
+ const { objId: a, pred: r, tag: o } = t, i = {
1373
1373
  uri: "/resources/6w/tags",
1374
1374
  otpCTX: "SecurityContext=preferred",
1375
1375
  optTenant: `tenant=${e.tenant}`
1376
- }, c = `${e.space}${a.uri}?${a.otpCTX}&${a.optTenant}`, d = {
1376
+ }, c = `${e.space}${i.uri}?${i.otpCTX}&${i.optTenant}`, d = {
1377
1377
  tag: [
1378
1378
  {
1379
1379
  subject: [
1380
1380
  {
1381
- uri: `pid://${i}`
1381
+ uri: `pid://${a}`
1382
1382
  }
1383
1383
  ],
1384
1384
  predicate: M[r],
@@ -1395,17 +1395,17 @@ function Ke(e, t, n = void 0, s = void 0) {
1395
1395
  "Content-Type": "application/json",
1396
1396
  Accept: "application/json,text/javascript,*/*"
1397
1397
  },
1398
- onComplete(l) {
1399
- n && n(l);
1398
+ onComplete(p) {
1399
+ n && n(p);
1400
1400
  },
1401
- onFailure(l, p) {
1402
- const u = l;
1403
- u.msg = p.errormsg, u.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
1401
+ onFailure(p, l) {
1402
+ const u = p;
1403
+ u.msg = l.errormsg, u.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
1404
1404
  }
1405
1405
  });
1406
1406
  }
1407
1407
  function Ve(e, t = "", n = void 0, s = void 0) {
1408
- const { space: i } = e;
1408
+ const { space: a } = e;
1409
1409
  if (t === "")
1410
1410
  return;
1411
1411
  const r = {
@@ -1413,35 +1413,35 @@ function Ve(e, t = "", n = void 0, s = void 0) {
1413
1413
  }, o = {
1414
1414
  "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
1415
1415
  Accept: "application/json,text/javascript,*/*"
1416
- }, a = `${i}${r.uri}`, c = `$include=none,lockerInfo,ownerInfo,originatorInfo,files,ownerInfo,originatorInfo&$fields=none,title,name,typeNLS,collabSpaceTitle,revision,isLatestRevision,files,lockStatus,lockerInfo.name,lockerInfo.firstname,lockerInfo.lastname,owner,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,stateNLS,modified,policy,state,organizationTitle,originator,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname,hasModifyAccess,fileExtension,files.name,files.title,files.revision,files.locker,ownerInfo,ownerInfo.name,ownerInfo.firstname,ownerInfo.lastname,originatorInfo,originatorInfo.name,originatorInfo.firstname,originatorInfo.lastname&$ids=${t}`;
1417
- f(a, {
1416
+ }, i = `${a}${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}`;
1417
+ f(i, {
1418
1418
  method: "POST",
1419
1419
  headers: o,
1420
1420
  data: c,
1421
1421
  onComplete(d) {
1422
1422
  n && n(JSON.parse(d));
1423
1423
  },
1424
- onFailure(d, l) {
1425
- const p = d;
1426
- p.msg = l.error, s && s(p);
1424
+ onFailure(d, p) {
1425
+ const l = d;
1426
+ l.msg = p.error, s && s(l);
1427
1427
  }
1428
1428
  });
1429
1429
  }
1430
1430
  async function w(e, t = void 0, n = void 0) {
1431
1431
  const s = e.space + "/api/index/tk";
1432
1432
  return f(s, {
1433
- onComplete(i, r, o) {
1434
- const a = JSON.parse(i);
1433
+ onComplete(a, r, o) {
1434
+ const i = JSON.parse(a);
1435
1435
  if (t)
1436
- return t(a), e.token = a?.result?.ServerToken;
1436
+ return t(i), e.token = i?.result?.ServerToken;
1437
1437
  },
1438
- onFailure(i) {
1439
- n && n(i);
1438
+ onFailure(a) {
1439
+ n && n(a);
1440
1440
  }
1441
1441
  });
1442
1442
  }
1443
1443
  function Xe(e, t = void 0, n = void 0) {
1444
- const s = `${e.space}/api/exalead/whatsnew`, i = {
1444
+ const s = `${e.space}/api/exalead/whatsnew`, a = {
1445
1445
  params: {
1446
1446
  community_id: null,
1447
1447
  hash_key: null,
@@ -1459,19 +1459,19 @@ function Xe(e, t = void 0, n = void 0) {
1459
1459
  "Content-type": "application/json;charset=UTF-8",
1460
1460
  Accept: "application/json"
1461
1461
  },
1462
- data: JSON.stringify(i),
1462
+ data: JSON.stringify(a),
1463
1463
  type: "json",
1464
- onComplete(o, a) {
1465
- t && t(o, a);
1464
+ onComplete(o, i) {
1465
+ t && t(o, i);
1466
1466
  },
1467
- onFailure(o, a) {
1468
- n && n(o, a);
1467
+ onFailure(o, i) {
1468
+ n && n(o, i);
1469
1469
  }
1470
1470
  });
1471
1471
  });
1472
1472
  }
1473
1473
  function We(e, t = void 0, n = void 0) {
1474
- const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
1474
+ const s = `${e.space}/api/Recommendation/getpeoplefamiliartocurrentuser`, a = {
1475
1475
  params: {
1476
1476
  idsToFilterArr: [],
1477
1477
  mode: "offline",
@@ -1488,14 +1488,14 @@ function We(e, t = void 0, n = void 0) {
1488
1488
  "Content-type": "application/json;charset=UTF-8",
1489
1489
  Accept: "application/json"
1490
1490
  },
1491
- data: JSON.stringify(i),
1491
+ data: JSON.stringify(a),
1492
1492
  type: "json",
1493
- onComplete(o, a) {
1493
+ onComplete(o, i) {
1494
1494
  const c = o.result.hits.map((d) => ({ login: d.login, fullName: d.name }));
1495
1495
  t && t(c, o);
1496
1496
  },
1497
- onFailure(o, a) {
1498
- n && n(o, a);
1497
+ onFailure(o, i) {
1498
+ n && n(o, i);
1499
1499
  }
1500
1500
  });
1501
1501
  });
@@ -1506,17 +1506,17 @@ function Be(e, t = void 0, n = void 0) {
1506
1506
  uri: "/api/community/listmycommunities",
1507
1507
  limit: `/limit/${e.limit ? e.limit : 128}`,
1508
1508
  page: `/page/${e.page ? e.page : "1"}`
1509
- }, i = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1509
+ }, a = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1510
1510
  w(e, (o) => {
1511
- f(i, {
1511
+ f(a, {
1512
1512
  method: "GET",
1513
1513
  headers: {
1514
1514
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1515
1515
  },
1516
- onComplete(a, c, d) {
1517
- const p = JSON.parse(a).result;
1516
+ onComplete(i, c, d) {
1517
+ const l = JSON.parse(i).result;
1518
1518
  let u = 0;
1519
- p.forEach((m) => {
1519
+ l.forEach((m) => {
1520
1520
  const g = {
1521
1521
  description: m.description,
1522
1522
  id: m.id,
@@ -1529,21 +1529,21 @@ function Be(e, t = void 0, n = void 0) {
1529
1529
  e,
1530
1530
  m.id,
1531
1531
  (h) => {
1532
- u++, g.members = h, r.push(g), u === p.length && t && t(r);
1532
+ u++, g.members = h, r.push(g), u === l.length && t && t(r);
1533
1533
  },
1534
1534
  (h) => n(h)
1535
1535
  );
1536
1536
  });
1537
1537
  },
1538
- onFailure(a, c) {
1539
- const d = a;
1538
+ onFailure(i, c) {
1539
+ const d = i;
1540
1540
  d.status = c.status, d.response = c.errormsg, n && n(d);
1541
1541
  }
1542
1542
  });
1543
1543
  });
1544
1544
  }
1545
1545
  function ee(e, t, n, s) {
1546
- const i = `${e.space}/api/community/listmembers`, r = {
1546
+ const a = `${e.space}/api/community/listmembers`, r = {
1547
1547
  params: {
1548
1548
  page: e.page ? e.page : 1,
1549
1549
  limit: e.limit ? e.limit : 50,
@@ -1551,7 +1551,7 @@ function ee(e, t, n, s) {
1551
1551
  }
1552
1552
  };
1553
1553
  w(e, (o) => {
1554
- f(i, {
1554
+ f(a, {
1555
1555
  method: "POST",
1556
1556
  headers: {
1557
1557
  "Content-type": "application/json;charset=UTF-8",
@@ -1560,11 +1560,11 @@ function ee(e, t, n, s) {
1560
1560
  },
1561
1561
  data: JSON.stringify(r),
1562
1562
  type: "json",
1563
- onComplete(a, c, d) {
1564
- n && n(a);
1563
+ onComplete(i, c, d) {
1564
+ n && n(i);
1565
1565
  },
1566
- onFailure(a, c) {
1567
- const d = a;
1566
+ onFailure(i, c) {
1567
+ const d = i;
1568
1568
  d.status = c.status, d.response = c.errormsg, s && s(d);
1569
1569
  }
1570
1570
  });
@@ -1573,9 +1573,9 @@ function ee(e, t, n, s) {
1573
1573
  function Ye(e, t = void 0, n = void 0) {
1574
1574
  const s = "YXdA5x4DSUKtlAi2wmnyTA";
1575
1575
  e.commu_id || (e.commu_id = s);
1576
- const i = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1576
+ const a = `${e.space}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1577
1577
  w(e, (r) => {
1578
- f(i, {
1578
+ f(a, {
1579
1579
  method: "GET",
1580
1580
  headers: {
1581
1581
  "Content-type": "application/json;charset=UTF-8",
@@ -1583,20 +1583,20 @@ function Ye(e, t = void 0, n = void 0) {
1583
1583
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1584
1584
  },
1585
1585
  onComplete(o) {
1586
- const a = JSON.parse(o);
1587
- t && t(a);
1586
+ const i = JSON.parse(o);
1587
+ t && t(i);
1588
1588
  },
1589
- onFailure(o, a) {
1589
+ onFailure(o, i) {
1590
1590
  const c = o;
1591
- c.status = a.status, c.response = a.errormsg, n && n(c);
1591
+ c.status = i.status, c.response = i.errormsg, n && n(c);
1592
1592
  }
1593
1593
  });
1594
1594
  });
1595
1595
  }
1596
1596
  function qe(e, t, n = void 0, s = void 0) {
1597
- const { listAllContacts: i, currentUser: r } = e;
1598
- console.log("__listAllContacts", i.hits);
1599
- const o = `${e.space}/api/directmessages`, a = {
1597
+ const { listAllContacts: a, currentUser: r } = e;
1598
+ console.log("__listAllContacts", a.hits);
1599
+ const o = `${e.space}/api/directmessages`, i = {
1600
1600
  users: [r.login].concat(t.receipt)
1601
1601
  }, c = {
1602
1602
  id_msg: "",
@@ -1606,30 +1606,30 @@ function qe(e, t, n = void 0, s = void 0) {
1606
1606
  };
1607
1607
  let d = !1;
1608
1608
  te(
1609
- a.users,
1610
- (l) => {
1611
- l !== void 0 && (c.id_msg = l.id, d = !0, U(e, c));
1609
+ i.users,
1610
+ (p) => {
1611
+ p !== void 0 && (c.id_msg = p.id, d = !0, U(e, c));
1612
1612
  },
1613
- (l) => {
1614
- d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", l), s && s(l), c.id_msg = "";
1613
+ (p) => {
1614
+ d = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), s && s(p), c.id_msg = "";
1615
1615
  }
1616
1616
  ), d === !1 && setTimeout(() => {
1617
- d === !1 && w(e, (l) => {
1617
+ d === !1 && w(e, (p) => {
1618
1618
  f(o, {
1619
1619
  method: "POST",
1620
1620
  headers: {
1621
1621
  "Content-Type": "application/json",
1622
1622
  Accept: "application/json",
1623
- "X-DS-SWYM-CSRFTOKEN": l.result.ServerToken
1623
+ "X-DS-SWYM-CSRFTOKEN": p.result.ServerToken
1624
1624
  },
1625
- data: JSON.stringify(a),
1625
+ data: JSON.stringify(i),
1626
1626
  type: "json",
1627
- onComplete(p, u, m) {
1628
- const g = p;
1627
+ onComplete(l, u, m) {
1628
+ const g = l;
1629
1629
  g.reponse = JSON.parse(m.response), g.status = m.status, n && n(g), c.id_msg = g.result.id, U(e, c);
1630
1630
  },
1631
- onFailure(p, u, m) {
1632
- const g = p;
1631
+ onFailure(l, u, m) {
1632
+ const g = l;
1633
1633
  g.msg = u.errormsg, g.status = u.status, s && s(g);
1634
1634
  }
1635
1635
  });
@@ -1637,41 +1637,41 @@ function qe(e, t, n = void 0, s = void 0) {
1637
1637
  }, 500);
1638
1638
  }
1639
1639
  function te(e, t, n, s) {
1640
- const i = `${e.space}/api/directmessages/lite?with_favorites=false`;
1640
+ const a = `${e.space}/api/directmessages/lite?with_favorites=false`;
1641
1641
  w(e, (r) => {
1642
- f(i, {
1642
+ f(a, {
1643
1643
  method: "GET",
1644
1644
  headers: {
1645
1645
  Accept: "application/json,text/javascript,*/*",
1646
1646
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken
1647
1647
  },
1648
1648
  onComplete(o) {
1649
- const a = JSON.parse(o), c = [];
1650
- a.result.forEach((p) => {
1651
- p.users = p.users.sort((u, m) => u.login.localeCompare(m.login)), p.users.length === t.length && c.push(p);
1649
+ const i = JSON.parse(o), c = [];
1650
+ i.result.forEach((l) => {
1651
+ l.users = l.users.sort((u, m) => u.login.localeCompare(m.login)), l.users.length === t.length && c.push(l);
1652
1652
  });
1653
- const d = t.sort(), l = c.find((p) => {
1653
+ const d = t.sort(), p = c.find((l) => {
1654
1654
  const u = [];
1655
- return p.users.forEach((m) => {
1655
+ return l.users.forEach((m) => {
1656
1656
  u.push(m.login);
1657
1657
  }), JSON.stringify(u) === JSON.stringify(d);
1658
1658
  });
1659
- n && l !== void 0 ? n(l) : (s || l === void 0) && s(l);
1659
+ n && p !== void 0 ? n(p) : (s || p === void 0) && s(p);
1660
1660
  },
1661
1661
  onFailure(o) {
1662
- const a = o;
1663
- a.msg = headers.errormsg, a.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", a), s && s(a);
1662
+ const i = o;
1663
+ i.msg = headers.errormsg, i.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", i), s && s(i);
1664
1664
  }
1665
1665
  });
1666
1666
  });
1667
1667
  }
1668
1668
  function U(e, t, n = void 0, s = void 0) {
1669
- const i = {
1669
+ const a = {
1670
1670
  base: e.space,
1671
1671
  uri: "/api/community",
1672
1672
  id_msg: `${t.id_msg}`,
1673
1673
  endUri: "/instantmessages"
1674
- }, r = `${i.base}${i.uri}/${i.id_msg}${i.endUri}`, o = {
1674
+ }, r = `${a.base}${a.uri}/${a.id_msg}${a.endUri}`, o = {
1675
1675
  author: { login: t.senderId, displayName: t.senderName },
1676
1676
  accessState: null,
1677
1677
  commentUri: null,
@@ -1681,23 +1681,23 @@ function U(e, t, n = void 0, s = void 0) {
1681
1681
  parentCommentUri: null,
1682
1682
  richMessage: t.msg
1683
1683
  };
1684
- console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (a) => {
1684
+ console.log("_3dSwym_sendDirectMessageData url ", r), w(e, (i) => {
1685
1685
  f(r, {
1686
1686
  method: "POST",
1687
1687
  headers: {
1688
1688
  "Content-Type": "application/json",
1689
1689
  Accept: "application/json",
1690
- "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1690
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1691
1691
  },
1692
1692
  data: JSON.stringify(o),
1693
1693
  type: "json",
1694
- onComplete(c, d, l) {
1695
- const p = c;
1696
- p.status = l.status, p.response = JSON.parse(l.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
1694
+ onComplete(c, d, p) {
1695
+ const l = c;
1696
+ l.status = p.status, l.response = JSON.parse(p.response), console.log("✅ _3dSwym_sendDirectMessageData => ", l), n && n(l);
1697
1697
  },
1698
1698
  onFailure(c, d) {
1699
- const l = c;
1700
- l.msg = d.errormsg, l.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", l), s && s(l);
1699
+ const p = c;
1700
+ p.msg = d.errormsg, p.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
1701
1701
  }
1702
1702
  });
1703
1703
  });
@@ -1720,17 +1720,17 @@ const se = {
1720
1720
  // id de l'idee qui est créer au post (_3dSwym_postIdea)
1721
1721
  };
1722
1722
  function He(e, t, n = void 0, s = void 0) {
1723
- const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1723
+ const a = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
1724
1724
  (c) => c.id === t.community_id
1725
1725
  ), o = e.swymCommunities.find(
1726
1726
  (c) => c.title.toLowerCase() === t.community_title.toLowerCase()
1727
- ), a = {
1727
+ ), i = {
1728
1728
  params: {
1729
1729
  title: t.title,
1730
1730
  // String, le nom de l'affaire
1731
1731
  community_id: r?.id !== void 0 ? r.id : o.id,
1732
1732
  // String, l'id de la communauté
1733
- message: ae(t.text_html),
1733
+ message: ie(t.text_html),
1734
1734
  // STRING => le contenue du message doit être au format HTML
1735
1735
  published: 1
1736
1736
  // 1 publier, 0 non publier
@@ -1742,31 +1742,31 @@ function He(e, t, n = void 0, s = void 0) {
1742
1742
  Accept: "application/json",
1743
1743
  "X-DS-SWYM-CSRFTOKEN": c.result.ServerToken
1744
1744
  };
1745
- f(i, {
1745
+ f(a, {
1746
1746
  method: "POST",
1747
1747
  headers: d,
1748
- data: JSON.stringify(a),
1748
+ data: JSON.stringify(i),
1749
1749
  type: "json",
1750
- onComplete(l, p, u) {
1751
- const m = JSON.parse(l);
1750
+ onComplete(p, l, u) {
1751
+ const m = JSON.parse(p);
1752
1752
  m.status = u.status, m.response = u.response, n && n(m);
1753
1753
  },
1754
- onFailure(l, p, u) {
1755
- const m = l;
1756
- m.status = p.status, m.response = p.errormsg, s && s(m);
1754
+ onFailure(p, l, u) {
1755
+ const m = p;
1756
+ m.status = l.status, m.response = l.errormsg, s && s(m);
1757
1757
  }
1758
1758
  });
1759
1759
  });
1760
1760
  }
1761
1761
  function ze(e, t, n = void 0, s = void 0) {
1762
- const i = `${e.space}/api/idea/delete`, r = {
1762
+ const a = `${e.space}/api/idea/delete`, r = {
1763
1763
  params: {
1764
1764
  community_id: t.community_id,
1765
1765
  ideationIds: [t.idee_id]
1766
1766
  }
1767
1767
  };
1768
1768
  w(e, (o) => {
1769
- f(i, {
1769
+ f(a, {
1770
1770
  method: "POST",
1771
1771
  headers: {
1772
1772
  "Content-type": "application/json;charset=UTF-8",
@@ -1775,31 +1775,31 @@ function ze(e, t, n = void 0, s = void 0) {
1775
1775
  },
1776
1776
  data: JSON.stringify(r),
1777
1777
  type: "json",
1778
- onComplete(a, c, d) {
1779
- n && n(a);
1778
+ onComplete(i, c, d) {
1779
+ n && n(i);
1780
1780
  },
1781
- onFailure(a, c, d) {
1782
- const l = a;
1783
- l.status = c.status, l.response = c.errormsg, s && s(l);
1781
+ onFailure(i, c, d) {
1782
+ const p = i;
1783
+ p.status = c.status, p.response = c.errormsg, s && s(p);
1784
1784
  }
1785
1785
  });
1786
1786
  });
1787
1787
  }
1788
1788
  function Qe(e, t = "", n = void 0, s = void 0) {
1789
- const i = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1790
- t === "" && (t = i);
1789
+ const a = e.tenant.toLowerCase() === "r1132101716373" ? "tFtz0G4MR6qNtKgJjNfTog" : e.tenant.toLowerCase() === "r1132101286859" ? "Qpv3HN-tTDOsU-7_c5DnDg" : "Template_d'idée_à_créer";
1790
+ t === "" && (t = a);
1791
1791
  const r = `${e.space}/api/idea/get`, o = {
1792
1792
  params: {
1793
1793
  id: t
1794
1794
  }
1795
1795
  };
1796
- w(e, (a) => {
1796
+ w(e, (i) => {
1797
1797
  f(r, {
1798
1798
  method: "POST",
1799
1799
  headers: {
1800
1800
  "Content-type": "application/json;charset=UTF-8",
1801
1801
  Accept: "application/json",
1802
- "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1802
+ "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1803
1803
  },
1804
1804
  data: JSON.stringify(o),
1805
1805
  type: "json",
@@ -1815,29 +1815,29 @@ function Qe(e, t = "", n = void 0, s = void 0) {
1815
1815
  });
1816
1816
  }
1817
1817
  function Ze(e, t = se, n = void 0, s = void 0) {
1818
- const i = {
1818
+ const a = {
1819
1819
  uri: "/api/idea/list",
1820
1820
  comId: `/community_id/${e.tenant.toLowerCase() === "r1132101716373" ? t.community_id : "bgnIsG74SUWswyGzS6NC6g"}`,
1821
1821
  limit: `/limit/${t.limit ? t.limit : 10}`
1822
- }, r = `${e.space}${i.uri}${i.comId}${i.limit}`;
1822
+ }, r = `${e.space}${a.uri}${a.comId}${a.limit}`;
1823
1823
  w(e, (o) => {
1824
1824
  f(r, {
1825
1825
  method: "GET",
1826
1826
  headers: {
1827
1827
  "X-DS-SWYM-CSRFTOKEN": o.result.ServerToken
1828
1828
  },
1829
- onComplete(a) {
1830
- const c = JSON.parse(a);
1829
+ onComplete(i) {
1830
+ const c = JSON.parse(i);
1831
1831
  n && n(c);
1832
1832
  },
1833
- onFailure(a, c) {
1834
- const d = a;
1833
+ onFailure(i, c) {
1834
+ const d = i;
1835
1835
  d.status = c.status, d.response = c.errormsg, s && s(d);
1836
1836
  }
1837
1837
  });
1838
1838
  });
1839
1839
  }
1840
- function ae(e) {
1840
+ function ie(e) {
1841
1841
  return !e || e === "" ? `<h2><u>INFORMATIONS AFFAIRE :</u></h2>
1842
1842
  <p><u>|⚠️<em> Merci de respecter l&#39;écriture des tags, en MAJUSCULES, nom complet, pas de caractères</em></u></p>
1843
1843
  <p><u><em>|spéciaux, séparation par &#34;_&#34; si besoin !</em></u></p>
@@ -1914,32 +1914,32 @@ function ae(e) {
1914
1914
  }
1915
1915
  function et(e, t = void 0, n = void 0) {
1916
1916
  const s = e.space + "/api/user/getcurrent/";
1917
- w(e, (i) => {
1917
+ w(e, (a) => {
1918
1918
  f(s, {
1919
1919
  method: "GET",
1920
1920
  headers: {
1921
- "X-DS-SWYM-CSRFTOKEN": i.result.ServerToken
1921
+ "X-DS-SWYM-CSRFTOKEN": a.result.ServerToken
1922
1922
  },
1923
- onComplete(r, o, a) {
1923
+ onComplete(r, o, i) {
1924
1924
  const c = JSON.parse(r);
1925
1925
  t && t(c.result);
1926
1926
  },
1927
- onFailure(r, o, a) {
1928
- const c = { erreur: JSON.parse(r), headers: o, xhr: a };
1927
+ onFailure(r, o, i) {
1928
+ const c = { erreur: JSON.parse(r), headers: o, xhr: i };
1929
1929
  n && n(c);
1930
1930
  }
1931
1931
  });
1932
1932
  });
1933
1933
  }
1934
1934
  function tt(e, t, n = void 0, s = void 0) {
1935
- const i = e.space + "/api/user/find/login/" + t;
1935
+ const a = e.space + "/api/user/find/login/" + t;
1936
1936
  w(
1937
1937
  e,
1938
1938
  (r) => {
1939
- f(i, {
1939
+ f(a, {
1940
1940
  method: "GET",
1941
1941
  headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
1942
- onComplete(o, a, c) {
1942
+ onComplete(o, i, c) {
1943
1943
  const d = JSON.parse(o);
1944
1944
  n && n(d);
1945
1945
  },
@@ -1952,54 +1952,74 @@ function tt(e, t, n = void 0, s = void 0) {
1952
1952
  );
1953
1953
  }
1954
1954
  function nt(e, t = void 0, n = void 0) {
1955
- e.tenant && A(e, (s) => {
1955
+ e.tenant && v(e, (s) => {
1956
1956
  console.log("serviceUrls", s);
1957
- const i = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
1958
- t && t(i);
1957
+ const a = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
1958
+ t && t(a);
1959
1959
  });
1960
1960
  }
1961
1961
  function st(e, t = void 0, n = void 0) {
1962
- e.tenant && A(e, (s) => {
1962
+ e.tenant && v(e, (s) => {
1963
1963
  console.log("serviceUrls", s);
1964
- const i = s.services.find((a) => a.id === "3dpassport")?.url, r = s.services.find((a) => a.id === "businessprocess")?.url + "/api/v2", o = `${i}/login/?service=${r}/auth/cas`;
1964
+ const a = s.services.find((i) => i.id === "3dpassport")?.url, r = s.services.find((i) => i.id === "businessprocess")?.url + "/api/v2", o = `${a}/login/?service=${r}/auth/cas`;
1965
1965
  f(o, {
1966
- async onComplete(a) {
1967
- console.log("response", a);
1968
- const c = typeof a == "string" ? JSON.parse(a)?.x3ds_service_redirect_url : a?.x3ds_service_redirect_url;
1966
+ async onComplete(i) {
1967
+ console.log("response", i);
1968
+ const c = typeof i == "string" ? JSON.parse(i)?.x3ds_service_redirect_url : i?.x3ds_service_redirect_url;
1969
1969
  await fetch(c, {
1970
1970
  method: "POST"
1971
1971
  }).then((d) => d.json()).then(async (d) => {
1972
1972
  t && t(d?.token);
1973
1973
  });
1974
1974
  },
1975
- onFailure(a) {
1976
- n && n(a);
1975
+ onFailure(i) {
1976
+ n && n(i);
1977
1977
  }
1978
1978
  });
1979
1979
  });
1980
1980
  }
1981
+ async function it(e, t, n = void 0, s = void 0) {
1982
+ e.tenant && v(e, (a) => {
1983
+ const o = `${a.services.find((i) => i.id === "businessprocess")?.url + "/api/v2"}/identity/users`;
1984
+ fetch(`https://api.uixhome.fr/iterop/listusers?t=${t}&s=${o}`, {
1985
+ method: "POST"
1986
+ }).then((i) => i.json()).then((i) => {
1987
+ n && n(i);
1988
+ }).catch((i) => {
1989
+ s && s(i);
1990
+ });
1991
+ });
1992
+ }
1981
1993
  async function at(e, t, n = void 0, s = void 0) {
1982
- e.tenant && A(e, (i) => {
1983
- console.log("serviceUrls", i), i.services.find((a) => a.id === "3dpassport")?.url;
1984
- const o = `${i.services.find((a) => a.id === "businessprocess")?.url + "/api/v2"}/identity/users`;
1985
- f(o, {
1986
- headers: {
1987
- Authorization: `Bearer ${t}`
1988
- },
1989
- onComplete(a) {
1990
- console.log("response", a), n && n(a);
1991
- },
1992
- onFailure(a) {
1993
- s && s(a);
1994
- }
1994
+ e.tenant && v(e, (a) => {
1995
+ const o = `${a.services.find((i) => i.id === "businessprocess")?.url + "/api/v2"}/repository/data/tables`;
1996
+ fetch(`https://api.uixhome.fr/iterop/repository/data/tables?t=${t}&s=${o}`, {
1997
+ method: "GET"
1998
+ }).then((i) => i.json()).then((i) => {
1999
+ n && n(i);
2000
+ }).catch((i) => {
2001
+ s && s(i);
2002
+ });
2003
+ });
2004
+ }
2005
+ async function ot(e, t, n, s, a = void 0, r = void 0) {
2006
+ e.tenant && v(e, (o) => {
2007
+ const c = `${o.services.find((p) => p.id === "businessprocess")?.url + "/api/v2"}/repository/data/tables`;
2008
+ var d = require("crypto-js");
2009
+ d.fetch(`https://api.uixhome.fr/iterop/runtime/processes/${n}?t=${t}&s=${c}&b=${s}`, {
2010
+ method: "POST"
2011
+ }).then((p) => p.json()).then((p) => {
2012
+ a && a(p);
2013
+ }).catch((p) => {
2014
+ r && r(p);
1995
2015
  });
1996
2016
  });
1997
2017
  }
1998
- function it(e) {
2018
+ function rt(e) {
1999
2019
  const t = "Hello " + e;
2000
2020
  return console.log(t), t;
2001
2021
  }
2002
- function ot(e, t = void 0, n = void 0) {
2022
+ function ct(e, t = void 0, n = void 0) {
2003
2023
  return console.log("credentials", e), new Promise((s) => {
2004
2024
  if (e.token === "" && T(e), !e.space || e.space === "") {
2005
2025
  const o = E();
@@ -2016,13 +2036,13 @@ function ot(e, t = void 0, n = void 0) {
2016
2036
  },
2017
2037
  !0
2018
2038
  );
2019
- const i = N.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
2039
+ const a = N.now().ts, r = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dsearch&platformId=${e.tenant}`;
2020
2040
  f(r, {
2021
2041
  onComplete(o) {
2022
2042
  if (Array.isArray(JSON.parse(o))) {
2023
- const a = JSON.parse(o);
2024
- console.log("serviceId=3dsearch", a);
2025
- const c = `${a[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
2043
+ const i = JSON.parse(o);
2044
+ console.log("serviceId=3dsearch", i);
2045
+ const c = `${i[0].services[0].url}/search?xrequestedwith=xmlhttprequest`;
2026
2046
  f(c, {
2027
2047
  method: "POST",
2028
2048
  headers: {
@@ -2032,7 +2052,7 @@ function ot(e, t = void 0, n = void 0) {
2032
2052
  data: JSON.stringify({
2033
2053
  with_indexing_date: !0,
2034
2054
  with_nls: !1,
2035
- label: `3DSearch-${i}`,
2055
+ label: `3DSearch-${a}`,
2036
2056
  locale: "en",
2037
2057
  select_predicate: [
2038
2058
  "ds6w:label",
@@ -2079,26 +2099,26 @@ function ot(e, t = void 0, n = void 0) {
2079
2099
  });
2080
2100
  }
2081
2101
  export {
2082
- j as UUID,
2083
- ot as _3DSearch_usersGroup,
2084
- Ae as _3DSpace_Create_Doc,
2085
- je as _3DSpace_bookmark_addSubsciptions,
2102
+ D as UUID,
2103
+ ct as _3DSearch_usersGroup,
2104
+ Ie as _3DSpace_Create_Doc,
2105
+ De as _3DSpace_bookmark_addSubsciptions,
2086
2106
  T as _3DSpace_csrf,
2087
- R as _3DSpace_download_doc,
2107
+ P as _3DSpace_download_doc,
2088
2108
  B as _3DSpace_download_multidoc,
2089
2109
  X as _3DSpace_file_update,
2090
2110
  W as _3DSpace_file_update_csr,
2091
- ke as _3DSpace_file_url_csr,
2092
- v as _3DSpace_get_csrf,
2111
+ $e as _3DSpace_file_url_csr,
2112
+ $ as _3DSpace_get_csrf,
2093
2113
  V as _3DSpace_get_docInfo,
2094
2114
  Y as _3DSpace_get_downloadTicket_multidoc,
2095
2115
  b as _3DSpace_get_securityContexts,
2096
- $ as _3DSpace_get_ticket,
2097
- De as _3DSpace_lifecycle_changeRevision,
2098
- $e as _3DSpace_lifecycle_changeState,
2099
- Ie as _3DSpace_lifecycle_getGraph,
2116
+ k as _3DSpace_get_ticket,
2117
+ je as _3DSpace_lifecycle_changeRevision,
2118
+ ke as _3DSpace_lifecycle_changeState,
2119
+ Fe as _3DSpace_lifecycle_getGraph,
2100
2120
  Ue as _3DSpace_lifecycle_getNextRevision,
2101
- Fe as _3DSpace_lifecycle_getNextStates,
2121
+ Ae as _3DSpace_lifecycle_getNextStates,
2102
2122
  qe as _3DSwym_buildDirectMessage,
2103
2123
  ze as _3DSwym_deleteIdea,
2104
2124
  te as _3DSwym_findCommunityToInstantMSG,
@@ -2117,10 +2137,12 @@ export {
2117
2137
  ye as _AppMngt_get_info_user,
2118
2138
  _e as _AppMngt_get_users,
2119
2139
  st as _Iterop_Auth_CAS,
2120
- at as _Iterop_ListUsers,
2140
+ it as _Iterop_ListUsers,
2141
+ at as _Iterop_getAllBusinessTables,
2142
+ ot as _Iterop_processStart,
2121
2143
  E as _getPlateformInfos,
2122
2144
  ge as _getPlatformServices,
2123
- A as _getServiceUrl,
2145
+ v as _getServiceUrl,
2124
2146
  he as _getServiceUrl_3DPassport,
2125
2147
  nt as _getServiceUrl_Iterop,
2126
2148
  f as _httpCallAuthenticated,
@@ -2134,12 +2156,12 @@ export {
2134
2156
  q as dataMixing,
2135
2157
  Oe as deleteUserGroups,
2136
2158
  de as findAdresse,
2137
- Re as getAllContextSecurity,
2159
+ Pe as getAllContextSecurity,
2138
2160
  K as getCSRFToken,
2139
2161
  ce as getCommunes,
2140
2162
  Ce as getComplementUG,
2141
- Pe as getDataFrom3DSpace,
2142
- le as getDataFromGouvFr,
2163
+ Re as getDataFrom3DSpace,
2164
+ pe as getDataFromGouvFr,
2143
2165
  Je as getDatasByTenant,
2144
2166
  Ee as getDatasFrom3DSpace,
2145
2167
  xe as getDownloadDocument,
@@ -2152,7 +2174,7 @@ export {
2152
2174
  Me as pushDataIn3DSpace,
2153
2175
  ve as readUserGroupControl,
2154
2176
  Ke as removeTagToDoc,
2155
- it as sayHello,
2156
- pe as updateEvent
2177
+ rt as sayHello,
2178
+ le as updateEvent
2157
2179
  };
2158
2180
  //# sourceMappingURL=wb3Api.js.map