@beam3_dev/api_module 0.0.291 → 0.0.292

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 Ae(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 De(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
  } };
@@ -384,13 +382,13 @@ function Ge(e, t = void 0, n = void 0) {
384
382
  f.rules = _, t && t(f);
385
383
  },
386
384
  (_) => {
387
- n && n(_);
385
+ s && s(_);
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,7 +669,7 @@ 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
675
  const y = {};
@@ -719,9 +717,13 @@ function ae(e, t, n, s, i, r, a = void 0, o = void 0) {
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
  }
@@ -782,7 +784,7 @@ async function Ye(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
782
784
  const { ticket: y, actionurl: _, jobticket: S } = l;
783
785
  K(
784
786
  { dataelements: { ticket: y, ticketURL: _ } },
785
- n,
787
+ s,
786
788
  t,
787
789
  (w) => {
788
790
  const R = new DOMParser().parseFromString(
@@ -792,7 +794,7 @@ async function Ye(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
792
794
  R
793
795
  )}`;
794
796
  let W = /(?:\.([^.]+))?$/.exec(t)[1];
795
- const D = JSON.stringify({
797
+ const A = JSON.stringify({
796
798
  actions: [],
797
799
  businessobj: {
798
800
  description: e?.description,
@@ -815,15 +817,15 @@ async function Ye(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0)
815
817
  "Content-Type": "application/json;charset=UTF-8",
816
818
  "X-DS-CSRFTOKEN": p
817
819
  },
818
- data: D,
820
+ data: A,
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(
825
827
  "_3DSpace_Upload_Doc | pushFileInFcs | onFailure",
826
- { url: v, bodyRequest: D, err: F }
828
+ { url: v, bodyRequest: A, err: F }
827
829
  ), i && i(F);
828
830
  }
829
831
  });
@@ -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",
@@ -1016,10 +1018,10 @@ function U(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, a = !1
1016
1018
  (y, _, S) => _ === S.findIndex(
1017
1019
  (w) => w.organization.pid === y.organization.pid && w.role.pid === y.role.pid
1018
1020
  )
1019
- ), n && (Array.isArray(n) ? n.forEach((y) => {
1021
+ ), s && (Array.isArray(s) ? s.forEach((y) => {
1020
1022
  l || g.forEach((_) => {
1021
- if (y === _.role.name && s === _.organization.title)
1022
- l = y, f = s;
1023
+ if (y === _.role.name && n === _.organization.title)
1024
+ l = y, f = n;
1023
1025
  else if (y === _.role.name) {
1024
1026
  let S = g.filter(
1025
1027
  (w) => w.role.name === y
@@ -1028,11 +1030,11 @@ function U(e, t = void 0, n = void 0, s = void 0, i = void 0, r = void 0, a = !1
1028
1030
  }
1029
1031
  });
1030
1032
  }) : 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) {
1033
+ if (s === y.role.name && n === y.organization.title)
1034
+ l = s, f = n;
1035
+ else if (s === y.role.name) {
1034
1036
  let _ = g.filter(
1035
- (S) => S.role.name === n
1037
+ (S) => S.role.name === s
1036
1038
  );
1037
1039
  _.length === 1 ? (l = _[0].role.name, f = _[0].organization.title) : r(_);
1038
1040
  }
@@ -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,87 @@ 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) => {
1529
1532
  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
1533
  G(
1531
1534
  e,
1532
- n,
1535
+ s,
1533
1536
  o,
1534
1537
  r,
1535
1538
  c,
1536
1539
  (d) => {
1537
- s && s(d);
1540
+ n && n(d);
1538
1541
  },
1539
1542
  (d) => {
1540
1543
  i && i(d);
1541
1544
  }
1542
1545
  );
1546
+ },
1547
+ (a) => {
1548
+ console.log("En cas d'erreur nous avons :", a), alert("Erreur lors de la sauvegarde, Veuillez réessayez"), i && i(a);
1543
1549
  }
1544
1550
  );
1545
1551
  }
1546
1552
  let q, E;
1547
- const A = [];
1548
- async function ut(e, t = void 0, n = void 0) {
1553
+ const D = [];
1554
+ async function ut(e, t = void 0, s = void 0) {
1549
1555
  e.objID && e.objID !== "" ? I(
1550
1556
  e,
1551
- (s) => {
1552
- t && t(s);
1557
+ (n) => {
1558
+ t && t(n);
1553
1559
  },
1554
- (s) => {
1555
- n && n(s);
1560
+ (n) => {
1561
+ s && s(n);
1556
1562
  }
1557
1563
  ) : (e.objID === null || e.objID === "") && b(
1558
1564
  e,
1559
- (s) => {
1560
- t && t({ rep: s, msg: "Pas d'objID, ou invalide" });
1565
+ (n) => {
1566
+ t && t({ rep: n, msg: "Pas d'objID, ou invalide" });
1561
1567
  },
1562
- (s) => {
1563
- n && n({ msg: "Pas d'objID et erreur sur le Space", err: s });
1568
+ (n) => {
1569
+ s && s({ msg: "Pas d'objID et erreur sur le Space", err: n });
1564
1570
  }
1565
1571
  );
1566
1572
  }
1567
- async function pt(e, t = void 0, n = void 0) {
1573
+ async function pt(e, t = void 0, s = void 0) {
1568
1574
  console.log("getDatasByTenant (getDocuments)", e), await B(
1569
1575
  e,
1570
- (s) => {
1576
+ (n) => {
1571
1577
  const i = {};
1572
- i.obj = s, console.log("getDatasByTenant (getDocuments) _datas", i), t && t?.(i);
1578
+ i.obj = n, console.log("getDatasByTenant (getDocuments) _datas", i), t && t?.(i);
1573
1579
  },
1574
- (s) => {
1575
- n && n?.(s);
1580
+ (n) => {
1581
+ s && s?.(n);
1576
1582
  }
1577
1583
  );
1578
1584
  }
1579
- function lt(e, t = void 0, n = void 0) {
1580
- const s = [];
1585
+ function lt(e, t = void 0, s = void 0) {
1586
+ const n = [];
1581
1587
  if (!e.objIds && !Array.isArray(e.objIds) && e.objIds.length === 0) {
1582
1588
  console.warn("la liste est vide ou n'est pas un tableau");
1583
1589
  return;
@@ -1587,21 +1593,21 @@ function lt(e, t = void 0, n = void 0) {
1587
1593
  e,
1588
1594
  i.objID,
1589
1595
  (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);
1596
+ 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
1597
  }
1592
1598
  );
1593
1599
  });
1594
1600
  }
1595
- function pe(e, t, n = void 0, s = void 0) {
1601
+ function pe(e, t, s = void 0, n = void 0) {
1596
1602
  ce(
1597
1603
  e,
1598
1604
  q,
1599
1605
  (i) => {
1600
1606
  const r = [...t];
1601
- r.find((a) => a.objectID === i.objectId).data = i.data, E = r, A.push(i.data), n && n(A);
1607
+ r.find((a) => a.objectID === i.objectId).data = i.data, E = r, D.push(i.data), s && s(D);
1602
1608
  },
1603
1609
  (i) => {
1604
- s && (s(i), console.log(i));
1610
+ n && (n(i), console.log(i));
1605
1611
  }
1606
1612
  );
1607
1613
  }
@@ -1625,7 +1631,7 @@ const le = "FA35FB9B177A280065800EA0000F599C", fe = [
1625
1631
  order_by: "desc",
1626
1632
  tag: "testTag"
1627
1633
  };
1628
- function ft(e, t, n = void 0, s = void 0) {
1634
+ function ft(e, t, s = void 0, n = void 0) {
1629
1635
  const { space: i, tenant: r } = e, { objId: a, pred: o, tag: c } = t, d = {
1630
1636
  uri: "/resources/6w/tags",
1631
1637
  otpCTX: "SecurityContext=preferred",
@@ -1665,27 +1671,27 @@ function ft(e, t, n = void 0, s = void 0) {
1665
1671
  e,
1666
1672
  t,
1667
1673
  (S) => {
1668
- n && n(S);
1674
+ s && s(S);
1669
1675
  },
1670
1676
  (S) => {
1671
- s && s(S);
1677
+ n && n(S);
1672
1678
  }
1673
1679
  );
1674
1680
  },
1675
1681
  (h, g) => {
1676
1682
  const y = h;
1677
- y.msg = g.errormsg, y.errCode = g.errorcode, console.log("❌ sendDirectMessage => ", y), s && s(y);
1683
+ y.msg = g.errormsg, y.errCode = g.errorcode, console.log("❌ sendDirectMessage => ", y), n && n(y);
1678
1684
  }
1679
1685
  );
1680
1686
  }, 2e3);
1681
1687
  },
1682
1688
  onFailure(f, l) {
1683
1689
  const h = f;
1684
- h.msg = l.errormsg, h.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", h), s && s(h);
1690
+ h.msg = l.errormsg, h.errCode = l.errorcode, console.log("❌ sendDirectMessage => ", h), n && n(h);
1685
1691
  }
1686
1692
  });
1687
1693
  }
1688
- function he(e, t, n = void 0, s = void 0) {
1694
+ function he(e, t, s = void 0, n = void 0) {
1689
1695
  console.log("obj ", t);
1690
1696
  const i = t.info.name, r = {
1691
1697
  baseUrl: `https://${e.tenant.toLowerCase()}-eu1-fedsearch.3dexperience.3ds.com`,
@@ -1760,15 +1766,15 @@ function he(e, t, n = void 0, s = void 0) {
1760
1766
  data: JSON.stringify(d),
1761
1767
  onComplete(u) {
1762
1768
  const p = JSON.parse(u);
1763
- n(p);
1769
+ s(p);
1764
1770
  },
1765
1771
  onFailure(u, p) {
1766
1772
  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);
1773
+ 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
1774
  }
1769
1775
  });
1770
1776
  }
1771
- function mt(e, t, n = void 0, s = void 0) {
1777
+ function mt(e, t, s = void 0, n = void 0) {
1772
1778
  const { objId: i, pred: r, tag: a } = t, o = {
1773
1779
  uri: "/resources/6w/tags",
1774
1780
  otpCTX: "SecurityContext=preferred",
@@ -1796,15 +1802,15 @@ function mt(e, t, n = void 0, s = void 0) {
1796
1802
  Accept: "application/json,text/javascript,*/*"
1797
1803
  },
1798
1804
  onComplete(u) {
1799
- n && n(u);
1805
+ s && s(u);
1800
1806
  },
1801
1807
  onFailure(u, p) {
1802
1808
  const f = u;
1803
- f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), s && s(f);
1809
+ f.msg = p.errormsg, f.errCode = p.errorcode, console.log("❌ sendDirectMessage => ", f), n && n(f);
1804
1810
  }
1805
1811
  });
1806
1812
  }
