@beam3_dev/api_module 0.0.291 → 0.0.293

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/wb3Api.js CHANGED
@@ -34,10 +34,10 @@ const H = {
34
34
  b3Edit8: "#616161",
35
35
  b3Edit9: "#795548"
36
36
  };
37
- async function Ne(e, t = void 0, n = void 0) {
38
- const s = parseInt(e);
37
+ async function Ne(e, t = void 0, s = void 0) {
38
+ const n = parseInt(e);
39
39
  await fetch(
40
- "https://apicarto.ign.fr/api/codes-postaux/communes/" + s,
40
+ "https://apicarto.ign.fr/api/codes-postaux/communes/" + n,
41
41
  {
42
42
  method: "GET",
43
43
  headers: {
@@ -47,10 +47,10 @@ async function Ne(e, t = void 0, n = void 0) {
47
47
  ).then((i) => i.json()).then((i) => {
48
48
  t && t(i);
49
49
  }).catch((i) => {
50
- n && n(i), console.error("Erreur : " + i);
50
+ s && s(i), console.error("Erreur : " + i);
51
51
  });
52
52
  }
53
- async function xe(e, t = void 0, n = void 0) {
53
+ async function xe(e, t = void 0, s = void 0) {
54
54
  e = encodeURIComponent(e), await fetch(
55
55
  "https://api-adresse.data.gouv.fr/search/?q=" + e + "&limit=15",
56
56
  {
@@ -59,19 +59,19 @@ async function xe(e, t = void 0, n = void 0) {
59
59
  Accept: "application/json"
60
60
  }
61
61
  }
62
- ).then((s) => s.json()).then((s) => {
63
- t && t(s);
64
- }).catch((s) => {
65
- n && n(s), console.error("Erreur : " + s);
62
+ ).then((n) => n.json()).then((n) => {
63
+ t && t(n);
64
+ }).catch((n) => {
65
+ s && s(n), console.error("Erreur : " + n);
66
66
  });
67
67
  }
68
68
  async function Fe(e, t = H) {
69
- let n = O.now().year;
70
- const s = e, i = [], r = (o) => {
69
+ let s = O.now().year;
70
+ const n = e, i = [], r = (o) => {
71
71
  for (let c in o)
72
72
  i.push({ date: c, comment: o[c] });
73
73
  };
74
- for (let o = n; o <= n + 1; o++)
74
+ for (let o = s; o <= s + 1; o++)
75
75
  await fetch(
76
76
  "https://calendrier.api.gouv.fr/jours-feries/metropole/" + o + ".json",
77
77
  {
@@ -84,9 +84,9 @@ async function Fe(e, t = H) {
84
84
  r(c);
85
85
  }).catch((c) => console.error("Erreur : " + c));
86
86
  return (() => {
87
- const o = s.length === 0 ? {
87
+ const o = n.length === 0 ? {
88
88
  events: []
89
- } : s;
89
+ } : n;
90
90
  for (let c of i)
91
91
  o.events.findIndex(
92
92
  (u) => u.start === O.fromISO(c.date).toISODate() && u.name === "Férié : " + c.comment
@@ -100,26 +100,26 @@ async function Fe(e, t = H) {
100
100
  return o;
101
101
  })();
102
102
  }
103
- function z(e, t, n) {
104
- const { credentials: s, myArray: i, chunk: r, fn_to_call: a } = e, o = [];
103
+ function z(e, t, s) {
104
+ const { credentials: n, myArray: i, chunk: r, fn_to_call: a } = e, o = [];
105
105
  for (let c = 0; c < i.length; c += r) {
106
106
  const d = i.slice(c, c + r);
107
107
  o.push(d);
108
108
  }
109
109
  Q(
110
- { credentials: s, chunks: o, initLoop: 0, fn: a },
110
+ { credentials: n, chunks: o, initLoop: 0, fn: a },
111
111
  (c) => {
112
112
  t && t(c);
113
113
  },
114
114
  (c) => {
115
- n && n(c);
115
+ s && s(c);
116
116
  }
117
117
  );
118
118
  }
119
- function Q(e, t, n) {
120
- const { credentials: s, chunks: i, initLoop: r, fn: a } = e, o = (c) => {
119
+ function Q(e, t, s) {
120
+ const { credentials: n, chunks: i, initLoop: r, fn: a } = e, o = (c) => {
121
121
  a(
122
- s,
122
+ n,
123
123
  i[c],
124
124
  () => {
125
125
  c++, c < i.length && o(c);
@@ -128,54 +128,54 @@ function Q(e, t, n) {
128
128
  t && t(d);
129
129
  },
130
130
  (d) => {
131
- n && n(d);
131
+ s && s(d);
132
132
  }
133
133
  );
134
134
  };
135
135
  o(r);
136
136
  }
137
- async function Ie(e, t, n = !0) {
138
- const s = e.events.findIndex((i) => i.uuid === t.uuid);
139
- 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;
137
+ async function Ie(e, t, s = !0) {
138
+ const n = e.events.findIndex((i) => i.uuid === t.uuid);
139
+ return n === -1 ? e.events.push(t) : s ? e.events[n] = t : e.events.splice(n, 1), e.length > 0 && e.sort((i, r) => i.start - r.start), e;
140
140
  }
141
141
  function m(e, t) {
142
- $(["DS/WAFData/WAFData"], (n) => {
143
- n.authenticatedRequest(e, t);
142
+ $(["DS/WAFData/WAFData"], (s) => {
143
+ s.authenticatedRequest(e, t);
144
144
  });
145
145
  }
146
- function Ue(e, t, n) {
147
- $(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
148
- s.draggable(e, {
146
+ function Ue(e, t, s) {
147
+ $(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
148
+ n.draggable(e, {
149
149
  data: t,
150
- start: n
150
+ start: s
151
151
  });
152
152
  });
153
153
  }
154
154
  function Re(e, t = void 0) {
155
- $(["DS/TagNavigatorProxy/TagNavigatorProxy"], (n) => {
156
- let s;
157
- s === void 0 && (s = n.createProxy({
155
+ $(["DS/TagNavigatorProxy/TagNavigatorProxy"], (s) => {
156
+ let n;
157
+ n === void 0 && (n = s.createProxy({
158
158
  widgetId: L.id,
159
159
  filteringMode: "WithFilteringServices"
160
- }), t !== void 0 && s.addEvent("onFilterSubjectsChange", t)), s.setSubjectsTags(e);
160
+ }), t !== void 0 && n.addEvent("onFilterSubjectsChange", t)), n.setSubjectsTags(e);
161
161
  });
162
162
  }
163
163
  function je(e, t) {
164
- $(["DS/DataDragAndDrop/DataDragAndDrop"], (n) => {
165
- n.droppable(e, {
164
+ $(["DS/DataDragAndDrop/DataDragAndDrop"], (s) => {
165
+ s.droppable(e, {
166
166
  drop: t
167
167
  });
168
168
  });
169
169
  }
170
- async function ke(e, t = void 0, n = void 0) {
170
+ async function ke(e, t = void 0, s = void 0) {
171
171
  await $(
172
172
  ["DS/i3DXCompassServices/i3DXCompassServices"],
173
- (s) => {
173
+ (n) => {
174
174
  (!e || e === "") && (e = L.getValue("PlatFormInstanceId")), (!e || e === "") && (e = void 0), t && t(
175
- s.getPlatformServices({
175
+ n.getPlatformServices({
176
176
  platformId: e,
177
177
  onComplete: t,
178
- onFailure: n
178
+ onFailure: s
179
179
  })
180
180
  );
181
181
  }
@@ -184,55 +184,53 @@ async function ke(e, t = void 0, n = void 0) {
184
184
  function Z() {
185
185
  let e = {};
186
186
  return $(["DS/PlatformAPI/PlatformAPI"], (t) => {
187
- const n = t.getTenant(), s = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
187
+ const s = t.getTenant(), n = t.getUser(), i = t.getAllApplicationConfigurations(), r = t.getApplicationConfiguration(
188
188
  "com.3ds.wp.passport.cors"
189
189
  );
190
190
  e = {
191
- tenant: n,
192
- user: s,
191
+ tenant: s,
192
+ user: n,
193
193
  appsConfiguration: i,
194
194
  appConf: r
195
195
  };
196
196
  }), console.log("%cRETOUR API :", "color:blue", e), e;
197
197
  }
198
- function ve(e, t = void 0, n = void 0) {
198
+ function ve(e, t = void 0, s = void 0) {
199
199
  if (e.tenant) {
200
- const s = `https://${e.tenant}-eu1.iam.3dexperience.3ds.com/api/authenticated/user/me?xrequestedwith=xmlhttprequest`;
201
- m(s, {
200
+ const n = `https://${e.tenant}-eu1.iam.3dexperience.3ds.com/api/authenticated/user/me?xrequestedwith=xmlhttprequest`;
201
+ m(n, {
202
202
  onComplete(i) {
203
203
  const r = typeof i == "string" ? JSON.parse(i) : i;
204
- r && "fields" in r ? t && t(r.fields) : n && n("_getMe return not find properties fields");
204
+ r && "fields" in r ? t && t(r.fields) : s && s("_getMe return not find properties fields");
205
205
  },
206
206
  onFailure(i) {
207
- n && n("_getMe return error", i);
207
+ s && s("_getMe return error", i);
208
208
  }
209
209
  });
210
210
  }
211
211
  }
212
- function M(e, t = void 0, n = void 0) {
213
- if (e.tenant) {
214
- const s = `https://${e.tenant}-eu1-apps.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?tenant=${e.tenant}&cors=true&xrequestedwith=xmlhttprequest`;
215
- m(s, {
212
+ function M(e, t = void 0, s = void 0) {
213
+ if (console.log("_getServiceUrl"), e.tenant) {
214
+ const n = `https://${e.tenant.toLowerCase()}-eu1-compass.3dexperience.3ds.com/enovia/resources/AppsMngt/api/v1/services?platform=${e.tenant.toUpperCase()}&cors=true&xrequestedwith=xmlhttprequest`;
215
+ m(n, {
216
216
  onComplete(i) {
217
217
  const r = typeof i == "string" ? JSON.parse(i) : i;
218
218
  if (r && "platforms" in r) {
219
- const a = r.platforms.find(
220
- (o) => o.id === e.tenant.toUpperCase()
221
- );
222
- t && a ? t(a) : n && n("_getServiceUrl return listServiceUrl = undefined");
219
+ const a = r.platforms.find((o) => o.id === e.tenant.toUpperCase());
220
+ t && a ? t(a) : s && s("_getServiceUrl return listServiceUrl = undefined");
223
221
  } else
224
- n && n("_getServiceUrl return oResponse = undefined");
222
+ s && s("_getServiceUrl return oResponse = undefined");
225
223
  },
226
224
  onFailure(i) {
227
- n && n(i);
225
+ s && s(i);
228
226
  }
229
227
  });
230
228
  }
231
229
  }
232
- function De(e, t = void 0, n = void 0) {
230
+ function De(e, t = void 0, s = void 0) {
233
231
  if (e.tenant) {
234
- const s = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
235
- m(s, {
232
+ const n = `https://${e.tenant}-eu1-registry.3dexperience.3ds.com/api/v1/platform/service/instance?serviceId=3dpassport&platformId=${e.tenant}`;
233
+ m(n, {
236
234
  onComplete(i) {
237
235
  const r = JSON.parse(i);
238
236
  if (console.log("serviceId=3dpassport", r), Array.isArray(r) && r.length > 0) {
@@ -241,18 +239,18 @@ function De(e, t = void 0, n = void 0) {
241
239
  }
242
240
  },
243
241
  onFailure(i) {
244
- n && n(i);
242
+ s && s(i);
245
243
  }
246
244
  });
247
245
  }
248
246
  }
249
- function Ae(e, t, n) {
250
- const s = {
247
+ function Ae(e, t, s) {
248
+ const n = {
251
249
  base: `${e.space}`,
252
250
  uri: "/resources/AppsMngt/api/custom/applications",
253
251
  option: `?filter=${e.tenant}`
254
252
  // facultatif
255
- }, i = `${s.base}${s.uri}${s.option}`;
253
+ }, i = `${n.base}${n.uri}${n.option}`;
256
254
  m(i, {
257
255
  method: "GET",
258
256
  headers: {
@@ -268,33 +266,33 @@ function Ae(e, t, n) {
268
266
  },
269
267
  onFailure(r, a) {
270
268
  const o = r;
271
- o.msg = a.errormsg, o.errCode = a.errorcode, n && n(o);
269
+ o.msg = a.errormsg, o.errCode = a.errorcode, s && s(o);
272
270
  }
273
271
  });
274
272
  }
275
- function Pe(e, t = void 0, n = void 0) {
276
- let s = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
277
- m(s, {
273
+ function Pe(e, t = void 0, s = void 0) {
274
+ let n = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&limit=-1`;
275
+ m(n, {
278
276
  onComplete(i, r, a) {
279
277
  const o = JSON.parse(i);
280
278
  console.log("_AppMngt_get_users => ", o), t && t(o);
281
279
  },
282
280
  onFailure(i, r) {
283
281
  const a = i;
284
- a.msg = r.errormsg, a.errCode = r.errorcode, n && n(a);
282
+ a.msg = r.errormsg, a.errCode = r.errorcode, s && s(a);
285
283
  }
286
284
  });
287
285
  }
288
- function Le(e, t, n = void 0, s = void 0) {
286
+ function Le(e, t, s = void 0, n = void 0) {
289
287
  let i = `${e.space}/resources/AppsMngt/user?platform=${e.tenant}&id=${t}`;
290
288
  m(i, {
291
289
  onComplete(r, a, o) {
292
290
  const c = JSON.parse(r);
293
- n && n(c);
291
+ s && s(c);
294
292
  },
295
293
  onFailure(r, a) {
296
294
  const o = r;
297
- o.msg = a.errormsg, o.errCode = a.errorcode, s && s(o);
295
+ o.msg = a.errormsg, o.errCode = a.errorcode, n && n(o);
298
296
  }
299
297
  });
300
298
  }
@@ -302,7 +300,7 @@ const j = {
302
300
  "Content-Type": "application/json",
303
301
  Accept: "application/json,text/javascript,*/*"
304
302
  };
305
- function Me(e, t, n = void 0, s = void 0) {
303
+ function Me(e, t, s = void 0, n = void 0) {
306
304
  const { space: i, currentUser: r } = e, o = `${i}${{
307
305
  URIUGr: "/3drdfpersist/resources/v1/usersgroup"
308
306
  }.URIUGr}`, c = {
@@ -322,16 +320,16 @@ function Me(e, t, n = void 0, s = void 0) {
322
320
  headers: j,
323
321
  data: JSON.stringify(c),
324
322
  onComplete(d) {
325
- n && n(JSON.parse(d));
323
+ s && s(JSON.parse(d));
326
324
  },
327
325
  onFailure(d, u) {
328
326
  console.log(d);
329
327
  const p = d;
330
- p.msg = u.errormsg, p.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", p), s && s(p);
328
+ p.msg = u.errormsg, p.errCode = u.errorcode, console.log("❌ sendDirectMessage => ", p), n && n(p);
331
329
  }
332
330
  });
333
331
  }
334
- function Je(e, t, n = void 0, s = void 0) {
332
+ function Je(e, t, s = void 0, n = void 0) {
335
333
  const { space: i, tenant: r } = e, a = i, o = `/3drdfpersist/v1/resources/${t}`, c = `?$mask=dsaccess:Mask.GroupUI.Properties&tenant=dstenant:${r}`, d = `${a}${o}${c}`;
336
334
  m(d, {
337
335
  opts: {
@@ -342,16 +340,16 @@ function Je(e, t, n = void 0, s = void 0) {
342
340
  }
343
341
  },
344
342
  onComplete(f) {
345
- n && n(JSON.parse(f));
343
+ s && s(JSON.parse(f));
346
344
  },
347
345
  onFailure(f, l) {
348
346
  const h = f;
349
- h.msg = l.errormsg, h.errCode = l.errorcode, s && s(h);
347
+ h.msg = l.errormsg, h.errCode = l.errorcode, n && n(h);
350
348
  }
351
349
  });
352
350
  }
353
- function ee(e, t = void 0, n = void 0) {
354
- const { space: s, tenant: i } = e, r = s, a = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", o = `?tenant=dstenant:${i}`, c = {
351
+ function ee(e, t = void 0, s = void 0) {
352
+ const { space: n, tenant: i } = e, r = n, a = "/3drdfpersist/resources/v1/option-sets/dsusergroup:ListOfGroupResponsibilities/options", o = `?tenant=dstenant:${i}`, c = {
355
353
  method: "GET",
356
354
  Accept: "application/json,*/*,test/javascript"
357
355
  }, d = `${r}${a}${o}`;
@@ -362,12 +360,12 @@ function ee(e, t = void 0, n = void 0) {
362
360
  },
363
361
  onFailure(u, p) {
364
362
  const f = u;
365
- f.msg = p.errormsg, f.errCode = p.errorcode, n && n(f);
363
+ f.msg = p.errormsg, f.errCode = p.errorcode, s && s(f);
366
364
  }
367
365
  });
368
366
  }
369
- function Ge(e, t = void 0, n = void 0) {
370
- const { space: s, currentUser: i } = e, o = `${s}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
367
+ function Ge(e, t = void 0, s = void 0) {
368
+ const { space: n, currentUser: i } = e, o = `${n}/3drdfpersist/resources/v1/usersgroup?select=uri,title,description,owner,members,pending_members,creation_date,modification_date,visibility`, d = { method: "GET", headers: {
371
369
  "Content-Type": "application/json",
372
370
  Accept: "application/json,text/javascript,*/*"
373
371
  } };
@@ -377,20 +375,20 @@ function Ge(e, t = void 0, n = void 0) {
377
375
  onComplete(u) {
378
376
  const p = JSON.parse(u), f = {}, l = p.groups.filter((h) => h.uri.startsWith("uuid:"));
379
377
  if (i && Object.keys(i).length > 0) {
380
- const h = l.filter((_) => _.owner === i.email), g = l.filter((_) => _.members.includes(i.email)), y = h.concat(g);
381
- f.iam = y, f.UG = l, f.iamMember = g, ee(
378
+ const h = l.filter((y) => y.owner === i.email), g = l.filter((y) => y.members.includes(i.email)), _ = h.concat(g);
379
+ f.iam = _, f.UG = l, f.iamMember = g, ee(
382
380
  e,
383
- (_) => {
384
- f.rules = _, t && t(f);
381
+ (y) => {
382
+ f.rules = y, t && t(f);
385
383
  },
386
- (_) => {
387
- n && n(_);
384
+ (y) => {
385
+ s && s(y);
388
386
  }
389
387
  );
390
388
  }
391
389
  },
392
390
  onFailure(u) {
393
- n && n(u);
391
+ s && s(u);
394
392
  }
395
393
  });
396
394
  } catch (u) {
@@ -398,12 +396,12 @@ function Ge(e, t = void 0, n = void 0) {
398
396
  }
399
397
  }
400
398
  function Ke(e, t) {
401
- const { space: n } = e, i = `${n}/3drdfpersist/resources/v1/usersgroup/${t}`;
399
+ const { space: s } = e, i = `${s}/3drdfpersist/resources/v1/usersgroup/${t}`;
402
400
  m(i, {
403
401
  method: "DELETE"
404
402
  });
405
403
  }
406
- function Be(e, t, n, s = void 0, i = void 0) {
404
+ function Be(e, t, s, n = void 0, i = void 0) {
407
405
  const { space: r, tenant: a } = e, o = {
408
406
  URITI: "/3drdfpersist/resources/v1/template-instances",
409
407
  URIUGr: "/3drdfpersist/resources/v1/usersgroup",
@@ -412,36 +410,36 @@ function Be(e, t, n, s = void 0, i = void 0) {
412
410
  nexURImem: "/members",
413
411
  OPTsTI: "?$mask=dsaccess:Mask.GroupUI.Properties",
414
412
  OPTsTenant: `tenant=dstenant:${a}`
415
- }, c = n, d = `${r}${o.URIUGr}/${t}`, u = JSON.stringify(c);
413
+ }, c = s, d = `${r}${o.URIUGr}/${t}`, u = JSON.stringify(c);
416
414
  m(d, {
417
415
  headers: j,
418
416
  method: "PATCH",
419
417
  data: u,
420
418
  type: "json",
421
419
  onComplete(p) {
422
- s && s(p);
420
+ n && n(p);
423
421
  },
424
422
  onFailure(p) {
425
423
  i && i(p);
426
424
  }
427
425
  });
428
426
  }
429
- function qe(e, t, n, s = void 0, i = void 0) {
427
+ function qe(e, t, s, n = void 0, i = void 0) {
430
428
  const { space: r } = e, o = `${r}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
431
429
  m(o, {
432
430
  method: "PATCH",
433
431
  headers: j,
434
- data: JSON.stringify(n),
432
+ data: JSON.stringify(s),
435
433
  type: "json",
436
434
  onComplete(d) {
437
- s && s(d);
435
+ n && n(d);
438
436
  },
439
437
  onFailure(d) {
440
438
  i && i(d);
441
439
  }
442
440
  });
443
441
  }
444
- function Ee(e, t, n = void 0, s = void 0) {
442
+ function Ee(e, t, s = void 0, n = void 0) {
445
443
  const { space: i } = e, a = `${i}/3drdfpersist/resources/v1/usersgroup/${t}/sharing`;
446
444
  m(a, {
447
445
  opts: {
@@ -452,22 +450,22 @@ function Ee(e, t, n = void 0, s = void 0) {
452
450
  }
453
451
  },
454
452
  onComplete(d) {
455
- n && n(JSON.parse(d));
453
+ s && s(JSON.parse(d));
456
454
  },
457
455
  onFailure(d) {
458
- s && s(d);
456
+ n && n(d);
459
457
  }
460
458
  });
461
459
  }
462
- async function te(e, t, n) {
460
+ async function te(e, t, s) {
463
461
  if (e.space) {
464
- const s = `${e.space}/resources/v1/application/CSRF`;
465
- m(s, {
462
+ const n = `${e.space}/resources/v1/application/CSRF`;
463
+ m(n, {
466
464
  onComplete(i) {
467
465
  i = JSON.parse(i), t && t(i.csrf);
468
466
  },
469
467
  onFailure(i, r, a) {
470
- n && n({ error: i, headers: r, xhr: a });
468
+ s && s({ error: i, headers: r, xhr: a });
471
469
  }
472
470
  });
473
471
  }
@@ -476,19 +474,19 @@ var x = {};
476
474
  function ne(e, t) {
477
475
  return Object.prototype.hasOwnProperty.call(e, t);
478
476
  }
479
- var se = function(e, t, n, s) {
480
- t = t || "&", n = n || "=";
477
+ var se = function(e, t, s, n) {
478
+ t = t || "&", s = s || "=";
481
479
  var i = {};
482
480
  if (typeof e != "string" || e.length === 0)
483
481
  return i;
484
482
  var r = /\+/g;
485
483
  e = e.split(t);
486
484
  var a = 1e3;
487
- s && typeof s.maxKeys == "number" && (a = s.maxKeys);
485
+ n && typeof n.maxKeys == "number" && (a = n.maxKeys);
488
486
  var o = e.length;
489
487
  a > 0 && o > a && (o = a);
490
488
  for (var c = 0; c < o; ++c) {
491
- var d = e[c].replace(r, "%20"), u = d.indexOf(n), p, f, l, h;
489
+ var d = e[c].replace(r, "%20"), u = d.indexOf(s), p, f, l, h;
492
490
  u >= 0 ? (p = d.substr(0, u), f = d.substr(u + 1)) : (p = d, f = ""), l = decodeURIComponent(p), h = decodeURIComponent(f), ne(i, l) ? Array.isArray(i[l]) ? i[l].push(h) : i[l] = [i[l], h] : i[l] = h;
493
491
  }
494
492
  return i;
@@ -503,17 +501,17 @@ var se = function(e, t, n, s) {
503
501
  default:
504
502
  return "";
505
503
  }
506
- }, ie = function(e, t, n, s) {
507
- return t = t || "&", n = n || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
508
- var r = encodeURIComponent(N(i)) + n;
504
+ }, ie = function(e, t, s, n) {
505
+ return t = t || "&", s = s || "=", e === null && (e = void 0), typeof e == "object" ? Object.keys(e).map(function(i) {
506
+ var r = encodeURIComponent(N(i)) + s;
509
507
  return Array.isArray(e[i]) ? e[i].map(function(a) {
510
508
  return r + encodeURIComponent(N(a));
511
509
  }).join(t) : r + encodeURIComponent(N(e[i]));
512
- }).filter(Boolean).join(t) : s ? encodeURIComponent(N(s)) + n + encodeURIComponent(N(e)) : "";
510
+ }).filter(Boolean).join(t) : n ? encodeURIComponent(N(n)) + s + encodeURIComponent(N(e)) : "";
513
511
  };
514
512
  x.decode = x.parse = se;
515
513
  x.encode = x.stringify = ie;
516
- async function J(e, t = void 0, n = void 0, s = void 0) {
514
+ async function J(e, t = void 0, s = void 0, n = void 0) {
517
515
  const i = e.space;
518
516
  if (t === void 0) {
519
517
  console.log("Le paramètre docid est obligatoire");
@@ -523,14 +521,14 @@ async function J(e, t = void 0, n = void 0, s = void 0) {
523
521
  m(r, {
524
522
  onComplete(a, o, c) {
525
523
  const d = JSON.parse(a);
526
- n && n(d);
524
+ s && s(d);
527
525
  },
528
526
  onFailure(a) {
529
- s && s(a);
527
+ n && n(a);
530
528
  }
531
529
  });
532
530
  }
533
- async function Xe(e, t = void 0, n = void 0, s = void 0) {
531
+ async function Xe(e, t = void 0, s = void 0, n = void 0) {
534
532
  const i = e.space;
535
533
  if (t === void 0) {
536
534
  console.log("Le paramètre docids est obligatoire");
@@ -547,46 +545,46 @@ async function Xe(e, t = void 0, n = void 0, s = void 0) {
547
545
  data: a,
548
546
  onComplete(o, c, d) {
549
547
  const u = JSON.parse(o);
550
- n && n(u);
548
+ s && s(u);
551
549
  },
552
550
  onFailure(o) {
553
- s && s(o);
551
+ n && n(o);
554
552
  }
555
553
  });
556
554
  }
557
- function I(e, t = void 0, n = void 0) {
555
+ function I(e, t = void 0, s = void 0) {
558
556
  if (e.objID && e.objID !== "") {
559
- let s = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
560
- m(s, {
557
+ let n = `${e.space}/resources/v1/modeler/documents/${e.objID}`;
558
+ m(n, {
561
559
  onComplete(i, r, a) {
562
560
  const o = JSON.parse(i);
563
561
  e.success = !0, e.token = o?.csrf?.value, e.datas = o?.data[0], t && t(e);
564
562
  },
565
563
  onFailure(i) {
566
- n && n(i);
564
+ s && s(i);
567
565
  }
568
566
  });
569
567
  } else
570
568
  b(
571
569
  e,
572
- (s) => {
573
- console.log("_3DSpace_get_csrf / _3DSpace_csrf", s), t && t(s);
570
+ (n) => {
571
+ console.log("_3DSpace_get_csrf / _3DSpace_csrf", n), t && t(n);
574
572
  },
575
- (s) => {
576
- n && n(s);
573
+ (n) => {
574
+ s && s(n);
577
575
  }
578
576
  );
579
577
  }
580
- function b(e, t = void 0, n = void 0) {
578
+ function b(e, t = void 0, s = void 0) {
581
579
  if (e.space) {
582
- const s = e.space + "/resources/v1/application/CSRF";
583
- m(s, {
580
+ const n = e.space + "/resources/v1/application/CSRF";
581
+ m(n, {
584
582
  onComplete(i, r, a) {
585
583
  const o = JSON.parse(i);
586
584
  t && t(o.csrf.value);
587
585
  },
588
586
  onFailure(i, r, a) {
589
- n && n({
587
+ s && s({
590
588
  response: i,
591
589
  headers: r,
592
590
  xhr: a
@@ -594,14 +592,14 @@ function b(e, t = void 0, n = void 0) {
594
592
  }
595
593
  });
596
594
  } else
597
- n && n("ERROR : url du 3DSpace non défini.");
595
+ s && s("ERROR : url du 3DSpace non défini.");
598
596
  }
599
- function k(e, t = void 0, n = void 0) {
600
- let s = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
597
+ function k(e, t = void 0, s = void 0) {
598
+ let n = e.space + `/resources/v1/modeler/documents/${e.objID}/files/DownloadTicket`;
601
599
  I(
602
600
  e,
603
601
  (i) => {
604
- m(s, {
602
+ m(n, {
605
603
  method: "PUT",
606
604
  headers: {
607
605
  ENO_CSRF_TOKEN: e.token
@@ -611,28 +609,28 @@ function k(e, t = void 0, n = void 0) {
611
609
  t && t(c, a);
612
610
  },
613
611
  onFailure(r, a) {
614
- console.warn("☠️ error => ", r, a), n && n(r, a);
612
+ console.warn("☠️ error => ", r, a), s && s(r, a);
615
613
  }
616
614
  });
617
615
  },
618
616
  (i) => {
619
- console.warn("_3DSpace_get_ticket / error => ", i), n && n(i);
617
+ console.warn("_3DSpace_get_ticket / error => ", i), s && s(i);
620
618
  }
621
619
  );
622
620
  }
623
- function We(e, t, n = void 0, s = void 0, i = void 0) {
621
+ function We(e, t, s = void 0, n = void 0, i = void 0) {
624
622
  const r = `${e.space}/resources/v1/modeler/documents/${t}/files/DownloadTicket`;
625
- n || (n = e.token), m(r, {
623
+ s || (s = e.token), m(r, {
626
624
  method: "PUT",
627
625
  headers: {
628
- ENO_CSRF_TOKEN: n
626
+ ENO_CSRF_TOKEN: s
629
627
  },
630
628
  onComplete(a) {
631
629
  let o = JSON.parse(a);
632
630
  if (console.log("☠️ info => ", o), o.success === !0)
633
631
  try {
634
632
  const c = o.data[0].dataelements.ticketURL;
635
- s && s(c);
633
+ n && n(c);
636
634
  } catch (c) {
637
635
  i && i(c);
638
636
  }
@@ -642,12 +640,12 @@ function We(e, t, n = void 0, s = void 0, i = void 0) {
642
640
  }
643
641
  });
644
642
  }
645
- function G(e, t, n, s, i, r = void 0, a = void 0) {
643
+ function G(e, t, s, n, i, r = void 0, a = void 0) {
646
644
  const o = () => ae(
647
645
  e,
648
646
  t,
649
- n,
650
647
  s,
648
+ n,
651
649
  i,
652
650
  e.token,
653
651
  r,
@@ -661,7 +659,7 @@ function G(e, t, n, s, i, r = void 0, a = void 0) {
661
659
  }
662
660
  );
663
661
  }
664
- function ae(e, t, n, s, i, r, a = void 0, o = void 0) {
662
+ function ae(e, t, s, n, i, r, a = void 0, o = void 0) {
665
663
  const c = e.space + `/resources/v1/modeler/documents/${t}/files/CheckinTicket`;
666
664
  m(c, {
667
665
  method: "PUT",
@@ -671,11 +669,11 @@ function ae(e, t, n, s, i, r, a = void 0, o = void 0) {
671
669
  onComplete(d, u, p) {
672
670
  const f = JSON.parse(d).csrf, l = JSON.parse(d).data[0].dataelements, h = new FormData();
673
671
  let g;
674
- s instanceof Blob ? g = s : g = new Blob([s], {
672
+ n instanceof Blob ? g = n : g = new Blob([n], {
675
673
  type: "text/plain"
676
674
  }), h.append("__fcs__jobTicket", l.ticket), h.append("file_0", g, i);
677
- const y = {};
678
- y.method = "POST", y.data = h, y.onComplete = function(_) {
675
+ const _ = {};
676
+ _.method = "POST", _.data = h, _.onComplete = function(y) {
679
677
  let S = {
680
678
  method: "PUT",
681
679
  headers: {
@@ -690,7 +688,7 @@ function ae(e, t, n, s, i, r, a = void 0, o = void 0) {
690
688
  {
691
689
  dataelements: {
692
690
  title: i,
693
- receipt: _
691
+ receipt: y
694
692
  },
695
693
  updateAction: "REVISE"
696
694
  }
@@ -713,15 +711,19 @@ function ae(e, t, n, s, i, r, a = void 0, o = void 0) {
713
711
  e.space + `/resources/v1/modeler/documents/?$include=versions&tenant=${w}&e6w-lang=en&e6w-timezone=-120&xrequestedwith=xmlhttprequest`,
714
712
  S
715
713
  );
716
- }, y.onFailure = function(_) {
717
- o && o(_);
718
- }, y.timeout = 0, m(l.ticketURL, y);
714
+ }, _.onFailure = function(y) {
715
+ o && o(y);
716
+ }, _.timeout = 0, m(l.ticketURL, _);
719
717
  }
720
718
  });
721
719
  }
722
- async function Ve(e, t, n = void 0, s = void 0) {
720
+ async function Ve(e, t, s = void 0, n = void 0) {
723
721
  e.space, e.token, e.ctx;
724
722
  const i = e?.description, r = e?.title;
723
+ if (!t) {
724
+ console.warn("Error: docId undefined"), n && n("Error: docId undefined");
725
+ return;
726
+ }
725
727
  let a = `${e.space}/resources/v1/modeler/documents/${t}`;
726
728
  const o = JSON.stringify({
727
729
  data: [
@@ -741,20 +743,20 @@ async function Ve(e, t, n = void 0, s = void 0) {
741
743
  data: o,
742
744
  type: "json",
743
745
  onComplete(c) {
744
- n && n(c);
746
+ s && s(c);
745
747
  },
746
748
  onFailure(c) {
747
- s && s(c);
749
+ n && n(c);
748
750
  }
749
751
  });
750
752
  }
751
- async function Ye(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0) {
753
+ async function Ye(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0) {
752
754
  let { tenant: a, cs_name: o } = e;
753
755
  if (!a && !o) {
754
756
  i && i("Credentials undefined");
755
757
  return;
756
758
  }
757
- if (!t && !n) {
759
+ if (!t && !s) {
758
760
  i && i("Définition du fichier undefined");
759
761
  return;
760
762
  }
@@ -779,10 +781,10 @@ async function Ye(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
779
781
  onComplete(l, h, g) {
780
782
  try {
781
783
  if (l = JSON.parse(l), l?.ticket) {
782
- const { ticket: y, actionurl: _, jobticket: S } = l;
784
+ const { ticket: _, actionurl: y, jobticket: S } = l;
783
785
  K(
784
- { dataelements: { ticket: y, ticketURL: _ } },
785
- n,
786
+ { dataelements: { ticket: _, ticketURL: y } },
787
+ s,
786
788
  t,
787
789
  (w) => {
788
790
  const R = new DOMParser().parseFromString(
@@ -818,7 +820,7 @@ async function Ye(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
818
820
  data: D,
819
821
  type: "json",
820
822
  onComplete(F, Ce, Te) {
821
- s && s(F);
823
+ n && n(F);
822
824
  },
823
825
  onFailure(F) {
824
826
  console.warn(
@@ -836,8 +838,8 @@ async function Ye(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
836
838
  }
837
839
  );
838
840
  }
839
- } catch (y) {
840
- i && i(y);
841
+ } catch (_) {
842
+ i && i(_);
841
843
  }
842
844
  },
843
845
  onFailure(l) {
@@ -854,7 +856,7 @@ async function Ye(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
854
856
  }
855
857
  );
856
858
  }
857
- async function He(e, t, n, s = void 0, i = void 0) {
859
+ async function He(e, t, s, n = void 0, i = void 0) {
858
860
  e.space, e.token, e.ctx, J(
859
861
  e,
860
862
  t,
@@ -864,10 +866,10 @@ async function He(e, t, n, s = void 0, i = void 0) {
864
866
  e,
865
867
  t,
866
868
  a,
867
- n,
869
+ s,
868
870
  o,
869
871
  (c) => {
870
- s && s(c);
872
+ n && n(c);
871
873
  },
872
874
  (c) => {
873
875
  i && i(c);
@@ -879,7 +881,7 @@ async function He(e, t, n, s = void 0, i = void 0) {
879
881
  }
880
882
  );
881
883
  }
882
- async function ze(e, t, n, s, i = void 0, r = void 0) {
884
+ async function ze(e, t, s, n, i = void 0, r = void 0) {
883
885
  oe(
884
886
  e,
885
887
  (a) => {
@@ -887,13 +889,13 @@ async function ze(e, t, n, s, i = void 0, r = void 0) {
887
889
  K(
888
890
  o,
889
891
  t,
890
- n,
892
+ s,
891
893
  (c) => {
892
894
  re(
893
895
  e,
894
896
  c,
895
- n,
896
897
  s,
898
+ n,
897
899
  (d) => {
898
900
  d?.data.length ? i && i(d) : r && r({
899
901
  success: !1,
@@ -910,10 +912,10 @@ async function ze(e, t, n, s, i = void 0, r = void 0) {
910
912
  (a) => console.warn(a)
911
913
  );
912
914
  }
913
- function oe(e, t = void 0, n = void 0) {
915
+ function oe(e, t = void 0, s = void 0) {
914
916
  if (e?.space && e.token && e.ctx) {
915
- let s = `${e.space}/resources/v1/modeler/documents/files/CheckinTicket`;
916
- m(s, {
917
+ let n = `${e.space}/resources/v1/modeler/documents/files/CheckinTicket`;
918
+ m(n, {
917
919
  method: "PUT",
918
920
  headers: {
919
921
  ENO_CSRF_TOKEN: e.token,
@@ -929,17 +931,17 @@ function oe(e, t = void 0, n = void 0) {
929
931
  t && t(i);
930
932
  },
931
933
  onFailure(i) {
932
- n && n(i);
934
+ s && s(i);
933
935
  }
934
936
  });
935
937
  } else
936
938
  console.log("Error de credentials", e);
937
939
  }
938
- function K(e, t, n, s = void 0, i = void 0, r = void 0) {
940
+ function K(e, t, s, n = void 0, i = void 0, r = void 0) {
939
941
  let a = new FormData();
940
942
  t instanceof Blob || (t = new Blob([t], {
941
943
  type: "text/plain"
942
- })), a.append("__fcs__jobTicket", e.dataelements.ticket), a.append("file_0", t, n);
944
+ })), a.append("__fcs__jobTicket", e.dataelements.ticket), a.append("file_0", t, s);
943
945
  let o = e.dataelements.ticketURL;
944
946
  const c = new XMLHttpRequest();
945
947
  c.open("POST", o, !0), c.upload.onprogress = function(d) {
@@ -948,13 +950,13 @@ function K(e, t, n, s = void 0, i = void 0, r = void 0) {
948
950
  r && r(u);
949
951
  }
950
952
  }, c.onload = function() {
951
- c.status === 200 ? s && s(c.responseText.replace(/[\n\r]/g, "")) : i && i(c.statusText);
953
+ c.status === 200 ? n && n(c.responseText.replace(/[\n\r]/g, "")) : i && i(c.statusText);
952
954
  }, c.onerror = function() {
953
955
  i && i(c.statusText);
954
956
  }, c.send(a);
955
957
  }
956
- function re(e, t, n, s = void 0, i = void 0, r = void 0) {
957
- console.log("relatedDocAndFile", { credentials: e, receipt: t, filename: n });
958
+ function re(e, t, s, n = void 0, i = void 0, r = void 0) {
959
+ console.log("relatedDocAndFile", { credentials: e, receipt: t, filename: s });
958
960
  const a = (d) => d.indexOf(".") === -1 ? d : d.split(".").slice(0, -1).join(".");
959
961
  let o = "temp_" + O.now().ts, c = e.space + "/resources/v1/modeler/documents/?e6w-lang=fr&e6w-timezone=-120&xrequestedwith=xmlhttprequest";
960
962
  m(c, {
@@ -970,14 +972,14 @@ function re(e, t, n, s = void 0, i = void 0, r = void 0) {
970
972
  {
971
973
  type: "Document",
972
974
  dataelements: {
973
- title: a(n),
974
- description: s
975
+ title: a(s),
976
+ description: n
975
977
  },
976
978
  relateddata: {
977
979
  files: [
978
980
  {
979
981
  dataelements: {
980
- title: n,
982
+ title: s,
981
983
  receipt: `${t}
982
984
  `
983
985
  }
@@ -1000,7 +1002,7 @@ function re(e, t, n, s = void 0, i = void 0, r = void 0) {
1000
1002
  }
1001
1003
  });
1002
1004
  }
1003
- function U(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, a = !1) {
1005
+ function U(e, t = void 0, s = void 0, n = void 0, i = void 0, r = void 0, a = !1) {
1004
1006
  const o = `${e.space}/resources/modeler/pno/person?current=true&select=preferredcredentials&select=collabspaces`;
1005
1007
  m(o, {
1006
1008
  method: "GET",
@@ -1013,28 +1015,28 @@ function U(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, a = !1
1013
1015
  p = t;
1014
1016
  let g = h.couples;
1015
1017
  g = g.filter(
1016
- (y, _, S) => _ === S.findIndex(
1017
- (w) => w.organization.pid === y.organization.pid && w.role.pid === y.role.pid
1018
+ (_, y, S) => y === S.findIndex(
1019
+ (w) => w.organization.pid === _.organization.pid && w.role.pid === _.role.pid
1018
1020
  )
1019
- ), n && (Array.isArray(n) ? n.forEach((y) => {
1020
- l || g.forEach((_) => {
1021
- if (y === _.role.name && s === _.organization.title)
1022
- l = y, f = s;
1023
- else if (y === _.role.name) {
1021
+ ), s && (Array.isArray(s) ? s.forEach((_) => {
1022
+ l || g.forEach((y) => {
1023
+ if (_ === y.role.name && n === y.organization.title)
1024
+ l = _, f = n;
1025
+ else if (_ === y.role.name) {
1024
1026
  let S = g.filter(
1025
- (w) => w.role.name === y
1027
+ (w) => w.role.name === _
1026
1028
  );
1027
1029
  S.length === 1 ? (l = S[0].role.name, f = S[0].organization.title) : r(S);
1028
1030
  }
1029
1031
  });
1030
- }) : g.forEach((y) => {
1031
- if (n === y.role.name && s === y.organization.title)
1032
- l = n, f = s;
1033
- else if (n === y.role.name) {
1034
- let _ = g.filter(
1035
- (S) => S.role.name === n
1032
+ }) : g.forEach((_) => {
1033
+ if (s === _.role.name && n === _.organization.title)
1034
+ l = s, f = n;
1035
+ else if (s === _.role.name) {
1036
+ let y = g.filter(
1037
+ (S) => S.role.name === s
1036
1038
  );
1037
- _.length === 1 ? (l = _[0].role.name, f = _[0].organization.title) : r(_);
1039
+ y.length === 1 ? (l = y[0].role.name, f = y[0].organization.title) : r(y);
1038
1040
  }
1039
1041
  }));
1040
1042
  }
@@ -1049,29 +1051,29 @@ function U(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, a = !1
1049
1051
  }
1050
1052
  });
1051
1053
  }
1052
- async function B(e, t = void 0, n = void 0) {
1054
+ async function B(e, t = void 0, s = void 0) {
1053
1055
  return (!e.objID || e.objID === "") && (console.warn(
1054
1056
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
1055
- ), n && n(
1057
+ ), s && s(
1056
1058
  "_3DSpace_download_doc() / Le paramètre objectId est obligatoire"
1057
1059
  )), (e.space === "" || !e.space) && (console.warn(
1058
1060
  "_3DSpace_download_doc() / Le paramètre space est obligatoire"
1059
- ), n && n("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) && te(
1061
+ ), s && s("_3DSpace_download_doc() / Le paramètre space est obligatoire")), (e.token === "" || !e.token) && te(
1060
1062
  e,
1061
- (s) => {
1062
- e.token = s;
1063
+ (n) => {
1064
+ e.token = n;
1063
1065
  },
1064
- (s) => {
1065
- console.log("☠️ error => ", s);
1066
+ (n) => {
1067
+ console.log("☠️ error => ", n);
1066
1068
  }
1067
- ), new Promise((s, i) => {
1069
+ ), new Promise((n, i) => {
1068
1070
  k(
1069
1071
  e,
1070
1072
  (r) => {
1071
1073
  e?.returnType === "blob" ? (console.log("ticketURL blob", r), fetch(r).then((a) => a.blob()).then((a) => {
1072
1074
  t && t(a);
1073
1075
  }).catch((a) => {
1074
- n && n(a);
1076
+ s && s(a);
1075
1077
  })) : m(r, {
1076
1078
  onComplete(a) {
1077
1079
  let o;
@@ -1080,10 +1082,10 @@ async function B(e, t = void 0, n = void 0) {
1080
1082
  } catch {
1081
1083
  o = a;
1082
1084
  }
1083
- t && typeof t == "function" && t(o), s(o);
1085
+ t && typeof t == "function" && t(o), n(o);
1084
1086
  },
1085
1087
  onFailure(a, o, c) {
1086
- n && (console.log("error http", a), n({
1088
+ s && (console.log("error http", a), s({
1087
1089
  msg: JSON.parse(a),
1088
1090
  headers: o,
1089
1091
  xhr: c
@@ -1096,26 +1098,26 @@ async function B(e, t = void 0, n = void 0) {
1096
1098
  });
1097
1099
  },
1098
1100
  (r) => {
1099
- n && n(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
1101
+ s && s(r), console.log("*_3dspace_download_doc / error file URL *", r), i(r);
1100
1102
  }
1101
1103
  );
1102
1104
  });
1103
1105
  }
1104
- async function ce(e, t, n = void 0, s = void 0) {
1106
+ async function ce(e, t, s = void 0, n = void 0) {
1105
1107
  typeof t < "u" && Array.isArray(t) && t?.length > 0 ? z({
1106
1108
  credentials: e,
1107
1109
  myArray: t,
1108
1110
  chunk: 80,
1109
1111
  fn_to_call: de
1110
1112
  }, (r) => {
1111
- n && n(r);
1113
+ s && s(r);
1112
1114
  }) : (console.warn(
1113
1115
  "La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
1114
- ), s && s(
1116
+ ), n && n(
1115
1117
  "La liste d'objects dans la fonction _3DSpace_download_multidoc est vide ou non défini."
1116
1118
  ));
1117
1119
  }
1118
- function de(e, t, n = void 0, s = void 0, i = void 0) {
1120
+ function de(e, t, s = void 0, n = void 0, i = void 0) {
1119
1121
  const r = [];
1120
1122
  t.forEach((c) => {
1121
1123
  r.push({
@@ -1136,7 +1138,7 @@ function de(e, t, n = void 0, s = void 0, i = void 0) {
1136
1138
  type: "json",
1137
1139
  onComplete(c) {
1138
1140
  const d = c.data;
1139
- c.success === !0 && (n && n(), d.forEach((u) => {
1141
+ c.success === !0 && (s && s(), d.forEach((u) => {
1140
1142
  try {
1141
1143
  const p = u.dataelements.fileName, f = u.dataelements.ticketURL;
1142
1144
  m(f, {
@@ -1147,7 +1149,7 @@ function de(e, t, n = void 0, s = void 0, i = void 0) {
1147
1149
  } catch {
1148
1150
  g = l.blob();
1149
1151
  }
1150
- s && s({
1152
+ n && n({
1151
1153
  objectId: u.id,
1152
1154
  headers: h,
1153
1155
  fileName: p,
@@ -1168,7 +1170,7 @@ function de(e, t, n = void 0, s = void 0, i = void 0) {
1168
1170
  }
1169
1171
  });
1170
1172
  }
1171
- function Qe(e, t, n = void 0, s = void 0) {
1173
+ function Qe(e, t, s = void 0, n = void 0) {
1172
1174
  return new Promise((i) => {
1173
1175
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1174
1176
  const r = `${e.space}/resources/v1/modeler/dslc/maturity/getNextStates`;
@@ -1189,17 +1191,17 @@ function Qe(e, t, n = void 0, s = void 0) {
1189
1191
  }),
1190
1192
  type: "json",
1191
1193
  onComplete(o) {
1192
- n && n(o);
1194
+ s && s(o);
1193
1195
  },
1194
1196
  onFailure(o) {
1195
- s && s(o);
1197
+ n && n(o);
1196
1198
  }
1197
1199
  };
1198
1200
  m(r, a);
1199
1201
  }
1200
1202
  });
1201
1203
  }
1202
- function Ze(e, t, n, s = void 0, i = void 0) {
1204
+ function Ze(e, t, s, n = void 0, i = void 0) {
1203
1205
  return new Promise((r) => {
1204
1206
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1205
1207
  const a = `${e.space}/resources/v1/modeler/dslc/maturity/changeState`;
@@ -1215,13 +1217,13 @@ function Ze(e, t, n, s = void 0, i = void 0) {
1215
1217
  data: [
1216
1218
  {
1217
1219
  id: t,
1218
- nextState: n
1220
+ nextState: s
1219
1221
  }
1220
1222
  ]
1221
1223
  }),
1222
1224
  type: "json",
1223
1225
  onComplete(c) {
1224
- s && s(c);
1226
+ n && n(c);
1225
1227
  },
1226
1228
  onFailure(c) {
1227
1229
  i && i(c);
@@ -1231,7 +1233,7 @@ function Ze(e, t, n, s = void 0, i = void 0) {
1231
1233
  }
1232
1234
  });
1233
1235
  }
1234
- function et(e, t, n = void 0, s = void 0) {
1236
+ function et(e, t, s = void 0, n = void 0) {
1235
1237
  return new Promise((i) => {
1236
1238
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1237
1239
  const r = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=0&withAttributes=0&withCopyFrom=0&tenant=${e.tenant}`;
@@ -1262,17 +1264,17 @@ function et(e, t, n = void 0, s = void 0) {
1262
1264
  }),
1263
1265
  type: "json",
1264
1266
  onComplete(o) {
1265
- n && n(o);
1267
+ s && s(o);
1266
1268
  },
1267
1269
  onFailure(o) {
1268
- s && s(o);
1270
+ n && n(o);
1269
1271
  }
1270
1272
  };
1271
1273
  m(r, a);
1272
1274
  }
1273
1275
  });
1274
1276
  }
1275
- function tt(e, t, n = void 0, s = void 0) {
1277
+ function tt(e, t, s = void 0, n = void 0) {
1276
1278
  return new Promise((i) => {
1277
1279
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1278
1280
  const r = `${e.space}/resources/lifecycle/revise/prepare_revise_maskattributes?tenant=${e.tenant}`;
@@ -1309,17 +1311,17 @@ function tt(e, t, n = void 0, s = void 0) {
1309
1311
  }),
1310
1312
  type: "json",
1311
1313
  onComplete(o) {
1312
- n && n(o);
1314
+ s && s(o);
1313
1315
  },
1314
1316
  onFailure(o) {
1315
- s && s(o);
1317
+ n && n(o);
1316
1318
  }
1317
1319
  };
1318
1320
  m(r, a);
1319
1321
  }
1320
1322
  });
1321
1323
  }
1322
- function nt(e, t, n, s = void 0, i = void 0) {
1324
+ function nt(e, t, s, n = void 0, i = void 0) {
1323
1325
  return new Promise((r) => {
1324
1326
  if (e.token === "" && b(e), t !== void 0 && t !== "" && t !== null) {
1325
1327
  const a = `${e.space}/resources/lifecycle/revise/major?tenant=${e.tenant}`;
@@ -1345,9 +1347,9 @@ function nt(e, t, n, s = void 0, i = void 0) {
1345
1347
  data: [
1346
1348
  {
1347
1349
  physicalid: t,
1348
- proposedRevision: n,
1350
+ proposedRevision: s,
1349
1351
  modifiedAttributes: {
1350
- revision: n
1352
+ revision: s
1351
1353
  }
1352
1354
  }
1353
1355
  ],
@@ -1356,7 +1358,7 @@ function nt(e, t, n, s = void 0, i = void 0) {
1356
1358
  }),
1357
1359
  type: "json",
1358
1360
  onComplete(c) {
1359
- s && s(c);
1361
+ n && n(c);
1360
1362
  },
1361
1363
  onFailure(c) {
1362
1364
  i && i(c);
@@ -1367,26 +1369,28 @@ function nt(e, t, n, s = void 0, i = void 0) {
1367
1369
  });
1368
1370
  }
1369
1371
  function ue(e) {
1370
- return new Promise((t, n) => {
1371
- const s = `${e.space}/resources/pno/person/getsecuritycontext&tenant=${e.tenant.toUpperCase()}&xrequestedwith=xmlhttprequest`;
1372
- m(s, {
1372
+ return new Promise((t, s) => {
1373
+ const n = `${e.space}/resources/pno/person/getsecuritycontext&tenant=${e.tenant.toUpperCase()}&xrequestedwith=xmlhttprequest`;
1374
+ m(n, {
1373
1375
  method: "GET",
1374
1376
  onComplete(r) {
1375
1377
  t(r);
1376
1378
  },
1377
1379
  onFailure(r) {
1378
- n(r);
1380
+ s(r);
1379
1381
  }
1380
1382
  });
1381
1383
  });
1382
1384
  }
1383
- function st(e, t, n = void 0, s = void 0) {
1385
+ function st(e, t, s = void 0, n = void 0) {
1384
1386
  return new Promise(async (i, r) => {
1385
1387
  const { tenant: a, ctx: o, space: c } = e;
1386
1388
  (!a || !o || !c) && r({ error: "Erreur de credentials", tenant: a, ctx: o, space: c });
1387
1389
  const d = `${e.space}/resources/v1/dslc/versiongraph?withThumbnail=0&withIsLastVersion=1&withAttributes=1&withCopyFrom=1&tenant=${e.tenant.toUpperCase()}&xrequestedwith=xmlhttprequest`;
1388
1390
  let u;
1389
- await ue(e).then((f) => u = f?.SecurityContext);
1391
+ await ue(e).then(
1392
+ (f) => u = f?.SecurityContext
1393
+ );
1390
1394
  let p = {
1391
1395
  method: "POST",
1392
1396
  headers: {
@@ -1404,22 +1408,22 @@ function st(e, t, n = void 0, s = void 0) {
1404
1408
  }),
1405
1409
  type: "json",
1406
1410
  onComplete(f) {
1407
- n && n(f), i(f);
1411
+ s && s(f), i(f);
1408
1412
  },
1409
1413
  onFailure(f) {
1410
- s && s(f), r(f);
1414
+ n && n(f), r(f);
1411
1415
  }
1412
1416
  };
1413
1417
  m(d, p);
1414
1418
  });
1415
1419
  }
1416
- function it(e, t, n, s, i = void 0, r = void 0) {
1420
+ function it(e, t, s, n, i = void 0, r = void 0) {
1417
1421
  return new Promise((a) => {
1418
1422
  const o = `${e.space}/resources/v1/modeler/dsbks/dsbks:Bookmark`;
1419
1423
  let c = {
1420
1424
  attributes: {
1421
- title: n,
1422
- description: s,
1425
+ title: s,
1426
+ description: n,
1423
1427
  inheritedAccess: "no"
1424
1428
  }
1425
1429
  }, d = {
@@ -1446,7 +1450,7 @@ function it(e, t, n, s, i = void 0, r = void 0) {
1446
1450
  m(o, u);
1447
1451
  });
1448
1452
  }
1449
- function at(e, t, n, s, i = void 0, r = void 0) {
1453
+ function at(e, t, s, n, i = void 0, r = void 0) {
1450
1454
  return console.log("credentials", e), new Promise((a) => {
1451
1455
  `${e.space}`, JSON.stringify({
1452
1456
  csrf: {
@@ -1460,8 +1464,8 @@ function at(e, t, n, s, i = void 0, r = void 0) {
1460
1464
  relId: t,
1461
1465
  id: t,
1462
1466
  dataelements: {
1463
- personList: n,
1464
- eventsList: s
1467
+ personList: s,
1468
+ eventsList: n
1465
1469
  },
1466
1470
  tenant: e.tenant
1467
1471
  }
@@ -1470,12 +1474,12 @@ function at(e, t, n, s, i = void 0, r = void 0) {
1470
1474
  });
1471
1475
  }
1472
1476
  //!SECTION
1473
- function ot(e, t = void 0, n = void 0) {
1474
- const s = {
1477
+ function ot(e, t = void 0, s = void 0) {
1478
+ const n = {
1475
1479
  base: `${e.space}`,
1476
1480
  uri: "/resources/bps/cspaces",
1477
1481
  optTenant: `tenant=${e.tenant}`
1478
- }, i = `${s.base}${s.uri}?${s.optTenant}`;
1482
+ }, i = `${n.base}${n.uri}?${n.optTenant}`;
1479
1483
  m(i, {
1480
1484
  method: "GET",
1481
1485
  headers: {
@@ -1487,11 +1491,11 @@ function ot(e, t = void 0, n = void 0) {
1487
1491
  t && t(o, a);
1488
1492
  },
1489
1493
  onFailure(r, a, o) {
1490
- n && n({ response: r, headers: a, xhr: o });
1494
+ s && s({ response: r, headers: a, xhr: o });
1491
1495
  }
1492
1496
  });
1493
1497
  }
1494
- function rt(e, t, n, s) {
1498
+ function rt(e, t, s, n) {
1495
1499
  k(
1496
1500
  e.space,
1497
1501
  t,
@@ -1499,85 +1503,88 @@ function rt(e, t, n, s) {
1499
1503
  m(i, {
1500
1504
  header: { ENO_CSRF_TOKEN: e.token },
1501
1505
  onComplete: (r) => {
1502
- n && n(r);
1506
+ s && s(r);
1503
1507
  },
1504
1508
  onFailure: (r) => {
1505
- console.log("error http", r), s && s(r);
1509
+ console.log("error http", r), n && n(r);
1506
1510
  }
1507
1511
  });
1508
1512
  }
1509
1513
  );
1510
1514
  }
1511
- async function ct(e, t, n = void 0, s = void 0) {
1515
+ async function ct(e, t, s = void 0, n = void 0) {
1512
1516
  return new Promise((i) => {
1513
1517
  k(e, t, (r) => {
1514
1518
  m(r, {
1515
- onComplete: (a, o, c) => (i(JSON.parse(a)), n && n(JSON.parse(a), o, c), i),
1519
+ onComplete: (a, o, c) => (i(JSON.parse(a)), s && s(JSON.parse(a), o, c), i),
1516
1520
  onFailure: (a, o, c) => {
1517
- s && s(a, o, c), console.log(a, o?.errormsg);
1521
+ n && n(a, o, c), console.log(a, o?.errormsg);
1518
1522
  }
1519
1523
  });
1520
1524
  });
1521
1525
  });
1522
1526
  }
1523
- function dt(e, t, n, s = void 0, i = void 0) {
1527
+ function dt(e, t, s, n = void 0, i = void 0) {
1524
1528
  const r = new Blob([JSON.stringify(t)], { type: "text/plain" });
1525
- I(
1529
+ e = { ...e, objID: s }, I(
1526
1530
  e,
1527
- n,
1528
1531
  (a) => {
1532
+ console.log("_3DSpace_get_csrf | onDone | data", a);
1529
1533
  const o = a.data[0].relateddata.files[0].id, c = a.data[0].dataelements.secondaryTitle !== "" ? a.data[0].dataelements.secondaryTitle : a.data[0].dataelements.title;
1530
1534
  G(
1531
1535
  e,
1532
- n,
1536
+ s,
1533
1537
  o,
1534
1538
  r,
1535
1539
  c,
1536
1540
  (d) => {
1537
- s && s(d);
1541
+ n && n(d);
1538
1542
  },
1539
1543
  (d) => {
1540
1544
  i && i(d);
1541
1545
  }
1542
1546
  );
1547
+ },
1548
+ (a) => {
1549
+ console.log("En cas d'erreur nous avons :", a), alert("Erreur lors de la sauvegarde, Veuillez réessayez"), i && i(a);
1543
1550
  }
1544
1551
  );
1545
1552
  }
1546
1553
  let q, E;
1547
1554
  const A = [];
1548
- async function ut(e, t = void 0, n = void 0) {
1555
+ async function ut(e, t = void 0, s = void 0) {
1549
1556
  e.objID && e.objID !== "" ? I(
1550
1557
  e,
1551
- (s) => {
1552
- t && t(s);
1558
+ (n) => {
1559
+ t && t(n);
1553
1560
  },
1554
- (s) => {
1555
- n && n(s);
1561
+ (n) => {
1562
+ s && s(n);
1556
1563
  }
1557
1564
  ) : (e.objID === null || e.objID === "") && b(
1558
1565
  e,
1559
- (s) => {
1560
- t && t({ rep: s, msg: "Pas d'objID, ou invalide" });
1566
+ (n) => {
1567
+ t && t({ rep: n, msg: "Pas d'objID, ou invalide" });
1561
1568
  },
1562
- (s) => {
1563
- n && n({ msg: "Pas d'objID et erreur sur le Space", err: s });
1569
+ (n) => {
1570
+ s && s({ msg: "Pas d'objID et erreur sur le Space", err: n });
1564
1571
  }
1565
1572
  );
1566
1573
  }
1567
- async function pt(e, t = void 0, n = void 0) {
1574
+ async function pt(e, t = void 0, s = void 0) {
1568
1575
  console.log("getDatasByTenant (getDocuments)", e), await B(
1569
1576
  e,
1570
- (s) => {
1577
+ (n) => {
1571
1578
  const i = {};
1572
- i.obj = s, console.log("getDatasByTenant (getDocuments) _datas", i), t && t?.(i);
1579
+ i.obj = n, console.log("getDatasByTenant (getDocuments) _datas", i), t && t?.(i);
1573
1580
  },
1574
- (s) => {
1575
- n && n?.(s);
1581
+ (n) => {
1582
+ s && s?.(n);
1576
1583
  }
1577
1584
  );
1578
1585
  }
1579
- function lt(e, t = void 0, n = void 0) {
1580
- const s = [];
1586
+ function lt(e, t = void 0, s = void 0) {
1587
+ const n = [];
1581
1588
  if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
1582
1589
  console.warn("la liste est vide ou n'est pas un tableau");
1583
1590
  return;
@@ -1587,21 +1594,21 @@ function lt(e, t = void 0, n = void 0) {
1587
1594
  e,
1588
1595
  i.objID,
1589
1596
  (a) => {
1590
- s.push({ [i.name]: a }), i.name === "dbProjets" && (q = a.affaires.map((o) => o.objectID), pe(e, E)), r === e.objIds.length - 1 && (t && t(s), delete e.objIds, delete e.datas);
1597
+ n.push({ [i.name]: a }), i.name === "dbProjets" && (q = a.affaires.map((o) => o.objectID), pe(e, E)), r === e.objIds.length - 1 && (t && t(n), delete e.objIds, delete e.datas);
1591
1598
  }
1592
1599
  );
1593
1600
  });
1594
1601
  }
1595
- function pe(e, t, n = void 0, s = void 0) {
1602
+ function pe(e, t, s = void 0, n = void 0) {
1596
1603
  ce(
1597
1604
  e,
1598
1605
  q,
1599
1606
  (i) => {
1600
1607
  const r = [...t];
1601
- r.find((a) => a.objectID === i.objectId).data = i.data, E = r, A.push(i.data), n && n(A);
1608
+ r.find((a) => a.objectID === i.objectId).data = i.data, E = r, A.push(i.data), s && s(A);
1602
1609
  },
1603
1610
  (i) => {
1604
- s && (s(i), console.log(i));
1611
+ n && (n(i), console.log(i));
1605
1612
  }
1606
1613
  );
1607
1614
  }
@@ -1625,7 +1632,7 @@ const le = "FA35FB9B177A280065800EA0000F599C", fe = [
1625
1632
  order_by: "desc",
1626
1633
  tag: "testTag"
1627
1634
  };
1628
- function ft(e, t, n = void 0, s = void 0) {
1635
+ function ft(e, t, s = void 0, n = void 0) {
1629
1636
  const { space: i, tenant: r } = e, { objId: a, pred: o, tag: c } = t, d = {
1630
1637
  uri: "/resources/6w/tags",
1631
1638
  otpCTX: "SecurityContext=preferred",
@@ -1660,32 +1667,32 @@ function ft(e, t, n = void 0, s = void 0) {
1660
1667
  e,
1661
1668
  a,
1662
1669
  (h) => {
1663
- const g = h.data[0].dataelements.title, y = h.data[0].dataelements.fileExtension !== void 0 ? h.data[0].dataelements.fileExtension : "", _ = h.data[0].relateddata.ownerInfo[0].dataelements.name;
1664
- l.name = g, l.ext = y, l.createBy = _, t.info = { ...l }, he(
1670
+ const g = h.data[0].dataelements.title, _ = h.data[0].dataelements.fileExtension !== void 0 ? h.data[0].dataelements.fileExtension : "", y = h.data[0].relateddata.ownerInfo[0].dataelements.name;
1671
+ l.name = g, l.ext = _, l.createBy = y, t.info = { ...l }, he(
1665
1672
  e,
1666
1673
  t,
1667
1674
  (S) => {
1668
- n && n(S);
1675
+ s && s(S);
1669
1676
  },
1670
1677
  (S) => {
1671
- s && s(S);
1678
+ n && n(S);
1672
1679
  }
1673
1680
  );
1674
1681
  },
1675
1682
  (h, g) => {
1676
- const y = h;
1677
- y.msg = g.errormsg, y.errCode = g.errorcode, console.log("❌ sendDirectMessage => ", y), s && s(y);
1683
+ const _ = h;
1684
+ _.msg = g.errormsg, _.errCode = g.errorcode, console.log("❌ sendDirectMessage => ", _), n && n(_);
1678
1685
  }
1679
1686
  );
1680
1687
  }, 2e3);
1681
1688
  },
1682
1689
  onFailure(f, l) {
1683
1690
  const h = f;
1684
- h.msg = l.errormsg, h.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", h), s && s(h);
1691
+ h.msg = l.errormsg, h.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", h), n && n(h);
1685
1692
  }
1686
1693
  });
1687
1694
  }
1688
- function he(e, t, n = void 0, s = void 0) {
1695
+ function he(e, t, s = void 0, n = void 0) {
1689
1696
  console.log("obj ", t);
1690
1697
  const i = t.info.name, r = {
1691
1698
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
@@ -1760,15 +1767,15 @@ function he(e, t, n = void 0, s = void 0) {
1760
1767
  data: JSON.stringify(d),
1761
1768
  onComplete(u) {
1762
1769
  const p = JSON.parse(u);
1763
- n(p);
1770
+ s(p);
1764
1771
  },
1765
1772
  onFailure(u, p) {
1766
1773
  const f = u;
1767
- f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f), console.log("Erreur de recuperation d'id du doc et des tags", u);
1774
+ f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), n && n(f), console.log("Erreur de recuperation d'id du doc et des tags", u);
1768
1775
  }
1769
1776
  });
1770
1777
  }
1771
- function mt(e, t, n = void 0, s = void 0) {
1778
+ function mt(e, t, s = void 0, n = void 0) {
1772
1779
  const { objId: i, pred: r, tag: a } = t, o = {
1773
1780
  uri: "/resources/6w/tags",
1774
1781
  otpCTX: "SecurityContext=preferred",
@@ -1796,15 +1803,15 @@ function mt(e, t, n = void 0, s = void 0) {
1796
1803
  Accept: "application/json,text/javascript,*/*"
1797
1804
  },
1798
1805
  onComplete(u) {
1799
- n && n(u);
1806
+ s && s(u);
1800
1807
  },
1801
1808
  onFailure(u, p) {
1802
1809
  const f = u;
1803
- f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f);
1810
+ f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), n && n(f);
1804
1811
  }
1805
1812
  });
1806
1813
  }
1807
- function ht(e, t = "", n = void 0, s = void 0) {
1814
+ function ht(e, t = "", s = void 0, n = void 0) {
1808
1815
  const { space: i } = e;
1809
1816
  if (t === "")
1810
1817
  return;
@@ -1819,29 +1826,29 @@ function ht(e, t = "", n = void 0, s = void 0) {
1819
1826
  headers: a,
1820
1827
  data: c,
1821
1828
  onComplete(d) {
1822
- n && n(JSON.parse(d));
1829
+ s && s(JSON.parse(d));
1823
1830
  },
1824
1831
  onFailure(d, u) {
1825
1832
  const p = d;
1826
- p.msg = u.error, s && s(p);
1833
+ p.msg = u.error, n && n(p);
1827
1834
  }
1828
1835
  });
1829
1836
  }
1830
- async function C(e, t = void 0, n = void 0) {
1831
- const s = e._3DSwym + "/api/index/tk";
1832
- return m(s, {
1837
+ async function C(e, t = void 0, s = void 0) {
1838
+ const n = e._3DSwym + "/api/index/tk";
1839
+ return m(n, {
1833
1840
  onComplete(i, r, a) {
1834
1841
  const o = JSON.parse(i);
1835
1842
  if (t)
1836
1843
  return t(o), e.token = o?.result?.ServerToken;
1837
1844
  },
1838
1845
  onFailure(i) {
1839
- n && n(i);
1846
+ s && s(i);
1840
1847
  }
1841
1848
  });
1842
1849
  }
1843
- function gt(e, t = void 0, n = void 0) {
1844
- const s = `${e._3DSwym}/api/exalead/whatsnew`, i = {
1850
+ function gt(e, t = void 0, s = void 0) {
1851
+ const n = `${e._3DSwym}/api/exalead/whatsnew`, i = {
1845
1852
  params: {
1846
1853
  community_id: null,
1847
1854
  hash_key: null,
@@ -1852,7 +1859,7 @@ function gt(e, t = void 0, n = void 0) {
1852
1859
  }
1853
1860
  };
1854
1861
  C(e, (r) => {
1855
- m(s, {
1862
+ m(n, {
1856
1863
  method: "POST",
1857
1864
  headers: {
1858
1865
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
@@ -1865,13 +1872,13 @@ function gt(e, t = void 0, n = void 0) {
1865
1872
  t && t(a, o);
1866
1873
  },
1867
1874
  onFailure(a, o) {
1868
- n && n(a, o);
1875
+ s && s(a, o);
1869
1876
  }
1870
1877
  });
1871
1878
  });
1872
1879
  }
1873
- function yt(e, t = void 0, n = void 0) {
1874
- const s = `${e._3DSwym}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
1880
+ function _t(e, t = void 0, s = void 0) {
1881
+ const n = `${e._3DSwym}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
1875
1882
  params: {
1876
1883
  idsToFilterArr: [],
1877
1884
  mode: "offline",
@@ -1881,7 +1888,7 @@ function yt(e, t = void 0, n = void 0) {
1881
1888
  }
1882
1889
  };
1883
1890
  C(e, (r) => {
1884
- m(s, {
1891
+ m(n, {
1885
1892
  method: "POST",
1886
1893
  headers: {
1887
1894
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
@@ -1895,18 +1902,18 @@ function yt(e, t = void 0, n = void 0) {
1895
1902
  t && t(c, a);
1896
1903
  },
1897
1904
  onFailure(a, o) {
1898
- n && n(a, o);
1905
+ s && s(a, o);
1899
1906
  }
1900
1907
  });
1901
1908
  });
1902
1909
  }
1903
- function _t(e, t = void 0, n = void 0) {
1904
- const s = {
1910
+ function yt(e, t = void 0, s = void 0) {
1911
+ const n = {
1905
1912
  base: e._3DSwym,
1906
1913
  uri: "/api/community/listmycommunities",
1907
1914
  limit: `/limit/${e.limit ? e.limit : 500}`,
1908
1915
  page: `/page/${e.page ? e.page : "1"}`
1909
- }, i = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1916
+ }, i = `${n.base}${n.uri}${n.limit}${n.page}`, r = [];
1910
1917
  C(e, (a) => {
1911
1918
  m(i, {
1912
1919
  method: "GET",
@@ -1931,18 +1938,18 @@ function _t(e, t = void 0, n = void 0) {
1931
1938
  (g) => {
1932
1939
  f++, h.members = g, r.push(h), f === p.length && t && t(r);
1933
1940
  },
1934
- (g) => n(g)
1941
+ (g) => s(g)
1935
1942
  );
1936
1943
  });
1937
1944
  },
1938
1945
  onFailure(o, c) {
1939
1946
  const d = o;
1940
- d.status = c.status, d.response = c.errormsg, n && n(d);
1947
+ d.status = c.status, d.response = c.errormsg, s && s(d);
1941
1948
  }
1942
1949
  });
1943
1950
  });
1944
1951
  }
1945
- function ge(e, t, n, s) {
1952
+ function ge(e, t, s, n) {
1946
1953
  const i = `${e._3DSwym}/api/community/listmembers`, r = {
1947
1954
  params: {
1948
1955
  page: e.page ? e.page : 1,
@@ -1961,18 +1968,18 @@ function ge(e, t, n, s) {
1961
1968
  data: JSON.stringify(r),
1962
1969
  type: "json",
1963
1970
  onComplete(o, c, d) {
1964
- n && n(o);
1971
+ s && s(o);
1965
1972
  },
1966
1973
  onFailure(o, c) {
1967
1974
  const d = o;
1968
- d.status = c.status, d.response = c.errormsg, s && s(d);
1975
+ d.status = c.status, d.response = c.errormsg, n && n(d);
1969
1976
  }
1970
1977
  });
1971
1978
  });
1972
1979
  }
1973
- function St(e, t = void 0, n = void 0) {
1974
- const s = "YXdA5x4DSUKtlAi2wmnyTA";
1975
- e.commu_id || (e.commu_id = s);
1980
+ function St(e, t = void 0, s = void 0) {
1981
+ const n = "YXdA5x4DSUKtlAi2wmnyTA";
1982
+ e.commu_id || (e.commu_id = n);
1976
1983
  const i = `${e._3DSwym}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1977
1984
  C(e, (r) => {
1978
1985
  m(i, {
@@ -1988,12 +1995,12 @@ function St(e, t = void 0, n = void 0) {
1988
1995
  },
1989
1996
  onFailure(a, o) {
1990
1997
  const c = a;
1991
- c.status = o.status, c.response = o.errormsg, n && n(c);
1998
+ c.status = o.status, c.response = o.errormsg, s && s(c);
1992
1999
  }
1993
2000
  });
1994
2001
  });
1995
2002
  }
1996
- function wt(e, t, n = void 0, s = void 0) {
2003
+ function wt(e, t, s = void 0, n = void 0) {
1997
2004
  const { listAllContacts: i, currentUser: r, _3DSwym: a } = e;
1998
2005
  console.log("__listAllContacts", i.hits);
1999
2006
  const o = `${a}/api/directmessages`, c = {
@@ -2002,16 +2009,16 @@ function wt(e, t, n = void 0, s = void 0) {
2002
2009
  id_msg: "",
2003
2010
  senderId: e.currentUser.login,
2004
2011
  senderName: `${e.currentUser.first_name} ${e.currentUser.last_name}`,
2005
- msg: _e(t.msg)
2012
+ msg: ye(t.msg)
2006
2013
  };
2007
2014
  let u = !1;
2008
- ye(
2015
+ _e(
2009
2016
  c.users,
2010
2017
  (p) => {
2011
2018
  p !== void 0 && (d.id_msg = p.id, u = !0, P(e, d));
2012
2019
  },
2013
2020
  (p) => {
2014
- u = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), s && s(p), d.id_msg = "";
2021
+ u = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), n && n(p), d.id_msg = "";
2015
2022
  }
2016
2023
  ), u === !1 && setTimeout(() => {
2017
2024
  u === !1 && C(e, (p) => {
@@ -2026,17 +2033,17 @@ function wt(e, t, n = void 0, s = void 0) {
2026
2033
  type: "json",
2027
2034
  onComplete(f, l, h) {
2028
2035
  const g = f;
2029
- g.reponse = JSON.parse(h.response), g.status = h.status, n && n(g), d.id_msg = g.result.id, P(e, d);
2036
+ g.reponse = JSON.parse(h.response), g.status = h.status, s && s(g), d.id_msg = g.result.id, P(e, d);
2030
2037
  },
2031
2038
  onFailure(f, l, h) {
2032
2039
  const g = f;
2033
- g.msg = l.errormsg, g.status = l.status, s && s(g);
2040
+ g.msg = l.errormsg, g.status = l.status, n && n(g);
2034
2041
  }
2035
2042
  });
2036
2043
  });
2037
2044
  }, 500);
2038
2045
  }
2039
- function ye(e, t, n, s) {
2046
+ function _e(e, t, s, n) {
2040
2047
  const i = `${e._3DSwym}/api/directmessages/lite?with_favorites=false`;
2041
2048
  C(e, (r) => {
2042
2049
  m(i, {
@@ -2056,16 +2063,16 @@ function ye(e, t, n, s) {
2056
2063
  f.push(l.login);
2057
2064
  }), JSON.stringify(f) === JSON.stringify(d);
2058
2065
  });
2059
- n && u !== void 0 ? n(u) : (s || u === void 0) && s(u);
2066
+ s && u !== void 0 ? s(u) : (n || u === void 0) && n(u);
2060
2067
  },
2061
2068
  onFailure(a) {
2062
2069
  const o = a;
2063
- o.msg = headers.errormsg, o.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", o), s && s(o);
2070
+ o.msg = headers.errormsg, o.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", o), n && n(o);
2064
2071
  }
2065
2072
  });
2066
2073
  });
2067
2074
  }
2068
- function P(e, t, n = void 0, s = void 0) {
2075
+ function P(e, t, s = void 0, n = void 0) {
2069
2076
  const i = {
2070
2077
  base: e._3DSwym,
2071
2078
  uri: "/api/community",
@@ -2093,23 +2100,23 @@ function P(e, t, n = void 0, s = void 0) {
2093
2100
  type: "json",
2094
2101
  onComplete(c, d, u) {
2095
2102
  const p = c;
2096
- p.status = u.status, p.response = JSON.parse(u.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
2103
+ p.status = u.status, p.response = JSON.parse(u.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), s && s(p);
2097
2104
  },
2098
2105
  onFailure(c, d) {
2099
2106
  const u = c;
2100
- u.msg = d.errormsg, u.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
2107
+ u.msg = d.errormsg, u.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u);
2101
2108
  }
2102
2109
  });
2103
2110
  });
2104
2111
  }
2105
- function _e(e) {
2106
- const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
2112
+ function ye(e) {
2113
+ const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), s = (/* @__PURE__ */ new Date()).toLocaleTimeString();
2107
2114
  return `<p>${e} </p>
2108
2115
  <br/>
2109
2116
  <hr/>
2110
- <p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
2117
+ <p><u>envoyer :</u>Le <b>${t} à ${s}</b></p>`;
2111
2118
  }
2112
- function Ct(e, t, n = void 0, s = void 0) {
2119
+ function Ct(e, t, s = void 0, n = void 0) {
2113
2120
  const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
2114
2121
  (c) => c.id === t.community_id
2115
2122
  ), a = e.swymCommunities.find(
@@ -2139,20 +2146,20 @@ function Ct(e, t, n = void 0, s = void 0) {
2139
2146
  type: "json",
2140
2147
  onComplete(u, p, f) {
2141
2148
  const l = JSON.parse(u);
2142
- l.status = f.status, l.response = f.response, n && n(l);
2149
+ l.status = f.status, l.response = f.response, s && s(l);
2143
2150
  },
2144
2151
  onFailure(u, p, f) {
2145
2152
  const l = u;
2146
- l.status = p.status, l.response = p.errormsg, s && s(l);
2153
+ l.status = p.status, l.response = p.errormsg, n && n(l);
2147
2154
  }
2148
2155
  });
2149
2156
  });
2150
2157
  }
2151
- function Tt(e, t = void 0, n = void 0) {
2152
- const s = { base: e.space, uri: "/api/idea/add" };
2158
+ function Tt(e, t = void 0, s = void 0) {
2159
+ const n = { base: e.space, uri: "/api/idea/add" };
2153
2160
  if (!Array.isArray(e.swymCommunities)) {
2154
2161
  const a = "☠️ swymCommunities doit être un tableau d'objets de communautés";
2155
- throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2162
+ throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
2156
2163
  cause: a
2157
2164
  });
2158
2165
  }
@@ -2160,19 +2167,19 @@ function Tt(e, t = void 0, n = void 0) {
2160
2167
  (a) => a.id === e.community_id
2161
2168
  ) === -1) {
2162
2169
  const a = "la communauté n'existe pas dans la liste des communautés du Swym";
2163
- throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2170
+ throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
2164
2171
  cause: a
2165
2172
  });
2166
2173
  }
2167
2174
  if (e.community_id && e.community_id === "") {
2168
2175
  const a = "☠️ community_id doit être un String qui contient l'id de la communauté dans laquelle on souhaite publier l'idée.";
2169
- throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2176
+ throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
2170
2177
  cause: a
2171
2178
  });
2172
2179
  }
2173
2180
  if (e.title && e.title === "") {
2174
2181
  const a = "☠️ title doit être un String.";
2175
- throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2182
+ throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
2176
2183
  cause: a
2177
2184
  });
2178
2185
  }
@@ -2191,7 +2198,7 @@ function Tt(e, t = void 0, n = void 0) {
2191
2198
  C(e, (a) => {
2192
2199
  if (!a)
2193
2200
  throw new Error(
2194
- `☠️ token n'est pas disponible pour cette requête : ${s.base + s.uri}`,
2201
+ `☠️ token n'est pas disponible pour cette requête : ${n.base + n.uri}`,
2195
2202
  {
2196
2203
  cause: a
2197
2204
  }
@@ -2210,18 +2217,18 @@ function Tt(e, t = void 0, n = void 0) {
2210
2217
  },
2211
2218
  onFailure(c, d, u) {
2212
2219
  const p = JSON.parse(d), f = JSON.parse(c), l = new Error(
2213
- `Erreur sur cette requête : ${s.base + s.uri}`,
2220
+ `Erreur sur cette requête : ${n.base + n.uri}`,
2214
2221
  {
2215
2222
  cause: { head: p, rep: f }
2216
2223
  }
2217
2224
  );
2218
- n && n(l);
2225
+ s && s(l);
2219
2226
  }
2220
2227
  };
2221
- m(s.base + s.uri, o);
2228
+ m(n.base + n.uri, o);
2222
2229
  });
2223
2230
  }
2224
- function bt(e, t, n = void 0, s = void 0) {
2231
+ function bt(e, t, s = void 0, n = void 0) {
2225
2232
  const i = `${e.space}/api/idea/delete`, r = {
2226
2233
  params: {
2227
2234
  community_id: t.community_id,
@@ -2239,17 +2246,17 @@ function bt(e, t, n = void 0, s = void 0) {
2239
2246
  data: JSON.stringify(r),
2240
2247
  type: "json",
2241
2248
  onComplete(o, c, d) {
2242
- n && n(o);
2249
+ s && s(o);
2243
2250
  },
2244
2251
  onFailure(o, c, d) {
2245
2252
  const u = o;
2246
- u.status = c.status, u.response = c.errormsg, s && s(u);
2253
+ u.status = c.status, u.response = c.errormsg, n && n(u);
2247
2254
  }
2248
2255
  });
2249
2256
  });
2250
2257
  }
2251
- function Ot(e, t = void 0, n = void 0) {
2252
- const { _3DSwym: s, _3DSwym_token: i } = e, r = `${s}/api/idea/get`;
2258
+ function Ot(e, t = void 0, s = void 0) {
2259
+ const { _3DSwym: n, _3DSwym_token: i } = e, r = `${n}/api/idea/get`;
2253
2260
  if (e.idPost === "") {
2254
2261
  const o = "☠️ idPost est vide, vous devez renseigner un identifiant de post";
2255
2262
  throw new Error(`Erreur sur cette requête : ${r}`, { cause: o });
@@ -2272,13 +2279,13 @@ function Ot(e, t = void 0, n = void 0) {
2272
2279
  },
2273
2280
  onFailure(o) {
2274
2281
  const c = o;
2275
- c.status = headers.status, c.response = headers.errormsg, n && n(c);
2282
+ c.status = headers.status, c.response = headers.errormsg, s && s(c);
2276
2283
  }
2277
2284
  });
2278
2285
  }
2279
- function $t(e, t, n) {
2286
+ function $t(e, t, s) {
2280
2287
  const {
2281
- _3DSwym: s,
2288
+ _3DSwym: n,
2282
2289
  _3DSwym_token: i,
2283
2290
  idPost: r,
2284
2291
  title: a,
@@ -2287,7 +2294,7 @@ function $t(e, t, n) {
2287
2294
  status_id: d,
2288
2295
  message: u
2289
2296
  } = e, p = {
2290
- base: `${s}`,
2297
+ base: `${n}`,
2291
2298
  uri: "/api/idea/edit"
2292
2299
  }, l = {
2293
2300
  method: "POST",
@@ -2309,19 +2316,19 @@ function $t(e, t, n) {
2309
2316
  }
2310
2317
  }),
2311
2318
  type: "json",
2312
- onComplete(h, g, y) {
2313
- const _ = {
2319
+ onComplete(h, g, _) {
2320
+ const y = {
2314
2321
  response: typeof h == "string" ? JSON.parse(h) : h
2315
2322
  };
2316
- _.status = y.status, t && t(_);
2323
+ y.status = _.status, t && t(y);
2317
2324
  },
2318
2325
  onFailure(h) {
2319
- n && n(h);
2326
+ s && s(h);
2320
2327
  }
2321
2328
  };
2322
2329
  m(p.base + p.uri, l);
2323
2330
  }
2324
- function Nt(e, t, n = void 0, s = void 0) {
2331
+ function Nt(e, t, s = void 0, n = void 0) {
2325
2332
  const { _3DSwym: i } = e;
2326
2333
  let { community_id: r, limit: a, page: o, search: c } = t;
2327
2334
  const d = [], u = 1;
@@ -2335,8 +2342,8 @@ function Nt(e, t, n = void 0, s = void 0) {
2335
2342
  };
2336
2343
  let h = `${i}${l.uri}${l.comId}${l.limit}${l.page}`;
2337
2344
  C(e, (g) => {
2338
- const y = (_) => {
2339
- m(_, {
2345
+ const _ = (y) => {
2346
+ m(y, {
2340
2347
  method: "GET",
2341
2348
  headers: {
2342
2349
  "X-DS-SWYM-CSRFTOKEN": g.result.ServerToken
@@ -2344,31 +2351,31 @@ function Nt(e, t, n = void 0, s = void 0) {
2344
2351
  onComplete(S) {
2345
2352
  const w = { response: JSON.parse(S) };
2346
2353
  if (f = Math.ceil(Number(w.response.nb_result) / 100), S && f >= o) {
2347
- if (o++, l.page = `/page/${o}`, _ = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
2354
+ if (o++, l.page = `/page/${o}`, y = `${i}${l.uri}${l.comId}${l.limit}${l.page}`, !c)
2348
2355
  d.push(w.response.result);
2349
2356
  else {
2350
2357
  const T = w.response.result.find(
2351
2358
  (R) => R.title.includes(c)
2352
2359
  );
2353
2360
  if (T) {
2354
- n(T);
2361
+ s(T);
2355
2362
  return;
2356
2363
  }
2357
2364
  }
2358
- if (n && f < o && !c) {
2359
- p = !0, n(d);
2365
+ if (s && f < o && !c) {
2366
+ p = !0, s(d);
2360
2367
  return;
2361
2368
  }
2362
- y(_);
2369
+ _(y);
2363
2370
  }
2364
2371
  },
2365
2372
  onFailure(S, w) {
2366
2373
  const T = S;
2367
- T.status = w.status, T.response = w.errormsg, s && s(T);
2374
+ T.status = w.status, T.response = w.errormsg, n && n(T);
2368
2375
  }
2369
2376
  });
2370
2377
  };
2371
- p || y(h);
2378
+ p || _(h);
2372
2379
  });
2373
2380
  }
2374
2381
  function Se(e) {
@@ -2446,9 +2453,9 @@ function Se(e) {
2446
2453
  <p>
2447
2454
  </p>` : e;
2448
2455
  }
2449
- function xt(e, t = void 0, n = void 0) {
2450
- const { tenant: s, _3DSwym: i, _3DSwym_token: r, community_id: a, idea_id: o } = e;
2451
- if (s && i && r && a && o) {
2456
+ function xt(e, t = void 0, s = void 0) {
2457
+ const { tenant: n, _3DSwym: i, _3DSwym_token: r, community_id: a, idea_id: o } = e;
2458
+ if (n && i && r && a && o) {
2452
2459
  const c = `${i}/api/idea/forward`;
2453
2460
  m(c, {
2454
2461
  method: "POST",
@@ -2458,8 +2465,8 @@ function xt(e, t = void 0, n = void 0) {
2458
2465
  "X-DS-SWYM-CSRFTOKEN": r
2459
2466
  },
2460
2467
  data: JSON.stringify({
2461
- community_uri: `swym:prd:${s.toUpperCase()}:community:${a}`,
2462
- content_uri: `swym:prd:${s.toUpperCase()}:idea:${o}`,
2468
+ community_uri: `swym:prd:${n.toUpperCase()}:community:${a}`,
2469
+ content_uri: `swym:prd:${n.toUpperCase()}:idea:${o}`,
2463
2470
  timeout: 3e4
2464
2471
  }),
2465
2472
  type: "json",
@@ -2468,19 +2475,19 @@ function xt(e, t = void 0, n = void 0) {
2468
2475
  },
2469
2476
  onFailure(d, u) {
2470
2477
  const p = d;
2471
- p.status = u.status, p.response = u.errormsg, n && n(p);
2478
+ p.status = u.status, p.response = u.errormsg, s && s(p);
2472
2479
  }
2473
2480
  });
2474
2481
  } else
2475
- n && n({
2482
+ s && s({
2476
2483
  status: "error",
2477
2484
  msg: "Credentials incomplet !",
2478
2485
  attend: "tenant, _3DSwym , _3DSwym_token, community_id, idea_id",
2479
2486
  credentials: e
2480
2487
  });
2481
2488
  }
2482
- function Ft(e, t = void 0, n = void 0) {
2483
- return new Promise((s, i) => {
2489
+ function Ft(e, t = void 0, s = void 0) {
2490
+ return new Promise((n, i) => {
2484
2491
  try {
2485
2492
  let r;
2486
2493
  if (e._3DDashboard) {
@@ -2496,20 +2503,20 @@ function Ft(e, t = void 0, n = void 0) {
2496
2503
  } catch (f) {
2497
2504
  i("ERROR | _3DSwym_get_currentUser => JSON.Parse()", f);
2498
2505
  }
2499
- console.log(p), p.first_name = p?.firstName ? p.firstName : "", p.last_name = p?.lastName ? p.lastName : "", console.log("_3DSwym_get_currentUser | info", p), r = p, s(p);
2506
+ console.log(p), p.first_name = p?.firstName ? p.firstName : "", p.last_name = p?.lastName ? p.lastName : "", console.log("_3DSwym_get_currentUser | info", p), r = p, n(p);
2500
2507
  },
2501
2508
  onFailure(o) {
2502
2509
  i("ERROR | _3DSwym_get_currentUser => _3DDashboard + /api/users/current", o);
2503
2510
  }
2504
2511
  });
2505
2512
  }
2506
- r ? s(r) : i("ERROR | _3DSwym_get_currentUser => CURRENT_USER is null");
2513
+ r ? n(r) : i("ERROR | _3DSwym_get_currentUser => CURRENT_USER is null");
2507
2514
  } catch (r) {
2508
2515
  i("ERROR | _3DSwym_get_currentUser => ", r);
2509
2516
  }
2510
2517
  });
2511
2518
  }
2512
- function It(e, t, n = void 0, s = void 0) {
2519
+ function It(e, t, s = void 0, n = void 0) {
2513
2520
  const i = e.space + "/api/user/find/login/" + t;
2514
2521
  C(
2515
2522
  e,
@@ -2519,23 +2526,23 @@ function It(e, t, n = void 0, s = void 0) {
2519
2526
  headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
2520
2527
  onComplete(a, o, c) {
2521
2528
  const d = JSON.parse(a);
2522
- n && n(d);
2529
+ s && s(d);
2523
2530
  },
2524
2531
  onFailure(a) {
2525
- s && s(a);
2532
+ n && n(a);
2526
2533
  }
2527
2534
  });
2528
2535
  },
2529
- s
2536
+ n
2530
2537
  );
2531
2538
  }
2532
- function Ut(e, t = void 0, n = void 0) {
2539
+ function Ut(e, t = void 0, s = void 0) {
2533
2540
  const {
2534
- _3DSwym: s,
2541
+ _3DSwym: n,
2535
2542
  _3DSwym_token: i,
2536
2543
  subjectUri: r,
2537
2544
  richMessage: a
2538
- } = e, o = `${s}/commentproxy/subjects/${r}/comments`, d = {
2545
+ } = e, o = `${n}/commentproxy/subjects/${r}/comments`, d = {
2539
2546
  method: "POST",
2540
2547
  headers: {
2541
2548
  "Content-type": "application/json;charset=UTF-8",
@@ -2551,24 +2558,26 @@ function Ut(e, t = void 0, n = void 0) {
2551
2558
  l.status = f.status, t && t(l);
2552
2559
  },
2553
2560
  onFailure(u) {
2554
- n && n(u);
2561
+ s && s(u);
2555
2562
  }
2556
2563
  };
2557
2564
  m(o, d);
2558
2565
  }
2559
- function Rt(e, t = void 0, n = void 0) {
2560
- e.tenant && M(e, (s) => {
2561
- const i = s.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
2566
+ function Rt(e, t = void 0, s = void 0) {
2567
+ e.tenant && M(e, (n) => {
2568
+ const i = n.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
2562
2569
  return t && t(i), i;
2563
2570
  });
2564
2571
  }
2565
- function jt(e, t = void 0, n = void 0) {
2566
- e.tenant && M(e, (s) => {
2567
- const i = s.services.find(
2572
+ function jt(e, t = void 0, s = void 0) {
2573
+ console.log("_Iterop_Auth_CAS"), e.tenant && M(e, (n) => {
2574
+ console.log("serviceUrls", n);
2575
+ const i = n.services.find(
2568
2576
  (o) => o.id === "3dpassport"
2569
- )?.url, r = s.services.find((o) => o.id === "businessprocess")?.url + "/api/v2", a = `${i}/login/?service=${r}/auth/cas`;
2577
+ )?.url, r = n.services.find((o) => o.id === "businessprocess")?.url + "/api/v2", a = `${i}/login/?cors=false&service=${r}/auth/cas`;
2570
2578
  m(a, {
2571
2579
  async onComplete(o) {
2580
+ console.log("response", o);
2572
2581
  const c = typeof o == "string" ? JSON.parse(o)?.x3ds_service_redirect_url : o?.x3ds_service_redirect_url;
2573
2582
  await fetch(c, {
2574
2583
  method: "POST"
@@ -2577,24 +2586,24 @@ function jt(e, t = void 0, n = void 0) {
2577
2586
  });
2578
2587
  },
2579
2588
  onFailure(o) {
2580
- n && n(o);
2589
+ s && s(o);
2581
2590
  }
2582
2591
  });
2583
2592
  });
2584
2593
  }
2585
- function kt(e, t = void 0, n = void 0) {
2594
+ function kt(e, t = void 0, s = void 0) {
2586
2595
  if (e.tenant) {
2587
- const s = e.tenant.toLowerCase();
2588
- fetch(`https://api.uixhome.fr/${s}/iterop/jwtuser`, {
2596
+ const n = e.tenant.toLowerCase();
2597
+ fetch(`https://api.uixhome.fr/${n}/iterop/jwtuser`, {
2589
2598
  method: "POST"
2590
2599
  }).then((i) => i.json()).then((i) => {
2591
2600
  t && t(i);
2592
2601
  }).catch((i) => {
2593
- n && n(i);
2602
+ s && s(i);
2594
2603
  });
2595
2604
  }
2596
2605
  }
2597
- async function vt(e, t, n = void 0, s = void 0) {
2606
+ async function vt(e, t, s = void 0, n = void 0) {
2598
2607
  if (e.tenant) {
2599
2608
  const i = e.tenant.toLowerCase();
2600
2609
  fetch(
@@ -2603,61 +2612,61 @@ async function vt(e, t, n = void 0, s = void 0) {
2603
2612
  method: "GET"
2604
2613
  }
2605
2614
  ).then((r) => r.json()).then((r) => {
2606
- n && n(r);
2607
- }).catch((r) => {
2608
2615
  s && s(r);
2616
+ }).catch((r) => {
2617
+ n && n(r);
2609
2618
  });
2610
2619
  }
2611
2620
  }
2612
- async function Dt(e, t, n, s = void 0, i = void 0) {
2621
+ async function Dt(e, t, s, n = void 0, i = void 0) {
2613
2622
  if (e.tenant) {
2614
2623
  const r = e.tenant.toLowerCase();
2615
2624
  fetch(
2616
- `https://api.uixhome.fr/${r}/iterop/businesstable/one/${n}?t=${t}`,
2625
+ `https://api.uixhome.fr/${r}/iterop/businesstable/one/${s}?t=${t}`,
2617
2626
  {
2618
2627
  method: "POST"
2619
2628
  }
2620
2629
  ).then((a) => a.json()).then((a) => {
2621
- s && s(a);
2630
+ n && n(a);
2622
2631
  }).catch((a) => {
2623
2632
  i && i(a);
2624
2633
  });
2625
2634
  }
2626
2635
  }
2627
- async function At(e, t, n, s = void 0, i = void 0) {
2636
+ async function At(e, t, s, n = void 0, i = void 0) {
2628
2637
  if (e.tenant) {
2629
2638
  const r = e.tenant.toLowerCase();
2630
2639
  fetch(
2631
- `https://api.uixhome.fr/${r}/iterop/businesstable/rows/${n}/?t=${t}`,
2640
+ `https://api.uixhome.fr/${r}/iterop/businesstable/rows/${s}/?t=${t}`,
2632
2641
  {
2633
2642
  method: "POST"
2634
2643
  }
2635
2644
  ).then((a) => a.json()).then((a) => {
2636
- s && s(a);
2645
+ n && n(a);
2637
2646
  }).catch((a) => {
2638
2647
  i && i(a);
2639
2648
  });
2640
2649
  }
2641
2650
  }
2642
- async function Pt(e, t, n, s, i = void 0, r = void 0) {
2651
+ async function Pt(e, t, s, n, i = void 0, r = void 0) {
2643
2652
  if (e.tenant) {
2644
2653
  const a = e.tenant.toLowerCase();
2645
2654
  fetch(
2646
- `https://api.uixhome.fr/${a}/iterop/businesstable/patch/rows/${n}/?t=${t}&b=${s}`,
2655
+ `https://api.uixhome.fr/${a}/iterop/businesstable/patch/rows/${s}/?t=${t}&b=${n}`,
2647
2656
  {
2648
2657
  method: "POST"
2649
2658
  }
2650
2659
  ).then((o) => o.json()).then((o) => {
2651
2660
  i && i(o);
2652
2661
  }).catch((o) => {
2653
- r && r(o, n, s);
2662
+ r && r(o, s, n);
2654
2663
  });
2655
2664
  }
2656
2665
  }
2657
- async function Lt(e, t, n, s, i, r = void 0, a = void 0) {
2666
+ async function Lt(e, t, s, n, i, r = void 0, a = void 0) {
2658
2667
  if (e.tenant) {
2659
- const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${n}?t=${t}&c=${encodeURIComponent(
2660
- s
2668
+ const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${s}?t=${t}&c=${encodeURIComponent(
2669
+ n
2661
2670
  )}&b=${encodeURIComponent(i)}`;
2662
2671
  fetch(o, {
2663
2672
  method: "POST"
@@ -2666,17 +2675,17 @@ async function Lt(e, t, n, s, i, r = void 0, a = void 0) {
2666
2675
  }).catch((c) => {
2667
2676
  a && a({
2668
2677
  error: c,
2669
- tableId: n,
2670
- columns: s,
2678
+ tableId: s,
2679
+ columns: n,
2671
2680
  body: i
2672
2681
  });
2673
2682
  });
2674
2683
  }
2675
2684
  }
2676
- async function Mt(e, t, n, s, i = void 0, r = void 0) {
2685
+ async function Mt(e, t, s, n, i = void 0, r = void 0) {
2677
2686
  if (e.tenant) {
2678
- const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${n}?t=${t}&b=${encodeURIComponent(
2679
- s
2687
+ const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${s}?t=${t}&b=${encodeURIComponent(
2688
+ n
2680
2689
  )}`;
2681
2690
  fetch(a, {
2682
2691
  method: "POST"
@@ -2690,15 +2699,15 @@ async function Mt(e, t, n, s, i = void 0, r = void 0) {
2690
2699
  });
2691
2700
  }
2692
2701
  }
2693
- async function Jt(e, t, n, s = void 0, i = void 0) {
2702
+ async function Jt(e, t, s, n = void 0, i = void 0) {
2694
2703
  if (e.tenant) {
2695
2704
  const r = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/create/?t=${t}&b=${encodeURIComponent(
2696
- n
2705
+ s
2697
2706
  )}`;
2698
2707
  fetch(r, {
2699
2708
  method: "POST"
2700
2709
  }).then((a) => a.json()).then((a) => {
2701
- s && s(a);
2710
+ n && n(a);
2702
2711
  }).catch((a) => {
2703
2712
  i && i({
2704
2713
  error: a,
@@ -2707,11 +2716,11 @@ async function Jt(e, t, n, s = void 0, i = void 0) {
2707
2716
  });
2708
2717
  }
2709
2718
  }
2710
- async function Gt(e, t, n, s, i = void 0, r = void 0) {
2719
+ async function Gt(e, t, s, n, i = void 0, r = void 0) {
2711
2720
  if (e.tenant) {
2712
2721
  const a = e.tenant.toLowerCase();
2713
2722
  fetch(
2714
- `https://api.uixhome.fr/${a}/iterop/runtime/processes/${n}?t=${t}&b=${s}`,
2723
+ `https://api.uixhome.fr/${a}/iterop/runtime/processes/${s}?t=${t}&b=${n}`,
2715
2724
  {
2716
2725
  method: "POST"
2717
2726
  }
@@ -2722,26 +2731,26 @@ async function Gt(e, t, n, s, i = void 0, r = void 0) {
2722
2731
  });
2723
2732
  }
2724
2733
  }
2725
- async function Kt(e, t, n, s = void 0, i = void 0) {
2734
+ async function Kt(e, t, s, n = void 0, i = void 0) {
2726
2735
  if (console.log("_Iterop_GetOneDependencyTable | Run"), e.tenant) {
2727
2736
  const r = e.tenant.toLowerCase();
2728
2737
  fetch(
2729
- `https://api.uixhome.fr/${r}/iterop/dependencytable/one/${n}/?t=${t}`,
2738
+ `https://api.uixhome.fr/${r}/iterop/dependencytable/one/${s}/?t=${t}`,
2730
2739
  {
2731
2740
  method: "POST"
2732
2741
  }
2733
2742
  ).then((a) => a.json()).then((a) => {
2734
- s && s(a);
2743
+ n && n(a);
2735
2744
  }).catch((a) => {
2736
2745
  i && i(a);
2737
2746
  });
2738
2747
  }
2739
2748
  }
2740
- async function Bt(e, t, n, s, i, r = void 0, a = void 0) {
2749
+ async function Bt(e, t, s, n, i, r = void 0, a = void 0) {
2741
2750
  if (e.tenant) {
2742
2751
  const o = e.tenant.toLowerCase();
2743
2752
  fetch(
2744
- `https://api.uixhome.fr/${o}/iterop/dependencytable/patch/${n}/?t=${t}&cli=${s}&b=${i}`,
2753
+ `https://api.uixhome.fr/${o}/iterop/dependencytable/patch/${s}/?t=${t}&cli=${n}&b=${i}`,
2745
2754
  {
2746
2755
  method: "POST"
2747
2756
  }
@@ -2752,11 +2761,11 @@ async function Bt(e, t, n, s, i, r = void 0, a = void 0) {
2752
2761
  });
2753
2762
  }
2754
2763
  }
2755
- async function qt(e, t, n, s, i = void 0, r = void 0) {
2764
+ async function qt(e, t, s, n, i = void 0, r = void 0) {
2756
2765
  if (e.tenant) {
2757
2766
  const a = e.tenant.toLowerCase();
2758
2767
  fetch(
2759
- `https://api.uixhome.fr/${a}/iterop/dependencytable/put/${n}/?t=${t}&b=${s}`,
2768
+ `https://api.uixhome.fr/${a}/iterop/dependencytable/put/${s}/?t=${t}&b=${n}`,
2760
2769
  {
2761
2770
  method: "POST"
2762
2771
  }
@@ -2768,16 +2777,16 @@ async function qt(e, t, n, s, i = void 0, r = void 0) {
2768
2777
  }
2769
2778
  }
2770
2779
  //!SECTION
2771
- async function Et(e, t, n, s = void 0, i = void 0) {
2780
+ async function Et(e, t, s, n = void 0, i = void 0) {
2772
2781
  if (e.tenant) {
2773
2782
  const r = e.tenant.toLowerCase();
2774
2783
  fetch(
2775
- `https://api.uixhome.fr/${r}/iterop/list/one/${n}/?t=${t}`,
2784
+ `https://api.uixhome.fr/${r}/iterop/list/one/${s}/?t=${t}`,
2776
2785
  {
2777
2786
  method: "POST"
2778
2787
  }
2779
2788
  ).then((a) => a.json()).then((a) => {
2780
- s && s(a);
2789
+ n && n(a);
2781
2790
  }).catch((a) => {
2782
2791
  i && i(a);
2783
2792
  });
@@ -2788,8 +2797,8 @@ function Xt(e) {
2788
2797
  const t = "Hello " + e;
2789
2798
  return console.log(t), t;
2790
2799
  }
2791
- function Wt(e, t = void 0, n = void 0) {
2792
- return console.log("credentials", e), new Promise((s) => {
2800
+ function Wt(e, t = void 0, s = void 0) {
2801
+ return console.log("credentials", e), new Promise((n) => {
2793
2802
  if (e.token === "" && b(e), !e.space || e.space === "") {
2794
2803
  const a = Z();
2795
2804
  console.log("platformeInfo", a);
@@ -2856,13 +2865,13 @@ function Wt(e, t = void 0, n = void 0) {
2856
2865
  t && t(d);
2857
2866
  },
2858
2867
  onFailure(d) {
2859
- n && n(d);
2868
+ s && s(d);
2860
2869
  }
2861
2870
  });
2862
2871
  }
2863
2872
  },
2864
2873
  onFailure(a) {
2865
- n && n(a);
2874
+ s && s(a);
2866
2875
  }
2867
2876
  });
2868
2877
  });
@@ -2899,11 +2908,11 @@ export {
2899
2908
  wt as _3DSwym_buildDirectMessage,
2900
2909
  bt as _3DSwym_deleteIdea,
2901
2910
  $t as _3DSwym_editIdea,
2902
- ye as _3DSwym_findCommunityToInstantMSG,
2903
- _t as _3DSwym_getAllCommunities,
2911
+ _e as _3DSwym_findCommunityToInstantMSG,
2912
+ yt as _3DSwym_getAllCommunities,
2904
2913
  Nt as _3DSwym_getAllListIdeas,
2905
2914
  gt as _3DSwym_getAllNews,
2906
- yt as _3DSwym_getFamiliarPeople,
2915
+ _t as _3DSwym_getFamiliarPeople,
2907
2916
  St as _3DSwym_getIdeaStatusMaturity,
2908
2917
  ge as _3DSwym_getMembersCommunity,
2909
2918
  Ot as _3DSwym_getOneIdea,