1807
- function ht(e, t = "", n = void 0, s = void 0) {
1813
+ function ht(e, t = "", s = void 0, n = void 0) {
1808
1814
  const { space: i } = e;
1809
1815
  if (t === "")
1810
1816
  return;
@@ -1819,29 +1825,29 @@ function ht(e, t = "", n = void 0, s = void 0) {
1819
1825
  headers: a,
1820
1826
  data: c,
1821
1827
  onComplete(d) {
1822
- n && n(JSON.parse(d));
1828
+ s && s(JSON.parse(d));
1823
1829
  },
1824
1830
  onFailure(d, u) {
1825
1831
  const p = d;
1826
- p.msg = u.error, s && s(p);
1832
+ p.msg = u.error, n && n(p);
1827
1833
  }
1828
1834
  });
1829
1835
  }
1830
- async function C(e, t = void 0, n = void 0) {
1831
- const s = e._3DSwym + "/api/index/tk";
1832
- return m(s, {
1836
+ async function C(e, t = void 0, s = void 0) {
1837
+ const n = e._3DSwym + "/api/index/tk";
1838
+ return m(n, {
1833
1839
  onComplete(i, r, a) {
1834
1840
  const o = JSON.parse(i);
1835
1841
  if (t)
1836
1842
  return t(o), e.token = o?.result?.ServerToken;
1837
1843
  },
1838
1844
  onFailure(i) {
1839
- n && n(i);
1845
+ s && s(i);
1840
1846
  }
1841
1847
  });
1842
1848
  }
1843
- function gt(e, t = void 0, n = void 0) {
1844
- const s = `${e._3DSwym}/api/exalead/whatsnew`, i = {
1849
+ function gt(e, t = void 0, s = void 0) {
1850
+ const n = `${e._3DSwym}/api/exalead/whatsnew`, i = {
1845
1851
  params: {
1846
1852
  community_id: null,
1847
1853
  hash_key: null,
@@ -1852,7 +1858,7 @@ function gt(e, t = void 0, n = void 0) {
1852
1858
  }
1853
1859
  };
1854
1860
  C(e, (r) => {
1855
- m(s, {
1861
+ m(n, {
1856
1862
  method: "POST",
1857
1863
  headers: {
1858
1864
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
@@ -1865,13 +1871,13 @@ function gt(e, t = void 0, n = void 0) {
1865
1871
  t && t(a, o);
1866
1872
  },
1867
1873
  onFailure(a, o) {
1868
- n && n(a, o);
1874
+ s && s(a, o);
1869
1875
  }
1870
1876
  });
1871
1877
  });
1872
1878
  }
1873
- function yt(e, t = void 0, n = void 0) {
1874
- const s = `${e._3DSwym}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
1879
+ function yt(e, t = void 0, s = void 0) {
1880
+ const n = `${e._3DSwym}/api/Recommendation/getpeoplefamiliartocurrentuser`, i = {
1875
1881
  params: {
1876
1882
  idsToFilterArr: [],
1877
1883
  mode: "offline",
@@ -1881,7 +1887,7 @@ function yt(e, t = void 0, n = void 0) {
1881
1887
  }
1882
1888
  };
1883
1889
  C(e, (r) => {
1884
- m(s, {
1890
+ m(n, {
1885
1891
  method: "POST",
1886
1892
  headers: {
1887
1893
  "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken,
@@ -1895,18 +1901,18 @@ function yt(e, t = void 0, n = void 0) {
1895
1901
  t && t(c, a);
1896
1902
  },
1897
1903
  onFailure(a, o) {
1898
- n && n(a, o);
1904
+ s && s(a, o);
1899
1905
  }
1900
1906
  });
1901
1907
  });
1902
1908
  }
1903
- function _t(e, t = void 0, n = void 0) {
1904
- const s = {
1909
+ function _t(e, t = void 0, s = void 0) {
1910
+ const n = {
1905
1911
  base: e._3DSwym,
1906
1912
  uri: "/api/community/listmycommunities",
1907
1913
  limit: `/limit/${e.limit ? e.limit : 500}`,
1908
1914
  page: `/page/${e.page ? e.page : "1"}`
1909
- }, i = `${s.base}${s.uri}${s.limit}${s.page}`, r = [];
1915
+ }, i = `${n.base}${n.uri}${n.limit}${n.page}`, r = [];
1910
1916
  C(e, (a) => {
1911
1917
  m(i, {
1912
1918
  method: "GET",
@@ -1931,18 +1937,18 @@ function _t(e, t = void 0, n = void 0) {
1931
1937
  (g) => {
1932
1938
  f++, h.members = g, r.push(h), f === p.length && t && t(r);
1933
1939
  },
1934
- (g) => n(g)
1940
+ (g) => s(g)
1935
1941
  );
1936
1942
  });
1937
1943
  },
1938
1944
  onFailure(o, c) {
1939
1945
  const d = o;
1940
- d.status = c.status, d.response = c.errormsg, n && n(d);
1946
+ d.status = c.status, d.response = c.errormsg, s && s(d);
1941
1947
  }
1942
1948
  });
1943
1949
  });
1944
1950
  }
1945
- function ge(e, t, n, s) {
1951
+ function ge(e, t, s, n) {
1946
1952
  const i = `${e._3DSwym}/api/community/listmembers`, r = {
1947
1953
  params: {
1948
1954
  page: e.page ? e.page : 1,
@@ -1961,18 +1967,18 @@ function ge(e, t, n, s) {
1961
1967
  data: JSON.stringify(r),
1962
1968
  type: "json",
1963
1969
  onComplete(o, c, d) {
1964
- n && n(o);
1970
+ s && s(o);
1965
1971
  },
1966
1972
  onFailure(o, c) {
1967
1973
  const d = o;
1968
- d.status = c.status, d.response = c.errormsg, s && s(d);
1974
+ d.status = c.status, d.response = c.errormsg, n && n(d);
1969
1975
  }
1970
1976
  });
1971
1977
  });
1972
1978
  }
1973
- function St(e, t = void 0, n = void 0) {
1974
- const s = "YXdA5x4DSUKtlAi2wmnyTA";
1975
- e.commu_id || (e.commu_id = s);
1979
+ function St(e, t = void 0, s = void 0) {
1980
+ const n = "YXdA5x4DSUKtlAi2wmnyTA";
1981
+ e.commu_id || (e.commu_id = n);
1976
1982
  const i = `${e._3DSwym}/api/v2/communities/${e.commu_id}/ideas/statuses`;
1977
1983
  C(e, (r) => {
1978
1984
  m(i, {
@@ -1988,12 +1994,12 @@ function St(e, t = void 0, n = void 0) {
1988
1994
  },
1989
1995
  onFailure(a, o) {
1990
1996
  const c = a;
1991
- c.status = o.status, c.response = o.errormsg, n && n(c);
1997
+ c.status = o.status, c.response = o.errormsg, s && s(c);
1992
1998
  }
1993
1999
  });
1994
2000
  });
1995
2001
  }
1996
- function wt(e, t, n = void 0, s = void 0) {
2002
+ function wt(e, t, s = void 0, n = void 0) {
1997
2003
  const { listAllContacts: i, currentUser: r, _3DSwym: a } = e;
1998
2004
  console.log("__listAllContacts", i.hits);
1999
2005
  const o = `${a}/api/directmessages`, c = {
@@ -2011,7 +2017,7 @@ function wt(e, t, n = void 0, s = void 0) {
2011
2017
  p !== void 0 && (d.id_msg = p.id, u = !0, P(e, d));
2012
2018
  },
2013
2019
  (p) => {
2014
- u = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), s && s(p), d.id_msg = "";
2020
+ u = !1, console.log("_3dSwym_findCommunityToInstantMSG callback", p), n && n(p), d.id_msg = "";
2015
2021
  }
2016
2022
  ), u === !1 && setTimeout(() => {
2017
2023
  u === !1 && C(e, (p) => {
@@ -2026,17 +2032,17 @@ function wt(e, t, n = void 0, s = void 0) {
2026
2032
  type: "json",
2027
2033
  onComplete(f, l, h) {
2028
2034
  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);
2035
+ g.reponse = JSON.parse(h.response), g.status = h.status, s && s(g), d.id_msg = g.result.id, P(e, d);
2030
2036
  },
2031
2037
  onFailure(f, l, h) {
2032
2038
  const g = f;
2033
- g.msg = l.errormsg, g.status = l.status, s && s(g);
2039
+ g.msg = l.errormsg, g.status = l.status, n && n(g);
2034
2040
  }
2035
2041
  });
2036
2042
  });
2037
2043
  }, 500);
2038
2044
  }
2039
- function ye(e, t, n, s) {
2045
+ function ye(e, t, s, n) {
2040
2046
  const i = `${e._3DSwym}/api/directmessages/lite?with_favorites=false`;
2041
2047
  C(e, (r) => {
2042
2048
  m(i, {
@@ -2056,16 +2062,16 @@ function ye(e, t, n, s) {
2056
2062
  f.push(l.login);
2057
2063
  }), JSON.stringify(f) === JSON.stringify(d);
2058
2064
  });
2059
- n && u !== void 0 ? n(u) : (s || u === void 0) && s(u);
2065
+ s && u !== void 0 ? s(u) : (n || u === void 0) && n(u);
2060
2066
  },
2061
2067
  onFailure(a) {
2062
2068
  const o = a;
2063
- o.msg = headers.errormsg, o.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", o), s && s(o);
2069
+ o.msg = headers.errormsg, o.errCode = headers.errorcode, console.log("❌ sendDirectMessageLite => ", o), n && n(o);
2064
2070
  }
2065
2071
  });
2066
2072
  });
2067
2073
  }
2068
- function P(e, t, n = void 0, s = void 0) {
2074
+ function P(e, t, s = void 0, n = void 0) {
2069
2075
  const i = {
2070
2076
  base: e._3DSwym,
2071
2077
  uri: "/api/community",
@@ -2093,23 +2099,23 @@ function P(e, t, n = void 0, s = void 0) {
2093
2099
  type: "json",
2094
2100
  onComplete(c, d, u) {
2095
2101
  const p = c;
2096
- p.status = u.status, p.response = JSON.parse(u.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), n && n(p);
2102
+ p.status = u.status, p.response = JSON.parse(u.response), console.log("✅ _3dSwym_sendDirectMessageData => ", p), s && s(p);
2097
2103
  },
2098
2104
  onFailure(c, d) {
2099
2105
  const u = c;
2100
- u.msg = d.errormsg, u.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", u), s && s(u);
2106
+ u.msg = d.errormsg, u.errCode = d.errorcode, console.log("❌ sendDirectMessage => ", u), n && n(u);
2101
2107
  }
2102
2108
  });
2103
2109
  });
2104
2110
  }
2105
2111
  function _e(e) {
2106
- const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), n = (/* @__PURE__ */ new Date()).toLocaleTimeString();
2112
+ const t = (/* @__PURE__ */ new Date()).toLocaleDateString(), s = (/* @__PURE__ */ new Date()).toLocaleTimeString();
2107
2113
  return `<p>${e} </p>
2108
2114
  <br/>
2109
2115
  <hr/>
2110
- <p><u>envoyer :</u>Le <b>${t} à ${n}</b></p>`;
2116
+ <p><u>envoyer :</u>Le <b>${t} à ${s}</b></p>`;
2111
2117
  }
2112
- function Ct(e, t, n = void 0, s = void 0) {
2118
+ function Ct(e, t, s = void 0, n = void 0) {
2113
2119
  const i = `${e.space}/api/idea/add`, r = e.swymCommunities.find(
2114
2120
  (c) => c.id === t.community_id
2115
2121
  ), a = e.swymCommunities.find(
@@ -2139,20 +2145,20 @@ function Ct(e, t, n = void 0, s = void 0) {
2139
2145
  type: "json",
2140
2146
  onComplete(u, p, f) {
2141
2147
  const l = JSON.parse(u);
2142
- l.status = f.status, l.response = f.response, n && n(l);
2148
+ l.status = f.status, l.response = f.response, s && s(l);
2143
2149
  },
2144
2150
  onFailure(u, p, f) {
2145
2151
  const l = u;
2146
- l.status = p.status, l.response = p.errormsg, s && s(l);
2152
+ l.status = p.status, l.response = p.errormsg, n && n(l);
2147
2153
  }
2148
2154
  });
2149
2155
  });
2150
2156
  }
2151
- function Tt(e, t = void 0, n = void 0) {
2152
- const s = { base: e.space, uri: "/api/idea/add" };
2157
+ function Tt(e, t = void 0, s = void 0) {
2158
+ const n = { base: e.space, uri: "/api/idea/add" };
2153
2159
  if (!Array.isArray(e.swymCommunities)) {
2154
2160
  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}`, {
2161
+ throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
2156
2162
  cause: a
2157
2163
  });
2158
2164
  }
@@ -2160,19 +2166,19 @@ function Tt(e, t = void 0, n = void 0) {
2160
2166
  (a) => a.id === e.community_id
2161
2167
  ) === -1) {
2162
2168
  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}`, {
2169
+ throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
2164
2170
  cause: a
2165
2171
  });
2166
2172
  }
2167
2173
  if (e.community_id && e.community_id === "") {
2168
2174
  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}`, {
2175
+ throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
2170
2176
  cause: a
2171
2177
  });
2172
2178
  }
2173
2179
  if (e.title && e.title === "") {
2174
2180
  const a = "☠️ title doit être un String.";
2175
- throw new Error(`Erreur sur cette requête : ${s.base + s.uri}`, {
2181
+ throw new Error(`Erreur sur cette requête : ${n.base + n.uri}`, {
2176
2182
  cause: a
2177
2183
  });
2178
2184
  }
@@ -2191,7 +2197,7 @@ function Tt(e, t = void 0, n = void 0) {
2191
2197
  C(e, (a) => {
2192
2198
  if (!a)
2193
2199
  throw new Error(
2194
- `☠️ token n'est pas disponible pour cette requête : ${s.base + s.uri}`,
2200
+ `☠️ token n'est pas disponible pour cette requête : ${n.base + n.uri}`,
2195
2201
  {
2196
2202
  cause: a
2197
2203
  }
@@ -2210,18 +2216,18 @@ function Tt(e, t = void 0, n = void 0) {
2210
2216
  },
2211
2217
  onFailure(c, d, u) {
2212
2218
  const p = JSON.parse(d), f = JSON.parse(c), l = new Error(
2213
- `Erreur sur cette requête : ${s.base + s.uri}`,
2219
+ `Erreur sur cette requête : ${n.base + n.uri}`,
2214
2220
  {
2215
2221
  cause: { head: p, rep: f }
2216
2222
  }
2217
2223
  );
2218
- n && n(l);
2224
+ s && s(l);
2219
2225
  }
2220
2226
  };
2221
- m(s.base + s.uri, o);
2227
+ m(n.base + n.uri, o);
2222
2228
  });
2223
2229
  }
2224
- function bt(e, t, n = void 0, s = void 0) {
2230
+ function bt(e, t, s = void 0, n = void 0) {
2225
2231
  const i = `${e.space}/api/idea/delete`, r = {
2226
2232
  params: {
2227
2233
  community_id: t.community_id,
@@ -2239,17 +2245,17 @@ function bt(e, t, n = void 0, s = void 0) {
2239
2245
  data: JSON.stringify(r),
2240
2246
  type: "json",
2241
2247
  onComplete(o, c, d) {
2242
- n && n(o);
2248
+ s && s(o);
2243
2249
  },
2244
2250
  onFailure(o, c, d) {
2245
2251
  const u = o;
2246
- u.status = c.status, u.response = c.errormsg, s && s(u);
2252
+ u.status = c.status, u.response = c.errormsg, n && n(u);
2247
2253
  }
2248
2254
  });
2249
2255
  });
2250
2256
  }
2251
- function Ot(e, t = void 0, n = void 0) {
2252
- const { _3DSwym: s, _3DSwym_token: i } = e, r = `${s}/api/idea/get`;
2257
+ function Ot(e, t = void 0, s = void 0) {
2258
+ const { _3DSwym: n, _3DSwym_token: i } = e, r = `${n}/api/idea/get`;
2253
2259
  if (e.idPost === "") {
2254
2260
  const o = "☠️ idPost est vide, vous devez renseigner un identifiant de post";
2255
2261
  throw new Error(`Erreur sur cette requête : ${r}`, { cause: o });
@@ -2272,13 +2278,13 @@ function Ot(e, t = void 0, n = void 0) {
2272
2278
  },
2273
2279
  onFailure(o) {
2274
2280
  const c = o;
2275
- c.status = headers.status, c.response = headers.errormsg, n && n(c);
2281
+ c.status = headers.status, c.response = headers.errormsg, s && s(c);
2276
2282
  }
2277
2283
  });
2278
2284
  }
2279
- function $t(e, t, n) {
2285
+ function $t(e, t, s) {
2280
2286
  const {
2281
- _3DSwym: s,
2287
+ _3DSwym: n,
2282
2288
  _3DSwym_token: i,
2283
2289
  idPost: r,
2284
2290
  title: a,
@@ -2287,7 +2293,7 @@ function $t(e, t, n) {
2287
2293
  status_id: d,
2288
2294
  message: u
2289
2295
  } = e, p = {
2290
- base: `${s}`,
2296
+ base: `${n}`,
2291
2297
  uri: "/api/idea/edit"
2292
2298
  }, l = {
2293
2299
  method: "POST",
@@ -2316,12 +2322,12 @@ function $t(e, t, n) {
2316
2322
  _.status = y.status, t && t(_);
2317
2323
  },
2318
2324
  onFailure(h) {
2319
- n && n(h);
2325
+ s && s(h);
2320
2326
  }
2321
2327
  };
2322
2328
  m(p.base + p.uri, l);
2323
2329
  }
2324
- function Nt(e, t, n = void 0, s = void 0) {
2330
+ function Nt(e, t, s = void 0, n = void 0) {
2325
2331
  const { _3DSwym: i } = e;
2326
2332
  let { community_id: r, limit: a, page: o, search: c } = t;
2327
2333
  const d = [], u = 1;
@@ -2351,12 +2357,12 @@ function Nt(e, t, n = void 0, s = void 0) {
2351
2357
  (R) => R.title.includes(c)
2352
2358
  );
2353
2359
  if (T) {
2354
- n(T);
2360
+ s(T);
2355
2361
  return;
2356
2362
  }
2357
2363
  }
2358
- if (n && f < o && !c) {
2359
- p = !0, n(d);
2364
+ if (s && f < o && !c) {
2365
+ p = !0, s(d);
2360
2366
  return;
2361
2367
  }
2362
2368
  y(_);
@@ -2364,7 +2370,7 @@ function Nt(e, t, n = void 0, s = void 0) {
2364
2370
  },
2365
2371
  onFailure(S, w) {
2366
2372
  const T = S;
2367
- T.status = w.status, T.response = w.errormsg, s && s(T);
2373
+ T.status = w.status, T.response = w.errormsg, n && n(T);
2368
2374
  }
2369
2375
  });
2370
2376
  };
@@ -2446,9 +2452,9 @@ function Se(e) {
2446
2452
  <p>
2447
2453
  </p>` : e;
2448
2454
  }
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) {
2455
+ function xt(e, t = void 0, s = void 0) {
2456
+ const { tenant: n, _3DSwym: i, _3DSwym_token: r, community_id: a, idea_id: o } = e;
2457
+ if (n && i && r && a && o) {
2452
2458
  const c = `${i}/api/idea/forward`;
2453
2459
  m(c, {
2454
2460
  method: "POST",
@@ -2458,8 +2464,8 @@ function xt(e, t = void 0, n = void 0) {
2458
2464
  "X-DS-SWYM-CSRFTOKEN": r
2459
2465
  },
2460
2466
  data: JSON.stringify({
2461
- community_uri: `swym:prd:${s.toUpperCase()}:community:${a}`,
2462
- content_uri: `swym:prd:${s.toUpperCase()}:idea:${o}`,
2467
+ community_uri: `swym:prd:${n.toUpperCase()}:community:${a}`,
2468
+ content_uri: `swym:prd:${n.toUpperCase()}:idea:${o}`,
2463
2469
  timeout: 3e4
2464
2470
  }),
2465
2471
  type: "json",
@@ -2468,19 +2474,19 @@ function xt(e, t = void 0, n = void 0) {
2468
2474
  },
2469
2475
  onFailure(d, u) {
2470
2476
  const p = d;
2471
- p.status = u.status, p.response = u.errormsg, n && n(p);
2477
+ p.status = u.status, p.response = u.errormsg, s && s(p);
2472
2478
  }
2473
2479
  });
2474
2480
  } else
2475
- n && n({
2481
+ s && s({
2476
2482
  status: "error",
2477
2483
  msg: "Credentials incomplet !",
2478
2484
  attend: "tenant, _3DSwym , _3DSwym_token, community_id, idea_id",
2479
2485
  credentials: e
2480
2486
  });
2481
2487
  }
2482
- function Ft(e, t = void 0, n = void 0) {
2483
- return new Promise((s, i) => {
2488
+ function Ft(e, t = void 0, s = void 0) {
2489
+ return new Promise((n, i) => {
2484
2490
  try {
2485
2491
  let r;
2486
2492
  if (e._3DDashboard) {
@@ -2496,20 +2502,20 @@ function Ft(e, t = void 0, n = void 0) {
2496
2502
  } catch (f) {
2497
2503
  i("ERROR | _3DSwym_get_currentUser => JSON.Parse()", f);
2498
2504
  }
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);
2505
+ 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
2506
  },
2501
2507
  onFailure(o) {
2502
2508
  i("ERROR | _3DSwym_get_currentUser => _3DDashboard + /api/users/current", o);
2503
2509
  }
2504
2510
  });
2505
2511
  }
2506
- r ? s(r) : i("ERROR | _3DSwym_get_currentUser => CURRENT_USER is null");
2512
+ r ? n(r) : i("ERROR | _3DSwym_get_currentUser => CURRENT_USER is null");
2507
2513
  } catch (r) {
2508
2514
  i("ERROR | _3DSwym_get_currentUser => ", r);
2509
2515
  }
2510
2516
  });
2511
2517
  }
2512
- function It(e, t, n = void 0, s = void 0) {
2518
+ function It(e, t, s = void 0, n = void 0) {
2513
2519
  const i = e.space + "/api/user/find/login/" + t;
2514
2520
  C(
2515
2521
  e,
@@ -2519,23 +2525,23 @@ function It(e, t, n = void 0, s = void 0) {
2519
2525
  headers: { "X-DS-SWYM-CSRFTOKEN": r.result.ServerToken },
2520
2526
  onComplete(a, o, c) {
2521
2527
  const d = JSON.parse(a);
2522
- n && n(d);
2528
+ s && s(d);
2523
2529
  },
2524
2530
  onFailure(a) {
2525
- s && s(a);
2531
+ n && n(a);
2526
2532
  }
2527
2533
  });
2528
2534
  },
2529
- s
2535
+ n
2530
2536
  );
2531
2537
  }
2532
- function Ut(e, t = void 0, n = void 0) {
2538
+ function Ut(e, t = void 0, s = void 0) {
2533
2539
  const {
2534
- _3DSwym: s,
2540
+ _3DSwym: n,
2535
2541
  _3DSwym_token: i,
2536
2542
  subjectUri: r,
2537
2543
  richMessage: a
2538
- } = e, o = `${s}/commentproxy/subjects/${r}/comments`, d = {
2544
+ } = e, o = `${n}/commentproxy/subjects/${r}/comments`, d = {
2539
2545
  method: "POST",
2540
2546
  headers: {
2541
2547
  "Content-type": "application/json;charset=UTF-8",
@@ -2551,24 +2557,26 @@ function Ut(e, t = void 0, n = void 0) {
2551
2557
  l.status = f.status, t && t(l);
2552
2558
  },
2553
2559
  onFailure(u) {
2554
- n && n(u);
2560
+ s && s(u);
2555
2561
  }
2556
2562
  };
2557
2563
  m(o, d);
2558
2564
  }
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";
2565
+ function Rt(e, t = void 0, s = void 0) {
2566
+ e.tenant && M(e, (n) => {
2567
+ const i = n.services.find((r) => r.id === "businessprocess")?.url + "/api/v2";
2562
2568
  return t && t(i), i;
2563
2569
  });
2564
2570
  }
2565
- function jt(e, t = void 0, n = void 0) {
2566
- e.tenant && M(e, (s) => {
2567
- const i = s.services.find(
2571
+ function jt(e, t = void 0, s = void 0) {
2572
+ console.log("_Iterop_Auth_CAS"), e.tenant && M(e, (n) => {
2573
+ console.log("serviceUrls", n);
2574
+ const i = n.services.find(
2568
2575
  (o) => o.id === "3dpassport"
2569
- )?.url, r = s.services.find((o) => o.id === "businessprocess")?.url + "/api/v2", a = `${i}/login/?service=${r}/auth/cas`;
2576
+ )?.url, r = n.services.find((o) => o.id === "businessprocess")?.url + "/api/v2", a = `${i}/login/?cors=false&service=${r}/auth/cas`;
2570
2577
  m(a, {
2571
2578
  async onComplete(o) {
2579
+ console.log("response", o);
2572
2580
  const c = typeof o == "string" ? JSON.parse(o)?.x3ds_service_redirect_url : o?.x3ds_service_redirect_url;
2573
2581
  await fetch(c, {
2574
2582
  method: "POST"
@@ -2577,24 +2585,24 @@ function jt(e, t = void 0, n = void 0) {
2577
2585
  });
2578
2586
  },
2579
2587
  onFailure(o) {
2580
- n && n(o);
2588
+ s && s(o);
2581
2589
  }
2582
2590
  });
2583
2591
  });
2584
2592
  }
2585
- function kt(e, t = void 0, n = void 0) {
2593
+ function kt(e, t = void 0, s = void 0) {
2586
2594
  if (e.tenant) {
2587
- const s = e.tenant.toLowerCase();
2588
- fetch(`https://api.uixhome.fr/${s}/iterop/jwtuser`, {
2595
+ const n = e.tenant.toLowerCase();
2596
+ fetch(`https://api.uixhome.fr/${n}/iterop/jwtuser`, {
2589
2597
  method: "POST"
2590
2598
  }).then((i) => i.json()).then((i) => {
2591
2599
  t && t(i);
2592
2600
  }).catch((i) => {
2593
- n && n(i);
2601
+ s && s(i);
2594
2602
  });
2595
2603
  }
2596
2604
  }
2597
- async function vt(e, t, n = void 0, s = void 0) {
2605
+ async function vt(e, t, s = void 0, n = void 0) {
2598
2606
  if (e.tenant) {
2599
2607
  const i = e.tenant.toLowerCase();
2600
2608
  fetch(
@@ -2603,61 +2611,61 @@ async function vt(e, t, n = void 0, s = void 0) {
2603
2611
  method: "GET"
2604
2612
  }
2605
2613
  ).then((r) => r.json()).then((r) => {
2606
- n && n(r);
2607
- }).catch((r) => {
2608
2614
  s && s(r);
2615
+ }).catch((r) => {
2616
+ n && n(r);
2609
2617
  });
2610
2618
  }
2611
2619
  }
2612
- async function Dt(e, t, n, s = void 0, i = void 0) {
2620
+ async function At(e, t, s, n = void 0, i = void 0) {
2613
2621
  if (e.tenant) {
2614
2622
  const r = e.tenant.toLowerCase();
2615
2623
  fetch(
2616
- `https://api.uixhome.fr/${r}/iterop/businesstable/one/${n}?t=${t}`,
2624
+ `https://api.uixhome.fr/${r}/iterop/businesstable/one/${s}?t=${t}`,
2617
2625
  {
2618
2626
  method: "POST"
2619
2627
  }
2620
2628
  ).then((a) => a.json()).then((a) => {
2621
- s && s(a);
2629
+ n && n(a);
2622
2630
  }).catch((a) => {
2623
2631
  i && i(a);
2624
2632
  });
2625
2633
  }
2626
2634
  }
2627
- async function At(e, t, n, s = void 0, i = void 0) {
2635
+ async function Dt(e, t, s, n = void 0, i = void 0) {
2628
2636
  if (e.tenant) {
2629
2637
  const r = e.tenant.toLowerCase();
2630
2638
  fetch(
2631
- `https://api.uixhome.fr/${r}/iterop/businesstable/rows/${n}/?t=${t}`,
2639
+ `https://api.uixhome.fr/${r}/iterop/businesstable/rows/${s}/?t=${t}`,
2632
2640
  {
2633
2641
  method: "POST"
2634
2642
  }
2635
2643
  ).then((a) => a.json()).then((a) => {
2636
- s && s(a);
2644
+ n && n(a);
2637
2645
  }).catch((a) => {
2638
2646
  i && i(a);
2639
2647
  });
2640
2648
  }
2641
2649
  }
2642
- async function Pt(e, t, n, s, i = void 0, r = void 0) {
2650
+ async function Pt(e, t, s, n, i = void 0, r = void 0) {
2643
2651
  if (e.tenant) {
2644
2652
  const a = e.tenant.toLowerCase();
2645
2653
  fetch(
2646
- `https://api.uixhome.fr/${a}/iterop/businesstable/patch/rows/${n}/?t=${t}&b=${s}`,
2654
+ `https://api.uixhome.fr/${a}/iterop/businesstable/patch/rows/${s}/?t=${t}&b=${n}`,
2647
2655
  {
2648
2656
  method: "POST"
2649
2657
  }
2650
2658
  ).then((o) => o.json()).then((o) => {
2651
2659
  i && i(o);
2652
2660
  }).catch((o) => {
2653
- r && r(o, n, s);
2661
+ r && r(o, s, n);
2654
2662
  });
2655
2663
  }
2656
2664
  }
2657
- async function Lt(e, t, n, s, i, r = void 0, a = void 0) {
2665
+ async function Lt(e, t, s, n, i, r = void 0, a = void 0) {
2658
2666
  if (e.tenant) {
2659
- const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${n}?t=${t}&c=${encodeURIComponent(
2660
- s
2667
+ const o = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/search/rows/${s}?t=${t}&c=${encodeURIComponent(
2668
+ n
2661
2669
  )}&b=${encodeURIComponent(i)}`;
2662
2670
  fetch(o, {
2663
2671
  method: "POST"
@@ -2666,17 +2674,17 @@ async function Lt(e, t, n, s, i, r = void 0, a = void 0) {
2666
2674
  }).catch((c) => {
2667
2675
  a && a({
2668
2676
  error: c,
2669
- tableId: n,
2670
- columns: s,
2677
+ tableId: s,
2678
+ columns: n,
2671
2679
  body: i
2672
2680
  });
2673
2681
  });
2674
2682
  }
2675
2683
  }
2676
- async function Mt(e, t, n, s, i = void 0, r = void 0) {
2684
+ async function Mt(e, t, s, n, i = void 0, r = void 0) {
2677
2685
  if (e.tenant) {
2678
- const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${n}?t=${t}&b=${encodeURIComponent(
2679
- s
2686
+ const a = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/update/${s}?t=${t}&b=${encodeURIComponent(
2687
+ n
2680
2688
  )}`;
2681
2689
  fetch(a, {
2682
2690
  method: "POST"
@@ -2690,15 +2698,15 @@ async function Mt(e, t, n, s, i = void 0, r = void 0) {
2690
2698
  });
2691
2699
  }
2692
2700
  }
2693
- async function Jt(e, t, n, s = void 0, i = void 0) {
2701
+ async function Jt(e, t, s, n = void 0, i = void 0) {
2694
2702
  if (e.tenant) {
2695
2703
  const r = `https://api.uixhome.fr/${e.tenant.toLowerCase()}/iterop/businesstable/post/create/?t=${t}&b=${encodeURIComponent(
2696
- n
2704
+ s
2697
2705
  )}`;
2698
2706
  fetch(r, {
2699
2707
  method: "POST"
2700
2708
  }).then((a) => a.json()).then((a) => {
2701
- s && s(a);
2709
+ n && n(a);
2702
2710
  }).catch((a) => {
2703
2711
  i && i({
2704
2712
  error: a,
@@ -2707,11 +2715,11 @@ async function Jt(e, t, n, s = void 0, i = void 0) {
2707
2715
  });
2708
2716
  }
2709
2717
  }
2710
- async function Gt(e, t, n, s, i = void 0, r = void 0) {
2718
+ async function Gt(e, t, s, n, i = void 0, r = void 0) {
2711
2719
  if (e.tenant) {
2712
2720
  const a = e.tenant.toLowerCase();
2713
2721
  fetch(
2714
- `https://api.uixhome.fr/${a}/iterop/runtime/processes/${n}?t=${t}&b=${s}`,
2722
+ `https://api.uixhome.fr/${a}/iterop/runtime/processes/${s}?t=${t}&b=${n}`,
2715
2723
  {
2716
2724
  method: "POST"
2717
2725
  }
@@ -2722,26 +2730,26 @@ async function Gt(e, t, n, s, i = void 0, r = void 0) {
2722
2730
  });
2723
2731
  }
2724
2732
  }
2725
- async function Kt(e, t, n, s = void 0, i = void 0) {
2733
+ async function Kt(e, t, s, n = void 0, i = void 0) {
2726
2734
  if (console.log("_Iterop_GetOneDependencyTable | Run"), e.tenant) {
2727
2735
  const r = e.tenant.toLowerCase();
2728
2736
  fetch(
2729
- `https://api.uixhome.fr/${r}/iterop/dependencytable/one/${n}/?t=${t}`,
2737
+ `https://api.uixhome.fr/${r}/iterop/dependencytable/one/${s}/?t=${t}`,
2730
2738
  {
2731
2739
  method: "POST"
2732
2740
  }
2733
2741
  ).then((a) => a.json()).then((a) => {
2734
- s && s(a);
2742
+ n && n(a);
2735
2743
  }).catch((a) => {
2736
2744
  i && i(a);
2737
2745
  });
2738
2746
  }
2739
2747
  }
2740
- async function Bt(e, t, n, s, i, r = void 0, a = void 0) {
2748
+ async function Bt(e, t, s, n, i, r = void 0, a = void 0) {
2741
2749
  if (e.tenant) {
2742
2750
  const o = e.tenant.toLowerCase();
2743
2751
  fetch(
2744
- `https://api.uixhome.fr/${o}/iterop/dependencytable/patch/${n}/?t=${t}&cli=${s}&b=${i}`,
2752
+ `https://api.uixhome.fr/${o}/iterop/dependencytable/patch/${s}/?t=${t}&cli=${n}&b=${i}`,
2745
2753
  {
2746
2754
  method: "POST"
2747
2755
  }
@@ -2752,11 +2760,11 @@ async function Bt(e, t, n, s, i, r = void 0, a = void 0) {
2752
2760
  });
2753
2761
  }
2754
2762
  }
2755
- async function qt(e, t, n, s, i = void 0, r = void 0) {
2763
+ async function qt(e, t, s, n, i = void 0, r = void 0) {
2756
2764
  if (e.tenant) {
2757
2765
  const a = e.tenant.toLowerCase();
2758
2766
  fetch(
2759
- `https://api.uixhome.fr/${a}/iterop/dependencytable/put/${n}/?t=${t}&b=${s}`,
2767
+ `https://api.uixhome.fr/${a}/iterop/dependencytable/put/${s}/?t=${t}&b=${n}`,
2760
2768
  {
2761
2769
  method: "POST"
2762
2770
  }
@@ -2768,16 +2776,16 @@ async function qt(e, t, n, s, i = void 0, r = void 0) {
2768
2776
  }
2769
2777
  }
2770
2778
  //!SECTION
2771
- async function Et(e, t, n, s = void 0, i = void 0) {
2779
+ async function Et(e, t, s, n = void 0, i = void 0) {
2772
2780
  if (e.tenant) {
2773
2781
  const r = e.tenant.toLowerCase();
2774
2782
  fetch(
2775
- `https://api.uixhome.fr/${r}/iterop/list/one/${n}/?t=${t}`,
2783
+ `https://api.uixhome.fr/${r}/iterop/list/one/${s}/?t=${t}`,
2776
2784
  {
2777
2785
  method: "POST"
2778
2786
  }
2779
2787
  ).then((a) => a.json()).then((a) => {
2780
- s && s(a);
2788
+ n && n(a);
2781
2789
  }).catch((a) => {
2782
2790
  i && i(a);
2783
2791
  });
@@ -2788,8 +2796,8 @@ function Xt(e) {
2788
2796
  const t = "Hello " + e;
2789
2797
  return console.log(t), t;
2790
2798
  }
2791
- function Wt(e, t = void 0, n = void 0) {
2792
- return console.log("credentials", e), new Promise((s) => {
2799
+ function Wt(e, t = void 0, s = void 0) {
2800
+ return console.log("credentials", e), new Promise((n) => {
2793
2801
  if (e.token === "" && b(e), !e.space || e.space === "") {
2794
2802
  const a = Z();
2795
2803
  console.log("platformeInfo", a);
@@ -2856,13 +2864,13 @@ function Wt(e, t = void 0, n = void 0) {
2856
2864
  t && t(d);
2857
2865
  },
2858
2866
  onFailure(d) {
2859
- n && n(d);
2867
+ s && s(d);
2860
2868
  }
2861
2869
  });
2862
2870
  }
2863
2871
  },
2864
2872
  onFailure(a) {
2865
- n && n(a);
2873
+ s && s(a);
2866
2874
  }
2867
2875
  });
2868
2876
  });
@@ -2924,8 +2932,8 @@ export {
2924
2932
  Lt as _Iterop_businessTableSearchInRows,
2925
2933
  Jt as _Iterop_createBusinessTable,
2926
2934
  vt as _Iterop_getAllBusinessTables,
2927
- Dt as _Iterop_getOneBusinessTable,
2928
- At as _Iterop_getOneBusinessTableRows,
2935
+ At as _Iterop_getOneBusinessTable,
2936
+ Dt as _Iterop_getOneBusinessTableRows,
2929
2937
  kt as _Iterop_jwtUser,
2930
2938
  Gt as _Iterop_runProcess,
2931
2939
  Mt as _Iterop_updateBusinessTable,
@@ -2933,7 +2941,7 @@ export {
2933
2941
  Z as _getPlateformInfos,
2934
2942
  ke as _getPlatformServices,
2935
2943
  M as _getServiceUrl,
2936
- De as _getServiceUrl_3DPassport,
2944
+ Ae as _getServiceUrl_3DPassport,
2937
2945
  Rt as _getServiceUrl_Iterop,
2938
2946
  m as _httpCallAuthenticated,
2939
2947
  Ue as _setDraggable,
@@ -2941,7 +2949,7 @@ export {
2941
2949
  Re as _setupTagger,
2942
2950
  ft as addTagToDoc,
2943
2951
  z as chunkArray,
2944
- Ae as compass_getListAdditionalApps,
2952
+ De as compass_getListAdditionalApps,
2945
2953
  H as couleurs,
2946
2954
  Me as createUserGroups,
2947
2955
  pe as dataMixing,